commit 2c85ebc57b3e1817b6ce1a6b703928e113a90442 Author: Linus Torvalds Date: Sun Dec 13 14:41:30 2020 -0800 Linux 5.10 commit ec6f5e0e5ca0764b4bc522c9f9d5abf876a0e3e3 Merge: d2360a398f0b6 0d07c0ec4381f Author: Linus Torvalds Date: Sun Dec 13 11:31:19 2020 -0800 Merge tag 'x86-urgent-2020-12-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A set of x86 and membarrier fixes: - Correct a few problems in the x86 and the generic membarrier implementation. Small corrections for assumptions about visibility which have turned out not to be true. - Make the PAT bits for memory encryption correct vs 4K and 2M/1G page table entries as they are at a different location. - Fix a concurrency issue in the the local bandwidth readout of resource control leading to incorrect values - Fix the ordering of allocating a vector for an interrupt. The order missed to respect the provided cpumask when the first attempt of allocating node local in the mask fails. It then tries the node instead of trying the full provided mask first. This leads to erroneous error messages and breaking the (user) supplied affinity request. Reorder it. - Make the INT3 padding detection in optprobe work correctly" * tag 'x86-urgent-2020-12-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kprobes: Fix optprobe to detect INT3 padding correctly x86/apic/vector: Fix ordering in vector assignment x86/resctrl: Fix incorrect local bandwidth when mba_sc is enabled x86/mm/mem_encrypt: Fix definition of PMD_FLAGS_DEC_WP membarrier: Execute SYNC_CORE on the calling thread membarrier: Explicitly sync remote cores when SYNC_CORE is requested membarrier: Add an actual barrier before rseq_preempt() x86/membarrier: Get rid of a dubious optimization commit d2360a398f0b68722641c59aeb2623e79bd03e34 Merge: 6bff9bb8a2926 6ffeb1c3f8226 Author: Linus Torvalds Date: Sun Dec 13 10:36:23 2020 -0800 Merge tag 'block-5.10-2020-12-12' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "This should be it for 5.10. Mike and Song looked into the warning case, and thankfully it appears the fix was pretty trivial - we can just change the md device chunk type to unsigned int to get rid of it. They cannot currently be < 0, and nobody is checking for that either. We're reverting the discard changes as the corruption reports came in very late, and there's just no time to attempt to deal with it at this point. Reverting the changes in question is the right call for 5.10" * tag 'block-5.10-2020-12-12' of git://git.kernel.dk/linux-block: md: change mddev 'chunk_sectors' from int to unsigned Revert "md: add md_submit_discard_bio() for submitting discard bio" Revert "md/raid10: extend r10bio devs to raid disks" Revert "md/raid10: pull codes that wait for blocked dev into one function" Revert "md/raid10: improve raid10 discard request" Revert "md/raid10: improve discard request for far layout" Revert "dm raid: remove unnecessary discard limits for raid10" commit 6bff9bb8a292668e7da3e740394b061e5201f683 Merge: 5ee595d9079b9 4da3a54f5a025 Author: Linus Torvalds Date: Sat Dec 12 12:57:12 2020 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Five small fixes. Four in drivers: - hisi_sas: fix internal queue timeout - be2iscsi: revert a prior fix causing problems - bnx2i: add missing dependency - storvsc: late arriving revert of a problem fix and one in the core. The core one is a minor change to stop paying attention to the busy count when returning out of resources because there's a race window where the queue might not restart due to missing returning I/O" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: Revert "scsi: storvsc: Validate length of incoming packet in storvsc_on_channel_callback()" scsi: hisi_sas: Select a suitable queue for internal I/Os scsi: core: Fix race between handling STS_RESOURCE and completion scsi: be2iscsi: Revert "Fix a theoretical leak in beiscsi_create_eqs()" scsi: bnx2i: Requires MMU commit 5ee595d9079b94ee931287ce004d34886b7d3c24 Merge: 7b1b868e1d915 e977aaf899a6d Author: Linus Torvalds Date: Sat Dec 12 12:47:46 2020 -0800 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang: "Bugfix for the AT24 EEPROM driver" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: misc: eeprom: at24: fix NVMEM name with custom AT24 device name commit 7b1b868e1d9156484ccce9bf11122c053de82617 Merge: b53966ffd4c06 111d0bda8eeb4 Author: Linus Torvalds Date: Sat Dec 12 10:08:16 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Bugfixes for ARM, x86 and tools" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: tools/kvm_stat: Exempt time-based counters KVM: mmu: Fix SPTE encoding of MMIO generation upper half kvm: x86/mmu: Use cpuid to determine max gfn kvm: svm: de-allocate svm_cpu_data for all cpus in svm_cpu_uninit() selftests: kvm/set_memory_region_test: Fix race in move region test KVM: arm64: Add usage of stage 2 fault lookup level in user_mem_abort() KVM: arm64: Fix handling of merging tables into a block entry KVM: arm64: Fix memory leak on stage2 update of a valid PTE commit b53966ffd4c0676c02987d4fc33b99bdfc548cf0 Merge: b01deddb8d3cb ee32f32335e8c Author: Linus Torvalds Date: Sat Dec 12 10:02:03 2020 -0800 Merge tag 'for-linus-5.10c-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "A short series fixing a regression introduced in 5.9 for running as Xen dom0 on a system with NVMe backed storage" * tag 'for-linus-5.10c-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: don't use page->lru for ZONE_DEVICE memory xen: add helpers for caching grant mapping pages commit b01deddb8d3cb779ac250978afd200931fd91dcd Merge: 31d00f6eb1f2b ccbbfd1cbf365 Author: Linus Torvalds Date: Sat Dec 12 09:50:26 2020 -0800 Merge tag 'riscv-for-linus-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fix from Palmer Dabbelt: "Just one fix. It's nothing critical, just a randconfig that wasn't building. That said, it does seem pretty safe and is technically a regression so I'm sending it along for 5.10: - define get_cycles64() all the time, as it's used by most configurations" * tag 'riscv-for-linus-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Define get_cycles64() regardless of M-mode commit 31d00f6eb1f2b498a1d7af62cffeba3fbea8cf75 Merge: 643e69aff89a2 f26c08b444df8 Author: Linus Torvalds Date: Sat Dec 12 09:45:01 2020 -0800 Merge tag 'io_uring-5.10-2020-12-11' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Two fixes in here, fixing issues introduced in this merge window" * tag 'io_uring-5.10-2020-12-11' of git://git.kernel.dk/linux-block: io_uring: fix file leak on error path of io ctx creation io_uring: fix mis-seting personality's creds commit 643e69aff89a2d0abc53979acc441b68ce86139b Merge: 7f376f1917d74 cffdd6d904823 Author: Linus Torvalds Date: Sat Dec 12 09:41:33 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - a fix for cm109 stomping on its own control URB if it tries to toggle buzzer immediately after userspace opens input device (found by syzcaller) - another fix for Raydium touchscreens that do not like splitting command transfers - quirks for i8042, soc_button_array, and goodix drivers to make them work better with certain hardware. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: goodix - add upside-down quirk for Teclast X98 Pro tablet Input: cm109 - do not stomp on control URB Input: i8042 - add Acer laptops to the i8042 reset list Input: cros_ec_keyb - send 'scancodes' in addition to key events Input: soc_button_array - add Lenovo Yoga Tablet2 1051L to the dmi_use_low_level_irq list Input: raydium_ts_i2c - do not split tx transactions commit 6ffeb1c3f8226244c08105bcdbeecc04bad6b89a Author: Mike Snitzer Date: Sat Dec 12 11:55:37 2020 -0500 md: change mddev 'chunk_sectors' from int to unsigned Commit e2782f560c29 ("Revert "dm raid: remove unnecessary discard limits for raid10"") exposed compiler warnings introduced by commit e0910c8e4f87 ("dm raid: fix discard limits for raid1 and raid10"): In file included from ./include/linux/kernel.h:14, from ./include/asm-generic/bug.h:20, from ./arch/x86/include/asm/bug.h:93, from ./include/linux/bug.h:5, from ./include/linux/mmdebug.h:5, from ./include/linux/gfp.h:5, from ./include/linux/slab.h:15, from drivers/md/dm-raid.c:8: drivers/md/dm-raid.c: In function ‘raid_io_hints’: ./include/linux/minmax.h:18:28: warning: comparison of distinct pointer types lacks a cast (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) ^~ ./include/linux/minmax.h:32:4: note: in expansion of macro ‘__typecheck’ (__typecheck(x, y) && __no_side_effects(x, y)) ^~~~~~~~~~~ ./include/linux/minmax.h:42:24: note: in expansion of macro ‘__safe_cmp’ __builtin_choose_expr(__safe_cmp(x, y), \ ^~~~~~~~~~ ./include/linux/minmax.h:51:19: note: in expansion of macro ‘__careful_cmp’ #define min(x, y) __careful_cmp(x, y, <) ^~~~~~~~~~~~~ ./include/linux/minmax.h:84:39: note: in expansion of macro ‘min’ __x == 0 ? __y : ((__y == 0) ? __x : min(__x, __y)); }) ^~~ drivers/md/dm-raid.c:3739:33: note: in expansion of macro ‘min_not_zero’ limits->max_discard_sectors = min_not_zero(rs->md.chunk_sectors, ^~~~~~~~~~~~ Fix this by changing the chunk_sectors member of 'struct mddev' from int to 'unsigned int' to match the type used for the 'chunk_sectors' member of 'struct queue_limits'. Various MD code still uses 'int' but none of it appears to ever make use of signed int; and storing positive signed int in unsigned is perfectly safe. Reported-by: Song Liu Fixes: e2782f560c29 ("Revert "dm raid: remove unnecessary discard limits for raid10"") Fixes: e0910c8e4f87 ("dm raid: fix discard limits for raid1 and raid10") Cc: stable@vger,kernel.org # e0910c8e4f87 was marked for stable@ Signed-off-by: Mike Snitzer Reviewed-by: Song Liu Signed-off-by: Jens Axboe commit 0d07c0ec4381f630c801539c79ad8dcc627f6e4a Author: Masami Hiramatsu Date: Fri Dec 11 16:04:17 2020 +0900 x86/kprobes: Fix optprobe to detect INT3 padding correctly Commit 7705dc855797 ("x86/vmlinux: Use INT3 instead of NOP for linker fill bytes") changed the padding bytes between functions from NOP to INT3. However, when optprobe decodes a target function it finds INT3 and gives up the jump optimization. Instead of giving up any INT3 detection, check whether the rest of the bytes to the end of the function are INT3. If all of them are INT3, those come from the linker. In that case, continue the optprobe jump optimization. [ bp: Massage commit message. ] Fixes: 7705dc855797 ("x86/vmlinux: Use INT3 instead of NOP for linker fill bytes") Reported-by: Adam Zabrocki Signed-off-by: Masami Hiramatsu Signed-off-by: Borislav Petkov Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/160767025681.3880685.16021570341428835411.stgit@devnote2 commit cffdd6d90482316e18d686060a4397902ea04bd2 Author: Simon Beginn Date: Fri Dec 11 16:17:32 2020 -0800 Input: goodix - add upside-down quirk for Teclast X98 Pro tablet The touchscreen on the Teclast x98 Pro is also mounted upside-down in relation to the display orientation. Signed-off-by: Simon Beginn Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20201117004253.27A5A27EFD@localhost Signed-off-by: Dmitry Torokhov commit 111d0bda8eeb4b54e0c63897b071effbf9fd9251 Author: Stefan Raspl Date: Tue Dec 8 22:08:29 2020 +0100 tools/kvm_stat: Exempt time-based counters The new counters halt_poll_success_ns and halt_poll_fail_ns do not count events. Instead they provide a time, and mess up our statistics. Therefore, we should exclude them. Removal is currently implemented with an exempt list. If more counters like these appear, we can think about a more general rule like excluding all fields name "*_ns", in case that's a standing convention. Signed-off-by: Stefan Raspl Tested-and-reported-by: Christian Borntraeger Message-Id: <20201208210829.101324-1-raspl@linux.ibm.com> Signed-off-by: Paolo Bonzini commit 34c0f6f2695a2db81e09a3ab7bdb2853f45d4d3d Author: Maciej S. Szmigiero Date: Sat Dec 5 01:48:08 2020 +0100 KVM: mmu: Fix SPTE encoding of MMIO generation upper half Commit cae7ed3c2cb0 ("KVM: x86: Refactor the MMIO SPTE generation handling") cleaned up the computation of MMIO generation SPTE masks, however it introduced a bug how the upper part was encoded: SPTE bits 52-61 were supposed to contain bits 10-19 of the current generation number, however a missing shift encoded bits 1-10 there instead (mostly duplicating the lower part of the encoded generation number that then consisted of bits 1-9). In the meantime, the upper part was shrunk by one bit and moved by subsequent commits to become an upper half of the encoded generation number (bits 9-17 of bits 0-17 encoded in a SPTE). In addition to the above, commit 56871d444bc4 ("KVM: x86: fix overlap between SPTE_MMIO_MASK and generation") has changed the SPTE bit range assigned to encode the generation number and the total number of bits encoded but did not update them in the comment attached to their defines, nor in the KVM MMU doc. Let's do it here, too, since it is too trivial thing to warrant a separate commit. Fixes: cae7ed3c2cb0 ("KVM: x86: Refactor the MMIO SPTE generation handling") Signed-off-by: Maciej S. Szmigiero Message-Id: <156700708db2a5296c5ed7a8b9ac71f1e9765c85.1607129096.git.maciej.szmigiero@oracle.com> Cc: stable@vger.kernel.org [Reorganize macros so that everything is computed from the bit ranges. - Paolo] Signed-off-by: Paolo Bonzini commit 7f376f1917d7461e05b648983e8d2aea9d0712b2 Merge: 1de5d12b76901 33d974e76e21e Author: Linus Torvalds Date: Fri Dec 11 14:29:46 2020 -0800 Merge tag 'mtd/fixes-for-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd fixes from Miquel Raynal: "Second series of fixes for raw NAND drivers initiated because of a rework of the ECC engine subsystem. The location of the DT parsing logic got moved, breaking several drivers which in fact were not doing the ECC engine initialization at the right place. These drivers have been fixed by enforcing a particular ECC engine type and algorithm, software Hamming, while the algorithm may be overwritten by a DT property. This merge request fixes this in the xway, socrates, plat_nand, pasemi, orion, mpc5121, gpio, au1550 and ams-delta controller drivers" * tag 'mtd/fixes-for-5.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: xway: Do not force a particular software ECC engine mtd: rawnand: socrates: Do not force a particular software ECC engine mtd: rawnand: plat_nand: Do not force a particular software ECC engine mtd: rawnand: pasemi: Do not force a particular software ECC engine mtd: rawnand: orion: Do not force a particular software ECC engine mtd: rawnand: mpc5121: Do not force a particular software ECC engine mtd: rawnand: gpio: Do not force a particular software ECC engine mtd: rawnand: au1550: Do not force a particular software ECC engine mtd: rawnand: ams-delta: Do not force a particular software ECC engine commit 1de5d12b769017f7354e7151ce1c26eb1d9ba2e4 Merge: 782598ecea73a c0d638a03bc5d Author: Linus Torvalds Date: Fri Dec 11 14:26:17 2020 -0800 Merge tag 'mmc-v5.10-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "A couple of MMC fixes: MMC core: - Fixup condition for CMD13 polling for RPMB requests MMC host: - mtk-sd: Fix system suspend/resume support for CQHCI - mtd-sd: Extend SDIO IRQ fix to more variants - sdhci-of-arasan: Fix clock registration error for Keem Bay SOC - tmio: Bring HW to a sane state after a power off" * tag 'mmc-v5.10-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: mediatek: mark PM functions as __maybe_unused mmc: block: Fixup condition for CMD13 polling for RPMB requests mmc: tmio: improve bringing HW to a sane state with MMC_POWER_OFF mmc: sdhci-of-arasan: Fix clock registration error for Keem Bay SOC mmc: mediatek: Extend recheck_sdio_irq fix to more variants mmc: mediatek: Fix system suspend/resume support for CQHCI commit e977aaf899a6d3b3d6658da66e262b6e307ae3a2 Merge: 0477e92881850 4e302c3b568ea Author: Wolfram Sang Date: Fri Dec 11 23:23:30 2020 +0100 Merge tag 'at24-fixes-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-current at24 fixes for v5.10 - fix NVMEM name with custom AT24 device name commit 782598ecea73a4aecdd25cb0ceb0b19e8674cf30 Merge: b7906b70a2337 6bea0225a4bf1 Author: Linus Torvalds Date: Fri Dec 11 14:22:42 2020 -0800 Merge tag 'zonefs-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs fix from Damien Le Moal: "A single patch in this pull request to fix a BIO and page reference leak when writing sequential zone files" * tag 'zonefs-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: fix page reference and BIO leak commit b7906b70a2337e445b8dca3ce7ba8976b6ebd07d Author: Andrii Nakryiko Date: Fri Dec 11 22:36:25 2020 +0100 bpf: Fix enum names for bpf_this_cpu_ptr() and bpf_per_cpu_ptr() helpers Remove bpf_ prefix, which causes these helpers to be reported in verifier dump as bpf_bpf_this_cpu_ptr() and bpf_bpf_per_cpu_ptr(), respectively. Lets fix it as long as it is still possible before UAPI freezes on these helpers. Fixes: eaa6bcb71ef6 ("bpf: Introduce bpf_per_cpu_ptr()") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Signed-off-by: Linus Torvalds commit a06caa4a68ce7d134b342966e65e7bd2dfa2eead Merge: 94801e5c6d461 ba9c1201beaa8 Author: Linus Torvalds Date: Fri Dec 11 14:10:51 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "8 patches. Subsystems affected by this patch series: proc, selftests, kbuild, and mm (pagecache, kasan, hugetlb)" * emailed patches from Andrew Morton : mm/hugetlb: clear compound_nr before freeing gigantic pages kasan: fix object remaining in offline per-cpu quarantine elfcore: fix building with clang initramfs: fix clang build failure kbuild: avoid static_assert for genksyms selftest/fpu: avoid clang warning proc: use untagged_addr() for pagemap_read addresses revert "mm/filemap: add static for function __add_to_page_cache_locked" commit ba9c1201beaa86a773e83be5654602a0667e4a4d Author: Gerald Schaefer Date: Fri Dec 11 13:36:53 2020 -0800 mm/hugetlb: clear compound_nr before freeing gigantic pages Commit 1378a5ee451a ("mm: store compound_nr as well as compound_order") added compound_nr counter to first tail struct page, overlaying with page->mapping. The overlay itself is fine, but while freeing gigantic hugepages via free_contig_range(), a "bad page" check will trigger for non-NULL page->mapping on the first tail page: BUG: Bad page state in process bash pfn:380001 page:00000000c35f0856 refcount:0 mapcount:0 mapping:00000000126b68aa index:0x0 pfn:0x380001 aops:0x0 flags: 0x3ffff00000000000() raw: 3ffff00000000000 0000000000000100 0000000000000122 0000000100000000 raw: 0000000000000000 0000000000000000 ffffffff00000000 0000000000000000 page dumped because: non-NULL mapping Modules linked in: CPU: 6 PID: 616 Comm: bash Not tainted 5.10.0-rc7-next-20201208 #1 Hardware name: IBM 3906 M03 703 (LPAR) Call Trace: show_stack+0x6e/0xe8 dump_stack+0x90/0xc8 bad_page+0xd6/0x130 free_pcppages_bulk+0x26a/0x800 free_unref_page+0x6e/0x90 free_contig_range+0x94/0xe8 update_and_free_page+0x1c4/0x2c8 free_pool_huge_page+0x11e/0x138 set_max_huge_pages+0x228/0x300 nr_hugepages_store_common+0xb8/0x130 kernfs_fop_write+0xd2/0x218 vfs_write+0xb0/0x2b8 ksys_write+0xac/0xe0 system_call+0xe6/0x288 Disabling lock debugging due to kernel taint This is because only the compound_order is cleared in destroy_compound_gigantic_page(), and compound_nr is set to 1U << order == 1 for order 0 in set_compound_order(page, 0). Fix this by explicitly clearing compound_nr for first tail page after calling set_compound_order(page, 0). Link: https://lkml.kernel.org/r/20201208182813.66391-2-gerald.schaefer@linux.ibm.com Fixes: 1378a5ee451a ("mm: store compound_nr as well as compound_order") Signed-off-by: Gerald Schaefer Reviewed-by: Matthew Wilcox (Oracle) Cc: Heiko Carstens Cc: Mike Kravetz Cc: Christian Borntraeger Cc: [5.9+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6c82d45c7f0348b44e00bd7dcccfc47dec7577d1 Author: Kuan-Ying Lee Date: Fri Dec 11 13:36:49 2020 -0800 kasan: fix object remaining in offline per-cpu quarantine We hit this issue in our internal test. When enabling generic kasan, a kfree()'d object is put into per-cpu quarantine first. If the cpu goes offline, object still remains in the per-cpu quarantine. If we call kmem_cache_destroy() now, slub will report "Objects remaining" error. ============================================================================= BUG test_module_slab (Not tainted): Objects remaining in test_module_slab on __kmem_cache_shutdown() ----------------------------------------------------------------------------- Disabling lock debugging due to kernel taint INFO: Slab 0x(____ptrval____) objects=34 used=1 fp=0x(____ptrval____) flags=0x2ffff00000010200 CPU: 3 PID: 176 Comm: cat Tainted: G B 5.10.0-rc1-00007-g4525c8781ec0-dirty #10 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x0/0x2b0 show_stack+0x18/0x68 dump_stack+0xfc/0x168 slab_err+0xac/0xd4 __kmem_cache_shutdown+0x1e4/0x3c8 kmem_cache_destroy+0x68/0x130 test_version_show+0x84/0xf0 module_attr_show+0x40/0x60 sysfs_kf_seq_show+0x128/0x1c0 kernfs_seq_show+0xa0/0xb8 seq_read+0x1f0/0x7e8 kernfs_fop_read+0x70/0x338 vfs_read+0xe4/0x250 ksys_read+0xc8/0x180 __arm64_sys_read+0x44/0x58 el0_svc_common.constprop.0+0xac/0x228 do_el0_svc+0x38/0xa0 el0_sync_handler+0x170/0x178 el0_sync+0x174/0x180 INFO: Object 0x(____ptrval____) @offset=15848 INFO: Allocated in test_version_show+0x98/0xf0 age=8188 cpu=6 pid=172 stack_trace_save+0x9c/0xd0 set_track+0x64/0xf0 alloc_debug_processing+0x104/0x1a0 ___slab_alloc+0x628/0x648 __slab_alloc.isra.0+0x2c/0x58 kmem_cache_alloc+0x560/0x588 test_version_show+0x98/0xf0 module_attr_show+0x40/0x60 sysfs_kf_seq_show+0x128/0x1c0 kernfs_seq_show+0xa0/0xb8 seq_read+0x1f0/0x7e8 kernfs_fop_read+0x70/0x338 vfs_read+0xe4/0x250 ksys_read+0xc8/0x180 __arm64_sys_read+0x44/0x58 el0_svc_common.constprop.0+0xac/0x228 kmem_cache_destroy test_module_slab: Slab cache still has objects Register a cpu hotplug function to remove all objects in the offline per-cpu quarantine when cpu is going offline. Set a per-cpu variable to indicate this cpu is offline. [qiang.zhang@windriver.com: fix slab double free when cpu-hotplug] Link: https://lkml.kernel.org/r/20201204102206.20237-1-qiang.zhang@windriver.com Link: https://lkml.kernel.org/r/1606895585-17382-2-git-send-email-Kuan-Ying.Lee@mediatek.com Signed-off-by: Kuan-Ying Lee Signed-off-by: Zqiang Suggested-by: Dmitry Vyukov Reported-by: Guangye Yang Reviewed-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Matthias Brugger Cc: Nicholas Tang Cc: Miles Chen Cc: Qian Cai Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6e7b64b9dd6d96537d816ea07ec26b7dedd397b9 Author: Arnd Bergmann Date: Fri Dec 11 13:36:46 2020 -0800 elfcore: fix building with clang kernel/elfcore.c only contains weak symbols, which triggers a bug with clang in combination with recordmcount: Cannot find symbol for section 2: .text. kernel/elfcore.o: failed Move the empty stubs into linux/elfcore.h as inline functions. As only two architectures use these, just use the architecture specific Kconfig symbols to key off the declaration. Link: https://lkml.kernel.org/r/20201204165742.3815221-2-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Barret Rhoden Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 55d5b7dd6451b58489ce384282ca5a4a289eb8d5 Author: Arnd Bergmann Date: Fri Dec 11 13:36:42 2020 -0800 initramfs: fix clang build failure There is only one function in init/initramfs.c that is in the .text section, and it is marked __weak. When building with clang-12 and the integrated assembler, this leads to a bug with recordmcount: ./scripts/recordmcount "init/initramfs.o" Cannot find symbol for section 2: .text. init/initramfs.o: failed I'm not quite sure what exactly goes wrong, but I notice that this function is only ever called from an __init function, and normally inlined. Marking it __init as well is clearly correct and it leads to recordmcount no longer complaining. Link: https://lkml.kernel.org/r/20201204165742.3815221-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Barret Rhoden Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 14dc3983b5dff513a90bd5a8cc90acaf7867c3d0 Author: Arnd Bergmann Date: Fri Dec 11 13:36:38 2020 -0800 kbuild: avoid static_assert for genksyms genksyms does not know or care about the _Static_assert() built-in, and sometimes falls back to ignoring the later symbols, which causes undefined behavior such as WARNING: modpost: EXPORT symbol "ethtool_set_ethtool_phy_ops" [vmlinux] version generation failed, symbol will not be versioned. ld: net/ethtool/common.o: relocation R_AARCH64_ABS32 against `__crc_ethtool_set_ethtool_phy_ops' can not be used when making a shared object net/ethtool/common.o:(_ftrace_annotated_branch+0x0): dangerous relocation: unsupported relocation Redefine static_assert for genksyms to avoid that. Link: https://lkml.kernel.org/r/20201203230955.1482058-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Suggested-by: Ard Biesheuvel Cc: Masahiro Yamada Cc: Michal Marek Cc: Kees Cook Cc: Rikard Falkeborn Cc: Marco Elver Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 84edc2eff82730d45ab513ecec49cb63beb973c9 Author: Arnd Bergmann Date: Fri Dec 11 13:36:35 2020 -0800 selftest/fpu: avoid clang warning With extra warnings enabled, clang complains about the redundant -mhard-float argument: clang: error: argument unused during compilation: '-mhard-float' [-Werror,-Wunused-command-line-argument] Move this into the gcc-only part of the Makefile. Link: https://lkml.kernel.org/r/20201203223652.1320700-1-arnd@kernel.org Fixes: 4185b3b92792 ("selftests/fpu: Add an FPU selftest") Signed-off-by: Arnd Bergmann Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Petteri Aimonen Cc: Borislav Petkov Cc: Arnd Bergmann Cc: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 40d6366e9d86d9a67b5642040e76082fdb5bdcf9 Author: Miles Chen Date: Fri Dec 11 13:36:31 2020 -0800 proc: use untagged_addr() for pagemap_read addresses When we try to visit the pagemap of a tagged userspace pointer, we find that the start_vaddr is not correct because of the tag. To fix it, we should untag the userspace pointers in pagemap_read(). I tested with 5.10-rc4 and the issue remains. Explanation from Catalin in [1]: "Arguably, that's a user-space bug since tagged file offsets were never supported. In this case it's not even a tag at bit 56 as per the arm64 tagged address ABI but rather down to bit 47. You could say that the problem is caused by the C library (malloc()) or whoever created the tagged vaddr and passed it to this function. It's not a kernel regression as we've never supported it. Now, pagemap is a special case where the offset is usually not generated as a classic file offset but rather derived by shifting a user virtual address. I guess we can make a concession for pagemap (only) and allow such offset with the tag at bit (56 - PAGE_SHIFT + 3)" My test code is based on [2]: A userspace pointer which has been tagged by 0xb4: 0xb400007662f541c8 userspace program: uint64 OsLayer::VirtualToPhysical(void *vaddr) { uint64 frame, paddr, pfnmask, pagemask; int pagesize = sysconf(_SC_PAGESIZE); off64_t off = ((uintptr_t)vaddr) / pagesize * 8; // off = 0xb400007662f541c8 / pagesize * 8 = 0x5a00003b317aa0 int fd = open(kPagemapPath, O_RDONLY); ... if (lseek64(fd, off, SEEK_SET) != off || read(fd, &frame, 8) != 8) { int err = errno; string errtxt = ErrorString(err); if (fd >= 0) close(fd); return 0; } ... } kernel fs/proc/task_mmu.c: static ssize_t pagemap_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { ... src = *ppos; svpfn = src / PM_ENTRY_BYTES; // svpfn == 0xb400007662f54 start_vaddr = svpfn << PAGE_SHIFT; // start_vaddr == 0xb400007662f54000 end_vaddr = mm->task_size; /* watch out for wraparound */ // svpfn == 0xb400007662f54 // (mm->task_size >> PAGE) == 0x8000000 if (svpfn > mm->task_size >> PAGE_SHIFT) // the condition is true because of the tag 0xb4 start_vaddr = end_vaddr; ret = 0; while (count && (start_vaddr < end_vaddr)) { // we cannot visit correct entry because start_vaddr is set to end_vaddr int len; unsigned long end; ... } ... } [1] https://lore.kernel.org/patchwork/patch/1343258/ [2] https://github.com/stressapptest/stressapptest/blob/master/src/os.cc#L158 Link: https://lkml.kernel.org/r/20201204024347.8295-1-miles.chen@mediatek.com Signed-off-by: Miles Chen Reviewed-by: Vincenzo Frascino Reviewed-by: Catalin Marinas Cc: Alexey Dobriyan Cc: Andrey Konovalov Cc: Alexander Potapenko Cc: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Marco Elver Cc: Will Deacon Cc: Eric W. Biederman Cc: Song Bao Hua (Barry Song) Cc: [5.4-] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 16c0cc0ce3059e315a0aab6538061d95a6612589 Author: Andrew Morton Date: Fri Dec 11 13:36:27 2020 -0800 revert "mm/filemap: add static for function __add_to_page_cache_locked" Revert commit 3351b16af494 ("mm/filemap: add static for function __add_to_page_cache_locked") due to incompatibility with ALLOW_ERROR_INJECTION which result in build errors. Link: https://lkml.kernel.org/r/CAADnVQJ6tmzBXvtroBuEH6QA0H+q7yaSKxrVvVxhqr3KBZdEXg@mail.gmail.com Tested-by: Justin Forbes Tested-by: Greg Thelen Acked-by: Alexei Starovoitov Cc: Michal Kubecek Cc: Alex Shi Cc: Souptick Joarder Cc: Daniel Borkmann Cc: Josef Bacik Cc: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 82e06090473289ce63e23fdeb8737aad59b10645 Author: Dmitry Torokhov Date: Wed Dec 9 20:13:24 2020 -0800 Input: cm109 - do not stomp on control URB We need to make sure we are not stomping on the control URB that was issued when opening the device when attempting to toggle buzzer. To do that we need to mark it as pending in cm109_open(). Reported-and-tested-by: syzbot+150f793ac5bc18eee150@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 33d974e76e21e9da8a36b14d2dce6394c36c3e30 Author: Miquel Raynal Date: Thu Dec 3 20:03:40 2020 +0100 mtd: rawnand: xway: Do not force a particular software ECC engine Originally, commit d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") kind of broke the logic around the initialization of several ECC engines. Unfortunately, the fix (which indeed moved the ECC initialization to the right place) did not take into account the fact that a different ECC algorithm could have been used thanks to a DT property, considering the "Hamming" algorithm entry a configuration while it was only a default. Add the necessary logic to be sure Hamming keeps being only a default. Fixes: d525914b5bd8 ("mtd: rawnand: xway: Move the ECC initialization to ->attach_chip()") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201203190340.15522-10-miquel.raynal@bootlin.com commit cf75f00fc8026040f6ff8f054cfec99e820b62e7 Author: Miquel Raynal Date: Thu Dec 3 20:03:39 2020 +0100 mtd: rawnand: socrates: Do not force a particular software ECC engine Originally, commit d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") kind of broke the logic around the initialization of several ECC engines. Unfortunately, the fix (which indeed moved the ECC initialization to the right place) did not take into account the fact that a different ECC algorithm could have been used thanks to a DT property, considering the "Hamming" algorithm entry a configuration while it was only a default. Add the necessary logic to be sure Hamming keeps being only a default. Fixes: b36bf0a0fe5d ("mtd: rawnand: socrates: Move the ECC initialization to ->attach_chip()") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201203190340.15522-9-miquel.raynal@bootlin.com commit 148b4f16159f49c6d05da8189e0941880ad10a46 Author: Miquel Raynal Date: Thu Dec 3 20:03:38 2020 +0100 mtd: rawnand: plat_nand: Do not force a particular software ECC engine Originally, commit d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") kind of broke the logic around the initialization of several ECC engines. Unfortunately, the fix (which indeed moved the ECC initialization to the right place) did not take into account the fact that a different ECC algorithm could have been used thanks to a DT property, considering the "Hamming" algorithm entry a configuration while it was only a default. Add the necessary logic to be sure Hamming keeps being only a default. Fixes: 612e048e6aab ("mtd: rawnand: plat_nand: Move the ECC initialization to ->attach_chip()") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201203190340.15522-8-miquel.raynal@bootlin.com commit 9506ab943db438d316386d45eb8a8b60bfeee27c Author: Miquel Raynal Date: Thu Dec 3 20:03:37 2020 +0100 mtd: rawnand: pasemi: Do not force a particular software ECC engine Originally, commit d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") kind of broke the logic around the initialization of several ECC engines. Unfortunately, the fix (which indeed moved the ECC initialization to the right place) did not take into account the fact that a different ECC algorithm could have been used thanks to a DT property, considering the "Hamming" algorithm entry a configuration while it was only a default. Add the necessary logic to be sure Hamming keeps being only a default. Fixes: 8fc6f1f042b2 ("mtd: rawnand: pasemi: Move the ECC initialization to ->attach_chip()") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201203190340.15522-7-miquel.raynal@bootlin.com commit f87b720a21641d5c5ccd4f5ccc06d96251b7f282 Author: Miquel Raynal Date: Thu Dec 3 20:03:36 2020 +0100 mtd: rawnand: orion: Do not force a particular software ECC engine Originally, commit d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") kind of broke the logic around the initialization of several ECC engines. Unfortunately, the fix (which indeed moved the ECC initialization to the right place) did not take into account the fact that a different ECC algorithm could have been used thanks to a DT property, considering the "Hamming" algorithm entry a configuration while it was only a default. Add the necessary logic to be sure Hamming keeps being only a default. Reported-by: Chris Packham Fixes: 553508cec2e8 ("mtd: rawnand: orion: Move the ECC initialization to ->attach_chip()") Signed-off-by: Miquel Raynal Tested-by: Chris Packham Link: https://lore.kernel.org/linux-mtd/20201203190340.15522-6-miquel.raynal@bootlin.com commit f49bde9fe25cf4cd02440a7ec68f278957ddea37 Author: Miquel Raynal Date: Thu Dec 3 20:03:35 2020 +0100 mtd: rawnand: mpc5121: Do not force a particular software ECC engine Originally, commit d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") kind of broke the logic around the initialization of several ECC engines. Unfortunately, the fix (which indeed moved the ECC initialization to the right place) did not take into account the fact that a different ECC algorithm could have been used thanks to a DT property, considering the "Hamming" algorithm entry a configuration while it was only a default. Add the necessary logic to be sure Hamming keeps being only a default. Fixes: 6dd09f775b72 ("mtd: rawnand: mpc5121: Move the ECC initialization to ->attach_chip()") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201203190340.15522-5-miquel.raynal@bootlin.com commit bd47fa451315684424d2b39aa95f2ed235fee37a Author: Miquel Raynal Date: Thu Dec 3 20:03:34 2020 +0100 mtd: rawnand: gpio: Do not force a particular software ECC engine Originally, commit d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") kind of broke the logic around the initialization of several ECC engines. Unfortunately, the fix (which indeed moved the ECC initialization to the right place) did not take into account the fact that a different ECC algorithm could have been used thanks to a DT property, considering the "Hamming" algorithm entry a configuration while it was only a default. Add the necessary logic to be sure Hamming keeps being only a default. Fixes: f6341f6448e0 ("mtd: rawnand: gpio: Move the ECC initialization to ->attach_chip()") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201203190340.15522-4-miquel.raynal@bootlin.com commit 52277269c4060ced7e7d1a83c77377590d106f44 Author: Miquel Raynal Date: Thu Dec 3 20:03:33 2020 +0100 mtd: rawnand: au1550: Do not force a particular software ECC engine Originally, commit d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") kind of broke the logic around the initialization of several ECC engines. Unfortunately, the fix (which indeed moved the ECC initialization to the right place) did not take into account the fact that a different ECC algorithm could have been used thanks to a DT property, considering the "Hamming" algorithm entry a configuration while it was only a default. Add the necessary logic to be sure Hamming keeps being only a default. Fixes: dbffc8ccdf3a ("mtd: rawnand: au1550: Move the ECC initialization to ->attach_chip()") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201203190340.15522-3-miquel.raynal@bootlin.com commit 249a9599c9123a4af655dd5800c2506602ffa055 Author: Miquel Raynal Date: Thu Dec 3 20:03:32 2020 +0100 mtd: rawnand: ams-delta: Do not force a particular software ECC engine Originally, commit d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") kind of broke the logic around the initialization of several ECC engines. Unfortunately, the fix (which indeed moved the ECC initialization to the right place) did not take into account the fact that a different ECC algorithm could have been used thanks to a DT property, considering the "Hamming" algorithm entry a configuration while it was only a default. Add the necessary logic to be sure Hamming keeps being only a default. Fixes: 59d93473323a ("mtd: rawnand: ams-delta: Move the ECC initialization to ->attach_chip()") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201203190340.15522-2-miquel.raynal@bootlin.com commit 94801e5c6d461045726e1563ba2369ef7ce21dbf Merge: 6d47cdecaa45c e8873c0afd34b Author: Linus Torvalds Date: Fri Dec 11 10:25:04 2020 -0800 Merge tag 'pinctrl-v5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Here is a late set of pin control fixes for v5.10, most concern some minor and major issues found in the Intel drivers. Some are so hairy that I have no idea what is going on there, but luckily the maintainer knows what's up. We also have an interesting fix for AMD, which makes AMD-based laptops more stable IIUC. Summary: - Fix up some SPI group and a register offset on Intel Jasperlake - Set default bias on Intel Merrifield - Preserve debouncing on Intel Baytrail - Stop .set_type() irqchip callback in the AMD driver from fiddling with the debounce filter - Fix access to GPIO banks that are pass-thru on the Aspeed - Fix a fix for the Intel pin control driver to disable Rx/Tx when requesting a UART line as GPIO" * tag 'pinctrl-v5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request pinctrl: aspeed: Fix GPIO requests on pass-through banks pinctrl: amd: remove debounce filter setting in IRQ type setting pinctrl: baytrail: Avoid clearing debounce value when turning it off pinctrl: merrifield: Set default bias in case no particular value given pinctrl: jasperlake: Fix HOSTSW_OWN offset pinctrl: jasperlake: Unhide SPI group of pins commit 6d47cdecaa45c88ba3858323aa54ec9aa1de1a9b Merge: c1cea11227cb5 263ade7166a2e Author: Linus Torvalds Date: Fri Dec 11 10:22:17 2020 -0800 Merge tag 'v5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "These are hopefully the last GPIO fixes for this cycle. All are driver fixes except a small resource leak for pin ranges in the gpiolib. Two are PM related, which is nice because when developers start to find PM bugs it is usually because they have smoked out the bugs of more severe nature. Summary: - Fix runtime PM balancing on the errorpath of the Arizona driver - Fix a suspend NULL pointer reference in the dwapb driver - Balance free:ing in gpiochip_generic_free() - Fix runtime PM balancing on the errorpath of the zynq driver - Fix irqdomain use-after-free in the mvebu driver - Break an eternal loop in the spreadtrum EIC driver" * tag 'v5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: eic-sprd: break loop when getting NULL device resource gpio: mvebu: fix potential user-after-free on probe gpio: zynq: fix reference leak in zynq_gpio functions gpiolib: Don't free if pin ranges are not defined gpio: dwapb: fix NULL pointer dereference at dwapb_gpio_suspend() gpio: arizona: disable pm_runtime in case of failure commit c1cea11227cb57f1ab0f111b3f6e8a250b85cfdb Merge: 059fe8296e0fb ceabbf94c317c Author: Linus Torvalds Date: Fri Dec 11 10:10:13 2020 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "Two small clk driver build fixes - Remove __packed from a Renesas struct to improve portability - Fix a linking problem with i.MX when config options don't agree" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: renesas: r9a06g032: Drop __packed for portability clk: imx: scu: fix MXC_CLK_SCU module build break commit 4da3a54f5a025846f9930354cfb80f075b9952e0 Author: Andrea Parri (Microsoft) Date: Fri Dec 11 14:14:04 2020 +0100 Revert "scsi: storvsc: Validate length of incoming packet in storvsc_on_channel_callback()" This reverts commit 3b8c72d076c42bf27284cda7b2b2b522810686f8. Dexuan reported a regression where StorVSC fails to probe a device (and where, consequently, the VM may fail to boot). The root-cause analysis led to a long-standing race condition that is exposed by the validation /commit in question. Let's put the new validation aside until a proper solution for that race condition is in place. Link: https://lore.kernel.org/r/20201211131404.21359-1-parri.andrea@gmail.com Fixes: 3b8c72d076c4 ("scsi: storvsc: Validate length of incoming packet in storvsc_on_channel_callback()") Cc: Dexuan Cui Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Andrea Parri (Microsoft) Signed-off-by: Martin K. Petersen commit 059fe8296e0fb4b89d997ea0aa75996911b8f3aa Merge: 33dc9614dc208 b1f195fc49812 Author: Linus Torvalds Date: Thu Dec 10 17:52:13 2020 -0800 Merge tag 'drm-fixes-2020-12-11' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Last week of fixes, just amdgpu and i915 collections. We had a i915 regression reported by HJ Lu reported this morning, and this contains a fix for that he has tested. There are a fair few other fixes, but they are spread across the two drivers, and all fairly self contained. amdgpu: - Fan fix for CI asics - Fix a warning in possible_crtcs - Build fix for when debugfs is disabled - Display overflow fix - Display watermark fixes for Renoir - SDMA 5.2 fix - Stolen vga memory regression fix - Power profile fixes - Fix a regression from removal of GEM and PRIME callbacks amdkfd: - Fix a memory leak in dmabuf import i915: - rc7 regression fix for modesetting - vdsc/dp slice fixes - gen9 mocs entries fix - preemption timeout fix - unsigned compare against 0 fix - selftest fix - submission error propogatig fix - request flow suspend fix" * tag 'drm-fixes-2020-12-11' of git://anongit.freedesktop.org/drm/drm: drm/i915/display: Go softly softly on initial modeset failure drm/amd/pm: typo fix (CUSTOM -> COMPUTE) drm/amdgpu: Initialise drm_gem_object_funcs for imported BOs drm/amdgpu: fix size calculation with stolen vga memory drm/amd/pm: update smu10.h WORKLOAD_PPLIB setting for raven drm/amdkfd: Fix leak in dmabuf import drm/amdgpu: fix sdma instance fw version and feature version init drm/amd/display: Add wm table for Renoir drm/amd/display: Prevent bandwidth overflow drm/amdgpu: fix debugfs creation/removal, again drm/amdgpu/disply: set num_crtc earlier drm/amdgpu/powerplay: parse fan table for CI asics drm/i915/gt: Declare gen9 has 64 mocs entries! drm/i915/display/dp: Compute the correct slice count for VDSC on DP drm/i915: fix size_t greater or equal to zero comparison drm/i915/gt: Cancel the preemption timeout on responding to it drm/i915/gt: Ignore repeated attempts to suspend request flow across reset drm/i915/gem: Propagate error from cancelled submit due to context closure drm/i915/gem: Check the correct variable in selftest commit ccbbfd1cbf365b38d014351d1482fedd26282041 Author: Palmer Dabbelt Date: Wed Nov 25 11:57:03 2020 -0800 RISC-V: Define get_cycles64() regardless of M-mode The timer driver uses get_cycles64() unconditionally to obtain the current time. A recent refactoring lost the common definition for some configs, which is now the only one we need. Fixes: d5be89a8d118 ("RISC-V: Resurrect the MMIO timer implementation for M-mode systems") Reported-by: kernel test robot Signed-off-by: Palmer Dabbelt commit 33dc9614dc208291d0c4bcdeb5d30d481dcd2c4c Merge: 47003b9971cc7 271e0c9dce1b0 Author: Linus Torvalds Date: Thu Dec 10 16:51:27 2020 -0800 Merge tag 'ktest-v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest fix from Steven Rostedt: "Fix issues with grub2bls in ktest.pl ktest.pl did not know about grub2bls that was introduced in Fedora 30, and now it does" * tag 'ktest-v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest.pl: Fix incorrect reboot for grub2bls commit 47003b9971cc7c38737f21e07034502ca35ab7af Merge: 197c61cb176a4 5eedf9fe8db23 Author: Linus Torvalds Date: Thu Dec 10 16:36:30 2020 -0800 Merge tag 'powerpc-5.10-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: "One commit to implement copy_from_kernel_nofault_allowed(), otherwise copy_from_kernel_nofault() can trigger warnings when accessing bad addresses in some configurations. Thanks to Christophe Leroy and Qian Cai" * tag 'powerpc-5.10-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed() commit 197c61cb176a40f5877c3caf8249722e77b7d989 Merge: 6840a3dcc2447 ed9b25d1970a4 Author: Linus Torvalds Date: Thu Dec 10 16:01:47 2020 -0800 Merge tag 'fixes-v5.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull namespaced fscaps fix from James Morris: "Fix namespaced fscaps when !CONFIG_SECURITY (Serge Hallyn)" * tag 'fixes-v5.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: [SECURITY] fix namespaced fscaps when !CONFIG_SECURITY commit b1f195fc49812359296a901e26cc7c0b761d8a70 Author: Chris Wilson Date: Thu Dec 10 23:07:41 2020 +0000 drm/i915/display: Go softly softly on initial modeset failure Reduce the module/device probe error into a mere debug to hide issues where the initial modeset is failing (after lies told by hw probe) and the system hangs with a livelock in cleaning up the failed commit. Reported-by: H.J. Lu Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=210619 Fixes: b3bf99daaee9 ("drm/i915/display: Defer initial modeset until after GGTT is initialised") Fixes: ccc9e67ab26f ("drm/i915/display: Defer initial modeset until after GGTT is initialised") Signed-off-by: Chris Wilson Cc: "Ville Syrjälä" Cc: Rodrigo Vivi Cc: H.J. Lu Cc: Dave Airlie Reviewed-by: Rodrigo Vivi Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201210230741.17140-1-chris@chris-wilson.co.uk commit de2df164e3f905ddcf978358cb6e69958b5d3bcc Merge: a81ac2995a49e 7c5c15dffe1e3 Author: Dave Airlie Date: Fri Dec 11 09:47:38 2020 +1000 Merge tag 'drm-intel-fixes-2020-12-09' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Fixes for VDSC/DP, selftests, shmem_utils, preemption, submission, and gt reset: - Check the correct variable in selftest (Dan) - Propagate error from canceled submit due to context closure (Chris) - Ignore repeated attempts to suspend request flow across reset (Chris) - Cancel the preemption timeout on responding to it (Chris) - Fix unsigned compared against 0 (Colin) - Compute the correct slice count for VDSC on DP (Manasi) - Declar gen9 has 64 mocs entries (Chris) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20201209235010.GA10554@intel.com commit a81ac2995a49e3474037847e3362f5ac58dc0269 Merge: 0477e92881850 c5b58c8c860db Author: Dave Airlie Date: Fri Dec 11 09:42:14 2020 +1000 Merge tag 'amd-drm-fixes-5.10-2020-12-09' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.10-2020-12-09: amdgpu: - Fan fix for CI asics - Fix a warning in possible_crtcs - Build fix for when debugfs is disabled - Display overflow fix - Display watermark fixes for Renoir - SDMA 5.2 fix - Stolen vga memory regression fix - Power profile fixes - Fix a regression from removal of GEM and PRIME callbacks amdkfd: - Fix a memory leak in dmabuf import Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201210034848.18108-1-alexander.deucher@amd.com commit 6840a3dcc2447188e7bb8464b31a7620bc4423ee Merge: 4d31058b823cb 21e31401fc459 Author: Linus Torvalds Date: Thu Dec 10 15:36:09 2020 -0800 Merge tag 'nfs-for-5.10-3' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "Here are a handful more bugfixes for 5.10. Unfortunately, we found some problems with the new READ_PLUS operation that aren't easy to fix. We've decided to disable this codepath through a Kconfig option for now, but a series of patches going into 5.11 will clean up the code and fix the issues at the same time. This seemed like the best way to go about it. Summary: - Fix array overflow when flexfiles mirroring is enabled - Fix rpcrdma_inline_fixup() crash with new LISTXATTRS - Fix 5 second delay when doing inter-server copy - Disable READ_PLUS by default" * tag 'nfs-for-5.10-3' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFS: Disable READ_PLUS by default NFSv4.2: Fix 5 seconds delay when doing inter server copy NFS: Fix rpcrdma_inline_fixup() crash with new LISTXATTRS operation pNFS/flexfiles: Fix array overflow when flexfiles mirroring is enabled commit 4d31058b823cb338f5218043ac09fb7795b9d908 Merge: 9fca90cf28920 d9838b1d39283 Author: Linus Torvalds Date: Thu Dec 10 15:30:13 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) IPsec compat fixes, from Dmitry Safonov. 2) Fix memory leak in xfrm_user_policy(). Fix from Yu Kuai. 3) Fix polling in xsk sockets by using sk_poll_wait() instead of datagram_poll() which keys off of sk_wmem_alloc and such which xsk sockets do not update. From Xuan Zhuo. 4) Missing init of rekey_data in cfgh80211, from Sara Sharon. 5) Fix destroy of timer before init, from Davide Caratti. 6) Missing CRYPTO_CRC32 selects in ethernet driver Kconfigs, from Arnd Bergmann. 7) Missing error return in rtm_to_fib_config() switch case, from Zhang Changzhong. 8) Fix some src/dest address handling in vrf and add a testcase. From Stephen Suryaputra. 9) Fix multicast handling in Seville switches driven by mscc-ocelot driver. From Vladimir Oltean. 10) Fix proto value passed to skb delivery demux in udp, from Xin Long. 11) HW pkt counters not reported correctly in enetc driver, from Claudiu Manoil. 12) Fix deadlock in bridge, from Joseph Huang. 13) Missing of_node_pur() in dpaa2 driver, fromn Christophe JAILLET. 14) Fix pid fetching in bpftool when there are a lot of results, from Andrii Nakryiko. 15) Fix long timeouts in nft_dynset, from Pablo Neira Ayuso. 16) Various stymmac fixes, from Fugang Duan. 17) Fix null deref in tipc, from Cengiz Can. 18) When mss is biog, coose more resonable rcvq_space in tcp, fromn Eric Dumazet. 19) Revert a geneve change that likely isnt necessary, from Jakub Kicinski. 20) Avoid premature rx buffer reuse in various Intel driversm from Björn Töpel. 21) retain EcT bits during TIS reflection in tcp, from Wei Wang. 22) Fix Tso deferral wrt. cwnd limiting in tcp, from Neal Cardwell. 23) MPLS_OPT_LSE_LABEL attribute is 342 ot 8 bits, from Guillaume Nault 24) Fix propagation of 32-bit signed bounds in bpf verifier and add test cases, from Alexei Starovoitov. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (81 commits) selftests: fix poll error in udpgro.sh selftests/bpf: Fix "dubious pointer arithmetic" test selftests/bpf: Fix array access with signed variable test selftests/bpf: Add test for signed 32-bit bound check bug bpf: Fix propagation of 32-bit signed bounds from 64-bit bounds. MAINTAINERS: Add entry for Marvell Prestera Ethernet Switch driver net: sched: Fix dump of MPLS_OPT_LSE_LABEL attribute in cls_flower net/mlx4_en: Handle TX error CQE net/mlx4_en: Avoid scheduling restart task if it is already running tcp: fix cwnd-limited bug for TSO deferral where we send nothing net: flow_offload: Fix memory leak for indirect flow block tcp: Retain ECT bits for tos reflection ethtool: fix stack overflow in ethnl_parse_bitset() e1000e: fix S0ix flow to allow S0i3.2 subset entry ice: avoid premature Rx buffer reuse ixgbe: avoid premature Rx buffer reuse i40e: avoid premature Rx buffer reuse igb: avoid transmit queue timeout in xdp path igb: use xdp_do_flush igb: skb add metasize for xdp ... commit d9838b1d39283c1200c13f9076474c7624b8ec34 Merge: 38bf8cd821be2 3615bdf6d9b19 Author: David S. Miller Date: Thu Dec 10 14:29:30 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2020-12-10 The following pull-request contains BPF updates for your *net* tree. We've added 21 non-merge commits during the last 12 day(s) which contain a total of 21 files changed, 163 insertions(+), 88 deletions(-). The main changes are: 1) Fix propagation of 32-bit signed bounds from 64-bit bounds, from Alexei. 2) Fix ring_buffer__poll() return value, from Andrii. 3) Fix race in lwt_bpf, from Cong. 4) Fix test_offload, from Toke. 5) Various xsk fixes. Please consider pulling these changes from: git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git Thanks a lot! Also thanks to reporters, reviewers and testers of commits in this pull-request: Cong Wang, Hulk Robot, Jakub Kicinski, Jean-Philippe Brucker, John Fastabend, Magnus Karlsson, Maxim Mikityanskiy, Yonghong Song ==================== Signed-off-by: David S. Miller commit 190113b4c6531c8e09b31d5235f9b5175cbb0f72 Author: Thomas Gleixner Date: Thu Dec 10 21:18:22 2020 +0100 x86/apic/vector: Fix ordering in vector assignment Prarit reported that depending on the affinity setting the ' irq $N: Affinity broken due to vector space exhaustion.' message is showing up in dmesg, but the vector space on the CPUs in the affinity mask is definitely not exhausted. Shung-Hsi provided traces and analysis which pinpoints the problem: The ordering of trying to assign an interrupt vector in assign_irq_vector_any_locked() is simply wrong if the interrupt data has a valid node assigned. It does: 1) Try the intersection of affinity mask and node mask 2) Try the node mask 3) Try the full affinity mask 4) Try the full online mask Obviously #2 and #3 are in the wrong order as the requested affinity mask has to take precedence. In the observed cases #1 failed because the affinity mask did not contain CPUs from node 0. That made it allocate a vector from node 0, thereby breaking affinity and emitting the misleading message. Revert the order of #2 and #3 so the full affinity mask without the node intersection is tried before actually affinity is broken. If no node is assigned then only the full affinity mask and if that fails the full online mask is tried. Fixes: d6ffc6ac83b1 ("x86/vector: Respect affinity mask in irq descriptor") Reported-by: Prarit Bhargava Reported-by: Shung-Hsi Yu Signed-off-by: Thomas Gleixner Tested-by: Shung-Hsi Yu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87ft4djtyp.fsf@nanos.tec.linutronix.de commit 21e31401fc4595aeefa224cd36ab8175ec867b87 Author: Anna Schumaker Date: Thu Dec 3 15:18:39 2020 -0500 NFS: Disable READ_PLUS by default We've been seeing failures with xfstests generic/091 and generic/263 when using READ_PLUS. I've made some progress on these issues, and the tests fail later on but still don't pass. Let's disable READ_PLUS by default until we can work out what is going on. Signed-off-by: Anna Schumaker commit fe8eb820e388ca81643443b6208001ab516d1cf6 Author: Dai Ngo Date: Mon Nov 23 22:15:17 2020 -0500 NFSv4.2: Fix 5 seconds delay when doing inter server copy Since commit b4868b44c5628 ("NFSv4: Wait for stateid updates after CLOSE/OPEN_DOWNGRADE"), every inter server copy operation suffers 5 seconds delay regardless of the size of the copy. The delay is from nfs_set_open_stateid_locked when the check by nfs_stateid_is_sequential fails because the seqid in both nfs4_state and nfs4_stateid are 0. Fix __nfs42_ssc_open to delay setting of NFS_OPEN_STATE in nfs4_state, until after the call to update_open_stateid, to indicate this is the 1st open. This fix is part of a 2 patches, the other patch is the fix in the source server to return the stateid for COPY_NOTIFY request with seqid 1 instead of 0. Fixes: ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy") Signed-off-by: Dai Ngo Signed-off-by: Anna Schumaker commit 1c87b85162975627d684a234d7347ef630f0e3aa Author: Chuck Lever Date: Tue Nov 24 19:15:18 2020 -0500 NFS: Fix rpcrdma_inline_fixup() crash with new LISTXATTRS operation By switching to an XFS-backed export, I am able to reproduce the ibcomp worker crash on my client with xfstests generic/013. For the failing LISTXATTRS operation, xdr_inline_pages() is called with page_len=12 and buflen=128. - When ->send_request() is called, rpcrdma_marshal_req() does not set up a Reply chunk because buflen is smaller than the inline threshold. Thus rpcrdma_convert_iovs() does not get invoked at all and the transport's XDRBUF_SPARSE_PAGES logic is not invoked on the receive buffer. - During reply processing, rpcrdma_inline_fixup() tries to copy received data into rq_rcv_buf->pages because page_len is positive. But there are no receive pages because rpcrdma_marshal_req() never allocated them. The result is that the ibcomp worker faults and dies. Sometimes that causes a visible crash, and sometimes it results in a transport hang without other symptoms. RPC/RDMA's XDRBUF_SPARSE_PAGES support is not entirely correct, and should eventually be fixed or replaced. However, my preference is that upper-layer operations should explicitly allocate their receive buffers (using GFP_KERNEL) when possible, rather than relying on XDRBUF_SPARSE_PAGES. Reported-by: Olga kornievskaia Suggested-by: Olga kornievskaia Fixes: c10a75145feb ("NFSv4.2: add the extended attribute proc functions.") Signed-off-by: Chuck Lever Reviewed-by: Olga kornievskaia Reviewed-by: Frank van der Linden Tested-by: Olga kornievskaia Signed-off-by: Anna Schumaker commit 38bf8cd821be292e7d8e6f6283d67c5d9708f887 Author: Paolo Abeni Date: Wed Dec 9 12:21:13 2020 +0100 selftests: fix poll error in udpgro.sh The test program udpgso_bench_rx always invokes the poll() syscall with a timeout of 10ms. If a larger timeout is specified via the command line, udpgso_bench_rx is supposed to do multiple poll() calls till the timeout is expired or an event is received. Currently the poll() loop errors out after the first invocation with no events, and may causes self-tests failure alike: failed GRO with custom segment size ./udpgso_bench_rx: poll: 0x0 expected 0x1 This change addresses the issue allowing the poll() loop to consume all the configured timeout. Fixes: ada641ff6ed3 ("selftests: fixes for UDP GRO") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 3615bdf6d9b19db12b1589861609b4f1c6a8d303 Author: Jean-Philippe Brucker Date: Tue Dec 8 19:01:54 2020 +0100 selftests/bpf: Fix "dubious pointer arithmetic" test The verifier trace changed following a bugfix. After checking the 64-bit sign, only the upper bit mask is known, not bit 31. Update the test accordingly. Signed-off-by: Jean-Philippe Brucker Acked-by: John Fastabend Signed-off-by: Alexei Starovoitov commit 77ce220c0549dcc3db8226c61c60e83fc59dfafc Author: Jean-Philippe Brucker Date: Tue Dec 8 19:01:53 2020 +0100 selftests/bpf: Fix array access with signed variable test The test fails because of a recent fix to the verifier, even though this program is valid. In details what happens is: 7: (61) r1 = *(u32 *)(r0 +0) Load a 32-bit value, with signed bounds [S32_MIN, S32_MAX]. The bounds of the 64-bit value are [0, U32_MAX]... 8: (65) if r1 s> 0xffffffff goto pc+1 ... therefore this is always true (the operand is sign-extended). 10: (b4) w2 = 11 11: (6d) if r2 s> r1 goto pc+1 When true, the 64-bit bounds become [0, 10]. The 32-bit bounds are still [S32_MIN, 10]. 13: (64) w1 <<= 2 Because this is a 32-bit operation, the verifier propagates the new 32-bit bounds to the 64-bit ones, and the knowledge gained from insn 11 is lost. 14: (0f) r0 += r1 15: (7a) *(u64 *)(r0 +0) = 4 Then the verifier considers r0 unbounded here, rejecting the test. To make the test work, change insn 8 to check the sign of the 32-bit value. Signed-off-by: Jean-Philippe Brucker Acked-by: John Fastabend Signed-off-by: Alexei Starovoitov commit 511a76bcb0ce242a19153658b25437906cc6070e Author: Jean-Philippe Brucker Date: Tue Dec 8 19:01:52 2020 +0100 selftests/bpf: Add test for signed 32-bit bound check bug After a 32-bit load followed by a branch, the verifier would reduce the maximum bound of the register to 0x7fffffff, allowing a user to bypass bound checks. Ensure such a program is rejected. In the second test, the 64-bit compare should not sufficient to determine whether the signed 32-bit lower bound is 0, so the verifier should reject the second branch. Signed-off-by: Jean-Philippe Brucker Acked-by: John Fastabend Signed-off-by: Alexei Starovoitov commit b02709587ea3d699a608568ee8157d8db4fd8cae Author: Alexei Starovoitov Date: Tue Dec 8 19:01:51 2020 +0100 bpf: Fix propagation of 32-bit signed bounds from 64-bit bounds. The 64-bit signed bounds should not affect 32-bit signed bounds unless the verifier knows that upper 32-bits are either all 1s or all 0s. For example the register with smin_value==1 doesn't mean that s32_min_value is also equal to 1, since smax_value could be larger than 32-bit subregister can hold. The verifier refines the smax/s32_max return value from certain helpers in do_refine_retval_range(). Teach the verifier to recognize that smin/s32_min value is also bounded. When both smin and smax bounds fit into 32-bit subregister the verifier can propagate those bounds. Fixes: 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking") Reported-by: Jean-Philippe Brucker Acked-by: John Fastabend Signed-off-by: Alexei Starovoitov commit 9fca90cf28920c6d0723d7efd1eae0b0fb90309c Merge: 40201575b731d 340b940ea0ed1 Author: Linus Torvalds Date: Thu Dec 10 11:00:27 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Two user triggerable crashers and a some EFA related regressions: - Syzkaller found a bug in CM - Restore access to the GID table and fix modify_qp for EFA - Crasher in qedr" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/cm: Fix an attempt to use non-valid pointer when cleaning timewait RDMA/core: Fix empty gid table for non IB/RoCE devices RDMA/efa: Use the correct current and new states in modify QP RDMA/qedr: iWARP invalid(zero) doorbell address fix commit 40201575b731db6bde55c2f0daa930bbd9cfcb13 Merge: a2f5ea9e314ba 3d1387b3b8f6c Author: Linus Torvalds Date: Thu Dec 10 10:48:49 2020 -0800 Merge tag 'media/v5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "A couple of fixes: - videobuf2: fix a DMABUF bug, preventing it to properly handle cache sync/flush - vidtv: an usage after free and a few sparse/smatch warning fixes - pulse8-cec: a duplicate free and a bug related to new firmware usage - mtk-cir: fix a regression on a clock setting" * tag 'media/v5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: vidtv: fix some warnings media: vidtv: fix kernel-doc markups media: [next] media: vidtv: fix a read from an object after it has been freed media: vb2: set cache sync hints when init buffers media: pulse8-cec: add support for FW v10 and up media: pulse8-cec: fix duplicate free at disconnect or probe error media: mtk-cir: fix calculation of chk period commit 06c5fe9b12dde1b62821f302f177c972bb1c81f9 Author: Xiaochen Shen Date: Fri Dec 4 14:27:59 2020 +0800 x86/resctrl: Fix incorrect local bandwidth when mba_sc is enabled The MBA software controller (mba_sc) is a feedback loop which periodically reads MBM counters and tries to restrict the bandwidth below a user-specified value. It tags along the MBM counter overflow handler to do the updates with 1s interval in mbm_update() and update_mba_bw(). The purpose of mbm_update() is to periodically read the MBM counters to make sure that the hardware counter doesn't wrap around more than once between user samplings. mbm_update() calls __mon_event_count() for local bandwidth updating when mba_sc is not enabled, but calls mbm_bw_count() instead when mba_sc is enabled. __mon_event_count() will not be called for local bandwidth updating in MBM counter overflow handler, but it is still called when reading MBM local bandwidth counter file 'mbm_local_bytes', the call path is as below: rdtgroup_mondata_show() mon_event_read() mon_event_count() __mon_event_count() In __mon_event_count(), m->chunks is updated by delta chunks which is calculated from previous MSR value (m->prev_msr) and current MSR value. When mba_sc is enabled, m->chunks is also updated in mbm_update() by mistake by the delta chunks which is calculated from m->prev_bw_msr instead of m->prev_msr. But m->chunks is not used in update_mba_bw() in the mba_sc feedback loop. When reading MBM local bandwidth counter file, m->chunks was changed unexpectedly by mbm_bw_count(). As a result, the incorrect local bandwidth counter which calculated from incorrect m->chunks is shown to the user. Fix this by removing incorrect m->chunks updating in mbm_bw_count() in MBM counter overflow handler, and always calling __mon_event_count() in mbm_update() to make sure that the hardware local bandwidth counter doesn't wrap around. Test steps: # Run workload with aggressive memory bandwidth (e.g., 10 GB/s) git clone https://github.com/intel/intel-cmt-cat && cd intel-cmt-cat && make ./tools/membw/membw -c 0 -b 10000 --read # Enable MBA software controller mount -t resctrl resctrl -o mba_MBps /sys/fs/resctrl # Create control group c1 mkdir /sys/fs/resctrl/c1 # Set MB throttle to 6 GB/s echo "MB:0=6000;1=6000" > /sys/fs/resctrl/c1/schemata # Write PID of the workload to tasks file echo `pidof membw` > /sys/fs/resctrl/c1/tasks # Read local bytes counters twice with 1s interval, the calculated # local bandwidth is not as expected (approaching to 6 GB/s): local_1=`cat /sys/fs/resctrl/c1/mon_data/mon_L3_00/mbm_local_bytes` sleep 1 local_2=`cat /sys/fs/resctrl/c1/mon_data/mon_L3_00/mbm_local_bytes` echo "local b/w (bytes/s):" `expr $local_2 - $local_1` Before fix: local b/w (bytes/s): 11076796416 After fix: local b/w (bytes/s): 5465014272 Fixes: ba0f26d8529c (x86/intel_rdt/mba_sc: Prepare for feedback loop) Signed-off-by: Xiaochen Shen Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Cc: Link: https://lkml.kernel.org/r/1607063279-19437-1-git-send-email-xiaochen.shen@intel.com commit 83bbb8ffb4629ece5d6c0b093b9f66297a9e27e0 Merge: 339f5a7fb2d63 7d894834a3055 Author: Paolo Bonzini Date: Thu Dec 10 11:34:24 2020 -0500 Merge tag 'kvmarm-fixes-5.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD kvm/arm64 fixes for 5.10, take #5 - Don't leak page tables on PTE update - Correctly invalidate TLBs on table to block transition - Only update permissions if the fault level matches the expected mapping size commit 4223a5be80b8998d717c6b0e1000070e0e336bf3 Merge: 7e7986f9d3ba6 57a0f3a81ef21 Author: Jens Axboe Date: Thu Dec 10 07:08:22 2020 -0700 Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.10 Pull MD fixes from Song: "This is to fix raid10 data corruption [1] in 5.10-rc7." * 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: Revert "md: add md_submit_discard_bio() for submitting discard bio" Revert "md/raid10: extend r10bio devs to raid disks" Revert "md/raid10: pull codes that wait for blocked dev into one function" Revert "md/raid10: improve raid10 discard request" Revert "md/raid10: improve discard request for far layout" Revert "dm raid: remove unnecessary discard limits for raid10" commit 29ac40cbed2bc06fa218ca25d7f5e280d3d08a25 Author: Arvind Sankar Date: Wed Nov 11 11:09:45 2020 -0500 x86/mm/mem_encrypt: Fix definition of PMD_FLAGS_DEC_WP The PAT bit is in different locations for 4k and 2M/1G page table entries. Add a definition for _PAGE_LARGE_CACHE_MASK to represent the three caching bits (PWT, PCD, PAT), similar to _PAGE_CACHE_MASK for 4k pages, and use it in the definition of PMD_FLAGS_DEC_WP to get the correct PAT index for write-protected pages. Fixes: 6ebcb060713f ("x86/mm: Add support to encrypt the kernel in-place") Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Tested-by: Tom Lendacky Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20201111160946.147341-1-nivedita@alum.mit.edu commit 6bea0225a4bf14a58af71cb9677a756921469e46 Author: Damien Le Moal Date: Wed Dec 9 20:16:10 2020 +0900 zonefs: fix page reference and BIO leak In zonefs_file_dio_append(), the pages obtained using bio_iov_iter_get_pages() are not released on completion of the REQ_OP_APPEND BIO, nor when bio_iov_iter_get_pages() fails. Furthermore, a call to bio_put() is missing when bio_iov_iter_get_pages() fails. Fix these resource leaks by adding BIO resource release code (bio_put()i and bio_release_pages()) at the end of the function after the BIO execution and add a jump to this resource cleanup code in case of bio_iov_iter_get_pages() failure. While at it, also fix the call to task_io_account_write() to be passed the correct BIO size instead of bio_iov_iter_get_pages() return value. Reported-by: Christoph Hellwig Fixes: 02ef12a663c7 ("zonefs: use REQ_OP_ZONE_APPEND for sync DIO") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig commit ce6520b0eafad5962ffc21dc47cd7bd3250e9045 Author: Chris Chiu Date: Wed Dec 9 20:24:47 2020 -0800 Input: i8042 - add Acer laptops to the i8042 reset list The touchpad operates in Basic Mode by default in the Acer BIOS setup, but some Aspire/TravelMate models require the i8042 to be reset in order to be correctly detected. Signed-off-by: Chris Chiu Link: https://lore.kernel.org/r/20201207071250.15021-1-chiu@endlessos.org Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 57a0f3a81ef21fe51d6223aa78a1a890098d4ada Author: Song Liu Date: Wed Dec 9 11:44:42 2020 -0800 Revert "md: add md_submit_discard_bio() for submitting discard bio" This reverts commit 2628089b74d5a64bd0bcb5d247a18f78d7b6f4d0. Matthew Ruffell reported data corruption in raid10 due to the changes in discard handling [1]. Revert these changes before we find a proper fix. [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1907262/ Cc: Matthew Ruffell Cc: Xiao Ni Signed-off-by: Song Liu commit 17c28c2a068730e9d065a0e4ed03beed074d8997 Author: Song Liu Date: Wed Dec 9 11:44:20 2020 -0800 Revert "md/raid10: extend r10bio devs to raid disks" This reverts commit 8650a889017cb1f6ea6813ccf83a2e9f6fa49dd3. Matthew Ruffell reported data corruption in raid10 due to the changes in discard handling [1]. Revert these changes before we find a proper fix. [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1907262/ Cc: Matthew Ruffell Cc: Xiao Ni Signed-off-by: Song Liu commit 4e2c6567efdd6f252e1874c41c8db4abfb0a9bf3 Author: Song Liu Date: Wed Dec 9 11:43:43 2020 -0800 Revert "md/raid10: pull codes that wait for blocked dev into one function" This reverts commit f046f5d0d79cdb968f219ce249e497fd1accf484. Matthew Ruffell reported data corruption in raid10 due to the changes in discard handling [1]. Revert these changes before we find a proper fix. [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1907262/ Cc: Matthew Ruffell Cc: Xiao Ni Signed-off-by: Song Liu commit d7cb6be0d0cdced2a7a96bd80a8f835e77ec5204 Author: Song Liu Date: Wed Dec 9 11:43:08 2020 -0800 Revert "md/raid10: improve raid10 discard request" This reverts commit bcc90d280465ebd51ab8688be86e1f00c62dccf9. Matthew Ruffell reported data corruption in raid10 due to the changes in discard handling [1]. Revert these changes before we find a proper fix. [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1907262/ Cc: Matthew Ruffell Cc: Xiao Ni Signed-off-by: Song Liu commit 82fe9af77cd11ea7bdc133ceed1f7f5fc08f7d25 Author: Song Liu Date: Wed Dec 9 11:38:11 2020 -0800 Revert "md/raid10: improve discard request for far layout" This reverts commit d3ee2d8415a6256c1c41e1be36e80e640c3e6359. Matthew Ruffell reported data corruption in raid10 due to the changes in discard handling [1]. Revert these changes before we find a proper fix. [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1907262/ Cc: Matthew Ruffell Cc: Xiao Ni Signed-off-by: Song Liu commit e2782f560c298efc2e23c7e54b3acf54e8a6ba72 Author: Song Liu Date: Wed Dec 9 13:53:31 2020 -0800 Revert "dm raid: remove unnecessary discard limits for raid10" This reverts commit f0e90b6c663a7e3b4736cb318c6c7c589f152c28. Matthew Ruffell reported data corruption in raid10 due to the changes in discard handling [1]. Revert these changes before we find a proper fix. [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1907262/ Cc: Matthew Ruffell Cc: Xiao Ni Cc: Mike Snitzer Acked-by: Mike Snitzer Signed-off-by: Song Liu commit 177745beebe39773004921d6bffd6c94c77dca32 Author: Mickey Rachamim Date: Wed Dec 9 15:47:39 2020 +0200 MAINTAINERS: Add entry for Marvell Prestera Ethernet Switch driver Add maintainers info for new Marvell Prestera Ethernet switch driver. Signed-off-by: Mickey Rachamim Signed-off-by: David S. Miller commit 7fdd375e383097a785bb65c66802e468f398bf82 Author: Guillaume Nault Date: Wed Dec 9 16:48:41 2020 +0100 net: sched: Fix dump of MPLS_OPT_LSE_LABEL attribute in cls_flower TCA_FLOWER_KEY_MPLS_OPT_LSE_LABEL is a u32 attribute (MPLS label is 20 bits long). Fixes the following bug: $ tc filter add dev ethX ingress protocol mpls_uc \ flower mpls lse depth 2 label 256 \ action drop $ tc filter show dev ethX ingress filter protocol mpls_uc pref 49152 flower chain 0 filter protocol mpls_uc pref 49152 flower chain 0 handle 0x1 eth_type 8847 mpls lse depth 2 label 0 <-- invalid label 0, should be 256 ... Fixes: 61aec25a6db5 ("cls_flower: Support filtering on multiple MPLS Label Stack Entries") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit c5b58c8c860db330c0b8b891b69014ee9d470dab Author: Evan Quan Date: Wed Dec 9 16:34:22 2020 +0800 drm/amd/pm: typo fix (CUSTOM -> COMPUTE) The "COMPUTE" was wrongly spelled as "CUSTOM". Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit b7e4ba9a91dffd298d940b4d3f173121ff829a32 Merge: 88287773ff6f5 2d94b20b95b00 Author: David S. Miller Date: Wed Dec 9 18:55:46 2020 -0800 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) Switch to RCU in x_tables to fix possible NULL pointer dereference, from Subash Abhinov Kasiviswanathan. 2) Fix netlink dump of dynset timeouts later than 23 days. 3) Add comment for the indirect serialization of the nft commit mutex with rtnl_mutex. 4) Remove bogus check for confirmed conntrack when matching on the conntrack ID, from Brett Mastbergen. ==================== Signed-off-by: David S. Miller commit 88287773ff6f53c47e1902ae3ae19084ef5c69aa Merge: 9a25a30ee54c6 1beb7830d3b28 Author: David S. Miller Date: Wed Dec 9 18:48:29 2020 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2020-12-09 This series contains updates to igb, ixgbe, i40e, and ice drivers. Sven Auhagen fixes issues with igb XDP: return correct error value in XDP xmit back, increase header padding to include space for double VLAN, add an extack error when Rx buffer is too small for frame size, set metasize if it is set in xdp, change xdp_do_flush_map to xdp_do_flush, and update trans_start to avoid possible Tx timeout. Björn fixes an issue where an Rx buffer can be reused prematurely with XDP redirect for ixgbe, i40e, and ice drivers. The following are changes since commit 323a391a220c4a234cb1e678689d7f4c3b73f863: can: isotp: isotp_setsockopt(): block setsockopt on bound sockets and are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 1GbE ==================== Signed-off-by: David S. Miller commit 80db2a087f425b63f0163bc95217abd01c637cb5 Author: Dmitry Torokhov Date: Wed Dec 9 17:59:53 2020 -0800 Input: cros_ec_keyb - send 'scancodes' in addition to key events To let userspace know what 'scancodes' should be used in EVIOCGKEYCODE and EVIOCSKEYCODE ioctls, we should send EV_MSC/MSC_SCAN events in addition to EV_KEY/KEY_* events. The driver already declared MSC_SCAN capability, so it is only matter of actually sending the events. Link: https://lore.kernel.org/r/X87aOaSptPTvZ3nZ@google.com Acked-by: Rajat Jain Signed-off-by: Dmitry Torokhov commit 9a25a30ee54c61a186f3f00d9797f1cc43886167 Merge: 299bcb55ecd14 ba603d9d7b121 Author: David S. Miller Date: Wed Dec 9 16:44:35 2020 -0800 Merge branch 'mlx4_en-fixes' Tariq Toukan says: ==================== mlx4_en fixes This patchset by Moshe contains fixes to the mlx4 Eth driver, addressing issues in restart flow. Patch 1 protects the restart task from being rescheduled while active. Please queue for -stable >= v2.6. Patch 2 reconstructs SQs stuck in error state, and adds prints for improved debuggability. Please queue for -stable >= v3.12. ==================== Signed-off-by: David S. Miller commit ba603d9d7b1215c72513d7c7aa02b6775fd4891b Author: Moshe Shemesh Date: Wed Dec 9 15:03:39 2020 +0200 net/mlx4_en: Handle TX error CQE In case error CQE was found while polling TX CQ, the QP is in error state and all posted WQEs will generate error CQEs without any data transmitted. Fix it by reopening the channels, via same method used for TX timeout handling. In addition add some more info on error CQE and WQE for debug. Fixes: bd2f631d7c60 ("net/mlx4_en: Notify user when TX ring in error state") Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit fed91613c9dd455dd154b22fa8e11b8526466082 Author: Moshe Shemesh Date: Wed Dec 9 15:03:38 2020 +0200 net/mlx4_en: Avoid scheduling restart task if it is already running Add restarting state flag to avoid scheduling another restart task while such task is already running. Change task name from watchdog_task to restart_task to better fit the task role. Fixes: 1e338db56e5a ("mlx4_en: Fix a race at restart task") Signed-off-by: Moshe Shemesh Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 299bcb55ecd1412f6df606e9dc0912d55610029e Author: Neal Cardwell Date: Tue Dec 8 22:57:59 2020 -0500 tcp: fix cwnd-limited bug for TSO deferral where we send nothing When cwnd is not a multiple of the TSO skb size of N*MSS, we can get into persistent scenarios where we have the following sequence: (1) ACK for full-sized skb of N*MSS arrives -> tcp_write_xmit() transmit full-sized skb with N*MSS -> move pacing release time forward -> exit tcp_write_xmit() because pacing time is in the future (2) TSQ callback or TCP internal pacing timer fires -> try to transmit next skb, but TSO deferral finds remainder of available cwnd is not big enough to trigger an immediate send now, so we defer sending until the next ACK. (3) repeat... So we can get into a case where we never mark ourselves as cwnd-limited for many seconds at a time, even with bulk/infinite-backlog senders, because: o In case (1) above, every time in tcp_write_xmit() we have enough cwnd to send a full-sized skb, we are not fully using the cwnd (because cwnd is not a multiple of the TSO skb size). So every time we send data, we are not cwnd limited, and so in the cwnd-limited tracking code in tcp_cwnd_validate() we mark ourselves as not cwnd-limited. o In case (2) above, every time in tcp_write_xmit() that we try to transmit the "remainder" of the cwnd but defer, we set the local variable is_cwnd_limited to true, but we do not send any packets, so sent_pkts is zero, so we don't call the cwnd-limited logic to update tp->is_cwnd_limited. Fixes: ca8a22634381 ("tcp: make cwnd-limited checks measurement-based, and gentler") Reported-by: Ingemar Johansson Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20201209035759.1225145-1-ncardwell.kernel@gmail.com Signed-off-by: Jakub Kicinski commit 5137d303659d8c324e67814b1cc2e1bc0c0d9836 Author: Chris Mi Date: Tue Dec 8 10:48:35 2020 +0800 net: flow_offload: Fix memory leak for indirect flow block The offending commit introduces a cleanup callback that is invoked when the driver module is removed to clean up the tunnel device flow block. But it returns on the first iteration of the for loop. The remaining indirect flow blocks will never be freed. Fixes: 1fac52da5942 ("net: flow_offload: consolidate indirect flow_block infrastructure") CC: Pablo Neira Ayuso Signed-off-by: Chris Mi Reviewed-by: Roi Dayan commit 8ef44b6fe49d2b8d03ba9aa69063612b474f963b Author: Wei Wang Date: Tue Dec 8 09:55:08 2020 -0800 tcp: Retain ECT bits for tos reflection For DCTCP, we have to retain the ECT bits set by the congestion control algorithm on the socket when reflecting syn TOS in syn-ack, in order to make ECN work properly. Fixes: ac8f1710c12b ("tcp: reflect tos value received in SYN to the socket") Reported-by: Alexander Duyck Signed-off-by: Wei Wang Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit a770bf515613c6e12ae904c3593e26016de99448 Author: Michal Kubecek Date: Tue Dec 8 23:13:51 2020 +0100 ethtool: fix stack overflow in ethnl_parse_bitset() Syzbot reported a stack overflow in bitmap_from_arr32() called from ethnl_parse_bitset() when bitset from netlink message is longer than target bitmap length. While ethnl_compact_sanity_checks() makes sure that trailing part is all zeros (i.e. the request does not try to touch bits kernel does not recognize), we also need to cap change_bits to nbits so that we don't try to write past the prepared bitmaps. Fixes: 88db6d1e4f62 ("ethtool: add ethnl_parse_bitset() helper") Reported-by: syzbot+9d39fa49d4df294aab93@syzkaller.appspotmail.com Signed-off-by: Michal Kubecek Link: https://lore.kernel.org/r/3487ee3a98e14cd526f55b6caaa959d2dcbcad9f.1607465316.git.mkubecek@suse.cz Signed-off-by: Jakub Kicinski commit a379b01cd4b2aa3f12786b281a714871574e5ccb Author: Vitaly Lifshits Date: Tue Dec 8 12:56:32 2020 -0600 e1000e: fix S0ix flow to allow S0i3.2 subset entry Changed a configuration in the flows to align with architecture requirements to achieve S0i3.2 substate. This helps both i219V and i219LM configurations. Also fixed a typo in the previous commit 632fbd5eb5b0 ("e1000e: fix S0ix flows for cable connected case"). Fixes: 632fbd5eb5b0 ("e1000e: fix S0ix flows for cable connected case"). Signed-off-by: Vitaly Lifshits Tested-by: Aaron Brown Signed-off-by: Tony Nguyen Reviewed-by: Alexander Duyck Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20201208185632.151052-1-mario.limonciello@dell.com Signed-off-by: Jakub Kicinski commit 1beb7830d3b285b28f7cde3644d59d2590a47e51 Author: Björn Töpel Date: Tue Aug 25 19:27:36 2020 +0200 ice: avoid premature Rx buffer reuse The page recycle code, incorrectly, relied on that a page fragment could not be freed inside xdp_do_redirect(). This assumption leads to that page fragments that are used by the stack/XDP redirect can be reused and overwritten. To avoid this, store the page count prior invoking xdp_do_redirect(). Fixes: efc2214b6047 ("ice: Add support for XDP") Reported-and-analyzed-by: Li RongQing Signed-off-by: Björn Töpel Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen commit a06316dc87bdc000f7f39a315476957af2ba0f05 Author: Björn Töpel Date: Tue Aug 25 19:27:35 2020 +0200 ixgbe: avoid premature Rx buffer reuse The page recycle code, incorrectly, relied on that a page fragment could not be freed inside xdp_do_redirect(). This assumption leads to that page fragments that are used by the stack/XDP redirect can be reused and overwritten. To avoid this, store the page count prior invoking xdp_do_redirect(). Fixes: 6453073987ba ("ixgbe: add initial support for xdp redirect") Reported-and-analyzed-by: Li RongQing Signed-off-by: Björn Töpel Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen commit 75aab4e10ae6a4593a60f66d13de755d4e91f400 Author: Björn Töpel Date: Tue Aug 25 19:27:34 2020 +0200 i40e: avoid premature Rx buffer reuse The page recycle code, incorrectly, relied on that a page fragment could not be freed inside xdp_do_redirect(). This assumption leads to that page fragments that are used by the stack/XDP redirect can be reused and overwritten. To avoid this, store the page count prior invoking xdp_do_redirect(). Longer explanation: Intel NICs have a recycle mechanism. The main idea is that a page is split into two parts. One part is owned by the driver, one part might be owned by someone else, such as the stack. t0: Page is allocated, and put on the Rx ring +--------------- used by NIC ->| upper buffer (rx_buffer) +--------------- | lower buffer +--------------- page count == USHRT_MAX rx_buffer->pagecnt_bias == USHRT_MAX t1: Buffer is received, and passed to the stack (e.g.) +--------------- | upper buff (skb) +--------------- used by NIC ->| lower buffer (rx_buffer) +--------------- page count == USHRT_MAX rx_buffer->pagecnt_bias == USHRT_MAX - 1 t2: Buffer is received, and redirected +--------------- | upper buff (skb) +--------------- used by NIC ->| lower buffer (rx_buffer) +--------------- Now, prior calling xdp_do_redirect(): page count == USHRT_MAX rx_buffer->pagecnt_bias == USHRT_MAX - 2 This means that buffer *cannot* be flipped/reused, because the skb is still using it. The problem arises when xdp_do_redirect() actually frees the segment. Then we get: page count == USHRT_MAX - 1 rx_buffer->pagecnt_bias == USHRT_MAX - 2 From a recycle perspective, the buffer can be flipped and reused, which means that the skb data area is passed to the Rx HW ring! To work around this, the page count is stored prior calling xdp_do_redirect(). Note that this is not optimal, since the NIC could actually reuse the "lower buffer" again. However, then we need to track whether XDP_REDIRECT consumed the buffer or not. Fixes: d9314c474d4f ("i40e: add support for XDP_REDIRECT") Reported-and-analyzed-by: Li RongQing Signed-off-by: Björn Töpel Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen commit ec107e775d84392b35db46f6c3baa441e074042e Author: Sven Auhagen Date: Wed Nov 11 18:04:53 2020 +0100 igb: avoid transmit queue timeout in xdp path Since we share the transmit queue with the network stack, it is possible that we run into a transmit queue timeout. This will reset the queue. This happens under high load when XDP is using the transmit queue pretty much exclusively. netdev_start_xmit() sets the trans_start variable of the transmit queue to jiffies which is later utilized by dev_watchdog(), so to avoid timeout, let stack know that XDP xmit happened by bumping the trans_start within XDP Tx routines to jiffies. Fixes: 9cbc948b5a20 ("igb: add XDP support") Acked-by: Maciej Fijalkowski Signed-off-by: Sven Auhagen Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen commit 3eca859008a75a4ad363db65b0fe83be1a3d5ad1 Author: Sven Auhagen Date: Wed Nov 11 18:04:52 2020 +0100 igb: use xdp_do_flush Since it is a new XDP implementation change xdp_do_flush_map to xdp_do_flush. Fixes: 9cbc948b5a20 ("igb: add XDP support") Suggested-by: Maciej Fijalkowski Reviewed-by: Maciej Fijalkowski Acked-by: Maciej Fijalkowski Signed-off-by: Sven Auhagen Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen commit 681429dba99249546dda160e266e56035a2d750b Author: Sven Auhagen Date: Wed Nov 11 18:04:51 2020 +0100 igb: skb add metasize for xdp add metasize if it is set in xdp Fixes: 9cbc948b5a20 ("igb: add XDP support") Suggested-by: Maciej Fijalkowski Reviewed-by: Maciej Fijalkowski Acked-by: Maciej Fijalkowski Signed-off-by: Sven Auhagen Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen commit 2e2bb5594ca0a5885dc93055ab0f9b5fbcdaa403 Author: Sven Auhagen Date: Wed Nov 11 18:04:50 2020 +0100 igb: XDP extack message on error Add an extack error message when the RX buffer size is too small for the frame size. Fixes: 9cbc948b5a20 ("igb: add XDP support") Suggested-by: Maciej Fijalkowski Reviewed-by: Maciej Fijalkowski Acked-by: Maciej Fijalkowski Signed-off-by: Sven Auhagen Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen commit b829ec1a66bc3dda4b01ab4c57d41ad1a1f82fed Author: Sven Auhagen Date: Wed Nov 11 18:04:49 2020 +0100 igb: take VLAN double header into account Increase the packet header padding to include double VLAN tagging. This patch uses a macro for this. Fixes: 9cbc948b5a20 ("igb: add XDP support") Suggested-by: Maciej Fijalkowski Reviewed-by: Maciej Fijalkowski Acked-by: Maciej Fijalkowski Signed-off-by: Sven Auhagen Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen commit cfb33e174fa25d9d830683a1e1b22850546103b5 Author: Sven Auhagen Date: Wed Nov 11 18:04:48 2020 +0100 igb: XDP xmit back fix error code The igb XDP xmit back function should only return defined error codes. Fixes: 9cbc948b5a20 ("igb: add XDP support") Reported-by: Dan Carpenter Acked-by: Maciej Fijalkowski Signed-off-by: Sven Auhagen Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen commit a2f5ea9e314ba6778f885c805c921e9362ec0420 Merge: ca4bbdaf17160 69fe24d1d80fe Author: Linus Torvalds Date: Wed Dec 9 14:49:48 2020 -0800 Merge tag 'arm-soc-fixes-v5.10-4b' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "There are a few more PHY mode changes for allwinner SoC based boards with a Realtek PHY after the driver changed its behavior, I assume there will be more of these in the future. Also on for Allwinner, the Banana Pi M2 board had a regression that led to some devices not working because of a slightly incorrect voltage being applied. By popular demand, I picked up a change from Krzysztof Kozlowski to actually list the SoC tree in the MAINTAINERS file. We don't want to get Cc'd on normal patches that are picked up by platform maintainers, but the lack of an entry has led to confusion in the past. All the other changes are fairly benign, fixing boot-time or compile-time warning messages in various places: - A dtc warning on the OLPC XO-1.75 - A boot-time warning on i.MX6 wandboard - A harmless compile-time warning - A regression causing one of the i.MX6 SoCs to be identified as another - Missing SoC identification of Allwinner V3 and S3" * tag 'arm-soc-fixes-v5.10-4b' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: firmware: xilinx: Mark pm_api_features_map with static keyword ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs MAINTAINERS: add a limited ARM and ARM64 SoC entry MAINTAINERS: correct SoC Git address (formerly: arm-soc) ARM: keystone: remove SECTION_SIZE_BITS/MAX_PHYSMEM_BITS arm64: dts: allwinner: H5: NanoPi Neo Plus2: phy-mode rgmii-id arm64: dts: allwinner: A64 Sopine: phy-mode rgmii-id ARM: dts: imx6qdl-kontron-samx6i: fix I2C_PM scl pin ARM: dts: imx6qdl-wandboard-revd1: Remove PAD_GPIO_6 from enetgrp ARM: imx: Use correct SRC base address ARM: dts: sun7i: pcduino3-nano: enable RGMII RX/TX delay on PHY ARM: dts: sun8i: v3s: fix GIC node memory range ARM: dts: sun8i: v40: bananapi-m2-berry: Fix ethernet node ARM: dts: sun8i: r40: bananapi-m2-berry: Fix dcdc1 regulator ARM: dts: sun7i: bananapi: Enable RGMII RX/TX delay on Ethernet PHY ARM: dts: s3: pinecube: align compatible property to other S3 boards ARM: sunxi: Add machine match for the Allwinner V3 SoC arm64: dts: allwinner: h6: orangepi-one-plus: Fix ethernet commit c02bd115b1d25931159f89c7d9bf47a30f5d4b41 Author: Jakub Kicinski Date: Wed Dec 9 14:39:56 2020 -0800 Revert "geneve: pull IP header before ECN decapsulation" This reverts commit 4179b00c04d1 ("geneve: pull IP header before ECN decapsulation"). Eric says: "network header should have been pulled already before hitting geneve_rx()". Let's revert the syzbot fix since it's causing more harm than good, and revisit. Suggested-by: Eric Dumazet Reported-by: Jianlin Shi Fixes: 4179b00c04d1 ("geneve: pull IP header before ECN decapsulation") Link: https://bugzilla.kernel.org/show_bug.cgi?id=210569 Link: https://lore.kernel.org/netdev/CANn89iJVWfb=2i7oU1=D55rOyQnBbbikf+Mc6XHMkY7YX-yGEw@mail.gmail.com/ Signed-off-by: Jakub Kicinski commit 69fe24d1d80feac4289778582cf0a15256d59baf Author: Zou Wei Date: Tue Dec 1 19:51:53 2020 +0800 firmware: xilinx: Mark pm_api_features_map with static keyword Fix the following sparse warning: drivers/firmware/xilinx/zynqmp.c:32:1: warning: symbol 'pm_api_features_map' was not declared. Should it be static? Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1606823513-121578-1-git-send-email-zou_wei@huawei.com Signed-off-by: Michal Simek Signed-off-by: Arnd Bergmann commit 387270cb0b4035491c4812effd8b5af0e385a66c Author: Zhen Lei Date: Mon Dec 7 16:47:52 2020 +0800 ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs The check_spi_bus_bridge() in scripts/dtc/checks.c requires that the node have "spi-slave" property must with "#address-cells = <0>" and "#size-cells = <0>". But currently both "#address-cells" and "#size-cells" properties are deleted, the corresponding default values are 2 and 1. As a result, the check fails and below warnings is displayed. arch/arm/boot/dts/mmp2.dtsi:472.23-480.6: Warning (spi_bus_bridge): \ /soc/apb@d4000000/spi@d4037000: incorrect #address-cells for SPI bus also defined at arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225.7-237.3 arch/arm/boot/dts/mmp2.dtsi:472.23-480.6: Warning (spi_bus_bridge): \ /soc/apb@d4000000/spi@d4037000: incorrect #size-cells for SPI bus also defined at arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225.7-237.3 arch/arm/boot/dts/mmp2-olpc-xo-1-75.dtb: Warning (spi_bus_reg): \ Failed prerequisite 'spi_bus_bridge' Because the value of "#size-cells" is already defined as zero in the node "ssp3: spi@d4037000" in arch/arm/boot/dts/mmp2.dtsi. So we only need to explicitly add "#address-cells = <0>" and keep "#size-cells" no change. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20201207084752.1665-2-thunder.leizhen@huawei.com' Signed-off-by: Arnd Bergmann commit 340b940ea0ed12d9adbb8f72dea17d516b2019e8 Author: Leon Romanovsky Date: Fri Dec 4 08:42:05 2020 +0200 RDMA/cm: Fix an attempt to use non-valid pointer when cleaning timewait If cm_create_timewait_info() fails, the timewait_info pointer will contain an error value and will be used in cm_remove_remote() later. general protection fault, probably for non-canonical address 0xdffffc0000000024: 0000 [#1] SMP KASAN PTI KASAN: null-ptr-deref in range [0×0000000000000120-0×0000000000000127] CPU: 2 PID: 12446 Comm: syz-executor.3 Not tainted 5.10.0-rc5-5d4c0742a60e #27 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:cm_remove_remote.isra.0+0x24/0×170 drivers/infiniband/core/cm.c:978 Code: 84 00 00 00 00 00 41 54 55 53 48 89 fb 48 8d ab 2d 01 00 00 e8 7d bf 4b fe 48 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 04 02 48 89 ea 83 e2 07 38 d0 7f 08 84 c0 0f 85 fc 00 00 00 RSP: 0018:ffff888013127918 EFLAGS: 00010006 RAX: dffffc0000000000 RBX: fffffffffffffff4 RCX: ffffc9000a18b000 RDX: 0000000000000024 RSI: ffffffff82edc573 RDI: fffffffffffffff4 RBP: 0000000000000121 R08: 0000000000000001 R09: ffffed1002624f1d R10: 0000000000000003 R11: ffffed1002624f1c R12: ffff888107760c70 R13: ffff888107760c40 R14: fffffffffffffff4 R15: ffff888107760c9c FS: 00007fe1ffcc1700(0000) GS:ffff88811a600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2ff21000 CR3: 000000010f504001 CR4: 0000000000370ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: cm_destroy_id+0x189/0×15b0 drivers/infiniband/core/cm.c:1155 cma_connect_ib drivers/infiniband/core/cma.c:4029 [inline] rdma_connect_locked+0x1100/0×17c0 drivers/infiniband/core/cma.c:4107 rdma_connect+0x2a/0×40 drivers/infiniband/core/cma.c:4140 ucma_connect+0x277/0×340 drivers/infiniband/core/ucma.c:1069 ucma_write+0x236/0×2f0 drivers/infiniband/core/ucma.c:1724 vfs_write+0x220/0×830 fs/read_write.c:603 ksys_write+0x1df/0×240 fs/read_write.c:658 do_syscall_64+0x33/0×40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: a977049dacde ("[PATCH] IB: Add the kernel CM implementation") Link: https://lore.kernel.org/r/20201204064205.145795-1-leon@kernel.org Reviewed-by: Maor Gottlieb Reported-by: Amit Matityahu Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ca4bbdaf171604841f77648a2877e2e43db69b71 Merge: a68a0262abdaa 4165bf015ba94 Author: Linus Torvalds Date: Wed Dec 9 09:59:14 2020 -0800 Merge tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull iommu fix from Will Deacon: "Fix interrupt table length definition for AMD IOMMU. It's actually a fix for a fix, where the size of the interrupt remapping table was increased but a related constant for the size of the interrupt table was forgotten" * tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs commit 323a391a220c4a234cb1e678689d7f4c3b73f863 Author: Oliver Hartkopp Date: Fri Dec 4 14:35:07 2020 +0100 can: isotp: isotp_setsockopt(): block setsockopt on bound sockets The isotp socket can be widely configured in its behaviour regarding addressing types, fill-ups, receive pattern tests and link layer length. Usually all these settings need to be fixed before bind() and can not be changed afterwards. This patch adds a check to enforce the common usage pattern. Fixes: e057dd3fc20f ("can: add ISO 15765-2:2016 transport protocol") Signed-off-by: Oliver Hartkopp Tested-by: Thomas Wagner Link: https://lore.kernel.org/r/20201203140604.25488-2-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20201204133508.742120-3-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 4e083fdfa39db29bbc7725e229e701867d0da183 Merge: b62527005d46d 8158cad134356 Author: Daniel Borkmann Date: Wed Dec 9 16:27:42 2020 +0100 Merge branch 'bpf-xdp-offload-fixes' Toke Høiland-Jørgensen says: ==================== This series restores the test_offload.py selftest to working order. It seems a number of subtle behavioural changes have crept into various subsystems which broke test_offload.py in a number of ways. Most of these are fairly benign changes where small adjustments to the test script seems to be the best fix, but one is an actual kernel bug that I've observed in the wild caused by a bad interaction between xdp_attachment_flags_ok() and the rework of XDP program handling in the core netdev code. Patch 1 fixes the bug by removing xdp_attachment_flags_ok(), and the reminder of the patches are adjustments to test_offload.py, including a new feature for netdevsim to force a BPF verification fail. Please see the individual patches for details. Changelog: v4: - Accidentally truncated the Fixes: hashes in patches 3/4 to 11 chars v3: - Add Fixes: tags v2: - Replace xdp_attachment_flags_ok() with a check in dev_xdp_attach() - Better packing of struct nsim_dev ==================== Signed-off-by: Daniel Borkmann commit 8158cad13435639cd4962fb88970960f880ef6d9 Author: Toke Høiland-Jørgensen Date: Wed Dec 9 14:57:43 2020 +0100 selftests/bpf/test_offload.py: Filter bpftool internal map when counting maps A few of the tests in test_offload.py expects to see a certain number of maps created, and checks this by counting the number of maps returned by bpftool. There is already a filter that will remove any maps already there at the beginning of the test, but bpftool now creates a map for the PID iterator rodata on each invocation, which makes the map count wrong. Fix this by also filtering the pid_iter.rodata map by name when counting. Fixes: d53dee3fe013 ("tools/bpftool: Show info for processes holding BPF map/prog/link/btf FDs") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/160752226387.110217.9887866138149423444.stgit@toke.dk commit 766e62b7fcd2cf1d43e6594ba37c659dc48f7ddb Author: Toke Høiland-Jørgensen Date: Wed Dec 9 14:57:42 2020 +0100 selftests/bpf/test_offload.py: Reset ethtool features after failed setting When setting the ethtool feature flag fails (as expected for the test), the kernel now tracks that the feature was requested to be 'off' and refuses to subsequently disable it again. So reset it back to 'on' so a subsequent disable (that's not supposed to fail) can succeed. Fixes: 417ec26477a5 ("selftests/bpf: add offload test based on netdevsim") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/160752226280.110217.10696241563705667871.stgit@toke.dk commit 852c2ee338f0ac6026458615b624e1c496142cf6 Author: Toke Høiland-Jørgensen Date: Wed Dec 9 14:57:41 2020 +0100 selftests/bpf/test_offload.py: Fix expected case of extack messages Commit 7f0a838254bd ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device") changed the case of some of the extack messages being returned when attaching of XDP programs failed. This broke test_offload.py, so let's fix the test to reflect this. Fixes: 7f0a838254bd ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/160752226175.110217.11214100824416344952.stgit@toke.dk commit d8b5e76ae4e02908d000397597c6bc2868362fbb Author: Toke Høiland-Jørgensen Date: Wed Dec 9 14:57:40 2020 +0100 selftests/bpf/test_offload.py: Only check verifier log on verification fails Since commit 6f8a57ccf851 ("bpf: Make verifier log more relevant by default"), the verifier discards log messages for successfully-verified programs. This broke test_offload.py which is looking for a verification message from the driver callback. Change test_offload.py to use the toggle in netdevsim to make the verification fail before looking for the verification message. Fixes: 6f8a57ccf851 ("bpf: Make verifier log more relevant by default") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/160752226069.110217.12370824996153348073.stgit@toke.dk commit e4ff5aa469403462091eb22e2b0843b894167e10 Author: Toke Høiland-Jørgensen Date: Wed Dec 9 14:57:39 2020 +0100 netdevsim: Add debugfs toggle to reject BPF programs in verifier This adds a new debugfs toggle ('bpf_bind_verifier_accept') that can be used to make netdevsim reject BPF programs from being accepted by the verifier. If this toggle (which defaults to true) is set to false, nsim_bpf_verify_insn() will return EOPNOTSUPP on the last instruction (after outputting the 'Hello from netdevsim' verifier message). This makes it possible to check the verification callback in the driver from test_offload.py in selftests, since the verifier now clears the verifier log on a successful load, hiding the message from the driver. Fixes: 6f8a57ccf851 ("bpf: Make verifier log more relevant by default") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/160752225964.110217.12584017165318065332.stgit@toke.dk commit 0b5b6e747c86e57b7ebd64ccb84314a227ccfcc2 Author: Toke Høiland-Jørgensen Date: Wed Dec 9 14:57:38 2020 +0100 selftests/bpf/test_offload.py: Remove check for program load flags match Since we just removed the xdp_attachment_flags_ok() callback, also remove the check for it in test_offload.py, and replace it with a test for the new ambiguity-avoid check when multiple programs are loaded. Fixes: 7f0a838254bd ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/160752225858.110217.13036901876869496246.stgit@toke.dk commit 998f17296234aa8d3676b4a13962eb39f4ad24e0 Author: Toke Høiland-Jørgensen Date: Wed Dec 9 14:57:37 2020 +0100 xdp: Remove the xdp_attachment_flags_ok() callback Since commit 7f0a838254bd ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device"), the XDP program attachment info is now maintained in the core code. This interacts badly with the xdp_attachment_flags_ok() check that prevents unloading an XDP program with different load flags than it was loaded with. In practice, two kinds of failures are seen: - An XDP program loaded without specifying a mode (and which then ends up in driver mode) cannot be unloaded if the program mode is specified on unload. - The dev_xdp_uninstall() hook always calls the driver callback with the mode set to the type of the program but an empty flags argument, which means the flags_ok() check prevents the program from being removed, leading to bpf prog reference leaks. The original reason this check was added was to avoid ambiguity when multiple programs were loaded. With the way the checks are done in the core now, this is quite simple to enforce in the core code, so let's add a check there and get rid of the xdp_attachment_flags_ok() callback entirely. Fixes: 7f0a838254bd ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/160752225751.110217.10267659521308669050.stgit@toke.dk commit ab43234d0bafcf2accd9db4fc4d193180b752f94 Author: Andrey Grodzovsky Date: Tue Dec 8 15:16:15 2020 -0500 drm/amdgpu: Initialise drm_gem_object_funcs for imported BOs For BOs imported from outside of amdgpu, setting of amdgpu_gem_object_funcs was missing in amdgpu_dma_buf_create_obj. Fix by refactoring BO creation and amdgpu_gem_object_funcs setting into single function called from both code paths. Fixes: d693def4fd1c ("drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver") v2: Use use amdgpu_gem_object_create() directly v3: fix warning Reviewed-by: Christian König Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 157fe68d74c2ad2db438c91af9ed3d3a51de4ed7 Author: Alex Deucher Date: Mon Dec 7 13:12:29 2020 -0500 drm/amdgpu: fix size calculation with stolen vga memory If we need to keep the stolen vga memory, make sure it is at least as big as the legacy vga size. Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c9918d1f63a3e77ec20997a77c997a6fa7282f2f Author: Changfeng Date: Mon Dec 7 15:42:29 2020 +0800 drm/amd/pm: update smu10.h WORKLOAD_PPLIB setting for raven When using old WORKLOAD_PPLIB setting in smu10.h, there is problem that it can't be able to switch to mak gpu clk during compute workload. It needs to update WORKLOAD_PPLIB setting to fix this issue. Signed-off-by: Changfeng Reviewed-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit ab6e4e9de8dd7febfdf6719741f10dc6693d8ce9 Author: Felix Kuehling Date: Tue Dec 8 12:23:15 2020 -0500 drm/amdkfd: Fix leak in dmabuf import Release dmabuf reference before returning from kfd_ioctl_import_dmabuf. amdgpu_amdkfd_gpuvm_import_dmabuf takes a reference to the underlying GEM BO and doesn't keep the reference to the dmabuf wrapper. Signed-off-by: Felix Kuehling Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit 6896887b8676d8fb445c85ea56333b9661a6a8aa Author: Stanley.Yang Date: Mon Dec 7 14:38:33 2020 +0800 drm/amdgpu: fix sdma instance fw version and feature version init each sdma instance fw_version and feature_version should be set right value when asic type isn't between SIENNA_CICHILD and CHIP_DIMGREY_CAVEFISH Signed-off-by: Stanley.Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 369b7ebe1792b620b7a9404e7b71daaae13ebfd6 Author: Sung Lee Date: Mon Nov 23 15:38:54 2020 -0500 drm/amd/display: Add wm table for Renoir [Why] Without additional HostVM Latency, Renoir takes 2us longer to exit self-refresh. This causes underflow in certain cases. [How] Add table for Renoir with updated sr exit latencies for WM set A. Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Reviewed-by: Roman Li Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit c2ffe78b8b1354603a7d5afb719b2a6dfbb582da Author: Chris Park Date: Tue Nov 24 20:11:25 2020 -0500 drm/amd/display: Prevent bandwidth overflow [Why] At very high pixel clock, bandwidth calculation exceeds 32 bit size and overflow value. This causes the resulting selection of link rate to be inaccurate. [How] Change order of operation and use fixed point to deal with integer accuracy. Also address bug found when forcing link rate. Signed-off-by: Chris Park Reviewed-by: Wenjing Liu Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 2343e9d2c5a94459b9de92649f1650e36eb79a10 Author: Arnd Bergmann Date: Fri Dec 4 00:06:43 2020 +0100 drm/amdgpu: fix debugfs creation/removal, again There is still a warning when CONFIG_DEBUG_FS is disabled: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1145:13: error: 'amdgpu_ras_debugfs_create_ctrl_node' defined but not used [-Werror=unused-function] 1145 | static void amdgpu_ras_debugfs_create_ctrl_node(struct amdgpu_device *adev) Change the code again to make the compiler actually drop this code but not warn about it. Fixes: ae2bf61ff39e ("drm/amdgpu: guard ras debugfs creation/removal based on CONFIG_DEBUG_FS") Reviewed-by: Tao Zhou Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 578b6c487899179fed730e710ffec0b069917971 Author: Alex Deucher Date: Thu Dec 3 16:06:26 2020 -0500 drm/amdgpu/disply: set num_crtc earlier To avoid a recently added warning: Bogus possible_crtcs: [ENCODER:65:TMDS-65] possible_crtcs=0xf (full crtc mask=0x7) WARNING: CPU: 3 PID: 439 at drivers/gpu/drm/drm_mode_config.c:617 drm_mode_config_validate+0x178/0x200 [drm] In this case the warning is harmless, but confusing to users. Fixes: 0df108237433 ("drm: Validate encoder->possible_crtcs") Bug: https://bugzilla.kernel.org/show_bug.cgi?id=209123 Reviewed-by: Daniel Vetter Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 2d94b20b95b009eec1a267dcf026b01af627c0cd Author: Brett Mastbergen Date: Tue Dec 8 16:39:24 2020 -0500 netfilter: nft_ct: Remove confirmation check for NFT_CT_ID Since commit 656c8e9cc1ba ("netfilter: conntrack: Use consistent ct id hash calculation") the ct id will not change from initialization to confirmation. Removing the confirmation check allows for things like adding an element to a 'typeof ct id' set in prerouting upon reception of the first packet of a new connection, and then being able to reference that set consistently both before and after the connection is confirmed. Fixes: 656c8e9cc1ba ("netfilter: conntrack: Use consistent ct id hash calculation") Signed-off-by: Brett Mastbergen Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ee32f32335e8c7f6154bf397f4ac9b6175b488a8 Author: Juergen Gross Date: Mon Dec 7 09:36:14 2020 +0100 xen: don't use page->lru for ZONE_DEVICE memory Commit 9e2369c06c8a18 ("xen: add helpers to allocate unpopulated memory") introduced usage of ZONE_DEVICE memory for foreign memory mappings. Unfortunately this collides with using page->lru for Xen backend private page caches. Fix that by using page->zone_device_data instead. Cc: # 5.9 Fixes: 9e2369c06c8a18 ("xen: add helpers to allocate unpopulated memory") Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Reviewed-by: Jason Andryuk Signed-off-by: Juergen Gross commit ca33479cc7be2c9b5f8be078c8bf3ac26b7d6186 Author: Juergen Gross Date: Mon Dec 7 08:31:22 2020 +0100 xen: add helpers for caching grant mapping pages Instead of having similar helpers in multiple backend drivers use common helpers for caching pages allocated via gnttab_alloc_pages(). Make use of those helpers in blkback and scsiback. Cc: # 5.9 Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 263ade7166a2e589c5b605272690c155c0637dcb Author: Chunyan Zhang Date: Wed Dec 9 13:51:06 2020 +0800 gpio: eic-sprd: break loop when getting NULL device resource EIC controller have unfixed numbers of banks on different Spreadtrum SoCs, and each bank has its own base address, the loop of getting there base address in driver should break if the resource gotten via platform_get_resource() is NULL already. The later ones would be all NULL even if the loop continues. Fixes: 25518e024e3a ("gpio: Add Spreadtrum EIC driver support") Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20201209055106.840100-1-zhang.lyra@gmail.com Signed-off-by: Linus Walleij commit e45cdc71d1fa5ac3a57b23acc31eb959e4f60135 Author: Andy Lutomirski Date: Thu Dec 3 21:07:06 2020 -0800 membarrier: Execute SYNC_CORE on the calling thread membarrier()'s MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE is documented as syncing the core on all sibling threads but not necessarily the calling thread. This behavior is fundamentally buggy and cannot be used safely. Suppose a user program has two threads. Thread A is on CPU 0 and thread B is on CPU 1. Thread A modifies some text and calls membarrier(MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE). Then thread B executes the modified code. If, at any point after membarrier() decides which CPUs to target, thread A could be preempted and replaced by thread B on CPU 0. This could even happen on exit from the membarrier() syscall. If this happens, thread B will end up running on CPU 0 without having synced. In principle, this could be fixed by arranging for the scheduler to issue sync_core_before_usermode() whenever switching between two threads in the same mm if there is any possibility of a concurrent membarrier() call, but this would have considerable overhead. Instead, make membarrier() sync the calling CPU as well. As an optimization, this avoids an extra smp_mb() in the default barrier-only mode and an extra rseq preempt on the caller. Fixes: 70216e18e519 ("membarrier: Provide core serializing command, *_SYNC_CORE") Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Mathieu Desnoyers Link: https://lore.kernel.org/r/250ded637696d490c69bef1877148db86066881c.1607058304.git.luto@kernel.org commit 758c9373d84168dc7d039cf85a0e920046b17b41 Author: Andy Lutomirski Date: Thu Dec 3 21:07:05 2020 -0800 membarrier: Explicitly sync remote cores when SYNC_CORE is requested membarrier() does not explicitly sync_core() remote CPUs; instead, it relies on the assumption that an IPI will result in a core sync. On x86, this may be true in practice, but it's not architecturally reliable. In particular, the SDM and APM do not appear to guarantee that interrupt delivery is serializing. While IRET does serialize, IPI return can schedule, thereby switching to another task in the same mm that was sleeping in a syscall. The new task could then SYSRET back to usermode without ever executing IRET. Make this more robust by explicitly calling sync_core_before_usermode() on remote cores. (This also helps people who search the kernel tree for instances of sync_core() and sync_core_before_usermode() -- one might be surprised that the core membarrier code doesn't currently show up in a such a search.) Fixes: 70216e18e519 ("membarrier: Provide core serializing command, *_SYNC_CORE") Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Mathieu Desnoyers Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/776b448d5f7bd6b12690707f5ed67bcda7f1d427.1607058304.git.luto@kernel.org commit 2ecedd7569080fd05c1a457e8af2165afecfa29f Author: Andy Lutomirski Date: Thu Dec 3 21:07:04 2020 -0800 membarrier: Add an actual barrier before rseq_preempt() It seems that most RSEQ membarrier users will expect any stores done before the membarrier() syscall to be visible to the target task(s). While this is extremely likely to be true in practice, nothing actually guarantees it by a strict reading of the x86 manuals. Rather than providing this guarantee by accident and potentially causing a problem down the road, just add an explicit barrier. Fixes: 70216e18e519 ("membarrier: Provide core serializing command, *_SYNC_CORE") Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Mathieu Desnoyers Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/d3e7197e034fa4852afcf370ca49c30496e58e40.1607058304.git.luto@kernel.org commit a493d1ca1a03b532871f1da27f8dbda2b28b04c4 Author: Andy Lutomirski Date: Thu Dec 3 21:07:03 2020 -0800 x86/membarrier: Get rid of a dubious optimization sync_core_before_usermode() had an incorrect optimization. If the kernel returns from an interrupt, it can get to usermode without IRET. It just has to schedule to a different task in the same mm and do SYSRET. Fortunately, there were no callers of sync_core_before_usermode() that could have had in_irq() or in_nmi() equal to true, because it's only ever called from the scheduler. While at it, clarify a related comment. Fixes: 70216e18e519 ("membarrier: Provide core serializing command, *_SYNC_CORE") Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Mathieu Desnoyers Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/5afc7632be1422f91eaf7611aaaa1b5b8580a086.1607058304.git.luto@kernel.org commit e8873c0afd34beb67ec492cd648dd0095b911f65 Author: Andy Shevchenko Date: Tue Dec 8 20:24:03 2020 +0200 pinctrl: intel: Actually disable Tx and Rx buffers on GPIO request Mistakenly the buffers (input and output) become enabled together for a short period of time during GPIO request. This is problematic, because instead of initial motive to disable them in the commit af7e3eeb84e2 ("pinctrl: intel: Disable input and output buffer when switching to GPIO"), the driven value on the pin, which might be used as an IRQ line, brings firmwares of some touch pads to an awkward state that needs a full power off to recover. Fix this, as stated in the culprit commit, by disabling the buffers. Fixes: af7e3eeb84e2 ("pinctrl: intel: Disable input and output buffer when switching to GPIO") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210497 Reported-by: Pierre-Louis Bossart Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Tested-by: Pierre-Louis Bossart Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20201208182403.40435-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit a68a0262abdaa251e12c53715f48e698a18ef402 Author: Minchan Kim Date: Tue Dec 8 20:57:18 2020 -0800 mm/madvise: remove racy mm ownership check Jann spotted the security hole due to race of mm ownership check. If the task is sharing the mm_struct but goes through execve() before mm_access(), it could skip process_madvise_behavior_valid check. That makes *any advice hint* to reach into the remote process. This patch removes the mm ownership check. With it, it will lose the ability that local process could give *any* advice hint with vector interface for some reason (e.g., performance). Since there is no concrete example in upstream yet, it would be better to remove the abiliity at this moment and need to review when such new advice comes up. Fixes: ecb8ac8b1f14 ("mm/madvise: introduce process_madvise() syscall: an external memory hinting API") Reported-by: Jann Horn Suggested-by: Jann Horn Signed-off-by: Minchan Kim Signed-off-by: Linus Torvalds commit 0e830d2872cf6e75ef6619edd23050ddf3673358 Author: Alex Deucher Date: Tue Dec 1 17:44:58 2020 -0500 drm/amdgpu/powerplay: parse fan table for CI asics Set up all the parameters required for SMU fan control if supported. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=201539 Acked-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit b62527005d46d52b4733cbc57f2f9b514b673ed9 Author: KP Singh Date: Tue Dec 8 22:49:00 2020 +0100 bpf, doc: Update KP's email in MAINTAINERS Helps me use a single account to sign off and send patches use appropriate email redirection without needing to update MAINTAINERS. Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201208214900.80684-1-kpsingh@kernel.org commit 72d05c00d7ecda85df29abd046da7e41cc071c17 Author: Eric Dumazet Date: Tue Dec 8 08:21:31 2020 -0800 tcp: select sane initial rcvq_space.space for big MSS Before commit a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB") small tcp_rmem[1] values were overridden by tcp_fixup_rcvbuf() to accommodate various MSS. This is no longer the case, and Hazem Mohamed Abuelfotoh reported that DRS would not work for MTU 9000 endpoints receiving regular (1500 bytes) frames. Root cause is that tcp_init_buffer_space() uses tp->rcv_wnd for upper limit of rcvq_space.space computation, while it can select later a smaller value for tp->rcv_ssthresh and tp->window_clamp. ss -temoi on receiver would show : skmem:(r0,rb131072,t0,tb46080,f0,w0,o0,bl0,d0) rcv_space:62496 rcv_ssthresh:56596 This means that TCP can not increase its window in tcp_grow_window(), and that DRS can never kick. Fix this by making sure that rcvq_space.space is not bigger than number of bytes that can be held in TCP receive queue. People unable/unwilling to change their kernel can work around this issue by selecting a bigger tcp_rmem[1] value as in : echo "4096 196608 6291456" >/proc/sys/net/ipv4/tcp_rmem Based on an initial report and patch from Hazem Mohamed Abuelfotoh https://lore.kernel.org/netdev/20201204180622.14285-1-abuehaze@amazon.com/ Fixes: a337531b942b ("tcp: up initial rmem to 128KB and SYN rwin to around 64KB") Fixes: 041a14d26715 ("tcp: start receiver buffer autotuning sooner") Reported-by: Hazem Mohamed Abuelfotoh Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit cc6596fc7295e9dcd78156ed42f9f8e1221f7530 Author: Zhang Changzhong Date: Tue Dec 8 09:53:42 2020 +0800 net: ll_temac: Fix potential NULL dereference in temac_probe() platform_get_resource() may fail and in this case a NULL dereference will occur. Fix it to use devm_platform_ioremap_resource() instead of calling platform_get_resource() and devm_ioremap(). This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, e1, e2; @@ res = \(platform_get_resource\|platform_get_resource_byname\)(pdev, t, n); + if (!res) + return -EINVAL; ... when != res == NULL e = devm_ioremap(e1, res->start, e2); Fixes: 8425c41d1ef7 ("net: ll_temac: Extend support to non-device-tree platforms") Signed-off-by: Zhang Changzhong Acked-by: Esben Haabendal Signed-off-by: David S. Miller commit 4cb682964706deffb4861f0a91329ab3a705039f Author: David Howells Date: Tue Dec 8 23:52:03 2020 +0000 afs: Fix memory leak when mounting with multiple source parameters There's a memory leak in afs_parse_source() whereby multiple source= parameters overwrite fc->source in the fs_context struct without freeing the previously recorded source. Fix this by only permitting a single source parameter and rejecting with an error all subsequent ones. This was caught by syzbot with the kernel memory leak detector, showing something like the following trace: unreferenced object 0xffff888114375440 (size 32): comm "repro", pid 5168, jiffies 4294923723 (age 569.948s) backtrace: slab_post_alloc_hook+0x42/0x79 __kmalloc_track_caller+0x125/0x16a kmemdup_nul+0x24/0x3c vfs_parse_fs_string+0x5a/0xa1 generic_parse_monolithic+0x9d/0xc5 do_new_mount+0x10d/0x15a do_mount+0x5f/0x8e __do_sys_mount+0xff/0x127 do_syscall_64+0x2d/0x3a entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 13fcc6837049 ("afs: Add fs_context support") Reported-by: syzbot+86dc6632faaca40133ab@syzkaller.appspotmail.com Signed-off-by: David Howells cc: Randy Dunlap Signed-off-by: Linus Torvalds commit 0398ba9e5a4b5675aa571e0445689d3c2e499c2d Author: Cengiz Can Date: Mon Dec 7 11:14:24 2020 +0300 net: tipc: prevent possible null deref of link `tipc_node_apply_property` does a null check on a `tipc_link_entry` pointer but also accesses the same pointer out of the null check block. This triggers a warning on Coverity Static Analyzer because we're implying that `e->link` can BE null. Move "Update MTU for node link entry" line into if block to make sure that we're not in a state that `e->link` is null. Signed-off-by: Cengiz Can Signed-off-by: David S. Miller commit d23e6297176453a247b83b3a476e33d75bf2968a Merge: db2082700a0c7 d0c6707ca4235 Author: Arnd Bergmann Date: Wed Dec 9 00:13:37 2020 +0100 Merge tag 'sunxi-fixes-for-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes A few more RGMII-ID fixes * tag 'sunxi-fixes-for-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: H5: NanoPi Neo Plus2: phy-mode rgmii-id arm64: dts: allwinner: A64 Sopine: phy-mode rgmii-id Link: https://lore.kernel.org/r/2a351c9c-470f-4c5e-ba37-80065ae0586d.lettre@localhost Signed-off-by: Arnd Bergmann commit c6f7e1510b872c281ff603a3108c084b6548d35c Merge: 1a0e1943d8798 6220e48d96405 Author: Linus Torvalds Date: Tue Dec 8 15:03:39 2020 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull sparc64 csum fix from Al Viro: "Fix for a brown paperbag regression in sparc64" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: [regression fix] really dumb fuckup in sparc64 __csum_partial_copy() changes commit 1a0e1943d8798cb3241fb5edb9a836af1611b60a Author: Linus Torvalds Date: Tue Dec 8 15:00:36 2020 -0800 Revert "scsi: megaraid_sas: Added support for shared host tagset for cpuhotplug" This reverts commit 103fbf8e4020845e4fcf63819288cedb092a3c91. It turns out that it causes long boot-time latencies (to the point of timeouts and failed boots). The cause is the increase in request queues, and a fix for that is queued up for 5.11, but we're reverting this commit that triggered the problem for now. Reported-and-tested-by: John Garry Reported-and-tested-by: Julia Lawall Reported-by: Qian Cai Acked-by: Jens Axboe Acked-by: Martin K. Petersen Link: https://lore.kernel.org/linux-scsi/fe3dff7dae4494e5a88caffbb4d877bbf472dceb.camel@redhat.com/ Link: https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2012081813310.2680@hadrien/ Link: https://lore.kernel.org/linux-block/20201203012638.543321-1-ming.lei@redhat.com/ Signed-off-by: Linus Torvalds commit 9756bb63e8d10aad720c378f3fd18e5fa1cc06ec Merge: 007ab5345545a f119cc9818eb3 Author: David S. Miller Date: Tue Dec 8 14:52:29 2020 -0800 Merge branch 'stmmac-fixes' Joakim Zhang says: ==================== patches for stmmac A patch set for stmmac, fix some driver issues. ChangeLogs: V1->V2: * add Fixes tag. * add patch 5/5 into this patch set. V2->V3: * rebase to latest net tree where fixes go. ==================== Signed-off-by: David S. Miller commit f119cc9818eb33b66e977ad3af75aef6500bbdc3 Author: Fugang Duan Date: Mon Dec 7 18:51:41 2020 +0800 net: stmmac: overwrite the dma_cap.addr64 according to HW design The current IP register MAC_HW_Feature1[ADDR64] only defines 32/40/64 bit width, but some SOCs support others like i.MX8MP support 34 bits but it maps to 40 bits width in MAC_HW_Feature1[ADDR64]. So overwrite dma_cap.addr64 according to HW real design. Fixes: 94abdad6974a ("net: ethernet: dwmac: add ethernet glue logic for NXP imx8 chip") Signed-off-by: Fugang Duan Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 5f58591323bf3f342920179f24515935c4b5fd60 Author: Fugang Duan Date: Mon Dec 7 18:51:40 2020 +0800 net: stmmac: delete the eee_ctrl_timer after napi disabled There have chance to re-enable the eee_ctrl_timer and fire the timer in napi callback after delete the timer in .stmmac_release(), which introduces to access eee registers in the timer function after clocks are disabled then causes system hang. Found this issue when do suspend/resume and reboot stress test. It is safe to delete the timer after napi disabled and disable lpi mode. Fixes: d765955d2ae0b ("stmmac: add the Energy Efficient Ethernet support") Signed-off-by: Fugang Duan Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 4ec236c7c51f89abb0224a4da4a6b77f9beb6600 Author: Fugang Duan Date: Mon Dec 7 18:51:39 2020 +0800 net: stmmac: free tx skb buffer in stmmac_resume() When do suspend/resume test, there have WARN_ON() log dump from stmmac_xmit() funciton, the code logic: entry = tx_q->cur_tx; first_entry = entry; WARN_ON(tx_q->tx_skbuff[first_entry]); In normal case, tx_q->tx_skbuff[txq->cur_tx] should be NULL because the skb should be handled and freed in stmmac_tx_clean(). But stmmac_resume() reset queue parameters like below, skb buffers may not be freed. tx_q->cur_tx = 0; tx_q->dirty_tx = 0; So free tx skb buffer in stmmac_resume() to avoid warning and memory leak. log: [ 46.139824] ------------[ cut here ]------------ [ 46.144453] WARNING: CPU: 0 PID: 0 at drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3235 stmmac_xmit+0x7a0/0x9d0 [ 46.154969] Modules linked in: crct10dif_ce vvcam(O) flexcan can_dev [ 46.161328] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G O 5.4.24-2.1.0+g2ad925d15481 #1 [ 46.170369] Hardware name: NXP i.MX8MPlus EVK board (DT) [ 46.175677] pstate: 80000005 (Nzcv daif -PAN -UAO) [ 46.180465] pc : stmmac_xmit+0x7a0/0x9d0 [ 46.184387] lr : dev_hard_start_xmit+0x94/0x158 [ 46.188913] sp : ffff800010003cc0 [ 46.192224] x29: ffff800010003cc0 x28: ffff000177e2a100 [ 46.197533] x27: ffff000176ef0840 x26: ffff000176ef0090 [ 46.202842] x25: 0000000000000000 x24: 0000000000000000 [ 46.208151] x23: 0000000000000003 x22: ffff8000119ddd30 [ 46.213460] x21: ffff00017636f000 x20: ffff000176ef0cc0 [ 46.218769] x19: 0000000000000003 x18: 0000000000000000 [ 46.224078] x17: 0000000000000000 x16: 0000000000000000 [ 46.229386] x15: 0000000000000079 x14: 0000000000000000 [ 46.234695] x13: 0000000000000003 x12: 0000000000000003 [ 46.240003] x11: 0000000000000010 x10: 0000000000000010 [ 46.245312] x9 : ffff00017002b140 x8 : 0000000000000000 [ 46.250621] x7 : ffff00017636f000 x6 : 0000000000000010 [ 46.255930] x5 : 0000000000000001 x4 : ffff000176ef0000 [ 46.261238] x3 : 0000000000000003 x2 : 00000000ffffffff [ 46.266547] x1 : ffff000177e2a000 x0 : 0000000000000000 [ 46.271856] Call trace: [ 46.274302] stmmac_xmit+0x7a0/0x9d0 [ 46.277874] dev_hard_start_xmit+0x94/0x158 [ 46.282056] sch_direct_xmit+0x11c/0x338 [ 46.285976] __qdisc_run+0x118/0x5f0 [ 46.289549] net_tx_action+0x110/0x198 [ 46.293297] __do_softirq+0x120/0x23c [ 46.296958] irq_exit+0xb8/0xd8 [ 46.300098] __handle_domain_irq+0x64/0xb8 [ 46.304191] gic_handle_irq+0x5c/0x148 [ 46.307936] el1_irq+0xb8/0x180 [ 46.311076] cpuidle_enter_state+0x84/0x360 [ 46.315256] cpuidle_enter+0x34/0x48 [ 46.318829] call_cpuidle+0x18/0x38 [ 46.322314] do_idle+0x1e0/0x280 [ 46.325539] cpu_startup_entry+0x24/0x40 [ 46.329460] rest_init+0xd4/0xe0 [ 46.332687] arch_call_rest_init+0xc/0x14 [ 46.336695] start_kernel+0x420/0x44c [ 46.340353] ---[ end trace bc1ee695123cbacd ]--- Fixes: 47dd7a540b8a0 ("net: add support for STMicroelectronics Ethernet controllers.") Signed-off-by: Fugang Duan Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 36d18b5664ef617ccf4da266291d2f2342fab89d Author: Fugang Duan Date: Mon Dec 7 18:51:38 2020 +0800 net: stmmac: start phylink instance before stmmac_hw_setup() Start phylink instance and resume back the PHY to supply RX clock to MAC before MAC layer initialization by calling .stmmac_hw_setup(), since DMA reset depends on the RX clock, otherwise DMA reset cost maximum timeout value then finally timeout. Fixes: 74371272f97f ("net: stmmac: Convert to phylink and remove phylib logic") Signed-off-by: Fugang Duan Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 9d14edfdeabf37d8d8f045e63e5873712aadcd6b Author: Fugang Duan Date: Mon Dec 7 18:51:37 2020 +0800 net: stmmac: increase the timeout for dma reset Current timeout value is not enough for gmac5 dma reset on imx8mp platform, increase the timeout range. Signed-off-by: Fugang Duan Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 6220e48d9640538ff700f2e7d24c2f9277555fd6 Author: Al Viro Date: Tue Dec 8 16:37:47 2020 -0500 [regression fix] really dumb fuckup in sparc64 __csum_partial_copy() changes ~0U is -1, not 1 Reported-by: Anatoly Pugachev Tested-by: Anatoly Pugachev Fixes: fdf8bee96f9a "sparc64: propagate the calling convention changes down to __csum_partial_copy_...()" X-brown-paperbag: yes Signed-off-by: Al Viro commit 42f1c27120906a54e73101a7d6a12f58813f6a9f Author: Pablo Neira Ayuso Date: Tue Dec 8 18:57:02 2020 +0100 netfilter: nftables: comment indirect serialization of commit_mutex with rtnl_mutex Add an explicit comment in the code to describe the indirect serialization of the holders of the commit_mutex with the rtnl_mutex. Commit 90d2723c6d4c ("netfilter: nf_tables: do not hold reference on netdevice from preparation phase") already describes this, but a comment in this case is better for reference. Reported-by: Vladimir Oltean Reviewed-by: Vladimir Oltean Signed-off-by: Pablo Neira Ayuso commit 7d8761ba27fcd9c761919beeaaceac06eed3ad74 Merge: cd796ed334503 4bbf439b09c5a Author: Linus Torvalds Date: Tue Dec 8 12:20:34 2020 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull seq_file fix from Al Viro: "This fixes a regression introduced in this cycle wrt iov_iter based variant for reading a seq_file" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix return values of seq_read_iter() commit 917d80d376ffbaa9725fde9e3c0282f63643f278 Author: Pablo Neira Ayuso Date: Tue Dec 8 18:25:53 2020 +0100 netfilter: nft_dynset: fix timeouts later than 23 days Use nf_msecs_to_jiffies64 and nf_jiffies64_to_msecs as provided by 8e1102d5a159 ("netfilter: nf_tables: support timeouts larger than 23 days"), otherwise ruleset listing breaks. Fixes: a8b1e36d0d1d ("netfilter: nft_dynset: fix element timeout for HZ != 1000") Signed-off-by: Pablo Neira Ayuso commit 007ab5345545aba2f9cbe4c096cc35d2fd3275ac Author: Jarod Wilson Date: Sat Dec 5 12:22:29 2020 -0500 bonding: fix feature flag setting at init time Don't try to adjust XFRM support flags if the bond device isn't yet registered. Bad things can currently happen when netdev_change_features() is called without having wanted_features fully filled in yet. This code runs both on post-module-load mode changes, as well as at module init time, and when run at module init time, it is before register_netdevice() has been called and filled in wanted_features. The empty wanted_features led to features also getting emptied out, which was definitely not the intended behavior, so prevent that from happening. Originally, I'd hoped to stop adjusting wanted_features at all in the bonding driver, as it's documented as being something only the network core should touch, but we actually do need to do this to properly update both the features and wanted_features fields when changing the bond type, or we get to a situation where ethtool sees: esp-hw-offload: off [requested on] I do think we should be using netdev_update_features instead of netdev_change_features here though, so we only send notifiers when the features actually changed. Fixes: a3b658cfb664 ("bonding: allow xfrm offload setup post-module-load") Reported-by: Ivan Vecera Suggested-by: Ivan Vecera Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Signed-off-by: Jarod Wilson Link: https://lore.kernel.org/r/20201205172229.576587-1-jarod@redhat.com Signed-off-by: Jakub Kicinski commit f26c08b444df833b19c00838a530d93963ce9cd0 Author: Hillf Danton Date: Tue Dec 8 08:54:26 2020 -0700 io_uring: fix file leak on error path of io ctx creation Put file as part of error handling when setting up io ctx to fix memory leaks like the following one. BUG: memory leak unreferenced object 0xffff888101ea2200 (size 256): comm "syz-executor355", pid 8470, jiffies 4294953658 (age 32.400s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 20 59 03 01 81 88 ff ff 80 87 a8 10 81 88 ff ff Y.............. backtrace: [<000000002e0a7c5f>] kmem_cache_zalloc include/linux/slab.h:654 [inline] [<000000002e0a7c5f>] __alloc_file+0x1f/0x130 fs/file_table.c:101 [<000000001a55b73a>] alloc_empty_file+0x69/0x120 fs/file_table.c:151 [<00000000fb22349e>] alloc_file+0x33/0x1b0 fs/file_table.c:193 [<000000006e1465bb>] alloc_file_pseudo+0xb2/0x140 fs/file_table.c:233 [<000000007118092a>] anon_inode_getfile fs/anon_inodes.c:91 [inline] [<000000007118092a>] anon_inode_getfile+0xaa/0x120 fs/anon_inodes.c:74 [<000000002ae99012>] io_uring_get_fd fs/io_uring.c:9198 [inline] [<000000002ae99012>] io_uring_create fs/io_uring.c:9377 [inline] [<000000002ae99012>] io_uring_setup+0x1125/0x1630 fs/io_uring.c:9411 [<000000008280baad>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 [<00000000685d8cf0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported-by: syzbot+71c4697e27c99fddcf17@syzkaller.appspotmail.com Fixes: 0f2122045b94 ("io_uring: don't rely on weak ->files references") Cc: Pavel Begunkov Signed-off-by: Hillf Danton Signed-off-by: Jens Axboe commit 932c60558109a9131e54dacfda6070147fd1cdfb Author: Andrii Nakryiko Date: Fri Dec 4 15:20:01 2020 -0800 tools/bpftool: Fix PID fetching with a lot of results In case of having so many PID results that they don't fit into a singe page (4096) bytes, bpftool will erroneously conclude that it got corrupted data due to 4096 not being a multiple of struct pid_iter_entry, so the last entry will be partially truncated. Fix this by sizing the buffer to fit exactly N entries with no truncation in the middle of record. Fixes: d53dee3fe013 ("tools/bpftool: Show info for processes holding BPF map/prog/link/btf FDs") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201204232002.3589803-1-andrii@kernel.org commit 7c5c15dffe1e3c42f44735ce9552afb7207f1584 Author: Chris Wilson Date: Fri Nov 27 10:25:40 2020 +0000 drm/i915/gt: Declare gen9 has 64 mocs entries! We checked the table size against a hardcoded number of entries, and that number was excluding the special mocs registers at the end. Fixes: 777a7717d60c ("drm/i915/gt: Program mocs:63 for cache eviction on gen9") Signed-off-by: Chris Wilson Cc: # v4.3+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201127102540.13117-1-chris@chris-wilson.co.uk (cherry picked from commit 444fbf5d7058099447c5366ba8bb60d610aeb44b) Signed-off-by: Rodrigo Vivi [backported and updated the Fixes sha] commit f6cbe49be65ed800863ac5ba695555057363f9c2 Author: Manasi Navare Date: Fri Dec 4 12:58:04 2020 -0800 drm/i915/display/dp: Compute the correct slice count for VDSC on DP This patch fixes the slice count computation algorithm for calculating the slice count based on Peak pixel rate and the max slice width allowed on the DSC engines. We need to ensure slice count > min slice count req as per DP spec based on peak pixel rate and that it is greater than min slice count based on the max slice width advertised by DPCD. So use max of these two. In the prev patch we were using min of these 2 causing it to violate the max slice width limitation causing a blank screen on 8K@60. Fixes: d9218c8f6cf4 ("drm/i915/dp: Add helpers for Compressed BPP and Slice Count for DSC") Cc: Ankit Nautiyal Cc: Jani Nikula Cc: # v5.0+ Signed-off-by: Manasi Navare Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20201204205804.25225-1-manasi.d.navare@intel.com (cherry picked from commit d371d6ea92ad2a47f42bbcaa786ee5f6069c9c14) Signed-off-by: Rodrigo Vivi commit 88c52d805eb61da99aa4607fb5131f41c0ff6bd4 Author: Colin Ian King Date: Fri Oct 2 18:03:54 2020 +0100 drm/i915: fix size_t greater or equal to zero comparison Currently the check that the unsigned size_t variable i is >= 0 is always true because the unsigned variable will never be negative, causing the loop to run forever. Fix this by changing the pre-decrement check to a zero check on i followed by a decrement of i. Addresses-Coverity: ("Unsigned compared against 0") Fixes: bfed6708d6c9 ("drm/i915: use vmap in shmem_pin_map") Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201002170354.94627-1-colin.king@canonical.com (cherry picked from commit e70956a2498dc81d8f2522cba074f55ae910e13c) Signed-off-by: Rodrigo Vivi commit 0fe8bf4d3edce7aad6c14b9d5d92ff54dc19f0ba Author: Chris Wilson Date: Fri Dec 4 15:12:32 2020 +0000 drm/i915/gt: Cancel the preemption timeout on responding to it We currently presume that the engine reset is successful, cancelling the expired preemption timer in the process. However, engine resets can fail, leaving the timeout still pending and we will then respond to the timeout again next time the tasklet fires. What we want is for the failed engine reset to be promoted to a full device reset, which is kicked by the heartbeat once the engine stops processing events. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1168 Fixes: 3a7a92aba8fb ("drm/i915/execlists: Force preemption") Signed-off-by: Chris Wilson Cc: # v5.5+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201204151234.19729-2-chris@chris-wilson.co.uk (cherry picked from commit d997e240ceecb4f732611985d3a939ad1bfc1893) Signed-off-by: Rodrigo Vivi commit 5419d93ffd774127b195b8543b063b2b4fa5aea9 Author: Chris Wilson Date: Fri Dec 4 15:12:31 2020 +0000 drm/i915/gt: Ignore repeated attempts to suspend request flow across reset Before reseting the engine, we suspend the execution of the guilty request, so that we can continue execution with a new context while we slowly compress the captured error state for the guilty context. However, if the reset fails, we will promptly attempt to reset the same request again, and discover the ongoing capture. Ignore the second attempt to suspend and capture the same request. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1168 Fixes: 32ff621fd744 ("drm/i915/gt: Allow temporary suspension of inflight requests") Signed-off-by: Chris Wilson Cc: # v5.7+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201204151234.19729-1-chris@chris-wilson.co.uk (cherry picked from commit b969540500bce60cf1cdfff5464388af32b9a553) Signed-off-by: Rodrigo Vivi commit 0e124e19ce52d20b28ee9f1d5cdb22e2106bfd29 Author: Chris Wilson Date: Thu Dec 3 10:34:32 2020 +0000 drm/i915/gem: Propagate error from cancelled submit due to context closure In the course of discovering and closing many races with context closure and execbuf submission, since commit 61231f6bd056 ("drm/i915/gem: Check that the context wasn't closed during setup") we started checking that the context was not closed by another userspace thread during the execbuf ioctl. In doing so we cancelled the inflight request (by telling it to be skipped), but kept reporting success since we do submit a request, albeit one that doesn't execute. As the error is known before we return from the ioctl, we can report the error we detect immediately, rather than leave it on the fence status. With the immediate propagation of the error, it is easier for userspace to handle. Fixes: 61231f6bd056 ("drm/i915/gem: Check that the context wasn't closed during setup") Testcase: igt/gem_ctx_exec/basic-close-race Signed-off-by: Chris Wilson Cc: # v5.7+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201203103432.31526-1-chris@chris-wilson.co.uk (cherry picked from commit ba38b79eaeaeed29d2383f122d5c711ebf5ed3d1) Signed-off-by: Rodrigo Vivi commit 352ded44fbd8622670ff95e90ca732a5b036ce79 Author: Dan Carpenter Date: Thu Dec 3 11:45:17 2020 +0300 drm/i915/gem: Check the correct variable in selftest There is a copy and paste bug in this code. It's supposed to check "obj2" instead of checking "obj" a second time. Fixes: 80f0b679d6f0 ("drm/i915: Add an implementation for i915_gem_ww_ctx locking, v2.") Signed-off-by: Dan Carpenter Reviewed-by: Chris Wilson Reviewed-by: Andi Shyti Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/8ilneOcJAjwqU4t@mwand (cherry picked from commit 14f2d7604f7ce4cb3d303aea17292d119dfafa75) Signed-off-by: Rodrigo Vivi commit cc00bcaa589914096edef7fb87ca5cee4a166b5c Author: Subash Abhinov Kasiviswanathan Date: Wed Nov 25 11:27:22 2020 -0700 netfilter: x_tables: Switch synchronization to RCU When running concurrent iptables rules replacement with data, the per CPU sequence count is checked after the assignment of the new information. The sequence count is used to synchronize with the packet path without the use of any explicit locking. If there are any packets in the packet path using the table information, the sequence count is incremented to an odd value and is incremented to an even after the packet process completion. The new table value assignment is followed by a write memory barrier so every CPU should see the latest value. If the packet path has started with the old table information, the sequence counter will be odd and the iptables replacement will wait till the sequence count is even prior to freeing the old table info. However, this assumes that the new table information assignment and the memory barrier is actually executed prior to the counter check in the replacement thread. If CPU decides to execute the assignment later as there is no user of the table information prior to the sequence check, the packet path in another CPU may use the old table information. The replacement thread would then free the table information under it leading to a use after free in the packet processing context- Unable to handle kernel NULL pointer dereference at virtual address 000000000000008e pc : ip6t_do_table+0x5d0/0x89c lr : ip6t_do_table+0x5b8/0x89c ip6t_do_table+0x5d0/0x89c ip6table_filter_hook+0x24/0x30 nf_hook_slow+0x84/0x120 ip6_input+0x74/0xe0 ip6_rcv_finish+0x7c/0x128 ipv6_rcv+0xac/0xe4 __netif_receive_skb+0x84/0x17c process_backlog+0x15c/0x1b8 napi_poll+0x88/0x284 net_rx_action+0xbc/0x23c __do_softirq+0x20c/0x48c This could be fixed by forcing instruction order after the new table information assignment or by switching to RCU for the synchronization. Fixes: 80055dab5de0 ("netfilter: x_tables: make xt_replace_table wait until old rules are not used anymore") Reported-by: Sean Tranchetti Reported-by: kernel test robot Suggested-by: Florian Westphal Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: Pablo Neira Ayuso commit 7aeb353802611a8e655e019f09a370ff682af1a6 Author: Andrew Jeffery Date: Thu Nov 26 17:03:37 2020 +1030 pinctrl: aspeed: Fix GPIO requests on pass-through banks Commit 6726fbff19bf ("pinctrl: aspeed: Fix GPI only function problem.") fixes access to GPIO banks T and U on the AST2600. Both banks contain input-only pins and the GPIO pin function is named GPITx and GPIUx respectively. Unfortunately the fix had a negative impact on GPIO banks D and E for the AST2400 and AST2500 where the GPIO pass-through functions take similar "GPI"-style names. The net effect on the older SoCs was that when the GPIO subsystem requested a pin in banks D or E be muxed for GPIO, they were instead muxed for pass-through mode. Mistakenly muxing pass-through mode e.g. breaks booting the host on IBM's Witherspoon (AC922) platform where GPIOE0 is used for FSI. Further exploit the names in the provided expression structure to differentiate pass-through from pin-specific GPIO modes. This follow-up fix gives the expected behaviour for the following tests: Witherspoon BMC (AST2500): 1. Power-on the Witherspoon host 2. Request GPIOD1 be muxed via /sys/class/gpio/export 3. Request GPIOE1 be muxed via /sys/class/gpio/export 4. Request the balls for GPIOs E2 and E3 be muxed as GPIO pass-through ("GPIE2" mode) via a pinctrl hog in the devicetree Rainier BMC (AST2600): 5. Request GPIT0 be muxed via /sys/class/gpio/export 6. Request GPIU0 be muxed via /sys/class/gpio/export Together the tests demonstrate that all three pieces of functionality (general GPIOs via 1, 2 and 3, input-only GPIOs via 5 and 6, pass-through mode via 4) operate as desired across old and new SoCs. Fixes: 9b92f5c51e9a ("pinctrl: aspeed: Fix GPI only function problem.") Signed-off-by: Andrew Jeffery Tested-by: Joel Stanley Reviewed-by: Joel Stanley Cc: Billy Tsai Cc: Joel Stanley Link: https://lore.kernel.org/r/20201126063337.489927-1-andrew@aj.id.au Signed-off-by: Linus Walleij commit 3d1387b3b8f6cc1ccdbb5f0d7af24df02f4baef9 Author: Mauro Carvalho Chehab Date: Tue Dec 8 07:57:13 2020 +0100 media: vidtv: fix some warnings As reported by sparse: drivers/media/test-drivers/vidtv/vidtv_ts.h:47:47: warning: array of flexible structures drivers/media/test-drivers/vidtv/vidtv_channel.c:458:54: warning: incorrect type in argument 3 (different base types) drivers/media/test-drivers/vidtv/vidtv_channel.c:458:54: expected unsigned short [usertype] service_id drivers/media/test-drivers/vidtv/vidtv_channel.c:458:54: got restricted __be16 [usertype] service_id drivers/media/test-drivers/vidtv/vidtv_s302m.c:471 vidtv_s302m_encoder_init() warn: possible memory leak of 'e' Address such warnings. Signed-off-by: Mauro Carvalho Chehab commit 819f56bad110cb27a8be3232467986e2baebe069 Merge: 82ca4c922b899 48f486e13ffdb Author: Jakub Kicinski Date: Mon Dec 7 18:29:53 2020 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2020-12-07 1) Sysbot reported fixes for the new 64/32 bit compat layer. From Dmitry Safonov. 2) Fix a memory leak in xfrm_user_policy that was introduced by adding the 64/32 bit compat layer. From Yu Kuai. * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec: net: xfrm: fix memory leak in xfrm_user_policy() xfrm/compat: Don't allocate memory with __GFP_ZERO xfrm/compat: memset(0) 64-bit padding at right place xfrm/compat: Translate by copying XFRMA_UNSPEC attribute ==================== Link: https://lore.kernel.org/r/20201207093937.2874932-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit 359db63378eded1ee9c8c9ad72245f9b0158ae95 Author: Xiang Chen Date: Mon Dec 7 21:30:55 2020 +0800 scsi: hisi_sas: Select a suitable queue for internal I/Os For when managed interrupts are used (and shost->nr_hw_queues is set), a fixed queue - set per-device - is still used for internal I/Os. If all the CPUs mapped to that queue are offlined, then the completions for that queue are not serviced and any internal I/Os will time out. Fix by selecting a queue for internal I/Os from the queue mapped from the current CPU in this scenario. This is still not ideal as it does not deal with CPU hotplug for inflight internal I/Os, and needs proper support from [0]. [0] https://lore.kernel.org/linux-scsi/20200703130122.111448-1-hare@suse.de/T/#m7d77d049b18f33a24ef206af69ebb66d07440556 Link: https://lore.kernel.org/r/1607347855-59091-1-git-send-email-john.garry@huawei.com Fixes: 8d98416a55eb ("scsi: hisi_sas: Switch v3 hw to MQ") Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 673235f915318ced5d7ec4b2bfd8cb909e6a4a55 Author: Ming Lei Date: Wed Dec 2 18:04:19 2020 +0800 scsi: core: Fix race between handling STS_RESOURCE and completion When queuing I/O request to LLD, STS_RESOURCE may be returned because: - Host is in recovery or blocked - Target queue throttling or target is blocked - LLD rejection In these scenarios BLK_STS_DEV_RESOURCE is returned to the block layer to avoid an unnecessary re-run of the queue. However, all of the requests queued to this SCSI device may complete immediately after reading 'sdev->device_busy' and BLK_STS_DEV_RESOURCE is returned to block layer. In that case the current I/O won't get a chance to get queued since it is invisible at that time for both scsi_run_queue_async() and blk-mq's RESTART. Fix the issue by not returning BLK_STS_DEV_RESOURCE in this situation. Link: https://lore.kernel.org/r/20201202100419.525144-1-ming.lei@redhat.com Fixes: 86ff7c2a80cd ("blk-mq: introduce BLK_STS_DEV_RESOURCE") Cc: Hannes Reinecke Cc: Sumit Saxena Cc: Kashyap Desai Cc: Bart Van Assche Cc: Ewan Milne Cc: Long Li Reported-by: John Garry Tested-by: "chenxiang (M)" Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 82ca4c922b8992013a238d65cf4e60cc33e12f36 Author: Martin Blumenstingl Date: Sat Dec 5 22:32:07 2020 +0100 net: stmmac: dwmac-meson8b: fix mask definition of the m250_sel mux The m250_sel mux clock uses bit 4 in the PRG_ETH0 register. Fix this by shifting the PRG_ETH0_CLK_M250_SEL_MASK accordingly as the "mask" in struct clk_mux expects the mask relative to the "shift" field in the same struct. While here, get rid of the PRG_ETH0_CLK_M250_SEL_SHIFT macro and use __ffs() to determine it from the existing PRG_ETH0_CLK_M250_SEL_MASK macro. Fixes: 566e8251625304 ("net: stmmac: add a glue driver for the Amlogic Meson 8b / GXBB DWMAC") Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet Link: https://lore.kernel.org/r/20201205213207.519341-1-martin.blumenstingl@googlemail.com Signed-off-by: Jakub Kicinski commit bbef72c630b522a9ffbf62dae19b59c880da6ea1 Author: Christophe JAILLET Date: Sun Dec 6 16:13:39 2020 +0100 dpaa2-mac: Add a missing of_node_put after of_device_is_available Add an 'of_node_put()' call when a tested device node is not available. Fixes: 94ae899b2096 ("dpaa2-mac: add PCS support through the Lynx module") Signed-off-by: Christophe JAILLET Reviewed-by: Ioana Ciornei Link: https://lore.kernel.org/r/20201206151339.44306-1-christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit f55628b3e7648198e9c072b52080c5dea8678adf Author: Jianguo Wu Date: Sat Dec 5 15:56:33 2020 +0800 mptcp: print new line in mptcp_seq_show() if mptcp isn't in use When do cat /proc/net/netstat, the output isn't append with a new line, it looks like this: [root@localhost ~]# cat /proc/net/netstat ... MPTcpExt: 0 0 0 0 0 0 0 0 0 0 0 0 0[root@localhost ~]# This is because in mptcp_seq_show(), if mptcp isn't in use, net->mib.mptcp_statistics is NULL, so it just puts all 0 after "MPTcpExt:", and return, forgot the '\n'. After this patch: [root@localhost ~]# cat /proc/net/netstat ... MPTcpExt: 0 0 0 0 0 0 0 0 0 0 0 0 0 [root@localhost ~]# Fixes: fc518953bc9c8d7d ("mptcp: add and use MIB counter infrastructure") Signed-off-by: Jianguo Wu Acked-by: Florian Westphal Link: https://lore.kernel.org/r/142e2fd9-58d9-bb13-fb75-951cccc2331e@163.com Signed-off-by: Jakub Kicinski commit 851d0a73c90e6c8c63fef106c6c1e73df7e05d9d Author: Joseph Huang Date: Fri Dec 4 18:56:28 2020 -0500 bridge: Fix a deadlock when enabling multicast snooping When enabling multicast snooping, bridge module deadlocks on multicast_lock if 1) IPv6 is enabled, and 2) there is an existing querier on the same L2 network. The deadlock was caused by the following sequence: While holding the lock, br_multicast_open calls br_multicast_join_snoopers, which eventually causes IP stack to (attempt to) send out a Listener Report (in igmp6_join_group). Since the destination Ethernet address is a multicast address, br_dev_xmit feeds the packet back to the bridge via br_multicast_rcv, which in turn calls br_multicast_add_group, which then deadlocks on multicast_lock. The fix is to move the call br_multicast_join_snoopers outside of the critical section. This works since br_multicast_join_snoopers only deals with IP and does not modify any multicast data structures of the bridge, so there's no need to hold the lock. Steps to reproduce: 1. sysctl net.ipv6.conf.all.force_mld_version=1 2. have another querier 3. ip link set dev bridge type bridge mcast_snooping 0 && \ ip link set dev bridge type bridge mcast_snooping 1 < deadlock > A typical call trace looks like the following: [ 936.251495] _raw_spin_lock+0x5c/0x68 [ 936.255221] br_multicast_add_group+0x40/0x170 [bridge] [ 936.260491] br_multicast_rcv+0x7ac/0xe30 [bridge] [ 936.265322] br_dev_xmit+0x140/0x368 [bridge] [ 936.269689] dev_hard_start_xmit+0x94/0x158 [ 936.273876] __dev_queue_xmit+0x5ac/0x7f8 [ 936.277890] dev_queue_xmit+0x10/0x18 [ 936.281563] neigh_resolve_output+0xec/0x198 [ 936.285845] ip6_finish_output2+0x240/0x710 [ 936.290039] __ip6_finish_output+0x130/0x170 [ 936.294318] ip6_output+0x6c/0x1c8 [ 936.297731] NF_HOOK.constprop.0+0xd8/0xe8 [ 936.301834] igmp6_send+0x358/0x558 [ 936.305326] igmp6_join_group.part.0+0x30/0xf0 [ 936.309774] igmp6_group_added+0xfc/0x110 [ 936.313787] __ipv6_dev_mc_inc+0x1a4/0x290 [ 936.317885] ipv6_dev_mc_inc+0x10/0x18 [ 936.321677] br_multicast_open+0xbc/0x110 [bridge] [ 936.326506] br_multicast_toggle+0xec/0x140 [bridge] Fixes: 4effd28c1245 ("bridge: join all-snoopers multicast address") Signed-off-by: Joseph Huang Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20201204235628.50653-1-Joseph.Huang@garmin.com Signed-off-by: Jakub Kicinski commit eb96b686fc2c601e78903cc61b6cf4588ddde013 Author: Claudiu Manoil Date: Fri Dec 4 19:15:05 2020 +0200 enetc: Fix reporting of h/w packet counters Noticed some inconsistencies in packet statistics reporting. This patch adds the missing Tx packet counter registers to ethtool reporting and fixes the information strings for a few of them. Fixes: 16eb4c85c964 ("enetc: Add ethtool statistics") Signed-off-by: Claudiu Manoil Link: https://lore.kernel.org/r/20201204171505.21389-1-claudiu.manoil@nxp.com Signed-off-by: Jakub Kicinski commit 5eedf9fe8db23313df104576845cec5f481b9b60 Author: Christophe Leroy Date: Mon Dec 7 16:58:01 2020 +0000 powerpc/mm: Fix KUAP warning by providing copy_from_kernel_nofault_allowed() Since commit c33165253492 ("powerpc: use non-set_fs based maccess routines"), userspace access is not granted anymore when using copy_from_kernel_nofault() However, kthread_probe_data() uses copy_from_kernel_nofault() to check validity of pointers. When the pointer is NULL, it points to userspace, leading to a KUAP fault and triggering the following big hammer warning many times when you request a sysrq "show task": [ 1117.202054] ------------[ cut here ]------------ [ 1117.202102] Bug: fault blocked by AP register ! [ 1117.202261] WARNING: CPU: 0 PID: 377 at arch/powerpc/include/asm/nohash/32/kup-8xx.h:66 do_page_fault+0x4a8/0x5ec [ 1117.202310] Modules linked in: [ 1117.202428] CPU: 0 PID: 377 Comm: sh Tainted: G W 5.10.0-rc5-01340-g83f53be2de31-dirty #4175 [ 1117.202499] NIP: c0012048 LR: c0012048 CTR: 00000000 [ 1117.202573] REGS: cacdbb88 TRAP: 0700 Tainted: G W (5.10.0-rc5-01340-g83f53be2de31-dirty) [ 1117.202625] MSR: 00021032 CR: 24082222 XER: 20000000 [ 1117.202899] [ 1117.202899] GPR00: c0012048 cacdbc40 c2929290 00000023 c092e554 00000001 c09865e8 c092e640 [ 1117.202899] GPR08: 00001032 00000000 00000000 00014efc 28082224 100d166a 100a0920 00000000 [ 1117.202899] GPR16: 100cac0c 100b0000 1080c3fc 1080d685 100d0000 100d0000 00000000 100a0900 [ 1117.202899] GPR24: 100d0000 c07892ec 00000000 c0921510 c21f4440 0000005c c0000000 cacdbc80 [ 1117.204362] NIP [c0012048] do_page_fault+0x4a8/0x5ec [ 1117.204461] LR [c0012048] do_page_fault+0x4a8/0x5ec [ 1117.204509] Call Trace: [ 1117.204609] [cacdbc40] [c0012048] do_page_fault+0x4a8/0x5ec (unreliable) [ 1117.204771] [cacdbc70] [c00112f0] handle_page_fault+0x8/0x34 [ 1117.204911] --- interrupt: 301 at copy_from_kernel_nofault+0x70/0x1c0 [ 1117.204979] NIP: c010dbec LR: c010dbac CTR: 00000001 [ 1117.205053] REGS: cacdbc80 TRAP: 0301 Tainted: G W (5.10.0-rc5-01340-g83f53be2de31-dirty) [ 1117.205104] MSR: 00009032 CR: 28082224 XER: 00000000 [ 1117.205416] DAR: 0000005c DSISR: c0000000 [ 1117.205416] GPR00: c0045948 cacdbd38 c2929290 00000001 00000017 00000017 00000027 0000000f [ 1117.205416] GPR08: c09926ec 00000000 00000000 3ffff000 24082224 [ 1117.206106] NIP [c010dbec] copy_from_kernel_nofault+0x70/0x1c0 [ 1117.206202] LR [c010dbac] copy_from_kernel_nofault+0x30/0x1c0 [ 1117.206258] --- interrupt: 301 [ 1117.206372] [cacdbd38] [c004bbb0] kthread_probe_data+0x44/0x70 (unreliable) [ 1117.206561] [cacdbd58] [c0045948] print_worker_info+0xe0/0x194 [ 1117.206717] [cacdbdb8] [c00548ac] sched_show_task+0x134/0x168 [ 1117.206851] [cacdbdd8] [c005a268] show_state_filter+0x70/0x100 [ 1117.206989] [cacdbe08] [c039baa0] sysrq_handle_showstate+0x14/0x24 [ 1117.207122] [cacdbe18] [c039bf18] __handle_sysrq+0xac/0x1d0 [ 1117.207257] [cacdbe48] [c039c0c0] write_sysrq_trigger+0x4c/0x74 [ 1117.207407] [cacdbe68] [c01fba48] proc_reg_write+0xb4/0x114 [ 1117.207550] [cacdbe88] [c0179968] vfs_write+0x12c/0x478 [ 1117.207686] [cacdbf08] [c0179e60] ksys_write+0x78/0x128 [ 1117.207826] [cacdbf38] [c00110d0] ret_from_syscall+0x0/0x34 [ 1117.207938] --- interrupt: c01 at 0xfd4e784 [ 1117.208008] NIP: 0fd4e784 LR: 0fe0f244 CTR: 10048d38 [ 1117.208083] REGS: cacdbf48 TRAP: 0c01 Tainted: G W (5.10.0-rc5-01340-g83f53be2de31-dirty) [ 1117.208134] MSR: 0000d032 CR: 44002222 XER: 00000000 [ 1117.208470] [ 1117.208470] GPR00: 00000004 7fc34090 77bfb4e0 00000001 1080fa40 00000002 7400000f fefefeff [ 1117.208470] GPR08: 7f7f7f7f 10048d38 1080c414 7fc343c0 00000000 [ 1117.209104] NIP [0fd4e784] 0xfd4e784 [ 1117.209180] LR [0fe0f244] 0xfe0f244 [ 1117.209236] --- interrupt: c01 [ 1117.209274] Instruction dump: [ 1117.209353] 714a4000 418200f0 73ca0001 40820084 73ca0032 408200f8 73c90040 4082ff60 [ 1117.209727] 0fe00000 3c60c082 386399f4 48013b65 <0fe00000> 80010034 3860000b 7c0803a6 [ 1117.210102] ---[ end trace 1927c0323393af3e ]--- To avoid that, copy_from_kernel_nofault_allowed() is used to check whether the address is a valid kernel address. But the default version of it returns true for any address. Provide a powerpc version of copy_from_kernel_nofault_allowed() that returns false when the address is below TASK_USER_MAX, so that copy_from_kernel_nofault() will return -ERANGE. Fixes: c33165253492 ("powerpc: use non-set_fs based maccess routines") Reported-by: Qian Cai Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/18bcb456d32a3e74f5ae241fd6f1580c092d07f5.1607360230.git.christophe.leroy@csgroup.eu commit ceabbf94c317c6175dee6e91805fca4a6353745a Author: Geert Uytterhoeven Date: Mon Nov 30 09:57:43 2020 +0100 clk: renesas: r9a06g032: Drop __packed for portability The R9A06G032 clock driver uses an array of packed structures to reduce kernel size. However, this array contains pointers, which are no longer aligned naturally, and cannot be relocated on PPC64. Hence when compile-testing this driver on PPC64 with CONFIG_RELOCATABLE=y (e.g. PowerPC allyesconfig), the following warnings are produced: WARNING: 136 bad relocations c000000000616be3 R_PPC64_UADDR64 .rodata+0x00000000000cf338 c000000000616bfe R_PPC64_UADDR64 .rodata+0x00000000000cf370 ... Fix this by dropping the __packed attribute from the r9a06g032_clkdesc definition, trading a small size increase for portability. This increases the 156-entry clock table by 1 byte per entry, but due to the compiler generating more efficient code for unpacked accesses, the net size increase is only 76 bytes (gcc 9.3.0 on arm32). Reported-by: Stephen Rothwell Fixes: 4c3d88526eba2143 ("clk: renesas: Renesas R9A06G032 clock driver") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201130085743.1656317-1-geert+renesas@glider.be Tested-by: Stephen Rothwell # PowerPC allyesconfig build Acked-by: Stephen Boyd Signed-off-by: Stephen Boyd commit 6247e31b75308c51476e157c9964823aeefbf5dc Author: Dong Aisheng Date: Mon Nov 30 16:46:24 2020 +0800 clk: imx: scu: fix MXC_CLK_SCU module build break This issue can be reproduced by having a kernel config with CONFIG_IMX_MBOX=m and CONFIG_MXC_CLK_SCU=m. It's caused by the Makefile wanting to build clk-scu.o and clk-imx8qxp.o as different targets but that doesn't work (e.g. MXC_CLK_SCU = y while CLK_IMX8QXP = n) "obj-$(CONFIG_MXC_CLK_SCU) += clk-imx-scu.o clk-imx-lpcg-scu.o clk-imx-scu-$(CONFIG_CLK_IMX8QXP) += clk-scu.o clk-imx8qxp.o" Having MXC_CLK_SCU=y/m while CLK_IMX8QXP=n will cause a linker problem like below: LD [M] drivers/clk/imx/clk-imx-scu.o arm-poky-linux-gnueabi-ld: no input files Make MXC_CLK_SCU be un-selectable by users so it can only be selected by the CLK_IMX8QXP option, ensuring the two symbols are built together. Drop COMPILE_TEST too because this option isn't selectable anymore. We can remove it from MXC_CLK_SCU because CLK_IMX8QXP selects MXC_CLK_SCU which already has COMPILE_TEST. Fixes: e0d0d4d86c766 ("clk: imx8qxp: Support building i.MX8QXP clock driver as module") Acked-by: Sebastian Andrzej Siewior Signed-off-by: Dong Aisheng Link: https://lore.kernel.org/r/20201130084624.21113-1-aisheng.dong@nxp.com [sboyd@kernel.org: Rework commit text] Signed-off-by: Stephen Boyd commit e432c04c17993011b2a2f59dcb5738e604bd552e Author: Gal Pressman Date: Sun Dec 6 17:32:38 2020 +0200 RDMA/core: Fix empty gid table for non IB/RoCE devices The query_gid_table ioctl skips non IB/RoCE ports, which as a result returns an empty gid table for devices such as EFA which have a GID table, but are not IB/RoCE. Fixes: c4b4d548fabc ("RDMA/core: Introduce new GID table query API") Link: https://lore.kernel.org/r/20201206153238.34878-1-galpress@amazon.com Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit e3366884b383073a7edc1bad9634412ae0a22d4e Author: Cong Wang Date: Fri Dec 4 23:59:46 2020 -0800 lwt_bpf: Replace preempt_disable() with migrate_disable() migrate_disable() is just a wrapper for preempt_disable() in non-RT kernel. It is safe to replace it, and RT kernel will benefit. Note that it is introduced since Feb 2020. Suggested-by: Alexei Starovoitov Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201205075946.497763-2-xiyou.wangcong@gmail.com commit d9054a1ff585ba01029584ab730efc794603d68f Author: Dongdong Wang Date: Fri Dec 4 23:59:45 2020 -0800 lwt: Disable BH too in run_lwt_bpf() The per-cpu bpf_redirect_info is shared among all skb_do_redirect() and BPF redirect helpers. Callers on RX path are all in BH context, disabling preemption is not sufficient to prevent BH interruption. In production, we observed strange packet drops because of the race condition between LWT xmit and TC ingress, and we verified this issue is fixed after we disable BH. Although this bug was technically introduced from the beginning, that is commit 3a0af8fd61f9 ("bpf: BPF for lightweight tunnel infrastructure"), at that time call_rcu() had to be call_rcu_bh() to match the RCU context. So this patch may not work well before RCU flavor consolidation has been completed around v5.0. Update the comments above the code too, as call_rcu() is now BH friendly. Signed-off-by: Dongdong Wang Signed-off-by: Alexei Starovoitov Reviewed-by: Cong Wang Link: https://lore.kernel.org/bpf/20201205075946.497763-1-xiyou.wangcong@gmail.com commit cd796ed3345030aa1bb332fe5c793b3dddaf56e7 Merge: 0477e92881850 bcee527895880 Author: Linus Torvalds Date: Mon Dec 7 11:20:26 2020 -0800 Merge tag 'trace-v5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Fix userstacktrace option for instances While writing an application that requires user stack trace option to work in instances, I found that the instance option has a bug that makes it a nop. The check for performing the user stack trace in an instance, checks the top level options (not the instance options) to determine if a user stack trace should be performed or not. This is not only incorrect, but also confusing for users. It confused me for a bit!" * tag 'trace-v5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix userstacktrace option for instances commit e8c954df234145c5765870382c2bc630a48beec9 Author: Pavel Begunkov Date: Sun Dec 6 22:22:46 2020 +0000 io_uring: fix mis-seting personality's creds After io_identity_cow() copies an work.identity it wants to copy creds to the new just allocated id, not the old one. Otherwise it's akin to req->work.identity->creds = req->work.identity->creds. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit db2082700a0c7974c3a7787d50abff34b2695b4b Author: Krzysztof Kozlowski Date: Tue Dec 1 23:15:16 2020 +0200 MAINTAINERS: add a limited ARM and ARM64 SoC entry It is expected for ARM and ARM64 SoC related code to go through sub-architecture maintainers. Their addresses were therefore not documented to push patch traffic through sub-architecture maintainers. However when patches touch generic code, e.g. multi_v7_defconfig, the patch might not be picked up by them and instead should go to the SoC maintainers - Arnd and Olof. Add a minimal maintainer's entry for SoC covering only Makefile, so it will not appear on most of submissions (except new devicetree boards). It will though serve as a documentation and reference for cases when submitter does not know where to send his SoC-related patches. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201201211516.24921-2-krzk@kernel.org' Signed-off-by: Arnd Bergmann commit c99055ec2c3974386f36eb648af77a8dbe887ca9 Author: Krzysztof Kozlowski Date: Tue Dec 1 23:15:15 2020 +0200 MAINTAINERS: correct SoC Git address (formerly: arm-soc) The SoC Git was moved from arm/arm-soc.git to soc/soc.git. Correct the ARM Sub-architectures entry. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201201211516.24921-1-krzk@kernel.org' Signed-off-by: Arnd Bergmann commit 9280f726097b436c8c907825131cd346d7eb0c0f Author: Arnd Bergmann Date: Fri Dec 4 00:18:40 2020 +0100 ARM: keystone: remove SECTION_SIZE_BITS/MAX_PHYSMEM_BITS These definitions are evidently left over from the days when sparsemem settings were platform specific. This was no longer the case when the platform got merged. There was no warning in the past, but now the asm/sparsemem.h header ends up being included indirectly, causing this warning: In file included from /git/arm-soc/arch/arm/mach-keystone/keystone.c:24: arch/arm/mach-keystone/memory.h:10:9: warning: 'SECTION_SIZE_BITS' macro redefined [-Wmacro-redefined] #define SECTION_SIZE_BITS 34 ^ arch/arm/include/asm/sparsemem.h:23:9: note: previous definition is here #define SECTION_SIZE_BITS 28 ^ Clearly the definitions never had any effect here, so remove them. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201203231847.1484900-1-arnd@kernel.org' Signed-off-by: Arnd Bergmann commit 5e2e740247791e9c0663d8c41d04b52f1db22037 Merge: b11ddaac893ad 19ba8fb810c60 Author: Arnd Bergmann Date: Mon Dec 7 15:28:59 2020 +0100 Merge tag 'imx-fixes-5.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.10, round 5: - Fix a regression on SoC revision detection with ANATOP, that is introduced by commit 4a4fb66119eb ("ARM: imx: Add missing of_node_put()"). - Drop PAD_GPIO_6 from imx6qdl-wandboard ENET pin group, as the pin is used by camera sensor now. - Fix I2C3_SCL pinmux on imx6qdl-kontron-samx6i board, so that SoM EEPROM can be accessed. * tag 'imx-fixes-5.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx6qdl-kontron-samx6i: fix I2C_PM scl pin ARM: dts: imx6qdl-wandboard-revd1: Remove PAD_GPIO_6 from enetgrp ARM: imx: Use correct SRC base address Link: https://lore.kernel.org/r/20201201091820.GW4072@dragon Signed-off-by: Arnd Bergmann commit b11ddaac893ada234895bcfc3be3358957e80717 Merge: 0477e92881850 a7361b9c46159 Author: Arnd Bergmann Date: Mon Dec 7 15:28:27 2020 +0100 Merge tag 'sunxi-fixes-for-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes A few more RGMII-ID fixes, and a bunch of other more random fixes * tag 'sunxi-fixes-for-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun7i: pcduino3-nano: enable RGMII RX/TX delay on PHY ARM: dts: sun8i: v3s: fix GIC node memory range ARM: dts: sun8i: v40: bananapi-m2-berry: Fix ethernet node ARM: dts: sun8i: r40: bananapi-m2-berry: Fix dcdc1 regulator ARM: dts: sun7i: bananapi: Enable RGMII RX/TX delay on Ethernet PHY ARM: dts: s3: pinecube: align compatible property to other S3 boards ARM: sunxi: Add machine match for the Allwinner V3 SoC arm64: dts: allwinner: h6: orangepi-one-plus: Fix ethernet Link: https://lore.kernel.org/r/1280f1de-1b6d-4cc2-8448-e5a9096a41e8.lettre@localhost Signed-off-by: Arnd Bergmann commit 4165bf015ba9454f45beaad621d16c516d5c5afe Author: Suravee Suthikulpanit Date: Mon Dec 7 03:19:20 2020 -0600 iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs According to the AMD IOMMU spec, the commit 73db2fc595f3 ("iommu/amd: Increase interrupt remapping table limit to 512 entries") also requires the interrupt table length (IntTabLen) to be set to 9 (power of 2) in the device table mapping entry (DTE). Fixes: 73db2fc595f3 ("iommu/amd: Increase interrupt remapping table limit to 512 entries") Reported-by: Jerry Snitselaar Signed-off-by: Suravee Suthikulpanit Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20201207091920.3052-1-suravee.suthikulpanit@amd.com Signed-off-by: Will Deacon commit 10c678bd0a035ac2c64a9b26b222f20556227a53 Author: Xin Long Date: Mon Dec 7 15:55:40 2020 +0800 udp: fix the proto value passed to ip_protocol_deliver_rcu for the segments Guillaume noticed that: for segments udp_queue_rcv_one_skb() returns the proto, and it should pass "ret" unmodified to ip_protocol_deliver_rcu(). Otherwize, with a negtive value passed, it will underflow inet_protos. This can be reproduced with IPIP FOU: # ip fou add port 5555 ipproto 4 # ethtool -K eth1 rx-gro-list on Fixes: cf329aa42b66 ("udp: cope with UDP GRO packet misdirection") Reported-by: Guillaume Nault Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 61f54de2e9194f01874d5eda12037b0978e77519 Author: Huazhong Tan Date: Mon Dec 7 15:20:25 2020 +0800 net: hns3: remove a misused pragma packed hclge_dbg_reg_info[] is defined as an array of packed structure accidentally. However, this array contains pointers, which are no longer aligned naturally, and cannot be relocated on PPC64. Hence, when compile-testing this driver on PPC64 with CONFIG_RELOCATABLE=y (e.g. PowerPC allyesconfig), there will be some warnings. Since each field in structure hclge_qos_pri_map_cmd and hclge_dbg_bitmap_cmd is type u8, the pragma packed is unnecessary for these two structures as well, so remove the pragma packed in hclge_debugfs.h to fix this issue, and this increases hclge_dbg_reg_info[] by 4 bytes per entry. Fixes: a582b78dfc33 ("net: hns3: code optimization for debugfs related to "dump reg"") Reported-by: Stephen Rothwell Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 223f61b8c5ad80f01900bc25f8073dfa4f23a2be Author: Hans de Goede Date: Sun Dec 6 21:59:42 2020 -0800 Input: soc_button_array - add Lenovo Yoga Tablet2 1051L to the dmi_use_low_level_irq list Add the Lenovo Yoga Tablet2 1051L to the list of devices where the ACPI AML code is poking the GPIO config register directly changing the IRQ type to a low_level_irq, which we need to work around. This fixes the home button on the Lenovo Yoga Tablet2 1051L not working. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201206161245.24798-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 3b384bd6c3f2d6d3526c77bfb264dfbaf737bc2a Author: Furquan Shaikh Date: Sun Dec 6 22:05:13 2020 -0800 Input: raydium_ts_i2c - do not split tx transactions Raydium device does not like splitting of tx transactions into multiple messages - one for the register address and one for the actual data. This results in incorrect behavior on the device side. This change updates raydium_i2c_read and raydium_i2c_write to create i2c_msg arrays separately and passes those arrays into raydium_i2c_xfer which decides based on the address whether the bank switch command should be sent. The bank switch header is still added by raydium_i2c_read and raydium_i2c_write to ensure that all these operations are performed as part of a single I2C transfer. It guarantees that no other transactions are initiated to any other device on the same bus after the bank switch command is sent. Signed-off-by: Furquan Shaikh Link: https://lore.kernel.org/r/20201205005941.1427643-1-furquan@google.com Signed-off-by: Dmitry Torokhov commit 0477e92881850d44910a7e94fc2c46f96faa131f Author: Linus Torvalds Date: Sun Dec 6 14:25:12 2020 -0800 Linux 5.10-rc7 commit ab91292cb3e9f43d9c6839d7572d17b35bc21710 Merge: d49248eb25a22 264f53b41946d Author: Linus Torvalds Date: Sun Dec 6 11:48:17 2020 -0800 Merge tag 'char-misc-5.10-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 driver fixes, and one "large" revert, for 5.10-rc7. They include: - revert mei patch from 5.10-rc1 that was using a reserved userspace value. It will be resubmitted once the proper id has been assigned by the virtio people. - habanalabs fixes found by the fall-through audit from Gustavo - speakup driver fixes for reported issues - fpga config build fix for reported issue. All of these except the revert have been in linux-next with no reported issues. The revert is "clean" and just removes a previously-added driver, so no real issue there" * tag 'char-misc-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Revert "mei: virtio: virtualization frontend driver" fpga: Specify HAS_IOMEM dependency for FPGA_DFL habanalabs: put devices before driver removal habanalabs: free host huge va_range if not used speakup: Reject setting the speakup line discipline outside of speakup commit d49248eb25a223b238cd7687ea92b080f595a323 Merge: f5226f1d20c41 c8bcd9c5be24f Author: Linus Torvalds Date: Sun Dec 6 11:43:50 2020 -0800 Merge tag 'tty-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty fixes from Greg KH: "Here are two tty core fixes for 5.10-rc7. They resolve some reported locking issues in the tty core. While they have not been in a released linux-next yet, they have passed all of the 0-day bot testing as well as the submitter's testing" * tag 'tty-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: Fix ->session locking tty: Fix ->pgrp locking in tiocspgrp() commit f5226f1d20c4113922dbe7742c416f06700c1ea9 Merge: 8100a58044f8f a4b98a7512f18 Author: Linus Torvalds Date: Sun Dec 6 11:38:36 2020 -0800 Merge tag 'usb-5.10-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 for 5.10-rc7 that resolve a number of reported issues, and add some new device ids. Nothing major here, but these solve some problems that people were having with the 5.10-rc tree: - reverts for USB storage dma settings that broke working devices - thunderbolt use-after-free fix - cdns3 driver fixes - gadget driver userspace copy fix - new device ids All of these except for the reverts have been in linux-next with no reported issues. The reverts are "clean" and were tested by Hans, as well as passing the 0-day tests" * tag 'usb-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: gadget: f_fs: Use local copy of descriptors for userspace copy usb: ohci-omap: Fix descriptor conversion Revert "usb-storage: fix sdev->host->dma_dev" Revert "uas: fix sdev->host->dma_dev" Revert "uas: bump hw_max_sectors to 2048 blocks for SS or faster drives" USB: serial: kl5kusb105: fix memleak on open USB: serial: ch341: sort device-id entries USB: serial: ch341: add new Product ID for CH341A USB: serial: option: fix Quectel BG96 matching usb: cdns3: core: fix goto label for error path usb: cdns3: gadget: clear trb->length as zero after preparing every trb usb: cdns3: Fix hardware based role switch USB: serial: option: add support for Thales Cinterion EXS82 USB: serial: option: add Fibocom NL668 variants thunderbolt: Fix use-after-free in remove_unplugged_switch() commit 8100a58044f8f502a53d90af96d6030767df0fbd Merge: 9f6b28d498ba0 84da009f06e60 Author: Linus Torvalds Date: Sun Dec 6 11:22:39 2020 -0800 Merge tag 'x86-urgent-2020-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A set of fixes for x86: - Make the AMD L3 QoS code and data priorization enable/disable mechanism work correctly. The control bit was only set/cleared on one of the CPUs in a L3 domain, but it has to be modified on all CPUs in the domain. The initial documentation was not clear about this, but the updated one from Oct 2020 spells it out. - Fix an off by one in the UV platform detection code which causes the UV hubs to be identified wrongly. The chip revisions start at 1 not at 0. - Fix a long standing bug in the evaluation of prefixes in the uprobes code which fails to handle repeated prefixes properly. The aggregate size of the prefixes can be larger than the bytes array but the code blindly iterated over the aggregate size beyond the array boundary. Add a macro to handle this case properly and use it at the affected places" * tag 'x86-urgent-2020-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev-es: Use new for_each_insn_prefix() macro to loop over prefixes bytes x86/insn-eval: Use new for_each_insn_prefix() macro to loop over prefixes bytes x86/uprobes: Do not use prefixes.nbytes when looping over prefixes.bytes x86/platform/uv: Fix UV4 hub revision adjustment x86/resctrl: Fix AMD L3 QOS CDP enable/disable commit 9f6b28d498ba084dff970ad95796642f804ffcd8 Merge: 592d9a0835c97 fc17db8aa4c53 Author: Linus Torvalds Date: Sun Dec 6 11:20:18 2020 -0800 Merge tag 'perf-urgent-2020-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "Two fixes for performance monitoring on X86: - Add recursion protection to another callchain invoked from x86_pmu_stop() which can recurse back into x86_pmu_stop(). The first attempt to fix this missed this extra code path. - Use the already filtered status variable to check for PEBS counter overflow bits and not the unfiltered full status read from IA32_PERF_GLOBAL_STATUS which can have unrelated bits check which would be evaluated incorrectly" * tag 'perf-urgent-2020-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Check PEBS status correctly perf/x86/intel: Fix a warning on x86_pmu_stop() with large PEBS commit 592d9a0835c97f54744a7c3ce845c16735c0ab14 Merge: ff615c9803572 9ea69a55b3b9a Author: Linus Torvalds Date: Sun Dec 6 11:15:55 2020 -0800 Merge tag 'irq-urgent-2020-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "A set of updates for the interrupt subsystem: - Make multiqueue devices which use the managed interrupt affinity infrastructure work on PowerPC/Pseries. PowerPC does not use the generic infrastructure for setting up PCI/MSI interrupts and the multiqueue changes failed to update the legacy PCI/MSI infrastructure. Make this work by passing the affinity setup information down to the mapping and allocation functions. - Move Jason Cooper from MAINTAINERS to CREDITS as his mail is bouncing and he's not reachable. We hope all is well with him and say thanks for his work over the years" * tag 'irq-urgent-2020-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: powerpc/pseries: Pass MSI affinity to irq_create_mapping() genirq/irqdomain: Add an irq_create_mapping_affinity() function MAINTAINERS: Move Jason Cooper to CREDITS commit ff615c98035729776a74f9c86c3b137ae35ac1d3 Merge: e6585a4939219 4d916140bf28f Author: Linus Torvalds Date: Sun Dec 6 11:11:32 2020 -0800 Merge tag 'locking-urgent-2020-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull intel_idle build fix from Thomas Gleixner: "A tiny build fix for a recent change in the intel_idle driver which missed a CONFIG dependency and broke the build for certain configurations" * tag 'locking-urgent-2020-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: intel_idle: Build fix commit e6585a493921991653be1fd65c3aa3fb90b000ae Merge: 12c0ab6658dea 7d32358be8acb Author: Linus Torvalds Date: Sun Dec 6 10:31:39 2020 -0800 Merge tag 'kbuild-fixes-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Move -Wcast-align to W=3, which tends to be false-positive and there is no tree-wide solution. - Pass -fmacro-prefix-map to KBUILD_CPPFLAGS because it is a preprocessor option and makes sense for .S files as well. - Disable -gdwarf-2 for Clang's integrated assembler to avoid warnings. - Disable --orphan-handling=warn for LLD 10.0.1 to avoid warnings. - Fix undesirable line breaks in *.mod files. * tag 'kbuild-fixes-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: avoid split lines in .mod files kbuild: Disable CONFIG_LD_ORPHAN_WARN for ld.lld 10.0.1 kbuild: Hoist '--orphan-handling' into Kconfig Kbuild: do not emit debug info for assembly with LLVM_IAS=1 kbuild: use -fmacro-prefix-map for .S sources Makefile.extrawarn: move -Wcast-align to W=3 commit 12c0ab6658dea4709189c3730d2431c52808428e Merge: 7059c2c00a219 309d08d9b3a36 Author: Linus Torvalds Date: Sun Dec 6 10:20:59 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "12 patches. Subsystems affected by this patch series: mm (memcg, zsmalloc, swap, mailmap, selftests, pagecache, hugetlb, pagemap), lib, and coredump" * emailed patches from Andrew Morton : mm/mmap.c: fix mmap return value when vma is merged after call_mmap() hugetlb_cgroup: fix offline of hugetlb cgroup with reservations mm/filemap: add static for function __add_to_page_cache_locked userfaultfd: selftests: fix SIGSEGV if huge mmap fails tools/testing/selftests/vm: fix build error mailmap: add two more addresses of Uwe Kleine-König mm/swapfile: do not sleep with a spin lock held mm/zsmalloc.c: drop ZSMALLOC_PGTABLE_MAPPING mm: list_lru: set shrinker map bit when child nr_items is not zero mm: memcg/slab: fix obj_cgroup_charge() return value handling coredump: fix core_pattern parse error zlib: export S390 symbols for zlib modules commit 309d08d9b3a3659ab3f239d27d4e38b670b08fc9 Author: Liu Zixian Date: Sat Dec 5 22:15:15 2020 -0800 mm/mmap.c: fix mmap return value when vma is merged after call_mmap() On success, mmap should return the begin address of newly mapped area, but patch "mm: mmap: merge vma after call_mmap() if possible" set vm_start of newly merged vma to return value addr. Users of mmap will get wrong address if vma is merged after call_mmap(). We fix this by moving the assignment to addr before merging vma. We have a driver which changes vm_flags, and this bug is found by our testcases. Fixes: d70cec898324 ("mm: mmap: merge vma after call_mmap() if possible") Signed-off-by: Liu Zixian Signed-off-by: Andrew Morton Reviewed-by: Jason Gunthorpe Reviewed-by: David Hildenbrand Cc: Miaohe Lin Cc: Hongxiang Lou Cc: Hu Shiyuan Cc: Matthew Wilcox Link: https://lkml.kernel.org/r/20201203085350.22624-1-liuzixian4@huawei.com Signed-off-by: Linus Torvalds commit 7a5bde37983d37783161681ff7c6122dfd081791 Author: Mike Kravetz Date: Sat Dec 5 22:15:12 2020 -0800 hugetlb_cgroup: fix offline of hugetlb cgroup with reservations Adrian Moreno was ruuning a kubernetes 1.19 + containerd/docker workload using hugetlbfs. In this environment the issue is reproduced by: - Start a simple pod that uses the recently added HugePages medium feature (pod yaml attached) - Start a DPDK app. It doesn't need to run successfully (as in transfer packets) nor interact with real hardware. It seems just initializing the EAL layer (which handles hugepage reservation and locking) is enough to trigger the issue - Delete the Pod (or let it "Complete"). This would result in a kworker thread going into a tight loop (top output): 1425 root 20 0 0 0 0 R 99.7 0.0 5:22.45 kworker/28:7+cgroup_destroy 'perf top -g' reports: - 63.28% 0.01% [kernel] [k] worker_thread - 49.97% worker_thread - 52.64% process_one_work - 62.08% css_killed_work_fn - hugetlb_cgroup_css_offline 41.52% _raw_spin_lock - 2.82% _cond_resched rcu_all_qs 2.66% PageHuge - 0.57% schedule - 0.57% __schedule We are spinning in the do-while loop in hugetlb_cgroup_css_offline. Worse yet, we are holding the master cgroup lock (cgroup_mutex) while infinitely spinning. Little else can be done on the system as the cgroup_mutex can not be acquired. Do note that the issue can be reproduced by simply offlining a hugetlb cgroup containing pages with reservation counts. The loop in hugetlb_cgroup_css_offline is moving page counts from the cgroup being offlined to the parent cgroup. This is done for each hstate, and is repeated until hugetlb_cgroup_have_usage returns false. The routine moving counts (hugetlb_cgroup_move_parent) is only moving 'usage' counts. The routine hugetlb_cgroup_have_usage is checking for both 'usage' and 'reservation' counts. Discussion about what to do with reservation counts when reparenting was discussed here: https://lore.kernel.org/linux-kselftest/CAHS8izMFAYTgxym-Hzb_JmkTK1N_S9tGN71uS6MFV+R7swYu5A@mail.gmail.com/ The decision was made to leave a zombie cgroup for with reservation counts. Unfortunately, the code checking reservation counts was incorrectly added to hugetlb_cgroup_have_usage. To fix the issue, simply remove the check for reservation counts. While fixing this issue, a related bug in hugetlb_cgroup_css_offline was noticed. The hstate index is not reinitialized each time through the do-while loop. Fix this as well. Fixes: 1adc4d419aa2 ("hugetlb_cgroup: add interface for charge/uncharge hugetlb reservations") Reported-by: Adrian Moreno Signed-off-by: Mike Kravetz Signed-off-by: Andrew Morton Tested-by: Adrian Moreno Reviewed-by: Shakeel Butt Cc: Mina Almasry Cc: David Rientjes Cc: Greg Thelen Cc: Sandipan Das Cc: Shuah Khan Cc: Link: https://lkml.kernel.org/r/20201203220242.158165-1-mike.kravetz@oracle.com Signed-off-by: Linus Torvalds commit 3351b16af4946fff0d46481d155fb91adb28b1f9 Author: Alex Shi Date: Sat Dec 5 22:15:09 2020 -0800 mm/filemap: add static for function __add_to_page_cache_locked mm/filemap.c:830:14: warning: no previous prototype for `__add_to_page_cache_locked' [-Wmissing-prototypes] Signed-off-by: Alex Shi Signed-off-by: Andrew Morton Cc: Souptick Joarder Link: https://lkml.kernel.org/r/1604661895-5495-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Linus Torvalds commit 573a259336f8c57739bdaf035aa7abbae7d9a713 Author: Axel Rasmussen Date: Sat Dec 5 22:15:05 2020 -0800 userfaultfd: selftests: fix SIGSEGV if huge mmap fails The error handling in hugetlb_allocate_area() was incorrect for the hugetlb_shared test case. Previously the behavior was: - mmap a hugetlb area - If this fails, set the pointer to NULL, and carry on - mmap an alias of the same hugetlb fd - If this fails, munmap the original area If the original mmap failed, it's likely the second one did too. If both failed, we'd blindly try to munmap a NULL pointer, causing a SIGSEGV. Instead, "goto fail" so we return before trying to mmap the alias. This issue can be hit "in real life" by forgetting to set /proc/sys/vm/nr_hugepages (leaving it at 0), and then trying to run the hugetlb_shared test. Another small improvement is, when the original mmap fails, don't just print "it failed": perror(), so we can see *why*. :) Signed-off-by: Axel Rasmussen Signed-off-by: Andrew Morton Cc: Shuah Khan Cc: Peter Xu Cc: Joe Perches Cc: Mike Rapoport Cc: Andrea Arcangeli Cc: David Alan Gilbert Link: https://lkml.kernel.org/r/20201204203443.2714693-1-axelrasmussen@google.com Signed-off-by: Linus Torvalds commit d8cbe8bfa7df3c680ddfd5e1eee3a5c86d8dc764 Author: Xingxing Su Date: Sat Dec 5 22:15:02 2020 -0800 tools/testing/selftests/vm: fix build error Only x86 and PowerPC implement the pkey-xxx.h, and an error was reported when compiling protection_keys.c. Add a Arch judgment to compile "protection_keys" in the Makefile. If other arch implement this, add the arch name to the Makefile. eg: ifneq (,$(findstring $(ARCH),powerpc mips ... )) Following build errors: pkey-helpers.h:93:2: error: #error Architecture not supported #error Architecture not supported pkey-helpers.h:96:20: error: `PKEY_DISABLE_ACCESS' undeclared #define PKEY_MASK (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE) ^ protection_keys.c:218:45: error: `PKEY_DISABLE_WRITE' undeclared pkey_assert(flags & (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE)); ^ Signed-off-by: Xingxing Su Signed-off-by: Andrew Morton Cc: Shuah Khan Cc: Sandipan Das Cc: John Hubbard Cc: Dave Hansen Cc: "Kirill A. Shutemov" Cc: Brian Geffon Cc: Mina Almasry Link: https://lkml.kernel.org/r/1606826876-30656-1-git-send-email-suxingxing@loongson.cn Signed-off-by: Linus Torvalds commit 4e60340c5ca560278c938726235bc0daa5fc8c7f Author: Uwe Kleine-König Date: Sat Dec 5 22:14:58 2020 -0800 mailmap: add two more addresses of Uwe Kleine-König This fixes attribution for the commits (among others) - d4097456cd1d ("video/framebuffer: move the probe func into .devinit.text in Blackfin LCD driver") - 0312e024d6cd ("mfd: mc13xxx: Add support for mc34708") Signed-off-by: Uwe Kleine-König Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20201127213358.3440830-1-u.kleine-koenig@pengutronix.de Signed-off-by: Linus Torvalds commit b11a76b37a5aa7b07c3e3eeeaae20b25475bddd3 Author: Qian Cai Date: Sat Dec 5 22:14:55 2020 -0800 mm/swapfile: do not sleep with a spin lock held We can't call kvfree() with a spin lock held, so defer it. Fixes a might_sleep() runtime warning. Fixes: 873d7bcfd066 ("mm/swapfile.c: use kvzalloc for swap_info_struct allocation") Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Hugh Dickins Cc: Link: https://lkml.kernel.org/r/20201202151549.10350-1-qcai@redhat.com Signed-off-by: Linus Torvalds commit e91d8d78237de8d7120c320b3645b7100848f24d Author: Minchan Kim Date: Sat Dec 5 22:14:51 2020 -0800 mm/zsmalloc.c: drop ZSMALLOC_PGTABLE_MAPPING While I was doing zram testing, I found sometimes decompression failed since the compression buffer was corrupted. With investigation, I found below commit calls cond_resched unconditionally so it could make a problem in atomic context if the task is reschedule. BUG: sleeping function called from invalid context at mm/vmalloc.c:108 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 946, name: memhog 3 locks held by memhog/946: #0: ffff9d01d4b193e8 (&mm->mmap_lock#2){++++}-{4:4}, at: __mm_populate+0x103/0x160 #1: ffffffffa3d53de0 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_slowpath.constprop.0+0xa98/0x1160 #2: ffff9d01d56b8110 (&zspage->lock){.+.+}-{3:3}, at: zs_map_object+0x8e/0x1f0 CPU: 0 PID: 946 Comm: memhog Not tainted 5.9.3-00011-gc5bfc0287345-dirty #316 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1 04/01/2014 Call Trace: unmap_kernel_range_noflush+0x2eb/0x350 unmap_kernel_range+0x14/0x30 zs_unmap_object+0xd5/0xe0 zram_bvec_rw.isra.0+0x38c/0x8e0 zram_rw_page+0x90/0x101 bdev_write_page+0x92/0xe0 __swap_writepage+0x94/0x4a0 pageout+0xe3/0x3a0 shrink_page_list+0xb94/0xd60 shrink_inactive_list+0x158/0x460 We can fix this by removing the ZSMALLOC_PGTABLE_MAPPING feature (which contains the offending calling code) from zsmalloc. Even though this option showed some amount improvement(e.g., 30%) in some arm32 platforms, it has been headache to maintain since it have abused APIs[1](e.g., unmap_kernel_range in atomic context). Since we are approaching to deprecate 32bit machines and already made the config option available for only builtin build since v5.8, lastly it has been not default option in zsmalloc, it's time to drop the option for better maintenance. [1] http://lore.kernel.org/linux-mm/20201105170249.387069-1-minchan@kernel.org Fixes: e47110e90584 ("mm/vunmap: add cond_resched() in vunmap_pmd_range") Signed-off-by: Minchan Kim Signed-off-by: Andrew Morton Reviewed-by: Sergey Senozhatsky Cc: Tony Lindgren Cc: Christoph Hellwig Cc: Harish Sriram Cc: Uladzislau Rezki Cc: Link: https://lkml.kernel.org/r/20201117202916.GA3856507@google.com Signed-off-by: Linus Torvalds commit 8199be001a470209f5c938570cc199abb012fe53 Author: Yang Shi Date: Sat Dec 5 22:14:48 2020 -0800 mm: list_lru: set shrinker map bit when child nr_items is not zero When investigating a slab cache bloat problem, significant amount of negative dentry cache was seen, but confusingly they neither got shrunk by reclaimer (the host has very tight memory) nor be shrunk by dropping cache. The vmcore shows there are over 14M negative dentry objects on lru, but tracing result shows they were even not scanned at all. Further investigation shows the memcg's vfs shrinker_map bit is not set. So the reclaimer or dropping cache just skip calling vfs shrinker. So we have to reboot the hosts to get the memory back. I didn't manage to come up with a reproducer in test environment, and the problem can't be reproduced after rebooting. But it seems there is race between shrinker map bit clear and reparenting by code inspection. The hypothesis is elaborated as below. The memcg hierarchy on our production environment looks like: root / \ system user The main workloads are running under user slice's children, and it creates and removes memcg frequently. So reparenting happens very often under user slice, but no task is under user slice directly. So with the frequent reparenting and tight memory pressure, the below hypothetical race condition may happen: CPU A CPU B reparent dst->nr_items == 0 shrinker: total_objects == 0 add src->nr_items to dst set_bit return SHRINK_EMPTY clear_bit child memcg offline replace child's kmemcg_id with parent's (in memcg_offline_kmem()) list_lru_del() between shrinker runs see parent's kmemcg_id dec dst->nr_items reparent again dst->nr_items may go negative due to concurrent list_lru_del() The second run of shrinker: read nr_items without any synchronization, so it may see intermediate negative nr_items then total_objects may return 0 coincidently keep the bit cleared dst->nr_items != 0 skip set_bit add scr->nr_item to dst After this point dst->nr_item may never go zero, so reparenting will not set shrinker_map bit anymore. And since there is no task under user slice directly, so no new object will be added to its lru to set the shrinker map bit either. That bit is kept cleared forever. How does list_lru_del() race with reparenting? It is because reparenting replaces children's kmemcg_id to parent's without protecting from nlru->lock, so list_lru_del() may see parent's kmemcg_id but actually deleting items from child's lru, but dec'ing parent's nr_items, so the parent's nr_items may go negative as commit 2788cf0c401c ("memcg: reparent list_lrus and free kmemcg_id on css offline") says. Since it is impossible that dst->nr_items goes negative and src->nr_items goes zero at the same time, so it seems we could set the shrinker map bit iff src->nr_items != 0. We could synchronize list_lru_count_one() and reparenting with nlru->lock, but it seems checking src->nr_items in reparenting is the simplest and avoids lock contention. Fixes: fae91d6d8be5 ("mm/list_lru.c: set bit in memcg shrinker bitmap on first list_lru item appearance") Suggested-by: Roman Gushchin Signed-off-by: Yang Shi Signed-off-by: Andrew Morton Reviewed-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Kirill Tkhai Cc: Vladimir Davydov Cc: [4.19] Link: https://lkml.kernel.org/r/20201202171749.264354-1-shy828301@gmail.com Signed-off-by: Linus Torvalds commit becaba65f62f88e553ec92ed98370e9d2b18e629 Author: Roman Gushchin Date: Sat Dec 5 22:14:45 2020 -0800 mm: memcg/slab: fix obj_cgroup_charge() return value handling Commit 10befea91b61 ("mm: memcg/slab: use a single set of kmem_caches for all allocations") introduced a regression into the handling of the obj_cgroup_charge() return value. If a non-zero value is returned (indicating of exceeding one of memory.max limits), the allocation should fail, instead of falling back to non-accounted mode. To make the code more readable, move memcg_slab_pre_alloc_hook() and memcg_slab_post_alloc_hook() calling conditions into bodies of these hooks. Fixes: 10befea91b61 ("mm: memcg/slab: use a single set of kmem_caches for all allocations") Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Link: https://lkml.kernel.org/r/20201127161828.GD840171@carbon.dhcp.thefacebook.com Signed-off-by: Linus Torvalds commit 2bf509d96d84c3336d08375e8af34d1b85ee71c8 Author: Menglong Dong Date: Sat Dec 5 22:14:42 2020 -0800 coredump: fix core_pattern parse error 'format_corename()' will splite 'core_pattern' on spaces when it is in pipe mode, and take helper_argv[0] as the path to usermode executable. It works fine in most cases. However, if there is a space between '|' and '/file/path', such as '| /usr/lib/systemd/systemd-coredump %P %u %g', then helper_argv[0] will be parsed as '', and users will get a 'Core dump to | disabled'. It is not friendly to users, as the pattern above was valid previously. Fix this by ignoring the spaces between '|' and '/file/path'. Fixes: 315c69261dd3 ("coredump: split pipe command whitespace before expanding template") Signed-off-by: Menglong Dong Signed-off-by: Andrew Morton Cc: Paul Wise Cc: Jakub Wilk [https://bugs.debian.org/924398] Cc: Neil Horman Cc: Link: https://lkml.kernel.org/r/5fb62870.1c69fb81.8ef5d.af76@mx.google.com Signed-off-by: Linus Torvalds commit 11fb479ff5d9872ddff02dd533c16d60372c86b2 Author: Randy Dunlap Date: Sat Dec 5 22:14:38 2020 -0800 zlib: export S390 symbols for zlib modules Fix build errors when ZLIB_INFLATE=m and ZLIB_DEFLATE=m and ZLIB_DFLTCC=y by exporting the 2 needed symbols in dfltcc_inflate.c. Fixes these build errors: ERROR: modpost: "dfltcc_inflate" [lib/zlib_inflate/zlib_inflate.ko] undefined! ERROR: modpost: "dfltcc_can_inflate" [lib/zlib_inflate/zlib_inflate.ko] undefined! Fixes: 126196100063 ("lib/zlib: add s390 hardware support for kernel zlib_inflate") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Acked-by: Ilya Leoshkevich Cc: Mikhail Zaslonko Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Link: https://lkml.kernel.org/r/20201123191712.4882-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 7d32358be8acb119dcfe39b6cf67ec6d94bf1fe7 Author: Masahiro Yamada Date: Fri Dec 4 02:55:51 2020 +0900 kbuild: avoid split lines in .mod files "xargs echo" is not a safe way to remove line breaks because the input may exceed the command line limit and xargs may break it up into multiple invocations of echo. This should never happen because scripts/gen_autoksyms.sh expects all undefined symbols are placed in the second line of .mod files. One possible way is to replace "xargs echo" with "sed ':x;N;$!bx;s/\n/ /g'" or something, but I rewrote the code by using awk because it is more readable. This issue was reported by Sami Tolvanen; in his Clang LTO patch set, $(multi-used-m) is no longer an ELF object, but a thin archive that contains LLVM bitcode files. llvm-nm prints out symbols for each archive member separately, which results a lot of dupications, in some places, beyond the system-defined limit. This problem must be fixed irrespective of LTO, and we must ensure zero possibility of having this issue. Link: https://lkml.org/lkml/2020/12/1/1658 Reported-by: Sami Tolvanen Signed-off-by: Masahiro Yamada Reviewed-by: Sami Tolvanen commit 264f53b41946dcabb2b3304190839ab5670c7825 Author: Michael S. Tsirkin Date: Sat Dec 5 14:38:46 2020 -0500 Revert "mei: virtio: virtualization frontend driver" This reverts commit d162219c655c8cf8003128a13840d6c1e183fb80. The device uses a VIRTIO device ID out of a not-for-production range. Releasing Linux using an ID out of this range will make it conflict with development setups. An official request to reserve an ID for an MEI device is yet to be submitted to the virtio TC, thus there's no chance it will be reserved and fixed in time before the next release. Once requested it usually takes 2-3 weeks to land in the spec, which means the device can be supported with the official ID in the next Linux version if contributors act quickly. Signed-off-by: Michael S. Tsirkin Cc: Tomas Winkler Cc: Alexander Usyskin Cc: Wang Yu Cc: Liu Shuo Link: https://lore.kernel.org/r/20201205193625.469773-1-mst@redhat.com Signed-off-by: Greg Kroah-Hartman commit 84da009f06e60cf59d5e861f8e2101d2d3885517 Author: Masami Hiramatsu Date: Thu Dec 3 13:51:01 2020 +0900 x86/sev-es: Use new for_each_insn_prefix() macro to loop over prefixes bytes Since insn.prefixes.nbytes can be bigger than the size of insn.prefixes.bytes[] when a prefix is repeated, the proper check must be: insn.prefixes.bytes[i] != 0 and i < 4 instead of using insn.prefixes.nbytes. Use the new for_each_insn_prefix() macro which does it correctly. Debugged by Kees Cook . [ bp: Massage commit message. ] Fixes: 25189d08e516 ("x86/sev-es: Add support for handling IOIO exceptions") Reported-by: syzbot+9b64b619f10f19d19a7c@syzkaller.appspotmail.com Signed-off-by: Masami Hiramatsu Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/160697106089.3146288.2052422845039649176.stgit@devnote2 commit 12cb908a11b2544b5f53e9af856e6b6a90ed5533 Author: Masami Hiramatsu Date: Thu Dec 3 13:50:50 2020 +0900 x86/insn-eval: Use new for_each_insn_prefix() macro to loop over prefixes bytes Since insn.prefixes.nbytes can be bigger than the size of insn.prefixes.bytes[] when a prefix is repeated, the proper check must be insn.prefixes.bytes[i] != 0 and i < 4 instead of using insn.prefixes.nbytes. Use the new for_each_insn_prefix() macro which does it correctly. Debugged by Kees Cook . [ bp: Massage commit message. ] Fixes: 32d0b95300db ("x86/insn-eval: Add utility functions to get segment selector") Reported-by: syzbot+9b64b619f10f19d19a7c@syzkaller.appspotmail.com Signed-off-by: Masami Hiramatsu Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/160697104969.3146288.16329307586428270032.stgit@devnote2 commit 4e9a5ae8df5b3365183150f6df49e49dece80d8c Author: Masami Hiramatsu Date: Thu Dec 3 13:50:37 2020 +0900 x86/uprobes: Do not use prefixes.nbytes when looping over prefixes.bytes Since insn.prefixes.nbytes can be bigger than the size of insn.prefixes.bytes[] when a prefix is repeated, the proper check must be insn.prefixes.bytes[i] != 0 and i < 4 instead of using insn.prefixes.nbytes. Introduce a for_each_insn_prefix() macro for this purpose. Debugged by Kees Cook . [ bp: Massage commit message, sync with the respective header in tools/ and drop "we". ] Fixes: 2b1444983508 ("uprobes, mm, x86: Add the ability to install and remove uprobes breakpoints") Reported-by: syzbot+9b64b619f10f19d19a7c@syzkaller.appspotmail.com Signed-off-by: Masami Hiramatsu Signed-off-by: Borislav Petkov Reviewed-by: Srikar Dronamraju Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/160697103739.3146288.7437620795200799020.stgit@devnote2 commit 7059c2c00a2196865c2139083cbef47cd18109b6 Merge: 33256ce194110 8c3b55a299c32 Author: Linus Torvalds Date: Sat Dec 5 16:16:34 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "A fix for 'RETRIGEN' handling in Atmel touch controllers that was causing lost interrupts on systems using edge-triggered interrupts, a quirk for i8042 driver, and a couple more fixes." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: atmel_mxt_ts - fix lost interrupts Input: xpad - support Ardwiino Controllers Input: i8042 - add ByteSpeed touchpad to noloop table Input: i8042 - fix error return code in i8042_setup_aux() Input: soc_button_array - add missing include commit edd2410b165e2ef00b2264ae362edf7441ca929c Author: Vladimir Oltean Date: Fri Dec 4 19:54:16 2020 +0200 net: mscc: ocelot: fix dropping of unknown IPv4 multicast on Seville The current assumption is that the felix DSA driver has flooding knobs per traffic class, while ocelot switchdev has a single flooding knob. This was correct for felix VSC9959 and ocelot VSC7514, but with the introduction of seville VSC9953, we see a switch driven by felix.c which has a single flooding knob. So it is clear that we must do what should have been done from the beginning, which is not to overwrite the configuration done by ocelot.c in felix, but instead to teach the common ocelot library about the differences in our switches, and set up the flooding PGIDs centrally. The effect that the bogus iteration through FELIX_NUM_TC has upon seville is quite dramatic. ANA_FLOODING is located at 0x00b548, and ANA_FLOODING_IPMC is located at 0x00b54c. So the bogus iteration will actually overwrite ANA_FLOODING_IPMC when attempting to write ANA_FLOODING[1]. There is no ANA_FLOODING[1] in sevile, just ANA_FLOODING. And when ANA_FLOODING_IPMC is overwritten with a bogus value, the effect is that ANA_FLOODING_IPMC gets the value of 0x0003CF7D: MC6_DATA = 61, MC6_CTRL = 61, MC4_DATA = 60, MC4_CTRL = 0. Because MC4_CTRL is zero, this means that IPv4 multicast control packets are not flooded, but dropped. An invalid configuration, and this is how the issue was actually spotted. Reported-by: Eldar Gasanov Reported-by: Maxim Kochetkov Tested-by: Eldar Gasanov Fixes: 84705fc16552 ("net: dsa: felix: introduce support for Seville VSC9953 switch") Fixes: 3c7b51bd39b2 ("net: dsa: felix: allow flooding for all traffic classes") Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201204175416.1445937-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 33256ce194110874d4bc90078b577c59f9076c59 Merge: be1515bad737e 2bf9545626f8d Author: Linus Torvalds Date: Sat Dec 5 15:27:22 2020 -0800 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Some more I2C driver updates. IMX updates are a tad bigger, but not exceptionally big" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: mlxbf: Fix the return check of devm_ioremap and ioremap i2c: mlxbf: select CONFIG_I2C_SLAVE i2c: imx: Don't generate STOP condition if arbitration has been lost i2c: imx: Check for I2SR_IAL after every byte i2c: imx: Fix reset of I2SR_IAL flag i2c: qcom: Fix IRQ error misassignement i2c: qup: Fix error return code in qup_i2c_bam_schedule_desc() commit be1515bad737ee9efe9229ab8313a236bfa03c5c Merge: 619ca2664cc6e 7e7986f9d3ba6 Author: Linus Torvalds Date: Sat Dec 5 14:45:30 2020 -0800 Merge tag 'block-5.10-2020-12-05' of git://git.kernel.dk/linux-block Pull block fix from Jens Axboe: "Single fix for an issue with chunk_sectors and stacked devices" * tag 'block-5.10-2020-12-05' of git://git.kernel.dk/linux-block: block: use gcd() to fix chunk_sectors limit stacking commit 619ca2664cc6ebf6ecaff347d15ee8093b634e0c Merge: 32f741b02f1a8 2d280bc8930ba Author: Linus Torvalds Date: Sat Dec 5 14:39:59 2020 -0800 Merge tag 'io_uring-5.10-2020-12-05' of git://git.kernel.dk/linux-block Pull io_uring fix from Jens Axboe: "Just a small fix this time, for an issue with 32-bit compat apps and buffer selection with recvmsg" * tag 'io_uring-5.10-2020-12-05' of git://git.kernel.dk/linux-block: io_uring: fix recvmsg setup with compat buf-select commit 4de377b659035309ba48638d70f3150d5c67611f Author: Zhang Changzhong Date: Fri Dec 4 16:49:42 2020 +0800 net: marvell: prestera: Fix error return code in prestera_port_create() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 501ef3066c89 ("net: marvell: prestera: Add driver for Prestera family ASIC devices") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1607071782-34006-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit 205704c618af0ab2366015d2281a3b0814d918a0 Author: Stephen Suryaputra Date: Thu Dec 3 22:06:04 2020 -0500 vrf: packets with lladdr src needs dst at input with orig_iif when needs strict Depending on the order of the routes to fe80::/64 are installed on the VRF table, the NS for the source link-local address of the originator might be sent to the wrong interface. This patch ensures that packets with link-local addr source is doing a lookup with the orig_iif when the destination addr indicates that it is strict. Add the reproducer as a use case in self test script fcnal-test.sh. Fixes: b4869aa2f881 ("net: vrf: ipv6 support for local traffic to local addresses") Signed-off-by: Stephen Suryaputra Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20201204030604.18828-1-ssuryaextr@gmail.com Signed-off-by: Jakub Kicinski commit 4d1be581ec6b92a338bb7ed23e1381f45ddf336f Author: Zhang Qilong Date: Fri Dec 4 14:35:06 2020 +0100 can: softing: softing_netdev_open(): fix error handling If softing_netdev_open() fails, we should call close_candev() to avoid reference leak. Fixes: 03fd3cf5a179d ("can: add driver for Softing card") Signed-off-by: Zhang Qilong Acked-by: Kurt Van Dijck Link: https://lore.kernel.org/r/20201202151632.1343786-1-zhangqilong3@huawei.com Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20201204133508.742120-2-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit a54ba3465d86fa5dd7d41bb88c0b5e71fb3b627e Author: Arnd Bergmann Date: Thu Dec 3 23:26:16 2020 +0100 ch_ktls: fix build warning for ipv4-only config When CONFIG_IPV6 is disabled, clang complains that a variable is uninitialized for non-IPv4 data: drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:1046:6: error: variable 'cntrl1' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (tx_info->ip_family == AF_INET) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:1059:2: note: uninitialized use occurs here cntrl1 |= T6_TXPKT_ETHHDR_LEN_V(maclen - ETH_HLEN) | ^~~~~~ Replace the preprocessor conditional with the corresponding C version, and make the ipv4 case unconditional in this configuration to improve readability and avoid the warning. Fixes: 86716b51d14f ("ch_ktls: Update cheksum information") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201203222641.964234-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit 32f741b02f1a84dd15cdaf74ea3c8d724f812318 Merge: d4e904198c5b4 a1ee28117077c Author: Linus Torvalds Date: Sat Dec 5 11:16:21 2020 -0800 Merge tag 'powerpc-5.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Some more powerpc fixes for 5.10: - Three commits fixing possible missed TLB invalidations for multi-threaded processes when CPUs are hotplugged in and out. - A fix for a host crash triggerable by host userspace (qemu) in KVM on Power9. - A fix for a host crash in machine check handling when running HPT guests on a HPT host. - One commit fixing potential missed TLB invalidations when using the hash MMU on Power9 or later. - A regression fix for machines with CPUs on node 0 but no memory. Thanks to Aneesh Kumar K.V, Cédric Le Goater, Greg Kurz, Milan Mohanty, Milton Miller, Nicholas Piggin, Paul Mackerras, and Srikar Dronamraju" * tag 'powerpc-5.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s/powernv: Fix memory corruption when saving SLB entries on MCE KVM: PPC: Book3S HV: XIVE: Fix vCPU id sanity check powerpc/numa: Fix a regression on memoryless node 0 powerpc/64s: Trim offlined CPUs from mm_cpumasks kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling powerpc/64s/pseries: Fix hash tlbiel_all_isa300 for guest kernels powerpc/64s: Fix hash ISA v3.0 TLBIEL instruction generation commit d4e904198c5b46c140fdd04492df6ec31f1f03a5 Merge: 312b0bcd402a0 ea64370bcae12 Author: Linus Torvalds Date: Sat Dec 5 11:09:07 2020 -0800 Merge tag '5.10-rc6-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Three smb3 fixes (two for stable) fixing - a null pointer issue in a DFS error path - a problem with excessive padding when mounted with "idsfromsid" causing owner fields to get corrupted - a more recent problem with compounded reparse point query found in testing to the Linux kernel server" * tag '5.10-rc6-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: cifs: refactor create_sd_buf() and and avoid corrupting the buffer cifs: add NULL check for ses->tcon_ipc smb3: set COMPOUND_FID to FileID field of subsequent compound request commit 312b0bcd402a003053914e13d962e82be906cf41 Merge: 8762340561397 85dad327d9b58 Author: Linus Torvalds Date: Sat Dec 5 10:59:21 2020 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four small fixes in two drivers. The mpt3sas fixes are all problems with timeout under unusual conditions, and the storvsc is a missed incoming packet validation and a missed error return" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mpt3sas: Increase IOCInit request timeout to 30s scsi: mpt3sas: Fix ioctl timeout scsi: storvsc: Validate length of incoming packet in storvsc_on_channel_callback() scsi: storvsc: Fix error return in storvsc_probe() commit 8762340561397fce0f0b41220ed9619101c870d0 Merge: b3298500b23f0 65f33b3572295 Author: Linus Torvalds Date: Sat Dec 5 10:51:25 2020 -0800 Merge tag 'for-5.10/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull fix for device mapper fixes from Mike Snitzer: "Apologies for the glaring bug I introduced with my previous pull request! Fix incorrect branching at top of blk_max_size_offset()" * tag 'for-5.10/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: block: fix incorrect branching in blk_max_size_offset() commit 2bf9545626f8d09f552ab86d0047a415fe9a07a0 Author: Wang Xiaojun Date: Wed Dec 2 20:46:47 2020 -0500 i2c: mlxbf: Fix the return check of devm_ioremap and ioremap devm_ioremap and ioremap may return NULL which cannot be checked by IS_ERR. Signed-off-by: Wang Xiaojun Reported-by: Hulk Robot Acked-by: Khalil Blaiech Signed-off-by: Wolfram Sang commit c62dac0a35bb6d351cd568e97090c5fd3e7aa532 Author: Arnd Bergmann Date: Thu Dec 3 23:32:50 2020 +0100 i2c: mlxbf: select CONFIG_I2C_SLAVE If this is not enabled, the interfaces used in this driver do not work: drivers/i2c/busses/i2c-mlxbf.c:1888:3: error: implicit declaration of function 'i2c_slave_event' [-Werror,-Wimplicit-function-declaration] i2c_slave_event(slave, I2C_SLAVE_WRITE_REQUESTED, &value); ^ drivers/i2c/busses/i2c-mlxbf.c:1888:26: error: use of undeclared identifier 'I2C_SLAVE_WRITE_REQUESTED' i2c_slave_event(slave, I2C_SLAVE_WRITE_REQUESTED, &value); ^ drivers/i2c/busses/i2c-mlxbf.c:1890:32: error: use of undeclared identifier 'I2C_SLAVE_WRITE_RECEIVED' ret = i2c_slave_event(slave, I2C_SLAVE_WRITE_RECEIVED, ^ drivers/i2c/busses/i2c-mlxbf.c:1892:26: error: use of undeclared identifier 'I2C_SLAVE_STOP' i2c_slave_event(slave, I2C_SLAVE_STOP, &value); ^ Fixes: b5b5b32081cd ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC") Signed-off-by: Arnd Bergmann Acked-by: Khalil Blaiech Signed-off-by: Wolfram Sang commit 905b2032fa424f253d9126271439cc1db2b01130 Author: Eric Dumazet Date: Fri Dec 4 08:24:28 2020 -0800 mac80211: mesh: fix mesh_pathtbl_init() error path If tbl_mpp can not be allocated, we call mesh_table_free(tbl_path) while tbl_path rhashtable has not yet been initialized, which causes panics. Simply factorize the rhashtable_init() call into mesh_table_alloc() WARNING: CPU: 1 PID: 8474 at kernel/workqueue.c:3040 __flush_work kernel/workqueue.c:3040 [inline] WARNING: CPU: 1 PID: 8474 at kernel/workqueue.c:3040 __cancel_work_timer+0x514/0x540 kernel/workqueue.c:3136 Modules linked in: CPU: 1 PID: 8474 Comm: syz-executor663 Not tainted 5.10.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__flush_work kernel/workqueue.c:3040 [inline] RIP: 0010:__cancel_work_timer+0x514/0x540 kernel/workqueue.c:3136 Code: 5d c3 e8 bf ae 29 00 0f 0b e9 f0 fd ff ff e8 b3 ae 29 00 0f 0b 43 80 3c 3e 00 0f 85 31 ff ff ff e9 34 ff ff ff e8 9c ae 29 00 <0f> 0b e9 dc fe ff ff 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 7d fd ff RSP: 0018:ffffc9000165f5a0 EFLAGS: 00010293 RAX: ffffffff814b7064 RBX: 0000000000000001 RCX: ffff888021c80000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff888024039ca0 R08: dffffc0000000000 R09: fffffbfff1dd3e64 R10: fffffbfff1dd3e64 R11: 0000000000000000 R12: 1ffff920002cbebd R13: ffff888024039c88 R14: 1ffff11004807391 R15: dffffc0000000000 FS: 0000000001347880(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000140 CR3: 000000002cc0a000 CR4: 00000000001506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rhashtable_free_and_destroy+0x25/0x9c0 lib/rhashtable.c:1137 mesh_table_free net/mac80211/mesh_pathtbl.c:69 [inline] mesh_pathtbl_init+0x287/0x2e0 net/mac80211/mesh_pathtbl.c:785 ieee80211_mesh_init_sdata+0x2ee/0x530 net/mac80211/mesh.c:1591 ieee80211_setup_sdata+0x733/0xc40 net/mac80211/iface.c:1569 ieee80211_if_add+0xd5c/0x1cd0 net/mac80211/iface.c:1987 ieee80211_add_iface+0x59/0x130 net/mac80211/cfg.c:125 rdev_add_virtual_intf net/wireless/rdev-ops.h:45 [inline] nl80211_new_interface+0x563/0xb40 net/wireless/nl80211.c:3855 genl_family_rcv_msg_doit net/netlink/genetlink.c:739 [inline] genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] genl_rcv_msg+0xe4e/0x1280 net/netlink/genetlink.c:800 netlink_rcv_skb+0x190/0x3a0 net/netlink/af_netlink.c:2494 genl_rcv+0x24/0x40 net/netlink/genetlink.c:811 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x780/0x930 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x9a8/0xd40 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:671 [inline] ____sys_sendmsg+0x519/0x800 net/socket.c:2353 ___sys_sendmsg net/socket.c:2407 [inline] __sys_sendmsg+0x2b1/0x360 net/socket.c:2440 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 60854fd94573 ("mac80211: mesh: convert path table to rhashtable") Signed-off-by: Eric Dumazet Reported-by: syzbot Reviewed-by: Johannes Berg Link: https://lore.kernel.org/r/20201204162428.2583119-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit ed9b25d1970a4787ac6a39c2091e63b127ecbfc1 Author: Serge Hallyn Date: Sun Nov 15 21:55:31 2020 -0600 [SECURITY] fix namespaced fscaps when !CONFIG_SECURITY Namespaced file capabilities were introduced in 8db6c34f1dbc . When userspace reads an xattr for a namespaced capability, a virtualized representation of it is returned if the caller is in a user namespace owned by the capability's owning rootid. The function which performs this virtualization was not hooked up if CONFIG_SECURITY=n. Therefore in that case the original xattr was shown instead of the virtualized one. To test this using libcap-bin (*1), $ v=$(mktemp) $ unshare -Ur setcap cap_sys_admin-eip $v $ unshare -Ur setcap -v cap_sys_admin-eip $v /tmp/tmp.lSiIFRvt8Y: OK "setcap -v" verifies the values instead of setting them, and will check whether the rootid value is set. Therefore, with this bug un-fixed, and with CONFIG_SECURITY=n, setcap -v will fail: $ v=$(mktemp) $ unshare -Ur setcap cap_sys_admin=eip $v $ unshare -Ur setcap -v cap_sys_admin=eip $v nsowner[got=1000, want=0],/tmp/tmp.HHDiOOl9fY differs in [] Fix this bug by calling cap_inode_getsecurity() in security_inode_getsecurity() instead of returning -EOPNOTSUPP, when CONFIG_SECURITY=n. *1 - note, if libcap is too old for getcap to have the '-n' option, then use verify-caps instead. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=209689 Cc: Hervé Guillemet Acked-by: Casey Schaufler Signed-off-by: Serge Hallyn Signed-off-by: Andrew G. Morgan Signed-off-by: James Morris commit bb2da7651a47dc042cb7fc9c40cd77092b6b4445 Author: Wang Hai Date: Fri Dec 4 19:43:14 2020 +0800 openvswitch: fix error return code in validate_and_copy_dec_ttl() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Changing 'return start' to 'return action_start' can fix this bug. Fixes: 69929d4c49e1 ("net: openvswitch: fix TTL decrement action netlink message format") Reported-by: Hulk Robot Signed-off-by: Wang Hai Reviewed-by: Eelco Chaudron Link: https://lore.kernel.org/r/20201204114314.1596-1-wanghai38@huawei.com Signed-off-by: Jakub Kicinski commit ee4f52a8de2c6f78b01f10b4c330867d88c1653a Author: Zhang Changzhong Date: Fri Dec 4 16:48:56 2020 +0800 net: bridge: vlan: fix error return code in __vlan_add() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: f8ed289fab84 ("bridge: vlan: use br_vlan_(get|put)_master to deal with refcounts") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/1607071737-33875-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit b410f04eb5b482b5efc4eee90de81ad35d3d923b Author: Zhang Changzhong Date: Fri Dec 4 16:48:14 2020 +0800 ipv4: fix error return code in rtm_to_fib_config() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: d15662682db2 ("ipv4: Allow ipv6 gateway with ipv4 routes") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Reviewed-by: David Ahern Link: https://lore.kernel.org/r/1607071695-33740-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit 0b32e91fdfd87314af9943e69eb85a88adb4233c Author: Arnd Bergmann Date: Fri Dec 4 00:20:37 2020 +0100 ethernet: select CONFIG_CRC32 as needed A number of ethernet drivers require crc32 functionality to be avaialable in the kernel, causing a link error otherwise: arm-linux-gnueabi-ld: drivers/net/ethernet/agere/et131x.o: in function `et1310_setup_device_for_multicast': et131x.c:(.text+0x5918): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/cadence/macb_main.o: in function `macb_start_xmit': macb_main.c:(.text+0x4b88): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/faraday/ftgmac100.o: in function `ftgmac100_set_rx_mode': ftgmac100.c:(.text+0x2b38): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/freescale/fec_main.o: in function `set_multicast_list': fec_main.c:(.text+0x6120): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/freescale/fman/fman_dtsec.o: in function `dtsec_add_hash_mac_address': fman_dtsec.c:(.text+0x830): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/freescale/fman/fman_dtsec.o:fman_dtsec.c:(.text+0xb68): more undefined references to `crc32_le' follow arm-linux-gnueabi-ld: drivers/net/ethernet/netronome/nfp/nfpcore/nfp_hwinfo.o: in function `nfp_hwinfo_read': nfp_hwinfo.c:(.text+0x250): undefined reference to `crc32_be' arm-linux-gnueabi-ld: nfp_hwinfo.c:(.text+0x288): undefined reference to `crc32_be' arm-linux-gnueabi-ld: drivers/net/ethernet/netronome/nfp/nfpcore/nfp_resource.o: in function `nfp_resource_acquire': nfp_resource.c:(.text+0x144): undefined reference to `crc32_be' arm-linux-gnueabi-ld: nfp_resource.c:(.text+0x158): undefined reference to `crc32_be' arm-linux-gnueabi-ld: drivers/net/ethernet/nxp/lpc_eth.o: in function `lpc_eth_set_multicast_list': lpc_eth.c:(.text+0x1934): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/rocker/rocker_ofdpa.o: in function `ofdpa_flow_tbl_do': rocker_ofdpa.c:(.text+0x2e08): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/rocker/rocker_ofdpa.o: in function `ofdpa_flow_tbl_del': rocker_ofdpa.c:(.text+0x3074): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/rocker/rocker_ofdpa.o: in function `ofdpa_port_fdb': arm-linux-gnueabi-ld: drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.o: in function `mlx5dr_ste_calc_hash_index': dr_ste.c:(.text+0x354): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/net/ethernet/microchip/lan743x_main.o: in function `lan743x_netdev_set_multicast': lan743x_main.c:(.text+0x5dc4): undefined reference to `crc32_le' Add the missing 'select CRC32' entries in Kconfig for each of them. Signed-off-by: Arnd Bergmann Acked-by: Nicolas Ferre Acked-by: Madalin Bucur Acked-by: Mark Einon Acked-by: Simon Horman Link: https://lore.kernel.org/r/20201203232114.1485603-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit 1130b252480f3c98cf468e78c1c5c516b390a29c Author: Alex Elder Date: Thu Dec 3 15:51:06 2020 -0600 net: ipa: pass the correct size when freeing DMA memory When the coherent memory is freed in gsi_trans_pool_exit_dma(), we are mistakenly passing the size of a single element in the pool rather than the actual allocated size. Fix this bug. Fixes: 9dd441e4ed575 ("soc: qcom: ipa: GSI transactions") Reported-by: Stephen Boyd Tested-by: Sujit Kautkar Signed-off-by: Alex Elder Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201203215106.17450-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 65f33b35722952fa076811d5686bfd8a611a80fa Author: Mike Snitzer Date: Fri Dec 4 17:21:03 2020 -0500 block: fix incorrect branching in blk_max_size_offset() If non-zero 'chunk_sectors' is passed in to blk_max_size_offset() that override will be incorrectly ignored. Old blk_max_size_offset() branching, prior to commit 3ee16db390b4, must be used only if passed 'chunk_sectors' override is zero. Fixes: 3ee16db390b4 ("dm: fix IO splitting") Cc: stable@vger.kernel.org # 5.9 Reported-by: John Dorminy Signed-off-by: Mike Snitzer commit 4eef8b1f36f2ff06966b8f7c2143ef0c447877de Author: Davide Caratti Date: Thu Dec 3 19:40:47 2020 +0100 net/sched: fq_pie: initialize timer earlier in fq_pie_init() with the following tdc testcase: 83be: (qdisc, fq_pie) Create FQ-PIE with invalid number of flows as fq_pie_init() fails, fq_pie_destroy() is called to clean up. Since the timer is not yet initialized, it's possible to observe a splat like this: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 0 PID: 975 Comm: tc Not tainted 5.10.0-rc4+ #298 Hardware name: Red Hat KVM, BIOS 1.11.1-4.module+el8.1.0+4066+0f1aadab 04/01/2014 Call Trace: dump_stack+0x99/0xcb register_lock_class+0x12dd/0x1750 __lock_acquire+0xfe/0x3970 lock_acquire+0x1c8/0x7f0 del_timer_sync+0x49/0xd0 fq_pie_destroy+0x3f/0x80 [sch_fq_pie] qdisc_create+0x916/0x1160 tc_modify_qdisc+0x3c4/0x1630 rtnetlink_rcv_msg+0x346/0x8e0 netlink_unicast+0x439/0x630 netlink_sendmsg+0x719/0xbf0 sock_sendmsg+0xe2/0x110 ____sys_sendmsg+0x5ba/0x890 ___sys_sendmsg+0xe9/0x160 __sys_sendmsg+0xd3/0x170 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 [...] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: 0x0 WARNING: CPU: 0 PID: 975 at lib/debugobjects.c:508 debug_print_object+0x162/0x210 [...] Call Trace: debug_object_assert_init+0x268/0x380 try_to_del_timer_sync+0x6a/0x100 del_timer_sync+0x9e/0xd0 fq_pie_destroy+0x3f/0x80 [sch_fq_pie] qdisc_create+0x916/0x1160 tc_modify_qdisc+0x3c4/0x1630 rtnetlink_rcv_msg+0x346/0x8e0 netlink_rcv_skb+0x120/0x380 netlink_unicast+0x439/0x630 netlink_sendmsg+0x719/0xbf0 sock_sendmsg+0xe2/0x110 ____sys_sendmsg+0x5ba/0x890 ___sys_sendmsg+0xe9/0x160 __sys_sendmsg+0xd3/0x170 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 fix it moving timer_setup() before any failure, like it was done on 'red' with former commit 608b4adab178 ("net_sched: initialize timer earlier in red_init()"). Fixes: ec97ecf1ebe4 ("net: sched: add Flow Queue PIE packet scheduler") Signed-off-by: Davide Caratti Reviewed-by: Cong Wang Link: https://lore.kernel.org/r/2e78e01c504c633ebdff18d041833cf2e079a3a4.1607020450.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit bcee5278958802b40ee8b26679155a6d9231783e Author: Steven Rostedt (VMware) Date: Fri Dec 4 16:36:16 2020 -0500 tracing: Fix userstacktrace option for instances When the instances were able to use their own options, the userstacktrace option was left hardcoded for the top level. This made the instance userstacktrace option bascially into a nop, and will confuse users that set it, but nothing happens (I was confused when it happened to me!) Cc: stable@vger.kernel.org Fixes: 16270145ce6b ("tracing: Add trace options for core options to instances") Signed-off-by: Steven Rostedt (VMware) commit b3298500b23f0b53a8d81e0d5ad98a29db71f4f0 Merge: e87297fa080a7 bde3808bc8c27 Author: Linus Torvalds Date: Fri Dec 4 13:28:39 2020 -0800 Merge tag 'for-5.10/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Fix DM's bio splitting changes that were made during v5.9. This restores splitting in terms of varied per-target ti->max_io_len rather than use block core's single stacked 'chunk_sectors' limit. - Like DM crypt, update DM integrity to not use crypto drivers that have CRYPTO_ALG_ALLOCATES_MEMORY set. - Fix DM writecache target's argument parsing and status display. - Remove needless BUG() from dm writecache's persistent_memory_claim() - Remove old gcc workaround in DM cache target's block_div() for ARM link errors now that gcc >= 4.9 is required. - Fix RCU locking in dm_blk_report_zones and dm_dax_zero_page_range. - Remove old, and now frowned upon, BUG_ON(in_interrupt()) in dm_table_event(). - Remove invalid sparse annotations from dm_prepare_ioctl() and dm_unprepare_ioctl(). * tag 'for-5.10/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: remove invalid sparse __acquires and __releases annotations dm: fix double RCU unlock in dm_dax_zero_page_range() error path dm: fix IO splitting dm writecache: remove BUG() and fail gracefully instead dm table: Remove BUG_ON(in_interrupt()) dm: fix bug with RCU locking in dm_blk_report_zones Revert "dm cache: fix arm link errors with inline" dm writecache: fix the maximum number of arguments dm writecache: advance the number of arguments when reporting max_age dm integrity: don't use drivers that have CRYPTO_ALG_ALLOCATES_MEMORY commit bde3808bc8c2741ad3d804f84720409aee0c2972 Author: Mike Snitzer Date: Fri Dec 4 15:25:18 2020 -0500 dm: remove invalid sparse __acquires and __releases annotations Fixes sparse warnings: drivers/md/dm.c:508:12: warning: context imbalance in 'dm_prepare_ioctl' - wrong count at exit drivers/md/dm.c:543:13: warning: context imbalance in 'dm_unprepare_ioctl' - wrong count at exit Fixes: 971888c46993f ("dm: hold DM table for duration of ioctl rather than use blkdev_get") Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit f05c4403db5bba881d4964e731f6da35be46aabd Author: Mike Snitzer Date: Fri Dec 4 15:19:27 2020 -0500 dm: fix double RCU unlock in dm_dax_zero_page_range() error path Remove redundant dm_put_live_table() in dm_dax_zero_page_range() error path to fix sparse warning: drivers/md/dm.c:1208:9: warning: context imbalance in 'dm_dax_zero_page_range' - unexpected unlock Fixes: cdf6cdcd3b99a ("dm,dax: Add dax zero_page_range operation") Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit 3ee16db390b42b8a21f2ad2ea2518f3469c6e532 Author: Mike Snitzer Date: Mon Nov 30 10:57:43 2020 -0500 dm: fix IO splitting Commit 882ec4e609c1 ("dm table: stack 'chunk_sectors' limit to account for target-specific splitting") caused a couple regressions: 1) Using lcm_not_zero() when stacking chunk_sectors was a bug because chunk_sectors must reflect the most limited of all devices in the IO stack. 2) DM targets that set max_io_len but that do _not_ provide an .iterate_devices method no longer had there IO split properly. And commit 5091cdec56fa ("dm: change max_io_len() to use blk_max_size_offset()") also caused a regression where DM no longer supported varied (per target) IO splitting. The implication being the potential for severely reduced performance for IO stacks that use a DM target like dm-cache to hide performance limitations of a slower device (e.g. one that requires 4K IO splitting). Coming full circle: Fix all these issues by discontinuing stacking chunk_sectors up using ti->max_io_len in dm_calculate_queue_limits(), add optional chunk_sectors override argument to blk_max_size_offset() and update DM's max_io_len() to pass ti->max_io_len to its blk_max_size_offset() call. Passing in an optional chunk_sectors override to blk_max_size_offset() allows for code reuse of block's centralized calculation for max IO size based on provided offset and split boundary. Fixes: 882ec4e609c1 ("dm table: stack 'chunk_sectors' limit to account for target-specific splitting") Fixes: 5091cdec56fa ("dm: change max_io_len() to use blk_max_size_offset()") Cc: stable@vger.kernel.org Reported-by: John Dorminy Reported-by: Bruce Johnston Reported-by: Kirill Tkhai Reviewed-by: John Dorminy Signed-off-by: Mike Snitzer Reviewed-by: Jens Axboe commit a1cdfbe8f0fb2ada84fcc3dbb5ff8fdf288a99b6 Merge: bbe2ba04c5a92 bdeca45a0cc58 Author: Jakub Kicinski Date: Fri Dec 4 11:26:28 2020 -0800 Merge tag 'mac80211-for-net-2020-12-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Three small fixes: * initialize some data to avoid using stack garbage * fix 6 GHz channel selection in mac80211 * correctly restart monitor mode interfaces in mac80211 * tag 'mac80211-for-net-2020-12-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211: mac80211: set SDATA_STATE_RUNNING for monitor interfaces cfg80211: initialize rekey_data mac80211: fix return value of ieee80211_chandef_he_6ghz_oper ==================== Link: https://lore.kernel.org/r/20201204122017.118099-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit e87297fa080a7ed6b431873c771b3801cab573f5 Merge: bbe2ba04c5a92 de9b485d1dc99 Author: Linus Torvalds Date: Fri Dec 4 09:25:22 2020 -0800 Merge tag 'drm-fixes-2020-12-04' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "This week's regular fixes. i915 has fixes for a few races, use-after-free, and gpu hangs. Tegra just has some minor fixes that I didn't see much point in hanging on to. The nouveau fix is for all pre-nv50 cards and was reported a few times. Otherwise it's just some amdgpu, and a few misc fixes. Summary: amdgpu: - SMU11 manual fan fix - Renoir display clock fix - VCN3 dynamic powergating fix i915: - Program mocs:63 for cache eviction on gen9 (Chris) - Protect context lifetime with RCU (Chris) - Split the breadcrumb spinlock between global and contexts (Chris) - Retain default context state across shrinking (Venkata) - Limit frequency drop to RPe on parking (Chris) - Return earlier from intel_modeset_init() without display (Jani) - Defer initial modeset until after GGTT is initialized (Chris) nouveau: - pre-nv50 regression fix rockchip: - uninitialised LVDS property fix omap: - bridge fix panel: - race fix mxsfb: - fence sync fix - modifiers fix tegra: - idr init fix - sor fixes - output/of cleanup fix" * tag 'drm-fixes-2020-12-04' of git://anongit.freedesktop.org/drm/drm: (22 commits) drm/amdgpu/vcn3.0: remove old DPG workaround drm/amdgpu/vcn3.0: stall DPG when WPTR/RPTR reset drm/amd/display: Init clock value by current vbios CLKs drm/amdgpu/pm/smu11: Fix fan set speed bug drm/i915/display: Defer initial modeset until after GGTT is initialised drm/i915/display: return earlier from intel_modeset_init() without display drm/i915/gt: Limit frequency drop to RPe on parking drm/i915/gt: Retain default context state across shrinking drm/i915/gt: Split the breadcrumb spinlock between global and contexts drm/i915/gt: Protect context lifetime with RCU drm/i915/gt: Program mocs:63 for cache eviction on gen9 drm/omap: sdi: fix bridge enable/disable drm/panel: sony-acx565akm: Fix race condition in probe drm/rockchip: Avoid uninitialized use of endpoint id in LVDS drm/tegra: sor: Disable clocks on error in tegra_sor_init() drm/nouveau: make sure ret is initialized in nouveau_ttm_io_mem_reserve drm: mxsfb: Implement .format_mod_supported drm: mxsfb: fix fence synchronization drm/tegra: output: Do not put OF node twice drm/tegra: replace idr_init() by idr_init_base() ... commit c8bcd9c5be24fb9e6132e97da5a35e55a83e36b9 Author: Jann Horn Date: Thu Dec 3 02:25:05 2020 +0100 tty: Fix ->session locking Currently, locking of ->session is very inconsistent; most places protect it using the legacy tty mutex, but disassociate_ctty(), __do_SAK(), tiocspgrp() and tiocgsid() don't. Two of the writers hold the ctrl_lock (because they already need it for ->pgrp), but __proc_set_tty() doesn't do that yet. On a PREEMPT=y system, an unprivileged user can theoretically abuse this broken locking to read 4 bytes of freed memory via TIOCGSID if tiocgsid() is preempted long enough at the right point. (Other things might also go wrong, especially if root-only ioctls are involved; I'm not sure about that.) Change the locking on ->session such that: - tty_lock() is held by all writers: By making disassociate_ctty() hold it. This should be fine because the same lock can already be taken through the call to tty_vhangup_session(). The tricky part is that we need to shorten the area covered by siglock to be able to take tty_lock() without ugly retry logic; as far as I can tell, this should be fine, since nothing in the signal_struct is touched in the `if (tty)` branch. - ctrl_lock is held by all writers: By changing __proc_set_tty() to hold the lock a little longer. - All readers that aren't holding tty_lock() hold ctrl_lock: By adding locking to tiocgsid() and __do_SAK(), and expanding the area covered by ctrl_lock in tiocspgrp(). Cc: stable@kernel.org Signed-off-by: Jann Horn Reviewed-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit 54ffccbf053b5b6ca4f6e45094b942fab92a25fc Author: Jann Horn Date: Thu Dec 3 02:25:04 2020 +0100 tty: Fix ->pgrp locking in tiocspgrp() tiocspgrp() takes two tty_struct pointers: One to the tty that userspace passed to ioctl() (`tty`) and one to the TTY being changed (`real_tty`). These pointers are different when ioctl() is called with a master fd. To properly lock real_tty->pgrp, we must take real_tty->ctrl_lock. This bug makes it possible for racing ioctl(TIOCSPGRP, ...) calls on both sides of a PTY pair to corrupt the refcount of `struct pid`, leading to use-after-free errors. Fixes: 47f86834bbd4 ("redo locking of tty->pgrp") CC: stable@kernel.org Signed-off-by: Jann Horn Reviewed-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman commit 12c8a8ca117f3d734babc3fba131fdaa329d2163 Author: Zhang Changzhong Date: Fri Dec 4 18:21:16 2020 +0800 xsk: Return error code if force_zc is set If force_zc is set, we should exit out with an error, not fall back to copy mode. Fixes: 921b68692abb ("xsk: Enable sharing of dma mappings") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/1607077277-41995-1-git-send-email-zhangchangzhong@huawei.com commit a4b98a7512f18534ce33a7e98e49115af59ffa00 Author: Vamsi Krishna Samavedam Date: Mon Nov 30 12:34:53 2020 -0800 usb: gadget: f_fs: Use local copy of descriptors for userspace copy The function may be unbound causing the ffs_ep and its descriptors to be freed while userspace is in the middle of an ioctl requesting the same descriptors. Avoid dangling pointer reference by first making a local copy of desctiptors before releasing the spinlock. Fixes: c559a3534109 ("usb: gadget: f_fs: add ioctl returning ep descriptor") Reviewed-by: Peter Chen Signed-off-by: Vamsi Krishna Samavedam Signed-off-by: Jack Pham Cc: stable Link: https://lore.kernel.org/r/20201130203453.28154-1-jackp@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 45c5775460f32ed8cdb7c16986ae1a2c254346b3 Author: Linus Walleij Date: Mon Nov 30 09:30:33 2020 +0100 usb: ohci-omap: Fix descriptor conversion There were a bunch of issues with the patch converting the OMAP1 OSK board to use descriptors for controlling the USB host: - The chip label was incorrect - The GPIO offset was off-by-one - The code should use sleeping accessors This patch tries to fix all issues at the same time. Cc: Aaro Koskinen Reported-by: Aaro Koskinen Fixes: 15d157e87443 ("usb: ohci-omap: Convert to use GPIO descriptors") Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20201130083033.29435-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit 97ad4a77f23e30801d2c0ef0c12b59f0e5760e6e Author: Greg Kroah-Hartman Date: Fri Dec 4 16:01:23 2020 +0100 Revert "usb-storage: fix sdev->host->dma_dev" This reverts commit 0154012f8018bba4d9971d1007c12ffd48539ddb as Hans reports it causes problems on some systems. Until a "real" fix for this can be found, revert this change to get normal functionality back. Link: https://lore.kernel.org/r/70ca74c2-4a80-e25b-eca9-a63a75516673@redhat.com Cc: Tom Yan Cc: Alan Stern Tested-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit d5c65d32dc240bf600d9e54250a8133e93ece60a Author: Greg Kroah-Hartman Date: Fri Dec 4 16:00:34 2020 +0100 Revert "uas: fix sdev->host->dma_dev" This reverts commit 558033c2828f832ab3b68c6f8b8710e0de6faef0 as Hans reports it causes problems on some systems. Until a "real" fix for this can be found, revert this change to get normal functionality back. Link: https://lore.kernel.org/r/70ca74c2-4a80-e25b-eca9-a63a75516673@redhat.com Cc: Tom Yan Cc: Alan Stern Tested-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit da881ded10a65885cdcb87ab817eea3acf23dcf9 Author: Greg Kroah-Hartman Date: Fri Dec 4 15:59:27 2020 +0100 Revert "uas: bump hw_max_sectors to 2048 blocks for SS or faster drives" This reverts commit 5df7ef7d32fec1d6d1c34dbec019b461a12ce870 as Hans reports it causes problems on some systems. Until a "real" fix for this can be found, revert this change to get normal functionality back. Link: https://lore.kernel.org/r/70ca74c2-4a80-e25b-eca9-a63a75516673@redhat.com Cc: Tom Yan Cc: Alan Stern Tested-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman commit c0d638a03bc5dfdb08fb95d0a79ecada25f40da8 Author: Arnd Bergmann Date: Thu Dec 3 23:29:16 2020 +0100 mmc: mediatek: mark PM functions as __maybe_unused The #ifdef check for the suspend/resume functions is wrong: drivers/mmc/host/mtk-sd.c:2765:12: error: unused function 'msdc_suspend' [-Werror,-Wunused-function] static int msdc_suspend(struct device *dev) drivers/mmc/host/mtk-sd.c:2779:12: error: unused function 'msdc_resume' [-Werror,-Wunused-function] static int msdc_resume(struct device *dev) Remove the #ifdef and mark all four as __maybe_unused to aovid the problem. Fixes: c0a2074ac575 ("mmc: mediatek: Fix system suspend/resume support for CQHCI") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201203222922.1067522-1-arnd@kernel.org Signed-off-by: Ulf Hansson commit 6246d7c9d15aaff0bc3863f67900c6a6e6be921b Author: Bean Huo Date: Wed Dec 2 21:23:20 2020 +0100 mmc: block: Fixup condition for CMD13 polling for RPMB requests The CMD13 polling is needed for commands with R1B responses. In commit a0d4c7eb71dd ("mmc: block: Add CMD13 polling for MMC IOCTLS with R1B response"), the intent was to introduce this for requests targeted to the RPMB partition. However, the condition to trigger the polling loop became wrong, leading to unnecessary polling. Let's fix the condition to avoid this. Fixes: a0d4c7eb71dd ("mmc: block: Add CMD13 polling for MMC IOCTLS with R1B response") Cc: stable@vger.kernel.org Reported-by: Zhan Liu Signed-off-by: Zhan Liu Signed-off-by: Bean Huo Link: https://lore.kernel.org/r/20201202202320.22165-1-huobean@gmail.com Signed-off-by: Ulf Hansson commit b48a7e755939940136266248e79f9e4bdbe99521 Merge: d3f31301894d1 3f203f057edfc Author: Greg Kroah-Hartman Date: Fri Dec 4 13:15:55 2020 +0100 Merge tag 'usb-serial-5.10-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.10-rc7 Here's a fix for a regression in the option driver which has been backported to the stable trees and fix for a small memory leak on open in the kl5kusb105 driver. Included are also various new device ids. All but the memleak fix has been in linux-next and with no reported issues. * tag 'usb-serial-5.10-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: kl5kusb105: fix memleak on open USB: serial: ch341: sort device-id entries USB: serial: ch341: add new Product ID for CH341A USB: serial: option: fix Quectel BG96 matching USB: serial: option: add support for Thales Cinterion EXS82 USB: serial: option: add Fibocom NL668 variants commit bdeca45a0cc58f864f1eb2e919304203ff5c5f39 Author: Borwankar, Antara Date: Sun Nov 29 17:30:53 2020 +0200 mac80211: set SDATA_STATE_RUNNING for monitor interfaces During restarrt, mac80211 is supposed to reconfigure the driver. When there's a monitor interface, the interface is added and the channel context for it was created, but not assigned to it as it was not considered running during the restart. Fix this by setting SDATA_STATE_RUNNING while adding monitor interfaces. Signed-off-by: Borwankar, Antara Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.e1df99693a4c.I494579f28018c2d0b9d4083a664cf872c28405ae@changeid [reword commit log] Signed-off-by: Johannes Berg commit f495acd8851d7b345e5f0e521b2645b1e1f928a0 Author: Sara Sharon Date: Sun Nov 29 17:30:44 2020 +0200 cfg80211: initialize rekey_data In case we have old supplicant, the akm field is uninitialized. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201129172929.930f0ab7ebee.Ic546e384efab3f4a89f318eafddc3eb7d556aecb@changeid Signed-off-by: Johannes Berg commit 8fca2b8706f39f86312c086229e0cb364f8b4f97 Author: Wen Gong Date: Mon Nov 23 16:45:52 2020 +0800 mac80211: fix return value of ieee80211_chandef_he_6ghz_oper ieee80211_chandef_he_6ghz_oper() needs to return true if it determined a value 6 GHz chandef, fix that. Fixes: 1d00ce807efa ("mac80211: support S1G association") Signed-off-by: Wen Gong Link: https://lore.kernel.org/r/1606121152-3452-1-git-send-email-wgong@codeaurora.org [rewrite commit message] Signed-off-by: Johannes Berg commit 32a9e0c445fa5abfd8730461c3ae0be1860bc6b2 Author: Wolfram Sang Date: Wed Nov 25 21:49:53 2020 +0100 mmc: tmio: improve bringing HW to a sane state with MMC_POWER_OFF Further testing of error cases revealed that downgrade is not enough, so we need to reset the SCC which is done by calling the custom reset function. This reset function can distinguish between the various SDHI variants, so protecting the call with MIN_RCAR2 is enough here. Fixes: 24ce2d7b8bea ("mmc: tmio: bring tuning HW to a sane state with MMC_POWER_OFF") Reported-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201125204953.3344-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 3f203f057edfcf6bd02c6b942799262bfcf31f73 Author: Johan Hovold Date: Fri Dec 4 09:55:19 2020 +0100 USB: serial: kl5kusb105: fix memleak on open Fix memory leak of control-message transfer buffer on successful open(). Fixes: 6774d5f53271 ("USB: serial: kl5kusb105: fix open error path") Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 4e302c3b568eaf2aeebba804c07aba5d921a8c9e Author: Diego Santa Cruz Date: Thu Dec 3 22:47:03 2020 +0100 misc: eeprom: at24: fix NVMEM name with custom AT24 device name When the "label" property is set on the AT24 EEPROM the NVMEM devid is set to NVMEM_DEVID_NONE, but it is not effective since there is a leftover line setting it back to NVMEM_DEVID_AUTO a few lines after. Fixes: 61f764c307f6 ("eeprom: at24: Support custom device names for AT24 EEPROMs") Signed-off-by: Diego Santa Cruz Signed-off-by: Bartosz Golaszewski commit 47a0001436352c9853d72bf2071e85b316d688a2 Author: Coiby Xu Date: Wed Nov 25 21:03:19 2020 +0800 pinctrl: amd: remove debounce filter setting in IRQ type setting Debounce filter setting should be independent from IRQ type setting because according to the ACPI specs, there are separate arguments for specifying debounce timeout and IRQ type in GpioIo() and GpioInt(). Together with commit 06abe8291bc31839950f7d0362d9979edc88a666 ("pinctrl: amd: fix incorrect way to disable debounce filter") and Andy's patch "gpiolib: acpi: Take into account debounce settings" [1], this will fix broken touchpads for laptops whose BIOS set the debounce timeout to a relatively large value. For example, the BIOS of Lenovo AMD gaming laptops including Legion-5 15ARH05 (R7000), Legion-5P (R7000P) and IdeaPad Gaming 3 15ARH05, set the debounce timeout to 124.8ms. This led to the kernel receiving only ~7 HID reports per second from the Synaptics touchpad (MSFT0001:00 06CB:7F28). Existing touchpads like [2][3] are not troubled by this bug because the debounce timeout has been set to 0 by the BIOS before enabling the debounce filter in setting IRQ type. [1] https://lore.kernel.org/linux-gpio/20201111222008.39993-11-andriy.shevchenko@linux.intel.com/ 8dcb7a15a585 ("gpiolib: acpi: Take into account debounce settings") [2] https://github.com/Syniurge/i2c-amd-mp2/issues/11#issuecomment-721331582 [3] https://forum.manjaro.org/t/random-short-touchpad-freezes/30832/28 Signed-off-by: Coiby Xu Reviewed-by: Andy Shevchenko Cc: Hans de Goede Cc: Andy Shevchenko Cc: Benjamin Tissoires Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-gpio/CAHp75VcwiGREBUJ0A06EEw-SyabqYsp%2Bdqs2DpSrhaY-2GVdAA%40mail.gmail.com/ BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1887190 Link: https://lore.kernel.org/r/20201125130320.311059-1-coiby.xu@gmail.com Signed-off-by: Linus Walleij commit 339f5a7fb2d6350fdb11f067da5240fd97e4f284 Author: Rick Edgecombe Date: Thu Dec 3 15:11:20 2020 -0800 kvm: x86/mmu: Use cpuid to determine max gfn In the TDP MMU, use shadow_phys_bits to dermine the maximum possible GFN mapped in the guest for zapping operations. boot_cpu_data.x86_phys_bits may be reduced in the case of HW features that steal HPA bits for other purposes. However, this doesn't necessarily reduce GPA space that can be accessed via TDP. So zap based on a maximum gfn calculated with MAXPHYADDR retrieved from CPUID. This is already stored in shadow_phys_bits, so use it instead of x86_phys_bits. Fixes: faaf05b00aec ("kvm: x86/mmu: Support zapping SPTEs in the TDP MMU") Signed-off-by: Rick Edgecombe Message-Id: <20201203231120.27307-1-rick.p.edgecombe@intel.com> Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit a2b2d4bf5076832339762556b816eec58ca38f77 Author: Jacob Xu Date: Thu Dec 3 12:59:39 2020 -0800 kvm: svm: de-allocate svm_cpu_data for all cpus in svm_cpu_uninit() The cpu arg for svm_cpu_uninit() was previously ignored resulting in the per cpu structure svm_cpu_data not being de-allocated for all cpus. Signed-off-by: Jacob Xu Message-Id: <20201203205939.1783969-1-jacobhxu@google.com> Signed-off-by: Paolo Bonzini commit 77c12bf3839479c3963433043e2051d738f3ab63 Merge: b65054597872c 7ee1a01e47403 Author: Linus Walleij Date: Fri Dec 4 09:14:56 2020 +0100 Merge tag 'gpio-fixes-for-v5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes gpio fixes for v5.10-rc7 - disable pm_runtime in error path in gpio-arizona - fix a NULL pointer dereference in gpio-dwapb - fix a resource leak in gpio-zynq - balance the freeing of pinctrl ranges if PINCTRL is not selected - fix a potential use-after-free error in gpio-mvebu commit de9b485d1dc993f1fb579b5d15a8176284627f4a Merge: 5353219ffdff6 fd4e788e971ce Author: Dave Airlie Date: Fri Dec 4 11:53:43 2020 +1000 Merge tag 'drm-misc-fixes-2020-12-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes One bridge fix for OMAP, one for a race condition in a panel, two for uninitialized variables in rockchip and nouveau, and two fixes for mxsfb to fix a regression with modifiers and a fix for a fence synchronization issue. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201203125943.h2ft2xoywunt5orl@gilmour commit 5353219ffdff68f861684a642388d6e926547698 Merge: 94cfbd05e46a3 efd6d85a18102 Author: Dave Airlie Date: Fri Dec 4 11:48:37 2020 +1000 Merge tag 'amd-drm-fixes-5.10-2020-12-02' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.10-2020-12-02: amdgpu: - SMU11 manual fan fix - Renoir display clock fix - VCN3 dynamic powergating fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201203044815.41257-1-alexander.deucher@amd.com commit 94cfbd05e46a31cc181e7ac6bc4b32ac09f8864f Merge: aac06646aa857 ccc9e67ab26fe Author: Dave Airlie Date: Fri Dec 4 11:45:37 2020 +1000 Merge tag 'drm-intel-fixes-2020-12-03' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Fixes for GPU hang, null dereference, suspend-resume, power consumption, and use-after-free. - Program mocs:63 for cache eviction on gen9 (Chris) - Protect context lifetime with RCU (Chris) - Split the breadcrumb spinlock between global and contexts (Chris) - Retain default context state across shrinking (Venkata) - Limit frequency drop to RPe on parking (Chris) - Return earlier from intel_modeset_init() without display (Jani) - Defer initial modeset until after GGTT is initialized (Chris) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20201203134705.GA1575873@intel.com commit ea64370bcae126a88cd26a16f1abcc23ab2b9a55 Author: Ronnie Sahlberg Date: Mon Nov 30 11:29:20 2020 +1000 cifs: refactor create_sd_buf() and and avoid corrupting the buffer When mounting with "idsfromsid" mount option, Azure corrupted the owner SIDs due to excessive padding caused by placing the owner fields at the end of the security descriptor on create. Placing owners at the front of the security descriptor (rather than the end) is also safer, as the number of ACEs (that follow it) are variable. Signed-off-by: Ronnie Sahlberg Suggested-by: Rohith Surabattula CC: Stable # v5.8 Signed-off-by: Steve French commit 59463eb88829f646aed13283fd84d02a475334fe Author: Aurelien Aptel Date: Thu Dec 3 19:46:08 2020 +0100 cifs: add NULL check for ses->tcon_ipc In some scenarios (DFS and BAD_NETWORK_NAME) set_root_set() can be called with a NULL ses->tcon_ipc. Signed-off-by: Aurelien Aptel Reviewed-by: Paulo Alcantara (SUSE) CC: Stable Signed-off-by: Steve French commit 796317848517292eb951d8876773b98867cf3c28 Author: Namjae Jeon Date: Thu Dec 3 12:31:36 2020 +0900 smb3: set COMPOUND_FID to FileID field of subsequent compound request For an operation compounded with an SMB2 CREATE request, client must set COMPOUND_FID(0xFFFFFFFFFFFFFFFF) to FileID field of smb2 ioctl. Signed-off-by: Namjae Jeon Fixes: 2e4564b31b645 ("smb3: add support stat of WSL reparse points for special file types") Reviewed-by: Aurelien Aptel Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit bbe2ba04c5a92a49db8a42c850a5a2f6481e47eb Merge: fee5be18524f9 6f076ce6ab163 Author: Linus Torvalds Date: Thu Dec 3 13:10:11 2020 -0800 Merge tag 'net-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes for 5.10-rc7, including fixes from bpf, netfilter, wireless drivers, wireless mesh and can. Current release - regressions: - mt76: usb: fix crash on device removal Current release - always broken: - xsk: Fix umem cleanup from wrong context in socket destruct Previous release - regressions: - net: ip6_gre: set dev->hard_header_len when using header_ops - ipv4: Fix TOS mask in inet_rtm_getroute() - net, xsk: Avoid taking multiple skbuff references Previous release - always broken: - net/x25: prevent a couple of overflows - netfilter: ipset: prevent uninit-value in hash_ip6_add - geneve: pull IP header before ECN decapsulation - mpls: ensure LSE is pullable in TC and openvswitch paths - vxlan: respect needed_headroom of lower device - batman-adv: Consider fragmentation for needed packet headroom - can: drivers: don't count arbitration loss as an error - netfilter: bridge: reset skb->pkt_type after POST_ROUTING traversal - inet_ecn: Fix endianness of checksum update when setting ECT(1) - ibmvnic: fix various corner cases around reset handling - net/mlx5: fix rejecting unsupported Connect-X6DX SW steering - net/mlx5: Enforce HW TX csum offload with kTLS" * tag 'net-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (62 commits) net/mlx5: DR, Proper handling of unsupported Connect-X6DX SW steering net/mlx5e: kTLS, Enforce HW TX csum offload with kTLS net: mlx5e: fix fs_tcp.c build when IPV6 is not enabled net/mlx5: Fix wrong address reclaim when command interface is down net/sched: act_mpls: ensure LSE is pullable before reading it net: openvswitch: ensure LSE is pullable before reading it net: skbuff: ensure LSE is pullable before decrementing the MPLS ttl net: mvpp2: Fix error return code in mvpp2_open() chelsio/chtls: fix a double free in chtls_setkey() rtw88: debug: Fix uninitialized memory in debugfs code vxlan: fix error return code in __vxlan_dev_create() net: pasemi: fix error return code in pasemi_mac_open() cxgb3: fix error return code in t3_sge_alloc_qset() net/x25: prevent a couple of overflows dpaa_eth: copy timestamp fields to new skb in A-050385 workaround net: ip6_gre: set dev->hard_header_len when using header_ops mt76: usb: fix crash on device removal iwlwifi: pcie: add some missing entries for AX210 iwlwifi: pcie: invert values of NO_160 device config entries iwlwifi: pcie: add one missing entry for AX210 ... commit eeaf06af6f87e1dba371fbe42674e6f963220b9c Author: Dan Carpenter Date: Thu Dec 3 15:18:26 2020 +0300 scsi: be2iscsi: Revert "Fix a theoretical leak in beiscsi_create_eqs()" My patch caused kernel Oopses and delays in boot. Revert it. The problem was that I moved the "mem->dma = paddr;" before the call to be_fill_queue(). But the first thing that the be_fill_queue() function does is memset the whole struct to zero which overwrites the assignment. Link: https://lore.kernel.org/r/X8jXkt6eThjyVP1v@mwanda Fixes: 38b2db564d9a ("scsi: be2iscsi: Fix a theoretical leak in beiscsi_create_eqs()") Cc: stable Reported-by: Thomas Lamprecht Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit fee5be18524f961de653fe6103f927c84ebbfd38 Merge: c82a505c007fb b1cae1f84a0f6 Author: Linus Torvalds Date: Thu Dec 3 11:58:26 2020 -0800 Merge tag 's390-5.10-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Heiko Carstens: "One commit is fixing lockdep irq state tracing which broke with -rc6. The other one fixes logical vs physical CPU address mixup in our PCI code. Summary: - fix lockdep irq state tracing - fix logical vs physical CPU address confusion in PCI code" * tag 's390-5.10-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: fix irq state tracing s390/pci: fix CPU address in MSI for directed IRQ commit c82a505c007fb754af144d5157e05fa7fd858157 Merge: 72d1249e2ffdb 960f4f8a4e60d Author: Linus Torvalds Date: Thu Dec 3 11:47:13 2020 -0800 Merge tag '9p-for-5.10-rc7' of git://github.com/martinetd/linux Pull 9p fixes from Dominique Martinet: "Restore splice functionality for 9p" * tag '9p-for-5.10-rc7' of git://github.com/martinetd/linux: fs: 9p: add generic splice_write file operation fs: 9p: add generic splice_read file operations commit 6f076ce6ab1631abf566a6fb830c02fe5797be9a Merge: 9608fa653059c d421e466c2373 Author: Jakub Kicinski Date: Thu Dec 3 11:18:37 2020 -0800 Merge branch 'mlx5-fixes-2020-12-01' Saeed Mahameed says: ==================== mlx5 fixes 2020-12-01 This series introduces some fixes to mlx5 driver. ==================== Link: https://lore.kernel.org/r/20201203043946.235385-1-saeedm@nvidia.com Signed-off-by: Jakub Kicinski commit d421e466c2373095f165ddd25cbabd6c5b077928 Author: Yevgeny Kliteynik Date: Wed Dec 2 20:39:46 2020 -0800 net/mlx5: DR, Proper handling of unsupported Connect-X6DX SW steering STEs format for Connect-X5 and Connect-X6DX different. Currently, on Connext-X6DX the SW steering would break at some point when building STEs w/o giving a proper error message. Fix this by checking the STE format of the current device when initializing domain: add mlx5_ifc definitions for Connect-X6DX SW steering, read FW capability to get the current format version, and check this version when domain is being created. Fixes: 26d688e33f88 ("net/mlx5: DR, Add Steering entry (STE) utilities") Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit b336e6b25e2d053c482ee4339787e6428f390864 Author: Tariq Toukan Date: Wed Dec 2 20:39:45 2020 -0800 net/mlx5e: kTLS, Enforce HW TX csum offload with kTLS Checksum calculation cannot be done in SW for TX kTLS HW offloaded packets. Offload it to the device, disregard the declared state of the TX csum offload feature. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit 8a78a440108e55ddd845b0ef46df575248667520 Author: Randy Dunlap Date: Wed Dec 2 20:39:44 2020 -0800 net: mlx5e: fix fs_tcp.c build when IPV6 is not enabled Fix build when CONFIG_IPV6 is not enabled by making a function be built conditionally. Fixes these build errors and warnings: ../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c: In function 'accel_fs_tcp_set_ipv6_flow': ../include/net/sock.h:380:34: error: 'struct sock_common' has no member named 'skc_v6_daddr'; did you mean 'skc_daddr'? 380 | #define sk_v6_daddr __sk_common.skc_v6_daddr | ^~~~~~~~~~~~ ../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:55:14: note: in expansion of macro 'sk_v6_daddr' 55 | &sk->sk_v6_daddr, 16); | ^~~~~~~~~~~ At top level: ../drivers/net/ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c:47:13: warning: 'accel_fs_tcp_set_ipv6_flow' defined but not used [-Wunused-function] 47 | static void accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct sock *sk) Fixes: 5229a96e59ec ("net/mlx5e: Accel, Expose flow steering API for rules add/del") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Signed-off-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit 1d2bb5ad89f47d8ce8aedc70ef85059ab3870292 Author: Eran Ben Elisha Date: Wed Dec 2 20:39:43 2020 -0800 net/mlx5: Fix wrong address reclaim when command interface is down When command interface is down, driver to reclaim all 4K page chucks that were hold by the Firmeware. Fix a bug for 64K page size systems, where driver repeatedly released only the first chunk of the page. Define helper function to fill 4K chunks for a given Firmware pages. Iterate over all unreleased Firmware pages and call the hepler per each. Fixes: 5adff6a08862 ("net/mlx5: Fix incorrect page count when in internal error") Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit 9608fa653059c3f72faab0c148ac8773c46e7314 Author: Davide Caratti Date: Thu Dec 3 10:37:52 2020 +0100 net/sched: act_mpls: ensure LSE is pullable before reading it when 'act_mpls' is used to mangle the LSE, the current value is read from the packet dereferencing 4 bytes at mpls_hdr(): ensure that the label is contained in the skb "linear" area. Found by code inspection. v2: - use MPLS_HLEN instead of sizeof(new_lse), thanks to Jakub Kicinski Fixes: 2a2ea50870ba ("net: sched: add mpls manipulation actions to TC") Signed-off-by: Davide Caratti Acked-by: Guillaume Nault Link: https://lore.kernel.org/r/3243506cba43d14858f3bd21ee0994160e44d64a.1606987058.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit 43c13605bad44b8abbc9776d6e63f62ccb7a47d6 Author: Davide Caratti Date: Thu Dec 3 10:46:06 2020 +0100 net: openvswitch: ensure LSE is pullable before reading it when openvswitch is configured to mangle the LSE, the current value is read from the packet dereferencing 4 bytes at mpls_hdr(): ensure that the label is contained in the skb "linear" area. Found by code inspection. Fixes: d27cf5c59a12 ("net: core: add MPLS update core helper and use in OvS") Signed-off-by: Davide Caratti Link: https://lore.kernel.org/r/aa099f245d93218b84b5c056b67b6058ccf81a66.1606987185.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit 13de4ed9e3a9ccbe54d05f7d5c773f69ecaf6c64 Author: Davide Caratti Date: Thu Dec 3 10:58:21 2020 +0100 net: skbuff: ensure LSE is pullable before decrementing the MPLS ttl skb_mpls_dec_ttl() reads the LSE without ensuring that it is contained in the skb "linear" area. Fix this calling pskb_may_pull() before reading the current ttl. Found by code inspection. Fixes: 2a2ea50870ba ("net: sched: add mpls manipulation actions to TC") Reported-by: Marcelo Ricardo Leitner Signed-off-by: Davide Caratti Link: https://lore.kernel.org/r/53659f28be8bc336c113b5254dc637cc76bbae91.1606987074.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit 6392b5b28e0e00171018ecd3ced3554f95b9bb46 Merge: 82a10dc7f0960 74a8c816fa8fa Author: Jakub Kicinski Date: Thu Dec 3 10:59:28 2020 -0800 Merge tag 'wireless-drivers-2020-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.10 Second, and most likely final, set of fixes for v5.10. Small fixes and PCI id addtions. iwlwifi * PCI id additions mt76 * fix a kernel crash during device removal rtw88 * fix uninitialized memory in debugfs code * tag 'wireless-drivers-2020-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers: rtw88: debug: Fix uninitialized memory in debugfs code mt76: usb: fix crash on device removal iwlwifi: pcie: add some missing entries for AX210 iwlwifi: pcie: invert values of NO_160 device config entries iwlwifi: pcie: add one missing entry for AX210 iwlwifi: update MAINTAINERS entry ==================== Link: https://lore.kernel.org/r/20201203183408.EE88AC43461@smtp.codeaurora.org Signed-off-by: Jakub Kicinski commit 82a10dc7f0960735f40e8d7d3bee56934291600f Author: Wang Hai Date: Thu Dec 3 22:18:06 2020 +0800 net: mvpp2: Fix error return code in mvpp2_open() Fix to return negative error code -ENOENT from invalid configuration error handling case instead of 0, as done elsewhere in this function. Fixes: 4bb043262878 ("net: mvpp2: phylink support") Reported-by: Hulk Robot Signed-off-by: Wang Hai Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201203141806.37966-1-wanghai38@huawei.com Signed-off-by: Jakub Kicinski commit 391119fb5c5c4bdb4d57c7ffeb5e8d18560783d1 Author: Dan Carpenter Date: Thu Dec 3 11:44:31 2020 +0300 chelsio/chtls: fix a double free in chtls_setkey() The "skb" is freed by the transmit code in cxgb4_ofld_send() and we shouldn't use it again. But in the current code, if we hit an error later on in the function then the clean up code will call kfree_skb(skb) and so it causes a double free. Set the "skb" to NULL and that makes the kfree_skb() a no-op. Fixes: d25f2f71f653 ("crypto: chtls - Program the TLS session Key") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X8ilb6PtBRLWiSHp@mwanda Signed-off-by: Jakub Kicinski commit 72d1249e2ffdbc344e465031ec5335fa3489d62e Author: Eric Sandeen Date: Tue Dec 1 17:21:40 2020 -0600 uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT STATX_ATTR_MOUNT_ROOT and STATX_ATTR_DAX got merged with the same value, so one of them needs fixing. Move STATX_ATTR_DAX. While we're in here, clarify the value-matching scheme for some of the attributes, and explain why the value for DAX does not match. Fixes: 80340fe3605c ("statx: add mount_root") Fixes: 712b2698e4c0 ("fs/stat: Define DAX statx attribute") Link: https://lore.kernel.org/linux-fsdevel/7027520f-7c79-087e-1d00-743bdefa1a1e@redhat.com/ Link: https://lore.kernel.org/lkml/20201202214629.1563760-1-ira.weiny@intel.com/ Reported-by: David Howells Signed-off-by: Eric Sandeen Reviewed-by: David Howells Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Ira Weiny Cc: # 5.8 Signed-off-by: Linus Torvalds commit 062c9cdf60a1e581b1002d372f1cf8e745fe3c16 Author: Uwe Kleine-König Date: Thu Dec 3 09:41:42 2020 +0100 pwm: sl28cpld: fix getting driver data in pwm callbacks Currently .get_state() and .apply() use dev_get_drvdata() on the struct device related to the pwm chip. This only works after .probe() called platform_set_drvdata() which in this driver happens only after pwmchip_add() and so comes possibly too late. Instead of setting the driver data earlier use the traditional container_of approach as this way the driver data is conceptually and computational nearer. Fixes: 9db33d221efc ("pwm: Add support for sl28cpld PWM controller") Tested-by: Michael Walle Signed-off-by: Uwe Kleine-König Signed-off-by: Linus Torvalds commit 4f134b89a24b965991e7c345b9a4591821f7c2a6 Author: Willy Tarreau Date: Mon Nov 30 08:36:48 2020 +0100 lib/syscall: fix syscall registers retrieval on 32-bit platforms Lilith >_> and Claudio Bozzato of Cisco Talos security team reported that collect_syscall() improperly casts the syscall registers to 64-bit values leaking the uninitialized last 24 bytes on 32-bit platforms, that are visible in /proc/self/syscall. The cause is that info->data.args are u64 while syscall_get_arguments() uses longs, as hinted by the bogus pointer cast in the function. Let's just proceed like the other call places, by retrieving the registers into an array of longs before assigning them to the caller's array. This was successfully tested on x86_64, i386 and ppc32. Reference: CVE-2020-28588, TALOS-2020-1211 Fixes: 631b7abacd02 ("ptrace: Remove maxargs from task_current_syscall()") Cc: Greg KH Reviewed-by: Kees Cook Tested-by: Michael Ellerman (ppc32) Signed-off-by: Willy Tarreau Reviewed-by: Thomas Gleixner Signed-off-by: Linus Torvalds commit 0c55f867f0c96dff93d4e0b5973975d65afb26d8 Author: Maciej S. Szmigiero Date: Wed Dec 2 21:35:36 2020 +0100 selftests: kvm/set_memory_region_test: Fix race in move region test The current memory region move test correctly handles the situation that the second (realigning) memslot move operation would temporarily trigger MMIO until it completes, however it does not handle the case in which the first (misaligning) move operation does this, too. This results in false test assertions in case it does so. Fix this by handling temporary MMIO from the first memslot move operation in the test guest code, too. Fixes: 8a0639fe9201 ("KVM: sefltests: Add explicit synchronization to move mem region test") Signed-off-by: Maciej S. Szmigiero Message-Id: <0fdddb94bb0e31b7da129a809a308d91c10c0b5e.1606941224.git.maciej.szmigiero@oracle.com> Signed-off-by: Paolo Bonzini commit 8dcc0e19dfbd73ad6b3172924d6da8f7f3f8b3b0 Author: Mike Travis Date: Thu Dec 3 09:22:52 2020 -0600 x86/platform/uv: Fix UV4 hub revision adjustment Currently, UV4 is incorrectly identified as UV4A and UV4A as UV5. Hub chip starts with revision 1, fix it. [ bp: Massage commit message. ] Fixes: 647128f1536e ("x86/platform/uv: Update UV MMRs for UV5") Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Acked-by: Dimitri Sivanich Link: https://lkml.kernel.org/r/20201203152252.371199-1-mike.travis@hpe.com commit 74a8c816fa8fa7862df870660e9821abb56649fe Author: Dan Carpenter Date: Thu Dec 3 11:43:37 2020 +0300 rtw88: debug: Fix uninitialized memory in debugfs code This code does not ensure that the whole buffer is initialized and none of the callers check for errors so potentially none of the buffer is initialized. Add a memset to eliminate this bug. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/X8ilOfVz3pf0T5ec@mwanda commit bf193bfc12dbc3754fc8a6e0e1e3702f1af2f772 Author: Johan Hovold Date: Thu Dec 3 10:11:59 2020 +0100 USB: serial: ch341: sort device-id entries Keep the device-id entries sorted to make it easier to add new ones in the right spot. Reviewed-by: Greg Kroah-Hartman Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 46ee4abb10a07bd8f8ce910ee6b4ae6a947d7f63 Author: Jan-Niklas Burfeind Date: Thu Dec 3 04:03:59 2020 +0100 USB: serial: ch341: add new Product ID for CH341A Add PID for CH340 that's found on a ch341 based Programmer made by keeyees. The specific device that contains the serial converter is described here: http://www.keeyees.com/a/Products/ej/36.html The driver works flawlessly as soon as the new PID (0x5512) is added to it. Signed-off-by: Jan-Niklas Burfeind Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit fc17db8aa4c53cbd2d5469bb0521ea0f0a6dbb27 Author: Stephane Eranian Date: Thu Nov 26 20:09:22 2020 +0900 perf/x86/intel: Check PEBS status correctly The kernel cannot disambiguate when 2+ PEBS counters overflow at the same time. This is what the comment for this code suggests. However, I see the comparison is done with the unfiltered p->status which is a copy of IA32_PERF_GLOBAL_STATUS at the time of the sample. This register contains more than the PEBS counter overflow bits. It also includes many other bits which could also be set. Signed-off-by: Namhyung Kim Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201126110922.317681-2-namhyung@kernel.org commit 5debf02131227d39988e44adf5090fb796fa8466 Author: Namhyung Kim Date: Thu Nov 26 20:09:21 2020 +0900 perf/x86/intel: Fix a warning on x86_pmu_stop() with large PEBS The commit 3966c3feca3f ("x86/perf/amd: Remove need to check "running" bit in NMI handler") introduced this. It seems x86_pmu_stop can be called recursively (like when it losts some samples) like below: x86_pmu_stop intel_pmu_disable_event (x86_pmu_disable) intel_pmu_pebs_disable intel_pmu_drain_pebs_nhm (x86_pmu_drain_pebs_buffer) x86_pmu_stop While commit 35d1ce6bec13 ("perf/x86/intel/ds: Fix x86_pmu_stop warning for large PEBS") fixed it for the normal cases, there's another path to call x86_pmu_stop() recursively when a PEBS error was detected (like two or more counters overflowed at the same time). Like in the Kan's previous fix, we can skip the interrupt accounting for large PEBS, so check the iregs which is set for PMI only. Fixes: 3966c3feca3f ("x86/perf/amd: Remove need to check "running" bit in NMI handler") Reported-by: John Sperbeck Suggested-by: Peter Zijlstra Signed-off-by: Namhyung Kim Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201126110922.317681-1-namhyung@kernel.org commit 4d916140bf28ff027997144ea1bb4299e1536f87 Author: Peter Zijlstra Date: Mon Nov 30 12:54:34 2020 +0100 intel_idle: Build fix Because CONFIG_ soup. Fixes: 6e1d2bc675bd ("intel_idle: Fix intel_idle() vs tracing") Reported-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201130115402.GO3040@hirez.programming.kicks-ass.net commit efd6d85a18102241538dd1cc257948a0dbe6fae6 Author: Boyuan Zhang Date: Tue May 19 11:38:44 2020 -0400 drm/amdgpu/vcn3.0: remove old DPG workaround Port from VCN2.5 SCRATCH2 is used to keep decode wptr as a workaround which fix a hardware DPG decode wptr update bug for vcn2.5 beforehand. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit ac2db9488cf21de0be7899c1e5963e5ac0ff351f Author: Boyuan Zhang Date: Sun May 10 15:47:03 2020 -0400 drm/amdgpu/vcn3.0: stall DPG when WPTR/RPTR reset Port from VCN2.5 Add vcn dpg harware synchronization to fix race condition issue between vcn driver and hardware. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit 7e0b367db85ef7b91399006253759a024eab7653 Author: Brandon Syu Date: Thu Nov 12 15:35:52 2020 +0800 drm/amd/display: Init clock value by current vbios CLKs [Why] While booting into OS, driver updates DPP/DISP CLKs. But init clock value is zero which is invalid. [How] Get current clocks value to update init clocks. To avoid underflow. Signed-off-by: Brandon Syu Reviewed-by: Tony Cheng Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit acab02c1af43d3a9051524579b1c3dcfbfa5479d Author: Arunpravin Date: Fri Nov 27 21:40:24 2020 +0530 drm/amdgpu/pm/smu11: Fix fan set speed bug Fix fan set speed calculation. Suggested-by: Kenneth Feng Signed-off-by: Arunpravin Acked-by: Alex Deucher Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 832e09798c261cf58de3a68cfcc6556408c16a5a Author: Zhang Changzhong Date: Wed Dec 2 17:58:42 2020 +0800 vxlan: fix error return code in __vxlan_dev_create() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 0ce1822c2a08 ("vxlan: add adjacent link to limit depth level") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1606903122-2098-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit aba84871bd4f52c4dfcf3ad5d4501a6c9d2de90e Author: Zhang Changzhong Date: Wed Dec 2 17:57:15 2020 +0800 net: pasemi: fix error return code in pasemi_mac_open() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 72b05b9940f0 ("pasemi_mac: RX/TX ring management cleanup") Fixes: 8d636d8bc5ff ("pasemi_mac: jumbo frame support") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1606903035-1838-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit ff9924897f8bfed82e61894b373ab9d2dfea5b10 Author: Zhang Changzhong Date: Wed Dec 2 17:56:05 2020 +0800 cxgb3: fix error return code in t3_sge_alloc_qset() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: b1fb1f280d09 ("cxgb3 - Fix dma mapping error path") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Acked-by: Raju Rangoju Link: https://lore.kernel.org/r/1606902965-1646-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit aac06646aa85772eed49931d721e917209cabb51 Merge: b65054597872c bf3a3cdcad40e Author: Dave Airlie Date: Thu Dec 3 11:34:06 2020 +1000 Merge tag 'drm/tegra/for-5.10-rc7' of ssh://git.freedesktop.org/git/tegra/linux into drm-fixes drm/tegra: Fixes for v5.10-rc7 This is a set of small fixes for various issues found during the last couple of weeks. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20201127145324.125776-1-thierry.reding@gmail.com commit 6ee50c8e262a0f0693dad264c3c99e30e6442a56 Author: Dan Carpenter Date: Tue Dec 1 18:15:12 2020 +0300 net/x25: prevent a couple of overflows The .x25_addr[] address comes from the user and is not necessarily NUL terminated. This leads to a couple problems. The first problem is that the strlen() in x25_bind() can read beyond the end of the buffer. The second problem is more subtle and could result in memory corruption. The call tree is: x25_connect() --> x25_write_internal() --> x25_addr_aton() The .x25_addr[] buffers are copied to the "addresses" buffer from x25_write_internal() so it will lead to stack corruption. Verify that the strings are NUL terminated and return -EINVAL if they are not. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Fixes: a9288525d2ae ("X25: Dont let x25_bind use addresses containing characters") Reported-by: "kiyin(尹亮)" Signed-off-by: Dan Carpenter Acked-by: Martin Schiller Link: https://lore.kernel.org/r/X8ZeAKm8FnFpN//B@mwanda Signed-off-by: Jakub Kicinski commit 34816d20f173a90389c8a7e641166d8ea9dce70a Merge: 3bb61aa618284 dd0ecf5441256 Author: Linus Torvalds Date: Wed Dec 2 17:25:23 2020 -0800 Merge tag 'gfs2-v5.10-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fixes from Andreas Gruenbacher: "Various gfs2 fixes" * tag 'gfs2-v5.10-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix deadlock between gfs2_{create_inode,inode_lookup} and delete_work_func gfs2: Upgrade shared glocks for atime updates gfs2: Don't freeze the file system during unmount gfs2: check for empty rgrp tree in gfs2_ri_update gfs2: set lockdep subclass for iopen glocks gfs2: Fix deadlock dumping resource group glocks commit ccc9e67ab26feda7e62749bb54c05d7abe07dca9 Author: Chris Wilson Date: Wed Nov 25 19:30:32 2020 +0000 drm/i915/display: Defer initial modeset until after GGTT is initialised Prior to sanitizing the GGTT, the only operations allowed in intel_display_init_nogem() are those to reserve the preallocated (and active) regions in the GGTT leftover from the BIOS. Trying to allocate a GGTT vma (such as intel_pin_and_fence_fb_obj during the initial modeset) may then conflict with other preallocated regions that have not yet been protected. Move the initial modesetting from the end of init_nogem to the beginning of init so that any vma pinning (either framebuffers or DSB, for example), is after the GGTT is ready to handle it. This will prevent the DSB object from being destroyed too early: [ 53.449241] BUG: KASAN: use-after-free in i915_init_ggtt+0x324/0x9e0 [i915] [ 53.449309] Read of size 8 at addr ffff88811b1e8070 by task systemd-udevd/345 [ 53.449399] CPU: 1 PID: 345 Comm: systemd-udevd Tainted: G W 5.10.0-rc5+ #12 [ 53.449409] Call Trace: [ 53.449418] dump_stack+0x9a/0xcc [ 53.449558] ? i915_init_ggtt+0x324/0x9e0 [i915] [ 53.449565] print_address_description.constprop.0+0x3e/0x60 [ 53.449577] ? _raw_spin_lock_irqsave+0x4e/0x50 [ 53.449718] ? i915_init_ggtt+0x324/0x9e0 [i915] [ 53.449849] ? i915_init_ggtt+0x324/0x9e0 [i915] [ 53.449857] kasan_report.cold+0x1f/0x37 [ 53.449993] ? i915_init_ggtt+0x324/0x9e0 [i915] [ 53.450130] i915_init_ggtt+0x324/0x9e0 [i915] [ 53.450273] ? i915_ggtt_suspend+0x1f0/0x1f0 [i915] [ 53.450281] ? static_obj+0x69/0x80 [ 53.450289] ? lockdep_init_map_waits+0xa9/0x310 [ 53.450431] ? intel_wopcm_init+0x96/0x3d0 [i915] [ 53.450581] ? i915_gem_init+0x75/0x2d0 [i915] [ 53.450720] i915_gem_init+0x75/0x2d0 [i915] [ 53.450852] i915_driver_probe+0x8c2/0x1210 [i915] [ 53.450993] ? i915_pm_prepare+0x630/0x630 [i915] [ 53.451006] ? check_chain_key+0x1e7/0x2e0 [ 53.451025] ? __pm_runtime_resume+0x58/0xb0 [ 53.451157] i915_pci_probe+0xa6/0x2b0 [i915] [ 53.451285] ? i915_pci_remove+0x40/0x40 [i915] [ 53.451295] ? lockdep_hardirqs_on_prepare+0x124/0x230 [ 53.451302] ? _raw_spin_unlock_irqrestore+0x42/0x50 [ 53.451309] ? lockdep_hardirqs_on+0xbf/0x130 [ 53.451315] ? preempt_count_sub+0xf/0xb0 [ 53.451321] ? _raw_spin_unlock_irqrestore+0x2f/0x50 [ 53.451335] pci_device_probe+0xf9/0x190 [ 53.451350] really_probe+0x17f/0x5b0 [ 53.451365] driver_probe_device+0x13a/0x1c0 [ 53.451376] device_driver_attach+0x82/0x90 [ 53.451386] ? device_driver_attach+0x90/0x90 [ 53.451391] __driver_attach+0xab/0x190 [ 53.451401] ? device_driver_attach+0x90/0x90 [ 53.451407] bus_for_each_dev+0xe4/0x140 [ 53.451414] ? subsys_dev_iter_exit+0x10/0x10 [ 53.451423] ? __list_add_valid+0x2b/0xa0 [ 53.451440] bus_add_driver+0x227/0x2e0 [ 53.451454] driver_register+0xd3/0x150 [ 53.451585] i915_init+0x92/0xac [i915] [ 53.451592] ? 0xffffffffa0a20000 [ 53.451598] do_one_initcall+0xb6/0x3b0 [ 53.451606] ? trace_event_raw_event_initcall_finish+0x150/0x150 [ 53.451614] ? __kasan_kmalloc.constprop.0+0xc2/0xd0 [ 53.451627] ? kmem_cache_alloc_trace+0x4a4/0x8e0 [ 53.451634] ? kasan_unpoison_shadow+0x33/0x40 [ 53.451649] do_init_module+0xf8/0x350 [ 53.451662] load_module+0x43de/0x47f0 [ 53.451716] ? module_frob_arch_sections+0x20/0x20 [ 53.451731] ? rw_verify_area+0x5f/0x130 [ 53.451780] ? __do_sys_finit_module+0x10d/0x1a0 [ 53.451785] __do_sys_finit_module+0x10d/0x1a0 [ 53.451792] ? __ia32_sys_init_module+0x40/0x40 [ 53.451800] ? seccomp_do_user_notification.isra.0+0x5c0/0x5c0 [ 53.451829] ? rcu_read_lock_bh_held+0xb0/0xb0 [ 53.451835] ? mark_held_locks+0x24/0x90 [ 53.451856] do_syscall_64+0x33/0x80 [ 53.451863] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 53.451868] RIP: 0033:0x7fde09b4470d [ 53.451875] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 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 53 f7 0c 00 f7 d8 64 89 01 48 [ 53.451880] RSP: 002b:00007ffd6abc1718 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 53.451890] RAX: ffffffffffffffda RBX: 000056444e528150 RCX: 00007fde09b4470d [ 53.451895] RDX: 0000000000000000 RSI: 00007fde09a21ded RDI: 000000000000000f [ 53.451899] RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000000 [ 53.451904] R10: 000000000000000f R11: 0000000000000246 R12: 00007fde09a21ded [ 53.451909] R13: 0000000000000000 R14: 000056444e329200 R15: 000056444e528150 [ 53.451957] Allocated by task 345: [ 53.451995] kasan_save_stack+0x1b/0x40 [ 53.452001] __kasan_kmalloc.constprop.0+0xc2/0xd0 [ 53.452006] kmem_cache_alloc+0x1cd/0x8d0 [ 53.452146] i915_vma_instance+0x126/0xb70 [i915] [ 53.452304] i915_gem_object_ggtt_pin_ww+0x222/0x3f0 [i915] [ 53.452446] intel_dsb_prepare+0x14f/0x230 [i915] [ 53.452588] intel_atomic_commit+0x183/0x690 [i915] [ 53.452730] intel_initial_commit+0x2bc/0x2f0 [i915] [ 53.452871] intel_modeset_init_nogem+0xa02/0x2af0 [i915] [ 53.452995] i915_driver_probe+0x8af/0x1210 [i915] [ 53.453120] i915_pci_probe+0xa6/0x2b0 [i915] [ 53.453125] pci_device_probe+0xf9/0x190 [ 53.453131] really_probe+0x17f/0x5b0 [ 53.453136] driver_probe_device+0x13a/0x1c0 [ 53.453142] device_driver_attach+0x82/0x90 [ 53.453148] __driver_attach+0xab/0x190 [ 53.453153] bus_for_each_dev+0xe4/0x140 [ 53.453158] bus_add_driver+0x227/0x2e0 [ 53.453164] driver_register+0xd3/0x150 [ 53.453286] i915_init+0x92/0xac [i915] [ 53.453292] do_one_initcall+0xb6/0x3b0 [ 53.453297] do_init_module+0xf8/0x350 [ 53.453302] load_module+0x43de/0x47f0 [ 53.453307] __do_sys_finit_module+0x10d/0x1a0 [ 53.453312] do_syscall_64+0x33/0x80 [ 53.453318] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 53.453345] Freed by task 82: [ 53.453379] kasan_save_stack+0x1b/0x40 [ 53.453384] kasan_set_track+0x1c/0x30 [ 53.453389] kasan_set_free_info+0x1b/0x30 [ 53.453394] __kasan_slab_free+0x112/0x160 [ 53.453399] kmem_cache_free+0xb2/0x3f0 [ 53.453536] i915_gem_flush_free_objects+0x31a/0x3b0 [i915] [ 53.453542] process_one_work+0x519/0x9f0 [ 53.453547] worker_thread+0x75/0x5c0 [ 53.453552] kthread+0x1da/0x230 [ 53.453557] ret_from_fork+0x22/0x30 [ 53.453584] The buggy address belongs to the object at ffff88811b1e8040 which belongs to the cache i915_vma of size 968 [ 53.453692] The buggy address is located 48 bytes inside of 968-byte region [ffff88811b1e8040, ffff88811b1e8408) [ 53.453792] The buggy address belongs to the page: [ 53.453842] page:00000000b35f7048 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88811b1ef940 pfn:0x11b1e8 [ 53.453847] head:00000000b35f7048 order:3 compound_mapcount:0 compound_pincount:0 [ 53.453853] flags: 0x8000000000010200(slab|head) [ 53.453860] raw: 8000000000010200 ffff888115596248 ffff888115596248 ffff8881155b6340 [ 53.453866] raw: ffff88811b1ef940 0000000000170001 00000001ffffffff 0000000000000000 [ 53.453870] page dumped because: kasan: bad access detected [ 53.453895] Memory state around the buggy address: [ 53.453944] ffff88811b1e7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 53.454011] ffff88811b1e7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 53.454079] >ffff88811b1e8000: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb [ 53.454146] ^ [ 53.454211] ffff88811b1e8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.454279] ffff88811b1e8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.454347] ================================================================== [ 53.454414] Disabling lock debugging due to kernel taint [ 53.454434] general protection fault, probably for non-canonical address 0xdead0000000000d0: 0000 [#1] PREEMPT SMP KASAN PTI [ 53.454446] CPU: 1 PID: 345 Comm: systemd-udevd Tainted: G B W 5.10.0-rc5+ #12 [ 53.454592] RIP: 0010:i915_init_ggtt+0x26f/0x9e0 [i915] [ 53.454602] Code: 89 8d 48 ff ff ff 4c 8d 60 d0 49 39 c7 0f 84 37 02 00 00 4c 89 b5 40 ff ff ff 4d 8d bc 24 90 00 00 00 4c 89 ff e8 c1 97 f8 e0 <49> 83 bc 24 90 00 00 00 00 0f 84 0f 02 00 00 49 8d 7c 24 08 e8 a8 [ 53.454618] RSP: 0018:ffff88812247f430 EFLAGS: 00010286 [ 53.454625] RAX: 0000000000000000 RBX: ffff888136440000 RCX: ffffffffa03fb78f [ 53.454633] RDX: 0000000000000000 RSI: 0000000000000008 RDI: dead000000000160 [ 53.454641] RBP: ffff88812247f500 R08: ffffffff8113589f R09: 0000000000000000 [ 53.454648] R10: ffffffff83063843 R11: fffffbfff060c708 R12: dead0000000000d0 [ 53.454656] R13: ffff888136449ba0 R14: 0000000000002000 R15: dead000000000160 [ 53.454664] FS: 00007fde095c4880(0000) GS:ffff88840c880000(0000) knlGS:0000000000000000 [ 53.454672] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 53.454679] CR2: 00007fef132b4f28 CR3: 000000012245c002 CR4: 00000000003706e0 [ 53.454686] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 53.454693] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 53.454700] Call Trace: [ 53.454833] ? i915_ggtt_suspend+0x1f0/0x1f0 [i915] Reported-by: Matthew Auld Fixes: afeda4f3b1c8 ("drm/i915/dsb: Pre allocate and late cleanup of cmd buffer") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Matthew Auld Cc: Lucas De Marchi Tested-by: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20201125193032.29282-1-chris@chris-wilson.co.uk (cherry picked from commit b3bf99daaee96a141536ce5c60a0d6dba6ec1d23) Signed-off-by: Rodrigo Vivi commit 37eade64eb11c6d548c9a7030ccc655decfb8fa0 Author: Jani Nikula Date: Fri Nov 6 14:55:27 2020 -0800 drm/i915/display: return earlier from intel_modeset_init() without display !HAS_DISPLAY() implies !HAS_OVERLAY(), skipping overlay setup anyway, so return earlier from intel_modeset_init() for clarity. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20201106225531.920641-4-lucas.demarchi@intel.com (cherry picked from commit 71c8415d0daa78ef1295743d0e11ba0214d0a9b9) Signed-off-by: Rodrigo Vivi commit aff76ab795364569b1cac58c1d0bc7df956e3899 Author: Chris Wilson Date: Tue Nov 24 18:35:21 2020 +0000 drm/i915/gt: Limit frequency drop to RPe on parking We treat idling the GT (intel_rps_park) as a downclock event, and reduce the frequency we intend to restart the GT with. Since the two workloads are likely related (e.g. a compositor rendering every 16ms), we want to carry the frequency and load information from across the idling. However, we do also need to update the frequencies so that workloads that run for less than 1ms are autotuned by RPS (otherwise we leave compositors running at max clocks, draining excess power). Conversely, if we try to run too slowly, the next workload has to run longer. Since there is a hysteresis in the power graph, below a certain frequency running a short workload for longer consumes more energy than running it slightly higher for less time. The exact balance point is unknown beforehand, but measurements with 30fps media playback indicate that RPe is a better choice. Reported-by: Edward Baker Tested-by: Edward Baker Fixes: 043cd2d14ede ("drm/i915/gt: Leave rps->cur_freq on unpark") Signed-off-by: Chris Wilson Cc: Edward Baker Cc: Andi Shyti Cc: Lyude Paul Cc: # v5.8+ Reviewed-by: Rodrigo Vivi Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20201124183521.28623-1-chris@chris-wilson.co.uk (cherry picked from commit f7ed83cc1925f0b8ce2515044d674354035c3af9) Signed-off-by: Rodrigo Vivi commit 78b2eb8a1f10f366681acad8d21c974c1f66791a Author: Venkata Ramana Nayana Date: Fri Nov 27 12:07:16 2020 +0000 drm/i915/gt: Retain default context state across shrinking As we use a shmemfs file to hold the context state, when not in use it may be swapped out, such as across suspend. Since we wrote into the shmemfs without marking the pages as dirty, the contents may be dropped instead of being written back to swap. On re-using the shmemfs file, such as creating a new context after resume, the contents of that file were likely garbage and so the new context could then hang the GPU. Simply mark the page as being written when copying into the shmemfs file, and it the new contents will be retained across swapout. Fixes: be1cb55a07bf ("drm/i915/gt: Keep a no-frills swappable copy of the default context state") Cc: Sudeep Dutt Cc: Matthew Auld Cc: Tvrtko Ursulin Cc: Ramalingam C Signed-off-by: CQ Tang Signed-off-by: Venkata Ramana Nayana Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Cc: # v5.8+ Link: https://patchwork.freedesktop.org/patch/msgid/20201127120718.454037-161-matthew.auld@intel.com (cherry picked from commit a9d71f76ccfd309f3bd5f7c9b60e91a4decae792) Signed-off-by: Rodrigo Vivi commit 2bfdf302465a5eab941e551e2869a96bb473f66f Author: Chris Wilson Date: Thu Nov 26 14:04:06 2020 +0000 drm/i915/gt: Split the breadcrumb spinlock between global and contexts As we funnel more and more contexts into the breadcrumbs on an engine, the hold time of b->irq_lock grows. As we may then contend with the b->irq_lock during request submission, this increases the burden upon the engine->active.lock and so directly impacts both our execution latency and client latency. If we split the b->irq_lock by introducing a per-context spinlock to manage the signalers within a context, we then only need the b->irq_lock for enabling/disabling the interrupt and can avoid taking the lock for walking the list of contexts within the signal worker. Even with the current setup, this greatly reduces the number of times we have to take and fight for b->irq_lock. Furthermore, this closes the race between enabling the signaling context while it is in the process of being signaled and removed: <4>[ 416.208555] list_add corruption. prev->next should be next (ffff8881951d5910), but was dead000000000100. (prev=ffff8882781bb870). <4>[ 416.208573] WARNING: CPU: 7 PID: 0 at lib/list_debug.c:28 __list_add_valid+0x4d/0x70 <4>[ 416.208575] Modules linked in: i915(+) vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio mei_hdcp x86_pkg_temp_thermal coretemp ax88179_178a usbnet mii crct10dif_pclmul snd_intel_dspcfg crc32_pclmul snd_hda_codec snd_hwdep ghash_clmulni_intel snd_hda_core e1000e snd_pcm ptp pps_core mei_me mei prime_numbers intel_lpss_pci [last unloaded: i915] <4>[ 416.208611] CPU: 7 PID: 0 Comm: swapper/7 Tainted: G U 5.8.0-CI-CI_DRM_8852+ #1 <4>[ 416.208614] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake Y LPDDR4x T4 RVP TLC, BIOS ICLSFWR1.R00.3212.A00.1905212112 05/21/2019 <4>[ 416.208627] RIP: 0010:__list_add_valid+0x4d/0x70 <4>[ 416.208631] Code: c3 48 89 d1 48 c7 c7 60 18 33 82 48 89 c2 e8 ea e0 b6 ff 0f 0b 31 c0 c3 48 89 c1 4c 89 c6 48 c7 c7 b0 18 33 82 e8 d3 e0 b6 ff <0f> 0b 31 c0 c3 48 89 f2 4c 89 c1 48 89 fe 48 c7 c7 00 19 33 82 e8 <4>[ 416.208633] RSP: 0018:ffffc90000280e18 EFLAGS: 00010086 <4>[ 416.208636] RAX: 0000000000000000 RBX: ffff888250a44880 RCX: 0000000000000105 <4>[ 416.208639] RDX: 0000000000000105 RSI: ffffffff82320c5b RDI: 00000000ffffffff <4>[ 416.208641] RBP: ffff8882781bb870 R08: 0000000000000000 R09: 0000000000000001 <4>[ 416.208643] R10: 00000000054d2957 R11: 000000006abbd991 R12: ffff8881951d58c8 <4>[ 416.208646] R13: ffff888286073880 R14: ffff888286073848 R15: ffff8881951d5910 <4>[ 416.208669] FS: 0000000000000000(0000) GS:ffff88829c180000(0000) knlGS:0000000000000000 <4>[ 416.208671] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>[ 416.208673] CR2: 0000556231326c48 CR3: 0000000005610001 CR4: 0000000000760ee0 <4>[ 416.208675] PKRU: 55555554 <4>[ 416.208677] Call Trace: <4>[ 416.208679] <4>[ 416.208751] i915_request_enable_breadcrumb+0x278/0x400 [i915] <4>[ 416.208839] __i915_request_submit+0xca/0x2a0 [i915] <4>[ 416.208892] __execlists_submission_tasklet+0x480/0x1830 [i915] <4>[ 416.208942] execlists_submission_tasklet+0xc4/0x130 [i915] <4>[ 416.208947] tasklet_action_common.isra.17+0x6c/0x1c0 <4>[ 416.208954] __do_softirq+0xdf/0x498 <4>[ 416.208960] ? handle_fasteoi_irq+0x150/0x150 <4>[ 416.208964] asm_call_on_stack+0xf/0x20 <4>[ 416.208966] <4>[ 416.208969] do_softirq_own_stack+0xa1/0xc0 <4>[ 416.208972] irq_exit_rcu+0xb5/0xc0 <4>[ 416.208976] common_interrupt+0xf7/0x260 <4>[ 416.208980] asm_common_interrupt+0x1e/0x40 <4>[ 416.208985] RIP: 0010:cpuidle_enter_state+0xb6/0x410 <4>[ 416.208987] Code: 00 31 ff e8 9c 3e 89 ff 80 7c 24 0b 00 74 12 9c 58 f6 c4 02 0f 85 31 03 00 00 31 ff e8 e3 6c 90 ff e8 fe a4 94 ff fb 45 85 ed <0f> 88 c7 02 00 00 49 63 c5 4c 2b 24 24 48 8d 14 40 48 8d 14 90 48 <4>[ 416.208989] RSP: 0018:ffffc90000143e70 EFLAGS: 00000206 <4>[ 416.208991] RAX: 0000000000000007 RBX: ffffe8ffffda8070 RCX: 0000000000000000 <4>[ 416.208993] RDX: 0000000000000000 RSI: ffffffff8238b4ee RDI: ffffffff8233184f <4>[ 416.208995] RBP: ffffffff826b4e00 R08: 0000000000000000 R09: 0000000000000000 <4>[ 416.208997] R10: 0000000000000001 R11: 0000000000000000 R12: 00000060e7f24a8f <4>[ 416.208998] R13: 0000000000000003 R14: 0000000000000003 R15: 0000000000000003 <4>[ 416.209012] cpuidle_enter+0x24/0x40 <4>[ 416.209016] do_idle+0x22f/0x2d0 <4>[ 416.209022] cpu_startup_entry+0x14/0x20 <4>[ 416.209025] start_secondary+0x158/0x1a0 <4>[ 416.209030] secondary_startup_64+0xa4/0xb0 <4>[ 416.209039] irq event stamp: 10186977 <4>[ 416.209042] hardirqs last enabled at (10186976): [] tasklet_action_common.isra.17+0xe3/0x1c0 <4>[ 416.209044] hardirqs last disabled at (10186977): [] _raw_spin_lock_irqsave+0xd/0x50 <4>[ 416.209047] softirqs last enabled at (10186968): [] irq_enter_rcu+0x6a/0x70 <4>[ 416.209049] softirqs last disabled at (10186969): [] asm_call_on_stack+0xf/0x20 <4>[ 416.209317] list_del corruption, ffff8882781bb870->next is LIST_POISON1 (dead000000000100) <4>[ 416.209317] WARNING: CPU: 7 PID: 46 at lib/list_debug.c:47 __list_del_entry_valid+0x4e/0x90 <4>[ 416.209317] Modules linked in: i915(+) vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio mei_hdcp x86_pkg_temp_thermal coretemp ax88179_178a usbnet mii crct10dif_pclmul snd_intel_dspcfg crc32_pclmul snd_hda_codec snd_hwdep ghash_clmulni_intel snd_hda_core e1000e snd_pcm ptp pps_core mei_me mei prime_numbers intel_lpss_pci [last unloaded: i915] <4>[ 416.209317] CPU: 7 PID: 46 Comm: ksoftirqd/7 Tainted: G U W 5.8.0-CI-CI_DRM_8852+ #1 <4>[ 416.209317] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake Y LPDDR4x T4 RVP TLC, BIOS ICLSFWR1.R00.3212.A00.1905212112 05/21/2019 <4>[ 416.209317] RIP: 0010:__list_del_entry_valid+0x4e/0x90 <4>[ 416.209317] Code: 2e 48 8b 32 48 39 fe 75 3a 48 8b 50 08 48 39 f2 75 48 b8 01 00 00 00 c3 48 89 fe 48 89 c2 48 c7 c7 38 19 33 82 e8 62 e0 b6 ff <0f> 0b 31 c0 c3 48 89 fe 48 c7 c7 70 19 33 82 e8 4e e0 b6 ff 0f 0b <4>[ 416.209317] RSP: 0018:ffffc90000280de8 EFLAGS: 00010086 <4>[ 416.209317] RAX: 0000000000000000 RBX: ffff8882781bb848 RCX: 0000000000010104 <4>[ 416.209317] RDX: 0000000000010104 RSI: ffffffff8238b4ee RDI: 00000000ffffffff <4>[ 416.209317] RBP: ffff8882781bb880 R08: 0000000000000000 R09: 0000000000000001 <4>[ 416.209317] R10: 000000009fb6666e R11: 00000000feca9427 R12: ffffc90000280e18 <4>[ 416.209317] R13: ffff8881951d5930 R14: dead0000000000d8 R15: ffff8882781bb880 <4>[ 416.209317] FS: 0000000000000000(0000) GS:ffff88829c180000(0000) knlGS:0000000000000000 <4>[ 416.209317] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>[ 416.209317] CR2: 0000556231326c48 CR3: 0000000005610001 CR4: 0000000000760ee0 <4>[ 416.209317] PKRU: 55555554 <4>[ 416.209317] Call Trace: <4>[ 416.209317] <4>[ 416.209317] remove_signaling_context.isra.13+0xd/0x70 [i915] <4>[ 416.209513] signal_irq_work+0x1f7/0x4b0 [i915] This is caused by virtual engines where although we take the breadcrumb lock on each of the active engines, they may be different engines on different requests, It turns out that the b->irq_lock was not a sufficient proxy for the engine->active.lock in the case of more than one request, so introduce an explicit lock around ce->signals. v2: ce->signal_lock is acquired with only RCU protection and so must be treated carefully and not cleared during reallocation. We also then need to confirm that the ce we lock is the same as we found in the breadcrumb list. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2276 Fixes: c18636f76344 ("drm/i915: Remove requirement for holding i915_request.lock for breadcrumbs") Fixes: 2854d866327a ("drm/i915/gt: Replace intel_engine_transfer_stale_breadcrumbs") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201126140407.31952-4-chris@chris-wilson.co.uk (cherry picked from commit c744d50363b714783bbc88d986cc16def13710f7) Signed-off-by: Rodrigo Vivi commit 9261a1db80bc81dd445cd6dcfb466b632ad9faa8 Author: Chris Wilson Date: Thu Nov 26 14:04:05 2020 +0000 drm/i915/gt: Protect context lifetime with RCU Allow a brief period for continued access to a dead intel_context by deferring the release of the struct until after an RCU grace period. As we are using a dedicated slab cache for the contexts, we can defer the release of the slab pages via RCU, with the caveat that individual structs may be reused from the freelist within an RCU grace period. To handle that, we have to avoid clearing members of the zombie struct. This is required for a later patch to handle locking around virtual requests in the signaler, as those requests may want to move between engines and be destroyed while we are holding b->irq_lock on a physical engine. v2: Drop mutex_reinit(), if we never mark the mutex as destroyed we don't need to reset the debug code, at the loss of having the mutex debug code spot us attempting to destroy a locked mutex. v3: As the intended use will remain strongly referenced counted, with very little inflight access across reuse, drop the ctor. v4: Drop the unrequired change to remove the temporary reference around dropping the active context, and add back some more missing ctor operations. v5: The ctor is back. Tvrtko spotted that ce->signal_lock [introduced later] maybe accessed under RCU and so needs special care not to be reinitialised. v6: Don't mix SLAB_TYPESAFE_BY_RCU and RCU list iteration. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201126140407.31952-3-chris@chris-wilson.co.uk (cherry picked from commit 14d1eaf08845c534963c83f754afe0cb14cb2512) Signed-off-by: Rodrigo Vivi commit 3413f04141aa440c71da187755e8e22f5093ce83 Author: Xuan Zhuo Date: Tue Dec 1 21:56:58 2020 +0800 xsk: Change the tx writeable condition Modify the tx writeable condition from the queue is not full to the number of present tx queues is less than the half of the total number of queues. Because the tx queue not full is a very short time, this will cause a large number of EPOLLOUT events, and cause a large number of process wake up. Fixes: 35fcde7f8deb ("xsk: support for Tx") Signed-off-by: Xuan Zhuo Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/508fef55188d4e1160747ead64c6dcda36735880.1606555939.git.xuanzhuo@linux.alibaba.com commit f5da54187e33dce9bea63170667dbb0ca8d98194 Author: Xuan Zhuo Date: Tue Dec 1 21:56:57 2020 +0800 xsk: Replace datagram_poll by sock_poll_wait datagram_poll will judge the current socket status (EPOLLIN, EPOLLOUT) based on the traditional socket information (eg: sk_wmem_alloc), but this does not apply to xsk. So this patch uses sock_poll_wait instead of datagram_poll, and the mask is calculated by xsk_poll. Fixes: c497176cb2e4 ("xsk: add Rx receive functions and poll support") Signed-off-by: Xuan Zhuo Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/e82f4697438cd63edbf271ebe1918db8261b7c09.1606555939.git.xuanzhuo@linux.alibaba.com commit 61e6fe59ede155881a622f5901551b1cc8748f6a Author: Christian Eggers Date: Fri Oct 9 13:03:20 2020 +0200 i2c: imx: Don't generate STOP condition if arbitration has been lost If arbitration is lost, the master automatically changes to slave mode. I2SR_IBB may or may not be reset by hardware. Raising a STOP condition by resetting I2CR_MSTA has no effect and will not clear I2SR_IBB. So calling i2c_imx_bus_busy() is not required and would busy-wait until timeout. Signed-off-by: Christian Eggers Tested (not extensively) on Vybrid VF500 (Toradex VF50): Tested-by: Krzysztof Kozlowski Acked-by: Oleksij Rempel Cc: stable@vger.kernel.org # Requires trivial backporting, simple remove # the 3rd argument from the calls to # i2c_imx_bus_busy(). Signed-off-by: Wolfram Sang commit 1de67a3dee7a279ebe4d892b359fe3696938ec15 Author: Christian Eggers Date: Fri Oct 9 13:03:19 2020 +0200 i2c: imx: Check for I2SR_IAL after every byte Arbitration Lost (IAL) can happen after every single byte transfer. If arbitration is lost, the I2C hardware will autonomously switch from master mode to slave. If a transfer is not aborted in this state, consecutive transfers will not be executed by the hardware and will timeout. Signed-off-by: Christian Eggers Tested (not extensively) on Vybrid VF500 (Toradex VF50): Tested-by: Krzysztof Kozlowski Acked-by: Oleksij Rempel Cc: stable@vger.kernel.org Signed-off-by: Wolfram Sang commit 384a9565f70a876c2e78e58c5ca0bbf0547e4f6d Author: Christian Eggers Date: Fri Oct 9 13:03:18 2020 +0200 i2c: imx: Fix reset of I2SR_IAL flag According to the "VFxxx Controller Reference Manual" (and the comment block starting at line 97), Vybrid requires writing a one for clearing an interrupt flag. Syncing the method for clearing I2SR_IIF in i2c_imx_isr(). Signed-off-by: Christian Eggers Fixes: 4b775022f6fd ("i2c: imx: add struct to hold more configurable quirks") Reviewed-by: Uwe Kleine-König Acked-by: Oleksij Rempel Cc: stable@vger.kernel.org Signed-off-by: Wolfram Sang commit 3bb61aa61828499a7d0f5e560051625fd02ae7e4 Merge: 2c6ffa9e9b11b 9e5344e0ffc33 Author: Linus Torvalds Date: Wed Dec 2 12:27:37 2020 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "I'm sad to say that we've got an unusually large arm64 fixes pull for rc7 which addresses numerous significant instrumentation issues with our entry code. Without these patches, lockdep is hopelessly unreliable in some configurations [1,2] and syzkaller is therefore not a lot of use because it's so noisy. Although much of this has always been broken, it appears to have been exposed more readily by other changes such as 044d0d6de9f5 ("lockdep: Only trace IRQ edges") and general lockdep improvements around IRQ tracing and NMIs. Fixing this properly required moving much of the instrumentation hooks from our entry assembly into C, which Mark has been working on for the last few weeks. We're not quite ready to move to the recently added generic functions yet, but the code here has been deliberately written to mimic that closely so we can look at cleaning things up once we have a bit more breathing room. Having said all that, the second version of these patches was posted last week and I pushed it into our CI (kernelci and cki) along with a commit which forced on PROVE_LOCKING, NOHZ_FULL and CONTEXT_TRACKING_FORCE. The result? We found a real bug in the md/raid10 code [3]. Oh, and there's also a really silly typo patch that's unrelated. Summary: - Fix numerous issues with instrumentation and exception entry - Fix hideous typo in unused register field definition" [1] https://lore.kernel.org/r/CACT4Y+aAzoJ48Mh1wNYD17pJqyEcDnrxGfApir=-j171TnQXhw@mail.gmail.com [2] https://lore.kernel.org/r/20201119193819.GA2601289@elver.google.com [3] https://lore.kernel.org/r/94c76d5e-466a-bc5f-e6c2-a11b65c39f83@redhat.com * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mte: Fix typo in macro definition arm64: entry: fix EL1 debug transitions arm64: entry: fix NMI {user, kernel}->kernel transitions arm64: entry: fix non-NMI kernel<->kernel transitions arm64: ptrace: prepare for EL1 irq/rcu tracking arm64: entry: fix non-NMI user<->kernel transitions arm64: entry: move el1 irq/nmi logic to C arm64: entry: prepare ret_to_user for function call arm64: entry: move enter_from_user_mode to entry-common.c arm64: entry: mark entry code as noinstr arm64: mark idle code as noinstr arm64: syscall: exit userspace before unmasking exceptions commit 2c6ffa9e9b11bdfa267fe05ad1e98d3491b4224f Merge: bb95d60783f1a 2c602741b51da Author: Linus Torvalds Date: Wed Dec 2 12:20:11 2020 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull vdpa fixes from Michael Tsirkin: "A couple of fixes that surfaced at the last minute" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost_vdpa: return -EFAULT if copy_to_user() fails vdpa: mlx5: fix vdpa/vhost dependencies commit bb95d60783f1ac85883c7ae33cafa85236b6179e Merge: 8a02ec8f35779 aeedad2504997 Author: Linus Torvalds Date: Wed Dec 2 12:14:03 2020 -0800 Merge tag 'sound-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here are the pending sound fixes for 5.10: all small device-specific fixes, and nothing particular stands out, so far" * tag 'sound-5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Add mute LED quirk to yet another HP x360 model ALSA: hda/realtek: Fix bass speaker DAC assignment on Asus Zephyrus G14 ALSA: hda/generic: Add option to enforce preferred_dacs pairs ALSA: usb-audio: US16x08: fix value count for level meters ALSA: hda/realtek - Add new codec supported for ALC897 ASoC: rt5682: change SAR voltage threshold ASoC: wm_adsp: fix error return code in wm_adsp_load() ALSA: hda/realtek: Enable headset of ASUS UX482EG & B9400CEA with ALC294 ASoC: qcom: Fix enabling BCLK and LRCLK in LPAIF invalid state ALSA: hda/realtek - Fixed Dell AIO wrong sound tone ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks commit 8a02ec8f35779335b81577903832c2b3c495e979 Merge: 509a15421674b 05227490c5f0f Author: Linus Torvalds Date: Wed Dec 2 12:09:36 2020 -0800 Merge tag 'trace-v5.10-rc6-bootconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull bootconfig fixes from Steven Rostedt: "Have bootconfig size and checksum be little endian In case the bootconfig is created on one kind of endian machine, and then read on the other kind of endian kernel, the size and checksum will be incorrect. Instead, have both the size and checksum always be little endian and have the tool and the kernel convert it from little endian to or from the host endian" * tag 'trace-v5.10-rc6-bootconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: docs: bootconfig: Add the endianness of fields tools/bootconfig: Store size and checksum in footer as le32 bootconfig: Load size and checksum in the footer as le32 commit 07500a6085806d97039ebcba8d9b8b29129f0106 Author: Yangbo Lu Date: Tue Dec 1 15:52:58 2020 +0800 dpaa_eth: copy timestamp fields to new skb in A-050385 workaround The timestamp fields should be copied to new skb too in A-050385 workaround for later TX timestamping handling. Fixes: 3c68b8fffb48 ("dpaa_eth: FMan erratum A050385 workaround") Signed-off-by: Yangbo Lu Acked-by: Camelia Groza Link: https://lore.kernel.org/r/20201201075258.1875-1-yangbo.lu@nxp.com Signed-off-by: Jakub Kicinski commit 832ba596494b2c9eac7760259eff2d8b7dcad0ee Author: Antoine Tenart Date: Mon Nov 30 17:19:11 2020 +0100 net: ip6_gre: set dev->hard_header_len when using header_ops syzkaller managed to crash the kernel using an NBMA ip6gre interface. I could reproduce it creating an NBMA ip6gre interface and forwarding traffic to it: skbuff: skb_under_panic: text:ffffffff8250e927 len:148 put:44 head:ffff8c03c7a33 ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:109! Call Trace: skb_push+0x10/0x10 ip6gre_header+0x47/0x1b0 neigh_connected_output+0xae/0xf0 ip6gre tunnel provides its own header_ops->create, and sets it conditionally when initializing the tunnel in NBMA mode. When header_ops->create is used, dev->hard_header_len should reflect the length of the header created. Otherwise, when not used, dev->needed_headroom should be used. Fixes: eb95f52fc72d ("net: ipv6_gre: Fix GRO to work on IPv6 over GRE tap") Cc: Maria Pasechnik Signed-off-by: Antoine Tenart Link: https://lore.kernel.org/r/20201130161911.464106-1-atenart@kernel.org Signed-off-by: Jakub Kicinski commit 807982017730cfe853fce49ba26d453e31c84898 Author: Stanislaw Gruszka Date: Thu Nov 26 13:55:20 2020 +0100 mt76: usb: fix crash on device removal Currently 'while (q->queued > 0)' loop was removed from mt76u_stop_tx() code. This causes crash on device removal as we try to cleanup empty queue: [ 96.495571] kernel BUG at include/linux/skbuff.h:2297! [ 96.498983] invalid opcode: 0000 [#1] SMP PTI [ 96.501162] CPU: 3 PID: 27 Comm: kworker/3:0 Not tainted 5.10.0-rc5+ #11 [ 96.502754] Hardware name: LENOVO 20DGS08H00/20DGS08H00, BIOS J5ET48WW (1.19 ) 08/27/2015 [ 96.504378] Workqueue: usb_hub_wq hub_event [ 96.505983] RIP: 0010:skb_pull+0x2d/0x30 [ 96.507576] Code: 00 00 8b 47 70 39 c6 77 1e 29 f0 89 47 70 3b 47 74 72 17 48 8b 87 c8 00 00 00 89 f6 48 01 f0 48 89 87 c8 00 00 00 c3 31 c0 c3 <0f> 0b 90 0f 1f 44 00 00 53 48 89 fb 48 8b bf c8 00 00 00 8b 43 70 [ 96.509296] RSP: 0018:ffffb11b801639b8 EFLAGS: 00010287 [ 96.511038] RAX: 000000001c6939ed RBX: ffffb11b801639f8 RCX: 0000000000000000 [ 96.512964] RDX: ffffb11b801639f8 RSI: 0000000000000018 RDI: ffff90c64e4fb800 [ 96.514710] RBP: ffff90c654551ee0 R08: ffff90c652bce7a8 R09: ffffb11b80163728 [ 96.516450] R10: 0000000000000001 R11: 0000000000000001 R12: ffff90c64e4fb800 [ 96.519749] R13: 0000000000000010 R14: 0000000000000020 R15: ffff90c64e352ce8 [ 96.523455] FS: 0000000000000000(0000) GS:ffff90c96eec0000(0000) knlGS:0000000000000000 [ 96.527171] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 96.530900] CR2: 0000242556f18288 CR3: 0000000146a10002 CR4: 00000000003706e0 [ 96.534678] Call Trace: [ 96.538418] mt76x02u_tx_complete_skb+0x1f/0x50 [mt76x02_usb] [ 96.542231] mt76_queue_tx_complete+0x23/0x50 [mt76] [ 96.546028] mt76u_stop_tx.cold+0x71/0xa2 [mt76_usb] [ 96.549797] mt76x0u_stop+0x2f/0x90 [mt76x0u] [ 96.553638] drv_stop+0x33/0xd0 [mac80211] [ 96.557449] ieee80211_do_stop+0x558/0x860 [mac80211] [ 96.561262] ? dev_deactivate_many+0x298/0x2d0 [ 96.565101] ieee80211_stop+0x16/0x20 [mac80211] Fix that by adding while loop again. We need loop, not just single check, to clean all pending entries. Additionally move mt76_worker_disable/enable after !mt76_has_tx_pending() as we want to tx_worker to run to process tx queues, while we wait for exactly that. I was a bit worried about accessing q->queued without lock, but mt76_worker_disable() -> kthread_park() should assure this value will be seen updated on other cpus. Fixes: fe5b5ab52e9d ("mt76: unify queue tx cleanup code") Signed-off-by: Stanislaw Gruszka Acked-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201126125520.72912-1-stf_xl@wp.pl commit 9b15596c5006d82b2f82810e8cbf80d8c6e7e7b4 Author: Golan Ben Ami Date: Wed Dec 2 14:41:51 2020 +0200 iwlwifi: pcie: add some missing entries for AX210 Some subsytem device IDs were missing from the list, so some AX210 devices were not recognized. Add them. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201202143859.a06ba7540449.I7390305d088a49c1043c9b489154fe057989c18f@changeid Link: https://lore.kernel.org/r/20201121003411.9450-1-ikegami.t@gmail.com commit 568d3434178b00274615190a19d29c3d235b4e6d Author: Luca Coelho Date: Wed Dec 2 14:41:50 2020 +0200 iwlwifi: pcie: invert values of NO_160 device config entries The NO_160 flag specifies if the device doesn't have 160 MHz support, but we errorneously assumed the opposite. If the flag was set, we were considering that 160 MHz was supported, but it's actually the opposite. Fix it by inverting the bits, i.e. NO_160 is 0x1 and 160 is 0x0. Fixes: d6f2134a3831 ("iwlwifi: add mac/rf types and 160MHz to the device tables") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201202143859.375bec857ccb.I83884286b688965293e9810381808039bd7eedae@changeid commit 5febcdef30902fa870128b9789b873199f13aff1 Author: Luca Coelho Date: Wed Dec 2 14:41:49 2020 +0200 iwlwifi: pcie: add one missing entry for AX210 The 0x0024 subsytem device ID was missing from the list, so some AX210 devices were not recognized. Add it. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201202143859.308eab4db42c.I3763196cd3f7bb36f3dcabf02ec4e7c4fe859c0f@changeid commit abfccc3af786bb33210e39638268ea3a7bf80e63 Author: Johannes Berg Date: Sun Nov 29 15:14:38 2020 +0200 iwlwifi: update MAINTAINERS entry Reflect the fact that the linuxwifi@intel.com address will disappear, and that neither Emmanuel nor myself are really much involved with the maintenance these days. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201129151117.a25afe6d2c7f.I8f13a5689dd353825fb2b9bd5b6f0fbce92cb12b@changeid commit 2d586494c4a001312650f0b919d534e429dd1e09 Author: Randy Dunlap Date: Sat Nov 28 23:09:16 2020 -0800 scsi: bnx2i: Requires MMU The SCSI_BNX2_ISCSI kconfig symbol selects CNIC and CNIC selects UIO, which depends on MMU. Since 'select' does not follow dependency chains, add the same MMU dependency to SCSI_BNX2_ISCSI. Quietens this kconfig warning: WARNING: unmet direct dependencies detected for CNIC Depends on [n]: NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_BROADCOM [=y] && PCI [=y] && (IPV6 [=m] || IPV6 [=m]=n) && MMU [=n] Selected by [m]: - SCSI_BNX2_ISCSI [=m] && SCSI_LOWLEVEL [=y] && SCSI [=y] && NET [=y] && PCI [=y] && (IPV6 [=m] || IPV6 [=m]=n) Link: https://lore.kernel.org/r/20201129070916.3919-1-rdunlap@infradead.org Fixes: cf4e6363859d ("[SCSI] bnx2i: Add bnx2i iSCSI driver.") Cc: linux-scsi@vger.kernel.org Cc: Nilesh Javali Cc: Manish Rangankar Cc: GR-QLogic-Storage-Upstream@marvell.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Randy Dunlap Signed-off-by: Martin K. Petersen commit b1cae1f84a0f609a34ebcaa087fbecef32f69882 Author: Heiko Carstens Date: Wed Dec 2 11:46:01 2020 +0100 s390: fix irq state tracing With commit 58c644ba512c ("sched/idle: Fix arch_cpu_idle() vs tracing") common code calls arch_cpu_idle() with a lockdep state that tells irqs are on. This doesn't work very well for s390: psw_idle() will enable interrupts to wait for an interrupt. As soon as an interrupt occurs the interrupt handler will verify if the old context was psw_idle(). If that is the case the interrupt enablement bits in the old program status word will be cleared. A subsequent test in both the external as well as the io interrupt handler checks if in the old context interrupts were enabled. Due to the above patching of the old program status word it is assumed the old context had interrupts disabled, and therefore a call to TRACE_IRQS_OFF (aka trace_hardirqs_off_caller) is skipped. Which in turn makes lockdep incorrectly "think" that interrupts are enabled within the interrupt handler. Fix this by unconditionally calling TRACE_IRQS_OFF when entering interrupt handlers. Also call unconditionally TRACE_IRQS_ON when leaving interrupts handlers. This leaves the special psw_idle() case, which now returns with interrupts disabled, but has an "irqs on" lockdep state. So callers of psw_idle() must adjust the state on their own, if required. This is currently only __udelay_disabled(). Fixes: 58c644ba512c ("sched/idle: Fix arch_cpu_idle() vs tracing") Acked-by: Peter Zijlstra (Intel) Signed-off-by: Heiko Carstens commit a2bd4097b3ec242f4de4924db463a9c94530e03a Author: Alexander Gordeev Date: Thu Nov 26 18:00:37 2020 +0100 s390/pci: fix CPU address in MSI for directed IRQ The directed MSIs are delivered to CPUs whose address is written to the MSI message address. The current code assumes that a CPU logical number (as it is seen by the kernel) is also the CPU address. The above assumption is not correct, as the CPU address is rather the value returned by STAP instruction. That value does not necessarily match the kernel logical CPU number. Fixes: e979ce7bced2 ("s390/pci: provide support for CPU directed interrupts") Cc: # v5.2+ Signed-off-by: Alexander Gordeev Reviewed-by: Halil Pasic Reviewed-by: Niklas Schnelle Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 14718b3e129b058cb716a60c6faf40ef68661c54 Author: Robert Foss Date: Mon Nov 30 11:04:45 2020 +0100 i2c: qcom: Fix IRQ error misassignement During cci_isr() errors read from register fields belonging to i2c master1 are currently assigned to the status field belonging to i2c master0. This patch corrects this error, and always assigns master1 errors to the status field of master1. Fixes: e517526195de ("i2c: Add Qualcomm CCI I2C driver") Reported-by: Loic Poulain Suggested-by: Loic Poulain Signed-off-by: Robert Foss Reviewed-by: Manivannan Sadhasivam Signed-off-by: Wolfram Sang commit e9acf0298c664f825e6f1158f2a97341bf9e03ca Author: Zhihao Cheng Date: Mon Nov 16 22:10:58 2020 +0800 i2c: qup: Fix error return code in qup_i2c_bam_schedule_desc() Fix to return the error code from qup_i2c_change_state() instaed of 0 in qup_i2c_bam_schedule_desc(). Fixes: fbf9921f8b35d9b2 ("i2c: qup: Fix error handling") Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Reviewed-by: Bjorn Andersson Signed-off-by: Wolfram Sang commit cc2ff9730e0fe649ebf064632c9d0e04218e2f25 Author: Mauro Carvalho Chehab Date: Wed Dec 2 08:51:28 2020 +0100 media: vidtv: fix kernel-doc markups Some functions has a different name between their prototypes and the corresponding kernel-doc markups. Signed-off-by: Mauro Carvalho Chehab commit a1ee28117077c3bf24e5ab6324c835eaab629c45 Author: Nicholas Piggin Date: Sat Nov 28 17:07:21 2020 +1000 powerpc/64s/powernv: Fix memory corruption when saving SLB entries on MCE This can be hit by an HPT guest running on an HPT host and bring down the host, so it's quite important to fix. Fixes: 7290f3b3d3e6 ("powerpc/64s/powernv: machine check dump SLB contents") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Nicholas Piggin Acked-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201128070728.825934-2-npiggin@gmail.com commit 3c0dde35e6aee456abc8d8549ff7ee0963274214 Author: Colin Ian King Date: Fri Nov 27 14:28:32 2020 +0100 media: [next] media: vidtv: fix a read from an object after it has been freed Currently the call to vidtv_psi_pat_table_destroy frees the object m->si.pat however m->si.pat->num_pmt is being accessed after the free. Fix this by destroying m->si.pat after the m->si.pmt_secs[] objects have been freed. Addresses-Coverity: ("Read from pointer after free") Reported-by: Cengiz Can # sent a similar fix about the same time Fixes: 039b7caed173 ("media: vidtv: add a PID entry for the NIT table") Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab commit bac63f1239aceb092e94fee3ef112dbaea79b372 Author: Sergey Senozhatsky Date: Mon Nov 30 16:00:54 2020 +0100 media: vb2: set cache sync hints when init buffers We need to set ->need_cache_sync_on_prepare and ->need_cache_sync_on_finish when we initialize vb2 buffer. Currently these flags are set/adjusted only in V4L2's vb2_queue_or_prepare_buf(), which means that for the code paths that don't use V4L2 vb2 will always tell videobuf2 core to skip ->prepare() and ->finish() cache syncs/flushes. Fix this by setting cache sync hints for new buffers; except VB2_MEMORY_DMABUF buffers, for which DMA exporter syncs caches. Fixes: f5f5fa73fbfb ("media: videobuf2: handle V4L2 buffer cache flags") Reported-by: Tomasz Figa Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7ee1a01e47403f72b9f38839a737692f6991263e Author: Baruch Siach Date: Wed Dec 2 09:15:32 2020 +0200 gpio: mvebu: fix potential user-after-free on probe When mvebu_pwm_probe() fails IRQ domain is not released. Move pwm probe before IRQ domain allocation. Add pwm cleanup code to the failure path. Fixes: 757642f9a584 ("gpio: mvebu: Add limited PWM support") Reported-by: Andrew Lunn Signed-off-by: Baruch Siach Signed-off-by: Bartosz Golaszewski commit 7d894834a305568a0168c55d4729216f5f8cb4e6 Author: Yanan Wang Date: Wed Dec 2 04:10:34 2020 +0800 KVM: arm64: Add usage of stage 2 fault lookup level in user_mem_abort() If we get a FSC_PERM fault, just using (logging_active && writable) to determine calling kvm_pgtable_stage2_map(). There will be two more cases we should consider. (1) After logging_active is configged back to false from true. When we get a FSC_PERM fault with write_fault and adjustment of hugepage is needed, we should merge tables back to a block entry. This case is ignored by still calling kvm_pgtable_stage2_relax_perms(), which will lead to an endless loop and guest panic due to soft lockup. (2) We use (FSC_PERM && logging_active && writable) to determine collapsing a block entry into a table by calling kvm_pgtable_stage2_map(). But sometimes we may only need to relax permissions when trying to write to a page other than a block. In this condition,using kvm_pgtable_stage2_relax_perms() will be fine. The ISS filed bit[1:0] in ESR_EL2 regesiter indicates the stage2 lookup level at which a D-abort or I-abort occurred. By comparing granule of the fault lookup level with vma_pagesize, we can strictly distinguish conditions of calling kvm_pgtable_stage2_relax_perms() or kvm_pgtable_stage2_map(), and the above two cases will be well considered. Suggested-by: Keqian Zhu Signed-off-by: Yanan Wang Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20201201201034.116760-4-wangyanan55@huawei.com commit 3a0b870e3448302ca2ba703bea1b79b61c3f33c6 Author: Yanan Wang Date: Wed Dec 2 04:10:33 2020 +0800 KVM: arm64: Fix handling of merging tables into a block entry When dirty logging is enabled, we collapse block entries into tables as necessary. If dirty logging gets canceled, we can end-up merging tables back into block entries. When this happens, we must not only free the non-huge page-table pages but also invalidate all the TLB entries that can potentially cover the block. Otherwise, we end-up with multiple possible translations for the same physical page, which can legitimately result in a TLB conflict. To address this, replease the bogus invalidation by IPA with a full VM invalidation. Although this is pretty heavy handed, it happens very infrequently and saves a bunch of invalidations by IPA. Signed-off-by: Yanan Wang [maz: fixup commit message] Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20201201201034.116760-3-wangyanan55@huawei.com commit 5c646b7e1d8bcb12317426287c516dfa4c5171c2 Author: Yanan Wang Date: Wed Dec 2 04:10:32 2020 +0800 KVM: arm64: Fix memory leak on stage2 update of a valid PTE When installing a new leaf PTE onto an invalid ptep, we need to get_page(ptep) to account for the new mapping. However, simply updating a valid PTE shouldn't result in any additional refcounting, as there is new mapping. This otherwise results in a page being forever wasted. Address this by fixing-up the refcount in stage2_map_walker_try_leaf() if the PTE was already valid, balancing out the later get_page() in stage2_map_walk_leaf(). Signed-off-by: Yanan Wang [maz: update commit message, add comment in the code] Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20201201201034.116760-2-wangyanan55@huawei.com commit 7f57b295f990c0fa07f96d51ca1c82c52dbf79cc Author: Qinglang Miao Date: Fri Nov 27 17:44:45 2020 +0800 gpio: zynq: fix reference leak in zynq_gpio functions pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in a reference leak here. A new function pm_runtime_resume_and_get is introduced in [0] to keep usage counter balanced. So We fix the reference leak by replacing it with new funtion. [0] dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") Fixes: c2df3de0d07e ("gpio: zynq: properly support runtime PM for GPIO used as interrupts") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Bartosz Golaszewski commit 6dbbf84603961d4e8eaea46e3530373c8cffee67 Author: Edmond Chung Date: Mon Nov 30 22:47:53 2020 +0000 gpiolib: Don't free if pin ranges are not defined A similar check was added in gpiochip_generic_request, but not in free. This has caused an imbalance count of request vs. free calls to the pinctrl driver. This patch is targeted to fix that issue. Fixes: 2ab73c6d8323 ("gpio: Support GPIO controllers without pin-ranges") Signed-off-by: Edmond Chung Signed-off-by: Andrew Chant Signed-off-by: Will McVicker Signed-off-by: Bartosz Golaszewski commit 60593df667e087b009ee0fc20d92e9c4c096a9b5 Author: Luo Jiaxing Date: Fri Nov 27 16:50:02 2020 +0800 gpio: dwapb: fix NULL pointer dereference at dwapb_gpio_suspend() Following Calltrace is found when running echo freeze > /sys/power/state. [ 272.755506] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 [ 272.755585] Call trace: [ 272.755587] dwapb_gpio_suspend+0x18/0x318 [ 272.755588] pm_generic_suspend+0x2c/0x48 [ 272.755595] acpi_subsys_suspend+0x60/0x70 [ 272.755599] dpm_run_callback.isra.18+0x40/0xe0 [ 272.755601] __device_suspend+0xf4/0x360 The reason is platform_set_drvdata() is deleted, and dwapb_gpio_suspend() get *gpio by dev_get_drvdata(). Fixes: feeaefd378ca ("gpio: dwapb: Use resource managed GPIO-chip add data method") Signed-off-by: Luo Jiaxing Acked-by: Serge Semin Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 0ac22098de6f9fd460ac1b1cbf6dbd324312161c Author: Zheng Liang Date: Tue Nov 24 11:06:06 2020 +0800 gpio: arizona: disable pm_runtime in case of failure pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced. Fixes:27a49ed17e224(gpio: arizona: Add support for GPIOs that) Reported-by: Hulk Robot Signed-off-by: Zheng Liang Signed-off-by: Bartosz Golaszewski commit 2c602741b51daa12f8457f222ce9ce9c4825d067 Author: Dan Carpenter Date: Wed Dec 2 09:44:43 2020 +0300 vhost_vdpa: return -EFAULT if copy_to_user() fails The copy_to_user() function returns the number of bytes remaining to be copied but this should return -EFAULT to the user. Fixes: 1b48dc03e575 ("vhost: vdpa: report iova range") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/X8c32z5EtDsMyyIL@mwanda Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Reviewed-by: Stefano Garzarella commit 98701a2a861fa87a5055cf2809758e8725e8b146 Author: Randy Dunlap Date: Sat Nov 28 13:39:05 2020 -0800 vdpa: mlx5: fix vdpa/vhost dependencies drivers/vdpa/mlx5/ uses vhost_iotlb*() interfaces, so select VHOST_IOTLB to make them be built. However, if VHOST_IOTLB is the only VHOST symbol that is set/enabled, the object file still won't be built because drivers/Makefile won't descend into drivers/vhost/ to build it, so make drivers/Makefile build the needed binary whenever VHOST_IOTLB is set, like it does for VHOST_RING. Fixes these build errors: ERROR: modpost: "vhost_iotlb_itree_next" [drivers/vdpa/mlx5/mlx5_vdpa.ko] undefined! ERROR: modpost: "vhost_iotlb_itree_first" [drivers/vdpa/mlx5/mlx5_vdpa.ko] undefined! Fixes: 29064bfdabd5 ("vdpa/mlx5: Add support library for mlx5 VDPA implementation") Fixes: aff90770e54c ("vdpa/mlx5: Fix dependency on MLX5_CORE") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Eli Cohen Cc: Parav Pandit Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: virtualization@lists.linux-foundation.org Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20201128213905.27409-1-rdunlap@infradead.org Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 156c9b70dbfb83eeeff39e9202eb5f8bb6d0fd04 Author: Andrii Nakryiko Date: Mon Nov 30 14:33:36 2020 -0800 selftests/bpf: Drain ringbuf samples at the end of test Avoid occasional test failures due to the last sample being delayed to another ring_buffer__poll() call. Instead, drain samples completely with ring_buffer__consume(). This is supposed to fix a rare and non-deterministic test failure in libbpf CI. Fixes: cb1c9ddd5525 ("selftests/bpf: Add BPF ringbuf selftests") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201130223336.904192-2-andrii@kernel.org commit f6a8250ea1e42ad1f4f3bab01c851ec5fd48f0e7 Author: Andrii Nakryiko Date: Mon Nov 30 14:33:35 2020 -0800 libbpf: Fix ring_buffer__poll() to return number of consumed samples Fix ring_buffer__poll() to return the number of non-discarded records consumed, just like its documentation states. It's also consistent with ring_buffer__consume() return. Fix up selftests with wrong expected results. Fixes: bf99c936f947 ("libbpf: Add BPF ring buffer support") Fixes: cb1c9ddd5525 ("selftests/bpf: Add BPF ringbuf selftests") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201130223336.904192-1-andrii@kernel.org commit 4179b00c04d18ea7013f68d578d80f3c9d13150a Author: Eric Dumazet Date: Tue Dec 1 01:05:07 2020 -0800 geneve: pull IP header before ECN decapsulation IP_ECN_decapsulate() and IP6_ECN_decapsulate() assume IP header is already pulled. geneve does not ensure this yet. Fixing this generically in IP_ECN_decapsulate() and IP6_ECN_decapsulate() is not possible, since callers pass a pointer that might be freed by pskb_may_pull() syzbot reported : BUG: KMSAN: uninit-value in __INET_ECN_decapsulate include/net/inet_ecn.h:238 [inline] BUG: KMSAN: uninit-value in INET_ECN_decapsulate+0x345/0x1db0 include/net/inet_ecn.h:260 CPU: 1 PID: 8941 Comm: syz-executor.0 Not tainted 5.10.0-rc4-syzkaller #0 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+0x21c/0x280 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x5f/0xa0 mm/kmsan/kmsan_instr.c:197 __INET_ECN_decapsulate include/net/inet_ecn.h:238 [inline] INET_ECN_decapsulate+0x345/0x1db0 include/net/inet_ecn.h:260 geneve_rx+0x2103/0x2980 include/net/inet_ecn.h:306 geneve_udp_encap_recv+0x105c/0x1340 drivers/net/geneve.c:377 udp_queue_rcv_one_skb+0x193a/0x1af0 net/ipv4/udp.c:2093 udp_queue_rcv_skb+0x282/0x1050 net/ipv4/udp.c:2167 udp_unicast_rcv_skb net/ipv4/udp.c:2325 [inline] __udp4_lib_rcv+0x399d/0x5880 net/ipv4/udp.c:2394 udp_rcv+0x5c/0x70 net/ipv4/udp.c:2564 ip_protocol_deliver_rcu+0x572/0xc50 net/ipv4/ip_input.c:204 ip_local_deliver_finish net/ipv4/ip_input.c:231 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip_local_deliver+0x583/0x8d0 net/ipv4/ip_input.c:252 dst_input include/net/dst.h:449 [inline] ip_rcv_finish net/ipv4/ip_input.c:428 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip_rcv+0x5c3/0x840 net/ipv4/ip_input.c:539 __netif_receive_skb_one_core net/core/dev.c:5315 [inline] __netif_receive_skb+0x1ec/0x640 net/core/dev.c:5429 process_backlog+0x523/0xc10 net/core/dev.c:6319 napi_poll+0x420/0x1010 net/core/dev.c:6763 net_rx_action+0x35c/0xd40 net/core/dev.c:6833 __do_softirq+0x1a9/0x6fa kernel/softirq.c:298 asm_call_irq_on_stack+0xf/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0x6e/0x90 arch/x86/kernel/irq_64.c:77 do_softirq kernel/softirq.c:343 [inline] __local_bh_enable_ip+0x184/0x1d0 kernel/softirq.c:195 local_bh_enable+0x36/0x40 include/linux/bottom_half.h:32 rcu_read_unlock_bh include/linux/rcupdate.h:730 [inline] __dev_queue_xmit+0x3a9b/0x4520 net/core/dev.c:4167 dev_queue_xmit+0x4b/0x60 net/core/dev.c:4173 packet_snd net/packet/af_packet.c:2992 [inline] packet_sendmsg+0x86f9/0x99d0 net/packet/af_packet.c:3017 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:671 [inline] __sys_sendto+0x9dc/0xc80 net/socket.c:1992 __do_sys_sendto net/socket.c:2004 [inline] __se_sys_sendto+0x107/0x130 net/socket.c:2000 __x64_sys_sendto+0x6e/0x90 net/socket.c:2000 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 2d07dc79fe04 ("geneve: add initial netdev driver for GENEVE tunnels") Signed-off-by: Eric Dumazet Reported-by: syzbot Link: https://lore.kernel.org/r/20201201090507.4137906-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 2867e1eac61016f59b3d730e3f7aa488e186e917 Author: Toke Høiland-Jørgensen Date: Mon Nov 30 19:37:05 2020 +0100 inet_ecn: Fix endianness of checksum update when setting ECT(1) When adding support for propagating ECT(1) marking in IP headers it seems I suffered from endianness-confusion in the checksum update calculation: In fact the ECN field is in the *lower* bits of the first 16-bit word of the IP header when calculating in network byte order. This means that the addition performed to update the checksum field was wrong; let's fix that. Fixes: b723748750ec ("tunnel: Propagate ECT(1) when decapsulating as recommended by RFC6040") Reported-by: Jonathan Morton Tested-by: Pete Heist Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20201130183705.17540-1-toke@redhat.com Signed-off-by: Jakub Kicinski commit 93416ab0f994f6cf16fa0c695577f8b19d30c533 Author: Gal Pressman Date: Tue Dec 1 11:17:24 2020 +0200 RDMA/efa: Use the correct current and new states in modify QP The local variables cur_state and new_state hold the state that should be used for the modify QP operation instead of the ones in the ib_qp_attr struct. Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation") Link: https://lore.kernel.org/r/20201201091724.37016-1-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 0191c271debfc3d171e8b2d81875d7036982d02c Author: Alok Prasad Date: Fri Nov 27 16:32:51 2020 +0000 RDMA/qedr: iWARP invalid(zero) doorbell address fix This patch fixes issue introduced by a previous commit where iWARP doorbell address wasn't initialized, causing call trace when any RDMA application wants to use this interface: Illegal doorbell address: 0000000000000000. Legal range for doorbell addresses is [0000000011431e08..00000000ec3799d3] WARNING: CPU: 11 PID: 11990 at drivers/net/ethernet/qlogic/qed/qed_dev.c:93 qed_db_rec_sanity.isra.12+0x48/0x70 [qed] ... hpsa scsi_transport_sas [last unloaded: crc8] CPU: 11 PID: 11990 Comm: rping Tainted: G S 5.10.0-rc1 #29 Hardware name: HP ProLiant DL380 Gen9/ProLiant DL380 Gen9, BIOS P89 01/22/2018 RIP: 0010:qed_db_rec_sanity.isra.12+0x48/0x70 [qed] ... RSP: 0018:ffffafc28458fa88 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff8d0d4c620000 RCX: 0000000000000000 RDX: ffff8d10afde7d50 RSI: ffff8d10afdd8b40 RDI: ffff8d10afdd8b40 RBP: ffffafc28458fe38 R08: 0000000000000003 R09: 0000000000007fff R10: 0000000000000001 R11: ffffafc28458f888 R12: 0000000000000000 R13: 0000000000000000 R14: ffff8d0d43ccbbd0 R15: ffff8d0d48dae9c0 FS: 00007fbd5267e740(0000) GS:ffff8d10afdc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fbd4f258fb8 CR3: 0000000108d96003 CR4: 00000000001706e0 Call Trace: qed_db_recovery_add+0x6d/0x1f0 [qed] qedr_create_user_qp+0x57e/0xd30 [qedr] qedr_create_qp+0x5f3/0xab0 [qedr] ? lookup_get_idr_uobject.part.12+0x45/0x90 [ib_uverbs] create_qp+0x45d/0xb30 [ib_uverbs] ? ib_uverbs_cq_event_handler+0x30/0x30 [ib_uverbs] ib_uverbs_create_qp+0xb9/0xe0 [ib_uverbs] ib_uverbs_write+0x3f9/0x570 [ib_uverbs] ? security_mmap_file+0x62/0xe0 vfs_write+0xb7/0x200 ksys_write+0xaf/0xd0 ? syscall_trace_enter.isra.25+0x152/0x200 do_syscall_64+0x2d/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 06e8d1df46ed ("RDMA/qedr: Add support for user mode XRC-SRQ's") Link: https://lore.kernel.org/r/20201127163251.14533-1-palok@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Igor Russkikh Signed-off-by: Alok Prasad Signed-off-by: Jason Gunthorpe commit 509a15421674b9e1a3e1916939d0d0efd3e578da Merge: ef6900acc89ec 212253367dc7b Author: Linus Torvalds Date: Tue Dec 1 15:43:53 2020 -0800 Merge tag '5.10-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Two smb3 fixes for stable" * tag '5.10-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix potential use-after-free in cifs_echo_request() cifs: allow syscalls to be restarted in __smb_send_rqst() commit ef6900acc89ecfc78ceb0eb1605c954dd6f2ca05 Merge: f43691b59fae5 68e10d5ff512b Author: Linus Torvalds Date: Tue Dec 1 15:30:18 2020 -0800 Merge tag 'trace-v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Use correct timestamp variable for ring buffer write stamp update - Fix up before stamp and write stamp when crossing ring buffer sub buffers - Keep a zero delta in ring buffer in slow path if cmpxchg fails - Fix trace_printk static buffer for archs that care - Fix ftrace record accounting for ftrace ops with trampolines - Fix DYNAMIC_FTRACE_WITH_DIRECT_CALLS dependency - Remove WARN_ON in hwlat tracer that triggers on something that is OK - Make "my_tramp" trampoline in ftrace direct sample code global - Fixes in the bootconfig tool for better alignment management * tag 'trace-v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ring-buffer: Always check to put back before stamp when crossing pages ftrace: Fix DYNAMIC_FTRACE_WITH_DIRECT_CALLS dependency ftrace: Fix updating FTRACE_FL_TRAMP tracing: Fix alignment of static buffer tracing: Remove WARN_ON in start_thread() samples/ftrace: Mark my_tramp[12]? global ring-buffer: Set the right timestamp in the slow path of __rb_reserve_next() ring-buffer: Update write stamp with the correct ts docs: bootconfig: Update file format on initrd image tools/bootconfig: Align the bootconfig applied initrd image size to 4 tools/bootconfig: Fix to check the write failure correctly tools/bootconfig: Fix errno reference after printf() commit 0643334902fcdc770e2d9555811200213339a3f6 Author: Hoang Le Date: Mon Nov 30 09:55:44 2020 +0700 tipc: fix incompatible mtu of transmission In commit 682cd3cf946b6 ("tipc: confgiure and apply UDP bearer MTU on running links"), we introduced a function to change UDP bearer MTU and applied this new value across existing per-link. However, we did not apply this new MTU value at node level. This lead to packet dropped at link level if its size is greater than new MTU value. To fix this issue, we also apply this new MTU value for node level. Fixes: 682cd3cf946b6 ("tipc: confgiure and apply UDP bearer MTU on running links") Acked-by: Jon Maloy Signed-off-by: Hoang Le Link: https://lore.kernel.org/r/20201130025544.3602-1-hoang.h.le@dektech.com.au Signed-off-by: Jakub Kicinski commit 857c4c0a8b2888d806f4308c58f59a6a81a1dee9 Author: Mike Snitzer Date: Fri Nov 13 14:52:28 2020 -0800 dm writecache: remove BUG() and fail gracefully instead Building on arch/s390/ results in this build error: cc1: some warnings being treated as errors ../drivers/md/dm-writecache.c: In function 'persistent_memory_claim': ../drivers/md/dm-writecache.c:323:1: error: no return statement in function returning non-void [-Werror=return-type] Fix this by replacing the BUG() with an -EOPNOTSUPP return. Fixes: 48debafe4f2f ("dm: add writecache target") Reported-by: Randy Dunlap Signed-off-by: Mike Snitzer commit e7b624183d921b49ef0a96329f21647d38865ee9 Author: Thomas Gleixner Date: Fri Nov 13 15:19:10 2020 +0100 dm table: Remove BUG_ON(in_interrupt()) The BUG_ON(in_interrupt()) in dm_table_event() is a historic leftover from a rework of the dm table code which changed the calling context. Issuing a BUG for a wrong calling context is frowned upon and in_interrupt() is deprecated and only covering parts of the wrong contexts. The sanity check for the context is covered by CONFIG_DEBUG_ATOMIC_SLEEP and other debug facilities already. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Mike Snitzer commit 89478335718c98557f10470a9bc5c555b9261c4e Author: Sergei Shtepa Date: Wed Nov 11 15:55:46 2020 +0300 dm: fix bug with RCU locking in dm_blk_report_zones The dm_get_live_table() function makes RCU read lock so dm_put_live_table() must be called even if dm_table map is not found. Fixes: e76239a3748c9 ("block: add a report_zones method") Cc: stable@vger.kernel.org Signed-off-by: Sergei Shtepa Signed-off-by: Mike Snitzer commit 35d2835d2ac41dc0b3e3469f8e2b08ce9709ace8 Author: Nick Desaulniers Date: Tue Nov 10 18:41:40 2020 -0800 Revert "dm cache: fix arm link errors with inline" This reverts commit 43aeaa29573924df76f44eda2bbd94ca36e407b5. Since commit 0bddd227f3dc ("Documentation: update for gcc 4.9 requirement") the minimum supported version of GCC is gcc-4.9. It's now safe to remove this code. Link: https://github.com/ClangBuiltLinux/linux/issues/427 Signed-off-by: Nick Desaulniers Acked-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 960f4f8a4e60da610af73c1264673f71f5a36efd Author: Dominique Martinet Date: Tue Dec 1 16:09:37 2020 +0100 fs: 9p: add generic splice_write file operation The default splice operations got removed recently, add it back to 9p with iter_file_splice_write like many other filesystems do. Link: http://lkml.kernel.org/r/1606837496-21717-1-git-send-email-asmadeus@codewreck.org Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Signed-off-by: Dominique Martinet Acked-by: Toke Høiland-Jørgensen Reviewed-by: Christoph Hellwig commit f43691b59fae581ca83349539c686ecf4a01e42d Merge: b65054597872c ad89653f79f18 Author: Linus Torvalds Date: Tue Dec 1 12:11:09 2020 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull vhost fixes from Michael Tsirkin: "A couple of minor fixes" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost-vdpa: fix page pinning leakage in error path (rework) vringh: fix vringh_iov_push_*() documentation vhost scsi: fix lun reset completion handling commit 14483cbf040fcb38113497161088a1ce8ce5d713 Author: Randy Dunlap Date: Sat Nov 28 23:08:43 2020 -0800 net: broadcom CNIC: requires MMU The CNIC kconfig symbol selects UIO and UIO depends on MMU. Since 'select' does not follow dependency chains, add the same MMU dependency to CNIC. Quietens this kconfig warning: WARNING: unmet direct dependencies detected for UIO Depends on [n]: MMU [=n] Selected by [m]: - CNIC [=m] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_BROADCOM [=y] && PCI [=y] && (IPV6 [=m] || IPV6 [=m]=n) Fixes: adfc5217e9db ("broadcom: Move the Broadcom drivers") Signed-off-by: Randy Dunlap Cc: Jeff Kirsher Cc: Rasesh Mody Cc: GR-Linux-NIC-Dev@marvell.com Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20201129070843.3859-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit de7b3f8164cfdf99879ed7ca1d53bace25700929 Merge: 237f977ab9204 ba246c175116e Author: David S. Miller Date: Tue Dec 1 10:09:04 2020 -0800 Merge branch 'ibmvnic-Bug-fixes-for-queue-descriptor-processing' Thomas Falcon says: ==================== ibmvnic: Bug fixes for queue descriptor processing This series resolves a few issues in the ibmvnic driver's RX buffer and TX completion processing. The first patch includes memory barriers to synchronize queue descriptor reads. The second patch fixes a memory leak that could occur if the device returns a TX completion with an error code in the descriptor, in which case the respective socket buffer and other relevant data structures may not be freed or updated properly. v3: Correct length of Fixes tags, requested by Jakub Kicinski v2: Provide more detailed comments explaining specifically what reads are being ordered, suggested by Michael Ellerman ==================== Signed-off-by: David S. Miller commit ba246c175116e2e8fa4fdfa5f8e958e086a9a818 Author: Thomas Falcon Date: Tue Dec 1 09:52:11 2020 -0600 ibmvnic: Fix TX completion error handling TX completions received with an error return code are not being processed properly. When an error code is seen, do not proceed to the next completion before cleaning up the existing entry's data structures. Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit b71ec952234610b4f90ef17a2fdcb124d5320070 Author: Thomas Falcon Date: Tue Dec 1 09:52:10 2020 -0600 ibmvnic: Ensure that SCRQ entry reads are correctly ordered Ensure that received Subordinate Command-Response Queue (SCRQ) entries are properly read in order by the driver. These queues are used in the ibmvnic device to process RX buffer and TX completion descriptors. dma_rmb barriers have been added after checking for a pending descriptor to ensure the correct descriptor entry is checked and after reading the SCRQ descriptor to ensure the entire descriptor is read before processing. Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit 7e7986f9d3ba69a7375a41080a1f8c8012cb0923 Author: Mike Snitzer Date: Tue Dec 1 11:07:09 2020 -0500 block: use gcd() to fix chunk_sectors limit stacking commit 22ada802ede8 ("block: use lcm_not_zero() when stacking chunk_sectors") broke chunk_sectors limit stacking. chunk_sectors must reflect the most limited of all devices in the IO stack. Otherwise malformed IO may result. E.g.: prior to this fix, ->chunk_sectors = lcm_not_zero(8, 128) would result in blk_max_size_offset() splitting IO at 128 sectors rather than the required more restrictive 8 sectors. And since commit 07d098e6bbad ("block: allow 'chunk_sectors' to be non-power-of-2") care must be taken to properly stack chunk_sectors to be compatible with the possibility that a non-power-of-2 chunk_sectors may be stacked. This is why gcd() is used instead of reverting back to using min_not_zero(). Fixes: 22ada802ede8 ("block: use lcm_not_zero() when stacking chunk_sectors") Fixes: 07d098e6bbad ("block: allow 'chunk_sectors' to be non-power-of-2") Reported-by: John Dorminy Reported-by: Bruce Johnston Signed-off-by: Mike Snitzer Reviewed-by: John Dorminy Cc: stable@vger.kernel.org Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 8c3b55a299c325830a987de21dab6a89ecb71164 Author: Linus Walleij Date: Tue Dec 1 09:55:29 2020 -0800 Input: atmel_mxt_ts - fix lost interrupts After commit 74d905d2d38a devices requiring the workaround for edge triggered interrupts stopped working. The hardware needs the quirk to be used before even proceeding to check if the quirk is needed because mxt_acquire_irq() is called before mxt_check_retrigen() is called and at this point pending IRQs need to be checked, and if the workaround is not active, all interrupts will be lost from this point. Solve this by switching the calls around. Reported-by: Andre Müller Tested-by: Andre Müller Suggested-by: Dmitry Torokhov Fixes: 74d905d2d38a ("Input: atmel_mxt_ts - only read messages in mxt_acquire_irq() when necessary") Signed-off-by: Linus Walleij Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201201123026.1416743-1-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit 1a16af33ba88ef25e206a13366379179cae79d23 Author: David Gow Date: Sat Nov 21 16:15:49 2020 -0800 fpga: Specify HAS_IOMEM dependency for FPGA_DFL Because dfl.c uses the 'devm_ioremap', 'devm_iounmap', 'devm_ioremap_resource', and 'devm_platform_ioremap_resource' functions, it should depend on HAS_IOMEM. This fixes make allyesconfig under UML (ARCH=um), which doesn't provide HAS_IOMEM. [mdf@kernel.org: Removed "drivers: " in commit message] Fixes: 89eb35e810a8 ("fpga: dfl: map feature mmio resources in their own feature drivers") Signed-off-by: David Gow Signed-off-by: Moritz Fischer Link: https://lore.kernel.org/r/20201122001549.107023-2-mdf@kernel.org Signed-off-by: Greg Kroah-Hartman commit cf03f316ad20dac16b5adae3f6dedd7d188c7f65 Author: Toke Høiland-Jørgensen Date: Tue Dec 1 14:54:09 2020 +0100 fs: 9p: add generic splice_read file operations The v9fs file operations were missing the splice_read operations, which breaks sendfile() of files on such a filesystem. I discovered this while trying to load an eBPF program using iproute2 inside a 'virtme' environment which uses 9pfs for the virtual file system. iproute2 relies on sendfile() with an AF_ALG socket to hash files, which was erroring out in the virtual environment. Since generic_file_splice_read() seems to just implement splice_read in terms of the read_iter operation, I simply added the generic implementation to the file operations, which fixed the error I was seeing. A quick grep indicates that this is what most other file systems do as well. Link: http://lkml.kernel.org/r/20201201135409.55510-1-toke@redhat.com Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Dominique Martinet commit fae3a13d2a3d49a89391889808428cf1e72afbd7 Author: Babu Moger Date: Mon Nov 30 09:57:20 2020 -0600 x86/resctrl: Fix AMD L3 QOS CDP enable/disable When the AMD QoS feature CDP (code and data prioritization) is enabled or disabled, the CDP bit in MSR 0000_0C81 is written on one of the CPUs in an L3 domain (core complex). That is not correct - the CDP bit needs to be updated on all the logical CPUs in the domain. This was not spelled out clearly in the spec earlier. The specification has been updated and the updated document, "AMD64 Technology Platform Quality of Service Extensions Publication # 56375 Revision: 1.02 Issue Date: October 2020" is available now. Refer the section: Code and Data Prioritization. Fix the issue by adding a new flag arch_has_per_cpu_cfg in rdt_cache data structure. The documentation can be obtained at: https://developer.amd.com/wp-content/resources/56375.pdf Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 [ bp: Massage commit message. ] Fixes: 4d05bf71f157 ("x86/resctrl: Introduce AMD QOS feature") Signed-off-by: Babu Moger Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/160675180380.15628.3309402017215002347.stgit@bmoger-ubuntu commit 45ba1c0ba3e589ad3ef0d0603c822eb27ea16563 Author: Hans Verkuil Date: Fri Nov 27 12:52:30 2020 +0100 media: pulse8-cec: add support for FW v10 and up Starting with firmware version 10 the GET/SET_HDMI_VERSION message was removed and GET/SET_AUTO_POWER_ON was added. The removal of GET/SET_HDMI_VERSION caused the probe of the Pulse-Eight to fail. Add a version check to handle this gracefully. Also show (but do not set) the Auto Power On value. Signed-off-by: Hans Verkuil Reported-by: Maxime Ripard Tested-by: Maxime Ripard Cc: Signed-off-by: Mauro Carvalho Chehab commit 024e01dead12c2b9fbe31216f2099401ebb78a4a Author: Hans Verkuil Date: Fri Nov 27 10:36:32 2020 +0100 media: pulse8-cec: fix duplicate free at disconnect or probe error Commit 601282d65b96 ("media: pulse8-cec: use adap_free callback") used the adap_free callback to clean up on disconnect. What I forgot was that in the probe it will call cec_delete_adapter() followed by kfree(pulse8) if an error occurs. But by using the adap_free callback, cec_delete_adapter() is already freeing the pulse8 struct. This wasn't noticed since normally the probe works fine, but Pulse-Eight published a new firmware version that caused a probe error, so now it hits this bug. This affects firmware version 12, but probably any version >= 10. Commit aa9eda76129c ("media: pulse8-cec: close serio in disconnect, not adap_free") made this worse by adding the line 'pulse8->serio = NULL' right after the call to cec_unregister_adapter in the disconnect() function. Unfortunately, cec_unregister_adapter will typically call cec_delete_adapter (unless a filehandle to the cec device is still open), which frees the pulse8 struct. So now it will also crash on a simple unplug of the Pulse-Eight device. With this fix both the unplug issue and a probe() error situation are handled correctly again. It will still fail to probe() with a v12 firmware, that's something to look at separately. Signed-off-by: Hans Verkuil Reported-by: Maxime Ripard Tested-by: Maxime Ripard Fixes: aa9eda76129c ("media: pulse8-cec: close serio in disconnect, not adap_free") Fixes: 601282d65b96 ("media: pulse8-cec: use adap_free callback") Cc: Signed-off-by: Mauro Carvalho Chehab commit d904eb0b351fe5545d9ba5b85844342f49025923 Author: Sean Young Date: Sun Nov 29 18:01:26 2020 +0100 media: mtk-cir: fix calculation of chk period Since commit 528222d853f9 ("media: rc: harmonize infrared durations to microseconds"), the calculation of the chk period is wrong. As a result, all reported IR will have incorrect timings. Now that the calculations are done in microseconds rather than nanoseconds, we can fold the calculations in a simpler form with less rounding error. Tested-by: Frank Wunderlich Fixes: 528222d853f9 ("media: rc: harmonize infrared durations to microseconds") Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d5750cd3c5486e9c0fa11100df01de8ca0c13fa7 Author: Nathan Chancellor Date: Thu Nov 19 13:46:58 2020 -0700 kbuild: Disable CONFIG_LD_ORPHAN_WARN for ld.lld 10.0.1 ld.lld 10.0.1 spews a bunch of various warnings about .rela sections, along with a few others. Newer versions of ld.lld do not have these warnings. As a result, do not add '--orphan-handling=warn' to LDFLAGS_vmlinux if ld.lld's version is not new enough. Link: https://github.com/ClangBuiltLinux/linux/issues/1187 Link: https://github.com/ClangBuiltLinux/linux/issues/1193 Reported-by: Arvind Sankar Reported-by: kernelci.org bot Reported-by: Mark Brown Reviewed-by: Kees Cook Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Masahiro Yamada commit 59612b24f78a0b61fe078ec9dff2e48e9cec52c0 Author: Nathan Chancellor Date: Thu Nov 19 13:46:56 2020 -0700 kbuild: Hoist '--orphan-handling' into Kconfig Currently, '--orphan-handling=warn' is spread out across four different architectures in their respective Makefiles, which makes it a little unruly to deal with in case it needs to be disabled for a specific linker version (in this case, ld.lld 10.0.1). To make it easier to control this, hoist this warning into Kconfig and the main Makefile so that disabling it is simpler, as the warning will only be enabled in a couple places (main Makefile and a couple of compressed boot folders that blow away LDFLAGS_vmlinx) and making it conditional is easier due to Kconfig syntax. One small additional benefit of this is saving a call to ld-option on incremental builds because we will have already evaluated it for CONFIG_LD_ORPHAN_WARN. To keep the list of supported architectures the same, introduce CONFIG_ARCH_WANT_LD_ORPHAN_WARN, which an architecture can select to gain this automatically after all of the sections are specified and size asserted. A special thanks to Kees Cook for the help text on this config. Link: https://github.com/ClangBuiltLinux/linux/issues/1187 Acked-by: Kees Cook Acked-by: Michael Ellerman (powerpc) Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit f54db39fbe40731c40aefdd3bc26e7d56d668c64 Author: Greg Kurz Date: Mon Nov 30 13:19:27 2020 +0100 KVM: PPC: Book3S HV: XIVE: Fix vCPU id sanity check Commit 062cfab7069f ("KVM: PPC: Book3S HV: XIVE: Make VP block size configurable") updated kvmppc_xive_vcpu_id_valid() in a way that allows userspace to trigger an assertion in skiboot and crash the host: [ 696.186248988,3] XIVE[ IC 08 ] eq_blk != vp_blk (0 vs. 1) for target 0x4300008c/0 [ 696.186314757,0] Assert fail: hw/xive.c:2370:0 [ 696.186342458,0] Aborting! xive-kvCPU 0043 Backtrace: S: 0000000031e2b8f0 R: 0000000030013840 .backtrace+0x48 S: 0000000031e2b990 R: 000000003001b2d0 ._abort+0x4c S: 0000000031e2ba10 R: 000000003001b34c .assert_fail+0x34 S: 0000000031e2ba90 R: 0000000030058984 .xive_eq_for_target.part.20+0xb0 S: 0000000031e2bb40 R: 0000000030059fdc .xive_setup_silent_gather+0x2c S: 0000000031e2bc20 R: 000000003005a334 .opal_xive_set_vp_info+0x124 S: 0000000031e2bd20 R: 00000000300051a4 opal_entry+0x134 --- OPAL call token: 0x8a caller R1: 0xc000001f28563850 --- XIVE maintains the interrupt context state of non-dispatched vCPUs in an internal VP structure. We allocate a bunch of those on startup to accommodate all possible vCPUs. Each VP has an id, that we derive from the vCPU id for efficiency: static inline u32 kvmppc_xive_vp(struct kvmppc_xive *xive, u32 server) { return xive->vp_base + kvmppc_pack_vcpu_id(xive->kvm, server); } The KVM XIVE device used to allocate KVM_MAX_VCPUS VPs. This was limitting the number of concurrent VMs because the VP space is limited on the HW. Since most of the time, VMs run with a lot less vCPUs, commit 062cfab7069f ("KVM: PPC: Book3S HV: XIVE: Make VP block size configurable") gave the possibility for userspace to tune the size of the VP block through the KVM_DEV_XIVE_NR_SERVERS attribute. The check in kvmppc_pack_vcpu_id() was changed from cpu < KVM_MAX_VCPUS * xive->kvm->arch.emul_smt_mode to cpu < xive->nr_servers * xive->kvm->arch.emul_smt_mode The previous check was based on the fact that the VP block had KVM_MAX_VCPUS entries and that kvmppc_pack_vcpu_id() guarantees that packed vCPU ids are below KVM_MAX_VCPUS. We've changed the size of the VP block, but kvmppc_pack_vcpu_id() has nothing to do with it and it certainly doesn't ensure that the packed vCPU ids are below xive->nr_servers. kvmppc_xive_vcpu_id_valid() might thus return true when the VM was configured with a non-standard VSMT mode, even if the packed vCPU id is higher than what we expect. We end up using an unallocated VP id, which confuses OPAL. The assert in OPAL is probably abusive and should be converted to a regular error that the kernel can handle, but we shouldn't really use broken VP ids in the first place. Fix kvmppc_xive_vcpu_id_valid() so that it checks the packed vCPU id is below xive->nr_servers, which is explicitly what we want. Fixes: 062cfab7069f ("KVM: PPC: Book3S HV: XIVE: Make VP block size configurable") Cc: stable@vger.kernel.org # v5.5+ Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/160673876747.695514.1809676603724514920.stgit@bahia.lan commit d0c6707ca4235b78d06bcd62f0e24fbeac3e6d10 Author: Heinrich Schuchardt Date: Sun Nov 29 20:45:12 2020 +0100 arm64: dts: allwinner: H5: NanoPi Neo Plus2: phy-mode rgmii-id Since commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config") network is broken on the NanoPi Neo Plus2. This patch changes the phy-mode to use internal delays both for RX and TX as has been done for other boards affected by the same commit. Fixes: bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config") Signed-off-by: Heinrich Schuchardt Signed-off-by: Maxime Ripard Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201129194512.1475586-1-xypron.glpk@gmx.de commit c2b111e59a7be1534bbd62b3f8f933f714c5ba71 Author: Heinrich Schuchardt Date: Sun Nov 29 17:26:27 2020 +0100 arm64: dts: allwinner: A64 Sopine: phy-mode rgmii-id Since commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config") iSCSI booting fails on the Pine A64 LTS. This patch changes the phy-mode to use internal delays both for RX and TX as has been done for other boards affected by the same commit. Fixes: bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config") Signed-off-by: Heinrich Schuchardt Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201129162627.1244808-1-xypron.glpk@gmx.de commit c98fff7332dbd6e028969f8c2bda3d7bc7a024d8 Author: Bjørn Mork Date: Tue Dec 1 11:03:18 2020 +0100 USB: serial: option: fix Quectel BG96 matching This is a partial revert of commit 2bb70f0a4b23 ("USB: serial: option: support dynamic Quectel USB compositions") The Quectel BG96 is different from most other modern Quectel modems, having serial functions with 3 endpoints using ff/ff/ff and ff/fe/ff class/subclass/protocol. Including it in the change to accommodate dynamic function mapping was incorrect. Revert to interface number matching for the BG96, assuming static layout of the RMNET function on interface 4. This restores support for the serial functions on interfaces 2 and 3. Full lsusb output for the BG96: Bus 002 Device 003: ID 2c7c:0296 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x2c7c idProduct 0x0296 bcdDevice 0.00 iManufacturer 3 Qualcomm, Incorporated iProduct 2 Qualcomm CDMA Technologies MSM iSerial 4 d1098243 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 145 bNumInterfaces 5 bConfigurationValue 1 iConfiguration 1 Qualcomm Configuration bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 254 bInterfaceProtocol 255 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 4 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x87 EP 7 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x88 EP 8 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) Cc: Sebastian Sjoholm Fixes: 2bb70f0a4b23 ("USB: serial: option: support dynamic Quectel USB compositions") Signed-off-by: Bjørn Mork Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 2aab1561439032be2e98811dd0ddbeb5b2ae4c61 Author: Sanjay Govind Date: Mon Nov 30 23:41:48 2020 -0800 Input: xpad - support Ardwiino Controllers This commit adds support for Ardwiino Controllers Signed-off-by: Sanjay Govind Link: https://lore.kernel.org/r/20201201071922.131666-1-sanjay.govind9@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit a48491c65b513e5cdc3e7a886a4db915f848a5f5 Author: Po-Hsu Lin Date: Mon Nov 30 22:39:40 2020 -0800 Input: i8042 - add ByteSpeed touchpad to noloop table It looks like the C15B laptop got another vendor: ByteSpeed LLC. Avoid AUX loopback on this touchpad as well, thus input subsystem will be able to recognize a Synaptics touchpad in the AUX port. BugLink: https://bugs.launchpad.net/bugs/1906128 Signed-off-by: Po-Hsu Lin Link: https://lore.kernel.org/r/20201201054723.5939-1-po-hsu.lin@canonical.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 85dad327d9b58b4c9ce08189a2707167de392d23 Author: Sreekanth Reddy Date: Mon Nov 30 13:57:33 2020 +0530 scsi: mpt3sas: Increase IOCInit request timeout to 30s Currently the IOCInit request message timeout is set to 10s. This is not sufficient in some scenarios such as during HBA FW downgrade operations. Increase the IOCInit request timeout to 30s. Link: https://lore.kernel.org/r/20201130082733.26120-1-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 42f687038bcc34aa919e0e4c29b04e4cda3f6a79 Author: Suganath Prabu S Date: Wed Nov 25 15:18:38 2020 +0530 scsi: mpt3sas: Fix ioctl timeout Commit c1a6c5ac4278 ("scsi: mpt3sas: For NVME device, issue a protocol level reset") modified the ioctl path 'timeout' variable type to u8 from unsigned long, limiting the maximum timeout value that the driver can support to 255 seconds. If the management application is requesting a higher value the resulting timeout will be zero. The operation times out immediately and the ioctl request fails. Change datatype back to unsigned long. Link: https://lore.kernel.org/r/20201125094838.4340-1-suganath-prabu.subramani@broadcom.com Fixes: c1a6c5ac4278 ("scsi: mpt3sas: For NVME device, issue a protocol level reset") Cc: #v4.18+ Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 3b8c72d076c42bf27284cda7b2b2b522810686f8 Author: Andrea Parri (Microsoft) Date: Wed Nov 18 15:53:48 2020 +0100 scsi: storvsc: Validate length of incoming packet in storvsc_on_channel_callback() Check that the packet is of the expected size at least, don't copy data past the packet. Link: https://lore.kernel.org/r/20201118145348.109879-1-parri.andrea@gmail.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Reported-by: Saruhan Karademir Signed-off-by: Andrea Parri (Microsoft) Signed-off-by: Martin K. Petersen commit 05227490c5f0f1bbd3693a7a70b3fb5b09d2a996 Author: Masami Hiramatsu Date: Fri Nov 20 11:29:22 2020 +0900 docs: bootconfig: Add the endianness of fields Add a description about the endianness of the size and the checksum fields. Those must be stored as le32 instead of u32. This will allow us to apply bootconfig to the cross build initrd without caring the endianness. Link: https://lkml.kernel.org/r/160583936246.547349.10964204130590955409.stgit@devnote2 Reported-by: Steven Rostedt Suggested-by: Linus Torvalds Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit e86843580d1bb1ce12544bca3115cf11d51603ff Author: Masami Hiramatsu Date: Fri Nov 20 11:29:13 2020 +0900 tools/bootconfig: Store size and checksum in footer as le32 Store the size and the checksum fields in the footer as le32 instead of u32. This will allow us to apply bootconfig to the cross build initrd without caring the endianness. Link: https://lkml.kernel.org/r/160583935332.547349.5897811300636587426.stgit@devnote2 Reported-by: Steven Rostedt Suggested-by: Linus Torvalds Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 24aed09451270b6a2a78adf8a34918d12ffb7dcf Author: Masami Hiramatsu Date: Fri Nov 20 11:29:04 2020 +0900 bootconfig: Load size and checksum in the footer as le32 Load the size and the checksum fields in the footer as le32 instead of u32. This will allow us to apply bootconfig to the cross build initrd without caring the endianness. Link: https://lkml.kernel.org/r/160583934457.547349.10504070298990791074.stgit@devnote2 Reported-by: Steven Rostedt Suggested-by: Linus Torvalds Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 68e10d5ff512b503dcba1246ad5620f32035e135 Author: Steven Rostedt (VMware) Date: Mon Nov 30 23:16:03 2020 -0500 ring-buffer: Always check to put back before stamp when crossing pages The current ring buffer logic checks to see if the updating of the event buffer was interrupted, and if it is, it will try to fix up the before stamp with the write stamp to make them equal again. This logic is flawed, because if it is not interrupted, the two are guaranteed to be different, as the current event just updated the before stamp before allocation. This guarantees that the next event (this one or another interrupting one) will think it interrupted the time updates of a previous event and inject an absolute time stamp to compensate. The correct logic is to always update the timestamps when traversing to a new sub buffer. Cc: stable@vger.kernel.org Fixes: a389d86f7fd09 ("ring-buffer: Have nested events still record running time stamp") Signed-off-by: Steven Rostedt (VMware) commit 6112ff4e8f393e7e297dff04eff0987f94d37fa1 Author: Jing Xiangfeng Date: Fri Nov 27 11:02:06 2020 +0800 scsi: storvsc: Fix error return in storvsc_probe() Return -ENOMEM from the error handling case instead of 0. Link: https://lore.kernel.org/r/20201127030206.104616-1-jingxiangfeng@huawei.com Fixes: 436ad9413353 ("scsi: storvsc: Allow only one remove lun work item to be issued per lun") Reviewed-by: Michael Kelley Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit 237f977ab920490502f5fe39af4390f26db2cd40 Merge: a5e74021e84bb 13a84cf37a4cf Author: Jakub Kicinski Date: Mon Nov 30 19:03:48 2020 -0800 Merge tag 'linux-can-fixes-for-5.10-20201130' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2020-11-30 The first patch is by me an target the tcan4x5x bindings for the m_can driver. It fixes the error path in the tcan4x5x_can_probe() function. The next two patches are by Jeroen Hofstee and makes the lost of arbitration error counters of sja1000 and the sun4i drivers consistent with the other drivers. Zhang Qilong contributes two patch that clean up the error path in the c_can and kvaser_pciefd drivers. * tag 'linux-can-fixes-for-5.10-20201130' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: kvaser_pciefd: kvaser_pciefd_open(): fix error handling can: c_can: c_can_power_up(): fix error handling can: sun4i_can: sun4i_can_err(): don't count arbitration lose as an error can: sja1000: sja1000_err(): don't count arbitration lose as an error can: m_can: tcan4x5x_can_probe(): fix error path: remove erroneous clk_disable_unprepare() ==================== Link: https://lore.kernel.org/r/20201130125307.218258-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 49a962c075dfa41c78e34784772329bc8784d217 Author: Naveen N. Rao Date: Thu Nov 26 23:38:39 2020 +0530 ftrace: Fix DYNAMIC_FTRACE_WITH_DIRECT_CALLS dependency DYNAMIC_FTRACE_WITH_DIRECT_CALLS should depend on DYNAMIC_FTRACE_WITH_REGS since we need ftrace_regs_caller(). Link: https://lkml.kernel.org/r/fc4b257ea8689a36f086d2389a9ed989496ca63a.1606412433.git.naveen.n.rao@linux.vnet.ibm.com Cc: stable@vger.kernel.org Fixes: 763e34e74bb7d5c ("ftrace: Add register_ftrace_direct()") Signed-off-by: Naveen N. Rao Signed-off-by: Steven Rostedt (VMware) commit 4c75b0ff4e4bf7a45b5aef9639799719c28d0073 Author: Naveen N. Rao Date: Thu Nov 26 23:38:38 2020 +0530 ftrace: Fix updating FTRACE_FL_TRAMP On powerpc, kprobe-direct.tc triggered FTRACE_WARN_ON() in ftrace_get_addr_new() followed by the below message: Bad trampoline accounting at: 000000004222522f (wake_up_process+0xc/0x20) (f0000001) The set of steps leading to this involved: - modprobe ftrace-direct-too - enable_probe - modprobe ftrace-direct - rmmod ftrace-direct <-- trigger The problem turned out to be that we were not updating flags in the ftrace record properly. From the above message about the trampoline accounting being bad, it can be seen that the ftrace record still has FTRACE_FL_TRAMP set though ftrace-direct module is going away. This happens because we are checking if any ftrace_ops has the FTRACE_FL_TRAMP flag set _before_ updating the filter hash. The fix for this is to look for any _other_ ftrace_ops that also needs FTRACE_FL_TRAMP. Link: https://lkml.kernel.org/r/56c113aa9c3e10c19144a36d9684c7882bf09af5.1606412433.git.naveen.n.rao@linux.vnet.ibm.com Cc: stable@vger.kernel.org Fixes: a124692b698b0 ("ftrace: Enable trampoline when rec count returns back to one") Signed-off-by: Naveen N. Rao Signed-off-by: Steven Rostedt (VMware) commit 8fa655a3a0013a0c2a2aada6f39a93ee6fc25549 Author: Minchan Kim Date: Wed Nov 25 14:56:54 2020 -0800 tracing: Fix alignment of static buffer With 5.9 kernel on ARM64, I found ftrace_dump output was broken but it had no problem with normal output "cat /sys/kernel/debug/tracing/trace". With investigation, it seems coping the data into temporal buffer seems to break the align binary printf expects if the static buffer is not aligned with 4-byte. IIUC, get_arg in bstr_printf expects that args has already right align to be decoded and seq_buf_bprintf says ``the arguments are saved in a 32bit word array that is defined by the format string constraints``. So if we don't keep the align under copy to temporal buffer, the output will be broken by shifting some bytes. This patch fixes it. Link: https://lkml.kernel.org/r/20201125225654.1618966-1-minchan@kernel.org Cc: Fixes: 8e99cf91b99bb ("tracing: Do not allocate buffer in trace_find_next_entry() in atomic") Signed-off-by: Namhyung Kim Signed-off-by: Minchan Kim Signed-off-by: Steven Rostedt (VMware) commit 310e3a4b5a4fc718a72201c1e4cf5c64ac6f5442 Author: Vasily Averin Date: Wed Nov 18 15:05:20 2020 +0300 tracing: Remove WARN_ON in start_thread() This patch reverts commit 978defee11a5 ("tracing: Do a WARN_ON() if start_thread() in hwlat is called when thread exists") .start hook can be legally called several times if according tracer is stopped screen window 1 [root@localhost ~]# echo 1 > /sys/kernel/tracing/events/kmem/kfree/enable [root@localhost ~]# echo 1 > /sys/kernel/tracing/options/pause-on-trace [root@localhost ~]# less -F /sys/kernel/tracing/trace screen window 2 [root@localhost ~]# cat /sys/kernel/debug/tracing/tracing_on 0 [root@localhost ~]# echo hwlat > /sys/kernel/debug/tracing/current_tracer [root@localhost ~]# echo 1 > /sys/kernel/debug/tracing/tracing_on [root@localhost ~]# cat /sys/kernel/debug/tracing/tracing_on 0 [root@localhost ~]# echo 2 > /sys/kernel/debug/tracing/tracing_on triggers warning in dmesg: WARNING: CPU: 3 PID: 1403 at kernel/trace/trace_hwlat.c:371 hwlat_tracer_start+0xc9/0xd0 Link: https://lkml.kernel.org/r/bd4d3e70-400d-9c82-7b73-a2d695e86b58@virtuozzo.com Cc: Ingo Molnar Cc: stable@vger.kernel.org Fixes: 978defee11a5 ("tracing: Do a WARN_ON() if start_thread() in hwlat is called when thread exists") Signed-off-by: Vasily Averin Signed-off-by: Steven Rostedt (VMware) commit 983df5f2699f83f78643b19d3399b160d1e64f5b Author: Sami Tolvanen Date: Fri Nov 13 10:34:14 2020 -0800 samples/ftrace: Mark my_tramp[12]? global my_tramp[12]? are declared as global functions in C, but they are not marked global in the inline assembly definition. This mismatch confuses Clang's Control-Flow Integrity checking. Fix the definitions by adding .globl. Link: https://lkml.kernel.org/r/20201113183414.1446671-1-samitolvanen@google.com Fixes: 9d907f1ae80b8 ("ftrace/samples: Add a sample module that implements modify_ftrace_direct()") Reviewed-by: Kees Cook Signed-off-by: Sami Tolvanen Signed-off-by: Steven Rostedt (VMware) commit a5e74021e84bb5eadf760aaf2c583304f02269be Author: Sven Eckelmann Date: Thu Nov 26 13:52:47 2020 +0100 vxlan: Copy needed_tailroom from lowerdev While vxlan doesn't need any extra tailroom, the lowerdev might need it. In that case, copy it over to reduce the chance for additional (re)allocations in the transmit path. Signed-off-by: Sven Eckelmann Link: https://lore.kernel.org/r/20201126125247.1047977-2-sven@narfation.org Signed-off-by: Jakub Kicinski commit 0a35dc41fea67ac4495ce7584406bf9557a6e7d0 Author: Sven Eckelmann Date: Thu Nov 26 13:52:46 2020 +0100 vxlan: Add needed_headroom for lower device It was observed that sending data via batadv over vxlan (on top of wireguard) reduced the performance massively compared to raw ethernet or batadv on raw ethernet. A check of perf data showed that the vxlan_build_skb was calling all the time pskb_expand_head to allocate enough headroom for: min_headroom = LL_RESERVED_SPACE(dst->dev) + dst->header_len + VXLAN_HLEN + iphdr_len; But the vxlan_config_apply only requested needed headroom for: lowerdev->hard_header_len + VXLAN6_HEADROOM or VXLAN_HEADROOM So it completely ignored the needed_headroom of the lower device. The first caller of net_dev_xmit could therefore never make sure that enough headroom was allocated for the rest of the transmit path. Cc: Annika Wickert Signed-off-by: Sven Eckelmann Tested-by: Annika Wickert Link: https://lore.kernel.org/r/20201126125247.1047977-1-sven@narfation.org Signed-off-by: Jakub Kicinski commit e3d5e971d2f83d8ddd4b91a50cea4517fb488383 Author: Vinay Kumar Yadav Date: Thu Nov 26 03:19:14 2020 +0530 chelsio/chtls: fix panic during unload reload chtls there is kernel panic in inet_twsk_free() while chtls module unload when socket is in TIME_WAIT state because sk_prot_creator was not preserved on connection socket. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Udai Sharma Signed-off-by: Vinay Kumar Yadav Link: https://lore.kernel.org/r/20201125214913.16938-1-vinay.yadav@chelsio.com Signed-off-by: Jakub Kicinski commit 19ba8fb810c60b46869acc9f455613de454e0fca Author: Bernd Bauer Date: Thu Nov 26 18:56:28 2020 +0100 ARM: dts: imx6qdl-kontron-samx6i: fix I2C_PM scl pin Use the correct pin for the i2c scl signal else we can't access the SoM eeprom. Fixes: 2a51f9dae13d ("ARM: dts: imx6qdl-kontron-samx6i: Add iMX6-based Kontron SMARC-sAMX6i module") Signed-off-by: Bernd Bauer [m.felsch@pengutronix.de: Adapt commit message] Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo commit 58d6bca5efc73235b0f84c0d53321737177c651e Author: Fabio Estevam Date: Mon Nov 30 17:54:47 2020 -0300 ARM: dts: imx6qdl-wandboard-revd1: Remove PAD_GPIO_6 from enetgrp Since commit 8ad2d1dcce54 ("ARM: dts: imx6qdl-wandboard: Add OV5645 camera support") the PAD_GPIO_6 is used for providing the camera sensor clock. Remove it from the enetgrp to fix the following IOMXU conflict: [ 9.972414] imx6q-pinctrl 20e0000.pinctrl: pin MX6Q_PAD_GPIO_6 already requested by 2188000.ethernet; cannot claim for 1-003c [ 9.983857] imx6q-pinctrl 20e0000.pinctrl: pin-140 (1-003c) status -22 [ 9.990514] imx6q-pinctrl 20e0000.pinctrl: could not request pin 140 (MX6Q_PAD_GPIO_6) from group ov5645grp on device 20e0000.pinctrl Fixes: 8ad2d1dcce54 ("ARM: dts: imx6qdl-wandboard: Add OV5645 camera support") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 777a7717d60ccdc9b84f35074f848d3f746fc3bf Author: Chris Wilson Date: Thu Nov 26 14:08:41 2020 +0000 drm/i915/gt: Program mocs:63 for cache eviction on gen9 Ville noticed that the last mocs entry is used unconditionally by the HW when it performs cache evictions, and noted that while the value is not meant to be writable by the driver, we should program it to a reasonable value nevertheless. As it turns out, we can change the value of mocs:63 and the value we were programming into it would cause hard hangs in conjunction with atomic operations. v2: Add details from bspec about how it is used by HW Suggested-by: Ville Syrjälä Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2707 Fixes: 3bbaba0ceaa2 ("drm/i915: Added Programming of the MOCS") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Jason Ekstrand Cc: # v4.3+ Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201126140841.1982-1-chris@chris-wilson.co.uk (cherry picked from commit 977933b5da7c16f39295c4c1d4259a58ece65dbe) Signed-off-by: Rodrigo Vivi commit 70e734fed740939704d1b3b76d6f2e6909698586 Author: Robert Karszniewicz Date: Fri Nov 20 18:51:24 2020 +0100 ARM: imx: Use correct SRC base address Commit 4a4fb66119eb ("ARM: imx: Add missing of_node_put()") accidentally forgot to rename a variable, which caused the wrong address to be used and, in our case, the ULL getting falsely identified as ULZ. Fixes: 4a4fb66119eb ("ARM: imx: Add missing of_node_put()") Signed-off-by: Robert Karszniewicz Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit dd0ecf544125639e54056d851e4887dbb94b6d2f Author: Andreas Gruenbacher Date: Mon Nov 30 16:07:25 2020 +0100 gfs2: Fix deadlock between gfs2_{create_inode,inode_lookup} and delete_work_func In gfs2_create_inode and gfs2_inode_lookup, make sure to cancel any pending delete work before taking the inode glock. Otherwise, gfs2_cancel_delete_work may block waiting for delete_work_func to complete, and delete_work_func may block trying to acquire the inode glock in gfs2_inode_lookup. Reported-by: Alexander Aring Fixes: a0e3cc65fa29 ("gfs2: Turn gl_delete into a delayed work") Cc: stable@vger.kernel.org # v5.8+ Signed-off-by: Andreas Gruenbacher commit ed1182dc004dbcc7cfe64fb0e8ac520b25431715 Author: Björn Töpel Date: Fri Nov 27 18:17:26 2020 +0100 xdp: Handle MEM_TYPE_XSK_BUFF_POOL correctly in xdp_return_buff() It turns out that it does exist a path where xdp_return_buff() is being passed an XDP buffer of type MEM_TYPE_XSK_BUFF_POOL. This path is when AF_XDP zero-copy mode is enabled, and a buffer is redirected to a DEVMAP with an attached XDP program that drops the buffer. This change simply puts the handling of MEM_TYPE_XSK_BUFF_POOL back into xdp_return_buff(). Fixes: 82c41671ca4f ("xdp: Simplify xdp_return_{frame, frame_rx_napi, buff}") Reported-by: Maxim Mikityanskiy Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Maxim Mikityanskiy Link: https://lore.kernel.org/bpf/20201127171726.123627-1-bjorn.topel@gmail.com commit 271e0c9dce1b02a825b3cc1a7aa1fab7c381d44b Author: Libo Chen Date: Fri Nov 20 18:12:43 2020 -0800 ktest.pl: Fix incorrect reboot for grub2bls This issue was first noticed when I was testing different kernels on Oracle Linux 8 which as Fedora 30+ adopts BLS as default. Even though a kernel entry was added successfully and the index of that kernel entry was retrieved correctly, ktest still wouldn't reboot the system into user-specified kernel. The bug was spotted in subroutine reboot_to where the if-statement never checks for REBOOT_TYPE "grub2bls", therefore the desired entry will not be set for the next boot. Add a check for "grub2bls" so that $grub_reboot $grub_number can be run before a reboot if REBOOT_TYPE is "grub2bls" then we can boot to the correct kernel. Link: https://lkml.kernel.org/r/20201121021243.1532477-1-libo.chen@oracle.com Cc: stable@vger.kernel.org Fixes: ac2466456eaa ("ktest: introduce grub2bls REBOOT_TYPE option") Signed-off-by: Libo Chen Signed-off-by: Steven Rostedt (VMware) commit 212253367dc7b49ed3fc194ce71b0992eacaecf2 Author: Paulo Alcantara Date: Sat Nov 28 16:54:02 2020 -0300 cifs: fix potential use-after-free in cifs_echo_request() This patch fixes a potential use-after-free bug in cifs_echo_request(). For instance, thread 1 -------- cifs_demultiplex_thread() clean_demultiplex_info() kfree(server) thread 2 (workqueue) -------- apic_timer_interrupt() smp_apic_timer_interrupt() irq_exit() __do_softirq() run_timer_softirq() call_timer_fn() cifs_echo_request() <- use-after-free in server ptr Signed-off-by: Paulo Alcantara (SUSE) CC: Stable Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit 6988a619f5b79e4efadea6e19dcfe75fbcd350b5 Author: Paulo Alcantara Date: Sat Nov 28 15:57:06 2020 -0300 cifs: allow syscalls to be restarted in __smb_send_rqst() A customer has reported that several files in their multi-threaded app were left with size of 0 because most of the read(2) calls returned -EINTR and they assumed no bytes were read. Obviously, they could have fixed it by simply retrying on -EINTR. We noticed that most of the -EINTR on read(2) were due to real-time signals sent by glibc to process wide credential changes (SIGRT_1), and its signal handler had been established with SA_RESTART, in which case those calls could have been automatically restarted by the kernel. Let the kernel decide to whether or not restart the syscalls when there is a signal pending in __smb_send_rqst() by returning -ERESTARTSYS. If it can't, it will return -EINTR anyway. Signed-off-by: Paulo Alcantara (SUSE) CC: Stable Reviewed-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French commit 8785f51a17083eee7c37606079c6447afc6ba102 Author: Andrea Righi Date: Sat Nov 28 10:15:17 2020 +0100 ring-buffer: Set the right timestamp in the slow path of __rb_reserve_next() In the slow path of __rb_reserve_next() a nested event(s) can happen between evaluating the timestamp delta of the current event and updating write_stamp via local_cmpxchg(); in this case the delta is not valid anymore and it should be set to 0 (same timestamp as the interrupting event), since the event that we are currently processing is not the last event in the buffer. Link: https://lkml.kernel.org/r/X8IVJcp1gRE+FJCJ@xps-13-7390 Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: stable@vger.kernel.org Link: https://lwn.net/Articles/831207 Fixes: a389d86f7fd0 ("ring-buffer: Have nested events still record running time stamp") Signed-off-by: Andrea Righi Signed-off-by: Steven Rostedt (VMware) commit 55ea4cf403800af2ce6b125bc3d853117e0c0456 Author: Steven Rostedt (VMware) Date: Fri Nov 27 11:20:58 2020 -0500 ring-buffer: Update write stamp with the correct ts The write stamp, used to calculate deltas between events, was updated with the stale "ts" value in the "info" structure, and not with the updated "ts" variable. This caused the deltas between events to be inaccurate, and when crossing into a new sub buffer, had time go backwards. Link: https://lkml.kernel.org/r/20201124223917.795844-1-elavila@google.com Cc: stable@vger.kernel.org Fixes: a389d86f7fd09 ("ring-buffer: Have nested events still record running time stamp") Reported-by: "J. Avila" Tested-by: Daniel Mentz Tested-by: Will McVicker Signed-off-by: Steven Rostedt (VMware) commit 2d280bc8930ba9ed1705cfd548c6c8924949eaf1 Author: Pavel Begunkov Date: Sun Nov 29 18:33:32 2020 +0000 io_uring: fix recvmsg setup with compat buf-select __io_compat_recvmsg_copy_hdr() with REQ_F_BUFFER_SELECT reads out iov len but never assigns it to iov/fast_iov, leaving sr->len with garbage. Hopefully, following io_buffer_select() truncates it to the selected buffer size, but the value is still may be under what was specified. Cc: # 5.7 Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9e5344e0ffc33f4fee899f98b6939a0682b1d9c3 Author: Vincenzo Frascino Date: Mon Nov 30 17:07:09 2020 +0000 arm64: mte: Fix typo in macro definition UL in the definition of SYS_TFSR_EL1_TF1 was misspelled causing compilation issues when trying to implement in kernel MTE async mode. Fix the macro correcting the typo. Note: MTE async mode will be introduced with a future series. Fixes: c058b1c4a5ea ("arm64: mte: system register definitions") Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Vincenzo Frascino Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20201130170709.22309-1-vincenzo.frascino@arm.com Signed-off-by: Will Deacon commit 63e2fffa59a9dd91e443b08832656399fd80b7f0 Author: Trond Myklebust Date: Sun Nov 15 17:37:37 2020 -0500 pNFS/flexfiles: Fix array overflow when flexfiles mirroring is enabled If the flexfiles mirroring is enabled, then the read code expects to be able to set pgio->pg_mirror_idx to point to the data server that is being used for this particular read. However it does not change the pg_mirror_count because we only need to send a single read. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit a71464d0b9305dc5db6b01392c7218b81480b00f Merge: f0992098cadb4 5555b7c56bdec Author: Greg Kroah-Hartman Date: Mon Nov 30 15:25:12 2020 +0100 Merge tag 'misc-habanalabs-fixes-2020-11-30' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-linus Oded writes: This tag contains two bug fixes for v5.10-rc7: - Memory leak every time a user closes the file-descriptor of the device. The driver didn't always free all the VA range structures it maintains per user. - Memory leak every time the driver was removed. The device structure was not "put" at the device's teardown function in the driver. * tag 'misc-habanalabs-fixes-2020-11-30' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: habanalabs: put devices before driver removal habanalabs: free host huge va_range if not used commit d3f31301894d1b70d3dc3e8fa5ef3165878338ff Merge: 7cc01c445da86 600c0849cf86b Author: Greg Kroah-Hartman Date: Mon Nov 30 15:23:28 2020 +0100 Merge tag 'thunderbolt-for-v5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fix for v5.10-rc7 This includes a single fix for use-after-free bug after resume from hibernation. * tag 'thunderbolt-for-v5.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Fix use-after-free in remove_unplugged_switch() commit 2a9b3e6ac69a8bf177d8496a11e749e2dc72fa22 Author: Mark Rutland Date: Mon Nov 30 11:59:50 2020 +0000 arm64: entry: fix EL1 debug transitions In debug_exception_enter() and debug_exception_exit() we trace hardirqs on/off while RCU isn't guaranteed to be watching, and we don't save and restore the hardirq state, and so may return with this having changed. Handle this appropriately with new entry/exit helpers which do the bare minimum to ensure this is appropriately maintained, without marking debug exceptions as NMIs. These are placed in entry-common.c with the other entry/exit helpers. In future we'll want to reconsider whether some debug exceptions should be NMIs, but this will require a significant refactoring, and for now this should prevent issues with lockdep and RCU. Signed-off-by: Mark Rutland Cc: Catalin Marins Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201130115950.22492-12-mark.rutland@arm.com Signed-off-by: Will Deacon commit f0cd5ac1e4c53cb691b3ed3cda1031e1c42153e2 Author: Mark Rutland Date: Mon Nov 30 11:59:49 2020 +0000 arm64: entry: fix NMI {user, kernel}->kernel transitions Exceptions which can be taken at (almost) any time are consdiered to be NMIs. On arm64 that includes: * SDEI events * GICv3 Pseudo-NMIs * Kernel stack overflows * Unexpected/unhandled exceptions ... but currently debug exceptions (BRKs, breakpoints, watchpoints, single-step) are not considered NMIs. As these can be taken at any time, kernel features (lockdep, RCU, ftrace) may not be in a consistent kernel state. For example, we may take an NMI from the idle code or partway through an entry/exit path. While nmi_enter() and nmi_exit() handle most of this state, notably they don't save/restore the lockdep state across an NMI being taken and handled. When interrupts are enabled and an NMI is taken, lockdep may see interrupts become disabled within the NMI code, but not see interrupts become enabled when returning from the NMI, leaving lockdep believing interrupts are disabled when they are actually disabled. The x86 code handles this in idtentry_{enter,exit}_nmi(), which will shortly be moved to the generic entry code. As we can't use either yet, we copy the x86 approach in arm64-specific helpers. All the NMI entrypoints are marked as noinstr to prevent any instrumentation handling code being invoked before the state has been corrected. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201130115950.22492-11-mark.rutland@arm.com Signed-off-by: Will Deacon commit 7cd1ea1010acbede7eb87b6abb6198921fb36957 Author: Mark Rutland Date: Mon Nov 30 11:59:48 2020 +0000 arm64: entry: fix non-NMI kernel<->kernel transitions There are periods in kernel mode when RCU is not watching and/or the scheduler tick is disabled, but we can still take exceptions such as interrupts. The arm64 exception handlers do not account for this, and it's possible that RCU is not watching while an exception handler runs. The x86/generic entry code handles this by ensuring that all (non-NMI) kernel exception handlers call irqentry_enter() and irqentry_exit(), which handle RCU, lockdep, and IRQ flag tracing. We can't yet move to the generic entry code, and already hadnle the user<->kernel transitions elsewhere, so we add new kernel<->kernel transition helpers alog the lines of the generic entry code. Since we now track interrupts becoming masked when an exception is taken, local_daif_inherit() is modified to track interrupts becoming re-enabled when the original context is inherited. To balance the entry/exit paths, each handler masks all DAIF exceptions before exit_to_kernel_mode(). Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201130115950.22492-10-mark.rutland@arm.com Signed-off-by: Will Deacon commit 1ec2f2c05b2ab845d068bff29bd32dbfc6a6ad4c Author: Mark Rutland Date: Mon Nov 30 11:59:47 2020 +0000 arm64: ptrace: prepare for EL1 irq/rcu tracking Exceptions from EL1 may be taken when RCU isn't watching (e.g. in idle sequences), or when the lockdep hardirqs transiently out-of-sync with the hardware state (e.g. in the middle of local_irq_enable()). To correctly handle these cases, we'll need to save/restore this state across some exceptions taken from EL1. A series of subsequent patches will update EL1 exception handlers to handle this. In preparation for this, and to avoid dependencies between those patches, this patch adds two new fields to struct pt_regs so that exception handlers can track this state. Note that this is placed in pt_regs as some entry/exit sequences such as el1_irq are invoked from assembly, which makes it very difficult to add a separate structure as with the irqentry_state used by x86. We can separate this once more of the exception logic is moved to C. While the fields only need to be bool, they are both made u64 to keep pt_regs 16-byte aligned. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201130115950.22492-9-mark.rutland@arm.com Signed-off-by: Will Deacon commit 23529049c68423820487304f244144e0d576e85a Author: Mark Rutland Date: Mon Nov 30 11:59:46 2020 +0000 arm64: entry: fix non-NMI user<->kernel transitions When built with PROVE_LOCKING, NO_HZ_FULL, and CONTEXT_TRACKING_FORCE will WARN() at boot time that interrupts are enabled when we call context_tracking_user_enter(), despite the DAIF flags indicating that IRQs are masked. The problem is that we're not tracking IRQ flag changes accurately, and so lockdep believes interrupts are enabled when they are not (and vice-versa). We can shuffle things so to make this more accurate. For kernel->user transitions there are a number of constraints we need to consider: 1) When we call __context_tracking_user_enter() HW IRQs must be disabled and lockdep must be up-to-date with this. 2) Userspace should be treated as having IRQs enabled from the PoV of both lockdep and tracing. 3) As context_tracking_user_enter() stops RCU from watching, we cannot use RCU after calling it. 4) IRQ flag tracing and lockdep have state that must be manipulated before RCU is disabled. ... with similar constraints applying for user->kernel transitions, with the ordering reversed. The generic entry code has enter_from_user_mode() and exit_to_user_mode() helpers to handle this. We can't use those directly, so we add arm64 copies for now (without the instrumentation markers which aren't used on arm64). These replace the existing user_exit() and user_exit_irqoff() calls spread throughout handlers, and the exception unmasking is left as-is. Note that: * The accounting for debug exceptions from userspace now happens in el0_dbg() and ret_to_user(), so this is removed from debug_exception_enter() and debug_exception_exit(). As user_exit_irqoff() wakes RCU, the userspace-specific check is removed. * The accounting for syscalls now happens in el0_svc(), el0_svc_compat(), and ret_to_user(), so this is removed from el0_svc_common(). This does not adversely affect the workaround for erratum 1463225, as this does not depend on any of the state tracking. * In ret_to_user() we mask interrupts with local_daif_mask(), and so we need to inform lockdep and tracing. Here a trace_hardirqs_off() is sufficient and safe as we have not yet exited kernel context and RCU is usable. * As PROVE_LOCKING selects TRACE_IRQFLAGS, the ifdeferry in entry.S only needs to check for the latter. * EL0 SError handling will be dealt with in a subsequent patch, as this needs to be treated as an NMI. Prior to this patch, booting an appropriately-configured kernel would result in spats as below: | DEBUG_LOCKS_WARN_ON(lockdep_hardirqs_enabled()) | WARNING: CPU: 2 PID: 1 at kernel/locking/lockdep.c:5280 check_flags.part.54+0x1dc/0x1f0 | Modules linked in: | CPU: 2 PID: 1 Comm: init Not tainted 5.10.0-rc3 #3 | Hardware name: linux,dummy-virt (DT) | pstate: 804003c5 (Nzcv DAIF +PAN -UAO -TCO BTYPE=--) | pc : check_flags.part.54+0x1dc/0x1f0 | lr : check_flags.part.54+0x1dc/0x1f0 | sp : ffff80001003bd80 | x29: ffff80001003bd80 x28: ffff66ce801e0000 | x27: 00000000ffffffff x26: 00000000000003c0 | x25: 0000000000000000 x24: ffffc31842527258 | x23: ffffc31842491368 x22: ffffc3184282d000 | x21: 0000000000000000 x20: 0000000000000001 | x19: ffffc318432ce000 x18: 0080000000000000 | x17: 0000000000000000 x16: ffffc31840f18a78 | x15: 0000000000000001 x14: ffffc3184285c810 | x13: 0000000000000001 x12: 0000000000000000 | x11: ffffc318415857a0 x10: ffffc318406614c0 | x9 : ffffc318415857a0 x8 : ffffc31841f1d000 | x7 : 647261685f706564 x6 : ffffc3183ff7c66c | x5 : ffff66ce801e0000 x4 : 0000000000000000 | x3 : ffffc3183fe00000 x2 : ffffc31841500000 | x1 : e956dc24146b3500 x0 : 0000000000000000 | Call trace: | check_flags.part.54+0x1dc/0x1f0 | lock_is_held_type+0x10c/0x188 | rcu_read_lock_sched_held+0x70/0x98 | __context_tracking_enter+0x310/0x350 | context_tracking_enter.part.3+0x5c/0xc8 | context_tracking_user_enter+0x6c/0x80 | finish_ret_to_user+0x2c/0x13cr Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201130115950.22492-8-mark.rutland@arm.com Signed-off-by: Will Deacon commit 105fc3352077bba5faaf12cf39f7e3aad26fb70b Author: Mark Rutland Date: Mon Nov 30 11:59:45 2020 +0000 arm64: entry: move el1 irq/nmi logic to C In preparation for reworking the EL1 irq/nmi entry code, move the existing logic to C. We no longer need the asm_nmi_enter() and asm_nmi_exit() wrappers, so these are removed. The new C functions are marked noinstr, which prevents compiler instrumentation and runtime probing. In subsequent patches we'll want the new C helpers to be called in all cases, so we don't bother wrapping the calls with ifdeferry. Even when the new C functions are stubs the trivial calls are unlikely to have a measurable impact on the IRQ or NMI paths anyway. Prototypes are added to as otherwise (in some configurations) GCC will complain about the lack of a forward declaration. We already do this for existing function, e.g. enter_from_user_mode(). The new helpers are marked as noinstr (which prevents all instrumentation, tracing, and kprobes). Otherwise, there should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201130115950.22492-7-mark.rutland@arm.com Signed-off-by: Will Deacon commit 3cb5ed4d76c15fb97c10e5e9f5268d92c68222ca Author: Mark Rutland Date: Mon Nov 30 11:59:44 2020 +0000 arm64: entry: prepare ret_to_user for function call In a subsequent patch ret_to_user will need to make a C function call (in some configurations) which may clobber x0-x18 at the start of the finish_ret_to_user block, before enable_step_tsk consumes the flags loaded into x1. In preparation for this, let's load the flags into x19, which is preserved across C function calls. This avoids a redundant reload of the flags and ensures we operate on a consistent shapshot regardless. There should be no functional change as a result of this patch. At this point of the entry/exit paths we only need to preserve x28 (tsk) and the sp, and x19 is free for this use. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201130115950.22492-6-mark.rutland@arm.com Signed-off-by: Will Deacon commit 2f911d494f3f028bbe6346e383a354225682cf1b Author: Mark Rutland Date: Mon Nov 30 11:59:43 2020 +0000 arm64: entry: move enter_from_user_mode to entry-common.c In later patches we'll want to extend enter_from_user_mode() and add a corresponding exit_to_user_mode(). As these will be common for all entries/exits from userspace, it'd be better for these to live in entry-common.c with the rest of the entry logic. This patch moves enter_from_user_mode() into entry-common.c. As with other functions in entry-common.c it is marked as noinstr (which prevents all instrumentation, tracing, and kprobes) but there are no other functional changes. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201130115950.22492-5-mark.rutland@arm.com Signed-off-by: Will Deacon commit da192676483232a0a9478c89cdddd412e5167470 Author: Mark Rutland Date: Mon Nov 30 11:59:42 2020 +0000 arm64: entry: mark entry code as noinstr Functions in entry-common.c are marked as notrace and NOKPROBE_SYMBOL(), but they're still subject to other instrumentation which may rely on lockdep/rcu/context-tracking being up-to-date, and may cause nested exceptions (e.g. for WARN/BUG or KASAN's use of BRK) which will corrupt exceptions registers which have not yet been read. Prevent this by marking all functions in entry-common.c as noinstr to prevent compiler instrumentation. This also blacklists the functions for tracing and kprobes, so we don't need to handle that separately. Functions elsewhere will be dealt with in subsequent patches. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201130115950.22492-4-mark.rutland@arm.com Signed-off-by: Will Deacon commit 114e0a684753516ef4b71ccb55a8ebcfa8735edb Author: Mark Rutland Date: Mon Nov 30 11:59:41 2020 +0000 arm64: mark idle code as noinstr Core code disables RCU when calling arch_cpu_idle(), so it's not safe for arch_cpu_idle() or its calees to be instrumented, as the instrumentation callbacks may attempt to use RCU or other features which are unsafe to use in this context. Mark them noinstr to prevent issues. The use of local_irq_enable() in arch_cpu_idle() is similarly problematic, and the "sched/idle: Fix arch_cpu_idle() vs tracing" patch queued in the tip tree addresses that case. Reported-by: Marco Elver Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201130115950.22492-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit ca1314d73eed493c49bb1932c60a8605530db2e4 Author: Mark Rutland Date: Mon Nov 30 11:59:40 2020 +0000 arm64: syscall: exit userspace before unmasking exceptions In el0_svc_common() we unmask exceptions before we call user_exit(), and so there's a window where an IRQ or debug exception can be taken while RCU is not watching. In do_debug_exception() we account for this in via debug_exception_{enter,exit}(), but in the el1_irq asm we do not and we call trace functions which rely on RCU before we have a guarantee that RCU is watching. Let's avoid this by having el0_svc_common() exit userspace before unmasking exceptions, matching what we do for all other EL0 entry paths. We can use user_exit_irqoff() to avoid the pointless save/restore of IRQ flags while we're sure exceptions are masked in DAIF. The workaround for Cortex-A76 erratum 1463225 may trigger a debug exception before this point, but the debug code invoked in this case is safe even when RCU is not watching. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201130115950.22492-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit 13a84cf37a4cf1155a41684236c2314eb40cd65c Author: Zhang Qilong Date: Sat Nov 28 21:39:22 2020 +0800 can: kvaser_pciefd: kvaser_pciefd_open(): fix error handling If kvaser_pciefd_bus_on() failed, we should call close_candev() to avoid reference leak. Fixes: 26ad340e582d3 ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201128133922.3276973-3-zhangqilong3@huawei.com Signed-off-by: Marc Kleine-Budde commit 44cef0c0ffbd8d61143712ce874be68a273b7884 Author: Zhang Qilong Date: Sat Nov 28 21:39:21 2020 +0800 can: c_can: c_can_power_up(): fix error handling In the error handling in c_can_power_up(), there are two bugs: 1) c_can_pm_runtime_get_sync() will increase usage counter if device is not empty. Forgetting to call c_can_pm_runtime_put_sync() will result in a reference leak here. 2) c_can_reset_ram() operation will set start bit when enable is true. We should clear it in the error handling. We fix it by adding c_can_pm_runtime_put_sync() for 1), and c_can_reset_ram(enable is false) for 2) in the error handling. Fixes: 8212003260c60 ("can: c_can: Add d_can suspend resume support") Fixes: 52cde85acc23f ("can: c_can: Add d_can raminit support") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201128133922.3276973-2-zhangqilong3@huawei.com [mkl: return "0" instead of "ret"] Signed-off-by: Marc Kleine-Budde commit c2d095eff797813461a426b97242e3ffc50e4134 Author: Jeroen Hofstee Date: Fri Nov 27 10:59:38 2020 +0100 can: sun4i_can: sun4i_can_err(): don't count arbitration lose as an error Losing arbitration is normal in a CAN-bus network, it means that a higher priority frame is being send and the pending message will be retried later. Hence most driver only increment arbitration_lost, but the sun4i driver also incremeants tx_error, causing errors to be reported on a normal functioning CAN-bus. So stop counting them as errors. Fixes: 0738eff14d81 ("can: Allwinner A10/A20 CAN Controller support - Kernel module") Signed-off-by: Jeroen Hofstee Link: https://lore.kernel.org/r/20201127095941.21609-1-jhofstee@victronenergy.com [mkl: split into two seperate patches] Signed-off-by: Marc Kleine-Budde commit bd0ccb92efb09c7da5b55162b283b42a93539ed7 Author: Jeroen Hofstee Date: Fri Nov 27 10:59:38 2020 +0100 can: sja1000: sja1000_err(): don't count arbitration lose as an error Losing arbitration is normal in a CAN-bus network, it means that a higher priority frame is being send and the pending message will be retried later. Hence most driver only increment arbitration_lost, but the sja1000 driver also incremeants tx_error, causing errors to be reported on a normal functioning CAN-bus. So stop counting them as errors. Fixes: 8935f57e68c4 ("can: sja1000: fix network statistics update") Signed-off-by: Jeroen Hofstee Link: https://lore.kernel.org/r/20201127095941.21609-1-jhofstee@victronenergy.com [mkl: split into two seperate patches] Signed-off-by: Marc Kleine-Budde commit ad1f5e826d91d6c27ecd36a607ad7c7f4d0b0733 Author: Marc Kleine-Budde Date: Fri Nov 27 16:17:11 2020 +0100 can: m_can: tcan4x5x_can_probe(): fix error path: remove erroneous clk_disable_unprepare() The clocks mcan_class->cclk and mcan_class->hclk are not prepared by any call during tcan4x5x_can_probe(), so remove erroneous clk_disable_unprepare() on them. Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Link: http://lore.kernel.org/r/20201130114252.215334-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 9ea69a55b3b9a71cded9726af591949c1138f235 Author: Laurent Vivier Date: Thu Nov 26 09:28:52 2020 +0100 powerpc/pseries: Pass MSI affinity to irq_create_mapping() With virtio multiqueue, normally each queue IRQ is mapped to a CPU. Commit 0d9f0a52c8b9f ("virtio_scsi: use virtio IRQ affinity") exposed an existing shortcoming of the arch code by moving virtio_scsi to the automatic IRQ affinity assignment. The affinity is correctly computed in msi_desc but this is not applied to the system IRQs. It appears the affinity is correctly passed to rtas_setup_msi_irqs() but lost at this point and never passed to irq_domain_alloc_descs() (see commit 06ee6d571f0e ("genirq: Add affinity hint to irq allocation")) because irq_create_mapping() doesn't take an affinity parameter. Use the new irq_create_mapping_affinity() function, which allows to forward the affinity setting from rtas_setup_msi_irqs() to irq_domain_alloc_descs(). With this change, the virtqueues are correctly dispatched between the CPUs on pseries. Fixes: e75eafb9b039 ("genirq/msi: Switch to new irq spreading infrastructure") Signed-off-by: Laurent Vivier Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kurz Acked-by: Michael Ellerman Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201126082852.1178497-3-lvivier@redhat.com commit bb4c6910c8b41623104c2e64a30615682689a54d Author: Laurent Vivier Date: Thu Nov 26 09:28:51 2020 +0100 genirq/irqdomain: Add an irq_create_mapping_affinity() function There is currently no way to convey the affinity of an interrupt via irq_create_mapping(), which creates issues for devices that expect that affinity to be managed by the kernel. In order to sort this out, rename irq_create_mapping() to irq_create_mapping_affinity() with an additional affinity parameter that can be passed down to irq_domain_alloc_descs(). irq_create_mapping() is re-implemented as a wrapper around irq_create_mapping_affinity(). No functional change. Fixes: e75eafb9b039 ("genirq/msi: Switch to new irq spreading infrastructure") Signed-off-by: Laurent Vivier Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kurz Cc: Michael Ellerman Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201126082852.1178497-2-lvivier@redhat.com commit fd4e788e971ce763e50762d7b1a0048992949dd0 Author: Tomi Valkeinen Date: Fri Nov 27 10:52:41 2020 +0200 drm/omap: sdi: fix bridge enable/disable When the SDI output was converted to DRM bridge, the atomic versions of enable and disable funcs were used. This was not intended, as that would require implementing other atomic funcs too. This leads to: WARNING: CPU: 0 PID: 18 at drivers/gpu/drm/drm_bridge.c:708 drm_atomic_helper_commit_modeset_enables+0x134/0x268 and display not working. Fix this by using the legacy enable/disable funcs. Fixes: 8bef8a6d5da81b909a190822b96805a47348146f ("drm/omap: sdi: Register a drm_bridge") Reported-by: Aaro Koskinen Signed-off-by: Tomi Valkeinen Tested-by: Ivaylo Dimitrov Tested-by: Aaro Koskinen Reviewed-by: Laurent Pinchart Cc: stable@vger.kernel.org # v5.7+ Link: https://patchwork.freedesktop.org/patch/msgid/20201127085241.848461-1-tomi.valkeinen@ti.com commit 509920aee72ae23235615a009c5148cdb38794c3 Author: Marc Zyngier Date: Sat Nov 28 10:37:07 2020 +0000 MAINTAINERS: Move Jason Cooper to CREDITS Jason's email address has now been bouncing for weeks, and no reply was received when trying to reach out on other addresses. We really hope he is OK. But until we hear of his whereabouts, let's move him to the CREDITS file so that people stop Cc-ing him. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Acked-by: Gregory CLEMENT Acked-by: Andrew Lunn Link: https://lore.kernel.org/r/20201128103707.332874-1-maz@kernel.org commit 5555b7c56bdec7a29c789fec27f84d40f52fbdfa Author: Ofir Bitton Date: Sun Nov 29 09:34:12 2020 +0200 habanalabs: put devices before driver removal Driver never puts its device and control_device objects, hence a memory leak is introduced every driver removal. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c8c39fbd01d42c30454e42c16bcd69c17260b90a Author: Ofir Bitton Date: Thu Nov 26 13:01:11 2020 +0200 habanalabs: free host huge va_range if not used If huge range is not valid, driver uses the host range also for huge page allocations, but driver never frees its allocation. This introduces a memory leak every time a user closes its context. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f0992098cadb4c9c6a00703b66cafe604e178fea Author: Samuel Thibault Date: Sun Nov 29 20:35:23 2020 +0100 speakup: Reject setting the speakup line discipline outside of speakup Speakup exposing a line discipline allows userland to try to use it, while it is deemed to be useless, and thus uselessly exposes potential bugs. One of them is simply that in such a case if the line sends data, spk_ttyio_receive_buf2 is called and crashes since spk_ttyio_synth is NULL. This change restricts the use of the speakup line discipline to speakup drivers, thus avoiding such kind of issues altogether. Cc: stable@vger.kernel.org Reported-by: Shisong Qin Signed-off-by: Samuel Thibault Tested-by: Shisong Qin Link: https://lore.kernel.org/r/20201129193523.hm3f6n5xrn6fiyyc@function Signed-off-by: Greg Kroah-Hartman commit 7cc01c445da868101b9080082b9c75283c261c82 Merge: b65054597872c 6b8137517e70f Author: Greg Kroah-Hartman Date: Mon Nov 30 09:10:58 2020 +0100 Merge tag 'usb-fixes-v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: - Fixed hardware role switch issue at TI platform - Fixed scatter-list buffer handling - Fixed error goto label issue * tag 'usb-fixes-v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: cdns3: core: fix goto label for error path usb: cdns3: gadget: clear trb->length as zero after preparing every trb usb: cdns3: Fix hardware based role switch commit 6b8137517e70f6e96d0251a98930b1f29d0be161 Author: Peter Chen Date: Thu Nov 26 14:02:38 2020 +0800 usb: cdns3: core: fix goto label for error path The usb_role_switch_register has been already called, so if the devm_request_irq has failed, it needs to call usb_role_switch_unregister. Fixes: b1234e3b3b26 ("usb: cdns3: add runtime PM support") Signed-off-by: Peter Chen commit 24fdaeeb294c14ea743ec99ada92380c060a428a Author: Peter Chen Date: Wed Nov 25 20:35:23 2020 +0800 usb: cdns3: gadget: clear trb->length as zero after preparing every trb It clears trb->length as zero before preparing td, but if scatter buffer is used for td, there are several trbs within td, it needs to clear every trb->length as zero, otherwise, the default value for trb->length may not be zero after it begins to use the second round of trb rings. Fixes: abc6b579048e ("usb: cdns3: gadget: using correct sg operations") Signed-off-by: Peter Chen commit 6703052fe30fa0d85f1fbbf50171486cb0148d2d Author: Roger Quadros Date: Wed Nov 25 14:49:36 2020 +0200 usb: cdns3: Fix hardware based role switch Hardware based role switch is broken as the driver always skips it. Fix this by registering for SW role switch only if 'usb-role-switch' property is present in the device tree. Fixes: 50642709f659 ("usb: cdns3: core: quit if it uses role switch class") Signed-off-by: Roger Quadros Signed-off-by: Peter Chen commit b65054597872ce3aefbc6a666385eabdf9e288da Author: Linus Torvalds Date: Sun Nov 29 15:50:50 2020 -0800 Linux 5.10-rc6 commit 7c4bada12d320d8648ba3ede6f9b6f9e10f1126a Author: Sebastian Reichel Date: Fri Nov 27 21:04:29 2020 +0100 drm/panel: sony-acx565akm: Fix race condition in probe The probe routine acquires the reset GPIO using GPIOD_OUT_LOW. Directly afterwards it calls acx565akm_detect(), which sets the GPIO value to HIGH. If the bootloader initialized the GPIO to HIGH before the probe routine was called, there is only a very short time period of a few instructions where the reset signal is LOW. Exact time depends on compiler optimizations, kernel configuration and alignment of the stars, but I expect it to be always way less than 10us. There are no public datasheets for the panel, but acx565akm_power_on() has a comment with timings and reset period should be at least 10us. So this potentially brings the panel into a half-reset state. The result is, that panel may not work after boot and can get into a working state by re-enabling it (e.g. by blanking + unblanking), since that does a clean reset cycle. This bug has recently been hit by Ivaylo Dimitrov, but there are some older reports which are probably the same bug. At least Tony Lindgren, Peter Ujfalusi and Jarkko Nikula have experienced it in 2017 describing the blank/unblank procedure as possible workaround. Note, that the bug really goes back in time. It has originally been introduced in the predecessor of the omapfb driver in commit 3c45d05be382 ("OMAPDSS: acx565akm panel: handle gpios in panel driver") in 2012. That driver eventually got replaced by a newer one, which had the bug from the beginning in commit 84192742d9c2 ("OMAPDSS: Add Sony ACX565AKM panel driver") and still exists in fbdev world. That driver has later been copied to omapdrm and then was used as a basis for this driver. Last but not least the omapdrm specific driver has been removed in commit 45f16c82db7e ("drm/omap: displays: Remove unused panel drivers"). Reported-by: Jarkko Nikula Reported-by: Peter Ujfalusi Reported-by: Tony Lindgren Reported-by: Aaro Koskinen Reported-by: Ivaylo Dimitrov Cc: Merlijn Wajer Cc: Laurent Pinchart Cc: Tomi Valkeinen Fixes: 1c8fc3f0c5d2 ("drm/panel: Add driver for the Sony ACX565AKM panel") Signed-off-by: Sebastian Reichel Tested-by: Ivaylo Dimitrov Tested-by: Aaro Koskinen Tested-by: Jarkko Nikula Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201127200429.129868-1-sebastian.reichel@collabora.com commit f91a3aa6bce480fe6e08df540129f4a923222419 Merge: 8b7a51ba2637e 6e1d2bc675bd5 Author: Linus Torvalds Date: Sun Nov 29 11:19:26 2020 -0800 Merge tag 'locking-urgent-2020-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "Two more places which invoke tracing from RCU disabled regions in the idle path. Similar to the entry path the low level idle functions have to be non-instrumentable" * tag 'locking-urgent-2020-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: intel_idle: Fix intel_idle() vs tracing sched/idle: Fix arch_cpu_idle() vs tracing commit 8b7a51ba2637ee53ce90624f5f98aaf8ec9b2bcc Merge: 1214917e008bb 7032908cd5842 Author: Linus Torvalds Date: Sun Nov 29 11:06:57 2020 -0800 Merge tag 'irq-urgent-2020-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "Two fixes for irqchip drivers: - Save and restore the GICV3 ITS state unconditionally on suspend/resume to handle firmware which fails to do so. - Use the correct index into the fwspec parameters to read the irq trigger type in the EXIU chip driver" * tag 'irq-urgent-2020-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3-its: Unconditionally save/restore the ITS state on suspend irqchip/exiu: Fix the index of fwspec for IRQ type commit 1214917e008bb8989747b8bf9a721f7a6db8f8d7 Merge: 7255a39d24a79 36a237526cd81 Author: Linus Torvalds Date: Sun Nov 29 10:18:53 2020 -0800 Merge tag 'efi-urgent-for-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Borislav Petkov: "More EFI fixes forwarded from Ard Biesheuvel: - revert efivarfs kmemleak fix again - it was a false positive - make CONFIG_EFI_EARLYCON depend on CONFIG_EFI explicitly so it does not pull in other dependencies unnecessarily if CONFIG_EFI is not set - defer attempts to load SSDT overrides from EFI vars until after the efivar layer is up" * tag 'efi-urgent-for-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: EFI_EARLYCON should depend on EFI efivarfs: revert "fix memory leak in efivarfs_create()" efi/efivars: Set generic ops before loading SSDT commit 7255a39d24a7960da3a55e840ca5cbed5fcb476f Merge: aae5ab854e381 25bc65d8ddfc1 Author: Linus Torvalds Date: Sun Nov 29 10:08:17 2020 -0800 Merge tag 'x86_urgent_for_v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: "A couple of urgent fixes which accumulated this last week: - Two resctrl fixes to prevent refcount leaks when manipulating the resctrl fs (Xiaochen Shen) - Correct prctl(PR_GET_SPECULATION_CTRL) reporting (Anand K Mistry) - A fix to not lose already seen MCE severity which determines whether the machine can recover (Gabriele Paoloni)" * tag 'x86_urgent_for_v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Do not overwrite no_way_out if mce_end() fails x86/speculation: Fix prctl() when spectre_v2_user={seccomp,prctl},ibpb x86/resctrl: Add necessary kernfs_put() calls to prevent refcount leak x86/resctrl: Remove superfluous kernfs_get() calls to prevent refcount leak commit aec9fe892812ed10d0bffcf309d2a8fc380d8ce6 Author: Paul Kocialkowski Date: Tue Nov 10 21:04:30 2020 +0100 drm/rockchip: Avoid uninitialized use of endpoint id in LVDS In the Rockchip DRM LVDS component driver, the endpoint id provided to drm_of_find_panel_or_bridge is grabbed from the endpoint's reg property. However, the property may be missing in the case of a single endpoint. Initialize the endpoint_id variable to 0 to avoid using an uninitialized variable in that case. Fixes: 34cc0aa25456 ("drm/rockchip: Add support for Rockchip Soc LVDS") Signed-off-by: Paul Kocialkowski Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20201110200430.1713467-1-paul.kocialkowski@bootlin.com commit aae5ab854e38151e69f261dbf0e3b7e396403178 Merge: 45e885c439e82 30aca1bacb398 Author: Linus Torvalds Date: Sat Nov 28 15:53:30 2020 -0800 Merge tag 'riscv-for-linus-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: "I've collected a handful of fixes over the past few weeks: - A fix to un-break the build-id argument to the vDSO build, which is necessary for the LLVM linker. - A fix to initialize the jump label subsystem, without which it (and all the stuff that uses it) doesn't actually function. - A fix to include from , without which some drivers won't compile" * tag 'riscv-for-linus-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: fix barrier() use in RISC-V: Add missing jump label initialization riscv: Explicitly specify the build id style in vDSO Makefile again commit 4d521943f76bd0d1e68ea5e02df7aadd30b2838a Author: Krzysztof Kozlowski Date: Mon Oct 26 16:36:20 2020 +0100 dt-bindings: net: correct interrupt flags in examples GPIO_ACTIVE_x flags are not correct in the context of interrupt flags. These are simple defines so they could be used in DTS but they will not have the same meaning: 1. GPIO_ACTIVE_HIGH = 0 = IRQ_TYPE_NONE 2. GPIO_ACTIVE_LOW = 1 = IRQ_TYPE_EDGE_RISING Correct the interrupt flags, assuming the author of the code wanted same logical behavior behind the name "ACTIVE_xxx", this is: ACTIVE_LOW => IRQ_TYPE_LEVEL_LOW ACTIVE_HIGH => IRQ_TYPE_LEVEL_HIGH Fixes: a1a8b4594f8d ("NFC: pn544: i2c: Add DTS Documentation") Fixes: 6be88670fc59 ("NFC: nxp-nci_i2c: Add I2C support to NXP NCI driver") Fixes: e3b329221567 ("dt-bindings: can: tcan4x5x: Update binding to use interrupt property") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Acked-by: Marc Kleine-Budde # for tcan4x5x.txt Link: https://lore.kernel.org/r/20201026153620.89268-1-krzk@kernel.org Signed-off-by: Jakub Kicinski commit 6548755c55254a3e96294a3385774641d178e011 Merge: bd2d5c54dc7c3 98c41f04a67ab Author: Jakub Kicinski Date: Sat Nov 28 13:26:50 2020 -0800 Merge branch 'ibmvnic-assorted-bug-fixes' Dany Madden says: ==================== ibmvnic: assorted bug fixes Assorted fixes for ibmvnic originated from "[PATCH net 00/15] ibmvnic: assorted bug fixes" sent by Lijun Pan. ==================== Link: https://lore.kernel.org/r/20201126000432.29897-1-drt@linux.ibm.com Signed-off-by: Jakub Kicinski commit 98c41f04a67abf5e7f7191d55d286e905d1430ef Author: Dany Madden Date: Wed Nov 25 18:04:32 2020 -0600 ibmvnic: reduce wait for completion time Reduce the wait time for Command Response Queue response from 30 seconds to 20 seconds, as recommended by VIOS and Power Hypervisor teams. Fixes: bd0b672313941 ("ibmvnic: Move login and queue negotiation into ibmvnic_open") Fixes: 53da09e92910f ("ibmvnic: Add set_link_state routine for setting adapter link state") Signed-off-by: Dany Madden Signed-off-by: Jakub Kicinski commit a86d5c682b798b2dadaa4171c1d124cf3c45a17c Author: Dany Madden Date: Wed Nov 25 18:04:31 2020 -0600 ibmvnic: no reset timeout for 5 seconds after reset Reset timeout is going off right after adapter reset. This patch ensures that timeout is scheduled if it has been 5 seconds since the last reset. 5 seconds is the default watchdog timeout. Fixes: ed651a10875f1 ("ibmvnic: Updated reset handling") Signed-off-by: Dany Madden Signed-off-by: Jakub Kicinski commit c98d9cc4170da7e16a1012563d0f9fbe1c7cfe27 Author: Dany Madden Date: Wed Nov 25 18:04:30 2020 -0600 ibmvnic: send_login should check for crq errors send_login() does not check for the result of ibmvnic_send_crq() of the login request. This results in the driver needlessly retrying the login 10 times even when CRQ is no longer active. Check the return code and give up in case of errors in sending the CRQ. The only time we want to retry is if we get a PARITALSUCCESS response from the partner. Fixes: 032c5e82847a2 ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Dany Madden Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Jakub Kicinski commit 76cdc5c5d99ce4856ad0ac38facc33b52fa64f77 Author: Sukadev Bhattiprolu Date: Wed Nov 25 18:04:29 2020 -0600 ibmvnic: track pending login If after ibmvnic sends a LOGIN it gets a FAILOVER, it is possible that the worker thread will start reset process and free the login response buffer before it gets a (now stale) LOGIN_RSP. The ibmvnic tasklet will then try to access the login response buffer and crash. Have ibmvnic track pending logins and discard any stale login responses. Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Jakub Kicinski commit f15fde9d47b887b406f5e76490d601cfc26643c9 Author: Sukadev Bhattiprolu Date: Wed Nov 25 18:04:28 2020 -0600 ibmvnic: delay next reset if hard reset fails If auto-priority failover is enabled, the backing device needs time to settle if hard resetting fails for any reason. Add a delay of 60 seconds before retrying the hard-reset. Fixes: 2770a7984db5 ("ibmvnic: Introduce hard reset recovery") Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Jakub Kicinski commit 0cb4bc66ba5ea2d3b94ec2a00775888130db628a Author: Dany Madden Date: Wed Nov 25 18:04:27 2020 -0600 ibmvnic: restore adapter state on failed reset In a failed reset, driver could end up in VNIC_PROBED or VNIC_CLOSED state and cannot recover in subsequent resets, leaving it offline. This patch restores the adapter state to reset_state, the original state when reset was called. Fixes: b27507bb59ed5 ("net/ibmvnic: unlock rtnl_lock in reset so linkwatch_event can run") Fixes: 2770a7984db58 ("ibmvnic: Introduce hard reset recovery") Signed-off-by: Dany Madden Signed-off-by: Jakub Kicinski commit 9281cf2d584083a450fd65fd27cc5f0e692f6e30 Author: Dany Madden Date: Wed Nov 25 18:04:26 2020 -0600 ibmvnic: avoid memset null scrq msgs scrq->msgs could be NULL during device reset, causing Linux to crash. So, check before memset scrq->msgs. Fixes: c8b2ad0a4a901 ("ibmvnic: Sanitize entire SCRQ buffer on reset") Signed-off-by: Dany Madden Signed-off-by: Lijun Pan Signed-off-by: Jakub Kicinski commit 18f141bf97d42f65abfdf17fd93fb3a0dac100e7 Author: Dany Madden Date: Wed Nov 25 18:04:25 2020 -0600 ibmvnic: stop free_all_rwi on failed reset When ibmvnic fails to reset, it breaks out of the reset loop and frees all of the remaining resets from the workqueue. Doing so prevents the adapter from recovering if no reset is scheduled after that. Instead, have the driver continue to process resets on the workqueue. Remove the no longer need free_all_rwi(). Fixes: ed651a10875f1 ("ibmvnic: Updated reset handling") Signed-off-by: Dany Madden Signed-off-by: Jakub Kicinski commit 31d6b4036098f6b59bcfa20375626b500c7d7417 Author: Dany Madden Date: Wed Nov 25 18:04:24 2020 -0600 ibmvnic: handle inconsistent login with reset Inconsistent login with the vnicserver is causing the device to be removed. This does not give the device a chance to recover from error state. This patch schedules a FATAL reset instead to bring the adapter up. Fixes: 032c5e82847a2 ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Dany Madden Signed-off-by: Lijun Pan Signed-off-by: Jakub Kicinski commit bd2d5c54dc7c375586840e1f931f95a43c61d96a Merge: e14038a7ead09 a5d45bc0dc50f Author: Jakub Kicinski Date: Sat Nov 28 13:20:23 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Fix insufficient validation of IPSET_ATTR_IPADDR_IPV6 reported by syzbot. 2) Remove spurious reports on nf_tables when lockdep gets disabled, from Florian Westphal. 3) Fix memleak in the error path of error path of ip_vs_control_net_init(), from Wang Hai. 4) Fix missing control data in flow dissector, otherwise IP address matching in hardware offload infra does not work. 5) Fix hardware offload match on prefix IP address when userspace does not send a bitwise expression to represent the prefix. * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf: netfilter: nftables_offload: build mask based from the matching bytes netfilter: nftables_offload: set address type in control dissector ipvs: fix possible memory leak in ip_vs_control_net_init netfilter: nf_tables: avoid false-postive lockdep splat netfilter: ipset: prevent uninit-value in hash_ip6_add ==================== Link: https://lore.kernel.org/r/20201127190313.24947-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit e14038a7ead09faa180eb072adc4a2157a0b475f Author: Davide Caratti Date: Thu Nov 26 19:47:47 2020 +0100 selftests: tc-testing: enable CONFIG_NET_SCH_RED as a module a proper kernel configuration for running kselftest can be obtained with: $ yes | make kselftest-merge enable compile support for the 'red' qdisc: otherwise, tdc kselftest fail when trying to run tdc test items contained in red.json. Signed-off-by: Davide Caratti Link: https://lore.kernel.org/r/cfa23f2d4f672401e6cebca3a321dd1901a9ff07.1606416464.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit 1ebf179037cb46c19da3a9c1e2ca16e7a754b75e Author: Guillaume Nault Date: Thu Nov 26 19:09:22 2020 +0100 ipv4: Fix tos mask in inet_rtm_getroute() When inet_rtm_getroute() was converted to use the RCU variants of ip_route_input() and ip_route_output_key(), the TOS parameters stopped being masked with IPTOS_RT_MASK before doing the route lookup. As a result, "ip route get" can return a different route than what would be used when sending real packets. For example: $ ip route add 192.0.2.11/32 dev eth0 $ ip route add unreachable 192.0.2.11/32 tos 2 $ ip route get 192.0.2.11 tos 2 RTNETLINK answers: No route to host But, packets with TOS 2 (ECT(0) if interpreted as an ECN bit) would actually be routed using the first route: $ ping -c 1 -Q 2 192.0.2.11 PING 192.0.2.11 (192.0.2.11) 56(84) bytes of data. 64 bytes from 192.0.2.11: icmp_seq=1 ttl=64 time=0.173 ms --- 192.0.2.11 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.173/0.173/0.173/0.000 ms This patch re-applies IPTOS_RT_MASK in inet_rtm_getroute(), to return results consistent with real route lookups. Fixes: 3765d35ed8b9 ("net: ipv4: Convert inet_rtm_getroute to rcu versions of route lookup") Signed-off-by: Guillaume Nault Reviewed-by: David Ahern Link: https://lore.kernel.org/r/b2d237d08317ca55926add9654a48409ac1b8f5b.1606412894.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit 3771b822422fd999fbcd30c7e8302d251be0bb75 Merge: 28d35ad0838b2 9a44bc9449cfe Author: Jakub Kicinski Date: Sat Nov 28 12:04:56 2020 -0800 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2020-11-28 1) Do not reference the skb for xsk's generic TX side since when looped back into RX it might crash in generic XDP, from Björn Töpel. 2) Fix umem cleanup on a partially set up xsk socket when being destroyed, from Magnus Karlsson. 3) Fix an incorrect netdev reference count when failing xsk_bind() operation, from Marek Majtyka. 4) Fix bpftool to set an error code on failed calloc() in build_btf_type_table(), from Zhen Lei. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Add MAINTAINERS entry for BPF LSM bpftool: Fix error return value in build_btf_type_table net, xsk: Avoid taking multiple skbuff references xsk: Fix incorrect netdev reference count xsk: Fix umem cleanup bug at socket destruct MAINTAINERS: Update XDP and AF_XDP entries ==================== Link: https://lore.kernel.org/r/20201128005104.1205-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 28d35ad0838b26038ec42aa129692e4c43663e6b Merge: 44f64f23bae2f 992b03b88e362 Author: Jakub Kicinski Date: Sat Nov 28 11:56:06 2020 -0800 Merge tag 'batadv-net-pullrequest-20201127' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are some batman-adv bugfixes: - Fix head/tailroom issues for fragments, by Sven Eckelmann (3 patches) * tag 'batadv-net-pullrequest-20201127' of git://git.open-mesh.org/linux-merge: batman-adv: Don't always reallocate the fragmentation skb head batman-adv: Reserve needed_*room for fragments batman-adv: Consider fragmentation for needed_headroom ==================== Link: https://lore.kernel.org/r/20201127173849.19208-1-sw@simonwunderlich.de Signed-off-by: Jakub Kicinski commit 44f64f23bae2f0fad25503bc7ab86cd08d04cd47 Author: Antoine Tenart Date: Mon Nov 23 18:49:02 2020 +0100 netfilter: bridge: reset skb->pkt_type after NF_INET_POST_ROUTING traversal Netfilter changes PACKET_OTHERHOST to PACKET_HOST before invoking the hooks as, while it's an expected value for a bridge, routing expects PACKET_HOST. The change is undone later on after hook traversal. This can be seen with pairs of functions updating skb>pkt_type and then reverting it to its original value: For hook NF_INET_PRE_ROUTING: setup_pre_routing / br_nf_pre_routing_finish For hook NF_INET_FORWARD: br_nf_forward_ip / br_nf_forward_finish But the third case where netfilter does this, for hook NF_INET_POST_ROUTING, the packet type is changed in br_nf_post_routing but never reverted. A comment says: /* We assume any code from br_dev_queue_push_xmit onwards doesn't care * about the value of skb->pkt_type. */ But when having a tunnel (say vxlan) attached to a bridge we have the following call trace: br_nf_pre_routing br_nf_pre_routing_ipv6 br_nf_pre_routing_finish br_nf_forward_ip br_nf_forward_finish br_nf_post_routing <- pkt_type is updated to PACKET_HOST br_nf_dev_queue_xmit <- but not reverted to its original value vxlan_xmit vxlan_xmit_one skb_tunnel_check_pmtu <- a check on pkt_type is performed In this specific case, this creates issues such as when an ICMPv6 PTB should be sent back. When CONFIG_BRIDGE_NETFILTER is enabled, the PTB isn't sent (as skb_tunnel_check_pmtu checks if pkt_type is PACKET_HOST and returns early). If the comment is right and no one cares about the value of skb->pkt_type after br_dev_queue_push_xmit (which isn't true), resetting it to its original value should be safe. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Antoine Tenart Reviewed-by: Florian Westphal Link: https://lore.kernel.org/r/20201123174902.622102-1-atenart@kernel.org Signed-off-by: Jakub Kicinski commit 45e885c439e825c19f3a51e46ef8210984bc0a9c Merge: ca579827c9a7e d1889589a4f54 Author: Linus Torvalds Date: Sat Nov 28 10:42:30 2020 -0800 Merge tag 'kbuild-fixes-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Remove unused OBJSIZE variable. - Fix rootless deb-pkg build in a setgid directory. * tag 'kbuild-fixes-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: builddeb: Fix rootless build in setuid/setgid directory kbuild: remove unused OBJSIZE commit ca579827c9a7ec1b6fbfd2f8b157acaf138be838 Merge: 67f34fa8893e6 a9ffd0484eb44 Author: Linus Torvalds Date: Sat Nov 28 10:35:05 2020 -0800 Merge tag 'perf-tools-fixes-for-v5.10-2020-11-28' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tool fixes from Arnaldo Carvalho de Melo: - Fix die_entrypc() when DW_AT_ranges DWARF attribute not available - Cope with broken DWARF (missing DW_AT_declaration) generated by some recent gcc versions - Do not generate CGROUP metadata events when not asked to in 'perf record' - Use proper CPU for shadow stats in 'perf stat' - Update copy of libbpf's hashmap.c, silencing tools/perf build warning - Fix return value in 'perf diff' * tag 'perf-tools-fixes-for-v5.10-2020-11-28' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf probe: Change function definition check due to broken DWARF perf probe: Fix to die_entrypc() returns error correctly perf stat: Use proper cpu for shadow stats perf record: Synthesize cgroup events only if needed perf diff: Fix error return value in __cmd_diff() perf tools: Update copy of libbpf's hashmap.c commit 67f34fa8893e6dfb0e8104c28ee6c5ce23a9e238 Merge: 7b2c800d6695d 484cfbe5fb614 Author: Linus Torvalds Date: Sat Nov 28 10:09:38 2020 -0800 Merge tag 'usb-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / PHY driver fixes from Greg KH: "Here are a few small USB and PHY driver fixes for 5.10-rc6. They include: - small PHY driver fixes to resolve reported issues - USB quirks added for "broken" devices - typec fixes for reported problems - USB gadget fixes for small issues Full details are in the shortlog, nothing major in here and all have been in linux-next with no reported issues" * tag 'usb-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: typec: stusb160x: fix power-opmode property with typec-power-opmode USB: core: Change %pK for __user pointers to %px USB: core: Fix regression in Hercules audio card usb: gadget: Fix memleak in gadgetfs_fill_super usb: gadget: f_midi: Fix memleak in f_midi_alloc USB: quirks: Add USB_QUIRK_DISCONNECT_SUSPEND quirk for Lenovo A630Z TIO built-in usb-audio card usb: typec: qcom-pmic-typec: fix builtin build errors phy: mediatek: fix spelling mistake in Kconfig "veriosn" -> "version" phy: qualcomm: Fix 28 nm Hi-Speed USB PHY OF dependency phy: qualcomm: usb: Fix SuperSpeed PHY OF dependency phy: intel: PHY_INTEL_KEEMBAY_EMMC should depend on ARCH_KEEMBAY usb: cdns3: gadget: calculate TD_SIZE based on TD usb: cdns3: gadget: initialize link_trb as NULL phy: cpcap-usb: Use IRQF_ONESHOT phy: qcom-qmp: Initialize another pointer to NULL phy: tegra: xusb: Fix dangling pointer on probe failure phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211 commit 7b2c800d6695d91df9208ba416fff59c8b0fc608 Merge: c84e1efae0220 c7acb6b9c07b4 Author: Linus Torvalds Date: Sat Nov 28 10:04:36 2020 -0800 Merge tag 'char-misc-5.10-rc6' 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 misc driver fixes for 5.10-rc6. They include: - interconnect fixes for reported problems - habanalabs bugfix for found issue when doing the switch fallthrough patches - MAINTAINERS file update for coresight reviewers/maintainers All have been in linux-next with no reported issues" * tag 'char-misc-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: MAINTAINERS: Adding help for coresight subsystem habanalabs/gaudi: fix missing code in ECC handling interconnect: fix memory trashing in of_count_icc_providers() interconnect: qcom: qcs404: Remove GPU and display RPM IDs interconnect: qcom: msm8916: Remove rpm-ids from non-RPM nodes interconnect: qcom: msm8974: Don't boost the NoC rate during boot interconnect: qcom: msm8974: Prevent integer overflow in rate commit aeedad2504997be262c98f6e3228173225a8d868 Author: Takashi Iwai Date: Sat Nov 28 10:00:15 2020 +0100 ALSA: hda/realtek: Add mute LED quirk to yet another HP x360 model HP Spectre x360 Convertible 15" version (SSID 103c:827f) needs the same quirk to make the mute LED working like other models. System Information Manufacturer: HP Product Name: HP Spectre x360 Convertible 15-bl1XX Sound Codec: Codec: Realtek ALC295 Vendor Id: 0x10ec0295 Subsystem Id: 0x103c827f Revision Id: 0x100002 Reported-by: Cc: Link: https://lore.kernel.org/r/20201128090015.7743-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit c84bfedce60192c08455ee2d25dd13d19274a266 Author: Takashi Iwai Date: Fri Nov 27 15:11:04 2020 +0100 ALSA: hda/realtek: Fix bass speaker DAC assignment on Asus Zephyrus G14 ASUS Zephyrus G14 has two speaker pins, and the auto-parser tries to assign an individual DAC to each pin as much as possible. Unfortunately the third DAC has no volume control unlike the two DACs, and this resulted in the inconsistent speaker volumes. As a workaround, wire both speaker pins to the same DAC by modifying the existing quirk (ALC289_FIXUP_ASUS_GA401) applied to this device. Since this quirk entry is chained by another, we need to avoid applying the DAC assignment change for it. Luckily, there is another quirk entry (ALC289_FIXUP_ASUS_GA502) doing the very same thing, so we can chain to the GA502 quirk instead. Note that this patch uses a new flag of the generic parser, obey_preferred_dacs, for enforcing the DACs. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210359 Cc: Link: https://lore.kernel.org/r/20201127141104.11041-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 242d990c158d5b1dabd166516e21992baef5f26a Author: Takashi Iwai Date: Fri Nov 27 15:11:03 2020 +0100 ALSA: hda/generic: Add option to enforce preferred_dacs pairs The generic parser accepts the preferred_dacs[] pairs as a hint for assigning a DAC to each pin, but this hint doesn't work always effectively. Currently it's merely a secondary choice after the trial with the path index failed. This made sometimes it difficult to assign DACs without mimicking the connection list and/or the badness table. This patch adds a new flag, obey_preferred_dacs, that changes the behavior of the parser. As its name stands, the parser obeys the given preferred_dacs[] pairs by skipping the path index matching and giving a high penalty if no DAC is assigned by the pairs. This mode will help for assigning the fixed DACs forcibly from the codec driver. Cc: Link: https://lore.kernel.org/r/20201127141104.11041-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit c84e1efae022071a4fcf9f1899bf71777c49943a Merge: 303bc934722b5 cef397038167a Author: Linus Torvalds Date: Fri Nov 27 15:00:35 2020 -0800 Merge tag 'asm-generic-fixes-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic fix from Arnd Bergmann: "Add correct MAX_POSSIBLE_PHYSMEM_BITS setting to asm-generic. This is a single bugfix for a bug that Stefan Agner found on 32-bit Arm, but that exists on several other architectures" * tag 'asm-generic-fixes-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed commit 303bc934722b53163bfb1c25da7db5d35c0e51b6 Merge: 79c0c1f0389db ae597565d13fe Author: Linus Torvalds Date: Fri Nov 27 14:48:03 2020 -0800 Merge tag 'arm-soc-fixes-v5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "Another set of patches for devicetree files and Arm SoC specific drivers: - A fix for OP-TEE shared memory on non-SMP systems - multiple code fixes for the OMAP platform, including one regression for the CPSW network driver and a few runtime warning fixes - Some DT patches for the Rockchip RK3399 platform, in particular fixing the MMC device ordering that recently became nondeterministic with async probe. - Multiple DT fixes for the Tegra platform, including a regression fix for suspend/resume on TX2 - A regression fix for a user-triggered fault in the NXP dpio driver - A regression fix for a bug caused by an earlier bug fix in the xilinx firmware driver - Two more DTC warning fixes - Sylvain Lemieux steps down as maintainer for the NXP LPC32xx platform" * tag 'arm-soc-fixes-v5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (24 commits) arm64: tegra: Fix Tegra234 VDK node names arm64: tegra: Wrong AON HSP reg property size arm64: tegra: Fix USB_VBUS_EN0 regulator on Jetson TX1 arm64: tegra: Correct the UART for Jetson Xavier NX arm64: tegra: Disable the ACONNECT for Jetson TX2 optee: add writeback to valid memory type firmware: xilinx: Use hash-table for api feature check firmware: xilinx: Fix SD DLL node reset issue soc: fsl: dpio: Get the cpumask through cpumask_of(cpu) ARM: dts: dra76x: m_can: fix order of clocks bus: ti-sysc: suppress err msg for timers used as clockevent/source MAINTAINERS: Remove myself as LPC32xx maintainers arm64: dts: qcom: clear the warnings caused by empty dma-ranges arm64: dts: broadcom: clear the warnings caused by empty dma-ranges ARM: dts: am437x-l4: fix compatible for cpsw switch dt node arm64: dts: rockchip: Reorder LED triggers from mmc devices on rk3399-roc-pc. arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards. arm64: dts: rockchip: Remove system-power-controller from pmic on Odroid Go Advance arm64: dts: rockchip: fix NanoPi R2S GMAC clock name ARM: OMAP2+: Manage MPU state properly for omap_enter_idle_coupled() ... commit 79c0c1f0389db60f3c83ec91585a39d16e036f21 Merge: 80e1e1761d1a9 d0742c49cab58 Author: Linus Torvalds Date: Fri Nov 27 14:38:02 2020 -0800 Merge tag 'net-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes for 5.10-rc6, including fixes from the WiFi driver, and CAN subtrees. Current release - regressions: - gro_cells: reduce number of synchronize_net() calls - ch_ktls: release a lock before jumping to an error path Current release - always broken: - tcp: Allow full IP tos/IPv6 tclass to be reflected in L3 header Previous release - regressions: - net/tls: fix missing received data after fast remote close - vsock/virtio: discard packets only when socket is really closed - sock: set sk_err to ee_errno on dequeue from errq - cxgb4: fix the panic caused by non smac rewrite Previous release - always broken: - tcp: fix corner cases around setting ECN with BPF selection of congestion control - tcp: fix race condition when creating child sockets from syncookies on loopback interface - usbnet: ipheth: fix connectivity with iOS 14 - tun: honor IOCB_NOWAIT flag - net/packet: fix packet receive on L3 devices without visible hard header - devlink: Make sure devlink instance and port are in same net namespace - net: openvswitch: fix TTL decrement action netlink message format - bonding: wait for sysfs kobject destruction before freeing struct slave - net: stmmac: fix upstream patch applied to the wrong context - bnxt_en: fix return value and unwind in probe error paths Misc: - devlink: add extra layer of categorization to the reload stats uAPI before it's released" * tag 'net-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (68 commits) sock: set sk_err to ee_errno on dequeue from errq mptcp: fix NULL ptr dereference on bad MPJ net: openvswitch: fix TTL decrement action netlink message format can: af_can: can_rx_unregister(): remove WARN() statement from list operation sanity check can: m_can: m_can_dev_setup(): add support for bosch mcan version 3.3.0 can: m_can: fix nominal bitiming tseg2 min for version >= 3.1 can: m_can: m_can_open(): remove IRQF_TRIGGER_FALLING from request_threaded_irq()'s flags can: mcp251xfd: mcp251xfd_probe(): bail out if no IRQ was given can: gs_usb: fix endianess problem with candleLight firmware ch_ktls: lock is not freed net/tls: Protect from calling tls_dev_del for TLS RX twice devlink: Make sure devlink instance and port are in same net namespace devlink: Hold rtnl lock while reading netdev attributes ptp: clockmatrix: bug fix for idtcm_strverscmp enetc: Let the hardware auto-advance the taprio base-time of 0 gro_cells: reduce number of synchronize_net() calls net: stmmac: fix incorrect merge of patch upstream ipv6: addrlabel: fix possible memory leak in ip6addrlbl_net_init Documentation: netdev-FAQ: suggest how to post co-dependent series ibmvnic: enhance resetting status check during module exit ... commit 80e1e1761d1a9eefda4d1545f8b6c0a2e46d4e3f Merge: 9223e74f99607 e92643db51480 Author: Linus Torvalds Date: Fri Nov 27 14:06:23 2020 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three small fixes in the UFS driver: two are for power management issues and the third is to fix a slew of problem in the sysfs code" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: Fix race between shutdown and runtime resume flow scsi: ufs: Make sure clk scaling happens only when HBA is runtime ACTIVE scsi: ufs: Fix unexpected values from ufshcd_read_desc_param() commit 9223e74f9960778bd3edd39e15edd5532708b7fb Merge: d021c3e56d48b af60470347de6 Author: Linus Torvalds Date: Fri Nov 27 12:56:04 2020 -0800 Merge tag 'io_uring-5.10-2020-11-27' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - Out of bounds fix for the cq size cap from earlier this release (Joseph) - iov_iter type check fix (Pavel) - Files grab + cancelation fix (Pavel) * tag 'io_uring-5.10-2020-11-27' of git://git.kernel.dk/linux-block: io_uring: fix files grab/cancel race io_uring: fix ITER_BVEC check io_uring: fix shift-out-of-bounds when round up cq size commit d021c3e56d48b0a435eab3b3ec99d4e8bf8df2d1 Merge: a17a3ca55e96d 47a846536e1bf Author: Linus Torvalds Date: Fri Nov 27 12:49:01 2020 -0800 Merge tag 'block-5.10-2020-11-27' of git://git.kernel.dk/linux-block Pull block fix from Jens Axboe: "Just a single fix, for a crash in the keyslot manager" * tag 'block-5.10-2020-11-27' of git://git.kernel.dk/linux-block: block/keyslot-manager: prevent crash when num_slots=1 commit a17a3ca55e96d20e25e8b1a7cd08192ce2bac3cc Merge: d41e9b22eb871 a855fbe692290 Author: Linus Torvalds Date: Fri Nov 27 12:42:13 2020 -0800 Merge tag 'for-5.10-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few fixes for various warnings that accumulated over past two weeks: - tree-checker: add missing return values for some errors - lockdep fixes - when reading qgroup config and starting quota rescan - reverse order of quota ioctl lock and VFS freeze lock - avoid accessing potentially stale fs info during device scan, reported by syzbot - add scope NOFS protection around qgroup relation changes - check for running transaction before flushing qgroups - fix tracking of new delalloc ranges for some cases" * tag 'for-5.10-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix lockdep splat when enabling and disabling qgroups btrfs: do nofs allocations when adding and removing qgroup relations btrfs: fix lockdep splat when reading qgroup config on mount btrfs: tree-checker: add missing returns after data_ref alignment checks btrfs: don't access possibly stale fs_info data for printing duplicate device btrfs: tree-checker: add missing return after error in root_item btrfs: qgroup: don't commit transaction when we already hold the handle btrfs: fix missing delalloc new bit for new delalloc ranges commit d41e9b22eb871a7a7060964db9ce1ceb1c6e5b57 Merge: 76dc2bfc2e1b4 17475e104dcb7 Author: Linus Torvalds Date: Fri Nov 27 12:31:04 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Two security issues and several small bug fixes. Things seem to have stabilized for this release here. Summary: - Significant out of bounds access security issue in i40iw - Fix misuse of mmu notifiers in hfi1 - Several errors in the register map/usage in hns - Missing error returns in mthca" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/hns: Bugfix for memory window mtpt configuration RDMA/hns: Fix retry_cnt and rnr_cnt when querying QP RDMA/hns: Fix wrong field of SRQ number the device supports IB/hfi1: Ensure correct mm is used at all times RDMA/i40iw: Address an mmap handler exploit in i40iw IB/mthca: fix return value of error branch in mthca_init_cq() commit 76dc2bfc2e1b40573cd33eb1c2027ef6cb7fed6c Merge: 87c301ca911a3 b36bf0a0fe5d1 Author: Linus Torvalds Date: Fri Nov 27 12:03:07 2020 -0800 Merge tag 'mtd/fixes-for-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd fixes from Miquel Raynal: "Because of a recent change in the core, NAND controller drivers initializing the ECC engine too early in the probe path are broken. Drivers should wait for the NAND device to be discovered and its memory layout known before doing any ECC related initialization, so instead of reverting the faulty change which is actually moving in the right direction, let's fix the drivers directly: socrates, sharpsl, r852, plat_nand, pasemi, tmio, txx9ndfmc, orion, mpc5121, lpc32xx_slc, lpc32xx_mlc, fsmc, diskonchip, davinci, cs553x, au1550, ams-delta, xway and gpio" * tag 'mtd/fixes-for-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: socrates: Move the ECC initialization to ->attach_chip() mtd: rawnand: sharpsl: Move the ECC initialization to ->attach_chip() mtd: rawnand: r852: Move the ECC initialization to ->attach_chip() mtd: rawnand: plat_nand: Move the ECC initialization to ->attach_chip() mtd: rawnand: pasemi: Move the ECC initialization to ->attach_chip() mtd: rawnand: tmio: Move the ECC initialization to ->attach_chip() mtd: rawnand: txx9ndfmc: Move the ECC initialization to ->attach_chip() mtd: rawnand: orion: Move the ECC initialization to ->attach_chip() mtd: rawnand: mpc5121: Move the ECC initialization to ->attach_chip() mtd: rawnand: lpc32xx_slc: Move the ECC initialization to ->attach_chip() mtd: rawnand: lpc32xx_mlc: Move the ECC initialization to ->attach_chip() mtd: rawnand: fsmc: Move the ECC initialization to ->attach_chip() mtd: rawnand: diskonchip: Move the ECC initialization to ->attach_chip() mtd: rawnand: davinci: Move the ECC initialization to ->attach_chip() mtd: rawnand: cs553x: Move the ECC initialization to ->attach_chip() mtd: rawnand: au1550: Move the ECC initialization to ->attach_chip() mtd: rawnand: ams-delta: Move the ECC initialization to ->attach_chip() mtd: rawnand: xway: Move the ECC initialization to ->attach_chip() mtd: rawnand: gpio: Move the ECC initialization to ->attach_chip() commit 87c301ca911a3bee68900ee475fe536eebd9bc41 Merge: f594139d68ccd 0abdb0fba0732 Author: Linus Torvalds Date: Fri Nov 27 11:29:53 2020 -0800 Merge tag 'spi-fix-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few fixes for v5.10, one for the core which fixes some potential races for controllers with multiple chip selects when configuration of the chip select for one client device races with the addition and initial setup of an additional client" * tag 'spi-fix-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: dw: Fix spi registration for controllers overriding CS spi: imx: fix the unbalanced spi runtime pm management spi: spi-nxp-fspi: fix fspi panic by unexpected interrupts spi: Take the SPI IO-mutex in the spi_setup() method commit f594139d68ccdd64fe9c546b17189b298fa7ecd3 Merge: 6910b67689893 44f28934af141 Author: Linus Torvalds Date: Fri Nov 27 11:25:23 2020 -0800 Merge tag 'media/v5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull virtual digital TV driver fixes from Mauro Carvalho Chehab: "A series of fixes for the new virtual digital TV driver (vidtv), which is meant to help doing tests with the digital TV core and media userspace apps and libraries. They cover a series of issues I found on it, together with a few new things in order to make it easier to detect problems at the DVB core" * tag 'media/v5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (36 commits) media: vidtv.rst: add kernel-doc markups media: vidtv.rst: update vidtv documentation media: vidtv: simplify EIT write function media: vidtv: simplify NIT write function media: vidtv: simplify SDT write function media: vidtv: cleanup PMT write table function media: vidtv: cleanup PAT write function media: vidtv: cleanup PSI table header function media: vidtv: cleanup PSI descriptor write function media: vidtv: simplify the crc writing logic media: vidtv: simplify PSI write function media: vidtv: add date to the current event media: vidtv: fix service_id at SDT table media: vidtv: fix service type media: vidtv: add a PID entry for the NIT table media: vidtv: properly fill EIT service_id media: vidtv: fix the network ID range media: vidtv: improve EIT data media: vidtv: cleanup null packet initialization logic media: vidtv: pre-initialize mux arrays ... commit 6910b676898934c2abe9f3ff3d60f4d4bc8afda8 Merge: 99c710c46dfc4 9595930db4bb9 Author: Linus Torvalds Date: Fri Nov 27 11:19:49 2020 -0800 Merge tag 'drm-fixes-2020-11-27-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Unfortunately this has a bit of thanksgiving stuffing in it, as it a bit larger (at least the vc4 patches) than I like at this point in time. The main thing is it has a bunch of regressions fixes for reports in the last couple of weeks, ast, nouveau and the amdgpu ttm init fix, along with the usual selection of amdgpu and i915 fixes. The vc4 fixes are a few but they are fixes and the nastiest one is a fix for when you have a 2.4Ghz Wifi and a HDMI signal with a clock in that range and there isn't enough shielding and interference happen between the two, the fix adjusts the mode clock to try and avoid the wifi channels in that case. Hopefully you can merge this between turkey slices, and next week should be quieter. ast: - LUT loading regression fix nouveau: - relocations regression fix amdgpu: - ttm init oops fix - Runtime pm fix - SI UVD suspend/resume fix - HDCP fix for headless cards - Sienna Cichlid golden register update i915: - Fix Perf/OA workaround register corruption (Lionel) - Correct a comment statement in GVT (Yan) - Fix GT enable/disable iterrupts, including a race condition that prevented GPU to go idle (Chris) - Free stale request on destroying the virtual engine (Chris) exynos: - config dependency fix mediatek: - unused var removal - horizonal front/back porch formula fix vc4: - wifi and hdmi interference fix - mode rejection fixes - use after free fix - cleanup some code" * tag 'drm-fixes-2020-11-27-1' of git://anongit.freedesktop.org/drm/drm: (28 commits) drm/nouveau: fix relocations applying logic and a double-free drm/ast: Reload gamma LUT after changing primary plane's color format drm/amdgpu: Fix size calculation when init onchip memory drm/amdgpu: update golden setting for sienna_cichlid drm/amd/display: Avoid HDCP initialization in devices without output drm/i915/gt: Free stale request on destroying the virtual engine drm/i915/gt: Don't cancel the interrupt shadow too early drm/i915/gt: Track signaled breadcrumbs outside of the breadcrumb spinlock drm/amdgpu: fix a page fault drm/amdgpu: fix SI UVD firmware validate resume fail drm/amd/amdgpu: fix null pointer in runtime pm drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission drm/i915/gvt: correct a false comment of flag F_UNALIGN drm/i915/perf: workaround register corruption in OATAILPTR drm/vc4: kms: Don't disable the muxing of an active CRTC drm/vc4: kms: Store the unassigned channel list in the state drm/exynos: depend on COMMON_CLK to fix compile tests drm/mediatek: dsi: Modify horizontal front/back porch byte formula drm/vc4: hdmi: Disable Wifi Frequencies dt-bindings: display: Add a property to deal with WiFi coexistence ... commit d0742c49cab58ee6e2de40f1958b736aedf779b6 Merge: 985f7337421a8 d73ff9b7c4eac Author: Jakub Kicinski Date: Fri Nov 27 11:13:39 2020 -0800 Merge tag 'linux-can-fixes-for-5.10-20201127' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2020-11-27 The first patch is by me and target the gs_usb driver and fixes the endianess problem with candleLight firmware. Another patch by me for the mcp251xfd driver add sanity checking to bail out if no IRQ is configured. The next three patches target the m_can driver. A patch by me removes the hardcoded IRQF_TRIGGER_FALLING from the request_threaded_irq() as this clashes with the trigger level specified in the DT. Further a patch by me fixes the nominal bitiming tseg2 min value for modern m_can cores. Pankaj Sharma's patch add support for cores version 3.3.x. The last patch by Oliver Hartkopp is for af_can and converts a WARN() into a pr_warn(), which is triggered by the syzkaller. It was able to create a situation where the closing of a socket runs simultaneously to the notifier call chain for removing the CAN network device in use. * tag 'linux-can-fixes-for-5.10-20201127' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: af_can: can_rx_unregister(): remove WARN() statement from list operation sanity check can: m_can: m_can_dev_setup(): add support for bosch mcan version 3.3.0 can: m_can: fix nominal bitiming tseg2 min for version >= 3.1 can: m_can: m_can_open(): remove IRQF_TRIGGER_FALLING from request_threaded_irq()'s flags can: mcp251xfd: mcp251xfd_probe(): bail out if no IRQ was given can: gs_usb: fix endianess problem with candleLight firmware ==================== Link: https://lore.kernel.org/r/20201127100301.512603-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 99c710c46dfc413b9c8a1a40b463ae1eaca539e5 Merge: 3913a2bc81498 c9aa128080cbc Author: Linus Torvalds Date: Fri Nov 27 11:09:13 2020 -0800 Merge tag 'platform-drivers-x86-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: - thinkpad_acpi fixes: two bug-fixes and three model specific quirks - fixes for misc other drivers: two bug-fixes and three model specific quirks * tag 'platform-drivers-x86-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: touchscreen_dmi: Add info for the Irbis TW118 tablet platform/x86: touchscreen_dmi: Add info for the Predia Basic tablet platform/x86: intel-vbtn: Support for tablet mode on HP Pavilion 13 x360 PC platform/x86: toshiba_acpi: Fix the wrong variable assignment platform/x86: acer-wmi: add automatic keyboard background light toggle key as KEY_LIGHTS_TOGGLE platform/x86: thinkpad_acpi: Whitelist P15 firmware for dual fan control platform/x86: thinkpad_acpi: Send tablet mode switch at wakeup time platform/x86: thinkpad_acpi: Add BAT1 is primary battery quirk for Thinkpad Yoga 11e 4th gen platform/x86: thinkpad_acpi: Do not report SW_TABLET_MODE on Yoga 11e platform/x86: thinkpad_acpi: add P1 gen3 second fan support commit 985f7337421a811cb354ca93882f943c8335a6f5 Author: Willem de Bruijn Date: Thu Nov 26 10:12:20 2020 -0500 sock: set sk_err to ee_errno on dequeue from errq When setting sk_err, set it to ee_errno, not ee_origin. Commit f5f99309fa74 ("sock: do not set sk_err in sock_dequeue_err_skb") disabled updating sk_err on errq dequeue, which is correct for most error types (origins): - sk->sk_err = err; Commit 38b257938ac6 ("sock: reset sk_err when the error queue is empty") reenabled the behavior for IMCP origins, which do require it: + if (icmp_next) + sk->sk_err = SKB_EXT_ERR(skb_next)->ee.ee_origin; But read from ee_errno. Fixes: 38b257938ac6 ("sock: reset sk_err when the error queue is empty") Reported-by: Ayush Ranjan Signed-off-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Link: https://lore.kernel.org/r/20201126151220.2819322-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski commit d3ab78858f1451351221061a1c365495df196500 Author: Paolo Abeni Date: Thu Nov 26 15:17:53 2020 +0100 mptcp: fix NULL ptr dereference on bad MPJ If an msk listener receives an MPJ carrying an invalid token, it will zero the request socket msk entry. That should later cause fallback and subflow reset - as per RFC - at subflow_syn_recv_sock() time due to failing hmac validation. Since commit 4cf8b7e48a09 ("subflow: introduce and use mptcp_can_accept_new_subflow()"), we unconditionally dereference - in mptcp_can_accept_new_subflow - the subflow request msk before performing hmac validation. In the above scenario we hit a NULL ptr dereference. Address the issue doing the hmac validation earlier. Fixes: 4cf8b7e48a09 ("subflow: introduce and use mptcp_can_accept_new_subflow()") Tested-by: Davide Caratti Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Link: https://lore.kernel.org/r/03b2cfa3ac80d8fc18272edc6442a9ddf0b1e34e.1606400227.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 3913a2bc814987c1840a5f78dcff865dbfec1e64 Merge: 95e1c7b1dd4a9 9a2a0d3ca163f Author: Linus Torvalds Date: Fri Nov 27 11:04:13 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - Fix alignment of the new HYP sections - Fix GICR_TYPER access from userspace S390: - do not reset the global diag318 data for per-cpu reset - do not mark memory as protected too early - fix for destroy page ultravisor call x86: - fix for SEV debugging - fix incorrect return code - fix for 'noapic' with PIC in userspace and LAPIC in kernel - fix for 5-level paging" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: x86/mmu: Fix get_mmio_spte() on CPUs supporting 5-level PT KVM: x86: Fix split-irqchip vs interrupt injection window request KVM: x86: handle !lapic_in_kernel case in kvm_cpu_*_extint MAINTAINERS: Update email address for Sean Christopherson MAINTAINERS: add uv.c also to KVM/s390 s390/uv: handle destroy page legacy interface KVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace KVM: SVM: fix error return code in svm_create_vcpu() KVM: SVM: Fix offset computation bug in __sev_dbg_decrypt(). KVM: arm64: Correctly align nVHE percpu data KVM: s390: remove diag318 reset code KVM: s390: pv: Mark mm as protected after the set secure parameters and improve cleanup commit 69929d4c49e182f8526d42c43b37b460d562d3a0 Author: Eelco Chaudron Date: Tue Nov 24 07:34:44 2020 -0500 net: openvswitch: fix TTL decrement action netlink message format Currently, the openvswitch module is not accepting the correctly formated netlink message for the TTL decrement action. For both setting and getting the dec_ttl action, the actions should be nested in the OVS_DEC_TTL_ATTR_ACTION attribute as mentioned in the openvswitch.h uapi. When the original patch was sent, it was tested with a private OVS userspace implementation. This implementation was unfortunately not upstreamed and reviewed, hence an erroneous version of this patch was sent out. Leaving the patch as-is would cause problems as the kernel module could interpret additional attributes as actions and vice-versa, due to the actions not being encapsulated/nested within the actual attribute, but being concatinated after it. Fixes: 744676e77720 ("openvswitch: add TTL decrement action") Signed-off-by: Eelco Chaudron Link: https://lore.kernel.org/r/160622121495.27296.888010441924340582.stgit@wsfd-netdev64.ntdv.lab.eng.bos.redhat.com Signed-off-by: Jakub Kicinski commit 95e1c7b1dd4a91451040ff0f41c5b5173503a38e Merge: e4e9458073ae7 b6b79dd53082d Author: Linus Torvalds Date: Fri Nov 27 10:59:02 2020 -0800 Merge tag 'powerpc-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Some more powerpc fixes for 5.10: - regression fix for a boot failure on some 32-bit machines. - fix for host crashes in the KVM system reset handling. - fix for a possible oops in the KVM XIVE interrupt handling on Power9. - fix for host crashes triggerable via the KVM emulated MMIO handling when running HPT guests. - a couple of small build fixes. Thanks to Andreas Schwab, Cédric Le Goater, Christophe Leroy, Erhard Furtner, Greg Kurz, Greg Kurz, Németh Márton, Nicholas Piggin, Nick Desaulniers, Serge Belyshev, and Stephen Rothwell" * tag 'powerpc-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: Fix allnoconfig build since uaccess flush powerpc/64s/exception: KVM Fix for host DSI being taken in HPT guest MMU context powerpc: Drop -me200 addition to build flags KVM: PPC: Book3S HV: XIVE: Fix possible oops when accessing ESB page powerpc/64s: Fix KVM system reset handling when CONFIG_PPC_PSERIES=y powerpc/32s: Use relocation offset when setting early hash table commit e4e9458073ae7ab0e7c28e7380a26ad1fccf0296 Merge: 6adf33a5e42fe ff1712f953e27 Author: Linus Torvalds Date: Fri Nov 27 10:44:59 2020 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "The main changes are relating to our handling of access/dirty bits, where our low-level page-table helpers could lead to stale young mappings and loss of the dirty bit in some cases (the latter has not been observed in practice, but could happen when clearing "soft-dirty" if we enabled that). These were posted as part of a larger series, but the rest of that is less urgent and needs a v2 which I'll get to shortly. In other news, we've now got a set of fixes to resolve the lockdep/tracing problems that have been plaguing us for a while, but they're still a bit "fresh" and I plan to send them to you next week after we've got some more confidence in them (although initial CI results look good). Summary: - Fix kerneldoc warnings generated by ACPI IORT code - Fix pte_accessible() so that access flag is ignored - Fix missing header #include - Fix loss of software dirty bit across pte_wrprotect() when HW DBM is enabled" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect() arm64: pgtable: Fix pte_accessible() ACPI/IORT: Fix doc warnings in iort.c arm64/fpsimd: add to to fix fpsimd build commit 6adf33a5e42feada39d52eebd389d2019202e993 Merge: 43d6ecd97c0c6 d76b42e92780c Author: Linus Torvalds Date: Fri Nov 27 10:41:19 2020 -0800 Merge tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull iommu fixes from Will Deacon: "Here's another round of IOMMU fixes for -rc6 consisting mainly of a bunch of independent driver fixes. Thomas agreed for me to take the x86 'tboot' fix here, as it fixes a regression introduced by a vt-d change. - Fix intel iommu driver when running on devices without VCCAP_REG - Fix swiotlb and "iommu=pt" interaction under TXT (tboot) - Fix missing return value check during device probe() - Fix probe ordering for Qualcomm SMMU implementation - Ensure page-sized mappings are used for AMD IOMMU buffers with SNP RMP" * tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: iommu/vt-d: Don't read VCCAP register unless it exists x86/tboot: Don't disable swiotlb when iommu is forced on iommu: Check return of __iommu_attach_device() arm-smmu-qcom: Ensure the qcom_scm driver has finished probing iommu/amd: Enforce 4k mapping for certain IOMMU data structures commit 43d6ecd97c0c69acffc918cc18cdabdfcaa55354 Merge: 5b4049d8fc835 739e7116b10bf Author: Linus Torvalds Date: Fri Nov 27 10:38:36 2020 -0800 Merge tag 'printk-for-5.10-rc6-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk fixes from Petr Mladek: - do not lose trailing newline in pr_cont() calls - two trivial fixes for a dead store and a config description * tag 'printk-for-5.10-rc6-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: finalize records with trailing newlines printk: remove unneeded dead-store assignment init/Kconfig: Fix CPU number in LOG_CPU_MAX_BUF_SHIFT description commit 5b4049d8fc8353c20493f3767a1270a61bcc3822 Merge: 85a2c56cb4454 fdeb17c70c9ec Author: Linus Torvalds Date: Fri Nov 27 10:36:38 2020 -0800 Merge tag 'writeback_for_v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull writeback fix from Jan Kara: "A fix of possible missing string termination in writeback tracepoints" * tag 'writeback_for_v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: trace: fix potenial dangerous pointer commit a9ffd0484eb4426e6befd07e7be6c01108716302 Author: Masami Hiramatsu Date: Fri Nov 27 14:48:55 2020 +0900 perf probe: Change function definition check due to broken DWARF Since some gcc generates a broken DWARF which lacks DW_AT_declaration attribute from the subprogram DIE of function prototype. (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97060) So, in addition to the DW_AT_declaration check, we also check the subprogram DIE has DW_AT_inline or actual entry pc. Committer testing: # cat /etc/fedora-release Fedora release 33 (Thirty Three) # Before: # perf test vfs_getname 78: Use vfs_getname probe to get syscall args filenames : FAILED! 79: Check open filename arg using perf trace + vfs_getname : FAILED! 81: Add vfs_getname probe to get syscall args filenames : FAILED! # After: # perf test vfs_getname 78: Use vfs_getname probe to get syscall args filenames : Ok 79: Check open filename arg using perf trace + vfs_getname : Ok 81: Add vfs_getname probe to get syscall args filenames : Ok # Reported-by: Thomas Richter Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Sumanth Korikkar Link: http://lore.kernel.org/lkml/160645613571.2824037.7441351537890235895.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit ab4200c17ba6fe71d2da64317aae8a8aa684624c Author: Masami Hiramatsu Date: Fri Nov 27 14:48:46 2020 +0900 perf probe: Fix to die_entrypc() returns error correctly Fix die_entrypc() to return error correctly if the DIE has no DW_AT_ranges attribute. Since dwarf_ranges() will treat the case as an empty ranges and return 0, we have to check it by ourselves. Fixes: 91e2f539eeda ("perf probe: Fix to show function entry line as probe-able") Signed-off-by: Masami Hiramatsu Cc: Sumanth Korikkar Cc: Thomas Richter Link: http://lore.kernel.org/lkml/160645612634.2824037.5284932731175079426.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit c0ee1d5ae8c8650031badcfca6483a28c0f94f38 Author: Namhyung Kim Date: Fri Nov 27 13:14:03 2020 +0900 perf stat: Use proper cpu for shadow stats Currently perf stat shows some metrics (like IPC) for defined events. But when no aggregation mode is used (-A option), it shows incorrect values since it used a value from a different cpu. Before: $ perf stat -aA -e cycles,instructions sleep 1 Performance counter stats for 'system wide': CPU0 116,057,380 cycles CPU1 86,084,722 cycles CPU2 99,423,125 cycles CPU3 98,272,994 cycles CPU0 53,369,217 instructions # 0.46 insn per cycle CPU1 33,378,058 instructions # 0.29 insn per cycle CPU2 58,150,086 instructions # 0.50 insn per cycle CPU3 40,029,703 instructions # 0.34 insn per cycle 1.001816971 seconds time elapsed So the IPC for CPU1 should be 0.38 (= 33,378,058 / 86,084,722) but it was 0.29 (= 33,378,058 / 116,057,380) and so on. After: $ perf stat -aA -e cycles,instructions sleep 1 Performance counter stats for 'system wide': CPU0 109,621,384 cycles CPU1 159,026,454 cycles CPU2 99,460,366 cycles CPU3 124,144,142 cycles CPU0 44,396,706 instructions # 0.41 insn per cycle CPU1 120,195,425 instructions # 0.76 insn per cycle CPU2 44,763,978 instructions # 0.45 insn per cycle CPU3 69,049,079 instructions # 0.56 insn per cycle 1.001910444 seconds time elapsed Fixes: 44d49a600259 ("perf stat: Support metrics in --per-core/socket mode") Reported-by: Sam Xi Signed-off-by: Namhyung Kim Reviewed-by: Andi Kleen Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201127041404.390276-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit aa50d953c169e876413bf237319e728dd41d9fdd Author: Namhyung Kim Date: Fri Nov 27 14:43:56 2020 +0900 perf record: Synthesize cgroup events only if needed It didn't check the tool->cgroup_events bit which is set when the --all-cgroups option is given. Without it, samples will not have cgroup info so no reason to synthesize. We can check the PERF_RECORD_CGROUP records after running perf record *WITHOUT* the --all-cgroups option: Before: $ perf report -D | grep CGROUP 0 0 0x8430 [0x38]: PERF_RECORD_CGROUP cgroup: 1 / CGROUP events: 1 CGROUP events: 0 CGROUP events: 0 After: $ perf report -D | grep CGROUP CGROUP events: 0 CGROUP events: 0 CGROUP events: 0 Committer testing: Before: # perf record -a sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 2.208 MB perf.data (10003 samples) ] # perf report -D | grep "CGROUP events" CGROUP events: 146 CGROUP events: 0 CGROUP events: 0 # After: # perf record -a sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 2.208 MB perf.data (10448 samples) ] # perf report -D | grep "CGROUP events" CGROUP events: 0 CGROUP events: 0 CGROUP events: 0 # With all-cgroups: # perf record --all-cgroups -a sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 2.374 MB perf.data (11526 samples) ] # perf report -D | grep "CGROUP events" CGROUP events: 146 CGROUP events: 0 CGROUP events: 0 # Fixes: 8fb4b67939e16 ("perf record: Add --all-cgroups option") Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201127054356.405481-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9713070028b9ab317f395ee130fa2c4ea741bab4 Author: Zhen Lei Date: Tue Nov 24 18:36:52 2020 +0800 perf diff: Fix error return value in __cmd_diff() An appropriate return value should be set on the failed path. Fixes: 2a09a84c720b436a ("perf diff: Support hot streams comparison") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jin Yao Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20201124103652.438-1-thunder.leizhen@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 3b13eaf0ba1d5ab59368e23ff5e5350f51c1a352 Author: Arnaldo Carvalho de Melo Date: Wed Nov 18 08:32:33 2020 -0300 perf tools: Update copy of libbpf's hashmap.c To pick the changes in: 7a078d2d18801bba ("libbpf, hashmap: Fix undefined behavior in hash_bits") That don't entail any changes in tools/perf. This addresses this perf build warning: Warning: Kernel ABI header at 'tools/perf/util/hashmap.h' differs from latest version at 'tools/lib/bpf/hashmap.h' diff -u tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h Not a kernel ABI, its just that this uses the mechanism in place for checking kernel ABI files drift. Cc: Adrian Hunter Cc: Daniel Borkmann Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit ae597565d13febc73b9066c05935c1003a57a03e Merge: 454a079b381a1 853735e404244 Author: Arnd Bergmann Date: Fri Nov 27 17:45:45 2020 +0100 Merge tag 'optee-valid-memory-type-for-v5.11' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes Add writeback to valid OP-TEE shared memory types Allows OP-TEE to work with ARMv7 based single CPU systems by allowing writeback cache policy for shared memory. * tag 'optee-valid-memory-type-for-v5.11' of git://git.linaro.org/people/jens.wiklander/linux-tee: optee: add writeback to valid memory type Link: https://lore.kernel.org/r/20201125120134.GA1642471@jade Signed-off-by: Arnd Bergmann commit 25bc65d8ddfc17cc1d7a45bd48e9bdc0e729ced3 Author: Gabriele Paoloni Date: Fri Nov 27 16:18:15 2020 +0000 x86/mce: Do not overwrite no_way_out if mce_end() fails Currently, if mce_end() fails, no_way_out - the variable denoting whether the machine can recover from this MCE - is determined by whether the worst severity that was found across the MCA banks associated with the current CPU, is of panic severity. However, at this point no_way_out could have been already set by mca_start() after looking at all severities of all CPUs that entered the MCE handler. If mce_end() fails, check first if no_way_out is already set and, if so, stick to it, otherwise use the local worst value. [ bp: Massage. ] Signed-off-by: Gabriele Paoloni Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Cc: Link: https://lkml.kernel.org/r/20201127161819.3106432-2-gabriele.paoloni@intel.com commit 9a2a0d3ca163fc645991804b8b032f7d59326bb5 Author: Vitaly Kuznetsov Date: Thu Nov 26 12:02:06 2020 +0100 kvm: x86/mmu: Fix get_mmio_spte() on CPUs supporting 5-level PT Commit 95fb5b0258b7 ("kvm: x86/mmu: Support MMIO in the TDP MMU") caused the following WARNING on an Intel Ice Lake CPU: get_mmio_spte: detect reserved bits on spte, addr 0xb80a0, dump hierarchy: ------ spte 0xb80a0 level 5. ------ spte 0xfcd210107 level 4. ------ spte 0x1004c40107 level 3. ------ spte 0x1004c41107 level 2. ------ spte 0x1db00000000b83b6 level 1. WARNING: CPU: 109 PID: 10254 at arch/x86/kvm/mmu/mmu.c:3569 kvm_mmu_page_fault.cold.150+0x54/0x22f [kvm] ... Call Trace: ? kvm_io_bus_get_first_dev+0x55/0x110 [kvm] vcpu_enter_guest+0xaa1/0x16a0 [kvm] ? vmx_get_cs_db_l_bits+0x17/0x30 [kvm_intel] ? skip_emulated_instruction+0xaa/0x150 [kvm_intel] kvm_arch_vcpu_ioctl_run+0xca/0x520 [kvm] The guest triggering this crashes. Note, this happens with the traditional MMU and EPT enabled, not with the newly introduced TDP MMU. Turns out, there was a subtle change in the above mentioned commit. Previously, walk_shadow_page_get_mmio_spte() was setting 'root' to 'iterator.level' which is returned by shadow_walk_init() and this equals to 'vcpu->arch.mmu->shadow_root_level'. Now, get_mmio_spte() sets it to 'int root = vcpu->arch.mmu->root_level'. The difference between 'root_level' and 'shadow_root_level' on CPUs supporting 5-level page tables is that in some case we don't want to use 5-level, in particular when 'cpuid_maxphyaddr(vcpu) <= 48' kvm_mmu_get_tdp_level() returns '4'. In case upper layer is not used, the corresponding SPTE will fail '__is_rsvd_bits_set()' check. Revert to using 'shadow_root_level'. Fixes: 95fb5b0258b7 ("kvm: x86/mmu: Support MMIO in the TDP MMU") Signed-off-by: Vitaly Kuznetsov Message-Id: <20201126110206.2118959-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 71cc849b7093bb83af966c0e60cb11b7f35cd746 Author: Paolo Bonzini Date: Fri Nov 27 09:18:20 2020 +0100 KVM: x86: Fix split-irqchip vs interrupt injection window request kvm_cpu_accept_dm_intr and kvm_vcpu_ready_for_interrupt_injection are a hodge-podge of conditions, hacked together to get something that more or less works. But what is actually needed is much simpler; in both cases the fundamental question is, do we have a place to stash an interrupt if userspace does KVM_INTERRUPT? In userspace irqchip mode, that is !vcpu->arch.interrupt.injected. Currently kvm_event_needs_reinjection(vcpu) covers it, but it is unnecessarily restrictive. In split irqchip mode it's a bit more complicated, we need to check kvm_apic_accept_pic_intr(vcpu) (the IRQ window exit is basically an INTACK cycle and thus requires ExtINTs not to be masked) as well as !pending_userspace_extint(vcpu). However, there is no need to check kvm_event_needs_reinjection(vcpu), since split irqchip keeps pending ExtINT state separate from event injection state, and checking kvm_cpu_has_interrupt(vcpu) is wrong too since ExtINT has higher priority than APIC interrupts. In fact the latter fixes a bug: when userspace requests an IRQ window vmexit, an interrupt in the local APIC can cause kvm_cpu_has_interrupt() to be true and thus kvm_vcpu_ready_for_interrupt_injection() to return false. When this happens, vcpu_run does not exit to userspace but the interrupt window vmexits keep occurring. The VM loops without any hope of making progress. Once we try to fix these with something like return kvm_arch_interrupt_allowed(vcpu) && - !kvm_cpu_has_interrupt(vcpu) && - !kvm_event_needs_reinjection(vcpu) && - kvm_cpu_accept_dm_intr(vcpu); + (!lapic_in_kernel(vcpu) + ? !vcpu->arch.interrupt.injected + : (kvm_apic_accept_pic_intr(vcpu) + && !pending_userspace_extint(v))); we realize two things. First, thanks to the previous patch the complex conditional can reuse !kvm_cpu_has_extint(vcpu). Second, the interrupt window request in vcpu_enter_guest() bool req_int_win = dm_request_for_irq_injection(vcpu) && kvm_cpu_accept_dm_intr(vcpu); should be kept in sync with kvm_vcpu_ready_for_interrupt_injection(): it is unnecessary to ask the processor for an interrupt window if we would not be able to return to userspace. Therefore, kvm_cpu_accept_dm_intr(vcpu) is basically !kvm_cpu_has_extint(vcpu) ANDed with the existing check for masked ExtINT. It all makes sense: - we can accept an interrupt from userspace if there is a place to stash it (and, for irqchip split, ExtINTs are not masked). Interrupts from userspace _can_ be accepted even if right now EFLAGS.IF=0. - in order to tell userspace we will inject its interrupt ("IRQ window open" i.e. kvm_vcpu_ready_for_interrupt_injection), both KVM and the vCPU need to be ready to accept the interrupt. ... and this is what the patch implements. Reported-by: David Woodhouse Analyzed-by: David Woodhouse Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini Reviewed-by: Nikos Tsironis Reviewed-by: David Woodhouse Tested-by: David Woodhouse commit 72c3bcdcda494cbd600712a32e67702cdee60c07 Author: Paolo Bonzini Date: Fri Nov 27 08:53:52 2020 +0100 KVM: x86: handle !lapic_in_kernel case in kvm_cpu_*_extint Centralize handling of interrupts from the userspace APIC in kvm_cpu_has_extint and kvm_cpu_get_extint, since userspace APIC interrupts are handled more or less the same as ExtINTs are with split irqchip. This removes duplicated code from kvm_cpu_has_injectable_intr and kvm_cpu_has_interrupt, and makes the code more similar between kvm_cpu_has_{extint,interrupt} on one side and kvm_cpu_get_{extint,interrupt} on the other. Cc: stable@vger.kernel.org Reviewed-by: Filippo Sironi Reviewed-by: David Woodhouse Tested-by: David Woodhouse Signed-off-by: Paolo Bonzini commit 545f63948d3a2d5ad5aa2245c5cc75d5a45c19b4 Merge: c2b1209d852fe 23bde34771f1e Author: Paolo Bonzini Date: Fri Nov 27 09:17:13 2020 -0500 Merge tag 'kvmarm-fixes-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master KVM/arm64 fixes for v5.10, take #4 - Fix alignment of the new HYP sections - Fix GICR_TYPER access from userspace commit 5ef5bee02f1a7ae0706a7236867fddb26d8e8650 Merge: 402d5840b0d40 aa4cb898b80a2 Author: Takashi Iwai Date: Fri Nov 27 15:02:30 2020 +0100 Merge tag 'asoc-fix-v5.10-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.10 A small set of driver specific fixes, plus a new platform quirk from Hans. commit 402d5840b0d40a2a26c8651165d29b534abb6d36 Author: Hector Martin Date: Fri Nov 27 22:26:35 2020 +0900 ALSA: usb-audio: US16x08: fix value count for level meters The level meter control returns 34 integers of info. This fixes: snd-usb-audio 3-1:1.0: control 2:0:0:Level Meter:0: access overflow Fixes: d2bb390a2081 ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk") Cc: stable@vger.kernel.org Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20201127132635.18947-1-marcan@marcan.st Signed-off-by: Takashi Iwai commit 484cfbe5fb61469a5f5a276258a8b3973164b56f Author: Amelie Delaunay Date: Fri Nov 27 14:17:35 2020 +0100 usb: typec: stusb160x: fix power-opmode property with typec-power-opmode Device tree property is named typec-power-opmode, not power-opmode. Fixes: da0cb6310094 ("usb: typec: add support for STUSB160x Type-C controller family") Signed-off-by: Amelie Delaunay Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201127131735.28280-1-amelie.delaunay@st.com Signed-off-by: Greg Kroah-Hartman commit 739e7116b10bf8694795ed8365dd7cbe089b662a Merge: 90574a9c02f1e 4ad9921af4f18 Author: Petr Mladek Date: Fri Nov 27 13:41:23 2020 +0100 Merge branch 'for-5.10-pr_cont-fixup' into for-linus commit 454a079b381a1fea3962f89016f55761b251f4bd Merge: 06ceddef30a58 05d5de6ba7dbe Author: Arnd Bergmann Date: Fri Nov 27 13:18:40 2020 +0100 Merge tag 'omap-for-v5.10/fixes-rc5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Fixes for omaps for various issues noticed during the -rc cycle: - Earlier omap4 cpuidle fix was incomplete and needs to use a configured idle state instead - Fix am4 cpsw driver compatible to avoid invalid resource error for the legacy driver - Two kconfig fixes for genpd support that we added for for v5.10 for proper location of the option and adding missing option - Fix ti-sysc reset status checking on enabling modules to ignore quirky modules with reset status only usable when the quirk is activated during reset. Also fix bogus resetdone warning for cpsw and modules with no sysst register reset status bit - Suppress a ti-sysc warning for timers reserved as system timers - Fix the ordering of clocks for dra7 m_can * tag 'omap-for-v5.10/fixes-rc5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: dra76x: m_can: fix order of clocks bus: ti-sysc: suppress err msg for timers used as clockevent/source ARM: dts: am437x-l4: fix compatible for cpsw switch dt node ARM: OMAP2+: Manage MPU state properly for omap_enter_idle_coupled() bus: ti-sysc: Fix bogus resetdone warning on enable for cpsw bus: ti-sysc: Fix reset status check for modules with quirks ARM: OMAP2+: Fix missing select PM_GENERIC_DOMAINS_OF ARM: OMAP2+: Fix location for select PM_GENERIC_DOMAINS Link: https://lore.kernel.org/r/pull-1606460270-864284@atomide.com Signed-off-by: Arnd Bergmann commit a5d45bc0dc50f9dd83703510e9804d813a9cac32 Author: Pablo Neira Ayuso Date: Wed Nov 25 23:50:17 2020 +0100 netfilter: nftables_offload: build mask based from the matching bytes Userspace might match on prefix bytes of header fields if they are on the byte boundary, this requires that the mask is adjusted accordingly. Use NFT_OFFLOAD_MATCH_EXACT() for meta since prefix byte matching is not allowed for this type of selector. The bitwise expression might be optimized out by userspace, hence the kernel needs to infer the prefix from the number of payload bytes to match on. This patch adds nft_payload_offload_mask() to calculate the bitmask to match on the prefix. Fixes: c9626a2cbdb2 ("netfilter: nf_tables: add hardware offload support") Signed-off-by: Pablo Neira Ayuso commit 3c78e9e0d33a27ab8050e4492c03c6a1f8d0ed6b Author: Pablo Neira Ayuso Date: Wed Nov 25 23:50:07 2020 +0100 netfilter: nftables_offload: set address type in control dissector This patch adds nft_flow_rule_set_addr_type() to set the address type from the nft_payload expression accordingly. If the address type is not set in the control dissector then a rule that matches either on source or destination IP address does not work. After this patch, nft hardware offload generates the flow dissector configuration as tc-flower does to match on an IP address. This patch has been also tested functionally to make sure packets are filtered out by the NIC. This is also getting the code aligned with the existing netfilter flow offload infrastructure which is also setting the control dissector. Fixes: c9626a2cbdb2 ("netfilter: nf_tables: add hardware offload support") Signed-off-by: Pablo Neira Ayuso commit 4bc3c8dc9f5f1eff0d3bfa59491383ac11308b6b Author: Wang Hai Date: Tue Nov 24 16:07:49 2020 +0800 ipvs: fix possible memory leak in ip_vs_control_net_init kmemleak report a memory leak as follows: BUG: memory leak unreferenced object 0xffff8880759ea000 (size 256): backtrace: [<00000000c0bf2deb>] kmem_cache_zalloc include/linux/slab.h:656 [inline] [<00000000c0bf2deb>] __proc_create+0x23d/0x7d0 fs/proc/generic.c:421 [<000000009d718d02>] proc_create_reg+0x8e/0x140 fs/proc/generic.c:535 [<0000000097bbfc4f>] proc_create_net_data+0x8c/0x1b0 fs/proc/proc_net.c:126 [<00000000652480fc>] ip_vs_control_net_init+0x308/0x13a0 net/netfilter/ipvs/ip_vs_ctl.c:4169 [<000000004c927ebe>] __ip_vs_init+0x211/0x400 net/netfilter/ipvs/ip_vs_core.c:2429 [<00000000aa6b72d9>] ops_init+0xa8/0x3c0 net/core/net_namespace.c:151 [<00000000153fd114>] setup_net+0x2de/0x7e0 net/core/net_namespace.c:341 [<00000000be4e4f07>] copy_net_ns+0x27d/0x530 net/core/net_namespace.c:482 [<00000000f1c23ec9>] create_new_namespaces+0x382/0xa30 kernel/nsproxy.c:110 [<00000000098a5757>] copy_namespaces+0x2e6/0x3b0 kernel/nsproxy.c:179 [<0000000026ce39e9>] copy_process+0x220a/0x5f00 kernel/fork.c:2072 [<00000000b71f4efe>] _do_fork+0xc7/0xda0 kernel/fork.c:2428 [<000000002974ee96>] __do_sys_clone3+0x18a/0x280 kernel/fork.c:2703 [<0000000062ac0a4d>] do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 [<0000000093f1ce2c>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 In the error path of ip_vs_control_net_init(), remove_proc_entry() needs to be called to remove the added proc entry, otherwise a memory leak will occur. Also, add some '#ifdef CONFIG_PROC_FS' because proc_create_net* return NULL when PROC is not used. Fixes: b17fc9963f83 ("IPVS: netns, ip_vs_stats and its procfs") Fixes: 61b1ab4583e2 ("IPVS: netns, add basic init per netns.") Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso commit 10f78fd0dabbc3856ddd67b09a46abdedb045913 Author: Srikar Dronamraju Date: Fri Nov 27 11:07:38 2020 +0530 powerpc/numa: Fix a regression on memoryless node 0 Commit e75130f20b1f ("powerpc/numa: Offline memoryless cpuless node 0") offlines node 0 and expects nodes to be subsequently onlined when CPUs or nodes are detected. Commit 6398eaa26816 ("powerpc/numa: Prefer node id queried from vphn") skips onlining node 0 when CPUs are associated with node 0. On systems with node 0 having CPUs but no memory, this causes node 0 be marked offline. This causes issues at boot time when trying to set memory node for online CPUs while building the zonelist. 0:mon> t [link register ] c000000000400354 __build_all_zonelists+0x164/0x280 [c00000000161bda0] c0000000016533c8 node_states+0x20/0xa0 (unreliable) [c00000000161bdc0] c000000000400384 __build_all_zonelists+0x194/0x280 [c00000000161be30] c000000001041800 build_all_zonelists_init+0x4c/0x118 [c00000000161be80] c0000000004020d0 build_all_zonelists+0x190/0x1b0 [c00000000161bef0] c000000001003cf8 start_kernel+0x18c/0x6a8 [c00000000161bf90] c00000000000adb4 start_here_common+0x1c/0x3e8 0:mon> r R00 = c000000000400354 R16 = 000000000b57a0e8 R01 = c00000000161bda0 R17 = 000000000b57a6b0 R02 = c00000000161ce00 R18 = 000000000b5afee8 R03 = 0000000000000000 R19 = 000000000b6448a0 R04 = 0000000000000000 R20 = fffffffffffffffd R05 = 0000000000000000 R21 = 0000000001400000 R06 = 0000000000000000 R22 = 000000001ec00000 R07 = 0000000000000001 R23 = c000000001175580 R08 = 0000000000000000 R24 = c000000001651ed8 R09 = c0000000017e84d8 R25 = c000000001652480 R10 = 0000000000000000 R26 = c000000001175584 R11 = c000000c7fac0d10 R27 = c0000000019568d0 R12 = c000000000400180 R28 = 0000000000000000 R13 = c000000002200000 R29 = c00000000164dd78 R14 = 000000000b579f78 R30 = 0000000000000000 R15 = 000000000b57a2b8 R31 = c000000001175584 pc = c000000000400194 local_memory_node+0x24/0x80 cfar= c000000000074334 mcount+0xc/0x10 lr = c000000000400354 __build_all_zonelists+0x164/0x280 msr = 8000000002001033 cr = 44002284 ctr = c000000000400180 xer = 0000000000000001 trap = 380 dar = 0000000000001388 dsisr = c00000000161bc90 0:mon> Fix this by setting node to be online while onlining CPUs that belong to node 0. Fixes: e75130f20b1f ("powerpc/numa: Offline memoryless cpuless node 0") Fixes: 6398eaa26816 ("powerpc/numa: Prefer node id queried from vphn") Reported-by: Milan Mohanty Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201127053738.10085-1-srikar@linux.vnet.ibm.com commit 4ad9921af4f18490980369f7d60f90ade0195812 Author: John Ogness Date: Thu Nov 26 12:54:36 2020 +0106 printk: finalize records with trailing newlines Any record with a trailing newline (LOG_NEWLINE flag) cannot be continued because the newline has been stripped and will not be visible if the message is appended. This was already handled correctly when committing in log_output() but was not handled correctly when committing in log_store(). Fixes: f5f022e53b87 ("printk: reimplement log_cont using record extension") Link: https://lore.kernel.org/r/20201126114836.14750-1-john.ogness@linutronix.de Reported-by: Kefeng Wang Signed-off-by: John Ogness Tested-by: Kefeng Wang Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek commit 6d6556c04ebaeaf4e7fa8b791c97e2a7c41b38a3 Author: Giacinto Cifelli Date: Wed Nov 25 15:53:04 2020 +0100 USB: serial: option: add support for Thales Cinterion EXS82 There is a single option port in this modem, and it is used as debug port. lsusb -v for this device: Bus 001 Device 002: ID 1e2d:006c Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x1e2d idProduct 0x006c bcdDevice 0.00 iManufacturer 4 iProduct 3 iSerial 5 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 243 bNumInterfaces 7 bConfigurationValue 1 iConfiguration 2 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 1 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 2 CDC Union: bMasterInterface 1 bSlaveInterface 2 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 3 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 4 CDC Union: bMasterInterface 3 bSlaveInterface 4 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 4 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 5 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 5 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 6 Ethernet Networking bInterfaceProtocol 0 iInterface 0 CDC Header: bcdCDC 1.10 CDC Ethernet: iMacAddress 1 (??) bmEthernetStatistics 0x00000000 wMaxSegmentSize 16384 wNumberMCFilters 0x0001 bNumberPowerFilters 0 CDC Union: bMasterInterface 5 bSlaveInterface 6 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 5 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 6 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 6 bAlternateSetting 1 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x87 EP 7 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Signed-off-by: Giacinto Cifelli Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit d73ff9b7c4eacaba0fd956d14882bcae970f8307 Author: Oliver Hartkopp Date: Thu Nov 26 20:21:40 2020 +0100 can: af_can: can_rx_unregister(): remove WARN() statement from list operation sanity check To detect potential bugs in CAN protocol implementations (double removal of receiver entries) a WARN() statement has been used if no matching list item was found for removal. The fault injection issued by syzkaller was able to create a situation where the closing of a socket runs simultaneously to the notifier call chain for removing the CAN network device in use. This case is very unlikely in real life but it doesn't break anything. Therefore we just replace the WARN() statement with pr_warn() to preserve the notification for the CAN protocol development. Reported-by: syzbot+381d06e0c8eaacb8706f@syzkaller.appspotmail.com Reported-by: syzbot+d0ddd88c9a7432f041e6@syzkaller.appspotmail.com Reported-by: syzbot+76d62d3b8162883c7d11@syzkaller.appspotmail.com Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201126192140.14350-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit 5c7d55bded77da6db7c5d249610e3a2eed730b3c Author: Pankaj Sharma Date: Thu Nov 26 10:21:42 2020 +0530 can: m_can: m_can_dev_setup(): add support for bosch mcan version 3.3.0 Add support for mcan bit timing and control mode according to bosch mcan IP version 3.3.0. The mcan version read from the Core Release field of CREL register would be 33. Accordingly the properties are to be set for mcan v3.3.0 Signed-off-by: Pankaj Sharma Link: https://lore.kernel.org/r/1606366302-5520-1-git-send-email-pankj.sharma@samsung.com Signed-off-by: Marc Kleine-Budde commit e3409e4192535fbcc86a84b7a65d9351f46039ec Author: Marc Kleine-Budde Date: Tue Nov 24 19:47:38 2020 +0100 can: m_can: fix nominal bitiming tseg2 min for version >= 3.1 At lest the revision 3.3.0 of the bosch m_can IP core specifies that valid register values for "Nominal Time segment after sample point (NTSEG2)" are from 1 to 127. As the hardware uses a value of one more than the programmed value, mean tseg2_min is 2. This patch fixes the tseg2_min value accordingly. Cc: Dan Murphy Cc: Mario Huettel Acked-by: Sriram Dash Link: https://lore.kernel.org/r/20201124190751.3972238-1-mkl@pengutronix.de Fixes: b03cfc5bb0e1 ("can: m_can: Enable M_CAN version dependent initialization") Signed-off-by: Marc Kleine-Budde commit 865f5b671b48d0088ce981cff1e822d9f7da441f Author: Marc Kleine-Budde Date: Fri Nov 27 08:35:12 2020 +0100 can: m_can: m_can_open(): remove IRQF_TRIGGER_FALLING from request_threaded_irq()'s flags The threaded IRQ handler is used for the tcan4x5x driver only. The IRQ pin of the tcan4x5x controller is active low, so better not use IRQF_TRIGGER_FALLING when requesting the IRQ. As this can result in missing interrupts. Further, if the device tree specified the interrupt as "IRQ_TYPE_LEVEL_LOW", unloading and reloading of the driver results in the following error during ifup: | irq: type mismatch, failed to map hwirq-31 for gpio@20a8000! | tcan4x5x spi1.1: m_can device registered (irq=0, version=32) | tcan4x5x spi1.1 can2: TCAN4X5X successfully initialized. | tcan4x5x spi1.1 can2: failed to request interrupt This patch fixes the problem by removing the IRQF_TRIGGER_FALLING from the request_threaded_irq(). Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework") Cc: Dan Murphy Cc: Sriram Dash Cc: Pankaj Sharma Link: https://lore.kernel.org/r/20201127093548.509253-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit e5782a5d5054bf1e03cb7fbd87035037c2a22698 Author: Kailang Yang Date: Fri Nov 27 14:39:23 2020 +0800 ALSA: hda/realtek - Add new codec supported for ALC897 Enable new codec supported for ALC897. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/3b00520f304842aab8291eb8d9191bd8@realtek.com Signed-off-by: Takashi Iwai commit 992b03b88e36254e26e9a4977ab948683e21bd9f Author: Sven Eckelmann Date: Thu Nov 26 18:24:49 2020 +0100 batman-adv: Don't always reallocate the fragmentation skb head When a packet is fragmented by batman-adv, the original batman-adv header is not modified. Only a new fragmentation is inserted between the original one and the ethernet header. The code must therefore make sure that it has a writable region of this size in the skbuff head. But it is not useful to always reallocate the skbuff by this size even when there would be more than enough headroom still in the skb. The reallocation is just to costly during in this codepath. Fixes: ee75ed88879a ("batman-adv: Fragment and send skbs larger than mtu") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit c5cbfc87558168ef4c3c27ce36eba6b83391db19 Author: Sven Eckelmann Date: Wed Nov 25 13:16:43 2020 +0100 batman-adv: Reserve needed_*room for fragments The batadv net_device is trying to propagate the needed_headroom and needed_tailroom from the lower devices. This is needed to avoid cost intensive reallocations using pskb_expand_head during the transmission. But the fragmentation code split the skb's without adding extra room at the end/beginning of the various fragments. This reduced the performance of transmissions over complex scenarios (batadv on vxlan on wireguard) because the lower devices had to perform the reallocations at least once. Fixes: ee75ed88879a ("batman-adv: Fragment and send skbs larger than mtu") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 4ca23e2c2074465bff55ea14221175fecdf63c5f Author: Sven Eckelmann Date: Thu Nov 26 18:15:06 2020 +0100 batman-adv: Consider fragmentation for needed_headroom If a batman-adv packets has to be fragmented, then the original batman-adv packet header is not stripped away. Instead, only a new header is added in front of the packet after it was split. This size must be considered to avoid cost intensive reallocations during the transmission through the various device layers. Fixes: 7bca68c7844b ("batman-adv: Add lower layer needed_(head|tail)room to own ones") Reported-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 9595930db4bb91433607441a5f26d90e9c6e34eb Merge: d45618c28521b 2be65641642ef Author: Dave Airlie Date: Fri Nov 27 09:39:39 2020 +1000 Merge tag 'drm-misc-fixes-2020-11-26' of ssh://git.freedesktop.org/git/drm/drm-misc into drm-fixes A bunch of fixes for vc4 fixing some coexistence issue between wifi and HDMI, unsupported modes, and vblank timeouts, a fix for ast to reload the gamma LUT after changing the plane format and a double-free fix for nouveau Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201126085450.r3i7wvj7pizsa4l6@gilmour commit d45618c28521ba99ba1e5610ac4a5ca693c37c1e Merge: 5929dd876bf2a 487778f8d22fc Author: Dave Airlie Date: Fri Nov 27 09:37:01 2020 +1000 Merge tag 'mediatek-drm-fixes-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-fixes Mediatek DRM Fixes for Linux 5.10 1. Remove unused variable. 2. Modify horizontal front/back porch byte formula. Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20201123234131.387-1-chunkuang.hu@kernel.org commit 5929dd876bf2aa34a3071e085a60946a9ce0ab79 Merge: b51c2c67ce028 e2d3d2e904ad3 Author: Dave Airlie Date: Fri Nov 27 09:21:10 2020 +1000 Merge tag 'exynos-drm-fixes-for-v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes One bug fix . Add COMMON_CLK dependency to fix a build error below, /usr/bin/mips-linux-gnu-ld: drivers/gpu/drm/exynos/exynos_mixer.o: in function `mixer_bind': exynos_mixer.c:(.text+0x958): undefined reference to `clk_set_parent' Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1606184478-23384-1-git-send-email-inki.dae@samsung.com commit 06ceddef30a58ddb4393176c78fd4dccc14dbfde Merge: 3a18293e4a0fa d98bccf10dd0f Author: Arnd Bergmann Date: Thu Nov 26 22:08:01 2020 +0100 Merge tag 'tegra-for-5.10-arm64-dt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes arm64: tegra: Device tree fixes for v5.10-rc6 This contains a couple of fixes to device trees. Among other things, this restores suspend/resume on Jetson TX2 and makes USB OTG work on Jetson TX1. * tag 'tegra-for-5.10-arm64-dt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Fix Tegra234 VDK node names arm64: tegra: Wrong AON HSP reg property size arm64: tegra: Fix USB_VBUS_EN0 regulator on Jetson TX1 arm64: tegra: Correct the UART for Jetson Xavier NX arm64: tegra: Disable the ACONNECT for Jetson TX2 Link: https://lore.kernel.org/r/20201125170306.1095734-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 3a18293e4a0fa75366087c683bb959a8ff55111b Merge: dbae2736fd9f1 2663b33885512 Author: Arnd Bergmann Date: Thu Nov 26 22:07:21 2020 +0100 Merge tag 'soc-fsl-fix-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/fixes NXP/FSL SoC driver fix for 5.10 DPAA2 DPIO driver - Fix non-static cpumask for irq affinity setting * tag 'soc-fsl-fix-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: dpio: Get the cpumask through cpumask_of(cpu) Link: https://lore.kernel.org/r/20201125165922.15487-1-leoyang.li@nxp.com Signed-off-by: Arnd Bergmann commit dbae2736fd9f131111d3e826396b45c36d1de211 Merge: 4765df4d3a132 acfdd18591eaa Author: Arnd Bergmann Date: Thu Nov 26 22:06:49 2020 +0100 Merge tag 'zynqmp-soc-fixes-for-v5.10-rc6' of https://github.com/Xilinx/linux-xlnx into arm/fixes arm64: soc: ZynqMP SoC fixes for v5.10-rc6 - Fix SD dll reset issue by using proper macro - Fix PM feature checking for Xilinx Versal SoC * tag 'zynqmp-soc-fixes-for-v5.10-rc6' of https://github.com/Xilinx/linux-xlnx: (337 commits) firmware: xilinx: Use hash-table for api feature check firmware: xilinx: Fix SD DLL node reset issue Linux 5.10-rc4 kvm: mmu: fix is_tdp_mmu_check when the TDP MMU is not in use afs: Fix afs_write_end() when called with copied == 0 [ver #3] ocfs2: initialize ip_next_orphan panic: don't dump stack twice on warn hugetlbfs: fix anon huge page migration race mm: memcontrol: fix missing wakeup polling thread kernel/watchdog: fix watchdog_allowed_mask not used warning reboot: fix overflow parsing reboot cpu number Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint" compiler.h: fix barrier_data() on clang mm/gup: use unpin_user_pages() in __gup_longterm_locked() mm/slub: fix panic in slab_alloc_node() mailmap: fix entry for Dmitry Baryshkov/Eremin-Solenikov mm/vmscan: fix NR_ISOLATED_FILE corruption on 64-bit mm/compaction: stop isolation if too many pages are isolated and we have pages to migrate mm/compaction: count pages and stop correctly during page isolation drm/nouveau/kms/nv50-: Use atomic encoder callbacks everywhere ... Link: https://lore.kernel.org/r/fd5ab967-f3cf-95fb-7947-5477ff85f97e@monstr.eu Signed-off-by: Arnd Bergmann commit 85a2c56cb4454c73f56d3099d96942e7919b292f Merge: 4df910620bebb 05b8955f43536 Author: Linus Torvalds Date: Thu Nov 26 11:17:37 2020 -0800 Merge tag 'pm-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix a recently introduced build issue in the cpufreq SCMI driver (Sudeep Holla)" * tag 'pm-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: scmi: Fix build for !CONFIG_COMMON_CLK commit 82e938bd5382b322ce81e6cb8fd030987f2da022 Author: Andreas Gruenbacher Date: Wed Nov 25 23:37:18 2020 +0100 gfs2: Upgrade shared glocks for atime updates Commit 20f829999c38 ("gfs2: Rework read and page fault locking") lifted the glock lock taking from the low-level ->readpage and ->readahead address space operations to the higher-level ->read_iter file and ->fault vm operations. The glocks are still taken in LM_ST_SHARED mode only. On filesystems mounted without the noatime option, ->read_iter sometimes needs to update the atime as well, though. Right now, this leads to a failed locking mode assertion in gfs2_dirty_inode. Fix that by introducing a new update_time inode operation. There, if the glock is held non-exclusively, upgrade it to an exclusive lock. Reported-by: Alexander Aring Fixes: 20f829999c38 ("gfs2: Rework read and page fault locking") Cc: stable@vger.kernel.org # v5.8+ Signed-off-by: Andreas Gruenbacher commit bf3a3cdcad40e5928a22ea0fd200d17fd6d6308d Author: Qinglang Miao Date: Fri Oct 30 09:34:24 2020 +0800 drm/tegra: sor: Disable clocks on error in tegra_sor_init() Fix the missing clk_disable_unprepare() before return from tegra_sor_init() in the error handling case. Signed-off-by: Qinglang Miao Signed-off-by: Thierry Reding commit 4df910620bebb5cfe234af16ac8f6474b60215fd Author: Feng Tang Date: Wed Nov 25 13:22:21 2020 +0800 mm: memcg: relayout structure mem_cgroup to avoid cache interference 0day reported one -22.7% regression for will-it-scale page_fault2 case [1] on a 4 sockets 144 CPU platform, and bisected to it to be caused by Waiman's optimization (commit bd0b230fe1) of saving one 'struct page_counter' space for 'struct mem_cgroup'. Initially we thought it was due to the cache alignment change introduced by the patch, but further debug shows that it is due to some hot data members ('vmstats_local', 'vmstats_percpu', 'vmstats') sit in 2 adjacent cacheline (2N and 2N+1 cacheline), and when adjacent cache line prefetch is enabled, it triggers an "extended level" of cache false sharing for 2 adjacent cache lines. So exchange the 2 member blocks, while keeping mostly the original cache alignment, which can restore and even enhance the performance, and save 64 bytes of space for 'struct mem_cgroup' (from 2880 to 2816, with 0day's default RHEL-8.3 kernel config) [1]. https://lore.kernel.org/lkml/20201102091543.GM31092@shao2-debian/ Fixes: bd0b230fe145 ("mm/memcg: unify swap and memsw page counters") Reported-by: kernel test robot Signed-off-by: Feng Tang Acked-by: Waiman Long Signed-off-by: Linus Torvalds commit aea656b0d05ec5b8ed5beb2f94c4dd42ea834e9d Author: Christian König Date: Thu Nov 26 13:35:08 2020 +0100 drm/nouveau: make sure ret is initialized in nouveau_ttm_io_mem_reserve This wasn't initialized for pre NV50 hardware. Signed-off-by: Christian König Reported-and-Tested-by: Mark Hounschell Reviewed-by: Karol Herbst Link: https://patchwork.freedesktop.org/series/84298/ commit af60470347de6ac2b9f0cc3703975a543a3de075 Author: Pavel Begunkov Date: Wed Nov 25 18:41:28 2020 +0000 io_uring: fix files grab/cancel race When one task is in io_uring_cancel_files() and another is doing io_prep_async_work() a race may happen. That's because after accounting a request inflight in first call to io_grab_identity() it still may fail and go to io_identity_cow(), which migh briefly keep dangling work.identity and not only. Grab files last, so io_prep_async_work() won't fail if it did get into ->inflight_list. note: the bug shouldn't exist after making io_uring_cancel_files() not poking into other tasks' requests. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 17475e104dcb74217c282781817f8f52b46130d3 Author: Yixian Liu Date: Thu Nov 26 18:26:12 2020 +0800 RDMA/hns: Bugfix for memory window mtpt configuration When a memory window is bound to a memory region, the local write access should be set for its mtpt table. Fixes: c7c28191408b ("RDMA/hns: Add MW support for hip08") Link: https://lore.kernel.org/r/1606386372-21094-1-git-send-email-liweihang@huawei.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit ab6f7248cc446b85fe9e31091670ad7c4293d7fd Author: Wenpeng Liang Date: Thu Nov 26 17:29:37 2020 +0800 RDMA/hns: Fix retry_cnt and rnr_cnt when querying QP The maximum number of retransmission should be returned when querying QP, not the value of retransmission counter. Fixes: 99fcf82521d9 ("RDMA/hns: Fix the wrong value of rnr_retry when querying qp") Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/1606382977-21431-1-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit ebed7b7ca47f3aa95ebf2185a526227744616ac1 Author: Wenpeng Liang Date: Thu Nov 26 17:26:52 2020 +0800 RDMA/hns: Fix wrong field of SRQ number the device supports The SRQ capacity is got from the firmware, whose field should be ended at bit 19. Fixes: ba6bb7e97421 ("RDMA/hns: Add interfaces to get pf capabilities from firmware") Link: https://lore.kernel.org/r/1606382812-23636-1-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit d76b42e92780c3587c1a998a3a943b501c137553 Author: David Woodhouse Date: Thu Nov 26 11:13:51 2020 +0000 iommu/vt-d: Don't read VCCAP register unless it exists My virtual IOMMU implementation is whining that the guest is reading a register that doesn't exist. Only read the VCCAP_REG if the corresponding capability is set in ECAP_REG to indicate that it actually exists. Fixes: 3375303e8287 ("iommu/vt-d: Add custom allocator for IOASID") Signed-off-by: David Woodhouse Reviewed-by: Liu Yi L Cc: stable@vger.kernel.org # v5.7+ Acked-by: Lu Baolu Link: https://lore.kernel.org/r/de32b150ffaa752e0cff8571b17dfb1213fbe71c.camel@infradead.org Signed-off-by: Will Deacon commit c9aa128080cbce92f8715a9328f88d8ca3134279 Author: Hans de Goede Date: Tue Nov 24 12:04:54 2020 +0100 platform/x86: touchscreen_dmi: Add info for the Irbis TW118 tablet Add touchscreen info for the Irbis TW118 tablet. Reported-and-tested-by: russianneuromancer Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201124110454.114286-1-hdegoede@redhat.com commit 0f511edc6ac12f1ccf1c6c2d4412f5ed7ba426a6 Author: Hans de Goede Date: Thu Oct 15 21:49:49 2020 +0200 platform/x86: touchscreen_dmi: Add info for the Predia Basic tablet Add touchscreen info for the Predia Basic tablet. Signed-off-by: Hans de Goede Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201015194949.50566-1-hdegoede@redhat.com commit 8b205d3e1bf52ab31cdd5c55f87c87a227793d84 Author: Max Verevkin Date: Tue Nov 24 15:16:52 2020 +0200 platform/x86: intel-vbtn: Support for tablet mode on HP Pavilion 13 x360 PC The Pavilion 13 x360 PC has a chassis-type which does not indicate it is a convertible, while it is actually a convertible. Add it to the dmi_switches_allow_list. Signed-off-by: Max Verevkin Link: https://lore.kernel.org/r/20201124131652.11165-1-me@maxverevkin.tk Signed-off-by: Hans de Goede commit 2a72c46ac4d665614faa25e267c3fb27fb729ed7 Author: Kaixu Xia Date: Sun Nov 22 13:49:37 2020 +0800 platform/x86: toshiba_acpi: Fix the wrong variable assignment The commit 78429e55e4057 ("platform/x86: toshiba_acpi: Clean up variable declaration") cleans up variable declaration in video_proc_write(). Seems it does the variable assignment in the wrong place, this results in dead code and changes the source code logic. Fix it by doing the assignment at the beginning of the funciton. Fixes: 78429e55e4057 ("platform/x86: toshiba_acpi: Clean up variable declaration") Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1606024177-16481-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Hans de Goede commit 9e7a005ad56aa7d6ea5830c5ffcc60bf35de380b Author: Timo Witte Date: Tue Aug 4 02:14:23 2020 +0200 platform/x86: acer-wmi: add automatic keyboard background light toggle key as KEY_LIGHTS_TOGGLE Got a dmesg message on my AMD Renoir based Acer laptop: "acer_wmi: Unknown key number - 0x84" when toggling keyboard background light Signed-off-by: Timo Witte Reviewed-by: "Lee, Chun-Yi" Link: https://lore.kernel.org/r/20200804001423.36778-1-timo.witte@gmail.com Signed-off-by: Hans de Goede commit 80a8c3185f5047dc7438ed226b72385bf93b4071 Author: Matthias Maier Date: Wed Nov 25 18:04:16 2020 -0600 platform/x86: thinkpad_acpi: Whitelist P15 firmware for dual fan control This commit enables dual fan control for the following new Lenovo models: P15, P15v. Signed-off-by: Matthias Maier Link: https://lore.kernel.org/r/20201126000416.2459645-2-tamiko-ibm-acpi-devel@43-1.org Signed-off-by: Hans de Goede commit e40cc1b476d60f22628741e53cf3446a29e6e6b9 Author: Benjamin Berg Date: Mon Nov 23 14:21:57 2020 +0100 platform/x86: thinkpad_acpi: Send tablet mode switch at wakeup time The lid state may change while the machine is suspended. As such, we may need to re-check the state at wake-up time (at least when waking up from hibernation). Add the appropriate call to the resume handler in order to sync the SW_TABLET_MODE switch state with the hardware state. Fixes: dda3ec0aa631 ("platform/x86: thinkpad_acpi: Implement tablet mode using GMMS method") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210269 Signed-off-by: Benjamin Berg Acked-by: Henrique de Moraes Holschuh Link: https://lore.kernel.org/r/20201123132157.866303-1-benjamin@sipsolutions.net Signed-off-by: Hans de Goede commit c986a7024916c92a775fc8d853fba3cae1d5fde4 Author: Hans de Goede Date: Mon Nov 9 11:35:50 2020 +0100 platform/x86: thinkpad_acpi: Add BAT1 is primary battery quirk for Thinkpad Yoga 11e 4th gen The Thinkpad Yoga 11e 4th gen with the N3450 / Celeron CPU only has one battery which is named BAT1 instead of the expected BAT0, add a quirk for this. This fixes not being able to set the charging tresholds on this model; and this alsoe fixes the following errors in dmesg: ACPI: \_SB_.PCI0.LPCB.EC__.HKEY: BCTG evaluated but flagged as error thinkpad_acpi: Error probing battery 2 battery: extension failed to load: ThinkPad Battery Extension battery: extension unregistered: ThinkPad Battery Extension Note that the added quirk is for the "R0K" BIOS versions which are used on the Thinkpad Yoga 11e 4th gen's with a Celeron CPU, there is a separate "R0L" BIOS for the i3/i5 based versions. This may also need the same quirk, but if that really is necessary is unknown. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201109103550.16265-1-hdegoede@redhat.com commit f2eae1888cf22590c38764b8fa3c989c0283870e Author: Hans de Goede Date: Fri Nov 6 15:01:30 2020 +0100 platform/x86: thinkpad_acpi: Do not report SW_TABLET_MODE on Yoga 11e The Yoga 11e series has 2 accelerometers described by a BOSC0200 ACPI node. This setup relies on a Windows service which reads both accelerometers and then calculates the angle between the 2 halves to determine laptop / tent / tablet mode and then reports the calculated mode back to the EC by calling special ACPI methods on the BOSC0200 node. The bmc150 iio driver does not support this (it involves double calculations requiring sqrt and arccos so this really needs to be done in userspace), as a result of this on the Yoga 11e the thinkpad_acpi code always reports SW_TABLET_MODE=0, starting with GNOME 3.38 reporting SW_TABLET_MODE=0 causes GNOME to: 1. Not show the onscreen keyboard when a text-input field is focussed with the touchscreen. 2. Disable accelerometer based auto display-rotation. This makes sense when in laptop-mode but not when in tablet-mode. But since for the Yoga 11e the thinkpad_acpi code always reports SW_TABLET_MODE=0, GNOME does not know when the device is in tablet-mode. Stop reporting the broken (always 0) SW_TABLET_MODE on Yoga 11e models to fix this. Note there are plans for userspace to support 360 degree hinges style 2-in-1s with 2 accelerometers and figure out the mode by itself, see: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/216 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201106140130.46820-1-hdegoede@redhat.com commit 15d89c9f6f4a186ade7aefbe77e7ede9746b6c47 Author: Iakov 'Jake' Kirilenko Date: Thu Nov 5 18:25:56 2020 +0300 platform/x86: thinkpad_acpi: add P1 gen3 second fan support Tested on my P1 gen3, works fine with `thinkfan`. Since thinkpad_acpi fan control is off by default, it is safe to add 2nd fan control for brave overclockers Signed-off-by: Iakov 'Jake' Kirilenko Link: https://lore.kernel.org/r/20201105152556.34073-1-jake.kirilenko@gmail.com Signed-off-by: Hans de Goede commit 01b0f0eae0812e80efeee4ee17687e5386335e08 Author: Nicholas Piggin Date: Thu Nov 26 20:25:30 2020 +1000 powerpc/64s: Trim offlined CPUs from mm_cpumasks When offlining a CPU, powerpc/64s does not flush TLBs, rather it just leaves the CPU set in mm_cpumasks, so it continues to receive TLBIEs to manage its TLBs. However the exit_flush_lazy_tlbs() function expects that after returning, all CPUs (except self) have flushed TLBs for that mm, in which case TLBIEL can be used for this flush. This breaks for offline CPUs because they don't get the IPI to flush their TLB. This can lead to stale translations. Fix this by clearing the CPU from mm_cpumasks, then flushing all TLBs before going offline. These offlined CPU bits stuck in the cpumask also prevents the cpumask from being trimmed back to local mode, which means continual broadcast IPIs or TLBIEs are needed for TLB flushing. This patch prevents that situation too. A cast of many were involved in working this out, but in particular Milton, Aneesh, Paul made key discoveries. Fixes: 0cef77c7798a7 ("powerpc/64s/radix: flush remote CPUs out of single-threaded mm_cpumask") Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Debugged-by: Milton Miller Debugged-by: Aneesh Kumar K.V Debugged-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126102530.691335-5-npiggin@gmail.com commit 8ff00399b153440c1c83e20c43020385b416415b Author: Nicholas Piggin Date: Thu Nov 26 20:25:29 2020 +1000 kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling powerpc/64s keeps a counter in the mm which counts bits set in mm_cpumask as well as other things. This means it can't use generic code to clear bits out of the mask and doesn't adjust the arch specific counter. Add an arch override that allows powerpc/64s to use clear_tasks_mm_cpumask(). Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Acked-by: Peter Zijlstra (Intel) Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126102530.691335-4-npiggin@gmail.com commit c0b27c517acf8a2b359dd373a7e7e88b01a8308e Author: Nicholas Piggin Date: Thu Nov 26 20:25:28 2020 +1000 powerpc/64s/pseries: Fix hash tlbiel_all_isa300 for guest kernels tlbiel_all() can not be usable in !HVMODE when running hash presently, remove HV privileged flushes when running in guest to make it usable. Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126102530.691335-3-npiggin@gmail.com commit 5844cc25fd121074de7895181a2fa1ce100a0fdd Author: Nicholas Piggin Date: Thu Nov 26 20:25:27 2020 +1000 powerpc/64s: Fix hash ISA v3.0 TLBIEL instruction generation A typo has the R field of the instruction assigned by lucky dip a la register allocator. Fixes: d4748276ae14c ("powerpc/64s: Improve local TLB flush for boot and MCE on POWER9") Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201126102530.691335-2-npiggin@gmail.com commit aa4cb898b80a28a610e26d1513e6dd42d995c225 Author: Shuming Fan Date: Thu Nov 26 17:27:59 2020 +0800 ASoC: rt5682: change SAR voltage threshold To fix errors in some 4 poles headset detection cases, this patch adjusts the voltage threshold for mic detection. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20201126092759.9427-1-shumingf@realtek.com Signed-off-by: Mark Brown commit c70582bbf299986234ecf06d128454b4b38ecd2e Author: Daniel Abrecht Date: Sun Nov 8 21:00:01 2020 +0000 drm: mxsfb: Implement .format_mod_supported This will make sure applications which use the IN_FORMATS blob to figure out which modifiers they can use will pick up the linear modifier which is needed by mxsfb. Such applications will not work otherwise if an incompatible implicit modifier ends up being selected. Before commit ae1ed0093281 ("drm: mxsfb: Stop using DRM simple display pipeline helper"), the DRM simple display pipeline helper took care of this. Signed-off-by: Daniel Abrecht Fixes: ae1ed0093281 ("drm: mxsfb: Stop using DRM simple display pipeline helper") Reviewed-by: Stefan Agner Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/2a99ffffc2378209307e0992a6e97e70@nodmarc.danielabrecht.ch commit 777ee15e88616c275ba59db88d3ece20eae0ca9a Author: Lucas Stach Date: Fri Nov 20 22:13:06 2020 +0100 drm: mxsfb: fix fence synchronization The conversion away from the simple display pipeline helper missed to convert the prepare_fb plane callback, so no fences are attached to the atomic state, breaking synchronization with other devices. Fix this by plugging in the drm_gem_fb_prepare_fb helper function. Fixes: ae1ed0093281 ("drm: mxsfb: Stop using DRM simple display pipeline helper") Signed-off-by: Lucas Stach Reviewed-by: Stefan Agner Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20201120211306.325841-1-l.stach@pengutronix.de commit 1a1c436bad340cea1cff815dd2cbb2c4f6af8d43 Author: Marc Kleine-Budde Date: Sat Nov 21 20:14:19 2020 +0100 can: mcp251xfd: mcp251xfd_probe(): bail out if no IRQ was given This patch add a check to the mcp251xfd_probe() function to bail out and give the user a proper error message if no IRQ is specified. Otherwise the driver will probe just fine but ifup will fail with a meaningless "RTNETLINK answers: Invalid argument" error message. Link: https://lore.kernel.org/r/20201123113522.3820052-1-mkl@pengutronix.de Reported-by: Niels Petter Signed-off-by: Marc Kleine-Budde commit 4ba1cb39fce4464151517a37ce0ac0a1a3f580d6 Author: Marc Kleine-Budde Date: Thu Nov 19 14:03:17 2020 +0100 can: gs_usb: fix endianess problem with candleLight firmware The firmware on the original USB2CAN by Geschwister Schneider Technologie Entwicklungs- und Vertriebs UG exchanges all data between the host and the device in host byte order. This is done with the struct gs_host_config::byte_order member, which is sent first to indicate the desired byte order. The widely used open source firmware candleLight doesn't support this feature and exchanges the data in little endian byte order. This breaks if a device with candleLight firmware is used on big endianess systems. To fix this problem, all u32 (but not the struct gs_host_frame::echo_id, which is a transparent cookie) are converted to __le32. Cc: Maximilian Schneider Cc: Hubert Denkmair Reported-by: Michael Rausch Link: https://lore.kernel.org/r/b58aace7-61f3-6df7-c6df-69fee2c66906@netadair.de Tested-by: Oleksij Rempel Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices") Link: https://lore.kernel.org/r/20201120103818.3386964-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit c7acb6b9c07b4b75dffadc3b6466b1b43b3fda21 Author: Mathieu Poirier Date: Wed Nov 25 15:35:19 2020 -0700 MAINTAINERS: Adding help for coresight subsystem With the steady stream of new features coming into the subsystem it has been clear for some time now that help is needed. Suzuki and Leo have worked extensively on various parts of the project and have agreed to help. While at it add the new location for the coresight git tree. Acked-by: Leo Yan Acked-by : Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201125223519.734388-1-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit b51c2c67ce028c64a863599dc6b96c382daa0658 Merge: 5ead67bd540eb 280ffdb6ddb5d Author: Dave Airlie Date: Thu Nov 26 17:58:04 2020 +1000 Merge tag 'drm-intel-fixes-2020-11-25' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix Perf/OA workaround register corruption (Lionel) - Correct a comment statement in GVT (Yan) - Fix GT enable/disable iterrupts, including a race condition that prevented GPU to go idle (Chris) - Free stale request on destroying the virtual engine (Chris) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20201126010623.GA827684@intel.com commit 5ead67bd540ebad55145e34c8983c2d5cf1efdf0 Merge: 030c5b52d4c12 60734bd54679d Author: Dave Airlie Date: Thu Nov 26 17:31:47 2020 +1000 Merge tag 'amd-drm-fixes-5.10-2020-11-25' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.10-2020-11-25: amdgpu: - Runtime pm fix - SI UVD suspend/resume fix - HDCP fix for headless cards - Sienna Cichlid golden register update Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201125151145.4263-1-alexander.deucher@amd.com commit 44f28934af141149959c4e6495bb60c1903bda32 Author: Mauro Carvalho Chehab Date: Tue Nov 24 11:27:42 2020 +0100 media: vidtv.rst: add kernel-doc markups Fix existing issues at the kernel-doc markups and add them to the vidtv.rst file. Signed-off-by: Mauro Carvalho Chehab commit 020120af21a643c6adaa4f090c3abf275e3edd68 Author: Mauro Carvalho Chehab Date: Thu Nov 19 12:17:49 2020 +0100 media: vidtv.rst: update vidtv documentation Update the vidtv documentation with the relevant changes after the last patches. Signed-off-by: Mauro Carvalho Chehab commit b087982886e24dd9b50457d4263910ae671be177 Author: Mauro Carvalho Chehab Date: Tue Nov 24 10:50:58 2020 +0100 media: vidtv: simplify EIT write function - pass struct vidtv_psi_eit_write_args as a pointer; - avoid initializing struct fields multiple times. Signed-off-by: Mauro Carvalho Chehab commit 5a5b9fb1a1117b2cf71a162309e370850a626dbf Author: Mauro Carvalho Chehab Date: Tue Nov 24 10:37:12 2020 +0100 media: vidtv: simplify NIT write function - pass struct vidtv_psi_nit_write_args as a pointer; - avoid initializing struct fields multiple times. Signed-off-by: Mauro Carvalho Chehab commit 6286a4b79b6cc5b4696145a1c3216d0c264efcf7 Author: Mauro Carvalho Chehab Date: Tue Nov 24 10:20:23 2020 +0100 media: vidtv: simplify SDT write function - pass struct vidtv_psi_sdt_write_args as a pointer; - avoid initializing struct fields multiple times. Signed-off-by: Mauro Carvalho Chehab commit db9569f67e2ea14f896d1a6303906294bef900ad Author: Mauro Carvalho Chehab Date: Tue Nov 24 09:58:31 2020 +0100 media: vidtv: cleanup PMT write table function - Pass struct vidtv_psi_pmt_write_args as a pointer; - Avoid initializing structs multiple times. Signed-off-by: Mauro Carvalho Chehab commit 7f957515191af5ad78f9905afad5fae584988986 Author: Mauro Carvalho Chehab Date: Tue Nov 24 09:45:49 2020 +0100 media: vidtv: cleanup PAT write function Avoid initializing the structs multiple times and pass the PAT struct as a pointer, instead of a var. Signed-off-by: Mauro Carvalho Chehab commit c570fb9ffc056124fe6dc7ea2c69ca3af3093116 Author: Mauro Carvalho Chehab Date: Tue Nov 24 09:33:44 2020 +0100 media: vidtv: cleanup PSI table header function - Pass struct header_write_args as a pointer, instead of passing as a var; - Initialize the psi_args struct only once. Signed-off-by: Mauro Carvalho Chehab commit 974ea17692b59e09c5d0af1a3bc09f45d1892ea4 Author: Mauro Carvalho Chehab Date: Tue Nov 24 09:25:00 2020 +0100 media: vidtv: cleanup PSI descriptor write function This function initializes the psi_args twice, and receives a struct, instead of a pointer to a struct. Clean it up. Signed-off-by: Mauro Carvalho Chehab commit 9e0067417b26f3d9a6e3292323a160f20620a468 Author: Mauro Carvalho Chehab Date: Tue Nov 24 08:54:58 2020 +0100 media: vidtv: simplify the crc writing logic Cleanup the table_section_crc32_write_into() function by initializing struct psi_write_args only once and by passing the args as a pointer. Signed-off-by: Mauro Carvalho Chehab commit 5edbd330e3a06557642ffb509cc2be39964e26a6 Author: Mauro Carvalho Chehab Date: Tue Nov 24 08:42:20 2020 +0100 media: vidtv: simplify PSI write function The function vidtv_psi_ts_psi_write_into() initializes the ts_header fields several times, and receives a struct as argument, instead of using a pointer to struct. Cleanup the function, in order to reduce its stack usage and to avoid initializing the ts_header multiple times. Signed-off-by: Mauro Carvalho Chehab commit 160028542bb15868c2da0b88bda6335dce221c1c Author: Mauro Carvalho Chehab Date: Mon Nov 23 16:57:49 2020 +0100 media: vidtv: add date to the current event The current event is using an undefined date. Instead, it should be the timestamp when the EIT table was generated. Signed-off-by: Mauro Carvalho Chehab commit bfa4aaebe8c097439feee65f8d39a3bb541b0aea Author: Mauro Carvalho Chehab Date: Mon Nov 23 18:40:29 2020 +0100 media: vidtv: fix service_id at SDT table The service_id there should be equal to the one used on other tables, otherwise, EIT entries won't be valid. Signed-off-by: Mauro Carvalho Chehab commit 11f4933f7bc955c16a54bf402383c5d7e4cfa8dc Author: Mauro Carvalho Chehab Date: Mon Nov 23 18:04:14 2020 +0100 media: vidtv: fix service type As the service currently broadcasts just audio, change the service type to reflect that. Signed-off-by: Mauro Carvalho Chehab commit 039b7caed173667eccd8725509f3995c661aae82 Author: Mauro Carvalho Chehab Date: Mon Nov 23 14:16:40 2020 +0100 media: vidtv: add a PID entry for the NIT table On normal TS streams, the NIT table has its own entry at PAT, but not at PMT. While here, properly handle alloc problems when creating PMT entries. Signed-off-by: Mauro Carvalho Chehab commit 91a8a240e2806c37eaf730347831f4a7de1535ac Author: Mauro Carvalho Chehab Date: Mon Nov 23 13:51:31 2020 +0100 media: vidtv: properly fill EIT service_id The EIT header ID field should not contain the network ID, but, instead, the service_id of the program described at EIT. Signed-off-by: Mauro Carvalho Chehab commit 1d2b2a6d8c599be2cbb1e984eeb970186694ef38 Author: Mauro Carvalho Chehab Date: Mon Nov 23 12:20:45 2020 +0100 media: vidtv: fix the network ID range As defined at ETSI TS 101 162, original network IDs up to 0xfebf are reserved for registration at dvb.org. Let's use, instead, an original network ID at the range 0xff00-0xffff, as this is for private temporary usage. As the same value is also used for the network ID, the range 0xff01-0xffff also fits better, as values lower than that depend if the network is used for satellite, terrestrial, cable of CI. While here, move the TS ID to the bridge code, where it is used, and change its value, as it was identical to the value previously used by network ID. While we could keep the same value, let's change it, just to make easier to check for the new code while reading it with DVB tools like dvbinspector. Signed-off-by: Mauro Carvalho Chehab commit b9e09e06e32e61269342e34f41321499da50d428 Author: Mauro Carvalho Chehab Date: Mon Nov 23 11:24:11 2020 +0100 media: vidtv: improve EIT data Place some text at EIT data, and use ISO 8859-15 encoding for the German letter "ü" (u mit umlat) letter. Signed-off-by: Mauro Carvalho Chehab commit ec3eda53f4aec2e1a9cd0df27c12c95e02f8aec0 Author: Mauro Carvalho Chehab Date: Fri Nov 20 11:15:24 2020 +0100 media: vidtv: cleanup null packet initialization logic Initialize the destination buffer/size and the initial offset when creating the local var. Signed-off-by: Mauro Carvalho Chehab commit c857b065abf9bd8f2064cbf82c03aba7277fe2e1 Author: Mauro Carvalho Chehab Date: Fri Nov 20 10:51:50 2020 +0100 media: vidtv: pre-initialize mux arrays Instead of first zeroing all fields at the mux structs and then filling, do some initialization for the const data when they're created. Signed-off-by: Mauro Carvalho Chehab commit 330d135679e55659448953c80753c33ef16383aa Author: Mauro Carvalho Chehab Date: Fri Nov 20 09:39:03 2020 +0100 media: vidtv: remove some unused functions Right now, there's no need to access the length of some tables. So, drop the unused functions. Signed-off-by: Mauro Carvalho Chehab commit a8bd461ca3b32468777d054d9a0e050be5a418e9 Author: Mauro Carvalho Chehab Date: Tue Sep 22 16:43:56 2020 +0200 media: vidtv: do some cleanups at the driver Do some cleanups at the coding style of the driver: - remove "inline" declarations; - use reverse xmas-tree for local var declarations; - Adjust some indent to avoid breaking 80-cols; - Cleanup some comments. No functional changes. Signed-off-by: Mauro Carvalho Chehab commit 2be65641642ef423f82162c3a5f28c754d1637d2 Author: Matti Hamalainen Date: Fri Nov 20 17:23:38 2020 +0200 drm/nouveau: fix relocations applying logic and a double-free Commit 03e0d26fcf79 ("drm/nouveau: slowpath for pushbuf ioctl") included a logic-bug which results in the relocations not actually getting applied at all as the call to nouveau_gem_pushbuf_reloc_apply() is never reached. This causes a regression with graphical corruption, triggered when relocations need to be done (for example after a suspend/resume cycle.) Fix by setting *apply_relocs value only if there were more than 0 relocations. Additionally, the never reached code had a leftover u_free() call, which, after fixing the logic, now got called and resulted in a double-free. Fix by removing one u_free(), moving the other and adding check for errors. Cc: Daniel Vetter Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Matti Hamalainen Fixes: 03e0d26fcf79 ("drm/nouveau: slowpath for pushbuf ioctl") References: https://gitlab.freedesktop.org/drm/nouveau/-/issues/11 Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201120152338.1203257-1-ccr@tnsp.org commit 163d72a2d3ec7e0bc41b943fed7667f7cbfc760f Author: Mauro Carvalho Chehab Date: Tue Sep 22 11:01:17 2020 +0200 media: vidtv: avoid copying data for PES structs Minimize the number of data copies and initialization at the code, passing them as pointers instead of duplicating the data. The only case where we're keeping the data copy is at vidtv_pes_write_h(), as it needs a copy of the passed arguments. On such case, we're being more explicit. Signed-off-by: Mauro Carvalho Chehab commit 0a33ab1682b44ac0b4128ada7ace9f7a0ef6b59c Author: Mauro Carvalho Chehab Date: Tue Sep 22 10:28:12 2020 +0200 media: vidtv: avoid data copy when initializing the multiplexer Initialize the fields of the arguments directly when declaring it, and pass the args as a pointer, instead of copying them. Signed-off-by: Mauro Carvalho Chehab commit 0d271a79c702d4b986809cb3acfbe8911bba892e Author: Mauro Carvalho Chehab Date: Thu Nov 19 11:20:38 2020 +0100 media: vidtv: fix some notes at the tone generator The sheet music used to generate the tones had a few polyphonic notes. Due to that, its conversion to a tones sequence had a few errors. Also, due to a bug at the tone generator, it was missing the pause at the initial compass. Fix them. While here, reduce the compass to 100bpm. The music was converted from a Music XML file using this small script: my $count = 0; my $silent = 0; my $note; my $octave; print "\t"; while (<>) { $note = $1 if (m,\(.*)\,); $octave = "_$1" if (m,\(.*)\,); if (m,\1\,) { $note .= "S"; $sharp = 1; } if (m,\,) { $note = "SILENT"; $silent = 1; } if (m,\(.*)\,) { printf "{ NOTE_${note}${octave}, %d},", $1 * 128 / 480; $count++; if ($silent || $count >= 3) { print "\n\t"; $count = 0; $silent = 0; } else { print " "; print " " if (!$sharp); } $sharp = 0; $note = ""; $octave = ""; }; }; print "\n"; Signed-off-by: Mauro Carvalho Chehab commit ab6bad0a4db69009fb7b2a50b8929b2bcaf7824d Author: Mauro Carvalho Chehab Date: Thu Nov 19 11:20:46 2020 +0100 media: vidtv: fix the tone generator logic The tone generator logic were repeating the song after the first silent. There's also a wrong logic at the note offset calculus, which may create some noise. Fix it. Signed-off-by: Mauro Carvalho Chehab commit af66e03edd4d46c7c37f6360dab3ed5953f36943 Author: Mauro Carvalho Chehab Date: Thu Nov 19 09:41:22 2020 +0100 media: vidtv: fix the name of the program While the original plan was to use the first movement of the 5th Symphony, it was opted to use the Für Elise song, instead. Fix it. Signed-off-by: Mauro Carvalho Chehab commit 31e82355a14ede525b96e1f300acebb29052915f Author: Mauro Carvalho Chehab Date: Tue Nov 17 17:38:36 2020 +0100 media: vidtv: don't use recursive functions The Linux stack is too short. So, using recursive functions is a very bad idea. Convert those into non-recursive ones. Signed-off-by: Mauro Carvalho Chehab commit 3be8037960bccd13052cfdeba8805ad785041d70 Author: Mauro Carvalho Chehab Date: Mon Sep 21 15:11:50 2020 +0200 media: vidtv: add error checks Currently, there are not checks if something gets bad during memory allocation: it will simply use NULL pointers and crash. Add error path at the logic which allocates memory for the MPEG-TS generator code, propagating the errors up to the vidtv_bridge. Now, if something wents bad, start_streaming will return an error that userspace can detect: ERROR DMX_SET_PES_FILTER failed (PID = 0x2000): 12 Cannot allocate memory and the driver doesn't crash. Signed-off-by: Mauro Carvalho Chehab commit 8922e3931dd79055bb3f851bed33f069fc67a2fc Author: Mauro Carvalho Chehab Date: Mon Sep 21 14:19:08 2020 +0200 media: vidtv: reorganize includes - Place the includes on alphabetical order; - get rid of asm/byteorder.h; - add bug.h at vidtv_s302m.c, as it is needed by inux/fixp-arith.h Signed-off-by: Mauro Carvalho Chehab commit c2b6ca661ae209ea3eeb71ea38ef3fa7dca9c3c1 Author: Daniel W. S. Almeida Date: Sat Oct 31 16:05:52 2020 +0100 media: vidtv: psi: fix missing assignments in while loops Some variables were only assigned once but were used in while loops as if they had been updated at every iteration. Fix this. Signed-off-by: Daniel W. S. Almeida Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 99b99d135ee3fd3a073556b5b646a69b1793f3a2 Author: Daniel W. S. Almeida Date: Sat Oct 31 16:05:51 2020 +0100 media: vidtv: Move s302m specific fields into encoder context A few fields used only by the tone generator in the s302m encoder are stored in struct vidtv_encoder. Move them into struct vidtv_s302m_ctx instead. While we are at it: fix a checkpatch warning for long lines. Signed-off-by: Daniel W. S. Almeida Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 84306c96b1c249d5eab6af9f86110a2d80b56010 Author: Daniel W. S. Almeida Date: Sat Oct 31 16:05:50 2020 +0100 media: vidtv: psi: extract descriptor chaining code into a helper The code to append a descriptor to the end of a chain is repeated throughout the psi generator code. Extract it into its own helper function to avoid cluttering. Signed-off-by: Daniel W. S. Almeida Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 7a7899f6f58e3270ccfd200ee63ebced5ddba3c9 Author: Daniel W. S. Almeida Date: Sat Oct 31 16:05:49 2020 +0100 media: vidtv: psi: Implement an Event Information Table (EIT) Implement an Event Information Table (EIT) as per EN 300 468 5.2.4. The EIT provides information in chronological order regarding the events contained within each service. For now only present event information is supported. [mchehab+huawei@kernel.org: removed an extra blank line] Signed-off-by: Daniel W. S. Almeida Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit c2f78f0cb294aa6f009d3a170f4ee8ad199ba5da Author: Daniel W. S. Almeida Date: Sat Oct 31 16:05:48 2020 +0100 media: vidtv: psi: add a Network Information Table (NIT) Add a Network Information Table (NIT) as specified in ETSI EN 300 468. This table conveys information relating to the physical organization of the multiplexes carried via a given network and the characteristics of the network itself. It is conveyed in the output of vidtv as packets with TS PID of 0x0010 [mchehab+huawei@kernel.org: removed an extra blank line] Signed-off-by: Daniel W. S. Almeida Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit dd6dbe8d7e312238cc0ad0b907042a96b0505d44 Author: Daniel W. S. Almeida Date: Sat Oct 31 16:05:47 2020 +0100 media: vidtv: extract the initial CRC value to into a #define The same constant (0xffffffff) is used in three different functions. Extract it into a #define to avoid repetition. Signed-off-by: Daniel W. S. Almeida Signed-off-by: Mauro Carvalho Chehab commit cbf3d60329c4e11edcecac0c8fc6767b0f05e3a7 Author: Rohit Maheshwari Date: Wed Nov 25 12:56:26 2020 +0530 ch_ktls: lock is not freed Currently lock gets freed only if timeout expires, but missed a case when HW returns failure and goes for cleanup. Fixes: efca3878a5fb ("ch_ktls: Issue if connection offload fails") Signed-off-by: Rohit Maheshwari Link: https://lore.kernel.org/r/20201125072626.10861-1-rohitm@chelsio.com Signed-off-by: Jakub Kicinski commit 025cc2fb6a4e84e9a0552c0017dcd1c24b7ac7da Author: Maxim Mikityanskiy Date: Wed Nov 25 14:18:10 2020 -0800 net/tls: Protect from calling tls_dev_del for TLS RX twice tls_device_offload_cleanup_rx doesn't clear tls_ctx->netdev after calling tls_dev_del if TLX TX offload is also enabled. Clearing tls_ctx->netdev gets postponed until tls_device_gc_task. It leaves a time frame when tls_device_down may get called and call tls_dev_del for RX one extra time, confusing the driver, which may lead to a crash. This patch corrects this racy behavior by adding a flag to prevent tls_device_down from calling tls_dev_del the second time. Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure") Signed-off-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20201125221810.69870-1-saeedm@nvidia.com Signed-off-by: Jakub Kicinski commit a060133c2058bcc5bf2f82e1135ce76b4bc9865b Merge: 3cb2e6d92be63 a7b43649507da Author: Jakub Kicinski Date: Wed Nov 25 17:26:37 2020 -0800 Merge branch 'devlink-port-attribute-fixes' Parav Pandit says: ==================== devlink port attribute fixes This patchset contains 2 small fixes for devlink port attributes. Patch summary: Patch-1 synchronize the devlink port attribute reader with net namespace change operation Patch-2 Ensure to return devlink port's netdevice attributes when netdev and devlink instance belong to same net namespace ==================== Link: https://lore.kernel.org/r/20201125091620.6781-1-parav@nvidia.com Signed-off-by: Jakub Kicinski commit a7b43649507dae4e55ff0087cad4e4dd1c6d5b99 Author: Parav Pandit Date: Wed Nov 25 11:16:20 2020 +0200 devlink: Make sure devlink instance and port are in same net namespace When devlink reload operation is not used, netdev of an Ethernet port may be present in different net namespace than the net namespace of the devlink instance. Ensure that both the devlink instance and devlink port netdev are located in same net namespace. Fixes: 070c63f20f6c ("net: devlink: allow to change namespaces during reload") Signed-off-by: Parav Pandit Signed-off-by: Jakub Kicinski commit b187c9b4178b87954dbc94e78a7094715794714f Author: Parav Pandit Date: Wed Nov 25 11:16:19 2020 +0200 devlink: Hold rtnl lock while reading netdev attributes A netdevice of a devlink port can be moved to different net namespace than its parent devlink instance. This scenario occurs when devlink reload is not used. When netdevice is undergoing migration to net namespace, its ifindex and name may change. In such use case, devlink port query may read stale netdev attributes. Fix it by reading them under rtnl lock. Fixes: bfcd3a466172 ("Introduce devlink infrastructure") Signed-off-by: Parav Pandit Signed-off-by: Jakub Kicinski commit 3cb2e6d92be637b79d6ba0746d610a8dfcc0400b Author: Min Li Date: Tue Nov 24 21:58:35 2020 -0500 ptp: clockmatrix: bug fix for idtcm_strverscmp Feed kstrtou8 with NULL terminated string. Changes since v1: -Use sscanf to get rid of adhoc string parse. Changes since v2: -Check if sscanf returns 3. Fixes: 7ea5fda2b132 ("ptp: ptp_clockmatrix: update to support 4.8.7 firmware") Signed-off-by: Min Li Link: https://lore.kernel.org/r/1606273115-25792-1-git-send-email-min.li.xe@renesas.com Signed-off-by: Jakub Kicinski commit 3d2a9d642512c21a12d19b9250e7a835dcb41a79 Author: Dennis Dalessandro Date: Wed Nov 25 16:01:12 2020 -0500 IB/hfi1: Ensure correct mm is used at all times Two earlier bug fixes have created a security problem in the hfi1 driver. One fix aimed to solve an issue where current->mm was not valid when closing the hfi1 cdev. It attempted to do this by saving a cached value of the current->mm pointer at file open time. This is a problem if another process with access to the FD calls in via write() or ioctl() to pin pages via the hfi driver. The other fix tried to solve a use after free by taking a reference on the mm. To fix this correctly we use the existing cached value of the mm in the mmu notifier. Now we can check in the insert, evict, etc. routines that current->mm matched what the notifier was registered for. If not, then don't allow access. The register of the mmu notifier will save the mm pointer. Since in do_exit() the exit_mm() is called before exit_files(), which would call our close routine a reference is needed on the mm. We rely on the mmgrab done by the registration of the notifier, whereas before it was explicit. The mmu notifier deregistration happens when the user context is torn down, the creation of which triggered the registration. Also of note is we do not do any explicit work to protect the interval tree notifier. It doesn't seem that this is going to be needed since we aren't actually doing anything with current->mm. The interval tree notifier stuff still has a FIXME noted from a previous commit that will be addressed in a follow on patch. Cc: Fixes: e0cf75deab81 ("IB/hfi1: Fix mm_struct use after free") Fixes: 3faa3d9a308e ("IB/hfi1: Make use of mm consistent") Link: https://lore.kernel.org/r/20201125210112.104301.51331.stgit@awfm-01.aw.intel.com Suggested-by: Jann Horn Reported-by: Jason Gunthorpe Reviewed-by: Ira Weiny Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit c0700dfa2cae44c033ed97dade8a2679c7d22a9d Author: Florian Westphal Date: Thu Nov 19 16:34:54 2020 +0100 netfilter: nf_tables: avoid false-postive lockdep splat There are reports wrt lockdep splat in nftables, e.g.: ------------[ cut here ]------------ WARNING: CPU: 2 PID: 31416 at net/netfilter/nf_tables_api.c:622 lockdep_nfnl_nft_mutex_not_held+0x28/0x38 [nf_tables] ... These are caused by an earlier, unrelated bug such as a n ABBA deadlock in a different subsystem. In such an event, lockdep is disabled and lockdep_is_held returns true unconditionally. This then causes the WARN() in nf_tables. Make the WARN conditional on lockdep still active to avoid this. Fixes: f102d66b335a417 ("netfilter: nf_tables: use dedicated mutex to guard transactions") Reported-by: Naresh Kamboju Link: https://lore.kernel.org/linux-kselftest/CA+G9fYvFUpODs+NkSYcnwKnXm62tmP=ksLeBPmB+KFrB2rvCtQ@mail.gmail.com/ Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 68ad89de918e1c5a79c9c56127e5e31741fd517e Author: Eric Dumazet Date: Thu Nov 19 01:59:32 2020 -0800 netfilter: ipset: prevent uninit-value in hash_ip6_add syzbot found that we are not validating user input properly before copying 16 bytes [1]. Using NLA_BINARY in ipaddr_policy[] for IPv6 address is not correct, since it ensures at most 16 bytes were provided. We should instead make sure user provided exactly 16 bytes. In old kernels (before v4.20), fix would be to remove the NLA_BINARY, since NLA_POLICY_EXACT_LEN() was not yet available. [1] BUG: KMSAN: uninit-value in hash_ip6_add+0x1cba/0x3a50 net/netfilter/ipset/ip_set_hash_gen.h:892 CPU: 1 PID: 11611 Comm: syz-executor.0 Not tainted 5.10.0-rc4-syzkaller #0 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+0x21c/0x280 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x5f/0xa0 mm/kmsan/kmsan_instr.c:197 hash_ip6_add+0x1cba/0x3a50 net/netfilter/ipset/ip_set_hash_gen.h:892 hash_ip6_uadt+0x976/0xbd0 net/netfilter/ipset/ip_set_hash_ip.c:267 call_ad+0x329/0xd00 net/netfilter/ipset/ip_set_core.c:1720 ip_set_ad+0x111f/0x1440 net/netfilter/ipset/ip_set_core.c:1808 ip_set_uadd+0xf6/0x110 net/netfilter/ipset/ip_set_core.c:1833 nfnetlink_rcv_msg+0xc7d/0xdf0 net/netfilter/nfnetlink.c:252 netlink_rcv_skb+0x70a/0x820 net/netlink/af_netlink.c:2494 nfnetlink_rcv+0x4f0/0x4380 net/netfilter/nfnetlink.c:600 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x11da/0x14b0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x173c/0x1840 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:671 [inline] ____sys_sendmsg+0xc7a/0x1240 net/socket.c:2353 ___sys_sendmsg net/socket.c:2407 [inline] __sys_sendmsg+0x6d5/0x830 net/socket.c:2440 __do_sys_sendmsg net/socket.c:2449 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2447 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2447 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 Code: 0d b4 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 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fe2e503fc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000029ec0 RCX: 000000000045deb9 RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000003 RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 000000000169fb7f R14: 00007fe2e50409c0 R15: 000000000118bf2c Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:121 [inline] kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:289 __msan_chain_origin+0x57/0xa0 mm/kmsan/kmsan_instr.c:147 ip6_netmask include/linux/netfilter/ipset/pfxlen.h:49 [inline] hash_ip6_netmask net/netfilter/ipset/ip_set_hash_ip.c:185 [inline] hash_ip6_uadt+0xb1c/0xbd0 net/netfilter/ipset/ip_set_hash_ip.c:263 call_ad+0x329/0xd00 net/netfilter/ipset/ip_set_core.c:1720 ip_set_ad+0x111f/0x1440 net/netfilter/ipset/ip_set_core.c:1808 ip_set_uadd+0xf6/0x110 net/netfilter/ipset/ip_set_core.c:1833 nfnetlink_rcv_msg+0xc7d/0xdf0 net/netfilter/nfnetlink.c:252 netlink_rcv_skb+0x70a/0x820 net/netlink/af_netlink.c:2494 nfnetlink_rcv+0x4f0/0x4380 net/netfilter/nfnetlink.c:600 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x11da/0x14b0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x173c/0x1840 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:671 [inline] ____sys_sendmsg+0xc7a/0x1240 net/socket.c:2353 ___sys_sendmsg net/socket.c:2407 [inline] __sys_sendmsg+0x6d5/0x830 net/socket.c:2440 __do_sys_sendmsg net/socket.c:2449 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2447 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2447 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:121 [inline] kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:289 kmsan_memcpy_memmove_metadata+0x25e/0x2d0 mm/kmsan/kmsan.c:226 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:246 __msan_memcpy+0x46/0x60 mm/kmsan/kmsan_instr.c:110 ip_set_get_ipaddr6+0x2cb/0x370 net/netfilter/ipset/ip_set_core.c:310 hash_ip6_uadt+0x439/0xbd0 net/netfilter/ipset/ip_set_hash_ip.c:255 call_ad+0x329/0xd00 net/netfilter/ipset/ip_set_core.c:1720 ip_set_ad+0x111f/0x1440 net/netfilter/ipset/ip_set_core.c:1808 ip_set_uadd+0xf6/0x110 net/netfilter/ipset/ip_set_core.c:1833 nfnetlink_rcv_msg+0xc7d/0xdf0 net/netfilter/nfnetlink.c:252 netlink_rcv_skb+0x70a/0x820 net/netlink/af_netlink.c:2494 nfnetlink_rcv+0x4f0/0x4380 net/netfilter/nfnetlink.c:600 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x11da/0x14b0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x173c/0x1840 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:671 [inline] ____sys_sendmsg+0xc7a/0x1240 net/socket.c:2353 ___sys_sendmsg net/socket.c:2407 [inline] __sys_sendmsg+0x6d5/0x830 net/socket.c:2440 __do_sys_sendmsg net/socket.c:2449 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2447 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2447 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:121 [inline] kmsan_internal_poison_shadow+0x5c/0xf0 mm/kmsan/kmsan.c:104 kmsan_slab_alloc+0x8d/0xe0 mm/kmsan/kmsan_hooks.c:76 slab_alloc_node mm/slub.c:2906 [inline] __kmalloc_node_track_caller+0xc61/0x15f0 mm/slub.c:4512 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0x309/0xae0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1094 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1176 [inline] netlink_sendmsg+0xdb8/0x1840 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:671 [inline] ____sys_sendmsg+0xc7a/0x1240 net/socket.c:2353 ___sys_sendmsg net/socket.c:2407 [inline] __sys_sendmsg+0x6d5/0x830 net/socket.c:2440 __do_sys_sendmsg net/socket.c:2449 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2447 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2447 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: a7b4f989a629 ("netfilter: ipset: IP set core support") Signed-off-by: Eric Dumazet Reported-by: syzbot Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 9a44bc9449cfe7e39dbadf537ff669fb007a9e63 Author: KP Singh Date: Wed Nov 25 20:24:04 2020 +0000 bpf: Add MAINTAINERS entry for BPF LSM Similar to XDP and some JITs, also add Brendan and Florent who have been reviewing all my patches internally as reviewers. The patches are expected as usual to go via the BPF tree(s) / list / merge workflows. Signed-off-by: KP Singh Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201125202404.1419509-1-kpsingh@chromium.org commit 90cf87d16bd566cff40c2bc8e32e6d4cd3af23f0 Author: Vladimir Oltean Date: Wed Nov 25 00:02:59 2020 +0200 enetc: Let the hardware auto-advance the taprio base-time of 0 The tc-taprio base time indicates the beginning of the tc-taprio schedule, which is cyclic by definition (where the length of the cycle in nanoseconds is called the cycle time). The base time is a 64-bit PTP time in the TAI domain. Logically, the base-time should be a future time. But that imposes some restrictions to user space, which has to retrieve the current PTP time from the NIC first, then calculate a base time that will still be larger than the base time by the time the kernel driver programs this value into the hardware. Actually ensuring that the programmed base time is in the future is still a problem even if the kernel alone deals with this. Luckily, the enetc hardware already advances a base-time that is in the past into a congruent time in the immediate future, according to the same formula that can be found in the software implementation of taprio (in taprio_get_start_time): /* Schedule the start time for the beginning of the next * cycle. */ n = div64_s64(ktime_sub_ns(now, base), cycle); *start = ktime_add_ns(base, (n + 1) * cycle); There's only one problem: the driver doesn't let the hardware do that. It interferes with the base-time passed from user space, by special-casing the situation when the base-time is zero, and replaces that with the current PTP time. This changes the intended effective base-time of the schedule, which will in the end have a different phase offset than if the base-time of 0.000000000 was to be advanced by an integer multiple of the cycle-time. Fixes: 34c6adf1977b ("enetc: Configure the Time-Aware Scheduler via tc-taprio offload") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201124220259.3027991-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 2543a6000e593a213fba5b504f52c07e09f39835 Author: Eric Dumazet Date: Tue Nov 24 12:38:22 2020 -0800 gro_cells: reduce number of synchronize_net() calls After cited commit, gro_cells_destroy() became damn slow on hosts with a lot of cores. This is because we have one additional synchronize_net() per cpu as stated in the changelog. gro_cells_init() is setting NAPI_STATE_NO_BUSY_POLL, and this was enough to not have one synchronize_net() call per netif_napi_del() We can factorize all the synchronize_net() to a single one, right before freeing per-cpu memory. Fixes: 5198d545dba8 ("net: remove napi_hash_del() from driver-facing API") Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20201124203822.1360107-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit 12a8fe56c0f06eaab1f9d89d246c3591bcc7a966 Author: Antonio Borneo Date: Tue Nov 24 23:37:29 2020 +0100 net: stmmac: fix incorrect merge of patch upstream Commit 757926247836 ("net: stmmac: add flexible PPS to dwmac 4.10a") was intended to modify the struct dwmac410_ops, but it got somehow badly merged and modified the struct dwmac4_ops. Revert the modification in struct dwmac4_ops and re-apply it properly in struct dwmac410_ops. Fixes: 757926247836 ("net: stmmac: add flexible PPS to dwmac 4.10a") Signed-off-by: Antonio Borneo Reported-by: Ahmad Fatoum Link: https://lore.kernel.org/r/20201124223729.886992-1-antonio.borneo@st.com Signed-off-by: Jakub Kicinski commit e255e11e66da8281e337e4e352956e8a4999fca4 Author: Wang Hai Date: Tue Nov 24 15:17:28 2020 +0800 ipv6: addrlabel: fix possible memory leak in ip6addrlbl_net_init kmemleak report a memory leak as follows: unreferenced object 0xffff8880059c6a00 (size 64): comm "ip", pid 23696, jiffies 4296590183 (age 1755.384s) hex dump (first 32 bytes): 20 01 00 10 00 00 00 00 00 00 00 00 00 00 00 00 ............... 1c 00 00 00 00 00 00 00 00 00 00 00 07 00 00 00 ................ backtrace: [<00000000aa4e7a87>] ip6addrlbl_add+0x90/0xbb0 [<0000000070b8d7f1>] ip6addrlbl_net_init+0x109/0x170 [<000000006a9ca9d4>] ops_init+0xa8/0x3c0 [<000000002da57bf2>] setup_net+0x2de/0x7e0 [<000000004e52d573>] copy_net_ns+0x27d/0x530 [<00000000b07ae2b4>] create_new_namespaces+0x382/0xa30 [<000000003b76d36f>] unshare_nsproxy_namespaces+0xa1/0x1d0 [<0000000030653721>] ksys_unshare+0x3a4/0x780 [<0000000007e82e40>] __x64_sys_unshare+0x2d/0x40 [<0000000031a10c08>] do_syscall_64+0x33/0x40 [<0000000099df30e7>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 We should free all rules when we catch an error in ip6addrlbl_net_init(). otherwise a memory leak will occur. Fixes: 2a8cc6c89039 ("[IPV6] ADDRCONF: Support RFC3484 configurable address selection policy table.") Reported-by: Hulk Robot Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20201124071728.8385-1-wanghai38@huawei.com Signed-off-by: Jakub Kicinski commit 33fc379df76b4991e5ae312f07bcd6820811971e Author: Anand K Mistry Date: Tue Nov 10 12:33:53 2020 +1100 x86/speculation: Fix prctl() when spectre_v2_user={seccomp,prctl},ibpb When spectre_v2_user={seccomp,prctl},ibpb is specified on the command line, IBPB is force-enabled and STIPB is conditionally-enabled (or not available). However, since 21998a351512 ("x86/speculation: Avoid force-disabling IBPB based on STIBP and enhanced IBRS.") the spectre_v2_user_ibpb variable is set to SPECTRE_V2_USER_{PRCTL,SECCOMP} instead of SPECTRE_V2_USER_STRICT, which is the actual behaviour. Because the issuing of IBPB relies on the switch_mm_*_ibpb static branches, the mitigations behave as expected. Since 1978b3a53a74 ("x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP") this discrepency caused the misreporting of IB speculation via prctl(). On CPUs with STIBP always-on and spectre_v2_user=seccomp,ibpb, prctl(PR_GET_SPECULATION_CTRL) would return PR_SPEC_PRCTL | PR_SPEC_ENABLE instead of PR_SPEC_DISABLE since both IBPB and STIPB are always on. It also allowed prctl(PR_SET_SPECULATION_CTRL) to set the IB speculation mode, even though the flag is ignored. Similarly, for CPUs without SMT, prctl(PR_GET_SPECULATION_CTRL) should also return PR_SPEC_DISABLE since IBPB is always on and STIBP is not available. [ bp: Massage commit message. ] Fixes: 21998a351512 ("x86/speculation: Avoid force-disabling IBPB based on STIBP and enhanced IBRS.") Fixes: 1978b3a53a74 ("x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP") Signed-off-by: Anand K Mistry Signed-off-by: Borislav Petkov Cc: Link: https://lkml.kernel.org/r/20201110123349.1.Id0cbf996d2151f4c143c90f9028651a5b49a5908@changeid commit fa02fcd94b0c8dff6cc65714510cf25ad194b90d Merge: 127c501a03d5d 9215f6bb4705f Author: Linus Torvalds Date: Wed Nov 25 10:35:44 2020 -0800 Merge tag 'media/v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - a rand Kconfig fixup for mtk-vcodec - a fix at h264 handling at cedrus codec driver - some warning fixes when config PM is not enabled at marvell-ccic - two fixes at venus codec driver: one related to codec profile and the other one related to a bad error path which causes an OOPS on module re-bind * tag 'media/v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: venus: pm_helpers: Fix kernel module reload media: venus: venc: Fix setting of profile and level media: cedrus: h264: Fix check for presence of scaling matrix media: media/platform/marvell-ccic: fix warnings when CONFIG_PM is not enabled media: mtk-vcodec: fix build breakage when one of VPU or SCP is enabled media: mtk-vcodec: move firmware implementations into their own files commit 30aca1bacb398dec6c1ed5eeca33f355bd7b6203 Author: Randy Dunlap Date: Mon Nov 16 17:39:51 2020 -0800 RISC-V: fix barrier() use in riscv's uses barrier() so it should include Fixes this build error: CC [M] drivers/net/ethernet/emulex/benet/be_main.o In file included from ./include/vdso/processor.h:10, from ./arch/riscv/include/asm/processor.h:11, from ./include/linux/prefetch.h:15, from drivers/net/ethernet/emulex/benet/be_main.c:14: ./arch/riscv/include/asm/vdso/processor.h: In function 'cpu_relax': ./arch/riscv/include/asm/vdso/processor.h:14:2: error: implicit declaration of function 'barrier' [-Werror=implicit-function-declaration] 14 | barrier(); This happens with a total of 5 networking drivers -- they all use . rv64 allmodconfig now builds cleanly after this patch. Fixes fallout from: 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") Fixes: ad5d1122b82f ("riscv: use vDSO common flow to reduce the latency of the time-related functions") Reported-by: Andreas Schwab Signed-off-by: Randy Dunlap Acked-by: Arvind Sankar Signed-off-by: Palmer Dabbelt Reviewed-by: Nick Desaulniers Signed-off-by: Palmer Dabbelt commit 6134b110f97178d6919441a82dc91a7f3664b4e0 Author: Anup Patel Date: Fri Nov 6 13:23:59 2020 +0530 RISC-V: Add missing jump label initialization The jump_label_init() should be called from setup_arch() very early for proper functioning of jump label support. Fixes: ebc00dde8a97 ("riscv: Add jump-label implementation") Signed-off-by: Anup Patel Signed-off-by: Palmer Dabbelt commit e553fdc8105ac2ef3f321739da3908bb6673f7de Author: Nathan Chancellor Date: Sun Nov 8 13:37:37 2020 -0700 riscv: Explicitly specify the build id style in vDSO Makefile again Commit a96843372331 ("kbuild: explicitly specify the build id style") explicitly set the build ID style to SHA1. Commit c2c81bb2f691 ("RISC-V: Fix the VDSO symbol generaton for binutils-2.35+") undid this change, likely unintentionally. Restore it so that the build ID style stays consistent across the tree regardless of linker. Fixes: c2c81bb2f691 ("RISC-V: Fix the VDSO symbol generaton for binutils-2.35+") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Reviewed-by: Bill Wendling Signed-off-by: Palmer Dabbelt commit f39e7d3aae2934b1cfdd209b54c508e2552e9531 Author: Bob Peterson Date: Tue Nov 24 10:41:40 2020 -0600 gfs2: Don't freeze the file system during unmount GFS2's freeze/thaw mechanism uses a special freeze glock to control its operation. It does this with a sync glock operation (glops.c) called freeze_go_sync. When the freeze glock is demoted (glock's do_xmote) the glops function causes the file system to be frozen. This is intended. However, GFS2's mount and unmount processes also hold the freeze glock to prevent other processes, perhaps on different cluster nodes, from mounting the frozen file system in read-write mode. Before this patch, there was no check in freeze_go_sync for whether a freeze in intended or whether the glock demote was caused by a normal unmount. So it was trying to freeze the file system it's trying to unmount, which ends up in a deadlock. This patch adds an additional check to freeze_go_sync so that demotes of the freeze glock are ignored if they come from the unmount process. Fixes: 20b329129009 ("gfs2: Fix regression in freeze_go_sync") Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 778721510e84209f78e31e2ccb296ae36d623f5e Author: Bob Peterson Date: Tue Nov 24 10:44:36 2020 -0500 gfs2: check for empty rgrp tree in gfs2_ri_update If gfs2 tries to mount a (corrupt) file system that has no resource groups it still tries to set preferences on the first one, which causes a kernel null pointer dereference. This patch adds a check to function gfs2_ri_update so this condition is detected and reported back as an error. Reported-by: syzbot+e3f23ce40269a4c9053a@syzkaller.appspotmail.com Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 36a237526cd81ff4b6829e6ebd60921c6f976e3b Author: Geert Uytterhoeven Date: Tue Nov 24 20:16:46 2020 +0100 efi: EFI_EARLYCON should depend on EFI CONFIG_EFI_EARLYCON defaults to yes, and thus is enabled on systems that do not support EFI, or do not have EFI support enabled, but do satisfy the symbol's other dependencies. While drivers/firmware/efi/ won't be entered during the build phase if CONFIG_EFI=n, and drivers/firmware/efi/earlycon.c itself thus won't be built, enabling EFI_EARLYCON does force-enable CONFIG_FONT_SUPPORT and CONFIG_ARCH_USE_MEMREMAP_PROT, and CONFIG_FONT_8x16, which is undesirable. Fix this by making CONFIG_EFI_EARLYCON depend on CONFIG_EFI. This reduces kernel size on headless systems by more than 4 KiB. Fixes: 69c1f396f25b805a ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201124191646.3559757-1-geert@linux-m68k.org Reviewed-by: Damien Le Moal Signed-off-by: Ard Biesheuvel commit ff04f3b6f2e27f8ae28a498416af2a8dd5072b43 Author: Ard Biesheuvel Date: Wed Nov 25 08:45:55 2020 +0100 efivarfs: revert "fix memory leak in efivarfs_create()" The memory leak addressed by commit fe5186cf12e3 is a false positive: all allocations are recorded in a linked list, and freed when the filesystem is unmounted. This leads to double frees, and as reported by David, leads to crashes if SLUB is configured to self destruct when double frees occur. So drop the redundant kfree() again, and instead, mark the offending pointer variable so the allocation is ignored by kmemleak. Cc: Vamshi K Sthambamkadi Fixes: fe5186cf12e3 ("efivarfs: fix memory leak in efivarfs_create()") Reported-by: David Laight Signed-off-by: Ard Biesheuvel commit 50bdcf047503e30126327d0be4f0ad7337106d68 Author: Amadeusz Sławiński Date: Mon Nov 23 12:28:17 2020 -0500 efi/efivars: Set generic ops before loading SSDT Efivars allows for overriding of SSDT tables, however starting with commit bf67fad19e493b ("efi: Use more granular check for availability for variable services") this use case is broken. When loading SSDT generic ops should be set first, however mentioned commit reversed order of operations. Fix this by restoring original order of operations. Fixes: bf67fad19e493b ("efi: Use more granular check for availability for variable services") Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20201123172817.124146-1-amadeuszx.slawinski@linux.intel.com Tested-by: Cezary Rojewski Signed-off-by: Ard Biesheuvel commit 2ed381439e89fa6d1a0839ef45ccd45d99d8e915 Author: Shiraz Saleem Date: Tue Nov 24 18:56:16 2020 -0600 RDMA/i40iw: Address an mmap handler exploit in i40iw i40iw_mmap manipulates the vma->vm_pgoff to differentiate a push page mmap vs a doorbell mmap, and uses it to compute the pfn in remap_pfn_range without any validation. This is vulnerable to an mmap exploit as described in: https://lore.kernel.org/r/20201119093523.7588-1-zhudi21@huawei.com The push feature is disabled in the driver currently and therefore no push mmaps are issued from user-space. The feature does not work as expected in the x722 product. Remove the push module parameter and all VMA attribute manipulations for this feature in i40iw_mmap. Update i40iw_mmap to only allow DB user mmapings at offset = 0. Check vm_pgoff for zero and if the mmaps are bound to a single page. Cc: Fixes: d37498417947 ("i40iw: add files for iwarp interface") Link: https://lore.kernel.org/r/20201125005616.1800-2-shiraz.saleem@intel.com Reported-by: Di Zhu Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit d98bccf10dd0f36cabee71a425381fce0908de3b Author: Jon Hunter Date: Wed Nov 18 16:04:58 2020 +0000 arm64: tegra: Fix Tegra234 VDK node names When the device-tree board file was added for the Tegra234 VDK simulator it incorrectly used the names 'cbb' and 'sdhci' instead of 'bus' and 'mmc', respectively. The names 'bus' and 'mmc' are required by the device-tree json-schema validation tools. Therefore, fix this by renaming these nodes accordingly. Fixes: 639448912ba1 ("arm64: tegra: Initial Tegra234 VDK support") Reported-by: Ashish Singhal Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 1741e18737948c140ccc4cc643e8126d95ee6e79 Author: Dipen Patel Date: Fri Sep 11 19:26:45 2020 -0700 arm64: tegra: Wrong AON HSP reg property size The AON HSP node's "reg" property size 0xa0000 will overlap with other resources. This patch fixes that wrong value with correct size 0x90000. Reviewed-by: Mikko Perttunen Signed-off-by: Dipen Patel Fixes: a38570c22e9d ("arm64: tegra: Add nodes for TCU on Tegra194") Signed-off-by: Thierry Reding commit f24a2acc15bcc7bbd295f9759efc873b88fbe429 Author: JC Kuo Date: Thu Nov 19 15:23:45 2020 +0800 arm64: tegra: Fix USB_VBUS_EN0 regulator on Jetson TX1 USB host mode is broken on the OTG port of Jetson TX1 platform because the USB_VBUS_EN0 regulator (regulator@11) is being overwritten by the vdd-cam-1v2 regulator. This commit rearranges USB_VBUS_EN0 to be regulator@14. Fixes: 257c8047be44 ("arm64: tegra: jetson-tx1: Add camera supplies") Cc: stable@vger.kernel.org Signed-off-by: JC Kuo Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 476e23f4c540949ac5ea4fad4f6f6fa0e2d41f42 Author: Jon Hunter Date: Wed Nov 11 10:41:17 2020 +0000 arm64: tegra: Correct the UART for Jetson Xavier NX The Jetson Xavier NX board routes UARTA to the 40-pin header and UARTC to a 12-pin debug header. The UARTs can be used by either the Tegra Combined UART (TCU) driver or the Tegra 8250 driver. By default, the TCU will use UARTC on Jetson Xavier NX. Currently, device-tree for Xavier NX enables the TCU and the Tegra 8250 node for UARTC. Fix this by disabling the Tegra 8250 node for UARTC and enabling the Tegra 8250 node for UARTA. Fixes: 3f9efbbe57bc ("arm64: tegra: Add support for Jetson Xavier NX") Cc: stable@vger.kernel.org Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit fb319496935b7475a863a00c76895e8bb3216704 Author: Jon Hunter Date: Mon Nov 16 16:20:26 2020 +0000 arm64: tegra: Disable the ACONNECT for Jetson TX2 Commit ff4c371d2bc0 ("arm64: defconfig: Build ADMA and ACONNECT driver") enable the Tegra ADMA and ACONNECT drivers and this is causing resume from system suspend to fail on Jetson TX2. Resume is failing because the ACONNECT driver is being resumed before the BPMP driver, and the ACONNECT driver is attempting to power on a power-domain that is provided by the BPMP. While a proper fix for the resume sequencing problem is identified, disable the ACONNECT for Jetson TX2 temporarily to avoid breaking system suspend. Please note that ACONNECT driver is used by the Audio Processing Engine (APE) on Tegra, but because there is no mainline support for APE on Jetson TX2 currently, disabling the ACONNECT does not disable any useful feature at the moment. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 0abdb0fba07322ce960d32a92a64847b3009b2e2 Author: Lars Povlsen Date: Fri Nov 20 22:34:14 2020 +0100 spi: dw: Fix spi registration for controllers overriding CS When SPI DW memory ops support was introduced, there was a check for excluding controllers which supplied their own CS function. Even so, the mem_ops pointer is *always* presented to the SPI core. This causes the SPI core sanity check in spi_controller_check_ops() to refuse registration, since a mem_ops pointer is being supplied without an exec_op member function. The end result is failure of the SPI DW driver on sparx5 and similar platforms. The fix in the core SPI DW driver is to avoid presenting the mem_ops pointer if the exec_op function is not set. Fixes: 6423207e57ea (spi: dw: Add memory operations support) Signed-off-by: Lars Povlsen Acked-by: Serge Semin Link: https://lore.kernel.org/r/20201120213414.339701-1-lars.povlsen@microchip.com Signed-off-by: Mark Brown commit 3fba05a2832f93b4d0cd4204f771fdae0d823114 Author: Luo Meng Date: Mon Nov 23 21:38:39 2020 +0800 ASoC: wm_adsp: fix error return code in wm_adsp_load() Fix to return a negative error code from the error handling case instead of 0 in function wm_adsp_load(), as done elsewhere in this function. Fixes: 170b1e123f38 ("ASoC: wm_adsp: Add support for new Halo core DSPs") Reported-by: Hulk Robot Signed-off-by: Luo Meng Acked-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20201123133839.4073787-1-luomeng12@huawei.com Signed-off-by: Mark Brown commit e2be2a833ab5338fa5b8b99ba622b911d96f1795 Author: Lu Baolu Date: Wed Nov 25 09:41:24 2020 +0800 x86/tboot: Don't disable swiotlb when iommu is forced on After commit 327d5b2fee91c ("iommu/vt-d: Allow 32bit devices to uses DMA domain"), swiotlb could also be used for direct memory access if IOMMU is enabled but a device is configured to pass through the DMA translation. Keep swiotlb when IOMMU is forced on, otherwise, some devices won't work if "iommu=pt" kernel parameter is used. Fixes: 327d5b2fee91 ("iommu/vt-d: Allow 32bit devices to uses DMA domain") Reported-and-tested-by: Adrian Huang Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20201125014124.4070776-1-baolu.lu@linux.intel.com Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=210237 Signed-off-by: Will Deacon commit fdeb17c70c9ecae655378761accf5a26a55a33cf Author: Hui Su Date: Wed Nov 25 00:52:05 2020 +0800 trace: fix potenial dangerous pointer The bdi_dev_name() returns a char [64], and the __entry->name is a char [32]. It maybe dangerous to TP_printk("%s", __entry->name) after the strncpy(). CC: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201124165205.GA23937@rlk Acked-by: Steven Rostedt (VMware) Acked-by: Tejun Heo Signed-off-by: Hui Su Signed-off-by: Jan Kara commit 853735e404244f5496cdb6188c5ed9a0f9627ee6 Author: Rui Miguel Silva Date: Fri Nov 13 15:06:04 2020 +0000 optee: add writeback to valid memory type Only in smp systems the cache policy is setup as write alloc, in single cpu systems the cache policy is set as writeback and it is normal memory, so, it should pass the is_normal_memory check in the share memory registration. Add the right condition to make it work in no smp systems. Fixes: cdbcf83d29c1 ("tee: optee: check type of registered shared memory") Signed-off-by: Rui Miguel Silva Signed-off-by: Jens Wiklander commit ad89653f79f1882d55d9df76c9b2b94f008c4e27 Author: Si-Wei Liu Date: Thu Nov 5 18:26:33 2020 -0500 vhost-vdpa: fix page pinning leakage in error path (rework) Pinned pages are not properly accounted particularly when mapping error occurs on IOTLB update. Clean up dangling pinned pages for the error path. The memory usage for bookkeeping pinned pages is reverted to what it was before: only one single free page is needed. This helps reduce the host memory demand for VM with a large amount of memory, or in the situation where host is running short of free memory. Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") Signed-off-by: Si-Wei Liu Link: https://lore.kernel.org/r/1604618793-4681-1-git-send-email-si-wei.liu@oracle.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 8009b0f4ab3151f3b8c1675ceb0f9151f09dddaa Author: Stefano Garzarella Date: Mon Nov 16 17:16:53 2020 +0100 vringh: fix vringh_iov_push_*() documentation vringh_iov_push_*() functions don't have 'dst' parameter, but have the 'src' parameter. Replace 'dst' description with 'src' description. Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201116161653.102904-1-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit b4fffc177fad3c99ee049611a508ca9561bb6871 Author: Mike Christie Date: Fri Nov 20 09:50:59 2020 -0600 vhost scsi: fix lun reset completion handling vhost scsi owns the scsi se_cmd but lio frees the se_cmd->se_tmr before calling release_cmd, so while with normal cmd completion we can access the se_cmd from the vhost work, we can't do the same with se_cmd->se_tmr. This has us copy the tmf response in vhost_scsi_queue_tm_rsp to our internal vhost-scsi tmf struct for when it gets sent to the guest from our worker thread. Fixes: efd838fec17b ("vhost scsi: Add support for LUN resets.") Signed-off-by: Mike Christie Acked-by: Stefan Hajnoczi Link: https://lore.kernel.org/r/1605887459-3864-1-git-send-email-michael.christie@oracle.com Signed-off-by: Michael S. Tsirkin commit 10e26e749fd0ba78a913548e2efeca1a157772da Author: Thomas Zimmermann Date: Tue Sep 22 16:46:55 2020 +0200 drm/ast: Reload gamma LUT after changing primary plane's color format The gamma LUT has to be reloaded after changing the primary plane's color format. This used to be done implicitly by the CRTC atomic_enable() helper after updating the primary plane. With the recent reordering of the steps, the primary plane's setup was moved last and invalidated the gamma LUT. Fix this by setting the LUT from within atomic_flush(). Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Fixes: 2f0ddd89fe32 ("drm/ast: Enable CRTC before planes") Cc: Thomas Zimmermann Cc: Daniel Vetter Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20200922144655.23624-1-tzimmermann@suse.de (cherry-picked from 8e3784dfef8a03143b13e7e4011f276a954f1bc6) commit 030c5b52d4c1225030891d25abfe376b6e239712 Author: xinhui pan Date: Fri Oct 23 13:41:12 2020 +0800 drm/amdgpu: Fix size calculation when init onchip memory Size is page count here. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1372 Reviewed-by: Christian König Signed-off-by: xinhui pan Signed-off-by: Alex Deucher (cherry picked from commit d836917da7e5ca9b33ef4d499972f1feeb519e00) [airlied: from drm-next] Signed-off-by: Dave Airlie commit 6f7a1f9c1af30f1eadc0ad9e77ec8ee95c48b2c9 Author: Jakub Kicinski Date: Tue Nov 24 20:15:24 2020 -0800 Documentation: netdev-FAQ: suggest how to post co-dependent series Make an explicit suggestion how to post user space side of kernel patches to avoid reposts when patchwork groups the wrong patches. v2: mention the cases unlike iproute2 explicitly Signed-off-by: Jakub Kicinski Reviewed-by: Florian Fainelli Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 855b69857830f8d918d715014f05e59a3f7491a0 Author: Luo Meng Date: Tue Nov 24 17:45:23 2020 -0800 Input: i8042 - fix error return code in i8042_setup_aux() Fix to return a negative error code from the error handling case instead of 0 in function i8042_setup_aux(), as done elsewhere in this function. Fixes: f81134163fc7 ("Input: i8042 - use platform_driver_probe") Reported-by: Hulk Robot Signed-off-by: Luo Meng Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20201123133420.4071187-1-luomeng12@huawei.com Signed-off-by: Dmitry Torokhov commit fa248db082270200863d254e0f39bbb29923d6b1 Author: Dmitry Torokhov Date: Tue Nov 24 17:42:57 2020 -0800 Input: soc_button_array - add missing include This fixes the following build errors: CC [M] drivers/input/misc/soc_button_array.o drivers/input/misc/soc_button_array.c:156:4: error: implicit declaration of function 'irq_set_irq_type' [-Werror,-Wimplicit-function-declaration] irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW); ^ drivers/input/misc/soc_button_array.c:156:26: error: use of undeclared identifier 'IRQ_TYPE_LEVEL_LOW' irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW); ^ 2 errors generated. Fixes: 78a5b53e9fb4 ("Input: soc_button_array - work around DSDTs which modify the irqflags") Reported-by: kernel test robot Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20201123061508.GA1009828@dtor-ws Signed-off-by: Dmitry Torokhov commit 26c8996526e8a49fb14ea8d0ae0d60bf82a25cdf Merge: 49d66ed819629 14a2e551faea5 Author: Jakub Kicinski Date: Tue Nov 24 16:49:14 2020 -0800 Merge tag 'batadv-net-pullrequest-20201124' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here is a batman-adv bugfix: - set module owner to THIS_MODULE, by Taehee Yoo * tag 'batadv-net-pullrequest-20201124' of git://git.open-mesh.org/linux-merge: batman-adv: set .owner to THIS_MODULE ==================== Link: https://lore.kernel.org/r/20201124134417.17269-1-sw@simonwunderlich.de Signed-off-by: Jakub Kicinski commit 49d66ed819629b2f82ff963420746015f241dfcb Merge: 5fc145f155827 3ada288150fb1 Author: Jakub Kicinski Date: Tue Nov 24 16:28:38 2020 -0800 Merge branch 'ibmvnic-null-pointer-dereference' Lijun Pan says: ==================== ibmvnic: null pointer dereference Fix two NULL pointer dereference crash issues. Improve module removal procedure. ==================== Link: https://lore.kernel.org/r/20201123193547.57225-1-ljp@linux.ibm.com Signed-off-by: Jakub Kicinski commit 3ada288150fb17ab3fcce2cf5fce20461f86b2ee Author: Lijun Pan Date: Mon Nov 23 13:35:47 2020 -0600 ibmvnic: enhance resetting status check during module exit Based on the discussion with Sukadev Bhattiprolu and Dany Madden, we believe that checking adapter->resetting bit is preferred since RESETTING state flag is not as strict as resetting bit. RESETTING state flag is removed since it is verbose now. Fixes: 7d7195a026ba ("ibmvnic: Do not process device remove during device reset") Signed-off-by: Lijun Pan Signed-off-by: Jakub Kicinski commit 0e435befaea45f7ea58682eecab5e37e05b2ce65 Author: Lijun Pan Date: Mon Nov 23 13:35:46 2020 -0600 ibmvnic: fix NULL pointer dereference in ibmvic_reset_crq crq->msgs could be NULL if the previous reset did not complete after freeing crq->msgs. Check for NULL before dereferencing them. Snippet of call trace: ... ibmvnic 30000003 env3 (unregistering): Releasing sub-CRQ ibmvnic 30000003 env3 (unregistering): Releasing CRQ BUG: Kernel NULL pointer dereference on read at 0x00000000 Faulting instruction address: 0xc0000000000c1a30 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: ibmvnic(E-) rpadlpar_io rpaphp xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_counter nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables xsk_diag tcp_diag udp_diag tun raw_diag inet_diag unix_diag bridge af_packet_diag netlink_diag stp llc rfkill sunrpc pseries_rng xts vmx_crypto uio_pdrv_genirq uio binfmt_misc ip_tables xfs libcrc32c sd_mod t10_pi sg ibmvscsi ibmveth scsi_transport_srp dm_mirror dm_region_hash dm_log dm_mod [last unloaded: ibmvnic] CPU: 20 PID: 8426 Comm: kworker/20:0 Tainted: G E 5.10.0-rc1+ #12 Workqueue: events __ibmvnic_reset [ibmvnic] NIP: c0000000000c1a30 LR: c008000001b00c18 CTR: 0000000000000400 REGS: c00000000d05b7a0 TRAP: 0380 Tainted: G E (5.10.0-rc1+) MSR: 800000000280b033 CR: 44002480 XER: 20040000 CFAR: c0000000000c19ec IRQMASK: 0 GPR00: 0000000000000400 c00000000d05ba30 c008000001b17c00 0000000000000000 GPR04: 0000000000000000 0000000000000000 0000000000000000 00000000000001e2 GPR08: 000000000001f400 ffffffffffffd950 0000000000000000 c008000001b0b280 GPR12: c0000000000c19c8 c00000001ec72e00 c00000000019a778 c00000002647b440 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000006 0000000000000001 0000000000000003 0000000000000002 GPR24: 0000000000001000 c008000001b0d570 0000000000000005 c00000007ab5d550 GPR28: c00000007ab5c000 c000000032fcf848 c00000007ab5cc00 c000000032fcf800 NIP [c0000000000c1a30] memset+0x68/0x104 LR [c008000001b00c18] ibmvnic_reset_crq+0x70/0x110 [ibmvnic] Call Trace: [c00000000d05ba30] [0000000000000800] 0x800 (unreliable) [c00000000d05bab0] [c008000001b0a930] do_reset.isra.40+0x224/0x634 [ibmvnic] [c00000000d05bb80] [c008000001b08574] __ibmvnic_reset+0x17c/0x3c0 [ibmvnic] [c00000000d05bc50] [c00000000018d9ac] process_one_work+0x2cc/0x800 [c00000000d05bd20] [c00000000018df58] worker_thread+0x78/0x520 [c00000000d05bdb0] [c00000000019a934] kthread+0x1c4/0x1d0 [c00000000d05be20] [c00000000000d5d0] ret_from_kernel_thread+0x5c/0x6c Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Lijun Pan Signed-off-by: Jakub Kicinski commit a0faaa27c71608799e0dd765c5af38a089091802 Author: Lijun Pan Date: Mon Nov 23 13:35:45 2020 -0600 ibmvnic: fix NULL pointer dereference in reset_sub_crq_queues adapter->tx_scrq and adapter->rx_scrq could be NULL if the previous reset did not complete after freeing sub crqs. Check for NULL before dereferencing them. Snippet of call trace: ibmvnic 30000006 env6: Releasing sub-CRQ ibmvnic 30000006 env6: Releasing CRQ ... ibmvnic 30000006 env6: Got Control IP offload Response ibmvnic 30000006 env6: Re-setting tx_scrq[0] BUG: Kernel NULL pointer dereference on read at 0x00000000 Faulting instruction address: 0xc008000003dea7cc Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: rpadlpar_io rpaphp xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_counter nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag tun bridge stp llc rfkill sunrpc pseries_rng xts vmx_crypto uio_pdrv_genirq uio binfmt_misc ip_tables xfs libcrc32c sd_mod t10_pi sg ibmvscsi ibmvnic ibmveth scsi_transport_srp dm_mirror dm_region_hash dm_log dm_mod CPU: 80 PID: 1856 Comm: kworker/80:2 Tainted: G W 5.8.0+ #4 Workqueue: events __ibmvnic_reset [ibmvnic] NIP: c008000003dea7cc LR: c008000003dea7bc CTR: 0000000000000000 REGS: c0000007ef7db860 TRAP: 0380 Tainted: G W (5.8.0+) MSR: 800000000280b033 CR: 28002422 XER: 0000000d CFAR: c000000000bd9520 IRQMASK: 0 GPR00: c008000003dea7bc c0000007ef7dbaf0 c008000003df7400 c0000007fa26ec00 GPR04: c0000007fcd0d008 c0000007fcd96350 0000000000000027 c0000007fcd0d010 GPR08: 0000000000000023 0000000000000000 0000000000000000 0000000000000000 GPR12: 0000000000002000 c00000001ec18e00 c0000000001982f8 c0000007bad6e840 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 0000000000000000 0000000000000000 fffffffffffffef7 GPR24: 0000000000000402 c0000007fa26f3a8 0000000000000003 c00000016f8ec048 GPR28: 0000000000000000 0000000000000000 0000000000000000 c0000007fa26ec00 NIP [c008000003dea7cc] ibmvnic_reset_init+0x15c/0x258 [ibmvnic] LR [c008000003dea7bc] ibmvnic_reset_init+0x14c/0x258 [ibmvnic] Call Trace: [c0000007ef7dbaf0] [c008000003dea7bc] ibmvnic_reset_init+0x14c/0x258 [ibmvnic] (unreliable) [c0000007ef7dbb80] [c008000003de8860] __ibmvnic_reset+0x408/0x970 [ibmvnic] [c0000007ef7dbc50] [c00000000018b7cc] process_one_work+0x2cc/0x800 [c0000007ef7dbd20] [c00000000018bd78] worker_thread+0x78/0x520 [c0000007ef7dbdb0] [c0000000001984c4] kthread+0x1d4/0x1e0 [c0000007ef7dbe20] [c00000000000cea8] ret_from_kernel_thread+0x5c/0x74 Fixes: 57a49436f4e8 ("ibmvnic: Reset sub-crqs during driver reset") Signed-off-by: Lijun Pan Signed-off-by: Jakub Kicinski commit 5fc145f1558274726e4ce85d5b0418ebfb5bf837 Merge: d8f0a86795c69 1396d3148bd25 Author: Jakub Kicinski Date: Tue Nov 24 16:07:16 2020 -0800 Merge branch 'fixes-for-ena-driver' Shay Agroskin says: ==================== Fixes for ENA driver - fix wrong data offset on machines that support rx offset - work-around Intel iommu issue - fix out of bound access when request id is wrong ==================== Link: https://lore.kernel.org/r/20201123190859.21298-1-shayagr@amazon.com Signed-off-by: Jakub Kicinski commit 1396d3148bd250db880573f9ed0abe5d6fba1fce Author: Shay Agroskin Date: Mon Nov 23 21:08:59 2020 +0200 net: ena: fix packet's addresses for rx_offset feature This patch fixes two lines in which the rx_offset received by the device wasn't taken into account: - prefetch function: In our driver the copied data would reside in rx_info->page + rx_headroom + rx_offset so the prefetch function is changed accordingly. - setting page_offset to zero for descriptors > 1: for every descriptor but the first, the rx_offset is zero. Hence the page_offset value should be set to rx_headroom. The previous implementation changed the value of rx_info after the descriptor was added to the SKB (essentially providing wrong page offset). Fixes: 68f236df93a9 ("net: ena: add support for the rx offset feature") Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit 09323b3bca95181c0da79daebc8b0603e500f573 Author: Shay Agroskin Date: Mon Nov 23 21:08:58 2020 +0200 net: ena: set initial DMA width to avoid intel iommu issue The ENA driver uses the readless mechanism, which uses DMA, to find out what the DMA mask is supposed to be. If DMA is used without setting the dma_mask first, it causes the Intel IOMMU driver to think that ENA is a 32-bit device and therefore disables IOMMU passthrough permanently. This patch sets the dma_mask to be ENA_MAX_PHYS_ADDR_SIZE_BITS=48 before readless initialization in ena_device_init()->ena_com_mmio_reg_read_request_init(), which is large enough to workaround the intel_iommu issue. DMA mask is set again to the correct value after it's received from the device after readless is initialized. The patch also changes the driver to use dma_set_mask_and_coherent() function instead of the two pci_set_dma_mask() and pci_set_consistent_dma_mask() ones. Both methods achieve the same effect. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Mike Cui Signed-off-by: Arthur Kiyanovski Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit 5b7022cf1dc0d721bd4b5f3bada05bd8ced82fe0 Author: Shay Agroskin Date: Mon Nov 23 21:08:57 2020 +0200 net: ena: handle bad request id in ena_netdev After request id is checked in validate_rx_req_id() its value is still used in the line rx_ring->free_ids[next_to_clean] = rx_ring->ena_bufs[i].req_id; even if it was found to be out-of-bound for the array free_ids. The patch moves the request id to an earlier stage in the napi routine and makes sure its value isn't used if it's found out-of-bounds. Fixes: 30623e1ed116 ("net: ena: avoid memory access violation by validating req_id properly") Signed-off-by: Ido Segev Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit 7032908cd5842af9710de4815a456241b5e6d2d1 Merge: 418baf2c28f34 74cde1a53368a Author: Thomas Gleixner Date: Wed Nov 25 00:56:28 2020 +0100 Merge tag 'irqchip-fixes-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: - Fix Exiu driver trigger type when using ACPI - Fix GICv3 ITS suspend/resume to use the in-kernel path at all times, sidestepping braindead firmware support Link: https://lore.kernel.org/r/20201122184752.553990-1-maz@kernel.org commit 127c501a03d5db8b833e953728d3bcf53c8832a9 Merge: 073861ed77b6b 1254100030b33 Author: Linus Torvalds Date: Tue Nov 24 15:33:18 2020 -0800 Merge tag '5.10-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Four smb3 fixes for stable: one fixes a memleak, the other three address a problem found with decryption offload that can cause a use after free" * tag '5.10-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb3: Handle error case during offload read path smb3: Avoid Mid pending list corruption smb3: Call cifs reconnect from demultiplex thread cifs: fix a memleak with modefromsid commit 073861ed77b6b957c3c8d54a11dc503f7d986ceb Author: Hugh Dickins Date: Tue Nov 24 08:46:43 2020 -0800 mm: fix VM_BUG_ON(PageTail) and BUG_ON(PageWriteback) Twice now, when exercising ext4 looped on shmem huge pages, I have crashed on the PF_ONLY_HEAD check inside PageWaiters(): ext4_finish_bio() calling end_page_writeback() calling wake_up_page() on tail of a shmem huge page, no longer an ext4 page at all. The problem is that PageWriteback is not accompanied by a page reference (as the NOTE at the end of test_clear_page_writeback() acknowledges): as soon as TestClearPageWriteback has been done, that page could be removed from page cache, freed, and reused for something else by the time that wake_up_page() is reached. https://lore.kernel.org/linux-mm/20200827122019.GC14765@casper.infradead.org/ Matthew Wilcox suggested avoiding or weakening the PageWaiters() tail check; but I'm paranoid about even looking at an unreferenced struct page, lest its memory might itself have already been reused or hotremoved (and wake_up_page_bit() may modify that memory with its ClearPageWaiters()). Then on crashing a second time, realized there's a stronger reason against that approach. If my testing just occasionally crashes on that check, when the page is reused for part of a compound page, wouldn't it be much more common for the page to get reused as an order-0 page before reaching wake_up_page()? And on rare occasions, might that reused page already be marked PageWriteback by its new user, and already be waited upon? What would that look like? It would look like BUG_ON(PageWriteback) after wait_on_page_writeback() in write_cache_pages() (though I have never seen that crash myself). Matthew Wilcox explaining this to himself: "page is allocated, added to page cache, dirtied, writeback starts, --- thread A --- filesystem calls end_page_writeback() test_clear_page_writeback() --- context switch to thread B --- truncate_inode_pages_range() finds the page, it doesn't have writeback set, we delete it from the page cache. Page gets reallocated, dirtied, writeback starts again. Then we call write_cache_pages(), see PageWriteback() set, call wait_on_page_writeback() --- context switch back to thread A --- wake_up_page(page, PG_writeback); ... thread B is woken, but because the wakeup was for the old use of the page, PageWriteback is still set. Devious" And prior to 2a9127fcf229 ("mm: rewrite wait_on_page_bit_common() logic") this would have been much less likely: before that, wake_page_function()'s non-exclusive case would stop walking and not wake if it found Writeback already set again; whereas now the non-exclusive case proceeds to wake. I have not thought of a fix that does not add a little overhead: the simplest fix is for end_page_writeback() to get_page() before calling test_clear_page_writeback(), then put_page() after wake_up_page(). Was there a chance of missed wakeups before, since a page freed before reaching wake_up_page() would have PageWaiters cleared? I think not, because each waiter does hold a reference on the page. This bug comes when the old use of the page, the one we do TestClearPageWriteback on, had *no* waiters, so no additional page reference beyond the page cache (and whoever racily freed it). The reuse of the page has a waiter holding a reference, and its own PageWriteback set; but the belated wake_up_page() has woken the reuse to hit that BUG_ON(PageWriteback). Reported-by: syzbot+3622cea378100f45d59f@syzkaller.appspotmail.com Reported-by: Qian Cai Fixes: 2a9127fcf229 ("mm: rewrite wait_on_page_bit_common() logic") Signed-off-by: Hugh Dickins Cc: stable@vger.kernel.org # v5.8+ Signed-off-by: Linus Torvalds commit d8f0a86795c69f5b697f7d9e5274c124da93c92d Author: Krzysztof Kozlowski Date: Mon Nov 23 17:23:51 2020 +0100 nfc: s3fwrn5: use signed integer for parsing GPIO numbers GPIOs - as returned by of_get_named_gpio() and used by the gpiolib - are signed integers, where negative number indicates error. The return value of of_get_named_gpio() should not be assigned to an unsigned int because in case of !CONFIG_GPIOLIB such number would be a valid GPIO. Fixes: c04c674fadeb ("nfc: s3fwrn5: Add driver for Samsung S3FWRN5 NFC Chip") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201123162351.209100-1-krzk@kernel.org Signed-off-by: Jakub Kicinski commit 078eb55cdf25e0a621d406c233cc1b4acc31c82f Author: Ezequiel Garcia Date: Mon Nov 23 18:35:53 2020 +0200 dpaa2-eth: Fix compile error due to missing devlink support The dpaa2 driver depends on devlink, so it should select NET_DEVLINK in order to fix compile errors, such as: drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.o: in function `dpaa2_eth_rx_err': dpaa2-eth.c:(.text+0x3cec): undefined reference to `devlink_trap_report' drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.o: in function `dpaa2_eth_dl_info_get': dpaa2-eth-devlink.c:(.text+0x160): undefined reference to `devlink_info_driver_name_put' Fixes: ceeb03ad8e22 ("dpaa2-eth: add basic devlink support") Signed-off-by: Ezequiel Garcia Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20201123163553.1666476-1-ciorneiioana@gmail.com Signed-off-by: Jakub Kicinski commit 515b269d5bd29a986d5e1c0a0cba87fa865a48b4 Author: Alexander Aring Date: Mon Nov 23 10:53:35 2020 -0500 gfs2: set lockdep subclass for iopen glocks This patch introduce a new globs attribute to define the subclass of the glock lockref spinlock. This avoid the following lockdep warning, which occurs when we lock an inode lock while an iopen lock is held: ============================================ WARNING: possible recursive locking detected 5.10.0-rc3+ #4990 Not tainted -------------------------------------------- kworker/0:1/12 is trying to acquire lock: ffff9067d45672d8 (&gl->gl_lockref.lock){+.+.}-{3:3}, at: lockref_get+0x9/0x20 but task is already holding lock: ffff9067da308588 (&gl->gl_lockref.lock){+.+.}-{3:3}, at: delete_work_func+0x164/0x260 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&gl->gl_lockref.lock); lock(&gl->gl_lockref.lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by kworker/0:1/12: #0: ffff9067c1bfdd38 ((wq_completion)delete_workqueue){+.+.}-{0:0}, at: process_one_work+0x1b7/0x540 #1: ffffac594006be70 ((work_completion)(&(&gl->gl_delete)->work)){+.+.}-{0:0}, at: process_one_work+0x1b7/0x540 #2: ffff9067da308588 (&gl->gl_lockref.lock){+.+.}-{3:3}, at: delete_work_func+0x164/0x260 stack backtrace: CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.10.0-rc3+ #4990 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 Workqueue: delete_workqueue delete_work_func Call Trace: dump_stack+0x8b/0xb0 __lock_acquire.cold+0x19e/0x2e3 lock_acquire+0x150/0x410 ? lockref_get+0x9/0x20 _raw_spin_lock+0x27/0x40 ? lockref_get+0x9/0x20 lockref_get+0x9/0x20 delete_work_func+0x188/0x260 process_one_work+0x237/0x540 worker_thread+0x4d/0x3b0 ? process_one_work+0x540/0x540 kthread+0x127/0x140 ? __kthread_bind_mask+0x60/0x60 ret_from_fork+0x22/0x30 Suggested-by: Andreas Gruenbacher Signed-off-by: Alexander Aring Signed-off-by: Andreas Gruenbacher commit 16e6281b6b22b0178eab95c6a82502d7b10f67b8 Author: Alexander Aring Date: Sun Nov 22 18:10:24 2020 -0500 gfs2: Fix deadlock dumping resource group glocks Commit 0e539ca1bbbe ("gfs2: Fix NULL pointer dereference in gfs2_rgrp_dump") introduced additional locking in gfs2_rgrp_go_dump, which is also used for dumping resource group glocks via debugfs. However, on that code path, the glock spin lock is already taken in dump_glock, and taking it again in gfs2_glock2rgrp leads to deadlock. This can be reproduced with: $ mkfs.gfs2 -O -p lock_nolock /dev/FOO $ mount /dev/FOO /mnt/foo $ touch /mnt/foo/bar $ cat /sys/kernel/debug/gfs2/FOO/glocks Fix that by not taking the glock spin lock inside the go_dump callback. Fixes: 0e539ca1bbbe ("gfs2: Fix NULL pointer dereference in gfs2_rgrp_dump") Signed-off-by: Alexander Aring Signed-off-by: Andreas Gruenbacher commit bc40a3691f15c0728209cd0e2dc9e8e18854187f Author: Jesper Dangaard Brouer Date: Mon Nov 23 14:42:26 2020 +0100 MAINTAINERS: Update page pool entry Add some file F: matches that is related to page_pool. Acked-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/r/160613894639.2826716.14635284017814375894.stgit@firesoul Signed-off-by: Jakub Kicinski commit 68878a5c5b852d17f5827ce8a0f6fbd8b4cdfada Author: Zhen Lei Date: Tue Nov 24 18:41:00 2020 +0800 bpftool: Fix error return value in build_btf_type_table An appropriate return value should be set on the failed path. Fixes: 4d374ba0bf30 ("tools: bpftool: implement "bpftool btf show|list"") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201124104100.491-1-thunder.leizhen@huawei.com commit 407c85c7ddd6b84d3cbdd2275616f70c27c17913 Author: Alexander Duyck Date: Fri Nov 20 19:47:44 2020 -0800 tcp: Set ECT0 bit in tos/tclass for synack when BPF needs ECN When a BPF program is used to select between a type of TCP congestion control algorithm that uses either ECN or not there is a case where the synack for the frame was coming up without the ECT0 bit set. A bit of research found that this was due to the final socket being configured to dctcp while the listener socket was staying in cubic. To reproduce it all that is needed is to monitor TCP traffic while running the sample bpf program "samples/bpf/tcp_cong_kern.c". What is observed, assuming tcp_dctcp module is loaded or compiled in and the traffic matches the rules in the sample file, is that for all frames with the exception of the synack the ECT0 bit is set. To address that it is necessary to make one additional call to tcp_bpf_ca_needs_ecn using the request socket and then use the output of that to set the ECT0 bit for the tos/tclass of the packet. Fixes: 91b5b21c7c16 ("bpf: Add support for changing congestion control") Signed-off-by: Alexander Duyck Link: https://lore.kernel.org/r/160593039663.2604.1374502006916871573.stgit@localhost.localdomain Signed-off-by: Jakub Kicinski commit 36ccdf85829a7dd6936dba5d02fa50138471f0d3 Author: Björn Töpel Date: Mon Nov 23 18:56:00 2020 +0100 net, xsk: Avoid taking multiple skbuff references Commit 642e450b6b59 ("xsk: Do not discard packet when NETDEV_TX_BUSY") addressed the problem that packets were discarded from the Tx AF_XDP ring, when the driver returned NETDEV_TX_BUSY. Part of the fix was bumping the skbuff reference count, so that the buffer would not be freed by dev_direct_xmit(). A reference count larger than one means that the skbuff is "shared", which is not the case. If the "shared" skbuff is sent to the generic XDP receive path, netif_receive_generic_xdp(), and pskb_expand_head() is entered the BUG_ON(skb_shared(skb)) will trigger. This patch adds a variant to dev_direct_xmit(), __dev_direct_xmit(), where a user can select the skbuff free policy. This allows AF_XDP to avoid bumping the reference count, but still keep the NETDEV_TX_BUSY behavior. Fixes: 642e450b6b59 ("xsk: Do not discard packet when NETDEV_TX_BUSY") Reported-by: Yonghong Song Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201123175600.146255-1-bjorn.topel@gmail.com commit 5204bb683c1633e550c2124ccc2358dd645a80db Author: Moshe Shemesh Date: Mon Nov 23 07:36:25 2020 +0200 devlink: Fix reload stats structure Fix reload stats structure exposed to the user. Change stats structure hierarchy to have the reload action as a parent of the stat entry and then stat entry includes value per limit. This will also help to avoid string concatenation on iproute2 output. Reload stats structure before this fix: "stats": { "reload": { "driver_reinit": 2, "fw_activate": 1, "fw_activate_no_reset": 0 } } After this fix: "stats": { "reload": { "driver_reinit": { "unspecified": 2 }, "fw_activate": { "unspecified": 1, "no_reset": 0 } } Fixes: a254c264267e ("devlink: Add reload stats") Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/1606109785-25197-1-git-send-email-moshe@mellanox.com Signed-off-by: Jakub Kicinski commit 80145ac2f739558e66bd8789df3414bc0e111c58 Merge: b1489422041ba 1179f170b6f0a Author: Linus Torvalds Date: Tue Nov 24 12:15:44 2020 -0800 Merge tag 's390-5.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fix from Heiko Carstens: "Disable interrupts when restoring fpu and vector registers, otherwise KVM guests might see corrupted register contents" * tag 's390-5.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: fix fpu restore in entry.S commit b1489422041ba58f224270480d8241be24f0f8dd Merge: d5beb3140f91b f737561c70966 Author: Linus Torvalds Date: Tue Nov 24 12:12:55 2020 -0800 Merge tag 'arc-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: "A couple more stack unwinder related fixes: - More stack unwinding updates - Misc minor fixes" * tag 'arc-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: stack unwinding: reorganize how initial register state setup ARC: stack unwinding: don't assume non-current task is sleeping ARC: mm: fix spelling mistakes ARC: bitops: Remove unecessary operation and value commit 9bd2702d292cb7b565b09e949d30288ab7a26d51 Author: Lincoln Ramsay Date: Mon Nov 23 21:40:43 2020 +0000 aquantia: Remove the build_skb path When performing IPv6 forwarding, there is an expectation that SKBs will have some headroom. When forwarding a packet from the aquantia driver, this does not always happen, triggering a kernel warning. aq_ring.c has this code (edited slightly for brevity): if (buff->is_eop && buff->len <= AQ_CFG_RX_FRAME_MAX - AQ_SKB_ALIGN) { skb = build_skb(aq_buf_vaddr(&buff->rxdata), AQ_CFG_RX_FRAME_MAX); } else { skb = napi_alloc_skb(napi, AQ_CFG_RX_HDR_SIZE); There is a significant difference between the SKB produced by these 2 code paths. When napi_alloc_skb creates an SKB, there is a certain amount of headroom reserved. However, this is not done in the build_skb codepath. As the hardware buffer that build_skb is built around does not handle the presence of the SKB header, this code path is being removed and the napi_alloc_skb path will always be used. This code path does have to copy the packet header into the SKB, but it adds the packet data as a frag. Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code") Signed-off-by: Lincoln Ramsay Link: https://lore.kernel.org/r/MWHPR1001MB23184F3EAFA413E0D1910EC9E8FC0@MWHPR1001MB2318.namprd10.prod.outlook.com Signed-off-by: Jakub Kicinski commit b8a9092330da2030496ff357272f342eb970d51b Author: Nick Desaulniers Date: Mon Nov 9 10:35:28 2020 -0800 Kbuild: do not emit debug info for assembly with LLVM_IAS=1 Clang's integrated assembler produces the warning for assembly files: warning: DWARF2 only supports one section per compilation unit If -Wa,-gdwarf-* is unspecified, then debug info is not emitted for assembly sources (it is still emitted for C sources). This will be re-enabled for newer DWARF versions in a follow up patch. Enables defconfig+CONFIG_DEBUG_INFO to build cleanly with LLVM=1 LLVM_IAS=1 for x86_64 and arm64. Cc: Link: https://github.com/ClangBuiltLinux/linux/issues/716 Reported-by: Dmitry Golovin Reported-by: Nathan Chancellor Suggested-by: Dmitry Golovin Suggested-by: Nathan Chancellor Suggested-by: Sedat Dilek Reviewed-by: Fangrui Song Reviewed-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Masahiro Yamada commit a716bd7432106aed82a751409d7be851a23022ac Author: Denys Zagorui Date: Mon Nov 2 04:08:53 2020 -0800 kbuild: use -fmacro-prefix-map for .S sources Follow-up to commit a73619a845d5 ("kbuild: use -fmacro-prefix-map to make __FILE__ a relative path"). Assembler sources also use __FILE__ macro so this flag should be also applied to those sources. Signed-off-by: Denys Zagorui Signed-off-by: Masahiro Yamada commit 095fbca0a94930b58f977284ef1b759b98700f8b Author: Arnd Bergmann Date: Mon Oct 26 23:03:13 2020 +0100 Makefile.extrawarn: move -Wcast-align to W=3 This warning behaves differently depending on the architecture and compiler. Using x86 gcc, we get no output at all because gcc knows the architecture can handle unaligned accesses. Using x86 clang, or gcc on an architecture that needs to manually deal with unaligned accesses, the build log is completely flooded with these warnings, as they are commonly invoked by inline functions of networking headers, e.g. include/linux/skbuff.h:1426:26: warning: cast increases required alignment of target type [-Wcast-align] The compiler is correct to point this out, as we are dealing with undefined behavior that does cause problems in practice, but there is also no good way to rewrite the code in commonly included headers to a safer method. Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit 60734bd54679d7998a24a257b0403f7644005572 Author: Likun Gao Date: Mon Nov 23 10:28:46 2020 +0800 drm/amdgpu: update golden setting for sienna_cichlid Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit d661155bfca329851a27bb5120fab027db43bd23 Author: Rodrigo Siqueira Date: Tue Nov 17 15:25:48 2020 -0500 drm/amd/display: Avoid HDCP initialization in devices without output The HDCP feature requires at least one connector attached to the device; however, some GPUs do not have a physical output, making the HDCP initialization irrelevant. This patch disables HDCP initialization when the graphic card does not have output. Acked-by: Alex Deucher Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 280ffdb6ddb5de85eddd476a3bcdc19c9a80f089 Author: Chris Wilson Date: Mon Nov 23 11:37:17 2020 +0000 drm/i915/gt: Free stale request on destroying the virtual engine Since preempt-to-busy, we may unsubmit a request while it is still on the HW and completes asynchronously. That means it may be retired and in the process destroy the virtual engine (as the user has closed their context), but that engine may still be holding onto the unsubmitted compelted request. Therefore we need to potentially cleanup the old request on destroying the virtual engine. We also have to keep the virtual_engine alive until after the sibling's execlists_dequeue() have finished peeking into the virtual engines, for which we serialise with RCU. v2: Be paranoid and flush the tasklet as well. v3: And flush the tasklet before the engines, as the tasklet may re-attach an rb_node after our removal from the siblings. Fixes: 6d06779e8672 ("drm/i915: Load balancing across a virtual engine") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201123113717.20500-4-chris@chris-wilson.co.uk (cherry picked from commit 46eecfccb4c2b0f258adbafb2e53ca3b822cd663) Signed-off-by: Rodrigo Vivi commit 2e6ce8313a53b757b28b288bf4bb930df786e899 Author: Chris Wilson Date: Mon Nov 23 11:37:16 2020 +0000 drm/i915/gt: Don't cancel the interrupt shadow too early We currently want to keep the interrupt enabled until the interrupt after which we have no more work to do. This heuristic was broken by us kicking the irq-work on adding a completed request without attaching a signaler -- hence it appearing to the irq-worker that an interrupt had fired when we were idle. Fixes: 2854d866327a ("drm/i915/gt: Replace intel_engine_transfer_stale_breadcrumbs") Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201123113717.20500-3-chris@chris-wilson.co.uk (cherry picked from commit 3aef910d26ef48b8a79d48b006dc04383b86dd31) Signed-off-by: Rodrigo Vivi commit eb0104ee498d7f83ff98b8783181613685b8df6e Author: Chris Wilson Date: Mon Nov 23 11:37:15 2020 +0000 drm/i915/gt: Track signaled breadcrumbs outside of the breadcrumb spinlock Make b->signaled_requests a lockless-list so that we can manipulate it outside of the b->irq_lock. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201123113717.20500-2-chris@chris-wilson.co.uk (cherry picked from commit 6cfe66eb71b638968350b5f0fff051fd25eb75fb) Signed-off-by: Rodrigo Vivi commit dbbf2728d50343b7947001a81f4c8cc98e4b44e5 Author: Sonny Jiang Date: Fri Nov 20 02:38:09 2020 -0500 drm/amdgpu: fix a page fault The UVD firmware is copied to cpu addr in uvd_resume, so it should be used after that. This is to fix a bug introduced by patch drm/amdgpu: fix SI UVD firmware validate resume fail. Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher CC: stable@vger.kernel.org commit 4d6a95366117b241bb3298e1c318a36ebb7544d0 Author: Sonny Jiang Date: Fri Nov 6 16:42:47 2020 -0500 drm/amdgpu: fix SI UVD firmware validate resume fail The SI UVD firmware validate key is stored at the end of firmware, which is changed during resume while playing video. So get the key at sw_init and store it for fw validate using. Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 7acc79eb5f78d3d1aa5dd21fc0a0329f1b7f2be5 Author: Kenneth Feng Date: Tue Nov 17 21:10:59 2020 +0800 drm/amd/amdgpu: fix null pointer in runtime pm fix the null pointer issue when runtime pm is triggered. Signed-off-by: Kenneth Feng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 08b49e14ec4f88f87a3a8443fca944dc2768066b Author: Chris Wilson Date: Mon Nov 23 11:37:14 2020 +0000 drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission Move the register slow register write and readback from out of the critical path for execlists submission and delay it until the following worker, shaving off around 200us. Note that the same signal_irq_work() is allowed to run concurrently on each CPU (but it will only be queued once, once running though it can be requeued and reexecuted) so we have to remember to lock the global interactions as we cannot rely on the signal_irq_work() itself providing the serialisation (in constrast to a tasklet). By pushing the arm/disarm into the central signaling worker we can close the race for disarming the interrupt (and dropping its associated GT wakeref) on parking the engine. If we loose the race, that GT wakeref may be held indefinitely, preventing the machine from sleeping while the GPU is ostensibly idle. v2: Move the self-arming parking of the signal_irq_work to a flush of the irq-work from intel_breadcrumbs_park(). Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2271 Fixes: e23005604b2f ("drm/i915/gt: Hold context/request reference while breadcrumbs are active") Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201123113717.20500-1-chris@chris-wilson.co.uk (cherry picked from commit 9d5612ca165a58aacc160465532e7998b9aab270) Signed-off-by: Rodrigo Vivi commit b5e420f4595003c8c4669b2274bc5fa3856fc1be Author: Yan Zhao Date: Thu Sep 10 11:54:05 2020 +0800 drm/i915/gvt: correct a false comment of flag F_UNALIGN Correct falsely removed comment of flag F_UNALIGN. Fixes: a6c5817a38cf ("drm/i915/gvt: remove flag F_CMD_ACCESSED") Reviewed-by: Zhenyu Wang Signed-off-by: Yan Zhao Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200910035405.20273-1-yan.y.zhao@intel.com (cherry picked from commit 6594094f819e0020e926e137e47e2edb97ba500b) Signed-off-by: Rodrigo Vivi commit 0305613dbcf42b6b27ddf516fea2738dfbfdb7c0 Author: Lionel Landwerlin Date: Tue Nov 17 15:01:24 2020 +0200 drm/i915/perf: workaround register corruption in OATAILPTR After having written the entire OA buffer with reports, the HW will write again at the beginning of the OA buffer. It'll indicate it by setting the WRAP bits in the OASTATUS register. When a wrap happens and that at the end of the read vfunc we write the OASTATUS register back to clear the REPORT_LOST bit, we sometimes see that the OATAILPTR register is reset to a previous position on Gen8/9 (apparently not the case on Gen11+). This leads the next call to the read vfunc to process reports we've already read. Because we've marked those as read by clearing the reason & timestamp dwords, they're discarded and a "Skipping spurious, invalid OA report" message is emitted. The workaround to avoid this OATAILPTR value reset seems to be to set the wrap bits when writing back OASTATUS. This change has no impact on userspace, it only avoids a bunch of DRM_NOTE("Skipping spurious, invalid OA report\n") messages. Signed-off-by: Lionel Landwerlin Fixes: 19f81df2859eb1 ("drm/i915/perf: Add OA unit support for Gen 8+") Reviewed-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20201117130124.829979-1-lionel.g.landwerlin@intel.com (cherry picked from commit 059a0beb486344a577ff476acce75e69eab704be) Signed-off-by: Rodrigo Vivi commit 6e1d2bc675bd57640f5658a4a657ae488db4c204 Author: Peter Zijlstra Date: Fri Nov 20 11:28:35 2020 +0100 intel_idle: Fix intel_idle() vs tracing cpuidle->enter() callbacks should not call into tracing because RCU has already been disabled. Instead of doing the broadcast thing itself, simply advertise to the cpuidle core that those states stop the timer. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rafael J. Wysocki Link: https://lkml.kernel.org/r/20201123143510.GR3021@hirez.programming.kicks-ass.net commit 58c644ba512cfbc2e39b758dd979edd1d6d00e27 Author: Peter Zijlstra Date: Fri Nov 20 11:50:35 2020 +0100 sched/idle: Fix arch_cpu_idle() vs tracing We call arch_cpu_idle() with RCU disabled, but then use local_irq_{en,dis}able(), which invokes tracing, which relies on RCU. Switch all arch_cpu_idle() implementations to use raw_local_irq_{en,dis}able() and carefully manage the lockdep,rcu,tracing state like we do in entry. (XXX: we really should change arch_cpu_idle() to not return with interrupts enabled) Reported-by: Sven Schnelle Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mark Rutland Tested-by: Mark Rutland Link: https://lkml.kernel.org/r/20201120114925.594122626@infradead.org commit 9c3a205c5ffa36e96903c2e37eb5f41c0f03c43e Author: Pavel Begunkov Date: Mon Nov 23 23:20:27 2020 +0000 io_uring: fix ITER_BVEC check iov_iter::type is a bitmask that also keeps direction etc., so it shouldn't be directly compared against ITER_*. Use proper helper. Fixes: ff6165b2d7f6 ("io_uring: retain iov_iter state over io_read/io_write calls") Reported-by: David Howells Signed-off-by: Pavel Begunkov Cc: # 5.9 Signed-off-by: Jens Axboe commit eb2667b343361863da7b79be26de641e22844ba0 Author: Joseph Qi Date: Tue Nov 24 15:03:03 2020 +0800 io_uring: fix shift-out-of-bounds when round up cq size Abaci Fuzz reported a shift-out-of-bounds BUG in io_uring_create(): [ 59.598207] UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13 [ 59.599665] shift exponent 64 is too large for 64-bit type 'long unsigned int' [ 59.601230] CPU: 0 PID: 963 Comm: a.out Not tainted 5.10.0-rc4+ #3 [ 59.602502] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 [ 59.603673] Call Trace: [ 59.604286] dump_stack+0x107/0x163 [ 59.605237] ubsan_epilogue+0xb/0x5a [ 59.606094] __ubsan_handle_shift_out_of_bounds.cold+0xb2/0x20e [ 59.607335] ? lock_downgrade+0x6c0/0x6c0 [ 59.608182] ? rcu_read_lock_sched_held+0xaf/0xe0 [ 59.609166] io_uring_create.cold+0x99/0x149 [ 59.610114] io_uring_setup+0xd6/0x140 [ 59.610975] ? io_uring_create+0x2510/0x2510 [ 59.611945] ? lockdep_hardirqs_on_prepare+0x286/0x400 [ 59.613007] ? syscall_enter_from_user_mode+0x27/0x80 [ 59.614038] ? trace_hardirqs_on+0x5b/0x180 [ 59.615056] do_syscall_64+0x2d/0x40 [ 59.615940] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 59.617007] RIP: 0033:0x7f2bb8a0b239 This is caused by roundup_pow_of_two() if the input entries larger enough, e.g. 2^32-1. For sq_entries, it will check first and we allow at most IORING_MAX_ENTRIES, so it is okay. But for cq_entries, we do round up first, that may overflow and truncate it to 0, which is not the expected behavior. So check the cq size first and then do round up. Fixes: 88ec3211e463 ("io_uring: round-up cq size before comparing with rounded sq size") Reported-by: Abaci Fuzz Signed-off-by: Joseph Qi Reviewed-by: Stefano Garzarella Signed-off-by: Jens Axboe commit a7361b9c4615951f52ffd2b1afa09a1384c7b4e4 Author: Adam Sampson Date: Mon Nov 23 17:47:39 2020 +0000 ARM: dts: sun7i: pcduino3-nano: enable RGMII RX/TX delay on PHY The RX/TX delays for the Ethernet PHY on the Linksprite pcDuino 3 Nano are configured in hardware, using resistors that are populated to pull the RTL8211E's RXDLY/TXDLY pins low or high as needed. phy-mode should be set to rgmii-id to reflect this. Previously it was set to rgmii, which used to work but now results in the delays being disabled again as a result of the bugfix in commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"). Tested on two pcDuino 3 Nano boards purchased in 2015. Without this fix, Ethernet works unreliably on one board and doesn't work at all on the other. Fixes: 061035d456c9 ("ARM: dts: sun7i: Add dts file for pcDuino 3 Nano board") Signed-off-by: Adam Sampson Signed-off-by: Maxime Ripard Reviewed-by: Andrew Lunn Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20201123174739.6809-1-ats@offog.org commit 7cd71202961090d8f2d2b863ec66b25ae43e1d39 Author: Clark Wang Date: Tue Nov 24 16:52:47 2020 +0800 spi: imx: fix the unbalanced spi runtime pm management If set active without increase the usage count of pm, the dont use autosuspend function will call the suspend callback to close the two clocks of spi because the usage count is reduced to -1. This will cause the warning dump below when the defer-probe occurs. [ 129.379701] ecspi2_root_clk already disabled [ 129.384005] WARNING: CPU: 1 PID: 33 at drivers/clk/clk.c:952 clk_core_disable+0xa4/0xb0 So add the get noresume function before set active. Fixes: 43b6bf406cd0 spi: imx: fix runtime pm support for !CONFIG_PM Signed-off-by: Clark Wang Link: https://lore.kernel.org/r/20201124085247.18025-1-xiaoning.wang@nxp.com Signed-off-by: Mark Brown commit acfdd18591eaac25446e976a0c0d190f8b3dbfb1 Author: Amit Sunil Dhamne Date: Mon Nov 23 21:52:41 2020 -0800 firmware: xilinx: Use hash-table for api feature check Currently array of fix length PM_API_MAX is used to cache the pm_api version (valid or invalid). However ATF based PM APIs values are much higher then PM_API_MAX. So to include ATF based PM APIs also, use hash-table to store the pm_api version status. Signed-off-by: Amit Sunil Dhamne Reported-by: Arnd Bergmann  Signed-off-by: Ravi Patel Signed-off-by: Rajan Vaja Reviewed-by: Arnd Bergmann Tested-by: Michal Simek Fixes: f3217d6f2f7a ("firmware: xilinx: fix out-of-bounds access") Cc: stable Link: https://lore.kernel.org/r/1606197161-25976-1-git-send-email-rajan.vaja@xilinx.com Signed-off-by: Michal Simek commit f4426311f927b01776edf8a45f6fad90feae4e72 Author: Manish Narani Date: Mon Nov 16 19:22:24 2020 +0530 firmware: xilinx: Fix SD DLL node reset issue Fix the SD DLL node reset issue where incorrect node is being referenced instead of SD DLL node. Fixes: 426c8d85df7a ("firmware: xilinx: Use APIs instead of IOCTLs") Signed-off-by: Manish Narani Link: https://lore.kernel.org/r/1605534744-15649-1-git-send-email-manish.narani@xilinx.com Signed-off-by: Michal Simek commit eeacd80fcb29b769ea915cd06b7dd35e0bf0bc25 Author: Jian-Hong Pan Date: Tue Nov 24 17:20:25 2020 +0800 ALSA: hda/realtek: Enable headset of ASUS UX482EG & B9400CEA with ALC294 Some laptops like ASUS UX482EG & B9400CEA's headset audio does not work until the quirk ALC294_FIXUP_ASUS_HPE is applied. Signed-off-by: Jian-Hong Pan Cc: Link: https://lore.kernel.org/r/20201124092024.179540-1-jhp@endlessos.org Signed-off-by: Takashi Iwai commit 758999246965eeb8b253d47e72f7bfe508804b16 Author: Xiaochen Shen Date: Sat Oct 31 03:11:28 2020 +0800 x86/resctrl: Add necessary kernfs_put() calls to prevent refcount leak On resource group creation via a mkdir an extra kernfs_node reference is obtained by kernfs_get() to ensure that the rdtgroup structure remains accessible for the rdtgroup_kn_unlock() calls where it is removed on deletion. Currently the extra kernfs_node reference count is only dropped by kernfs_put() in rdtgroup_kn_unlock() while the rdtgroup structure is removed in a few other locations that lack the matching reference drop. In call paths of rmdir and umount, when a control group is removed, kernfs_remove() is called to remove the whole kernfs nodes tree of the control group (including the kernfs nodes trees of all child monitoring groups), and then rdtgroup structure is freed by kfree(). The rdtgroup structures of all child monitoring groups under the control group are freed by kfree() in free_all_child_rdtgrp(). Before calling kfree() to free the rdtgroup structures, the kernfs node of the control group itself as well as the kernfs nodes of all child monitoring groups still take the extra references which will never be dropped to 0 and the kernfs nodes will never be freed. It leads to reference count leak and kernfs_node_cache memory leak. For example, reference count leak is observed in these two cases: (1) mount -t resctrl resctrl /sys/fs/resctrl mkdir /sys/fs/resctrl/c1 mkdir /sys/fs/resctrl/c1/mon_groups/m1 umount /sys/fs/resctrl (2) mkdir /sys/fs/resctrl/c1 mkdir /sys/fs/resctrl/c1/mon_groups/m1 rmdir /sys/fs/resctrl/c1 The same reference count leak issue also exists in the error exit paths of mkdir in mkdir_rdt_prepare() and rdtgroup_mkdir_ctrl_mon(). Fix this issue by following changes to make sure the extra kernfs_node reference on rdtgroup is dropped before freeing the rdtgroup structure. (1) Introduce rdtgroup removal helper rdtgroup_remove() to wrap up kernfs_put() and kfree(). (2) Call rdtgroup_remove() in rdtgroup removal path where the rdtgroup structure is about to be freed by kfree(). (3) Call rdtgroup_remove() or kernfs_put() as appropriate in the error exit paths of mkdir where an extra reference is taken by kernfs_get(). Fixes: f3cbeacaa06e ("x86/intel_rdt/cqm: Add rmdir support") Fixes: e02737d5b826 ("x86/intel_rdt: Add tasks files") Fixes: 60cf5e101fd4 ("x86/intel_rdt: Add mkdir to resctrl file system") Reported-by: Willem de Bruijn Signed-off-by: Xiaochen Shen Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1604085088-31707-1-git-send-email-xiaochen.shen@intel.com commit fd8d9db3559a29fd737bcdb7c4fcbe1940caae34 Author: Xiaochen Shen Date: Sat Oct 31 03:10:53 2020 +0800 x86/resctrl: Remove superfluous kernfs_get() calls to prevent refcount leak Willem reported growing of kernfs_node_cache entries in slabtop when repeatedly creating and removing resctrl subdirectories as well as when repeatedly mounting and unmounting the resctrl filesystem. On resource group (control as well as monitoring) creation via a mkdir an extra kernfs_node reference is obtained to ensure that the rdtgroup structure remains accessible for the rdtgroup_kn_unlock() calls where it is removed on deletion. The kernfs_node reference count is dropped by kernfs_put() in rdtgroup_kn_unlock(). With the above explaining the need for one kernfs_get()/kernfs_put() pair in resctrl there are more places where a kernfs_node reference is obtained without a corresponding release. The excessive amount of reference count on kernfs nodes will never be dropped to 0 and the kernfs nodes will never be freed in the call paths of rmdir and umount. It leads to reference count leak and kernfs_node_cache memory leak. Remove the superfluous kernfs_get() calls and expand the existing comments surrounding the remaining kernfs_get()/kernfs_put() pair that remains in use. Superfluous kernfs_get() calls are removed from two areas: (1) In call paths of mount and mkdir, when kernfs nodes for "info", "mon_groups" and "mon_data" directories and sub-directories are created, the reference count of newly created kernfs node is set to 1. But after kernfs_create_dir() returns, superfluous kernfs_get() are called to take an additional reference. (2) kernfs_get() calls in rmdir call paths. Fixes: 17eafd076291 ("x86/intel_rdt: Split resource group removal in two") Fixes: 4af4a88e0c92 ("x86/intel_rdt/cqm: Add mount,umount support") Fixes: f3cbeacaa06e ("x86/intel_rdt/cqm: Add rmdir support") Fixes: d89b7379015f ("x86/intel_rdt/cqm: Add mon_data") Fixes: c7d9aac61311 ("x86/intel_rdt/cqm: Add mkdir support for RDT monitoring") Fixes: 5dc1d5c6bac2 ("x86/intel_rdt: Simplify info and base file lists") Fixes: 60cf5e101fd4 ("x86/intel_rdt: Add mkdir to resctrl file system") Fixes: 4e978d06dedb ("x86/intel_rdt: Add "info" files to resctrl file system") Reported-by: Willem de Bruijn Signed-off-by: Xiaochen Shen Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Tested-by: Willem de Bruijn Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1604085053-31639-1-git-send-email-xiaochen.shen@intel.com commit a42a7ec9bb99a17869c3b9f3d365aaf2bdb1a554 Author: Muhammad Husaini Zulkifli Date: Wed Nov 18 20:01:20 2020 +0800 mmc: sdhci-of-arasan: Fix clock registration error for Keem Bay SOC The commit 16ada730a759 ("mmc: sdhci-of-arasan: Modify clock operations handling") introduced support for platform specific clock operations. Around the same point in time the commit 36c6aadaae86 ("mmc: sdhci-of-arasan: Add support for Intel Keem Bay") was also merged. Unfortunate it was not really tested on top of the previously mentioned commit, which causes clock registration failures for Keem Bay SOC devices. Let's fix this, by properly declaring the clock operation for Keem Bay SOC devices. Fixes: 36c6aadaae86 ("mmc: sdhci-of-arasan: Add support for Intel Keem Bay") Signed-off-by: Muhammad Husaini Zulkifli Reviewed-by: Adrian Hunter Link: https://lore.kernel.org/r/20201118120120.24908-2-muhammad.husaini.zulkifli@intel.com Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 903a72eca4abf241293dcc1385896fd428e15fe9 Author: yong mao Date: Thu Nov 19 11:02:37 2020 +0800 mmc: mediatek: Extend recheck_sdio_irq fix to more variants The SDIO recheck fix is required for more of the supported variants. Let's add it to those that needs it. Reported-by: Fabien Parent Reported-by: Mattijs Korpershoek Signed-off-by: Yong Mao Link: https://lore.kernel.org/r/20201119030237.9414-1-yong.mao@mediatek.com Fixes: 9e2582e57407 ("mmc: mediatek: fix SDIO irq issue") Cc: stable@vger.kernel.org [Ulf: Clarified commitmsg ] Signed-off-by: Ulf Hansson commit d549699048b4b5c22dd710455bcdb76966e55aa3 Author: Eyal Birger Date: Sat Nov 21 08:28:17 2020 +0200 net/packet: fix packet receive on L3 devices without visible hard header In the patchset merged by commit b9fcf0a0d826 ("Merge branch 'support-AF_PACKET-for-layer-3-devices'") L3 devices which did not have header_ops were given one for the purpose of protocol parsing on af_packet transmit path. That change made af_packet receive path regard these devices as having a visible L3 header and therefore aligned incoming skb->data to point to the skb's mac_header. Some devices, such as ipip, xfrmi, and others, do not reset their mac_header prior to ingress and therefore their incoming packets became malformed. Ideally these devices would reset their mac headers, or af_packet would be able to rely on dev->hard_header_len being 0 for such cases, but it seems this is not the case. Fix by changing af_packet RX ll visibility criteria to include the existence of a '.create()' header operation, which is used when creating a device hard header - via dev_hard_header() - by upper layers, and does not exist in these L3 devices. As this predicate may be useful in other situations, add it as a common dev_has_header() helper in netdevice.h. Fixes: b9fcf0a0d826 ("Merge branch 'support-AF_PACKET-for-layer-3-devices'") Signed-off-by: Eyal Birger Acked-by: Jason A. Donenfeld Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/20201121062817.3178900-1-eyal.birger@gmail.com Signed-off-by: Jakub Kicinski commit 2663b3388551230cbc4606a40fabf3331ceb59e4 Author: Hao Si Date: Tue Oct 20 10:18:32 2020 +0800 soc: fsl: dpio: Get the cpumask through cpumask_of(cpu) The local variable 'cpumask_t mask' is in the stack memory, and its address is assigned to 'desc->affinity' in 'irq_set_affinity_hint()'. But the memory area where this variable is located is at risk of being modified. During LTP testing, the following error was generated: Unable to handle kernel paging request at virtual address ffff000012e9b790 Mem abort info: ESR = 0x96000007 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000007 CM = 0, WnR = 0 swapper pgtable: 4k pages, 48-bit VAs, pgdp = 0000000075ac5e07 [ffff000012e9b790] pgd=00000027dbffe003, pud=00000027dbffd003, pmd=00000027b6d61003, pte=0000000000000000 Internal error: Oops: 96000007 [#1] PREEMPT SMP Modules linked in: xt_conntrack Process read_all (pid: 20171, stack limit = 0x0000000044ea4095) CPU: 14 PID: 20171 Comm: read_all Tainted: G B W Hardware name: NXP Layerscape LX2160ARDB (DT) pstate: 80000085 (Nzcv daIf -PAN -UAO) pc : irq_affinity_hint_proc_show+0x54/0xb0 lr : irq_affinity_hint_proc_show+0x4c/0xb0 sp : ffff00001138bc10 x29: ffff00001138bc10 x28: 0000ffffd131d1e0 x27: 00000000007000c0 x26: ffff8025b9480dc0 x25: ffff8025b9480da8 x24: 00000000000003ff x23: ffff8027334f8300 x22: ffff80272e97d000 x21: ffff80272e97d0b0 x20: ffff8025b9480d80 x19: ffff000009a49000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000040 x11: 0000000000000000 x10: ffff802735b79b88 x9 : 0000000000000000 x8 : 0000000000000000 x7 : ffff000009a49848 x6 : 0000000000000003 x5 : 0000000000000000 x4 : ffff000008157d6c x3 : ffff00001138bc10 x2 : ffff000012e9b790 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: irq_affinity_hint_proc_show+0x54/0xb0 seq_read+0x1b0/0x440 proc_reg_read+0x80/0xd8 __vfs_read+0x60/0x178 vfs_read+0x94/0x150 ksys_read+0x74/0xf0 __arm64_sys_read+0x24/0x30 el0_svc_common.constprop.0+0xd8/0x1a0 el0_svc_handler+0x34/0x88 el0_svc+0x10/0x14 Code: f9001bbf 943e0732 f94066c2 b4000062 (f9400041) ---[ end trace b495bdcb0b3b732b ]--- Kernel panic - not syncing: Fatal exception SMP: stopping secondary CPUs SMP: failed to stop secondary CPUs 0,2-4,6,8,11,13-15 Kernel Offset: disabled CPU features: 0x0,21006008 Memory Limit: none ---[ end Kernel panic - not syncing: Fatal exception ]--- Fix it by using 'cpumask_of(cpu)' to get the cpumask. Signed-off-by: Hao Si Signed-off-by: Lin Chen Signed-off-by: Yi Wang Signed-off-by: Li Yang commit 2980cbd4dce7b1e9bf57df3ced43a7b184986f50 Author: Sylwester Dziedziuch Date: Fri Nov 20 10:06:40 2020 -0800 i40e: Fix removing driver while bare-metal VFs pass traffic Prevent VFs from resetting when PF driver is being unloaded: - introduce new pf state: __I40E_VF_RESETS_DISABLED; - check if pf state has __I40E_VF_RESETS_DISABLED state set, if so, disable any further VFLR event notifications; - when i40e_remove (rmmod i40e) is called, disable any resets on the VFs; Previously if there were bare-metal VFs passing traffic and PF driver was removed, there was a possibility of VFs triggering a Tx timeout right before iavf_remove. This was causing iavf_close to not be called because there is a check in the beginning of iavf_remove that bails out early if adapter->state < IAVF_DOWN_PENDING. This makes it so some resources do not get cleaned up. Fixes: 6a9ddb36eeb8 ("i40e: disable IOV before freeing resources") Signed-off-by: Slawomir Laba Signed-off-by: Brett Creeley Signed-off-by: Sylwester Dziedziuch Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20201120180640.3654474-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 3fe356d58efae54dade9ec94ea7c919ed20cf4db Author: Stefano Garzarella Date: Fri Nov 20 11:47:36 2020 +0100 vsock/virtio: discard packets only when socket is really closed Starting from commit 8692cefc433f ("virtio_vsock: Fix race condition in virtio_transport_recv_pkt"), we discard packets in virtio_transport_recv_pkt() if the socket has been released. When the socket is connected, we schedule a delayed work to wait the RST packet from the other peer, also if SHUTDOWN_MASK is set in sk->sk_shutdown. This is done to complete the virtio-vsock shutdown algorithm, releasing the port assigned to the socket definitively only when the other peer has consumed all the packets. If we discard the RST packet received, the socket will be closed only when the VSOCK_CLOSE_TIMEOUT is reached. Sergio discovered the issue while running ab(1) HTTP benchmark using libkrun [1] and observing a latency increase with that commit. To avoid this issue, we discard packet only if the socket is really closed (SOCK_DONE flag is set). We also set SOCK_DONE in virtio_transport_release() when we don't need to wait any packets from the other peer (we didn't schedule the delayed work). In this case we remove the socket from the vsock lists, releasing the port assigned. [1] https://github.com/containers/libkrun Fixes: 8692cefc433f ("virtio_vsock: Fix race condition in virtio_transport_recv_pkt") Cc: justin.he@arm.com Reported-by: Sergio Lopez Tested-by: Sergio Lopez Signed-off-by: Stefano Garzarella Acked-by: Jia He Link: https://lore.kernel.org/r/20201120104736.73749-1-sgarzare@redhat.com Signed-off-by: Jakub Kicinski commit 01770a166165738a6e05c3d911fb4609cc4eb416 Author: Ricardo Dias Date: Fri Nov 20 11:11:33 2020 +0000 tcp: fix race condition when creating child sockets from syncookies When the TCP stack is in SYN flood mode, the server child socket is created from the SYN cookie received in a TCP packet with the ACK flag set. The child socket is created when the server receives the first TCP packet with a valid SYN cookie from the client. Usually, this packet corresponds to the final step of the TCP 3-way handshake, the ACK packet. But is also possible to receive a valid SYN cookie from the first TCP data packet sent by the client, and thus create a child socket from that SYN cookie. Since a client socket is ready to send data as soon as it receives the SYN+ACK packet from the server, the client can send the ACK packet (sent by the TCP stack code), and the first data packet (sent by the userspace program) almost at the same time, and thus the server will equally receive the two TCP packets with valid SYN cookies almost at the same instant. When such event happens, the TCP stack code has a race condition that occurs between the momement a lookup is done to the established connections hashtable to check for the existence of a connection for the same client, and the moment that the child socket is added to the established connections hashtable. As a consequence, this race condition can lead to a situation where we add two child sockets to the established connections hashtable and deliver two sockets to the userspace program to the same client. This patch fixes the race condition by checking if an existing child socket exists for the same client when we are adding the second child socket to the established connections socket. If an existing child socket exists, we drop the packet and discard the second child socket to the same client. Signed-off-by: Ricardo Dias Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20201120111133.GA67501@rdias-suse-pc.lan Signed-off-by: Jakub Kicinski commit d5beb3140f91b1c8a3d41b14d729aefa4dcc58bc Merge: 418baf2c28f34 5f1251a48c17b Author: Linus Torvalds Date: Mon Nov 23 15:29:03 2020 -0800 Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull Hyper-V fix from Wei Liu: "One patch from Dexuan to fix VRAM cache type in Hyper-V framebuffer driver" * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: video: hyperv_fb: Fix the cache type when mapping the VRAM commit 1eae77bfad7a0ded0f70d56f360ca59571a8cf4d Merge: f9b036532108d fe56d05ee6c87 Author: Jakub Kicinski Date: Mon Nov 23 14:59:40 2020 -0800 Merge tag 'wireless-drivers-2020-11-23' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.10 First set of fixes for v5.10. One fix for iwlwifi kernel panic, others less notable. rtw88 * fix a bogus test found by clang iwlwifi * fix long memory reads causing soft lockup warnings * fix kernel panic during Channel Switch Announcement (CSA) * other smaller fixes MAINTAINERS * email address updates * tag 'wireless-drivers-2020-11-23' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers: iwlwifi: mvm: fix kernel panic in case of assert during CSA iwlwifi: pcie: set LTR to avoid completion timeout iwlwifi: mvm: write queue_sync_state only for sync iwlwifi: mvm: properly cancel a session protection for P2P iwlwifi: mvm: use the HOT_SPOT_CMD to cancel an AUX ROC iwlwifi: sta: set max HE max A-MPDU according to HE capa MAINTAINERS: update maintainers list for Cypress MAINTAINERS: update Yan-Hsuan's email address iwlwifi: pcie: limit memory read spin time rtw88: fix fw_fifo_addr check ==================== Link: https://lore.kernel.org/r/20201123161037.C11D1C43460@smtp.codeaurora.org Signed-off-by: Jakub Kicinski commit 6830ff853a5764c75e56750d59d0bbb6b26f1835 Author: Xiongfeng Wang Date: Fri Nov 20 09:57:02 2020 +0800 IB/mthca: fix return value of error branch in mthca_init_cq() We return 'err' in the error branch, but this variable may be set as zero by the above code. Fix it by setting 'err' as a negative value before we goto the error label. Fixes: 74c2174e7be5 ("IB uverbs: add mthca user CQ support") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Link: https://lore.kernel.org/r/1605837422-42724-1-git-send-email-wangxiongfeng2@huawei.com Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Signed-off-by: Jason Gunthorpe commit a855fbe69229078cd8aecd8974fb996a5ca651e6 Author: Filipe Manana Date: Mon Nov 23 18:31:02 2020 +0000 btrfs: fix lockdep splat when enabling and disabling qgroups When running test case btrfs/017 from fstests, lockdep reported the following splat: [ 1297.067385] ====================================================== [ 1297.067708] WARNING: possible circular locking dependency detected [ 1297.068022] 5.10.0-rc4-btrfs-next-73 #1 Not tainted [ 1297.068322] ------------------------------------------------------ [ 1297.068629] btrfs/189080 is trying to acquire lock: [ 1297.068929] ffff9f2725731690 (sb_internal#2){.+.+}-{0:0}, at: btrfs_quota_enable+0xaf/0xa70 [btrfs] [ 1297.069274] but task is already holding lock: [ 1297.069868] ffff9f2702b61a08 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x3b/0xa70 [btrfs] [ 1297.070219] which lock already depends on the new lock. [ 1297.071131] the existing dependency chain (in reverse order) is: [ 1297.071721] -> #1 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}: [ 1297.072375] lock_acquire+0xd8/0x490 [ 1297.072710] __mutex_lock+0xa3/0xb30 [ 1297.073061] btrfs_qgroup_inherit+0x59/0x6a0 [btrfs] [ 1297.073421] create_subvol+0x194/0x990 [btrfs] [ 1297.073780] btrfs_mksubvol+0x3fb/0x4a0 [btrfs] [ 1297.074133] __btrfs_ioctl_snap_create+0x119/0x1a0 [btrfs] [ 1297.074498] btrfs_ioctl_snap_create+0x58/0x80 [btrfs] [ 1297.074872] btrfs_ioctl+0x1a90/0x36f0 [btrfs] [ 1297.075245] __x64_sys_ioctl+0x83/0xb0 [ 1297.075617] do_syscall_64+0x33/0x80 [ 1297.075993] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 1297.076380] -> #0 (sb_internal#2){.+.+}-{0:0}: [ 1297.077166] check_prev_add+0x91/0xc60 [ 1297.077572] __lock_acquire+0x1740/0x3110 [ 1297.077984] lock_acquire+0xd8/0x490 [ 1297.078411] start_transaction+0x3c5/0x760 [btrfs] [ 1297.078853] btrfs_quota_enable+0xaf/0xa70 [btrfs] [ 1297.079323] btrfs_ioctl+0x2c60/0x36f0 [btrfs] [ 1297.079789] __x64_sys_ioctl+0x83/0xb0 [ 1297.080232] do_syscall_64+0x33/0x80 [ 1297.080680] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 1297.081139] other info that might help us debug this: [ 1297.082536] Possible unsafe locking scenario: [ 1297.083510] CPU0 CPU1 [ 1297.084005] ---- ---- [ 1297.084500] lock(&fs_info->qgroup_ioctl_lock); [ 1297.084994] lock(sb_internal#2); [ 1297.085485] lock(&fs_info->qgroup_ioctl_lock); [ 1297.085974] lock(sb_internal#2); [ 1297.086454] *** DEADLOCK *** [ 1297.087880] 3 locks held by btrfs/189080: [ 1297.088324] #0: ffff9f2725731470 (sb_writers#14){.+.+}-{0:0}, at: btrfs_ioctl+0xa73/0x36f0 [btrfs] [ 1297.088799] #1: ffff9f2702b60cc0 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_ioctl+0x1f4d/0x36f0 [btrfs] [ 1297.089284] #2: ffff9f2702b61a08 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x3b/0xa70 [btrfs] [ 1297.089771] stack backtrace: [ 1297.090662] CPU: 5 PID: 189080 Comm: btrfs Not tainted 5.10.0-rc4-btrfs-next-73 #1 [ 1297.091132] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 1297.092123] Call Trace: [ 1297.092629] dump_stack+0x8d/0xb5 [ 1297.093115] check_noncircular+0xff/0x110 [ 1297.093596] check_prev_add+0x91/0xc60 [ 1297.094076] ? kvm_clock_read+0x14/0x30 [ 1297.094553] ? kvm_sched_clock_read+0x5/0x10 [ 1297.095029] __lock_acquire+0x1740/0x3110 [ 1297.095510] lock_acquire+0xd8/0x490 [ 1297.095993] ? btrfs_quota_enable+0xaf/0xa70 [btrfs] [ 1297.096476] start_transaction+0x3c5/0x760 [btrfs] [ 1297.096962] ? btrfs_quota_enable+0xaf/0xa70 [btrfs] [ 1297.097451] btrfs_quota_enable+0xaf/0xa70 [btrfs] [ 1297.097941] ? btrfs_ioctl+0x1f4d/0x36f0 [btrfs] [ 1297.098429] btrfs_ioctl+0x2c60/0x36f0 [btrfs] [ 1297.098904] ? do_user_addr_fault+0x20c/0x430 [ 1297.099382] ? kvm_clock_read+0x14/0x30 [ 1297.099854] ? kvm_sched_clock_read+0x5/0x10 [ 1297.100328] ? sched_clock+0x5/0x10 [ 1297.100801] ? sched_clock_cpu+0x12/0x180 [ 1297.101272] ? __x64_sys_ioctl+0x83/0xb0 [ 1297.101739] __x64_sys_ioctl+0x83/0xb0 [ 1297.102207] do_syscall_64+0x33/0x80 [ 1297.102673] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 1297.103148] RIP: 0033:0x7f773ff65d87 This is because during the quota enable ioctl we lock first the mutex qgroup_ioctl_lock and then start a transaction, and starting a transaction acquires a fs freeze semaphore (at the VFS level). However, every other code path, except for the quota disable ioctl path, we do the opposite: we start a transaction and then lock the mutex. So fix this by making the quota enable and disable paths to start the transaction without having the mutex locked, and then, after starting the transaction, lock the mutex and check if some other task already enabled or disabled the quotas, bailing with success if that was the case. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7aa6d359845a9dbf7ad90b0b1b6347ef4764621f Author: Filipe Manana Date: Mon Nov 23 18:30:54 2020 +0000 btrfs: do nofs allocations when adding and removing qgroup relations When adding or removing a qgroup relation we are doing a GFP_KERNEL allocation which is not safe because we are holding a transaction handle open and that can make us deadlock if the allocator needs to recurse into the filesystem. So just surround those calls with a nofs context. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3d05cad3c357a2b749912914356072b38435edfa Author: Filipe Manana Date: Mon Nov 23 14:28:44 2020 +0000 btrfs: fix lockdep splat when reading qgroup config on mount Lockdep reported the following splat when running test btrfs/190 from fstests: [ 9482.126098] ====================================================== [ 9482.126184] WARNING: possible circular locking dependency detected [ 9482.126281] 5.10.0-rc4-btrfs-next-73 #1 Not tainted [ 9482.126365] ------------------------------------------------------ [ 9482.126456] mount/24187 is trying to acquire lock: [ 9482.126534] ffffa0c869a7dac0 (&fs_info->qgroup_rescan_lock){+.+.}-{3:3}, at: qgroup_rescan_init+0x43/0xf0 [btrfs] [ 9482.126647] but task is already holding lock: [ 9482.126777] ffffa0c892ebd3a0 (btrfs-quota-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x27/0x120 [btrfs] [ 9482.126886] which lock already depends on the new lock. [ 9482.127078] the existing dependency chain (in reverse order) is: [ 9482.127213] -> #1 (btrfs-quota-00){++++}-{3:3}: [ 9482.127366] lock_acquire+0xd8/0x490 [ 9482.127436] down_read_nested+0x45/0x220 [ 9482.127528] __btrfs_tree_read_lock+0x27/0x120 [btrfs] [ 9482.127613] btrfs_read_lock_root_node+0x41/0x130 [btrfs] [ 9482.127702] btrfs_search_slot+0x514/0xc30 [btrfs] [ 9482.127788] update_qgroup_status_item+0x72/0x140 [btrfs] [ 9482.127877] btrfs_qgroup_rescan_worker+0xde/0x680 [btrfs] [ 9482.127964] btrfs_work_helper+0xf1/0x600 [btrfs] [ 9482.128039] process_one_work+0x24e/0x5e0 [ 9482.128110] worker_thread+0x50/0x3b0 [ 9482.128181] kthread+0x153/0x170 [ 9482.128256] ret_from_fork+0x22/0x30 [ 9482.128327] -> #0 (&fs_info->qgroup_rescan_lock){+.+.}-{3:3}: [ 9482.128464] check_prev_add+0x91/0xc60 [ 9482.128551] __lock_acquire+0x1740/0x3110 [ 9482.128623] lock_acquire+0xd8/0x490 [ 9482.130029] __mutex_lock+0xa3/0xb30 [ 9482.130590] qgroup_rescan_init+0x43/0xf0 [btrfs] [ 9482.131577] btrfs_read_qgroup_config+0x43a/0x550 [btrfs] [ 9482.132175] open_ctree+0x1228/0x18a0 [btrfs] [ 9482.132756] btrfs_mount_root.cold+0x13/0xed [btrfs] [ 9482.133325] legacy_get_tree+0x30/0x60 [ 9482.133866] vfs_get_tree+0x28/0xe0 [ 9482.134392] fc_mount+0xe/0x40 [ 9482.134908] vfs_kern_mount.part.0+0x71/0x90 [ 9482.135428] btrfs_mount+0x13b/0x3e0 [btrfs] [ 9482.135942] legacy_get_tree+0x30/0x60 [ 9482.136444] vfs_get_tree+0x28/0xe0 [ 9482.136949] path_mount+0x2d7/0xa70 [ 9482.137438] do_mount+0x75/0x90 [ 9482.137923] __x64_sys_mount+0x8e/0xd0 [ 9482.138400] do_syscall_64+0x33/0x80 [ 9482.138873] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 9482.139346] other info that might help us debug this: [ 9482.140735] Possible unsafe locking scenario: [ 9482.141594] CPU0 CPU1 [ 9482.142011] ---- ---- [ 9482.142411] lock(btrfs-quota-00); [ 9482.142806] lock(&fs_info->qgroup_rescan_lock); [ 9482.143216] lock(btrfs-quota-00); [ 9482.143629] lock(&fs_info->qgroup_rescan_lock); [ 9482.144056] *** DEADLOCK *** [ 9482.145242] 2 locks held by mount/24187: [ 9482.145637] #0: ffffa0c8411c40e8 (&type->s_umount_key#44/1){+.+.}-{3:3}, at: alloc_super+0xb9/0x400 [ 9482.146061] #1: ffffa0c892ebd3a0 (btrfs-quota-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x27/0x120 [btrfs] [ 9482.146509] stack backtrace: [ 9482.147350] CPU: 1 PID: 24187 Comm: mount Not tainted 5.10.0-rc4-btrfs-next-73 #1 [ 9482.147788] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 9482.148709] Call Trace: [ 9482.149169] dump_stack+0x8d/0xb5 [ 9482.149628] check_noncircular+0xff/0x110 [ 9482.150090] check_prev_add+0x91/0xc60 [ 9482.150561] ? kvm_clock_read+0x14/0x30 [ 9482.151017] ? kvm_sched_clock_read+0x5/0x10 [ 9482.151470] __lock_acquire+0x1740/0x3110 [ 9482.151941] ? __btrfs_tree_read_lock+0x27/0x120 [btrfs] [ 9482.152402] lock_acquire+0xd8/0x490 [ 9482.152887] ? qgroup_rescan_init+0x43/0xf0 [btrfs] [ 9482.153354] __mutex_lock+0xa3/0xb30 [ 9482.153826] ? qgroup_rescan_init+0x43/0xf0 [btrfs] [ 9482.154301] ? qgroup_rescan_init+0x43/0xf0 [btrfs] [ 9482.154768] ? qgroup_rescan_init+0x43/0xf0 [btrfs] [ 9482.155226] qgroup_rescan_init+0x43/0xf0 [btrfs] [ 9482.155690] btrfs_read_qgroup_config+0x43a/0x550 [btrfs] [ 9482.156160] open_ctree+0x1228/0x18a0 [btrfs] [ 9482.156643] btrfs_mount_root.cold+0x13/0xed [btrfs] [ 9482.157108] ? rcu_read_lock_sched_held+0x5d/0x90 [ 9482.157567] ? kfree+0x31f/0x3e0 [ 9482.158030] legacy_get_tree+0x30/0x60 [ 9482.158489] vfs_get_tree+0x28/0xe0 [ 9482.158947] fc_mount+0xe/0x40 [ 9482.159403] vfs_kern_mount.part.0+0x71/0x90 [ 9482.159875] btrfs_mount+0x13b/0x3e0 [btrfs] [ 9482.160335] ? rcu_read_lock_sched_held+0x5d/0x90 [ 9482.160805] ? kfree+0x31f/0x3e0 [ 9482.161260] ? legacy_get_tree+0x30/0x60 [ 9482.161714] legacy_get_tree+0x30/0x60 [ 9482.162166] vfs_get_tree+0x28/0xe0 [ 9482.162616] path_mount+0x2d7/0xa70 [ 9482.163070] do_mount+0x75/0x90 [ 9482.163525] __x64_sys_mount+0x8e/0xd0 [ 9482.163986] do_syscall_64+0x33/0x80 [ 9482.164437] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 9482.164902] RIP: 0033:0x7f51e907caaa This happens because at btrfs_read_qgroup_config() we can call qgroup_rescan_init() while holding a read lock on a quota btree leaf, acquired by the previous call to btrfs_search_slot_for_read(), and qgroup_rescan_init() acquires the mutex qgroup_rescan_lock. A qgroup rescan worker does the opposite: it acquires the mutex qgroup_rescan_lock, at btrfs_qgroup_rescan_worker(), and then tries to update the qgroup status item in the quota btree through the call to update_qgroup_status_item(). This inversion of locking order between the qgroup_rescan_lock mutex and quota btree locks causes the splat. Fix this simply by releasing and freeing the path before calling qgroup_rescan_init() at btrfs_read_qgroup_config(). CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6d06b0ad94d3dd7e3503d8ad39c39c4634884611 Author: David Sterba Date: Mon Nov 16 19:53:52 2020 +0100 btrfs: tree-checker: add missing returns after data_ref alignment checks There are sectorsize alignment checks that are reported but then check_extent_data_ref continues. This was not intended, wrong alignment is not a minor problem and we should return with error. CC: stable@vger.kernel.org # 5.4+ Fixes: 0785a9aacf9d ("btrfs: tree-checker: Add EXTENT_DATA_REF check") Reviewed-by: Qu Wenruo Signed-off-by: David Sterba commit 0697d9a610998b8bdee6b2390836cb2391d8fd1a Author: Johannes Thumshirn Date: Wed Nov 18 18:03:26 2020 +0900 btrfs: don't access possibly stale fs_info data for printing duplicate device Syzbot reported a possible use-after-free when printing a duplicate device warning device_list_add(). At this point it can happen that a btrfs_device::fs_info is not correctly setup yet, so we're accessing stale data, when printing the warning message using the btrfs_printk() wrappers. ================================================================== BUG: KASAN: use-after-free in btrfs_printk+0x3eb/0x435 fs/btrfs/super.c:245 Read of size 8 at addr ffff8880878e06a8 by task syz-executor225/7068 CPU: 1 PID: 7068 Comm: syz-executor225 Not tainted 5.9.0-rc5-syzkaller #0 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+0x1d6/0x29e lib/dump_stack.c:118 print_address_description+0x66/0x620 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report+0x132/0x1d0 mm/kasan/report.c:530 btrfs_printk+0x3eb/0x435 fs/btrfs/super.c:245 device_list_add+0x1a88/0x1d60 fs/btrfs/volumes.c:943 btrfs_scan_one_device+0x196/0x490 fs/btrfs/volumes.c:1359 btrfs_mount_root+0x48f/0xb60 fs/btrfs/super.c:1634 legacy_get_tree+0xea/0x180 fs/fs_context.c:592 vfs_get_tree+0x88/0x270 fs/super.c:1547 fc_mount fs/namespace.c:978 [inline] vfs_kern_mount+0xc9/0x160 fs/namespace.c:1008 btrfs_mount+0x33c/0xae0 fs/btrfs/super.c:1732 legacy_get_tree+0xea/0x180 fs/fs_context.c:592 vfs_get_tree+0x88/0x270 fs/super.c:1547 do_new_mount fs/namespace.c:2875 [inline] path_mount+0x179d/0x29e0 fs/namespace.c:3192 do_mount fs/namespace.c:3205 [inline] __do_sys_mount fs/namespace.c:3413 [inline] __se_sys_mount+0x126/0x180 fs/namespace.c:3390 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x44840a RSP: 002b:00007ffedfffd608 EFLAGS: 00000293 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffedfffd670 RCX: 000000000044840a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffedfffd630 RBP: 00007ffedfffd630 R08: 00007ffedfffd670 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 000000000000001a R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003 Allocated by task 6945: kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc+0x100/0x130 mm/kasan/common.c:461 kmalloc_node include/linux/slab.h:577 [inline] kvmalloc_node+0x81/0x110 mm/util.c:574 kvmalloc include/linux/mm.h:757 [inline] kvzalloc include/linux/mm.h:765 [inline] btrfs_mount_root+0xd0/0xb60 fs/btrfs/super.c:1613 legacy_get_tree+0xea/0x180 fs/fs_context.c:592 vfs_get_tree+0x88/0x270 fs/super.c:1547 fc_mount fs/namespace.c:978 [inline] vfs_kern_mount+0xc9/0x160 fs/namespace.c:1008 btrfs_mount+0x33c/0xae0 fs/btrfs/super.c:1732 legacy_get_tree+0xea/0x180 fs/fs_context.c:592 vfs_get_tree+0x88/0x270 fs/super.c:1547 do_new_mount fs/namespace.c:2875 [inline] path_mount+0x179d/0x29e0 fs/namespace.c:3192 do_mount fs/namespace.c:3205 [inline] __do_sys_mount fs/namespace.c:3413 [inline] __se_sys_mount+0x126/0x180 fs/namespace.c:3390 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 6945: kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track+0x3d/0x70 mm/kasan/common.c:56 kasan_set_free_info+0x17/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0xdd/0x110 mm/kasan/common.c:422 __cache_free mm/slab.c:3418 [inline] kfree+0x113/0x200 mm/slab.c:3756 deactivate_locked_super+0xa7/0xf0 fs/super.c:335 btrfs_mount_root+0x72b/0xb60 fs/btrfs/super.c:1678 legacy_get_tree+0xea/0x180 fs/fs_context.c:592 vfs_get_tree+0x88/0x270 fs/super.c:1547 fc_mount fs/namespace.c:978 [inline] vfs_kern_mount+0xc9/0x160 fs/namespace.c:1008 btrfs_mount+0x33c/0xae0 fs/btrfs/super.c:1732 legacy_get_tree+0xea/0x180 fs/fs_context.c:592 vfs_get_tree+0x88/0x270 fs/super.c:1547 do_new_mount fs/namespace.c:2875 [inline] path_mount+0x179d/0x29e0 fs/namespace.c:3192 do_mount fs/namespace.c:3205 [inline] __do_sys_mount fs/namespace.c:3413 [inline] __se_sys_mount+0x126/0x180 fs/namespace.c:3390 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880878e0000 which belongs to the cache kmalloc-16k of size 16384 The buggy address is located 1704 bytes inside of 16384-byte region [ffff8880878e0000, ffff8880878e4000) The buggy address belongs to the page: page:0000000060704f30 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x878e0 head:0000000060704f30 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea00028e9a08 ffffea00021e3608 ffff8880aa440b00 raw: 0000000000000000 ffff8880878e0000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880878e0580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880878e0600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880878e0680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880878e0700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880878e0780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== The syzkaller reproducer for this use-after-free crafts a filesystem image and loop mounts it twice in a loop. The mount will fail as the crafted image has an invalid chunk tree. When this happens btrfs_mount_root() will call deactivate_locked_super(), which then cleans up fs_info and fs_info::sb. If a second thread now adds the same block-device to the filesystem, it will get detected as a duplicate device and device_list_add() will reject the duplicate and print a warning. But as the fs_info pointer passed in is non-NULL this will result in a use-after-free. Instead of printing possibly uninitialized or already freed memory in btrfs_printk(), explicitly pass in a NULL fs_info so the printing of the device name will be skipped altogether. There was a slightly different approach discussed in https://lore.kernel.org/linux-btrfs/20200114060920.4527-1-anand.jain@oracle.com/t/#u Link: https://lore.kernel.org/linux-btrfs/000000000000c9e14b05afcc41ba@google.com Reported-by: syzbot+582e66e5edf36a22c7b0@syzkaller.appspotmail.com CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Nikolay Borisov Reviewed-by: Anand Jain Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4daeb2ae5cd8a7552ea9805792c86036298ed33d Merge: ef3f0caf24307 652b44453ea95 Author: Greg Kroah-Hartman Date: Mon Nov 23 19:51:56 2020 +0100 Merge tag 'misc-habanalabs-fixes-2020-11-23' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-linus Oded writes: This tag contains the following habanalabs driver fix for 5.10-rc6: - Add missing statements and break; in case switch of ECC handling. Without this fix, the handling of that interrupt will be erroneous. * tag 'misc-habanalabs-fixes-2020-11-23' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: habanalabs/gaudi: fix missing code in ECC handling commit b1824968221ccc498625750d8c49cf0d7d39a4de Author: Srinivasa Rao Mandadapu Date: Mon Nov 23 21:47:53 2020 +0530 ASoC: qcom: Fix enabling BCLK and LRCLK in LPAIF invalid state Fix enabling BCLK and LRCLK only when LPAIF is invalid state and bit clock in enable state. In device suspend/resume scenario LPAIF is going to reset state. which is causing LRCLK disable and BCLK enable. Avoid such inconsitency by removing unnecessary cpu dai prepare API, which is doing LRCLK enable, and by maintaining BLCK state information. Fixes: 7e6799d8f87d ("ASoC: qcom: lpass-cpu: Enable MI2S BCLK and LRCLK together") Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1606148273-17325-1-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 652b44453ea953d3157f02a7f17e18e329952649 Author: Oded Gabbay Date: Sat Nov 21 14:35:35 2020 +0200 habanalabs/gaudi: fix missing code in ECC handling There is missing statement and missing "break;" in the ECC handling code in gaudi.c This will cause a wrong behavior upon certain ECC interrupts. Signed-off-by: Oded Gabbay commit 2820526dd5c27326d9c0d2c831a34b8f14e7c404 Author: Maxime Ripard Date: Fri Nov 20 15:42:45 2020 +0100 drm/vc4: kms: Don't disable the muxing of an active CRTC The current HVS muxing code will consider the CRTCs in a given state to setup their muxing in the HVS, and disable the other CRTCs muxes. However, it's valid to only update a single CRTC with a state, and in this situation we would mux out a CRTC that was enabled but left untouched by the new state. Fix this by setting a flag on the CRTC state when the muxing has been changed, and only change the muxing configuration when that flag is there. Fixes: 87ebcd42fb7b ("drm/vc4: crtc: Assign output to channel automatically") Signed-off-by: Maxime Ripard Tested-by: Hoegeun Kwon Reviewed-by: Hoegeun Kwon Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201120144245.398711-3-maxime@cerno.tech commit f2df84e096a8254ddb18c531b185fc2a45879077 Author: Maxime Ripard Date: Fri Nov 20 15:42:44 2020 +0100 drm/vc4: kms: Store the unassigned channel list in the state If a CRTC is enabled but not active, and that we're then doing a page flip on another CRTC, drm_atomic_get_crtc_state will bring the first CRTC state into the global state, and will make us wait for its vblank as well, even though that might never occur. Instead of creating the list of the free channels each time atomic_check is called, and calling drm_atomic_get_crtc_state to retrieve the allocated channels, let's create a private state object in the main atomic state, and use it to store the available channels. Since vc4 has a semaphore (with a value of 1, so a lock) in its commit implementation to serialize all the commits, even the nonblocking ones, we are free from the use-after-free race if two subsequent commits are not ran in their submission order. Fixes: 87ebcd42fb7b ("drm/vc4: crtc: Assign output to channel automatically") Signed-off-by: Maxime Ripard Tested-by: Hoegeun Kwon Reviewed-by: Hoegeun Kwon Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201120144245.398711-2-maxime@cerno.tech commit ef3f0caf243075ac255b69054cbf48b65eadb0d4 Merge: 09162bc32c880 017496af28e25 Author: Greg Kroah-Hartman Date: Mon Nov 23 17:35:57 2020 +0100 Merge tag 'icc-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-linus Georgi writes: interconnect fixes for v5.10 This contains a few driver fixes and one core fix: - Fix an excessive of_node_put() in the core. - Fix boot regression and integer overflow on msm8974 platforms. - Fix a minor issue on qcs404 and msm8916 platforms. Signed-off-by: Georgi Djakov * tag 'icc-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: fix memory trashing in of_count_icc_providers() interconnect: qcom: qcs404: Remove GPU and display RPM IDs interconnect: qcom: msm8916: Remove rpm-ids from non-RPM nodes interconnect: qcom: msm8974: Don't boost the NoC rate during boot interconnect: qcom: msm8974: Prevent integer overflow in rate commit 4765df4d3a132764077a83ed0df4ee4cc7866fbb Merge: c464e26f2375a 7327c8b98e2e1 Author: Arnd Bergmann Date: Mon Nov 23 17:30:24 2020 +0100 Merge tag 'v5.10-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes Fixed ordering for MMC devices on rk3399, due to a mmc change jumbling all ordering, a fix to make the Odroig Go Advance actually power down and using the correct clock name on the NanoPi R2S. * tag 'v5.10-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Reorder LED triggers from mmc devices on rk3399-roc-pc. arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards. arm64: dts: rockchip: Remove system-power-controller from pmic on Odroid Go Advance arm64: dts: rockchip: fix NanoPi R2S GMAC clock name Link: https://lore.kernel.org/r/11641389.O9o76ZdvQC@phil Signed-off-by: Arnd Bergmann commit ff1712f953e27f0b0718762ec17d0adb15c9fd0b Author: Will Deacon Date: Fri Nov 20 13:57:48 2020 +0000 arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect() With hardware dirty bit management, calling pte_wrprotect() on a writable, dirty PTE will lose the dirty state and return a read-only, clean entry. Move the logic from ptep_set_wrprotect() into pte_wrprotect() to ensure that the dirty bit is preserved for writable entries, as this is required for soft-dirty bit management if we enable it in the future. Cc: Fixes: 2f4b829c625e ("arm64: Add support for hardware updates of the access and dirty pte bits") Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20201120143557.6715-3-will@kernel.org Signed-off-by: Will Deacon commit 07509e10dcc77627f8b6a57381e878fe269958d3 Author: Will Deacon Date: Fri Nov 20 13:28:01 2020 +0000 arm64: pgtable: Fix pte_accessible() pte_accessible() is used by ptep_clear_flush() to figure out whether TLB invalidation is necessary when unmapping pages for reclaim. Although our implementation is correct according to the architecture, returning true only for valid, young ptes in the absence of racing page-table modifications, this is in fact flawed due to lazy invalidation of old ptes in ptep_clear_flush_young() where we elide the expensive DSB instruction for completing the TLB invalidation. Rather than penalise the aging path, adjust pte_accessible() to return true for any valid pte, even if the access flag is cleared. Cc: Fixes: 76c714be0e5e ("arm64: pgtable: implement pte_accessible()") Reported-by: Yu Zhao Acked-by: Yu Zhao Reviewed-by: Minchan Kim Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20201120143557.6715-2-will@kernel.org Signed-off-by: Will Deacon commit 77c38c8cf52ef715bfc5cab3d14222d4f3e776e2 Author: Shameer Kolothum Date: Thu Nov 19 16:58:46 2020 +0000 iommu: Check return of __iommu_attach_device() Currently iommu_create_device_direct_mappings() is called without checking the return of __iommu_attach_device(). This may result in failures in iommu driver if dev attach returns error. Fixes: ce574c27ae27 ("iommu: Move iommu_group_create_direct_mappings() out of iommu_group_add_device()") Signed-off-by: Shameer Kolothum Link: https://lore.kernel.org/r/20201119165846.34180-1-shameerali.kolothum.thodi@huawei.com Signed-off-by: Will Deacon commit 72b55c96f3a5ae6e486c20b5dacf5114060ed042 Author: John Stultz Date: Thu Nov 12 22:05:19 2020 +0000 arm-smmu-qcom: Ensure the qcom_scm driver has finished probing Robin Murphy pointed out that if the arm-smmu driver probes before the qcom_scm driver, we may call qcom_scm_qsmmu500_wait_safe_toggle() before the __scm is initialized. Now, getting this to happen is a bit contrived, as in my efforts it required enabling asynchronous probing for both drivers, moving the firmware dts node to the end of the dtsi file, as well as forcing a long delay in the qcom_scm_probe function. With those tweaks we ran into the following crash: [ 2.631040] arm-smmu 15000000.iommu: Stage-1: 48-bit VA -> 48-bit IPA [ 2.633372] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 ... [ 2.633402] [0000000000000000] user address but active_mm is swapper [ 2.633409] Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 2.633415] Modules linked in: [ 2.633427] CPU: 5 PID: 117 Comm: kworker/u16:2 Tainted: G W 5.10.0-rc1-mainline-00025-g272a618fc36-dirty #3971 [ 2.633430] Hardware name: Thundercomm Dragonboard 845c (DT) [ 2.633448] Workqueue: events_unbound async_run_entry_fn [ 2.633456] pstate: 80c00005 (Nzcv daif +PAN +UAO -TCO BTYPE=--) [ 2.633465] pc : qcom_scm_qsmmu500_wait_safe_toggle+0x78/0xb0 [ 2.633473] lr : qcom_smmu500_reset+0x58/0x78 [ 2.633476] sp : ffffffc0105a3b60 ... [ 2.633567] Call trace: [ 2.633572] qcom_scm_qsmmu500_wait_safe_toggle+0x78/0xb0 [ 2.633576] qcom_smmu500_reset+0x58/0x78 [ 2.633581] arm_smmu_device_reset+0x194/0x270 [ 2.633585] arm_smmu_device_probe+0xc94/0xeb8 [ 2.633592] platform_drv_probe+0x58/0xa8 [ 2.633597] really_probe+0xec/0x398 [ 2.633601] driver_probe_device+0x5c/0xb8 [ 2.633606] __driver_attach_async_helper+0x64/0x88 [ 2.633610] async_run_entry_fn+0x4c/0x118 [ 2.633617] process_one_work+0x20c/0x4b0 [ 2.633621] worker_thread+0x48/0x460 [ 2.633628] kthread+0x14c/0x158 [ 2.633634] ret_from_fork+0x10/0x18 [ 2.633642] Code: a9034fa0 d0007f73 29107fa0 91342273 (f9400020) To avoid this, this patch adds a check on qcom_scm_is_available() in the qcom_smmu_impl_init() function, returning -EPROBE_DEFER if its not ready. This allows the driver to try to probe again later after qcom_scm has finished probing. Reported-by: Robin Murphy Signed-off-by: John Stultz Reviewed-by: Robin Murphy Cc: Robin Murphy Cc: Will Deacon Cc: Andy Gross Cc: Maulik Shah Cc: Bjorn Andersson Cc: Saravana Kannan Cc: Marc Zyngier Cc: Lina Iyer Cc: iommu@lists.linux-foundation.org Cc: linux-arm-msm Link: https://lore.kernel.org/r/20201112220520.48159-1-john.stultz@linaro.org Signed-off-by: Will Deacon commit 71d80563b0760a411cd90a3680536f5d887fff6b Author: Ran Wang Date: Mon Nov 23 10:57:15 2020 +0800 spi: spi-nxp-fspi: fix fspi panic by unexpected interrupts Given the case that bootloader(such as UEFI)'s FSPI driver might not handle all interrupts before loading kernel, those legacy interrupts would assert immidiately once kernel's FSPI driver enable them. Further, if it was FSPI_INTR_IPCMDDONE, the irq handler nxp_fspi_irq_handler() would call complete(&f->c) to notify others. However, f->c might not be initialized yet at that time, then cause kernel panic. Of cause, we should fix this issue within bootloader. But it would be better to have this pacth to make dirver more robust (by clearing all interrupt status bits before enabling interrupts). Suggested-by: Han Xu Signed-off-by: Ran Wang Link: https://lore.kernel.org/r/20201123025715.14635-1-ran.wang_1@nxp.com Signed-off-by: Mark Brown commit c0a2074ac575fff2848c8ef804bdc8590466c36c Author: Wenbin Mei Date: Wed Nov 18 14:34:05 2020 +0800 mmc: mediatek: Fix system suspend/resume support for CQHCI Before we got these errors on MT8192 platform: [ 59.153891] Restarting tasks ... [ 59.154540] done. [ 59.159175] PM: suspend exit [ 59.218724] mtk-msdc 11f60000.mmc: phase: [map:fffffffe] [maxlen:31] [final:16] [ 119.776083] mmc0: cqhci: timeout for tag 9 [ 119.780196] mmc0: cqhci: ============ CQHCI REGISTER DUMP =========== [ 119.786709] mmc0: cqhci: Caps: 0x100020b6 | Version: 0x00000510 [ 119.793225] mmc0: cqhci: Config: 0x00000101 | Control: 0x00000000 [ 119.799706] mmc0: cqhci: Int stat: 0x00000000 | Int enab: 0x00000000 [ 119.806177] mmc0: cqhci: Int sig: 0x00000000 | Int Coal: 0x00000000 [ 119.812670] mmc0: cqhci: TDL base: 0x00000000 | TDL up32: 0x00000000 [ 119.819149] mmc0: cqhci: Doorbell: 0x003ffc00 | TCN: 0x00000200 [ 119.825656] mmc0: cqhci: Dev queue: 0x00000000 | Dev Pend: 0x00000000 [ 119.832155] mmc0: cqhci: Task clr: 0x00000000 | SSC1: 0x00001000 [ 119.838627] mmc0: cqhci: SSC2: 0x00000000 | DCMD rsp: 0x00000000 [ 119.845174] mmc0: cqhci: RED mask: 0xfdf9a080 | TERRI: 0x0000891c [ 119.851654] mmc0: cqhci: Resp idx: 0x00000000 | Resp arg: 0x00000000 [ 119.865773] mmc0: cqhci: : =========================================== [ 119.872358] mmc0: running CQE recovery From these logs, we found TDL base was back to the default value. After suspend, the mmc host is powered off by HW, and bring CQE register to the default value, so we add system suspend/resume interface, then bring CQE to deactivated state before suspend, it will be enabled by CQE first request after resume. Signed-off-by: Wenbin Mei Link: https://lore.kernel.org/r/20201118063405.24906-1-wenbin.mei@mediatek.com Fixes: 88bd652b3c74 ("mmc: mediatek: command queue support") Cc: stable@vger.kernel.org [Ulf: Renamed functions] Signed-off-by: Ulf Hansson commit 6d39bdee238f9799718653a9d4d61ebf2922e23d Author: Suravee Suthikulpanit Date: Thu Nov 5 14:58:32 2020 +0000 iommu/amd: Enforce 4k mapping for certain IOMMU data structures AMD IOMMU requires 4k-aligned pages for the event log, the PPR log, and the completion wait write-back regions. However, when allocating the pages, they could be part of large mapping (e.g. 2M) page. This causes #PF due to the SNP RMP hardware enforces the check based on the page level for these data structures. So, fix by calling set_memory_4k() on the allocated pages. Fixes: c69d89aff393 ("iommu/amd: Use 4K page for completion wait write-back semaphore") Signed-off-by: Suravee Suthikulpanit Cc: Brijesh Singh Link: https://lore.kernel.org/r/20201105145832.3065-1-suravee.suthikulpanit@amd.com Signed-off-by: Will Deacon commit 178648916e73e00de83150eb0c90c0d3a977a46a Author: Marek Majtyka Date: Fri Nov 20 16:14:43 2020 +0100 xsk: Fix incorrect netdev reference count Fix incorrect netdev reference count in xsk_bind operation. Incorrect reference count of the device appears when a user calls bind with the XDP_ZEROCOPY flag on an interface which does not support zero-copy. In such a case, an error is returned but the reference count is not decreased. This change fixes the fault, by decreasing the reference count in case of such an error. The problem being corrected appeared in '162c820ed896' for the first time, and the code was moved to new file location over the time with commit 'c2d3d6a47462'. This specific patch applies to all version starting from 'c2d3d6a47462'. The same solution should be applied but on different file (net/xdp/xdp_umem.c) and function (xdp_umem_assign_dev) for versions from '162c820ed896' to 'c2d3d6a47462' excluded. Fixes: 162c820ed896 ("xdp: hold device for umem regardless of zero-copy mode") Signed-off-by: Marek Majtyka Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20201120151443.105903-1-marekx.majtyka@intel.com commit 05b8955f43536c3e1e73edc39639aac9ae32edd8 Merge: 418baf2c28f34 f943849f72068 Author: Rafael J. Wysocki Date: Mon Nov 23 12:55:01 2020 +0100 Merge branch 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull SCMI cpufreq driver fix for 5.10-rc6 from Viresh Kumar: "This fixes a build issues with SCMI cpufreq driver in the !CONFIG_COMMON_CLK case." * 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: scmi: Fix build for !CONFIG_COMMON_CLK commit 774c4a3b5e5fd897909e24c0f7dd4c6579da833f Author: Shiju Jose Date: Wed Oct 14 10:31:39 2020 +0100 ACPI/IORT: Fix doc warnings in iort.c Fix following warnings caused by mismatch between function parameters and function comments. drivers/acpi/arm64/iort.c:55: warning: Function parameter or member 'iort_node' not described in 'iort_set_fwnode' drivers/acpi/arm64/iort.c:55: warning: Excess function parameter 'node' description in 'iort_set_fwnode' drivers/acpi/arm64/iort.c:682: warning: Function parameter or member 'id' not described in 'iort_get_device_domain' drivers/acpi/arm64/iort.c:682: warning: Function parameter or member 'bus_token' not described in 'iort_get_device_domain' drivers/acpi/arm64/iort.c:682: warning: Excess function parameter 'req_id' description in 'iort_get_device_domain' drivers/acpi/arm64/iort.c:1142: warning: Function parameter or member 'dma_size' not described in 'iort_dma_setup' drivers/acpi/arm64/iort.c:1142: warning: Excess function parameter 'size' description in 'iort_dma_setup' drivers/acpi/arm64/iort.c:1534: warning: Function parameter or member 'ops' not described in 'iort_add_platform_device' Signed-off-by: Shiju Jose Acked-by: Hanjun Guo Acked-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20201014093139.1580-1-shiju.jose@huawei.com Signed-off-by: Will Deacon commit 03659efe4287230b1d65b31c993708f335c8de82 Author: Randy Dunlap Date: Sun Nov 22 20:45:10 2020 -0800 arm64/fpsimd: add to to fix fpsimd build Adding brought in which uses , which uses 'pstate_check_t' so the latter needs to #include for this typedef. Fixes this build error: In file included from arch/arm64/include/asm/kprobes.h:24, from arch/arm64/include/asm/exception.h:11, from arch/arm64/kernel/fpsimd.c:35: arch/arm64/include/asm/probes.h:16:2: error: unknown type name 'pstate_check_t' 16 | pstate_check_t *pstate_cc; Fixes: c6b90d5cf637 ("arm64/fpsimd: Fix missing-prototypes in fpsimd.c") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Will Deacon Cc: Tian Tao Link: https://lore.kernel.org/r/20201123044510.9942-1-rdunlap@infradead.org Signed-off-by: Will Deacon commit 1179f170b6f0af7bb0b3b7628136eaac450ddf31 Author: Sven Schnelle Date: Fri Nov 20 14:17:52 2020 +0100 s390: fix fpu restore in entry.S We need to disable interrupts in load_fpu_regs(). Otherwise an interrupt might come in after the registers are loaded, but before CIF_FPU is cleared in load_fpu_regs(). When the interrupt returns, CIF_FPU will be cleared and the registers will never be restored. The entry.S code usually saves the interrupt state in __SF_EMPTY on the stack when disabling/restoring interrupts. sie64a however saves the pointer to the sie control block in __SF_SIE_CONTROL, which references the same location. This is non-obvious to the reader. To avoid thrashing the sie control block pointer in load_fpu_regs(), move the __SIE_* offsets eight bytes after __SF_EMPTY on the stack. Cc: # 5.8 Fixes: 0b0ed657fe00 ("s390: remove critical section cleanup from entry.S") Reported-by: Pierre Morel Signed-off-by: Sven Schnelle Acked-by: Christian Borntraeger Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens commit b6b79dd53082db11070b4368d85dd6699ff0b063 Author: Stephen Rothwell Date: Mon Nov 23 18:40:16 2020 +1100 powerpc/64s: Fix allnoconfig build since uaccess flush Using DECLARE_STATIC_KEY_FALSE needs linux/jump_table.h. Otherwise the build fails with eg: arch/powerpc/include/asm/book3s/64/kup-radix.h:66:1: warning: data definition has no type or storage class 66 | DECLARE_STATIC_KEY_FALSE(uaccess_flush_key); Fixes: 9a32a7e78bd0 ("powerpc/64s: flush L1D after user accesses") Signed-off-by: Stephen Rothwell [mpe: Massage change log] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201123184016.693fe464@canb.auug.org.au commit 962f8e64cd18a5353c34937436dd06b992f73c0a Merge: cd81acc600a96 da631f7fd623b Author: Michael Ellerman Date: Mon Nov 23 21:16:27 2020 +1100 Merge tag 'powerpc-cve-2020-4788' into fixes From Daniel's cover letter: IBM Power9 processors can speculatively operate on data in the L1 cache before it has been completely validated, via a way-prediction mechanism. It is not possible for an attacker to determine the contents of impermissible memory using this method, since these systems implement a combination of hardware and software security measures to prevent scenarios where protected data could be leaked. However these measures don't address the scenario where an attacker induces the operating system to speculatively execute instructions using data that the attacker controls. This can be used for example to speculatively bypass "kernel user access prevention" techniques, as discovered by Anthony Steinhauser of Google's Safeside Project. This is not an attack by itself, but there is a possibility it could be used in conjunction with side-channels or other weaknesses in the privileged code to construct an attack. This issue can be mitigated by flushing the L1 cache between privilege boundaries of concern. This patch series flushes the L1 cache on kernel entry (patch 2) and after the kernel performs any user accesses (patch 3). It also adds a self-test and performs some related cleanups. commit f943849f720689214abb3930623c31ff91990be9 Author: Sudeep Holla Date: Fri Nov 20 10:12:52 2020 +0000 cpufreq: scmi: Fix build for !CONFIG_COMMON_CLK Commit 8410e7f3b31e ("cpufreq: scmi: Fix OPP addition failure with a dummy clock provider") registers a dummy clock provider using devm_of_clk_add_hw_provider. These *_hw_provider functions are defined only when CONFIG_COMMON_CLK=y. One possible fix is to add the Kconfig dependency, but since we plan to move away from the clock dependency for scmi cpufreq, it is preferrable to avoid that. Let us just conditionally compile out the offending call to devm_of_clk_add_hw_provider. It also uses the variable 'dev' outside of the #ifdef block to avoid build warning. Fixes: 8410e7f3b31e ("cpufreq: scmi: Fix OPP addition failure with a dummy clock provider") Cc: Rafael J. Wysocki Cc: Viresh Kumar Signed-off-by: Sudeep Holla Signed-off-by: Viresh Kumar commit e2d3d2e904ad3d381753798dcd5cae03e3c47242 Author: Krzysztof Kozlowski Date: Mon Nov 16 18:53:00 2020 +0100 drm/exynos: depend on COMMON_CLK to fix compile tests The Exynos DRM uses Common Clock Framework thus it cannot be built on platforms without it (e.g. compile test on MIPS with RALINK and SOC_RT305X): /usr/bin/mips-linux-gnu-ld: drivers/gpu/drm/exynos/exynos_mixer.o: in function `mixer_bind': exynos_mixer.c:(.text+0x958): undefined reference to `clk_set_parent' Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Signed-off-by: Inki Dae commit 418baf2c28f3473039f2f7377760bd8f6897ae18 Author: Linus Torvalds Date: Sun Nov 22 15:36:08 2020 -0800 Linux 5.10-rc5 commit d5530d82efc8631beff20480b1168b1c44294fe1 Merge: f4b936f5d6fd0 b4c00e7976636 Author: Linus Torvalds Date: Sun Nov 22 14:36:06 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - Various functionality / regression fixes for Logitech devices from Hans de Goede - Fix for (recently added) GPIO support in mcp2221 driver from Lars Povlsen - Power management handling fix/quirk in i2c-hid driver for certain BIOSes that have strange aproach to power-cycle from Hans de Goede - a few device ID additions and device-specific quirks * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: logitech-dj: Fix Dinovo Mini when paired with a MX5x00 receiver HID: logitech-dj: Fix an error in mse_bluetooth_descriptor HID: Add Logitech Dinovo Edge battery quirk HID: logitech-hidpp: Add HIDPP_CONSUMER_VENDOR_KEYS quirk for the Dinovo Edge HID: logitech-dj: Handle quad/bluetooth keyboards with a builtin trackpad HID: add HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE for Gamevice devices HID: mcp2221: Fix GPIO output handling HID: hid-sensor-hub: Fix issue with devices with no report ID HID: i2c-hid: Put ACPI enumerated devices in D3 on shutdown HID: add support for Sega Saturn HID: cypress: Support Varmilo Keyboards' media hotkeys HID: ite: Replace ABS_MISC 120/121 events with touchpad on/off keypresses HID: logitech-hidpp: Add PID for MX Anywhere 2 HID: uclogic: Add ID for Trust Flex Design Tablet commit f4b936f5d6fd0625a78a7b4b92e98739a2bdb6f7 Merge: 48da33058975f 2279f540ea7d0 Author: Linus Torvalds Date: Sun Nov 22 13:26:07 2020 -0800 Merge tag 'sched-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "A couple of scheduler fixes: - Make the conditional update of the overutilized state work correctly by caching the relevant flags state before overwriting them and checking them afterwards. - Fix a data race in the wakeup path which caused loadavg on ARM64 platforms to become a random number generator. - Fix the ordering of the iowaiter accounting operations so it can't be decremented before it is incremented. - Fix a bug in the deadline scheduler vs. priority inheritance when a non-deadline task A has inherited the parameters of a deadline task B and then blocks on a non-deadline task C. The second inheritance step used the static deadline parameters of task A, which are usually 0, instead of further propagating task B's parameters. The zero initialized parameters trigger a bug in the deadline scheduler" * tag 'sched-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/deadline: Fix priority inheritance with multiple scheduling classes sched: Fix rq->nr_iowait ordering sched: Fix data-race in wakeup sched/fair: Fix overutilized update in enqueue_task_fair() commit 48da33058975f3a3084390dbef6aecd9bda7db62 Merge: 855cf1ee4726b ebd19fc372e3e Author: Linus Torvalds Date: Sun Nov 22 13:23:43 2020 -0800 Merge tag 'perf-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Thomas Gleixner: "A single fix for the x86 perf sysfs interfaces which used kobject attributes instead of device attributes and therefore making clang's control flow integrity checker upset" * tag 'perf-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86: fix sysfs type mismatches commit 855cf1ee4726bfa2077b2226bff507babe1c8dff Merge: 68d3fa235fd83 43be4388e94b9 Author: Linus Torvalds Date: Sun Nov 22 13:19:53 2020 -0800 Merge tag 'locking-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Thomas Gleixner: "A single fix for lockdep which makes the recursion protection cover graph lock/unlock" * tag 'locking-urgent-2020-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lockdep: Put graph lock/unlock under lock_recursion protection commit 68d3fa235fd83ab0fd36c367c0530d16c764051b Merge: 7d53be55c9d78 c2fe61d8be491 Author: Linus Torvalds Date: Sun Nov 22 13:05:48 2020 -0800 Merge tag 'efi-urgent-for-v5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Borislav Petkov: "Forwarded EFI fixes from Ard Biesheuvel: - fix memory leak in efivarfs driver - fix HYP mode issue in 32-bit ARM version of the EFI stub when built in Thumb2 mode - avoid leaking EFI pgd pages on allocation failure" * tag 'efi-urgent-for-v5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/x86: Free efi_pgd with free_pages() efivarfs: fix memory leak in efivarfs_create() efi/arm: set HSCTLR Thumb2 bit correctly for HVC calls from HYP commit 7d53be55c9d78feb38b29fbcaf77af1343549cf1 Merge: 4a51c60a11158 01cf158e48d2b Author: Linus Torvalds Date: Sun Nov 22 12:55:50 2020 -0800 Merge tag 'x86_urgent_for_v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - An IOMMU VT-d build fix when CONFIG_PCI_ATS=n along with a revert of same because the proper one is going through the IOMMU tree (Thomas Gleixner) - An Intel microcode loader fix to save the correct microcode patch to apply during resume (Chen Yu) - A fix to not access user memory of other processes when dumping opcode bytes (Thomas Gleixner) * tag 'x86_urgent_for_v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "iommu/vt-d: Take CONFIG_PCI_ATS into account" x86/dumpstack: Do not try to access user space code of other tasks x86/microcode/intel: Check patch signature before saving microcode for early loading iommu/vt-d: Take CONFIG_PCI_ATS into account commit 4a51c60a11158961f1291c5b95ff7e4cddfb0353 Merge: d27637ece80f2 66383800df9cb Author: Linus Torvalds Date: Sun Nov 22 12:14:46 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "8 patches. Subsystems affected by this patch series: mm (madvise, pagemap, readahead, memcg, userfaultfd), kbuild, and vfs" * emailed patches from Andrew Morton : mm: fix madvise WILLNEED performance problem libfs: fix error cast of negative value in simple_attr_write() mm/userfaultfd: do not access vma->vm_mm after calling handle_userfault() mm: memcg/slab: fix root memcg vmstats mm: fix readahead_page_batch for retry entries mm: fix phys_to_target_node() and memory_add_physaddr_to_nid() exports compiler-clang: remove version check for BPF Tracing mm/madvise: fix memory leak from process_madvise commit d27637ece80f25124e0e6871b7b6cb855e1c670c Merge: de75803570257 2dde2821b57f1 Author: Linus Torvalds Date: Sun Nov 22 11:58:49 2020 -0800 Merge tag 'staging-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO fixes from Greg KH: "Here are some small Staging and IIO driver fixes for 5.10-rc5. They include: - IIO fixes for reported regressions and problems - new device ids for IIO drivers - new device id for rtl8723bs driver - staging ralink driver Kconfig dependency fix - staging mt7621-pci bus resource fix All of these have been in linux-next all week with no reported issues" * tag 'staging-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: accel: kxcjk1013: Add support for KIOX010A ACPI DSM for setting tablet-mode iio: accel: kxcjk1013: Replace is_smo8500_device with an acpi_type enum docs: ABI: testing: iio: stm32: remove re-introduced unsupported ABI iio: light: fix kconfig dependency bug for VCNL4035 iio/adc: ingenic: Fix AUX/VBAT readings when touchscreen is used iio/adc: ingenic: Fix battery VREF for JZ4770 SoC staging: rtl8723bs: Add 024c:0627 to the list of SDIO device-ids staging: ralink-gdma: fix kconfig dependency bug for DMA_RALINK staging: mt7621-pci: avoid to request pci bus resources iio: imu: st_lsm6dsx: set 10ms as min shub slave timeout counter/ti-eqep: Fix regmap max_register iio: adc: stm32-adc: fix a regression when using dma and irq iio: adc: mediatek: fix unset field iio: cros_ec: Use default frequencies when EC returns invalid information commit de758035702576ac0e5ac0f93e3cce77144c3bd3 Merge: a7f07fc14f06f 425af483523b7 Author: Linus Torvalds Date: Sun Nov 22 11:52:10 2020 -0800 Merge tag 'tty-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty fixes from Greg KH: "Here are some small tty/serial fixes for 5.10-rc5 that resolve some reported issues: - speakup crash when telling the kernel to use a device that isn't really there - imx serial driver fixes for reported problems - ar933x_uart driver fix for probe error handling path All have been in linux-next for a while with no reported issues" * tag 'tty-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: ar933x_uart: disable clk on error handling path in probe tty: serial: imx: keep console clocks always on speakup: Do not let the line discipline be used several times tty: serial: imx: fix potential deadlock commit a7f07fc14f06f98fc5fe1208bac5f6f5bcda2c10 Merge: a9e5c87ca7443 f902b21650109 Author: Linus Torvalds Date: Sun Nov 22 11:39:32 2020 -0800 Merge tag 'ext4_for_linus_fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "A final set of miscellaneous bug fixes for ext4" * tag 'ext4_for_linus_fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix bogus warning in ext4_update_dx_flag() jbd2: fix kernel-doc markups ext4: drop fast_commit from /proc/mounts commit a9e5c87ca7443d09fb530fffa4d96ce1c76dbe4d Author: David Howells Date: Sun Nov 22 13:13:45 2020 +0000 afs: Fix speculative status fetch going out of order wrt to modifications When doing a lookup in a directory, the afs filesystem uses a bulk status fetch to speculatively retrieve the statuses of up to 48 other vnodes found in the same directory and it will then either update extant inodes or create new ones - effectively doing 'lookup ahead'. To avoid the possibility of deadlocking itself, however, the filesystem doesn't lock all of those inodes; rather just the directory inode is locked (by the VFS). When the operation completes, afs_inode_init_from_status() or afs_apply_status() is called, depending on whether the inode already exists, to commit the new status. A case exists, however, where the speculative status fetch operation may straddle a modification operation on one of those vnodes. What can then happen is that the speculative bulk status RPC retrieves the old status, and whilst that is happening, the modification happens - which returns an updated status, then the modification status is committed, then we attempt to commit the speculative status. This results in something like the following being seen in dmesg: kAFS: vnode modified {100058:861} 8->9 YFS.InlineBulkStatus showing that for vnode 861 on volume 100058, we saw YFS.InlineBulkStatus say that the vnode had data version 8 when we'd already recorded version 9 due to a local modification. This was causing the cache to be invalidated for that vnode when it shouldn't have been. If it happens on a data file, this might lead to local changes being lost. Fix this by ignoring speculative status updates if the data version doesn't match the expected value. Note that it is possible to get a DV regression if a volume gets restored from a backup - but we should get a callback break in such a case that should trigger a recheck anyway. It might be worth checking the volume creation time in the volsync info and, if a change is observed in that (as would happen on a restore), invalidate all caches associated with the volume. Fixes: 5cf9dd55a0ec ("afs: Prospectively look up extra files when doing a single lookup") Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 66383800df9cbdbf3b0c34d5a51bf35bcdb72fd2 Author: Matthew Wilcox (Oracle) Date: Sat Nov 21 22:17:22 2020 -0800 mm: fix madvise WILLNEED performance problem The calculation of the end page index was incorrect, leading to a regression of 70% when running stress-ng. With this fix, we instead see a performance improvement of 3%. Fixes: e6e88712e43b ("mm: optimise madvise WILLNEED") Reported-by: kernel test robot Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Tested-by: Xing Zhengjun Acked-by: Johannes Weiner Cc: William Kucharski Cc: Feng Tang Cc: "Chen, Rong A" Link: https://lkml.kernel.org/r/20201109134851.29692-1-willy@infradead.org Signed-off-by: Linus Torvalds commit 488dac0c9237647e9b8f788b6a342595bfa40bda Author: Yicong Yang Date: Sat Nov 21 22:17:19 2020 -0800 libfs: fix error cast of negative value in simple_attr_write() The attr->set() receive a value of u64, but simple_strtoll() is used for doing the conversion. It will lead to the error cast if user inputs a negative value. Use kstrtoull() instead of simple_strtoll() to convert a string got from the user to an unsigned value. The former will return '-EINVAL' if it gets a negetive value, but the latter can't handle the situation correctly. Make 'val' unsigned long long as what kstrtoull() takes, this will eliminate the compile warning on no 64-bit architectures. Fixes: f7b88631a897 ("fs/libfs.c: fix simple_attr_write() on 32bit machines") Signed-off-by: Yicong Yang Signed-off-by: Andrew Morton Cc: Al Viro Link: https://lkml.kernel.org/r/1605341356-11872-1-git-send-email-yangyicong@hisilicon.com Signed-off-by: Linus Torvalds commit bfe8cc1db02ab243c62780f17fc57f65bde0afe1 Author: Gerald Schaefer Date: Sat Nov 21 22:17:15 2020 -0800 mm/userfaultfd: do not access vma->vm_mm after calling handle_userfault() Alexander reported a syzkaller / KASAN finding on s390, see below for complete output. In do_huge_pmd_anonymous_page(), the pre-allocated pagetable will be freed in some cases. In the case of userfaultfd_missing(), this will happen after calling handle_userfault(), which might have released the mmap_lock. Therefore, the following pte_free(vma->vm_mm, pgtable) will access an unstable vma->vm_mm, which could have been freed or re-used already. For all architectures other than s390 this will go w/o any negative impact, because pte_free() simply frees the page and ignores the passed-in mm. The implementation for SPARC32 would also access mm->page_table_lock for pte_free(), but there is no THP support in SPARC32, so the buggy code path will not be used there. For s390, the mm->context.pgtable_list is being used to maintain the 2K pagetable fragments, and operating on an already freed or even re-used mm could result in various more or less subtle bugs due to list / pagetable corruption. Fix this by calling pte_free() before handle_userfault(), similar to how it is already done in __do_huge_pmd_anonymous_page() for the WRITE / non-huge_zero_page case. Commit 6b251fc96cf2c ("userfaultfd: call handle_userfault() for userfaultfd_missing() faults") actually introduced both, the do_huge_pmd_anonymous_page() and also __do_huge_pmd_anonymous_page() changes wrt to calling handle_userfault(), but only in the latter case it put the pte_free() before calling handle_userfault(). BUG: KASAN: use-after-free in do_huge_pmd_anonymous_page+0xcda/0xd90 mm/huge_memory.c:744 Read of size 8 at addr 00000000962d6988 by task syz-executor.0/9334 CPU: 1 PID: 9334 Comm: syz-executor.0 Not tainted 5.10.0-rc1-syzkaller-07083-g4c9720875573 #0 Hardware name: IBM 3906 M04 701 (KVM/Linux) Call Trace: do_huge_pmd_anonymous_page+0xcda/0xd90 mm/huge_memory.c:744 create_huge_pmd mm/memory.c:4256 [inline] __handle_mm_fault+0xe6e/0x1068 mm/memory.c:4480 handle_mm_fault+0x288/0x748 mm/memory.c:4607 do_exception+0x394/0xae0 arch/s390/mm/fault.c:479 do_dat_exception+0x34/0x80 arch/s390/mm/fault.c:567 pgm_check_handler+0x1da/0x22c arch/s390/kernel/entry.S:706 copy_from_user_mvcos arch/s390/lib/uaccess.c:111 [inline] raw_copy_from_user+0x3a/0x88 arch/s390/lib/uaccess.c:174 _copy_from_user+0x48/0xa8 lib/usercopy.c:16 copy_from_user include/linux/uaccess.h:192 [inline] __do_sys_sigaltstack kernel/signal.c:4064 [inline] __s390x_sys_sigaltstack+0xc8/0x240 kernel/signal.c:4060 system_call+0xe0/0x28c arch/s390/kernel/entry.S:415 Allocated by task 9334: slab_alloc_node mm/slub.c:2891 [inline] slab_alloc mm/slub.c:2899 [inline] kmem_cache_alloc+0x118/0x348 mm/slub.c:2904 vm_area_dup+0x9c/0x2b8 kernel/fork.c:356 __split_vma+0xba/0x560 mm/mmap.c:2742 split_vma+0xca/0x108 mm/mmap.c:2800 mlock_fixup+0x4ae/0x600 mm/mlock.c:550 apply_vma_lock_flags+0x2c6/0x398 mm/mlock.c:619 do_mlock+0x1aa/0x718 mm/mlock.c:711 __do_sys_mlock2 mm/mlock.c:738 [inline] __s390x_sys_mlock2+0x86/0xa8 mm/mlock.c:728 system_call+0xe0/0x28c arch/s390/kernel/entry.S:415 Freed by task 9333: slab_free mm/slub.c:3142 [inline] kmem_cache_free+0x7c/0x4b8 mm/slub.c:3158 __vma_adjust+0x7b2/0x2508 mm/mmap.c:960 vma_merge+0x87e/0xce0 mm/mmap.c:1209 userfaultfd_release+0x412/0x6b8 fs/userfaultfd.c:868 __fput+0x22c/0x7a8 fs/file_table.c:281 task_work_run+0x200/0x320 kernel/task_work.c:151 tracehook_notify_resume include/linux/tracehook.h:188 [inline] do_notify_resume+0x100/0x148 arch/s390/kernel/signal.c:538 system_call+0xe6/0x28c arch/s390/kernel/entry.S:416 The buggy address belongs to the object at 00000000962d6948 which belongs to the cache vm_area_struct of size 200 The buggy address is located 64 bytes inside of 200-byte region [00000000962d6948, 00000000962d6a10) The buggy address belongs to the page: page:00000000313a09fe refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x962d6 flags: 0x3ffff00000000200(slab) raw: 3ffff00000000200 000040000257e080 0000000c0000000c 000000008020ba00 raw: 0000000000000000 000f001e00000000 ffffffff00000001 0000000096959501 page dumped because: kasan: bad access detected page->mem_cgroup:0000000096959501 Memory state around the buggy address: 00000000962d6880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000000962d6900: 00 fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb >00000000962d6980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ 00000000962d6a00: fb fb fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00000000962d6a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== Fixes: 6b251fc96cf2c ("userfaultfd: call handle_userfault() for userfaultfd_missing() faults") Reported-by: Alexander Egorenkov Signed-off-by: Gerald Schaefer Signed-off-by: Andrew Morton Cc: Andrea Arcangeli Cc: Heiko Carstens Cc: [4.3+] Link: https://lkml.kernel.org/r/20201110190329.11920-1-gerald.schaefer@linux.ibm.com Signed-off-by: Linus Torvalds commit 8faeb1ffd79593c9cd8a2a80ecdda371e3b826cb Author: Muchun Song Date: Sat Nov 21 22:17:12 2020 -0800 mm: memcg/slab: fix root memcg vmstats If we reparent the slab objects to the root memcg, when we free the slab object, we need to update the per-memcg vmstats to keep it correct for the root memcg. Now this at least affects the vmstat of NR_KERNEL_STACK_KB for !CONFIG_VMAP_STACK when the thread stack size is smaller than the PAGE_SIZE. David said: "I assume that without this fix that the root memcg's vmstat would always be inflated if we reparented" Fixes: ec9f02384f60 ("mm: workingset: fix vmstat counters for shadow nodes") Signed-off-by: Muchun Song Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Johannes Weiner Acked-by: David Rientjes Cc: Michal Hocko Cc: Vladimir Davydov Cc: Christopher Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Roman Gushchin Cc: Vlastimil Babka Cc: Yafang Shao Cc: Chris Down Cc: [5.3+] Link: https://lkml.kernel.org/r/20201110031015.15715-1-songmuchun@bytedance.com Signed-off-by: Linus Torvalds commit 4349a83a3190c1d4414371161b0f4a4c3ccd3f9d Author: Matthew Wilcox (Oracle) Date: Sat Nov 21 22:17:08 2020 -0800 mm: fix readahead_page_batch for retry entries Both btrfs and fuse have reported faults caused by seeing a retry entry instead of the page they were looking for. This was caused by a missing check in the iterator. As can be seen in the below panic log, the accessing 0x402 causes a panic. In the xarray.h, 0x402 means RETRY_ENTRY. BUG: kernel NULL pointer dereference, address: 0000000000000402 CPU: 14 PID: 306003 Comm: as Not tainted 5.9.0-1-amd64 #1 Debian 5.9.1-1 Hardware name: Lenovo ThinkSystem SR665/7D2VCTO1WW, BIOS D8E106Q-1.01 05/30/2020 RIP: 0010:fuse_readahead+0x152/0x470 [fuse] Code: 41 8b 57 18 4c 8d 54 10 ff 4c 89 d6 48 8d 7c 24 10 e8 d2 e3 28 f9 48 85 c0 0f 84 fe 00 00 00 44 89 f2 49 89 04 d4 44 8d 72 01 <48> 8b 10 41 8b 4f 1c 48 c1 ea 10 83 e2 01 80 fa 01 19 d2 81 e2 01 RSP: 0018:ffffad99ceaebc50 EFLAGS: 00010246 RAX: 0000000000000402 RBX: 0000000000000001 RCX: 0000000000000002 RDX: 0000000000000000 RSI: ffff94c5af90bd98 RDI: ffffad99ceaebc60 RBP: ffff94ddc1749a00 R08: 0000000000000402 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000100 R12: ffff94de6c429ce0 R13: ffff94de6c4d3700 R14: 0000000000000001 R15: ffffad99ceaebd68 FS: 00007f228c5c7040(0000) GS:ffff94de8ed80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000402 CR3: 0000001dbd9b4000 CR4: 0000000000350ee0 Call Trace: read_pages+0x83/0x270 page_cache_readahead_unbounded+0x197/0x230 generic_file_buffered_read+0x57a/0xa20 new_sync_read+0x112/0x1a0 vfs_read+0xf8/0x180 ksys_read+0x5f/0xe0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 042124cc64c3 ("mm: add new readahead_control API") Reported-by: David Sterba Reported-by: Wonhyuk Yang Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Link: https://lkml.kernel.org/r/20201103142852.8543-1-willy@infradead.org Link: https://lkml.kernel.org/r/20201103124349.16722-1-vvghjk1234@gmail.com Signed-off-by: Linus Torvalds commit a927bd6ba952d13c52b8b385030943032f659a3e Author: Dan Williams Date: Sat Nov 21 22:17:05 2020 -0800 mm: fix phys_to_target_node() and memory_add_physaddr_to_nid() exports The core-mm has a default __weak implementation of phys_to_target_node() to mirror the weak definition of memory_add_physaddr_to_nid(). That symbol is exported for modules. However, while the export in mm/memory_hotplug.c exported the symbol in the configuration cases of: CONFIG_NUMA_KEEP_MEMINFO=y CONFIG_MEMORY_HOTPLUG=y ...and: CONFIG_NUMA_KEEP_MEMINFO=n CONFIG_MEMORY_HOTPLUG=y ...it failed to export the symbol in the case of: CONFIG_NUMA_KEEP_MEMINFO=y CONFIG_MEMORY_HOTPLUG=n Not only is that broken, but Christoph points out that the kernel should not be exporting any __weak symbol, which means that memory_add_physaddr_to_nid() example that phys_to_target_node() copied is broken too. Rework the definition of phys_to_target_node() and memory_add_physaddr_to_nid() to not require weak symbols. Move to the common arch override design-pattern of an asm header defining a symbol to replace the default implementation. The only common header that all memory_add_physaddr_to_nid() producing architectures implement is asm/sparsemem.h. In fact, powerpc already defines its memory_add_physaddr_to_nid() helper in sparsemem.h. Double-down on that observation and define phys_to_target_node() where necessary in asm/sparsemem.h. An alternate consideration that was discarded was to put this override in asm/numa.h, but that entangles with the definition of MAX_NUMNODES relative to the inclusion of linux/nodemask.h, and requires powerpc to grow a new header. The dependency on NUMA_KEEP_MEMINFO for DEV_DAX_HMEM_DEVICES is invalid now that the symbol is properly exported / stubbed in all combinations of CONFIG_NUMA_KEEP_MEMINFO and CONFIG_MEMORY_HOTPLUG. [dan.j.williams@intel.com: v4] Link: https://lkml.kernel.org/r/160461461867.1505359.5301571728749534585.stgit@dwillia2-desk3.amr.corp.intel.com [dan.j.williams@intel.com: powerpc: fix create_section_mapping compile warning] Link: https://lkml.kernel.org/r/160558386174.2948926.2740149041249041764.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: a035b6bf863e ("mm/memory_hotplug: introduce default phys_to_target_node() implementation") Reported-by: Randy Dunlap Reported-by: Thomas Gleixner Reported-by: kernel test robot Reported-by: Christoph Hellwig Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Tested-by: Randy Dunlap Tested-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Christoph Hellwig Cc: Joao Martins Cc: Tony Luck Cc: Fenghua Yu Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Vishal Verma Cc: Stephen Rothwell Link: https://lkml.kernel.org/r/160447639846.1133764.7044090803980177548.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit bc2dc4406c463174613047d8b7946e12c8808cda Author: Nick Desaulniers Date: Sat Nov 21 22:17:01 2020 -0800 compiler-clang: remove version check for BPF Tracing bpftrace parses the kernel headers and uses Clang under the hood. Remove the version check when __BPF_TRACING__ is defined (as bpftrace does) so that this tool can continue to parse kernel headers, even with older clang sources. Fixes: commit 1f7a44f63e6c ("compiler-clang: add build check for clang 10.0.1") Reported-by: Chen Yu Reported-by: Jarkko Sakkinen Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Tested-by: Jarkko Sakkinen Acked-by: Jarkko Sakkinen Acked-by: Song Liu Acked-by: Nathan Chancellor Acked-by: Miguel Ojeda Link: https://lkml.kernel.org/r/20201104191052.390657-1-ndesaulniers@google.com Signed-off-by: Linus Torvalds commit 450677dcb0cce5cb751538360b7196c28b733f3e Author: Eric Dumazet Date: Sat Nov 21 22:16:58 2020 -0800 mm/madvise: fix memory leak from process_madvise The early return in process_madvise() will produce a memory leak. Fix it. Fixes: ecb8ac8b1f14 ("mm/madvise: introduce process_madvise() syscall: an external memory hinting API") Signed-off-by: Eric Dumazet Signed-off-by: Minchan Kim Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20201116155132.GA3805951@google.com Signed-off-by: Linus Torvalds commit 74cde1a53368aed4f2b4b54bf7030437f64a534b Author: Xu Qiang Date: Sat Nov 7 10:42:26 2020 +0000 irqchip/gic-v3-its: Unconditionally save/restore the ITS state on suspend On systems without HW-based collections (i.e. anything except GIC-500), we rely on firmware to perform the ITS save/restore. This doesn't really work, as although FW can properly save everything, it cannot fully restore the state of the command queue (the read-side is reset to the head of the queue). This results in the ITS consuming previously processed commands, potentially corrupting the state. Instead, let's always save the ITS state on suspend, disabling it in the process, and restore the full state on resume. This saves us from broken FW as long as it doesn't enable the ITS by itself (for which we can't do anything). This amounts to simply dropping the ITS_FLAGS_SAVE_SUSPEND_STATE. Signed-off-by: Xu Qiang [maz: added warning on resume, rewrote commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201107104226.14282-1-xuqiang36@huawei.com commit d001e41e1b15716e9b759df5ef00510699f85282 Author: Chen Baozi Date: Tue Nov 17 11:20:15 2020 +0800 irqchip/exiu: Fix the index of fwspec for IRQ type Since fwspec->param_count of ACPI node is two, the index of IRQ type in fwspec->param[] should be 1 rather than 2. Fixes: 3d090a36c8c8 ("irqchip/exiu: Implement ACPI support") Signed-off-by: Chen Baozi Signed-off-by: Marc Zyngier Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20201117032015.11805-1-cbz@baozis.org Cc: stable@vger.kernel.org commit f9b036532108d60925ef5d696a8463097abbc59a Merge: 5aac0390a63b8 855a631a4c114 Author: Jakub Kicinski Date: Sat Nov 21 15:30:49 2020 -0800 Merge branch 'ibmvnic-fixes-in-reset-path' Lijun Pan says: ==================== ibmvnic: fixes in reset path Patch 1/3 and 2/3 notify peers in failover and migration reset. Patch 3/3 skips timeout reset if it is already resetting. ==================== Link: https://lore.kernel.org/r/20201120224013.46891-1-ljp@linux.ibm.com Signed-off-by: Jakub Kicinski commit 855a631a4c11458a9cef1ab79c1530436aa95fae Author: Lijun Pan Date: Fri Nov 20 16:40:13 2020 -0600 ibmvnic: skip tx timeout reset while in resetting Sometimes it takes longer than 5 seconds (watchdog timeout) to complete failover, migration, and other resets. In stead of scheduling another timeout reset, we wait for the current one to complete. Suggested-by: Brian King Signed-off-by: Lijun Pan Reviewed-by: Dany Madden Signed-off-by: Jakub Kicinski commit 98025bce3a6200a0c4637272a33b5913928ba5b8 Author: Lijun Pan Date: Fri Nov 20 16:40:12 2020 -0600 ibmvnic: notify peers when failover and migration happen Commit 61d3e1d9bc2a ("ibmvnic: Remove netdev notify for failover resets") excluded the failover case for notify call because it said netdev_notify_peers() can cause network traffic to stall or halt. Current testing does not show network traffic stall or halt because of the notify call for failover event. netdev_notify_peers may be used when a device wants to inform the rest of the network about some sort of a reconfiguration such as failover or migration. It is unnecessary to call that in other events like FATAL, NON_FATAL, CHANGE_PARAM, and TIMEOUT resets since in those scenarios the hardware does not change. If the driver must do a hard reset, it is necessary to notify peers. Fixes: 61d3e1d9bc2a ("ibmvnic: Remove netdev notify for failover resets") Suggested-by: Brian King Suggested-by: Pradeep Satyanarayana Signed-off-by: Dany Madden Signed-off-by: Lijun Pan Signed-off-by: Jakub Kicinski commit 8393597579f5250636f1cff157ea73f402b6501e Author: Lijun Pan Date: Fri Nov 20 16:40:11 2020 -0600 ibmvnic: fix call_netdevice_notifiers in do_reset When netdev_notify_peers was substituted in commit 986103e7920c ("net/ibmvnic: Fix RTNL deadlock during device reset"), call_netdevice_notifiers(NETDEV_RESEND_IGMP, dev) was missed. Fix it now. Fixes: 986103e7920c ("net/ibmvnic: Fix RTNL deadlock during device reset") Signed-off-by: Lijun Pan Reviewed-by: Dany Madden Signed-off-by: Jakub Kicinski commit 5aac0390a63b8718237a61dd0d24a29201d1c94a Author: Jens Axboe Date: Fri Nov 20 07:59:54 2020 -0700 tun: honor IOCB_NOWAIT flag tun only checks the file O_NONBLOCK flag, but it should also be checking the iocb IOCB_NOWAIT flag. Any fops using ->read/write_iter() should check both, otherwise it breaks users that correctly expect O_NONBLOCK semantics if IOCB_NOWAIT is set. Signed-off-by: Jens Axboe Link: https://lore.kernel.org/r/e9451860-96cc-c7c7-47b8-fe42cadd5f4c@kernel.dk Signed-off-by: Jakub Kicinski commit c5dab0941fcdc9664eb0ec0d4d51433216d91336 Author: Julian Wiedmann Date: Fri Nov 20 11:06:57 2020 +0100 net/af_iucv: set correct sk_protocol for child sockets Child sockets erroneously inherit their parent's sk_type (ie. SOCK_*), instead of the PF_IUCV protocol that the parent was created with in iucv_sock_create(). We're currently not using sk->sk_protocol ourselves, so this shouldn't have much impact (except eg. getting the output in skb_dump() right). Fixes: eac3731bd04c ("[S390]: Add AF_IUCV socket support") Signed-off-by: Julian Wiedmann Link: https://lore.kernel.org/r/20201120100657.34407-1-jwi@linux.ibm.com Signed-off-by: Jakub Kicinski commit f33d9e2b48a34e1558b67a473a1fc1d6e793f93c Author: Yves-Alexis Perez Date: Thu Nov 19 18:24:39 2020 +0100 usbnet: ipheth: fix connectivity with iOS 14 Starting with iOS 14 released in September 2020, connectivity using the personal hotspot USB tethering function of iOS devices is broken. Communication between the host and the device (for example ICMP traffic or DNS resolution using the DNS service running in the device itself) works fine, but communication to endpoints further away doesn't work. Investigation on the matter shows that no UDP and ICMP traffic from the tethered host is reaching the Internet at all. For TCP traffic there are exchanges between tethered host and server but packets are modified in transit leading to impossible communication. After some trials Matti Vuorela discovered that reducing the URB buffer size by two bytes restored the previous behavior. While a better solution might exist to fix the issue, since the protocol is not publicly documented and considering the small size of the fix, let's do that. Tested-by: Matti Vuorela Signed-off-by: Yves-Alexis Perez Link: https://lore.kernel.org/linux-usb/CAAn0qaXmysJ9vx3ZEMkViv_B19ju-_ExN8Yn_uSefxpjS6g4Lw@mail.gmail.com/ Link: https://github.com/libimobiledevice/libimobiledevice/issues/1038 Link: https://lore.kernel.org/r/20201119172439.94988-1-corsac@corsac.net Signed-off-by: Jakub Kicinski commit 659fbdcf2f147010a7624f7eac04f4282814b013 Author: Tom Seewald Date: Fri Nov 20 13:25:28 2020 -0600 cxgb4: Fix build failure when CONFIG_TLS=m After commit 9d2e5e9eeb59 ("cxgb4/ch_ktls: decrypted bit is not enough") whenever CONFIG_TLS=m and CONFIG_CHELSIO_T4=y, the following build failure occurs: ld: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.o: in function `cxgb_select_queue': cxgb4_main.c:(.text+0x2dac): undefined reference to `tls_validate_xmit_skb' Fix this by ensuring that if TLS is set to be a module, CHELSIO_T4 will also be compiled as a module. As otherwise the cxgb4 driver will not be able to access TLS' symbols. Fixes: 9d2e5e9eeb59 ("cxgb4/ch_ktls: decrypted bit is not enough") Signed-off-by: Tom Seewald Link: https://lore.kernel.org/r/20201120192528.615-1-tseewald@gmail.com Signed-off-by: Jakub Kicinski commit b9ad3e9f5a7a760ab068e33e1f18d240ba32ce92 Author: Jamie Iles Date: Fri Nov 20 14:28:27 2020 +0000 bonding: wait for sysfs kobject destruction before freeing struct slave syzkaller found that with CONFIG_DEBUG_KOBJECT_RELEASE=y, releasing a struct slave device could result in the following splat: kobject: 'bonding_slave' (00000000cecdd4fe): kobject_release, parent 0000000074ceb2b2 (delayed 1000) bond0 (unregistering): (slave bond_slave_1): Releasing backup interface ------------[ cut here ]------------ ODEBUG: free active (active state 0) object type: timer_list hint: workqueue_select_cpu_near kernel/workqueue.c:1549 [inline] ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x98 kernel/workqueue.c:1600 WARNING: CPU: 1 PID: 842 at lib/debugobjects.c:485 debug_print_object+0x180/0x240 lib/debugobjects.c:485 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 842 Comm: kworker/u4:4 Tainted: G S 5.9.0-rc8+ #96 Hardware name: linux,dummy-virt (DT) Workqueue: netns cleanup_net Call trace: dump_backtrace+0x0/0x4d8 include/linux/bitmap.h:239 show_stack+0x34/0x48 arch/arm64/kernel/traps.c:142 __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x174/0x1f8 lib/dump_stack.c:118 panic+0x360/0x7a0 kernel/panic.c:231 __warn+0x244/0x2ec kernel/panic.c:600 report_bug+0x240/0x398 lib/bug.c:198 bug_handler+0x50/0xc0 arch/arm64/kernel/traps.c:974 call_break_hook+0x160/0x1d8 arch/arm64/kernel/debug-monitors.c:322 brk_handler+0x30/0xc0 arch/arm64/kernel/debug-monitors.c:329 do_debug_exception+0x184/0x340 arch/arm64/mm/fault.c:864 el1_dbg+0x48/0xb0 arch/arm64/kernel/entry-common.c:65 el1_sync_handler+0x170/0x1c8 arch/arm64/kernel/entry-common.c:93 el1_sync+0x80/0x100 arch/arm64/kernel/entry.S:594 debug_print_object+0x180/0x240 lib/debugobjects.c:485 __debug_check_no_obj_freed lib/debugobjects.c:967 [inline] debug_check_no_obj_freed+0x200/0x430 lib/debugobjects.c:998 slab_free_hook mm/slub.c:1536 [inline] slab_free_freelist_hook+0x190/0x210 mm/slub.c:1577 slab_free mm/slub.c:3138 [inline] kfree+0x13c/0x460 mm/slub.c:4119 bond_free_slave+0x8c/0xf8 drivers/net/bonding/bond_main.c:1492 __bond_release_one+0xe0c/0xec8 drivers/net/bonding/bond_main.c:2190 bond_slave_netdev_event drivers/net/bonding/bond_main.c:3309 [inline] bond_netdev_event+0x8f0/0xa70 drivers/net/bonding/bond_main.c:3420 notifier_call_chain+0xf0/0x200 kernel/notifier.c:83 __raw_notifier_call_chain kernel/notifier.c:361 [inline] raw_notifier_call_chain+0x44/0x58 kernel/notifier.c:368 call_netdevice_notifiers_info+0xbc/0x150 net/core/dev.c:2033 call_netdevice_notifiers_extack net/core/dev.c:2045 [inline] call_netdevice_notifiers net/core/dev.c:2059 [inline] rollback_registered_many+0x6a4/0xec0 net/core/dev.c:9347 unregister_netdevice_many.part.0+0x2c/0x1c0 net/core/dev.c:10509 unregister_netdevice_many net/core/dev.c:10508 [inline] default_device_exit_batch+0x294/0x338 net/core/dev.c:10992 ops_exit_list.isra.0+0xec/0x150 net/core/net_namespace.c:189 cleanup_net+0x44c/0x888 net/core/net_namespace.c:603 process_one_work+0x96c/0x18c0 kernel/workqueue.c:2269 worker_thread+0x3f0/0xc30 kernel/workqueue.c:2415 kthread+0x390/0x498 kernel/kthread.c:292 ret_from_fork+0x10/0x18 arch/arm64/kernel/entry.S:925 This is a potential use-after-free if the sysfs nodes are being accessed whilst removing the struct slave, so wait for the object destruction to complete before freeing the struct slave itself. Fixes: 07699f9a7c8d ("bonding: add sysfs /slave dir for bond slave devices.") Fixes: a068aab42258 ("bonding: Fix reference count leak in bond_sysfs_slave_add.") Cc: Qiushi Wu Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Signed-off-by: Jamie Iles Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20201120142827.879226-1-jamie@nuviainc.com Signed-off-by: Jakub Kicinski commit a349e4c659609fd20e4beea89e5c4a4038e33a95 Merge: ba911108f4ec1 eb8409071a1d4 Author: Linus Torvalds Date: Sat Nov 21 10:36:25 2020 -0800 Merge tag 'xfs-5.10-fixes-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "The critical fixes are for a crash that someone reported in the xattr code on 32-bit arm last week; and a revert of the rmap key comparison change from last week as it was totally wrong. I need a vacation. :( Summary: - Fix various deficiencies in online fsck's metadata checking code - Fix an integer casting bug in the xattr code on 32-bit systems - Fix a hang in an inode walk when the inode index is corrupt - Fix error codes being dropped when initializing per-AG structures - Fix nowait directio writes that partially succeed but return EAGAIN - Revert last week's rmap comparison patch because it was wrong" * tag 'xfs-5.10-fixes-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: revert "xfs: fix rmap key and record comparison functions" xfs: don't allow NOWAIT DIO across extent boundaries xfs: return corresponding errcode if xfs_initialize_perag() fail xfs: ensure inobt record walks always make forward progress xfs: fix forkoff miscalculation related to XFS_LITINO(mp) xfs: directory scrub should check the null bestfree entries too xfs: strengthen rmap record flags checking xfs: fix the minrecs logic when dealing with inode root child blocks commit ba911108f4ec1643b7b1d1c1db88e4f8451f201b Merge: ea0ab64306355 7372e79c9eb9d Author: Linus Torvalds Date: Sat Nov 21 10:33:33 2020 -0800 Merge tag 'fsnotify_for_v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fanotify fix from Jan Kara: "A single fanotify fix from Amir" * tag 'fsnotify_for_v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fanotify: fix logic of reporting name info with watched parent commit ea0ab64306355432746bafda0364fb2d593bc9e3 Merge: 27bba9c532a8d 4c222f31fb1db Author: Linus Torvalds Date: Sat Nov 21 10:24:05 2020 -0800 Merge tag 'seccomp-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp fixes from Kees Cook: "This gets the seccomp selftests running again on powerpc and sh, and fixes an audit reporting oversight noticed in both seccomp and ptrace. - Fix typos in seccomp selftests on powerpc and sh (Kees Cook) - Fix PF_SUPERPRIV audit marking in seccomp and ptrace (Mickaël Salaün)" * tag 'seccomp-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: selftests/seccomp: sh: Fix register names selftests/seccomp: powerpc: Fix typo in macro variable name seccomp: Set PF_SUPERPRIV when checking capability ptrace: Set PF_SUPERPRIV when checking capability commit 487778f8d22fcdebb6436f0a5f96484ffa237b0b Author: CK Hu Date: Fri Nov 13 11:49:07 2020 +0800 drm/mediatek: dsi: Modify horizontal front/back porch byte formula In the patch to be fixed, horizontal_backporch_byte become too large for some panel, so roll back that patch. For small hfp or hbp panel, using vm->hfront_porch + vm->hback_porch to calculate horizontal_backporch_byte would make it negtive, so use horizontal_backporch_byte itself to make it positive. Fixes: 35bf948f1edb ("drm/mediatek: dsi: Fix scrolling of panel with small hfp or hbp") Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu Tested-by: Bilal Wasim commit 207d0bfc08f1553ac9cec4f3a2c31936319368c5 Merge: e10823c71920c 7ed10e16e50da Author: Jakub Kicinski Date: Fri Nov 20 18:59:50 2020 -0800 Merge branch 's390-qeth-fixes-2020-11-20' Julian Wiedmann says: ==================== s390/qeth: fixes 2020-11-20 This brings several fixes for qeth's af_iucv-specific code paths. Also one fix by Alexandra for the recently added BR_LEARNING_SYNC support. We want to trust the feature indication bit, so that HW can mask it out if there's any issues on their end. ==================== Link: https://lore.kernel.org/r/20201120090939.101406-1-jwi@linux.ibm.com Signed-off-by: Jakub Kicinski commit 7ed10e16e50daf74460f54bc922e27c6863c8d61 Author: Julian Wiedmann Date: Fri Nov 20 10:09:39 2020 +0100 s390/qeth: fix tear down of async TX buffers When qeth_iqd_tx_complete() detects that a TX buffer requires additional async completion via QAOB, it might fail to replace the queue entry's metadata (and ends up triggering recovery). Assume now that the device gets torn down, overruling the recovery. If the QAOB notification then arrives before the tear down has sufficiently progressed, the buffer state is changed to QETH_QDIO_BUF_HANDLED_DELAYED by qeth_qdio_handle_aob(). The tear down code calls qeth_drain_output_queue(), where qeth_cleanup_handled_pending() will then attempt to replace such a buffer _again_. If it succeeds this time, the buffer ends up dangling in its replacement's ->next_pending list ... where it will never be freed, since there's no further call to qeth_cleanup_handled_pending(). But the second attempt isn't actually needed, we can simply leave the buffer on the queue and re-use it after a potential recovery has completed. The qeth_clear_output_buffer() in qeth_drain_output_queue() will ensure that it's in a clean state again. Fixes: 72861ae792c2 ("qeth: recovery through asynchronous delivery") Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 8908f36d20d8ba610d3a7d110b3049b5853b9bb1 Author: Julian Wiedmann Date: Fri Nov 20 10:09:38 2020 +0100 s390/qeth: fix af_iucv notification race The two expected notification sequences are 1. TX_NOTIFY_PENDING with a subsequent TX_NOTIFY_DELAYED_*, when our TX completion code first observed the pending TX and the QAOB then completes at a later time; or 2. TX_NOTIFY_OK, when qeth_qdio_handle_aob() picked up the QAOB completion before our TX completion code even noticed that the TX was pending. But as qeth_iqd_tx_complete() and qeth_qdio_handle_aob() can run concurrently, we may end up with a race that results in a sequence of TX_NOTIFY_DELAYED_* followed by TX_NOTIFY_PENDING. Which would confuse the af_iucv code in its tracking of pending transmits. Rework the notification code, so that qeth_qdio_handle_aob() defers its notification if the TX completion code is still active. Fixes: b333293058aa ("qeth: add support for af_iucv HiperSockets transport") Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 34c7f50f7d0d36fa663c74aee39e25e912505320 Author: Julian Wiedmann Date: Fri Nov 20 10:09:37 2020 +0100 s390/qeth: make af_iucv TX notification call more robust Calling into socket code is ugly already, at least check whether we are dealing with the expected sk_family. Only looking at skb->protocol is bound to cause troubles (consider eg. af_packet). Fixes: b333293058aa ("qeth: add support for af_iucv HiperSockets transport") Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 0d0e2b538c13f4f698ba58485a573ce824036567 Author: Alexandra Winter Date: Fri Nov 20 10:09:36 2020 +0100 s390/qeth: Remove pnso workaround Remove workaround that supported early hardware implementations of PNSO OC3. Rely on the 'enarf' feature bit instead. Fixes: fa115adff2c1 ("s390/qeth: Detect PNSO OC3 capability") Signed-off-by: Alexandra Winter Reviewed-by: Julian Wiedmann [jwi: use logical instead of bit-wise AND] Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit e10823c71920c6fd54ab85677f001d7978bcb3ae Merge: d2624e70a2f53 55472017a4219 Author: Jakub Kicinski Date: Fri Nov 20 18:10:47 2020 -0800 Merge branch 'tcp-address-issues-with-ect0-not-being-set-in-dctcp-packets' Alexander Duyck says: ==================== tcp: Address issues with ECT0 not being set in DCTCP packets This patch set is meant to address issues seen with SYN/ACK packets not containing the ECT0 bit when DCTCP is configured as the congestion control algorithm for a TCP socket. A simple test using "tcpdump" and "test_progs -t bpf_tcp_ca" makes the issue obvious. Looking at the packets will result in the SYN/ACK packet with an ECT0 bit that does not match the other packets for the flow when the congestion control agorithm is switch from the default. So for example going from non-DCTCP to a DCTCP congestion control algorithm we will see the SYN/ACK IPV6 header will not have ECT0 set while the other packets in the flow will. Likewise if we switch from a default of DCTCP to cubic we will see the ECT0 bit set in the SYN/ACK while the other packets in the flow will not. ==================== Link: https://lore.kernel.org/r/160582070138.66684.11785214534154816097.stgit@localhost.localdomain Signed-off-by: Jakub Kicinski commit 55472017a4219ca965a957584affdb17549ae4a4 Author: Alexander Duyck Date: Thu Nov 19 13:23:58 2020 -0800 tcp: Set INET_ECN_xmit configuration in tcp_reinit_congestion_control When setting congestion control via a BPF program it is seen that the SYN/ACK for packets within a given flow will not include the ECT0 flag. A bit of simple printk debugging shows that when this is configured without BPF we will see the value INET_ECN_xmit value initialized in tcp_assign_congestion_control however when we configure this via BPF the socket is in the closed state and as such it isn't configured, and I do not see it being initialized when we transition the socket into the listen state. The result of this is that the ECT0 bit is configured based on whatever the default state is for the socket. Any easy way to reproduce this is to monitor the following with tcpdump: tools/testing/selftests/bpf/test_progs -t bpf_tcp_ca Without this patch the SYN/ACK will follow whatever the default is. If dctcp all SYN/ACK packets will have the ECT0 bit set, and if it is not then ECT0 will be cleared on all SYN/ACK packets. With this patch applied the SYN/ACK bit matches the value seen on the other packets in the given stream. Fixes: 91b5b21c7c16 ("bpf: Add support for changing congestion control") Signed-off-by: Alexander Duyck Signed-off-by: Jakub Kicinski commit 861602b57730a5c6d3e0b1e4ca7133ca9a8b8538 Author: Alexander Duyck Date: Thu Nov 19 13:23:51 2020 -0800 tcp: Allow full IP tos/IPv6 tclass to be reflected in L3 header An issue was recently found where DCTCP SYN/ACK packets did not have the ECT bit set in the L3 header. A bit of code review found that the recent change referenced below had gone though and added a mask that prevented the ECN bits from being populated in the L3 header. This patch addresses that by rolling back the mask so that it is only applied to the flags coming from the incoming TCP request instead of applying it to the socket tos/tclass field. Doing this the ECT bits were restored in the SYN/ACK packets in my testing. One thing that is not addressed by this patch set is the fact that tcp_reflect_tos appears to be incompatible with ECN based congestion avoidance algorithms. At a minimum the feature should likely be documented which it currently isn't. Fixes: ac8f1710c12b ("tcp: reflect tos value received in SYN to the socket") Signed-off-by: Alexander Duyck Acked-by: Wei Wang Signed-off-by: Jakub Kicinski commit 27bba9c532a8d21050b94224ffd310ad0058c353 Merge: 4fd84bc969295 f36199355c64a Author: Linus Torvalds Date: Fri Nov 20 16:24:28 2020 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Fixes for two fairly obscure but annoying when triggered races in iSCSI" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: target: iscsi: Fix cmd abort fabric stop race scsi: libiscsi: Fix NOP race condition commit d2624e70a2f53b6f402fdaeabe7db798148618c5 Author: Ioana Ciornei Date: Thu Nov 19 16:51:06 2020 +0200 dpaa2-eth: select XGMAC_MDIO for MDIO bus support Explicitly enable the FSL_XGMAC_MDIO Kconfig option in order to have MDIO access to internal and external PHYs. Fixes: 719479230893 ("dpaa2-eth: add MAC/PHY support through phylink") Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20201119145106.712761-1-ciorneiioana@gmail.com Signed-off-by: Jakub Kicinski commit 4fd84bc9692958cd07b3a3320dba26baa04a17d0 Merge: fa5fca78bb2fe 45f703a0d4b87 Author: Linus Torvalds Date: Fri Nov 20 12:03:40 2020 -0800 Merge tag 'block-5.10-2020-11-20' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe pull request from Christoph: - Doorbell Buffer freeing fix (Minwoo Im) - CSE log leak fix (Keith Busch) - blk-cgroup hd_struct leak fix (Christoph) - Flush request state fix (Ming) - dasd NULL deref fix (Stefan) * tag 'block-5.10-2020-11-20' of git://git.kernel.dk/linux-block: s390/dasd: fix null pointer dereference for ERP requests blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats nvme: fix memory leak freeing command effects nvme: directly cache command effects log nvme: free sq/cq dbbuf pointers when dbbuf set fails block: mark flush request as IDLE when it is really finished commit fa5fca78bb2fe7a58ae7297407dcda1914ea8353 Merge: 4ccf7a01e805f e297822b20e7f Author: Linus Torvalds Date: Fri Nov 20 11:47:22 2020 -0800 Merge tag 'io_uring-5.10-2020-11-20' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Mostly regression or stable fodder: - Disallow async path resolution of /proc/self - Tighten constraints for segmented async buffered reads - Fix double completion for a retry error case - Fix for fixed file life times (Pavel)" * tag 'io_uring-5.10-2020-11-20' of git://git.kernel.dk/linux-block: io_uring: order refnode recycling io_uring: get an active ref_node from files_data io_uring: don't double complete failed reissue request mm: never attempt async page lock if we've transferred data already io_uring: handle -EOPNOTSUPP on path resolution proc: don't allow async path resolution of /proc/self components commit bff453921ae105a8dbbad0ed7dd5f5ce424536e7 Author: Raju Rangoju Date: Wed Nov 18 20:02:13 2020 +0530 cxgb4: fix the panic caused by non smac rewrite SMT entry is allocated only when loopback Source MAC rewriting is requested. Accessing SMT entry for non smac rewrite cases results in kernel panic. Fix the panic caused by non smac rewrite Fixes: 937d84205884 ("cxgb4: set up filter action after rewrites") Signed-off-by: Raju Rangoju Link: https://lore.kernel.org/r/20201118143213.13319-1-rajur@chelsio.com Signed-off-by: Jakub Kicinski commit 4c222f31fb1db4d590503a181a6268ced9252379 Author: Kees Cook Date: Tue Nov 17 11:54:43 2020 -0800 selftests/seccomp: sh: Fix register names It looks like the seccomp selftests was never actually built for sh. This fixes it, though I don't have an environment to do a runtime test of it yet. Fixes: 0bb605c2c7f2b4b3 ("sh: Add SECCOMP_FILTER") Tested-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/lkml/a36d7b48-6598-1642-e403-0c77a86f416d@physik.fu-berlin.de Signed-off-by: Kees Cook commit f5098e34dd4c774c3040e417960f1637e5daade8 Author: Kees Cook Date: Tue Nov 17 11:33:02 2020 -0800 selftests/seccomp: powerpc: Fix typo in macro variable name A typo sneaked into the powerpc selftest. Fix the name so it builds again. Fixes: 46138329faea ("selftests/seccomp: powerpc: Fix seccomp return value testing") Acked-by: Michael Ellerman Link: https://lore.kernel.org/lkml/87y2ix2895.fsf@mpe.ellerman.id.au Signed-off-by: Kees Cook commit 47a846536e1bf62626f1c0d8488f3718ce5f8296 Author: Eric Biggers Date: Wed Nov 11 13:48:55 2020 -0800 block/keyslot-manager: prevent crash when num_slots=1 If there is only one keyslot, then blk_ksm_init() computes slot_hashtable_size=1 and log_slot_ht_size=0. This causes blk_ksm_find_keyslot() to crash later because it uses hash_ptr(key, log_slot_ht_size) to find the hash bucket containing the key, and hash_ptr() doesn't support the bits == 0 case. Fix this by making the hash table always have at least 2 buckets. Tested by running: kvm-xfstests -c ext4 -g encrypt -m inlinecrypt \ -o blk-crypto-fallback.num_keyslots=1 Fixes: 1b2628397058 ("block: Keyslot Manager for Inline Encryption") Signed-off-by: Eric Biggers Signed-off-by: Jens Axboe commit 4ccf7a01e805f04defd423fb410f47a13af76399 Merge: bd4d74e8f8b20 65cae18882f94 Author: Linus Torvalds Date: Fri Nov 20 10:30:48 2020 -0800 Merge tag 'for-linus-5.10b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix from Juergen Gross: "A single fix for avoiding WARN splats when booting a Xen guest with nosmt" * tag 'for-linus-5.10b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: don't unbind uninitialized lock_kicker_irq commit 20ffc7adf53a5fd3d19751fbff7895bcca66686e Author: Vadim Fedorenko Date: Thu Nov 19 18:59:48 2020 +0300 net/tls: missing received data after fast remote close In case when tcp socket received FIN after some data and the parser haven't started before reading data caller will receive an empty buffer. This behavior differs from plain TCP socket and leads to special treating in user-space. The flow that triggers the race is simple. Server sends small amount of data right after the connection is configured to use TLS and closes the connection. In this case receiver sees TLS Handshake data, configures TLS socket right after Change Cipher Spec record. While the configuration is in process, TCP socket receives small Application Data record, Encrypted Alert record and FIN packet. So the TCP socket changes sk_shutdown to RCV_SHUTDOWN and sk_flag with SK_DONE bit set. The received data is not parsed upon arrival and is never sent to user-space. Patch unpauses parser directly if we have unparsed data in tcp receive queue. Fixes: fcf4793e278e ("tls: check RCV_SHUTDOWN in tls_wait_data") Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/1605801588-12236-1-git-send-email-vfedorenko@novek.ru Signed-off-by: Jakub Kicinski commit bd4d74e8f8b201caf4dab064b8bc7d01a72747da Merge: fc8299f9f3b9f 7e4be1290a38b Author: Linus Torvalds Date: Fri Nov 20 10:23:49 2020 -0800 Merge tag 'dmaengine-fix-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: "A solitary core fix and a few driver fixes: Core: - channel_register error handling Driver fixes: - idxd: wq config registers programming and mapping of portal size - ioatdma: unused fn removal - pl330: fix burst size - ti: pm fix on busy and -Wenum-conversion warns - xilinx: SG capability check, usage of xilinx_aximcdma_tx_segment, readl_poll_timeout_atomic variant" * tag 'dmaengine-fix-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: fix error codes in channel_register() dmaengine: pl330: _prep_dma_memcpy: Fix wrong burst size dmaengine: ioatdma: remove unused function missed during dma_v2 removal dmaengine: idxd: fix mapping of portal size dmaengine: ti: omap-dma: Block PM if SDMA is busy to fix audio dmaengine: xilinx_dma: Fix SG capability check for MCDMA dmaengine: xilinx_dma: Fix usage of xilinx_aximcdma_tx_segment dmaengine: xilinx_dma: use readl_poll_timeout_atomic variant dmaengine: ti: k3-udma: fix -Wenum-conversion warning dmaengine: idxd: fix wq config registers offset programming commit fc8299f9f3b9f3b0e1c8c9f719b5deb2a74ab314 Merge: 5de18678da02d 91c2c28d8de34 Author: Linus Torvalds Date: Fri Nov 20 10:20:16 2020 -0800 Merge tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull iommu fixes from Will Deacon: "Two straightforward vt-d fixes: - Fix boot when intel iommu initialisation fails under TXT (tboot) - Fix intel iommu compilation error when DMAR is enabled without ATS and temporarily update IOMMU MAINTAINERs entry" * tag 'iommu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: MAINTAINERS: Temporarily add myself to the IOMMU entry iommu/vt-d: Fix compile error with CONFIG_PCI_ATS not set iommu/vt-d: Avoid panic if iommu init fails in tboot system commit 5de18678da02d893d2c1eb149583fca23c96584a Merge: e65b30951e507 d06d60d52ec0b Author: Linus Torvalds Date: Fri Nov 20 10:16:26 2020 -0800 Merge tag 'mmc-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "A couple of MMC fixes: - sdhci-of-arasan: Stabilize communication by fixing tap value configs - sdhci-pci: Use SDR25 timing for HS mode for BYT-based Intel HWs" * tag 'mmc-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-of-arasan: Issue DLL reset explicitly mmc: sdhci-of-arasan: Use Mask writes for Tap delays mmc: sdhci-of-arasan: Allow configuring zero tap values mmc: sdhci-pci: Prefer SDR25 timing for High Speed mode for BYT-based Intel controllers commit c54bc3ced5106663c2f2b44071800621f505b00e Author: Michael Chan Date: Fri Nov 20 02:44:31 2020 -0500 bnxt_en: Release PCI regions when DMA mask setup fails during probe. Jump to init_err_release to cleanup. bnxt_unmap_bars() will also be called but it will do nothing if the BARs are not mapped yet. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Reported-by: Jakub Kicinski Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1605858271-8209-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 3b3fd068c56e3fbea30090859216a368398e39bf Author: Anmol Karn Date: Fri Nov 20 00:40:43 2020 +0530 rose: Fix Null pointer dereference in rose_send_frame() rose_send_frame() dereferences `neigh->dev` when called from rose_transmit_clear_request(), and the first occurrence of the `neigh` is in rose_loopback_timer() as `rose_loopback_neigh`, and it is initialized in rose_add_loopback_neigh() as NULL. i.e when `rose_loopback_neigh` used in rose_loopback_timer() its `->dev` was still NULL and rose_loopback_timer() was calling rose_rx_call_request() without checking for NULL. - net/rose/rose_link.c This bug seems to get triggered in this line: rose_call = (ax25_address *)neigh->dev->dev_addr; Fix it by adding NULL checking for `rose_loopback_neigh->dev` in rose_loopback_timer(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Suggested-by: Jakub Kicinski Reported-by: syzbot+a1c743815982d9496393@syzkaller.appspotmail.com Tested-by: syzbot+a1c743815982d9496393@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=9d2a7ca8c7f2e4b682c97578dfa3f236258300b3 Signed-off-by: Anmol Karn Link: https://lore.kernel.org/r/20201119191043.28813-1-anmol.karan123@gmail.com Signed-off-by: Jakub Kicinski commit e65b30951e50708cb306eb75231329a3a3029a7d Merge: 46cbc18ed8521 aecd1fbe7784e Author: Linus Torvalds Date: Fri Nov 20 09:56:16 2020 -0800 Merge tag 'sound-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes: the only core change is a minor error code handling in the control API, and all the rest are device-specific fixes, mostly quirks, fixups and ASoC Intel fixes. It looks boring, and good so" * tag 'sound-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: mixart: Fix mutex deadlock ALSA: hda/ca0132: Fix compile warning without PCI ASOC: Intel: kbl_rt5663_rt5514_max98927: Do not try to disable disabled clock ALSA: usb-audio: Add delay quirk for all Logitech USB devices ASoC: Intel: catpt: Correct clock selection for dai trigger ASoC: Intel: catpt: Skip position update for unprepared streams ASoC: qcom: lpass-platform: Fix memory leak ASoC: Intel: KMB: Fix S24_LE configuration ALSA: hda: Add Alderlake-S PCI ID and HDMI codec vid ALSA: usb-audio: Use ALC1220-VB-DT mapping for ASUS ROG Strix TRX40 mobo ALSA: firewire: Clean up a locking issue in copy_resp_to_buf() ASoC: rt1015: increase the time to detect BCLK ALSA: ctl: fix error path at adding user-defined element set ALSA: hda/realtek - HP Headset Mic can't detect after boot ALSA: hda/realtek - Add supported mute Led for HP ALSA: hda/realtek: Add some Clove SSID in the ALC293(ALC1220) ALSA: hda/realtek - Add supported for Lenovo ThinkPad Headset Button ASoC: rt1015: add delay to fix pop noise from speaker commit 46cbc18ed85219d534b4fbb4a39058fe66766e83 Merge: 4d02da974ea85 6600f9d52213b Author: Linus Torvalds Date: Fri Nov 20 09:49:25 2020 -0800 Merge tag 'drm-fixes-2020-11-20-2' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Weekly fixes pull. This contains some fixes for sun4i/dw-hdmi probing, then amdgpu enables arcturus hw without experimental flag and two other fixes and a group of i915 fixes. It also has a backported from next fix for the warn on reported in ast/drm_gem_vram_helper code in the merge window. There's a separate report which initially looked to be the same problem, but I'm going to chase that up next week a bit more as I don't think the bisect landed anywhere useful. Summary: core: - vram helper TTM regression fix amdgpu: - Pageflip fix for navi1x with 5 or 6 displays - Remove experimental flag for Arcturus - Fix regression in atomic commit tail rework i915: - Fix tgl power gating issue - Memory leak fixes - Selftest fixes - Display bpc fix - Fix TGL MOCS for PTE tracking dw-hdmi: - probing fix sun4i: - probing fix" * tag 'drm-fixes-2020-11-20-2' of git://anongit.freedesktop.org/drm/drm: drm/i915/gt: Fixup tgl mocs for PTE tracking drm/vram-helper: Fix use of top-down placement drm/i915/gt: Remember to free the virtual breadcrumbs drm/i915: Handle max_bpc==16 drm/amd/display: Always get CRTC updated constant values inside commit tail drm/sun4i: backend: Fix probe failure with multiple backends drm/sun4i: dw-hdmi: fix error return code in sun8i_dw_hdmi_bind() drm/i915/selftests: Fix wrong return value of perf_request_latency() drm/i915/selftests: Fix wrong return value of perf_series_engines() drm/i915: Avoid memory leak with more than 16 workarounds on a list drm/i915/tgl: Fix Media power gate sequence. drm/amdgpu: remove experimental flag from arcturus drm/amd/display: Add missing pflip irq for dcn2.0 drm/i915/gvt: return error when failing to take the module reference drm: bridge: dw-hdmi: Avoid resetting force in the detect function drm/i915/gvt: Set ENHANCED_FRAME_CAP bit drm/i915/gvt: Temporarily disable vfio_edid for BXT/APL commit f46e79aa1a2bea7de2885fa8d79a68d11545a5fd Author: Martin Habets Date: Fri Nov 20 11:32:07 2020 +0000 MAINTAINERS: Change Solarflare maintainers Email from solarflare.com will stop working. Update the maintainers. A replacement for linux-net-drivers@solarflare.com is not working yet, for now remove it. Signed-off-by: Martin Habets Signed-off-by: Edward Cree Link: https://lore.kernel.org/r/20201120113207.GA1605547@mh-desktop Signed-off-by: Jakub Kicinski commit 4fae3a58ab59d8a286864d61fe1846283a0316f2 Author: Serge Semin Date: Tue Nov 17 12:45:17 2020 +0300 spi: Take the SPI IO-mutex in the spi_setup() method I've discovered that due to the recent commit 49d7d695ca4b ("spi: dw: Explicitly de-assert CS on SPI transfer completion") a concurrent usage of the spidev devices with different chip-selects causes the "SPI transfer timed out" error. The root cause of the problem has turned to be in a race condition of the SPI-transfer execution procedure and the spi_setup() method being called at the same time. In particular in calling the spi_set_cs(false) while there is an SPI-transfer being executed. In my case due to the commit cited above all CSs get to be switched off by calling the spi_setup() for /dev/spidev0.1 while there is an concurrent SPI-transfer execution performed on /dev/spidev0.0. Of course a situation of the spi_setup() being called while there is an SPI-transfer being executed for two different SPI peripheral devices of the same controller may happen not only for the spidev driver, but for instance for MMC SPI + some another device, or spi_setup() being called from an SPI-peripheral probe method while some other device has already been probed and is being used by a corresponding driver... Of course I could have provided a fix affecting the DW APB SSI driver only, for instance, by creating a mutual exclusive access to the set_cs callback and setting/clearing only the bit responsible for the corresponding chip-select. But after a short research I've discovered that the problem most likely affects a lot of the other drivers: - drivers/spi/spi-sun4i.c - RMW the chip-select register; - drivers/spi/spi-rockchip.c - RMW the chip-select register; - drivers/spi/spi-qup.c - RMW a generic force-CS flag in a CSR. - drivers/spi/spi-sifive.c - set a generic CS-mode flag in a CSR. - drivers/spi/spi-bcm63xx-hsspi.c - uses an internal mutex to serialize the bus config changes, but still isn't protected from the race condition described above; - drivers/spi/spi-geni-qcom.c - RMW a chip-select internal flag and set the CS state in HW; - drivers/spi/spi-orion.c - RMW a chip-select register; - drivers/spi/spi-cadence.c - RMW a chip-select register; - drivers/spi/spi-armada-3700.c - RMW a chip-select register; - drivers/spi/spi-lantiq-ssc.c - overwrites the chip-select register; - drivers/spi/spi-sun6i.c - RMW a chip-select register; - drivers/spi/spi-synquacer.c - RMW a chip-select register; - drivers/spi/spi-altera.c - directly sets the chip-select state; - drivers/spi/spi-omap2-mcspi.c - RMW an internally cached CS state and writes it to HW; - drivers/spi/spi-mt65xx.c - RMW some CSR; - drivers/spi/spi-jcore.c - directly sets the chip-selects state; - drivers/spi/spi-mt7621.c - RMW a chip-select register; I could have missed some drivers, but a scale of the problem is obvious. As you can see most of the drivers perform an unprotected Read-modify-write chip-select register modification in the set_cs callback. Seeing the spi_setup() function is calling the spi_set_cs() and it can be executed concurrently with SPI-transfers exec procedure, which also calls spi_set_cs() in the SPI core spi_transfer_one_message() method, the race condition of the register modification turns to be obvious. To sum up the problem denoted above affects each driver for a controller having more than one chip-select lane and which: 1) performs the RMW to some CS-related register with no serialization; 2) directly disables any CS on spi_set_cs(dev, false). * the later is the case of the DW APB SSI driver. The controllers which equipped with a single CS theoretically can also experience the problem, but in practice will not since normally the spi_setup() isn't called concurrently with the SPI-transfers executed on the same SPI peripheral device. In order to generically fix the denoted bug I'd suggest to serialize an access to the controller IO by taking the IO mutex in the spi_setup() callback. The mutex is held while there is an SPI communication going on on the SPI-bus of the corresponding SPI-controller. So calling the spi_setup() method and disabling/updating the CS state within it would be safe while there is no any SPI-transfers being executed. Also note I suppose it would be safer to protect the spi_controller->setup() callback invocation too, seeing some of the SPI-controller drivers update a HW state in there. Fixes: 49d7d695ca4b ("spi: dw: Explicitly de-assert CS on SPI transfer completion") Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201117094517.5654-1-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit a98fd117a2553ab1a6d2fe3c7acae88c1eca4372 Author: Icenowy Zheng Date: Fri Nov 20 13:08:51 2020 +0800 ARM: dts: sun8i: v3s: fix GIC node memory range Currently the GIC node in V3s DTSI follows some old DT examples, and being broken. This leads a warning at boot. Fix this. Fixes: f989086ccbc6 ("ARM: dts: sunxi: add dtsi file for V3s SoC") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201120050851.4123759-1-icenowy@aosc.io commit f3bc432aa8a7a2bfe9ebb432502be5c5d979d7fe Author: Alan Stern Date: Thu Nov 19 12:02:28 2020 -0500 USB: core: Change %pK for __user pointers to %px Commit 2f964780c03b ("USB: core: replace %p with %pK") used the %pK format specifier for a bunch of __user pointers. But as the 'K' in the specifier indicates, it is meant for kernel pointers. The reason for the %pK specifier is to avoid leaks of kernel addresses, but when the pointer is to an address in userspace the security implications are minimal. In particular, no kernel information is leaked. This patch changes the __user %pK specifiers (used in a bunch of debugging output lines) to %px, which will always print the actual address with no mangling. (Notably, there is no printk format specifier particularly intended for __user pointers.) Fixes: 2f964780c03b ("USB: core: replace %p with %pK") CC: Vamsi Krishna Samavedam CC: Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20201119170228.GB576844@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit c2b1209d852fef65dbe13c1eed2c6d7a8cd0d1f8 Author: Sean Christopherson Date: Thu Nov 19 10:37:07 2020 -0800 MAINTAINERS: Update email address for Sean Christopherson Update my email address to one provided by my new benefactor. Cc: Thomas Gleixner Cc: Borislav Petkov Cc: Jarkko Sakkinen Cc: Dave Hansen Cc: Andy Lutomirski Cc: Vitaly Kuznetsov Cc: Wanpeng Li Cc: Jim Mattson Cc: Joerg Roedel Cc: kvm@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20201119183707.291864-1-sean.kvm@gmail.com> Signed-off-by: Paolo Bonzini commit 184eead057cc7e803558269babc1f2cfb9113ad1 Author: Alan Stern Date: Thu Nov 19 12:00:40 2020 -0500 USB: core: Fix regression in Hercules audio card Commit 3e4f8e21c4f2 ("USB: core: fix check for duplicate endpoints") aimed to make the USB stack more reliable by detecting and skipping over endpoints that are duplicated between interfaces. This caused a regression for a Hercules audio card (reported as Bugzilla #208357), which contains such non-compliant duplications. Although the duplications are harmless, skipping the valid endpoints prevented the device from working. This patch fixes the regression by adding ENDPOINT_IGNORE quirks for the Hercules card, telling the kernel to ignore the invalid duplicate endpoints and thereby allowing the valid endpoints to be used as intended. Fixes: 3e4f8e21c4f2 ("USB: core: fix check for duplicate endpoints") CC: Reported-by: Alexander Chalikiopoulos Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20201119170040.GA576844@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 87bed3d7d26c974948a3d6e7176f304b2d41272b Author: Zhang Qilong Date: Tue Nov 17 10:16:29 2020 +0800 usb: gadget: Fix memleak in gadgetfs_fill_super usb_get_gadget_udc_name will alloc memory for CHIP in "Enomem" branch. we should free it before error returns to prevent memleak. Fixes: 175f712119c57 ("usb: gadget: provide interface for legacy gadgets to get UDC name") Reported-by: Hulk Robot Acked-by: Alan Stern Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201117021629.1470544-3-zhangqilong3@huawei.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit e7694cb6998379341fd9bf3bd62b48c4e6a79385 Author: Zhang Qilong Date: Tue Nov 17 10:16:28 2020 +0800 usb: gadget: f_midi: Fix memleak in f_midi_alloc In the error path, if midi is not null, we should free the midi->id if necessary to prevent memleak. Fixes: b85e9de9e818d ("usb: gadget: f_midi: convert to new function interface with backward compatibility") Reported-by: Hulk Robot Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201117021629.1470544-2-zhangqilong3@huawei.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 9ca57518361418ad5ae7dc38a2128fbf4855e1a2 Author: penghao Date: Wed Nov 18 20:30:39 2020 +0800 USB: quirks: Add USB_QUIRK_DISCONNECT_SUSPEND quirk for Lenovo A630Z TIO built-in usb-audio card Add a USB_QUIRK_DISCONNECT_SUSPEND quirk for the Lenovo TIO built-in usb-audio. when A630Z going into S3,the system immediately wakeup 7-8 seconds later by usb-audio disconnect interrupt to avoids the issue. eg dmesg: .... [ 626.974091 ] usb 7-1.1: USB disconnect, device number 3 .... .... [ 1774.486691] usb 7-1.1: new full-speed USB device number 5 using xhci_hcd [ 1774.947742] usb 7-1.1: New USB device found, idVendor=17ef, idProduct=a012, bcdDevice= 0.55 [ 1774.956588] usb 7-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1774.964339] usb 7-1.1: Product: Thinkcentre TIO24Gen3 for USB-audio [ 1774.970999] usb 7-1.1: Manufacturer: Lenovo [ 1774.975447] usb 7-1.1: SerialNumber: 000000000000 [ 1775.048590] usb 7-1.1: 2:1: cannot get freq at ep 0x1 ....... Seeking a better fix, we've tried a lot of things, including: - Check that the device's power/wakeup is disabled - Check that remote wakeup is off at the USB level - All the quirks in drivers/usb/core/quirks.c e.g. USB_QUIRK_RESET_RESUME, USB_QUIRK_RESET, USB_QUIRK_IGNORE_REMOTE_WAKEUP, USB_QUIRK_NO_LPM. but none of that makes any difference. There are no errors in the logs showing any suspend/resume-related issues. When the system wakes up due to the modem, log-wise it appears to be a normal resume. Introduce a quirk to disable the port during suspend when the modem is detected. Signed-off-by: penghao Link: https://lore.kernel.org/r/20201118123039.11696-1-penghao@uniontech.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 7c8011dd8c541cd8b3f39eb42d00d01f33f967f2 Merge: 24880a87042b3 fb89b2544b645 Author: Greg Kroah-Hartman Date: Fri Nov 20 16:28:48 2020 +0100 Merge tag 'phy-fixes-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into usb-linus Vinod writes: phy: fixes for 5.10 Bunch of fixes for phy drivers: *) USB phy incorrect clearing of bits *) Tegra xusb dangling pointer *) qcom-qmp null ptr initialization *) cpcap-usb irq flags *) intel kkembay kconfig depends *) qualcomm OF dependency *) mediatek typo * tag 'phy-fixes-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: mediatek: fix spelling mistake in Kconfig "veriosn" -> "version" phy: qualcomm: Fix 28 nm Hi-Speed USB PHY OF dependency phy: qualcomm: usb: Fix SuperSpeed PHY OF dependency phy: intel: PHY_INTEL_KEEMBAY_EMMC should depend on ARCH_KEEMBAY phy: cpcap-usb: Use IRQF_ONESHOT phy: qcom-qmp: Initialize another pointer to NULL phy: tegra: xusb: Fix dangling pointer on probe failure phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211 commit 537cf4e3cc2f6cc9088dcd6162de573f603adc29 Author: Magnus Karlsson Date: Fri Nov 20 12:53:39 2020 +0100 xsk: Fix umem cleanup bug at socket destruct Fix a bug that is triggered when a partially setup socket is destroyed. For a fully setup socket, a socket that has been bound to a device, the cleanup of the umem is performed at the end of the buffer pool's cleanup work queue item. This has to be performed in a work queue, and not in RCU cleanup, as it is doing a vunmap that cannot execute in interrupt context. However, when a socket has only been partially set up so that a umem has been created but the buffer pool has not, the code erroneously directly calls the umem cleanup function instead of using a work queue, and this leads to a BUG_ON() in vunmap(). As there in this case is no buffer pool, we cannot use its work queue, so we need to introduce a work queue for the umem and schedule this for the cleanup. So in the case there is no pool, we are going to use the umem's own work queue to schedule the cleanup. But if there is a pool, the cleanup of the umem is still being performed by the pool's work queue, as it is important that the umem is cleaned up after the pool. Fixes: e5e1a4bc916d ("xsk: Fix possible memory leak at socket close") Reported-by: Marek Majtyka Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Tested-by: Marek Majtyka Link: https://lore.kernel.org/bpf/1605873219-21629-1-git-send-email-magnus.karlsson@gmail.com commit 6200d5c3831370cd0ab4b6455933d12e82ea9956 Author: Jesper Dangaard Brouer Date: Fri Nov 20 09:53:09 2020 +0100 MAINTAINERS: Update XDP and AF_XDP entries Getting too many false positive matches with current use of the content regex K: and file regex N: patterns. This patch drops file match N: and makes K: more restricted. Some more normal F: file wildcards are added. Notice that AF_XDP forgot to some F: files that is also updated in this patch. Suggested-by: Jakub Kicinski Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/160586238944.2808432.4401269290440394008.stgit@firesoul commit 017496af28e2589c2c2cb396baba0507179d2748 Author: Marek Szyprowski Date: Thu Nov 19 11:37:46 2020 +0100 interconnect: fix memory trashing in of_count_icc_providers() of_count_icc_providers() function uses for_each_available_child_of_node() helper to recursively check all the available nodes. This helper already properly handles child nodes' reference count, so there is no need to do it explicitly. Remove the excessive call to of_node_put(). This fixes memory trashing when CONFIG_OF_DYNAMIC is enabled (for example arm/multi_v7_defconfig). Fixes: b1d681d8d324 ("interconnect: Add sync state support") Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20201119103746.32564-1-m.szyprowski@samsung.com Signed-off-by: Georgi Djakov commit 92666d45adcfd4a4a70580ff9f732309e16131f9 Author: Kailang Yang Date: Thu Nov 19 17:04:21 2020 +0800 ALSA: hda/realtek - Fixed Dell AIO wrong sound tone This platform only had one audio jack. If it plugged speaker then replug with speaker or headset, the sound tone will change to abnormal. Headset Mic also can't record when this issue was happen. [ Added a short comment about the COEF by tiwai ] Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/593c777dcfef4546aa050e105b8e53b5@realtek.com Signed-off-by: Takashi Iwai commit 7ab1e9117607485df977bb6e271be5c5ad649a4c Author: Georgi Djakov Date: Wed Nov 18 13:10:44 2020 +0200 interconnect: qcom: qcs404: Remove GPU and display RPM IDs The following errors are noticed during boot on a QCS404 board: [ 2.926647] qcom_icc_rpm_smd_send mas 6 error -6 [ 2.934573] qcom_icc_rpm_smd_send mas 8 error -6 These errors show when we try to configure the GPU and display nodes. Since these particular nodes aren't supported on RPM and are purely local, we should just change their mas_rpm_id to -1 to avoid any requests being sent for these master IDs. Reviewed-by: Mike Tipton Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201118111044.26056-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit c497f9322af947204c28292be6f20dd2d97483dd Author: Georgi Djakov Date: Thu Nov 12 12:51:40 2020 +0200 interconnect: qcom: msm8916: Remove rpm-ids from non-RPM nodes Some nodes are incorrectly marked as RPM-controlled (they have RPM master and slave ids assigned), but are actually controlled by the application CPU instead. The RPM complains when we send requests for resources that it can't control. Let's fix this by replacing the IDs, with the default "-1" in which case no requests are sent. Reviewed-by: Mike Tipton Link: https://lore.kernel.org/r/20201112105140.10092-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 5f1251a48c17b54939d7477305e39679a565382c Author: Dexuan Cui Date: Tue Nov 17 16:03:05 2020 -0800 video: hyperv_fb: Fix the cache type when mapping the VRAM x86 Hyper-V used to essentially always overwrite the effective cache type of guest memory accesses to WB. This was problematic in cases where there is a physical device assigned to the VM, since that often requires that the VM should have control over cache types. Thus, on newer Hyper-V since 2018, Hyper-V always honors the VM's cache type, but unexpectedly Linux VM users start to complain that Linux VM's VRAM becomes very slow, and it turns out that Linux VM should not map the VRAM uncacheable by ioremap(). Fix this slowness issue by using ioremap_cache(). On ARM64, ioremap_cache() is also required as the host also maps the VRAM cacheable, otherwise VM Connect can't display properly with ioremap() or ioremap_wc(). With this change, the VRAM on new Hyper-V is as fast as regular RAM, so it's no longer necessary to use the hacks we added to mitigate the slowness, i.e. we no longer need to allocate physical memory and use it to back up the VRAM in Generation-1 VM, and we also no longer need to allocate physical memory to back up the framebuffer in a Generation-2 VM and copy the framebuffer to the real VRAM. A further big change will address these for v5.11. Fixes: 68a2d20b79b1 ("drivers/video: add Hyper-V Synthetic Video Frame Buffer Driver") Tested-by: Boqun Feng Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Reviewed-by: Haiyang Zhang Link: https://lore.kernel.org/r/20201118000305.24797-1-decui@microsoft.com Signed-off-by: Wei Liu commit b36bf0a0fe5d18561dd98eb774ef61dd396edc42 Author: Miquel Raynal Date: Fri Nov 13 13:34:24 2020 +0100 mtd: rawnand: socrates: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-20-miquel.raynal@bootlin.com commit 1ac6870991939c9351d4c5c49c38b52c97ee7e19 Author: Miquel Raynal Date: Fri Nov 13 13:34:23 2020 +0100 mtd: rawnand: sharpsl: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal commit 7ef969a042281bdcdba31f1b69daeea4f0789ed1 Author: Miquel Raynal Date: Fri Nov 13 13:34:22 2020 +0100 mtd: rawnand: r852: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Cc: Maxim Levitsky Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-18-miquel.raynal@bootlin.com commit 5e4d659b10fde14403adb2e215df4a3168fe8465 Author: Vincent Palatin Date: Fri Nov 20 10:28:28 2020 +0100 USB: serial: option: add Fibocom NL668 variants Update the USB serial option driver support for the Fibocom NL668 Cat.4 LTE modules as there are actually several different variants. Got clarifications from Fibocom, there are distinct products: - VID:PID 1508:1001, NL668 for IOT (no MBIM interface) - VID:PID 2cb7:01a0, NL668-AM and NL652-EU are laptop M.2 cards (with MBIM interfaces for Windows/Linux/Chrome OS), respectively for Americas and Europe. usb-devices output for the laptop M.2 cards: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2cb7 ProdID=01a0 Rev=03.18 S: Manufacturer=Fibocom Wireless Inc. S: Product=Fibocom NL652-EU Modem S: SerialNumber=0123456789ABCDEF C: #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) I: If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) Signed-off-by: Vincent Palatin Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 3383176efc0fb0c0900a191026468a58668b4214 Author: Zhang Changzhong Date: Thu Nov 19 21:30:21 2020 +0800 bnxt_en: fix error return code in bnxt_init_board() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Reviewed-by: Edwin Peer Link: https://lore.kernel.org/r/1605792621-6268-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit b5f796b62c98cd8c219c4b788ecb6e1218e648cb Author: Zhang Changzhong Date: Wed Nov 18 20:17:31 2020 +0800 bnxt_en: fix error return code in bnxt_init_one() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: c213eae8d3cd ("bnxt_en: Improve VF/PF link change logic.") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Reviewed-by: Edwin Peer Link: https://lore.kernel.org/r/1605701851-20270-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit f902b216501094495ff75834035656e8119c537f Author: Jan Kara Date: Wed Nov 18 16:30:32 2020 +0100 ext4: fix bogus warning in ext4_update_dx_flag() The idea of the warning in ext4_update_dx_flag() is that we should warn when we are clearing EXT4_INODE_INDEX on a filesystem with metadata checksums enabled since after clearing the flag, checksums for internal htree nodes will become invalid. So there's no need to warn (or actually do anything) when EXT4_INODE_INDEX is not set. Link: https://lore.kernel.org/r/20201118153032.17281-1-jack@suse.cz Fixes: 48a34311953d ("ext4: fix checksum errors with indexed dirs") Reported-by: Eric Biggers Reviewed-by: Eric Biggers Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 2bf31d94423c8ae3ff58e38a115b177df6940399 Author: Mauro Carvalho Chehab Date: Mon Nov 16 11:18:08 2020 +0100 jbd2: fix kernel-doc markups Kernel-doc markup should use this format: identifier - description They should not have any type before that, as otherwise the parser won't do the right thing. Also, some identifiers have different names between their prototypes and the kernel-doc markup. Reviewed-by: Jan Kara Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/72f5c6628f5f278d67625f60893ffbc2ca28d46e.1605521731.git.mchehab+huawei@kernel.org Signed-off-by: Theodore Ts'o commit e92643db514803c2c87d72caf5950b4c0a8faf4a Author: Stanley Chu Date: Thu Nov 19 14:29:16 2020 +0800 scsi: ufs: Fix race between shutdown and runtime resume flow If UFS host device is in runtime-suspended state while UFS shutdown callback is invoked, UFS device shall be resumed for register accesses. Currently only UFS local runtime resume function will be invoked to wake up the host. This is not enough because if someone triggers runtime resume from block layer, then race may happen between shutdown and runtime resume flow, and finally lead to unlocked register access. To fix this, in ufshcd_shutdown(), use pm_runtime_get_sync() instead of resuming UFS device by ufshcd_runtime_resume() "internally" to let runtime PM framework manage the whole resume flow. Link: https://lore.kernel.org/r/20201119062916.12931-1-stanley.chu@mediatek.com Fixes: 57d104c153d3 ("ufs: add UFS power management support") Reviewed-by: Can Guo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 6600f9d52213b5c3455481b5c9e61cf5e305c0e6 Merge: 9336127d8cbcd be33805c65297 Author: Dave Airlie Date: Fri Nov 20 11:21:32 2020 +1000 Merge tag 'drm-intel-fixes-2020-11-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix tgl power gating issue (Rodrigo) - Memory leak fixes (Tvrtko, Chris) - Selftest fixes (Zhang) - Display bpc fix (Ville) - Fix TGL MOCS for PTE tracking (Chris) GVT Fixes: It temporarily disables VFIO edid feature on BXT/APL until its virtual display is really fixed to make it work properly. And fixes for DPCD 1.2 and error return in taking module reference. Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20201119203417.GA1795798@intel.com commit 9336127d8cbcd65a719d19cad13059ee7c7f900d Merge: f95dddc9f4051 cdf117d6d38a1 Author: Dave Airlie Date: Fri Nov 20 06:18:01 2020 +1000 Merge tag 'drm-misc-fixes-2020-11-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes two patches to fix dw-hdmi bind and detection code, and one fix for sun4i shared with arm-soc Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201119083939.ddj3saipyg5iwvb4@gilmour commit eb8409071a1d47e3593cfe077107ac46853182ab Author: Darrick J. Wong Date: Thu Nov 19 15:17:50 2020 -0800 xfs: revert "xfs: fix rmap key and record comparison functions" This reverts commit 6ff646b2ceb0eec916101877f38da0b73e3a5b7f. Your maintainer committed a major braino in the rmap code by adding the attr fork, bmbt, and unwritten extent usage bits into rmap record key comparisons. While XFS uses the usage bits *in the rmap records* for cross-referencing metadata in xfs_scrub and xfs_repair, it only needs the owner and offset information to distinguish between reverse mappings of the same physical extent into the data fork of a file at multiple offsets. The other bits are not important for key comparisons for index lookups, and never have been. Eric Sandeen reports that this causes regressions in generic/299, so undo this patch before it does more damage. Reported-by: Eric Sandeen Fixes: 6ff646b2ceb0 ("xfs: fix rmap key and record comparison functions") Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen commit 4d02da974ea85a62074efedf354e82778f910d82 Merge: 3be28e93cd88f e6ea60bac1ee2 Author: Linus Torvalds Date: Thu Nov 19 13:33:16 2020 -0800 Merge tag 'net-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes for 5.10-rc5, including fixes from the WiFi (mac80211), can and bpf (including the strncpy_from_user fix). Current release - regressions: - mac80211: fix memory leak of filtered powersave frames - mac80211: free sta in sta_info_insert_finish() on errors to avoid sleeping in atomic context - netlabel: fix an uninitialized variable warning added in -rc4 Previous release - regressions: - vsock: forward all packets to the host when no H2G is registered, un-breaking AWS Nitro Enclaves - net: Exempt multicast addresses from five-second neighbor lifetime requirement, decreasing the chances neighbor tables fill up - net/tls: fix corrupted data in recvmsg - qed: fix ILT configuration of SRC block - can: m_can: process interrupt only when not runtime suspended Previous release - always broken: - page_frag: Recover from memory pressure by not recycling pages allocating from the reserves - strncpy_from_user: Mask out bytes after NUL terminator - ip_tunnels: Set tunnel option flag only when tunnel metadata is present, always setting it confuses Open vSwitch - bpf, sockmap: - Fix partial copy_page_to_iter so progress can still be made - Fix socket memory accounting and obeying SO_RCVBUF - net: Have netpoll bring-up DSA management interface - net: bridge: add missing counters to ndo_get_stats64 callback - tcp: brr: only postpone PROBE_RTT if RTT is < current min_rtt - enetc: Workaround MDIO register access HW bug - net/ncsi: move netlink family registration to a subsystem init, instead of tying it to driver probe - net: ftgmac100: unregister NC-SI when removing driver to avoid crash - lan743x: - prevent interrupt storm on open - fix freeing skbs in the wrong context - net/mlx5e: Fix socket refcount leak on kTLS RX resync - net: dsa: mv88e6xxx: Avoid VLAN database corruption on 6097 - fix 21 unset return codes and other mistakes on error paths, mostly detected by the Hulk Robot" * tag 'net-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (115 commits) fail_function: Remove a redundant mutex unlock selftest/bpf: Test bpf_probe_read_user_str() strips trailing bytes after NUL lib/strncpy_from_user.c: Mask out bytes after NUL terminator. net/smc: fix direct access to ib_gid_addr->ndev in smc_ib_determine_gid() net/smc: fix matching of existing link groups ipv6: Remove dependency of ipv6_frag_thdr_truncated on ipv6 module libbpf: Fix VERSIONED_SYM_COUNT number parsing net/mlx4_core: Fix init_hca fields offset atm: nicstar: Unmap DMA on send error page_frag: Recover from memory pressure net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset mlxsw: core: Use variable timeout for EMAD retries mlxsw: Fix firmware flashing net: Have netpoll bring-up DSA management interface atl1e: fix error return code in atl1e_probe() atl1c: fix error return code in atl1c_probe() ah6: fix error return code in ah6_input() net: usb: qmi_wwan: Set DTR quirk for MR400 can: m_can: process interrupt only when not runtime suspended can: flexcan: flexcan_chip_start(): fix erroneous flexcan_transceiver_enable() during bus-off recovery ... commit 3be28e93cd88fbcbe97cabcbe92b1ccc9f830450 Merge: dda3f4252e6c8 ee415d73dcc24 Author: Linus Torvalds Date: Thu Nov 19 13:01:53 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "The last two weeks have been quiet here, just the usual smattering of long standing bug fixes. A collection of error case bug fixes: - Improper nesting of spinlock types in cm - Missing error codes and kfree() - Ensure dma_virt_ops users have the right kconfig symbols to work properly - Compilation failure of tools/testing" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: tools/testing/scatterlist: Fix test to compile and run IB/hfi1: Fix error return code in hfi1_init_dd() RMDA/sw: Don't allow drivers using dma_virt_ops on highmem configs RDMA/pvrdma: Fix missing kfree() in pvrdma_register_device() RDMA/cm: Make the local_id_table xarray non-irq commit 612e048e6aabbc5d042140c0ec494753f36bdfe6 Author: Miquel Raynal Date: Fri Nov 13 13:34:21 2020 +0100 mtd: rawnand: plat_nand: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-17-miquel.raynal@bootlin.com commit 8fc6f1f042b2d383f57110ab808b788592550b25 Author: Miquel Raynal Date: Fri Nov 13 13:34:20 2020 +0100 mtd: rawnand: pasemi: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-16-miquel.raynal@bootlin.com commit 1f65976b55865adf84340d6e07c4c773cb8a728b Author: Miquel Raynal Date: Fri Nov 13 13:34:19 2020 +0100 mtd: rawnand: tmio: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-15-miquel.raynal@bootlin.com commit 3c3bbf014ab3bc9793a51d550a048873e832f2fa Author: Miquel Raynal Date: Fri Nov 13 13:34:18 2020 +0100 mtd: rawnand: txx9ndfmc: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-14-miquel.raynal@bootlin.com commit 553508cec2e8138ec50f284bc8ec10e7ef0d44b1 Author: Miquel Raynal Date: Fri Nov 13 13:34:17 2020 +0100 mtd: rawnand: orion: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-13-miquel.raynal@bootlin.com commit 6dd09f775b729478e180eed295ddfa50569e61be Author: Miquel Raynal Date: Fri Nov 13 13:34:16 2020 +0100 mtd: rawnand: mpc5121: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-12-miquel.raynal@bootlin.com commit e044b8b72151637738b0d2880d62ee5e21f6be5d Author: Miquel Raynal Date: Fri Nov 13 13:34:15 2020 +0100 mtd: rawnand: lpc32xx_slc: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Cc: Vladimir Zapolskiy Cc: Sylvain Lemieux commit 2dbd8382a2e1a9b167712dc3764616bfdb189818 Author: Miquel Raynal Date: Fri Nov 13 13:34:14 2020 +0100 mtd: rawnand: lpc32xx_mlc: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Cc: Vladimir Zapolskiy Cc: Sylvain Lemieux Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-10-miquel.raynal@bootlin.com commit 98591a68736f3d2431384b5284713fb98da488a6 Author: Miquel Raynal Date: Fri Nov 13 13:34:13 2020 +0100 mtd: rawnand: fsmc: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal commit 7f4ea0340ed4fa5cdfff6b1dd9f51f293d3f5ee7 Author: Miquel Raynal Date: Fri Nov 13 13:34:12 2020 +0100 mtd: rawnand: diskonchip: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-8-miquel.raynal@bootlin.com commit 3500bd7035ee6df2a465f37439d3cb9e00d2f66a Author: Miquel Raynal Date: Fri Nov 13 13:34:11 2020 +0100 mtd: rawnand: davinci: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Cc: Bartosz Golaszewski Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-7-miquel.raynal@bootlin.com commit 58e111002887ad5f0b665685aac3d4c3bc3768db Author: Miquel Raynal Date: Fri Nov 13 13:34:10 2020 +0100 mtd: rawnand: cs553x: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal commit 704c2317cab5571da0e5763cd47ad07f8900aa76 Author: Theodore Ts'o Date: Thu Nov 19 15:36:25 2020 -0500 ext4: drop fast_commit from /proc/mounts The options in /proc/mounts must be valid mount options --- and fast_commit is not a mount option. Otherwise, command sequences like this will fail: # mount /dev/vdc /vdc # mkdir -p /vdc/phoronix_test_suite /pts # mount --bind /vdc/phoronix_test_suite /pts # mount -o remount,nodioread_nolock /pts mount: /pts: mount point not mounted or bad option. And in the system logs, you'll find: EXT4-fs (vdc): Unrecognized mount option "fast_commit" or missing value Fixes: 995a3ed67fc8 ("ext4: add fast_commit feature and handling for extended mount options") Signed-off-by: Theodore Ts'o commit dbffc8ccdf3a1d0c93bc923cb2dce3272d5fd4e8 Author: Miquel Raynal Date: Fri Nov 13 13:34:09 2020 +0100 mtd: rawnand: au1550: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-5-miquel.raynal@bootlin.com commit 59d93473323ab104c733778831c459f4cdbe95b2 Author: Miquel Raynal Date: Fri Nov 13 13:34:08 2020 +0100 mtd: rawnand: ams-delta: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(). Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-4-miquel.raynal@bootlin.com commit d525914b5bd8d71f7e92a30a170c108c485814ad Author: Miquel Raynal Date: Fri Nov 13 13:34:07 2020 +0100 mtd: rawnand: xway: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(), a NAND controller hook. Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-3-miquel.raynal@bootlin.com commit f6341f6448e04c9a0ab22fabe38d0c6b43aab848 Author: Miquel Raynal Date: Fri Nov 13 13:34:06 2020 +0100 mtd: rawnand: gpio: Move the ECC initialization to ->attach_chip() The probe function is only supposed to initialize the controller hardware but not the ECC engine. Indeed, we don't know anything about the NAND chip(s) at this stage. Let's move the logic initializing the ECC engine, even pretty simple, to the ->attach_chip() hook which gets called during nand_scan() routine, after the NAND chip discovery. As the previously mentioned logic is supposed to parse the DT for us, it is likely that the chip->ecc.* entries be overwritten. So let's avoid this by moving these lines to ->attach_chip(), a NAND controller hook. Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Reported-by: Christophe Leroy Signed-off-by: Miquel Raynal Tested-by: Christophe Leroy Link: https://lore.kernel.org/linux-mtd/20201113123424.32233-2-miquel.raynal@bootlin.com commit e6ea60bac1ee28bb46232f8c2ecd3a3fbb9011e0 Merge: 90b49784814c1 2801a5da5b25b Author: Jakub Kicinski Date: Thu Nov 19 12:26:09 2020 -0800 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== 1) libbpf should not attempt to load unused subprogs, from Andrii. 2) Make strncpy_from_user() mask out bytes after NUL terminator, from Daniel. 3) Relax return code check for subprograms in the BPF verifier, from Dmitrii. 4) Fix several sockmap issues, from John. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: fail_function: Remove a redundant mutex unlock selftest/bpf: Test bpf_probe_read_user_str() strips trailing bytes after NUL lib/strncpy_from_user.c: Mask out bytes after NUL terminator. libbpf: Fix VERSIONED_SYM_COUNT number parsing bpf, sockmap: Avoid failures from skb_to_sgvec when skb has frag_list bpf, sockmap: Handle memory acct if skb_verdict prog redirects to self bpf, sockmap: Avoid returning unneeded EAGAIN when redirecting to self bpf, sockmap: Use truesize with sk_rmem_schedule() bpf, sockmap: Ensure SO_RCVBUF memory is observed on ingress redirect bpf, sockmap: Fix partial copy_page_to_iter so progress can still be made selftests/bpf: Fix error return code in run_getsockopt_test() bpf: Relax return code check for subprograms tools, bpftool: Add missing close before bpftool net attach exit MAINTAINERS/bpf: Update Andrii's entry. selftests/bpf: Fix unused attribute usage in subprogs_unused test bpf: Fix unsigned 'datasec_id' compared with zero in check_pseudo_btf_id bpf: Fix passing zero to PTR_ERR() in bpf_btf_printf_prepare libbpf: Don't attempt to load unused subprog as an entry-point BPF program ==================== Link: https://lore.kernel.org/r/20201119200721.288-1-alexei.starovoitov@gmail.com Signed-off-by: Jakub Kicinski commit be33805c65297611971003d72e7f9235e23ec84d Author: Chris Wilson Date: Thu Oct 15 13:21:38 2020 +0100 drm/i915/gt: Fixup tgl mocs for PTE tracking Forcing mocs:1 [used for our winsys follows-pte mode] to be cached caused display glitches. Though it is documented as deprecated (and so likely behaves as uncached) use the follow-pte bit and force it out of L3 cache. Testcase: igt/kms_frontbuffer_tracking Testcase: igt/kms_big_fb Signed-off-by: Chris Wilson Cc: Ayaz A Siddiqui Cc: Lucas De Marchi Cc: Matt Roper Cc: Ville Syrjälä Cc: Joonas Lahtinen Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201015122138.30161-4-chris@chris-wilson.co.uk (cherry picked from commit a04ac827366594c7244f60e9be79fcb404af69f0) Fixes: 849c0fe9e831 ("drm/i915/gt: Initialize reserved and unspecified MOCS indices") Signed-off-by: Rodrigo Vivi [Rodrigo: Updated Fixes tag] commit f95dddc9f4051b04a02677eb3df0b25962f12dfc Merge: 01822dd1bacfc 2b3af2705645c Author: Dave Airlie Date: Fri Nov 20 06:08:35 2020 +1000 Merge tag 'amd-drm-fixes-5.10-2020-11-18' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.10-2020-11-18: amdgpu: - Pageflip fix for navi1x with 5 or 6 displays - Remove experimental flag for Arcturus - Fix regression in atomic commit tail rework Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201118213646.4015-1-alexander.deucher@amd.com commit 2801a5da5b25b7af9dd2addd19b2315c02d17b64 Author: Luo Meng Date: Wed Nov 18 22:49:31 2020 +0900 fail_function: Remove a redundant mutex unlock Fix a mutex_unlock() issue where before copy_from_user() is not called mutex_locked. Fixes: 4b1a29a7f542 ("error-injection: Support fault injection framework") Reported-by: Hulk Robot Signed-off-by: Luo Meng Signed-off-by: Masami Hiramatsu Signed-off-by: Alexei Starovoitov Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/bpf/160570737118.263807.8358435412898356284.stgit@devnote2 commit 14d6d86c210aea1a83c19a8f6391ecabcbefed94 Merge: 1fd6cee127e2d c8a36aedf3e24 Author: Alexei Starovoitov Date: Thu Nov 19 10:45:55 2020 -0800 Merge branch 'Fix bpf_probe_read_user_str() overcopying' Daniel Xu says: ==================== 6ae08ae3dea2 ("bpf: Add probe_read_{user, kernel} and probe_read_{user, kernel}_str helpers") introduced a subtle bug where bpf_probe_read_user_str() would potentially copy a few extra bytes after the NUL terminator. This issue is particularly nefarious when strings are used as map keys, as seemingly identical strings can occupy multiple entries in a map. This patchset fixes the issue and introduces a selftest to prevent future regressions. v6 -> v7: * Add comments v5 -> v6: * zero-pad up to sizeof(unsigned long) after NUL v4 -> v5: * don't read potentially uninitialized memory v3 -> v4: * directly pass userspace pointer to prog * test more strings of different length v2 -> v3: * set pid filter before attaching prog in selftest * use long instead of int as bpf_probe_read_user_str() retval * style changes v1 -> v2: * add Fixes: tag * add selftest ==================== Signed-off-by: Alexei Starovoitov commit c8a36aedf3e24768e94d87fdcdd37684bd241c44 Author: Daniel Xu Date: Tue Nov 17 12:05:46 2020 -0800 selftest/bpf: Test bpf_probe_read_user_str() strips trailing bytes after NUL Previously, bpf_probe_read_user_str() could potentially overcopy the trailing bytes after the NUL due to how do_strncpy_from_user() does the copy in long-sized strides. The issue has been fixed in the previous commit. This commit adds a selftest that ensures we don't regress bpf_probe_read_user_str() again. Signed-off-by: Daniel Xu Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/4d977508fab4ec5b7b574b85bdf8b398868b6ee9.1605642949.git.dxu@dxuuu.xyz commit 6fa6d28051e9fcaa1570e69648ea13a353a5d218 Author: Daniel Xu Date: Tue Nov 17 12:05:45 2020 -0800 lib/strncpy_from_user.c: Mask out bytes after NUL terminator. do_strncpy_from_user() may copy some extra bytes after the NUL terminator into the destination buffer. This usually does not matter for normal string operations. However, when BPF programs key BPF maps with strings, this matters a lot. A BPF program may read strings from user memory by calling the bpf_probe_read_user_str() helper which eventually calls do_strncpy_from_user(). The program can then key a map with the destination buffer. BPF map keys are fixed-width and string-agnostic, meaning that map keys are treated as a set of bytes. The issue is when do_strncpy_from_user() overcopies bytes after the NUL terminator, it can result in seemingly identical strings occupying multiple slots in a BPF map. This behavior is subtle and totally unexpected by the user. This commit masks out the bytes following the NUL while preserving long-sized stride in the fast path. Fixes: 6ae08ae3dea2 ("bpf: Add probe_read_{user, kernel} and probe_read_{user, kernel}_str helpers") Signed-off-by: Daniel Xu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/21efc982b3e9f2f7b0379eed642294caaa0c27a7.1605642949.git.dxu@dxuuu.xyz commit dda3f4252e6c8b833a2ef164afd3da9808d0f07c Merge: 3494d58865ad4 da631f7fd623b Author: Linus Torvalds Date: Thu Nov 19 11:32:31 2020 -0800 Merge tag 'powerpc-cve-2020-4788' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Fixes for CVE-2020-4788. From Daniel's cover letter: IBM Power9 processors can speculatively operate on data in the L1 cache before it has been completely validated, via a way-prediction mechanism. It is not possible for an attacker to determine the contents of impermissible memory using this method, since these systems implement a combination of hardware and software security measures to prevent scenarios where protected data could be leaked. However these measures don't address the scenario where an attacker induces the operating system to speculatively execute instructions using data that the attacker controls. This can be used for example to speculatively bypass "kernel user access prevention" techniques, as discovered by Anthony Steinhauser of Google's Safeside Project. This is not an attack by itself, but there is a possibility it could be used in conjunction with side-channels or other weaknesses in the privileged code to construct an attack. This issue can be mitigated by flushing the L1 cache between privilege boundaries of concern. This patch series flushes the L1 cache on kernel entry (patch 2) and after the kernel performs any user accesses (patch 3). It also adds a self-test and performs some related cleanups" * tag 'powerpc-cve-2020-4788' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: rename pnv|pseries_setup_rfi_flush to _setup_security_mitigations selftests/powerpc: refactor entry and rfi_flush tests selftests/powerpc: entry flush test powerpc: Only include kup-radix.h for 64-bit Book3S powerpc/64s: flush L1D after user accesses powerpc/64s: flush L1D on kernel entry selftests/powerpc: rfi_flush: disable entry flush if present commit 3494d58865ad4a47611dbb427b214cc5227fa5eb Merge: 131ad0b6f5294 dc293f2106903 Author: Linus Torvalds Date: Thu Nov 19 11:22:33 2020 -0800 Merge tag 'xtensa-20201119' of git://github.com/jcmvbkbc/linux-xtensa Pull xtensa fixes from Max Filippov: - fix placement of cache alias remapping area - disable preemption around cache alias management calls - add missing __user annotation to strncpy_from_user argument * tag 'xtensa-20201119' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: uaccess: Add missing __user to strncpy_from_user() prototype xtensa: disable preemption around cache alias management calls xtensa: fix TLBTEMP area placement commit 01822dd1bacfce25418cd4662c14240e6eb17ad6 Author: Thomas Zimmermann Date: Mon Sep 21 16:25:36 2020 +0200 drm/vram-helper: Fix use of top-down placement Commit 7053e0eab473 ("drm/vram-helper: stop using TTM placement flags") cleared the BO placement flags if top-down placement had been selected. Hence, BOs that were supposed to go into VRAM are now placed in a default location in system memory. Trying to scanout the incorrectly pinned BO results in displayed garbage and an error message. [ 146.108127] ------------[ cut here ]------------ [ 146.1V08180] WARNING: CPU: 0 PID: 152 at drivers/gpu/drm/drm_gem_vram_helper.c:284 drm_gem_vram_offset+0x59/0x60 [drm_vram_helper] ... [ 146.108591] ast_cursor_page_flip+0x3e/0x150 [ast] [ 146.108622] ast_cursor_plane_helper_atomic_update+0x8a/0xc0 [ast] [ 146.108654] drm_atomic_helper_commit_planes+0x197/0x4c0 [ 146.108699] drm_atomic_helper_commit_tail_rpm+0x59/0xa0 [ 146.108718] commit_tail+0x103/0x1c0 ... [ 146.109302] ---[ end trace d901a1ba1d949036 ]--- Fix the bug by keeping the placement flags. The top-down placement flag is stored in a separate variable. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Fixes: 7053e0eab473 ("drm/vram-helper: stop using TTM placement flags") Reported-by: Pu Wen [for 5.10-rc1] Tested-by: Pu Wen Cc: Christian König Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20200921142536.4392-1-tzimmermann@suse.de (cherry picked from commit b8f8dbf6495850b0babc551377bde754b7bc0eea) [pulled into fixes from drm-next] Signed-off-by: Dave Airlie commit 131ad0b6f5294dd4eb1c8e5e5c611a85cbae0c4e Merge: 4ca35b4f45092 de15e20f50b12 Author: Linus Torvalds Date: Thu Nov 19 11:15:15 2020 -0800 Merge tag 'acpi-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix recent regression in the APEI code and initialization issue in the ACPI fan driver. Specifics: - Make the APEI code avoid attempts to obtain logical addresses for registers located in the I/O address space to fix initialization issues (Aili Yao) - Fix sysfs attribute initialization in the ACPI fan driver (Guenter Roeck)" * tag 'acpi-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI, APEI, Fix error return value in apei_map_generic_address() ACPI: fan: Initialize performance state sysfs attribute commit 4ca35b4f45092634df21dada47746571a34cc09c Merge: fee3c824edf24 3a8ac4d39651c Author: Linus Torvalds Date: Thu Nov 19 11:11:50 2020 -0800 Merge tag 'pm-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two issues in ARM cpufreq drivers and one cpuidle driver issue. Specifics: - Add missing RCU_NONIDLE() annotations to the Tegra cpuidle driver (Dmitry Osipenko) - Fix boot frequency computation in the tegra186 cpufreq driver (Jon Hunter) - Make the SCMI cpufreq driver register a dummy clock provider to avoid OPP addition failures (Sudeep Holla)" * tag 'pm-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: scmi: Fix OPP addition failure with a dummy clock provider cpufreq: tegra186: Fix get frequency callback cpuidle: tegra: Annotate tegra_pm_set_cpu_in_lp2() with RCU_NONIDLE commit fee3c824edf24fd4c497bb3b887d1447150ec4ec Merge: d748287a28de8 04a9cd51d3f33 Author: Linus Torvalds Date: Thu Nov 19 11:05:28 2020 -0800 Merge tag 'spi-fix-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "This is a relatively large set of fixes, the bulk of it being a series from Lukas Wunner which fixes confusion with the lifetime of driver data allocated along with the SPI controller structure that's been created as part of the conversion to devm APIs. The simplest fix, explained in detail in Lukas' commit message, is to move to a devm_ function for allocation of the controller and hence driver data in order to push the free of that after anything tries to reference the driver data in the remove path. This results in a relatively large diff due to the addition of a new function but isn't particularly complex. There's also a fix from Sven van Asbroeck which fixes yet more fallout from the conflicts between the various different places one can configure the polarity of GPIOs in modern systems. Otherwise everything is fairly small and driver specific" * tag 'spi-fix-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: npcm-fiu: Don't leak SPI master in probe error path spi: dw: Set transfer handler before unmasking the IRQs spi: cadence-quadspi: Fix error return code in cqspi_probe spi: bcm2835aux: Restore err assignment in bcm2835aux_spi_probe spi: lpspi: Fix use-after-free on unbind spi: bcm-qspi: Fix use-after-free on unbind spi: bcm2835aux: Fix use-after-free on unbind spi: bcm2835: Fix use-after-free on unbind spi: Introduce device-managed SPI controller allocation spi: fsi: Fix transfer returning without finalizing message spi: fix client driver breakages when using GPIO descriptors commit 90b49784814c10c0f028646f95cc2c2848696712 Merge: 2d8f6481c17db 41a0be3f8f6be Author: Jakub Kicinski Date: Thu Nov 19 10:59:22 2020 -0800 Merge branch 'net-smc-fixes-2020-11-18' Karsten Graul says: ==================== net/smc: fixes 2020-11-18 Patch 1 fixes the matching of link groups because with SMC-Dv2 the vlanid should no longer be part of this matching. Patch 2 removes a sparse message. ==================== Link: https://lore.kernel.org/r/20201118214038.24039-1-kgraul@linux.ibm.com Signed-off-by: Jakub Kicinski commit 41a0be3f8f6be893860b991eb10c47fc3ee09d7f Author: Karsten Graul Date: Wed Nov 18 22:40:38 2020 +0100 net/smc: fix direct access to ib_gid_addr->ndev in smc_ib_determine_gid() Sparse complaints 3 times about: net/smc/smc_ib.c:203:52: warning: incorrect type in argument 1 (different address spaces) net/smc/smc_ib.c:203:52: expected struct net_device const *dev net/smc/smc_ib.c:203:52: got struct net_device [noderef] __rcu *const ndev Fix that by using the existing and validated ndev variable instead of accessing attr->ndev directly. Fixes: 5102eca9039b ("net/smc: Use rdma_read_gid_l2_fields to L2 fields") Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 0530bd6e6a3d5a0292a1a5f33ea980ae7e8b56ca Author: Karsten Graul Date: Wed Nov 18 22:40:37 2020 +0100 net/smc: fix matching of existing link groups With the multi-subnet support of SMC-Dv2 the match for existing link groups should not include the vlanid of the network device. Set ini->smcd_version accordingly before the call to smc_conn_create() and use this value in smc_conn_create() to skip the vlanid check. Fixes: 5c21c4ccafe8 ("net/smc: determine accepted ISM devices") Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit aecd1fbe7784e75226682afe7a9c3a34af35aa3e Merge: d21b96c8ed2ae 879ee8b6f2bae Author: Takashi Iwai Date: Thu Nov 19 19:56:29 2020 +0100 Merge tag 'asoc-fix-v5.10-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.11 A collection of driver specific fixes, mostly for x86 systems (or CODECs used mostly on x86) and all for relatively minor issues, the biggest one being fixing S24_LE format on Keem Bay systems. commit d748287a28de8955e1756a454e81ab1a73d45ecf Merge: 841d6e9ec9e34 2ba546ebe0ce2 Author: Linus Torvalds Date: Thu Nov 19 10:55:54 2020 -0800 Merge tag 'regulator-fix-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "Mostly core fixes here, one set from Michał Mirosław which cleans up some issues introduced as part of the coupled regulators work, one memory leak during probe and two due to regulators which have an input supply name and regulator name which are identical, which is very unusual. There's also a fix for our handling of the similarly unusual case where we can't determine if a regulator is enabled during boot" * tag 'regulator-fix-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: ti-abb: Fix array out of bound read access on the first transition regulator: workaround self-referent regulators regulator: avoid resolve_supply() infinite recursion regulator: fix memory leak with repeated set_machine_constraints() regulator: pfuze100: limit pfuze-support-disable-sw to pfuze{100,200} regulator: core: don't disable regulator if is_enabled return error. commit 2d8f6481c17db9fa5238b277cdbc392084060b09 Author: Georg Kohmann Date: Thu Nov 19 10:58:33 2020 +0100 ipv6: Remove dependency of ipv6_frag_thdr_truncated on ipv6 module IPV6=m NF_DEFRAG_IPV6=y ld: net/ipv6/netfilter/nf_conntrack_reasm.o: in function `nf_ct_frag6_gather': net/ipv6/netfilter/nf_conntrack_reasm.c:462: undefined reference to `ipv6_frag_thdr_truncated' Netfilter is depending on ipv6 symbol ipv6_frag_thdr_truncated. This dependency is forcing IPV6=y. Remove this dependency by moving ipv6_frag_thdr_truncated out of ipv6. This is the same solution as used with a similar issues: Referring to commit 70b095c843266 ("ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module") Fixes: 9d9e937b1c8b ("ipv6/netfilter: Discard first fragment not including all headers") Reported-by: Randy Dunlap Reported-by: kernel test robot Signed-off-by: Georg Kohmann Acked-by: Pablo Neira Ayuso Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20201119095833.8409-1-geokohma@cisco.com Signed-off-by: Jakub Kicinski commit 841d6e9ec9e345054dd4a28ef5feceb73e9702be Merge: c2e7554e1b859 b98467fe96d24 Author: Linus Torvalds Date: Thu Nov 19 10:49:35 2020 -0800 Merge tag 'thermal-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal fix from Daniel Lezcano: "Disable the CPU PM notifier for OMAP4430 for suspend in order to prevent wrong temperature leading to a critical shutdown (Peter Ujfalusi)" * tag 'thermal-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal: ti-soc-thermal: Disable the CPU PM notifier for OMAP4430 commit d21b96c8ed2aea7e6b7bf4735e1d2503cfbf4072 Author: Takashi Iwai Date: Thu Nov 19 13:14:40 2020 +0100 ALSA: mixart: Fix mutex deadlock The code change for switching to non-atomic mode brought the unexpected mutex deadlock in get_msg(). It converted the spinlock with the existing mutex, but there were calls with the already holding the mutex. Since the only place that needs the extra lock is the code path from snd_mixart_send_msg(), remove the mutex lock in get_msg() and apply in the caller side for fixing the mutex deadlock. Fixes: 8d3a8b5cb57d ("ALSA: mixart: Use nonatomic PCM ops") Reported-by: Dan Carpenter Cc: Link: https://lore.kernel.org/r/20201119121440.18945-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 883a790a84401f6f55992887fd7263d808d4d05d Author: Dave Chinner Date: Thu Nov 19 08:59:11 2020 -0800 xfs: don't allow NOWAIT DIO across extent boundaries Jens has reported a situation where partial direct IOs can be issued and completed yet still return -EAGAIN. We don't want this to report a short IO as we want XFS to complete user DIO entirely or not at all. This partial IO situation can occur on a write IO that is split across an allocated extent and a hole, and the second mapping is returning EAGAIN because allocation would be required. The trivial reproducer: $ sudo xfs_io -fdt -c "pwrite 0 4k" -c "pwrite -V 1 -b 8k -N 0 8k" /mnt/scr/foo wrote 4096/4096 bytes at offset 0 4 KiB, 1 ops; 0.0001 sec (27.509 MiB/sec and 7042.2535 ops/sec) pwrite: Resource temporarily unavailable $ The pwritev2(0, 8kB, RWF_NOWAIT) call returns EAGAIN having done the first 4kB write: xfs_file_direct_write: dev 259:1 ino 0x83 size 0x1000 offset 0x0 count 0x2000 iomap_apply: dev 259:1 ino 0x83 pos 0 length 8192 flags WRITE|DIRECT|NOWAIT (0x31) ops xfs_direct_write_iomap_ops caller iomap_dio_rw actor iomap_dio_actor xfs_ilock_nowait: dev 259:1 ino 0x83 flags ILOCK_SHARED caller xfs_ilock_for_iomap xfs_iunlock: dev 259:1 ino 0x83 flags ILOCK_SHARED caller xfs_direct_write_iomap_begin xfs_iomap_found: dev 259:1 ino 0x83 size 0x1000 offset 0x0 count 8192 fork data startoff 0x0 startblock 24 blockcount 0x1 iomap_apply_dstmap: dev 259:1 ino 0x83 bdev 259:1 addr 102400 offset 0 length 4096 type MAPPED flags DIRTY Here the first iomap loop has mapped the first 4kB of the file and issued the IO, and we enter the second iomap_apply loop: iomap_apply: dev 259:1 ino 0x83 pos 4096 length 4096 flags WRITE|DIRECT|NOWAIT (0x31) ops xfs_direct_write_iomap_ops caller iomap_dio_rw actor iomap_dio_actor xfs_ilock_nowait: dev 259:1 ino 0x83 flags ILOCK_SHARED caller xfs_ilock_for_iomap xfs_iunlock: dev 259:1 ino 0x83 flags ILOCK_SHARED caller xfs_direct_write_iomap_begin And we exit with -EAGAIN out because we hit the allocate case trying to make the second 4kB block. Then IO completes on the first 4kB and the original IO context completes and unlocks the inode, returning -EAGAIN to userspace: xfs_end_io_direct_write: dev 259:1 ino 0x83 isize 0x1000 disize 0x1000 offset 0x0 count 4096 xfs_iunlock: dev 259:1 ino 0x83 flags IOLOCK_SHARED caller xfs_file_dio_aio_write There are other vectors to the same problem when we re-enter the mapping code if we have to make multiple mappinfs under NOWAIT conditions. e.g. failing trylocks, COW extents being found, allocation being required, and so on. Avoid all these potential problems by only allowing IOMAP_NOWAIT IO to go ahead if the mapping we retrieve for the IO spans an entire allocated extent. This avoids the possibility of subsequent mappings to complete the IO from triggering NOWAIT semantics by any means as NOWAIT IO will now only enter the mapping code once per NOWAIT IO. Reported-and-tested-by: Jens Axboe Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1fd6cee127e2ddff36d648573d7566aafb0d0b77 Author: Jiri Olsa Date: Wed Nov 18 22:13:50 2020 +0100 libbpf: Fix VERSIONED_SYM_COUNT number parsing We remove "other info" from "readelf -s --wide" output when parsing GLOBAL_SYM_COUNT variable, which was added in [1]. But we don't do that for VERSIONED_SYM_COUNT and it's failing the check_abi target on powerpc Fedora 33. The extra "other info" wasn't problem for VERSIONED_SYM_COUNT parsing until commit [2] added awk in the pipe, which assumes that the last column is symbol, but it can be "other info". Adding "other info" removal for VERSIONED_SYM_COUNT the same way as we did for GLOBAL_SYM_COUNT parsing. [1] aa915931ac3e ("libbpf: Fix readelf output parsing for Fedora") [2] 746f534a4809 ("tools/libbpf: Avoid counting local symbols in ABI check") Fixes: 746f534a4809 ("tools/libbpf: Avoid counting local symbols in ABI check") Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201118211350.1493421-1-jolsa@kernel.org commit 45f703a0d4b87f940ea150367dc4f4a9c06fa868 Merge: 6f117cb854a44 8168d23fbcee4 Author: Jens Axboe Date: Thu Nov 19 09:23:27 2020 -0700 Merge tag 'nvme-5.10-2020-11-19' of git://git.infradead.org/nvme into block-5.10 Pull NVMe fixes from Christoph: "nvme fixes for 5.10 - Doorbell Buffer freeing fix (Minwoo Im) - CSE log leak fix (Keith Busch)" * tag 'nvme-5.10-2020-11-19' of git://git.infradead.org/nvme: nvme: fix memory leak freeing command effects nvme: directly cache command effects log nvme: free sq/cq dbbuf pointers when dbbuf set fails commit b4c00e7976636f33a4f67eab436a11666c8afd60 Author: Hans de Goede Date: Sat Nov 14 22:20:56 2020 +0100 HID: logitech-dj: Fix Dinovo Mini when paired with a MX5x00 receiver Some users are pairing the Dinovo keyboards with the MX5000 or MX5500 receivers, instead of with the Dinovo receivers. The receivers are mostly the same (and the air protocol obviously is compatible) but currently the Dinovo receivers are handled by hid-lg.c while the MX5x00 receivers are handled by logitech-dj.c. When using a Dinovo keyboard, with its builtin touchpad, through logitech-dj.c then the touchpad stops working because when asking the receiver for paired devices, we get only 1 paired device with a device_type of REPORT_TYPE_KEYBOARD. And since we don't see a paired mouse, we have nowhere to send mouse-events to, so we drop them. Extend the existing fix for the Dinovo Edge for this to also cover the Dinovo Mini keyboard and also add a mapping to logitech-hidpp for the Media key on the Dinovo Mini, so that that keeps working too. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1811424 Fixes: f2113c3020ef ("HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver") Signed-off-by: Hans de Goede Signed-off-by: Benjamin Tissoires commit eec231e060fb79923c349f6e89f022b286f32c1e Author: Hans de Goede Date: Sat Nov 14 10:45:31 2020 +0100 HID: logitech-dj: Fix an error in mse_bluetooth_descriptor Fix an error in the mouse / INPUT(2) descriptor used for quad/bt2.0 combo receivers. Replace INPUT with INPUT (Data,Var,Abs) for the field for the 4 extra buttons which share their report-byte with the low-res hwheel. This is likely a copy and paste error. I've verified that the new 0x81, 0x02 value matches both the mouse descriptor for the currently supported MX5000 / MX5500 receivers, as well as the INPUT(2) mouse descriptors for the Dinovo receivers for which support is being worked on. Cc: stable@vger.kernel.org Fixes: f2113c3020ef ("HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver") Signed-off-by: Hans de Goede Signed-off-by: Benjamin Tissoires commit 9fa1d7e60ad5ad2f7859ea8912d7b0b57821a5b7 Author: Maxime Ripard Date: Thu Oct 29 14:40:17 2020 +0100 drm/vc4: hdmi: Disable Wifi Frequencies There's cross-talk on the RPi4 between the 2.4GHz channels used by the WiFi chip and some resolutions, most notably 1440p at 60Hz. In such a case, we can either reject entirely the mode, or lower slightly the pixel frequency to remove the overlap. Let's go for the latter. Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201029134018.1948636-2-maxime@cerno.tech commit 8d15aa4ed02bed2f5b0720480ab8eb032dc0887e Author: Maxime Ripard Date: Thu Oct 29 14:40:16 2020 +0100 dt-bindings: display: Add a property to deal with WiFi coexistence The RaspberryPi4 has both a WiFi chip and HDMI outputs capable of doing 4k. Unfortunately, the 1440p resolution at 60Hz has a TMDS rate on the HDMI cable right in the middle of the first Wifi channel. Add a property to our HDMI controller, that could be reused by other similar HDMI controllers, to allow the OS to take whatever measure is necessary to avoid that crosstalk. Signed-off-by: Maxime Ripard Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20201029134018.1948636-1-maxime@cerno.tech commit 600c0849cf86b75d86352f59745226273290986a Author: Mika Westerberg Date: Wed Nov 18 13:08:21 2020 +0200 thunderbolt: Fix use-after-free in remove_unplugged_switch() Paulian reported a crash that happens when a dock is unplugged during hibernation: [78436.228217] thunderbolt 0-1: device disconnected [78436.228365] BUG: kernel NULL pointer dereference, address: 00000000000001e0 ... [78436.228397] RIP: 0010:icm_free_unplugged_children+0x109/0x1a0 ... [78436.228432] Call Trace: [78436.228439] icm_rescan_work+0x24/0x30 [78436.228444] process_one_work+0x1a3/0x3a0 [78436.228449] worker_thread+0x30/0x370 [78436.228454] ? process_one_work+0x3a0/0x3a0 [78436.228457] kthread+0x13d/0x160 [78436.228461] ? kthread_park+0x90/0x90 [78436.228465] ret_from_fork+0x1f/0x30 This happens because remove_unplugged_switch() calls tb_switch_remove() that releases the memory pointed by sw so the following lines reference to a memory that might be released already. Fix this by saving pointer to the parent device before calling tb_switch_remove(). Reported-by: Paulian Bogdan Marinca Fixes: 4f7c2e0d8765 ("thunderbolt: Make sure device runtime resume completes before taking domain lock") Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 01cf158e48d2b5ce947430de5896c10f4f7c1822 Author: Thomas Gleixner Date: Thu Nov 19 15:07:19 2020 +0100 Revert "iommu/vt-d: Take CONFIG_PCI_ATS into account" This reverts commit 8986f223bd777a73119f5d593c15b4d630ff49bb. The proper fix is queued in Will's tree now Signed-off-by: Thomas Gleixner commit fbc6e1c6e0a4b5ef402f9eb8d00880a5e1d98df3 Author: Masami Hiramatsu Date: Thu Nov 19 14:53:49 2020 +0900 docs: bootconfig: Update file format on initrd image To align the total file size, add padding null character when appending the bootconfig to initrd image. Link: https://lkml.kernel.org/r/160576522916.320071.4145530996151028855.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit e1cef2d4c379b2aab43a7dc9601f645048209090 Author: Masami Hiramatsu Date: Thu Nov 19 14:53:40 2020 +0900 tools/bootconfig: Align the bootconfig applied initrd image size to 4 Align the bootconfig applied initrd image size to 4. To fill the gap, the bootconfig command uses null characters in between the bootconfig data and the footer. This will expands the footer size but don't change the checksum. Thus the block image of the initrd file with bootconfig is as follows. [initrd][bootconfig][(pad)][size][csum]["#BOOTCONFIG\n"] Link: https://lkml.kernel.org/r/160576522046.320071.8550680670010950634.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit a995e6bc0524450adfd6181dfdcd9d0520cfaba5 Author: Masami Hiramatsu Date: Thu Nov 19 14:53:31 2020 +0900 tools/bootconfig: Fix to check the write failure correctly Fix to check the write(2) failure including partial write correctly and try to rollback the partial write, because if there is no BOOTCONFIG_MAGIC string, we can not remove it. Link: https://lkml.kernel.org/r/160576521135.320071.3883101436675969998.stgit@devnote2 Fixes: 85c46b78da58 ("bootconfig: Add bootconfig magic word for indicating bootconfig explicitly") Suggested-by: Linus Torvalds Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit a61ea6379ae9dbb63fbf022d1456733520db6be7 Author: Masami Hiramatsu Date: Thu Nov 19 14:53:22 2020 +0900 tools/bootconfig: Fix errno reference after printf() Fix not to refer the errno variable as the result of previous libc functions after printf() because printf() can change the errno. Link: https://lkml.kernel.org/r/160576520243.320071.51093664672431249.stgit@devnote2 Fixes: 85c46b78da58 ("bootconfig: Add bootconfig magic word for indicating bootconfig explicitly") Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit b5dbc4d36885bef6257054a737a76101d293b185 Author: Maxime Ripard Date: Thu Nov 5 14:56:54 2020 +0100 drm/vc4: kms: Document the muxing corner cases We've had a number of muxing corner-cases with specific ways to reproduce them, so let's document them to make sure they aren't lost and introduce regressions later on. Signed-off-by: Maxime Ripard Tested-by: Hoegeun Kwon Reviewed-by: Hoegeun Kwon Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201105135656.383350-6-maxime@cerno.tech commit a72b0458cd5123b40dd5084f6e536af63aeacda1 Author: Maxime Ripard Date: Thu Nov 5 14:56:53 2020 +0100 drm/vc4: kms: Split the HVS muxing check in a separate function The code that assigns HVS channels during atomic_check is starting to grow a bit big, let's move it into a separate function. Signed-off-by: Maxime Ripard Tested-by: Hoegeun Kwon Reviewed-by: Hoegeun Kwon Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201105135656.383350-5-maxime@cerno.tech commit a9661f27dc6bfbb6869b07cf68f9c2fd05167746 Author: Maxime Ripard Date: Thu Nov 5 14:56:52 2020 +0100 drm/vc4: kms: Rename NUM_CHANNELS The NUM_CHANNELS define has a pretty generic name and was right before the function using it. Let's move to something that makes the hardware-specific nature more obvious, and to a more appropriate place. Signed-off-by: Maxime Ripard Tested-by: Hoegeun Kwon Reviewed-by: Hoegeun Kwon Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201105135656.383350-4-maxime@cerno.tech commit 213189dbe7a1d7b1032aca4eacb0348a3ed67823 Author: Maxime Ripard Date: Thu Nov 5 14:56:51 2020 +0100 drm/vc4: kms: Remove useless define NUM_OUTPUTS isn't used anymore, let's remove it. Signed-off-by: Maxime Ripard Tested-by: Hoegeun Kwon Reviewed-by: Hoegeun Kwon Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201105135656.383350-3-maxime@cerno.tech commit 3c354ed1c43dabbdaae8569f982cdcccfdecd6a8 Author: Maxime Ripard Date: Thu Nov 5 14:56:50 2020 +0100 drm/vc4: kms: Switch to drmm_add_action_or_reset Even though it was pointed in the review by Daniel, and I thought to have fixed it while applying the patches, but it turns out I forgot to commit the fixes in the process. Properly fix it this time. Fixes: dcda7c28bff2 ("drm/vc4: kms: Add functions to create the state objects") Signed-off-by: Maxime Ripard Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201105135656.383350-2-maxime@cerno.tech commit 57fb32e632be4d406b4594829e3befdae1100c12 Author: Maxime Ripard Date: Thu Oct 29 13:25:22 2020 +0100 drm/vc4: hdmi: Block odd horizontal timings The FIFO between the pixelvalve and the HDMI controller runs at 2 pixels per clock cycle, and cannot deal with odd timings. Let's reject any mode with such timings. Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20201029122522.1917579-2-maxime@cerno.tech commit 63495f6b4aede26e6f8fe3da69e5cfdd8a4ccc3b Author: Maxime Ripard Date: Thu Oct 29 13:25:21 2020 +0100 drm/vc4: hdmi: Make sure our clock rate is within limits The HDMI controller cannot go above a certain pixel rate limit depending on the generations, but that limit is only enforced in mode_valid at the moment, which means that we won't advertise modes that exceed that limit, but the userspace is still free to try to setup a mode that would. Implement atomic_check to make sure we check it in that scenario too. Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20201029122522.1917579-1-maxime@cerno.tech commit de15e20f50b126b3a5a753dd259df775e6a0ea5c Merge: 4fba15fbb8106 7dc7a8b04f3da Author: Rafael J. Wysocki Date: Thu Nov 19 14:03:52 2020 +0100 Merge branch 'acpi-fan' * acpi-fan: ACPI: fan: Initialize performance state sysfs attribute commit 3a8ac4d39651c71d6d2f3376b13d0bad1484249a Merge: 14c620cf2ee81 c39de538a06e7 Author: Rafael J. Wysocki Date: Thu Nov 19 14:02:18 2020 +0100 Merge branch 'pm-cpuidle' * pm-cpuidle: cpuidle: tegra: Annotate tegra_pm_set_cpu_in_lp2() with RCU_NONIDLE commit fbdae7d6d04d2db36c687723920f612e93b2cbda Author: Hans de Goede Date: Wed Nov 18 13:15:15 2020 +0100 ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks The HP Pavilion x2 Detachable line comes in many variants: 1. Bay Trail SoC + AXP288 PMIC, Micro-USB charging (10-k010nz, ...) DMI_SYS_VENDOR: "Hewlett-Packard" DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable PC 10" DMI_BOARD_NAME: "8021" 2. Bay Trail SoC + AXP288 PMIC, Type-C charging (10-n000nd, 10-n010nl, ...) DMI_SYS_VENDOR: "Hewlett-Packard" DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable" DMI_BOARD_NAME: "815D" 3. Cherry Trail SoC + AXP288 PMIC, Type-C charging (10-n101ng, ...) DMI_SYS_VENDOR: "HP" DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable" DMI_BOARD_NAME: "813E" 4. Cherry Trail SoC + TI PMIC, Type-C charging (10-p002nd, 10-p018wm, ...) DMI_SYS_VENDOR: "HP" DMI_PRODUCT_NAME: "HP x2 Detachable 10-p0XX" DMI_BOARD_NAME: "827C" 5. Cherry Trail SoC + TI PMIC, Type-C charging (x2-210-g2, ...) DMI_SYS_VENDOR: "HP" DMI_PRODUCT_NAME: "HP x2 210 G2" DMI_BOARD_NAME: "82F4" Variant 1 needs the exact same quirk as variant 2, so relax the DMI check for the existing quirk a bit so that it matches both variant 1 and 2 (note the other variants will still not match). Variant 2 already has an existing quirk (which now also matches variant 1) Variant 3 uses a cx2072x codec, so is not applicable here. Variant 4 almost works with the defaults, but it also needs a quirk to fix jack-detection, add a new quirk for this. Variant 5 does use a RT5640 codec (based on old dmesg output), but was otherwise not tested, keep using the defaults for this variant. Fixes: ec8e8418ff7d ("ASoC: Intel: bytcr_rt5640: Add quirks for various devices") Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201118121515.11441-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit da631f7fd623b6c180c8d93a93040d1e0d61291f Author: Daniel Axtens Date: Tue Nov 17 16:59:16 2020 +1100 powerpc/64s: rename pnv|pseries_setup_rfi_flush to _setup_security_mitigations pseries|pnv_setup_rfi_flush already does the count cache flush setup, and we just added entry and uaccess flushes. So the name is not very accurate any more. In both platforms we then also immediately setup the STF flush. Rename them to _setup_security_mitigations and fold the STF flush in. Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman commit 0d239f3b03efc78fb5b290aff6c747fecd3b98cb Author: Daniel Axtens Date: Tue Nov 17 16:59:15 2020 +1100 selftests/powerpc: refactor entry and rfi_flush tests For simplicity in backporting, the original entry_flush test contained a lot of duplicated code from the rfi_flush test. De-duplicate that code. Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman commit 89a83a0c69c81a25ce91002b90ca27ed86132a0a Author: Daniel Axtens Date: Tue Nov 17 16:59:14 2020 +1100 selftests/powerpc: entry flush test Add a test modelled on the RFI flush test which counts the number of L1D misses doing a simple syscall with the entry flush on and off. For simplicity of backporting, this test duplicates a lot of code from rfi_flush. We clean that up in the next patch. Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman commit 178d52c6e89c38d0553b0ac8b99927b11eb995b0 Author: Michael Ellerman Date: Thu Nov 19 23:43:53 2020 +1100 powerpc: Only include kup-radix.h for 64-bit Book3S In kup.h we currently include kup-radix.h for all 64-bit builds, which includes Book3S and Book3E. The latter doesn't make sense, Book3E never uses the Radix MMU. This has worked up until now, but almost by accident, and the recent uaccess flush changes introduced a build breakage on Book3E because of the bad structure of the code. So disentangle things so that we only use kup-radix.h for Book3S. This requires some more stubs in kup.h and fixing an include in syscall_64.c. Signed-off-by: Michael Ellerman commit 9a32a7e78bd0cd9a9b6332cbdc345ee5ffd0c5de Author: Nicholas Piggin Date: Tue Nov 17 16:59:13 2020 +1100 powerpc/64s: flush L1D after user accesses IBM Power9 processors can speculatively operate on data in the L1 cache before it has been completely validated, via a way-prediction mechanism. It is not possible for an attacker to determine the contents of impermissible memory using this method, since these systems implement a combination of hardware and software security measures to prevent scenarios where protected data could be leaked. However these measures don't address the scenario where an attacker induces the operating system to speculatively execute instructions using data that the attacker controls. This can be used for example to speculatively bypass "kernel user access prevention" techniques, as discovered by Anthony Steinhauser of Google's Safeside Project. This is not an attack by itself, but there is a possibility it could be used in conjunction with side-channels or other weaknesses in the privileged code to construct an attack. This issue can be mitigated by flushing the L1 cache between privilege boundaries of concern. This patch flushes the L1 cache after user accesses. This is part of the fix for CVE-2020-4788. Signed-off-by: Nicholas Piggin Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman commit f79643787e0a0762d2409b7b8334e83f22d85695 Author: Nicholas Piggin Date: Tue Nov 17 16:59:12 2020 +1100 powerpc/64s: flush L1D on kernel entry IBM Power9 processors can speculatively operate on data in the L1 cache before it has been completely validated, via a way-prediction mechanism. It is not possible for an attacker to determine the contents of impermissible memory using this method, since these systems implement a combination of hardware and software security measures to prevent scenarios where protected data could be leaked. However these measures don't address the scenario where an attacker induces the operating system to speculatively execute instructions using data that the attacker controls. This can be used for example to speculatively bypass "kernel user access prevention" techniques, as discovered by Anthony Steinhauser of Google's Safeside Project. This is not an attack by itself, but there is a possibility it could be used in conjunction with side-channels or other weaknesses in the privileged code to construct an attack. This issue can be mitigated by flushing the L1 cache between privilege boundaries of concern. This patch flushes the L1 cache on kernel entry. This is part of the fix for CVE-2020-4788. Signed-off-by: Nicholas Piggin Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman commit fcb48454c23c5679d1a2e252f127642e91b05cbe Author: Russell Currey Date: Tue Nov 17 16:59:11 2020 +1100 selftests/powerpc: rfi_flush: disable entry flush if present We are about to add an entry flush. The rfi (exit) flush test measures the number of L1D flushes over a syscall with the RFI flush enabled and disabled. But if the entry flush is also enabled, the effect of enabling and disabling the RFI flush is masked. If there is a debugfs entry for the entry flush, disable it during the RFI flush and restore it later. Reported-by: Spoorthy S Signed-off-by: Russell Currey Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman commit 551310e7356cb8af4eb4c618961ad1e7b2f89e19 Author: Takashi Iwai Date: Thu Nov 19 13:04:04 2020 +0100 ALSA: hda/ca0132: Fix compile warning without PCI CONFIG_PCI=n leads to a compile warning like: sound/pci/hda/patch_ca0132.c:8214:10: warning: no case matching constant switch condition '0' due to the missed handling of QUIRK_NONE in ca0132_mmio_init(). Fix it. Fixes: bf2aa9ccc8e5 ("ALSA: hda/ca0132 - Cleanup ca0132_mmio_init function.") Reported-by: kernel test robot Link: https://lore.kernel.org/r/20201119120404.16833-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 91c2c28d8de34815ea9bb4d16e9db7308ad33d3e Author: Will Deacon Date: Thu Nov 19 11:12:17 2020 +0000 MAINTAINERS: Temporarily add myself to the IOMMU entry Joerg is recovering from an injury, so temporarily add myself to the IOMMU MAINTAINERS entry so that I'm more likely to get CC'd on patches while I help to look after the tree for him. Suggested-by: Joerg Roedel Link: https://lore.kernel.org/r/20201117100953.GR22888@8bytes.org Signed-off-by: Will Deacon commit 3645a34f5b962aeedeb02f30cdf048eaae9b5f5c Author: Lu Baolu Date: Thu Nov 19 13:51:19 2020 +0800 iommu/vt-d: Fix compile error with CONFIG_PCI_ATS not set Fix the compile error below (CONFIG_PCI_ATS not set): drivers/iommu/intel/dmar.c: In function ‘vf_inherit_msi_domain’: drivers/iommu/intel/dmar.c:338:59: error: ‘struct pci_dev’ has no member named ‘physfn’; did you mean ‘is_physfn’? 338 | dev_set_msi_domain(&pdev->dev, dev_get_msi_domain(&pdev->physfn->dev)); | ^~~~~~ | is_physfn Fixes: ff828729be44 ("iommu/vt-d: Cure VF irqdomain hickup") Reported-by: Geert Uytterhoeven Signed-off-by: Lu Baolu Cc: Thomas Gleixner Link: https://lore.kernel.org/linux-iommu/CAMuHMdXA7wfJovmfSH2nbAhN0cPyCiFHodTvg4a8Hm9rx5Dj-w@mail.gmail.com/ Link: https://lore.kernel.org/r/20201119055119.2862701-1-baolu.lu@linux.intel.com Signed-off-by: Will Deacon commit 388255ce95cfe456409efd9a8a2ab7be41dd422c Merge: 4d213e76a359e ff828729be446 Author: Will Deacon Date: Thu Nov 19 09:46:58 2020 +0000 Merge tag 'x86-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into for-next/iommu/fixes Pull in x86 fixes from Thomas, as they include a change to the Intel DMAR code on which we depend: * tag 'x86-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: iommu/vt-d: Cure VF irqdomain hickup x86/platform/uv: Fix copied UV5 output archtype x86/platform/uv: Drop last traces of uv_flush_tlb_others commit 05d5de6ba7dbe490dd413b5ca11d0875bd2bc006 Author: Marc Kleine-Budde Date: Wed Nov 11 15:12:11 2020 +0100 ARM: dts: dra76x: m_can: fix order of clocks According to the bosch,m_can.yaml bindings the first clock shall be the "hclk", while the second clock "cclk". This patch fixes the order accordingly. Fixes: 0adbe832f21a ("ARM: dts: dra76x: Add MCAN node") Cc: Faiz Abbas Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off-by: Marc Kleine-Budde Signed-off-by: Tony Lindgren commit 65fb73676112f6fd107c5e542b2cbcfb206fe881 Author: Grygorii Strashko Date: Wed Nov 18 16:19:00 2020 +0200 bus: ti-sysc: suppress err msg for timers used as clockevent/source GP Timers used as clockevent/source are not available for ti-sysc bus and handled by Kernel timekeeping core. Now ti-sysc produces error message every time such timer is detected: "ti-sysc: probe of 48040000.target-module failed with error -16" Such messages are not necessary, so suppress them by returning -ENXIO instead of -EBUSY. Fixes: 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4") Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit cdf117d6d38a127026e74114d63f32972f620c06 Merge: 6654b57866b98 957a1ea359921 Author: Maxime Ripard Date: Thu Nov 19 09:26:06 2020 +0100 Merge tag 'drm/sun4i-dma-fix-pull-request' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-misc-fixes Fix for drm/sun4i shared with arm-soc This patch is a preliminary fix that will conflict with subsequent work merged through arm-soc. Signed-off-by: Maxime Ripard # gpg: Signature made Wed 18 Nov 2020 09:51:53 AM CET # gpg: using EDDSA key 5C1337A45ECA9AEB89060E9EE3EF0D6F671851C5 # gpg: Good signature from "Maxime Ripard " [unknown] # gpg: aka "Maxime Ripard " [unknown] # gpg: aka "Maxime Ripard (Work Address) " [unknown] # gpg: aka "Maxime Ripard (Work Address) " [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: BE56 75C3 7E81 8C8B 5764 241C 254B CFC5 6BF6 CE8D # Subkey fingerprint: 5C13 37A4 5ECA 9AEB 8906 0E9E E3EF 0D6F 6718 51C5 From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201118090455.sznrgpduuytlc22k@gilmour.lan commit 3ce8d49ca199014ae91d6089ae0979402b8262c0 Merge: b4ca4354b42e5 4ec2b69da5e15 Author: Rodrigo Vivi Date: Thu Nov 19 01:52:50 2020 -0500 Merge tag 'gvt-fixes-2020-11-17' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2020-11-17 - Temporarily disable VFIO edid on BXT/APL (Colin) - Fix emulated DPCD for version 1.2 (Tina) - Fix error return when failing to take module reference (Xiongfeng) Signed-off-by: Rodrigo Vivi From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20201117023918.GB23899@zhen-hp.sh.intel.com commit b4ca4354b42e59f13365a6901bdc5e729cf4adb4 Author: Chris Wilson Date: Wed Nov 18 13:38:39 2020 +0000 drm/i915/gt: Remember to free the virtual breadcrumbs Since we allocate some breadcrumbs for the virtual engine, and the virtual engine has a custom destructor, we also need to free the breadcrumbs after use. Fixes: b3786b29379c ("drm/i915/gt: Distinguish the virtual breadcrumbs from the irq breadcrumbs") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201118133839.1783-1-chris@chris-wilson.co.uk (cherry picked from commit 45e50f48b7907e650cfbbc7879abfe3a0c419c73) Signed-off-by: Rodrigo Vivi commit d2e3fce9ddafe689c6f7cb355f23560637e30b9d Author: Ville Syrjälä Date: Tue Nov 10 23:04:47 2020 +0200 drm/i915: Handle max_bpc==16 EDID can declare the maximum supported bpc up to 16, and apparently there are displays that do so. Currently we assume 12 bpc is tha max. Fix the assumption and toss in a MISSING_CASE() for any other value we don't expect to see. This fixes modesets with a display with EDID max bpc > 12. Previously any modeset would just silently fail on platforms that didn't otherwise limit this via the max_bpc property. In particular we don't add the max_bpc property to HDMI ports on gmch platforms, and thus we would see the raw max_bpc coming from the EDID. I suppose we could already adjust this to also allow 16bpc, but seeing as no current platform supports that there is little point. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2632 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201110210447.27454-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza (cherry picked from commit 2ca5a7b85b0c2b97ef08afbd7799b022e29f192e) Signed-off-by: Rodrigo Vivi commit 73cc291c270248567245f084dcdf5078069af6b5 Author: Can Guo Date: Tue Sep 22 00:09:04 2020 -0700 scsi: ufs: Make sure clk scaling happens only when HBA is runtime ACTIVE If someone plays with the UFS clk scaling devfreq governor through sysfs, ufshcd_devfreq_scale may be called even when HBA is not runtime ACTIVE. This can lead to unexpected error. We cannot just protect it by calling pm_runtime_get_sync() because that may cause a race condition since HBA runtime suspend ops need to suspend clk scaling. To fix this call pm_runtime_get_noresume() and check HBA's runtime status. Only proceed if HBA is runtime ACTIVE, otherwise just bail. governor_store devfreq_performance_handler update_devfreq devfreq_set_target ufshcd_devfreq_target ufshcd_devfreq_scale Link: https://lore.kernel.org/r/1600758548-28576-1-git-send-email-cang@codeaurora.org Reviewed-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 1699f980d87fb678a669490462cf0b9517c1fb47 Author: Can Guo Date: Wed Oct 21 22:59:00 2020 -0700 scsi: ufs: Fix unexpected values from ufshcd_read_desc_param() WB-related sysfs entries can be accessed even when an UFS device does not support the feature. The descriptors which are not supported by the UFS device may be wrongly reported when they are accessed from their corrsponding sysfs entries. Fix it by adding a sanity check of parameter offset against the actual decriptor length. Link: https://lore.kernel.org/r/1603346348-14149-1-git-send-email-cang@codeaurora.org Reviewed-by: Asutosh Das Acked-by: Daejun Park Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit f0b0a2d8a1fd4e862f8f5bf8bf449d116264ce5c Merge: 6d9c8d15af0ef a1f634463aaf2 Author: Jakub Kicinski Date: Wed Nov 18 17:49:24 2020 -0800 Merge tag 'linux-can-fixes-for-5.10-20201118' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2020-11-18 Jimmy Assarsson provides two patches for the kvaser_pciefd and kvaser_usb drivers, where the can_bittiming_const are fixed. The next patch is by me and fixes an erroneous flexcan_transceiver_enable() during bus-off recovery in the flexcan driver. Jarkko Nikula's patch for the m_can driver fixes the IRQ handler to only process the interrupts if the device is not suspended. * tag 'linux-can-fixes-for-5.10-20201118' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: m_can: process interrupt only when not runtime suspended can: flexcan: flexcan_chip_start(): fix erroneous flexcan_transceiver_enable() during bus-off recovery can: kvaser_usb: kvaser_usb_hydra: Fix KCAN bittiming limits can: kvaser_pciefd: Fix KCAN bittiming limits ==================== Link: https://lore.kernel.org/r/20201118160414.2731659-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 6d9c8d15af0ef20a66a0b432cac0d08319920602 Author: Aya Levin Date: Wed Nov 18 10:19:22 2020 +0200 net/mlx4_core: Fix init_hca fields offset Slave function read the following capabilities from the wrong offset: 1. log_mc_entry_sz 2. fs_log_entry_sz 3. log_mc_hash_sz Fix that by adjusting these capabilities offset to match firmware layout. Due to the wrong offset read, the following issues might occur: 1+2. Negative value reported at max_mcast_qp_attach. 3. Driver to init FW with multicast hash size of zero. Fixes: a40ded604365 ("net/mlx4_core: Add masking for a few queries on HCA caps") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Reviewed-by: Eran Ben Elisha Signed-off-by: Tariq Toukan Link: https://lore.kernel.org/r/20201118081922.553-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit f93e8497a9bc6d4b7a0efcb9f54e36f806544a38 Merge: 6dceaa9f56e22 68ec32daf7d50 Author: Jakub Kicinski Date: Wed Nov 18 17:17:32 2020 -0800 Merge tag 'mlx5-fixes-2020-11-17' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2020-11-17 This series introduces some fixes to mlx5 driver. * tag 'mlx5-fixes-2020-11-17' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: fix error return code in mlx5e_tc_nic_init() net/mlx5: E-Switch, Fail mlx5_esw_modify_vport_rate if qos disabled net/mlx5: Disable QoS when min_rates on all VFs are zero net/mlx5: Clear bw_share upon VF disable net/mlx5: Add handling of port type in rule deletion net/mlx5e: Fix check if netdev is bond slave net/mlx5e: Fix IPsec packet drop by mlx5e_tc_update_skb net/mlx5e: Set IPsec WAs only in IP's non checksum partial case. net/mlx5e: Fix refcount leak on kTLS RX resync ==================== Link: https://lore.kernel.org/r/20201117195702.386113-1-saeedm@nvidia.com Signed-off-by: Jakub Kicinski commit 6dceaa9f56e22d0f9b4c4ad2ed9e04e315ce7fe5 Author: Sebastian Andrzej Siewior Date: Mon Nov 16 17:21:14 2020 +0100 atm: nicstar: Unmap DMA on send error The `skb' is mapped for DMA in ns_send() but does not unmap DMA in case push_scqe() fails to submit the `skb'. The memory of the `skb' is released so only the DMA mapping is leaking. Unmap the DMA mapping in case push_scqe() failed. Fixes: 864a3ff635fa7 ("atm: [nicstar] remove virt_to_bus() and support 64-bit platforms") Cc: Chas Williams <3chas3@gmail.com> Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jakub Kicinski commit d8c19014bba8f565d8a2f1f46b4e38d1d97bf1a7 Author: Dongli Zhang Date: Sun Nov 15 12:10:29 2020 -0800 page_frag: Recover from memory pressure The ethernet driver may allocate skb (and skb->data) via napi_alloc_skb(). This ends up to page_frag_alloc() to allocate skb->data from page_frag_cache->va. During the memory pressure, page_frag_cache->va may be allocated as pfmemalloc page. As a result, the skb->pfmemalloc is always true as skb->data is from page_frag_cache->va. The skb will be dropped if the sock (receiver) does not have SOCK_MEMALLOC. This is expected behaviour under memory pressure. However, once kernel is not under memory pressure any longer (suppose large amount of memory pages are just reclaimed), the page_frag_alloc() may still re-use the prior pfmemalloc page_frag_cache->va to allocate skb->data. As a result, the skb->pfmemalloc is always true unless page_frag_cache->va is re-allocated, even if the kernel is not under memory pressure any longer. Here is how kernel runs into issue. 1. The kernel is under memory pressure and allocation of PAGE_FRAG_CACHE_MAX_ORDER in __page_frag_cache_refill() will fail. Instead, the pfmemalloc page is allocated for page_frag_cache->va. 2: All skb->data from page_frag_cache->va (pfmemalloc) will have skb->pfmemalloc=true. The skb will always be dropped by sock without SOCK_MEMALLOC. This is an expected behaviour. 3. Suppose a large amount of pages are reclaimed and kernel is not under memory pressure any longer. We expect skb->pfmemalloc drop will not happen. 4. Unfortunately, page_frag_alloc() does not proactively re-allocate page_frag_alloc->va and will always re-use the prior pfmemalloc page. The skb->pfmemalloc is always true even kernel is not under memory pressure any longer. Fix this by freeing and re-allocating the page instead of recycling it. References: https://lore.kernel.org/lkml/20201103193239.1807-1-dongli.zhang@oracle.com/ References: https://lore.kernel.org/linux-mm/20201105042140.5253-1-willy@infradead.org/ Suggested-by: Matthew Wilcox (Oracle) Cc: Aruna Ramakrishna Cc: Bert Barbe Cc: Rama Nichanamatlu Cc: Venkat Venkatsubra Cc: Manjunath Patil Cc: Joe Jin Cc: SRINIVAS Fixes: 79930f5892e1 ("net: do not deplete pfmemalloc reserve") Signed-off-by: Dongli Zhang Acked-by: Vlastimil Babka Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20201115201029.11903-1-dongli.zhang@oracle.com Signed-off-by: Jakub Kicinski commit 2b3af2705645c87eee0f386e075871886fd429b3 Author: Rodrigo Siqueira Date: Tue Nov 17 09:33:51 2020 -0500 drm/amd/display: Always get CRTC updated constant values inside commit tail We recently improved our display atomic commit and tail sequence to avoid some issues related to concurrency. One of the major changes consisted of moving the interrupt disable and the stream release from our atomic commit to our atomic tail (commit 6d90a208cfff ("drm/amd/display: Move disable interrupt into commit tail")) . However, the new code introduced inside our commit tail function was inserted right after the function drm_atomic_helper_update_legacy_modeset_state(), which has routines for updating internal data structs related to timestamps. As a result, in certain conditions, the display module can reach a situation where we update our constants and, after that, clean it. This situation generates the following warning: amdgpu 0000:03:00.0: drm_WARN_ON_ONCE(drm_drv_uses_atomic_modeset(dev)) WARNING: CPU: 6 PID: 1269 at drivers/gpu/drm/drm_vblank.c:722 drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x32b/0x340 [drm] ... RIP: 0010:drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x32b/0x340 [drm] ... Call Trace: ? dc_stream_get_vblank_counter+0x57/0x60 [amdgpu] drm_crtc_vblank_helper_get_vblank_timestamp+0x1c/0x20 [drm] drm_get_last_vbltimestamp+0xad/0xc0 [drm] drm_reset_vblank_timestamp+0x63/0xd0 [drm] drm_crtc_vblank_on+0x85/0x150 [drm] amdgpu_dm_atomic_commit_tail+0xaf1/0x2330 [amdgpu] commit_tail+0x99/0x130 [drm_kms_helper] drm_atomic_helper_commit+0x123/0x150 [drm_kms_helper] amdgpu_dm_atomic_commit+0x11/0x20 [amdgpu] drm_atomic_commit+0x4a/0x50 [drm] drm_atomic_helper_set_config+0x7c/0xc0 [drm_kms_helper] drm_mode_setcrtc+0x20b/0x7e0 [drm] ? tomoyo_path_number_perm+0x6f/0x200 ? drm_mode_getcrtc+0x190/0x190 [drm] drm_ioctl_kernel+0xae/0xf0 [drm] drm_ioctl+0x245/0x400 [drm] ? drm_mode_getcrtc+0x190/0x190 [drm] amdgpu_drm_ioctl+0x4e/0x80 [amdgpu] __x64_sys_ioctl+0x91/0xc0 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ... For fixing this issue we rely upon a refactor introduced on drm_atomic_helper_update_legacy_modeset_state ("Remove the timestamping constant update from drm_atomic_helper_update_legacy_modeset_state()") which decouples constant values update from drm_atomic_helper_update_legacy_modeset_state to a new helper. Basically, this commit uses this new helper and place it right after our release module to avoid a situation where our CRTC struct gets wrong values. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1373 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1349 Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c2e7554e1b85935d962127efa3c2a76483b0b3b6 Merge: ce228d4594249 20b329129009c Author: Linus Torvalds Date: Wed Nov 18 12:12:18 2020 -0800 Merge tag 'gfs2-v5.10-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fix from Andreas Gruenbacher: "Fix gfs2 freeze/thaw" * tag 'gfs2-v5.10-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix regression in freeze_go_sync commit ce228d45942492580968d698b0216d3356d75226 Merge: f86fee1845eec c3213d260a23e Author: Linus Torvalds Date: Wed Nov 18 12:06:34 2020 -0800 Merge tag 'nfsd-5.10-2' of git://linux-nfs.org/~bfields/linux Pull nfsd fix from Bruce Fields: "Just one quick fix for a tracing oops" * tag 'nfsd-5.10-2' of git://linux-nfs.org/~bfields/linux: SUNRPC: Fix oops in the rpc_xdr_buf event class commit f86fee1845eec29bed735e7120e6993ad8c4e295 Merge: 0fa8ee0d9ab95 3084db0e0d507 Author: Linus Torvalds Date: Wed Nov 18 11:57:55 2020 -0800 Merge tag 'linux-kselftest-kunit-fixes-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kunit fixes from Shuah Khan: "Several fixes to Kunit documentation and tools, and to not pollute the source directory. Also remove the incorrect kunit .gitattributes file" * tag 'linux-kselftest-kunit-fixes-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: fix display of failed expectations for strings kunit: tool: fix extra trailing \n in raw + parsed test output kunit: tool: print out stderr from make (like build warnings) KUnit: Docs: usage: wording fixes KUnit: Docs: style: fix some Kconfig example issues KUnit: Docs: fix a wording typo kunit: Do not pollute source directory with generated files (test.log) kunit: Do not pollute source directory with generated files (.kunitconfig) kunit: tool: fix pre-existing python type annotation errors kunit: Fix kunit.py parse subcommand (use null build_dir) kunit: tool: unmark test_data as binary blobs commit a3dcb3e7e70c72a68a79b30fc3a3adad5612731c Author: Andrew Lunn Date: Mon Nov 16 08:43:01 2020 -0800 net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset When the switch is hardware reset, it reads the contents of the EEPROM. This can contain instructions for programming values into registers and to perform waits between such programming. Reading the EEPROM can take longer than the 100ms mv88e6xxx_hardware_reset() waits after deasserting the reset GPIO. So poll the EEPROM done bit to ensure it is complete. Signed-off-by: Andrew Lunn Signed-off-by: Ruslan Sushko Link: https://lore.kernel.org/r/20201116164301.977661-1-rus@sushko.dev Signed-off-by: Jakub Kicinski commit fc2635bff24c6b75291ead011c16da7a053fb4f5 Merge: 1532b97784785 1f492eab67bce Author: Jakub Kicinski Date: Wed Nov 18 11:07:03 2020 -0800 Merge branch 'mlxsw-couple-of-fixes' Ido Schimmel says: ==================== mlxsw: Couple of fixes Patch #1 fixes firmware flashing when CONFIG_MLXSW_CORE=y and CONFIG_MLXFW=m. Patch #2 prevents EMAD transactions from needlessly failing when the system is under heavy load by using exponential backoff. Please consider patch #2 for stable. ==================== Link: https://lore.kernel.org/r/20201117173352.288491-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 1f492eab67bced119a0ac7db75ef2047e29a30c6 Author: Ido Schimmel Date: Tue Nov 17 19:33:52 2020 +0200 mlxsw: core: Use variable timeout for EMAD retries The driver sends Ethernet Management Datagram (EMAD) packets to the device for configuration purposes and waits for up to 200ms for a reply. A request is retried up to 5 times. When the system is under heavy load, replies are not always processed in time and EMAD transactions fail. Make the process more robust to such delays by using exponential backoff. First wait for up to 200ms, then retransmit and wait for up to 400ms and so on. Fixes: caf7297e7ab5 ("mlxsw: core: Introduce support for asynchronous EMAD register access") Reported-by: Denis Yulevich Tested-by: Denis Yulevich Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit fb738b99ef229bd3d25f1b3e5503925dba9b1a7c Author: Ido Schimmel Date: Tue Nov 17 19:33:51 2020 +0200 mlxsw: Fix firmware flashing The commit cited below moved firmware flashing functionality from mlxsw_spectrum to mlxsw_core, but did not adjust the Kconfig dependencies. This makes it possible to have mlxsw_core as built-in and mlxfw as a module. The mlxfw code is therefore not reachable from mlxsw_core and firmware flashing fails: # devlink dev flash pci/0000:01:00.0 file mellanox/mlxsw_spectrum-13.2008.1310.mfa2 devlink answers: Operation not supported Fix by having mlxsw_core select mlxfw. Fixes: b79cb787ac70 ("mlxsw: Move fw flashing code into core.c") Signed-off-by: Ido Schimmel Reported-by: Vadim Pasternak Tested-by: Vadim Pasternak Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 1532b9778478577152201adbafa7738b1e844868 Author: Florian Fainelli Date: Mon Nov 16 19:52:34 2020 -0800 net: Have netpoll bring-up DSA management interface DSA network devices rely on having their DSA management interface up and running otherwise their ndo_open() will return -ENETDOWN. Without doing this it would not be possible to use DSA devices as netconsole when configured on the command line. These devices also do not utilize the upper/lower linking so the check about the netpoll device having upper is not going to be a problem. The solution adopted here is identical to the one done for net/ipv4/ipconfig.c with 728c02089a0e ("net: ipv4: handle DSA enabled master network devices"), with the network namespace scope being restricted to that of the process configuring netpoll. Fixes: 04ff53f96a93 ("net: dsa: Add netconsole support") Tested-by: Vladimir Oltean Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20201117035236.22658-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski commit 3a36060bf294e7b7e33c5dddcc4f5d2c1c834e56 Author: Zhang Changzhong Date: Tue Nov 17 10:57:55 2020 +0800 atl1e: fix error return code in atl1e_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: a6a5325239c2 ("atl1e: Atheros L1E Gigabit Ethernet driver") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1605581875-36281-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit 537a14726582c4e7bfe4dff9cb7fca19dc912cf6 Author: Zhang Changzhong Date: Tue Nov 17 10:55:21 2020 +0800 atl1c: fix error return code in atl1c_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 43250ddd75a3 ("atl1c: Atheros L1C Gigabit Ethernet driver") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1605581721-36028-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit a5ebcbdf34b65fcc07f38eaf2d60563b42619a59 Author: Zhang Changzhong Date: Tue Nov 17 10:45:05 2020 +0800 ah6: fix error return code in ah6_input() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1605581105-35295-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit df8d85d8c69d6837817e54dcb73c84a8b5a13877 Author: Filip Moc Date: Tue Nov 17 18:36:31 2020 +0100 net: usb: qmi_wwan: Set DTR quirk for MR400 LTE module MR400 embedded in TL-MR6400 v4 requires DTR to be set. Signed-off-by: Filip Moc Acked-by: Bjørn Mork Link: https://lore.kernel.org/r/20201117173631.GA550981@moc6.cz Signed-off-by: Jakub Kicinski commit 2ba546ebe0ce2af47833d8912ced9b4a579f13cb Author: Nishanth Menon Date: Wed Nov 18 08:50:09 2020 -0600 regulator: ti-abb: Fix array out of bound read access on the first transition At the start of driver initialization, we do not know what bias setting the bootloader has configured the system for and we only know for certain the very first time we do a transition. However, since the initial value of the comparison index is -EINVAL, this negative value results in an array out of bound access on the very first transition. Since we don't know what the setting is, we just set the bias configuration as there is nothing to compare against. This prevents the array out of bound access. NOTE: Even though we could use a more relaxed check of "< 0" the only valid values(ignoring cosmic ray induced bitflips) are -EINVAL, 0+. Fixes: 40b1936efebd ("regulator: Introduce TI Adaptive Body Bias(ABB) on-chip LDO driver") Link: https://lore.kernel.org/linux-mm/CA+G9fYuk4imvhyCN7D7T6PMDH6oNp6HDCRiTUKMQ6QXXjBa4ag@mail.gmail.com/ Reported-by: Naresh Kamboju Reviewed-by: Arnd Bergmann Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20201118145009.10492-1-nm@ti.com Signed-off-by: Mark Brown commit 879ee8b6f2bae0cc4a25536f8841db1dbc969523 Author: Guenter Roeck Date: Wed Nov 11 12:54:34 2020 -0800 ASOC: Intel: kbl_rt5663_rt5514_max98927: Do not try to disable disabled clock In kabylake_set_bias_level(), enabling mclk may fail if the clock has already been enabled by the firmware. Attempts to disable that clock later will fail with a warning backtrace. mclk already disabled WARNING: CPU: 2 PID: 108 at drivers/clk/clk.c:952 clk_core_disable+0x1b6/0x1cf ... Call Trace: clk_disable+0x2d/0x3a kabylake_set_bias_level+0x72/0xfd [snd_soc_kbl_rt5663_rt5514_max98927] snd_soc_card_set_bias_level+0x2b/0x6f snd_soc_dapm_set_bias_level+0xe1/0x209 dapm_pre_sequence_async+0x63/0x96 async_run_entry_fn+0x3d/0xd1 process_one_work+0x2a9/0x526 ... Only disable the clock if it has been enabled. Fixes: 15747a802075 ("ASoC: eve: implement set_bias_level function for rt5514") Cc: Brent Lu Cc: Curtis Malainey Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20201111205434.207610-1-linux@roeck-us.net Signed-off-by: Mark Brown commit 595189c25c28a55523354336bf24453242c81c15 Author: Yu Kuai Date: Wed Nov 18 09:21:26 2020 -0800 xfs: return corresponding errcode if xfs_initialize_perag() fail In xfs_initialize_perag(), if kmem_zalloc(), xfs_buf_hash_init(), or radix_tree_preload() failed, the returned value 'error' is not set accordingly. Reported-as-fixing: 8b26c5825e02 ("xfs: handle ENOMEM correctly during initialisation of perag structures") Fixes: 9b2471797942 ("xfs: cache unlinked pointers in an rhashtable") Reported-by: Hulk Robot Signed-off-by: Yu Kuai Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 27c14b5daa82861220d6fa6e27b51f05f21ffaa7 Author: Darrick J. Wong Date: Sat Nov 14 09:59:22 2020 -0800 xfs: ensure inobt record walks always make forward progress The aim of the inode btree record iterator function is to call a callback on every record in the btree. To avoid having to tear down and recreate the inode btree cursor around every callback, it caches a certain number of records in a memory buffer. After each batch of callback invocations, we have to perform a btree lookup to find the next record after where we left off. However, if the keys of the inode btree are corrupt, the lookup might put us in the wrong part of the inode btree, causing the walk function to loop forever. Therefore, we add extra cursor tracking to make sure that we never go backwards neither when performing the lookup nor when jumping to the next inobt record. This also fixes an off by one error where upon resume the lookup should have been for the inode /after/ the point at which we stopped. Found by fuzzing xfs/460 with keys[2].startino = ones causing bulkstat and quotacheck to hang. Fixes: a211432c27ff ("xfs: create simplified inode walk function") Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R commit ada49d64fb3538144192181db05de17e2ffc3551 Author: Gao Xiang Date: Sat Nov 14 11:06:01 2020 -0800 xfs: fix forkoff miscalculation related to XFS_LITINO(mp) Currently, commit e9e2eae89ddb dropped a (int) decoration from XFS_LITINO(mp), and since sizeof() expression is also involved, the result of XFS_LITINO(mp) is simply as the size_t type (commonly unsigned long). Considering the expression in xfs_attr_shortform_bytesfit(): offset = (XFS_LITINO(mp) - bytes) >> 3; let "bytes" be (int)340, and "XFS_LITINO(mp)" be (unsigned long)336. on 64-bit platform, the expression is offset = ((unsigned long)336 - (int)340) >> 3 = (int)(0xfffffffffffffffcUL >> 3) = -1 but on 32-bit platform, the expression is offset = ((unsigned long)336 - (int)340) >> 3 = (int)(0xfffffffcUL >> 3) = 0x1fffffff instead. so offset becomes a large positive number on 32-bit platform, and cause xfs_attr_shortform_bytesfit() returns maxforkoff rather than 0. Therefore, one result is "ASSERT(new_size <= XFS_IFORK_SIZE(ip, whichfork));" assertion failure in xfs_idata_realloc(), which was also the root cause of the original bugreport from Dennis, see: https://bugzilla.redhat.com/show_bug.cgi?id=1894177 And it can also be manually triggered with the following commands: $ touch a; $ setfattr -n user.0 -v "`seq 0 80`" a; $ setfattr -n user.1 -v "`seq 0 80`" a on 32-bit platform. Fix the case in xfs_attr_shortform_bytesfit() by bailing out "XFS_LITINO(mp) < bytes" in advance suggested by Eric and a misleading comment together with this bugfix suggested by Darrick. It seems the other users of XFS_LITINO(mp) are not impacted. Fixes: e9e2eae89ddb ("xfs: only check the superblock version for dinode size calculation") Cc: # 5.7+ Reported-and-tested-by: Dennis Gilmore Reviewed-by: Christoph Hellwig Signed-off-by: Gao Xiang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 6b48e5b8a20f653b7d64ccf99a498f2523bff752 Author: Darrick J. Wong Date: Sun Nov 8 16:32:42 2020 -0800 xfs: directory scrub should check the null bestfree entries too Teach the directory scrubber to check all the bestfree entries, including the null ones. We want to be able to detect the case where the entry is null but there actually /is/ a directory data block. Found by fuzzing lbests[0] = ones in xfs/391. Fixes: df481968f33b ("xfs: scrub directory freespace") Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit 498fe261f0d6d5189f8e11d283705dd97b474b54 Author: Darrick J. Wong Date: Sun Nov 8 16:32:41 2020 -0800 xfs: strengthen rmap record flags checking We always know the correct state of the rmap record flags (attr, bmbt, unwritten) so check them by direct comparison. Fixes: d852657ccfc0 ("xfs: cross-reference reverse-mapping btree") Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit e95b6c3ef1311dd7b20467d932a24b6d0fd88395 Author: Darrick J. Wong Date: Sun Nov 8 16:32:41 2020 -0800 xfs: fix the minrecs logic when dealing with inode root child blocks The comment and logic in xchk_btree_check_minrecs for dealing with inode-rooted btrees isn't quite correct. While the direct children of the inode root are allowed to have fewer records than what would normally be allowed for a regular ondisk btree block, this is only true if there is only one child block and the number of records don't fit in the inode root. Fixes: 08a3a692ef58 ("xfs: btree scrub should check minrecs") Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit 79af02af1d01ffab6118552c66b4d58eb0745f3e Merge: 054409ab253d9 735931f9a51ab Author: Paolo Bonzini Date: Wed Nov 18 12:04:05 2020 -0500 Merge tag 'kvm-s390-master-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-master KVM: s390: Fix for destroy page ultravisor call - handle response code from older firmware - add uv.c to KVM: s390/s390 maintainer list commit a1f634463aaf2c94dfa13001dbdea011303124cc Author: Jarkko Nikula Date: Tue Sep 15 16:47:15 2020 +0300 can: m_can: process interrupt only when not runtime suspended Avoid processing bogus interrupt statuses when the HW is runtime suspended and the M_CAN_IR register read may get all bits 1's. Handler can be called if the interrupt request is shared with other peripherals or at the end of free_irq(). Therefore check the runtime suspended status before processing. Fixes: cdf8259d6573 ("can: m_can: Add PM Support") Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20200915134715.696303-1-jarkko.nikula@linux.intel.com Signed-off-by: Marc Kleine-Budde commit 20b329129009caf1c646152abe09b697227e1c37 Author: Bob Peterson Date: Wed Nov 18 08:54:31 2020 -0500 gfs2: Fix regression in freeze_go_sync Patch 541656d3a513 ("gfs2: freeze should work on read-only mounts") changed the check for glock state in function freeze_go_sync() from "gl->gl_state == LM_ST_SHARED" to "gl->gl_req == LM_ST_EXCLUSIVE". That's wrong and it regressed gfs2's freeze/thaw mechanism because it caused only the freezing node (which requests the glock in EX) to queue freeze work. All nodes go through this go_sync code path during the freeze to drop their SHared hold on the freeze glock, allowing the freezing node to acquire it in EXclusive mode. But all the nodes must freeze access to the file system locally, so they ALL must queue freeze work. The freeze_work calls freeze_func, which makes a request to reacquire the freeze glock in SH, effectively blocking until the thaw from the EX holder. Once thawed, the freezing node drops its EX hold on the freeze glock, then the (blocked) freeze_func reacquires the freeze glock in SH again (on all nodes, including the freezer) so all nodes go back to a thawed state. This patch changes the check back to gl_state == LM_ST_SHARED like it was prior to 541656d3a513. Fixes: 541656d3a513 ("gfs2: freeze should work on read-only mounts") Cc: stable@vger.kernel.org # v5.8+ Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit cd9f13c59461351d7a5fd07924264fb49b287359 Author: Marc Kleine-Budde Date: Wed Nov 18 16:01:48 2020 +0100 can: flexcan: flexcan_chip_start(): fix erroneous flexcan_transceiver_enable() during bus-off recovery If the CAN controller goes into bus off, the do_set_mode() callback with CAN_MODE_START can be used to recover the controller, which then calls flexcan_chip_start(). If configured, this is done automatically by the framework or manually by the user. In flexcan_chip_start() there is an explicit call to flexcan_transceiver_enable(), which does a regulator_enable() on the transceiver regulator. This results in a net usage counter increase, as there is no corresponding flexcan_transceiver_disable() in the bus off code path. This further leads to the transceiver stuck enabled, even if the CAN interface is shut down. To fix this problem the flexcan_transceiver_enable()/flexcan_transceiver_disable() are moved out of flexcan_chip_start()/flexcan_chip_stop() into flexcan_open()/flexcan_close(). Fixes: e955cead0311 ("CAN: Add Flexcan CAN controller driver") Link: https://lore.kernel.org/r/20201118150148.2664024-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit e297822b20e7fe683e107aea46e6402adcf99c70 Author: Pavel Begunkov Date: Wed Nov 18 14:56:26 2020 +0000 io_uring: order refnode recycling Don't recycle a refnode until we're done with all requests of nodes ejected before. Signed-off-by: Pavel Begunkov Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Jens Axboe commit 1e5d770bb8a23dd01e28e92f4fb0b1093c8bdbe6 Author: Pavel Begunkov Date: Wed Nov 18 14:56:25 2020 +0000 io_uring: get an active ref_node from files_data An active ref_node always can be found in ctx->files_data, it's much safer to get it this way instead of poking into files_data->ref_list. Signed-off-by: Pavel Begunkov Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Jens Axboe commit 4d213e76a359e540ca786ee937da7f35faa8e5f8 Author: Zhenzhong Duan Date: Tue Nov 10 15:19:08 2020 +0800 iommu/vt-d: Avoid panic if iommu init fails in tboot system "intel_iommu=off" command line is used to disable iommu but iommu is force enabled in a tboot system for security reason. However for better performance on high speed network device, a new option "intel_iommu=tboot_noforce" is introduced to disable the force on. By default kernel should panic if iommu init fail in tboot for security reason, but it's unnecessory if we use "intel_iommu=tboot_noforce,off". Fix the code setting force_on and move intel_iommu_tboot_noforce from tboot code to intel iommu code. Fixes: 7304e8f28bb2 ("iommu/vt-d: Correctly disable Intel IOMMU force on") Signed-off-by: Zhenzhong Duan Tested-by: Lukasz Hawrylko Acked-by: Lu Baolu Link: https://lore.kernel.org/r/20201110071908.3133-1-zhenzhong.duan@gmail.com Signed-off-by: Will Deacon commit 7e4be1290a38b3dd4a77cdf4565c9ffe7e620013 Author: Dan Carpenter Date: Fri Nov 13 13:16:31 2020 +0300 dmaengine: fix error codes in channel_register() The error codes were not set on some of these error paths. Also the error handling was more confusing than it needed to be so I cleaned it up and shuffled it around a bit. Fixes: d2fb0a043838 ("dmaengine: break out channel registration") Signed-off-by: Dan Carpenter Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201113101631.GE168908@mwanda Signed-off-by: Vinod Koul commit 735931f9a51ab09cf795721b37696b420484625f Author: Christian Borntraeger Date: Wed Nov 18 08:44:12 2020 +0100 MAINTAINERS: add uv.c also to KVM/s390 Most changes in uv.c are related to KVM. Involve also the KVM team regarding changes to uv.c. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand Acked-by: Cornelia Huck Acked-by: Heiko Carstens commit 4c80d05714d347405865802b7098f1c97362cbef Author: Christian Borntraeger Date: Tue Nov 17 20:00:33 2020 +0100 s390/uv: handle destroy page legacy interface Older firmware can return rc=0x107 rrc=0xd for destroy page if the page is already non-secure. This should be handled like a success as already done by newer firmware. Signed-off-by: Christian Borntraeger Fixes: 1a80b54d1ce1 ("s390/uv: add destroy page call") Reviewed-by: David Hildenbrand Acked-by: Cornelia Huck Reviewed-by: Janosch Frank commit 860aaabac8235cfde10fe556aa82abbbe3117888 Author: Thomas Gleixner Date: Tue Nov 17 21:23:34 2020 +0100 x86/dumpstack: Do not try to access user space code of other tasks sysrq-t ends up invoking show_opcodes() for each task which tries to access the user space code of other processes, which is obviously bogus. It either manages to dump where the foreign task's regs->ip points to in a valid mapping of the current task or triggers a pagefault and prints "Code: Bad RIP value.". Both is just wrong. Add a safeguard in copy_code() and check whether the @regs pointer matches currents pt_regs. If not, do not even try to access it. While at it, add commentary why using copy_from_user_nmi() is safe in copy_code() even if the function name suggests otherwise. Reported-by: Oleg Nesterov Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Acked-by: Oleg Nesterov Tested-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201117202753.667274723@linutronix.de commit d003868d7f8579838ed58b6429af91844039b6f8 Author: Jimmy Assarsson Date: Sun Nov 15 17:30:23 2020 +0100 can: kvaser_usb: kvaser_usb_hydra: Fix KCAN bittiming limits Use correct bittiming limits for the KCAN CAN controller. Fixes: aec5fb2268b7 ("can: kvaser_usb: Add support for Kvaser USB hydra family") Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/r/20201115163027.16851-2-jimmyassarsson@gmail.com Signed-off-by: Marc Kleine-Budde commit 470e14c00c63752466ac44de392f584dfdddd82e Author: Jimmy Assarsson Date: Sun Nov 15 17:30:22 2020 +0100 can: kvaser_pciefd: Fix KCAN bittiming limits Use correct bittiming limits for the KCAN CAN controller. Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/r/20201115163027.16851-1-jimmyassarsson@gmail.com Signed-off-by: Marc Kleine-Budde commit 957a1ea3599210e9996777a734ea5284eaef75c7 Author: Maxime Ripard Date: Fri Nov 6 15:22:31 2020 +0100 drm/sun4i: backend: Fix probe failure with multiple backends Commit e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset") introduced a regression in our code since the second backed to probe will now get -EINVAL back from dma_direct_set_offset and will prevent the entire DRM device from probing. Ignore -EINVAL as a temporary measure to get it back working, before removing that call entirely. Fixes: e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset") Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Reviewed-by: Christoph Hellwig Acked-by: Daniel Vetter commit f737561c709667013d832316dd3198a7fe3d1260 Author: Vineet Gupta Date: Fri Nov 6 17:37:34 2020 -0800 ARC: stack unwinding: reorganize how initial register state setup This is a non-functional change, if anything a better fall-back handling. Signed-off-by: Vineet Gupta commit e42404fa10fd11fe72d0a0e149a321d10e577715 Author: Vineet Gupta Date: Fri Nov 6 16:59:27 2020 -0800 ARC: stack unwinding: don't assume non-current task is sleeping To start stack unwinding (SP, PC and BLINK) are needed. When the explicit execution context (pt_regs etc) is not available, unwinder assumes the task is sleeping (in __switch_to()) and fetches SP and BLINK from kernel mode stack. But this assumption is not true, specially in a SMP system, when top runs on 1 core, there may be active running processes on all cores. So when unwinding non courrent tasks, ensure they are NOT running. And while at it, handle the self unwinding case explicitly. This came out of investigation of a customer reported hang with rcutorture+top Link: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/31 Signed-off-by: Vineet Gupta commit 5f840df591a9554e4e1355ef1f8946bc2120ca9f Author: Flavio Suligoi Date: Mon Nov 9 14:21:30 2020 +0100 ARC: mm: fix spelling mistakes Signed-off-by: Flavio Suligoi Signed-off-by: Vineet Gupta commit 78aec9bb1f3c79e4570eb50260d6320063f823a2 Author: Gustavo Pimentel Date: Wed Oct 21 23:12:20 2020 +0200 ARC: bitops: Remove unecessary operation and value The 1-bit shift rotation to the left on x variable located on 4 last if statement can be removed because the computed value is will not be used afront. Signed-off-by: Gustavo Pimentel Signed-off-by: Vineet Gupta commit cd81acc600a9684ea4b4d25a47900d38a3890eab Author: Nicholas Piggin Date: Tue Nov 17 23:56:17 2020 +1000 powerpc/64s/exception: KVM Fix for host DSI being taken in HPT guest MMU context Commit 2284ffea8f0c ("powerpc/64s/exception: Only test KVM in SRR interrupts when PR KVM is supported") removed KVM guest tests from interrupts that do not set HV=1, when PR-KVM is not configured. This is wrong for HV-KVM HPT guest MMIO emulation case which attempts to load the faulting instruction word with MSR[DR]=1 and MSR[HV]=1 with the guest MMU context loaded. This can cause host DSI, DSLB interrupts which must test for KVM guest. Restore this and add a comment. Fixes: 2284ffea8f0c ("powerpc/64s/exception: Only test KVM in SRR interrupts when PR KVM is supported") Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201117135617.3521127-1-npiggin@gmail.com commit c09c8a27b9baa417864b9adc3228b10ae5eeec93 Author: Florian Klink Date: Sun Nov 15 23:45:09 2020 +0100 ipv4: use IS_ENABLED instead of ifdef Checking for ifdef CONFIG_x fails if CONFIG_x=m. Use IS_ENABLED instead, which is true for both built-ins and modules. Otherwise, a > ip -4 route add 1.2.3.4/32 via inet6 fe80::2 dev eth1 fails with the message "Error: IPv6 support not enabled in kernel." if CONFIG_IPV6 is `m`. In the spirit of b8127113d01e53adba15b41aefd37b90ed83d631. Fixes: d15662682db2 ("ipv4: Allow ipv6 gateway with ipv4 routes") Cc: Kim Phillips Signed-off-by: Florian Klink Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20201115224509.2020651-1-flokli@flokli.de Signed-off-by: Jakub Kicinski commit 93be52612431e71ee8cb980ef11468997857e4c4 Author: Dmitry Bogdanov Date: Mon Nov 16 16:29:44 2020 +0300 qed: fix ILT configuration of SRC block The code refactoring of ILT configuration was not complete, the old unused variables were used for the SRC block. That could lead to the memory corruption by HW when rx filters are configured. This patch completes that refactoring. Fixes: 8a52bbab39c9 (qed: Debug feature: ilt and mdump) Signed-off-by: Igor Russkikh Signed-off-by: Ariel Elior Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20201116132944.2055-1-dbogdanov@marvell.com Signed-off-by: Jakub Kicinski commit e33de7c5317e2827b2ba6fd120a505e9eb727b05 Author: Wang Hai Date: Mon Nov 16 16:20:18 2020 +0800 inet_diag: Fix error path to cancel the meseage in inet_req_diag_fill() nlmsg_cancel() needs to be called in the error path of inet_req_diag_fill to cancel the message. Fixes: d545caca827b ("net: inet: diag: expose the socket mark to privileged processes.") Reported-by: Hulk Robot Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20201116082018.16496-1-wanghai38@huawei.com Signed-off-by: Jakub Kicinski commit ee415d73dcc24caef7f6bbf292dcc365613d2188 Author: Maor Gottlieb Date: Sun Nov 15 14:06:23 2020 +0200 tools/testing/scatterlist: Fix test to compile and run Add missing define of ALIGN_DOWN to make the test build and run. In addition, __sg_alloc_table_from_pages now support unaligned maximum segment, so adapt the test result accordingly. Fixes: 07da1223ec93 ("lib/scatterlist: Add support in dynamic allocation of SG table from pages") Link: https://lore.kernel.org/r/20201115120623.139113-1-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4363023d2668e621b0743db351a9555d6e6ea57e Author: John Fastabend Date: Mon Nov 16 14:29:28 2020 -0800 bpf, sockmap: Avoid failures from skb_to_sgvec when skb has frag_list When skb has a frag_list its possible for skb_to_sgvec() to fail. This happens when the scatterlist has fewer elements to store pages than would be needed for the initial skb plus any of its frags. This case appears rare, but is possible when running an RX parser/verdict programs exposed to the internet. Currently, when this happens we throw an error, break the pipe, and kfree the msg. This effectively breaks the application or forces it to do a retry. Lets catch this case and handle it by doing an skb_linearize() on any skb we receive with frags. At this point skb_to_sgvec should not fail because the failing conditions would require frags to be in place. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/160556576837.73229.14800682790808797635.stgit@john-XPS-13-9370 commit 2443ca66676d50a4eb3305c236bccd84a9828ce2 Author: John Fastabend Date: Mon Nov 16 14:29:08 2020 -0800 bpf, sockmap: Handle memory acct if skb_verdict prog redirects to self If the skb_verdict_prog redirects an skb knowingly to itself, fix your BPF program this is not optimal and an abuse of the API please use SK_PASS. That said there may be cases, such as socket load balancing, where picking the socket is hashed based or otherwise picks the same socket it was received on in some rare cases. If this happens we don't want to confuse userspace giving them an EAGAIN error if we can avoid it. To avoid double accounting in these cases. At the moment even if the skb has already been charged against the sockets rcvbuf and forward alloc we check it again and do set_owner_r() causing it to be orphaned and recharged. For one this is useless work, but more importantly we can have a case where the skb could be put on the ingress queue, but because we are under memory pressure we return EAGAIN. The trouble here is the skb has already been accounted for so any rcvbuf checks include the memory associated with the packet already. This rolls up and can result in unnecessary EAGAIN errors in userspace read() calls. Fix by doing an unlikely check and skipping checks if skb->sk == sk. Fixes: 51199405f9672 ("bpf: skb_verdict, support SK_PASS on RX BPF path") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/160556574804.73229.11328201020039674147.stgit@john-XPS-13-9370 commit 6fa9201a898983da731fca068bb4b5c941537588 Author: John Fastabend Date: Mon Nov 16 14:28:46 2020 -0800 bpf, sockmap: Avoid returning unneeded EAGAIN when redirecting to self If a socket redirects to itself and it is under memory pressure it is possible to get a socket stuck so that recv() returns EAGAIN and the socket can not advance for some time. This happens because when redirecting a skb to the same socket we received the skb on we first check if it is OK to enqueue the skb on the receiving socket by checking memory limits. But, if the skb is itself the object holding the memory needed to enqueue the skb we will keep retrying from kernel side and always fail with EAGAIN. Then userspace will get a recv() EAGAIN error if there are no skbs in the psock ingress queue. This will continue until either some skbs get kfree'd causing the memory pressure to reduce far enough that we can enqueue the pending packet or the socket is destroyed. In some cases its possible to get a socket stuck for a noticeable amount of time if the socket is only receiving skbs from sk_skb verdict programs. To reproduce I make the socket memory limits ridiculously low so sockets are always under memory pressure. More often though if under memory pressure it looks like a spurious EAGAIN error on user space side causing userspace to retry and typically enough has moved on the memory side that it works. To fix skip memory checks and skb_orphan if receiving on the same sock as already assigned. For SK_PASS cases this is easy, its always the same socket so we can just omit the orphan/set_owner pair. For backlog cases we need to check skb->sk and decide if the orphan and set_owner pair are needed. Fixes: 51199405f9672 ("bpf: skb_verdict, support SK_PASS on RX BPF path") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/160556572660.73229.12566203819812939627.stgit@john-XPS-13-9370 commit 70796fb751f1d34cc650e640572a174faf009cd4 Author: John Fastabend Date: Mon Nov 16 14:28:26 2020 -0800 bpf, sockmap: Use truesize with sk_rmem_schedule() We use skb->size with sk_rmem_scheduled() which is not correct. Instead use truesize to align with socket and tcp stack usage of sk_rmem_schedule. Suggested-by: Daniel Borkman Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/160556570616.73229.17003722112077507863.stgit@john-XPS-13-9370 commit 36cd0e696a832a00247fca522034703566ac8885 Author: John Fastabend Date: Mon Nov 16 14:28:06 2020 -0800 bpf, sockmap: Ensure SO_RCVBUF memory is observed on ingress redirect Fix sockmap sk_skb programs so that they observe sk_rcvbuf limits. This allows users to tune SO_RCVBUF and sockmap will honor them. We can refactor the if(charge) case out in later patches. But, keep this fix to the point. Fixes: 51199405f9672 ("bpf: skb_verdict, support SK_PASS on RX BPF path") Suggested-by: Jakub Sitnicki Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/160556568657.73229.8404601585878439060.stgit@john-XPS-13-9370 commit c9c89dcd872ea33327673fcb97398993a1f22736 Author: John Fastabend Date: Mon Nov 16 14:27:46 2020 -0800 bpf, sockmap: Fix partial copy_page_to_iter so progress can still be made If copy_page_to_iter() fails or even partially completes, but with fewer bytes copied than expected we currently reset sg.start and return EFAULT. This proves problematic if we already copied data into the user buffer before we return an error. Because we leave the copied data in the user buffer and fail to unwind the scatterlist so kernel side believes data has been copied and user side believes data has _not_ been received. Expected behavior should be to return number of bytes copied and then on the next read we need to return the error assuming its still there. This can happen if we have a copy length spanning multiple scatterlist elements and one or more complete before the error is hit. The error is rare enough though that my normal testing with server side programs, such as nginx, httpd, envoy, etc., I have never seen this. The only reliable way to reproduce that I've found is to stream movies over my browser for a day or so and wait for it to hang. Not very scientific, but with a few extra WARN_ON()s in the code the bug was obvious. When we review the errors from copy_page_to_iter() it seems we are hitting a page fault from copy_page_to_iter_iovec() where the code checks fault_in_pages_writeable(buf, copy) where buf is the user buffer. It also seems typical server applications don't hit this case. The other way to try and reproduce this is run the sockmap selftest tool test_sockmap with data verification enabled, but it doesn't reproduce the fault. Perhaps we can trigger this case artificially somehow from the test tools. I haven't sorted out a way to do that yet though. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/160556566659.73229.15694973114605301063.stgit@john-XPS-13-9370 commit 138559b9f99d3b6b1d5e75c78facc067a23871c6 Author: Tariq Toukan Date: Sun Nov 15 15:14:48 2020 +0200 net/tls: Fix wrong record sn in async mode of device resync In async_resync mode, we log the TCP seq of records until the async request is completed. Later, in case one of the logged seqs matches the resync request, we return it, together with its record serial number. Before this fix, we mistakenly returned the serial number of the current record instead. Fixes: ed9b7646b06a ("net/tls: Add asynchronous resync") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Link: https://lore.kernel.org/r/20201115131448.2702-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski commit 9caf2d956cfa254c6d89c5f4d7b3f8235d75b28f Author: Georgi Djakov Date: Mon Nov 9 14:45:12 2020 +0200 interconnect: qcom: msm8974: Don't boost the NoC rate during boot It has been reported that on Fairphone 2 (msm8974-based), increasing the clock rate for some of the NoCs during boot may lead to hangs. Let's restore the original behavior and not touch the clock rate of any of the NoCs to fix the regression. Reported-by: Luca Weiss Tested-by: Luca Weiss Fixes: b1d681d8d324 ("interconnect: Add sync state support") Link: https://lore.kernel.org/r/20201109124512.10776-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 7381e27b1e563aa8a1c6bcf74a8cadb6901c283a Author: Georgi Djakov Date: Fri Nov 6 16:48:47 2020 +0200 interconnect: qcom: msm8974: Prevent integer overflow in rate When sync_state support got introduced recently, by default we try to set the NoCs to run initially at maximum rate. But as these values are aggregated, we may end with a really big clock rate value, which is then converted from "u64" to "long" during the clock rate rounding. But on 32bit platforms this may result an overflow. Fix it by making sure that the rate is within range. Reported-by: Luca Weiss Reviewed-by: Brian Masney Link: https://lore.kernel.org/r/20201106144847.7726-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit c993df5a688975bf9ce899706ca13d2bc8d6be25 Author: Jens Axboe Date: Tue Nov 17 07:59:16 2020 -0700 io_uring: don't double complete failed reissue request Zorro reports that an xfstest test case is failing, and it turns out that for the reissue path we can potentially issue a double completion on the request for the failure path. There's an issue around the retry as well, but for now, at least just make sure that we handle the error path correctly. Cc: stable@vger.kernel.org Fixes: b63534c41e20 ("io_uring: re-issue block requests that failed because of resources") Reported-by: Zorro Lang Signed-off-by: Jens Axboe commit a5bbcbf29089a1252c201b1a7fd38151de355db9 Author: Taehee Yoo Date: Sun Nov 15 10:30:41 2020 +0000 netdevsim: set .owner to THIS_MODULE If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: 82c93a87bf8b ("netdevsim: implement couple of testing devlink health reporters") Fixes: 424be63ad831 ("netdevsim: add UDP tunnel port offload support") Fixes: 4418f862d675 ("netdevsim: implement support for devlink region and snapshots") Fixes: d3cbb907ae57 ("netdevsim: add ACL trap reporting cookie as a metadata") Signed-off-by: Taehee Yoo Link: https://lore.kernel.org/r/20201115103041.30701-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski commit 5fa9c5f9a4076d32913b5857bac7620f46f27267 Merge: 09162bc32c880 5f714771d01e0 Author: Linus Walleij Date: Tue Nov 17 22:20:17 2020 +0100 Merge tag 'intel-pinctrl-v5.10-3' of gitolite.kernel.org:pub/scm/linux/kernel/git/pinctrl/intel into fixes intel-pinctrl for v5.10-3 * Fix HOSTSW_OWN offset and unhide SPI group of pins on Jasper Lake * Fix debounce configuration on Baytrail when it's turned off * Fix default bias setting on Merrifield The following is an automated git shortlog grouped by driver: baytrail: - Avoid clearing debounce value when turning it off jasperlake: - Fix HOSTSW_OWN offset - Unhide SPI group of pins merrifield: - Set default bias in case no particular value given commit fb14528e443646dd3fd02df4437fcf5265b66baa Author: Mickaël Salaün Date: Fri Oct 30 13:38:49 2020 +0100 seccomp: Set PF_SUPERPRIV when checking capability Replace the use of security_capable(current_cred(), ...) with ns_capable_noaudit() which set PF_SUPERPRIV. Since commit 98f368e9e263 ("kernel: Add noaudit variant of ns_capable()"), a new ns_capable_noaudit() helper is available. Let's use it! Cc: Jann Horn Cc: Kees Cook Cc: Tyler Hicks Cc: Will Drewry Cc: stable@vger.kernel.org Fixes: e2cfabdfd075 ("seccomp: add system call filtering using BPF") Signed-off-by: Mickaël Salaün Reviewed-by: Jann Horn Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201030123849.770769-3-mic@digikod.net commit cf23705244c947151179f929774fabf71e239eee Author: Mickaël Salaün Date: Fri Oct 30 13:38:48 2020 +0100 ptrace: Set PF_SUPERPRIV when checking capability Commit 69f594a38967 ("ptrace: do not audit capability check when outputing /proc/pid/stat") replaced the use of ns_capable() with has_ns_capability{,_noaudit}() which doesn't set PF_SUPERPRIV. Commit 6b3ad6649a4c ("ptrace: reintroduce usage of subjective credentials in ptrace_has_cap()") replaced has_ns_capability{,_noaudit}() with security_capable(), which doesn't set PF_SUPERPRIV neither. Since commit 98f368e9e263 ("kernel: Add noaudit variant of ns_capable()"), a new ns_capable_noaudit() helper is available. Let's use it! As a result, the signature of ptrace_has_cap() is restored to its original one. Cc: Christian Brauner Cc: Eric Paris Cc: Jann Horn Cc: Kees Cook Cc: Oleg Nesterov Cc: Serge E. Hallyn Cc: Tyler Hicks Cc: stable@vger.kernel.org Fixes: 6b3ad6649a4c ("ptrace: reintroduce usage of subjective credentials in ptrace_has_cap()") Fixes: 69f594a38967 ("ptrace: do not audit capability check when outputing /proc/pid/stat") Signed-off-by: Mickaël Salaün Reviewed-by: Jann Horn Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201030123849.770769-2-mic@digikod.net commit fd5736bf9f235d26c83cac8a16c70bbdafa55abe Author: Alex Marginean Date: Thu Nov 12 20:26:08 2020 +0200 enetc: Workaround for MDIO register access issue Due to a hardware issue, an access to MDIO registers that is concurrent with other ENETC register accesses may lead to the MDIO access being dropped or corrupted. The workaround introduces locking for all register accesses to the ENETC register space. To reduce performance impact, a readers-writers locking scheme has been implemented. The writer in this case is the MDIO access code (irrelevant whether that MDIO access is a register read or write), and the reader is any access code to non-MDIO ENETC registers. Also, the datapath functions acquire the read lock fewer times and use _hot accessors. All the rest of the code uses the _wa accessors which lock every register access. The commit introducing MDIO support is - commit ebfcb23d62ab ("enetc: Add ENETC PF level external MDIO support") but due to subsequent refactoring this patch is applicable on top of a later commit. Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl") Signed-off-by: Alex Marginean Signed-off-by: Vladimir Oltean Signed-off-by: Claudiu Manoil Link: https://lore.kernel.org/r/20201112182608.26177-1-claudiu.manoil@nxp.com Signed-off-by: Jakub Kicinski commit c464e26f2375a5529ec7bad7b38914e1b87df1e2 Author: Sylvain Lemieux Date: Fri Sep 18 10:15:27 2020 -0400 MAINTAINERS: Remove myself as LPC32xx maintainers I appreciate my time as a kernel maintainer for the last few years. I am no longer working on the LPC32xx platform and cannot commit time for support and discussions. Signed-off-by: Sylvain Lemieux Acked-by: Vladimir Zapolskiy Signed-off-by: Arnd Bergmann commit 0fa8ee0d9ab95c9350b8b84574824d9a384a9f7d Merge: 111e91a6df505 ae3d6083acf60 Author: Linus Torvalds Date: Tue Nov 17 12:00:40 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "A fix for use-after-free in the Sun keyboard driver, a fix to firmware updates on newer ICs in the Elan touchpad diver, and a couple misc driver fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elan_i2c - fix firmware update on newer ICs Input: resistive-adc-touch - fix kconfig dependency on IIO_BUFFER Input: sunkbd - avoid use-after-free in teardown paths Input: i8042 - allow insmod to succeed on devices without an i8042 controller Input: adxl34x - clean up a data type in adxl34x_probe() commit 68ec32daf7d50a9f7425f8607a7402c13aa0c587 Author: Wang Hai Date: Sat Nov 14 19:52:23 2020 +0800 net/mlx5: fix error return code in mlx5e_tc_nic_init() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: aedd133d17bc ("net/mlx5e: Support CT offload for tc nic flows") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Saeed Mahameed commit 5b8631c7b21ca8bc039f0bc030048973b039e0d2 Author: Eli Cohen Date: Mon Nov 9 11:35:52 2020 +0200 net/mlx5: E-Switch, Fail mlx5_esw_modify_vport_rate if qos disabled Avoid calling mlx5_esw_modify_vport_rate() if qos is not enabled and avoid unnecessary syndrome messages from firmware. Fixes: fcb64c0f5640 ("net/mlx5: E-Switch, add ingress rate support") Signed-off-by: Eli Cohen Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 470b74758260e4abc2508cf1614573c00a00465c Author: Vladyslav Tarasiuk Date: Wed Oct 21 11:05:41 2020 +0300 net/mlx5: Disable QoS when min_rates on all VFs are zero Currently when QoS is enabled for VF and any min_rate is configured, the driver sets bw_share value to at least 1 and doesn’t allow to set it to 0 to make minimal rate unlimited. It means there is always a minimal rate configured for every VF, even if user tries to remove it. In order to make QoS disable possible, check whether all vports have configured min_rate = 0. If this is true, set their bw_share to 0 to disable min_rate limitations. Fixes: c9497c98901c ("net/mlx5: Add support for setting VF min rate") Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 1ce5fc724a26e0b476e42c5d588bdb80caea003b Author: Vladyslav Tarasiuk Date: Mon Nov 2 13:45:24 2020 +0200 net/mlx5: Clear bw_share upon VF disable Currently, if user disables VFs with some min and max rates configured, they are cleared. But QoS data is not cleared and restored upon next VF enable placing limits on minimal rate for given VF, when user expects none. To match cleared vport->info struct with QoS-related min and max rates upon VF disable, clear vport->qos struct too. Fixes: 556b9d16d3f5 ("net/mlx5: Clear VF's configuration on disabling SRIOV") Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 8cbcc5ef2a281f6bb10099f4572a08cb765ffbf4 Author: Michael Guralnik Date: Mon Nov 2 17:34:44 2020 +0200 net/mlx5: Add handling of port type in rule deletion Handle destruction of rules with port destination type to enable full destruction of flow. Without this handling of TX rules the deletion of these rules fails. Dmesg of flow destruction failure: [ 203.714146] mlx5_core 0000:00:0b.0: mlx5_cmd_check:753:(pid 342): SET_FLOW_TABLE_ENTRY(0x936) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x144b7a) [ 210.547387] ------------[ cut here ]------------ [ 210.548663] refcount_t: decrement hit 0; leaking memory. [ 210.550651] WARNING: CPU: 4 PID: 342 at lib/refcount.c:31 refcount_warn_saturate+0x5c/0x110 [ 210.550654] Modules linked in: mlx5_ib mlx5_core ib_ipoib rdma_ucm rdma_cm iw_cm ib_cm ib_umad ib_uverbs ib_core [ 210.550675] CPU: 4 PID: 342 Comm: test Not tainted 5.8.0-rc2+ #116 [ 210.550678] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 [ 210.550680] RIP: 0010:refcount_warn_saturate+0x5c/0x110 [ 210.550685] Code: c6 d1 1b 01 00 0f 84 ad 00 00 00 5b 5d c3 80 3d b5 d1 1b 01 00 75 f4 48 c7 c7 20 d1 15 82 c6 05 a5 d1 1b 01 01 e8 a7 eb af ff <0f> 0b eb dd 80 3d 99 d1 1b 01 00 75 d4 48 c7 c7 c0 cf 15 82 c6 05 [ 210.550687] RSP: 0018:ffff8881642e77e8 EFLAGS: 00010282 [ 210.550691] RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000000000 [ 210.550694] RDX: 0000000000000027 RSI: 0000000000000004 RDI: ffffed102c85ceef [ 210.550696] RBP: ffff888161720428 R08: ffffffff8124c10e R09: ffffed103243beae [ 210.550698] R10: ffff8881921df56b R11: ffffed103243bead R12: ffff8881841b4180 [ 210.550701] R13: ffff888161720428 R14: ffff8881616d0000 R15: ffff888161720380 [ 210.550704] FS: 00007fc27f025740(0000) GS:ffff888192000000(0000) knlGS:0000000000000000 [ 210.550706] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 210.550708] CR2: 0000557e4b41a6a0 CR3: 0000000002415004 CR4: 0000000000360ea0 [ 210.550711] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 210.550713] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 210.550715] Call Trace: [ 210.550717] mlx5_del_flow_rules+0x484/0x490 [mlx5_core] [ 210.550720] ? mlx5_cmd_set_fte+0xa80/0xa80 [mlx5_core] [ 210.550722] mlx5_ib_destroy_flow+0x17f/0x280 [mlx5_ib] [ 210.550724] uverbs_free_flow+0x4c/0x90 [ib_uverbs] [ 210.550726] destroy_hw_idr_uobject+0x41/0xb0 [ib_uverbs] [ 210.550728] uverbs_destroy_uobject+0xaa/0x390 [ib_uverbs] [ 210.550731] __uverbs_cleanup_ufile+0x129/0x1b0 [ib_uverbs] [ 210.550733] ? uverbs_destroy_uobject+0x390/0x390 [ib_uverbs] [ 210.550735] uverbs_destroy_ufile_hw+0x78/0x190 [ib_uverbs] [ 210.550737] ib_uverbs_close+0x36/0x140 [ib_uverbs] [ 210.550739] __fput+0x181/0x380 [ 210.550741] task_work_run+0x88/0xd0 [ 210.550743] do_exit+0x5f6/0x13b0 [ 210.550745] ? sched_clock_cpu+0x30/0x140 [ 210.550747] ? is_current_pgrp_orphaned+0x70/0x70 [ 210.550750] ? lock_downgrade+0x360/0x360 [ 210.550752] ? mark_held_locks+0x1d/0x90 [ 210.550754] do_group_exit+0x8a/0x140 [ 210.550756] get_signal+0x20a/0xf50 [ 210.550758] do_signal+0x8c/0xbe0 [ 210.550760] ? hrtimer_nanosleep+0x1d8/0x200 [ 210.550762] ? nanosleep_copyout+0x50/0x50 [ 210.550764] ? restore_sigcontext+0x320/0x320 [ 210.550766] ? __hrtimer_init+0xf0/0xf0 [ 210.550768] ? timespec64_add_safe+0x150/0x150 [ 210.550770] ? mark_held_locks+0x1d/0x90 [ 210.550772] ? lockdep_hardirqs_on_prepare+0x14c/0x240 [ 210.550774] __prepare_exit_to_usermode+0x119/0x170 [ 210.550776] do_syscall_64+0x65/0x300 [ 210.550778] ? trace_hardirqs_off+0x10/0x120 [ 210.550781] ? mark_held_locks+0x1d/0x90 [ 210.550783] ? asm_sysvec_apic_timer_interrupt+0xa/0x20 [ 210.550785] ? lockdep_hardirqs_on+0x112/0x190 [ 210.550787] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 210.550789] RIP: 0033:0x7fc27f1cd157 [ 210.550791] Code: Bad RIP value. [ 210.550793] RSP: 002b:00007ffd4db27ea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000023 [ 210.550798] RAX: fffffffffffffdfc RBX: ffffffffffffff80 RCX: 00007fc27f1cd157 [ 210.550800] RDX: 00007fc27f025740 RSI: 00007ffd4db27eb0 RDI: 00007ffd4db27eb0 [ 210.550803] RBP: 0000000000000016 R08: 0000000000000000 R09: 000000000000000e [ 210.550805] R10: 00007ffd4db27dc7 R11: 0000000000000246 R12: 0000000000400c00 [ 210.550808] R13: 00007ffd4db285f0 R14: 0000000000000000 R15: 0000000000000000 [ 210.550809] irq event stamp: 49399 [ 210.550812] hardirqs last enabled at (49399): [] console_unlock+0x556/0x6f0 [ 210.550815] hardirqs last disabled at (49398): [] console_unlock+0xb7/0x6f0 [ 210.550818] softirqs last enabled at (48706): [] __do_softirq+0x37b/0x60c [ 210.550820] softirqs last disabled at (48697): [] asm_call_on_stack+0xf/0x20 [ 210.550822] ---[ end trace ad18c0e6fa846454 ]--- [ 210.581862] mlx5_core 0000:00:0c.0: mlx5_destroy_flow_table:2132:(pid 342): Flow table 262150 wasn't destroyed, refcount > 1 Fixes: a7ee18bdee83 ("RDMA/mlx5: Allow creating a matcher for a NIC TX flow table") Signed-off-by: Michael Guralnik Reviewed-by: Mark Bloch Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed commit 219b3267ca102a35092f5998921a9e6f99074af2 Author: Maor Dickman Date: Wed Nov 4 14:10:30 2020 +0200 net/mlx5e: Fix check if netdev is bond slave Bond events handler uses bond_slave_get_rtnl to check if net device is bond slave. bond_slave_get_rtnl return the rcu rx_handler pointer from the netdev which exists for bond slaves but also exists for devices that are attached to linux bridge so using it as indication for bond slave is wrong. Fix by using netif_is_lag_port instead. Fixes: 7e51891a237f ("net/mlx5e: Use netdev events to set/del egress acl forward-to-vport rule") Signed-off-by: Maor Dickman Reviewed-by: Raed Salem Reviewed-by: Ariel Levkovich Signed-off-by: Saeed Mahameed commit 6248ce991f8eed4f2f0fdec694f5749156105629 Author: Huy Nguyen Date: Tue Nov 3 12:56:18 2020 -0600 net/mlx5e: Fix IPsec packet drop by mlx5e_tc_update_skb Both TC and IPsec crypto offload use metadata_regB to store private information. Since TC does not use bit 31 of regB, IPsec will use bit 31 as the IPsec packet marker. The IPsec's regB usage is changed to: Bit31: IPsec marker Bit30-24: IPsec syndrome Bit23-0: IPsec obj id Fixes: b2ac7541e377 ("net/mlx5e: IPsec: Add Connect-X IPsec Rx data path offload") Signed-off-by: Huy Nguyen Reviewed-by: Raed Salem Reviewed-by: Ariel Levkovich Signed-off-by: Saeed Mahameed commit 5cfb540ef27b5b763a3b181d142847ef0411728e Author: Huy Nguyen Date: Thu Oct 22 11:22:56 2020 -0500 net/mlx5e: Set IPsec WAs only in IP's non checksum partial case. The IP's checksum partial still requires L4 csum flag on Ethernet WQE. Make the IPsec WAs only for the IP's non checksum partial case (for example icmd packet) Fixes: 5be019040cb7 ("net/mlx5e: IPsec: Add Connect-X IPsec Tx data path offload") Signed-off-by: Huy Nguyen Reviewed-by: Raed Salem Reviewed-by: Alaa Hleihel Signed-off-by: Saeed Mahameed commit ea63609857321c38fd4ad096388b413b66001c6c Author: Maxim Mikityanskiy Date: Thu Oct 8 12:34:10 2020 +0300 net/mlx5e: Fix refcount leak on kTLS RX resync On resync, the driver calls inet_lookup_established (__inet6_lookup_established) that increases sk_refcnt of the socket. To decrease it, the driver set skb->destructor to sock_edemux. However, it didn't work well, because the TCP stack also sets this destructor for early demux, and the refcount gets decreased only once, while increased two times (in mlx5e and in the TCP stack). It leads to a socket leak, a TLS context leak, which in the end leads to calling tls_dev_del twice: on socket close and on driver unload, which in turn leads to a crash. This commit fixes the refcount leak by calling sock_gen_put right away after using the socket, thus fixing all the subsequent issues. Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 111e91a6df505e532a3809ead372787a01e23e0c Merge: ed129cd75ac10 78d732e1f326f Author: Linus Torvalds Date: Tue Nov 17 11:22:03 2020 -0800 Merge tag 's390-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Heiko Carstens: - fix system call exit path; avoid return to user space with any TIF/CIF/PIF set - fix file permission for cpum_sfb_size parameter - another small defconfig update * tag 's390-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/cpum_sf.c: fix file permission for cpum_sfb_size s390: update defconfigs s390: fix system call exit path commit ed129cd75ac1073f32d04d0f2012ede40e86fb77 Merge: be1dd6692adbd ac3b57adf87ad Author: Linus Torvalds Date: Tue Nov 17 11:15:08 2020 -0800 Merge tag 'mips_fixes_5.10_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - fix bug preventing booting on several platforms - fix for build error, when modules need has_transparent_hugepage - fix for memleak in alchemy clk setup * tag 'mips_fixes_5.10_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu MIPS: kernel: Fix for_each_memblock conversion MIPS: export has_transparent_hugepage() for modules commit 1b9e2a8c99a5c021041bfb2d512dc3ed92a94ffd Author: Ryan Sharpelletti Date: Mon Nov 16 17:44:13 2020 +0000 tcp: only postpone PROBE_RTT if RTT is < current min_rtt estimate During loss recovery, retransmitted packets are forced to use TCP timestamps to calculate the RTT samples, which have a millisecond granularity. BBR is designed using a microsecond granularity. As a result, multiple RTT samples could be truncated to the same RTT value during loss recovery. This is problematic, as BBR will not enter PROBE_RTT if the RTT sample is <= the current min_rtt sample, meaning that if there are persistent losses, PROBE_RTT will constantly be pushed off and potentially never re-entered. This patch makes sure that BBR enters PROBE_RTT by checking if RTT sample is < the current min_rtt sample, rather than <=. The Netflix transport/TCP team discovered this bug in the Linux TCP BBR code during lab tests. Fixes: 0f8782ea1497 ("tcp_bbr: add BBR congestion control") Signed-off-by: Ryan Sharpelletti Signed-off-by: Neal Cardwell Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Yuchung Cheng Link: https://lore.kernel.org/r/20201116174412.1433277-1-sharpelletti.kdev@gmail.com Signed-off-by: Jakub Kicinski commit 3d5179458d22dc0b4fdc724e4bed4231a655112a Author: Joel Stanley Date: Tue Nov 17 13:14:48 2020 +1030 net: ftgmac100: Fix crash when removing driver When removing the driver we would hit BUG_ON(!list_empty(&dev->ptype_specific)) in net/core/dev.c due to still having the NC-SI packet handler registered. # echo 1e660000.ethernet > /sys/bus/platform/drivers/ftgmac100/unbind ------------[ cut here ]------------ kernel BUG at net/core/dev.c:10254! Internal error: Oops - BUG: 0 [#1] SMP ARM CPU: 0 PID: 115 Comm: sh Not tainted 5.10.0-rc3-next-20201111-00007-g02e0365710c4 #46 Hardware name: Generic DT based system PC is at netdev_run_todo+0x314/0x394 LR is at cpumask_next+0x20/0x24 pc : [<806f5830>] lr : [<80863cb0>] psr: 80000153 sp : 855bbd58 ip : 00000001 fp : 855bbdac r10: 80c03d00 r9 : 80c06228 r8 : 81158c54 r7 : 00000000 r6 : 80c05dec r5 : 80c05d18 r4 : 813b9280 r3 : 813b9054 r2 : 8122c470 r1 : 00000002 r0 : 00000002 Flags: Nzcv IRQs on FIQs off Mode SVC_32 ISA ARM Segment none Control: 00c5387d Table: 85514008 DAC: 00000051 Process sh (pid: 115, stack limit = 0x7cb5703d) ... Backtrace: [<806f551c>] (netdev_run_todo) from [<80707eec>] (rtnl_unlock+0x18/0x1c) r10:00000051 r9:854ed710 r8:81158c54 r7:80c76bb0 r6:81158c10 r5:8115b410 r4:813b9000 [<80707ed4>] (rtnl_unlock) from [<806f5db8>] (unregister_netdev+0x2c/0x30) [<806f5d8c>] (unregister_netdev) from [<805a8180>] (ftgmac100_remove+0x20/0xa8) r5:8115b410 r4:813b9000 [<805a8160>] (ftgmac100_remove) from [<805355e4>] (platform_drv_remove+0x34/0x4c) Fixes: bd466c3fb5a4 ("net/faraday: Support NCSI mode") Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20201117024448.1170761-1-joel@jms.id.au Signed-off-by: Jakub Kicinski commit 23bde34771f1ea92fb5e6682c0d8c04304d34b3b Author: Zenghui Yu Date: Tue Nov 17 23:16:29 2020 +0800 KVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace It was recently reported that if GICR_TYPER is accessed before the RD base address is set, we'll suffer from the unset @rdreg dereferencing. Oops... gpa_t last_rdist_typer = rdreg->base + GICR_TYPER + (rdreg->free_index - 1) * KVM_VGIC_V3_REDIST_SIZE; It's "expected" that users will access registers in the redistributor if the RD has been properly configured (e.g., the RD base address is set). But it hasn't yet been covered by the existing documentation. Per discussion on the list [1], the reporting of the GICR_TYPER.Last bit for userspace never actually worked. And it's difficult for us to emulate it correctly given that userspace has the flexibility to access it any time. Let's just drop the reporting of the Last bit for userspace for now (userspace should have full knowledge about it anyway) and it at least prevents kernel from panic ;-) [1] https://lore.kernel.org/kvmarm/c20865a267e44d1e2c0d52ce4e012263@kernel.org/ Fixes: ba7b3f1275fd ("KVM: arm/arm64: Revisit Redistributor TYPER last bit computation") Reported-by: Keqian Zhu Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20201117151629.1738-1-yuzenghui@huawei.com Cc: stable@vger.kernel.org commit 7b027c249da54f492699c43e26cba486cfd48035 Author: Zhang Changzhong Date: Tue Nov 17 11:02:11 2020 +0800 net: b44: fix error return code in b44_init_one() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 39a6f4bce6b4 ("b44: replace the ssb_dma API with the generic DMA API") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Reviewed-by: Michael Chan Link: https://lore.kernel.org/r/1605582131-36735-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit be1dd6692adbdb1d70da47da124ac8376bba5ad5 Merge: 9dacf44c3837b 568beb27959b0 Author: Linus Torvalds Date: Tue Nov 17 10:47:45 2020 -0800 Merge tag 'perf-tools-fixes-for-v5.10-2020-11-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix file corruption due to event deletion in 'perf inject'. - Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy', silencing perf build warning. - Avoid an msan warning in a copied stack in 'perf test'. - Correct tracepoint field name "flags" in ARM's CS-ETM hardware tracing 'perf test' entry. - Update branch sample pattern for cs-etm to cope with excluding guest in userspace counting. - Don't free "lock_seq_stat" if read_count isn't zero in 'perf lock'. * tag 'perf-tools-fixes-for-v5.10-2020-11-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf test: Avoid an msan warning in a copied stack. perf inject: Fix file corruption due to event deletion perf test: Update branch sample pattern for cs-etm perf test: Fix a typo in cs-etm testing tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy' perf lock: Don't free "lock_seq_stat" if read_count isn't zero perf lock: Correct field name "flags" commit cb47d16ea21045c66eebbf5ed792e74a8537e27a Author: Zhang Changzhong Date: Mon Nov 16 21:07:13 2020 +0800 qed: fix error return code in qed_iwarp_ll2_start() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 469981b17a4f ("qed: Add unaligned and packed packet processing") Fixes: fcb39f6c10b2 ("qed: Add mpa buffer descriptors for storing and processing mpa fpdus") Fixes: 1e28eaad07ea ("qed: Add iWARP support for fpdu spanned over more than two tcp packets") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Acked-by: Michal Kalderon  Link: https://lore.kernel.org/r/1605532033-27373-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit 9dacf44c3837b7f1cf460de904f352714e7cd107 Merge: 9c87c9f41245b c583bcb8f5edd Author: Linus Torvalds Date: Tue Nov 17 10:31:56 2020 -0800 Merge branch 'urgent-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU fix from Paul McKenney: "A single commit that fixes a bug that was introduced a couple of merge windows ago, but which rather more recently converged to an agreed-upon fix. The bug is that interrupts can be incorrectly enabled while holding an irq-disabled spinlock. This can of course result in self-deadlocks. The bug is a bit difficult to trigger. It requires that a preempted task be blocking a preemptible-RCU grace period long enough to trigger an RCU CPU stall warning. In addition, an interrupt must occur at just the right time, and that interrupt's handler must acquire that same irq-disabled spinlock. Still, a deadlock is a deadlock. Furthermore, we do now have a fix, and that fix survives kernel test robot, -next, and rcutorture testing. It has also been verified by Sebastian as fixing the bug. Therefore..." * 'urgent-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: rcu: Don't invoke try_invoke_on_locked_down_task() with irqs disabled commit 6654b57866b98230a270953dd34f67de17ab1708 Author: Xiongfeng Wang Date: Mon Nov 16 09:09:29 2020 +0800 drm/sun4i: dw-hdmi: fix error return code in sun8i_dw_hdmi_bind() Fix to return a negative error code from the error handling case instead of 0 in function sun8i_dw_hdmi_bind(). Fixes: b7c7436a5ff0 ("drm/sun4i: Implement A83T HDMI driver") Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Reviewed-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/1605488969-5211-1-git-send-email-wangxiongfeng2@huawei.com commit 04a9cd51d3f3308a98cbc6adc07acb12fbade011 Author: Lukas Wunner Date: Mon Nov 16 09:23:10 2020 +0100 spi: npcm-fiu: Don't leak SPI master in probe error path If the calls to of_match_device(), of_alias_get_id(), devm_ioremap_resource(), devm_regmap_init_mmio() or devm_clk_get() fail on probe of the NPCM FIU SPI driver, the spi_controller struct is erroneously not freed. Fix by switching over to the new devm_spi_alloc_master() helper. Fixes: ace55c411b11 ("spi: npcm-fiu: add NPCM FIU controller driver") Signed-off-by: Lukas Wunner Cc: # v5.4+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: # v5.4+ Cc: Tomer Maimon Link: https://lore.kernel.org/r/a420c23a363a3bc9aa684c6e790c32a8af106d17.1605512876.git.lukas@wunner.de Signed-off-by: Mark Brown commit a41b0ad07bfa081584218431cb0cd7e7ecc71210 Author: Serge Semin Date: Tue Nov 17 12:40:54 2020 +0300 spi: dw: Set transfer handler before unmasking the IRQs It turns out the IRQs most like can be unmasked before the controller is enabled with no problematic consequences. The manual doesn't explicitly state that, but the examples perform the controller initialization procedure in that order. So the commit da8f58909e7e ("spi: dw: Unmask IRQs after enabling the chip") hasn't been that required as I thought. But anyway setting the IRQs up after the chip enabling still worth adding since it has simplified the code a bit. The problem is that it has introduced a potential bug. The transfer handler pointer is now initialized after the IRQs are enabled. That may and eventually will cause an invalid or uninitialized callback invocation. Fix that just by performing the callback initialization before the IRQ unmask procedure. Fixes: da8f58909e7e ("spi: dw: Unmask IRQs after enabling the chip") Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201117094054.4696-1-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 67aa3ec3dbc43d6e34401d9b2a40040ff7bb57af Author: Mikulas Patocka Date: Tue Nov 10 07:45:13 2020 -0500 dm writecache: fix the maximum number of arguments Advance the maximum number of arguments to 16. This fixes issue where certain operations, combined with table configured args, exceed 10 arguments. Signed-off-by: Mikulas Patocka Fixes: 48debafe4f2f ("dm: add writecache target") Cc: stable@vger.kernel.org # v4.18+ Signed-off-by: Mike Snitzer commit e5d41cbca1b2036362c9e29d705d3a175a01eff8 Author: Mikulas Patocka Date: Tue Nov 10 07:44:01 2020 -0500 dm writecache: advance the number of arguments when reporting max_age When reporting the "max_age" value the number of arguments must advance by two. Signed-off-by: Mikulas Patocka Fixes: 3923d4854e18 ("dm writecache: implement gradual cleanup") Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Mike Snitzer commit a7a10bce8a04f48238a8306ec97d430b77917015 Author: Mikulas Patocka Date: Thu Oct 15 13:21:44 2020 -0400 dm integrity: don't use drivers that have CRYPTO_ALG_ALLOCATES_MEMORY Don't use crypto drivers that have the flag CRYPTO_ALG_ALLOCATES_MEMORY set. These drivers allocate memory and thus they are not suitable for block I/O processing. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit e3389b0a14952aac7f2998bb98f633afb21eaa92 Author: Zhen Lei Date: Fri Oct 16 17:08:33 2020 +0800 arm64: dts: qcom: clear the warnings caused by empty dma-ranges The scripts/dtc/checks.c requires that the node have empty "dma-ranges" property must have the same "#address-cells" and "#size-cells" values as the parent node. Otherwise, the following warnings is reported: arch/arm64/boot/dts/qcom/ipq6018.dtsi:185.3-14: Warning \ (dma_ranges_format): /soc:dma-ranges: empty "dma-ranges" property but \ its #address-cells (1) differs from / (2) arch/arm64/boot/dts/qcom/ipq6018.dtsi:185.3-14: Warning \ (dma_ranges_format): /soc:dma-ranges: empty "dma-ranges" property but \ its #size-cells (1) differs from / (2) Arnd Bergmann figured out why it's necessary: Also note that the #address-cells=<1> means that any device under this bus is assumed to only support 32-bit addressing, and DMA will have to go through a slow swiotlb in the absence of an IOMMU. Suggested-by: Arnd Bergmann Signed-off-by: Zhen Lei Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201016090833.1892-3-thunder.leizhen@huawei.com' Signed-off-by: Arnd Bergmann commit 2013a4b684b6eb614ee5c9a3c07b0ae6f5ca96d9 Author: Zhen Lei Date: Fri Oct 16 17:08:32 2020 +0800 arm64: dts: broadcom: clear the warnings caused by empty dma-ranges The scripts/dtc/checks.c requires that the node have empty "dma-ranges" property must have the same "#address-cells" and "#size-cells" values as the parent node. Otherwise, the following warnings is reported: arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi:7.3-14: Warning \ (dma_ranges_format): /usb:dma-ranges: empty "dma-ranges" property but \ its #address-cells (1) differs from / (2) arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi:7.3-14: Warning \ (dma_ranges_format): /usb:dma-ranges: empty "dma-ranges" property but \ its #size-cells (1) differs from / (2) Arnd Bergmann figured out why it's necessary: Also note that the #address-cells=<1> means that any device under this bus is assumed to only support 32-bit addressing, and DMA will have to go through a slow swiotlb in the absence of an IOMMU. Suggested-by: Arnd Bergmann Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20201016090833.1892-2-thunder.leizhen@huawei.com' Acked-by: Florian Fainelli Signed-off-by: Arnd Bergmann commit dc293f2106903ab9c24e9cea18c276e32c394c33 Author: Laurent Pinchart Date: Tue Sep 1 00:09:37 2020 +0300 xtensa: uaccess: Add missing __user to strncpy_from_user() prototype When adding __user annotations in commit 2adf5352a34a, the strncpy_from_user() function declaration for the CONFIG_GENERIC_STRNCPY_FROM_USER case was missed. Fix it. Reported-by: kernel test robot Signed-off-by: Laurent Pinchart Message-Id: <20200831210937.17938-1-laurent.pinchart@ideasonboard.com> Signed-off-by: Max Filippov commit 54a2a3898f469a915510038fe84ef4f083131d3e Author: Joakim Tjernlund Date: Tue Nov 17 13:28:03 2020 +0100 ALSA: usb-audio: Add delay quirk for all Logitech USB devices Found one more Logitech device, BCC950 ConferenceCam, which needs the same delay here. This makes 3 out of 3 devices I have tried. Therefore, add a delay for all Logitech devices as it does not hurt. Signed-off-by: Joakim Tjernlund Cc: # 4.19.y, 5.4.y Link: https://lore.kernel.org/r/20201117122803.24310-1-joakim.tjernlund@infinera.com Signed-off-by: Takashi Iwai commit 14c620cf2ee81349527491110a47a157ac6d511c Merge: 09162bc32c880 8410e7f3b31e5 Author: Rafael J. Wysocki Date: Tue Nov 17 13:25:06 2020 +0100 Merge branch 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull cpufreq-arm fixes for 5.10-rc5 from Viresh Kumar: "- tegra186: Fix ->get() callback. - arm/scmi: Add dummy clock provider to fix failure." * 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: scmi: Fix OPP addition failure with a dummy clock provider cpufreq: tegra186: Fix get frequency callback commit ebd19fc372e3e78bf165f230e7c084e304441c08 Author: Sami Tolvanen Date: Fri Nov 13 10:31:26 2020 -0800 perf/x86: fix sysfs type mismatches This change switches rapl to use PMU_FORMAT_ATTR, and fixes two other macros to use device_attribute instead of kobj_attribute to avoid callback type mismatches that trip indirect call checking with Clang's Control-Flow Integrity (CFI). Reported-by: Sedat Dilek Signed-off-by: Sami Tolvanen Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20201113183126.1239404-1-samitolvanen@google.com commit 43be4388e94b915799a24f0eaf664bf95b85231f Author: Boqun Feng Date: Fri Nov 13 19:05:03 2020 +0800 lockdep: Put graph lock/unlock under lock_recursion protection A warning was hit when running xfstests/generic/068 in a Hyper-V guest: [...] ------------[ cut here ]------------ [...] DEBUG_LOCKS_WARN_ON(lockdep_hardirqs_enabled()) [...] WARNING: CPU: 2 PID: 1350 at kernel/locking/lockdep.c:5280 check_flags.part.0+0x165/0x170 [...] ... [...] Workqueue: events pwq_unbound_release_workfn [...] RIP: 0010:check_flags.part.0+0x165/0x170 [...] ... [...] Call Trace: [...] lock_is_held_type+0x72/0x150 [...] ? lock_acquire+0x16e/0x4a0 [...] rcu_read_lock_sched_held+0x3f/0x80 [...] __send_ipi_one+0x14d/0x1b0 [...] hv_send_ipi+0x12/0x30 [...] __pv_queued_spin_unlock_slowpath+0xd1/0x110 [...] __raw_callee_save___pv_queued_spin_unlock_slowpath+0x11/0x20 [...] .slowpath+0x9/0xe [...] lockdep_unregister_key+0x128/0x180 [...] pwq_unbound_release_workfn+0xbb/0xf0 [...] process_one_work+0x227/0x5c0 [...] worker_thread+0x55/0x3c0 [...] ? process_one_work+0x5c0/0x5c0 [...] kthread+0x153/0x170 [...] ? __kthread_bind_mask+0x60/0x60 [...] ret_from_fork+0x1f/0x30 The cause of the problem is we have call chain lockdep_unregister_key() -> lockdep_unlock() -> arch_spin_unlock() -> __pv_queued_spin_unlock_slowpath() -> pv_kick() -> __send_ipi_one() -> trace_hyperv_send_ipi_one(). Although this particular warning is triggered because Hyper-V has a trace point in ipi sending, but in general arch_spin_unlock() may call another function having a trace point in it, so put the arch_spin_lock() and arch_spin_unlock() after lock_recursion protection to fix this problem and avoid similiar problems. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201113110512.1056501-1-boqun.feng@gmail.com commit 2279f540ea7d05f22d2f0c4224319330228586bc Author: Juri Lelli Date: Tue Nov 17 07:14:32 2020 +0100 sched/deadline: Fix priority inheritance with multiple scheduling classes Glenn reported that "an application [he developed produces] a BUG in deadline.c when a SCHED_DEADLINE task contends with CFS tasks on nested PTHREAD_PRIO_INHERIT mutexes. I believe the bug is triggered when a CFS task that was boosted by a SCHED_DEADLINE task boosts another CFS task (nested priority inheritance). ------------[ cut here ]------------ kernel BUG at kernel/sched/deadline.c:1462! invalid opcode: 0000 [#1] PREEMPT SMP CPU: 12 PID: 19171 Comm: dl_boost_bug Tainted: ... Hardware name: ... RIP: 0010:enqueue_task_dl+0x335/0x910 Code: ... RSP: 0018:ffffc9000c2bbc68 EFLAGS: 00010002 RAX: 0000000000000009 RBX: ffff888c0af94c00 RCX: ffffffff81e12500 RDX: 000000000000002e RSI: ffff888c0af94c00 RDI: ffff888c10b22600 RBP: ffffc9000c2bbd08 R08: 0000000000000009 R09: 0000000000000078 R10: ffffffff81e12440 R11: ffffffff81e1236c R12: ffff888bc8932600 R13: ffff888c0af94eb8 R14: ffff888c10b22600 R15: ffff888bc8932600 FS: 00007fa58ac55700(0000) GS:ffff888c10b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa58b523230 CR3: 0000000bf44ab003 CR4: 00000000007606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: ? intel_pstate_update_util_hwp+0x13/0x170 rt_mutex_setprio+0x1cc/0x4b0 task_blocks_on_rt_mutex+0x225/0x260 rt_spin_lock_slowlock_locked+0xab/0x2d0 rt_spin_lock_slowlock+0x50/0x80 hrtimer_grab_expiry_lock+0x20/0x30 hrtimer_cancel+0x13/0x30 do_nanosleep+0xa0/0x150 hrtimer_nanosleep+0xe1/0x230 ? __hrtimer_init_sleeper+0x60/0x60 __x64_sys_nanosleep+0x8d/0xa0 do_syscall_64+0x4a/0x100 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fa58b52330d ... ---[ end trace 0000000000000002 ]— He also provided a simple reproducer creating the situation below: So the execution order of locking steps are the following (N1 and N2 are non-deadline tasks. D1 is a deadline task. M1 and M2 are mutexes that are enabled * with priority inheritance.) Time moves forward as this timeline goes down: N1 N2 D1 | | | | | | Lock(M1) | | | | | | Lock(M2) | | | | | | Lock(M2) | | | | Lock(M1) | | (!!bug triggered!) | Daniel reported a similar situation as well, by just letting ksoftirqd run with DEADLINE (and eventually block on a mutex). Problem is that boosted entities (Priority Inheritance) use static DEADLINE parameters of the top priority waiter. However, there might be cases where top waiter could be a non-DEADLINE entity that is currently boosted by a DEADLINE entity from a different lock chain (i.e., nested priority chains involving entities of non-DEADLINE classes). In this case, top waiter static DEADLINE parameters could be null (initialized to 0 at fork()) and replenish_dl_entity() would hit a BUG(). Fix this by keeping track of the original donor and using its parameters when a task is boosted. Reported-by: Glenn Elliott Reported-by: Daniel Bristot de Oliveira Signed-off-by: Juri Lelli Signed-off-by: Peter Zijlstra (Intel) Tested-by: Daniel Bristot de Oliveira Link: https://lkml.kernel.org/r/20201117061432.517340-1-juri.lelli@redhat.com commit ec618b84f6e15281cc3660664d34cd0dd2f2579e Author: Peter Zijlstra Date: Thu Sep 24 13:50:42 2020 +0200 sched: Fix rq->nr_iowait ordering schedule() ttwu() deactivate_task(); if (p->on_rq && ...) // false atomic_dec(&task_rq(p)->nr_iowait); if (prev->in_iowait) atomic_inc(&rq->nr_iowait); Allows nr_iowait to be decremented before it gets incremented, resulting in more dodgy IO-wait numbers than usual. Note that because we can now do ttwu_queue_wakelist() before p->on_cpu==0, we lose the natural ordering and have to further delay the decrement. Fixes: c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu") Reported-by: Tejun Heo Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mel Gorman Link: https://lkml.kernel.org/r/20201117093829.GD3121429@hirez.programming.kicks-ass.net commit f97bb5272d9e95d400d6c8643ebb146b3e3e7842 Author: Peter Zijlstra Date: Tue Nov 17 09:08:41 2020 +0100 sched: Fix data-race in wakeup Mel reported that on some ARM64 platforms loadavg goes bananas and Will tracked it down to the following race: CPU0 CPU1 schedule() prev->sched_contributes_to_load = X; deactivate_task(prev); try_to_wake_up() if (p->on_rq &&) // false if (smp_load_acquire(&p->on_cpu) && // true ttwu_queue_wakelist()) p->sched_remote_wakeup = Y; smp_store_release(prev->on_cpu, 0); where both p->sched_contributes_to_load and p->sched_remote_wakeup are in the same word, and thus the stores X and Y race (and can clobber one another's data). Whereas prior to commit c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu") the p->on_cpu handoff serialized access to p->sched_remote_wakeup (just as it still does with p->sched_contributes_to_load) that commit broke that by calling ttwu_queue_wakelist() with p->on_cpu != 0. However, due to p->XXX = X ttwu() schedule() if (p->on_rq && ...) // false smp_mb__after_spinlock() if (smp_load_acquire(&p->on_cpu) && deactivate_task() ttwu_queue_wakelist()) p->on_rq = 0; p->sched_remote_wakeup = Y; We can be sure any 'current' store is complete and 'current' is guaranteed asleep. Therefore we can move p->sched_remote_wakeup into the current flags word. Note: while the observed failure was loadavg accounting gone wrong due to ttwu() cobbering p->sched_contributes_to_load, the reverse problem is also possible where schedule() clobbers p->sched_remote_wakeup, this could result in enqueue_entity() wrecking ->vruntime and causing scheduling artifacts. Fixes: c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu") Reported-by: Mel Gorman Debugged-by: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201117083016.GK3121392@hirez.programming.kicks-ass.net commit 8e1ac4299a6e8726de42310d9c1379f188140c71 Author: Quentin Perret Date: Thu Nov 12 11:12:01 2020 +0000 sched/fair: Fix overutilized update in enqueue_task_fair() enqueue_task_fair() attempts to skip the overutilized update for new tasks as their util_avg is not accurate yet. However, the flag we check to do so is overwritten earlier on in the function, which makes the condition pretty much a nop. Fix this by saving the flag early on. Fixes: 2802bf3cd936 ("sched/fair: Add over-utilization/tipping point indicator") Reported-by: Rick Yiu Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20201112111201.2081902-1-qperret@google.com commit ac3b57adf87ad9bac7e33ca26bbbb13fae1ed62b Author: Zhang Qilong Date: Fri Nov 13 21:18:56 2020 +0800 MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu If the clk_register fails, we should free h before function returns to prevent memleak. Fixes: 474402291a0ad ("MIPS: Alchemy: clock framework integration of onchip clocks") Reported-by: Hulk Robot Signed-off-by: Zhang Qilong Signed-off-by: Thomas Bogendoerfer commit d06d60d52ec0b0eef702dd3e7b4699f0b589ad0f Author: Manish Narani Date: Mon Nov 16 14:02:45 2020 +0530 mmc: sdhci-of-arasan: Issue DLL reset explicitly In the current implementation DLL reset will be issued for each ITAP and OTAP setting inside ATF, this is creating issues in some scenarios and this sequence is not inline with the TRM. To fix the issue, DLL reset should be removed from the ATF and host driver will request it explicitly. This patch update host driver to explicitly request for DLL reset before ITAP (assert DLL) and after OTAP (release DLL) settings. Fixes: a5c8b2ae2e51 ("mmc: sdhci-of-arasan: Add support for ZynqMP Platform Tap Delays Setup") Signed-off-by: Sai Krishna Potthuri Signed-off-by: Manish Narani Acked-by: Michal Simek Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1605515565-117562-4-git-send-email-manish.narani@xilinx.com Signed-off-by: Ulf Hansson commit d338c6d01dc614cad253d6c042501fa0eb242d5c Author: Manish Narani Date: Mon Nov 16 14:02:44 2020 +0530 mmc: sdhci-of-arasan: Use Mask writes for Tap delays Mask the ITAP and OTAP delay bits before updating with the new tap value for Versal platform. Fixes: 1a470721c8f5 ("sdhci: arasan: Add support for Versal Tap Delays") Signed-off-by: Sai Krishna Potthuri Signed-off-by: Manish Narani Acked-by: Michal Simek Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1605515565-117562-3-git-send-email-manish.narani@xilinx.com Signed-off-by: Ulf Hansson commit 9e9534329306fcd7ea1b84f14860a3c04ebe7f1a Author: Manish Narani Date: Mon Nov 16 14:02:43 2020 +0530 mmc: sdhci-of-arasan: Allow configuring zero tap values Allow configuring the Output and Input tap values with zero to avoid failures in some cases (one of them is SD boot mode) where the output and input tap values may be already set to non-zero. Fixes: a5c8b2ae2e51 ("mmc: sdhci-of-arasan: Add support for ZynqMP Platform Tap Delays Setup") Signed-off-by: Sai Krishna Potthuri Signed-off-by: Manish Narani Acked-by: Michal Simek Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1605515565-117562-2-git-send-email-manish.narani@xilinx.com Signed-off-by: Ulf Hansson commit 60d53566100abde4acc5504b524bc97f89015690 Author: Adrian Hunter Date: Thu Nov 12 15:36:56 2020 +0200 mmc: sdhci-pci: Prefer SDR25 timing for High Speed mode for BYT-based Intel controllers A UHS setting of SDR25 can give better results for High Speed mode. This is because there is no setting corresponding to high speed. Currently SDHCI sets no value, which means zero which is also the setting for SDR12. There was an attempt to change this in sdhci.c but it caused problems for some drivers, so it was reverted and the change was made to sdhci-brcmstb in commit 2fefc7c5f7d16e ("mmc: sdhci-brcmstb: Fix incorrect switch to HS mode"). Several other drivers also do this. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org # v5.4+ Link: https://lore.kernel.org/r/20201112133656.20317-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit e02152ba2810f7c88cb54e71cda096268dfa9241 Author: Michael Ellerman Date: Mon Nov 16 23:09:13 2020 +1100 powerpc: Drop -me200 addition to build flags Currently a build with CONFIG_E200=y will fail with: Error: invalid switch -me200 Error: unrecognized option -me200 Upstream binutils has never supported an -me200 option. Presumably it was supported at some point by either a fork or Freescale internal binutils. We can't support code that we can't even build test, so drop the addition of -me200 to the build flags, so we can at least build with CONFIG_E200=y. Reported-by: Németh Márton Reported-by: kernel test robot Signed-off-by: Michael Ellerman Reviewed-by: Nick Desaulniers Acked-by: Scott Wood Link: https://lore.kernel.org/r/20201116120913.165317-1-mpe@ellerman.id.au commit 2dde2821b57f12fa8601d35d438b5e300fcbbe1d Merge: 18db36a073db6 e5b1032a656e9 Author: Greg Kroah-Hartman Date: Tue Nov 17 10:53:00 2020 +0100 Merge tag 'iio-fixes-for-5.10a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of IIO and counter fixes for the 5.10 cycle. IIO cros_ec - Provide defauts for max and min frequency when older machines fail to return them correctly. ingenic-adc - Fix wrong vref value for JZ4770 SoC - Fix AUX / VBAT readings when touchscreen in use by pausing touchscreen readings during a read of these channels. kxcjk1013 - Fix an issue with KIOX010A ACPI id using devices which need to run a ACPI device specific method to avoid leaving the keyboard disabled. Includes a minor precursor patch to make this fix easier to do. mt6577-auxadc - Fix an issue with dev_comp not being set resulting in a null ptr deref. st_lsm6dsx - Set a 10ms min shub slave timeout to handle fast snesors where more time is needed to set up the config than the cycles allowed. stm32-adc - Fix an issue due to a clash between an ADC configured to use IRQs and a second configured to use DMA cause by some incorrect register masking. vcnl4035 - Kconfig missing dependency Counter ti-eqep - wrong value for max_register as one beyond the end instead of the end. * tag 'iio-fixes-for-5.10a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: accel: kxcjk1013: Add support for KIOX010A ACPI DSM for setting tablet-mode iio: accel: kxcjk1013: Replace is_smo8500_device with an acpi_type enum iio: light: fix kconfig dependency bug for VCNL4035 iio/adc: ingenic: Fix AUX/VBAT readings when touchscreen is used iio/adc: ingenic: Fix battery VREF for JZ4770 SoC iio: imu: st_lsm6dsx: set 10ms as min shub slave timeout counter/ti-eqep: Fix regmap max_register iio: adc: stm32-adc: fix a regression when using dma and irq iio: adc: mediatek: fix unset field iio: cros_ec: Use default frequencies when EC returns invalid information commit 1a371e67dc77125736cc56d3a0893f06b75855b6 Author: Chen Yu Date: Fri Nov 13 09:59:23 2020 +0800 x86/microcode/intel: Check patch signature before saving microcode for early loading Currently, scan_microcode() leverages microcode_matches() to check if the microcode matches the CPU by comparing the family and model. However, the processor stepping and flags of the microcode signature should also be considered when saving a microcode patch for early update. Use find_matching_signature() in scan_microcode() and get rid of the now-unused microcode_matches() which is a good cleanup in itself. Complete the verification of the patch being saved for early loading in save_microcode_patch() directly. This needs to be done there too because save_mc_for_early() will call save_microcode_patch() too. The second reason why this needs to be done is because the loader still tries to support, at least hypothetically, mixed-steppings systems and thus adds all patches to the cache that belong to the same CPU model albeit with different steppings. For example: microcode: CPU: sig=0x906ec, pf=0x2, rev=0xd6 microcode: mc_saved[0]: sig=0x906e9, pf=0x2a, rev=0xd6, total size=0x19400, date = 2020-04-23 microcode: mc_saved[1]: sig=0x906ea, pf=0x22, rev=0xd6, total size=0x19000, date = 2020-04-27 microcode: mc_saved[2]: sig=0x906eb, pf=0x2, rev=0xd6, total size=0x19400, date = 2020-04-23 microcode: mc_saved[3]: sig=0x906ec, pf=0x22, rev=0xd6, total size=0x19000, date = 2020-04-27 microcode: mc_saved[4]: sig=0x906ed, pf=0x22, rev=0xd6, total size=0x19400, date = 2020-04-23 The patch which is being saved for early loading, however, can only be the one which fits the CPU this runs on so do the signature verification before saving. [ bp: Do signature verification in save_microcode_patch() and rewrite commit message. ] Fixes: ec400ddeff20 ("x86/microcode_intel_early.c: Early update ucode on Intel's CPU") Signed-off-by: Chen Yu Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=208535 Link: https://lkml.kernel.org/r/20201113015923.13960-1-yu.c.chen@intel.com commit 61a2f1aecf6052f7bcf900829ca2b9d74437ec07 Author: Thomas Bogendoerfer Date: Mon Nov 16 18:45:15 2020 +0100 MIPS: kernel: Fix for_each_memblock conversion The loop over all memblocks works with PFNs and not physical addresses, so we need for_each_mem_pfn_range(). Fixes: b10d6bca8720 ("arch, drivers: replace for_each_membock() with for_each_mem_range()") Signed-off-by: Thomas Bogendoerfer Reviewed-by: Mike Rapoport Reviewed-by: Serge Semin commit 054409ab253d9f31bec5760105144166b4b71e22 Author: Chen Zhou Date: Tue Nov 17 10:54:26 2020 +0800 KVM: SVM: fix error return code in svm_create_vcpu() Fix to return a negative error code from the error handling case instead of 0 in function svm_create_vcpu(), as done elsewhere in this function. Fixes: f4c847a95654 ("KVM: SVM: refactor msr permission bitmap allocation") Reported-by: Hulk Robot Signed-off-by: Chen Zhou Message-Id: <20201117025426.167824-1-chenzhou10@huawei.com> Signed-off-by: Paolo Bonzini commit 8410e7f3b31e53bfa7a34c282b4313e79ed7ff8d Author: Sudeep Holla Date: Tue Nov 10 11:10:40 2020 +0000 cpufreq: scmi: Fix OPP addition failure with a dummy clock provider Commit dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER") handles -EPROBE_DEFER for the clock/interconnects within _allocate_opp_table() which is called from dev_pm_opp_add and it now propagates the error back to the caller. SCMI performance domain re-used clock bindings to keep it simple. However with the above mentioned change, if clock property is present in a device node, opps fails to get added with below errors until clk_get succeeds. cpu0: failed to add opp 450000000Hz cpu0: failed to add opps to the device ....(errors on cpu1-cpu4) cpu5: failed to add opp 450000000Hz cpu5: failed to add opps to the device So, in order to fix the issue, we need to register dummy clock provider. With the dummy clock provider, clk_get returns NULL(no errors!), then opp core proceeds to add OPPs for the CPUs. Cc: Rafael J. Wysocki Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER") Signed-off-by: Sudeep Holla Signed-off-by: Viresh Kumar commit e010d1d25e47642fb91023479a4965000cf934a8 Author: Jon Hunter Date: Tue Nov 3 11:55:14 2020 +0000 cpufreq: tegra186: Fix get frequency callback Commit b89c01c96051 ("cpufreq: tegra186: Fix initial frequency") implemented the CPUFREQ 'get' callback to determine the current operating frequency for each CPU. This implementation used a simple looked up to determine the current operating frequency. The problem with this is that frequency table for different Tegra186 devices may vary and so the default boot frequency for Tegra186 device may or may not be present in the frequency table. If the default boot frequency is not present in the frequency table, this causes the function tegra186_cpufreq_get() to return 0 and in turn causes cpufreq_online() to fail which prevents CPUFREQ from working. Fix this by always calculating the CPU frequency based upon the current 'ndiv' setting for the CPU. Note that the CPU frequency for Tegra186 is calculated by reading the current 'ndiv' setting, multiplying by the CPU reference clock and dividing by a constant divisor. Fixes: b89c01c96051 ("cpufreq: tegra186: Fix initial frequency") Signed-off-by: Jon Hunter Signed-off-by: Viresh Kumar commit f36199355c64a39fe82cfddc7623d827c7e050da Author: Mike Christie Date: Fri Nov 13 19:46:18 2020 -0600 scsi: target: iscsi: Fix cmd abort fabric stop race Maurizio found a race where the abort and cmd stop paths can race as follows: 1. thread1 runs iscsit_release_commands_from_conn and sets CMD_T_FABRIC_STOP. 2. thread2 runs iscsit_aborted_task and then does __iscsit_free_cmd. It then returns from the aborted_task callout and we finish target_handle_abort and do: target_handle_abort -> transport_cmd_check_stop_to_fabric -> lio_check_stop_free -> target_put_sess_cmd The cmd is now freed. 3. thread1 now finishes iscsit_release_commands_from_conn and runs iscsit_free_cmd while accessing a command we just released. In __target_check_io_state we check for CMD_T_FABRIC_STOP and set the CMD_T_ABORTED if the driver is not cleaning up the cmd because of a session shutdown. However, iscsit_release_commands_from_conn only sets the CMD_T_FABRIC_STOP and does not check to see if the abort path has claimed completion ownership of the command. This adds a check in iscsit_release_commands_from_conn so only the abort or fabric stop path cleanup the command. Link: https://lore.kernel.org/r/1605318378-9269-1-git-send-email-michael.christie@oracle.com Reported-by: Maurizio Lombardi Reviewed-by: Maurizio Lombardi Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit fe0a8a95e7134d0b44cd407bc0085b9ba8d8fe31 Author: Lee Duncan Date: Fri Nov 6 11:33:17 2020 -0800 scsi: libiscsi: Fix NOP race condition iSCSI NOPs are sometimes "lost", mistakenly sent to the user-land iscsid daemon instead of handled in the kernel, as they should be, resulting in a message from the daemon like: iscsid: Got nop in, but kernel supports nop handling. This can occur because of the new forward- and back-locks, and the fact that an iSCSI NOP response can occur before processing of the NOP send is complete. This can result in "conn->ping_task" being NULL in iscsi_nop_out_rsp(), when the pointer is actually in the process of being set. To work around this, we add a new state to the "ping_task" pointer. In addition to NULL (not assigned) and a pointer (assigned), we add the state "being set", which is signaled with an INVALID pointer (using "-1"). Link: https://lore.kernel.org/r/20201106193317.16993-1-leeman.duncan@gmail.com Reviewed-by: Mike Christie Signed-off-by: Lee Duncan Signed-off-by: Martin K. Petersen commit d5bd32a876c8cb677c9cc88dcc7eb498cd0c9397 Merge: 064c9c32b17ca 0ae0a779efb88 Author: Jakub Kicinski Date: Mon Nov 16 17:39:49 2020 -0800 Merge branch 'bnxt_en-bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. This first patch fixes a module eeprom A2h addressing issue. The next 2 patches fix counter related issues. The last one skips an unsupported firmware call on the VF to avoid the error log. ==================== Link: https://lore.kernel.org/r/1605486472-28156-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 0ae0a779efb8840a0cdb2d6bd9a5d07663ac3ee2 Author: Vasundhara Volam Date: Sun Nov 15 19:27:52 2020 -0500 bnxt_en: Avoid unnecessary NVM_GET_DEV_INFO cmd error log on VFs. VFs do not have access permissions to issue NVM_GET_DEV_INFO firmware command. Fixes: 4933f6753b50 ("bnxt_en: Add bnxt_hwrm_nvm_get_dev_info() to query NVM info.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit fa97f303fa4cf8469fd3d1ef29da69c0a3f6ddc8 Author: Michael Chan Date: Sun Nov 15 19:27:51 2020 -0500 bnxt_en: Fix counter overflow logic. bnxt_add_one_ctr() adds a hardware counter to a software counter and adjusts for the hardware counter wraparound against the mask. The logic assumes that the hardware counter is always smaller than or equal to the mask. This assumption is mostly correct. But in some cases if the firmware is older and does not provide the accurate mask, the driver can use a mask that is smaller than the actual hardware mask. This can cause some extra carry bits to be added to the software counter, resulting in counters that far exceed the actual value. Fix it by masking the hardware counter with the mask passed into bnxt_add_one_ctr(). Fixes: fea6b3335527 ("bnxt_en: Accumulate all counters.") Reviewed-by: Vasundhara Volam Reviewed-by: Pavan Chebbi Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit eba93de6d31c1734dee59909020a162de612e41e Author: Michael Chan Date: Sun Nov 15 19:27:50 2020 -0500 bnxt_en: Free port stats during firmware reset. Firmware is unable to retain the port counters during any kind of fatal or non-fatal resets, so we must clear the port counters to avoid false detection of port counter overflow. Fixes: fea6b3335527 ("bnxt_en: Accumulate all counters.") Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 4260330b32b14330cfe427d568ac5f5b29b5be3d Author: Edwin Peer Date: Sun Nov 15 19:27:49 2020 -0500 bnxt_en: read EEPROM A2h address using page 0 The module eeprom address range returned by bnxt_get_module_eeprom() should be 256 bytes of A0h address space, the lower half of the A2h address space, and page 0 for the upper half of the A2h address space. Fix the firmware call by passing page_number 0 for the A2h slave address space. Fixes: 42ee18fe4ca2 ("bnxt_en: Add Support for ETHTOOL_GMODULEINFO and ETHTOOL_GMODULEEEPRO") Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 064c9c32b17ca9b36f95eba32ee790dbbebd9a5f Author: Alex Elder Date: Sat Nov 14 12:20:17 2020 -0600 net: ipa: lock when freeing transaction Transactions sit on one of several lists, depending on their state (allocated, pending, complete, or polled). A spinlock protects against concurrent access when transactions are moved between these lists. Transactions are also reference counted. A newly-allocated transaction has an initial count of 1; a transaction is released in gsi_trans_free() only if its decremented reference count reaches 0. Releasing a transaction includes removing it from the polled (or if unused, allocated) list, so the spinlock is acquired when we release a transaction. The reference count is used to allow a caller to synchronously wait for a committed transaction to complete. In this case, the waiter takes an extra reference to the transaction *before* committing it (so it won't be freed), and releases its reference (calls gsi_trans_free()) when it is done with it. Similarly, gsi_channel_update() takes an extra reference to ensure a transaction isn't released before the function is done operating on it. Until the transaction is moved to the completed list (by this function) it won't be freed, so this reference is taken "safely." But in the quiesce path, we want to wait for the "last" transaction, which we find in the completed or polled list. Transactions on these lists can be freed at any time, so we (try to) prevent that by taking the reference while holding the spinlock. Currently gsi_trans_free() decrements a transaction's reference count unconditionally, acquiring the lock to remove the transaction from its list *only* when the count reaches 0. This does not protect the quiesce path, which depends on the lock to ensure its extra reference prevents release of the transaction. Fix this by only dropping the last reference to a transaction in gsi_trans_free() while holding the spinlock. Fixes: 9dd441e4ed575 ("soc: qcom: ipa: GSI transactions") Reported-by: Stephen Boyd Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20201114182017.28270-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 3fe16edf6767decd640fa2654308bc64f8d656dc Author: Vadim Fedorenko Date: Sun Nov 15 07:16:00 2020 +0300 net/tls: fix corrupted data in recvmsg If tcp socket has more data than Encrypted Handshake Message then tls_sw_recvmsg will try to decrypt next record instead of returning full control message to userspace as mentioned in comment. The next message - usually Application Data - gets corrupted because it uses zero copy for decryption that's why the data is not stored in skb for next iteration. Revert check to not decrypt next record if current is not Application Data. Fixes: 692d7b5d1f91 ("tls: Fix recvmsg() to be able to peek across multiple records") Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/1605413760-21153-1-git-send-email-vfedorenko@novek.ru Signed-off-by: Jakub Kicinski commit fc70f5bf5e525dde81565f0a30d5e39168062eba Author: Subash Abhinov Kasiviswanathan Date: Fri Nov 13 13:12:05 2020 -0700 net: qualcomm: rmnet: Fix incorrect receive packet handling during cleanup During rmnet unregistration, the real device rx_handler is first cleared followed by the removal of rx_handler_data after the rcu synchronization. Any packets in the receive path may observe that the rx_handler is NULL. However, there is no check when dereferencing this value to use the rmnet_port information. This fixes following splat by adding the NULL check. Unable to handle kernel NULL pointer dereference at virtual address 000000000000000d pc : rmnet_rx_handler+0x124/0x284 lr : rmnet_rx_handler+0x124/0x284 rmnet_rx_handler+0x124/0x284 __netif_receive_skb_core+0x758/0xd74 __netif_receive_skb+0x50/0x17c process_backlog+0x15c/0x1b8 napi_poll+0x88/0x284 net_rx_action+0xbc/0x23c __do_softirq+0x20c/0x48c Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Sean Tranchetti Signed-off-by: Subash Abhinov Kasiviswanathan Link: https://lore.kernel.org/r/1605298325-3705-1-git-send-email-subashab@codeaurora.org Signed-off-by: Jakub Kicinski commit 9c79a8ab5f124db01eb1d7287454a702f0d4252f Author: Lorenzo Bianconi Date: Fri Nov 13 19:16:57 2020 +0100 net: mvneta: fix possible memory leak in mvneta_swbm_add_rx_fragment Recycle the page running page_pool_put_full_page() in mvneta_swbm_add_rx_fragment routine when the last descriptor contains just the FCS or if the received packet contains more than MAX_SKB_FRAGS fragments Fixes: ca0e014609f0 ("net: mvneta: move skb build after descriptors processing") Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/df6a2bad70323ee58d3901491ada31c1ca2a40b9.1605291228.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 8e5debed39017836a850c6c7bfacc93299d19bad Author: Wong Vee Khee Date: Sun Nov 15 15:42:10 2020 +0800 net: stmmac: Use rtnl_lock/unlock on netif_set_real_num_rx_queues() call Fix an issue where dump stack is printed on suspend resume flow due to netif_set_real_num_rx_queues() is not called with rtnl_lock held(). Fixes: 686cff3d7022 ("net: stmmac: Fix incorrect location to set real_num_rx|tx_queues") Reported-by: Christophe ROULLIER Tested-by: Christophe ROULLIER Cc: Alexandre TORGUE Reviewed-by: Ong Boon Leong Signed-off-by: Wong Vee Khee Link: https://lore.kernel.org/r/20201115074210.23605-1-vee.khee.wong@intel.com Signed-off-by: Jakub Kicinski commit 7a30ecc9237681bb125cbd30eee92bef7e86293d Author: Heiner Kallweit Date: Fri Nov 13 10:27:27 2020 +0100 net: bridge: add missing counters to ndo_get_stats64 callback In br_forward.c and br_input.c fields dev->stats.tx_dropped and dev->stats.multicast are populated, but they are ignored in ndo_get_stats64. Fixes: 28172739f0a2 ("net: fix 64 bit counters on 32 bit arches") Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/58ea9963-77ad-a7cf-8dfd-fc95ab95f606@gmail.com Signed-off-by: Jakub Kicinski commit 35f735c665114840dcd3142f41148d07870f51f7 Author: Zhang Changzhong Date: Fri Nov 13 14:49:33 2020 +0800 net: ethernet: ti: cpsw: fix error return code in cpsw_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1605250173-18438-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit 661710bfd5039267f911e42675ab743760b6449d Author: Zhang Changzhong Date: Fri Nov 13 14:34:03 2020 +0800 net: stmmac: dwmac-intel-plat: fix error return code in intel_eth_plat_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 9efc9b2b04c7 ("net: stmmac: Add dwmac-intel-plat for GBE driver") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1605249243-17262-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit 63fa58d99a7bc07f2d70ccc7a50aba86dba652c0 Merge: bd6327fda2f3d 1072460a1aaba Author: Mark Brown Date: Mon Nov 16 23:29:07 2020 +0000 Merge Intel catpt DSP fixes into asoc-5.10 commit 3beb9be165083c2964eba1923601c3bfac0b02d4 Author: Zhang Changzhong Date: Fri Nov 13 14:16:26 2020 +0800 qlcnic: fix error return code in qlcnic_83xx_restart_hw() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 3ced0a88cd4c ("qlcnic: Add support to run firmware POST") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1605248186-16013-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit cfbaa8b33e022aca62a3f2815ffbc02874d4cb8b Author: Zhang Changzhong Date: Fri Nov 13 14:07:07 2020 +0800 cx82310_eth: fix error return code in cx82310_bind() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: ca139d76b0d9 ("cx82310_eth: re-enable ethernet mode after router reboot") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1605247627-15385-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit 9c87c9f41245baa3fc4716cf39141439cf405b01 Merge: a5698b3835f59 cc05af8e2e913 Author: Linus Torvalds Date: Mon Nov 16 15:07:08 2020 -0800 Merge tag 'arm-soc-fixes-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "Around one third of the fixes this time are for dts files that list their ethernet controller as using 'phy-mode="rgmii"' but are changed to 'phy-mode="rgmii-id"' now, because the PHY drivers (realtek, ksz9031, dp83867, ...) now configure the internal delay based on that when they used to stay on the hardware default. The long story is archived at https://lore.kernel.org/netdev/CAMj1kXEEF_Un-4NTaD5iUN0NoZYaJQn-rPediX0S6oRiuVuW-A@mail.gmail.com/ I was trying to hold off on the bugfixes until there was a solution that would avoid breaking all boards, but that does not seem to be happening any time soon, so I am now sending the correct version of the dts files to ensure that at least these machines can use their network devices again. The other changes this time are: - Updating the MAINTAINER lists for Allwinner and Samsung SoCs - Multiple i.MX8MN machines get updates for their CPU operating points to match the data sheet - A revert for a dts patch that caused a regression in USB support on Odroid U3 - Two fixes for the AMD Tee driver, addressing a memory leak and missing locking - Mark the network subsystem on qoriq-fman3 as cache coherent for correctness as better performance. - Minor dts fixes elsewhere, addressing dtc warnings and similar problems" * tag 'arm-soc-fixes-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (48 commits) ARM: dts: exynos: revert "add input clock to CMU in Exynos4412 Odroid" ARM: dts: imx50-evk: Fix the chip select 1 IOMUX arm64: dts: imx8mm: fix voltage for 1.6GHz CPU operating point ARM: dts: stm32: Keep VDDA LDO1 always on on DHCOM ARM: dts: stm32: Enable thermal sensor support on stm32mp15xx-dhcor ARM: dts: stm32: Define VIO regulator supply on DHCOM ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2 ARM: dts: stm32: Fix TA3-GPIO-C key on STM32MP1 DHCOM PDK2 arm64: dts: renesas: r8a774e1: Add missing audio_clk_b tee: amdtee: synchronize access to shm list tee: amdtee: fix memory leak due to reset of global shm list arm64: dts: agilex/stratix10: Fix qspi node compatible ARM: dts: imx6q-prti6q: fix PHY address ARM: dts: vf610-zii-dev-rev-b: Fix MDIO over clocking arm: dts: imx6qdl-udoo: fix rgmii phy-mode for ksz9031 phy arm64: dts imx8mn: Remove non-existent USB OTG2 arm64: dts: imx8mm-beacon-som: Fix Choppy BT audio arm64: dts: fsl: DPAA FMan DMA operations are coherent arm64: dts: fsl: fix endianness issue of rcpm arm64: dts: imx8mn-evk: fix missing PMIC's interrupt line pull-up ... commit b5462cc377748181af2b05729c69f5faecec3717 Author: Zhang Xiaoxu Date: Mon Nov 16 09:35:40 2020 -0500 drm/i915/selftests: Fix wrong return value of perf_request_latency() If intel context create failed, the perf_request_latency() will return 0 rather than error, because we doesn't initialize the return value. Fixes: 25c26f18ea79 ("drm/i915/selftests: Measure dispatch latency") Reported-by: Hulk Robot Signed-off-by: Zhang Xiaoxu Reviewed-by: Mika Kuoppala Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201116143540.3648870-1-zhangxiaoxu5@huawei.com (cherry picked from commit 19384452052a1e0525e663bfbdd62ac1399bb647) Signed-off-by: Rodrigo Vivi commit 2106edbdfd15e37afa6c5225421b8036bf0e38ec Author: Zhang Xiaoxu Date: Mon Nov 16 09:41:12 2020 -0500 drm/i915/selftests: Fix wrong return value of perf_series_engines() If intel context create failed, the perf_series_engines() will return 0 rather than error, because we doesn't initialize the return value. Fixes: cbfd3a0c5a55 ("drm/i915/selftests: Add request throughput measurement to perf") Reported-by: Hulk Robot Signed-off-by: Zhang Xiaoxu Reviewed-by: Mika Kuoppala Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201116144112.3673011-1-zhangxiaoxu5@huawei.com (cherry picked from commit 01d708840c26c9532579677eaca942363a009fd5) Signed-off-by: Rodrigo Vivi commit 973dd87fa56ac943ce1060fd07244d7652115164 Author: Tvrtko Ursulin Date: Fri Nov 13 13:25:10 2020 +0000 drm/i915: Avoid memory leak with more than 16 workarounds on a list I forgot to free the old list when growing past 16 entries. Luckily, as much as I checked, none of the current platforms has more than 16 workarounds on a single list. Signed-off-by: Tvrtko Ursulin Fixes: 452420d22d5b ("drm/i915: Fuse per-context workaround handling with the common framework") Reported-by: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201113132510.2298483-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit 77c296966e866a795742a46fc52a218771894867) Signed-off-by: Rodrigo Vivi commit 85a12d7eb8fe449cf38f1aa9ead5ca744729a98f Author: Rodrigo Vivi Date: Wed Nov 11 09:09:36 2020 -0500 drm/i915/tgl: Fix Media power gate sequence. Some media power gates are disabled by default. commit 5d86923060fc ("drm/i915/tgl: Enable VD HCP/MFX sub-pipe power gating") tried to enable it, but it duplicated an existent register. So, the main PG setup sequences ended up overwriting it. So, let's now merge this to the main PG setup sequence. v2: (Chris): s/BIT/REG_BIT, remove useless comment, remove useless =0, use the right gt, remove rc6 sequence doubt from commit message. Fixes: 5d86923060fc ("drm/i915/tgl: Enable VD HCP/MFX sub-pipe power gating") Cc: Lucas De Marchi Cc: stable@vger.kernel.org#v5.5+ Cc: Dale B Stimson Signed-off-by: Rodrigo Vivi Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201111072859.1186070-1-rodrigo.vivi@intel.com (cherry picked from commit 695dc55b573985569259e18f8e6261a77924342b) Signed-off-by: Rodrigo Vivi commit a5698b3835f5990deef30fa5397cae563af3c68a Merge: a08f4523243c8 92e4dc8b05663 Author: Linus Torvalds Date: Mon Nov 16 15:02:33 2020 -0800 Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull Hyper-V fix from Wei Liu: "One patch from Chris to fix kexec on Hyper-V" * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: Drivers: hv: vmbus: Allow cleanup of VMBUS_CONNECT_CPU if disconnected commit a08f4523243c86fe35dec8c81c5ec50f721004ce Merge: 09162bc32c880 efd838fec17bd Author: Linus Torvalds Date: Mon Nov 16 14:58:23 2020 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull vhost fixes from Michael Tsirkin: "Fixes all over the place, most notably vhost scsi IO error fixes" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost scsi: Add support for LUN resets. vhost scsi: add lun parser helper vhost scsi: fix cmd completion race vhost scsi: alloc cmds per vq instead of session vhost: add helper to check if a vq has been setup vdpasim: fix "mac_pton" undefined error swiotlb: using SIZE_MAX needs limits.h included commit 794e442ca39e6c8d46003c430559bdb67a73690c Author: Raju Rangoju Date: Mon Nov 16 16:13:22 2020 +0530 MAINTAINERS: update cxgb4 and cxgb3 maintainer Update cxgb4 and cxgb3 driver maintainer Signed-off-by: Raju Rangoju Link: https://lore.kernel.org/r/20201116104322.3959-1-rajur@chelsio.com Signed-off-by: Jakub Kicinski commit c1609f0e2882095408708a80693e298a90f17904 Author: Alex Deucher Date: Mon Nov 16 10:10:52 2020 -0500 drm/amdgpu: remove experimental flag from arcturus This has been stable for a while. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2a1828e378c1b5ba1ff283ed8f8c5cc37bb391dc Author: Martin Blumenstingl Date: Sun Nov 15 17:57:57 2020 +0100 net: lantiq: Wait for the GPHY firmware to be ready A user reports (slightly shortened from the original message): libphy: lantiq,xrx200-mdio: probed mdio_bus 1e108000.switch-mii: MDIO device at address 17 is missing. gswip 1e108000.switch lan: no phy at 2 gswip 1e108000.switch lan: failed to connect to port 2: -19 lantiq,xrx200-net 1e10b308.eth eth0: error -19 setting up slave phy This is a single-port board using the internal Fast Ethernet PHY. The user reports that switching to PHY scanning instead of configuring the PHY within device-tree works around this issue. The documentation for the standalone variant of the PHY11G (which is probably very similar to what is used inside the xRX200 SoCs but having the firmware burnt onto that standalone chip in the factory) states that the PHY needs 300ms to be ready for MDIO communication after releasing the reset. Add a 300ms delay after initializing all GPHYs to ensure that the GPHY firmware had enough time to initialize and to appear on the MDIO bus. Unfortunately there is no (known) documentation on what the minimum time to wait after releasing the reset on an internal PHY so play safe and take the one for the external variant. Only wait after the last GPHY firmware is loaded to not slow down the initialization too much ( xRX200 has two GPHYs but newer SoCs have at least three GPHYs). Fixes: 14fceff4771e51 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200") Reviewed-by: Andrew Lunn Signed-off-by: Martin Blumenstingl Acked-by: Hauke Mehrtens Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20201115165757.552641-1-martin.blumenstingl@googlemail.com Signed-off-by: Jakub Kicinski commit 2acc3c1bc8e98bc66b1badec42e9ea205b4fcdaa Author: Wang Hai Date: Mon Nov 16 18:16:33 2020 +0800 selftests/bpf: Fix error return code in run_getsockopt_test() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 65b4414a05eb ("selftests/bpf: add sockopt test that exercises BPF_F_ALLOW_MULTI") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201116101633.64627-1-wanghai38@huawei.com commit 0abed7c69b956d135cb6d320c350b2adb213e7d8 Author: Jens Axboe Date: Mon Nov 16 13:36:24 2020 -0700 mm: never attempt async page lock if we've transferred data already We catch the case where we enter generic_file_buffered_read() with data already transferred, but we also need to be careful not to allow an async page lock if we're looping transferring data. If not, we could be returning -EIOCBQUEUED instead of the transferred amount, and it could result in double waitqueue additions as well. Cc: stable@vger.kernel.org # v5.9 Fixes: 1a0a7853b901 ("mm: support async buffered reads in generic_file_buffered_read()") Signed-off-by: Jens Axboe commit 1072460a1aabacf6ececda98acd3b5ecaad23fd2 Author: Cezary Rojewski Date: Mon Nov 16 14:33:29 2020 +0100 ASoC: Intel: catpt: Correct clock selection for dai trigger During stream start DSP firmware requires LPCS disabled as that moment in time is resource heavy. Currently high-clock is selected on start of second stream onwards while low-clock is re-selected before stream actually leaves RESUME state i.e. PAUSE_STREAM call. Fix this by always updating clock before RESUME_STREAM and directly after PAUSE_STREAM. Fixes: a126750fc865 ("ASoC: Intel: catpt: PCM operations") Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201116133332.8530-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit aa9e3fa4992d83acb7311fc86d11d0d53e7ffb8e Author: Cezary Rojewski Date: Mon Nov 16 14:33:28 2020 +0100 ASoC: Intel: catpt: Skip position update for unprepared streams Playing with very low period sizes may lead to timeouts when awaiting RESET_STREAM reply for offload streams. This is caused by NOTIFY_POSITION appearing in the middle of trigger(stop). Stream is unprepared during trigger(stop) where PAUSE_STREAM IPC gets invoked. However, all data that is already mixed in DSP firmware's mixer stream will still be played regardless of the pause. For offload streams, this means possibility for another NOTIFY_POSITION to process. Keep these notifications in check by only handling them when stream is in prepared state. Fixes: a126750fc865 ("ASoC: Intel: catpt: PCM operations") Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201116133332.8530-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit ac9978fcad3c5abc43cdd225441ce9459c36e16b Author: Zhihao Cheng Date: Mon Nov 16 22:18:36 2020 +0800 spi: cadence-quadspi: Fix error return code in cqspi_probe Fix to return the error code from devm_reset_control_get_optional_exclusive() instaed of 0 in cqspi_probe(). Fixes: 31fb632b5d43ca ("spi: Move cadence-quadspi driver to drivers/spi/") Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20201116141836.2970579-1-chengzhihao1@huawei.com Signed-off-by: Mark Brown commit bd6327fda2f3ded85b69b3c3125c99aaa51c7881 Author: Srinivasa Rao Mandadapu Date: Sun Nov 15 10:26:50 2020 +0530 ASoC: qcom: lpass-platform: Fix memory leak lpass_pcm_data is not freed in error paths. Free it in error paths to avoid memory leak. Fixes: 022d00ee0b55 ("ASoC: lpass-platform: Fix broken pcm data usage") Signed-off-by: Pavel Machek Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1605416210-14530-1-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 1bd7b0fc0165694897b7d2fb39751a07b98f6bf1 Author: Michael Sit Wei Hong Date: Mon Nov 16 14:19:01 2020 +0800 ASoC: Intel: KMB: Fix S24_LE configuration S24_LE is 24 bit audio in 32 bit container configuration Fixing the configuration to match the data arrangement of this audio format. Fixes: c5477e966728 ("ASoC: Intel: Add KeemBay platform driver") Signed-off-by: Michael Sit Wei Hong Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201116061905.32431-2-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown commit 854c57f02bc718b0653bc467073b4541b8155a36 Author: Ashish Kalra Date: Tue Nov 10 22:42:05 2020 +0000 KVM: SVM: Fix offset computation bug in __sev_dbg_decrypt(). Fix offset computation in __sev_dbg_decrypt() to include the source paddr before it is rounded down to be aligned to 16 bytes as required by SEV API. This fixes incorrect guest memory dumps observed when using qemu monitor. Signed-off-by: Ashish Kalra Message-Id: <20201110224205.29444-1-Ashish.Kalra@amd.com> Signed-off-by: Paolo Bonzini commit 728321e53045d2668bf2b8627a8d61bc2c480d3b Author: Alex Deucher Date: Fri Nov 13 02:21:19 2020 -0500 drm/amd/display: Add missing pflip irq for dcn2.0 If we have more than 4 displays we will run into dummy irq calls or flip timout issues. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 4fba15fbb8106e8db17f486d653484e64969eb87 Author: Aili Yao Date: Tue Nov 10 00:33:34 2020 -0800 ACPI, APEI, Fix error return value in apei_map_generic_address() From commit 6915564dc5a8 ("ACPI: OSL: Change the type of acpi_os_map_generic_address() return value"), acpi_os_map_generic_address() will return logical address or NULL for error, but for ACPI_ADR_SPACE_SYSTEM_IO case, it should be also return 0 as it's a normal case, but now it will return -ENXIO. So check it out for such case to avoid einj module initialization fail. Fixes: 6915564dc5a8 ("ACPI: OSL: Change the type of acpi_os_map_generic_address() return value") Cc: Reviewed-by: James Morse Tested-by: Tony Luck Signed-off-by: Aili Yao Signed-off-by: Rafael J. Wysocki commit 857524564eae8aefc3006a3d35139bb69ca53210 Author: Xie He Date: Sat Nov 14 03:10:29 2020 -0800 MAINTAINERS: Add Martin Schiller as a maintainer for the X.25 stack Martin Schiller is an active developer and reviewer for the X.25 code. His company is providing products based on the Linux X.25 stack. So he is a good candidate for maintainers of the X.25 code. The original maintainer of the X.25 network layer (Andrew Hendry) has not sent any email to the netdev mail list since 2013. So he is probably inactive now. Cc: Andrew Hendry Signed-off-by: Xie He Acked-by: Martin Schiller Link: https://lore.kernel.org/r/20201114111029.326972-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit d4d3c84d77e3dac68efecebdf488af8f4e156611 Merge: c887c9b9ca62c 6cbf1e960fa52 Author: Paolo Bonzini Date: Mon Nov 16 13:18:22 2020 -0500 Merge tag 'kvm-s390-master-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-master KVM: s390: Fixes for 5.10 - do not reset the global diag318 data for per-cpu reset - do not mark memory as protected too early commit 9d9e937b1c8be97b424e3e11938e183fcde905c0 Author: Georg Kohmann Date: Wed Nov 11 12:50:25 2020 +0100 ipv6/netfilter: Discard first fragment not including all headers Packets are processed even though the first fragment don't include all headers through the upper layer header. This breaks TAHI IPv6 Core Conformance Test v6LC.1.3.6. Referring to RFC8200 SECTION 4.5: "If the first fragment does not include all headers through an Upper-Layer header, then that fragment should be discarded and an ICMP Parameter Problem, Code 3, message should be sent to the source of the fragment, with the Pointer field set to zero." The fragment needs to be validated the same way it is done in commit 2efdaaaf883a ("IPv6: reply ICMP error if the first fragment don't include all headers") for ipv6. Wrap the validation into a common function, ipv6_frag_thdr_truncated() to check for truncation in the upper layer header. This validation does not fullfill all aspects of RFC 8200, section 4.5, but is at the moment sufficient to pass mentioned TAHI test. In netfilter, utilize the fragment offset returned by find_prev_fhdr() to let ipv6_frag_thdr_truncated() start it's traverse from the fragment header. Return 0 to drop the fragment in the netfilter. This is the same behaviour as used on other protocol errors in this function, e.g. when nf_ct_frag6_queue() returns -EPROTO. The Fragment will later be picked up by ipv6_frag_rcv() in reassembly.c. ipv6_frag_rcv() will then send an appropriate ICMP Parameter Problem message back to the source. References commit 2efdaaaf883a ("IPv6: reply ICMP error if the first fragment don't include all headers") Signed-off-by: Georg Kohmann Acked-by: Pablo Neira Ayuso Link: https://lore.kernel.org/r/20201111115025.28879-1-geokohma@cisco.com Signed-off-by: Jakub Kicinski commit 9215f6bb4705ffe205885411394732bfc439dee0 Author: Stanimir Varbanov Date: Sun Nov 1 13:35:52 2020 +0100 media: venus: pm_helpers: Fix kernel module reload After initial kernel module load during kernel boot and removing the module and try to load it again an Unable to handle kernel paging request is observed: Unable to handle kernel paging request at virtual address ffffa44f7416eae0 Mem abort info: ESR = 0x96000047 EC = 0x25: 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=000000008147c000 [ffffa44f7416eae0] pgd=000000017df9f003, p4d=000000017df9f003, pud=000000017df9e003, pmd=000000017df9b003, pte=0000000000000000 Internal error: Oops: 96000047 [#1] PREEMPT SMP Modules linked in: venus_core(+) snd_soc_wsa881x regmap_sdw af_alg snd_soc_wcd934x soundwire_qcom gpio_wcd934x q6asm_dai q6routing q6adm q6afe_dai snd_soc_hdmi_codec q6afe q6asm q6dsp_common q6cor display_connector rmtfs_mem drm ip_tables x_tables ipv6 [last unloaded: venus_core] CPU: 6 PID: 889 Comm: modprobe Tainted: G W 5.10.0-rc1+ #8 Hardware name: Thundercomm Dragonboard 845c (DT) pstate: 80400085 (Nzcv daIf +PAN -UAO -TCO BTYPE=--) pc : queued_spin_lock_slowpath+0x1dc/0x3c8 lr : do_raw_spin_lock+0xc0/0x118 sp : ffff8000142cb7b0 x29: ffff8000142cb7b0 x28: 0000000000000013 x27: ffffa44f72de5690 x26: 0000000000000003 x25: ffff17c2d00f8080 x24: ffff17c2c0d78010 x23: ffff17c2c0d4f700 x22: ffff17c2d00f8080 x21: 0000000000000000 x20: ffffa44f74148000 x19: ffff17c2c0d4f8f8 x18: 0000000000000000 x17: 0000000000000000 x16: ffffa44f7342f158 x15: 0000000000000040 x14: ffffa44f746e8320 x13: 0000000000000228 x12: 0000000000000020 x11: 0000000000000000 x10: 00000000001c0000 x9 : 0000000000000000 x8 : ffff17c33d746ac0 x7 : ffff17c2c109b000 x6 : ffffa44f7416eac0 x5 : ffff17c33d746ac0 x4 : 0000000000000000 x3 : ffff17c2c0d4f8f8 x2 : ffffa44f7416eae0 x1 : ffffa44f7416eae0 x0 : ffff17c33d746ac8 Call trace: queued_spin_lock_slowpath+0x1dc/0x3c8 do_raw_spin_lock+0xc0/0x118 _raw_spin_lock_irqsave+0x80/0x14c __pm_runtime_resume+0x38/0xb8 device_link_add+0x3b8/0x5d0 core_get_v4+0x268/0x2d8 [venus_core] venus_probe+0x108/0x458 [venus_core] platform_drv_probe+0x54/0xa8 really_probe+0xe4/0x3b0 driver_probe_device+0x58/0xb8 device_driver_attach+0x74/0x80 __driver_attach+0x58/0xe8 bus_for_each_dev+0x70/0xc0 driver_attach+0x24/0x30 bus_add_driver+0x150/0x1f8 driver_register+0x64/0x120 __platform_driver_register+0x48/0x58 qcom_venus_driver_init+0x20/0x1000 [venus_core] do_one_initcall+0x84/0x458 do_init_module+0x58/0x208 load_module+0x1ec0/0x26a8 __do_sys_finit_module+0xb8/0xf8 __arm64_sys_finit_module+0x20/0x30 el0_svc_common.constprop.0+0x7c/0x1c0 do_el0_svc+0x24/0x90 el0_sync_handler+0x180/0x188 el0_sync+0x174/0x180 Code: 91002100 8b0200c2 f861d884 aa0203e1 (f8246828) ---[ end trace f1f687c15fd6b2ca ]--- note: modprobe[889] exited with preempt_count 1 After revisit the OPP part of the code I found that OPP pmdomain is detached with direct call to dev_pm_domain_detach instead of OPP wraper for detaching pmdomains with OPP table. Correct this by calling the OPP dev_pm_opp_detach_genpd. Fixes: 9a538b83612c ('media: venus: core: Add support for opp tables/perf voting') Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit a7a20f721e812a52a62a00de20dcd0779fbb587f Author: Stanimir Varbanov Date: Tue Oct 27 10:19:36 2020 +0100 media: venus: venc: Fix setting of profile and level The profile and level in op_set_ctrl was recently changed but during v4l2_ctrl_handler_setup profile and level control values are mangled. Fixes: 435c53c3698f ("media: venus: venc: Use helper to set profile and level") Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 7953446d664783cdb040fa25de40a3b3e6d0f6f4 Merge: e2142ef266c8a da875fa5040b0 Author: Jakub Kicinski Date: Mon Nov 16 09:37:13 2020 -0800 Merge branch 'fix-usage-counter-leak-by-adding-a-general-sync-ops' Zhang Qilong says: ==================== Fix usage counter leak by adding a general sync ops In many case, we need to check return value of pm_runtime_get_sync, but it brings a trouble to the usage counter processing. Many callers forget to decrease the usage counter when it failed, which could resulted in reference leak. It has been discussed a lot[0][1]. So we add a function to deal with the usage counter for better coding and view. Then, we replace pm_runtime_resume_and_get with it in fec_main.c to avoid it. [0] https://lkml.org/lkml/2020/6/14/88 [1] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=178139 ==================== Link: https://lore.kernel.org/r/20201110092933.3342784-1-zhangqilong3@huawei.com Signed-off-by: Jakub Kicinski commit da875fa5040b0f951cb4bf7efbf59f6dcff44d3c Author: Zhang Qilong Date: Tue Nov 10 17:29:33 2020 +0800 net: fec: Fix reference count leak in fec series ops pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in reference count leak. Moreover, this device cannot enter the idle state and always stay busy or other non-idle state later. So we fixed it by replacing it with pm_runtime_resume_and_get. Fixes: 8fff755e9f8d0 ("net: fec: Ensure clocks are enabled while using mdio bus") Signed-off-by: Zhang Qilong Signed-off-by: Jakub Kicinski commit dd8088d5a8969dc2b42f71d7bc01c25c61a78066 Author: Zhang Qilong Date: Tue Nov 10 17:29:32 2020 +0800 PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter In many case, we need to check return value of pm_runtime_get_sync, but it brings a trouble to the usage counter processing. Many callers forget to decrease the usage counter when it failed, which could resulted in reference leak. It has been discussed a lot[0][1]. So we add a function to deal with the usage counter for better coding. [0]https://lkml.org/lkml/2020/6/14/88 [1]https://patchwork.ozlabs.org/project/linux-tegra/list/?series=178139 Signed-off-by: Zhang Qilong Acked-by: Rafael J. Wysocki Signed-off-by: Jakub Kicinski commit e773ca7da8beeca7f17fe4c9d1284a2b66839cc1 Author: Sugar Zhang Date: Sat Nov 14 11:55:06 2020 +0800 dmaengine: pl330: _prep_dma_memcpy: Fix wrong burst size Actually, burst size is equal to '1 << desc->rqcfg.brst_size'. we should use burst size, not desc->rqcfg.brst_size. dma memcpy performance on Rockchip RV1126 @ 1512MHz A7, 1056MHz LPDDR3, 200MHz DMA: dmatest: /# echo dma0chan0 > /sys/module/dmatest/parameters/channel /# echo 4194304 > /sys/module/dmatest/parameters/test_buf_size /# echo 8 > /sys/module/dmatest/parameters/iterations /# echo y > /sys/module/dmatest/parameters/norandom /# echo y > /sys/module/dmatest/parameters/verbose /# echo 1 > /sys/module/dmatest/parameters/run dmatest: dma0chan0-copy0: result #1: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000 dmatest: dma0chan0-copy0: result #2: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000 dmatest: dma0chan0-copy0: result #3: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000 dmatest: dma0chan0-copy0: result #4: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000 dmatest: dma0chan0-copy0: result #5: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000 dmatest: dma0chan0-copy0: result #6: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000 dmatest: dma0chan0-copy0: result #7: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000 dmatest: dma0chan0-copy0: result #8: 'test passed' with src_off=0x0 dst_off=0x0 len=0x400000 Before: dmatest: dma0chan0-copy0: summary 8 tests, 0 failures 48 iops 200338 KB/s (0) After this patch: dmatest: dma0chan0-copy0: summary 8 tests, 0 failures 179 iops 734873 KB/s (0) After this patch and increase dma clk to 400MHz: dmatest: dma0chan0-copy0: summary 8 tests, 0 failures 259 iops 1062929 KB/s (0) Signed-off-by: Sugar Zhang Link: https://lore.kernel.org/r/1605326106-55681-1-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Vinod Koul commit 4e7d4f295dee1feed96b2b0a31d80d673b5465e8 Author: Lukas Bulwahn Date: Fri Nov 13 09:12:48 2020 +0100 dmaengine: ioatdma: remove unused function missed during dma_v2 removal Commit 7f832645d0e5 ("dmaengine: ioatdma: remove ioatdma v2 registration") missed to remove dca2_tag_map_valid() during its removal. Hence, since then, dca2_tag_map_valid() is unused and make CC=clang W=1 warns: drivers/dma/ioat/dca.c:44:19: warning: unused function 'dca2_tag_map_valid' [-Wunused-function] So, remove this unused function and get rid of a -Wused-function warning. Signed-off-by: Lukas Bulwahn Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20201113081248.26416-1-lukas.bulwahn@gmail.com Signed-off-by: Vinod Koul commit 568beb27959b0515d325ea1c6cf211eed2d66740 Author: Ian Rogers Date: Fri Nov 13 10:20:53 2020 -0800 perf test: Avoid an msan warning in a copied stack. This fix is for a failure that occurred in the DWARF unwind perf test. Stack unwinders may probe memory when looking for frames. Memory sanitizer will poison and track uninitialized memory on the stack, and on the heap if the value is copied to the heap. This can lead to false memory sanitizer failures for the use of an uninitialized value. Avoid this problem by removing the poison on the copied stack. The full msan failure with track origins looks like: ==2168==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x559ceb10755b in handle_cfi elfutils/libdwfl/frame_unwind.c:648:8 #1 0x559ceb105448 in __libdwfl_frame_unwind elfutils/libdwfl/frame_unwind.c:741:4 #2 0x559ceb0ece90 in dwfl_thread_getframes elfutils/libdwfl/dwfl_frame.c:435:7 #3 0x559ceb0ec6b7 in get_one_thread_frames_cb elfutils/libdwfl/dwfl_frame.c:379:10 #4 0x559ceb0ec6b7 in get_one_thread_cb elfutils/libdwfl/dwfl_frame.c:308:17 #5 0x559ceb0ec6b7 in dwfl_getthreads elfutils/libdwfl/dwfl_frame.c:283:17 #6 0x559ceb0ec6b7 in getthread elfutils/libdwfl/dwfl_frame.c:354:14 #7 0x559ceb0ec6b7 in dwfl_getthread_frames elfutils/libdwfl/dwfl_frame.c:388:10 #8 0x559ceaff6ae6 in unwind__get_entries tools/perf/util/unwind-libdw.c:236:8 #9 0x559ceabc9dbc in test_dwarf_unwind__thread tools/perf/tests/dwarf-unwind.c:111:8 #10 0x559ceabca5cf in test_dwarf_unwind__compare tools/perf/tests/dwarf-unwind.c:138:26 #11 0x7f812a6865b0 in bsearch (libc.so.6+0x4e5b0) #12 0x559ceabca871 in test_dwarf_unwind__krava_3 tools/perf/tests/dwarf-unwind.c:162:2 #13 0x559ceabca926 in test_dwarf_unwind__krava_2 tools/perf/tests/dwarf-unwind.c:169:9 #14 0x559ceabca946 in test_dwarf_unwind__krava_1 tools/perf/tests/dwarf-unwind.c:174:9 #15 0x559ceabcae12 in test__dwarf_unwind tools/perf/tests/dwarf-unwind.c:211:8 #16 0x559ceabbc4ab in run_test tools/perf/tests/builtin-test.c:418:9 #17 0x559ceabbc4ab in test_and_print tools/perf/tests/builtin-test.c:448:9 #18 0x559ceabbac70 in __cmd_test tools/perf/tests/builtin-test.c:669:4 #19 0x559ceabbac70 in cmd_test tools/perf/tests/builtin-test.c:815:9 #20 0x559cea960e30 in run_builtin tools/perf/perf.c:313:11 #21 0x559cea95fbce in handle_internal_command tools/perf/perf.c:365:8 #22 0x559cea95fbce in run_argv tools/perf/perf.c:409:2 #23 0x559cea95fbce in main tools/perf/perf.c:539:3 Uninitialized value was stored to memory at #0 0x559ceb106acf in __libdwfl_frame_reg_set elfutils/libdwfl/frame_unwind.c:77:22 #1 0x559ceb106acf in handle_cfi elfutils/libdwfl/frame_unwind.c:627:13 #2 0x559ceb105448 in __libdwfl_frame_unwind elfutils/libdwfl/frame_unwind.c:741:4 #3 0x559ceb0ece90 in dwfl_thread_getframes elfutils/libdwfl/dwfl_frame.c:435:7 #4 0x559ceb0ec6b7 in get_one_thread_frames_cb elfutils/libdwfl/dwfl_frame.c:379:10 #5 0x559ceb0ec6b7 in get_one_thread_cb elfutils/libdwfl/dwfl_frame.c:308:17 #6 0x559ceb0ec6b7 in dwfl_getthreads elfutils/libdwfl/dwfl_frame.c:283:17 #7 0x559ceb0ec6b7 in getthread elfutils/libdwfl/dwfl_frame.c:354:14 #8 0x559ceb0ec6b7 in dwfl_getthread_frames elfutils/libdwfl/dwfl_frame.c:388:10 #9 0x559ceaff6ae6 in unwind__get_entries tools/perf/util/unwind-libdw.c:236:8 #10 0x559ceabc9dbc in test_dwarf_unwind__thread tools/perf/tests/dwarf-unwind.c:111:8 #11 0x559ceabca5cf in test_dwarf_unwind__compare tools/perf/tests/dwarf-unwind.c:138:26 #12 0x7f812a6865b0 in bsearch (libc.so.6+0x4e5b0) #13 0x559ceabca871 in test_dwarf_unwind__krava_3 tools/perf/tests/dwarf-unwind.c:162:2 #14 0x559ceabca926 in test_dwarf_unwind__krava_2 tools/perf/tests/dwarf-unwind.c:169:9 #15 0x559ceabca946 in test_dwarf_unwind__krava_1 tools/perf/tests/dwarf-unwind.c:174:9 #16 0x559ceabcae12 in test__dwarf_unwind tools/perf/tests/dwarf-unwind.c:211:8 #17 0x559ceabbc4ab in run_test tools/perf/tests/builtin-test.c:418:9 #18 0x559ceabbc4ab in test_and_print tools/perf/tests/builtin-test.c:448:9 #19 0x559ceabbac70 in __cmd_test tools/perf/tests/builtin-test.c:669:4 #20 0x559ceabbac70 in cmd_test tools/perf/tests/builtin-test.c:815:9 #21 0x559cea960e30 in run_builtin tools/perf/perf.c:313:11 #22 0x559cea95fbce in handle_internal_command tools/perf/perf.c:365:8 #23 0x559cea95fbce in run_argv tools/perf/perf.c:409:2 #24 0x559cea95fbce in main tools/perf/perf.c:539:3 Uninitialized value was stored to memory at #0 0x559ceb106a54 in handle_cfi elfutils/libdwfl/frame_unwind.c:613:9 #1 0x559ceb105448 in __libdwfl_frame_unwind elfutils/libdwfl/frame_unwind.c:741:4 #2 0x559ceb0ece90 in dwfl_thread_getframes elfutils/libdwfl/dwfl_frame.c:435:7 #3 0x559ceb0ec6b7 in get_one_thread_frames_cb elfutils/libdwfl/dwfl_frame.c:379:10 #4 0x559ceb0ec6b7 in get_one_thread_cb elfutils/libdwfl/dwfl_frame.c:308:17 #5 0x559ceb0ec6b7 in dwfl_getthreads elfutils/libdwfl/dwfl_frame.c:283:17 #6 0x559ceb0ec6b7 in getthread elfutils/libdwfl/dwfl_frame.c:354:14 #7 0x559ceb0ec6b7 in dwfl_getthread_frames elfutils/libdwfl/dwfl_frame.c:388:10 #8 0x559ceaff6ae6 in unwind__get_entries tools/perf/util/unwind-libdw.c:236:8 #9 0x559ceabc9dbc in test_dwarf_unwind__thread tools/perf/tests/dwarf-unwind.c:111:8 #10 0x559ceabca5cf in test_dwarf_unwind__compare tools/perf/tests/dwarf-unwind.c:138:26 #11 0x7f812a6865b0 in bsearch (libc.so.6+0x4e5b0) #12 0x559ceabca871 in test_dwarf_unwind__krava_3 tools/perf/tests/dwarf-unwind.c:162:2 #13 0x559ceabca926 in test_dwarf_unwind__krava_2 tools/perf/tests/dwarf-unwind.c:169:9 #14 0x559ceabca946 in test_dwarf_unwind__krava_1 tools/perf/tests/dwarf-unwind.c:174:9 #15 0x559ceabcae12 in test__dwarf_unwind tools/perf/tests/dwarf-unwind.c:211:8 #16 0x559ceabbc4ab in run_test tools/perf/tests/builtin-test.c:418:9 #17 0x559ceabbc4ab in test_and_print tools/perf/tests/builtin-test.c:448:9 #18 0x559ceabbac70 in __cmd_test tools/perf/tests/builtin-test.c:669:4 #19 0x559ceabbac70 in cmd_test tools/perf/tests/builtin-test.c:815:9 #20 0x559cea960e30 in run_builtin tools/perf/perf.c:313:11 #21 0x559cea95fbce in handle_internal_command tools/perf/perf.c:365:8 #22 0x559cea95fbce in run_argv tools/perf/perf.c:409:2 #23 0x559cea95fbce in main tools/perf/perf.c:539:3 Uninitialized value was stored to memory at #0 0x559ceaff8800 in memory_read tools/perf/util/unwind-libdw.c:156:10 #1 0x559ceb10f053 in expr_eval elfutils/libdwfl/frame_unwind.c:501:13 #2 0x559ceb1060cc in handle_cfi elfutils/libdwfl/frame_unwind.c:603:18 #3 0x559ceb105448 in __libdwfl_frame_unwind elfutils/libdwfl/frame_unwind.c:741:4 #4 0x559ceb0ece90 in dwfl_thread_getframes elfutils/libdwfl/dwfl_frame.c:435:7 #5 0x559ceb0ec6b7 in get_one_thread_frames_cb elfutils/libdwfl/dwfl_frame.c:379:10 #6 0x559ceb0ec6b7 in get_one_thread_cb elfutils/libdwfl/dwfl_frame.c:308:17 #7 0x559ceb0ec6b7 in dwfl_getthreads elfutils/libdwfl/dwfl_frame.c:283:17 #8 0x559ceb0ec6b7 in getthread elfutils/libdwfl/dwfl_frame.c:354:14 #9 0x559ceb0ec6b7 in dwfl_getthread_frames elfutils/libdwfl/dwfl_frame.c:388:10 #10 0x559ceaff6ae6 in unwind__get_entries tools/perf/util/unwind-libdw.c:236:8 #11 0x559ceabc9dbc in test_dwarf_unwind__thread tools/perf/tests/dwarf-unwind.c:111:8 #12 0x559ceabca5cf in test_dwarf_unwind__compare tools/perf/tests/dwarf-unwind.c:138:26 #13 0x7f812a6865b0 in bsearch (libc.so.6+0x4e5b0) #14 0x559ceabca871 in test_dwarf_unwind__krava_3 tools/perf/tests/dwarf-unwind.c:162:2 #15 0x559ceabca926 in test_dwarf_unwind__krava_2 tools/perf/tests/dwarf-unwind.c:169:9 #16 0x559ceabca946 in test_dwarf_unwind__krava_1 tools/perf/tests/dwarf-unwind.c:174:9 #17 0x559ceabcae12 in test__dwarf_unwind tools/perf/tests/dwarf-unwind.c:211:8 #18 0x559ceabbc4ab in run_test tools/perf/tests/builtin-test.c:418:9 #19 0x559ceabbc4ab in test_and_print tools/perf/tests/builtin-test.c:448:9 #20 0x559ceabbac70 in __cmd_test tools/perf/tests/builtin-test.c:669:4 #21 0x559ceabbac70 in cmd_test tools/perf/tests/builtin-test.c:815:9 #22 0x559cea960e30 in run_builtin tools/perf/perf.c:313:11 #23 0x559cea95fbce in handle_internal_command tools/perf/perf.c:365:8 #24 0x559cea95fbce in run_argv tools/perf/perf.c:409:2 #25 0x559cea95fbce in main tools/perf/perf.c:539:3 Uninitialized value was stored to memory at #0 0x559cea9027d9 in __msan_memcpy llvm/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1558:3 #1 0x559cea9d2185 in sample_ustack tools/perf/arch/x86/tests/dwarf-unwind.c:41:2 #2 0x559cea9d202c in test__arch_unwind_sample tools/perf/arch/x86/tests/dwarf-unwind.c:72:9 #3 0x559ceabc9cbd in test_dwarf_unwind__thread tools/perf/tests/dwarf-unwind.c:106:6 #4 0x559ceabca5cf in test_dwarf_unwind__compare tools/perf/tests/dwarf-unwind.c:138:26 #5 0x7f812a6865b0 in bsearch (libc.so.6+0x4e5b0) #6 0x559ceabca871 in test_dwarf_unwind__krava_3 tools/perf/tests/dwarf-unwind.c:162:2 #7 0x559ceabca926 in test_dwarf_unwind__krava_2 tools/perf/tests/dwarf-unwind.c:169:9 #8 0x559ceabca946 in test_dwarf_unwind__krava_1 tools/perf/tests/dwarf-unwind.c:174:9 #9 0x559ceabcae12 in test__dwarf_unwind tools/perf/tests/dwarf-unwind.c:211:8 #10 0x559ceabbc4ab in run_test tools/perf/tests/builtin-test.c:418:9 #11 0x559ceabbc4ab in test_and_print tools/perf/tests/builtin-test.c:448:9 #12 0x559ceabbac70 in __cmd_test tools/perf/tests/builtin-test.c:669:4 #13 0x559ceabbac70 in cmd_test tools/perf/tests/builtin-test.c:815:9 #14 0x559cea960e30 in run_builtin tools/perf/perf.c:313:11 #15 0x559cea95fbce in handle_internal_command tools/perf/perf.c:365:8 #16 0x559cea95fbce in run_argv tools/perf/perf.c:409:2 #17 0x559cea95fbce in main tools/perf/perf.c:539:3 Uninitialized value was created by an allocation of 'bf' in the stack frame of function 'perf_event__synthesize_mmap_events' #0 0x559ceafc5f60 in perf_event__synthesize_mmap_events tools/perf/util/synthetic-events.c:445 SUMMARY: MemorySanitizer: use-of-uninitialized-value elfutils/libdwfl/frame_unwind.c:648:8 in handle_cfi Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: clang-built-linux@googlegroups.com Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sandeep Dasgupta Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201113182053.754625-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8326be9f1c0bb498baf134878a8deb8a952e0135 Author: Dave Jiang Date: Wed Nov 11 15:23:46 2020 -0700 dmaengine: idxd: fix mapping of portal size Portal size is 4k. Current code is mapping all 4 portals in a single chunk. Restrict the mapped portal size to a single portal to ensure that submission only goes to the intended portal address. Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/160513342642.510187.16450549281618747065.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 1c756cd429d8f3da33d31f2a970284b9d5260534 Author: Al Grant Date: Fri Nov 13 20:38:26 2020 +0000 perf inject: Fix file corruption due to event deletion "perf inject" can create corrupt files when synthesizing sample events from AUX data. This happens when in the input file, the first event (for the AUX data) has a different sample_type from the second event (generally dummy). Specifically, they differ in the bits that indicate the standard fields appended to perf records in the mmap buffer. "perf inject" deletes the first event and moves up the second event to first position. The problem is with the synthetic PERF_RECORD_MMAP (etc.) events created by "perf record". Since these are synthetic versions of events which are normally produced by the kernel, they have to have the standard fields appended as described by sample_type. "perf record" fills these in with zeroes, including the IDENTIFIER field; perf readers interpret records with zero IDENTIFIER using the descriptor for the first event in the file. Since "perf inject" changes the first event, these synthetic records are then processed with the wrong value of sample_type, and the perf reader reads bad data, reports on incorrect length records etc. Mismatching sample_types are seen with "perf record -e cs_etm//", where the AUX event has TID|TIME|CPU|IDENTIFIER and the dummy event has TID|TIME|IDENTIFIER. Perhaps they could be the same, but it isn't normally a problem if they aren't - perf has no problems reading the file. The sample_types have to agree on the position of IDENTIFIER, because that's how perf finds the right event descriptor in the first place, but they don't normally have to agree on other fields, and perf doesn't check that they do. The problem is specific to the way "perf inject" reorganizes the events and the way synthetic MMAP events are recorded with a zero identifier. A simple solution is to stop "perf inject" deleting the tracing event. Committer testing Removed the now unused 'evsel' variable, update the comment about the evsel removal not being performed anymore, and apply the patch manually as it failed with this warning: warning: Patch sent with format=flowed; space at the end of lines might be lost. Testing it with: $ perf bench internals inject-build-id # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 8.543 msec (+- 0.130 msec) Average time per event: 0.838 usec (+- 0.013 usec) Average memory usage: 12717 KB (+- 9 KB) Average build-id-all injection took: 5.710 msec (+- 0.058 msec) Average time per event: 0.560 usec (+- 0.006 usec) Average memory usage: 12079 KB (+- 7 KB) $ Signed-off-by: Al Grant Acked-by: Adrian Hunter Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra LPU-Reference: b9cf5611-daae-2390-3439-6617f8f0a34b@foss.arm.com Signed-off-by: Arnaldo Carvalho de Melo commit cc05af8e2e91339bee6181a1001384d519d59ec5 Merge: 39c8d39c04bb8 33d0d843872c5 Author: Arnd Bergmann Date: Mon Nov 16 17:05:00 2020 +0100 Merge tag 'imx-fixes-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.10, round 4: - Fix MDIO over clocking on vf610-zii-dev-rev-b board to get switch device work reliably. - Fix imx50-evk IOMUX for the chip select 1 to use GPIO4_13 instead of the native CSPI_SSI function. - Fix voltage for 1.6GHz CPU operating point on i.MX8MM to match hardware datasheet. - Fix phy-mode for KSZ9031 PHY on imx6qdl-udoo board. * tag 'imx-fixes-5.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx50-evk: Fix the chip select 1 IOMUX arm64: dts: imx8mm: fix voltage for 1.6GHz CPU operating point ARM: dts: vf610-zii-dev-rev-b: Fix MDIO over clocking arm: dts: imx6qdl-udoo: fix rgmii phy-mode for ksz9031 phy Link: https://lore.kernel.org/r/20201116090702.GM5849@dragon Signed-off-by: Arnd Bergmann commit 39c8d39c04bb821beaa81aeda4839475313727d7 Merge: b57d5437e3740 7de8bfaa095fc Author: Arnd Bergmann Date: Mon Nov 16 17:04:09 2020 +0100 Merge tag 'renesas-fixes-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes Renesas fixes for v5.10 - Add missing audio clock on RZ/G2H. * tag 'renesas-fixes-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: r8a774e1: Add missing audio_clk_b Link: https://lore.kernel.org/r/20201113151229.3924165-1-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit cef397038167ac15d085914493d6c86385773709 Author: Arnd Bergmann Date: Wed Nov 11 17:52:58 2020 +0100 arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed Stefan Agner reported a bug when using zsram on 32-bit Arm machines with RAM above the 4GB address boundary: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = a27bd01c [00000000] *pgd=236a0003, *pmd=1ffa64003 Internal error: Oops: 207 [#1] SMP ARM Modules linked in: mdio_bcm_unimac(+) brcmfmac cfg80211 brcmutil raspberrypi_hwmon hci_uart crc32_arm_ce bcm2711_thermal phy_generic genet CPU: 0 PID: 123 Comm: mkfs.ext4 Not tainted 5.9.6 #1 Hardware name: BCM2711 PC is at zs_map_object+0x94/0x338 LR is at zram_bvec_rw.constprop.0+0x330/0xa64 pc : [] lr : [] psr: 60000013 sp : e376bbe0 ip : 00000000 fp : c1e2921c r10: 00000002 r9 : c1dda730 r8 : 00000000 r7 : e8ff7a00 r6 : 00000000 r5 : 02f9ffa0 r4 : e3710000 r3 : 000fdffe r2 : c1e0ce80 r1 : ebf979a0 r0 : 00000000 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 30c5383d Table: 235c2a80 DAC: fffffffd Process mkfs.ext4 (pid: 123, stack limit = 0x495a22e6) Stack: (0xe376bbe0 to 0xe376c000) As it turns out, zsram needs to know the maximum memory size, which is defined in MAX_PHYSMEM_BITS when CONFIG_SPARSEMEM is set, or in MAX_POSSIBLE_PHYSMEM_BITS on the x86 architecture. The same problem will be hit on all 32-bit architectures that have a physical address space larger than 4GB and happen to not enable sparsemem and include asm/sparsemem.h from asm/pgtable.h. After the initial discussion, I suggested just always defining MAX_POSSIBLE_PHYSMEM_BITS whenever CONFIG_PHYS_ADDR_T_64BIT is set, or provoking a build error otherwise. This addresses all configurations that can currently have this runtime bug, but leaves all other configurations unchanged. I looked up the possible number of bits in source code and datasheets, here is what I found: - on ARC, CONFIG_ARC_HAS_PAE40 controls whether 32 or 40 bits are used - on ARM, CONFIG_LPAE enables 40 bit addressing, without it we never support more than 32 bits, even though supersections in theory allow up to 40 bits as well. - on MIPS, some MIPS32r1 or later chips support 36 bits, and MIPS32r5 XPA supports up to 60 bits in theory, but 40 bits are more than anyone will ever ship - On PowerPC, there are three different implementations of 36 bit addressing, but 32-bit is used without CONFIG_PTE_64BIT - On RISC-V, the normal page table format can support 34 bit addressing. There is no highmem support on RISC-V, so anything above 2GB is unused, but it might be useful to eventually support CONFIG_ZRAM for high pages. Fixes: 61989a80fb3a ("staging: zsmalloc: zsmalloc memory allocation library") Fixes: 02390b87a945 ("mm/zsmalloc: Prepare to variable MAX_PHYSMEM_BITS") Acked-by: Thomas Bogendoerfer Reviewed-by: Stefan Agner Tested-by: Stefan Agner Acked-by: Mike Rapoport Link: https://lore.kernel.org/linux-mm/bdfa44bf1c570b05d6c70898e2bbb0acf234ecdf.1604762181.git.stefan@agner.ch/ Signed-off-by: Arnd Bergmann commit e2142ef266c8a25e635ae4319254d7c01c84deb7 Merge: 849920c703392 a584e9bc1b7e8 Author: Jakub Kicinski Date: Mon Nov 16 07:34:30 2020 -0800 Merge tag 'linux-can-fixes-for-5.10-20201115' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2020-11-15 Anant Thazhemadam contributed two patches for the AF_CAN that prevent potential access of uninitialized member in can_rcv() and canfd_rcv(). The next patch is by Alejandro Concepcion Rodriguez and changes can_restart() to use the correct function to push a skb into the networking stack from process context. Zhang Qilong's patch fixes a memory leak in the error path of the ti_hecc's probe function. A patch by me fixes mcba_usb_start_xmit() function in the mcba_usb driver, to first fill the skb and then pass it to can_put_echo_skb(). Colin Ian King's patch fixes a potential integer overflow on shift in the peak_usb driver. The next two patches target the flexcan driver, a patch by me adds the missing "req_bit" to the stop mode property comment (which was broken during net-next for v5.10). Zhang Qilong's patch fixes the failure handling of pm_runtime_get_sync(). The next seven patches target the m_can driver including the tcan4x5x spi driver glue code. Enric Balletbo i Serra's patch for the tcan4x5x Kconfig fix the REGMAP_SPI dependency handling. A patch by me for the tcan4x5x driver's probe() function adds missing error handling to for devm_regmap_init(), and in tcan4x5x_can_remove() the order of deregistration is fixed. Wu Bo's patch for the m_can driver fixes the state change handling in m_can_handle_state_change(). Two patches by Dan Murphy first introduce m_can_class_free_dev() and then make use of it to fix the freeing of the can device. A patch by Faiz Abbas add a missing shutdown of the CAN controller in the m_can_stop() function. * tag 'linux-can-fixes-for-5.10-20201115' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: m_can: m_can_stop(): set device to software init mode before closing can: m_can: Fix freeing of can device from peripherials can: m_can: m_can_class_free_dev(): introduce new function can: m_can: m_can_handle_state_change(): fix state change can: tcan4x5x: tcan4x5x_can_remove(): fix order of deregistration can: tcan4x5x: tcan4x5x_can_probe(): add missing error checking for devm_regmap_init() can: tcan4x5x: replace depends on REGMAP_SPI with depends on SPI can: flexcan: fix failure handling of pm_runtime_get_sync() can: flexcan: flexcan_setup_stop_mode(): add missing "req_bit" to stop mode property comment can: peak_usb: fix potential integer overflow on shift of a int can: mcba_usb: mcba_usb_start_xmit(): first fill skb, then pass to can_put_echo_skb() can: ti_hecc: Fix memleak in ti_hecc_probe can: dev: can_restart(): post buffer from the right context can: af_can: prevent potential access of uninitialized member in canfd_rcv() can: af_can: prevent potential access of uninitialized member in can_rcv() ==================== Link: https://lore.kernel.org/r/20201115174131.2089251-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 6f117cb854a44a79898d844e6ae3fd23bd94e786 Author: Stefan Haberland Date: Mon Nov 16 16:23:47 2020 +0100 s390/dasd: fix null pointer dereference for ERP requests When requeueing all requests on the device request queue to the blocklayer we might get to an ERP (error recovery) request that is a copy of an original CQR. Those requests do not have blocklayer request information or a pointer to the dasd_queue set. When trying to access those data it will lead to a null pointer dereference in dasd_requeue_all_requests(). Fix by checking if the request is an ERP request that can simply be ignored. The blocklayer request will be requeued by the original CQR that is on the device queue right behind the ERP request. Fixes: 9487cfd3430d ("s390/dasd: fix handling of internal requests") Cc: #4.16 Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Signed-off-by: Jens Axboe commit d78359b25f7c6759a23189145be8141b6fdfe385 Author: Kai Vehmanen Date: Mon Nov 16 16:19:55 2020 +0200 ALSA: hda: Add Alderlake-S PCI ID and HDMI codec vid Add HD Audio PCI ID and HDMI codec vendor ID for Intel Alder Lake. Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201116141955.2091240-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 7dc7a8b04f3da8aa3c3be514e155e2fa094e976f Author: Guenter Roeck Date: Tue Nov 10 15:52:01 2020 -0800 ACPI: fan: Initialize performance state sysfs attribute The following warning is reported if lock debugging is enabled. DEBUG_LOCKS_WARN_ON(1) WARNING: CPU: 1 PID: 1 at kernel/locking/lockdep.c:4617 lockdep_init_map_waits+0x141/0x222 ... Call Trace: __kernfs_create_file+0x7a/0xd8 sysfs_add_file_mode_ns+0x135/0x189 sysfs_create_file_ns+0x70/0xa0 acpi_fan_probe+0x547/0x621 platform_drv_probe+0x67/0x8b ... Dynamically allocated sysfs attributes need to be initialized to avoid the warning. Fixes: d19e470b6605 ("ACPI: fan: Expose fan performance state information") Signed-off-by: Guenter Roeck Cc: 5.6+ # 5.6+ Signed-off-by: Rafael J. Wysocki commit 8986f223bd777a73119f5d593c15b4d630ff49bb Author: Thomas Gleixner Date: Mon Nov 16 13:52:47 2020 +0100 iommu/vt-d: Take CONFIG_PCI_ATS into account pci_dev::physfn is only available when CONFIG_PCI_ATS is set. The recent fix for the irqdomain rework missed that dependency which makes the build fail when CONFIG_PCI_ATS=n. Add the necessary #ifdeffery. Reported-by: Geert Uytterhoeven Fixes: ff828729be44 ("iommu/vt-d: Cure VF irqdomain hickup") Signed-off-by: Thomas Gleixner Cc: Joerg Roedel commit 75b49620267c700f0a07fec7f27f69852db70e46 Author: Cédric Le Goater Date: Thu Nov 5 14:47:13 2020 +0100 KVM: PPC: Book3S HV: XIVE: Fix possible oops when accessing ESB page When accessing the ESB page of a source interrupt, the fault handler will retrieve the page address from the XIVE interrupt 'xive_irq_data' structure. If the associated KVM XIVE interrupt is not valid, that is not allocated at the HW level for some reason, the fault handler will dereference a NULL pointer leading to the oops below : WARNING: CPU: 40 PID: 59101 at arch/powerpc/kvm/book3s_xive_native.c:259 xive_native_esb_fault+0xe4/0x240 [kvm] CPU: 40 PID: 59101 Comm: qemu-system-ppc Kdump: loaded Tainted: G W --------- - - 4.18.0-240.el8.ppc64le #1 NIP: c00800000e949fac LR: c00000000044b164 CTR: c00800000e949ec8 REGS: c000001f69617840 TRAP: 0700 Tainted: G W --------- - - (4.18.0-240.el8.ppc64le) MSR: 9000000000029033 CR: 44044282 XER: 00000000 CFAR: c00000000044b160 IRQMASK: 0 GPR00: c00000000044b164 c000001f69617ac0 c00800000e96e000 c000001f69617c10 GPR04: 05faa2b21e000080 0000000000000000 0000000000000005 ffffffffffffffff GPR08: 0000000000000000 0000000000000001 0000000000000000 0000000000000001 GPR12: c00800000e949ec8 c000001ffffd3400 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 0000000000000000 c000001f5c065160 c000000001c76f90 GPR24: c000001f06f20000 c000001f5c065100 0000000000000008 c000001f0eb98c78 GPR28: c000001dcab40000 c000001dcab403d8 c000001f69617c10 0000000000000011 NIP [c00800000e949fac] xive_native_esb_fault+0xe4/0x240 [kvm] LR [c00000000044b164] __do_fault+0x64/0x220 Call Trace: [c000001f69617ac0] [0000000137a5dc20] 0x137a5dc20 (unreliable) [c000001f69617b50] [c00000000044b164] __do_fault+0x64/0x220 [c000001f69617b90] [c000000000453838] do_fault+0x218/0x930 [c000001f69617bf0] [c000000000456f50] __handle_mm_fault+0x350/0xdf0 [c000001f69617cd0] [c000000000457b1c] handle_mm_fault+0x12c/0x310 [c000001f69617d10] [c00000000007ef44] __do_page_fault+0x264/0xbb0 [c000001f69617df0] [c00000000007f8c8] do_page_fault+0x38/0xd0 [c000001f69617e30] [c00000000000a714] handle_page_fault+0x18/0x38 Instruction dump: 40c2fff0 7c2004ac 2fa90000 409e0118 73e90001 41820080 e8bd0008 7c2004ac 7ca90074 39400000 915c0000 7929d182 <0b090000> 2fa50000 419e0080 e89e0018 ---[ end trace 66c6ff034c53f64f ]--- xive-kvm: xive_native_esb_fault: accessing invalid ESB page for source 8 ! Fix that by checking the validity of the KVM XIVE interrupt structure. Fixes: 6520ca64cde7 ("KVM: PPC: Book3S HV: XIVE: Add a mapping for the source ESB pages") Cc: stable@vger.kernel.org # v5.2+ Reported-by: Greg Kurz Signed-off-by: Cédric Le Goater Tested-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201105134713.656160-1-clg@kaod.org commit c39de538a06e76d89b7e598a71e16688009cd56c Author: Dmitry Osipenko Date: Wed Nov 4 16:21:26 2020 +0300 cpuidle: tegra: Annotate tegra_pm_set_cpu_in_lp2() with RCU_NONIDLE Annotate tegra_pm_set[clear]_cpu_in_lp2() with RCU_NONIDLE in order to fix lockdep warning about suspicious RCU usage of a spinlock during late idling phase. WARNING: suspicious RCU usage ... include/trace/events/lock.h:13 suspicious rcu_dereference_check() usage! ... (dump_stack) from (lock_acquire) (lock_acquire) from (_raw_spin_lock) (_raw_spin_lock) from (tegra_pm_set_cpu_in_lp2) (tegra_pm_set_cpu_in_lp2) from (tegra_cpuidle_enter) (tegra_cpuidle_enter) from (cpuidle_enter_state) (cpuidle_enter_state) from (cpuidle_enter_state_coupled) (cpuidle_enter_state_coupled) from (cpuidle_enter) (cpuidle_enter) from (do_idle) ... Tested-by: Peter Geis Reported-by: Peter Geis Signed-off-by: Dmitry Osipenko Signed-off-by: Rafael J. Wysocki commit 3a860d165eb5f4d7cf0bf81ef6a5b5c5e1754422 Author: Max Filippov Date: Mon Nov 16 01:38:59 2020 -0800 xtensa: disable preemption around cache alias management calls Although cache alias management calls set up and tear down TLB entries and fast_second_level_miss is able to restore TLB entry should it be evicted they absolutely cannot preempt each other because they use the same TLBTEMP area for different purposes. Disable preemption around all cache alias management calls to enforce that. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov commit 481535c5b41d191b22775a6873de5ec0e1cdced1 Author: Max Filippov Date: Mon Nov 16 01:25:56 2020 -0800 xtensa: fix TLBTEMP area placement fast_second_level_miss handler for the TLBTEMP area has an assumption that page table directory entry for the TLBTEMP address range is 0. For it to be true the TLBTEMP area must be aligned to 4MB boundary and not share its 4MB region with anything that may use a page table. This is not true currently: TLBTEMP shares space with vmalloc space which results in the following kinds of runtime errors when fast_second_level_miss loads page table directory entry for the vmalloc space instead of fixing up the TLBTEMP area: Unable to handle kernel paging request at virtual address c7ff0e00 pc = d0009275, ra = 90009478 Oops: sig: 9 [#1] PREEMPT CPU: 1 PID: 61 Comm: kworker/u9:2 Not tainted 5.10.0-rc3-next-20201110-00007-g1fe4962fa983-dirty #58 Workqueue: xprtiod xs_stream_data_receive_workfn a00: 90009478 d11e1dc0 c7ff0e00 00000020 c7ff0000 00000001 7f8b8107 00000000 a08: 900c5992 d11e1d90 d0cc88b8 5506e97c 00000000 5506e97c d06c8074 d11e1d90 pc: d0009275, ps: 00060310, depc: 00000014, excvaddr: c7ff0e00 lbeg: d0009275, lend: d0009287 lcount: 00000003, sar: 00000010 Call Trace: xs_stream_data_receive_workfn+0x43c/0x770 process_one_work+0x1a1/0x324 worker_thread+0x1cc/0x3c0 kthread+0x10d/0x124 ret_from_kernel_thread+0xc/0x18 Cc: stable@vger.kernel.org Signed-off-by: Max Filippov commit 5f714771d01e0e0d410f06d4d192fb27b1ca0edd Author: Andy Shevchenko Date: Thu Nov 12 21:03:01 2020 +0200 pinctrl: baytrail: Avoid clearing debounce value when turning it off Baytrail pin control has a common register to set up debounce timeout. When a pin configuration requested debounce to be disabled, the rest of the pins may still want to have debounce enabled and thus rely on the common timeout value. Avoid clearing debounce value when turning it off for one pin while others may still use it. Fixes: 658b476c742f ("pinctrl: baytrail: Add debounce configuration") Depends-on: 04ff5a095d66 ("pinctrl: baytrail: Rectify debounce support") Depends-on: 827e1579e1d5 ("pinctrl: baytrail: Rectify debounce support (part 2)") Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 03a61f11c00213394e3c7ac62ae416d034dc728f Author: Andy Shevchenko Date: Wed Nov 11 14:06:05 2020 +0200 pinctrl: merrifield: Set default bias in case no particular value given When GPIO library asks pin control to set the bias, it doesn't pass any value of it and argument is considered boolean (and this is true for ACPI GpioIo() / GpioInt() resources, by the way). Thus, individual drivers must behave well, when they got the resistance value of 1 Ohm, i.e. transforming it to sane default. In case of Intel Merrifield pin control hardware the 20 kOhm sounds plausible because it gives a good trade off between weakness and minimization of leakage current (will be only 50 uA with the above choice). Fixes: 4e80c8f50574 ("pinctrl: intel: Add Intel Merrifield pin controller support") Depends-on: 2956b5d94a76 ("pinctrl / gpio: Introduce .set_config() callback for GPIO chips") Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit cdd8fc2dd64e3f1b22a6636e242d0eff49c4ba22 Author: Evan Green Date: Wed Nov 11 15:17:28 2020 -0800 pinctrl: jasperlake: Fix HOSTSW_OWN offset GPIOs that attempt to use interrupts get thwarted with a message like: "pin 161 cannot be used as IRQ" (for instance with SD_CD). This is because the HOSTSW_OWN offset is incorrect, so every GPIO looks like it's owned by ACPI. Fixes: e278dcb7048b1 ("pinctrl: intel: Add Intel Jasper Lake pin controller support") Cc: stable@vger.kernel.org Signed-off-by: Evan Green Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 59024c936561090d766370e839a880dd42232c33 Author: Andy Shevchenko Date: Tue Nov 10 21:59:23 2020 +0200 pinctrl: jasperlake: Unhide SPI group of pins If the group of pins is hidden in the pin list it affects the register offset calculation despite fixed GPIO base. Hence, the offsets of all pins after the hidden group are broken. Instead we have to unhide the group and use a flag to exclude it from GPIO number space. Fixes: e278dcb7048b ("pinctrl: intel: Add Intel Jasper Lake pin controller support") Reported-by: Divagar Mohandass Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 7bab16a6075b7b94999666355ab532c3dabb94f9 Author: Jamie Iles Date: Fri Nov 13 15:04:06 2020 +0000 KVM: arm64: Correctly align nVHE percpu data The nVHE percpu data is partially linked but the nVHE linker script did not align the percpu section. The PERCPU_INPUT macro would then align the data to a page boundary: #define PERCPU_INPUT(cacheline) \ __per_cpu_start = .; \ *(.data..percpu..first) \ . = ALIGN(PAGE_SIZE); \ *(.data..percpu..page_aligned) \ . = ALIGN(cacheline); \ *(.data..percpu..read_mostly) \ . = ALIGN(cacheline); \ *(.data..percpu) \ *(.data..percpu..shared_aligned) \ PERCPU_DECRYPTED_SECTION \ __per_cpu_end = .; but then when the final vmlinux linking happens the hypervisor percpu data is included after page alignment and so the offsets potentially don't match. On my build I saw that the .hyp.data..percpu section was at address 0x20 and then the percpu data would begin at 0x1000 (because of the page alignment in PERCPU_INPUT), but when linked into vmlinux, everything would be shifted down by 0x20 bytes. This manifests as one of the CPUs getting lost when running kvm-unit-tests or starting any VM and subsequent soft lockup on a Cortex A72 device. Fixes: 30c953911c43 ("kvm: arm64: Set up hyp percpu data for nVHE") Signed-off-by: Jamie Iles Signed-off-by: Marc Zyngier Acked-by: David Brazdil Cc: David Brazdil Cc: Marc Zyngier Cc: Will Deacon Link: https://lore.kernel.org/r/20201113150406.14314-1-jamie@nuviainc.com commit df85429959b2a533cb969c75a5e3b588962f47f2 Merge: 99fba3205cd49 e7ae08d398e09 Author: Tony Lindgren Date: Mon Nov 16 11:18:56 2020 +0200 Merge tag 'ti-sysc-fixes' into fixes commit 24880a87042b3032a6ac04d79cb51892c5a7901d Author: Randy Dunlap Date: Sun Nov 15 20:06:53 2020 -0800 usb: typec: qcom-pmic-typec: fix builtin build errors Fix build errors when CONFIG_TYPEC_QCOM_PMIC=y and CONFIG_USB_ROLE_SWITCH=m by limiting the former to =m when USB_ROLE_SWITCH also =m. powerpc64-linux-ld: drivers/usb/typec/qcom-pmic-typec.o: in function `.qcom_pmic_typec_remove': qcom-pmic-typec.c:(.text+0x28): undefined reference to `.usb_role_switch_set_role' powerpc64-linux-ld: qcom-pmic-typec.c:(.text+0x64): undefined reference to `.usb_role_switch_put' powerpc64-linux-ld: drivers/usb/typec/qcom-pmic-typec.o: in function `.qcom_pmic_typec_check_connection': qcom-pmic-typec.c:(.text+0x120): undefined reference to `.usb_role_switch_set_role' powerpc64-linux-ld: drivers/usb/typec/qcom-pmic-typec.o: in function `.qcom_pmic_typec_probe': qcom-pmic-typec.c:(.text+0x360): undefined reference to `.fwnode_usb_role_switch_get' powerpc64-linux-ld: qcom-pmic-typec.c:(.text+0x4e4): undefined reference to `.usb_role_switch_put' Fixes: 6c8cf3695176 ("usb: typec: Add QCOM PMIC typec detection driver") Cc: linux-usb@vger.kernel.org Cc: Wesley Cheng Reported-by: kernel test robot Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20201116040653.7943-1-rdunlap@infradead.org Reviewed-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit af8f9e8611cd4fef8295c8ab7574d3d3812ca17e Merge: 09162bc32c880 40252dd7cf7ca Author: Greg Kroah-Hartman Date: Mon Nov 16 09:56:35 2020 +0100 Merge tag 'usb-fixes-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: Two bugs for Cadence USB3 gadget driver - TD_SIZE entry at descriptor is error for multiple-trb use case - Possible use uninitialized variables * tag 'usb-fixes-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: cdns3: gadget: calculate TD_SIZE based on TD usb: cdns3: gadget: initialize link_trb as NULL commit e5633b95dce915c2ade5ce1c90d295d555396c60 Author: Kai-Heng Feng Date: Sun Nov 15 23:38:42 2020 +0800 ALSA: usb-audio: Use ALC1220-VB-DT mapping for ASUS ROG Strix TRX40 mobo ASUS ROG Strix also uses ALC1220-VB-DT, so adjust the mapping and add profile name to let userspace pick correct UCM profile. BugLink: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1031 Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20201115153843.1109200-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit fb89b2544b645527b3a359176999a416e65f5ada Author: Colin Ian King Date: Sat Nov 14 12:05:18 2020 +0000 phy: mediatek: fix spelling mistake in Kconfig "veriosn" -> "version" There is a spelling mistake in the Kconfig. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201114120518.416120-1-colin.king@canonical.com Signed-off-by: Vinod Koul commit 14839107b51cc0db19579039b1f72cba7a0c8049 Author: Bryan O'Donoghue Date: Fri Nov 13 15:12:25 2020 +0000 phy: qualcomm: Fix 28 nm Hi-Speed USB PHY OF dependency This Kconfig entry should declare a dependency on OF Fixes: 67b27dbeac4d ("phy: qualcomm: Add Synopsys 28nm Hi-Speed USB PHY driver") Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20201113151225.1657600-3-bryan.odonoghue@linaro.org Signed-off-by: Vinod Koul commit 44786a26a7485e12a1d2aaad2adfb3c82f6ad171 Author: Bryan O'Donoghue Date: Fri Nov 13 15:12:24 2020 +0000 phy: qualcomm: usb: Fix SuperSpeed PHY OF dependency This Kconfig entry should declare a dependency on OF Fixes: 6076967a500c ("phy: qualcomm: usb: Add SuperSpeed PHY driver") Reported-by: kernel test robot Link: https://lkml.org/lkml/2020/11/13/414 Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20201113151225.1657600-2-bryan.odonoghue@linaro.org Signed-off-by: Vinod Koul commit 231655eb55b0f9899054dec9432482dbf986a9c5 Author: Geert Uytterhoeven Date: Tue Nov 10 15:46:00 2020 +0100 phy: intel: PHY_INTEL_KEEMBAY_EMMC should depend on ARCH_KEEMBAY The Intel Keem Bay eMMC PHY is only present on Intel Keem Bay SoCs. Hence add a dependency on ARCH_KEEMBAY, to prevent asking the user about this driver when configuring a kernel without Intel Keem Bay platform support. Fixes: 885c4f4d6cf448f6 ("phy: intel: Add Keem Bay eMMC PHY support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201110144600.3279752-1-geert+renesas@glider.be Signed-off-by: Vinod Koul commit 40252dd7cf7cad81c784c695c36bc475b518f0ea Author: Peter Chen Date: Tue Nov 3 22:16:00 2020 +0800 usb: cdns3: gadget: calculate TD_SIZE based on TD The TRB entry TD_SIZE is the packet number for the TD (request) but not the each TRB, so it only needs to be assigned for the first TRB during the TD, and the value of it is for TD too. Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Peter Chen commit 78e91588510919a0dc9bd48916e760c1ba5797d2 Author: Peter Chen Date: Tue Nov 3 19:23:27 2020 +0800 usb: cdns3: gadget: initialize link_trb as NULL There is an uninitialized variable "link_trb" usage at function cdns3_ep_run_transfer. Fixed it by initialize "link_trb" as NULL. Fixes: 4e218882eb5a ("usb: cdns3: gadget: improve the dump TRB operation at cdns3_ep_run_transfer") Reported-by: Dan Carpenter Signed-off-by: Peter Chen commit 1254100030b3377e8302f9c75090ab191d73ee7c Author: Rohith Surabattula Date: Thu Oct 29 06:07:56 2020 +0000 smb3: Handle error case during offload read path Mid callback needs to be called only when valid data is read into pages. These patches address a problem found during decryption offload: CIFS: VFS: trying to dequeue a deleted mid that could cause a refcount use after free: Workqueue: smb3decryptd smb2_decrypt_offload [cifs] Signed-off-by: Rohith Surabattula Reviewed-by: Pavel Shilovsky CC: Stable #5.4+ Signed-off-by: Steve French commit ac873aa3dc21707c47db5db6608b38981c731afe Author: Rohith Surabattula Date: Thu Oct 29 05:03:10 2020 +0000 smb3: Avoid Mid pending list corruption When reconnect happens Mid queue can be corrupted when both demultiplex and offload thread try to dequeue the MID from the pending list. These patches address a problem found during decryption offload: CIFS: VFS: trying to dequeue a deleted mid that could cause a refcount use after free: Workqueue: smb3decryptd smb2_decrypt_offload [cifs] Signed-off-by: Rohith Surabattula Reviewed-by: Pavel Shilovsky CC: Stable #5.4+ Signed-off-by: Steve French commit de9ac0a6e9efdffc8cde18781f48fb56ca4157b7 Author: Rohith Surabattula Date: Wed Oct 28 13:42:21 2020 +0000 smb3: Call cifs reconnect from demultiplex thread cifs_reconnect needs to be called only from demultiplex thread. skip cifs_reconnect in offload thread. So, cifs_reconnect will be called by demultiplex thread in subsequent request. These patches address a problem found during decryption offload: CIFS: VFS: trying to dequeue a deleted mid that can cause a refcount use after free: [ 1271.389453] Workqueue: smb3decryptd smb2_decrypt_offload [cifs] [ 1271.389456] RIP: 0010:refcount_warn_saturate+0xae/0xf0 [ 1271.389457] Code: fa 1d 6a 01 01 e8 c7 44 b1 ff 0f 0b 5d c3 80 3d e7 1d 6a 01 00 75 91 48 c7 c7 d8 be 1d a2 c6 05 d7 1d 6a 01 01 e8 a7 44 b1 ff <0f> 0b 5d c3 80 3d c5 1d 6a 01 00 0f 85 6d ff ff ff 48 c7 c7 30 bf [ 1271.389458] RSP: 0018:ffffa4cdc1f87e30 EFLAGS: 00010286 [ 1271.389458] RAX: 0000000000000000 RBX: ffff9974d2809f00 RCX: ffff9974df898cc8 [ 1271.389459] RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffff9974df898cc0 [ 1271.389460] RBP: ffffa4cdc1f87e30 R08: 0000000000000004 R09: 00000000000002c0 [ 1271.389460] R10: 0000000000000000 R11: 0000000000000001 R12: ffff9974b7fdb5c0 [ 1271.389461] R13: ffff9974d2809f00 R14: ffff9974ccea0a80 R15: ffff99748e60db80 [ 1271.389462] FS: 0000000000000000(0000) GS:ffff9974df880000(0000) knlGS:0000000000000000 [ 1271.389462] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1271.389463] CR2: 000055c60f344fe4 CR3: 0000001031a3c002 CR4: 00000000003706e0 [ 1271.389465] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1271.389465] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1271.389466] Call Trace: [ 1271.389483] cifs_mid_q_entry_release+0xce/0x110 [cifs] [ 1271.389499] smb2_decrypt_offload+0xa9/0x1c0 [cifs] [ 1271.389501] process_one_work+0x1e8/0x3b0 [ 1271.389503] worker_thread+0x50/0x370 [ 1271.389504] kthread+0x12f/0x150 [ 1271.389506] ? process_one_work+0x3b0/0x3b0 [ 1271.389507] ? __kthread_bind_mask+0x70/0x70 [ 1271.389509] ret_from_fork+0x22/0x30 Signed-off-by: Rohith Surabattula Reviewed-by: Pavel Shilovsky CC: Stable #5.4+ Signed-off-by: Steve French commit 98128572084c3dd8067f48bb588aa3733d1355b5 Author: Namjae Jeon Date: Mon Nov 9 17:35:33 2020 +0900 cifs: fix a memleak with modefromsid kmemleak reported a memory leak allocated in query_info() when cifs is working with modefromsid. backtrace: [<00000000aeef6a1e>] slab_post_alloc_hook+0x58/0x510 [<00000000b2f7a440>] __kmalloc+0x1a0/0x390 [<000000006d470ebc>] query_info+0x5b5/0x700 [cifs] [<00000000bad76ce0>] SMB2_query_acl+0x2b/0x30 [cifs] [<000000001fa09606>] get_smb2_acl_by_path+0x2f3/0x720 [cifs] [<000000001b6ebab7>] get_smb2_acl+0x75/0x90 [cifs] [<00000000abf43904>] cifs_acl_to_fattr+0x13b/0x1d0 [cifs] [<00000000a5372ec3>] cifs_get_inode_info+0x4cd/0x9a0 [cifs] [<00000000388e0a04>] cifs_revalidate_dentry_attr+0x1cd/0x510 [cifs] [<0000000046b6b352>] cifs_getattr+0x8a/0x260 [cifs] [<000000007692c95e>] vfs_getattr_nosec+0xa1/0xc0 [<00000000cbc7d742>] vfs_getattr+0x36/0x40 [<00000000de8acf67>] vfs_statx_fd+0x4a/0x80 [<00000000a58c6adb>] __do_sys_newfstat+0x31/0x70 [<00000000300b3b4e>] __x64_sys_newfstat+0x16/0x20 [<000000006d8e9c48>] do_syscall_64+0x37/0x80 This patch add missing kfree for pntsd when mounting modefromsid option. Cc: Stable # v5.4+ Signed-off-by: Namjae Jeon Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 4bbf439b09c5ac3f8b3e9584fe080375d8d0ad2d Author: Al Viro Date: Thu Nov 12 14:40:37 2020 -0500 fix return values of seq_read_iter() Unlike ->read(), ->read_iter() instances *must* return the amount of data they'd left in iterator. For ->read() returning less than it has actually copied is a QoI issue; read(fd, unmapped_page - 5, 8) is allowed to fill all 5 bytes of destination and return 4; it's not nice to caller, but POSIX allows pretty much anything in such situation, up to and including a SIGSEGV. generic_file_splice_read() uses pipe-backed iterator as destination; there a short copy comes from pipe being full, not from running into an un{mapped,writable} page in the middle of destination as we have for iovec-backed iterators read(2) uses. And there we rely upon the ->read_iter() reporting the actual amount it has left in destination. Conversion of a ->read() instance into ->read_iter() has to watch out for that. If you really need an "all or nothing" kind of behaviour somewhere, you need to do iov_iter_revert() to prune the partial copy. In case of seq_read_iter() we can handle short copy just fine; the data is in m->buf and next call will fetch it from there. Fixes: d4d50710a8b4 (seq_file: add seq_read_iter) Tested-by: Nathan Chancellor Signed-off-by: Al Viro commit 09162bc32c880a791c6c0668ce0745cf7958f576 Author: Linus Torvalds Date: Sun Nov 15 16:44:31 2020 -0800 Linux 5.10-rc4 commit 575cba20c421ecb6b563ae352e4e0468e4ca8b3c Author: Nicholas Piggin Date: Sat Nov 14 21:47:43 2020 +1000 powerpc/64s: Fix KVM system reset handling when CONFIG_PPC_PSERIES=y pseries guest kernels have a FWNMI handler for SRESET and MCE NMIs, which is basically the same as the regular handlers for those interrupts. The system reset FWNMI handler did not have a KVM guest test in it, although it probably should have because the guest can itself run guests. Commit 4f50541f6703b ("powerpc/64s/exception: Move all interrupt handlers to new style code gen macros") convert the handler faithfully to avoid a KVM test with a "clever" trick to modify the IKVM_REAL setting to 0 when the fwnmi handler is to be generated (PPC_PSERIES=y). This worked when the KVM test was generated in the interrupt entry handlers, but a later patch moved the KVM test to the common handler, and the common handler macro is expanded below the fwnmi entry. This prevents the KVM test from being generated even for the 0x100 entry point as well. The result is NMI IPIs in the host kernel when a guest is running will use gest registers. This goes particularly badly when an HPT guest is running and the MMU is set to guest mode. Remove this trickery and just generate the test always. Fixes: 9600f261acaa ("powerpc/64s/exception: Move KVM test to common code") Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201114114743.3306283-1-npiggin@gmail.com commit efd838fec17bd8756da852a435800a7e6281bfbc Author: Mike Christie Date: Mon Nov 9 23:33:23 2020 -0600 vhost scsi: Add support for LUN resets. In newer versions of virtio-scsi we just reset the timer when an a command times out, so TMFs are never sent for the cmd time out case. However, in older kernels and for the TMF inject cases, we can still get resets and we end up just failing immediately so the guest might see the device get offlined and IO errors. For the older kernel cases, we want the same end result as the modern virtio-scsi driver where we let the lower levels fire their error handling and handle the problem. And at the upper levels we want to wait. This patch ties the LUN reset handling into the LIO TMF code which will just wait for outstanding commands to complete like we are doing in the modern virtio-scsi case. Note: I did not handle the ABORT case to keep this simple. For ABORTs LIO just waits on the cmd like how it does for the RESET case. If an ABORT fails, the guest OS ends up escalating to LUN RESET, so in the end we get the same behavior where we wait on the outstanding cmds. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/1604986403-4931-6-git-send-email-michael.christie@oracle.com Signed-off-by: Michael S. Tsirkin Acked-by: Stefan Hajnoczi commit 18f1becb6948cd411fd01968a0a54af63732e73c Author: Mike Christie Date: Mon Nov 9 23:33:22 2020 -0600 vhost scsi: add lun parser helper Move code to parse lun from req's lun_buf to helper, so tmf code can use it in the next patch. Signed-off-by: Mike Christie Reviewed-by: Paolo Bonzini Acked-by: Jason Wang Link: https://lore.kernel.org/r/1604986403-4931-5-git-send-email-michael.christie@oracle.com Signed-off-by: Michael S. Tsirkin Acked-by: Stefan Hajnoczi commit 47a3565e8bb14ec48a75b48daf57aa830e2691f8 Author: Mike Christie Date: Mon Nov 9 23:33:21 2020 -0600 vhost scsi: fix cmd completion race We might not do the final se_cmd put from vhost_scsi_complete_cmd_work. When the last put happens a little later then we could race where vhost_scsi_complete_cmd_work does vhost_signal, the guest runs and sends more IO, and vhost_scsi_handle_vq runs but does not find any free cmds. This patch has us delay completing the cmd until the last lio core ref is dropped. We then know that once we signal to the guest that the cmd is completed that if it queues a new command it will find a free cmd. Signed-off-by: Mike Christie Reviewed-by: Maurizio Lombardi Link: https://lore.kernel.org/r/1604986403-4931-4-git-send-email-michael.christie@oracle.com Signed-off-by: Michael S. Tsirkin Acked-by: Stefan Hajnoczi commit 25b98b64e28423b0769313dcaf96423836b1f93d Author: Mike Christie Date: Mon Nov 9 23:33:20 2020 -0600 vhost scsi: alloc cmds per vq instead of session We currently are limited to 256 cmds per session. This leads to problems where if the user has increased virtqueue_size to more than 2 or cmd_per_lun to more than 256 vhost_scsi_get_tag can fail and the guest will get IO errors. This patch moves the cmd allocation to per vq so we can easily match whatever the user has specified for num_queues and virtqueue_size/cmd_per_lun. It also makes it easier to control how much memory we preallocate. For cases, where perf is not as important and we can use the current defaults (1 vq and 128 cmds per vq) memory use from preallocate cmds is cut in half. For cases, where we are willing to use more memory for higher perf, cmd mem use will now increase as the num queues and queue depth increases. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/1604986403-4931-3-git-send-email-michael.christie@oracle.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Maurizio Lombardi Acked-by: Stefan Hajnoczi commit 6bcf34224ac1e94103797fd68b9836061762f2b2 Author: Mike Christie Date: Mon Nov 9 23:33:19 2020 -0600 vhost: add helper to check if a vq has been setup This adds a helper check if a vq has been setup. The next patches will use this when we move the vhost scsi cmd preallocation from per session to per vq. In the per vq case, we only want to allocate cmds for vqs that have actually been setup and not for all the possible vqs. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/1604986403-4931-2-git-send-email-michael.christie@oracle.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Acked-by: Stefan Hajnoczi commit a312db697cb05dfa781848afe8585a1e1f2a5a99 Author: Laurent Vivier Date: Fri Nov 13 16:57:06 2020 +0100 vdpasim: fix "mac_pton" undefined error ERROR: modpost: "mac_pton" [drivers/vdpa/vdpa_sim/vdpa_sim.ko] undefined! mac_pton() is defined in lib/net_utils.c and is not built if NET is not set. Select GENERIC_NET_UTILS as vdpasim doesn't depend on NET. Reported-by: kernel test robot Signed-off-by: Laurent Vivier Link: https://lore.kernel.org/r/20201113155706.599434-1-lvivier@redhat.com Signed-off-by: Michael S. Tsirkin Acked-by: Randy Dunlap # build-tested commit a6af8718b98e1cd37a9ea9a02269c79577fc9138 Merge: 9cfd9c45994b4 8f598d15ee657 Author: Linus Torvalds Date: Sun Nov 15 13:07:36 2020 -0800 Merge tag 'drm-fixes-2020-11-16' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Nouveau fixes: - atomic modesetting regression fix - ttm pre-nv50 fix - connector NULL ptr deref fix" * tag 'drm-fixes-2020-11-16' of git://anongit.freedesktop.org/drm/drm: drm/nouveau/kms/nv50-: Use atomic encoder callbacks everywhere drm/nouveau/ttm: avoid using nouveau_drm.ttm.type_vram prior to nv50 drm/nouveau/kms: Fix NULL pointer dereference in nouveau_connector_detect_depth commit 8f598d15ee6577a56d6617d9e4151591db34d8fa Merge: 41f3ed2cac86b 5c6fb4b28b165 Author: Dave Airlie Date: Mon Nov 16 06:36:23 2020 +1000 Merge branch 'linux-5.10' of git://github.com/skeggsb/linux into drm-fixes - atomic modesetting regression fix - ttm pre-nv50 fix - connector NULL ptr deref fix Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv5D9p78MNN0OxVeRZxN8LDqcadJEGUEFCgWJQ6+_rjPuw@mail.gmail.com commit 9cfd9c45994b409c7103efc2f265e0af7634cf75 Merge: 281b3ec3a75bf 092561f06702d Author: Linus Torvalds Date: Sun Nov 15 10:15:17 2020 -0800 Merge tag 'char-misc-5.10-rc4' 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/misc/whatever driver fixes for 5.10-rc4. Nothing huge, lots of small fixes for reported issues: - habanalabs driver fixes - speakup driver fixes - uio driver fixes - virtio driver fix - other tiny driver fixes Full details are in the shortlog. All of these have been in linux-next for a full week with no reported issues" * tag 'char-misc-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: uio: Fix use-after-free in uio_unregister_device() firmware: xilinx: fix out-of-bounds access nitro_enclaves: Fixup type and simplify logic of the poll mask setup speakup ttyio: Do not schedule() in ttyio_in_nowait speakup: Fix clearing selection in safe context speakup: Fix var_id_t values and thus keymap virtio: virtio_console: fix DMA memory allocation for rproc serial habanalabs/gaudi: mask WDT error in QMAN habanalabs/gaudi: move coresight mmu config habanalabs: fix kernel pointer type mei: protect mei_cl_mtu from null dereference commit 281b3ec3a75bfa14b2bf53501c4596415b3309e2 Merge: 0062442ecfef0 6d853c9e4104b Author: Linus Torvalds Date: Sun Nov 15 10:02:41 2020 -0800 Merge tag 'usb-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB and Thunderbolt fixes from Greg KH: "Here are some small Thunderbolt and USB driver fixes for 5.10-rc4 to solve some reported issues. Nothing huge in here, just small things: - thunderbolt memory leaks fixed and new device ids added - revert of problem patch for the musb driver - new quirks added for USB devices - typec power supply fixes to resolve much reported problems about charging notifications not working anymore All except the cdc-acm driver quirk addition have been in linux-next with no reported issues (the quirk patch was applied on Friday, and is self-contained)" * tag 'usb-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode MAINTAINERS: add usb raw gadget entry usb: typec: ucsi: Report power supply changes xhci: hisilicon: fix refercence leak in xhci_histb_probe Revert "usb: musb: convert to devm_platform_ioremap_resource_byname" thunderbolt: Add support for Intel Tiger Lake-H thunderbolt: Only configure USB4 wake for lane 0 adapters thunderbolt: Add uaccess dependency to debugfs interface thunderbolt: Fix memory leak if ida_simple_get() fails in enumerate_services() thunderbolt: Add the missed ida_simple_remove() in ring_request_msix() commit 0062442ecfef0d82cd69e3e600d5006357f8d8e4 Merge: 326fd6db61125 c887c9b9ca62c Author: Linus Torvalds Date: Sun Nov 15 09:57:58 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Fixes for ARM and x86, the latter especially for old processors without two-dimensional paging (EPT/NPT)" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: mmu: fix is_tdp_mmu_check when the TDP MMU is not in use KVM: SVM: Update cr3_lm_rsvd_bits for AMD SEV guests KVM: x86: Introduce cr3_lm_rsvd_bits in kvm_vcpu_arch KVM: x86: clflushopt should be treated as a no-op by emulation KVM: arm64: Handle SCXTNUM_ELx traps KVM: arm64: Unify trap handlers injecting an UNDEF KVM: arm64: Allow setting of ID_AA64PFR0_EL1.CSV2 from userspace commit 326fd6db6112534738b5229da538bf426d78c851 Merge: 64b609d6a60c8 ff828729be446 Author: Linus Torvalds Date: Sun Nov 15 09:49:56 2020 -0800 Merge tag 'x86-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A small set of fixes for x86: - Cure the fallout from the MSI irqdomain overhaul which missed that the Intel IOMMU does not register virtual function devices and therefore never reaches the point where the MSI interrupt domain is assigned. This made the VF devices use the non-remapped MSI domain which is trapped by the IOMMU/remap unit - Remove an extra space in the SGI_UV architecture type procfs output for UV5 - Remove a unused function which was missed when removing the UV BAU TLB shootdown handler" * tag 'x86-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: iommu/vt-d: Cure VF irqdomain hickup x86/platform/uv: Fix copied UV5 output archtype x86/platform/uv: Drop last traces of uv_flush_tlb_others commit 64b609d6a60c8a54ff9c43819803e6a7861e7ed1 Merge: d0a37fd57fbae 1a8cfa24e21c2 Author: Linus Torvalds Date: Sun Nov 15 09:46:36 2020 -0800 Merge tag 'perf-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A set of fixes for perf: - A set of commits which reduce the stack usage of various perf event handling functions which allocated large data structs on stack causing stack overflows in the worst case - Use the proper mechanism for detecting soft interrupts in the recursion protection - Make the resursion protection simpler and more robust - Simplify the scheduling of event groups to make the code more robust and prepare for fixing the issues vs. scheduling of exclusive event groups - Prevent event multiplexing and rotation for exclusive event groups - Correct the perf event attribute exclusive semantics to take pinned events, e.g. the PMU watchdog, into account - Make the anythread filtering conditional for Intel's generic PMU counters as it is not longer guaranteed to be supported on newer CPUs. Check the corresponding CPUID leaf to make sure - Fixup a duplicate initialization in an array which was probably caused by the usual 'copy & paste - forgot to edit' mishap" * tag 'perf-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Fix Add BW copypasta perf/x86/intel: Make anythread filter support conditional perf: Tweak perf_event_attr::exclusive semantics perf: Fix event multiplexing for exclusive groups perf: Simplify group_sched_in() perf: Simplify group_sched_out() perf/x86: Make dummy_iregs static perf/arch: Remove perf_sample_data::regs_user_copy perf: Optimize get_recursion_context() perf: Fix get_recursion_context() perf/x86: Reduce stack usage for x86_pmu::drain_pebs() perf: Reduce stack usage of perf_output_begin() commit d0a37fd57fbae32adffb56ae9852d551376b7c9b Merge: 259c2fbef8f09 8d4d9c7b4333a Author: Linus Torvalds Date: Sun Nov 15 09:39:35 2020 -0800 Merge tag 'sched-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "A set of scheduler fixes: - Address a load balancer regression by making the load balancer use the same logic as the wakeup path to spread tasks in the LLC domain - Prefer the CPU on which a task run last over the local CPU in the fast wakeup path for asymmetric CPU capacity systems to align with the symmetric case. This ensures more locality and prevents massive migration overhead on those asymetric systems - Fix a memory corruption bug in the scheduler debug code caused by handing a modified buffer pointer to kfree()" * tag 'sched-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/debug: Fix memory corruption caused by multiple small reads of flags sched/fair: Prefer prev cpu in asymmetric wakeup path sched/fair: Ensure tasks spreading in LLC during LB commit a584e9bc1b7e88f24f8504886eafbe6c73d8a97c Author: Faiz Abbas Date: Tue Aug 25 11:24:42 2020 +0530 can: m_can: m_can_stop(): set device to software init mode before closing There might be some requests pending in the buffer when the interface close sequence occurs. In some devices, these pending requests might lead to the module not shutting down properly when m_can_clk_stop() is called. Therefore, move the device to init state before potentially powering it down. Fixes: e0d1f4816f2a ("can: m_can: add Bosch M_CAN controller support") Signed-off-by: Faiz Abbas Acked-by: Dan Murphy Link: https://lore.kernel.org/r/20200825055442.16994-1-faiz_abbas@ti.com Signed-off-by: Marc Kleine-Budde commit 85816aba460ceebed0047381395615891df68c8f Author: Dan Murphy Date: Thu Feb 27 12:38:29 2020 -0600 can: m_can: Fix freeing of can device from peripherials Fix leaking netdev device from peripherial devices. The call to allocate the netdev device is made from and managed by the peripherial. Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework") Reported-by: Marc Kleine-Budde Signed-off-by: Dan Murphy Link: http://lore.kernel.org/r/20200227183829.21854-2-dmurphy@ti.com Signed-off-by: Marc Kleine-Budde commit a8c22f5b0c689a29f45ef4a110d09fd391debcbc Author: Dan Murphy Date: Thu Feb 27 12:38:29 2020 -0600 can: m_can: m_can_class_free_dev(): introduce new function This patch creates a common function that peripherials can call to free the netdev device when failures occur. Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework") Reported-by: Marc Kleine-Budde Signed-off-by: Dan Murphy Link: http://lore.kernel.org/r/20200227183829.21854-2-dmurphy@ti.com Signed-off-by: Marc Kleine-Budde commit 259c2fbef8f09cec8ac3d67820ca6778242beeaa Merge: a50cf15906d4d d61fc96a37603 Author: Linus Torvalds Date: Sun Nov 15 09:25:43 2020 -0800 Merge tag 'locking-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "Two fixes for the locking subsystem: - Prevent an unconditional interrupt enable in a futex helper function which can be called from contexts which expect interrupts to stay disabled across the call - Don't modify lockdep chain keys in the validation process as that causes chain inconsistency" * tag 'locking-urgent-2020-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lockdep: Avoid to modify chain keys in validate_chain() futex: Don't enable IRQs unconditionally in put_pi_state() commit cd0d83eab2e0c26fe87a10debfedbb23901853c1 Author: Wu Bo Date: Wed Jan 29 10:23:30 2020 +0800 can: m_can: m_can_handle_state_change(): fix state change m_can_handle_state_change() is called with the new_state as an argument. In the switch statements for CAN_STATE_ERROR_ACTIVE, the comment and the following code indicate that a CAN_STATE_ERROR_WARNING is handled. This patch fixes this problem by changing the case to CAN_STATE_ERROR_WARNING. Signed-off-by: Wu Bo Link: http://lore.kernel.org/r/20200129022330.21248-2-wubo.oduw@gmail.com Cc: Dan Murphy Fixes: e0d1f4816f2a ("can: m_can: add Bosch M_CAN controller support") Signed-off-by: Marc Kleine-Budde commit c81d0b6ca665477c761f227807010762630b089f Author: Marc Kleine-Budde Date: Mon Aug 10 22:23:49 2020 +0200 can: tcan4x5x: tcan4x5x_can_remove(): fix order of deregistration Change the order in tcan4x5x_can_remove() to be the exact inverse of tcan4x5x_can_probe(). First m_can_class_unregister(), then power down the device. Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Cc: Dan Murphy Link: http://lore.kernel.org/r/20201019154233.1262589-10-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 1ff203badbbf1738027c8395d5b40b0d462b6e4d Author: Marc Kleine-Budde Date: Fri Jan 3 11:30:34 2020 +0100 can: tcan4x5x: tcan4x5x_can_probe(): add missing error checking for devm_regmap_init() This patch adds the missing error checking when initializing the regmap interface fails. Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Cc: Dan Murphy Link: http://lore.kernel.org/r/20201019154233.1262589-7-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 3fcce133f0d9a50d3a23f8e2bc950197b4e03900 Author: Enric Balletbo i Serra Date: Mon Apr 13 16:10:13 2020 +0200 can: tcan4x5x: replace depends on REGMAP_SPI with depends on SPI regmap is a library function that gets selected by drivers that need it. No driver modules should depend on it. Instead depends on SPI and select REGMAP_SPI. Depending on REGMAP_SPI makes this driver only build if another driver already selected REGMAP_SPI, as the symbol can't be selected through the menu kernel configuration. Signed-off-by: Enric Balletbo i Serra Link: http://lore.kernel.org/r/20200413141013.506613-1-enric.balletbo@collabora.com Reviewed-by: Dan Murphy Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Signed-off-by: Marc Kleine-Budde commit b7ee5bc3e1006433601a058a6a7c24c5272635f4 Author: Zhang Qilong Date: Sun Nov 8 16:30:00 2020 +0800 can: flexcan: fix failure handling of pm_runtime_get_sync() pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in reference leak in the two functions flexcan_get_berr_counter() and flexcan_open(). Moreover, this device cannot enter the idle state and always stay busy or other non-idle state later. So we should fix it through adding pm_runtime_put_noidle(). Fixes: ca10989632d88 ("can: flexcan: implement can Runtime PM") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201108083000.2599705-1-zhangqilong3@huawei.com Signed-off-by: Marc Kleine-Budde commit 499aa923c56769274f81e60414b8de4912864b8d Author: Marc Kleine-Budde Date: Wed Oct 14 13:41:36 2020 +0200 can: flexcan: flexcan_setup_stop_mode(): add missing "req_bit" to stop mode property comment In the patch d9b081e3fc4b ("can: flexcan: remove ack_grp and ack_bit handling from driver") the unused ack_grp and ack_bit were removed from the driver. However in the comment, the "req_bit" was accidentally removed, too. This patch adds back the "req_bit" bit. Fixes: d9b081e3fc4b ("can: flexcan: remove ack_grp and ack_bit handling from driver") Reported-by: Joakim Zhang Link: http://lore.kernel.org/r/20201014114810.2911135-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 8a68cc0d690c9e5730d676b764c6f059343b842c Author: Colin Ian King Date: Thu Nov 5 11:24:27 2020 +0000 can: peak_usb: fix potential integer overflow on shift of a int The left shift of int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to a signed 64 bit variable. In the case where time_ref->adapter->ts_used_bits is 32 or more this can lead to an oveflow. Avoid this by shifting using the BIT_ULL macro instead. Fixes: bb4785551f64 ("can: usb: PEAK-System Technik USB adapters driver core") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201105112427.40688-1-colin.king@canonical.com Signed-off-by: Marc Kleine-Budde commit 81c9c8e0adef3285336b942f93287c554c89e6c6 Author: Marc Kleine-Budde Date: Wed Aug 28 21:16:55 2019 +0200 can: mcba_usb: mcba_usb_start_xmit(): first fill skb, then pass to can_put_echo_skb() The driver has to first fill the skb with data and then handle it to can_put_echo_skb(). This patch moves the can_put_echo_skb() down, right before sending the skb out via USB. Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analyzer") Cc: Remigiusz Kołłątaj Link: https://lore.kernel.org/r/20201111221204.1639007-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 7968c7c79d3be8987feb8021f0c46e6866831408 Author: Zhang Qilong Date: Sat Nov 14 19:17:08 2020 +0800 can: ti_hecc: Fix memleak in ti_hecc_probe In the error handling, we should goto the probe_exit_candev to free ndev to prevent memory leak. Fixes: dabf54dd1c63 ("can: ti_hecc: Convert TI HECC driver to DT only driver") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201114111708.3465543-1-zhangqilong3@huawei.com Signed-off-by: Marc Kleine-Budde commit a1e654070a60d5d4f7cce59c38f4ca790bb79121 Author: Alejandro Concepcion Rodriguez Date: Thu Nov 5 21:51:47 2020 +0000 can: dev: can_restart(): post buffer from the right context netif_rx() is meant to be called from interrupt contexts. can_restart() may be called by can_restart_work(), which is called from a worqueue, so it may run in process context. Use netif_rx_ni() instead. Fixes: 39549eef3587 ("can: CAN Network device driver and Netlink interface") Co-developed-by: Loris Fauster Signed-off-by: Loris Fauster Signed-off-by: Alejandro Concepcion Rodriguez Link: https://lore.kernel.org/r/4e84162b-fb31-3a73-fa9a-9438b4bd5234@acoro.eu [mkl: use netif_rx_ni() instead of netif_rx_any_context()] Signed-off-by: Marc Kleine-Budde commit 9aa9379d8f868e91719333a7f063ccccc0579acc Author: Anant Thazhemadam Date: Wed Nov 4 03:09:06 2020 +0530 can: af_can: prevent potential access of uninitialized member in canfd_rcv() In canfd_rcv(), cfd->len is uninitialized when skb->len = 0, and this uninitialized cfd->len is accessed nonetheless by pr_warn_once(). Fix this uninitialized variable access by checking cfd->len's validity condition (cfd->len > CANFD_MAX_DLEN) separately after the skb->len's condition is checked, and appropriately modify the log messages that are generated as well. In case either of the required conditions fail, the skb is freed and NET_RX_DROP is returned, same as before. Fixes: d4689846881d ("can: af_can: canfd_rcv(): replace WARN_ONCE by pr_warn_once") Reported-by: syzbot+9bcb0c9409066696d3aa@syzkaller.appspotmail.com Tested-by: Anant Thazhemadam Signed-off-by: Anant Thazhemadam Link: https://lore.kernel.org/r/20201103213906.24219-3-anant.thazhemadam@gmail.com Signed-off-by: Marc Kleine-Budde commit c8c958a58fc67f353289986850a0edf553435702 Author: Anant Thazhemadam Date: Wed Nov 4 03:09:05 2020 +0530 can: af_can: prevent potential access of uninitialized member in can_rcv() In can_rcv(), cfd->len is uninitialized when skb->len = 0, and this uninitialized cfd->len is accessed nonetheless by pr_warn_once(). Fix this uninitialized variable access by checking cfd->len's validity condition (cfd->len > CAN_MAX_DLEN) separately after the skb->len's condition is checked, and appropriately modify the log messages that are generated as well. In case either of the required conditions fail, the skb is freed and NET_RX_DROP is returned, same as before. Fixes: 8cb68751c115 ("can: af_can: can_rcv(): replace WARN_ONCE by pr_warn_once") Reported-by: syzbot+9bcb0c9409066696d3aa@syzkaller.appspotmail.com Tested-by: Anant Thazhemadam Signed-off-by: Anant Thazhemadam Link: https://lore.kernel.org/r/20201103213906.24219-2-anant.thazhemadam@gmail.com Signed-off-by: Marc Kleine-Budde commit a50cf15906d4d0ad1d6bb32e9eeeb282899a8180 Merge: e28c0d7c92c89 61cf93d3e14a2 Author: Linus Torvalds Date: Sun Nov 15 08:57:19 2020 -0800 Merge branch 'for-5.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu fix and cleanup from Dennis Zhou: "A fix for a Wshadow warning in the asm-generic percpu macros came in and then I tacked on the removal of flexible array initializers in the percpu allocator" * 'for-5.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: percpu: convert flexible array initializers to use struct_size() asm-generic: percpu: avoid Wshadow warning commit c887c9b9ca62c051d339b1c7b796edf2724029ed Author: Paolo Bonzini Date: Sun Nov 15 08:55:43 2020 -0500 kvm: mmu: fix is_tdp_mmu_check when the TDP MMU is not in use In some cases where shadow paging is in use, the root page will be either mmu->pae_root or vcpu->arch.mmu->lm_root. Then it will not have an associated struct kvm_mmu_page, because it is allocated with alloc_page instead of kvm_mmu_alloc_page. Just return false quickly from is_tdp_mmu_root if the TDP MMU is not in use, which also includes the case where shadow paging is enabled. Signed-off-by: Paolo Bonzini commit 14a2e551faea53d45bc11629a9dac88f88950ca7 Author: Taehee Yoo Date: Sun Nov 15 10:30:04 2020 +0000 batman-adv: set .owner to THIS_MODULE If THIS_MODULE is not set, the module would be removed while debugfs is being used. It eventually makes kernel panic. Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol") Signed-off-by: Taehee Yoo Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 849920c703392957f94023f77ec89ca6cf119d43 Author: Wang Hai Date: Fri Nov 13 19:16:22 2020 +0800 devlink: Add missing genlmsg_cancel() in devlink_nl_sb_port_pool_fill() If sb_occ_port_pool_get() failed in devlink_nl_sb_port_pool_fill(), msg should be canceled by genlmsg_cancel(). Fixes: df38dafd2559 ("devlink: implement shared buffer occupancy monitoring interface") Reported-by: Hulk Robot Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20201113111622.11040-1-wanghai38@huawei.com Signed-off-by: Jakub Kicinski commit 56311a315da7ebc668dbcc2f1c99689cc10796c4 Author: Jisheng Zhang Date: Fri Nov 13 09:09:02 2020 +0800 net: stmmac: dwmac_lib: enlarge dma reset timeout If the phy enables power saving technology, the dwmac's software reset needs more time to complete, enlarge dma reset timeout to 200000us. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20201113090902.5c7aab1a@xhacker.debian Signed-off-by: Jakub Kicinski commit 796a2665ca3e91ebaba7222f76fd9a035714e2d8 Author: Sven Van Asbroeck Date: Thu Nov 12 15:47:41 2020 -0500 lan743x: prevent entire kernel HANG on open, for some platforms On arm imx6, when opening the chip's netdev, the whole Linux kernel intermittently hangs/freezes. This is caused by a bug in the driver code which tests if pcie interrupts are working correctly, using the software interrupt: 1. open: enable the software interrupt 2. open: tell the chip to assert the software interrupt 3. open: wait for flag 4. ISR: acknowledge s/w interrupt, set flag 5. open: notice flag, disable the s/w interrupt, continue Unfortunately the ISR only acknowledges the s/w interrupt, but does not disable it. This will re-trigger the ISR in a tight loop. On some (lucky) platforms, open proceeds to disable the s/w interrupt even while the ISR is 'spinning'. On arm imx6, the spinning ISR does not allow open to proceed, resulting in a hung Linux kernel. Fix minimally by disabling the s/w interrupt in the ISR, which will prevent it from spinning. This won't break anything because the s/w interrupt is used as a one-shot interrupt. Note that this is a minimal fix, overlooking many possible cleanups, e.g.: - lan743x_intr_software_isr() is completely redundant and reads INT_STS twice for no apparent reason - disabling the s/w interrupt in lan743x_intr_test_isr() is now redundant, but harmless - waiting on software_isr_flag can be converted from a sleeping poll loop to wait_event_timeout() Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver") Tested-by: Sven Van Asbroeck # arm imx6 lan7430 Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20201112204741.12375-1-TheSven73@gmail.com Signed-off-by: Jakub Kicinski commit e35df62e04cc6fc4b9d90d054732f138349ff9b1 Author: Sven Van Asbroeck Date: Thu Nov 12 13:59:49 2020 -0500 lan743x: fix issue causing intermittent kernel log warnings When running this chip on arm imx6, we intermittently observe the following kernel warning in the log, especially when the system is under high load: [ 50.119484] ------------[ cut here ]------------ [ 50.124377] WARNING: CPU: 0 PID: 303 at kernel/softirq.c:169 __local_bh_enable_ip+0x100/0x184 [ 50.132925] IRQs not enabled as expected [ 50.159250] CPU: 0 PID: 303 Comm: rngd Not tainted 5.7.8 #1 [ 50.164837] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 50.171395] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 50.179162] [] (show_stack) from [] (dump_stack+0xac/0xd8) [ 50.186408] [] (dump_stack) from [] (__warn+0xd0/0x10c) [ 50.193391] [] (__warn) from [] (warn_slowpath_fmt+0x98/0xc4) [ 50.200892] [] (warn_slowpath_fmt) from [] (__local_bh_enable_ip+0x100/0x184) [ 50.209860] [] (__local_bh_enable_ip) from [] (destroy_conntrack+0x48/0xd8 [nf_conntrack]) [ 50.220038] [] (destroy_conntrack [nf_conntrack]) from [] (nf_conntrack_destroy+0x94/0x168) [ 50.230160] [] (nf_conntrack_destroy) from [] (skb_release_head_state+0xa0/0xd0) [ 50.239314] [] (skb_release_head_state) from [] (skb_release_all+0xc/0x24) [ 50.247946] [] (skb_release_all) from [] (consume_skb+0x74/0x17c) [ 50.255796] [] (consume_skb) from [] (lan743x_tx_release_desc+0x120/0x124) [ 50.264428] [] (lan743x_tx_release_desc) from [] (lan743x_tx_napi_poll+0x5c/0x18c) [ 50.273755] [] (lan743x_tx_napi_poll) from [] (net_rx_action+0x118/0x4a4) [ 50.282306] [] (net_rx_action) from [] (__do_softirq+0x13c/0x53c) [ 50.290157] [] (__do_softirq) from [] (irq_exit+0x150/0x17c) [ 50.297575] [] (irq_exit) from [] (__handle_domain_irq+0x60/0xb0) [ 50.305423] [] (__handle_domain_irq) from [] (gic_handle_irq+0x4c/0x90) [ 50.313790] [] (gic_handle_irq) from [] (__irq_usr+0x54/0x80) [ 50.321287] Exception stack(0xecd99fb0 to 0xecd99ff8) [ 50.326355] 9fa0: 1cf1aa74 00000001 00000001 00000000 [ 50.334547] 9fc0: 00000001 00000000 00000000 00000000 00000000 00000000 00004097 b6d17d14 [ 50.342738] 9fe0: 00000001 b6d17c60 00000000 b6e71f94 800b0010 ffffffff [ 50.349364] irq event stamp: 2525027 [ 50.352955] hardirqs last enabled at (2525026): [] net_rx_action+0xb4/0x4a4 [ 50.360892] hardirqs last disabled at (2525027): [] _raw_spin_lock_irqsave+0x1c/0x50 [ 50.369517] softirqs last enabled at (2524660): [] __do_softirq+0x38c/0x53c [ 50.377446] softirqs last disabled at (2524693): [] irq_exit+0x150/0x17c [ 50.385027] ---[ end trace c0b571db4bc8087d ]--- The driver is calling dev_kfree_skb() from code inside a spinlock, where h/w interrupts are disabled. This is forbidden, as documented in include/linux/netdevice.h. The correct function to use dev_kfree_skb_irq(), or dev_kfree_skb_any(). Fix by using the correct dev_kfree_skb_xxx() functions: in lan743x_tx_release_desc(): called by lan743x_tx_release_completed_descriptors() called by in lan743x_tx_napi_poll() which holds a spinlock called by lan743x_tx_release_all_descriptors() called by lan743x_tx_close() which can-sleep conclusion: use dev_kfree_skb_any() in lan743x_tx_xmit_frame(): which holds a spinlock conclusion: use dev_kfree_skb_irq() in lan743x_tx_close(): which can-sleep conclusion: use dev_kfree_skb() in lan743x_rx_release_ring_element(): called by lan743x_rx_close() which can-sleep called by lan743x_rx_open() which can-sleep conclusion: use dev_kfree_skb() Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver") Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20201112185949.11315-1-TheSven73@gmail.com Signed-off-by: Jakub Kicinski commit e28c0d7c92c89016c12a677616668957351e7542 Merge: 31908a604ced3 f5785283dd648 Author: Linus Torvalds Date: Sat Nov 14 12:35:11 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "14 patches. Subsystems affected by this patch series: mm (migration, vmscan, slub, gup, memcg, hugetlbfs), mailmap, kbuild, reboot, watchdog, panic, and ocfs2" * emailed patches from Andrew Morton : ocfs2: initialize ip_next_orphan panic: don't dump stack twice on warn hugetlbfs: fix anon huge page migration race mm: memcontrol: fix missing wakeup polling thread kernel/watchdog: fix watchdog_allowed_mask not used warning reboot: fix overflow parsing reboot cpu number Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint" compiler.h: fix barrier_data() on clang mm/gup: use unpin_user_pages() in __gup_longterm_locked() mm/slub: fix panic in slab_alloc_node() mailmap: fix entry for Dmitry Baryshkov/Eremin-Solenikov mm/vmscan: fix NR_ISOLATED_FILE corruption on 64-bit mm/compaction: stop isolation if too many pages are isolated and we have pages to migrate mm/compaction: count pages and stop correctly during page isolation commit 31908a604ced3c047022c2cc9f178d3287f06dfe Merge: 7e908b7461ec3 c277ca155d2f0 Author: Linus Torvalds Date: Sat Nov 14 12:30:18 2020 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "Two small clk driver fixes: - Make to_clk_regmap() inline to avoid compiler annoyance - Fix critical clks on i.MX imx8m SoCs" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: imx8m: fix bus critical clk registration clk: define to_clk_regmap() as inline function commit 7e908b7461ec395293335852485a183c16765303 Merge: 0c0451112b629 60268b0e8258f Author: Linus Torvalds Date: Sat Nov 14 12:25:39 2020 -0800 Merge tag 'hwmon-for-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - Fix potential bufer overflow in pmbus/max20730 driver - Fix locking issue in pmbus core - Fix regression causing timeouts in applesmc driver - Fix RPM calculation in pwm-fan driver - Restrict counter visibility in amd_energy driver * tag 'hwmon-for-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (amd_energy) modify the visibility of the counters hwmon: (applesmc) Re-work SMC comms hwmon: (pwm-fan) Fix RPM calculation hwmon: (pmbus) Add mutex locking for sysfs reads hwmon: (pmbus/max20730) use scnprintf() instead of snprintf() commit 0c0451112b629946c93ed2102b7ae47d4d1dc0bc Merge: 30636a59f4c1a 2e6f11a797a24 Author: Linus Torvalds Date: Sat Nov 14 12:19:21 2020 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three small fixes, all in the embedded ufs driver subsystem" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufshcd: Fix missing destroy_workqueue() scsi: ufs: Try to save power mode change and UIC cmd completion timeout scsi: ufs: Fix unbalanced scsi_block_reqs_cnt caused by ufshcd_hold() commit 1ba86d4366e023d96df3dbe415eea7f1dc08c303 Author: Paul Moore Date: Fri Nov 13 16:30:40 2020 -0500 netlabel: fix an uninitialized warning in netlbl_unlabel_staticlist() Static checking revealed that a previous fix to netlbl_unlabel_staticlist() leaves a stack variable uninitialized, this patches fixes that. Fixes: 866358ec331f ("netlabel: fix our progress tracking in netlbl_unlabel_staticlist()") Reported-by: Dan Carpenter Signed-off-by: Paul Moore Reviewed-by: James Morris Link: https://lore.kernel.org/r/160530304068.15651.18355773009751195447.stgit@sifl Signed-off-by: Jakub Kicinski commit 30636a59f4c1a40720156079cabcad60351949f2 Merge: 4aea779d35120 c350f8bea2717 Author: Linus Torvalds Date: Sat Nov 14 12:04:02 2020 -0800 Merge tag 'selinux-pr-20201113' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux fix from Paul Moore: "One small SELinux patch to make sure we return an error code when an allocation fails. It passes all of our tests, but given the nature of the patch that isn't surprising" * tag 'selinux-pr-20201113' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: Fix error return code in sel_ib_pkey_sid_slow() commit 057a10fa1f73d745c8e69aa54ab147715f5630ae Author: Xin Long Date: Sat Nov 14 13:22:53 2020 +0800 sctp: change to hold/put transport for proto_unreach_timer A call trace was found in Hangbin's Codenomicon testing with debug kernel: [ 2615.981988] ODEBUG: free active (active state 0) object type: timer_list hint: sctp_generate_proto_unreach_event+0x0/0x3a0 [sctp] [ 2615.995050] WARNING: CPU: 17 PID: 0 at lib/debugobjects.c:328 debug_print_object+0x199/0x2b0 [ 2616.095934] RIP: 0010:debug_print_object+0x199/0x2b0 [ 2616.191533] Call Trace: [ 2616.194265] [ 2616.202068] debug_check_no_obj_freed+0x25e/0x3f0 [ 2616.207336] slab_free_freelist_hook+0xeb/0x140 [ 2616.220971] kfree+0xd6/0x2c0 [ 2616.224293] rcu_do_batch+0x3bd/0xc70 [ 2616.243096] rcu_core+0x8b9/0xd00 [ 2616.256065] __do_softirq+0x23d/0xacd [ 2616.260166] irq_exit+0x236/0x2a0 [ 2616.263879] smp_apic_timer_interrupt+0x18d/0x620 [ 2616.269138] apic_timer_interrupt+0xf/0x20 [ 2616.273711] This is because it holds asoc when transport->proto_unreach_timer starts and puts asoc when the timer stops, and without holding transport the transport could be freed when the timer is still running. So fix it by holding/putting transport instead for proto_unreach_timer in transport, just like other timers in transport. v1->v2: - Also use sctp_transport_put() for the "out_unlock:" path in sctp_generate_proto_unreach_event(), as Marcelo noticed. Fixes: 50b5d6ad6382 ("sctp: Fix a race between ICMP protocol unreachable and connect()") Reported-by: Hangbin Liu Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Link: https://lore.kernel.org/r/102788809b554958b13b95d33440f5448113b8d6.1605331373.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski commit 4aea779d35120d5062647d288817678decb28c10 Merge: 3ad216ee73abc 9a5085b3fad5d Author: Linus Torvalds Date: Sat Nov 14 11:56:59 2020 -0800 Merge tag 'for-linus-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull uml fix from Richard Weinberger: "Call PMD destructor in __pmd_free_tlb()" * tag 'for-linus-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Call pgtable_pmd_page_dtor() in __pmd_free_tlb() commit 3ad216ee73abc554ed8f13f4f8b70845a7bef6da Author: David Howells Date: Sat Nov 14 17:27:57 2020 +0000 afs: Fix afs_write_end() when called with copied == 0 [ver #3] When afs_write_end() is called with copied == 0, it tries to set the dirty region, but there's no way to actually encode a 0-length region in the encoding in page->private. "0,0", for example, indicates a 1-byte region at offset 0. The maths miscalculates this and sets it incorrectly. Fix it to just do nothing but unlock and put the page in this case. We don't actually need to mark the page dirty as nothing presumably changed. Fixes: 65dd2d6072d3 ("afs: Alter dirty range encoding in page->private") Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 65b422d9b61ba12c08150784e8012fa1892ad03e Author: Stefano Garzarella Date: Thu Nov 12 14:38:37 2020 +0100 vsock: forward all packets to the host when no H2G is registered Before commit c0cfa2d8a788 ("vsock: add multi-transports support"), if a G2H transport was loaded (e.g. virtio transport), every packets was forwarded to the host, regardless of the destination CID. The H2G transports implemented until then (vhost-vsock, VMCI) always responded with an error, if the destination CID was not VMADDR_CID_HOST. From that commit, we are using the remote CID to decide which transport to use, so packets with remote CID > VMADDR_CID_HOST(2) are sent only through H2G transport. If no H2G is available, packets are discarded directly in the guest. Some use cases (e.g. Nitro Enclaves [1]) rely on the old behaviour to implement sibling VMs communication, so we restore the old behavior when no H2G is registered. It will be up to the host to discard packets if the destination is not the right one. As it was already implemented before adding multi-transport support. Tested with nested QEMU/KVM by me and Nitro Enclaves by Andra. [1] Documentation/virt/ne_overview.rst Cc: Jorgen Hansen Cc: Dexuan Cui Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") Reported-by: Andra Paraschiv Tested-by: Andra Paraschiv Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201112133837.34183-1-sgarzare@redhat.com Signed-off-by: Jakub Kicinski commit 92307069a96c07d9b6e74b96b79390e7cd7d2111 Author: Tobias Waldekranz Date: Thu Nov 12 12:43:35 2020 +0100 net: dsa: mv88e6xxx: Avoid VTU corruption on 6097 As soon as you add the second port to a VLAN, all other port membership configuration is overwritten with zeroes. The HW interprets this as all ports being "unmodified members" of the VLAN. In the simple case when all ports belong to the same VLAN, switching will still work. But using multiple VLANs or trying to set multiple ports as tagged members will not work. On the 6352, doing a VTU GetNext op, followed by an STU GetNext op will leave you with both the member- and state- data in the VTU/STU data registers. But on the 6097 (which uses the same implementation), the STU GetNext will override the information gathered from the VTU GetNext. Separate the two stages, parsing the result of the VTU GetNext before doing the STU GetNext. We opt to update the existing implementation for all applicable chips, as opposed to creating a separate callback for 6097, because although the previous implementation did work for (at least) 6352, the datasheet does not mention the masking behavior. Fixes: ef6fcea37f01 ("net: dsa: mv88e6xxx: get STU entry on VTU GetNext") Signed-off-by: Tobias Waldekranz Link: https://lore.kernel.org/r/20201112114335.27371-1-tobias@waldekranz.com Signed-off-by: Jakub Kicinski commit f5785283dd64867a711ca1fb1f5bb172f252ecdf Author: Wengang Wang Date: Fri Nov 13 22:52:23 2020 -0800 ocfs2: initialize ip_next_orphan Though problem if found on a lower 4.1.12 kernel, I think upstream has same issue. In one node in the cluster, there is the following callback trace: # cat /proc/21473/stack __ocfs2_cluster_lock.isra.36+0x336/0x9e0 [ocfs2] ocfs2_inode_lock_full_nested+0x121/0x520 [ocfs2] ocfs2_evict_inode+0x152/0x820 [ocfs2] evict+0xae/0x1a0 iput+0x1c6/0x230 ocfs2_orphan_filldir+0x5d/0x100 [ocfs2] ocfs2_dir_foreach_blk+0x490/0x4f0 [ocfs2] ocfs2_dir_foreach+0x29/0x30 [ocfs2] ocfs2_recover_orphans+0x1b6/0x9a0 [ocfs2] ocfs2_complete_recovery+0x1de/0x5c0 [ocfs2] process_one_work+0x169/0x4a0 worker_thread+0x5b/0x560 kthread+0xcb/0xf0 ret_from_fork+0x61/0x90 The above stack is not reasonable, the final iput shouldn't happen in ocfs2_orphan_filldir() function. Looking at the code, 2067 /* Skip inodes which are already added to recover list, since dio may 2068 * happen concurrently with unlink/rename */ 2069 if (OCFS2_I(iter)->ip_next_orphan) { 2070 iput(iter); 2071 return 0; 2072 } 2073 The logic thinks the inode is already in recover list on seeing ip_next_orphan is non-NULL, so it skip this inode after dropping a reference which incremented in ocfs2_iget(). While, if the inode is already in recover list, it should have another reference and the iput() at line 2070 should not be the final iput (dropping the last reference). So I don't think the inode is really in the recover list (no vmcore to confirm). Note that ocfs2_queue_orphans(), though not shown up in the call back trace, is holding cluster lock on the orphan directory when looking up for unlinked inodes. The on disk inode eviction could involve a lot of IOs which may need long time to finish. That means this node could hold the cluster lock for very long time, that can lead to the lock requests (from other nodes) to the orhpan directory hang for long time. Looking at more on ip_next_orphan, I found it's not initialized when allocating a new ocfs2_inode_info structure. This causes te reflink operations from some nodes hang for very long time waiting for the cluster lock on the orphan directory. Fix: initialize ip_next_orphan as NULL. Signed-off-by: Wengang Wang Signed-off-by: Andrew Morton Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: Link: https://lkml.kernel.org/r/20201109171746.27884-1-wen.gang.wang@oracle.com Signed-off-by: Linus Torvalds commit 2f31ad64a9cce8b2409d2d4563482adfb8664082 Author: Christophe Leroy Date: Fri Nov 13 22:52:20 2020 -0800 panic: don't dump stack twice on warn Before commit 3f388f28639f ("panic: dump registers on panic_on_warn"), __warn() was calling show_regs() when regs was not NULL, and show_stack() otherwise. After that commit, show_stack() is called regardless of whether show_regs() has been called or not, leading to duplicated Call Trace: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at arch/powerpc/mm/nohash/8xx.c:186 mmu_mark_initmem_nx+0x24/0x94 CPU: 0 PID: 1 Comm: swapper Not tainted 5.10.0-rc2-s3k-dev-01375-gf46ec0d3ecbd-dirty #4092 NIP: c00128b4 LR: c0010228 CTR: 00000000 REGS: c9023e40 TRAP: 0700 Not tainted (5.10.0-rc2-s3k-dev-01375-gf46ec0d3ecbd-dirty) MSR: 00029032 CR: 24000424 XER: 00000000 GPR00: c0010228 c9023ef8 c2100000 0074c000 ffffffff 00000000 c2151000 c07b3880 GPR08: ff000900 0074c000 c8000000 c33b53a8 24000822 00000000 c0003a20 00000000 GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 GPR24: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00800000 NIP [c00128b4] mmu_mark_initmem_nx+0x24/0x94 LR [c0010228] free_initmem+0x20/0x58 Call Trace: free_initmem+0x20/0x58 kernel_init+0x1c/0x114 ret_from_kernel_thread+0x14/0x1c Instruction dump: 7d291850 7d234b78 4e800020 9421ffe0 7c0802a6 bfc10018 3fe0c060 3bff0000 3fff4080 3bffffff 90010024 57ff0010 <0fe00000> 392001cd 7c3e0b78 953e0008 CPU: 0 PID: 1 Comm: swapper Not tainted 5.10.0-rc2-s3k-dev-01375-gf46ec0d3ecbd-dirty #4092 Call Trace: __warn+0x8c/0xd8 (unreliable) report_bug+0x11c/0x154 program_check_exception+0x1dc/0x6e0 ret_from_except_full+0x0/0x4 --- interrupt: 700 at mmu_mark_initmem_nx+0x24/0x94 LR = free_initmem+0x20/0x58 free_initmem+0x20/0x58 kernel_init+0x1c/0x114 ret_from_kernel_thread+0x14/0x1c ---[ end trace 31702cd2a9570752 ]--- Only call show_stack() when regs is NULL. Fixes: 3f388f28639f ("panic: dump registers on panic_on_warn") Signed-off-by: Christophe Leroy Signed-off-by: Andrew Morton Cc: Alexey Kardashevskiy Cc: Kefeng Wang Link: https://lkml.kernel.org/r/e8c055458b080707f1bc1a98ff8bea79d0cec445.1604748361.git.christophe.leroy@csgroup.eu Signed-off-by: Linus Torvalds commit 336bf30eb76580b579dc711ded5d599d905c0217 Author: Mike Kravetz Date: Fri Nov 13 22:52:16 2020 -0800 hugetlbfs: fix anon huge page migration race Qian Cai reported the following BUG in [1] LTP: starting move_pages12 BUG: unable to handle page fault for address: ffffffffffffffe0 ... RIP: 0010:anon_vma_interval_tree_iter_first+0xa2/0x170 avc_start_pgoff at mm/interval_tree.c:63 Call Trace: rmap_walk_anon+0x141/0xa30 rmap_walk_anon at mm/rmap.c:1864 try_to_unmap+0x209/0x2d0 try_to_unmap at mm/rmap.c:1763 migrate_pages+0x1005/0x1fb0 move_pages_and_store_status.isra.47+0xd7/0x1a0 __x64_sys_move_pages+0xa5c/0x1100 do_syscall_64+0x5f/0x310 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Hugh Dickins diagnosed this as a migration bug caused by code introduced to use i_mmap_rwsem for pmd sharing synchronization. Specifically, the routine unmap_and_move_huge_page() is always passing the TTU_RMAP_LOCKED flag to try_to_unmap() while holding i_mmap_rwsem. This is wrong for anon pages as the anon_vma_lock should be held in this case. Further analysis suggested that i_mmap_rwsem was not required to he held at all when calling try_to_unmap for anon pages as an anon page could never be part of a shared pmd mapping. Discussion also revealed that the hack in hugetlb_page_mapping_lock_write to drop page lock and acquire i_mmap_rwsem is wrong. There is no way to keep mapping valid while dropping page lock. This patch does the following: - Do not take i_mmap_rwsem and set TTU_RMAP_LOCKED for anon pages when calling try_to_unmap. - Remove the hacky code in hugetlb_page_mapping_lock_write. The routine will now simply do a 'trylock' while still holding the page lock. If the trylock fails, it will return NULL. This could impact the callers: - migration calling code will receive -EAGAIN and retry up to the hard coded limit (10). - memory error code will treat the page as BUSY. This will force killing (SIGKILL) instead of SIGBUS any mapping tasks. Do note that this change in behavior only happens when there is a race. None of the standard kernel testing suites actually hit this race, but it is possible. [1] https://lore.kernel.org/lkml/20200708012044.GC992@lca.pw/ [2] https://lore.kernel.org/linux-mm/alpine.LSU.2.11.2010071833100.2214@eggly.anvils/ Fixes: c0d0381ade79 ("hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization") Reported-by: Qian Cai Suggested-by: Hugh Dickins Signed-off-by: Mike Kravetz Signed-off-by: Andrew Morton Acked-by: Naoya Horiguchi Cc: Link: https://lkml.kernel.org/r/20201105195058.78401-1-mike.kravetz@oracle.com Signed-off-by: Linus Torvalds commit 8b21ca0218d29cc6bb7028125c7e5a10dfb4730c Author: Muchun Song Date: Fri Nov 13 22:52:13 2020 -0800 mm: memcontrol: fix missing wakeup polling thread When we poll the swap.events, we can miss being woken up when the swap event occurs. Because we didn't notify. Fixes: f3a53a3a1e5b ("mm, memcontrol: implement memory.swap.events") Signed-off-by: Muchun Song Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Roman Gushchin Cc: Michal Hocko Cc: Yafang Shao Cc: Chris Down Cc: Tejun Heo Link: https://lkml.kernel.org/r/20201105161936.98312-1-songmuchun@bytedance.com Signed-off-by: Linus Torvalds commit e7e046155af04cdca5e1157f28b07e1651eb317b Author: Santosh Sivaraj Date: Fri Nov 13 22:52:10 2020 -0800 kernel/watchdog: fix watchdog_allowed_mask not used warning Define watchdog_allowed_mask only when SOFTLOCKUP_DETECTOR is enabled. Fixes: 7feeb9cd4f5b ("watchdog/sysctl: Clean up sysctl variable name space") Signed-off-by: Santosh Sivaraj Signed-off-by: Andrew Morton Reviewed-by: Petr Mladek Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20201106015025.1281561-1-santosh@fossix.org Signed-off-by: Linus Torvalds commit df5b0ab3e08a156701b537809914b339b0daa526 Author: Matteo Croce Date: Fri Nov 13 22:52:07 2020 -0800 reboot: fix overflow parsing reboot cpu number Limit the CPU number to num_possible_cpus(), because setting it to a value lower than INT_MAX but higher than NR_CPUS produces the following error on reboot and shutdown: BUG: unable to handle page fault for address: ffffffff90ab1bb0 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 1c09067 P4D 1c09067 PUD 1c0a063 PMD 0 Oops: 0000 [#1] SMP CPU: 1 PID: 1 Comm: systemd-shutdow Not tainted 5.9.0-rc8-kvm #110 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 RIP: 0010:migrate_to_reboot_cpu+0xe/0x60 Code: ea ea 00 48 89 fa 48 c7 c7 30 57 f1 81 e9 fa ef ff ff 66 2e 0f 1f 84 00 00 00 00 00 53 8b 1d d5 ea ea 00 e8 14 33 fe ff 89 da <48> 0f a3 15 ea fc bd 00 48 89 d0 73 29 89 c2 c1 e8 06 65 48 8b 3c RSP: 0018:ffffc90000013e08 EFLAGS: 00010246 RAX: ffff88801f0a0000 RBX: 0000000077359400 RCX: 0000000000000000 RDX: 0000000077359400 RSI: 0000000000000002 RDI: ffffffff81c199e0 RBP: ffffffff81c1e3c0 R08: ffff88801f41f000 R09: ffffffff81c1e348 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 00007f32bedf8830 R14: 00000000fee1dead R15: 0000000000000000 FS: 00007f32bedf8980(0000) GS:ffff88801f480000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffff90ab1bb0 CR3: 000000001d057000 CR4: 00000000000006a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __do_sys_reboot.cold+0x34/0x5b do_syscall_64+0x2d/0x40 Fixes: 1b3a5d02ee07 ("reboot: move arch/x86 reboot= handling to generic kernel") Signed-off-by: Matteo Croce Signed-off-by: Andrew Morton Cc: Arnd Bergmann Cc: Fabian Frederick Cc: Greg Kroah-Hartman Cc: Guenter Roeck Cc: Kees Cook Cc: Mike Rapoport Cc: Pavel Tatashin Cc: Petr Mladek Cc: Robin Holt Cc: Link: https://lkml.kernel.org/r/20201103214025.116799-3-mcroce@linux.microsoft.com Signed-off-by: Linus Torvalds commit 8b92c4ff4423aa9900cf838d3294fcade4dbda35 Author: Matteo Croce Date: Fri Nov 13 22:52:02 2020 -0800 Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint" Patch series "fix parsing of reboot= cmdline", v3. The parsing of the reboot= cmdline has two major errors: - a missing bound check can crash the system on reboot - parsing of the cpu number only works if specified last Fix both. This patch (of 2): This reverts commit 616feab753972b97. kstrtoint() and simple_strtoul() have a subtle difference which makes them non interchangeable: if a non digit character is found amid the parsing, the former will return an error, while the latter will just stop parsing, e.g. simple_strtoul("123xyx") = 123. The kernel cmdline reboot= argument allows to specify the CPU used for rebooting, with the syntax `s####` among the other flags, e.g. "reboot=warm,s31,force", so if this flag is not the last given, it's silently ignored as well as the subsequent ones. Fixes: 616feab75397 ("kernel/reboot.c: convert simple_strtoul to kstrtoint") Signed-off-by: Matteo Croce Signed-off-by: Andrew Morton Cc: Guenter Roeck Cc: Petr Mladek Cc: Arnd Bergmann Cc: Mike Rapoport Cc: Kees Cook Cc: Pavel Tatashin Cc: Robin Holt Cc: Fabian Frederick Cc: Greg Kroah-Hartman Cc: Link: https://lkml.kernel.org/r/20201103214025.116799-2-mcroce@linux.microsoft.com Signed-off-by: Linus Torvalds commit 3347acc6fcd4ee71ad18a9ff9d9dac176b517329 Author: Arvind Sankar Date: Fri Nov 13 22:51:59 2020 -0800 compiler.h: fix barrier_data() on clang Commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") neglected to copy barrier_data() from compiler-gcc.h into compiler-clang.h. The definition in compiler-gcc.h was really to work around clang's more aggressive optimization, so this broke barrier_data() on clang, and consequently memzero_explicit() as well. For example, this results in at least the memzero_explicit() call in lib/crypto/sha256.c:sha256_transform() being optimized away by clang. Fix this by moving the definition of barrier_data() into compiler.h. Also move the gcc/clang definition of barrier() into compiler.h, __memory_barrier() is icc-specific (and barrier() is already defined using it in compiler-intel.h) and doesn't belong in compiler.h. [rdunlap@infradead.org: fix ALPHA builds when SMP is not enabled] Link: https://lkml.kernel.org/r/20201101231835.4589-1-rdunlap@infradead.org Fixes: 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") Signed-off-by: Arvind Sankar Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Tested-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Reviewed-by: Kees Cook Cc: Link: https://lkml.kernel.org/r/20201014212631.207844-1-nivedita@alum.mit.edu Signed-off-by: Linus Torvalds commit 96e1fac162cc0086c50b2b14062112adb2ba640e Author: Jason Gunthorpe Date: Fri Nov 13 22:51:56 2020 -0800 mm/gup: use unpin_user_pages() in __gup_longterm_locked() When FOLL_PIN is passed to __get_user_pages() the page list must be put back using unpin_user_pages() otherwise the page pin reference persists in a corrupted state. There are two places in the unwind of __gup_longterm_locked() that put the pages back without checking. Normally on error this function would return the partial page list making this the caller's responsibility, but in these two cases the caller is not allowed to see these pages at all. Fixes: 3faa52c03f44 ("mm/gup: track FOLL_PIN pages") Reported-by: Ira Weiny Signed-off-by: Jason Gunthorpe Signed-off-by: Andrew Morton Reviewed-by: Ira Weiny Reviewed-by: John Hubbard Cc: Aneesh Kumar K.V Cc: Dan Williams Cc: Link: https://lkml.kernel.org/r/0-v2-3ae7d9d162e2+2a7-gup_cma_fix_jgg@nvidia.com Signed-off-by: Linus Torvalds commit 22e4663e916321b72972c69ca0c6b962f529bd78 Author: Laurent Dufour Date: Fri Nov 13 22:51:53 2020 -0800 mm/slub: fix panic in slab_alloc_node() While doing memory hot-unplug operation on a PowerPC VM running 1024 CPUs with 11TB of ram, I hit the following panic: BUG: Kernel NULL pointer dereference on read at 0x00000007 Faulting instruction address: 0xc000000000456048 Oops: Kernel access of bad area, sig: 11 [#2] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS= 2048 NUMA pSeries Modules linked in: rpadlpar_io rpaphp CPU: 160 PID: 1 Comm: systemd Tainted: G D 5.9.0 #1 NIP: c000000000456048 LR: c000000000455fd4 CTR: c00000000047b350 REGS: c00006028d1b77a0 TRAP: 0300 Tainted: G D (5.9.0) MSR: 8000000000009033 CR: 24004228 XER: 00000000 CFAR: c00000000000f1b0 DAR: 0000000000000007 DSISR: 40000000 IRQMASK: 0 GPR00: c000000000455fd4 c00006028d1b7a30 c000000001bec800 0000000000000000 GPR04: 0000000000000dc0 0000000000000000 00000000000374ef c00007c53df99320 GPR08: 000007c53c980000 0000000000000000 000007c53c980000 0000000000000000 GPR12: 0000000000004400 c00000001e8e4400 0000000000000000 0000000000000f6a GPR16: 0000000000000000 c000000001c25930 c000000001d62528 00000000000000c1 GPR20: c000000001d62538 c00006be469e9000 0000000fffffffe0 c0000000003c0ff8 GPR24: 0000000000000018 0000000000000000 0000000000000dc0 0000000000000000 GPR28: c00007c513755700 c000000001c236a4 c00007bc4001f800 0000000000000001 NIP [c000000000456048] __kmalloc_node+0x108/0x790 LR [c000000000455fd4] __kmalloc_node+0x94/0x790 Call Trace: kvmalloc_node+0x58/0x110 mem_cgroup_css_online+0x10c/0x270 online_css+0x48/0xd0 cgroup_apply_control_enable+0x2c4/0x470 cgroup_mkdir+0x408/0x5f0 kernfs_iop_mkdir+0x90/0x100 vfs_mkdir+0x138/0x250 do_mkdirat+0x154/0x1c0 system_call_exception+0xf8/0x200 system_call_common+0xf0/0x27c Instruction dump: e93e0000 e90d0030 39290008 7cc9402a e94d0030 e93e0000 7ce95214 7f89502a 2fbc0000 419e0018 41920230 e9270010 <89290007> 7f994800 419e0220 7ee6bb78 This pointing to the following code: mm/slub.c:2851 if (unlikely(!object || !node_match(page, node))) { c000000000456038: 00 00 bc 2f cmpdi cr7,r28,0 c00000000045603c: 18 00 9e 41 beq cr7,c000000000456054 <__kmalloc_node+0x114> node_match(): mm/slub.c:2491 if (node != NUMA_NO_NODE && page_to_nid(page) != node) c000000000456040: 30 02 92 41 beq cr4,c000000000456270 <__kmalloc_node+0x330> page_to_nid(): include/linux/mm.h:1294 c000000000456044: 10 00 27 e9 ld r9,16(r7) c000000000456048: 07 00 29 89 lbz r9,7(r9) <<<< r9 = NULL node_match(): mm/slub.c:2491 c00000000045604c: 00 48 99 7f cmpw cr7,r25,r9 c000000000456050: 20 02 9e 41 beq cr7,c000000000456270 <__kmalloc_node+0x330> The panic occurred in slab_alloc_node() when checking for the page's node: object = c->freelist; page = c->page; if (unlikely(!object || !node_match(page, node))) { object = __slab_alloc(s, gfpflags, node, addr, c); stat(s, ALLOC_SLOWPATH); The issue is that object is not NULL while page is NULL which is odd but may happen if the cache flush happened after loading object but before loading page. Thus checking for the page pointer is required too. The cache flush is done through an inter processor interrupt when a piece of memory is off-lined. That interrupt is triggered when a memory hot-unplug operation is initiated and offline_pages() is calling the slub's MEM_GOING_OFFLINE callback slab_mem_going_offline_callback() which is calling flush_cpu_slab(). If that interrupt is caught between the reading of c->freelist and the reading of c->page, this could lead to such a situation. That situation is expected and the later call to this_cpu_cmpxchg_double() will detect the change to c->freelist and redo the whole operation. In commit 6159d0f5c03e ("mm/slub.c: page is always non-NULL in node_match()") check on the page pointer has been removed assuming that page is always valid when it is called. It happens that this is not true in that particular case, so check for page before calling node_match() here. Fixes: 6159d0f5c03e ("mm/slub.c: page is always non-NULL in node_match()") Signed-off-by: Laurent Dufour Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Acked-by: Christoph Lameter Cc: Wei Yang Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Nathan Lynch Cc: Scott Cheloha Cc: Michal Hocko Cc: Link: https://lkml.kernel.org/r/20201027190406.33283-1-ldufour@linux.ibm.com Signed-off-by: Linus Torvalds commit 044747e971ace469064e68a0e8b3666011f0f3bd Author: Dmitry Baryshkov Date: Fri Nov 13 22:51:49 2020 -0800 mailmap: fix entry for Dmitry Baryshkov/Eremin-Solenikov Change back surname to new (old) one. Dmitry Baryshkov -> Dmitry Eremin-Solenikov -> Dmitry Baryshkov. Map several odd entries to main identity. Signed-off-by: Dmitry Baryshkov Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20201103005158.1181426-1-dmitry.baryshkov@linaro.org Signed-off-by: Linus Torvalds commit 2da9f6305f306ffbbb44790675799328fb73119d Author: Nicholas Piggin Date: Fri Nov 13 22:51:46 2020 -0800 mm/vmscan: fix NR_ISOLATED_FILE corruption on 64-bit Previously the negated unsigned long would be cast back to signed long which would have the correct negative value. After commit 730ec8c01a2b ("mm/vmscan.c: change prototype for shrink_page_list"), the large unsigned int converts to a large positive signed long. Symptoms include CMA allocations hanging forever holding the cma_mutex due to alloc_contig_range->...->isolate_migratepages_block waiting forever in "while (unlikely(too_many_isolated(pgdat)))". [akpm@linux-foundation.org: fix -stat.nr_lazyfree_fail as well, per Michal] Fixes: 730ec8c01a2b ("mm/vmscan.c: change prototype for shrink_page_list") Signed-off-by: Nicholas Piggin Signed-off-by: Andrew Morton Acked-by: Michal Hocko Cc: Vaneet Narang Cc: Maninder Singh Cc: Amit Sahrawat Cc: Mel Gorman Cc: Vlastimil Babka Cc: Link: https://lkml.kernel.org/r/20201029032320.1448441-1-npiggin@gmail.com Signed-off-by: Linus Torvalds commit d20bdd571ee5c9966191568527ecdb1bd4b52368 Author: Zi Yan Date: Fri Nov 13 22:51:43 2020 -0800 mm/compaction: stop isolation if too many pages are isolated and we have pages to migrate In isolate_migratepages_block, if we have too many isolated pages and nr_migratepages is not zero, we should try to migrate what we have without wasting time on isolating. In theory it's possible that multiple parallel compactions will cause too_many_isolated() to become true even if each has isolated less than COMPACT_CLUSTER_MAX, and loop forever in the while loop. Bailing immediately prevents that. [vbabka@suse.cz: changelog addition] Fixes: 1da2f328fa64 (“mm,thp,compaction,cma: allow THP migration for CMA allocations”) Suggested-by: Vlastimil Babka Signed-off-by: Zi Yan Signed-off-by: Andrew Morton Cc: Cc: Mel Gorman Cc: Michal Hocko Cc: Rik van Riel Cc: Yang Shi Link: https://lkml.kernel.org/r/20201030183809.3616803-2-zi.yan@sent.com Signed-off-by: Linus Torvalds commit 38935861d85a4d9a353d1dd5a156c97700e2765d Author: Zi Yan Date: Fri Nov 13 22:51:40 2020 -0800 mm/compaction: count pages and stop correctly during page isolation In isolate_migratepages_block, when cc->alloc_contig is true, we are able to isolate compound pages. But nr_migratepages and nr_isolated did not count compound pages correctly, causing us to isolate more pages than we thought. So count compound pages as the number of base pages they contain. Otherwise, we might be trapped in too_many_isolated while loop, since the actual isolated pages can go up to COMPACT_CLUSTER_MAX*512=16384, where COMPACT_CLUSTER_MAX is 32, since we stop isolation after cc->nr_migratepages reaches to COMPACT_CLUSTER_MAX. In addition, after we fix the issue above, cc->nr_migratepages could never be equal to COMPACT_CLUSTER_MAX if compound pages are isolated, thus page isolation could not stop as we intended. Change the isolation stop condition to '>='. The issue can be triggered as follows: In a system with 16GB memory and an 8GB CMA region reserved by hugetlb_cma, if we first allocate 10GB THPs and mlock them (so some THPs are allocated in the CMA region and mlocked), reserving 6 1GB hugetlb pages via /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages will get stuck (looping in too_many_isolated function) until we kill either task. With the patch applied, oom will kill the application with 10GB THPs and let hugetlb page reservation finish. [ziy@nvidia.com: v3] Link: https://lkml.kernel.org/r/20201030183809.3616803-1-zi.yan@sent.com Fixes: 1da2f328fa64 ("cmm,thp,compaction,cma: allow THP migration for CMA allocations") Signed-off-by: Zi Yan Signed-off-by: Andrew Morton Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Rik van Riel Cc: Michal Hocko Cc: Mel Gorman Cc: Link: https://lkml.kernel.org/r/20201029200435.3386066-1-zi.yan@sent.com Signed-off-by: Linus Torvalds commit 37344718bd7032639a02053e06b51697f90154ce Author: Zhang Changzhong Date: Thu Nov 12 19:23:59 2020 +0800 net: phy: smsc: add missed clk_disable_unprepare in smsc_phy_probe() Add the missing clk_disable_unprepare() before return from smsc_phy_probe() in the error handling case. Fixes: bedd8d78aba3 ("net: phy: smsc: LAN8710/20: add phy refclk in support") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1605180239-1792-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit b7131ee0bac5e5df73e4098e77bbddb3a31d06ff Author: Christoph Hellwig Date: Sat Nov 14 19:12:46 2020 +0100 blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats disk_get_part needs to be paired with a disk_put_part. Cc: stable@vger.kernel.org Fixes: ef45fe470e1 ("blk-cgroup: show global disk stats in root cgroup io.stat") Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e5b1032a656e9aa4c7a4df77cb9156a2a651a5f9 Author: Hans de Goede Date: Tue Nov 10 14:38:35 2020 +0100 iio: accel: kxcjk1013: Add support for KIOX010A ACPI DSM for setting tablet-mode Some 360 degree hinges (yoga) style 2-in-1 devices use 2 KXCJ91008-s to allow the OS to determine the angle between the display and the base of the device, so that the OS can determine if the 2-in-1 is in laptop or in tablet-mode. On Windows both accelerometers are read by a special HingeAngleService process; and this process calls a DSM (Device Specific Method) on the ACPI KIOX010A device node for the sensor in the display, to let the embedded-controller (EC) know about the mode so that it can disable the kbd and touchpad to avoid spurious input while folded into tablet-mode. This notifying of the EC is problematic because sometimes the EC comes up thinking that device is in tablet-mode and the kbd and touchpad do not work. This happens for example on Irbis NB111 devices after a suspend / resume cycle (after a complete battery drain / hard reset without having booted Windows at least once). Other 2-in-1s which are likely affected too are e.g. the Teclast F5 and F6 series. The kxcjk-1013 driver may seem like a strange place to deal with this, but since it is *the* driver for the ACPI KIOX010A device, it is also the driver which has access to the ACPI handle needed by the DSM. Add support for calling the DSM and on probe unconditionally tell the EC that the device is laptop mode, fixing the kbd and touchpad sometimes not working. Fixes: 7f6232e69539 ("iio: accel: kxcjk1013: Add KIOX010A ACPI Hardware-ID") Reported-and-tested-by: russianneuromancer Signed-off-by: Hans de Goede Cc: Link: https://lore.kernel.org/r/20201110133835.129080-3-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit 11e94f28c3de35d5ad1ac6a242a5b30f4378991a Author: Hans de Goede Date: Tue Nov 10 14:38:34 2020 +0100 iio: accel: kxcjk1013: Replace is_smo8500_device with an acpi_type enum Replace the boolean is_smo8500_device variable with an acpi_type enum. For now this can be either ACPI_GENERIC or ACPI_SMO8500, this is a preparation patch for adding special handling for the KIOX010A ACPI HID, which will add a ACPI_KIOX010A acpi_type to the introduced enum. For stable as needed as precursor for next patch. Signed-off-by: Hans de Goede Fixes: 7f6232e69539 ("iio: accel: kxcjk1013: Add KIOX010A ACPI Hardware-ID") Cc: Link: https://lore.kernel.org/r/20201110133835.129080-2-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit 944d1444d53f5a213457e5096db370cfd06923d4 Author: Jens Axboe Date: Fri Nov 13 16:48:44 2020 -0700 io_uring: handle -EOPNOTSUPP on path resolution Any attempt to do path resolution on /proc/self from an async worker will yield -EOPNOTSUPP. We can safely do that resolution from the task itself, and without blocking, so retry it from there. Ideally io_uring would know this upfront and not have to go through the worker thread to find out, but that doesn't currently seem feasible. Signed-off-by: Jens Axboe commit f782e2c300a717233b64697affda3ea7aac00b2b Author: Dmitrii Banshchikov Date: Fri Nov 13 17:17:56 2020 +0000 bpf: Relax return code check for subprograms Currently verifier enforces return code checks for subprograms in the same manner as it does for program entry points. This prevents returning arbitrary scalar values from subprograms. Scalar type of returned values is checked by btf_prepare_func_args() and hence it should be safe to allow only scalars for now. Relax return code checks for subprograms and allow any correct scalar values. Fixes: 51c39bb1d5d10 (bpf: Introduce function-by-function verification) Signed-off-by: Dmitrii Banshchikov Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201113171756.90594-1-me@ubique.spb.ru commit 8168d23fbcee4f9f6c5a1ce8650417f09aef70eb Author: Keith Busch Date: Fri Nov 13 10:45:45 2020 -0800 nvme: fix memory leak freeing command effects xa_destroy() frees only internal data. The caller is responsible for freeing the exteranl objects referenced by an xarray. Fixes: 1cf7a12e09aa4 ("nvme: use an xarray to lookup the Commands Supported and Effects log") Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit f6224b8681326856937420e1db18564a934bf32b Author: Keith Busch Date: Fri Nov 13 10:28:30 2020 -0800 nvme: directly cache command effects log Remove the struct used for tracking known command effects logs in a list. This is now saved in an xarray that doesn't use these elements. Instead, store the log directly instead of the wrapper struct. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit 0f0d2c876c96d4908a9ef40959a44bec21bdd6cf Author: Minwoo Im Date: Thu Nov 5 23:28:47 2020 +0900 nvme: free sq/cq dbbuf pointers when dbbuf set fails If Doorbell Buffer Config command fails even 'dev->dbbuf_dbs != NULL' which means OACS indicates that NVME_CTRL_OACS_DBBUF_SUPP is set, nvme_dbbuf_update_and_check_event() will check event even it's not been successfully set. This patch fixes mismatch among dbbuf for sq/cqs in case that dbbuf command fails. Signed-off-by: Minwoo Im Signed-off-by: Christoph Hellwig commit 5c6fb4b28b165887c42c66731c90eaca818b04c6 Author: Lyude Paul Date: Fri Nov 13 19:14:10 2020 -0500 drm/nouveau/kms/nv50-: Use atomic encoder callbacks everywhere It turns out that I forgot to go through and make sure that I converted all encoder callbacks to use atomic_enable/atomic_disable(), so let's go and actually do that. Signed-off-by: Lyude Paul Cc: Kirill A. Shutemov Fixes: 09838c4efe9a ("drm/nouveau/kms: Search for encoders' connectors properly") Signed-off-by: Ben Skeggs commit 6c27ffabeb19ebf7dd6d4ccc29f1e57d1ef445d8 Author: Ben Skeggs Date: Sat Nov 14 13:50:44 2020 +1000 drm/nouveau/ttm: avoid using nouveau_drm.ttm.type_vram prior to nv50 Pre-NV50 chipsets don't currently use the MMU subsystem that later chipsets use, and type_vram is negative here, leading to an OOB memory access. This was previously guarded by a chipset check, restore that. Reported-by: Thomas Zimmermann Fixes: 5839172f0980 ("drm/nouveau: explicitly specify caching to use") Signed-off-by: Ben Skeggs commit 630f512280604eecae0ddc2b3f8402f7931c56fd Author: Alexander Kapshuk Date: Tue Oct 13 15:47:25 2020 +0300 drm/nouveau/kms: Fix NULL pointer dereference in nouveau_connector_detect_depth This oops manifests itself on the following hardware: 01:00.0 VGA compatible controller: NVIDIA Corporation G98M [GeForce G 103M] (rev a1) Oct 09 14:17:46 lp-sasha kernel: BUG: kernel NULL pointer dereference, address: 0000000000000000 Oct 09 14:17:46 lp-sasha kernel: #PF: supervisor read access in kernel mode Oct 09 14:17:46 lp-sasha kernel: #PF: error_code(0x0000) - not-present page Oct 09 14:17:46 lp-sasha kernel: PGD 0 P4D 0 Oct 09 14:17:46 lp-sasha kernel: Oops: 0000 [#1] SMP PTI Oct 09 14:17:46 lp-sasha kernel: CPU: 1 PID: 191 Comm: systemd-udevd Not tainted 5.9.0-rc8-next-20201009 #38 Oct 09 14:17:46 lp-sasha kernel: Hardware name: Hewlett-Packard Compaq Presario CQ61 Notebook PC/306A, BIOS F.03 03/23/2009 Oct 09 14:17:46 lp-sasha kernel: RIP: 0010:nouveau_connector_detect_depth+0x71/0xc0 [nouveau] Oct 09 14:17:46 lp-sasha kernel: Code: 0a 00 00 48 8b 49 48 c7 87 b8 00 00 00 06 00 00 00 80 b9 4d 0a 00 00 00 75 1e 83 fa 41 75 05 48 85 c0 75 29 8b 81 10 0d 00 00 <39> 06 7c 25 f6 81 14 0d 00 00 02 75 b7 c3 80 b9 0c 0d 00 00 00 75 Oct 09 14:17:46 lp-sasha kernel: RSP: 0018:ffffc9000028f8c0 EFLAGS: 00010297 Oct 09 14:17:46 lp-sasha kernel: RAX: 0000000000014c08 RBX: ffff8880369d4000 RCX: ffff8880369d3000 Oct 09 14:17:46 lp-sasha kernel: RDX: 0000000000000040 RSI: 0000000000000000 RDI: ffff8880369d4000 Oct 09 14:17:46 lp-sasha kernel: RBP: ffff88800601cc00 R08: ffff8880051da298 R09: ffffffff8226201a Oct 09 14:17:46 lp-sasha kernel: R10: ffff88800469aa80 R11: ffff888004c84ff8 R12: 0000000000000000 Oct 09 14:17:46 lp-sasha kernel: R13: ffff8880051da000 R14: 0000000000002000 R15: 0000000000000003 Oct 09 14:17:46 lp-sasha kernel: FS: 00007fd0192b3440(0000) GS:ffff8880bc900000(0000) knlGS:0000000000000000 Oct 09 14:17:46 lp-sasha kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Oct 09 14:17:46 lp-sasha kernel: CR2: 0000000000000000 CR3: 0000000004976000 CR4: 00000000000006e0 Oct 09 14:17:46 lp-sasha kernel: Call Trace: Oct 09 14:17:46 lp-sasha kernel: nouveau_connector_get_modes+0x1e6/0x240 [nouveau] Oct 09 14:17:46 lp-sasha kernel: ? kfree+0xb9/0x240 Oct 09 14:17:46 lp-sasha kernel: ? drm_connector_list_iter_next+0x7c/0xa0 Oct 09 14:17:46 lp-sasha kernel: drm_helper_probe_single_connector_modes+0x1ba/0x7c0 Oct 09 14:17:46 lp-sasha kernel: drm_client_modeset_probe+0x27e/0x1360 Oct 09 14:17:46 lp-sasha kernel: ? nvif_object_sclass_put+0xc/0x20 [nouveau] Oct 09 14:17:46 lp-sasha kernel: ? nouveau_cli_init+0x3cc/0x440 [nouveau] Oct 09 14:17:46 lp-sasha kernel: ? ktime_get_mono_fast_ns+0x49/0xa0 Oct 09 14:17:46 lp-sasha kernel: ? nouveau_drm_open+0x4e/0x180 [nouveau] Oct 09 14:17:46 lp-sasha kernel: __drm_fb_helper_initial_config_and_unlock+0x3f/0x4a0 Oct 09 14:17:46 lp-sasha kernel: ? drm_file_alloc+0x18f/0x260 Oct 09 14:17:46 lp-sasha kernel: ? mutex_lock+0x9/0x40 Oct 09 14:17:46 lp-sasha kernel: ? drm_client_init+0x110/0x160 Oct 09 14:17:46 lp-sasha kernel: nouveau_fbcon_init+0x14d/0x1c0 [nouveau] Oct 09 14:17:46 lp-sasha kernel: nouveau_drm_device_init+0x1c0/0x880 [nouveau] Oct 09 14:17:46 lp-sasha kernel: nouveau_drm_probe+0x11a/0x1e0 [nouveau] Oct 09 14:17:46 lp-sasha kernel: pci_device_probe+0xcd/0x140 Oct 09 14:17:46 lp-sasha kernel: really_probe+0xd8/0x400 Oct 09 14:17:46 lp-sasha kernel: driver_probe_device+0x4a/0xa0 Oct 09 14:17:46 lp-sasha kernel: device_driver_attach+0x9c/0xc0 Oct 09 14:17:46 lp-sasha kernel: __driver_attach+0x6f/0x100 Oct 09 14:17:46 lp-sasha kernel: ? device_driver_attach+0xc0/0xc0 Oct 09 14:17:46 lp-sasha kernel: bus_for_each_dev+0x75/0xc0 Oct 09 14:17:46 lp-sasha kernel: bus_add_driver+0x106/0x1c0 Oct 09 14:17:46 lp-sasha kernel: driver_register+0x86/0xe0 Oct 09 14:17:46 lp-sasha kernel: ? 0xffffffffa044e000 Oct 09 14:17:46 lp-sasha kernel: do_one_initcall+0x48/0x1e0 Oct 09 14:17:46 lp-sasha kernel: ? _cond_resched+0x11/0x60 Oct 09 14:17:46 lp-sasha kernel: ? kmem_cache_alloc_trace+0x19c/0x1e0 Oct 09 14:17:46 lp-sasha kernel: do_init_module+0x57/0x220 Oct 09 14:17:46 lp-sasha kernel: __do_sys_finit_module+0xa0/0xe0 Oct 09 14:17:46 lp-sasha kernel: do_syscall_64+0x33/0x40 Oct 09 14:17:46 lp-sasha kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9 Oct 09 14:17:46 lp-sasha kernel: RIP: 0033:0x7fd01a060d5d Oct 09 14:17:46 lp-sasha kernel: Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 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 e3 70 0c 00 f7 d8 64 89 01 48 Oct 09 14:17:46 lp-sasha kernel: RSP: 002b:00007ffc8ad38a98 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 Oct 09 14:17:46 lp-sasha kernel: RAX: ffffffffffffffda RBX: 0000563f6e7fd530 RCX: 00007fd01a060d5d Oct 09 14:17:46 lp-sasha kernel: RDX: 0000000000000000 RSI: 00007fd01a19f95d RDI: 000000000000000f Oct 09 14:17:46 lp-sasha kernel: RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000007 Oct 09 14:17:46 lp-sasha kernel: R10: 000000000000000f R11: 0000000000000246 R12: 00007fd01a19f95d Oct 09 14:17:46 lp-sasha kernel: R13: 0000000000000000 R14: 0000563f6e7fbc10 R15: 0000563f6e7fd530 Oct 09 14:17:46 lp-sasha kernel: Modules linked in: nouveau(+) ttm xt_string xt_mark xt_LOG vgem v4l2_dv_timings uvcvideo ulpi udf ts_kmp ts_fsm ts_bm snd_aloop sil164 qat_dh895xccvf nf_nat_sip nf_nat_irc nf_nat_ftp nf_nat nf_log_ipv6 nf_log_ipv4 nf_log_common ltc2990 lcd intel_qat input_leds i2c_mux gspca_main videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc drivetemp cuse fuse crc_itu_t coretemp ch7006 ath5k ath algif_hash Oct 09 14:17:46 lp-sasha kernel: CR2: 0000000000000000 Oct 09 14:17:46 lp-sasha kernel: ---[ end trace 0ddafe218ad30017 ]--- Oct 09 14:17:46 lp-sasha kernel: RIP: 0010:nouveau_connector_detect_depth+0x71/0xc0 [nouveau] Oct 09 14:17:46 lp-sasha kernel: Code: 0a 00 00 48 8b 49 48 c7 87 b8 00 00 00 06 00 00 00 80 b9 4d 0a 00 00 00 75 1e 83 fa 41 75 05 48 85 c0 75 29 8b 81 10 0d 00 00 <39> 06 7c 25 f6 81 14 0d 00 00 02 75 b7 c3 80 b9 0c 0d 00 00 00 75 Oct 09 14:17:46 lp-sasha kernel: RSP: 0018:ffffc9000028f8c0 EFLAGS: 00010297 Oct 09 14:17:46 lp-sasha kernel: RAX: 0000000000014c08 RBX: ffff8880369d4000 RCX: ffff8880369d3000 Oct 09 14:17:46 lp-sasha kernel: RDX: 0000000000000040 RSI: 0000000000000000 RDI: ffff8880369d4000 Oct 09 14:17:46 lp-sasha kernel: RBP: ffff88800601cc00 R08: ffff8880051da298 R09: ffffffff8226201a Oct 09 14:17:46 lp-sasha kernel: R10: ffff88800469aa80 R11: ffff888004c84ff8 R12: 0000000000000000 Oct 09 14:17:46 lp-sasha kernel: R13: ffff8880051da000 R14: 0000000000002000 R15: 0000000000000003 Oct 09 14:17:46 lp-sasha kernel: FS: 00007fd0192b3440(0000) GS:ffff8880bc900000(0000) knlGS:0000000000000000 Oct 09 14:17:46 lp-sasha kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Oct 09 14:17:46 lp-sasha kernel: CR2: 0000000000000000 CR3: 0000000004976000 CR4: 00000000000006e0 The disassembly: Code: 0a 00 00 48 8b 49 48 c7 87 b8 00 00 00 06 00 00 00 80 b9 4d 0a 00 00 00 75 1e 83 fa 41 75 05 48 85 c0 75 29 8b 81 10 0d 00 00 <39> 06 7c 25 f6 81 14 0d 00 00 02 75 b7 c3 80 b9 0c 0d 00 00 00 75 All code ======== 0: 0a 00 or (%rax),%al 2: 00 48 8b add %cl,-0x75(%rax) 5: 49 rex.WB 6: 48 c7 87 b8 00 00 00 movq $0x6,0xb8(%rdi) d: 06 00 00 00 11: 80 b9 4d 0a 00 00 00 cmpb $0x0,0xa4d(%rcx) 18: 75 1e jne 0x38 1a: 83 fa 41 cmp $0x41,%edx 1d: 75 05 jne 0x24 1f: 48 85 c0 test %rax,%rax 22: 75 29 jne 0x4d 24: 8b 81 10 0d 00 00 mov 0xd10(%rcx),%eax 2a:* 39 06 cmp %eax,(%rsi) <-- trapping instruction 2c: 7c 25 jl 0x53 2e: f6 81 14 0d 00 00 02 testb $0x2,0xd14(%rcx) 35: 75 b7 jne 0xffffffffffffffee 37: c3 retq 38: 80 b9 0c 0d 00 00 00 cmpb $0x0,0xd0c(%rcx) 3f: 75 .byte 0x75 Code starting with the faulting instruction =========================================== 0: 39 06 cmp %eax,(%rsi) 2: 7c 25 jl 0x29 4: f6 81 14 0d 00 00 02 testb $0x2,0xd14(%rcx) b: 75 b7 jne 0xffffffffffffffc4 d: c3 retq e: 80 b9 0c 0d 00 00 00 cmpb $0x0,0xd0c(%rcx) 15: 75 .byte 0x75 objdump -SF --disassemble=nouveau_connector_detect_depth [...] if (nv_connector->edid && c85e1: 83 fa 41 cmp $0x41,%edx c85e4: 75 05 jne c85eb (File Offset: 0xc866b) c85e6: 48 85 c0 test %rax,%rax c85e9: 75 29 jne c8614 (File Offset: 0xc8694) nv_connector->type == DCB_CONNECTOR_LVDS_SPWG) duallink = ((u8 *)nv_connector->edid)[121] == 2; else duallink = mode->clock >= bios->fp.duallink_transition_clk; if ((!duallink && (bios->fp.strapless_is_24bit & 1)) || c85eb: 8b 81 10 0d 00 00 mov 0xd10(%rcx),%eax c85f1: 39 06 cmp %eax,(%rsi) c85f3: 7c 25 jl c861a (File Offset: 0xc869a) ( duallink && (bios->fp.strapless_is_24bit & 2))) c85f5: f6 81 14 0d 00 00 02 testb $0x2,0xd14(%rcx) c85fc: 75 b7 jne c85b5 (File Offset: 0xc8635) connector->display_info.bpc = 8; [...] % scripts/faddr2line /lib/modules/5.9.0-rc8-next-20201009/kernel/drivers/gpu/drm/nouveau/nouveau.ko nouveau_connector_detect_depth+0x71/0xc0 nouveau_connector_detect_depth+0x71/0xc0: nouveau_connector_detect_depth at /home/sasha/linux-next/drivers/gpu/drm/nouveau/nouveau_connector.c:891 It is actually line 889. See the disassembly below. 889 duallink = mode->clock >= bios->fp.duallink_transition_clk; The NULL pointer being dereferenced is mode. Git bisect has identified the following commit as bad: f28e32d3906e drm/nouveau/kms: Don't change EDID when it hasn't actually changed Here is the chain of events that causes the oops. On entry to nouveau_connector_detect_lvds, edid is set to NULL. The call to nouveau_connector_detect sets nv_connector->edid to valid memory, with status set to connector_status_connected and the flow of execution branching to the out label. The subsequent call to nouveau_connector_set_edid erronously clears nv_connector->edid, via the local edid pointer which remains set to NULL. Fix this by setting edid to the value of the just acquired nv_connector->edid and executing the body of nouveau_connector_set_edid only if nv_connector->edid and edid point to different memory addresses thus preventing nv_connector->edid from being turned into a dangling pointer. Fixes: f28e32d3906e ("drm/nouveau/kms: Don't change EDID when it hasn't actually changed") Signed-off-by: Alexander Kapshuk Reviewed-by: Lyude Paul Signed-off-by: Ben Skeggs commit ceb736e1d45c253f5e86b185ca9b497cdd43063f Author: Zhang Qilong Date: Thu Nov 12 16:09:50 2020 +0800 ipv6: Fix error path to cancel the meseage genlmsg_cancel() needs to be called in the error path of inet6_fill_ifmcaddr and inet6_fill_ifacaddr to cancel the message. Fixes: 6ecf4c37eb3e ("ipv6: enable IFA_TARGET_NETNSID for RTM_GETADDR") Reported-by: Hulk Robot Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201112080950.1476302-1-zhangqilong3@huawei.com Signed-off-by: Jakub Kicinski commit 9c2e14b48119b39446031d29d994044ae958d8fc Author: Yi-Hung Wei Date: Tue Nov 10 16:16:40 2020 -0800 ip_tunnels: Set tunnel option flag when tunnel metadata is present Currently, we may set the tunnel option flag when the size of metadata is zero. For example, we set TUNNEL_GENEVE_OPT in the receive function no matter the geneve option is present or not. As this may result in issues on the tunnel flags consumers, this patch fixes the issue. Related discussion: * https://lore.kernel.org/netdev/1604448694-19351-1-git-send-email-yihung.wei@gmail.com/T/#u Fixes: 256c87c17c53 ("net: check tunnel option type in tunnel flags") Signed-off-by: Yi-Hung Wei Link: https://lore.kernel.org/r/1605053800-74072-1-git-send-email-yihung.wei@gmail.com Signed-off-by: Jakub Kicinski commit f01c30de86f1047e9bae1b1b1417b0ce8dcd15b1 Merge: d9315f5634c94 9b8523423b23e Author: Linus Torvalds Date: Fri Nov 13 16:07:53 2020 -0800 Merge tag 'vfs-5.10-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull fs freeze fix and cleanups from Darrick Wong: "A single vfs fix for 5.10, along with two subsequent cleanups. A very long time ago, a hack was added to the vfs fs freeze protection code to work around lockdep complaints about XFS, which would try to run a transaction (which requires intwrite protection) to finalize an xfs freeze (by which time the vfs had already taken intwrite). Fast forward a few years, and XFS fixed the recursive intwrite problem on its own, and the hack became unnecessary. Fast forward almost a decade, and latent bugs in the code converting this hack from freeze flags to freeze locks combine with lockdep bugs to make this reproduce frequently enough to notice page faults racing with freeze. Since the hack is unnecessary and causes thread race errors, just get rid of it completely. Making this kind of vfs change midway through a cycle makes me nervous, but a large enough number of the usual VFS/ext4/XFS/btrfs suspects have said this looks good and solves a real problem vector. And once that removal is done, __sb_start_write is now simple enough that it becomes possible to refactor the function into smaller, simpler static inline helpers in linux/fs.h. The cleanup is straightforward. Summary: - Finally remove the "convert to trylock" weirdness in the fs freezer code. It was necessary 10 years ago to deal with nested transactions in XFS, but we've long since removed that; and now this is causing subtle race conditions when lockdep goes offline and sb_start_* aren't prepared to retry a trylock failure. - Minor cleanups of the sb_start_* fs freeze helpers" * tag 'vfs-5.10-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: vfs: move __sb_{start,end}_write* to fs.h vfs: separate __sb_start_write into blocking and non-blocking helpers vfs: remove lockdep bogosity in __sb_start_write commit d9315f5634c94500b91039895f40051a7ac79e28 Merge: b5dea9c0ab62a 2bd3fa793aaa7 Author: Linus Torvalds Date: Fri Nov 13 16:01:44 2020 -0800 Merge tag 'xfs-5.10-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - Fix a fairly serious problem where the reverse mapping btree key comparison functions were silently ignoring parts of the keyspace when doing comparisons - Fix a thinko in the online refcount scrubber - Fix a missing unlock in the pnfs code * tag 'xfs-5.10-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix a missing unlock on error in xfs_fs_map_blocks xfs: fix brainos in the refcount scrubber's rmap fragment processor xfs: fix rmap key and record comparison functions xfs: set the unwritten bit in rmap lookup flags in xchk_bmap_get_rmapextents xfs: fix flags argument to rmap lookup when converting shared file rmaps commit 8d4c3e76e3be11a64df95ddee52e99092d42fc19 Author: Jens Axboe Date: Fri Nov 13 16:47:52 2020 -0700 proc: don't allow async path resolution of /proc/self components If this is attempted by a kthread, then return -EOPNOTSUPP as we don't currently support that. Once we can get task_pid_ptr() doing the right thing, then this can go away again. Signed-off-by: Jens Axboe commit 81e329e93b860b31c216b40eb5e1373db0ffe0ba Author: Wang Qing Date: Thu Nov 12 18:45:41 2020 +0200 net: ethernet: ti: am65-cpts: update ret when ptp_clock is ERROR We always have to update the value of ret, otherwise the error value may be the previous one. Fixes: f6bd59526ca5 ("net: ethernet: ti: introduce am654 common platform time sync driver") Signed-off-by: Wang Qing [grygorii.strashko@ti.com: fix build warn, subj add fixes tag] Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran Link: https://lore.kernel.org/r/20201112164541.3223-1-grygorii.strashko@ti.com Signed-off-by: Jakub Kicinski commit 8c07205aea36ccebe9fc5f97287a8bc416cea197 Author: Wang Hai Date: Fri Nov 13 19:32:36 2020 +0800 net: marvell: prestera: fix error return code in prestera_pci_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 4c2703dfd7fa ("net: marvell: prestera: Add PCI interface support") Reported-by: Hulk Robot Signed-off-by: Wang Hai Reviewed-by: Vadym Kochan Acked-by: Vadym Kochan Link: https://lore.kernel.org/r/20201113113236.71678-1-wanghai38@huawei.com Signed-off-by: Jakub Kicinski commit b5dea9c0ab62a11bb52e6fa91c7d7e26d6ae8ec1 Merge: 1b1e9262ca644 c01a21b77722d Author: Linus Torvalds Date: Fri Nov 13 15:09:52 2020 -0800 Merge tag 'block-5.10-2020-11-13' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few small fixes: - NVMe pull request from Christoph: - don't clear the read-only bit on a revalidate (Sagi Grimberg) - nbd error case refcount leak (Christoph) - loop/generic uevent fix (Christoph, Petr)" * tag 'block-5.10-2020-11-13' of git://git.kernel.dk/linux-block: loop: Fix occasional uevent drop block: add a return value to set_capacity_revalidate_and_notify nbd: fix a block_device refcount leak in nbd_release nvme: fix incorrect behavior when BLKROSET is called by the user commit aa6306a8481e0223f3783d24045daea80897238e Author: Steen Hegelund Date: Fri Nov 13 10:11:16 2020 +0100 net: phy: mscc: remove non-MACSec compatible phy Selecting VSC8575 as a MACSec PHY was not correct The relevant datasheet can be found here: - VSC8575: https://www.microchip.com/wwwproducts/en/VSC8575 History: v1 -> v2: - Corrected the sha in the "Fixes:" tag Fixes: 1bbe0ecc2a1a ("net: phy: mscc: macsec initialization") Signed-off-by: Steen Hegelund Reviewed-by: Antoine Tenart Link: https://lore.kernel.org/r/20201113091116.1102450-1-steen.hegelund@microchip.com Signed-off-by: Jakub Kicinski commit 1b1e9262ca644b5b7f1d12b2f8c2edfff420c5f3 Merge: 9e6a39eae450b 88ec3211e4634 Author: Linus Torvalds Date: Fri Nov 13 15:05:19 2020 -0800 Merge tag 'io_uring-5.10-2020-11-13' of git://git.kernel.dk/linux-block Pull io_uring fix from Jens Axboe: "A single fix in here, for a missed rounding case at setup time, which caused an otherwise legitimate setup case to return -EINVAL if used with unaligned ring size values" * tag 'io_uring-5.10-2020-11-13' of git://git.kernel.dk/linux-block: io_uring: round-up cq size before comparing with rounded sq size commit 8cf8821e15cd553339a5b48ee555a0439c2b2742 Author: Jeff Dike Date: Thu Nov 12 20:58:15 2020 -0500 net: Exempt multicast addresses from five-second neighbor lifetime Commit 58956317c8de ("neighbor: Improve garbage collection") guarantees neighbour table entries a five-second lifetime. Processes which make heavy use of multicast can fill the neighour table with multicast addresses in five seconds. At that point, neighbour entries can't be GC-ed because they aren't five seconds old yet, the kernel log starts to fill up with "neighbor table overflow!" messages, and sends start to fail. This patch allows multicast addresses to be thrown out before they've lived out their five seconds. This makes room for non-multicast addresses and makes messages to all addresses more reliable in these circumstances. Fixes: 58956317c8de ("neighbor: Improve garbage collection") Signed-off-by: Jeff Dike Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20201113015815.31397-1-jdike@akamai.com Signed-off-by: Jakub Kicinski commit 2b5668733050fca85f0ab458c5b91732f9496a38 Author: Grygorii Strashko Date: Thu Nov 12 13:15:46 2020 +0200 net: ethernet: ti: cpsw: fix cpts irq after suspend Depending on the SoC/platform the CPSW can completely lose context after a suspend/resume cycle, including CPSW wrapper (WR) which will cause reset of WR_C0_MISC_EN register, so CPTS IRQ will became disabled. Fix it by moving CPTS IRQ enabling in cpsw_ndo_open() where CPTS is actually started. Fixes: 84ea9c0a95d7 ("net: ethernet: ti: cpsw: enable cpts irq") Reported-by: Tony Lindgren Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Link: https://lore.kernel.org/r/20201112111546.20343-1-grygorii.strashko@ti.com Signed-off-by: Jakub Kicinski commit 9f16a66733c90b5f33f624b0b0e36a345b0aaf93 Author: Ming Lei Date: Fri Nov 13 21:44:48 2020 +0800 block: mark flush request as IDLE when it is really finished For avoiding use-after-free on flush request, we call its .end_io() from both timeout code path and __blk_mq_end_request(). When flush request's ref doesn't drop to zero, it is still used, we can't mark it as IDLE, so fix it by marking IDLE when its refcount drops to zero really. Fixes: 65ff5cd04551 ("blk-mq: mark flush request as IDLE in flush_end_io()") Signed-off-by: Ming Lei Cc: Yi Zhang Signed-off-by: Jens Axboe commit 1a49a97df657c63a4e8ffcd1ea9b6ed95581789b Author: Daniel Xu Date: Thu Nov 12 17:55:06 2020 -0800 btrfs: tree-checker: add missing return after error in root_item There's a missing return statement after an error is found in the root_item, this can cause further problems when a crafted image triggers the error. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=210181 Fixes: 259ee7754b67 ("btrfs: tree-checker: Add ROOT_ITEM check") CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Qu Wenruo Signed-off-by: Daniel Xu Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6f23277a49e68f8a9355385c846939ad0b1261e7 Author: Qu Wenruo Date: Wed Nov 11 19:38:18 2020 +0800 btrfs: qgroup: don't commit transaction when we already hold the handle [BUG] When running the following script, btrfs will trigger an ASSERT(): #/bin/bash mkfs.btrfs -f $dev mount $dev $mnt xfs_io -f -c "pwrite 0 1G" $mnt/file sync btrfs quota enable $mnt btrfs quota rescan -w $mnt # Manually set the limit below current usage btrfs qgroup limit 512M $mnt $mnt # Crash happens touch $mnt/file The dmesg looks like this: assertion failed: refcount_read(&trans->use_count) == 1, in fs/btrfs/transaction.c:2022 ------------[ cut here ]------------ kernel BUG at fs/btrfs/ctree.h:3230! invalid opcode: 0000 [#1] SMP PTI RIP: 0010:assertfail.constprop.0+0x18/0x1a [btrfs] btrfs_commit_transaction.cold+0x11/0x5d [btrfs] try_flush_qgroup+0x67/0x100 [btrfs] __btrfs_qgroup_reserve_meta+0x3a/0x60 [btrfs] btrfs_delayed_update_inode+0xaa/0x350 [btrfs] btrfs_update_inode+0x9d/0x110 [btrfs] btrfs_dirty_inode+0x5d/0xd0 [btrfs] touch_atime+0xb5/0x100 iterate_dir+0xf1/0x1b0 __x64_sys_getdents64+0x78/0x110 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fb5afe588db [CAUSE] In try_flush_qgroup(), we assume we don't hold a transaction handle at all. This is true for data reservation and mostly true for metadata. Since data space reservation always happens before we start a transaction, and for most metadata operation we reserve space in start_transaction(). But there is an exception, btrfs_delayed_inode_reserve_metadata(). It holds a transaction handle, while still trying to reserve extra metadata space. When we hit EDQUOT inside btrfs_delayed_inode_reserve_metadata(), we will join current transaction and commit, while we still have transaction handle from qgroup code. [FIX] Let's check current->journal before we join the transaction. If current->journal is unset or BTRFS_SEND_TRANS_STUB, it means we are not holding a transaction, thus are able to join and then commit transaction. If current->journal is a valid transaction handle, we avoid committing transaction and just end it This is less effective than committing current transaction, as it won't free metadata reserved space, but we may still free some data space before new data writes. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1178634 Fixes: c53e9653605d ("btrfs: qgroup: try to flush qgroup space when we get -EDQUOT") Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit c334730988ee07908ba4eb816ce78d3fe06fecaa Author: Filipe Manana Date: Wed Nov 4 11:07:31 2020 +0000 btrfs: fix missing delalloc new bit for new delalloc ranges When doing a buffered write, through one of the write family syscalls, we look for ranges which currently don't have allocated extents and set the 'delalloc new' bit on them, so that we can report a correct number of used blocks to the stat(2) syscall until delalloc is flushed and ordered extents complete. However there are a few other places where we can do a buffered write against a range that is mapped to a hole (no extent allocated) and where we do not set the 'new delalloc' bit. Those places are: - Doing a memory mapped write against a hole; - Cloning an inline extent into a hole starting at file offset 0; - Calling btrfs_cont_expand() when the i_size of the file is not aligned to the sector size and is located in a hole. For example when cloning to a destination offset beyond EOF. So after such cases, until the corresponding delalloc range is flushed and the respective ordered extents complete, we can report an incorrect number of blocks used through the stat(2) syscall. In some cases we can end up reporting 0 used blocks to stat(2), which is a particular bad value to report as it may mislead tools to think a file is completely sparse when its i_size is not zero, making them skip reading any data, an undesired consequence for tools such as archivers and other backup tools, as reported a long time ago in the following thread (and other past threads): https://lists.gnu.org/archive/html/bug-tar/2016-07/msg00001.html Example reproducer: $ cat reproducer.sh #!/bin/bash MNT=/mnt/sdi DEV=/dev/sdi mkfs.btrfs -f $DEV > /dev/null # mkfs.xfs -f $DEV > /dev/null # mkfs.ext4 -F $DEV > /dev/null # mkfs.f2fs -f $DEV > /dev/null mount $DEV $MNT xfs_io -f -c "truncate 64K" \ -c "mmap -w 0 64K" \ -c "mwrite -S 0xab 0 64K" \ -c "munmap" \ $MNT/foo blocks_used=$(stat -c %b $MNT/foo) echo "blocks used: $blocks_used" if [ $blocks_used -eq 0 ]; then echo "ERROR: blocks used is 0" fi umount $DEV $ ./reproducer.sh blocks used: 0 ERROR: blocks used is 0 So move the logic that decides to set the 'delalloc bit' bit into the function btrfs_set_extent_delalloc(), since that is what we use for all those missing cases as well as for the cases that currently work well. This change is also preparatory work for an upcoming patch that fixes other problems related to tracking and reporting the number of bytes used by an inode. CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 9e6a39eae450b81c8b2c8cbbfbdf8218e9b40c81 Merge: 4de010e2c989a bdac39a3bd288 Author: Linus Torvalds Date: Fri Nov 13 12:47:02 2020 -0800 Merge tag 'devicetree-fixes-for-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - fix Flexcan binding schema errors introduced in rc3 - fix an of_node ref counting error in of_dma_is_coherent * tag 'devicetree-fixes-for-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: clock: imx5: fix example dt-bindings: can: fsl,flexcan.yaml: fix compatible for i.MX35 and i.MX53 dt-bindings: can: fsl,flexcan.yaml: fix fsl,stop-mode of/address: Fix of_node memory leak in of_dma_is_coherent commit 123f01a0c989905a1cef6c1397a022eb321474d8 Author: Thierry Reding Date: Fri Nov 13 21:38:35 2020 +0100 drm/tegra: output: Do not put OF node twice The original patch for commit 3d2e7aec7013 ("drm/tegra: output: Don't leak OF node on error") contained this hunk, but it was accidentally dropped during conflict resolution. This causes use-after-free errors on devices that use an I2C controller for HDMI DDC/CI on Tegra210 and later. Fixes: 3d2e7aec7013 ("drm/tegra: output: Don't leak OF node on error") Signed-off-by: Thierry Reding commit 1395f8df87b0b897eb363625ddbc09891d2fba62 Merge: 4ee18c179e5e8 7bc40aedf24d3 Author: Jakub Kicinski Date: Fri Nov 13 11:58:55 2020 -0800 Merge tag 'mac80211-for-net-2020-11-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A handful of fixes: * a use-after-free fix in rfkill * a memory leak fix in the mac80211 TX status path * some rate scaling fixes * a fix for the often-reported (by syzbot) sleeping in atomic issue with mac80211's station removal * tag 'mac80211-for-net-2020-11-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211: mac80211: free sta in sta_info_insert_finish() on errors mac80211: minstrel: fix tx status processing corner case mac80211: minstrel: remove deferred sampling code mac80211: fix memory leak on filtered powersave frames rfkill: Fix use-after-free in rfkill_resume() ==================== Link: https://lore.kernel.org/r/20201113093421.24025-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 4de010e2c989a90e28272a92ca66e4bff4e79e0d Merge: 29eb6b7d62b09 dadfab0fbf017 Author: Linus Torvalds Date: Fri Nov 13 11:04:25 2020 -0800 Merge tag 'pinctrl-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "A bunch of pin control fixes for the v5.10 kernel series. Nothing in particular to say about it, because they are all driver fixes. I'm happy that some AMD driver fixes are appearing, it's been an undermaintained driver, and laptops have suffered. Summary: - Two fixes to the Intel pin controller drivers: fixing pull resistance bias. - Fix some invalid SSI pins on the Ingenic pin controller. - Make sure the clock is enabled when requesting interrupts from the Rockchip GPIO controller. - Make sure IRQs are mapped when looking up the IRQ for a GPIO line on the Rockchip GPIO Write. - Two regmap initialization fixes for the MCP23s08. - Fix a GPI-only prefix function problem on the Aspeed pin controller. - Disable the debounce filter correctly on the AMD pin controller. - Correct the timer clock setting for the AMD debounce timer. - Make the Qualcomm pin controller more cautious around the handling of PDC-related GPIO interrupts. - Fix the interrupt map in the Qualcomm SM8250 pin controller" * tag 'pinctrl-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: qcom: sm8250: Specify PDC map pinctrl: qcom: Move clearing pending IRQ to .irq_request_resources callback pinctrl: amd: use higher precision for 512 RtcClk pinctrl: amd: fix incorrect way to disable debounce filter pinctrl: aspeed: Fix GPI only function problem. pinctrl: mcp23s08: Print error message when regmap init fails pinctrl: mcp23s08: Use full chunk of memory for regmap configuration pinctrl: rockchip: create irq mapping in gpio_to_irq pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq pinctrl: ingenic: Fix invalid SSI pins pinctrl: intel: Set default bias in case no particular value given pinctrl: intel: Fix 2 kOhm bias which is 833 Ohm commit 29eb6b7d62b09fee6deb796c58256ba38cb4a07d Merge: 673cb932b688a b72de3ff19fdc Author: Linus Torvalds Date: Fri Nov 13 10:55:50 2020 -0800 Merge tag 'gpio-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Some GPIO fixes I've collected with the help of Bartosz. Nothing special about them: all are driver and kbuild fixes + some documentation fixes: - Tidy up a missed function call in the designware driver when converting to gpiolib irqchip - Fix some bitmasks in the Aspeed driver - Fix some kerneldoc warnings and minor bugs in the improved userspace API documentation - Revert the revert of the OMAP fix for lost edge wakeup interrupts: the fix needs to stay in - Fix a compile error when deselecting the character device - A bunch of IRQ fixes on the idio GPIO drivers - Fix an off-by-one error in the SiFive GPIO driver" * tag 'gpio-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: sifive: Fix SiFive gpio probe gpio: pcie-idio-24: Enable PEX8311 interrupts gpio: pcie-idio-24: Fix IRQ Enable Register value gpio: pcie-idio-24: Fix irq mask when masking gpiolib: fix sysfs when cdev is not selected Revert "Revert "gpio: omap: Fix lost edge wake-up interrupts"" gpio: uapi: clarify the meaning of 'empty' char arrays gpio: uapi: remove whitespace gpio: uapi: kernel-doc formatting improvements gpio: uapi: comment consistency gpio: uapi: fix kernel-doc warnings gpio: aspeed: fix ast2600 bank properties gpio: dwapb: Fix missing conversion to GPIO-lib-based IRQ-chip commit d853b3406903a7dc5b14eb5bada3e8cd677f66a2 Author: Nathan Chancellor Date: Fri Nov 13 11:07:02 2020 -0700 spi: bcm2835aux: Restore err assignment in bcm2835aux_spi_probe Clang warns: drivers/spi/spi-bcm2835aux.c:532:50: warning: variable 'err' is uninitialized when used here [-Wuninitialized] dev_err(&pdev->dev, "could not get clk: %d\n", err); ^~~ ./include/linux/dev_printk.h:112:32: note: expanded from macro 'dev_err' _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ drivers/spi/spi-bcm2835aux.c:495:9: note: initialize the variable 'err' to silence this warning int err; ^ = 0 1 warning generated. Restore the assignment so that the error value can be used in the dev_err statement and there is no uninitialized memory being leaked. Fixes: e13ee6cc4781 ("spi: bcm2835aux: Fix use-after-free on unbind") Link: https://github.com/ClangBuiltLinux/linux/issues/1199 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20201113180701.455541-1-natechancellor@gmail.com Signed-off-by: Mark Brown commit 673cb932b688ad3b03de89dc2b0b97c75ad47112 Merge: e627c25544dfe 03d80e042a8e3 Author: Linus Torvalds Date: Fri Nov 13 10:09:40 2020 -0800 Merge tag 'mmc-v5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: - tmio: Fixup support for reset - sdhci-of-esdhc: Extend erratum for pulse width to more broken HWs - renesas_sdhi: Fix re-binding of drivers * tag 'mmc-v5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: Revert "mmc: renesas_sdhi: workaround a regression when reinserting SD cards" mmc: tmio: bring tuning HW to a sane state with MMC_POWER_OFF mmc: tmio: when resetting, reset DMA controller, too mmc: sdhci-of-esdhc: Handle pulse width detection erratum for more SoCs mmc: renesas_sdhi_core: Add missing tmio_mmc_host_free() at remove commit e627c25544dfec9af56842b07e40ad992731627a Merge: 6186313d06dfa 41f3ed2cac86b Author: Linus Torvalds Date: Fri Nov 13 09:53:53 2020 -0800 Merge tag 'drm-fixes-2020-11-13' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Nearly didn't send you a PR this week at all, but a few things trickled in over the day, not a huge amount here, some i915, amdgpu and a bunch of misc fixes. I have a couple of nouveau fixes outstanding due to the PR having the wrong base, I'll figure it out next week. amdgpu: - Pageflip fix for DCN3 - Declare TA firmware for green sardine - Headless navi fix i915: - Pull phys pread/pwrite implementations to the backend - Correctly set SFC capability for video engines bridge: - cdns Kconfig fix hyperv_fb: - fix missing include gma500: - oob access fix mcde: - unbalanced regulator fix" * tag 'drm-fixes-2020-11-13' of git://anongit.freedesktop.org/drm/drm: drm/amdgpu: enable DCN for navi10 headless SKU drm/amdgpu: add ta firmware load for green-sardine drm/i915: Correctly set SFC capability for video engines drm/i915/gem: Pull phys pread/pwrite implementations to the backend drm/i915/gem: Allow backends to override pread implementation drm/mcde: Fix unbalanced regulator drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[] video: hyperv_fb: include vmalloc.h drm: bridge: cdns: Kconfig: Switch over dependency to ARCH_K3 drm/amd/display: Add missing pflip irq commit 02a9c6ee4183af2e438454c55098b828a96085fb Author: Dan Carpenter Date: Fri Nov 13 13:12:41 2020 +0300 ALSA: firewire: Clean up a locking issue in copy_resp_to_buf() The spin_lock/unlock_irq() functions cannot be nested. The problem is that presumably we would want the IRQs to be re-enabled on the second call the spin_unlock_irq() but instead it will be enabled at the first call so IRQs will be enabled earlier than expected. In this situation the copy_resp_to_buf() function is only called from one function and it is called with IRQs disabled. We can just use the regular spin_lock/unlock() functions. Fixes: 555e8a8f7f14 ("ALSA: fireworks: Add command/response functionality into hwdep interface") Signed-off-by: Dan Carpenter Acked-by: Takashi Sakamoto Cc: Link: https://lore.kernel.org/r/20201113101241.GB168908@mwanda Signed-off-by: Takashi Iwai commit 6186313d06dfadbfd0cda5e36e485877d6600179 Merge: e45f90fc72c8a 50b8a742850fc Author: Linus Torvalds Date: Fri Nov 13 09:36:10 2020 -0800 Merge tag 'trace-v5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull bootconfig fix from Steven Rostedt: "Fix alignment of bootconfig GRUB may align the init ramdisk size to 4 bytes, the magic number at the end of the init ramdisk that denotes bootconfig is attached may not be at the exact end of the ramdisk. The kernel needs to check back at least 4 bytes" * tag 'trace-v5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: bootconfig: Extend the magic check range to the preceding 3 bytes commit e45f90fc72c8a41097a29ff53dcf983087c16c06 Merge: 88b31f07f3f2d 9fa2e7af3d53a Author: Linus Torvalds Date: Fri Nov 13 09:31:20 2020 -0800 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "Just one bug fix: avoid a fortify panic when copying optprobe template" * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9019/1: kprobes: Avoid fortify_panic() when copying optprobe template commit 88b31f07f3f2d15a172405ae5d453fda1c12ee5f Merge: d3ba7afcc11fe 23c2164160561 Author: Linus Torvalds Date: Fri Nov 13 09:23:10 2020 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: - Spectre/Meltdown safelisting for some Qualcomm KRYO cores - Fix RCU splat when failing to online a CPU due to a feature mismatch - Fix a recently introduced sparse warning in kexec() - Fix handling of CPU erratum 1418040 for late CPUs - Ensure hot-added memory falls within linear-mapped region * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: cpu_errata: Apply Erratum 845719 to KRYO2XX Silver arm64: proton-pack: Add KRYO2XX silver CPUs to spectre-v2 safe-list arm64: kpti: Add KRYO2XX gold/silver CPU cores to kpti safelist arm64: Add MIDR value for KRYO2XX gold/silver CPU cores arm64/mm: Validate hotplug range before creating linear mapping arm64: smp: Tell RCU about CPUs that fail to come online arm64: psci: Avoid printing in cpu_psci_cpu_die() arm64: kexec_file: Fix sparse warning arm64: errata: Fix handling of 1418040 with late CPU onlining commit d3ba7afcc11fe9146def1664c32762d5a6a47713 Merge: 585e5b17b92de d196e229a80c3 Author: Linus Torvalds Date: Fri Nov 13 09:05:33 2020 -0800 Merge tag 'ext4_for_linus_bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Two ext4 bug fixes, one being a revert of a commit sent during the merge window" * tag 'ext4_for_linus_bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: Revert "ext4: fix superblock checksum calculation race" ext4: handle dax mount option collision commit dabbd6abcdbeb1358a53ec28a244429320eb0e3a Author: Zhang Changzhong Date: Fri Nov 13 14:42:27 2020 +0800 IB/hfi1: Fix error return code in hfi1_init_dd() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev") Link: https://lore.kernel.org/r/1605249747-17942-1-git-send-email-zhangchangzhong@huawei.com Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Acked-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe commit 18db36a073db6377a52e22ec44eb0500f0a0ecc6 Author: Fabrice Gasnier Date: Fri Nov 6 18:50:16 2020 +0100 docs: ABI: testing: iio: stm32: remove re-introduced unsupported ABI Remove unsupported ABI that has been re-introduced due to a rebase hunk. This ABI has been moved in the past in commit b299d00420e2 ("IIO: stm32: Remove quadrature related functions from trigger driver") This also fixes a couple of warnings seen with: ./scripts/get_abi.pl validate 2>&1|grep iio Fixes: 34433332841d ("docs: ABI: testing: make the files compatible with ReST output") Acked-by: Jonathan Cameron Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/1604685016-2434-1-git-send-email-fabrice.gasnier@st.com Signed-off-by: Greg Kroah-Hartman commit 50431b45685b600fc2851a3f2b53e24643efe6d3 Author: Wang Hai Date: Fri Nov 13 19:51:52 2020 +0800 tools, bpftool: Add missing close before bpftool net attach exit progfd is created by prog_parse_fd() in do_attach() and before the latter returns in case of success, the file descriptor should be closed. Fixes: 04949ccc273e ("tools: bpftool: add net attach command to attach XDP on interface") Signed-off-by: Wang Hai Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201113115152.53178-1-wanghai38@huawei.com commit bdac39a3bd28891fb0ded91c9152459c57773462 Author: Marc Kleine-Budde Date: Wed Nov 11 22:35:48 2020 +0100 dt-bindings: clock: imx5: fix example Since commit: 0e030a373df3 ("can: flexcan: fix endianess detection") the fsl,imx53-flexcan isn't compatible with the fsl,p1010-flexcan any more. As the former accesses the IP core in Little Endian mode and the latter uses Big Endian mode. With the conversion of the flexcan DT bindings to yaml, the dt_binding_check this throws the following error: Documentation/devicetree/bindings/clock/imx5-clock.example.dt.yaml: can@53fc8000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx53-flexcan', 'fsl,p1010-flexcan'] is too long Additional items are not allowed ('fsl,p1010-flexcan' was unexpected) 'fsl,imx53-flexcan' is not one of ['fsl,imx7d-flexcan', 'fsl,imx6ul-flexcan', 'fsl,imx6sx-flexcan'] 'fsl,imx53-flexcan' is not one of ['fsl,ls1028ar1-flexcan'] 'fsl,imx6q-flexcan' was expected 'fsl,lx2160ar1-flexcan' was expected From schema: /builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml The error is fixed by replacing the "fsl,p1010-flexcan" compatible (which turned out the be incompatible) with "fsl,imx25-flexcan" in the binding example. Reported-by: Rob Herring Cc: Fabio Estevam Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20201111213548.1621094-1-mkl@pengutronix.de [robh: Add "fsl,imx25-flexcan" as fallback] Signed-off-by: Rob Herring commit 3bbb73f8e60f505aced2ae820436cdacdbb19bca Author: Marc Kleine-Budde Date: Wed Nov 11 14:05:06 2020 +0100 dt-bindings: can: fsl,flexcan.yaml: fix compatible for i.MX35 and i.MX53 As both the i.MX35 and i.MX53 flexcan IP cores are compatible to the i.MX25, they are listed as: compatible = "fsl,imx35-flexcan", "fsl,imx25-flexcan"; and: compatible = "fsl,imx53-flexcan", "fsl,imx25-flexcan"; in the SoC device trees. This patch fixes the following errors, which shows up during a dtbs_check: arch/arm/boot/dts/imx53-ard.dt.yaml: can@53fc8000: compatible: 'oneOf' conditional failed, one must be fixed: ['fsl,imx53-flexcan', 'fsl,imx25-flexcan'] is too long Additional items are not allowed ('fsl,imx25-flexcan' was unexpected) 'fsl,imx53-flexcan' is not one of ['fsl,imx7d-flexcan', 'fsl,imx6ul-flexcan', 'fsl,imx6sx-flexcan'] 'fsl,imx53-flexcan' is not one of ['fsl,ls1028ar1-flexcan'] 'fsl,imx6q-flexcan' was expected 'fsl,lx2160ar1-flexcan' was expected From schema: Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml Fixes: e5ab9aa7e49b ("dt-bindings: can: flexcan: convert fsl,*flexcan bindings to yaml") Reported-by: Rob Herring Cc: Oleksij Rempel Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20201111130507.1560881-4-mkl@pengutronix.de [robh: drop singular fsl,imx53-flexcan and fsl,imx35-flexcan] Signed-off-by: Rob Herring commit 60268b0e8258fdea9a3c9f4b51e161c123571db3 Author: Naveen Krishna Chatradhi Date: Thu Nov 12 22:51:59 2020 +0530 hwmon: (amd_energy) modify the visibility of the counters This patch limits the visibility to owner and groups only for the energy counters exposed through the hwmon based amd_energy driver. Cc: stable@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20201112172159.8781-1-nchatrad@amd.com Signed-off-by: Guenter Roeck commit 6d853c9e4104b4fc8d55dc9cd3b99712aa347174 Author: Chris Brandt Date: Wed Nov 11 08:12:09 2020 -0500 usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode Renesas R-Car and RZ/G SoCs have a firmware download mode over USB. However, on reset a banner string is transmitted out which is not expected to be echoed back and will corrupt the protocol. Cc: stable Acked-by: Oliver Neukum Signed-off-by: Chris Brandt Link: https://lore.kernel.org/r/20201111131209.3977903-1-chris.brandt@renesas.com Signed-off-by: Greg Kroah-Hartman commit 4df694a477685a3df7b561bfe6393db073bf476c Author: Andrey Konovalov Date: Wed Nov 11 03:17:55 2020 +0100 MAINTAINERS: add usb raw gadget entry Add myself (using the personal email address) as a reviewer for the USB Raw Gadget driver. Acked-by: Andrey Konovalov Signed-off-by: Andrey Konovalov Link: https://lore.kernel.org/r/245047b3fffaf5c0b791ed226d1ea272b2aef031.1605060950.git.andreyknvl@google.com Signed-off-by: Greg Kroah-Hartman commit 0e6371fbfba3a4f76489e6e97c1c7f8386ad5fd2 Author: Heikki Krogerus Date: Tue Nov 10 15:05:47 2020 +0300 usb: typec: ucsi: Report power supply changes When the ucsi power supply goes online/offline, and when the power levels change, the power supply class needs to be notified so it can inform the user space. Fixes: 992a60ed0d5e ("usb: typec: ucsi: register with power_supply class") Cc: stable@vger.kernel.org Reported-and-tested-by: Vladimir Yerilov Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201110120547.67922-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f5c042b23f7429e5c2ac987b01a31c69059a978b Author: Michał Mirosław Date: Fri Nov 13 01:20:28 2020 +0100 regulator: workaround self-referent regulators Workaround regulators whose supply name happens to be the same as its own name. This fixes boards that used to work before the early supply resolving was removed. The error message is left in place so that offending drivers can be detected. Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator") Cc: stable@vger.kernel.org Reported-by: Ahmad Fatoum Signed-off-by: Michał Mirosław Tested-by: Ahmad Fatoum # stpmic1 Link: https://lore.kernel.org/r/d703acde2a93100c3c7a81059d716c50ad1b1f52.1605226675.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 4b639e254d3d4f15ee4ff2b890a447204cfbeea9 Author: Michał Mirosław Date: Fri Nov 13 01:20:28 2020 +0100 regulator: avoid resolve_supply() infinite recursion When a regulator's name equals its supply's name the regulator_resolve_supply() recurses indefinitely. Add a check so that debugging the problem is easier. The "fixed" commit just exposed the problem. Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator") Cc: stable@vger.kernel.org Reported-by: Ahmad Fatoum Signed-off-by: Michał Mirosław Tested-by: Ahmad Fatoum # stpmic1 Link: https://lore.kernel.org/r/c6171057cfc0896f950c4d8cb82df0f9f1b89ad9.1605226675.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 57a6ad482af256b2a13de14194fb8f67c1a65f10 Author: Michał Mirosław Date: Fri Nov 13 01:20:27 2020 +0100 regulator: fix memory leak with repeated set_machine_constraints() Fixed commit introduced a possible second call to set_machine_constraints() and that allocates memory for rdev->constraints. Move the allocation to the caller so it's easier to manage and done once. Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator") Cc: stable@vger.kernel.org Signed-off-by: Michał Mirosław Tested-by: Ahmad Fatoum # stpmic1 Link: https://lore.kernel.org/r/78c3d4016cebc08d441aad18cb924b4e4d9cf9df.1605226675.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 106e6d8df4842d816dae23076c501ae48386afcb Author: Shuming Fan Date: Fri Nov 13 17:21:25 2020 +0800 ASoC: rt1015: increase the time to detect BCLK To meet the most platform, the detection time should be increased to avoid that the flushing DAC data fails. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20201113092125.19206-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 76255470ffa2795a44032e8b3c1ced11d81aa2db Author: Zhang Qilong Date: Fri Nov 6 20:22:21 2020 +0800 xhci: hisilicon: fix refercence leak in xhci_histb_probe pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. We should decrease the usage count whetever it succeeded or failed(maybe runtime of the device has error, or device is in inaccessible state, or other error state). If we do not call put operation to decrease the reference, it will result in reference leak in xhci_histb_probe. Moreover, this device cannot enter the idle state and always stay busy or other non-idle state later. So we fixed it by jumping to error handling branch. Fixes: c508f41da0788 ("xhci: hisilicon: support HiSilicon STB xHCI host controller") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201106122221.2304528-1-zhangqilong3@huawei.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit ffa13d2d94029882eca22a565551783787f121e5 Author: Geert Uytterhoeven Date: Thu Nov 12 14:59:00 2020 +0100 Revert "usb: musb: convert to devm_platform_ioremap_resource_byname" This reverts commit 2d30e408a2a6b3443d3232593e3d472584a3e9f8. On Beaglebone Black, where each interface has 2 children: musb-dsps 47401c00.usb: can't request region for resource [mem 0x47401800-0x474019ff] musb-hdrc musb-hdrc.1: musb_init_controller failed with status -16 musb-hdrc: probe of musb-hdrc.1 failed with error -16 musb-dsps 47401400.usb: can't request region for resource [mem 0x47401000-0x474011ff] musb-hdrc musb-hdrc.0: musb_init_controller failed with status -16 musb-hdrc: probe of musb-hdrc.0 failed with error -16 Before, devm_ioremap_resource() was called on "dev" ("musb-hdrc.0" or "musb-hdrc.1"), after it is called on "&pdev->dev" ("47401400.usb" or "47401c00.usb"), leading to a duplicate region request, which fails. Signed-off-by: Geert Uytterhoeven Fixes: 2d30e408a2a6 ("usb: musb: convert to devm_platform_ioremap_resource_byname") Cc: stable Link: https://lore.kernel.org/r/20201112135900.3822599-1-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit b57d5437e3740bffed60ceedf74f881ab5bd6122 Merge: 7e47a750116d2 107954afc5df6 Author: Arnd Bergmann Date: Fri Nov 13 14:00:08 2020 +0100 Merge tag 'sunxi-fixes-for-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes Mostly some fixes for a fallout in a PHY driver that pointed out errors in our DTs. Along with that, Jernej agreed to be a reviewer! * tag 'sunxi-fixes-for-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: h5: OrangePi Prime: Fix ethernet node arm64: dts: allwinner: a64: bananapi-m64: Enable RGMII RX/TX delay on PHY arm64: dts: allwinner: h5: libretech-all-h5-cc: Enable RGMII RX/TX delay on PHY ARM: dts: sunxi: bananapi-m2-plus: Enable RGMII RX/TX delay on Ethernet PHY ARM: dts: sun9i: Enable both RGMII RX/TX delay on Ethernet PHY ARM: dts: sun8i: a83t: Enable both RGMII RX/TX delay on Ethernet PHY ARM: dts: sun8i: h3: orangepi-plus2e: Enable RGMII RX/TX delay on Ethernet PHY ARM: dts: sun7i: bananapi-m1-plus: Enable RGMII RX/TX delay on Ethernet PHY ARM: dts: sun7i: cubietruck: Enable RGMII RX/TX delay on Ethernet PHY ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix ethernet node arm64: dts: allwinner: h5: OrangePi PC2: Fix ethernet node arm64: dts: allwinner: a64: Pine64 Plus: Fix ethernet node arm64: dts: allwinner: a64: OrangePi Win: Fix ethernet node arm64: dts: allwinner: Pine H64: Enable both RGMII RX/TX delay arm64: dts: allwinner: beelink-gs1: Enable both RGMII RX/TX delay arm64: dts: allwinner: pinetab: Drop unnecessary address/size-cells information MAINTAINERS: Add Jernej Škrabec as a reviewer for Allwinner SoCs support Link: https://lore.kernel.org/r/d1a1a6a6-fca4-4f1b-93b3-f2f6963b4e04.lettre@localhost Signed-off-by: Arnd Bergmann commit 7e47a750116d2e1dfdd60008a7fd480a2806a0dd Merge: 0461a1ae98bc3 f4c7fa39415da Author: Arnd Bergmann Date: Fri Nov 13 13:58:50 2020 +0100 Merge tag 'stm32-dt-for-v5.10-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/fixes STM32 DT fixes for v5.10, round 2 Highlights: ----------- -Fixes are for DHCOM/DHCOR boards: - Fix TA3-GPIO-C button - Fix LED5 mapping - Define VIO regulator supply on DHCOM - Enable thermal sensor support on stm32mp15xx-dhcor - Keep VDDA LDO1 always on to avoid leakage * tag 'stm32-dt-for-v5.10-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: Keep VDDA LDO1 always on on DHCOM ARM: dts: stm32: Enable thermal sensor support on stm32mp15xx-dhcor ARM: dts: stm32: Define VIO regulator supply on DHCOM ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2 ARM: dts: stm32: Fix TA3-GPIO-C key on STM32MP1 DHCOM PDK2 Link: https://lore.kernel.org/r/65bfc73d-aae1-5309-2e11-1e3da647ad46@st.com Signed-off-by: Arnd Bergmann commit 0461a1ae98bc3045492333bebf6e79d4e859d3a1 Merge: 53bf2776e3137 be353be27874f Author: Arnd Bergmann Date: Fri Nov 13 13:44:03 2020 +0100 Merge tag 'amdtee-fixes-for-5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee into arm/fixes AMD-TEE driver bug fixes AMD-TEE driver keeps track of shared memory buffers and their corresponding buffer id's in a global linked list. These buffers are used to share data between x86 and AMD Secure Processor. This pull request fixes issues related to maintaining mapped buffers in a shared linked list. * tag 'amdtee-fixes-for-5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee: tee: amdtee: synchronize access to shm list tee: amdtee: fix memory leak due to reset of global shm list Link: https://lore.kernel.org/r/20201109080809.GA3862873@jade Signed-off-by: Arnd Bergmann commit 53bf2776e31376f0b6a1fd7c9e1abc61241825a2 Author: Krzysztof Kozlowski Date: Thu Nov 5 22:47:02 2020 +0100 ARM: dts: exynos: revert "add input clock to CMU in Exynos4412 Odroid" This reverts commit eaf2d2f6895d676dda6c95a652b58594f2887720. The commit eaf2d2f6895d ("ARM: dts: exynos: add input clock to CMU in Exynos4412 Odroid") breaks probing of usb3503 USB hub on Odroid U3. It changes the order of clock drivers probe: the clkout (Exynos PMU) driver is probed before the main clk-exynos4 driver. The clkout driver on Exynos4412 depends on clk-exynos4 but it does not support deferred probe, therefore this dependency and changed probe order causes probe failure. The usb3503 USB hub on Odroid U3 on the other hand requires clkout clock. This can be seen in logs: [ 5.007442] usb3503 0-0008: unable to request refclk (-517) Reported-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200921174818.15525-1-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 53bbff2668801638566151c8d393484ba7997cca Merge: e57523fa64d61 f126b6702e735 Author: Arnd Bergmann Date: Fri Nov 13 13:18:36 2020 +0100 Merge tag 'socfpga_fix_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/fixes arm64: dts: fix for v5.10 - Fix the qspi node to have the required "jedec,spi-nor" Signed-off-by: Arnd Bergmann commit e57523fa64d6166de6e70227a3d4395233015bc8 Merge: 47cd1eac336ce cd12e4f14f7cc Author: Arnd Bergmann Date: Fri Nov 13 13:16:00 2020 +0100 Merge tag 'samsung-fixes-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/fixes Samsung changes for v5.10 Remove Kamil Debski, Kyungmin Park and Jeongtae Park from maintainers of several drivers. There were no maintenance activities from them for some time. While at touching credits, this also cleans up white spaces. * tag 'samsung-fixes-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: CREDITS: remove trailing white spaces MAINTAINERS: remove Jeongtae Park from Samsung MFC entry MAINTAINERS: move Kyungmin Park to credits MAINTAINERS: move Kamil Debski to credits Link: https://lore.kernel.org/r/20201031120237.8542-1-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 47cd1eac336cea6cd37cb27de2ed49b4113c6116 Merge: f8394f232b1ea e402599e5e5e0 Author: Arnd Bergmann Date: Fri Nov 13 13:07:53 2020 +0100 Merge tag 'imx-fixes-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.10, 3rd round: - A series from Krzysztof Kozlowski to fix missing PMIC's interrupt line pull-up for i.MX8MM and i.MX8MN boards. - Set Bluetooth chip max-speed to 4000000 on imx8mm-beacon-som board to fix the choppy Bluetooth audio sound. - Remove non-existent OTG2, usbphynop2, and the usbmisc2 from i.MX8MN device tree. - Fix the endianness setting of RCPM node on Layerscape SoCs. - Add the missing dma-coherent property for qoriq-fman device to improve the performance. - Fix the Ethernet PHY address on imx6q-prti6q board. * tag 'imx-fixes-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx6q-prti6q: fix PHY address arm64: dts imx8mn: Remove non-existent USB OTG2 arm64: dts: imx8mm-beacon-som: Fix Choppy BT audio arm64: dts: fsl: DPAA FMan DMA operations are coherent arm64: dts: fsl: fix endianness issue of rcpm arm64: dts: imx8mn-evk: fix missing PMIC's interrupt line pull-up arm64: dts: imx8mn-ddr4-evk: fix missing PMIC's interrupt line pull-up arm64: dts: imx8mn-var-som: fix missing PMIC's interrupt line pull-up arm64: dts: imx8mm-evk: fix missing PMIC's interrupt line pull-up arm64: dts: imx8mm-beacon-som: fix missing PMIC's interrupt line pull-up arm64: dts: imx8mm-var-som: fix missing PMIC's interrupt line pull-up Link: https://lore.kernel.org/r/20201030151821.GA28266@dragon Signed-off-by: Arnd Bergmann commit 96308b066184d6dcdb677890e620e68290ae98ae Author: Babu Moger Date: Thu Nov 12 16:18:03 2020 -0600 KVM: SVM: Update cr3_lm_rsvd_bits for AMD SEV guests For AMD SEV guests, update the cr3_lm_rsvd_bits to mask the memory encryption bit in reserved bits. Signed-off-by: Babu Moger Message-Id: <160521948301.32054.5783800787423231162.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit 0107973a80adad5b73232d3fbcd26f710ab1f851 Author: Babu Moger Date: Thu Nov 12 16:17:56 2020 -0600 KVM: x86: Introduce cr3_lm_rsvd_bits in kvm_vcpu_arch SEV guests fail to boot on a system that supports the PCID feature. While emulating the RSM instruction, KVM reads the guest CR3 and calls kvm_set_cr3(). If the vCPU is in the long mode, kvm_set_cr3() does a sanity check for the CR3 value. In this case, it validates whether the value has any reserved bits set. The reserved bit range is 63:cpuid_maxphysaddr(). When AMD memory encryption is enabled, the memory encryption bit is set in the CR3 value. The memory encryption bit may fall within the KVM reserved bit range, causing the KVM emulation failure. Introduce a new field cr3_lm_rsvd_bits in kvm_vcpu_arch which will cache the reserved bits in the CR3 value. This will be initialized to rsvd_bits(cpuid_maxphyaddr(vcpu), 63). If the architecture has any special bits(like AMD SEV encryption bit) that needs to be masked from the reserved bits, should be cleared in vendor specific kvm_x86_ops.vcpu_after_set_cpuid handler. Fixes: a780a3ea628268b2 ("KVM: X86: Fix reserved bits check for MOV to CR3") Signed-off-by: Babu Moger Message-Id: <160521947657.32054.3264016688005356563.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit 51b958e5aeb1e18c00332e0b37c5d4e95a3eff84 Author: David Edmondson Date: Tue Nov 3 12:04:00 2020 +0000 KVM: x86: clflushopt should be treated as a no-op by emulation The instruction emulator ignores clflush instructions, yet fails to support clflushopt. Treat both similarly. Fixes: 13e457e0eebf ("KVM: x86: Emulator does not decode clflush well") Signed-off-by: David Edmondson Message-Id: <20201103120400.240882-1-david.edmondson@oracle.com> Reviewed-by: Joao Martins Signed-off-by: Paolo Bonzini commit 2c38234c425e627ca493eb0b7a9a34899a1f03ef Merge: 585e5b17b92de ed4ffaf49bf9c Author: Paolo Bonzini Date: Fri Nov 13 06:28:23 2020 -0500 Merge tag 'kvmarm-fixes-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for v5.10, take #3 - Allow userspace to downgrade ID_AA64PFR0_EL1.CSV2 - Inject UNDEF on SCXTNUM_ELx access commit ff828729be446b86957f7c294068758231cd2183 Author: Thomas Gleixner Date: Thu Nov 12 20:14:16 2020 +0100 iommu/vt-d: Cure VF irqdomain hickup The recent changes to store the MSI irqdomain pointer in struct device missed that Intel DMAR does not register virtual function devices. Due to that a VF device gets the plain PCI-MSI domain assigned and then issues compat MSI messages which get caught by the interrupt remapping unit. Cure that by inheriting the irq domain from the physical function device. Ideally the irqdomain would be associated to the bus, but DMAR can have multiple units and therefore irqdomains on a single bus. The VF 'bus' could of course inherit the domain from the PF, but that'd be yet another x86 oddity. Fixes: 85a8dfc57a0b ("iommm/vt-d: Store irq domain in struct device") Reported-by: Jason Gunthorpe Signed-off-by: Thomas Gleixner Acked-by: Lu Baolu Cc: Joerg Roedel Cc: Bjorn Helgaas Cc: Marc Zyngier Cc: David Woodhouse Link: https://lore.kernel.org/r/draft-87eekymlpz.fsf@nanos.tec.linutronix.de commit 95a793c3bc75cf888e0e641d656e7d080f487d8b Author: Takashi Sakamoto Date: Fri Nov 13 18:20:43 2020 +0900 ALSA: ctl: fix error path at adding user-defined element set When processing request to add/replace user-defined element set, check of given element identifier and decision of numeric identifier is done in "__snd_ctl_add_replace()" helper function. When the result of check is wrong, the helper function returns error code. The error code shall be returned to userspace application. Current implementation includes bug to return zero to userspace application regardless of the result. This commit fixes the bug. Cc: Fixes: e1a7bfe38079 ("ALSA: control: Fix race between adding and removing a user element") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20201113092043.16148-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 9e885770277d2ed8d85f9cbd4992515ec324242f Author: Kailang Yang Date: Tue Nov 3 15:30:51 2020 +0800 ALSA: hda/realtek - HP Headset Mic can't detect after boot System boot or warm boot with plugged headset. If it turn on power save mode, Headset Mic will lose. This patch will solve this issue. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/1ae4d98e92c147b780ace3911c4e1d73@realtek.com Signed-off-by: Takashi Iwai commit a0ccbc5319d57b9efdc55c943a3fde30a0776502 Author: Kailang Yang Date: Fri Nov 6 15:20:38 2020 +0800 ALSA: hda/realtek - Add supported mute Led for HP HP Pavilion x360 Convertible machine, it supported mute led. GPIO4 high will turn on led. The patch will enable control led via GPIO4 pin. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/1ae4d98e92c147b780ace3911c4e1d73@realtek.com Signed-off-by: Takashi Iwai commit 23c216416056148136bdaf0cdd18caf4904bb6e1 Author: Konrad Dybcio Date: Thu Nov 5 00:22:13 2020 +0100 arm64: cpu_errata: Apply Erratum 845719 to KRYO2XX Silver QCOM KRYO2XX Silver cores are Cortex-A53 based and are susceptible to the 845719 erratum. Add them to the lookup list to apply the erratum. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201104232218.198800-5-konrad.dybcio@somainline.org Signed-off-by: Will Deacon commit 38328d40116739af0692748427bedda35b286c33 Author: Konrad Dybcio Date: Thu Nov 5 00:22:12 2020 +0100 arm64: proton-pack: Add KRYO2XX silver CPUs to spectre-v2 safe-list KRYO2XX silver (LITTLE) CPUs are based on Cortex-A53 and they are not affected by spectre-v2. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201104232218.198800-4-konrad.dybcio@somainline.org Signed-off-by: Will Deacon commit e3dd11a9f2521cecbcf30c2fd17ecc5a445dfb94 Author: Konrad Dybcio Date: Thu Nov 5 00:22:11 2020 +0100 arm64: kpti: Add KRYO2XX gold/silver CPU cores to kpti safelist QCOM KRYO2XX gold (big) silver (LITTLE) CPU cores are based on Cortex-A73 and Cortex-A53 respectively and are meltdown safe, hence add them to kpti_safe_list[]. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201104232218.198800-3-konrad.dybcio@somainline.org Signed-off-by: Will Deacon commit 77473cffef21611b4423f613fe32836afb26405e Author: Konrad Dybcio Date: Thu Nov 5 00:22:10 2020 +0100 arm64: Add MIDR value for KRYO2XX gold/silver CPU cores Add MIDR value for KRYO2XX gold (big) and silver (LITTLE) CPU cores which are used in Qualcomm Technologies, Inc. SoCs. This will be used to identify and apply errata which are applicable for these CPU cores. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201104232218.198800-2-konrad.dybcio@somainline.org Signed-off-by: Will Deacon commit 58284a901b426e6130672e9f14c30dfd5a9dbde0 Author: Anshuman Khandual Date: Fri Nov 13 13:00:14 2020 +0530 arm64/mm: Validate hotplug range before creating linear mapping During memory hotplug process, the linear mapping should not be created for a given memory range if that would fall outside the maximum allowed linear range. Else it might cause memory corruption in the kernel virtual space. Maximum linear mapping region is [PAGE_OFFSET..(PAGE_END -1)] accommodating both its ends but excluding PAGE_END. Max physical range that can be mapped inside this linear mapping range, must also be derived from its end points. This ensures that arch_add_memory() validates memory hot add range for its potential linear mapping requirements, before creating it with __create_pgd_mapping(). Fixes: 4ab215061554 ("arm64: Add memory hotplug support") Signed-off-by: Anshuman Khandual Reviewed-by: Ard Biesheuvel Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Ard Biesheuvel Cc: Steven Price Cc: Robin Murphy Cc: David Hildenbrand Cc: Andrew Morton Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1605252614-761-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit 7bc40aedf24d31d8bea80e1161e996ef4299fb10 Author: Johannes Berg Date: Thu Nov 12 11:22:04 2020 +0100 mac80211: free sta in sta_info_insert_finish() on errors If sta_info_insert_finish() fails, we currently keep the station around and free it only in the caller, but there's only one such caller and it always frees it immediately. As syzbot found, another consequence of this split is that we can put things that sleep only into __cleanup_single_sta() and not in sta_info_free(), but this is the only place that requires such of sta_info_free() now. Change this to free the station in sta_info_insert_finish(), in which case we can still sleep. This will also let us unify the cleanup code later. Cc: stable@vger.kernel.org Fixes: dcd479e10a05 ("mac80211: always wind down STA state") Reported-by: syzbot+32c6c38c4812d22f2f0b@syzkaller.appspotmail.com Reported-by: syzbot+4c81fe92e372d26c4246@syzkaller.appspotmail.com Reported-by: syzbot+6a7fe9faf0d1d61bc24a@syzkaller.appspotmail.com Reported-by: syzbot+abed06851c5ffe010921@syzkaller.appspotmail.com Reported-by: syzbot+b7aeb9318541a1c709f1@syzkaller.appspotmail.com Reported-by: syzbot+d5a9416c6cafe53b5dd0@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20201112112201.ee6b397b9453.I9c31d667a0ea2151441cc64ed6613d36c18a48e0@changeid Signed-off-by: Johannes Berg commit 41f3ed2cac86ba533ce6a334a2e7fae5c7082946 Merge: 858fbdbcef36d 38a2509184952 Author: Dave Airlie Date: Fri Nov 13 16:05:30 2020 +1000 Merge tag 'amd-drm-fixes-5.10-2020-11-12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.10-2020-11-12: amdgpu: - Pageflip fix for DCN3 - Declare TA firmware for green sardine - Headless navi fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201113055512.3963-1-alexander.deucher@amd.com commit 858fbdbcef36d41de20fda8f39662e572f59e6de Merge: 59f7dcd92959f 5ce6861d36ed5 Author: Dave Airlie Date: Fri Nov 13 16:01:35 2020 +1000 Merge tag 'drm-intel-fixes-2020-11-13' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Pull phys pread/pwrite implementations to the backend (Chris) - Correctly set SFC capability for video engines (Venkata) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20201113052551.GA1319429@intel.com commit 38a2509184952f799d465b26279ef1bd36fb8277 Author: Tianci.Yin Date: Fri Nov 6 14:56:35 2020 +0800 drm/amdgpu: enable DCN for navi10 headless SKU There is a NULL pointer crash when DCN disabled on headless SKU. On normal SKU, the variable adev->ddev.mode_config.funcs is initialized in dm_hw_init(), and it is fine to access it in amdgpu_device_resume(). But on headless SKU, DCN is disabled, the funcs variable is not initialized, then crash arises. Enable DCN to fix this issue. Reviewed-by: Alex Deucher Reviewed-by: Guchun Chen Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 266421925574f91bf9d373128f38771c565f107a Author: Roman Li Date: Mon Oct 26 17:12:34 2020 -0400 drm/amdgpu: add ta firmware load for green-sardine [Why] In preparation to enabling hdcp on green sardine. [How] Add green-sardine ta f/w loading in psp_v12 Signed-off-by: Roman Li Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 59f7dcd92959f8de775f6cb72d3eec7f6d1d7d69 Merge: f8394f232b1ea a6c40b8032b84 Author: Dave Airlie Date: Fri Nov 13 15:01:03 2020 +1000 Merge tag 'drm-misc-fixes-2020-11-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes One Kconfig fix for bridge/cdns, a missing include for hypervb_fb, an out-of-bound access fix for gma500 and a unbalanced regulator fix for mcde. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201112130726.qwtryqvgspmljkax@gilmour.lan commit 4ec2b69da5e1544dbadb30cddb49c8df60209b0c Author: Xiongfeng Wang Date: Thu Nov 12 21:22:32 2020 +0800 drm/i915/gvt: return error when failing to take the module reference When we fail to take the module reference, we go to the 'undo*' branch and return. But the returned variable 'ret' has been set as zero by the above code. Change 'ret' to '-ENODEV' in this situation. Fixes: 9bdb073464d6 ("drm/i915/gvt: Change KVMGT as self load module") Reviewed-by: Zhenyu Wang Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/1605187352-51761-1-git-send-email-wangxiongfeng2@huawei.com commit 4ee18c179e5e815fa5575e0d2db0c05795a804ee Author: Xie He Date: Thu Nov 12 02:35:06 2020 -0800 net: x25: Increase refcnt of "struct x25_neigh" in x25_rx_call_request The x25_disconnect function in x25_subr.c would decrease the refcount of "x25->neighbour" (struct x25_neigh) and reset this pointer to NULL. However, the x25_rx_call_request function in af_x25.c, which is called when we receive a connection request, does not increase the refcount when it assigns the pointer. Fix this issue by increasing the refcount of "struct x25_neigh" in x25_rx_call_request. This patch fixes frequent kernel crashes when using AF_X25 sockets. Fixes: 4becb7ee5b3d ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect") Cc: Martin Schiller Signed-off-by: Xie He Link: https://lore.kernel.org/r/20201112103506.5875-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit baee1991fad928d6c8dd5be3197ecb413c420c97 Author: Zhang Changzhong Date: Thu Nov 12 19:34:39 2020 +0800 net: ethernet: mtk-star-emac: fix error return code in mtk_star_enable() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver") Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/1605180879-2573-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski commit 50b8a742850fce7293bed45753152c425f7e931b Author: Masami Hiramatsu Date: Fri Nov 13 02:27:31 2020 +0900 bootconfig: Extend the magic check range to the preceding 3 bytes Since Grub may align the size of initrd to 4 if user pass initrd from cpio, we have to check the preceding 3 bytes as well. Link: https://lkml.kernel.org/r/160520205132.303174.4876760192433315429.stgit@devnote2 Cc: stable@vger.kernel.org Fixes: 85c46b78da58 ("bootconfig: Add bootconfig magic word for indicating bootconfig explicitly") Reported-by: Chen Yu Tested-by: Chen Yu Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit c350f8bea271782e2733419bd2ab9bf4ec2051ef Author: Chen Zhou Date: Thu Nov 12 21:53:32 2020 +0800 selinux: Fix error return code in sel_ib_pkey_sid_slow() Fix to return a negative error code from the error handling case instead of 0 in function sel_ib_pkey_sid_slow(), as done elsewhere in this function. Cc: stable@vger.kernel.org Fixes: 409dcf31538a ("selinux: Add a cache for quicker retreival of PKey SIDs") Reported-by: Hulk Robot Signed-off-by: Chen Zhou Signed-off-by: Paul Moore commit e8aa6d520b448efc88670a98eccd196713639f2f Author: Vincent Stehlé Date: Thu Nov 12 09:48:33 2020 +0100 net: ethernet: mtk-star-emac: return ok when xmit drops The ndo_start_xmit() method must return NETDEV_TX_OK if the DMA mapping fails, after freeing the socket buffer. Fix the mtk_star_netdev_start_xmit() function accordingly. Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver") Signed-off-by: Vincent Stehlé Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20201112084833.21842-1-vincent.stehle@laposte.net Signed-off-by: Jakub Kicinski commit 1922a46b8c18cb09d33e06a6cc2e43844ac1b9d0 Author: Joel Stanley Date: Thu Nov 12 16:42:10 2020 +1030 net/ncsi: Fix netlink registration If a user unbinds and re-binds a NC-SI aware driver the kernel will attempt to register the netlink interface at runtime. The structure is marked __ro_after_init so registration fails spectacularly at this point. # echo 1e660000.ethernet > /sys/bus/platform/drivers/ftgmac100/unbind # echo 1e660000.ethernet > /sys/bus/platform/drivers/ftgmac100/bind ftgmac100 1e660000.ethernet: Read MAC address 52:54:00:12:34:56 from chip ftgmac100 1e660000.ethernet: Using NCSI interface 8<--- cut here --- Unable to handle kernel paging request at virtual address 80a8f858 pgd = 8c768dd6 [80a8f858] *pgd=80a0841e(bad) Internal error: Oops: 80d [#1] SMP ARM CPU: 0 PID: 116 Comm: sh Not tainted 5.10.0-rc3-next-20201111-00003-gdd25b227ec1e #51 Hardware name: Generic DT based system PC is at genl_register_family+0x1f8/0x6d4 LR is at 0xff26ffff pc : [<8073f930>] lr : [] psr: 20000153 sp : 8553bc80 ip : 81406244 fp : 8553bd04 r10: 8085d12c r9 : 80a8f73c r8 : 85739000 r7 : 00000017 r6 : 80a8f860 r5 : 80c8ab98 r4 : 80a8f858 r3 : 00000000 r2 : 00000000 r1 : 81406130 r0 : 00000017 Flags: nzCv IRQs on FIQs off Mode SVC_32 ISA ARM Segment none Control: 00c5387d Table: 85524008 DAC: 00000051 Process sh (pid: 116, stack limit = 0x1f1988d6) ... Backtrace: [<8073f738>] (genl_register_family) from [<80860ac0>] (ncsi_init_netlink+0x20/0x48) r10:8085d12c r9:80c8fb0c r8:85739000 r7:00000000 r6:81218000 r5:85739000 r4:8121c000 [<80860aa0>] (ncsi_init_netlink) from [<8085d740>] (ncsi_register_dev+0x1b0/0x210) r5:8121c400 r4:8121c000 [<8085d590>] (ncsi_register_dev) from [<805a8060>] (ftgmac100_probe+0x6e0/0x778) r10:00000004 r9:80950228 r8:8115bc10 r7:8115ab00 r6:9eae2c24 r5:813b6f88 r4:85739000 [<805a7980>] (ftgmac100_probe) from [<805355ec>] (platform_drv_probe+0x58/0xa8) r9:80c76bb0 r8:00000000 r7:80cd4974 r6:80c76bb0 r5:8115bc10 r4:00000000 [<80535594>] (platform_drv_probe) from [<80532d58>] (really_probe+0x204/0x514) r7:80cd4974 r6:00000000 r5:80cd4868 r4:8115bc10 Jakub pointed out that ncsi_register_dev is obviously broken, because there is only one family so it would never work if there was more than one ncsi netdev. Fix the crash by registering the netlink family once on boot, and drop the code to unregister it. Fixes: 955dc68cb9b2 ("net/ncsi: Add generic netlink family") Signed-off-by: Joel Stanley Reviewed-by: Samuel Mendoza-Jonas Link: https://lore.kernel.org/r/20201112061210.914621-1-joel@jms.id.au Signed-off-by: Jakub Kicinski commit 5ce6861d36ed5207aff9e5eead4c7cc38a986586 Author: Venkata Sandeep Dhanalakota Date: Thu Nov 5 17:18:42 2020 -0800 drm/i915: Correctly set SFC capability for video engines SFC capability of video engines is not set correctly because i915 is testing for incorrect bits. Fixes: c5d3e39caa45 ("drm/i915: Engine discovery query") Cc: Matt Roper Cc: Tvrtko Ursulin Signed-off-by: Venkata Sandeep Dhanalakota Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Tvrtko Ursulin Cc: # v5.3+ Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201106011842.36203-1-daniele.ceraolospurio@intel.com (cherry picked from commit ad18fa0f5f052046cad96fee762b5c64f42dd86a) Signed-off-by: Rodrigo Vivi commit 0eb0feb9aeac392edf01b525a54acde9b002312e Author: Chris Wilson Date: Thu Nov 5 15:49:34 2020 +0000 drm/i915/gem: Pull phys pread/pwrite implementations to the backend Move the specialised interactions with the physical GEM object from the pread/pwrite ioctl handler into the phys backend. Currently, if one is able to exhaust the entire aperture and then try to pwrite into an object not backed by struct page, we accidentally invoked the phys pwrite handler on a non-phys object; calamitous. Fixes: c6790dc22312 ("drm/i915: Wean off drm_pci_alloc/drm_pci_free") Testcase: igt/gem_pwrite/exhaustion Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20201105154934.16022-2-chris@chris-wilson.co.uk (cherry picked from commit 852e1b3644817f071427b83859b889c788a0cf69) Signed-off-by: Rodrigo Vivi commit 0a1db6f0841288274f0d1e3a8fa8a3a787e05633 Author: Matthew Auld Date: Thu Nov 5 15:49:33 2020 +0000 drm/i915/gem: Allow backends to override pread implementation As there are more and more complicated interactions between the different backing stores and userspace, push the control into the backends rather than accumulate them all inside the ioctl handlers. Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201105154934.16022-1-chris@chris-wilson.co.uk (cherry picked from commit 0049b688459b846f819b6e51c24cd0781fcfde41) Signed-off-by: Rodrigo Vivi commit 585e5b17b92dead8a3aca4e3c9876fbca5f7e0ba Merge: 20ca21dfccb6d d19d8d345eecd Author: Linus Torvalds Date: Thu Nov 12 16:39:58 2020 -0800 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fscrypt fix from Eric Biggers: "Fix a regression where new files weren't using inline encryption when they should be" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fscrypt: fix inline encryption not used on new files commit 20ca21dfccb6dd6ae4d1d22b91c3c7514f4a712c Merge: db7c953555388 4e79e3f08e576 Author: Linus Torvalds Date: Thu Nov 12 16:37:14 2020 -0800 Merge tag 'gfs2-v5.10-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fixes from Andreas Gruenbacher: "Fix jdata data corruption and glock reference leak" * tag 'gfs2-v5.10-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix case in which ail writes are done to jdata holes Revert "gfs2: Ignore journal log writes for jdata holes" gfs2: fix possible reference leak in gfs2_check_blk_type commit 77c7e1bc060deab6430f1dff5922ccd3093d9776 Author: Mike Travis Date: Tue Nov 10 19:04:18 2020 -0600 x86/platform/uv: Fix copied UV5 output archtype A test shows that the output contains a space: # cat /proc/sgi_uv/archtype NSGI4 U/UVX Remove that embedded space by copying the "trimmed" buffer instead of the untrimmed input character list. Use sizeof to remove size dependency on copy out length. Increase output buffer size by one character just in case BIOS sends an 8 character string for archtype. Fixes: 1e61f5a95f19 ("Add and decode Arch Type in UVsystab") Signed-off-by: Mike Travis Signed-off-by: Thomas Gleixner Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20201111010418.82133-1-mike.travis@hpe.com commit db7c953555388571a96ed8783ff6c5745ba18ab9 Merge: 200f9d21aa92a edbc21113bde1 Author: Linus Torvalds Date: Thu Nov 12 14:02:04 2020 -0800 Merge tag 'net-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Current release - regressions: - arm64: dts: fsl-ls1028a-kontron-sl28: specify in-band mode for ENETC Current release - bugs in new features: - mptcp: provide rmem[0] limit offset to fix oops Previous release - regressions: - IPv6: Set SIT tunnel hard_header_len to zero to fix path MTU calculations - lan743x: correctly handle chips with internal PHY - bpf: Don't rely on GCC __attribute__((optimize)) to disable GCSE - mlx5e: Fix VXLAN port table synchronization after function reload Previous release - always broken: - bpf: Zero-fill re-used per-cpu map element - fix out-of-order UDP packets when forwarding with UDP GSO fraglists turned on: - fix UDP header access on Fast/frag0 UDP GRO - fix IP header access and skb lookup on Fast/frag0 UDP GRO - ethtool: netlink: add missing netdev_features_change() call - net: Update window_clamp if SOCK_RCVBUF is set - igc: Fix returning wrong statistics - ch_ktls: fix multiple leaks and corner cases in Chelsio TLS offload - tunnels: Fix off-by-one in lower MTU bounds for ICMP/ICMPv6 replies - r8169: disable hw csum for short packets on all chip versions - vrf: Fix fast path output packet handling with async Netfilter rules" * tag 'net-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (65 commits) lan743x: fix use of uninitialized variable net: udp: fix IP header access and skb lookup on Fast/frag0 UDP GRO net: udp: fix UDP header access on Fast/frag0 UDP GRO devlink: Avoid overwriting port attributes of registered port vrf: Fix fast path output packet handling with async Netfilter rules cosa: Add missing kfree in error path of cosa_write net: switch to the kernel.org patchwork instance ch_ktls: stop the txq if reaches threshold ch_ktls: tcb update fails sometimes ch_ktls/cxgb4: handle partial tag alone SKBs ch_ktls: don't free skb before sending FIN ch_ktls: packet handling prior to start marker ch_ktls: Correction in middle record handling ch_ktls: missing handling of header alone ch_ktls: Correction in trimmed_len calculation cxgb4/ch_ktls: creating skbs causes panic ch_ktls: Update cheksum information ch_ktls: Correction in finding correct length cxgb4/ch_ktls: decrypted bit is not enough net/x25: Fix null-ptr-deref in x25_connect ... commit 200f9d21aa92ae55390030b6c84757c2aa75bce0 Merge: af5043c89a8ef 11decaf8127b0 Author: Linus Torvalds Date: Thu Nov 12 13:49:12 2020 -0800 Merge tag 'nfs-for-5.10-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client bugfixes from Anna Schumaker: "Stable fixes: - Fix failure to unregister shrinker Other fixes: - Fix unnecessary locking to clear up some contention - Fix listxattr receive buffer size - Fix default mount options for nfsroot" * tag 'nfs-for-5.10-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFS: Remove unnecessary inode lock in nfs_fsync_dir() NFS: Remove unnecessary inode locking in nfs_llseek_dir() NFS: Fix listxattr receive buffer size NFSv4.2: fix failure to unregister shrinker nfsroot: Default mount option should ask for built-in NFS version commit ed4ffaf49bf9ce1002b516d8c6aa04937b7950bc Author: Marc Zyngier Date: Tue Nov 10 14:13:08 2020 +0000 KVM: arm64: Handle SCXTNUM_ELx traps As the kernel never sets HCR_EL2.EnSCXT, accesses to SCXTNUM_ELx will trap to EL2. Let's handle that as gracefully as possible by injecting an UNDEF exception into the guest. This is consistent with the guest's view of ID_AA64PFR0_EL1.CSV2 being at most 1. Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20201110141308.451654-4-maz@kernel.org commit 338b17933a6077bb5406b33d8b9fb9616fffc1af Author: Marc Zyngier Date: Tue Nov 10 14:13:07 2020 +0000 KVM: arm64: Unify trap handlers injecting an UNDEF A large number of system register trap handlers only inject an UNDEF exeption, and yet each class of sysreg seems to provide its own, identical function. Let's unify them all, saving us introducing yet another one later. Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20201110141308.451654-3-maz@kernel.org commit 23711a5e662c1a66e14cb9288e7dfd2b840efcd5 Author: Marc Zyngier Date: Tue Nov 10 14:13:06 2020 +0000 KVM: arm64: Allow setting of ID_AA64PFR0_EL1.CSV2 from userspace We now expose ID_AA64PFR0_EL1.CSV2=1 to guests running on hosts that are immune to Spectre-v2, but that don't have this field set, most likely because they predate the specification. However, this prevents the migration of guests that have started on a host the doesn't fake this CSV2 setting to one that does, as KVM rejects the write to ID_AA64PFR0_EL2 on the grounds that it isn't what is already there. In order to fix this, allow userspace to set this field as long as this doesn't result in a promising more than what is already there (setting CSV2 to 0 is acceptable, but setting it to 1 when it is already set to 0 isn't). Fixes: e1026237f9067 ("KVM: arm64: Set CSV2 for guests on hardware unaffected by Spectre-v2") Reported-by: Peng Liang Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20201110141308.451654-2-maz@kernel.org commit bc551d776b691022f49b5bb5379bd58f7c4eb76a Author: Jonathan Liu Date: Sat Oct 31 19:17:47 2020 +1100 drm: bridge: dw-hdmi: Avoid resetting force in the detect function It has been observed that resetting force in the detect function can result in the PHY being powered down in response to hot-plug detect being asserted, even when the HDMI connector is forced on. Enabling debug messages and adding a call to dump_stack() in dw_hdmi_phy_power_off() shows the following in dmesg: [ 160.637413] dwhdmi-rockchip ff940000.hdmi: EVENT=plugin [ 160.637433] dwhdmi-rockchip ff940000.hdmi: PHY powered down in 0 iterations Call trace: dw_hdmi_phy_power_off dw_hdmi_phy_disable dw_hdmi_update_power dw_hdmi_detect dw_hdmi_connector_detect drm_helper_probe_detect_ctx drm_helper_hpd_irq_event dw_hdmi_irq irq_thread_fn irq_thread kthread ret_from_fork Fixes: 381f05a7a842 ("drm: bridge/dw_hdmi: add connector mode forcing") Signed-off-by: Jonathan Liu Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201031081747.372599-1-net147@gmail.com commit 4f6b838c378a52ea3ae0b15f12ca8a20849072fa Merge: c512298eed036 3650b228f83ad Author: Marc Zyngier Date: Thu Nov 12 21:20:43 2020 +0000 Merge tag 'v5.10-rc1' into kvmarm-master/next Linux 5.10-rc1 Signed-off-by: Marc Zyngier commit c01a21b77722db0474bbcc4eafc8c4e0d8fed6d8 Author: Petr Vorel Date: Thu Nov 12 17:50:05 2020 +0100 loop: Fix occasional uevent drop Commit 716ad0986cbd ("loop: Switch to set_capacity_revalidate_and_notify") causes an occasional drop of loop device uevent, which are no longer triggered in loop_set_size() but in a different part of code. Bug is reproducible with LTP test uevent01 [1]: i=0; while true; do i=$((i+1)); echo "== $i ==" lsmod |grep -q loop && rmmod -f loop ./uevent01 || break done Put back triggering through code called in loop_set_size(). Fix required to add yet another parameter to set_capacity_revalidate_and_notify(). [1] https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/uevents/uevent01.c [hch: rebased on a different change to the prototype of set_capacity_revalidate_and_notify] Cc: stable@vger.kernel.org # v5.9 Fixes: 716ad0986cbd ("loop: Switch to set_capacity_revalidate_and_notify") Reported-by: Signed-off-by: Petr Vorel Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 7e890c37c25c7cbca37ff0ab292873d8146e713b Author: Christoph Hellwig Date: Thu Nov 12 17:50:04 2020 +0100 block: add a return value to set_capacity_revalidate_and_notify Return if the function ended up sending an uevent or not. Cc: stable@vger.kernel.org # v5.9 Signed-off-by: Christoph Hellwig Reviewed-by: Petr Vorel Signed-off-by: Jens Axboe commit c3213d260a23e263ef85ba21ac68c9e7578020b5 Author: Scott Mayhew Date: Thu Nov 12 15:17:32 2020 -0500 SUNRPC: Fix oops in the rpc_xdr_buf event class Backchannel rpc tasks don't have task->tk_client set, so it's necessary to check it for NULL before dereferencing. Fixes: c509f15a5801 ("SUNRPC: Split the xdr_buf event class") Signed-off-by: Scott Mayhew Reviewed-by: Chuck Lever Signed-off-by: J. Bruce Fields commit dd94ac807a5e10e0b25b68397c473276905cca73 Author: Leo Yan Date: Tue Nov 10 14:34:17 2020 +0800 perf test: Update branch sample pattern for cs-etm Since the commit 943b69ac1884 ("perf parse-events: Set exclude_guest=1 for user-space counting"), 'exclude_guest=1' is set for user-space counting; and the branch sample's modifier has been altered, the sample event name has been changed from "branches:u:" to "branches:uH:", which gives out info for "user-space and host counting". But the cs-etm testing's regular expression cannot match the updated branch sample event and leads to test failure. This patch updates the branch sample pattern by using a more flexible expression '.*' to match branch sample's modifiers, so that allows the testing to work as expected. Fixes: 943b69ac1884 ("perf parse-events: Set exclude_guest=1 for user-space counting") Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight ml Cc: stable@kernel.org Link: http://lore.kernel.org/lkml/20201110063417.14467-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit db2ac2e49e564c2b219c4b33d9903aa383334256 Author: Leo Yan Date: Tue Nov 10 14:34:16 2020 +0800 perf test: Fix a typo in cs-etm testing Fix a typo: s/devce_name/device_name. Fixes: fe0aed19b266 ("perf test: Introduce script for Arm CoreSight testing") Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight ml Cc: stable@kernel.org Link: http://lore.kernel.org/lkml/20201110063417.14467-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit db1a8b97a0a36155171dbb805fbcb276e07559f6 Author: Arnaldo Carvalho de Melo Date: Mon Nov 9 13:59:15 2020 -0300 tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy' To bring in the change made in this cset: 4d6ffa27b8e5116c ("x86/lib: Change .weak to SYM_FUNC_START_WEAK for arch/x86/lib/mem*_64.S") 6dcc5627f6aec4cb ("x86/asm: Change all ENTRY+ENDPROC to SYM_FUNC_*") I needed to define SYM_FUNC_START_LOCAL() as SYM_L_GLOBAL as mem{cpy,set}_{orig,erms} are used by 'perf bench'. This silences these perf tools build warnings: Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S' diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S Warning: Kernel ABI header at 'tools/arch/x86/lib/memset_64.S' differs from latest version at 'arch/x86/lib/memset_64.S' diff -u tools/arch/x86/lib/memset_64.S arch/x86/lib/memset_64.S Cc: Adrian Hunter Cc: Borislav Petkov Cc: Fangrui Song Cc: Ian Rogers Cc: Jiri Olsa Cc: Jiri Slaby Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit b0e5a05cc9e37763c7f19366d94b1a6160c755bc Author: Leo Yan Date: Wed Nov 4 17:42:29 2020 +0800 perf lock: Don't free "lock_seq_stat" if read_count isn't zero When execute command "perf lock report", it hits failure and outputs log as follows: perf: builtin-lock.c:623: report_lock_release_event: Assertion `!(seq->read_count < 0)' failed. Aborted This is an imbalance issue. The locking sequence structure "lock_seq_stat" contains the reader counter and it is used to check if the locking sequence is balance or not between acquiring and releasing. If the tool wrongly frees "lock_seq_stat" when "read_count" isn't zero, the "read_count" will be reset to zero when allocate a new structure at the next time; thus it causes the wrong counting for reader and finally results in imbalance issue. To fix this issue, if detects "read_count" is not zero (means still have read user in the locking sequence), goto the "end" tag to skip freeing structure "lock_seq_stat". Fixes: e4cef1f65061 ("perf lock: Fix state machine to recognize lock sequence") Signed-off-by: Leo Yan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201104094229.17509-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit e24a87b54ef3e39261f1d859b7f78416349dfb14 Author: Leo Yan Date: Wed Nov 4 17:42:28 2020 +0800 perf lock: Correct field name "flags" The tracepoint "lock:lock_acquire" contains field "flags" but not "flag". Current code wrongly retrieves value from field "flag" and it always gets zero for the value, thus "perf lock" doesn't report the correct result. This patch replaces the field name "flag" with "flags", so can read out the correct flags for locking. Fixes: e4cef1f65061 ("perf lock: Fix state machine to recognize lock sequence") Signed-off-by: Leo Yan Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201104094229.17509-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit c371dcf51cef4ae53d00090a148d004b113217f0 Merge: 4def49da620c8 63c5395bb7a97 Author: Mark Brown Date: Thu Nov 12 19:34:52 2020 +0000 Merge series "Use-after-free be gone" from Lukas Wunner : Here's my proposal to fix the use-after-free bugs reported by Sascha Hauer and Florian Fainelli: I scrutinized all SPI drivers in the v5.10 tree: * There are 9 drivers with a use-after-free in the ->remove() hook caused by accessing driver private data after spi_unregister_controller(). * There are 8 drivers which leak the spi_controller in the ->probe() error path because of a missing spi_controller_put(). I'm introducing devm_spi_alloc_master/slave() which automatically calls spi_controller_put() on ->remove(). This fixes both classes of bugs while at the same time reducing code amount and complexity in the ->probe() hook. I propose that spi_controller_unregister() should no longer release a reference on the spi_controller. Instead, drivers need to either do it themselves or use one of the devm functions introduced herein. The vast majority of drivers can be converted to the devm functions. See the commit message of patch [1/4] for the rationale and details. Enclosed are patches for 3 Broadcom drivers. Patches for the other drivers are on this branch: https://github.com/l1k/linux/commits/spi_fixes @Florian Fainelli: Could you verify that there are no KASAN splats or leaks with these patches? Unfortunately I do not have any SPI-capable hardware at my disposal right now, so can only compile-test. You may want to augment spi_controller_release() with a printk() to log when the spi_controller is freed. @Mark Brown: Patches [2/4] to [4/4] reference the SHA-1 of patch [1/4] in their stable tags. Because the hash is unknown to me until you apply the patch, I've used "123456789abc" as a placeholder. You'll have to replace the hash if/when applying. Alternatively, only apply patch [1/4] and I'll repost the other patches with the hash fixed up. Thanks! Lukas Wunner (4): spi: Introduce device-managed SPI controller allocation spi: bcm2835: Fix use-after-free on unbind spi: bcm2835aux: Fix use-after-free on unbind spi: bcm-qspi: Fix use-after-free on unbind drivers/spi/spi-bcm-qspi.c | 34 ++++++++------------- drivers/spi/spi-bcm2835.c | 24 +++++---------- drivers/spi/spi-bcm2835aux.c | 21 +++++-------- drivers/spi/spi.c | 58 +++++++++++++++++++++++++++++++++++- include/linux/spi/spi.h | 19 ++++++++++++ 5 files changed, 103 insertions(+), 53 deletions(-) -- 2.28.0 commit 9602182810cc15e241f06c63c90b828ef63d0507 Author: Alexei Starovoitov Date: Thu Nov 12 10:03:40 2020 -0800 MAINTAINERS/bpf: Update Andrii's entry. Andrii has been a de-facto maintainer for libbpf and other components. Update maintainers entry to acknowledge his work de-jure. The folks with git write permissions will continue to follow the rule of not applying their own patches unless absolutely trivial. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201112180340.45265-1-alexei.starovoitov@gmail.com commit af5043c89a8ef6b6949a245fff355a552eaed240 Merge: fcfb67918c0bc 7222a8a52c9ec Author: Linus Torvalds Date: Thu Nov 12 11:06:53 2020 -0800 Merge tag 'acpi-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These are mostly docmentation fixes and janitorial changes plus some new device IDs and a new quirk. Specifics: - Fix documentation regarding GPIO properties (Andy Shevchenko) - Fix spelling mistakes in ACPI documentation (Flavio Suligoi) - Fix white space inconsistencies in ACPI code (Maximilian Luz) - Fix string formatting in the ACPI Generic Event Device (GED) driver (Nick Desaulniers) - Add Intel Alder Lake device IDs to the ACPI drivers used by the Dynamic Platform and Thermal Framework (Srinivas Pandruvada) - Add lid-related DMI quirk for Medion Akoya E2228T to the ACPI button driver (Hans de Goede)" * tag 'acpi-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: DPTF: Support Alder Lake Documentation: ACPI: fix spelling mistakes ACPI: button: Add DMI quirk for Medion Akoya E2228T ACPI: GED: fix -Wformat ACPI: Fix whitespace inconsistencies ACPI: scan: Fix acpi_dma_configure_id() kerneldoc name Documentation: firmware-guide: gpio-properties: Clarify initial output state Documentation: firmware-guide: gpio-properties: active_low only for GpioIo() Documentation: firmware-guide: gpio-properties: Fix factual mistakes commit fcfb67918c0bc26c595c424b14f736205a49328a Merge: 3d5e28bff7ad5 fcb3a1ab79904 Author: Linus Torvalds Date: Thu Nov 12 11:03:38 2020 -0800 Merge tag 'pm-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Make the intel_pstate driver behave as expected when it operates in the passive mode with HWP enabled and the 'powersave' governor on top of it" * tag 'pm-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: Take CPUFREQ_GOV_STRICT_TARGET into account cpufreq: Add strict_target to struct cpufreq_policy cpufreq: Introduce CPUFREQ_GOV_STRICT_TARGET cpufreq: Introduce governor flags commit 4def49da620c84a682d9361d6bef0a97eed46fe0 Author: Lukas Wunner Date: Sun Nov 8 23:41:00 2020 +0100 spi: lpspi: Fix use-after-free on unbind Normally the last reference on an spi_controller is released by spi_unregister_controller(). In the case of the i.MX lpspi driver, the spi_controller is registered with devm_spi_register_controller(), so spi_unregister_controller() is invoked automatically after the driver has unbound. However the driver already releases the last reference in fsl_lpspi_remove() through a gratuitous call to spi_master_put(), causing a use-after-free when spi_unregister_controller() is subsequently invoked by the devres framework. Fix by dropping the superfluous spi_master_put(). Fixes: 944c01a889d9 ("spi: lpspi: enable runtime pm for lpspi") Signed-off-by: Lukas Wunner Cc: # v5.2+ Cc: Han Xu Link: https://lore.kernel.org/r/ab3c0b18bd820501a12c85e440006e09ec0e275f.1604874488.git.lukas@wunner.de Signed-off-by: Mark Brown commit edbc21113bde13ca3d06eec24b621b1f628583dd Author: Sven Van Asbroeck Date: Thu Nov 12 10:25:13 2020 -0500 lan743x: fix use of uninitialized variable When no devicetree is present, the driver will use an uninitialized variable. Fix by initializing this variable. Fixes: 902a66e08cea ("lan743x: correctly handle chips with internal PHY") Reported-by: kernel test robot Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20201112152513.1941-1-TheSven73@gmail.com Signed-off-by: Jakub Kicinski commit 5861c8cb1c90fc171d56994827a66a5595a44d56 Merge: 8a5c2906c52f4 55e729889bb07 Author: Jakub Kicinski Date: Thu Nov 12 09:55:58 2020 -0800 Merge branch 'net-udp-fix-fast-frag0-udp-gro' Alexander Lobakin says: ==================== net: udp: fix Fast/frag0 UDP GRO While testing UDP GSO fraglists forwarding through driver that uses Fast GRO (via napi_gro_frags()), I was observing lots of out-of-order iperf packets: [ ID] Interval Transfer Bitrate Jitter [SUM] 0.0-40.0 sec 12106 datagrams received out-of-order Simple switch to napi_gro_receive() or any other method without frag0 shortcut completely resolved them. I've found two incorrect header accesses in GRO receive callback(s): - udp_hdr() (instead of udp_gro_udphdr()) that always points to junk in "fast" mode and could probably do this in "regular". This was the actual bug that caused all out-of-order delivers; - udp{4,6}_lib_lookup_skb() -> ip{,v6}_hdr() (instead of skb_gro_network_header()) that potentionally might return odd pointers in both modes. Each patch addresses one of these two issues. This doesn't cover a support for nested tunnels as it's out of the subject and requires more invasive changes. It will be handled separately in net-next series. Credits: Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Willem de Bruijn Since v4 [0]: - split the fix into two logical ones (Willem); - replace ternaries with plain ifs to beautify the code (Jakub); - drop p->data part to reintroduce it later in abovementioned set. Since v3 [1]: - restore the original {,__}udp{4,6}_lib_lookup_skb() and use private versions of them inside GRO code (Willem). Since v2 [2]: - dropped redundant check introduced in v2 as it's performed right before (thanks to Eric); - udp_hdr() switched to data + off for skbs from list (also Eric); - fixed possible malfunction of {,__}udp{4,6}_lib_lookup_skb() with Fast/frag0 due to ip{,v6}_hdr() usage (Willem). Since v1 [3]: - added a NULL pointer check for "uh" as suggested by Willem. [0] https://lore.kernel.org/netdev/Ha2hou5eJPcblo4abjAqxZRzIl1RaLs2Hy0oOAgFs@cp4-web-036.plabs.ch [1] https://lore.kernel.org/netdev/MgZce9htmEtCtHg7pmWxXXfdhmQ6AHrnltXC41zOoo@cp7-web-042.plabs.ch [2] https://lore.kernel.org/netdev/0eaG8xtbtKY1dEKCTKUBubGiC9QawGgB3tVZtNqVdY@cp4-web-030.plabs.ch [3] https://lore.kernel.org/netdev/YazU6GEzBdpyZMDMwJirxDX7B4sualpDG68ADZYvJI@cp4-web-034.plabs.ch ==================== Link: https://lore.kernel.org/r/hjGOh0iCOYyo1FPiZh6TMXcx3YCgNs1T1eGKLrDz8@cp4-web-037.plabs.ch Signed-off-by: Jakub Kicinski commit 55e729889bb07d68ab071660ce3f5e7a7872ebe8 Author: Alexander Lobakin Date: Wed Nov 11 20:45:38 2020 +0000 net: udp: fix IP header access and skb lookup on Fast/frag0 UDP GRO udp{4,6}_lib_lookup_skb() use ip{,v6}_hdr() to get IP header of the packet. While it's probably OK for non-frag0 paths, this helpers will also point to junk on Fast/frag0 GRO when all headers are located in frags. As a result, sk/skb lookup may fail or give wrong results. To support both GRO modes, skb_gro_network_header() might be used. To not modify original functions, add private versions of udp{4,6}_lib_lookup_skb() only to perform correct sk lookups on GRO. Present since the introduction of "application-level" UDP GRO in 4.7-rc1. Misc: replace totally unneeded ternaries with plain ifs. Fixes: a6024562ffd7 ("udp: Add GRO functions to UDP socket") Suggested-by: Willem de Bruijn Cc: Eric Dumazet Signed-off-by: Alexander Lobakin Acked-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit 4b1a86281cc1d0de46df3ad2cb8c1f86ac07681c Author: Alexander Lobakin Date: Wed Nov 11 20:45:25 2020 +0000 net: udp: fix UDP header access on Fast/frag0 UDP GRO UDP GRO uses udp_hdr(skb) in its .gro_receive() callback. While it's probably OK for non-frag0 paths (when all headers or even the entire frame are already in skb head), this inline points to junk when using Fast GRO (napi_gro_frags() or napi_gro_receive() with only Ethernet header in skb head and all the rest in the frags) and breaks GRO packet compilation and the packet flow itself. To support both modes, skb_gro_header_fast() + skb_gro_header_slow() are typically used. UDP even has an inline helper that makes use of them, udp_gro_udphdr(). Use that instead of troublemaking udp_hdr() to get rid of the out-of-order delivers. Present since the introduction of plain UDP GRO in 5.0-rc1. Fixes: e20cf8d3f1f7 ("udp: implement GRO for plain UDP sockets.") Cc: Eric Dumazet Signed-off-by: Alexander Lobakin Acked-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit 4e79e3f08e576acd51dffb4520037188703238b3 Author: Bob Peterson Date: Thu Nov 12 10:02:48 2020 -0600 gfs2: Fix case in which ail writes are done to jdata holes Patch b2a846dbef4e ("gfs2: Ignore journal log writes for jdata holes") tried (unsuccessfully) to fix a case in which writes were done to jdata blocks, the blocks are sent to the ail list, then a punch_hole or truncate operation caused the blocks to be freed. In other words, the ail items are for jdata holes. Before b2a846dbef4e, the jdata hole caused function gfs2_block_map to return -EIO, which was eventually interpreted as an IO error to the journal, and then withdraw. This patch changes function gfs2_get_block_noalloc, which is only used for jdata writes, so it returns -ENODATA rather than -EIO, and when -ENODATA is returned to gfs2_ail1_start_one, the error is ignored. We can safely ignore it because gfs2_ail1_start_one is only called when the jdata pages have already been written and truncated, so the ail1 content no longer applies. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit d3039c0615c3f80eaf735e581ed11242c0064299 Author: Bob Peterson Date: Wed Nov 11 11:09:55 2020 -0600 Revert "gfs2: Ignore journal log writes for jdata holes" This reverts commit b2a846dbef4ef54ef032f0f5ee188c609a0278a7. That commit changed the behavior of function gfs2_block_map to return -ENODATA in cases where a hole (IOMAP_HOLE) is encountered and create is false. While that fixed the intended problem for jdata, it also broke other callers of gfs2_block_map such as some jdata block reads. Before the patch, an encountered hole would be skipped and the buffer seen as unmapped by the caller. The patch changed the behavior to return -ENODATA, which is interpreted as an error by the caller. The -ENODATA return code should be restricted to the specific case where jdata holes are encountered during ail1 writes. That will be done in a later patch. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit b1e678bf290db5a76f1b6a9f7c381310e03440d6 Author: Christoph Hellwig Date: Fri Nov 6 19:19:32 2020 +0100 RMDA/sw: Don't allow drivers using dma_virt_ops on highmem configs dma_virt_ops requires that all pages have a kernel virtual address. Introduce a INFINIBAND_VIRT_DMA Kconfig symbol that depends on !HIGHMEM and make all three drivers depend on the new symbol. Also remove the ARCH_DMA_ADDR_T_64BIT dependency, which has been obsolete since commit 4965a68780c5 ("arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig") Fixes: 551199aca1c3 ("lib/dma-virt: Add dma_virt_ops") Link: https://lore.kernel.org/r/20201106181941.1878556-2-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe commit fd63729cc0a6872bdabd393ee933a969642e4076 Author: Andrii Nakryiko Date: Wed Nov 11 15:12:15 2020 -0800 selftests/bpf: Fix unused attribute usage in subprogs_unused test Correct attribute name is "unused". maybe_unused is a C++17 addition. This patch fixes compilation warning during selftests compilation. Fixes: 197afc631413 ("libbpf: Don't attempt to load unused subprog as an entry-point BPF program") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201111231215.1779147-1-andrii@kernel.org commit d035c3f6cdb8e5d5a17adcbb79d7453417a6077d Author: Qinglang Miao Date: Wed Nov 11 11:22:02 2020 +0800 RDMA/pvrdma: Fix missing kfree() in pvrdma_register_device() Fix missing kfree in pvrdma_register_device() when failure from ib_device_set_netdev(). Fixes: 4b38da75e089 ("RDMA/drivers: Convert easy drivers to use ib_device_set_netdev()") Link: https://lore.kernel.org/r/20201111032202.17925-1-miaoqinglang@huawei.com Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Jason Gunthorpe commit 8a5c2906c52f4a81939b4f8536e0004a4193a154 Merge: 9f73bd1c2c4c3 5fb7f75bc138c Author: Jakub Kicinski Date: Thu Nov 12 08:47:22 2020 -0800 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2020-11-10 This series contains updates to i40e and igc drivers and the MAINTAINERS file. Slawomir fixes updating VF MAC addresses to fix various issues related to reporting and setting of these addresses for i40e. Dan Carpenter fixes a possible used before being initialized issue for i40e. Vinicius fixes reporting of netdev stats for igc. Tony updates repositories for Intel Ethernet Drivers. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: MAINTAINERS: Update repositories for Intel Ethernet Drivers igc: Fix returning wrong statistics i40e, xsk: uninitialized variable in i40e_clean_rx_irq_zc() i40e: Fix MAC address setting for a VF via Host/VM ==================== Link: https://lore.kernel.org/r/20201111001955.533210-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit eb73060b971aa04e4f7421b8c9c0363918608b72 Author: Jason Gunthorpe Date: Wed Nov 4 17:40:59 2020 -0400 RDMA/cm: Make the local_id_table xarray non-irq The xarray is never mutated from an IRQ handler, only from work queues under a spinlock_irq. Thus there is no reason for it be an IRQ type xarray. This was copied over from the original IDR code, but the recent rework put the xarray inside another spinlock_irq which will unbalance the unlocking. Fixes: c206f8bad15d ("RDMA/cm: Make it clearer how concurrency works in cm_req_handler()") Link: https://lore.kernel.org/r/0-v1-808b6da3bd3f+1857-cm_xarray_no_irq_jgg@nvidia.com Reported-by: Matthew Wilcox Signed-off-by: Jason Gunthorpe commit 9f73bd1c2c4c304b238051fc92b3f807326f0a89 Author: Parav Pandit Date: Wed Nov 11 05:47:44 2020 +0200 devlink: Avoid overwriting port attributes of registered port Cited commit in fixes tag overwrites the port attributes for the registered port. Avoid such error by checking registered flag before setting attributes. Fixes: 71ad8d55f8e5 ("devlink: Replace devlink_port_attrs_set parameters with a struct") Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20201111034744.35554-1-parav@nvidia.com Signed-off-by: Jakub Kicinski commit 9e2b7fa2df4365e99934901da4fb4af52d81e820 Author: Martin Willi Date: Fri Nov 6 08:30:30 2020 +0100 vrf: Fix fast path output packet handling with async Netfilter rules VRF devices use an optimized direct path on output if a default qdisc is involved, calling Netfilter hooks directly. This path, however, does not consider Netfilter rules completing asynchronously, such as with NFQUEUE. The Netfilter okfn() is called for asynchronously accepted packets, but the VRF never passes that packet down the stack to send it out over the slave device. Using the slower redirect path for this seems not feasible, as we do not know beforehand if a Netfilter hook has asynchronously completing rules. Fix the use of asynchronously completing Netfilter rules in OUTPUT and POSTROUTING by using a special completion function that additionally calls dst_output() to pass the packet down the stack. Also, slightly adjust the use of nf_reset_ct() so that is called in the asynchronous case, too. Fixes: dcdd43c41e60 ("net: vrf: performance improvements for IPv4") Fixes: a9ec54d1b0cd ("net: vrf: performance improvements for IPv6") Signed-off-by: Martin Willi Link: https://lore.kernel.org/r/20201106073030.3974927-1-martin@strongswan.org Signed-off-by: Jakub Kicinski commit 11decaf8127b035242cb55de2fc6946f8961f671 Author: Trond Myklebust Date: Fri Oct 30 17:57:30 2020 -0400 NFS: Remove unnecessary inode lock in nfs_fsync_dir() nfs_inc_stats() is already thread-safe, and there are no other reasons to hold the inode lock here. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 83f2c45e63935a325f73bde98b1609e0976a12e0 Author: Trond Myklebust Date: Fri Oct 30 17:57:29 2020 -0400 NFS: Remove unnecessary inode locking in nfs_llseek_dir() Remove the contentious inode lock, and instead provide thread safety using the file->f_lock spinlock. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 6c2190b3fcbc92cb79e39cc7e7531656b341e463 Author: Chuck Lever Date: Sat Oct 31 12:44:25 2020 -0400 NFS: Fix listxattr receive buffer size Certain NFSv4.2/RDMA tests fail with v5.9-rc1. rpcrdma_convert_kvec() runs off the end of the rl_segments array because rq_rcv_buf.tail[0].iov_len holds a very large positive value. The resultant kernel memory corruption is enough to crash the client system. Callers of rpc_prepare_reply_pages() must reserve an extra XDR_UNIT in the maximum decode size for a possible XDR pad of the contents of the xdr_buf's pages. That guarantees the allocated receive buffer will be large enough to accommodate the usual contents plus that XDR pad word. encode_op_hdr() cannot add that extra word. If it does, xdr_inline_pages() underruns the length of the tail iovec. Fixes: 3e1f02123fba ("NFSv4.2: add client side XDR handling for extended attributes") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 70438afbf17e5194dd607dd17759560a363b7bb4 Author: J. Bruce Fields Date: Wed Oct 21 10:34:15 2020 -0400 NFSv4.2: fix failure to unregister shrinker We forgot to unregister the nfs4_xattr_large_entry_shrinker. That leaves the global list of shrinkers corrupted after unload of the nfs module, after which possibly unrelated code that calls register_shrinker() or unregister_shrinker() gets a BUG() with "supervisor write access in kernel mode". And similarly for the nfs4_xattr_large_entry_lru. Reported-by: Kris Karas Tested-By: Kris Karas Fixes: 95ad37f90c33 "NFSv4.2: add client side xattr caching." Signed-off-by: J. Bruce Fields CC: stable@vger.kernel.org Signed-off-by: Anna Schumaker commit 7222a8a52c9ec59affc4d6c4e2632b3e4a44cd27 Merge: 8d936bb13ce78 c1e9735975c05 9debfb81e7654 7daaa06357bf7 38748bcb940e8 Author: Rafael J. Wysocki Date: Thu Nov 12 16:11:48 2020 +0100 Merge branches 'acpi-scan', 'acpi-misc', 'acpi-button' and 'acpi-dptf' * acpi-scan: ACPI: scan: Fix acpi_dma_configure_id() kerneldoc name * acpi-misc: ACPI: GED: fix -Wformat ACPI: Fix whitespace inconsistencies * acpi-button: ACPI: button: Add DMI quirk for Medion Akoya E2228T * acpi-dptf: ACPI: DPTF: Support Alder Lake commit 63c5395bb7a9777a33f0e7b5906f2c0170a23692 Author: Lukas Wunner Date: Wed Nov 11 20:07:40 2020 +0100 spi: bcm-qspi: Fix use-after-free on unbind bcm_qspi_remove() calls spi_unregister_master() even though bcm_qspi_probe() calls devm_spi_register_master(). The spi_master is therefore unregistered and freed twice on unbind. Moreover, since commit 0392727c261b ("spi: bcm-qspi: Handle clock probe deferral"), bcm_qspi_probe() leaks the spi_master allocation if the call to devm_clk_get_optional() fails. Fix by switching over to the new devm_spi_alloc_master() helper which keeps the private data accessible until the driver has unbound and also avoids the spi_master leak on probe. While at it, fix an ordering issue in bcm_qspi_remove() wherein spi_unregister_master() is called after uninitializing the hardware, disabling the clock and freeing an IRQ data structure. The correct order is to call spi_unregister_master() *before* those teardown steps because bus accesses may still be ongoing until that function returns. Fixes: fa236a7ef240 ("spi: bcm-qspi: Add Broadcom MSPI driver") Signed-off-by: Lukas Wunner Cc: # v4.9+: 123456789abc: spi: Introduce device-managed SPI controller allocation Cc: # v4.9+ Cc: Kamal Dasu Acked-by: Florian Fainelli Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/5e31a9a59fd1c0d0b795b2fe219f25e5ee855f9d.1605121038.git.lukas@wunner.de Signed-off-by: Mark Brown commit e13ee6cc4781edaf8c7321bee19217e3702ed481 Author: Lukas Wunner Date: Wed Nov 11 20:07:30 2020 +0100 spi: bcm2835aux: Fix use-after-free on unbind bcm2835aux_spi_remove() accesses the driver's private data after calling spi_unregister_master() even though that function releases the last reference on the spi_master and thereby frees the private data. Fix by switching over to the new devm_spi_alloc_master() helper which keeps the private data accessible until the driver has unbound. Fixes: b9dd3f6d4172 ("spi: bcm2835aux: Fix controller unregister order") Signed-off-by: Lukas Wunner Cc: # v4.4+: 123456789abc: spi: Introduce device-managed SPI controller allocation Cc: # v4.4+: b9dd3f6d4172: spi: bcm2835aux: Fix controller unregister order Cc: # v4.4+ Link: https://lore.kernel.org/r/b290b06357d0c0bdee9cecc539b840a90630f101.1605121038.git.lukas@wunner.de Signed-off-by: Mark Brown commit e1483ac030fb4c57734289742f1c1d38dca61e22 Author: Lukas Wunner Date: Wed Nov 11 20:07:20 2020 +0100 spi: bcm2835: Fix use-after-free on unbind bcm2835_spi_remove() accesses the driver's private data after calling spi_unregister_controller() even though that function releases the last reference on the spi_controller and thereby frees the private data. Fix by switching over to the new devm_spi_alloc_master() helper which keeps the private data accessible until the driver has unbound. Fixes: f8043872e796 ("spi: add driver for BCM2835") Reported-by: Sascha Hauer Reported-by: Florian Fainelli Signed-off-by: Lukas Wunner Cc: # v3.10+: 123456789abc: spi: Introduce device-managed SPI controller allocation Cc: # v3.10+ Cc: Vladimir Oltean Tested-by: Florian Fainelli Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/ad66e0a0ad96feb848814842ecf5b6a4539ef35c.1605121038.git.lukas@wunner.de Signed-off-by: Mark Brown commit 5e844cc37a5cbaa460e68f9a989d321d63088a89 Author: Lukas Wunner Date: Wed Nov 11 20:07:10 2020 +0100 spi: Introduce device-managed SPI controller allocation SPI driver probing currently comprises two steps, whereas removal comprises only one step: spi_alloc_master() spi_register_controller() spi_unregister_controller() That's because spi_unregister_controller() calls device_unregister() instead of device_del(), thereby releasing the reference on the spi_controller which was obtained by spi_alloc_master(). An SPI driver's private data is contained in the same memory allocation as the spi_controller struct. Thus, once spi_unregister_controller() has been called, the private data is inaccessible. But some drivers need to access it after spi_unregister_controller() to perform further teardown steps. Introduce devm_spi_alloc_master() and devm_spi_alloc_slave(), which release a reference on the spi_controller struct only after the driver has unbound, thereby keeping the memory allocation accessible. Change spi_unregister_controller() to not release a reference if the spi_controller was allocated by one of these new devm functions. The present commit is small enough to be backportable to stable. It allows fixing drivers which use the private data in their ->remove() hook after it's been freed. It also allows fixing drivers which neglect to release a reference on the spi_controller in the probe error path. Long-term, most SPI drivers shall be moved over to the devm functions introduced herein. The few that can't shall be changed in a treewide commit to explicitly release the last reference on the controller. That commit shall amend spi_unregister_controller() to no longer release a reference, thereby completing the migration. As a result, the behaviour will be less surprising and more consistent with subsystems such as IIO, which also includes the private data in the allocation of the generic iio_dev struct, but calls device_del() in iio_device_unregister(). Signed-off-by: Lukas Wunner Link: https://lore.kernel.org/r/272bae2ef08abd21388c98e23729886663d19192.1605121038.git.lukas@wunner.de Signed-off-by: Mark Brown commit 7940fb035abd88040d56be209962feffa33b03d0 Author: Hans de Goede Date: Mon Nov 2 14:36:58 2020 +0100 HID: Add Logitech Dinovo Edge battery quirk The battery status is also being reported by the logitech-hidpp driver, so ignore the standard HID battery status to avoid reporting the same info twice. Note the logitech-hidpp battery driver provides more info, such as properly differentiating between charging and discharging. Also the standard HID battery info seems to be wrong, reporting a capacity of just 26% after fully charging the device. Signed-off-by: Hans de Goede Signed-off-by: Benjamin Tissoires commit c27168a04a438a457c100253b1aaf0c779218aae Author: Hans de Goede Date: Mon Nov 2 14:36:57 2020 +0100 HID: logitech-hidpp: Add HIDPP_CONSUMER_VENDOR_KEYS quirk for the Dinovo Edge Like the MX5000 and MX5500 quad/bluetooth keyboards the Dinovo Edge also needs the HIDPP_CONSUMER_VENDOR_KEYS quirk for some special keys to work. Specifically without this the "Phone" and the 'A' - 'D' Smart Keys do not send any events. In addition to fixing these keys not sending any events, adding the Bluetooth match, so that hid-logitech-hidpp is used instead of the generic HID driver, also adds battery monitoring support when the keyboard is connected over Bluetooth. Signed-off-by: Hans de Goede Signed-off-by: Benjamin Tissoires commit 4d64bb4ba5ecf4831448cdb2fe16d0ae91b2b40b Author: Brad Campbell Date: Thu Nov 12 14:08:23 2020 +1100 hwmon: (applesmc) Re-work SMC comms Commit fff2d0f701e6 ("hwmon: (applesmc) avoid overlong udelay()") introduced an issue whereby communication with the SMC became unreliable with write errors like : [ 120.378614] applesmc: send_byte(0x00, 0x0300) fail: 0x40 [ 120.378621] applesmc: LKSB: write data fail [ 120.512782] applesmc: send_byte(0x00, 0x0300) fail: 0x40 [ 120.512787] applesmc: LKSB: write data fail The original code appeared to be timing sensitive and was not reliable with the timing changes in the aforementioned commit. This patch re-factors the SMC communication to remove the timing dependencies and restore function with the changes previously committed. Tested on : MacbookAir6,2 MacBookPro11,1 iMac12,2, MacBookAir1,1, MacBookAir3,1 Fixes: fff2d0f701e6 ("hwmon: (applesmc) avoid overlong udelay()") Reported-by: Andreas Kemnade Tested-by: Andreas Kemnade # MacBookAir6,2 Acked-by: Arnd Bergmann Signed-off-by: Brad Campbell Signed-off-by: Henrik Rydberg Link: https://lore.kernel.org/r/194a7d71-a781-765a-d177-c962ef296b90@fnarfbargle.com Signed-off-by: Guenter Roeck commit fd8feec665fef840277515a5c2b9b7c3e3970fad Author: Paul Barker Date: Wed Nov 11 16:46:43 2020 +0000 hwmon: (pwm-fan) Fix RPM calculation To convert the number of pulses counted into an RPM estimation, we need to divide by the width of our measurement interval instead of multiplying by it. If the width of the measurement interval is zero we don't update the RPM value to avoid dividing by zero. We also don't need to do 64-bit division, with 32-bits we can handle a fan running at over 4 million RPM. Signed-off-by: Paul Barker Link: https://lore.kernel.org/r/20201111164643.7087-1-pbarker@konsulko.com Signed-off-by: Guenter Roeck commit ee5e58418a854755201eb4952b1230d873a457d5 Author: Hans de Goede Date: Mon Nov 2 14:36:56 2020 +0100 HID: logitech-dj: Handle quad/bluetooth keyboards with a builtin trackpad Some quad/bluetooth keyboards, such as the Dinovo Edge (Y-RAY81) have a builtin touchpad. In this case when asking the receiver for paired devices, we get only 1 paired device with a device_type of REPORT_TYPE_KEYBOARD. This means that we do not instantiate a second dj_hiddev for the mouse (as we normally would) and thus there is no place for us to forward the mouse input reports to, causing the touchpad part of the keyboard to not work. There is no way for us to detect these keyboards, so this commit adds an array with device-ids for such keyboards and when a keyboard is on this list it adds STD_MOUSE to the reports_supported bitmap for the dj_hiddev created for the keyboard fixing the touchpad not working. Using a list of device-ids for this is not ideal, but there are only very few such keyboards so this should be fine. Besides the Dinovo Edge, other known wireless Logitech keyboards with a builtin touchpad are: * Dinovo Mini (TODO add its device-id to the list) * K400 (uses a unifying receiver so is not affected) * K600 (uses a unifying receiver so is not affected) Cc: stable@vger.kernel.org BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1811424 Fixes: f2113c3020ef ("HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver") Signed-off-by: Hans de Goede Signed-off-by: Benjamin Tissoires commit bc923818b190c8b63c91a47702969c8053574f5b Author: Zhang Qilong Date: Sun Nov 8 17:27:41 2020 +0800 gfs2: fix possible reference leak in gfs2_check_blk_type In the fail path of gfs2_check_blk_type, forgetting to call gfs2_glock_dq_uninit will result in rgd_gh reference leak. Signed-off-by: Zhang Qilong Signed-off-by: Andreas Gruenbacher commit b98467fe96d2415836d154ecfe1cd389bf4147b5 Author: Peter Ujfalusi Date: Thu Oct 29 12:03:35 2020 +0200 thermal: ti-soc-thermal: Disable the CPU PM notifier for OMAP4430 It has been observed that on OMAP4430 (ES2.0, ES2.1 and ES2.3) the enabled notifier causes errors on the DTEMP readout values: ti-soc-thermal 4a002260.bandgap: in range ADC val: 52 ti-soc-thermal 4a002260.bandgap: in range ADC val: 64 ti-soc-thermal 4a002260.bandgap: in range ADC val: 64 ti-soc-thermal 4a002260.bandgap: out of range ADC val: 0 thermal thermal_zone0: failed to read out thermal zone (-5) ti-soc-thermal 4a002260.bandgap: out of range ADC val: 0 thermal thermal_zone0: failed to read out thermal zone (-5) ti-soc-thermal 4a002260.bandgap: out of range ADC val: 4 thermal thermal_zone0: failed to read out thermal zone (-5) ti-soc-thermal 4a002260.bandgap: in range ADC val: 100 raw 100 translates to 133 Celsius on omap4-sdp, triggering shutdown due to critical temperature. When the notifier is disable for OMAP4430 the DTEMP values are stable: ti-soc-thermal 4a002260.bandgap: in range ADC val: 56 ti-soc-thermal 4a002260.bandgap: in range ADC val: 56 ti-soc-thermal 4a002260.bandgap: in range ADC val: 57 ti-soc-thermal 4a002260.bandgap: in range ADC val: 57 ti-soc-thermal 4a002260.bandgap: in range ADC val: 56 Fixes: 5093402e5b44 ("thermal: ti-soc-thermal: Enable addition power management") Signed-off-by: Peter Ujfalusi Tested-by: Tony Lindgren Acked-by: Keerthy Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201029100335.27665-1-peter.ujfalusi@ti.com commit 78d732e1f326f74f240d416af9484928303d9951 Author: Thomas Richter Date: Wed Nov 11 16:26:25 2020 +0100 s390/cpum_sf.c: fix file permission for cpum_sfb_size This file is installed by the s390 CPU Measurement sampling facility device driver to export supported minimum and maximum sample buffer sizes. This file is read by lscpumf tool to display the details of the device driver capabilities. The lscpumf tool might be invoked by a non-root user. In this case it does not print anything because the file contents can not be read. Fix this by allowing read access for all users. Reading the file contents is ok, changing the file contents is left to the root user only. For further reference and details see: [1] https://github.com/ibm-s390-tools/s390-tools/issues/97 Fixes: 69f239ed335a ("s390/cpum_sf: Dynamically extend the sampling buffer if overflows occur") Cc: # 3.14 Signed-off-by: Thomas Richter Acked-by: Sumanth Korikkar Signed-off-by: Heiko Carstens commit 966e7ea434484a006700c144bca629a14f93530c Author: Heiko Carstens Date: Tue Nov 10 14:46:55 2020 +0100 s390: update defconfigs Signed-off-by: Heiko Carstens commit b2911a84396f72149dce310a3b64d8948212c1b3 Author: Felix Fietkau Date: Wed Nov 11 19:33:59 2020 +0100 mac80211: minstrel: fix tx status processing corner case Some drivers fill the status rate list without setting the rate index after the final rate to -1. minstrel_ht already deals with this, but minstrel doesn't, which causes it to get stuck at the lowest rate on these drivers. Fix this by checking the count as well. Cc: stable@vger.kernel.org Fixes: cccf129f820e ("mac80211: add the 'minstrel' rate control algorithm") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20201111183359.43528-3-nbd@nbd.name Signed-off-by: Johannes Berg commit 4fe40b8e1566dad04c87fbf299049a1d0d4bd58d Author: Felix Fietkau Date: Wed Nov 11 19:33:58 2020 +0100 mac80211: minstrel: remove deferred sampling code Deferring sampling attempts to the second stage has some bad interactions with drivers that process the rate table in hardware and use the probe flag to indicate probing packets (e.g. most mt76 drivers). On affected drivers it can lead to probing not working at all. If the link conditions turn worse, it might not be such a good idea to do a lot of sampling for lower rates in this case. Fix this by simply skipping the sample attempt instead of deferring it, but keep the checks that would allow it to be sampled if it was skipped too often, but only if it has less than 95% success probability. Also ensure that IEEE80211_TX_CTL_RATE_CTRL_PROBE is set for all probing packets. Cc: stable@vger.kernel.org Fixes: cccf129f820e ("mac80211: add the 'minstrel' rate control algorithm") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20201111183359.43528-2-nbd@nbd.name Signed-off-by: Johannes Berg commit 1d18288555b3265f84d08f1f75582415e4ec343a Author: Felix Fietkau Date: Wed Nov 11 19:33:57 2020 +0100 mac80211: fix memory leak on filtered powersave frames After the status rework, ieee80211_tx_status_ext is leaking un-acknowledged packets for stations in powersave mode. To fix this, move the code handling those packets from __ieee80211_tx_status into ieee80211_tx_status_ext Reported-by: Tobias Waldvogel Fixes: 3318111cf63d ("mac80211: reduce duplication in tx status functions") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20201111183359.43528-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 425af483523b76bc78e14674a430579d38b2a593 Author: Zheng Zengkai Date: Wed Nov 11 20:44:26 2020 +0800 serial: ar933x_uart: disable clk on error handling path in probe ar933x_uart_probe() does not invoke clk_disable_unprepare() on one error handling path. This patch fixes that. Fixes: 9be1064fe524 ("serial: ar933x_uart: add RS485 support") Reported-by: Hulk Robot Signed-off-by: Zheng Zengkai Link: https://lore.kernel.org/r/20201111124426.42638-1-zhengzengkai@huawei.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit e67c139c488e84e7eae6c333231e791f0e89b3fb Author: Fugang Duan Date: Wed Nov 11 10:51:36 2020 +0800 tty: serial: imx: keep console clocks always on For below code, there has chance to cause deadlock in SMP system: Thread 1: clk_enable_lock(); pr_info("debug message"); clk_enable_unlock(); Thread 2: imx_uart_console_write() clk_enable() clk_enable_lock(); Thread 1: Acuired clk enable_lock -> printk -> console_trylock_spinning Thread 2: console_unlock() -> imx_uart_console_write -> clk_disable -> Acquite clk enable_lock So the patch is to keep console port clocks always on like other console drivers. Fixes: 1cf93e0d5488 ("serial: imx: remove the uart_console() check") Acked-by: Uwe Kleine-König Signed-off-by: Fugang Duan Link: https://lore.kernel.org/r/20201111025136.29818-1-fugang.duan@nxp.com Cc: stable [fix up build warning - gregkh] Signed-off-by: Greg Kroah-Hartman commit d4122754442799187d5d537a9c039a49a67e57f1 Author: Samuel Thibault Date: Tue Nov 10 19:35:41 2020 +0100 speakup: Do not let the line discipline be used several times Speakup has only one speakup_tty variable to store the tty it is managing. This makes sense since its codebase currently assumes that there is only one user who controls the screen reading. That however means that we have to forbid using the line discipline several times, otherwise the second closure would try to free a NULL ldisc_data, leading to general protection fault: 0000 [#1] SMP KASAN PTI RIP: 0010:spk_ttyio_ldisc_close+0x2c/0x60 Call Trace: tty_ldisc_release+0xa2/0x340 tty_release_struct+0x17/0xd0 tty_release+0x9d9/0xcc0 __fput+0x231/0x740 task_work_run+0x12c/0x1a0 do_exit+0x9b5/0x2230 ? release_task+0x1240/0x1240 ? __do_page_fault+0x562/0xa30 do_group_exit+0xd5/0x2a0 __x64_sys_exit_group+0x35/0x40 do_syscall_64+0x89/0x2b0 ? page_fault+0x8/0x30 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Cc: stable@vger.kernel.org Reported-by: 秦世松 Signed-off-by: Samuel Thibault Tested-by: Shisong Qin Link: https://lore.kernel.org/r/20201110183541.fzgnlwhjpgqzjeth@function Signed-off-by: Greg Kroah-Hartman commit 33f16855dcb973f745c51882d0e286601ff3be2b Author: Sam Nobs Date: Tue Nov 10 09:50:06 2020 +1300 tty: serial: imx: fix potential deadlock Enabling the lock dependency validator has revealed that the way spinlocks are used in the IMX serial port could result in a deadlock. Specifically, imx_uart_int() acquires a spinlock without disabling the interrupts, meaning that another interrupt could come along and try to acquire the same spinlock, potentially causing the two to wait for each other indefinitely. Use spin_lock_irqsave() instead to disable interrupts upon acquisition of the spinlock. Fixes: c974991d2620 ("tty:serial:imx: use spin_lock instead of spin_lock_irqsave in isr") Reviewed-by: Uwe Kleine-König Signed-off-by: Sam Nobs Link: https://lore.kernel.org/r/1604955006-9363-1-git-send-email-samuel.nobs@taitradio.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 94e2bd0b259ed39a755fdded47e6734acf1ce464 Author: Claire Chang Date: Tue Nov 10 16:49:08 2020 +0800 rfkill: Fix use-after-free in rfkill_resume() If a device is getting removed or reprobed during resume, use-after-free might happen. For example, h5_btrtl_resume() schedules a work queue for device reprobing, which of course requires removal first. If the removal happens in parallel with the device_resume() and wins the race to acquire device_lock(), removal may remove the device from the PM lists and all, but device_resume() is already running and will continue when the lock can be acquired, thus calling rfkill_resume(). During this, if rfkill_set_block() is then called after the corresponding *_unregister() and kfree() are called, there will be an use-after-free in hci_rfkill_set_block(): BUG: KASAN: use-after-free in hci_rfkill_set_block+0x58/0xc0 [bluetooth] ... Call trace: dump_backtrace+0x0/0x154 show_stack+0x20/0x2c dump_stack+0xbc/0x12c print_address_description+0x88/0x4b0 __kasan_report+0x144/0x168 kasan_report+0x10/0x18 check_memory_region+0x19c/0x1ac __kasan_check_write+0x18/0x24 hci_rfkill_set_block+0x58/0xc0 [bluetooth] rfkill_set_block+0x9c/0x120 rfkill_resume+0x34/0x70 dpm_run_callback+0xf0/0x1f4 device_resume+0x210/0x22c Fix this by checking rfkill->registered in rfkill_resume(). device_del() in rfkill_unregister() requires device_lock() and the whole rfkill_resume() is also protected by the same lock via device_resume(), we can make sure either the rfkill->registered is false before rfkill_resume() starts or the rfkill device won't be unregistered before rfkill_resume() returns. As async_resume() holds a reference to the device, at this level there can be no use-after-free; only in the user that doesn't expect this scenario. Fixes: 8589086f4efd ("Bluetooth: hci_h5: Turn off RTL8723BS on suspend, reprobe on resume") Signed-off-by: Claire Chang Link: https://lore.kernel.org/r/20201110084908.219088-1-tientzu@chromium.org [edit commit message for clarity and add more info provided later] Signed-off-by: Johannes Berg commit edb8d77a939c422f3ae57f557cd1d6899d9bafad Author: Tina Zhang Date: Mon Sep 21 02:58:07 2020 -0400 drm/i915/gvt: Set ENHANCED_FRAME_CAP bit Specification says the bit7 of the DPCD MAX_LANE_COUNT (offset 0x02) must be set to 1 when comes to the displayport version 1.2. This patch respects the definition. W/o this patch, guest i915 driver can only set the resolution to 1024*768, and complains about the unsuccessful link training: [ 5.692193] i915 0000:00:02.0: [drm] *ERROR* index 0, lane_count 1 Link Training Unsuccessful Fixes: e2e02cbb5beb ("drm/i915/gvt: make dpcd_fix_data supports DP1.2") Reviewed-by: Zhenyu Wang Signed-off-by: Tina Zhang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200921065807.247847-1-tina.zhang@intel.com commit d19d8d345eecd9247cbe6cbf27aef271bd88aba7 Author: Eric Biggers Date: Tue Nov 10 17:52:24 2020 -0800 fscrypt: fix inline encryption not used on new files The new helper function fscrypt_prepare_new_inode() runs before S_ENCRYPTED has been set on the new inode. This accidentally made fscrypt_select_encryption_impl() never enable inline encryption on newly created files, due to its use of fscrypt_needs_contents_encryption() which only returns true when S_ENCRYPTED is set. Fix this by using S_ISREG() directly instead of fscrypt_needs_contents_encryption(), analogous to what select_encryption_mode() does. I didn't notice this earlier because by design, the user-visible behavior is the same (other than performance, potentially) regardless of whether inline encryption is used or not. Fixes: a992b20cd4ee ("fscrypt: add fscrypt_prepare_new_inode() and fscrypt_set_context()") Reviewed-by: Satya Tangirala Link: https://lore.kernel.org/r/20201111015224.303073-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit ae3d6083acf60116d4f409677452399547ed2009 Author: jingle.wu Date: Wed Nov 11 20:06:24 2020 -0800 Input: elan_i2c - fix firmware update on newer ICs The argument to iap page type command depends on the firmware page size. Fixes: bfd9b92bc8f9 ("Input: elan_i2c - handle firmware updated on newer ICs") Signed-off-by: Jingle Wu Signed-off-by: Dmitry Torokhov commit 52755b66ddcef2e897778fac5656df18817b59ab Author: Wang Hai Date: Tue Nov 10 22:46:14 2020 +0800 cosa: Add missing kfree in error path of cosa_write If memory allocation for 'kbuf' succeed, cosa_write() doesn't have a corresponding kfree() in exception handling. Thus add kfree() for this function implementation. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Jan "Yenya" Kasprzak Link: https://lore.kernel.org/r/20201110144614.43194-1-wanghai38@huawei.com Signed-off-by: Jakub Kicinski commit 676650d007e06fddcf3fe38238251d71bd179641 Author: Necip Fazil Yildiran Date: Wed Nov 11 17:48:52 2020 -0800 Input: resistive-adc-touch - fix kconfig dependency on IIO_BUFFER When TOUCHSCREEN_ADC is enabled and IIO_BUFFER is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for IIO_BUFFER_CB Depends on [n]: IIO [=y] && IIO_BUFFER [=n] Selected by [y]: - TOUCHSCREEN_ADC [=y] && !UML && INPUT [=y] && INPUT_TOUCHSCREEN [=y] && IIO [=y] The reason is that TOUCHSCREEN_ADC selects IIO_BUFFER_CB without depending on or selecting IIO_BUFFER while IIO_BUFFER_CB depends on IIO_BUFFER. This can also fail building the kernel. Honor the kconfig dependency to remove unmet direct dependency warnings and avoid any potential build failures. Fixes: aa132ffb6b0a ("input: touchscreen: resistive-adc-touch: add generic resistive ADC touchscreen") Signed-off-by: Necip Fazil Yildiran Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20201102221504.541279-1-fazilyildiran@gmail.com Signed-off-by: Dmitry Torokhov commit 460cd17e9f7d60eaa22028baa6a056c478fa7dc6 Author: Jakub Kicinski Date: Mon Nov 9 19:51:20 2020 -0800 net: switch to the kernel.org patchwork instance Move to the kernel.org patchwork instance, it has significantly lower latency for accessing from Europe and the US. Other quirks include the reply bot. Link: https://lore.kernel.org/r/20201110035120.642746-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit fcd1ecc8ee6badf4b25a6de67724390675bbc883 Merge: 361182308766a 83a95df04bee7 Author: Jakub Kicinski Date: Wed Nov 11 16:30:41 2020 -0800 Merge branch 'cxgb4-ch_ktls-fixes-in-nic-tls-code' Rohit Maheshwari says: ==================== cxgb4/ch_ktls: Fixes in nic tls code This series helps in fixing multiple nic ktls issues. Series is broken into 12 patches. Patch 1 avoids deciding tls packet based on decrypted bit. If its a retransmit packet which has tls handshake and finish (for encryption), decrypted bit won't be set there, and so we can't rely on decrypted bit. Patch 2 helps supporting linear skb. SKBs were assumed non-linear. Corrected the length extraction. Patch 3 fixes the checksum offload update in WR. Patch 4 fixes kernel panic happening due to creating new skb for each record. As part of fix driver will use same skb to send out one tls record (partial data) of the same SKB. Patch 5 fixes the problem of skb data length smaller than remaining data of the record. Patch 6 fixes the handling of SKBs which has tls header alone pkt, but not starting from beginning. Patch 7 avoids sending extra data which is used to make a record 16 byte aligned. We don't need to retransmit those extra few bytes. Patch 8 handles the cases where retransmit packet has tls starting exchanges which are prior to tls start marker. Patch 9 fixes the problem os skb free before HW knows about tcp FIN. Patch 10 handles the small packet case which has partial TAG bytes only. HW can't handle those, hence using sw crypto for such pkts. Patch 11 corrects the potential tcb update problem. Patch 12 stops the queue if queue reaches threshold value. v1->v2: - Corrected fixes tag issue. - Marked chcr_ktls_sw_fallback() static. v2->v3: - Replaced GFP_KERNEL with GFP_ATOMIC. - Removed mixed fixes. v3->v4: - Corrected fixes tag issue. v4->v5: - Separated mixed fixes from patch 4. v5-v6: - Fixes tag should be at the end. ==================== Link: https://lore.kernel.org/r/20201109105142.15398-1-rohitm@chelsio.com Signed-off-by: Jakub Kicinski commit 83a95df04bee77c74df5151c961b19d870a70180 Author: Rohit Maheshwari Date: Mon Nov 9 16:21:42 2020 +0530 ch_ktls: stop the txq if reaches threshold Stop the queue and ask for the credits if queue reaches to threashold. Fixes: 5a4b9fe7fece ("cxgb4/chcr: complete record tx handling") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit 7d01c428c86b525dc780226924d74df2048cf411 Author: Rohit Maheshwari Date: Mon Nov 9 16:21:41 2020 +0530 ch_ktls: tcb update fails sometimes context id and port id should be filled while sending tcb update. Fixes: 5a4b9fe7fece ("cxgb4/chcr: complete record tx handling") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit 21f82acbb8b4e8812521d405479b6fc3790078de Author: Rohit Maheshwari Date: Mon Nov 9 16:21:40 2020 +0530 ch_ktls/cxgb4: handle partial tag alone SKBs If TCP congestion caused a very small packets which only has some part fo the TAG, and that too is not till the end. HW can't handle such case, so falling back to sw crypto in such cases. v1->v2: - Marked chcr_ktls_sw_fallback() static. Fixes: dc05f3df8fac ("chcr: Handle first or middle part of record") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit 659bf0383d15b07e492e27443d87736b24171558 Author: Rohit Maheshwari Date: Mon Nov 9 16:21:39 2020 +0530 ch_ktls: don't free skb before sending FIN If its a last packet and fin is set. Make sure FIN is informed to HW before skb gets freed. Fixes: 429765a149f1 ("chcr: handle partial end part of a record") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit 9478e083941c873d60a97b232760a14dec6c69d3 Author: Rohit Maheshwari Date: Mon Nov 9 16:21:38 2020 +0530 ch_ktls: packet handling prior to start marker There could be a case where ACK for tls exchanges prior to start marker is missed out, and by the time tls is offloaded. This pkt should not be discarded and handled carefully. It could be plaintext alone or plaintext + finish as well. Fixes: 5a4b9fe7fece ("cxgb4/chcr: complete record tx handling") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit 63ee4591fa2f97dc08ce37514f214fc0430e9dc3 Author: Rohit Maheshwari Date: Mon Nov 9 16:21:37 2020 +0530 ch_ktls: Correction in middle record handling If a record starts in middle, reset TCB UNA so that we could avoid sending out extra packet which is needed to make it 16 byte aligned to start AES CTR. Check also considers prev_seq, which should be what is actually sent, not the skb data length. Avoid updating partial TAG to HW at any point of time, that's why we need to check if remaining part is smaller than TAG size, then reset TX_MAX to be TAG starting sequence number. Fixes: 5a4b9fe7fece ("cxgb4/chcr: complete record tx handling") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit 83deb094dd5c636a790da3914008570c9fd1693f Author: Rohit Maheshwari Date: Mon Nov 9 16:21:36 2020 +0530 ch_ktls: missing handling of header alone If an skb has only header part which doesn't start from beginning, is not being handled properly. Fixes: dc05f3df8fac ("chcr: Handle first or middle part of record") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit c68a28a9e2798a4602dde1c77046a3b577eb31f4 Author: Rohit Maheshwari Date: Mon Nov 9 16:21:35 2020 +0530 ch_ktls: Correction in trimmed_len calculation trimmed length calculation goes wrong if skb has only tag part to send. It should be zero if there is no data bytes apart from TAG. Fixes: dc05f3df8fac ("chcr: Handle first or middle part of record") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit 687823d2d104df8226eacba74fda9f4ba3aecd6c Author: Rohit Maheshwari Date: Mon Nov 9 16:21:34 2020 +0530 cxgb4/ch_ktls: creating skbs causes panic Creating SKB per tls record and freeing the original one causes panic. There will be race if connection reset is requested. By freeing original skb, refcnt will be decremented and that means, there is no pending record to send, and so tls_dev_del will be requested in control path while SKB of related connection is in queue. Better approach is to use same SKB to send one record (partial data) at a time. We still have to create a new SKB when partial last part of a record is requested. This fix introduces new API cxgb4_write_partial_sgl() to send partial part of skb. Present cxgb4_write_sgl can only provide feasibility to start from an offset which limits to header only and it can write sgls for the whole skb len. But this new API will help in both. It can start from any offset and can end writing in middle of the skb. v4->v5: - Removed extra changes. Fixes: 429765a149f1 ("chcr: handle partial end part of a record") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit 86716b51d14fc2201938939b323ba3ad99186910 Author: Rohit Maheshwari Date: Mon Nov 9 16:21:33 2020 +0530 ch_ktls: Update cheksum information Checksum update was missing in the WR. Fixes: 429765a149f1 ("chcr: handle partial end part of a record") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit b1b5cb18032b37ab69b23a461eb8be1a44fcfc3b Author: Rohit Maheshwari Date: Mon Nov 9 16:21:32 2020 +0530 ch_ktls: Correction in finding correct length There is a possibility of linear skbs coming in. Correcting the length extraction logic. v2->v3: - Separated un-related changes from this patch. Fixes: 5a4b9fe7fece ("cxgb4/chcr: complete record tx handling") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit 9d2e5e9eeb59524a59b461fe256139826d464e1e Author: Rohit Maheshwari Date: Mon Nov 9 16:21:31 2020 +0530 cxgb4/ch_ktls: decrypted bit is not enough If skb has retransmit data starting before start marker, e.g. ccs, decrypted bit won't be set for that, and if it has some data to encrypt, then it must be given to crypto ULD. So in place of decrypted, check if socket is tls offloaded. Also, unless skb has some data to encrypt, no need to give it for tls offload handling. v2->v3: - Removed ifdef. Fixes: 5a4b9fe7fece ("cxgb4/chcr: complete record tx handling") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit 49c3e714ff4391144d8bb3fa99d0b460f8dbfd86 Author: Marc Kleine-Budde Date: Wed Nov 11 14:05:07 2020 +0100 dt-bindings: can: fsl,flexcan.yaml: fix fsl,stop-mode The fsl,stop-mode property is a phandle-array and should consist of one phandle and two 32 bit integers, e.g.: fsl,stop-mode = <&gpr 0x34 28>; This patch fixes the following errors, which shows up during a dtbs_check: arch/arm/boot/dts/imx6dl-apf6dev.dt.yaml: can@2090000: fsl,stop-mode: [[1, 52, 28]] is too short From schema: Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml Fixes: e5ab9aa7e49b ("dt-bindings: can: flexcan: convert fsl,*flexcan bindings to yaml") Reported-by: Rob Herring Cc: Oleksij Rempel Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20201111130507.1560881-5-mkl@pengutronix.de Signed-off-by: Rob Herring commit a5bea04fcc0b3c0aec71ee1fd58fd4ff7ee36177 Author: Evan Nimmo Date: Tue Nov 10 15:28:25 2020 +1300 of/address: Fix of_node memory leak in of_dma_is_coherent Commit dabf6b36b83a ("of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc") added a check to of_dma_is_coherent which returns early if OF_DMA_DEFAULT_COHERENT is enabled. This results in the of_node_put() being skipped causing a memory leak. Moved the of_node_get() below this check so we now we only get the node if OF_DMA_DEFAULT_COHERENT is not enabled. Fixes: dabf6b36b83a ("of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc") Signed-off-by: Evan Nimmo Link: https://lore.kernel.org/r/20201110022825.30895-1-evan.nimmo@alliedtelesis.co.nz Signed-off-by: Rob Herring commit 361182308766a265b6c521879b34302617a8c209 Author: Martin Schiller Date: Mon Nov 9 07:54:49 2020 +0100 net/x25: Fix null-ptr-deref in x25_connect This fixes a regression for blocking connects introduced by commit 4becb7ee5b3d ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect"). The x25->neighbour is already set to "NULL" by x25_disconnect() now, while a blocking connect is waiting in x25_wait_for_connection_establishment(). Therefore x25->neighbour must not be accessed here again and x25->state is also already set to X25_STATE_0 by x25_disconnect(). Fixes: 4becb7ee5b3d ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect") Signed-off-by: Martin Schiller Reviewed-by: Xie He Link: https://lore.kernel.org/r/20201109065449.9014-1-ms@dev.tdt.de Signed-off-by: Jakub Kicinski commit df392aefe96b9f94efb01ef298b617bab346a9be Author: Michael Walle Date: Mon Nov 9 12:04:36 2020 +0100 arm64: dts: fsl-ls1028a-kontron-sl28: specify in-band mode for ENETC Since commit 71b77a7a27a3 ("enetc: Migrate to PHYLINK and PCS_LYNX") the network port of the Kontron sl28 board is broken. After the migration to phylink the device tree has to specify the in-band-mode property. Add it. Fixes: 71b77a7a27a3 ("enetc: Migrate to PHYLINK and PCS_LYNX") Suggested-by: Vladimir Oltean Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201109110436.5906-1-michael@walle.cc Signed-off-by: Jakub Kicinski commit fa6882c63621821f73cc806f291208e1c6ea6187 Author: Wang Hai Date: Mon Nov 9 22:09:13 2020 +0800 tipc: fix memory leak in tipc_topsrv_start() kmemleak report a memory leak as follows: unreferenced object 0xffff88810a596800 (size 512): comm "ip", pid 21558, jiffies 4297568990 (age 112.120s) hex dump (first 32 bytes): 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... ff ff ff ff ff ff ff ff 00 83 60 b0 ff ff ff ff ..........`..... backtrace: [<0000000022bbe21f>] tipc_topsrv_init_net+0x1f3/0xa70 [<00000000fe15ddf7>] ops_init+0xa8/0x3c0 [<00000000138af6f2>] setup_net+0x2de/0x7e0 [<000000008c6807a3>] copy_net_ns+0x27d/0x530 [<000000006b21adbd>] create_new_namespaces+0x382/0xa30 [<00000000bb169746>] unshare_nsproxy_namespaces+0xa1/0x1d0 [<00000000fe2e42bc>] ksys_unshare+0x39c/0x780 [<0000000009ba3b19>] __x64_sys_unshare+0x2d/0x40 [<00000000614ad866>] do_syscall_64+0x56/0xa0 [<00000000a1b5ca3c>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 'srv' is malloced in tipc_topsrv_start() but not free before leaving from the error handling cases. We need to free it. Fixes: 5c45ab24ac77 ("tipc: make struct tipc_server private for server.c") Reported-by: Hulk Robot Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20201109140913.47370-1-wanghai38@huawei.com Signed-off-by: Jakub Kicinski commit 3d5e28bff7ad55aea081c1af516cc1c94a5eca7d Merge: eccc876724927 fc0021aa340af Author: Linus Torvalds Date: Wed Nov 11 14:15:06 2020 -0800 Merge branch 'stable/for-linus-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb Pull swiotlb fixes from Konrad Rzeszutek Wilk: "Two tiny fixes for issues that make drivers under Xen unhappy under certain conditions" * 'stable/for-linus-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: swiotlb: remove the tbl_dma_addr argument to swiotlb_tbl_map_single swiotlb: fix "x86: Don't panic if can not alloc buffer for swiotlb" commit d196e229a80c39254f4adbc312f55f5198e98941 Author: Theodore Ts'o Date: Wed Nov 11 14:24:18 2020 -0500 Revert "ext4: fix superblock checksum calculation race" This reverts commit acaa532687cdc3a03757defafece9c27aa667546 which can result in a ext4_superblock_csum_set() trying to sleep while a spinlock is being held. For more discussion of this issue, please see: https://lore.kernel.org/r/000000000000f50cb705b313ed70@google.com Reported-by: syzbot+7a4ba6a239b91a126c28@syzkaller.appspotmail.com Signed-off-by: Theodore Ts'o commit a72b38eebea4661d4d67b194353124e63ce48f66 Author: Harshad Shirwadkar Date: Wed Nov 11 10:32:09 2020 -0800 ext4: handle dax mount option collision Mount options dax=inode and dax=never collided with fast_commit and journal checksum. Redefine the mount flags to remove the collision. Reported-by: Murphy Zhou Fixes: 9cb20f94afcd2 ("fs/ext4: Make DAX mount option a tri-state") Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201111183209.447175-1-harshads@google.com Signed-off-by: Theodore Ts'o commit 88ec3211e46344a7d10cf6cb5045f839f7785f8e Author: Jens Axboe Date: Wed Nov 11 10:38:53 2020 -0700 io_uring: round-up cq size before comparing with rounded sq size If an application specifies IORING_SETUP_CQSIZE to set the CQ ring size to a specific size, we ensure that the CQ size is at least that of the SQ ring size. But in doing so, we compare the already rounded up to power of two SQ size to the as-of yet unrounded CQ size. This means that if an application passes in non power of two sizes, we can return -EINVAL when the final value would've been fine. As an example, an application passing in 100/100 for sq/cq size should end up with 128 for both. But since we round the SQ size first, we compare the CQ size of 100 to 128, and return -EINVAL as that is too small. Cc: stable@vger.kernel.org Fixes: 33a107f0a1b8 ("io_uring: allow application controlled CQ ring size") Reported-by: Dan Melnic Signed-off-by: Jens Axboe commit 2bd3fa793aaa7e98b74e3653fdcc72fa753913b5 Author: Christoph Hellwig Date: Wed Nov 11 08:07:37 2020 -0800 xfs: fix a missing unlock on error in xfs_fs_map_blocks We also need to drop the iolock when invalidate_inode_pages2 fails, not only on all other error or successful cases. Fixes: 527851124d10 ("xfs: implement pNFS export operations") Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ee4ad5d06509b3aea79b6a77bebd09ef891bed8d Author: Eddie James Date: Tue Nov 10 15:47:36 2020 -0600 spi: fsi: Fix transfer returning without finalizing message In the case that the SPI mux isn't set, the transfer_one_message function returns without finalizing the message. This means that the transfer never completes, resulting in hung tasks and an eventual kernel panic. Fix it by finalizing the transfer in this case. Fixes: 9211a441e606 ("spi: fsi: Check mux status before transfers") Signed-off-by: Eddie James Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20201110214736.25718-1-eajames@linux.ibm.com Signed-off-by: Mark Brown commit 766c6b63aa044e84b045803b40b14754d69a2a1d Author: Sven Van Asbroeck Date: Fri Nov 6 10:07:06 2020 -0500 spi: fix client driver breakages when using GPIO descriptors Commit f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") introduced the optional use of GPIO descriptors for chip selects. A side-effect of this change: when a SPI bus uses GPIO descriptors, all its client devices have SPI_CS_HIGH set in spi->mode. This flag is required for the SPI bus to operate correctly. This unfortunately breaks many client drivers, which use the following pattern to configure their underlying SPI bus: static int client_device_probe(struct spi_device *spi) { ... spi->mode = SPI_MODE_0; spi->bits_per_word = 8; err = spi_setup(spi); .. } In short, many client drivers overwrite the SPI_CS_HIGH bit in spi->mode, and break the underlying SPI bus driver. This is especially true for Freescale/NXP imx ecspi, where large numbers of spi client drivers now no longer work. Proposed fix: ------------- When using gpio descriptors, depend on gpiolib to handle CS polarity. Existing quirks in gpiolib ensure that this is handled correctly. Existing gpiolib behaviour will force the polarity of any chip-select gpiod to active-high (if 'spi-active-high' devicetree prop present) or active-low (if 'spi-active-high' absent). Irrespective of whether the gpio is marked GPIO_ACTIVE_[HIGH|LOW] in the devicetree. Loose ends: ----------- If this fix is applied: - is commit 138c9c32f090 ("spi: spidev: Fix CS polarity if GPIO descriptors are used") still necessary / correct ? Fixes: f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") Signed-off-by: Sven Van Asbroeck Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20201106150706.29089-1-TheSven73@gmail.com Signed-off-by: Mark Brown commit 365ec8b61689bd64d6a61e129e0319bf71336407 Author: Sean Nyekjaer Date: Tue Nov 10 18:41:13 2020 +0100 regulator: pfuze100: limit pfuze-support-disable-sw to pfuze{100,200} Limit the fsl,pfuze-support-disable-sw to the pfuze100 and pfuze200 variants. When enabling fsl,pfuze-support-disable-sw and using a pfuze3000 or pfuze3001, the driver would choose pfuze100_sw_disable_regulator_ops instead of the newly introduced and correct pfuze3000_sw_regulator_ops. Signed-off-by: Sean Nyekjaer Fixes: 6f1cf5257acc ("regualtor: pfuze100: correct sw1a/sw2 on pfuze3000") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201110174113.2066534-1-sean@geanix.com Signed-off-by: Mark Brown commit b2896458b850ec7cb69b054b195b4b399f7e1f22 Author: Jiri Slaby Date: Mon Nov 9 10:36:53 2020 +0100 x86/platform/uv: Drop last traces of uv_flush_tlb_others Commit 39297dde7390 ("x86/platform/uv: Remove UV BAU TLB Shootdown Handler") removed uv_flush_tlb_others. Its declaration was removed also from asm/uv/uv.h. But only for the CONFIG_X86_UV=y case. The inline definition (!X86_UV case) is still in place. So remove this implementation with everything what was added to support uv_flush_tlb_others: * include of asm/tlbflush.h * forward declarations of struct cpumask, mm_struct, and flush_tlb_info Signed-off-by: Jiri Slaby Signed-off-by: Thomas Gleixner Acked-by: Mike Travis Acked-by: Steve Wahl Link: https://lore.kernel.org/r/20201109093653.2042-1-jslaby@suse.cz commit 92e4dc8b05663d6539b1b8375f3b1cf7b204cfe9 Author: Chris Co Date: Tue Nov 10 19:01:18 2020 +0000 Drivers: hv: vmbus: Allow cleanup of VMBUS_CONNECT_CPU if disconnected When invoking kexec() on a Linux guest running on a Hyper-V host, the kernel panics. RIP: 0010:cpuhp_issue_call+0x137/0x140 Call Trace: __cpuhp_remove_state_cpuslocked+0x99/0x100 __cpuhp_remove_state+0x1c/0x30 hv_kexec_handler+0x23/0x30 [hv_vmbus] hv_machine_shutdown+0x1e/0x30 machine_shutdown+0x10/0x20 kernel_kexec+0x6d/0x96 __do_sys_reboot+0x1ef/0x230 __x64_sys_reboot+0x1d/0x20 do_syscall_64+0x6b/0x3d8 entry_SYSCALL_64_after_hwframe+0x44/0xa9 This was due to hv_synic_cleanup() callback returning -EBUSY to cpuhp_issue_call() when tearing down the VMBUS_CONNECT_CPU, even if the vmbus_connection.conn_state = DISCONNECTED. hv_synic_cleanup() should succeed in the case where vmbus_connection.conn_state is DISCONNECTED. Fix is to add an extra condition to test for vmbus_connection.conn_state == CONNECTED on the VMBUS_CONNECT_CPU and only return early if true. This way the kexec() path can still shut everything down while preserving the initial behavior of preventing CPU offlining on the VMBUS_CONNECT_CPU while the VM is running. Fixes: 8a857c55420f29 ("Drivers: hv: vmbus: Always handle the VMBus messages on CPU0") Signed-off-by: Chris Co Reviewed-by: Andrea Parri (Microsoft) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201110190118.15596-1-chrco@linux.microsoft.com Signed-off-by: Wei Liu commit f16e631333a8f12ae8128826e695db4b2a528407 Author: Kaixu Xia Date: Wed Nov 11 13:03:46 2020 +0800 bpf: Fix unsigned 'datasec_id' compared with zero in check_pseudo_btf_id The unsigned variable datasec_id is assigned a return value from the call to check_pseudo_btf_id(), which may return negative error code. This fixes the following coccicheck warning: ./kernel/bpf/verifier.c:9616:5-15: WARNING: Unsigned expression compared with zero: datasec_id > 0 Fixes: eaa6bcb71ef6 ("bpf: Introduce bpf_per_cpu_ptr()") Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: John Fastabend Cc: Hao Luo Link: https://lore.kernel.org/bpf/1605071026-25906-1-git-send-email-kaixuxia@tencent.com commit b72de3ff19fdc4bbe4d4bb3f4483c7e46e00bac3 Author: Damien Le Moal Date: Sat Nov 7 17:13:57 2020 +0900 gpio: sifive: Fix SiFive gpio probe Fix the check on the number of IRQs to allow up to the maximum (32) instead of only the maximum minus one. Fixes: 96868dce644d ("gpio/sifive: Add GPIO driver for SiFive SoCs") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Link: https://lore.kernel.org/r/20201107081420.60325-10-damien.lemoal@wdc.com Signed-off-by: Linus Walleij commit 6cbf1e960fa52e4c63a6dfa4cda8736375b34ccc Author: Collin Walling Date: Wed Nov 4 13:10:32 2020 -0500 KVM: s390: remove diag318 reset code The diag318 data must be set to 0 by VM-wide reset events triggered by diag308. As such, KVM should not handle resetting this data via the VCPU ioctls. Fixes: 23a60f834406 ("s390/kvm: diagnose 0x318 sync and reset") Signed-off-by: Collin Walling Reviewed-by: Christian Borntraeger Reviewed-by: Janosch Frank Acked-by: Cornelia Huck Signed-off-by: Christian Borntraeger Link: https://lore.kernel.org/r/20201104181032.109800-1-walling@linux.ibm.com commit 1ed576a20cd5c93295f57d6b7400357bd8d01b21 Author: Janosch Frank Date: Tue Oct 20 06:12:07 2020 -0400 KVM: s390: pv: Mark mm as protected after the set secure parameters and improve cleanup We can only have protected guest pages after a successful set secure parameters call as only then the UV allows imports and unpacks. By moving the test we can now also check for it in s390_reset_acc() and do an early return if it is 0. Signed-off-by: Janosch Frank Fixes: 29b40f105ec8 ("KVM: s390: protvirt: Add initial vm and cpu lifecycle handling") Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger commit b5acfe152abaa2721c9ca8aa67f941d7de55d24e Author: PeiSen Hou Date: Wed Nov 11 08:58:59 2020 +0100 ALSA: hda/realtek: Add some Clove SSID in the ALC293(ALC1220) Fix "use as headset mic, without its own jack detect" problem. [ Minor coding style fixes by tiwai ] Signed-off-by: PeiSen Hou Cc: Link: https://lore.kernel.org/r/481963e4a5694ff19f27ae1e283d79ad@realtek.com Signed-off-by: Takashi Iwai commit 99fba3205cd499255a36fd87f1d6064adc622a5b Author: Grygorii Strashko Date: Thu Oct 1 22:20:23 2020 +0300 ARM: dts: am437x-l4: fix compatible for cpsw switch dt node Fix compatible the new CPSW switchdev DT node to avoid probing of legacy CPSW driver which fails: [ 2.781009] cpsw 4a100000.switch: invalid resource Fixes: 7bf8f37aea82 ("ARM: dts: am437x-l4: add dt node for new cpsw switchdev driver") Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 2e6f11a797a24d1e2141a214a6dd6dfbe709f55d Author: Qinglang Miao Date: Tue Nov 10 15:42:23 2020 +0800 scsi: ufshcd: Fix missing destroy_workqueue() Add the missing destroy_workqueue() before return from ufshcd_init in the error handling case as well as in ufshcd_remove. Link: https://lore.kernel.org/r/20201110074223.41280-1-miaoqinglang@huawei.com Fixes: 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other error recovery paths") Suggested-by: Avri Altman Reviewed-by: Asutosh Das Reviewed-by: Avri Altman Signed-off-by: Qinglang Miao Signed-off-by: Martin K. Petersen commit e87d24fce924bfcef9714bbaeb1514162420052e Merge: 2b52a4b65bc8f 4711497ae85d9 Author: Jakub Kicinski Date: Tue Nov 10 18:08:21 2020 -0800 Merge branch 'net-iucv-fixes-2020-11-09' Julian Wiedmann says: ==================== net/iucv: fixes 2020-11-09 One fix in the shutdown path for af_iucv sockets. This is relevant for stable as well. Also sending along an update for the Maintainers file. v1 -> v2: use the correct Fixes tag in patch 1 (Jakub) ==================== Link: https://lore.kernel.org/r/20201109075706.56573-1-jwi@linux.ibm.com Signed-off-by: Jakub Kicinski commit 4711497ae85d90de903671989daf5145054c123e Author: Ursula Braun Date: Mon Nov 9 08:57:06 2020 +0100 MAINTAINERS: remove Ursula Braun as s390 network maintainer I am retiring soon. Thus this patch removes myself from the MAINTAINERS file (s390 network). Signed-off-by: Ursula Braun [jwi: fix up the subject] Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 4031eeafa71eaf22ae40a15606a134ae86345daf Author: Ursula Braun Date: Mon Nov 9 08:57:05 2020 +0100 net/af_iucv: fix null pointer dereference on shutdown syzbot reported the following KASAN finding: BUG: KASAN: nullptr-dereference in iucv_send_ctrl+0x390/0x3f0 net/iucv/af_iucv.c:385 Read of size 2 at addr 000000000000021e by task syz-executor907/519 CPU: 0 PID: 519 Comm: syz-executor907 Not tainted 5.9.0-syzkaller-07043-gbcf9877ad213 #0 Hardware name: IBM 3906 M04 701 (KVM/Linux) Call Trace: [<00000000c576af60>] unwind_start arch/s390/include/asm/unwind.h:65 [inline] [<00000000c576af60>] show_stack+0x180/0x228 arch/s390/kernel/dumpstack.c:135 [<00000000c9dcd1f8>] __dump_stack lib/dump_stack.c:77 [inline] [<00000000c9dcd1f8>] dump_stack+0x268/0x2f0 lib/dump_stack.c:118 [<00000000c5fed016>] print_address_description.constprop.0+0x5e/0x218 mm/kasan/report.c:383 [<00000000c5fec82a>] __kasan_report mm/kasan/report.c:517 [inline] [<00000000c5fec82a>] kasan_report+0x11a/0x168 mm/kasan/report.c:534 [<00000000c98b5b60>] iucv_send_ctrl+0x390/0x3f0 net/iucv/af_iucv.c:385 [<00000000c98b6262>] iucv_sock_shutdown+0x44a/0x4c0 net/iucv/af_iucv.c:1457 [<00000000c89d3a54>] __sys_shutdown+0x12c/0x1c8 net/socket.c:2204 [<00000000c89d3b70>] __do_sys_shutdown net/socket.c:2212 [inline] [<00000000c89d3b70>] __s390x_sys_shutdown+0x38/0x48 net/socket.c:2210 [<00000000c9e36eac>] system_call+0xe0/0x28c arch/s390/kernel/entry.S:415 There is nothing to shutdown if a connection has never been established. Besides that iucv->hs_dev is not yet initialized if a socket is in IUCV_OPEN state and iucv->path is not yet initialized if socket is in IUCV_BOUND state. So, just skip the shutdown calls for a socket in these states. Fixes: eac3731bd04c ("[S390]: Add AF_IUCV socket support") Fixes: 82492a355fac ("af_iucv: add shutdown for HS transport") Reviewed-by: Vasily Gorbik Signed-off-by: Ursula Braun [jwi: correct one Fixes tag] Signed-off-by: Julian Wiedmann Signed-off-by: Jakub Kicinski commit 2b52a4b65bc8f14520fe6e996ea7fb3f7e400761 Author: Sven Van Asbroeck Date: Mon Nov 9 15:38:28 2020 -0500 lan743x: fix "BUG: invalid wait context" when setting rx mode In the net core, the struct net_device_ops -> ndo_set_rx_mode() callback is called with the dev->addr_list_lock spinlock held. However, this driver's ndo_set_rx_mode callback eventually calls lan743x_dp_write(), which acquires a mutex. Mutex acquisition may sleep, and this is not allowed when holding a spinlock. Fix by removing the dp_lock mutex entirely. Its purpose is to prevent concurrent accesses to the data port. No concurrent accesses are possible, because the dev->addr_list_lock spinlock in the core only lets through one thread at a time. Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver") Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20201109203828.5115-1-TheSven73@gmail.com Signed-off-by: Jakub Kicinski commit 2bae900b9419db3f3e43bbda3194657235fee096 Author: zhangxiaoxu Date: Mon Nov 9 09:44:16 2020 -0500 net: dsa: mv88e6xxx: Fix memleak in mv88e6xxx_region_atu_snapshot When mv88e6xxx_fid_map return error, we lost free the table. Fix it. Fixes: bfb255428966 ("net: dsa: mv88e6xxx: Add devlink regions") Reported-by: Hulk Robot Signed-off-by: zhangxiaoxu Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201109144416.1540867-1-zhangxiaoxu5@huawei.com Signed-off-by: Jakub Kicinski commit 909172a149749242990a6e64cb55d55460d4e417 Author: Mao Wenan Date: Tue Nov 10 08:16:31 2020 +0800 net: Update window_clamp if SOCK_RCVBUF is set When net.ipv4.tcp_syncookies=1 and syn flood is happened, cookie_v4_check or cookie_v6_check tries to redo what tcp_v4_send_synack or tcp_v6_send_synack did, rsk_window_clamp will be changed if SOCK_RCVBUF is set, which will make rcv_wscale is different, the client still operates with initial window scale and can overshot granted window, the client use the initial scale but local server use new scale to advertise window value, and session work abnormally. Fixes: e88c64f0a425 ("tcp: allow effective reduction of TCP's rcv-buffer via setsockopt") Signed-off-by: Mao Wenan Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/1604967391-123737-1-git-send-email-wenan.mao@linux.alibaba.com Signed-off-by: Jakub Kicinski commit c583bcb8f5edd48c1798798e341f78afb9bf4f6f Author: Paul E. McKenney Date: Thu Sep 24 15:11:55 2020 -0700 rcu: Don't invoke try_invoke_on_locked_down_task() with irqs disabled The try_invoke_on_locked_down_task() function requires that interrupts be enabled, but it is called with interrupts disabled from rcu_print_task_stall(), resulting in an "IRQs not enabled as expected" diagnostic. This commit therefore updates rcu_print_task_stall() to accumulate a list of the first few tasks while holding the current leaf rcu_node structure's ->lock, then releases that lock and only then uses try_invoke_on_locked_down_task() to attempt to obtain per-task detailed information. Of course, as soon as ->lock is released, the task might exit, so the get_task_struct() function is used to prevent the task structure from going away in the meantime. Link: https://lore.kernel.org/lkml/000000000000903d5805ab908fc4@google.com/ Fixes: 5bef8da66a9c ("rcu: Add per-task state to RCU CPU stall warnings") Reported-by: syzbot+cb3b69ae80afd6535b0e@syzkaller.appspotmail.com Reported-by: syzbot+f04854e1c5c9e913cc27@syzkaller.appspotmail.com Tested-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney commit 9b8523423b23ee3dfd88e32f5b7207be56a4e782 Author: Darrick J. Wong Date: Tue Nov 10 16:50:21 2020 -0800 vfs: move __sb_{start,end}_write* to fs.h Now that we've straightened out the callers, move these three functions to fs.h since they're fairly trivial. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara commit 8a3c84b649b033024d2349f96234b26cbd6083a6 Author: Darrick J. Wong Date: Tue Nov 10 16:50:21 2020 -0800 vfs: separate __sb_start_write into blocking and non-blocking helpers Break this function into two helpers so that it's obvious that the trylock versions return a value that must be checked, and the blocking versions don't require that. While we're at it, clean up the return type mismatch. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig commit 22843291efc986ce7722610073fcf85a39b4cb13 Author: Darrick J. Wong Date: Tue Nov 10 16:49:29 2020 -0800 vfs: remove lockdep bogosity in __sb_start_write __sb_start_write has some weird looking lockdep code that claims to exist to handle nested freeze locking requests from xfs. The code as written seems broken -- if we think we hold a read lock on any of the higher freeze levels (e.g. we hold SB_FREEZE_WRITE and are trying to lock SB_FREEZE_PAGEFAULT), it converts a blocking lock attempt into a trylock. However, it's not correct to downgrade a blocking lock attempt to a trylock unless the downgrading code or the callers are prepared to deal with that situation. Neither __sb_start_write nor its callers handle this at all. For example: sb_start_pagefault ignores the return value completely, with the result that if xfs_filemap_fault loses a race with a different thread trying to fsfreeze, it will proceed without pagefault freeze protection (thereby breaking locking rules) and then unlocks the pagefault freeze lock that it doesn't own on its way out (thereby corrupting the lock state), which leads to a system hang shortly afterwards. Normally, this won't happen because our ownership of a read lock on a higher freeze protection level blocks fsfreeze from grabbing a write lock on that higher level. *However*, if lockdep is offline, lock_is_held_type unconditionally returns 1, which means that percpu_rwsem_is_held returns 1, which means that __sb_start_write unconditionally converts blocking freeze lock attempts into trylocks, even when we *don't* hold anything that would block a fsfreeze. Apparently this all held together until 5.10-rc1, when bugs in lockdep caused lockdep to shut itself off early in an fstests run, and once fstests gets to the "race writes with freezer" tests, kaboom. This might explain the long trail of vanishingly infrequent livelocks in fstests after lockdep goes offline that I've never been able to diagnose. We could fix it by spinning on the trylock if wait==true, but AFAICT the locking works fine if lockdep is not built at all (and I didn't see any complaints running fstests overnight), so remove this snippet entirely. NOTE: Commit f4b554af9931 in 2015 created the current weird logic (which used to exist in a different form in commit 5accdf82ba25c from 2012) in __sb_start_write. XFS solved this whole problem in the late 2.6 era by creating a variant of transactions (XFS_TRANS_NO_WRITECOUNT) that don't grab intwrite freeze protection, thus making lockdep's solution unnecessary. The commit claims that Dave Chinner explained that the trylock hack + comment could be removed, but nobody ever did. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara commit 54e9b09e153842ab5adb8a460b891e11b39e9c3d Author: Darrick J. Wong Date: Sun Nov 8 16:32:42 2020 -0800 xfs: fix brainos in the refcount scrubber's rmap fragment processor Fix some serious WTF in the reference count scrubber's rmap fragment processing. The code comment says that this loop is supposed to move all fragment records starting at or before bno onto the worklist, but there's no obvious reason why nr (the number of items added) should increment starting from 1, and breaking the loop when we've added the target number seems dubious since we could have more rmap fragments that should have been added to the worklist. This seems to manifest in xfs/411 when adding one to the refcount field. Fixes: dbde19da9637 ("xfs: cross-reference the rmapbt data with the refcountbt") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 6ff646b2ceb0eec916101877f38da0b73e3a5b7f Author: Darrick J. Wong Date: Sun Nov 8 16:32:44 2020 -0800 xfs: fix rmap key and record comparison functions Keys for extent interval records in the reverse mapping btree are supposed to be computed as follows: (physical block, owner, fork, is_btree, is_unwritten, offset) This provides users the ability to look up a reverse mapping from a bmbt record -- start with the physical block; then if there are multiple records for the same block, move on to the owner; then the inode fork type; and so on to the file offset. However, the key comparison functions incorrectly remove the fork/btree/unwritten information that's encoded in the on-disk offset. This means that lookup comparisons are only done with: (physical block, owner, offset) This means that queries can return incorrect results. On consistent filesystems this hasn't been an issue because blocks are never shared between forks or with bmbt blocks; and are never unwritten. However, this bug means that online repair cannot always detect corruption in the key information in internal rmapbt nodes. Found by fuzzing keys[1].attrfork = ones on xfs/371. Fixes: 4b8ed67794fe ("xfs: add rmap btree operations") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 5dda3897fd90783358c4c6115ef86047d8c8f503 Author: Darrick J. Wong Date: Sun Nov 8 16:32:43 2020 -0800 xfs: set the unwritten bit in rmap lookup flags in xchk_bmap_get_rmapextents When the bmbt scrubber is looking up rmap extents, we need to set the extent flags from the bmbt record fully. This will matter once we fix the rmap btree comparison functions to check those flags correctly. Fixes: d852657ccfc0 ("xfs: cross-reference reverse-mapping btree") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit ea8439899c0b15a176664df62aff928010fad276 Author: Darrick J. Wong Date: Sun Nov 8 16:32:43 2020 -0800 xfs: fix flags argument to rmap lookup when converting shared file rmaps Pass the same oldext argument (which contains the existing rmapping's unwritten state) to xfs_rmap_lookup_le_range at the start of xfs_rmap_convert_shared. At this point in the code, flags is zero, which means that we perform lookups using the wrong key. Fixes: 3f165b334e51 ("xfs: convert unwritten status of reverse mappings for shared files") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit f3037c5a31b58a73b32a36e938ad0560085acadd Author: Heiner Kallweit Date: Sun Nov 8 22:44:02 2020 +0100 net: phy: realtek: support paged operations on RTL8201CP The RTL8401-internal PHY identifies as RTL8201CP, and the init sequence in r8169, copied from vendor driver r8168, uses paged operations. Therefore set the same paged operation callbacks as for the other Realtek PHY's. Fixes: cdafdc29ef75 ("r8169: sync support for RTL8401 with vendor driver") Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/69882f7a-ca2f-e0c7-ae83-c9b6937282cd@gmail.com Signed-off-by: Jakub Kicinski commit 902a66e08ceaadb9a7a1ab3a4f3af611cd1d8cba Author: Sven Van Asbroeck Date: Sun Nov 8 12:12:24 2020 -0500 lan743x: correctly handle chips with internal PHY Commit 6f197fb63850 ("lan743x: Added fixed link and RGMII support") assumes that chips with an internal PHY will never have a devicetree entry. This is incorrect: even for these chips, a devicetree entry can be useful e.g. to pass the mac address from bootloader to chip: &pcie { status = "okay"; host@0 { reg = <0 0 0 0 0>; #address-cells = <3>; #size-cells = <2>; lan7430: ethernet@0 { /* LAN7430 with internal PHY */ compatible = "microchip,lan743x"; status = "okay"; reg = <0 0 0 0 0>; /* filled in by bootloader */ local-mac-address = [00 00 00 00 00 00]; }; }; }; If a devicetree entry is present, the driver will not attach the chip to its internal phy, and the chip will be non-operational. Fix by tweaking the phy connection algorithm: - first try to connect to a phy specified in the devicetree (could be 'real' phy, or just a 'fixed-link') - if that doesn't succeed, try to connect to an internal phy, even if the chip has a devnode Tested on a LAN7430 with internal PHY. I cannot test a device using fixed-link, as I do not have access to one. Fixes: 6f197fb63850 ("lan743x: Added fixed link and RGMII support") Tested-by: Sven Van Asbroeck # lan7430 Reviewed-by: Andrew Lunn Signed-off-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20201108171224.23829-1-TheSven73@gmail.com Signed-off-by: Jakub Kicinski commit 866358ec331f8faa394995fb4b511af1db0247c8 Author: Paul Moore Date: Sun Nov 8 09:08:26 2020 -0500 netlabel: fix our progress tracking in netlbl_unlabel_staticlist() The current NetLabel code doesn't correctly keep track of the netlink dump state in some cases, in particular when multiple interfaces with large configurations are loaded. The problem manifests itself by not reporting the full configuration to userspace, even though it is loaded and active in the kernel. This patch fixes this by ensuring that the dump state is properly reset when necessary inside the netlbl_unlabel_staticlist() function. Fixes: 8cc44579d1bd ("NetLabel: Introduce static network labels for unlabeled connections") Signed-off-by: Paul Moore Link: https://lore.kernel.org/r/160484450633.3752.16512718263560813473.stgit@sifl Signed-off-by: Jakub Kicinski commit a6c40b8032b845f132abfcbcbed6bddebbcc3b4a Author: Linus Walleij Date: Sun Nov 8 12:35:35 2020 +0100 drm/mcde: Fix unbalanced regulator Since we now turn off the EPOD regulator to reset the hardware, we need to balance the regulators after that point. If registering the master fails we only need to disable one regulator. Fix this by open-coding this leg of the error path. Fixes: c4842d4d0f74 ("drm/mcde: Fix display pipeline restart") Signed-off-by: Linus Walleij Reviewed-by: Sam Ravnborg Cc: Stephan Gerhold Link: https://patchwork.freedesktop.org/patch/msgid/20201108113535.1819952-1-linus.walleij@linaro.org commit 5fb7f75bc138c868df2df40d386c7244122cca77 Author: Tony Nguyen Date: Mon Nov 9 16:07:35 2020 -0800 MAINTAINERS: Update repositories for Intel Ethernet Drivers Update Intel Ethernet Drivers repositories to new locations. Signed-off-by: Tony Nguyen commit 6b7ed22ae4c96a415001f0c3116ebee15bb8491a Author: Vinicius Costa Gomes Date: Fri Sep 25 11:35:37 2020 -0700 igc: Fix returning wrong statistics 'igc_update_stats()' was not updating 'netdev->stats', so the returned statistics, for example, requested by: $ ip -s link show dev enp3s0 were not being updated and were always zero. Fix by returning a set of statistics that are actually being updated (adapter->stats64). Fixes: c9a11c23ceb6 ("igc: Add netdev") Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 1773482fd8cecd5b060d409853f8145be3064a41 Author: Dan Carpenter Date: Wed Sep 16 17:32:28 2020 +0300 i40e, xsk: uninitialized variable in i40e_clean_rx_irq_zc() The "failure" variable is used without being initialized. It should be set to false. Fixes: 8cbf74149903 ("i40e, xsk: move buffer allocation out of the Rx processing loop") Signed-off-by: Dan Carpenter Acked-by: Björn Töpel Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen commit 3a7001788fed0311d6fb77ed0dabe7bed3567bc0 Author: Slawomir Laba Date: Wed Oct 14 08:54:09 2020 +0000 i40e: Fix MAC address setting for a VF via Host/VM Fix MAC setting flow for the PF driver. Update the unicast VF's MAC address in VF structure if it is a new setting in i40e_vc_add_mac_addr_msg. When unicast MAC address gets deleted, record that and set the new unicast MAC address that is already waiting in the filter list. This logic is based on the order of messages arriving to the PF driver. Without this change the MAC address setting was interpreted incorrectly in the following use cases: 1) Print incorrect VF MAC or zero MAC ip link show dev $pf 2) Don't preserve MAC between driver reload rmmod iavf; modprobe iavf 3) Update VF MAC when macvlan was set ip link add link $vf address $mac $vf.1 type macvlan 4) Failed to update mac address when VF was trusted ip link set dev $vf address $mac This includes all other configurations including above commands. Fixes: f657a6e1313b ("i40e: Fix VF driver MAC address configuration") Signed-off-by: Slawomir Laba Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 97adb13dc9ba08ecd4758bc59efc0205f5cbf377 Author: Vlad Buslov Date: Sat Nov 7 13:19:28 2020 +0200 selftest: fix flower terse dump tests Iproute2 tc classifier terse dump has been accepted with modified syntax. Update the tests accordingly. Signed-off-by: Vlad Buslov Fixes: e7534fd42a99 ("selftests: implement flower classifier terse dump tests") Link: https://lore.kernel.org/r/20201107111928.453534-1-vlad@buslov.dev Signed-off-by: Jakub Kicinski commit 9a5085b3fad5d5d6019a3d160cdd70357d35c8b1 Author: Richard Weinberger Date: Mon Oct 19 23:10:49 2020 +0200 um: Call pgtable_pmd_page_dtor() in __pmd_free_tlb() Commit b2b29d6d0119 ("mm: account PMD tables like PTE tables") uncovered a bug in uml, we forgot to call the destructor. While we are here, give x a sane name. Reported-by: Anton Ivanov Co-developed-by: Matthew Wilcox (Oracle) Signed-off-by: Richard Weinberger Tested-by: Christopher Obbard commit 3084db0e0d5076cd48408274ab0911cd3ccdae88 Author: Daniel Latypov Date: Mon Nov 2 15:23:04 2020 -0800 kunit: fix display of failed expectations for strings Currently the following expectation KUNIT_EXPECT_STREQ(test, "hi", "bye"); will produce: Expected "hi" == "bye", but "hi" == 1625079497 "bye" == 1625079500 After this patch: Expected "hi" == "bye", but "hi" == hi "bye" == bye KUNIT_INIT_BINARY_STR_ASSERT_STRUCT() was written but just mistakenly not actually used by KUNIT_EXPECT_STREQ() and friends. Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 060352e141e4c71ce147a2737f6d30a97f2ec317 Author: Daniel Latypov Date: Fri Oct 30 15:38:53 2020 -0700 kunit: tool: fix extra trailing \n in raw + parsed test output For simplcity, strip all trailing whitespace from parsed output. I imagine no one is printing out meaningful trailing whitespace via KUNIT_FAIL() or similar, and that if they are, they really shouldn't. `isolate_kunit_output()` yielded liens with trailing \n, which results in artifacty output like this: $ ./tools/testing/kunit/kunit.py run [16:16:46] [FAILED] example_simple_test [16:16:46] # example_simple_test: EXPECTATION FAILED at lib/kunit/kunit-example-test.c:29 [16:16:46] Expected 1 + 1 == 3, but [16:16:46] 1 + 1 == 2 [16:16:46] 3 == 3 [16:16:46] not ok 1 - example_simple_test [16:16:46] After this change: [16:16:46] # example_simple_test: EXPECTATION FAILED at lib/kunit/kunit-example-test.c:29 [16:16:46] Expected 1 + 1 == 3, but [16:16:46] 1 + 1 == 2 [16:16:46] 3 == 3 [16:16:46] not ok 1 - example_simple_test [16:16:46] We should *not* be expecting lines to end with \n in kunit_tool_test.py for this reason. Do the same for `raw_output()` as well which suffers from the same issue. This is a followup to [1], but rebased onto kunit-fixes to pick up the other raw_output() fix and fixes for kunit_tool_test.py. [1] https://lore.kernel.org/linux-kselftest/20201020233219.4146059-1-dlatypov@google.com/ Signed-off-by: Daniel Latypov Reviewed-by: David Gow Tested-by: David Gow Signed-off-by: Shuah Khan commit 390881448b1ff1e9d82896abbbda7cdb8e0be27c Author: Daniel Latypov Date: Thu Oct 29 15:09:29 2020 -0700 kunit: tool: print out stderr from make (like build warnings) Currently the tool redirects make stdout + stderr, and only shows them if the make command fails. This means build warnings aren't shown to the user. This change prints the contents of stderr even if make succeeds, under the assumption these are only build warnings or other messages the user likely wants to see. We drop stdout from the raised exception since we can no longer easily collate stdout and stderr and just showing the stderr seems fine. Example with a warning: [14:56:35] Building KUnit Kernel ... ../lib/kunit/kunit-test.c: In function ‘kunit_test_successful_try’: ../lib/kunit/kunit-test.c:19:6: warning: unused variable ‘unused’ [-Wunused-variable] 19 | int unused; | ^~~~~~ [14:56:40] Starting KUnit Kernel ... Note the stderr has a trailing \n, and since we use print, we add another, but it helps separate make and kunit.py output. Example with a build error: [15:02:45] Building KUnit Kernel ... ERROR:root:../lib/kunit/kunit-test.c: In function ‘kunit_test_successful_try’: ../lib/kunit/kunit-test.c:19:2: error: unknown type name ‘invalid_type’ 19 | invalid_type *test = data; | ^~~~~~~~~~~~ ... Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 873ddeb881e055fb0c4e371cc3a006bfd9388f00 Author: Randy Dunlap Date: Wed Oct 28 10:43:19 2020 -0700 KUnit: Docs: usage: wording fixes Fix minor grammar and punctutation glitches. Hyphenate "architecture-specific" instances. Signed-off-by: Randy Dunlap Cc: David Gow Cc: linux-kselftest@vger.kernel.org Cc: kunit-dev@googlegroups.com Cc: Shuah Khan Cc: Shuah Khan Cc: Brendan Higgins Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 1f4dde57125b3d91b900e82ac33a196312be5c8e Author: Randy Dunlap Date: Wed Oct 28 10:42:18 2020 -0700 KUnit: Docs: style: fix some Kconfig example issues Fix the Kconfig example to be closer to Kconfig coding style. Also add punctuation and a trailing slash ('/') to a sub-directory name -- this is how the text mostly appears in other Kconfig files. Signed-off-by: Randy Dunlap Cc: David Gow Cc: linux-kselftest@vger.kernel.org Cc: kunit-dev@googlegroups.com Cc: Shuah Khan Cc: Shuah Khan Cc: Brendan Higgins Reviewed-by: David Gow Signed-off-by: Shuah Khan commit f7766424cf15fd6e03e8230fb17d5612c5b76dbe Author: Randy Dunlap Date: Tue Oct 27 11:48:53 2020 -0700 KUnit: Docs: fix a wording typo Fix a wording typo (keyboard glitch). Signed-off-by: Randy Dunlap Cc: David Gow Cc: linux-kselftest@vger.kernel.org Cc: kunit-dev@googlegroups.com Cc: Shuah Khan Cc: Shuah Khan Cc: Brendan Higgins Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 128dc4bcc8c0c7c3bab4a3818a1ec608cccb017a Author: Andy Shevchenko Date: Mon Oct 26 18:59:26 2020 +0200 kunit: Do not pollute source directory with generated files (test.log) When --build_dir is provided use it and do not pollute source directory which even can be mounted over network or read-only. Signed-off-by: Andy Shevchenko Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit fcdb0bc08ced274078f371e1e0fe6421a97fa9f2 Author: Andy Shevchenko Date: Mon Oct 26 18:59:25 2020 +0200 kunit: Do not pollute source directory with generated files (.kunitconfig) When --build_dir is provided use it and do not pollute source directory which even can be mounted over network or read-only. Signed-off-by: Andy Shevchenko Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit b7e0b983ff13714d261883e89910b0755eb12169 Author: Daniel Latypov Date: Wed Oct 21 15:07:52 2020 -0700 kunit: tool: fix pre-existing python type annotation errors The code uses annotations, but they aren't accurate. Note that type checking in python is a separate process, running `kunit.py run` will not check and complain about invalid types at runtime. Fix pre-existing issues found by running a type checker $ mypy *.py All but one of these were returning `None` without denoting this properly (via `Optional[Type]`). Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 3959d0a63b3202ea2aa12b3f6effd5400d773d31 Author: David Gow Date: Wed Oct 21 00:16:03 2020 -0700 kunit: Fix kunit.py parse subcommand (use null build_dir) When JSON support was added in [1], the KunitParseRequest tuple was updated to contain a 'build_dir' field, but kunit.py parse doesn't accept --build_dir as an option. The code nevertheless tried to access it, resulting in this error: AttributeError: 'Namespace' object has no attribute 'build_dir' Given that the parser only uses the build_dir variable to set the 'build_environment' json field, we set it to None (which gives the JSON 'null') for now. Ultimately, we probably do want to be able to set this, but since it's new functionality which (for the parse subcommand) never worked, this is the quickest way of getting it back up and running. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=kunit-fixes&id=21a6d1780d5bbfca0ce9b8104ca6233502fcbf86 Fixes: 21a6d1780d5b ("kunit: tool: allow generating test results in JSON") Signed-off-by: David Gow Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit c335b4f1f65012713832d988ec06512c7bda5c04 Author: Brendan Higgins Date: Thu Nov 5 15:24:40 2020 -0800 kunit: tool: unmark test_data as binary blobs The tools/testing/kunit/test_data/ directory was marked as binary because some of the test_data files cause checkpatch warnings. Fix this by dropping the .gitattributes file. Fixes: afc63da64f1e ("kunit: kunit_parser: make parser more robust") Signed-off-by: Brendan Higgins Signed-off-by: Shuah Khan commit 41f71629b4c432f8dd47d70ace813be5f79d4d75 Author: Deepak R Varma Date: Thu Nov 5 23:29:28 2020 +0530 drm/tegra: replace idr_init() by idr_init_base() idr_init() uses base 0 which is an invalid identifier for this driver. The new function idr_init_base allows IDR to set the ID lookup from base 1. This avoids all lookups that otherwise starts from 0 since 0 is always unused. References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Signed-off-by: Deepak R Varma Signed-off-by: Thierry Reding commit fe56d05ee6c87f6a1a8c7267affd92c9438249cc Author: Sara Sharon Date: Sat Nov 7 10:50:11 2020 +0200 iwlwifi: mvm: fix kernel panic in case of assert during CSA During CSA, we briefly nullify the phy context, in __iwl_mvm_unassign_vif_chanctx. In case we have a FW assert right after it, it remains NULL though. We end up running into endless loop due to mac80211 trying repeatedly to move us to ASSOC state, and we keep returning -EINVAL. Later down the road we hit a kernel panic. Detect and avoid this endless loop. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201107104557.d64de2c17bff.Iedd0d2afa20a2aacba5259a5cae31cb3a119a4eb@changeid commit edb625208d84aef179e3f16590c1c582fc5fdae6 Author: Johannes Berg Date: Sat Nov 7 10:50:10 2020 +0200 iwlwifi: pcie: set LTR to avoid completion timeout On some platforms, the preset values aren't correct and then we may get a completion timeout in the firmware. Change the LTR configuration to avoid that. The firmware will do some more complex reinit of this later, but for the boot process we use ~250usec. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201107104557.d83d591c05ba.I42885c9fb500bc08b9a4c07c4ff3d436cc7a3c84@changeid commit 97cc16943f23078535fdbce4f6391b948b4ccc08 Author: Avraham Stern Date: Sat Nov 7 10:50:09 2020 +0200 iwlwifi: mvm: write queue_sync_state only for sync We use mvm->queue_sync_state to wait for synchronous queue sync messages, but if an async one happens inbetween we shouldn't clear mvm->queue_sync_state after sending the async one, that can run concurrently (at least from the CPU POV) with another synchronous queue sync. Signed-off-by: Johannes Berg Fixes: 3c514bf831ac ("iwlwifi: mvm: add a loose synchronization of the NSSN across Rx queues") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201107104557.51a3148f2c14.I0772171dbaec87433a11513e9586d98b5d920b5f@changeid commit 1cf260e3a75b87726ec609ad1b6b88f515749786 Author: Emmanuel Grumbach Date: Sat Nov 7 10:50:08 2020 +0200 iwlwifi: mvm: properly cancel a session protection for P2P We need to feed the configuration id to remove session protection properly. Remember the conf_id when we add the session protection so that we can give it back when we want to remove the session protection. While at it, slightly improve the kernel doc for the conf_id of the notification. Signed-off-by: Emmanuel Grumbach Fixes: fe959c7b2049 ("iwlwifi: mvm: use the new session protection command") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201107104557.3642f730333d.I01a98ecde62096d00d171cf34ad775bf80cb0277@changeid commit fb8d1b6e97980057b7ebed444b8950e57f268a67 Author: Emmanuel Grumbach Date: Sat Nov 7 10:50:07 2020 +0200 iwlwifi: mvm: use the HOT_SPOT_CMD to cancel an AUX ROC The ROC that runs on the AUX ROC (meaning an ROC on the STA vif), was added with the HOT_SPOT_CMD firmware command and must be cancelled with that same command. Signed-off-by: Emmanuel Grumbach Fixes: fe959c7b2049 ("iwlwifi: mvm: use the new session protection command") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201107104557.a317376154da.I44fa3637373ba4bd421cdff2cabc761bffc0735f@changeid commit c8a2e7a29702fe4626b7aa81149b7b7164e20606 Author: Mordechay Goodstein Date: Sat Nov 7 10:50:06 2020 +0200 iwlwifi: sta: set max HE max A-MPDU according to HE capa Currently, our max tpt is limited to max HT A-MPDU for LB, and max VHT A-MPDU for HB. Configure HE exponent value correctly to achieve HE max A-MPDU, both on LB and HB. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201107104557.4486852ebb56.I9eb0d028e31f183597fb90120e7d4ca87e0dd6cb@changeid commit eccc876724927ff3b9ff91f36f7b6b159e948f0c Merge: e2f0c565ec70e 77f6ab8b7768c Author: Linus Torvalds Date: Tue Nov 10 10:33:55 2020 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull core dump fix from Al Viro: "Fix for multithreaded coredump playing fast and loose with getting registers of secondary threads; if a secondary gets caught in the middle of exit(2), the conditition it will be stopped in for dumper to examine might be unusual enough for things to go wrong. Quite a few architectures are fine with that, but some are not." * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: don't dump the threads that had been already exiting when zapped. commit c2fe61d8be491ff8188edaf22e838f819999146b Author: Arvind Sankar Date: Tue Nov 10 11:39:19 2020 -0500 efi/x86: Free efi_pgd with free_pages() Commit d9e9a6418065 ("x86/mm/pti: Allocate a separate user PGD") changed the PGD allocation to allocate PGD_ALLOCATION_ORDER pages, so in the error path it should be freed using free_pages() rather than free_page(). Commit 06ace26f4e6f ("x86/efi: Free efi_pgd with free_pages()") fixed one instance of this, but missed another. Move the freeing out-of-line to avoid code duplication and fix this bug. Fixes: d9e9a6418065 ("x86/mm/pti: Allocate a separate user PGD") Link: https://lore.kernel.org/r/20201110163919.1134431-1-nivedita@alum.mit.edu Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel commit e2f0c565ec70eb9e4d3b98deb5892af62de8b98d Merge: 52d1998d09af9 468600c6ec286 Author: Linus Torvalds Date: Tue Nov 10 10:07:15 2020 -0800 Merge tag 'for-5.10-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A handful of minor fixes and updates: - handle missing device replace item on mount (syzbot report) - fix space reservation calculation when finishing relocation - fix memory leak on error path in ref-verify (debugging feature) - fix potential overflow during defrag on 32bit arches - minor code update to silence smatch warning - minor error message updates" * tag 'for-5.10-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: ref-verify: fix memory leak in btrfs_ref_tree_mod btrfs: dev-replace: fail mount if we don't have replace item with target device btrfs: scrub: update message regarding read-only status btrfs: clean up NULL checks in qgroup_unreserve_range() btrfs: fix min reserved size calculation in merge_reloc_root btrfs: print the block rsv type when we fail our reservation btrfs: fix potential overflow in cluster_pages_for_defrag on 32bit arch commit 52d1998d09af92d44ffce7454637dd3fd1afdc7d Merge: 8bff39bfdc30c 92cfcd030e4b1 Author: Linus Torvalds Date: Tue Nov 10 10:05:37 2020 -0800 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fscrypt fix from Eric Biggers: "Fix a regression where a new WARN_ON() was reachable when using FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32 on ext4, causing xfstest generic/602 to sometimes fail on ext4" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fscrypt: remove reachable WARN in fscrypt_setup_iv_ino_lblk_32_key() commit 8bff39bfdc30c9bd6e152eb88a0bd6dd35bdd760 Merge: 407ab579637ce 3e9fa9983b929 Author: Linus Torvalds Date: Tue Nov 10 10:02:31 2020 -0800 Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat updates from Len Brown: "Update update to version 20.09.30, one kernel side fix" * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: update version number powercap: restrict energy meter to root access tools/power turbostat: harden against cpu hotplug tools/power turbostat: adjust for temperature offset tools/power turbostat: Build with _FILE_OFFSET_BITS=64 tools/power turbostat: Support AMD Family 19h tools/power turbostat: Remove empty columns for Jacobsville tools/power turbostat: Add a new GFXAMHz column that exposes gt_act_freq_mhz. tools/power x86_energy_perf_policy: Input/output error in a VM tools/power turbostat: Skip pc8, pc9, pc10 columns, if they are disabled tools/power turbostat: Support additional CPU model numbers tools/power turbostat: Fix output formatting for ACPI CST enumeration tools/power turbostat: Replace HTTP links with HTTPS ones: TURBOSTAT UTILITY tools/power turbostat: Use sched_getcpu() instead of hardcoded cpu 0 tools/power turbostat: Enable accumulate RAPL display tools/power turbostat: Introduce functions to accumulate RAPL consumption tools/power turbostat: Make the energy variable to be 64 bit tools/power turbostat: Always print idle in the system configuration header tools/power turbostat: Print /dev/cpu_dma_latency commit 38748bcb940e8b52beee19b0e5cfd740475a99e1 Author: Srinivas Pandruvada Date: Tue Nov 10 09:50:58 2020 -0800 ACPI: DPTF: Support Alder Lake Add Alder Lake ACPI IDs for DPTF devices. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 8d936bb13ce788c616084ab1a5754da3490a9f0c Author: Flavio Suligoi Date: Tue Nov 10 14:03:38 2020 +0100 Documentation: ACPI: fix spelling mistakes Signed-off-by: Flavio Suligoi Signed-off-by: Rafael J. Wysocki commit 8d4d9c7b4333abccb3bf310d76ef7ea2edb9828f Author: Colin Ian King Date: Thu Oct 29 15:11:03 2020 +0000 sched/debug: Fix memory corruption caused by multiple small reads of flags Reading /proc/sys/kernel/sched_domain/cpu*/domain0/flags mutliple times with small reads causes oopses with slub corruption issues because the kfree is free'ing an offset from a previous allocation. Fix this by adding in a new pointer 'buf' for the allocation and kfree and use the temporary pointer tmp to handle memory copies of the buf offsets. Fixes: 5b9f8ff7b320 ("sched/debug: Output SD flag names rather than their values") Reported-by: Jeff Bastian Signed-off-by: Colin Ian King Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20201029151103.373410-1-colin.king@canonical.com commit b4c9c9f15649c98a5b45408919d1ff4fd7f5531c Author: Vincent Guittot Date: Thu Oct 29 17:18:24 2020 +0100 sched/fair: Prefer prev cpu in asymmetric wakeup path During fast wakeup path, scheduler always check whether local or prev cpus are good candidates for the task before looking for other cpus in the domain. With commit b7a331615d25 ("sched/fair: Add asymmetric CPU capacity wakeup scan") the heterogenous system gains a dedicated path but doesn't try to reuse prev cpu whenever possible. If the previous cpu is idle and belong to the LLC domain, we should check it 1st before looking for another cpu because it stays one of the best candidate and this also stabilizes task placement on the system. This change aligns asymmetric path behavior with symmetric one and reduces cases where the task migrates across all cpus of the sd_asym_cpucapacity domains at wakeup. This change does not impact normal EAS mode but only the overloaded case or when EAS is not used. - On hikey960 with performance governor (EAS disable) ./perf bench sched pipe -T -l 50000 mainline w/ patch # migrations 999364 0 ops/sec 149313(+/-0.28%) 182587(+/- 0.40) +22% - On hikey with performance governor ./perf bench sched pipe -T -l 50000 mainline w/ patch # migrations 0 0 ops/sec 47721(+/-0.76%) 47899(+/- 0.56) +0.4% According to test on hikey, the patch doesn't impact symmetric system compared to current implementation (only tested on arm64) Also read the uclamped value of task's utilization at most twice instead instead each time we compare task's utilization with cpu's capacity. Fixes: b7a331615d25 ("sched/fair: Add asymmetric CPU capacity wakeup scan") Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Tested-by: Dietmar Eggemann Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20201029161824.26389-1-vincent.guittot@linaro.org commit 16b0a7a1a0af9db6e008fecd195fe4d6cb366d83 Author: Vincent Guittot Date: Mon Nov 2 11:24:57 2020 +0100 sched/fair: Ensure tasks spreading in LLC during LB schbench shows latency increase for 95 percentile above since: commit 0b0695f2b34a ("sched/fair: Rework load_balance()") Align the behavior of the load balancer with the wake up path, which tries to select an idle CPU which belongs to the LLC for a waking task. calculate_imbalance() will use nr_running instead of the spare capacity when CPUs share resources (ie cache) at the domain level. This will ensure a better spread of tasks on idle CPUs. Running schbench on a hikey (8cores arm64) shows the problem: tip/sched/core : schbench -m 2 -t 4 -s 10000 -c 1000000 -r 10 Latency percentiles (usec) 50.0th: 33 75.0th: 45 90.0th: 51 95.0th: 4152 *99.0th: 14288 99.5th: 14288 99.9th: 14288 min=0, max=14276 tip/sched/core + patch : schbench -m 2 -t 4 -s 10000 -c 1000000 -r 10 Latency percentiles (usec) 50.0th: 34 75.0th: 47 90.0th: 52 95.0th: 78 *99.0th: 94 99.5th: 94 99.9th: 94 min=0, max=94 Fixes: 0b0695f2b34a ("sched/fair: Rework load_balance()") Reported-by: Chris Mason Suggested-by: Rik van Riel Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Rik van Riel Tested-by: Rik van Riel Link: https://lkml.kernel.org/r/20201102102457.28808-1-vincent.guittot@linaro.org commit 1a8cfa24e21c2f154791f0cdd85fc28496918722 Author: Arnd Bergmann Date: Mon Oct 26 22:51:57 2020 +0100 perf/x86/intel/uncore: Fix Add BW copypasta gcc -Wextra points out a duplicate initialization of one array member: arch/x86/events/intel/uncore_snb.c:478:37: warning: initialized field overwritten [-Woverride-init] 478 | [SNB_PCI_UNCORE_IMC_DATA_READS] = { SNB_UNCORE_PCI_IMC_DATA_WRITES_BASE, The only sensible explanation is that a duplicate 'READS' was used instead of the correct 'WRITES', so change it back. Fixes: 24633d901ea4 ("perf/x86/intel/uncore: Add BW counters for GT, IA and IO breakdown") Signed-off-by: Arnd Bergmann Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201026215203.3893972-1-arnd@kernel.org commit d61fc96a37603384cd531622c1e89de1096b5123 Author: Boqun Feng Date: Mon Nov 2 13:37:41 2020 +0800 lockdep: Avoid to modify chain keys in validate_chain() Chris Wilson reported a problem spotted by check_chain_key(): a chain key got changed in validate_chain() because we modify the ->read in validate_chain() to skip checks for dependency adding, and ->read is taken into calculation for chain key since commit f611e8cf98ec ("lockdep: Take read/write status in consideration when generate chainkey"). Fix this by avoiding to modify ->read in validate_chain() based on two facts: a) since we now support recursive read lock detection, there is no need to skip checks for dependency adding for recursive readers, b) since we have a), there is only one case left (nest_lock) where we want to skip checks in validate_chain(), we simply remove the modification for ->read and rely on the return value of check_deadlock() to skip the dependency adding. Reported-by: Chris Wilson Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201102053743.450459-1-boqun.feng@gmail.com commit 5c1d644c09dbc13b2dc652435786e42b05ac1bb7 Author: Marc Zyngier Date: Tue Oct 13 10:51:58 2020 +0100 drm/tegra: sor: Ensure regulators are disabled on teardown The Tegra SOR driver uses the devm infrastructure to request regulators, but enables them without registering them with the infrastructure. This results in the following splat if probing fails for any odd resaon (such as dependencies not being available): [ 8.974187] tegra-sor 15580000.sor: cannot get HDMI supply: -517 [ 9.414403] tegra-sor 15580000.sor: failed to probe HDMI: -517 [ 9.421240] ------------[ cut here ]------------ [ 9.425879] WARNING: CPU: 1 PID: 164 at drivers/regulator/core.c:2089 _regulator_put.part.0+0x16c/0x174 [ 9.435259] Modules linked in: tegra_drm(E+) cec(E) ahci_tegra(E) drm_kms_helper(E) drm(E) libahci_platform(E) libahci(E) max77620_regulator(E) xhci_tegra(E+) sdhci_tegra(E) xhci_hcd(E) libata(E) sdhci_pltfm(E) cqhci(E) fixed(E) usbcore(E) scsi_mod(E) sdhci(E) host1x(E) [ 9.459211] CPU: 1 PID: 164 Comm: systemd-udevd Tainted: G S D W E 5.9.0-rc7-00298-gf6337624c4fe #1980 [ 9.469285] Hardware name: NVIDIA Jetson TX2 Developer Kit (DT) [ 9.475202] pstate: 80000005 (Nzcv daif -PAN -UAO BTYPE=--) [ 9.480784] pc : _regulator_put.part.0+0x16c/0x174 [ 9.485581] lr : regulator_put+0x44/0x60 [ 9.489501] sp : ffffffc011d837b0 [ 9.492814] x29: ffffffc011d837b0 x28: ffffff81dd085900 [ 9.498141] x27: ffffff81de1c8ec0 x26: ffffff81de1c8c10 [ 9.503464] x25: ffffff81dd085800 x24: ffffffc008f2c6b0 [ 9.508790] x23: ffffffc0117373f0 x22: 0000000000000005 [ 9.514101] x21: ffffff81dd085900 x20: ffffffc01172b098 [ 9.515822] ata1: SATA link down (SStatus 0 SControl 300) [ 9.519426] x19: ffffff81dd085100 x18: 0000000000000030 [ 9.530122] x17: 0000000000000000 x16: 0000000000000000 [ 9.535453] x15: 0000000000000000 x14: 000000000000038f [ 9.540777] x13: 0000000000000003 x12: 0000000000000040 [ 9.546105] x11: ffffff81eb800000 x10: 0000000000000ae0 [ 9.551417] x9 : ffffffc0106fea24 x8 : ffffff81de83e6c0 [ 9.556728] x7 : 0000000000000018 x6 : 00000000000003c3 [ 9.562064] x5 : 0000000000005660 x4 : 0000000000000000 [ 9.567392] x3 : ffffffc01172b388 x2 : ffffff81de83db80 [ 9.572702] x1 : 0000000000000000 x0 : 0000000000000001 [ 9.578034] Call trace: [ 9.580494] _regulator_put.part.0+0x16c/0x174 [ 9.584940] regulator_put+0x44/0x60 [ 9.588522] devm_regulator_release+0x20/0x2c [ 9.592885] release_nodes+0x1c8/0x2c0 [ 9.596636] devres_release_all+0x44/0x6c [ 9.600649] really_probe+0x1ec/0x504 [ 9.604316] driver_probe_device+0x100/0x170 [ 9.608589] device_driver_attach+0xcc/0xd4 [ 9.612774] __driver_attach+0xb0/0x17c [ 9.616614] bus_for_each_dev+0x7c/0xd4 [ 9.620450] driver_attach+0x30/0x3c [ 9.624027] bus_add_driver+0x154/0x250 [ 9.627867] driver_register+0x84/0x140 [ 9.631719] __platform_register_drivers+0xa0/0x180 [ 9.636660] host1x_drm_init+0x60/0x1000 [tegra_drm] [ 9.641629] do_one_initcall+0x54/0x2d0 [ 9.645490] do_init_module+0x68/0x29c [ 9.649244] load_module+0x2178/0x26c0 [ 9.652997] __do_sys_finit_module+0xb0/0x120 [ 9.657356] __arm64_sys_finit_module+0x2c/0x40 [ 9.661902] el0_svc_common.constprop.0+0x80/0x240 [ 9.666701] do_el0_svc+0x30/0xa0 [ 9.670022] el0_svc+0x18/0x50 [ 9.673081] el0_sync_handler+0x90/0x318 [ 9.677006] el0_sync+0x158/0x180 [ 9.680324] ---[ end trace 90f6c89d62d85ff6 ]--- Instead, let's register a callback that will disable the regulators on teardown. This allows for the removal of the .remove callbacks, which are not needed anymore. Signed-off-by: Marc Zyngier Signed-off-by: Thierry Reding commit fcb3a1ab79904d54499db77017793ccca665eb7e Author: Rafael J. Wysocki Date: Tue Nov 10 18:27:40 2020 +0100 cpufreq: intel_pstate: Take CPUFREQ_GOV_STRICT_TARGET into account Make intel_pstate take the new CPUFREQ_GOV_STRICT_TARGET governor flag into account when it operates in the passive mode with HWP enabled, so as to fix the "powersave" governor behavior in that case (currently, HWP is allowed to scale the performance all the way up to the policy max limit when the "powersave" governor is used, but it should be constrained to the policy min limit then). Fixes: f6ebbcf08f37 ("cpufreq: intel_pstate: Implement passive mode with HWP enabled") Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Cc: 5.9+ # 5.9+: 9a2a9ebc0a75 cpufreq: Introduce governor flags Cc: 5.9+ # 5.9+: 218f66870181 cpufreq: Introduce CPUFREQ_GOV_STRICT_TARGET Cc: 5.9+ # 5.9+: ea9364bbadf1 cpufreq: Add strict_target to struct cpufreq_policy commit ea9364bbadf11f0c55802cf11387d74f524cee84 Author: Rafael J. Wysocki Date: Tue Nov 10 18:26:37 2020 +0100 cpufreq: Add strict_target to struct cpufreq_policy Add a new field to be set when the CPUFREQ_GOV_STRICT_TARGET flag is set for the current governor to struct cpufreq_policy, so that the drivers needing to check CPUFREQ_GOV_STRICT_TARGET do not have to access the governor object during every frequency transition. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit 218f66870181bec7aaa6e3c72f346039c590c3c2 Author: Rafael J. Wysocki Date: Tue Nov 10 18:26:10 2020 +0100 cpufreq: Introduce CPUFREQ_GOV_STRICT_TARGET Introduce a new governor flag, CPUFREQ_GOV_STRICT_TARGET, for the governors that want the target frequency to be set exactly to the given value without leaving any room for adjustments on the hardware side and set this flag for the powersave and performance governors. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit 9a2a9ebc0a758d887ee06e067e9f7f0b36ff7574 Author: Rafael J. Wysocki Date: Tue Nov 10 18:25:57 2020 +0100 cpufreq: Introduce governor flags A new cpufreq governor flag will be added subsequently, so replace the bool dynamic_switching fleid in struct cpufreq_governor with a flags field and introduce CPUFREQ_GOV_DYNAMIC_SWITCHING to set for the "dynamic switching" governors instead of it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit c088a4985e5f6f6c2cbe5a6953357dfc30b7c57e Author: Pi-Hsun Shih Date: Fri Nov 6 14:48:17 2020 +0800 regulator: core: don't disable regulator if is_enabled return error. In regulator_late_cleanup when is_enabled failed, don't try to disable the regulator since it would likely to fail too and causing confusing error messages. Signed-off-by: Pi-Hsun Shih Link: https://lore.kernel.org/r/20201106064817.3290927-1-pihsun@chromium.org Signed-off-by: Mark Brown commit 3e9fa9983b9297407c2448114d6d27782d5e2ef2 Author: Len Brown Date: Wed Sep 30 21:04:05 2020 -0400 tools/power turbostat: update version number goodbye summer... Signed-off-by: Len Brown commit 949dd0104c496fa7c14991a23c03c62e44637e71 Author: Len Brown Date: Tue Nov 10 13:00:00 2020 -0800 powercap: restrict energy meter to root access Remove non-privileged user access to power data contained in /sys/class/powercap/intel-rapl*/*/energy_uj Non-privileged users currently have read access to power data and can use this data to form a security attack. Some privileged drivers/applications need read access to this data, but don't expose it to non-privileged users. For example, thermald uses this data to ensure that power management works correctly. Thus removing non-privileged access is preferred over completely disabling this power reporting capability with CONFIG_INTEL_RAPL=n. Fixes: 95677a9a3847 ("PowerCap: Fix mode for energy counter") Signed-off-by: Len Brown Cc: stable@vger.kernel.org commit 2bd645b2d3f0bacadaa6037f067538e1cd4e42ef Author: Christoph Hellwig Date: Mon Nov 9 18:30:59 2020 +0100 nbd: fix a block_device refcount leak in nbd_release bdget_disk needs to be paired with bdput to not leak a reference on the block device inode. Fixes: 08ba91ee6e2c ("nbd: Add the nbd NBD_DISCONNECT_ON_CLOSE config flag.") Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit b5214c605fc10c356c4bbb0c7fedef40a85e685c Merge: e1777d099728a 65c5a055b0d56 Author: Jens Axboe Date: Tue Nov 10 07:51:39 2020 -0700 Merge tag 'nvme-5.10-2020-11-10' of git://git.infradead.org/nvme into block-5.10 Pull NVMe fix from Christoph: "nvme fixes for 5.10: - don't clear the read-only bit on a revalidate (Sagi Grimberg)" * tag 'nvme-5.10-2020-11-10' of git://git.infradead.org/nvme: nvme: fix incorrect behavior when BLKROSET is called by the user commit dadfab0fbf0173da6e24c8322b69083fef03033d Merge: b41efeed507ad f3c75e7a9349d Author: Linus Walleij Date: Tue Nov 10 15:35:41 2020 +0100 Merge tag 'intel-pinctrl-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into fixes intel-pinctrl for v5.10-2 * Respect bias setting when comes from ACPI The following is an automated git shortlog grouped by driver: intel: - Set default bias in case no particular value given - Fix 2 kOhm bias which is 833 Ohm commit b41efeed507addecb92e83dd444d86c1fbe38ae0 Author: Bjorn Andersson Date: Tue Oct 27 21:36:42 2020 -0700 pinctrl: qcom: sm8250: Specify PDC map Specify the PDC mapping for SM8250, so that gpio interrupts are propertly mapped to the wakeup IRQs of the PDC. Fixes: 4e3ec9e407ad ("pinctrl: qcom: Add sm8250 pinctrl driver.") Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20201028043642.1141723-1-bjorn.andersson@linaro.org Signed-off-by: Linus Walleij commit 71266d9d39366c9b24b866d811b3facaf837f13f Author: Maulik Shah Date: Thu Nov 5 13:08:04 2020 +0530 pinctrl: qcom: Move clearing pending IRQ to .irq_request_resources callback When GPIOs that are routed to PDC are used as output they can still latch the IRQ pending at GIC. As a result the spurious IRQ was handled when the client driver change the direction to input to starts using it as IRQ. Currently such erroneous latched IRQ are cleared with .irq_enable callback however if the driver continue to use GPIO as interrupt and invokes disable_irq() followed by enable_irq() then everytime during enable_irq() previously latched interrupt gets cleared. This can make edge IRQs not seen after enable_irq() if they had arrived after the driver has invoked disable_irq() and were pending at GIC. Move clearing erroneous IRQ to .irq_request_resources callback as this is the place where GPIO direction is changed as input and its locked as IRQ. While at this add a missing check to invoke msm_gpio_irq_clear_unmask() from .irq_enable callback only when GPIO is not routed to PDC. Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy") Signed-off-by: Maulik Shah Link: https://lore.kernel.org/r/1604561884-10166-1-git-send-email-mkshah@codeaurora.org Signed-off-by: Linus Walleij commit c64a6a0d4a928c63e5bc3b485552a8903a506c36 Author: Coiby Xu Date: Fri Nov 6 07:19:10 2020 +0800 pinctrl: amd: use higher precision for 512 RtcClk RTC is 32.768kHz thus 512 RtcClk equals 15625 usec. The documentation likely has dropped precision and that's why the driver mistakenly took the slightly deviated value. Cc: stable@vger.kernel.org Reported-by: Andy Shevchenko Suggested-by: Andy Shevchenko Suggested-by: Hans de Goede Signed-off-by: Coiby Xu Reviewed-by: Andy Shevchenko Reviewed-by: Hans de Goede Link: https://lore.kernel.org/linux-gpio/2f4706a1-502f-75f0-9596-cc25b4933b6c@redhat.com/ Link: https://lore.kernel.org/r/20201105231912.69527-3-coiby.xu@gmail.com Signed-off-by: Linus Walleij commit 06abe8291bc31839950f7d0362d9979edc88a666 Author: Coiby Xu Date: Fri Nov 6 07:19:09 2020 +0800 pinctrl: amd: fix incorrect way to disable debounce filter The correct way to disable debounce filter is to clear bit 5 and 6 of the register. Cc: stable@vger.kerne.org Signed-off-by: Coiby Xu Reviewed-by: Hans de Goede Cc: Hans de Goede Link: https://lore.kernel.org/linux-gpio/df2c008b-e7b5-4fdd-42ea-4d1c62b52139@redhat.com/ Link: https://lore.kernel.org/r/20201105231912.69527-2-coiby.xu@gmail.com Signed-off-by: Linus Walleij commit 45fe0b539bc9cf6a6832d0d60cb6eab1e5f56bd9 Merge: 7ffa08169849b 10a2f11d3c9e4 Author: Linus Walleij Date: Tue Nov 10 14:13:20 2020 +0100 Merge tag 'gpio-fixes-for-v5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes gpio fixes for v5.10-rc3 - fix missing conversion to gpiolib irqchip in gpio-dwapb - fix bank properties for ast2600 variant in gpio-aspeed - make sysfs work again when the character device is disabled - fix interrupt handling in gpio-pcie-idio-24 commit 04e613ded8c26489b3e0f9101b44462f780d1a35 Author: Will Deacon Date: Fri Nov 6 10:25:49 2020 +0000 arm64: smp: Tell RCU about CPUs that fail to come online Commit ce3d31ad3cac ("arm64/smp: Move rcu_cpu_starting() earlier") ensured that RCU is informed early about incoming CPUs that might end up calling into printk() before they are online. However, if such a CPU fails the early CPU feature compatibility checks in check_local_cpu_capabilities(), then it will be powered off or parked without informing RCU, leading to an endless stream of stalls: | rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: | rcu: 2-O...: (0 ticks this GP) idle=002/1/0x4000000000000000 softirq=0/0 fqs=2593 | (detected by 0, t=5252 jiffies, g=9317, q=136) | Task dump for CPU 2: | task:swapper/2 state:R running task stack: 0 pid: 0 ppid: 1 flags:0x00000028 | Call trace: | ret_from_fork+0x0/0x30 Ensure that the dying CPU invokes rcu_report_dead() prior to being powered off or parked. Cc: Qian Cai Cc: "Paul E. McKenney" Reviewed-by: Paul E. McKenney Suggested-by: Qian Cai Link: https://lore.kernel.org/r/20201105222242.GA8842@willie-the-truck Link: https://lore.kernel.org/r/20201106103602.9849-3-will@kernel.org Signed-off-by: Will Deacon commit 891deb87585017d526b67b59c15d38755b900fea Author: Will Deacon Date: Fri Nov 6 09:57:55 2020 +0000 arm64: psci: Avoid printing in cpu_psci_cpu_die() cpu_psci_cpu_die() is called in the context of the dying CPU, which will no longer be online or tracked by RCU. It is therefore not generally safe to call printk() if the PSCI "cpu off" request fails, so remove the pr_crit() invocation. Cc: Qian Cai Cc: "Paul E. McKenney" Cc: Catalin Marinas Link: https://lore.kernel.org/r/20201106103602.9849-2-will@kernel.org Signed-off-by: Will Deacon commit 85f0b2fc917f8de4bca02d169ef7d23dbfc29155 Author: Will Deacon Date: Mon Nov 9 10:49:23 2020 +0000 arm64: kexec_file: Fix sparse warning Sparse gets cross about us returning 0 from image_load(), which has a return type of 'void *': >> arch/arm64/kernel/kexec_image.c:130:16: sparse: sparse: Using plain integer as NULL pointer Return NULL instead, as we don't use the return value for anything if it does not indicate an error. Cc: Benjamin Gwin Reported-by: kernel test robot Fixes: 108aa503657e ("arm64: kexec_file: try more regions if loading segments fails") Link: https://lore.kernel.org/r/202011091736.T0zH8kaC-lkp@intel.com Signed-off-by: Will Deacon commit f969f03888b9438fdb227b6460d99ede5737326d Author: Will Deacon Date: Fri Nov 6 11:14:26 2020 +0000 arm64: errata: Fix handling of 1418040 with late CPU onlining In a surprising turn of events, it transpires that CPU capabilities configured as ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE are never set as the result of late-onlining. Therefore our handling of erratum 1418040 does not get activated if it is not required by any of the boot CPUs, even though we allow late-onlining of an affected CPU. In order to get things working again, replace the cpus_have_const_cap() invocation with an explicit check for the current CPU using this_cpu_has_cap(). Cc: Sai Prakash Ranjan Cc: Stephen Boyd Cc: Catalin Marinas Cc: Mark Rutland Reviewed-by: Suzuki K Poulose Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20201106114952.10032-1-will@kernel.org Signed-off-by: Will Deacon commit 03d80e042a8e3248163a38f74b43809f8079d652 Author: Wolfram Sang Date: Fri Nov 6 08:25:49 2020 +0100 Revert "mmc: renesas_sdhi: workaround a regression when reinserting SD cards" This reverts commit db1af1e9712920f47b5dc6a995fca3eec05ea85e. It was only a workaround to hide a regression. We now have proper fixes. Signed-off-by: Wolfram Sang Tested-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201106072549.1495-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 24ce2d7b8beaede6a467640bfa7636e73d9b491e Author: Wolfram Sang Date: Fri Nov 6 08:25:48 2020 +0100 mmc: tmio: bring tuning HW to a sane state with MMC_POWER_OFF When powering off a card, we need to disable the tuning HW (like SCC for the Renesas SDHI) to get to a sane state and allow for re-tuning new cards. This was hidden before because we wrongly did that in hw_reset() before which was an unintended use of hw_reset(). Now that we corrected the use of hw_reset() meanwhile, we revealed this shortcoming and need to fix it properly by explicitly calling the downgrade callback. Fixes: 6e7d4de10890 ("mmc: renesas_sdhi: move wrong 'hw_reset' to 'reset'") Suggested-by: Takeshi Saito Reviewed-by: Takeshi Saito Signed-off-by: Wolfram Sang Tested-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201106072549.1495-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 1023e290ba567af0640f9a5bd878207a5dff6ed2 Author: Wolfram Sang Date: Fri Nov 6 08:25:47 2020 +0100 mmc: tmio: when resetting, reset DMA controller, too When applying a revert, the assumption that DMA only needs to be cleared in specific cases was wrong. We want to reset the DMA controller every time the rest of the HW gets reset, too. Fixes: 34e3211e5492 ("Revert "mmc: tmio: fix reset operation"") Reported-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang Tested-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201106072549.1495-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 29a25b9246f7f24203d30d59424cbe22bd905dfc Author: Tony Lindgren Date: Mon Nov 9 17:40:13 2020 +0200 dmaengine: ti: omap-dma: Block PM if SDMA is busy to fix audio We now use cpu_pm for saving and restoring device context for deeper SoC idle states. But for omap3, we must also block idle if SDMA is busy. If we don't block idle when SDMA is busy, we eventually end up saving and restoring SDMA register state on PER domain idle while SDMA is active and that causes at least audio playback to fail. Fixes: 4c74ecf79227 ("dmaengine: ti: omap-dma: Add device tree match data and use it for cpu_pm") Reported-by: Peter Ujfalusi Signed-off-by: Tony Lindgren Tested-by: Peter Ujfalusi Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201109154013.11950-1-tony@atomide.com Signed-off-by: Vinod Koul commit 71b053276a87ddfa40c8f236315d81543219bfb9 Author: Yangbo Lu Date: Tue Nov 10 15:13:14 2020 +0800 mmc: sdhci-of-esdhc: Handle pulse width detection erratum for more SoCs Apply erratum workaround of unreliable pulse width detection to more affected platforms (LX2160A Rev2.0 and LS1028A Rev1.0). Signed-off-by: Yangbo Lu Fixes: 48e304cc1970 ("mmc: sdhci-of-esdhc: workaround for unreliable pulse width detection") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201110071314.3868-1-yangbo.lu@nxp.com Signed-off-by: Ulf Hansson commit e8973201d9b281375b5a8c66093de5679423021a Author: Yoshihiro Shimoda Date: Fri Nov 6 18:25:30 2020 +0900 mmc: renesas_sdhi_core: Add missing tmio_mmc_host_free() at remove The commit 94b110aff867 ("mmc: tmio: add tmio_mmc_host_alloc/free()") added tmio_mmc_host_free(), but missed the function calling in the sh_mobile_sdhi_remove() at that time. So, fix it. Otherwise, we cannot rebind the sdhi/mmc devices when we use aliases of mmc. Fixes: 94b110aff867 ("mmc: tmio: add tmio_mmc_host_alloc/free()") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Reviewed-by: Niklas Söderlund Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1604654730-29914-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Ulf Hansson commit 48f486e13ffdb49fbb9b38c21d0e108ed60ab1a2 Author: Yu Kuai Date: Tue Nov 10 09:14:43 2020 +0800 net: xfrm: fix memory leak in xfrm_user_policy() if xfrm_get_translator() failed, xfrm_user_policy() return without freeing 'data', which is allocated in memdup_sockptr(). Fixes: 96392ee5a13b ("xfrm/compat: Translate 32-bit user_policy from sockptr") Reported-by: Hulk Robot Signed-off-by: Yu Kuai Signed-off-by: Steffen Klassert commit 368183029cc4055c571ed19ceaa49c35de996611 Merge: f8394f232b1ea f6439c531d521 Author: Greg Kroah-Hartman Date: Tue Nov 10 09:12:05 2020 +0100 Merge tag 'thunderbolt-for-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fixes for v5.10-rc4 This includes two fixes for resource leaks that have been around for a while. Then two fixes for code that was added during v5.10 merge window and PCI IDs for Intel Tiger Lake-H. All these have been in linux-next without reported issues. * tag 'thunderbolt-for-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Add support for Intel Tiger Lake-H thunderbolt: Only configure USB4 wake for lane 0 adapters thunderbolt: Add uaccess dependency to debugfs interface thunderbolt: Fix memory leak if ida_simple_get() fails in enumerate_services() thunderbolt: Add the missed ida_simple_remove() in ring_request_msix() commit 642403e3599e80370f71ba7a8a8c8fa82e5f6706 Author: Colin Xu Date: Mon Nov 9 15:39:39 2020 +0800 drm/i915/gvt: Temporarily disable vfio_edid for BXT/APL Some disply regs are not setup correctly during HPD for BXT/APL thus vfio_edid still not working. Temporarily disable the vfio_edid dynamic update until issue fixed. Acked-by: Zhenyu Wang Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20201109073939.758302-1-colin.xu@intel.com commit bc0230b6461c3c9105f94ff27394eafc632803e4 Merge: 4e0396c595592 ad37f77fd3659 Author: Steffen Klassert Date: Tue Nov 10 07:30:44 2020 +0100 Merge branch 'xfrm/compat: syzbot-found fixes' Dmitry Safonov says: ==================== v2: Added "Fixes" tags to the patches. WARN_ON() for XFRMA_UNSPEC translation which likely no-one except syzkaller uses; properly zerofy tail-padding for 64-bit attribute; don't use __GFP_ZERO as the memory is initialized during translation. ==================== Signed-off-by: Steffen Klassert commit 33d0d843872c5ddbe28457a92fc6f2487315fb9f Author: Fabio Estevam Date: Thu Nov 5 18:13:20 2020 -0300 ARM: dts: imx50-evk: Fix the chip select 1 IOMUX The SPI chip selects are represented as: cs-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>, <&gpio4 13 GPIO_ACTIVE_LOW>; , which means that they are used in GPIO function instead of native SPI mode. Fix the IOMUX for the chip select 1 to use GPIO4_13 instead of the native CSPI_SSI function. Fixes: c605cbf5e135 ("ARM: dts: imx: add device tree support for Freescale imx50evk board") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit d19d2152ca055baf20339cfacbf039c2cfb8d936 Author: Lucas Stach Date: Thu Nov 5 18:06:12 2020 +0100 arm64: dts: imx8mm: fix voltage for 1.6GHz CPU operating point The datasheet for both the industrial and consumer variant of the SoC lists a typical voltage of 0.95V for the 1.6GHz CPU operating point. Fixes: e85c9d0faa75 (arm64: dts: imx8mm: Add cpufreq properties) Signed-off-by: Lucas Stach Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 989ef49bdf100cc772b3a8737089df36b1ab1e30 Author: Paolo Abeni Date: Sun Nov 8 19:49:59 2020 +0100 mptcp: provide rmem[0] limit The mptcp proto struct currently does not provide the required limit for forward memory scheduling. Under pressure sk_rmem_schedule() will unconditionally try to use such field and will oops. Address the issue inheriting the tcp limit, as we already do for the wmem one. Fixes: 9c3f94e1681b ("mptcp: add missing memory scheduling in the rx path") Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Link: https://lore.kernel.org/r/37af798bd46f402fb7c79f57ebbdd00614f5d7fa.1604861097.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 16eb0eb835c77c5e8824b8aa90b11b00ddc5c122 Author: Jonathan Neuschäfer Date: Sat Nov 7 23:08:21 2020 +0100 docs: networking: phy: s/2.5 times faster/2.5 times as fast/ 2.5 times faster would be 3.5 Gbps (4.375 Gbaud after 8b/10b encoding). Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20201107220822.1291215-1-j.neuschaefer@gmx.net Signed-off-by: Jakub Kicinski commit 413691384a37fe27f43460226c4160e33140e638 Author: Alexander Lobakin Date: Sun Nov 8 00:46:15 2020 +0000 ethtool: netlink: add missing netdev_features_change() call After updating userspace Ethtool from 5.7 to 5.9, I noticed that NETDEV_FEAT_CHANGE is no more raised when changing netdev features through Ethtool. That's because the old Ethtool ioctl interface always calls netdev_features_change() at the end of user request processing to inform the kernel that our netdevice has some features changed, but the new Netlink interface does not. Instead, it just notifies itself with ETHTOOL_MSG_FEATURES_NTF. Replace this ethtool_notify() call with netdev_features_change(), so the kernel will be aware of any features changes, just like in case with the ioctl interface. This does not omit Ethtool notifications, as Ethtool itself listens to NETDEV_FEAT_CHANGE and drops ETHTOOL_MSG_FEATURES_NTF on it (net/ethtool/netlink.c:ethnl_netdev_event()). From v1 [1]: - dropped extra new line as advised by Jakub; - no functional changes. [1] https://lore.kernel.org/netdev/AlZXQ2o5uuTVHCfNGOiGgJ8vJ3KgO5YIWAnQjH0cDE@cp3-web-009.plabs.ch Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request") Signed-off-by: Alexander Lobakin Reviewed-by: Michal Kubecek Link: https://lore.kernel.org/r/ahA2YWXYICz5rbUSQqNG4roJ8OlJzzYQX7PTiG80@cp4-web-028.plabs.ch Signed-off-by: Jakub Kicinski commit 77a2d673d5c9d1d359b5652ff75043273c5dea28 Author: Stefano Brivio Date: Fri Nov 6 17:59:52 2020 +0100 tunnels: Fix off-by-one in lower MTU bounds for ICMP/ICMPv6 replies Jianlin reports that a bridged IPv6 VXLAN endpoint, carrying IPv6 packets over a link with a PMTU estimation of exactly 1350 bytes, won't trigger ICMPv6 Packet Too Big replies when the encapsulated datagrams exceed said PMTU value. VXLAN over IPv6 adds 70 bytes of overhead, so an ICMPv6 reply indicating 1280 bytes as inner MTU would be legitimate and expected. This comes from an off-by-one error I introduced in checks added as part of commit 4cb47a8644cc ("tunnels: PMTU discovery support for directly bridged IP packets"), whose purpose was to prevent sending ICMPv6 Packet Too Big messages with an MTU lower than the smallest permissible IPv6 link MTU, i.e. 1280 bytes. In iptunnel_pmtud_check_icmpv6(), avoid triggering a reply only if the advertised MTU would be less than, and not equal to, 1280 bytes. Also fix the analogous comparison for IPv4, that is, skip the ICMP reply only if the resulting MTU is strictly less than 576 bytes. This becomes apparent while running the net/pmtu.sh bridged VXLAN or GENEVE selftests with adjusted lower-link MTU values. Using e.g. GENEVE, setting ll_mtu to the values reported below, in the test_pmtu_ipvX_over_bridged_vxlanY_or_geneveY_exception() test function, we can see failures on the following tests: test | ll_mtu -------------------------------|-------- pmtu_ipv4_br_geneve4_exception | 626 pmtu_ipv6_br_geneve4_exception | 1330 pmtu_ipv6_br_geneve6_exception | 1350 owing to the different tunneling overheads implied by the corresponding configurations. Reported-by: Jianlin Shi Fixes: 4cb47a8644cc ("tunnels: PMTU discovery support for directly bridged IP packets") Signed-off-by: Stefano Brivio Link: https://lore.kernel.org/r/4f5fc2f33bfdf8409549fafd4f952b008bf04d63.1604681709.git.sbrivio@redhat.com Signed-off-by: Jakub Kicinski commit 8ef9ba4d666614497a057d09b0a6eafc1e34eadf Author: Oliver Herms Date: Tue Nov 3 11:41:33 2020 +0100 IPv6: Set SIT tunnel hard_header_len to zero Due to the legacy usage of hard_header_len for SIT tunnels while already using infrastructure from net/ipv4/ip_tunnel.c the calculation of the path MTU in tnl_update_pmtu is incorrect. This leads to unnecessary creation of MTU exceptions for any flow going over a SIT tunnel. As SIT tunnels do not have a header themsevles other than their transport (L3, L2) headers we're leaving hard_header_len set to zero as tnl_update_pmtu is already taking care of the transport headers sizes. This will also help avoiding unnecessary IPv6 GC runs and spinlock contention seen when using SIT tunnels and for more than net.ipv6.route.gc_thresh flows. Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.") Signed-off-by: Oliver Herms Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/20201103104133.GA1573211@tws Signed-off-by: Jakub Kicinski commit 407ab579637ced6dc32cfb2295afb7259cca4b22 Merge: 3552c3709c0e7 6d6a18fdde8b8 Author: Linus Torvalds Date: Mon Nov 9 13:58:10 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - fix compilation error when PMD and PUD are folded - fix regression in reads-as-zero behaviour of ID_AA64ZFR0_EL1 - add aarch64 get-reg-list test x86: - fix semantic conflict between two series merged for 5.10 - fix (and test) enforcement of paravirtual cpuid features selftests: - various cleanups to memory management selftests - new selftests testcase for performance of dirty logging" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (30 commits) KVM: selftests: allow two iterations of dirty_log_perf_test KVM: selftests: Introduce the dirty log perf test KVM: selftests: Make the number of vcpus global KVM: selftests: Make the per vcpu memory size global KVM: selftests: Drop pointless vm_create wrapper KVM: selftests: Add wrfract to common guest code KVM: selftests: Simplify demand_paging_test with timespec_diff_now KVM: selftests: Remove address rounding in guest code KVM: selftests: Factor code out of demand_paging_test KVM: selftests: Use a single binary for dirty/clear log test KVM: selftests: Always clear dirty bitmap after iteration KVM: selftests: Add blessed SVE registers to get-reg-list KVM: selftests: Add aarch64 get-reg-list test selftests: kvm: test enforcement of paravirtual cpuid features selftests: kvm: Add exception handling to selftests selftests: kvm: Clear uc so UCALL_NONE is being properly reported selftests: kvm: Fix the segment descriptor layout to match the actual layout KVM: x86: handle MSR_IA32_DEBUGCTLMSR with report_ignored_msrs kvm: x86: request masterclock update any time guest uses different msr kvm: x86: ensure pv_cpuid.features is initialized when enabling cap ... commit abbaa433de07076fb8ef524b77ce55d94bad5fc5 Author: Wang Qing Date: Sat Nov 7 15:45:44 2020 +0800 bpf: Fix passing zero to PTR_ERR() in bpf_btf_printf_prepare There is a bug when passing zero to PTR_ERR() and return. Fix the smatch error. Fixes: c4d0bfb45068 ("bpf: Add bpf_snprintf_btf helper") Signed-off-by: Wang Qing Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/1604735144-686-1-git-send-email-wangqing@vivo.com commit 197afc631413d96dc60acfc7970bdd4125d38cd3 Author: Andrii Nakryiko Date: Fri Nov 6 16:02:51 2020 -0800 libbpf: Don't attempt to load unused subprog as an entry-point BPF program If BPF code contains unused BPF subprogram and there are no other subprogram calls (which can realistically happen in real-world applications given sufficiently smart Clang code optimizations), libbpf will erroneously assume that subprograms are entry-point programs and will attempt to load them with UNSPEC program type. Fix by not relying on subcall instructions and rather detect it based on the structure of BPF object's sections. Fixes: 9a94f277c4fb ("tools: libbpf: restore the ability to load programs from .text section") Reported-by: Dmitrii Banshchikov Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201107000251.256821-1-andrii@kernel.org commit 3552c3709c0e78144c11748718180441ac647ece Merge: 91808cd6c2435 ae2975046dbc6 Author: Linus Torvalds Date: Mon Nov 9 12:43:12 2020 -0800 Merge tag 'nfsd-5.10-1' of git://linux-nfs.org/~bfields/linux Pull nfsd fixes from Bruce Fields: "This is mainly server-to-server copy and fallout from Chuck's 5.10 rpc refactoring" * tag 'nfsd-5.10-1' of git://linux-nfs.org/~bfields/linux: net/sunrpc: fix useless comparison in proc_do_xprt() net/sunrpc: return 0 on attempt to write to "transports" NFSD: fix missing refcount in nfsd4_copy by nfsd4_do_async_copy NFSD: Fix use-after-free warning when doing inter-server copy NFSD: MKNOD should return NFSERR_BADTYPE instead of NFSERR_INVAL SUNRPC: Fix general protection fault in trace_rpc_xdr_overflow() NFSD: NFSv3 PATHCONF Reply is improperly formed commit 91808cd6c24359eee0c1eb7a06ea02dac358cbb5 Merge: df3319a548cdb 05d5233df85e9 Author: Linus Torvalds Date: Mon Nov 9 12:36:58 2020 -0800 Merge tag 'ext4_for_linus_cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes and cleanups from Ted Ts'o: "More fixes and cleanups for the new fast_commit features, but also a few other miscellaneous bug fixes and a cleanup for the MAINTAINERS file" * tag 'ext4_for_linus_cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (28 commits) jbd2: fix up sparse warnings in checkpoint code ext4: fix sparse warnings in fast_commit code ext4: cleanup fast commit mount options jbd2: don't start fast commit on aborted journal ext4: make s_mount_flags modifications atomic ext4: issue fsdev cache flush before starting fast commit ext4: disable fast commit with data journalling ext4: fix inode dirty check in case of fast commits ext4: remove unnecessary fast commit calls from ext4_file_mmap ext4: mark buf dirty before submitting fast commit buffer ext4: fix code documentatioon ext4: dedpulicate the code to wait on inode that's being committed jbd2: don't read journal->j_commit_sequence without taking a lock jbd2: don't touch buffer state until it is filled jbd2: add todo for a fast commit performance optimization jbd2: don't pass tid to jbd2_fc_end_commit_fallback() jbd2: don't use state lock during commit path jbd2: drop jbd2_fc_init documentation ext4: clean up the JBD2 API that initializes fast commits jbd2: rename j_maxlen to j_total_len and add jbd2_journal_max_txn_bufs ... commit df3319a548cdb3f3bcbaf03bbd02822e39a136c6 Merge: f8394f232b1ea a30573b3cdc77 Author: Linus Torvalds Date: Mon Nov 9 12:23:01 2020 -0800 Merge tag 'erofs-for-5.10-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: "A week ago, Vladimir reported an issue that the kernel log would become polluted if the page allocation debug option is enabled. I also found this when I cleaned up magical page->mapping and originally planned to submit these all for 5.11 but it seems the impact can be noticed so submit the fix in advance. In addition, nl6720 also reported that atime is empty although EROFS has the only one on-disk timestamp as a practical consideration for now but it's better to derive it as what we did for the other timestamps. Summary: - fix setting up pcluster improperly for temporary pages - derive atime instead of leaving it empty" * tag 'erofs-for-5.10-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: fix setting up pcluster for temporary pages erofs: derive atime instead of leaving it empty commit 7daaa06357bf7f1874b62bb1ea9d66a51d4e567e Author: Hans de Goede Date: Sat Nov 7 14:32:54 2020 +0100 ACPI: button: Add DMI quirk for Medion Akoya E2228T The Medion Akoya E2228T's ACPI _LID implementation is quite broken, it has the same issues as the one from the Medion Akoya E2215T: 1. For notifications it uses an ActiveLow Edge GpioInt, rather then an ActiveBoth one, meaning that the device is only notified when the lid is closed, not when it is opened. 2. Matching with this its _LID method simply always returns 0 (closed) In order for the Linux LID code to work properly with this implementation, the lid_init_state selection needs to be set to ACPI_BUTTON_LID_INIT_OPEN, add a DMI quirk for this. While working on this I also found out that the MD60### part of the model number differs per country/batch while all of the E2215T and E2228T models have this issue, so also remove the " MD60198" part from the E2215T quirk. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 9debfb81e7654fe7388a49f45bc4d789b94c1103 Author: Nick Desaulniers Date: Sat Nov 7 00:49:39 2020 -0800 ACPI: GED: fix -Wformat Clang is more aggressive about -Wformat warnings when the format flag specifies a type smaller than the parameter. It turns out that gsi is an int. Fixes: drivers/acpi/evged.c:105:48: warning: format specifies type 'unsigned char' but the argument has type 'unsigned int' [-Wformat] trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi); ^~~ Link: https://github.com/ClangBuiltLinux/linux/issues/378 Fixes: ea6f3af4c5e6 ("ACPI: GED: add support for _Exx / _Lxx handler methods") Acked-by: Ard Biesheuvel Signed-off-by: Nick Desaulniers Signed-off-by: Rafael J. Wysocki commit c6237b210ddc4f026a368172e957cbd3d5b5c78a Author: Maximilian Luz Date: Thu Nov 5 03:06:00 2020 +0100 ACPI: Fix whitespace inconsistencies Replaces spaces with tabs where spaces have been (inconsistently) used for indentation and removes trailing whitespaces. Signed-off-by: Maximilian Luz Signed-off-by: Rafael J. Wysocki commit c1e9735975c05d36ca97e9d39e9b06c3e0b3b0d7 Author: John Garry Date: Mon Nov 2 19:19:31 2020 +0800 ACPI: scan: Fix acpi_dma_configure_id() kerneldoc name For some reason building with W=1 doesn't pick up on this, but the kerneldoc name for acpi_dma_configure_id() is not right, so fix it up. Signed-off-by: John Garry Acked-by: Lorenzo Pieralisi Signed-off-by: Rafael J. Wysocki commit 8b31e972f9872e5a6a3348506b5b84353fecef58 Author: Andy Shevchenko Date: Thu Oct 29 21:32:43 2020 +0200 Documentation: firmware-guide: gpio-properties: Clarify initial output state GpioIo() doesn't provide an explicit state for an output pin. Linux tries to be smart and uses a common sense based on other parameters. Document how it looks like in the code. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit 0d6c41cf801fd56b92f4359374667061d27a6472 Author: Andy Shevchenko Date: Thu Oct 29 21:32:42 2020 +0200 Documentation: firmware-guide: gpio-properties: active_low only for GpioIo() It appears that people may misinterpret active_low field in _DSD for GpioInt() resource. Add a paragraph to clarify this. Reported-by: Ricardo Ribalda Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Reviewed-by: Ricardo Ribalda Signed-off-by: Rafael J. Wysocki commit 1bd3387979bff49cb3115c497895d78ffd5092e3 Author: Andy Shevchenko Date: Thu Oct 29 21:32:41 2020 +0200 Documentation: firmware-guide: gpio-properties: Fix factual mistakes Fix factual mistakes and style issues in GPIO properties document. This converts IoRestriction from InputOnly to OutputOnly as pins in the example are used as outputs. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 092561f06702dd4fdd7fb74dd3a838f1818529b7 Author: Shin'ichiro Kawasaki Date: Mon Nov 2 21:28:19 2020 +0900 uio: Fix use-after-free in uio_unregister_device() Commit 8fd0e2a6df26 ("uio: free uio id after uio file node is freed") triggered KASAN use-after-free failure at deletion of TCM-user backstores [1]. In uio_unregister_device(), struct uio_device *idev is passed to uio_free_minor() to refer idev->minor. However, before uio_free_minor() call, idev is already freed by uio_device_release() during call to device_unregister(). To avoid reference to idev->minor after idev free, keep idev->minor value in a local variable. Also modify uio_free_minor() argument to receive the value. [1] BUG: KASAN: use-after-free in uio_unregister_device+0x166/0x190 Read of size 4 at addr ffff888105196508 by task targetcli/49158 CPU: 3 PID: 49158 Comm: targetcli Not tainted 5.10.0-rc1 #1 Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015 Call Trace: dump_stack+0xae/0xe5 ? uio_unregister_device+0x166/0x190 print_address_description.constprop.0+0x1c/0x210 ? uio_unregister_device+0x166/0x190 ? uio_unregister_device+0x166/0x190 kasan_report.cold+0x37/0x7c ? kobject_put+0x80/0x410 ? uio_unregister_device+0x166/0x190 uio_unregister_device+0x166/0x190 tcmu_destroy_device+0x1c4/0x280 [target_core_user] ? tcmu_release+0x90/0x90 [target_core_user] ? __mutex_unlock_slowpath+0xd6/0x5d0 target_free_device+0xf3/0x2e0 [target_core_mod] config_item_cleanup+0xea/0x210 configfs_rmdir+0x651/0x860 ? detach_groups.isra.0+0x380/0x380 vfs_rmdir.part.0+0xec/0x3a0 ? __lookup_hash+0x20/0x150 do_rmdir+0x252/0x320 ? do_file_open_root+0x420/0x420 ? strncpy_from_user+0xbc/0x2f0 ? getname_flags.part.0+0x8e/0x450 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f9e2bfc91fb Code: 73 01 c3 48 8b 0d 9d ec 0c 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 54 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 6d ec 0c 00 f7 d8 64 89 01 48 RSP: 002b:00007ffdd2baafe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000054 RAX: ffffffffffffffda RBX: 00007f9e2beb44a0 RCX: 00007f9e2bfc91fb RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007f9e1c20be90 RBP: 00007ffdd2bab000 R08: 0000000000000000 R09: 00007f9e2bdf2440 R10: 00007ffdd2baaf37 R11: 0000000000000246 R12: 00000000ffffff9c R13: 000055f9abb7e390 R14: 000055f9abcf9558 R15: 00007f9e2be7a780 Allocated by task 34735: kasan_save_stack+0x1b/0x40 __kasan_kmalloc.constprop.0+0xc2/0xd0 __uio_register_device+0xeb/0xd40 tcmu_configure_device+0x5a0/0xbc0 [target_core_user] target_configure_device+0x12f/0x760 [target_core_mod] target_dev_enable_store+0x32/0x50 [target_core_mod] configfs_write_file+0x2bb/0x450 vfs_write+0x1ce/0x610 ksys_write+0xe9/0x1b0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 49158: kasan_save_stack+0x1b/0x40 kasan_set_track+0x1c/0x30 kasan_set_free_info+0x1b/0x30 __kasan_slab_free+0x110/0x150 slab_free_freelist_hook+0x5a/0x170 kfree+0xc6/0x560 device_release+0x9b/0x210 kobject_put+0x13e/0x410 uio_unregister_device+0xf9/0x190 tcmu_destroy_device+0x1c4/0x280 [target_core_user] target_free_device+0xf3/0x2e0 [target_core_mod] config_item_cleanup+0xea/0x210 configfs_rmdir+0x651/0x860 vfs_rmdir.part.0+0xec/0x3a0 do_rmdir+0x252/0x320 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888105196000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1288 bytes inside of 2048-byte region [ffff888105196000, ffff888105196800) The buggy address belongs to the page: page:0000000098e6ca81 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105190 head:0000000098e6ca81 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x17ffffc0010200(slab|head) raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff888100043040 raw: 0000000000000000 0000000000080008 00000001ffffffff ffff88810eb55c01 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88810eb55c01 Memory state around the buggy address: ffff888105196400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888105196480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888105196500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888105196580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888105196600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 8fd0e2a6df26 ("uio: free uio id after uio file node is freed") Cc: stable Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20201102122819.2346270-1-shinichiro.kawasaki@wdc.com Signed-off-by: Greg Kroah-Hartman commit f3217d6f2f7a76b36a3326ad58c8897f4d5fbe31 Author: Arnd Bergmann Date: Mon Oct 26 16:54:36 2020 +0100 firmware: xilinx: fix out-of-bounds access The zynqmp_pm_set_suspend_mode() and zynqmp_pm_get_trustzone_version() functions pass values as api_id into zynqmp_pm_invoke_fn that are beyond PM_API_MAX, resulting in an out-of-bounds access: drivers/firmware/xilinx/zynqmp.c: In function 'zynqmp_pm_set_suspend_mode': drivers/firmware/xilinx/zynqmp.c:150:24: warning: array subscript 2562 is above array bounds of 'u32[64]' {aka 'unsigned int[64]'} [-Warray-bounds] 150 | if (zynqmp_pm_features[api_id] != PM_FEATURE_UNCHECKED) | ~~~~~~~~~~~~~~~~~~^~~~~~~~ drivers/firmware/xilinx/zynqmp.c:28:12: note: while referencing 'zynqmp_pm_features' 28 | static u32 zynqmp_pm_features[PM_API_MAX]; | ^~~~~~~~~~~~~~~~~~ Replace the resulting undefined behavior with an error return. This may break some things that happen to work at the moment but seems better than randomly overwriting kernel data. I assume we need additional fixes for the two functions that now return an error. Fixes: 76582671eb5d ("firmware: xilinx: Add Zynqmp firmware driver") Fixes: e178df31cf41 ("firmware: xilinx: Implement ZynqMP power management APIs") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201026155449.3703142-1-arnd@kernel.org Cc: stable Signed-off-by: Greg Kroah-Hartman commit d9109fe0f30a1fba66b8623837fc3d3c1a031090 Author: Andra Paraschiv Date: Mon Nov 2 19:36:22 2020 +0200 nitro_enclaves: Fixup type and simplify logic of the poll mask setup Update the assigned value of the poll result to be EPOLLHUP instead of POLLHUP to match the __poll_t type. While at it, simplify the logic of setting the mask result of the poll function. Reported-by: kernel test robot Reviewed-by: Alexander Graf Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20201102173622.32169-1-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 3ed1cfb2cee4355ddef49489897bfe474daeeaec Author: Samuel Thibault Date: Sun Nov 8 14:12:33 2020 +0100 speakup ttyio: Do not schedule() in ttyio_in_nowait With the ltlk and spkout drivers, the index read function, i.e. in_nowait, is getting called from the read_all_doc mechanism, from the timer softirq: Call Trace: dump_stack+0x71/0x98 dequeue_task_idle+0x1f/0x28 __schedule+0x167/0x5d6 ? trace_hardirqs_on+0x2e/0x3a ? usleep_range+0x7f/0x7f schedule+0x8a/0xae schedule_timeout+0xb1/0xea ? del_timer_sync+0x31/0x31 do_wait_for_common+0xba/0x12b ? wake_up_q+0x45/0x45 wait_for_common+0x37/0x50 ttyio_in+0x2a/0x6b spk_ttyio_in_nowait+0xc/0x13 spk_get_index_count+0x20/0x93 cursor_done+0x1c6/0x4c6 ? read_all_doc+0xb1/0xb1 call_timer_fn+0x89/0x140 run_timer_softirq+0x164/0x1a5 ? read_all_doc+0xb1/0xb1 ? hrtimer_forward+0x7b/0x87 ? timerqueue_add+0x62/0x68 ? enqueue_hrtimer+0x95/0x9f __do_softirq+0x181/0x31f irq_exit+0x6a/0x86 smp_apic_timer_interrupt+0x15e/0x183 apic_timer_interrupt+0xf/0x20 We thus should not schedule() at all, even with timeout == 0, this crashes the kernel. We can however use try_wait_for_completion() instead of wait_for_completion_timeout(0). Cc: stable@vger.kernel.org Reported-by: John Covici Tested-by: John Covici Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20201108131233.tadycr73sxlvodgo@function Signed-off-by: Greg Kroah-Hartman commit 640969a69ca4dd2ac025fe873c6bf25eba8f11b3 Author: Samuel Thibault Date: Sun Nov 8 00:33:10 2020 +0100 speakup: Fix clearing selection in safe context speakup_cut() calls speakup_clear_selection() which calls console_lock. Problem is: speakup_cut() is called from a keyboard interrupt context. This would hang if speakup_cut is pressed while the console lock is unfortunately already held. We can however as well just defer calling clear_selection() until the already-deferred set_selection_kernel() call. This was spotted by the lock hardener: Possible unsafe locking scenario:\x0a CPU0 ---- lock(console_lock); lock(console_lock); \x0a *** DEADLOCK ***\x0a [...] Call Trace: dump_stack+0xc2/0x11a print_usage_bug.cold+0x3e0/0x4b1 mark_lock+0xd95/0x1390 ? print_irq_inversion_bug+0xa0/0xa0 __lock_acquire+0x21eb/0x5730 ? __kasan_check_read+0x11/0x20 ? check_chain_key+0x215/0x5e0 ? register_lock_class+0x1580/0x1580 ? lock_downgrade+0x7a0/0x7a0 ? __rwlock_init+0x140/0x140 lock_acquire+0x13f/0x370 ? speakup_clear_selection+0xe/0x20 [speakup] console_lock+0x33/0x50 ? speakup_clear_selection+0xe/0x20 [speakup] speakup_clear_selection+0xe/0x20 [speakup] speakup_cut+0x19e/0x4b0 [speakup] keyboard_notifier_call+0x1f04/0x4a40 [speakup] ? read_all_doc+0x240/0x240 [speakup] notifier_call_chain+0xbf/0x130 __atomic_notifier_call_chain+0x80/0x130 atomic_notifier_call_chain+0x16/0x20 kbd_event+0x7d7/0x3b20 ? k_pad+0x850/0x850 ? sysrq_filter+0x450/0xd40 input_to_handler+0x362/0x4b0 ? rcu_read_lock_sched_held+0xe0/0xe0 input_pass_values+0x408/0x5a0 ? __rwlock_init+0x140/0x140 ? lock_acquire+0x13f/0x370 input_handle_event+0x70e/0x1380 input_event+0x67/0x90 atkbd_interrupt+0xe62/0x1d4e [atkbd] ? __kasan_check_write+0x14/0x20 ? atkbd_event_work+0x130/0x130 [atkbd] ? _raw_spin_lock_irqsave+0x26/0x70 serio_interrupt+0x93/0x120 [serio] i8042_interrupt+0x232/0x510 [i8042] ? rcu_read_lock_bh_held+0xd0/0xd0 ? handle_irq_event+0xa5/0x13a ? i8042_remove+0x1f0/0x1f0 [i8042] __handle_irq_event_percpu+0xe6/0x6c0 handle_irq_event_percpu+0x71/0x150 ? __handle_irq_event_percpu+0x6c0/0x6c0 ? __kasan_check_read+0x11/0x20 ? do_raw_spin_unlock+0x5c/0x240 handle_irq_event+0xad/0x13a handle_edge_irq+0x233/0xa90 do_IRQ+0x10b/0x310 common_interrupt+0xf/0xf Cc: stable@vger.kernel.org Reported-by: Jookia Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20201107233310.7iisvaozpiqj3yvy@function Signed-off-by: Greg Kroah-Hartman commit d7012df3c9aecdcfb50f7a2ebad766952fd1410e Author: Samuel Thibault Date: Mon Oct 12 18:06:46 2020 +0200 speakup: Fix var_id_t values and thus keymap commit d97a9d7aea04 ("staging/speakup: Add inflection synth parameter") introduced a new "inflection" speakup parameter next to "pitch", but the values of the var_id_t enum are actually used by the keymap tables so we must not renumber them. The effect was that notably the volume control shortcut (speakup-1 or 2) was actually changing the inflection. This moves the INFLECTION value at the end of the var_id_t enum to fix back the enum values. This also adds a warning about it. Fixes: d97a9d7aea04 ("staging/speakup: Add inflection synth parameter") Cc: stable@vger.kernel.org Reported-by: Kirk Reiser Reported-by: Gregory Nowak Tested-by: Gregory Nowak Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20201012160646.qmdo4eqtj24hpch4@function Signed-off-by: Greg Kroah-Hartman commit cadbaa039b99a6d5c26ce1c7f2fc0325943e605a Author: Stephane Eranian Date: Wed Oct 28 12:42:47 2020 -0700 perf/x86/intel: Make anythread filter support conditional Starting with Arch Perfmon v5, the anythread filter on generic counters may be deprecated. The current kernel was exporting the any filter without checking. On Icelake, it means you could do cpu/event=0x3c,any/ even though the filter does not exist. This patch corrects the problem by relying on the CPUID 0xa leaf function to determine if anythread is supported or not as described in the Intel SDM Vol3b 18.2.5.1 AnyThread Deprecation section. Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201028194247.3160610-1-eranian@google.com commit 1908dc911792067287458fdb0800f036f4f4e0f6 Author: Peter Zijlstra Date: Thu Oct 29 16:32:22 2020 +0100 perf: Tweak perf_event_attr::exclusive semantics Currently perf_event_attr::exclusive can be used to ensure an event(group) is the sole group scheduled on the PMU. One consequence is that when you have a pinned event (say the watchdog) you can no longer have regular exclusive event(group)s. Inspired by the fact that !pinned events are considered less strict, allow !pinned,exclusive events to share the PMU with pinned,!exclusive events. Pinned,exclusive is still fully exclusive. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201029162902.105962225@infradead.org commit 2714c3962f304d031d5016c963c4b459337b0749 Author: Peter Zijlstra Date: Thu Oct 29 16:29:53 2020 +0100 perf: Fix event multiplexing for exclusive groups Commit 9e6302056f80 ("perf: Use hrtimers for event multiplexing") placed the hrtimer (re)start call in the wrong place. Instead of capturing all scheduling failures, it only considered the PMU failure. The result is that groups using perf_event_attr::exclusive are no longer rotated. Fixes: 9e6302056f80 ("perf: Use hrtimers for event multiplexing") Reported-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201029162902.038667689@infradead.org commit 251ff2d49347793d348babcff745289b11910e96 Author: Peter Zijlstra Date: Thu Oct 29 16:29:15 2020 +0100 perf: Simplify group_sched_in() Collate the error paths. Code duplication only leads to divergence and extra bugs. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201029162901.972161394@infradead.org commit 8c7855d82933bab7fa5e96f0e568fc125c2e1ab4 Author: Peter Zijlstra Date: Thu Oct 29 16:28:25 2020 +0100 perf: Simplify group_sched_out() Since event_sched_out() clears cpuctx->exclusive upon removal of an exclusive event (and only group leaders can be exclusive), there is no point in group_sched_out() trying to do it too. It is impossible for cpuctx->exclusive to still be set here. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201029162901.904060564@infradead.org commit e506d1dac0edb2df82f2aa0582e814f9cd9aa07d Author: Peter Zijlstra Date: Fri Oct 30 12:15:06 2020 +0100 perf/x86: Make dummy_iregs static Having pt_regs on-stack is unfortunate, it's 168 bytes. Since it isn't actually used, make it a static variable. This both gets if off the stack and ensures it gets 0 initialized, just in case someone does look at it. Reported-by: Steven Rostedt Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201030151955.324273677@infradead.org commit 76a4efa80900fc40e0fdf243b42aec9fb8c35d24 Author: Peter Zijlstra Date: Fri Oct 30 12:14:21 2020 +0100 perf/arch: Remove perf_sample_data::regs_user_copy struct perf_sample_data lives on-stack, we should be careful about it's size. Furthermore, the pt_regs copy in there is only because x86_64 is a trainwreck, solve it differently. Reported-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Tested-by: Steven Rostedt Link: https://lkml.kernel.org/r/20201030151955.258178461@infradead.org commit 09da9c81253dd8e43e0d2d7cea02de6f9f19499d Author: Peter Zijlstra Date: Fri Oct 30 13:43:16 2020 +0100 perf: Optimize get_recursion_context() "Look ma, no branches!" Signed-off-by: Peter Zijlstra (Intel) Acked-by: Jesper Dangaard Brouer Link: https://lkml.kernel.org/r/20201030151955.187580298@infradead.org commit ce0f17fc93f63ee91428af10b7b2ddef38cd19e5 Author: Peter Zijlstra Date: Fri Oct 30 12:49:45 2020 +0100 perf: Fix get_recursion_context() One should use in_serving_softirq() to detect SoftIRQ context. Fixes: 96f6d4444302 ("perf_counter: avoid recursion") Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201030151955.120572175@infradead.org commit 9dfa9a5c9bae3417b87824e7ac73b00c10b6a874 Author: Peter Zijlstra Date: Fri Oct 30 14:58:48 2020 +0100 perf/x86: Reduce stack usage for x86_pmu::drain_pebs() intel_pmu_drain_pebs_*() is typically called from handle_pmi_common(), both have an on-stack struct perf_sample_data, which is *big*. Rewire things so that drain_pebs() can use the one handle_pmi_common() has. Reported-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201030151955.054099690@infradead.org commit 267fb27352b6fc9fdbad753127a239f75618ecbc Author: Peter Zijlstra Date: Fri Oct 30 15:50:32 2020 +0100 perf: Reduce stack usage of perf_output_begin() __perf_output_begin() has an on-stack struct perf_sample_data in the unlikely case it needs to generate a LOST record. However, every call to perf_output_begin() must already have a perf_sample_data on-stack. Reported-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201030151954.985416146@infradead.org commit 9d516aa82b7d4fbe7f6303348697960ba03a530b Author: Alexander Lobakin Date: Wed Nov 4 15:31:36 2020 +0000 virtio: virtio_console: fix DMA memory allocation for rproc serial Since commit 086d08725d34 ("remoteproc: create vdev subdevice with specific dma memory pool"), every remoteproc has a DMA subdevice ("remoteprocX#vdevYbuffer") for each virtio device, which inherits DMA capabilities from the corresponding platform device. This allowed to associate different DMA pools with each vdev, and required from virtio drivers to perform DMA operations with the parent device (vdev->dev.parent) instead of grandparent (vdev->dev.parent->parent). virtio_rpmsg_bus was already changed in the same merge cycle with commit d999b622fcfb ("rpmsg: virtio: allocate buffer from parent"), but virtio_console did not. In fact, operations using the grandparent worked fine while the grandparent was the platform device, but since commit c774ad010873 ("remoteproc: Fix and restore the parenting hierarchy for vdev") this was changed, and now the grandparent device is the remoteproc device without any DMA capabilities. So, starting v5.8-rc1 the following warning is observed: [ 2.483925] ------------[ cut here ]------------ [ 2.489148] WARNING: CPU: 3 PID: 101 at kernel/dma/mapping.c:427 0x80e7eee8 [ 2.489152] Modules linked in: virtio_console(+) [ 2.503737] virtio_rpmsg_bus rpmsg_core [ 2.508903] [ 2.528898] [ 2.913043] [ 2.914907] ---[ end trace 93ac8746beab612c ]--- [ 2.920102] virtio-ports vport1p0: Error allocating inbufs kernel/dma/mapping.c:427 is: WARN_ON_ONCE(!dev->coherent_dma_mask); obviously because the grandparent now is remoteproc dev without any DMA caps: [ 3.104943] Parent: remoteproc0#vdev1buffer, grandparent: remoteproc0 Fix this the same way as it was for virtio_rpmsg_bus, using just the parent device (vdev->dev.parent, "remoteprocX#vdevYbuffer") for DMA operations. This also allows now to reserve DMA pools/buffers for rproc serial via Device Tree. Fixes: c774ad010873 ("remoteproc: Fix and restore the parenting hierarchy for vdev") Cc: stable@vger.kernel.org # 5.1+ Reviewed-by: Mathieu Poirier Acked-by: Jason Wang Signed-off-by: Alexander Lobakin Date: Thu, 5 Nov 2020 11:10:24 +0800 Link: https://lore.kernel.org/r/AOKowLclCbOCKxyiJ71WeNyuAAj2q8EUtxrXbyky5E@cp7-web-042.plabs.ch Signed-off-by: Greg Kroah-Hartman commit 65c5a055b0d567b7e7639d942c0605da9cc54c5e Author: Sagi Grimberg Date: Mon Nov 9 02:57:34 2020 -0800 nvme: fix incorrect behavior when BLKROSET is called by the user The offending commit breaks BLKROSET ioctl because a device revalidation will blindly override BLKROSET setting. Hence, we remove the disk rw setting in case NVME_NS_ATTR_RO is cleared from by the controller. Fixes: 1293477f4f32 ("nvme: set gendisk read only based on nsattr") Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 6d6a18fdde8b86b919b740ad629153de432d12a8 Author: Paolo Bonzini Date: Mon Nov 9 09:45:17 2020 -0500 KVM: selftests: allow two iterations of dirty_log_perf_test Even though one iteration is not enough for the dirty log performance test (due to the cost of building page tables, zeroing memory etc.) two is okay and it is the default. Without this patch, "./dirty_log_perf_test" without any further arguments fails. Cc: Ben Gardon Signed-off-by: Paolo Bonzini commit 06ad8d339524bf94b89859047822c31df6ace239 Author: Thomas Zimmermann Date: Thu Nov 5 20:02:56 2020 +0100 drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[] The gma500 driver expects 3 pipelines in several it's IRQ functions. Accessing struct drm_device.vblank[], this fails with devices that only have 2 pipelines. An example KASAN report is shown below. [ 62.267688] ================================================================== [ 62.268856] BUG: KASAN: slab-out-of-bounds in psb_irq_postinstall+0x250/0x3c0 [gma500_gfx] [ 62.269450] Read of size 1 at addr ffff8880012bc6d0 by task systemd-udevd/285 [ 62.269949] [ 62.270192] CPU: 0 PID: 285 Comm: systemd-udevd Tainted: G E 5.10.0-rc1-1-default+ #572 [ 62.270807] Hardware name: /DN2800MT, BIOS MTCDT10N.86A.0164.2012.1213.1024 12/13/2012 [ 62.271366] Call Trace: [ 62.271705] dump_stack+0xae/0xe5 [ 62.272180] print_address_description.constprop.0+0x17/0xf0 [ 62.272987] ? psb_irq_postinstall+0x250/0x3c0 [gma500_gfx] [ 62.273474] __kasan_report.cold+0x20/0x38 [ 62.273989] ? psb_irq_postinstall+0x250/0x3c0 [gma500_gfx] [ 62.274460] kasan_report+0x3a/0x50 [ 62.274891] psb_irq_postinstall+0x250/0x3c0 [gma500_gfx] [ 62.275380] drm_irq_install+0x131/0x1f0 <...> [ 62.300751] Allocated by task 285: [ 62.301223] kasan_save_stack+0x1b/0x40 [ 62.301731] __kasan_kmalloc.constprop.0+0xbf/0xd0 [ 62.302293] drmm_kmalloc+0x55/0x100 [ 62.302773] drm_vblank_init+0x77/0x210 Resolve the issue by only handling vblank entries up to the number of CRTCs. I'm adding a Fixes tag for reference, although the bug has been present since the driver's initial commit. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Fixes: 5c49fd3aa0ab ("gma500: Add the core DRM files and headers") Cc: Alan Cox Cc: Dave Airlie Cc: Patrik Jakobsson Cc: dri-devel@lists.freedesktop.org Cc: stable@vger.kernel.org#v3.3+ Link: https://patchwork.freedesktop.org/patch/msgid/20201105190256.3893-1-tzimmermann@suse.de commit 7372e79c9eb9d7034e498721eb2861ae4fdbc618 Author: Amir Goldstein Date: Sun Nov 8 12:59:06 2020 +0200 fanotify: fix logic of reporting name info with watched parent The victim inode's parent and name info is required when an event needs to be delivered to a group interested in filename info OR when the inode's parent is interested in an event on its children. Let us call the first condition 'parent_needed' and the second condition 'parent_interested'. In fsnotify_parent(), the condition where the inode's parent is interested in some events on its children, but not necessarily interested the specific event is called 'parent_watched'. fsnotify_parent() tests the condition (!parent_watched && !parent_needed) for sending the event without parent and name info, which is correct. It then wrongly assumes that parent_watched implies !parent_needed and tests the condition (parent_watched && !parent_interested) for sending the event without parent and name info, which is wrong, because parent may still be needed by some group. For example, after initializing a group with FAN_REPORT_DFID_NAME and adding a FAN_MARK_MOUNT with FAN_OPEN mask, open events on non-directory children of "testdir" are delivered with file name info. After adding another mark to the same group on the parent "testdir" with FAN_CLOSE|FAN_EVENT_ON_CHILD mask, open events on non-directory children of "testdir" are no longer delivered with file name info. Fix the logic and use auxiliary variables to clarify the conditions. Fixes: 9b93f33105f5 ("fsnotify: send event with parent/name info to sb/mount/non-dir marks") Cc: stable@vger.kernel.org#v5.9 Link: https://lore.kernel.org/r/20201108105906.8493-1-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 65cae18882f943215d0505ddc7e70495877308e6 Author: Brian Masney Date: Fri Nov 6 20:11:19 2020 -0500 x86/xen: don't unbind uninitialized lock_kicker_irq When booting a hyperthreaded system with the kernel parameter 'mitigations=auto,nosmt', the following warning occurs: WARNING: CPU: 0 PID: 1 at drivers/xen/events/events_base.c:1112 unbind_from_irqhandler+0x4e/0x60 ... Hardware name: Xen HVM domU, BIOS 4.2.amazon 08/24/2006 ... Call Trace: xen_uninit_lock_cpu+0x28/0x62 xen_hvm_cpu_die+0x21/0x30 takedown_cpu+0x9c/0xe0 ? trace_suspend_resume+0x60/0x60 cpuhp_invoke_callback+0x9a/0x530 _cpu_up+0x11a/0x130 cpu_up+0x7e/0xc0 bringup_nonboot_cpus+0x48/0x50 smp_init+0x26/0x79 kernel_init_freeable+0xea/0x229 ? rest_init+0xaa/0xaa kernel_init+0xa/0x106 ret_from_fork+0x35/0x40 The secondary CPUs are not activated with the nosmt mitigations and only the primary thread on each CPU core is used. In this situation, xen_hvm_smp_prepare_cpus(), and more importantly xen_init_lock_cpu(), is not called, so the lock_kicker_irq is not initialized for the secondary CPUs. Let's fix this by exiting early in xen_uninit_lock_cpu() if the irq is not set to avoid the warning from above for each secondary CPU. Signed-off-by: Brian Masney Link: https://lore.kernel.org/r/20201107011119.631442-1-bmasney@redhat.com Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky commit f4c7fa39415da6db1fa0bc26162ac23a0fbae8bb Author: Marek Vasut Date: Thu Oct 29 20:46:52 2020 +0100 ARM: dts: stm32: Keep VDDA LDO1 always on on DHCOM The VDDA LDO1 PMIC output supplies the analog VDDA input of the STM32MP1 on DHCOM, keep it always on, otherwise there could be leakage through the SoC. Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit e5ace7f62695656ef8a66ad5a4c3edd055894876 Author: Marek Vasut Date: Thu Sep 24 01:25:35 2020 +0200 ARM: dts: stm32: Enable thermal sensor support on stm32mp15xx-dhcor Enable STM32 Digital Thermal Sensor driver for stm32mp15xx-dhcor SoMs. Fixes: 94cafe1b6482 ("ARM: dts: stm32: Add Avenger96 devicetree support based on STM32MP157A") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Manivannan Sadhasivam Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Reviewed-by: Manivannan Sadhasivam Signed-off-by: Alexandre Torgue commit cb7ff314e1d9f3d6c62fa2c392e41174721ed0b3 Author: Jon Hunter Date: Fri Nov 6 09:14:20 2020 +0000 drm/tegra: sor: Don't warn on probe deferral Deferred probe is an expected return value for tegra_output_probe(). Given that the driver deals with it properly, there's no need to output a warning that may potentially confuse users. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 1e106aa3509b86738769775969822ffc1ec21bf4 Author: Dan Carpenter Date: Fri Nov 6 11:52:05 2020 +0300 futex: Don't enable IRQs unconditionally in put_pi_state() The exit_pi_state_list() function calls put_pi_state() with IRQs disabled and is not expecting that IRQs will be enabled inside the function. Use the _irqsave() variant so that IRQs are restored to the original state instead of being enabled unconditionally. Fixes: 153fbd1226fb ("futex: Fix more put_pi_state() vs. exit_pi_state_list() races") Signed-off-by: Dan Carpenter Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201106085205.GA1159983@mwanda commit 1f3d7fc279b1a299bb8b1b225d80309a2062ab8a Author: Marek Vasut Date: Thu Oct 29 20:46:17 2020 +0100 ARM: dts: stm32: Define VIO regulator supply on DHCOM The VIO regulator is supplied by PMIC Buck3, describe this in the DT. Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 7e5f3155dcbb4d724386b30cc232002d9b9d81f5 Author: Marek Vasut Date: Wed Oct 28 21:46:17 2020 +0100 ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2 On the prototype DHCOM, the LED5 was connected to pin PG2 of the STM32MP15xx, however on the production SoM this was changed to pin PC6. Update the connection in the DT. Fixes: 81d5fc719798 ("ARM: dts: stm32: Add GPIO LEDs for STM32MP1 DHCOM PDK2") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 52d9edbe6efc5042cf57fae6a25d07572ddf398b Author: Marek Vasut Date: Thu Oct 8 21:35:38 2020 +0200 ARM: dts: stm32: Fix TA3-GPIO-C key on STM32MP1 DHCOM PDK2 On the prototype DHCOM, the TA3-GPIO-C button was connected to pin PI11 of the STM32MP15xx, however on the production SoM this was changed to pin PG0 to free up the IRQ line 11 for LAN8710i PHY IRQ. Update the connection in the DT. Since the IRQ line 0 is used for PMIC as well and cannot be shared with the button, make the button polled. Fixes: 87cabf9405cb ("ARM: dts: stm32: Add GPIO keys for STM32MP1 DHCOM PDK2") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 96d5d884f78306206d745d856aad322becd100c3 Author: Matthew Murrian Date: Wed Nov 4 12:30:06 2020 +0530 dmaengine: xilinx_dma: Fix SG capability check for MCDMA The SG capability is inherently present with Multichannel DMA operation. The register used to check for this capability with other DMA driver types is not defined for MCDMA. Fixes: 6ccd692bfb7f ("dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine driver support") Signed-off-by: Matthew Murrian Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1604473206-32573-4-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit c8ae7932997d0cc92d016829138074c7520248e5 Author: Matthew Murrian Date: Wed Nov 4 12:30:05 2020 +0530 dmaengine: xilinx_dma: Fix usage of xilinx_aximcdma_tx_segment Several code sections incorrectly use struct xilinx_axidma_tx_segment instead of struct xilinx_aximcdma_tx_segment when operating as Multichannel DMA. As their structures are similar, this just works. Fixes: 6ccd692bfb7f ("dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine driver support") Signed-off-by: Matthew Murrian Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1604473206-32573-3-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit 0ba2df09f1500d3f27398a3382b86d39c3e6abe2 Author: Marc Ferland Date: Wed Nov 4 12:30:04 2020 +0530 dmaengine: xilinx_dma: use readl_poll_timeout_atomic variant The xilinx_dma_poll_timeout macro is sometimes called while holding a spinlock (see xilinx_dma_issue_pending() for an example) this means we shouldn't sleep when polling the dma channel registers. To address it in xilinx poll timeout macro use readl_poll_timeout_atomic instead of readl_poll_timeout variant. Signed-off-by: Marc Ferland Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1604473206-32573-2-git-send-email-radhey.shyam.pandey@xilinx.com Signed-off-by: Vinod Koul commit f59ee399de4a8ca4d7d19cdcabb4b63e94867f09 Author: Chris Ye Date: Sun Nov 1 11:34:52 2020 -0800 HID: add HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE for Gamevice devices Kernel 5.4 introduces HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE, devices need to be set explicitly with this flag. Signed-off-by: Chris Ye Signed-off-by: Jiri Kosina commit 7de8bfaa095fcbc2db2952d4b561be102a41c2a6 Author: Lad Prabhakar Date: Wed Nov 4 10:55:08 2020 +0000 arm64: dts: renesas: r8a774e1: Add missing audio_clk_b Add audio_clk_b configured as 0 Hz, this will be overridden by the boards providing the audio clock. Fixes: 8183a7938cfec ("arm64: dts: renesas: r8a774e1: Add audio support") Reported-by: Nobuhiro Iwamatsu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20201104105508.21197-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ce9dfafe29bed86fe3cda330ac6072ce84e1ff81 Author: Heiko Carstens Date: Tue Nov 3 16:55:43 2020 +0100 s390: fix system call exit path The system call exit path is running with interrupts enabled while checking for TIF/PIF/CIF bits which require special handling. If all bits have been checked interrupts are disabled and the kernel exits to user space. The problem is that after checking all bits and before interrupts are disabled bits can be set already again, due to interrupt handling. This means that the kernel can exit to user space with some TIF/PIF/CIF bits set, which should never happen. E.g. TIF_NEED_RESCHED might be set, which might lead to additional latencies, since that bit will only be recognized with next exit to user space. Fix this by checking the corresponding bits only when interrupts are disabled. Fixes: 0b0ed657fe00 ("s390: remove critical section cleanup from entry.S") Cc: # 5.8 Acked-by: Sven Schnelle Signed-off-by: Heiko Carstens commit be353be27874f40837327d9a39e3ad2149ab66d3 Author: Rijo Thomas Date: Wed Nov 4 11:56:10 2020 +0530 tee: amdtee: synchronize access to shm list Synchronize access to shm or shared memory buffer list to prevent race conditions due to concurrent updates to shared shm list by multiple threads. Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver") Reviewed-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Signed-off-by: Jens Wiklander commit ff1f855804cdbbb6db7b9b6df6cab783d1a40d66 Author: Rijo Thomas Date: Wed Nov 4 11:56:09 2020 +0530 tee: amdtee: fix memory leak due to reset of global shm list The driver maintains a list of shared memory buffers along with their mapped buffer id's in a global linked list. These buffers need to be unmapped after use by the user-space client. The global shared memory list is initialized to zero entries in the function amdtee_open(). This clearing of list entries can be a source for memory leak on secure side if the global linked list previously held some mapped buffer entries allocated from another TEE context. Fix potential memory leak issue by moving global shared memory list to AMD-TEE driver context data structure. Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver") Reviewed-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Signed-off-by: Jens Wiklander commit 34a280831384d7e58327ff0e82e18db8e788107c Author: Olaf Hering Date: Fri Nov 6 19:39:41 2020 +0100 video: hyperv_fb: include vmalloc.h hvfb_getmem uses vzalloc, therefore vmalloc.h should be included. Fixes commit d21987d709e807ba7bbf47044deb56a3c02e8be4 ("video: hyperv: hyperv_fb: Support deferred IO for Hyper-V frame buffer driver") Signed-off-by: Olaf Hering Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201106183941.9751-1-olaf@aepfle.de commit ad37f77fd3659e87fd9833a83692e0e4eba0f5cd Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Nov 2 16:14:47 2020 +0000 xfrm/compat: Don't allocate memory with __GFP_ZERO 32-bit to 64-bit messages translator zerofies needed paddings in the translation, the rest is the actual payload. Don't allocate zero pages as they are not needed. Fixes: 5106f4a8acff ("xfrm/compat: Add 32=>64-bit messages translator") Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert commit d1949d045fd67eab8a32a579a8c1ab1681330854 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Nov 2 16:14:46 2020 +0000 xfrm/compat: memset(0) 64-bit padding at right place 32-bit messages translated by xfrm_compat can have attributes attached. For all, but XFRMA_SA, XFRMA_POLICY the size of payload is the same in 32-bit UABI and 64-bit UABI. For XFRMA_SA (struct xfrm_usersa_info) and XFRMA_POLICY (struct xfrm_userpolicy_info) it's only tail-padding that is present in 64-bit payload, but not in 32-bit. The proper size for destination nlattr is already calculated by xfrm_user_rcv_calculate_len64() and allocated with kvmalloc(). xfrm_attr_cpy32() copies 32-bit copy_len into 64-bit attribute translated payload, zero-filling possible padding for SA/POLICY. Due to a typo, *pos already has 64-bit payload size, in a result next memset(0) is called on the memory after the translated attribute, not on the tail-padding of it. Fixes: 5106f4a8acff ("xfrm/compat: Add 32=>64-bit messages translator") Reported-by: syzbot+c43831072e7df506a646@syzkaller.appspotmail.com Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert commit dbd7ae5154d5fff7e84a9f3010bb06499017ef29 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Nov 2 16:14:45 2020 +0000 xfrm/compat: Translate by copying XFRMA_UNSPEC attribute xfrm_xlate32() translates 64-bit message provided by kernel to be sent for 32-bit listener (acknowledge or monitor). Translator code doesn't expect XFRMA_UNSPEC attribute as it doesn't know its payload. Kernel never attaches such attribute, but a user can. I've searched if any opensource does it and the answer is no. Nothing on github and google finds only tfcproject that has such code commented-out. What will happen if a user sends a netlink message with XFRMA_UNSPEC attribute? Ipsec code ignores this attribute. But if there is a monitor-process or 32-bit user requested ack - kernel will try to translate such message and will hit WARN_ONCE() in xfrm_xlate64_attr(). Deal with XFRMA_UNSPEC by copying the attribute payload with xfrm_nla_cpy(). In result, the default switch-case in xfrm_xlate64_attr() becomes an unused code. Leave those 3 lines in case a new xfrm attribute will be added. Fixes: 5461fc0c8d9f ("xfrm/compat: Add 64=>32-bit messages translator") Reported-by: syzbot+a7e701c8385bd8543074@syzkaller.appspotmail.com Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert commit 77e70d351db7de07a46ac49b87a6c3c7a60fca7e Author: Dmitry Torokhov Date: Mon Oct 26 13:36:17 2020 -0700 Input: sunkbd - avoid use-after-free in teardown paths We need to make sure we cancel the reinit work before we tear down the driver structures. Reported-by: Bodong Zhao Tested-by: Bodong Zhao Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit f8394f232b1eab649ce2df5c5f15b0e528c92091 Author: Linus Torvalds Date: Sun Nov 8 16:10:16 2020 -0800 Linux 5.10-rc3 commit ae2975046dbc65855c217fe6fbd5b33140c5ff18 Author: Dan Carpenter Date: Fri Nov 6 15:50:39 2020 -0500 net/sunrpc: fix useless comparison in proc_do_xprt() In the original code, the "if (*lenp < 0)" check didn't work because "*lenp" is unsigned. Fortunately, the memory_read_from_buffer() call will never fail in this context so it doesn't affect runtime. Signed-off-by: Dan Carpenter Signed-off-by: J. Bruce Fields commit 15f5d201c1773297b38a11a0064be76a224d073d Merge: bbc821849eba1 d181bfe36715a Author: Linus Torvalds Date: Sun Nov 8 11:30:25 2020 -0800 Merge tag 'driver-core-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core documentation fixes from Greg KH: "Some small Documentation fixes that were fallout from the larger documentation update we did in 5.10-rc2. Nothing major here at all, but all of these have been in linux-next and resolve build warnings when building the documentation files" * tag 'driver-core-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: Documentation: remove mic/index from misc-devices/index.rst scripts: get_api.pl: Add sub-titles to ABI output scripts: get_abi.pl: Don't let ABI files to create subtitles docs: leds: index.rst: add a missing file docs: ABI: sysfs-class-net: fix a typo docs: ABI: sysfs-driver-dma-ioatdma: what starts with /sys commit bbc821849eba179e62bbe2adba19a87c7686c27b Merge: df53b815c799c 3c4e0dff2095c Author: Linus Torvalds Date: Sun Nov 8 11:28:08 2020 -0800 Merge tag 'tty-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are a small number of small tty and serial fixes for some reported problems for the tty core, vt code, and some serial drivers. They include fixes for: - a buggy and obsolete vt font ioctl removal - 8250_mtk serial baudrate runtime warnings - imx serial earlycon build configuration fix - txx9 serial driver error path cleanup issues - tty core fix in release_tty that can be triggered by trying to bind an invalid serial port name to a speakup console device Almost all of these have been in linux-next without any problems, the only one that hasn't, just deletes code :)" * tag 'tty-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: vt: Disable KD_FONT_OP_COPY tty: fix crash in release_tty if tty->port is not set serial: txx9: add missing platform_driver_unregister() on error in serial_txx9_init tty: serial: imx: enable earlycon by default if IMX_SERIAL_CONSOLE is enabled serial: 8250_mtk: Fix uart_get_baud_rate warning commit df53b815c799cab8c6e04816b5005810a57ea6a3 Merge: b4e00444cab4c db388a6cb7ed9 Author: Linus Torvalds Date: Sun Nov 8 11:24:10 2020 -0800 Merge tag 'usb-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes and new device ids: - USB gadget fixes for some reported issues - Fixes for the ever-troublesome apple fastcharge driver, hopefully we finally have it right. - More USB core quirks for odd devices - USB serial driver fixes for some long-standing issues that were recently found - some new USB serial driver device ids All have been in linux-next with no reported issues" * tag 'usb-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: apple-mfi-fastcharge: fix reference leak in apple_mfi_fc_set_property usb: mtu3: fix panic in mtu3_gadget_stop() USB: serial: option: add Telit FN980 composition 0x1055 USB: serial: option: add LE910Cx compositions 0x1203, 0x1230, 0x1231 USB: serial: cyberjack: fix write-URB completion race USB: Add NO_LPM quirk for Kingston flash drive USB: serial: option: add Quectel EC200T module support usb: raw-gadget: fix memory leak in gadget_setup usb: dwc2: Avoid leaving the error_debugfs label unused usb: dwc3: ep0: Fix delay status handling usb: gadget: fsl: fix null pointer checking usb: gadget: goku_udc: fix potential crashes in probe usb: dwc3: pci: add support for the Intel Alder Lake-S commit b4e00444cab4c3f3fec876dc0cccc8cbb0d1a948 Author: Eddy Wu Date: Sat Nov 7 14:47:22 2020 +0800 fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent current->group_leader->exit_signal may change during copy_process() if current->real_parent exits. Move the assignment inside tasklist_lock to avoid the race. Signed-off-by: Eddy Wu Acked-by: Oleg Nesterov Signed-off-by: Linus Torvalds commit 3c4e0dff2095c579b142d5a0693257f1c58b4804 Author: Daniel Vetter Date: Sun Nov 8 16:38:06 2020 +0100 vt: Disable KD_FONT_OP_COPY It's buggy: On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote: > We recently discovered a slab-out-of-bounds read in fbcon in the latest > kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that > "fbcon_do_set_font" did not handle "vc->vc_font.data" and > "vc->vc_font.height" correctly, and the patch > for VT_RESIZEX can't handle this > issue. > > Specifically, we use KD_FONT_OP_SET to set a small font.data for tty6, and > use KD_FONT_OP_SET again to set a large font.height for tty1. After that, > we use KD_FONT_OP_COPY to assign tty6's vc_font.data to tty1's vc_font.data > in "fbcon_do_set_font", while tty1 retains the original larger > height. Obviously, this will cause an out-of-bounds read, because we can > access a smaller vc_font.data with a larger vc_font.height. Further there was only one user ever. - Android's loadfont, busybox and console-tools only ever use OP_GET and OP_SET - fbset documentation only mentions the kernel cmdline font: option, not anything else. - systemd used OP_COPY before release 232 published in Nov 2016 Now unfortunately the crucial report seems to have gone down with gmane, and the commit message doesn't say much. But the pull request hints at OP_COPY being broken https://github.com/systemd/systemd/pull/3651 So in other words, this never worked, and the only project which foolishly every tried to use it, realized that rather quickly too. Instead of trying to fix security issues here on dead code by adding missing checks, fix the entire thing by removing the functionality. Note that systemd code using the OP_COPY function ignored the return value, so it doesn't matter what we're doing here really - just in case a lone server somewhere happens to be extremely unlucky and running an affected old version of systemd. The relevant code from font_copy_to_all_vcs() in systemd was: /* copy font from active VT, where the font was uploaded to */ cfo.op = KD_FONT_OP_COPY; cfo.height = vcs.v_active-1; /* tty1 == index 0 */ (void) ioctl(vcfd, KDFONTOP, &cfo); Note this just disables the ioctl, garbage collecting the now unused callbacks is left for -next. v2: Tetsuo found the old mail, which allowed me to find it on another archive. Add the link too. Acked-by: Peilin Ye Reported-by: Minh Yuan References: https://lists.freedesktop.org/archives/systemd-devel/2016-June/036935.html References: https://github.com/systemd/systemd/pull/3651 Cc: Greg KH Cc: Peilin Ye Cc: Tetsuo Handa Signed-off-by: Daniel Vetter Link: https://lore.kernel.org/r/20201108153806.3140315-1-daniel.vetter@ffwll.ch Signed-off-by: Greg Kroah-Hartman commit 9dbc1c03eeb534b82647cccb059aca0685d449a7 Merge: 6b2c4d52fd38e 46afb0628b863 Author: Linus Torvalds Date: Sun Nov 8 10:23:07 2020 -0800 Merge tag 'xfs-5.10-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - Fix an uninitialized struct problem - Fix an iomap problem zeroing unwritten EOF blocks - Fix some clumsy error handling when writeback fails on filesystems with blocksize < pagesize - Fix a retry loop not resetting loop variables properly - Fix scrub flagging rtinherit inodes on a non-rt fs, since the kernel actually does permit that combination - Fix excessive page cache flushing when unsharing part of a file * tag 'xfs-5.10-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: only flush the unshared range in xfs_reflink_unshare xfs: fix scrub flagging rtinherit even if there is no rt device xfs: fix missing CoW blocks writeback conversion retry iomap: clean up writeback state logic on writepage error iomap: support partial page discard on writeback block mapping failure xfs: flush new eof page on truncate to avoid post-eof corruption xfs: set xefi_discard when creating a deferred agfl free log intent item commit 6b2c4d52fd38e676fc9ab5d9241a056de565eb1a Merge: 40be821d627c6 b24c30c678630 Author: Linus Torvalds Date: Sun Nov 8 10:11:31 2020 -0800 Merge branch 'hch' (patches from Christoph) Merge procfs splice read fixes from Christoph Hellwig: "Greg reported a problem due to the fact that Android tests use procfs files to test splice, which stopped working with the changes for set_fs() removal. This series adds read_iter support for seq_file, and uses those for various proc files using seq_file to restore splice read support" [ Side note: Christoph initially had a scripted "move everything over" patch, which looks fine, but I personally would prefer us to actively discourage splice() on random files. So this does just the minimal basic core set of proc file op conversions. For completeness, and in case people care, that script was sed -i -e 's/\.proc_read\(\s*=\s*\)seq_read/\.proc_read_iter\1seq_read_iter/g' but I'll wait and see if somebody has a strong argument for using splice on random small /proc files before I'd run it on the whole kernel. - Linus ] * emailed patches from Christoph Hellwig : proc "seq files": switch to ->read_iter proc "single files": switch to ->read_iter proc/stat: switch to ->read_iter proc/cpuinfo: switch to ->read_iter proc: wire up generic_file_splice_read for iter ops seq_file: add seq_read_iter commit 40be821d627c61ee5beb51d265af372ab29804e4 Merge: 100e38914a025 801284f973788 Author: Linus Torvalds Date: Sun Nov 8 10:09:36 2020 -0800 Merge tag 'x86-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A set of x86 fixes: - Use SYM_FUNC_START_WEAK in the mem* ASM functions instead of a combination of .weak and SYM_FUNC_START_LOCAL which makes LLVMs integrated assembler upset - Correct the mitigation selection logic which prevented the related prctl to work correctly - Make the UV5 hubless system work correctly by fixing up the malformed table entries and adding the missing ones" * tag 'x86-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/uv: Recognize UV5 hubless system identifier x86/platform/uv: Remove spaces from OEM IDs x86/platform/uv: Fix missing OEM_TABLE_ID x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP x86/lib: Change .weak to SYM_FUNC_START_WEAK for arch/x86/lib/mem*_64.S commit 100e38914a025a2fc797aa887efee15d812e9f83 Merge: aaaaa7ecdc0b4 7bdb157cdebbf Author: Linus Torvalds Date: Sun Nov 8 10:05:10 2020 -0800 Merge tag 'perf-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Thomas Gleixner: "A single fix for the perf core plugging a memory leak in the address filter parser" * tag 'perf-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Fix a memory leak in perf_event_parse_addr_filter() commit aaaaa7ecdc0b46fe56e8192545321ce44d85236e Merge: 15a9844458cf3 9f5d1c336a10c Author: Linus Torvalds Date: Sun Nov 8 09:56:37 2020 -0800 Merge tag 'locking-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull futex fix from Thomas Gleixner: "A single fix for the futex code where an intermediate state in the underlying RT mutex was not handled correctly and triggering a BUG() instead of treating it as another variant of retry condition" * tag 'locking-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Handle transient "ownerless" rtmutex state correctly commit 15a9844458cf3a7afcd720eca81ecb3a16213cb4 Merge: 6a8d0d283d624 82768a86c6465 Author: Linus Torvalds Date: Sun Nov 8 09:52:57 2020 -0800 Merge tag 'irq-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "A set of fixes for interrupt chip drivers: - Fix the fallout of the IPI as interrupt conversion in Kconfig and the BCM2836 interrupt chip driver - Fixes for interrupt affinity setting and the handling of hierarchical irq domains in the SiFive PLIC driver - Make the unmapped event handling in the TI SCI driver work correctly - A few minor fixes and cleanups in various chip drivers and Kconfig" * tag 'irq-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: dt-bindings: irqchip: ti, sci-inta: Fix diagram indentation for unmapped events irqchip/ti-sci-inta: Add support for unmapped event handling dt-bindings: irqchip: ti, sci-inta: Update for unmapped event handling irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm irqchip/sifive-plic: Fix chip_data access within a hierarchy irqchip/sifive-plic: Fix broken irq_set_affinity() callback irqchip/stm32-exti: Add all LP timer exti direct events support irqchip/bcm2836: Fix missing __init annotation irqchip/mips: Drop selection of IRQ_DOMAIN_HIERARCHY irqchip/mst: Make mst_intc_of_init static irqchip/mst: MST_IRQ should depend on ARCH_MEDIATEK or ARCH_MSTARV7 genirq: Let GENERIC_IRQ_IPI select IRQ_DOMAIN_HIERARCHY commit 6a8d0d283d624302d4377bcf4f40f5bd90c3c775 Merge: e942d75281398 9d820f68b2bdb Author: Linus Torvalds Date: Sun Nov 8 09:51:28 2020 -0800 Merge tag 'core-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull entry code fix from Thomas Gleixner: "A single fix for the generic entry code to correct the wrong assumption that the lockdep interrupt state needs not to be established before calling the RCU check" * tag 'core-urgent-2020-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: entry: Fix the incorrect ordering of lockdep and RCU check commit e942d75281398a8aef4f751753eff26a2a53f081 Merge: 4429f14aeea97 3fb4a8fa28b74 Author: Linus Torvalds Date: Sun Nov 8 09:37:20 2020 -0800 Merge tag 'powerpc-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - fix miscompilation with GCC 4.9 by using asm_goto_volatile for put_user() - fix for an RCU splat at boot caused by a recent lockdep change - fix for a possible deadlock in our EEH debugfs code - several fixes for handling of _PAGE_ACCESSED on 32-bit platforms - build fix when CONFIG_NUMA=n Thanks to Andreas Schwab, Christophe Leroy, Oliver O'Halloran, Qian Cai, and Scott Cheloha. * tag 'powerpc-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/numa: Fix build when CONFIG_NUMA=n powerpc/8xx: Manage _PAGE_ACCESSED through APG bits in L1 entry powerpc/8xx: Always fault when _PAGE_ACCESSED is not set powerpc/40x: Always fault when _PAGE_ACCESSED is not set powerpc/603: Always fault when _PAGE_ACCESSED is not set powerpc: Use asm_goto_volatile for put_user() powerpc/smp: Call rcu_cpu_starting() earlier powerpc/eeh_cache: Fix a possible debugfs deadlock commit 44a146a44f656fc03d368c1b9248d29a128cd053 Author: Necip Fazil Yildiran Date: Tue Nov 3 01:35:24 2020 +0300 iio: light: fix kconfig dependency bug for VCNL4035 When VCNL4035 is enabled and IIO_BUFFER is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for IIO_TRIGGERED_BUFFER Depends on [n]: IIO [=y] && IIO_BUFFER [=n] Selected by [y]: - VCNL4035 [=y] && IIO [=y] && I2C [=y] The reason is that VCNL4035 selects IIO_TRIGGERED_BUFFER without depending on or selecting IIO_BUFFER while IIO_TRIGGERED_BUFFER depends on IIO_BUFFER. This can also fail building the kernel. Honor the kconfig dependency to remove unmet direct dependency warnings and avoid any potential build failures. Fixes: 55707294c4eb ("iio: light: Add support for vishay vcnl4035") Signed-off-by: Necip Fazil Yildiran Link: https://bugzilla.kernel.org/show_bug.cgi?id=209883 Link: https://lore.kernel.org/r/20201102223523.572461-1-fazilyildiran@gmail.com Cc: Signed-off-by: Jonathan Cameron commit 6d6aa2907d59ddd3c0ebb2b93e1ddc84e474485b Author: Paul Cercueil Date: Tue Nov 3 20:12:38 2020 +0000 iio/adc: ingenic: Fix AUX/VBAT readings when touchscreen is used When the command feature of the ADC is used, it is possible to program the ADC, and specify at each step what input should be processed, and in comparison to what reference. This broke the AUX and battery readings when the touchscreen was enabled, most likely because the CMD feature would change the VREF all the time. Now, when AUX or battery are read, we temporarily disable the CMD feature, which means that we won't get touchscreen readings in that time frame. But it now gives correct values for AUX / battery, and the touchscreen isn't disabled for long enough to be an actual issue. Fixes: b96952f498db ("IIO: Ingenic JZ47xx: Add touchscreen mode.") Signed-off-by: Paul Cercueil Acked-by: Artur Rojek Cc: Link: https://lore.kernel.org/r/20201103201238.161083-1-paul@crapouillou.net Signed-off-by: Jonathan Cameron commit c91ebcc578e09783cfa4d85c1b437790f140f29a Author: Paul Cercueil Date: Wed Nov 4 19:28:43 2020 +0000 iio/adc: ingenic: Fix battery VREF for JZ4770 SoC The reference voltage for the battery is clearly marked as 1.2V in the programming manual. With this fixed, the battery channel now returns correct values. Fixes: a515d6488505 ("IIO: Ingenic JZ47xx: Add support for JZ4770 SoC ADC.") Signed-off-by: Paul Cercueil Acked-by: Artur Rojek Cc: Link: https://lore.kernel.org/r/20201104192843.67187-1-paul@crapouillou.net Signed-off-by: Jonathan Cameron commit 4fd94ec7d566ee2f0b52111cc6d26dd311f8a7c3 Author: Ben Gardon Date: Tue Oct 27 16:37:33 2020 -0700 KVM: selftests: Introduce the dirty log perf test The dirty log perf test will time verious dirty logging operations (enabling dirty logging, dirtying memory, getting the dirty log, clearing the dirty log, and disabling dirty logging) in order to quantify dirty logging performance. This test can be used to inform future performance improvements to KVM's dirty logging infrastructure. This series was tested by running the following invocations on an Intel Skylake machine: dirty_log_perf_test -b 20m -i 100 -v 64 dirty_log_perf_test -b 20g -i 5 -v 4 dirty_log_perf_test -b 4g -i 5 -v 32 demand_paging_test -b 20m -v 64 demand_paging_test -b 20g -v 4 demand_paging_test -b 4g -v 32 All behaved as expected. Signed-off-by: Ben Gardon Message-Id: <20201027233733.1484855-6-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 3be18630954672b889186e7be9b631f00134e954 Author: Andrew Jones Date: Wed Nov 4 22:23:53 2020 +0100 KVM: selftests: Make the number of vcpus global We also check the input number of vcpus against the maximum supported. Signed-off-by: Andrew Jones Message-Id: <20201104212357.171559-8-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit 6769155fece2100506e22161945712afae61769f Author: Andrew Jones Date: Wed Nov 4 22:23:52 2020 +0100 KVM: selftests: Make the per vcpu memory size global Rename vcpu_memory_bytes to something with "percpu" in it in order to be less ambiguous. Also make it global to simplify things. Signed-off-by: Andrew Jones Message-Id: <20201104212357.171559-7-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit f663132d1e09166db419afb9832d463e0a79f3d5 Author: Andrew Jones Date: Wed Nov 4 22:23:48 2020 +0100 KVM: selftests: Drop pointless vm_create wrapper Signed-off-by: Andrew Jones Message-Id: <20201104212357.171559-3-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit 92ab4b9a22cfea9b0d353e86024208040c10e807 Author: Ben Gardon Date: Tue Oct 27 16:37:32 2020 -0700 KVM: selftests: Add wrfract to common guest code Wrfract will be used by the dirty logging perf test introduced later in this series to dirty memory sparsely. This series was tested by running the following invocations on an Intel Skylake machine: dirty_log_perf_test -b 20m -i 100 -v 64 dirty_log_perf_test -b 20g -i 5 -v 4 dirty_log_perf_test -b 4g -i 5 -v 32 demand_paging_test -b 20m -v 64 demand_paging_test -b 20g -v 4 demand_paging_test -b 4g -v 32 All behaved as expected. Signed-off-by: Ben Gardon Message-Id: <20201027233733.1484855-5-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 1eafbd27edb5098ed6b6bc404c35d56c78beb0fd Author: Ben Gardon Date: Tue Oct 27 16:37:31 2020 -0700 KVM: selftests: Simplify demand_paging_test with timespec_diff_now Add a helper function to get the current time and return the time since a given start time. Use that function to simplify the timekeeping in the demand paging test. This series was tested by running the following invocations on an Intel Skylake machine: dirty_log_perf_test -b 20m -i 100 -v 64 dirty_log_perf_test -b 20g -i 5 -v 4 dirty_log_perf_test -b 4g -i 5 -v 32 demand_paging_test -b 20m -v 64 demand_paging_test -b 20g -v 4 demand_paging_test -b 4g -v 32 All behaved as expected. Signed-off-by: Ben Gardon Message-Id: <20201027233733.1484855-4-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 2fe5149bdfbf3c2cdfafd2b5b496252d45ca1f78 Author: Ben Gardon Date: Tue Oct 27 16:37:30 2020 -0700 KVM: selftests: Remove address rounding in guest code Rounding the address the guest writes to a host page boundary will only have an effect if the host page size is larger than the guest page size, but in that case the guest write would still go to the same host page. There's no reason to round the address down, so remove the rounding to simplify the demand paging test. This series was tested by running the following invocations on an Intel Skylake machine: dirty_log_perf_test -b 20m -i 100 -v 64 dirty_log_perf_test -b 20g -i 5 -v 4 dirty_log_perf_test -b 4g -i 5 -v 32 demand_paging_test -b 20m -v 64 demand_paging_test -b 20g -v 4 demand_paging_test -b 4g -v 32 All behaved as expected. Signed-off-by: Ben Gardon Message-Id: <20201027233733.1484855-3-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 4b5d12b0e21cc9f9f00201819844fcafb020ffad Author: Ben Gardon Date: Tue Oct 27 16:37:29 2020 -0700 KVM: selftests: Factor code out of demand_paging_test Much of the code in demand_paging_test can be reused by other, similar multi-vCPU-memory-touching-perfromance-tests. Factor that common code out for reuse. No functional change expected. This series was tested by running the following invocations on an Intel Skylake machine: dirty_log_perf_test -b 20m -i 100 -v 64 dirty_log_perf_test -b 20g -i 5 -v 4 dirty_log_perf_test -b 4g -i 5 -v 32 demand_paging_test -b 20m -v 64 demand_paging_test -b 20g -v 4 demand_paging_test -b 4g -v 32 All behaved as expected. Signed-off-by: Ben Gardon Message-Id: <20201027233733.1484855-2-bgardon@google.com> Signed-off-by: Paolo Bonzini commit afdb1960071935cfd5c1908691a34cc6e36931f7 Author: Peter Xu Date: Wed Sep 30 21:22:33 2020 -0400 KVM: selftests: Use a single binary for dirty/clear log test Remove the clear_dirty_log test, instead merge it into the existing dirty_log_test. It should be cleaner to use this single binary to do both tests, also it's a preparation for the upcoming dirty ring test. The default behavior will run all the modes in sequence. Reviewed-by: Andrew Jones Signed-off-by: Peter Xu Message-Id: <20201001012233.6013-1-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit 3031e0288e60f09533339e61117b83099a6e126e Author: Peter Xu Date: Wed Sep 30 21:22:28 2020 -0400 KVM: selftests: Always clear dirty bitmap after iteration We used not to clear the dirty bitmap before because KVM_GET_DIRTY_LOG would overwrite it the next time it copies the dirty log onto it. In the upcoming dirty ring tests we'll start to fetch dirty pages from a ring buffer, so no one is going to clear the dirty bitmap for us. Reviewed-by: Andrew Jones Signed-off-by: Peter Xu Message-Id: <20201001012228.5916-1-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit 31d212959179015bc07f3af4e890cadd26e01ee0 Author: Andrew Jones Date: Thu Oct 29 21:17:03 2020 +0100 KVM: selftests: Add blessed SVE registers to get-reg-list Add support for the SVE registers to get-reg-list and create a new test, get-reg-list-sve, which tests them when running on a machine with SVE support. Signed-off-by: Andrew Jones Message-Id: <20201029201703.102716-5-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit fd02029a9e019e941835e110651486e2d77d3f84 Author: Andrew Jones Date: Thu Oct 29 21:17:01 2020 +0100 KVM: selftests: Add aarch64 get-reg-list test Check for KVM_GET_REG_LIST regressions. The blessed list was created by running on v4.15 with the --core-reg-fixup option. The following script was also used in order to annotate system registers with their names when possible. When new system registers are added the names can just be added manually using the same grep. while read reg; do if [[ ! $reg =~ ARM64_SYS_REG ]]; then printf "\t$reg\n" continue fi encoding=$(echo "$reg" | sed "s/ARM64_SYS_REG(//;s/),//") if ! name=$(grep "$encoding" ../../../../arch/arm64/include/asm/sysreg.h); then printf "\t$reg\n" continue fi name=$(echo "$name" | sed "s/.*SYS_//;s/[\t ]*sys_reg($encoding)$//") printf "\t$reg\t/* $name */\n" done < <(aarch64/get-reg-list --core-reg-fixup --list) Signed-off-by: Andrew Jones Message-Id: <20201029201703.102716-3-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit ac4a4d6de22e674cd6e3fe57199a15383496aad2 Author: Oliver Upton Date: Tue Oct 27 16:10:44 2020 -0700 selftests: kvm: test enforcement of paravirtual cpuid features Add a set of tests that ensure the guest cannot access paravirtual msrs and hypercalls that have been disabled in the KVM_CPUID_FEATURES leaf. Expect a #GP in the case of msr accesses and -KVM_ENOSYS from hypercalls. Cc: Jim Mattson Signed-off-by: Oliver Upton Reviewed-by: Peter Shier Reviewed-by: Aaron Lewis Message-Id: <20201027231044.655110-7-oupton@google.com> Signed-off-by: Paolo Bonzini commit 29faeb9632012d6c3fa4aa33c3d589b9ff18b206 Author: Aaron Lewis Date: Mon Oct 12 12:47:15 2020 -0700 selftests: kvm: Add exception handling to selftests Add the infrastructure needed to enable exception handling in selftests. This allows any of the exception and interrupt vectors to be overridden in the guest. Signed-off-by: Aaron Lewis Reviewed-by: Alexander Graf Message-Id: <20201012194716.3950330-4-aaronlewis@google.com> Signed-off-by: Paolo Bonzini commit 85f2a4320ef27ce74b9da0631460561028c48756 Author: Aaron Lewis Date: Mon Oct 12 12:47:14 2020 -0700 selftests: kvm: Clear uc so UCALL_NONE is being properly reported Ensure the out value 'uc' in get_ucall() is properly reporting UCALL_NONE if the call fails. The return value will be correctly reported, however, the out parameter 'uc' will not be. Clear the struct to ensure the correct value is being reported in the out parameter. Signed-off-by: Aaron Lewis Reviewed-by: Andrew Jones Reviewed-by: Alexander Graf Message-Id: <20201012194716.3950330-3-aaronlewis@google.com> Signed-off-by: Paolo Bonzini commit df11f7dd5834146defa448acba097e8d7703cc42 Author: Aaron Lewis Date: Mon Oct 12 12:47:13 2020 -0700 selftests: kvm: Fix the segment descriptor layout to match the actual layout Fix the layout of 'struct desc64' to match the layout described in the SDM Vol 3, Chapter 3 "Protected-Mode Memory Management", section 3.4.5 "Segment Descriptors", Figure 3-8 "Segment Descriptor". The test added later in this series relies on this and crashes if this layout is not correct. Signed-off-by: Aaron Lewis Reviewed-by: Alexander Graf Message-Id: <20201012194716.3950330-2-aaronlewis@google.com> Signed-off-by: Paolo Bonzini commit 8519873d19120c5046e4124d18a9c09eec20eab9 Author: Nishanth Menon Date: Mon Oct 26 11:54:41 2020 -0500 drm: bridge: cdns: Kconfig: Switch over dependency to ARCH_K3 With the integration of chip-id detection scheme in kernel[1], there is no specific need to maintain multitudes of SoC specific config options, discussed as per [2], we have deprecated the usage in other places for v5.10-rc1. Fix the missing user so that we can clean up the configs in v5.11. [1] drivers/soc/ti/k3-socinfo.c commit 907a2b7e2fc7 ("soc: ti: add k3 platforms chipid module driver") [2] https://lore.kernel.org/linux-arm-kernel/20200908112534.t5bgrjf7y3a6l2ss@akan/ Fixes: afba7e6c5fc1 ("drm: bridge: cdns-mhdp8546: Add TI J721E wrapper") Cc: Swapnil Jakhade Cc: Tomi Valkeinen Cc: Laurent Pinchart Cc: Yuti Amonkar Cc: Jyri Sarha Signed-off-by: Nishanth Menon Reviewed-by: Tomi Valkeinen Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201026165441.22894-1-nm@ti.com commit 2cdef91cf882abc74dd2f6bfae16db782b44c6ce Author: Pankaj Gupta Date: Thu Nov 5 16:39:32 2020 +0100 KVM: x86: handle MSR_IA32_DEBUGCTLMSR with report_ignored_msrs Windows2016 guest tries to enable LBR by setting the corresponding bits in MSR_IA32_DEBUGCTLMSR. KVM does not emulate MSR_IA32_DEBUGCTLMSR and spams the host kernel logs with error messages like: kvm [...]: vcpu1, guest rIP: 0xfffff800a8b687d3 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR 0x1, nop" This patch fixes this by enabling error logging only with 'report_ignored_msrs=1'. Signed-off-by: Pankaj Gupta Message-Id: <20201105153932.24316-1-pankaj.gupta.linux@gmail.com> Signed-off-by: Paolo Bonzini commit 1e293d1ae88cd0e2a0ad4c275f5dc2d8ae7b4387 Author: Oliver Upton Date: Tue Oct 27 16:10:43 2020 -0700 kvm: x86: request masterclock update any time guest uses different msr Commit 5b9bb0ebbcdc ("kvm: x86: encapsulate wrmsr(MSR_KVM_SYSTEM_TIME) emulation in helper fn", 2020-10-21) subtly changed the behavior of guest writes to MSR_KVM_SYSTEM_TIME(_NEW). Restore the previous behavior; update the masterclock any time the guest uses a different msr than before. Fixes: 5b9bb0ebbcdc ("kvm: x86: encapsulate wrmsr(MSR_KVM_SYSTEM_TIME) emulation in helper fn", 2020-10-21) Signed-off-by: Oliver Upton Reviewed-by: Peter Shier Message-Id: <20201027231044.655110-6-oupton@google.com> Signed-off-by: Paolo Bonzini commit 01b4f510b9f467abfc781e198e810e1ecffb782e Author: Oliver Upton Date: Tue Oct 27 16:10:42 2020 -0700 kvm: x86: ensure pv_cpuid.features is initialized when enabling cap Make the paravirtual cpuid enforcement mechanism idempotent to ioctl() ordering by updating pv_cpuid.features whenever userspace requests the capability. Extract this update out of kvm_update_cpuid_runtime() into a new helper function and move its other call site into kvm_vcpu_after_set_cpuid() where it more likely belongs. Fixes: 66570e966dd9 ("kvm: x86: only provide PV features if enabled in guest's CPUID") Signed-off-by: Oliver Upton Reviewed-by: Peter Shier Message-Id: <20201027231044.655110-5-oupton@google.com> Signed-off-by: Paolo Bonzini commit 1930e5ddcead2c23567131e62c86b15efce054be Author: Oliver Upton Date: Tue Oct 27 16:10:41 2020 -0700 kvm: x86: reads of restricted pv msrs should also result in #GP commit 66570e966dd9 ("kvm: x86: only provide PV features if enabled in guest's CPUID") only protects against disallowed guest writes to KVM paravirtual msrs, leaving msr reads unchecked. Fix this by enforcing KVM_CPUID_FEATURES for msr reads as well. Fixes: 66570e966dd9 ("kvm: x86: only provide PV features if enabled in guest's CPUID") Signed-off-by: Oliver Upton Reviewed-by: Peter Shier Message-Id: <20201027231044.655110-4-oupton@google.com> Signed-off-by: Paolo Bonzini commit cc4cb017678aa66d3fb4501b2f7424ed28fc7f4d Author: Maxim Levitsky Date: Sun Nov 1 13:55:23 2020 +0200 KVM: x86: use positive error values for msr emulation that causes #GP Recent introduction of the userspace msr filtering added code that uses negative error codes for cases that result in either #GP delivery to the guest, or handled by the userspace msr filtering. This breaks an assumption that a negative error code returned from the msr emulation code is a semi-fatal error which should be returned to userspace via KVM_RUN ioctl and usually kill the guest. Fix this by reusing the already existing KVM_MSR_RET_INVALID error code, and by adding a new KVM_MSR_RET_FILTERED error code for the userspace filtered msrs. Fixes: 291f35fb2c1d1 ("KVM: x86: report negative values from wrmsr emulation to userspace") Reported-by: Qian Cai Signed-off-by: Maxim Levitsky Message-Id: <20201101115523.115780-1-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 177158e5b1a558a28b9ce6b27a14bea588a6f2fb Author: Peter Xu Date: Fri Oct 23 14:33:46 2020 -0400 KVM: Documentation: Update entry for KVM_CAP_ENFORCE_PV_CPUID Should be squashed into 66570e966dd9cb4f. Signed-off-by: Peter Xu Message-Id: <20201023183358.50607-3-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit 3d20267abc789e6753fce60019bb5945fe8a74f3 Author: Peter Xu Date: Wed Sep 30 21:20:31 2020 -0400 KVM: Documentation: Update entry for KVM_X86_SET_MSR_FILTER It should be an accident when rebase, since we've already have section 8.25 (which is KVM_CAP_S390_DIAG318). Fix the number. Signed-off-by: Peter Xu Message-Id: <20201001012044.5151-2-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit c6c4f961cb879aed67b1343bdef2087c899fdaa9 Author: Li RongQing Date: Sun Sep 27 16:44:57 2020 +0800 KVM: x86/mmu: fix counting of rmap entries in pte_list_add Fix an off-by-one style bug in pte_list_add() where it failed to account the last full set of SPTEs, i.e. when desc->sptes is full and desc->more is NULL. Merge the two "PTE_LIST_EXT-1" checks as part of the fix to avoid an extra comparison. Signed-off-by: Li RongQing Reviewed-by: Sean Christopherson Message-Id: <1601196297-24104-1-git-send-email-lirongqing@baidu.com> Signed-off-by: Paolo Bonzini commit 01776f070ffcbf336be3bf1672bd3c589548d6c4 Author: Christophe Leroy Date: Sat Nov 7 09:07:40 2020 +0000 powerpc/32s: Use relocation offset when setting early hash table When calling early_hash_table(), the kernel hasn't been yet relocated to its linking address, so data must be addressed with relocation offset. Add relocation offset to write into Hash in early_hash_table(). Fixes: 69a1593abdbc ("powerpc/32s: Setup the early hash table at all time.") Reported-by: Erhard Furtner Reported-by: Andreas Schwab Signed-off-by: Christophe Leroy Tested-by: Serge Belyshev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9e225a856a8b22e0e77587ee22ab7a2f5bca8753.1604740029.git.christophe.leroy@csgroup.eu commit ff2bb93f53782bbf7500d521368435921912ad04 Merge: 9478dec3b5e79 c512298eed036 Author: Paolo Bonzini Date: Sun Nov 8 04:15:53 2020 -0500 Merge tag 'kvmarm-fixes-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for v5.10, take #2 - Fix compilation error when PMD and PUD are folded - Fix regresssion of the RAZ behaviour of ID_AA64ZFR0_EL1 commit 7327c8b98e2e14c47021eea14d1ab268086a6408 Author: Markus Reichl Date: Wed Nov 4 20:29:31 2020 +0100 arm64: dts: rockchip: Reorder LED triggers from mmc devices on rk3399-roc-pc. After patch [1] SD-card becomes mmc1 and eMMC becomes mmc2. Correct trigger of LEDs accordingly. [1] https://patchwork.kernel.org/patch/11881427 Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/20201104192933.1001-1-m.reichl@fivetechno.de Signed-off-by: Heiko Stuebner commit 0011c6d182774fc781fb9e115ebe8baa356029ae Author: Markus Reichl Date: Wed Nov 4 17:23:55 2020 +0100 arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards. Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in environments where UUIDs are not practical. Use newly introduced aliases for mmcblk devices from [1]. [1] https://patchwork.kernel.org/patch/11747669/ Signed-off-by: Markus Reichl Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20201104162356.1251-1-m.reichl@fivetechno.de Signed-off-by: Heiko Stuebner commit 4429f14aeea979b63bcafdcf9f09677fcf8fd475 Merge: e9c02d68cc26b e1777d099728a Author: Linus Torvalds Date: Sat Nov 7 13:56:07 2020 -0800 Merge tag 'block-5.10-2020-11-07' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe pull request from Christoph: - revert a nvme_queue size optimization (Keith Bush) - fabrics timeout races fixes (Chao Leng and Sagi Grimberg)" - null_blk zone locking fix (Damien) * tag 'block-5.10-2020-11-07' of git://git.kernel.dk/linux-block: null_blk: Fix scheduling in atomic with zoned mode nvme-tcp: avoid repeated request completion nvme-rdma: avoid repeated request completion nvme-tcp: avoid race between time out and tear down nvme-rdma: avoid race between time out and tear down nvme: introduce nvme_sync_io_queues Revert "nvme-pci: remove last_sq_tail" commit e9c02d68cc26b28a9a12ebd1aeaed673ad0e73e2 Merge: af6e7de0c7d13 9a472ef7a3690 Author: Linus Torvalds Date: Sat Nov 7 13:49:24 2020 -0800 Merge tag 'io_uring-5.10-2020-11-07' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "A set of fixes for io_uring: - SQPOLL cancelation fixes - Two fixes for the io_identity COW - Cancelation overflow fix (Pavel) - Drain request cancelation fix (Pavel) - Link timeout race fix (Pavel)" * tag 'io_uring-5.10-2020-11-07' of git://git.kernel.dk/linux-block: io_uring: fix link lookup racing with link timeout io_uring: use correct pointer for io_uring_show_cred() io_uring: don't forget to task-cancel drained reqs io_uring: fix overflowed cancel w/ linked ->files io_uring: drop req/tctx io_identity separately io_uring: ensure consistent view of original task ->mm from SQPOLL io_uring: properly handle SQPOLL request cancelations io-wq: cancel request if it's asking for files and we don't have them commit 9f5d1c336a10c0d24e83e40b4c1b9539f7dba627 Author: Mike Galbraith Date: Wed Nov 4 16:12:44 2020 +0100 futex: Handle transient "ownerless" rtmutex state correctly Gratian managed to trigger the BUG_ON(!newowner) in fixup_pi_state_owner(). This is one possible chain of events leading to this: Task Prio Operation T1 120 lock(F) T2 120 lock(F) -> blocks (top waiter) T3 50 (RT) lock(F) -> boosts T1 and blocks (new top waiter) XX timeout/ -> wakes T2 signal T1 50 unlock(F) -> wakes T3 (rtmutex->owner == NULL, waiter bit is set) T2 120 cleanup -> try_to_take_mutex() fails because T3 is the top waiter and the lower priority T2 cannot steal the lock. -> fixup_pi_state_owner() sees newowner == NULL -> BUG_ON() The comment states that this is invalid and rt_mutex_real_owner() must return a non NULL owner when the trylock failed, but in case of a queued and woken up waiter rt_mutex_real_owner() == NULL is a valid transient state. The higher priority waiter has simply not yet managed to take over the rtmutex. The BUG_ON() is therefore wrong and this is just another retry condition in fixup_pi_state_owner(). Drop the locks, so that T3 can make progress, and then try the fixup again. Gratian provided a great analysis, traces and a reproducer. The analysis is to the point, but it confused the hell out of that tglx dude who had to page in all the futex horrors again. Condensed version is above. [ tglx: Wrote comment and changelog ] Fixes: c1e2f0eaf015 ("futex: Avoid violating the 10th rule of futex") Reported-by: Gratian Crisan Signed-off-by: Mike Galbraith Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87a6w6x7bb.fsf@ni.com Link: https://lore.kernel.org/r/87sg9pkvf7.fsf@nanos.tec.linutronix.de commit 4e0396c59559264442963b349ab71f66e471f84d Author: Vadym Kochan Date: Fri Nov 6 18:11:25 2020 +0200 net: marvell: prestera: fix compilation with CONFIG_BRIDGE=m With CONFIG_BRIDGE=m the compilation fails: ld: drivers/net/ethernet/marvell/prestera/prestera_switchdev.o: in function `prestera_bridge_port_event': prestera_switchdev.c:(.text+0x2ebd): undefined reference to `br_vlan_enabled' in case the driver is statically enabled. Fix it by adding 'BRIDGE || BRIDGE=n' dependency. Fixes: e1189d9a5fbe ("net: marvell: prestera: Add Switchdev driver implementation") Reported-by: Randy Dunlap Signed-off-by: Vadym Kochan Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20201106161128.24069-1-vadym.kochan@plvision.eu Signed-off-by: Jakub Kicinski commit ee661a4abdf457cc3712725fb4f15113df7588e3 Merge: 847f0a2bfd2fe 1a50cf9a67ff2 Author: Jakub Kicinski Date: Sat Nov 7 12:27:26 2020 -0800 Merge tag 'mlx5-fixes-2020-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2020-11-03 v1->v2: - Fix fixes line tag in patch #1 - Toss ktls refcount leak fix, Maxim will look further into the root cause. - Toss eswitch chain 0 prio patch, until we determine if it is needed for -rc and net. * tag 'mlx5-fixes-2020-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: Fix incorrect access of RCU-protected xdp_prog net/mlx5e: Fix VXLAN synchronization after function reload net/mlx5: E-switch, Avoid extack error log for disabled vport net/mlx5: Fix deletion of duplicate rules net/mlx5e: Use spin_lock_bh for async_icosq_lock net/mlx5e: Protect encap route dev from concurrent release net/mlx5e: Fix modify header actions memory leak ==================== Link: https://lore.kernel.org/r/20201105202129.23644-1-saeedm@nvidia.com Signed-off-by: Jakub Kicinski commit 847f0a2bfd2fe16d6afa537816b313b71f32e139 Author: Heiner Kallweit Date: Thu Nov 5 18:14:47 2020 +0100 r8169: disable hw csum for short packets on all chip versions RTL8125B has same or similar short packet hw padding bug as RTL8168evl. The main workaround has been extended accordingly, however we have to disable also hw checksumming for short packets on affected new chip versions. Instead of checking for an affected chip version let's simply disable hw checksumming for short packets in general. v2: - remove the version checks and disable short packet hw csum in general - reflect this in commit title and message Fixes: 0439297be951 ("r8169: add support for RTL8125B") Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/7fbb35f0-e244-ef65-aa55-3872d7d38698@gmail.com Signed-off-by: Jakub Kicinski commit cc6528bc9a0c901c83b8220a2e2617f3354d6dd9 Author: Heiner Kallweit Date: Thu Nov 5 15:28:42 2020 +0100 r8169: fix potential skb double free in an error path The caller of rtl8169_tso_csum_v2() frees the skb if false is returned. eth_skb_pad() internally frees the skb on error what would result in a double free. Therefore use __skb_put_padto() directly and instruct it to not free the skb on error. Fixes: b423e9ae49d7 ("r8169: fix offloaded tx checksum for small packets.") Reported-by: Jakub Kicinski Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/f7e68191-acff-9ded-4263-c016428a8762@gmail.com Signed-off-by: Jakub Kicinski commit af6e7de0c7d1338c3e4224c764fbcb7e28064df9 Merge: 4b1d362db99d9 3b5f7f10ff6e6 Author: Linus Torvalds Date: Sat Nov 7 11:24:03 2020 -0800 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Driver bugfixes for I2C. Most of them are for the new mlxbf driver which got more exposure after rc1. The sh_mobile patch should already have reached you during the merge window, but I accidently dropped it. However, since it fixes a problem with rebooting, it is still fine for rc3" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: designware: slave should do WRITE_REQUESTED before WRITE_RECEIVED i2c: designware: call i2c_dw_read_clear_intrbits_slave() once i2c: mlxbf: I2C_MLXBF should depend on MELLANOX_PLATFORM i2c: mlxbf: Update author and maintainer email info i2c: mlxbf: Update reference clock frequency i2c: mlxbf: Remove unecessary wrapper functions i2c: mlxbf: Fix resrticted cast warning of sparse i2c: mlxbf: Add CONFIG_ACPI to guard ACPI function call i2c: sh_mobile: implement atomic transfers i2c: mediatek: move dma reset before i2c reset commit 4b1d362db99d9233406cb7cfe35fc698ef92be25 Merge: 659caaf65dc9c c2c81bb2f6913 Author: Linus Torvalds Date: Sat Nov 7 11:16:37 2020 -0800 Merge tag 'riscv-for-linus-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - SPDX comment style fix - ignore memory that is unusable - avoid setting a kernel text offset for the !MMU kernels, where skipping the first page of memory is both unnecessary and costly - avoid passing the flag bits in satp to pfn_to_virt() - fix __put_kernel_nofault, where we had the arguments to __put_user_nocheck reversed - workaround for a bug in the FU540 to avoid triggering PMP issues during early boot - change to how we pull symbols out of the vDSO. The old mechanism was removed from binutils-2.35 (and has been backported to Debian's 2.34) * tag 'riscv-for-linus-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Fix the VDSO symbol generaton for binutils-2.35+ RISC-V: Use non-PGD mappings for early DTB access riscv: uaccess: fix __put_kernel_nofault() riscv: fix pfn_to_virt err in do_page_fault(). riscv: Set text_offset correctly for M-Mode RISC-V: Remove any memblock representing unusable memory area risc-v: kernel: ftrace: Fixes improper SPDX comment style commit db388a6cb7ed986077d3a275712bfc2e28082760 Merge: 00bd6bca3fb1e db0362eeb2299 Author: Greg Kroah-Hartman Date: Sat Nov 7 15:56:37 2020 +0100 Merge tag 'usb-serial-5.10-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.10-rc3 Here's a fix for a long-standing issue with the cyberjack driver and some new device ids. All have been in linux-next with no reported issues. * tag 'usb-serial-5.10-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add Telit FN980 composition 0x1055 USB: serial: option: add LE910Cx compositions 0x1203, 0x1230, 0x1231 USB: serial: cyberjack: fix write-URB completion race USB: serial: option: add Quectel EC200T module support commit 7bdb157cdebbf95a1cd94ed2e01b338714075d00 Author: kiyin(尹亮) Date: Wed Nov 4 08:23:22 2020 +0300 perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leaked on the success path, - or on the failure path. Clean up the code flow to make it obvious that 'filename' is always freed in the reallocation path and in the two return paths as well. We rely on the fact that kfree(NULL) is NOP and filename is initialized with NULL. This fixes the leak. No other side effects expected. [ Dan Carpenter: cleaned up the code flow & added a changelog. ] [ Ingo Molnar: updated the changelog some more. ] Fixes: 375637bc5249 ("perf/core: Introduce address range filtering") Signed-off-by: "kiyin(尹亮)" Signed-off-by: Dan Carpenter Signed-off-by: Ingo Molnar Cc: "Srivatsa S. Bhat" Cc: Anthony Liguori -- kernel/events/core.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 801284f9737883a2b2639bd494455a72c82fdedf Author: Mike Travis Date: Thu Nov 5 16:27:41 2020 -0600 x86/platform/uv: Recognize UV5 hubless system identifier Testing shows a problem in that UV5 hubless systems were not being recognized. Add them to the list of OEM IDs checked. Fixes: 6c7794423a998 ("Add UV5 direct references") Signed-off-by: Mike Travis Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201105222741.157029-4-mike.travis@hpe.com commit 1aee505e0171fc38fd5ed70c7f0dcbb7398c759f Author: Mike Travis Date: Thu Nov 5 16:27:40 2020 -0600 x86/platform/uv: Remove spaces from OEM IDs Testing shows that trailing spaces caused problems with the OEM_ID and the OEM_TABLE_ID. One being that the OEM_ID would not string compare correctly. Another the OEM_ID and OEM_TABLE_ID would be concatenated in the printout. Remove any trailing spaces. Fixes: 1e61f5a95f191 ("Add and decode Arch Type in UVsystab") Signed-off-by: Mike Travis Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201105222741.157029-3-mike.travis@hpe.com commit 1aec69ae56be28b5fd3c9daead5f3840c30153c8 Author: Mike Travis Date: Thu Nov 5 16:27:39 2020 -0600 x86/platform/uv: Fix missing OEM_TABLE_ID Testing shows a problem in that the OEM_TABLE_ID was missing for hubless systems. This is used to determine the APIC type (legacy or extended). Add the OEM_TABLE_ID to the early hubless processing. Fixes: 1e61f5a95f191 ("Add and decode Arch Type in UVsystab") Signed-off-by: Mike Travis Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201105222741.157029-2-mike.travis@hpe.com commit 446b8185f0c39ac3faadbcd8ac156c50f2fd4ffe Author: Kailang Yang Date: Mon Nov 2 15:00:12 2020 +0800 ALSA: hda/realtek - Add supported for Lenovo ThinkPad Headset Button Add supported for Lenovo ThinkPad Headset Button. Thinkpad P1 Gen 3 (0x22c1) Thinkpad X1 Extreme Gen 3 (0x22c2) Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/f39b11d00340408ca2ed2df9b4fc2a09@realtek.com Signed-off-by: Takashi Iwai commit 05d5233df85e9621597c5838e95235107eb624a2 Author: Theodore Ts'o Date: Sat Nov 7 00:00:49 2020 -0500 jbd2: fix up sparse warnings in checkpoint code Add missing __acquires() and __releases() annotations. Also, in an "this should never happen" WARN_ON check, if it *does* actually happen, we need to release j_state_lock since this function is always supposed to release that lock. Otherwise, things will quickly grind to a halt after the WARN_ON trips. Fixes: 96f1e0974575 ("jbd2: avoid long hold times of j_state_lock...") Cc: stable@kernel.org Signed-off-by: Theodore Ts'o commit fa329e27317f7f0762001b9fb1e76c387a9db25d Author: Theodore Ts'o Date: Fri Nov 6 23:59:42 2020 -0500 ext4: fix sparse warnings in fast_commit code Add missing __acquire() and __releases() annotations, and make fc_ineligible_reasons[] static, as it is not used outside of fs/ext4/fast_commit.c. Signed-off-by: Theodore Ts'o commit 99c880decf27858b5b0a57d8d811bb50226c3c12 Author: Harshad Shirwadkar Date: Thu Nov 5 19:59:11 2020 -0800 ext4: cleanup fast commit mount options Drop no_fc mount option that disable fast commit even if it was enabled at mkfs time. Move fc_debug_force mount option under ifdef EXT4_DEBUG to annotate that this is strictly for debugging and testing purposes and should not be used in production. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-23-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 87a144f09380152d28352ecbcc4c65874e7eb892 Author: Harshad Shirwadkar Date: Thu Nov 5 19:59:10 2020 -0800 jbd2: don't start fast commit on aborted journal Fast commit should not be started if the journal is aborted. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-22-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 9b5f6c9b83d912c63ef9fb486a052be79b06f8b0 Author: Harshad Shirwadkar Date: Thu Nov 5 19:59:09 2020 -0800 ext4: make s_mount_flags modifications atomic Fast commit file system states are recorded in sbi->s_mount_flags. Fast commit expects these bit manipulations to be atomic. This patch adds helpers to make those modifications atomic. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-21-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit da0c5d2695265962f20099737348fcb3ff524d0f Author: Harshad Shirwadkar Date: Thu Nov 5 19:59:08 2020 -0800 ext4: issue fsdev cache flush before starting fast commit If the journal dev is different from fsdev, issue a cache flush before committing fast commit blocks to disk. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20201106035911.1942128-20-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 556e0319fbb8eee3fa19fdcc27c8bcb4af1c7211 Author: Harshad Shirwadkar Date: Thu Nov 5 19:59:07 2020 -0800 ext4: disable fast commit with data journalling Fast commits don't work with data journalling. This patch disables the fast commit support when data journalling is turned on. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20201106035911.1942128-19-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 1ceecb537f72734e4315638e7a1bb62e56c86fbf Author: Harshad Shirwadkar Date: Thu Nov 5 19:59:06 2020 -0800 ext4: fix inode dirty check in case of fast commits In case of fast commits, determine if the inode is dirty by checking if the inode is on fast commit list. This also helps us get rid of ext4_inode_info.i_fc_committed_subtid field. Reported-by: Andrea Righi Tested-by: Andrea Righi Reviewed-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-18-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit a3114fe747be42351ac1368bd3ad30f695e473a7 Author: Harshad Shirwadkar Date: Thu Nov 5 19:59:05 2020 -0800 ext4: remove unnecessary fast commit calls from ext4_file_mmap Remove unnecessary calls to ext4_fc_start_update() and ext4_fc_stop_update() from ext4_file_mmap(). Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-17-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 764b3fd31d131c4b8b5fa064aa94382091923aec Author: Harshad Shirwadkar Date: Thu Nov 5 19:59:04 2020 -0800 ext4: mark buf dirty before submitting fast commit buffer Mark the fast commit buffer as dirty before submission. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-16-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit a740762fb3b36dbdddb63ebe65b71cea3014f1c3 Author: Harshad Shirwadkar Date: Thu Nov 5 19:59:03 2020 -0800 ext4: fix code documentatioon Add a TODO to remember fixing REQ_FUA | REQ_PREFLUSH for fast commit buffers. Also, fix a typo in top level comment in fast_commit.c Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-15-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit f6634e2609d13d7aa8852734e16300845db915d5 Author: Harshad Shirwadkar Date: Thu Nov 5 19:59:02 2020 -0800 ext4: dedpulicate the code to wait on inode that's being committed This patch removes the deduplicates the code that implements waiting on inode that's being committed. That code is moved into a new function. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-14-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 480f89d553260e7823920e687846877bebc8dca0 Author: Harshad Shirwadkar Date: Thu Nov 5 19:59:01 2020 -0800 jbd2: don't read journal->j_commit_sequence without taking a lock Take journal state lock before reading journal->j_commit_sequence. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-13-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 0ee66ddcf3c1503a9bdb3e49a7a96c6e429ddfad Author: Harshad Shirwadkar Date: Thu Nov 5 19:59:00 2020 -0800 jbd2: don't touch buffer state until it is filled Fast commit buffers should be filled in before toucing their state. Remove code that sets buffer state as dirty before the buffer is passed to the file system. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-12-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit cc80586a57f704f806b9a1b99a21cd07e37dbedc Author: Harshad Shirwadkar Date: Thu Nov 5 19:58:59 2020 -0800 jbd2: add todo for a fast commit performance optimization Fast commit performance can be optimized if commit thread doesn't wait for ongoing fast commits to complete until the transaction enters T_FLUSH state. Document this optimization. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-11-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 0bce577bf9cae13ae32d391432d0030e3f67fc1d Author: Harshad Shirwadkar Date: Thu Nov 5 19:58:58 2020 -0800 jbd2: don't pass tid to jbd2_fc_end_commit_fallback() In jbd2_fc_end_commit_fallback(), we know which tid to commit. There's no need for caller to pass it. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-10-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit c460e5edc85a063ec9cb60addff93d00ed378701 Author: Harshad Shirwadkar Date: Thu Nov 5 19:58:57 2020 -0800 jbd2: don't use state lock during commit path Variables journal->j_fc_off, journal->j_fc_wbuf are accessed during commit path. Since today we allow only one process to perform a fast commit, there is no need take state lock before accessing these variables. This patch removes these locks and adds comments to describe this. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-9-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 37e0a30e94f1aa25f16b403dfabb64e0b806de0b Author: Harshad Shirwadkar Date: Thu Nov 5 19:58:56 2020 -0800 jbd2: drop jbd2_fc_init documentation Now that jbd2_fc_init is dropped, drop its docs too. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-8-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit a1e5e465b31d6015fccb359d99053b39e5180466 Author: Harshad Shirwadkar Date: Thu Nov 5 19:58:55 2020 -0800 ext4: clean up the JBD2 API that initializes fast commits This patch removes jbd2_fc_init() API and its related functions to simplify enabling fast commits. With this change, the number of fast commit blocks to use is solely determined by the JBD2 layer. So, we move the default value for minimum number of fast commit blocks from ext4/fast_commit.h to include/linux/jbd2.h. However, whether or not to use fast commits is determined by the file system. The file system just sets the fast commit feature using jbd2_journal_set_features(). JBD2 layer then determines how many blocks to use for fast commits (based on the value found in the JBD2 superblock). Note that the JBD2 feature flag of fast commits is just an indication that there are fast commit blocks present on disk. It doesn't tell JBD2 layer about the intent of the file system of whether to it wants to use fast commit or not. That's why, we blindly clear the fast commit flag in journal_reset() after the recovery is done. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-7-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit ede7dc7fa0af619afc08995776eadb9ff3b0a711 Author: Harshad Shirwadkar Date: Thu Nov 5 19:58:54 2020 -0800 jbd2: rename j_maxlen to j_total_len and add jbd2_journal_max_txn_bufs The on-disk superblock field sb->s_maxlen represents the total size of the journal including the fast commit area and is no more the max number of blocks available for a transaction. The maximum number of blocks available to a transaction is reduced by the number of fast commit blocks. So, this patch renames j_maxlen to j_total_len to better represent its intent. Also, it adds a function to calculate max number of bufs available for a transaction. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-6-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit a80f7fcf18672ae4971a6b713b58c0d389aa99fe Author: Harshad Shirwadkar Date: Thu Nov 5 19:58:53 2020 -0800 ext4: fixup ext4_fc_track_* functions' signature Firstly, pass handle to all ext4_fc_track_* functions and use transaction id found in handle->h_transaction->h_tid for tracking fast commit updates. Secondly, don't pass inode to ext4_fc_track_link/create/unlink functions. inode can be found inside these functions as d_inode(dentry). However, rename path is an exeception. That's because in that case, we need inode that's not same as d_inode(dentry). To handle that, add a couple of low-level wrapper functions that take inode and dentry as arguments. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-5-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 5b552ad70c6197e764ffe6070089c5b355fe2d26 Author: Harshad Shirwadkar Date: Thu Nov 5 19:58:52 2020 -0800 ext4: drop redundant calls ext4_fc_track_range ext4_fc_track_range() should only be called when blocks are added or removed from an inode. So, the only places from where we need to call this function are ext4_map_blocks(), punch hole, collapse / zero range, truncate. Remove all the other redundant calls to ths function. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-4-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit b21ebf143af219207214c79bc217beb39c43212a Author: Harshad Shirwadkar Date: Thu Nov 5 19:58:51 2020 -0800 ext4: mark fc ineligible if inode gets evictied due to mem pressure If inode gets evicted due to memory pressure, we have to remove it from the fast commit list. However, that inode may have uncommitted changes that fast commits will lose. So, just fall back to full commits in this case. Also, rename the fast commit ineligiblity reason from "EXT4_FC_REASON_MEM" to "EXT4_FC_REASON_MEM_NOMEM" for better expression. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201106035911.1942128-3-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit a44ad6835da52fdf4df2e482f45a167336555121 Author: Harshad Shirwadkar Date: Thu Nov 5 19:58:50 2020 -0800 ext4: describe fast_commit feature flags Fast commit feature has flags in the file system as well in JBD2. The meaning of fast commit feature flags can get confusing. Update docs and code to add more documentation about it. Suggested-by: Jan Kara Signed-off-by: Harshad Shirwadkar Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20201106035911.1942128-2-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 7067b2619017d51e71686ca9756b454de0e5826a Author: Joseph Qi Date: Tue Nov 3 10:29:02 2020 +0800 ext4: unlock xattr_sem properly in ext4_inline_data_truncate() It takes xattr_sem to check inline data again but without unlock it in case not have. So unlock it before return. Fixes: aef1c8513c1f ("ext4: let ext4_truncate handle inline data correctly") Reported-by: Dan Carpenter Cc: Tao Ma Signed-off-by: Joseph Qi Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/1604370542-124630-1-git-send-email-joseph.qi@linux.alibaba.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit e121bd48b9eb8e3b9104d3d5d08fdf88e9ca0f97 Author: Dan Carpenter Date: Fri Oct 30 14:46:20 2020 +0300 ext4: silence an uninitialized variable warning Smatch complains that "i" can be uninitialized if we don't enter the loop. I don't know if it's possible but we may as well silence this warning. [ Initialize i to sb->s_blocksize instead of 0. The only way the for loop could be skipped entirely is the in-memory data structures, in particular the bh->b_data for the on-disk superblock has gotten corrupted enough that calculated value of group is >= to ext4_get_groups_count(sb). In that case, we want to exit immediately without allocating a block. -- TYT ] Fixes: 8016e29f4362 ("ext4: fast commit recovery path") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201030114620.GB3251003@mwanda Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit a0650046d31d3ca92e7fb41ae5c667ed9250a2fc Author: Chao Yu Date: Fri Oct 30 10:24:35 2020 +0800 MAINTAINERS: add missing file in ext4 entry include/trace/events/ext4.h belongs to ext4 module, add the file path into ext4 entry in MAINTAINERS. Signed-off-by: Chao Yu Link: https://lore.kernel.org/r/20201030022435.1136-1-yuchao0@huawei.com Signed-off-by: Theodore Ts'o commit 174fe5ba2d1ea0d6c5ab2a7d4aa058d6d497ae4d Author: Kaixu Xia Date: Thu Oct 29 23:46:36 2020 +0800 ext4: correctly report "not supported" for {usr,grp}jquota when !CONFIG_QUOTA The macro MOPT_Q is used to indicates the mount option is related to quota stuff and is defined to be MOPT_NOSUPPORT when CONFIG_QUOTA is disabled. Normally the quota options are handled explicitly, so it didn't matter that the MOPT_STRING flag was missing, even though the usrjquota and grpjquota mount options take a string argument. It's important that's present in the !CONFIG_QUOTA case, since without MOPT_STRING, the mount option matcher will match usrjquota= followed by an integer, and will otherwise skip the table entry, and so "mount option not supported" error message is never reported. [ Fixed up the commit description to better explain why the fix works. --TYT ] Fixes: 26092bf52478 ("ext4: use a table-driven handler for mount options") Signed-off-by: Kaixu Xia Link: https://lore.kernel.org/r/1603986396-28917-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 86bbf01977b4fdfffc8cab46e398ff279380b194 Merge: bf3e76289cd28 6f64e47783000 Author: Jakub Kicinski Date: Fri Nov 6 17:49:31 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2020-11-06 1) Pre-allocated per-cpu hashmap needs to zero-fill reused element, from David. 2) Tighten bpf_lsm function check, from KP. 3) Fix bpftool attaching to flow dissector, from Lorenz. 4) Use -fno-gcse for the whole kernel/bpf/core.c instead of function attribute, from Ard. * git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Update verification logic for LSM programs bpf: Zero-fill re-used per-cpu map element bpf: BPF_PRELOAD depends on BPF_SYSCALL tools/bpftool: Fix attaching flow dissector libbpf: Fix possible use after free in xsk_socket__delete libbpf: Fix null dereference in xsk_socket__delete libbpf, hashmap: Fix undefined behavior in hash_bits bpf: Don't rely on GCC __attribute__((optimize)) to disable GCSE tools, bpftool: Remove two unused variables. tools, bpftool: Avoid array index warnings. xsk: Fix possible memory leak at socket close bpf: Add struct bpf_redir_neigh forward declaration to BPF helper defs samples/bpf: Set rlimit for memlock to infinity in all samples bpf: Fix -Wshadow warnings selftest/bpf: Fix profiler test using CO-RE relocation for enums ==================== Link: https://lore.kernel.org/r/20201106221759.24143-1-alexei.starovoitov@gmail.com Signed-off-by: Jakub Kicinski commit 659caaf65dc9c7150aa3e80225ec6e66b25ab3ce Merge: 03f0f5ad58479 62575e270f661 Author: Linus Torvalds Date: Fri Nov 6 15:46:39 2020 -0800 Merge tag 'ceph-for-5.10-rc3' of git://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "A fix for a potential stall on umount caused by the MDS dropping our REQUEST_CLOSE message. The code that handled this case was inadvertently disabled in 5.9, this patch removes it entirely and fixes the problem in a way that is consistent with ceph-fuse" * tag 'ceph-for-5.10-rc3' of git://github.com/ceph/ceph-client: ceph: check session state after bumping session->s_seq commit 03f0f5ad58479ba1374f10680fc836aa21abe8f9 Merge: d4fc96832f013 7d764b685ee1b Author: Linus Torvalds Date: Fri Nov 6 15:42:42 2020 -0800 Merge tag 'linux-kselftest-fixes-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: "Fixes to the ftrace test and several fixes from Tommi Rantala for various other tests" * tag 'linux-kselftest-fixes-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: binderfs: use SKIP instead of XFAIL selftests: clone3: use SKIP instead of XFAIL selftests: core: use SKIP instead of XFAIL in close_range_test.c selftests: proc: fix warning: _GNU_SOURCE redefined selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c selftests: pidfd: add CONFIG_CHECKPOINT_RESTORE=y to config selftests: pidfd: skip test on kcmp() ENOSYS selftests: pidfd: use ksft_test_result_skip() when skipping test selftests/harness: prettify SKIP message whitespace again selftests: pidfd: fix compilation errors due to wait.h selftests: filter kselftest headers from command in lib.mk selftests/ftrace: check for do_sys_openat2 in user-memory test selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function commit d4fc96832f0131c8f2fb067fb01c3007df6d4c9f Merge: bf3e76289cd28 5feed64f9199f Author: Linus Torvalds Date: Fri Nov 6 15:24:12 2020 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three driver fixes. Two (alua and hpsa) are in hard to trigger attach/detach situations but the mp3sas one involves a polled to interrupt switch over that could trigger in any high IOPS situation" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mpt3sas: Fix timeouts observed while reenabling IRQ scsi: scsi_dh_alua: Avoid crash during alua_bus_detach() scsi: hpsa: Fix memory leak in hpsa_init_one() commit 6f64e477830000746c1f992050fbd45c03c89429 Author: KP Singh Date: Thu Nov 5 23:06:51 2020 +0000 bpf: Update verification logic for LSM programs The current logic checks if the name of the BTF type passed in attach_btf_id starts with "bpf_lsm_", this is not sufficient as it also allows attachment to non-LSM hooks like the very function that performs this check, i.e. bpf_lsm_verify_prog. In order to ensure that this verification logic allows attachment to only LSM hooks, the LSM_HOOK definitions in lsm_hook_defs.h are used to generate a BTF_ID set. Upon verification, the attach_btf_id of the program being attached is checked for presence in this set. Fixes: 9e4e01dfd325 ("bpf: lsm: Implement attach, detach and execution") Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201105230651.2621917-1-kpsingh@chromium.org commit bf3e76289cd28b87f679cd53e26d67fd708d718a Merge: 44d80621857f9 9efac6ce7f621 Author: Linus Torvalds Date: Fri Nov 6 13:08:25 2020 -0800 Merge branch 'mtd/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd fixes from Miquel Raynal. * 'mtd/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: stm32_fmc2: fix broken ECC mtd: spi-nor: Fix address width on flash chips > 16MB mtd: spi-nor: Don't copy self-pointing struct around mtd: rawnand: ifc: Move the ECC engine initialization to the right place mtd: rawnand: mxc: Move the ECC engine initialization to the right place commit 44d80621857f916f1370782cdd20c9359ccc5eea Merge: bb72bbe8f6c70 bc7f2cd7559c5 Author: Linus Torvalds Date: Fri Nov 6 13:05:21 2020 -0800 Merge tag 'spi-fix-v5.10-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "This is an additional fix on top of 5e31ba0c0543 ('spi: bcm2835: fix gpio cs level inversion') - when sending my prior pull request I had misremembred the status of that patch, apologies for the noise here" * tag 'spi-fix-v5.10-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: bcm2835: remove use of uninitialized gpio flags variable commit bb72bbe8f6c70e67c85d773e5c9b04c7fe36a0ab Merge: fc7b66ef07664 a6c96672a64f4 Author: Linus Torvalds Date: Fri Nov 6 12:58:11 2020 -0800 Merge tag 'sound-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Quite a bunch of small fixes that have been gathered since the last pull, including changes like below: - HD-audio runtime PM fixes and refactoring - HD-audio and USB-audio quirks - SOF warning fix - Various ASoC device-specific fixes for Intel, Qualcomm, etc" * tag 'sound-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits) ALSA: usb-audio: Add implicit feedback quirk for Qu-16 ASoC: mchp-spdiftx: Do not set Validity bit(s) ALSA: usb-audio: Add implicit feedback quirk for MODX ALSA: usb-audio: add usb vendor id as DSD-capable for Khadas devices ALSA: hda/realtek - Enable headphone for ASUS TM420 ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link() ASoC: qcom: lpass-cpu: Fix clock disable failure ASoC: qcom: lpass-sc7180: Fix MI2S bitwidth field bit positions ASoC: codecs: wcd9335: Set digital gain range correctly ASoC: codecs: wcd934x: Set digital gain range correctly ALSA: hda: Reinstate runtime_allow() for all hda controllers ALSA: hda: Separate runtime and system suspend ALSA: hda: Refactor codec PM to use direct-complete optimization ALSA: hda/realtek - Fixed HP headset Mic can't be detected ALSA: usb-audio: Add implicit feedback quirk for Zoom UAC-2 ALSA: make snd_kcontrol_new name a normal string ALSA: fix kernel-doc markups ASoC: SOF: loader: handle all SOF_IPC_EXT types ASoC: cs42l51: manage mclk shutdown delay ASoC: qcom: sdm845: set driver name correctly ... commit d435c05ab0197ee302290e1cee3f2d9c9024a64f Author: Dan Carpenter Date: Fri Nov 6 15:39:50 2020 -0500 net/sunrpc: return 0 on attempt to write to "transports" You can't write to this file because the permissions are 0444. But it sort of looked like you could do a write and it would result in a read. Then it looked like proc_sys_call_handler() just ignored it. Which is confusing. It's more clear if the "write" just returns zero. Also, the "lenp" pointer is never NULL so that check can be removed. Signed-off-by: Dan Carpenter Signed-off-by: J. Bruce Fields commit fc7b66ef076644dd646eb9f11563684edc479649 Merge: 28ced768a4262 356583b956e62 Author: Linus Torvalds Date: Fri Nov 6 12:54:00 2020 -0800 Merge tag 'drm-fixes-2020-11-06-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "It's Friday here so that means another installment of drm fixes to distract you from the counting process. Changes all over the place, the amdgpu changes contain support for a new GPU that is close to current one already in the tree (Green Sardine) so it shouldn't have much side effects. Otherwise imx has a few cleanup patches and fixes, amdgpu and i915 have around the usual smattering of fixes, fonts got constified, and vc4/panfrost has some minor fixes. All in all a fairly regular rc3. We have an outstanding nouveau regression, but the author is looking into the fix, so should be here next week. I now return you to counting. fonts: - constify font structures. MAINTAINERS: - Fix path for amdgpu power management amdgpu: - Add support for more navi1x SKUs - Fix for suspend on CI dGPUs - VCN DPG fix for Picasso - Sienna Cichlid fixes - Polaris DPM fix - Add support for Green Sardine amdkfd: - Fix an allocation failure check i915: - Fix set domain's cache coherency - Fixes around breadcrumbs - Fix encoder lookup during PSR atomic - Hold onto an explicit ref to i915_vma_work.pinned - gvt: HWSP reset handling fix - gvt: flush workaround - gvt: vGPU context pin/unpin - gvt: mmio cmd access fix for bxt/apl imx: - drop unused functions and callbacks - reuse imx_drm_encoder_parse_of - spinlock rework - memory leak fix - minor cleanups vc4: - resource cleanup fix panfrost: - madvise/shrinker fix" * tag 'drm-fixes-2020-11-06-1' of git://anongit.freedesktop.org/drm/drm: (55 commits) drm/amdgpu/display: remove DRM_AMD_DC_GREEN_SARDINE drm/amd/display: Add green_sardine support to DM drm/amd/display: Add green_sardine support to DC drm/amdgpu: enable vcn support for green_sardine (v2) drm/amdgpu: enable green_sardine_asd.bin loading (v2) drm/amdgpu/sdma: add sdma engine support for green_sardine (v2) drm/amdgpu: add gfx support for green_sardine (v2) drm/amdgpu: add soc15 common ip block support for green_sardine (v3) drm/amdgpu: add green_sardine support for gpu_info and ip block setting (v2) drm/amdgpu: add Green_Sardine APU flag drm/amdgpu: resolved ASD loading issue on sienna amdkfd: Check kvmalloc return before memcpy drm/amdgpu: update golden setting for sienna_cichlid amd/amdgpu: Disable VCN DPG mode for Picasso drm/amdgpu/swsmu: remove duplicate call to smu_set_default_dpm_table drm/i915: Hold onto an explicit ref to i915_vma_work.pinned drm/i915/gt: Flush xcs before tgl breadcrumbs drm/i915/gt: Expose more parameters for emitting writes into the ring drm/i915: Fix encoder lookup during PSR atomic check drm/i915/gt: Use the local HWSP offset during submission ... commit 28ced768a4262bc81c61c8244e0e57048afc18d1 Merge: 02a2aa3500a99 8ffd778aff45b Author: Linus Torvalds Date: Fri Nov 6 12:51:29 2020 -0800 Merge tag 'tpmdd-next-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm fixes from Jarkko Sakkinen: "Two critical tpm driver bug fixes" * tag 'tpmdd-next-v5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: efi: Don't create binary_bios_measurements file for an empty log tpm_tis: Disable interrupts on ThinkPad T490s commit 02a2aa3500a993c9f0812b8564d36d63b8d49ce4 Merge: 1669ecf9c884c 4dd6ce4780035 Author: Linus Torvalds Date: Fri Nov 6 12:48:19 2020 -0800 Merge tag 'iommu-fixes-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - Fix a NULL-ptr dereference in the Intel VT-d driver - Two fixes for Intel SVM support - Increase IRQ remapping table size in the AMD IOMMU driver. The old number of 128 turned out to be too low for some recent devices. - Fix a mask check in generic IOMMU code * tag 'iommu-fixes-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu: Fix a check in iommu_check_bind_data() iommu/vt-d: Fix a bug for PDP check in prq_event_thread iommu/vt-d: Fix sid not set issue in intel_svm_bind_gpasid() iommu/vt-d: Fix kernel NULL pointer dereference in find_domain() iommu/amd: Increase interrupt remapping table limit to 512 entries commit 1669ecf9c884c639c4a83859e33a24d892aec790 Merge: 30f3f68e27d14 e4eccb853664d Author: Linus Torvalds Date: Fri Nov 6 12:44:23 2020 -0800 Merge tag 'vfio-v5.10-rc3' of git://github.com/awilliam/linux-vfio Pull VFIO fixes from Alex Williamson: - Remove code by using existing helper (Zenghui Yu) - fsl-mc copy-user return and underflow fixes (Dan Carpenter) - fsl-mc static function declaration (Diana Craciun) - Fix ioeventfd sleeping under spinlock (Alex Williamson) - Fix pm reference count leak in vfio-platform (Zhang Qilong) - Allow opening IGD device w/o OpRegion support (Fred Gao) * tag 'vfio-v5.10-rc3' of git://github.com/awilliam/linux-vfio: vfio/pci: Bypass IGD init in case of -ENODEV vfio: platform: fix reference leak in vfio_platform_open vfio/pci: Implement ioeventfd thread handler for contended memory lock vfio/fsl-mc: Make vfio_fsl_mc_irqs_allocate static vfio/fsl-mc: prevent underflow in vfio_fsl_mc_mmap() vfio/fsl-mc: return -EFAULT if copy_to_user() fails vfio/type1: Use the new helper to find vfio_group commit 30f3f68e27d14a237acc339975e18670e58927ca Merge: 4257087e8feb2 108aa503657ee Author: Linus Torvalds Date: Fri Nov 6 12:42:49 2020 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Here's the weekly batch of fixes for arm64. Not an awful lot here, but there are still a few unresolved issues relating to CPU hotplug, RCU and IRQ tracing that I hope to queue fixes for next week. Summary: - Fix early use of kprobes - Fix kernel placement in kexec_file_load() - Bump maximum number of NUMA nodes" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: kexec_file: try more regions if loading segments fails arm64: kprobes: Use BRK instead of single-step when executing instructions out-of-line arm64: NUMA: Kconfig: Increase NODES_SHIFT to 4 commit 4257087e8feb2e6f918eb0773eb1c1a697dd2a39 Merge: ee51814888278 3b57533b460c8 Author: Linus Torvalds Date: Fri Nov 6 12:29:08 2020 -0800 Merge tag 'arc-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - Unbork HSDKv1 platform (won't boot) due to memory map issue - Prevent stack unwinder from infinite looping * tag 'arc-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: [plat-hsdk] Remap CCMs super early in asm boot trampoline ARC: stack unwinding: avoid indefinite looping commit ee51814888278677cb4384814bbe3c95f6270b50 Merge: 41f1653024140 0b2ca2c7d0c9e Author: Linus Torvalds Date: Fri Nov 6 12:21:33 2020 -0800 Merge tag 's390-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Heiko Carstens: - fix reference counting for ap devices - fix paes selftest - fix pmd_deref()/pud_deref() so they can also handle large pages - remove unused vdso file and defines - update defconfigs - call rcu_cpu_starting() early in smp init code to avoid lockdep warnings - fix hotplug of PCI function missing bus * tag 's390-5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/pci: fix hot-plug of PCI function missing bus s390/smp: move rcu_cpu_starting() earlier s390/pkey: fix paes selftest failure with paes and pkey static build s390: update defconfigs s390/vdso: remove unused constants s390/vdso: remove empty unused file s390/mm: make pmd/pud_deref() large page aware s390/ap: fix ap devices reference counting commit 41f16530241405819ae5644b6544965ab124bbda Merge: 521b619acdc8f 2bcbf42add911 Author: Linus Torvalds Date: Fri Nov 6 11:50:28 2020 -0800 Merge tag 'net-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes for 5.10-rc3, including fixes from wireless, can, and netfilter subtrees. Current merge window - bugs in new features: - can: isotp: isotp_rcv_cf(): enable RX timeout handling in listen-only mode Previous releases - regressions: - mac80211: - don't require VHT elements for HE on 2.4 GHz - fix regression where EAPOL frames were sent in plaintext - netfilter: - ipset: Update byte and packet counters regardless of whether they match - ip_tunnel: fix over-mtu packet send by allowing fragmenting even if inner packet has IP_DF (don't fragment) set in its header (when TUNNEL_DONT_FRAGMENT flag is not set on the tunnel dev) - net: fec: fix MDIO probing for some FEC hardware blocks - ip6_tunnel: set inner ipproto before ip6_tnl_encap to un-break gso support - sctp: Fix COMM_LOST/CANT_STR_ASSOC err reporting on big-endian platforms, sparse-related fix used the wrong integer size Previous releases - always broken: - netfilter: use actual socket sk rather than skb sk when routing harder - r8169: work around short packet hw bug on RTL8125 by padding frames - net: ethernet: ti: cpsw: disable PTPv1 hw timestamping advertisement, the hardware does not support it - chelsio/chtls: fix always leaking ctrl_skb and another leak caused by a race condition - fix drivers incorrectly writing into skbs on TX: - cadence: force nonlinear buffers to be cloned - gianfar: Account for Tx PTP timestamp in the skb headroom - gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP - can: flexcan: - remove FLEXCAN_QUIRK_DISABLE_MECR quirk for LS1021A - add ECC initialization for VF610 and LX2160A - flexcan_remove(): disable wakeup completely - can: fix packet echo functionality: - peak_canfd: fix echo management when loopback is on - make sure skbs are not freed in IRQ context in case they need to be dropped - always clone the skbs to make sure they have a reference on the socket, and prevent it from disappearing - fix real payload length return value for RTR frames - can: j1939: return failure on bind if netdev is down, rather than waiting indefinitely Misc: - IPv6: reply ICMP error if the first fragment don't include all headers to improve compliance with RFC 8200" * tag 'net-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (66 commits) ionic: check port ptr before use r8169: work around short packet hw bug on RTL8125 net: openvswitch: silence suspicious RCU usage warning chelsio/chtls: fix always leaking ctrl_skb chelsio/chtls: fix memory leaks caused by a race can: flexcan: flexcan_remove(): disable wakeup completely can: flexcan: add ECC initialization for VF610 can: flexcan: add ECC initialization for LX2160A can: flexcan: remove FLEXCAN_QUIRK_DISABLE_MECR quirk for LS1021A can: mcp251xfd: remove unneeded break can: mcp251xfd: mcp251xfd_regmap_nocrc_read(): fix semicolon.cocci warnings can: mcp251xfd: mcp251xfd_regmap_crc_read(): increase severity of CRC read error messages can: peak_canfd: pucan_handle_can_rx(): fix echo management when loopback is on can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping can: peak_usb: add range checking in decode operations can: xilinx_can: handle failure cases of pm_runtime_get_sync can: ti_hecc: ti_hecc_probe(): add missed clk_disable_unprepare() in error path can: isotp: padlen(): make const array static, makes object smaller can: isotp: isotp_rcv_cf(): enable RX timeout handling in listen-only mode can: isotp: Explain PDU in CAN_ISOTP help text ... commit d4d50710a8b46082224376ef119a4dbb75b25c56 Author: Christoph Hellwig Date: Wed Nov 4 09:27:33 2020 +0100 seq_file: add seq_read_iter iov_iter based variant for reading a seq_file. seq_read is reimplemented on top of the iter variant. Signed-off-by: Christoph Hellwig Tested-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds commit b24c30c678630e48cf8e3caefe463e1c6144d029 Author: Christoph Hellwig Date: Wed Nov 4 09:27:38 2020 +0100 proc "seq files": switch to ->read_iter Implement ->read_iter for all proc "seq files" so that splice works on them. Suggested-by: Linus Torvalds Signed-off-by: Christoph Hellwig Signed-off-by: Linus Torvalds commit 7cfc630e63b4f7b2ab5a1238c566a6b799ae1624 Author: Greg Kroah-Hartman Date: Wed Nov 4 09:27:37 2020 +0100 proc "single files": switch to ->read_iter Implement ->read_iter for all proc "single files" so that more bionic tests cases can pass when they call splice() on other fun files like /proc/version Signed-off-by: Greg Kroah-Hartman Signed-off-by: Christoph Hellwig Signed-off-by: Linus Torvalds commit 28589f9e0f942377e9994711f5765b01d1b8eaa2 Author: Christoph Hellwig Date: Wed Nov 4 09:27:36 2020 +0100 proc/stat: switch to ->read_iter Implement ->read_iter so that splice can be used on this file. Suggested-by: Linus Torvalds Signed-off-by: Christoph Hellwig Signed-off-by: Linus Torvalds commit 70fce7d2253938191275ebcbd46efe45fceb05a1 Author: Christoph Hellwig Date: Wed Nov 4 09:27:35 2020 +0100 proc/cpuinfo: switch to ->read_iter Implement ->read_iter so that the Android bionic test suite can use this random proc file for its splice test case. Signed-off-by: Christoph Hellwig Signed-off-by: Linus Torvalds commit fe33850ff798eb8d57eea88cc14090770013bb73 Author: Christoph Hellwig Date: Wed Nov 4 09:27:34 2020 +0100 proc: wire up generic_file_splice_read for iter ops Wire up generic_file_splice_read for the iter based proxy ops, so that splice reads from them work. Signed-off-by: Christoph Hellwig Tested-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds commit 92cfcd030e4b1de11a6b1edb0840e55c26332d31 Author: Eric Biggers Date: Fri Oct 30 17:45:56 2020 -0700 fscrypt: remove reachable WARN in fscrypt_setup_iv_ino_lblk_32_key() I_CREATING isn't actually set until the inode has been assigned an inode number and inserted into the inode hash table. So the WARN_ON() in fscrypt_setup_iv_ino_lblk_32_key() is wrong, and it can trigger when creating an encrypted file on ext4. Remove it. This was sometimes causing xfstest generic/602 to fail on ext4. I didn't notice it before because due to a separate oversight, new inodes that haven't been assigned an inode number yet don't necessarily have i_ino == 0 as I had thought, so by chance I never saw the test fail. Fixes: a992b20cd4ee ("fscrypt: add fscrypt_prepare_new_inode() and fscrypt_set_context()") Reported-by: Theodore Y. Ts'o Link: https://lore.kernel.org/r/20201031004556.87862-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit e1777d099728a76a8f8090f89649aac961e7e530 Author: Damien Le Moal Date: Fri Nov 6 20:01:41 2020 +0900 null_blk: Fix scheduling in atomic with zoned mode Commit aa1c09cb65e2 ("null_blk: Fix locking in zoned mode") changed zone locking to using the potentially sleeping wait_on_bit_io() function. This is acceptable when memory backing is enabled as the device queue is in that case marked as blocking, but this triggers a scheduling while in atomic context with memory backing disabled. Fix this by relying solely on the device zone spinlock for zone information protection without temporarily releasing this lock around null_process_cmd() execution in null_zone_write(). This is OK to do since when memory backing is disabled, command processing does not block and the memory backing lock nullb->lock is unused. This solution avoids the overhead of having to mark a zoned null_blk device queue as blocking when memory backing is unused. This patch also adds comments to the zone locking code to explain the unusual locking scheme. Fixes: aa1c09cb65e2 ("null_blk: Fix locking in zoned mode") Reported-by: kernel test robot Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe commit 4466d6d2f80c1193e0845d110277c56da77a6418 Author: Matthias Reichl Date: Thu Nov 5 13:34:32 2020 +0100 tty: fix crash in release_tty if tty->port is not set Commit 2ae0b31e0face ("tty: don't crash in tty_init_dev when missing tty_port") didn't fully prevent the crash as the cleanup path in tty_init_dev() calls release_tty() which dereferences tty->port without checking it for non-null. Add tty->port checks to release_tty to avoid the kernel crash. Fixes: 2ae0b31e0face ("tty: don't crash in tty_init_dev when missing tty_port") Signed-off-by: Matthias Reichl Link: https://lore.kernel.org/r/20201105123432.4448-1-hias@horus.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 0c5fc92622ed5531ff324b20f014e9e3092f0187 Author: Qinglang Miao Date: Tue Nov 3 16:49:42 2020 +0800 serial: txx9: add missing platform_driver_unregister() on error in serial_txx9_init Add the missing platform_driver_unregister() before return from serial_txx9_init in the error handling case when failed to register serial_txx9_pci_driver with macro ENABLE_SERIAL_TXX9_PCI defined. Fixes: ab4382d27412 ("tty: move drivers/serial/ to drivers/tty/serial/") Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20201103084942.109076-1-miaoqinglang@huawei.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 427627a23c3e86e31113f9db9bfdca41698a0ee5 Author: Lucas Stach Date: Thu Nov 5 21:40:26 2020 +0100 tty: serial: imx: enable earlycon by default if IMX_SERIAL_CONSOLE is enabled Since 699cc4dfd140 (tty: serial: imx: add imx earlycon driver), the earlycon part of imx serial is a separate driver and isn't necessarily enabled anymore when the console is enabled. This causes users to loose the earlycon functionality when upgrading their kenrel configuration via oldconfig. Enable earlycon by default when IMX_SERIAL_CONSOLE is enabled. Fixes: 699cc4dfd140 (tty: serial: imx: add imx earlycon driver) Reviewed-by: Fabio Estevam Reviewed-by: Fugang Duan Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20201105204026.1818219-1-l.stach@pengutronix.de Cc: stable Signed-off-by: Greg Kroah-Hartman commit 912ab37c798770f21b182d656937072b58553378 Author: Claire Chang Date: Mon Nov 2 20:07:49 2020 +0800 serial: 8250_mtk: Fix uart_get_baud_rate warning Mediatek 8250 port supports speed higher than uartclk / 16. If the baud rates in both the new and the old termios setting are higher than uartclk / 16, the WARN_ON in uart_get_baud_rate() will be triggered. Passing NULL as the old termios so uart_get_baud_rate() will use uartclk / 16 - 1 as the new baud rate which will be replaced by the original baud rate later by tty_termios_encode_baud_rate() in mtk8250_set_termios(). Fixes: 551e553f0d4a ("serial: 8250_mtk: Fix high-speed baud rates clamping") Signed-off-by: Claire Chang Link: https://lore.kernel.org/r/20201102120749.374458-1-tientzu@chromium.org Cc: stable Signed-off-by: Greg Kroah-Hartman commit 8ffd778aff45be760292225049e0141255d4ad6e Author: Tyler Hicks Date: Wed Oct 28 10:41:02 2020 -0500 tpm: efi: Don't create binary_bios_measurements file for an empty log Mimic the pre-existing ACPI and Device Tree event log behavior by not creating the binary_bios_measurements file when the EFI TPM event log is empty. This fixes the following NULL pointer dereference that can occur when reading /sys/kernel/security/tpm0/binary_bios_measurements after the kernel received an empty event log from the firmware: BUG: kernel NULL pointer dereference, address: 000000000000002c #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 2 PID: 3932 Comm: fwupdtpmevlog Not tainted 5.9.0-00003-g629990edad62 #17 Hardware name: LENOVO 20LCS03L00/20LCS03L00, BIOS N27ET38W (1.24 ) 11/28/2019 RIP: 0010:tpm2_bios_measurements_start+0x3a/0x550 Code: 54 53 48 83 ec 68 48 8b 57 70 48 8b 1e 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 48 8b 82 c0 06 00 00 48 8b 8a c8 06 00 00 <44> 8b 60 1c 48 89 4d a0 4c 89 e2 49 83 c4 20 48 83 fb 00 75 2a 49 RSP: 0018:ffffa9c901203db0 EFLAGS: 00010246 RAX: 0000000000000010 RBX: 0000000000000000 RCX: 0000000000000010 RDX: ffff8ba1eb99c000 RSI: ffff8ba1e4ce8280 RDI: ffff8ba1e4ce8258 RBP: ffffa9c901203e40 R08: ffffa9c901203dd8 R09: ffff8ba1ec443300 R10: ffffa9c901203e50 R11: 0000000000000000 R12: ffff8ba1e4ce8280 R13: ffffa9c901203ef0 R14: ffffa9c901203ef0 R15: ffff8ba1e4ce8258 FS: 00007f6595460880(0000) GS:ffff8ba1ef880000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000002c CR3: 00000007d8d18003 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? __kmalloc_node+0x113/0x320 ? kvmalloc_node+0x31/0x80 seq_read+0x94/0x420 vfs_read+0xa7/0x190 ksys_read+0xa7/0xe0 __x64_sys_read+0x1a/0x20 do_syscall_64+0x37/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 In this situation, the bios_event_log pointer in the tpm_bios_log struct was not NULL but was equal to the ZERO_SIZE_PTR (0x10) value. This was due to the following kmemdup() in tpm_read_log_efi(): int tpm_read_log_efi(struct tpm_chip *chip) { ... /* malloc EventLog space */ log->bios_event_log = kmemdup(log_tbl->log, log_size, GFP_KERNEL); if (!log->bios_event_log) { ret = -ENOMEM; goto out; } ... } When log_size is zero, due to an empty event log from firmware, ZERO_SIZE_PTR is returned from kmemdup(). Upon a read of the binary_bios_measurements file, the tpm2_bios_measurements_start() function does not perform a ZERO_OR_NULL_PTR() check on the bios_event_log pointer before dereferencing it. Rather than add a ZERO_OR_NULL_PTR() check in functions that make use of the bios_event_log pointer, simply avoid creating the binary_bios_measurements_file as is done in other event log retrieval backends. Explicitly ignore all of the events in the final event log when the main event log is empty. The list of events in the final event log cannot be accurately parsed without referring to the first event in the main event log (the event log header) so the final event log is useless in such a situation. Fixes: 58cc1e4faf10 ("tpm: parse TPM event logs based on EFI table") Link: https://lore.kernel.org/linux-integrity/E1FDCCCB-CA51-4AEE-AC83-9CDE995EAE52@canonical.com/ Reported-by: Kai-Heng Feng Reported-by: Kenneth R. Crudup Reported-by: Mimi Zohar Cc: Thiébaud Weksteen Cc: Ard Biesheuvel Signed-off-by: Tyler Hicks Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit b154ce11ead925de6a94feb3b0317fafeefa0ebc Author: Jerry Snitselaar Date: Thu Oct 15 14:44:30 2020 -0700 tpm_tis: Disable interrupts on ThinkPad T490s There is a misconfiguration in the bios of the gpio pin used for the interrupt in the T490s. When interrupts are enabled in the tpm_tis driver code this results in an interrupt storm. This was initially reported when we attempted to enable the interrupt code in the tpm_tis driver, which previously wasn't setting a flag to enable it. Due to the reports of the interrupt storm that code was reverted and we went back to polling instead of using interrupts. Now that we know the T490s problem is a firmware issue, add code to check if the system is a T490s and disable interrupts if that is the case. This will allow us to enable interrupts for everyone else. If the user has a fixed bios they can force the enabling of interrupts with tpm_tis.interrupts=1 on the kernel command line. Cc: Peter Huewe Cc: Jason Gunthorpe Cc: Hans de Goede Signed-off-by: Jerry Snitselaar Reviewed-by: James Bottomley Reviewed-by: Hans de Goede Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit aee9dccc5b64e878cf1b18207436e73f66d74157 Author: Brian O'Keefe Date: Fri Nov 6 10:10:34 2020 -0500 staging: rtl8723bs: Add 024c:0627 to the list of SDIO device-ids Add 024c:0627 to the list of SDIO device-ids, based on hardware found in the wild. This hardware exists on at least some Acer SW1-011 tablets. Signed-off-by: Brian O'Keefe Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/b9e1523f-2ba7-fb82-646a-37f095b4440e@alum.wpi.edu Cc: stable Signed-off-by: Greg Kroah-Hartman commit c512298eed0360923d0cbc4a1f30bc0509af0d50 Author: Andrew Jones Date: Thu Nov 5 10:10:22 2020 +0100 KVM: arm64: Remove AA64ZFR0_EL1 accessors The AA64ZFR0_EL1 accessors are just the general accessors with its visibility function open-coded. It also skips the if-else chain in read_id_reg, but there's no reason not to go there. Indeed consolidating ID register accessors and removing lines of code make it worthwhile. Remove the AA64ZFR0_EL1 accessors, replacing them with the general accessors for sanitized ID registers. No functional change intended. Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201105091022.15373-5-drjones@redhat.com commit 912dee572691ffb2b387dd8b4f183d549a6b24d1 Author: Andrew Jones Date: Thu Nov 5 10:10:21 2020 +0100 KVM: arm64: Check RAZ visibility in ID register accessors The instruction encodings of ID registers are preallocated. Until an encoding is assigned a purpose the register is RAZ. KVM's general ID register accessor functions already support both paths, RAZ or not. If for each ID register we can determine if it's RAZ or not, then all ID registers can build on the general functions. The register visibility function allows us to check whether a register should be completely hidden or not, extending it to also report when the register should be RAZ or not allows us to use it for ID registers as well. Check for RAZ visibility in the ID register accessor functions, allowing the RAZ case to be handled in a generic way for all system registers. The new REG_RAZ flag will be used in a later patch. This patch has no intended functional change. Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201105091022.15373-4-drjones@redhat.com commit 01fe5ace92ddb8732e3331355e7ba9cb6f2ef787 Author: Andrew Jones Date: Thu Nov 5 10:10:20 2020 +0100 KVM: arm64: Consolidate REG_HIDDEN_GUEST/USER REG_HIDDEN_GUEST and REG_HIDDEN_USER are always used together. Consolidate them into a single REG_HIDDEN flag. We can always add another flag later if some register needs to expose itself differently to the guest than it does to userspace. No functional change intended. Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201105091022.15373-3-drjones@redhat.com commit f81cb2c3ad41ac6d8cb2650e3d72d5f67db1aa28 Author: Andrew Jones Date: Thu Nov 5 10:10:19 2020 +0100 KVM: arm64: Don't hide ID registers from userspace ID registers are RAZ until they've been allocated a purpose, but that doesn't mean they should be removed from the KVM_GET_REG_LIST list. So far we only have one register, SYS_ID_AA64ZFR0_EL1, that is hidden from userspace when its function, SVE, is not present. Expose SYS_ID_AA64ZFR0_EL1 to userspace as RAZ when SVE is not implemented. Removing the userspace visibility checks is enough to reexpose it, as it will already return zero to userspace when SVE is not present. The register already behaves as RAZ for the guest when SVE is not present. Fixes: 73433762fcae ("KVM: arm64/sve: System register context switch and access support") Reported-by: 张东旭 Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org#v5.2+ Link: https://lore.kernel.org/r/20201105091022.15373-2-drjones@redhat.com commit faf000397e7f103df9953a312e1df21df1dc797f Author: Gavin Shan Date: Tue Nov 3 11:30:09 2020 +1100 KVM: arm64: Fix build error in user_mem_abort() The PUD and PMD are folded into PGD when the following options are enabled. In that case, PUD_SHIFT is equal to PMD_SHIFT and we fail to build with the indicated errors: CONFIG_ARM64_VA_BITS_42=y CONFIG_ARM64_PAGE_SHIFT=16 CONFIG_PGTABLE_LEVELS=3 arch/arm64/kvm/mmu.c: In function ‘user_mem_abort’: arch/arm64/kvm/mmu.c:798:2: error: duplicate case value case PMD_SHIFT: ^~~~ arch/arm64/kvm/mmu.c:791:2: note: previously used here case PUD_SHIFT: ^~~~ This fixes the issue by skipping the check on PUD huge page when PUD and PMD are folded into PGD. Fixes: 2f40c46021bbb ("KVM: arm64: Use fallback mapping sizes for contiguous huge page sizes") Reported-by: Eric Auger Signed-off-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201103003009.32955-1-gshan@redhat.com commit 3b5f7f10ff6e6b66f553e12cc50d9bb751ce60ad Author: Michael Wu Date: Fri Oct 30 16:04:20 2020 +0800 i2c: designware: slave should do WRITE_REQUESTED before WRITE_RECEIVED Sometimes we would get the following flow when doing an i2cset: 0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4 I2C_SLAVE_WRITE_RECEIVED 0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x714 : INTR_STAT=0x204 I2C_SLAVE_WRITE_REQUESTED I2C_SLAVE_WRITE_RECEIVED Documentation/i2c/slave-interface.rst says that I2C_SLAVE_WRITE_REQUESTED, which is mandatory, should be sent while the data did not arrive yet. It means in a write-request I2C_SLAVE_WRITE_REQUESTED should be reported before any I2C_SLAVE_WRITE_RECEIVED. By the way, I2C_SLAVE_STOP didn't be reported in the above case because DW_IC_INTR_STAT was not 0x200. dev->status can be used to record the current state, especially Designware I2C controller has no interrupts to identify a write-request. This patch makes not only I2C_SLAVE_WRITE_REQUESTED been reported first when IC_INTR_RX_FULL is rising and dev->status isn't STATUS_WRITE_IN_PROGRESS but also I2C_SLAVE_STOP been reported when a STOP condition is received. Signed-off-by: Michael Wu Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit 66b92313e2ca9208b5f3ebf5d86e9a818299d8fa Author: Michael Wu Date: Fri Oct 30 16:04:19 2020 +0800 i2c: designware: call i2c_dw_read_clear_intrbits_slave() once If some bits were cleared by i2c_dw_read_clear_intrbits_slave() in i2c_dw_isr_slave() and not handled immediately, those cleared bits would not be shown again by later i2c_dw_read_clear_intrbits_slave(). They therefore were forgotten to be handled. i2c_dw_read_clear_intrbits_slave() should be called once in an ISR and take its returned state for all later handlings. Signed-off-by: Michael Wu Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit 9890923be3a6d5e606cf4ae4f4e632a5e38cb37c Author: Geert Uytterhoeven Date: Mon Oct 5 14:49:49 2020 +0200 i2c: mlxbf: I2C_MLXBF should depend on MELLANOX_PLATFORM The Mellanox BlueField I2C controller is only present on Mellanox BlueField SoCs. Hence add a dependency on MELLANOX_PLATFORM, to prevent asking the user about this driver when configuring a kernel without Mellanox platform support. Fixes: b5b5b32081cd206b ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC") Signed-off-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit 54b9c3d0cea53f84024eed11ff8b6807e2ec81bf Author: Khalil Blaiech Date: Tue Nov 3 14:54:42 2020 -0500 i2c: mlxbf: Update author and maintainer email info Correct the email addresses of the author and the maintainer of the Mellanox BlueField I2C driver. Fixes: b5b5b32081cd206b ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC") Reviewed-by: Leon Romanovsky Signed-off-by: Khalil Blaiech Signed-off-by: Wolfram Sang commit 67ee9fda6ed4958f4caf8f1a3a5102a2c27ddf7b Author: Khalil Blaiech Date: Tue Nov 3 14:54:41 2020 -0500 i2c: mlxbf: Update reference clock frequency The reference clock frequency remains the same across Bluefield products. Thus, update the frequency and rename the macro. Fixes: b5b5b32081cd206b ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC") Reviewed-by: Leon Romanovsky Signed-off-by: Khalil Blaiech Signed-off-by: Wolfram Sang commit 4b19d806ac5272bb9f64d78ca6832867870eb45d Author: Khalil Blaiech Date: Tue Nov 3 14:54:40 2020 -0500 i2c: mlxbf: Remove unecessary wrapper functions Few wrapper functions are useless and can be inlined. So delete mlxbf_i2c_read() and mlxbf_i2c_write() and replace them with readl() and writel(), respectively. Also delete mlxbf_i2c_read_data() and mlxbf_i2c_write() and replace them with ioread32be() and iowrite32be(), respectively. Fixes: b5b5b32081cd206b ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC") Reviewed-by: Leon Romanovsky Reviewed-by: Vadim Pasternak Signed-off-by: Khalil Blaiech Signed-off-by: Wolfram Sang commit 08e019e27a9ed0d6c410176cab4e029e3d233cb8 Author: Khalil Blaiech Date: Tue Nov 3 14:54:39 2020 -0500 i2c: mlxbf: Fix resrticted cast warning of sparse Address warnings "warning: cast to restricted __be32" reported by sparse. Fixes: b5b5b32081cd206b ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC") Reported-by: kernel test robot Reviewed-by: Leon Romanovsky Reviewed-by: Vadim Pasternak Signed-off-by: Khalil Blaiech Signed-off-by: Wolfram Sang commit ed01ddc618fc356bbc7b702823c87ed3ada198a6 Author: Khalil Blaiech Date: Tue Nov 3 14:54:38 2020 -0500 i2c: mlxbf: Add CONFIG_ACPI to guard ACPI function call The build fails with "implicit declaration of function 'acpi_device_uid'" error. Thus, protect ACPI function calls from being called when CONFIG_ACPI is disabled. Fixes: b5b5b32081cd206b ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC") Reported-by: kernel test robot Reviewed-by: Leon Romanovsky Reviewed-by: Vadim Pasternak Signed-off-by: Khalil Blaiech Signed-off-by: Wolfram Sang commit a49cc1fe9d64a2dc4e19b599204f403e5d25f44b Author: Ulrich Hecht Date: Mon Sep 28 17:59:50 2020 +0200 i2c: sh_mobile: implement atomic transfers Implements atomic transfers to fix reboot/shutdown on r8a7790 Lager and similar boards. Signed-off-by: Ulrich Hecht Tested-by: Wolfram Sang Tested-by: Geert Uytterhoeven [wsa: some whitespace fixing] Signed-off-by: Wolfram Sang commit 10a2f11d3c9e48363c729419e0f0530dea76e4fe Author: Arnaud de Turckheim Date: Wed Nov 4 16:24:55 2020 +0100 gpio: pcie-idio-24: Enable PEX8311 interrupts This enables the PEX8311 internal PCI wire interrupt and the PEX8311 local interrupt input so the local interrupts are forwarded to the PCI. Fixes: 585562046628 ("gpio: Add GPIO support for the ACCES PCIe-IDIO-24 family") Cc: stable@vger.kernel.org Signed-off-by: Arnaud de Turckheim Reviewed-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit 23a7fdc06ebcc334fa667f0550676b035510b70b Author: Arnaud de Turckheim Date: Wed Nov 4 16:24:54 2020 +0100 gpio: pcie-idio-24: Fix IRQ Enable Register value This fixes the COS Enable Register value for enabling/disabling the corresponding IRQs bank. Fixes: 585562046628 ("gpio: Add GPIO support for the ACCES PCIe-IDIO-24 family") Cc: stable@vger.kernel.org Signed-off-by: Arnaud de Turckheim Reviewed-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit d8f270efeac850c569c305dc0baa42ac3d607988 Author: Arnaud de Turckheim Date: Wed Nov 4 16:24:53 2020 +0100 gpio: pcie-idio-24: Fix irq mask when masking Fix the bitwise operation to remove only the corresponding bit from the mask. Fixes: 585562046628 ("gpio: Add GPIO support for the ACCES PCIe-IDIO-24 family") Cc: stable@vger.kernel.org Signed-off-by: Arnaud de Turckheim Reviewed-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit f6439c531d52193f890807958aaec52905bc0f2e Author: Mika Westerberg Date: Sat Mar 28 11:59:11 2020 +0200 thunderbolt: Add support for Intel Tiger Lake-H Intel Tiger Lake-H has the same Thunderbolt/USB4 controller as Tiger Lake-LP. Add the Tiger Lake-H PCI IDs to the driver list of supported devices. Signed-off-by: Mika Westerberg commit bc7f2cd7559c5595dc38b909ae9a8d43e0215994 Author: Martin Hundebøll Date: Thu Nov 5 10:06:15 2020 +0100 spi: bcm2835: remove use of uninitialized gpio flags variable Removing the duplicate gpio chip select level handling in bcm2835_spi_setup() left the lflags variable uninitialized. Avoid trhe use of such variable by passing default flags to gpiochip_request_own_desc(). Fixes: 5e31ba0c0543 ("spi: bcm2835: fix gpio cs level inversion") Signed-off-by: Martin Hundebøll Link: https://lore.kernel.org/r/20201105090615.620315-1-martin@geanix.com Signed-off-by: Mark Brown commit 00bd6bca3fb1e98190a24eda2583062803c9e8b5 Author: Zhang Qilong Date: Mon Nov 2 10:26:50 2020 +0800 USB: apple-mfi-fastcharge: fix reference leak in apple_mfi_fc_set_property pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, the result is that this device cannot enter the idle state and always stay busy or other non-idle state. Fixes: 249fa8217b846 ("USB: Add driver to control USB fast charge for iOS devices") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201102022650.67115-1-zhangqilong3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 20914919ad31849ee2b9cfe0428f4a20335c9e2a Author: Macpaul Lin Date: Fri Nov 6 13:54:29 2020 +0800 usb: mtu3: fix panic in mtu3_gadget_stop() This patch fixes a possible issue when mtu3_gadget_stop() already assigned NULL to mtu->gadget_driver during mtu_gadget_disconnect(). [] notifier_call_chain+0xa4/0x128 [] __atomic_notifier_call_chain+0x84/0x138 [] notify_die+0xb0/0x120 [] die+0x1f8/0x5d0 [] __do_kernel_fault+0x19c/0x280 [] do_bad_area+0x44/0x140 [] do_translation_fault+0x4c/0x90 [] do_mem_abort+0xb8/0x258 [] el1_da+0x24/0x3c [] mtu3_gadget_disconnect+0xac/0x128 [] mtu3_irq+0x34c/0xc18 [] __handle_irq_event_percpu+0x2ac/0xcd0 [] handle_irq_event_percpu+0x80/0x138 [] handle_irq_event+0xac/0x148 [] handle_fasteoi_irq+0x234/0x568 [] generic_handle_irq+0x48/0x68 [] __handle_domain_irq+0x264/0x1740 [] gic_handle_irq+0x14c/0x250 [] el1_irq+0xec/0x194 [] dma_pool_alloc+0x6e4/0xae0 [] cmdq_mbox_pool_alloc_impl+0xb0/0x238 [] cmdq_pkt_alloc_buf+0x2dc/0x7c0 [] cmdq_pkt_add_cmd_buffer+0x178/0x270 [] cmdq_pkt_perf_begin+0x108/0x148 [] cmdq_pkt_create+0x178/0x1f0 [] mtk_crtc_config_default_path+0x328/0x7a0 [] mtk_drm_idlemgr_kick+0xa6c/0x1460 [] mtk_drm_crtc_atomic_begin+0x1a4/0x1a68 [] drm_atomic_helper_commit_planes+0x154/0x878 [] mtk_atomic_complete.isra.16+0xe80/0x19c8 [] mtk_atomic_commit+0x258/0x898 [] drm_atomic_commit+0xcc/0x108 [] drm_mode_atomic_ioctl+0x1c20/0x2580 [] drm_ioctl_kernel+0x118/0x1b0 [] drm_ioctl+0x5c0/0x920 [] do_vfs_ioctl+0x188/0x1820 [] SyS_ioctl+0x8c/0xa0 Fixes: df2069acb005 ("usb: Add MediaTek USB3 DRD driver") Signed-off-by: Macpaul Lin Acked-by: Chunfeng Yun Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1604642069-20961-1-git-send-email-macpaul.lin@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 06ea594051707c6b8834ef5b24e9b0730edd391b Author: Necip Fazil Yildiran Date: Wed Nov 4 21:15:23 2020 +0300 staging: ralink-gdma: fix kconfig dependency bug for DMA_RALINK When DMA_RALINK is enabled and DMADEVICES is disabled, it results in the following Kbuild warnings: WARNING: unmet direct dependencies detected for DMA_ENGINE Depends on [n]: DMADEVICES [=n] Selected by [y]: - DMA_RALINK [=y] && STAGING [=y] && RALINK [=y] && !SOC_RT288X [=n] WARNING: unmet direct dependencies detected for DMA_VIRTUAL_CHANNELS Depends on [n]: DMADEVICES [=n] Selected by [y]: - DMA_RALINK [=y] && STAGING [=y] && RALINK [=y] && !SOC_RT288X [=n] The reason is that DMA_RALINK selects DMA_ENGINE and DMA_VIRTUAL_CHANNELS without depending on or selecting DMADEVICES while DMA_ENGINE and DMA_VIRTUAL_CHANNELS are subordinate to DMADEVICES. This can also fail building the kernel as demonstrated in a bug report. Honor the kconfig dependency to remove unmet direct dependency warnings and avoid any potential build failures. Link: https://bugzilla.kernel.org/show_bug.cgi?id=210055 Signed-off-by: Necip Fazil Yildiran Link: https://lore.kernel.org/r/20201104181522.43567-1-fazilyildiran@gmail.com Signed-off-by: Greg Kroah-Hartman commit e2b2e4386cb7a5e935dff388cf8961317daf39ce Author: Sergio Paracuellos Date: Mon Nov 2 21:25:15 2020 +0100 staging: mt7621-pci: avoid to request pci bus resources After upgrading kernel to version 5.9.x the driver was not working anymore showing the following kernel trace: ... mt7621-pci 1e140000.pcie: resource collision: [mem 0x60000000-0x6fffffff] conflicts with pcie@1e140000 [mem 0x60000000-0x6fffffff] ------------[ cut here ]------------ WARNING: CPU: 2 PID: 73 at kernel/resource.c:1400 devm_request_resource+0xfc/0x10c Modules linked in: CPU: 2 PID: 73 Comm: kworker/2:1 Not tainted 5.9.2 #0 Workqueue: events deferred_probe_work_func Stack : 00000000 81590000 807d0a1c 808a0000 8fd49080 807d0000 00000009 808ac820 00000001 808338d0 7fff0001 800839dc 00000049 00000001 8fe51b00 367204ab 00000000 00000000 807d0a1c 807c0000 00000001 80082358 8fe50000 00559000 00000000 8fe519f1 ffffffff 00000005 00000000 00000001 00000000 807d0000 00000009 808ac820 00000001 808338d0 00000001 803bf1b0 00000008 81390008 Call Trace: [<8000d018>] show_stack+0x30/0x100 [<8032e66c>] dump_stack+0xa4/0xd4 [<8002db1c>] __warn+0xc0/0x134 [<8002dbec>] warn_slowpath_fmt+0x5c/0xac [<80033b34>] devm_request_resource+0xfc/0x10c [<80365ff8>] devm_request_pci_bus_resources+0x58/0xdc [<8048e13c>] mt7621_pci_probe+0x8dc/0xe48 [<803d2140>] platform_drv_probe+0x40/0x94 [<803cfd94>] really_probe+0x108/0x4ec [<803cd958>] bus_for_each_drv+0x70/0xb0 [<803d0388>] __device_attach+0xec/0x164 [<803cec8c>] bus_probe_device+0xa4/0xc0 [<803cf1c4>] deferred_probe_work_func+0x80/0xc4 [<80048444>] process_one_work+0x260/0x510 [<80048a4c>] worker_thread+0x358/0x5cc [<8004f7d0>] kthread+0x134/0x13c [<80007478>] ret_from_kernel_thread+0x14/0x1c ---[ end trace a9dd2e37537510d3 ]--- mt7621-pci 1e140000.pcie: Error requesting resources mt7621-pci: probe of 1e140000.pcie failed with error -16 ... With commit 669cbc708122 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()"), the DT 'ranges' is parsed and populated into resources when the host bridge is allocated. The resources are requested as well, but that happens a 2nd time for this driver in mt7621_pcie_request_resources(). Hence we should avoid this second request. Also, the bus ranges was also populated by default, so we can remove it from mt7621_pcie_request_resources() to avoid the following trace if we don't avoid it: pci_bus 0000:00: busn_res: can not insert [bus 00-ff] under domain [bus 00-ff] (conflicts with (null) [bus 00-ff]) Function 'mt7621_pcie_request_resources' has been renamed into 'mt7621_pcie_add_resources' which now is a more accurate name for this function. Cc: stable@vger.kernel.org #5.9.x- Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20201102202515.19073-1-sergio.paracuellos@gmail.com Signed-off-by: Greg Kroah-Hartman commit 90574a9c02f1ed46d9d8fec222fbcf375eb90e9b Author: Lukas Bulwahn Date: Fri Nov 6 04:40:05 2020 +0100 printk: remove unneeded dead-store assignment make clang-analyzer on x86_64 defconfig caught my attention with: kernel/printk/printk_ringbuffer.c:885:3: warning: Value stored to 'desc' is never read [clang-analyzer-deadcode.DeadStores] desc = to_desc(desc_ring, head_id); ^ Commit b6cf8b3f3312 ("printk: add lockless ringbuffer") introduced desc_reserve() with this unneeded dead-store assignment. As discussed with John Ogness privately, this is probably just some minor left-over from previous iterations of the ringbuffer implementation. So, simply remove this unneeded dead assignment to make clang-analyzer happy. As compilers will detect this unneeded assignment and optimize this anyway, the resulting object code is identical before and after this change. No functional change. No change to object code. Signed-off-by: Lukas Bulwahn Reviewed-by: Sergey Senozhatsky Reviewed-by: John Ogness Reviewed-by: Nathan Chancellor Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20201106034005.18822-1-lukas.bulwahn@gmail.com commit d85b4b2bf2d4229847d76cfd81e48d5beb72f75b Author: Chi-Hsien Lin Date: Fri Oct 30 03:56:10 2020 -0500 MAINTAINERS: update maintainers list for Cypress - Update maintainers' email with Infineon hosted email - Add Chung-hsien Hsu as a maintainer Signed-off-by: Chi-Hsien Lin Signed-off-by: Wright Feng Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201030085610.145679-1-chi-hsien.lin@cypress.com commit 397a973b9978533418892c6453853c52b2ad8ec6 Author: Yan-Hsuan Chuang Date: Mon Oct 12 16:11:40 2020 +0800 MAINTAINERS: update Yan-Hsuan's email address Switch my email to gmail.com address. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201012081140.18085-1-tony0620emma@gmail.com commit c2c81bb2f69138f902e1a58d3bef6ad97fb8a92c Author: Palmer Dabbelt Date: Fri Oct 23 21:50:47 2020 -0700 RISC-V: Fix the VDSO symbol generaton for binutils-2.35+ We were relying on GNU ld's ability to re-link executable files in order to extract our VDSO symbols. This behavior was deemed a bug as of binutils-2.35 (specifically the binutils-gdb commit a87e1817a4 ("Have the linker fail if any attempt to link in an executable is made."), but as that has been backported to at least Debian's binutils-2.34 in may manifest in other places. The previous version of this was a bit of a mess: we were linking a static executable version of the VDSO, containing only a subset of the input symbols, which we then linked into the kernel. This worked, but certainly wasn't a supported path through the toolchain. Instead this new version parses the textual output of nm to produce a symbol table. Both rely on near-zero addresses being linkable, but as we rely on weak undefined symbols being linkable elsewhere I don't view this as a major issue. Fixes: e2c0cdfba7f6 ("RISC-V: User-facing API") Signed-off-by: Palmer Dabbelt commit 1074dd44c5ba377f90e2d0d99a784f73dbea6ff7 Author: Anup Patel Date: Wed Nov 4 12:07:13 2020 +0530 RISC-V: Use non-PGD mappings for early DTB access Currently, we use PGD mappings for early DTB mapping in early_pgd but this breaks Linux kernel on SiFive Unleashed because on SiFive Unleashed PMP checks don't work correctly for PGD mappings. To fix early DTB mappings on SiFive Unleashed, we use non-PGD mappings (i.e. PMD) for early DTB access. Fixes: 8f3a2b4a96dc ("RISC-V: Move DT mapping outof fixmap") Signed-off-by: Anup Patel Reviewed-by: Atish Patra Tested-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 635e3f3e47f24b2506bc9daf91d70ddf3cd024a9 Author: Changbin Du Date: Mon Nov 2 15:30:52 2020 +0800 riscv: uaccess: fix __put_kernel_nofault() The copy_from_kernel_nofault() is broken on riscv because the 'dst' and 'src' are mistakenly reversed in __put_kernel_nofault() macro. copy_to_kernel_nofault: ... 0xffffffe0003159b8 <+30>: sd a4,0(a1) # a1 aka 'src' Fixes: d464118cdc ("riscv: implement __get_kernel_nofault and __put_user_nofault") Signed-off-by: Changbin Du Reviewed-by: Christoph Hellwig Reviewed-by: Anup Patel Tested-by: Anup Patel Signed-off-by: Palmer Dabbelt commit bcacf5f6f239a9e60287680514f392748cb4ec39 Author: Liu Shaohua Date: Mon Oct 26 20:26:54 2020 +0800 riscv: fix pfn_to_virt err in do_page_fault(). The argument to pfn_to_virt() should be pfn not the value of CSR_SATP. Reviewed-by: Palmer Dabbelt Reviewed-by: Anup Patel Signed-off-by: liush Reviewed-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit d3bec0138bfbe58606fc1d6f57a4cdc1a20218db Author: David Verbeiren Date: Wed Nov 4 12:23:32 2020 +0100 bpf: Zero-fill re-used per-cpu map element Zero-fill element values for all other cpus than current, just as when not using prealloc. This is the only way the bpf program can ensure known initial values for all cpus ('onallcpus' cannot be set when coming from the bpf program). The scenario is: bpf program inserts some elements in a per-cpu map, then deletes some (or userspace does). When later adding new elements using bpf_map_update_elem(), the bpf program can only set the value of the new elements for the current cpu. When prealloc is enabled, previously deleted elements are re-used. Without the fix, values for other cpus remain whatever they were when the re-used entry was previously freed. A selftest is added to validate correct operation in above scenario as well as in case of LRU per-cpu map element re-use. Fixes: 6c9059817432 ("bpf: pre-allocate hash map elements") Signed-off-by: David Verbeiren Signed-off-by: Alexei Starovoitov Acked-by: Matthieu Baerts Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201104112332.15191-1-david.verbeiren@tessares.net commit 356583b956e620a7ef8086f14bfe971986a320b3 Merge: f56fb0122c415 9522750c66c68 Author: Dave Airlie Date: Fri Nov 6 13:32:07 2020 +1000 Merge tag 'drm-misc-fixes-2020-11-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Some patches for vc4 to fix some resources cleanup issues, two fixes for panfrost for madvise and the shrinker and a constification of fonts structure Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201105101354.socyu26jwyns7lfj@gilmour.lan commit 3fb4a8fa28b740709bdd3229b80279957f4d37ed Author: Scott Cheloha Date: Thu Nov 5 16:30:40 2020 -0600 powerpc/numa: Fix build when CONFIG_NUMA=n Add a non-NUMA definition for of_drconf_to_nid_single() to topology.h so we have one even if powerpc/mm/numa.c is not compiled. On a non-NUMA kernel the appropriate node id is always first_online_node. Fixes: 72cdd117c449 ("pseries/hotplug-memory: hot-add: skip redundant LMB lookup") Reported-by: kernel test robot Signed-off-by: Scott Cheloha Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201105223040.3612663-1-cheloha@linux.ibm.com commit 7c0afcad7507636529e6a5a2a5eef5482619a449 Author: Randy Dunlap Date: Thu Nov 5 11:51:09 2020 -0800 bpf: BPF_PRELOAD depends on BPF_SYSCALL Fix build error when BPF_SYSCALL is not set/enabled but BPF_PRELOAD is by making BPF_PRELOAD depend on BPF_SYSCALL. ERROR: modpost: "bpf_preload_ops" [kernel/bpf/preload/bpf_preload.ko] undefined! Reported-by: kernel test robot Reported-by: Randy Dunlap Signed-off-by: Randy Dunlap Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201105195109.26232-1-rdunlap@infradead.org commit f9b7ff0d7f7a466a920424246e7ddc2b84c87e52 Author: Lorenz Bauer Date: Thu Nov 5 11:52:30 2020 +0000 tools/bpftool: Fix attaching flow dissector My earlier patch to reject non-zero arguments to flow dissector attach broke attaching via bpftool. Instead of 0 it uses -1 for target_fd. Fix this by passing a zero argument when attaching the flow dissector. Fixes: 1b514239e859 ("bpf: flow_dissector: Check value of unused flags to BPF_PROG_ATTACH") Reported-by: Jiri Benc Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201105115230.296657-1-lmb@cloudflare.com commit f56fb0122c4155f333ee9a50175dfe1e01cb12c1 Merge: 866bc2d3c40ab 4241b0411c60a Author: Dave Airlie Date: Fri Nov 6 11:51:38 2020 +1000 Merge tag 'amd-drm-fixes-5.10-2020-11-04' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.10-2020-11-04: amdgpu: - Add support for more navi1x SKUs - Fix for suspend on CI dGPUs - VCN DPG fix for Picasso - Sienna Cichlid fixes - Polaris DPM fix - Add support for Green Sardine amdkfd: - Fix an allocation failure check MAINTAINERS: - Fix path for amdgpu power management Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201104205741.4100-1-alexander.deucher@amd.com commit 866bc2d3c40abc044c4ede51529a82dc0d561216 Merge: 53aa37fb8dc4b 537457a979a02 Author: Dave Airlie Date: Fri Nov 6 11:44:30 2020 +1000 Merge tag 'drm-intel-fixes-2020-11-05' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - GVT fixes including vGPU suspend/resume fixes and workaround for APL guest GPU hang. - Fix set domain's cache coherency (Chris) - Fixes around breadcrumbs (Chris) - Fix encoder lookup during PSR atomic (Imre) - Hold onto an explicit ref to i915_vma_work.pinned (Chris) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20201105173026.GA858446@intel.com commit 79605f1394261995c2b955c906a5a20fb27cdc84 Author: Sean Anderson Date: Thu Oct 22 16:30:12 2020 -0400 riscv: Set text_offset correctly for M-Mode M-Mode Linux is loaded at the start of RAM, not 2MB later. Perhaps this should be calculated based on PAGE_OFFSET somehow? Even better would be to deprecate text_offset and instead introduce something absolute. Signed-off-by: Sean Anderson Signed-off-by: Palmer Dabbelt commit 53aa37fb8dc4bc86cc446169b60e2afe33dc81b4 Merge: 3cea11cd5e3b0 36fba366cf9fa Author: Dave Airlie Date: Fri Nov 6 11:07:30 2020 +1000 Merge tag 'imx-drm-next-2020-10-30' of git://git.pengutronix.de/git/pza/linux into drm-fixes drm/imx: fixes and cleanups Remove unused functions and empty callbacks, let the dw_hdmi-imx driver reuse imx_drm_encoder_parse_of() instead of reimplementing it, replace the custom register spinlock with the regmap default spinlock and remove redundant tracking of enabled state in imx-tve, drop the explicit drm_mode_config_cleanup() call in imx-drm-core, reduce the scope of edid length variables that are not otherwise used in imx-ldb and parallel-display, fix a memory leak in the parallel-display bind error path, and drop an extraneous type qualifier from of_get_tve_mode(). Signed-off-by: Dave Airlie From: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/7e4af582027bbec269364b95f6978d061b48271a.camel@pengutronix.de commit a422490a595600659664901b609aacccdbba4a5f Author: Bhawanpreet Lakha Date: Fri Oct 16 14:57:23 2020 -0400 drm/amd/display: Add missing pflip irq If we have more than 4 displays we will run into dummy irq calls or flip timout issues. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Charlene Liu Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit 9a472ef7a3690ac0b77ebfb04c88fa795de2adea Author: Pavel Begunkov Date: Thu Nov 5 22:31:37 2020 +0000 io_uring: fix link lookup racing with link timeout We can't just go over linked requests because it may race with linked timeouts. Take ctx->completion_lock in that case. Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 49a361327332c9221438397059067f9b205f690d Author: Dai Ngo Date: Thu Oct 29 15:07:16 2020 -0400 NFSD: fix missing refcount in nfsd4_copy by nfsd4_do_async_copy Need to initialize nfsd4_copy's refcount to 1 to avoid use-after-free warning when nfs4_put_copy is called from nfsd4_cb_offload_release. Fixes: ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy") Signed-off-by: Dai Ngo Signed-off-by: J. Bruce Fields commit 36e1e5ba90fb3fba6888fae26e4dfc28bf70aaf1 Author: Dai Ngo Date: Thu Oct 29 15:07:15 2020 -0400 NFSD: Fix use-after-free warning when doing inter-server copy The source file nfsd_file is not constructed the same as other nfsd_file's via nfsd_file_alloc. nfsd_file_put should not be called to free the object; nfsd_file_put is not the inverse of kzalloc, instead kfree is called by nfsd4_do_async_copy when done. Fixes: ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy") Signed-off-by: Dai Ngo Signed-off-by: J. Bruce Fields commit 66d60e3ad1e44d42d940767f62bf265f107fb628 Author: Chuck Lever Date: Fri Oct 23 10:41:12 2020 -0400 NFSD: MKNOD should return NFSERR_BADTYPE instead of NFSERR_INVAL A late paragraph of RFC 1813 Section 3.3.11 states: | ... if the server does not support the target type or the | target type is illegal, the error, NFS3ERR_BADTYPE, should | be returned. Note that NF3REG, NF3DIR, and NF3LNK are | illegal types for MKNOD. The Linux NFS server incorrectly returns NFSERR_INVAL in these cases. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit d321ff589c16d8c2207485a6d7fbdb14e873d46e Author: Chuck Lever Date: Fri Oct 23 10:41:07 2020 -0400 SUNRPC: Fix general protection fault in trace_rpc_xdr_overflow() The TP_fast_assign() section is careful enough not to dereference xdr->rqst if it's NULL. The TP_STRUCT__entry section is not. Fixes: 5582863f450c ("SUNRPC: Add XDR overflow trace event") Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 1905cac9d621a10358bc2750f8b25b64df439a21 Author: Chuck Lever Date: Fri Oct 23 10:41:01 2020 -0400 NFSD: NFSv3 PATHCONF Reply is improperly formed Commit cc028a10a48c ("NFSD: Hoist status code encoding into XDR encoder functions") missed a spot. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 108aa503657ee2fe8aa071dc620d96372c252ecd Author: Benjamin Gwin Date: Tue Nov 3 12:11:06 2020 -0800 arm64: kexec_file: try more regions if loading segments fails It's possible that the first region picked for the new kernel will make it impossible to fit the other segments in the required 32GB window, especially if we have a very large initrd. Instead of giving up, we can keep testing other regions for the kernel until we find one that works. Suggested-by: Ryan O'Leary Signed-off-by: Benjamin Gwin Link: https://lore.kernel.org/r/20201103201106.2397844-1-bgwin@google.com Signed-off-by: Will Deacon commit 1978b3a53a74e3230cd46932b149c6e62e832e9a Author: Anand K Mistry Date: Thu Nov 5 16:33:04 2020 +1100 x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP On AMD CPUs which have the feature X86_FEATURE_AMD_STIBP_ALWAYS_ON, STIBP is set to on and spectre_v2_user_stibp == SPECTRE_V2_USER_STRICT_PREFERRED At the same time, IBPB can be set to conditional. However, this leads to the case where it's impossible to turn on IBPB for a process because in the PR_SPEC_DISABLE case in ib_prctl_set() the spectre_v2_user_stibp == SPECTRE_V2_USER_STRICT_PREFERRED condition leads to a return before the task flag is set. Similarly, ib_prctl_get() will return PR_SPEC_DISABLE even though IBPB is set to conditional. More generally, the following cases are possible: 1. STIBP = conditional && IBPB = on for spectre_v2_user=seccomp,ibpb 2. STIBP = on && IBPB = conditional for AMD CPUs with X86_FEATURE_AMD_STIBP_ALWAYS_ON The first case functions correctly today, but only because spectre_v2_user_ibpb isn't updated to reflect the IBPB mode. At a high level, this change does one thing. If either STIBP or IBPB is set to conditional, allow the prctl to change the task flag. Also, reflect that capability when querying the state. This isn't perfect since it doesn't take into account if only STIBP or IBPB is unconditionally on. But it allows the conditional feature to work as expected, without affecting the unconditional one. [ bp: Massage commit message and comment; space out statements for better readability. ] Fixes: 21998a351512 ("x86/speculation: Avoid force-disabling IBPB based on STIBP and enhanced IBRS.") Signed-off-by: Anand K Mistry Signed-off-by: Borislav Petkov Acked-by: Thomas Gleixner Acked-by: Tom Lendacky Link: https://lkml.kernel.org/r/20201105163246.v2.1.Ifd7243cd3e2c2206a893ad0a5b9a4f19549e22c6@changeid commit 1a50cf9a67ff2241c2949d30bc11c8dd4280eef8 Author: Maxim Mikityanskiy Date: Thu Oct 22 12:49:51 2020 +0300 net/mlx5e: Fix incorrect access of RCU-protected xdp_prog rq->xdp_prog is RCU-protected and should be accessed only with rcu_access_pointer for the NULL check in mlx5e_poll_rx_cq. rq->xdp_prog may change on the fly only from one non-NULL value to another non-NULL value, so the checks in mlx5e_xdp_handle and mlx5e_poll_rx_cq will have the same result during one NAPI cycle, meaning that no additional synchronization is needed. Fixes: fe45386a2082 ("net/mlx5e: Use RCU to protect rq->xdp_prog") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit c5eb51adf06b2644fa28d4af886bfdcc53e288da Author: Aya Levin Date: Wed Sep 23 12:58:44 2020 +0300 net/mlx5e: Fix VXLAN synchronization after function reload During driver reload, perform firmware tear-down which results in firmware losing the configured VXLAN ports. These ports are still available in the driver's database. Fix this by cleaning up driver's VXLAN database in the nic unload flow, before firmware tear-down. With that, minimize mlx5_vxlan_destroy() to remove only what was added in mlx5_vxlan_create() and warn on leftover UDP ports. Fixes: 18a2b7f969c9 ("net/mlx5: convert to new udp_tunnel infrastructure") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit ae35859445607f7f18dd4f332749219cd636ed59 Author: Parav Pandit Date: Mon Nov 2 12:41:28 2020 +0200 net/mlx5: E-switch, Avoid extack error log for disabled vport When E-switch vport is disabled, querying its hardware address is unsupported. Avoid setting extack error log message in such case. Fixes: f099fde16db3 ("net/mlx5: E-switch, Support querying port function mac address") Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 465e7baab6d93b399344f5868f84c177ab5cd16f Author: Maor Gottlieb Date: Wed Oct 21 08:42:49 2020 +0300 net/mlx5: Fix deletion of duplicate rules When a rule is duplicated, the refcount of the rule is increased so only the second deletion of the rule should cause destruction of the FTE. Currently, the FTE will be destroyed in the first deletion of rule since the modify_mask will be 0. Fix it and call to destroy FTE only if all the rules (FTE's children) have been removed. Fixes: 718ce4d601db ("net/mlx5: Consolidate update FTE for all removal changes") Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit f42139ba49791ab6b12443c60044872705b74a1e Author: Maxim Mikityanskiy Date: Thu Oct 8 11:34:03 2020 +0300 net/mlx5e: Use spin_lock_bh for async_icosq_lock async_icosq_lock may be taken from softirq and non-softirq contexts. It requires protection with spin_lock_bh, otherwise a softirq may be triggered in the middle of the critical section, and it may deadlock if it tries to take the same lock. This patch fixes such a scenario by using spin_lock_bh to disable softirqs on that CPU while inside the critical section. Fixes: 8d94b590f1e4 ("net/mlx5e: Turn XSK ICOSQ into a general asynchronous one") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 78c906e430b13d30a8cfbdef4ccbbe1686841a9e Author: Vlad Buslov Date: Mon Aug 31 16:17:29 2020 +0300 net/mlx5e: Protect encap route dev from concurrent release In functions mlx5e_route_lookup_ipv{4|6}() route_dev can be arbitrary net device and not necessary mlx5 eswitch port representor. As such, in order to ensure that route_dev is not destroyed concurrent the code needs either explicitly take reference to the device before releasing reference to rtable instance or ensure that caller holds rtnl lock. First approach is chosen as a fix since rtnl lock dependency was intentionally removed from mlx5 TC layer. To prevent unprotected usage of route_dev in encap code take a reference to the device before releasing rt. Don't save direct pointer to the device in mlx5_encap_entry structure and use ifindex instead. Modify users of route_dev pointer to properly obtain the net device instance from its ifindex. Fixes: 61086f391044 ("net/mlx5e: Protect encap hash table with mutex") Fixes: 6707f74be862 ("net/mlx5e: Update hw flows when encap source mac changed") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit e68e28b4a9d71261e3f8fd05a72d6cf0b443a493 Author: Maor Dickman Date: Wed Sep 30 16:31:11 2020 +0300 net/mlx5e: Fix modify header actions memory leak Modify header actions are allocated during parse tc actions and only freed during the flow creation, however, on error flow the allocated memory is wrongly unfreed. Fix this by calling dealloc_mod_hdr_actions in __mlx5e_add_fdb_flow and mlx5e_add_nic_flow error flow. Fixes: d7e75a325cb2 ("net/mlx5e: Add offloading of E-Switch TC pedit (header re-write) actions") Fixes: 2f4fe4cab073 ("net/mlx5e: Add offloading of NIC TC pedit (header re-write) actions") Signed-off-by: Maor Dickman Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 521b619acdc8f1f5acdac15b84f81fd9515b2aff Merge: 3249fe45639af 0d0d245104a42 Author: Linus Torvalds Date: Thu Nov 5 11:52:17 2020 -0800 Merge tag 'linux-kselftest-kunit-fixes-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kunit fixes from Shuah Khan: "Several kunit_tool and documentation fixes" * tag 'linux-kselftest-kunit-fixes-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: tools: fix kunit_tool tests for parsing test plans Documentation: kunit: Update Kconfig parts for KUNIT's module support kunit: test: fix remaining kernel-doc warnings kunit: Don't fail test suites if one of them is empty kunit: Fix kunit.py --raw_output option commit 3249fe45639afb0a025847d611dac692010822a8 Merge: 6732b35485737 645f224e7ba2f Author: Linus Torvalds Date: Thu Nov 5 11:41:38 2020 -0800 Merge tag 'trace-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Fix off-by-one error in retrieving the context buffer for trace_printk() - Fix off-by-one error in stack nesting limit - Fix recursion to not make all NMI code false positive as recursing - Stop losing events in function tracing when transitioning between irq context - Stop losing events in ring buffer when transitioning between irq context - Fix return code of error pointer in parse_synth_field() to prevent NULL pointer dereference. - Fix false positive of NMI recursion in kprobe event handling * tag 'trace-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: kprobes: Tell lockdep about kprobe nesting tracing: Make -ENOMEM the default error for parse_synth_field() ring-buffer: Fix recursion protection transitions between interrupt context tracing: Fix the checking of stackidx in __ftrace_trace_stack ftrace: Handle tracing when switching between context ftrace: Fix recursion check for NMI test tracing: Fix out of bounds write in get_trace_buf commit 6732b3548573780cd8e0ca17d90f3f1add6c0af7 Merge: 6f3f374ac05d0 dbf563eee0b8c Author: Linus Torvalds Date: Thu Nov 5 11:32:03 2020 -0800 Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fixes from Wei Liu: - clarify a comment (Michael Kelley) - change a pr_warn() to pr_info() (Olaf Hering) * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: x86/hyperv: Clarify comment on x2apic mode hv_balloon: disable warning when floor reached commit 6f3f374ac05d05cfa63d04f4479ead7e3cb6d087 Merge: cf26c714874c1 21fcdeec09ff4 Author: Linus Torvalds Date: Thu Nov 5 11:25:02 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "A few more merge window regressions that didn't make rc1: - New validation in the DMA layer triggers wrong use of the DMA layer in rxe, siw and rdmavt - Accidental change of a hypervisor facing ABI when widening the port speed u8 to u16 in vmw_pvrdma - Memory leak on error unwind in SRP target" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/srpt: Fix typo in srpt_unregister_mad_agent docstring RDMA/vmw_pvrdma: Fix the active_speed and phys_state value IB/srpt: Fix memory leak in srpt_add_one RDMA: Fix software RDMA drivers for dma mapping error commit cf26c714874c14941953f6658ef85d7ce3446a0a Merge: 3d55978f95ca3 9bd77a9ce31dd Author: Linus Torvalds Date: Thu Nov 5 11:16:34 2020 -0800 Merge tag 'spi-fix-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A small collection of driver specific fixes that have come in since the merge window, nothing too major here but all good to have" * tag 'spi-fix-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: fsl-dspi: fix wrong pointer in suspend/resume spi: bcm2835: fix gpio cs level inversion spi: imx: fix runtime pm support for !CONFIG_PM commit 3d55978f95ca3cb66ed9161f4ef5d6e6b9569c2b Merge: f786dfa3745b9 cf1ad559a20d1 Author: Linus Torvalds Date: Thu Nov 5 11:11:40 2020 -0800 Merge tag 'regulator-fix-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "An addition to MAINTAINERS plus a fix for a nasty bootstrapping problem which caused problems when we need to read the voltage of a regulator that is not yet available during initialization, we were not correctly distinguishing between this case and the case where a regulator is put into a bypass mode" * tag 'regulator-fix-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: defer probe when trying to get voltage from unresolved supply MAINTAINERS: Add entry for Qualcomm IPQ4019 VQMMC regulator commit f786dfa3745b92f2fa91e0a0b9f3509907111d96 Merge: 1a092479f3032 8c14577df4cd5 Author: Linus Torvalds Date: Thu Nov 5 11:04:29 2020 -0800 Merge tag 'pm-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix the device links support in runtime PM, correct mistakes in the cpuidle documentation, fix the handling of policy limits changes in the schedutil cpufreq governor, fix assorted issues in the OPP (operating performance points) framework and make one janitorial change. Specifics: - Unify the handling of managed and stateless device links in the runtime PM framework and prevent runtime PM references to devices from being leaked after device link removal (Rafael Wysocki). - Fix two mistakes in the cpuidle documentation (Julia Lawall). - Prevent the schedutil cpufreq governor from missing policy limits updates in some cases (Viresh Kumar). - Prevent static OPPs from being dropped by mistake (Viresh Kumar). - Prevent helper function in the OPP framework from returning prematurely (Viresh Kumar). - Prevent opp_table_lock from being held too long during removal of OPP tables with no more active references (Viresh Kumar). - Drop redundant semicolon from the Intel RAPL power capping driver (Tom Rix)" * tag 'pm-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: runtime: Resume the device earlier in __device_release_driver() PM: runtime: Drop pm_runtime_clean_up_links() PM: runtime: Drop runtime PM references to supplier on link removal powercap/intel_rapl: remove unneeded semicolon Documentation: PM: cpuidle: correct path name Documentation: PM: cpuidle: correct typo cpufreq: schedutil: Don't skip freq update if need_freq_update is set opp: Reduce the size of critical section in _opp_table_kref_release() opp: Fix early exit from dev_pm_opp_register_set_opp_helper() opp: Don't always remove static OPPs in _of_add_opp_table_v1() commit 1a092479f3032a0e155448062ba5e36aa61e2c32 Merge: d1dd461207b8d b9bc36704cca5 Author: Linus Torvalds Date: Thu Nov 5 10:57:01 2020 -0800 Merge tag 'fixes-2020-11-05' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull highmem initialization fix from Mike Rapoport: "Fix highmem initialization on arm and xtensa Recent refactoring of memblock iterators has broken initialization of highmem on arm and xtensa because it changed the way beginning and end of memory regions are rounded to PFNs. This fix restores the original behaviour" * tag 'fixes-2020-11-05' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: ARM, xtensa: highmem: avoid clobbering non-page aligned memory reservations commit d1dd461207b8d1dbeaadf1e0b4e85b833c3a7c1c Merge: e2557a2cdeb2e da7d554f7c62d Author: Linus Torvalds Date: Thu Nov 5 10:51:51 2020 -0800 Merge tag 'gfs2-v5.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fixes from Andreas Gruenbacher: "Various gfs2 fixes" * tag 'gfs2-v5.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Wake up when sd_glock_disposal becomes zero gfs2: Don't call cancel_delayed_work_sync from within delete work function gfs2: check for live vs. read-only file system in gfs2_fitrim gfs2: don't initialize statfs_change inodes in spectator mode gfs2: Split up gfs2_meta_sync into inode and rgrp versions gfs2: init_journal's undo directive should also undo the statfs inodes gfs2: Add missing truncate_inode_pages_final for sd_aspace gfs2: Free rd_bits later in gfs2_clear_rgrpd to fix use-after-free commit e2557a2cdeb2e6a6e258e27e63af34e3ac6c1069 Merge: 4ef8451b33266 832ea234277a2 Author: Linus Torvalds Date: Thu Nov 5 10:41:14 2020 -0800 Merge tag 'pci-v5.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Fix ACS regression that broke device pass-through (Rajat Jain) - Revert DesignWare ATU memory resource to use last entry to fix Tegra194 regression (Rob Herring) - Remove duplicate mvebu resource requests to fix regression on Turris Omnia (Rob Herring) * tag 'pci-v5.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: mvebu: Fix duplicate resource requests PCI: dwc: Restore ATU memory resource setup to use last entry PCI: Always enable ACS even if no ACS Capability commit 2bcbf42add911ef63a6d90e92001dc2bcb053e68 Author: Shannon Nelson Date: Wed Nov 4 11:56:06 2020 -0800 ionic: check port ptr before use Check for corner case of port_init failure before using the port_info pointer. Fixes: 4d03e00a2140 ("ionic: Add initial ethtool support") Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20201104195606.61184-1-snelson@pensando.io Signed-off-by: Jakub Kicinski commit 1bd14a66ee5200d6a24419cbd2e0a0fccd4da36f Author: Atish Patra Date: Wed Oct 7 14:51:59 2020 -0700 RISC-V: Remove any memblock representing unusable memory area RISC-V limits the physical memory size by -PAGE_OFFSET. Any memory beyond that size from DRAM start is unusable. Just remove any memblock pointing to those memory region without worrying about computing the maximum size. Signed-off-by: Atish Patra Reviewed-by: Mike Rapoport Signed-off-by: Palmer Dabbelt commit 93bd813c17763177cf87e96c2313bd4dd747d234 Author: Jack Yu Date: Thu Nov 5 11:08:04 2020 +0800 ASoC: rt1015: add delay to fix pop noise from speaker Add delay to fix pop noise from speaker. Signed-off-by: Jack Yu Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201105030804.31115-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit a6c96672a64f4f0e1bac9f37b5bb57d8ab551b4b Merge: 0938ecae432e7 f9d7c6eb23f7e Author: Takashi Iwai Date: Thu Nov 5 18:19:32 2020 +0100 Merge tag 'asoc-fix-v5.10-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.10 A batch of driver specific fixes that have come up since the merge window, nothing particularly major here but all good to have. commit 7d764b685ee1bc73a9fa2b6cb4d42fa72b943145 Author: Tommi Rantala Date: Thu Oct 8 15:26:33 2020 +0300 selftests: binderfs: use SKIP instead of XFAIL XFAIL is gone since commit 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP"), use SKIP instead. Fixes: 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP") Signed-off-by: Tommi Rantala Reviewed-by: Kees Cook Acked-by: Christian Brauner Signed-off-by: Shuah Khan commit afba8b0a2cc532b54eaf4254092f57bba5d7eb65 Author: Tommi Rantala Date: Thu Oct 8 15:26:32 2020 +0300 selftests: clone3: use SKIP instead of XFAIL XFAIL is gone since commit 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP"), use SKIP instead. Fixes: 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP") Signed-off-by: Tommi Rantala Reviewed-by: Kees Cook Acked-by: Christian Brauner Signed-off-by: Shuah Khan commit 1d44d0dd61b6121b49f25b731f2f7f605cb3c896 Author: Tommi Rantala Date: Thu Oct 8 15:26:31 2020 +0300 selftests: core: use SKIP instead of XFAIL in close_range_test.c XFAIL is gone since commit 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP"), use SKIP instead. Fixes: 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP") Signed-off-by: Tommi Rantala Reviewed-by: Kees Cook Acked-by: Christian Brauner Signed-off-by: Shuah Khan commit f3ae6c6e8a3ea49076d826c64e63ea78fbf9db43 Author: Tommi Rantala Date: Thu Oct 8 15:26:30 2020 +0300 selftests: proc: fix warning: _GNU_SOURCE redefined Makefile already contains -D_GNU_SOURCE, so we can remove it from the *.c files. Signed-off-by: Tommi Rantala Signed-off-by: Shuah Khan commit 6b47ab81c9a9b56a94882815e9949d40e4207c92 Author: Jens Axboe Date: Thu Nov 5 09:50:16 2020 -0700 io_uring: use correct pointer for io_uring_show_cred() Previous commit changed how we index the registered credentials, but neglected to update one spot that is used when the personalities are iterated through ->show_fdinfo(). Ensure we use the right struct type for the iteration. Reported-by: syzbot+a6d494688cdb797bdfce@syzkaller.appspotmail.com Fixes: 1e6fa5216a0e ("io_uring: COW io_identity on mismatch") Signed-off-by: Jens Axboe commit ef9865a442286e2737f37f56eb54c12ef8465905 Author: Pavel Begunkov Date: Thu Nov 5 14:06:19 2020 +0000 io_uring: don't forget to task-cancel drained reqs If there is a long-standing request of one task locking up execution of deferred requests, and the defer list contains requests of another task (all files-less), then a potential execution of __io_uring_task_cancel() by that another task will sleep until that first long-standing request completion, and that may take long. E.g. tsk1: req1/read(empty_pipe) -> tsk2: req(DRAIN) Then __io_uring_task_cancel(tsk2) waits for req1 completion. It seems we even can manufacture a complicated case with many tasks sharing many rings that can lock them forever. Cancel deferred requests for __io_uring_task_cancel() as well. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 21fcdeec09ff461b2f9a9ef4fcc3a136249e58a1 Author: Jason Gunthorpe Date: Thu Nov 5 11:38:29 2020 -0400 RDMA/srpt: Fix typo in srpt_unregister_mad_agent docstring htmldocs fails with: drivers/infiniband/ulp/srpt/ib_srpt.c:630: warning: Function parameter or member 'port_cnt' not described in 'srpt_unregister_mad_agent' Fixes: 372a1786283e ("IB/srpt: Fix memory leak in srpt_add_one") Reported-by: Stephen Rothwell Signed-off-by: Jason Gunthorpe commit 1f5eb8b17f02d216703ee56e4c3115f592b060fb Author: Kent Gibson Date: Thu Nov 5 18:40:49 2020 +0800 gpiolib: fix sysfs when cdev is not selected In gpiochip_setup_dev() the call to gpiolib_cdev_register() indirectly calls device_add(). This is still required for the sysfs even when CONFIG_GPIO_CDEV is not selected in the build. Replace the stubbed functions in gpiolib-cdev.h with macros in gpiolib.c that perform the required device_add() and device_del() when CONFIG_GPIO_CDEV is not selected. Fixes: d143493c01b7 (gpiolib: make cdev a build option) Reported-by: Nicolas Schichan Signed-off-by: Kent Gibson Tested-by: Nicolas Schichan Signed-off-by: Bartosz Golaszewski commit 9b92f5c51e9a41352d665f6f956bd95085a56a83 Author: Billy Tsai Date: Fri Oct 30 13:54:50 2020 +0800 pinctrl: aspeed: Fix GPI only function problem. Some gpio pin at aspeed soc is input only and the prefix name of these pin is "GPI" only. This patch fine-tune the condition of GPIO check from "GPIO" to "GPI" and it will fix the usage error of banks D and E in the AST2400/AST2500 and banks T and U in the AST2600. Fixes: 4d3d0e4272d8 ("pinctrl: Add core support for Aspeed SoCs") Signed-off-by: Billy Tsai Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20201030055450.29613-1-billy_tsai@aspeedtech.com Signed-off-by: Linus Walleij commit 7ae7a8de054253024624abebd86eb25c5bdaf1c8 Merge: 3cea11cd5e3b0 0a8a2c85b8358 Author: Jens Axboe Date: Thu Nov 5 07:10:50 2020 -0700 Merge tag 'nvme-5.10-2020-11-05' of git://git.infradead.org/nvme into block-5.10 Pull NVMe fixes from Christoph: "nvme fixes for 5.10: - revert a nvme_queue size optimization (Keith Bush) - fabrics timeout races fixes (Chao Leng and Sagi Grimberg)" * tag 'nvme-5.10-2020-11-05' of git://git.infradead.org/nvme: nvme-tcp: avoid repeated request completion nvme-rdma: avoid repeated request completion nvme-tcp: avoid race between time out and tear down nvme-rdma: avoid race between time out and tear down nvme: introduce nvme_sync_io_queues Revert "nvme-pci: remove last_sq_tail" commit 9ac924b98728c3733c91c6c59fc410827d0da49f Author: Jernej Skrabec Date: Wed Oct 21 22:33:25 2020 +0200 media: cedrus: h264: Fix check for presence of scaling matrix If scaling matrix control is present, VPU should not use default matrix. Fix that. Fixes: b3a23db0e2f8 ("media: cedrus: Use H264_SCALING_MATRIX only when required") Signed-off-by: Jernej Skrabec Acked-by: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e6fcf468c51da28c56ea447e147475a731acbdf1 Author: Randy Dunlap Date: Tue Oct 20 08:02:04 2020 +0200 media: media/platform/marvell-ccic: fix warnings when CONFIG_PM is not enabled Fix build warnings when CONFIG_PM is not set/enabled: ../drivers/media/platform/marvell-ccic/mmp-driver.c:324:12: warning: 'mmpcam_runtime_suspend' defined but not used [-Wunused-function] 324 | static int mmpcam_runtime_suspend(struct device *dev) ../drivers/media/platform/marvell-ccic/mmp-driver.c:310:12: warning: 'mmpcam_runtime_resume' defined but not used [-Wunused-function] 310 | static int mmpcam_runtime_resume(struct device *dev) Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2da185d6fe969ade346ad03461c3da860c602503 Author: Alexandre Courbot Date: Tue Oct 13 14:44:28 2020 +0200 media: mtk-vcodec: fix build breakage when one of VPU or SCP is enabled The addition of MT8183 support added a dependency on the SCP remoteproc module. However the initial patch used the "select" Kconfig directive, which may result in the SCP module to not be compiled if remoteproc was disabled. In such a case, mtk-vcodec would try to link against non-existent SCP symbols. "select" was clearly misused here as explained in kconfig-language.txt. Replace this by a "depends" directive on at least one of the VPU and SCP modules, to allow the driver to be compiled as long as one of these is enabled, and adapt the code to support this new scenario. Also adapt the Kconfig text to explain the extra requirements for MT8173 and MT8183. Reported-by: Sakari Ailus Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Fixes: bf1d556ad4e0 ("media: mtk-vcodec: abstract firmware interface") Signed-off-by: Mauro Carvalho Chehab commit 46233e91fa24a91bffca0680b1c55282ba601918 Author: Alexandre Courbot Date: Tue Oct 13 14:44:27 2020 +0200 media: mtk-vcodec: move firmware implementations into their own files mtk-vcodec supports two kinds of firmware, VPU and SCP. Both were supported from the same source files, but this is clearly unclean and makes it more difficult to disable support for one or the other. Move these implementations into their own file, after adding the necessary private interfaces. [hverkuil: smatch fix: mtk_vcodec_fw_vpu_init() error: uninitialized symbol 'rst_id'.] Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Fixes: bf1d556ad4e0 ("media: mtk-vcodec: abstract firmware interface") Signed-off-by: Mauro Carvalho Chehab commit 33fe43cfd9b1c20f6f9899b44bf04e91823ff1c9 Author: Christophe Leroy Date: Mon Oct 12 08:54:33 2020 +0000 powerpc/8xx: Manage _PAGE_ACCESSED through APG bits in L1 entry When _PAGE_ACCESSED is not set, a minor fault is expected. To do this, TLB miss exception ANDs _PAGE_PRESENT and _PAGE_ACCESSED into the L2 entry valid bit. To simplify the processing and reduce the number of instructions in TLB miss exceptions, manage it as an APG bit and get it next to _PAGE_GUARDED bit to allow a copy in one go. Then declare the corresponding groups as handling all accesses as user accesses. As the PP bits always define user as No Access, it will generate a fault. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/80f488db230c6b0e7b3b990d72bd94a8a069e93e.1602492856.git.christophe.leroy@csgroup.eu commit 29daf869cbab69088fe1755d9dd224e99ba78b56 Author: Christophe Leroy Date: Mon Oct 12 08:54:31 2020 +0000 powerpc/8xx: Always fault when _PAGE_ACCESSED is not set The kernel expects pte_young() to work regardless of CONFIG_SWAP. Make sure a minor fault is taken to set _PAGE_ACCESSED when it is not already set, regardless of the selection of CONFIG_SWAP. This adds at least 3 instructions to the TLB miss exception handlers fast path. Following patch will reduce this overhead. Also update the rotation instruction to the correct number of bits to reflect all changes done to _PAGE_ACCESSED over time. Fixes: d069cb4373fe ("powerpc/8xx: Don't touch ACCESSED when no SWAP.") Fixes: 5f356497c384 ("powerpc/8xx: remove unused _PAGE_WRITETHRU") Fixes: e0a8e0d90a9f ("powerpc/8xx: Handle PAGE_USER via APG bits") Fixes: 5b2753fc3e8a ("powerpc/8xx: Implementation of PAGE_EXEC") Fixes: a891c43b97d3 ("powerpc/8xx: Prepare handlers for _PAGE_HUGE for 512k pages.") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/af834e8a0f1fa97bfae65664950f0984a70c4750.1602492856.git.christophe.leroy@csgroup.eu commit 0540b0d2ce9073fd2a736d636218faa61c99e572 Author: Christophe Leroy Date: Sat Oct 10 15:14:29 2020 +0000 powerpc/40x: Always fault when _PAGE_ACCESSED is not set The kernel expects pte_young() to work regardless of CONFIG_SWAP. Make sure a minor fault is taken to set _PAGE_ACCESSED when it is not already set, regardless of the selection of CONFIG_SWAP. Fixes: 2c74e2586bb9 ("powerpc/40x: Rework 40x PTE access and TLB miss") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b02ca2ed2d3676a096219b48c0f69ec982a75bcf.1602342801.git.christophe.leroy@csgroup.eu commit 11522448e641e8f1690c9db06e01985e8e19b401 Author: Christophe Leroy Date: Sat Oct 10 15:14:30 2020 +0000 powerpc/603: Always fault when _PAGE_ACCESSED is not set The kernel expects pte_young() to work regardless of CONFIG_SWAP. Make sure a minor fault is taken to set _PAGE_ACCESSED when it is not already set, regardless of the selection of CONFIG_SWAP. Fixes: 84de6ab0e904 ("powerpc/603: don't handle PAGE_ACCESSED in TLB miss handlers.") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a44367744de54e2315b2f1a8cbbd7f88488072e0.1602342806.git.christophe.leroy@csgroup.eu commit 8c14577df4cd5c6d8b799bdfb3a0e94923f17d50 Merge: 9226c504e3641 23a881852f3ef 23d18dcfc5275 e213cd8f175c8 a8193af7ec0db Author: Rafael J. Wysocki Date: Thu Nov 5 13:26:02 2020 +0100 Merge branches 'pm-cpufreq', 'pm-cpuidle', 'pm-opp' and 'powercap' * pm-cpufreq: cpufreq: schedutil: Don't skip freq update if need_freq_update is set * pm-cpuidle: Documentation: PM: cpuidle: correct path name Documentation: PM: cpuidle: correct typo * pm-opp: opp: Reduce the size of critical section in _opp_table_kref_release() opp: Fix early exit from dev_pm_opp_register_set_opp_helper() opp: Don't always remove static OPPs in _of_add_opp_table_v1() * powercap: powercap/intel_rapl: remove unneeded semicolon commit 468600c6ec28613b756193c5f780aac062f1acdf Author: Dinghao Liu Date: Wed Oct 21 13:36:55 2020 +0800 btrfs: ref-verify: fix memory leak in btrfs_ref_tree_mod There is one error handling path that does not free ref, which may cause a minor memory leak. CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Josef Bacik Signed-off-by: Dinghao Liu Reviewed-by: David Sterba Signed-off-by: David Sterba commit cf89af146b7e62af55470cf5f3ec3c56ec144a5e Author: Anand Jain Date: Fri Oct 30 06:53:56 2020 +0800 btrfs: dev-replace: fail mount if we don't have replace item with target device If there is a device BTRFS_DEV_REPLACE_DEVID without the device replace item, then it means the filesystem is inconsistent state. This is either corruption or a crafted image. Fail the mount as this needs a closer look what is actually wrong. As of now if BTRFS_DEV_REPLACE_DEVID is present without the replace item, in __btrfs_free_extra_devids() we determine that there is an extra device, and free those extra devices but continue to mount the device. However, we were wrong in keeping tack of the rw_devices so the syzbot testcase failed: WARNING: CPU: 1 PID: 3612 at fs/btrfs/volumes.c:1166 close_fs_devices.part.0+0x607/0x800 fs/btrfs/volumes.c:1166 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 3612 Comm: syz-executor.2 Not tainted 5.9.0-rc4-syzkaller #0 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+0x198/0x1fd lib/dump_stack.c:118 panic+0x347/0x7c0 kernel/panic.c:231 __warn.cold+0x20/0x46 kernel/panic.c:600 report_bug+0x1bd/0x210 lib/bug.c:198 handle_bug+0x38/0x90 arch/x86/kernel/traps.c:234 exc_invalid_op+0x14/0x40 arch/x86/kernel/traps.c:254 asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:536 RIP: 0010:close_fs_devices.part.0+0x607/0x800 fs/btrfs/volumes.c:1166 RSP: 0018:ffffc900091777e0 EFLAGS: 00010246 RAX: 0000000000040000 RBX: ffffffffffffffff RCX: ffffc9000c8b7000 RDX: 0000000000040000 RSI: ffffffff83097f47 RDI: 0000000000000007 RBP: dffffc0000000000 R08: 0000000000000001 R09: ffff8880988a187f R10: 0000000000000000 R11: 0000000000000001 R12: ffff88809593a130 R13: ffff88809593a1ec R14: ffff8880988a1908 R15: ffff88809593a050 close_fs_devices fs/btrfs/volumes.c:1193 [inline] btrfs_close_devices+0x95/0x1f0 fs/btrfs/volumes.c:1179 open_ctree+0x4984/0x4a2d fs/btrfs/disk-io.c:3434 btrfs_fill_super fs/btrfs/super.c:1316 [inline] btrfs_mount_root.cold+0x14/0x165 fs/btrfs/super.c:1672 The fix here is, when we determine that there isn't a replace item then fail the mount if there is a replace target device (devid 0). CC: stable@vger.kernel.org # 4.19+ Reported-by: syzbot+4cfe71a4da060be47502@syzkaller.appspotmail.com Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit a4852cf268b5ae487ba18f2b24e44094afce0675 Author: David Sterba Date: Thu Jul 9 11:25:40 2020 +0200 btrfs: scrub: update message regarding read-only status Based on user feedback update the message printed when scrub fails to start due to write requirements. To make a distinction add a device id to the messages. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit f07728d541ebefcf3d2ec7bc99a3bffd052d9f90 Author: Dan Carpenter Date: Fri Oct 23 14:26:33 2020 +0300 btrfs: clean up NULL checks in qgroup_unreserve_range() Smatch complains that this code dereferences "entry" before checking whether it's NULL on the next line. Fortunately, rb_entry() will never return NULL so it doesn't cause a problem. We can clean up the NULL checking a bit to silence the warning and make the code more clear. Reviewed-by: Qu Wenruo Signed-off-by: Dan Carpenter Reviewed-by: David Sterba Signed-off-by: David Sterba commit fca3a45d08782a2bb85e048fb8e3128b1388d7b7 Author: Josef Bacik Date: Mon Oct 26 16:57:27 2020 -0400 btrfs: fix min reserved size calculation in merge_reloc_root The minimum reserve size was adjusted to take into account the height of the tree we are merging, however we can have a root with a level == 0. What we want is root_level + 1 to get the number of nodes we may have to cow. This fixes the enospc_debug warning pops with btrfs/101. Nikolay: this fixes failures on btrfs/060 btrfs/062 btrfs/063 and btrfs/195 That I was seeing, the call trace was: [ 3680.515564] ------------[ cut here ]------------ [ 3680.515566] BTRFS: block rsv returned -28 [ 3680.515585] WARNING: CPU: 2 PID: 8339 at fs/btrfs/block-rsv.c:521 btrfs_use_block_rsv+0x162/0x180 [ 3680.515587] Modules linked in: [ 3680.515591] CPU: 2 PID: 8339 Comm: btrfs Tainted: G W 5.9.0-rc8-default #95 [ 3680.515593] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/01/2014 [ 3680.515595] RIP: 0010:btrfs_use_block_rsv+0x162/0x180 [ 3680.515600] RSP: 0018:ffffa01ac9753910 EFLAGS: 00010282 [ 3680.515602] RAX: 0000000000000000 RBX: ffff984b34200000 RCX: 0000000000000027 [ 3680.515604] RDX: 0000000000000027 RSI: 0000000000000000 RDI: ffff984b3bd19e28 [ 3680.515606] RBP: 0000000000004000 R08: ffff984b3bd19e20 R09: 0000000000000001 [ 3680.515608] R10: 0000000000000004 R11: 0000000000000046 R12: ffff984b264fdc00 [ 3680.515609] R13: ffff984b13149000 R14: 00000000ffffffe4 R15: ffff984b34200000 [ 3680.515613] FS: 00007f4e2912b8c0(0000) GS:ffff984b3bd00000(0000) knlGS:0000000000000000 [ 3680.515615] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3680.515617] CR2: 00007fab87122150 CR3: 0000000118e42000 CR4: 00000000000006e0 [ 3680.515620] Call Trace: [ 3680.515627] btrfs_alloc_tree_block+0x8b/0x340 [ 3680.515633] ? __lock_acquire+0x51a/0xac0 [ 3680.515646] alloc_tree_block_no_bg_flush+0x4f/0x60 [ 3680.515651] __btrfs_cow_block+0x14e/0x7e0 [ 3680.515662] btrfs_cow_block+0x144/0x2c0 [ 3680.515670] merge_reloc_root+0x4d4/0x610 [ 3680.515675] ? btrfs_lookup_fs_root+0x78/0x90 [ 3680.515686] merge_reloc_roots+0xee/0x280 [ 3680.515695] relocate_block_group+0x2ce/0x5e0 [ 3680.515704] btrfs_relocate_block_group+0x16e/0x310 [ 3680.515711] btrfs_relocate_chunk+0x38/0xf0 [ 3680.515716] btrfs_shrink_device+0x200/0x560 [ 3680.515728] btrfs_rm_device+0x1ae/0x6a6 [ 3680.515744] ? _copy_from_user+0x6e/0xb0 [ 3680.515750] btrfs_ioctl+0x1afe/0x28c0 [ 3680.515755] ? find_held_lock+0x2b/0x80 [ 3680.515760] ? do_user_addr_fault+0x1f8/0x418 [ 3680.515773] ? __x64_sys_ioctl+0x77/0xb0 [ 3680.515775] __x64_sys_ioctl+0x77/0xb0 [ 3680.515781] do_syscall_64+0x31/0x70 [ 3680.515785] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported-by: Nikolay Borisov Fixes: 44d354abf33e ("btrfs: relocation: review the call sites which can be interrupted by signal") CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit e38fdb716702879a942017c85e84c0a3a9e4af96 Author: Josef Bacik Date: Mon Oct 26 16:57:26 2020 -0400 btrfs: print the block rsv type when we fail our reservation To help with debugging, print the type of the block rsv when we fail to use our target block rsv in btrfs_use_block_rsv. This now produces: [ 544.672035] BTRFS: block rsv 1 returned -28 which is still cryptic without consulting the enum in block-rsv.h but I guess it's better than nothing. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add note from Nikolay ] Signed-off-by: David Sterba commit a1fbc6750e212c5675a4e48d7f51d44607eb8756 Author: Matthew Wilcox (Oracle) Date: Sun Oct 4 19:04:26 2020 +0100 btrfs: fix potential overflow in cluster_pages_for_defrag on 32bit arch On 32-bit systems, this shift will overflow for files larger than 4GB as start_index is unsigned long while the calls to btrfs_delalloc_*_space expect u64. CC: stable@vger.kernel.org # 4.4+ Fixes: df480633b891 ("btrfs: extent-tree: Switch to new delalloc space reserve and release") Reviewed-by: Josef Bacik Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Sterba [ define the variable instead of repeating the shift ] Signed-off-by: David Sterba commit f8fa2c2e63c76e5d73526f38bdde59fdcfbea166 Author: Mika Westerberg Date: Mon Oct 5 18:55:24 2020 +0300 thunderbolt: Only configure USB4 wake for lane 0 adapters Only USB4 lane 0 adapter has the USB4 port capability for wakes so only program wakes on such adapters. Fixes: b2911a593a70 ("thunderbolt: Enable wakes from system suspend") Signed-off-by: Mika Westerberg commit 77455129fb5b2a8749330b2b40d0c8750b6bf076 Author: Casey Bowman Date: Wed Oct 7 16:13:07 2020 -0700 thunderbolt: Add uaccess dependency to debugfs interface Some calls in the debugfs interface are made to the linux/uaccess.h header, but the header is not referenced. So, for x86_64 architectures, this dependency seems to be pulled in elsewhere, which leads to a successful compilation. However, on arm/arm64 architectures, it was found to error out on implicit declarations. This change fixes the implicit declaration error by adding the linux/uaccess.h header. Fixes: 54e418106c76 ("thunderbolt: Add debugfs interface") Signed-off-by: Casey Bowman Signed-off-by: Mika Westerberg commit a663e0df4a374b8537562a44d1cecafb472cd65b Author: Mika Westerberg Date: Wed Oct 7 17:06:17 2020 +0300 thunderbolt: Fix memory leak if ida_simple_get() fails in enumerate_services() The svc->key field is not released as it should be if ida_simple_get() fails so fix that. Fixes: 9aabb68568b4 ("thunderbolt: Fix to check return value of ida_simple_get") Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg commit a835d3a114ab0dc2f0d8c6963c3f53734b1c5965 Author: Andy Shevchenko Date: Fri Oct 9 21:08:56 2020 +0300 pinctrl: mcp23s08: Print error message when regmap init fails It is useful for debugging to have the error message printed when regmap initialisation fails. Add it to the driver. Signed-off-by: Andy Shevchenko Cc: Martin Hundebøll Link: https://lore.kernel.org/r/20201009180856.4738-2-andriy.shevchenko@linux.intel.com Tested-by: Jan Kundrát Signed-off-by: Linus Walleij commit 2b12c13637134897ba320bd8906a8d918ee7069b Author: Andy Shevchenko Date: Fri Oct 9 21:08:55 2020 +0300 pinctrl: mcp23s08: Use full chunk of memory for regmap configuration It appears that simplification of mcp23s08_spi_regmap_init() made a regression due to wrong size calculation for dev_kmemdup() call. It misses the fact that config variable is already a pointer, thus the sizeof() calculation is wrong and only 4 or 8 bytes were copied. Fix the parameters to devm_kmemdup() to copy a full chunk of memory. Fixes: 0874758ecb2b ("pinctrl: mcp23s08: Refactor mcp23s08_spi_regmap_init()") Reported-by: Martin Hundebøll Signed-off-by: Andy Shevchenko Tested-by: Martin Hundebøll Link: https://lore.kernel.org/r/20201009180856.4738-1-andriy.shevchenko@linux.intel.com Tested-by: Jan Kundrát Signed-off-by: Linus Walleij commit 567b8e9fed8add9e20885be38ecd73bb0e07406b Author: Lars Povlsen Date: Wed Nov 4 23:02:23 2020 +0100 HID: mcp2221: Fix GPIO output handling The mcp2221 driver GPIO output handling has has several issues. * A wrong value is used for the GPIO direction. * Wrong offsets are calculated for some GPIO set value/set direction operations, when offset is larger than 0. This has been fixed by introducing proper manifest constants for the direction encoding, and using 'offsetof' when calculating GPIO register offsets. The updated driver has been tested with the Sparx5 pcb134/pcb135 board, which has the mcp2221 device with several (output) GPIO's. Fixes: 328de1c519c5c092 ("HID: mcp2221: add GPIO functionality support") Reviewed-by: Rishi Gupta Signed-off-by: Lars Povlsen Signed-off-by: Jiri Kosina commit 34a9fa2025d9d3177c99351c7aaf256c5f50691f Author: Pablo Ceballos Date: Mon Nov 2 19:29:39 2020 -0500 HID: hid-sensor-hub: Fix issue with devices with no report ID Some HID devices don't use a report ID because they only have a single report. In those cases, the report ID in struct hid_report will be zero and the data for the report will start at the first byte, so don't skip over the first byte. Signed-off-by: Pablo Ceballos Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 0938ecae432e7ac8b01080c35dd81d50a1e43033 Author: Geoffrey D. Bennett Date: Wed Nov 4 22:27:17 2020 +1030 ALSA: usb-audio: Add implicit feedback quirk for Qu-16 This patch fixes audio distortion on playback for the Allen&Heath Qu-16. Signed-off-by: Geoffrey D. Bennett Cc: Link: https://lore.kernel.org/r/20201104115717.GA19046@b4.vu Signed-off-by: Takashi Iwai commit 0f52fcb99ea2738a0a0f28e12cf4dd427069dd2a Author: Can Guo Date: Mon Nov 2 22:24:40 2020 -0800 scsi: ufs: Try to save power mode change and UIC cmd completion timeout Use the uic_cmd->cmd_active as a flag to track the lifecycle of an UIC cmd. The flag is set before sending the UIC cmd and cleared in IRQ handler. When a PMC or UIC cmd completion timeout happens, if the flag is not set, instead of returning timeout error, we still treat it as a successful operation. This is to deal with the scenario in which completion has been raised but the one waiting for the completion cannot be awaken in time due to kernel scheduling problem. Link: https://lore.kernel.org/r/1604384682-15837-3-git-send-email-cang@codeaurora.org Reviewed-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit da3fecb0040324c08f1587e5bff1f15f36be1872 Author: Can Guo Date: Mon Nov 2 22:24:39 2020 -0800 scsi: ufs: Fix unbalanced scsi_block_reqs_cnt caused by ufshcd_hold() The scsi_block_reqs_cnt increased in ufshcd_hold() is supposed to be decreased back in ufshcd_ungate_work() in a paired way. However, if specific ufshcd_hold/release sequences are met, it is possible that scsi_block_reqs_cnt is increased twice but only one ungate work is queued. To make sure scsi_block_reqs_cnt is handled by ufshcd_hold() and ufshcd_ungate_work() in a paired way, increase it only if queue_work() returns true. Link: https://lore.kernel.org/r/1604384682-15837-2-git-send-email-cang@codeaurora.org Reviewed-by: Hongwu Su Reviewed-by: Stanley Chu Reviewed-by: Bean Huo Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 46afb0628b86347933b16ac966655f74eab65c8c Author: Darrick J. Wong Date: Mon Nov 2 17:14:07 2020 -0800 xfs: only flush the unshared range in xfs_reflink_unshare There's no reason to flush an entire file when we're unsharing part of a file. Therefore, only initiate writeback on the selected range. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R commit 2aaf09a0e7842b3ac7be6e0b8fb1888b3daeb3b3 Author: Heiner Kallweit Date: Tue Nov 3 18:52:18 2020 +0100 r8169: work around short packet hw bug on RTL8125 Network problems with RTL8125B have been reported [0] and with help from Realtek it turned out that this chip version has a hw problem with short packets (similar to RTL8168evl). Having said that activate the same workaround as for RTL8168evl. Realtek suggested to activate the workaround for RTL8125A too, even though they're not 100% sure yet which RTL8125 versions are affected. [0] https://bugzilla.kernel.org/show_bug.cgi?id=209839 Fixes: 0439297be951 ("r8169: add support for RTL8125B") Reported-by: Maxim Plotnikov Tested-by: Maxim Plotnikov Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/8002c31a-60b9-58f1-f0dd-8fd07239917f@gmail.com Signed-off-by: Jakub Kicinski commit c277ca155d2f0028a5c79708426d3f79b54a5fc1 Author: Peng Fan Date: Sun Nov 1 19:23:54 2020 +0800 clk: imx8m: fix bus critical clk registration noc/axi/ahb are bus clk, not peripheral clk. Since peripheral clk has a limitation that for peripheral clock slice, IP clock slices must be stopped to change the clock source. However if the bus clk is marked as critical clk peripheral, the assigned clock parent operation will fail. So we added CLK_SET_PARENT_GATE flag to avoid glitch. And add imx8m_clk_hw_composite_bus_critical for bus critical clock usage Fixes: 936c383673b9e ("clk: imx: fix composite peripheral flags") Reviewed-by: Abel Vesa Reported-by: Abel Vesa Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1604229834-25594-1-git-send-email-peng.fan@nxp.com Signed-off-by: Stephen Boyd commit 46b97aed5484a3f44584a10f9e0691bf89d29064 Author: Enric Balletbo i Serra Date: Mon Oct 5 18:22:41 2020 +0200 drm/mediatek: mtk_dpi: Fix unused variable 'mtk_dpi_encoder_funcs' Commit f89c696e7f63 ("drm/mediatek: mtk_dpi: Convert to bridge driver") introduced the following build warning with W=1 drivers/gpu/drm/mediatek/mtk_dpi.c:530:39: warning: unused variable 'mtk_dpi_encoder_funcs' [-Wunused-const-variable] static const struct drm_encoder_funcs mtk_dpi_encoder_funcs = { This struct is and the 'mtk_dpi_encoder_destroy()' are not needed anymore, so remove them. Fixes: f89c696e7f63 ("drm/mediatek: mtk_dpi: Convert to bridge driver") Reported-by: kernel test robot Signed-off-by: Enric Balletbo i Serra Signed-off-by: Chun-Kuang Hu commit 1344a232016dbb0492be81f8517c4bf8fc1c6610 Author: Michael Ellerman Date: Wed Nov 4 22:17:42 2020 +1100 powerpc: Use asm_goto_volatile for put_user() Andreas reported that commit ee0a49a6870e ("powerpc/uaccess: Switch __put_user_size_allowed() to __put_user_asm_goto()") broke CLONE_CHILD_SETTID. Further inspection showed that the put_user() in schedule_tail() was missing entirely, the store not emitted by the compiler. <.schedule_tail>: mflr r0 std r0,16(r1) stdu r1,-112(r1) bl <.finish_task_switch> ld r9,2496(r3) cmpdi cr7,r9,0 bne cr7,<.schedule_tail+0x60> ld r3,392(r13) ld r9,1392(r3) cmpdi cr7,r9,0 beq cr7,<.schedule_tail+0x3c> li r4,0 li r5,0 bl <.__task_pid_nr_ns> nop bl <.calculate_sigpending> nop addi r1,r1,112 ld r0,16(r1) mtlr r0 blr nop nop nop bl <.__balance_callback> b <.schedule_tail+0x1c> Notice there are no stores other than to the stack. There should be a stw in there for the store to current->set_child_tid. This is only seen with GCC 4.9 era compilers (tested with 4.9.3 and 4.9.4), and only when CONFIG_PPC_KUAP is disabled. When CONFIG_PPC_KUAP=y, the inline asm that's part of the isync() and mtspr() inlined via allow_user_access() seems to be enough to avoid the bug. We already have a macro to work around this (or a similar bug), called asm_volatile_goto which includes an empty asm block to tickle the compiler into generating the right code. So use that. With this applied the code generation looks more like it will work: <.schedule_tail>: mflr r0 std r31,-8(r1) std r0,16(r1) stdu r1,-144(r1) std r3,112(r1) bl <._mcount> nop ld r3,112(r1) bl <.finish_task_switch> ld r9,2624(r3) cmpdi cr7,r9,0 bne cr7,<.schedule_tail+0xa0> ld r3,2408(r13) ld r31,1856(r3) cmpdi cr7,r31,0 beq cr7,<.schedule_tail+0x80> li r4,0 li r5,0 bl <.__task_pid_nr_ns> nop li r9,-1 clrldi r9,r9,12 cmpld cr7,r31,r9 bgt cr7,<.schedule_tail+0x80> lis r9,16 rldicr r9,r9,32,31 subf r9,r31,r9 cmpldi cr7,r9,3 ble cr7,<.schedule_tail+0x80> li r9,0 stw r3,0(r31) <-- stw nop bl <.calculate_sigpending> nop addi r1,r1,144 ld r0,16(r1) ld r31,-8(r1) mtlr r0 blr nop bl <.__balance_callback> b <.schedule_tail+0x30> Fixes: ee0a49a6870e ("powerpc/uaccess: Switch __put_user_size_allowed() to __put_user_asm_goto()") Reported-by: Andreas Schwab Tested-by: Andreas Schwab Suggested-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201104111742.672142-1-mpe@ellerman.id.au commit 9d750c75bd2c3fcf20a3c15378d1bc6b2d4ec31f Author: Ryan Kosta Date: Sat Oct 10 20:03:51 2020 -0700 risc-v: kernel: ftrace: Fixes improper SPDX comment style Signed-off-by: Ryan Kosta Signed-off-by: Palmer Dabbelt commit 25cf73b9ff88fd4608699a0313f820758b4c252d Author: Magnus Karlsson Date: Tue Nov 3 10:41:30 2020 +0100 libbpf: Fix possible use after free in xsk_socket__delete Fix a possible use after free in xsk_socket__delete that will happen if xsk_put_ctx() frees the ctx. To fix, save the umem reference taken from the context and just use that instead. Fixes: 2f6324a3937f ("libbpf: Support shared umems between queues and devices") Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1604396490-12129-3-git-send-email-magnus.karlsson@gmail.com commit f78331f74cacb33d87cd60376dacc5bd397959e2 Author: Magnus Karlsson Date: Tue Nov 3 10:41:29 2020 +0100 libbpf: Fix null dereference in xsk_socket__delete Fix a possible null pointer dereference in xsk_socket__delete that will occur if a null pointer is fed into the function. Fixes: 2f6324a3937f ("libbpf: Support shared umems between queues and devices") Reported-by: Andrii Nakryiko Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1604396490-12129-2-git-send-email-magnus.karlsson@gmail.com commit db0362eeb22992502764e825c79b922d7467e0eb Author: Daniele Palmas Date: Tue Nov 3 13:44:25 2020 +0100 USB: serial: option: add Telit FN980 composition 0x1055 Add the following Telit FN980 composition: 0x1055: tty, adb, tty, tty, tty, tty Signed-off-by: Daniele Palmas Link: https://lore.kernel.org/r/20201103124425.12940-1-dnlplm@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 62575e270f661aba64778cbc5f354511cf9abb21 Author: Jeff Layton Date: Mon Oct 12 09:39:06 2020 -0400 ceph: check session state after bumping session->s_seq Some messages sent by the MDS entail a session sequence number increment, and the MDS will drop certain types of requests on the floor when the sequence numbers don't match. In particular, a REQUEST_CLOSE message can cross with one of the sequence morphing messages from the MDS which can cause the client to stall, waiting for a response that will never come. Originally, this meant an up to 5s delay before the recurring workqueue job kicked in and resent the request, but a recent change made it so that the client would never resend, causing a 60s stall unmounting and sometimes a blockisting event. Add a new helper for incrementing the session sequence and then testing to see whether a REQUEST_CLOSE needs to be resent, and move the handling of CEPH_MDS_SESSION_CLOSING into that function. Change all of the bare sequence counter increments to use the new helper. Reorganize check_session_state with a switch statement. It should no longer be called when the session is CLOSING, so throw a warning if it ever is (but still handle that case sanely). [ idryomov: whitespace, pr_err() call fixup ] URL: https://tracker.ceph.com/issues/47563 Fixes: fa9967734227 ("ceph: fix potential mdsc use-after-free crash") Reported-by: Patrick Donnelly Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 832ea234277a2465ec6602fa6a4db5cd9ee87ae3 Author: Rob Herring Date: Fri Oct 23 09:52:52 2020 -0500 PCI: mvebu: Fix duplicate resource requests With commit 669cbc708122 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()"), the DT 'ranges' is parsed and populated into resources when the host bridge is allocated. The resources are requested as well, but that happens a second time for the mvebu driver in mvebu_pcie_parse_request_resources(). We should only be requesting the additional resources added in mvebu_pcie_parse_request_resources(). These are not added by default because they use custom properties rather than standard DT address translation. Also, the bus ranges was also populated by default, so we can remove it from mvebu_pci_host_probe(). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=209729 Fixes: 669cbc708122 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()") Link: https://lore.kernel.org/r/20201023145252.2691779-1-robh@kernel.org Reported-by: vtolkm@googlemail.com Tested-by: Jan Kundrát Signed-off-by: Rob Herring Signed-off-by: Bjorn Helgaas Acked-by: Lorenzo Pieralisi Cc: Thomas Petazzoni Cc: Jason Cooper Cc: Russell King commit 9fff3256f93da6eb2b806eeaec8c1dc6e9a87194 Author: Rob Herring Date: Mon Oct 26 10:48:52 2020 -0500 PCI: dwc: Restore ATU memory resource setup to use last entry Prior to commit 0f71c60ffd26 ("PCI: dwc: Remove storing of PCI resources"), the DWC driver was setting up the last memory resource rather than the first memory resource. This doesn't matter for most platforms which only have 1 memory resource, but it broke Tegra194 which has a 2nd (prefetchable) memory region that requires an ATU entry. The first region on Tegra194 relies on the default 1:1 pass-thru of outbound transactions and doesn't need an ATU entry. Fixes: 0f71c60ffd26 ("PCI: dwc: Remove storing of PCI resources") Link: https://lore.kernel.org/r/20201026154852.221483-1-robh@kernel.org Reported-by: Vidya Sagar Signed-off-by: Rob Herring Signed-off-by: Bjorn Helgaas Acked-by: Lorenzo Pieralisi Acked-by: Jingoo Han Cc: Gustavo Pimentel commit ac6f929d74bad5e9e352aec936aeba0638bf560c Merge: 2da4c187aea31 ab07ff1c92fa6 Author: Jakub Kicinski Date: Wed Nov 4 10:36:37 2020 -0800 Merge tag 'linux-can-fixes-for-5.10-20201103' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2020-11-03 The first two patches are by Oleksij Rempel and they add a generic can-controller Device Tree yaml binding and convert the text based binding of the flexcan driver to a yaml based binding. Zhang Changzhong's patch fixes a remove_proc_entry warning in the AF_CAN core. A patch by me fixes a kfree_skb() call from IRQ context in the rx-offload helper. Vincent Mailhol contributes a patch to prevent a call to kfree_skb() in hard IRQ context in can_get_echo_skb(). Oliver Hartkopp's patch fixes the length calculation for RTR CAN frames in the __can_get_echo_skb() helper. Oleksij Rempel's patch fixes a use-after-free that shows up with j1939 in can_create_echo_skb(). Yegor Yefremov contributes 4 patches to enhance the j1939 documentation. Zhang Changzhong's patch fixes a hanging task problem in j1939_sk_bind() if the netdev is down. Then there are three patches for the newly added CAN_ISOTP protocol. Geert Uytterhoeven enhances the kconfig help text. Oliver Hartkopp's patch adds missing RX timeout handling in listen-only mode and Colin Ian King's patch decreases the generated object code by 926 bytes. Zhang Changzhong contributes a patch for the ti_hecc driver that fixes the error path in the probe function. Navid Emamdoost's patch for the xilinx_can driver fixes the error handling in case of failing pm_runtime_get_sync(). There are two patches for the peak_usb driver. Dan Carpenter adds range checking in decode operations and Stephane Grosjean's patch fixes a timestamp wrapping problem. Stephane Grosjean's patch for th peak_canfd driver fixes echo management if loopback is on. The next three patches all target the mcp251xfd driver. The first one is by me and it increased the severity of CRC read error messages. The kernel test robot removes an unneeded semicolon and Tom Rix removes unneeded break in several switch-cases. The last 4 patches are by Joakim Zhang and target the flexcan driver, the first three fix ECC related device specific quirks for the LS1021A, LX2160A and the VF610 SoC. The last patch disable wakeup completely upon driver remove. * tag 'linux-can-fixes-for-5.10-20201103' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: (27 commits) can: flexcan: flexcan_remove(): disable wakeup completely can: flexcan: add ECC initialization for VF610 can: flexcan: add ECC initialization for LX2160A can: flexcan: remove FLEXCAN_QUIRK_DISABLE_MECR quirk for LS1021A can: mcp251xfd: remove unneeded break can: mcp251xfd: mcp251xfd_regmap_nocrc_read(): fix semicolon.cocci warnings can: mcp251xfd: mcp251xfd_regmap_crc_read(): increase severity of CRC read error messages can: peak_canfd: pucan_handle_can_rx(): fix echo management when loopback is on can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping can: peak_usb: add range checking in decode operations can: xilinx_can: handle failure cases of pm_runtime_get_sync can: ti_hecc: ti_hecc_probe(): add missed clk_disable_unprepare() in error path can: isotp: padlen(): make const array static, makes object smaller can: isotp: isotp_rcv_cf(): enable RX timeout handling in listen-only mode can: isotp: Explain PDU in CAN_ISOTP help text can: j1939: j1939_sk_bind(): return failure if netdev is down can: j1939: use backquotes for code samples can: j1939: swap addr and pgn in the send example can: j1939: fix syntax and spelling can: j1939: rename jacd tool ... ==================== Link: https://lore.kernel.org/r/<20201103220636.972106-1-mkl@pengutronix.de> Signed-off-by: Jakub Kicinski commit 9bd77a9ce31dd242fece27219d14fbee5068dd85 Author: Zhao Qiang Date: Tue Nov 3 10:05:46 2020 +0800 spi: fsl-dspi: fix wrong pointer in suspend/resume Since commit 530b5affc675 ("spi: fsl-dspi: fix use-after-free in remove path"), this driver causes a "NULL pointer dereference" in dspi_suspend/resume. This is because since this commit, the drivers private data point to "dspi" instead of "ctlr", the codes in suspend and resume func were not modified correspondly. Fixes: 530b5affc675 ("spi: fsl-dspi: fix use-after-free in remove path") Signed-off-by: Zhao Qiang Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201103020546.1822-1-qiang.zhao@nxp.com Signed-off-by: Mark Brown commit f9d7c6eb23f7e55e7a0ca5451da06909bdfdd0e4 Author: Codrin Ciubotariu Date: Wed Nov 4 17:57:38 2020 +0200 ASoC: mchp-spdiftx: Do not set Validity bit(s) The Validity bits (bit 28) must not be set in order to have the samples valid. Some controllers look for this bit and ignore the samples if it is set. Fixes: 06ca24e98e6b ("ASoC: mchp-spdiftx: add driver for S/PDIF TX Controller") Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20201104155738.68403-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 99b328084f6a98bcee9fcd423c82ccfd52115da5 Author: Pavel Begunkov Date: Wed Nov 4 13:39:31 2020 +0000 io_uring: fix overflowed cancel w/ linked ->files Current io_match_files() check in io_cqring_overflow_flush() is useless because requests drop ->files before going to the overflow list, however linked to it request do not, and we don't check them. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit cb8a8ae310741d743fd02982307797f6a126f614 Author: Jens Axboe Date: Tue Nov 3 12:19:07 2020 -0700 io_uring: drop req/tctx io_identity separately We can't bundle this into one operation, as the identity may not have originated from the tctx to begin with. Drop one ref for each of them separately, if they don't match the static assignment. If we don't, then if the identity is a lookup from registered credentials, we could be freeing that identity as we're dropping a reference assuming it came from the tctx. syzbot reports this as a use-after-free, as the identity is still referencable from idr lookup: ================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: use-after-free in atomic_fetch_add_relaxed include/asm-generic/atomic-instrumented.h:142 [inline] BUG: KASAN: use-after-free in __refcount_add include/linux/refcount.h:193 [inline] BUG: KASAN: use-after-free in __refcount_inc include/linux/refcount.h:250 [inline] BUG: KASAN: use-after-free in refcount_inc include/linux/refcount.h:267 [inline] BUG: KASAN: use-after-free in io_init_req fs/io_uring.c:6700 [inline] BUG: KASAN: use-after-free in io_submit_sqes+0x15a9/0x25f0 fs/io_uring.c:6774 Write of size 4 at addr ffff888011e08e48 by task syz-executor165/8487 CPU: 1 PID: 8487 Comm: syz-executor165 Not tainted 5.10.0-rc1-next-20201102-syzkaller #0 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+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:192 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_fetch_add_relaxed include/asm-generic/atomic-instrumented.h:142 [inline] __refcount_add include/linux/refcount.h:193 [inline] __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] io_init_req fs/io_uring.c:6700 [inline] io_submit_sqes+0x15a9/0x25f0 fs/io_uring.c:6774 __do_sys_io_uring_enter+0xc8e/0x1b50 fs/io_uring.c:9159 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x440e19 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 eb 0f fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fff644ff178 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000000440e19 RDX: 0000000000000000 RSI: 000000000000450c RDI: 0000000000000003 RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000022b4850 R13: 0000000000000010 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 8487: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 kmalloc include/linux/slab.h:552 [inline] io_register_personality fs/io_uring.c:9638 [inline] __io_uring_register fs/io_uring.c:9874 [inline] __do_sys_io_uring_register+0x10f0/0x40a0 fs/io_uring.c:9924 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 8487: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x102/0x140 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1544 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1577 slab_free mm/slub.c:3140 [inline] kfree+0xdb/0x360 mm/slub.c:4122 io_identity_cow fs/io_uring.c:1380 [inline] io_prep_async_work+0x903/0xbc0 fs/io_uring.c:1492 io_prep_async_link fs/io_uring.c:1505 [inline] io_req_defer fs/io_uring.c:5999 [inline] io_queue_sqe+0x212/0xed0 fs/io_uring.c:6448 io_submit_sqe fs/io_uring.c:6542 [inline] io_submit_sqes+0x14f6/0x25f0 fs/io_uring.c:6784 __do_sys_io_uring_enter+0xc8e/0x1b50 fs/io_uring.c:9159 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888011e08e00 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 72 bytes inside of 96-byte region [ffff888011e08e00, ffff888011e08e60) The buggy address belongs to the page: page:00000000a7104751 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11e08 flags: 0xfff00000000200(slab) raw: 00fff00000000200 ffffea00004f8540 0000001f00000002 ffff888010041780 raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888011e08d00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff888011e08d80: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc > ffff888011e08e00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff888011e08e80: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff888011e08f00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ================================================================== Reported-by: syzbot+625ce3bb7835b63f7f3d@syzkaller.appspotmail.com Fixes: 1e6fa5216a0e ("io_uring: COW io_identity on mismatch") Signed-off-by: Jens Axboe commit 4b70cf9dea4cd239b425f3282fa56ce19e234c8a Author: Jens Axboe Date: Mon Nov 2 10:39:05 2020 -0700 io_uring: ensure consistent view of original task ->mm from SQPOLL Ensure we get a valid view of the task mm, by using task_lock() when attempting to grab the original task mm. Reported-by: syzbot+b57abf7ee60829090495@syzkaller.appspotmail.com Fixes: 2aede0e417db ("io_uring: stash ctx task reference for SQPOLL") Signed-off-by: Jens Axboe commit fdaf083cdfb556a45c422c8998268baf1ab26829 Author: Jens Axboe Date: Fri Oct 30 09:37:30 2020 -0600 io_uring: properly handle SQPOLL request cancelations Track if a given task io_uring context contains SQPOLL instances, so we can iterate those for cancelation (and request counts). This ensures that we properly wait on SQPOLL contexts, and find everything that needs canceling. Signed-off-by: Jens Axboe commit 3dd1680d1418f22f7ddaf98a4eab66285a099b3e Author: Jens Axboe Date: Fri Oct 30 09:36:41 2020 -0600 io-wq: cancel request if it's asking for files and we don't have them This can't currently happen, but will be possible shortly. Handle missing files just like we do not being able to grab a needed mm, and mark the request as needing cancelation. Signed-off-by: Jens Axboe commit 9d820f68b2bdba5b2e7bf135123c3f57c5051d05 Author: Thomas Gleixner Date: Wed Nov 4 14:06:23 2020 +0100 entry: Fix the incorrect ordering of lockdep and RCU check When an exception/interrupt hits kernel space and the kernel is not currently in the idle task then RCU must be watching. irqentry_enter() validates this via rcu_irq_enter_check_tick(), which in turn invokes lockdep when taking a lock. But at that point lockdep does not yet know about the fact that interrupts have been disabled by the CPU, which triggers a lockdep splat complaining about inconsistent state. Invoking trace_hardirqs_off() before rcu_irq_enter_check_tick() defeats the point of rcu_irq_enter_check_tick() because trace_hardirqs_off() uses RCU. So use the same sequence as for the idle case and tell lockdep about the irq state change first, invoke the RCU check and then do the lockdep and tracer update. Fixes: a5497bab5f72 ("entry: Provide generic interrupt entry/exit code") Reported-by: Mark Rutland Signed-off-by: Thomas Gleixner Tested-by: Mark Rutland Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87y2jhl19s.fsf@nanos.tec.linutronix.de commit c1f6b1ac00756a7108e5fcb849a2f8230c0b62a5 Author: Darrick J. Wong Date: Mon Nov 2 17:14:07 2020 -0800 xfs: fix scrub flagging rtinherit even if there is no rt device The kernel has always allowed directories to have the rtinherit flag set, even if there is no rt device, so this check is wrong. Fixes: 80e4e1268802 ("xfs: scrub inodes") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit c2f09217a4305478c55adc9a98692488dd19cd32 Author: Darrick J. Wong Date: Mon Nov 2 17:14:06 2020 -0800 xfs: fix missing CoW blocks writeback conversion retry In commit 7588cbeec6df, we tried to fix a race stemming from the lack of coordination between higher level code that wants to allocate and remap CoW fork extents into the data fork. Christoph cites as examples the always_cow mode, and a directio write completion racing with writeback. According to the comments before the goto retry, we want to restart the lookup to catch the extent in the data fork, but we don't actually reset whichfork or cow_fsb, which means the second try executes using stale information. Up until now I think we've gotten lucky that either there's something left in the CoW fork to cause cow_fsb to be reset, or either data/cow fork sequence numbers have advanced enough to force a fresh lookup from the data fork. However, if we reach the retry with an empty stable CoW fork and a stable data fork, neither of those things happens. The retry foolishly re-calls xfs_convert_blocks on the CoW fork which fails again. This time, we toss the write. I've recently been working on extending reflink to the realtime device. When the realtime extent size is larger than a single block, we have to force the page cache to CoW the entire rt extent if a write (or fallocate) are not aligned with the rt extent size. The strategy I've chosen to deal with this is derived from Dave's blocksize > pagesize series: dirtying around the write range, and ensuring that writeback always starts mapping on an rt extent boundary. This has brought this race front and center, since generic/522 blows up immediately. However, I'm pretty sure this is a bug outright, independent of that. Fixes: 7588cbeec6df ("xfs: retry COW fork delalloc conversion when no extent was found") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 50e7d6c7a5210063b9a6f0d8799d9d1440907fcf Author: Brian Foster Date: Thu Oct 29 14:30:49 2020 -0700 iomap: clean up writeback state logic on writepage error The iomap writepage error handling logic is a mash of old and slightly broken XFS writepage logic. When keepwrite writeback state tracking was introduced in XFS in commit 0d085a529b42 ("xfs: ensure WB_SYNC_ALL writeback handles partial pages correctly"), XFS had an additional cluster writeback context that scanned ahead of ->writepage() to process dirty pages over the current ->writepage() extent mapping. This context expected a dirty page and required retention of the TOWRITE tag on partial page processing so the higher level writeback context would revisit the page (in contrast to ->writepage(), which passes a page with the dirty bit already cleared). The cluster writeback mechanism was eventually removed and some of the error handling logic folded into the primary writeback path in commit 150d5be09ce4 ("xfs: remove xfs_cancel_ioend"). This patch accidentally conflated the two contexts by using the keepwrite logic in ->writepage() without accounting for the fact that the page is not dirty. Further, the keepwrite logic has no practical effect on the core ->writepage() caller (write_cache_pages()) because it never revisits a page in the current function invocation. Technically, the page should be redirtied for the keepwrite logic to have any effect. Otherwise, write_cache_pages() may find the tagged page but will skip it since it is clean. Even if the page was redirtied, however, there is still no practical effect to keepwrite since write_cache_pages() does not wrap around within a single invocation of the function. Therefore, the dirty page would simply end up retagged on the next writeback sequence over the associated range. All that being said, none of this really matters because redirtying a partially processed page introduces a potential infinite redirty -> writeback failure loop that deviates from the current design principle of clearing the dirty state on writepage failure to avoid building up too much dirty, unreclaimable memory on the system. Therefore, drop the spurious keepwrite usage and dirty state clearing logic from iomap_writepage_map(), treat the partially processed page the same as a fully processed page, and let the imminent ioend failure clean up the writeback state. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 763e4cdc0f6d5cea45c896fef67f7be4bdefcca7 Author: Brian Foster Date: Thu Oct 29 14:30:48 2020 -0700 iomap: support partial page discard on writeback block mapping failure iomap writeback mapping failure only calls into ->discard_page() if the current page has not been added to the ioend. Accordingly, the XFS callback assumes a full page discard and invalidation. This is problematic for sub-page block size filesystems where some portion of a page might have been mapped successfully before a failure to map a delalloc block occurs. ->discard_page() is not called in that error scenario and the bio is explicitly failed by iomap via the error return from ->prepare_ioend(). As a result, the filesystem leaks delalloc blocks and corrupts the filesystem block counters. Since XFS is the only user of ->discard_page(), tweak the semantics to invoke the callback unconditionally on mapping errors and provide the file offset that failed to map. Update xfs_discard_page() to discard the corresponding portion of the file and pass the range along to iomap_invalidatepage(). The latter already properly handles both full and sub-page scenarios by not changing any iomap or page state on sub-page invalidations. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 869ae85dae64b5540e4362d7fe4cd520e10ec05c Author: Brian Foster Date: Thu Oct 29 14:30:48 2020 -0700 xfs: flush new eof page on truncate to avoid post-eof corruption It is possible to expose non-zeroed post-EOF data in XFS if the new EOF page is dirty, backed by an unwritten block and the truncate happens to race with writeback. iomap_truncate_page() will not zero the post-EOF portion of the page if the underlying block is unwritten. The subsequent call to truncate_setsize() will, but doesn't dirty the page. Therefore, if writeback happens to complete after iomap_truncate_page() (so it still sees the unwritten block) but before truncate_setsize(), the cached page becomes inconsistent with the on-disk block. A mapped read after the associated page is reclaimed or invalidated exposes non-zero post-EOF data. For example, consider the following sequence when run on a kernel modified to explicitly flush the new EOF page within the race window: $ xfs_io -fc "falloc 0 4k" -c fsync /mnt/file $ xfs_io -c "pwrite 0 4k" -c "truncate 1k" /mnt/file ... $ xfs_io -c "mmap 0 4k" -c "mread -v 1k 8" /mnt/file 00000400: 00 00 00 00 00 00 00 00 ........ $ umount /mnt/; mount /mnt/ $ xfs_io -c "mmap 0 4k" -c "mread -v 1k 8" /mnt/file 00000400: cd cd cd cd cd cd cd cd ........ Update xfs_setattr_size() to explicitly flush the new EOF page prior to the page truncate to ensure iomap has the latest state of the underlying block. Fixes: 68a9f5e7007c ("xfs: implement iomap based buffered write path") Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2da4c187aea31b870bf11c9e4d00581002002216 Merge: fea07a487c6dd a779d91314ca7 Author: Jakub Kicinski Date: Wed Nov 4 08:12:52 2020 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== 1) Fix packet receiving of standard IP tunnels when the xfrm_interface module is installed. From Xin Long. 2) Fix a race condition between spi allocating and hash list resizing. From zhuoliang zhang. ==================== Signed-off-by: Jakub Kicinski commit 645f224e7ba2f4200bf163153d384ceb0de5462e Author: Steven Rostedt (VMware) Date: Mon Nov 2 09:17:49 2020 -0500 kprobes: Tell lockdep about kprobe nesting Since the kprobe handlers have protection that prohibits other handlers from executing in other contexts (like if an NMI comes in while processing a kprobe, and executes the same kprobe, it will get fail with a "busy" return). Lockdep is unaware of this protection. Use lockdep's nesting api to differentiate between locks taken in INT3 context and other context to suppress the false warnings. Link: https://lore.kernel.org/r/20201102160234.fa0ae70915ad9e2b21c08b85@kernel.org Cc: Peter Zijlstra Acked-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 8045ec42d14c6f77b5e925d1421150c043dfb75d Author: Jianqun Xu Date: Tue Oct 13 14:37:31 2020 +0800 pinctrl: rockchip: create irq mapping in gpio_to_irq Remove totally irq mappings create in probe, the gpio irq mapping will be created when do gpio_to_irq -> rockchip_gpio_to_irq -> irq_create_mapping This patch can speed up system boot on, also abandon many unused irq mappings' create. Signed-off-by: Jianqun Xu Reviewed-by: Heiko Stuebner Reviewed-by: Kever Yang Link: https://lore.kernel.org/r/20201013063731.3618-4-jay.xu@rock-chips.com Signed-off-by: Linus Walleij commit 63fbf8013b2f6430754526ef9594f229c7219b1f Author: Jianqun Xu Date: Tue Oct 13 14:37:30 2020 +0800 pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq There need to enable pclk_gpio when do irq_create_mapping, since it will do access to gpio controller. Signed-off-by: Jianqun Xu Reviewed-by: Heiko Stuebner Reviewed-by: Kever Yang Link: https://lore.kernel.org/r/20201013063731.3618-3-jay.xu@rock-chips.com Signed-off-by: Linus Walleij commit 26201ddc1373c99b2a67c5774da2f0eecd749b93 Author: Geoffrey D. Bennett Date: Wed Nov 4 22:37:05 2020 +1030 ALSA: usb-audio: Add implicit feedback quirk for MODX This patch fixes audio distortion on playback for the Yamaha MODX. Signed-off-by: Geoffrey D. Bennett Tested-by: Frank Slotta Cc: Link: https://lore.kernel.org/r/20201104120705.GA19126@b4.vu Signed-off-by: Takashi Iwai commit 07815a2b3501adeaae6384a25b9c4a9c81dae59f Author: Artem Lapkin Date: Tue Nov 3 18:08:09 2020 +0800 ALSA: usb-audio: add usb vendor id as DSD-capable for Khadas devices Khadas audio devices ( USB_ID_VENDOR 0x3353 ) have DSD-capable implementations from XMOS need add new usb vendor id for recognition Signed-off-by: Artem Lapkin Cc: Link: https://lore.kernel.org/r/20201103103311.5435-1-art@khadas.com Signed-off-by: Takashi Iwai commit 4241b0411c60a97f87a25ff4da92dac53beb3039 Author: Alex Deucher Date: Fri Oct 16 10:25:45 2020 -0400 drm/amdgpu/display: remove DRM_AMD_DC_GREEN_SARDINE No need for a separate config option at this point. Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit c236c0e5f5e27bce4171d980f2e03c1f1739978b Author: Roman Li Date: Thu Oct 8 13:32:47 2020 -0400 drm/amd/display: Add green_sardine support to DM Display Manager support for green_sardine Signed-off-by: Roman Li Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4a5346df6adfb9e5d25ea5981108c766adf867d8 Author: Roman Li Date: Thu Oct 8 13:28:41 2020 -0400 drm/amd/display: Add green_sardine support to DC Display Core support for green_sardine Signed-off-by: Roman Li Acked-by: Hersen Wu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d83d3ad61ce8f2b841ce6eacc23142634acbae46 Author: Thong Thai Date: Fri May 15 17:02:07 2020 -0400 drm/amdgpu: enable vcn support for green_sardine (v2) Enable Green_Sardine VCN support and VCN firmware loading v2: use apu flags Signed-off-by: Thong Thai Signed-off-by: Alex Deucher commit 68697982204b21c4789622ac018d8286120e0148 Author: Aaron Liu Date: Thu Oct 1 17:54:32 2020 -0400 drm/amdgpu: enable green_sardine_asd.bin loading (v2) This patch enable green_sardine_asd.bin loading. v2: use apu flags Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit f21aab1b31435f632fe117aa645dde9a42b009c1 Author: Prike Liang Date: Wed Nov 6 14:12:52 2019 +0800 drm/amdgpu/sdma: add sdma engine support for green_sardine (v2) Initialize the SDMA IP for green_sardine. v2: use apu flags Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 445b011d4ade483e5afc42b37c3c35d4586856b0 Author: Prike Liang Date: Wed Nov 6 13:42:28 2019 +0800 drm/amdgpu: add gfx support for green_sardine (v2) Enable the gfx base HW function of green_sardine. v2: use apu flags Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit aee68369ec2b1a8d9e2babdf59bb89226c785c6f Author: Prike Liang Date: Wed Nov 6 11:17:02 2019 +0800 drm/amdgpu: add soc15 common ip block support for green_sardine (v3) This patch adds common ip support for green_sardine. v2: use apu flags, squash in CG/PG enablement v3: rebase Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit c38577a4804d2a1d96b6e130dcc91cdb3b97cacb Author: Prike Liang Date: Thu Oct 1 17:52:15 2020 -0400 drm/amdgpu: add green_sardine support for gpu_info and ip block setting (v2) This patch adds green_sardine support for gpu_info firmware and ip block setting. v2: use apu flag Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 7be89985c4152b6d9628f5007eb074a8aea7fa11 Author: Alex Deucher Date: Fri May 15 16:32:36 2020 -0400 drm/amdgpu: add Green_Sardine APU flag Will be used for Green_Sardine which is a new APU. Signed-off-by: Alex Deucher commit 4d6ffa27b8e5116c0abb318790fd01d4e12d75e6 Author: Fangrui Song Date: Mon Nov 2 17:23:58 2020 -0800 x86/lib: Change .weak to SYM_FUNC_START_WEAK for arch/x86/lib/mem*_64.S Commit 393f203f5fd5 ("x86_64: kasan: add interceptors for memset/memmove/memcpy functions") added .weak directives to arch/x86/lib/mem*_64.S instead of changing the existing ENTRY macros to WEAK. This can lead to the assembly snippet .weak memcpy ... .globl memcpy which will produce a STB_WEAK memcpy with GNU as but STB_GLOBAL memcpy with LLVM's integrated assembler before LLVM 12. LLVM 12 (since https://reviews.llvm.org/D90108) will error on such an overridden symbol binding. Commit ef1e03152cb0 ("x86/asm: Make some functions local") changed ENTRY in arch/x86/lib/memcpy_64.S to SYM_FUNC_START_LOCAL, which was ineffective due to the preceding .weak directive. Use the appropriate SYM_FUNC_START_WEAK instead. Fixes: 393f203f5fd5 ("x86_64: kasan: add interceptors for memset/memmove/memcpy functions") Fixes: ef1e03152cb0 ("x86/asm: Make some functions local") Reported-by: Sami Tolvanen Signed-off-by: Fangrui Song Signed-off-by: Borislav Petkov Reviewed-by: Nick Desaulniers Tested-by: Nathan Chancellor Tested-by: Nick Desaulniers Cc: Link: https://lkml.kernel.org/r/20201103012358.168682-1-maskray@google.com commit d181bfe36715a1834958cf2d62253b624adfae51 Author: Greg Kroah-Hartman Date: Tue Nov 3 09:34:08 2020 +0100 Documentation: remove mic/index from misc-devices/index.rst With the recent removal of the misc/mic/ directory, the documentation build now warns because we forgot about this index file. Fix that up so that there are no more warnings here. Reported-by: Stephen Rothwell Cc: Sudeep Dutt Link: https://lore.kernel.org/r/20201103083408.GA2511903@kroah.com Signed-off-by: Greg Kroah-Hartman commit 489979b4aab490b6b917c11dc02d81b4b742784a Author: Daniele Palmas Date: Sat Oct 31 23:54:58 2020 +0100 USB: serial: option: add LE910Cx compositions 0x1203, 0x1230, 0x1231 Add following Telit LE910Cx compositions: 0x1203: rndis, tty, adb, tty, tty, tty, tty 0x1230: tty, adb, rmnet, audio, tty, tty, tty, tty 0x1231: rndis, tty, adb, audio, tty, tty, tty, tty Signed-off-by: Daniele Palmas Link: https://lore.kernel.org/r/20201031225458.10512-1-dnlplm@gmail.com [ johan: add comments after entries ] Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 985616f0457d9f555fff417d0da56174f70cc14f Author: Johan Hovold Date: Mon Oct 26 09:25:48 2020 +0100 USB: serial: cyberjack: fix write-URB completion race The write-URB busy flag was being cleared before the completion handler was done with the URB, something which could lead to corrupt transfers due to a racing write request if the URB is resubmitted. Fixes: 507ca9bc0476 ("[PATCH] USB: add ability for usb-serial drivers to determine if their write urb is currently being used.") Cc: stable # 2.6.13 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit a8643626d84b8f2b56cc72b804b5e78a5d1b9672 Merge: bcbc0b2e275f0 f83f3a31b2972 Author: Greg Kroah-Hartman Date: Wed Nov 4 10:16:03 2020 +0100 Merge tag 'misc-habanalabs-fixes-2020-11-04' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-next Oded writes: This tag contains the following fixes: - Fix the kernel pointer type we are using across the driver to prevent compiler warnings (from u64 to void*) - Configure GAUDI's MMU coresight component in the correct location. The current code had a bug where the configuration was not executed in some cases - Mask watchdog timeout errors in QMANs which can spam the kernel log * tag 'misc-habanalabs-fixes-2020-11-04' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: habanalabs/gaudi: mask WDT error in QMAN habanalabs/gaudi: move coresight mmu config habanalabs: fix kernel pointer type commit b9bc36704cca500e2b41be4c5bf615c1d7ddc3ce Author: Ard Biesheuvel Date: Sat Oct 31 11:43:45 2020 +0200 ARM, xtensa: highmem: avoid clobbering non-page aligned memory reservations free_highpages() iterates over the free memblock regions in high memory, and marks each page as available for the memory management system. Until commit cddb5ddf2b76 ("arm, xtensa: simplify initialization of high memory pages") it rounded beginning of each region upwards and end of each region downwards. However, after that commit free_highmem() rounds the beginning and end of each region downwards, and we may end up freeing a page that is memblock_reserve()d, resulting in memory corruption. Restore the original rounding of the region boundaries to avoid freeing reserved pages. Fixes: cddb5ddf2b76 ("arm, xtensa: simplify initialization of high memory pages") Link: https://lore.kernel.org/r/20201029110334.4118-1-ardb@kernel.org/ Link: https://lore.kernel.org/r/20201031094345.6984-1-rppt@kernel.org Signed-off-by: Ard Biesheuvel Co-developed-by: Mike Rapoport Signed-off-by: Mike Rapoport Acked-by: Max Filippov commit f83f3a31b2972ddc907fbb286c6446dd9db6e198 Author: Oded Gabbay Date: Mon Nov 2 18:36:03 2020 +0200 habanalabs/gaudi: mask WDT error in QMAN This interrupt cause is not relevant because of how the user use the QMAN arbitration mechanism. We must mask it as the log explodes with it. Signed-off-by: Oded Gabbay commit 1137e1ead98c0c75f7c5a9a12f0285c5155f20e2 Author: Ofir Bitton Date: Wed Sep 30 18:43:52 2020 +0300 habanalabs/gaudi: move coresight mmu config We must relocate the coresight mmu configuration to the coresight flow to make it work in case the first submission is to configure the profiler. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 82948e6e1d88d2383b82bd3f95c4241a674cd3d9 Author: Arnd Bergmann Date: Mon Oct 26 17:08:06 2020 +0100 habanalabs: fix kernel pointer type All throughout the driver, normal kernel pointers are stored as 'u64' struct members, which is kind of silly and requires casting through a uintptr_t to void* every time they are used. There is one line that missed the intermediate uintptr_t case, which leads to a compiler warning: drivers/misc/habanalabs/common/command_buffer.c: In function 'hl_cb_mmap': drivers/misc/habanalabs/common/command_buffer.c:512:44: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 512 | rc = hdev->asic_funcs->cb_mmap(hdev, vma, (void *) cb->kernel_address, Rather than adding one more cast, just fix the type and remove all the other casts. Fixes: 0db575350cb1 ("habanalabs: make use of dma_mmap_coherent") Signed-off-by: Arnd Bergmann Acked-by: Christoph Hellwig Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 18e8db7f6526928858dfa99b49d831497f0f8df8 Author: Robert Hancock Date: Tue Nov 3 13:33:15 2020 -0600 hwmon: (pmbus) Add mutex locking for sysfs reads As part of commit a919ba06979a7 ("hwmon: (pmbus) Stop caching register values"), the update of the sensor value is now triggered directly by the sensor attribute value being read from sysfs. This created (or at least made much more likely) a locking issue, since nothing protected the device page selection from being unexpectedly modified by concurrent reads. If sensor values on different pages on the same device were being concurrently read by multiple threads, this could cause spurious read errors due to the page register not reading back the same value last written, or sensor values being read from the incorrect page. Add locking of the update_lock mutex in pmbus_show_sensor and pmbus_show_samples so that these cannot result in concurrent reads from the underlying device. Fixes: a919ba06979a7 ("hwmon: (pmbus) Stop caching register values") Signed-off-by: Robert Hancock Reviewed-by: Alex Qiu Link: https://lore.kernel.org/r/20201103193315.3011800-1-robert.hancock@calian.com Signed-off-by: Guenter Roeck commit 26f4fd6d87cbf72376ee4f6a9dca1c95a3143563 Author: John Clements Date: Tue Nov 3 16:19:44 2020 +0800 drm/amdgpu: resolved ASD loading issue on sienna updated fw header v2 parser to set asd fw memory Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit 2e3a57f4905b4fa6d9b66e9a675c288093c93bf0 Author: Kent Russell Date: Mon Nov 2 11:17:59 2020 -0500 amdkfd: Check kvmalloc return before memcpy If we can't kvmalloc the pcrat_image, then we shouldn't memcpy Signed-off-by: Kent Russell Reported-by: kernel test robot Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a2404fd4823053db08d82582f4361e0978a98a24 Author: Likun Gao Date: Fri Oct 30 14:22:03 2020 +0800 drm/amdgpu: update golden setting for sienna_cichlid Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c6d2b0fbb893d5c7dda405aa0e7bcbecf1c75f98 Author: Veerabadhran Gopalakrishnan Date: Thu Oct 29 19:59:46 2020 +0530 amd/amdgpu: Disable VCN DPG mode for Picasso Concurrent operation of VCN and JPEG decoder in DPG mode is causing ring timeout due to power state. Signed-off-by: Veerabadhran Gopalakrishnan Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit e69251e7dc0b967e11811578389297f3b52052c3 Author: Alex Deucher Date: Tue Nov 3 18:22:07 2020 -0500 drm/amdgpu/swsmu: remove duplicate call to smu_set_default_dpm_table For kernel 5.10, this function was called twice right next to each other in the same function due to what looks like a mis-merge. Remove one of them. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit a30573b3cdc77b8533d004ece1ea7c0146b437a0 Author: Gao Xiang Date: Thu Oct 22 22:57:21 2020 +0800 erofs: fix setting up pcluster for temporary pages pcluster should be only set up for all managed pages instead of temporary pages. Since it currently uses page->mapping to identify, the impact is minor for now. [ Update: Vladimir reported the kernel log becomes polluted because PAGE_FLAGS_CHECK_AT_FREE flag(s) set if the page allocation debug option is enabled. ] Link: https://lore.kernel.org/r/20201022145724.27284-1-hsiangkao@aol.com Fixes: 5ddcee1f3a1c ("erofs: get rid of __stagingpage_alloc helper") Cc: # 5.5+ Tested-by: Vladimir Zapolskiy Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit d3938ee23e97bfcac2e0eb6b356875da73d700df Author: Gao Xiang Date: Sun Nov 1 03:51:02 2020 +0800 erofs: derive atime instead of leaving it empty EROFS has _only one_ ondisk timestamp (ctime is currently documented and recorded, we might also record mtime instead with a new compat feature if needed) for each extended inode since EROFS isn't mainly for archival purposes so no need to keep all timestamps on disk especially for Android scenarios due to security concerns. Also, romfs/cramfs don't have their own on-disk timestamp, and squashfs only records mtime instead. Let's also derive access time from ondisk timestamp rather than leaving it empty, and if mtime/atime for each file are really needed for specific scenarios as well, we can also use xattrs to record them then. Link: https://lore.kernel.org/r/20201031195102.21221-1-hsiangkao@aol.com [ Gao Xiang: It'd be better to backport for user-friendly concern. ] Fixes: 431339ba9042 ("staging: erofs: add inode operations") Cc: stable # 4.19+ Reported-by: nl6720 Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit fea07a487c6dd422dc8837237c9d2bc7c33119af Author: Eelco Chaudron Date: Tue Nov 3 09:25:49 2020 +0100 net: openvswitch: silence suspicious RCU usage warning Silence suspicious RCU usage warning in ovs_flow_tbl_masks_cache_resize() by replacing rcu_dereference() with rcu_dereference_ovsl(). In addition, when creating a new datapath, make sure it's configured under the ovs_lock. Fixes: 9bf24f594c6a ("net: openvswitch: make masks cache size configurable") Reported-by: syzbot+9a8f8bfcc56e8578016c@syzkaller.appspotmail.com Signed-off-by: Eelco Chaudron Link: https://lore.kernel.org/r/160439190002.56943.1418882726496275961.stgit@ebuild Signed-off-by: Jakub Kicinski commit 537457a979a02a410b555fab289dcb28b588f33b Author: Chris Wilson Date: Mon Nov 2 16:19:31 2020 +0000 drm/i915: Hold onto an explicit ref to i915_vma_work.pinned Since __vma_release is run by a kworker after the fence has been signaled, it is no longer protected by the active reference on the vma, and so the alias of vw->pinned to vma->obj is also not protected by a reference on the object. Add an explicit reference for vw->pinned so it will always be safe. Found by inspection. Fixes: 54d7195f8c64 ("drm/i915: Unpin vma->obj on early error") Reported-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v5.6+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20201102161931.30031-1-chris@chris-wilson.co.uk (cherry picked from commit bc73e5d33048b7ab5f12b11b5d923700467a8e1d) Signed-off-by: Rodrigo Vivi commit e67d01d8494640018b08cd767aeb2824a8e11983 Author: Chris Wilson Date: Mon Nov 2 22:10:57 2020 +0000 drm/i915/gt: Flush xcs before tgl breadcrumbs In a simple test case that writes to scratch and then busy-waits for the batch to be signaled, we observe that the signal is before the write is posted. That is bad news. Splitting the flush + write_dword into two separate flush_dw prevents the issue from being reproduced, we can presume the post-sync op is not so post-sync. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/216 Testcase: igt/gem_exec_fence/parallel Testcase: igt/i915_selftest/live/gt_timelines Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: stable@vger.kernel.org Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201102221057.29626-2-chris@chris-wilson.co.uk (cherry picked from commit 09212e81e5450743e5b06b27c4e344e4c45b630d) Signed-off-by: Rodrigo Vivi commit 306bb61d6bb3531b0d05429a771ac13a75aa30c8 Author: Chris Wilson Date: Mon Nov 2 22:10:56 2020 +0000 drm/i915/gt: Expose more parameters for emitting writes into the ring Add another lower level to emit_ggtt_write so that the GGTT nature of the write is not hardcoded into the emitter. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201102221057.29626-1-chris@chris-wilson.co.uk (cherry picked from commit 2739d8cfc50aafff49d599cc0a5bc855445e99a7) Signed-off-by: Rodrigo Vivi commit d9a57c853975742c8281f703b9e536d8aa016ec2 Author: Imre Deak Date: Tue Oct 27 18:09:28 2020 +0200 drm/i915: Fix encoder lookup during PSR atomic check The atomic check hooks must look up the encoder to be used with a connector from the connector's atomic state, and not assume that it's the connector's current attached encoder. The latter one can change under the atomic check func, or can be unset yet as in the case of MST connectors. This fixes [ 7.940719] Oops: 0000 [#1] SMP NOPTI [ 7.944407] CPU: 2 PID: 143 Comm: kworker/2:2 Not tainted 5.6.0-1023-oem #23-Ubuntu [ 7.952102] Hardware name: Dell Inc. Latitude 7320/, BIOS 88.87.11 09/07/2020 [ 7.959278] Workqueue: events output_poll_execute [drm_kms_helper] [ 7.965511] RIP: 0010:intel_psr_atomic_check+0x37/0xa0 [i915] [ 7.971327] Code: 80 2d 06 00 00 20 74 42 80 b8 34 71 00 00 00 74 39 48 8b 72 08 48 85 f6 74 30 80 b8 f8 71 00 00 00 74 27 4c 8b 87 80 04 00 00 <41> 8b 78 78 83 ff 08 77 19 31 c9 83 ff 05 77 19 48 81 c1 20 01 00 [ 7.977541] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input5 [ 7.990154] RSP: 0018:ffffb864c073fac8 EFLAGS: 00010202 [ 7.990155] RAX: ffff8c5d55ce0000 RBX: ffff8c5d54519000 RCX: 0000000000000000 [ 7.990155] RDX: ffff8c5d55cb30c0 RSI: ffff8c5d89a0c800 RDI: ffff8c5d55fcf800 [ 7.990156] RBP: ffffb864c073fac8 R08: 0000000000000000 R09: ffff8c5d55d9f3a0 [ 7.990156] R10: ffff8c5d55cb30c0 R11: 0000000000000009 R12: ffff8c5d55fcf800 [ 7.990156] R13: ffff8c5d55cb30c0 R14: ffff8c5d56989cc0 R15: ffff8c5d56989cc0 [ 7.990158] FS: 0000000000000000(0000) GS:ffff8c5d8e480000(0000) knlGS:0000000000000000 [ 8.047193] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 8.052970] CR2: 0000000000000078 CR3: 0000000856500005 CR4: 0000000000760ee0 [ 8.060137] PKRU: 55555554 [ 8.062867] Call Trace: [ 8.065361] intel_digital_connector_atomic_check+0x53/0x130 [i915] [ 8.071703] intel_dp_mst_atomic_check+0x5b/0x200 [i915] [ 8.077074] drm_atomic_helper_check_modeset+0x1db/0x790 [drm_kms_helper] [ 8.083942] intel_atomic_check+0x92/0xc50 [i915] [ 8.088705] ? drm_plane_check_pixel_format+0x4f/0xb0 [drm] [ 8.094345] ? drm_atomic_plane_check+0x7a/0x3a0 [drm] [ 8.099548] drm_atomic_check_only+0x2b1/0x450 [drm] [ 8.104573] drm_atomic_commit+0x18/0x50 [drm] [ 8.109070] drm_client_modeset_commit_atomic+0x1c9/0x200 [drm] [ 8.115056] drm_client_modeset_commit_force+0x55/0x160 [drm] [ 8.120866] drm_fb_helper_restore_fbdev_mode_unlocked+0x54/0xb0 [drm_kms_helper] [ 8.128415] drm_fb_helper_set_par+0x34/0x50 [drm_kms_helper] [ 8.134225] drm_fb_helper_hotplug_event.part.0+0xb4/0xe0 [drm_kms_helper] [ 8.141150] drm_fb_helper_hotplug_event+0x1c/0x30 [drm_kms_helper] [ 8.147481] intel_fbdev_output_poll_changed+0x6f/0xa0 [i915] [ 8.153287] drm_kms_helper_hotplug_event+0x2c/0x40 [drm_kms_helper] [ 8.159709] output_poll_execute+0x1aa/0x1c0 [drm_kms_helper] [ 8.165506] process_one_work+0x1e8/0x3b0 [ 8.169561] worker_thread+0x4d/0x400 [ 8.173249] kthread+0x104/0x140 [ 8.176515] ? process_one_work+0x3b0/0x3b0 [ 8.180726] ? kthread_park+0x90/0x90 [ 8.184416] ret_from_fork+0x1f/0x40 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2361 References: https://gitlab.freedesktop.org/drm/intel/-/issues/2486 Reported-by: William Tseng Reported-by: Cooper Chiou Cc: Signed-off-by: Imre Deak Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20201027160928.3665377-1-imre.deak@intel.com (cherry picked from commit 00e5deb5c4f5fe367311465e720e65cfa1178792) Signed-off-by: Rodrigo Vivi commit 8ce70996f759a37bac92e69ae0addd715227bfd1 Author: Chris Wilson Date: Thu Oct 22 07:41:27 2020 +0100 drm/i915/gt: Use the local HWSP offset during submission We wrap the timeline on construction of the next request, but there may still be requests in flight that have not yet finalized the breadcrumb. (The breadcrumb is delayed as we need engine-local offsets, and for the virtual engine that is not known until execution.) As such, by the time we write to the timeline's HWSP offset it may have changed, and we should use the value we preserved in the request instead. Though the window is small and infrequent (at full flow we can expect a timeline's seqno to wrap once every 30 minutes), the impact of writing the old seqno into the new HWSP is severe: the old requests are never completed, and the new requests are completed before they are even submitted. Fixes: ebece7539242 ("drm/i915: Keep timeline HWSP allocated until idle across the system") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: # v5.2+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201022064127.10159-1-chris@chris-wilson.co.uk (cherry picked from commit c10f6019d0b2dc8a6a62b55459f3ada5bc4e5e1a) Signed-off-by: Rodrigo Vivi commit 59dd13ad310793757e34afa489dd6fc8544fc3da Author: Chris Wilson Date: Mon Oct 19 21:38:25 2020 +0100 drm/i915/gem: Flush coherency domains on first set-domain-ioctl Avoid skipping what appears to be a no-op set-domain-ioctl if the cache coherency state is inconsistent with our target domain. This also has the utility of using the population of the pages to validate the backing store. The danger in skipping the first set-domain is leaving the cache inconsistent and submitting stale data, or worse leaving the clean data in the cache and not flushing it to the GPU. The impact should be small as it requires a no-op set-domain as the very first ioctl in a particular sequence not found in typical userspace. Reported-by: Zbigniew Kempczyński Fixes: 754a25442705 ("drm/i915: Skip object locking around a no-op set-domain ioctl") Testcase: igt/gem_mmap_offset/blt-coherency Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Matthew Auld Cc: Zbigniew Kempczyński Cc: # v5.2+ Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20201019203825.10966-1-chris@chris-wilson.co.uk (cherry picked from commit 44c2200afcd59f441b43f27829b4003397cc495d) Signed-off-by: Rodrigo Vivi commit 0dccdba51e852271a3dbc9358375f4c882b863f2 Merge: 3cea11cd5e3b0 92010a97098c4 Author: Rodrigo Vivi Date: Tue Nov 3 19:12:52 2020 -0500 Merge tag 'gvt-fixes-2020-10-30' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2020-10-30 - Fix HWSP reset handling during vGPU suspend/resume (Colin) - Apply flush workaround on APL now for possible guest hang (Colin) - Fix vGPU context pin/unpin also for host suspend regression with vGPU created (Colin) - more BXT/APL mmio cmd access fixes (Colin) Signed-off-by: Rodrigo Vivi From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20201030052117.GC27141@zhen-hp.sh.intel.com commit dbfe394dad33f99cf8458be50483ec40a5d29c34 Author: Vinay Kumar Yadav Date: Mon Nov 2 23:09:10 2020 +0530 chelsio/chtls: fix always leaking ctrl_skb Correct skb refcount in alloc_ctrl_skb(), causing skb memleak when chtls_send_abort() called with NULL skb. it was always leaking the skb, correct it by incrementing skb refs by one. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Vinay Kumar Yadav Link: https://lore.kernel.org/r/20201102173909.24826-1-vinay.yadav@chelsio.com Signed-off-by: Jakub Kicinski commit 8080b462b6aa856ae05ea010441a702599e579f2 Author: Vinay Kumar Yadav Date: Mon Nov 2 23:06:51 2020 +0530 chelsio/chtls: fix memory leaks caused by a race race between user context and softirq causing memleak, consider the call sequence scenario chtls_setkey() //user context chtls_peer_close() chtls_abort_req_rss() chtls_setkey() //user context work request skb queued in chtls_setkey() won't be freed because resources are already cleaned for this connection, fix it by not queuing work request while socket is closing. v1->v2: - fix W=1 warning. v2->v3: - separate it out from another memleak fix. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Vinay Kumar Yadav Link: https://lore.kernel.org/r/20201102173650.24754-1-vinay.yadav@chelsio.com Signed-off-by: Jakub Kicinski commit ab07ff1c92fa60f29438e655a1b4abab860ed0b6 Author: Joakim Zhang Date: Wed Oct 21 02:45:27 2020 +0800 can: flexcan: flexcan_remove(): disable wakeup completely With below sequence, we can see wakeup default is enabled after re-load module, if it was enabled before, so we need disable wakeup in flexcan_remove(). | # cat /sys/bus/platform/drivers/flexcan/5a8e0000.can/power/wakeup | disabled | # echo enabled > /sys/bus/platform/drivers/flexcan/5a8e0000.can/power/wakeup | # cat /sys/bus/platform/drivers/flexcan/5a8e0000.can/power/wakeup | enabled | # rmmod flexcan | # modprobe flexcan | # cat /sys/bus/platform/drivers/flexcan/5a8e0000.can/power/wakeup | enabled Fixes: de3578c198c6 ("can: flexcan: add self wakeup support") Fixes: 915f9666421c ("can: flexcan: add support for DT property 'wakeup-source'") Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20201020184527.8190-1-qiangqing.zhang@nxp.com [mkl: streamlined commit message] Signed-off-by: Marc Kleine-Budde commit 5fdf04a9fdc27fc6cd37bb2ae44a84a282323773 Author: Joakim Zhang Date: Tue Oct 20 23:53:57 2020 +0800 can: flexcan: add ECC initialization for VF610 For SoCs with ECC supported, even use FLEXCAN_QUIRK_DISABLE_MECR quirk to disable non-correctable errors interrupt and freeze mode, had better use FLEXCAN_QUIRK_SUPPORT_ECC quirk to initialize all memory. Fixes: cdce844865bea ("can: flexcan: add vf610 support for FlexCAN") Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20201020155402.30318-6-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit 91a22bfe928fe2ef975580cbcc75e233bc4fe0d0 Author: Joakim Zhang Date: Tue Oct 20 23:53:56 2020 +0800 can: flexcan: add ECC initialization for LX2160A After double check with Layerscape CAN owner (Pankaj Bansal), confirm that LX2160A indeed supports ECC feature, so correct the feature table. For SoCs with ECC supported, even use FLEXCAN_QUIRK_DISABLE_MECR quirk to disable non-correctable errors interrupt and freeze mode, had better use FLEXCAN_QUIRK_SUPPORT_ECC quirk to initialize all memory. Fixes: 2c19bb43e5572 ("can: flexcan: add lx2160ar1 support") Cc: Pankaj Bansal Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20201020155402.30318-5-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit 018799649071a1638c0c130526af36747df4355a Author: Joakim Zhang Date: Tue Oct 20 23:53:55 2020 +0800 can: flexcan: remove FLEXCAN_QUIRK_DISABLE_MECR quirk for LS1021A After double check with Layerscape CAN owner (Pankaj Bansal), confirm that LS1021A doesn't support ECC feature, so remove FLEXCAN_QUIRK_DISABLE_MECR quirk. Fixes: 99b7668c04b27 ("can: flexcan: adding platform specific details for LS1021A") Cc: Pankaj Bansal Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20201020155402.30318-4-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit 78db1aa8b552d2b99e9cbcaf461a5976a1d0d442 Author: Tom Rix Date: Mon Oct 19 10:24:12 2020 -0700 can: mcp251xfd: remove unneeded break A break is not needed if it is preceded by a return. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201019172412.31143-1-trix@redhat.com Signed-off-by: Marc Kleine-Budde commit da623840d8237ba6f4ec8f427e85bffb8fd4c3ec Author: kernel test robot Date: Mon Oct 19 20:08:05 2020 +0800 can: mcp251xfd: mcp251xfd_regmap_nocrc_read(): fix semicolon.cocci warnings drivers/net/can/spi/mcp251xfd/mcp251xfd-regmap.c:176:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 875347fe5756 ("can: mcp25xxfd: add regmap infrastructure") Signed-off-by: kernel test robot Link: https://lore.kernel.org/r/20201019120805.GA63693@ae4257e0ab22 Signed-off-by: Marc Kleine-Budde commit b4728920aefaf6cd10e3d9330805f7d2354c342f Author: Marc Kleine-Budde Date: Thu Oct 15 21:16:37 2020 +0200 can: mcp251xfd: mcp251xfd_regmap_crc_read(): increase severity of CRC read error messages During debugging it turned out that some people have setups where the SPI communication is more prone to CRC errors. Increase the severity of both the transfer retry and transfer failure message to give users feedback without the need to recompile the driver with debug enabled. Cc: Manivannan Sadhasivam Cc: Thomas Kopp Link: http://lore.kernel.org/r/20201019190524.1285319-15-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 93ef65e5a6357cc7381f85fcec9283fe29970045 Author: Stephane Grosjean Date: Tue Oct 13 17:39:47 2020 +0200 can: peak_canfd: pucan_handle_can_rx(): fix echo management when loopback is on Echo management is driven by PUCAN_MSG_LOOPED_BACK bit, while loopback frames are identified with PUCAN_MSG_SELF_RECEIVE bit. Those bits are set for each outgoing frame written to the IP core so that a copy of each one will be placed into the rx path. Thus, - when PUCAN_MSG_LOOPED_BACK is set then the rx frame is an echo of a previously sent frame, - when PUCAN_MSG_LOOPED_BACK+PUCAN_MSG_SELF_RECEIVE are set, then the rx frame is an echo AND a loopback frame. Therefore, this frame must be put into the socket rx path too. This patch fixes how CAN frames are handled when these are sent while the can interface is configured in "loopback on" mode. Signed-off-by: Stephane Grosjean Link: https://lore.kernel.org/r/20201013153947.28012-1-s.grosjean@peak-system.com Fixes: 8ac8321e4a79 ("can: peak: add support for PEAK PCAN-PCIe FD CAN-FD boards") Signed-off-by: Marc Kleine-Budde commit ecc7b4187dd388549544195fb13a11b4ea8e6a84 Author: Stephane Grosjean Date: Wed Oct 14 10:56:31 2020 +0200 can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping Fabian Inostroza has discovered a potential problem in the hardware timestamp reporting from the PCAN-USB USB CAN interface (only), related to the fact that a timestamp of an event may precede the timestamp used for synchronization when both records are part of the same USB packet. However, this case was used to detect the wrapping of the time counter. This patch details and fixes the two identified cases where this problem can occur. Reported-by: Fabian Inostroza Signed-off-by: Stephane Grosjean Link: https://lore.kernel.org/r/20201014085631.15128-1-s.grosjean@peak-system.com Fixes: bb4785551f64 ("can: usb: PEAK-System Technik USB adapters driver core") Signed-off-by: Marc Kleine-Budde commit a6921dd524fe31d1f460c161d3526a407533b6db Author: Dan Carpenter Date: Thu Aug 13 17:06:04 2020 +0300 can: peak_usb: add range checking in decode operations These values come from skb->data so Smatch considers them untrusted. I believe Smatch is correct but I don't have a way to test this. The usb_if->dev[] array has 2 elements but the index is in the 0-15 range without checks. The cfd->len can be up to 255 but the maximum valid size is CANFD_MAX_DLEN (64) so that could lead to memory corruption. Fixes: 0a25e1f4f185 ("can: peak_usb: add support for PEAK new CANFD USB adapters") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200813140604.GA456946@mwanda Acked-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit 79c43333bdd5a7026a5aab606b53053b643585e7 Author: Navid Emamdoost Date: Thu Jun 4 22:32:39 2020 -0500 can: xilinx_can: handle failure cases of pm_runtime_get_sync Calling pm_runtime_get_sync increments the counter even in case of failure, causing incorrect ref count. Call pm_runtime_put if pm_runtime_get_sync fails. Signed-off-by: Navid Emamdoost Link: https://lore.kernel.org/r/20200605033239.60664-1-navid.emamdoost@gmail.com Fixes: 4716620d1b62 ("can: xilinx: Convert to runtime_pm") Signed-off-by: Marc Kleine-Budde commit e002103b36a695f7cb6048b96da73e66c86ddffb Author: Zhang Changzhong Date: Fri Jul 17 16:04:39 2020 +0800 can: ti_hecc: ti_hecc_probe(): add missed clk_disable_unprepare() in error path The driver forgets to call clk_disable_unprepare() in error path after a success calling for clk_prepare_enable(). Fix it by adding a clk_disable_unprepare() in error path. Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1594973079-27743-1-git-send-email-zhangchangzhong@huawei.com Fixes: befa60113ce7 ("can: ti_hecc: add missing prepare and unprepare of the clock") Signed-off-by: Marc Kleine-Budde commit c3ddac4b0c9a280d4d5b670b4d39c50fee88579e Author: Colin Ian King Date: Tue Oct 20 16:42:03 2020 +0100 can: isotp: padlen(): make const array static, makes object smaller Don't populate the const array plen on the stack but instead it static. Makes the object code smaller by 926 bytes. Before: text data bss dec hex filename 26531 1943 64 28538 6f7a net/can/isotp.o After: text data bss dec hex filename 25509 2039 64 27612 6bdc net/can/isotp.o (gcc version 10.2.0) Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201020154203.54711-1-colin.king@canonical.com Signed-off-by: Marc Kleine-Budde commit 78656ea235191c8cf8475f8335860ca4192243a4 Author: Oliver Hartkopp Date: Mon Oct 19 14:02:29 2020 +0200 can: isotp: isotp_rcv_cf(): enable RX timeout handling in listen-only mode As reported by Thomas Wagner: https://github.com/hartkopp/can-isotp/issues/34 the timeout handling for data frames is not enabled when the isotp socket is used in listen-only mode (sockopt CAN_ISOTP_LISTEN_MODE). This mode is enabled by the isotpsniffer application which therefore became inconsistend with the strict rx timeout rules when running the isotp protocol in the operational mode. This patch fixes this inconsistency by moving the return condition for the listen-only mode behind the timeout handling code. Reported-by: Thomas Wagner Signed-off-by: Oliver Hartkopp Fixes: e057dd3fc20f ("can: add ISO 15765-2:2016 transport protocol") Link: https://github.com/hartkopp/can-isotp/issues/34 Link: https://lore.kernel.org/r/20201019120229.89326-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit 5a7de2408fa59be2a92b3ed4a5614fbb6942893d Author: Geert Uytterhoeven Date: Tue Oct 13 16:13:41 2020 +0200 can: isotp: Explain PDU in CAN_ISOTP help text The help text for the CAN_ISOTP config symbol uses the acronym "PDU". However, this acronym is not explained here, nor in Documentation/networking/can.rst. Expand the acronym to make it easier for users to decide if they need to enable the CAN_ISOTP option or not. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201013141341.28487-1-geert+renesas@glider.be Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit 08c487d8d807535f509ed80c6a10ad90e6872139 Author: Zhang Changzhong Date: Mon Sep 7 14:31:48 2020 +0800 can: j1939: j1939_sk_bind(): return failure if netdev is down When a netdev down event occurs after a successful call to j1939_sk_bind(), j1939_netdev_notify() can handle it correctly. But if the netdev already in down state before calling j1939_sk_bind(), j1939_sk_release() will stay in wait_event_interruptible() blocked forever. Because in this case, j1939_netdev_notify() won't be called and j1939_tp_txtimer() won't call j1939_session_cancel() or other function to clear session for ENETDOWN error, this lead to mismatch of j1939_session_get/put() and jsk->skb_pending will never decrease to zero. To reproduce it use following commands: 1. ip link add dev vcan0 type vcan 2. j1939acd -r 100,80-120 1122334455667788 vcan0 3. presses ctrl-c and thread will be blocked forever This patch adds check for ndev->flags in j1939_sk_bind() to avoid this kind of situation and return with -ENETDOWN. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1599460308-18770-1-git-send-email-zhangchangzhong@huawei.com Acked-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde commit a39372c2c597d8ab0b53d953d9c4fc9ba2ed7dd6 Author: Yegor Yefremov Date: Mon Oct 26 10:44:42 2020 +0100 can: j1939: use backquotes for code samples This patch adds backquotes for code samples. Signed-off-by: Yegor Yefremov Link: https://lore.kernel.org/r/20201026094442.16587-1-yegorslists@googlemail.com Signed-off-by: Marc Kleine-Budde commit ea780d39b1888ed5afc243c29b23d9bdb3828c7a Author: Yegor Yefremov Date: Thu Oct 22 10:37:08 2020 +0200 can: j1939: swap addr and pgn in the send example The address was wrongly assigned to the PGN field and vice versa. Signed-off-by: Yegor Yefremov Link: https://lore.kernel.org/r/20201022083708.8755-1-yegorslists@googlemail.com Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Marc Kleine-Budde commit 864a2756d369861af15327b6ff62bb6fe984dbc8 Author: Yegor Yefremov Date: Tue Oct 20 12:10:43 2020 +0200 can: j1939: fix syntax and spelling This patches fixes the syntax an spelling of the j1939 documentation. Signed-off-by: Yegor Yefremov Link: https://lore.kernel.org/r/20201020101043.6369-1-yegorslists@googlemail.com Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Marc Kleine-Budde commit 429efa6e148635c8b4fdc8db8ab6a8dae896ac17 Author: Yegor Yefremov Date: Tue Oct 20 10:11:34 2020 +0200 can: j1939: rename jacd tool Due to naming conflicts, jacd was renamed to j1939acd in: https://github.com/linux-can/can-utils/pull/199 Signed-off-by: Yegor Yefremov Link: https://lore.kernel.org/r/20201020081134.3597-1-yegorslists@googlemail.com Link: https://github.com/linux-can/can-utils/pull/199 Signed-off-by: Marc Kleine-Budde commit 286228d382ba6320f04fa2e7c6fc8d4d92e428f4 Author: Oleksij Rempel Date: Wed Dec 18 09:39:02 2019 +0100 can: can_create_echo_skb(): fix echo skb generation: always use skb_clone() All user space generated SKBs are owned by a socket (unless injected into the key via AF_PACKET). If a socket is closed, all associated skbs will be cleaned up. This leads to a problem when a CAN driver calls can_put_echo_skb() on a unshared SKB. If the socket is closed prior to the TX complete handler, can_get_echo_skb() and the subsequent delivering of the echo SKB to all registered callbacks, a SKB with a refcount of 0 is delivered. To avoid the problem, in can_get_echo_skb() the original SKB is now always cloned, regardless of shared SKB or not. If the process exists it can now safely discard its SKBs, without disturbing the delivery of the echo SKB. The problem shows up in the j1939 stack, when it clones the incoming skb, which detects the already 0 refcount. We can easily reproduce this with following example: testj1939 -B -r can0: & cansend can0 1823ff40#0123 WARNING: CPU: 0 PID: 293 at lib/refcount.c:25 refcount_warn_saturate+0x108/0x174 refcount_t: addition on 0; use-after-free. Modules linked in: coda_vpu imx_vdoa videobuf2_vmalloc dw_hdmi_ahb_audio vcan CPU: 0 PID: 293 Comm: cansend Not tainted 5.5.0-rc6-00376-g9e20dcb7040d #1 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Backtrace: [] (dump_backtrace) from [] (show_stack+0x20/0x24) [] (show_stack) from [] (dump_stack+0x8c/0xa0) [] (dump_stack) from [] (__warn+0xe0/0x108) [] (__warn) from [] (warn_slowpath_fmt+0xa8/0xcc) [] (warn_slowpath_fmt) from [] (refcount_warn_saturate+0x108/0x174) [] (refcount_warn_saturate) from [] (j1939_can_recv+0x20c/0x210) [] (j1939_can_recv) from [] (can_rcv_filter+0xb4/0x268) [] (can_rcv_filter) from [] (can_receive+0xb0/0xe4) [] (can_receive) from [] (can_rcv+0x48/0x98) [] (can_rcv) from [] (__netif_receive_skb_one_core+0x64/0x88) [] (__netif_receive_skb_one_core) from [] (__netif_receive_skb+0x38/0x94) [] (__netif_receive_skb) from [] (netif_receive_skb_internal+0x64/0xf8) [] (netif_receive_skb_internal) from [] (netif_receive_skb+0x34/0x19c) [] (netif_receive_skb) from [] (can_rx_offload_napi_poll+0x58/0xb4) Fixes: 0ae89beb283a ("can: add destructor for self generated skbs") Signed-off-by: Oleksij Rempel Link: http://lore.kernel.org/r/20200124132656.22156-1-o.rempel@pengutronix.de Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit ed3320cec279407a86bc4c72edc4a39eb49165ec Author: Oliver Hartkopp Date: Tue Oct 20 08:44:43 2020 +0200 can: dev: __can_get_echo_skb(): fix real payload length return value for RTR frames The can_get_echo_skb() function returns the number of received bytes to be used for netdev statistics. In the case of RTR frames we get a valid (potential non-zero) data length value which has to be passed for further operations. But on the wire RTR frames have no payload length. Therefore the value to be used in the statistics has to be zero for RTR frames. Reported-by: Vincent Mailhol Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201020064443.80164-1-socketcan@hartkopp.net Fixes: cf5046b309b3 ("can: dev: let can_get_echo_skb() return dlc of CAN frame") Signed-off-by: Marc Kleine-Budde commit 4ef8451b332662d004df269d4cdeb7d9f31419b5 Merge: e6b0bd61a7371 5d020cbd86204 Author: Linus Torvalds Date: Tue Nov 3 13:28:50 2020 -0800 Merge tag 'perf-tools-for-v5.10-2020-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: "Only fixes and a sync of the headers so that the perf build is silent: - Fix visibility attribute in python module init code with newer gcc - Fix DRAM_BW_Use 0 issue for CLX/SKX in intel JSON vendor event files - Fix the build on new fedora by removing LTO compiler options when building perl support - Remove broken __no_tail_call attribute - Fix segfault when trying to trace events by cgroup - Fix crash with non-jited BPF progs - Increase buffer size in TUI browser, fixing format truncation - Fix printing of build-id for objects lacking one - Fix byte swapping for ino_generation field in MMAP2 perf.data records - Fix byte swapping for CGROUP perf.data records, for cross arch analysis of perf.data files - Fix the fast path of feature detection - Update kernel header copies" * tag 'perf-tools-for-v5.10-2020-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (23 commits) tools feature: Fixup fast path feature detection perf tools: Add missing swap for cgroup events perf tools: Add missing swap for ino_generation perf tools: Initialize output buffer in build_id__sprintf perf hists browser: Increase size of 'buf' in perf_evsel__hists_browse() tools include UAPI: Update linux/mount.h copy tools headers UAPI: Update tools's copy of linux/perf_event.h tools kvm headers: Update KVM headers from the kernel sources tools UAPI: Update copy of linux/mman.h from the kernel sources tools arch x86: Sync the msr-index.h copy with the kernel sources tools x86 headers: Update required-features.h header from the kernel tools x86 headers: Update cpufeatures.h headers copies tools headers UAPI: Update fscrypt.h copy tools headers UAPI: Sync drm/i915_drm.h with the kernel sources tools headers UAPI: Sync prctl.h with the kernel sources perf scripting python: Avoid declaring function pointers with a visibility attribute perf tools: Remove broken __no_tail_call attribute perf vendor events: Fix DRAM_BW_Use 0 issue for CLX/SKX perf trace: Fix segfault when trying to trace events by cgroup perf tools: Fix crash with non-jited bpf progs ... commit 2283f79b22684d2812e5c76fc2280aae00390365 Author: Vincent Mailhol Date: Sat Oct 3 00:41:45 2020 +0900 can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context If a driver calls can_get_echo_skb() during a hardware IRQ (which is often, but not always, the case), the 'WARN_ON(in_irq)' in net/core/skbuff.c#skb_release_head_state() might be triggered, under network congestion circumstances, together with the potential risk of a NULL pointer dereference. The root cause of this issue is the call to kfree_skb() instead of dev_kfree_skb_irq() in net/core/dev.c#enqueue_to_backlog(). This patch prevents the skb to be freed within the call to netif_rx() by incrementing its reference count with skb_get(). The skb is finally freed by one of the in-irq-context safe functions: dev_consume_skb_any() or dev_kfree_skb_any(). The "any" version is used because some drivers might call can_get_echo_skb() in a normal context. The reason for this issue to occur is that initially, in the core network stack, loopback skb were not supposed to be received in hardware IRQ context. The CAN stack is an exeption. This bug was previously reported back in 2017 in [1] but the proposed patch never got accepted. While [1] directly modifies net/core/dev.c, we try to propose here a smoother modification local to CAN network stack (the assumption behind is that only CAN devices are affected by this issue). [1] http://lore.kernel.org/r/57a3ffb6-3309-3ad5-5a34-e93c3fe3614d@cetitec.com Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/r/20201002154219.4887-2-mailhol.vincent@wanadoo.fr Fixes: 39549eef3587 ("can: CAN Network device driver and Netlink interface") Signed-off-by: Marc Kleine-Budde commit 2ddd6bfe7bdbb6c661835c3ff9cab8e0769940a6 Author: Marc Kleine-Budde Date: Thu Jun 18 12:47:06 2020 +0200 can: rx-offload: don't call kfree_skb() from IRQ context A CAN driver, using the rx-offload infrastructure, is reading CAN frames (usually in IRQ context) from the hardware and placing it into the rx-offload queue to be delivered to the networking stack via NAPI. In case the rx-offload queue is full, trying to add more skbs results in the skbs being dropped using kfree_skb(). If done from hard-IRQ context this results in the following warning: [ 682.552693] ------------[ cut here ]------------ [ 682.557360] WARNING: CPU: 0 PID: 3057 at net/core/skbuff.c:650 skb_release_head_state+0x74/0x84 [ 682.566075] Modules linked in: can_raw can coda_vpu flexcan dw_hdmi_ahb_audio v4l2_jpeg imx_vdoa can_dev [ 682.575597] CPU: 0 PID: 3057 Comm: cansend Tainted: G W 5.7.0+ #18 [ 682.583098] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 682.589657] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 682.597423] [] (show_stack) from [] (dump_stack+0xe0/0x114) [ 682.604759] [] (dump_stack) from [] (__warn+0xc0/0x10c) [ 682.611742] [] (__warn) from [] (warn_slowpath_fmt+0x5c/0xc0) [ 682.619248] [] (warn_slowpath_fmt) from [] (skb_release_head_state+0x74/0x84) [ 682.628143] [] (skb_release_head_state) from [] (skb_release_all+0xc/0x24) [ 682.636774] [] (skb_release_all) from [] (kfree_skb+0x74/0x1c8) [ 682.644479] [] (kfree_skb) from [] (can_rx_offload_queue_sorted+0xe0/0xe8 [can_dev]) [ 682.654051] [] (can_rx_offload_queue_sorted [can_dev]) from [] (can_rx_offload_get_echo_skb+0x48/0x94 [can_dev]) [ 682.666007] [] (can_rx_offload_get_echo_skb [can_dev]) from [] (flexcan_irq+0x194/0x5dc [flexcan]) [ 682.676734] [] (flexcan_irq [flexcan]) from [] (__handle_irq_event_percpu+0x4c/0x3ec) [ 682.686322] [] (__handle_irq_event_percpu) from [] (handle_irq_event_percpu+0x2c/0x88) [ 682.695993] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x38/0x5c) [ 682.704887] [] (handle_irq_event) from [] (handle_fasteoi_irq+0xc8/0x180) [ 682.713432] [] (handle_fasteoi_irq) from [] (generic_handle_irq+0x30/0x44) [ 682.722063] [] (generic_handle_irq) from [] (__handle_domain_irq+0x64/0xdc) [ 682.730783] [] (__handle_domain_irq) from [] (gic_handle_irq+0x48/0x9c) [ 682.739158] [] (gic_handle_irq) from [] (__irq_svc+0x70/0x98) [ 682.746656] Exception stack(0xe80e9dd8 to 0xe80e9e20) [ 682.751725] 9dc0: 00000001 e80e8000 [ 682.759922] 9de0: e820cf80 00000000 ffffe000 00000000 eaf08fe4 00000000 600d0013 00000000 [ 682.768117] 9e00: c1732e3c c16093a8 e820d4c0 e80e9e28 c018a57c c018b870 600d0013 ffffffff [ 682.776315] [] (__irq_svc) from [] (lock_acquire+0x108/0x4e8) [ 682.783821] [] (lock_acquire) from [] (down_write+0x48/0xa8) [ 682.791242] [] (down_write) from [] (unlink_file_vma+0x24/0x40) [ 682.798922] [] (unlink_file_vma) from [] (free_pgtables+0x34/0xb8) [ 682.806858] [] (free_pgtables) from [] (exit_mmap+0xe4/0x170) [ 682.814361] [] (exit_mmap) from [] (mmput+0x5c/0x110) [ 682.821171] [] (mmput) from [] (do_exit+0x374/0xbe4) [ 682.827892] [] (do_exit) from [] (do_group_exit+0x38/0xb4) [ 682.835132] [] (do_group_exit) from [] (__wake_up_parent+0x0/0x14) [ 682.843063] irq event stamp: 1936 [ 682.846399] hardirqs last enabled at (1935): [] rmqueue+0xf4/0xc64 [ 682.853553] hardirqs last disabled at (1936): [] __irq_svc+0x60/0x98 [ 682.860799] softirqs last enabled at (1878): [] raw_release+0x108/0x1f0 [can_raw] [ 682.869256] softirqs last disabled at (1876): [] release_sock+0x18/0x98 [ 682.876753] ---[ end trace 7bca4751ce44c444 ]--- This patch fixes the problem by replacing the kfree_skb() by dev_kfree_skb_any(), as rx-offload might be called from threaded IRQ handlers as well. Fixes: ca913f1ac024 ("can: rx-offload: can_rx_offload_queue_sorted(): fix error handling, avoid skb mem leak") Fixes: 6caf8a6d6586 ("can: rx-offload: can_rx_offload_queue_tail(): fix error handling, avoid skb mem leak") Link: http://lore.kernel.org/r/20201019190524.1285319-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 3accbfdc36130282f5ae9e6eecfdf820169fedce Author: Zhang Changzhong Date: Tue Jul 14 14:44:50 2020 +0800 can: proc: can_remove_proc(): silence remove_proc_entry warning If can_init_proc() fail to create /proc/net/can directory, can_remove_proc() will trigger a warning: WARNING: CPU: 6 PID: 7133 at fs/proc/generic.c:672 remove_proc_entry+0x17b0 Kernel panic - not syncing: panic_on_warn set ... Fix to return early from can_remove_proc() if can proc_dir does not exists. Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1594709090-3203-1-git-send-email-zhangchangzhong@huawei.com Fixes: 8e8cda6d737d ("can: initial support for network namespaces") Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit e5ab9aa7e49b39c34d110d6303b917c14a277200 Author: Oleksij Rempel Date: Thu Oct 22 09:52:18 2020 +0200 dt-bindings: can: flexcan: convert fsl,*flexcan bindings to yaml In order to automate the verification of DT nodes convert fsl-flexcan.txt to fsl,flexcan.yaml Signed-off-by: Oleksij Rempel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201022075218.11880-3-o.rempel@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 1f9234401ce0aa7a05857db43c5aef290d5177e2 Author: Oleksij Rempel Date: Thu Oct 22 09:52:17 2020 +0200 dt-bindings: can: add can-controller.yaml For now we have only node name as common rule for all CAN controllers Signed-off-by: Oleksij Rempel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201022075218.11880-2-o.rempel@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 5fd8477ed8ca77e64b93d44a6dae4aa70c191396 Author: Daniele Palmas Date: Mon Nov 2 12:01:08 2020 +0100 net: usb: qmi_wwan: add Telit LE910Cx 0x1230 composition Add support for Telit LE910Cx 0x1230 composition: 0x1230: tty, adb, rmnet, audio, tty, tty, tty, tty Signed-off-by: Daniele Palmas Acked-by: Bjørn Mork Link: https://lore.kernel.org/r/20201102110108.17244-1-dnlplm@gmail.com Signed-off-by: Jakub Kicinski commit e6b0bd61a73718886c2df16762f0a5dba485fc10 Merge: ce2e33ba4163c 6fee9372e0af6 Author: Linus Torvalds Date: Tue Nov 3 13:14:14 2020 -0800 Merge tag 'docs-5.10-warnings' of git://git.lwn.net/linux Pull documentation build warning fixes from Jonathan Corbet: "This contains a series of warning fixes from Mauro; once applied, the number of warnings from the once-noisy docs build process is nearly zero. Getting to this point has required a lot of work; once there, hopefully we can keep things that way. I have packaged this as a separate pull because it does a fair amount of reaching outside of Documentation/. The changes are all in comments and in code placement. It's all been in linux-next since last week" * tag 'docs-5.10-warnings' of git://git.lwn.net/linux: (24 commits) docs: SafeSetID: fix a warning amdgpu: fix a few kernel-doc markup issues selftests: kselftest_harness.h: fix kernel-doc markups drm: amdgpu_dm: fix a typo gpu: docs: amdgpu.rst: get rid of wrong kernel-doc markups drm: amdgpu: kernel-doc: update some adev parameters docs: fs: api-summary.rst: get rid of kernel-doc include IB/srpt: docs: add a description for cq_size member locking/refcount: move kernel-doc markups to the proper place docs: lockdep-design: fix some warning issues MAINTAINERS: fix broken doc refs due to yaml conversion ice: docs fix a devlink info that broke a table crypto: sun8x-ce*: update entries to its documentation net: phy: remove kernel-doc duplication mm: pagemap.h: fix two kernel-doc markups blk-mq: docs: add kernel-doc description for a new struct member docs: userspace-api: add iommu.rst to the index file docs: hwmon: mp2975.rst: address some html build warnings docs: net: statistics.rst: remove a duplicated kernel-doc docs: kasan.rst: add two missing blank lines ... commit aafced673c06b7c77040c1df42e2e965be5d0376 Author: Qii Wang Date: Fri Oct 30 19:58:01 2020 +0800 i2c: mediatek: move dma reset before i2c reset The i2c driver default do dma reset after i2c reset, but sometimes i2c reset will trigger dma tx2rx, then apdma write data to dram which has been i2c_put_dma_safe_msg_buf(kfree). Move dma reset before i2c reset in mtk_i2c_init_hw to fix it. Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit e16b874ee87aa70cd0a7145346ff5f41349b514c Author: Davide Caratti Date: Mon Nov 2 10:09:49 2020 +0100 mptcp: token: fix unititialized variable gcc complains about use of uninitialized 'num'. Fix it by doing the first assignment of 'num' when the variable is declared. Fixes: 96d890daad05 ("mptcp: add msk interations helper") Signed-off-by: Davide Caratti Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/49e20da5d467a73414d4294a8bd35e2cb1befd49.1604308087.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit e4eccb853664de7bcf9518fb658f35e748bf1f68 Author: Fred Gao Date: Tue Nov 3 02:01:20 2020 +0800 vfio/pci: Bypass IGD init in case of -ENODEV Bypass the IGD initialization when -ENODEV returns, that should be the case if opregion is not available for IGD or within discrete graphics device's option ROM, or host/lpc bridge is not found. Then use of -ENODEV here means no special device resources found which needs special care for VFIO, but we still allow other normal device resource access. Cc: Zhenyu Wang Cc: Xiong Zhang Cc: Hang Yuan Cc: Stuart Summers Signed-off-by: Fred Gao Signed-off-by: Alex Williamson commit bb742ad01961a3b9d1f9d19375487b879668b6b2 Author: Zhang Qilong Date: Sat Oct 31 11:03:53 2020 +0800 vfio: platform: fix reference leak in vfio_platform_open pm_runtime_get_sync() will increment pm usage counter even it failed. Forgetting to call pm_runtime_put will result in reference leak in vfio_platform_open, so we should fix it. Signed-off-by: Zhang Qilong Acked-by: Eric Auger Signed-off-by: Alex Williamson commit 38565c93c8a1306dc5f245572a545fbea908ac41 Author: Alex Williamson Date: Mon Nov 2 15:02:00 2020 -0700 vfio/pci: Implement ioeventfd thread handler for contended memory lock The ioeventfd is called under spinlock with interrupts disabled, therefore if the memory lock is contended defer code that might sleep to a thread context. Fixes: bc93b9ae0151 ("vfio-pci: Avoid recursive read-lock usage") Link: https://bugzilla.kernel.org/show_bug.cgi?id=209253#c1 Reported-by: Ian Pilcher Tested-by: Ian Pilcher Tested-by: Justin Gatzen Signed-off-by: Alex Williamson commit 8e91cb3812121aca8369d6c4e717ddd072280d0f Author: Diana Craciun Date: Mon Oct 26 18:53:36 2020 +0200 vfio/fsl-mc: Make vfio_fsl_mc_irqs_allocate static Fixed compiler warning: drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:5: warning: no previous prototype for function 'vfio_fsl_mc_irqs_allocate' [-Wmissing-prototypes] ^ drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev) Reported-by: kernel test robot Signed-off-by: Diana Craciun Signed-off-by: Alex Williamson commit 69848cd6f0c1fb4f82ab255b730343a215ded013 Author: Dan Carpenter Date: Fri Oct 23 14:29:47 2020 +0300 vfio/fsl-mc: prevent underflow in vfio_fsl_mc_mmap() My static analsysis tool complains that the "index" can be negative. There are some checks in do_mmap() which try to prevent underflows but I don't know if they are sufficient for this situation. Either way, making "index" unsigned is harmless so let's do it just to be safe. Fixes: 67247289688d ("vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions") Signed-off-by: Dan Carpenter Acked-by: Diana Craciun Signed-off-by: Alex Williamson commit ce2e33ba4163c66ff89d2c0f2a9a51214a122e27 Merge: 43c834186c185 4f3e69060dc9c Author: Linus Torvalds Date: Tue Nov 3 09:57:30 2020 -0800 Merge tag 'docs-5.10-3' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A small number of fixes, plus a build tweak to respect the desire for silence in V=0 builds" * tag 'docs-5.10-3' of git://git.lwn.net/linux: docs: fix automarkup regression on Python 2 documentation: arm: sunxi: add Allwinner H6 documents scripts: kernel-doc: split typedef complex regex scripts: kernel-doc: fix typedef parsing docs: Makefile: honor V=0 for docs building commit 43c834186c185abc53b41ee985330501ccfc4f7b Merge: f4c79144edd8a 2411cd8211239 Author: Linus Torvalds Date: Tue Nov 3 09:55:09 2020 -0800 Merge tag 'x86_seves_for_v5.10_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 SEV-ES fixes from Borislav Petkov: "A couple of changes to the SEV-ES code to perform more stringent hypervisor checks before enabling encryption (Joerg Roedel)" * tag 'x86_seves_for_v5.10_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev-es: Do not support MMIO to/from encrypted memory x86/head/64: Check SEV encryption before switching to kernel page-table x86/boot/compressed/64: Check SEV encryption in 64-bit boot-path x86/boot/compressed/64: Sanity-check CPUID results in the early #VC handler x86/boot/compressed/64: Introduce sev_status commit f4c79144edd8a49ffca8fa737a31d606be742a34 Author: David Howells Date: Tue Nov 3 16:33:07 2020 +0000 afs: Fix incorrect freeing of the ACL passed to the YFS ACL store op The cleanup for the yfs_store_opaque_acl2_operation calls the wrong function to destroy the ACL content buffer. It's an afs_acl struct, not a yfs_acl struct - and the free function for latter may pass invalid pointers to kfree(). Fix this by using the afs_acl_put() function. The yfs_acl_put() function is then no longer used and can be removed. general protection fault, probably for non-canonical address 0x7ebde00000000: 0000 [#1] SMP PTI ... RIP: 0010:compound_head+0x0/0x11 ... Call Trace: virt_to_cache+0x8/0x51 kfree+0x5d/0x79 yfs_free_opaque_acl+0x16/0x29 afs_put_operation+0x60/0x114 __vfs_setxattr+0x67/0x72 __vfs_setxattr_noperm+0x66/0xe9 vfs_setxattr+0x67/0xce setxattr+0x14e/0x184 __do_sys_fsetxattr+0x66/0x8f do_syscall_64+0x2d/0x3a entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit c80afa1d9c3603d5eddeb8d63368823b1982f3f0 Author: David Howells Date: Tue Nov 3 16:32:58 2020 +0000 afs: Fix warning due to unadvanced marshalling pointer When using the afs.yfs.acl xattr to change an AuriStor ACL, a warning can be generated when the request is marshalled because the buffer pointer isn't increased after adding the last element, thereby triggering the check at the end if the ACL wasn't empty. This just causes something like the following warning, but doesn't stop the call from happening successfully: kAFS: YFS.StoreOpaqueACL2: Request buffer underflow (36<108) Fix this simply by increasing the count prior to the check. Fixes: f5e4546347bc ("afs: Implement YFS ACL setting") Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit ef9ce66fab959c66d270bbee7ca79b92ee957893 Author: Kailang Yang Date: Tue Nov 3 15:40:35 2020 +0800 ALSA: hda/realtek - Enable headphone for ASUS TM420 ASUS TM420 had depop circuit for headphone. It need to turn on by COEF bit. [ fixed the missing enum definition by tiwai ] Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/3d6177d7023b4783bf2793861c577ada@realtek.com Signed-off-by: Takashi Iwai commit 82768a86c64659c7181571ebfbc41ec9f2e52dde Author: Peter Ujfalusi Date: Tue Nov 3 15:50:04 2020 +0200 dt-bindings: irqchip: ti, sci-inta: Fix diagram indentation for unmapped events One space has been missing by the diagram update. Fixes: bb2bd7c7f3d0 ("dt-bindings: irqchip: ti, sci-inta: Update for unmapped event handling") Reported-by: Rob Herring Signed-off-by: Peter Ujfalusi Signed-off-by: Thomas Gleixner Acked-by: Rob Herring Cc: Marc Zyngier Link: https://lore.kernel.org/r/20201103135004.2363-1-peter.ujfalusi@ti.com commit 4f3e69060dc9cc8f14ad9e172ada7120dc76445b Author: Jonathan Corbet Date: Fri Oct 30 09:35:39 2020 -0600 docs: fix automarkup regression on Python 2 It turns out that the Python 2 re module lacks the ASCII flag, so don't try to use it there. Fixes: f66e47f98c1e ("docs: automarkup.py: Fix regexes to solve sphinx 3 warnings") Reported-by: Dafna Hirschfeld Signed-off-by: Jonathan Corbet commit 0b2ca2c7d0c9e2731d01b6c862375d44a7e13923 Author: Niklas Schnelle Date: Mon Nov 2 11:33:04 2020 +0100 s390/pci: fix hot-plug of PCI function missing bus Under some circumstances in particular with "Reconfigure I/O Path" a zPCI function may first appear in Standby through a PCI event with PEC 0x0302 which initially makes it visible to the zPCI subsystem, Only after that is it configured with a zPCI event with PEC 0x0301. If the zbus is still missing a PCI function zero (devfn == 0) when the PCI event 0x0301 is handled zdev->zbus->bus is still NULL and gets dereferenced in common code. Check for this case and enable but don't scan the zPCI function. This matches what would happen if we immediately got the 0x0301 configuration request or the function was included in CLP List PCI. In all cases the PCI functions with devfn != 0 will be scanned once function 0 appears. Fixes: 3047766bc6ec ("s390/pci: fix enabling a reserved PCI function") Cc: # 5.8 Signed-off-by: Niklas Schnelle Acked-by: Pierre Morel Signed-off-by: Heiko Carstens commit de5d9dae150ca1c1b5c7676711a9ca139d1a8dec Author: Qian Cai Date: Wed Oct 28 14:27:42 2020 -0400 s390/smp: move rcu_cpu_starting() earlier The call to rcu_cpu_starting() in smp_init_secondary() is not early enough in the CPU-hotplug onlining process, which results in lockdep splats as follows: WARNING: suspicious RCU usage ----------------------------- kernel/locking/lockdep.c:3497 RCU-list traversed in non-reader section!! other info that might help us debug this: RCU used illegally from offline CPU! rcu_scheduler_active = 1, debug_locks = 1 no locks held by swapper/1/0. Call Trace: show_stack+0x158/0x1f0 dump_stack+0x1f2/0x238 __lock_acquire+0x2640/0x4dd0 lock_acquire+0x3a8/0xd08 _raw_spin_lock_irqsave+0xc0/0xf0 clockevents_register_device+0xa8/0x528 init_cpu_timer+0x33e/0x468 smp_init_secondary+0x11a/0x328 smp_start_secondary+0x82/0x88 This is avoided by moving the call to rcu_cpu_starting up near the beginning of the smp_init_secondary() function. Note that the raw_smp_processor_id() is required in order to avoid calling into lockdep before RCU has declared the CPU to be watched for readers. Link: https://lore.kernel.org/lkml/160223032121.7002.1269740091547117869.tip-bot2@tip-bot2/ Signed-off-by: Qian Cai Acked-by: Paul E. McKenney Signed-off-by: Heiko Carstens commit 5b35047eb467c8cdd38a31beb9ac109221777843 Author: Harald Freudenberger Date: Tue Sep 15 11:00:17 2020 +0200 s390/pkey: fix paes selftest failure with paes and pkey static build When both the paes and the pkey kernel module are statically build into the kernel, the paes cipher selftests run before the pkey kernel module is initialized. So a static variable set in the pkey init function and used in the pkey_clr2protkey function is not initialized when the paes cipher's selftests request to call pckmo for transforming a clear key value into a protected key. This patch moves the initial setup of the static variable into the function pck_clr2protkey. So it's possible, to use the function for transforming a clear to a protected key even before the pkey init function has been called and the paes selftests may run successful. Reported-by: Alexander Egorenkov Cc: # 4.20 Fixes: f822ad2c2c03 ("s390/pkey: move pckmo subfunction available checks away from module init") Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit c3d9cdca73d0e49f01a71cdc477a09b04b1b30fc Author: Heiko Carstens Date: Mon Oct 26 19:52:04 2020 +0100 s390: update defconfigs Signed-off-by: Heiko Carstens commit cfef9aa69a7382a205661a83e621114b37824474 Author: Heiko Carstens Date: Mon Oct 26 16:15:22 2020 +0100 s390/vdso: remove unused constants Signed-off-by: Heiko Carstens commit e99198661ecd02545b926ba40d1e91626bb29647 Author: Heiko Carstens Date: Mon Oct 26 16:15:22 2020 +0100 s390/vdso: remove empty unused file Signed-off-by: Heiko Carstens commit b0e98aa9c411585eb586b2fa98873c936735008e Author: Gerald Schaefer Date: Tue Oct 20 20:20:07 2020 +0200 s390/mm: make pmd/pud_deref() large page aware pmd/pud_deref() assume that they will never operate on large pmd/pud entries, and therefore only use the non-large _xxx_ENTRY_ORIGIN mask. With commit 9ec8fa8dc331b ("s390/vmemmap: extend modify_pagetable() to handle vmemmap"), that assumption is no longer true, at least for pmd_deref(). In theory, we could end up with wrong addresses because some of the non-address bits of a large entry would not be masked out. In practice, this does not (yet) show any impact, because vmemmap_free() is currently never used for s390. Fix pmd/pud_deref() to check for the entry type and use the _xxx_ENTRY_ORIGIN_LARGE mask for large entries. While at it, also move pmd/pud_pfn() around, in order to avoid code duplication, because they do the same thing. Fixes: 9ec8fa8dc331b ("s390/vmemmap: extend modify_pagetable() to handle vmemmap") Cc: # 5.9 Signed-off-by: Gerald Schaefer Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 29c2680fd2bf3862ff5cf2957f198512493156f9 Author: Harald Freudenberger Date: Tue Oct 20 12:20:30 2020 +0200 s390/ap: fix ap devices reference counting With the last rework of the AP bus scan function one get_device() is missing causing the reference counter to be one instance too low. Together with binding/unbinding device drivers to an ap device it may end up in an segfault because the ap device is freed but a device driver still assumes it's pointer to the ap device is valid: Unable to handle kernel pointer dereference in virtual kernel address space Failing address: 6b6b6b6b6b6b6000 TEID: 6b6b6b6b6b6b6803 Fault in home space mode while using kernel ASCE. Krnl PSW : 0404e00180000000 000000001472f3b6 (klist_next+0x7e/0x180) R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3 Call Trace: [<000000001472f3b6>] klist_next+0x7e/0x180 ([<000000001472f36a>] klist_next+0x32/0x180) [<00000000147c14de>] bus_for_each_dev+0x66/0xb8 [<0000000014aab0d4>] ap_scan_adapter+0xcc/0x6c0 [<0000000014aab74a>] ap_scan_bus+0x82/0x140 [<0000000013f3b654>] process_one_work+0x27c/0x478 [<0000000013f3b8b6>] worker_thread+0x66/0x368 [<0000000013f44e32>] kthread+0x17a/0x1a0 [<0000000014af23e4>] ret_from_fork+0x24/0x2c Kernel panic - not syncing: Fatal exception: panic_on_oops Fixed by adjusting the reference count with get_device() on the right place. Also now the device drivers don't need to adjust the ap device's reference counting any more. This is now done in the ap bus probe and remove functions. Reported-by: Marc Hartmayer Fixes: 4f2fcccdb547 ("s390/ap: add card/queue deconfig state") Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit 7ee31a3aa8f490c6507bc4294df6b70bed1c593e Author: Jean-Philippe Brucker Date: Tue Nov 3 14:49:01 2020 +0100 arm64: kprobes: Use BRK instead of single-step when executing instructions out-of-line Commit 36dadef23fcc ("kprobes: Init kprobes in early_initcall") enabled using kprobes from early_initcall. Unfortunately at this point the hardware debug infrastructure is not operational. The OS lock may still be locked, and the hardware watchpoints may have unknown values when kprobe enables debug monitors to single-step instructions. Rather than using hardware single-step, append a BRK instruction after the instruction to be executed out-of-line. Fixes: 36dadef23fcc ("kprobes: Init kprobes in early_initcall") Suggested-by: Will Deacon Signed-off-by: Jean-Philippe Brucker Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20201103134900.337243-1-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 4dd6ce478003525df8618750d30f0b90380047a7 Author: Dan Carpenter Date: Tue Nov 3 13:16:23 2020 +0300 iommu: Fix a check in iommu_check_bind_data() The "data->flags" variable is a u64 so if one of the high 32 bits is set the original code will allow it, but it should be rejected. The fix is to declare "mask" as a u64 instead of a u32. Fixes: d90573812eea ("iommu/uapi: Handle data and argsz filled by users") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201103101623.GA1127762@mwanda Signed-off-by: Joerg Roedel commit da7d554f7c62d0c17c1ac3cc2586473c2d99f0bd Author: Alexander Aring Date: Mon Oct 26 10:52:29 2020 -0400 gfs2: Wake up when sd_glock_disposal becomes zero Commit fc0e38dae645 ("GFS2: Fix glock deallocation race") fixed a sd_glock_disposal accounting bug by adding a missing atomic_dec statement, but it failed to wake up sd_glock_wait when that decrement causes sd_glock_disposal to reach zero. As a consequence, gfs2_gl_hash_clear can now run into a 10-minute timeout instead of being woken up. Add the missing wakeup. Fixes: fc0e38dae645 ("GFS2: Fix glock deallocation race") Cc: stable@vger.kernel.org # v2.6.39+ Signed-off-by: Alexander Aring Signed-off-by: Andreas Gruenbacher commit 71cd8e2d16703a9df5c86a9e19f4cba99316cc53 Author: Liu, Yi L Date: Fri Oct 30 10:37:24 2020 +0800 iommu/vt-d: Fix a bug for PDP check in prq_event_thread In prq_event_thread(), the QI_PGRP_PDP is wrongly set by 'req->pasid_present' which should be replaced to 'req->priv_data_present'. Fixes: 5b438f4ba315 ("iommu/vt-d: Support page request in scalable mode") Signed-off-by: Liu, Yi L Signed-off-by: Yi Sun Acked-by: Lu Baolu Link: https://lore.kernel.org/r/1604025444-6954-3-git-send-email-yi.y.sun@linux.intel.com Signed-off-by: Joerg Roedel commit eea4e29ab8bef254b228d6e1e3de188087b2c7d0 Author: Liu Yi L Date: Fri Oct 30 10:37:23 2020 +0800 iommu/vt-d: Fix sid not set issue in intel_svm_bind_gpasid() Should get correct sid and set it into sdev. Because we execute 'sdev->sid != req->rid' in the loop of prq_event_thread(). Fixes: eb8d93ea3c1d ("iommu/vt-d: Report page request faults for guest SVA") Signed-off-by: Liu Yi L Signed-off-by: Yi Sun Acked-by: Lu Baolu Link: https://lore.kernel.org/r/1604025444-6954-2-git-send-email-yi.y.sun@linux.intel.com Signed-off-by: Joerg Roedel commit 6097df457adfb67cb75ca700fd1085ede2e1201d Author: Lu Baolu Date: Wed Oct 28 15:07:25 2020 +0800 iommu/vt-d: Fix kernel NULL pointer dereference in find_domain() If calling find_domain() for a device which hasn't been probed by the iommu core, below kernel NULL pointer dereference issue happens. [ 362.736947] BUG: kernel NULL pointer dereference, address: 0000000000000038 [ 362.743953] #PF: supervisor read access in kernel mode [ 362.749115] #PF: error_code(0x0000) - not-present page [ 362.754278] PGD 0 P4D 0 [ 362.756843] Oops: 0000 [#1] SMP NOPTI [ 362.760528] CPU: 0 PID: 844 Comm: cat Not tainted 5.9.0-rc4-intel-next+ #1 [ 362.767428] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3384.A02.1909200816 09/20/2019 [ 362.781109] RIP: 0010:find_domain+0xd/0x40 [ 362.785234] Code: 48 81 fb 60 28 d9 b2 75 de 5b 41 5c 41 5d 5d c3 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 8b 87 e0 02 00 00 55 <48> 8b 40 38 48 89 e5 48 83 f8 fe 0f 94 c1 48 85 ff 0f 94 c2 08 d1 [ 362.804041] RSP: 0018:ffffb09cc1f0bd38 EFLAGS: 00010046 [ 362.809292] RAX: 0000000000000000 RBX: ffff905b98e4fac8 RCX: 0000000000000000 [ 362.816452] RDX: 0000000000000001 RSI: ffff905b98e4fac8 RDI: ffff905b9ccd40d0 [ 362.823617] RBP: ffffb09cc1f0bda0 R08: ffffb09cc1f0bd48 R09: 000000000000000f [ 362.830778] R10: ffffffffb266c080 R11: ffff905b9042602d R12: ffff905b98e4fac8 [ 362.837944] R13: ffffb09cc1f0bd48 R14: ffff905b9ccd40d0 R15: ffff905b98e4fac8 [ 362.845108] FS: 00007f8485460740(0000) GS:ffff905b9fc00000(0000) knlGS:0000000000000000 [ 362.853227] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 362.858996] CR2: 0000000000000038 CR3: 00000004627a6003 CR4: 0000000000770ef0 [ 362.866161] PKRU: fffffffc [ 362.868890] Call Trace: [ 362.871363] ? show_device_domain_translation+0x32/0x100 [ 362.876700] ? bind_store+0x110/0x110 [ 362.880387] ? klist_next+0x91/0x120 [ 362.883987] ? domain_translation_struct_show+0x50/0x50 [ 362.889237] bus_for_each_dev+0x79/0xc0 [ 362.893121] domain_translation_struct_show+0x36/0x50 [ 362.898204] seq_read+0x135/0x410 [ 362.901545] ? handle_mm_fault+0xeb8/0x1750 [ 362.905755] full_proxy_read+0x5c/0x90 [ 362.909526] vfs_read+0xa6/0x190 [ 362.912782] ksys_read+0x61/0xe0 [ 362.916037] __x64_sys_read+0x1a/0x20 [ 362.919725] do_syscall_64+0x37/0x80 [ 362.923329] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 362.928405] RIP: 0033:0x7f84855c5e95 Filter out those devices to avoid such error. Fixes: e2726daea583d ("iommu/vt-d: debugfs: Add support to show page table internals") Reported-and-tested-by: Xu Pengfei Signed-off-by: Lu Baolu Cc: stable@vger.kernel.org#v5.6+ Link: https://lore.kernel.org/r/20201028070725.24979-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 73db2fc595f358460ce32bcaa3be1f0cce4a2db1 Author: Suravee Suthikulpanit Date: Thu Oct 15 02:50:02 2020 +0000 iommu/amd: Increase interrupt remapping table limit to 512 entries Certain device drivers allocate IO queues on a per-cpu basis. On AMD EPYC platform, which can support up-to 256 cpu threads, this can exceed the current MAX_IRQ_PER_TABLE limit of 256, and result in the error message: AMD-Vi: Failed to allocate IRTE This has been observed with certain NVME devices. AMD IOMMU hardware can actually support upto 512 interrupt remapping table entries. Therefore, update the driver to match the hardware limit. Please note that this also increases the size of interrupt remapping table to 8KB per device when using the 128-bit IRTE format. Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20201015025002.87997-1-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel commit cf1ad559a20d1930aa7b47a52f54e1f8718de301 Author: Michał Mirosław Date: Mon Nov 2 22:27:27 2020 +0100 regulator: defer probe when trying to get voltage from unresolved supply regulator_get_voltage_rdev() is called in regulator probe() when applying machine constraints. The "fixed" commit exposed the problem that non-bypassed regulators can forward the request to its parent (like bypassed ones) supply. Return -EPROBE_DEFER when the supply is expected but not resolved yet. Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator") Cc: stable@vger.kernel.org Signed-off-by: Michał Mirosław Reported-by: Ondřej Jirman Reported-by: Corentin Labbe Tested-by: Ondřej Jirman Link: https://lore.kernel.org/r/a9041d68b4d35e4a2dd71629c8a6422662acb5ee.1604351936.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 158e1886b6262c1d1c96a18c85fac5219b8bf804 Author: Dan Carpenter Date: Tue Nov 3 13:18:07 2020 +0300 ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link() This is harmless, but the "addr" comes from the user and it could lead to a negative shift or to shift wrapping if it's too high. Fixes: 0b00a5615dc4 ("ALSA: hdac_ext: add hdac extended controller") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201103101807.GC1127762@mwanda Signed-off-by: Takashi Iwai commit 5d020cbd86204e51da05628623a6f9729d4b04c8 Author: Arnaldo Carvalho de Melo Date: Tue Nov 3 09:24:20 2020 -0300 tools feature: Fixup fast path feature detection 22dd1ac91a776752 ("tools: Remove feature-libelf-mmap feature detection") correctly simplified the this feature detection, but forgot to remove the call to the removed function in the main() function for the test-all.c fast path feature detection, making it fail and thus do all the feature detection individually, fix it. $ cat /tmp/build/perf/feature/test-all.make.output test-all.c: In function ‘main’: test-all.c:188:2: error: implicit declaration of function ‘main_test_libelf_mmap’; did you mean ‘main_test_libelf’? [-Werror=implicit-function-declaration] 188 | main_test_libelf_mmap(); | ^~~~~~~~~~~~~~~~~~~~~ | main_test_libelf cc1: all warnings being treated as errors $ vim tools/build/feature/test-all.c $ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf ;make V=1 -k O=/tmp/build/perf -C tools/perf install-bin ; perf test python $ cat /tmp/build/perf/feature/test-all.make.output $ Fixes: 22dd1ac91a776752 ("tools: Remove feature-libelf-mmap feature detection") Cc: Alexei Starovoitov Cc: Andrii Nakryiko Signed-off-by: Arnaldo Carvalho de Melo commit 2c589d933e54d183ee2a052971b730e423c62031 Author: Namhyung Kim Date: Mon Nov 2 23:02:28 2020 +0900 perf tools: Add missing swap for cgroup events It was missed to add a swap function for PERF_RECORD_CGROUP. Fixes: ba78c1c5461c ("perf tools: Basic support for CGROUP event") Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201102140228.303657-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fe01adb72356a4e2f8735e4128af85921ca98fa1 Author: Jiri Olsa Date: Mon Nov 2 00:31:03 2020 +0100 perf tools: Add missing swap for ino_generation We are missing swap for ino_generation field. Fixes: 5c5e854bc760 ("perf tools: Add attr->mmap2 support") Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Link: https://lore.kernel.org/r/20201101233103.3537427-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6311951d4f8f28c43b554ff0719027884bedd7e3 Author: Jiri Olsa Date: Mon Nov 2 00:31:02 2020 +0100 perf tools: Initialize output buffer in build_id__sprintf We display garbage for undefined build_id objects, because we don't initialize the output buffer. Signed-off-by: Jiri Olsa Acked-by: Namhyung Kim Link: https://lore.kernel.org/r/20201101233103.3537427-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 86449b12f626a65d2a2ecfada1e024488471f9e2 Author: Song Liu Date: Fri Oct 30 16:54:31 2020 -0700 perf hists browser: Increase size of 'buf' in perf_evsel__hists_browse() Making perf with gcc-9.1.1 generates the following warning: CC ui/browsers/hists.o ui/browsers/hists.c: In function 'perf_evsel__hists_browse': ui/browsers/hists.c:3078:61: error: '%d' directive output may be \ truncated writing between 1 and 11 bytes into a region of size \ between 2 and 12 [-Werror=format-truncation=] 3078 | "Max event group index to sort is %d (index from 0 to %d)", | ^~ ui/browsers/hists.c:3078:7: note: directive argument in the range [-2147483648, 8] 3078 | "Max event group index to sort is %d (index from 0 to %d)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:937, from ui/browsers/hists.c:5: IOW, the string in line 3078 might be too long for buf[] of 64 bytes. Fix this by increasing the size of buf[] to 128. Fixes: dbddf1747441 ("perf report/top TUI: Support hotkeys to let user select any event for sorting") Signed-off-by: Song Liu Acked-by: Jiri Olsa Cc: Jin Yao Cc: stable@vger.kernel.org # v5.7+ Link: http://lore.kernel.org/lkml/20201030235431.534417-1-songliubraving@fb.com Signed-off-by: Arnaldo Carvalho de Melo commit 42cc0e70a21faa8e7d7ea8713a3f9cd64bd3f60a Author: Arnaldo Carvalho de Melo Date: Tue Nov 3 08:52:11 2020 -0300 tools include UAPI: Update linux/mount.h copy To pick the changes from: dab741e0e02bd3c4 ("Add a "nosymfollow" mount option.") That ends up adding support for the new MS_NOSYMFOLLOW mount flag: $ tools/perf/trace/beauty/mount_flags.sh > before $ cp include/uapi/linux/mount.h tools/include/uapi/linux/mount.h $ tools/perf/trace/beauty/mount_flags.sh > after $ diff -u before after --- before 2020-11-03 08:51:28.117997454 -0300 +++ after 2020-11-03 08:51:38.992218869 -0300 @@ -7,6 +7,7 @@ [32 ? (ilog2(32) + 1) : 0] = "REMOUNT", [64 ? (ilog2(64) + 1) : 0] = "MANDLOCK", [128 ? (ilog2(128) + 1) : 0] = "DIRSYNC", + [256 ? (ilog2(256) + 1) : 0] = "NOSYMFOLLOW", [1024 ? (ilog2(1024) + 1) : 0] = "NOATIME", [2048 ? (ilog2(2048) + 1) : 0] = "NODIRATIME", [4096 ? (ilog2(4096) + 1) : 0] = "BIND", $ So now one can use it in --filter expressions for tracepoints. This silences this perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/linux/mount.h' differs from latest version at 'include/uapi/linux/mount.h' diff -u tools/include/uapi/linux/mount.h include/uapi/linux/mount.h Cc: Adrian Hunter Cc: Al Viro Cc: Ian Rogers Cc: Jiri Olsa Cc: Mattias Nissler Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit a9e27f5f9827eab25b76155fddcc22ddeeed58d2 Author: Arnaldo Carvalho de Melo Date: Tue Nov 3 08:49:59 2020 -0300 tools headers UAPI: Update tools's copy of linux/perf_event.h The diff is just tabs versus spaces, trivial. This silences this perf tools build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/perf_event.h' differs from latest version at 'include/uapi/linux/perf_event.h' diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit aa04899a13078e4181146212555a1bbaa387d2c9 Author: Arnaldo Carvalho de Melo Date: Mon Oct 19 13:42:55 2020 -0300 tools kvm headers: Update KVM headers from the kernel sources Some should cause changes in tooling, like the one adding LAST_EXCP, but the way it is structured end up not making that happen. The new SVM_EXIT_INVPCID should get used by arch/x86/util/kvm-stat.c, in the svm_exit_reasons table. The tools/perf/trace/beauty part has scripts to catch changes and automagically create tables, like tools/perf/trace/beauty/kvm_ioctl.sh, but changes are needed to make tools/perf/arch/x86/util/kvm-stat.c catch those automatically. These were handled by the existing scripts: $ 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 2020-11-03 08:43:52.910728608 -0300 +++ after 2020-11-03 08:44:04.273959984 -0300 @@ -89,6 +89,7 @@ [0xbf] = "SET_NESTED_STATE", [0xc0] = "CLEAR_DIRTY_LOG", [0xc1] = "GET_SUPPORTED_HV_CPUID", + [0xc6] = "X86_SET_MSR_FILTER", [0xe0] = "CREATE_DEVICE", [0xe1] = "SET_DEVICE_ATTR", [0xe2] = "GET_DEVICE_ATTR", $ $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > before $ cp include/uapi/linux/vhost.h tools/include/uapi/linux/vhost.h $ $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > after $ diff -u before after --- before 2020-11-03 08:45:55.522225198 -0300 +++ after 2020-11-03 08:46:12.881578666 -0300 @@ -37,4 +37,5 @@ [0x71] = "VDPA_GET_STATUS", [0x73] = "VDPA_GET_CONFIG", [0x76] = "VDPA_GET_VRING_NUM", + [0x78] = "VDPA_GET_IOVA_RANGE", }; $ This addresses these perf build warnings: 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/s390/include/uapi/asm/sie.h' differs from latest version at 'arch/s390/include/uapi/asm/sie.h' diff -u tools/arch/s390/include/uapi/asm/sie.h arch/s390/include/uapi/asm/sie.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/arch/x86/include/uapi/asm/svm.h' differs from latest version at 'arch/x86/include/uapi/asm/svm.h' diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.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 Warning: Kernel ABI header at 'tools/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h' diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h Cc: Adrian Hunter Cc: Alexander Yarygin Cc: Borislav Petkov Cc: Christian Borntraeger Cc: Cornelia Huck Cc: David Ahern Cc: Ian Rogers Cc: Jiri Olsa Cc: Joerg Roedel Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 97a3863b170e38a8eefc07a72d418a81fd225216 Author: Arnaldo Carvalho de Melo Date: Mon Oct 19 13:36:41 2020 -0300 tools UAPI: Update copy of linux/mman.h from the kernel sources e47168f3d1b14af5 ("powerpc/8xx: Support 16k hugepages with 4k pages") That don't cause any changes in tooling, just addresses this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/mman.h' differs from latest version at 'include/uapi/linux/mman.h' diff -u tools/include/uapi/linux/mman.h include/uapi/linux/mman.h Cc: Adrian Hunter Cc: Christophe Leroy Cc: Ian Rogers Cc: Jiri Olsa Cc: Michael Ellerman Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 32b734e09ec38a0bb81d05d37056a95584d14c99 Author: Arnaldo Carvalho de Melo Date: Mon Oct 19 13:28:04 2020 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes in: 29dcc60f6a19fb0a ("x86/boot/compressed/64: Add stage1 #VC handler") 36e1be8ada994d50 ("perf/x86/amd/ibs: Fix raw sample data accumulation") 59a854e2f3b90ad2 ("perf/x86/intel: Support TopDown metrics on Ice Lake") 7b2c05a15d29d057 ("perf/x86/intel: Generic support for hardware TopDown metrics") 99e40204e014e066 ("x86/msr: Move the F15h MSRs where they belong") b57de6cd16395be1 ("x86/sev-es: Add SEV-ES Feature Detection") ed7bde7a6dab521e ("cpufreq: intel_pstate: Allow enable/disable energy efficiency") f0f2f9feb4ee6f28 ("x86/msr-index: Define an IA32_PASID MSR") That cause these changes in tooling: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after $ diff -u before after --- before 2020-10-19 13:27:33.195274425 -0300 +++ after 2020-10-19 13:27:44.144507610 -0300 @@ -113,6 +113,8 @@ [0x00000309] = "CORE_PERF_FIXED_CTR0", [0x0000030a] = "CORE_PERF_FIXED_CTR1", [0x0000030b] = "CORE_PERF_FIXED_CTR2", + [0x0000030c] = "CORE_PERF_FIXED_CTR3", + [0x00000329] = "PERF_METRICS", [0x00000345] = "IA32_PERF_CAPABILITIES", [0x0000038d] = "CORE_PERF_FIXED_CTR_CTRL", [0x0000038e] = "CORE_PERF_GLOBAL_STATUS", @@ -222,6 +224,7 @@ [0x00000774] = "HWP_REQUEST", [0x00000777] = "HWP_STATUS", [0x00000d90] = "IA32_BNDCFGS", + [0x00000d93] = "IA32_PASID", [0x00000da0] = "IA32_XSS", [0x00000dc0] = "LBR_INFO_0", [0x00000ffc] = "IA32_BNDCFGS_RSVD", @@ -279,6 +282,7 @@ [0xc0010115 - x86_AMD_V_KVM_MSRs_offset] = "VM_IGNNE", [0xc0010117 - x86_AMD_V_KVM_MSRs_offset] = "VM_HSAVE_PA", [0xc001011f - x86_AMD_V_KVM_MSRs_offset] = "AMD64_VIRT_SPEC_CTRL", + [0xc0010130 - x86_AMD_V_KVM_MSRs_offset] = "AMD64_SEV_ES_GHCB", [0xc0010131 - x86_AMD_V_KVM_MSRs_offset] = "AMD64_SEV", [0xc0010140 - x86_AMD_V_KVM_MSRs_offset] = "AMD64_OSVW_ID_LENGTH", [0xc0010141 - x86_AMD_V_KVM_MSRs_offset] = "AMD64_OSVW_STATUS", $ Which causes these parts of tools/perf/ to be rebuilt: CC /tmp/build/perf/trace/beauty/tracepoints/x86_msr.o DESCEND plugins GEN /tmp/build/perf/python/perf.so INSTALL trace_plugins LD /tmp/build/perf/trace/beauty/tracepoints/perf-in.o LD /tmp/build/perf/trace/beauty/perf-in.o LD /tmp/build/perf/perf-in.o LINK /tmp/build/perf/per At some point these should just be tables read by perf on demand. This addresses this perf tools build warning: diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h' Cc: Adrian Hunter Cc: Borislav Petkov Cc: Fenghua Yu Cc: Ian Rogers Cc: Jiri Olsa Cc: Joerg Roedel Cc: Kan Liang Cc: Kim Phillips Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Srinivas Pandruvada Signed-off-by: Arnaldo Carvalho de Melo commit 8b2fc25a945b125c7ee4c36b048ad65f7c04105e Author: Arnaldo Carvalho de Melo Date: Mon Oct 19 13:24:52 2020 -0300 tools x86 headers: Update required-features.h header from the kernel To pick the changes from: ecac71816a1829c0 ("x86/paravirt: Use CONFIG_PARAVIRT_XXL instead of CONFIG_PARAVIRT") That don entail any changes in tooling, just addressing these perf tools build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/required-features.h' differs from latest version at 'arch/x86/include/asm/required-features.h' diff -u tools/arch/x86/include/asm/required-features.h arch/x86/include/asm/required-features.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juergen Gross Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 40a6bbf5149c7302bd7515fb5e2c3d12bac462f5 Author: Arnaldo Carvalho de Melo Date: Mon Oct 19 13:21:04 2020 -0300 tools x86 headers: Update cpufeatures.h headers copies To pick the changes from: 5866e9205b47a983 ("x86/cpu: Add hardware-enforced cache coherency as a CPUID feature") ff4f82816dff28ff ("x86/cpufeatures: Enumerate ENQCMD and ENQCMDS instructions") 360e7c5c4ca4fd8e ("x86/cpufeatures: Add SEV-ES CPU feature") 18ec63faefb3fd31 ("x86/cpufeatures: Enumerate TSX suspend load address tracking instructions") e48cb1a3fb916500 ("x86/resctrl: Enumerate per-thread MBA controls") Which don't cause any changes in tooling, just addresses these build warnings: 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 Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h' diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h Cc: Adrian Hunter Cc: Borislav Petkov Cc: Fenghua Yu Cc: Ian Rogers Cc: Jiri Olsa Cc: Krish Sadhukhan Cc: Kyung Min Park Cc: Namhyung Kim Cc: Tom Lendacky Signed-off-by: Arnaldo Carvalho de Melo commit d0448d6a249b6fc4518181b214d3403dfe2c8075 Author: Arnaldo Carvalho de Melo Date: Mon Oct 19 13:12:52 2020 -0300 tools headers UAPI: Update fscrypt.h copy To get the changes from: c7f0207b613033c5 ("fscrypt: make "#define fscrypt_policy" user-only") That don't cause any changes in tools/perf, only addresses this perf tools build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/fscrypt.h' differs from latest version at 'include/uapi/linux/fscrypt.h' diff -u tools/include/uapi/linux/fscrypt.h include/uapi/linux/fscrypt.h Cc: Adrian Hunter Cc: Eric Biggers Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 9e228f48980635c187720c0956b39c04db5e8f56 Author: Arnaldo Carvalho de Melo Date: Mon Oct 19 12:41:58 2020 -0300 tools headers UAPI: Sync drm/i915_drm.h with the kernel sources To pick the changes in: 13149e8bafc46572 ("drm/i915: add syncobj timeline support") cda9edd02425d790 ("drm/i915: introduce a mechanism to extend execbuf2") That don't result in any changes in tooling, just silences this perf build warning: 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 Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Lionel Landwerlin Cc: Namhyung Kim Cc: Rodrigo Vivi Signed-off-by: Arnaldo Carvalho de Melo commit ad6330ac2c5a38e5573cb6ae8ff75288bfd96325 Author: Arnaldo Carvalho de Melo Date: Mon Oct 19 12:38:16 2020 -0300 tools headers UAPI: Sync prctl.h with the kernel sources To get the changes in: 1c101da8b971a366 ("arm64: mte: Allow user control of the tag check mode via prctl()") af5ce95282dc99d0 ("arm64: mte: Allow user control of the generated random tags via prctl()") Which don't cause any change in tooling, only addresses this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/prctl.h' differs from latest version at 'include/uapi/linux/prctl.h' diff -u tools/include/uapi/linux/prctl.h include/uapi/linux/prctl.h Cc: Adrian Hunter Cc: Catalin Marinas Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit d0e7b0c71fbb653de90a7163ef46912a96f0bdaf Author: Arnaldo Carvalho de Melo Date: Fri Oct 30 08:24:38 2020 -0300 perf scripting python: Avoid declaring function pointers with a visibility attribute To avoid this: util/scripting-engines/trace-event-python.c: In function 'python_start_script': util/scripting-engines/trace-event-python.c:1595:2: error: 'visibility' attribute ignored [-Werror=attributes] 1595 | PyMODINIT_FUNC (*initfunc)(void); | ^~~~~~~~~~~~~~ That started breaking when building with PYTHON=python3 and these gcc versions (I haven't checked with the clang ones, maybe it breaks there as well): # export PERF_TARBALL=http://192.168.86.5/perf/perf-5.9.0.tar.xz # dm fedora:33 fedora:rawhide 1 107.80 fedora:33 : Ok gcc (GCC) 10.2.1 20201005 (Red Hat 10.2.1-5), clang version 11.0.0 (Fedora 11.0.0-1.fc33) 2 92.47 fedora:rawhide : Ok gcc (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6), clang version 11.0.0 (Fedora 11.0.0-1.fc34) # Avoid that by ditching that 'initfunc' function pointer with its: #define Py_EXPORTED_SYMBOL _attribute_ ((visibility ("default"))) #define PyMODINIT_FUNC Py_EXPORTED_SYMBOL PyObject* And just call PyImport_AppendInittab() at the end of the ifdef python3 block with the functions that were being attributed to that initfunc. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 9ae1e990f1ab522b98baefbfebf3cbac1a2cfac2 Author: Peter Zijlstra Date: Wed Oct 28 09:11:23 2020 +0100 perf tools: Remove broken __no_tail_call attribute The GCC specific __attribute__((optimize)) attribute does not what is commonly expected and is explicitly recommended against using in production code by the GCC people. Unlike what is often expected, it doesn't add to the optimization flags, but it fully replaces them, loosing any and all optimization flags provided by the compiler commandline. The only guaranteed upon means of inhibiting tail-calls is by placing a volatile asm with side-effects after the call such that the tail-call simply cannot be done. Given the original commit wasn't specific on which calls were the problem, this removal might re-introduce the problem, which can then be re-analyzed and cured properly. Signed-off-by: Peter Zijlstra Acked-by: Ard Biesheuvel Acked-by: Miguel Ojeda Cc: Alexei Starovoitov Cc: Arnd Bergmann Cc: Arvind Sankar Cc: Daniel Borkmann Cc: Geert Uytterhoeven Cc: Ian Rogers Cc: Josh Poimboeuf Cc: Kees Kook Cc: Martin Liška Cc: Nick Desaulniers Cc: Randy Dunlap Cc: Thomas Gleixner Link: http://lore.kernel.org/lkml/20201028081123.GT2628@hirez.programming.kicks-ass.net Signed-off-by: Arnaldo Carvalho de Melo commit 0dfbe4c646bf06a85c3d70572a8b8aa6ebffe3d5 Author: Jin Yao Date: Fri Oct 23 08:53:34 2020 +0800 perf vendor events: Fix DRAM_BW_Use 0 issue for CLX/SKX Ian reports an issue that the metric DRAM_BW_Use often remains 0. The metric expression for DRAM_BW_Use on CLX/SKX: "( 64 * ( uncore_imc@cas_count_read@ + uncore_imc@cas_count_write@ ) / 1000000000 ) / duration_time" The counts of uncore_imc/cas_count_read/ and uncore_imc/cas_count_write/ are scaled up by 64, that is to turn a count of cache lines into bytes, the count is then divided by 1000000000 to give GB. However, the counts of uncore_imc/cas_count_read/ and uncore_imc/cas_count_write/ have been scaled yet. The scale values are from sysfs, such as /sys/devices/uncore_imc_0/events/cas_count_read.scale. It's 6.103515625e-5 (64 / 1024.0 / 1024.0). So if we use original metric expression, the result is not correct. But the difficulty is, for SKL client, the counts are not scaled. The metric expression for DRAM_BW_Use on SKL: "64 * ( arb@event\\=0x81\\,umask\\=0x1@ + arb@event\\=0x84\\,umask\\=0x1@ ) / 1000000 / duration_time / 1000" root@kbl-ppc:~# perf stat -M DRAM_BW_Use -a -- sleep 1 Performance counter stats for 'system wide': 190 arb/event=0x84,umask=0x1/ # 1.86 DRAM_BW_Use 29,093,178 arb/event=0x81,umask=0x1/ 1,000,703,287 ns duration_time 1.000703287 seconds time elapsed The result is expected. So the easy way is just change the metric expression for CLX/SKX. This patch changes the metric expression to: "( ( ( uncore_imc@cas_count_read@ + uncore_imc@cas_count_write@ ) * 1048576 ) / 1000000000 ) / duration_time" 1048576 = 1024 * 1024. Before (tested on CLX): root@lkp-csl-2sp5 ~# perf stat -M DRAM_BW_Use -a -- sleep 1 Performance counter stats for 'system wide': 765.35 MiB uncore_imc/cas_count_read/ # 0.00 DRAM_BW_Use 5.42 MiB uncore_imc/cas_count_write/ 1001515088 ns duration_time 1.001515088 seconds time elapsed After: root@lkp-csl-2sp5 ~# perf stat -M DRAM_BW_Use -a -- sleep 1 Performance counter stats for 'system wide': 767.95 MiB uncore_imc/cas_count_read/ # 0.80 DRAM_BW_Use 5.02 MiB uncore_imc/cas_count_write/ 1001900010 ns duration_time 1.001900010 seconds time elapsed Fixes: 038d3b53c284 ("perf vendor events intel: Update CascadelakeX events to v1.08") Fixes: b5ff7f2799a4 ("perf vendor events: Update SkylakeX events to v1.21") Signed-off-by: Jin Yao Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20201023005334.7869-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a6293f36ac92ab513771a98efe486477be2f981f Author: Stanislav Ivanichkin Date: Tue Oct 27 12:43:57 2020 +0300 perf trace: Fix segfault when trying to trace events by cgroup # ./perf trace -e sched:sched_switch -G test -a sleep 1 perf: Segmentation fault Obtained 11 stack frames. ./perf(sighandler_dump_stack+0x43) [0x55cfdc636db3] /lib/x86_64-linux-gnu/libc.so.6(+0x3efcf) [0x7fd23eecafcf] ./perf(parse_cgroups+0x36) [0x55cfdc673f36] ./perf(+0x3186ed) [0x55cfdc70d6ed] ./perf(parse_options_subcommand+0x629) [0x55cfdc70e999] ./perf(cmd_trace+0x9c2) [0x55cfdc5ad6d2] ./perf(+0x1e8ae0) [0x55cfdc5ddae0] ./perf(+0x1e8ded) [0x55cfdc5ddded] ./perf(main+0x370) [0x55cfdc556f00] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe6) [0x7fd23eeadb96] ./perf(_start+0x29) [0x55cfdc557389] Segmentation fault # It happens because "struct trace" in option->value is passed to the parse_cgroups function instead of "struct evlist". Fixes: 9ea42ba4411ac ("perf trace: Support setting cgroups as targets") Signed-off-by: Stanislav Ivanichkin Tested-by: Arnaldo Carvalho de Melo Acked-by: Namhyung Kim Cc: Dmitry Monakhov Link: http://lore.kernel.org/lkml/20201027094357.94881-1-sivanichkin@yandex-team.ru Signed-off-by: Arnaldo Carvalho de Melo commit ab8bf5f2e0321f254590ad81c6e230185d88b4e5 Author: Tommi Rantala Date: Fri Oct 16 14:47:18 2020 +0300 perf tools: Fix crash with non-jited bpf progs The addr in PERF_RECORD_KSYMBOL events for non-jited bpf progs points to the bpf interpreter, ie. within kernel text section. When processing the unregister event, this causes unexpected removal of vmlinux_map, crashing perf later in cleanup: # perf record -- timeout --signal=INT 2s /usr/share/bcc/tools/execsnoop PCOMM PID PPID RET ARGS [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.208 MB perf.data (5155 samples) ] perf: tools/include/linux/refcount.h:131: refcount_sub_and_test: Assertion `!(new > val)' failed. Aborted (core dumped) # perf script -D|grep KSYM 0 0xa40 [0x48]: PERF_RECORD_KSYMBOL addr ffffffffa9b6b530 len 0 type 1 flags 0x0 name bpf_prog_f958f6eb72ef5af6 0 0xab0 [0x48]: PERF_RECORD_KSYMBOL addr ffffffffa9b6b530 len 0 type 1 flags 0x0 name bpf_prog_8c42dee26e8cd4c2 0 0xb20 [0x48]: PERF_RECORD_KSYMBOL addr ffffffffa9b6b530 len 0 type 1 flags 0x0 name bpf_prog_f958f6eb72ef5af6 108563691893 0x33d98 [0x58]: PERF_RECORD_KSYMBOL addr ffffffffa9b6b3b0 len 0 type 1 flags 0x0 name bpf_prog_bc5697a410556fc2_syscall__execve 108568518458 0x34098 [0x58]: PERF_RECORD_KSYMBOL addr ffffffffa9b6b3f0 len 0 type 1 flags 0x0 name bpf_prog_45e2203c2928704d_do_ret_sys_execve 109301967895 0x34830 [0x58]: PERF_RECORD_KSYMBOL addr ffffffffa9b6b3b0 len 0 type 1 flags 0x1 name bpf_prog_bc5697a410556fc2_syscall__execve 109302007356 0x348b0 [0x58]: PERF_RECORD_KSYMBOL addr ffffffffa9b6b3f0 len 0 type 1 flags 0x1 name bpf_prog_45e2203c2928704d_do_ret_sys_execve perf: tools/include/linux/refcount.h:131: refcount_sub_and_test: Assertion `!(new > val)' failed. Here the addresses match the bpf interpreter: # grep -e ffffffffa9b6b530 -e ffffffffa9b6b3b0 -e ffffffffa9b6b3f0 /proc/kallsyms ffffffffa9b6b3b0 t __bpf_prog_run224 ffffffffa9b6b3f0 t __bpf_prog_run192 ffffffffa9b6b530 t __bpf_prog_run32 Fix by not allowing vmlinux_map to be removed by PERF_RECORD_KSYMBOL unregister event. Signed-off-by: Tommi Rantala Acked-by: Jiri Olsa Tested-by: Jiri Olsa Link: https://lore.kernel.org/r/20201016114718.54332-1-tommi.t.rantala@nokia.com Signed-off-by: Arnaldo Carvalho de Melo commit 263e452eff397b370e39d464c8cbd30f6bd59fb9 Author: Arnaldo Carvalho de Melo Date: Tue Nov 3 08:29:30 2020 -0300 tools headers UAPI: Update process_madvise affected files To pick the changes from: ecb8ac8b1f146915 ("mm/madvise: introduce process_madvise() syscall: an external memory hinting API") That addresses these perf build warning: 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 Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Linus Torvalds Cc: Minchan Kim Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit e555b4b8d7b2844a9e48e06a7c3e4f9e44af847f Author: Arnaldo Carvalho de Melo Date: Mon Oct 19 12:26:45 2020 -0300 perf tools: Update copy of libbpf's hashmap.c To pick the changes in: 85367030a6c7ef33 ("libbpf: Centralize poisoning and poison reallocarray()") 7d9c71e10baa3496 ("libbpf: Extract generic string hashing function for reuse") That don't entail any changes in tools/perf. This addresses this perf build warning: Warning: Kernel ABI header at 'tools/perf/util/hashmap.h' differs from latest version at 'tools/lib/bpf/hashmap.h' diff -u tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h Not a kernel ABI, its just that this uses the mechanism in place for checking kernel ABI files drift. Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit b773ea650576f14442f7a546f2b15e64b10ed0eb Author: Justin M. Forbes Date: Wed Oct 28 13:59:00 2020 -0300 perf tools: Remove LTO compiler options when building perl support To avoid breaking the build by mixing files compiled with things coming from distro specific compiler options for perl with the rest of perf, i.e. to avoid this: `.gnu.debuglto_.debug_macro' referenced in section `.gnu.debuglto_.debug_macro' of /tmp/build/perf/util/scripting-engines/perf-in.o: defined in discarded section `.gnu.debuglto_.debug_macro[wm4.stdcpredef.h.19.8dc41bed5d9037ff9622e015fb5f0ce3]' of /tmp/build/perf/util/scripting-engines/perf-in.o Noticed on Fedora 33. Signed-off-by: Justin M. Forbes Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1593431 Cc: Jiri Olsa Link: https://src.fedoraproject.org/rpms/kernel-tools/c/589a32b62f0c12516ab7b34e3dd30d450145bfa4?branch=master Signed-off-by: Arnaldo Carvalho de Melo commit 9522750c66c689b739e151fcdf895420dc81efc0 Author: Lee Jones Date: Mon Nov 2 13:32:42 2020 -0500 Fonts: Replace discarded const qualifier Commit 6735b4632def ("Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts") introduced the following error when building rpc_defconfig (only this build appears to be affected): `acorndata_8x8' referenced in section `.text' of arch/arm/boot/compressed/ll_char_wr.o: defined in discarded section `.data' of arch/arm/boot/compressed/font.o `acorndata_8x8' referenced in section `.data.rel.ro' of arch/arm/boot/compressed/font.o: defined in discarded section `.data' of arch/arm/boot/compressed/font.o make[3]: *** [/scratch/linux/arch/arm/boot/compressed/Makefile:191: arch/arm/boot/compressed/vmlinux] Error 1 make[2]: *** [/scratch/linux/arch/arm/boot/Makefile:61: arch/arm/boot/compressed/vmlinux] Error 2 make[1]: *** [/scratch/linux/arch/arm/Makefile:317: zImage] Error 2 The .data section is discarded at link time. Reinstating acorndata_8x8 as const ensures it is still available after linking. Do the same for the other 12 built-in fonts as well, for consistency purposes. Cc: Cc: Russell King Reviewed-by: Greg Kroah-Hartman Fixes: 6735b4632def ("Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts") Signed-off-by: Lee Jones Co-developed-by: Peilin Ye Signed-off-by: Peilin Ye Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201102183242.2031659-1-yepeilin.cs@gmail.com commit 2a13c13b39a8aea4c69a31549e4cb0094f30103b Author: Vanshidhar Konda Date: Fri Oct 30 10:30:50 2020 -0700 arm64: NUMA: Kconfig: Increase NODES_SHIFT to 4 The current arm64 default config limits max NUMA nodes available on system to 4 (NODES_SHIFT = 2). Today's arm64 systems can reach or exceed 16 NUMA nodes. To accomodate current hardware and to fit NODES_SHIFT within page flags on arm64, increase NODES_SHIFT to 4. Signed-off-by: Vanshidhar Konda Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20201020173409.1266576-1-vanshikonda@os.amperecomputing.com/ Link: https://lore.kernel.org/r/20201030173050.1182876-1-vanshikonda@os.amperecomputing.com Signed-off-by: Will Deacon commit 0a8a2c85b83589a5c10bc5564b796836bf4b4984 Author: Sagi Grimberg Date: Thu Oct 22 10:15:31 2020 +0800 nvme-tcp: avoid repeated request completion The request may be executed asynchronously, and rq->state may be changed to IDLE. To avoid repeated request completion, only MQ_RQ_COMPLETE of rq->state is checked in nvme_tcp_complete_timed_out. It is not safe, so need adding check IDLE for rq->state. Signed-off-by: Sagi Grimberg Signed-off-by: Chao Leng Signed-off-by: Christoph Hellwig commit fdf58e02adecbef4c7cbb2073d8ea225e6fd5f26 Author: Sagi Grimberg Date: Thu Oct 22 10:15:23 2020 +0800 nvme-rdma: avoid repeated request completion The request may be executed asynchronously, and rq->state may be changed to IDLE. To avoid repeated request completion, only MQ_RQ_COMPLETE of rq->state is checked in nvme_rdma_complete_timed_out. It is not safe, so need adding check IDLE for rq->state. Signed-off-by: Sagi Grimberg Signed-off-by: Chao Leng Signed-off-by: Christoph Hellwig commit d6f66210f4b1aa2f5944f0e34e0f8db44f499f92 Author: Chao Leng Date: Thu Oct 22 10:15:15 2020 +0800 nvme-tcp: avoid race between time out and tear down Now use teardown_lock to serialize for time out and tear down. This may cause abnormal: first cancel all request in tear down, then time out may complete the request again, but the request may already be freed or restarted. To avoid race between time out and tear down, in tear down process, first we quiesce the queue, and then delete the timer and cancel the time out work for the queue. At the same time we need to delete teardown_lock. Signed-off-by: Chao Leng Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 3017013dcc82a4862bd1e140f8b762cfc594008d Author: Chao Leng Date: Thu Oct 22 10:15:08 2020 +0800 nvme-rdma: avoid race between time out and tear down Now use teardown_lock to serialize for time out and tear down. This may cause abnormal: first cancel all request in tear down, then time out may complete the request again, but the request may already be freed or restarted. To avoid race between time out and tear down, in tear down process, first we quiesce the queue, and then delete the timer and cancel the time out work for the queue. At the same time we need to delete teardown_lock. Signed-off-by: Chao Leng Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 04800fbff4764ab7b32c49d19628605a5d4cb85c Author: Chao Leng Date: Thu Oct 22 10:15:00 2020 +0800 nvme: introduce nvme_sync_io_queues Introduce sync io queues for some scenarios which just only need sync io queues not sync all queues. Signed-off-by: Chao Leng Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit afaa2e745a246c5ab95103a65b1ed00101e1bc63 Author: Alan Stern Date: Mon Nov 2 09:58:21 2020 -0500 USB: Add NO_LPM quirk for Kingston flash drive In Bugzilla #208257, Julien Humbert reports that a 32-GB Kingston flash drive spontaneously disconnects and reconnects, over and over. Testing revealed that disabling Link Power Management for the drive fixed the problem. This patch adds a quirk entry for that drive to turn off LPM permanently. CC: Hans de Goede CC: Reported-and-tested-by: Julien Humbert Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20201102145821.GA1478741@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit bcbc0b2e275f0a797de11a10eff495b4571863fc Author: Alexander Usyskin Date: Thu Oct 29 11:54:42 2020 +0200 mei: protect mei_cl_mtu from null dereference A receive callback is queued while the client is still connected but can still be called after the client was disconnected. Upon disconnect cl->me_cl is set to NULL, hence we need to check that ME client is not-NULL in mei_cl_mtu to avoid null dereference. Cc: Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20201029095444.957924-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 077aa5c8dd6e2b9c721e8cb3d98a3aa8ecb0e2ef Author: Maxime Ripard Date: Mon Nov 2 17:29:08 2020 +0100 drm/vc4: drv: Remove unused variable The commit dcda7c28bff2 ("drm/vc4: kms: Add functions to create the state objects") removed the last users of the vc4 variable, but didn't remove that variable resulting in a warning. Fixes: dcda7c28bff2 ("drm/vc4: kms: Add functions to create the state objects") Reported-by: Daniel Vetter Signed-off-by: Maxime Ripard Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201102162908.1436567-1-maxime@cerno.tech commit 876b15d2c88d8c005f1aebeaa23f1e448d834757 Author: Steven Price Date: Fri Oct 30 14:58:33 2020 +0000 drm/panfrost: Fix module unload When unloading the call to pm_runtime_put_sync_suspend() will attempt to turn the GPU cores off, however panfrost_device_fini() will have turned the clocks off. This leads to the hardware locking up. Instead don't call pm_runtime_put_sync_suspend() and instead simply mark the device as suspended using pm_runtime_set_suspended(). And also include this on the error path in panfrost_probe(). Fixes: aebe8c22a912 ("drm/panfrost: Fix possible suspend in panfrost_remove") Signed-off-by: Steven Price Reviewed-by: Tomeu Vizoso Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20201030145833.29006-1-steven.price@arm.com commit 0f7636e1654338c34e3c220c02b2ffad78b6ccc0 Author: Paul Menzel Date: Tue Aug 11 11:29:23 2020 +0200 init/Kconfig: Fix CPU number in LOG_CPU_MAX_BUF_SHIFT description Currently, LOG_BUF_SHIFT defaults to 17, which is 2 ^ 17 bytes = 128 KB, and LOG_CPU_MAX_BUF_SHIFT defaults to 12, which is 2 ^ 12 bytes = 4 KB. Half of 128 KB is 64 KB, so more than 16 CPUs are required for the value to be used, as then the sum of contributions is greater than 64 KB for the first time. My guess is, that the description was written with the configuration values used in the SUSE in mind. Fixes: 23b2899f7f194f06e ("printk: allow increasing the ring buffer depending on the number of CPUs") Cc: Luis R. Rodriguez Cc: linux-kernel@vger.kernel.org Signed-off-by: Paul Menzel Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200811092924.6256-1-pmenzel@molgen.mpg.de commit 7d2d6d01293e6d9b42a6cb410be4158571f7fe9d Author: Boris Brezillon Date: Sun Nov 1 18:40:16 2020 +0100 drm/panfrost: Fix a deadlock between the shrinker and madvise path panfrost_ioctl_madvise() and panfrost_gem_purge() acquire the mappings and shmem locks in different orders, thus leading to a potential the mappings lock first. Fixes: bdefca2d8dc0 ("drm/panfrost: Add the panfrost_gem_mapping concept") Cc: Cc: Christian Hewitt Reported-by: Christian Hewitt Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20201101174016.839110-1-boris.brezillon@collabora.com commit 9621618130bf7e83635367c13b9a6ee53935bb37 Author: YueHaibing Date: Sat Oct 31 11:10:53 2020 +0800 sfp: Fix error handing in sfp_probe() gpiod_to_irq() never return 0, but returns negative in case of error, check it and set gpio_irq to 0. Fixes: 73970055450e ("sfp: add SFP module support") Signed-off-by: YueHaibing Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201031031053.25264-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski commit 1d8504937478fdc2f3ef2174a816fd3302eca882 Author: Sukadev Bhattiprolu Date: Fri Oct 30 10:07:11 2020 -0700 powerpc/vnic: Extend "failover pending" window Commit 5a18e1e0c193b introduced the 'failover_pending' state to track the "failover pending window" - where we wait for the partner to become ready (after a transport event) before actually attempting to failover. i.e window is between following two events: a. we get a transport event due to a FAILOVER b. later, we get CRQ_INITIALIZED indicating the partner is ready at which point we schedule a FAILOVER reset. and ->failover_pending is true during this window. If during this window, we attempt to open (or close) a device, we pretend that the operation succeded and let the FAILOVER reset path complete the operation. This is fine, except if the transport event ("a" above) occurs during the open and after open has already checked whether a failover is pending. If that happens, we fail the open, which can cause the boot scripts to leave the interface down requiring administrator to manually bring up the device. This fix "extends" the failover pending window till we are _actually_ ready to perform the failover reset (i.e until after we get the RTNL lock). Since open() holds the RTNL lock, we can be sure that we either finish the open or if the open() fails due to the failover pending window, we can again pretend that open is done and let the failover complete it. We could try and block the open until failover is completed but a) that could still timeout the application and b) Existing code "pretends" that failover occurred "just after" open succeeded, so marks the open successful and lets the failover complete the open. So, mark the open successful even if the transport event occurs before we actually start the open. Fixes: 5a18e1e0c193 ("ibmvnic: Fix failover case for non-redundant configuration") Signed-off-by: Sukadev Bhattiprolu Acked-by: Dany Madden Link: https://lore.kernel.org/r/20201030170711.1562994-1-sukadev@linux.ibm.com Signed-off-by: Jakub Kicinski commit 00469c97ef64f6b7e3ab08c5eeb0378260baf983 Author: Adit Ranadive Date: Mon Nov 2 22:54:37 2020 +0000 RDMA/vmw_pvrdma: Fix the active_speed and phys_state value The pvrdma_port_attr structure is ABI toward the hypervisor, changing it breaks the ability to report the speed properly. Revert the change to u16. Fixes: 376ceb31ff87 ("RDMA: Fix link active_speed size") Link: https://lore.kernel.org/r/20201102225437.26557-1-aditr@vmware.com Reviewed-by: Vishnu Dasa Signed-off-by: Adit Ranadive Signed-off-by: Jason Gunthorpe commit 99cab7107d914a71c57f5a4e6d34292425fbbb61 Author: Jonathan McDowell Date: Fri Oct 30 18:33:15 2020 +0000 net: dsa: qca8k: Fix port MTU setting The qca8k only supports a switch-wide MTU setting, and the code to take the max of all ports was only looking at the port currently being set. Fix to examine all ports. Reported-by: DENG Qingfang Fixes: f58d2598cf70 ("net: dsa: qca8k: implement the port MTU callbacks") Signed-off-by: Jonathan McDowell Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201030183315.GA6736@earth.li Signed-off-by: Jakub Kicinski commit 5feed64f9199ff90c4239971733f23f30aeb2484 Author: Sreekanth Reddy Date: Mon Nov 2 12:57:46 2020 +0530 scsi: mpt3sas: Fix timeouts observed while reenabling IRQ While reenabling the IRQ after irq poll there may be small time window where HBA firmware has posted some replies and raise the interrupts but driver has not received the interrupts. So we may observe I/O timeouts as the driver has not processed the replies as interrupts got missed while reenabling the IRQ. To fix this issue the driver has to go for one more round of processing the reply descriptors from reply descriptor post queue after enabling the IRQ. Link: https://lore.kernel.org/r/20201102072746.27410-1-sreekanth.reddy@broadcom.com Reported-by: Tomas Henzl Reviewed-by: Tomas Henzl Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 5faf50e9e9fdc2117c61ff7e20da49cd6a29e0ca Author: Hannes Reinecke Date: Thu Sep 24 12:45:59 2020 +0200 scsi: scsi_dh_alua: Avoid crash during alua_bus_detach() alua_bus_detach() might be running concurrently with alua_rtpg_work(), so we might trip over h->sdev == NULL and call BUG_ON(). The correct way of handling it is to not set h->sdev to NULL in alua_bus_detach(), and call rcu_synchronize() before the final delete to ensure that all concurrent threads have left the critical section. Then we can get rid of the BUG_ON() and replace it with a simple if condition. Link: https://lore.kernel.org/r/1600167537-12509-1-git-send-email-jitendra.khasdev@oracle.com Link: https://lore.kernel.org/r/20200924104559.26753-1-hare@suse.de Cc: Brian Bunker Acked-by: Brian Bunker Tested-by: Jitendra Khasdev Reviewed-by: Jitendra Khasdev Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit b6df8c81412190fbd5eaa3cec7f642142d9c16cd Author: Petr Malat Date: Fri Oct 30 14:26:33 2020 +0100 sctp: Fix COMM_LOST/CANT_STR_ASSOC err reporting on big-endian platforms Commit 978aa0474115 ("sctp: fix some type cast warnings introduced since very beginning")' broke err reading from sctp_arg, because it reads the value as 32-bit integer, although the value is stored as 16-bit integer. Later this value is passed to the userspace in 16-bit variable, thus the user always gets 0 on big-endian platforms. Fix it by reading the __u16 field of sctp_arg union, as reading err field would produce a sparse warning. Fixes: 978aa0474115 ("sctp: fix some type cast warnings introduced since very beginning") Signed-off-by: Petr Malat Acked-by: Marcelo Ricardo Leitner Link: https://lore.kernel.org/r/20201030132633.7045-1-oss@malat.biz Signed-off-by: Jakub Kicinski commit 90bfdeef83f1d6c696039b6a917190dcbbad3220 Author: Linus Torvalds Date: Mon Oct 26 13:15:23 2020 -0700 tty: make FONTX ioctl use the tty pointer they were actually passed Some of the font tty ioctl's always used the current foreground VC for their operations. Don't do that then. This fixes a data race on fg_console. Side note: both Michael Ellerman and Jiri Slaby point out that all these ioctls are deprecated, and should probably have been removed long ago, and everything seems to be using the KDFONTOP ioctl instead. In fact, Michael points out that it looks like busybox's loadfont program seems to have switched over to using KDFONTOP exactly _because_ of this bug (ahem.. 12 years ago ;-). Reported-by: Minh Yuan Acked-by: Michael Ellerman Acked-by: Jiri Slaby Cc: Greg KH Signed-off-by: Linus Torvalds commit b7cbaf59f62f8ab8f157698f9e31642bff525bd0 Merge: 495023e4e49e4 3b70ae4f5c4e0 Author: Linus Torvalds Date: Mon Nov 2 14:47:37 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "Subsystems affected by this patch series: mm (memremap, memcg, slab-generic, kasan, mempolicy, pagecache, oom-kill, pagemap), kthread, signals, lib, epoll, and core-kernel" * emailed patches from Andrew Morton : kernel/hung_task.c: make type annotations consistent epoll: add a selftest for epoll timeout race mm: always have io_remap_pfn_range() set pgprot_decrypted() mm, oom: keep oom_adj under or at upper limit when printing kthread_worker: prevent queuing delayed work from timer_fn when it is being canceled mm/truncate.c: make __invalidate_mapping_pages() static lib/crc32test: remove extra local_irq_disable/enable ptrace: fix task_join_group_stop() for the case when current is traced mm: mempolicy: fix potential pte_unmap_unlock pte error kasan: adopt KUNIT tests to SW_TAGS mode mm: memcg: link page counters to root if use_hierarchy is false mm: memcontrol: correct the NR_ANON_THPS counter of hierarchical memcg hugetlb_cgroup: fix reservation accounting mm/mremap_pages: fix static key devmap_managed_key updates commit 7a078d2d18801bba7bde7337a823d7342299acf7 Author: Ian Rogers Date: Thu Oct 29 15:37:07 2020 -0700 libbpf, hashmap: Fix undefined behavior in hash_bits If bits is 0, the case when the map is empty, then the >> is the size of the register which is undefined behavior - on x86 it is the same as a shift by 0. Fix by handling the 0 case explicitly and guarding calls to hash_bits for empty maps in hashmap__for_each_key_entry and hashmap__for_each_entry_safe. Fixes: e3b924224028 ("libbpf: add resizable non-thread safe internal hashmap") Suggested-by: Andrii Nakryiko , Signed-off-by: Ian Rogers Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201029223707.494059-1-irogers@google.com commit 0a26ba0603d637eb6673a2ea79808cc73909ef3a Author: Grygorii Strashko Date: Thu Oct 29 21:09:10 2020 +0200 net: ethernet: ti: cpsw: disable PTPv1 hw timestamping advertisement The TI CPTS does not natively support PTPv1, only PTPv2. But, as it happens, the CPTS can provide HW timestamp for PTPv1 Sync messages, because CPTS HW parser looks for PTP messageType id in PTP message octet 0 which value is 0 for PTPv1. As result, CPTS HW can detect Sync messages for PTPv1 and PTPv2 (Sync messageType = 0 for both), but it fails for any other PTPv1 messages (Delay_req/resp) and will return PTP messageType id 0 for them. The commit e9523a5a32a1 ("net: ethernet: ti: cpsw: enable HWTSTAMP_FILTER_PTP_V1_L4_EVENT filter") added PTPv1 hw timestamping advertisement by mistake, only to make Linux Kernel "timestamping" utility work, and this causes issues with only PTPv1 compatible HW/SW - Sync HW timestamped, but Delay_req/resp are not. Hence, fix it disabling PTPv1 hw timestamping advertisement, so only PTPv1 compatible HW/SW can properly roll back to SW timestamping. Fixes: e9523a5a32a1 ("net: ethernet: ti: cpsw: enable HWTSTAMP_FILTER_PTP_V1_L4_EVENT filter") Signed-off-by: Grygorii Strashko Acked-by: Richard Cochran Link: https://lore.kernel.org/r/20201029190910.30789-1-grygorii.strashko@ti.com Signed-off-by: Jakub Kicinski commit 09699e56dee946a16767021af97411ed6f4b3e6b Author: Dan Carpenter Date: Fri Oct 23 14:34:50 2020 +0300 vfio/fsl-mc: return -EFAULT if copy_to_user() fails The copy_to_user() function returns the number of bytes remaining to be copied, but this code should return -EFAULT. Fixes: df747bcd5b21 ("vfio/fsl-mc: Implement VFIO_DEVICE_GET_REGION_INFO ioctl call") Signed-off-by: Dan Carpenter Acked-by: Diana Craciun Signed-off-by: Alex Williamson commit 572f64c71e0fe30089699b22ce0ca3d4bf452ce9 Author: Zenghui Yu Date: Thu Oct 22 20:24:17 2020 +0800 vfio/type1: Use the new helper to find vfio_group When attaching a new group to the container, let's use the new helper vfio_iommu_find_iommu_group() to check if it's already attached. There is no functional change. Also take this chance to add a missing blank line. Signed-off-by: Zenghui Yu Signed-off-by: Alex Williamson commit 561ca66910bf597f170be5a7aa531c4e05f8e9be Author: Steven Rostedt (VMware) Date: Mon Nov 2 11:28:39 2020 -0500 tracing: Make -ENOMEM the default error for parse_synth_field() parse_synth_field() returns a pointer and requires that errors get surrounded by ERR_PTR(). The ret variable is initialized to zero, but should never be used as zero, and if it is, it could cause a false return code and produce a NULL pointer dereference. It makes no sense to set ret to zero. Set ret to -ENOMEM (the most common error case), and have any other errors set it to something else. This removes the need to initialize ret on *every* error branch. Fixes: 761a8c58db6b ("tracing, synthetic events: Replace buggy strcat() with seq_buf operations") Reported-by: Dan Carpenter Signed-off-by: Steven Rostedt (VMware) commit b02414c8f045ab3b9afc816c3735bc98c5c3d262 Author: Steven Rostedt (VMware) Date: Mon Nov 2 15:31:27 2020 -0500 ring-buffer: Fix recursion protection transitions between interrupt context The recursion protection of the ring buffer depends on preempt_count() to be correct. But it is possible that the ring buffer gets called after an interrupt comes in but before it updates the preempt_count(). This will trigger a false positive in the recursion code. Use the same trick from the ftrace function callback recursion code which uses a "transition" bit that gets set, to allow for a single recursion for to handle transitions between contexts. Cc: stable@vger.kernel.org Fixes: 567cd4da54ff4 ("ring-buffer: User context bit recursion checking") Signed-off-by: Steven Rostedt (VMware) commit 6bd1c7bd4ee7b17980cdc347522dcb76feac9b98 Author: Andreas Gruenbacher Date: Mon Nov 2 21:11:30 2020 +0100 gfs2: Don't call cancel_delayed_work_sync from within delete work function Right now, we can end up calling cancel_delayed_work_sync from within delete_work_func via gfs2_lookup_by_inum -> gfs2_inode_lookup -> gfs2_cancel_delete_work. When that happens, it will result in a deadlock. Instead, gfs2_inode_lookup should skip the call to gfs2_cancel_delete_work when called from delete_work_func (blktype == GFS2_BLKST_UNLINKED). Reported-by: Alexander Ahring Oder Aring Fixes: a0e3cc65fa29 ("gfs2: Turn gl_delete into a delayed work") Cc: stable@vger.kernel.org # v5.8+ Signed-off-by: Andreas Gruenbacher commit 3b70ae4f5c4e050bdebeeefe0c369524f37917cf Author: Lukas Bulwahn Date: Sun Nov 1 17:08:10 2020 -0800 kernel/hung_task.c: make type annotations consistent Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") removed various __user annotations from function signatures as part of its refactoring. It also removed the __user annotation for proc_dohung_task_timeout_secs() at its declaration in sched/sysctl.h, but not at its definition in kernel/hung_task.c. Hence, sparse complains: kernel/hung_task.c:271:5: error: symbol 'proc_dohung_task_timeout_secs' redeclared with different type (incompatible argument 3 (different address spaces)) Adjust the annotation at the definition fitting to that refactoring to make sparse happy again, which also resolves this warning from sparse: kernel/hung_task.c:277:52: warning: incorrect type in argument 3 (different address spaces) kernel/hung_task.c:277:52: expected void * kernel/hung_task.c:277:52: got void [noderef] __user *buffer No functional change. No change in object code. Signed-off-by: Lukas Bulwahn Signed-off-by: Andrew Morton Cc: Christoph Hellwig Cc: Tetsuo Handa Cc: Al Viro Cc: Andrey Ignatov Link: https://lkml.kernel.org/r/20201028130541.20320-1-lukas.bulwahn@gmail.com Signed-off-by: Linus Torvalds commit afabdf3338728c3aaa9f55d127e903dcd5f4acc7 Author: Soheil Hassas Yeganeh Date: Sun Nov 1 17:08:07 2020 -0800 epoll: add a selftest for epoll timeout race Add a test case to ensure an event is observed by at least one poller when an epoll timeout is used. Signed-off-by: Guantao Liu Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Andrew Morton Reviewed-by: Eric Dumazet Reviewed-by: Khazhismel Kumykov Acked-by: Willem de Bruijn Cc: Al Viro Cc: Davidlohr Bueso Link: https://lkml.kernel.org/r/20201028180202.952079-2-soheil.kdev@gmail.com Signed-off-by: Linus Torvalds commit f8f6ae5d077a9bdaf5cbf2ac960a5d1a04b47482 Author: Jason Gunthorpe Date: Sun Nov 1 17:08:00 2020 -0800 mm: always have io_remap_pfn_range() set pgprot_decrypted() The purpose of io_remap_pfn_range() is to map IO memory, such as a memory mapped IO exposed through a PCI BAR. IO devices do not understand encryption, so this memory must always be decrypted. Automatically call pgprot_decrypted() as part of the generic implementation. This fixes a bug where enabling AMD SME causes subsystems, such as RDMA, using io_remap_pfn_range() to expose BAR pages to user space to fail. The CPU will encrypt access to those BAR pages instead of passing unencrypted IO directly to the device. Places not mapping IO should use remap_pfn_range(). Fixes: aca20d546214 ("x86/mm: Add support to make use of Secure Memory Encryption") Signed-off-by: Jason Gunthorpe Signed-off-by: Andrew Morton Cc: Arnd Bergmann Cc: Tom Lendacky Cc: Thomas Gleixner Cc: Andrey Ryabinin Cc: Borislav Petkov Cc: Brijesh Singh Cc: Jonathan Corbet Cc: Dmitry Vyukov Cc: "Dave Young" Cc: Alexander Potapenko Cc: Konrad Rzeszutek Wilk Cc: Andy Lutomirski Cc: Larry Woodman Cc: Matt Fleming Cc: Ingo Molnar Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Rik van Riel Cc: Toshimitsu Kani Cc: Link: https://lkml.kernel.org/r/0-v1-025d64bdf6c4+e-amd_sme_fix_jgg@nvidia.com Signed-off-by: Linus Torvalds commit 66606567dedf395e0857f531976efad4cbbd39ea Author: Charles Haithcock Date: Sun Nov 1 17:07:56 2020 -0800 mm, oom: keep oom_adj under or at upper limit when printing For oom_score_adj values in the range [942,999], the current calculations will print 16 for oom_adj. This patch simply limits the output so output is inline with docs. Signed-off-by: Charles Haithcock Signed-off-by: Andrew Morton Acked-by: Michal Hocko Cc: Alexey Dobriyan Link: https://lkml.kernel.org/r/20201020165130.33927-1-chaithco@redhat.com Signed-off-by: Linus Torvalds commit 6993d0fdbee0eb38bfac350aa016f65ad11ed3b1 Author: Zqiang Date: Sun Nov 1 17:07:53 2020 -0800 kthread_worker: prevent queuing delayed work from timer_fn when it is being canceled There is a small race window when a delayed work is being canceled and the work still might be queued from the timer_fn: CPU0 CPU1 kthread_cancel_delayed_work_sync() __kthread_cancel_work_sync() __kthread_cancel_work() work->canceling++; kthread_delayed_work_timer_fn() kthread_insert_work(); BUG: kthread_insert_work() should not get called when work->canceling is set. Signed-off-by: Zqiang Signed-off-by: Andrew Morton Reviewed-by: Petr Mladek Acked-by: Tejun Heo Cc: Link: https://lkml.kernel.org/r/20201014083030.16895-1-qiang.zhang@windriver.com Signed-off-by: Linus Torvalds commit a77eedbc871ee3b435bffc30b123b60eecca402c Author: Jason Yan Date: Sun Nov 1 17:07:50 2020 -0800 mm/truncate.c: make __invalidate_mapping_pages() static Fix the following sparse warning: mm/truncate.c:531:15: warning: symbol '__invalidate_mapping_pages' was not declared. Should it be static? Fixes: eb1d7a65f08a ("mm, fadvise: improve the expensive remote LRU cache draining after FADV_DONTNEED") Signed-off-by: Jason Yan Signed-off-by: Andrew Morton Reviewed-by: Yafang Shao Link: https://lkml.kernel.org/r/20201015054808.2445904-1-yanaijie@huawei.com Signed-off-by: Linus Torvalds commit aa4e460f0976351fddd2f5ac6e08b74320c277a1 Author: Vasily Gorbik Date: Sun Nov 1 17:07:47 2020 -0800 lib/crc32test: remove extra local_irq_disable/enable Commit 4d004099a668 ("lockdep: Fix lockdep recursion") uncovered the following issue in lib/crc32test reported on s390: BUG: using __this_cpu_read() in preemptible [00000000] code: swapper/0/1 caller is lockdep_hardirqs_on_prepare+0x48/0x270 CPU: 6 PID: 1 Comm: swapper/0 Not tainted 5.9.0-next-20201015-15164-g03d992bd2de6 #19 Hardware name: IBM 3906 M04 704 (LPAR) Call Trace: lockdep_hardirqs_on_prepare+0x48/0x270 trace_hardirqs_on+0x9c/0x1b8 crc32_test.isra.0+0x170/0x1c0 crc32test_init+0x1c/0x40 do_one_initcall+0x40/0x130 do_initcalls+0x126/0x150 kernel_init_freeable+0x1f6/0x230 kernel_init+0x22/0x150 ret_from_fork+0x24/0x2c no locks held by swapper/0/1. Remove extra local_irq_disable/local_irq_enable helpers calls. Fixes: 5fb7f87408f1 ("lib: add module support to crc32 tests") Signed-off-by: Vasily Gorbik Signed-off-by: Andrew Morton Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Greg Kroah-Hartman Link: https://lkml.kernel.org/r/patch.git-4369da00c06e.your-ad-here.call-01602859837-ext-1679@work.hours Signed-off-by: Linus Torvalds commit 7b3c36fc4c231ca532120bbc0df67a12f09c1d96 Author: Oleg Nesterov Date: Sun Nov 1 17:07:44 2020 -0800 ptrace: fix task_join_group_stop() for the case when current is traced This testcase #include #include #include #include #include #include #include void *tf(void *arg) { return NULL; } int main(void) { int pid = fork(); if (!pid) { kill(getpid(), SIGSTOP); pthread_t th; pthread_create(&th, NULL, tf, NULL); return 0; } waitpid(pid, NULL, WSTOPPED); ptrace(PTRACE_SEIZE, pid, 0, PTRACE_O_TRACECLONE); waitpid(pid, NULL, 0); ptrace(PTRACE_CONT, pid, 0,0); waitpid(pid, NULL, 0); int status; int thread = waitpid(-1, &status, 0); assert(thread > 0 && thread != pid); assert(status == 0x80137f); return 0; } fails and triggers WARN_ON_ONCE(!signr) in do_jobctl_trap(). This is because task_join_group_stop() has 2 problems when current is traced: 1. We can't rely on the "JOBCTL_STOP_PENDING" check, a stopped tracee can be woken up by debugger and it can clone another thread which should join the group-stop. We need to check group_stop_count || SIGNAL_STOP_STOPPED. 2. If SIGNAL_STOP_STOPPED is already set, we should not increment sig->group_stop_count and add JOBCTL_STOP_CONSUME. The new thread should stop without another do_notify_parent_cldstop() report. To clarify, the problem is very old and we should blame ptrace_init_task(). But now that we have task_join_group_stop() it makes more sense to fix this helper to avoid the code duplication. Reported-by: syzbot+3485e3773f7da290eecc@syzkaller.appspotmail.com Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Cc: Jens Axboe Cc: Christian Brauner Cc: "Eric W . Biederman" Cc: Zhiqiang Liu Cc: Tejun Heo Cc: Link: https://lkml.kernel.org/r/20201019134237.GA18810@redhat.com Signed-off-by: Linus Torvalds commit 3f08842098e842c51e3b97d0dcdebf810b32558e Author: Shijie Luo Date: Sun Nov 1 17:07:40 2020 -0800 mm: mempolicy: fix potential pte_unmap_unlock pte error When flags in queue_pages_pte_range don't have MPOL_MF_MOVE or MPOL_MF_MOVE_ALL bits, code breaks and passing origin pte - 1 to pte_unmap_unlock seems like not a good idea. queue_pages_pte_range can run in MPOL_MF_MOVE_ALL mode which doesn't migrate misplaced pages but returns with EIO when encountering such a page. Since commit a7f40cfe3b7a ("mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified") and early break on the first pte in the range results in pte_unmap_unlock on an underflow pte. This can lead to lockups later on when somebody tries to lock the pte resp. page_table_lock again.. Fixes: a7f40cfe3b7a ("mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified") Signed-off-by: Shijie Luo Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Miaohe Lin Cc: Feilong Lin Cc: Shijie Luo Cc: Link: https://lkml.kernel.org/r/20201019074853.50856-1-luoshijie1@huawei.com Signed-off-by: Linus Torvalds commit 58b999d7a22c59313e1e84832607c7a61640f4e7 Author: Andrey Konovalov Date: Sun Nov 1 17:07:37 2020 -0800 kasan: adopt KUNIT tests to SW_TAGS mode Now that we have KASAN-KUNIT tests integration, it's easy to see that some KASAN tests are not adopted to the SW_TAGS mode and are failing. Adjust the allocation size for kasan_memchr() and kasan_memcmp() by roung it up to OOB_TAG_OFF so the bad access ends up in a separate memory granule. Add a new kmalloc_uaf_16() tests that relies on UAF, and a new kasan_bitops_tags() test that is tailored to tag-based mode, as it's hard to adopt the existing kmalloc_oob_16() and kasan_bitops_generic() (renamed from kasan_bitops()) without losing the precision. Add new kmalloc_uaf_16() and kasan_bitops_uaf() tests that rely on UAFs, as it's hard to adopt the existing kmalloc_oob_16() and kasan_bitops_oob() (rename from kasan_bitops()) without losing the precision. Disable kasan_global_oob() and kasan_alloca_oob_left/right() as SW_TAGS mode doesn't instrument globals nor dynamic allocas. Signed-off-by: Andrey Konovalov Signed-off-by: Andrew Morton Tested-by: David Gow Link: https://lkml.kernel.org/r/76eee17b6531ca8b3ca92b240cb2fd23204aaff7.1603129942.git.andreyknvl@google.com Signed-off-by: Linus Torvalds commit 8de15e920dc85d1705ab9c202c95d56845bc2d48 Author: Roman Gushchin Date: Sun Nov 1 17:07:34 2020 -0800 mm: memcg: link page counters to root if use_hierarchy is false Richard reported a warning which can be reproduced by running the LTP madvise6 test (cgroup v1 in the non-hierarchical mode should be used): WARNING: CPU: 0 PID: 12 at mm/page_counter.c:57 page_counter_uncharge (mm/page_counter.c:57 mm/page_counter.c:50 mm/page_counter.c:156) Modules linked in: CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.9.0-rc7-22-default #77 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-48-gd9c812d-rebuilt.opensuse.org 04/01/2014 Workqueue: events drain_local_stock RIP: 0010:page_counter_uncharge (mm/page_counter.c:57 mm/page_counter.c:50 mm/page_counter.c:156) Call Trace: __memcg_kmem_uncharge (mm/memcontrol.c:3022) drain_obj_stock (./include/linux/rcupdate.h:689 mm/memcontrol.c:3114) drain_local_stock (mm/memcontrol.c:2255) process_one_work (./arch/x86/include/asm/jump_label.h:25 ./include/linux/jump_label.h:200 ./include/trace/events/workqueue.h:108 kernel/workqueue.c:2274) worker_thread (./include/linux/list.h:282 kernel/workqueue.c:2416) kthread (kernel/kthread.c:292) ret_from_fork (arch/x86/entry/entry_64.S:300) The problem occurs because in the non-hierarchical mode non-root page counters are not linked to root page counters, so the charge is not propagated to the root memory cgroup. After the removal of the original memory cgroup and reparenting of the object cgroup, the root cgroup might be uncharged by draining a objcg stock, for example. It leads to an eventual underflow of the charge and triggers a warning. Fix it by linking all page counters to corresponding root page counters in the non-hierarchical mode. Please note, that in the non-hierarchical mode all objcgs are always reparented to the root memory cgroup, even if the hierarchy has more than 1 level. This patch doesn't change it. The patch also doesn't affect how the hierarchical mode is working, which is the only sane and truly supported mode now. Thanks to Richard for reporting, debugging and providing an alternative version of the fix! Fixes: bf4f059954dc ("mm: memcg/slab: obj_cgroup API") Reported-by: Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Reviewed-by: Michal Koutný Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Link: https://lkml.kernel.org/r/20201026231326.3212225-1-guro@fb.com Debugged-by: Richard Palethorpe Signed-off-by: Linus Torvalds commit 7de2e9f195b9cb27583c5c64deaaf5e6afcc163e Author: zhongjiang-ali Date: Sun Nov 1 17:07:30 2020 -0800 mm: memcontrol: correct the NR_ANON_THPS counter of hierarchical memcg memcg_page_state will get the specified number in hierarchical memcg, It should multiply by HPAGE_PMD_NR rather than an page if the item is NR_ANON_THPS. [akpm@linux-foundation.org: fix printk warning] [akpm@linux-foundation.org: use u64 cast, per Michal] Fixes: 468c398233da ("mm: memcontrol: switch to native NR_ANON_THPS counter") Signed-off-by: zhongjiang-ali Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Acked-by: Michal Hocko Link: https://lkml.kernel.org/r/1603722395-72443-1-git-send-email-zhongjiang-ali@linux.alibaba.com Signed-off-by: Linus Torvalds commit 79aa925bf239c234be8586780e482872dc4690dd Author: Mike Kravetz Date: Sun Nov 1 17:07:27 2020 -0800 hugetlb_cgroup: fix reservation accounting Michal Privoznik was using "free page reporting" in QEMU/virtio-balloon with hugetlbfs and hit the warning below. QEMU with free page hinting uses fallocate(FALLOC_FL_PUNCH_HOLE) to discard pages that are reported as free by a VM. The reporting granularity is in pageblock granularity. So when the guest reports 2M chunks, we fallocate(FALLOC_FL_PUNCH_HOLE) one huge page in QEMU. WARNING: CPU: 7 PID: 6636 at mm/page_counter.c:57 page_counter_uncharge+0x4b/0x50 Modules linked in: ... CPU: 7 PID: 6636 Comm: qemu-system-x86 Not tainted 5.9.0 #137 Hardware name: Gigabyte Technology Co., Ltd. X570 AORUS PRO/X570 AORUS PRO, BIOS F21 07/31/2020 RIP: 0010:page_counter_uncharge+0x4b/0x50 ... Call Trace: hugetlb_cgroup_uncharge_file_region+0x4b/0x80 region_del+0x1d3/0x300 hugetlb_unreserve_pages+0x39/0xb0 remove_inode_hugepages+0x1a8/0x3d0 hugetlbfs_fallocate+0x3c4/0x5c0 vfs_fallocate+0x146/0x290 __x64_sys_fallocate+0x3e/0x70 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Investigation of the issue uncovered bugs in hugetlb cgroup reservation accounting. This patch addresses the found issues. Fixes: 075a61d07a8e ("hugetlb_cgroup: add accounting for shared mappings") Reported-by: Michal Privoznik Co-developed-by: David Hildenbrand Signed-off-by: David Hildenbrand Signed-off-by: Mike Kravetz Signed-off-by: Andrew Morton Tested-by: Michal Privoznik Reviewed-by: Mina Almasry Acked-by: Michael S. Tsirkin Cc: Cc: David Hildenbrand Cc: Michal Hocko Cc: Muchun Song Cc: "Aneesh Kumar K . V" Cc: Tejun Heo Link: https://lkml.kernel.org/r/20201021204426.36069-1-mike.kravetz@oracle.com Signed-off-by: Linus Torvalds commit 46b1ee38b2ba1a9524c8e886ad078bd3ca40de2a Author: Ralph Campbell Date: Sun Nov 1 17:07:23 2020 -0800 mm/mremap_pages: fix static key devmap_managed_key updates commit 6f42193fd86e ("memremap: don't use a separate devm action for devmap_managed_enable_get") changed the static key updates such that we now call devmap_managed_enable_put() without doing the equivalent devmap_managed_enable_get(). devmap_managed_enable_get() is only called for MEMORY_DEVICE_PRIVATE and MEMORY_DEVICE_FS_DAX, But memunmap_pages() get called for other pgmap types too. This results in the below warning when switching between system-ram and devdax mode for devdax namespace. jump label: negative count! WARNING: CPU: 52 PID: 1335 at kernel/jump_label.c:235 static_key_slow_try_dec+0x88/0xa0 Modules linked in: .... NIP static_key_slow_try_dec+0x88/0xa0 LR static_key_slow_try_dec+0x84/0xa0 Call Trace: static_key_slow_try_dec+0x84/0xa0 __static_key_slow_dec_cpuslocked+0x34/0xd0 static_key_slow_dec+0x54/0xf0 memunmap_pages+0x36c/0x500 devm_action_release+0x30/0x50 release_nodes+0x2f4/0x3e0 device_release_driver_internal+0x17c/0x280 bus_remove_device+0x124/0x210 device_del+0x1d4/0x530 unregister_dev_dax+0x48/0xe0 devm_action_release+0x30/0x50 release_nodes+0x2f4/0x3e0 device_release_driver_internal+0x17c/0x280 unbind_store+0x130/0x170 drv_attr_store+0x40/0x60 sysfs_kf_write+0x6c/0xb0 kernfs_fop_write+0x118/0x280 vfs_write+0xe8/0x2a0 ksys_write+0x84/0x140 system_call_exception+0x120/0x270 system_call_common+0xf0/0x27c Reported-by: Aneesh Kumar K.V Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Tested-by: Sachin Sant Reviewed-by: Aneesh Kumar K.V Reviewed-by: Ira Weiny Reviewed-by: Christoph Hellwig Cc: Dan Williams Cc: Jason Gunthorpe Link: https://lkml.kernel.org/r/20201023183222.13186-1-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit 3b57533b460c8dc22a432684b7e8d22571f34d2e Author: Vineet Gupta Date: Thu Oct 29 19:18:34 2020 -0700 ARC: [plat-hsdk] Remap CCMs super early in asm boot trampoline ARC HSDK platform stopped booting on released v5.10-rc1, getting stuck in startup of non master SMP cores. This was bisected to upstream commit 7fef431be9c9ac25 "(mm/page_alloc: place pages to tail in __free_pages_core())" That commit itself is harmless, it just exposed a subtle assumption in our platform code (hence CC'ing linux-mm just as FYI in case some other arches / platforms trip on it). The upstream commit is semantically disruptive as it reverses the order of page allocations (actually it can be good test for hardware verification to exercise different memory patterns altogether). For ARC HSDK platform that meant a remapped memory region (pertaining to unused Closely Coupled Memory) started getting used early for dynamice allocations, while not effectively remapped on all the cores, triggering memory error exception on those cores. The fix is to move the CCM remapping from early platform code to to early core boot code. And while it is undesirable to riddle common boot code with platform quirks, there is no other way to do this since the faltering code involves setting up stack itself so even function calls are not allowed at that point. If anyone is interested, all the gory details can be found at Link below. Link: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/32 Cc: David Hildenbrand Cc: linux-mm@kvack.org Signed-off-by: Vineet Gupta commit 328d2168ca524d501fc4b133d6be076142bd305c Author: Vineet Gupta Date: Tue Oct 27 15:01:17 2020 -0700 ARC: stack unwinding: avoid indefinite looping Currently stack unwinder is a while(1) loop which relies on the dwarf unwinder to signal termination, which in turn relies on dwarf info to do so. This in theory could cause an infinite loop if the dwarf info was somehow messed up or the register contents were etc. This fix thus detects the excessive looping and breaks the loop. | Mem: 26184K used, 1009136K free, 0K shrd, 0K buff, 14416K cached | CPU: 0.0% usr 72.8% sys 0.0% nic 27.1% idle 0.0% io 0.0% irq 0.0% sirq | Load average: 4.33 2.60 1.11 2/74 139 | PID PPID USER STAT VSZ %VSZ CPU %CPU COMMAND | 133 2 root SWN 0 0.0 3 22.9 [rcu_torture_rea] | 132 2 root SWN 0 0.0 0 22.0 [rcu_torture_rea] | 131 2 root SWN 0 0.0 3 21.5 [rcu_torture_rea] | 126 2 root RW 0 0.0 2 5.4 [rcu_torture_wri] | 129 2 root SWN 0 0.0 0 0.2 [rcu_torture_fak] | 137 2 root SW 0 0.0 0 0.2 [rcu_torture_cbf] | 127 2 root SWN 0 0.0 0 0.1 [rcu_torture_fak] | 138 115 root R 1464 0.1 2 0.1 top | 130 2 root SWN 0 0.0 0 0.1 [rcu_torture_fak] | 128 2 root SWN 0 0.0 0 0.1 [rcu_torture_fak] | 115 1 root S 1472 0.1 1 0.0 -/bin/sh | 104 1 root S 1464 0.1 0 0.0 inetd | 1 0 root S 1456 0.1 2 0.0 init | 78 1 root S 1456 0.1 0 0.0 syslogd -O /var/log/messages | 134 2 root SW 0 0.0 2 0.0 [rcu_torture_sta] | 10 2 root IW 0 0.0 1 0.0 [rcu_preempt] | 88 2 root IW 0 0.0 1 0.0 [kworker/1:1-eve] | 66 2 root IW 0 0.0 2 0.0 [kworker/2:2-eve] | 39 2 root IW 0 0.0 2 0.0 [kworker/2:1-eve] | unwinder looping too long, aborting ! Cc: Signed-off-by: Vineet Gupta commit 372a1786283e50e7cb437ab7fdb1b95597310ad7 Author: Maor Gottlieb Date: Wed Oct 28 08:50:51 2020 +0200 IB/srpt: Fix memory leak in srpt_add_one Failure in srpt_refresh_port() for the second port will leave MAD registered for the first one, however, the srpt_add_one() will be marked as "failed" and SRPT will leak resources for that registered but not used and released first port. Unregister the MAD agent for all ports in case of failure. Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1") Link: https://lore.kernel.org/r/20201028065051.112430-1-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Reviewed-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 42172f44df77f83777d1b5004db99c23bd2df7a4 Merge: 04a55c944f151 7834e494f4262 Author: Jakub Kicinski Date: Mon Nov 2 11:21:33 2020 -0800 Merge branch 'dpaa_eth-buffer-layout-fixes' Camelia Groza says: ==================== dpaa_eth: buffer layout fixes The patches are related to the software workaround for the A050385 erratum. The first patch ensures optimal buffer usage for non-erratum scenarios. The second patch fixes a currently inconsequential discrepancy between the FMan and Ethernet drivers. Changes in v3: - refactor defines for clarity in 1/2 - add more details on the user impact in 1/2 - remove unnecessary inline identifier in 2/2 Changes in v2: - make the returned value for TX ports explicit in 2/2 - simplify the buf_layout reference in 2/2 ==================== Link: https://lore.kernel.org/r/cover.1604339942.git.camelia.groza@nxp.com Signed-off-by: Jakub Kicinski commit 7834e494f42627769d3f965d5d203e9c6ddb8403 Author: Camelia Groza Date: Mon Nov 2 20:34:36 2020 +0200 dpaa_eth: fix the RX headroom size alignment The headroom reserved for received frames needs to be aligned to an RX specific value. There is currently a discrepancy between the values used in the Ethernet driver and the values passed to the FMan. Coincidentally, the resulting aligned values are identical. Fixes: 3c68b8fffb48 ("dpaa_eth: FMan erratum A050385 workaround") Acked-by: Willem de Bruijn Signed-off-by: Camelia Groza Signed-off-by: Jakub Kicinski commit acef159a0cb2a978d62b641e2366a33ad1d5afef Author: Camelia Groza Date: Mon Nov 2 20:34:35 2020 +0200 dpaa_eth: update the buffer layout for non-A050385 erratum scenarios Impose a larger RX private data area only when the A050385 erratum is present on the hardware. A smaller buffer size is sufficient in all other scenarios. This enables a wider range of linear Jumbo frame sizes in non-erratum scenarios, instead of turning to multi buffer Scatter/Gather frames. The maximum linear frame size is increased by 128 bytes for non-erratum arm64 platforms. Cleanup the hardware annotations header defines in the process. Fixes: 3c68b8fffb48 ("dpaa_eth: FMan erratum A050385 workaround") Signed-off-by: Camelia Groza Signed-off-by: Jakub Kicinski commit 683a9c7ed81769b6ecb6229afb00b6cda8e4bcfb Author: Parav Pandit Date: Fri Oct 30 11:38:03 2020 +0200 RDMA: Fix software RDMA drivers for dma mapping error The commit f959dcd6ddfd ("dma-direct: Fix potential NULL pointer dereference") made dma_mask as mandetory field to be setup even for dma_virt_ops based dma devices. The commit in the fixes tag omitted setting up the dma_mask on virtual devices triggering the below trace when they were combined during the merge window. Fix it by setting empty DMA MASK for software based RDMA devices. WARNING: CPU: 1 PID: 8488 at kernel/dma/mapping.c:149 dma_map_page_attrs+0x493/0x700 CPU: 1 PID: 8488 Comm: syz-executor144 Not tainted 5.9.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:dma_map_page_attrs+0x493/0x700 kernel/dma/mapping.c:149 Trace: dma_map_single_attrs include/linux/dma-mapping.h:279 [inline] ib_dma_map_single include/rdma/ib_verbs.h:3967 [inline] ib_mad_post_receive_mads+0x23f/0xd60 drivers/infiniband/core/mad.c:2715 ib_mad_port_start drivers/infiniband/core/mad.c:2862 [inline] ib_mad_port_open drivers/infiniband/core/mad.c:3016 [inline] ib_mad_init_device+0x72b/0x1400 drivers/infiniband/core/mad.c:3092 add_client_context+0x405/0x5e0 drivers/infiniband/core/device.c:680 enable_device_and_get+0x1d5/0x3c0 drivers/infiniband/core/device.c:1301 ib_register_device drivers/infiniband/core/device.c:1376 [inline] ib_register_device+0x7a7/0xa40 drivers/infiniband/core/device.c:1335 rxe_register_device+0x46d/0x570 drivers/infiniband/sw/rxe/rxe_verbs.c:1182 rxe_add+0x12fe/0x16d0 drivers/infiniband/sw/rxe/rxe.c:247 rxe_net_add+0x8c/0xe0 drivers/infiniband/sw/rxe/rxe_net.c:507 rxe_newlink drivers/infiniband/sw/rxe/rxe.c:269 [inline] rxe_newlink+0xb7/0xe0 drivers/infiniband/sw/rxe/rxe.c:250 nldev_newlink+0x30e/0x540 drivers/infiniband/core/nldev.c:1555 rdma_nl_rcv_msg+0x367/0x690 drivers/infiniband/core/netlink.c:195 rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline] rdma_nl_rcv+0x2f2/0x440 drivers/infiniband/core/netlink.c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x443699 Link: https://lore.kernel.org/r/20201030093803.278830-1-parav@nvidia.com Reported-by: syzbot+34dc2fea3478e659af01@syzkaller.appspotmail.com Fixes: e0477b34d9d1 ("RDMA: Explicitly pass in the dma_device to ib_register_device") Signed-off-by: Parav Pandit Tested-by: Guoqing Jiang Tested-by: Dennis Dalessandro Reviewed-by: Christoph Hellwig Acked-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit 04516706bb99889986ddfa3a769ed50d2dc7ac13 Author: Johannes Berg Date: Thu Oct 22 16:51:03 2020 +0300 iwlwifi: pcie: limit memory read spin time When we read device memory, we lock a spinlock, write the address we want to read from the device and then spin in a loop reading the data in 32-bit quantities from another register. As the description makes clear, this is rather inefficient, incurring a PCIe bus transaction for every read. In a typical device today, we want to read 786k SMEM if it crashes, leading to 192k register reads. Occasionally, we've seen the whole loop take over 20 seconds and then triggering the soft lockup detector. Clearly, it is unreasonable to spin here for such extended periods of time. To fix this, break the loop down into an outer and an inner loop, and break out of the inner loop if more than half a second elapsed. To avoid too much overhead, check for that only every 128 reads, though there's no particular reason for that number. Then, unlock and relock to obtain NIC access again, reprogram the start address and continue. This will keep (interrupt) latencies on the CPU down to a reasonable time. Signed-off-by: Johannes Berg Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201022165103.45878a7e49aa.I3b9b9c5a10002915072312ce75b68ed5b3dc6e14@changeid commit ddcd945e556e2cc6be8f88ef0271b56927ffbe98 Author: Tom Rix Date: Sun Oct 11 08:54:38 2020 -0700 rtw88: fix fw_fifo_addr check The clang build reports this warning fw.c:1485:21: warning: address of array 'rtwdev->chip->fw_fifo_addr' will always evaluate to 'true' if (!rtwdev->chip->fw_fifo_addr) { fw_fifo_addr is an array in rtw_chip_info so it is always nonzero. A better check is if the first element of the array is nonzero. In the cases where fw_fifo_addr is initialized by rtw88b and rtw88c, the first array element is 0x780. Fixes: 0fbc2f0f34cc ("rtw88: add dump firmware fifo support") Signed-off-by: Tom Rix Reviewed-by: Nathan Chancellor Acked-by: Tzu-En Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201011155438.15892-1-trix@redhat.com commit 38210800bf66d7302da1bb5b624ad68638da1562 Author: Keith Busch Date: Fri Oct 30 10:28:54 2020 -0700 Revert "nvme-pci: remove last_sq_tail" Multiple CPUs may be mapped to the same hctx, allowing mulitple submission contexts to attempt commit_rqs(). We need to verify we're not writing the same doorbell value multiple times since that's a spec violation. Revert commit 54b2fcee1db041a83b52b51752dade6090cf952f. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1878596 Reported-by: "B.L. Jones" Signed-off-by: Keith Busch commit 04a55c944f151b3149b78beff5ff406faa84485d Merge: 859191b234f86 c2f4681452111 Author: Jakub Kicinski Date: Mon Nov 2 09:43:54 2020 -0800 Merge tag 'mac80211-for-net-2020-10-30' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A couple of fixes, for * HE on 2.4 GHz * a few issues syzbot found, but we have many more reports :-( * a regression in nl80211-transported EAPOL frames which had affected a number of users, from Mathy * kernel-doc markings in mac80211, from Mauro * a format argument in reg.c, from Ye Bin ==================== Signed-off-by: Jakub Kicinski commit f126b6702e7354d6247a36f20b9172457af5c15a Author: Dinh Nguyen Date: Sun Nov 1 14:02:56 2020 -0600 arm64: dts: agilex/stratix10: Fix qspi node compatible The QSPI flash node needs to have the required "jedec,spi-nor" in the compatible string. Fixes: 0cb140d07fc7 ("arm64: dts: stratix10: Add QSPI support for Stratix10") Cc: stable@vger.kernel.org Suggested-by: Vignesh Raghavendra Signed-off-by: Dinh Nguyen commit 495023e4e49e4b7dee35928800bf0317276576c1 Author: Geert Uytterhoeven Date: Mon Nov 2 11:54:22 2020 +0100 of: Drop superfluous ULL suffix for ~0 There is no need to specify a "ULL" suffix for "all bits set": "~0" is sufficient, and works regardless of type. In fact adding the suffix makes the code more fragile. Fixes: 48ab6d5d1f09 ("dma-mapping: fix 32-bit overflow with CONFIG_ARM_LPAE=n") Suggested-by: Linus Torvalds Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds commit 9226c504e364158a17a68ff1fe9d67d266922f50 Author: Rafael J. Wysocki Date: Thu Oct 22 17:38:22 2020 +0200 PM: runtime: Resume the device earlier in __device_release_driver() Since the device is resumed from runtime-suspend in __device_release_driver() anyway, it is better to do that before looking for busy managed device links from it to consumers, because if there are any, device_links_unbind_consumers() will be called and it will cause the consumer devices' drivers to unbind, so the consumer devices will be runtime-resumed. In turn, resuming each consumer device will cause the supplier to be resumed and when the runtime PM references from the given consumer to it are dropped, it may be suspended. Then, the runtime-resume of the next consumer will cause the supplier to resume again and so on. Update the code accordingly. Signed-off-by: Rafael J. Wysocki Fixes: 9ed9895370ae ("driver core: Functional dependencies tracking support") Cc: All applicable # All applicable Tested-by: Xiang Chen Reviewed-by: Greg Kroah-Hartman commit d6e36668598154820177bfd78c1621d8e6c580a2 Author: Rafael J. Wysocki Date: Wed Oct 21 21:13:10 2020 +0200 PM: runtime: Drop pm_runtime_clean_up_links() After commit d12544fb2aa9 ("PM: runtime: Remove link state checks in rpm_get/put_supplier()") nothing prevents the consumer device's runtime PM from acquiring additional references to the supplier device after pm_runtime_clean_up_links() has run (or even while it is running), so calling this function from __device_release_driver() may be pointless (or even harmful). Moreover, it ignores stateless device links, so the runtime PM handling of managed and stateless device links is inconsistent because of it, so better get rid of it entirely. Fixes: d12544fb2aa9 ("PM: runtime: Remove link state checks in rpm_get/put_supplier()") Signed-off-by: Rafael J. Wysocki Cc: 5.1+ # 5.1+ Tested-by: Xiang Chen Reviewed-by: Greg Kroah-Hartman commit e0e398e204634db8fb71bd89cf2f6e3e5bd09b51 Author: Rafael J. Wysocki Date: Wed Oct 21 21:12:15 2020 +0200 PM: runtime: Drop runtime PM references to supplier on link removal While removing a device link, drop the supplier device's runtime PM usage counter as many times as needed to drop all of the runtime PM references to it from the consumer in addition to dropping the consumer's link count. Fixes: baa8809f6097 ("PM / runtime: Optimize the use of device links") Signed-off-by: Rafael J. Wysocki Cc: 5.1+ # 5.1+ Tested-by: Xiang Chen Reviewed-by: Greg Kroah-Hartman commit 8a82d91fa275aaea49be06d7f5b1407ce1c0dd4b Author: Pablo Greco Date: Mon Nov 2 11:19:29 2020 -0300 ARM: dts: sun8i: v40: bananapi-m2-berry: Fix ethernet node Ethernet PHY on BananaPi M2 Berry provides RX and TX delays. Fix ethernet node to reflect that fact. Fixes: 27e81e1970a8 ("ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet controller") Signed-off-by: Pablo Greco Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/1604326769-39802-1-git-send-email-pgreco@centosproject.org commit bd5cdcdc66e1f7179ff6d172d1e5f55e43403aa8 Author: Pablo Greco Date: Mon Nov 2 11:19:14 2020 -0300 ARM: dts: sun8i: r40: bananapi-m2-berry: Fix dcdc1 regulator DCDC1 regulator powers many different subsystems. While some of them can work at 3.0 V, some of them can not. For example, VCC-HDMI can only work between 3.24 V and 3.36 V. According to OS images provided by the board manufacturer this regulator should be set to 3.3 V. Set DCDC1 and DCDC1SW to 3.3 V in order to fix this. Fixes: 23edc168bd98 ("ARM: dts: sun8i: Add board dts file for Banana Pi M2 Berry") Fixes: 27e81e1970a8 ("ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet controller") Signed-off-by: Pablo Greco Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/1604326755-39742-1-git-send-email-pgreco@centosproject.org commit 8c9cb4094ccf242eddd140efba13872c55f68a87 Author: Pablo Greco Date: Mon Nov 2 11:16:40 2020 -0300 ARM: dts: sun7i: bananapi: Enable RGMII RX/TX delay on Ethernet PHY The Ethernet PHY on the Bananapi M1 has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins. Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"). Fixes: 8a5b272fbf44 ("ARM: dts: sun7i: Add Banana Pi board") Signed-off-by: Pablo Greco Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/1604326600-39544-1-git-send-email-pgreco@centosproject.org commit a8193af7ec0db73c0c86d02a5d5ffc1dc2ab4e88 Author: Tom Rix Date: Sun Nov 1 06:11:29 2020 -0800 powercap/intel_rapl: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Signed-off-by: Rafael J. Wysocki commit 23d18dcfc5275fbd53a515a4a1cf946b22fe7463 Author: Julia Lawall Date: Sat Oct 31 10:39:39 2020 +0100 Documentation: PM: cpuidle: correct path name cpu/ is needed before cpu/ Signed-off-by: Julia Lawall Signed-off-by: Rafael J. Wysocki commit 6841ca15fe13038b9d27f8e7168700e1427b7a72 Author: Julia Lawall Date: Sat Oct 31 10:39:28 2020 +0100 Documentation: PM: cpuidle: correct typo cerainly -> certainly Signed-off-by: Julia Lawall Signed-off-by: Rafael J. Wysocki commit 23a881852f3eff6a7ba8d240b57de076763fdef9 Author: Viresh Kumar Date: Fri Oct 30 12:51:08 2020 +0530 cpufreq: schedutil: Don't skip freq update if need_freq_update is set The cpufreq policy's frequency limits (min/max) can get changed at any point of time, while schedutil is trying to update the next frequency. Though the schedutil governor has necessary locking and support in place to make sure we don't miss any of those updates, there is a corner case where the governor will find that the CPU is already running at the desired frequency and so may skip an update. For example, consider that the CPU can run at 1 GHz, 1.2 GHz and 1.4 GHz and is running at 1 GHz currently. Schedutil tries to update the frequency to 1.2 GHz, during this time the policy limits get changed as policy->min = 1.4 GHz. As schedutil (and cpufreq core) does clamp the frequency at various instances, we will eventually set the frequency to 1.4 GHz, while we will save 1.2 GHz in sg_policy->next_freq. Now lets say the policy limits get changed back at this time with policy->min as 1 GHz. The next time schedutil is invoked by the scheduler, we will reevaluate the next frequency (because need_freq_update will get set due to limits change event) and lets say we want to set the frequency to 1.2 GHz again. At this point sugov_update_next_freq() will find the next_freq == current_freq and will abort the update, while the CPU actually runs at 1.4 GHz. Until now need_freq_update was used as a flag to indicate that the policy's frequency limits have changed, and that we should consider the new limits while reevaluating the next frequency. This patch fixes the above mentioned issue by extending the purpose of the need_freq_update flag. If this flag is set now, the schedutil governor will not try to abort a frequency change even if next_freq == current_freq. As similar behavior is required in the case of CPUFREQ_NEED_UPDATE_LIMITS flag as well, need_freq_update will never be set to false if that flag is set for the driver. We also don't need to consider the need_freq_update flag in sugov_update_single() anymore to handle the special case of busy CPU, as we won't abort a frequency update anymore. Reported-by: zhuguangqing Suggested-by: Rafael J. Wysocki Signed-off-by: Viresh Kumar [ rjw: Rearrange code to avoid a branch ] Signed-off-by: Rafael J. Wysocki commit 906695e59324635c62b5ae59df111151a546ca66 Author: Qiujun Huang Date: Sat Oct 31 16:57:14 2020 +0800 tracing: Fix the checking of stackidx in __ftrace_trace_stack The array size is FTRACE_KSTACK_NESTING, so the index FTRACE_KSTACK_NESTING is illegal too. And fix two typos by the way. Link: https://lkml.kernel.org/r/20201031085714.2147-1-hqjagain@gmail.com Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit 3fc2bfa365311c6ef3e4411437786a54a911d9a9 Author: Helge Deller Date: Fri Oct 16 12:13:00 2020 +0200 nfsroot: Default mount option should ask for built-in NFS version Change the nfsroot default mount option to ask for NFSv2 only *if* the kernel was built with NFSv2 support. If not, default to NFSv3 or as last choice to NFSv4, depending on actual kernel config. Signed-off-by: Helge Deller Signed-off-by: Anna Schumaker commit fc0021aa340af65a0a37d77be39e22aa886a6132 Author: Christoph Hellwig Date: Fri Oct 23 08:33:09 2020 +0200 swiotlb: remove the tbl_dma_addr argument to swiotlb_tbl_map_single The tbl_dma_addr argument is used to check the DMA boundary for the allocations, and thus needs to be a dma_addr_t. swiotlb-xen instead passed a physical address, which could lead to incorrect results for strange offsets. Fix this by removing the parameter entirely and hard code the DMA address for io_tlb_start instead. Fixes: 91ffe4ad534a ("swiotlb-xen: introduce phys_to_dma/dma_to_phys translations") Signed-off-by: Christoph Hellwig Reviewed-by: Stefano Stabellini Signed-off-by: Konrad Rzeszutek Wilk commit e9696d259d0fb5d239e8c28ca41089838ea76d13 Author: Stefano Stabellini Date: Mon Oct 26 17:02:14 2020 -0700 swiotlb: fix "x86: Don't panic if can not alloc buffer for swiotlb" kernel/dma/swiotlb.c:swiotlb_init gets called first and tries to allocate a buffer for the swiotlb. It does so by calling memblock_alloc_low(PAGE_ALIGN(bytes), PAGE_SIZE); If the allocation must fail, no_iotlb_memory is set. Later during initialization swiotlb-xen comes in (drivers/xen/swiotlb-xen.c:xen_swiotlb_init) and given that io_tlb_start is != 0, it thinks the memory is ready to use when actually it is not. When the swiotlb is actually needed, swiotlb_tbl_map_single gets called and since no_iotlb_memory is set the kernel panics. Instead, if swiotlb-xen.c:xen_swiotlb_init knew the swiotlb hadn't been initialized, it would do the initialization itself, which might still succeed. Fix the panic by setting io_tlb_start to 0 on swiotlb initialization failure, and also by setting no_iotlb_memory to false on swiotlb initialization success. Fixes: ac2cbab21f31 ("x86: Don't panic if can not alloc buffer for swiotlb") Reported-by: Elliott Mitchell Tested-by: Elliott Mitchell Signed-off-by: Stefano Stabellini Reviewed-by: Christoph Hellwig Cc: stable@vger.kernel.org Signed-off-by: Konrad Rzeszutek Wilk commit 726b3d3f141fba6f841d715fc4d8a4a84f02c02a Author: Steven Rostedt (VMware) Date: Thu Oct 29 19:35:08 2020 -0400 ftrace: Handle tracing when switching between context When an interrupt or NMI comes in and switches the context, there's a delay from when the preempt_count() shows the update. As the preempt_count() is used to detect recursion having each context have its own bit get set when tracing starts, and if that bit is already set, it is considered a recursion and the function exits. But if this happens in that section where context has changed but preempt_count() has not been updated, this will be incorrectly flagged as a recursion. To handle this case, create another bit call TRANSITION and test it if the current context bit is already set. Flag the call as a recursion if the TRANSITION bit is already set, and if not, set it and continue. The TRANSITION bit will be cleared normally on the return of the function that set it, or if the current context bit is clear, set it and clear the TRANSITION bit to allow for another transition between the current context and an even higher one. Cc: stable@vger.kernel.org Fixes: edc15cafcbfa3 ("tracing: Avoid unnecessary multiple recursion checks") Signed-off-by: Steven Rostedt (VMware) commit ee11b93f95eabdf8198edd4668bf9102e7248270 Author: Steven Rostedt (VMware) Date: Thu Oct 29 17:31:45 2020 -0400 ftrace: Fix recursion check for NMI test The code that checks recursion will work to only do the recursion check once if there's nested checks. The top one will do the check, the other nested checks will see recursion was already checked and return zero for its "bit". On the return side, nothing will be done if the "bit" is zero. The problem is that zero is returned for the "good" bit when in NMI context. This will set the bit for NMIs making it look like *all* NMI tracing is recursing, and prevent tracing of anything in NMI context! The simple fix is to return "bit + 1" and subtract that bit on the end to get the real bit. Cc: stable@vger.kernel.org Fixes: edc15cafcbfa3 ("tracing: Avoid unnecessary multiple recursion checks") Signed-off-by: Steven Rostedt (VMware) commit c1acb4ac1a892cf08d27efcb964ad281728b0545 Author: Qiujun Huang Date: Fri Oct 30 00:19:05 2020 +0800 tracing: Fix out of bounds write in get_trace_buf The nesting count of trace_printk allows for 4 levels of nesting. The nesting counter starts at zero and is incremented before being used to retrieve the current context's buffer. But the index to the buffer uses the nesting counter after it was incremented, and not its original number, which in needs to do. Link: https://lkml.kernel.org/r/20201029161905.4269-1-hqjagain@gmail.com Cc: stable@vger.kernel.org Fixes: 3d9622c12c887 ("tracing: Add barrier to trace_printk() buffer nesting modification") Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit 9d4fdda3344611ec53ededccc0c13cb149ba4375 Author: Mauro Carvalho Chehab Date: Mon Nov 2 11:32:16 2020 +0100 scripts: get_api.pl: Add sub-titles to ABI output Instead of adding titles just for the files, add titles for each part of the ABI output, in order to make easier to search for a symbol there. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/64752a5de06ab8263c296e3ed01414b25861e1eb.1604312590.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit daaaf58a2b7fd59951bd090eddee131f26422e20 Author: Mauro Carvalho Chehab Date: Mon Nov 2 11:32:15 2020 +0100 scripts: get_abi.pl: Don't let ABI files to create subtitles The ReST output should only contain documentation titles automatically created by the script. There are two reasons for that: 1) Consistency. just a handful ABI docs define titles 2) To avoid critical errors. Docutils (which is the basis for Sphinx) allows a free assign of documentation title markups. So, one document could be doing things like: Level 1 ======= Level 2 ------- While another one could do the reverse: Level 1 ------- Level 2 ======= But the same document can't mix. As the output of get_abi.pl will join contents from multiple files, if they don't define the levels on a consistent errors, errors like this can happen: Sphinx parallel build error: docutils.utils.SystemMessage: /home/rdunlap/lnx/lnx-510-rc2/Documentation/ABI/testing/sysfs-bus-rapidio:2: (SEVERE/4) Title level inconsistent: Attributes Common for All RapidIO Devices ----------------------------------------- Which cause some versions of Sphinx to go into an endless loop. It should be noticed that an alternative to that would be to replace all title occurrences by a single markup, but that will make the parser more complex, and, due to (1) it would generate an inconsistent output. So, better to just remove the titles defined at the ABI files from the output. Reported-by: Randy Dunlap Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6c62ef5c01d39dee8d891f8390c816d2a889670a.1604312590.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit e186d80e2b85ab3e69de941d069ab9e11018ddf4 Author: Mauro Carvalho Chehab Date: Mon Nov 2 11:32:14 2020 +0100 docs: leds: index.rst: add a missing file Changeset 26a07553041e ("docs: ABI: sysfs-class-led-trigger-pattern: remove hw_pattern duplication") didn't include the needed changes at index.rst. Fixes: 26a07553041e ("docs: ABI: sysfs-class-led-trigger-pattern: remove hw_pattern duplication") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/36a6e3aef6e57ea349f1b47c7731d4cd1e03ca77.1604312590.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1088ee2230ac5e1c889d5ba020f37c09000ee3af Author: Mauro Carvalho Chehab Date: Mon Nov 2 11:32:13 2020 +0100 docs: ABI: sysfs-class-net: fix a typo clas->class Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4bba2a1592df5a9435c8d4757a9abf20246e2a99.1604312590.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 92ca318e11d76562bb9448295a4fd96b6580954f Author: Mauro Carvalho Chehab Date: Mon Nov 2 11:32:12 2020 +0100 docs: ABI: sysfs-driver-dma-ioatdma: what starts with /sys This is the only file where the /sys doesn't start with a /. So, rename them to: sys -> /sys Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/f4c53fff9696a61ff0e144fee237a9527982626d.1604312590.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 58d51f330e76cd7536d1f7e6ef46dd241a7b38ef Merge: 3cea11cd5e3b0 129aa9734559a Author: Greg Kroah-Hartman Date: Mon Nov 2 13:36:11 2020 +0100 Merge tag 'fixes-for-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: USB: fixes for v5.10-rc2 Nothing major as of yet, we're adding support for Intel Alder Lake-S in dwc3, together with a few fixes that are quite important (memory leak in raw-gadget, probe crashes in goku_udc, and so on). Signed-off-by: Felipe Balbi * tag 'fixes-for-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: usb: raw-gadget: fix memory leak in gadget_setup usb: dwc2: Avoid leaving the error_debugfs label unused usb: dwc3: ep0: Fix delay status handling usb: gadget: fsl: fix null pointer checking usb: gadget: goku_udc: fix potential crashes in probe usb: dwc3: pci: add support for the Intel Alder Lake-S commit dcda7c28bff2662a44c0adaf87c08031bebeb7d8 Author: Maxime Ripard Date: Thu Oct 29 20:01:04 2020 +0100 drm/vc4: kms: Add functions to create the state objects In order to make the vc4_kms_load code and error path a bit easier to read and extend, add functions to create state objects, and use managed actions to cleanup if needed. Signed-off-by: Maxime Ripard Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201029190104.2181730-6-maxime@cerno.tech commit 84d7d4720c21320c0e4f9369d6a82fc112b63d8c Author: Maxime Ripard Date: Thu Oct 29 20:01:03 2020 +0100 drm/vc4: Use devm_drm_dev_alloc We can simplify a bit the bind code, its error path and unbind by using the managed devm_drm_dev_alloc function. Acked-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201029190104.2181730-5-maxime@cerno.tech commit 88e085896aa67ac250943b117a9016801011c624 Author: Maxime Ripard Date: Thu Oct 29 20:01:02 2020 +0100 drm/vc4: Use the helper to retrieve vc4_dev when needed We have a helper to retrieve the vc4_dev structure from the drm_device one when needed, so let's use it consistently. Acked-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201029190104.2181730-4-maxime@cerno.tech commit 171a072b4699b4bf79cd1bbbcd05a53d40903034 Author: Maxime Ripard Date: Thu Oct 29 20:01:01 2020 +0100 drm/vc4: gem: Add a managed action to cleanup the job queue The job queue needs to be cleaned up using vc4_gem_destroy, but it's not used consistently (vc4_drv's bind calls it in its error path, but doesn't in unbind), and we can make that automatic through a managed action. Let's remove the requirement to call vc4_gem_destroy. Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.") Acked-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201029190104.2181730-3-maxime@cerno.tech commit e46e5330d13de67de5b614c5021730e9709de975 Author: Maxime Ripard Date: Thu Oct 29 20:01:00 2020 +0100 drm/vc4: drv: Use managed drm_mode_config_init Using drmm_mode_config_init instead of drm_mode_config_init allows us to cleanup a bit the error path. Signed-off-by: Maxime Ripard Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201029190104.2181730-2-maxime@cerno.tech commit 1c80be48c70a2198f7cf04a546b3805b92293ac6 Author: Maxime Ripard Date: Thu Oct 29 20:00:59 2020 +0100 drm/vc4: bo: Add a managed action to cleanup the cache The BO cache needs to be cleaned up using vc4_bo_cache_destroy, but it's not used consistently (vc4_drv's bind calls it in its error path, but doesn't in unbind), and we can make that automatic through a managed action. Let's remove the requirement to call vc4_bo_cache_destroy. Fixes: c826a6e10644 ("drm/vc4: Add a BO cache.") Acked-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201029190104.2181730-1-maxime@cerno.tech commit f51778db088b2407ec177f2f4da0f6290602aa3f Author: Stephen Rothwell Date: Mon Nov 2 12:43:27 2020 +1100 swiotlb: using SIZE_MAX needs limits.h included After merging the drm-misc tree, linux-next build (arm multi_v7_defconfig) failed like this: In file included from drivers/gpu/drm/nouveau/nouveau_ttm.c:26: include/linux/swiotlb.h: In function 'swiotlb_max_mapping_size': include/linux/swiotlb.h:99:9: error: 'SIZE_MAX' undeclared (first use in this function) 99 | return SIZE_MAX; | ^~~~~~~~ include/linux/swiotlb.h:7:1: note: 'SIZE_MAX' is defined in header ''; did you forget to '#include '? 6 | #include +++ |+#include 7 | #include include/linux/swiotlb.h:99:9: note: each undeclared identifier is reported only once for each function it appears in 99 | return SIZE_MAX; | ^~~~~~~~ Caused by commit abe420bfae52 ("swiotlb: Introduce swiotlb_max_mapping_size()") but only exposed by commit "drm/nouveu: fix swiotlb include" Fix it by including linux/limits.h as appropriate. Fixes: abe420bfae52 ("swiotlb: Introduce swiotlb_max_mapping_size()") Signed-off-by: Stephen Rothwell Link: https://lore.kernel.org/r/20201102124327.2f82b2a7@canb.auug.org.au Signed-off-by: Michael S. Tsirkin commit 6ab48105aae79b9d8062e9bc922baaeff80918d7 Author: Matteo Scordino Date: Fri Oct 30 23:43:25 2020 +0000 ARM: dts: s3: pinecube: align compatible property to other S3 boards The compatible string in the Pine64 Pinecube dts diverges from the ones used in other S3 based boards, like the LicheePi and the Elimo Impetus and Initium. Discussion on LKML decided the PineCube should align to the others. Signed-off-by: Matteo Scordino Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201030234325.5865-7-matteo.scordino@gmail.com commit ad2091f893bd5dfe2824f0d6819600d120698e9f Author: Paul Kocialkowski Date: Sat Oct 31 19:21:29 2020 +0100 ARM: sunxi: Add machine match for the Allwinner V3 SoC The Allwinner V3 SoC shares the same base as the V3s but comes with extra pins and features available. As a result, it has its dedicated compatible string (already used in device trees), which is added here. Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201031182137.1879521-2-contact@paulk.fr commit 544cc3f8573bf9a82e8f348741f2f68d2a8376fb Author: Jernej Skrabec Date: Sun Nov 1 08:26:09 2020 +0100 arm64: dts: allwinner: h6: orangepi-one-plus: Fix ethernet RX/TX delay on OrangePi One Plus board is set on PHY. Reflect that in ethernet node. Fixes: 7ee32a17e0d6 ("arm64: dts: allwinner: h6: orangepi-one-plus: Enable ethernet") Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Tested-by: Marcus Cooper Link: https://lore.kernel.org/r/20201101072609.1681891-1-jernej.skrabec@siol.net commit d1889589a4f54b2d1d7075d608b596d6fcfd3d96 Author: Sven Joachim Date: Mon Oct 26 20:32:16 2020 +0100 builddeb: Fix rootless build in setuid/setgid directory Building 5.10-rc1 in a setgid directory failed with the following error: dpkg-deb: error: control directory has bad permissions 2755 (must be >=0755 and <=0775) When building with fakeroot, the earlier chown call would have removed the setgid bits, but in a rootless build they remain. Fixes: 3e8541803624 ("builddeb: Enable rootless builds") Cc: Guillem Jover Signed-off-by: Sven Joachim Signed-off-by: Masahiro Yamada commit d9b5665fb3c822730857ba9119ead8b5e5ff967d Author: Vasily Gorbik Date: Fri Oct 23 13:57:32 2020 +0200 kbuild: remove unused OBJSIZE The "size" tool has been solely used by s390 to enforce .bss section usage restrictions in early startup code. Since commit 980d5f9ab36b ("s390/boot: enable .bss section for compressed kernel") and commit 2e83e0eb85ca ("s390: clean .bss before running uncompressed kernel") these restrictions have been lifted for the decompressor and uncompressed kernel and the size tool is now unused. Signed-off-by: Vasily Gorbik Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit 99f070b62322a4b8c1252952735806d09eb44b68 Author: Qian Cai Date: Wed Oct 28 14:23:34 2020 -0400 powerpc/smp: Call rcu_cpu_starting() earlier The call to rcu_cpu_starting() in start_secondary() is not early enough in the CPU-hotplug onlining process, which results in lockdep splats as follows (with CONFIG_PROVE_RCU_LIST=y): WARNING: suspicious RCU usage ----------------------------- kernel/locking/lockdep.c:3497 RCU-list traversed in non-reader section!! other info that might help us debug this: RCU used illegally from offline CPU! rcu_scheduler_active = 1, debug_locks = 1 no locks held by swapper/1/0. Call Trace: dump_stack+0xec/0x144 (unreliable) lockdep_rcu_suspicious+0x128/0x14c __lock_acquire+0x1060/0x1c60 lock_acquire+0x140/0x5f0 _raw_spin_lock_irqsave+0x64/0xb0 clockevents_register_device+0x74/0x270 register_decrementer_clockevent+0x94/0x110 start_secondary+0x134/0x800 start_secondary_prolog+0x10/0x14 This is avoided by adding a call to rcu_cpu_starting() near the beginning of the start_secondary() function. Note that the raw_smp_processor_id() is required in order to avoid calling into lockdep before RCU has declared the CPU to be watched for readers. It's safe to call rcu_cpu_starting() in the arch code as well as later in generic code, as explained by Paul: It uses a per-CPU variable so that RCU pays attention only to the first call to rcu_cpu_starting() if there is more than one of them. This is even intentional, due to there being a generic arch-independent call to rcu_cpu_starting() in notify_cpu_starting(). So multiple calls to rcu_cpu_starting() are fine by design. Fixes: 4d004099a668 ("lockdep: Fix lockdep recursion") Signed-off-by: Qian Cai Acked-by: Paul E. McKenney [mpe: Add Fixes tag, reword slightly & expand change log] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201028182334.13466-1-cai@redhat.com commit fd552e0542b4532483289cce48fdbd27b692984b Author: Qian Cai Date: Wed Oct 28 11:27:17 2020 -0400 powerpc/eeh_cache: Fix a possible debugfs deadlock Lockdep complains that a possible deadlock below in eeh_addr_cache_show() because it is acquiring a lock with IRQ enabled, but eeh_addr_cache_insert_dev() needs to acquire the same lock with IRQ disabled. Let's just make eeh_addr_cache_show() acquire the lock with IRQ disabled as well. CPU0 CPU1 ---- ---- lock(&pci_io_addr_cache_root.piar_lock); local_irq_disable(); lock(&tp->lock); lock(&pci_io_addr_cache_root.piar_lock); lock(&tp->lock); *** DEADLOCK *** lock_acquire+0x140/0x5f0 _raw_spin_lock_irqsave+0x64/0xb0 eeh_addr_cache_insert_dev+0x48/0x390 eeh_probe_device+0xb8/0x1a0 pnv_pcibios_bus_add_device+0x3c/0x80 pcibios_bus_add_device+0x118/0x290 pci_bus_add_device+0x28/0xe0 pci_bus_add_devices+0x54/0xb0 pcibios_init+0xc4/0x124 do_one_initcall+0xac/0x528 kernel_init_freeable+0x35c/0x3fc kernel_init+0x24/0x148 ret_from_kernel_thread+0x5c/0x80 lock_acquire+0x140/0x5f0 _raw_spin_lock+0x4c/0x70 eeh_addr_cache_show+0x38/0x110 seq_read+0x1a0/0x660 vfs_read+0xc8/0x1f0 ksys_read+0x74/0x130 system_call_exception+0xf8/0x1d0 system_call_common+0xe8/0x218 Fixes: 5ca85ae6318d ("powerpc/eeh_cache: Add a way to dump the EEH address cache") Signed-off-by: Qian Cai Reviewed-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201028152717.8967-1-cai@redhat.com commit e402599e5e5e0b2758d7766fd9f6d7953d4ccd85 Author: Oleksij Rempel Date: Mon Oct 12 09:18:16 2020 +0200 ARM: dts: imx6q-prti6q: fix PHY address Due to bug in the bootloader, the PHY has floating address and may randomly change on each PHY reset. To avoid it, the updated bootloader with the following patch[0] should be used: | ARM: protonic: disable on-die termination to fix PHY bootstrapping | | If on-die termination is enabled, the RXC pin of iMX6 will be pulled | high. Since we already have an 10K pull-down on board, the RXC level on | PHY reset will be ~800mV, which is mostly interpreted as 1. On some | reboots we get 0 instead and kernel can't detect the PHY properly. | | Since the default 0x020e07ac value is 0, it is sufficient to remove this | entry from the affected imxcfg files. | | Since we get stable 0 on pin PHYADDR[2], the PHY address is changed from | 4 to 0. With latest bootloader update, the PHY address will be fixed to "0". [0] https://git.pengutronix.de/cgit/barebox/commit/?id=93f7dcf631edfcda19e7757b28d66017ea274b81 Fixes: 0d446a505592 ("ARM: dts: add Protonic PRTI6Q board") Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit f8b5a33707c9a19ec905d2826be0acd151997a09 Author: Andrew Lunn Date: Fri Oct 30 01:55:28 2020 +0100 ARM: dts: vf610-zii-dev-rev-b: Fix MDIO over clocking The ZII devel B board has two generations of Marvell Switches. The mv88e6352 supports an MDIO clock of 12MHz. However the older 88e6185 does not like 12MHz, and often fails to probe. Reduce the clock speed to 5MHz, which seems to work reliably. Cc: Chris Healy Fixes: b955387667ec ("ARM: dts: ZII: update MDIO speed and preamble") Signed-off-by: Andrew Lunn Reviewed-by: Chris Healy Signed-off-by: Shawn Guo commit 7dd8f0ba88fce98e2953267a66af74c6f4792a56 Author: Sergey Matyukevich Date: Sat Oct 24 23:11:20 2020 +0300 arm: dts: imx6qdl-udoo: fix rgmii phy-mode for ksz9031 phy Commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") fixed micrel phy driver adding proper support for phy modes. Adapt imx6q-udoo board phy settings : explicitly set required delay configuration using "rgmii-id". Fixes: cbd54fe0b2bc ("ARM: dts: imx6dl-udoo: Add board support based off imx6q-udoo") Signed-off-by: Sergey Matyukevich Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 3cea11cd5e3b00d91caf0b4730194039b45c5891 Author: Linus Torvalds Date: Sun Nov 1 14:43:51 2020 -0800 Linux 5.10-rc2 commit fe0b980ffd1dd8b10c09f82385514819ba2a661d Author: Lorenzo Bianconi Date: Sun Nov 1 17:21:18 2020 +0100 iio: imu: st_lsm6dsx: set 10ms as min shub slave timeout Set 10ms as minimum i2c slave configuration timeout since st_lsm6dsx relies on accel ODR for i2c master clock and at high sample rates (e.g. 833Hz or 416Hz) the slave sensor occasionally may need more cycles than i2c master timeout (2s/833Hz + 1 ~ 3ms) to apply the configuration resulting in an uncomplete slave configuration and a constant reading from the i2c slave connected to st_lsm6dsx i2c master. Fixes: 8f9a5249e3d9 ("iio: imu: st_lsm6dsx: enable 833Hz sample frequency for tagged sensors") Fixes: c91c1c844ebd ("iio: imu: st_lsm6dsx: add i2c embedded controller support") Signed-off-by: Lorenzo Bianconi Cc: Link: https://lore.kernel.org/r/a69c8236bf16a1569966815ed71710af2722ed7d.1604247274.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit 7b56fbd83e261484da43f04090bce07570bd117f Merge: 4312e0e8d3eab cb05143bdf428 Author: Linus Torvalds Date: Sun Nov 1 11:21:26 2020 -0800 Merge tag 'x86-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "Three fixes all related to #DB: - Handle the BTF bit correctly so it doesn't get lost due to a kernel #DB - Only clear and set the virtual DR6 value used by ptrace on user space triggered #DB. A kernel #DB must leave it alone to ensure data consistency for ptrace. - Make the bitmasking of the virtual DR6 storage correct so it does not lose DR_STEP" * tag 'x86-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/debug: Fix DR_STEP vs ptrace_get_debugreg(6) x86/debug: Only clear/set ->virtual_dr6 for userspace #DB x86/debug: Fix BTF handling commit 4312e0e8d3eab027d9506db091eb10e6a9ff25d3 Merge: 82423b46fc9ec cb47755725da7 Author: Linus Torvalds Date: Sun Nov 1 11:13:45 2020 -0800 Merge tag 'timers-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "A few fixes for timers/timekeeping: - Prevent undefined behaviour in the timespec64_to_ns() conversion which is used for converting user supplied time input to nanoseconds. It lacked overflow protection. - Mark sched_clock_read_begin/retry() to prevent recursion in the tracer - Remove unused debug functions in the hrtimer and timerlist code" * tag 'timers-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: time: Prevent undefined behaviour in timespec64_to_ns() timers: Remove unused inline funtion debug_timer_free() hrtimer: Remove unused inline function debug_hrtimer_free() time/sched_clock: Mark sched_clock_read_begin/retry() as notrace commit 82423b46fc9ec699a0ede9e025a8414658cdcf48 Merge: 8d99084efcc21 4230e2deaa484 Author: Linus Torvalds Date: Sun Nov 1 11:11:38 2020 -0800 Merge tag 'smp-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull smp fix from Thomas Gleixner: "A single fix for stop machine. Mark functions no trace to prevent a crash caused by recursion when enabling or disabling a tracer on RISC-V (probably all architectures which patch through stop machine)" * tag 'smp-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: stop_machine, rcu: Mark functions as notrace commit 8d99084efcc21bb4e2bc4d818f41a27768d48f6e Merge: 31f020064f9d4 1a39340865ce5 Author: Linus Torvalds Date: Sun Nov 1 11:08:17 2020 -0800 Merge tag 'locking-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "A couple of locking fixes: - Fix incorrect failure injection handling in the fuxtex code - Prevent a preemption warning in lockdep when tracking local_irq_enable() and interrupts are already enabled - Remove more raw_cpu_read() usage from lockdep which causes state corruption on !X86 architectures. - Make the nr_unused_locks accounting in lockdep correct again" * tag 'locking-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lockdep: Fix nr_unused_locks accounting locking/lockdep: Remove more raw_cpu_read() usage futex: Fix incorrect should_fail_futex() handling lockdep: Fix preemption WARN for spurious IRQ-enable commit 31f020064f9d4da5686f8dda91787f825537ad29 Merge: 9c75b68b91ff0 d1b35d66f48f9 Author: Linus Torvalds Date: Sun Nov 1 10:05:16 2020 -0800 Merge tag 'char-misc-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes/removals from Greg KH: "Here's some small fixes for 5.10-rc2 and a big driver removal. The fixes are for some reported issues in the interconnect and coresight drivers, nothing major. The "big" driver removal is the MIC drivers have been asked to be removed as the hardware never shipped and Intel no longer wants to maintain something that no one can use. This is welcomed by many as the DMA usage of these drivers was "interesting" and the security people were starting to question some issues that were starting to be found in the codebase. Note, one of the subsystems for this driver, the "VOP" code, will probably come back in future kernel versions as it was looking to potentially solve some PCIe virtualization issues that a number of other vendors were wanting to solve. But as-is, this codebase didn't work for anyone else so no actual functionality is being removed. All of these have been in linux-next with no reported issues" * tag 'char-misc-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: coresight: cti: Initialize dynamic sysfs attributes coresight: Fix uninitialised pointer bug in etm_setup_aux() coresight: add module license misc: mic: remove the MIC drivers interconnect: qcom: use icc_sync state for sm8[12]50 interconnect: qcom: Ensure that the floor bandwidth value is enforced interconnect: qcom: sc7180: Init BCMs before creating the nodes interconnect: qcom: sdm845: Init BCMs before creating the nodes interconnect: Aggregate before setting initial bandwidth interconnect: qcom: sdm845: Enable keepalive for the MM1 BCM commit 9c75b68b91ff010d8d4c703b93954f605e2ef516 Merge: 2376cca02d73a 2fcce37a3d2f2 Author: Linus Torvalds Date: Sun Nov 1 09:59:13 2020 -0800 Merge tag 'driver-core-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core and documentation fixes from Greg KH: "Here is one tiny debugfs change to fix up an API where the last user was successfully fixed up in 5.10-rc1 (so it couldn't be merged earlier), and a much larger Documentation/ABI/ update to the files so they can be automatically parsed by our tools. The Documentation/ABI/ updates are just formatting issues, small ones to bring the files into parsable format, and have been acked by numerous subsystem maintainers and the documentation maintainer. I figured it was good to get this into 5.10-rc2 to help wih the merge issues that would arise if these were to stick in linux-next until 5.11-rc1. The debugfs change has been in linux-next for a long time, and the Documentation updates only for the last linux-next release" * tag 'driver-core-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (40 commits) scripts: get_abi.pl: assume ReST format by default docs: ABI: sysfs-class-led-trigger-pattern: remove hw_pattern duplication docs: ABI: sysfs-class-backlight: unify ABI documentation docs: ABI: sysfs-c2port: remove a duplicated entry docs: ABI: sysfs-class-power: unify duplicated properties docs: ABI: unify /sys/class/leds//brightness documentation docs: ABI: stable: remove a duplicated documentation docs: ABI: change read/write attributes docs: ABI: cleanup several ABI documents docs: ABI: sysfs-bus-nvdimm: use the right format for ABI docs: ABI: vdso: use the right format for ABI docs: ABI: fix syntax to be parsed using ReST notation docs: ABI: convert testing/configfs-acpi to ReST docs: Kconfig/Makefile: add a check for broken ABI files docs: abi-testing.rst: enable --rst-sources when building docs docs: ABI: don't escape ReST-incompatible chars from obsolete and removed docs: ABI: create a 2-depth index for ABI docs: ABI: make it parse ABI/stable as ReST-compatible files docs: ABI: sysfs-uevent: make it compatible with ReST output docs: ABI: testing: make the files compatible with ReST output ... commit 2376cca02d73a67ab28f03aa787777b74c3b0230 Merge: 2754a42e0dccc 7e97e4cbf3002 Author: Linus Torvalds Date: Sun Nov 1 09:57:24 2020 -0800 Merge tag 'staging-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are some small staging driver fixes for issues that have been reported in 5.10-rc1: - octeon driver fixes - wfx driver fixes - memory leak fix in vchiq driver - fieldbus driver bugfix - comedi driver bugfix All of these have been in linux-next with no reported issues" * tag 'staging-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: fieldbus: anybuss: jump to correct label in an error path staging: wfx: fix test on return value of gpiod_get_value() staging: wfx: fix use of uninitialized pointer staging: mmal-vchiq: Fix memory leak for vchiq_instance staging: comedi: cb_pcidas: Allow 2-channel commands for AO subdevice staging: octeon: Drop on uncorrectable alignment or FCS error staging: octeon: repair "fixed-link" support commit 2754a42e0dccc8db89426901bb54ca6c34969c01 Merge: 9b5ff3c93cd32 d54654790302c Author: Linus Torvalds Date: Sun Nov 1 09:55:36 2020 -0800 Merge tag 'tty-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are some small TTY and Serial driver fixes for reported issues for 5.10-rc2. They include: - vt ioctl bugfix for reported problems - fsl_lpuart serial driver fix - 21285 serial driver bugfix All have been in linux-next with no reported issues" * tag 'tty-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: vt_ioctl: fix GIO_UNIMAP regression vt: keyboard, extend func_buf_lock to readers vt: keyboard, simplify vt_kdgkbsent tty: serial: fsl_lpuart: LS1021A has a FIFO size of 16 words, like LS1028A tty: serial: 21285: fix lockup on open commit 9b5ff3c93cd323d26551a026c04929e1d2c1b68b Merge: 2d38c80d5bafe 00c27a1df8ff5 Author: Linus Torvalds Date: Sun Nov 1 09:53:38 2020 -0800 Merge tag 'usb-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB driver fixes from Greg KH: "Here are a number of small bugfixes for reported issues in some USB drivers. They include: - typec bugfixes - xhci bugfixes and lockdep warning fixes - cdc-acm driver regression fix - kernel doc fixes - cdns3 driver bugfixes for a bunch of reported issues - other tiny USB driver fixes All have been in linux-next with no reported issues" * tag 'usb-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: cdns3: gadget: own the lock wrongly at the suspend routine usb: cdns3: Fix on-chip memory overflow issue usb: cdns3: gadget: suspicious implicit sign extension xhci: Don't create stream debugfs files with spinlock held. usb: xhci: Workaround for S3 issue on AMD SNPS 3.0 xHC xhci: Fix sizeof() mismatch usb: typec: stusb160x: fix signedness comparison issue with enum variables usb: typec: add missing MODULE_DEVICE_TABLE() to stusb160x USB: apple-mfi-fastcharge: don't probe unhandled devices usbcore: Check both id_table and match() when both available usb: host: ehci-tegra: Fix error handling in tegra_ehci_probe() usb: typec: stusb160x: fix an IS_ERR() vs NULL check in probe usb: typec: tcpm: reset hard_reset_count for any disconnect usb: cdc-acm: fix cooldown mechanism usb: host: fsl-mph-dr-of: check return of dma_set_mask() usb: fix kernel-doc markups usb: typec: stusb160x: fix some signedness bugs usb: cdns3: Variable 'length' set but not used commit 2d38c80d5bafecdd3bdb0d22b722afba8101ec1f Merge: c2dc4c073fb71 9478dec3b5e79 Author: Linus Torvalds Date: Sun Nov 1 09:43:32 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - selftest fix - force PTE mapping on device pages provided via VFIO - fix detection of cacheable mapping at S2 - fallback to PMD/PTE mappings for composite huge pages - fix accounting of Stage-2 PGD allocation - fix AArch32 handling of some of the debug registers - simplify host HYP entry - fix stray pointer conversion on nVHE TLB invalidation - fix initialization of the nVHE code - simplify handling of capabilities exposed to HYP - nuke VCPUs caught using a forbidden AArch32 EL0 x86: - new nested virtualization selftest - miscellaneous fixes - make W=1 fixes - reserve new CPUID bit in the KVM leaves" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: vmx: remove unused variable KVM: selftests: Don't require THP to run tests KVM: VMX: eVMCS: make evmcs_sanitize_exec_ctrls() work again KVM: selftests: test behavior of unmapped L2 APIC-access address KVM: x86: Fix NULL dereference at kvm_msr_ignored_check() KVM: x86: replace static const variables with macros KVM: arm64: Handle Asymmetric AArch32 systems arm64: cpufeature: upgrade hyp caps to final arm64: cpufeature: reorder cpus_have_{const, final}_cap() KVM: arm64: Factor out is_{vhe,nvhe}_hyp_code() KVM: arm64: Force PTE mapping on fault resulting in a device mapping KVM: arm64: Use fallback mapping sizes for contiguous huge page sizes KVM: arm64: Fix masks in stage2_pte_cacheable() KVM: arm64: Fix AArch32 handling of DBGD{CCINT,SCRext} and DBGVCR KVM: arm64: Allocate stage-2 pgd pages with GFP_KERNEL_ACCOUNT KVM: arm64: Drop useless PAN setting on host EL1 to EL2 transition KVM: arm64: Remove leftover kern_hyp_va() in nVHE TLB invalidation KVM: arm64: Don't corrupt tpidr_el2 on failed HVC call x86/kvm: Reserve KVM_FEATURE_MSI_EXT_DEST_ID commit 271b339236e1c0e6448bc1cafeaedcb529324bf0 Author: David Lechner Date: Sun Oct 25 11:51:22 2020 -0500 counter/ti-eqep: Fix regmap max_register The values given were the offset of the register after the last register instead of the actual last register in each range. Fix by using the correct last register of each range. Fixes: f213729f6796 ("counter: new TI eQEP driver") Signed-off-by: David Lechner Acked-by: William Breathitt Gray Link: https://lore.kernel.org/r/20201025165122.607866-1-david@lechnology.com Signed-off-by: Jonathan Cameron commit 695e2f5c289bb7f8b85351dcfa35fa236e0200a4 Author: Olivier Moysan Date: Wed Oct 21 10:53:13 2020 +0200 iio: adc: stm32-adc: fix a regression when using dma and irq Since overrun interrupt support has been added, there's a regression when two ADCs are used at the same time, with: - an ADC configured to use IRQs. EOCIE bit is set. The handler is normally called in this case. - an ADC configured to use DMA. EOCIE bit isn't set. EOC triggers the DMA request. It's then automatically cleared by DMA read. But the handler gets called due to status bit is temporarily set (IRQ triggered by the other ADC). This is a regression as similar issue had been fixed earlier by commit dcb10920179a ("iio: adc: stm32-adc: fix a race when using several adcs with dma and irq"). Issue is that stm32_adc_eoc_enabled() returns non-zero value (always) since OVR bit has been added and enabled for both DMA and IRQ case. Remove OVR mask in IER register, and rely only on CSR status for overrun. To avoid subsequent calls to interrupt routine on overrun, CSR OVR bit has to be cleared. CSR OVR bit cannot be cleared directly by software. To do this ADC must be stopped first, and OVR bit in ADC ISR has to be cleared. Also add a check in ADC IRQ handler to report spurious IRQs. Fixes: cc06e67d8fa5 ("iio: adc: stm32-adc: Add check on overrun interrupt") Signed-off-by: Olivier Moysan Signed-off-by: Fabrice Gasnier Cc: Link: https://lore.kernel.org/r/20201021085313.5335-1-olivier.moysan@st.com Signed-off-by: Jonathan Cameron commit 17bb415fefedb74d2ff02656cf59e4e3ab92ee20 Merge: ceb2465c51195 d95bdca75b3fb Author: Thomas Gleixner Date: Sun Nov 1 17:54:13 2020 +0100 Merge tag 'irqchip-fixes-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: - A couple of fixes after the IPI as IRQ patches (Kconfig, bcm2836) - Two SiFive PLIC fixes (irq_set_affinity, hierarchy handling) - "unmapped events" handling for the ti-sci-inta controller - Tidying up for the irq-mst driver (static functions, Kconfig) - Small cleanup in the Renesas irqpin driver - STM32 exti can now handle LP timer events commit 15207a92e019803d62687455d8aa2ff9eb3dc82c Author: Fabien Parent Date: Sun Oct 18 21:46:44 2020 +0200 iio: adc: mediatek: fix unset field dev_comp field is used in a couple of places but it is never set. This results in kernel oops when dereferencing a NULL pointer. Set the `dev_comp` field correctly in the probe function. Fixes: 6d97024dce23 ("iio: adc: mediatek: mt6577-auxadc, add mt6765 support") Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Cc: Link: https://lore.kernel.org/r/20201018194644.3366846-1-fparent@baylibre.com Signed-off-by: Jonathan Cameron commit 56e4f2dda23c6d39d327944faa89efaa4eb290d1 Author: Gwendal Grignou Date: Tue Jun 30 08:37:30 2020 -0700 iio: cros_ec: Use default frequencies when EC returns invalid information Minimal and maximal frequencies supported by a sensor is queried. On some older machines, these frequencies are not returned properly and the EC returns 0 instead. When returned maximal frequency is 0, ignore the information and use default frequencies instead. Fixes: ae7b02ad2f32 ("iio: common: cros_ec_sensors: Expose cros_ec_sensors frequency range via iio sysfs") Signed-off-by: Gwendal Grignou Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20200630153730.3302889-1-gwendal@chromium.org CC: Signed-off-by: Jonathan Cameron commit 01fe332800d0d2f94337b45c1973f4cf28ae6195 Author: Maciej Matuszczyk Date: Fri Oct 23 20:16:29 2020 +0200 arm64: dts: rockchip: Remove system-power-controller from pmic on Odroid Go Advance This fixes a poweroff issue when this is supposed to happen via PSCI. Signed-off-by: Maciej Matuszczyk Link: https://lore.kernel.org/r/20201023181629.119727-1-maccraft123mc@gmail.com Signed-off-by: Heiko Stuebner commit b0c0aa7aa4b919e02e0a24aa3a46dfbf2bbc34dc Author: David Bauer Date: Mon Oct 26 17:27:21 2020 +0100 arm64: dts: rockchip: fix NanoPi R2S GMAC clock name This commit fixes the name for the GMAC clock to gmac_clkin, as this is the name of the clock provided by the rk3328-clk driver. Without this commit, the GMAC will not work in TX direction. Fixes: f1ec83f880db ("arm64: dts: rockchip: Add support for FriendlyARM NanoPi R2S") Suggested-by: Tobias Waldvogel Signed-off-by: David Bauer Link: https://lore.kernel.org/r/20201026162721.70672-1-mail@david-bauer.net Signed-off-by: Heiko Stuebner commit d95bdca75b3fb41bf185efe164e05aed820081a5 Author: Peter Ujfalusi Date: Tue Oct 20 10:32:43 2020 +0300 irqchip/ti-sci-inta: Add support for unmapped event handling The DMA (BCDMA/PKTDMA and their rings/flows) events are under the INTA's supervision as unmapped events in AM64. In order to keep the current SW stack working, the INTA driver must replace the dev_id with it's own when a request comes for BCDMA or PKTDMA resources. Implement parsing of the optional "ti,unmapped-event-sources" phandle array to get the sci-dev-ids of the devices where the unmapped events originate. Signed-off-by: Peter Ujfalusi Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201020073243.19255-3-peter.ujfalusi@ti.com commit bb2bd7c7f3d0946acc2104db31df228d10f7b598 Author: Peter Ujfalusi Date: Tue Oct 20 10:32:42 2020 +0300 dt-bindings: irqchip: ti, sci-inta: Update for unmapped event handling The new DMA architecture introduced with AM64 introduced new event types: unampped events. These events are mapped within INTA in contrast to other K3 devices where the events with similar function was originating from the UDMAP or ringacc. The ti,unmapped-event-sources should contain phandle array to the devices in the system (typically DMA controllers) from where the unmapped events originate. Signed-off-by: Peter Ujfalusi Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201020073243.19255-2-peter.ujfalusi@ti.com commit b388bdf2bac7aedac9bde5ab63eaf7646f29fc00 Author: Geert Uytterhoeven Date: Wed Oct 28 16:39:55 2020 +0100 irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm Get rid of the separate flag to indicate if the IRLM bit is present in the INTC/Interrupt Control Register 0, by considering -1 an invalid irlm_bit value. Signed-off-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201028153955.1736767-1-geert+renesas@glider.be commit f9ac7bbd6e4540dcc6df621b9c9b6eb2e26ded1d Author: Greentime Hu Date: Thu Oct 29 10:37:38 2020 +0800 irqchip/sifive-plic: Fix chip_data access within a hierarchy The plic driver crashes in plic_irq_unmask() when the interrupt is within a hierarchy, as it picks the top-level chip_data instead of its local one. Using irq_data_get_irq_chip_data() instead of irq_get_chip_data() solves the issue for good. Fixes: f1ad1133b18f ("irqchip/sifive-plic: Add support for multiple PLICs") Signed-off-by: Greentime Hu [maz: rewrote commit message] Signed-off-by: Marc Zyngier Reviewed-by: Anup Patel Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20201029023738.127472-1-greentime.hu@sifive.com commit 859191b234f86b5f36cbe384baca1067a2221eb7 Merge: 20149e9eb68c0 7d10e62c2ff8e Author: Jakub Kicinski Date: Sat Oct 31 17:28:17 2020 -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) Incorrect netlink report logic in flowtable and genID. 2) Add a selftest to check that wireguard passes the right sk to ip_route_me_harder, from Jason A. Donenfeld. 3) Pass the actual sk to ip_route_me_harder(), also from Jason. 4) Missing expression validation of updates via nft --check. 5) Update byte and packet counters regardless of whether they match, from Stefano Brivio. ==================== Signed-off-by: Jakub Kicinski commit 20149e9eb68c003eaa09e7c9a49023df40779552 Author: wenxu Date: Fri Oct 30 11:32:08 2020 +0800 ip_tunnel: fix over-mtu packet send fail without TUNNEL_DONT_FRAGMENT flags The tunnel device such as vxlan, bareudp and geneve in the lwt mode set the outer df only based TUNNEL_DONT_FRAGMENT. And this was also the behavior for gre device before switching to use ip_md_tunnel_xmit in commit 962924fa2b7a ("ip_gre: Refactor collect metatdata mode tunnel xmit to ip_md_tunnel_xmit") When the ip_gre in lwt mode xmit with ip_md_tunnel_xmi changed the rule and make the discrepancy between handling of DF by different tunnels. So in the ip_md_tunnel_xmit should follow the same rule like other tunnels. Fixes: cfc7381b3002 ("ip_tunnel: add collect_md mode to IPIP tunnel") Signed-off-by: wenxu Link: https://lore.kernel.org/r/1604028728-31100-1-git-send-email-wenxu@ucloud.cn Signed-off-by: Jakub Kicinski commit 403dc16796f5516acf23d94a1cd9eba564d03210 Author: Mark Deneen Date: Fri Oct 30 15:58:14 2020 +0000 cadence: force nonlinear buffers to be cloned In my test setup, I had a SAMA5D27 device configured with ip forwarding, and second device with usb ethernet (r8152) sending ICMP packets.  If the packet was larger than about 220 bytes, the SAMA5 device would "oops" with the following trace: kernel BUG at net/core/skbuff.c:1863! Internal error: Oops - BUG: 0 [#1] ARM Modules linked in: xt_MASQUERADE ppp_async ppp_generic slhc iptable_nat xt_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 can_raw can bridge stp llc ipt_REJECT nf_reject_ipv4 sd_mod cdc_ether usbnet usb_storage r8152 scsi_mod mii o ption usb_wwan usbserial micrel macb at91_sama5d2_adc phylink gpio_sama5d2_piobu m_can_platform m_can industrialio_triggered_buffer kfifo_buf of_mdio can_dev fixed_phy sdhci_of_at91 sdhci_pltfm libphy sdhci mmc_core ohci_at91 ehci_atmel o hci_hcd iio_rescale industrialio sch_fq_codel spidev prox2_hal(O) CPU: 0 PID: 0 Comm: swapper Tainted: G           O      5.9.1-prox2+ #1 Hardware name: Atmel SAMA5 PC is at skb_put+0x3c/0x50 LR is at macb_start_xmit+0x134/0xad0 [macb] pc : []    lr : []    psr: 20070113 sp : c0d01a60  ip : c07232c0  fp : c4250000 r10: c0d03cc8  r9 : 00000000  r8 : c0d038c0 r7 : 00000000  r6 : 00000008  r5 : c59b66c0  r4 : 0000002a r3 : 8f659eff  r2 : c59e9eea  r1 : 00000001  r0 : c59b66c0 Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none Control: 10c53c7d  Table: 2640c059  DAC: 00000051 Process swapper (pid: 0, stack limit = 0x75002d81) [] (skb_put) from [] (macb_start_xmit+0x134/0xad0 [macb]) [] (macb_start_xmit [macb]) from [] (dev_hard_start_xmit+0x90/0x11c) [] (dev_hard_start_xmit) from [] (sch_direct_xmit+0x124/0x260) [] (sch_direct_xmit) from [] (__dev_queue_xmit+0x4b0/0x6d0) [] (__dev_queue_xmit) from [] (ip_finish_output2+0x350/0x580) [] (ip_finish_output2) from [] (ip_output+0xb4/0x13c) [] (ip_output) from [] (ip_forward+0x474/0x500) [] (ip_forward) from [] (ip_sublist_rcv_finish+0x3c/0x50) [] (ip_sublist_rcv_finish) from [] (ip_sublist_rcv+0x11c/0x188) [] (ip_sublist_rcv) from [] (ip_list_rcv+0xf8/0x124) [] (ip_list_rcv) from [] (__netif_receive_skb_list_core+0x1a0/0x20c) [] (__netif_receive_skb_list_core) from [] (netif_receive_skb_list_internal+0x194/0x230) [] (netif_receive_skb_list_internal) from [] (gro_normal_list.part.0+0x14/0x28) [] (gro_normal_list.part.0) from [] (napi_complete_done+0x16c/0x210) [] (napi_complete_done) from [] (r8152_poll+0x684/0x708 [r8152]) [] (r8152_poll [r8152]) from [] (net_rx_action+0x100/0x328) [] (net_rx_action) from [] (__do_softirq+0xec/0x274) [] (__do_softirq) from [] (irq_exit+0xcc/0xd0) [] (irq_exit) from [] (__handle_domain_irq+0x58/0xa4) [] (__handle_domain_irq) from [] (__irq_svc+0x6c/0x90) Exception stack(0xc0d01ef0 to 0xc0d01f38) 1ee0:                                     00000000 0000003d 0c31f383 c0d0fa00 1f00: c0d2eb80 00000000 c0d2e630 4dad8c49 4da967b0 0000003d 0000003d 00000000 1f20: fffffff5 c0d01f40 c04e0f88 c04e0f8c 30070013 ffffffff [] (__irq_svc) from [] (cpuidle_enter_state+0x7c/0x378) [] (cpuidle_enter_state) from [] (cpuidle_enter+0x28/0x38) [] (cpuidle_enter) from [] (do_idle+0x194/0x214) [] (do_idle) from [] (cpu_startup_entry+0xc/0x14) [] (cpu_startup_entry) from [] (start_kernel+0x46c/0x4a0) Code: e580c054 8a000002 e1a00002 e8bd8070 (e7f001f2) ---[ end trace 146c8a334115490c ]--- The solution was to force nonlinear buffers to be cloned.  This was previously reported by Klaus Doth (https://www.spinics.net/lists/netdev/msg556937.html) but never formally submitted as a patch. This is the third revision, hopefully the formatting is correct this time! Suggested-by: Klaus Doth Fixes: 653e92a9175e ("net: macb: add support for padding and fcs computation") Signed-off-by: Mark Deneen Link: https://lore.kernel.org/r/20201030155814.622831-1-mdeneen@saucontech.com Signed-off-by: Jakub Kicinski commit c2dc4c073fb71b50904493657a7622b481b346e3 Merge: 53760f9b74a34 0c86d774883fa Author: Linus Torvalds Date: Sat Oct 31 14:41:48 2020 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull vhost fixes from Michael Tsirkin: "Fixes all over the place. A new UAPI is borderline: can also be considered a new feature but also seems to be the only way we could come up with to fix addressing for userspace - and it seems important to switch to it now before userspace making assumptions about addressing ability of devices is set in stone" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vdpasim: allow to assign a MAC address vdpasim: fix MAC address configuration vdpa: handle irq bypass register failure case vdpa_sim: Fix DMA mask Revert "vhost-vdpa: fix page pinning leakage in error path" vdpa/mlx5: Fix error return in map_direct_mr() vhost_vdpa: Return -EFAULT if copy_from_user() fails vdpa_sim: implement get_iova_range() vhost: vdpa: report iova range vdpa: introduce config op to get valid iova range commit 53760f9b74a3412c1b67a20b0e8dbf7c3cebfc45 Merge: bb3540be73ca1 a38283da05d32 Author: Linus Torvalds Date: Sat Oct 31 14:31:28 2020 -0700 Merge tag 'flexible-array-conversions-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull more flexible-array member conversions from Gustavo A. R. Silva: "Replace zero-length arrays with flexible-array members" * tag 'flexible-array-conversions-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: printk: ringbuffer: Replace zero-length array with flexible-array member net/smc: Replace zero-length array with flexible-array member net/mlx5: Replace zero-length array with flexible-array member mei: hw: Replace zero-length array with flexible-array member gve: Replace zero-length array with flexible-array member Bluetooth: btintel: Replace zero-length array with flexible-array member scsi: target: tcmu: Replace zero-length array with flexible-array member ima: Replace zero-length array with flexible-array member enetc: Replace zero-length array with flexible-array member fs: Replace zero-length array with flexible-array member Bluetooth: Replace zero-length array with flexible-array member params: Replace zero-length array with flexible-array member tracepoint: Replace zero-length array with flexible-array member platform/chrome: cros_ec_proto: Replace zero-length array with flexible-array member platform/chrome: cros_ec_commands: Replace zero-length array with flexible-array member mailbox: zynqmp-ipi-message: Replace zero-length array with flexible-array member dmaengine: ti-cppi5: Replace zero-length array with flexible-array member commit 72a41f956ac25868d182956ca607419e621bea19 Merge: 2f71e00619dcd 2efdaaaf883a1 Author: Jakub Kicinski Date: Sat Oct 31 13:16:07 2020 -0700 Merge branch 'ipv6-reply-icmp-error-if-fragment-doesn-t-contain-all-headers' Hangbin Liu says: ==================== IPv6: reply ICMP error if fragment doesn't contain all headers When our Engineer run latest IPv6 Core Conformance test, test v6LC.1.3.6: First Fragment Doesn’t Contain All Headers[1] failed. The test purpose is to verify that the node (Linux for example) should properly process IPv6 packets that don’t include all the headers through the Upper-Layer header. Based on RFC 8200, Section 4.5 Fragment Header - If the first fragment does not include all headers through an Upper-Layer header, then that fragment should be discarded and an ICMP Parameter Problem, Code 3, message should be sent to the source of the fragment, with the Pointer field set to zero. The first patch add a definition for ICMPv6 Parameter Problem, code 3. The second patch add a check for the 1st fragment packet to make sure Upper-Layer header exist. [1] Page 68, v6LC.1.3.6: First Fragment Doesn’t Contain All Headers part A, B, C and D at https://ipv6ready.org/docs/Core_Conformance_5_0_0.pdf [2] My reproducer: import sys, os from scapy.all import * def send_frag_dst_opt(src_ip6, dst_ip6): ip6 = IPv6(src = src_ip6, dst = dst_ip6, nh = 44) frag_1 = IPv6ExtHdrFragment(nh = 60, m = 1) dst_opt = IPv6ExtHdrDestOpt(nh = 58) frag_2 = IPv6ExtHdrFragment(nh = 58, offset = 4, m = 1) icmp_echo = ICMPv6EchoRequest(seq = 1) pkt_1 = ip6/frag_1/dst_opt pkt_2 = ip6/frag_2/icmp_echo send(pkt_1) send(pkt_2) def send_frag_route_opt(src_ip6, dst_ip6): ip6 = IPv6(src = src_ip6, dst = dst_ip6, nh = 44) frag_1 = IPv6ExtHdrFragment(nh = 43, m = 1) route_opt = IPv6ExtHdrRouting(nh = 58) frag_2 = IPv6ExtHdrFragment(nh = 58, offset = 4, m = 1) icmp_echo = ICMPv6EchoRequest(seq = 2) pkt_1 = ip6/frag_1/route_opt pkt_2 = ip6/frag_2/icmp_echo send(pkt_1) send(pkt_2) if __name__ == '__main__': src = sys.argv[1] dst = sys.argv[2] conf.iface = sys.argv[3] send_frag_dst_opt(src, dst) send_frag_route_opt(src, dst) ==================== Link: https://lore.kernel.org/r/20201027123313.3717941-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 2efdaaaf883a143061296467913c01aa1ff4b3ce Author: Hangbin Liu Date: Tue Oct 27 20:33:13 2020 +0800 IPv6: reply ICMP error if the first fragment don't include all headers Based on RFC 8200, Section 4.5 Fragment Header: - If the first fragment does not include all headers through an Upper-Layer header, then that fragment should be discarded and an ICMP Parameter Problem, Code 3, message should be sent to the source of the fragment, with the Pointer field set to zero. Checking each packet header in IPv6 fast path will have performance impact, so I put the checking in ipv6_frag_rcv(). As the packet may be any kind of L4 protocol, I only checked some common protocols' header length and handle others by (offset + 1) > skb->len. Also use !(frag_off & htons(IP6_OFFSET)) to catch atomic fragments (fragmented packet with only one fragment). When send ICMP error message, if the 1st truncated fragment is ICMP message, icmp6_send() will break as is_ineligible() return true. So I added a check in is_ineligible() to let fragment packet with nexthdr ICMP but no ICMP header return false. Signed-off-by: Hangbin Liu Signed-off-by: Jakub Kicinski commit b59e286be280fa3c2e94a0716ddcee6ba02bc8ba Author: Hangbin Liu Date: Tue Oct 27 20:33:12 2020 +0800 ICMPv6: Add ICMPv6 Parameter Problem, code 3 definition Based on RFC7112, Section 6: IANA has added the following "Type 4 - Parameter Problem" message to the "Internet Control Message Protocol version 6 (ICMPv6) Parameters" registry: CODE NAME/DESCRIPTION 3 IPv6 First Fragment has incomplete IPv6 Header Chain Signed-off-by: Hangbin Liu Signed-off-by: Jakub Kicinski commit 2f71e00619dcde3d8a98ba3e7f52e98282504b7d Author: Colin Ian King Date: Tue Oct 27 11:49:25 2020 +0000 net: atm: fix update of position index in lec_seq_next The position index in leq_seq_next is not updated when the next entry is fetched an no more entries are available. This causes seq_file to report the following error: "seq_file: buggy .next function lec_seq_next [lec] did not update position index" Fix this by always updating the position index. [ Note: this is an ancient 2002 bug, the sha is from the tglx/history repo ] Fixes 4aea2cbff417 ("[ATM]: Move lan seq_file ops to lec.c [1/3]") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201027114925.21843-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit bb3540be73ca1e483aa977d859960895fe85372d Merge: 67ff377bc30cd 48ab6d5d1f096 Author: Linus Torvalds Date: Sat Oct 31 12:25:58 2020 -0700 Merge tag 'dma-mapping-5.10-2' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: "Fix an integer overflow on 32-bit platforms in the new DMA range code (Geert Uytterhoeven)" * tag 'dma-mapping-5.10-2' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: fix 32-bit overflow with CONFIG_ARM_LPAE=n commit 67ff377bc30cd4eb91f0454adb9dcb1f4de280f2 Merge: 5fc6b075e165f fab09aaee8038 Author: Linus Torvalds Date: Sat Oct 31 12:21:04 2020 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four driver fixes and one core fix. The core fix closes a race window where we could kick off a second asynchronous scan because the test and set of the variable preventing it isn't atomic" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: hisi_sas: Stop using queue #0 always for v2 hw scsi: ibmvscsi: Fix potential race after loss of transport scsi: mptfusion: Fix null pointer dereferences in mptscsih_remove() scsi: qla2xxx: Return EBUSY on fcport deletion scsi: core: Don't start concurrent async scan on same host commit 9478dec3b5e79a1431e2e2b911e32e52a11c6320 Author: Paolo Bonzini Date: Sat Oct 31 11:38:09 2020 -0400 KVM: vmx: remove unused variable Reported-by: kernel test robot Signed-off-by: Paolo Bonzini commit 0f55b67e5ad8dcdfb9ae2aaed75dd9fbb2bd92b2 Author: Andrew Jones Date: Thu Oct 29 21:17:00 2020 +0100 KVM: selftests: Don't require THP to run tests Unless we want to test with THP, then we shouldn't require it to be configured by the host kernel. Unfortunately, even advising with MADV_NOHUGEPAGE does require it, so check for THP first in order to avoid madvise failing with EINVAL. Signed-off-by: Andrew Jones Message-Id: <20201029201703.102716-2-drjones@redhat.com> Signed-off-by: Paolo Bonzini commit 064eedf2c50f692088e1418c553084bf9c1432f8 Author: Vitaly Kuznetsov Date: Wed Oct 14 16:33:46 2020 +0200 KVM: VMX: eVMCS: make evmcs_sanitize_exec_ctrls() work again It was noticed that evmcs_sanitize_exec_ctrls() is not being executed nowadays despite the code checking 'enable_evmcs' static key looking correct. Turns out, static key magic doesn't work in '__init' section (and it is unclear when things changed) but setup_vmcs_config() is called only once per CPU so we don't really need it to. Switch to checking 'enlightened_vmcs' instead, it is supposed to be in sync with 'enable_evmcs'. Opportunistically make evmcs_sanitize_exec_ctrls '__init' and drop unneeded extra newline from it. Reported-by: Yang Weijiang Signed-off-by: Vitaly Kuznetsov Message-Id: <20201014143346.2430936-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 97a71a5455997d72adfd74e9d575d782d7c2ab9a Author: Jim Mattson Date: Mon Oct 26 11:09:22 2020 -0700 KVM: selftests: test behavior of unmapped L2 APIC-access address Add a regression test for commit 671ddc700fd0 ("KVM: nVMX: Don't leak L1 MMIO regions to L2"). First, check to see that an L2 guest can be launched with a valid APIC-access address that is backed by a page of L1 physical memory. Next, set the APIC-access address to a (valid) L1 physical address that is not backed by memory. KVM can't handle this situation, so resuming L2 should result in a KVM exit for internal error (emulation). Signed-off-by: Jim Mattson Reviewed-by: Ricardo Koller Reviewed-by: Peter Shier Message-Id: <20201026180922.3120555-1-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 7d10e62c2ff8e084c136c94d32d9a94de4d31248 Author: Stefano Brivio Date: Thu Oct 29 16:39:46 2020 +0100 netfilter: ipset: Update byte and packet counters regardless of whether they match In ip_set_match_extensions(), for sets with counters, we take care of updating counters themselves by calling ip_set_update_counter(), and of checking if the given comparison and values match, by calling ip_set_match_counter() if needed. However, if a given comparison on counters doesn't match the configured values, that doesn't mean the set entry itself isn't matching. This fix restores the behaviour we had before commit 4750005a85f7 ("netfilter: ipset: Fix "don't update counters" mode when counters used at the matching"), without reintroducing the issue fixed there: back then, mtype_data_match() first updated counters in any case, and then took care of matching on counters. Now, if the IPSET_FLAG_SKIP_COUNTER_UPDATE flag is set, ip_set_update_counter() will anyway skip counter updates if desired. The issue observed is illustrated by this reproducer: ipset create c hash:ip counters ipset add c 192.0.2.1 iptables -I INPUT -m set --match-set c src --bytes-gt 800 -j DROP if we now send packets from 192.0.2.1, bytes and packets counters for the entry as shown by 'ipset list' are always zero, and, no matter how many bytes we send, the rule will never match, because counters themselves are not updated. Reported-by: Mithil Mhatre Fixes: 4750005a85f7 ("netfilter: ipset: Fix "don't update counters" mode when counters used at the matching") Signed-off-by: Stefano Brivio Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 61cf93d3e14a29288e4d5522aecb6e58268eec62 Author: Dennis Zhou Date: Fri Oct 30 20:40:21 2020 +0000 percpu: convert flexible array initializers to use struct_size() Use the safer macro as sparked by the long discussion in [1]. [1] https://lore.kernel.org/lkml/20200917204514.GA2880159@google.com/ Reviewed-by: Gustavo A. R. Silva Signed-off-by: Dennis Zhou commit 5fc6b075e165f641fbc366b58b578055762d5f8c Merge: cf9446cc8e6d8 65ff5cd04551d Author: Linus Torvalds Date: Fri Oct 30 15:02:49 2020 -0700 Merge tag 'block-5.10-2020-10-30' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - null_blk zone fixes (Damien, Kanchan) - NVMe pull request from Christoph: - improve zone revalidation (Keith Busch) - gracefully handle zero length messages in nvme-rdma (zhenwei pi) - nvme-fc error handling fixes (James Smart) - nvmet tracing NULL pointer dereference fix (Chaitanya Kulkarni)" - xsysace platform fixes (Andy) - scatterlist type cleanup (David) - blk-cgroup memory fixes (Gabriel) - nbd block size update fix (Ming) - Flush completion state fix (Ming) - bio_add_hw_page() iteration fix (Naohiro) * tag 'block-5.10-2020-10-30' of git://git.kernel.dk/linux-block: blk-mq: mark flush request as IDLE in flush_end_io() lib/scatterlist: use consistent sg_copy_buffer() return type xsysace: use platform_get_resource() and platform_get_irq_optional() null_blk: Fix locking in zoned mode null_blk: Fix zone reset all tracing nbd: don't update block size after device is started block: advance iov_iter on bio_add_hw_page failure null_blk: synchronization fix for zoned device nvmet: fix a NULL pointer dereference when tracing the flush command nvme-fc: remove nvme_fc_terminate_io() nvme-fc: eliminate terminate_io use by nvme_fc_error_recovery nvme-fc: remove err_work work item nvme-fc: track error_recovery while connecting nvme-rdma: handle unexpected nvme completion data length nvme: ignore zone validate errors on subsequent scans blk-cgroup: Pre-allocate tree node on blkg_conf_prep blk-cgroup: Fix memleak on error path commit a38283da05d321fa1fce38ea3cf41c9f1dbd1f21 Author: Gustavo A. R. Silva Date: Tue Oct 27 13:50:19 2020 -0500 printk: ringbuffer: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit 7206d58a3a538c80b36305d1904de313cf47ef4c Author: Gustavo A. R. Silva Date: Tue Oct 27 01:33:56 2020 -0500 net/smc: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit 290562075d4d9e85b7ff4104f9a634ffc3cccb69 Author: Gustavo A. R. Silva Date: Tue Oct 27 15:28:40 2020 -0500 net/mlx5: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit b21de80ac156044c731889a686135e6d0b7c2bcc Author: Gustavo A. R. Silva Date: Tue Oct 27 01:15:49 2020 -0500 mei: hw: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit 691f4077d5604af4067ebbea4a27f05e760557b7 Author: Gustavo A. R. Silva Date: Tue Oct 27 16:30:45 2020 -0500 gve: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct gve_stats_report, instead of a zero-length array, and use the struct_size() helper to calculate the size for the resource allocation. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit 4acbf5545d5acfeeac6d84e31cb2203ba19223ef Author: Gustavo A. R. Silva Date: Tue Oct 27 00:54:08 2020 -0500 Bluetooth: btintel: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit cf9446cc8e6d85355642209538dde619f53770dc Merge: 8f9a2a196bc3f c8b5e2600a2cf Author: Linus Torvalds Date: Fri Oct 30 14:55:36 2020 -0700 Merge tag 'io_uring-5.10-2020-10-30' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - Fixes for linked timeouts (Pavel) - Set IO_WQ_WORK_CONCURRENT early for async offload (Pavel) - Two minor simplifications that make the code easier to read and follow (Pavel) * tag 'io_uring-5.10-2020-10-30' of git://git.kernel.dk/linux-block: io_uring: use type appropriate io_kiocb handler for double poll io_uring: simplify __io_queue_sqe() io_uring: simplify nxt propagation in io_queue_sqe io_uring: don't miss setting IO_WQ_WORK_CONCURRENT io_uring: don't defer put of cancelled ltimeout io_uring: always clear LINK_TIMEOUT after cancel io_uring: don't adjust LINK_HEAD in cancel ltimeout io_uring: remove opcode check on ltimeout kill commit 8f9a2a196bc3f838996364f5b8f73b8a4ee5a552 Merge: f5d808567a51d 8e4c309f9f33b Author: Linus Torvalds Date: Fri Oct 30 14:51:01 2020 -0700 Merge tag 'libata-5.10-2020-10-30' of git://git.kernel.dk/linux-block Pull libata fix from Jens Axboe: "Single fix for an old regression with sata_nv" * tag 'libata-5.10-2020-10-30' of git://git.kernel.dk/linux-block: ata: sata_nv: Fix retrieving of active qcs commit 462b58fb033996e999cc213ed0b430d4f22a28fe Author: Rajat Jain Date: Wed Oct 28 16:15:45 2020 -0700 PCI: Always enable ACS even if no ACS Capability Some devices support ACS functionality even though they don't have a spec-compliant ACS Capability; pci_enable_acs() has a quirk mechanism to handle them. We want to enable ACS whenever possible, but 52fbf5bdeeef ("PCI: Cache ACS capability offset in device") inadvertently broke this by calling pci_enable_acs() only if we find an ACS Capability. This resulted in ACS not being enabled for these non-compliant devices, which means devices can't be separated into different IOMMU groups, which in turn means we may not be able to pass those devices through to VMs, as reported by Boris V: https://lore.kernel.org/r/74aeea93-8a46-5f5a-343c-790d4c655da3@bstnet.org Fixes: 52fbf5bdeeef ("PCI: Cache ACS capability offset in device") Link: https://lore.kernel.org/r/20201028231545.4116866-1-rajatja@google.com Reported-by: Boris V Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Williamson commit f5d808567a51d97e171e0a8111813f973bf4ac12 Merge: aab6bf505a8ea d5c8238849e7b Author: Linus Torvalds Date: Fri Oct 30 13:29:49 2020 -0700 Merge tag 'for-5.10-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - lockdep fixes: - drop path locks before manipulating sysfs objects or qgroups - preliminary fixes before tree locks get switched to rwsem - use annotated seqlock - build warning fixes (printk format) - fix relocation vs fallocate race - tree checker properly validates number of stripes and parity - readahead vs device replace fixes - iomap dio fix for unnecessary buffered io fallback * tag 'for-5.10-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: convert data_seqcount to seqcount_mutex_t btrfs: don't fallback to buffered read if we don't need to btrfs: add a helper to read the tree_root commit root for backref lookup btrfs: drop the path before adding qgroup items when enabling qgroups btrfs: fix readahead hang and use-after-free after removing a device btrfs: fix use-after-free on readahead extent after failure to create it btrfs: tree-checker: validate number of chunk stripes and parity btrfs: tree-checker: fix incorrect printk format btrfs: drop the path before adding block group sysfs files btrfs: fix relocation failure due to race with fallocate commit aab6bf505a8ea63ab3301c42d819e2e2b70cce7d Merge: 11ad2a73de10b ec9d78070de98 Author: Linus Torvalds Date: Fri Oct 30 13:16:03 2020 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "The diffstat is a bit spread out thanks to an invasive CPU erratum workaround which missed the merge window and also a bunch of fixes to the recently added MTE selftests. - Fixes to MTE kselftests - Fix return code from KVM Spectre-v2 hypercall - Build fixes for ld.lld and Clang's infamous integrated assembler - Ensure RCU is up and running before we use printk() - Workaround for Cortex-A77 erratum 1508412 - Fix linker warnings from unexpected ELF sections - Ensure PE/COFF sections are 64k aligned" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Change .weak to SYM_FUNC_START_WEAK_PI for arch/arm64/lib/mem*.S arm64/smp: Move rcu_cpu_starting() earlier arm64: Add workaround for Arm Cortex-A77 erratum 1508412 arm64: Add part number for Arm Cortex-A77 arm64: mte: Document that user PSTATE.TCO is ignored by kernel uaccess module: use hidden visibility for weak symbol references arm64: efi: increase EFI PE/COFF header padding to 64 KB arm64: vmlinux.lds: account for spurious empty .igot.plt sections kselftest/arm64: Fix check_user_mem test kselftest/arm64: Fix check_ksm_options test kselftest/arm64: Fix check_mmap_options test kselftest/arm64: Fix check_child_memory test kselftest/arm64: Fix check_tags_inclusion test kselftest/arm64: Fix check_buffer_fill test arm64: avoid -Woverride-init warning KVM: arm64: ARM_SMCCC_ARCH_WORKAROUND_1 doesn't return SMCCC_RET_NOT_REQUIRED arm64: vdso32: Allow ld.lld to properly link the VDSO commit 11ad2a73de10bbebb71199f29abdfc1c2e70d231 Merge: 65b55d4c85e59 0bcd0a2be8c9e Author: Linus Torvalds Date: Fri Oct 30 13:11:46 2020 -0700 Merge tag 'asm-generic-fixes-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic fix from Arnd Bergmann: "One small bugfix, fixing a build regression for RISC-V" * tag 'asm-generic-fixes-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: mark __{get,put}_user_fn as __always_inline commit 65b55d4c85e59e0cc946c1ac171ff59bc6e1d7f9 Merge: d2c4d6e8acc65 3d696f42c7f4b Author: Linus Torvalds Date: Fri Oct 30 13:06:07 2020 -0700 Merge tag 'arm-soc-fixes-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "This is a fairly large set of bug fixes on top of -rc1, as most of them were ready but didn't quite make it into the last-minute pull requests for the merge window. Allwinner: - fix for incorrect CPU overtemperature limit Amlogic: - multiple smaller DT bugfixes, and missing device nodes Marvell EBU: - add missing aliases for ethernet switch ports on espressobin board Marvell MMP: - DTC warning fix - bugfix for camera interface power-down NXP i.MX: - re-enable the GPIO driver on all defconfigs ST STM32MP1: - fix random crashes from incorrect voltage settings Synaptics Berlin: - enable the correct hardware timer driver Texas Instruments K2G: - fix a boot regression in the power domain code TEE drivers: - fix regression in TEE "login" method SCMI drivers: - multiple code fixes for corner cases in newly added code MAINTAINERS file: - move Kukjin Kim and Sangbeom Kim to credits (used to work on Samsung Exynos) - Masahiro Yamada is stepping down as Uniphier maintainer I did not include a series of patches that work around a regression caused by a bugfix in an ethernet phy driver that resulted in an inadvertent DT binding change. This is still under discussion" * tag 'arm-soc-fixes-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (31 commits) soc: ti: ti_sci_pm_domains: check for proper args count in xlate ARM: dts: stm32: Describe Vin power supply on stm32mp157c-edx board ARM: dts: stm32: Describe Vin power supply on stm32mp15xx-dkx board ARM: multi_v5_defconfig: Select CONFIG_GPIO_MXC ARM: imx_v4_v5_defconfig: Select CONFIG_GPIO_MXC ARM: dts: mmp2-olpc-xo-1-75: Use plural form of "-gpios" ARM: dts: mmp3: Add power domain for the camera arm64: berlin: Select DW_APB_TIMER_OF dt-bindings: sram: sunxi-sram: add V3s compatible string MAINTAINERS: Move Sangbeom Kim to credits MAINTAINERS: Move Kukjin Kim to credits MAINTAINERS: step down as maintainer of UniPhier SoCs and Denali driver ARM: multi_v7_defconfig: Build in CONFIG_GPIO_MXC by default ARM: imx_v6_v7_defconfig: Build in CONFIG_GPIO_MXC by default arm64: defconfig: Build in CONFIG_GPIO_MXC by default arm64: dts: meson: odroid-n2 plus: fix vddcpu_a pwm ARM: dts: meson8: remove two invalid interrupt lines from the GPU node arm64: dts: amlogic: add missing ethernet reset ID firmware: arm_scmi: Fix duplicate workqueue name firmware: arm_scmi: Fix locking in notifications ... commit d2c4d6e8acc6548a3ddae0f2e8d8120ead09ad80 Merge: a5a16050d78dd e510785f8aca4 Author: Linus Torvalds Date: Fri Oct 30 13:00:10 2020 -0700 Merge tag 'pnp-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull PNP fix from Rafael Wysocki: "Make function names in kerneldoc comments match the actual names of the functions that they correspond to (Mauro Carvalho Chehab)" * tag 'pnp-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PNP: fix kernel-doc markups commit a5a16050d78dd4a8a5a2a6614e64f76d59ef8a2e Merge: ee176906dc882 99aed9227073f Author: Linus Torvalds Date: Fri Oct 30 12:53:49 2020 -0700 Merge tag 'devprop-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework fixes from Rafael Wysocki: "Fix the secondary firmware node handling while manipulating the primary firmware node for a given device (Andy Shevchenko)" * tag 'devprop-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: Don't clear secondary pointer for shared primary firmware node device property: Keep secondary firmware node secondary by type commit ee176906dc882ba6223d834ae61790e7550515fd Merge: 8843f40550dd9 8f7304bb9113c Author: Linus Torvalds Date: Fri Oct 30 12:48:48 2020 -0700 Merge tag 'acpi-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix three assorted minor issues. Specifics: - Eliminate compiler warning emitted when building the ACPI dock driver (Arnd Bergmann). - Drop lid_init_state quirk for Acer SW5-012 that is not needed any more after recent changes (Hans de Goede). - Fix "missing minus" typo in the NFIT parsing code (Zhang Qilong)" * tag 'acpi-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: button: Drop no longer necessary Acer SW5-012 lid_init_state quirk ACPI: NFIT: Fix comparison to '-ENXIO' ACPI: dock: fix enum-conversion warning commit 8843f40550dd9f11ff39b6fee37d167516dc2158 Merge: 88098fd61b7e5 dea47cf45a7f9 Author: Linus Torvalds Date: Fri Oct 30 12:45:04 2020 -0700 Merge tag 'pm-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix a few issues related to running intel_pstate in the passive mode with HWP enabled, correct the handling of the max_cstate module parameter in intel_idle and make a few janitorial changes. Specifics: - Modify Kconfig to prevent configuring either the "conservative" or the "ondemand" governor as the default cpufreq governor if intel_pstate is selected, in which case "schedutil" is the default choice for the default governor setting (Rafael Wysocki). - Modify the cpufreq core, intel_pstate and the schedutil governor to avoid missing updates of the HWP max limit when intel_pstate operates in the passive mode with HWP enabled (Rafael Wysocki). - Fix max_cstate module parameter handling in intel_idle for processor models with C-state tables coming from ACPI (Chen Yu). - Clean up assorted pieces of power management code (Jackie Zamow, Tom Rix, Zhang Qilong)" * tag 'pm-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: schedutil: Always call driver if CPUFREQ_NEED_UPDATE_LIMITS is set cpufreq: Introduce cpufreq_driver_test_flags() cpufreq: speedstep: remove unneeded semicolon PM: sleep: fix typo in kernel/power/process.c intel_idle: Fix max_cstate for processor models without C-state tables cpufreq: intel_pstate: Avoid missing HWP max updates in passive mode cpufreq: Introduce CPUFREQ_NEED_UPDATE_LIMITS driver flag cpufreq: Avoid configuring old governors as default with intel_pstate cpufreq: e_powersaver: remove unreachable break commit 88098fd61b7e52e1f78668b6f1f07d39ca67301f Merge: 7ba4d86750904 011fde48394b7 Author: Linus Torvalds Date: Fri Oct 30 11:04:11 2020 -0700 Merge tag 'mmc-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC host fixes from Ulf Hansson: - sdhci: Fix performance regression with auto CMD auto select - sdhci-of-esdhc: Fix initialization for eMMC HS400 mode - sdhci-of-esdhc: Fix timeout bug for tuning commands * tag 'mmc-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-of-esdhc: make sure delay chain locked for HS400 mmc: sdhci-of-esdhc: set timeout to max before tuning mmc: sdhci: Use Auto CMD Auto Select only when v4_mode is true commit 7ba4d8675090480e64388f4669271c03123072b2 Merge: 07e0887302450 7babd126327b8 Author: Linus Torvalds Date: Fri Oct 30 10:54:44 2020 -0700 Merge tag 'drm-fixes-2020-10-30-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "A busier rc2 than normal, have larger sets of fixes for amdgpu + nouveau, along with some i915, docs, core, panel, sun4i, v3d, vc4 fixes. Nothing spooky though or pumpkin related. docs: - kernel doc fixes core: - fix shmem helpers dma-buf mmap bug amdgpu: - Add new navi1x PCI ID - GPUVM reserved area fixes - Misc display fixes - Fix bad interactions between display code and CONFIG_KGDB - Fixes for SMU manual fan control and i2c nouveau: - endian regression fix for old gpus - buffer object refcount fix - uapi start/end alignment fix - display notifier fix - display clock checking fixes i915: - Fix max memory region size calculation - Restore ILK-M RPS support, restoring performance - Reject 90/270 degreerotated initial fbs panel: - mantix reset fixes sun4i: - scalar fix vc4: - hdmi audio fixes v3d: - fix double free" * tag 'drm-fixes-2020-10-30-1' of git://anongit.freedesktop.org/drm/drm: (42 commits) drm/nouveau/kms/nv50-: Fix clock checking algorithm in nv50_dp_mode_valid() drm/nouveau/kms/nv50-: Get rid of bogus nouveau_conn_mode_valid() drm/nouveau/device: fix changing endianess code to work on older GPUs drm/nouveau/gem: fix "refcount_t: underflow; use-after-free" drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps drm/nouveau/nouveau: fix the start/end range for migration drm/i915: Reject 90/270 degree rotated initial fbs drm/i915: Restore ILK-M RPS support drm/i915/region: fix max size calculation drm/vc4: Rework the structure conversion functions drm/vc4: hdmi: Add a name to the codec DAI component drm/shme-helpers: Fix dma_buf_mmap forwarding bug drm/vc4: hdmi: Avoid sleeping in atomic context drm/amdgpu/pm: fix the fan speed in fan1_input in manual mode for navi1x drm/amd/pm: fix the wrong fan speed in fan1_input drm/amdgpu/swsmu: drop smu i2c bus on navi1x drm/vc4: drv: Add error handding for bind drm: drm_print.h: fix kernel-doc markups drm: kernel-doc: drm_dp_helper.h: fix a typo drm: kernel-doc: add description for a new function parameter ... commit d383b3146d805a743658225c8973f5d38c6fedf4 Author: Takashi Iwai Date: Fri Oct 30 16:14:14 2020 +0100 KVM: x86: Fix NULL dereference at kvm_msr_ignored_check() The newly introduced kvm_msr_ignored_check() tries to print error or debug messages via vcpu_*() macros, but those may cause Oops when NULL vcpu is passed for KVM_GET_MSRS ioctl. Fix it by replacing the print calls with kvm_*() macros. (Note that this will leave vcpu argument completely unused in the function, but I didn't touch it to make the fix as small as possible. A clean up may be applied later.) Fixes: 12bc2132b15e ("KVM: X86: Do the same ignore_msrs check for feature msrs") BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1178280 Cc: Signed-off-by: Takashi Iwai Message-Id: <20201030151414.20165-1-tiwai@suse.de> Signed-off-by: Paolo Bonzini commit 8a967d655e406c8a63744a60b221071fad9a736b Author: Paolo Bonzini Date: Fri Oct 30 13:39:55 2020 -0400 KVM: x86: replace static const variables with macros Even though the compiler is able to replace static const variables with their value, it will warn about them being unused when Linux is built with W=1. Use good old macros instead, this is not C++. Signed-off-by: Paolo Bonzini commit 699116c45e155925638677a74625ac9e9e046dc1 Merge: 5a169bf04cd2b 22f553842b14a Author: Paolo Bonzini Date: Fri Oct 30 13:25:09 2020 -0400 Merge tag 'kvmarm-fixes-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 5.10, take #1 - Force PTE mapping on device pages provided via VFIO - Fix detection of cacheable mapping at S2 - Fallback to PMD/PTE mappings for composite huge pages - Fix accounting of Stage-2 PGD allocation - Fix AArch32 handling of some of the debug registers - Simplify host HYP entry - Fix stray pointer conversion on nVHE TLB invalidation - Fix initialization of the nVHE code - Simplify handling of capabilities exposed to HYP - Nuke VCPUs caught using a forbidden AArch32 EL0 commit 9efac6ce7f621c405d49a091e3e367be4250a27a Author: Christophe Kerello Date: Fri Oct 30 14:33:39 2020 +0100 mtd: rawnand: stm32_fmc2: fix broken ECC Since commit d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits"), ECC are broken in FMC2 driver in case of nand-ecc-step-size and nand-ecc-strength are not set in the device tree. To avoid this issue, the default settings are now set in stm32_fmc2_nfc_attach_chip function. Signed-off-by: Christophe Kerello Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1604064819-26861-1-git-send-email-christophe.kerello@st.com commit 2b94f5266c8452c01291f3b0370fcad28a357746 Author: Marek Szyprowski Date: Thu Oct 29 19:50:11 2020 +0100 net: stmmac: Fix channel lock initialization Commit 0366f7e06a6b ("net: stmmac: add ethtool support for get/set channels") refactored channel initialization, but during that operation, the spinlock initialization got lost. Fix this. This fixes the following lockdep warning: meson8b-dwmac ff3f0000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 331 Comm: kworker/1:2H Not tainted 5.9.0-rc3+ #1858 Hardware name: Hardkernel ODROID-N2 (DT) Workqueue: kblockd blk_mq_run_work_fn Call trace: dump_backtrace+0x0/0x1d0 show_stack+0x14/0x20 dump_stack+0xe8/0x154 register_lock_class+0x58c/0x590 __lock_acquire+0x7c/0x1790 lock_acquire+0xf4/0x440 _raw_spin_lock_irqsave+0x80/0xb0 stmmac_tx_timer+0x4c/0xb0 [stmmac] call_timer_fn+0xc4/0x3e8 run_timer_softirq+0x2b8/0x6c0 efi_header_end+0x114/0x5f8 irq_exit+0x104/0x110 __handle_domain_irq+0x60/0xb8 gic_handle_irq+0x58/0xb0 el1_irq+0xbc/0x180 _raw_spin_unlock_irqrestore+0x48/0x90 mmc_blk_rw_wait+0x70/0x160 mmc_blk_mq_issue_rq+0x510/0x830 mmc_mq_queue_rq+0x13c/0x278 blk_mq_dispatch_rq_list+0x2a0/0x698 __blk_mq_do_dispatch_sched+0x254/0x288 __blk_mq_sched_dispatch_requests+0x190/0x1d8 blk_mq_sched_dispatch_requests+0x34/0x70 __blk_mq_run_hw_queue+0xcc/0x148 blk_mq_run_work_fn+0x20/0x28 process_one_work+0x2a8/0x718 worker_thread+0x48/0x460 kthread+0x134/0x160 ret_from_fork+0x10/0x1c Fixes: 0366f7e06a6b ("net: stmmac: add ethtool support for get/set channels") Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20201029185011.4749-1-m.szyprowski@samsung.com Signed-off-by: Jakub Kicinski commit 785ff20bce2d9f08f4a9299a5e59e2272f0ee1e9 Author: Wong Vee Khee Date: Thu Oct 29 17:32:28 2020 +0800 stmmac: intel: Fix kernel panic on pci probe The commit "stmmac: intel: Adding ref clock 1us tic for LPI cntr" introduced a regression which leads to the kernel panic duing loading of the dwmac_intel module. Move the code block after pci resources is obtained. Fixes: b4c5f83ae3f3 ("stmmac: intel: Adding ref clock 1us tic for LPI cntr") Cc: Voon Weifeng Signed-off-by: Wong Vee Khee Link: https://lore.kernel.org/r/20201029093228.1741-1-vee.khee.wong@intel.com Signed-off-by: Jakub Kicinski commit d6a076d68c6b5d6a5800f3990a513facb7016dea Author: Claudiu Manoil Date: Tue Oct 20 20:36:05 2020 +0300 gianfar: Account for Tx PTP timestamp in the skb headroom When PTP timestamping is enabled on Tx, the controller inserts the Tx timestamp at the beginning of the frame buffer, between SFD and the L2 frame header. This means that the skb provided by the stack is required to have enough headroom otherwise a new skb needs to be created by the driver to accommodate the timestamp inserted by h/w. Up until now the driver was relying on the second option, using skb_realloc_headroom() to create a new skb to accommodate PTP frames. Turns out that this method is not reliable, as reallocation of skbs for PTP frames along with the required overhead (skb_set_owner_w, consume_skb) is causing random crashes in subsequent skb_*() calls, when multiple concurrent TCP streams are run at the same time on the same device (as seen in James' report). Note that these crashes don't occur with a single TCP stream, nor with multiple concurrent UDP streams, but only when multiple TCP streams are run concurrently with the PTP packet flow (doing skb reallocation). This patch enforces the first method, by requesting enough headroom from the stack to accommodate PTP frames, and so avoiding skb_realloc_headroom() & co, and the crashes no longer occur. There's no reason not to set needed_headroom to a large enough value to accommodate PTP frames, so in this regard this patch is a fix. Reported-by: James Jurack Fixes: bee9e58c9e98 ("gianfar:don't add FCB length to hard_header_len") Signed-off-by: Claudiu Manoil Link: https://lore.kernel.org/r/20201020173605.1173-1-claudiu.manoil@nxp.com Signed-off-by: Jakub Kicinski commit d145c9031325fed963a887851d9fa42516efd52b Author: Claudiu Manoil Date: Thu Oct 29 10:10:56 2020 +0200 gianfar: Replace skb_realloc_headroom with skb_cow_head for PTP When PTP timestamping is enabled on Tx, the controller inserts the Tx timestamp at the beginning of the frame buffer, between SFD and the L2 frame header. This means that the skb provided by the stack is required to have enough headroom otherwise a new skb needs to be created by the driver to accommodate the timestamp inserted by h/w. Up until now the driver was relying on skb_realloc_headroom() to create new skbs to accommodate PTP frames. Turns out that this method is not reliable in this context at least, as skb_realloc_headroom() for PTP frames can cause random crashes, mostly in subsequent skb_*() calls, when multiple concurrent TCP streams are run at the same time with the PTP flow on the same device (as seen in James' report). I also noticed that when the system is loaded by sending multiple TCP streams, the driver receives cloned skbs in large numbers. skb_cow_head() instead proves to be stable in this scenario, and not only handles cloned skbs too but it's also more efficient and widely used in other drivers. The commit introducing skb_realloc_headroom in the driver goes back to 2009, commit 93c1285c5d92 ("gianfar: reallocate skb when headroom is not enough for fcb"). For practical purposes I'm referencing a newer commit (from 2012) that brings the code to its current structure (and fixes the PTP case). Fixes: 9c4886e5e63b ("gianfar: Fix invalid TX frames returned on error queue when time stamping") Reported-by: James Jurack Suggested-by: Jakub Kicinski Signed-off-by: Claudiu Manoil Link: https://lore.kernel.org/r/20201029081057.8506-1-claudiu.manoil@nxp.com Signed-off-by: Jakub Kicinski commit 1a39340865ce505a029b37aeb47a3e4c8db5f6c6 Author: Peter Zijlstra Date: Tue Oct 27 13:48:34 2020 +0100 lockdep: Fix nr_unused_locks accounting Chris reported that commit 24d5a3bffef1 ("lockdep: Fix usage_traceoverflow") breaks the nr_unused_locks validation code triggered by /proc/lockdep_stats. By fully splitting LOCK_USED and LOCK_USED_READ it becomes a bad indicator for accounting nr_unused_locks; simplyfy by using any first bit. Fixes: 24d5a3bffef1 ("lockdep: Fix usage_traceoverflow") Reported-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Tested-by: Chris Wilson Link: https://lkml.kernel.org/r/20201027124834.GL2628@hirez.programming.kicks-ass.net commit d48e3850030623e1c20785bceaaf78f916d0b1a3 Author: Peter Zijlstra Date: Mon Oct 26 16:22:56 2020 +0100 locking/lockdep: Remove more raw_cpu_read() usage I initially thought raw_cpu_read() was OK, since if it is !0 we have IRQs disabled and can't get migrated, so if we get migrated both CPUs must have 0 and it doesn't matter which 0 we read. And while that is true; it isn't the whole store, on pretty much all architectures (except x86) this can result in computing the address for one CPU, getting migrated, the old CPU continuing execution with another task (possibly setting recursion) and then the new CPU reading the value of the old CPU, which is no longer 0. Similer to: baffd723e44d ("lockdep: Revert "lockdep: Use raw_cpu_*() for per-cpu variables"") Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201026152256.GB2651@hirez.programming.kicks-ass.net commit 22f553842b14a1289c088a79a67fb479d3fa2a4e Author: Qais Yousef Date: Tue Oct 27 21:51:13 2020 +0000 KVM: arm64: Handle Asymmetric AArch32 systems On a system without uniform support for AArch32 at EL0, it is possible for the guest to force run AArch32 at EL0 and potentially cause an illegal exception if running on a core without AArch32. Add an extra check so that if we catch the guest doing that, then we prevent it from running again by resetting vcpu->arch.target and return ARM_EXCEPTION_IL. We try to catch this misbehaviour as early as possible and not rely on an illegal exception occuring to signal the problem. Attempting to run a 32bit app in the guest will produce an error from QEMU if the guest exits while running in AArch32 EL0. Tested on Juno by instrumenting the host to fake asym aarch32 and instrumenting KVM to make the asymmetry visible to the guest. [will: Incorporated feedback from Marc] Signed-off-by: Qais Yousef Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: James Morse Cc: Marc Zyngier Link: https://lore.kernel.org/r/20201021104611.2744565-2-qais.yousef@arm.com Link: https://lore.kernel.org/r/20201027215118.27003-2-will@kernel.org commit 8f7304bb9113c95b256d3aa79a884b4c60a806e1 Merge: 85f971b65a692 136a4dfe87cd3 be0e97526455f Author: Rafael J. Wysocki Date: Fri Oct 30 16:31:20 2020 +0100 Merge branches 'acpi-button' and 'acpi-dock' * acpi-button: ACPI: button: Drop no longer necessary Acer SW5-012 lid_init_state quirk * acpi-dock: ACPI: dock: fix enum-conversion warning commit dea47cf45a7f9bb94684830c47d4b259d5f8d6af Merge: d1e7c2996e988 4e0ba5577dba6 4d4ce8053bfac Author: Rafael J. Wysocki Date: Fri Oct 30 16:30:14 2020 +0100 Merge branches 'pm-cpuidle' and 'pm-sleep' * pm-cpuidle: intel_idle: Fix max_cstate for processor models without C-state tables * pm-sleep: PM: sleep: fix typo in kernel/power/process.c commit 1e6114f51f9d4090390fcec2f5d67d8cc8dc4bfc Author: Greg Ungerer Date: Wed Oct 28 15:22:32 2020 +1000 net: fec: fix MDIO probing for some FEC hardware blocks Some (apparently older) versions of the FEC hardware block do not like the MMFR register being cleared to avoid generation of MII events at initialization time. The action of clearing this register results in no future MII events being generated at all on the problem block. This means the probing of the MDIO bus will find no PHYs. Create a quirk that can be checked at the FECs MII init time so that the right thing is done. The quirk is set as appropriate for the FEC hardware blocks that are known to need this. Fixes: f166f890c8f0 ("net: ethernet: fec: Replace interrupt driven MDIO with polled IO") Signed-off-by: Greg Ungerer Acked-by: Fugang Duan Tested-by: Andrew Lunn Tested-by: Clemens Gruber Link: https://lore.kernel.org/r/20201028052232.1315167-1-gerg@linux-m68k.org Signed-off-by: Jakub Kicinski commit 9e7c5b396e98eed859d3dd1ab235912a296faab5 Author: Alexander Ovechkin Date: Thu Oct 29 20:10:12 2020 +0300 ip6_tunnel: set inner ipproto before ip6_tnl_encap ip6_tnl_encap assigns to proto transport protocol which encapsulates inner packet, but we must pass to set_inner_ipproto protocol of that inner packet. Calling set_inner_ipproto after ip6_tnl_encap might break gso. For example, in case of encapsulating ipv6 packet in fou6 packet, inner_ipproto would be set to IPPROTO_UDP instead of IPPROTO_IPV6. This would lead to incorrect calling sequence of gso functions: ipv6_gso_segment -> udp6_ufo_fragment -> skb_udp_tunnel_segment -> udp6_ufo_fragment instead of: ipv6_gso_segment -> udp6_ufo_fragment -> skb_udp_tunnel_segment -> ip6ip6_gso_segment Fixes: 6c11fbf97e69 ("ip6_tunnel: add MPLS transmit support") Signed-off-by: Alexander Ovechkin Link: https://lore.kernel.org/r/20201029171012.20904-1-ovov@yandex-team.ru Signed-off-by: Jakub Kicinski commit 65ff5cd04551daf2c11c7928e48fc3483391c900 Author: Ming Lei Date: Fri Oct 30 10:42:53 2020 +0800 blk-mq: mark flush request as IDLE in flush_end_io() Mark flush request as IDLE in its .end_io(), aligning it with how normal requests behave. The flush request stays in in-flight tags if we're not using an IO scheduler, so we need to change its state into IDLE. Otherwise, we will hang in blk_mq_tagset_wait_completed_request() during error recovery because flush the request state is kept as COMPLETED. Reported-by: Yi Zhang Signed-off-by: Ming Lei Tested-by: Yi Zhang Cc: Chao Leng Cc: Sagi Grimberg Signed-off-by: Jens Axboe commit d1b35d66f48f926062dc81134ebd8ab93d71e61d Merge: 80624263fa289 fce52ad348328 Author: Greg Kroah-Hartman Date: Fri Oct 30 13:25:58 2020 +0100 Merge tag 'icc-5.10-rc2' of https://git.linaro.org/people/georgi.djakov/linux into char-misc-linus Georgi writes: interconnect fixes for v5.10 This contains one core fix and a few driver fixes. - Fix the core to perform also aggregation when setting the initial bandwidth with sync_state. - Fixes in some drivers to make sure the correct sequence is used for initialization when we use sync_state. - Fix in the sdm845 driver to prevent a board hang that was hit when bandwidth scaling for display and multimedia was enabled. Signed-off-by: Georgi Djakov * tag 'icc-5.10-rc2' of https://git.linaro.org/people/georgi.djakov/linux: interconnect: qcom: use icc_sync state for sm8[12]50 interconnect: qcom: Ensure that the floor bandwidth value is enforced interconnect: qcom: sc7180: Init BCMs before creating the nodes interconnect: qcom: sdm845: Init BCMs before creating the nodes interconnect: Aggregate before setting initial bandwidth interconnect: qcom: sdm845: Enable keepalive for the MM1 BCM commit 2fcce37a3d2f2f3d7fa36aad2b71cbaca135ffd4 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:58 2020 +0100 scripts: get_abi.pl: assume ReST format by default All ABI files are now compatible with ReST format. So, change the script default to assume that the ABI source files are compatible with ReST. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4b0af257010570e0e917d82498e42992bec5e173.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 26a07553041eb728678348a2bb0cd703ccd11083 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:57 2020 +0100 docs: ABI: sysfs-class-led-trigger-pattern: remove hw_pattern duplication The ABI files are supposed to be unique. Yet, in the specific case of hw_pattern, there are some duplicated entries as warned by scripts/get_abi.pl: Warning: /sys/class/leds//hw_pattern is defined 3 times: Documentation/ABI/testing/sysfs-class-led-trigger-pattern:14 Documentation/ABI/testing/sysfs-class-led-driver-sc27xx:0 Documentation/ABI/testing/sysfs-class-led-driver-el15203000:0 Drop the duplication from the ABI files, moving the specific definitions to files inside Documentation/leds. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/038e57881550550b298e598f8f9b7f20515cbe15.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit bd6e8441c2fc4d653d115516f55b1700284bc42d Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:56 2020 +0100 docs: ABI: sysfs-class-backlight: unify ABI documentation Both adp8860 and adp8870 define some extensions to the backlight class. This causes warnings: Warning: /sys/class/backlight//ambient_light_level is defined 2 times: /sys/class/backlight//ambient_light_level:8 /sys/class/backlight//ambient_light_level:30 Warning: /sys/class/backlight//ambient_light_zone is defined 2 times: /sys/class/backlight//ambient_light_zone:18 /sys/class/backlight//ambient_light_zone:40 As ABI definitions shouldn't be duplicated. Unfortunately, the ABI is dependent on the specific device features. As such, ambient_light_level range is somewhat different among the supported devices. The ambient_light_zone is even worse: the meanings of each preset are different, and there's no ABI to retrieve the supported types nor their meanins. Unfortunately, it is too late to fix it without causing regressions, as this has been used since Kernel v2.6.35. Rewrite those ABI documentation using the current documentation as a reference, and double-checking at the datasheets: https://www.analog.com/media/en/technical-documentation/data-sheets/ADP8870.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/ADP8860.pdf in order to properly document the differences between those two drivers. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/342195ad5a819d9bcfcebc133c77ab69b4211672.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1b3023ef54d4fc8e8a034d2178ef80bddd7ba206 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:55 2020 +0100 docs: ABI: sysfs-c2port: remove a duplicated entry As warned by scripts/get_abi.pl: Warning: /sys/class/c2port/c2portX/flash_erase is defined 2 times: Documentation/ABI/testing/sysfs-c2port:60 Documentation/ABI/testing/sysfs-c2port:68 This entry was added twice at the same patch. Probalby a cut-and paste issue. Fixes: 4e17e1db9647 ("Add c2 port support") Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4ea2b31ddc76161fbae004f2f2ed91dfb757703f.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9e0b29adfb3323ffd250b74373c68209e291b8e5 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:54 2020 +0100 docs: ABI: sysfs-class-power: unify duplicated properties The ABI is not supposed to have duplicated entries, as warned by get_abi.pl: $ ./scripts/get_abi.pl validate 2>&1|grep sysfs-class-power Warning: /sys/class/power_supply//current_avg is defined 2 times: Documentation/ABI/testing/sysfs-class-power:108 Documentation/ABI/testing/sysfs-class-power:391 Warning: /sys/class/power_supply//current_max is defined 2 times: Documentation/ABI/testing/sysfs-class-power:121 Documentation/ABI/testing/sysfs-class-power:404 Warning: /sys/class/power_supply//current_now is defined 2 times: Documentation/ABI/testing/sysfs-class-power:130 Documentation/ABI/testing/sysfs-class-power:414 Warning: /sys/class/power_supply//temp is defined 2 times: Documentation/ABI/testing/sysfs-class-power:281 Documentation/ABI/testing/sysfs-class-power:493 Warning: /sys/class/power_supply//temp_alert_max is defined 2 times: Documentation/ABI/testing/sysfs-class-power:291 Documentation/ABI/testing/sysfs-class-power:505 Warning: /sys/class/power_supply//temp_alert_min is defined 2 times: Documentation/ABI/testing/sysfs-class-power:306 Documentation/ABI/testing/sysfs-class-power:521 Warning: /sys/class/power_supply//temp_max is defined 2 times: Documentation/ABI/testing/sysfs-class-power:322 Documentation/ABI/testing/sysfs-class-power:537 Warning: /sys/class/power_supply//temp_min is defined 2 times: Documentation/ABI/testing/sysfs-class-power:333 Documentation/ABI/testing/sysfs-class-power:547 Warning: /sys/class/power_supply//voltage_max is defined 2 times: Documentation/ABI/testing/sysfs-class-power:356 Documentation/ABI/testing/sysfs-class-power:571 Warning: /sys/class/power_supply//voltage_min is defined 2 times: Documentation/ABI/testing/sysfs-class-power:367 Documentation/ABI/testing/sysfs-class-power:581 Warning: /sys/class/power_supply//voltage_now is defined 2 times: Documentation/ABI/testing/sysfs-class-power:378 Documentation/ABI/testing/sysfs-class-power:591 Yet, both USB and Battery share a common set of charging-related properties. Unify the entries for such properties in order to avoid duplication, while preserving the battery and USB-specific data properly documented. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/bcdf5f76326ea48a990a7cac612af216c387537d.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit edef2fa29739172643dbe9f44fb38d23793816d6 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:53 2020 +0100 docs: ABI: unify /sys/class/leds//brightness documentation This ABI is defined twice, one for normal leds and another one for multicolor ones. Ensure that just one definition is there at ABI. Acked-by: Pavel Machek Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/1115022e7f172b19ee8610f2ad28cc2f0ca93592.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 637ae1fb5dca38649eed31f943114486bacce416 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:52 2020 +0100 docs: ABI: stable: remove a duplicated documentation Perhaps due to a wrong cut-and-paste, this entry: What: /sys/bus/vmbus/devices//channels//cpu was added twice by the same patch, one following the other. Remove the duplication. Fixes: c2e5df616e1a ("vmbus: add per-channel sysfs info") Acked-by: Wei Liu Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/091e8de5543c280ceb47edcb3ab6d0e9f3fa085b.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4119f0dfbd27722216352a7349930a4b54032fe5 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:51 2020 +0100 docs: ABI: change read/write attributes Unfortunately, (R) and (W) are valid markups for enumerated lists, as described at: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#enumerated-lists So, we ned to replace them by: (R) -> (Read) (W) -> (Write) As otherwise, (R) will be displayed as R., with is not what it is desired. There's no need to touch (RO) and (RW). Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6e81ad8064f3ed4f8dc265086fdf1c618043f935.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 54a19b4d3fe0fa0a31b46cd60951e8177cac25fa Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:50 2020 +0100 docs: ABI: cleanup several ABI documents There are some ABI documents that, while they don't generate any warnings, they have issues when parsed by get_abi.pl script on its output result. Address them, in order to provide a clean output. Reviewed-by: Tom Rix # for fpga-manager Reviewed-By: Kajol Jain # for sysfs-bus-event_source-devices-hv_gpci and sysfs-bus-event_source-devices-hv_24x7 Acked-by: Jonathan Cameron #for IIO Acked-by: Oded Gabbay # for Habanalabs Acked-by: Vaibhav Jain # for sysfs-bus-papr-pmem Acked-by: Cezary Rojewski # for catpt Acked-by: Suzuki K Poulose Acked-by: Ilya Dryomov # for rbd Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5bc78e5b68ed1e9e39135173857cb2e753be868f.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit ed8c39d43983d19f181ff47af0374c4e252f84bd Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:49 2020 +0100 docs: ABI: sysfs-bus-nvdimm: use the right format for ABI This ABI is not following the format described at ABI/README. Use it, filling in the blanks with the git log that added it, and using the current e-mail from Dan. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9ec379cbf6dcf65ce3039c3671baf7bcaea532f4.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 97f26cab455e1868edb0b74ce714dcb52444b63b Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:48 2020 +0100 docs: ABI: vdso: use the right format for ABI This ABI is not following the format described at ABI/README. Use it, filling in the blanks with the git log that added it, and using the current e-mail from Andy. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/28c7cf3a71e15fb7499b70ec8f38c2efaaf4add2.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 002a9c2f99c77677635d2ab2e906fc6ba3f7ab67 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:47 2020 +0100 docs: ABI: fix syntax to be parsed using ReST notation There are a number of new changes at the ABI files that cause them to produce warnings when generating ABI output. Fix them. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/55a89f423cf122982c462d257722e44d6ece4b36.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit b1faa368bb202649259fd8afed78bcc31e58e293 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:46 2020 +0100 docs: ABI: convert testing/configfs-acpi to ReST There are some problems with this file when a ReST content is produced. Fix it. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/f56daf94b80f1051438e8c787ba04552adb66e67.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 75442fb0ccaacddf1654a5304401a9f556c61004 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:45 2020 +0100 docs: Kconfig/Makefile: add a check for broken ABI files The files under Documentation/ABI should follow the syntax as defined at Documentation/ABI/README. Allow checking if they're following the syntax by running the ABI parser script on COMPILE_TEST. With that, when there's a problem with a file under Documentation/ABI, it would produce a warning like: Warning: file ./Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats#14: What '/sys/bus/pci/devices//aer_stats/aer_rootport_total_err_cor' doesn't have a description Warning: file ./Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats#21: What '/sys/bus/pci/devices//aer_stats/aer_rootport_total_err_fatal' doesn't have a description Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/57a38de85cb4b548857207cf1fc1bf1ee08613c9.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 50865d041eead18b110e589674ff91ffcd243e7e Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:44 2020 +0100 docs: abi-testing.rst: enable --rst-sources when building docs Now that ABI/testing documents were fixed, add --rst-sources to the ABI/testing too. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9242473fd3df785565bb6084b1b814cc15074fb2.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7832dea738dc3ea4a40860dc8b9f83ca1e092ab9 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:43 2020 +0100 docs: ABI: don't escape ReST-incompatible chars from obsolete and removed With just a single fix, the contents there can be parsed properly without the need to escape any ReST incompatible stuff. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/472f4574b6aa2ff4de5a819db1a4a5c9a34f5168.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit c12759ff2dd029ce74b026e6b6bc62060383a5a7 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:42 2020 +0100 docs: ABI: create a 2-depth index for ABI That helps to identify what ABI files are adding titles. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/e267b36ae7f32bab2a86f1da6b40bb3e62c877d4.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 642514df1bc1c6a9318b537670fdb55a6ee38e45 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:41 2020 +0100 docs: ABI: make it parse ABI/stable as ReST-compatible files Now that the stable ABI files are compatible with ReST, parse them without converting complex descriptions as literal blocks nor escaping special characters. Please notice that escaping special characters will probably be needed at descriptions, at least for the asterisk character. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/59ccbaa75ff05f23e701dd9a0bbe118e9343a553.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 906e4af9359dff0e24aeaf3b92226847cb5c8185 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:40 2020 +0100 docs: ABI: sysfs-uevent: make it compatible with ReST output - Replace " by ``, in order to use monospaced fonts; - mark literal blocks as such. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/63904cc9b6a8581c5fc2ea1dca5d925874c67372.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 34433332841de2787f903fcf7de8dc3e06780f4a Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:39 2020 +0100 docs: ABI: testing: make the files compatible with ReST output Some files over there won't parse well by Sphinx. Fix them. Acked-by: Jonathan Cameron # for IIO Acked-by: Fabrice Gasnier Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/58cf3c2d611e0197fb215652719ebd82ca2658db.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 98913408c5465ac477f80da7affe347b413edaa4 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:38 2020 +0100 docs: ABI: stable: make files ReST compatible Several entries at the stable ABI files won't parse if we pass them directly to the ReST output. Adjust them, in order to allow adding their contents as-is at the stable ABI book. Acked-by: Srinivas Kandagatla Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/467a0dfbcdf00db710a629d3fe4a2563750339d8.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit c7e45ea429c93139e85ddf3e0a8500a997f0f745 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:37 2020 +0100 docs: ABI: README: specify that files should be ReST compatible As we plan to remove the escaping code from the scripts/get_abi.pl, specify at the ABI README file that the content of the file should be ReST compatible. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/178a997070debd1953ba7d302c375948501d6193.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit a7ee04b3ef0d2b2514730928a04a112f04ffe7df Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:36 2020 +0100 docs: add ABI documentation to the admin-guide book As we don't want a generic Sphinx extension to execute commands, change the one proposed to Markus to call the abi_book.pl script. Use a script to parse the Documentation/ABI directory and output it at the admin-guide. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5651482b06500e69a1acdf92152f90a203e6521d.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3c543d29891a42b23c1f9a3a4788ae37fb94cce2 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:35 2020 +0100 docs: kernel_abi.py: Handle with a lazy Sphinx parser The Sphinx docutils parser is lazy: if the content is bigger than a certain number of lines, it silenlty stops parsing it, producing an incomplete content. This seems to be worse on newer Sphinx versions, like 2.0. So, change the logic to parse the contents per input file. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4659b60795739308e34d2d00c57ee0742a9cd2ab.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 997b7c8b4a95681dc75e6b720ad6f0ea705368c3 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:34 2020 +0100 docs: kernel_abi.py: use --enable-lineno for get_abi.pl Just like kernel-doc extension, we need to be able to identify what part of an imported document has issues, as reporting them as: get_abi.pl rest --dir $srctree/Documentation/ABI/obsolete --rst-source:1689: ERROR: Unexpected indentation. Makes a lot harder for someone to fix. It should be noticed that it the line which will be reported is the line where the "What:" definition is, and not the line with actually has an error. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d6155ab16fb7631f2fa8e7a770eae72f24bf7cc5.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit c830fa9a4d363caacc4ba3f63c06b9e967ad13a4 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:33 2020 +0100 docs: kernel_abi.py: make it compatible with Sphinx 1.7+ The same way kerneldoc.py needed changes to work with newer Sphinx, this script needs the same changes. While here, reorganize the include order to match kerneldoc.py. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/f2b25caef5db7738629773a03463908d3b39b83a.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 823830d4065bfb115b948c9f21e713a15d8d95ef Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:32 2020 +0100 docs: kernel_abi.py: fix UTF-8 support The parser breaks with UTF-8 characters with Sphinx 1.4. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9e7c8e3b0efaa1ae0536da6493ab438bd3f9fe58.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9ca876f96323934b8ace04b123531f05e3bed029 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:31 2020 +0100 docs: kernel_abi.py: add a script to parse ABI documentation The ABI documentation is special: it is not plain text files, but, instead, files with an strict format, as specified by Documentation/ABI/README. Add a parser for it. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/48abf1a410237e63f85354a8cd7027fdf25657bf.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 678a63f9888c28150e08cf6cb5fec9fbaf2bf81c Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:30 2020 +0100 docs: kernellog.py: add support for info() An extension may want to just inform about something. So, add support for it. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/0ddebd8677605d789d53433c8a5344c68da82a73.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 55e5414f2f8e31a8abbd95c43c24b69e83560a20 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:29 2020 +0100 scripts: get_abi.pl: auto-generate cross references There are several cross-references that can be automatically generated: - References to .rst files inside Documentation/ - References to other ABI files; - References to ABI symbols at /sys/*. Add a logic to automatically parse them and convert into cross references. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/abe756d4f94fb6ffcc3dd3902a766c7c3990ea89.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit c01d62d3fecb27f4c76a0e14b7e5afc15497a74b Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:28 2020 +0100 scripts: get_abi.pl: use bold font for ABI definitions As we're using tables, let's distinguish the ones used by ABI by using a bold font. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9ed645c2519169817379c1df5b8cf03828e92520.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit a4ea67bc65a15dadcda747c7f9d7b0e76e7c842a Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:27 2020 +0100 scripts: get_abi.pl: prevent duplicated file names The same filename may exist on multiple directories within ABI. Create separate entries at the internal database for each of them. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/ef760f68f54e132c4be52f0027189b4ba31554ec.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit a16ab14eb7a92bfebf71a8a9185c749de86851f4 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:26 2020 +0100 scripts: get_abi.pl: output users in ReST format Right now, the script only outputs Users on search. Print it also in ReST format. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/83def2a692c4c678f21ee6e76b66a54d2be1e796.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit c7ba333426bcf4d7330d3a0a768e8048a82e4cc7 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:25 2020 +0100 scripts: get_abi.pl: detect duplicated ABI definitions The ABI should define only once each What. The current script logic assumes that. However, that's not the case, currently: there are several symbols with a generic definition, and per-driver ones. Better handle such cases, by preserving the cross-references with the files that define them, but also track such cases, producing warnings, as they should be fixed. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d7a73b8b3aae5b2bff9279996ff9ca4cdfc89196.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 234948bf3d27e473ac8043d20dacda146beeb0cb Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:24 2020 +0100 scripts: get_abi.pl: cleanup ABI cross-reference logic Right now, the cross-references are generated on a single step, when doing ReST output. While this is nice optimization, it prevents auto-creating cross-references for ABI symbols. So, split it into a separate logic. While here, turn on Perl warnings, as it helps to debug problems inside the script. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/dbc97c8c2dfd877921f058134c35b2a8b1f8414b.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit f82a8a74ea81df22b1641ee56cf7195cc2a1bd0b Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:23 2020 +0100 scripts: get_abi.pl: improve its parser to better catch up indentation The original parser for indentation were relying on having just one description for each "what". However, that's not the case: there are a number of ABI symbols that got defined multiple times. Improve the parser for it to better handle descriptions if entries are duplicated. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/eb458bb30be0e5a89192d6057b2e8a7e910dbcb8.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 61439c4ada9fd0e4ce73aca81a71344380a3053b Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:22 2020 +0100 scripts: get_abi.pl: Allow optionally record from where a line came from The get_abi.pl reads a lot of files and can join them on a single output file. Store where each "What:" output came from, in order to be able to optionally display it. This is useful for the Sphinx extension, with can now be able to blame what ABI file has issues, and on what line the What: description with problems begin. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/befc387011c5e3c6febd285b7f27610e41c90260.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit e9bca8918e3d409f3b575d8db5591e422506c1ea Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:21 2020 +0100 scripts: get_abi.pl: fix parsing on ReST mode When the source ABI file is using ReST notation, the script should handle whitespaces and lines with care, as otherwise the file won't be properly recognized. Address the bugs that are on such part of the script. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5c22c54fbd0cda797b691d52c568be6d0d1079d8.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 11ce90a45d380f09213f128b76d68bb525186ad8 Author: Mauro Carvalho Chehab Date: Fri Oct 30 08:40:20 2020 +0100 scripts: get_abi.pl: change script to allow parsing in ReST mode Right now, several ABI files won't parse as ReST, as they contain severe violations to the spec, with makes the script to crash. So, the code has a sanity logic with escapes bad code and cleans tags that can cause Sphinx to crash. Add support for disabling this mode. Right now, as enabling rst-mode causes crash, it is disabled by default. Acked-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/34b691e3002e8987c24d851fe37640f95e506a92.1604042072.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit c0391b6ab810381df632677a1dcbbbbd63d05b6d Author: Pablo Neira Ayuso Date: Thu Oct 29 13:50:03 2020 +0100 netfilter: nf_tables: missing validation from the abort path If userspace does not include the trailing end of batch message, then nfnetlink aborts the transaction. This allows to check that ruleset updates trigger no errors. After this patch, invoking this command from the prerouting chain: # nft -c add rule x y fib saddr . oif type local fails since oif is not supported there. This patch fixes the lack of rule validation from the abort/check path to catch configuration errors such as the one above. Fixes: a654de8fdc18 ("netfilter: nf_tables: fix chain dependency validation") Signed-off-by: Pablo Neira Ayuso commit 46d6c5ae953cc0be38efd0e469284df7c4328cf8 Author: Jason A. Donenfeld Date: Thu Oct 29 03:56:06 2020 +0100 netfilter: use actual socket sk rather than skb sk when routing harder If netfilter changes the packet mark when mangling, the packet is rerouted using the route_me_harder set of functions. Prior to this commit, there's one big difference between route_me_harder and the ordinary initial routing functions, described in the comment above __ip_queue_xmit(): /* Note: skb->sk can be different from sk, in case of tunnels */ int __ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl, That function goes on to correctly make use of sk->sk_bound_dev_if, rather than skb->sk->sk_bound_dev_if. And indeed the comment is true: a tunnel will receive a packet in ndo_start_xmit with an initial skb->sk. It will make some transformations to that packet, and then it will send the encapsulated packet out of a *new* socket. That new socket will basically always have a different sk_bound_dev_if (otherwise there'd be a routing loop). So for the purposes of routing the encapsulated packet, the routing information as it pertains to the socket should come from that socket's sk, rather than the packet's original skb->sk. For that reason __ip_queue_xmit() and related functions all do the right thing. One might argue that all tunnels should just call skb_orphan(skb) before transmitting the encapsulated packet into the new socket. But tunnels do *not* do this -- and this is wisely avoided in skb_scrub_packet() too -- because features like TSQ rely on skb->destructor() being called when that buffer space is truely available again. Calling skb_orphan(skb) too early would result in buffers filling up unnecessarily and accounting info being all wrong. Instead, additional routing must take into account the new sk, just as __ip_queue_xmit() notes. So, this commit addresses the problem by fishing the correct sk out of state->sk -- it's already set properly in the call to nf_hook() in __ip_local_out(), which receives the sk as part of its normal functionality. So we make sure to plumb state->sk through the various route_me_harder functions, and then make correct use of it following the example of __ip_queue_xmit(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason A. Donenfeld Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit af8afcf1fdd5f365f70e2386c2d8c7a1abd853d7 Author: Jason A. Donenfeld Date: Thu Oct 29 03:56:05 2020 +0100 wireguard: selftests: check that route_me_harder packets use the right sk If netfilter changes the packet mark, the packet is rerouted. The ip_route_me_harder family of functions fails to use the right sk, opting to instead use skb->sk, resulting in a routing loop when used with tunnels. With the next change fixing this issue in netfilter, test for the relevant condition inside our test suite, since wireguard was where the bug was discovered. Reported-by: Chen Minqiang Signed-off-by: Jason A. Donenfeld Signed-off-by: Pablo Neira Ayuso commit dceababac29d1c53cbc1f7ddf6f688d2df01da87 Author: Pablo Neira Ayuso Date: Thu Oct 22 22:17:49 2020 +0200 netfilter: nftables: fix netlink report logic in flowtable and genid The netlink report should be sent regardless the available listeners. Fixes: 84d7fce69388 ("netfilter: nf_tables: export rule-set generation ID") Fixes: 3b49e2e94e6e ("netfilter: nf_tables: add flow table netlink frontend") Signed-off-by: Pablo Neira Ayuso commit 00c27a1df8ff5e99b383e2b4cbf947a4926fb534 Merge: 712da5fc4a66f e11d2bf271589 Author: Greg Kroah-Hartman Date: Fri Oct 30 11:46:49 2020 +0100 Merge tag 'usb-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: 4 bug fixes for Cadence 3 driver. The biggest fix is changing endpoint configuration method to avoid FIFO overflow at multiple endpoints situation. * tag 'usb-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: cdns3: gadget: own the lock wrongly at the suspend routine usb: cdns3: Fix on-chip memory overflow issue usb: cdns3: gadget: suspicious implicit sign extension usb: cdns3: Variable 'length' set but not used commit c2f46814521113f6699a74e0a0424cbc5b305479 Author: Johannes Berg Date: Tue Oct 13 14:01:57 2020 +0200 mac80211: don't require VHT elements for HE on 2.4 GHz After the previous similar bugfix there was another bug here, if no VHT elements were found we also disabled HE. Fix this to disable HE only on the 5 GHz band; on 6 GHz it was already not disabled, and on 2.4 GHz there need (should) not be any VHT. Fixes: 57fa5e85d53c ("mac80211: determine chandef from HE 6 GHz operation") Link: https://lore.kernel.org/r/20201013140156.535a2fc6192f.Id6e5e525a60ac18d245d86f4015f1b271fce6ee6@changeid Signed-off-by: Johannes Berg commit db18d20d1cb0fde16d518fb5ccd38679f174bc04 Author: Ye Bin Date: Fri Oct 9 15:02:15 2020 +0800 cfg80211: regulatory: Fix inconsistent format argument Fix follow warning: [net/wireless/reg.c:3619]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20201009070215.63695-1-yebin10@huawei.com Signed-off-by: Johannes Berg commit b1e8eb11fb9cf666d8ae36bbcf533233a504c921 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:08 2020 +0200 mac80211: fix kernel-doc markups Some identifiers have different names between their prototypes and the kernel-doc markup. Others need to be fixed, as kernel-doc markups should use this format: identifier - description In the specific case of __sta_info_flush(), add a documentation for sta_info_flush(), as this one is the one used outside sta_info.c. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Johannes Berg Link: https://lore.kernel.org/r/978d35eef2dc76e21c81931804e4eaefbd6d635e.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Johannes Berg commit dcd479e10a0510522a5d88b29b8f79ea3467d501 Author: Johannes Berg Date: Fri Oct 9 14:17:11 2020 +0200 mac80211: always wind down STA state When (for example) an IBSS station is pre-moved to AUTHORIZED before it's inserted, and then the insertion fails, we don't clean up the fast RX/TX states that might already have been created, since we don't go through all the state transitions again on the way down. Do that, if it hasn't been done already, when the station is freed. I considered only freeing the fast TX/RX state there, but we might add more state so it's more robust to wind down the state properly. Note that we warn if the station was ever inserted, it should have been properly cleaned up in that case, and the driver will probably not like things happening out of order. Reported-by: syzbot+2e293dbd67de2836ba42@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20201009141710.7223b322a955.I95bd08b9ad0e039c034927cce0b75beea38e059b@changeid Signed-off-by: Johannes Berg commit 9bdaf3b91efd229dd272b228e13df10310c80d19 Author: Johannes Berg Date: Fri Oct 9 13:58:22 2020 +0200 cfg80211: initialize wdev data earlier There's a race condition in the netdev registration in that NETDEV_REGISTER actually happens after the netdev is available, and so if we initialize things only there, we might get called with an uninitialized wdev through nl80211 - not using a wdev but using a netdev interface index. I found this while looking into a syzbot report, but it doesn't really seem to be related, and unfortunately there's no repro for it (yet). I can't (yet) explain how it managed to get into cfg80211_release_pmsr() from nl80211_netlink_notify() without the wdev having been initialized, as the latter only iterates the wdevs that are linked into the rdev, which even without the change here happened after init. However, looking at this, it seems fairly clear that the init needs to be done earlier, otherwise we might even re-init on a netns move, when data might still be pending. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20201009135821.fdcbba3aad65.Ie9201d91dbcb7da32318812effdc1561aeaf4cdc@changeid Signed-off-by: Johannes Berg commit 14f46c1e5108696ec1e5a129e838ecedf108c7bf Author: Johannes Berg Date: Fri Oct 9 13:25:41 2020 +0200 mac80211: fix use of skb payload instead of header When ieee80211_skb_resize() is called from ieee80211_build_hdr() the skb has no 802.11 header yet, in fact it consist only of the payload as the ethernet frame is removed. As such, we're using the payload data for ieee80211_is_mgmt(), which is of course completely wrong. This didn't really hurt us because these are always data frames, so we could only have added more tailroom than we needed if we determined it was a management frame and sdata->crypto_tx_tailroom_needed_cnt was false. However, syzbot found that of course there need not be any payload, so we're using at best uninitialized memory for the check. Fix this to pass explicitly the kind of frame that we have instead of checking there, by replacing the "bool may_encrypt" argument with an argument that can carry the three possible states - it's not going to be encrypted, it's a management frame, or it's a data frame (and then we check sdata->crypto_tx_tailroom_needed_cnt). Reported-by: syzbot+32fd1a1bfe355e93f1e2@syzkaller.appspotmail.com Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20201009132538.e1fd7f802947.I799b288466ea2815f9d4c84349fae697dca2f189@changeid Signed-off-by: Johannes Berg commit 804fc6a2931e692f50e8e317fcb0c8887331b405 Author: Mathy Vanhoef Date: Mon Oct 19 20:01:13 2020 +0400 mac80211: fix regression where EAPOL frames were sent in plaintext When sending EAPOL frames via NL80211 they are treated as injected frames in mac80211. Due to commit 1df2bdba528b ("mac80211: never drop injected frames even if normally not allowed") these injected frames were not assigned a sta context in the function ieee80211_tx_dequeue, causing certain wireless network cards to always send EAPOL frames in plaintext. This may cause compatibility issues with some clients or APs, which for instance can cause the group key handshake to fail and in turn would cause the station to get disconnected. This commit fixes this regression by assigning a sta context in ieee80211_tx_dequeue to injected frames as well. Note that sending EAPOL frames in plaintext is not a security issue since they contain their own encryption and authentication protection. Cc: stable@vger.kernel.org Fixes: 1df2bdba528b ("mac80211: never drop injected frames even if normally not allowed") Reported-by: Thomas Deutschmann Tested-by: Christian Hesse Tested-by: Thomas Deutschmann Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20201019160113.350912-1-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg commit d86de40decaa14e6613af1b2783bf4d589d0f38b Author: Mark Rutland Date: Mon Oct 26 13:49:31 2020 +0000 arm64: cpufeature: upgrade hyp caps to final We finalize caps before initializing kvm hyp code, and any use of cpus_have_const_cap() in kvm hyp code generates redundant and potentially unsound code to read the cpu_hwcaps array. A number of helper functions used in both hyp context and regular kernel context use cpus_have_const_cap(), as some regular kernel code runs before the capabilities are finalized. It's tedious and error-prone to write separate copies of these for hyp and non-hyp code. So that we can avoid the redundant code, let's automatically upgrade cpus_have_const_cap() to cpus_have_final_cap() when used in hyp context. With this change, there's never a reason to access to cpu_hwcaps array from hyp code, and we don't need to create an NVHE alias for this. This should have no effect on non-hyp code. Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier Acked-by: Will Deacon Cc: David Brazdil Cc: Marc Zyngier Cc: Will Deacon Link: https://lore.kernel.org/r/20201026134931.28246-4-mark.rutland@arm.com commit dfc4e3f08903ed8fe0b66cc25b64524a82654166 Author: Mark Rutland Date: Mon Oct 26 13:49:30 2020 +0000 arm64: cpufeature: reorder cpus_have_{const, final}_cap() In a subsequent patch we'll modify cpus_have_const_cap() to call cpus_have_final_cap(), and hence we need to define cpus_have_final_cap() first. To make subsequent changes easier to follow, this patch reorders the two without making any other changes. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier Acked-by: Will Deacon Cc: David Brazdil Cc: Marc Zyngier Cc: Will Deacon Link: https://lore.kernel.org/r/20201026134931.28246-3-mark.rutland@arm.com commit e9a33caec90e05673e2f7fb7c80f172031964d25 Author: Mark Rutland Date: Mon Oct 26 13:49:29 2020 +0000 KVM: arm64: Factor out is_{vhe,nvhe}_hyp_code() Currently has_vhe() detects whether it is being compiled for VHE/NVHE hyp code based on preprocessor definitions, and uses this knowledge to avoid redundant runtime checks. There are other cases where we'd like to use this knowledge, so let's factor the preprocessor checks out into separate helpers. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier Acked-by: Will Deacon Cc: David Brazdil Cc: Marc Zyngier Cc: Will Deacon Link: https://lore.kernel.org/r/20201026134931.28246-2-mark.rutland@arm.com commit cf5abb0132193767c07c83e06f91b777d22ba495 Author: Adam Ford Date: Thu Oct 8 13:33:00 2020 -0500 arm64: dts imx8mn: Remove non-existent USB OTG2 According to the i.MX8MN TRM, there is only one OTG port. The address for OTG2 is reserved on Nano. This patch removes the non-existent OTG2, usbphynop2, and the usbmisc2 nodes. Fixes: 6c3debcbae47 ("arm64: dts: freescale: Add i.MX8MN dtsi support") Signed-off-by: Adam Ford Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit ec9d78070de986ecf581ea204fd322af4d2477ec Author: Fangrui Song Date: Thu Oct 29 11:19:51 2020 -0700 arm64: Change .weak to SYM_FUNC_START_WEAK_PI for arch/arm64/lib/mem*.S Commit 39d114ddc682 ("arm64: add KASAN support") added .weak directives to arch/arm64/lib/mem*.S instead of changing the existing SYM_FUNC_START_PI macros. This can lead to the assembly snippet `.weak memcpy ... .globl memcpy` which will produce a STB_WEAK memcpy with GNU as but STB_GLOBAL memcpy with LLVM's integrated assembler before LLVM 12. LLVM 12 (since https://reviews.llvm.org/D90108) will error on such an overridden symbol binding. Use the appropriate SYM_FUNC_START_WEAK_PI instead. Fixes: 39d114ddc682 ("arm64: add KASAN support") Reported-by: Sami Tolvanen Signed-off-by: Fangrui Song Tested-by: Sami Tolvanen Tested-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Cc: Link: https://lore.kernel.org/r/20201029181951.1866093-1-maskray@google.com Signed-off-by: Will Deacon commit ce3d31ad3cac765484463b4f5a0b6b1f8f1a963e Author: Qian Cai Date: Wed Oct 28 14:26:14 2020 -0400 arm64/smp: Move rcu_cpu_starting() earlier The call to rcu_cpu_starting() in secondary_start_kernel() is not early enough in the CPU-hotplug onlining process, which results in lockdep splats as follows: WARNING: suspicious RCU usage ----------------------------- kernel/locking/lockdep.c:3497 RCU-list traversed in non-reader section!! other info that might help us debug this: RCU used illegally from offline CPU! rcu_scheduler_active = 1, debug_locks = 1 no locks held by swapper/1/0. Call trace: dump_backtrace+0x0/0x3c8 show_stack+0x14/0x60 dump_stack+0x14c/0x1c4 lockdep_rcu_suspicious+0x134/0x14c __lock_acquire+0x1c30/0x2600 lock_acquire+0x274/0xc48 _raw_spin_lock+0xc8/0x140 vprintk_emit+0x90/0x3d0 vprintk_default+0x34/0x40 vprintk_func+0x378/0x590 printk+0xa8/0xd4 __cpuinfo_store_cpu+0x71c/0x868 cpuinfo_store_cpu+0x2c/0xc8 secondary_start_kernel+0x244/0x318 This is avoided by moving the call to rcu_cpu_starting up near the beginning of the secondary_start_kernel() function. Signed-off-by: Qian Cai Acked-by: Paul E. McKenney Link: https://lore.kernel.org/lkml/160223032121.7002.1269740091547117869.tip-bot2@tip-bot2/ Link: https://lore.kernel.org/r/20201028182614.13655-1-cai@redhat.com Signed-off-by: Will Deacon commit 0c86d774883fa17e7c81b0c8838b88d06c2c911e Author: Laurent Vivier Date: Thu Oct 29 13:20:50 2020 +0100 vdpasim: allow to assign a MAC address Add macaddr parameter to the module to set the MAC address to use Signed-off-by: Laurent Vivier Link: https://lore.kernel.org/r/20201029122050.776445-3-lvivier@redhat.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 4a6a42db53aae049a8a64d4b273761bc80c46ebf Author: Laurent Vivier Date: Thu Oct 29 13:20:49 2020 +0100 vdpasim: fix MAC address configuration vdpa_sim generates a ramdom MAC address but it is never used by upper layers because the VIRTIO_NET_F_MAC bit is not set in the features list. Because of that, virtio-net always regenerates a random MAC address each time it is loaded whereas the address should only change on vdpa_sim load/unload. Fix that by adding VIRTIO_NET_F_MAC in the features list of vdpa_sim. Fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator") Cc: jasowang@redhat.com Signed-off-by: Laurent Vivier Link: https://lore.kernel.org/r/20201029122050.776445-2-lvivier@redhat.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit e01afe36df1a9e42cacdb9c5b99512ec69a6f14b Author: Zhu Lingshan Date: Fri Oct 23 18:40:46 2020 +0800 vdpa: handle irq bypass register failure case LKP considered variable 'ret' in vhost_vdpa_setup_vq_irq() as a unused variable, so suggest we remove it. Actually it stores return value of irq_bypass_register_producer(), but we did not check it, we should handle the failure case. This commit will print a message if irq bypass register producer fail, in this case, vqs still remain functional. Signed-off-by: Zhu Lingshan Reported-by: kernel test robot Link: https://lore.kernel.org/r/20201023104046.404794-1-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 1eca16b231570c8ae57fb91fdfbc48eb52c6a93b Author: Laurent Vivier Date: Tue Oct 27 18:59:14 2020 +0100 vdpa_sim: Fix DMA mask Since commit f959dcd6ddfd ("dma-direct: Fix potential NULL pointer dereference") an error is reported when we load vdpa_sim and virtio-vdpa: [ 129.351207] net eth0: Unexpected TXQ (0) queue failure: -12 It seems that dma_mask is not initialized. This patch initializes dma_mask() and calls dma_set_mask_and_coherent() to fix the problem. Full log: [ 128.548628] ------------[ cut here ]------------ [ 128.553268] WARNING: CPU: 23 PID: 1105 at kernel/dma/mapping.c:149 dma_map_page_attrs+0x14c/0x1d0 [ 128.562139] Modules linked in: virtio_net net_failover failover virtio_vdpa vdpa_sim vringh vhost_iotlb vdpa xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_counter nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nfnetlink tun bridge stp llc iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi rfkill intel_rapl_msr intel_rapl_common isst_if_common sunrpc skx_edac nfit libnvdimm x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel ipmi_ssif kvm mgag200 i2c_algo_bit irqbypass drm_kms_helper crct10dif_pclmul crc32_pclmul syscopyarea ghash_clmulni_intel iTCO_wdt sysfillrect iTCO_vendor_support sysimgblt rapl fb_sys_fops dcdbas intel_cstate drm acpi_ipmi ipmi_si mei_me dell_smbios intel_uncore ipmi_devintf mei i2c_i801 dell_wmi_descriptor wmi_bmof pcspkr lpc_ich i2c_smbus ipmi_msghandler acpi_power_meter ip_tables xfs libcrc32c sd_mod t10_pi sg ahci libahci libata megaraid_sas tg3 crc32c_intel wmi dm_mirror dm_region_hash dm_log [ 128.562188] dm_mod [ 128.651334] CPU: 23 PID: 1105 Comm: NetworkManager Tainted: G S I 5.10.0-rc1+ #59 [ 128.659939] Hardware name: Dell Inc. PowerEdge R440/04JN2K, BIOS 2.8.1 06/30/2020 [ 128.667419] RIP: 0010:dma_map_page_attrs+0x14c/0x1d0 [ 128.672384] Code: 1c 25 28 00 00 00 0f 85 97 00 00 00 48 83 c4 10 5b 5d 41 5c 41 5d c3 4c 89 da eb d7 48 89 f2 48 2b 50 18 48 89 d0 eb 8d 0f 0b <0f> 0b 48 c7 c0 ff ff ff ff eb c3 48 89 d9 48 8b 40 40 e8 2d a0 aa [ 128.691131] RSP: 0018:ffffae0f0151f3c8 EFLAGS: 00010246 [ 128.696357] RAX: ffffffffc06b7400 RBX: 00000000000005fa RCX: 0000000000000000 [ 128.703488] RDX: 0000000000000040 RSI: ffffcee3c7861200 RDI: ffff9e2bc16cd000 [ 128.710620] RBP: 0000000000000000 R08: 0000000000000002 R09: 0000000000000000 [ 128.717754] R10: 0000000000000002 R11: 0000000000000000 R12: ffff9e472cb291f8 [ 128.724886] R13: ffff9e2bc14da780 R14: ffff9e472bc20000 R15: ffff9e2bc1b14940 [ 128.732020] FS: 00007f887bae23c0(0000) GS:ffff9e4ac01c0000(0000) knlGS:0000000000000000 [ 128.740105] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 128.745852] CR2: 0000562bc09de998 CR3: 00000003c156c006 CR4: 00000000007706e0 [ 128.752982] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 128.760114] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 128.767247] PKRU: 55555554 [ 128.769961] Call Trace: [ 128.772418] virtqueue_add+0x81e/0xb00 [ 128.776176] virtqueue_add_inbuf_ctx+0x26/0x30 [ 128.780625] try_fill_recv+0x3a2/0x6e0 [virtio_net] [ 128.785509] virtnet_open+0xf9/0x180 [virtio_net] [ 128.790217] __dev_open+0xe8/0x180 [ 128.793620] __dev_change_flags+0x1a7/0x210 [ 128.797808] dev_change_flags+0x21/0x60 [ 128.801646] do_setlink+0x328/0x10e0 [ 128.805227] ? __nla_validate_parse+0x121/0x180 [ 128.809757] ? __nla_parse+0x21/0x30 [ 128.813338] ? inet6_validate_link_af+0x5c/0xf0 [ 128.817871] ? cpumask_next+0x17/0x20 [ 128.821535] ? __snmp6_fill_stats64.isra.54+0x6b/0x110 [ 128.826676] ? __nla_validate_parse+0x47/0x180 [ 128.831120] __rtnl_newlink+0x541/0x8e0 [ 128.834962] ? __nla_reserve+0x38/0x50 [ 128.838713] ? security_sock_rcv_skb+0x2a/0x40 [ 128.843158] ? netlink_deliver_tap+0x2c/0x1e0 [ 128.847518] ? netlink_attachskb+0x1d8/0x220 [ 128.851793] ? skb_queue_tail+0x1b/0x50 [ 128.855641] ? fib6_clean_node+0x43/0x170 [ 128.859652] ? _cond_resched+0x15/0x30 [ 128.863406] ? kmem_cache_alloc_trace+0x3a3/0x420 [ 128.868110] rtnl_newlink+0x43/0x60 [ 128.871602] rtnetlink_rcv_msg+0x12c/0x380 [ 128.875701] ? rtnl_calcit.isra.39+0x110/0x110 [ 128.880147] netlink_rcv_skb+0x50/0x100 [ 128.883987] netlink_unicast+0x1a5/0x280 [ 128.887913] netlink_sendmsg+0x23d/0x470 [ 128.891839] sock_sendmsg+0x5b/0x60 [ 128.895331] ____sys_sendmsg+0x1ef/0x260 [ 128.899255] ? copy_msghdr_from_user+0x5c/0x90 [ 128.903702] ___sys_sendmsg+0x7c/0xc0 [ 128.907369] ? dev_forward_change+0x130/0x130 [ 128.911731] ? sysctl_head_finish.part.29+0x24/0x40 [ 128.916616] ? new_sync_write+0x11f/0x1b0 [ 128.920628] ? mntput_no_expire+0x47/0x240 [ 128.924727] __sys_sendmsg+0x57/0xa0 [ 128.928309] do_syscall_64+0x33/0x40 [ 128.931887] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 128.936937] RIP: 0033:0x7f88792e3857 [ 128.940518] Code: c3 66 90 41 54 41 89 d4 55 48 89 f5 53 89 fb 48 83 ec 10 e8 0b ed ff ff 44 89 e2 48 89 ee 89 df 41 89 c0 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 48 89 44 24 08 e8 44 ed ff ff 48 [ 128.959263] RSP: 002b:00007ffdca60dea0 EFLAGS: 00000293 ORIG_RAX: 000000000000002e [ 128.966827] RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f88792e3857 [ 128.973960] RDX: 0000000000000000 RSI: 00007ffdca60def0 RDI: 000000000000000c [ 128.981095] RBP: 00007ffdca60def0 R08: 0000000000000000 R09: 0000000000000000 [ 128.988224] R10: 0000000000000001 R11: 0000000000000293 R12: 0000000000000000 [ 128.995357] R13: 0000000000000000 R14: 00007ffdca60e0a8 R15: 00007ffdca60e09c [ 129.002492] CPU: 23 PID: 1105 Comm: NetworkManager Tainted: G S I 5.10.0-rc1+ #59 [ 129.011093] Hardware name: Dell Inc. PowerEdge R440/04JN2K, BIOS 2.8.1 06/30/2020 [ 129.018571] Call Trace: [ 129.021027] dump_stack+0x57/0x6a [ 129.024346] __warn.cold.14+0xe/0x3d [ 129.027925] ? dma_map_page_attrs+0x14c/0x1d0 [ 129.032283] report_bug+0xbd/0xf0 [ 129.035602] handle_bug+0x44/0x80 [ 129.038922] exc_invalid_op+0x13/0x60 [ 129.042589] asm_exc_invalid_op+0x12/0x20 [ 129.046602] RIP: 0010:dma_map_page_attrs+0x14c/0x1d0 [ 129.051566] Code: 1c 25 28 00 00 00 0f 85 97 00 00 00 48 83 c4 10 5b 5d 41 5c 41 5d c3 4c 89 da eb d7 48 89 f2 48 2b 50 18 48 89 d0 eb 8d 0f 0b <0f> 0b 48 c7 c0 ff ff ff ff eb c3 48 89 d9 48 8b 40 40 e8 2d a0 aa [ 129.070311] RSP: 0018:ffffae0f0151f3c8 EFLAGS: 00010246 [ 129.075536] RAX: ffffffffc06b7400 RBX: 00000000000005fa RCX: 0000000000000000 [ 129.082669] RDX: 0000000000000040 RSI: ffffcee3c7861200 RDI: ffff9e2bc16cd000 [ 129.089803] RBP: 0000000000000000 R08: 0000000000000002 R09: 0000000000000000 [ 129.096936] R10: 0000000000000002 R11: 0000000000000000 R12: ffff9e472cb291f8 [ 129.104068] R13: ffff9e2bc14da780 R14: ffff9e472bc20000 R15: ffff9e2bc1b14940 [ 129.111200] virtqueue_add+0x81e/0xb00 [ 129.114952] virtqueue_add_inbuf_ctx+0x26/0x30 [ 129.119399] try_fill_recv+0x3a2/0x6e0 [virtio_net] [ 129.124280] virtnet_open+0xf9/0x180 [virtio_net] [ 129.128984] __dev_open+0xe8/0x180 [ 129.132390] __dev_change_flags+0x1a7/0x210 [ 129.136575] dev_change_flags+0x21/0x60 [ 129.140415] do_setlink+0x328/0x10e0 [ 129.143994] ? __nla_validate_parse+0x121/0x180 [ 129.148528] ? __nla_parse+0x21/0x30 [ 129.152107] ? inet6_validate_link_af+0x5c/0xf0 [ 129.156639] ? cpumask_next+0x17/0x20 [ 129.160306] ? __snmp6_fill_stats64.isra.54+0x6b/0x110 [ 129.165443] ? __nla_validate_parse+0x47/0x180 [ 129.169890] __rtnl_newlink+0x541/0x8e0 [ 129.173731] ? __nla_reserve+0x38/0x50 [ 129.177483] ? security_sock_rcv_skb+0x2a/0x40 [ 129.181928] ? netlink_deliver_tap+0x2c/0x1e0 [ 129.186286] ? netlink_attachskb+0x1d8/0x220 [ 129.190560] ? skb_queue_tail+0x1b/0x50 [ 129.194401] ? fib6_clean_node+0x43/0x170 [ 129.198411] ? _cond_resched+0x15/0x30 [ 129.202163] ? kmem_cache_alloc_trace+0x3a3/0x420 [ 129.206869] rtnl_newlink+0x43/0x60 [ 129.210361] rtnetlink_rcv_msg+0x12c/0x380 [ 129.214462] ? rtnl_calcit.isra.39+0x110/0x110 [ 129.218908] netlink_rcv_skb+0x50/0x100 [ 129.222747] netlink_unicast+0x1a5/0x280 [ 129.226672] netlink_sendmsg+0x23d/0x470 [ 129.230599] sock_sendmsg+0x5b/0x60 [ 129.234090] ____sys_sendmsg+0x1ef/0x260 [ 129.238015] ? copy_msghdr_from_user+0x5c/0x90 [ 129.242461] ___sys_sendmsg+0x7c/0xc0 [ 129.246128] ? dev_forward_change+0x130/0x130 [ 129.250487] ? sysctl_head_finish.part.29+0x24/0x40 [ 129.255368] ? new_sync_write+0x11f/0x1b0 [ 129.259381] ? mntput_no_expire+0x47/0x240 [ 129.263478] __sys_sendmsg+0x57/0xa0 [ 129.267058] do_syscall_64+0x33/0x40 [ 129.270639] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 129.275689] RIP: 0033:0x7f88792e3857 [ 129.279268] Code: c3 66 90 41 54 41 89 d4 55 48 89 f5 53 89 fb 48 83 ec 10 e8 0b ed ff ff 44 89 e2 48 89 ee 89 df 41 89 c0 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 48 89 44 24 08 e8 44 ed ff ff 48 [ 129.298015] RSP: 002b:00007ffdca60dea0 EFLAGS: 00000293 ORIG_RAX: 000000000000002e [ 129.305581] RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f88792e3857 [ 129.312712] RDX: 0000000000000000 RSI: 00007ffdca60def0 RDI: 000000000000000c [ 129.319846] RBP: 00007ffdca60def0 R08: 0000000000000000 R09: 0000000000000000 [ 129.326978] R10: 0000000000000001 R11: 0000000000000293 R12: 0000000000000000 [ 129.334109] R13: 0000000000000000 R14: 00007ffdca60e0a8 R15: 00007ffdca60e09c [ 129.341249] ---[ end trace c551e8028fbaf59d ]--- [ 129.351207] net eth0: Unexpected TXQ (0) queue failure: -12 [ 129.360445] net eth0: Unexpected TXQ (0) queue failure: -12 [ 129.824428] net eth0: Unexpected TXQ (0) queue failure: -12 Fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator") Signed-off-by: Laurent Vivier Link: https://lore.kernel.org/r/20201027175914.689278-1-lvivier@redhat.com Signed-off-by: Michael S. Tsirkin Cc: stable@vger.kernel.org Acked-by: Jason Wang commit 5e1a3149eec8675c2767cc465903f5e4829de5b0 Author: Michael S. Tsirkin Date: Thu Oct 29 17:53:36 2020 -0400 Revert "vhost-vdpa: fix page pinning leakage in error path" This reverts commit 7ed9e3d97c32d969caded2dfb6e67c1a2cc5a0b1. The patch creates a DoS risk since it can result in a high order memory allocation. Fixes: 7ed9e3d97c32d ("vhost-vdpa: fix page pinning leakage in error path") Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin commit 7ba08e81cb4aec9724ab7674a5de49e7a341062c Author: Jing Xiangfeng Date: Mon Oct 26 15:06:37 2020 +0800 vdpa/mlx5: Fix error return in map_direct_mr() Fix to return the variable "err" from the error handling case instead of "ret". Fixes: 94abbccdf291 ("vdpa/mlx5: Add shared memory registration code") Signed-off-by: Jing Xiangfeng Link: https://lore.kernel.org/r/20201026070637.164321-1-jingxiangfeng@huawei.com Signed-off-by: Michael S. Tsirkin Acked-by: Eli Cohen Cc: stable@vger.kernel.org Acked-by: Jason Wang commit 7922460e33c81f41e0d2421417228b32e6fdbe94 Author: Dan Carpenter Date: Fri Oct 23 15:08:53 2020 +0300 vhost_vdpa: Return -EFAULT if copy_from_user() fails The copy_to/from_user() functions return the number of bytes which we weren't able to copy but the ioctl should return -EFAULT if they fail. Fixes: a127c5bbb6a8 ("vhost-vdpa: fix backend feature ioctls") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201023120853.GI282278@mwanda Signed-off-by: Michael S. Tsirkin Cc: stable@vger.kernel.org Acked-by: Jason Wang commit 587258edd94c305077923ec458e04c032fca83e6 Author: Adam Ford Date: Wed Oct 7 08:02:37 2020 -0500 arm64: dts: imx8mm-beacon-som: Fix Choppy BT audio When streaming bluetooth audio, the sound is choppy due to the fact that the default baud rate of the HCI interface is too slow to handle 16-bit stereo at 48KHz. The Bluetooth chip is capable of up to 4M baud on the serial port, so this patch sets the max-speed to 4000000 in order to properly stream audio over the Bluetooth. Fixes: 593816fa2f35 ("arm64: dts: imx: Add Beacon i.MX8m-Mini development kit") Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 054b5d97448714ae4a0bcd6f36b0515ac7aed21e Author: Madalin Bucur Date: Mon Oct 5 15:46:39 2020 +0300 arm64: dts: fsl: DPAA FMan DMA operations are coherent Although the DPAA 1 FMan operations are coherent, the device tree node for the FMan does not indicate that, resulting in a needless loss of performance. Adding the missing dma-coherent property. Fixes: 1ffbecdd8321 ("arm64: dts: add DPAA FMan nodes") Signed-off-by: Madalin Bucur Tested-by: Camelia Groza Acked-by: Li Yang Signed-off-by: Shawn Guo commit 0d519cbf38eed4f895aed197d4b135fa7f60f7c2 Author: Greg Kroah-Hartman Date: Fri Oct 23 15:10:37 2020 +0200 debugfs: remove return value of debugfs_create_devm_seqfile() No one checks the return value of debugfs_create_devm_seqfile(), as it's not needed, so make the return value void, so that no one tries to do so in the future. Link: https://lore.kernel.org/r/20201023131037.2500765-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 3e269eeea42736fda3054fb3747b6286691b25a3 Author: Alex Deucher Date: Wed Oct 28 10:57:50 2020 -0400 drm/amdgpu/powerplay: Only apply optimized mclk dpm policy on polaris Leads to improper dpm on older parts. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1353 Fixes: 8d89b96fe797 ("drm/amd/powerplay: optimize the mclk dpm policy settings") Reviewed-by: Evan Quan Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 7a1cc646709c531f5cb3473bfdd689a6da554505 Author: Joe Perches Date: Thu Oct 29 17:45:16 2020 -0400 MAINTAINERS: Update AMD POWERPLAY pattern commit e098bc9612c2 ("drm/amd/pm: optimize the power related source code layout") moved the directory, update the F: file pattern to match. Signed-off-by: Joe Perches Signed-off-by: Alex Deucher commit 786436b453001dafe81025389f96bf9dac1e9690 Author: Evan Quan Date: Tue Oct 27 10:24:18 2020 +0800 drm/amd/pm: do not use ixFEATURE_STATUS for checking smc running This reverts commit f87812284172a9809820d10143b573d833cd3f75 ("drm/amdgpu: Fix bug where DPM is not enabled after hibernate and resume"). It was intended to fix Hawaii S4(hibernation) issue but break S3. As ixFEATURE_STATUS is filled with garbage data on resume which can be only cleared by reloading smc firmware(but that will involve many changes). So, we will revert this S4 fix and seek a new way. Signed-off-by: Evan Quan Tested-by: Sandeep Raghuraman Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 277b080f98803cb73a83fb234f0be83a10e63958 Author: Evan Quan Date: Fri Oct 16 10:45:26 2020 +0800 drm/amd/pm: perform SMC reset on suspend/hibernation So that the succeeding resume can be performed based on a clean state. Signed-off-by: Evan Quan Tested-by: Sandeep Raghuraman Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2a4776a7337d47d92053870f37f9626ab0c00ac8 Author: Evan Quan Date: Wed Oct 28 15:37:00 2020 +0800 drm/amd/pm: enable baco reset for Hawaii Which can be used for S4(hibernation) support. Signed-off-by: Evan Quan Tested-by: Sandeep Raghuraman Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c108725ef589af462be6b957f63c7925e38213eb Author: Evan Quan Date: Wed Oct 28 15:34:29 2020 +0800 drm/amd/pm: correct the baco reset sequence for CI ASICs Correct some registers bitmasks and add mmBIOS_SCRATCH_7 reset. Signed-off-by: Evan Quan Tested-by: Sandeep Raghuraman Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 253475c455eb5f8da34faa1af92709e7bb414624 Author: Evan Quan Date: Wed Oct 28 15:29:59 2020 +0800 drm/amdgpu: perform srbm soft reset always on SDMA resume This can address the random SDMA hang after pci config reset seen on Hawaii. Signed-off-by: Evan Quan Tested-by: Sandeep Raghuraman Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4f0a1c99aa9f9f000025536efa9df0c7bb6f4bba Author: Flora Cui Date: Wed Oct 28 14:04:29 2020 +0800 drm/amdgpu: rename nv_is_headless_sku() for headless NAVI ASICs Signed-off-by: Flora Cui Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 06a5af1f62af815d0cb201d6becf540d3742e892 Author: Flora Cui Date: Tue Oct 27 14:58:19 2020 +0800 drm/amdgpu: disable DCN and VCN for Navi14 0x7340/C9 SKU Navi14 0x7340/C9 SKU has no display and video support, remove them. Signed-off-by: Flora Cui Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 92010a97098c4c9fd777408cc98064d26b32695b Author: Colin Xu Date: Fri Oct 16 13:29:13 2020 +0800 drm/i915/gvt: Fix mmio handler break on BXT/APL. - Remove dup mmio handler for BXT/APL. Otherwise mmio handler will fail to init. - Add engine GPR with F_CMD_ACCESS since BXT/APL will load them via LRI. Otherwise, guest will enter failsafe mode. V2: Use RCS/BCS GPR macros instead of offset. Revise commit message. V3: Use GEN8_RING_CS_GPR macros on ring base. Reviewed-by: Zhenyu Wang Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20201016052913.209248-1-colin.xu@intel.com commit 4a95857a875e887cc958c92fe9d2cde6184d2ec0 Merge: baec997285e63 61334ed227a58 Author: Zhenyu Wang Date: Fri Oct 30 11:48:17 2020 +0800 Merge tag 'drm-intel-fixes-2020-10-29' into gvt-fixes Backmerge for 5.10-rc1 to apply one extra APL fix. Signed-off-by: Zhenyu Wang commit baec997285e63ad3e03d8b8d45e14776cd737f62 Author: Colin Xu Date: Fri Oct 16 13:40:59 2020 +0800 drm/i915/gvt: Only pin/unpin intel_context along with workload One issue exposed after below commit with which the system will freeze at suspend after vGPU is created (no need to activate the vGPU). commit e6ba76480299 ("drm/i915: Remove i915->kernel_context") Old implementation pin the intel_context at setup_submission and unpin it at clean_submission. So after some vGPU is created, the intel_context is always pinned there although no workload using it. It will then block i915 enter suspend state. There is no need to pin it all the time. Pin/unpin it around workload lifecycle is more reasonable. After GVT enabled suspend/resume, the pinned intel_context will also get unpined when userspace put VM process into suspend state since all workloads are retired, then it's safe to unpin all intel_context for workloads created. So move the pin/unpin to create_workload and destroy_workload, while still keep the create/destroy in old place. V2: Rebase. Fixes: e6ba76480299 ("drm/i915: Remove i915->kernel_context") Reviewed-by: Zhenyu Wang Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20201016054059.238371-1-colin.xu@intel.com commit e11d2bf271589e70ea80a2ee3e116c40fcac62c2 Author: Peter Chen Date: Thu Oct 29 17:55:18 2020 +0800 usb: cdns3: gadget: own the lock wrongly at the suspend routine When the system goes to suspend, if the controller is at device mode with cable connecting to host, the call stack is: cdns3_suspend-> cdns3_gadget_suspend -> cdns3_disconnect_gadget, after cdns3_disconnect_gadget is called, it owns lock wrongly, it causes the system being deadlock after resume due to at cdns3_device_thread_irq_handler, it tries to get the lock, but can't get it forever. To fix it, we delete the unlock-lock operations at cdns3_disconnect_gadget, and do it at the caller. Fixes: b1234e3b3b26 ("usb: cdns3: add runtime PM support") Acked-by: Pawel Laszczak Signed-off-by: Peter Chen commit 52d3967704aea6cb316d419a33a5e1d56d33a3c1 Author: Pawel Laszczak Date: Thu Oct 22 08:55:05 2020 +0800 usb: cdns3: Fix on-chip memory overflow issue Patch fixes issue caused setting On-chip memory overflow bit in usb_sts register. The issue occurred because EP_CFG register was set twice before USB_STS.CFGSTS was set. Every write operation on EP_CFG.BUFFERING causes that controller increases internal counter holding the number of reserved on-chip buffers. First time this register was updated in function cdns3_ep_config before delegating SET_CONFIGURATION request to class driver and again it was updated when class wanted to enable endpoint. This patch fixes this issue by configuring endpoints enabled by class driver in cdns3_gadget_ep_enable and others just before status stage. Cc: stable@vger.kernel.org#v5.8+ Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Reported-and-tested-by: Peter Chen Signed-off-by: Pawel Laszczak Signed-off-by: Peter Chen commit 080b6f40763565f65ebb9540219c71ce885cf568 Author: Ard Biesheuvel Date: Wed Oct 28 18:15:05 2020 +0100 bpf: Don't rely on GCC __attribute__((optimize)) to disable GCSE Commit 3193c0836 ("bpf: Disable GCC -fgcse optimization for ___bpf_prog_run()") introduced a __no_fgcse macro that expands to a function scope __attribute__((optimize("-fno-gcse"))), to disable a GCC specific optimization that was causing trouble on x86 builds, and was not expected to have any positive effect in the first place. However, as the GCC manual documents, __attribute__((optimize)) is not for production use, and results in all other optimization options to be forgotten for the function in question. This can cause all kinds of trouble, but in one particular reported case, it causes -fno-asynchronous-unwind-tables to be disregarded, resulting in .eh_frame info to be emitted for the function. This reverts commit 3193c0836, and instead, it disables the -fgcse optimization for the entire source file, but only when building for X86 using GCC with CONFIG_BPF_JIT_ALWAYS_ON disabled. Note that the original commit states that CONFIG_RETPOLINE=n triggers the issue, whereas CONFIG_RETPOLINE=y performs better without the optimization, so it is kept disabled in both cases. Fixes: 3193c0836f20 ("bpf: Disable GCC -fgcse optimization for ___bpf_prog_run()") Signed-off-by: Ard Biesheuvel Signed-off-by: Alexei Starovoitov Tested-by: Geert Uytterhoeven Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/lkml/CAMuHMdUg0WJHEcq6to0-eODpXPOywLot6UD2=GFHpzoj_hCoBQ@mail.gmail.com/ Link: https://lore.kernel.org/bpf/20201028171506.15682-2-ardb@kernel.org commit af61bc1e33d2c0ec22612b46050f5b58ac56a962 Author: Keita Suzuki Date: Tue Oct 27 07:31:24 2020 +0000 scsi: hpsa: Fix memory leak in hpsa_init_one() When hpsa_scsi_add_host() fails, h->lastlogicals is leaked since it is missing a free() in the error handler. Fix this by adding free() when hpsa_scsi_add_host() fails. Link: https://lore.kernel.org/r/20201027073125.14229-1-keitasuzuki.park@sslab.ics.keio.ac.jp Tested-by: Don Brace Acked-by: Don Brace Signed-off-by: Keita Suzuki Signed-off-by: Martin K. Petersen commit 7babd126327b8b5a3904d2f8f01c95235801af2a Merge: a7ece18c5d9cf 61334ed227a58 Author: Dave Airlie Date: Fri Oct 30 11:53:29 2020 +1000 Merge tag 'drm-intel-fixes-2020-10-29' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix max memory region size calculation (Matt) - Restore ILK-M RPS support, restoring performance (Ville) - Reject 90/270 degreerotated initial fbs (Ville) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20201030004442.GA146813@intel.com commit a7ece18c5d9cf69a6f0b862365c5c9475d87e2b8 Merge: 671d27996feef d7787cc04e0a1 Author: Dave Airlie Date: Fri Oct 30 09:54:50 2020 +1000 Merge branch 'linux-5.10' of git://github.com/skeggsb/linux into drm-fixes Fixes an endian regression on older GPUs, a refcount overflow, a migration fix and 3 display fixes. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/CACAvsv6MOjtgzKchpis1XrZYmu7-6CaxnHVzJKOXPH62_em7tw@mail.gmail.com commit d92454287ee25d78f1caac3734a1864f8a5a5275 Author: Biwen Li Date: Tue Sep 29 09:30:21 2020 +0800 arm64: dts: fsl: fix endianness issue of rcpm Add little-endian property to RCPM node (for ls1028a,ls1088a,ls208xa), otherwise RCPM driver will program hardware with incorrect setting, causing system (such as LS1028ARDB) failed to be waked by wakeup source. Fixes: 791c88ca5713 (“arm64: dts: ls1028a: Add ftm_alarm0 DT node”) Fixes: f4fe3a8665495 (“arm64: dts: layerscape: add ftm_alarm0 node”) Signed-off-by: Biwen Li Signed-off-by: Ran Wang Acked-by: Li Yang Signed-off-by: Shawn Guo commit 6efb099a1da4e954409e241b47257a637120e5c2 Author: Krzysztof Kozlowski Date: Sun Sep 27 18:59:47 2020 +0200 arm64: dts: imx8mn-evk: fix missing PMIC's interrupt line pull-up The PMIC's interrupt is level low and should be pulled up. The PMIC's device node had pinctrl-0 property but it lacked pinctrl-names which is required to apply the pin configuration. Fixes: 4153f7811a9b ("arm64: dts: imx8mn: correct interrupt flags") Fixes: 6386156eb279 ("arm64: dts: imx8mn-evk: add pca9450 for i.mx8mn-evk board") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Robin Gong Signed-off-by: Shawn Guo commit 4d20fa1dac2e3cf5aa0cd317b3436f4fda680b04 Author: Krzysztof Kozlowski Date: Sun Sep 27 18:59:46 2020 +0200 arm64: dts: imx8mn-ddr4-evk: fix missing PMIC's interrupt line pull-up The PMIC's interrupt is level low and should be pulled up. The PMIC's device node had pinctrl-0 property but it lacked pinctrl-names which is required to apply the pin configuration. Fixes: 4153f7811a9b ("arm64: dts: imx8mn: correct interrupt flags") Fixes: 3e44dd09736d ("arm64: dts: imx8mn-ddr4-evk: Add rohm,bd71847 PMIC support") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Robin Gong Signed-off-by: Shawn Guo commit 34a1c5e39b670fd7a324b5620c9ad4ac80c2f018 Author: Krzysztof Kozlowski Date: Sun Sep 27 18:59:45 2020 +0200 arm64: dts: imx8mn-var-som: fix missing PMIC's interrupt line pull-up The PMIC's interrupt is level low and should be pulled up. The PMIC's device node had pinctrl-0 property but it lacked pinctrl-names which is required to apply the pin configuration. The actual problem in DTS was pointed out by Felix Radensky from Variscite. Reported-by: Felix Radensky Fixes: ade0176dd8a0 ("arm64: dts: imx8mn-var-som: Add Variscite VAR-SOM-MX8MN System on Module") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Robin Gong Signed-off-by: Shawn Guo commit ce6fc31f388d45b9f7135169f911cd27f4d21126 Author: Krzysztof Kozlowski Date: Sun Sep 27 18:59:44 2020 +0200 arm64: dts: imx8mm-evk: fix missing PMIC's interrupt line pull-up The PMIC's interrupt is level low and should be pulled up. The PMIC's device node had pinctrl-0 property but it lacked pinctrl-names which is required to apply the pin configuration. Fixes: 5f67317bd967 ("arm64: dts: imx8mm: correct interrupt flags") Fixes: aa71d0648318 ("arm64: dts: imx8mm: Split the imx8mm evk board dts to a common dtsi") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Robin Gong Signed-off-by: Shawn Guo commit 0710e4385c9c978952333393396061ed1672d145 Author: Krzysztof Kozlowski Date: Sun Sep 27 18:59:43 2020 +0200 arm64: dts: imx8mm-beacon-som: fix missing PMIC's interrupt line pull-up The PMIC's interrupt is level low and should be pulled up. The PMIC's device node had pinctrl-0 property but it lacked pinctrl-names which is required to apply the pin configuration. Fixes: 5f67317bd967 ("arm64: dts: imx8mm: correct interrupt flags") Fixes: 593816fa2f35 ("arm64: dts: imx: Add Beacon i.MX8m-Mini development kit") Signed-off-by: Krzysztof Kozlowski Tested-by: Adam Ford Reviewed-by: Robin Gong Signed-off-by: Shawn Guo commit 00203737867c8b63ca247e71ada1b32bb0b0dd3d Author: Krzysztof Kozlowski Date: Sun Sep 27 18:59:42 2020 +0200 arm64: dts: imx8mm-var-som: fix missing PMIC's interrupt line pull-up The PMIC's interrupt is level low and should be pulled up. The PMIC's device node had pinctrl-0 property but it lacked pinctrl-names which is required to apply the pin configuration. The actual problem in DTS was pointed out by Felix Radensky from Variscite. Reported-by: Felix Radensky Fixes: 5f67317bd967 ("arm64: dts: imx8mm: correct interrupt flags") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Robin Gong Signed-off-by: Shawn Guo commit 671d27996feef4afdc2ef47b0721f5cdf400c3b4 Merge: 14c907461b545 5066f42c7d3c7 Author: Dave Airlie Date: Fri Oct 30 09:33:51 2020 +1000 Merge tag 'drm-misc-fixes-2020-10-29' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes First round of drm-misc-fixes with a couple of leftovers from drm-misc-fixes next. Some reset fixes for the mantix panel, some fixes for a scaler issue on sun4i, many kernel-doc fixes and various fixes for vc4 (mostly HDMI audio related) Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201029173414.fxrl5jacsdwqheto@gilmour.lan commit d7787cc04e0a1f2043264d1550465081096bd065 Author: Lyude Paul Date: Tue Sep 29 18:31:32 2020 -0400 drm/nouveau/kms/nv50-: Fix clock checking algorithm in nv50_dp_mode_valid() While I thought I had this correct (since it actually did reject modes like I expected during testing), Ville Syrjala from Intel pointed out that the logic here isn't correct. max_clock refers to the max data rate supported by the DP encoder. So, limiting it to the output of ds_clock (which refers to the maximum dotclock of the downstream DP device) doesn't make any sense. Additionally, since we're using the connector's bpc as the canonical BPC we should use this in mode_valid until we support dynamically setting the bpp based on bandwidth constraints. https://lists.freedesktop.org/archives/dri-devel/2020-September/280276.html For more info. So, let's rewrite this using Ville's advice. v2: * Ville pointed out I mixed up the dotclock and the link rate. So fix that... * ...and also rename all the variables in this function to be more appropriately labeled so I stop mixing them up. * Reuse the bpp from the connector for now until we have dynamic bpp selection. * Use use DIV_ROUND_UP for calculating the mode rate like i915 does, which we should also have been doing from the start Signed-off-by: Lyude Paul Fixes: 409d38139b42 ("drm/nouveau/kms/nv50-: Use downstream DP clock limits for mode validation") Cc: Ville Syrjälä Cc: Lyude Paul Cc: Ben Skeggs Signed-off-by: Ben Skeggs commit 2d831155cf0607566e43d8465da33774b2dc7221 Author: Lyude Paul Date: Tue Sep 29 18:31:31 2020 -0400 drm/nouveau/kms/nv50-: Get rid of bogus nouveau_conn_mode_valid() Ville also pointed out that I got a lot of the logic here wrong as well, whoops. While I don't think anyone's likely using 3D output with nouveau, the next patch will make nouveau_conn_mode_valid() make a lot less sense. So, let's just get rid of it and open-code it like before, while taking care to move the 3D frame packing calculations on the dot clock into the right place. Signed-off-by: Lyude Paul Fixes: d6a9efece724 ("drm/nouveau/kms/nv50-: Share DP SST mode_valid() handling with MST") Cc: Ville Syrjälä Cc: # v5.8+ Signed-off-by: Ben Skeggs commit dcd292c172493067a72672b245a3dd1bcf7268dd Author: Karol Herbst Date: Tue Oct 13 14:01:26 2020 +0200 drm/nouveau/device: fix changing endianess code to work on older GPUs With this we try to detect if the endianess switch works and assume LE if not. Suggested by Ben. Fixes: 51c05340e407 ("drm/nouveau/device: detect if changing endianness failed") Signed-off-by: Karol Herbst Cc: # v5.8+ Signed-off-by: Ben Skeggs commit 925681454d7b557d404b5d28ef4469fac1b2e105 Author: Karol Herbst Date: Wed Oct 7 00:08:09 2020 +0200 drm/nouveau/gem: fix "refcount_t: underflow; use-after-free" we can't use nouveau_bo_ref here as no ttm object was allocated and nouveau_bo_ref mainly deals with that. Simply deallocate the object. Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs commit 24d9422e26ea75118acf00172f83417c296f5b5f Author: Lyude Paul Date: Fri Sep 4 16:27:58 2020 -0400 drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps Not entirely sure why this never came up when I originally tested this (maybe some BIOSes already have this setup?) but the ->caps_init vfunc appears to cause the display engine to throw an exception on driver init, at least on my ThinkPad P72: nouveau 0000:01:00.0: disp: chid 0 mthd 008c data 00000000 0000508c 0000102b This is magic nvidia speak for "You need to have the DMA notifier offset programmed before you can call NV507D_GET_CAPABILITIES." So, let's fix this by doing that, and also perform an update afterwards to prevent racing with the GPU when reading capabilities. v2: * Don't just program the DMA notifier offset, make sure to actually perform an update v3: * Don't call UPDATE() * Actually read the correct notifier fields, as apparently the CAPABILITIES_DONE field lives in a different location than the main NV_DISP_CORE_NOTIFIER_1 field. As well, 907d+ use a different CAPABILITIES_DONE field then pre-907d cards. v4: * Don't forget to check the return value of core507d_read_caps() v5: * Get rid of NV50_DISP_CAPS_NTFY[14], use NV50_DISP_CORE_NTFY * Disable notifier after calling GetCapabilities() Signed-off-by: Lyude Paul Fixes: 4a2cb4181b07 ("drm/nouveau/kms/nv50-: Probe SOR and PIOR caps for DP interlacing support") Cc: # v5.8+ Signed-off-by: Ben Skeggs commit cfa736f5a6f31ca8a05459b5720aac030247ad1b Author: Ralph Campbell Date: Mon Aug 31 13:31:11 2020 -0700 drm/nouveau/nouveau: fix the start/end range for migration The user level OpenCL code shouldn't have to align start and end addresses to a page boundary. That is better handled in the nouveau driver. The npages field is also redundant since it can be computed from the start and end addresses. Signed-off-by: Ralph Campbell Signed-off-by: Ben Skeggs commit 14c907461b54597b74c711f08f7e98a4d2bee406 Merge: 3650b228f83ad 65d437b83b2b8 Author: Dave Airlie Date: Fri Oct 30 09:05:26 2020 +1000 Merge tag 'amd-drm-fixes-5.10-2020-10-29' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.10-2020-10-29: amdgpu: - Add new navi1x PCI ID - GPUVM reserved area fixes - Misc display fixes - Fix bad interactions between display code and CONFIG_KGDB - Fixes for SMU manual fan control and i2c Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201029061549.4133-1-alexander.deucher@amd.com commit 8fdaabe1c9b3226172ba2e9e525627219be6d29a Author: Gustavo A. R. Silva Date: Mon Aug 31 08:25:42 2020 -0500 scsi: target: tcmu: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit 4739eeafb9f0c45795407b3eb477dfcb2119f75b Author: Gustavo A. R. Silva Date: Mon Aug 31 08:25:42 2020 -0500 ima: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit bfe124d197f61af632b9f3f4c2c0579bd7848448 Author: Gustavo A. R. Silva Date: Mon Aug 31 08:25:42 2020 -0500 enetc: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit 5e01fdff04b7f7c3b8d456c11c8a9f978b4ddf65 Author: Gustavo A. R. Silva Date: Mon Aug 31 08:25:42 2020 -0500 fs: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit b08eadd2726356eb4867397fafd046d2b8aad4bf Author: Gustavo A. R. Silva Date: Mon Aug 31 08:25:42 2020 -0500 Bluetooth: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit fa29c9c11d4e2ba514421758991e5b3095642844 Author: Gustavo A. R. Silva Date: Mon Aug 31 10:23:32 2020 -0500 params: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit 9d0a49c7023c0905ea19116cf74beb7d9611d8ac Author: Gustavo A. R. Silva Date: Mon Aug 31 10:22:41 2020 -0500 tracepoint: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit 120088832042e6dc9866160ff267f8c347bf53e6 Author: Gustavo A. R. Silva Date: Mon Aug 31 10:21:55 2020 -0500 platform/chrome: cros_ec_proto: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit 883541051567a62add043a9f4ca5a31f2970bffd Author: Gustavo A. R. Silva Date: Mon Aug 31 10:21:14 2020 -0500 platform/chrome: cros_ec_commands: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit 277ffd6c1ec0aa60856a03e18455fcca7d2a1186 Author: Gustavo A. R. Silva Date: Mon Aug 31 10:19:18 2020 -0500 mailbox: zynqmp-ipi-message: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit a4147d855f50a676ebe61833a681f7c71945f343 Author: Gustavo A. R. Silva Date: Mon Aug 31 10:18:04 2020 -0500 dmaengine: ti-cppi5: Replace zero-length array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Gustavo A. R. Silva commit c5c68724696e7d2f8db58a5fce3673208d35c485 Author: Bob Peterson Date: Wed Oct 28 13:42:18 2020 -0500 gfs2: check for live vs. read-only file system in gfs2_fitrim Before this patch, gfs2_fitrim was not properly checking for a "live" file system. If the file system had something to trim and the file system was read-only (or spectator) it would start the trim, but when it starts the transaction, gfs2_trans_begin returns -EROFS (read-only file system) and it errors out. However, if the file system was already trimmed so there's no work to do, it never called gfs2_trans_begin. That code is bypassed so it never returns the error. Instead, it returns a good return code with 0 work. All this makes for inconsistent behavior: The same fstrim command can return -EROFS in one case and 0 in another. This tripped up xfstests generic/537 which reports the error as: +fstrim with unrecovered metadata just ate your filesystem This patch adds a check for a "live" (iow, active journal, iow, RW) file system, and if not, returns the error properly. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 7e5b92669904c1de13070ab6d8b788eab9d0cf1f Author: Bob Peterson Date: Wed Oct 28 12:03:23 2020 -0500 gfs2: don't initialize statfs_change inodes in spectator mode Before commit 97fd734ba17e, the local statfs_changeX inode was never initialized for spectator mounts. However, it still checks for spectator mounts when unmounting everything. There's no good reason to lookup the statfs_changeX files because spectators cannot perform recovery. It still, however, needs the master statfs file for statfs calls. This patch adds the check for spectator mounts to init_statfs. Fixes: 97fd734ba17e ("gfs2: lookup local statfs inodes prior to journal recovery") Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 4a55752ae288caaef8df4c5f4e07393c127bb9f0 Author: Bob Peterson Date: Tue Oct 27 12:29:37 2020 -0500 gfs2: Split up gfs2_meta_sync into inode and rgrp versions Before this patch, function gfs2_meta_sync called filemap_fdatawrite to write the address space for the metadata being synced. That's great for inodes, but resource groups all point to the same superblock-address space, sdp->sd_aspace. Each rgrp has its own range of blocks on which it should operate. That meant every time an rgrp's metadata was synced, it would write all of them instead of just the range. This patch eliminates function gfs2_meta_sync and tailors specific metasync functions for inodes and rgrps. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit c4af59bd441f90e185a652cce1aaf38dea293bf2 Author: Bob Peterson Date: Tue Oct 27 16:08:07 2020 -0400 gfs2: init_journal's undo directive should also undo the statfs inodes Hi, Before this patch, function init_journal's "undo" directive jumped to label fail_jinode_gh. But now that it does statfs initialization, it needs to jump to fail_statfs instead. Failure to do so means that mount failures after init_journal is successful will neglect to let go of the proper statfs information, stranding the statfs_changeX inodes. This makes it impossible to free its glocks, and results in: gfs2: fsid=sda.s: G: s:EX n:2/805f f:Dqob t:EX d:UN/603701000 a:0 v:0 r:4 m:200 p:1 gfs2: fsid=sda.s: H: s:EX f:H e:0 p:1397947 [(ended)] init_journal+0x548/0x890 [gfs2] gfs2: fsid=sda.s: I: n:6/32863 t:8 f:0x00 d:0x00000201 s:24 p:0 gfs2: fsid=sda.s: G: s:SH n:5/805f f:Dqob t:SH d:UN/603712000 a:0 v:0 r:3 m:200 p:0 gfs2: fsid=sda.s: H: s:SH f:EH e:0 p:1397947 [(ended)] gfs2_inode_lookup+0x1fb/0x410 [gfs2] VFS: Busy inodes after unmount of sda. Self-destruct in 5 seconds. Have a nice day... The next time the file system is mounted, it then reuses the same glocks, which ends in a kernel NULL pointer dereference when trying to dump the reused glock. This patch makes the "undo" function of init_journal jump to fail_statfs so the statfs files are properly deconstructed upon failure. Fixes: 97fd734ba17e ("gfs2: lookup local statfs inodes prior to journal recovery") Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit a9dd945ccef07a904e412f208f8de708a3d7159e Author: Bob Peterson Date: Tue Oct 27 10:10:02 2020 -0500 gfs2: Add missing truncate_inode_pages_final for sd_aspace Gfs2 creates an address space for its rgrps called sd_aspace, but it never called truncate_inode_pages_final on it. This confused vfs greatly which tried to reference the address space after gfs2 had freed the superblock that contained it. This patch adds a call to truncate_inode_pages_final for sd_aspace, thus avoiding the use-after-free. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit d0f17d3883f1e3f085d38572c2ea8edbd5150172 Author: Bob Peterson Date: Tue Oct 27 10:10:01 2020 -0500 gfs2: Free rd_bits later in gfs2_clear_rgrpd to fix use-after-free Function gfs2_clear_rgrpd calls kfree(rgd->rd_bits) before calling return_all_reservations, but return_all_reservations still dereferences rgd->rd_bits in __rs_deltree. Fix that by moving the call to kfree below the call to return_all_reservations. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 3d696f42c7f4bfcc54bde545898d4b89a74f9cc0 Author: Tero Kristo Date: Thu Oct 29 11:33:37 2020 +0200 soc: ti: ti_sci_pm_domains: check for proper args count in xlate K2G devices still only use single parameter for power-domains property, so check for this properly in the driver. Without this, every peripheral fails to probe resulting in boot failure. Link: https://lore.kernel.org/r/20201029093337.21170-1-t-kristo@ti.com Fixes: efa5c01cd7ee ("soc: ti: ti_sci_pm_domains: switch to use multiple genpds instead of one") Reported-by: Nishanth Menon Signed-off-by: Tero Kristo Acked-by: Nishanth Menon Acked-by: Santosh Shilimkar Signed-off-by: Arnd Bergmann commit 91a2c34b7d6fadc9c5d9433c620ea4c32ee7cae8 Author: Santosh Shukla Date: Mon Oct 26 16:54:07 2020 +0530 KVM: arm64: Force PTE mapping on fault resulting in a device mapping VFIO allows a device driver to resolve a fault by mapping a MMIO range. This can be subsequently result in user_mem_abort() to try and compute a huge mapping based on the MMIO pfn, which is a sure recipe for things to go wrong. Instead, force a PTE mapping when the pfn faulted in has a device mapping. Fixes: 6d674e28f642 ("KVM: arm/arm64: Properly handle faulting of device mappings") Suggested-by: Marc Zyngier Signed-off-by: Santosh Shukla [maz: rewritten commit message] Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1603711447-11998-2-git-send-email-sashukla@nvidia.com commit 2f40c46021bbb3ecd5c5f05764ecccbc276bc690 Author: Gavin Shan Date: Mon Oct 26 10:06:26 2020 +1100 KVM: arm64: Use fallback mapping sizes for contiguous huge page sizes Although huge pages can be created out of multiple contiguous PMDs or PTEs, the corresponding sizes are not supported at Stage-2 yet. Instead of failing the mapping, fall back to the nearer supported mapping size (CONT_PMD to PMD and CONT_PTE to PTE respectively). Suggested-by: Marc Zyngier Signed-off-by: Gavin Shan [maz: rewritten commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201025230626.18501-1-gshan@redhat.com commit 07e0887302450a62f51dba72df6afb5fabb23d1c Merge: 934291ffb638f 4169e889e5889 Author: Linus Torvalds Date: Thu Oct 29 13:02:52 2020 -0700 Merge tag 'fallthrough-fixes-clang-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull fallthrough fix from Gustavo A. R. Silva: "This fixes a ton of fall-through warnings when building with Clang 12.0.0 and -Wimplicit-fallthrough" * tag 'fallthrough-fixes-clang-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: include: jhash/signal: Fix fall-through warnings for Clang commit 934291ffb638f2785cc9587403df4895f5c838ac Merge: b9c0f4bd5b811 2734a24e6e5d1 Author: Linus Torvalds Date: Thu Oct 29 12:55:02 2020 -0700 Merge tag 'net-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Current release regressions: - r8169: fix forced threading conflicting with other shared interrupts; we tried to fix the use of raise_softirq_irqoff from an IRQ handler on RT by forcing hard irqs, but this driver shares legacy PCI IRQs so drop the _irqoff() instead - tipc: fix memory leak caused by a recent syzbot report fix to tipc_buf_append() Current release - bugs in new features: - devlink: Unlock on error in dumpit() and fix some error codes - net/smc: fix null pointer dereference in smc_listen_decline() Previous release - regressions: - tcp: Prevent low rmem stalls with SO_RCVLOWAT. - net: protect tcf_block_unbind with block lock - ibmveth: Fix use of ibmveth in a bridge; the self-imposed filtering to only send legal frames to the hypervisor was too strict - net: hns3: Clear the CMDQ registers before unmapping BAR region; incorrect cleanup order was leading to a crash - bnxt_en - handful of fixes to fixes: - Send HWRM_FUNC_RESET fw command unconditionally, even if there are PCIe errors being reported - Check abort error state in bnxt_open_nic(). - Invoke cancel_delayed_work_sync() for PFs also. - Fix regression in workqueue cleanup logic in bnxt_remove_one(). - mlxsw: Only advertise link modes supported by both driver and device, after removal of 56G support from the driver 56G was not cleared from advertised modes - net/smc: fix suppressed return code Previous release - always broken: - netem: fix zero division in tabledist, caused by integer overflow - bnxt_en: Re-write PCI BARs after PCI fatal error. - cxgb4: set up filter action after rewrites - net: ipa: command payloads already mapped Misc: - s390/ism: fix incorrect system EID, it's okay to change since it was added in current release - vsock: use ns_capable_noaudit() on socket create to suppress false positive audit messages" * tag 'net-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (36 commits) r8169: fix issue with forced threading in combination with shared interrupts netem: fix zero division in tabledist ibmvnic: fix ibmvnic_set_mac mptcp: add missing memory scheduling in the rx path tipc: fix memory leak caused by tipc_buf_append() gtp: fix an use-before-init in gtp_newlink() net: protect tcf_block_unbind with block lock ibmveth: Fix use of ibmveth in a bridge. net/sched: act_mpls: Add softdep on mpls_gso.ko ravb: Fix bit fields checking in ravb_hwtstamp_get() devlink: Unlock on error in dumpit() devlink: Fix some error codes chelsio/chtls: fix memory leaks in CPL handlers chelsio/chtls: fix deadlock issue net: hns3: Clear the CMDQ registers before unmapping BAR region bnxt_en: Send HWRM_FUNC_RESET fw command unconditionally. bnxt_en: Check abort error state in bnxt_open_nic(). bnxt_en: Re-write PCI BARs after PCI fatal error. bnxt_en: Invoke cancel_delayed_work_sync() for PFs also. bnxt_en: Fix regression in workqueue cleanup logic in bnxt_remove_one(). ... commit e2fc6a9f686d037cbd9b08b9fb657685b4a722d3 Author: Will Deacon Date: Thu Oct 29 14:47:16 2020 +0000 KVM: arm64: Fix masks in stage2_pte_cacheable() stage2_pte_cacheable() tries to figure out whether the mapping installed in its 'pte' parameter is cacheable or not. Unfortunately, it fails miserably because it extracts the memory attributes from the entry using FIELD_GET(), which returns the attributes shifted down to bit 0, but then compares this with the unshifted value generated by the PAGE_S2_MEMATTR() macro. A direct consequence of this bug is that cache maintenance is silently skipped, which in turn causes 32-bit guests to crash early on when their set/way maintenance is trapped but not emulated correctly. Fix the broken masks by avoiding the use of FIELD_GET() altogether. Fixes: 6d9d2115c480 ("KVM: arm64: Add support for stage-2 map()/unmap() in generic page-table") Reported-by: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20201029144716.30476-1-will@kernel.org commit 4a1c2c7f63c52ccb11770b5ae25920a6b79d3548 Author: Marc Zyngier Date: Thu Oct 29 17:24:09 2020 +0000 KVM: arm64: Fix AArch32 handling of DBGD{CCINT,SCRext} and DBGVCR The DBGD{CCINT,SCRext} and DBGVCR register entries in the cp14 array are missing their target register, resulting in all accesses being targetted at the guard sysreg (indexed by __INVALID_SYSREG__). Point the emulation code at the actual register entries. Fixes: bdfb4b389c8d ("arm64: KVM: add trap handlers for AArch32 debug registers") Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201029172409.2768336-1-maz@kernel.org commit 7efe8ef274024ef1d5c495c79dfcbbff38c5f366 Author: Will Deacon Date: Mon Oct 26 14:44:23 2020 +0000 KVM: arm64: Allocate stage-2 pgd pages with GFP_KERNEL_ACCOUNT For consistency with the rest of the stage-2 page-table page allocations (performing using a kvm_mmu_memory_cache), ensure that __GFP_ACCOUNT is included in the GFP flags for the PGD pages. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20201026144423.24683-1-will@kernel.org commit d2782505fbe3055f983c772a448ac5cb419f9df7 Author: Marc Zyngier Date: Mon Oct 26 09:51:11 2020 +0000 KVM: arm64: Drop useless PAN setting on host EL1 to EL2 transition Setting PSTATE.PAN when entering EL2 on nVHE doesn't make much sense as this bit only means something for translation regimes that include EL0. This obviously isn't the case in the nVHE case, so let's drop this setting. Signed-off-by: Marc Zyngier Reviewed-by: Vladimir Murzin Link: https://lore.kernel.org/r/20201026095116.72051-4-maz@kernel.org commit b6d6db4de86f5b1be9bbe59c73302538301915c7 Author: Marc Zyngier Date: Mon Oct 26 09:51:10 2020 +0000 KVM: arm64: Remove leftover kern_hyp_va() in nVHE TLB invalidation The new calling convention says that pointers coming from the SMCCC interface are turned into their HYP version in the host HVC handler. However, there is still a stray kern_hyp_va() in the TLB invalidation code, which could result in a corrupted pointer. Drop the spurious conversion. Fixes: a071261d9318 ("KVM: arm64: nVHE: Fix pointers during SMCCC convertion") Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201026095116.72051-3-maz@kernel.org commit 28e81c6270b3d0e9faadd565f314ad9ac8256620 Author: Marc Zyngier Date: Mon Oct 26 09:51:09 2020 +0000 KVM: arm64: Don't corrupt tpidr_el2 on failed HVC call The hyp-init code starts by stashing a register in TPIDR_EL2 in in order to free a register. This happens no matter if the HVC call is legal or not. Although nothing wrong seems to come out of it, it feels odd to alter the EL2 state for something that eventually returns an error. Instead, use the fact that we know exactly which bits of the __kvm_hyp_init call are non-zero to perform the check with a series of EOR/ROR instructions, combined with a build-time check that the value is the one we expect. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201026095116.72051-2-maz@kernel.org commit 80624263fa289b3416f7ca309491f1b75e579477 Author: Suzuki K Poulose Date: Thu Oct 29 10:45:58 2020 -0600 coresight: cti: Initialize dynamic sysfs attributes With LOCKDEP enabled, CTI driver triggers the following splat due to uninitialized lock class for dynamically allocated attribute objects. [ 5.372901] coresight etm0: CPU0: ETM v4.0 initialized [ 5.376694] coresight etm1: CPU1: ETM v4.0 initialized [ 5.380785] coresight etm2: CPU2: ETM v4.0 initialized [ 5.385851] coresight etm3: CPU3: ETM v4.0 initialized [ 5.389808] BUG: key ffff00000564a798 has not been registered! [ 5.392456] ------------[ cut here ]------------ [ 5.398195] DEBUG_LOCKS_WARN_ON(1) [ 5.398233] WARNING: CPU: 1 PID: 32 at kernel/locking/lockdep.c:4623 lockdep_init_map_waits+0x14c/0x260 [ 5.406149] Modules linked in: [ 5.415411] CPU: 1 PID: 32 Comm: kworker/1:1 Not tainted 5.9.0-12034-gbbe85027ce80 #51 [ 5.418553] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) [ 5.426453] Workqueue: events amba_deferred_retry_func [ 5.433299] pstate: 40000005 (nZcv daif -PAN -UAO -TCO BTYPE=--) [ 5.438252] pc : lockdep_init_map_waits+0x14c/0x260 [ 5.444410] lr : lockdep_init_map_waits+0x14c/0x260 [ 5.449007] sp : ffff800012bbb720 ... [ 5.531561] Call trace: [ 5.536847] lockdep_init_map_waits+0x14c/0x260 [ 5.539027] __kernfs_create_file+0xa8/0x1c8 [ 5.543539] sysfs_add_file_mode_ns+0xd0/0x208 [ 5.548054] internal_create_group+0x118/0x3c8 [ 5.552307] internal_create_groups+0x58/0xb8 [ 5.556733] sysfs_create_groups+0x2c/0x38 [ 5.561160] device_add+0x2d8/0x768 [ 5.565148] device_register+0x28/0x38 [ 5.568537] coresight_register+0xf8/0x320 [ 5.572358] cti_probe+0x1b0/0x3f0 ... Fix this by initializing the attributes when they are allocated. Fixes: 3c5597e39812 ("coresight: cti: Add connection information to sysfs") Reported-by: Leo Yan Tested-by: Leo Yan Cc: Mike Leach Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Cc: stable Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201029164559.1268531-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 39a7661dcf655c8198fd5d72412f5030a8e58444 Author: Mike Leach Date: Thu Oct 29 10:45:59 2020 -0600 coresight: Fix uninitialised pointer bug in etm_setup_aux() Commit [bb1860efc817] changed the sink handling code introducing an uninitialised pointer bug. This results in the default sink selection failing. Prior to commit: static void etm_setup_aux(...) struct coresight_device *sink; /* First get the selected sink from user space. */ if (event->attr.config2) { id = (u32)event->attr.config2; sink = coresight_get_sink_by_id(id); } else { sink = coresight_get_enabled_sink(true); } *sink always initialised - possibly to NULL which triggers the automatic sink selection. After commit: static void etm_setup_aux(...) struct coresight_device *sink; /* First get the selected sink from user space. */ if (event->attr.config2) { id = (u32)event->attr.config2; sink = coresight_get_sink_by_id(id); } *sink pointer uninitialised when not providing a sink on the perf command line. This breaks later checks to enable automatic sink selection. Fixes: bb1860efc817 ("coresight: etm: perf: Sink selection using sysfs is deprecated") Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201029164559.1268531-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit b9c0f4bd5b8114ee1773734e07cda921b6e8248b Merge: 598a597636f86 a2267f8a52eea Author: Linus Torvalds Date: Thu Oct 29 11:50:59 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "The good news is people are testing rc1 in the RDMA world - the bad news is testing of the for-next area is not as good as I had hoped, as we really should have caught at least the rdma_connect_locked() issue before now. Notable merge window regressions that didn't get caught/fixed in time for rc1: - Fix in kernel users of rxe, they were broken by the rapid fix to undo the uABI breakage in rxe from another patch - EFA userspace needs to read the GID table but was broken with the new GID table logic - Fix user triggerable deadlock in mlx5 using devlink reload - Fix deadlock in several ULPs using rdma_connect from the CM handler callbacks - Memory leak in qedr" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/qedr: Fix memory leak in iWARP CM RDMA: Add rdma_connect_locked() RDMA/uverbs: Fix false error in query gid IOCTL RDMA/mlx5: Fix devlink deadlock on net namespace deletion RDMA/rxe: Fix small problem in network_type patch commit 2734a24e6e5d18522fbf599135c59b82ec9b2c9e Author: Heiner Kallweit Date: Thu Oct 29 10:18:53 2020 +0100 r8169: fix issue with forced threading in combination with shared interrupts As reported by Serge flag IRQF_NO_THREAD causes an error if the interrupt is actually shared and the other driver(s) don't have this flag set. This situation can occur if a PCI(e) legacy interrupt is used in combination with forced threading. There's no good way to deal with this properly, therefore we have to remove flag IRQF_NO_THREAD. For fixing the original forced threading issue switch to napi_schedule(). Fixes: 424a646e072a ("r8169: fix operation under forced interrupt threading") Link: https://www.spinics.net/lists/netdev/msg694960.html Reported-by: Serge Belyshev Signed-off-by: Heiner Kallweit Tested-by: Serge Belyshev Link: https://lore.kernel.org/r/b5b53bfe-35ac-3768-85bf-74d1290cf394@gmail.com Signed-off-by: Jakub Kicinski commit eadd1befdd778a1eca57fad058782bd22b4db804 Author: Aleksandr Nogikh Date: Wed Oct 28 17:07:31 2020 +0000 netem: fix zero division in tabledist Currently it is possible to craft a special netlink RTM_NEWQDISC command that can result in jitter being equal to 0x80000000. It is enough to set the 32 bit jitter to 0x02000000 (it will later be multiplied by 2^6) or just set the 64 bit jitter via TCA_NETEM_JITTER64. This causes an overflow during the generation of uniformly distributed numbers in tabledist(), which in turn leads to division by zero (sigma != 0, but sigma * 2 is 0). The related fragment of code needs 32-bit division - see commit 9b0ed89 ("netem: remove unnecessary 64 bit modulus"), so switching to 64 bit is not an option. Fix the issue by keeping the value of jitter within the range that can be adequately handled by tabledist() - [0;INT_MAX]. As negative std deviation makes no sense, take the absolute value of the passed value and cap it at INT_MAX. Inside tabledist(), switch to unsigned 32 bit arithmetic in order to prevent overflows. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Aleksandr Nogikh Reported-by: syzbot+ec762a6342ad0d3c0d8f@syzkaller.appspotmail.com Acked-by: Stephen Hemminger Link: https://lore.kernel.org/r/20201028170731.1383332-1-aleksandrnogikh@gmail.com Signed-off-by: Jakub Kicinski commit 8fc3672a8ad3e782bac80e979bc2a2c10960cbe9 Author: Lijun Pan Date: Tue Oct 27 17:04:56 2020 -0500 ibmvnic: fix ibmvnic_set_mac Jakub Kicinski brought up a concern in ibmvnic_set_mac(). ibmvnic_set_mac() does this: ether_addr_copy(adapter->mac_addr, addr->sa_data); if (adapter->state != VNIC_PROBED) rc = __ibmvnic_set_mac(netdev, addr->sa_data); So if state == VNIC_PROBED, the user can assign an invalid address to adapter->mac_addr, and ibmvnic_set_mac() will still return 0. The fix is to validate ethernet address at the beginning of ibmvnic_set_mac(), and move the ether_addr_copy to the case of "adapter->state != VNIC_PROBED". Fixes: c26eba03e407 ("ibmvnic: Update reset infrastructure to support tunable parameters") Signed-off-by: Lijun Pan Link: https://lore.kernel.org/r/20201027220456.71450-1-ljp@linux.ibm.com Signed-off-by: Jakub Kicinski commit 2411cd82112397bfb9d8f0f19cd46c3d71e0ce67 Author: Joerg Roedel Date: Wed Oct 28 17:46:59 2020 +0100 x86/sev-es: Do not support MMIO to/from encrypted memory MMIO memory is usually not mapped encrypted, so there is no reason to support emulated MMIO when it is mapped encrypted. Prevent a possible hypervisor attack where a RAM page is mapped as an MMIO page in the nested page-table, so that any guest access to it will trigger a #VC exception and leak the data on that page to the hypervisor via the GHCB (like with valid MMIO). On the read side this attack would allow the HV to inject data into the guest. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Tom Lendacky Link: https://lkml.kernel.org/r/20201028164659.27002-6-joro@8bytes.org commit 9c3f94e1681bb0ebd93390f014082042d8bc067a Author: Paolo Abeni Date: Tue Oct 27 15:59:14 2020 +0100 mptcp: add missing memory scheduling in the rx path When moving the skbs from the subflow into the msk receive queue, we must schedule there the required amount of memory. Try to borrow the required memory from the subflow, if needed, so that we leverage the existing TCP heuristic. Fixes: 6771bfd9ee24 ("mptcp: update mptcp ack sequence from work queue") Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Link: https://lore.kernel.org/r/f6143a6193a083574f11b00dbf7b5ad151bc4ff4.1603810630.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 61334ed227a5852100115180f5535b1396ed5227 Author: Ville Syrjälä Date: Tue Oct 20 22:43:29 2020 +0300 drm/i915: Reject 90/270 degree rotated initial fbs We don't currently handle the initial fb readout correctly for 90/270 degree rotated scanout. Reject it. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201020194330.28568-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson (cherry picked from commit a40a8305a732f4ecc2186ac7ca132ba062ed770d) Signed-off-by: Rodrigo Vivi commit 5cbd7685b22823ebf432ec71eac1691b71c41037 Author: Ville Syrjälä Date: Wed Oct 21 16:14:39 2020 +0300 drm/i915: Restore ILK-M RPS support Restore RPS for ILK-M. We lost it when an extra HAS_RPS() check appeared in intel_rps_enable(). Unfortunaltey this just makes the performance worse on my ILK because intel_ips insists on limiting the GPU freq to the minimum. If we don't do the RPS init then intel_ips will not limit the frequency for whatever reason. Either it can't get at some required information and thus makes wrong decisions, or we mess up some weights/etc. and cause it to make the wrong decisions when RPS init has been done, or the entire thing is just wrong. Would require a bunch of reverse engineering to figure out what's going on. Cc: stable@vger.kernel.org Cc: Chris Wilson Fixes: 9c878557b1eb ("drm/i915/gt: Use the RPM config register to determine clk frequencies") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201021131443.25616-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson (cherry picked from commit 2bf06370bcfb0dea5655e9a5ad460c7f7dca7739) Signed-off-by: Rodrigo Vivi commit 09a729b178be1cb20ffce620f7e5bfc04c4a13c0 Author: Matthew Auld Date: Wed Oct 21 11:36:06 2020 +0100 drm/i915/region: fix max size calculation We are incorrectly limiting the max allocation size as per the mm max_order, which is effectively the largest power-of-two that we can fit in the region size. However, it's normal to setup the region or allocator with a non-power-of-two size(for example 3G), which we should already handle correctly, except it seems for the early too-big-check. v2: make sure we also exercise the I915_BO_ALLOC_CONTIGUOUS path, which is quite different, since for that we are actually limited by the largest power-of-two that we can fit within the region size. (Chris) Fixes: b908be543e44 ("drm/i915: support creating LMEM objects") Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: CQ Tang Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201021103606.241395-1-matthew.auld@intel.com (cherry picked from commit 83ebef47f8ebe320d5c5673db82f9903a4f40a69) Signed-off-by: Rodrigo Vivi commit 4169e889e5889405d54cec27d6e9f7f0ce3c7096 Author: Gustavo A. R. Silva Date: Wed Sep 2 23:25:55 2020 -0500 include: jhash/signal: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, explicitly add break statements instead of letting the code fall through to the next case. This patch adds four break statements that, together, fix almost 40,000 warnings when building Linux 5.10-rc1 with Clang 12.0.0 and this[1] change reverted. Notice that in order to enable -Wimplicit-fallthrough for Clang, such change[1] is meant to be reverted at some point. So, this patch helps to move in that direction. Something important to mention is that there is currently a discrepancy between GCC and Clang when dealing with switch fall-through to empty case statements or to cases that only contain a break/continue/return statement[2][3][4]. Now that the -Wimplicit-fallthrough option has been globally enabled[5], any compiler should really warn on missing either a fallthrough annotation or any of the other case-terminating statements (break/continue/return/ goto) when falling through to the next case statement. Making exceptions to this introduces variation in case handling which may continue to lead to bugs, misunderstandings, and a general lack of robustness. The point of enabling options like -Wimplicit-fallthrough is to prevent human error and aid developers in spotting bugs before their code is even built/ submitted/committed, therefore eliminating classes of bugs. So, in order to really accomplish this, we should, and can, move in the direction of addressing any error-prone scenarios and get rid of the unintentional fallthrough bug-class in the kernel, entirely, even if there is some minor redundancy. Better to have explicit case-ending statements than continue to have exceptions where one must guess as to the right result. The compiler will eliminate any actual redundancy. [1] commit e2079e93f562c ("kbuild: Do not enable -Wimplicit-fallthrough for clang for now") [2] https://github.com/ClangBuiltLinux/linux/issues/636 [3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91432 [4] https://godbolt.org/z/xgkvIh [5] commit a035d552a93b ("Makefile: Globally enable fall-through warning") Co-developed-by: Kees Cook Signed-off-by: Kees Cook Signed-off-by: Gustavo A. R. Silva commit 598a597636f8618a0520fd3ccefedaed9e4709b0 Merge: 58130a6cd0627 2d9900f26ad61 Author: Linus Torvalds Date: Thu Oct 29 10:13:09 2020 -0700 Merge tag 'afs-fixes-20201029' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS fixes from David Howells: - Fix copy_file_range() to an afs file now returning EINVAL if the splice_write file op isn't supplied. - Fix a deref-before-check in afs_unuse_cell(). - Fix a use-after-free in afs_xattr_get_acl(). - Fix afs to not try to clear PG_writeback when laundering a page. - Fix afs to take a ref on a page that it sets PG_private on and to drop that ref when clearing PG_private. This is done through recently added helpers. - Fix a page leak if write_begin() fails. - Fix afs_write_begin() to not alter the dirty region info stored in page->private, but rather do this in afs_write_end() instead when we know what we actually changed. - Fix afs_invalidatepage() to alter the dirty region info on a page when partial page invalidation occurs so that we don't inadvertantly include a span of zeros that will get written back if a page gets laundered due to a remote 3rd-party induced invalidation. We mustn't, however, reduce the dirty region if the page has been seen to be mapped (ie. we got called through the page_mkwrite vector) as the page might still be mapped and we might lose data if the file is extended again. - Fix the dirty region info to have a lower resolution if the size of the page is too large for this to be encoded (e.g. powerpc32 with 64K pages). Note that this might not be the ideal way to handle this, since it may allow some leakage of undirtied zero bytes to the server's copy in the case of a 3rd-party conflict. To aid the last two fixes, two additional changes: - Wrap the manipulations of the dirty region info stored in page->private into helper functions. - Alter the encoding of the dirty region so that the region bounds can be stored with one fewer bit, making a bit available for the indication of mappedness. * tag 'afs-fixes-20201029' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Fix dirty-region encoding on ppc32 with 64K pages afs: Fix afs_invalidatepage to adjust the dirty region afs: Alter dirty range encoding in page->private afs: Wrap page->private manipulations in inline functions afs: Fix where page->private is set during write afs: Fix page leak on afs_write_begin() failure afs: Fix to take ref on page when PG_private is set afs: Fix afs_launder_page to not clear PG_writeback afs: Fix a use after free in afs_xattr_get_acl() afs: Fix tracing deref-before-check afs: Fix copy_file_range() commit c9f09539e16e281f92a27760fdfae71e8af036f6 Author: Joerg Roedel Date: Wed Oct 28 17:46:58 2020 +0100 x86/head/64: Check SEV encryption before switching to kernel page-table When SEV is enabled, the kernel requests the C-bit position again from the hypervisor to build its own page-table. Since the hypervisor is an untrusted source, the C-bit position needs to be verified before the kernel page-table is used. Call sev_verify_cbit() before writing the CR3. [ bp: Massage. ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Tom Lendacky Link: https://lkml.kernel.org/r/20201028164659.27002-5-joro@8bytes.org commit 86ce43f7dde81562f58b24b426cef068bd9f7595 Author: Joerg Roedel Date: Wed Oct 28 17:46:57 2020 +0100 x86/boot/compressed/64: Check SEV encryption in 64-bit boot-path Check whether the hypervisor reported the correct C-bit when running as an SEV guest. Using a wrong C-bit position could be used to leak sensitive data from the guest to the hypervisor. The check function is in a separate file: arch/x86/kernel/sev_verify_cbit.S so that it can be re-used in the running kernel image. [ bp: Massage. ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Tom Lendacky Link: https://lkml.kernel.org/r/20201028164659.27002-4-joro@8bytes.org commit ceb1eb2fb609c88363e06618b8d4bbf7815a4e03 Author: Tung Nguyen Date: Tue Oct 27 10:24:03 2020 +0700 tipc: fix memory leak caused by tipc_buf_append() Commit ed42989eab57 ("tipc: fix the skb_unshare() in tipc_buf_append()") replaced skb_unshare() with skb_copy() to not reduce the data reference counter of the original skb intentionally. This is not the correct way to handle the cloned skb because it causes memory leak in 2 following cases: 1/ Sending multicast messages via broadcast link The original skb list is cloned to the local skb list for local destination. After that, the data reference counter of each skb in the original list has the value of 2. This causes each skb not to be freed after receiving ACK: tipc_link_advance_transmq() { ... /* release skb */ __skb_unlink(skb, &l->transmq); kfree_skb(skb); <-- memory exists after being freed } 2/ Sending multicast messages via replicast link Similar to the above case, each skb cannot be freed after purging the skb list: tipc_mcast_xmit() { ... __skb_queue_purge(pkts); <-- memory exists after being freed } This commit fixes this issue by using skb_unshare() instead. Besides, to avoid use-after-free error reported by KASAN, the pointer to the fragment is set to NULL before calling skb_unshare() to make sure that the original skb is not freed after freeing the fragment 2 times in case skb_unshare() returns NULL. Fixes: ed42989eab57 ("tipc: fix the skb_unshare() in tipc_buf_append()") Acked-by: Jon Maloy Reported-by: Thang Hoang Ngo Signed-off-by: Tung Nguyen Reviewed-by: Xin Long Acked-by: Cong Wang Link: https://lore.kernel.org/r/20201027032403.1823-1-tung.q.nguyen@dektech.com.au Signed-off-by: Jakub Kicinski commit 51467431200b91682b89d31317e35dcbca1469ce Author: Masahiro Fujiwara Date: Tue Oct 27 20:48:46 2020 +0900 gtp: fix an use-before-init in gtp_newlink() *_pdp_find() from gtp_encap_recv() would trigger a crash when a peer sends GTP packets while creating new GTP device. RIP: 0010:gtp1_pdp_find.isra.0+0x68/0x90 [gtp] Call Trace: gtp_encap_recv+0xc2/0x2e0 [gtp] ? gtp1_pdp_find.isra.0+0x90/0x90 [gtp] udp_queue_rcv_one_skb+0x1fe/0x530 udp_queue_rcv_skb+0x40/0x1b0 udp_unicast_rcv_skb.isra.0+0x78/0x90 __udp4_lib_rcv+0x5af/0xc70 udp_rcv+0x1a/0x20 ip_protocol_deliver_rcu+0xc5/0x1b0 ip_local_deliver_finish+0x48/0x50 ip_local_deliver+0xe5/0xf0 ? ip_protocol_deliver_rcu+0x1b0/0x1b0 gtp_encap_enable() should be called after gtp_hastable_new() otherwise *_pdp_find() will access the uninitialized hash table. Fixes: 1e3a3abd8b28 ("gtp: make GTP sockets in gtp_newlink optional") Signed-off-by: Masahiro Fujiwara Link: https://lore.kernel.org/r/20201027114846.3924-1-fujiwara.masahiro@gmail.com Signed-off-by: Jakub Kicinski commit 58130a6cd0627c52dad8d2268fd0c9a2ca4a23bf Merge: 23859ae44402f 6694875ef8045 Author: Linus Torvalds Date: Thu Oct 29 09:36:11 2020 -0700 Merge tag 'ext4_for_linus_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Bug fixes for the new ext4 fast commit feature, plus a fix for the 'data=journal' bug fix. Also use the generic casefolding support which has now landed in fs/libfs.c for 5.10" * tag 'ext4_for_linus_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: indicate that fast_commit is available via /sys/fs/ext4/feature/... ext4: use generic casefolding support ext4: do not use extent after put_bh ext4: use IS_ERR() for error checking of path ext4: fix mmap write protection for data=journal mode jbd2: fix a kernel-doc markup ext4: use s_mount_flags instead of s_mount_state for fast commit state ext4: make num of fast commit blocks configurable ext4: properly check for dirty state in ext4_inode_datasync_dirty() ext4: fix double locking in ext4_fc_commit_dentry_updates() commit 48ab6d5d1f096d6fac5b59f94af0aa394115a001 Author: Geert Uytterhoeven Date: Mon Oct 26 16:27:55 2020 +0100 dma-mapping: fix 32-bit overflow with CONFIG_ARM_LPAE=n On r8a7791/koelsch and shmobile_defconfig, PCIe probing fails with: rcar-pcie fe000000.pcie: Adjusted size 0x0 invalid rcar-pcie: probe of fe000000.pcie failed with error -22 of_dma_get_range() returns the following map: cpu_start 0x40000000 dma_start 0x40000000 size 0x080000000 offset 0 cpu_start 0x00000000 dma_start 0x00000000 size 0x100000000 offset 0 If CONFIG_ARM_LPAE=n, dma_addr_t is 32-bit. Hence when assigning r->dma_start + r->size to dma_end, this value will be truncated to 32-bit, yielding zero when processing the second table entry. Consequently, both dma_start and dma_end will be zero, leading to a zero size. Fix this by changing the dma_start and dma_end variables from dma_addr_t to u64. Fixes: e0d072782c734d27 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset") Signed-off-by: Geert Uytterhoeven Signed-off-by: Christoph Hellwig commit 2c334e12f957cd8c6bb66b4aa3f79848b7c33cab Author: Darrick J. Wong Date: Mon Oct 26 15:19:38 2020 -0700 xfs: set xefi_discard when creating a deferred agfl free log intent item Make sure that we actually initialize xefi_discard when we're scheduling a deferred free of an AGFL block. This was (eventually) found by the UBSAN while I was banging on realtime rmap problems, but it exists in the upstream codebase. While we're at it, rearrange the structure to reduce the struct size from 64 to 56 bytes. Fixes: fcb762f5de2e ("xfs: add bmapi nodiscard flag") Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 1f41be7d4e90e36084037cecba5978b3d7f849db Author: David Disseldorp Date: Mon Oct 26 22:03:10 2020 +0100 lib/scatterlist: use consistent sg_copy_buffer() return type sg_copy_buffer() returns a size_t with the number of bytes copied. Return 0 instead of false if the copy is skipped. Signed-off-by: David Disseldorp Reviewed-by: Douglas Gilbert Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 24bb45fddc09c5ed578eaa78dbb4f415729a2243 Merge: 7cb6e22ba011c 3c3751f2daf66 Author: Jens Axboe Date: Thu Oct 29 08:54:20 2020 -0600 Merge tag 'nvme-5.10-2020-10-29' of git://git.infradead.org/nvme into block-5.10 Pull NVMe fixes from Christoph: "nvme updates for 5.10: - improve zone revalidation (Keith Busch) - gracefully handle zero length messages in nvme-rdma (zhenwei pi) - nvme-fc error handling fixes (James Smart) - nvmet tracing NULL pointer dereference fix (Chaitanya Kulkarni)" * tag 'nvme-5.10-2020-10-29' of git://git.infradead.org/nvme: nvmet: fix a NULL pointer dereference when tracing the flush command nvme-fc: remove nvme_fc_terminate_io() nvme-fc: eliminate terminate_io use by nvme_fc_error_recovery nvme-fc: remove err_work work item nvme-fc: track error_recovery while connecting nvme-rdma: handle unexpected nvme completion data length nvme: ignore zone validate errors on subsequent scans commit 0698ac66e01019528f0db4191ae3aaf9978e67da Author: Ian Rogers Date: Tue Oct 27 16:36:46 2020 -0700 tools, bpftool: Remove two unused variables. Avoid an unused variable warning. Signed-off-by: Ian Rogers Signed-off-by: Daniel Borkmann Reviewed-by: Tobias Klauser Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201027233646.3434896-2-irogers@google.com commit 1e6f5dcc1b9ec9068f5d38331cec38b35498edf5 Author: Ian Rogers Date: Tue Oct 27 16:36:45 2020 -0700 tools, bpftool: Avoid array index warnings. The bpf_caps array is shorter without CAP_BPF, avoid out of bounds reads if this isn't defined. Working around this avoids -Wno-array-bounds with clang. Signed-off-by: Ian Rogers Signed-off-by: Daniel Borkmann Reviewed-by: Tobias Klauser Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201027233646.3434896-1-irogers@google.com commit 7cb6e22ba011c2dc1e94cc0dc94d9ef199715ed9 Author: Andy Shevchenko Date: Tue Oct 27 19:11:30 2020 +0200 xsysace: use platform_get_resource() and platform_get_irq_optional() Use platform_get_resource() to fetch the memory resource and platform_get_irq_optional() to get optional IRQ instead of open-coded variants. IRQ is not supposed to be changed at runtime, so there is no functional change in ace_fsm_yieldirq(). On the other hand we now take first resources instead of last ones to proceed. I can't imagine how broken should be firmware to have a garbage in the first resource slots. But if it the case, it needs to be documented. Signed-off-by: Andy Shevchenko Acked-by: Michal Simek Signed-off-by: Jens Axboe commit e5e1a4bc916d29958c3b587354293738fcb984d7 Author: Magnus Karlsson Date: Tue Oct 27 13:32:01 2020 +0100 xsk: Fix possible memory leak at socket close Fix a possible memory leak at xsk socket close that is caused by the refcounting of the umem object being wrong. The reference count of the umem was decremented only after the pool had been freed. Note that if the buffer pool is destroyed, it is important that the umem is destroyed after the pool, otherwise the umem would disappear while the driver is still running. And as the buffer pool needs to be destroyed in a work queue, the umem is also (if its refcount reaches zero) destroyed after the buffer pool in that same work queue. What was missing is that the refcount also needs to be decremented when the pool is not freed and when the pool has not even been created. The first case happens when the refcount of the pool is higher than 1, i.e. it is still being used by some other socket using the same device and queue id. In this case, it is safe to decrement the refcount of the umem outside of the work queue as the umem will never be freed because the refcount of the umem is always greater than or equal to the refcount of the buffer pool. The second case is if the buffer pool has not been created yet, i.e. the socket was closed before it was bound but after the umem was created. In this case, it is safe to destroy the umem outside of the work queue, since there is no pool that can use it by definition. Fixes: 1c1efc2af158 ("xsk: Create and free buffer pool independently from umem") Reported-by: syzbot+eb71df123dc2be2c1456@syzkaller.appspotmail.com Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1603801921-2712-1-git-send-email-magnus.karlsson@gmail.com commit 821f5c90130d15f8f725412d714d05df3b9e0fac Author: Andrii Nakryiko Date: Wed Oct 28 11:12:04 2020 -0700 bpf: Add struct bpf_redir_neigh forward declaration to BPF helper defs Forward-declare struct bpf_redir_neigh in bpf_helper_defs.h to avoid compiler warning about unknown structs. Fixes: ba452c9e996d ("bpf: Fix bpf_redirect_neigh helper api to support supplying nexthop") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20201028181204.111241-1-andrii@kernel.org commit 2d9900f26ad61e63a34f239bc76c80d2f8a6ff41 Author: David Howells Date: Wed Oct 28 12:08:39 2020 +0000 afs: Fix dirty-region encoding on ppc32 with 64K pages The dirty region bounds stored in page->private on an afs page are 15 bits on a 32-bit box and can, at most, represent a range of up to 32K within a 32K page with a resolution of 1 byte. This is a problem for powerpc32 with 64K pages enabled. Further, transparent huge pages may get up to 2M, which will be a problem for the afs filesystem on all 32-bit arches in the future. Fix this by decreasing the resolution. For the moment, a 64K page will have a resolution determined from PAGE_SIZE. In the future, the page will need to be passed in to the helper functions so that the page size can be assessed and the resolution determined dynamically. Note that this might not be the ideal way to handle this, since it may allow some leakage of undirtied zero bytes to the server's copy in the case of a 3rd-party conflict. Fixing that would require a separately allocated record and is a more complicated fix. Fixes: 4343d00872e1 ("afs: Get rid of the afs_writeback record") Reported-by: kernel test robot Signed-off-by: David Howells Reviewed-by: Matthew Wilcox (Oracle) commit f86726a69dec5df6ba051baf9265584419478b64 Author: David Howells Date: Thu Oct 22 14:08:23 2020 +0100 afs: Fix afs_invalidatepage to adjust the dirty region Fix afs_invalidatepage() to adjust the dirty region recorded in page->private when truncating a page. If the dirty region is entirely removed, then the private data is cleared and the page dirty state is cleared. Without this, if the page is truncated and then expanded again by truncate, zeros from the expanded, but no-longer dirty region may get written back to the server if the page gets laundered due to a conflicting 3rd-party write. It mustn't, however, shorten the dirty region of the page if that page is still mmapped and has been marked dirty by afs_page_mkwrite(), so a flag is stored in page->private to record this. Fixes: 4343d00872e1 ("afs: Get rid of the afs_writeback record") Signed-off-by: David Howells commit 65dd2d6072d393a3aa14ded8afa9a12f27d9c8ad Author: David Howells Date: Mon Oct 26 13:57:44 2020 +0000 afs: Alter dirty range encoding in page->private Currently, page->private on an afs page is used to store the range of dirtied data within the page, where the range includes the lower bound, but excludes the upper bound (e.g. 0-1 is a range covering a single byte). This, however, requires a superfluous bit for the last-byte bound so that on a 4KiB page, it can say 0-4096 to indicate the whole page, the idea being that having both numbers the same would indicate an empty range. This is unnecessary as the PG_private bit is clear if it's an empty range (as is PG_dirty). Alter the way the dirty range is encoded in page->private such that the upper bound is reduced by 1 (e.g. 0-0 is then specified the same single byte range mentioned above). Applying this to both bounds frees up two bits, one of which can be used in a future commit. This allows the afs filesystem to be compiled on ppc32 with 64K pages; without this, the following warnings are seen: ../fs/afs/internal.h: In function 'afs_page_dirty_to': ../fs/afs/internal.h:881:15: warning: right shift count >= width of type [-Wshift-count-overflow] 881 | return (priv >> __AFS_PAGE_PRIV_SHIFT) & __AFS_PAGE_PRIV_MASK; | ^~ ../fs/afs/internal.h: In function 'afs_page_dirty': ../fs/afs/internal.h:886:28: warning: left shift count >= width of type [-Wshift-count-overflow] 886 | return ((unsigned long)to << __AFS_PAGE_PRIV_SHIFT) | from; | ^~ Fixes: 4343d00872e1 ("afs: Get rid of the afs_writeback record") Signed-off-by: David Howells commit 185f0c7073bd5c78f86265f703f5daf1306ab5a7 Author: David Howells Date: Mon Oct 26 13:22:47 2020 +0000 afs: Wrap page->private manipulations in inline functions The afs filesystem uses page->private to store the dirty range within a page such that in the event of a conflicting 3rd-party write to the server, we write back just the bits that got changed locally. However, there are a couple of problems with this: (1) I need a bit to note if the page might be mapped so that partial invalidation doesn't shrink the range. (2) There aren't necessarily sufficient bits to store the entire range of data altered (say it's a 32-bit system with 64KiB pages or transparent huge pages are in use). So wrap the accesses in inline functions so that future commits can change how this works. Also move them out of the tracing header into the in-directory header. There's not really any need for them to be in the tracing header. Signed-off-by: David Howells commit f792e3ac82fe2c6c863e93187eb7ddfccab68fa7 Author: David Howells Date: Mon Oct 26 14:05:33 2020 +0000 afs: Fix where page->private is set during write In afs, page->private is set to indicate the dirty region of a page. This is done in afs_write_begin(), but that can't take account of whether the copy into the page actually worked. Fix this by moving the change of page->private into afs_write_end(). Fixes: 4343d00872e1 ("afs: Get rid of the afs_writeback record") Signed-off-by: David Howells commit 21db2cdc667f744691a407105b7712bc18d74023 Author: David Howells Date: Thu Oct 22 14:03:03 2020 +0100 afs: Fix page leak on afs_write_begin() failure Fix the leak of the target page in afs_write_begin() when it fails. Fixes: 15b4650e55e0 ("afs: convert to new aops") Signed-off-by: David Howells cc: Nick Piggin commit fa04a40b169fcee615afbae97f71a09332993f64 Author: David Howells Date: Wed Oct 21 13:22:19 2020 +0100 afs: Fix to take ref on page when PG_private is set Fix afs to take a ref on a page when it sets PG_private on it and to drop the ref when removing the flag. Note that in afs_write_begin(), a lot of the time, PG_private is already set on a page to which we're going to add some data. In such a case, we leave the bit set and mustn't increment the page count. As suggested by Matthew Wilcox, use attach/detach_page_private() where possible. Fixes: 31143d5d515e ("AFS: implement basic file write support") Reported-by: Matthew Wilcox (Oracle) Signed-off-by: David Howells Reviewed-by: Matthew Wilcox (Oracle) commit aa1c09cb65e2ed17cb8e652bc7ec84e0af1229eb Author: Damien Le Moal Date: Thu Oct 29 20:05:00 2020 +0900 null_blk: Fix locking in zoned mode When the zoned mode is enabled in null_blk, Serializing read, write and zone management operations for each zone is necessary to protect device level information for managing zone resources (zone open and closed counters) as well as each zone condition and write pointer position. Commit 35bc10b2eafb ("null_blk: synchronization fix for zoned device") introduced a spinlock to implement this serialization. However, when memory backing is also enabled, GFP_NOIO memory allocations are executed under the spinlock, resulting in might_sleep() warnings. Furthermore, the zone_lock spinlock is locked/unlocked using spin_lock_irq/spin_unlock_irq, similarly to the memory backing code with the nullb->lock spinlock. This nested use of irq locks wrecks the irq enabled/disabled state. Fix all this by introducing a bitmap for per-zone lock, with locking implemented using wait_on_bit_lock_io() and clear_and_wake_up_bit(). This locking mechanism allows keeping a zone locked while executing null_process_cmd(), serializing all operations to the zone while allowing to sleep during memory backing allocation with GFP_NOIO. Device level zone resource management information is protected using a spinlock which is not held while executing null_process_cmd(); Fixes: 35bc10b2eafb ("null_blk: synchronization fix for zoned device") Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe commit f9c9104288da543cd64f186f9e2fba389f415630 Author: Damien Le Moal Date: Thu Oct 29 20:04:59 2020 +0900 null_blk: Fix zone reset all tracing In the cae of the REQ_OP_ZONE_RESET_ALL operation, the command sector is ignored and the operation is applied to all sequential zones. For these commands, tracing the effect of the command using the command sector to determine the target zone is thus incorrect. Fix null_zone_mgmt() zone condition tracing in the case of REQ_OP_ZONE_RESET_ALL to apply tracing to all sequential zones that are not already empty. Fixes: 766c3297d7e1 ("null_blk: add trace in null_blk_zoned.c") Signed-off-by: Damien Le Moal Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe commit b40813ddcd6bf9f01d020804e4cb8febc480b9e4 Author: Ming Lei Date: Wed Oct 28 15:24:34 2020 +0800 nbd: don't update block size after device is started Mounted NBD device can be resized, one use case is rbd-nbd. Fix the issue by setting up default block size, then not touch it in nbd_size_update() any more. This kind of usage is aligned with loop which has same use case too. Cc: stable@vger.kernel.org Fixes: c8a83a6b54d0 ("nbd: Use set_blocksize() to set device blocksize") Reported-by: lining Signed-off-by: Ming Lei Cc: Josef Bacik Cc: Jan Kara Tested-by: lining Signed-off-by: Jens Axboe commit d1e7c2996e988866e7ceceb4641a0886885b7889 Author: Rafael J. Wysocki Date: Thu Oct 29 12:12:46 2020 +0100 cpufreq: schedutil: Always call driver if CPUFREQ_NEED_UPDATE_LIMITS is set Because sugov_update_next_freq() may skip a frequency update even if the need_freq_update flag has been set for the policy at hand, policy limits updates may not take effect as expected. For example, if the intel_pstate driver operates in the passive mode with HWP enabled, it needs to update the HWP min and max limits when the policy min and max limits change, respectively, but that may not happen if the target frequency does not change along with the limit at hand. In particular, if the policy min is changed first, causing the target frequency to be adjusted to it, and the policy max limit is changed later to the same value, the HWP max limit will not be updated to follow it as expected, because the target frequency is still equal to the policy min limit and it will not change until that limit is updated. To address this issue, modify get_next_freq() to let the driver callback run if the CPUFREQ_NEED_UPDATE_LIMITS cpufreq driver flag is set regardless of whether or not the new frequency to set is equal to the previous one. Fixes: f6ebbcf08f37 ("cpufreq: intel_pstate: Implement passive mode with HWP enabled") Reported-by: Zhang Rui Tested-by: Zhang Rui Cc: 5.9+ # 5.9+: 1c534352f47f cpufreq: Introduce CPUFREQ_NEED_UPDATE_LIMITS ... Cc: 5.9+ # 5.9+: a62f68f5ca53 cpufreq: Introduce cpufreq_driver_test_flags() Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit a62f68f5ca53ab61cba2f0a410d0add7a6d54a52 Author: Rafael J. Wysocki Date: Fri Oct 23 17:35:46 2020 +0200 cpufreq: Introduce cpufreq_driver_test_flags() Add a helper function to test the flags of the cpufreq driver in use againt a given flags mask. In particular, this will be needed to test the CPUFREQ_NEED_UPDATE_LIMITS cpufreq driver flag in the schedutil governor. Signed-off-by: Rafael J. Wysocki commit 96d389ca10110d7eefb46feb6af9a0c6832f78f5 Author: Rob Herring Date: Wed Oct 28 13:28:39 2020 -0500 arm64: Add workaround for Arm Cortex-A77 erratum 1508412 On Cortex-A77 r0p0 and r1p0, a sequence of a non-cacheable or device load and a store exclusive or PAR_EL1 read can cause a deadlock. The workaround requires a DMB SY before and after a PAR_EL1 register read. In addition, it's possible an interrupt (doing a device read) or KVM guest exit could be taken between the DMB and PAR read, so we also need a DMB before returning from interrupt and before returning to a guest. A deadlock is still possible with the workaround as KVM guests must also have the workaround. IOW, a malicious guest can deadlock an affected systems. This workaround also depends on a firmware counterpart to enable the h/w to insert DMB SY after load and store exclusive instructions. See the errata document SDEN-1152370 v10 [1] for more information. [1] https://static.docs.arm.com/101992/0010/Arm_Cortex_A77_MP074_Software_Developer_Errata_Notice_v10.pdf Signed-off-by: Rob Herring Reviewed-by: Catalin Marinas Acked-by: Marc Zyngier Cc: Catalin Marinas Cc: James Morse Cc: Suzuki K Poulose Cc: Will Deacon Cc: Julien Thierry Cc: kvmarm@lists.cs.columbia.edu Link: https://lore.kernel.org/r/20201028182839.166037-2-robh@kernel.org Signed-off-by: Will Deacon commit 8a6b88e66233f5f1779b0a1342aa9dc030dddcd5 Author: Rob Herring Date: Wed Oct 28 13:28:38 2020 -0500 arm64: Add part number for Arm Cortex-A77 Add the MIDR part number info for the Arm Cortex-A77. Signed-off-by: Rob Herring Acked-by: Catalin Marinas Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20201028182839.166037-1-robh@kernel.org Signed-off-by: Will Deacon commit ed7b895f3efb5df184722f5a30f8164fcaffceb1 Author: Joerg Roedel Date: Wed Oct 28 17:46:56 2020 +0100 x86/boot/compressed/64: Sanity-check CPUID results in the early #VC handler The early #VC handler which doesn't have a GHCB can only handle CPUID exit codes. It is needed by the early boot code to handle #VC exceptions raised in verify_cpu() and to get the position of the C-bit. But the CPUID information comes from the hypervisor which is untrusted and might return results which trick the guest into the no-SEV boot path with no C-bit set in the page-tables. All data written to memory would then be unencrypted and could leak sensitive data to the hypervisor. Add sanity checks to the early #VC handler to make sure the hypervisor can not pretend that SEV is disabled. [ bp: Massage a bit. ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Tom Lendacky Link: https://lkml.kernel.org/r/20201028164659.27002-3-joro@8bytes.org commit 5e31ba0c0543a04483b53151eb5b7413efece94c Author: Martin Hundebøll Date: Wed Oct 14 11:02:30 2020 +0200 spi: bcm2835: fix gpio cs level inversion The work on improving gpio chip-select in spi core, and the following fixes, has caused the bcm2835 spi driver to use wrong levels. Fix this by simply removing level handling in the bcm2835 driver, and let the core do its work. Fixes: 3e5ec1db8bfe ("spi: Fix SPI_CS_HIGH setting when using native and GPIO CS") Cc: Signed-off-by: Martin Hundebøll Link: https://lore.kernel.org/r/20201014090230.2706810-1-martin@geanix.com Signed-off-by: Mark Brown commit 6ec6c3693a389841d8ca952072aea8020da54ef4 Author: V Sujith Kumar Reddy Date: Mon Oct 19 14:36:03 2020 +0530 ASoC: qcom: lpass-cpu: Fix clock disable failure Disable MI2S bit clock from PAUSE/STOP/SUSPEND usecase instead of shutdown time. Acheive this by invoking clk_disable API from cpu daiops trigger instead of cpu daiops shutdown. Change non-atomic API "clk_prepare_enable" to atomic API "clk_enable" in trigger, as trigger is being called from atomic context. Fixes: 7e6799d8f87d ("ASoC: qcom: lpass-cpu: Enable MI2S BCLK and LRCLK together") Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1603098363-9251-1-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit cf9d21984da2c8e852320d12c03ddb7d11760a32 Author: V Sujith Kumar Reddy Date: Tue Oct 27 17:04:34 2020 +0530 ASoC: qcom: lpass-sc7180: Fix MI2S bitwidth field bit positions Update SC7180 lpass_variant structure with proper I2S bitwidth field bit positions, as bitwidth denotes 0 to 1 bits, but previously used only 0 bit. Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1603798474-4897-1-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 5c7e02a896689407555b3a10d6ed87369c70916e Author: Hans de Goede Date: Mon Oct 26 16:46:06 2020 +0100 HID: i2c-hid: Put ACPI enumerated devices in D3 on shutdown The i2c-hid driver would quietly fail to probe the i2c-hid sensor-hub with an ACPI device-id of SMO91D0 every other boot. Specifically, the i2c_smbus_read_byte() "Make sure there is something at this address" check would fail every other boot. It seems that the BIOS does not properly reset/power-cycle the device leaving it in a confused state where it refuses to respond to i2c-xfers. On boots where probing the device failed, the driver-core puts the device in D3 after the probe-failure, which causes the probe to succeed the next boot. Putting the device in D3 from the shutdown-handler fixes the sensors not working every other boot. This has been tested on both a Lenovo Miix 2-10 and a Dell Venue 8 Pro 5830 both of which use an i2c-hid sensor-hub with an ACPI id of SMO91D0. Note that it is safe to call acpi_device_set_power() with a NULL pointer as first argument, so on none ACPI enumerated devices this change is a no-op. Cc: Kai-Heng Feng Signed-off-by: Hans de Goede Acked-by: Kai-Heng Feng Signed-off-by: Jiri Kosina commit 5fca3f062879f8e5214c56f3e3e2be6727900f5d Author: Peter Chen Date: Thu Oct 22 08:55:03 2020 +0800 usb: cdns3: gadget: suspicious implicit sign extension The code: trb->length = cpu_to_le32(TRB_BURST_LEN(priv_ep->trb_burst_size) | TRB_LEN(length)); TRB_BURST_LEN(priv_ep->trb_burst_size) may be overflow for int 32 if priv_ep->trb_burst_size is equal or larger than 0x80; Below is the Coverity warning: sign_extension: Suspicious implicit sign extension: priv_ep->trb_burst_size with type u8 (8 bits, unsigned) is promoted in priv_ep->trb_burst_size << 24 to type int (32 bits, signed), then sign-extended to type unsigned long (64 bits, unsigned). If priv_ep->trb_burst_size << 24 is greater than 0x7FFFFFFF, the upper bits of the result will all be 1. To fix it, it needs to add an explicit cast to unsigned int type for ((p) << 24). Reviewed-by: Jun Li Signed-off-by: Peter Chen commit 3ad84246a4097010f3ae3d6944120c0be00e9e7a Author: Joerg Roedel Date: Wed Oct 28 17:46:55 2020 +0100 x86/boot/compressed/64: Introduce sev_status Introduce sev_status and initialize it together with sme_me_mask to have an indicator which SEV features are enabled. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Tom Lendacky Link: https://lkml.kernel.org/r/20201028164659.27002-2-joro@8bytes.org commit 107954afc5df667da438644aa4982606663f9b17 Author: Nenad Peric Date: Wed Oct 28 12:58:17 2020 +0100 arm64: dts: allwinner: h5: OrangePi Prime: Fix ethernet node RX and TX delay are provided by ethernet PHY. Reflect that in ethernet node. Fixes: 44a94c7ef989 ("arm64: dts: allwinner: H5: Restore EMAC changes") Signed-off-by: Nenad Peric Signed-off-by: Maxime Ripard Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201028115817.68113-1-nperic@gmail.com commit 5066f42c7d3c7766c16ba6e73da514af04d43ff7 Author: Maxime Ripard Date: Wed Oct 28 13:37:52 2020 +0100 drm/vc4: Rework the structure conversion functions Most of the helpers to retrieve vc4 structures from the DRM base structures rely on the fact that the first member of the vc4 structure is the DRM one and just cast the pointers between them. However, this is pretty fragile especially since there's no check to make sure that the DRM structure is indeed at the offset 0 in the structure, so let's use container_of to make it more robust. Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20201028123752.1733242-1-maxime@cerno.tech commit a3a0ded3ed38f4eafa86cef61799d50250da4dbe Author: Maxime Ripard Date: Wed Jul 8 16:45:55 2020 +0200 drm/vc4: hdmi: Add a name to the codec DAI component Since the components for a given device in ASoC are identified by their name, it makes sense to add one even though it's not strictly necessary. Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20200708144555.718404-1-maxime@cerno.tech commit 0f5cef2b2904b8d41d34ecb6c5d5bf2f00562b1b Author: Arnd Bergmann Date: Mon Oct 26 17:01:54 2020 +0100 coresight: add module license When built as a loadable module, coresight now causes a warning about missing license information. WARNING: modpost: missing MODULE_LICENSE() in drivers/hwtracing/coresight/coresight.o Fixes: 8e264c52e1da ("coresight: core: Allow the coresight core driver to be built as a module") Signed-off-by: Arnd Bergmann Cc: Mathieu Poirier Link: https://lore.kernel.org/r/20201026160205.3704789-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 712da5fc4a66fbb1f144742e1b808498e932009b Author: Mathias Nyman Date: Wed Oct 28 22:31:24 2020 +0200 xhci: Don't create stream debugfs files with spinlock held. Creating debugfs files while loding the spin_lock_irqsave(xhci->lock) creates a lock dependecy that could possibly deadlock. Lockdep warns: ===================================================== WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected 5.10.0-rc1pdx86+ #8 Not tainted ----------------------------------------------------- systemd-udevd/386 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: ffffffffb1a94038 (pin_fs_lock){+.+.}-{2:2}, at: simple_pin_fs+0x22/0xa0 and this task is already holding: ffff9e7b87fbc430 (&xhci->lock){-.-.}-{2:2}, at: xhci_alloc_streams+0x5f9/0x810 which would create a new lock dependency: (&xhci->lock){-.-.}-{2:2} -> (pin_fs_lock){+.+.}-{2:2} Create the files a bit later after lock is released. Fixes: 673d74683627 ("usb: xhci: add debugfs support for ep with stream") CC: Li Jun Reported-by: Hans de Goede Reported-by: Mike Galbraith Tested-by: Hans de Goede Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20201028203124.375344-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2a632815683d2d34df52b701a36fe5ac6654e719 Author: Sandeep Singh Date: Wed Oct 28 22:31:23 2020 +0200 usb: xhci: Workaround for S3 issue on AMD SNPS 3.0 xHC On some platform of AMD, S3 fails with HCE and SRE errors. To fix this, need to disable a bit which is enable in sparse controller. Cc: stable@vger.kernel.org #v4.19+ Signed-off-by: Sanket Goswami Signed-off-by: Sandeep Singh Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20201028203124.375344-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a75e2d604da8219d928be010bde37c3ab0ebd466 Author: Colin Ian King Date: Wed Oct 28 22:31:22 2020 +0200 xhci: Fix sizeof() mismatch An incorrect sizeof() is being used, sizeof(rhub->ports) is not correct, it should be sizeof(*rhub->ports). This bug did not cause any issues because it just so happens the sizes are the same. Fixes: bcaa9d5c5900 ("xhci: Create new structures to store xhci port information") Signed-off-by: Colin Ian King Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20201028203124.375344-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit befa1c2d65c639a7aefa793d36d7229732f14642 Author: Amelie Delaunay Date: Wed Oct 28 17:33:09 2020 +0100 usb: typec: stusb160x: fix signedness comparison issue with enum variables chip->port_type and chip->pwr_opmode are enums and when GCC considers them as unsigned, the conditions are never met. This patch takes advantage of the ret variable and fixes the following warnings: drivers/usb/typec/stusb160x.c:548 stusb160x_get_fw_caps() warn: unsigned 'chip->port_type' is never less than zero. drivers/usb/typec/stusb160x.c:570 stusb160x_get_fw_caps() warn: unsigned 'chip->pwr_opmode' is never less than zero. Fixes: da0cb6310094 ("usb: typec: add support for STUSB160x Type-C controller family") Reported-by: kernel test robot Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20201028163309.12878-1-amelie.delaunay@st.com Signed-off-by: Greg Kroah-Hartman commit f27891abb7930d7a92bee2a47648a4a8708652d3 Author: Amelie Delaunay Date: Wed Oct 28 16:17:03 2020 +0100 usb: typec: add missing MODULE_DEVICE_TABLE() to stusb160x When stusb160x driver is built as a module, no modalias information is available, and it prevents the module to be loaded by udev. Add MODULE_DEVICE_TABLE() to fix this issue. Fixes: da0cb6310094 ("usb: typec: add support for STUSB160x Type-C controller family") Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20201028151703.31195-1-amelie.delaunay@st.com Signed-off-by: Greg Kroah-Hartman commit 8d8c3131248d7e9c6c8ab448e1c6cb6bd7755e9c Author: Arnd Bergmann Date: Mon Oct 26 17:13:57 2020 +0100 clk: define to_clk_regmap() as inline function Nesting container_of() causes warnings with W=2, which is annoying if it happens in headers and fills the build log like: In file included from drivers/clk/qcom/clk-alpha-pll.c:6: drivers/clk/qcom/clk-alpha-pll.c: In function 'clk_alpha_pll_hwfsm_enable': include/linux/kernel.h:852:8: warning: declaration of '__mptr' shadows a previous local [-Wshadow] 852 | void *__mptr = (void *)(ptr); \ | ^~~~~~ drivers/clk/qcom/clk-alpha-pll.c:155:31: note: in expansion of macro 'container_of' 155 | #define to_clk_alpha_pll(_hw) container_of(to_clk_regmap(_hw), \ | ^~~~~~~~~~~~ drivers/clk/qcom/clk-regmap.h:27:28: note: in expansion of macro 'container_of' 27 | #define to_clk_regmap(_hw) container_of(_hw, struct clk_regmap, hw) | ^~~~~~~~~~~~ drivers/clk/qcom/clk-alpha-pll.c:155:44: note: in expansion of macro 'to_clk_regmap' 155 | #define to_clk_alpha_pll(_hw) container_of(to_clk_regmap(_hw), \ | ^~~~~~~~~~~~~ drivers/clk/qcom/clk-alpha-pll.c:254:30: note: in expansion of macro 'to_clk_alpha_pll' 254 | struct clk_alpha_pll *pll = to_clk_alpha_pll(hw); | ^~~~~~~~~~~~~~~~ include/linux/kernel.h:852:8: note: shadowed declaration is here 852 | void *__mptr = (void *)(ptr); \ | ^~~~~~ Redefine two copies of the to_clk_regmap() macro as inline functions to avoid a lot of these. Fixes: ea11dda9e091 ("clk: meson: add regmap clocks") Fixes: 085d7a455444 ("clk: qcom: Add a regmap type clock struct") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201026161411.3708639-1-arnd@kernel.org Acked-by: Jerome Brunet Signed-off-by: Stephen Boyd commit cd12e4f14f7cca7d04fbcf0da2dc116070d7f26f Author: Krzysztof Kozlowski Date: Fri Oct 16 17:15:28 2020 +0200 CREDITS: remove trailing white spaces Remove trailing white spaces. No functional/substantive change. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201016151528.7553-4-krzk@kernel.org commit d5a69b6ba186d01cb036074d337e5171d27e9c72 Author: Krzysztof Kozlowski Date: Fri Oct 16 17:15:27 2020 +0200 MAINTAINERS: remove Jeongtae Park from Samsung MFC entry Jeongtae Park has not been active on LKML: https://lore.kernel.org/lkml/?q=f%3A%22Jeongtae+Park%22 Remove him from the Samsung S5P MFC driver entry. Signed-off-by: Krzysztof Kozlowski Cc: Jeongtae Park Cc: Andrzej Hajda Link: https://lore.kernel.org/r/20201016151528.7553-3-krzk@kernel.org commit 215f06d7efc263d4e8150e0b97c49dd9914b59d7 Author: Krzysztof Kozlowski Date: Fri Oct 16 17:16:17 2020 +0200 MAINTAINERS: move Kyungmin Park to credits Kyungmin Park maintained and contributed to some of the upstreamed S5Pv210 and Exynos4210 machines - as described in commit 10ffa96407b2 ("MAINTAINERS: add maintainer of Samsung Mobile Machine support"). However the entry in maintainers got slightly twisted by commit 004bbd3c01d4 ("MAINTAINERS: remove non existent files") - the directory matching pattern was changed from specific machines to the entire S5Pv210. Anyway since long time, all S5Pv210 maintenance is covered by the Samsung ARM architectures maintainer entry and Krzysztof Kozlowski, so move Kyungmin Park to the CREDITS. There was also no activity on LKML regarding other maintained drivers: https://lore.kernel.org/lkml/?q=f%3A%22Kyungmin+Park%22 Dear Kyungmin Park, thank you for all the effort you put in to the upstream Samsung support. Signed-off-by: Krzysztof Kozlowski Cc: Kyungmin Park Cc: Andrzej Hajda Cc: Sylwester Nawrocki Cc: Arnd Bergmann Cc: Olof Johansson Link: https://lore.kernel.org/r/20201016151528.7553-1-krzk@kernel.org commit 424f5ca7c8515a4b6e3b0812899ddda082f42fd5 Author: Krzysztof Kozlowski Date: Fri Oct 16 17:15:25 2020 +0200 MAINTAINERS: move Kamil Debski to credits Kamil Debski has not been active on LKML since 2017: https://lore.kernel.org/lkml/?q=f%3A%22Kamil+Debski%22 Move Kamil Debski to the CREDITS file. Thank you for the effort you put in to the upstream Linux kernel work. Signed-off-by: Krzysztof Kozlowski Acked-by: Mauro Carvalho Chehab Cc: Kamil Debski Cc: Andrzej Hajda Cc: Bartlomiej Zolnierkiewicz Cc: Sylwester Nawrocki Link: https://lore.kernel.org/r/20201016151528.7553-1-krzk@kernel.org commit f59cddd8517ab880fb09bf1465b07b337e058b22 Merge: 43c3e148830aa 3650b228f83ad Author: Mark Brown Date: Wed Oct 28 21:37:38 2020 +0000 Merge tag 'v5.10-rc1' into regulator-5.10 Linux 5.10-rc1 commit 3bfd5f422f07a10f485c3f046431783c7c4004f2 Merge: 43b6bf406cd03 3650b228f83ad Author: Mark Brown Date: Wed Oct 28 21:36:51 2020 +0000 Merge tag 'v5.10-rc1' into spi-5.10 Linux 5.10-rc1 commit ce038aeaee68f2e41c732b4b91c7185a1cac14b5 Merge: 6d6bc54ab4f24 3650b228f83ad Author: Mark Brown Date: Wed Oct 28 21:36:35 2020 +0000 Merge tag 'v5.10-rc1' into asoc-5.10 Linux 5.10-rc1 commit 77f6ab8b7768cf5e6bdd0e72499270a0671506ee Author: Al Viro Date: Wed Oct 28 16:39:49 2020 -0400 don't dump the threads that had been already exiting when zapped. Coredump logics needs to report not only the registers of the dumping thread, but (since 2.5.43) those of other threads getting killed. Doing that might require extra state saved on the stack in asm glue at kernel entry; signal delivery logics does that (we need to be able to save sigcontext there, at the very least) and so does seccomp. That covers all callers of do_coredump(). Secondary threads get hit with SIGKILL and caught as soon as they reach exit_mm(), which normally happens in signal delivery, so those are also fine most of the time. Unfortunately, it is possible to end up with secondary zapped when it has already entered exit(2) (or, worse yet, is oopsing). In those cases we reach exit_mm() when mm->core_state is already set, but the stack contents is not what we would have in signal delivery. At least on two architectures (alpha and m68k) it leads to infoleaks - we end up with a chunk of kernel stack written into coredump, with the contents consisting of normal C stack frames of the call chain leading to exit_mm() instead of the expected copy of userland registers. In case of alpha we leak 312 bytes of stack. Other architectures (including the regset-using ones) might have similar problems - the normal user of regsets is ptrace and the state of tracee at the time of such calls is special in the same way signal delivery is. Note that had the zapper gotten to the exiting thread slightly later, it wouldn't have been included into coredump anyway - we skip the threads that have already cleared their ->mm. So let's pretend that zapper always loses the race. IOW, have exit_mm() only insert into the dumper list if we'd gotten there from handling a fatal signal[*] As the result, the callers of do_exit() that have *not* gone through get_signal() are not seen by coredump logics as secondary threads. Which excludes voluntary exit()/oopsen/traps/etc. The dumper thread itself is unaffected by that, so seccomp is fine. [*] originally I intended to add a new flag in tsk->flags, but ebiederman pointed out that PF_SIGNALED is already doing just what we need. Cc: stable@vger.kernel.org Fixes: d89f3847def4 ("[PATCH] thread-aware coredumps, 2.5.43-C3") History-tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git Acked-by: "Eric W. Biederman" Signed-off-by: Al Viro commit 23859ae44402f4d935b9ee548135dd1e65e2cbf4 Merge: ed8780e3f2ecc 761a8c58db6bc Author: Linus Torvalds Date: Wed Oct 28 12:05:14 2020 -0700 Merge tag 'trace-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Fix synthetic event "strcat" overrun New synthetic event code used strcat() and miscalculated the ending, causing the concatenation to write beyond the allocated memory. Instead of using strncat(), the code is switched over to seq_buf which has all the mechanisms in place to protect against writing more than what is allocated, and cleans up the code a bit" * tag 'trace-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing, synthetic events: Replace buggy strcat() with seq_buf operations commit 80ade22c06ca115b81dd168e99479c8e09843513 Author: Sudeep Dutt Date: Tue Oct 27 20:14:15 2020 -0700 misc: mic: remove the MIC drivers This patch removes the MIC drivers from the kernel tree since the corresponding devices have been discontinued. Removing the dma and char-misc changes in one patch and merging via the char-misc tree is best to avoid any potential build breakage. Cc: Nikhil Rao Reviewed-by: Ashutosh Dixit Signed-off-by: Sudeep Dutt Acked-By: Vinod Koul Reviewed-by: Sherry Sun Link: https://lore.kernel.org/r/8c1443136563de34699d2c084df478181c205db4.1603854416.git.sudeep.dutt@intel.com Signed-off-by: Greg Kroah-Hartman commit 5a169bf04cd2bfdbac967d12eb5b70915b29d7ee Author: David Woodhouse Date: Mon Oct 19 15:55:56 2020 +0100 x86/kvm: Reserve KVM_FEATURE_MSI_EXT_DEST_ID No functional change; just reserve the feature bit for now so that VMMs can start to implement it. This will allow the host to indicate that MSI emulation supports 15-bit destination IDs, allowing up to 32768 CPUs without interrupt remapping. cf. https://patchwork.kernel.org/patch/11816693/ for qemu Signed-off-by: David Woodhouse Acked-by: Paolo Bonzini Message-Id: <4cd59bed05f4b7410d3d1ffd1e997ab53683874d.camel@infradead.org> Signed-off-by: Paolo Bonzini commit ef5dd6a0c828b6fbd9d595e5772fcb51ff86697e Author: Catalin Marinas Date: Wed Oct 28 14:55:24 2020 +0000 arm64: mte: Document that user PSTATE.TCO is ignored by kernel uaccess On exception entry, the kernel explicitly resets the PSTATE.TCO (tag check override) so that any kernel memory accesses will be checked (the bit is restored on exception return). This has the side-effect that the uaccess routines will not honour the PSTATE.TCO that may have been set by the user prior to a syscall. There is no issue in practice since PSTATE.TCO is expected to be used only for brief periods in specific routines (e.g. garbage collection). To control the tag checking mode of the uaccess routines, the user will have to invoke a corresponding prctl() call. Document the kernel behaviour w.r.t. PSTATE.TCO accordingly. Signed-off-by: Catalin Marinas Fixes: df9d7a22dd21 ("arm64: mte: Add Memory Tagging Extension documentation") Reviewed-by: Vincenzo Frascino Cc: Will Deacon Cc: Szabolcs Nagy Signed-off-by: Will Deacon commit 6694875ef8045cdb1e6712ee9b68fe08763507d8 Author: Theodore Ts'o Date: Wed Oct 28 13:39:13 2020 -0400 ext4: indicate that fast_commit is available via /sys/fs/ext4/feature/... Signed-off-by: Theodore Ts'o commit f8f4acb6cded4e455b2d390ce2221391fc3f09ee Author: Daniel Rosenberg Date: Wed Oct 28 05:08:20 2020 +0000 ext4: use generic casefolding support This switches ext4 over to the generic support provided in libfs. Since casefolded dentries behave the same in ext4 and f2fs, we decrease the maintenance burden by unifying them, and any optimizations will immediately apply to both. Signed-off-by: Daniel Rosenberg Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20201028050820.1636571-1-drosen@google.com Signed-off-by: Theodore Ts'o commit d7dce9e08595e80bf8039a81794809c66fe26431 Author: yangerkun Date: Wed Oct 28 13:56:17 2020 +0800 ext4: do not use extent after put_bh ext4_ext_search_right() will read more extent blocks and call put_bh after we get the information we need. However, ret_ex will break this and may cause use-after-free once pagecache has been freed. Fix it by copying the extent structure if needed. Signed-off-by: yangerkun Link: https://lore.kernel.org/r/20201028055617.2569255-1-yangerkun@huawei.com Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 8c9be1e58a8dc03ef815ca51ece95c5e6862b25e Author: Harshad Shirwadkar Date: Tue Oct 27 13:43:42 2020 -0700 ext4: use IS_ERR() for error checking of path With this fix, fast commit recovery code uses IS_ERR() for path returned by ext4_find_extent. Fixes: 8016e29f4362 ("ext4: fast commit recovery path") Reported-by: Dan Carpenter Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201027204342.2794949-1-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 6fee9372e0af63f557ad234663d8248f3caefc37 Merge: e051955977b7e afc74ce7b484d Author: Jonathan Corbet Date: Wed Oct 28 11:42:55 2020 -0600 Merge branch 'mauro-warnings' into docs-next Mauro says: This series contain the patches from a previous series I sent: [PATCH v2 00/24] Documentation build fixes against next-20201013 Plus other patches I sent later, against other versions of linux-next between 20201013 and v5.10-rc1. It fixes most of the remaining documentation build warnings. There were some changes from v2, as I changed some patches due to the feedback received, and added reviewed-by/acked-by to several of them. After this series, there will be just 3 warnings at include/kunit/test.h, whose fixes were already applied by Shuah via her tree at linux-next. Hopefully, she will be sending it upstream anytime toon. So, I dropped the fix from my trees. The vast majority of patches here are also on my linux-next tree, as my original plan were to send them upstream by the end of the merge window. I'll drop from it once they get merged. As those patches are fixes, I guess it should be ok to get them merged for -rc2 or -rc3. [jc: removed DRM and JBD patches applied elsewhere] commit b5b18160a3e7a9f55e3528d77051670cca6d9314 Author: Jan Kara Date: Tue Oct 27 14:27:51 2020 +0100 ext4: fix mmap write protection for data=journal mode Commit afb585a97f81 "ext4: data=journal: write-protect pages on j_submit_inode_data_buffers()") added calls ext4_jbd2_inode_add_write() to track inode ranges whose mappings need to get write-protected during transaction commits. However the added calls use wrong start of a range (0 instead of page offset) and so write protection is not necessarily effective. Use correct range start to fix the problem. Fixes: afb585a97f81 ("ext4: data=journal: write-protect pages on j_submit_inode_data_buffers()") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20201027132751.29858-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit ea4b01d9b81f5f381fc6832bc31046878a2d1a5d Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:27 2020 +0100 jbd2: fix a kernel-doc markup The kernel-doc markup that documents _fc_replay_callback is missing an asterisk, causing this warning: ../include/linux/jbd2.h:1271: warning: Function parameter or member 'j_fc_replay_callback' not described in 'journal_s' When building the docs. Fixes: 609f928af48f ("jbd2: fast commit recovery path") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6055927ada2015b55b413cdd2670533bdc9a8da2.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Theodore Ts'o commit ababea77bc50e004f7cc2792f0ec8d26b7574c3e Author: Harshad Shirwadkar Date: Mon Oct 26 21:49:15 2020 -0700 ext4: use s_mount_flags instead of s_mount_state for fast commit state Ext4's fast commit related transient states should use sb->s_mount_flags instead of persistent sb->s_mount_state. Fixes: 8016e29f4362 ("ext4: fast commit recovery path") Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201027044915.2553163-3-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit e029c5f2798720b463e8df0e184a4d1036311b43 Author: Harshad Shirwadkar Date: Mon Oct 26 21:49:14 2020 -0700 ext4: make num of fast commit blocks configurable This patch reserves a field in the jbd2 superblock for number of fast commit blocks. When this value is non-zero, Ext4 uses this field to set the number of fast commit blocks. Fixes: 6866d7b3f2bb ("ext4/jbd2: add fast commit initialization") Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201027044915.2553163-2-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit afc74ce7b484da5c5698d8eb2472a58c547cbc2b Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:36 2020 +0100 docs: SafeSetID: fix a warning As reported by Sphinx 2.4.4: docs/Documentation/admin-guide/LSM/SafeSetID.rst:110: WARNING: Title underline too short. Note on GID policies and setgroups() ================== Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4afa281c170daabd1ce522653d5d5d5078ebd92c.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit b28d70c6a515580b29ce2be53e585bd86c8b8c8c Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:34 2020 +0100 amdgpu: fix a few kernel-doc markup issues A kernel-doc markup can't be mixed with a random comment, as it causes parsing problems. While here, change an invalid kernel-doc markup into a common comment. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/e899f50404e94ac9a7c3267dd34f951c1a44fb2b.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit d2692abd6fa9866fda3052efa5cbd116b9fec56b Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:33 2020 +0100 selftests: kselftest_harness.h: fix kernel-doc markups The kernel-doc markups there is violating the expected syntax, causing it to not parse the name of the markup identifier properly, preventing it to check if the kernel-doc matches the #define below each markup. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/697640045663f1366beb15e76e78b420dac5f5a2.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 9cd70d05132266128ccfa3d61264ef061568f049 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:32 2020 +0100 drm: amdgpu_dm: fix a typo dm_comressor_info -> dm_compressor_info The kernel-doc markup is right, but the struct itself and their references contain a typo. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9de495fa791596609eb2e73ba71cea99e09b2689.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit cc507c435b05b23f62ae32c092de2da972a98d8e Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:30 2020 +0100 gpu: docs: amdgpu.rst: get rid of wrong kernel-doc markups As reported by kernel-doc: ./drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:1: warning: no structured comments found ./drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1: warning: no structured comments found Those files only contain /** * DOC: */ markups, but they're included twice there: one to parse such markup, and another one to parse internal functions. In the case of amdgpu_xgmi.c, as it has just one such markup, we can simply include the file once, and let it parse the entire file without passing arguments to kernel-doc. This should place everything altogether. For amdgpu_ras.c, however, we need to remove the kernel-doc with just internal. This should be re-introduced if this file ever gets new non-DOC markups. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/bd070923591ae54f9587e7407b6291ac116952b2.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit d0520df7240f7117226e871453e1b20d12a9614a Author: Andrea Righi Date: Mon Oct 26 21:49:13 2020 -0700 ext4: properly check for dirty state in ext4_inode_datasync_dirty() ext4_inode_datasync_dirty() needs to return 'true' if the inode is dirty, 'false' otherwise, but the logic seems to be incorrectly changed by commit aa75f4d3daae ("ext4: main fast-commit commit path"). This introduces a problem with swap files that are always failing to be activated, showing this error in dmesg: [ 34.406479] swapon: file is not committed Simple test case to reproduce the problem: # fallocate -l 8G swapfile # chmod 0600 swapfile # mkswap swapfile # swapon swapfile Fix the logic to return the proper state of the inode. Link: https://lore.kernel.org/lkml/20201024131333.GA32124@xps-13-7390 Fixes: 8016e29f4362 ("ext4: fast commit recovery path") Signed-off-by: Andrea Righi Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201027044915.2553163-1-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 5112e9a540fb4a63184850c6570f30ae13b5f5e3 Author: Harshad Shirwadkar Date: Fri Oct 23 09:13:39 2020 -0700 ext4: fix double locking in ext4_fc_commit_dentry_updates() Fixed double locking of sbi->s_fc_lock in the above function as reported by kernel-test-robot. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201023161339.1449437-1-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit ca766ff0c3b4a19ab2eef9a24161f77668c358c4 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:26 2020 +0100 drm: amdgpu: kernel-doc: update some adev parameters Running "make htmldocs: produce lots of warnings on those files: ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:177: warning: Excess function parameter 'p_size' description in 'amdgpu_vram_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:211: warning: Excess function parameter 'man' description in 'amdgpu_vram_mgr_fini' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'p_size' description in 'amdgpu_gtt_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:134: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_fini' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:90: warning: Excess function parameter 'p_size' description in 'amdgpu_gtt_mgr_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:134: warning: Excess function parameter 'man' description in 'amdgpu_gtt_mgr_fini' ./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init' ./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:675: warning: Excess function parameter 'dev' description in 'amdgpu_device_asic_init' They're related to the repacement of some parameters by adev, and due to a few renamed parameters. While here, uniform the name of the parameter for it to be the same on all functions using a pointer to struct amdgpu_device. Update the kernel-doc documentation accordingly. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5755c2b361890b8ae5cea0f61dfd70b1c135eefe.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 7c128a249c7e7697b5bd4b0ca27c1f4fe5c64f6a Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:25 2020 +0100 docs: fs: api-summary.rst: get rid of kernel-doc include The direct-io.c file used to have just two exported symbols: - dio_end_io() - __blockdev_direct_IO() The first one was removed by changeset c33fe275b530 ("fs: remove no longer used dio_end_io()") And the last one is used on most places indirectly, via the inline macro blockdev_direct_IO() provided by fs.h. Yet, neither the macro or the function have kernel-doc markups. So, drop the inclusion of fs/direct-io.c at the docs. Fixes: c33fe275b530 ("fs: remove no longer used dio_end_io()") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d0a9fffedca102633c168adaf157f34288a4ea67.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 1166eb3d5268e8445ffb9b7bac432dfb293bce1d Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:24 2020 +0100 IB/srpt: docs: add a description for cq_size member Changeset c804af2c1d31 ("IB/srpt: use new shared CQ mechanism") added a new member for struct srpt_rdma_ch, but didn't add the corresponding kernel-doc markup, as repoted when doing "make htmldocs": ./drivers/infiniband/ulp/srpt/ib_srpt.h:331: warning: Function parameter or member 'cq_size' not described in 'srpt_rdma_ch' Add a description for it. Fixes: c804af2c1d31 ("IB/srpt: use new shared CQ mechanism") Signed-off-by: Mauro Carvalho Chehab Tested-by: Brendan Higgins Reviewed-by: Brendan Higgins Link: https://lore.kernel.org/r/df0e5f0e866b91724299ef569a2da8115e48c0cf.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit cf38cc9f1e71151f22584c40357afaab6609384b Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:23 2020 +0100 locking/refcount: move kernel-doc markups to the proper place Changeset a435b9a14356 ("locking/refcount: Provide __refcount API to obtain the old value") added a set of functions starting with __ that have a new parameter, adding a series of new warnings: $ ./scripts/kernel-doc -none include/linux/refcount.h include/linux/refcount.h:169: warning: Function parameter or member 'oldp' not described in '__refcount_add_not_zero' include/linux/refcount.h:208: warning: Function parameter or member 'oldp' not described in '__refcount_add' include/linux/refcount.h:239: warning: Function parameter or member 'oldp' not described in '__refcount_inc_not_zero' include/linux/refcount.h:261: warning: Function parameter or member 'oldp' not described in '__refcount_inc' include/linux/refcount.h:291: warning: Function parameter or member 'oldp' not described in '__refcount_sub_and_test' include/linux/refcount.h:327: warning: Function parameter or member 'oldp' not described in '__refcount_dec_and_test' include/linux/refcount.h:347: warning: Function parameter or member 'oldp' not described in '__refcount_dec' The issue is that the kernel-doc markups are now misplaced, as they should be added just before the functions. So, move the kernel-doc markups to the proper places, in order to drop the warnings. It should be noticed that git show produces a crappy output, for this patch without "--patience" flag. Fixes: a435b9a14356 ("locking/refcount: Provide __refcount API to obtain the old value") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/7985c31d1ace591bc5e1faa05c367f1295b78afd.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit e3e7439dbc27d99cee40674f243ec616458ddce2 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:22 2020 +0100 docs: lockdep-design: fix some warning issues There are several warnings caused by a recent change 224ec489d3cd ("lockdep/Documention: Recursive read lock detection reasoning") Those are reported by htmldocs build: Documentation/locking/lockdep-design.rst:429: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/locking/lockdep-design.rst:452: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/locking/lockdep-design.rst:453: WARNING: Unexpected indentation. Documentation/locking/lockdep-design.rst:453: WARNING: Blank line required after table. Documentation/locking/lockdep-design.rst:454: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/locking/lockdep-design.rst:455: WARNING: Unexpected indentation. Documentation/locking/lockdep-design.rst:455: WARNING: Blank line required after table. Documentation/locking/lockdep-design.rst:456: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/locking/lockdep-design.rst:457: WARNING: Unexpected indentation. Documentation/locking/lockdep-design.rst:457: WARNING: Blank line required after table. Besides the reported issues, there are some missing blank lines that ended producing wrong html output, and some literals are not properly identified. Also, the symbols used at the irq enabled/disable table are not displayed as expected, as they're not literals. Also, on another table they're using a different notation. Fixes: 224ec489d3cd ("lockdep/Documention: Recursive read lock detection reasoning") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/3b9431ac5c01e38111cd59928a93e7259ab7db0f.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit ef900cccb864d72292b6f5564850d157036905ea Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:21 2020 +0100 MAINTAINERS: fix broken doc refs due to yaml conversion Several *.txt files got converted to yaml. Update their references at MAINTAINERS file accordingly. Signed-off-by: Mauro Carvalho Chehab Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/3b58afec5195d4ea505ea9b3f74d53f7abed4e6f.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 4b7560c5e4bda24fcbd54337c87056833819c73b Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:20 2020 +0100 ice: docs fix a devlink info that broke a table Changeset 410d06879c01 ("ice: add the DDP Track ID to devlink info") added description for a new devlink field, but forgot to add one of its columns, causing it to break: .../Documentation/networking/devlink/ice.rst:15: WARNING: Error parsing content block for the "list-table" directive: uniform two-level bullet list expected, but row 11 does not contain the same number of items as row 1 (3 vs 4). .. list-table:: devlink info versions implemented :widths: 5 5 5 90 ... * - ``fw.app.bundle_id`` - 0xc0000001 - Unique identifier for the DDP package loaded in the device. Also referred to as the DDP Track ID. Can be used to uniquely identify the specific DDP package. Add the type field to the ``fw.app.bundle_id`` row. Fixes: 410d06879c01 ("ice: add the DDP Track ID to devlink info") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/84ae28bda1987284033966b7b56a4b27ae40713b.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit e930c39e098499702c23facb8cd180e35a24e9df Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:19 2020 +0100 crypto: sun8x-ce*: update entries to its documentation The README file was converted to ReST format. Update the references for it accordingly. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/e3122e9575769bcf74bc2bdef08755209cb51971.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit e86c6569c588a01f20e7554cc245f8fae831957b Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:18 2020 +0100 net: phy: remove kernel-doc duplication Sphinx 3 now checks for duplicated function declarations: .../Documentation/networking/kapi:143: ../include/linux/phy.h:163: WARNING: Duplicate C declaration, also defined in 'networking/kapi'. Declaration is 'unsigned int phy_supported_speeds (struct phy_device *phy, unsigned int *speeds, unsigned int size)'. .../Documentation/networking/kapi:143: ../include/linux/phy.h:1034: WARNING: Duplicate C declaration, also defined in 'networking/kapi'. Declaration is 'int phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'. .../Documentation/networking/kapi:143: ../include/linux/phy.h:1076: WARNING: Duplicate C declaration, also defined in 'networking/kapi'. Declaration is 'int __phy_read_mmd (struct phy_device *phydev, int devad, u32 regnum)'. .../Documentation/networking/kapi:143: ../include/linux/phy.h:1088: WARNING: Duplicate C declaration, also defined in 'networking/kapi'. Declaration is 'int phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'. .../Documentation/networking/kapi:143: ../include/linux/phy.h:1100: WARNING: Duplicate C declaration, also defined in 'networking/kapi'. Declaration is 'int __phy_write_mmd (struct phy_device *phydev, int devad, u32 regnum, u16 val)'. It turns that both the C and the H files have the same kernel-doc markup for the same functions. Let's drop the at the header file, keeping the one closer to the code. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/75e9a357f9a716833d2094b04898754876365e68.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 89b422354409c275e898d26607201797cc05a932 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:17 2020 +0100 mm: pagemap.h: fix two kernel-doc markups Changeset a8cf7f272b5a ("mm: add find_lock_head") renamed the index parameter, but forgot to update the kernel-doc markups accordingly. Fixes: a8cf7f272b5a ("mm: add find_lock_head") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/dce89b296a4f5f9f8f798d5e76b6736c14a916ac.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 6a6223ec7779dfdabb9c2567bb42079bc300cf27 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:13 2020 +0100 blk-mq: docs: add kernel-doc description for a new struct member As reported by kernel-doc: ./include/linux/blk-mq.h:267: warning: Function parameter or member 'active_queues_shared_sbitmap' not described in 'blk_mq_tag_set' There is now a new member for struct blk_mq_tag_set. Add a description for it, based on the commit that introduced it. Fixes: f1b49fdc1c64 ("blk-mq: Record active_queues_shared_sbitmap per tag_set for when using shared sbitmap") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jens Axboe Reviewed-by: John Garry Link: https://lore.kernel.org/r/8e513153b83eefc05e358f51f2632b592c3f6772.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit de39012afa7fd119fd6387c11a6ce33590717866 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:12 2020 +0100 docs: userspace-api: add iommu.rst to the index file There's a new uAPI doc for IOMMU. Add it to the index file. Should address this warning: .../Documentation/userspace-api/iommu.rst: WARNING: document isn't included in any toctree Fixes: d0023e3ee28d ("docs: IOMMU user API") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/cc55219a551e29848e2282cd8939a4115067234c.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 9d8c4f0c0170a8e63256ba257b57975f04b813ab Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:11 2020 +0100 docs: hwmon: mp2975.rst: address some html build warnings .../Documentation/hwmon/mp2975.rst:25: WARNING: Unexpected indentation. .../Documentation/hwmon/mp2975.rst:27: WARNING: Block quote ends without a blank line; unexpected unindent. .../Documentation/hwmon/mp2975.rst:69: WARNING: Unexpected indentation. .../Documentation/hwmon/mp2975.rst:70: WARNING: Block quote ends without a blank line; unexpected unindent. .../Documentation/hwmon/mp2975.rst:72: WARNING: Bullet list ends without a blank line; unexpected unindent. .../Documentation/hwmon/mp2975.rst: WARNING: document isn't included in any toctree List blocks should have blank lines before and after them, in order to be properly parsed. Fixes: 4beb7a028e9f ("hwmon: (pmbus) Add support for MPS Multi-phase mp2975 controller") Signed-off-by: Mauro Carvalho Chehab Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/b02f98d886ab1f5af233f8999c7a15529fc52cdc.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 97e44c4f0cb69ec4f896451454e7b54b3fe06345 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:10 2020 +0100 docs: net: statistics.rst: remove a duplicated kernel-doc include/linux/ethtool.h is included twice with kernel-doc, both to document ethtool_pause_stats(). The first one is at statistics.rst, and the second one at ethtool-netlink.rst. Replace one of the references to use the name of the function. The automarkup.py extension should create the cross-references. Solves this warning: ../Documentation/networking/ethtool-netlink.rst: WARNING: Duplicate C declaration, also defined in 'networking/statistics'. Declaration is 'ethtool_pause_stats'. Signed-off-by: Mauro Carvalho Chehab Acked-by: David S. Miller Link: https://lore.kernel.org/r/fdbf853bbdaf3bc1d38f32744b739d175c5c31f5.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 32519c0326862d95186d018876a07980acf11089 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:09 2020 +0100 docs: kasan.rst: add two missing blank lines literal blocks should start and end with a blank line, as otherwise the parser complains and may do the wrong thing, as warned by Sphinx: Documentation/dev-tools/kasan.rst:298: WARNING: Literal block ends without a blank line; unexpected unindent. Documentation/dev-tools/kasan.rst:303: WARNING: Literal block ends without a blank line; unexpected unindent. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Andrey Konovalov Link: https://lore.kernel.org/r/cd6c4280fe26b07f2c5e5ed2918e17e88bb03419.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 2644ccef6f289c0bd545f5b79a4bfc6eb67318fe Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:08 2020 +0100 docs: admin-guide: net.rst: add a missing blank line There's a missing blank line after a literal block, which causes this warning: Documentation/admin-guide/sysctl/net.rst:303: WARNING: Literal block ends without a blank line; unexpected unindent. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/b2545be4a4c71269d10278b5990c3e06c4b65f84.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 6cc6f5ad9bfb430289a356a95fc5c74fe412d5cd Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:07 2020 +0100 docs: hwmon: adm1266.rst: fix a broken reference The reference was missing the extension, causing the check script to complain. Signed-off-by: Mauro Carvalho Chehab Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/3d64372dabcdcea144cdc9972c245812ea2a84cb.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit d29f34c098aa1b7e237ce9979eeb5cef9e5f162f Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:06 2020 +0100 sphinx: conf.py: properly handle Sphinx 4.0 One of the checks for Sphinx 3+ is broken, causing some C warnings to return back with Sphinx 4.0.x. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d5abc30056dafeec0778a46263a45401bdc7f11e.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 72b97d0b911872ba36a5742b7d790b6b165e11d8 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:05 2020 +0100 scripts: kernel-doc: use :c:union when needed Sphinx C domain code after 3.2.1 will start complaning if :c:struct would be used for an union type: .../Documentation/gpu/drm-kms-helpers:352: ../drivers/video/hdmi.c:851: WARNING: C 'identifier' cross-reference uses wrong tag: reference name is 'union hdmi_infoframe' but found name is 'struct hdmi_infoframe'. Full reference name is 'union hdmi_infoframe'. Full found name is 'struct hdmi_infoframe'. So, let's address this issue too in advance, in order to avoid future issues. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6e4ec3eec914df62389a299797a3880ae4490f35.1603791716.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit e051955977b7e26124aa8c8398278145f85f94e8 Author: Wilken Gottwalt Date: Tue Oct 27 07:24:08 2020 +0100 documentation: arm: sunxi: add Allwinner H6 documents Add the current Allwinner H6 datasheet and user manual. Signed-off-by: Wilken Gottwalt Link: https://lore.kernel.org/r/20201027062408.GA6761@monster.powergraphx.local Signed-off-by: Jonathan Corbet commit 7efc6c4295f5489e25eaef6d6fb6ceb6a6e238d0 Author: Mauro Carvalho Chehab Date: Tue Oct 27 11:20:37 2020 +0100 scripts: kernel-doc: split typedef complex regex The typedef regex for function prototypes are very complex. Split them into 3 separate regex and then join them using qr. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/3a4af999a0d62d4ab9dfae1cdefdfcad93383356.1603792384.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 6b80975c6308b5dc93b270a2903a314d896974c4 Author: Mauro Carvalho Chehab Date: Tue Oct 27 11:20:36 2020 +0100 scripts: kernel-doc: fix typedef parsing The include/linux/genalloc.h file defined this typedef: typedef unsigned long (*genpool_algo_t)(unsigned long *map,unsigned long size,unsigned long start,unsigned int nr,void *data, struct gen_pool *pool, unsigned long start_addr); Because it has a type composite of two words (unsigned long), the parser gets the typedef name wrong: .. c:macro:: long **Typedef**: Allocation callback function type definition Fix the regex in order to accept composite types when defining a typedef for a function pointer. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/328e8018041cc44f7a1684e57f8d111230761c4f.1603792384.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 324f78dfb442b82365548b657ec4e6974c677502 Author: Bert Vermeulen Date: Tue Oct 6 15:23:46 2020 +0200 mtd: spi-nor: Fix address width on flash chips > 16MB If a flash chip has more than 16MB capacity but its BFPT reports BFPT_DWORD1_ADDRESS_BYTES_3_OR_4, the spi-nor framework defaults to 3. The check in spi_nor_set_addr_width() doesn't catch it because addr_width did get set. This fixes that check. Fixes: f9acd7fa80be ("mtd: spi-nor: sfdp: default to addr_width of 3 for configurable widths") Signed-off-by: Bert Vermeulen Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Reviewed-by: Joel Stanley Reviewed-by: Cédric Le Goater Tested-by: Joel Stanley Tested-by: Cédric Le Goater Link: https://lore.kernel.org/r/20201006132346.12652-1-bert@biot.com commit d94df02c476cbc207651d19cfd104690b079bdb4 Author: Mauro Carvalho Chehab Date: Tue Oct 27 11:56:15 2020 +0100 docs: Makefile: honor V=0 for docs building Reduce the number of displayed mesages when building the docs with V=0. Suggested-by: Stephen Rothwell Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/478c114a2399b68a18de94ee5f98649304f3903b.1603796153.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 69a8eed58cc09aea3b01a64997031dd5d3c02c07 Author: Alexander Sverdlin Date: Mon Oct 5 10:48:03 2020 +0200 mtd: spi-nor: Don't copy self-pointing struct around spi_nor_parse_sfdp() modifies the passed structure so that it points to itself (params.erase_map.regions to params.erase_map.uniform_region). This makes it impossible to copy the local struct anywhere else. Therefore only use memcpy() in backup-restore scenario. The bug may show up like below: BUG: unable to handle page fault for address: ffffc90000b377f8 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 4 PID: 3500 Comm: flashcp Tainted: G O 5.4.53-... #1 ... RIP: 0010:spi_nor_erase+0x8e/0x5c0 Code: 64 24 18 89 db 4d 8b b5 d0 04 00 00 4c 89 64 24 18 4c 89 64 24 20 eb 12 a8 10 0f 85 59 02 00 00 49 83 c6 10 0f 84 4f 02 00 00 <49> 8b 06 48 89 c2 48 83 e2 c0 48 89 d1 49 03 4e 08 48 39 cb 73 d8 RSP: 0018:ffffc9000217fc48 EFLAGS: 00010206 RAX: 0000000000740000 RBX: 0000000000000000 RCX: 0000000000740000 RDX: ffff8884550c9980 RSI: ffff88844f9c0bc0 RDI: ffff88844ede7bb8 RBP: 0000000000740000 R08: ffffffff815bfbe0 R09: ffff88844f9c0bc0 R10: 0000000000000000 R11: 0000000000000000 R12: ffffc9000217fc60 R13: ffff88844ede7818 R14: ffffc90000b377f8 R15: 0000000000000000 FS: 00007f4699780500(0000) GS:ffff88846ff00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc90000b377f8 CR3: 00000004538ee000 CR4: 0000000000340fe0 Call Trace: part_erase+0x27/0x50 mtdchar_ioctl+0x831/0xba0 ? filemap_map_pages+0x186/0x3d0 ? do_filp_open+0xad/0x110 ? _copy_to_user+0x22/0x30 ? cp_new_stat+0x150/0x180 mtdchar_unlocked_ioctl+0x2a/0x40 do_vfs_ioctl+0xa0/0x630 ? __do_sys_newfstat+0x3c/0x60 ksys_ioctl+0x70/0x80 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x6a/0x200 ? prepare_exit_to_usermode+0x50/0xd0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f46996b6817 Cc: stable@vger.kernel.org Fixes: c46872170a54 ("mtd: spi-nor: Move erase_map to 'struct spi_nor_flash_parameter'") Co-developed-by: Matija Glavinic Pecotic Signed-off-by: Matija Glavinic Pecotic Signed-off-by: Alexander Sverdlin Signed-off-by: Vignesh Raghavendra Tested-by: Baurzhan Ismagulov Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201005084803.23460-1-alexander.sverdlin@nokia.com commit 00d4394792418f8fe968f0cb22557053c6310010 Author: Tom Rix Date: Tue Oct 27 11:59:34 2020 -0700 cpufreq: speedstep: remove unneeded semicolon A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix Signed-off-by: Rafael J. Wysocki commit 6d6bc54ab4f2404d46078abc04bf4dee4db01def Author: Srinivas Kandagatla Date: Wed Oct 28 15:43:40 2020 +0000 ASoC: codecs: wcd9335: Set digital gain range correctly digital gain range is -84dB min to 40dB max, however this was not correctly specified in the range. Fix this by with correct range! Fixes: 8c4f021d806a ("ASoC: wcd9335: add basic controls") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201028154340.17090-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 25d76fed7ffecca47be0249a5d5ec0a5dd92af67 Author: Zou Wei Date: Wed Oct 28 16:59:09 2020 +0800 phy: cpcap-usb: Use IRQF_ONESHOT Fixes coccicheck error: ./drivers/phy/motorola/phy-cpcap-usb.c:365:9-34: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1603875549-107500-1-git-send-email-zou_wei@huawei.com Signed-off-by: Vinod Koul commit fcea94ac6154545dd13b17c947c07f5e0a54c121 Author: Stephen Boyd Date: Mon Oct 26 13:59:42 2020 -0700 phy: qcom-qmp: Initialize another pointer to NULL This probe function is too complicated and should be refactored. For now let's just set this variable to NULL and keep the static analysis tools happy. Fixes: 52e013d0bffa ("phy: qcom-qmp: Add support for DP in USB3+DP combo phy") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20201026205942.2861828-1-swboyd@chromium.org Signed-off-by: Vinod Koul commit eb9c4dd9bdfdebaa13846c16a8c79b5b336066b6 Author: Marc Zyngier Date: Tue Oct 13 10:58:20 2020 +0100 phy: tegra: xusb: Fix dangling pointer on probe failure If, for some reason, the xusb PHY fails to probe, it leaves a dangling pointer attached to the platform device structure. This would normally be harmless, but the Tegra XHCI driver then goes and extract that pointer from the PHY device. Things go downhill from there: 8.752082] [004d554e5145533c] address between user and kernel address ranges [ 8.752085] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 8.752088] Modules linked in: max77620_regulator(E+) xhci_tegra(E+) sdhci_tegra(E+) xhci_hcd(E) sdhci_pltfm(E) cqhci(E) fixed(E) usbcore(E) scsi_mod(E) sdhci(E) host1x(E+) [ 8.752103] CPU: 4 PID: 158 Comm: systemd-udevd Tainted: G S W E 5.9.0-rc7-00298-gf6337624c4fe #1980 [ 8.752105] Hardware name: NVIDIA Jetson TX2 Developer Kit (DT) [ 8.752108] pstate: 20000005 (nzCv daif -PAN -UAO BTYPE=--) [ 8.752115] pc : kobject_put+0x1c/0x21c [ 8.752120] lr : put_device+0x20/0x30 [ 8.752121] sp : ffffffc012eb3840 [ 8.752122] x29: ffffffc012eb3840 x28: ffffffc010e82638 [ 8.752125] x27: ffffffc008d56440 x26: 0000000000000000 [ 8.752128] x25: ffffff81eb508200 x24: 0000000000000000 [ 8.752130] x23: ffffff81eb538800 x22: 0000000000000000 [ 8.752132] x21: 00000000fffffdfb x20: ffffff81eb538810 [ 8.752134] x19: 3d4d554e51455300 x18: 0000000000000020 [ 8.752136] x17: ffffffc008d00270 x16: ffffffc008d00c94 [ 8.752138] x15: 0000000000000004 x14: ffffff81ebd4ae90 [ 8.752140] x13: 0000000000000000 x12: ffffff81eb86a4e8 [ 8.752142] x11: ffffff81eb86a480 x10: ffffff81eb862fea [ 8.752144] x9 : ffffffc01055fb28 x8 : ffffff81eb86a4a8 [ 8.752146] x7 : 0000000000000001 x6 : 0000000000000001 [ 8.752148] x5 : ffffff81dff8bc38 x4 : 0000000000000000 [ 8.752150] x3 : 0000000000000001 x2 : 0000000000000001 [ 8.752152] x1 : 0000000000000002 x0 : 3d4d554e51455300 [ 8.752155] Call trace: [ 8.752157] kobject_put+0x1c/0x21c [ 8.752160] put_device+0x20/0x30 [ 8.752164] tegra_xusb_padctl_put+0x24/0x3c [ 8.752170] tegra_xusb_probe+0x8b0/0xd10 [xhci_tegra] [ 8.752174] platform_drv_probe+0x60/0xb4 [ 8.752176] really_probe+0xf0/0x504 [ 8.752179] driver_probe_device+0x100/0x170 [ 8.752181] device_driver_attach+0xcc/0xd4 [ 8.752183] __driver_attach+0xb0/0x17c [ 8.752185] bus_for_each_dev+0x7c/0xd4 [ 8.752187] driver_attach+0x30/0x3c [ 8.752189] bus_add_driver+0x154/0x250 [ 8.752191] driver_register+0x84/0x140 [ 8.752193] __platform_driver_register+0x54/0x60 [ 8.752197] tegra_xusb_init+0x40/0x1000 [xhci_tegra] [ 8.752201] do_one_initcall+0x54/0x2d0 [ 8.752205] do_init_module+0x68/0x29c [ 8.752207] load_module+0x2178/0x26c0 [ 8.752209] __do_sys_finit_module+0xb0/0x120 [ 8.752211] __arm64_sys_finit_module+0x2c/0x40 [ 8.752215] el0_svc_common.constprop.0+0x80/0x240 [ 8.752218] do_el0_svc+0x30/0xa0 [ 8.752220] el0_svc+0x18/0x50 [ 8.752223] el0_sync_handler+0x90/0x318 [ 8.752225] el0_sync+0x158/0x180 [ 8.752230] Code: a9bd7bfd 910003fd a90153f3 aa0003f3 (3940f000) [ 8.752232] ---[ end trace 90f6c89d62d85ff5 ]--- Reset the pointer on probe failure fixes the issue. Fixes: 53d2a715c2403 ("phy: Add Tegra XUSB pad controller support") Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201013095820.311376-1-maz@kernel.org Signed-off-by: Vinod Koul commit 209c805835b29495cf66cc705b206da8f4a68e6e Author: Al Cooper Date: Fri Oct 2 15:01:15 2020 -0400 phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211 The 7211a0 has a tca_drv_sel bit in the USB SETUP register that should never be enabled. This feature is only used if there is a USB Type-C PHY, and the 7211 does not have one. If the bit is enabled, the VBUS signal will never be asserted. In the 7211a0, the bit was incorrectly defaulted to on so the driver had to clear the bit. In the 7211c0 the state was inverted so the driver should no longer clear the bit. This hasn't been a problem because all current 7211 boards don't use the VBUS signal, but there are some future customer boards that may use it. Signed-off-by: Al Cooper Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20201002190115.48017-1-alcooperx@gmail.com Signed-off-by: Vinod Koul commit 01eea23687ed0aa4e251f80ae795fc586e68343a Merge: e5a3297904094 728a7e225ad80 Author: Arnd Bergmann Date: Wed Oct 28 17:09:56 2020 +0100 Merge tag 'stm32-dt-for-v5.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/fixes STM32 DT fixes for v5.10, round 1 Highlights: ----------- -On STM32MP157 DK & ED boards: Add Vin supply description to avoid random kernel crash due to vref_ddr regulator issue. * tag 'stm32-dt-for-v5.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: Describe Vin power supply on stm32mp157c-edx board ARM: dts: stm32: Describe Vin power supply on stm32mp15xx-dkx board Link: https://lore.kernel.org/r/4ac236b3-b980-f653-f644-53e586570724@st.com Signed-off-by: Arnd Bergmann commit fc0522bbe02fa4beb95c0514ace66b585616f111 Author: Srinivas Kandagatla Date: Wed Oct 28 15:43:39 2020 +0000 ASoC: codecs: wcd934x: Set digital gain range correctly digital gain range is -84dB min to 40dB max, however this was not correctly specified in the range. Fix this by with correct range! Fixes: 1cde8b822332 ("ASoC: wcd934x: add basic controls") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201028154340.17090-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit f83c2609079cde0bb3ad4c1da60f9c69c0ec8920 Author: Paul Cercueil Date: Sat Oct 10 21:25:09 2020 +0200 pinctrl: ingenic: Fix invalid SSI pins The values for the SSI pins on GPIO chips D and E were off by 0x20. Fixes: d3ef8c6b2286 ("pinctrl: Ingenic: Add SSI pins support for JZ4770 and JZ4780.") Signed-off-by: Paul Cercueil Reported-by: Artur Rojek Link: https://lore.kernel.org/r/20201010192509.9098-1-paul@crapouillou.net Reviewed-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Linus Walleij commit 7ffa08169849be898eed6f3694aab8c425497749 Author: Tony Lindgren Date: Wed Oct 28 08:05:56 2020 +0200 Revert "Revert "gpio: omap: Fix lost edge wake-up interrupts"" This reverts commit 579ced8fdb00b8e94304a83e3cc419f6f8eab08e. Turns out I was overly optimistic about cpu_pm blocking idle being a solution for handling edge interrupts. While it helps in preventing entering idle states that potentially lose context, we can still get an edge interrupt triggering while entering idle. So we need to also add back the workaround for seeing if there are any pending edge interrupts when waking up. Signed-off-by: Tony Lindgren Cc: Aaro Koskinen Cc: Grygorii Strashko Cc: Keerthy Cc: Ladislav Michl Cc: Peter Ujfalusi Cc: Russell King Cc: Tero Kristo Link: https://lore.kernel.org/r/20201028060556.56038-1-tony@atomide.com Signed-off-by: Linus Walleij commit 921c7ebd1337d1a46783d7e15a850e12aed2eaa0 Author: Mateusz Nosek Date: Sun Sep 27 02:08:58 2020 +0200 futex: Fix incorrect should_fail_futex() handling If should_futex_fail() returns true in futex_wake_pi(), then the 'ret' variable is set to -EFAULT and then immediately overwritten. So the failure injection is non-functional. Fix it by actually leaving the function and returning -EFAULT. The Fixes tag is kinda blury because the initial commit which introduced failure injection was already sloppy, but the below mentioned commit broke it completely. [ tglx: Massaged changelog ] Fixes: 6b4f4bc9cb22 ("locking/futex: Allow low-level atomic operations to return -EAGAIN") Signed-off-by: Mateusz Nosek Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200927000858.24219-1-mateusznosek0@gmail.com commit 2f84a2de539cc4301a332c2c76473fc25baf21b7 Author: Kent Gibson Date: Mon Oct 5 15:03:29 2020 +0800 gpio: uapi: clarify the meaning of 'empty' char arrays Clarify that a char array containing a string is considered 'empty' if the first character is the null terminator. The remaining characters are not relevant to this determination. Signed-off-by: Kent Gibson Reviewed-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201005070329.21055-6-warthog618@gmail.com Signed-off-by: Linus Walleij commit c303c51c87a61ace7330b5e0217468b1b8f98a75 Author: Kent Gibson Date: Mon Oct 5 15:03:28 2020 +0800 gpio: uapi: remove whitespace Remove leading whitespace in ABI v1 comment. Signed-off-by: Kent Gibson Reviewed-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201005070329.21055-5-warthog618@gmail.com Signed-off-by: Linus Walleij commit 2cc522d3931ba2aa744d09d41f874d61bf3a1851 Author: Kent Gibson Date: Mon Oct 5 15:03:27 2020 +0800 gpio: uapi: kernel-doc formatting improvements Add kernel-doc formatting to all references to structs, enums, fields and constants, and move deprecation warnings into the Note section of the deprecated struct. Replace 'OR:ed' with 'added', as the former looks odd. Signed-off-by: Kent Gibson Reviewed-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201005070329.21055-4-warthog618@gmail.com Signed-off-by: Linus Walleij commit f20160217537e9006ce4a625da62b358416fc4ed Author: Kent Gibson Date: Mon Oct 5 15:03:26 2020 +0800 gpio: uapi: comment consistency Make debounce_period_us field documentation consistent with other fields in the union. Signed-off-by: Kent Gibson Reviewed-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201005070329.21055-3-warthog618@gmail.com Signed-off-by: Linus Walleij commit 5760648e63e6c1006a3ed0bfc2167f623b8bcbcd Author: Kent Gibson Date: Mon Oct 5 15:03:25 2020 +0800 gpio: uapi: fix kernel-doc warnings Fix kernel-doc warnings, specifically gpioline_info_changed.padding is not documented and 'GPIO event types' describes defines, which are not documented by kernel-doc. Signed-off-by: Kent Gibson Reviewed-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201005070329.21055-2-warthog618@gmail.com Signed-off-by: Linus Walleij commit 13150bc5416f45234c955e5bed91623d178c6117 Author: Ard Biesheuvel Date: Tue Oct 27 16:11:32 2020 +0100 module: use hidden visibility for weak symbol references Geert reports that commit be2881824ae9eb92 ("arm64/build: Assert for unwanted sections") results in build errors on arm64 for configurations that have CONFIG_MODULES disabled. The commit in question added ASSERT()s to the arm64 linker script to ensure that linker generated sections such as .got.plt etc are empty, but as it turns out, there are corner cases where the linker does emit content into those sections. More specifically, weak references to function symbols (which can remain unsatisfied, and can therefore not be emitted as relative references) will be emitted as GOT and PLT entries when linking the kernel in PIE mode (which is the case when CONFIG_RELOCATABLE is enabled, which is on by default). What happens is that code such as struct device *(*fn)(struct device *dev); struct device *iommu_device; fn = symbol_get(mdev_get_iommu_device); if (fn) { iommu_device = fn(dev); essentially gets converted into the following when CONFIG_MODULES is off: struct device *iommu_device; if (&mdev_get_iommu_device) { iommu_device = mdev_get_iommu_device(dev); where mdev_get_iommu_device is emitted as a weak symbol reference into the object file. The first reference is decorated with an ordinary ABS64 data relocation (which yields 0x0 if the reference remains unsatisfied). However, the indirect call is turned into a direct call covered by a R_AARCH64_CALL26 relocation, which is converted into a call via a PLT entry taking the target address from the associated GOT entry. Given that such GOT and PLT entries are unnecessary for fully linked binaries such as the kernel, let's give these weak symbol references hidden visibility, so that the linker knows that the weak reference via R_AARCH64_CALL26 can simply remain unsatisfied. Signed-off-by: Ard Biesheuvel Tested-by: Geert Uytterhoeven Reviewed-by: Fangrui Song Acked-by: Jessica Yu Cc: Jessica Yu Cc: Kees Cook Cc: Geert Uytterhoeven Cc: Nick Desaulniers Link: https://lore.kernel.org/r/20201027151132.14066-1-ardb@kernel.org Signed-off-by: Will Deacon commit 728a7e225ad807b4b4de3be3fb653424199f8a76 Author: Pascal Paillet Date: Wed Oct 28 12:49:16 2020 +0100 ARM: dts: stm32: Describe Vin power supply on stm32mp157c-edx board Add description for Vin power supply and for peripherals that are supplied by Vin. Signed-off-by: Pascal Paillet Signed-off-by: Alexandre Torgue commit 18e09253ac68b333ec44c502b5c434a697e2d4af Author: Pascal Paillet Date: Wed Oct 28 12:47:07 2020 +0100 ARM: dts: stm32: Describe Vin power supply on stm32mp15xx-dkx board Add description for Vin power supply and for peripherals that are supplied by Vin. Signed-off-by: Pascal Paillet Signed-off-by: Alexandre Torgue commit a2d50c1c77aa879af24f9f67b33186737b3d4885 Author: Ard Biesheuvel Date: Tue Oct 27 08:32:06 2020 +0100 arm64: efi: increase EFI PE/COFF header padding to 64 KB Commit 76085aff29f5 ("efi/libstub/arm64: align PE/COFF sections to segment alignment") increased the PE/COFF section alignment to match the minimum segment alignment of the kernel image, which ensures that the kernel does not need to be moved around in memory by the EFI stub if it was built as relocatable. However, the first PE/COFF section starts at _stext, which is only 4 KB aligned, and so the section layout is inconsistent. Existing EFI loaders seem to care little about this, but it is better to clean this up. So let's pad the header to 64 KB to match the PE/COFF section alignment. Fixes: 76085aff29f5 ("efi/libstub/arm64: align PE/COFF sections to segment alignment") Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20201027073209.2897-2-ardb@kernel.org Signed-off-by: Will Deacon commit 8e4c309f9f33b76c09daa02b796ef87918eee494 Author: Sascha Hauer Date: Fri May 8 07:28:19 2020 +0200 ata: sata_nv: Fix retrieving of active qcs ata_qc_complete_multiple() has to be called with the tags physically active, that is the hw tag is at bit 0. ap->qc_active has the same tag at bit ATA_TAG_INTERNAL instead, so call ata_qc_get_active() to fix that up. This is done in the vein of 8385d756e114 ("libata: Fix retrieving of active qcs"). Fixes: 28361c403683 ("libata: add extra internal command") Tested-by: Pali Rohár Signed-off-by: Sascha Hauer Signed-off-by: Jens Axboe commit 4977d121bc9bc5138d4d48b85469123001859573 Author: Naohiro Aota Date: Wed Oct 28 16:25:36 2020 +0900 block: advance iov_iter on bio_add_hw_page failure When the bio's size reaches max_append_sectors, bio_add_hw_page returns 0 then __bio_iov_append_get_pages returns -EINVAL. This is an expected result of building a small enough bio not to be split in the IO path. However, iov_iter is not advanced in this case, causing the same pages are filled for the bio again and again. Fix the case by properly advancing the iov_iter for already processed pages. Fixes: 0512a75b98f8 ("block: Introduce REQ_OP_ZONE_APPEND") Cc: stable@vger.kernel.org # 5.8+ Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: Jens Axboe commit 5f692a81b4e923d0e856d35a708e53b97e8f8755 Author: Ard Biesheuvel Date: Wed Oct 28 14:33:32 2020 +0100 arm64: vmlinux.lds: account for spurious empty .igot.plt sections Now that we started making the linker warn about orphan sections (input sections that are not explicitly consumed by an output section), some configurations produce the following warning: aarch64-linux-gnu-ld: warning: orphan section `.igot.plt' from `arch/arm64/kernel/head.o' being placed in section `.igot.plt' It could be any file that triggers this - head.o is simply the first input file in the link - and the resulting .igot.plt section never actually appears in vmlinux as it turns out to be empty. So let's add .igot.plt to our collection of input sections to disregard unless they are empty. Signed-off-by: Ard Biesheuvel Cc: Jessica Yu Cc: Kees Cook Cc: Geert Uytterhoeven Cc: Nick Desaulniers Link: https://lore.kernel.org/r/20201028133332.5571-1-ardb@kernel.org Signed-off-by: Will Deacon commit 493b35db0548956bd598a54aea0b2bb1c6227e2f Author: Vincenzo Frascino Date: Mon Oct 26 12:12:48 2020 +0000 kselftest/arm64: Fix check_user_mem test The check_user_mem test reports the error below because the test plan is not declared correctly: # Planned tests != run tests (0 != 4) Fix the test adding the correct test plan declaration. Fixes: 4dafc08d0ba4 ("kselftest/arm64: Check mte tagged user address in kernel") Signed-off-by: Vincenzo Frascino Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Cc: Gabor Kertesz Cc: Amit Daniel Kachhap Link: https://lore.kernel.org/r/20201026121248.2340-7-vincenzo.frascino@arm.com Signed-off-by: Will Deacon commit cbb268af05de9beedc6994f4d90628f451d996d7 Author: Vincenzo Frascino Date: Mon Oct 26 12:12:47 2020 +0000 kselftest/arm64: Fix check_ksm_options test The check_ksm_options test reports the error below because the test plan is not declared correctly: # Planned tests != run tests (0 != 4) Fix the test adding the correct test plan declaration. Fixes: f981d8fa2646 ("kselftest/arm64: Verify KSM page merge for MTE pages") Signed-off-by: Vincenzo Frascino Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Cc: Gabor Kertesz Cc: Amit Daniel Kachhap Link: https://lore.kernel.org/r/20201026121248.2340-6-vincenzo.frascino@arm.com Signed-off-by: Will Deacon commit 7419390a466e20d4a00cecdb4a68af47d0b21ca5 Author: Vincenzo Frascino Date: Mon Oct 26 12:12:46 2020 +0000 kselftest/arm64: Fix check_mmap_options test The check_mmap_options test reports the error below because the test plan is not declared correctly: # Planned tests != run tests (0 != 22) Fix the test adding the correct test plan declaration. Fixes: 53ec81d23213 ("kselftest/arm64: Verify all different mmap MTE options") Signed-off-by: Vincenzo Frascino Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Cc: Gabor Kertesz Cc: Amit Daniel Kachhap Link: https://lore.kernel.org/r/20201026121248.2340-5-vincenzo.frascino@arm.com Signed-off-by: Will Deacon commit 386cf789fa6dc4e0f35d25cba9469d62321e7180 Author: Vincenzo Frascino Date: Mon Oct 26 12:12:45 2020 +0000 kselftest/arm64: Fix check_child_memory test The check_child_memory test reports the error below because the test plan is not declared correctly: # Planned tests != run tests (0 != 12) Fix the test adding the correct test plan declaration. Fixes: dfe537cf4718 ("kselftest/arm64: Check forked child mte memory accessibility") Signed-off-by: Vincenzo Frascino Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Cc: Gabor Kertesz Cc: Amit Daniel Kachhap Link: https://lore.kernel.org/r/20201026121248.2340-4-vincenzo.frascino@arm.com Signed-off-by: Will Deacon commit 041fa41f5422ee275a8f60a182e1b32d196a1a2a Author: Vincenzo Frascino Date: Mon Oct 26 12:12:44 2020 +0000 kselftest/arm64: Fix check_tags_inclusion test The check_tags_inclusion test reports the error below because the test plan is not declared correctly: # Planned tests != run tests (0 != 4) Fix the test adding the correct test plan declaration. Fixes: f3b2a26ca78d ("kselftest/arm64: Verify mte tag inclusion via prctl") Signed-off-by: Vincenzo Frascino Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Cc: Gabor Kertesz Cc: Amit Daniel Kachhap Link: https://lore.kernel.org/r/20201026121248.2340-3-vincenzo.frascino@arm.com Signed-off-by: Will Deacon commit 5bc7c1156f3f16d7e244abaf8c80566af32cb092 Author: Vincenzo Frascino Date: Mon Oct 26 12:12:43 2020 +0000 kselftest/arm64: Fix check_buffer_fill test The check_buffer_fill test reports the error below because the test plan is not declared correctly: # Planned tests != run tests (0 != 20) Fix the test adding the correct test plan declaration. Fixes: e9b60476bea0 ("kselftest/arm64: Add utilities and a test to validate mte memory") Signed-off-by: Vincenzo Frascino Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Cc: Gabor Kertesz Cc: Amit Daniel Kachhap Link: https://lore.kernel.org/r/20201026121248.2340-2-vincenzo.frascino@arm.com Signed-off-by: Will Deacon commit 332576e69a046b9b33f49bd0c3c071cc98215b60 Author: Arnd Bergmann Date: Mon Oct 26 20:37:46 2020 +0100 arm64: avoid -Woverride-init warning The icache_policy_str[] definition causes a warning when extra warning flags are enabled: arch/arm64/kernel/cpuinfo.c:38:26: warning: initialized field overwritten [-Woverride-init] 38 | [ICACHE_POLICY_VIPT] = "VIPT", | ^~~~~~ arch/arm64/kernel/cpuinfo.c:38:26: note: (near initialization for 'icache_policy_str[2]') arch/arm64/kernel/cpuinfo.c:39:26: warning: initialized field overwritten [-Woverride-init] 39 | [ICACHE_POLICY_PIPT] = "PIPT", | ^~~~~~ arch/arm64/kernel/cpuinfo.c:39:26: note: (near initialization for 'icache_policy_str[3]') arch/arm64/kernel/cpuinfo.c:40:27: warning: initialized field overwritten [-Woverride-init] 40 | [ICACHE_POLICY_VPIPT] = "VPIPT", | ^~~~~~~ arch/arm64/kernel/cpuinfo.c:40:27: note: (near initialization for 'icache_policy_str[0]') There is no real need for the default initializer here, as printing a NULL string is harmless. Rewrite the logic to have an explicit reserved value for the only one that uses the default value. This partially reverts the commit that removed ICACHE_POLICY_AIVIVT. Fixes: 155433cb365e ("arm64: cache: Remove support for ASID-tagged VIVT I-caches") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201026193807.3816388-1-arnd@kernel.org Signed-off-by: Will Deacon commit 136a4dfe87cd34db2153330aa84dbbc210eb36b6 Author: Hans de Goede Date: Mon Oct 26 22:28:40 2020 +0100 ACPI: button: Drop no longer necessary Acer SW5-012 lid_init_state quirk Commit 78a5b53e9fb4 ("Input: soc_button_array - work around DSDTs which modify the irqflags") adds a workaround for DSDTs with a _LID method which play tricks with the irqflags, assuming that the OS is using an irq-type of IRQ_TYPE_LEVEL_LOW. Now that this workaround is in place, we no longer need to disable the lid functionality on the Acer SW5-012. Fixes: 78a5b53e9fb4 ("Input: soc_button_array - work around DSDTs which modify the irqflags") Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit a2267f8a52eea9096861affd463f691be0f0e8c9 Author: Alok Prasad Date: Wed Oct 21 11:50:08 2020 +0000 RDMA/qedr: Fix memory leak in iWARP CM Fixes memory leak in iWARP CM Fixes: e411e0587e0d ("RDMA/qedr: Add iWARP connection management functions") Link: https://lore.kernel.org/r/20201021115008.28138-1-palok@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Igor Russkikh Signed-off-by: Alok Prasad Signed-off-by: Jason Gunthorpe commit d54654790302ccaa72589380dce060d376ef8716 Author: Jiri Slaby Date: Mon Oct 26 06:54:19 2020 +0100 vt_ioctl: fix GIO_UNIMAP regression In commit 5ba127878722, we shuffled with the check of 'perm'. But my brain somehow inverted the condition in 'do_unimap_ioctl' (I thought it is ||, not &&), so GIO_UNIMAP stopped working completely. Move the 'perm' checks back to do_unimap_ioctl and do them right again. In fact, this reverts this part of code to the pre-5ba127878722 state. Except 'perm' is now a bool. Fixes: 5ba127878722 ("vt_ioctl: move perm checks level up") Cc: stable@vger.kernel.org Reported-by: Fabian Vogt Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201026055419.30518-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 82e61c3909db51d91b9d3e2071557b6435018b80 Author: Jiri Slaby Date: Mon Oct 19 10:55:17 2020 +0200 vt: keyboard, extend func_buf_lock to readers Both read-side users of func_table/func_buf need locking. Without that, one can easily confuse the code by repeatedly setting altering strings like: while (1) for (a = 0; a < 2; a++) { struct kbsentry kbs = {}; strcpy((char *)kbs.kb_string, a ? ".\n" : "88888\n"); ioctl(fd, KDSKBSENT, &kbs); } When that program runs, one can get unexpected output by holding F1 (note the unxpected period on the last line): . 88888 .8888 So protect all accesses to 'func_table' (and func_buf) by preexisting 'func_buf_lock'. It is easy in 'k_fn' handler as 'puts_queue' is expected not to sleep. On the other hand, KDGKBSENT needs a local (atomic) copy of the string because copy_to_user can sleep. Use already allocated, but unused 'kbs->kb_string' for that purpose. Note that the program above needs at least CAP_SYS_TTY_CONFIG. This depends on the previous patch and on the func_buf_lock lock added in commit 46ca3f735f34 (tty/vt: fix write/write race in ioctl(KDSKBSENT) handler) in 5.2. Likely fixes CVE-2020-25656. Cc: Reported-by: Minh Yuan Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201019085517.10176-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 6ca03f90527e499dd5e32d6522909e2ad390896b Author: Jiri Slaby Date: Mon Oct 19 10:55:16 2020 +0200 vt: keyboard, simplify vt_kdgkbsent Use 'strlen' of the string, add one for NUL terminator and simply do 'copy_to_user' instead of the explicit 'for' loop. This makes the KDGKBSENT case more compact. The only thing we need to take care about is NULL 'func_table[i]'. Use an empty string in that case. The original check for overflow could never trigger as the func_buf strings are always shorter or equal to 'struct kbsentry's. Cc: Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20201019085517.10176-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit c97f2a6fb3dfbfbbc88edc8ea62ef2b944e18849 Author: Vladimir Oltean Date: Fri Oct 23 04:34:29 2020 +0300 tty: serial: fsl_lpuart: LS1021A has a FIFO size of 16 words, like LS1028A Prior to the commit that this one fixes, the FIFO size was derived from the read-only register LPUARTx_FIFO[TXFIFOSIZE] using the following formula: TX FIFO size = 2 ^ (LPUARTx_FIFO[TXFIFOSIZE] - 1) The documentation for LS1021A is a mess. Under chapter 26.1.3 LS1021A LPUART module special consideration, it mentions TXFIFO_SZ and RXFIFO_SZ being equal to 4, and in the register description for LPUARTx_FIFO, it shows the out-of-reset value of TXFIFOSIZE and RXFIFOSIZE fields as "011", even though these registers read as "101" in reality. And when LPUART on LS1021A was working, the "101" value did correspond to "16 datawords", by applying the formula above, even though the documentation is wrong again (!!!!) and says that "101" means 64 datawords (hint: it doesn't). So the "new" formula created by commit f77ebb241ce0 has all the premises of being wrong for LS1021A, because it relied only on false data and no actual experimentation. Interestingly, in commit c2f448cff22a ("tty: serial: fsl_lpuart: add LS1028A support"), Michael Walle applied a workaround to this by manually setting the FIFO widths for LS1028A. It looks like the same values are used by LS1021A as well, in fact. When the driver thinks that it has a deeper FIFO than it really has, getty (user space) output gets truncated. Many thanks to Michael for pointing out where to look. Fixes: f77ebb241ce0 ("tty: serial: fsl_lpuart: correct the FIFO depth size") Suggested-by: Michael Walle Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201023013429.3551026-1-vladimir.oltean@nxp.com Reviewed-by:Fugang Duan Cc: stable Signed-off-by: Greg Kroah-Hartman commit 82776f6c75a90e1d2103e689b84a689de8f1aa02 Author: Russell King Date: Sun Oct 18 09:42:04 2020 +0100 tty: serial: 21285: fix lockup on open Commit 293f89959483 ("tty: serial: 21285: stop using the unused[] variable from struct uart_port") introduced a bug which stops the transmit interrupt being disabled when there are no characters to transmit - disabling the transmit interrupt at the interrupt controller is the only way to stop an interrupt storm. If this interrupt is not disabled when there are no transmit characters, we end up with an interrupt storm which prevents the machine making forward progress. Fixes: 293f89959483 ("tty: serial: 21285: stop using the unused[] variable from struct uart_port") Signed-off-by: Russell King Cc: stable Link: https://lore.kernel.org/r/E1kU4GS-0006lE-OO@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit 0cb686692fd200db12dcfb8231e793c1c98aec41 Author: Bastien Nocera Date: Thu Oct 22 09:55:21 2020 -0400 USB: apple-mfi-fastcharge: don't probe unhandled devices From: Bastien Nocera Contrary to the comment above the id table, we didn't implement a match function. This meant that every single Apple device that was already plugged in to the computer would have its device driver reprobed when the apple-mfi-fastcharge driver was loaded, eg. the SD card reader could be reprobed when the apple-mfi-fastcharge after pivoting root during boot up and the module became available. Make sure that the driver probe isn't being run for unsupported devices by adding a match function that checks the product ID, in addition to the id_table checking the vendor ID. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1878347 Link: https://lore.kernel.org/linux-usb/CAE3RAxt0WhBEz8zkHrVO5RiyEOasayy1QUAjsv-pB0fAbY1GSw@mail.gmail.com/ Fixes: 249fa8217b84 ("USB: Add driver to control USB fast charge for iOS devices") Cc: # 5.8 Cc: Greg Kroah-Hartman Cc: Alan Stern [m.v.b: Add Link and Reported-by tags to the commit message] Reported-by: Pany Tested-by: Pan (Pany) YUAN Tested-by: Bastien Nocera Signed-off-by: Bastien Nocera Signed-off-by: M. Vefa Bicakci Link: https://lore.kernel.org/r/20201022135521.375211-3-m.v.b@runbox.com Signed-off-by: Greg Kroah-Hartman commit 0942d59b0af46511d59dbf5bd69ec4a64d1a854c Author: Bastien Nocera Date: Thu Oct 22 09:55:20 2020 -0400 usbcore: Check both id_table and match() when both available From: Bastien Nocera When a USB device driver has both an id_table and a match() function, make sure to check both to find a match, first matching the id_table, then checking the match() function. This makes it possible to have module autoloading done through the id_table when devices are plugged in, before checking for further device eligibility in the match() function. Cc: # 5.8 Cc: Greg Kroah-Hartman Cc: Alan Stern Co-developed-by: M. Vefa Bicakci Tested-by: Bastien Nocera Signed-off-by: Bastien Nocera Signed-off-by: M. Vefa Bicakci Tested-by: Pan (Pany) YUAN Link: https://lore.kernel.org/r/20201022135521.375211-2-m.v.b@runbox.com Signed-off-by: Greg Kroah-Hartman commit 32d174d2d5eb318c34ff36771adefabdf227c186 Author: Tang Bin Date: Mon Oct 26 17:06:57 2020 +0800 usb: host: ehci-tegra: Fix error handling in tegra_ehci_probe() If the function platform_get_irq() failed, the negative value returned will not be detected here. So fix error handling in tegra_ehci_probe(). Fixes: 79ad3b5add4a ("usb: host: Add EHCI driver for NVIDIA Tegra SoCs") Acked-by: Alan Stern Acked-by: Thierry Reding Signed-off-by: Tang Bin Link: https://lore.kernel.org/r/20201026090657.49988-1-tangbin@cmss.chinamobile.com Signed-off-by: Greg Kroah-Hartman commit b9c6f782150c9992308f4474f920586eaaca4cf1 Author: Dan Carpenter Date: Fri Oct 23 14:40:17 2020 +0300 usb: typec: stusb160x: fix an IS_ERR() vs NULL check in probe The typec_register_port() function doesn't return NULL, it returns error pointers. Fixes: da0cb6310094 ("usb: typec: add support for STUSB160x Type-C controller family") Signed-off-by: Dan Carpenter Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201023114017.GE18329@kadam Signed-off-by: Greg Kroah-Hartman commit 2d9c6442a9c81f4f8dee678d0b3c183173ab1e2d Author: Li Jun Date: Mon Oct 12 19:03:12 2020 +0800 usb: typec: tcpm: reset hard_reset_count for any disconnect Current tcpm_detach() only reset hard_reset_count if port->attached is true, this may cause this counter clear is missed if the CC disconnect event is generated after tcpm_port_reset() is done by other events, e.g. VBUS off comes first before CC disconect for a power sink, in that case the first tcpm_detach() will only clear port->attached flag but leave hard_reset_count there because tcpm_port_is_disconnected() is still false, then later tcpm_detach() by CC disconnect will directly return due to port->attached is cleared, finally this will result tcpm will not try hard reset or error recovery for later attach. ChiYuan reported this issue on his platform with below tcpm trace: After power sink session setup after hard reset 2 times, detach from the power source and then attach: [ 4848.046358] VBUS off [ 4848.046384] state change SNK_READY -> SNK_UNATTACHED [ 4848.050908] Setting voltage/current limit 0 mV 0 mA [ 4848.050936] polarity 0 [ 4848.052593] Requesting mux state 0, usb-role 0, orientation 0 [ 4848.053222] Start toggling [ 4848.086500] state change SNK_UNATTACHED -> TOGGLING [ 4848.089983] CC1: 0 -> 0, CC2: 3 -> 3 [state TOGGLING, polarity 0, connected] [ 4848.089993] state change TOGGLING -> SNK_ATTACH_WAIT [ 4848.090031] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @200 ms [ 4848.141162] CC1: 0 -> 0, CC2: 3 -> 0 [state SNK_ATTACH_WAIT, polarity 0, disconnected] [ 4848.141170] state change SNK_ATTACH_WAIT -> SNK_ATTACH_WAIT [ 4848.141184] pending state change SNK_ATTACH_WAIT -> SNK_UNATTACHED @20 ms [ 4848.163156] state change SNK_ATTACH_WAIT -> SNK_UNATTACHED [delayed 20 ms] [ 4848.163162] Start toggling [ 4848.216918] CC1: 0 -> 0, CC2: 0 -> 3 [state TOGGLING, polarity 0, connected] [ 4848.216954] state change TOGGLING -> SNK_ATTACH_WAIT [ 4848.217080] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @200 ms [ 4848.231771] CC1: 0 -> 0, CC2: 3 -> 0 [state SNK_ATTACH_WAIT, polarity 0, disconnected] [ 4848.231800] state change SNK_ATTACH_WAIT -> SNK_ATTACH_WAIT [ 4848.231857] pending state change SNK_ATTACH_WAIT -> SNK_UNATTACHED @20 ms [ 4848.256022] state change SNK_ATTACH_WAIT -> SNK_UNATTACHED [delayed20 ms] [ 4848.256049] Start toggling [ 4848.871148] VBUS on [ 4848.885324] CC1: 0 -> 0, CC2: 0 -> 3 [state TOGGLING, polarity 0, connected] [ 4848.885372] state change TOGGLING -> SNK_ATTACH_WAIT [ 4848.885548] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @200 ms [ 4849.088240] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed200 ms] [ 4849.088284] state change SNK_DEBOUNCED -> SNK_ATTACHED [ 4849.088291] polarity 1 [ 4849.088769] Requesting mux state 1, usb-role 2, orientation 2 [ 4849.088895] state change SNK_ATTACHED -> SNK_STARTUP [ 4849.088907] state change SNK_STARTUP -> SNK_DISCOVERY [ 4849.088915] Setting voltage/current limit 5000 mV 0 mA [ 4849.088927] vbus=0 charge:=1 [ 4849.090505] state change SNK_DISCOVERY -> SNK_WAIT_CAPABILITIES [ 4849.090828] pending state change SNK_WAIT_CAPABILITIES -> SNK_READY @240 ms [ 4849.335878] state change SNK_WAIT_CAPABILITIES -> SNK_READY [delayed240 ms] this patch fix this issue by clear hard_reset_count at any cases of cc disconnect, í.e. don't check port->attached flag. Fixes: 4b4e02c83167 ("typec: tcpm: Move out of staging") Cc: stable@vger.kernel.org Reported-and-tested-by: ChiYuan Huang Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun Link: https://lore.kernel.org/r/1602500592-3817-1-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 38203b8385bf6283537162bde7d499f830964711 Author: Jerome Brunet Date: Mon Oct 19 19:07:02 2020 +0200 usb: cdc-acm: fix cooldown mechanism Commit a4e7279cd1d1 ("cdc-acm: introduce a cool down") is causing regression if there is some USB error, such as -EPROTO. This has been reported on some samples of the Odroid-N2 using the Combee II Zibgee USB dongle. > struct acm *acm = container_of(work, struct acm, work) is incorrect in case of a delayed work and causes warnings, usually from the workqueue: > WARNING: CPU: 0 PID: 0 at kernel/workqueue.c:1474 __queue_work+0x480/0x528. When this happens, USB eventually stops working completely after a while. Also the ACM_ERROR_DELAY bit is never set, so the cooldown mechanism previously introduced cannot be triggered and acm_submit_read_urb() is never called. This changes makes the cdc-acm driver use a single delayed work, fixing the pointer arithmetic in acm_softint() and set the ACM_ERROR_DELAY when the cooldown mechanism appear to be needed. Fixes: a4e7279cd1d1 ("cdc-acm: introduce a cool down") Cc: Oliver Neukum Reported-by: Pascal Vizeli Acked-by: Oliver Neukum Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20201019170702.150534-1-jbrunet@baylibre.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 3cd54a618834430a26a648d880dd83d740f2ae30 Author: Ran Wang Date: Sat Oct 10 14:03:08 2020 +0800 usb: host: fsl-mph-dr-of: check return of dma_set_mask() fsl_usb2_device_register() should stop init if dma_set_mask() return error. Fixes: cae058610465 ("drivers/usb/host: fsl: Set DMA_MASK of usb platform device") Reviewed-by: Peter Chen Signed-off-by: Ran Wang Link: https://lore.kernel.org/r/20201010060308.33693-1-ran.wang_1@nxp.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit cbdc0f54560f94c2205ddbebb5464d65868af0d8 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:18 2020 +0200 usb: fix kernel-doc markups There is a common comment marked, instead, with kernel-doc notation. Also, some identifiers have different names between their prototypes and the kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Acked-by: Felipe Balbi Link: https://lore.kernel.org/r/0b964be3884def04fcd20ea5c12cb90d0014871c.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 071ba4cc559de47160761b9500b72e8fa09d923d Author: Jason Gunthorpe Date: Mon Oct 26 11:25:49 2020 -0300 RDMA: Add rdma_connect_locked() There are two flows for handling RDMA_CM_EVENT_ROUTE_RESOLVED, either the handler triggers a completion and another thread does rdma_connect() or the handler directly calls rdma_connect(). In all cases rdma_connect() needs to hold the handler_mutex, but when handler's are invoked this is already held by the core code. This causes ULPs using the 2nd method to deadlock. Provide a rdma_connect_locked() and have all ULPs call it from their handlers. Link: https://lore.kernel.org/r/0-v2-53c22d5c1405+33-rdma_connect_locking_jgg@nvidia.com Reported-and-tested-by: Guoqing Jiang Fixes: 2a7cec538169 ("RDMA/cma: Fix locking for the RDMA_CM_CONNECT state") Acked-by: Santosh Shilimkar Acked-by: Jack Wang Reviewed-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit 063a3d67693ecde7f24ca00d4a131883edab1e73 Author: Dan Carpenter Date: Fri Oct 23 14:24:12 2020 +0300 usb: typec: stusb160x: fix some signedness bugs These variables are enums but in this situation GCC will treat them as unsigned so the conditions are never true. Fixes: da0cb6310094 ("usb: typec: add support for STUSB160x Type-C controller family") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201023112412.GD282278@mwanda Signed-off-by: Greg Kroah-Hartman commit f49a51bfdc8ea717c97ccd4cc98b7e6daaa5553a Author: Daniel Vetter Date: Tue Oct 27 22:49:22 2020 +0100 drm/shme-helpers: Fix dma_buf_mmap forwarding bug When we forward an mmap to the dma_buf exporter, they get to own everything. Unfortunately drm_gem_mmap_obj() overwrote vma->vm_private_data after the driver callback, wreaking the exporter complete. This was noticed because vb2_common_vm_close blew up on mali gpu with panfrost after commit 26d3ac3cb04d ("drm/shmem-helpers: Redirect mmap for imported dma-buf"). Unfortunately drm_gem_mmap_obj also acquires a surplus reference that we need to drop in shmem helpers, which is a bit of a mislayer situation. Maybe the entire dma_buf_mmap forwarding should be pulled into core gem code. Note that the only two other drivers which forward mmap in their own code (etnaviv and exynos) get this somewhat right by overwriting the gem mmap code. But they seem to still have the leak. This might be a good excuse to move these drivers over to shmem helpers completely. Reviewed-by: Boris Brezillon Acked-by: Christian König Cc: Christian König Cc: Sumit Semwal Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Fixes: 26d3ac3cb04d ("drm/shmem-helpers: Redirect mmap for imported dma-buf") Cc: Boris Brezillon Cc: Thomas Zimmermann Cc: Gerd Hoffmann Cc: Rob Herring Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Cc: # v5.9+ Reported-and-tested-by: piotr.oniszczuk@gmail.com Cc: piotr.oniszczuk@gmail.com Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201027214922.3566743-1-daniel.vetter@ffwll.ch commit 1de111b51b829bcf01d2e57971f8fd07a665fa3f Author: Stephen Boyd Date: Fri Oct 23 08:47:50 2020 -0700 KVM: arm64: ARM_SMCCC_ARCH_WORKAROUND_1 doesn't return SMCCC_RET_NOT_REQUIRED According to the SMCCC spec[1](7.5.2 Discovery) the ARM_SMCCC_ARCH_WORKAROUND_1 function id only returns 0, 1, and SMCCC_RET_NOT_SUPPORTED. 0 is "workaround required and safe to call this function" 1 is "workaround not required but safe to call this function" SMCCC_RET_NOT_SUPPORTED is "might be vulnerable or might not be, who knows, I give up!" SMCCC_RET_NOT_SUPPORTED might as well mean "workaround required, except calling this function may not work because it isn't implemented in some cases". Wonderful. We map this SMC call to 0 is SPECTRE_MITIGATED 1 is SPECTRE_UNAFFECTED SMCCC_RET_NOT_SUPPORTED is SPECTRE_VULNERABLE For KVM hypercalls (hvc), we've implemented this function id to return SMCCC_RET_NOT_SUPPORTED, 0, and SMCCC_RET_NOT_REQUIRED. One of those isn't supposed to be there. Per the code we call arm64_get_spectre_v2_state() to figure out what to return for this feature discovery call. 0 is SPECTRE_MITIGATED SMCCC_RET_NOT_REQUIRED is SPECTRE_UNAFFECTED SMCCC_RET_NOT_SUPPORTED is SPECTRE_VULNERABLE Let's clean this up so that KVM tells the guest this mapping: 0 is SPECTRE_MITIGATED 1 is SPECTRE_UNAFFECTED SMCCC_RET_NOT_SUPPORTED is SPECTRE_VULNERABLE Note: SMCCC_RET_NOT_AFFECTED is 1 but isn't part of the SMCCC spec Fixes: c118bbb52743 ("arm64: KVM: Propagate full Spectre v2 workaround state to KVM guests") Signed-off-by: Stephen Boyd Acked-by: Marc Zyngier Acked-by: Will Deacon Cc: Andre Przywara Cc: Steven Price Cc: Marc Zyngier Cc: stable@vger.kernel.org Link: https://developer.arm.com/documentation/den0028/latest [1] Link: https://lore.kernel.org/r/20201023154751.1973872-1-swboyd@chromium.org Signed-off-by: Will Deacon commit 011fde48394b7dc8dfd6660d1013b26a00157b80 Author: Yangbo Lu Date: Tue Oct 20 16:11:16 2020 +0800 mmc: sdhci-of-esdhc: make sure delay chain locked for HS400 For eMMC HS400 mode initialization, the DLL reset is a required step if DLL is enabled to use previously, like in bootloader. This step has not been documented in reference manual, but the RM will be fixed sooner or later. This patch is to add the step of DLL reset, and make sure delay chain locked for HS400. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20201020081116.20918-1-yangbo.lu@nxp.com Fixes: 54e08d9a95ca ("mmc: sdhci-of-esdhc: add hs400 mode support") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 9fc149c3bce7bdbb94948a8e6bd025e3b3538603 Author: Kai-Heng Feng Date: Tue Oct 27 21:00:38 2020 +0800 ALSA: hda: Reinstate runtime_allow() for all hda controllers The broken jack detection should be fixed by commit a6e7d0a4bdb0 ("ALSA: hda: fix jack detection with Realtek codecs when in D3"), let's try enabling runtime PM by default again. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20201027130038.16463-4-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit f5dac54d9d93826a776dffc848df76746f7135bb Author: Kai-Heng Feng Date: Tue Oct 27 21:00:37 2020 +0800 ALSA: hda: Separate runtime and system suspend Both pm_runtime_force_suspend() and pm_runtime_force_resume() have some implicit checks, so it can make code flow more straightforward if we separate runtime and system suspend callbacks. High Definition Audio Specification, 4.5.9.3 Codec Wake From System S3 states that codec can wake the system up from S3 if WAKEEN is toggled. Since HDA controller has different wakeup settings for runtime and system susend, we also need to explicitly disable direct-complete which can be enabled automatically by PCI core. In addition to that, avoid waking up codec if runtime resume is for system suspend, to not break direct-complete for codecs. While at it, also remove AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP, as the original bug commit a6630529aecb ("ALSA: hda: Workaround for spurious wakeups on some Intel platforms") solves doesn't happen with this patch. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20201027130038.16463-3-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 215a22ed31a1332075866eca07744d442367c04b Author: Kai-Heng Feng Date: Tue Oct 27 21:00:36 2020 +0800 ALSA: hda: Refactor codec PM to use direct-complete optimization Upon system resume, hda_codec_pm_resume() uses hda_codec_force_resume() to resume the codec. However, pm_runtime_force_resume() won't really resume the codec because of pm_runtime_need_not_resume() check. Hence, hda_codec_force_resume() schedules a jackpoll work, which is to really power up the codec. Instead of doing that, we can use direct-complete to make the PM flow more straightforward, and keep codec always suspended through system PM flow if conditions are met. On system suspend, PM core will decide what to do based on hda_codec_pm_prepare(): - If codec is not runtime-suspended, PM core will suspend and resume the device as normal. - If codec is runtime-suspended, PM core will try to keep it suspended. If it's still suspended after system resume, we use hda_codec_pm_complete() to resume codec if it's needed. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20201027130038.16463-2-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 8a8de09cb2adc119104f35044d1a840dd47aa9d8 Author: Kailang Yang Date: Tue Oct 27 16:46:38 2020 +0800 ALSA: hda/realtek - Fixed HP headset Mic can't be detected System boot with plugged headset. It will not detect headset Mic. It will happen on cold boot restart resume state. Quirk by SSID change to quirk by pin verb. Fixes: 13468bfa8c58 ("ALSA: hda/realtek - set mic to auto detect on a HP AIO machine") Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/f42ae1ede1cf47029ae2bef1a42caf03@realtek.com Signed-off-by: Takashi Iwai commit defe40af1a7143a0538d7c3e87224459eea0a877 Author: Pawel Laszczak Date: Mon Oct 12 08:45:48 2020 +0200 usb: cdns3: Variable 'length' set but not used Patch removes not used variable 'length' from cdns3_wa2_descmiss_copy_data function. Fixes: 141e70fef4ee ("usb: cdns3: gadget: need to handle sg case for workaround 2 case") Acked-by: Roger Quadros Signed-off-by: Pawel Laszczak Signed-off-by: Peter Chen commit a46b973bced1ba57420752bf38426acd9f6cbfa6 Author: Ziyi Cao Date: Tue Oct 20 00:08:06 2020 +0800 USB: serial: option: add Quectel EC200T module support Add usb product id of the Quectel EC200T module. Signed-off-by: Ziyi Cao Link: https://lore.kernel.org/r/17f8a2a3-ce0f-4be7-8544-8fdf286907d0@www.fastmail.com Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 768664114b1ac9184f1dc6217d9c930a08ffbfa8 Author: Arnd Bergmann Date: Mon Oct 26 17:01:15 2020 +0100 dmaengine: ti: k3-udma: fix -Wenum-conversion warning gcc warns about a mismatch argument type when passing 'false' into a function that expects an enum: drivers/dma/ti/k3-udma-private.c: In function 'xudma_tchan_get': drivers/dma/ti/k3-udma-private.c:86:34: warning: implicit conversion from 'enum ' to 'enum udma_tp_level' [-Wenum-conversion] 86 | return __udma_reserve_##res(ud, false, id); \ | ^~~~~ drivers/dma/ti/k3-udma-private.c:95:1: note: in expansion of macro 'XUDMA_GET_PUT_RESOURCE' 95 | XUDMA_GET_PUT_RESOURCE(tchan); | ^~~~~~~~~~~~~~~~~~~~~~ In this case, false has the same numerical value as UDMA_TP_NORMAL, so passing that is most likely the correct way to avoid the warning without changing the behavior. Fixes: d70241913413 ("dmaengine: ti: k3-udma: Add glue layer for non DMAengine users") Signed-off-by: Arnd Bergmann Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201026160123.3704531-1-arnd@kernel.org Signed-off-by: Vinod Koul commit 484f910e93b48c1d8890d8330a87e34ae61f4782 Author: Dave Jiang Date: Tue Oct 27 14:34:09 2020 -0700 dmaengine: idxd: fix wq config registers offset programming DSA spec v1.1 [1] updated to include a stride size register for WQ configuration that will specify how much space is reserved for the WQ configuration register set. This change is expected to be in the final gen1 DSA hardware. Fix the driver to use WQCFG_OFFSET() for all WQ offset calculation and fixup WQCFG_OFFSET() to use the new calculated wq size. [1]: https://software.intel.com/content/www/us/en/develop/download/intel-data-streaming-accelerator-preliminary-architecture-specification.html Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/160383444959.48058.14249265538404901781.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 35bc10b2eafbb701064b94f283b77c54d3304842 Author: Kanchan Joshi Date: Mon Sep 28 15:25:49 2020 +0530 null_blk: synchronization fix for zoned device Parallel write,read,zone-mgmt operations accessing/altering zone state and write-pointer may get into race. Avoid the situation by using a new spinlock for zoned device. Concurrent zone-appends (on a zone) returning same write-pointer issue is also avoided using this lock. Cc: stable@vger.kernel.org Fixes: e0489ed5daeb ("null_blk: Support REQ_OP_ZONE_APPEND") Signed-off-by: Kanchan Joshi Reviewed-by: Damien Le Moal Signed-off-by: Jens Axboe commit d6535dca28859d8d9ef80894eb287b2ac35a32e8 Author: Leon Romanovsky Date: Mon Oct 26 14:33:27 2020 +0200 net: protect tcf_block_unbind with block lock The tcf_block_unbind() expects that the caller will take block->cb_lock before calling it, however the code took RTNL lock and dropped cb_lock instead. This causes to the following kernel panic. WARNING: CPU: 1 PID: 13524 at net/sched/cls_api.c:1488 tcf_block_unbind+0x2db/0x420 Modules linked in: mlx5_ib mlx5_core mlxfw ptp pps_core act_mirred act_tunnel_key cls_flower vxlan ip6_udp_tunnel udp_tunnel dummy sch_ingress openvswitch nsh xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 br_netfilter rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi ib_umad ib_ipoib rdma_cm iw_cm ib_cm ib_uverbs ib_core overlay [last unloaded: mlxfw] CPU: 1 PID: 13524 Comm: test-ecmp-add-v Tainted: G W 5.9.0+ #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:tcf_block_unbind+0x2db/0x420 Code: ff 48 83 c4 40 5b 5d 41 5c 41 5d 41 5e 41 5f c3 49 8d bc 24 30 01 00 00 be ff ff ff ff e8 7d 7f 70 00 85 c0 0f 85 7b fd ff ff <0f> 0b e9 74 fd ff ff 48 c7 c7 dc 6a 24 84 e8 02 ec fe fe e9 55 fd RSP: 0018:ffff888117d17968 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88812f713c00 RCX: 1ffffffff0848d5b RDX: 0000000000000001 RSI: ffff88814fbc8130 RDI: ffff888107f2b878 RBP: 1ffff11022fa2f3f R08: 0000000000000000 R09: ffffffff84115a87 R10: fffffbfff0822b50 R11: ffff888107f2b898 R12: ffff88814fbc8000 R13: ffff88812f713c10 R14: ffff888117d17a38 R15: ffff88814fbc80c0 FS: 00007f6593d36740(0000) GS:ffff8882a4f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005607a00758f8 CR3: 0000000131aea006 CR4: 0000000000170ea0 Call Trace: tc_block_indr_cleanup+0x3e0/0x5a0 ? tcf_block_unbind+0x420/0x420 ? __mutex_unlock_slowpath+0xe7/0x610 flow_indr_dev_unregister+0x5e2/0x930 ? mlx5e_restore_tunnel+0xdf0/0xdf0 [mlx5_core] ? mlx5e_restore_tunnel+0xdf0/0xdf0 [mlx5_core] ? flow_indr_block_cb_alloc+0x3c0/0x3c0 ? mlx5_db_free+0x37c/0x4b0 [mlx5_core] mlx5e_cleanup_rep_tx+0x8b/0xc0 [mlx5_core] mlx5e_detach_netdev+0xe5/0x120 [mlx5_core] mlx5e_vport_rep_unload+0x155/0x260 [mlx5_core] esw_offloads_disable+0x227/0x2b0 [mlx5_core] mlx5_eswitch_disable_locked.cold+0x38e/0x699 [mlx5_core] mlx5_eswitch_disable+0x94/0xf0 [mlx5_core] mlx5_device_disable_sriov+0x183/0x1f0 [mlx5_core] mlx5_core_sriov_configure+0xfd/0x230 [mlx5_core] sriov_numvfs_store+0x261/0x2f0 ? sriov_drivers_autoprobe_store+0x110/0x110 ? sysfs_file_ops+0x170/0x170 ? sysfs_file_ops+0x117/0x170 ? sysfs_file_ops+0x170/0x170 kernfs_fop_write+0x1ff/0x3f0 ? rcu_read_lock_any_held+0x6e/0x90 vfs_write+0x1f3/0x620 ksys_write+0xf9/0x1d0 ? __x64_sys_read+0xb0/0xb0 ? lockdep_hardirqs_on_prepare+0x273/0x3f0 ? syscall_enter_from_user_mode+0x1d/0x50 do_syscall_64+0x2d/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 <...> ---[ end trace bfdd028ada702879 ]--- Fixes: 0fdcf78d5973 ("net: use flow_indr_dev_setup_offload()") Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/20201026123327.1141066-1-leon@kernel.org Signed-off-by: Jakub Kicinski commit 2ac8af0967aaa2b67cb382727e784900d2f4d0da Author: Thomas Bogendoerfer Date: Mon Oct 26 11:42:21 2020 +0100 ibmveth: Fix use of ibmveth in a bridge. The check for src mac address in ibmveth_is_packet_unsupported is wrong. Commit 6f2275433a2f wanted to shut down messages for loopback packets, but now suppresses bridged frames, which are accepted by the hypervisor otherwise bridging won't work at all. Fixes: 6f2275433a2f ("ibmveth: Detect unsupported packets before sending to the hypervisor") Signed-off-by: Michal Suchanek Signed-off-by: Thomas Bogendoerfer Link: https://lore.kernel.org/r/20201026104221.26570-1-msuchanek@suse.de Signed-off-by: Jakub Kicinski commit 501b72ae2472a15a80c0f4063ee8341870e1ef55 Author: Guillaume Nault Date: Mon Oct 26 11:29:45 2020 +0100 net/sched: act_mpls: Add softdep on mpls_gso.ko TCA_MPLS_ACT_PUSH and TCA_MPLS_ACT_MAC_PUSH might be used on gso packets. Such packets will thus require mpls_gso.ko for segmentation. v2: Drop dependency on CONFIG_NET_MPLS_GSO in Kconfig (from Jakub and David). Fixes: 2a2ea50870ba ("net: sched: add mpls manipulation actions to TC") Signed-off-by: Guillaume Nault Link: https://lore.kernel.org/r/1f6cab15bbd15666795061c55563aaf6a386e90e.1603708007.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit 68b9f0865b1ef545da180c57d54b82c94cb464a4 Author: Andrew Gabbasov Date: Mon Oct 26 05:21:30 2020 -0500 ravb: Fix bit fields checking in ravb_hwtstamp_get() In the function ravb_hwtstamp_get() in ravb_main.c with the existing values for RAVB_RXTSTAMP_TYPE_V2_L2_EVENT (0x2) and RAVB_RXTSTAMP_TYPE_ALL (0x6) if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_V2_L2_EVENT) config.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT; else if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_ALL) config.rx_filter = HWTSTAMP_FILTER_ALL; if the test on RAVB_RXTSTAMP_TYPE_ALL should be true, it will never be reached. This issue can be verified with 'hwtstamp_config' testing program (tools/testing/selftests/net/hwtstamp_config.c). Setting filter type to ALL and subsequent retrieving it gives incorrect value: $ hwtstamp_config eth0 OFF ALL flags = 0 tx_type = OFF rx_filter = ALL $ hwtstamp_config eth0 flags = 0 tx_type = OFF rx_filter = PTP_V2_L2_EVENT Correct this by converting if-else's to switch. Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Reported-by: Julia Lawall Signed-off-by: Andrew Gabbasov Reviewed-by: Sergei Shtylyov Link: https://lore.kernel.org/r/20201026102130.29368-1-andrew_gabbasov@mentor.com Signed-off-by: Jakub Kicinski commit 0d8cb9464a7d9c3e6349db3f7719a80f3793347e Author: Dan Carpenter Date: Mon Oct 26 11:01:27 2020 +0300 devlink: Unlock on error in dumpit() This needs to unlock before returning. Fixes: 544e7c33ec2f ("net: devlink: Add support for port regions") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201026080127.GB1628785@mwanda Signed-off-by: Jakub Kicinski commit 6c211809c87f0de939f3bd60ceec05338ae6eba1 Author: Dan Carpenter Date: Mon Oct 26 11:00:59 2020 +0300 devlink: Fix some error codes These paths don't set the error codes. It's especially important in devlink_nl_region_notify_build() where it leads to a NULL dereference in the caller. Fixes: 544e7c33ec2f ("net: devlink: Add support for port regions") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201026080059.GA1628785@mwanda Signed-off-by: Jakub Kicinski commit 6daa1da4e262b0cd52ef0acc1989ff22b5540264 Author: Vinay Kumar Yadav Date: Mon Oct 26 01:12:29 2020 +0530 chelsio/chtls: fix memory leaks in CPL handlers CPL handler functions chtls_pass_open_rpl() and chtls_close_listsrv_rpl() should return CPL_RET_BUF_DONE so that caller function will do skb free to avoid leak. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Vinay Kumar Yadav Link: https://lore.kernel.org/r/20201025194228.31271-1-vinay.yadav@chelsio.com Signed-off-by: Jakub Kicinski commit 28e9dcd9172028263c8225c15c4e329e08475e89 Author: Vinay Kumar Yadav Date: Mon Oct 26 01:05:39 2020 +0530 chelsio/chtls: fix deadlock issue In chtls_pass_establish() we hold child socket lock using bh_lock_sock and we are again trying bh_lock_sock in add_to_reap_list, causing deadlock. Remove bh_lock_sock in add_to_reap_list() as lock is already held. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Vinay Kumar Yadav Link: https://lore.kernel.org/r/20201025193538.31112-1-vinay.yadav@chelsio.com Signed-off-by: Jakub Kicinski commit 7b9621d4593199aa0268e56081fe730b71c053e6 Author: Tommi Rantala Date: Thu Oct 8 15:26:28 2020 +0300 selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c kcmp is not used in pidfd_setns_test.c, so do not include Signed-off-by: Tommi Rantala Acked-by: Christian Brauner Signed-off-by: Shuah Khan commit 90da74af349e8a476e1d357da735b8f35b56d4e6 Author: Tommi Rantala Date: Thu Oct 8 15:26:27 2020 +0300 selftests: pidfd: add CONFIG_CHECKPOINT_RESTORE=y to config kcmp syscall is used in pidfd_getfd_test.c, so add CONFIG_CHECKPOINT_RESTORE=y to config to ensure kcmp is available. Signed-off-by: Tommi Rantala Acked-by: Christian Brauner Signed-off-by: Shuah Khan commit b5ec9fe5be5e02e7db9e79aaa9a1ea7a3419d0b5 Author: Tommi Rantala Date: Thu Oct 8 15:26:26 2020 +0300 selftests: pidfd: skip test on kcmp() ENOSYS Skip test if kcmp() is not available, for example if kernel is compiled without CONFIG_CHECKPOINT_RESTORE=y. Signed-off-by: Tommi Rantala Acked-by: Christian Brauner Signed-off-by: Shuah Khan commit 0b18fed98bf96ba5ac14ab7c43c8a3364cb0daf8 Author: Tommi Rantala Date: Thu Oct 8 15:26:25 2020 +0300 selftests: pidfd: use ksft_test_result_skip() when skipping test There's planned tests != run tests in pidfd_test when some test is skipped: $ ./pidfd_test TAP version 13 1..8 [...] # pidfd_send_signal signal recycled pid test: Skipping test # Planned tests != run tests (8 != 7) # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:0 error:0 Fix by using ksft_test_result_skip(): $ ./pidfd_test TAP version 13 1..8 [...] ok 8 # SKIP pidfd_send_signal signal recycled pid test: Unsharing pid namespace not permitted # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:1 error:0 Signed-off-by: Tommi Rantala Acked-by: Christian Brauner Signed-off-by: Shuah Khan commit ef7086347c82c53a6c5238bd2cf31379f6acadde Author: Tommi Rantala Date: Thu Oct 8 15:26:24 2020 +0300 selftests/harness: prettify SKIP message whitespace again Commit 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP") replaced XFAIL with SKIP in the output. Add one more space to make the output aligned and pretty again. Fixes: 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP") Signed-off-by: Tommi Rantala Acked-by: Kees Cook Reviewed-by: Christian Brauner Signed-off-by: Shuah Khan commit 1948172fdba5ad643529ddcd00a601c0caa913ed Author: Tommi Rantala Date: Thu Oct 8 15:26:22 2020 +0300 selftests: pidfd: fix compilation errors due to wait.h Drop unneeded header inclusion to fix pidfd compilation errors seen in Fedora 32: In file included from pidfd_open_test.c:9: ../../../../usr/include/linux/wait.h:17:16: error: expected identifier before numeric constant 17 | #define P_ALL 0 | ^ Signed-off-by: Tommi Rantala Reviewed-by: Kees Cook Acked-by: Christian Brauner Signed-off-by: Shuah Khan commit f825d3f7ed9305e7dd0a3e0a74673a4257d0cc53 Author: Tommi Rantala Date: Thu Oct 8 15:26:21 2020 +0300 selftests: filter kselftest headers from command in lib.mk Commit 1056d3d2c97e ("selftests: enforce local header dependency in lib.mk") added header dependency to the rule, but as the rule uses $^, the headers are added to the compiler command line. This can cause unexpected precompiled header files being generated when compilation fails: $ echo { >> openat2_test.c $ make gcc -Wall -O2 -g -fsanitize=address -fsanitize=undefined openat2_test.c tools/testing/selftests/kselftest_harness.h tools/testing/selftests/kselftest.h helpers.c -o tools/testing/selftests/openat2/openat2_test openat2_test.c:313:1: error: expected identifier or ‘(’ before ‘{’ token 313 | { | ^ make: *** [../lib.mk:140: tools/testing/selftests/openat2/openat2_test] Error 1 $ file openat2_test* openat2_test: GCC precompiled header (version 014) for C openat2_test.c: C source, ASCII text Fix it by filtering out the headers, so that we'll only pass the actual *.c files in the compiler command line. Fixes: 1056d3d2c97e ("selftests: enforce local header dependency in lib.mk") Signed-off-by: Tommi Rantala Acked-by: Kees Cook Reviewed-by: Christian Brauner Signed-off-by: Shuah Khan commit e3e40312567087fbe6880f316cb2b0e1f3d8a82c Author: Colin Ian King Date: Fri Oct 2 14:25:01 2020 +0100 selftests/ftrace: check for do_sys_openat2 in user-memory test More recent libc implementations are now using openat/openat2 system calls so also add do_sys_openat2 to the tracing so that the test passes on these systems because do_sys_open may not be called. Thanks to Masami Hiramatsu for the help on getting this fix to work correctly. Signed-off-by: Colin Ian King Acked-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan commit dc6bf4da825aa0301a46f55fec7c0bb706af2aad Author: Steven Rostedt (VMware) Date: Mon Oct 26 16:20:32 2020 -0400 selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function Commit cad6967ac108 ("fork: introduce kernel_clone()") replaced "_do_fork()" with "kernel_clone()". The ftrace selftests reference the fork function in several of the tests. The rename will make the tests break, but if those names are changed in the tests, they would then break on older kernels. The same set of tests should pass older kernels if they have previously passed. Obviously, a new test may not work on older kernels if the test was added due to a bug or a new feature. The setup of ftracetest will now create a $FUNCTION_FORK bash variable that will contain "_do_fork" for older kernels and "kernel_clone" for newer ones. It figures out the proper name by examining /proc/kallsyms. Note, available_filter_functions could also be used, but because some tests should be able to pass without function tracing enabled, it could not be used. Fixes: eea11285dab3 ("tracing: switch to kernel_clone()") Signed-off-by: Steven Rostedt (VMware) Acked-by: Masami Hiramatsu Signed-off-by: Shuah Khan commit cb05143bdf428f280a5d519c82abf196d7871c11 Author: Peter Zijlstra Date: Tue Oct 27 19:33:30 2020 +0100 x86/debug: Fix DR_STEP vs ptrace_get_debugreg(6) Commit d53d9bc0cf78 ("x86/debug: Change thread.debugreg6 to thread.virtual_dr6") changed the semantics of the variable from random collection of bits, to exactly only those bits that ptrace() needs. Unfortunately this lost DR_STEP for PTRACE_{BLOCK,SINGLE}STEP. Furthermore, it turns out that userspace expects DR_STEP to be unconditionally available, even for manual TF usage outside of PTRACE_{BLOCK,SINGLE}_STEP. Fixes: d53d9bc0cf78 ("x86/debug: Change thread.debugreg6 to thread.virtual_dr6") Reported-by: Kyle Huey Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Kyle Huey Link: https://lore.kernel.org/r/20201027183330.GM2628@hirez.programming.kicks-ass.net commit a195f3d4528a2f88d6f986f6b1101775ad4891cf Author: Peter Zijlstra Date: Tue Oct 27 10:15:06 2020 +0100 x86/debug: Only clear/set ->virtual_dr6 for userspace #DB The ->virtual_dr6 is the value used by ptrace_{get,set}_debugreg(6). A kernel #DB clearing it could mean spurious malfunction of ptrace() expectations. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Kyle Huey Link: https://lore.kernel.org/r/20201027093608.028952500@infradead.org commit 2a9baf5ad4884108b3c6d56a50e8105ccf8a4ee7 Author: Peter Zijlstra Date: Tue Oct 27 10:15:05 2020 +0100 x86/debug: Fix BTF handling The SDM states that #DB clears DEBUGCTLMSR_BTF, this means that when the bit is set for userspace (TIF_BLOCKSTEP) and a kernel #DB happens first, the BTF bit meant for userspace execution is lost. Have the kernel #DB handler restore the BTF bit when it was requested for userspace. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Kyle Huey Link: https://lore.kernel.org/r/20201027093607.956147736@infradead.org commit d383e346f97d6bb0d654bb3d63c44ab106d92d29 Author: David Howells Date: Thu Oct 22 14:40:31 2020 +0100 afs: Fix afs_launder_page to not clear PG_writeback Fix afs_launder_page() to not clear PG_writeback on the page it is laundering as the flag isn't set in this case. Fixes: 4343d00872e1 ("afs: Get rid of the afs_writeback record") Signed-off-by: David Howells commit 248c944e2159de4868bef558feea40214aaf8464 Author: Dan Carpenter Date: Mon Aug 24 11:58:12 2020 +0300 afs: Fix a use after free in afs_xattr_get_acl() The "op" pointer is freed earlier when we call afs_put_operation(). Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Signed-off-by: Dan Carpenter Signed-off-by: David Howells cc: Colin Ian King commit acc080d15dde820bd39eb55a04f9a09c7ef52e67 Author: David Howells Date: Tue Oct 27 10:42:56 2020 +0000 afs: Fix tracing deref-before-check The patch dca54a7bbb8c: "afs: Add tracing for cell refcount and active user count" from Oct 13, 2020, leads to the following Smatch complaint: fs/afs/cell.c:596 afs_unuse_cell() warn: variable dereferenced before check 'cell' (see line 592) Fix this by moving the retrieval of the cell debug ID to after the check of the validity of the cell pointer. Reported-by: Dan Carpenter Fixes: dca54a7bbb8c ("afs: Add tracing for cell refcount and active user count") Signed-off-by: David Howells cc: Dan Carpenter commit 06a17bbe1d47fec6232505c355b367797f6a635c Author: David Howells Date: Tue Oct 27 09:39:04 2020 +0000 afs: Fix copy_file_range() The prevention of splice-write without explicit ops made the copy_file_write() syscall to an afs file (as done by the generic/112 xfstest) fail with EINVAL. Fix by using iter_file_splice_write() for afs. Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Signed-off-by: David Howells Reviewed-by: Christoph Hellwig commit c66dca98a24cb5f3493dd08d40bcfa94a220fa92 Author: Toke Høiland-Jørgensen Date: Tue Oct 27 00:36:23 2020 +0100 samples/bpf: Set rlimit for memlock to infinity in all samples The memlock rlimit is a notorious source of failure for BPF programs. Most of the samples just set it to infinity, but a few used a lower limit. The problem with unconditionally setting a lower limit is that this will also override the limit if the system-wide setting is *higher* than the limit being set, which can lead to failures on systems that lock a lot of memory, but set 'ulimit -l' to unlimited before running a sample. One fix for this is to only conditionally set the limit if the current limit is lower, but it is simpler to just unify all the samples and have them all set the limit to infinity. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/20201026233623.91728-1-toke@redhat.com commit ed8780e3f2ecc82645342d070c6b4e530532e680 Merge: 8c2ab803e565f abee7c494d8c4 Author: Linus Torvalds Date: Tue Oct 27 14:39:29 2020 -0700 Merge tag 'x86-urgent-2020-10-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A couple of x86 fixes which missed rc1 due to my stupidity: - Drop lazy TLB mode before switching to the temporary address space for text patching. text_poke() switches to the temporary mm which clears the lazy mode and restores the original mm afterwards. Due to clearing lazy mode this might restore a already dead mm if exit_mmap() runs in parallel on another CPU. - Document the x32 syscall design fail vs. syscall numbers 512-547 properly. - Fix the ORC unwinder to handle the inactive task frame correctly. This was unearthed due to the slightly different code generation of gcc-10. - Use an up to date screen_info for the boot params of kexec instead of the possibly stale and invalid version which happened to be valid when the kexec kernel was loaded" * tag 'x86-urgent-2020-10-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/alternative: Don't call text_poke() in lazy TLB mode x86/syscalls: Document the fact that syscalls 512-547 are a legacy mistake x86/unwind/orc: Fix inactive tasks with stack pointer in %sp on GCC 10 compiled kernels hyperv_fb: Update screen_info after removing old framebuffer x86/kexec: Use up-to-dated screen_info copy to fill boot params commit 58d043690deb7c145f8a0bd07370dcaefa97a733 Author: Maxime Ripard Date: Tue Oct 27 11:15:58 2020 +0100 drm/vc4: hdmi: Avoid sleeping in atomic context When running the trigger hook, ALSA by default will take a spinlock, and thus will run the trigger hook in atomic context. However, our HDMI driver will send the infoframes as part of the trigger hook, and part of that process is to wait for a bit to be cleared for up to 100ms. To be nicer to the system, that wait has some usleep_range that interact poorly with the atomic context. There's several ways we can fix this, but the more obvious one is to make ALSA take a mutex instead by setting the nonatomic flag on the DAI link. That doesn't work though, since now the cyclic callback installed by the dmaengine helpers in ALSA will take a mutex, while that callback is run by dmaengine's virt-chan code in a tasklet where sleeping is not allowed either. Given the delay we need to poll the bit for, changing the usleep_range for a udelay and keep running it from a context where interrupts are disabled is not really a good option either. However, we can move the infoframe setup code in the hw_params hook, like is usually done in other HDMI controllers, that isn't protected by a spinlock and thus where we can sleep. Infoframes will be sent on a regular basis anyway, and since hw_params is where the audio parameters that end up in the infoframes are setup, this also makes a bit more sense. Fixes: bb7d78568814 ("drm/vc4: Add HDMI audio support") Suggested-by: Mark Brown Signed-off-by: Maxime Ripard Reviewed-by: Mark Brown Reviewed-by: Takashi Iwai Link: https://patchwork.freedesktop.org/patch/msgid/20201027101558.427256-1-maxime@cerno.tech commit 8c2ab803e565f994b897573f6f2f6520eef41159 Merge: f78f63da916e0 c39866f268f89 Author: Linus Torvalds Date: Tue Oct 27 12:42:44 2020 -0700 Merge tag 'orphan-handling-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull orphan section fixes from Kees Cook: "A couple corner cases were found from the link-time orphan section handling series: - arm: handle .ARM.exidx and .ARM.extab sections (Nathan Chancellor) - x86: collect .ctors.* with .ctors (Kees Cook)" * tag 'orphan-handling-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: arm/build: Always handle .ARM.exidx and .ARM.extab sections vmlinux.lds.h: Keep .ctors.* with .ctors commit f78f63da916e04e0b12a96010e2dd551954b1db4 Author: Geert Uytterhoeven Date: Tue Oct 27 19:22:46 2020 +0100 mm/process_vm_access: Add missing #include With e.g. m68k/defconfig: mm/process_vm_access.c: In function ‘process_vm_rw’: mm/process_vm_access.c:277:5: error: implicit declaration of function ‘in_compat_syscall’ [-Werror=implicit-function-declaration] 277 | in_compat_syscall()); | ^~~~~~~~~~~~~~~~~ Fix this by adding #include . Reported-by: noreply@ellerman.id.au Reported-by: damian Reported-by: Naresh Kamboju Fixes: 38dc5079da7081e8 ("Fix compat regression in process_vm_rw()") Signed-off-by: Geert Uytterhoeven Acked-by: Jens Axboe Signed-off-by: Linus Torvalds commit 85f971b65a692b68181438e099b946cc06ed499b Author: Zhang Qilong Date: Tue Oct 27 21:49:01 2020 +0800 ACPI: NFIT: Fix comparison to '-ENXIO' Initial value of rc is '-ENXIO', and we should use the initial value to check it. Signed-off-by: Zhang Qilong Reviewed-by: Pankaj Gupta Reviewed-by: Vishal Verma [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit c39866f268f89868df17724cd2262d121552d8c9 Author: Nathan Chancellor Date: Mon Sep 28 15:48:54 2020 -0700 arm/build: Always handle .ARM.exidx and .ARM.extab sections After turning on warnings for orphan section placement, enabling CONFIG_UNWINDER_FRAME_POINTER instead of CONFIG_UNWINDER_ARM causes thousands of warnings when clang + ld.lld are used: $ scripts/config --file arch/arm/configs/multi_v7_defconfig \ -d CONFIG_UNWINDER_ARM \ -e CONFIG_UNWINDER_FRAME_POINTER $ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- LLVM=1 defconfig zImage ld.lld: warning: init/built-in.a(main.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(main.o):(.ARM.extab.ref.text) is being placed in '.ARM.extab.ref.text' ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(do_mounts.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(do_mounts_rd.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(do_mounts_initrd.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(initramfs.o):(.ARM.extab) is being placed in '.ARM.extab' ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab.init.text) is being placed in '.ARM.extab.init.text' ld.lld: warning: init/built-in.a(calibrate.o):(.ARM.extab) is being placed in '.ARM.extab' These sections are handled by the ARM_UNWIND_SECTIONS define, which is only added to the list of sections when CONFIG_ARM_UNWIND is set. CONFIG_ARM_UNWIND is a hidden symbol that is only selected when CONFIG_UNWINDER_ARM is set so CONFIG_UNWINDER_FRAME_POINTER never handles these sections. According to the help text of CONFIG_UNWINDER_ARM, these sections should be discarded so that the kernel image size is not affected. Fixes: 5a17850e251a ("arm/build: Warn on orphan section placement") Link: https://github.com/ClangBuiltLinux/linux/issues/1152 Reported-by: kernel test robot Signed-off-by: Nathan Chancellor Review-by: Nick Desaulniers Tested-by: Nick Desaulniers [kees: Made the discard slightly more specific] Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20200928224854.3224862-1-natechancellor@gmail.com commit be0e97526455fefe3b7668b7fdf6cd247bf13318 Author: Arnd Bergmann Date: Mon Oct 26 22:48:34 2020 +0100 ACPI: dock: fix enum-conversion warning gcc points out a type mismatch: drivers/acpi/dock.c: In function 'hot_remove_dock_devices': drivers/acpi/dock.c:234:53: warning: implicit conversion from 'enum ' to 'enum dock_callback_type' [-Wenum-conversion] 234 | dock_hotplug_event(dd, ACPI_NOTIFY_EJECT_REQUEST, false); This is harmless because 'false' still has the correct numeric value, but passing DOCK_CALL_HANDLER documents better what is going on and avoids the warning. Fixes: 37f908778f20 ("ACPI / dock: Walk list in reverse order during removal of devices") Fixes: f09ce741a03a ("ACPI / dock / PCI: Drop ACPI dock notifier chain") Signed-off-by: Arnd Bergmann Reviewed-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit e510785f8aca4a7346497edd4d5aceefe5370960 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:11 2020 +0200 PNP: fix kernel-doc markups It sounds that there were function renames. Update the kernel-doc markups accordingly. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Rafael J. Wysocki commit 99aed9227073fb34ce2880cbc7063e04185a65e1 Author: Andy Shevchenko Date: Thu Oct 22 21:41:00 2020 +0300 device property: Don't clear secondary pointer for shared primary firmware node It appears that firmware nodes can be shared between devices. In such case when a (child) device is about to be deleted, its firmware node may be shared and ACPI_COMPANION_SET(..., NULL) call for it breaks the secondary link of the shared primary firmware node. In order to prevent that, check, if the device has a parent and parent's firmware node is shared with its child, and avoid crashing the link. Fixes: c15e1bdda436 ("device property: Fix the secondary firmware node handling in set_primary_fwnode()") Reported-by: Ferry Toth Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Tested-by: Ferry Toth Cc: 5.9+ # 5.9+ Signed-off-by: Rafael J. Wysocki commit d5dcce0c414fcbfe4c2037b66ac69ea5f9b3f75c Author: Andy Shevchenko Date: Thu Oct 22 21:40:59 2020 +0300 device property: Keep secondary firmware node secondary by type Behind primary and secondary we understand the type of the nodes which might define their ordering. However, if primary node gone, we can't maintain the ordering by definition of the linked list. Thus, by ordering secondary node becomes first in the list. But in this case the meaning of it is still secondary (or auxiliary). The type of the node is maintained by the secondary pointer in it: secondary pointer Meaning NULL or valid primary node ERR_PTR(-ENODEV) secondary node So, if by some reason we do the following sequence of calls set_primary_fwnode(dev, NULL); set_primary_fwnode(dev, primary); we should preserve secondary node. This concept is supported by the description of set_primary_fwnode() along with implementation of set_secondary_fwnode(). Hence, fix the commit c15e1bdda436 to follow this as well. Fixes: c15e1bdda436 ("device property: Fix the secondary firmware node handling in set_primary_fwnode()") Cc: Ferry Toth Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Tested-by: Ferry Toth Cc: 5.9+ # 5.9+ Signed-off-by: Rafael J. Wysocki commit 3e6631485fae70f474d5bd85cfaf0f113f61ccce Author: Kees Cook Date: Sun Oct 4 19:57:20 2020 -0700 vmlinux.lds.h: Keep .ctors.* with .ctors Under some circumstances, the compiler generates .ctors.* sections. This is seen doing a cross compile of x86_64 from a powerpc64el host: x86_64-linux-gnu-ld: warning: orphan section `.ctors.65435' from `kernel/trace/trace_clock.o' being placed in section `.ctors.65435' x86_64-linux-gnu-ld: warning: orphan section `.ctors.65435' from `kernel/trace/ftrace.o' being placed in section `.ctors.65435' x86_64-linux-gnu-ld: warning: orphan section `.ctors.65435' from `kernel/trace/ring_buffer.o' being placed in section `.ctors.65435' Include these orphans along with the regular .ctors section. Reported-by: Stephen Rothwell Tested-by: Stephen Rothwell Fixes: 83109d5d5fba ("x86/build: Warn on orphan section placement") Signed-off-by: Kees Cook Acked-by: Nick Desaulniers Link: https://lore.kernel.org/r/20201005025720.2599682-1-keescook@chromium.org commit 4d4ce8053bfac9a72b9094c6879119938efaa05d Author: Jackie Zamow Date: Tue Oct 27 07:43:19 2020 -0500 PM: sleep: fix typo in kernel/power/process.c Fix a typo in a comment in freeze_processes(). Signed-off-by: Jackie Zamow [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 65d437b83b2b8eb9ae47b6145399fc7683b028f7 Author: Alex Deucher Date: Mon Oct 26 17:40:42 2020 -0400 drm/amdgpu/pm: fix the fan speed in fan1_input in manual mode for navi1x It has been confirmed that the SMU metrics table should always reflect the current fan speed even in manual mode. Fixes: 3033e9f1c2de ("drm/amdgpu/swsmu: handle manual fan readback on SMU11") Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit e72d98445d089aa2d623a70b27ec9011be2c5166 Author: Kenneth Feng Date: Wed Oct 21 14:03:08 2020 +0800 drm/amd/pm: fix the wrong fan speed in fan1_input fix the wrong fan speed in fan1_input when the fan control mode is manual. the fan speed value is not correct when we set manual mode to fan1_enalbe - 1. since the fan speed in the metrics table always reflects the real fan speed,we can fetch the fan speed for both auto and manual mode. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 10105d0c9763f058f6a9a09f78397d5bf94dc94c Author: Alex Deucher Date: Mon Oct 26 17:30:28 2020 -0400 drm/amdgpu/swsmu: drop smu i2c bus on navi1x Stop registering the SMU i2c bus on navi1x. This leads to instability issues when userspace processes mess with the bus and also seems to cause display stability issues in some cases. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1314 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1341 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 4e0ba5577dba686f96c1c10ef4166380667fdec7 Author: Chen Yu Date: Sun Oct 25 00:29:53 2020 +0800 intel_idle: Fix max_cstate for processor models without C-state tables Currently intel_idle driver gets the c-state information from ACPI _CST if the processor model is not recognized by it. However the c-state in _CST starts with index 1 which is different from the index in intel_idle driver's internal c-state table. While intel_idle_max_cstate_reached() was previously introduced to deal with intel_idle driver's internal c-state table, re-using this function directly on _CST is incorrect. Fix this by subtracting 1 from the index when checking max_cstate in the _CST case. For example, append intel_idle.max_cstate=1 in boot command line, Before the patch: grep . /sys/devices/system/cpu/cpu0/cpuidle/state*/name POLL After the patch: grep . /sys/devices/system/cpu/cpu0/cpuidle/state*/name /sys/devices/system/cpu/cpu0/cpuidle/state0/name:POLL /sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1_ACPI Fixes: 18734958e9bf ("intel_idle: Use ACPI _CST for processor models without C-state tables") Reported-by: Pengfei Xu Cc: 5.6+ # 5.6+ Signed-off-by: Chen Yu [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit e213cd8f175c811034bc766ac37bcb5b3cf83a22 Merge: 3650b228f83ad e0df59de670b4 Author: Rafael J. Wysocki Date: Tue Oct 27 18:55:51 2020 +0100 Merge branch 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) framework fixes for 5.10-rc2 from Viresh Kumar: "- Don't remove the static OPPs erroneously. - Check for the right condition before making an early exit. - Avoid a lockdep by reducing the size of the critical section." * 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: Reduce the size of critical section in _opp_table_kref_release() opp: Fix early exit from dev_pm_opp_register_set_opp_helper() opp: Don't always remove static OPPs in _of_add_opp_table_v1() commit e0be38ed4ab413ddd492118cf146369b86ee0ab5 Author: Rafael J. Wysocki Date: Fri Oct 23 17:35:32 2020 +0200 cpufreq: intel_pstate: Avoid missing HWP max updates in passive mode If the cpufreq policy max limit is changed when intel_pstate operates in the passive mode with HWP enabled and the "powersave" governor is used on top of it, the HWP max limit is not updated as appropriate. Namely, in the "powersave" governor case, the target P-state is always equal to the policy min limit, so if the latter does not change, intel_cpufreq_adjust_hwp() is not invoked to update the HWP Request MSR due to the "target_pstate != old_pstate" check in intel_cpufreq_update_pstate(), so the HWP max limit is not updated as a result. Also, if the CPUFREQ_NEED_UPDATE_LIMITS flag is not set for the driver and the target frequency does not change along with the policy max limit, the "target_freq == policy->cur" check in __cpufreq_driver_target() prevents the driver's ->target() callback from being invoked at all, so the HWP max limit is not updated. To prevent that occurring, set the CPUFREQ_NEED_UPDATE_LIMITS flag in the intel_cpufreq driver structure if HWP is enabled and modify intel_cpufreq_update_pstate() to do the "target_pstate != old_pstate" check only in the non-HWP case and let intel_cpufreq_adjust_hwp() always run in the HWP case (it will update HWP Request only if the cached value of the register is different from the new one including the limits, so if neither the target P-state value nor the max limit changes, the register write will still be avoided). Fixes: f6ebbcf08f37 ("cpufreq: intel_pstate: Implement passive mode with HWP enabled") Reported-by: Zhang Rui Cc: 5.9+ # 5.9+: 1c534352f47f cpufreq: Introduce CPUFREQ_NEED_UPDATE_LIMITS ... Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Tested-by: Zhang Rui commit 1c534352f47fd83eb08075ac2474f707e74bf7f7 Author: Rafael J. Wysocki Date: Fri Oct 23 17:35:19 2020 +0200 cpufreq: Introduce CPUFREQ_NEED_UPDATE_LIMITS driver flag Generally, a cpufreq driver may need to update some internal upper and lower frequency boundaries on policy max and min changes, respectively, but currently this does not work if the target frequency does not change along with the policy limit. Namely, if the target frequency does not change along with the policy min or max, the "target_freq == policy->cur" check in __cpufreq_driver_target() prevents driver callbacks from being invoked and they do not even have a chance to update the corresponding internal boundary. This particularly affects the "powersave" and "performance" governors that always set the target frequency to one of the policy limits and it never changes when the other limit is updated. To allow cpufreq the drivers needing to update internal frequency boundaries on policy limits changes to avoid this issue, introduce a new driver flag, CPUFREQ_NEED_UPDATE_LIMITS, that (when set) will neutralize the check mentioned above. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit db865272d9c4687520dc29f77e701a1b2669872f Author: Rafael J. Wysocki Date: Fri Oct 23 17:15:56 2020 +0200 cpufreq: Avoid configuring old governors as default with intel_pstate Commit 33aa46f252c7 ("cpufreq: intel_pstate: Use passive mode by default without HWP") was meant to cause intel_pstate to be used in the passive mode with the schedutil governor on top of it, but it missed the case in which either "ondemand" or "conservative" was selected as the default governor in the existing kernel config, in which case the previous old governor configuration would be used, causing the default legacy governor to be used on top of intel_pstate instead of schedutil. Address this by preventing "ondemand" and "conservative" from being configured as the default cpufreq governor in the case when schedutil is the default choice for the default governor setting. [Note that the default cpufreq governor can still be set via the kernel command line if need be and that choice is not limited, so if anyone really wants to use one of the legacy governors by default, it can be achieved this way.] Fixes: 33aa46f252c7 ("cpufreq: intel_pstate: Use passive mode by default without HWP") Reported-by: Julia Lawall Cc: 5.8+ # 5.8+ Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit 6e9643a864aa4d532b0d467bacc18a15adf5ca82 Author: Zhang Qilong Date: Fri Oct 23 17:58:39 2020 +0800 cpufreq: e_powersaver: remove unreachable break A 'break' following a 'return' statement is pointless, so remove it. Signed-off-by: Zhang Qilong Acked-by: Viresh Kumar [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 4d09c1d952679411da2772f199643e08c46c31cd Merge: 38dc5079da708 f84e2c5c528d9 Author: Linus Torvalds Date: Tue Oct 27 10:01:24 2020 -0700 Merge tag 'devicetree-fixes-for-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - More binding additionalProperties/unevaluatedProperties additions - More yamllint fixes on additions in the merge window - CrOS embedded controller schema updates to fix warnings - LEDs schema update adding ID_RGB - A reserved-memory fix for regions starting at address 0x0 * tag 'devicetree-fixes-for-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: Another round of adding missing 'additionalProperties/unevalutatedProperties' dt-bindings: Explicitly allow additional properties in board/SoC schemas dt-bindings: More whitespace clean-ups in schema files mfd: google,cros-ec: add missing properties dt-bindings: input: convert cros-ec-keyb to json-schema dt-bindings: i2c: convert i2c-cros-ec-tunnel to json-schema of: Fix reserved-memory overlap detection dt-bindings: mailbox: mtk-gce: fix incorrect mbox-cells value dt-bindings: leds: Update devicetree documents for ID_RGB commit 38dc5079da7081e8b09b14e255e9da82c451a531 Author: Jens Axboe Date: Mon Oct 26 18:03:18 2020 -0600 Fix compat regression in process_vm_rw() The removal of compat_process_vm_{readv,writev} didn't change process_vm_rw(), which always assumes it's not doing a compat syscall. Instead of passing in 'false' unconditionally for 'compat', make it conditional on in_compat_syscall(). [ Both Al and Christoph point out that trying to access a 64-bit process from a 32-bit one cannot work anyway, and is likely better prohibited, but that's a separate issue - Linus ] Fixes: c3973b401ef2 ("mm: remove compat_process_vm_{readv,writev}") Reported-and-tested-by: Kyle Huey Signed-off-by: Jens Axboe Acked-by: Al Viro Reviewed-by: Christoph Hellwig Signed-off-by: Linus Torvalds commit 343a3e8bc635bd4c58d45a4fe67f9c3a78fbd191 Author: Arnd Bergmann Date: Mon Oct 26 17:20:50 2020 +0100 bpf: Fix -Wshadow warnings There are thousands of warnings about one macro in a W=2 build: include/linux/filter.h:561:6: warning: declaration of 'ret' shadows a previous local [-Wshadow] Prefix all the locals in that macro with __ to avoid most of these warnings. Fixes: 492ecee892c2 ("bpf: enable program stats") Signed-off-by: Arnd Bergmann Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201026162110.3710415-1-arnd@kernel.org commit 0bcd0a2be8c9ef39d84d167ff85359a49f7be175 Author: Christoph Hellwig Date: Tue Oct 27 09:50:17 2020 +0100 asm-generic: mark __{get,put}_user_fn as __always_inline Without the explicit __always_inline, some RISC-V configs place the functions out of line, triggering the BUILD_BUG_ON checks in the function. Fixes: 11129e8ed4d9 ("riscv: use memcpy based uaccess for nommu again") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann commit 9ce0af3e9573fb84c4c807183d13ea2a68271e4b Author: Hoegeun Kwon Date: Tue Oct 27 13:14:42 2020 +0900 drm/vc4: drv: Add error handding for bind There is a problem that if vc4_drm bind fails, a memory leak occurs on the drm_property_create side. Add error handding for drm_mode_config. Signed-off-by: Hoegeun Kwon Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201027041442.30352-2-hoegeun.kwon@samsung.com commit d5c8238849e7bae6063dfc16c08ed62cee7ee688 Author: Davidlohr Bueso Date: Wed Oct 21 13:17:24 2020 -0700 btrfs: convert data_seqcount to seqcount_mutex_t By doing so we can associate the sequence counter to the chunk_mutex for lockdep purposes (compiled-out otherwise), the mutex is otherwise used on the write side. Also avoid explicitly disabling preemption around the write region as it will now be done automatically by the seqcount machinery based on the lock type. Signed-off-by: Davidlohr Bueso Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0425e7badbdcb6e47109bfdfe494d86217e29009 Author: Johannes Thumshirn Date: Thu Oct 22 23:05:05 2020 +0900 btrfs: don't fallback to buffered read if we don't need to Since we switched to the iomap infrastructure in b5ff9f1a96e8f ("btrfs: switch to iomap for direct IO") we're calling generic_file_buffered_read() directly and not via generic_file_read_iter() anymore. If the read could read everything there is no need to bother calling generic_file_buffered_read(), like it is handled in generic_file_read_iter(). If we call generic_file_buffered_read() in this case we can hit a situation where we do an invalid readahead and cause this UBSAN splat in fstest generic/091: run fstests generic/091 at 2020-10-21 10:52:32 ================================================================================ UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13 shift exponent 64 is too large for 64-bit type 'long unsigned int' CPU: 0 PID: 656 Comm: fsx Not tainted 5.9.0-rc7+ #821 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4-rebuilt.opensuse.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 dump_stack+0x57/0x70 lib/dump_stack.c:118 ubsan_epilogue+0x5/0x40 lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0x61/0xe9 lib/ubsan.c:395 __roundup_pow_of_two ./include/linux/log2.h:57 get_init_ra_size mm/readahead.c:318 ondemand_readahead.cold+0x16/0x2c mm/readahead.c:530 generic_file_buffered_read+0x3ac/0x840 mm/filemap.c:2199 call_read_iter ./include/linux/fs.h:1876 new_sync_read+0x102/0x180 fs/read_write.c:415 vfs_read+0x11c/0x1a0 fs/read_write.c:481 ksys_read+0x4f/0xc0 fs/read_write.c:615 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 arch/x86/entry/entry_64.S:118 RIP: 0033:0x7fe87fee992e RSP: 002b:00007ffe01605278 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000000000004f000 RCX: 00007fe87fee992e RDX: 0000000000004000 RSI: 0000000001677000 RDI: 0000000000000003 RBP: 000000000004f000 R08: 0000000000004000 R09: 000000000004f000 R10: 0000000000053000 R11: 0000000000000246 R12: 0000000000004000 R13: 0000000000000000 R14: 000000000007a120 R15: 0000000000000000 ================================================================================ BTRFS info (device nullb0): has skinny extents BTRFS info (device nullb0): ZONED mode enabled, zone size 268435456 B BTRFS info (device nullb0): enabling ssd optimizations Fixes: f85781fb505e ("btrfs: switch to iomap for direct IO") Reviewed-by: Goldwyn Rodrigues Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit fce52ad3483281930dc9215a68d69837f219f889 Author: Dmitry Baryshkov Date: Tue Oct 27 16:34:18 2020 +0300 interconnect: qcom: use icc_sync state for sm8[12]50 In addition to the rest of Qcom interconnect drivers use icc_sync_state for SM8150/SM8250 interconnect drivers to notify the interconnect framework when all consumers are probed and there is no need to keep the bandwidth set to maximum anymore. Also move the BCM initialization before creating the nodes to set the max bandwidth in hardware for the initialization/probing stage. Signed-off-by: Dmitry Baryshkov Fixes: 7d3b0b0d8184 ("interconnect: qcom: Use icc_sync_state") Link: https://lore.kernel.org/r/20201027133418.976687-1-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit 761a8c58db6bc884994b28cd6d9707b467d680c1 Author: Steven Rostedt (VMware) Date: Fri Oct 23 19:00:49 2020 -0400 tracing, synthetic events: Replace buggy strcat() with seq_buf operations There was a memory corruption bug happening while running the synthetic event selftests: kmemleak: Cannot insert 0xffff8c196fa2afe5 into the object search tree (overlaps existing) CPU: 5 PID: 6866 Comm: ftracetest Tainted: G W 5.9.0-rc5-test+ #577 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v03.03 07/14/2016 Call Trace: dump_stack+0x8d/0xc0 create_object.cold+0x3b/0x60 slab_post_alloc_hook+0x57/0x510 ? tracing_map_init+0x178/0x340 __kmalloc+0x1b1/0x390 tracing_map_init+0x178/0x340 event_hist_trigger_func+0x523/0xa40 trigger_process_regex+0xc5/0x110 event_trigger_write+0x71/0xd0 vfs_write+0xca/0x210 ksys_write+0x70/0xf0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fef0a63a487 Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24 RSP: 002b:00007fff76f18398 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000039 RCX: 00007fef0a63a487 RDX: 0000000000000039 RSI: 000055eb3b26d690 RDI: 0000000000000001 RBP: 000055eb3b26d690 R08: 000000000000000a R09: 0000000000000038 R10: 000055eb3b2cdb80 R11: 0000000000000246 R12: 0000000000000039 R13: 00007fef0a70b500 R14: 0000000000000039 R15: 00007fef0a70b700 kmemleak: Kernel memory leak detector disabled kmemleak: Object 0xffff8c196fa2afe0 (size 8): kmemleak: comm "ftracetest", pid 6866, jiffies 4295082531 kmemleak: min_count = 1 kmemleak: count = 0 kmemleak: flags = 0x1 kmemleak: checksum = 0 kmemleak: backtrace: __kmalloc+0x1b1/0x390 tracing_map_init+0x1be/0x340 event_hist_trigger_func+0x523/0xa40 trigger_process_regex+0xc5/0x110 event_trigger_write+0x71/0xd0 vfs_write+0xca/0x210 ksys_write+0x70/0xf0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The cause came down to a use of strcat() that was adding an string that was shorten, but the strcat() did not take that into account. strcat() is extremely dangerous as it does not care how big the buffer is. Replace it with seq_buf operations that prevent the buffer from being overwritten if what is being written is bigger than the buffer. Fixes: 10819e25799a ("tracing: Handle synthetic event array field type checking correctly") Reviewed-by: Tom Zanussi Tested-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 7e97e4cbf30026b49b0145c3bfe06087958382c5 Author: Jing Xiangfeng Date: Mon Oct 12 21:24:04 2020 +0800 staging: fieldbus: anybuss: jump to correct label in an error path In current code, controller_probe() misses to call ida_simple_remove() in an error path. Jump to correct label to fix it. Fixes: 17614978ed34 ("staging: fieldbus: anybus-s: support the Arcx anybus controller") Reviewed-by: Sven Van Asbroeck Signed-off-by: Jing Xiangfeng Cc: stable Link: https://lore.kernel.org/r/20201012132404.113031-1-jingxiangfeng@huawei.com Signed-off-by: Greg Kroah-Hartman commit df5fbca677c916d1959f814b41b841b65e450027 Author: Jérôme Pouiller Date: Mon Oct 19 18:06:04 2020 +0200 staging: wfx: fix test on return value of gpiod_get_value() The commit 8522d62e6bca ("staging: wfx: gpiod_get_value() can return an error") has changed the way the driver test the value returned by gpiod_get_value(). The new code was wrong. Fixes: 8522d62e6bca ("staging: wfx: gpiod_get_value() can return an error") Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201019160604.1609180-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit d3a85737521a8570adf3a8171b4b3e42216686ec Author: Jérôme Pouiller Date: Mon Oct 19 18:06:03 2020 +0200 staging: wfx: fix use of uninitialized pointer With -Wuninitialized, the compiler complains: drivers/staging/wfx/data_tx.c:34:19: warning: variable 'band' is uninitialized when used here [-Wuninitialized] if (rate->idx >= band->n_bitrates) { ^~~~ Reported-by: kernel test robot Reported-by: Nathan Chancellor Fixes: 868fd970e187 ("staging: wfx: improve robustness of wfx_get_hw_rate()") Signed-off-by: Jérôme Pouiller Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20201019160604.1609180-1-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit b6ae84d648954fae096d94faea1ddb6518b27841 Author: Seung-Woo Kim Date: Mon Oct 26 18:55:50 2020 +0900 staging: mmal-vchiq: Fix memory leak for vchiq_instance The vchiq_instance is allocated with vchiq_initialise() but never freed properly. Fix memory leak for the vchiq_instance. Reported-by: Jaehoon Chung Signed-off-by: Seung-Woo Kim Link: https://lore.kernel.org/r/1603706150-10806-1-git-send-email-sw0312.kim@samsung.com Signed-off-by: Greg Kroah-Hartman commit 647a6002cb41d358d9ac5de101a8a6dc74748a59 Author: Ian Abbott Date: Wed Oct 21 13:21:42 2020 +0100 staging: comedi: cb_pcidas: Allow 2-channel commands for AO subdevice The "cb_pcidas" driver supports asynchronous commands on the analog output (AO) subdevice for those boards that have an AO FIFO. The code (in `cb_pcidas_ao_check_chanlist()` and `cb_pcidas_ao_cmd()`) to validate and set up the command supports output to a single channel or to two channels simultaneously (the boards have two AO channels). However, the code in `cb_pcidas_auto_attach()` that initializes the subdevices neglects to initialize the AO subdevice's `len_chanlist` member, leaving it set to 0, but the Comedi core will "correct" it to 1 if the driver neglected to set it. This limits commands to use a single channel (either channel 0 or 1), but the limit should be two channels. Set the AO subdevice's `len_chanlist` member to be the same value as the `n_chan` member, which will be 2. Cc: Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20201021122142.81628-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 49d28ebdf1e30d806410eefc7de0a7a1ca5d747c Author: Alexander Sverdlin Date: Fri Oct 16 16:56:30 2020 +0200 staging: octeon: Drop on uncorrectable alignment or FCS error Currently in case of alignment or FCS error if the packet cannot be corrected it's still not dropped. Report the error properly and drop the packet while making the code around a little bit more readable. Fixes: 80ff0fd3ab64 ("Staging: Add octeon-ethernet driver files.") Signed-off-by: Alexander Sverdlin Cc: stable Link: https://lore.kernel.org/r/20201016145630.41852-1-alexander.sverdlin@nokia.com Signed-off-by: Greg Kroah-Hartman commit 179f5dc36b0a1aa31538d7d8823deb65c39847b3 Author: Alexander Sverdlin Date: Fri Oct 16 12:18:57 2020 +0200 staging: octeon: repair "fixed-link" support The PHYs must be registered once in device probe function, not in device open callback because it's only possible to register them once. Fixes: a25e278020bf ("staging: octeon: support fixed-link phys") Signed-off-by: Alexander Sverdlin Cc: stable Link: https://lore.kernel.org/r/20201016101858.11374-1-alexander.sverdlin@nokia.com Signed-off-by: Greg Kroah-Hartman commit 9fa2e7af3d53a4b769136eccc32c02e128a4ee51 Author: Andrew Jeffery Date: Thu Oct 22 01:43:59 2020 +0100 ARM: 9019/1: kprobes: Avoid fortify_panic() when copying optprobe template Setting both CONFIG_KPROBES=y and CONFIG_FORTIFY_SOURCE=y on ARM leads to a panic in memcpy() when injecting a kprobe despite the fixes found in commit e46daee53bb5 ("ARM: 8806/1: kprobes: Fix false positive with FORTIFY_SOURCE") and commit 0ac569bf6a79 ("ARM: 8834/1: Fix: kprobes: optimized kprobes illegal instruction"). arch/arm/include/asm/kprobes.h effectively declares the target type of the optprobe_template_entry assembly label as a u32 which leads memcpy()'s __builtin_object_size() call to determine that the pointed-to object is of size four. However, the symbol is used as a handle for the optimised probe assembly template that is at least 96 bytes in size. The symbol's use despite its type blows up the memcpy() in ARM's arch_prepare_optimized_kprobe() with a false-positive fortify_panic() when it should instead copy the optimised probe template into place: ``` $ sudo perf probe -a aspeed_g6_pinctrl_probe [ 158.457252] detected buffer overflow in memcpy [ 158.458069] ------------[ cut here ]------------ [ 158.458283] kernel BUG at lib/string.c:1153! [ 158.458436] Internal error: Oops - BUG: 0 [#1] SMP ARM [ 158.458768] Modules linked in: [ 158.459043] CPU: 1 PID: 99 Comm: perf Not tainted 5.9.0-rc7-00038-gc53ebf8167e9 #158 [ 158.459296] Hardware name: Generic DT based system [ 158.459529] PC is at fortify_panic+0x18/0x20 [ 158.459658] LR is at __irq_work_queue_local+0x3c/0x74 [ 158.459831] pc : [<8047451c>] lr : [<8020ecd4>] psr: 60000013 [ 158.460032] sp : be2d1d50 ip : be2d1c58 fp : be2d1d5c [ 158.460174] r10: 00000006 r9 : 00000000 r8 : 00000060 [ 158.460348] r7 : 8011e434 r6 : b9e0b800 r5 : 7f000000 r4 : b9fe4f0c [ 158.460557] r3 : 80c04cc8 r2 : 00000000 r1 : be7c03cc r0 : 00000022 [ 158.460801] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 158.461037] Control: 10c5387d Table: b9cd806a DAC: 00000051 [ 158.461251] Process perf (pid: 99, stack limit = 0x81c71a69) [ 158.461472] Stack: (0xbe2d1d50 to 0xbe2d2000) [ 158.461757] 1d40: be2d1d84 be2d1d60 8011e724 80474510 [ 158.462104] 1d60: b9e0b800 b9fe4f0c 00000000 b9fe4f14 80c8ec80 be235000 be2d1d9c be2d1d88 [ 158.462436] 1d80: 801cee44 8011e57c b9fe4f0c 00000000 be2d1dc4 be2d1da0 801d0ad0 801cedec [ 158.462742] 1da0: 00000000 00000000 b9fe4f00 ffffffea 00000000 be235000 be2d1de4 be2d1dc8 [ 158.463087] 1dc0: 80204604 801d0738 00000000 00000000 b9fe4004 ffffffea be2d1e94 be2d1de8 [ 158.463428] 1de0: 80205434 80204570 00385c00 00000000 00000000 00000000 be2d1e14 be2d1e08 [ 158.463880] 1e00: 802ba014 b9fe4f00 b9e718c0 b9fe4f84 b9e71ec8 be2d1e24 00000000 00385c00 [ 158.464365] 1e20: 00000000 626f7270 00000065 802b905c be2d1e94 0000002e 00000000 802b9914 [ 158.464829] 1e40: be2d1e84 be2d1e50 802b9914 8028ff78 804629d0 b9e71ec0 0000002e b9e71ec0 [ 158.465141] 1e60: be2d1ea8 80c04cc8 00000cc0 b9e713c4 00000002 80205834 80205834 0000002e [ 158.465488] 1e80: be235000 be235000 be2d1ea4 be2d1e98 80205854 80204e94 be2d1ecc be2d1ea8 [ 158.465806] 1ea0: 801ee4a0 80205840 00000002 80c04cc8 00000000 0000002e 0000002e 00000000 [ 158.466110] 1ec0: be2d1f0c be2d1ed0 801ee5c8 801ee428 00000000 be2d0000 006b1fd0 00000051 [ 158.466398] 1ee0: 00000000 b9eedf00 0000002e 80204410 006b1fd0 be2d1f60 00000000 00000004 [ 158.466763] 1f00: be2d1f24 be2d1f10 8020442c 801ee4c4 80205834 802c613c be2d1f5c be2d1f28 [ 158.467102] 1f20: 802c60ac 8020441c be2d1fac be2d1f38 8010c764 802e9888 be2d1f5c b9eedf00 [ 158.467447] 1f40: b9eedf00 006b1fd0 0000002e 00000000 be2d1f94 be2d1f60 802c634c 802c5fec [ 158.467812] 1f60: 00000000 00000000 00000000 80c04cc8 006b1fd0 00000003 76f7a610 00000004 [ 158.468155] 1f80: 80100284 be2d0000 be2d1fa4 be2d1f98 802c63ec 802c62e8 00000000 be2d1fa8 [ 158.468508] 1fa0: 80100080 802c63e0 006b1fd0 00000003 00000003 006b1fd0 0000002e 00000000 [ 158.468858] 1fc0: 006b1fd0 00000003 76f7a610 00000004 006b1fb0 0026d348 00000017 7ef2738c [ 158.469202] 1fe0: 76f3431c 7ef272d8 0014ec50 76f34338 60000010 00000003 00000000 00000000 [ 158.469461] Backtrace: [ 158.469683] [<80474504>] (fortify_panic) from [<8011e724>] (arch_prepare_optimized_kprobe+0x1b4/0x1f8) [ 158.470021] [<8011e570>] (arch_prepare_optimized_kprobe) from [<801cee44>] (alloc_aggr_kprobe+0x64/0x70) [ 158.470287] r9:be235000 r8:80c8ec80 r7:b9fe4f14 r6:00000000 r5:b9fe4f0c r4:b9e0b800 [ 158.470478] [<801cede0>] (alloc_aggr_kprobe) from [<801d0ad0>] (register_kprobe+0x3a4/0x5a0) [ 158.470685] r5:00000000 r4:b9fe4f0c [ 158.470790] [<801d072c>] (register_kprobe) from [<80204604>] (__register_trace_kprobe+0xa0/0xa4) [ 158.471001] r9:be235000 r8:00000000 r7:ffffffea r6:b9fe4f00 r5:00000000 r4:00000000 [ 158.471188] [<80204564>] (__register_trace_kprobe) from [<80205434>] (trace_kprobe_create+0x5ac/0x9ac) [ 158.471408] r7:ffffffea r6:b9fe4004 r5:00000000 r4:00000000 [ 158.471553] [<80204e88>] (trace_kprobe_create) from [<80205854>] (create_or_delete_trace_kprobe+0x20/0x3c) [ 158.471766] r10:be235000 r9:be235000 r8:0000002e r7:80205834 r6:80205834 r5:00000002 [ 158.471949] r4:b9e713c4 [ 158.472027] [<80205834>] (create_or_delete_trace_kprobe) from [<801ee4a0>] (trace_run_command+0x84/0x9c) [ 158.472255] [<801ee41c>] (trace_run_command) from [<801ee5c8>] (trace_parse_run_command+0x110/0x1f8) [ 158.472471] r6:00000000 r5:0000002e r4:0000002e [ 158.472594] [<801ee4b8>] (trace_parse_run_command) from [<8020442c>] (probes_write+0x1c/0x28) [ 158.472800] r10:00000004 r9:00000000 r8:be2d1f60 r7:006b1fd0 r6:80204410 r5:0000002e [ 158.472968] r4:b9eedf00 [ 158.473046] [<80204410>] (probes_write) from [<802c60ac>] (vfs_write+0xcc/0x1e8) [ 158.473226] [<802c5fe0>] (vfs_write) from [<802c634c>] (ksys_write+0x70/0xf8) [ 158.473400] r8:00000000 r7:0000002e r6:006b1fd0 r5:b9eedf00 r4:b9eedf00 [ 158.473567] [<802c62dc>] (ksys_write) from [<802c63ec>] (sys_write+0x18/0x1c) [ 158.473745] r9:be2d0000 r8:80100284 r7:00000004 r6:76f7a610 r5:00000003 r4:006b1fd0 [ 158.473932] [<802c63d4>] (sys_write) from [<80100080>] (ret_fast_syscall+0x0/0x54) [ 158.474126] Exception stack(0xbe2d1fa8 to 0xbe2d1ff0) [ 158.474305] 1fa0: 006b1fd0 00000003 00000003 006b1fd0 0000002e 00000000 [ 158.474573] 1fc0: 006b1fd0 00000003 76f7a610 00000004 006b1fb0 0026d348 00000017 7ef2738c [ 158.474811] 1fe0: 76f3431c 7ef272d8 0014ec50 76f34338 [ 158.475171] Code: e24cb004 e1a01000 e59f0004 ebf40dd3 (e7f001f2) [ 158.475847] ---[ end trace 55a5b31c08a29f00 ]--- [ 158.476088] Kernel panic - not syncing: Fatal exception [ 158.476375] CPU0: stopping [ 158.476709] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 5.9.0-rc7-00038-gc53ebf8167e9 #158 [ 158.477176] Hardware name: Generic DT based system [ 158.477411] Backtrace: [ 158.477604] [<8010dd28>] (dump_backtrace) from [<8010dfd4>] (show_stack+0x20/0x24) [ 158.477990] r7:00000000 r6:60000193 r5:00000000 r4:80c2f634 [ 158.478323] [<8010dfb4>] (show_stack) from [<8046390c>] (dump_stack+0xcc/0xe8) [ 158.478686] [<80463840>] (dump_stack) from [<80110750>] (handle_IPI+0x334/0x3a0) [ 158.479063] r7:00000000 r6:00000004 r5:80b65cc8 r4:80c78278 [ 158.479352] [<8011041c>] (handle_IPI) from [<801013f8>] (gic_handle_irq+0x88/0x94) [ 158.479757] r10:10c5387d r9:80c01ed8 r8:00000000 r7:c0802000 r6:80c0537c r5:000003ff [ 158.480146] r4:c080200c r3:fffffff4 [ 158.480364] [<80101370>] (gic_handle_irq) from [<80100b6c>] (__irq_svc+0x6c/0x90) [ 158.480748] Exception stack(0x80c01ed8 to 0x80c01f20) [ 158.481031] 1ec0: 000128bc 00000000 [ 158.481499] 1ee0: be7b8174 8011d3a0 80c00000 00000000 80c04cec 80c04d28 80c5d7c2 80a026d4 [ 158.482091] 1f00: 10c5387d 80c01f34 80c01f38 80c01f28 80109554 80109558 60000013 ffffffff [ 158.482621] r9:80c00000 r8:80c5d7c2 r7:80c01f0c r6:ffffffff r5:60000013 r4:80109558 [ 158.482983] [<80109518>] (arch_cpu_idle) from [<80818780>] (default_idle_call+0x38/0x120) [ 158.483360] [<80818748>] (default_idle_call) from [<801585a8>] (do_idle+0xd4/0x158) [ 158.483945] r5:00000000 r4:80c00000 [ 158.484237] [<801584d4>] (do_idle) from [<801588f4>] (cpu_startup_entry+0x28/0x2c) [ 158.484784] r9:80c78000 r8:00000000 r7:80c78000 r6:80c78040 r5:80c04cc0 r4:000000d6 [ 158.485328] [<801588cc>] (cpu_startup_entry) from [<80810a78>] (rest_init+0x9c/0xbc) [ 158.485930] [<808109dc>] (rest_init) from [<80b00ae4>] (arch_call_rest_init+0x18/0x1c) [ 158.486503] r5:80c04cc0 r4:00000001 [ 158.486857] [<80b00acc>] (arch_call_rest_init) from [<80b00fcc>] (start_kernel+0x46c/0x548) [ 158.487589] [<80b00b60>] (start_kernel) from [<00000000>] (0x0) ``` Fixes: e46daee53bb5 ("ARM: 8806/1: kprobes: Fix false positive with FORTIFY_SOURCE") Fixes: 0ac569bf6a79 ("ARM: 8834/1: Fix: kprobes: optimized kprobes illegal instruction") Suggested-by: Kees Cook Signed-off-by: Andrew Jeffery Tested-by: Luka Oreskovic Tested-by: Joel Stanley Reviewed-by: Joel Stanley Acked-by: Masami Hiramatsu Cc: Luka Oreskovic Cc: Juraj Vijtiuk Signed-off-by: Russell King commit 31b4d8e172f614adc53ddecb4b6b2f6411a49b84 Author: Randy Dunlap Date: Fri Oct 23 12:44:40 2020 -0700 MIPS: export has_transparent_hugepage() for modules MIPS should export its local version of "has_transparent_hugepage" so that loadable modules (dax) can use it. Fixes this build error: ERROR: modpost: "has_transparent_hugepage" [drivers/dax/dax.ko] undefined! Fixes: fd8cfd300019 ("arch: fix has_transparent_hugepage()") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: linux-nvdimm@lists.01.org Cc: Hugh Dickins Cc: Andrew Morton Signed-off-by: Thomas Bogendoerfer commit b52817e9de06a3af4ebefd6d244c9c750903d79c Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:35 2020 +0100 drm: drm_print.h: fix kernel-doc markups A kernel-doc markup should start with the identifier on its first line. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/5b76c5625709aaaa3abee98faa620b9f3d27ff85.1603791716.git.mchehab+huawei@kernel.org commit 38a8b32f467a9389ff413574968baa8777c77355 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:31 2020 +0100 drm: kernel-doc: drm_dp_helper.h: fix a typo Right now, kernel-doc generates a warning: ./include/drm/drm_dp_helper.h:1786: warning: Function parameter or member 'hbr2_reset' not described in 'drm_dp_phy_test_params' This is due to a typo: @hb2_reset -> @hbr2_reset Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/2a615cb38e951215bb1bddc2481ad323c9cf3fc9.1603791716.git.mchehab+huawei@kernel.org commit 7811a339da2e3b741dc19de50bad5a7728b6ef22 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:29 2020 +0100 drm: kernel-doc: add description for a new function parameter As reported by "make htmldocs": ./drivers/gpu/drm/drm_prime.c:808: warning: Function parameter or member 'dev' not described in 'drm_prime_pages_to_sg' Add a description for the new parameter. Fixes: 707d561f77b5 ("drm: allow limiting the scatter list size.") Signed-off-by: Mauro Carvalho Chehab Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/9366f48e6e9c3ec2f31a3e68452a2b23a1089fce.1603791716.git.mchehab+huawei@kernel.org commit 08989335e2b6b549ab20dd41ba2f9ca9782f3cd8 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:28 2020 +0100 drm: drm_edid: remove a duplicated kernel-doc declaration It is not possible to create cross-references for duplicated symbols. While Sphinx always detected it, on Sphinx 3 it generates warnings like this: .../Documentation/gpu/drm-kms-helpers:326: ../drivers/gpu/drm/drm_edid.c:1626: WARNING: Duplicate C declaration, also defined in 'gpu/drm-kms-helpers'. Declaration is 'bool drm_edid_are_equal (const struct edid *edid1, const struct edid *edid2)'. So, get rid of the duplicated kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/9310f4074fa9d29cd3ad60684d86d0ace8dab7ae.1603791716.git.mchehab+huawei@kernel.org commit 8d7d8c0afbeae253a2bc0a304ebbd21fa980467f Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:16 2020 +0100 drm/dp: fix a kernel-doc issue at drm_edid.c The name of the argument is different, causing those warnings: ./drivers/gpu/drm/drm_edid.c:3754: warning: Function parameter or member 'video_code' not described in 'drm_display_mode_from_cea_vic' ./drivers/gpu/drm/drm_edid.c:3754: warning: Excess function parameter 'vic' description in 'drm_display_mode_from_cea_vic' Fixes: 7af655bce275 ("drm/dp: Add drm_dp_downstream_mode()") Reviewed-by: Lyude Paul Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/7f4d6c3ff6df63ebd006eb90a5108006c23e2168.1603791716.git.mchehab+huawei@kernel.org commit 21a53bbd469b6df21c13f3a5aee1b935f032c03c Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:15 2020 +0100 drm/dp: fix kernel-doc warnings at drm_dp_helper.c As warned by kernel-doc: ./drivers/gpu/drm/drm_dp_helper.c:385: warning: Function parameter or member 'type' not described in 'drm_dp_downstream_is_type' ./drivers/gpu/drm/drm_dp_helper.c:886: warning: Function parameter or member 'dev' not described in 'drm_dp_downstream_mode' Some function parameters weren't documented. Fixes: 38784f6f8805 ("drm/dp: Add helpers to identify downstream facing port types") Reviewed-by: Lyude Paul Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/03c9c8ba3f492aca76e2b4836803219cd9c971cf.1603791716.git.mchehab+huawei@kernel.org commit 444d03badc72e246bbcbca4b9c922d70ef046934 Author: Mauro Carvalho Chehab Date: Tue Oct 27 10:51:14 2020 +0100 drm: kernel-doc: document drm_dp_set_subconnector_property() params Changeset e5b92773287c ("drm: report dp downstream port type as a subconnector property") added a new function to the kAPI, but didn't add any documentation for the parameters for drm_dp_set_subconnector_property(). Fixes: e5b92773287c ("drm: report dp downstream port type as a subconnector property") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/0870be85a77bea4ba5cf1715010834289a4e10b1.1603791716.git.mchehab+huawei@kernel.org commit e5a329790409408aeecd278d0c1efbeccd87598b Merge: 91caef27a15c2 ccee91b568e35 Author: Arnd Bergmann Date: Tue Oct 27 10:45:45 2020 +0100 Merge tag 'imx-fixes-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.10, 2nd round: A couple of more defconfig fixes to enable CONFIG_GPIO_MXC option for i.MX ARMv4/v5 devices. * tag 'imx-fixes-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: multi_v5_defconfig: Select CONFIG_GPIO_MXC ARM: imx_v4_v5_defconfig: Select CONFIG_GPIO_MXC Link: https://lore.kernel.org/r/20201026235230.GL9880@dragon Signed-off-by: Arnd Bergmann commit 91caef27a15c25948b23f7d400a2c6d70720b2a9 Merge: dff61e683e744 f7d933388f11f Author: Arnd Bergmann Date: Tue Oct 27 10:44:11 2020 +0100 Merge tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/fixes Amlogic fixes for v5.10-rc1 - misc DT only fixes * tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: odroid-n2 plus: fix vddcpu_a pwm ARM: dts: meson8: remove two invalid interrupt lines from the GPU node arm64: dts: amlogic: add missing ethernet reset ID arm64: dts: amlogic: meson-g12: use the G12A specific dwmac compatible arm64: dts: meson: add missing g12 rng clock arm64: dts: meson-axg-s400: enable USB OTG arm64: dts: meson-axg: add USB nodes Link: https://lore.kernel.org/r/7hlffshfu3.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit 129aa9734559a17990ee933351c7b6956f1dba62 Author: Zqiang Date: Tue Oct 27 15:30:44 2020 +0800 usb: raw-gadget: fix memory leak in gadget_setup When fetch 'event' from event queue, after copy its address space content to user space, the 'event' the memory space pointed to by the 'event' pointer need be freed. BUG: memory leak unreferenced object 0xffff888110622660 (size 32): comm "softirq", pid 0, jiffies 4294941981 (age 12.480s) hex dump (first 32 bytes): 02 00 00 00 08 00 00 00 80 06 00 01 00 00 40 00 ..............@. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000efd29abd>] kmalloc include/linux/slab.h:554 [inline] [<00000000efd29abd>] raw_event_queue_add drivers/usb/gadget/legacy/raw_gadget.c:66 [inline] [<00000000efd29abd>] raw_queue_event drivers/usb/gadget/legacy/raw_gadget.c:225 [inline] [<00000000efd29abd>] gadget_setup+0xf6/0x220 drivers/usb/gadget/legacy/raw_gadget.c:343 [<00000000952c4a46>] dummy_timer+0xb9f/0x14c0 drivers/usb/gadget/udc/dummy_hcd.c:1899 [<0000000074ac2c54>] call_timer_fn+0x38/0x200 kernel/time/timer.c:1415 [<00000000560a3a79>] expire_timers kernel/time/timer.c:1460 [inline] [<00000000560a3a79>] __run_timers.part.0+0x319/0x400 kernel/time/timer.c:1757 [<000000009d9503d0>] __run_timers kernel/time/timer.c:1738 [inline] [<000000009d9503d0>] run_timer_softirq+0x3d/0x80 kernel/time/timer.c:1770 [<000000009df27c89>] __do_softirq+0xcc/0x2c2 kernel/softirq.c:298 [<000000007a3f1a47>] asm_call_irq_on_stack+0xf/0x20 [<000000004a62cc2e>] __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] [<000000004a62cc2e>] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] [<000000004a62cc2e>] do_softirq_own_stack+0x32/0x40 arch/x86/kernel/irq_64.c:77 [<00000000b0086800>] invoke_softirq kernel/softirq.c:393 [inline] [<00000000b0086800>] __irq_exit_rcu kernel/softirq.c:423 [inline] [<00000000b0086800>] irq_exit_rcu+0x91/0xc0 kernel/softirq.c:435 [<00000000175f9523>] sysvec_apic_timer_interrupt+0x36/0x80 arch/x86/kernel/apic/apic.c:1091 [<00000000a348e847>] asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631 [<0000000060661100>] native_safe_halt arch/x86/include/asm/irqflags.h:60 [inline] [<0000000060661100>] arch_safe_halt arch/x86/include/asm/irqflags.h:103 [inline] [<0000000060661100>] acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline] [<0000000060661100>] acpi_idle_do_entry+0xc3/0xd0 drivers/acpi/processor_idle.c:517 [<000000003f413b99>] acpi_idle_enter+0x128/0x1f0 drivers/acpi/processor_idle.c:648 [<00000000f5e5afb8>] cpuidle_enter_state+0xc9/0x650 drivers/cpuidle/cpuidle.c:237 [<00000000d50d51fc>] cpuidle_enter+0x29/0x40 drivers/cpuidle/cpuidle.c:351 [<00000000d674baed>] call_cpuidle kernel/sched/idle.c:132 [inline] [<00000000d674baed>] cpuidle_idle_call kernel/sched/idle.c:213 [inline] [<00000000d674baed>] do_idle+0x1c8/0x250 kernel/sched/idle.c:273 Reported-by: syzbot+bd38200f53df6259e6bf@syzkaller.appspotmail.com Signed-off-by: Zqiang Signed-off-by: Felipe Balbi commit 190bb01b72d2d5c3654a03c42fb1ad0dc6114c79 Author: Martin Blumenstingl Date: Sat Oct 17 18:50:12 2020 +0200 usb: dwc2: Avoid leaving the error_debugfs label unused The error_debugfs label is only used when either CONFIG_USB_DWC2_PERIPHERAL or CONFIG_USB_DWC2_DUAL_ROLE is enabled. Add the same #if to the error_debugfs label itself as the code which uses this label already has. This avoids the following compiler warning: warning: label ‘error_debugfs’ defined but not used [-Wunused-label] Fixes: e1c08cf23172ed ("usb: dwc2: Add missing cleanups when usb_add_gadget_udc() fails") Acked-by: Minas Harutyunyan Reported-by: kernel test robot Reported-by: Jens Axboe Signed-off-by: Martin Blumenstingl Signed-off-by: Felipe Balbi commit fa27e2f6c5e674f3f1225f9ca7a7821faaf393bb Author: Thinh Nguyen Date: Thu Oct 22 15:44:59 2020 -0700 usb: dwc3: ep0: Fix delay status handling If we want to send a control status on our own time (through delayed_status), make sure to handle a case where we may queue the delayed status before the host requesting for it (when XferNotReady is generated). Otherwise, the driver won't send anything because it's not EP0_STATUS_PHASE yet. To resolve this, regardless whether dwc->ep0state is EP0_STATUS_PHASE, make sure to clear the dwc->delayed_status flag if dwc3_ep0_send_delayed_status() is called. The control status can be sent when the host requests it later. Cc: Fixes: d97c78a1908e ("usb: dwc3: gadget: END_TRANSFER before CLEAR_STALL command") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 36fba366cf9fa386e5905976e68380061feabd2e Author: Arnd Bergmann Date: Mon Oct 26 20:41:02 2020 +0100 drm/imx: tve remove extraneous type qualifier clang warns about functions returning a 'const int' result: drivers/gpu/drm/imx/imx-tve.c:487:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] Remove the extraneous 'const' qualifier here. I would guess that the function was intended to be marked __attribute__((const)) instead, but that would also be wrong since it call other functions without that attribute. Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)") Signed-off-by: Arnd Bergmann Reviewed-by: Nick Desaulniers Signed-off-by: Philipp Zabel commit acbb7f1436624819f728742f781c7d5f10ba267d Author: Philipp Zabel Date: Fri Sep 11 14:38:55 2020 +0200 drm/imx: parallel-display: reduce scope of edid_len The edid_len variable is never used again. Use a local variable instead of storing it in the device structure. Signed-off-by: Philipp Zabel commit f433ff4d293867060f5bfea4e932f6a5b104f236 Author: Philipp Zabel Date: Fri Sep 11 15:20:30 2020 +0200 drm/imx: parallel-display: remove unused function enc_to_imxpd() Remove leftover container_of helper, it has been replaced by bridge_to_imxpd(). Fixes: fe141cedc433 ("drm/imx: pd: Use bus format/flags provided by the bridge when available") Signed-off-by: Philipp Zabel commit 5f2ca76d564509a92c000180441b0f33073be674 Author: Marco Felsch Date: Thu Nov 21 10:46:17 2019 +0100 drm/imx: parallel-display: fix edid memory leak The edid memory is only freed if the component.unbind() is called. This is okay if the parallel-display was bound but if the bind() fails we leak the memory. Signed-off-by: Marco Felsch [p.zabel@pengutronix.de: rebased, dropped now empty unbind()] Signed-off-by: Philipp Zabel commit 754e0b5803e4d915a6f6d8a4154491564c5ea17c Author: Philipp Zabel Date: Wed Jul 15 10:18:10 2020 +0200 drm/imx: imx-ldb: reduce scope of edid_len The edid_len variable is never used again. Use a local variable instead of storing it in the device structure. Signed-off-by: Philipp Zabel commit 3c3751f2daf6675f6b5bee83b792354c272f5bd2 Author: Chaitanya Kulkarni Date: Thu Oct 22 16:58:21 2020 -0700 nvmet: fix a NULL pointer dereference when tracing the flush command When target side trace in turned on and flush command is issued from the host it results in the following Oops. [ 856.789724] BUG: kernel NULL pointer dereference, address: 0000000000000068 [ 856.790686] #PF: supervisor read access in kernel mode [ 856.791262] #PF: error_code(0x0000) - not-present page [ 856.791863] PGD 6d7110067 P4D 6d7110067 PUD 66f0ad067 PMD 0 [ 856.792527] Oops: 0000 [#1] SMP NOPTI [ 856.792950] CPU: 15 PID: 7034 Comm: nvme Tainted: G OE 5.9.0nvme-5.9+ #71 [ 856.793790] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e3214 [ 856.794956] RIP: 0010:trace_event_raw_event_nvmet_req_init+0x13e/0x170 [nvmet] [ 856.795734] Code: 41 5c 41 5d c3 31 d2 31 f6 e8 4e 9b b8 e0 e9 0e ff ff ff 49 8b 55 00 48 8b 38 8b 0 [ 856.797740] RSP: 0018:ffffc90001be3a60 EFLAGS: 00010246 [ 856.798375] RAX: 0000000000000000 RBX: ffff8887e7d2c01c RCX: 0000000000000000 [ 856.799234] RDX: 0000000000000020 RSI: 0000000057e70ea2 RDI: ffff8887e7d2c034 [ 856.800088] RBP: ffff88869f710578 R08: ffff888807500d40 R09: 00000000fffffffe [ 856.800951] R10: 0000000064c66670 R11: 00000000ef955201 R12: ffff8887e7d2c034 [ 856.801807] R13: ffff88869f7105c8 R14: 0000000000000040 R15: ffff88869f710440 [ 856.802667] FS: 00007f6a22bd8780(0000) GS:ffff888813a00000(0000) knlGS:0000000000000000 [ 856.803635] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 856.804367] CR2: 0000000000000068 CR3: 00000006d73e0000 CR4: 00000000003506e0 [ 856.805283] Call Trace: [ 856.805613] nvmet_req_init+0x27c/0x480 [nvmet] [ 856.806200] nvme_loop_queue_rq+0xcb/0x1d0 [nvme_loop] [ 856.806862] blk_mq_dispatch_rq_list+0x123/0x7b0 [ 856.807459] ? kvm_sched_clock_read+0x14/0x30 [ 856.808025] __blk_mq_sched_dispatch_requests+0xc7/0x170 [ 856.808708] blk_mq_sched_dispatch_requests+0x30/0x60 [ 856.809372] __blk_mq_run_hw_queue+0x70/0x100 [ 856.809935] __blk_mq_delay_run_hw_queue+0x156/0x170 [ 856.810574] blk_mq_run_hw_queue+0x86/0xe0 [ 856.811104] blk_mq_sched_insert_request+0xef/0x160 [ 856.811733] blk_execute_rq+0x69/0xc0 [ 856.812212] ? blk_mq_rq_ctx_init+0xd0/0x230 [ 856.812784] nvme_execute_passthru_rq+0x57/0x130 [nvme_core] [ 856.813461] nvme_submit_user_cmd+0xeb/0x300 [nvme_core] [ 856.814099] nvme_user_cmd.isra.82+0x11e/0x1a0 [nvme_core] [ 856.814752] blkdev_ioctl+0x1dc/0x2c0 [ 856.815197] block_ioctl+0x3f/0x50 [ 856.815606] __x64_sys_ioctl+0x84/0xc0 [ 856.816074] do_syscall_64+0x33/0x40 [ 856.816533] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 856.817168] RIP: 0033:0x7f6a222ed107 [ 856.817617] Code: 44 00 00 48 8b 05 81 cd 2c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 8 [ 856.819901] RSP: 002b:00007ffca848f058 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 856.820846] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f6a222ed107 [ 856.821726] RDX: 00007ffca848f060 RSI: 00000000c0484e43 RDI: 0000000000000003 [ 856.822603] RBP: 0000000000000003 R08: 000000000000003f R09: 0000000000000005 [ 856.823478] R10: 00007ffca848ece0 R11: 0000000000000202 R12: 00007ffca84912d3 [ 856.824359] R13: 00007ffca848f4d0 R14: 0000000000000002 R15: 000000000067e900 [ 856.825236] Modules linked in: nvme_loop(OE) nvmet(OE) nvme_fabrics(OE) null_blk nvme(OE) nvme_corel Move the nvmet_req_init() tracepoint after we parse the command in nvmet_req_init() so that we can get rid of the duplicate nvmet_find_namespace() call. Rename __assign_disk_name() -> __assign_req_name(). Now that we call tracepoint after parsing the command simplify the newly added __assign_req_name() which fixes this bug. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit ac9b820e713bdc8f340e7d65ca6a19b10b790f2a Author: James Smart Date: Fri Oct 23 15:27:52 2020 -0700 nvme-fc: remove nvme_fc_terminate_io() __nvme_fc_terminate_io() is now called by only 1 place, in reset_work. Consoldate and move the functionality of terminate_io into reset_work. In reset_work, rather than calling the create_association directly, schedule the connect work element to do its thing. After scheduling, flush the connect work element to continue with semantic of not returning until connect has been attempted at least once. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig commit 95ced8a2c72dd48167adc4981c3c465c491f2f02 Author: James Smart Date: Fri Oct 23 15:27:51 2020 -0700 nvme-fc: eliminate terminate_io use by nvme_fc_error_recovery nvme_fc_error_recovery() special cases handling when in CONNECTING state and calls __nvme_fc_terminate_io(). __nvme_fc_terminate_io() itself special cases CONNECTING state and calls the routine to abort outstanding ios. Simplify the sequence by putting the call to abort outstanding I/Os directly in nvme_fc_error_recovery. Move the location of __nvme_fc_abort_outstanding_ios(), and nvme_fc_terminate_exchange() which is called by it, to avoid adding function prototypes for nvme_fc_error_recovery(). Signed-off-by: James Smart Signed-off-by: Christoph Hellwig commit 9c2bb2577d81b1a09f7e342e947986e55cad18e3 Author: James Smart Date: Fri Oct 23 15:27:50 2020 -0700 nvme-fc: remove err_work work item err_work was created to handle errors (mainly I/O timeouts) while in CONNECTING state. The flag for err_work_active is also unneeded. Remove err_work_active and err_work. The actions to abort I/Os are moved inline to nvme_error_recovery(). Signed-off-by: James Smart Signed-off-by: Christoph Hellwig commit caf1cbe3677576ef860f7bbba9074d0e6a0bcabb Author: James Smart Date: Fri Oct 23 15:26:04 2020 -0700 nvme-fc: track error_recovery while connecting Whenever there are errors during CONNECTING, the driver recovers by aborting all outstanding ios and counts on the io completion to fail them and thus the connection/association they are on. However, the connection failure depends on a failure state from the core routines. Not all commands that are issued by the core routine are guaranteed to cause a failure of the core routine. They may be treated as a failure status and the status is then ignored. As such, whenever the transport enters error_recovery while CONNECTING, it will set a new flag indicating an association failed. The create_association routine which creates and initializes the controller, will monitor the state of the flag as well as the core routine error status and ensure the association fails if there was an error. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig commit 25c1ca6ecaba3b751d3f7ff92d5cddff3b05f8d0 Author: zhenwei pi Date: Sun Oct 25 19:51:24 2020 +0800 nvme-rdma: handle unexpected nvme completion data length Receiving a zero length message leads to the following warnings because the CQE is processed twice: refcount_t: underflow; use-after-free. WARNING: CPU: 0 PID: 0 at lib/refcount.c:28 RIP: 0010:refcount_warn_saturate+0xd9/0xe0 Call Trace: nvme_rdma_recv_done+0xf3/0x280 [nvme_rdma] __ib_process_cq+0x76/0x150 [ib_core] ... Sanity check the received data length, to avoids this. Thanks to Chao Leng & Sagi for suggestions. Signed-off-by: zhenwei pi Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 8685699c28d7452ff06d62b4692df985eb7301f0 Author: Keith Busch Date: Fri Oct 23 12:16:28 2020 -0700 nvme: ignore zone validate errors on subsequent scans Revalidating nvme zoned namespaces requires IO commands, and there are controller states that prevent IO. For example, a sanitize in progress is required to fail all IO, but we don't want to remove a namespace we've previously added just because the controller is in such a state. Suppress the error in this case. Reported-by: Michael Nguyen Signed-off-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 48e7bbbbb261b007fe78aa14ae62df01d236497e Author: Ran Wang Date: Fri Oct 16 12:33:26 2020 +0800 usb: gadget: fsl: fix null pointer checking fsl_ep_fifo_status() should return error if _ep->desc is null. Fixes: 75eaa498c99e (“usb: gadget: Correct NULL pointer checking in fsl gadget”) Reviewed-by: Peter Chen Signed-off-by: Ran Wang Signed-off-by: Felipe Balbi commit 0d66e04875c5aae876cf3d4f4be7978fa2b00523 Author: Evgeny Novikov Date: Fri Oct 2 18:01:55 2020 +0300 usb: gadget: goku_udc: fix potential crashes in probe goku_probe() goes to error label "err" and invokes goku_remove() in case of failures of pci_enable_device(), pci_resource_start() and ioremap(). goku_remove() gets a device from pci_get_drvdata(pdev) and works with it without any checks, in particular it dereferences a corresponding pointer. But goku_probe() did not set this device yet. So, one can expect various crashes. The patch moves setting the device just after allocation of memory for it. Found by Linux Driver Verification project (linuxtesting.org). Reported-by: Pavel Andrianov Signed-off-by: Evgeny Novikov Signed-off-by: Felipe Balbi commit e0df59de670b48a923246fae1f972317b84b2764 Author: Viresh Kumar Date: Thu Oct 22 12:26:08 2020 +0530 opp: Reduce the size of critical section in _opp_table_kref_release() There is a lot of stuff here which can be done outside of the big opp_table_lock, do that. This helps avoiding few circular dependency lockdeps around debugfs and interconnects. Reported-by: Rob Clark Reported-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 294a3317bef52b189139c813b50dd14d344fa9ec Author: Tony Lindgren Date: Wed Oct 28 08:03:17 2020 +0200 ARM: OMAP2+: Manage MPU state properly for omap_enter_idle_coupled() Based on more testing, commit 8ca5ee624b4c ("ARM: OMAP2+: Restore MPU power domain if cpu_cluster_pm_enter() fails") is a poor fix for handling cpu_cluster_pm_enter() returned errors. We should not override the cpuidle states with a hardcoded PWRDM_POWER_ON value. Instead, we should use a configured idle state that does not cause the context to be lost. Otherwise we end up configuring a potentially improper state for the MPUSS. We also want to update the returned state index for the selected state. Let's just select the highest power idle state C1 to ensure no context loss is allowed on cpu_cluster_pm_enter() errors. With these changes we can now unconditionally call omap4_enter_lowpower() for WFI like we did earlier before commit 55be2f50336f ("ARM: OMAP2+: Handle errors for cpu_pm"). And we can return the selected state index. Fixes: 8f04aea048d5 ("ARM: OMAP2+: Restore MPU power domain if cpu_cluster_pm_enter() fails") Fixes: 55be2f50336f ("ARM: OMAP2+: Handle errors for cpu_pm") Signed-off-by: Tony Lindgren commit f15cfca818d756dd1c9492530091dfd583359db3 Author: Keith Winstein Date: Sun Oct 25 22:05:47 2020 -0700 ALSA: usb-audio: Add implicit feedback quirk for Zoom UAC-2 The Zoom UAC-2 USB audio interface provides an async playback endpoint ("1 OUT (ASYNC)") and capture endpoint ("2 IN (ASYNC)"), both with 2-channel S32_LE in 44.1, 48, 88.2, 96, 176.4, or 192 kilosamples/s. The device provides explicit feedback to adjust the host's playback rate, but the feedback appears unstable and biased relative to the device's capture rate. "alsaloop -t 1000" experiences playback underruns and tries to resample the captured audio to match the varying playback rate. Forcing the kernel to use implicit feedback appears to produce more stable results. This causes the host to transmit one playback sample for each capture sample received. (Zoom North America has been notified of this change.) Signed-off-by: Keith Winstein Tested-by: Keith Winstein Cc: BugLink: https://lore.kernel.org/r/20201027071841.GA164525@trolley.csail.mit.edu Signed-off-by: Takashi Iwai commit 1384ab4fee12c4c4f8bd37bc9f8686881587b286 Author: Heikki Krogerus Date: Tue Oct 6 16:02:50 2020 +0300 usb: dwc3: pci: add support for the Intel Alder Lake-S This patch adds the necessary PCI ID for Intel Alder Lake-S devices. Signed-off-by: Heikki Krogerus Signed-off-by: Felipe Balbi commit 47efcbcb340cca5d3b3d515964f09e1fec599a29 Author: Viresh Kumar Date: Tue Oct 20 16:03:15 2020 +0530 opp: Fix early exit from dev_pm_opp_register_set_opp_helper() We returned earlier by mistake even when there were no failures. Fix it. Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER") Reported-by: Naresh Kamboju Signed-off-by: Viresh Kumar Tested-by: Naresh Kamboju commit 1f6620f87006dc02c608466cd990778aaadf386a Author: Viresh Kumar Date: Wed Oct 14 09:56:28 2020 +0530 opp: Don't always remove static OPPs in _of_add_opp_table_v1() The patch missed returning 0 early in case of success and hence the static OPPs got removed by mistake. Fix it. Fixes: 90d46d71cce2 ("opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1()") Reported-by: Aisheng Dong Signed-off-by: Viresh Kumar Tested-by: Dong Aisheng commit b1884583fcd17d6a1b1bba94bbb5826e6b5c6e17 Author: Hans de Goede Date: Mon Oct 26 20:53:57 2020 -0700 Input: i8042 - allow insmod to succeed on devices without an i8042 controller The i8042 module exports several symbols which may be used by other modules. Before this commit it would refuse to load (when built as a module itself) on systems without an i8042 controller. This is a problem specifically for the asus-nb-wmi module. Many Asus laptops support the Asus WMI interface. Some of them have an i8042 controller and need to use i8042_install_filter() to filter some kbd events. Other models do not have an i8042 controller (e.g. they use an USB attached kbd). Before this commit the asus-nb-wmi driver could not be loaded on Asus models without an i8042 controller, when the i8042 code was built as a module (as Arch Linux does) because the module_init function of the i8042 module would fail with -ENODEV and thus the i8042_install_filter symbol could not be loaded. This commit fixes this by exiting from module_init with a return code of 0 if no controller is found. It also adds a i8042_present bool to make the module_exit function a no-op in this case and also adds a check for i8042_present to the exported i8042_command function. The latter i8042_present check should not really be necessary because when builtin that function can already be used on systems without an i8042 controller, but better safe then sorry. Reported-and-tested-by: Marius Iacob Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201008112628.3979-2-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 33b6c39e747c552fa770eecebd1776f1f4a222b1 Author: Dan Carpenter Date: Mon Oct 26 17:10:09 2020 -0700 Input: adxl34x - clean up a data type in adxl34x_probe() The "revid" is used to store negative error codes so it should be an int type. Fixes: e27c729219ad ("Input: add driver for ADXL345/346 Digital Accelerometers") Signed-off-by: Dan Carpenter Acked-by: Michael Hennerich Link: https://lore.kernel.org/r/20201026072824.GA1620546@mwanda Signed-off-by: Dmitry Torokhov commit e3364c5ff3ff975b943a7bf47e21a2a4bf20f3fe Author: Zenghui Yu Date: Fri Oct 23 13:15:50 2020 +0800 net: hns3: Clear the CMDQ registers before unmapping BAR region When unbinding the hns3 driver with the HNS3 VF, I got the following kernel panic: [ 265.709989] Unable to handle kernel paging request at virtual address ffff800054627000 [ 265.717928] Mem abort info: [ 265.720740] ESR = 0x96000047 [ 265.723810] EC = 0x25: DABT (current EL), IL = 32 bits [ 265.729126] SET = 0, FnV = 0 [ 265.732195] EA = 0, S1PTW = 0 [ 265.735351] Data abort info: [ 265.738227] ISV = 0, ISS = 0x00000047 [ 265.742071] CM = 0, WnR = 1 [ 265.745055] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000009b54000 [ 265.751753] [ffff800054627000] pgd=0000202ffffff003, p4d=0000202ffffff003, pud=00002020020eb003, pmd=00000020a0dfc003, pte=0000000000000000 [ 265.764314] Internal error: Oops: 96000047 [#1] SMP [ 265.830357] CPU: 61 PID: 20319 Comm: bash Not tainted 5.9.0+ #206 [ 265.836423] Hardware name: Huawei TaiShan 2280 V2/BC82AMDDA, BIOS 1.05 09/18/2019 [ 265.843873] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO BTYPE=--) [ 265.843890] pc : hclgevf_cmd_uninit+0xbc/0x300 [ 265.861988] lr : hclgevf_cmd_uninit+0xb0/0x300 [ 265.861992] sp : ffff80004c983b50 [ 265.881411] pmr_save: 000000e0 [ 265.884453] x29: ffff80004c983b50 x28: ffff20280bbce500 [ 265.889744] x27: 0000000000000000 x26: 0000000000000000 [ 265.895034] x25: ffff800011a1f000 x24: ffff800011a1fe90 [ 265.900325] x23: ffff0020ce9b00d8 x22: ffff0020ce9b0150 [ 265.905616] x21: ffff800010d70e90 x20: ffff800010d70e90 [ 265.910906] x19: ffff0020ce9b0080 x18: 0000000000000004 [ 265.916198] x17: 0000000000000000 x16: ffff800011ae32e8 [ 265.916201] x15: 0000000000000028 x14: 0000000000000002 [ 265.916204] x13: ffff800011ae32e8 x12: 0000000000012ad8 [ 265.946619] x11: ffff80004c983b50 x10: 0000000000000000 [ 265.951911] x9 : ffff8000115d0888 x8 : 0000000000000000 [ 265.951914] x7 : ffff800011890b20 x6 : c0000000ffff7fff [ 265.951917] x5 : ffff80004c983930 x4 : 0000000000000001 [ 265.951919] x3 : ffffa027eec1b000 x2 : 2b78ccbbff369100 [ 265.964487] x1 : 0000000000000000 x0 : ffff800054627000 [ 265.964491] Call trace: [ 265.964494] hclgevf_cmd_uninit+0xbc/0x300 [ 265.964496] hclgevf_uninit_ae_dev+0x9c/0xe8 [ 265.964501] hnae3_unregister_ae_dev+0xb0/0x130 [ 265.964516] hns3_remove+0x34/0x88 [hns3] [ 266.009683] pci_device_remove+0x48/0xf0 [ 266.009692] device_release_driver_internal+0x114/0x1e8 [ 266.030058] device_driver_detach+0x28/0x38 [ 266.034224] unbind_store+0xd4/0x108 [ 266.037784] drv_attr_store+0x40/0x58 [ 266.041435] sysfs_kf_write+0x54/0x80 [ 266.045081] kernfs_fop_write+0x12c/0x250 [ 266.049076] vfs_write+0xc4/0x248 [ 266.052378] ksys_write+0x74/0xf8 [ 266.055677] __arm64_sys_write+0x24/0x30 [ 266.059584] el0_svc_common.constprop.3+0x84/0x270 [ 266.064354] do_el0_svc+0x34/0xa0 [ 266.067658] el0_svc+0x38/0x40 [ 266.070700] el0_sync_handler+0x8c/0xb0 [ 266.074519] el0_sync+0x140/0x180 It looks like the BAR memory region had already been unmapped before we start clearing CMDQ registers in it, which is pretty bad and the kernel happily kills itself because of a Current EL Data Abort (on arm64). Moving the CMDQ uninitialization a bit early fixes the issue for me. Fixes: 862d969a3a4d ("net: hns3: do VF's pci re-initialization while PF doing FLR") Signed-off-by: Zenghui Yu Link: https://lore.kernel.org/r/20201023051550.793-1-yuzenghui@huawei.com Signed-off-by: Jakub Kicinski commit 10067b501990cdd1f9d39133d124d140726bd996 Merge: 19c176eb07983 825741b071722 Author: Jakub Kicinski Date: Mon Oct 26 18:26:38 2020 -0700 Merge branch 'bnxt_en-bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. These 5 bug fixes are all related to the firmware reset or AER recovery. 2 patches fix the cleanup logic for the workqueue used to handle firmware reset and recovery. 1 patch ensures that the chip will have the proper BAR addresses latched after fatal AER recovery. 1 patch fixes the open path to check for firmware reset abort error. The last one sends the fw reset command unconditionally to fix the AER reset logic. ==================== Link: https://lore.kernel.org/r/1603685901-17917-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 825741b071722f1c8ad692cead562c4b5f5eaa93 Author: Vasundhara Volam Date: Mon Oct 26 00:18:21 2020 -0400 bnxt_en: Send HWRM_FUNC_RESET fw command unconditionally. In the AER or firmware reset flow, if we are in fatal error state or if pci_channel_offline() is true, we don't send any commands to the firmware because the commands will likely not reach the firmware and most commands don't matter much because the firmware is likely to be reset imminently. However, the HWRM_FUNC_RESET command is different and we should always attempt to send it. In the AER flow for example, the .slot_reset() call will trigger this fw command and we need to try to send it to effect the proper reset. Fixes: b340dc680ed4 ("bnxt_en: Avoid sending firmware messages when AER error is detected.") Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit a1301f08c5acf992d9c1fafddc84c3a822844b04 Author: Michael Chan Date: Mon Oct 26 00:18:20 2020 -0400 bnxt_en: Check abort error state in bnxt_open_nic(). bnxt_open_nic() is called during configuration changes that require the NIC to be closed and then opened. This call is protected by rtnl_lock. Firmware reset can be happening at the same time. Only critical portions of the entire firmware reset sequence are protected by the rtnl_lock. It is possible that bnxt_open_nic() can be called when the firmware reset sequence is aborting. In that case, bnxt_open_nic() needs to check if the ABORT_ERR flag is set and abort if it is. The configuration change that resulted in the bnxt_open_nic() call will fail but the NIC will be brought to a consistent IF_DOWN state. Without this patch, if bnxt_open_nic() were to continue in this error state, it may crash like this: [ 1648.659736] BUG: unable to handle kernel NULL pointer dereference at (null) [ 1648.659768] IP: [] bnxt_alloc_mem+0x50a/0x1140 [bnxt_en] [ 1648.659796] PGD 101e1b3067 PUD 101e1b2067 PMD 0 [ 1648.659813] Oops: 0000 [#1] SMP [ 1648.659825] Modules linked in: 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 stp llc ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter sunrpc dell_smbios dell_wmi_descriptor dcdbas amd64_edac_mod edac_mce_amd kvm_amd kvm irqbypass crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper vfat cryptd fat pcspkr ipmi_ssif sg k10temp i2c_piix4 wmi ipmi_si ipmi_devintf ipmi_msghandler tpm_crb acpi_power_meter sch_fq_codel ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm ahci drm libahci megaraid_sas crct10dif_pclmul crct10dif_common [ 1648.660063] tg3 libata crc32c_intel bnxt_en(OE) drm_panel_orientation_quirks devlink ptp pps_core dm_mirror dm_region_hash dm_log dm_mod fuse [ 1648.660105] CPU: 13 PID: 3867 Comm: ethtool Kdump: loaded Tainted: G OE ------------ 3.10.0-1152.el7.x86_64 #1 [ 1648.660911] Hardware name: Dell Inc. PowerEdge R7515/0R4CNN, BIOS 1.2.14 01/28/2020 [ 1648.661662] task: ffff94e64cbc9080 ti: ffff94f55df1c000 task.ti: ffff94f55df1c000 [ 1648.662409] RIP: 0010:[] [] bnxt_alloc_mem+0x50a/0x1140 [bnxt_en] [ 1648.663171] RSP: 0018:ffff94f55df1fba8 EFLAGS: 00010202 [ 1648.663927] RAX: 0000000000000000 RBX: ffff94e6827e0000 RCX: 0000000000000000 [ 1648.664684] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff94e6827e08c0 [ 1648.665433] RBP: ffff94f55df1fc20 R08: 00000000000001ff R09: 0000000000000008 [ 1648.666184] R10: 0000000000000d53 R11: ffff94f55df1f7ce R12: ffff94e6827e08c0 [ 1648.666940] R13: ffff94e6827e08c0 R14: ffff94e6827e08c0 R15: ffffffffb9115e40 [ 1648.667695] FS: 00007f8aadba5740(0000) GS:ffff94f57eb40000(0000) knlGS:0000000000000000 [ 1648.668447] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1648.669202] CR2: 0000000000000000 CR3: 0000001022772000 CR4: 0000000000340fe0 [ 1648.669966] Call Trace: [ 1648.670730] [] ? bnxt_need_reserve_rings+0x9d/0x170 [bnxt_en] [ 1648.671496] [] __bnxt_open_nic+0x8a/0x9a0 [bnxt_en] [ 1648.672263] [] ? bnxt_close_nic+0x59/0x1b0 [bnxt_en] [ 1648.673031] [] bnxt_open_nic+0x1b/0x50 [bnxt_en] [ 1648.673793] [] bnxt_set_ringparam+0x6c/0xa0 [bnxt_en] [ 1648.674550] [] dev_ethtool+0x1334/0x21a0 [ 1648.675306] [] dev_ioctl+0x1ef/0x5f0 [ 1648.676061] [] sock_do_ioctl+0x4d/0x60 [ 1648.676810] [] sock_ioctl+0x1eb/0x2d0 [ 1648.677548] [] do_vfs_ioctl+0x3a0/0x5b0 [ 1648.678282] [] ? __do_page_fault+0x238/0x500 [ 1648.679016] [] SyS_ioctl+0xa1/0xc0 [ 1648.679745] [] system_call_fastpath+0x25/0x2a [ 1648.680461] Code: 9e 60 01 00 00 0f 1f 40 00 45 8b 8e 48 01 00 00 31 c9 45 85 c9 0f 8e 73 01 00 00 66 0f 1f 44 00 00 49 8b 86 a8 00 00 00 48 63 d1 <48> 8b 14 d0 48 85 d2 0f 84 46 01 00 00 41 8b 86 44 01 00 00 c7 [ 1648.681986] RIP [] bnxt_alloc_mem+0x50a/0x1140 [bnxt_en] [ 1648.682724] RSP [ 1648.683451] CR2: 0000000000000000 Fixes: ec5d31e3c15d ("bnxt_en: Handle firmware reset status during IF_UP.") Reviewed-by: Vasundhara Volam Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit f75d9a0aa96721d20011cd5f8c7a24eb32728589 Author: Vasundhara Volam Date: Mon Oct 26 00:18:19 2020 -0400 bnxt_en: Re-write PCI BARs after PCI fatal error. When a PCIe fatal error occurs, the internal latched BAR addresses in the chip get reset even though the BAR register values in config space are retained. pci_restore_state() will not rewrite the BAR addresses if the BAR address values are valid, causing the chip's internal BAR addresses to stay invalid. So we need to zero the BAR registers during PCIe fatal error to force pci_restore_state() to restore the BAR addresses. These write cycles to the BAR registers will cause the proper BAR addresses to latch internally. Fixes: 6316ea6db93d ("bnxt_en: Enable AER support.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 631ce27a3006fc0b732bfd589c6df505f62eadd9 Author: Vasundhara Volam Date: Mon Oct 26 00:18:18 2020 -0400 bnxt_en: Invoke cancel_delayed_work_sync() for PFs also. As part of the commit b148bb238c02 ("bnxt_en: Fix possible crash in bnxt_fw_reset_task()."), cancel_delayed_work_sync() is called only for VFs to fix a possible crash by cancelling any pending delayed work items. It was assumed by mistake that the flush_workqueue() call on the PF would flush delayed work items as well. As flush_workqueue() does not cancel the delayed workqueue, extend the fix for PFs. This fix will avoid the system crash, if there are any pending delayed work items in fw_reset_task() during driver's .remove() call. Unify the workqueue cleanup logic for both PF and VF by calling cancel_work_sync() and cancel_delayed_work_sync() directly in bnxt_remove_one(). Fixes: b148bb238c02 ("bnxt_en: Fix possible crash in bnxt_fw_reset_task().") Reviewed-by: Pavan Chebbi Reviewed-by: Andy Gospodarek Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 21d6a11e2cadfb8446265a3efff0e2aad206e15e Author: Vasundhara Volam Date: Mon Oct 26 00:18:17 2020 -0400 bnxt_en: Fix regression in workqueue cleanup logic in bnxt_remove_one(). A recent patch has moved the workqueue cleanup logic before calling unregister_netdev() in bnxt_remove_one(). This caused a regression because the workqueue can be restarted if the device is still open. Workqueue cleanup must be done after unregister_netdev(). The workqueue will not restart itself after the device is closed. Call bnxt_cancel_sp_work() after unregister_netdev() and call bnxt_dl_fw_reporters_destroy() after that. This fixes the regession and the original NULL ptr dereference issue. Fixes: b16939b59cc0 ("bnxt_en: Fix NULL ptr dereference crash in bnxt_fw_reset_task()") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 29813a2297910d5c4be08c7b390054f23dd794a5 Author: Arnd Bergmann Date: Mon Oct 26 16:53:48 2020 +0100 asm-generic: percpu: avoid Wshadow warning Nesting macros that use the same local variable names causes warnings when building with "make W=2": include/asm-generic/percpu.h:117:14: warning: declaration of '__ret' shadows a previous local [-Wshadow] include/asm-generic/percpu.h:126:14: warning: declaration of '__ret' shadows a previous local [-Wshadow] These are fairly harmless, but since the warning comes from a global header, the warning happens every time the headers are included, which is fairly annoying. Rename the variables to avoid shadowing and shut up the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Luc Van Oostenryck Signed-off-by: Dennis Zhou commit 19c176eb079834c5cf8574ce18c1d934ec486dd8 Merge: 522ee51e67711 0daf2bf5a2dcf Author: Jakub Kicinski Date: Mon Oct 26 16:45:53 2020 -0700 Merge branch 'mlxsw-various-fixes' Ido Schimmel says: ==================== mlxsw: Various fixes This patch set contains various fixes for mlxsw. Patch #1 ensures that only link modes that are supported by both the device and the driver are advertised. When a link mode that is not supported by the driver is negotiated by the device, it will be presented as an unknown speed by ethtool, causing the bond driver to wrongly assume that the link is down. Patch #2 fixes a trivial memory leak upon module removal. Patch #3 fixes a use-after-free that syzkaller was able to trigger once on a slow emulator after a few months of fuzzing. ==================== Link: https://lore.kernel.org/r/20201024133733.2107509-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 0daf2bf5a2dcf33d446b76360908f109816e2e21 Author: Amit Cohen Date: Sat Oct 24 16:37:33 2020 +0300 mlxsw: core: Fix use-after-free in mlxsw_emad_trans_finish() Each EMAD transaction stores the skb used to issue the EMAD request ('trans->tx_skb') so that the request could be retried in case of a timeout. The skb can be freed when a corresponding response is received or as part of the retry logic (e.g., failed retransmit, exceeded maximum number of retries). The two tasks (i.e., response processing and retransmits) are synchronized by the atomic 'trans->active' field which ensures that responses to inactive transactions are ignored. In case of a failed retransmit the transaction is finished and all of its resources are freed. However, the current code does not mark it as inactive. Syzkaller was able to hit a race condition in which a concurrent response is processed while the transaction's resources are being freed, resulting in a use-after-free [1]. Fix the issue by making sure to mark the transaction as inactive after a failed retransmit and free its resources only if a concurrent task did not already do that. [1] BUG: KASAN: use-after-free in consume_skb+0x30/0x370 net/core/skbuff.c:833 Read of size 4 at addr ffff88804f570494 by task syz-executor.0/1004 CPU: 0 PID: 1004 Comm: syz-executor.0 Not tainted 5.8.0-rc7+ #68 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xf6/0x16e lib/dump_stack.c:118 print_address_description.constprop.0+0x1c/0x250 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x14e/0x1b0 mm/kasan/generic.c:192 instrument_atomic_read include/linux/instrumented.h:56 [inline] atomic_read include/asm-generic/atomic-instrumented.h:27 [inline] refcount_read include/linux/refcount.h:147 [inline] skb_unref include/linux/skbuff.h:1044 [inline] consume_skb+0x30/0x370 net/core/skbuff.c:833 mlxsw_emad_trans_finish+0x64/0x1c0 drivers/net/ethernet/mellanox/mlxsw/core.c:592 mlxsw_emad_process_response drivers/net/ethernet/mellanox/mlxsw/core.c:651 [inline] mlxsw_emad_rx_listener_func+0x5c9/0xac0 drivers/net/ethernet/mellanox/mlxsw/core.c:672 mlxsw_core_skb_receive+0x4df/0x770 drivers/net/ethernet/mellanox/mlxsw/core.c:2063 mlxsw_pci_cqe_rdq_handle drivers/net/ethernet/mellanox/mlxsw/pci.c:595 [inline] mlxsw_pci_cq_tasklet+0x12a6/0x2520 drivers/net/ethernet/mellanox/mlxsw/pci.c:651 tasklet_action_common.isra.0+0x13f/0x3e0 kernel/softirq.c:550 __do_softirq+0x223/0x964 kernel/softirq.c:292 asm_call_on_stack+0x12/0x20 arch/x86/entry/entry_64.S:711 Allocated by task 1006: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc mm/kasan/common.c:494 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:467 slab_post_alloc_hook mm/slab.h:586 [inline] slab_alloc_node mm/slub.c:2824 [inline] slab_alloc mm/slub.c:2832 [inline] kmem_cache_alloc+0xcd/0x2e0 mm/slub.c:2837 __build_skb+0x21/0x60 net/core/skbuff.c:311 __netdev_alloc_skb+0x1e2/0x360 net/core/skbuff.c:464 netdev_alloc_skb include/linux/skbuff.h:2810 [inline] mlxsw_emad_alloc drivers/net/ethernet/mellanox/mlxsw/core.c:756 [inline] mlxsw_emad_reg_access drivers/net/ethernet/mellanox/mlxsw/core.c:787 [inline] mlxsw_core_reg_access_emad+0x1ab/0x1420 drivers/net/ethernet/mellanox/mlxsw/core.c:1817 mlxsw_reg_trans_query+0x39/0x50 drivers/net/ethernet/mellanox/mlxsw/core.c:1831 mlxsw_sp_sb_pm_occ_clear drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c:260 [inline] mlxsw_sp_sb_occ_max_clear+0xbff/0x10a0 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c:1365 mlxsw_devlink_sb_occ_max_clear+0x76/0xb0 drivers/net/ethernet/mellanox/mlxsw/core.c:1037 devlink_nl_cmd_sb_occ_max_clear_doit+0x1ec/0x280 net/core/devlink.c:1765 genl_family_rcv_msg_doit net/netlink/genetlink.c:669 [inline] genl_family_rcv_msg net/netlink/genetlink.c:714 [inline] genl_rcv_msg+0x617/0x980 net/netlink/genetlink.c:731 netlink_rcv_skb+0x152/0x440 net/netlink/af_netlink.c:2470 genl_rcv+0x24/0x40 net/netlink/genetlink.c:742 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x53a/0x750 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x850/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0x150/0x190 net/socket.c:671 ____sys_sendmsg+0x6d8/0x840 net/socket.c:2359 ___sys_sendmsg+0xff/0x170 net/socket.c:2413 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2446 do_syscall_64+0x56/0xa0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 73: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0x12c/0x170 mm/kasan/common.c:455 slab_free_hook mm/slub.c:1474 [inline] slab_free_freelist_hook mm/slub.c:1507 [inline] slab_free mm/slub.c:3072 [inline] kmem_cache_free+0xbe/0x380 mm/slub.c:3088 kfree_skbmem net/core/skbuff.c:622 [inline] kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:616 __kfree_skb net/core/skbuff.c:679 [inline] consume_skb net/core/skbuff.c:837 [inline] consume_skb+0xe1/0x370 net/core/skbuff.c:831 mlxsw_emad_trans_finish+0x64/0x1c0 drivers/net/ethernet/mellanox/mlxsw/core.c:592 mlxsw_emad_transmit_retry.isra.0+0x9d/0xc0 drivers/net/ethernet/mellanox/mlxsw/core.c:613 mlxsw_emad_trans_timeout_work+0x43/0x50 drivers/net/ethernet/mellanox/mlxsw/core.c:625 process_one_work+0xa3e/0x17a0 kernel/workqueue.c:2269 worker_thread+0x9e/0x1050 kernel/workqueue.c:2415 kthread+0x355/0x470 kernel/kthread.c:291 ret_from_fork+0x22/0x30 arch/x86/entry/entry_64.S:293 The buggy address belongs to the object at ffff88804f5703c0 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 212 bytes inside of 224-byte region [ffff88804f5703c0, ffff88804f5704a0) The buggy address belongs to the page: page:ffffea00013d5c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x100000000000200(slab) raw: 0100000000000200 dead000000000100 dead000000000122 ffff88806c625400 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804f570380: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88804f570400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804f570480: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88804f570500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804f570580: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc Fixes: caf7297e7ab5f ("mlxsw: core: Introduce support for asynchronous EMAD register access") Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit adc80b6cfedff6dad8b93d46a5ea2775fd5af9ec Author: Ido Schimmel Date: Sat Oct 24 16:37:32 2020 +0300 mlxsw: core: Fix memory leak on module removal Free the devlink instance during the teardown sequence in the non-reload case to avoid the following memory leak. unreferenced object 0xffff888232895000 (size 2048): comm "modprobe", pid 1073, jiffies 4295568857 (age 164.871s) hex dump (first 32 bytes): 00 01 00 00 00 00 ad de 22 01 00 00 00 00 ad de ........"....... 10 50 89 32 82 88 ff ff 10 50 89 32 82 88 ff ff .P.2.....P.2.... backtrace: [<00000000c704e9a6>] __kmalloc+0x13a/0x2a0 [<00000000ee30129d>] devlink_alloc+0xff/0x760 [<0000000092ab3e5d>] 0xffffffffa042e5b0 [<000000004f3f8a31>] 0xffffffffa042f6ad [<0000000092800b4b>] 0xffffffffa0491df3 [<00000000c4843903>] local_pci_probe+0xcb/0x170 [<000000006993ded7>] pci_device_probe+0x2c2/0x4e0 [<00000000a8e0de75>] really_probe+0x2c5/0xf90 [<00000000d42ba75d>] driver_probe_device+0x1eb/0x340 [<00000000bcc95e05>] device_driver_attach+0x294/0x300 [<000000000e2bc177>] __driver_attach+0x167/0x2f0 [<000000007d44cd6e>] bus_for_each_dev+0x148/0x1f0 [<000000003cd5a91e>] driver_attach+0x45/0x60 [<000000000041ce51>] bus_add_driver+0x3b8/0x720 [<00000000f5215476>] driver_register+0x230/0x4e0 [<00000000d79356f5>] __pci_register_driver+0x190/0x200 Fixes: a22712a96291 ("mlxsw: core: Fix devlink unregister flow") Signed-off-by: Ido Schimmel Reported-by: Vadim Pasternak Tested-by: Oleksandr Shamray Signed-off-by: Jakub Kicinski commit 1601559be3e4213148b4cb4a1abe672b00bf4f67 Author: Amit Cohen Date: Sat Oct 24 16:37:31 2020 +0300 mlxsw: Only advertise link modes supported by both driver and device During port creation the driver instructs the device to advertise all the supported link modes queried from the device. Since cited commit not all the link modes supported by the device are supported by the driver. This can result in the device negotiating a link mode that is not recognized by the driver causing ethtool to show an unsupported speed: $ ethtool swp1 ... Speed: Unknown! This is especially problematic when the netdev is enslaved to a bond, as the bond driver uses unknown speed as an indication that the link is down: [13048.900895] net_ratelimit: 86 callbacks suppressed [13048.900902] t_bond0: (slave swp52): failed to get link speed/duplex [13048.912160] t_bond0: (slave swp49): failed to get link speed/duplex Fix this by making sure that only link modes that are supported by both the device and the driver are advertised. Fixes: b97cd891268d ("mlxsw: Remove 56G speed support") Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: Jakub Kicinski commit ccee91b568e35e87d61ae72b51fd07ddf5a3d999 Author: Fabio Estevam Date: Mon Oct 26 11:20:40 2020 -0300 ARM: multi_v5_defconfig: Select CONFIG_GPIO_MXC Since commit 12d16b397ce0 ("gpio: mxc: Support module build") the CONFIG_GPIO_MXC option needs to be explicitly selected. Select it to avoid boot issues on imx25/imx27 due to the lack of the GPIO driver. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 24cb90964665c1e7d322bce754623b7155528252 Author: Fabio Estevam Date: Mon Oct 26 11:20:39 2020 -0300 ARM: imx_v4_v5_defconfig: Select CONFIG_GPIO_MXC Since commit 12d16b397ce0 ("gpio: mxc: Support module build") the CONFIG_GPIO_MXC option needs to be explicitly selected. Select it to avoid boot issues on imx25/imx27 due to the lack of the GPIO driver. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 522ee51e677112e2baf135b26c1a03a77a7b4454 Merge: af545bb5ee53f 1dc0d1cf6f3d9 Author: Jakub Kicinski Date: Mon Oct 26 16:29:38 2020 -0700 Merge branch 'net-smc-fixes-2020-10-23' Karsten Graul says: ==================== net/smc: fixes 2020-10-23 Patch 1 fixes a potential null pointer dereference. Patch 2 takes care of a suppressed return code and patch 3 corrects the system EID in the ISM driver. ==================== Link: https://lore.kernel.org/r/20201023184830.59548-1-kgraul@linux.ibm.com Signed-off-by: Jakub Kicinski commit 1dc0d1cf6f3d910ce3fffa83c5ae40c564e12373 Author: Karsten Graul Date: Fri Oct 23 20:48:30 2020 +0200 s390/ism: fix incorrect system EID The system EID that is defined by the ISM driver is not correct. Using an incorrect system EID allows to communicate with remote Linux systems that use the same incorrect system EID, but when it comes to interoperability with other operating systems then the system EIDs do never match which prevents SMC-Dv2 communication. Using the correct system EID fixes this problem. Fixes: 201091ebb2a1 ("net/smc: introduce System Enterprise ID (SEID)") Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 96d6fded958d971a3695009e0ed43aca6c598283 Author: Karsten Graul Date: Fri Oct 23 20:48:29 2020 +0200 net/smc: fix suppressed return code The patch that repaired the invalid return code in smcd_new_buf_create() missed to take care of errno ENOSPC which has a special meaning that no more DMBEs can be registered on the device. Fix that by keeping this errno value during the translation of the return code. Fixes: 6b1bbf94ab36 ("net/smc: fix invalid return code in smcd_new_buf_create()") Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 4a9baf45fd72615a804947a8495b73c4a0a4cb54 Author: Karsten Graul Date: Fri Oct 23 20:48:28 2020 +0200 net/smc: fix null pointer dereference in smc_listen_decline() smc_listen_work() calls smc_listen_decline() on label out_decl, providing the ini pointer variable. But this pointer can still be null when the label out_decl is reached. Fix this by checking the ini variable in smc_listen_work() and call smc_listen_decline() with the result directly. Fixes: a7c9c5f4af7f ("net/smc: CLC accept / confirm V2") Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit af545bb5ee53f5261db631db2ac4cde54038bdaf Author: Jeff Vander Stoep Date: Fri Oct 23 16:37:57 2020 +0200 vsock: use ns_capable_noaudit() on socket create During __vsock_create() CAP_NET_ADMIN is used to determine if the vsock_sock->trusted should be set to true. This value is used later for determing if a remote connection should be allowed to connect to a restricted VM. Unfortunately, if the caller doesn't have CAP_NET_ADMIN, an audit message such as an selinux denial is generated even if the caller does not want a trusted socket. Logging errors on success is confusing. To avoid this, switch the capable(CAP_NET_ADMIN) check to the noaudit version. Reported-by: Roman Kiryanov https://android-review.googlesource.com/c/device/generic/goldfish/+/1468545/ Signed-off-by: Jeff Vander Stoep Reviewed-by: James Morris Link: https://lore.kernel.org/r/20201023143757.377574-1-jeffv@google.com Signed-off-by: Jakub Kicinski commit 937d8420588421eaa5c7aa5c79b26b42abb288ef Author: Raju Rangoju Date: Fri Oct 23 17:28:52 2020 +0530 cxgb4: set up filter action after rewrites The current code sets up the filter action field before rewrites are set up. When the action 'switch' is used with rewrites, this may result in initial few packets that get switched out don't have rewrites applied on them. So, make sure filter action is set up along with rewrites or only after everything else is set up for rewrites. Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") Signed-off-by: Raju Rangoju Link: https://lore.kernel.org/r/20201023115852.18262-1-rajur@chelsio.com Signed-off-by: Jakub Kicinski commit ee7a376421dd7bc65b610d42d42c084a0d16d6fa Author: Dan Carpenter Date: Fri Oct 23 14:22:12 2020 +0300 net: hns3: clean up a return in hclge_tm_bp_setup() Smatch complains that "ret" might be uninitialized if we don't enter the loop. We do always enter the loop so it's a false positive, but it's cleaner to just return a literal zero and that silences the warning as well. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201023112212.GA282278@mwanda Signed-off-by: Jakub Kicinski commit 4525c8781ec0701ce824e8bd379ae1b129e26568 Author: Linus Torvalds Date: Mon Oct 26 15:45:22 2020 -0700 scsi: qla2xxx: remove incorrect sparse #ifdef The code to try to shut up sparse warnings about questionable locking didn't shut up sparse: it made the result not parse as valid C at all, since the end result now has a label with no statement. The proper fix is to just always lock the hardware, the same way Bart did in commit 8ae178760b23 ("scsi: qla2xxx: Simplify the functions for dumping firmware"). That avoids the whole problem with having locking that is not statically obvious. But in the meantime, just remove the incorrect attempt at trying to avoid a sparse warning that just made things worse. This was exposed by commit 3e6efab865ac ("scsi: qla2xxx: Fix reset of MPI firmware"), very similarly to how commit cbb01c2f2f63 ("scsi: qla2xxx: Fix MPI failure AEN (8200) handling") exposed the same problem in another place, and caused that commit 8ae178760b23. Please don't add code to just shut up sparse without actually fixing what sparse complains about. Reported-by: Luc Van Oostenryck Cc: Bart Van Assche Cc: Arun Easi Signed-off-by: Linus Torvalds commit bf9a76a470d83355200adaa5d5b55d118f229ecb Author: Linus Torvalds Date: Mon Oct 26 15:39:37 2020 -0700 arch/um: partially revert the conversion to __section() macro A couple of um files ended up not including the header file that defines the __section() macro, and the simplest fix is to just revert the change for those files. Fixes: 33def8498fdd treewide: Convert macro and uses of __section(foo) to __section("foo") Reported-and-tested-by: Guenter Roeck Cc: Joe Perches Signed-off-by: Linus Torvalds commit 7d66a71488d7c14506ab81d6455c095992efca04 Author: Gal Pressman Date: Mon Oct 26 10:26:21 2020 +0200 RDMA/uverbs: Fix false error in query gid IOCTL Some drivers (such as EFA) have a GID table, but aren't IB/RoCE devices. Remove the unnecessary rdma_ib_or_roce() check. This fixes rdma-core failures for EFA when it uses the new ioctl interface for querying the GID table. Fixes: 9f85cbe50aa0 ("RDMA/uverbs: Expose the new GID query API to user space") Link: https://lore.kernel.org/r/20201026082621.32463-1-galpress@amazon.com Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit fbdd0049d98d44914fc57d4b91f867f4996c787b Author: Parav Pandit Date: Mon Oct 26 15:43:59 2020 +0200 RDMA/mlx5: Fix devlink deadlock on net namespace deletion When a mlx5 core devlink instance is reloaded in different net namespace, its associated IB device is deleted and recreated. Example sequence is: $ ip netns add foo $ devlink dev reload pci/0000:00:08.0 netns foo $ ip netns del foo mlx5 IB device needs to attach and detach the netdevice to it through the netdev notifier chain during load and unload sequence. A below call graph of the unload flow. cleanup_net() down_read(&pernet_ops_rwsem); <- first sem acquired ops_pre_exit_list() pre_exit() devlink_pernet_pre_exit() devlink_reload() mlx5_devlink_reload_down() mlx5_unload_one() [...] mlx5_ib_remove() mlx5_ib_unbind_slave_port() mlx5_remove_netdev_notifier() unregister_netdevice_notifier() down_write(&pernet_ops_rwsem);<- recurrsive lock Hence, when net namespace is deleted, mlx5 reload results in deadlock. When deadlock occurs, devlink mutex is also held. This not only deadlocks the mlx5 device under reload, but all the processes which attempt to access unrelated devlink devices are deadlocked. Hence, fix this by mlx5 ib driver to register for per net netdev notifier instead of global one, which operats on the net namespace without holding the pernet_ops_rwsem. Fixes: 4383cfcc65e7 ("net/mlx5: Add devlink reload") Link: https://lore.kernel.org/r/20201026134359.23150-1-parav@nvidia.com Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit edebc8407b8891ec0ea9ca4089f3d3343a5e50dd Author: Bob Pearson Date: Fri Oct 16 16:13:44 2020 -0500 RDMA/rxe: Fix small problem in network_type patch The patch referenced below has a typo that results in using the wrong L2 header size for outbound traffic. (V4 <-> V6). It also breaks kernel-side RC traffic because they use AVs that use RDMA_NETWORK_XXX enums instead of RXE_NETWORK_TYPE_XXX enums. Fix this by transcoding between these enum types. Fixes: e0d696d201dd ("RDMA/rxe: Move the definitions for rxe_av.network_type to uAPI") Link: https://lore.kernel.org/r/20201016211343.22906-1-rpearson@hpe.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit fab09aaee80389a37d8ab49396afbb77fa86583a Author: John Garry Date: Thu Oct 15 16:27:05 2020 +0800 scsi: hisi_sas: Stop using queue #0 always for v2 hw In commit 8d98416a55eb ("scsi: hisi_sas: Switch v3 hw to MQ"), the dispatch function was changed to choose the delivery queue based on the request tag HW queue index. This heavily degrades performance for v2 hw, since the HW queues are not exposed there, and, as such, HW queue #0 is used for every command. Revert to previous behaviour for when nr_hw_queues is not set, that being to choose the HW queue based on target device index. Link: https://lore.kernel.org/r/1602750425-240341-1-git-send-email-john.garry@huawei.com Fixes: 8d98416a55eb ("scsi: hisi_sas: Switch v3 hw to MQ") Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit bcc3775dcf920b25d7123c141ed61f7f9f9bb6c3 Author: Takashi Iwai Date: Fri Oct 23 09:46:56 2020 +0200 drm/amd/display: Clean up debug macros This patch simplifies the ASSERT*() and BREAK_TO_DEBUGGER() macros: - Move the dependency check of CONFIG_KGDB into Kconfig - Unify the kgdb_breakpoint() call - Drop the non-existing CONFIG_HAVE_KGDB Also align the behavior of ASSERT() macro in both cases with and without CONFIG_DEBUG_KERNEL_DC. Acked-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher commit 8b7dc1fe1a5c1093551f6cd7dfbb941bd9081c2e Author: Takashi Iwai Date: Fri Oct 23 09:46:55 2020 +0200 drm/amd/display: Don't invoke kgdb_breakpoint() unconditionally ASSERT_CRITICAL() invokes kgdb_breakpoint() whenever either CONFIG_KGDB or CONFIG_HAVE_KGDB is set. This, however, may lead to a kernel panic when no kdb stuff is attached, since the kgdb_breakpoint() call issues INT3. It's nothing but a surprise for normal end-users. For avoiding the pitfall, make the kgdb_breakpoint() call only when CONFIG_DEBUG_KERNEL_DC is set. https://bugzilla.opensuse.org/show_bug.cgi?id=1177973 Cc: Acked-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher commit 920bb38c518408fa2600eaefa0af9e82cf48f166 Author: Takashi Iwai Date: Fri Oct 23 09:46:54 2020 +0200 drm/amd/display: Fix kernel panic by dal_gpio_open() error Currently both error code paths handled in dal_gpio_open_ex() issues ASSERT_CRITICAL(), and this leads to a kernel panic unnecessarily if CONFIG_KGDB is enabled. Since basically both are non-critical errors and can be recovered, drop those assert calls and use a safer one, BREAK_TO_DEBUGGER(), for allowing the debugging, instead. BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1177973 Cc: Acked-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher commit 0689dcf3e4d6b89cc2087139561dc12b60461dca Author: Alex Deucher Date: Mon Oct 26 10:25:36 2020 -0400 drm/amdgpu/display: use kvzalloc again in dc_create_state It looks this was accidently lost in a follow up patch. dc context is large and we don't need contiguous pages. Fixes: e4863f118a7d ("drm/amd/display: Multi display cause system lag on mode change") Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher Cc: Aric Cyr Cc: Alex Xu Reported-by: Alex Xu (Hello71) Tested-by: Alex Xu (Hello71) Cc: stable@vger.kernel.org commit a1d2afc5dde29a943d32bf92eb0408c9f19541fc Author: Martin Leung Date: Wed Oct 7 12:17:22 2020 -0400 drm/amd/display: adding ddc_gpio_vga_reg_list to ddc reg def'ns why: oem-related ddc read/write fails without these regs how: copy from hw_factory_dcn20.c Signed-off-by: Martin Leung Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 665e0224a3d76f36da40bd9012270fa629aa42ed Author: Tyrel Datwyler Date: Sat Oct 24 19:13:55 2020 -0500 scsi: ibmvscsi: Fix potential race after loss of transport After a loss of transport due to an adapter migration or crash/disconnect from the host partner there is a tiny window where we can race adjusting the request_limit of the adapter. The request limit is atomically increased/decreased to track the number of inflight requests against the allowed limit of our VIOS partner. After a transport loss we set the request_limit to zero to reflect this state. However, there is a window where the adapter may attempt to queue a command because the transport loss event hasn't been fully processed yet and request_limit is still greater than zero. The hypercall to send the event will fail and the error path will increment the request_limit as a result. If the adapter processes the transport event prior to this increment the request_limit becomes out of sync with the adapter state and can result in SCSI commands being submitted on the now reset connection prior to an SRP Login resulting in a protocol violation. Fix this race by protecting request_limit with the host lock when changing the value via atomic_set() to indicate no transport. Link: https://lore.kernel.org/r/20201025001355.4527-1-tyreld@linux.ibm.com Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit f84e2c5c528d937564e4a9e3411418e4c914b1fb Author: Rob Herring Date: Tue Oct 6 12:19:08 2020 -0500 dt-bindings: Another round of adding missing 'additionalProperties/unevalutatedProperties' Another round of wack-a-mole. The json-schema default is additional unknown properties are allowed, but for DT all properties should be defined. Signed-off-by: Rob Herring commit 62298364bd489b06d16370fd258c7be6a906729c Author: Rob Herring Date: Mon Oct 5 13:38:29 2020 -0500 dt-bindings: Explicitly allow additional properties in board/SoC schemas In order to add meta-schema checks for additional/unevaluatedProperties being present, all schema need to make this explicit. As the top-level board/SoC schemas always have additional properties, add 'additionalProperties: true'. Acked-by: Krzysztof Kozlowski Acked-by: Viresh Kumar Acked-by: Geert Uytterhoeven Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20201005183830.486085-4-robh@kernel.org Signed-off-by: Rob Herring commit 6ad8838de4e9ce7ccb19abeec169d224ddb07dde Author: Rob Herring Date: Mon Apr 20 21:24:47 2020 -0500 dt-bindings: More whitespace clean-ups in schema files Clean-up incorrect indentation, extra spaces, and missing EOF newline in schema files. Most of the clean-ups are for list indentation which should always be 2 spaces more than the preceding keyword. Found with yamllint (now integrated into the checks). Cc: linux-arm-kernel@lists.infradead.org Cc: dri-devel@lists.freedesktop.org Cc: linux-gpio@vger.kernel.org Cc: linux-i2c@vger.kernel.org Cc: linux-iio@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: alsa-devel@alsa-project.org Cc: linux-mmc@vger.kernel.org Cc: linux-mtd@lists.infradead.org Cc: linux-serial@vger.kernel.org Cc: linux-usb@vger.kernel.org Acked-by: Wolfram Sang # for I2C Acked-by: Sam Ravnborg # for display Acked-by: Jonathan Cameron #for-iio Signed-off-by: Rob Herring commit 5c024e68d79b1ed8029afd2cae87c67865426cbe Author: Ricardo Cañuelo Date: Wed Oct 21 13:43:08 2020 +0200 mfd: google,cros-ec: add missing properties Add missing properties that are currently used in the examples of subnode bindings and in many DTs. Also updates the example in sound/google,cros-ec-codec.yaml to comply with the google,cros-ec binding. Reviewed-by: Enric Balletbo i Serra Signed-off-by: Ricardo Cañuelo Link: https://lore.kernel.org/r/20201021114308.25485-4-ricardo.canuelo@collabora.com [robh: Add missing '#address-cells' and '#size-cells'] Signed-off-by: Rob Herring commit 50d68feee01039e74e296c3d8453c0d72b546307 Author: Ricardo Cañuelo Date: Wed Oct 21 13:43:07 2020 +0200 dt-bindings: input: convert cros-ec-keyb to json-schema Convert the google,cros-ec-keyb binding to YAML and add it as a property of google,cros-ec.yaml Reviewed-by: Enric Balletbo i Serra Signed-off-by: Ricardo Cañuelo Link: https://lore.kernel.org/r/20201021114308.25485-3-ricardo.canuelo@collabora.com Signed-off-by: Rob Herring commit 1acd4577a66f5125ede038ee16c33d05ddcaf153 Author: Ricardo Cañuelo Date: Wed Oct 21 13:43:06 2020 +0200 dt-bindings: i2c: convert i2c-cros-ec-tunnel to json-schema Convert the google,cros-ec-i2c-tunnel binding to YAML and add it as a property of google,cros-ec.yaml. Reviewed-by: Enric Balletbo i Serra Signed-off-by: Ricardo Cañuelo Link: https://lore.kernel.org/r/20201021114308.25485-2-ricardo.canuelo@collabora.com [robh: add ref to i2c-controller.yaml] Signed-off-by: Rob Herring commit 140b2ef1c28d3f5a5fc767368eaa8b45afc5bf1f Author: Dmytro Laktyushkin Date: Thu Oct 15 14:49:56 2020 -0400 drm/amd/display: prevent null pointer access Prevent null pointer access when checking odm tree. Signed-off-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher Cc: commit 55bb919be4e4973cd037a04f527ecc6686800437 Author: Christian König Date: Mon Oct 12 13:09:36 2020 +0200 drm/amdgpu: increase the reserved VM size to 2MB Ideally this should be a multiple of the VM block size. 2MB should at least fit for Vega/Navi. Signed-off-by: Christian König Reviewed-by: Madhav Chauhan Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 866e09f0110c6e86071954033e3067975946592a Author: David Galiffi Date: Wed Apr 29 13:31:12 2020 -0400 drm/amd/display: Fixed panic during seamless boot. [why] get_pixel_clk_frequency_100hz is undefined in clock_source_funcs. [how] set function pointer: ".get_pixel_clk_frequency_100hz = get_pixel_clk_frequency_100hz" Signed-off-by: David Galiffi Reviewed-by: Bhawanpreet Lakha Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit c4aa8dff6091cc9536aeb255e544b0b4ba29faf4 Author: Madhav Chauhan Date: Fri Oct 16 18:03:07 2020 +0530 drm/amdgpu: don't map BO in reserved region 2MB area is reserved at top inside VM. Suggested-by: Christian König Signed-off-by: Madhav Chauhan Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 8942881144a7365143f196f5eafed24783a424a3 Author: Tianci.Yin Date: Wed Oct 14 17:05:50 2020 +0800 drm/amdgpu: add DID for navi10 blockchain SKU Reviewed-by: Alex Deucher Reviewed-by: Guchun Chen Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit a305e7dc5fa86ff9cf6cd2da30215a92d43c9285 Author: Tianci.Yin Date: Thu Oct 22 11:40:26 2020 +0800 drm/amdgpu: disable DCN and VCN for navi10 blockchain SKU(v3) The blockchain SKU has no display and video support, remove them. Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 2f4843b172c2c0360ee7792ad98025fae7baefde Author: Helge Deller Date: Thu Oct 22 11:00:05 2020 +0200 scsi: mptfusion: Fix null pointer dereferences in mptscsih_remove() The mptscsih_remove() function triggers a kernel oops if the Scsi_Host pointer (ioc->sh) is NULL, as can be seen in this syslog: ioc0: LSI53C1030 B2: Capabilities={Initiator,Target} Begin: Waiting for root file system ... scsi host2: error handler thread failed to spawn, error = -4 mptspi: ioc0: WARNING - Unable to register controller with SCSI subsystem Backtrace: [<000000001045b7cc>] mptspi_probe+0x248/0x3d0 [mptspi] [<0000000040946470>] pci_device_probe+0x1ac/0x2d8 [<0000000040add668>] really_probe+0x1bc/0x988 [<0000000040ade704>] driver_probe_device+0x160/0x218 [<0000000040adee24>] device_driver_attach+0x160/0x188 [<0000000040adef90>] __driver_attach+0x144/0x320 [<0000000040ad7c78>] bus_for_each_dev+0xd4/0x158 [<0000000040adc138>] driver_attach+0x4c/0x80 [<0000000040adb3ec>] bus_add_driver+0x3e0/0x498 [<0000000040ae0130>] driver_register+0xf4/0x298 [<00000000409450c4>] __pci_register_driver+0x78/0xa8 [<000000000007d248>] mptspi_init+0x18c/0x1c4 [mptspi] This patch adds the necessary NULL-pointer checks. Successfully tested on a HP C8000 parisc workstation with buggy SCSI drives. Link: https://lore.kernel.org/r/20201022090005.GA9000@ls3530.fritz.box Cc: Signed-off-by: Helge Deller Signed-off-by: Martin K. Petersen commit 98f9d33c5d0d779e6c96a4a8ac995085b11924f0 Author: Daniel Wagner Date: Wed Oct 14 09:30:48 2020 +0200 scsi: qla2xxx: Return EBUSY on fcport deletion When the fcport is about to be deleted we should return EBUSY instead of ENODEV. Only for EBUSY will the request be requeued in a multipath setup. Also return EBUSY when the firmware has not yet started to avoid dropping the request. Link: https://lore.kernel.org/r/20201014073048.36219-1-dwagner@suse.de Reviewed-by: Arun Easi Signed-off-by: Daniel Wagner Signed-off-by: Martin K. Petersen commit 831e3405c2a344018a18fcc2665acc5a38c3a707 Author: Ming Lei Date: Sat Oct 10 11:25:39 2020 +0800 scsi: core: Don't start concurrent async scan on same host The current scanning mechanism is supposed to fall back to a synchronous host scan if an asynchronous scan is in progress. However, this rule isn't strictly respected, scsi_prep_async_scan() doesn't hold scan_mutex when checking shost->async_scan. When scsi_scan_host() is called concurrently, two async scans on same host can be started and a hang in do_scan_async() is observed. Fixes this issue by checking & setting shost->async_scan atomically with shost->scan_mutex. Link: https://lore.kernel.org/r/20201010032539.426615-1-ming.lei@redhat.com Cc: Christoph Hellwig Cc: Ewan D. Milne Cc: Hannes Reinecke Cc: Bart Van Assche Reviewed-by: Lee Duncan Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 2a6eca16f376f6b83aaf73c57f0b6547907a5ed3 Author: Arnd Bergmann Date: Mon Oct 26 17:52:18 2020 +0100 ALSA: make snd_kcontrol_new name a normal string When building with W=2, there are lots of warnings about the snd_kcontrol_new name field being an array of 'unsigned char' but initialized to a string: include/sound/soc.h:93:48: warning: pointer targets in initialization of 'const unsigned char *' from 'char *' differ in signedness [-Wpointer-sign] Make it a regular 'char *' to avoid flooding the build log with this. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20201026165715.3723704-1-arnd@kernel.org Signed-off-by: Takashi Iwai commit 0d0d245104a42e593adcf11396017a6420c08ba8 Author: Brendan Higgins Date: Wed Oct 21 13:39:14 2020 -0700 kunit: tools: fix kunit_tool tests for parsing test plans Some tests logs for kunit_tool tests are missing their test plans causing their tests to fail; fix this by adding the test plans. Fixes: 45dcbb6f5ef7 ("kunit: test: add test plan to KUnit TAP format") Signed-off-by: Brendan Higgins Reviewed-by: David Gow Signed-off-by: Shuah Khan commit f0b62039bf7f998fb3f1369ac70dbe571c74f9d8 Author: SeongJae Park Date: Wed Oct 21 21:25:18 2020 +0200 Documentation: kunit: Update Kconfig parts for KUNIT's module support If 'CONFIG_KUNIT=m', letting kunit tests that do not support loadable module build depends on 'KUNIT' instead of 'KUNIT=y' result in compile errors. This commit updates the document for this. Fixes: 9fe124bf1b77 ("kunit: allow kunit to be loaded as a module") Signed-off-by: SeongJae Park Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 7f32b10c6b461a369b9741623cd3f722134066f0 Author: Mauro Carvalho Chehab Date: Wed Oct 21 14:17:26 2020 +0200 kunit: test: fix remaining kernel-doc warnings test.h still produce three warnings: include/kunit/test.h:282: warning: Function parameter or member '__suites' not described in 'kunit_test_suites_for_module' include/kunit/test.h:282: warning: Excess function parameter 'suites_list' description in 'kunit_test_suites_for_module' include/kunit/test.h:314: warning: Excess function parameter 'suites' description in 'kunit_test_suites' They're all due to errors at kernel-doc markups. Update them. It should be noticed that this patch moved a kernel-doc markup that were located at the wrong place, and using a wrong name. Kernel-doc only supports kaving the markup just before the function/macro declaration. Placing it elsewhere will make it do wrong assumptions. Fixes: aac35468ca20 ("kunit: test: create a single centralized executor for all tests") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 3fc48259d5250f7a3ee021ad0492b604c428c564 Author: Andy Shevchenko Date: Thu Oct 15 19:28:17 2020 +0300 kunit: Don't fail test suites if one of them is empty Empty test suite is okay test suite. Don't fail the rest of the test suites if one of them is empty. Fixes: 6ebf5866f2e8 ("kunit: tool: add Python wrappers for running KUnit tests") Signed-off-by: Andy Shevchenko Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 3023d8ff3fc60e5d32dc1d05f99ad6ffa12b0033 Author: David Gow Date: Wed Oct 21 20:04:55 2020 -0700 kunit: Fix kunit.py --raw_output option Due to the raw_output() function on kunit_parser.py actually being a generator, it only runs if something reads the lines it returns. Since we no-longer do that (parsing doesn't actually happen if raw_output is enabled), it was not printing anything. Fixes: 45ba7a893ad8 ("kunit: kunit_tool: Separate out config/build/exec/parse") Signed-off-by: David Gow Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 3aee8a3a88fa533b74fb75640ca23001358e5476 Author: Fabio Estevam Date: Fri Oct 16 10:26:26 2020 -0300 mtd: rawnand: ifc: Move the ECC engine initialization to the right place No ECC initialization should happen during the host controller probe. In fact, we need the probe function to call nand_scan() in order to: - identify the device, its capabilities and constraints (nand_scan_ident()) - configure the ECC engine accordingly (->attach_chip()) - scan its content and prepare the core (nand_scan_tail()) Moving these lines to fsl_ifc_attach_chip() fixes a regression caused by a previous commit supposed to clarify these steps. Based on a fix done for the mxc_nand driver by Miquel Raynal. Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Reported-by: Han Xu Signed-off-by: Fabio Estevam Tested-by: Han Xu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201016132626.30112-1-festevam@gmail.com commit 1b8d1070857da3c11307b3130eb4b05bee7d521d Author: Fabio Estevam Date: Fri Oct 16 18:36:13 2020 -0300 mtd: rawnand: mxc: Move the ECC engine initialization to the right place No ECC initialization should happen during the host controller probe. In fact, we need the probe function to call nand_scan() in order to: - identify the device, its capabilities and constraints (nand_scan_ident()) - configure the ECC engine accordingly (->attach_chip()) - scan its content and prepare the core (nand_scan_tail()) Moving these lines to mxcnd_attach_chip() fixes a regression caused by a previous commit supposed to clarify these steps. When moving the ECC initialization from probe() to attach(), get rid of the pdata usage to determine the engine type and let the core decide instead. Tested on a imx27-pdk board. Fixes: d7157ff49a5b ("mtd: rawnand: Use the ECC framework user input parsing bits") Reported-by: Fabio Estevam Co-developed-by: Miquel Raynal Signed-off-by: Fabio Estevam Tested-by: Sascha Hauer Tested-by: Martin Kaiser Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20201016213613.1450-1-festevam@gmail.com commit 41ba50b0572e90ed3d24fe4def54567e9050bc47 Merge: 9480b4e75b710 c3a98c3ad5c0d Author: Linus Torvalds Date: Mon Oct 26 10:43:52 2020 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes a regression in x86/poly1305" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: x86/poly1305 - add back a needed assignment commit 9480b4e75b7108ee68ecf5bc6b4bd68e8031c521 Author: Matthew Wilcox (Oracle) Date: Mon Oct 26 09:12:10 2020 +0000 cachefiles: Handle readpage error correctly If ->readpage returns an error, it has already unlocked the page. Fixes: 5e929b33c393 ("CacheFiles: Handle truncate unlocking the page we're reading") Cc: stable@vger.kernel.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 7e2b2da60658ee6cf7a421596a3c9eb619c810f9 Merge: 3650b228f83ad 8e90b4b1305a8 Author: Linus Torvalds Date: Mon Oct 26 10:36:21 2020 -0700 Merge tag 's390-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fix from Heiko Carstens: "Fix s390 compile breakage caused by commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo) to __section("foo")")" * tag 's390-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: correct __bootdata / __bootdata_preserved macros commit dbf563eee0b8cc056744514d91c5ffc2fa6c0982 Author: Michael Kelley Date: Mon Oct 26 07:52:52 2020 -0700 x86/hyperv: Clarify comment on x2apic mode The comment about Hyper-V accessors is unclear regarding their potential use in x2apic mode, as is the associated commit message in e211288b72f1. Clarify that while the architectural and synthetic MSRs are equivalent in x2apic mode, the full set of xapic accessors cannot be used because of register layout differences. Fixes: e211288b72f1 ("x86/hyperv: Make vapic support x2apic mode") Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1603723972-81303-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 472547778de24e2764ab325268dd5b77e6923939 Author: Andrii Nakryiko Date: Thu Oct 22 13:27:38 2020 -0700 selftest/bpf: Fix profiler test using CO-RE relocation for enums Instead of hard-coding invalid pids_cgrp_id, use Kconfig to detect the presence of that enum value and CO-RE to capture its actual value in the hosts's kernel. Fixes: 03d4d13fab3f ("selftests/bpf: Add profiler test") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Tested-by: Song Liu Link: https://lore.kernel.org/bpf/20201022202739.3667367-1-andrii@kernel.org commit 7342ca34d931a357d408aaa25fadd031e46af137 Author: Jing Xiangfeng Date: Thu Oct 15 16:40:53 2020 +0800 thunderbolt: Add the missed ida_simple_remove() in ring_request_msix() ring_request_msix() misses to call ida_simple_remove() in an error path. Add a label 'err_ida_remove' and jump to it. Fixes: 046bee1f9ab8 ("thunderbolt: Add MSI-X support") Cc: stable@vger.kernel.org Signed-off-by: Jing Xiangfeng Reviewed-by: Andy Shevchenko Signed-off-by: Mika Westerberg commit 402dab548d0da38b260f3843225cdfd37d91f512 Author: Dan Carpenter Date: Thu Oct 22 10:08:24 2020 +0300 hwmon: (pmbus/max20730) use scnprintf() instead of snprintf() The snprintf() function returns the number of characters which would have been printed if there were enough space, but the scnprintf() returns the number of characters which were actually printed. If the buffer is not large enough, then using snprintf() would result in a read overflow and an information leak. Fixes: 8910c0bd533d ("hwmon: (pmbus/max20730) add device monitoring via debugfs") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201022070824.GC2817762@mwanda Signed-off-by: Guenter Roeck commit 560b6ac37a87fcb78d580437e3e0bc2b6b5b0295 Author: Billy Tsai Date: Mon Oct 19 12:50:26 2020 +0800 gpio: aspeed: fix ast2600 bank properties GPIO_T is mapped to the most significant byte of input/output mask, and the byte in "output" mask should be 0 because GPIO_T is input only. All the other bits need to be 1 because GPIO_Q/R/S support both input and output modes. Fixes: ab4a85534c3e ("gpio: aspeed: Add in ast2600 details to Aspeed driver") Signed-off-by: Billy Tsai Reviewed-by: Tao Ren Reviewed-by: Joel Stanley Reviewed-by: Andrew Jeffery Signed-off-by: Bartosz Golaszewski commit 3fe37204c9a233d1bd852b98bca43ec61854ba78 Author: Jia He Date: Fri Oct 16 23:35:44 2020 +0800 gpio: dwapb: Fix missing conversion to GPIO-lib-based IRQ-chip Commit 0ea683931adb ("gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip") missed the case in dwapb_irq_set_wake(). Without this fix, probing the dwapb gpio driver will hit a error: "address between user and kernel address ranges" on a Ampere armv8a server and cause a panic. Fixes: 0ea683931adb ("gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip") Signed-off-by: Jia He Reviewed-by: Andy Shevchenko Acked-by: Serge Semin Signed-off-by: Bartosz Golaszewski commit dff61e683e744675ee5ad83f23ff71701c830d45 Merge: 926e97852eaf1 d6820bc6508c0 Author: Arnd Bergmann Date: Mon Oct 26 15:34:35 2020 +0100 Merge tag 'imx-fixes-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.10: With commit 12d16b397ce0 ("gpio: mxc: Support module build") in place, GPIO_MXC has no 'def_bool y' anymore, and needs to be enabled by defconfig. It updates the defconfig files to explicitly enable the option for fixing boot failure on i.MX platform. * tag 'imx-fixes-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: multi_v7_defconfig: Build in CONFIG_GPIO_MXC by default ARM: imx_v6_v7_defconfig: Build in CONFIG_GPIO_MXC by default arm64: defconfig: Build in CONFIG_GPIO_MXC by default Link: https://lore.kernel.org/r/20201026135601.GA32675@dragon Signed-off-by: Arnd Bergmann commit f7b6603c666798a1f8379e692d11d500885f32d8 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:33:35 2020 +0200 ALSA: fix kernel-doc markups Kernel-doc markups should use this format: identifier - description There is a common comment marked, instead, with kernel-doc notation. Some identifiers have different names between their prototypes and the kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Acked-by: Mark Brown Link: https://lore.kernel.org/r/535182d6f55d7a7de293dda9676df68f5f60afc6.1603469755.git.mchehab+huawei@kernel.org Signed-off-by: Takashi Iwai commit 49d11bead7d596e031fbd34051d8765587cd645b Author: Josef Bacik Date: Mon Oct 19 16:02:31 2020 -0400 btrfs: add a helper to read the tree_root commit root for backref lookup I got the following lockdep splat with tree locks converted to rwsem patches on btrfs/104: ====================================================== WARNING: possible circular locking dependency detected 5.9.0+ #102 Not tainted ------------------------------------------------------ btrfs-cleaner/903 is trying to acquire lock: ffff8e7fab6ffe30 (btrfs-root-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x32/0x170 but task is already holding lock: ffff8e7fab628a88 (&fs_info->commit_root_sem){++++}-{3:3}, at: btrfs_find_all_roots+0x41/0x80 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&fs_info->commit_root_sem){++++}-{3:3}: down_read+0x40/0x130 caching_thread+0x53/0x5a0 btrfs_work_helper+0xfa/0x520 process_one_work+0x238/0x540 worker_thread+0x55/0x3c0 kthread+0x13a/0x150 ret_from_fork+0x1f/0x30 -> #2 (&caching_ctl->mutex){+.+.}-{3:3}: __mutex_lock+0x7e/0x7b0 btrfs_cache_block_group+0x1e0/0x510 find_free_extent+0xb6e/0x12f0 btrfs_reserve_extent+0xb3/0x1b0 btrfs_alloc_tree_block+0xb1/0x330 alloc_tree_block_no_bg_flush+0x4f/0x60 __btrfs_cow_block+0x11d/0x580 btrfs_cow_block+0x10c/0x220 commit_cowonly_roots+0x47/0x2e0 btrfs_commit_transaction+0x595/0xbd0 sync_filesystem+0x74/0x90 generic_shutdown_super+0x22/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 deactivate_locked_super+0x36/0xa0 cleanup_mnt+0x12d/0x190 task_work_run+0x5c/0xa0 exit_to_user_mode_prepare+0x1df/0x200 syscall_exit_to_user_mode+0x54/0x280 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&space_info->groups_sem){++++}-{3:3}: down_read+0x40/0x130 find_free_extent+0x2ed/0x12f0 btrfs_reserve_extent+0xb3/0x1b0 btrfs_alloc_tree_block+0xb1/0x330 alloc_tree_block_no_bg_flush+0x4f/0x60 __btrfs_cow_block+0x11d/0x580 btrfs_cow_block+0x10c/0x220 commit_cowonly_roots+0x47/0x2e0 btrfs_commit_transaction+0x595/0xbd0 sync_filesystem+0x74/0x90 generic_shutdown_super+0x22/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 deactivate_locked_super+0x36/0xa0 cleanup_mnt+0x12d/0x190 task_work_run+0x5c/0xa0 exit_to_user_mode_prepare+0x1df/0x200 syscall_exit_to_user_mode+0x54/0x280 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (btrfs-root-00){++++}-{3:3}: __lock_acquire+0x1167/0x2150 lock_acquire+0xb9/0x3d0 down_read_nested+0x43/0x130 __btrfs_tree_read_lock+0x32/0x170 __btrfs_read_lock_root_node+0x3a/0x50 btrfs_search_slot+0x614/0x9d0 btrfs_find_root+0x35/0x1b0 btrfs_read_tree_root+0x61/0x120 btrfs_get_root_ref+0x14b/0x600 find_parent_nodes+0x3e6/0x1b30 btrfs_find_all_roots_safe+0xb4/0x130 btrfs_find_all_roots+0x60/0x80 btrfs_qgroup_trace_extent_post+0x27/0x40 btrfs_add_delayed_data_ref+0x3fd/0x460 btrfs_free_extent+0x42/0x100 __btrfs_mod_ref+0x1d7/0x2f0 walk_up_proc+0x11c/0x400 walk_up_tree+0xf0/0x180 btrfs_drop_snapshot+0x1c7/0x780 btrfs_clean_one_deleted_snapshot+0xfb/0x110 cleaner_kthread+0xd4/0x140 kthread+0x13a/0x150 ret_from_fork+0x1f/0x30 other info that might help us debug this: Chain exists of: btrfs-root-00 --> &caching_ctl->mutex --> &fs_info->commit_root_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&fs_info->commit_root_sem); lock(&caching_ctl->mutex); lock(&fs_info->commit_root_sem); lock(btrfs-root-00); *** DEADLOCK *** 3 locks held by btrfs-cleaner/903: #0: ffff8e7fab628838 (&fs_info->cleaner_mutex){+.+.}-{3:3}, at: cleaner_kthread+0x6e/0x140 #1: ffff8e7faadac640 (sb_internal){.+.+}-{0:0}, at: start_transaction+0x40b/0x5c0 #2: ffff8e7fab628a88 (&fs_info->commit_root_sem){++++}-{3:3}, at: btrfs_find_all_roots+0x41/0x80 stack backtrace: CPU: 0 PID: 903 Comm: btrfs-cleaner Not tainted 5.9.0+ #102 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-2.fc32 04/01/2014 Call Trace: dump_stack+0x8b/0xb0 check_noncircular+0xcf/0xf0 __lock_acquire+0x1167/0x2150 ? __bfs+0x42/0x210 lock_acquire+0xb9/0x3d0 ? __btrfs_tree_read_lock+0x32/0x170 down_read_nested+0x43/0x130 ? __btrfs_tree_read_lock+0x32/0x170 __btrfs_tree_read_lock+0x32/0x170 __btrfs_read_lock_root_node+0x3a/0x50 btrfs_search_slot+0x614/0x9d0 ? find_held_lock+0x2b/0x80 btrfs_find_root+0x35/0x1b0 ? do_raw_spin_unlock+0x4b/0xa0 btrfs_read_tree_root+0x61/0x120 btrfs_get_root_ref+0x14b/0x600 find_parent_nodes+0x3e6/0x1b30 btrfs_find_all_roots_safe+0xb4/0x130 btrfs_find_all_roots+0x60/0x80 btrfs_qgroup_trace_extent_post+0x27/0x40 btrfs_add_delayed_data_ref+0x3fd/0x460 btrfs_free_extent+0x42/0x100 __btrfs_mod_ref+0x1d7/0x2f0 walk_up_proc+0x11c/0x400 walk_up_tree+0xf0/0x180 btrfs_drop_snapshot+0x1c7/0x780 ? btrfs_clean_one_deleted_snapshot+0x73/0x110 btrfs_clean_one_deleted_snapshot+0xfb/0x110 cleaner_kthread+0xd4/0x140 ? btrfs_alloc_root+0x50/0x50 kthread+0x13a/0x150 ? kthread_create_worker_on_cpu+0x40/0x40 ret_from_fork+0x1f/0x30 BTRFS info (device sdb): disk space caching is enabled BTRFS info (device sdb): has skinny extents This happens because qgroups does a backref lookup when we create a delayed ref. From here it may have to look up a root from an indirect ref, which does a normal lookup on the tree_root, which takes the read lock on the tree_root nodes. To fix this we need to add a variant for looking up roots that searches the commit root of the tree_root. Then when we do the backref search using the commit root we are sure to not take any locks on the tree_root nodes. This gets rid of the lockdep splat when running btrfs/104. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 5223cc60b40ae525ae6c94e98824129f1a5b4ae5 Author: Josef Bacik Date: Mon Oct 19 16:02:29 2020 -0400 btrfs: drop the path before adding qgroup items when enabling qgroups When enabling qgroups we walk the tree_root and then add a qgroup item for every root that we have. This creates a lock dependency on the tree_root and qgroup_root, which results in the following lockdep splat (with tree locks using rwsem), eg. in tests btrfs/017 or btrfs/022: ====================================================== WARNING: possible circular locking dependency detected 5.9.0-default+ #1299 Not tainted ------------------------------------------------------ btrfs/24552 is trying to acquire lock: ffff9142dfc5f630 (btrfs-quota-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x35/0x1c0 [btrfs] but task is already holding lock: ffff9142dfc5d0b0 (btrfs-root-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x35/0x1c0 [btrfs] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (btrfs-root-00){++++}-{3:3}: __lock_acquire+0x3fb/0x730 lock_acquire.part.0+0x6a/0x130 down_read_nested+0x46/0x130 __btrfs_tree_read_lock+0x35/0x1c0 [btrfs] __btrfs_read_lock_root_node+0x3a/0x50 [btrfs] btrfs_search_slot_get_root+0x11d/0x290 [btrfs] btrfs_search_slot+0xc3/0x9f0 [btrfs] btrfs_insert_item+0x6e/0x140 [btrfs] btrfs_create_tree+0x1cb/0x240 [btrfs] btrfs_quota_enable+0xcd/0x790 [btrfs] btrfs_ioctl_quota_ctl+0xc9/0xe0 [btrfs] __x64_sys_ioctl+0x83/0xa0 do_syscall_64+0x2d/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (btrfs-quota-00){++++}-{3:3}: check_prev_add+0x91/0xc30 validate_chain+0x491/0x750 __lock_acquire+0x3fb/0x730 lock_acquire.part.0+0x6a/0x130 down_read_nested+0x46/0x130 __btrfs_tree_read_lock+0x35/0x1c0 [btrfs] __btrfs_read_lock_root_node+0x3a/0x50 [btrfs] btrfs_search_slot_get_root+0x11d/0x290 [btrfs] btrfs_search_slot+0xc3/0x9f0 [btrfs] btrfs_insert_empty_items+0x58/0xa0 [btrfs] add_qgroup_item.part.0+0x72/0x210 [btrfs] btrfs_quota_enable+0x3bb/0x790 [btrfs] btrfs_ioctl_quota_ctl+0xc9/0xe0 [btrfs] __x64_sys_ioctl+0x83/0xa0 do_syscall_64+0x2d/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(btrfs-root-00); lock(btrfs-quota-00); lock(btrfs-root-00); lock(btrfs-quota-00); *** DEADLOCK *** 5 locks held by btrfs/24552: #0: ffff9142df431478 (sb_writers#10){.+.+}-{0:0}, at: mnt_want_write_file+0x22/0xa0 #1: ffff9142f9b10cc0 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_ioctl_quota_ctl+0x7b/0xe0 [btrfs] #2: ffff9142f9b11a08 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x3b/0x790 [btrfs] #3: ffff9142df431698 (sb_internal#2){.+.+}-{0:0}, at: start_transaction+0x406/0x510 [btrfs] #4: ffff9142dfc5d0b0 (btrfs-root-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x35/0x1c0 [btrfs] stack backtrace: CPU: 1 PID: 24552 Comm: btrfs Not tainted 5.9.0-default+ #1299 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014 Call Trace: dump_stack+0x77/0x97 check_noncircular+0xf3/0x110 check_prev_add+0x91/0xc30 validate_chain+0x491/0x750 __lock_acquire+0x3fb/0x730 lock_acquire.part.0+0x6a/0x130 ? __btrfs_tree_read_lock+0x35/0x1c0 [btrfs] ? lock_acquire+0xc4/0x140 ? __btrfs_tree_read_lock+0x35/0x1c0 [btrfs] down_read_nested+0x46/0x130 ? __btrfs_tree_read_lock+0x35/0x1c0 [btrfs] __btrfs_tree_read_lock+0x35/0x1c0 [btrfs] ? btrfs_root_node+0xd9/0x200 [btrfs] __btrfs_read_lock_root_node+0x3a/0x50 [btrfs] btrfs_search_slot_get_root+0x11d/0x290 [btrfs] btrfs_search_slot+0xc3/0x9f0 [btrfs] btrfs_insert_empty_items+0x58/0xa0 [btrfs] add_qgroup_item.part.0+0x72/0x210 [btrfs] btrfs_quota_enable+0x3bb/0x790 [btrfs] btrfs_ioctl_quota_ctl+0xc9/0xe0 [btrfs] __x64_sys_ioctl+0x83/0xa0 do_syscall_64+0x2d/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fix this by dropping the path whenever we find a root item, add the qgroup item, and then re-lookup the root item we found and continue processing roots. Reported-by: David Sterba Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 66d204a16c94f24ad08290a7663ab67e7fc04e82 Author: Filipe Manana Date: Mon Oct 12 11:55:24 2020 +0100 btrfs: fix readahead hang and use-after-free after removing a device Very sporadically I had test case btrfs/069 from fstests hanging (for years, it is not a recent regression), with the following traces in dmesg/syslog: [162301.160628] BTRFS info (device sdc): dev_replace from /dev/sdd (devid 2) to /dev/sdg started [162301.181196] BTRFS info (device sdc): scrub: finished on devid 4 with status: 0 [162301.287162] BTRFS info (device sdc): dev_replace from /dev/sdd (devid 2) to /dev/sdg finished [162513.513792] INFO: task btrfs-transacti:1356167 blocked for more than 120 seconds. [162513.514318] Not tainted 5.9.0-rc6-btrfs-next-69 #1 [162513.514522] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [162513.514747] task:btrfs-transacti state:D stack: 0 pid:1356167 ppid: 2 flags:0x00004000 [162513.514751] Call Trace: [162513.514761] __schedule+0x5ce/0xd00 [162513.514765] ? _raw_spin_unlock_irqrestore+0x3c/0x60 [162513.514771] schedule+0x46/0xf0 [162513.514844] wait_current_trans+0xde/0x140 [btrfs] [162513.514850] ? finish_wait+0x90/0x90 [162513.514864] start_transaction+0x37c/0x5f0 [btrfs] [162513.514879] transaction_kthread+0xa4/0x170 [btrfs] [162513.514891] ? btrfs_cleanup_transaction+0x660/0x660 [btrfs] [162513.514894] kthread+0x153/0x170 [162513.514897] ? kthread_stop+0x2c0/0x2c0 [162513.514902] ret_from_fork+0x22/0x30 [162513.514916] INFO: task fsstress:1356184 blocked for more than 120 seconds. [162513.515192] Not tainted 5.9.0-rc6-btrfs-next-69 #1 [162513.515431] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [162513.515680] task:fsstress state:D stack: 0 pid:1356184 ppid:1356177 flags:0x00004000 [162513.515682] Call Trace: [162513.515688] __schedule+0x5ce/0xd00 [162513.515691] ? _raw_spin_unlock_irqrestore+0x3c/0x60 [162513.515697] schedule+0x46/0xf0 [162513.515712] wait_current_trans+0xde/0x140 [btrfs] [162513.515716] ? finish_wait+0x90/0x90 [162513.515729] start_transaction+0x37c/0x5f0 [btrfs] [162513.515743] btrfs_attach_transaction_barrier+0x1f/0x50 [btrfs] [162513.515753] btrfs_sync_fs+0x61/0x1c0 [btrfs] [162513.515758] ? __ia32_sys_fdatasync+0x20/0x20 [162513.515761] iterate_supers+0x87/0xf0 [162513.515765] ksys_sync+0x60/0xb0 [162513.515768] __do_sys_sync+0xa/0x10 [162513.515771] do_syscall_64+0x33/0x80 [162513.515774] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [162513.515781] RIP: 0033:0x7f5238f50bd7 [162513.515782] Code: Bad RIP value. [162513.515784] RSP: 002b:00007fff67b978e8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a2 [162513.515786] RAX: ffffffffffffffda RBX: 000055b1fad2c560 RCX: 00007f5238f50bd7 [162513.515788] RDX: 00000000ffffffff RSI: 000000000daf0e74 RDI: 000000000000003a [162513.515789] RBP: 0000000000000032 R08: 000000000000000a R09: 00007f5239019be0 [162513.515791] R10: fffffffffffff24f R11: 0000000000000206 R12: 000000000000003a [162513.515792] R13: 00007fff67b97950 R14: 00007fff67b97906 R15: 000055b1fad1a340 [162513.515804] INFO: task fsstress:1356185 blocked for more than 120 seconds. [162513.516064] Not tainted 5.9.0-rc6-btrfs-next-69 #1 [162513.516329] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [162513.516617] task:fsstress state:D stack: 0 pid:1356185 ppid:1356177 flags:0x00000000 [162513.516620] Call Trace: [162513.516625] __schedule+0x5ce/0xd00 [162513.516628] ? _raw_spin_unlock_irqrestore+0x3c/0x60 [162513.516634] schedule+0x46/0xf0 [162513.516647] wait_current_trans+0xde/0x140 [btrfs] [162513.516650] ? finish_wait+0x90/0x90 [162513.516662] start_transaction+0x4d7/0x5f0 [btrfs] [162513.516679] btrfs_setxattr_trans+0x3c/0x100 [btrfs] [162513.516686] __vfs_setxattr+0x66/0x80 [162513.516691] __vfs_setxattr_noperm+0x70/0x200 [162513.516697] vfs_setxattr+0x6b/0x120 [162513.516703] setxattr+0x125/0x240 [162513.516709] ? lock_acquire+0xb1/0x480 [162513.516712] ? mnt_want_write+0x20/0x50 [162513.516721] ? rcu_read_lock_any_held+0x8e/0xb0 [162513.516723] ? preempt_count_add+0x49/0xa0 [162513.516725] ? __sb_start_write+0x19b/0x290 [162513.516727] ? preempt_count_add+0x49/0xa0 [162513.516732] path_setxattr+0xba/0xd0 [162513.516739] __x64_sys_setxattr+0x27/0x30 [162513.516741] do_syscall_64+0x33/0x80 [162513.516743] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [162513.516745] RIP: 0033:0x7f5238f56d5a [162513.516746] Code: Bad RIP value. [162513.516748] RSP: 002b:00007fff67b97868 EFLAGS: 00000202 ORIG_RAX: 00000000000000bc [162513.516750] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f5238f56d5a [162513.516751] RDX: 000055b1fbb0d5a0 RSI: 00007fff67b978a0 RDI: 000055b1fbb0d470 [162513.516753] RBP: 000055b1fbb0d5a0 R08: 0000000000000001 R09: 00007fff67b97700 [162513.516754] R10: 0000000000000004 R11: 0000000000000202 R12: 0000000000000004 [162513.516756] R13: 0000000000000024 R14: 0000000000000001 R15: 00007fff67b978a0 [162513.516767] INFO: task fsstress:1356196 blocked for more than 120 seconds. [162513.517064] Not tainted 5.9.0-rc6-btrfs-next-69 #1 [162513.517365] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [162513.517763] task:fsstress state:D stack: 0 pid:1356196 ppid:1356177 flags:0x00004000 [162513.517780] Call Trace: [162513.517786] __schedule+0x5ce/0xd00 [162513.517789] ? _raw_spin_unlock_irqrestore+0x3c/0x60 [162513.517796] schedule+0x46/0xf0 [162513.517810] wait_current_trans+0xde/0x140 [btrfs] [162513.517814] ? finish_wait+0x90/0x90 [162513.517829] start_transaction+0x37c/0x5f0 [btrfs] [162513.517845] btrfs_attach_transaction_barrier+0x1f/0x50 [btrfs] [162513.517857] btrfs_sync_fs+0x61/0x1c0 [btrfs] [162513.517862] ? __ia32_sys_fdatasync+0x20/0x20 [162513.517865] iterate_supers+0x87/0xf0 [162513.517869] ksys_sync+0x60/0xb0 [162513.517872] __do_sys_sync+0xa/0x10 [162513.517875] do_syscall_64+0x33/0x80 [162513.517878] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [162513.517881] RIP: 0033:0x7f5238f50bd7 [162513.517883] Code: Bad RIP value. [162513.517885] RSP: 002b:00007fff67b978e8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a2 [162513.517887] RAX: ffffffffffffffda RBX: 000055b1fad2c560 RCX: 00007f5238f50bd7 [162513.517889] RDX: 0000000000000000 RSI: 000000007660add2 RDI: 0000000000000053 [162513.517891] RBP: 0000000000000032 R08: 0000000000000067 R09: 00007f5239019be0 [162513.517893] R10: fffffffffffff24f R11: 0000000000000206 R12: 0000000000000053 [162513.517895] R13: 00007fff67b97950 R14: 00007fff67b97906 R15: 000055b1fad1a340 [162513.517908] INFO: task fsstress:1356197 blocked for more than 120 seconds. [162513.518298] Not tainted 5.9.0-rc6-btrfs-next-69 #1 [162513.518672] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [162513.519157] task:fsstress state:D stack: 0 pid:1356197 ppid:1356177 flags:0x00000000 [162513.519160] Call Trace: [162513.519165] __schedule+0x5ce/0xd00 [162513.519168] ? _raw_spin_unlock_irqrestore+0x3c/0x60 [162513.519174] schedule+0x46/0xf0 [162513.519190] wait_current_trans+0xde/0x140 [btrfs] [162513.519193] ? finish_wait+0x90/0x90 [162513.519206] start_transaction+0x4d7/0x5f0 [btrfs] [162513.519222] btrfs_create+0x57/0x200 [btrfs] [162513.519230] lookup_open+0x522/0x650 [162513.519246] path_openat+0x2b8/0xa50 [162513.519270] do_filp_open+0x91/0x100 [162513.519275] ? find_held_lock+0x32/0x90 [162513.519280] ? lock_acquired+0x33b/0x470 [162513.519285] ? do_raw_spin_unlock+0x4b/0xc0 [162513.519287] ? _raw_spin_unlock+0x29/0x40 [162513.519295] do_sys_openat2+0x20d/0x2d0 [162513.519300] do_sys_open+0x44/0x80 [162513.519304] do_syscall_64+0x33/0x80 [162513.519307] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [162513.519309] RIP: 0033:0x7f5238f4a903 [162513.519310] Code: Bad RIP value. [162513.519312] RSP: 002b:00007fff67b97758 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [162513.519314] RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00007f5238f4a903 [162513.519316] RDX: 0000000000000000 RSI: 00000000000001b6 RDI: 000055b1fbb0d470 [162513.519317] RBP: 00007fff67b978c0 R08: 0000000000000001 R09: 0000000000000002 [162513.519319] R10: 00007fff67b974f7 R11: 0000000000000246 R12: 0000000000000013 [162513.519320] R13: 00000000000001b6 R14: 00007fff67b97906 R15: 000055b1fad1c620 [162513.519332] INFO: task btrfs:1356211 blocked for more than 120 seconds. [162513.519727] Not tainted 5.9.0-rc6-btrfs-next-69 #1 [162513.520115] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [162513.520508] task:btrfs state:D stack: 0 pid:1356211 ppid:1356178 flags:0x00004002 [162513.520511] Call Trace: [162513.520516] __schedule+0x5ce/0xd00 [162513.520519] ? _raw_spin_unlock_irqrestore+0x3c/0x60 [162513.520525] schedule+0x46/0xf0 [162513.520544] btrfs_scrub_pause+0x11f/0x180 [btrfs] [162513.520548] ? finish_wait+0x90/0x90 [162513.520562] btrfs_commit_transaction+0x45a/0xc30 [btrfs] [162513.520574] ? start_transaction+0xe0/0x5f0 [btrfs] [162513.520596] btrfs_dev_replace_finishing+0x6d8/0x711 [btrfs] [162513.520619] btrfs_dev_replace_by_ioctl.cold+0x1cc/0x1fd [btrfs] [162513.520639] btrfs_ioctl+0x2a25/0x36f0 [btrfs] [162513.520643] ? do_sigaction+0xf3/0x240 [162513.520645] ? find_held_lock+0x32/0x90 [162513.520648] ? do_sigaction+0xf3/0x240 [162513.520651] ? lock_acquired+0x33b/0x470 [162513.520655] ? _raw_spin_unlock_irq+0x24/0x50 [162513.520657] ? lockdep_hardirqs_on+0x7d/0x100 [162513.520660] ? _raw_spin_unlock_irq+0x35/0x50 [162513.520662] ? do_sigaction+0xf3/0x240 [162513.520671] ? __x64_sys_ioctl+0x83/0xb0 [162513.520672] __x64_sys_ioctl+0x83/0xb0 [162513.520677] do_syscall_64+0x33/0x80 [162513.520679] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [162513.520681] RIP: 0033:0x7fc3cd307d87 [162513.520682] Code: Bad RIP value. [162513.520684] RSP: 002b:00007ffe30a56bb8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [162513.520686] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fc3cd307d87 [162513.520687] RDX: 00007ffe30a57a30 RSI: 00000000ca289435 RDI: 0000000000000003 [162513.520689] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [162513.520690] R10: 0000000000000008 R11: 0000000000000202 R12: 0000000000000003 [162513.520692] R13: 0000557323a212e0 R14: 00007ffe30a5a520 R15: 0000000000000001 [162513.520703] Showing all locks held in the system: [162513.520712] 1 lock held by khungtaskd/54: [162513.520713] #0: ffffffffb40a91a0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x15/0x197 [162513.520728] 1 lock held by in:imklog/596: [162513.520729] #0: ffff8f3f0d781400 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x4d/0x60 [162513.520782] 1 lock held by btrfs-transacti/1356167: [162513.520784] #0: ffff8f3d810cc848 (&fs_info->transaction_kthread_mutex){+.+.}-{3:3}, at: transaction_kthread+0x4a/0x170 [btrfs] [162513.520798] 1 lock held by btrfs/1356190: [162513.520800] #0: ffff8f3d57644470 (sb_writers#15){.+.+}-{0:0}, at: mnt_want_write_file+0x22/0x60 [162513.520805] 1 lock held by fsstress/1356184: [162513.520806] #0: ffff8f3d576440e8 (&type->s_umount_key#62){++++}-{3:3}, at: iterate_supers+0x6f/0xf0 [162513.520811] 3 locks held by fsstress/1356185: [162513.520812] #0: ffff8f3d57644470 (sb_writers#15){.+.+}-{0:0}, at: mnt_want_write+0x20/0x50 [162513.520815] #1: ffff8f3d80a650b8 (&type->i_mutex_dir_key#10){++++}-{3:3}, at: vfs_setxattr+0x50/0x120 [162513.520820] #2: ffff8f3d57644690 (sb_internal#2){.+.+}-{0:0}, at: start_transaction+0x40e/0x5f0 [btrfs] [162513.520833] 1 lock held by fsstress/1356196: [162513.520834] #0: ffff8f3d576440e8 (&type->s_umount_key#62){++++}-{3:3}, at: iterate_supers+0x6f/0xf0 [162513.520838] 3 locks held by fsstress/1356197: [162513.520839] #0: ffff8f3d57644470 (sb_writers#15){.+.+}-{0:0}, at: mnt_want_write+0x20/0x50 [162513.520843] #1: ffff8f3d506465e8 (&type->i_mutex_dir_key#10){++++}-{3:3}, at: path_openat+0x2a7/0xa50 [162513.520846] #2: ffff8f3d57644690 (sb_internal#2){.+.+}-{0:0}, at: start_transaction+0x40e/0x5f0 [btrfs] [162513.520858] 2 locks held by btrfs/1356211: [162513.520859] #0: ffff8f3d810cde30 (&fs_info->dev_replace.lock_finishing_cancel_unmount){+.+.}-{3:3}, at: btrfs_dev_replace_finishing+0x52/0x711 [btrfs] [162513.520877] #1: ffff8f3d57644690 (sb_internal#2){.+.+}-{0:0}, at: start_transaction+0x40e/0x5f0 [btrfs] This was weird because the stack traces show that a transaction commit, triggered by a device replace operation, is blocking trying to pause any running scrubs but there are no stack traces of blocked tasks doing a scrub. After poking around with drgn, I noticed there was a scrub task that was constantly running and blocking for shorts periods of time: >>> t = find_task(prog, 1356190) >>> prog.stack_trace(t) #0 __schedule+0x5ce/0xcfc #1 schedule+0x46/0xe4 #2 schedule_timeout+0x1df/0x475 #3 btrfs_reada_wait+0xda/0x132 #4 scrub_stripe+0x2a8/0x112f #5 scrub_chunk+0xcd/0x134 #6 scrub_enumerate_chunks+0x29e/0x5ee #7 btrfs_scrub_dev+0x2d5/0x91b #8 btrfs_ioctl+0x7f5/0x36e7 #9 __x64_sys_ioctl+0x83/0xb0 #10 do_syscall_64+0x33/0x77 #11 entry_SYSCALL_64+0x7c/0x156 Which corresponds to: int btrfs_reada_wait(void *handle) { struct reada_control *rc = handle; struct btrfs_fs_info *fs_info = rc->fs_info; while (atomic_read(&rc->elems)) { if (!atomic_read(&fs_info->reada_works_cnt)) reada_start_machine(fs_info); wait_event_timeout(rc->wait, atomic_read(&rc->elems) == 0, (HZ + 9) / 10); } (...) So the counter "rc->elems" was set to 1 and never decreased to 0, causing the scrub task to loop forever in that function. Then I used the following script for drgn to check the readahead requests: $ cat dump_reada.py import sys import drgn from drgn import NULL, Object, cast, container_of, execscript, \ reinterpret, sizeof from drgn.helpers.linux import * mnt_path = b"/home/fdmanana/btrfs-tests/scratch_1" mnt = None for mnt in for_each_mount(prog, dst = mnt_path): pass if mnt is None: sys.stderr.write(f'Error: mount point {mnt_path} not found\n') sys.exit(1) fs_info = cast('struct btrfs_fs_info *', mnt.mnt.mnt_sb.s_fs_info) def dump_re(re): nzones = re.nzones.value_() print(f're at {hex(re.value_())}') print(f'\t logical {re.logical.value_()}') print(f'\t refcnt {re.refcnt.value_()}') print(f'\t nzones {nzones}') for i in range(nzones): dev = re.zones[i].device name = dev.name.str.string_() print(f'\t\t dev id {dev.devid.value_()} name {name}') print() for _, e in radix_tree_for_each(fs_info.reada_tree): re = cast('struct reada_extent *', e) dump_re(re) $ drgn dump_reada.py re at 0xffff8f3da9d25ad8 logical 38928384 refcnt 1 nzones 1 dev id 0 name b'/dev/sdd' $ So there was one readahead extent with a single zone corresponding to the source device of that last device replace operation logged in dmesg/syslog. Also the ID of that zone's device was 0 which is a special value set in the source device of a device replace operation when the operation finishes (constant BTRFS_DEV_REPLACE_DEVID set at btrfs_dev_replace_finishing()), confirming again that device /dev/sdd was the source of a device replace operation. Normally there should be as many zones in the readahead extent as there are devices, and I wasn't expecting the extent to be in a block group with a 'single' profile, so I went and confirmed with the following drgn script that there weren't any single profile block groups: $ cat dump_block_groups.py import sys import drgn from drgn import NULL, Object, cast, container_of, execscript, \ reinterpret, sizeof from drgn.helpers.linux import * mnt_path = b"/home/fdmanana/btrfs-tests/scratch_1" mnt = None for mnt in for_each_mount(prog, dst = mnt_path): pass if mnt is None: sys.stderr.write(f'Error: mount point {mnt_path} not found\n') sys.exit(1) fs_info = cast('struct btrfs_fs_info *', mnt.mnt.mnt_sb.s_fs_info) BTRFS_BLOCK_GROUP_DATA = (1 << 0) BTRFS_BLOCK_GROUP_SYSTEM = (1 << 1) BTRFS_BLOCK_GROUP_METADATA = (1 << 2) BTRFS_BLOCK_GROUP_RAID0 = (1 << 3) BTRFS_BLOCK_GROUP_RAID1 = (1 << 4) BTRFS_BLOCK_GROUP_DUP = (1 << 5) BTRFS_BLOCK_GROUP_RAID10 = (1 << 6) BTRFS_BLOCK_GROUP_RAID5 = (1 << 7) BTRFS_BLOCK_GROUP_RAID6 = (1 << 8) BTRFS_BLOCK_GROUP_RAID1C3 = (1 << 9) BTRFS_BLOCK_GROUP_RAID1C4 = (1 << 10) def bg_flags_string(bg): flags = bg.flags.value_() ret = '' if flags & BTRFS_BLOCK_GROUP_DATA: ret = 'data' if flags & BTRFS_BLOCK_GROUP_METADATA: if len(ret) > 0: ret += '|' ret += 'meta' if flags & BTRFS_BLOCK_GROUP_SYSTEM: if len(ret) > 0: ret += '|' ret += 'system' if flags & BTRFS_BLOCK_GROUP_RAID0: ret += ' raid0' elif flags & BTRFS_BLOCK_GROUP_RAID1: ret += ' raid1' elif flags & BTRFS_BLOCK_GROUP_DUP: ret += ' dup' elif flags & BTRFS_BLOCK_GROUP_RAID10: ret += ' raid10' elif flags & BTRFS_BLOCK_GROUP_RAID5: ret += ' raid5' elif flags & BTRFS_BLOCK_GROUP_RAID6: ret += ' raid6' elif flags & BTRFS_BLOCK_GROUP_RAID1C3: ret += ' raid1c3' elif flags & BTRFS_BLOCK_GROUP_RAID1C4: ret += ' raid1c4' else: ret += ' single' return ret def dump_bg(bg): print() print(f'block group at {hex(bg.value_())}') print(f'\t start {bg.start.value_()} length {bg.length.value_()}') print(f'\t flags {bg.flags.value_()} - {bg_flags_string(bg)}') bg_root = fs_info.block_group_cache_tree.address_of_() for bg in rbtree_inorder_for_each_entry('struct btrfs_block_group', bg_root, 'cache_node'): dump_bg(bg) $ drgn dump_block_groups.py block group at 0xffff8f3d673b0400 start 22020096 length 16777216 flags 258 - system raid6 block group at 0xffff8f3d53ddb400 start 38797312 length 536870912 flags 260 - meta raid6 block group at 0xffff8f3d5f4d9c00 start 575668224 length 2147483648 flags 257 - data raid6 block group at 0xffff8f3d08189000 start 2723151872 length 67108864 flags 258 - system raid6 block group at 0xffff8f3db70ff000 start 2790260736 length 1073741824 flags 260 - meta raid6 block group at 0xffff8f3d5f4dd800 start 3864002560 length 67108864 flags 258 - system raid6 block group at 0xffff8f3d67037000 start 3931111424 length 2147483648 flags 257 - data raid6 $ So there were only 2 reasons left for having a readahead extent with a single zone: reada_find_zone(), called when creating a readahead extent, returned NULL either because we failed to find the corresponding block group or because a memory allocation failed. With some additional and custom tracing I figured out that on every further ocurrence of the problem the block group had just been deleted when we were looping to create the zones for the readahead extent (at reada_find_extent()), so we ended up with only one zone in the readahead extent, corresponding to a device that ends up getting replaced. So after figuring that out it became obvious why the hang happens: 1) Task A starts a scrub on any device of the filesystem, except for device /dev/sdd; 2) Task B starts a device replace with /dev/sdd as the source device; 3) Task A calls btrfs_reada_add() from scrub_stripe() and it is currently starting to scrub a stripe from block group X. This call to btrfs_reada_add() is the one for the extent tree. When btrfs_reada_add() calls reada_add_block(), it passes the logical address of the extent tree's root node as its 'logical' argument - a value of 38928384; 4) Task A then enters reada_find_extent(), called from reada_add_block(). It finds there isn't any existing readahead extent for the logical address 38928384, so it proceeds to the path of creating a new one. It calls btrfs_map_block() to find out which stripes exist for the block group X. On the first iteration of the for loop that iterates over the stripes, it finds the stripe for device /dev/sdd, so it creates one zone for that device and adds it to the readahead extent. Before getting into the second iteration of the loop, the cleanup kthread deletes block group X because it was empty. So in the iterations for the remaining stripes it does not add more zones to the readahead extent, because the calls to reada_find_zone() returned NULL because they couldn't find block group X anymore. As a result the new readahead extent has a single zone, corresponding to the device /dev/sdd; 4) Before task A returns to btrfs_reada_add() and queues the readahead job for the readahead work queue, task B finishes the device replace and at btrfs_dev_replace_finishing() swaps the device /dev/sdd with the new device /dev/sdg; 5) Task A returns to reada_add_block(), which increments the counter "->elems" of the reada_control structure allocated at btrfs_reada_add(). Then it returns back to btrfs_reada_add() and calls reada_start_machine(). This queues a job in the readahead work queue to run the function reada_start_machine_worker(), which calls __reada_start_machine(). At __reada_start_machine() we take the device list mutex and for each device found in the current device list, we call reada_start_machine_dev() to start the readahead work. However at this point the device /dev/sdd was already freed and is not in the device list anymore. This means the corresponding readahead for the extent at 38928384 is never started, and therefore the "->elems" counter of the reada_control structure allocated at btrfs_reada_add() never goes down to 0, causing the call to btrfs_reada_wait(), done by the scrub task, to wait forever. Note that the readahead request can be made either after the device replace started or before it started, however in pratice it is very unlikely that a device replace is able to start after a readahead request is made and is able to complete before the readahead request completes - maybe only on a very small and nearly empty filesystem. This hang however is not the only problem we can have with readahead and device removals. When the readahead extent has other zones other than the one corresponding to the device that is being removed (either by a device replace or a device remove operation), we risk having a use-after-free on the device when dropping the last reference of the readahead extent. For example if we create a readahead extent with two zones, one for the device /dev/sdd and one for the device /dev/sde: 1) Before the readahead worker starts, the device /dev/sdd is removed, and the corresponding btrfs_device structure is freed. However the readahead extent still has the zone pointing to the device structure; 2) When the readahead worker starts, it only finds device /dev/sde in the current device list of the filesystem; 3) It starts the readahead work, at reada_start_machine_dev(), using the device /dev/sde; 4) Then when it finishes reading the extent from device /dev/sde, it calls __readahead_hook() which ends up dropping the last reference on the readahead extent through the last call to reada_extent_put(); 5) At reada_extent_put() it iterates over each zone of the readahead extent and attempts to delete an element from the device's 'reada_extents' radix tree, resulting in a use-after-free, as the device pointer of the zone for /dev/sdd is now stale. We can also access the device after dropping the last reference of a zone, through reada_zone_release(), also called by reada_extent_put(). And a device remove suffers the same problem, however since it shrinks the device size down to zero before removing the device, it is very unlikely to still have readahead requests not completed by the time we free the device, the only possibility is if the device has a very little space allocated. While the hang problem is exclusive to scrub, since it is currently the only user of btrfs_reada_add() and btrfs_reada_wait(), the use-after-free problem affects any path that triggers readhead, which includes btree_readahead_hook() and __readahead_hook() (a readahead worker can trigger readahed for the children of a node) for example - any path that ends up calling reada_add_block() can trigger the use-after-free after a device is removed. So fix this by waiting for any readahead requests for a device to complete before removing a device, ensuring that while waiting for existing ones no new ones can be made. This problem has been around for a very long time - the readahead code was added in 2011, device remove exists since 2008 and device replace was introduced in 2013, hard to pick a specific commit for a git Fixes tag. 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 commit 83bc1560e02e25c6439341352024ebe8488f4fbd Author: Filipe Manana Date: Mon Oct 12 11:55:23 2020 +0100 btrfs: fix use-after-free on readahead extent after failure to create it If we fail to find suitable zones for a new readahead extent, we end up leaving a stale pointer in the global readahead extents radix tree (fs_info->reada_tree), which can trigger the following trace later on: [13367.696354] BUG: kernel NULL pointer dereference, address: 00000000000000b0 [13367.696802] #PF: supervisor read access in kernel mode [13367.697249] #PF: error_code(0x0000) - not-present page [13367.697721] PGD 0 P4D 0 [13367.698171] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI [13367.698632] CPU: 6 PID: 851214 Comm: btrfs Tainted: G W 5.9.0-rc6-btrfs-next-69 #1 [13367.699100] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [13367.700069] RIP: 0010:__lock_acquire+0x20a/0x3970 [13367.700562] Code: ff 1f 0f b7 c0 48 0f (...) [13367.701609] RSP: 0018:ffffb14448f57790 EFLAGS: 00010046 [13367.702140] RAX: 0000000000000000 RBX: 29b935140c15e8cf RCX: 0000000000000000 [13367.702698] RDX: 0000000000000002 RSI: ffffffffb3d66bd0 RDI: 0000000000000046 [13367.703240] RBP: ffff8a52ba8ac040 R08: 00000c2866ad9288 R09: 0000000000000001 [13367.703783] R10: 0000000000000001 R11: 00000000b66d9b53 R12: ffff8a52ba8ac9b0 [13367.704330] R13: 0000000000000000 R14: ffff8a532b6333e8 R15: 0000000000000000 [13367.704880] FS: 00007fe1df6b5700(0000) GS:ffff8a5376600000(0000) knlGS:0000000000000000 [13367.705438] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [13367.705995] CR2: 00000000000000b0 CR3: 000000022cca8004 CR4: 00000000003706e0 [13367.706565] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [13367.707127] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [13367.707686] Call Trace: [13367.708246] ? ___slab_alloc+0x395/0x740 [13367.708820] ? reada_add_block+0xae/0xee0 [btrfs] [13367.709383] lock_acquire+0xb1/0x480 [13367.709955] ? reada_add_block+0xe0/0xee0 [btrfs] [13367.710537] ? reada_add_block+0xae/0xee0 [btrfs] [13367.711097] ? rcu_read_lock_sched_held+0x5d/0x90 [13367.711659] ? kmem_cache_alloc_trace+0x8d2/0x990 [13367.712221] ? lock_acquired+0x33b/0x470 [13367.712784] _raw_spin_lock+0x34/0x80 [13367.713356] ? reada_add_block+0xe0/0xee0 [btrfs] [13367.713966] reada_add_block+0xe0/0xee0 [btrfs] [13367.714529] ? btrfs_root_node+0x15/0x1f0 [btrfs] [13367.715077] btrfs_reada_add+0x117/0x170 [btrfs] [13367.715620] scrub_stripe+0x21e/0x10d0 [btrfs] [13367.716141] ? kvm_sched_clock_read+0x5/0x10 [13367.716657] ? __lock_acquire+0x41e/0x3970 [13367.717184] ? scrub_chunk+0x60/0x140 [btrfs] [13367.717697] ? find_held_lock+0x32/0x90 [13367.718254] ? scrub_chunk+0x60/0x140 [btrfs] [13367.718773] ? lock_acquired+0x33b/0x470 [13367.719278] ? scrub_chunk+0xcd/0x140 [btrfs] [13367.719786] scrub_chunk+0xcd/0x140 [btrfs] [13367.720291] scrub_enumerate_chunks+0x270/0x5c0 [btrfs] [13367.720787] ? finish_wait+0x90/0x90 [13367.721281] btrfs_scrub_dev+0x1ee/0x620 [btrfs] [13367.721762] ? rcu_read_lock_any_held+0x8e/0xb0 [13367.722235] ? preempt_count_add+0x49/0xa0 [13367.722710] ? __sb_start_write+0x19b/0x290 [13367.723192] btrfs_ioctl+0x7f5/0x36f0 [btrfs] [13367.723660] ? __fget_files+0x101/0x1d0 [13367.724118] ? find_held_lock+0x32/0x90 [13367.724559] ? __fget_files+0x101/0x1d0 [13367.724982] ? __x64_sys_ioctl+0x83/0xb0 [13367.725399] __x64_sys_ioctl+0x83/0xb0 [13367.725802] do_syscall_64+0x33/0x80 [13367.726188] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [13367.726574] RIP: 0033:0x7fe1df7add87 [13367.726948] Code: 00 00 00 48 8b 05 09 91 (...) [13367.727763] RSP: 002b:00007fe1df6b4d48 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [13367.728179] RAX: ffffffffffffffda RBX: 000055ce1fb596a0 RCX: 00007fe1df7add87 [13367.728604] RDX: 000055ce1fb596a0 RSI: 00000000c400941b RDI: 0000000000000003 [13367.729021] RBP: 0000000000000000 R08: 00007fe1df6b5700 R09: 0000000000000000 [13367.729431] R10: 00007fe1df6b5700 R11: 0000000000000246 R12: 00007ffd922b07de [13367.729842] R13: 00007ffd922b07df R14: 00007fe1df6b4e40 R15: 0000000000802000 [13367.730275] Modules linked in: btrfs blake2b_generic xor (...) [13367.732638] CR2: 00000000000000b0 [13367.733166] ---[ end trace d298b6805556acd9 ]--- What happens is the following: 1) At reada_find_extent() we don't find any existing readahead extent for the metadata extent starting at logical address X; 2) So we proceed to create a new one. We then call btrfs_map_block() to get information about which stripes contain extent X; 3) After that we iterate over the stripes and create only one zone for the readahead extent - only one because reada_find_zone() returned NULL for all iterations except for one, either because a memory allocation failed or it couldn't find the block group of the extent (it may have just been deleted); 4) We then add the new readahead extent to the readahead extents radix tree at fs_info->reada_tree; 5) Then we iterate over each zone of the new readahead extent, and find that the device used for that zone no longer exists, because it was removed or it was the source device of a device replace operation. Since this left 'have_zone' set to 0, after finishing the loop we jump to the 'error' label, call kfree() on the new readahead extent and return without removing it from the radix tree at fs_info->reada_tree; 6) Any future call to reada_find_extent() for the logical address X will find the stale pointer in the readahead extents radix tree, increment its reference counter, which can trigger the use-after-free right away or return it to the caller reada_add_block() that results in the use-after-free of the example trace above. So fix this by making sure we delete the readahead extent from the radix tree if we fail to setup zones for it (when 'have_zone = 0'). Fixes: 319450211842ba ("btrfs: reada: bypass adding extent when all zone failed") CC: stable@vger.kernel.org # 4.9+ Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 85d07fbe09efd1c529ff3e025e2f0d2c6c96a1b7 Author: Daniel Xu Date: Thu Oct 8 18:09:10 2020 -0700 btrfs: tree-checker: validate number of chunk stripes and parity If there's no parity and num_stripes < ncopies, a crafted image can trigger a division by zero in calc_stripe_length(). The image was generated through fuzzing. CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Qu Wenruo Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=209587 Signed-off-by: Daniel Xu Signed-off-by: David Sterba commit cad69d139651423b9cb8917f514740ed3f08b10a Author: Pujin Shi Date: Wed Oct 14 11:24:19 2020 +0800 btrfs: tree-checker: fix incorrect printk format This patch addresses a compile warning: fs/btrfs/extent-tree.c: In function '__btrfs_free_extent': fs/btrfs/extent-tree.c:3187:4: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'unsigned int' [-Wformat=] Fixes: 1c2a07f598d5 ("btrfs: extent-tree: kill BUG_ON() in __btrfs_free_extent()") Reviewed-by: Filipe Manana Signed-off-by: Pujin Shi Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7837fa88704a66257404bb14144c9e4ab631a28a Author: Josef Bacik Date: Wed Oct 14 17:00:51 2020 -0400 btrfs: drop the path before adding block group sysfs files Dave reported a problem with my rwsem conversion patch where we got the following lockdep splat: ====================================================== WARNING: possible circular locking dependency detected 5.9.0-default+ #1297 Not tainted ------------------------------------------------------ kswapd0/76 is trying to acquire lock: ffff9d5d25df2530 (&delayed_node->mutex){+.+.}-{3:3}, at: __btrfs_release_delayed_node.part.0+0x3f/0x320 [btrfs] but task is already holding lock: ffffffffa40cbba0 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x5/0x30 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (fs_reclaim){+.+.}-{0:0}: __lock_acquire+0x582/0xac0 lock_acquire+0xca/0x430 fs_reclaim_acquire.part.0+0x25/0x30 kmem_cache_alloc+0x30/0x9c0 alloc_inode+0x81/0x90 iget_locked+0xcd/0x1a0 kernfs_get_inode+0x1b/0x130 kernfs_get_tree+0x136/0x210 sysfs_get_tree+0x1a/0x50 vfs_get_tree+0x1d/0xb0 path_mount+0x70f/0xa80 do_mount+0x75/0x90 __x64_sys_mount+0x8e/0xd0 do_syscall_64+0x2d/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #3 (kernfs_mutex){+.+.}-{3:3}: __lock_acquire+0x582/0xac0 lock_acquire+0xca/0x430 __mutex_lock+0xa0/0xaf0 kernfs_add_one+0x23/0x150 kernfs_create_dir_ns+0x58/0x80 sysfs_create_dir_ns+0x70/0xd0 kobject_add_internal+0xbb/0x2d0 kobject_add+0x7a/0xd0 btrfs_sysfs_add_block_group_type+0x141/0x1d0 [btrfs] btrfs_read_block_groups+0x1f1/0x8c0 [btrfs] open_ctree+0x981/0x1108 [btrfs] btrfs_mount_root.cold+0xe/0xb0 [btrfs] legacy_get_tree+0x2d/0x60 vfs_get_tree+0x1d/0xb0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 btrfs_mount+0x13b/0x3e0 [btrfs] legacy_get_tree+0x2d/0x60 vfs_get_tree+0x1d/0xb0 path_mount+0x70f/0xa80 do_mount+0x75/0x90 __x64_sys_mount+0x8e/0xd0 do_syscall_64+0x2d/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #2 (btrfs-extent-00){++++}-{3:3}: __lock_acquire+0x582/0xac0 lock_acquire+0xca/0x430 down_read_nested+0x45/0x220 __btrfs_tree_read_lock+0x35/0x1c0 [btrfs] __btrfs_read_lock_root_node+0x3a/0x50 [btrfs] btrfs_search_slot+0x6d4/0xfd0 [btrfs] check_committed_ref+0x69/0x200 [btrfs] btrfs_cross_ref_exist+0x65/0xb0 [btrfs] run_delalloc_nocow+0x446/0x9b0 [btrfs] btrfs_run_delalloc_range+0x61/0x6a0 [btrfs] writepage_delalloc+0xae/0x160 [btrfs] __extent_writepage+0x262/0x420 [btrfs] extent_write_cache_pages+0x2b6/0x510 [btrfs] extent_writepages+0x43/0x90 [btrfs] do_writepages+0x40/0xe0 __writeback_single_inode+0x62/0x610 writeback_sb_inodes+0x20f/0x500 wb_writeback+0xef/0x4a0 wb_do_writeback+0x49/0x2e0 wb_workfn+0x81/0x340 process_one_work+0x233/0x5d0 worker_thread+0x50/0x3b0 kthread+0x137/0x150 ret_from_fork+0x1f/0x30 -> #1 (btrfs-fs-00){++++}-{3:3}: __lock_acquire+0x582/0xac0 lock_acquire+0xca/0x430 down_read_nested+0x45/0x220 __btrfs_tree_read_lock+0x35/0x1c0 [btrfs] __btrfs_read_lock_root_node+0x3a/0x50 [btrfs] btrfs_search_slot+0x6d4/0xfd0 [btrfs] btrfs_lookup_inode+0x3a/0xc0 [btrfs] __btrfs_update_delayed_inode+0x93/0x2c0 [btrfs] __btrfs_commit_inode_delayed_items+0x7de/0x850 [btrfs] __btrfs_run_delayed_items+0x8e/0x140 [btrfs] btrfs_commit_transaction+0x367/0xbc0 [btrfs] btrfs_mksubvol+0x2db/0x470 [btrfs] btrfs_mksnapshot+0x7b/0xb0 [btrfs] __btrfs_ioctl_snap_create+0x16f/0x1a0 [btrfs] btrfs_ioctl_snap_create_v2+0xb0/0xf0 [btrfs] btrfs_ioctl+0xd0b/0x2690 [btrfs] __x64_sys_ioctl+0x6f/0xa0 do_syscall_64+0x2d/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&delayed_node->mutex){+.+.}-{3:3}: check_prev_add+0x91/0xc60 validate_chain+0xa6e/0x2a20 __lock_acquire+0x582/0xac0 lock_acquire+0xca/0x430 __mutex_lock+0xa0/0xaf0 __btrfs_release_delayed_node.part.0+0x3f/0x320 [btrfs] btrfs_evict_inode+0x3cc/0x560 [btrfs] evict+0xd6/0x1c0 dispose_list+0x48/0x70 prune_icache_sb+0x54/0x80 super_cache_scan+0x121/0x1a0 do_shrink_slab+0x16d/0x3b0 shrink_slab+0xb1/0x2e0 shrink_node+0x230/0x6a0 balance_pgdat+0x325/0x750 kswapd+0x206/0x4d0 kthread+0x137/0x150 ret_from_fork+0x1f/0x30 other info that might help us debug this: Chain exists of: &delayed_node->mutex --> kernfs_mutex --> fs_reclaim Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(kernfs_mutex); lock(fs_reclaim); lock(&delayed_node->mutex); *** DEADLOCK *** 3 locks held by kswapd0/76: #0: ffffffffa40cbba0 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x5/0x30 #1: ffffffffa40b8b58 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x54/0x2e0 #2: ffff9d5d322390e8 (&type->s_umount_key#26){++++}-{3:3}, at: trylock_super+0x16/0x50 stack backtrace: CPU: 2 PID: 76 Comm: kswapd0 Not tainted 5.9.0-default+ #1297 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014 Call Trace: dump_stack+0x77/0x97 check_noncircular+0xff/0x110 ? save_trace+0x50/0x470 check_prev_add+0x91/0xc60 validate_chain+0xa6e/0x2a20 ? save_trace+0x50/0x470 __lock_acquire+0x582/0xac0 lock_acquire+0xca/0x430 ? __btrfs_release_delayed_node.part.0+0x3f/0x320 [btrfs] __mutex_lock+0xa0/0xaf0 ? __btrfs_release_delayed_node.part.0+0x3f/0x320 [btrfs] ? __lock_acquire+0x582/0xac0 ? __btrfs_release_delayed_node.part.0+0x3f/0x320 [btrfs] ? btrfs_evict_inode+0x30b/0x560 [btrfs] ? __btrfs_release_delayed_node.part.0+0x3f/0x320 [btrfs] __btrfs_release_delayed_node.part.0+0x3f/0x320 [btrfs] btrfs_evict_inode+0x3cc/0x560 [btrfs] evict+0xd6/0x1c0 dispose_list+0x48/0x70 prune_icache_sb+0x54/0x80 super_cache_scan+0x121/0x1a0 do_shrink_slab+0x16d/0x3b0 shrink_slab+0xb1/0x2e0 shrink_node+0x230/0x6a0 balance_pgdat+0x325/0x750 kswapd+0x206/0x4d0 ? finish_wait+0x90/0x90 ? balance_pgdat+0x750/0x750 kthread+0x137/0x150 ? kthread_mod_delayed_work+0xc0/0xc0 ret_from_fork+0x1f/0x30 This happens because we are still holding the path open when we start adding the sysfs files for the block groups, which creates a dependency on fs_reclaim via the tree lock. Fix this by dropping the path before we start doing anything with sysfs. Reported-by: David Sterba CC: stable@vger.kernel.org # 5.8+ Reviewed-by: Anand Jain Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit f255c19b3ab46d3cad3b1b2e1036f4c926cb1d0c Author: Gabriel Krisman Bertazi Date: Thu Oct 22 16:58:42 2020 -0400 blk-cgroup: Pre-allocate tree node on blkg_conf_prep Similarly to commit 457e490f2b741 ("blkcg: allocate struct blkcg_gq outside request queue spinlock"), blkg_create can also trigger occasional -ENOMEM failures at the radix insertion because any allocation inside blkg_create has to be non-blocking, making it more likely to fail. This causes trouble for userspace tools trying to configure io weights who need to deal with this condition. This patch reduces the occurrence of -ENOMEMs on this path by preloading the radix tree element on a GFP_KERNEL context, such that we guarantee the later non-blocking insertion won't fail. A similar solution exists in blkcg_init_queue for the same situation. Acked-by: Tejun Heo Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Jens Axboe commit 52abfcbd57eefdd54737fc8c2dc79d8f46d4a3e5 Author: Gabriel Krisman Bertazi Date: Thu Oct 22 16:58:41 2020 -0400 blk-cgroup: Fix memleak on error path If new_blkg allocation raced with blk_policy change and blkg_lookup_check fails, new_blkg is leaked. Acked-by: Tejun Heo Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Jens Axboe commit 8e90b4b1305a80b1d7712370a163eff269ac1ba2 Author: Vasily Gorbik Date: Mon Oct 26 10:52:26 2020 +0100 s390: correct __bootdata / __bootdata_preserved macros Currently s390 build is broken. SECTCMP .boot.data error: section .boot.data differs between vmlinux and arch/s390/boot/compressed/vmlinux make[2]: *** [arch/s390/boot/section_cmp.boot.data] Error 1 SECTCMP .boot.preserved.data error: section .boot.preserved.data differs between vmlinux and arch/s390/boot/compressed/vmlinux make[2]: *** [arch/s390/boot/section_cmp.boot.preserved.data] Error 1 make[1]: *** [bzImage] Error 2 Commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo) to __section("foo")") converted all __section(foo) to __section("foo"). This is wrong for __bootdata / __bootdata_preserved macros which want variable names to be a part of intermediate section names .boot.data. and .boot.preserved.data.. Those sections are later sorted by alignment + name and merged together into final .boot.data / .boot.preserved.data sections. Those sections must be identical in the decompressor and the decompressed kernel (that is checked during the build). Fixes: 33def8498fdd ("treewide: Convert macro and uses of __section(foo) to __section("foo")") Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 0fa97e9403c767a4af63cfb5a3badbbe69426085 Author: Nathan Chancellor Date: Mon Oct 19 18:14:07 2020 -0700 arm64: vdso32: Allow ld.lld to properly link the VDSO As it stands now, the vdso32 Makefile hardcodes the linker to ld.bfd using -fuse-ld=bfd with $(CC). This was taken from the arm vDSO Makefile, as the comment notes, done in commit d2b30cd4b722 ("ARM: 8384/1: VDSO: force use of BFD linker"). Commit fe00e50b2db8 ("ARM: 8858/1: vdso: use $(LD) instead of $(CC) to link VDSO") changed that Makefile to use $(LD) directly instead of through $(CC), which matches how the rest of the kernel operates. Since then, LD=ld.lld means that the arm vDSO will be linked with ld.lld, which has shown no problems so far. Allow ld.lld to link this vDSO as we do the regular arm vDSO. To do this, we need to do a few things: * Add a LD_COMPAT variable, which defaults to $(CROSS_COMPILE_COMPAT)ld with gcc and $(LD) if LLVM is 1, which will be ld.lld, or $(CROSS_COMPILE_COMPAT)ld if not, which matches the logic of the main Makefile. It is overrideable for further customization and avoiding breakage. * Eliminate cc32-ldoption, which matches commit 055efab3120b ("kbuild: drop support for cc-ldoption"). With those, we can use $(LD_COMPAT) in cmd_ldvdso and change the flags from compiler linker flags to linker flags directly. We eliminate -mfloat-abi=soft because it is not handled by the linker. Reported-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Tested-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Reviewed-by: Vincenzo Frascino Link: https://github.com/ClangBuiltLinux/linux/issues/1033 Link: https://lore.kernel.org/r/20201020011406.1818918-1-natechancellor@gmail.com Signed-off-by: Will Deacon commit 926e97852eaf1394c01c2adb77d33b3d32f492de Merge: 9774dd6853557 b9ceca6be4323 Author: Arnd Bergmann Date: Mon Oct 26 12:40:02 2020 +0100 Merge tag 'scmi-fixes-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes ARM SCMI fixes for v5.10 Handful of fixes, some of them fixing issues since SCMI was merged. It indicates that it is getting used now and people are finding bugs. Fixes include unblocking multiple thread access with SMC/HVC transport, ARCH_COLD_RESET value, locking in notifications, avoiding workqueue name duplication with multiple instances of SCMI and adding missing Rx size initialisation when using buffers for repeat transmits. * tag 'scmi-fixes-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Fix duplicate workqueue name firmware: arm_scmi: Fix locking in notifications firmware: arm_scmi: Add missing Rx size re-initialisation firmware: arm_scmi: Expand SMC/HVC message pool to more than one firmware: arm_scmi: Fix ARCH_COLD_RESET Link: https://lore.kernel.org/r/20201015123518.GA3839@bogus Signed-off-by: Arnd Bergmann commit f3c75e7a9349d1d33eb53ddc1b31640994969f73 Author: Andy Shevchenko Date: Wed Oct 14 13:46:38 2020 +0300 pinctrl: intel: Set default bias in case no particular value given When GPIO library asks pin control to set the bias, it doesn't pass any value of it and argument is considered boolean (and this is true for ACPI GpioIo() / GpioInt() resources, by the way). Thus, individual drivers must behave well, when they got the resistance value of 1 Ohm, i.e. transforming it to sane default. In case of Intel pin control hardware the 5 kOhm sounds plausible because on one hand it's a minimum of resistors present in all hardware generations and at the same time it's high enough to minimize leakage current (will be only 200 uA with the above choice). Fixes: e57725eabf87 ("pinctrl: intel: Add support for hardware debouncer") Reported-by: Jamie McClymont Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit dd26209bc56886cacdbd828571e54a6bca251e55 Author: Andy Shevchenko Date: Wed Oct 14 13:46:37 2020 +0300 pinctrl: intel: Fix 2 kOhm bias which is 833 Ohm 2 kOhm bias was never an option in Intel GPIO hardware, the available matrix is: 000 none 001 1 kOhm (if available) 010 5 kOhm 100 20 kOhm As easy to get the 3 resistors are gated separately and according to parallel circuits calculations we may get combinations of the above where the result is always strictly less than minimal resistance. Hence, additional values can be: 011 ~833.3 Ohm 101 ~952.4 Ohm 110 ~4 kOhm 111 ~800 Ohm That said, convert TERM definitions to be the bit masks to reflect the above. While at it, enable the same setting for pull down case. Fixes: 7981c0015af2 ("pinctrl: intel: Add Intel Sunrisepoint pin controller and GPIO support") Cc: Jamie McClymont Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 1a9a8910b2153cd3c4f3f2f8defcb853ead3b1fd Author: Chen-Yu Tsai Date: Sun Oct 25 00:25:15 2020 +0800 arm64: dts: allwinner: a64: bananapi-m64: Enable RGMII RX/TX delay on PHY The Ethernet PHY on the Bananapi M64 has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins. Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"). Fixes: e7295499903d ("arm64: allwinner: bananapi-m64: Enable dwmac-sun8i") Fixes: 94f442886711 ("arm64: dts: allwinner: A64: Restore EMAC changes") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Tested-by: Corentin Labbe Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201024162515.30032-10-wens@kernel.org commit 2bd8570d20c88909b8be3251727a26476b02652c Author: Chen-Yu Tsai Date: Sun Oct 25 00:25:14 2020 +0800 arm64: dts: allwinner: h5: libretech-all-h5-cc: Enable RGMII RX/TX delay on PHY The Ethernet PHY on the Libre Computer ALL-H5-CC has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins. Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"). Fixes: 60d0426d7603 ("arm64: dts: allwinner: h5: Add Libre Computer ALL-H5-CC H5 board") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201024162515.30032-9-wens@kernel.org commit 3914160ffc0bf762d6d605d4b27036b7b89367ea Author: Chen-Yu Tsai Date: Sun Oct 25 00:25:13 2020 +0800 ARM: dts: sunxi: bananapi-m2-plus: Enable RGMII RX/TX delay on Ethernet PHY The Ethernet PHY on the Bananapi M2+ has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins. Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"). Fixes: 8c7ba536e709 ("ARM: sun8i: bananapi-m2-plus: Enable dwmac-sun8i") Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)") Fixes: aa8fee415f46 ("ARM: dts: sun8i: h3: Split out non-SoC-specific parts of Bananapi M2 Plus") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Tested-by: Jernej Skrabec Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201024162515.30032-8-wens@kernel.org commit b1064037e8ecf09d587b7b4966eebe0c362908e5 Author: Chen-Yu Tsai Date: Sun Oct 25 00:25:12 2020 +0800 ARM: dts: sun9i: Enable both RGMII RX/TX delay on Ethernet PHY The Ethernet PHY on the Cubieboard 4 and A80 Optimus have the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins. Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"). Fixes: 98048143b7f8 ("ARM: dts: sun9i: cubieboard4: Enable GMAC") Fixes: bc9bd03a44f9 ("ARM: dts: sun9i: a80-optimus: Enable GMAC") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201024162515.30032-7-wens@kernel.org commit 57dbe558457bf4042169bc1f334e3b53a8480a1c Author: Chen-Yu Tsai Date: Sun Oct 25 00:25:11 2020 +0800 ARM: dts: sun8i: a83t: Enable both RGMII RX/TX delay on Ethernet PHY The Ethernet PHY on the Bananapi M3 and Cubietruck Plus have the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins. Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"). Fixes: 039359948a4b ("ARM: dts: sun8i: a83t: Enable Ethernet on two boards") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201024162515.30032-6-wens@kernel.org commit e080ab31a0aa126b0a7e4f67f2b01b371b852c88 Author: Chen-Yu Tsai Date: Sun Oct 25 00:25:10 2020 +0800 ARM: dts: sun8i: h3: orangepi-plus2e: Enable RGMII RX/TX delay on Ethernet PHY The Ethernet PHY on the Orange Pi Plus 2E has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins. Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"). Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)") Fixes: 7a78ef92cdc5 ("ARM: sun8i: h3: Enable EMAC with external PHY on Orange Pi Plus 2E") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Tested-by: Jernej Skrabec Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201024162515.30032-5-wens@kernel.org commit f94f78bd93f567c022f594589dbeecdf59931365 Author: Chen-Yu Tsai Date: Sun Oct 25 00:25:09 2020 +0800 ARM: dts: sun7i: bananapi-m1-plus: Enable RGMII RX/TX delay on Ethernet PHY The Ethernet PHY on the Bananapi M1+ has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins. Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"). Fixes: 04c85ecad32a ("ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201024162515.30032-4-wens@kernel.org commit 353c3de1303fc93032164402c0eb8550ecd6f154 Author: Chen-Yu Tsai Date: Sun Oct 25 00:25:08 2020 +0800 ARM: dts: sun7i: cubietruck: Enable RGMII RX/TX delay on Ethernet PHY The Ethernet PHY on the Cubietruck has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins. Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"). Fixes: 67073d97672d ("ARM: dts: sun7i: cubietruck: Enable the GMAC") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Tested-by: Emilio López Reviewed-by: Emilio López Link: https://lore.kernel.org/r/20201024162515.30032-3-wens@kernel.org commit e76724153f5b4539802cc21b2c6131058668a1c6 Author: Chen-Yu Tsai Date: Sun Oct 25 00:25:07 2020 +0800 ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY The Ethernet PHY on the A31 Hummingbird has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins. Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"). Fixes: c220aec2bb79 ("ARM: dts: sun6i: Add Merrii A31 Hummingbird support") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201024162515.30032-2-wens@kernel.org commit 8d80e2f00a42ef10b54e1b2d9e97314f8fd046c0 Author: Chen-Yu Tsai Date: Sun Oct 25 00:25:06 2020 +0800 Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" This reverts commit 75ee680cbd2e4d0156b94f9fec50076361ab12f2. Turns out the activity and link LEDs on the RJ45 port are active low, just like on the Orange Pi PC. Revert the commit that says otherwise. Fixes: 75ee680cbd2e ("arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high") Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Tested-by: Jernej Skrabec Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201024162515.30032-1-wens@kernel.org commit b3eec3212e66ece33f69be0de98d54e67834e798 Author: Jernej Skrabec Date: Sun Oct 25 09:19:49 2020 +0100 ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix ethernet node Ethernet PHY on BananaPi M2 Ultra provides RX and TX delays. Fix ethernet node to reflect that fact. Fixes: c36fd5a48bd2 ("ARM: dts: sun8i: r40: bananapi-m2-ultra: Enable GMAC ethernet controller") Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201025081949.783443-1-jernej.skrabec@siol.net commit b34bf9f6a623ddb82600a5ed5c644224122395e1 Author: Jernej Skrabec Date: Fri Oct 23 20:48:58 2020 +0200 arm64: dts: allwinner: h5: OrangePi PC2: Fix ethernet node RX and TX delay are provided by ethernet PHY. Reflect that in ethernet node. Fixes: 44a94c7ef989 ("arm64: dts: allwinner: H5: Restore EMAC changes") Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201023184858.3272918-1-jernej.skrabec@siol.net commit 927f42fcc1b4f7d04a2ac5cf02f25612aa8923a4 Author: Jernej Skrabec Date: Thu Oct 22 23:13:01 2020 +0200 arm64: dts: allwinner: a64: Pine64 Plus: Fix ethernet node According to board schematic, PHY provides both, RX and TX delays. However, according to "fix" Realtek provided for this board, only TX delay should be provided by PHY. Tests show that both variants work but TX only PHY delay works slightly better. Update ethernet node to reflect the fact that PHY provides TX delay. Fixes: 94f442886711 ("arm64: dts: allwinner: A64: Restore EMAC changes") Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201022211301.3548422-1-jernej.skrabec@siol.net commit d7cdff444579e6659459b2fe04340ebb27628d5e Author: Jernej Skrabec Date: Thu Oct 22 20:58:39 2020 +0200 arm64: dts: allwinner: a64: OrangePi Win: Fix ethernet node RX/TX delay on OrangePi Win board is set on PHY. Reflect that in ethernet node. Fixes: 93d6a27cfcc0 ("arm64: dts: allwinner: a64: Orange Pi Win: Add Ethernet node") Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201022185839.2779245-1-jernej.skrabec@siol.net commit 419c65f5000a6c25597ea52488528d75b287cbd0 Author: Corentin Labbe Date: Mon Oct 19 06:34:49 2020 +0000 arm64: dts: allwinner: Pine H64: Enable both RGMII RX/TX delay Since commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"), the network is unusable on PineH64 model A. This is due to phy-mode incorrectly set to rgmii instead of rgmii-id. Fixes: 729e1ffcf47e ("arm64: allwinner: h6: add support for the Ethernet on Pine H64") Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201019063449.33316-1-clabbe@baylibre.com commit 97a38c1c213b162aa577299de698f39c18ba696b Author: Clément Péron Date: Sun Oct 18 19:24:09 2020 +0200 arm64: dts: allwinner: beelink-gs1: Enable both RGMII RX/TX delay Before the commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"), the software overwrite for RX/TX delays of the RTL8211e were not working properly and the Beelink GS1 had both RX/TX delay of RGMII interface set using pull-up on the TXDLY and RXDLY pins. Now that these delays are working properly they overwrite the HW config and set this to 'rgmii' meaning no delay on both RX/TX. This makes the ethernet of this board not working anymore. Set the phy-mode to 'rgmii-id' meaning RGMII with RX/TX delays in the device-tree to keep the correct configuration. Fixes: 089bee8dd119 ("arm64: dts: allwinner: h6: Introduce Beelink GS1 board") Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20201018172409.1754775-1-peron.clem@gmail.com commit a2089ac7f8dc682ef52ed74b52997d36cde76d05 Author: Clément Péron Date: Sun Oct 11 23:15:14 2020 +0200 arm64: dts: allwinner: pinetab: Drop unnecessary address/size-cells information make dtbs_check warm about unknown address/size-cells property in the pinetab device-tree. This is because these information are not necessary. Drop them. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201011211514.155266-1-peron.clem@gmail.com commit fdc24d722f353610b6aad23d99147632a19a6138 Author: Maxime Ripard Date: Fri Oct 9 09:44:23 2020 +0200 MAINTAINERS: Add Jernej Škrabec as a reviewer for Allwinner SoCs support Jernej has helped a lot by reviewing patches recently, so let's make it official. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20201009074423.10708-1-maxime@cerno.tech commit 4230e2deaa484b385aa01d598b2aea8e7f2660a6 Author: Zong Li Date: Wed Oct 21 15:38:39 2020 +0800 stop_machine, rcu: Mark functions as notrace Some architectures assume that the stopped CPUs don't make function calls to traceable functions when they are in the stopped state. See also commit cb9d7fd51d9f ("watchdog: Mark watchdog touch functions as notrace"). Violating this assumption causes kernel crashes when switching tracer on RISC-V. Mark rcu_momentary_dyntick_idle() and stop_machine_yield() notrace to prevent this. Fixes: 4ecf0a43e729 ("processor: get rid of cpu_relax_yield") Fixes: 366237e7b083 ("stop_machine: Provide RCU quiescent state in multi_cpu_stop()") Signed-off-by: Zong Li Signed-off-by: Thomas Gleixner Tested-by: Atish Patra Tested-by: Colin Ian King Acked-by: Steven Rostedt (VMware) Acked-by: Paul E. McKenney Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201021073839.43935-1-zong.li@sifive.com commit cb47755725da7b90fecbb2aa82ac3b24a7adb89b Author: Zeng Tao Date: Tue Sep 1 17:30:13 2020 +0800 time: Prevent undefined behaviour in timespec64_to_ns() UBSAN reports: Undefined behaviour in ./include/linux/time64.h:127:27 signed integer overflow: 17179869187 * 1000000000 cannot be represented in type 'long long int' Call Trace: timespec64_to_ns include/linux/time64.h:127 [inline] set_cpu_itimer+0x65c/0x880 kernel/time/itimer.c:180 do_setitimer+0x8e/0x740 kernel/time/itimer.c:245 __x64_sys_setitimer+0x14c/0x2c0 kernel/time/itimer.c:336 do_syscall_64+0xa1/0x540 arch/x86/entry/common.c:295 Commit bd40a175769d ("y2038: itimer: change implementation to timespec64") replaced the original conversion which handled time clamping correctly with timespec64_to_ns() which has no overflow protection. Fix it in timespec64_to_ns() as this is not necessarily limited to the usage in itimers. [ tglx: Added comment and adjusted the fixes tag ] Fixes: 361a3bf00582 ("time64: Add time64.h header and define struct timespec64") Signed-off-by: Zeng Tao Signed-off-by: Thomas Gleixner Reviewed-by: Arnd Bergmann Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1598952616-6416-1-git-send-email-prime.zeng@hisilicon.com commit 897dbea6b716c0f2c5bcd4ba1eb4d809caba290c Author: Dan Carpenter Date: Mon Oct 26 12:49:05 2020 +0300 drm/v3d: Fix double free in v3d_submit_cl_ioctl() Originally this error path used to leak "bin" but then we accidentally applied two separate commits to fix it and ended up with a double free. Signed-off-by: Dan Carpenter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201026094905.GA1634423@mwanda commit e3190b5e9462067714d267c40d8c8c1d0463dda3 Author: Maxime Ripard Date: Thu Oct 15 11:36:42 2020 +0200 drm/sun4i: frontend: Fix the scaler phase on A33 The A33 has a different phase parameter in the Allwinner BSP on the channel1 than the one currently applied. Fix this. Signed-off-by: Maxime Ripard Acked-by: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20201015093642.261440-3-maxime@cerno.tech commit 2db9ef9d9e6ea89a9feb5338f58d1f8f83875577 Author: Maxime Ripard Date: Thu Oct 15 11:36:41 2020 +0200 drm/sun4i: frontend: Reuse the ch0 phase for RGB formats When using the scaler on the A10-like frontend with single-planar formats, the current code will setup the channel 0 filter (used for the R or Y component) with a different phase parameter than the channel 1 filter (used for the G/B or U/V components). This creates a bleed out that keeps repeating on of the last line of the RGB plane across the rest of the display. The Allwinner BSP either applies the same phase parameter over both channels or use a separate one, the condition being whether the input format is YUV420 or not. Since YUV420 is both subsampled and multi-planar, and since YUYV is subsampled but single-planar, we can rule out the subsampling and assume that the condition is actually whether the format is single or multi-planar. And it looks like applying the same phase parameter over both channels for single-planar formats fixes our issue, while we keep the multi-planar formats working properly. Reported-by: Taras Galchenko Signed-off-by: Maxime Ripard Acked-by: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20201015093642.261440-2-maxime@cerno.tech commit 84c971b356379c621df595bd00c3114579dfa59f Author: Maxime Ripard Date: Thu Oct 15 11:36:40 2020 +0200 drm/sun4i: frontend: Rework a bit the phase data The scaler filter phase setup in the allwinner kernel has two different cases for setting up the scaler filter, the first one using different phase parameters for the two channels, and the second one reusing the first channel parameters on the second channel. The allwinner kernel has a third option where the horizontal phase of the second channel will be set to a different value than the vertical one (and seems like it's the same value than one used on the first channel). However, that code path seems to never be taken, so we can ignore it for now, and it's essentially what we're doing so far as well. Since we will have always the same values across each components of the filter setup for a given channel, we can simplify a bit our frontend structure by only storing the phase value we want to apply to a given channel. Signed-off-by: Maxime Ripard Acked-by: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20201015093642.261440-1-maxime@cerno.tech commit 053703666136b99cc6ab0b6ba31c490994bda2fc Merge: 3650b228f83ad 2580a493a97da Author: Maxime Ripard Date: Mon Oct 26 11:18:18 2020 +0100 Merge remote-tracking branch 'drm-misc/drm-misc-next-fixes' into drm-misc-fixes We have a few leftovers from the merge window period in drm-misc-next-fixes, let's bring them into drm-misc-fixes Signed-off-by: Maxime Ripard commit 9010e3876e1c3f7b1c3769bee519d6a871589aca Author: YueHaibing Date: Wed Sep 9 21:47:49 2020 +0800 timers: Remove unused inline funtion debug_timer_free() There is no caller in tree, remove it. Signed-off-by: YueHaibing Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200909134749.32300-1-yuehaibing@huawei.com commit 5254cb87c0423f73c8036235795788a132e8956e Author: YueHaibing Date: Wed Sep 9 21:48:50 2020 +0800 hrtimer: Remove unused inline function debug_hrtimer_free() There is no caller in tree, remove it. Signed-off-by: YueHaibing Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200909134850.21940-1-yuehaibing@huawei.com commit 4cd2bb12981165f865d2b8ed92b446b52310ef74 Author: Quanyang Wang Date: Tue Sep 29 16:20:27 2020 +0800 time/sched_clock: Mark sched_clock_read_begin/retry() as notrace Since sched_clock_read_begin() and sched_clock_read_retry() are called by notrace function sched_clock(), they shouldn't be traceable either, or else ftrace_graph_caller will run into a dead loop on the path as below (arm for instance): ftrace_graph_caller() prepare_ftrace_return() function_graph_enter() ftrace_push_return_trace() trace_clock_local() sched_clock() sched_clock_read_begin/retry() Fixes: 1b86abc1c645 ("sched_clock: Expose struct clock_read_data") Signed-off-by: Quanyang Wang Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200929082027.16787-1-quanyang.wang@windriver.com commit 23a6502b076ba31d36467ddfa50d449bc62db231 Author: Philipp Zabel Date: Wed Jul 15 15:36:33 2020 +0200 drm/imx: dw_hdmi-imx: remove empty encoder_disable callback This has not been required since commit 75229eca569f ("drm: Make drm_encoder_helper_funcs optional"). Signed-off-by: Philipp Zabel commit 9774dd68535571307f709f25f0723d77d671009a Merge: 30bbbcda5be45 722939528a37a Author: Arnd Bergmann Date: Mon Oct 26 10:55:55 2020 +0100 Merge tag 'tee-fix-for-v5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee into arm/fixes Reenable kernel login method for kernel TEE client API The kernel TEE login method was accidentally disabled previously when enabling a few other login methods, so fix that here. * tag 'tee-fix-for-v5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee: tee: client UUID: Skip REE kernel login method as well Link: https://lore.kernel.org/r/20201013070918.GA3328976@jade Signed-off-by: Arnd Bergmann commit 30bbbcda5be45dd2d8f060b4a39452061d72da38 Author: Lubomir Rintel Date: Sat Sep 26 01:48:05 2020 +0200 ARM: dts: mmp2-olpc-xo-1-75: Use plural form of "-gpios" This makes validation happier. Link: https://lore.kernel.org/r/20200925234805.228251-3-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit 202f8e5c4975a95babf3bcdfb2c18952f06b030a Author: Lubomir Rintel Date: Sat Sep 26 01:48:04 2020 +0200 ARM: dts: mmp3: Add power domain for the camera The camera interfaces on MMP3 are on a separate power island that needs to be turned on for them to operate and, ideally, turned off when the cameras are not in use. This hooks the power island with the camera interfaces in the device tree. Link: https://lore.kernel.org/r/20200925234805.228251-2-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit b0fc70ce1f028e14a37c186d9f7a55e51439b83a Author: Jisheng Zhang Date: Fri Oct 9 15:08:31 2020 +0800 arm64: berlin: Select DW_APB_TIMER_OF Berlin SoCs always contain some DW APB timers which can be used as an always-on broadcast timer. Link: https://lore.kernel.org/r/20201009150536.214181fb@xhacker.debian Cc: # v3.14+ Signed-off-by: Jisheng Zhang Signed-off-by: Arnd Bergmann commit a67d5088ceb8c6143110c46ef1bd2d126dc1ac36 Author: Philipp Zabel Date: Mon Jul 13 17:07:10 2020 +0200 drm/imx: drop explicit drm_mode_config_cleanup Use drmm_mode_config_init() and drop the explicit calls to drm_mode_config_cleanup(). Signed-off-by: Philipp Zabel Acked-by: Daniel Vetter commit 67149a41b1a097cead2b024cb9533508bd85d953 Author: Philipp Zabel Date: Tue Jul 21 17:16:21 2020 +0200 drm/imx: imx-tve: remove redundant enable tracking The DRM core already takes care that encoder enable and disable calls are balanced. Signed-off-by: Philipp Zabel commit 07f2c94d033b3bac3236058a241de62383b048a1 Author: Philipp Zabel Date: Tue Jul 21 16:16:58 2020 +0200 drm/imx: imx-tve: use regmap fast_io spinlock Replace the custom spinlock with the fast_io spinlock provided by regmap. Signed-off-by: Philipp Zabel commit a28f918866095d2944603b3f682f64f78d5e9dbf Author: Philipp Zabel Date: Wed Jul 15 17:28:01 2020 +0200 drm/imx: dw_hdmi-imx: use imx_drm_encoder_parse_of This is the same code and comment that is already shared by imx-ldb, imx-tve, and parallel-display in imx_drm_encoder_parse_of(). Signed-off-by: Philipp Zabel Reviewed-by: Sam Ravnborg commit 58b24a38f0deac253ba9c5be128e3da6a86041ad Author: Philipp Zabel Date: Mon Jul 29 14:26:15 2019 +0200 gpu: ipu-v3: remove unused functions ipu_mbus_code_to_colorspace, ipu_stride_to_bytes, and ipu_pixelformat_is_planar are unused. Remove them. Signed-off-by: Philipp Zabel Reviewed-by: Sam Ravnborg commit 7d54eb90cd44d809b6da56baa8b55299ca601473 Author: Icenowy Zheng Date: Sun Oct 4 07:50:18 2020 +0800 dt-bindings: sram: sunxi-sram: add V3s compatible string Add compatible string for V3s, with H3 one as fallback. This is used in device tree now, but not standardized in DT binding. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201003235018.1121618-2-icenowy@aosc.io Signed-off-by: Arnd Bergmann commit a98182af72898e991464bdd33c0757887872bef9 Merge: 3a69e4e606a65 dea252fa41cd8 Author: Arnd Bergmann Date: Mon Oct 26 10:28:25 2020 +0100 Merge tag 'sunxi-fixes-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes One fix for an unreasonable thermal trip point on the A10 * tag 'sunxi-fixes-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun4i-a10: fix cpu_alert temperature Link: https://lore.kernel.org/r/3c95a95f-c6fa-4b34-823b-ddaa7660d274.lettre@localhost Signed-off-by: Arnd Bergmann commit 3a69e4e606a65a247d2f76fce6652bb150c6ecc5 Merge: 666674cc1872a 0b58725fb9a44 Author: Arnd Bergmann Date: Mon Oct 26 10:11:55 2020 +0100 Merge tag 'mvebu-fixes-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/fixes mvebu fixes for 5.9 (part 1) - Allow to use correct MAC address for particular DSA slaves / ethernet ports on Espressobin (Armada 3720) - Remove incorrect check in ll_get_coherency_base() used for Armada 370/XP SoCs. * tag 'mvebu-fixes-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: mvebu: drop pointless check for coherency_base arm64: dts: marvell: espressobin: Add ethernet switch aliases Link: https://lore.kernel.org/r/87y2kkesj5.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit 666674cc1872abd917dc7a07a70ade3f3a1e91bf Author: Krzysztof Kozlowski Date: Fri Oct 16 08:18:48 2020 +0200 MAINTAINERS: Move Sangbeom Kim to credits Sangbeom Kim upstreamed the Samsung SoC Sound and PMIC (MFD, regulator, RTC) drivers. However his contributions and LKML activity ends in 2014: https://lore.kernel.org/lkml/?q=f%3A%22Sangbeom+Kim%22 Move Sangbeom Kim to the CREDITS file. Thank you for the effort you put in to the upstream Samsung support. Link: https://lore.kernel.org/r/20201016061848.6258-2-krzk@kernel.org Cc: Sangbeom Kim Cc: Sylwester Nawrocki Cc: Mark Brown Signed-off-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 421f2597bf4201ee70c23cb381e2ba683b3033e9 Author: Krzysztof Kozlowski Date: Fri Oct 16 08:18:47 2020 +0200 MAINTAINERS: Move Kukjin Kim to credits Kukjin Kim has been maintaining the Samsung ARM architectures since 2010 up to 2016. He contributed many patches for the S3C, S5P and Exynos support. However since 2016 there is little activity from him on the LKML [1] so move his name to the CREDITS. Dear Kukjin, thank you for all the effort you put in to the upstream Samsung support. [1] https://lore.kernel.org/lkml/?q=f%3A%22Kukjin+Kim%22 Link: https://lore.kernel.org/r/20201016061848.6258-1-krzk@kernel.org Cc: Kukjin Kim Cc: Arnd Bergmann Cc: Olof Johansson Signed-off-by: Krzysztof Kozlowski Acked-by: Kukjin Kim Signed-off-by: Arnd Bergmann commit 6d7fe8aa45037776d5871c20f47a90901c841e4e Author: Masahiro Yamada Date: Mon Aug 31 12:58:03 2020 +0900 MAINTAINERS: step down as maintainer of UniPhier SoCs and Denali driver I am leaving Socionext. Orphan the UniPhier platform and Denali NAND driver until somebody takes the role. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann commit e7ae08d398e094e1305dee823435b1f996d39106 Author: Tony Lindgren Date: Mon Oct 26 10:08:47 2020 +0200 bus: ti-sysc: Fix bogus resetdone warning on enable for cpsw Bail out early from sysc_wait_softreset() just like we do in sysc_reset() if there's no sysstatus srst_shift to fix a bogus resetdone warning on enable as suggested by Grygorii Strashko . We do not currently handle resets for modules that need writing to the sysstatus register. If we at some point add that, we also need to add SYSS_QUIRK_RESETDONE_INVERTED flag for cpsw as the sysstatus bit is low when reset is done as described in the am335x TRM "Table 14-202 SOFT_RESET Register Field Descriptions" Fixes: d46f9fbec719 ("bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit") Suggested-by: Grygorii Strashko Acked-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit e275d2109cdaea8b4554b9eb8a828bdb8f8ba068 Author: Tony Lindgren Date: Mon Oct 26 10:08:47 2020 +0200 bus: ti-sysc: Fix reset status check for modules with quirks Commit d46f9fbec719 ("bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit") started showing a "OCP softreset timed out" warning on enable if the interconnect target module is not out of reset. This caused the warning to be often triggered for i2c and hdq while the devices are working properly. Turns out that some interconnect target modules seem to have an unusable reset status bits unless the module specific reset quirks are activated. Let's just skip the reset status check for those modules as we only want to activate the reset quirks when doing a reset, and not on enable. This way we don't see the bogus "OCP softreset timed out" warnings during boot. Fixes: d46f9fbec719 ("bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit") Signed-off-by: Tony Lindgren commit b69fd00120f8e3348273323099669cb058668263 Author: Tony Lindgren Date: Mon Oct 26 10:08:47 2020 +0200 ARM: OMAP2+: Fix missing select PM_GENERIC_DOMAINS_OF We should select also PM_GENERIC_DOMAINS_OF in addition to PM_GENERIC_DOMAINS to have device tree based PM domain providers enabled. Fixes: 58cbff023bfa ("soc: ti: omap-prm: Add basic power domain support") Signed-off-by: Tony Lindgren commit d6820bc6508c0cefd6e407cf5be50d9efda6c85c Author: Anson Huang Date: Thu Sep 17 13:33:49 2020 +0800 ARM: multi_v7_defconfig: Build in CONFIG_GPIO_MXC by default i.MX SoC GPIO driver provides the basic functions of GPIO pin operations and IRQ operations, it is now changed from "def_bool y" to "tristate", so it should be explicitly enabled to make sure all consumers work normally. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit f06dd1d41949018e050d18ec1058f16b388b96cf Author: Anson Huang Date: Thu Sep 17 13:33:48 2020 +0800 ARM: imx_v6_v7_defconfig: Build in CONFIG_GPIO_MXC by default i.MX SoC GPIO driver provides the basic functions of GPIO pin operations and IRQ operations, it is now changed from "def_bool y" to "tristate", so it should be explicitly enabled to make sure all consumers work normally. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit c8fa942bd3fbd5b05351aff04649064f5d59f0d2 Author: Anson Huang Date: Mon Oct 26 15:45:00 2020 +0800 arm64: defconfig: Build in CONFIG_GPIO_MXC by default i.MX SoC GPIO driver provides the basic functions of GPIO pin operations and IRQ operations, it is now changed from "def_bool y" to "tristate", so it should be explicitly enabled to make sure all consumers work normally. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit c20782ad4eb9dfa7f41cb2d85f218d0940f7cef1 Author: Tony Lindgren Date: Mon Oct 26 10:08:47 2020 +0200 ARM: OMAP2+: Fix location for select PM_GENERIC_DOMAINS I accidentally misplaced select PM_GENERIC_DOMAINS, it should be selected for all the SoCs instead. Fixes: 58cbff023bfa ("soc: ti: omap-prm: Add basic power domain support") Signed-off-by: Tony Lindgren commit fe5186cf12e30facfe261e9be6c7904a170bd822 Author: Vamshi K Sthambamkadi Date: Fri Oct 23 17:24:39 2020 +0530 efivarfs: fix memory leak in efivarfs_create() kmemleak report: unreferenced object 0xffff9b8915fcb000 (size 4096): comm "efivarfs.sh", pid 2360, jiffies 4294920096 (age 48.264s) hex dump (first 32 bytes): 2d 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: [<00000000cc4d897c>] kmem_cache_alloc_trace+0x155/0x4b0 [<000000007d1dfa72>] efivarfs_create+0x6e/0x1a0 [<00000000e6ee18fc>] path_openat+0xe4b/0x1120 [<000000000ad0414f>] do_filp_open+0x91/0x100 [<00000000ce93a198>] do_sys_openat2+0x20c/0x2d0 [<000000002a91be6d>] do_sys_open+0x46/0x80 [<000000000a854999>] __x64_sys_openat+0x20/0x30 [<00000000c50d89c9>] do_syscall_64+0x38/0x90 [<00000000cecd6b5f>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 In efivarfs_create(), inode->i_private is setup with efivar_entry object which is never freed. Cc: Signed-off-by: Vamshi K Sthambamkadi Link: https://lore.kernel.org/r/20201023115429.GA2479@cosmos Signed-off-by: Ard Biesheuvel commit fbc81ec5b85d43a4b22e49ec0e643fa7dec2ea40 Author: Ard Biesheuvel Date: Sat Oct 3 17:28:27 2020 +0200 efi/arm: set HSCTLR Thumb2 bit correctly for HVC calls from HYP Commit db227c19e68db353 ("ARM: 8985/1: efi/decompressor: deal with HYP mode boot gracefully") updated the EFI entry code to permit firmware to invoke the EFI stub loader in HYP mode, with the MMU either enabled or disabled, neither of which is permitted by the EFI spec, but which does happen in the field. In the MMU on case, we remain in HYP mode as configured by the firmware, and rely on the fact that any HVC instruction issued in this mode will be dispatched via the SVC slot in the HYP vector table. However, this slot will point to a Thumb2 symbol if the kernel is built in Thumb2 mode, and so we have to configure HSCTLR to ensure that the exception handlers are invoked in Thumb2 mode as well. Fixes: db227c19e68db353 ("ARM: 8985/1: efi/decompressor: deal with HYP mode boot gracefully") Signed-off-by: Ard Biesheuvel commit ca05f33316559a04867295dd49f85aeedbfd6bfd Author: Vincent Whitchurch Date: Wed Oct 21 11:53:59 2020 +0200 of: Fix reserved-memory overlap detection The reserved-memory overlap detection code fails to detect overlaps if either of the regions starts at address 0x0. The code explicitly checks for and ignores such regions, apparently in order to ignore dynamically allocated regions which have an address of 0x0 at this point. These dynamically allocated regions also have a size of 0x0 at this point, so fix this by removing the check and sorting the dynamically allocated regions ahead of any static regions at address 0x0. For example, there are two overlaps in this case but they are not currently reported: foo@0 { reg = <0x0 0x2000>; }; bar@0 { reg = <0x0 0x1000>; }; baz@1000 { reg = <0x1000 0x1000>; }; quux { size = <0x1000>; }; but they are after this patch: OF: reserved mem: OVERLAP DETECTED! bar@0 (0x00000000--0x00001000) overlaps with foo@0 (0x00000000--0x00002000) OF: reserved mem: OVERLAP DETECTED! foo@0 (0x00000000--0x00002000) overlaps with baz@1000 (0x00001000--0x00002000) Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/ded6fd6b47b58741aabdcc6967f73eca6a3f311e.1603273666.git-series.vincent.whitchurch@axis.com Signed-off-by: Rob Herring commit f83b03fc727ab56a77e68713d6e40299698f3c9f Author: Fabien Parent Date: Sun Oct 18 21:30:16 2020 +0200 dt-bindings: mailbox: mtk-gce: fix incorrect mbox-cells value As the binding documentation says, #mbox-cells must have a value of 2, but the example use a value 3. The MT8173 device tree correctly use mbox-cells = <2>. This commit fixes the example. Fixes: 19d8e335d58a ("dt-binding: gce: remove atomic_exec in mboxes property") Reviewed-by: Matthias Brugger Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20201018193016.3339045-1-fparent@baylibre.com Signed-off-by: Rob Herring commit 194810f78402128fe07676646cf9027fd3ed431c Author: Dan Murphy Date: Fri Oct 16 06:57:03 2020 -0500 dt-bindings: leds: Update devicetree documents for ID_RGB Update the leds/common.yaml to indicate that the max color ID is 9. Reflect the same change in the leds-class-multicolor.yaml Reported-by: Zhen Lei Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20201016115703.30184-1-dmurphy@ti.com Signed-off-by: Rob Herring commit 3650b228f83adda7e5ee532e2b90429c03f7b9ec Author: Linus Torvalds Date: Sun Oct 25 15:14:11 2020 -0700 Linux 5.10-rc1 commit 33def8498fdde180023444b08e12b72a9efed41d Author: Joe Perches Date: Wed Oct 21 19:36:07 2020 -0700 treewide: Convert macro and uses of __section(foo) to __section("foo") Use a more generic form for __section that requires quotes to avoid complications with clang and gcc differences. Remove the quote operator # from compiler_attributes.h __section macro. Convert all unquoted __section(foo) uses to quoted __section("foo"). Also convert __attribute__((section("foo"))) uses to __section("foo") even if the __attribute__ has multiple list entry forms. Conversion done using the script at: https://lore.kernel.org/lkml/75393e5ddc272dc7403de74d645e6c6e0f4e70eb.camel@perches.com/2-convert_section.pl Signed-off-by: Joe Perches Reviewed-by: Nick Desaulniers Reviewed-by: Miguel Ojeda Signed-off-by: Linus Torvalds commit c8b5e2600a2cfa1cdfbecf151afd67aee227381d Author: Jens Axboe Date: Sun Oct 25 13:53:26 2020 -0600 io_uring: use type appropriate io_kiocb handler for double poll io_poll_double_wake() is called for both request types - both pure poll requests, and internal polls. This means that we should be using the right handler based on the request type. Use the one that the original caller already assigned for the waitqueue handling, that will always match the correct type. Cc: stable@vger.kernel.org # v5.8+ Reported-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 986b9eacb25910865b50e5f298aa8e2df7642f1b Author: Rasmus Villemoes Date: Sat Oct 24 03:04:26 2020 +0200 kernel/sys.c: fix prototype of prctl_get_tid_address() tid_addr is not a "pointer to (pointer to int in userspace)"; it is in fact a "pointer to (pointer to int in userspace) in userspace". So sparse rightfully complains about passing a kernel pointer to put_user(). Reported-by: kernel test robot Signed-off-by: Rasmus Villemoes Signed-off-by: Linus Torvalds commit 23224e45004ed84c8466fd1e8e5860f541187029 Author: Eric Biggers Date: Fri Oct 23 16:27:16 2020 -0700 mm: remove kzfree() compatibility definition Commit 453431a54934 ("mm, treewide: rename kzfree() to kfree_sensitive()") renamed kzfree() to kfree_sensitive(), but it left a compatibility definition of kzfree() to avoid being too disruptive. Since then a few more instances of kzfree() have slipped in. Just get rid of them and remove the compatibility definition once and for all. Signed-off-by: Eric Biggers Signed-off-by: Linus Torvalds commit 0f7f635b06483f5204a70417ef6830af68185951 Author: Joe Perches Date: Sat Oct 24 16:59:04 2020 -0700 checkpatch: enable GIT_DIR environment use to set git repository location If set, use the environment variable GIT_DIR to change the default .git location of the kernel git tree. If GIT_DIR is unset, keep using the current ".git" default. Link: https://lkml.kernel.org/r/c5e23b45562373d632fccb8bc04e563abba4dd1d.camel@perches.com Signed-off-by: Joe Perches Tested-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 672f8871261597894d46454b8fa1660d6c952af6 Merge: 87702a337f748 a4fd8414659bf Author: Linus Torvalds Date: Sun Oct 25 11:28:49 2020 -0700 Merge tag 'timers-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "A time namespace fix and a matching selftest. The futex absolute timeouts which are based on CLOCK_MONOTONIC require time namespace corrected. This was missed in the original time namesapce support" * tag 'timers-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/timens: Add a test for futex() futex: Adjust absolute futex timeouts with per time namespace offset commit 87702a337f748d19a59a7826aeeffe0f6aeab7d4 Merge: a3d1b31213f1f a73f863af4ce9 Author: Linus Torvalds Date: Sun Oct 25 11:25:16 2020 -0700 Merge tag 'sched-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "Two scheduler fixes: - A trivial build fix for sched_feat() to compile correctly with CONFIG_JUMP_LABEL=n - Replace a zero lenght array with a flexible array" * tag 'sched-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/features: Fix !CONFIG_JUMP_LABEL case sched: Replace zero-length array with flexible-array commit a3d1b31213f1f789cc45a7db5c721513282d225a Merge: 1c84550f47f35 f3d301c1f2f56 Author: Linus Torvalds Date: Sun Oct 25 11:22:59 2020 -0700 Merge tag 'perf-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Thomas Gleixner: "A single fix to compute the field offset of the SNOOPX bit in the data source bitmask of perf events correctly" * tag 'perf-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: correct SNOOPX field offset commit 1c84550f47f35851c5d37405b888ba964053fca1 Merge: e5acf0ed8a5f0 ed3e453798d4f Author: Linus Torvalds Date: Sun Oct 25 11:14:54 2020 -0700 Merge tag 'locking-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Thomas Gleixner: "Just a trivial fix for kernel-doc warnings" * tag 'locking-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/seqlocks: Fix kernel-doc warnings commit e5acf0ed8a5f0af084b0fdb53b0c7aad47dab29b Merge: 0746c4a9f3d37 b8e2c8bbdf777 Author: Linus Torvalds Date: Sun Oct 25 11:12:31 2020 -0700 Merge tag 'ntb-5.10' of git://github.com/jonmason/ntb Pull NTB fixes from Jon Mason. * tag 'ntb-5.10' of git://github.com/jonmason/ntb: NTB: Use struct_size() helper in devm_kzalloc() ntb: intel: Fix memleak in intel_ntb_pci_probe NTB: hw: amd: fix an issue about leak system resources commit 0746c4a9f3d37caf73fb93420bcf34a841019a40 Merge: c10037f8323d2 8058d69905058 Author: Linus Torvalds Date: Sun Oct 25 11:10:23 2020 -0700 Merge branch 'i2c/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang: "Regression fix for rc1 and stable kernels as well" * 'i2c/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: core: Restore acpi_walk_dep_device_list() getting called after registering the ACPI i2c devs commit c10037f8323d2a94acb4fc6ecfbab0cda152fdd6 Merge: f9c25d98645ec aef0388aa92c5 Author: Linus Torvalds Date: Sun Oct 25 11:05:04 2020 -0700 Merge tag '5.10-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull more cifs updates from Steve French: "Add support for stat of various special file types (WSL reparse points for char, block, fifo)" * tag '5.10-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal module version number smb3: add some missing definitions from MS-FSCC smb3: remove two unused variables smb3: add support for stat of WSL reparse points for special file types commit f9c25d98645ec4af00c01a70681d2d4ab71622d0 Merge: bd6aabc7ca39d 2e34ae02a9b49 Author: Linus Torvalds Date: Sun Oct 25 10:59:34 2020 -0700 Merge branch 'parisc-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull more parisc updates from Helge Deller: - During this merge window O_NONBLOCK was changed to become 000200000, but we missed that the syscalls timerfd_create(), signalfd4(), eventfd2(), pipe2(), inotify_init1() and userfaultfd() do a strict bit-wise check of the flags parameter. To provide backward compatibility with existing userspace we introduce parisc specific wrappers for those syscalls which filter out the old O_NONBLOCK value and replaces it with the new one. - Prevent HIL bus driver to get stuck when keyboard or mouse isn't attached - Improve error return codes when setting rtc time - Minor documentation fix in pata_ns87415.c * 'parisc-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: ata: pata_ns87415.c: Document support on parisc with superio chip parisc: Add wrapper syscalls to fix O_NONBLOCK flag usage hil/parisc: Disable HIL driver when it gets stuck parisc: Improve error return codes when setting rtc time commit bd6aabc7ca39dd28a27fe1ec99e36e941cfb8192 Merge: 81ecf91eab104 1a89c1dc9520b Author: Linus Torvalds Date: Sun Oct 25 10:55:35 2020 -0700 Merge tag 'for-linus-5.10b-rc1c-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull more xen updates from Juergen Gross: - a series for the Xen pv block drivers adding module parameters for better control of resource usge - a cleanup series for the Xen event driver * tag 'for-linus-5.10b-rc1c-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: Documentation: add xen.fifo_events kernel parameter description xen/events: unmask a fifo event channel only if it was masked xen/events: only register debug interrupt for 2-level events xen/events: make struct irq_info private to events_base.c xen: remove no longer used functions xen-blkfront: Apply changed parameter name to the document xen-blkfront: add a parameter for disabling of persistent grants xen-blkback: add a parameter for disabling of persistent grants commit 81ecf91eab1045c009b5d73408c44033ba86bb4d Merge: 91f28da8c9a05 03ca0ec138927 Author: Linus Torvalds Date: Sun Oct 25 10:45:26 2020 -0700 Merge tag 'safesetid-5.10' of git://github.com/micah-morton/linux Pull SafeSetID updates from Micah Morton: "The changes are mostly contained to within the SafeSetID LSM, with the exception of a few 1-line changes to change some ns_capable() calls to ns_capable_setid() -- causing a flag (CAP_OPT_INSETID) to be set that is examined by SafeSetID code and nothing else in the kernel. The changes to SafeSetID internally allow for setting up GID transition security policies, as already existed for UIDs" * tag 'safesetid-5.10' of git://github.com/micah-morton/linux: LSM: SafeSetID: Fix warnings reported by test bot LSM: SafeSetID: Add GID security policy handling LSM: Signal to SafeSetID when setting group IDs commit 91f28da8c9a054286d6917ce191349455c479478 Merge: d769139081020 c6e169bc146a7 Author: Linus Torvalds Date: Sun Oct 25 10:40:08 2020 -0700 Merge tag '20201024-v4-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/prandom Pull random32 updates from Willy Tarreau: "Make prandom_u32() less predictable. This is the cleanup of the latest series of prandom_u32 experimentations consisting in using SipHash instead of Tausworthe to produce the randoms used by the network stack. The changes to the files were kept minimal, and the controversial commit that used to take noise from the fast_pool (f227e3ec3b5c) was reverted. Instead, a dedicated "net_rand_noise" per_cpu variable is fed from various sources of activities (networking, scheduling) to perturb the SipHash state using fast, non-trivially predictable data, instead of keeping it fully deterministic. The goal is essentially to make any occasional memory leakage or brute-force attempt useless. The resulting code was verified to be very slightly faster on x86_64 than what is was with the controversial commit above, though this remains barely above measurement noise. It was also tested on i386 and arm, and build- tested only on arm64" Link: https://lore.kernel.org/netdev/20200808152628.GA27941@SDF.ORG/ * tag '20201024-v4-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/prandom: random32: add a selftest for the prandom32 code random32: add noise from network and scheduling activity random32: make prandom_u32() output unpredictable commit 8058d69905058ec8f467a120b5ec5bb831ea67f3 Author: Hans de Goede Date: Wed Oct 14 16:41:58 2020 +0200 i2c: core: Restore acpi_walk_dep_device_list() getting called after registering the ACPI i2c devs Commit 21653a4181ff ("i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices()")'s intention was to only move the acpi_install_address_space_handler() call to the point before where the ACPI declared i2c-children of the adapter where instantiated by i2c_acpi_register_devices(). But i2c_acpi_install_space_handler() had a call to acpi_walk_dep_device_list() hidden (that is I missed it) at the end of it, so as an unwanted side-effect now acpi_walk_dep_device_list() was also being called before i2c_acpi_register_devices(). Move the acpi_walk_dep_device_list() call to the end of i2c_acpi_register_devices(), so that it is once again called *after* the i2c_client-s hanging of the adapter have been created. This fixes the Microsoft Surface Go 2 hanging at boot. Fixes: 21653a4181ff ("i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices()") Link: https://bugzilla.kernel.org/show_bug.cgi?id=209627 Reported-by: Rainer Finke Reported-by: Kieran Bingham Suggested-by: Maximilian Luz Tested-by: Kieran Bingham Signed-off-by: Hans de Goede Signed-off-by: Wolfram Sang commit a7480c5d725c4ecfc627e70960f249c34f5d13e8 Author: Greentime Hu Date: Tue Oct 20 16:15:32 2020 +0800 irqchip/sifive-plic: Fix broken irq_set_affinity() callback An interrupt submitted to an affinity change will always be left enabled after plic_set_affinity() has been called, while the expectation is that it should stay in whatever state it was before the call. Preserving the configuration fixes a PWM hang issue on the Unleashed board. [ 919.015783] rcu: INFO: rcu_sched detected stalls on CPUs/tasks: [ 919.020922] rcu: 0-...0: (0 ticks this GP) idle=7d2/1/0x4000000000000002 softirq=1424/1424 fqs=105807 [ 919.030295] (detected by 1, t=225825 jiffies, g=1561, q=3496) [ 919.036109] Task dump for CPU 0: [ 919.039321] kworker/0:1 R running task 0 30 2 0x00000008 [ 919.046359] Workqueue: events set_brightness_delayed [ 919.051302] Call Trace: [ 919.053738] [] __schedule+0x194/0x4de [ 982.035783] rcu: INFO: rcu_sched detected stalls on CPUs/tasks: [ 982.040923] rcu: 0-...0: (0 ticks this GP) idle=7d2/1/0x4000000000000002 softirq=1424/1424 fqs=113325 [ 982.050294] (detected by 1, t=241580 jiffies, g=1561, q=3509) [ 982.056108] Task dump for CPU 0: [ 982.059321] kworker/0:1 R running task 0 30 2 0x00000008 [ 982.066359] Workqueue: events set_brightness_delayed [ 982.071302] Call Trace: [ 982.073739] [] __schedule+0x194/0x4de [..] Fixes: bb0fed1c60cc ("irqchip/sifive-plic: Switch to fasteoi flow") Signed-off-by: Greentime Hu [maz: tidy-up commit message] Signed-off-by: Marc Zyngier Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20201020081532.2377-1-greentime.hu@sifive.com commit a00e85b581fd5ee47e770b6b8d2038dbebbe81f9 Author: Fabrice Gasnier Date: Fri Oct 16 16:40:17 2020 +0200 irqchip/stm32-exti: Add all LP timer exti direct events support Add all remaining LP timer exti direct events, e.g. for LP Timer 2 to 5. LP timer 1 is already listed (e.g. exti 47). Signed-off-by: Fabrice Gasnier Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1602859219-15684-2-git-send-email-fabrice.gasnier@st.com commit 57733e009f0c7e0526e10a18be12f56996c5460e Author: Marc Zyngier Date: Sun Oct 25 11:10:29 2020 +0000 irqchip/bcm2836: Fix missing __init annotation bcm2836_arm_irqchip_smp_init() calls set_smp_ipi_range(), which has an __init annotation. Make sure the caller has the same annotation. Reported-by: kernel test robot Signed-off-by: Marc Zyngier commit d76913908102044f14381df865bb74df17a538cb Merge: af0041875ce7f 24f7bb8863eb6 Author: Linus Torvalds Date: Sat Oct 24 12:46:42 2020 -0700 Merge tag 'block-5.10-2020-10-24' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe pull request from Christoph - rdma error handling fixes (Chao Leng) - fc error handling and reconnect fixes (James Smart) - fix the qid displace when tracing ioctl command (Keith Busch) - don't use BLK_MQ_REQ_NOWAIT for passthru (Chaitanya Kulkarni) - fix MTDT for passthru (Logan Gunthorpe) - blacklist Write Same on more devices (Kai-Heng Feng) - fix an uninitialized work struct (zhenwei pi)" - lightnvm out-of-bounds fix (Colin) - SG allocation leak fix (Doug) - rnbd fixes (Gioh, Guoqing, Jack) - zone error translation fixes (Keith) - kerneldoc markup fix (Mauro) - zram lockdep fix (Peter) - Kill unused io_context members (Yufen) - NUMA memory allocation cleanup (Xianting) - NBD config wakeup fix (Xiubo) * tag 'block-5.10-2020-10-24' of git://git.kernel.dk/linux-block: (27 commits) block: blk-mq: fix a kernel-doc markup nvme-fc: shorten reconnect delay if possible for FC nvme-fc: wait for queues to freeze before calling update_hr_hw_queues nvme-fc: fix error loop in create_hw_io_queues nvme-fc: fix io timeout to abort I/O null_blk: use zone status for max active/open nvmet: don't use BLK_MQ_REQ_NOWAIT for passthru nvmet: cleanup nvmet_passthru_map_sg() nvmet: limit passthru MTDS by BIO_MAX_PAGES nvmet: fix uninitialized work for zero kato nvme-pci: disable Write Zeroes on Sandisk Skyhawk nvme: use queuedata for nvme_req_qid nvme-rdma: fix crash due to incorrect cqe nvme-rdma: fix crash when connect rejected block: remove unused members for io_context blk-mq: remove the calling of local_memory_node() zram: Fix __zram_bvec_{read,write}() locking order skd_main: remove unused including sgl_alloc_order: fix memory leak lightnvm: fix out-of-bounds write to array devices->info[] ... commit af0041875ce7f5a05362b884e90cf82c27876096 Merge: cb6b2897b9b42 ee6e00c868221 Author: Linus Torvalds Date: Sat Oct 24 12:40:18 2020 -0700 Merge tag 'io_uring-5.10-2020-10-24' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - fsize was missed in previous unification of work flags - Few fixes cleaning up the flags unification creds cases (Pavel) - Fix NUMA affinities for completely unplugged/replugged node for io-wq - Two fallout fixes from the set_fs changes. One local to io_uring, one for the splice entry point that io_uring uses. - Linked timeout fixes (Pavel) - Removal of ->flush() ->files work-around that we don't need anymore with referenced files (Pavel) - Various cleanups (Pavel) * tag 'io_uring-5.10-2020-10-24' of git://git.kernel.dk/linux-block: splice: change exported internal do_splice() helper to take kernel offset io_uring: make loop_rw_iter() use original user supplied pointers io_uring: remove req cancel in ->flush() io-wq: re-set NUMA node affinities if CPUs come online io_uring: don't reuse linked_timeout io_uring: unify fsize with def->work_flags io_uring: fix racy REQ_F_LINK_TIMEOUT clearing io_uring: do poll's hash_node init in common code io_uring: inline io_poll_task_handler() io_uring: remove extra ->file check in poll prep io_uring: make cached_cq_overflow non atomic_t io_uring: inline io_fail_links() io_uring: kill ref get/drop in personality init io_uring: flags-based creds init in queue commit cb6b2897b9b425433ae31dc01f4e1d549f0028c8 Merge: 0eac1102e9480 94bd5719e4915 Author: Linus Torvalds Date: Sat Oct 24 12:36:24 2020 -0700 Merge tag 'libata-5.10-2020-10-24' of git://git.kernel.dk/linux-block Pull libata fixes from Jens Axboe: "Two minor libata fixes: - Fix a DMA boundary mask regression for sata_rcar (Geert) - kerneldoc markup fix (Mauro)" * tag 'libata-5.10-2020-10-24' of git://git.kernel.dk/linux-block: ata: fix some kernel-doc markups ata: sata_rcar: Fix DMA boundary mask commit 0eac1102e94807023e57d032bbba51830928b78e Merge: 1b307ac87075c f2d077ff1b5c1 Author: Linus Torvalds Date: Sat Oct 24 12:26:05 2020 -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 all over the place (the largest group here is Christoph's stat cleanups)" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: remove KSTAT_QUERY_FLAGS fs: remove vfs_stat_set_lookup_flags fs: move vfs_fstatat out of line fs: implement vfs_stat and vfs_lstat in terms of vfs_fstatat fs: remove vfs_statx_fd fs: omfs: use kmemdup() rather than kmalloc+memcpy [PATCH] reduce boilerplate in fsid handling fs: Remove duplicated flag O_NDELAY occurring twice in VALID_OPEN_FLAGS selftests: mount: add nosymfollow tests Add a "nosymfollow" mount option. commit 1b307ac87075c3207c345822ea276fe4f28481d7 Merge: 9bf8d8bcf3ceb 6857a5ebaabc5 Author: Linus Torvalds Date: Sat Oct 24 12:17:05 2020 -0700 Merge tag 'dma-mapping-5.10-1' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: - document the new dma_{alloc,free}_pages() API - two fixups for the dma-mapping.h split * tag 'dma-mapping-5.10-1' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: document dma_{alloc,free}_pages dma-mapping: move more functions to dma-map-ops.h ARM/sa1111: add a missing include of dma-map-ops.h commit 9bf8d8bcf3cebe44863188f1f2d822214e84f5b1 Merge: c51ae1247262d 77377064c3a94 Author: Linus Torvalds Date: Sat Oct 24 12:09:22 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "Two fixes for this merge window, and an unrelated bugfix for a host hang" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: ioapic: break infinite recursion on lazy EOI KVM: vmx: rename pi_init to avoid conflict with paride KVM: x86/mmu: Avoid modulo operator on 64-bit value to fix i386 build commit c51ae1247262d4b19451ded1107d9b1b69c57541 Merge: b6f96e75ae121 b17a45b6e53f6 Author: Linus Torvalds Date: Sat Oct 24 11:49:32 2020 -0700 Merge tag 'x86_seves_fixes_for_v5.10_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 SEV-ES fixes from Borislav Petkov: "Three fixes to SEV-ES to correct setting up the new early pagetable on 5-level paging machines, to always map boot_params and the kernel cmdline, and disable stack protector for ../compressed/head{32,64}.c. (Arvind Sankar)" * tag 'x86_seves_fixes_for_v5.10_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot/64: Explicitly map boot_params and command line x86/head/64: Disable stack protection for head$(BITS).o x86/boot/64: Initialize 5-level paging variables earlier commit c6e169bc146a76d5ccbf4d3825f705414352bd03 Author: Willy Tarreau Date: Sat Oct 24 18:36:27 2020 +0200 random32: add a selftest for the prandom32 code Given that this code is new, let's add a selftest for it as well. It doesn't rely on fixed sets, instead it picks 1024 numbers and verifies that they're not more correlated than desired. Link: https://lore.kernel.org/netdev/20200808152628.GA27941@SDF.ORG/ Cc: George Spelvin Cc: Amit Klein Cc: Eric Dumazet Cc: "Jason A. Donenfeld" Cc: Andy Lutomirski Cc: Kees Cook Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Linus Torvalds Cc: tytso@mit.edu Cc: Florian Westphal Cc: Marc Plumb Signed-off-by: Willy Tarreau commit 3744741adab6d9195551ce30e65e726c7a408421 Author: Willy Tarreau Date: Mon Aug 10 10:27:42 2020 +0200 random32: add noise from network and scheduling activity With the removal of the interrupt perturbations in previous random32 change (random32: make prandom_u32() output unpredictable), the PRNG has become 100% deterministic again. While SipHash is expected to be way more robust against brute force than the previous Tausworthe LFSR, there's still the risk that whoever has even one temporary access to the PRNG's internal state is able to predict all subsequent draws till the next reseed (roughly every minute). This may happen through a side channel attack or any data leak. This patch restores the spirit of commit f227e3ec3b5c ("random32: update the net random state on interrupt and activity") in that it will perturb the internal PRNG's statee using externally collected noise, except that it will not pick that noise from the random pool's bits nor upon interrupt, but will rather combine a few elements along the Tx path that are collectively hard to predict, such as dev, skb and txq pointers, packet length and jiffies values. These ones are combined using a single round of SipHash into a single long variable that is mixed with the net_rand_state upon each invocation. The operation was inlined because it produces very small and efficient code, typically 3 xor, 2 add and 2 rol. The performance was measured to be the same (even very slightly better) than before the switch to SipHash; on a 6-core 12-thread Core i7-8700k equipped with a 40G NIC (i40e), the connection rate dropped from 556k/s to 555k/s while the SYN cookie rate grew from 5.38 Mpps to 5.45 Mpps. Link: https://lore.kernel.org/netdev/20200808152628.GA27941@SDF.ORG/ Cc: George Spelvin Cc: Amit Klein Cc: Eric Dumazet Cc: "Jason A. Donenfeld" Cc: Andy Lutomirski Cc: Kees Cook Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Linus Torvalds Cc: tytso@mit.edu Cc: Florian Westphal Cc: Marc Plumb Tested-by: Sedat Dilek Signed-off-by: Willy Tarreau commit c51f8f88d705e06bd696d7510aff22b33eb8e638 Author: George Spelvin Date: Sun Aug 9 06:57:44 2020 +0000 random32: make prandom_u32() output unpredictable Non-cryptographic PRNGs may have great statistical properties, but are usually trivially predictable to someone who knows the algorithm, given a small sample of their output. An LFSR like prandom_u32() is particularly simple, even if the sample is widely scattered bits. It turns out the network stack uses prandom_u32() for some things like random port numbers which it would prefer are *not* trivially predictable. Predictability led to a practical DNS spoofing attack. Oops. This patch replaces the LFSR with a homebrew cryptographic PRNG based on the SipHash round function, which is in turn seeded with 128 bits of strong random key. (The authors of SipHash have *not* been consulted about this abuse of their algorithm.) Speed is prioritized over security; attacks are rare, while performance is always wanted. Replacing all callers of prandom_u32() is the quick fix. Whether to reinstate a weaker PRNG for uses which can tolerate it is an open question. Commit f227e3ec3b5c ("random32: update the net random state on interrupt and activity") was an earlier attempt at a solution. This patch replaces it. Reported-by: Amit Klein Cc: Willy Tarreau Cc: Eric Dumazet Cc: "Jason A. Donenfeld" Cc: Andy Lutomirski Cc: Kees Cook Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Linus Torvalds Cc: tytso@mit.edu Cc: Florian Westphal Cc: Marc Plumb Fixes: f227e3ec3b5c ("random32: update the net random state on interrupt and activity") Signed-off-by: George Spelvin Link: https://lore.kernel.org/netdev/20200808152628.GA27941@SDF.ORG/ [ willy: partial reversal of f227e3ec3b5c; moved SIPROUND definitions to prandom.h for later use; merged George's prandom_seed() proposal; inlined siprand_u32(); replaced the net_rand_state[] array with 4 members to fix a build issue; cosmetic cleanups to make checkpatch happy; fixed RANDOM32_SELFTEST build ] Signed-off-by: Willy Tarreau commit b6f96e75ae121ead54da3f58c545d68184079f90 Merge: 0593c1b4598a7 4ff753feab021 Author: Linus Torvalds Date: Sat Oct 24 11:09:13 2020 -0700 Merge tag 'powerpc-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - A fix for undetected data corruption on Power9 Nimbus <= DD2.1 in the emulation of VSX loads. The affected CPUs were not widely available. - Two fixes for machine check handling in guests under PowerVM. - A fix for our recent changes to SMP setup, when CONFIG_CPUMASK_OFFSTACK=y. - Three fixes for races in the handling of some of our powernv sysfs attributes. - One change to remove TM from the set of Power10 CPU features. - A couple of other minor fixes. Thanks to: Aneesh Kumar K.V, Christophe Leroy, Ganesh Goudar, Jordan Niethe, Mahesh Salgaonkar, Michael Neuling, Oliver O'Halloran, Qian Cai, Srikar Dronamraju, Vasant Hegde. * tag 'powerpc-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/pseries: Avoid using addr_to_pfn in real mode powerpc/uaccess: Don't use "m<>" constraint with GCC 4.9 powerpc/eeh: Fix eeh_dev_check_failure() for PE#0 powerpc/64s: Remove TM from Power10 features selftests/powerpc: Make alignment handler test P9N DD2.1 vector CI load workaround powerpc: Fix undetected data corruption with P9N DD2.1 VSX CI load emulation powerpc/powernv/dump: Handle multiple writes to ack attribute powerpc/powernv/dump: Fix race while processing OPAL dump powerpc/smp: Use GFP_ATOMIC while allocating tmp mask powerpc/smp: Remove unnecessary variable powerpc/mce: Avoid nmi_enter/exit in real mode on pseries hash powerpc/opal_elog: Handle multiple writes to ack attribute commit 0593c1b4598a77b5f835b278cde0ab71e2578588 Merge: 45fe605832c8c e8d444d3e98c2 Author: Linus Torvalds Date: Sat Oct 24 10:57:57 2020 -0700 Merge tag 'riscv-for-linus-5.10-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull more RISC-V updates from Palmer Dabbelt: "Just a single patch set: the remainder of Christoph's work to remove set_fs, including the RISC-V portion" * tag 'riscv-for-linus-5.10-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: remove address space overrides using set_fs() riscv: implement __get_kernel_nofault and __put_user_nofault riscv: refactor __get_user and __put_user riscv: use memcpy based uaccess for nommu again asm-generic: make the set_fs implementation optional asm-generic: add nommu implementations of __{get,put}_kernel_nofault asm-generic: improve the nommu {get,put}_user handling uaccess: provide a generic TASK_SIZE_MAX definition commit 45fe605832c8c0c962bfaf2581c6489b39abfe10 Merge: e533cda12d8f0 4550e2c8d3e03 Author: Linus Torvalds Date: Sat Oct 24 10:53:04 2020 -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: (33 commits) ARM: multi_v7_defconfig: add FMC2 EBI controller support arm64: defconfig: enable Qualcomm ASoC modules arm64: defconfig: qcom: enable GPU clock controller for SM8[12]50 arm64: defconfig: enable INTERCONNECT for Qualcomm chipsets arm64: defconfig: enable the sl28cpld board management controller arm64: defconfig: Enable the eLCDIF and Raydium RM67191 drivers arm64: defconfig: Enable Qcom SNPS Femto PHY ARM: configs: Update Realview defconfig ARM: configs: Update Versatile defconfig ARM: config: aspeed_g5: Enable IBM OP Panel driver ARM: config: aspeed-g5: Enable I2C GPIO mux driver ARM: config: aspeed: Fix selection of media drivers arm64: defconfig: Enable Samsung S3FWRN5 NFC driver ARM: omap2plus_defconfig: enable generic net options ARM: omap2plus_defconfig: enable twl4030_madc as a loadable module arm64: defconfig: Enable clock driver for ROHM BD718x7 PMIC arm64: defconfig: Build ADMA and ACONNECT driver arm64: defconfig: Build AHUB component drivers arm64: defconfig: Enable Lontium LT9611 driver arm64: defcondfig: Enable USB ACM and FTDI drivers ... commit e533cda12d8f0e7936354bafdc85c81741f805d2 Merge: 2e368dd2bbeac 098bfcec1bfc9 Author: Linus Torvalds Date: Sat Oct 24 10:44:18 2020 -0700 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM Devicetree updates from Olof Johansson: "As usual, most of the changes are to devicetrees. Besides smaller fixes, some refactorings and cleanups, some of the new platforms and chips (or significant features) supported are below: Broadcom boards: - Cisco Meraki MR32 (BCM53016-based) - BCM2711 (RPi4) display pipeline support Actions Semi boards: - Caninos Loucos Labrador SBC (S500-based) - RoseapplePi SBC (S500-based) Allwinner SoCs/boards: - A100 SoC with Perf1 board - Mali, DMA, Cetrus and IR support for R40 SoC Amlogic boards: - Libretch S905x CC V2 board - Hardkernel ODROID-N2+ board Aspeed boards/platforms: - Wistron Mowgli (AST2500-based, Power9 OpenPower server) - Facebook Wedge400 (AST2500-based, ToR switch) Hisilicon SoC: - SD5203 SoC Nvidia boards: - Tegra234 VDK, for pre-silicon Orin SoC NXP i.MX boards: - Librem 5 phone - i.MX8MM DDR4 EVK - Variscite VAR-SOM-MX8MN SoM - Symphony board - Tolino Shine 2 HD - TQMa6 SoM - Y Soft IOTA Orion Rockchip boards: - NanoPi R2S board - A95X-Z2 board - more Rock-Pi4 variants STM32 boards: - Odyssey SOM board (STM32MP157CAC-based) - DH DRC02 board Toshiba SoCs/boards: - Visconti SoC and TPMV7708 board" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (638 commits) ARM: dts: nspire: Fix SP804 users arm64: dts: lg: Fix SP804 users arm64: dts: lg: Fix SP805 clocks ARM: mstar: Fix up the fallout from moving the dts/dtsi files ARM: mstar: Add mstar prefix to all of the dtsi/dts files ARM: mstar: Add interrupt to pm_uart ARM: mstar: Add interrupt controller to base dtsi ARM: dts: meson8: remove two invalid interrupt lines from the GPU node arm64: dts: ti: k3-j7200-common-proc-board: Add USB support arm64: dts: ti: k3-j7200-common-proc-board: Configure the SERDES lane function arm64: dts: ti: k3-j7200-main: Add USB controller arm64: dts: ti: k3-j7200-main.dtsi: Add USB to SERDES lane MUX arm64: dts: ti: k3-j7200-main: Add SERDES lane control mux dt-bindings: ti-serdes-mux: Add defines for J7200 SoC ARM: dts: hisilicon: add SD5203 dts ARM: dts: hisilicon: fix the system controller compatible nodes arm64: dts: zynqmp: Fix leds subnode name for zcu100/ultra96 v1 arm64: dts: zynqmp: Remove undocumented u-boot properties arm64: dts: zynqmp: Remove additional compatible string for i2c IPs arm64: dts: zynqmp: Rename buses to be align with simple-bus yaml ... commit 2e368dd2bbeac6bfd50886371db185b1092067b4 Merge: e731f3146ff3b 9f7f26930035f Author: Linus Torvalds Date: Sat Oct 24 10:39:22 2020 -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. A bulk of this is smaller fixes or cleanups, but some of the new material this time around is: - Support for Nvidia Tegra234 SoC - Ring accelerator support for TI AM65x - PRUSS driver for TI platforms - Renesas support for R-Car V3U SoC - Reset support for Cortex-M4 processor on i.MX8MQ There are also new socinfo entries for a handful of different SoCs and platforms" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (131 commits) drm/mediatek: reduce clear event soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api soc: mediatek: cmdq: add jump function soc: mediatek: cmdq: add write_s_mask value function soc: mediatek: cmdq: add write_s value function soc: mediatek: cmdq: add read_s function soc: mediatek: cmdq: add write_s_mask function soc: mediatek: cmdq: add write_s function soc: mediatek: cmdq: add address shift in jump soc: mediatek: mtk-infracfg: Fix kerneldoc soc: amlogic: pm-domains: use always-on flag reset: sti: reset-syscfg: fix struct description warnings reset: imx7: add the cm4 reset for i.MX8MQ dt-bindings: reset: imx8mq: add m4 reset reset: Fix and extend kerneldoc reset: reset-zynqmp: Added support for Versal platform dt-bindings: reset: Updated binding for Versal reset driver reset: imx7: Support module build soc: fsl: qe: Remove unnessesary check in ucc_set_tdm_rxtx_clk soc: fsl: qman: convert to use be32_add_cpu() ... commit e731f3146ff3bba5424b40140e1a7e6f92e94964 Merge: 1f70935f637df accdab6d9e8f7 Author: Linus Torvalds Date: Sat Oct 24 10:33:08 2020 -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 changes, a substantial part of this is cleanup of some of the older platforms that used to have a bunch of board files. In particular: - Remove non-DT i.MX platforms that haven't seen activity in years, it's time to remove them. - A bunch of cleanup and removal of platform data for TI/OMAP platforms, moving over to genpd for power/reset control (yay!) - Major cleanup of Samsung S3C24xx and S3C64xx platforms, moving them closer to multiplatform support (not quite there yet, but getting close). There are a few other changes too, smaller fixlets, etc. For new platform support, the primary ones are: - New SoC: Hisilicon SD5203, ARM926EJ-S platform. - Cpufreq support for i.MX7ULP" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (121 commits) ARM: mstar: Select MStar intc ARM: stm32: Replace HTTP links with HTTPS ones ARM: debug: add UART early console support for SD5203 ARM: hisi: add support for SD5203 SoC ARM: omap3: enable off mode automatically clk: imx: imx35: Remove mx35_clocks_init() clk: imx: imx31: Remove mx31_clocks_init() clk: imx: imx27: Remove mx27_clocks_init() ARM: imx: Remove unused definitions ARM: imx35: Retrieve the IIM base address from devicetree ARM: imx3: Retrieve the AVIC base address from devicetree ARM: imx3: Retrieve the CCM base address from devicetree ARM: imx31: Retrieve the IIM base address from devicetree ARM: imx27: Retrieve the CCM base address from devicetree ARM: imx27: Retrieve the SYSCTRL base address from devicetree ARM: s3c64xx: bring back notes from removed debug-macro.S ARM: s3c24xx: fix Wunused-variable warning on !MMU ARM: samsung: fix PM debug build with DEBUG_LL but !MMU MAINTAINERS: mark linux-samsung-soc list non-moderated ARM: imx: Remove remnant board file support pieces ... commit 1f70935f637dfba226bf77182c2629fde61ed06e Merge: f11901ed723d1 6869f774b1cd2 Author: Linus Torvalds Date: Sat Oct 24 10:26:06 2020 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Olof Johansson: "I had queued up a batch of fixes that got a bit close to the release for sending in before the merge window opened, so I'm including them in the merge window batch instead. Mostly smaller DT tweaks and fixes, the usual mix that we tend to have through the releases" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: dts: iwg20d-q7-common: Fix touch controller probe failure ARM: OMAP2+: Restore MPU power domain if cpu_cluster_pm_enter() fails ARM: dts: am33xx: modify AM33XX_IOPAD for #pinctrl-cells = 2 soc: actions: include header to fix missing prototype arm64: dts: ti: k3-j721e: Rename mux header and update macro names soc: qcom: pdr: Fixup array type of get_domain_list_resp message arm64: dts: qcom: pm660: Fix missing pound sign in interrupt-cells arm64: dts: qcom: kitakami: Temporarily disable SDHCI1 arm64: dts: sdm630: Temporarily disable SMMUs by default arm64: dts: sdm845: Fixup OPP table for all qup devices arm64: dts: allwinner: h5: remove Mali GPU PMU module ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix dcdc1 regulator soc: xilinx: Fix error code in zynqmp_pm_probe() commit 77377064c3a94911339f13ce113b3abf265e06da Author: Vitaly Kuznetsov Date: Sat Oct 24 04:13:24 2020 -0400 KVM: ioapic: break infinite recursion on lazy EOI During shutdown the IOAPIC trigger mode is reset to edge triggered while the vfio-pci INTx is still registered with a resampler. This allows us to get into an infinite loop: ioapic_set_irq -> ioapic_lazy_update_eoi -> kvm_ioapic_update_eoi_one -> kvm_notify_acked_irq -> kvm_notify_acked_gsi -> (via irq_acked fn ptr) irqfd_resampler_ack -> kvm_set_irq -> (via set fn ptr) kvm_set_ioapic_irq -> kvm_ioapic_set_irq -> ioapic_set_irq Commit 8be8f932e3db ("kvm: ioapic: Restrict lazy EOI update to edge-triggered interrupts", 2020-05-04) acknowledges that this recursion loop exists and tries to avoid it at the call to ioapic_lazy_update_eoi, but at this point the scenario is already set, we have an edge interrupt with resampler on the same gsi. Fortunately, the only user of irq ack notifiers (in addition to resamplefd) is i8254 timer interrupt reinjection. These are edge-triggered, so in principle they would need the call to kvm_ioapic_update_eoi_one from ioapic_lazy_update_eoi, but they already disable AVIC(*), so they don't need the lazy EOI behavior. Therefore, remove the call to kvm_ioapic_update_eoi_one from ioapic_lazy_update_eoi. This fixes CVE-2020-27152. Note that this issue cannot happen with SR-IOV assigned devices because virtual functions do not have INTx, only MSI. Fixes: f458d039db7e ("kvm: ioapic: Lazy update IOAPIC EOI") Suggested-by: Paolo Bonzini Tested-by: Alex Williamson Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit a3ff25fc3c52f22b0766bb96c31b87d3c99fbf53 Author: Paolo Bonzini Date: Sat Oct 24 04:08:37 2020 -0400 KVM: vmx: rename pi_init to avoid conflict with paride allyesconfig results in: ld: drivers/block/paride/paride.o: in function `pi_init': (.text+0x1340): multiple definition of `pi_init'; arch/x86/kvm/vmx/posted_intr.o:posted_intr.c:(.init.text+0x0): first defined here make: *** [Makefile:1164: vmlinux] Error 1 because commit: commit 8888cdd0996c2d51cd417f9a60a282c034f3fa28 Author: Xiaoyao Li Date: Wed Sep 23 11:31:11 2020 -0700 KVM: VMX: Extract posted interrupt support to separate files added another pi_init(), though one already existed in the paride code. Reported-by: Jens Axboe Signed-off-by: Paolo Bonzini commit 764388ce598f0c3f5c7c39f45279104cb9e18be5 Author: Sean Christopherson Date: Fri Oct 23 20:11:50 2020 -0700 KVM: x86/mmu: Avoid modulo operator on 64-bit value to fix i386 build Replace a modulo operator with the more common pattern for computing the gfn "offset" of a huge page to fix an i386 build error. arch/x86/kvm/mmu/tdp_mmu.c:212: undefined reference to `__umoddi3' In fact, almost all of tdp_mmu.c can be elided on 32-bit builds, but that is a much larger patch. Fixes: 2f2fad0897cb ("kvm: x86/mmu: Add functions to handle changed TDP SPTEs") Reported-by: Daniel Díaz Signed-off-by: Sean Christopherson Message-Id: <20201024031150.9318-1-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit aef0388aa92c5583eeac401710e16db48be4c9ac Author: Steve French Date: Sun Sep 27 22:43:22 2020 -0500 cifs: update internal module version number To 2.29 Signed-off-by: Steve French commit 435ccfa894e35e3d4a1799e6ac030e48a7b69ef5 Author: Arjun Roy Date: Fri Oct 23 11:47:09 2020 -0700 tcp: Prevent low rmem stalls with SO_RCVLOWAT. With SO_RCVLOWAT, under memory pressure, it is possible to enter a state where: 1. We have not received enough bytes to satisfy SO_RCVLOWAT. 2. We have not entered buffer pressure (see tcp_rmem_pressure()). 3. But, we do not have enough buffer space to accept more packets. In this case, we advertise 0 rwnd (due to #3) but the application does not drain the receive queue (no wakeup because of #1 and #2) so the flow stalls. Modify the heuristic for SO_RCVLOWAT so that, if we are advertising rwnd<=rcv_mss, force a wakeup to prevent a stall. Without this patch, setting tcp_rmem to 6143 and disabling TCP autotune causes a stalled flow. With this patch, no stall occurs. This is with RPC-style traffic with large messages. Fixes: 03f45c883c6f ("tcp: avoid extra wakeups for SO_RCVLOWAT users") Signed-off-by: Arjun Roy Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20201023184709.217614-1-arjunroy.kdev@gmail.com Signed-off-by: Jakub Kicinski commit dab234227cbdc6a088c6f9bce38b5dcfefe90832 Author: Michael Ellerman Date: Fri Oct 23 14:32:36 2020 +1100 net: ucc_geth: Drop extraneous parentheses in comparison Clang warns about the extra parentheses in this comparison: drivers/net/ethernet/freescale/ucc_geth.c:1361:28: warning: equality comparison with extraneous parentheses if ((ugeth->phy_interface == PHY_INTERFACE_MODE_SGMII)) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ It seems clear the intent here is to do a comparison not an assignment, so drop the extra parentheses to avoid any confusion. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201023033236.3296988-1-mpe@ellerman.id.au Signed-off-by: Jakub Kicinski commit 0c3b7f4b812f708795fb5cc397432527421edc1b Merge: 4f3391ce8f5a6 0c32a28e247f5 Author: Jakub Kicinski Date: Fri Oct 23 18:37:26 2020 -0700 Merge branch 'ionic-memory-usage-fixes' Shannon Nelson says: ==================== ionic: memory usage fixes This patchset addresses some memory leaks and incorrect io reads. ==================== Link: https://lore.kernel.org/r/20201022235531.65956-1-snelson@pensando.io Signed-off-by: Jakub Kicinski commit 0c32a28e247f51b0b67b5abb6e9368542e30c136 Author: Shannon Nelson Date: Thu Oct 22 16:55:31 2020 -0700 ionic: fix mem leak in rx_empty The sentinel descriptor entry was getting missed in the traverse of the ring from head to tail, so change to a loop of 0 to the end. Fixes: f1d2e894f1b7 ("ionic: use index not pointer for queue tracking") Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski commit 43ecf7b46f2688fd37909801aee264f288b3917b Author: Shannon Nelson Date: Thu Oct 22 16:55:30 2020 -0700 ionic: no rx flush in deinit Kmemleak pointed out to us that ionic_rx_flush() is sending skbs into napi_gro_XXX with a disabled napi context, and these end up getting lost and leaked. We can safely remove the flush. Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling") Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski commit d701ec326a31945d1533b438a6feab753829b738 Author: Shannon Nelson Date: Thu Oct 22 16:55:29 2020 -0700 ionic: clean up sparse complaints The sparse complaints around the static_asserts were obscuring more useful complaints. So, don't check the static_asserts, and fix the remaining sparse complaints. Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski commit 4f3391ce8f5a69e7e6d66d0a3fc654eb6dbdc919 Author: Vinay Kumar Yadav Date: Fri Oct 23 00:35:57 2020 +0530 chelsio/chtls: fix tls record info to user chtls_pt_recvmsg() receives a skb with tls header and subsequent skb with data, need to finalize the data copy whenever next skb with tls header is available. but here current tls header is overwritten by next available tls header, ends up corrupting user buffer data. fixing it by finalizing current record whenever next skb contains tls header. v1->v2: - Improved commit message. Fixes: 17a7d24aa89d ("crypto: chtls - generic handling of data and hdr") Signed-off-by: Vinay Kumar Yadav Link: https://lore.kernel.org/r/20201022190556.21308-1-vinay.yadav@chelsio.com Signed-off-by: Jakub Kicinski commit df833050cced27e1b343cc8bc41f90191b289334 Author: Alex Elder Date: Wed Oct 21 20:00:29 2020 -0500 net: ipa: command payloads already mapped IPA transactions describe actions to be performed by the IPA hardware. Three cases use IPA transactions: transmitting a socket buffer; providing a page to receive packet data; and issuing an IPA immediate command. An IPA transaction contains a scatter/gather list (SGL) to hold the set of actions to be performed. We map buffers in the SGL for DMA at the time they are added to the transaction. For skb TX transactions, we fill the SGL with a call to skb_to_sgvec(). Page RX transactions involve a single page pointer, and that is recorded in the SGL with sg_set_page(). In both of these cases we then map the SGL for DMA with a call to dma_map_sg(). Immediate commands are different. The payload for an immediate command comes from a region of coherent DMA memory, which must *not* be mapped for DMA. For that reason, gsi_trans_cmd_add() sort of hand-crafts each SGL entry added to a command transaction. This patch fixes a problem with the code that crafts the SGL entry for an immediate command. Previously a portion of the SGL entry was updated using sg_set_buf(). However this is not valid because it includes a call to virt_to_page() on the buffer, but the command buffer pointer is not a linear address. Since we never actually map the SGL for command transactions, there are very few fields in the SGL we need to fill. Specifically, we only need to record the DMA address and the length, so they can be used by __gsi_trans_commit() to fill a TRE. We additionally need to preserve the SGL flags so for_each_sg() still works. For that we can simply assign a null page pointer for command SGL entries. Fixes: 9dd441e4ed575 ("soc: qcom: ipa: GSI transactions") Reported-by: Stephen Boyd Tested-by: Stephen Boyd Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20201022010029.11877-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit f11901ed723d1351843771c3a84b03a253bbf8b2 Merge: c80e42a4963b3 2e76f188fd90d Author: Linus Torvalds Date: Fri Oct 23 17:15:06 2020 -0700 Merge tag 'xfs-5.10-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Two bug fixes that trickled in during the merge window: - Make fallocate check the alignment of its arguments against the fundamental allocation unit of the volume the file lives on, so that we don't trigger the fs' alignment checks. - Cancel unprocessed log intents immediately when log recovery fails, to avoid a log deadlock" * tag 'xfs-5.10-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: cancel intents immediately if process_intents fails xfs: fix fallocate functions when rtextsize is larger than 1 commit c80e42a4963b3f593d53fb8f565e5bbca61a6531 Merge: a5e5c274c920f 62af696471e58 Author: Linus Torvalds Date: Fri Oct 23 17:13:53 2020 -0700 Merge tag 'docs-5.10-2' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A handful of late-arriving documentation fixes" * tag 'docs-5.10-2' of git://git.lwn.net/linux: docs: Add two missing entries in vm sysctl index docs/vm: trivial fixes to several spelling mistakes docs: submitting-patches: describe preserving review/test tags Documentation: Chinese translation of Documentation/arm64/hugetlbpage.rst Documentation: x86: fix a missing word in x86_64/mm.rst. docs: driver-api: remove a duplicated index entry docs: lkdtm: Modernize and improve details docs: deprecated.rst: Expand str*cpy() replacement notes docs/cpu-load: format the example code. commit a5e5c274c920f693d9c1ab65440d8e53a4530aca Merge: b76f733c3ff83 e1981f75d398c Author: Linus Torvalds Date: Fri Oct 23 17:09:38 2020 -0700 Merge tag 'trace-v5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing ring-buffer fix from Steven Rostedt: "The success return value of ring_buffer_resize() is stated to be zero and checked that way. But it was incorrectly returning the size allocated. Also, a fix to a comment" * tag 'trace-v5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ring-buffer: Update the description for ring_buffer_wait ring-buffer: Return 0 on success from ring_buffer_resize() commit b76f733c3ff83089cf1e3f9ae233533649f999b3 Merge: 41f762a15a632 2818cc745445a Author: Linus Torvalds Date: Fri Oct 23 16:38:36 2020 -0700 Merge tag 'acpi-5.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "These include an ACPICA code build fix related to recent GPE register access changes, a Kconfig cleanup related to the Dynamic Platform and Thremal Framework (DPTF) support, a reboot issue workaround, a debug module fix and a couple of janitorial changes. Specifics: - Fix ACPICA code build after recent changes related to accessing GPE registers (Rafael Wysocki). - Clean up DPTF part of the ACPI Kconfig (Rafael Wysocki). - Work around a reboot issue related to RESET_REG (Zhang Rui). - Prevent ACPI debug module from attemtping to run (and crashing) when ACPI is disabled (Jamie Iles). - Drop confusing comment from the ACPI processor driver (Alex Hung). - Drop a few unreachable break statements (Tom Rix)" * tag 'acpi-5.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: utils: remove unreachable breaks ACPICA: Add missing type casts in GPE register access code ACPI: DPTF: Add ACPI_DPTF Kconfig menu ACPI: DPTF: Fix participant driver names ACPI: processor: remove comment regarding string _UID support ACPI: reboot: Avoid racing after writing to ACPI RESET_REG ACPI: debug: don't allow debugging when ACPI is disabled commit 41f762a15a6324f67c3f084ece694c26f196cece Merge: af995383eb653 41c169d9ae2c8 Author: Linus Torvalds Date: Fri Oct 23 16:27:03 2020 -0700 Merge tag 'pm-5.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "First of all, the adaptive voltage scaling (AVS) drivers go to new platform-specific locations as planned (this part was reported to have merge conflicts against the new arm-soc updates in linux-next). In addition to that, there are some fixes (intel_idle, intel_pstate, RAPL, acpi_cpufreq), the addition of on/off notifiers and idle state accounting support to the generic power domains (genpd) code and some janitorial changes all over. Specifics: - Move the AVS drivers to new platform-specific locations and get rid of the drivers/power/avs directory (Ulf Hansson). - Add on/off notifiers and idle state accounting support to the generic power domains (genpd) framework (Ulf Hansson, Lina Iyer). - Ulf will maintain the PM domain part of cpuidle-psci (Ulf Hansson). - Make intel_idle disregard ACPI _CST if it cannot use the data returned by that method (Mel Gorman). - Modify intel_pstate to avoid leaving useless sysfs directory structure behind if it cannot be registered (Chen Yu). - Fix domain detection in the RAPL power capping driver and prevent it from failing to enumerate the Psys RAPL domain (Zhang Rui). - Allow acpi-cpufreq to use ACPI _PSD information with Family 19 and later AMD chips (Wei Huang). - Update the driver assumptions comment in intel_idle and fix a kerneldoc comment in the runtime PM framework (Alexander Monakov, Bean Huo). - Avoid unnecessary resets of the cached frequency in the schedutil cpufreq governor to reduce overhead (Wei Wang). - Clean up the cpufreq core a bit (Viresh Kumar). - Make assorted minor janitorial changes (Daniel Lezcano, Geert Uytterhoeven, Hubert Jasudowicz, Tom Rix). - Clean up and optimize the cpupower utility somewhat (Colin Ian King, Martin Kaistra)" * tag 'pm-5.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (23 commits) PM: sleep: remove unreachable break PM: AVS: Drop the avs directory and the corresponding Kconfig PM: AVS: qcom-cpr: Move the driver to the qcom specific drivers PM: runtime: Fix typo in pm_runtime_set_active() helper comment PM: domains: Fix build error for genpd notifiers powercap: Fix typo in Kconfig "Plance" -> "Plane" cpufreq: schedutil: restore cached freq when next_f is not changed acpi-cpufreq: Honor _PSD table setting on new AMD CPUs PM: AVS: smartreflex Move driver to soc specific drivers PM: AVS: rockchip-io: Move the driver to the rockchip specific drivers PM: domains: enable domain idle state accounting PM: domains: Add curly braces to delimit comment + statement block PM: domains: Add support for PM domain on/off notifiers for genpd powercap/intel_rapl: enumerate Psys RAPL domain together with package RAPL domain powercap/intel_rapl: Fix domain detection intel_idle: Ignore _CST if control cannot be taken from the platform cpuidle: Remove pointless stub intel_idle: mention assumption that WBINVD is not needed MAINTAINERS: Add section for cpuidle-psci PM domain cpufreq: intel_pstate: Delete intel_pstate sysfs if failed to register the driver ... commit af995383eb653f875c4e4e2349d5b0b4ba839eaa Merge: bd7e8c996f5ab 1ef16a407f544 Author: Linus Torvalds Date: Fri Oct 23 16:19:02 2020 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "The set of core changes here is Christoph's submission path cleanups. These introduced a couple of regressions when first proposed so they got held over from the initial merge window pull request to give more testing time, which they've now had and Syzbot has confirmed the regression it detected is fixed. The other main changes are two driver updates (arcmsr, pm80xx) and assorted minor clean ups" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (38 commits) scsi: qla2xxx: Fix return of uninitialized value in rval scsi: core: Set sc_data_direction to DMA_NONE for no-transfer commands scsi: sr: Initialize ->cmd_len scsi: arcmsr: Update driver version to v1.50.00.02-20200819 scsi: arcmsr: Add support for ARC-1886 series RAID controllers scsi: arcmsr: Fix device hot-plug monitoring timer stop scsi: arcmsr: Remove unnecessary syntax scsi: pm80xx: Driver version update scsi: pm80xx: Increase the number of outstanding I/O supported to 1024 scsi: pm80xx: Remove DMA memory allocation for ccb and device structures scsi: pm80xx: Increase number of supported queues scsi: sym53c8xx_2: Fix sizeof() mismatch scsi: isci: Fix a typo in a comment scsi: qla4xxx: Fix inconsistent format argument type scsi: myrb: Fix inconsistent format argument types scsi: myrb: Remove redundant assignment to variable timeout scsi: bfa: Fix error return in bfad_pci_init() scsi: fcoe: Simplify the return expression of fcoe_sysfs_setup() scsi: snic: Simplify the return expression of svnic_cq_alloc() scsi: fnic: Simplify the return expression of vnic_wq_copy_alloc() ... commit bd7e8c996f5aba542f416ee6d19e91fd3668674f Merge: 40a03b750bb3d bb0bc0cfeabc0 Author: Linus Torvalds Date: Fri Oct 23 16:16:31 2020 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a new driver for ADC driven joysticks - a new Zintix touchscreen driver - enhancements to Intel SoC button array driver - support for F3A "function" in Synaptics RMI4 driver - assorted driver fixups * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (29 commits) Input: Add MAINTAINERS entry for SiS i2c touch input driver Input: evdev - per-client waitgroups Input: synaptics - enable InterTouch for ThinkPad T14 Gen 1 Input: synaptics - enable InterTouch for ThinkPad P1/X1E gen 2 Input: synaptics-rmi4 - support bootloader v8 in f34v7 Input: synaptics-rmi4 - add support for F3A Input: synaptics-rmi4 - rename f30_data to gpio_data Input: add zinitix touchscreen driver dt-bindings: input/touchscreen: add bindings for zinitix Input: joystick - add ADC attached joystick driver. dt-bindings: input: Add docs for ADC driven joystick Input: sun4i-ps2 - fix handling of platform_get_irq() error Input: twl4030_keypad - fix handling of platform_get_irq() error Input: omap4-keypad - fix handling of platform_get_irq() error Input: ep93xx_keypad - fix handling of platform_get_irq() error Input: stmfts - fix a & vs && typo Input: imx6ul_tsc - unify open/close and PM paths Input: imx6ul_tsc - clean up some errors in imx6ul_tsc_resume() Input: elants_i2c - fix typo for an attribute to show calibration count Input: elants_i2c - report resolution of ABS_MT_TOUCH_MAJOR by FW information. ... commit c3a98c3ad5c0dc60a1ac66bf91147a3f39cac96b Author: Eric Biggers Date: Fri Oct 23 15:27:48 2020 -0700 crypto: x86/poly1305 - add back a needed assignment One of the assignments that was removed by commit 4a0c1de64bf9 ("crypto: x86/poly1305 - Remove assignments with no effect") is actually needed, since it affects the return value. This fixes the following crypto self-test failure: alg: shash: poly1305-simd test failed (wrong result) on test vector 2, cfg="init+update+final aligned buffer" Fixes: 4a0c1de64bf9 ("crypto: x86/poly1305 - Remove assignments with no effect") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 40a03b750bb3ded71a0f21a0b7dfbf3b24068dcb Merge: fc03b2d6a9d13 033e4040d453f Author: Linus Torvalds Date: Fri Oct 23 13:59:05 2020 -0700 Merge tag 'sound-fix-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Just a few additional small and trivial fixes" * tag 'sound-fix-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix the return value if cb func is already registered ALSA: usb-audio: Line6 Pod Go interface requires static clock rate quirk ALSA: hda/ca0132: make some const arrays static, makes object smaller ALSA: sparc: dbri: fix repeated word 'the' commit fc03b2d6a9d1398dc855318d6ddfa3be57bdcf2c Merge: 9c5743dff415a b45b6fbc671c6 Author: Linus Torvalds Date: Fri Oct 23 13:56:34 2020 -0700 Merge tag 'drm-next-2020-10-23' of git://anongit.freedesktop.org/drm/drm Pull more drm fixes from Dave Airlie: "This should be the last round of things for rc1, a bunch of i915 fixes, some amdgpu, more font OOB fixes and one ttm fix just found reading code: fbcon/fonts: - Two patches to prevent OOB access ttm: - fix for evicition value range check amdgpu: - Sienna Cichlid fixes - MST manager resource leak fix - GPU reset fix amdkfd: - Luxmark fix for Navi1x i915: - Tweak initial DPCD backlight.enabled value (Sean) - Initialize reserved MOCS indices (Ayaz) - Mark initial fb obj as WT on eLLC machines to avoid rcu lockup (Ville) - Support parsing of oversize batches (Chris) - Delay execlists processing for TGL (Chris) - Use the active reference on the vma during error capture (Chris) - Widen CSB pointer (Chris) - Wait for CSB entries on TGL (Chris) - Fix unwind for scratch page allocation (Chris) - Exclude low patches of stolen memory (Chris) - Force VT'd workarounds when running as a guest OS (Chris) - Drop runtime-pm assert from vpgu io accessors (Chris)" * tag 'drm-next-2020-10-23' of git://anongit.freedesktop.org/drm/drm: (31 commits) drm/amdgpu: correct the cu and rb info for sienna cichlid drm/amd/pm: remove the average clock value in sysfs drm/amd/pm: fix pp_dpm_fclk Revert drm/amdgpu: disable sienna chichlid UMC RAS drm/amd/pm: fix pcie information for sienna cichlid drm/amdkfd: Use same SQ prefetch setting as amdgpu drm/amd/swsmu: correct wrong feature bit mapping drm/amd/psp: Fix sysfs: cannot create duplicate filename drm/amd/display: Avoid MST manager resource leak. drm/amd/display: Revert "drm/amd/display: Fix a list corruption" drm/amdgpu: update golden setting for sienna_cichlid drm/amd/swsmu: add missing feature map for sienna_cichlid drm/amdgpu: correct the gpu reset handling for job != NULL case drm/amdgpu: add rlc iram and dram firmware support drm/amdgpu: add function to program pbb mode for sienna cichlid drm/i915: Drop runtime-pm assert from vgpu io accessors drm/i915: Force VT'd workarounds when running as a guest OS drm/i915: Exclude low pages (128KiB) of stolen from use drm/i915/gt: Onion unwind for scratch page allocation failure drm/ttm: fix eviction valuable range check. ... commit 3d7772ea5602b88c7c7f0a50d512171a2eed6659 Author: Len Brown Date: Wed Sep 30 20:58:15 2020 -0400 tools/power turbostat: harden against cpu hotplug turbostat tends to get confused when CPUs are added and removed while it is running. There are races, such as checking the current cpu, and then reading a sysfs file that depends on that cpu number. Close the two issues that seem to come up the most. First, there is an infinite reset loop detector -- change that to allow more resets before giving up. Secondly, one of those file reads didn't really need to exit the program on failure... Signed-off-by: Len Brown commit 6ff7cb371c4bea3dba03a56d774da925e78a5087 Author: Len Brown Date: Tue Sep 29 17:28:42 2020 -0400 tools/power turbostat: adjust for temperature offset cpu1: MSR_IA32_TEMPERATURE_TARGET: 0x05640000 (95 C) (100 default - 5 offset) Account for the new "offset" field in MSR_TEMPERATURE_TARGET. While this field is usually zero, ignoring it results in over-stating the current temperature, both per-core and per-package. Signed-off-by: Len Brown commit 9c5743dff415a7384669229d327702ea9bd45560 Author: Rasmus Villemoes Date: Fri Oct 23 22:31:54 2020 +0200 x86/uaccess: fix code generation in put_user() Quoting https://gcc.gnu.org/onlinedocs/gcc/Local-Register-Variables.html: You can define a local register variable and associate it with a specified register... The only supported use for this feature is to specify registers for input and output operands when calling Extended asm (see Extended Asm). This may be necessary if the constraints for a particular machine don't provide sufficient control to select the desired register. On 32-bit x86, this is used to ensure that gcc will put an 8-byte value into the %edx:%eax pair, while all other cases will just use the single register %eax (%rax on x86-64). While the _ASM_AX actually just expands to "%eax", note this comment next to get_user() which does something very similar: * The use of _ASM_DX as the register specifier is a bit of a * simplification, as gcc only cares about it as the starting point * and not size: for a 64-bit value it will use %ecx:%edx on 32 bits * (%ecx being the next register in gcc's x86 register sequence), and * %rdx on 64 bits. However, getting this to work requires that there is no code between the assignment to the local register variable and its use as an input to the asm() which can possibly clobber any of the registers involved - including evaluation of the expressions making up other inputs. In the current code, the ptr expression used directly as an input may cause such code to be emitted. For example, Sean Christopherson observed that with KASAN enabled and ptr being current->set_child_tid (from chedule_tail()), the load of current->set_child_tid causes a call to __asan_load8() to be emitted immediately prior to the __put_user_4 call, and Naresh Kamboju reports that various mmstress tests fail on KASAN-enabled builds. It's also possible to synthesize a broken case without KASAN if one uses "foo()" as the ptr argument, with foo being some "extern u64 __user *foo(void);" (though I don't know if that appears in real code). Fix it by making sure ptr gets evaluated before the assignment to __val_pu, and add a comment that __val_pu must be the last thing computed before the asm() is entered. Cc: Sean Christopherson Reported-by: Naresh Kamboju Tested-by: Naresh Kamboju Fixes: d55564cfc222 ("x86: Make __put_user() generate an out-of-line call") Signed-off-by: Rasmus Villemoes Signed-off-by: Linus Torvalds commit 7d03ae4dc4631d731499644129736285df628378 Author: Steve French Date: Fri Oct 23 15:21:38 2020 -0500 smb3: add some missing definitions from MS-FSCC Add some structures and defines that were recently added to the protocol documentation (see MS-FSCC sections 2.3.29-2.3.34). Signed-off-by: Steve French commit 6a87266c043b7a279941d17834540d173babca5f Author: Steve French Date: Fri Oct 23 08:23:45 2020 -0500 smb3: remove two unused variables Fix two unused variables in commit "add support for stat of WSL reparse points for special file types" Reported-by: kernel test robot Signed-off-by: Steve French commit 2e4564b31b645f599d531e2c8bd0e47316e02223 Author: Steve French Date: Thu Oct 22 22:03:14 2020 -0500 smb3: add support for stat of WSL reparse points for special file types This is needed so when mounting to Windows we do not misinterpret various special files created by Linux (WSL) as symlinks. An earlier patch addressed readdir. This patch fixes stat (getattr). With this patch:   File: /mnt1/char   Size: 0          Blocks: 0          IO Block: 16384  character special file Device: 34h/52d Inode: 844424930132069  Links: 1     Device type: 0,0 Access: (0755/crwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root) Access: 2020-10-21 17:46:51.839458900 -0500 Modify: 2020-10-21 17:46:51.839458900 -0500 Change: 2020-10-21 18:30:39.797358800 -0500  Birth: -   File: /mnt1/fifo   Size: 0          Blocks: 0          IO Block: 16384  fifo Device: 34h/52d Inode: 1125899906842722  Links: 1 Access: (0755/prwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root) Access: 2020-10-21 16:21:37.259249700 -0500 Modify: 2020-10-21 16:21:37.259249700 -0500 Change: 2020-10-21 18:30:39.797358800 -0500  Birth: -   File: /mnt1/block   Size: 0          Blocks: 0          IO Block: 16384  block special file Device: 34h/52d Inode: 844424930132068  Links: 1     Device type: 0,0 Access: (0755/brwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root) Access: 2020-10-21 17:10:47.913103200 -0500 Modify: 2020-10-21 17:10:47.913103200 -0500 Change: 2020-10-21 18:30:39.796725500 -0500  Birth: - without the patch all show up incorrectly as symlinks with annoying "operation not supported error also returned"   File: /mnt1/charstat: cannot read symbolic link '/mnt1/char': Operation not supported   Size: 0          Blocks: 0          IO Block: 16384  symbolic link Device: 34h/52d Inode: 844424930132069  Links: 1 Access: (0000/l---------)  Uid: (    0/    root)   Gid: (    0/    root) Access: 2020-10-21 17:46:51.839458900 -0500 Modify: 2020-10-21 17:46:51.839458900 -0500 Change: 2020-10-21 18:30:39.797358800 -0500  Birth: -   File: /mnt1/fifostat: cannot read symbolic link '/mnt1/fifo': Operation not supported   Size: 0          Blocks: 0          IO Block: 16384  symbolic link Device: 34h/52d Inode: 1125899906842722  Links: 1 Access: (0000/l---------)  Uid: (    0/    root)   Gid: (    0/    root) Access: 2020-10-21 16:21:37.259249700 -0500 Modify: 2020-10-21 16:21:37.259249700 -0500 Change: 2020-10-21 18:30:39.797358800 -0500  Birth: -   File: /mnt1/blockstat: cannot read symbolic link '/mnt1/block': Operation not supported   Size: 0          Blocks: 0          IO Block: 16384  symbolic link Device: 34h/52d Inode: 844424930132068  Links: 1 Access: (0000/l---------)  Uid: (    0/    root)   Gid: (    0/    root) Access: 2020-10-21 17:10:47.913103200 -0500 Modify: 2020-10-21 17:10:47.913103200 -0500 Change: 2020-10-21 18:30:39.796725500 -0500 Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 1811977cb11354aef8cbd13e35ff50db716728a4 Author: Jiri Kosina Date: Wed Sep 30 22:52:31 2020 +0200 HID: add support for Sega Saturn This device needs HID_QUIRK_MULTI_INPUT in order to be presented to userspace in a consistent way. Reported-and-tested-by: David Gámiz Jiménez Signed-off-by: Jiri Kosina commit 0d63c148d6d9ac57c124b618f66269bb4558553b Author: Pavel Begunkov Date: Thu Oct 22 16:47:18 2020 +0100 io_uring: simplify __io_queue_sqe() Restructure __io_queue_sqe() so it follows simple if/else if/else control flow. It's more readable and removes extra goto/labels. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9aaf354352f1142831457492790d6bfa9c883021 Author: Pavel Begunkov Date: Thu Oct 22 16:47:17 2020 +0100 io_uring: simplify nxt propagation in io_queue_sqe Don't overuse goto's, complex control flow doesn't make compilers happy and makes code harder to read. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit feaadc4fc2ebdbd53ffed1735077725855a2af53 Author: Pavel Begunkov Date: Thu Oct 22 16:47:16 2020 +0100 io_uring: don't miss setting IO_WQ_WORK_CONCURRENT Set IO_WQ_WORK_CONCURRENT for all REQ_F_FORCE_ASYNC requests, do that in that is also looks better. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit c9abd7ad832b9eef06d887f4971894af5de617fd Author: Pavel Begunkov Date: Thu Oct 22 16:43:11 2020 +0100 io_uring: don't defer put of cancelled ltimeout Inline io_link_cancel_timeout() and __io_kill_linked_timeout() into io_kill_linked_timeout(). That allows to easily move a put of a cancelled linked timeout out of completion_lock and to not deferring it. It is also much more readable when not scattered across three different functions. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit cdfcc3ee04599ce51e5c84432c177163637dd0e0 Author: Pavel Begunkov Date: Thu Oct 22 16:43:10 2020 +0100 io_uring: always clear LINK_TIMEOUT after cancel Move REQ_F_LINK_TIMEOUT clearing out of __io_kill_linked_timeout() because it might return early and leave the flag set. It's not a problem, but may be confusing. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ac877d2edd094e161801d72b49cfb56c5fc860fb Author: Pavel Begunkov Date: Thu Oct 22 16:43:09 2020 +0100 io_uring: don't adjust LINK_HEAD in cancel ltimeout An armed linked timeout can never be a head of a link, so we don't need to clear REQ_F_LINK_HEAD for it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e08102d507f34e6591de521a4c2587c6f02c7996 Author: Pavel Begunkov Date: Thu Oct 22 16:43:08 2020 +0100 io_uring: remove opcode check on ltimeout kill __io_kill_linked_timeout() already checks for REQ_F_LTIMEOUT_ACTIVE and it's set only for linked timeouts. No need to verify next request's opcode. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 3cb12d27ff655e57e8efe3486dca2a22f4e30578 Merge: 0adc313c4f206 18ded910b5898 Author: Linus Torvalds Date: Fri Oct 23 12:05:49 2020 -0700 Merge tag 'net-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Cross-tree/merge window issues: - rtl8150: don't incorrectly assign random MAC addresses; fix late in the 5.9 cycle started depending on a return code from a function which changed with the 5.10 PR from the usb subsystem Current release regressions: - Revert "virtio-net: ethtool configurable RXCSUM", it was causing crashes at probe when control vq was not negotiated/available Previous release regressions: - ixgbe: fix probing of multi-port 10 Gigabit Intel NICs with an MDIO bus, only first device would be probed correctly - nexthop: Fix performance regression in nexthop deletion by effectively switching from recently added synchronize_rcu() to synchronize_rcu_expedited() - netsec: ignore 'phy-mode' device property on ACPI systems; the property is not populated correctly by the firmware, but firmware configures the PHY so just keep boot settings Previous releases - always broken: - tcp: fix to update snd_wl1 in bulk receiver fast path, addressing bulk transfers getting "stuck" - icmp: randomize the global rate limiter to prevent attackers from getting useful signal - r8169: fix operation under forced interrupt threading, make the driver always use hard irqs, even on RT, given the handler is light and only wants to schedule napi (and do so through a _irqoff() variant, preferably) - bpf: Enforce pointer id generation for all may-be-null register type to avoid pointers erroneously getting marked as null-checked - tipc: re-configure queue limit for broadcast link - net/sched: act_tunnel_key: fix OOB write in case of IPv6 ERSPAN tunnels - fix various issues in chelsio inline tls driver Misc: - bpf: improve just-added bpf_redirect_neigh() helper api to support supplying nexthop by the caller - in case BPF program has already done a lookup we can avoid doing another one - remove unnecessary break statements - make MCTCP not select IPV6, but rather depend on it" * tag 'net-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (62 commits) tcp: fix to update snd_wl1 in bulk receiver fast path net: Properly typecast int values to set sk_max_pacing_rate netfilter: nf_fwd_netdev: clear timestamp in forwarding path ibmvnic: save changed mac address to adapter->mac_addr selftests: mptcp: depends on built-in IPv6 Revert "virtio-net: ethtool configurable RXCSUM" rtnetlink: fix data overflow in rtnl_calcit() net: ethernet: mtk-star-emac: select REGMAP_MMIO net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup net: hdlc: In hdlc_rcv, check to make sure dev is an HDLC device bpf, libbpf: Guard bpf inline asm from bpf_tail_call_static bpf, selftests: Extend test_tc_redirect to use modified bpf_redirect_neigh() bpf: Fix bpf_redirect_neigh helper api to support supplying nexthop mptcp: depends on IPV6 but not as a module sfc: move initialisation of efx->filter_sem to efx_init_struct() mpls: load mpls_gso after mpls_iptunnel net/sched: act_tunnel_key: fix OOB write in case of IPv6 ERSPAN tunnels net/sched: act_gate: Unlock ->tcfa_lock in tc_setup_flow_action() net: dsa: bcm_sf2: make const array static, makes object smaller mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it ... commit 0adc313c4f20639f7e235b8d6719d96a2024cf91 Merge: 0613ed91901b5 bedb0f056faa9 Author: Linus Torvalds Date: Fri Oct 23 11:47:42 2020 -0700 Merge tag 'gfs2-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: - Use iomap for non-journaled buffered I/O. This largely eliminates buffer heads on filesystems where the block size matches the page size. Many thanks to Christoph Hellwig for this patch! - Fixes for some more journaled data filesystem bugs, found by running xfstests with data journaling on for all files (chattr +j $MNT) (Bob Peterson) - gfs2_evict_inode refactoring (Bob Peterson) - Use the statfs data in the journal during recovery instead of reading it in from the local statfs inodes (Abhi Das) - Several other minor fixes by various people * tag 'gfs2-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: (30 commits) gfs2: Recover statfs info in journal head gfs2: lookup local statfs inodes prior to journal recovery gfs2: Add fields for statfs info in struct gfs2_log_header_host gfs2: Ignore subsequent errors after withdraw in rgrp_go_sync gfs2: Eliminate gl_vm gfs2: Only access gl_delete for iopen glocks gfs2: Fix comments to glock_hash_walk gfs2: eliminate GLF_QUEUED flag in favor of list_empty(gl_holders) gfs2: Ignore journal log writes for jdata holes gfs2: simplify gfs2_block_map gfs2: Only set PageChecked if we have a transaction gfs2: don't lock sd_ail_lock in gfs2_releasepage gfs2: make gfs2_ail1_empty_one return the count of active items gfs2: Wipe jdata and ail1 in gfs2_journal_wipe, formerly gfs2_meta_wipe gfs2: enhance log_blocks trace point to show log blocks free gfs2: add missing log_blocks trace points in gfs2_write_revokes gfs2: rename gfs2_write_full_page to gfs2_write_jdata_page, remove parm gfs2: add validation checks for size of superblock gfs2: use-after-free in sysfs deregistration gfs2: Fix NULL pointer dereference in gfs2_rgrp_dump ... commit 0613ed91901b5f87afcd28b4560fb0aa37a0db13 Merge: c4728cfbed0f5 13909d96c84af Author: Linus Torvalds Date: Fri Oct 23 11:41:39 2020 -0700 Merge tag '5.10-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: - add support for recognizing special file types (char/block/fifo/ symlink) for files created by Linux on WSL (a format we plan to move to as the default for creating special files on Linux, as it has advantages over the other current option, the SFU format) in readdir. - fix double queries to root directory when directory leases not supported (e.g. Samba) - fix querying mode bits (modefromsid mount option) for special file types - stronger encryption (gcm256), disabled by default until tested more broadly - allow querying owner when server reports 'well known SID' on query dir with SMB3.1.1 POSIX extensions * tag '5.10-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6: (30 commits) SMB3: add support for recognizing WSL reparse tags cifs: remove bogus debug code smb3.1.1: fix typo in compression flag cifs: move smb version mount options into fs_context.c cifs: move cache mount options to fs_context.ch cifs: move security mount options into fs_context.ch cifs: add files to host new mount api smb3: do not try to cache root directory if dir leases not supported smb3: fix stat when special device file and mounted with modefromsid cifs: Print the address and port we are connecting to in generic_ip_connect() SMB3: Resolve data corruption of TCP server info fields cifs: make const array static, makes object smaller SMB3.1.1: Fix ids returned in POSIX query dir smb3: add dynamic trace point to trace when credits obtained smb3.1.1: do not fail if no encryption required but server doesn't support it cifs: Return the error from crypt_message when enc/dec key not found. smb3.1.1: set gcm256 when requested smb3.1.1: rename nonces used for GCM and CCM encryption smb3.1.1: print warning if server does not support requested encryption type smb3.1.1: add new module load parm enable_gcm_256 ... commit c4728cfbed0f54eacc21138c99da2a91895c8c5a Merge: f9a705ad1c077 407e9c63ee571 Author: Linus Torvalds Date: Fri Oct 23 11:33:41 2020 -0700 Merge tag 'vfs-5.10-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull clone/dedupe/remap code refactoring from Darrick Wong: "Move the generic file range remap (aka reflink and dedupe) functions out of mm/filemap.c and fs/read_write.c and into fs/remap_range.c to reduce clutter in the first two files" * tag 'vfs-5.10-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: vfs: move the generic write and copy checks out of mm vfs: move the remap range helpers to remap_range.c vfs: move generic_remap_checks out of mm commit 2e34ae02a9b49d1f459d811ae77d72d300584a69 Author: Helge Deller Date: Fri Oct 23 20:23:47 2020 +0200 ata: pata_ns87415.c: Document support on parisc with superio chip I tested this driver on my HP PA-RISC C3000 workstation and it does work with the built-in TEAC CD-532E-B CD-ROM drive. So drop the TODO item and adjust the file header. Signed-off-by: Helge Deller commit 94bd5719e491564c61ee9f121d544e23b4e51374 Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:32:55 2020 +0200 ata: fix some kernel-doc markups Some functions have different names between their prototypes and the kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jens Axboe commit 24f7bb8863eb63b97ff7a83e6dd0d188a1c0575e Author: Mauro Carvalho Chehab Date: Fri Oct 23 18:32:54 2020 +0200 block: blk-mq: fix a kernel-doc markup Fix a typo: blk_mq_run_hw_queue -> blk_mq_run_hw_queues Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jens Axboe commit f9a705ad1c077ec2872c641f0db9c0d5b4a097bb Merge: 9313f8026328d 29cf0f5007a21 Author: Linus Torvalds Date: Fri Oct 23 11:17:56 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "For x86, there is a new alternative and (in the future) more scalable implementation of extended page tables that does not need a reverse map from guest physical addresses to host physical addresses. For now it is disabled by default because it is still lacking a few of the existing MMU's bells and whistles. However it is a very solid piece of work and it is already available for people to hammer on it. Other updates: ARM: - New page table code for both hypervisor and guest stage-2 - Introduction of a new EL2-private host context - Allow EL2 to have its own private per-CPU variables - Support of PMU event filtering - Complete rework of the Spectre mitigation PPC: - Fix for running nested guests with in-kernel IRQ chip - Fix race condition causing occasional host hard lockup - Minor cleanups and bugfixes x86: - allow trapping unknown MSRs to userspace - allow userspace to force #GP on specific MSRs - INVPCID support on AMD - nested AMD cleanup, on demand allocation of nested SVM state - hide PV MSRs and hypercalls for features not enabled in CPUID - new test for MSR_IA32_TSC writes from host and guest - cleanups: MMU, CPUID, shared MSRs - LAPIC latency optimizations ad bugfixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (232 commits) kvm: x86/mmu: NX largepage recovery for TDP MMU kvm: x86/mmu: Don't clear write flooding count for direct roots kvm: x86/mmu: Support MMIO in the TDP MMU kvm: x86/mmu: Support write protection for nesting in tdp MMU kvm: x86/mmu: Support disabling dirty logging for the tdp MMU kvm: x86/mmu: Support dirty logging for the TDP MMU kvm: x86/mmu: Support changed pte notifier in tdp MMU kvm: x86/mmu: Add access tracking for tdp_mmu kvm: x86/mmu: Support invalidate range MMU notifier for TDP MMU kvm: x86/mmu: Allocate struct kvm_mmu_pages for all pages in TDP MMU kvm: x86/mmu: Add TDP MMU PF handler kvm: x86/mmu: Remove disallowed_hugepage_adjust shadow_walk_iterator arg kvm: x86/mmu: Support zapping SPTEs in the TDP MMU KVM: Cache as_id in kvm_memory_slot kvm: x86/mmu: Add functions to handle changed TDP SPTEs kvm: x86/mmu: Allocate and free TDP MMU roots kvm: x86/mmu: Init / Uninit the TDP MMU kvm: x86/mmu: Introduce tdp_iter KVM: mmu: extract spte.h and spte.c KVM: mmu: Separate updating a PTE from kvm_set_pte_rmapp ... commit 44a4c9e443674e6cd3368d3e642dfe9c429d5525 Author: Helge Deller Date: Thu Oct 22 18:40:07 2020 +0200 parisc: Add wrapper syscalls to fix O_NONBLOCK flag usage The commit 75ae04206a4d ("parisc: Define O_NONBLOCK to become 000200000") changed the O_NONBLOCK constant to have only one bit set (like all other architectures). This change broke some existing userspace code (e.g. udevadm, systemd-udevd, elogind) which called specific syscalls which do strict value checking on their flag parameter. This patch adds wrapper functions for the relevant syscalls. The wrappers masks out any old invalid O_NONBLOCK flags, reports in the syslog if the old O_NONBLOCK value was used and then calls the target syscall with the new O_NONBLOCK value. Fixes: 75ae04206a4d ("parisc: Define O_NONBLOCK to become 000200000") Signed-off-by: Helge Deller Tested-by: Meelis Roos Tested-by: Jeroen Roovers commit f7d933388f11f66e5af9e5663a17f26523fddd07 Author: Jerome Brunet Date: Fri Oct 23 11:41:39 2020 +0200 arm64: dts: meson: odroid-n2 plus: fix vddcpu_a pwm On the odroid N2 plus, cpufreq is not available due to an error on the cpu regulators. vddcpu a and b get the same PWM. The one provided to vddcpu A is incorrect. Because vddcpu B PWM is busy the regulator cannot register: > pwm-regulator regulator-vddcpu-b: Failed to get PWM: -16 Like on the odroid n2, use PWM A out of GPIOE_2 for vddcpu A to fix the problem Fixes: 98d24896ee11 ("arm64: dts: meson: add support for the ODROID-N2+") Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201023094139.809379-1-jbrunet@baylibre.com commit 930eae9d3dd474ca1d5de63ea05d73075405cf6a Author: Martin Blumenstingl Date: Sat Aug 15 20:19:57 2020 +0200 ARM: dts: meson8: remove two invalid interrupt lines from the GPU node The 3.10 vendor kernel defines the following GPU 20 interrupt lines: #define INT_MALI_GP AM_IRQ(160) #define INT_MALI_GP_MMU AM_IRQ(161) #define INT_MALI_PP AM_IRQ(162) #define INT_MALI_PMU AM_IRQ(163) #define INT_MALI_PP0 AM_IRQ(164) #define INT_MALI_PP0_MMU AM_IRQ(165) #define INT_MALI_PP1 AM_IRQ(166) #define INT_MALI_PP1_MMU AM_IRQ(167) #define INT_MALI_PP2 AM_IRQ(168) #define INT_MALI_PP2_MMU AM_IRQ(169) #define INT_MALI_PP3 AM_IRQ(170) #define INT_MALI_PP3_MMU AM_IRQ(171) #define INT_MALI_PP4 AM_IRQ(172) #define INT_MALI_PP4_MMU AM_IRQ(173) #define INT_MALI_PP5 AM_IRQ(174) #define INT_MALI_PP5_MMU AM_IRQ(175) #define INT_MALI_PP6 AM_IRQ(176) #define INT_MALI_PP6_MMU AM_IRQ(177) #define INT_MALI_PP7 AM_IRQ(178) #define INT_MALI_PP7_MMU AM_IRQ(179) However, the driver from the 3.10 vendor kernel does not use the following four interrupt lines: - INT_MALI_PP3 - INT_MALI_PP3_MMU - INT_MALI_PP7 - INT_MALI_PP7_MMU Drop the "pp3" and "ppmmu3" interrupt lines. This is also important because there is no matching entry in interrupt-names for it (meaning the "pp2" interrupt is actually assigned to the "pp3" interrupt line). Fixes: 7d3f6b536e72c9 ("ARM: dts: meson8: add the Mali-450 MP6 GPU") Reported-by: Thomas Graichen Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Tested-by: thomas graichen Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200815181957.408649-1-martin.blumenstingl@googlemail.com commit 9313f8026328d0309d093f6774be4b8f5340c0e5 Merge: 090a7d046feda 88a0d60c6445f Author: Linus Torvalds Date: Fri Oct 23 11:00:57 2020 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "vhost, vdpa, and virtio cleanups and fixes A very quiet cycle, no new features" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: MAINTAINERS: add URL for virtio-mem vhost_vdpa: remove unnecessary spin_lock in vhost_vring_call vringh: fix __vringh_iov() when riov and wiov are different vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK s390: virtio: PV needs VIRTIO I/O device protection virtio: let arch advertise guest's memory access restrictions vhost_vdpa: Fix duplicate included kernel.h vhost: reduce stack usage in log_used virtio-mem: Constify mem_id_table virtio_input: Constify id_table virtio-balloon: Constify id_table vdpa/mlx5: Fix failure to bring link up vdpa/mlx5: Make use of a specific 16 bit endianness API commit 090a7d046fedaaaf41fcdd84ca11764fa5d35233 Merge: 4a22709e21c2b 3e98fd6d816cd Author: Linus Torvalds Date: Fri Oct 23 10:54:13 2020 -0700 Merge tag 'tag-chrome-platform-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Benson Leung: "cros-ec: - Error code cleanup across cros-ec by Guenter - Remove cros_ec_cmd_xfer in favor of cros_ec_cmd_xfer_status cros_ec_typec: - Landed initial USB4 support in typec connector class driver for cros_ec - Role switch bugfix on disconnect, and reordering configuration steps cros_ec_lightbar: - Fix buffer outsize and result for get_lightbar_version misc: - Remove config MFD_CROS_EC, now that transition from MFD is complete - Enable KEY_LEFTMETA in new location on arm based cros-ec-keyboard keymap" * tag 'tag-chrome-platform-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: ARM: dts: cros-ec-keyboard: Add alternate keymap for KEY_LEFTMETA platform/chrome: Use kobj_to_dev() instead of container_of() platform/chrome: cros_ec_proto: Drop cros_ec_cmd_xfer() platform/chrome: cros_ec_proto: Update cros_ec_cmd_xfer() call-sites platform/chrome: Kconfig: Remove the transitional MFD_CROS_EC config platform/chrome: cros_ec_lightbar: Reduce ligthbar get version command platform/chrome: cros_ec_trace: Add fields to command traces platform/chrome: cros_ec_typec: Re-order connector configuration steps platform/chrome: cros_ec_typec: Avoid setting usb role twice during disconnect platform/chrome: cros_ec_typec: Send enum values to usb_role_switch_set_role() platform/chrome: cros_ec_typec: USB4 support pwm: cros-ec: Simplify EC error handling platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes platform/input: cros_ec: Replace -ENOTSUPP with -ENOPROTOOPT pwm: cros-ec: Accept more error codes from cros_ec_cmd_xfer_status platform/chrome: cros_ec_sysfs: Report range of error codes from EC cros_ec_lightbar: Accept more error codes from cros_ec_cmd_xfer_status iio: cros_ec: Accept -EOPNOTSUPP as 'not supported' error code commit 43b6bf406cd0319e522638f97c9086b7beebaeaa Author: Sascha Hauer Date: Wed Oct 21 12:45:13 2020 +0200 spi: imx: fix runtime pm support for !CONFIG_PM 525c9e5a32bd introduced pm_runtime support for the i.MX SPI driver. With this pm_runtime is used to bring up the clocks initially. When CONFIG_PM is disabled the clocks are no longer enabled and the driver doesn't work anymore. Fix this by enabling the clocks in the probe function and telling pm_runtime that the device is active using pm_runtime_set_active(). Fixes: 525c9e5a32bd spi: imx: enable runtime pm support Tested-by: Christian Eggers [tested for !CONFIG_PM only] Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20201021104513.21560-1-s.hauer@pengutronix.de Signed-off-by: Mark Brown commit 6e5329c6e6032cd997400b43b8299f607a61883e Author: Bard Liao Date: Wed Oct 21 21:24:19 2020 +0300 ASoC: SOF: loader: handle all SOF_IPC_EXT types Do not emit a warning for extended firmware header fields that are not used by kernel. This creates unnecessary noise to kernel logs like: sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 3 size 0x1c sof-audio-pci 0000:00:1f.3: warning: unknown ext header type 4 size 0x10 Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201021182419.1160391-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 20afe581c9b980848ad097c4d54dde9bec7593ef Author: Olivier Moysan Date: Tue Oct 20 17:01:09 2020 +0200 ASoC: cs42l51: manage mclk shutdown delay A delay must be introduced before the shutdown down of the mclk, as stated in CS42L51 datasheet. Otherwise the codec may produce some noise after the end of DAPM power down sequence. The delay between DAC and CLOCK_SUPPLY widgets is too short. Add a delay in mclk shutdown request to manage the shutdown delay explicitly. From experiments, at least 10ms delay is necessary. Set delay to 20ms as recommended in Documentation/timers/timers-howto.rst when using msleep(). Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20201020150109.482-1-olivier.moysan@st.com Signed-off-by: Mark Brown commit 3f48b6eba15ea342ef4cb420b580f5ed6605669f Author: Srinivas Kandagatla Date: Fri Oct 23 10:58:49 2020 +0100 ASoC: qcom: sdm845: set driver name correctly With the current state of code, we would endup with something like below in /proc/asound/cards for 2 machines based on this driver. Machine 1: 0 [DB845c ]: DB845c - DB845c DB845c Machine 2: 0 [LenovoYOGAC6301]: Lenovo-YOGA-C63 - Lenovo-YOGA-C630-13Q50 LENOVO-81JL-LenovoYOGAC630_13Q50-LNVNB161216 This is not very UCM friendly both w.r.t to common up configs and card identification, and UCM2 became totally not usefull with just one ucm sdm845.conf for two machines which have different setups w.r.t HDMI and other dais. Reasons for such thing is partly because Qualcomm machine drivers never cared to set driver_name. This patch sets up driver name for the this driver to sort out the UCM integration issues! after this patch contents of /proc/asound/cards: Machine 1: 0 [DB845c ]: sdm845 - DB845c DB845c Machine 2: 0 [LenovoYOGAC6301]: sdm845 - Lenovo-YOGA-C630-13Q50 LENOVO-81JL-LenovoYOGAC630_13Q50-LNVNB161216 with this its possible to align with what UCM2 expects and we can have sdm845/DB845.conf sdm845/LENOVO-81JL-LenovoYOGAC630_13Q50-LNVNB161216.conf ... for board variants. This should scale much better! Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201023095849.22894-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit f47d0742515748162d3fc35f04331c5b81c0ed47 Author: Srinivas Kandagatla Date: Thu Oct 22 14:05:18 2020 +0100 ASoC: codecs: wsa881x: add missing stream rates and format Add missing supported rates and formats for the stream, without which attempt to do playback will fail to find any matching rates/format. Fixes: a0aab9e1404a ("ASoC: codecs: add wsa881x amplifier support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201022130518.31723-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 4a22709e21c2b1bedf90f68c823daf65d8e6b491 Merge: 0a14d7649872b 91989c707884e Author: Linus Torvalds Date: Fri Oct 23 10:06:38 2020 -0700 Merge tag 'arch-cleanup-2020-10-22' of git://git.kernel.dk/linux-block Pull arch task_work cleanups from Jens Axboe: "Two cleanups that don't fit other categories: - Finally get the task_work_add() cleanup done properly, so we don't have random 0/1/false/true/TWA_SIGNAL confusing use cases. Updates all callers, and also fixes up the documentation for task_work_add(). - While working on some TIF related changes for 5.11, this TIF_NOTIFY_RESUME cleanup fell out of that. Remove some arch duplication for how that is handled" * tag 'arch-cleanup-2020-10-22' of git://git.kernel.dk/linux-block: task_work: cleanup notification modes tracehook: clear TIF_NOTIFY_RESUME in tracehook_notify_resume() commit 0a14d7649872be966d12bc6c3056bb37c27b94bd Merge: 032c7ed958174 8c42a5c02bec6 Author: Linus Torvalds Date: Fri Oct 23 09:59:25 2020 -0700 Merge tag 'arc-5.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fix from Vineet Gupta: "I found a snafu in perf driver which made it into 5.9-rc4 and the fix should go in now than wait" * tag 'arc-5.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: perf: redo the pct irq missing in device-tree handling commit 032c7ed958174957a4d6eac61806f66e1123d815 Merge: f9893351acaec 66dd3474702aa Author: Linus Torvalds Date: Fri Oct 23 09:46:16 2020 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull more arm64 updates from Will Deacon: "A small selection of further arm64 fixes and updates. Most of these are fixes that came in during the merge window, with the exception of the HAVE_MOVE_PMD mremap() speed-up which we discussed back in 2018 and somehow forgot to enable upstream. - Improve performance of Spectre-v2 mitigation on Falkor CPUs (if you're lucky enough to have one) - Select HAVE_MOVE_PMD. This has been shown to improve mremap() performance, which is used heavily by the Android runtime GC, and it seems we forgot to enable this upstream back in 2018. - Ensure linker flags are consistent between LLVM and BFD - Fix stale comment in Spectre mitigation rework - Fix broken copyright header - Fix KASLR randomisation of the linear map - Prevent arm64-specific prctl()s from compat tasks (return -EINVAL)" Link: https://lore.kernel.org/kvmarm/20181108181201.88826-3-joelaf@google.com/ * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: proton-pack: Update comment to reflect new function name arm64: spectre-v2: Favour CPU-specific mitigation at EL2 arm64: link with -z norelro regardless of CONFIG_RELOCATABLE arm64: Fix a broken copyright header in gen_vdso_offsets.sh arm64: mremap speedup - Enable HAVE_MOVE_PMD arm64: mm: use single quantity to represent the PA to VA translation arm64: reject prctl(PR_PAC_RESET_KEYS) on compat tasks commit 2818cc745445ae5866598fe45fe563ef843e30af Merge: 652af650d3f61 0fada277147ff 9a4888888cc09 d85cc6635a2a1 d7a4a85c9a34b abcba2e135ec4 Author: Rafael J. Wysocki Date: Fri Oct 23 18:16:56 2020 +0200 Merge branches 'acpi-debug', 'acpi-reboot', 'acpi-processor', 'acpi-dptf' and 'acpi-utils' * acpi-debug: ACPI: debug: don't allow debugging when ACPI is disabled * acpi-reboot: ACPI: reboot: Avoid racing after writing to ACPI RESET_REG * acpi-processor: ACPI: processor: remove comment regarding string _UID support * acpi-dptf: ACPI: DPTF: Add ACPI_DPTF Kconfig menu ACPI: DPTF: Fix participant driver names * acpi-utils: ACPI: utils: remove unreachable breaks commit 41c169d9ae2c890552044e129d101995b62c8a02 Merge: 71d47b53dee0a 785b5bb41b0a9 Author: Rafael J. Wysocki Date: Fri Oct 23 18:12:32 2020 +0200 Merge branch 'pm-avs' * pm-avs: PM: AVS: Drop the avs directory and the corresponding Kconfig PM: AVS: qcom-cpr: Move the driver to the qcom specific drivers PM: AVS: smartreflex Move driver to soc specific drivers PM: AVS: rockchip-io: Move the driver to the rockchip specific drivers commit 71d47b53dee0a951417a1bc6d255a45c63cc51b1 Merge: db06391e05a6b aa9c9b3f3f08c d298787dbbab5 79d6c4093bb14 f8fee6e63e55a Author: Rafael J. Wysocki Date: Fri Oct 23 18:11:23 2020 +0200 Merge branches 'pm-core', 'pm-sleep', 'pm-tools' and 'powercap' * pm-core: PM: runtime: Fix typo in pm_runtime_set_active() helper comment * pm-sleep: PM: sleep: remove unreachable break * pm-tools: cpupower: speed up generating git version string cpupowerutils: fix spelling mistake "dependant" -> "dependent" * powercap: powercap: Fix typo in Kconfig "Plance" -> "Plane" powercap/intel_rapl: enumerate Psys RAPL domain together with package RAPL domain powercap/intel_rapl: Fix domain detection commit db06391e05a6beb134ec506a64dedd21328606dc Merge: 330e3932a4811 0070ea2962390 75af76d0a34e0 Author: Rafael J. Wysocki Date: Fri Oct 23 18:10:59 2020 +0200 Merge branches 'pm-cpufreq' and 'pm-cpuidle' * pm-cpufreq: cpufreq: schedutil: restore cached freq when next_f is not changed acpi-cpufreq: Honor _PSD table setting on new AMD CPUs cpufreq: intel_pstate: Delete intel_pstate sysfs if failed to register the driver cpufreq: Improve code around unlisted freq check * pm-cpuidle: intel_idle: Ignore _CST if control cannot be taken from the platform cpuidle: Remove pointless stub intel_idle: mention assumption that WBINVD is not needed MAINTAINERS: Add section for cpuidle-psci PM domain commit 70a62fce262854c4aabaa47e46e82fce9f3f3938 Author: Jason Wang Date: Fri Oct 23 17:00:43 2020 +0800 vdpa_sim: implement get_iova_range() This implements a sample get_iova_range() for the simulator which advertise [0, ULLONG_MAX] as the valid range. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20201023090043.14430-4-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit 1b48dc03e575a872404f33b04cd237953c5d7498 Author: Jason Wang Date: Fri Oct 23 17:00:42 2020 +0800 vhost: vdpa: report iova range This patch introduces a new ioctl for vhost-vdpa device that can report the iova range by the device. For device that implements get_iova_range() method, we fetch it from the vDPA device. If device doesn't implement get_iova_range() but depends on platform IOMMU, we will query via DOMAIN_ATTR_GEOMETRY, otherwise [0, ULLONG_MAX] is assumed. For safety, this patch also rules out the map request which is not in the valid range. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20201023090043.14430-3-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit 3f1b623a1be92103386bcab818e25885d6be9419 Author: Jason Wang Date: Fri Oct 23 17:00:41 2020 +0800 vdpa: introduce config op to get valid iova range This patch introduce a config op to get valid iova range from the vDPA device. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20201023090043.14430-2-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit bedb0f056faa94e953e7b3da5a77d25e0008364b Author: Abhi Das Date: Tue Oct 20 15:58:05 2020 -0500 gfs2: Recover statfs info in journal head Apply the outstanding statfs changes in the journal head to the master statfs file. Zero out the local statfs file for good measure. Previously, statfs updates would be read in from the local statfs inode and synced to the master statfs inode during recovery. We now use the statfs updates in the journal head to update the master statfs inode instead of reading in from the local statfs inode. To preserve backward compatibility with kernels that can't do this, we still need to keep the local statfs inode up to date by writing changes to it. At some point in the future, we can do away with the local statfs inodes altogether and keep the statfs changes solely in the journal. Signed-off-by: Abhi Das Signed-off-by: Andreas Gruenbacher commit 97fd734ba17e32463742c569137f54f713c27fe0 Author: Abhi Das Date: Tue Oct 20 15:58:04 2020 -0500 gfs2: lookup local statfs inodes prior to journal recovery We need to lookup the master statfs inode and the local statfs inodes earlier in the mount process (in init_journal) so journal recovery can use them when it attempts to recover the statfs info. We lookup all the local statfs inodes and store them in a linked list to allow a node to recover statfs info for other nodes in the cluster. Signed-off-by: Abhi Das Signed-off-by: Andreas Gruenbacher commit ddc62910b48b8208c09ddee6aea6fd3568297a51 Merge: fd78874b710f4 f673714a12476 Author: Jens Axboe Date: Fri Oct 23 07:29:08 2020 -0600 Merge tag 'nvme-5.10-2020-10-23' of git://git.infradead.org/nvme into block-5.10 Pull NVMe fixes from Christoph: "nvme fixes for 5.10 - rdma error handling fixes (Chao Leng) - fc error handling and reconnect fixes (James Smart) - fix the qid displace when tracing ioctl command (Keith Busch) - don't use BLK_MQ_REQ_NOWAIT for passthru (Chaitanya Kulkarni) - fix MTDT for passthru (Logan Gunthorpe) - blacklist Write Same on more devices (Kai-Heng Feng) - fix an uninitialized work struct (zhenwei pi)" * tag 'nvme-5.10-2020-10-23' of git://git.infradead.org/nvme: nvme-fc: shorten reconnect delay if possible for FC nvme-fc: wait for queues to freeze before calling update_hr_hw_queues nvme-fc: fix error loop in create_hw_io_queues nvme-fc: fix io timeout to abort I/O nvmet: don't use BLK_MQ_REQ_NOWAIT for passthru nvmet: cleanup nvmet_passthru_map_sg() nvmet: limit passthru MTDS by BIO_MAX_PAGES nvmet: fix uninitialized work for zero kato nvme-pci: disable Write Zeroes on Sandisk Skyhawk nvme: use queuedata for nvme_req_qid nvme-rdma: fix crash due to incorrect cqe nvme-rdma: fix crash when connect rejected commit 0add6e9b88d0632a25323aaf4987dbacb0e4ae64 Author: Michael Walle Date: Fri Oct 23 00:23:37 2020 +0200 mmc: sdhci-of-esdhc: set timeout to max before tuning On rare occations there is the following error: mmc0: Tuning timeout, falling back to fixed sampling clock There are SD cards which takes a significant longer time to reply to the first CMD19 command. The eSDHC takes the data timeout value into account during the tuning period. The SDHCI core doesn't explicitly set this timeout for the tuning procedure. Thus on the slow cards, there might be a spurious "Buffer Read Ready" interrupt, which in turn triggers a wrong sequence of events. In the end this will lead to an unsuccessful tuning procedure and to the above error. To workaround this, set the timeout to the maximum value (which is the best we can do) and the SDHCI core will take care of the proper timeout handling. Fixes: ba49cbd0936e ("mmc: sdhci-of-esdhc: add tuning support") Signed-off-by: Michael Walle Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201022222337.19857-1-michael@walle.cc Signed-off-by: Ulf Hansson commit 652f3d00de523a17b0cebe7b90debccf13aa8c31 Author: Frank Yang Date: Fri Aug 21 03:16:50 2020 +0900 HID: cypress: Support Varmilo Keyboards' media hotkeys The Varmilo VA104M Keyboard (04b4:07b1, reported as Varmilo Z104M) exposes media control hotkeys as a USB HID consumer control device, but these keys do not work in the current (5.8-rc1) kernel due to the incorrect HID report descriptor. Fix the problem by modifying the internal HID report descriptor. More specifically, the keyboard report descriptor specifies the logical boundary as 572~10754 (0x023c ~ 0x2a02) while the usage boundary is specified as 0~10754 (0x00 ~ 0x2a02). This results in an incorrect interpretation of input reports, causing inputs to be ignored. By setting the Logical Minimum to zero, we align the logical boundary with the Usage ID boundary. Some notes: * There seem to be multiple variants of the VA104M keyboard. This patch specifically targets 04b4:07b1 variant. * The device works out-of-the-box on Windows platform with the generic consumer control device driver (hidserv.inf). This suggests that Windows either ignores the Logical Minimum/Logical Maximum or interprets the Usage ID assignment differently from the linux implementation; Maybe there are other devices out there that only works on Windows due to this problem? Signed-off-by: Frank Yang Signed-off-by: Jiri Kosina commit f673714a1247669bc90322dfb14a5cf553833796 Author: James Smart Date: Fri Oct 16 14:29:28 2020 -0700 nvme-fc: shorten reconnect delay if possible for FC We've had several complaints about a 10s reconnect delay (the default) when there was an error while there is connectivity to a subsystem. The max_reconnects and reconnect_delay are set in common code prior to calling the transport to create the controller. This change checks if the default reconnect delay is being used, and if so, it adjusts it to a shorter period (2s) for the nvme-fc transport. It does so by calculating the controller loss tmo window, changing the value of the reconnect delay, and then recalculating the maximum number of reconnect attempts allowed. Signed-off-by: James Smart Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 88e837ed0f1fddd34a19092aaa7098d579e6c506 Author: James Smart Date: Fri Oct 16 14:17:24 2020 -0700 nvme-fc: wait for queues to freeze before calling update_hr_hw_queues On reconnect, the code currently does not freeze the controller before possibly updating the number hw queues for the controller. Add the freeze before updating the number of hw queues. Note: the queues are already started and remain started through the reconnect. Signed-off-by: James Smart Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 514a6dc9ecfd2fe4e1deebcb7a63e3de23e6c38b Author: James Smart Date: Fri Oct 16 14:06:04 2020 -0700 nvme-fc: fix error loop in create_hw_io_queues The loop that backs out of hw io queue creation continues through index 0, which corresponds to the admin queue as well. Fix the loop so it only proceeds through indexes 1..n which correspond to I/O queues. Signed-off-by: James Smart Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 52793d62a696e9188092eb0817fb1219ee5729ff Author: James Smart Date: Fri Oct 16 14:06:27 2020 -0700 nvme-fc: fix io timeout to abort I/O Currently, an I/O timeout unconditionally invokes nvme_fc_error_recovery() which checks for LIVE or CONNECTING state. If live, the routine resets the controller which initiates a reconnect - which is valid. If CONNECTING, err_work is scheduled. Err_work then calls the terminate_io routine, which also checks for CONNECTING and noops any further action on outstanding I/O. The result is nothing happened to the timed out io. As such, if the command was dropped on the wire, it will never timeout / complete, and the connect process will hang. Change the behavior of the io timeout routine to unconditionally abort the I/O. I/O completion handling will note that an io failed due to an abort and will terminate the connection / association as needed. If the abort was unable to happen, continue with a call to nvme_fc_error_recovery(). To ensure something different happens in nvme_fc_error_recovery() rework it so at it will abort all I/Os on the association to force a failure. As I/O aborts now may occur outside of delete_association, counting for completion must be wary and only count those aborted during delete_association when TERMIO is set on the controller. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig commit 1a89c1dc9520b908e7894652ee2b19db9de37b64 Author: Juergen Gross Date: Thu Oct 22 11:49:07 2020 +0200 Documentation: add xen.fifo_events kernel parameter description The kernel boot parameter xen.fifo_events isn't listed in Documentation/admin-guide/kernel-parameters.txt. Add it. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Link: https://lore.kernel.org/r/20201022094907.28560-6-jgross@suse.com Signed-off-by: Boris Ostrovsky commit eabe741782d5a52ce884dba4bab8825f977ab1eb Author: Juergen Gross Date: Thu Oct 22 11:49:06 2020 +0200 xen/events: unmask a fifo event channel only if it was masked Unmasking an event channel with fifo events channels being used can require a hypercall to be made, so try to avoid that by checking whether the event channel was really masked. Suggested-by: Jan Beulich Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Link: https://lore.kernel.org/r/20201022094907.28560-5-jgross@suse.com Signed-off-by: Boris Ostrovsky commit d04b1ae5a9b0c868dda8b4b34175ef08f3cb9e93 Author: Juergen Gross Date: Thu Oct 22 11:49:05 2020 +0200 xen/events: only register debug interrupt for 2-level events xen_debug_interrupt() is specific to 2-level event handling. So don't register it with fifo event handling being active. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Link: https://lore.kernel.org/r/20201022094907.28560-4-jgross@suse.com Signed-off-by: Boris Ostrovsky commit 7e14cde10b1ea8157cca7b6b56901ef9cd4d36a3 Author: Juergen Gross Date: Thu Oct 22 11:49:04 2020 +0200 xen/events: make struct irq_info private to events_base.c The struct irq_info of Xen's event handling is used only for two evtchn_ops functions outside of events_base.c. Those two functions can easily be switched to avoid that usage. This allows to make struct irq_info and its related access functions private to events_base.c. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Link: https://lore.kernel.org/r/20201022094907.28560-3-jgross@suse.com Signed-off-by: Boris Ostrovsky commit 5894048775df4a65ee2b58a7c2fa3ca8c6984a78 Author: Juergen Gross Date: Thu Oct 22 11:49:03 2020 +0200 xen: remove no longer used functions With the switch to the lateeoi model for interdomain event channels some functions are no longer in use. Remove them. Suggested-by: Jan Beulich Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Link: https://lore.kernel.org/r/20201022094907.28560-2-jgross@suse.com Signed-off-by: Boris Ostrovsky commit 6857a5ebaabc5b9d989872700b4b71dd2a6d6453 Author: Christoph Hellwig Date: Sat Sep 26 16:11:03 2020 +0200 dma-mapping: document dma_{alloc,free}_pages Document the new dma_alloc_pages and dma_free_pages APIs, and fix up the documentation for dma_alloc_noncoherent and dma_free_noncoherent. Reported-by: Robin Murphy Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 2580a493a97da4a302cb66251b558bfc04c16e68 Author: Guido Günther Date: Tue Oct 13 12:32:48 2020 +0200 dt-binding: display: Require two resets on mantix panel We need to reset both for the panel to show an image. Fixes: b9ab1248d801 ("dt-bindings: Add Mantix MLAF057WE51-X panel bindings") Signed-off-by: Guido Günther Signed-off-by: Sam Ravnborg Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/15d3dc7eb4e031f380be1298ed3ac9085626f26b.1602584953.git.agx@sigxcpu.org commit 6af672523fe4bd71f5e70c50258fd0fc09663fae Author: Guido Günther Date: Tue Oct 13 12:32:47 2020 +0200 drm/panel: mantix: Fix panel reset The mantix panel needs two reset lines (RESX and TP_RSTN) deasserted to output an image. Only deasserting RESX is not enough and the display will stay blank. Deassert in prepare() and assert in unprepare() to keep device held in reset when off. Fixes: 72967d5616d3 ("drm/panel: Add panel driver for the Mantix MLAF057WE51-X DSI panel") Signed-off-by: Guido Günther Signed-off-by: Sam Ravnborg Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/ba71a8ab010d263a8058dd4f711e3bcd95877bf2.1602584953.git.agx@sigxcpu.org commit 938f324e7df25e89226c6fe137028af73cd6160b Author: Guido Günther Date: Tue Oct 13 12:32:46 2020 +0200 drm/panel: mantix: Don't dereference NULL mode Don't dereference mode which was just NULL checked. Fixes: 72967d5616d3 ("drm/panel: Add panel driver for the Mantix MLAF057WE51-X DSI panel") Signed-off-by: Guido Günther Reported-by: Dan Carpenter Signed-off-by: Sam Ravnborg Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/659158549f3c6cc1c71ceed0943e760e861c1206.1602584953.git.agx@sigxcpu.org commit 29cf0f5007a215b51feb0ae25ca5353480d53ead Author: Ben Gardon Date: Wed Oct 14 11:27:00 2020 -0700 kvm: x86/mmu: NX largepage recovery for TDP MMU When KVM maps a largepage backed region at a lower level in order to make it executable (i.e. NX large page shattering), it reduces the TLB performance of that region. In order to avoid making this degradation permanent, KVM must periodically reclaim shattered NX largepages by zapping them and allowing them to be rebuilt in the page fault handler. With this patch, the TDP MMU does not respect KVM's rate limiting on reclaim. It traverses the entire TDP structure every time. This will be addressed in a future patch. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-21-bgardon@google.com> Signed-off-by: Paolo Bonzini commit daa5b6c12337a0e6e269d022baa21b0549f507c3 Author: Ben Gardon Date: Wed Oct 14 11:26:59 2020 -0700 kvm: x86/mmu: Don't clear write flooding count for direct roots Direct roots don't have a write flooding count because the guest can't affect that paging structure. Thus there's no need to clear the write flooding count on a fast CR3 switch for direct roots. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-20-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 95fb5b0258b7bd2d540102771e31cfd76b72aa7b Author: Ben Gardon Date: Wed Oct 14 11:26:58 2020 -0700 kvm: x86/mmu: Support MMIO in the TDP MMU In order to support MMIO, KVM must be able to walk the TDP paging structures to find mappings for a given GFN. Support this walk for the TDP MMU. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 v2: Thanks to Dan Carpenter and kernel test robot for finding that root was used uninitialized in get_mmio_spte. Signed-off-by: Ben Gardon Reported-by: kernel test robot Reported-by: Dan Carpenter Message-Id: <20201014182700.2888246-19-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 46044f72c3826b7528339f454fe8900bae6adaaa Author: Ben Gardon Date: Wed Oct 14 11:26:57 2020 -0700 kvm: x86/mmu: Support write protection for nesting in tdp MMU To support nested virtualization, KVM will sometimes need to write protect pages which are part of a shadowed paging structure or are not writable in the shadowed paging structure. Add a function to write protect GFN mappings for this purpose. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-18-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 14881998566d2dc0703870bbe063e8d42d780eb9 Author: Ben Gardon Date: Wed Oct 14 11:26:56 2020 -0700 kvm: x86/mmu: Support disabling dirty logging for the tdp MMU Dirty logging ultimately breaks down MMU mappings to 4k granularity. When dirty logging is no longer needed, these granaular mappings represent a useless performance penalty. When dirty logging is disabled, search the paging structure for mappings that could be re-constituted into a large page mapping. Zap those mappings so that they can be faulted in again at a higher mapping level. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-17-bgardon@google.com> Signed-off-by: Paolo Bonzini commit a6a0b05da9f37ff56faa6b8351ed6e0b55032460 Author: Ben Gardon Date: Wed Oct 14 11:26:55 2020 -0700 kvm: x86/mmu: Support dirty logging for the TDP MMU Dirty logging is a key feature of the KVM MMU and must be supported by the TDP MMU. Add support for both the write protection and PML dirty logging modes. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-16-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 1d8dd6b3f12b03f617820a9ebc19cc2fabf59ce9 Author: Ben Gardon Date: Wed Oct 14 11:26:54 2020 -0700 kvm: x86/mmu: Support changed pte notifier in tdp MMU In order to interoperate correctly with the rest of KVM and other Linux subsystems, the TDP MMU must correctly handle various MMU notifiers. Add a hook and handle the change_pte MMU notifier. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-15-bgardon@google.com> Signed-off-by: Paolo Bonzini commit f8e144971c6834fa1e171be4cd8026f8bc537bca Author: Ben Gardon Date: Wed Oct 14 11:26:53 2020 -0700 kvm: x86/mmu: Add access tracking for tdp_mmu In order to interoperate correctly with the rest of KVM and other Linux subsystems, the TDP MMU must correctly handle various MMU notifiers. The main Linux MM uses the access tracking MMU notifiers for swap and other features. Add hooks to handle the test/flush HVA (range) family of MMU notifiers. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-14-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 063afacd8730be3d9a3d50f9ea730f840265aba0 Author: Ben Gardon Date: Wed Oct 14 11:26:52 2020 -0700 kvm: x86/mmu: Support invalidate range MMU notifier for TDP MMU In order to interoperate correctly with the rest of KVM and other Linux subsystems, the TDP MMU must correctly handle various MMU notifiers. Add hooks to handle the invalidate range family of MMU notifiers. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-13-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 89c0fd494af3912d32ba5765b7147f36a34d1fa3 Author: Ben Gardon Date: Wed Oct 14 11:26:51 2020 -0700 kvm: x86/mmu: Allocate struct kvm_mmu_pages for all pages in TDP MMU Attach struct kvm_mmu_pages to every page in the TDP MMU to track metadata, facilitate NX reclaim, and enable inproved parallelism of MMU operations in future patches. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-12-bgardon@google.com> Signed-off-by: Paolo Bonzini commit bb18842e21111a979e2e0e1c5d85c09646f18d51 Author: Ben Gardon Date: Wed Oct 14 11:26:50 2020 -0700 kvm: x86/mmu: Add TDP MMU PF handler Add functions to handle page faults in the TDP MMU. These page faults are currently handled in much the same way as the x86 shadow paging based MMU, however the ordering of some operations is slightly different. Future patches will add eager NX splitting, a fast page fault handler, and parallel page faults. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-11-bgardon@google.com> Signed-off-by: Paolo Bonzini commit a779d91314ca7208b7feb3ad817b62904397c56d Author: zhuoliang zhang Date: Fri Oct 23 09:05:35 2020 +0200 net: xfrm: fix a race condition during allocing spi we found that the following race condition exists in xfrm_alloc_userspi flow: user thread state_hash_work thread ---- ---- xfrm_alloc_userspi() __find_acq_core() /*alloc new xfrm_state:x*/ xfrm_state_alloc() /*schedule state_hash_work thread*/ xfrm_hash_grow_check() xfrm_hash_resize() xfrm_alloc_spi /*hold lock*/ x->id.spi = htonl(spi) spin_lock_bh(&net->xfrm.xfrm_state_lock) /*waiting lock release*/ xfrm_hash_transfer() spin_lock_bh(&net->xfrm.xfrm_state_lock) /*add x into hlist:net->xfrm.state_byspi*/ hlist_add_head_rcu(&x->byspi) spin_unlock_bh(&net->xfrm.xfrm_state_lock) /*add x into hlist:net->xfrm.state_byspi 2 times*/ hlist_add_head_rcu(&x->byspi) 1. a new state x is alloced in xfrm_state_alloc() and added into the bydst hlist in __find_acq_core() on the LHS; 2. on the RHS, state_hash_work thread travels the old bydst and tranfers every xfrm_state (include x) into the new bydst hlist and new byspi hlist; 3. user thread on the LHS gets the lock and adds x into the new byspi hlist again. So the same xfrm_state (x) is added into the same list_hash (net->xfrm.state_byspi) 2 times that makes the list_hash become an inifite loop. To fix the race, x->id.spi = htonl(spi) in the xfrm_alloc_spi() is moved to the back of spin_lock_bh, sothat state_hash_work thread no longer add x which id.spi is zero into the hash_list. Fixes: f034b5d4efdf ("[XFRM]: Dynamic xfrm_state hash table sizing.") Signed-off-by: zhuoliang zhang Acked-by: Herbert Xu Signed-off-by: Steffen Klassert commit b45b6fbc671c60f56fd119c443e5570f83175928 Merge: 3f31dedb49b53 5c6c13cd1102c Author: Dave Airlie Date: Fri Oct 23 09:46:18 2020 +1000 Merge tag 'drm-intel-next-fixes-2020-10-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Tweak initia DPCD backlight.enabled value (Sean) - Initialize reserved MOCS indices (Ayaz) - Mark initial fb obj as WT on eLLC machines to avoid rcu lockup (Ville) - Support parsing of oversize batches (Chris) - Delay execlists processing for TGL (Chris) - Use the active reference on the vma during error capture (Chris) - Widen CSB pointer (Chris) - Wait for CSB entries on TGL (Chris) - Fix unwind for scratch page allocation (Chris) - Exclude low patches of stolen memory (Chris) - Force VT'd workarounds when running as a guest OS (Chris) - Drop runtime-pm assert from vpgu io accessors (Chris) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20201022205613.GA3469192@intel.com commit 3f31dedb49b5324b39c5b8db31509b55e407cddc Merge: fea456d82c19d 687e79c0feb42 Author: Dave Airlie Date: Fri Oct 23 09:40:41 2020 +1000 Merge tag 'amd-drm-fixes-5.10-2020-10-21' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-fixes-5.10-2020-10-21: amdgpu: - Sienna Cichlid fixes - MST manager resource leak fix - GPU reset fix amdkfd: - Luxmark fix for Navi1x Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201022040322.4183-1-alexander.deucher@amd.com commit 62af696471e58bdfcf416fd56f032a60853c2bae Author: Fam Zheng Date: Thu Oct 22 07:54:03 2020 +0100 docs: Add two missing entries in vm sysctl index Both seem overlooked while adding the section in the main content. Signed-off-by: Fam Zheng Link: https://lore.kernel.org/r/20201022065403.3936070-1-fam@euphon.net Signed-off-by: Jonathan Corbet commit 94ebdd28fcab7ef1484cd98f4a8e8426fe207994 Author: Colin Ian King Date: Thu Oct 22 15:26:53 2020 +0100 docs/vm: trivial fixes to several spelling mistakes Fix several spelling mistakes in vm documentation. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201022142653.254429-1-colin.king@canonical.com Signed-off-by: Jonathan Corbet commit 879bc2d27904354b98ca295b6168718e045c4aa2 Author: Helge Deller Date: Mon Oct 19 16:57:50 2020 +0200 hil/parisc: Disable HIL driver when it gets stuck When starting a HP machine with HIL driver but without an HIL keyboard or HIL mouse attached, it may happen that data written to the HIL loop gets stuck (e.g. because the transaction queue is full). Usually one will then have to reboot the machine because all you see is and endless output of: Transaction add failed: transaction already queued? In the higher layers hp_sdc_enqueue_transaction() is called to queued up a HIL packet. This function returns an error code, and this patch adds the necessary checks for this return code and disables the HIL driver if further packets can't be sent. Tested on a HP 730 and a HP 715/64 machine. Signed-off-by: Helge Deller Cc: commit faade0986e840884438a6e8a21b782c34eb1109c Author: Helge Deller Date: Sat Oct 17 20:13:06 2020 +0200 parisc: Improve error return codes when setting rtc time The HP 730 machine returned strange errors when I tried setting the rtc time. Add some debug code to improve the possibility to trace errors and document that hppa probably has as Y2k38 problem. Signed-off-by: Helge Deller commit f9893351acaecf0a414baf9942b48d5bb5c688c6 Merge: 746b25b1aa0f5 f9a825a7f65a1 Author: Linus Torvalds Date: Thu Oct 22 13:20:39 2020 -0700 Merge tag 'kconfig-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kconfig updates from Masahiro Yamada: - Remove unused or useless code from qconf - Allow to edit "int", "hex", "string" options in place, and remove the separate edit box from qconf * tag 'kconfig-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: qconf: create QApplication after option checks kconfig: qconf: remove Y, M, N columns kconfig: qconf: remove ConfigView class kconfig: qconf: move setShowName/Range() to ConfigList from ConfigView kconfig: qconf: remove ConfigLineEdit class kconfig: qconf: allow to edit "int", "hex", "string" menus in-place kconfig: qconf: show data column all the time kconfig: qconf: move ConfigView::updateList(All) to ConfigList class kconfig: qconf: remove unused ConfigItem::okRename() kconfig: qconf: update the intro message to match to the current code kconfig: qconf: reformat the intro message commit ee6e00c868221f5f7d0b6eb4e8379a148e26bc20 Author: Jens Axboe Date: Thu Oct 22 14:15:51 2020 -0600 splice: change exported internal do_splice() helper to take kernel offset With the set_fs change, we can no longer rely on copy_{to,from}_user() accepting a kernel pointer, and it was bad form to do so anyway. Clean this up and change the internal helper that io_uring uses to deal with kernel pointers instead. This puts the offset copy in/out in __do_splice() instead, which just calls the same helper. Signed-off-by: Jens Axboe commit 4017eb91a9e79bbb5d14868c207436f4a6a0af50 Author: Jens Axboe Date: Thu Oct 22 14:14:12 2020 -0600 io_uring: make loop_rw_iter() use original user supplied pointers We jump through a hoop for fixed buffers, where we first map these to a bvec(), then kmap() the bvec to obtain the pointer we copy to/from. This was always a bit ugly, and with the set_fs changes, it ends up being practically problematic as well. There's no need to jump through these hoops, just use the original user pointers and length for the non iter based read/write. Signed-off-by: Jens Axboe commit 746b25b1aa0f5736d585728ded70a8141da91edb Merge: 2b71482060e1e 1e66d50ad3a1d Author: Linus Torvalds Date: Thu Oct 22 13:13:57 2020 -0700 Merge tag 'kbuild-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Support 'make compile_commands.json' to generate the compilation database more easily, avoiding stale entries - Support 'make clang-analyzer' and 'make clang-tidy' for static checks using clang-tidy - Preprocess scripts/modules.lds.S to allow CONFIG options in the module linker script - Drop cc-option tests from compiler flags supported by our minimal GCC/Clang versions - Use always 12-digits commit hash for CONFIG_LOCALVERSION_AUTO=y - Use sha1 build id for both BFD linker and LLD - Improve deb-pkg for reproducible builds and rootless builds - Remove stale, useless scripts/namespace.pl - Turn -Wreturn-type warning into error - Fix build error of deb-pkg when CONFIG_MODULES=n - Replace 'hostname' command with more portable 'uname -n' - Various Makefile cleanups * tag 'kbuild-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (34 commits) kbuild: Use uname for LINUX_COMPILE_HOST detection kbuild: Only add -fno-var-tracking-assignments for old GCC versions kbuild: remove leftover comment for filechk utility treewide: remove DISABLE_LTO kbuild: deb-pkg: clean up package name variables kbuild: deb-pkg: do not build linux-headers package if CONFIG_MODULES=n kbuild: enforce -Werror=return-type scripts: remove namespace.pl builddeb: Add support for all required debian/rules targets builddeb: Enable rootless builds builddeb: Pass -n to gzip for reproducible packages kbuild: split the build log of kallsyms kbuild: explicitly specify the build id style scripts/setlocalversion: make git describe output more reliable kbuild: remove cc-option test of -Werror=date-time kbuild: remove cc-option test of -fno-stack-check kbuild: remove cc-option test of -fno-strict-overflow kbuild: move CFLAGS_{KASAN,UBSAN,KCSAN} exports to relevant Makefiles kbuild: remove redundant CONFIG_KASAN check from scripts/Makefile.kasan kbuild: do not create built-in objects for external module builds ... commit 2b71482060e1e6962720dbca1dff702580fa0748 Merge: fc996db970a33 fdf09ab887829 Author: Linus Torvalds Date: Thu Oct 22 13:08:57 2020 -0700 Merge tag 'modules-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull modules updates from Jessica Yu: "Code cleanups: more informative error messages and statically initialize init_free_wq to avoid a workqueue warning" * tag 'modules-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: module: statically initialize init section freeing data module: Add more error message for failed kernel module loading commit fc996db970a33c74d3db3ee63532b15187258027 Merge: 60573c2966a1b 2e6cfd496f5b5 Author: Linus Torvalds Date: Thu Oct 22 13:00:44 2020 -0700 Merge tag 'vfio-v5.10-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - New fsl-mc vfio bus driver supporting userspace drivers of objects within NXP's DPAA2 architecture (Diana Craciun) - Support for exposing zPCI information on s390 (Matthew Rosato) - Fixes for "detached" VFs on s390 (Matthew Rosato) - Fixes for pin-pages and dma-rw accesses (Yan Zhao) - Cleanups and optimize vconfig regen (Zenghui Yu) - Fix duplicate irq-bypass token registration (Alex Williamson) * tag 'vfio-v5.10-rc1' of git://github.com/awilliam/linux-vfio: (30 commits) vfio iommu type1: Fix memory leak in vfio_iommu_type1_pin_pages vfio/pci: Clear token on bypass registration failure vfio/fsl-mc: fix the return of the uninitialized variable ret vfio/fsl-mc: Fix the dead code in vfio_fsl_mc_set_irq_trigger vfio/fsl-mc: Fixed vfio-fsl-mc driver compilation on 32 bit MAINTAINERS: Add entry for s390 vfio-pci vfio-pci/zdev: Add zPCI capabilities to VFIO_DEVICE_GET_INFO vfio/fsl-mc: Add support for device reset vfio/fsl-mc: Add read/write support for fsl-mc devices vfio/fsl-mc: trigger an interrupt via eventfd vfio/fsl-mc: Add irq infrastructure for fsl-mc devices vfio/fsl-mc: Added lock support in preparation for interrupt handling vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions vfio/fsl-mc: Implement VFIO_DEVICE_GET_REGION_INFO ioctl call vfio/fsl-mc: Implement VFIO_DEVICE_GET_INFO ioctl vfio/fsl-mc: Scan DPRC objects on vfio-fsl-mc driver bind vfio: Introduce capability definitions for VFIO_DEVICE_GET_INFO s390/pci: track whether util_str is valid in the zpci_dev s390/pci: stash version in the zpci_dev vfio/fsl-mc: Add VFIO framework skeleton for fsl-mc devices ... commit 60573c2966a1b560fabdffe308d47b6ba5585b15 Merge: 1553d96854b47 4e3dda0bc603c Author: Linus Torvalds Date: Thu Oct 22 12:58:21 2020 -0700 Merge tag 'rpmsg-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: "This introduces rpmsg_char support for GLINK and fixes a few issues" * tag 'rpmsg-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: rpmsg: glink: Expose rpmsg name attr for glink rpmsg: glink: Add support for rpmsg glink chrdev rpmsg: Guard against null endpoint ops in destroy rpmsg: glink: Use complete_all for open states rpmsg: virtio: fix compilation warning for virtio_rpmsg_channel description rpmsg: Avoid double-free in mtk_rpmsg_register_device rpmsg: smd: Fix a kobj leak in in qcom_smd_parse_edge() commit 1553d96854b47953e41e7f66b2bdbc1c0d13a3e5 Merge: 3fec0eaaf04ad 141bc97c1bfe3 Author: Linus Torvalds Date: Thu Oct 22 12:56:33 2020 -0700 Merge tag 'rproc-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This introduces support for the Mediatek MT9182 SCP and controlling the Cortex R5F processors found in TI K3 platforms. It clones the longstanding debugfs interface for controlling crash handling to sysfs. Lastly it solves a bug where after a warm reset of Qualcomm platforms the modem would crash upon first boot" * tag 'rproc-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: remoteproc/mediatek: Remove non-standard dsb() remoteproc: Add recovery configuration to the sysfs interface remoteproc: Add coredump as part of sysfs interface remoteproc: Change default dump configuration to "disabled" remoteproc: k3-r5: Add loading support for on-chip SRAM regions remoteproc: k3-r5: Initialize TCM memories for ECC remoteproc: k3-r5: Add a remoteproc driver for R5F subsystem dt-bindings: remoteproc: Add bindings for R5F subsystem on TI K3 SoCs remoteproc/mediatek: Add support for mt8192 SCP remoteproc: Fixup coredump debugfs disable request remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA boot remoteproc/mediatek: fix null pointer dereference on null scp pointer remoteproc: stm32: Fix pointer assignement remoteproc: scp: add COMPILE_TEST dependency commit 3fec0eaaf04adf5e23b2704f5490d5943fb8b0b1 Merge: ceae608a54898 5f56888fad468 Author: Linus Torvalds Date: Thu Oct 22 12:53:28 2020 -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 contains no changes to the core framework. It is a collection of various clk driver updates. The biggest driver updates in terms of lines of code is the Allwinner driver, closely followed by the Qualcomm and Mediatek drivers. All of those hit high because we add so many lines of clk data. Coming in fourth place is i.MX which also adds a bunch of clk data. This accounts for the new driver additions this time around. Otherwise the patches are lots of little cleanups and fixes for various clk drivers that have baked in linux-next for a while. I suppose one highlight or theme is that more clk drivers are being updated to work as modules, which is interesting to see such critical SoC infrastructure work as a loadable module. New Drivers: - Support qcom SM8150/SM8250 video and display clks - Support Mediatek MT8167 clks - Add clock for CRC block found on vf610 SoCs - Add support for the Renesas R-Car V3U (R8A779A0) SoC - Add support for the VSP for Resizing clock on Renesas RZ/G1H - Support Allwinner A100 SoC clks Removed Drivers: - Remove i.MX21 clock driver, as i.MX21 platform support is being dropped Updates: - Change how qcom's display port clks work - Small non-critical fixes for TI clk driver - Remove various unused variables in clk drivers - Allow Rockchip clk driver to be a module - Remove most __clk_lookup() calls in Samsung drivers (yay!) - Support building i.MX ARMv8 platforms clock driver as module - Some kerneldoc fixes here and there - A couple of minor i.MX clk data corrections - Update audio clock inverter and fdiv2 flag on Amlogic g12 - Make amlogic clk drivers configurable in Kconfig - Fix Renesas VSP clock names to match corrected hardware documentation - Sigma-delta modulation on Allwinner R40 - Various fixes for at91 clk driver - Use semicolons instead of commas in some places - Mark some variables const so they can move to RO memory" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (102 commits) clk: imx8mq: Fix usdhc parents order clk: qcom: gdsc: Keep RETAIN_FF bit set if gdsc is already on clk: Restrict CLK_HSDK to ARC_SOC_HSDK clk: at91: sam9x60: support only two programmable clocks clk: ingenic: Respect CLK_SET_RATE_PARENT in .round_rate clk: ingenic: Don't tag custom clocks with CLK_SET_RATE_PARENT clk: ingenic: Don't use CLK_SET_RATE_GATE for PLL clk: ingenic: Use readl_poll_timeout instead of custom loop clk: ingenic: Use to_clk_info() macro for all clocks clk: bcm2835: add missing release if devm_clk_hw_register fails clk: at91: clk-sam9x60-pll: remove unused variable clk: at91: clk-main: update key before writing AT91_CKGR_MOR clk: at91: remove the checking of parent_name clk: clk-prima2: fix return value check in prima2_clk_init() clk: mmp2: Fix the display clock divider base clk: pxa: Constify static struct clk_ops clk: baikal-t1: Mark Ethernet PLL as critical clk: qoriq: modify MAX_PLL_DIV to 32 clk: axi-clkgen: Set power bits for fractional mode clk: axi-clkgen: Add support for fractional dividers ... commit ceae608a54898fff2aa0aba358fe81af027ef8c9 Merge: 00937f36b09e8 3b1954cd57bf7 Author: Linus Torvalds Date: Thu Oct 22 12:51:32 2020 -0700 Merge tag 'pwm/for-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This release cycle's updates are mostly cleanup and some minor fixes" * tag 'pwm/for-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: dt-bindings: pwm: renesas,pwm-rcar: Add r8a7742 support dt-bindings: pwm: renesas,tpu-pwm: Document r8a7742 support pwm: Allow store 64-bit duty cycle from sysfs interface pwm: img: Fix null pointer access in probe pwm: pca9685: Disable unused alternative addresses pwm: pca9685: Use BIT() macro instead of shift pwm: pca9685: Make comments more consistent pwm: sun4i: Simplify with dev_err_probe() pwm: sprd: Simplify with dev_err_probe() pwm: sifive: Simplify with dev_err_probe() pwm: rockchip: Simplify with dev_err_probe() pwm: jz4740: Simplify with dev_err_probe() pwm: bcm2835: Simplify with dev_err_probe() pwm: Convert to use DEFINE_SEQ_ATTRIBUTE macro pwm: rockchip: Keep enabled PWMs running while probing dt-bindings: pwm: renesas,pwm-rcar: Add r8a774e1 support commit 00937f36b09e89c74e4a059dbb8acbf4b971d5eb Merge: 96485e4462604 28e34e751f6c5 Author: Linus Torvalds Date: Thu Oct 22 12:41:00 2020 -0700 Merge tag 'pci-v5.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "Enumeration: - Print IRQ number used by PCIe Link Bandwidth Notification (Dongdong Liu) - Add schedule point in pci_read_config() to reduce max latency (Jiang Biao) - Add Kconfig options for MPS/MRRS strategy (Jim Quinlan) Resource management: - Fix pci_iounmap() memory leak when !CONFIG_GENERIC_IOMAP (Lorenzo Pieralisi) PCIe native device hotplug: - Reduce noisiness on hot removal (Lukas Wunner) Power management: - Revert "PCI/PM: Apply D2 delay as milliseconds, not microseconds" that was done on the basis of spec typo (Bjorn Helgaas) - Rename pci_dev.d3_delay to d3hot_delay to remove D3hot/D3cold ambiguity (Krzysztof Wilczyński) - Remove unused pcibios_pm_ops (Vaibhav Gupta) IOMMU: - Enable Translation Blocking for external devices to harden against DMA attacks (Rajat Jain) Error handling: - Add an ACPI APEI notifier chain for vendor CPER records to enable device-specific error handling (Shiju Jose) ASPM: - Remove struct aspm_register_info to simplify code (Saheed O. Bolarinwa) Amlogic Meson PCIe controller driver: - Build as module by default (Kevin Hilman) Ampere Altra PCIe controller driver: - Add MCFG quirk to work around non-standard ECAM implementation (Tuan Phan) Broadcom iProc PCIe controller driver: - Set affinity mask on MSI interrupts (Mark Tomlinson) Broadcom STB PCIe controller driver: - Make PCIE_BRCMSTB depend on ARCH_BRCMSTB (Jim Quinlan) - Add DT bindings for more Brcmstb chips (Jim Quinlan) - Add bcm7278 register info (Jim Quinlan) - Add bcm7278 PERST# support (Jim Quinlan) - Add suspend and resume pm_ops (Jim Quinlan) - Add control of rescal reset (Jim Quinlan) - Set additional internal memory DMA viewport sizes (Jim Quinlan) - Accommodate MSI for older chips (Jim Quinlan) - Set bus max burst size by chip type (Jim Quinlan) - Add support for bcm7211, bcm7216, bcm7445, bcm7278 (Jim Quinlan) Freescale i.MX6 PCIe controller driver: - Use dev_err_probe() to reduce redundant messages (Anson Huang) Freescale Layerscape PCIe controller driver: - Enforce 4K DMA buffer alignment in endpoint test (Hou Zhiqiang) - Add DT compatible strings for ls1088a, ls2088a (Xiaowei Bao) - Add endpoint support for ls1088a, ls2088a (Xiaowei Bao) - Add endpoint test support for lS1088a (Xiaowei Bao) - Add MSI-X support for ls1088a (Xiaowei Bao) HiSilicon HIP PCIe controller driver: - Handle HIP-specific errors via ACPI APEI (Yicong Yang) HiSilicon Kirin PCIe controller driver: - Return -EPROBE_DEFER if the GPIO isn't ready (Bean Huo) Intel VMD host bridge driver: - Factor out physical offset, bus offset, IRQ domain, IRQ allocation (Jon Derrick) - Use generic PCI PM correctly (Jon Derrick) Marvell Aardvark PCIe controller driver: - Fix compilation on s390 (Pali Rohár) - Implement driver 'remove' function and allow to build it as module (Pali Rohár) - Move PCIe reset card code to advk_pcie_train_link() (Pali Rohár) - Convert mvebu a3700 internal SMCC firmware return codes to errno (Pali Rohár) - Fix initialization with old Marvell's Arm Trusted Firmware (Pali Rohár) Microsoft Hyper-V host bridge driver: - Fix hibernation in case interrupts are not re-created (Dexuan Cui) NVIDIA Tegra PCIe controller driver: - Stop checking return value of debugfs_create() functions (Greg Kroah-Hartman) - Convert to use DEFINE_SEQ_ATTRIBUTE macro (Liu Shixin) Qualcomm PCIe controller driver: - Reset PCIe to work around Qsdk U-Boot issue (Ansuel Smith) Renesas R-Car PCIe controller driver: - Add DT documentation for r8a774a1, r8a774b1, r8a774e1 endpoints (Lad Prabhakar) - Add RZ/G2M, RZ/G2N, RZ/G2H IDs to endpoint test (Lad Prabhakar) - Add DT support for r8a7742 (Lad Prabhakar) Socionext UniPhier Pro5 controller driver: - Add DT descriptions of iATU register (host and endpoint) (Kunihiko Hayashi) Synopsys DesignWare PCIe controller driver: - Add link up check in dw_child_pcie_ops.map_bus() (racy, but seems unavoidable) (Hou Zhiqiang) - Fix endpoint Header Type check so multi-function devices work (Hou Zhiqiang) - Skip PCIE_MSI_INTR0* programming if MSI is disabled (Jisheng Zhang) - Stop leaking MSI page in suspend/resume (Jisheng Zhang) - Add common iATU register support instead of keystone-specific code (Kunihiko Hayashi) - Major config space access and other cleanups in dwc core and drivers that use it (al, exynos, histb, imx6, intel-gw, keystone, kirin, meson, qcom, tegra) (Rob Herring) - Add multiple PFs support for endpoint (Xiaowei Bao) - Add MSI-X doorbell mode in endpoint mode (Xiaowei Bao) Miscellaneous: - Use fallthrough pseudo-keyword (Gustavo A. R. Silva) - Fix "0 used as NULL pointer" warnings (Gustavo Pimentel) - Fix "cast truncates bits from constant value" warnings (Gustavo Pimentel) - Remove redundant zeroing for sg_init_table() (Julia Lawall) - Use scnprintf(), not snprintf(), in sysfs "show" functions (Krzysztof Wilczyński) - Remove unused assignments (Krzysztof Wilczyński) - Fix "0 used as NULL pointer" warning (Krzysztof Wilczyński) - Simplify bool comparisons (Krzysztof Wilczyński) - Use for_each_child_of_node() and for_each_node_by_name() (Qinglang Miao) - Simplify return expressions (Qinglang Miao)" * tag 'pci-v5.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (147 commits) PCI: vmd: Update VMD PM to correctly use generic PCI PM PCI: vmd: Create IRQ allocation helper PCI: vmd: Create IRQ Domain configuration helper PCI: vmd: Create bus offset configuration helper PCI: vmd: Create physical offset helper PCI: v3-semi: Remove unneeded break PCI: dwc: Add link up check in dw_child_pcie_ops.map_bus() PCI/ASPM: Remove struct pcie_link_state.l1ss PCI/ASPM: Remove struct aspm_register_info.l1ss_cap PCI/ASPM: Pass L1SS Capabilities value, not struct aspm_register_info PCI/ASPM: Remove struct aspm_register_info.l1ss_ctl1 PCI/ASPM: Remove struct aspm_register_info.l1ss_ctl2 (unused) PCI/ASPM: Remove struct aspm_register_info.l1ss_cap_ptr PCI/ASPM: Remove struct aspm_register_info.latency_encoding PCI/ASPM: Remove struct aspm_register_info.enabled PCI/ASPM: Remove struct aspm_register_info.support PCI/ASPM: Use 'parent' and 'child' for readability PCI/ASPM: Move LTR path check to where it's used PCI/ASPM: Move pci_clear_and_set_dword() earlier PCI: dwc: Fix MSI page leakage in suspend/resume ... commit 18ded910b589839e38a51623a179837ab4cc3789 Author: Neal Cardwell Date: Thu Oct 22 10:33:31 2020 -0400 tcp: fix to update snd_wl1 in bulk receiver fast path In the header prediction fast path for a bulk data receiver, if no data is newly acknowledged then we do not call tcp_ack() and do not call tcp_ack_update_window(). This means that a bulk receiver that receives large amounts of data can have the incoming sequence numbers wrap, so that the check in tcp_may_update_window fails: after(ack_seq, tp->snd_wl1) If the incoming receive windows are zero in this state, and then the connection that was a bulk data receiver later wants to send data, that connection can find itself persistently rejecting the window updates in incoming ACKs. This means the connection can persistently fail to discover that the receive window has opened, which in turn means that the connection is unable to send anything, and the connection's sending process can get permanently "stuck". The fix is to update snd_wl1 in the header prediction fast path for a bulk data receiver, so that it keeps up and does not see wrapping problems. This fix is based on a very nice and thorough analysis and diagnosis by Apollon Oikonomopoulos (see link below). This is a stable candidate but there is no Fixes tag here since the bug predates current git history. Just for fun: looks like the bug dates back to when header prediction was added in Linux v2.1.8 in Nov 1996. In that version tcp_rcv_established() was added, and the code only updates snd_wl1 in tcp_ack(), and in the new "Bulk data transfer: receiver" code path it does not call tcp_ack(). This fix seems to apply cleanly at least as far back as v3.2. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Neal Cardwell Reported-by: Apollon Oikonomopoulos Tested-by: Apollon Oikonomopoulos Link: https://www.spinics.net/lists/netdev/msg692430.html Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20201022143331.1887495-1-ncardwell.kernel@gmail.com Signed-off-by: Jakub Kicinski commit 700465fd338fe5df08a1b2e27fa16981f562547f Author: Ke Li Date: Thu Oct 22 02:41:46 2020 -0400 net: Properly typecast int values to set sk_max_pacing_rate In setsockopt(SO_MAX_PACING_RATE) on 64bit systems, sk_max_pacing_rate, after extended from 'u32' to 'unsigned long', takes unintentionally hiked value whenever assigned from an 'int' value with MSB=1, due to binary sign extension in promoting s32 to u64, e.g. 0x80000000 becomes 0xFFFFFFFF80000000. Thus inflated sk_max_pacing_rate causes subsequent getsockopt to return ~0U unexpectedly. It may also result in increased pacing rate. Fix by explicitly casting the 'int' value to 'unsigned int' before assigning it to sk_max_pacing_rate, for zero extension to happen. Fixes: 76a9ebe811fb ("net: extend sk_pacing_rate to unsigned long") Signed-off-by: Ji Li Signed-off-by: Ke Li Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20201022064146.79873-1-keli@akamai.com Signed-off-by: Jakub Kicinski commit 594850ca439d036173ace66e7f0d022f132f70a8 Merge: d2775984d0567 c77761c8a5940 Author: Jakub Kicinski Date: Thu Oct 22 11:09:41 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Update debugging in IPVS tcp protocol handler to make it easier to understand, from longguang.yue 2) Update TCP tracker to deal with keepalive packet after re-registration, from Franceso Ruggeri. 3) Missing IP6SKB_FRAGMENTED from netfilter fragment reassembly, from Georg Kohmann. 4) Fix bogus packet drop in ebtables nat extensions, from Thimothee Cocault. 5) Fix typo in flowtable documentation. 6) Reset skb timestamp in nft_fwd_netdev. ==================== Signed-off-by: Jakub Kicinski commit 8c42a5c02bec6c7eccf08957be3c6c8fccf9790b Author: Vineet Gupta Date: Thu Oct 22 03:16:22 2020 -0700 ARC: perf: redo the pct irq missing in device-tree handling commit feb92d7d3813456c11dce21 "(ARC: perf: don't bail setup if pct irq missing in device-tree)" introduced a silly brown-paper bag bug: The assignment and comparison in an if statement were not bracketed correctly leaving the order of evaluation undefined. | | if (has_interrupts && (irq = platform_get_irq(pdev, 0) >= 0)) { | ^^^ ^^^^ And given such a chance, the compiler will bite you hard, fully entitled to generating this piece of beauty: | | # if (has_interrupts && (irq = platform_get_irq(pdev, 0) >= 0)) { | | bl.d @platform_get_irq <-- irq returned in r0 | | setge r2, r0, 0 <-- r2 is bool 1 or 0 if irq >= 0 true/false | brlt.d r0, 0, @.L114 | | st_s r2,[sp] <-- irq saved is bool 1 or 0, not actual return val | st 1,[r3,160] # arc_pmu.18_29->irq <-- drops bool and assumes 1 | | # return __request_percpu_irq(irq, handler, 0, | | bl.d @__request_percpu_irq; | mov_s r0,1 <-- drops even bool and assumes 1 which fails With the snafu fixed, everything is as expected. | bl.d @platform_get_irq <-- returns irq in r0 | | mov_s r2,r0 | brlt.d r2, 0, @.L112 | | st_s r0,[sp] <-- irq isaved is actual return value above | st r0,[r13,160] #arc_pmu.18_27->irq | | bl.d @__request_percpu_irq <-- r0 unchanged so actual irq returned | add r4,r4,r12 #, tmp363, __ptr Cc: Signed-off-by: Vineet Gupta commit 96485e4462604744d66bf4301557d996d80b85eb Merge: f56e65dff6ad5 1322181170bb0 Author: Linus Torvalds Date: Thu Oct 22 10:31:08 2020 -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: "The siginificant new ext4 feature this time around is Harshad's new fast_commit mode. In addition, thanks to Mauricio for fixing a race where mmap'ed pages that are being changed in parallel with a data=journal transaction commit could result in bad checksums in the failure that could cause journal replays to fail. Also notable is Ritesh's buffered write optimization which can result in significant improvements on parallel write workloads. (The kernel test robot reported a 330.6% improvement on fio.write_iops on a 96 core system using DAX) Besides that, we have the usual miscellaneous cleanups and bug fixes" Link: https://lore.kernel.org/r/20200925071217.GO28663@shao2-debian * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (46 commits) ext4: fix invalid inode checksum ext4: add fast commit stats in procfs ext4: add a mount opt to forcefully turn fast commits on ext4: fast commit recovery path jbd2: fast commit recovery path ext4: main fast-commit commit path jbd2: add fast commit machinery ext4 / jbd2: add fast commit initialization ext4: add fast_commit feature and handling for extended mount options doc: update ext4 and journalling docs to include fast commit feature ext4: Detect already used quota file early jbd2: avoid transaction reuse after reformatting ext4: use the normal helper to get the actual inode ext4: fix bs < ps issue reported with dioread_nolock mount opt ext4: data=journal: write-protect pages on j_submit_inode_data_buffers() ext4: data=journal: fixes for ext4_page_mkwrite() jbd2, ext4, ocfs2: introduce/use journal callbacks j_submit|finish_inode_data_buffers() jbd2: introduce/export functions jbd2_journal_submit|finish_inode_data_buffers() ext4: introduce ext4_sb_bread_unmovable() to replace sb_bread_unmovable() ext4: use ext4_sb_bread() instead of sb_bread() ... commit 13909d96c84afd409bf11aa6c8fbcb1efacb12eb Author: Steve French Date: Wed Oct 21 23:54:19 2020 -0500 SMB3: add support for recognizing WSL reparse tags The IO_REPARSE_TAG_LX_ tags originally were used by WSL but they are preferred by the Linux client in some cases since, unlike the NFS reparse tag (or EAs), they don't require an extra query to determine which type of special file they represent. Add support for readdir to recognize special file types of FIFO, SOCKET, CHAR, BLOCK and SYMLINK. This can be tested by creating these special files in WSL Linux and then sharing that location on the Windows server and mounting to the Windows server to access them. Prior to this patch all of the special files would show up as being of type 'file' but with this patch they can be seen with the correct file type as can be seen below: brwxr-xr-x 1 root root 0, 0 Oct 21 17:10 block crwxr-xr-x 1 root root 0, 0 Oct 21 17:46 char drwxr-xr-x 2 root root 0 Oct 21 18:27 dir prwxr-xr-x 1 root root 0 Oct 21 16:21 fifo -rwxr-xr-x 1 root root 0 Oct 21 15:48 file lrwxr-xr-x 1 root root 0 Oct 21 15:52 symlink-to-file TODO: go through all documented reparse tags to see if we can reasonably map some of them to directories vs. files vs. symlinks and also add support for device numbers for block and char devices. Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit d367cb960ce88914898cbfa43645c2e43ede9465 Author: Dan Carpenter Date: Wed Sep 16 23:18:21 2020 +0300 cifs: remove bogus debug code The "end" pointer is either NULL or it points to the next byte to parse. If there isn't a next byte then dereferencing "end" is an off-by-one out of bounds error. And, of course, if it's NULL that leads to an Oops. Printing "*end" doesn't seem very useful so let's delete this code. Also for the last debug statement, I noticed that it should be printing "sequence_end" instead of "end" so fix that as well. Reported-by: Dominik Maier Signed-off-by: Dan Carpenter Signed-off-by: Steve French commit 1af34fdd0799fed0b248fa2521ae9e2d69365742 Author: Steve French Date: Wed Oct 21 20:36:26 2020 -0500 smb3.1.1: fix typo in compression flag Fix minor typo in new compression flag define Reported-by: Tom Talpey Signed-off-by: Steve French commit 555782aa556af869d4f390996607abd356513ba4 Author: Ronnie Sahlberg Date: Wed Oct 21 12:10:44 2020 +1000 cifs: move smb version mount options into fs_context.c This and related patches which move mount related code to fs_context.c has the advantage of shriking the code in fs/cifs/connect.c (which had the second most lines of code of any of the files in cifs.ko and was getting harder to read due to its size) and will also make it easier to switch over to the new mount API in the future. Signed-off-by: Ronnie Sahlberg Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 2f20f076865daed006459b39ba78c2fc23b5c8b4 Author: Ronnie Sahlberg Date: Wed Oct 21 11:30:35 2020 +1000 cifs: move cache mount options to fs_context.ch Helps to shrink connect.c and make it more readable by moving mount related code to fs_context.c and fs_context.h Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit 5c6e5aa496804451fc94d00a7cf9be2e3051ae29 Author: Ronnie Sahlberg Date: Wed Oct 21 10:37:11 2020 +1000 cifs: move security mount options into fs_context.ch This patch moves the parsing of security mount options into fs_context.ch. There are no changes to any logic. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit a6a9cffad0a28a4a7a3a91b6ee13dd1baae4dfcb Author: Ronnie Sahlberg Date: Wed Oct 21 10:22:33 2020 +1000 cifs: add files to host new mount api This will make it easier in the future, but also will allow us to shrink connect.c which is getting too big, and harder to read Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit f56e65dff6ad52395ef45738799b4fb70ff43376 Merge: 24717cfbbbbfa 7b84b665c874f Author: Linus Torvalds Date: Thu Oct 22 09:59:21 2020 -0700 Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull initial set_fs() removal from Al Viro: "Christoph's set_fs base series + fixups" * 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: Allow a NULL pos pointer to __kernel_read fs: Allow a NULL pos pointer to __kernel_write powerpc: remove address space overrides using set_fs() powerpc: use non-set_fs based maccess routines x86: remove address space overrides using set_fs() x86: make TASK_SIZE_MAX usable from assembly code x86: move PAGE_OFFSET, TASK_SIZE & friends to page_{32,64}_types.h lkdtm: remove set_fs-based tests test_bitmap: remove user bitmap tests uaccess: add infrastructure for kernel builds with set_fs() fs: don't allow splice read/write without explicit ops fs: don't allow kernel reads and writes without iter ops sysctl: Convert to iter interfaces proc: add a read_iter method to proc proc_ops proc: cleanup the compat vs no compat file ops proc: remove a level of indentation in proc_get_inode commit abcba2e135ec45a54580c80e5e14bbc2911ba231 Author: Tom Rix Date: Mon Oct 19 13:04:53 2020 -0700 ACPI: utils: remove unreachable breaks A break following a return statement is pointless, so drop all of the breaks following return statements from this file. Signed-off-by: Tom Rix [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit d2775984d0567e8262d11f3e607a4345cc7b467d Merge: d9b0e599b2b89 3652c9a1b1fe6 Author: Jakub Kicinski Date: Thu Oct 22 09:51:41 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2020-10-22 1) Fix enforcing NULL check in verifier for new helper return types of RET_PTR_TO_{BTF_ID,MEM_OR_BTF_ID}_OR_NULL, from Martin KaFai Lau. 2) Fix bpf_redirect_neigh() helper API before it becomes frozen by adding nexthop information as argument, from Toke Høiland-Jørgensen. 3) Guard & fix compilation of bpf_tail_call_static() when __bpf__ arch is not defined by compiler or clang too old, from Daniel Borkmann. 4) Remove misplaced break after return in attach_type_to_prog_type(), from Tom Rix. ==================== Signed-off-by: Jakub Kicinski commit 24717cfbbbbfa415d1e3dca0f21c417e5faf8208 Merge: 9b06f57b9edb2 0cfcd405e758b Author: Linus Torvalds Date: Thu Oct 22 09:44:27 2020 -0700 Merge tag 'nfsd-5.10' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "The one new feature this time, from Anna Schumaker, is READ_PLUS, which has the same arguments as READ but allows the server to return an array of data and hole extents. Otherwise it's a lot of cleanup and bugfixes" * tag 'nfsd-5.10' of git://linux-nfs.org/~bfields/linux: (43 commits) NFSv4.2: Fix NFS4ERR_STALE error when doing inter server copy SUNRPC: fix copying of multiple pages in gss_read_proxy_verf() sunrpc: raise kernel RPC channel buffer size svcrdma: fix bounce buffers for unaligned offsets and multiple pages nfsd: remove unneeded break net/sunrpc: Fix return value for sysctl sunrpc.transports NFSD: Encode a full READ_PLUS reply NFSD: Return both a hole and a data segment NFSD: Add READ_PLUS hole segment encoding NFSD: Add READ_PLUS data support NFSD: Hoist status code encoding into XDR encoder functions NFSD: Map nfserr_wrongsec outside of nfsd_dispatch NFSD: Remove the RETURN_STATUS() macro NFSD: Call NFSv2 encoders on error returns NFSD: Fix .pc_release method for NFSv2 NFSD: Remove vestigial typedefs NFSD: Refactor nfsd_dispatch() error paths NFSD: Clean up nfsd_dispatch() variables NFSD: Clean up stale comments in nfsd_dispatch() NFSD: Clean up switch statement in nfsd_dispatch() ... commit d298787dbbab5f7ada97c292e19c5c6e55fda6cd Author: Tom Rix Date: Mon Oct 19 13:03:30 2020 -0700 PM: sleep: remove unreachable break A break following a return statement is pointless, so drop it. Signed-off-by: Tom Rix [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 785b5bb41b0a9b1d9173192dcdebe6e994d1f71a Author: Ulf Hansson Date: Tue Oct 6 18:05:16 2020 +0200 PM: AVS: Drop the avs directory and the corresponding Kconfig All avs drivers have now been moved to their corresponding soc specific directories. Additionally, they don't depend on the POWER_AVS Kconfig anymore. Therefore, let's simply drop the drivers/power/avs directory altogether. Cc: Nishanth Menon Signed-off-by: Ulf Hansson Reviewed-by: Nishanth Menon Signed-off-by: Rafael J. Wysocki commit 9b06f57b9edb2d67471e626b3ebd247826729a7f Merge: 334d431f65f05 eae503f7eb050 Author: Linus Torvalds Date: Thu Oct 22 09:39:29 2020 -0700 Merge tag 'exfat-for-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat updates from Namjae Jeon: - Replace memcpy with structure assignment - Remove unneeded codes and use helper function i_blocksize() - Fix typos found by codespell * tag 'exfat-for-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: remove useless check in exfat_move_file() exfat: remove 'rwoffset' in exfat_inode_info exfat: replace memcpy with structure assignment exfat: remove useless directory scan in exfat_add_entry() exfat: eliminate dead code in exfat_find() exfat: use i_blocksize() to get blocksize exfat: fix misspellings using codespell tool commit fd78874b710f42ea46feaefd7c918893c8567e8a Author: Keith Busch Date: Thu Oct 22 08:47:39 2020 -0700 null_blk: use zone status for max active/open The block layer provides special status codes when requests go beyond the zone resource limits. Use these codes instead of the generic IOERR for requests that exceed the max active or open limits the null_blk device was configured with so that applications know how these special conditions should be handled. Signed-off-by: Keith Busch Reviewed-by: Niklas Cassel Cc: Damien Le Moal Cc: Niklas Cassel Signed-off-by: Jens Axboe commit a7305e684fcfb33029fe3d0af6b7d8dc4c8ca7a1 Author: Ulf Hansson Date: Tue Oct 6 18:05:13 2020 +0200 PM: AVS: qcom-cpr: Move the driver to the qcom specific drivers The avs drivers are all SoC specific drivers that doesn't share any code. Instead they are located in a directory, mostly to keep similar functionality together. From a maintenance point of view, it makes better sense to collect SoC specific drivers like these, into the SoC specific directories. Therefore, let's move the qcom-cpr driver to the qcom directory. Signed-off-by: Ulf Hansson Acked-by: Bjorn Andersson Acked-by: Niklas Cassel Signed-off-by: Rafael J. Wysocki commit 334d431f65f05d3412c921875717b8c4ec6da71c Merge: f804b3159482e 7ca1db21ef8e0 Author: Linus Torvalds Date: Thu Oct 22 09:33:20 2020 -0700 Merge tag '9p-for-5.10-rc1' of git://github.com/martinetd/linux Pull 9p updates from Dominique Martinet: "A couple of small fixes (loff_t overflow on 32bit, syzbot uninitialized variable warning) and code cleanup (xen)" * tag '9p-for-5.10-rc1' of git://github.com/martinetd/linux: net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid 9p/xen: Fix format argument warning 9P: Cast to loff_t before multiplying commit c8fb20b5b4206e9206ea8f129aa4592ad15918bd Author: Pavel Begunkov Date: Thu Oct 22 16:38:27 2020 +0100 io_uring: remove req cancel in ->flush() Every close(io_uring) causes cancellation of all inflight requests carrying ->files. That's not nice but was neccessary up until recently. Now task->files removal is handled in the core code, so that part of flush can be removed. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e1981f75d398c0afe83c8ffa4e5864f037967409 Author: Qiujun Huang Date: Sat Oct 17 17:52:46 2020 +0800 ring-buffer: Update the description for ring_buffer_wait The function changed at some point, but the description was not updated. Link: https://lkml.kernel.org/r/20201017095246.5170-1-hqjagain@gmail.com Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit 0a1754b2a97efa644aa6e84d1db5b17c42251483 Author: Qiujun Huang Date: Mon Oct 19 22:22:42 2020 +0800 ring-buffer: Return 0 on success from ring_buffer_resize() We don't need to check the new buffer size, and the return value had confused resize_buffer_duplicate_size(). ... ret = ring_buffer_resize(trace_buf->buffer, per_cpu_ptr(size_buf->data,cpu_id)->entries, cpu_id); if (ret == 0) per_cpu_ptr(trace_buf->data, cpu_id)->entries = per_cpu_ptr(size_buf->data, cpu_id)->entries; ... Link: https://lkml.kernel.org/r/20201019142242.11560-1-hqjagain@gmail.com Cc: stable@vger.kernel.org Fixes: d60da506cbeb3 ("tracing: Add a resize function to make one buffer equivalent to another buffer") Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit 43c01fbefdf110e8713d6c0ff71055f06b9888a0 Author: Jens Axboe Date: Thu Oct 22 09:02:50 2020 -0600 io-wq: re-set NUMA node affinities if CPUs come online We correctly set io-wq NUMA node affinities when the io-wq context is setup, but if an entire node CPU set is offlined and then brought back online, the per node affinities are broken. Ensure that we set them again whenever a CPU comes online. This ensures that we always track the right node affinity. The usual cpuhp notifiers are used to drive it. Reported-by: Zhang Qiang Signed-off-by: Jens Axboe commit 150dfb6c834c9e0e92db7794530b09fd2b9f05c8 Author: Chaitanya Kulkarni Date: Tue Oct 20 16:14:04 2020 -0700 nvmet: don't use BLK_MQ_REQ_NOWAIT for passthru By default, we set the passthru request allocation flag such that it returns the error in the following code path and we fail the I/O when BLK_MQ_REQ_NOWAIT is used for request allocation :- nvme_alloc_request()  blk_mq_alloc_request()   blk_mq_queue_enter()    if (flag & BLK_MQ_REQ_NOWAIT)         return -EBUSY; <-- return if busy. On some controllers using BLK_MQ_REQ_NOWAIT ends up in I/O error where the controller is perfectly healthy and not in a degraded state. Block layer request allocation does allow us to wait instead of immediately returning the error when we BLK_MQ_REQ_NOWAIT flag is not used. This has shown to fix the I/O error problem reported under heavy random write workload. Remove the BLK_MQ_REQ_NOWAIT parameter for passthru request allocation which resolves this issue. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig commit 5e063101ffacf7c14797f5185c58a967ca83c79f Author: Logan Gunthorpe Date: Fri Oct 16 16:19:05 2020 -0600 nvmet: cleanup nvmet_passthru_map_sg() Clean up some confusing elements of nvmet_passthru_map_sg() by returning early if the request is greater than the maximum bio size. This allows us to drop the sg_cnt variable. This should not result in any functional change but makes the code clearer and more understandable. The original code allocated a truncated bio then would return EINVAL when bio_add_pc_page() filled that bio. The new code just returns EINVAL early if this would happen. Fixes: c1fef73f793b ("nvmet: add passthru code to process commands") Signed-off-by: Logan Gunthorpe Suggested-by: Douglas Gilbert Reviewed-by: Sagi Grimberg Cc: Christoph Hellwig Cc: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit df06047d54276f73782c9d97882b305fca745d3f Author: Logan Gunthorpe Date: Fri Oct 16 16:19:04 2020 -0600 nvmet: limit passthru MTDS by BIO_MAX_PAGES nvmet_passthru_map_sg() only supports mapping a single BIO, not a chain so the effective maximum transfer should also be limitted by BIO_MAX_PAGES (presently this works out to 1MB). For PCI passthru devices the max_sectors would typically be more limitting than BIO_MAX_PAGES, but this may not be true for all passthru devices. Fixes: c1fef73f793b ("nvmet: add passthru code to process commands") Suggested-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 85bd23f3dc09a2ae9e56885420e52c54bf983713 Author: zhenwei pi Date: Thu Oct 15 09:51:40 2020 +0800 nvmet: fix uninitialized work for zero kato When connecting a controller with a zero kato value using the following command line nvme connect -t tcp -n NQN -a ADDR -s PORT --keep-alive-tmo=0 the warning below can be reproduced: WARNING: CPU: 1 PID: 241 at kernel/workqueue.c:1627 __queue_delayed_work+0x6d/0x90 with trace: mod_delayed_work_on+0x59/0x90 nvmet_update_cc+0xee/0x100 [nvmet] nvmet_execute_prop_set+0x72/0x80 [nvmet] nvmet_tcp_try_recv_pdu+0x2f7/0x770 [nvmet_tcp] nvmet_tcp_io_work+0x63f/0xb2d [nvmet_tcp] ... This is caused by queuing up an uninitialized work. Althrough the keep-alive timer is disabled during allocating the controller (fixed in 0d3b6a8d213a), ka_work still has a chance to run (called by nvmet_start_ctrl). Fixes: 0d3b6a8d213a ("nvmet: Disable keep-alive timer when kato is cleared to 0h") Signed-off-by: zhenwei pi Signed-off-by: Christoph Hellwig commit 02ca079c99319c4308c6bb892613f29119c1a9f9 Author: Kai-Heng Feng Date: Tue Oct 13 16:34:45 2020 +0800 nvme-pci: disable Write Zeroes on Sandisk Skyhawk Like commit 5611ec2b9814 ("nvme-pci: prevent SK hynix PC400 from using Write Zeroes command"), Sandisk Skyhawk has the same issue: [ 6305.633887] blk_update_request: operation not supported error, dev nvme0n1, sector 340812032 op 0x9:(WRITE_ZEROES) flags 0x0 phys_seg 0 prio class 0 So also disable Write Zeroes command on Sandisk Skyhawk. BugLink: https://bugs.launchpad.net/bugs/1899503 Signed-off-by: Kai-Heng Feng Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 643c476d6f78cf0349fb8e07334962dd056a3c90 Author: Keith Busch Date: Thu Oct 15 11:36:29 2020 -0700 nvme: use queuedata for nvme_req_qid The request's rq_disk isn't set for passthrough IO commands, so tracing uses qid 0 for these which incorrectly decodes as an admin command. Use the request_queue's queuedata instead since that value is always set for the IO queues, and never set for the admin queue. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit a87da50f39d467f2ea4c1f98decb72ef6d87a31e Author: Chao Leng Date: Mon Oct 12 16:55:37 2020 +0800 nvme-rdma: fix crash due to incorrect cqe A crash happened due to injecting error test. When a CQE has incorrect command id due do an error injection, the host may find a request which is already freed. Dereferencing req->mr->rkey causes a crash in nvme_rdma_process_nvme_rsp because the mr is already freed. Add a check for the mr to fix it. Signed-off-by: Chao Leng Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 43efdb8e870ee0f58633fd579aa5b5185bf5d39e Author: Chao Leng Date: Mon Oct 12 16:10:40 2020 +0800 nvme-rdma: fix crash when connect rejected A crash can happened when a connect is rejected. The host establishes the connection after received ConnectReply, and then continues to send the fabrics Connect command. If the controller does not receive the ReadyToUse capsule, host may receive a ConnectReject reply. Call nvme_rdma_destroy_queue_ib after the host received the RDMA_CM_EVENT_REJECTED event. Then when the fabrics Connect command times out, nvme_rdma_timeout calls nvme_rdma_complete_rq to fail the request. A crash happenes due to use after free in nvme_rdma_complete_rq. nvme_rdma_destroy_queue_ib is redundant when handling the RDMA_CM_EVENT_REJECTED event as nvme_rdma_destroy_queue_ib is already called in connection failure handler. Signed-off-by: Chao Leng Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit c77761c8a59405cb7aa44188b30fffe13fbdd02d Author: Pablo Neira Ayuso Date: Wed Oct 21 12:55:52 2020 +0200 netfilter: nf_fwd_netdev: clear timestamp in forwarding path Similar to 7980d2eabde8 ("ipvs: clear skb->tstamp in forwarding path"). fq qdisc requires tstamp to be cleared in forwarding path. Fixes: 8203e2d844d3 ("net: clear skb->tstamp in forwarding paths") Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC") Fixes: 80b14dee2bea ("net: Add a new socket option for a future transmit time.") Signed-off-by: Pablo Neira Ayuso commit 3c785a06dee99501a17f8e8cf29b2b7e3f1e94ea Author: Hans de Goede Date: Mon Oct 19 09:48:14 2020 +0200 HID: ite: Replace ABS_MISC 120/121 events with touchpad on/off keypresses The usb-hid keyboard-dock for the Acer Switch 10 SW5-012 model declares an application and hid-usage page of 0x0088 for the INPUT(4) report which it sends. This reports contains 2 8-bit fields which are declared as HID_MAIN_ITEM_VARIABLE. The keyboard-touchpad combo never actually generates this report, except when the touchpad is toggled on/off with the Fn + F7 hotkey combo. The toggle on/off is handled inside the keyboard-dock, when the touchpad is toggled off it simply stops sending events. When the touchpad is toggled on/off an INPUT(4) report is generated with the first content byte set to 120/121, before this commit the kernel would report this as ABS_MISC 120/121 events. Patch the descriptor to replace the HID_MAIN_ITEM_VARIABLE with HID_MAIN_ITEM_RELATIVE (because no key-presss release events are send) and add mappings for the 0x00880078 and 0x00880079 usages to generate touchpad on/off key events when the touchpad is toggled on/off. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit abee7c494d8c41bb388839bccc47e06247f0d7de Author: Juergen Gross Date: Fri Oct 9 16:42:25 2020 +0200 x86/alternative: Don't call text_poke() in lazy TLB mode When running in lazy TLB mode the currently active page tables might be the ones of a previous process, e.g. when running a kernel thread. This can be problematic in case kernel code is being modified via text_poke() in a kernel thread, and on another processor exit_mmap() is active for the process which was running on the first cpu before the kernel thread. As text_poke() is using a temporary address space and the former address space (obtained via cpu_tlbstate.loaded_mm) is restored afterwards, there is a race possible in case the cpu on which exit_mmap() is running wants to make sure there are no stale references to that address space on any cpu active (this e.g. is required when running as a Xen PV guest, where this problem has been observed and analyzed). In order to avoid that, drop off TLB lazy mode before switching to the temporary address space. Fixes: cefa929c034eb5d ("x86/mm: Introduce temporary mm structs") Signed-off-by: Juergen Gross Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201009144225.12019-1-jgross@suse.com commit f8e48a3dca060e80f672d398d181db1298fbc86c Author: Peter Zijlstra Date: Thu Oct 22 12:23:02 2020 +0200 lockdep: Fix preemption WARN for spurious IRQ-enable It is valid (albeit uncommon) to call local_irq_enable() without first having called local_irq_disable(). In this case we enter lockdep_hardirqs_on*() with IRQs enabled and trip a preemption warning for using __this_cpu_read(). Use this_cpu_read() instead to avoid the warning. Fixes: 4d004099a6 ("lockdep: Fix lockdep recursion") Reported-by: syzbot+53f8ce8bbc07924b6417@syzkaller.appspotmail.com Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) commit 266cd33b59138501579c64648f54b93eab2e5adf Author: Georgi Djakov Date: Thu Oct 22 13:26:26 2020 +0300 interconnect: qcom: Ensure that the floor bandwidth value is enforced Take into account the initial bandwidth from the framework and update the internal sum and max values before committing if needed. This will ensure that the floor bandwidth values are enforced until the providers get into sync state. Fixes: 7d3b0b0d8184 ("interconnect: qcom: Use icc_sync_state") Tested-by: Akash Asthana Link: https://lore.kernel.org/r/20201021155938.9223-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit b59f38dbfd5d19eb7e03d8b639f0c0d385ba8cc5 Author: Harry Cutts Date: Wed Oct 21 06:56:12 2020 -0700 HID: logitech-hidpp: Add PID for MX Anywhere 2 It seems that the PID 0x4072 was missing from the list Logitech gave me for this mouse, as I found one with it in the wild (with which I tested this patch). Fixes: 4435ff2f09a2 ("HID: logitech: Enable high-resolution scrolling on Logitech mice") Signed-off-by: Harry Cutts Acked-by: Peter Hutterer Signed-off-by: Jiri Kosina commit 022fc5315b7aff69d3df2c953b892a6232642d50 Author: Martijn van de Streek Date: Fri Oct 16 08:38:05 2020 +0200 HID: uclogic: Add ID for Trust Flex Design Tablet The Trust Flex Design Tablet has an UGTizer USB ID and requires the same initialization as the UGTizer GP0610 to be detected as a graphics tablet instead of a mouse. Signed-off-by: Martijn van de Streek Signed-off-by: Jiri Kosina commit 033e4040d453f1f7111e5957a54f3019eb089cc6 Author: Hui Wang Date: Thu Oct 22 11:02:21 2020 +0800 ALSA: hda - Fix the return value if cb func is already registered If the cb function is already registered, should return the pointer of the structure hda_jack_callback which contains this cb func, but instead it returns the NULL. Now fix it by replacing func_is_already_in_callback_list() with find_callback_from_list(). Fixes: f4794c6064a8 ("ALSA: hda - Don't register a cb func if it is registered already") Reported-and-suggested-by: Dan Carpenter Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20201022030221.22393-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit d9b0e599b2b892422f1cbc5d2658049b895b2b58 Author: Lijun Pan Date: Tue Oct 20 17:39:19 2020 -0500 ibmvnic: save changed mac address to adapter->mac_addr After mac address change request completes successfully, the new mac address need to be saved to adapter->mac_addr as well as netdev->dev_addr. Otherwise, adapter->mac_addr still holds old data. Fixes: 62740e97881c ("net/ibmvnic: Update MAC address settings after adapter reset") Signed-off-by: Lijun Pan Link: https://lore.kernel.org/r/20201020223919.46106-1-ljp@linux.ibm.com Signed-off-by: Jakub Kicinski commit 287d35405989cfe0090e3059f7788dc531879a8d Author: Matthieu Baerts Date: Wed Oct 21 17:55:49 2020 +0200 selftests: mptcp: depends on built-in IPv6 Recently, CONFIG_MPTCP_IPV6 no longer selects CONFIG_IPV6. As a consequence, if CONFIG_MPTCP_IPV6=y is added to the kconfig, it will no longer ensure CONFIG_IPV6=y. If it is not enabled, CONFIG_MPTCP_IPV6 will stay disabled and selftests will fail. We also need CONFIG_IPV6 to be built-in. For more details, please see commit 0ed37ac586c0 ("mptcp: depends on IPV6 but not as a module"). Note that 'make kselftest-merge' will take all 'config' files found in 'tools/testsing/selftests'. Because some of them already set CONFIG_IPV6=y, MPTCP selftests were still passing. But they will fail if MPTCP selftests are launched manually after having executed this command to prepare the kernel config: ./scripts/kconfig/merge_config.sh -m .config \ ./tools/testing/selftests/net/mptcp/config Fixes: 010b430d5df5 ("mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it") Signed-off-by: Matthieu Baerts Reviewed-by: Mat Martineau Link: https://lore.kernel.org/r/20201021155549.933731-1-matthieu.baerts@tessares.net Signed-off-by: Jakub Kicinski commit 4ff753feab021242144818b9a3ba011238218145 Author: Ganesh Goudar Date: Fri Jul 24 12:09:46 2020 +0530 powerpc/pseries: Avoid using addr_to_pfn in real mode When an UE or memory error exception is encountered the MCE handler tries to find the pfn using addr_to_pfn() which takes effective address as an argument, later pfn is used to poison the page where memory error occurred, recent rework in this area made addr_to_pfn to run in real mode, which can be fatal as it may try to access memory outside RMO region. Have two helper functions to separate things to be done in real mode and virtual mode without changing any functionality. This also fixes the following error as the use of addr_to_pfn is now moved to virtual mode. Without this change following kernel crash is seen on hitting UE. [ 485.128036] Oops: Kernel access of bad area, sig: 11 [#1] [ 485.128040] LE SMP NR_CPUS=2048 NUMA pSeries [ 485.128047] Modules linked in: [ 485.128067] CPU: 15 PID: 6536 Comm: insmod Kdump: loaded Tainted: G OE 5.7.0 #22 [ 485.128074] NIP: c00000000009b24c LR: c0000000000398d8 CTR: c000000000cd57c0 [ 485.128078] REGS: c000000003f1f970 TRAP: 0300 Tainted: G OE (5.7.0) [ 485.128082] MSR: 8000000000001003 CR: 28008284 XER: 00000001 [ 485.128088] CFAR: c00000000009b190 DAR: c0000001fab00000 DSISR: 40000000 IRQMASK: 1 [ 485.128088] GPR00: 0000000000000001 c000000003f1fbf0 c000000001634300 0000b0fa01000000 [ 485.128088] GPR04: d000000002220000 0000000000000000 00000000fab00000 0000000000000022 [ 485.128088] GPR08: c0000001fab00000 0000000000000000 c0000001fab00000 c000000003f1fc14 [ 485.128088] GPR12: 0000000000000008 c000000003ff5880 d000000002100008 0000000000000000 [ 485.128088] GPR16: 000000000000ff20 000000000000fff1 000000000000fff2 d0000000021a1100 [ 485.128088] GPR20: d000000002200000 c00000015c893c50 c000000000d49b28 c00000015c893c50 [ 485.128088] GPR24: d0000000021a0d08 c0000000014e5da8 d0000000021a0818 000000000000000a [ 485.128088] GPR28: 0000000000000008 000000000000000a c0000000017e2970 000000000000000a [ 485.128125] NIP [c00000000009b24c] __find_linux_pte+0x11c/0x310 [ 485.128130] LR [c0000000000398d8] addr_to_pfn+0x138/0x170 [ 485.128133] Call Trace: [ 485.128135] Instruction dump: [ 485.128138] 3929ffff 7d4a3378 7c883c36 7d2907b4 794a1564 7d294038 794af082 3900ffff [ 485.128144] 79291f24 790af00e 78e70020 7d095214 <7c69502a> 2fa30000 419e011c 70690040 [ 485.128152] ---[ end trace d34b27e29ae0e340 ]--- Fixes: 9ca766f9891d ("powerpc/64s/pseries: machine check convert to use common event code") Signed-off-by: Ganesh Goudar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724063946.21378-1-ganeshgr@linux.ibm.com commit cf8691cbc286592177dee7db7bba684e95058f96 Author: Michael S. Tsirkin Date: Wed Oct 21 10:30:43 2020 -0400 Revert "virtio-net: ethtool configurable RXCSUM" This reverts commit 3618ad2a7c0e78e4258386394d5d5f92a3dbccf8. When control vq is not negotiated, that commit causes a crash: [ 72.229171] kernel BUG at drivers/net/virtio_net.c:1667! [ 72.230266] invalid opcode: 0000 [#1] PREEMPT SMP [ 72.231172] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.9.0-rc8-02934-g3618ad2a7c0e7 #1 [ 72.231172] EIP: virtnet_send_command+0x120/0x140 [ 72.231172] Code: 00 0f 94 c0 8b 7d f0 65 33 3d 14 00 00 00 75 1c 8d 65 f4 5b 5e 5f 5d c3 66 90 be 01 00 00 00 e9 6e ff ff ff 8d b6 00 +00 00 00 <0f> 0b e8 d9 bb 82 00 eb 17 8d b4 26 00 00 00 00 8d b4 26 00 00 00 [ 72.231172] EAX: 0000000d EBX: f72895c0 ECX: 00000017 EDX: 00000011 [ 72.231172] ESI: f7197800 EDI: ed69bd00 EBP: ed69bcf4 ESP: ed69bc98 [ 72.231172] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010246 [ 72.231172] CR0: 80050033 CR2: 00000000 CR3: 02c84000 CR4: 000406f0 [ 72.231172] Call Trace: [ 72.231172] ? __virt_addr_valid+0x45/0x60 [ 72.231172] ? ___cache_free+0x51f/0x760 [ 72.231172] ? kobject_uevent_env+0xf4/0x560 [ 72.231172] virtnet_set_guest_offloads+0x4d/0x80 [ 72.231172] virtnet_set_features+0x85/0x120 [ 72.231172] ? virtnet_set_guest_offloads+0x80/0x80 [ 72.231172] __netdev_update_features+0x27a/0x8e0 [ 72.231172] ? kobject_uevent+0xa/0x20 [ 72.231172] ? netdev_register_kobject+0x12c/0x160 [ 72.231172] register_netdevice+0x4fe/0x740 [ 72.231172] register_netdev+0x1c/0x40 [ 72.231172] virtnet_probe+0x728/0xb60 [ 72.231172] ? _raw_spin_unlock+0x1d/0x40 [ 72.231172] ? virtio_vdpa_get_status+0x1c/0x20 [ 72.231172] virtio_dev_probe+0x1c6/0x271 [ 72.231172] really_probe+0x195/0x2e0 [ 72.231172] driver_probe_device+0x26/0x60 [ 72.231172] device_driver_attach+0x49/0x60 [ 72.231172] __driver_attach+0x46/0xc0 [ 72.231172] ? device_driver_attach+0x60/0x60 [ 72.231172] bus_add_driver+0x197/0x1c0 [ 72.231172] driver_register+0x66/0xc0 [ 72.231172] register_virtio_driver+0x1b/0x40 [ 72.231172] virtio_net_driver_init+0x61/0x86 [ 72.231172] ? veth_init+0x14/0x14 [ 72.231172] do_one_initcall+0x76/0x2e4 [ 72.231172] ? rdinit_setup+0x2a/0x2a [ 72.231172] do_initcalls+0xb2/0xd5 [ 72.231172] kernel_init_freeable+0x14f/0x179 [ 72.231172] ? rest_init+0x100/0x100 [ 72.231172] kernel_init+0xd/0xe0 [ 72.231172] ret_from_fork+0x1c/0x30 [ 72.231172] Modules linked in: [ 72.269563] ---[ end trace a6ebc4afea0e6cb1 ]--- The reason is that virtnet_set_features now calls virtnet_set_guest_offloads unconditionally, it used to only call it when there is something to configure. If device does not have a control vq, everything breaks. Revert the original commit for now. Cc: Tonghao Zhang Fixes: 3618ad2a7c0e7 ("virtio-net: ethtool configurable RXCSUM") Reported-by: kernel test robot Signed-off-by: Michael S. Tsirkin Acked-by: Willem de Bruijn Acked-by: Jason Wang Link: https://lore.kernel.org/r/20201021142944.13615-1-mst@redhat.com Signed-off-by: Jakub Kicinski commit 592bbe9c505d9a0ef69260f8c8263df47da2698e Author: Christophe Leroy Date: Tue Oct 20 07:40:07 2020 +0000 powerpc/uaccess: Don't use "m<>" constraint with GCC 4.9 GCC 4.9 sometimes fails to build with "m<>" constraint in inline assembly. CC lib/iov_iter.o In file included from ./arch/powerpc/include/asm/cmpxchg.h:6:0, from ./arch/powerpc/include/asm/atomic.h:11, from ./include/linux/atomic.h:7, from ./include/linux/crypto.h:15, from ./include/crypto/hash.h:11, from lib/iov_iter.c:2: lib/iov_iter.c: In function 'iovec_from_user.part.30': ./arch/powerpc/include/asm/uaccess.h:287:2: error: 'asm' operand has impossible constraints __asm__ __volatile__( \ ^ ./include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ ./arch/powerpc/include/asm/uaccess.h:583:34: note: in expansion of macro 'unsafe_op_wrap' #define unsafe_get_user(x, p, e) unsafe_op_wrap(__get_user_allowed(x, p), e) ^ ./arch/powerpc/include/asm/uaccess.h:329:10: note: in expansion of macro '__get_user_asm' case 4: __get_user_asm(x, (u32 __user *)ptr, retval, "lwz"); break; \ ^ ./arch/powerpc/include/asm/uaccess.h:363:3: note: in expansion of macro '__get_user_size_allowed' __get_user_size_allowed(__gu_val, __gu_addr, __gu_size, __gu_err); \ ^ ./arch/powerpc/include/asm/uaccess.h:100:2: note: in expansion of macro '__get_user_nocheck' __get_user_nocheck((x), (ptr), sizeof(*(ptr)), false) ^ ./arch/powerpc/include/asm/uaccess.h:583:49: note: in expansion of macro '__get_user_allowed' #define unsafe_get_user(x, p, e) unsafe_op_wrap(__get_user_allowed(x, p), e) ^ lib/iov_iter.c:1663:3: note: in expansion of macro 'unsafe_get_user' unsafe_get_user(len, &uiov[i].iov_len, uaccess_end); ^ make[1]: *** [scripts/Makefile.build:283: lib/iov_iter.o] Error 1 Define a UPD_CONSTR macro that is "<>" by default and only "" with GCC prior to GCC 5. Fixes: fcf1f26895a4 ("powerpc/uaccess: Add pre-update addressing to __put_user_asm_goto()") Fixes: 2f279eeb68b8 ("powerpc/uaccess: Add pre-update addressing to __get_user_asm() and __put_user_asm()") Signed-off-by: Christophe Leroy Acked-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/212d3bc4a52ca71523759517bb9c61f7e477c46a.1603179582.git.christophe.leroy@csgroup.eu commit 1322181170bb01bce3c228b82ae3d5c6b793164f Author: Luo Meng Date: Tue Oct 20 09:36:31 2020 +0800 ext4: fix invalid inode checksum During the stability test, there are some errors: ext4_lookup:1590: inode #6967: comm fsstress: iget: checksum invalid. If the inode->i_iblocks too big and doesn't set huge file flag, checksum will not be recalculated when update the inode information to it's buffer. If other inode marks the buffer dirty, then the inconsistent inode will be flushed to disk. Fix this problem by checking i_blocks in advance. Cc: stable@kernel.org Signed-off-by: Luo Meng Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20201020013631.3796673-1-luomeng12@huawei.com Signed-off-by: Theodore Ts'o commit ce8c59d197c824789e1ade6f25d36037b4f0faeb Author: Harshad Shirwadkar Date: Thu Oct 15 13:38:01 2020 -0700 ext4: add fast commit stats in procfs This commit adds a file in procfs that tracks fast commit related statistics. root@kvm-xfstests:/mnt# cat /proc/fs/ext4/vdc/fc_info fc stats: 7772 commits 15 ineligible 4083 numblks 2242us avg_commit_time Ineligible reasons: "Extended attributes changed": 0 "Cross rename": 0 "Journal flag changed": 0 "Insufficient memory": 0 "Swap boot": 0 "Resize": 0 "Dir renamed": 0 "Falloc range op": 0 "FC Commit Failed": 15 Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201015203802.3597742-10-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 0f0672ffb61aebac906cf0aa1607d1f07f266fb6 Author: Harshad Shirwadkar Date: Thu Oct 15 13:38:00 2020 -0700 ext4: add a mount opt to forcefully turn fast commits on This is a debug only mount option that forcefully turns fast commits on at mount time. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201015203802.3597742-9-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2 Author: Harshad Shirwadkar Date: Thu Oct 15 13:37:59 2020 -0700 ext4: fast commit recovery path This patch adds fast commit recovery path support for Ext4 file system. We add several helper functions that are similar in spirit to e2fsprogs journal recovery path handlers. Example of such functions include - a simple block allocator, idempotent block bitmap update function etc. Using these routines and the fast commit log in the fast commit area, the recovery path (ext4_fc_replay()) performs fast commit log recovery. Reported-by: kernel test robot Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201015203802.3597742-8-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 5b849b5f96b47d82b5a432d8b91a8ad260e1de46 Author: Harshad Shirwadkar Date: Thu Oct 15 13:37:58 2020 -0700 jbd2: fast commit recovery path This patch adds fast commit recovery support in JBD2. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201015203802.3597742-7-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e Author: Harshad Shirwadkar Date: Thu Oct 15 13:37:57 2020 -0700 ext4: main fast-commit commit path This patch adds main fast commit commit path handlers. The overall patch can be divided into two inter-related parts: (A) Metadata updates tracking This part consists of helper functions to track changes that need to be committed during a commit operation. These updates are maintained by Ext4 in different in-memory queues. Following are the APIs and their short description that are implemented in this patch: - ext4_fc_track_link/unlink/creat() - Track unlink. link and creat operations - ext4_fc_track_range() - Track changed logical block offsets inodes - ext4_fc_track_inode() - Track inodes - ext4_fc_mark_ineligible() - Mark file system fast commit ineligible() - ext4_fc_start_update() / ext4_fc_stop_update() / ext4_fc_start_ineligible() / ext4_fc_stop_ineligible() These functions are useful for co-ordinating inode updates with commits. (B) Main commit Path This part consists of functions to convert updates tracked in in-memory data structures into on-disk commits. Function ext4_fc_commit() is the main entry point to commit path. Reported-by: kernel test robot Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201015203802.3597742-6-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit ff780b91efe901b8eecd8114785abae5341820ad Author: Harshad Shirwadkar Date: Thu Oct 15 13:37:56 2020 -0700 jbd2: add fast commit machinery This functions adds necessary APIs needed in JBD2 layer for fast commits. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201015203802.3597742-5-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 6866d7b3f2bb4f011041ba54c98b1584497fe2fd Author: Harshad Shirwadkar Date: Thu Oct 15 13:37:55 2020 -0700 ext4 / jbd2: add fast commit initialization This patch adds fast commit area trackers in the journal_t structure. These are initialized via the jbd2_fc_init() routine that this patch adds. This patch also adds ext4/fast_commit.c and ext4/fast_commit.h files for fast commit code that will be added in subsequent patches in this series. Reported-by: kernel test robot Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201015203802.3597742-4-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 995a3ed67fc8c0e3301a770016fb66f1bbf15ec8 Author: Harshad Shirwadkar Date: Thu Oct 15 13:37:54 2020 -0700 ext4: add fast_commit feature and handling for extended mount options We are running out of mount option bits. Add handling for using s_mount_opt2. Add ext4 and jbd2 fast commit feature flag and also add ability to turn off the fast commit feature in Ext4. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201015203802.3597742-3-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit f5b8b297b04208e101c1f92fe804cd4e66df30e8 Author: Harshad Shirwadkar Date: Thu Oct 15 13:37:53 2020 -0700 doc: update ext4 and journalling docs to include fast commit feature This patch adds necessary documentation for fast commits. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20201015203802.3597742-2-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 687e79c0feb4243b141b1e9a20adba3c0ec66f7f Author: Likun Gao Date: Thu Oct 22 00:50:07 2020 +0800 drm/amdgpu: correct the cu and rb info for sienna cichlid Skip disabled sa to correct the cu_info and active_rbs for sienna cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit 0435d77cd9f4613e7c95ca208d252acf6d745c3f Author: Kenneth Feng Date: Wed Oct 21 17:30:02 2020 +0800 drm/amd/pm: remove the average clock value in sysfs if it's fine-grained clock dpm, remove the average clock value and reflects the real clock. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 392d256fa26d943fb0a019fea4be80382780d3b1 Author: Kenneth Feng Date: Wed Oct 21 16:15:47 2020 +0800 drm/amd/pm: fix pp_dpm_fclk fclk value is missing in pp_dpm_fclk. add this to correctly show the current value. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit e4eeceb73cb06b8fa379b94cbba77e6a0a032e43 Author: John Clements Date: Wed Oct 21 16:20:42 2020 +0800 Revert drm/amdgpu: disable sienna chichlid UMC RAS This reverts commit 265c280a4807419249644156654e5c40a235ea84. Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 9a2f408f5406df567a3515f4cb5c2ce1bde64501 Author: Likun Gao Date: Tue Oct 20 16:29:30 2020 +0800 drm/amd/pm: fix pcie information for sienna cichlid Fix the function used for sienna cichlid to get correct PCIE information by pp_dpm_pcie. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit d56b1980d7efe9ef08469e856fc0703d0cef65e4 Author: Jay Cornwall Date: Sat Oct 17 08:38:43 2020 -0500 drm/amdkfd: Use same SQ prefetch setting as amdgpu 0 causes instruction fetch stall at cache line boundary under some conditions on Navi10. A non-zero prefetch is the preferred default in any case. Fixes soft hang in Luxmark. Signed-off-by: Jay Cornwall Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit ebfe3c5183733f784264450a41646a482f964e5e Author: Di Zhu Date: Wed Oct 21 10:00:53 2020 +0800 rtnetlink: fix data overflow in rtnl_calcit() "ip addr show" command execute error when we have a physical network card with a large number of VFs The return value of if_nlmsg_size() in rtnl_calcit() will exceed range of u16 data type when any network cards has a larger number of VFs. rtnl_vfinfo_size() will significant increase needed dump size when the value of num_vfs is larger. Eventually we get a wrong value of min_ifinfo_dump_size because of overflow which decides the memory size needed by netlink dump and netlink_dump() will return -EMSGSIZE because of not enough memory was allocated. So fix it by promoting min_dump_alloc data type to u32 to avoid whole netlink message size overflow and it's also align with the data type of struct netlink_callback{}.min_dump_alloc which is assigned by return value of rtnl_calcit() Signed-off-by: Di Zhu Link: https://lore.kernel.org/r/20201021020053.1401-1-zhudi21@huawei.com Signed-off-by: Jakub Kicinski commit 5403caf21648d739bf2b1266c33e34384c313379 Author: Bartosz Golaszewski Date: Tue Oct 20 09:35:15 2020 +0200 net: ethernet: mtk-star-emac: select REGMAP_MMIO The driver depends on mmio regmap API but doesn't select the appropriate Kconfig option. This fixes it. Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver") Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20201020073515.22769-1-brgl@bgdev.pl Signed-off-by: Jakub Kicinski commit 5fce1e43e2d5bf2f7e3224d7b99b1c65ab2c26e2 Author: Xie He Date: Mon Oct 19 23:34:20 2020 -0700 net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup This driver calls ether_setup to set up the network device. The ether_setup function would add the IFF_TX_SKB_SHARING flag to the device. This flag indicates that it is safe to transmit shared skbs to the device. However, this is not true. This driver may pad the frame (in eth_tx) before transmission, so the skb may be modified. Fixes: 550fd08c2ceb ("net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared") Cc: Neil Horman Cc: Krzysztof Halasa Signed-off-by: Xie He Link: https://lore.kernel.org/r/20201020063420.187497-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit 01c4ceae0a38a0bdbfea6896f41efcd985a9c064 Author: Xie He Date: Mon Oct 19 18:31:52 2020 -0700 net: hdlc: In hdlc_rcv, check to make sure dev is an HDLC device The hdlc_rcv function is used as hdlc_packet_type.func to process any skb received in the kernel with skb->protocol == htons(ETH_P_HDLC). The purpose of this function is to provide second-stage processing for skbs not assigned a "real" L3 skb->protocol value in the first stage. This function assumes the device from which the skb is received is an HDLC device (a device created by this module). It assumes that netdev_priv(dev) returns a pointer to "struct hdlc_device". However, it is possible that some driver in the kernel (not necessarily in our control) submits a received skb with skb->protocol == htons(ETH_P_HDLC), from a non-HDLC device. In this case, the skb would still be received by hdlc_rcv. This will cause problems. hdlc_rcv should be able to recognize and drop invalid skbs. It should first make sure "dev" is actually an HDLC device, before starting its processing. This patch adds this check to hdlc_rcv. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: Krzysztof Halasa Signed-off-by: Xie He Link: https://lore.kernel.org/r/20201020013152.89259-1-xie.he.0141@gmail.com Signed-off-by: Jakub Kicinski commit 3652c9a1b1fe6cbdd4510eb220db548bff8704ae Author: Daniel Borkmann Date: Wed Oct 21 22:32:57 2020 +0200 bpf, libbpf: Guard bpf inline asm from bpf_tail_call_static Yaniv reported a compilation error after pulling latest libbpf: [...] ../libbpf/src/root/usr/include/bpf/bpf_helpers.h:99:10: error: unknown register name 'r0' in asm : "r0", "r1", "r2", "r3", "r4", "r5"); [...] The issue got triggered given Yaniv was compiling tracing programs with native target (e.g. x86) instead of BPF target, hence no BTF generated vmlinux.h nor CO-RE used, and later llc with -march=bpf was invoked to compile from LLVM IR to BPF object file. Given that clang was expecting x86 inline asm and not BPF one the error complained that these regs don't exist on the former. Guard bpf_tail_call_static() with defined(__bpf__) where BPF inline asm is valid to use. BPF tracing programs on more modern kernels use BPF target anyway and thus the bpf_tail_call_static() function will be available for them. BPF inline asm is supported since clang 7 (clang <= 6 otherwise throws same above error), and __bpf_unreachable() since clang 8, therefore include the latter condition in order to prevent compilation errors for older clang versions. Given even an old Ubuntu 18.04 LTS has official LLVM packages all the way up to llvm-10, I did not bother to special case the __bpf_unreachable() inside bpf_tail_call_static() further. Also, undo the sockex3_kern's use of bpf_tail_call_static() sample given they still have the old hacky way to even compile networking progs with native instead of BPF target so bpf_tail_call_static() won't be defined there anymore. Fixes: 0e9f6841f664 ("bpf, libbpf: Add bpf_tail_call_static helper for bpf programs") Reported-by: Yaniv Agman Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Yonghong Song Tested-by: Yaniv Agman Link: https://lore.kernel.org/bpf/CAMy7=ZUk08w5Gc2Z-EKi4JFtuUCaZYmE4yzhJjrExXpYKR4L8w@mail.gmail.com Link: https://lore.kernel.org/bpf/20201021203257.26223-1-daniel@iogearbox.net commit 99f6e9795a68fe23f96a2b5b0be07a3dd9457f99 Author: Oliver O'Halloran Date: Thu Oct 22 10:25:54 2020 +1100 powerpc/eeh: Fix eeh_dev_check_failure() for PE#0 In commit 269e583357df ("powerpc/eeh: Delete eeh_pe->config_addr") the following simplification was made: - if (!pe->addr && !pe->config_addr) { + if (!pe->addr) { eeh_stats.no_cfg_addr++; return 0; } This introduced a bug which causes EEH checking to be skipped for devices in PE#0. Before the change above the check would always pass since at least one of the two PE addresses would be non-zero in all circumstances. On PowerNV pe->config_addr would be the BDFN of the first device added to the PE. The zero BDFN is reserved for the PHB's root port, but this is fine since for obscure platform reasons the root port is never assigned to PE#0. Similarly, on pseries pe->addr has always been non-zero for the reasons outlined in commit 42de19d5ef71 ("powerpc/pseries/eeh: Allow zero to be a valid PE configuration address"). We can fix the problem by deleting the block entirely The original purpose of this test was to avoid performing EEH checks on devices that were not on an EEH capable bus. In modern Linux the edev->pe pointer will be NULL for devices that are not on an EEH capable bus. The code block immediately above this one already checks for the edev->pe == NULL case so this test (new and old) is entirely redundant. Ideally we'd delete eeh_stats.no_cfg_addr too since nothing increments it any more. Unfortunately, that information is exposed via /proc/powerpc/eeh which means it's technically ABI. We could make it hard-coded, but that's a change for another patch. Fixes: 269e583357df ("powerpc/eeh: Delete eeh_pe->config_addr") Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201021232554.1434687-1-oohall@gmail.com commit adfd272c4ccbe43d9761bb17dd8a4387d7815382 Author: Toke Høiland-Jørgensen Date: Tue Oct 20 23:25:57 2020 +0200 bpf, selftests: Extend test_tc_redirect to use modified bpf_redirect_neigh() This updates the test_tc_neigh prog in selftests to use the new syntax of bpf_redirect_neigh(). To exercise the helper both with and without the optional parameter, add an additional test_tc_neigh_fib test program, which does a bpf_fib_lookup() followed by a call to bpf_redirect_neigh() instead of looking up the ifindex in a map. Update the test_tc_redirect.sh script to run both versions of the test, and while we're add it, fix it to work on systems that have a consolidated dual-stack 'ping' binary instead of separate ping/ping6 versions. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/160322915724.32199.17530068594636950447.stgit@toke.dk commit eae503f7eb0509594076a951e422e29082385c96 Author: Tetsuhiro Kohada Date: Fri Sep 11 13:45:06 2020 +0900 exfat: remove useless check in exfat_move_file() In exfat_move_file(), the identity of source and target directory has been checked by the caller. Also, it gets stream.start_clu from file dir-entry, which is an invalid determination. Signed-off-by: Tetsuhiro Kohada Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 04cee52fb8bdbdb0506460f191ed6fd9e6faf00b Author: Tetsuhiro Kohada Date: Thu Sep 17 10:39:16 2020 +0900 exfat: remove 'rwoffset' in exfat_inode_info Remove 'rwoffset' in exfat_inode_info and replace it with the parameter of exfat_readdir(). Since rwoffset is referenced only by exfat_readdir(), it is not necessary a exfat_inode_info's member. Also, change cpos to point to the next of entry-set, and return the index of dir-entry via dir_entry->entry. Signed-off-by: Tetsuhiro Kohada Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon commit a7a241686c8f8142afafbd5fa5b9b9b6ea1aa173 Author: Tetsuhiro Kohada Date: Fri Sep 11 13:45:19 2020 +0900 exfat: replace memcpy with structure assignment Use structure assignment instead of memcpy. Signed-off-by: Tetsuhiro Kohada Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 6c958a09555515684947d94bfcfa8e8a414f0572 Author: Tetsuhiro Kohada Date: Fri Sep 11 13:44:39 2020 +0900 exfat: remove useless directory scan in exfat_add_entry() There is nothing in directory just created, so there is no need to scan. Signed-off-by: Tetsuhiro Kohada Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 188df41f212c9282f6cb05b832383ffca3c66893 Author: Tetsuhiro Kohada Date: Wed Sep 2 16:53:06 2020 +0900 exfat: eliminate dead code in exfat_find() The exfat_find_dir_entry() called by exfat_find() doesn't return -EEXIST. Therefore, the root-dir information setting is never executed. Signed-off-by: Tetsuhiro Kohada Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 45882a6a0dbd1189defae1a449152f8a8168c274 Author: Xianting Tian Date: Sat Aug 15 18:57:07 2020 +0800 exfat: use i_blocksize() to get blocksize We alreday has the interface i_blocksize() to get blocksize, so use it. Signed-off-by: Xianting Tian Signed-off-by: Namjae Jeon commit 9e456aeaacb6b44c5d8f858800d53c1958daad3d Author: Namjae Jeon Date: Fri Aug 14 11:03:46 2020 +0900 exfat: fix misspellings using codespell tool Sedat reported typos using codespell tool. $ codespell fs/exfat/*.c | grep -v iput fs/exfat/namei.c:293: upto ==> up to fs/exfat/nls.c:14: tabel ==> table $ codespell fs/exfat/*.h fs/exfat/exfat_fs.h:133: usally ==> usually Fix typos found by codespell. Reported-by: Sedat Dilek Signed-off-by: Namjae Jeon commit ba452c9e996d8a4c347b32805f91abb70de5de7e Author: Toke Høiland-Jørgensen Date: Tue Oct 20 23:25:56 2020 +0200 bpf: Fix bpf_redirect_neigh helper api to support supplying nexthop Based on the discussion in [0], update the bpf_redirect_neigh() helper to accept an optional parameter specifying the nexthop information. This makes it possible to combine bpf_fib_lookup() and bpf_redirect_neigh() without incurring a duplicate FIB lookup - since the FIB lookup helper will return the nexthop information even if no neighbour is present, this can simply be passed on to bpf_redirect_neigh() if bpf_fib_lookup() returns BPF_FIB_LKUP_RET_NO_NEIGH. Thus fix & extend it before helper API is frozen. [0] https://lore.kernel.org/bpf/393e17fc-d187-3a8d-2f0d-a627c7c63fca@iogearbox.net/ Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Reviewed-by: David Ahern Link: https://lore.kernel.org/bpf/160322915615.32199.1187570224032024535.stgit@toke.dk commit 2e76f188fd90d9ac29adbb82c30345f84d04bfa4 Author: Darrick J. Wong Date: Mon Oct 19 09:28:02 2020 -0700 xfs: cancel intents immediately if process_intents fails If processing recovered log intent items fails, we need to cancel all the unprocessed recovered items immediately so that a subsequent AIL push in the bail out path won't get wedged on the pinned intent items that didn't get processed. This can happen if the log contains (1) an intent that gets and releases an inode, (2) an intent that cannot be recovered successfully, and (3) some third intent item. When recovery of (2) fails, we leave (3) pinned in memory. Inode reclamation is called in the error-out path of xfs_mountfs before xfs_log_cancel_mount. Reclamation calls xfs_ail_push_all_sync, which gets stuck waiting for (3). Therefore, call xlog_recover_cancel_intents if _process_intents fails. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 3c6e65e679182d55779ef6f8582f0945af4319b0 Author: Steve French Date: Wed Oct 21 00:15:42 2020 -0500 smb3: do not try to cache root directory if dir leases not supported To servers which do not support directory leases (e.g. Samba) it is wasteful to try to open_shroot (ie attempt to cache the root directory handle). Skip attempt to open_shroot when server does not indicate support for directory leases. Cuts the number of requests on mount from 17 to 15, and cuts the number of requests on stat of the root directory from 4 to 3. Signed-off-by: Steve French CC: Stable # v5.1+ commit 3c3317daef0afa0cd541fc9c1bfd6ce8bbf1129a Author: Steve French Date: Wed Oct 21 13:12:08 2020 -0500 smb3: fix stat when special device file and mounted with modefromsid When mounting with modefromsid mount option, it was possible to get the error on stat of a fifo or char or block device: "cannot stat : Operation not supported" Special devices can be stored as reparse points by some servers (e.g. Windows NFS server and when using the SMB3.1.1 POSIX Extensions) but when the modefromsid mount option is used the client attempts to get the ACL for the file which requires opening with OPEN_REPARSE_POINT create option. Signed-off-by: Steve French CC: Stable Reviewed-by: Ronnie Sahlberg Reviewed-by: Shyam Prasad N commit def6e1dc17816826fac94f6a5ce125fdee3231ae Author: Samuel Cabrero Date: Fri Oct 16 11:54:55 2020 +0200 cifs: Print the address and port we are connecting to in generic_ip_connect() Can be helpful in debugging mount and reconnect issues Signed-off-by: Samuel Cabrero Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 62593011247c8a8cfeb0c86aff84688b196727c2 Author: Rohith Surabattula Date: Thu Oct 8 09:58:41 2020 +0000 SMB3: Resolve data corruption of TCP server info fields TCP server info field server->total_read is modified in parallel by demultiplex thread and decrypt offload worker thread. server->total_read is used in calculation to discard the remaining data of PDU which is not read into memory. Because of parallel modification, server->total_read can get corrupted and can result in discarding the valid data of next PDU. Signed-off-by: Rohith Surabattula Reviewed-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky CC: Stable #5.4+ Signed-off-by: Steve French commit ff5771613cd7b3a76cd16cb54aa81d30d3c11d48 Author: Pavel Begunkov Date: Tue Oct 20 23:50:27 2020 +0100 io_uring: don't reuse linked_timeout Clear linked_timeout for next requests in __io_queue_sqe() so we won't queue it up unnecessary when it's going to be punted. Signed-off-by: Pavel Begunkov Cc: stable@vger.kernel.org # v5.9 Signed-off-by: Jens Axboe commit 7d94531249a54b822f1a8b20d8a8f8d59ad1d985 Author: Ben Gardon Date: Wed Oct 14 11:26:49 2020 -0700 kvm: x86/mmu: Remove disallowed_hugepage_adjust shadow_walk_iterator arg In order to avoid creating executable hugepages in the TDP MMU PF handler, remove the dependency between disallowed_hugepage_adjust and the shadow_walk_iterator. This will open the function up to being used by the TDP MMU PF handler in a future patch. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-10-bgardon@google.com> Signed-off-by: Paolo Bonzini commit faaf05b00aecdb347ffd1d763d024394ec0329f8 Author: Ben Gardon Date: Wed Oct 14 11:26:47 2020 -0700 kvm: x86/mmu: Support zapping SPTEs in the TDP MMU Add functions to zap SPTEs to the TDP MMU. These are needed to tear down TDP MMU roots properly and implement other MMU functions which require tearing down mappings. Future patches will add functions to populate the page tables, but as for this patch there will not be any work for these functions to do. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-8-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 9e9eb226b91225fc199bbafc06f3cd70bfce0100 Author: Peter Xu Date: Wed Oct 14 11:26:46 2020 -0700 KVM: Cache as_id in kvm_memory_slot Cache the address space ID just like the slot ID. It will be used in order to fill in the dirty ring entries. Suggested-by: Paolo Bonzini Suggested-by: Sean Christopherson Reviewed-by: Sean Christopherson Signed-off-by: Peter Xu Message-Id: <20201014182700.2888246-7-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 2f2fad0897cbfda4e384a7b9eab73654974015ac Author: Ben Gardon Date: Wed Oct 14 20:26:45 2020 +0200 kvm: x86/mmu: Add functions to handle changed TDP SPTEs The existing bookkeeping done by KVM when a PTE is changed is spread around several functions. This makes it difficult to remember all the stats, bitmaps, and other subsystems that need to be updated whenever a PTE is modified. When a non-leaf PTE is marked non-present or becomes a leaf PTE, page table memory must also be freed. To simplify the MMU and facilitate the use of atomic operations on SPTEs in future patches, create functions to handle some of the bookkeeping required as a result of a change. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Signed-off-by: Paolo Bonzini commit 02c00b3a2f7e86203d878ff432a5a19876049db6 Author: Ben Gardon Date: Wed Oct 14 20:26:44 2020 +0200 kvm: x86/mmu: Allocate and free TDP MMU roots The TDP MMU must be able to allocate paging structure root pages and track the usage of those pages. Implement a similar, but separate system for root page allocation to that of the x86 shadow paging implementation. When future patches add synchronization model changes to allow for parallel page faults, these pages will need to be handled differently from the x86 shadow paging based MMU's root pages. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Signed-off-by: Paolo Bonzini commit fe5db27d36017715827e9be7711332d701c6b7de Author: Ben Gardon Date: Wed Oct 14 11:26:43 2020 -0700 kvm: x86/mmu: Init / Uninit the TDP MMU The TDP MMU offers an alternative mode of operation to the x86 shadow paging based MMU, optimized for running an L1 guest with TDP. The TDP MMU will require new fields that need to be initialized and torn down. Add hooks into the existing KVM MMU initialization process to do that initialization / cleanup. Currently the initialization and cleanup fucntions do not do very much, however more operations will be added in future patches. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20201014182700.2888246-4-bgardon@google.com> Signed-off-by: Paolo Bonzini commit c9180b7291cf13a746aaca907b9fdd499cce1e38 Author: Ben Gardon Date: Wed Oct 14 20:26:42 2020 +0200 kvm: x86/mmu: Introduce tdp_iter The TDP iterator implements a pre-order traversal of a TDP paging structure. This iterator will be used in future patches to create an efficient implementation of the KVM MMU for the TDP case. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Signed-off-by: Paolo Bonzini commit 5a9624affe7c7498fb395879d9bb613628e89e60 Author: Paolo Bonzini Date: Fri Oct 16 10:29:37 2020 -0400 KVM: mmu: extract spte.h and spte.c The SPTE format will be common to both the shadow and the TDP MMU. Extract code that implements the format to a separate module, as a first step towards adding the TDP MMU and putting mmu.c on a diet. Signed-off-by: Paolo Bonzini commit cb3eedab453911ca177c1e2e44add0b7fe4a6f09 Author: Paolo Bonzini Date: Mon Sep 28 10:17:17 2020 -0400 KVM: mmu: Separate updating a PTE from kvm_set_pte_rmapp The TDP MMU's own function for the changed-PTE notifier will need to be update a PTE in the exact same way as the shadow MMU. Rather than re-implementing this logic, factor the SPTE creation out of kvm_set_pte_rmapp. Extracted out of a patch by Ben Gardon. Signed-off-by: Paolo Bonzini commit 799a4190e7341b9bb24549245f2b8f7d11c65360 Author: Ben Gardon Date: Wed Oct 14 20:26:41 2020 +0200 kvm: x86/mmu: Separate making SPTEs from set_spte Separate the functions for generating leaf page table entries from the function that inserts them into the paging structure. This refactoring will facilitate changes to the MMU sychronization model to use atomic compare / exchanges (which are not guaranteed to succeed) instead of a monolithic MMU lock. No functional change expected. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This commit introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Reviewed-by: Peter Shier Signed-off-by: Paolo Bonzini commit cc4674d0ded069c1673fd6fec94a18e436828195 Author: Ben Gardon Date: Fri Sep 25 14:22:48 2020 -0700 kvm: mmu: Separate making non-leaf sptes from link_shadow_page The TDP MMU page fault handler will need to be able to create non-leaf SPTEs to build up the paging structures. Rather than re-implementing the function, factor the SPTE creation out of link_shadow_page. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in Gerrit at: https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538 Signed-off-by: Ben Gardon Message-Id: <20200925212302.3979661-9-bgardon@google.com> Signed-off-by: Paolo Bonzini commit c0623f5e5d21d65d08f6276ca4e64d470c833761 Merge: a4f1d94e6bc1b e2e1a1c86bf32 Author: Paolo Bonzini Date: Wed Oct 21 18:05:58 2020 -0400 Merge branch 'kvm-fixes' into 'next' Pick up bugfixes from 5.9, otherwise various tests fail. commit a4f1d94e6bc1b00c4efa9655ad14e0d49b8f1e37 Author: Joe Perches Date: Sat Oct 3 17:18:06 2020 -0700 KVM: PPC: Book3S HV: Make struct kernel_param_ops definition const This should be const, so make it so. Signed-off-by: Joe Perches Message-Id: Signed-off-by: Paolo Bonzini commit 30031c2b0574f43cc6888532b715f639afd39196 Author: Lai Jiangshan Date: Tue Sep 29 21:16:59 2020 -0700 KVM: x86: Let the guest own CR4.FSGSBASE Add FSGSBASE to the set of possible guest-owned CR4 bits, i.e. let the guest own it on VMX. KVM never queries the guest's CR4.FSGSBASE value, thus there is no reason to force VM-Exit on FSGSBASE being toggled. Note, because FSGSBASE is conditionally available, this is dependent on recent changes to intercept reserved CR4 bits and to update the CR4 guest/host mask in response to guest CPUID changes. Cc: Paolo Bonzini Signed-off-by: Lai Jiangshan [sean: added justification in changelog] Signed-off-by: Sean Christopherson Message-Id: <20200930041659.28181-6-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 2ed41aa631fc0251cedea3ae98802cb72079d198 Author: Sean Christopherson Date: Tue Sep 29 21:16:58 2020 -0700 KVM: VMX: Intercept guest reserved CR4 bits to inject #GP fault Intercept CR4 bits that are guest reserved so that KVM correctly injects a #GP fault if the guest attempts to set a reserved bit. If a feature is supported by the CPU but is not exposed to the guest, and its associated CR4 bit is not intercepted by KVM by default, then KVM will fail to inject a #GP if the guest sets the CR4 bit without triggering an exit, e.g. by toggling only the bit in question. Note, KVM doesn't give the guest direct access to any CR4 bits that are also dependent on guest CPUID. Yet. Signed-off-by: Sean Christopherson Message-Id: <20200930041659.28181-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit a6337a3542b152b35f47895b88ef1ac0dadf971d Author: Sean Christopherson Date: Tue Sep 29 21:16:57 2020 -0700 KVM: x86: Move call to update_exception_bitmap() into VMX code Now that vcpu_after_set_cpuid() and update_exception_bitmap() are called back-to-back, subsume the exception bitmap update into the common CPUID update. Drop the SVM invocation entirely as SVM's exception bitmap doesn't vary with respect to guest CPUID. Signed-off-by: Sean Christopherson Message-Id: <20200930041659.28181-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit c44d9b34701dc19792339ae3764ac7b763cb175c Author: Sean Christopherson Date: Tue Sep 29 21:16:56 2020 -0700 KVM: x86: Invoke vendor's vcpu_after_set_cpuid() after all common updates Move the call to kvm_x86_ops.vcpu_after_set_cpuid() to the very end of kvm_vcpu_after_set_cpuid() to allow the vendor implementation to react to changes made by the common code. In the near future, this will be used by VMX to update its CR4 guest/host masks to account for reserved bits. In the long term, SGX support will update the allowed XCR0 mask for enclaves based on the vCPU's allowed XCR0. vcpu_after_set_cpuid() (nee kvm_update_cpuid()) was originally added by commit 2acf923e38fb ("KVM: VMX: Enable XSAVE/XRSTOR for guest"), and was called separately after kvm_x86_ops.vcpu_after_set_cpuid() (nee kvm_x86_ops->cpuid_update()). There is no indication that the placement of the common code updates after the vendor updates was anything more than a "new function at the end" decision. Inspection of the current code reveals no dependency on kvm_x86_ops' vcpu_after_set_cpuid() in kvm_vcpu_after_set_cpuid() or any of its helpers. The bulk of the common code depends only on the guest's CPUID configuration, kvm_mmu_reset_context() does not consume dynamic vendor state, and there are no collisions between kvm_pmu_refresh() and VMX's update of PT state. Signed-off-by: Sean Christopherson Message-Id: <20200930041659.28181-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 6e1d849fa3296526e64b75fa227b6377cd0fd3da Author: Lai Jiangshan Date: Tue Sep 29 21:16:55 2020 -0700 KVM: x86: Intercept LA57 to inject #GP fault when it's reserved Unconditionally intercept changes to CR4.LA57 so that KVM correctly injects a #GP fault if the guest attempts to set CR4.LA57 when it's supported in hardware but not exposed to the guest. Long term, KVM needs to properly handle CR4 bits that can be under guest control but also may be reserved from the guest's perspective. But, KVM currently sets the CR4 guest/host mask only during vCPU creation, and reworking flows to change that will take a bit of elbow grease. Even if/when generic support for intercepting reserved bits exists, it's probably not worth letting the guest set CR4.LA57 directly. LA57 can't be toggled while long mode is enabled, thus it's all but guaranteed to be set once (maybe twice, e.g. by BIOS and kernel) during boot and never touched again. On the flip side, letting the guest own CR4.LA57 may incur extra VMREADs. In other words, this temporary "hack" is probably also the right long term fix. Fixes: fd8cb433734e ("KVM: MMU: Expose the LA57 feature to VM.") Cc: stable@vger.kernel.org Cc: Lai Jiangshan Signed-off-by: Lai Jiangshan [sean: rewrote changelog] Signed-off-by: Sean Christopherson Message-Id: <20200930041659.28181-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit f6426ab9c957e97418ac5b0466538792767b1738 Author: Suravee Suthikulpanit Date: Sat Oct 3 23:27:07 2020 +0000 KVM: SVM: Initialize prev_ga_tag before use The function amd_ir_set_vcpu_affinity makes use of the parameter struct amd_iommu_pi_data.prev_ga_tag to determine if it should delete struct amd_iommu_pi_data from a list when not running in AVIC mode. However, prev_ga_tag is initialized only when AVIC is enabled. The non-zero uninitialized value can cause unintended code path, which ends up making use of the struct vcpu_svm.ir_list and ir_list_lock without being initialized (since they are intended only for the AVIC case). This triggers NULL pointer dereference bug in the function vm_ir_list_del with the following call trace: svm_update_pi_irte+0x3c2/0x550 [kvm_amd] ? proc_create_single_data+0x41/0x50 kvm_arch_irq_bypass_add_producer+0x40/0x60 [kvm] __connect+0x5f/0xb0 [irqbypass] irq_bypass_register_producer+0xf8/0x120 [irqbypass] vfio_msi_set_vector_signal+0x1de/0x2d0 [vfio_pci] vfio_msi_set_block+0x77/0xe0 [vfio_pci] vfio_pci_set_msi_trigger+0x25c/0x2f0 [vfio_pci] vfio_pci_set_irqs_ioctl+0x88/0xb0 [vfio_pci] vfio_pci_ioctl+0x2ea/0xed0 [vfio_pci] ? alloc_file_pseudo+0xa5/0x100 vfio_device_fops_unl_ioctl+0x26/0x30 [vfio] ? vfio_device_fops_unl_ioctl+0x26/0x30 [vfio] __x64_sys_ioctl+0x96/0xd0 do_syscall_64+0x37/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Therefore, initialize prev_ga_tag to zero before use. This should be safe because ga_tag value 0 is invalid (see function avic_vm_init). Fixes: dfa20099e26e ("KVM: SVM: Refactor AVIC vcpu initialization into avic_init_vcpu()") Signed-off-by: Suravee Suthikulpanit Message-Id: <20201003232707.4662-1-suravee.suthikulpanit@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 2fcf4876ada8a293d3b92a1033b8b990a7c613d3 Author: Maxim Levitsky Date: Thu Oct 1 14:29:54 2020 +0300 KVM: nSVM: implement on demand allocation of the nested state This way we don't waste memory on VMs which don't use nesting virtualization even when the host enabled it for them. Signed-off-by: Maxim Levitsky Message-Id: <20201001112954.6258-5-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 72f211ecaa80a001c062829894ae5d5effab2b49 Author: Maxim Levitsky Date: Thu Oct 1 14:29:53 2020 +0300 KVM: x86: allow kvm_x86_ops.set_efer to return an error value This will be used to signal an error to the userspace, in case the vendor code failed during handling of this msr. (e.g -ENOMEM) Signed-off-by: Maxim Levitsky Message-Id: <20201001112954.6258-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit a6c42e8431657487b48fe5f57378517e16eef404 Author: Kevin Wang Date: Fri Oct 16 16:59:25 2020 +0800 drm/amd/swsmu: correct wrong feature bit mapping 1. when smc feature bit isn't mapped, the feature state isn't showed on sysfs node of pp_features. 2. add pp_features table title Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 7dffecaf4eabb700e7aef3cc6da333517cfc242a Author: Maxim Levitsky Date: Thu Oct 1 14:29:52 2020 +0300 KVM: x86: report negative values from wrmsr emulation to userspace This will allow the KVM to report such errors (e.g -ENOMEM) to the userspace. Signed-off-by: Maxim Levitsky Message-Id: <20201001112954.6258-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 36385ccc9b185e6958e2911d41202dd0f386298d Author: Maxim Levitsky Date: Thu Oct 1 14:29:51 2020 +0300 KVM: x86: xen_hvm_config: cleanup return values Return 1 on errors that are caused by wrong guest behavior (which will inject #GP to the guest) And return a negative error value on issues that are the kernel's fault (e.g -ENOMEM) Signed-off-by: Maxim Levitsky Message-Id: <20201001112954.6258-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit d5d6c18dc454f0ee410d035429dd9e1412c01f8a Author: Joe Perches Date: Sat Oct 3 17:18:07 2020 -0700 kvm x86/mmu: Make struct kernel_param_ops definitions const These should be const, so make it so. Signed-off-by: Joe Perches Message-Id: Reviewed-by: Ben Gardon Signed-off-by: Paolo Bonzini commit 3f4e3eb417b10ef45caddc4e1d3a18a34b539440 Author: Vitaly Kuznetsov Date: Thu Oct 1 15:05:41 2020 +0200 KVM: x86: bump KVM_MAX_CPUID_ENTRIES As vcpu->arch.cpuid_entries is now allocated dynamically, the only remaining use for KVM_MAX_CPUID_ENTRIES is to check KVM_SET_CPUID/ KVM_SET_CPUID2 input for sanity. Since it was reported that the current limit (80) is insufficient for some CPUs, bump KVM_MAX_CPUID_ENTRIES and use an arbitrary value '256' as the new limit. Signed-off-by: Vitaly Kuznetsov Message-Id: <20201001130541.1398392-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 255cbecfe0c9466ade041fe381dde18a61cca549 Author: Vitaly Kuznetsov Date: Thu Oct 1 15:05:40 2020 +0200 KVM: x86: allocate vcpu->arch.cpuid_entries dynamically The current limit for guest CPUID leaves (KVM_MAX_CPUID_ENTRIES, 80) is reported to be insufficient but before we bump it let's switch to allocating vcpu->arch.cpuid_entries[] array dynamically. Currently, 'struct kvm_cpuid_entry2' is 40 bytes so vcpu->arch.cpuid_entries is 3200 bytes which accounts for 1/4 of the whole 'struct kvm_vcpu_arch' but having it pre-allocated (for all vCPUs which we also pre-allocate) gives us no real benefits. Another plus of the dynamic allocation is that we now do kvm_check_cpuid() check before we assign anything to vcpu->arch.cpuid_nent/cpuid_entries so no changes are made in case the check fails. Opportunistically remove unneeded 'out' labels from kvm_vcpu_ioctl_set_cpuid()/kvm_vcpu_ioctl_set_cpuid2() and return directly whenever possible. Signed-off-by: Vitaly Kuznetsov Message-Id: <20201001130541.1398392-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini Reviewed-by: Maxim Levitsky commit f69858fcc727f8098419f3c595678e671bd2d8b7 Author: Vitaly Kuznetsov Date: Thu Oct 1 15:05:39 2020 +0200 KVM: x86: disconnect kvm_check_cpuid() from vcpu->arch.cpuid_entries As a preparatory step to allocating vcpu->arch.cpuid_entries dynamically make kvm_check_cpuid() check work with an arbitrary 'struct kvm_cpuid_entry2' array. Currently, when kvm_check_cpuid() fails we reset vcpu->arch.cpuid_nent to 0 and this is kind of weird, i.e. one would expect CPUIDs to remain unchanged when KVM_SET_CPUID[2] call fails. No functional change intended. It would've been possible to move the updated kvm_check_cpuid() in kvm_vcpu_ioctl_set_cpuid2() and check the supplied input before we start updating vcpu->arch.cpuid_entries/nent but we can't do the same in kvm_vcpu_ioctl_set_cpuid() as we'll have to copy 'struct kvm_cpuid_entry' entries first. The change will be made when vcpu->arch.cpuid_entries[] array becomes allocated dynamically. Suggested-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Message-Id: <20201001130541.1398392-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 3ee6fb4949aad0f2164829299934a77f62b79dcd Author: Oliver Upton Date: Tue Aug 18 15:24:29 2020 +0000 Documentation: kvm: fix some typos in cpuid.rst Reviewed-by: Jim Mattson Reviewed-by: Peter Shier Signed-off-by: Oliver Upton Change-Id: I0c6355b09fedf8f9cc4cc5f51be418e2c1c82b7b Message-Id: <20200818152429.1923996-5-oupton@google.com> Signed-off-by: Paolo Bonzini commit 66570e966dd9cb4fd57811d0056c6472a14a2c41 Author: Oliver Upton Date: Tue Aug 18 15:24:28 2020 +0000 kvm: x86: only provide PV features if enabled in guest's CPUID KVM unconditionally provides PV features to the guest, regardless of the configured CPUID. An unwitting guest that doesn't check KVM_CPUID_FEATURES before use could access paravirt features that userspace did not intend to provide. Fix this by checking the guest's CPUID before performing any paravirtual operations. Introduce a capability, KVM_CAP_ENFORCE_PV_FEATURE_CPUID, to gate the aforementioned enforcement. Migrating a VM from a host w/o this patch to a host with this patch could silently change the ABI exposed to the guest, warranting that we default to the old behavior and opt-in for the new one. Reviewed-by: Jim Mattson Reviewed-by: Peter Shier Signed-off-by: Oliver Upton Change-Id: I202a0926f65035b872bfe8ad15307c026de59a98 Message-Id: <20200818152429.1923996-4-oupton@google.com> Reviewed-by: Wanpeng Li Signed-off-by: Paolo Bonzini commit 210dfd93ea3dc63e8c21b75ddd909447341f6382 Author: Oliver Upton Date: Tue Aug 18 15:24:27 2020 +0000 kvm: x86: set wall_clock in kvm_write_wall_clock() Small change to avoid meaningless duplication in the subsequent patch. No functional change intended. Reviewed-by: Jim Mattson Reviewed-by: Peter Shier Signed-off-by: Oliver Upton Change-Id: I77ab9cdad239790766b7a49d5cbae5e57a3005ea Message-Id: <20200818152429.1923996-3-oupton@google.com> Signed-off-by: Paolo Bonzini commit 5b9bb0ebbcdcf8d04bf44a1e73e23a89a6711f31 Author: Oliver Upton Date: Tue Aug 18 15:24:26 2020 +0000 kvm: x86: encapsulate wrmsr(MSR_KVM_SYSTEM_TIME) emulation in helper fn No functional change intended. Reviewed-by: Jim Mattson Reviewed-by: Peter Shier Reviewed-by: Wanpeng Li Signed-off-by: Oliver Upton Change-Id: I7cbe71069db98d1ded612fd2ef088b70e7618426 Message-Id: <20200818152429.1923996-2-oupton@google.com> Signed-off-by: Paolo Bonzini commit 66af4f5cb1ee44c41a8433877c859d4b3f922f83 Author: Vitaly Kuznetsov Date: Fri Oct 2 17:43:13 2020 +0200 x86/kvm: Update the comment about asynchronous page fault in exc_page_fault() KVM was switched to interrupt-based mechanism for 'page ready' event delivery in Linux-5.8 (see commit 2635b5c4a0e4 ("KVM: x86: interrupt based APF 'page ready' event delivery")) and #PF (ab)use for 'page ready' event delivery was removed. Linux guest switched to this new mechanism exclusively in 5.9 (see commit b1d405751cd5 ("KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery")) so it is not possible to get #PF for a 'page ready' event even when the guest is running on top of an older KVM (APF mechanism won't be enabled). Update the comment in exc_page_fault() to reflect the new reality. Signed-off-by: Vitaly Kuznetsov Message-Id: <20201002154313.1505327-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 8f116a6c7320ce55e8e0885b79ff3518105775b5 Author: Matteo Croce Date: Thu Oct 1 13:20:14 2020 +0200 x86/kvm: hide KVM options from menuconfig when KVM is not compiled Let KVM_WERROR depend on KVM, so it doesn't show in menuconfig alone. Signed-off-by: Matteo Croce Message-Id: <20201001112014.9561-1-mcroce@linux.microsoft.com> Fixes: 4f337faf1c55e ("KVM: allow disabling -Werror") Signed-off-by: Paolo Bonzini commit 10f79ccaf3d767ecf724b5e04b077d28cbcbef57 Author: Li Qiang Date: Thu Oct 1 02:53:33 2020 -0700 Documentation: kvm: fix a typo Fixes: e287d6de62f74 ("Documentation: kvm: Convert cpuid.txt to .rst") Signed-off-by: Li Qiang Message-Id: <20201001095333.7611-1-liq3ea@163.com> Signed-off-by: Paolo Bonzini commit 043248b3280cefe286113525672327a4ddfecd3f Author: Paolo Bonzini Date: Tue Oct 20 10:57:01 2020 -0400 KVM: VMX: Forbid userspace MSR filters for x2APIC Allowing userspace to intercept reads to x2APIC MSRs when APICV is fully enabled for the guest simply can't work. But more in general, the LAPIC could be set to in-kernel after the MSR filter is setup and allowing accesses by userspace would be very confusing. We could in principle allow userspace to intercept reads and writes to TPR, and writes to EOI and SELF_IPI, but while that could be made it work, it would still be silly. Cc: Alexander Graf Cc: Aaron Lewis Cc: Peter Xu Cc: Sean Christopherson Signed-off-by: Paolo Bonzini commit 9389b9d5d3566b5687829a4098e715f0016451c7 Author: Sean Christopherson Date: Mon Oct 5 12:55:32 2020 -0700 KVM: VMX: Ignore userspace MSR filters for x2APIC Rework the resetting of the MSR bitmap for x2APIC MSRs to ignore userspace filtering. Allowing userspace to intercept reads to x2APIC MSRs when APICV is fully enabled for the guest simply can't work; the LAPIC and thus virtual APIC is in-kernel and cannot be directly accessed by userspace. To keep things simple we will in fact forbid intercepting x2APIC MSRs altogether, independent of the default_allow setting. Cc: Alexander Graf Cc: Aaron Lewis Cc: Peter Xu Signed-off-by: Sean Christopherson Message-Id: <20201005195532.8674-3-sean.j.christopherson@intel.com> [Modified to operate even if APICv is disabled, adjust documentation. - Paolo] Signed-off-by: Paolo Bonzini commit f1bcddffe46b349a82445a8d9efd5f5fcb72557f Author: Andrey Grodzovsky Date: Fri Oct 16 10:50:44 2020 -0400 drm/amd/psp: Fix sysfs: cannot create duplicate filename psp sysfs not cleaned up on driver unload for sienna_cichlid Fixes: ce87c98db428e7 ("drm/amdgpu: Include sienna_cichlid in USBC PD FW support.") Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit 5dff80bdce9e385af5716ed083f9e33e814484ab Author: Andrey Grodzovsky Date: Wed Oct 14 13:12:30 2020 -0400 drm/amd/display: Avoid MST manager resource leak. On connector destruction call drm_dp_mst_topology_mgr_destroy to release resources allocated in drm_dp_mst_topology_mgr_init. Do it only if MST manager was initilized before otherwsie a crash is seen on driver unload/device unplug. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 0d427f6c290c69827b2ca33c5f1386816992e4d8 Author: Andrey Grodzovsky Date: Wed Oct 14 13:10:06 2020 -0400 drm/amd/display: Revert "drm/amd/display: Fix a list corruption" This fixes regression on device unplug and/or driver unload. [ 65.681501 < 0.000004>] BUG: kernel NULL pointer dereference, address: 0000000000000008 [ 65.681504 < 0.000003>] #PF: supervisor write access in kernel mode [ 65.681506 < 0.000002>] #PF: error_code(0x0002) - not-present page [ 65.681507 < 0.000001>] PGD 7c9437067 P4D 7c9437067 PUD 7c9db7067 PMD 0 [ 65.681511 < 0.000004>] Oops: 0002 [#1] SMP NOPTI [ 65.681512 < 0.000001>] CPU: 8 PID: 127 Comm: kworker/8:1 Tainted: G W O 5.9.0-rc2-dev+ #59 [ 65.681514 < 0.000002>] Hardware name: System manufacturer System Product Name/PRIME X470-PRO, BIOS 4406 02/28/2019 [ 65.681525 < 0.000011>] Workqueue: events drm_connector_free_work_fn [drm] [ 65.681535 < 0.000010>] RIP: 0010:drm_atomic_private_obj_fini+0x11/0x60 [drm] [ 65.681537 < 0.000002>] Code: de 4c 89 e7 e8 70 f2 ba f8 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 90 0f 1f 44 00 00 48 8b 47 08 48 8b 17 55 48 89 e5 53 <48> 89 42 08 48 89 10 48 b8 00 01 00 00 00 00 ad de 48 89 fb 48 89 [ 65.681541 < 0.000004>] RSP: 0018:ffffa5fa805efdd8 EFLAGS: 00010246 [ 65.681542 < 0.000001>] RAX: 0000000000000000 RBX: ffff9a4b094654d8 RCX: 0000000000000000 [ 65.681544 < 0.000002>] RDX: 0000000000000000 RSI: ffffffffba197bc2 RDI: ffff9a4b094654d8 [ 65.681545 < 0.000001>] RBP: ffffa5fa805efde0 R08: ffffffffba197b82 R09: 0000000000000040 [ 65.681547 < 0.000002>] R10: ffffa5fa805efdc8 R11: 000000000000007f R12: ffff9a4b09465888 [ 65.681549 < 0.000002>] R13: ffff9a4b36f20010 R14: ffff9a4b36f20290 R15: ffff9a4b3a692840 [ 65.681551 < 0.000002>] FS: 0000000000000000(0000) GS:ffff9a4b3ea00000(0000) knlGS:0000000000000000 [ 65.681553 < 0.000002>] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 65.681554 < 0.000001>] CR2: 0000000000000008 CR3: 00000007c9c82000 CR4: 00000000003506e0 [ 65.681556 < 0.000002>] Call Trace: [ 65.681561 < 0.000005>] drm_dp_mst_topology_mgr_destroy+0xc4/0xe0 [drm_kms_helper] [ 65.681612 < 0.000051>] amdgpu_dm_connector_destroy+0x3d/0x110 [amdgpu] [ 65.681622 < 0.000010>] drm_connector_free_work_fn+0x78/0x90 [drm] [ 65.681624 < 0.000002>] process_one_work+0x164/0x410 [ 65.681626 < 0.000002>] worker_thread+0x4d/0x450 [ 65.681628 < 0.000002>] ? rescuer_thread+0x390/0x390 [ 65.681630 < 0.000002>] kthread+0x10a/0x140 [ 65.681632 < 0.000002>] ? kthread_unpark+0x70/0x70 [ 65.681634 < 0.000002>] ret_from_fork+0x22/0x30 This reverts commit 1545fbf97eafc1dbdc2923e58b4186b16a834784. Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 0d142232d9436acab3578ee995472f58adcbf201 Author: Likun Gao Date: Thu Oct 15 10:48:15 2020 +0800 drm/amdgpu: update golden setting for sienna_cichlid Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit d48d7484d8dca1d4577fc53f1f826e68420d00eb Author: Kevin Wang Date: Fri Oct 16 11:07:47 2020 +0800 drm/amd/swsmu: add missing feature map for sienna_cichlid it will cause smu sysfs node of "pp_features" show error. Signed-off-by: Kevin Wang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit 207ac684792560acdb9e06f9d707ebf63c84b0e0 Author: Evan Quan Date: Thu Oct 15 14:57:46 2020 +0800 drm/amdgpu: correct the gpu reset handling for job != NULL case Current code wrongly treat all cases as job == NULL. Signed-off-by: Evan Quan Reviewed-and-tested-by: Jane Jian Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 843c7eb2f7571aa092a8ea010c80e8d94c197f67 Author: Likun Gao Date: Wed Sep 30 14:34:08 2020 +0800 drm/amdgpu: add rlc iram and dram firmware support Support to load RLC iram and dram ucode when RLC firmware struct use v2.2 Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 274c240c760ed4647ddae1f1b994e0dd3f71cbb1 Author: Likun Gao Date: Wed Oct 14 14:05:18 2020 +0800 drm/amdgpu: add function to program pbb mode for sienna cichlid Add function for sienna_cichlid to force PBB workload mode to zero by checking whether there have SE been harvested. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.9.x commit 030f066f677f297033772dcdce9538b968fbeb14 Author: Krzysztof Kozlowski Date: Tue Oct 13 18:27:25 2020 +0200 docs: submitting-patches: describe preserving review/test tags From time to time, the novice kernel contributors do not add Reviewed-by or Tested-by tags to the next versions of the patches. Mostly because they are unaware that responsibility of adding these tags in next version is on submitter, not maintainer. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201013162725.13572-1-krzk@kernel.org Signed-off-by: Jonathan Corbet commit e0533dee522593c25a88b63bf730b2096f6d4122 Author: Bailu Lin Date: Tue Oct 13 19:20:03 2020 -0700 Documentation: Chinese translation of Documentation/arm64/hugetlbpage.rst This is a Chinese translated version of Documentation/arm64/hugetlbpage.rst Signed-off-by: Bailu Lin Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20201014022003.43862-1-bailu.lin@vivo.com Signed-off-by: Jonathan Corbet commit d7a4c55b1376962a32708def0930ec5a72ba1578 Author: Wei Lin Chang Date: Thu Oct 15 14:22:42 2020 +0800 Documentation: x86: fix a missing word in x86_64/mm.rst. This patch adds a missing word in x86/x86_64/mm.rst, without which the note reads awkwardly. Signed-off-by: Wei Lin Chang Link: https://lore.kernel.org/r/20201015062242.26296-1-r09922117@csie.ntu.edu.tw Signed-off-by: Jonathan Corbet commit d16eb0edf91760cac4d8cb09d8b9ab162424f0df Author: Mauro Carvalho Chehab Date: Thu Oct 15 11:12:06 2020 +0200 docs: driver-api: remove a duplicated index entry The ipmb file was added twice at index.rst. That sounds to be because the same patch was applied twice, via different git trees: commit f6ae22d64433fd8e08654adad7966299da931bb9 Author: Mauro Carvalho Chehab Commit: Jonathan Corbet docs: ipmb: place it at driver-api and convert to ReST commit ac499fba98c3c65078fd84fa0a62cd6f6d5837ed Author: Mauro Carvalho Chehab Commit: Corey Minyard docs: ipmb: place it at driver-api and convert to ReST With Sphinx 4.0.0 development tree, a new warning is produced due to that: .../Documentation/driver-api/index.rst:14: WARNING: duplicated entry found in toctree: driver-api/ipmb The fix is trivial: just drop the duplicated line. Fixes: f6ae22d64433 ("docs: ipmb: place it at driver-api and convert to ReST") Fixes: ac499fba98c3 ("docs: ipmb: place it at driver-api and convert to ReST") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/623fb26a8409a7b002e45bdbb6f517ac08fd508a.1602753121.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit ac8bf0de6ad7fa399d016d6dfc4b9c2f17625a8b Author: Kees Cook Date: Thu Oct 15 15:45:59 2020 -0700 docs: lkdtm: Modernize and improve details The details on using LKDTM were overly obscure. Modernize the details and expand examples to better illustrate how to use the interfaces. Additionally add missing SPDX header. Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201015224559.2137489-1-keescook@chromium.org Signed-off-by: Jonathan Corbet commit 27def953b63b43508021f31560b7d169c5f77857 Author: Kees Cook Date: Thu Oct 15 16:17:31 2020 -0700 docs: deprecated.rst: Expand str*cpy() replacement notes The notes on replacing the deprecated str*cpy() functions didn't call enough attention to the change in return type. Add these details and clean up the language a bit more. Signed-off-by: Kees Cook Acked-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20201015231730.2138505-1-keescook@chromium.org Signed-off-by: Jonathan Corbet commit bb7a2c636257a26acf910acf38d13eae86d7e2c1 Author: Hui Su Date: Mon Oct 19 01:05:57 2020 +0800 docs/cpu-load: format the example code. format the example code. Signed-off-by: Hui Su Link: https://lore.kernel.org/r/20201018170557.GA7670@rlk Signed-off-by: Jonathan Corbet commit f804b3159482eedbb4250b1e9248c308fb63b805 Merge: b7769c45b8d95 c5b8e4644607b Author: Linus Torvalds Date: Wed Oct 21 11:28:43 2020 -0700 Merge tag 'linux-watchdog-5.10-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - Add Toshiba Visconti watchdog driver - it87_wdt: add IT8772 + IT8784 - several fixes and improvements * tag 'linux-watchdog-5.10-rc1' of git://www.linux-watchdog.org/linux-watchdog: watchdog: Add Toshiba Visconti watchdog driver watchdog: bindings: Add binding documentation for Toshiba Visconti watchdog device watchdog: it87_wdt: add IT8784 ID watchdog: sp5100_tco: Enable watchdog on Family 17h devices if disabled watchdog: sp5100: Fix definition of EFCH_PM_DECODEEN3 watchdog: renesas_wdt: support handover from bootloader watchdog: imx7ulp: Watchdog should continue running for wait/stop mode watchdog: rti: Simplify with dev_err_probe() watchdog: davinci: Simplify with dev_err_probe() watchdog: cadence: Simplify with dev_err_probe() watchdog: remove unneeded inclusion of watchdog: Use put_device on error watchdog: Fix memleak in watchdog_cdev_register watchdog: imx7ulp: Strictly follow the sequence for wdog operations watchdog: it87_wdt: add IT8772 ID watchdog: pcwd_usb: Avoid GFP_ATOMIC where it is not needed drivers: watchdog: rdc321x_wdt: Fix race condition bugs commit b7769c45b8d95f1c70b9dec38c8de8ad229ce222 Merge: 68a3633694ab3 35331b506f6c6 Author: Linus Torvalds Date: Wed Oct 21 11:22:08 2020 -0700 Merge tag 'rtc-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "A new driver this cycle is making the bulk of the changes and the rx8010 driver has been rework to use the modern APIs. Summary: Subsystem: - new generic DT properties: aux-voltage-chargeable, trickle-voltage-millivolt New driver: - Microcrystal RV-3032 Drivers: - ds1307: use aux-voltage-chargeable - r9701, rx8010: modernization of the driver - rv3028: fix clock output, trickle resistor values, RAM configuration registers" * tag 'rtc-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (50 commits) rtc: r9701: set range rtc: r9701: convert to devm_rtc_allocate_device rtc: r9701: stop setting RWKCNT rtc: r9701: remove useless memset rtc: r9701: stop setting a default time rtc: r9701: remove leftover comment rtc: rv3032: Add a driver for Microcrystal RV-3032 dt-bindings: rtc: rv3032: add RV-3032 bindings dt-bindings: rtc: add trickle-voltage-millivolt rtc: rv3028: ensure ram configuration registers are saved rtc: rv3028: factorize EERD bit handling rtc: rv3028: fix trickle resistor values rtc: rv3028: fix clock output support rtc: mt6397: Remove unused member dev rtc: rv8803: simplify the return expression of rv8803_nvram_write rtc: meson: simplify the return expression of meson_vrtc_probe rtc: rx8010: rename rx8010_init_client() to rx8010_init() rtc: ds1307: enable rx8130's backup battery, make it chargeable optionally rtc: ds1307: consider aux-voltage-chargeable rtc: ds1307: store previous charge default per chip ... commit 68a3633694ab37b368edc30d59235e8348e2d00e Merge: b5df4b5c28b23 a3d13a0a23ea2 Author: Linus Torvalds Date: Wed Oct 21 11:15:42 2020 -0700 Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull dmi update from Jean Delvare. * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: Replace HTTP links with HTTPS ones: DMI/SMBIOS SUPPORT commit b5df4b5c28b232d1fc0b48660f44668faebb0bcb Merge: ed7cfefe4443d 40daf09a30a0c Author: Linus Torvalds Date: Wed Oct 21 10:54:05 2020 -0700 Merge branch 'i2c/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: - if a host can be a client, too, the I2C core can now use it to emulate SMBus HostNotify support (STM32 and R-Car added this so far) - also for client mode, a testunit has been added. It can create rare situations on the bus, so host controllers can be tested - a binding has been added to mark the bus as "single-master". This allows for better timeout detections - new driver for Mellanox Bluefield - massive refactoring of the Tegra driver - EEPROMs recognized by the at24 driver can now have custom names - rest is driver updates * 'i2c/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (80 commits) Documentation: i2c: add testunit docs to index i2c: tegra: Improve driver module description i2c: tegra: Clean up whitespaces, newlines and indentation i2c: tegra: Clean up and improve comments i2c: tegra: Clean up printk messages i2c: tegra: Clean up variable names i2c: tegra: Improve formatting of variables i2c: tegra: Check errors for both positive and negative values i2c: tegra: Factor out hardware initialization into separate function i2c: tegra: Factor out register polling into separate function i2c: tegra: Factor out packet header setup from tegra_i2c_xfer_msg() i2c: tegra: Factor out error recovery from tegra_i2c_xfer_msg() i2c: tegra: Rename wait/poll functions i2c: tegra: Remove "dma" variable from tegra_i2c_xfer_msg() i2c: tegra: Remove redundant check in tegra_i2c_issue_bus_clear() i2c: tegra: Remove likely/unlikely from the code i2c: tegra: Remove outdated barrier() i2c: tegra: Clean up variable types i2c: tegra: Reorder location of functions in the code i2c: tegra: Clean up probe function ... commit ed7cfefe4443dcc811e84b345a3fb122eeb47661 Merge: c4d6fe7311762 28e1581c3b4ea Author: Linus Torvalds Date: Wed Oct 21 10:34:10 2020 -0700 Merge tag 'ceph-for-5.10-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: - a patch that removes crush_workspace_mutex (myself). CRUSH computations are no longer serialized and can run in parallel. - a couple new filesystem client metrics for "ceph fs top" command (Xiubo Li) - a fix for a very old messenger bug that affected the filesystem, marked for stable (myself) - assorted fixups and cleanups throughout the codebase from Jeff and others. * tag 'ceph-for-5.10-rc1' of git://github.com/ceph/ceph-client: (27 commits) libceph: clear con->out_msg on Policy::stateful_server faults libceph: format ceph_entity_addr nonces as unsigned libceph: fix ENTITY_NAME format suggestion libceph: move a dout in queue_con_delay() ceph: comment cleanups and clarifications ceph: break up send_cap_msg ceph: drop separate mdsc argument from __send_cap ceph: promote to unsigned long long before shifting ceph: don't SetPageError on readpage errors ceph: mark ceph_fmt_xattr() as printf-like for better type checking ceph: fold ceph_update_writeable_page into ceph_write_begin ceph: fold ceph_sync_writepages into writepage_nounlock ceph: fold ceph_sync_readpages into ceph_readpage ceph: don't call ceph_update_writeable_page from page_mkwrite ceph: break out writeback of incompatible snap context to separate function ceph: add a note explaining session reject error string libceph: switch to the new "osd blocklist add" command libceph, rbd, ceph: "blacklist" -> "blocklist" ceph: have ceph_writepages_start call pagevec_lookup_range_tag ceph: use kill_anon_super helper ... commit 25219dbfa734e848fe4da84143f972d0301bb7c6 Author: Darrick J. Wong Date: Fri Oct 9 16:42:59 2020 -0700 xfs: fix fallocate functions when rtextsize is larger than 1 In commit fe341eb151ec, I forgot that xfs_free_file_space isn't strictly a "remove mapped blocks" function. It is actually a function to zero file space by punching out the middle and writing zeroes to the unaligned ends of the specified range. Therefore, putting a rtextsize alignment check in that function is wrong because that breaks unaligned ZERO_RANGE on the realtime volume. Furthermore, xfs_file_fallocate already has alignment checks for the functions require the file range to be aligned to the size of a fundamental allocation unit (which is 1 FSB on the data volume and 1 rt extent on the realtime volume). Create a new helper to check fallocate arguments against the realtiem allocation unit size, fix the fallocate frontend to use it, fix free_file_space to delete the correct range, and remove a now redundant check from insert_file_space. NOTE: The realtime extent size is not required to be a power of two! Fixes: fe341eb151ec ("xfs: ensure that fpunch, fcollapse, and finsert operations are aligned to rt extent size") Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R commit 0ed37ac586c01fd5bf3f7559de79f1d621ccf192 Author: Matthieu Baerts Date: Wed Oct 21 12:51:53 2020 +0200 mptcp: depends on IPV6 but not as a module Like TCP, MPTCP cannot be compiled as a module. Obviously, MPTCP IPv6' support also depends on CONFIG_IPV6. But not all functions from IPv6 code are exported. To simplify the code and reduce modifications outside MPTCP, it was decided from the beginning to support MPTCP with IPv6 only if CONFIG_IPV6 was built inlined. That's also why CONFIG_MPTCP_IPV6 was created. More modifications are needed to support CONFIG_IPV6=m. Even if it was not explicit, until recently, we were forcing CONFIG_IPV6 to be built-in because we had "select IPV6" in Kconfig. Now that we have "depends on IPV6", we have to explicitly set "IPV6=y" to force CONFIG_IPV6 not to be built as a module. In other words, we can now only have CONFIG_MPTCP_IPV6=y if CONFIG_IPV6=y. Note that the new dependency might hide the fact IPv6 is not supported in MPTCP even if we have CONFIG_IPV6=m. But selecting IPV6 like we did before was forcing it to be built-in while it was maybe not what the user wants. Reported-by: Geert Uytterhoeven Fixes: 010b430d5df5 ("mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it") Signed-off-by: Matthieu Baerts Link: https://lore.kernel.org/r/20201021105154.628257-1-matthieu.baerts@tessares.net Signed-off-by: Jakub Kicinski commit 28e34e751f6c50098d9bcecb30c97634b6126730 Merge: 4c0e51f8054c8 7d69b117c3130 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:44 2020 -0500 Merge branch 'remotes/lorenzo/pci/xilinx' - Remove leftover bridge initialization (Lorenzo Pieralisi) * remotes/lorenzo/pci/xilinx: PCI: xilinx-cpm: Remove leftover bridge initialization commit 4c0e51f8054c82065dca9669739573390f25743c Merge: a2340daa6a8c7 026b940f18bc5 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:44 2020 -0500 Merge branch 'remotes/lorenzo/pci/xgene' - Remove unused assignment (Krzysztof Wilczyński) * remotes/lorenzo/pci/xgene: PCI: xgene: Remove unused assignment to variable msi_val commit a2340daa6a8c767099edf38492f2bebc19f65b69 Merge: 214b2e042fbae 93c9fce7d5f3d Author: Bjorn Helgaas Date: Wed Oct 21 09:58:44 2020 -0500 Merge branch 'pci/vmd' - Add physical offset helper (Jon Derrick) - Add bus offset configuration helper (Jon Derrick) - Add IRQ domain configuration helper (Jon Derrick) - Add IRQ allocation helper (Jon Derrick) - Drop pci_save_state()/pci_restore_state() in favor of the PCI core PM (Jon Derrick) * pci/vmd: PCI: vmd: Update VMD PM to correctly use generic PCI PM PCI: vmd: Create IRQ allocation helper PCI: vmd: Create IRQ Domain configuration helper PCI: vmd: Create bus offset configuration helper PCI: vmd: Create physical offset helper commit 214b2e042fbae7945cea46d8daaa54eac7b1a055 Merge: f95f023d11a04 cd198909d680f Author: Bjorn Helgaas Date: Wed Oct 21 09:58:43 2020 -0500 Merge branch 'remotes/lorenzo/pci/tegra' - Drop return value checking for debugfs_create() calls (Greg Kroah-Hartman) - Convert debugfs "ports" file to use DEFINE_SEQ_ATTRIBUTE() (Liu Shixin) * remotes/lorenzo/pci/tegra: PCI: tegra: Convert to use DEFINE_SEQ_ATTRIBUTE macro PCI: tegra: No need to check return value of debugfs_create() functions commit f95f023d11a04b4bac2a7f39e8dc0a3f54e75eb9 Merge: 3b353982202be d16d538ff4914 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:43 2020 -0500 Merge branch 'remotes/lorenzo/pci/rcar' - Document R8A774A1, R8A774B1, R8A774E1 endpoint support in DT (Lad Prabhakar) - Add R8A774A1, R8A774B1, R8A774E1 (RZ/G2M, RZ/G2N, RZ/G2H) IDs to endpoint test (Lad Prabhakar) - Add device tree support for R8A7742 (Lad Prabhakar) - Use "fallthrough" pseudo-keyword (Gustavo A. R. Silva) * remotes/lorenzo/pci/rcar: dt-bindings: PCI: rcar: Add device tree support for r8a7742 PCI: rcar-gen2: Use fallthrough pseudo-keyword misc: pci_endpoint_test: Add Device ID for RZ/G2H PCIe controller dt-bindings: pci: rcar-pci-ep: Document r8a774e1 misc: pci_endpoint_test: Add Device ID for RZ/G2M and RZ/G2N PCIe controllers dt-bindings: pci: rcar-pci-ep: Document r8a774a1 and r8a774b1 commit 3b353982202be8ac36aab1636c365e02f8dd46a0 Merge: be36e9b971442 d3d4d028afb78 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:43 2020 -0500 Merge branch 'remotes/lorenzo/pci/qcom' - Make sure PCIe is reset before init to work around QSDK U-Boot issue (Ansuel Smith) - Set iproc affinity mask on MSI interrupts (Mark Tomlinson) * remotes/lorenzo/pci/qcom: PCI: qcom: Make sure PCIe is reset before init for rev 2.1.0 commit be36e9b97144206a30a85ceb920b6f90c3595afd Merge: 4f317eac2f65d d5071f086bac5 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:42 2020 -0500 Merge branch 'remotes/lorenzo/pci/mvebu' - Remove useless msi_controller pointer allocation (Lorenzo Pieralisi) * remotes/lorenzo/pci/mvebu: PCI: mvebu: Remove useless msi_controller pointer allocation commit 4f317eac2f65d62f7f250fcefc1b0804e6b288da Merge: 92f27db7b1bdc df7fc05561126 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:42 2020 -0500 Merge branch 'remotes/lorenzo/pci/mobiveil' - Simplify mobiveil_pcie_init_irq_domain() (Liu Shixin) * remotes/lorenzo/pci/mobiveil: PCI: mobiveil: Simplify mobiveil_pcie_init_irq_domain() return expression commit 92f27db7b1bdc9611425e74fbd101c88ab21269e Merge: 1f287b5ce5e7d a98d2187efd9e Author: Bjorn Helgaas Date: Wed Oct 21 09:58:41 2020 -0500 Merge branch 'remotes/lorenzo/pci/meson' - Add pci-meson module support and enable by default on ARCH_MESON (Kevin Hilman) * remotes/lorenzo/pci/meson: PCI: meson: Build as module by default commit 1f287b5ce5e7df4ad8190ed03c440adee5c79cd0 Merge: 29828fc20ab1c 9846155b00fe5 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:41 2020 -0500 Merge branch 'remotes/lorenzo/pci/loongson' * remotes/lorenzo/pci/loongson: PCI: loongson: Simplify loongson_pci_probe() return expression commit 29828fc20ab1c5d2f41e2749921c4bd32da6c38e Merge: 7ba381c449fdf ecc3e424d190e Author: Bjorn Helgaas Date: Wed Oct 21 09:58:41 2020 -0500 Merge branch 'remotes/lorenzo/pci/kirin' - Return -EPROBE_DEFER in case the gpio isn't ready (Bean Huo) * remotes/lorenzo/pci/kirin: PCI: kirin: Return -EPROBE_DEFER in case the gpio isn't ready commit 7ba381c449fdfaae9768e092e1e8a87ac1459561 Merge: 982f8334262d0 936452941cbec Author: Bjorn Helgaas Date: Wed Oct 21 09:58:40 2020 -0500 Merge branch 'remotes/lorenzo/pci/iproc' - Set affinity mask on MSI interrupts (Mark Tomlinson) - Simplify by using module_bcma_driver (Liu Shixin) - Fix 'using integer as NULL pointer' warning (Krzysztof Wilczyński) * remotes/lorenzo/pci/iproc: PCI: iproc: Fix using plain integer as NULL pointer in iproc_pcie_pltfm_probe PCI: iproc: Use module_bcma_driver to simplify the code PCI: iproc: Set affinity mask on MSI interrupts commit 982f8334262d02bfcd41612411c7d8ff40011914 Merge: 9d69d649bbf8b 61660dbf08e11 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:40 2020 -0500 Merge branch 'remotes/lorenzo/pci/imx6' - Use "fallthrough" pseudo-keyword (Gustavo A. R. Silva) - Drop redundant error messages after devm_clk_get() (Anson Huang) * remotes/lorenzo/pci/imx6: PCI: imx6: Do not output error message when devm_clk_get() failed with -EPROBE_DEFER PCI: imx6: Use fallthrough pseudo-keyword commit 9d69d649bbf8bef7983b9343d4514b214860a50b Merge: 924bb1f9b014b 915cff7f38c5e Author: Bjorn Helgaas Date: Wed Oct 21 09:58:39 2020 -0500 Merge branch 'remotes/lorenzo/pci/hv' - Fix hibernation in case interrupts are not re-created (Dexuan Cui) * remotes/lorenzo/pci/hv: PCI: hv: Fix hibernation in case interrupts are not re-created commit 924bb1f9b014bec2d38ebe98d5ee37f448dac691 Merge: a78f2e07d047b 15b23906347c0 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:39 2020 -0500 Merge branch 'remotes/lorenzo/pci/dwc' - Fix designware-ep Header Type check (Hou Zhiqiang) - Use DBI accessors instead of own config accessors (Rob Herring) - Allow overriding bridge pci_ops (Rob Herring) - Allow root and child buses to have different pci_ops (Rob Herring) - Add default dwc pci_ops.map_bus (Rob Herring) - Use pci_ops for root config space accessors in al, exynos, histb, keystone, kirin, meson, tegra (Rob Herring) - Remove dwc own/other config accessor ops (Rob Herring) - Use generic config accessors in dwc (Rob Herring) - Also call .add_bus() callback for root bus (Rob Herring) - Convert keystone .scan_bus() callback to use pci_ops.add_bus (Rob Herring) - Convert dwc to use pci_host_probe() (Rob Herring) - Remove dwc root_bus pointer (Rob Herring) - Remove storing of PCI resources in dwc-specific structs (Rob Herring) - Simplify config space handling (Rob Herring) - Drop keystone duplicated DT num-viewport handling (Rob Herring) - Check CONFIG_PCI_MSI in dw_pcie_msi_init() instead of duplicating it in all the drivers (Rob Herring) - Remove imx6 duplicate PCIE_LINK_WIDTH_SPEED_CONTROL definition (Rob Herring) - Add dwc num_lanes for use when it's lacking from DT (Rob Herring) - Ensure "Fast Link Mode" simulation environment setting is cleared (Rob Herring) - Drop meson duplicate number of lanes setup (Rob Herring) - Drop meson unnecessary RC config space init (Rob Herring) - Rework meson config and dwc port logic register accesses (Rob Herring) - Use common PCI register definitions in imx6 and qcom (Rob Herring) - Search for DesignWare PCIe Capability instead of hard-coding its location (Rob Herring) - Use common DesignWare register definitions in tegra (Rob Herring) - Drop keystone unused DBI2 code (Rob Herring) - Make dwc ATU accessors private (Rob Herring) - Centralize link gen setting in dwc (Rob Herring) - Set PORT_LINK_DLL_LINK_EN in common dwc setup code (Rob Herring) - Drop intel-gw unnecessary DT 'device_type' checking (Rob Herring) - Move intel-gw PCI_CAP_ID_EXP discovery to the single place it's used (Rob Herring) - Drop intel-gw unused max_width (Rob Herring) - Move N_FTS (fast training sequence) setup to common dwc setup (Rob Herring) - Convert spear13xx, tegra194 to use DBI accessors (Rob Herring) - Add multiple PFs support for DWC (Xiaowei Bao) - Add MSI-X doorbell mode for endpoint mode (Xiaowei Bao) - Update MSI/MSI-X capability management for endpoints (Xiaowei Bao) - Add layerscape ls1088a and ls2088a compatible strings (Xiaowei Bao) - Update layerscape MSI/MSI-X management (Xiaowei Bao) - Use doorbell to support MSI-X on layerscape (Xiaowei Bao) - Add layerscape endpoint mode support for ls1088a and ls2088a (Xiaowei Bao) - Add layerscape ls1088a node to DT (Xiaowei Bao) - Add Freescale/Layerscape ls1088a to endpoint test (Xiaowei Bao) - Add endpoint test driver data for Layerscape PCIe controllers (Hou Zhiqiang) - Fix 'cast truncates bits from constant value' warning (Gustavo Pimentel) - Add uniphier iATU register description (Kunihiko Hayashi) - Add common iATU register support (Kunihiko Hayashi) - Remove keystone iATU register mapping in favor of generic dwc support (Kunihiko Hayashi) - Skip PCIE_MSI_INTR0* programming if MSI is disabled (Jisheng Zhang) - Fix MSI page leakage in suspend/resume (Jisheng Zhang) - Check whether link is up before attempting config access (best-effort fix even though it's racy) (Hou Zhiqiang) * remotes/lorenzo/pci/dwc: PCI: dwc: Add link up check in dw_child_pcie_ops.map_bus() PCI: dwc: Fix MSI page leakage in suspend/resume PCI: dwc: Skip PCIE_MSI_INTR0* programming if MSI is disabled PCI: keystone: Remove iATU register mapping PCI: dwc: Add common iATU register support dt-bindings: PCI: uniphier-ep: Add iATU register description dt-bindings: PCI: uniphier: Add iATU register description PCI: dwc: Fix 'cast truncates bits from constant value' misc: pci_endpoint_test: Add driver data for Layerscape PCIe controllers misc: pci_endpoint_test: Add LS1088a in pci_device_id table PCI: layerscape: Add EP mode support for ls1088a and ls2088a PCI: layerscape: Modify the MSIX to the doorbell mode PCI: layerscape: Modify the way of getting capability with different PEX PCI: layerscape: Fix some format issue of the code dt-bindings: pci: layerscape-pci: Add compatible strings for ls1088a and ls2088a PCI: designware-ep: Modify MSI and MSIX CAP way of finding PCI: designware-ep: Move the function of getting MSI capability forward PCI: designware-ep: Add the doorbell mode of MSI-X in EP mode PCI: designware-ep: Add multiple PFs support for DWC PCI: dwc: Use DBI accessors PCI: dwc: Move N_FTS setup to common setup PCI: dwc/intel-gw: Drop unused max_width PCI: dwc/intel-gw: Move getting PCI_CAP_ID_EXP offset to intel_pcie_link_setup() PCI: dwc/intel-gw: Drop unnecessary checking of DT 'device_type' property PCI: dwc: Set PORT_LINK_DLL_LINK_EN in common setup code PCI: dwc: Centralize link gen setting PCI: dwc: Make ATU accessors private PCI: dwc: Remove read_dbi2 code PCI: dwc/tegra: Use common Designware port logic register definitions PCI: dwc: Remove hardcoded PCI_CAP_ID_EXP offset PCI: dwc/qcom: Use common PCI register definitions PCI: dwc/imx6: Use common PCI register definitions PCI: dwc/meson: Rework PCI config and DW port logic register accesses PCI: dwc/meson: Drop unnecessary RC config space initialization PCI: dwc/meson: Drop the duplicate number of lanes setup PCI: dwc: Ensure FAST_LINK_MODE is cleared PCI: dwc: Add a 'num_lanes' field to struct dw_pcie PCI: dwc/imx6: Remove duplicate define PCIE_LINK_WIDTH_SPEED_CONTROL PCI: dwc: Check CONFIG_PCI_MSI inside dw_pcie_msi_init() PCI: dwc/keystone: Drop duplicated 'num-viewport' PCI: dwc: Simplify config space handling PCI: dwc: Remove storing of PCI resources PCI: dwc: Remove root_bus pointer PCI: dwc: Convert to use pci_host_probe() PCI: dwc: keystone: Convert .scan_bus() callback to use add_bus PCI: Also call .add_bus() callback for root bus PCI: dwc: Use generic config accessors PCI: dwc: Remove dwc specific config accessor ops PCI: dwc: histb: Use pci_ops for root config space accessors PCI: dwc: exynos: Use pci_ops for root config space accessors PCI: dwc: kirin: Use pci_ops for root config space accessors PCI: dwc: meson: Use pci_ops for root config space accessors PCI: dwc: tegra: Use pci_ops for root config space accessors PCI: dwc: keystone: Use pci_ops for config space accessors PCI: dwc: al: Use pci_ops for child config space accessors PCI: dwc: Add a default pci_ops.map_bus for root port PCI: dwc: Allow overriding bridge pci_ops PCI: dwc: Use DBI accessors instead of own config accessors PCI: Allow root and child buses to have different pci_ops PCI: designware-ep: Fix the Header Type check commit a78f2e07d047bcb3d7b9155449b7c6ea8bc65092 Merge: a66999a3440a7 9aae3af8767cd Author: Bjorn Helgaas Date: Wed Oct 21 09:58:38 2020 -0500 Merge branch 'remotes/lorenzo/pci/cadence' - Remove obsolete path from comment (Flavio Suligoi) - Simplify cdns_pcie_host_init_address_translation() (Qinglang Miao) * remotes/lorenzo/pci/cadence: PCI: cadence: Simplify cdns_pcie_host_init_address_translation() return expression PCI: cadence-ep: Remove obsolete path from comment commit a66999a3440a7466335312bfcfda97d67cfa0e06 Merge: d1640a83073c0 1f66d95efdb72 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:38 2020 -0500 Merge branch 'remotes/lorenzo/pci/brcmstb' - Make PCIE_BRCMSTB depend on and default to ARCH_BRCMSTB (Jim Quinlan) - Add DT bindings for 7278, 7216, 7211, and new properties (Jim Quinlan) - Add bcm7278 register info (Jim Quinlan) - Add suspend and resume pm_ops (Jim Quinlan) - Add bcm7278 PERST# support (Jim Quinlan) - Add control of RESCAL reset (Jim Quinlan) - Set additional internal memory DMA viewport sizes (Jim Quinlan) - Accommodate MSI for older chips (Jim Quinlan) - Set bus max burst size by chip type (Jim Quinlan) - Add bcm7211, bcm7216, bcm7445, bcm7278 to match list (Jim Quinlan) * remotes/lorenzo/pci/brcmstb: PCI: brcmstb: Add bcm7211, bcm7216, bcm7445, bcm7278 to match list PCI: brcmstb: Set bus max burst size by chip type PCI: brcmstb: Accommodate MSI for older chips PCI: brcmstb: Set additional internal memory DMA viewport sizes PCI: brcmstb: Add control of rescal reset PCI: brcmstb: Add bcm7278 PERST# support PCI: brcmstb: Add suspend and resume pm_ops PCI: brcmstb: Add bcm7278 register info dt-bindings: PCI: Add bindings for more Brcmstb chips PCI: brcmstb: PCIE_BRCMSTB depends on ARCH_BRCMSTB commit d1640a83073c08cfe237d54db1b251cf63a4ce90 Merge: 5bedfdb2ff8b9 b0c6ae0f8948a Author: Bjorn Helgaas Date: Wed Oct 21 09:58:37 2020 -0500 Merge branch 'remotes/lorenzo/pci/aardvark' - Fix s390 build error (Pali Rohár) - Check for errors from pci_bridge_emul_init() (Pali Rohár) - Export pci-bridge-emul functions for use by modules (Pali Rohár) - Make aardvark driver modular (Pali Rohár) - Move PCIe reset code to advk_pcie_train_link() (Pali Rohár) - Convert internal SMCC firmware return codes to errno (Pali Rohár) - Fix initialization with old Marvell's Arm Trusted Firmware (Pali Rohár) * remotes/lorenzo/pci/aardvark: PCI: aardvark: Fix initialization with old Marvell's Arm Trusted Firmware phy: marvell: comphy: Convert internal SMCC firmware return codes to errno PCI: aardvark: Move PCIe reset card code to advk_pcie_train_link() PCI: aardvark: Implement driver 'remove' function and allow to build it as module PCI: pci-bridge-emul: Export API functions PCI: aardvark: Check for errors from pci_bridge_emul_init() call PCI: aardvark: Fix compilation on s390 commit 5bedfdb2ff8b92e06fe575524f477a9143724f0b Merge: 299af12a7270f fc177304d1266 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:37 2020 -0500 Merge branch 'remotes/lorenzo/pci/arm' - Remove unused msi_ctrl, io_optional and align_resource fields from ARM struct hw_pci (Lorenzo Pieralisi) * remotes/lorenzo/pci/arm: ARM/PCI: Remove unused fields from struct hw_pci commit 299af12a7270f098d714e1625634a453e6846411 Merge: 03b482e2432c4 f5810e5c32923 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:37 2020 -0500 Merge branch 'remotes/lorenzo/pci/pci-iomap' - Remove useless __KERNEL__ preprocessor guard in sparc io_32.h (Lorenzo Pieralisi) - Move ioremap/iounmap declaration so it's visible in asm-generic/io.h (Lorenzo Pieralisi) - Fix memory leak in generic !CONFIG_GENERIC_IOMAP pci_iounmap() implementation (Lorenzo Pieralisi) * remotes/lorenzo/pci/pci-iomap: asm-generic/io.h: Fix !CONFIG_GENERIC_IOMAP pci_iounmap() implementation sparc32: Move ioremap/iounmap declaration before asm-generic/io.h include sparc32: Remove useless io_32.h __KERNEL__ preprocessor guard commit 03b482e2432c48a8108fc7159ce42ee4d60ca393 Merge: 8b28a3f3461ed acb52897cc842 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:36 2020 -0500 Merge branch 'remotes/lorenzo/pci/apei' - Add ACPI APEI notifier chain for unknown (vendor) CPER records (Shiju Jose) - Add handling of HiSilicon HIP PCIe controller errors (Yicong Yang) * remotes/lorenzo/pci/apei: PCI: hip: Add handling of HiSilicon HIP PCIe controller errors ACPI / APEI: Add a notifier chain for unknown (vendor) CPER records commit 8b28a3f3461edd3df597c4f8ddc54a4fc0c3cc0f Merge: 0d2493ab08b4c 58e0cd3e23ead Author: Bjorn Helgaas Date: Wed Oct 21 09:58:36 2020 -0500 Merge branch 'pci/misc' - Remove unnecessary #includes (Gustavo Pimentel) - Fix intel_mid_pci.c build error when !CONFIG_ACPI (Randy Dunlap) - Use scnprintf(), not snprintf(), in sysfs "show" functions (Krzysztof Wilczyński) - Simplify pci-pf-stub by using module_pci_driver() (Liu Shixin) - Print IRQ used by Link Bandwidth Notification (Dongdong Liu) - Update sysfs mmap-related #ifdef comments (Clint Sbisa) - Simplify pci_dev_reset_slot_function() (Lukas Wunner) - Use "NULL" instead of "0" to fix sparse warnings (Gustavo Pimentel) - Simplify bool comparisons (Krzysztof Wilczyński) - Drop double zeroing for P2PDMA sg_init_table() (Julia Lawall) * pci/misc: PCI: v3-semi: Remove unneeded break PCI/P2PDMA: Drop double zeroing for sg_init_table() PCI: Simplify bool comparisons PCI: endpoint: Use "NULL" instead of "0" as a NULL pointer PCI: Simplify pci_dev_reset_slot_function() PCI: Update mmap-related #ifdef comments PCI/LINK: Print IRQ number used by port PCI/IOV: Simplify pci-pf-stub with module_pci_driver() PCI: Use scnprintf(), not snprintf(), in sysfs "show" functions x86/PCI: Fix intel_mid_pci.c build error when ACPI is not enabled PCI: Remove unnecessary header includes commit 0d2493ab08b4cb6a8fc3e07a8e5667ac077f2e1a Merge: 5cfdc750bc6fc 638c133e5f52a Author: Bjorn Helgaas Date: Wed Oct 21 09:58:35 2020 -0500 Merge branch 'pci/pm' - Remove unused pcibios_pm_ops (Vaibhav Gupta) - Rename pci_dev.d3_delay to d3hot_delay (Krzysztof Wilczyński) - Apply D2 transition delay as microseconds, not milliseconds (Bjorn Helgaas) * pci/pm: PCI/PM: Revert "PCI/PM: Apply D2 delay as milliseconds, not microseconds" PCI/PM: Remove unused PCI_PM_BUS_WAIT PCI/PM: Rename pci_dev.d3_delay to d3hot_delay PCI/PM: Remove unused pcibios_pm_ops commit 5cfdc750bc6fc5ca38a04e986125641aea7d66c3 Merge: 28a18aec59551 23cce2e00b332 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:35 2020 -0500 Merge branch 'pci/hotplug' - Use for_each_child_of_node() and for_each_node_by_name() instead of open-coding them (Qinglang Miao) - Reduce pciehp noisiness on hot removal (Lukas Wunner) - Remove unused assignment in shpchp (Krzysztof Wilczyński) * pci/hotplug: PCI: shpchp: Remove unused 'rc' assignment PCI: pciehp: Reduce noisiness on hot removal PCI: rpadlpar: Use for_each_child_of_node() and for_each_node_by_name() commit 28a18aec59551e0f86f0983c0eec7b6470632790 Merge: a9f379068cc6e b0e85c3c85549 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:34 2020 -0500 Merge branch 'pci/enumeration' - Tone down message about missing optional MCFG (Jeremy Linton) - Add schedule point in pci_read_config() (Jiang Biao) - Add Ampere Altra SOC MCFG quirk (Tuan Phan) - Add Kconfig options for MPS/MRRS strategy (Jim Quinlan) * pci/enumeration: PCI: Add Kconfig options for MPS/MRRS strategy PCI/ACPI: Add Ampere Altra SOC MCFG quirk PCI: Add schedule point in pci_read_config() PCI/ACPI: Tone down missing MCFG message commit a9f379068cc6e63fc64ac9bab635e633a953857f Merge: 97d0260bf3883 df8f10587d3d1 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:34 2020 -0500 Merge branch 'pci/aspm' - Remove struct aspm_register_info (Saheed O. Bolarinwa) - Remove struct pcie_link_state.l1ss (Saheed O. Bolarinwa) * pci/aspm: PCI/ASPM: Remove struct pcie_link_state.l1ss PCI/ASPM: Remove struct aspm_register_info.l1ss_cap PCI/ASPM: Pass L1SS Capabilities value, not struct aspm_register_info PCI/ASPM: Remove struct aspm_register_info.l1ss_ctl1 PCI/ASPM: Remove struct aspm_register_info.l1ss_ctl2 (unused) PCI/ASPM: Remove struct aspm_register_info.l1ss_cap_ptr PCI/ASPM: Remove struct aspm_register_info.latency_encoding PCI/ASPM: Remove struct aspm_register_info.enabled PCI/ASPM: Remove struct aspm_register_info.support PCI/ASPM: Use 'parent' and 'child' for readability PCI/ASPM: Move LTR path check to where it's used PCI/ASPM: Move pci_clear_and_set_dword() earlier commit 97d0260bf3883ea0c8b24a1293265fd3d947554c Merge: 9123e3a74ec7b 76fc8e854e3b0 Author: Bjorn Helgaas Date: Wed Oct 21 09:58:34 2020 -0500 Merge branch 'pci/acs' - Enable Translation Blocking for external devices (Rajat Jain) * pci/acs: PCI/ACS: Enable Translation Blocking for external devices commit 93c9fce7d5f3db87f67718a2e5cf09b02c2c2c6a Author: Jon Derrick Date: Thu Aug 6 17:00:17 2020 -0400 PCI: vmd: Update VMD PM to correctly use generic PCI PM The pci_save_state() call in vmd_suspend() can be performed by pci_pm_suspend_irq(). This also allows VMD to benefit from the call into pci_prepare_to_sleep(). The pci_restore_state() call in vmd_resume() was restoring state after pci_pm_resume()::pci_restore_standard_config() had already restored state. It's also been suspected that the config state should have been restored before re-requesting IRQs instead of afterwards. Remove the pci_save_state()/pci_restore_state() calls in vmd_suspend()/vmd_resume() to allow proper flow through generic PCI core Power Management code. Link: https://lore.kernel.org/r/20200806210017.5654-1-jonathan.derrick@intel.com Signed-off-by: Jon Derrick Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Kai-Heng Feng Cc: You-Sheng Yang commit 88a0d60c6445f315fbcfff3db792021bb3a67b28 Author: David Hildenbrand Date: Wed Jun 17 12:47:56 2020 +0200 MAINTAINERS: add URL for virtio-mem Let's add the status/info page, which is still under construction, however, already contains valuable documentation/information. Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20200617104756.6312-1-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 86e182fe12ee5869022614457037097c70fe2ed1 Author: Zhu Lingshan Date: Wed Sep 9 14:52:34 2020 +0800 vhost_vdpa: remove unnecessary spin_lock in vhost_vring_call This commit removed unnecessary spin_locks in vhost_vring_call and related operations. Because we manipulate irq offloading contents in vhost_vdpa ioctl code path which is already protected by dev mutex and vq mutex. Signed-off-by: Zhu Lingshan Link: https://lore.kernel.org/r/20200909065234.3313-1-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 5745bcfbbf89b158416075374254d3c013488f21 Author: Stefano Garzarella Date: Thu Oct 8 22:42:56 2020 +0200 vringh: fix __vringh_iov() when riov and wiov are different If riov and wiov are both defined and they point to different objects, only riov is initialized. If the wiov is not initialized by the caller, the function fails returning -EINVAL and printing "Readable desc 0x... after writable" error message. This issue happens when descriptors have both readable and writable buffers (eg. virtio-blk devices has virtio_blk_outhdr in the readable buffer and status as last byte of writable buffer) and we call __vringh_iov() to get both type of buffers in two different iovecs. Let's replace the 'else if' clause with 'if' to initialize both riov and wiov if they are not NULL. As checkpatch pointed out, we also avoid crashing the kernel when riov and wiov are both NULL, replacing BUG() with WARN_ON() and returning -EINVAL. Fixes: f87d0fbb5798 ("vringh: host-side implementation of virtio rings.") Cc: stable@vger.kernel.org Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20201008204256.162292-1-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 1897f0b618b0af0eb9dca709ab6bdf9ef1969ef7 Author: Eli Cohen Date: Tue Sep 8 15:33:46 2020 +0300 vdpa/mlx5: Setup driver only if VIRTIO_CONFIG_S_DRIVER_OK set_map() is used by mlx5 vdpa to create a memory region based on the address map passed by the iotlb argument. If we get successive calls, we will destroy the current memory region and build another one based on the new address mapping. We also need to setup the hardware resources since they depend on the memory region. If these calls happen before DRIVER_OK, It means that driver VQs may also not been setup and we may not create them yet. In this case we want to avoid setting up the other resources and defer this till we get DRIVER OK. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20200908123346.GA169007@mtl-vdi-166.wap.labs.mlnx Signed-off-by: Michael S. Tsirkin commit 4ce1cf7b02ed691acf0d9c664579cb6e52b1687b Author: Pierre Morel Date: Thu Sep 10 10:53:50 2020 +0200 s390: virtio: PV needs VIRTIO I/O device protection If protected virtualization is active on s390, VIRTIO has only retricted access to the guest memory. Define CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS and export arch_has_restricted_virtio_memory_access to advertize VIRTIO if that's the case. Signed-off-by: Pierre Morel Reviewed-by: Cornelia Huck Reviewed-by: Halil Pasic Link: https://lore.kernel.org/r/1599728030-17085-3-git-send-email-pmorel@linux.ibm.com Signed-off-by: Michael S. Tsirkin Acked-by: Christian Borntraeger commit 0afa15e1a5294754066343cad24af5ec8edae96d Author: Pierre Morel Date: Thu Sep 10 10:53:49 2020 +0200 virtio: let arch advertise guest's memory access restrictions An architecture may restrict host access to guest memory, e.g. IBM s390 Secure Execution or AMD SEV. Provide a new Kconfig entry the architecture can select, CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS, when it provides the arch_has_restricted_virtio_memory_access callback to advertise to VIRTIO common code when the architecture restricts memory access from the host. The common code can then fail the probe for any device where VIRTIO_F_ACCESS_PLATFORM is required, but not set. Signed-off-by: Pierre Morel Reviewed-by: Cornelia Huck Reviewed-by: Halil Pasic Link: https://lore.kernel.org/r/1599728030-17085-2-git-send-email-pmorel@linux.ibm.com Signed-off-by: Michael S. Tsirkin Acked-by: Christian Borntraeger commit b9747fdf0c1dad088eb21d5191295999ae7b4b40 Author: Tian Tao Date: Tue Sep 15 08:51:42 2020 +0800 vhost_vdpa: Fix duplicate included kernel.h linux/kernel.h is included more than once, Remove the one that isn't necessary. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1600131102-24672-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 5e5e8736ad2ee1be5d6162177317857460c857c2 Author: Li Wang Date: Tue Sep 15 02:08:09 2020 +0800 vhost: reduce stack usage in log_used Fix the warning: [-Werror=-Wframe-larger-than=] drivers/vhost/vhost.c: In function log_used: drivers/vhost/vhost.c:1906:1: warning: the frame size of 1040 bytes is larger than 1024 bytes Signed-off-by: Li Wang Link: https://lore.kernel.org/r/1600106889-25013-1-git-send-email-li.wang@windriver.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 7ab4de60028e0e9669b72a5f69f2080f98069b04 Author: Rikard Falkeborn Date: Fri Sep 11 22:35:09 2020 +0200 virtio-mem: Constify mem_id_table mem_id_table is not modified, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200911203509.26505-4-rikard.falkeborn@gmail.com Signed-off-by: Michael S. Tsirkin Acked-by: David Hildenbrand commit 7f90611693f08f6b29209bd8d704ee17cbe003a0 Author: Rikard Falkeborn Date: Fri Sep 11 22:35:08 2020 +0200 virtio_input: Constify id_table id_table is not modified, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200911203509.26505-3-rikard.falkeborn@gmail.com Signed-off-by: Michael S. Tsirkin Reviewed-by: David Hildenbrand commit bfec6c83077cd784fb049abbe2c5ff32629a7498 Author: Rikard Falkeborn Date: Fri Sep 11 22:35:07 2020 +0200 virtio-balloon: Constify id_table id_table is not modified, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200911203509.26505-2-rikard.falkeborn@gmail.com Signed-off-by: Michael S. Tsirkin Acked-by: David Hildenbrand commit 36b02df2d204da9f7a571f16ed9e91a4d083f207 Author: Eli Cohen Date: Thu Sep 17 15:15:40 2020 +0300 vdpa/mlx5: Fix failure to bring link up Set VIRTIO_NET_S_LINK_UP in config status to allow the get the bring the net device's link up. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20200917121540.GA98184@mtl-vdi-166.wap.labs.mlnx Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 36bdcf318bc21af24de10b68e32cdea6b9a8d17f Author: Eli Cohen Date: Thu Sep 17 15:14:25 2020 +0300 vdpa/mlx5: Make use of a specific 16 bit endianness API Introduce a dedicated function to be used for setting 16 bit fields per virio endianness requirements and use it to set the mtu field. Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20200917121425.GA98139@mtl-vdi-166.wap.labs.mlnx Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 0cfcd405e758ba1d277e58436fb32f06888c3e41 Author: Dai Ngo Date: Sun Oct 18 23:42:49 2020 -0400 NFSv4.2: Fix NFS4ERR_STALE error when doing inter server copy NFS_FS=y as dependency of CONFIG_NFSD_V4_2_INTER_SSC still have build errors and some configs with NFSD=m to get NFS4ERR_STALE error when doing inter server copy. Added ops table in nfs_common for knfsd to access NFS client modules. Fixes: 3ac3711adb88 ("NFSD: Fix NFS server build errors") Signed-off-by: Dai Ngo Signed-off-by: J. Bruce Fields commit 5c6c13cd1102caf92d006a3cf4591c0229019daf Author: Chris Wilson Date: Tue Aug 11 10:25:32 2020 +0100 drm/i915: Drop runtime-pm assert from vgpu io accessors The "mmio" writes into vgpu registers are simple memory traps from the guest into the host. We do not need to assert in the guest that the device is awake for the io as we do not write to the device itself. However, over time we have refactored all the mmio accessors with the result that the vgpu reuses the gen2 accessors and so inherits the assert for runtime-pm of the native device. The assert though has actually been there since commit 3be0bf5acca6 ("drm/i915: Create vGPU specific MMIO operations to reduce traps"). References: 3be0bf5acca6 ("drm/i915: Create vGPU specific MMIO operations to reduce traps") Signed-off-by: Chris Wilson Cc: Yan Zhao Cc: Zhenyu Wang Reviewed-by: Zhenyu Wang Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200811092532.13753-1-chris@chris-wilson.co.uk (cherry picked from commit 0e65ce24a33c1d37da4bf43c34e080334ec6cb60) Signed-off-by: Rodrigo Vivi commit 8195400f7ea95399f721ad21f4d663a62c65036f Author: Chris Wilson Date: Mon Oct 19 11:15:23 2020 +0100 drm/i915: Force VT'd workarounds when running as a guest OS If i915.ko is being used as a passthrough device, it does not know if the host is using intel_iommu. Mixing the iommu and gfx causes a few issues (such as scanout overfetch) which we need to workaround inside the driver, so if we detect we are running under a hypervisor, also assume the device access is being virtualised. Reported-by: Stefan Fritsch Suggested-by: Stefan Fritsch Signed-off-by: Chris Wilson Cc: Zhenyu Wang Cc: Joonas Lahtinen Cc: Stefan Fritsch Cc: stable@vger.kernel.org Tested-by: Stefan Fritsch Reviewed-by: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20201019101523.4145-1-chris@chris-wilson.co.uk (cherry picked from commit f566fdcd6cc49a9d5b5d782f56e3e7cb243f01b8) Signed-off-by: Rodrigo Vivi commit 3da3c5c1c9825c24168f27b021339e90af37e969 Author: Chris Wilson Date: Mon Oct 19 17:50:05 2020 +0100 drm/i915: Exclude low pages (128KiB) of stolen from use The GPU is trashing the low pages of its reserved memory upon reset. If we are using this memory for ringbuffers, then we will dutiful resubmit the trashed rings after the reset causing further resets, and worse. We must exclude this range from our own use. The value of 128KiB was found by empirical measurement (and verified now with a selftest) on gen9. Signed-off-by: Chris Wilson Cc: stable@vger.kernel.org Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201019165005.18128-2-chris@chris-wilson.co.uk (cherry picked from commit d3606757e611fbd48bb239e8c2fe9779b3f50035) Signed-off-by: Rodrigo Vivi commit b8cff311a42df4f15d6432583573d828b5c7b12a Author: Chris Wilson Date: Mon Oct 19 09:34:44 2020 +0100 drm/i915/gt: Onion unwind for scratch page allocation failure In switching to using objects for our ppGTT scratch pages, care was not taken to avoid trying to unref NULL objects on failure. And for gen6 ppGTT, it appears we forgot entirely to unwind after a partial allocation failure. Fixes: 89351925a477 ("drm/i915/gt: Switch to object allocations for page directories") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20201019083444.1286-1-chris@chris-wilson.co.uk (cherry picked from commit fa812ce96a46efc27cae4dcad866aaee9cb25d28) Signed-off-by: Rodrigo Vivi commit 4553350ffe53c29156c61df584425ccfaabb2980 Author: SeongJae Park Date: Wed Sep 23 08:18:41 2020 +0200 xen-blkfront: Apply changed parameter name to the document Commit 14e710fe7897 ("xen-blkfront: rename indirect descriptor parameter") changed the name of the module parameter for the maximum amount of segments in indirect requests but missed updating the document. This commit updates the document. Signed-off-by: SeongJae Park Reviewed-by: Juergen Gross Acked-by: Roger Pau Monné Link: https://lore.kernel.org/r/20200923061841.20531-4-sjpark@amazon.com Signed-off-by: Boris Ostrovsky commit 74a852479c68e4efb3865d5436fd69ec4f819f96 Author: SeongJae Park Date: Wed Sep 23 08:18:40 2020 +0200 xen-blkfront: add a parameter for disabling of persistent grants Persistent grants feature provides high scalability. On some small systems, however, it could incur data copy overheads[1] and thus it is required to be disabled. It can be disabled from blkback side using a module parameter, 'feature_persistent'. But, it is impossible from blkfront side. For the reason, this commit adds a blkfront module parameter for disabling of the feature. [1] https://wiki.xen.org/wiki/Xen_4.3_Block_Protocol_Scalability Signed-off-by: SeongJae Park Reviewed-by: Juergen Gross Acked-by: Roger Pau Monné Link: https://lore.kernel.org/r/20200923061841.20531-3-sjpark@amazon.com Signed-off-by: Boris Ostrovsky commit aac8a70db24bd3916b9ddce1761e500771356b6b Author: SeongJae Park Date: Wed Sep 23 08:18:39 2020 +0200 xen-blkback: add a parameter for disabling of persistent grants Persistent grants feature provides high scalability. On some small systems, however, it could incur data copy overheads[1] and thus it is required to be disabled. But, there is no option to disable it. For the reason, this commit adds a module parameter for disabling of the feature. [1] https://wiki.xen.org/wiki/Xen_4.3_Block_Protocol_Scalability Signed-off-by: Anthony Liguori Signed-off-by: SeongJae Park Reviewed-by: Juergen Gross Acked-by: Roger Pau Monné Link: https://lore.kernel.org/r/20200923061841.20531-2-sjpark@amazon.com Signed-off-by: Boris Ostrovsky commit 66dd3474702aa98d5844367e1577cdad78ef7c65 Author: Stephen Boyd Date: Tue Oct 20 14:45:44 2020 -0700 arm64: proton-pack: Update comment to reflect new function name The function detect_harden_bp_fw() is gone after commit d4647f0a2ad7 ("arm64: Rewrite Spectre-v2 mitigation code"). Update this comment to reflect the new state of affairs. Fixes: d4647f0a2ad7 ("arm64: Rewrite Spectre-v2 mitigation code") Signed-off-by: Stephen Boyd Cc: Marc Zyngier Link: https://lore.kernel.org/r/20201020214544.3206838-3-swboyd@chromium.org Signed-off-by: Will Deacon commit 05f90bf3d5df40e1a705527520e5fd56b2b6f09e Author: Edward Cree Date: Tue Oct 20 15:35:08 2020 +0100 sfc: move initialisation of efx->filter_sem to efx_init_struct() efx_probe_filters() has not been called yet when EF100 calls into efx_mcdi_filter_table_probe(), for which it wants to take the filter_sem. Fixes: a9dc3d5612ce ("sfc_ef100: RX filter table management and related gubbins") Signed-off-by: Edward Cree Link: https://lore.kernel.org/r/24fad43e-887d-051e-25e3-506f23f63abf@solarflare.com Signed-off-by: Jakub Kicinski commit b7c24497baeaf21172b447f7cca36b0e99bd11e3 Author: Alexander Ovechkin Date: Tue Oct 20 14:43:33 2020 +0300 mpls: load mpls_gso after mpls_iptunnel mpls_iptunnel is used only for mpls encapsuation, and if encaplusated packet is larger than MTU we need mpls_gso for segmentation. Signed-off-by: Alexander Ovechkin Acked-by: Dmitry Yakunin Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20201020114333.26866-1-ovov@yandex-team.ru Signed-off-by: Jakub Kicinski commit a7a12b5a0f950bc6b9f7153390634ea798738db9 Author: Davide Caratti Date: Wed Oct 21 00:02:40 2020 +0200 net/sched: act_tunnel_key: fix OOB write in case of IPv6 ERSPAN tunnels the following command # tc action add action tunnel_key \ > set src_ip 2001:db8::1 dst_ip 2001:db8::2 id 10 erspan_opts 1:6789:0:0 generates the following splat: BUG: KASAN: slab-out-of-bounds in tunnel_key_copy_opts+0xcc9/0x1010 [act_tunnel_key] Write of size 4 at addr ffff88813f5f1cc8 by task tc/873 CPU: 2 PID: 873 Comm: tc Not tainted 5.9.0+ #282 Hardware name: Red Hat KVM, BIOS 1.11.1-4.module+el8.1.0+4066+0f1aadab 04/01/2014 Call Trace: dump_stack+0x99/0xcb print_address_description.constprop.7+0x1e/0x230 kasan_report.cold.13+0x37/0x7c tunnel_key_copy_opts+0xcc9/0x1010 [act_tunnel_key] tunnel_key_init+0x160c/0x1f40 [act_tunnel_key] tcf_action_init_1+0x5b5/0x850 tcf_action_init+0x15d/0x370 tcf_action_add+0xd9/0x2f0 tc_ctl_action+0x29b/0x3a0 rtnetlink_rcv_msg+0x341/0x8d0 netlink_rcv_skb+0x120/0x380 netlink_unicast+0x439/0x630 netlink_sendmsg+0x719/0xbf0 sock_sendmsg+0xe2/0x110 ____sys_sendmsg+0x5ba/0x890 ___sys_sendmsg+0xe9/0x160 __sys_sendmsg+0xd3/0x170 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f872a96b338 Code: 89 02 48 c7 c0 ff ff ff ff eb b5 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 8d 05 25 43 2c 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 41 54 41 89 d4 55 RSP: 002b:00007ffffe367518 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000005f8f5aed RCX: 00007f872a96b338 RDX: 0000000000000000 RSI: 00007ffffe367580 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000001 R09: 000000000000001c R10: 000000000000000b R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000686760 R14: 0000000000000601 R15: 0000000000000000 Allocated by task 873: kasan_save_stack+0x19/0x40 __kasan_kmalloc.constprop.7+0xc1/0xd0 __kmalloc+0x151/0x310 metadata_dst_alloc+0x20/0x40 tunnel_key_init+0xfff/0x1f40 [act_tunnel_key] tcf_action_init_1+0x5b5/0x850 tcf_action_init+0x15d/0x370 tcf_action_add+0xd9/0x2f0 tc_ctl_action+0x29b/0x3a0 rtnetlink_rcv_msg+0x341/0x8d0 netlink_rcv_skb+0x120/0x380 netlink_unicast+0x439/0x630 netlink_sendmsg+0x719/0xbf0 sock_sendmsg+0xe2/0x110 ____sys_sendmsg+0x5ba/0x890 ___sys_sendmsg+0xe9/0x160 __sys_sendmsg+0xd3/0x170 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88813f5f1c00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 200 bytes inside of 256-byte region [ffff88813f5f1c00, ffff88813f5f1d00) The buggy address belongs to the page: page:0000000011b48a19 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13f5f0 head:0000000011b48a19 order:1 compound_mapcount:0 flags: 0x17ffffc0010200(slab|head) raw: 0017ffffc0010200 0000000000000000 0000000d00000001 ffff888107c43400 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88813f5f1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88813f5f1c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88813f5f1c80: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ^ ffff88813f5f1d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88813f5f1d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc using IPv6 tunnels, act_tunnel_key allocates a fixed amount of memory for the tunnel metadata, but then it expects additional bytes to store tunnel specific metadata with tunnel_key_copy_opts(). Fix the arguments of __ipv6_tun_set_dst(), so that 'md_size' contains the size previously computed by tunnel_key_get_opts_len(), like it's done for IPv4 tunnels. Fixes: 0ed5269f9e41 ("net/sched: add tunnel option support to act_tunnel_key") Reported-by: Shuang Li Signed-off-by: Davide Caratti Acked-by: Cong Wang Link: https://lore.kernel.org/r/36ebe969f6d13ff59912d6464a4356fe6f103766.1603231100.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit b130762161374b1ef31549bef8ebd4abeb998d94 Author: Guillaume Nault Date: Tue Oct 20 17:34:31 2020 +0200 net/sched: act_gate: Unlock ->tcfa_lock in tc_setup_flow_action() We need to jump to the "err_out_locked" label when tcf_gate_get_entries() fails. Otherwise, tc_setup_flow_action() exits with ->tcfa_lock still held. Fixes: d29bdd69ecdd ("net: schedule: add action gate offloading") Signed-off-by: Guillaume Nault Acked-by: Cong Wang Link: https://lore.kernel.org/r/12f60e385584c52c22863701c0185e40ab08a7a7.1603207948.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit d978d6d008fa7a90a435ba7f101dfcbcc1c816a9 Author: Colin Ian King Date: Tue Oct 20 17:50:29 2020 +0100 net: dsa: bcm_sf2: make const array static, makes object smaller Don't populate the const array rate_table on the stack but instead it static. Makes the object code smaller by 46 bytes. Before: text data bss dec hex filename 29812 3824 192 33828 8424 drivers/net/dsa/bcm_sf2.o After: text data bss dec hex filename 29670 3920 192 33782 83f6 drivers/net/dsa/bcm_sf2.o (gcc version 10.2.0) Signed-off-by: Colin Ian King Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20201020165029.56383-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit 010b430d5df556d5d232e3751ac691ba9e88c041 Author: Geert Uytterhoeven Date: Tue Oct 20 09:38:39 2020 +0200 mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it MPTCP_IPV6 selects IPV6, thus enabling an optional feature the user may not want to enable. Fix this by making MPTCP_IPV6 depend on IPV6, like is done for all other IPv6 features. Fixes: f870fa0b5768842c ("mptcp: Add MPTCP socket stubs") Signed-off-by: Geert Uytterhoeven Reviewed-by: Matthieu Baerts Link: https://lore.kernel.org/r/20201020073839.29226-1-geert@linux-m68k.org Signed-off-by: Jakub Kicinski commit 6e915b274860dcb9301ba7d6e9e033903fbf6137 Author: Randy Dunlap Date: Mon Oct 19 11:10:59 2020 -0700 net: chelsio: inline_crypto: fix Kconfig and build errors Fix build errors when TLS=m, TLS_TOE=y, and CRYPTO_DEV_CHELSIO_TLS=y. Having (tristate) CRYPTO_DEV_CHELSIO_TLS depend on (bool) TLS_TOE is not strong enough to prevent the bad combination of TLS=m and CRYPTO_DEV_CHELSIO_TLS=y, so add a dependency on TLS to prevent the problematic kconfig combination. Fixes these build errors: hppa-linux-ld: drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.o: in function `chtls_free_uld': drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c:165: undefined reference to `tls_toe_unregister_device' hppa-linux-ld: drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.o: in function `chtls_register_dev': drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c:204: undefined reference to `tls_toe_register_device' Fixes: 53b4414a7003 ("net/tls: allow compiling TLS TOE out") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20201019181059.22634-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit d1ffbf283b664898968721c9969fa9bb09786dc1 Merge: 280e3ebdafb86 da1a039bcf293 Author: Jakub Kicinski Date: Tue Oct 20 17:29:20 2020 -0700 Merge branch 'chelsio-chtls-fix-inline-tls-bugs' Vinay Kumar Yadav says: ==================== chelsio/chtls: Fix inline tls bugs This series of patches fix following bugs in chelsio inline tls driver. Patch1: Fix incorrect socket lock. Patch2: correct netdevice for vlan interface. Patch3: Fix panic when server is listening on ipv6. Patch4: Fix panic when listen on multiadapter. Patch5: correct function return and return type. Patch6: Fix writing freed memory. ==================== Link: https://lore.kernel.org/r/20201019115025.24233-1-vinay.yadav@chelsio.com Signed-off-by: Jakub Kicinski commit da1a039bcf293e4699d413c9f65d975da2d7c0bd Author: Vinay Kumar Yadav Date: Mon Oct 19 17:20:25 2020 +0530 chelsio/chtls: fix writing freed memory When chtls_sock *csk is freed, same memory can be allocated to different csk in chtls_sock_create(). csk->cdev = NULL; statement might ends up modifying wrong csk, eventually causing kernel panic. removing (csk->cdev = NULL) statement as it is not required. Fixes: 3a0a97838923 ("crypto/chtls: Fix chtls crash in connection cleanup") Signed-off-by: Vinay Kumar Yadav Signed-off-by: Jakub Kicinski commit 8580a61aede28d441e1c80588803411ee86aa299 Author: Vinay Kumar Yadav Date: Mon Oct 19 17:20:24 2020 +0530 chelsio/chtls: correct function return and return type csk_mem_free() should return true if send buffer is available, false otherwise. Fixes: 3b8305f5c844 ("crypto: chtls - wait for memory sendmsg, sendpage") Signed-off-by: Vinay Kumar Yadav Signed-off-by: Jakub Kicinski commit 9819f22c410b4bf6589d3126e8bc3952db507cbf Author: Vinay Kumar Yadav Date: Mon Oct 19 17:20:23 2020 +0530 chelsio/chtls: Fix panic when listen on multiadapter Add the logic to compare net_device returned by ip_dev_find() with the net_device list in cdev->ports[] array and return net_device if matched else NULL. Fixes: 6abde0b24122 ("crypto/chtls: IPv6 support for inline TLS") Signed-off-by: Venkatesh Ellapu Signed-off-by: Vinay Kumar Yadav Signed-off-by: Jakub Kicinski commit 86cdf9ca4409d997a391103e480b3f77b7ccc19b Author: Vinay Kumar Yadav Date: Mon Oct 19 17:20:22 2020 +0530 chelsio/chtls: fix panic when server is on ipv6 Netdev is filled in egress_dev when connection is established, If connection is closed before establishment, then egress_dev is NULL, Fix it using ip_dev_find() rather then extracting from egress_dev. Fixes: 6abde0b24122 ("crypto/chtls: IPv6 support for inline TLS") Signed-off-by: Venkatesh Ellapu Signed-off-by: Vinay Kumar Yadav Signed-off-by: Jakub Kicinski commit 81519d1f7df7ed1bd5b1397540c8884438f57ae2 Author: Vinay Kumar Yadav Date: Mon Oct 19 17:20:21 2020 +0530 chelsio/chtls: correct netdevice for vlan interface Check if netdevice is a vlan interface and find real vlan netdevice. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Venkatesh Ellapu Signed-off-by: Vinay Kumar Yadav Signed-off-by: Jakub Kicinski commit 0fb5f0160a36d7acaa8e84ce873af99f94b60484 Author: Vinay Kumar Yadav Date: Mon Oct 19 17:20:20 2020 +0530 chelsio/chtls: fix socket lock In chtls_sendpage() socket lock is released but not acquired, fix it by taking lock. Fixes: 36bedb3f2e5b ("crypto: chtls - Inline TLS record Tx") Signed-off-by: Vinay Kumar Yadav Signed-off-by: Jakub Kicinski commit 280e3ebdafb863b3cb50d5842f056267e15bf40c Author: Defang Bo Date: Mon Oct 19 19:38:58 2020 +0800 nfc: Ensure presence of NFC_ATTR_FIRMWARE_NAME attribute in nfc_genl_fw_download() Check that the NFC_ATTR_FIRMWARE_NAME attributes are provided by the netlink client prior to accessing them.This prevents potential unhandled NULL pointer dereference exceptions which can be triggered by malicious user-mode programs, if they omit one or both of these attributes. Similar to commit a0323b979f81 ("nfc: Ensure presence of required attributes in the activate_target handler"). Fixes: 9674da8759df ("NFC: Add firmware upload netlink command") Signed-off-by: Defang Bo Link: https://lore.kernel.org/r/1603107538-4744-1-git-send-email-bodefang@126.com Signed-off-by: Jakub Kicinski commit b142083b585c2c03af24cca4d274f797796a4064 Author: Geert Uytterhoeven Date: Mon Oct 19 13:32:40 2020 +0200 mptcp: MPTCP_KUNIT_TESTS should depend on MPTCP instead of selecting it MPTCP_KUNIT_TESTS selects MPTCP, thus enabling an optional feature the user may not want to enable. Fix this by making the test depend on MPTCP instead. Fixes: a00a582203dbc43e ("mptcp: move crypto test to KUNIT") Signed-off-by: Geert Uytterhoeven Reviewed-by: Matthieu Baerts Link: https://lore.kernel.org/r/20201019113240.11516-1-geert@linux-m68k.org Signed-off-by: Jakub Kicinski commit e8488574e3b66ef0bbc7ac90219828566eb02683 Merge: 47b5d2a107396 65b8c8a620a39 Author: Jakub Kicinski Date: Tue Oct 20 16:32:59 2020 -0700 Merge branch 'init-ahmac-and-port-of-mptcp_options_received' Geliang Tang says: ==================== init ahmac and port of mptcp_options_received This patchset deals with initializations of mptcp_options_received's two fields, ahmac and port. ==================== Link: https://lore.kernel.org/r/cover.1603102503.git.geliangtang@gmail.com Signed-off-by: Jakub Kicinski commit 65b8c8a620a390a901522f19beed1476e2274feb Author: Geliang Tang Date: Mon Oct 19 18:23:16 2020 +0800 mptcp: move mptcp_options_received's port initialization Move mptcp_options_received's port initialization from mptcp_parse_option to mptcp_get_options, put it together with the other fields initializations of mptcp_options_received. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit fe2d9b1a0e7805384770ec0ddd34c9f1e9fe6fa8 Author: Geliang Tang Date: Mon Oct 19 18:23:15 2020 +0800 mptcp: initialize mptcp_options_received's ahmac Initialize mptcp_options_received's ahmac to zero, otherwise it will be a random number when receiving ADD_ADDR suboption with echo-flag=1. Fixes: 3df523ab582c5 ("mptcp: Add ADD_ADDR handling") Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 47b5d2a107396ab05e83a4dfbd30b563ecbc83af Author: Roi Dayan Date: Mon Oct 19 12:02:44 2020 +0300 net/sched: act_ct: Fix adding udp port mangle operation Need to use the udp header type and not tcp. Fixes: 9c26ba9b1f45 ("net/sched: act_ct: Instantiate flow table entry actions") Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey Link: https://lore.kernel.org/r/20201019090244.3015186-1-roid@nvidia.com Signed-off-by: Jakub Kicinski commit f3362f0c18174a1f334a419ab7d567a36bd1b3f3 Author: Anand Moon Date: Tue Oct 20 14:01:41 2020 +0200 arm64: dts: amlogic: add missing ethernet reset ID Add reset external reset of the ethernet mac controller Signed-off-by: Anand Moon Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20201020120141.298240-1-jbrunet@baylibre.com commit acd7aaf51b20263a7e62d2a26569988c63bdd3d8 Author: Ard Biesheuvel Date: Sun Oct 18 18:36:25 2020 +0200 netsec: ignore 'phy-mode' device property on ACPI systems Since commit bbc4d71d63549bc ("net: phy: realtek: fix rtl8211e rx/tx delay config"), the Realtek PHY driver will override any TX/RX delay set by hardware straps if the phy-mode device property does not match. This is causing problems on SynQuacer based platforms (the only SoC that incorporates the netsec hardware), since many were built with this Realtek PHY, and shipped with firmware that defines the phy-mode as 'rgmii', even though the PHY is configured for TX and RX delay using pull-ups. From the driver's perspective, we should not make any assumptions in the general case that the PHY hardware does not require any initial configuration. However, the situation is slightly different for ACPI boot, since it implies rich firmware with AML abstractions to handle hardware details that are not exposed to the OS. So in the ACPI case, it is reasonable to assume that the PHY comes up in the right mode, regardless of whether the mode is set by straps, by boot time firmware or by AML executed by the ACPI interpreter. So let's ignore the 'phy-mode' device property when probing the netsec driver in ACPI mode, and hardcode the mode to PHY_INTERFACE_MODE_NA, which should work with any PHY provided that it is configured by the time the driver attaches to it. While at it, document that omitting the mode is permitted for DT probing as well, by setting the phy-mode DT property to the empty string. Fixes: 533dd11a12f6 ("net: socionext: Add Synquacer NetSec driver") Signed-off-by: Ard Biesheuvel Reviewed-by: Ilias Apalodimas Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20201018163625.2392-1-ardb@kernel.org Signed-off-by: Jakub Kicinski commit c5eb48e89286510d638844104a6f6582a4838a32 Author: Daniel Borkmann Date: Tue Oct 20 21:59:55 2020 +0200 bpf, doc: Fix patchwork URL to point to kernel.org instance Follow-up on ebb034b15bfa ("bpf: Migrate from patchwork.ozlabs.org to patchwork.kernel.org.") in order to fix up the patchwork URL (Q) in the MAINTAINERS file for BPF subsystem. While at it, also add the official website (W) entry. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/f73ae01c7e6f9cf0a3890f2ca988a8e69190c50b.1603223852.git.daniel@iogearbox.net commit 69228338c9c3f0519f0daeca362a730130211c83 Author: Jens Axboe Date: Tue Oct 20 14:28:41 2020 -0600 io_uring: unify fsize with def->work_flags This one was missed in the earlier conversion, should be included like any of the other IO identity flags. Make sure we restore to RLIM_INIFITY when dropping the personality again. Fixes: 98447d65b4a7 ("io_uring: move io identity items into separate struct") Signed-off-by: Jens Axboe commit c4d6fe7311762f2e03b3c27ad38df7c40c80cc93 Merge: 59f0e7eb2f9ff 84c34df158cf2 Author: Linus Torvalds Date: Tue Oct 20 14:39:37 2020 -0700 Merge tag 'xarray-5.9' of git://git.infradead.org/users/willy/xarray Pull XArray updates from Matthew Wilcox: - Fix the test suite after introduction of the local_lock - Fix a bug in the IDA spotted by Coverity - Change the API that allows the workingset code to delete a node - Fix xas_reload() when dealing with entries that occupy multiple indices - Add a few more tests to the test suite - Fix an unsigned int being shifted into an unsigned long * tag 'xarray-5.9' of git://git.infradead.org/users/willy/xarray: XArray: Fix xas_create_range for ranges above 4 billion radix-tree: fix the comment of radix_tree_next_slot() XArray: Fix xas_reload for multi-index entries XArray: Add private interface for workingset node deletion XArray: Fix xas_for_each_conflict documentation XArray: Test marked multiorder iterations XArray: Test two more things about xa_cmpxchg ida: Free allocated bitmap in error path radix tree test suite: Fix compilation commit 730926982d770dc764b4282aecc82e0039c18f64 Author: Abhi Das Date: Tue Oct 20 15:58:03 2020 -0500 gfs2: Add fields for statfs info in struct gfs2_log_header_host And read these in __get_log_header() from the log header. Also make gfs2_statfs_change_out() non-static so it can be used outside of super.c Signed-off-by: Abhi Das Signed-off-by: Andreas Gruenbacher commit ed3adb375b704662bf36d62d5611f304e2b56c7e Author: Andreas Gruenbacher Date: Tue Oct 20 14:18:24 2020 +0200 gfs2: Ignore subsequent errors after withdraw in rgrp_go_sync Once a withdraw has occurred, ignore errors that are the consequence of the withdraw. Signed-off-by: Andreas Gruenbacher commit 23cfb0c3d845ee0cb45732cd0ac2460115cb7c9c Author: Bob Peterson Date: Thu Oct 15 11:07:26 2020 -0500 gfs2: Eliminate gl_vm The gfs2_glock structure has a gl_vm member, introduced in commit 7005c3e4ae428 ("GFS2: Use range based functions for rgrp sync/invalidation"), which stores the location of resource groups within their address space. This structure is in a union with iopen glock specific fields. It was introduced because at unmount time, the resource group objects were destroyed before flushing out any pending resource group glock work, and flushing out such work could require flushing / truncating the address space. Since commit b3422cacdd7e6 ("gfs2: Rework how rgrp buffer_heads are managed"), any pending resource group glock work is flushed out before destroying the resource group objects. So the resource group objects will now always exist in rgrp_go_sync and rgrp_go_inval, and we now simply compute the gl_vm values where needed instead of caching them. This also eliminates the union. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 2ffed5290b3bff7562d29fd06621be4705704242 Author: Bob Peterson Date: Thu Oct 15 11:16:48 2020 -0500 gfs2: Only access gl_delete for iopen glocks Only initialize gl_delete for iopen glocks, but more importantly, only access it for iopen glocks in flush_delete_work: flush_delete_work is called for different types of glocks including rgrp glocks, and those use gl_vm which is in a union with gl_delete. Without this fix, we'll end up clobbering gl_vm, which results in general memory corruption. Fixes: a0e3cc65fa29 ("gfs2: Turn gl_delete into a delayed work") Cc: stable@vger.kernel.org # v5.8+ Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit dbffb29dac6a8864bc026ca904a8cc361de71a1a Author: Bob Peterson Date: Mon Oct 12 15:04:20 2020 -0500 gfs2: Fix comments to glock_hash_walk The comments before function glock_hash_walk had the wrong name and an extra parameter. This simply fixes the comments. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit fea456d82c19d201c21313864105876deabe148b Author: Dave Airlie Date: Tue Oct 20 08:22:53 2020 +1000 drm/ttm: fix eviction valuable range check. This was adding size to start, but pfn and start are in pages, so it should be using num_pages. Not sure this fixes anything in the real world, just noticed it during refactoring. Signed-off-by: Dave Airlie Reviewed-by: Christian König Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20201019222257.1684769-2-airlied@gmail.com commit 7e13256dfe22b0d2e49cbfdb75bdc57e059d6c50 Merge: 40b99050455b9 272d70895113e Author: Dave Airlie Date: Wed Oct 21 06:52:50 2020 +1000 Merge tag 'drm-misc-next-fixes-2020-10-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Two patches to prevent out-of-bands accesses on fonts buffers Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201020141445.4jisqylfbusdnzge@gilmour commit 59f0e7eb2f9ffa7715ca95908797b52ba35af11a Merge: 4962a85696f94 8c39076c276be Author: Linus Torvalds Date: Tue Oct 20 13:26:30 2020 -0700 Merge tag 'nfs-for-5.10-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client updates from Anna Schumaker: "Stable Fixes: - Wait for stateid updates after CLOSE/OPEN_DOWNGRADE # v5.4+ - Fix nfs_path in case of a rename retry - Support EXCHID4_FLAG_SUPP_FENCE_OPS v4.2 EXCHANGE_ID flag New features and improvements: - Replace dprintk() calls with tracepoints - Make cache consistency bitmap dynamic - Added support for the NFS v4.2 READ_PLUS operation - Improvements to net namespace uniquifier Other bugfixes and cleanups: - Remove redundant clnt pointer - Don't update timeout values on connection resets - Remove redundant tracepoints - Various cleanups to comments - Fix oops when trying to use copy_file_range with v4.0 source server - Improvements to flexfiles mirrors - Add missing 'local_lock=posix' mount option" * tag 'nfs-for-5.10-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (55 commits) NFSv4.2: support EXCHGID4_FLAG_SUPP_FENCE_OPS 4.2 EXCHANGE_ID flag NFSv4: Fix up RCU annotations for struct nfs_netns_client NFS: Only reference user namespace from nfs4idmap struct instead of cred nfs: add missing "posix" local_lock constant table definition NFSv4: Use the net namespace uniquifier if it is set NFSv4: Clean up initialisation of uniquified client id strings NFS: Decode a full READ_PLUS reply SUNRPC: Add an xdr_align_data() function NFS: Add READ_PLUS hole segment decoding SUNRPC: Add the ability to expand holes in data pages SUNRPC: Split out _shift_data_right_tail() SUNRPC: Split out xdr_realign_pages() from xdr_align_pages() NFS: Add READ_PLUS data segment support NFS: Use xdr_page_pos() in NFSv4 decode_getacl() SUNRPC: Implement a xdr_page_pos() function SUNRPC: Split out a function for setting current page NFS: fix nfs_path in case of a rename retry fs: nfs: return per memcg count for xattr shrinkers NFSv4: Wait for stateid updates after CLOSE/OPEN_DOWNGRADE nfs: remove incorrect fallthrough label ... commit 4962a85696f9439970bfd84f7ce23b2721f13549 Merge: 38525c6919e2f 9ba0d0c81284f Author: Linus Torvalds Date: Tue Oct 20 13:19:30 2020 -0700 Merge tag 'io_uring-5.10-2020-10-20' of git://git.kernel.dk/linux-block Pull io_uring updates from Jens Axboe: "A mix of fixes and a few stragglers. In detail: - Revert the bogus __read_mostly that we discussed for the initial pull request. - Fix a merge window regression with fixed file registration error path handling. - Fix io-wq numa node affinities. - Series abstracting out an io_identity struct, making it both easier to see what the personality items are, and also easier to to adopt more. Use this to cover audit logging. - Fix for read-ahead disabled block condition in async buffered reads, and using single page read-ahead to unify what generic_file_buffer_read() path is used. - Series for REQ_F_COMP_LOCKED fix and removal of it (Pavel) - Poll fix (Pavel)" * tag 'io_uring-5.10-2020-10-20' of git://git.kernel.dk/linux-block: (21 commits) io_uring: use blk_queue_nowait() to check if NOWAIT supported mm: use limited read-ahead to satisfy read mm: mark async iocb read as NOWAIT once some data has been copied io_uring: fix double poll mask init io-wq: inherit audit loginuid and sessionid io_uring: use percpu counters to track inflight requests io_uring: assign new io_identity for task if members have changed io_uring: store io_identity in io_uring_task io_uring: COW io_identity on mismatch io_uring: move io identity items into separate struct io_uring: rely solely on work flags to determine personality. io_uring: pass required context in as flags io-wq: assign NUMA node locality if appropriate io_uring: fix error path cleanup in io_sqe_files_register() Revert "io_uring: mark io_uring_fops/io_op_defs as __read_mostly" io_uring: fix REQ_F_COMP_LOCKED by killing it io_uring: dig out COMP_LOCK from deep call chain io_uring: don't put a poll req under spinlock io_uring: don't unnecessarily clear F_LINK_TIMEOUT io_uring: don't set COMP_LOCKED if won't put ... commit 875b4e2a93bb2c3ddefb4dcb292c4bfd46ccc464 Author: Jon Derrick Date: Tue Jul 28 13:49:43 2020 -0600 PCI: vmd: Create IRQ allocation helper Move the IRQ allocation and SRCU initialization code to a new helper. No functional changes. Link: https://lore.kernel.org/r/20200728194945.14126-5-jonathan.derrick@intel.com Signed-off-by: Jon Derrick Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko commit 1552b11ba15e93ee550c4672aa5acd8c1c5e8a82 Author: Jon Derrick Date: Tue Jul 28 13:49:42 2020 -0600 PCI: vmd: Create IRQ Domain configuration helper Move the IRQ and MSI Domain configuration code to new helpers. No functional changes. Link: https://lore.kernel.org/r/20200728194945.14126-4-jonathan.derrick@intel.com Signed-off-by: Jon Derrick Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko commit 2e1224183b1bec6610e01be80f007ee9ab0af9c0 Author: Jon Derrick Date: Tue Jul 28 13:49:41 2020 -0600 PCI: vmd: Create bus offset configuration helper Move the bus offset configuration discovery code to a new helper. Modify the bus offset 2-bit decode switch to have a 0 case and a default error case, just in case the field is expanded in future hardware. Link: https://lore.kernel.org/r/20200728194945.14126-3-jonathan.derrick@intel.com Signed-off-by: Jon Derrick Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko commit 030109c0376c8f34e95f8b88d170a47900b3ad07 Author: Jon Derrick Date: Tue Jul 28 13:49:40 2020 -0600 PCI: vmd: Create physical offset helper Move the guest-passthrough physical offset discovery code to a new helper. No functional changes. Link: https://lore.kernel.org/r/20200728194945.14126-2-jonathan.derrick@intel.com Signed-off-by: Jon Derrick Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko commit 5f56888fad46812bab9ecb455d92da675ef4fbd0 Merge: 97f2f490c1a46 1a3c4dd4e1633 fcedb589b5a88 f6bade6875d74 b159c63d82ff8 fda48bf5c86d8 eff06bd5e5f63 f6c992ca7dd4f Author: Stephen Boyd Date: Tue Oct 20 11:47:07 2020 -0700 Merge branches 'clk-ingenic', 'clk-at91', 'clk-kconfig', 'clk-imx', 'clk-qcom', 'clk-prima2' and 'clk-bcm' into clk-next - Support qcom SM8150/SM8250 video and display clks - Change how qcom's display port clks work * clk-ingenic: clk: ingenic: Respect CLK_SET_RATE_PARENT in .round_rate clk: ingenic: Don't tag custom clocks with CLK_SET_RATE_PARENT clk: ingenic: Don't use CLK_SET_RATE_GATE for PLL clk: ingenic: Use readl_poll_timeout instead of custom loop clk: ingenic: Use to_clk_info() macro for all clocks * clk-at91: clk: at91: sam9x60: support only two programmable clocks clk: at91: clk-sam9x60-pll: remove unused variable clk: at91: clk-main: update key before writing AT91_CKGR_MOR clk: at91: remove the checking of parent_name * clk-kconfig: clk: Restrict CLK_HSDK to ARC_SOC_HSDK * clk-imx: clk: imx8mq: Fix usdhc parents order clk: imx: imx21: Remove clock driver clk: imx: gate2: Fix a few typos clk: imx: Fix and update kerneldoc clk: imx: fix i.MX7D peripheral clk mux flags clk: imx: fix composite peripheral flags clk: imx: Correct the memrepair clock on imx8mp clk: imx: Correct the root clk of media ldb on imx8mp clk: imx: vf610: Add CRC clock clk: imx: Explicitly include bits.h clk: imx8qxp: Support building i.MX8QXP clock driver as module clk: imx8m: Support module build clk: imx: Add clock configuration for ARMv7 platforms clk: imx: Support building i.MX common clock driver as module clk: composite: Export clk_hw_register_composite() clk: imx6sl: Use BIT(x) to avoid shifting signed 32-bit value by 31 bits * clk-qcom: clk: qcom: gdsc: Keep RETAIN_FF bit set if gdsc is already on clk: qcom: Add display clock controller driver for SM8150 and SM8250 dt-bindings: clock: add QCOM SM8150 and SM8250 display clock bindings clk: qcom: add video clock controller driver for SM8250 clk: qcom: add video clock controller driver for SM8150 dt-bindings: clock: add SM8250 QCOM video clock bindings dt-bindings: clock: add SM8150 QCOM video clock bindings dt-bindings: clock: combine qcom,sdm845-videocc and qcom,sc7180-videocc clk: qcom: gcc-msm8994: Add missing clocks, resets and GDSCs clk/qcom: fix spelling typo clk: qcom: gcc-sdm660: Fix wrong parent_map clk: qcom: dispcc: Update DP clk ops for phy design clk: qcom: gcc-msm8939: remove defined but not used variables clk: qcom: ipq8074: make pcie0_rchng_clk_src static * clk-prima2: clk: clk-prima2: fix return value check in prima2_clk_init() * clk-bcm: clk: bcm2835: add missing release if devm_clk_hw_register fails clk: bcm: rpi: Add register to control pixel bvb clk commit 97f2f490c1a46e5e2e80b5c423fe1f4e11b65ac1 Merge: 3ab9a54f76e76 3270ee14557b5 a3947209d380c e9501b975a9ef 9ba9ad8f5be0f 6487649ee8b81 07c565b42a04f Author: Stephen Boyd Date: Tue Oct 20 11:47:02 2020 -0700 Merge branches 'clk-semicolon', 'clk-axi-clkgen', 'clk-qoriq', 'clk-baikal', 'clk-const' and 'clk-mmp2' into clk-next * clk-semicolon: clk: meson: use semicolons rather than commas to separate statements clk: mvebu: ap80x-cpu: use semicolons rather than commas to separate statements clk: uniphier: use semicolons rather than commas to separate statements * clk-axi-clkgen: clk: axi-clkgen: Set power bits for fractional mode clk: axi-clkgen: Add support for fractional dividers * clk-qoriq: clk: qoriq: modify MAX_PLL_DIV to 32 * clk-baikal: clk: baikal-t1: Mark Ethernet PLL as critical * clk-const: clk: pxa: Constify static struct clk_ops * clk-mmp2: clk: mmp2: Fix the display clock divider base commit 3ab9a54f76e76c3b282c61451269bd614cd6cf52 Merge: 9d3261628aa63 a2618360abd7d 6045124ebe722 f102ed0686b16 b608f11d49ec6 a68224832118b Author: Stephen Boyd Date: Tue Oct 20 11:46:47 2020 -0700 Merge branches 'clk-simplify', 'clk-ti', 'clk-tegra', 'clk-rockchip' and 'clk-mediatek' into clk-next - Small non-critical fixes for TI clk driver - Support Mediatek MT8167 clks * clk-simplify: clk: mediatek: fix platform_no_drv_owner.cocci warnings clk: mediatek: mt7629: simplify the return expression of mtk_infrasys_init clk: mediatek: mt6797: simplify the return expression of mtk_infrasys_init * clk-ti: clk: ti: dra7: add missing clkctrl register for SHA2 instance clk: ti: clockdomain: fix static checker warning clk: ti: autoidle: add checks against NULL pointer reference clk: keystone: sci-clk: add 10% slack to set_rate clk: keystone: sci-clk: cache results of last query rate operation clk: keystone: sci-clk: fix parsing assigned-clock data during probe * clk-tegra: clk: tegra: Drop !provider check in tegra210_clk_emc_set_rate() * clk-rockchip: clk: rockchip: Initialize hw to error to avoid undefined behavior clk: rockchip: rk3399: Support module build clk: rockchip: fix the clk config to support module build clk: rockchip: Export some clock common APIs for module drivers clk: rockchip: Export rockchip_register_softrst() clk: rockchip: Export rockchip_clk_register_ddrclk() clk: rockchip: Use clk_hw_register_composite instead of clk_register_composite calls clk: rockchip: rk3308: drop unused mux_timer_src_p * clk-mediatek: clk: mediatek: Add MT8167 clock support dt-bindings: clock: mediatek: add bindings for MT8167 clocks clk: mediatek: add UART0 clock support commit 9d3261628aa6338fe153d4d5d1e65f5caed87f01 Merge: 7aa908b48d6e8 871ca96f1c7d5 5eefe5e183173 533852d71840a faeda014b49ec b10f224935125 Author: Stephen Boyd Date: Tue Oct 20 11:46:34 2020 -0700 Merge branches 'clk-renesas', 'clk-amlogic', 'clk-allwinner', 'clk-samsung', 'clk-doc' and 'clk-unused' into clk-next - Remove various unused variables in clk drivers * clk-renesas: clk: renesas: rcar-gen3: Update description for RZ/G2 clk: renesas: cpg-mssr: Add support for R-Car V3U clk: renesas: cpg-mssr: Add register pointers into struct cpg_mssr_priv clk: renesas: cpg-mssr: Use enum clk_reg_layout instead of a boolean flag dt-bindings: clock: renesas,cpg-mssr: Document r8a779a0 dt-bindings: clock: Add r8a779a0 CPG Core Clock Definitions dt-bindings: power: Add r8a779a0 SYSC power domain definitions clk: renesas: rcar-gen2: Rename vsp1-(sy|rt) clocks to vsp(s|r) clk: renesas: r8a7742: Add clk entry for VSPR * clk-amlogic: clk: meson: make shipped controller configurable clk: meson: g12a: mark fclk_div2 as critical clk: meson: axg-audio: fix g12a tdmout sclk inverter clk: meson: axg-audio: separate axg and g12a regmap tables clk: meson: add sclk-ws driver * clk-allwinner: clk: sunxi-ng: sun8i: r40: Use sigma delta modulation for audio PLL clk: sunxi-ng: add support for the Allwinner A100 CCU dt-bindings: clk: sunxi-ccu: add compatible string for A100 CCU and R-CCU * clk-samsung: clk: s2mps11: initialize driver via module_platform_driver clk: samsung: Use cached clk_hws instead of __clk_lookup() calls clk: samsung: exynos5420/5250: Add IDs to the CPU parent clk definitions clk: samsung: Add clk ID definitions for the CPU parent clocks clk: samsung: exynos5420: Avoid __clk_lookup() calls when enabling clocks clk: samsung: exynos5420: Add definition of clock ID for mout_sw_aclk_g3d clk: samsung: Keep top BPLL mux on Exynos542x enabled * clk-doc: clk: davinci: add missing kerneldoc clk: fixed: add missing kerneldoc * clk-unused: clk: socfpga: agilex: Remove unused variable 'cntr_mux' clk: si5341: drop unused 'err' variable clk: mmp: pxa1928: drop unused 'clk' variable clk: at91: drop unused at91sam9g45_pcr_layout commit 38525c6919e2f6b27c1855905f342a0def3cbdcf Merge: f9915b964c251 7007fab4ae82c Author: Linus Torvalds Date: Tue Oct 20 10:56:34 2020 -0700 Merge tag 'for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Power-supply core: - add wireless type - properly document current direction Battery/charger driver changes: - new fuel-gauge/charger driver for RN5T618/RN5T619 - new charger driver for BQ25980, BQ25975 and BQ25960 - bq27xxx-battery: add support for TI bq34z100 - gpio-charger: convert to GPIO descriptors - gpio-charger: add optional support for charge current limiting - max17040: add support for max17041, max17043, max17044 - max17040: add support for max17048, max17049, max17058, max17059 - smb347-charger: add DT support - smb247-charger: add SMB345 and SMB358 support - simple-battery: add temperature properties - lots of minor fixes, cleanups and DT binding YAML conversions Reset drivers: - ocelot: Add support for Sparx5" * tag 'for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (81 commits) power: reset: POWER_RESET_OCELOT_RESET should depend on Ocelot or Sparx5 power: supply: bq25980: Fix uninitialized wd_reg_val and overrun power: supply: ltc2941: Fix ptr to enum cast power: supply: test-power: revise parameter printing to use sprintf power: supply: charger-manager: fix incorrect check on charging_duration_ms power: supply: max17040: Fix ptr to enum cast power: supply: bq25980: Fix uninitialized wd_reg_val power: supply: bq25980: remove redundant zero check on ret power: reset: ocelot: Add support for Sparx5 dt-bindings: reset: ocelot: Add Sparx5 support power: supply: sbs-battery: keep error code when get_property() fails power: supply: bq25980: Add support for the BQ259xx family dt-binding: bq25980: Add the bq25980 flash charger power: supply: fix spelling mistake "unprecise" -> "imprecise" power: supply: test_power: add missing newlines when printing parameters by sysfs power: supply: pm2301: drop duplicated i2c_device_id power: supply: charger-manager: drop unused charger assignment power: supply: rt9455: skip 'struct acpi_device_id' when !CONFIG_ACPI power: supply: goldfish: skip 'struct acpi_device_id' when !CONFIG_ACPI power: supply: bq25890: skip 'struct acpi_device_id' when !CONFIG_ACPI ... commit aa9c9b3f3f08cb0fda8a8139e6fb302c9a2e21ed Author: Bean Huo Date: Tue Oct 20 17:00:27 2020 +0200 PM: runtime: Fix typo in pm_runtime_set_active() helper comment This patch is to fix typo in the comment of helper pm_runtime_set_active(). Signed-off-by: Bean Huo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 330e3932a4811e1628d962e47e6892e1e20eb9a7 Author: Ulf Hansson Date: Tue Oct 20 10:10:35 2020 +0200 PM: domains: Fix build error for genpd notifiers The __raw_notifier_call_chain() was recently removed and replaced with raw_notifier_call_chain_robust(). Recent changes to genpd didn't take that into account, which causes a build error. Let's fix this by converting to the raw_notifier_call_chain_robust() in genpd. Reported-by: kernel test robot Reported-by: Lina Iyer Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 618355cc6a0d9c23da2be171b72686f1f94a4fc1 Author: Tom Rix Date: Mon Oct 19 12:15:00 2020 -0700 nfc: remove unneeded break A break is not needed if it is preceded by a return Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201019191500.9264-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 7ebb9db011088f9bd357791f49cb7012e66f29e2 Author: Tom Rix Date: Mon Oct 19 10:26:07 2020 -0700 net: remove unneeded break A break is not needed if it is preceded by a return or goto Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20201019172607.31622-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit d48c8124749c9a5081fe68680f83605e272c984b Author: Martijn de Gouw Date: Mon Oct 19 13:42:27 2020 +0200 SUNRPC: fix copying of multiple pages in gss_read_proxy_verf() When the passed token is longer than 4032 bytes, the remaining part of the token must be copied from the rqstp->rq_arg.pages. But the copy must make sure it happens in a consecutive way. With the existing code, the first memcpy copies 'length' bytes from argv->iobase, but since the header is in front, this never fills the whole first page of in_token->pages. The mecpy in the loop copies the following bytes, but starts writing at the next page of in_token->pages. This leaves the last bytes of page 0 unwritten. Symptoms were that users with many groups were not able to access NFS exports, when using Active Directory as the KDC. Signed-off-by: Martijn de Gouw Fixes: 5866efa8cbfb "SUNRPC: Fix svcauth_gss_proxy_init()" Signed-off-by: J. Bruce Fields commit 27a1e8a0f79e643d4dedb46f71e76bdee3801877 Author: Roberto Bergantinos Corpas Date: Mon Oct 19 11:33:56 2020 +0200 sunrpc: raise kernel RPC channel buffer size Its possible that using AUTH_SYS and mountd manage-gids option a user may hit the 8k RPC channel buffer limit. This have been observed on field, causing unanswered RPCs on clients after mountd fails to write on channel : rpc.mountd[11231]: auth_unix_gid: error writing reply Userland nfs-utils uses a buffer size of 32k (RPC_CHAN_BUF_SIZE), so lets match those two. Signed-off-by: Roberto Bergantinos Corpas Signed-off-by: J. Bruce Fields commit f9915b964c25193a6be1aed744c946d6ff177149 Merge: 5c7e3f3f5cbc3 40b99050455b9 Author: Linus Torvalds Date: Tue Oct 20 10:19:02 2020 -0700 Merge tag 'drm-next-2020-10-19' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Some fixes queued up already for i915 and amdgpu, I've also included the fix for the clang warning you've seen. i915: - set all unused color plane offsets to ~0xfff again (Ville) - fix TGL DKL PHY DP vswing handling (Ville) amdgpu: - DCN clang warning fix - eDP fix - BACO fix - kernel documentation fixes - SMU7 mclk fix - VCN1 hw bug workaround amdkfd: - kvfree vs kfree fix" * tag 'drm-next-2020-10-19' of git://anongit.freedesktop.org/drm/drm: drm/amd/display: Fix incorrect dsc force enable logic drm/amdkfd: Use kvfree in destroy_crat_image drm/amdgpu: vcn and jpeg ring synchronization drm/amd/pm: increase mclk switch threshold to 200 us docs: amdgpu: fix a warning when building the documentation drm/amd/display: kernel-doc: document force_timing_sync drm/amdgpu/swsmu: init the baco mutex in early_init drm/amd/display: Fix module load hangs when connected to an eDP drm/i915: Set all unused color plane offsets to ~0xfff again drm/i915: Fix TGL DKL PHY DP vswing handling commit 3ece60e3e78e6066b4ea02dea6687e5d373c6a77 Author: Colin Ian King Date: Tue Oct 20 15:19:36 2020 +0100 cifs: make const array static, makes object smaller Don't populate const array smb3_create_tag_posix on the stack but instead make it static. Makes the object code smaller by 50 bytes. Before: text data bss dec hex filename 150184 47167 0 197351 302e7 fs/cifs/smb2pdu.o After: text data bss dec hex filename 150070 47231 0 197301 302b5 fs/cifs/smb2pdu.o (gcc version 10.2.0) Signed-off-by: Colin Ian King Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 9934430e2178d5164eb1ac91a9b092f9e7e64745 Author: Steve French Date: Tue Oct 20 02:02:02 2020 -0500 SMB3.1.1: Fix ids returned in POSIX query dir We were setting the uid/gid to the default in each dir entry in the parsing of the POSIX query dir response, rather than attempting to map the user and group SIDs returned by the server to well known SIDs (or upcall if not found). CC: Stable Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 9eec21bfbe9096141f15c624d3d0c2142121f6cb Author: Steve French Date: Mon Oct 19 18:18:15 2020 -0500 smb3: add dynamic trace point to trace when credits obtained SMB3 crediting is used for flow control, and it can be useful to trace for problem determination how many credits were acquired and for which operation. Here is an example ("trace-cmd record -e *add_credits"): cifsd-9522    [010] ....  5995.202712: smb3_add_credits: server=localhost current_mid=0x12 credits=373 credits_to_add=10 cifsd-9522    [010] ....  5995.204040: smb3_add_credits: server=localhost current_mid=0x15 credits=400 credits_to_add=30 Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 5c7e3f3f5cbc31118914ceee969154582ad3aa6b Merge: 4a5bb973fa035 9def3b1a07c41 Author: Linus Torvalds Date: Tue Oct 20 09:35:06 2020 -0700 Merge tag 'iommu-fix-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fix from Joerg Roedel: "Fix a build regression with !CONFIG_IOMMU_API" * tag 'iommu-fix-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Don't dereference iommu_device if IOMMU_API is not built commit b159c63d82ff8ffddc6c6f0eb881b113b36ecad7 Author: Abel Vesa Date: Thu Oct 15 12:25:44 2020 +0300 clk: imx8mq: Fix usdhc parents order According to the latest RM (see Table 5-1. Clock Root Table), both usdhc root clocks have the parent order as follows: 000 - 25M_REF_CLK 001 - SYSTEM_PLL1_DIV2 010 - SYSTEM_PLL1_CLK 011 - SYSTEM_PLL2_DIV2 100 - SYSTEM_PLL3_CLK 101 - SYSTEM_PLL1_DIV3 110 - AUDIO_PLL2_CLK 111 - SYSTEM_PLL1_DIV8 So the audio_pll2_out and sys3_pll_out have to be swapped. Fixes: b80522040cd3 ("clk: imx: Add clock driver for i.MX8MQ CCM") Signed-off-by: Abel Vesa Reported-by: Cosmin Stefan Stoica Link: https://lore.kernel.org/r/1602753944-30757-1-git-send-email-abel.vesa@nxp.com Reviewed-by: Fabio Estevam Signed-off-by: Stephen Boyd commit fda48bf5c86d88fd7074e318f290ad636dff4eaa Author: Stephen Boyd Date: Fri Oct 16 19:01:37 2020 -0700 clk: qcom: gdsc: Keep RETAIN_FF bit set if gdsc is already on If the GDSC is enabled out of boot but doesn't have the retain ff bit set we will get confusing results where the registers that are powered by the GDSC lose their contents on the first power off of the GDSC but thereafter they retain their contents. This is because gdsc_init() fails to make sure the RETAIN_FF bit is set when it probes the GDSC the first time and thus powering off the GDSC causes the register contents to be reset. We do set the RETAIN_FF bit the next time we power on the GDSC, see gdsc_enable(), so that subsequent GDSC power off's don't lose register contents state. Forcibly set the bit at device probe time so that the kernel's assumed view of the GDSC is consistent with the state of the hardware. This fixes a problem where the audio PLL doesn't work on sc7180 when the bootloader leaves the lpass_core_hm GDSC enabled at boot (e.g. to make a noise) but critically doesn't set the RETAIN_FF bit. Cc: Douglas Anderson Cc: Taniya Das Cc: Rajendra Nayak Fixes: 173722995cdb ("clk: qcom: gdsc: Add support to enable retention of GSDCR") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20201017020137.1251319-1-sboyd@kernel.org Reviewed-by: Taniya Das Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson commit 4a5bb973fa0353d25dbe854694c71bb58eb4cf78 Merge: 709ebe6dff504 5f7f77400ab5b Author: Linus Torvalds Date: Tue Oct 20 09:24:01 2020 -0700 Merge tag 'for-linus-5.10b-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull more xen updates from Juergen Gross: - A single patch to fix the Xen security issue XSA-331 (malicious guests can DoS dom0 by triggering NULL-pointer dereferences or access to stale data). - A larger series to fix the Xen security issue XSA-332 (malicious guests can DoS dom0 by sending events at high frequency leading to dom0's vcpus being busy in IRQ handling for elongated times). * tag 'for-linus-5.10b-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/events: block rogue events for some time xen/events: defer eoi in case of excessive number of events xen/events: use a common cpu hotplug hook for event channels xen/events: switch user event channels to lateeoi model xen/pciback: use lateeoi irq binding xen/pvcallsback: use lateeoi irq binding xen/scsiback: use lateeoi irq binding xen/netback: use lateeoi irq binding xen/blkback: use lateeoi irq binding xen/events: add a new "late EOI" evtchn framework xen/events: fix race in evtchn_fifo_unmask() xen/events: add a proper barrier to 2-level uevent unmasking xen/events: avoid removing an event channel while handling it commit 709ebe6dff50405ae83551578bc08c0f78b05158 Merge: b32649b863623 adc5f70293760 Author: Linus Torvalds Date: Tue Oct 20 09:18:31 2020 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - handle inexact watchpoint addresses (Douglas Anderson) - decompressor serial debug cleanups (Linus Walleij) - update L2 cache prefetch bits (Guillaume Tucker) - add text offset and malloc size to the decompressor kexec data * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: add malloc size to decompressor kexec size structure ARM: add TEXT_OFFSET to decompressor kexec image structure ARM: 9007/1: l2c: fix prefetch bits init in L2X0_AUX_CTRL using DT values ARM: 9010/1: uncompress: Print the location of appended DTB ARM: 9009/1: uncompress: Enable debug in head.S ARM: 9008/1: uncompress: Drop excess whitespace print ARM: 9006/1: uncompress: Wait for ready and busy in debug prints ARM: 9005/1: debug: Select flow control for all debug UARTs ARM: 9004/1: debug: Split waituart to CTS and TXRDY ARM: 9003/1: uncompress: Delete unused debug macros ARM: 8997/2: hw_breakpoint: Handle inexact watchpoint addresses commit 2e6cfd496f5b57034cf2aec738799571b5a52124 Author: Xiaoyang Xu Date: Fri Oct 16 17:35:58 2020 +0800 vfio iommu type1: Fix memory leak in vfio_iommu_type1_pin_pages pfn is not added to pfn_list when vfio_add_to_pfn_list fails. vfio_unpin_page_external will exit directly without calling vfio_iova_put_vfio_pfn. This will lead to a memory leak. Fixes: a54eb55045ae ("vfio iommu type1: Add support for mediated devices") Signed-off-by: Xiaoyang Xu [aw: simplified logic, add Fixes] Signed-off-by: Alex Williamson commit b32649b863623d89fec83aa27d19c28715c4fae3 Merge: 270315b8235e3 6364d1b41cc38 Author: Linus Torvalds Date: Tue Oct 20 09:09:44 2020 -0700 Merge tag 'arc-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: "The bulk of ARC pull request is removal of EZChip NPS platform which was suffering from constant bitrot. In recent years EZChip has gone though multiple successive acquisitions and I guess things and people move on. I would like to take this opportunity to recognize and thank all those good folks (Gilad, Noam, Ofer...) for contributing major bits to ARC port (SMP, Big Endian). Summary: - drop support for EZChip NPS platform - misc other fixes" * tag 'arc-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: arc: include/asm: fix typos of "themselves" ARC: SMP: fix typo and use "come up" instead of "comeup" ARC: [dts] fix the errors detected by dtbs_check arc: plat-hsdk: fix kconfig dependency warning when !RESET_CONTROLLER ARC: [plat-eznps]: Drop support for EZChip NPS platform commit 58e0cd3e23ead3636525e5f47898c1dc92d7f12f Author: Tom Rix Date: Mon Oct 19 12:02:49 2020 -0700 PCI: v3-semi: Remove unneeded break A break is not needed if it is preceded by a return Link: https://lore.kernel.org/r/20201019190249.7825-1-trix@redhat.com Signed-off-by: Tom Rix Signed-off-by: Bjorn Helgaas Reviewed-by: Linus Walleij commit 1e66d50ad3a1dbf0169b14d502be59a4b1213149 Author: Chris Down Date: Tue Oct 20 10:34:59 2020 +0100 kbuild: Use uname for LINUX_COMPILE_HOST detection `hostname` may not be present on some systems as it's not mandated by POSIX/SUSv4. This isn't just a theoretical problem: on Arch Linux, `hostname` is provided by `inetutils`, which isn't part of the base distribution. ./scripts/mkcompile_h: line 38: hostname: command not found Use `uname -n` instead, which is more likely to be available (and mandated by standards). Signed-off-by: Chris Down Signed-off-by: Masahiro Yamada commit 121c5d08d53cb1f95d9881838523b0305c3f3bef Author: Mark Wielaard Date: Sat Oct 17 14:01:35 2020 +0200 kbuild: Only add -fno-var-tracking-assignments for old GCC versions Some old GCC versions between 4.5.0 and 4.9.1 might miscompile code with -fvar-tracking-assingments (which is enabled by default with -g -O2). Commit 2062afb4f804 ("Fix gcc-4.9.0 miscompilation of load_balance() in scheduler") added -fno-var-tracking-assignments unconditionally to work around this. But newer versions of GCC no longer have this bug, so only add it for versions of GCC before 5.0. This allows various tools such as a perf probe or gdb debuggers or systemtap to resolve variable locations using dwarf locations in more code. Signed-off-by: Mark Wielaard Acked-by: Ian Rogers Reviewed-by: Andi Kleen Signed-off-by: Masahiro Yamada commit 8402ee182c417a32d5e5a702f2fa2b01e76dc220 Author: Rasmus Villemoes Date: Fri Oct 16 14:58:46 2020 +0200 kbuild: remove leftover comment for filechk utility After commit 43fee2b23895 ("kbuild: do not redirect the first prerequisite for filechk"), the rule is no longer automatically passed $< as stdin, so remove the stale comment. Fixes: 43fee2b23895 ("kbuild: do not redirect the first prerequisite for filechk") Signed-off-by: Rasmus Villemoes Signed-off-by: Masahiro Yamada commit 0f6372e522237f39aff63f2e158d629038f26238 Author: Sami Tolvanen Date: Mon Oct 12 17:31:45 2020 -0700 treewide: remove DISABLE_LTO This change removes all instances of DISABLE_LTO from Makefiles, as they are currently unused, and the preferred method of disabling LTO is to filter out the flags instead. Note added by Masahiro Yamada: DISABLE_LTO was added as preparation for GCC LTO, but GCC LTO was not pulled into the mainline. (https://lkml.org/lkml/2014/4/8/272) Suggested-by: Kees Cook Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Signed-off-by: Masahiro Yamada commit a4fd8414659bf470e2146b352574bbd274e54b7a Author: Andrei Vagin Date: Thu Oct 15 09:00:20 2020 -0700 selftests/timens: Add a test for futex() Output on success: 1..2 ok 1 futex with the 0 clockid ok 2 futex with the 1 clockid # Totals: pass:2 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Andrei Vagin Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201015160020.293748-2-avagin@gmail.com commit c2f7d08cccf4af2ce6992feaabb9e68e4ae0bff3 Author: Andrei Vagin Date: Thu Oct 15 09:00:19 2020 -0700 futex: Adjust absolute futex timeouts with per time namespace offset For all commands except FUTEX_WAIT, the timeout is interpreted as an absolute value. This absolute value is inside the task's time namespace and has to be converted to the host's time. Fixes: 5a590f35add9 ("posix-clocks: Wire up clock_gettime() with timens offsets") Reported-by: Hans van der Laan Signed-off-by: Andrei Vagin Signed-off-by: Thomas Gleixner Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Link: https://lore.kernel.org/r/20201015160020.293748-1-avagin@gmail.com commit ea8f8c99a28199f6e067581b8626d192b07750f2 Author: Will Deacon Date: Tue Oct 20 16:01:57 2020 +0100 arm64: spectre-v2: Favour CPU-specific mitigation at EL2 Spectre-v2 can be mitigated on Falkor CPUs either by calling into firmware or by issuing a magic, CPU-specific sequence of branches. Although the latter is faster, the size of the code sequence means that it cannot be used in the EL2 vectors, and so there is a need for both mitigations to co-exist in order to achieve optimal performance. Change the mitigation selection logic for Spectre-v2 so that the CPU-specific mitigation is used only when the firmware mitigation is also available, rather than when a firmware mitigation is unavailable. Cc: Marc Zyngier Signed-off-by: Will Deacon commit cb3a92da231bcf55c243d00fa619ee36281b0001 Author: Yufen Yu Date: Tue Oct 20 05:22:56 2020 -0400 block: remove unused members for io_context After removing blk-sq code, there is no user of nr_batch_requests and last_waited in kernel. Signed-off-by: Yufen Yu Signed-off-by: Jens Axboe commit 576e85c5e92486f1aa8be3cb1a30cb59d4415981 Author: Xianting Tian Date: Mon Oct 19 16:20:47 2020 +0800 blk-mq: remove the calling of local_memory_node() We don't need to check whether the node is memoryless numa node before calling allocator interface. SLUB(and SLAB,SLOB) relies on the page allocator to pick a node. Page allocator should deal with memoryless nodes just fine. It has zonelists constructed for each possible nodes. And it will automatically fall back into a node which is closest to the requested node. As long as __GFP_THISNODE is not enforced of course. The code comments of kmem_cache_alloc_node() of SLAB also showed this: * Fallback to other node is possible if __GFP_THISNODE is not set. blk-mq code doesn't set __GFP_THISNODE, so we can remove the calling of local_memory_node(). Signed-off-by: Xianting Tian Signed-off-by: Jens Axboe commit ec613a57fa1d57381f890c3166175fe68cf43f12 Author: Jordan Niethe Date: Thu Aug 27 13:55:29 2020 +1000 powerpc/64s: Remove TM from Power10 features ISA v3.1 removes transactional memory and hence it should not be present in cpu_features or cpu_user_features2. Remove CPU_FTR_TM_COMP from CPU_FTRS_POWER10. Remove PPC_FEATURE2_HTM_COMP and PPC_FEATURE2_HTM_NOSC_COMP from COMMON_USER2_POWER10. Fixes: a3ea40d5c736 ("powerpc: Add POWER10 architected mode") Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200827035529.900-1-jniethe5@gmail.com commit 7da4c510abff8ad47eb2d7cc9a97def5a411947f Author: Lukasz Halman Date: Tue Oct 20 08:14:09 2020 +0200 ALSA: usb-audio: Line6 Pod Go interface requires static clock rate quirk Recently released Line6 Pod Go requires static clock rate quirk to make its usb audio interface working. Added its usb id to the list of similar line6 devices. Signed-off-by: Lukasz Halman Cc: Link: https://lore.kernel.org/r/20201020061409.GA24382@TAG009442538903 Signed-off-by: Takashi Iwai commit 1b21c8db0e3b71523ada0cf568372ebfcf0d3466 Merge: 628ade2d0816b 4e5dc64c43192 Author: Paolo Bonzini Date: Tue Oct 20 08:14:25 2020 -0400 Merge tag 'kvmarm-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 updates for Linux 5.10 - New page table code for both hypervisor and guest stage-2 - Introduction of a new EL2-private host context - Allow EL2 to have its own private per-CPU variables - Support of PMU event filtering - Complete rework of the Spectre mitigation commit 31cc578ae2de19c748af06d859019dced68e325d Author: Saeed Mirzamohammadi Date: Tue Oct 20 13:41:36 2020 +0200 netfilter: nftables_offload: KASAN slab-out-of-bounds Read in nft_flow_rule_create This patch fixes the issue due to: BUG: KASAN: slab-out-of-bounds in nft_flow_rule_create+0x622/0x6a2 net/netfilter/nf_tables_offload.c:40 Read of size 8 at addr ffff888103910b58 by task syz-executor227/16244 The error happens when expr->ops is accessed early on before performing the boundary check and after nft_expr_next() moves the expr to go out-of-bounds. This patch checks the boundary condition before expr->ops that fixes the slab-out-of-bounds Read issue. Add nft_expr_more() and use it to fix this problem. Signed-off-by: Saeed Mirzamohammadi Signed-off-by: Pablo Neira Ayuso commit 64747d5ed19911a867af733f6679d2a859fb18ae Author: Jeremy Sowden Date: Sun Oct 18 16:30:19 2020 +0100 docs: nf_flowtable: fix typo. "mailined" should be "mainlined." Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit 63137bc5882a1882c553d389fdeeeace86ee1741 Author: Timothée COCAULT Date: Wed Oct 14 12:36:15 2020 +0000 netfilter: ebtables: Fixes dropping of small packets in bridge nat Fixes an error causing small packets to get dropped. skb_ensure_writable expects the second parameter to be a length in the ethernet payload.=20 If we want to write the ethernet header (src, dst), we should pass 0. Otherwise, packets with small payloads (< ETH_ALEN) will get dropped. Fixes: c1a831167901 ("netfilter: bridge: convert skb_make_writable to skb_ensure_writable") Signed-off-by: Timothée COCAULT Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 68f9f9c2c3b6a7259f6a92bc26cdc7bd22e7a982 Author: Georg Kohmann Date: Tue Oct 13 14:23:12 2020 +0200 netfilter: Drop fragmented ndisc packets assembled in netfilter Fragmented ndisc packets assembled in netfilter not dropped as specified in RFC 6980, section 5. This behaviour breaks TAHI IPv6 Core Conformance Tests v6LC.2.1.22/23, V6LC.2.2.26/27 and V6LC.2.3.18. Setting IP6SKB_FRAGMENTED flag during reassembly. References: commit b800c3b966bc ("ipv6: drop fragmented ndisc packets by default (RFC 6980)") Signed-off-by: Georg Kohmann Signed-off-by: Pablo Neira Ayuso commit 4f25434bccc28cf8a07876ef5142a2869a674353 Author: Francesco Ruggeri Date: Wed Oct 7 12:32:52 2020 -0700 netfilter: conntrack: connection timeout after re-register If the first packet conntrack sees after a re-register is an outgoing keepalive packet with no data (SEG.SEQ = SND.NXT-1), td_end is set to SND.NXT-1. When the peer correctly acknowledges SND.NXT, tcp_in_window fails check III (Upper bound for valid (s)ack: sack <= receiver.td_end) and returns false, which cascades into nf_conntrack_in setting skb->_nfct = 0 and in later conntrack iptables rules not matching. In cases where iptables are dropping packets that do not match conntrack rules this can result in idle tcp connections to time out. v2: adjust td_end when getting the reply rather than when sending out the keepalive packet. Fixes: f94e63801ab2 ("netfilter: conntrack: reset tcp maxwin on re-register") Signed-off-by: Francesco Ruggeri Signed-off-by: Pablo Neira Ayuso commit 79dce09ab02729a90cf6ce49c9aaaf17aa0d21db Author: longguang.yue Date: Mon Sep 28 10:49:38 2020 +0800 ipvs: adjust the debug info in function set_tcp_state Outputting client,virtual,dst addresses info when tcp state changes, which makes the connection debug more clear Signed-off-by: longguang.yue Acked-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso commit 3b92fa7485eba16b05166fddf38ab42f2ff6ab95 Author: Nick Desaulniers Date: Fri Oct 16 10:53:39 2020 -0700 arm64: link with -z norelro regardless of CONFIG_RELOCATABLE With CONFIG_EXPERT=y, CONFIG_KASAN=y, CONFIG_RANDOMIZE_BASE=n, CONFIG_RELOCATABLE=n, we observe the following failure when trying to link the kernel image with LD=ld.lld: error: section: .exit.data is not contiguous with other relro sections ld.lld defaults to -z relro while ld.bfd defaults to -z norelro. This was previously fixed, but only for CONFIG_RELOCATABLE=y. Fixes: 3bbd3db86470 ("arm64: relocatable: fix inconsistencies in linker script and options") Signed-off-by: Nick Desaulniers Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201016175339.2429280-1-ndesaulniers@google.com Signed-off-by: Will Deacon commit 7bdf468a5b40bbf1776e17eb1313d145d3e3ce28 Author: Palmer Dabbelt Date: Fri Oct 16 17:26:37 2020 -0700 arm64: Fix a broken copyright header in gen_vdso_offsets.sh I was going to copy this but I didn't want to chase around the build system stuff so I did it a different way. Signed-off-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20201017002637.503579-1-palmer@dabbelt.com Signed-off-by: Will Deacon commit 15b23906347c0af8778d1d4edeea415290342d35 Author: Hou Zhiqiang Date: Wed Sep 16 13:41:30 2020 +0800 PCI: dwc: Add link up check in dw_child_pcie_ops.map_bus() NXP Layerscape (ls1028a, ls2088a), dra7xxx and imx6 platforms are either programmed or statically configured to forward the error triggered by a link-down state (eg no connected endpoint device) on the system bus for PCI configuration transactions; these errors are reported as an SError at system level, which is fatal. Enumerating a PCI tree when the PCIe link is down is not sensible either, so even if the link-up check is racy (link can go down after map_bus() is called) add a link-up check in map_bus() to prevent issuing configuration transactions when the link is down. SError report: SError Interrupt on CPU2, code 0xbf000002 -- SError CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.9.0-rc5-next-20200914-00001-gf965d3ec86fa #67 Hardware name: LS1046A RDB Board (DT) pstate: 20000085 (nzCv daIf -PAN -UAO BTYPE=--) pc : pci_generic_config_read+0x3c/0xe0 lr : pci_generic_config_read+0x24/0xe0 sp : ffff80001003b7b0 x29: ffff80001003b7b0 x28: ffff80001003ba74 x27: ffff000971d96800 x26: ffff00096e77e0a8 x25: ffff80001003b874 x24: ffff80001003b924 x23: 0000000000000004 x22: 0000000000000000 x21: 0000000000000000 x20: ffff80001003b874 x19: 0000000000000004 x18: ffffffffffffffff x17: 00000000000000c0 x16: fffffe0025981840 x15: ffffb94c75b69948 x14: 62203a383634203a x13: 666e6f635f726568 x12: 202c31203d207265 x11: 626d756e3e2d7375 x10: 656877202c307830 x9 : 203d206e66766564 x8 : 0000000000000908 x7 : 0000000000000908 x6 : ffff800010900000 x5 : ffff00096e77e080 x4 : 0000000000000000 x3 : 0000000000000003 x2 : 84fa3440ff7e7000 x1 : 0000000000000000 x0 : ffff800010034000 Kernel panic - not syncing: Asynchronous SError Interrupt CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.9.0-rc5-next-20200914-00001-gf965d3ec86fa #67 Hardware name: LS1046A RDB Board (DT) Call trace: dump_backtrace+0x0/0x1c0 show_stack+0x18/0x28 dump_stack+0xd8/0x134 panic+0x180/0x398 add_taint+0x0/0xb0 arm64_serror_panic+0x78/0x88 do_serror+0x68/0x180 el1_error+0x84/0x100 pci_generic_config_read+0x3c/0xe0 dw_pcie_rd_other_conf+0x78/0x110 pci_bus_read_config_dword+0x88/0xe8 pci_bus_generic_read_dev_vendor_id+0x30/0x1b0 pci_bus_read_dev_vendor_id+0x4c/0x78 pci_scan_single_device+0x80/0x100 Link: https://lore.kernel.org/r/20200916054130.8685-1-Zhiqiang.Hou@nxp.com Signed-off-by: Hou Zhiqiang [lorenzo.pieralisi@arm.com: rewrote the commit log, remove Fixes tag] Signed-off-by: Lorenzo Pieralisi commit 695cebe58dcf3d9802cdfa9c327b5c7641a5914b Author: Christoph Hellwig Date: Tue Oct 20 10:41:07 2020 +0200 dma-mapping: move more functions to dma-map-ops.h Due to a mismerge a bunch of prototypes that should have moved to dma-map-ops.h are still in dma-mapping.h, fix that up. Signed-off-by: Christoph Hellwig commit 5f7f77400ab5b357b5fdb7122c3442239672186c Author: Juergen Gross Date: Mon Sep 14 14:01:02 2020 +0200 xen/events: block rogue events for some time In order to avoid high dom0 load due to rogue guests sending events at high frequency, block those events in case there was no action needed in dom0 to handle the events. This is done by adding a per-event counter, which set to zero in case an EOI without the XEN_EOI_FLAG_SPURIOUS is received from a backend driver, and incremented when this flag has been set. In case the counter is 2 or higher delay the EOI by 1 << (cnt - 2) jiffies, but not more than 1 second. In order not to waste memory shorten the per-event refcnt to two bytes (it should normally never exceed a value of 2). Add an overflow check to evtchn_get() to make sure the 2 bytes really won't overflow. This is part of XSA-332. Cc: stable@vger.kernel.org Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Stefano Stabellini Reviewed-by: Wei Liu commit e99502f76271d6bc4e374fe368c50c67a1fd3070 Author: Juergen Gross Date: Mon Sep 7 15:47:30 2020 +0200 xen/events: defer eoi in case of excessive number of events In case rogue guests are sending events at high frequency it might happen that xen_evtchn_do_upcall() won't stop processing events in dom0. As this is done in irq handling a crash might be the result. In order to avoid that, delay further inter-domain events after some time in xen_evtchn_do_upcall() by forcing eoi processing into a worker on the same cpu, thus inhibiting new events coming in. The time after which eoi processing is to be delayed is configurable via a new module parameter "event_loop_timeout" which specifies the maximum event loop time in jiffies (default: 2, the value was chosen after some tests showing that a value of 2 was the lowest with an only slight drop of dom0 network throughput while multiple guests performed an event storm). How long eoi processing will be delayed can be specified via another parameter "event_eoi_delay" (again in jiffies, default 10, again the value was chosen after testing with different delay values). This is part of XSA-332. Cc: stable@vger.kernel.org Reported-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Stefano Stabellini Reviewed-by: Wei Liu commit 7beb290caa2adb0a399e735a1e175db9aae0523a Author: Juergen Gross Date: Sun Sep 13 14:23:02 2020 +0200 xen/events: use a common cpu hotplug hook for event channels Today only fifo event channels have a cpu hotplug callback. In order to prepare for more percpu (de)init work move that callback into events_base.c and add percpu_init() and percpu_deinit() hooks to struct evtchn_ops. This is part of XSA-332. Cc: stable@vger.kernel.org Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Wei Liu commit c44b849cee8c3ac587da3b0980e01f77500d158c Author: Juergen Gross Date: Mon Sep 7 15:47:29 2020 +0200 xen/events: switch user event channels to lateeoi model Instead of disabling the irq when an event is received and enabling it again when handled by the user process use the lateeoi model. This is part of XSA-332. Cc: stable@vger.kernel.org Reported-by: Julien Grall Signed-off-by: Juergen Gross Tested-by: Stefano Stabellini Reviewed-by: Stefano Stabellini Reviewed-by: Jan Beulich Reviewed-by: Wei Liu commit c2711441bc961b37bba0615dd7135857d189035f Author: Juergen Gross Date: Mon Sep 7 15:47:29 2020 +0200 xen/pciback: use lateeoi irq binding In order to reduce the chance for the system becoming unresponsive due to event storms triggered by a misbehaving pcifront use the lateeoi irq binding for pciback and unmask the event channel only just before leaving the event handling function. Restructure the handling to support that scheme. Basically an event can come in for two reasons: either a normal request for a pciback action, which is handled in a worker, or in case the guest has finished an AER request which was requested by pciback. When an AER request is issued to the guest and a normal pciback action is currently active issue an EOI early in order to be able to receive another event when the AER request has been finished by the guest. Let the worker processing the normal requests run until no further request is pending, instead of starting a new worker ion that case. Issue the EOI only just before leaving the worker. This scheme allows to drop calling the generic function xen_pcibk_test_and_schedule_op() after processing of any request as the handling of both request types is now separated more cleanly. This is part of XSA-332. Cc: stable@vger.kernel.org Reported-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Wei Liu commit c8d647a326f06a39a8e5f0f1af946eacfa1835f8 Author: Juergen Gross Date: Mon Sep 7 15:47:28 2020 +0200 xen/pvcallsback: use lateeoi irq binding In order to reduce the chance for the system becoming unresponsive due to event storms triggered by a misbehaving pvcallsfront use the lateeoi irq binding for pvcallsback and unmask the event channel only after handling all write requests, which are the ones coming in via an irq. This requires modifying the logic a little bit to not require an event for each write request, but to keep the ioworker running until no further data is found on the ring page to be processed. This is part of XSA-332. Cc: stable@vger.kernel.org Reported-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Stefano Stabellini Reviewed-by: Wei Liu commit 86991b6e7ea6c613b7692f65106076943449b6b7 Author: Juergen Gross Date: Mon Sep 7 15:47:28 2020 +0200 xen/scsiback: use lateeoi irq binding In order to reduce the chance for the system becoming unresponsive due to event storms triggered by a misbehaving scsifront use the lateeoi irq binding for scsiback and unmask the event channel only just before leaving the event handling function. In case of a ring protocol error don't issue an EOI in order to avoid the possibility to use that for producing an event storm. This at once will result in no further call of scsiback_irq_fn(), so the ring_error struct member can be dropped and scsiback_do_cmd_fn() can signal the protocol error via a negative return value. This is part of XSA-332. Cc: stable@vger.kernel.org Reported-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Wei Liu commit 23025393dbeb3b8b3b60ebfa724cdae384992e27 Author: Juergen Gross Date: Mon Sep 7 15:47:28 2020 +0200 xen/netback: use lateeoi irq binding In order to reduce the chance for the system becoming unresponsive due to event storms triggered by a misbehaving netfront use the lateeoi irq binding for netback and unmask the event channel only just before going to sleep waiting for new events. Make sure not to issue an EOI when none is pending by introducing an eoi_pending element to struct xenvif_queue. When no request has been consumed set the spurious flag when sending the EOI for an interrupt. This is part of XSA-332. Cc: stable@vger.kernel.org Reported-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Wei Liu commit 01263a1fabe30b4d542f34c7e2364a22587ddaf2 Author: Juergen Gross Date: Mon Sep 7 15:47:27 2020 +0200 xen/blkback: use lateeoi irq binding In order to reduce the chance for the system becoming unresponsive due to event storms triggered by a misbehaving blkfront use the lateeoi irq binding for blkback and unmask the event channel only after processing all pending requests. As the thread processing requests is used to do purging work in regular intervals an EOI may be sent only after having received an event. If there was no pending I/O request flag the EOI as spurious. This is part of XSA-332. Cc: stable@vger.kernel.org Reported-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Wei Liu commit 54c9de89895e0a36047fcc4ae754ea5b8655fb9d Author: Juergen Gross Date: Mon Sep 7 15:47:27 2020 +0200 xen/events: add a new "late EOI" evtchn framework In order to avoid tight event channel related IRQ loops add a new framework of "late EOI" handling: the IRQ the event channel is bound to will be masked until the event has been handled and the related driver is capable to handle another event. The driver is responsible for unmasking the event channel via the new function xen_irq_lateeoi(). This is similar to binding an event channel to a threaded IRQ, but without having to structure the driver accordingly. In order to support a future special handling in case a rogue guest is sending lots of unsolicited events, add a flag to xen_irq_lateeoi() which can be set by the caller to indicate the event was a spurious one. This is part of XSA-332. Cc: stable@vger.kernel.org Reported-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Stefano Stabellini Reviewed-by: Wei Liu commit f01337197419b7e8a492e83089552b77d3b5fb90 Author: Juergen Gross Date: Tue Oct 20 06:52:55 2020 +0200 xen/events: fix race in evtchn_fifo_unmask() Unmasking a fifo event channel can result in unmasking it twice, once directly in the kernel and once via a hypercall in case the event was pending. Fix that by doing the local unmask only if the event is not pending. This is part of XSA-332. Cc: stable@vger.kernel.org Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich commit 4d3fe31bd993ef504350989786858aefdb877daa Author: Juergen Gross Date: Mon Sep 7 15:47:27 2020 +0200 xen/events: add a proper barrier to 2-level uevent unmasking A follow-up patch will require certain write to happen before an event channel is unmasked. While the memory barrier is not strictly necessary for all the callers, the main one will need it. In order to avoid an extra memory barrier when using fifo event channels, mandate evtchn_unmask() to provide write ordering. The 2-level event handling unmask operation is missing an appropriate barrier, so add it. Fifo event channels are fine in this regard due to using sync_cmpxchg(). This is part of XSA-332. Cc: stable@vger.kernel.org Suggested-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Reviewed-by: Wei Liu commit 073d0552ead5bfc7a3a9c01de590e924f11b5dd2 Author: Juergen Gross Date: Mon Sep 7 15:47:27 2020 +0200 xen/events: avoid removing an event channel while handling it Today it can happen that an event channel is being removed from the system while the event handling loop is active. This can lead to a race resulting in crashes or WARN() splats when trying to access the irq_info structure related to the event channel. Fix this problem by using a rwlock taken as reader in the event handling loop and as writer when deallocating the irq_info structure. As the observed problem was a NULL dereference in evtchn_from_irq() make this function more robust against races by testing the irq_info pointer to be not NULL before dereferencing it. And finally make all accesses to evtchn_to_irq[row][col] atomic ones in order to avoid seeing partial updates of an array element in irq handling. Note that irq handling can be entered only for event channels which have been valid before, so any not populated row isn't a problem in this regard, as rows are only ever added and never removed. This is XSA-331. Cc: stable@vger.kernel.org Reported-by: Marek Marczykowski-Górecki Reported-by: Jinoh Kang Signed-off-by: Juergen Gross Reviewed-by: Stefano Stabellini Reviewed-by: Wei Liu commit 0eb3b4ab762df44f2cff982ddb8f42b3085f4e52 Author: Christoph Hellwig Date: Tue Oct 20 09:33:07 2020 +0200 ARM/sa1111: add a missing include of dma-map-ops.h Ensure the dmabounce functions are available for all Kconfig permutations. Fixes: 0a0f0d8be76d ("dma-mapping: split ") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig commit acf96fef46f271642b90aa658ba49e33ae34ddf0 Author: Steve French Date: Sat Oct 17 03:54:27 2020 -0500 smb3.1.1: do not fail if no encryption required but server doesn't support it There are cases where the server can return a cipher type of 0 and it not be an error. For example server supported no encryption types (e.g. server completely disabled encryption), or the server and client didn't support any encryption types in common (e.g. if a server only supported AES256_CCM). In those cases encryption would not be supported, but that can be ok if the client did not require encryption on mount and it should not return an error. In the case in which mount requested encryption ("seal" on mount) then checks later on during tree connection will return the proper rc, but if seal was not requested by client, since server is allowed to return 0 to indicate no supported cipher, we should not fail mount. Reported-by: Pavel Shilovsky Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French commit df6afe2f7c19349de2ee560dc62ea4d9ad3ff889 Author: Ido Schimmel Date: Fri Oct 16 20:29:14 2020 +0300 nexthop: Fix performance regression in nexthop deletion While insertion of 16k nexthops all using the same netdev ('dummy10') takes less than a second, deletion takes about 130 seconds: # time -p ip -b nexthop.batch real 0.29 user 0.01 sys 0.15 # time -p ip link set dev dummy10 down real 131.03 user 0.06 sys 0.52 This is because of repeated calls to synchronize_rcu() whenever a nexthop is removed from a nexthop group: # /usr/share/bcc/tools/offcputime -p `pgrep -nx ip` -K ... b'finish_task_switch' b'schedule' b'schedule_timeout' b'wait_for_completion' b'__wait_rcu_gp' b'synchronize_rcu.part.0' b'synchronize_rcu' b'__remove_nexthop' b'remove_nexthop' b'nexthop_flush_dev' b'nh_netdev_event' b'raw_notifier_call_chain' b'call_netdevice_notifiers_info' b'__dev_notify_flags' b'dev_change_flags' b'do_setlink' b'__rtnl_newlink' b'rtnl_newlink' b'rtnetlink_rcv_msg' b'netlink_rcv_skb' b'rtnetlink_rcv' b'netlink_unicast' b'netlink_sendmsg' b'____sys_sendmsg' b'___sys_sendmsg' b'__sys_sendmsg' b'__x64_sys_sendmsg' b'do_syscall_64' b'entry_SYSCALL_64_after_hwframe' - ip (277) 126554955 Since nexthops are always deleted under RTNL, synchronize_net() can be used instead. It will call synchronize_rcu_expedited() which only blocks for several microseconds as opposed to multiple milliseconds like synchronize_rcu(). With this patch deletion of 16k nexthops takes less than a second: # time -p ip link set dev dummy10 down real 0.12 user 0.00 sys 0.04 Tested with fib_nexthops.sh which includes torture tests that prompted the initial change: # ./fib_nexthops.sh ... Tests passed: 134 Tests failed: 0 Fixes: 90f33bffa382 ("nexthops: don't modify published nexthop groups") Signed-off-by: Ido Schimmel Reviewed-by: Jesse Brandeburg Reviewed-by: David Ahern Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20201016172914.643282-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 270315b8235e3d10c2e360cff56c2f9e0915a252 Merge: d3876ff74437c de22d2107ced3 Author: Linus Torvalds Date: Mon Oct 19 18:18:30 2020 -0700 Merge tag 'riscv-for-linus-5.10-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: "A handful of cleanups and new features: - A handful of cleanups for our page fault handling - Improvements to how we fill out cacheinfo - Support for EFI-based systems" * tag 'riscv-for-linus-5.10-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (22 commits) RISC-V: Add page table dump support for uefi RISC-V: Add EFI runtime services RISC-V: Add EFI stub support. RISC-V: Add PE/COFF header for EFI stub RISC-V: Implement late mapping page table allocation functions RISC-V: Add early ioremap support RISC-V: Move DT mapping outof fixmap RISC-V: Fix duplicate included thread_info.h riscv/mm/fault: Set FAULT_FLAG_INSTRUCTION flag in do_page_fault() riscv/mm/fault: Fix inline placement in vmalloc_fault() declaration riscv: Add cache information in AUX vector riscv: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO riscv: Set more data to cacheinfo riscv/mm/fault: Move access error check to function riscv/mm/fault: Move FAULT_FLAG_WRITE handling in do_page_fault() riscv/mm/fault: Simplify mm_fault_error() riscv/mm/fault: Move fault error handling to mm_fault_error() riscv/mm/fault: Simplify fault error handling riscv/mm/fault: Move vmalloc fault handling to vmalloc_fault() riscv/mm/fault: Move bad area handling to bad_area() ... commit d3876ff74437c5f3a1a2f8d2a45b6fb91d51ea25 Merge: bbe85027ce801 9f5fd809d7a02 Author: Linus Torvalds Date: Mon Oct 19 18:12:44 2020 -0700 Merge tag 'm68knommu-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu updates from Greg Ungerer: "A collection of fixes for 5.10: - switch to using asm-generic uaccess code - fix sparse warnings in signal code - fix compilation of ColdFire MMC support - support sysrq in ColdFire serial driver" * tag 'm68knommu-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: serial: mcf: add sysrq capability m68knommu: include SDHC support only when hardware has it m68knommu: fix sparse warnings in signal code m68knommu: switch to using asm-generic/uaccess.h commit a15a6afb3bf9388eb83a4b876d3453f305fba909 Author: Maxim Kochetkov Date: Mon Oct 19 08:06:25 2020 +0300 net: dsa: seville: the packet buffer is 2 megabits, not megabytes The VSC9953 Seville switch has 2 megabits of buffer split into 4360 words of 60 bytes each. 2048 * 1024 is 2 megabytes instead of 2 megabits. 2 megabits is (2048 / 8) * 1024 = 256 * 1024. Signed-off-by: Maxim Kochetkov Reviewed-by: Vladimir Oltean Fixes: a63ed92d217f ("net: dsa: seville: fix buffer size of the queue system") Link: https://lore.kernel.org/r/20201019050625.21533-1-fido_max@inbox.ru Signed-off-by: Jakub Kicinski commit 26ebd6fed9bb3aa480c7c0f147ac0e7b11000f65 Author: Po-Hsu Lin Date: Mon Oct 19 11:09:28 2020 +0800 selftests: rtnetlink: load fou module for kci_test_encap_fou() test The kci_test_encap_fou() test from kci_test_encap() in rtnetlink.sh needs the fou module to work. Otherwise it will fail with: $ ip netns exec "$testns" ip fou add port 7777 ipproto 47 RTNETLINK answers: No such file or directory Error talking to the kernel Add the CONFIG_NET_FOU into the config file as well. Which needs at least to be set as a loadable module. Fixes: 6227efc1a20b ("selftests: rtnetlink.sh: add vxlan and fou test cases") Signed-off-by: Po-Hsu Lin Link: https://lore.kernel.org/r/20201019030928.9859-1-po-hsu.lin@canonical.com Signed-off-by: Jakub Kicinski commit bc7e343dbd4c1a86c490c1d4f08fca9ecdedbeaa Author: Christian Eggers Date: Fri Oct 16 19:16:03 2020 +0200 net: dsa: tag_ksz: KSZ8795 and KSZ9477 also use tail tags The Marvell 88E6060 uses tag_trailer.c and the KSZ8795, KSZ9477 and KSZ9893 switches also use tail tags. Fixes: 7a6ffe764be3 ("net: dsa: point out the tail taggers") Signed-off-by: Christian Eggers Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20201016171603.10587-1-ceggers@arri.de Signed-off-by: Jakub Kicinski commit 3bd57b90554b4bb82dce638e0668ef9dc95d3e96 Author: Valentin Vidic Date: Sun Oct 18 20:42:55 2020 +0200 net: korina: cast KSEG0 address to pointer in kfree Fixes gcc warning: passing argument 1 of 'kfree' makes pointer from integer without a cast Fixes: 3af5f0f5c74e ("net: korina: fix kfree of rx/tx descriptor array") Reported-by: kernel test robot Signed-off-by: Valentin Vidic Link: https://lore.kernel.org/r/20201018184255.28989-1-vvidic@valentin-vidic.from.hr Signed-off-by: Jakub Kicinski commit 424a646e072a887aa87283b53aa6f8b19c2a7bef Author: Heiner Kallweit Date: Sun Oct 18 18:38:59 2020 +0200 r8169: fix operation under forced interrupt threading For several network drivers it was reported that using __napi_schedule_irqoff() is unsafe with forced threading. One way to fix this is switching back to __napi_schedule, but then we lose the benefit of the irqoff version in general. As stated by Eric it doesn't make sense to make the minimal hard irq handlers in drivers using NAPI a thread. Therefore ensure that the hard irq handler is never thread-ified. Fixes: 9a899a35b0d6 ("r8169: switch to napi_schedule_irqoff") Link: https://lkml.org/lkml/2020/10/18/19 Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/4d3ef84a-c812-5072-918a-22a6f6468310@gmail.com Signed-off-by: Jakub Kicinski commit 8568c3cefd5143fa0dc09f90e1bc9dc8905292f4 Author: Martin KaFai Lau Date: Mon Oct 19 12:42:25 2020 -0700 bpf: selftest: Ensure the return value of the bpf_per_cpu_ptr() must be checked This patch tests all pointers returned by bpf_per_cpu_ptr() must be tested for NULL first before it can be accessed. This patch adds a subtest "null_check", so it moves the ".data..percpu" existence check to the very beginning and before doing any subtest. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201019194225.1051596-1-kafai@fb.com commit e710bcc6d92c47bb7d8e803b41ef529c09ad6a9e Author: Martin KaFai Lau Date: Mon Oct 19 12:42:19 2020 -0700 bpf: selftest: Ensure the return value of bpf_skc_to helpers must be checked This patch tests: int bpf_cls(struct __sk_buff *skb) { /* REG_6: sk * REG_7: tp * REG_8: req_sk */ sk = skb->sk; if (!sk) return 0; tp = bpf_skc_to_tcp_sock(sk); req_sk = bpf_skc_to_tcp_request_sock(sk); if (!req_sk) return 0; /* !tp has not been tested, so verifier should reject. */ return *(__u8 *)tp; } Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201019194219.1051314-1-kafai@fb.com commit 93c230e3f5bd6e1d2b2759d582fdfe9c2731473b Author: Martin KaFai Lau Date: Mon Oct 19 12:42:12 2020 -0700 bpf: Enforce id generation for all may-be-null register type The commit af7ec1383361 ("bpf: Add bpf_skc_to_tcp6_sock() helper") introduces RET_PTR_TO_BTF_ID_OR_NULL and the commit eaa6bcb71ef6 ("bpf: Introduce bpf_per_cpu_ptr()") introduces RET_PTR_TO_MEM_OR_BTF_ID_OR_NULL. Note that for RET_PTR_TO_MEM_OR_BTF_ID_OR_NULL, the reg0->type could become PTR_TO_MEM_OR_NULL which is not covered by BPF_PROBE_MEM. The BPF_REG_0 will then hold a _OR_NULL pointer type. This _OR_NULL pointer type requires the bpf program to explicitly do a NULL check first. After NULL check, the verifier will mark all registers having the same reg->id as safe to use. However, the reg->id is not set for those new _OR_NULL return types. One of the ways that may be wrong is, checking NULL for one btf_id typed pointer will end up validating all other btf_id typed pointers because all of them have id == 0. The later tests will exercise this path. To fix it and also avoid similar issue in the future, this patch moves the id generation logic out of each individual RET type test in check_helper_call(). Instead, it does one reg_type_may_be_null() test and then do the id generation if needed. This patch also adds a WARN_ON_ONCE in mark_ptr_or_null_reg() to catch future breakage. The _OR_NULL pointer usage in the bpf_iter_reg.ctx_arg_info is fine because it just happens that the existing id generation after check_ctx_access() has covered it. It is also using the reg_type_may_be_null() to decide if id generation is needed or not. Fixes: af7ec1383361 ("bpf: Add bpf_skc_to_tcp6_sock() helper") Fixes: eaa6bcb71ef6 ("bpf: Introduce bpf_per_cpu_ptr()") Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201019194212.1050855-1-kafai@fb.com commit bbe85027ce8019c73ab99ad1c2603e2dcd1afa49 Merge: 694565356c2e0 894645546bb12 Author: Linus Torvalds Date: Mon Oct 19 14:38:46 2020 -0700 Merge tag 'xfs-5.10-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull more xfs updates from Darrick Wong: "The second large pile of new stuff for 5.10, with changes even more monumental than last week! We are formally announcing the deprecation of the V4 filesystem format in 2030. All users must upgrade to the V5 format, which contains design improvements that greatly strengthen metadata validation, supports reflink and online fsck, and is the intended vehicle for handling timestamps past 2038. We're also deprecating the old Irix behavioral tweaks in September 2025. Coming along for the ride are two design changes to the deferred metadata ops subsystem. One of the improvements is to retain correct logical ordering of tasks and subtasks, which is a more logical design for upper layers of XFS and will become necessary when we add atomic file range swaps and commits. The second improvement to deferred ops improves the scalability of the log by helping the log tail to move forward during long-running operations. This reduces log contention when there are a large number of threads trying to run transactions. In addition to that, this fixes numerous small bugs in log recovery; refactors logical intent log item recovery to remove the last remaining place in XFS where we could have nested transactions; fixes a couple of ways that intent log item recovery could fail in ways that wouldn't have happened in the regular commit paths; fixes a deadlock vector in the GETFSMAP implementation (which improves its performance by 20%); and fixes serious bugs in the realtime growfs, fallocate, and bitmap handling code. Summary: - Deprecate the V4 filesystem format, some disused mount options, and some legacy sysctl knobs now that we can support dates into the 25th century. Note that removal of V4 support will not happen until the early 2030s. - Fix some probles with inode realtime flag propagation. - Fix some buffer handling issues when growing a rt filesystem. - Fix a problem where a BMAP_REMAP unmap call would free rt extents even though the purpose of BMAP_REMAP is to avoid freeing the blocks. - Strengthen the dabtree online scrubber to check hash values on child dabtree blocks. - Actually log new intent items created as part of recovering log intent items. - Fix a bug where quotas weren't attached to an inode undergoing bmap intent item recovery. - Fix a buffer overrun problem with specially crafted log buffer headers. - Various cleanups to type usage and slightly inaccurate comments. - More cleanups to the xattr, log, and quota code. - Don't run the (slower) shared-rmap operations on attr fork mappings. - Fix a bug where we failed to check the LSN of finobt blocks during replay and could therefore overwrite newer data with older data. - Clean up the ugly nested transaction mess that log recovery uses to stage intent item recovery in the correct order by creating a proper data structure to capture recovered chains. - Use the capture structure to resume intent item chains with the same log space and block reservations as when they were captured. - Fix a UAF bug in bmap intent item recovery where we failed to maintain our reference to the incore inode if the bmap operation needed to relog itself to continue. - Rearrange the defer ops mechanism to finish newly created subtasks of a parent task before moving on to the next parent task. - Automatically relog intent items in deferred ops chains if doing so would help us avoid pinning the log tail. This will help fix some log scaling problems now and will facilitate atomic file updates later. - Fix a deadlock in the GETFSMAP implementation by using an internal memory buffer to reduce indirect calls and copies to userspace, thereby improving its performance by ~20%. - Fix various problems when calling growfs on a realtime volume would not fully update the filesystem metadata. - Fix broken Kconfig asking about deprecated XFS when XFS is disabled" * tag 'xfs-5.10-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (48 commits) xfs: fix Kconfig asking about XFS_SUPPORT_V4 when XFS_FS=n xfs: fix high key handling in the rt allocator's query_range function xfs: annotate grabbing the realtime bitmap/summary locks in growfs xfs: make xfs_growfs_rt update secondary superblocks xfs: fix realtime bitmap/summary file truncation when growing rt volume xfs: fix the indent in xfs_trans_mod_dquot xfs: do the ASSERT for the arguments O_{u,g,p}dqpp xfs: fix deadlock and streamline xfs_getfsmap performance xfs: limit entries returned when counting fsmap records xfs: only relog deferred intent items if free space in the log gets low xfs: expose the log push threshold xfs: periodically relog deferred intent items xfs: change the order in which child and parent defer ops are finished xfs: fix an incore inode UAF in xfs_bui_recover xfs: clean up xfs_bui_item_recover iget/trans_alloc/ilock ordering xfs: clean up bmap intent item recovery checking xfs: xfs_defer_capture should absorb remaining transaction reservation xfs: xfs_defer_capture should absorb remaining block reservations xfs: proper replay of deferred ops queued during log recovery xfs: remove XFS_LI_RECOVERED ... commit 694565356c2e06224d94774a42709cc8dfab49ee Merge: 922a763ae1789 42d3e2d041f08 Author: Linus Torvalds Date: Mon Oct 19 14:28:30 2020 -0700 Merge tag 'fuse-update-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: - Support directly accessing host page cache from virtiofs. This can improve I/O performance for various workloads, as well as reducing the memory requirement by eliminating double caching. Thanks to Vivek Goyal for doing most of the work on this. - Allow automatic submounting inside virtiofs. This allows unique st_dev/ st_ino values to be assigned inside the guest to files residing on different filesystems on the host. Thanks to Max Reitz for the patches. - Fix an old use after free bug found by Pradeep P V K. * tag 'fuse-update-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: (25 commits) virtiofs: calculate number of scatter-gather elements accurately fuse: connection remove fix fuse: implement crossmounts fuse: Allow fuse_fill_super_common() for submounts fuse: split fuse_mount off of fuse_conn fuse: drop fuse_conn parameter where possible fuse: store fuse_conn in fuse_req fuse: add submount support to fuse: fix page dereference after free virtiofs: add logic to free up a memory range virtiofs: maintain a list of busy elements virtiofs: serialize truncate/punch_hole and dax fault path virtiofs: define dax address space operations virtiofs: add DAX mmap support virtiofs: implement dax read/write operations virtiofs: introduce setupmapping/removemapping commands virtiofs: implement FUSE_INIT map_alignment field virtiofs: keep a list of free dax memory ranges virtiofs: add a mount option to enable dax virtiofs: set up virtio_fs dax_device ... commit d1781f23704707d350b8c9006e2bdf5394bf91b2 Author: Michael Neuling Date: Tue Oct 13 15:37:41 2020 +1100 selftests/powerpc: Make alignment handler test P9N DD2.1 vector CI load workaround alignment_handler currently only tests the unaligned cases but it can also be useful for testing the workaround for the P9N DD2.1 vector CI load issue fixed by p9_hmi_special_emu(). This workaround was introduced in 5080332c2c89 ("powerpc/64s: Add workaround for P9 vector CI load issue"). This changes the loop to start from offset 0 rather than 1 so that we test the kernel emulation in p9_hmi_special_emu(). Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201013043741.743413-2-mikey@neuling.org commit 1da4a0272c5469169f78cd76cf175ff984f52f06 Author: Michael Neuling Date: Tue Oct 13 15:37:40 2020 +1100 powerpc: Fix undetected data corruption with P9N DD2.1 VSX CI load emulation __get_user_atomic_128_aligned() stores to kaddr using stvx which is a VMX store instruction, hence kaddr must be 16 byte aligned otherwise the store won't occur as expected. Unfortunately when we call __get_user_atomic_128_aligned() in p9_hmi_special_emu(), the buffer we pass as kaddr (ie. vbuf) isn't guaranteed to be 16B aligned. This means that the write to vbuf in __get_user_atomic_128_aligned() has the bottom bits of the address truncated. This results in other local variables being overwritten. Also vbuf will not contain the correct data which results in the userspace emulation being wrong and hence undetected user data corruption. In the past we've been mostly lucky as vbuf has ended up aligned but this is fragile and isn't always true. CONFIG_STACKPROTECTOR in particular can change the stack arrangement enough that our luck runs out. This issue only occurs on POWER9 Nimbus <= DD2.1 bare metal. The fix is to align vbuf to a 16 byte boundary. Fixes: 5080332c2c89 ("powerpc/64s: Add workaround for P9 vector CI load issue") Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201013043741.743413-1-mikey@neuling.org commit 922a763ae178901c2393424ba42b0aa1be22bf06 Merge: 7cf726a594353 48bfd5c6fac10 Author: Linus Torvalds Date: Mon Oct 19 13:52:01 2020 -0700 Merge tag 'zonefs-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs updates from Damien Le Moal: "Add an 'explicit-open' mount option to automatically issue a REQ_OP_ZONE_OPEN command to the device whenever a sequential zone file is open for writing for the first time. This avoids 'insufficient zone resources' errors for write operations on some drives with limited zone resources or on ZNS drives with a limited number of active zones. From Johannes" * tag 'zonefs-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: document the explicit-open mount option zonefs: open/close zone on file open/close zonefs: provide no-lock zonefs_io_error variant zonefs: introduce helper for zone management commit 35331b506f6c67a0b4042fac1ae2785cef9ac8c3 Author: Alexandre Belloni Date: Thu Oct 15 21:11:35 2020 +0200 rtc: r9701: set range Set range and remove the set_time check. This is a classic BCD RTC. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201015191135.471249-6-alexandre.belloni@bootlin.com commit dfe13cf2ae5a7cdb131e61a8aae4fb27cd379bd4 Author: Alexandre Belloni Date: Thu Oct 15 21:11:34 2020 +0200 rtc: r9701: convert to devm_rtc_allocate_device This allows further improvement of the driver. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201015191135.471249-5-alexandre.belloni@bootlin.com commit 8b34134907e7d70b8b51fa56ecd4f8c50c46692c Author: Alexandre Belloni Date: Thu Oct 15 21:11:33 2020 +0200 rtc: r9701: stop setting RWKCNT tm_wday is never checked for validity and it is not read back in r9701_get_datetime. Avoid setting it to stop tripping static checkers: drivers/rtc/rtc-r9701.c:109 r9701_set_datetime() error: undefined (user controlled) shift '1 << dt->tm_wday' Reported-by: Dan Carpenter Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201015191135.471249-4-alexandre.belloni@bootlin.com commit 2a8f3380c9e50a36b99a92febfd78f7c7afd29b0 Author: Alexandre Belloni Date: Thu Oct 15 21:11:32 2020 +0200 rtc: r9701: remove useless memset The RTC core already sets to zero the struct rtc_tie it passes to the driver, avoid doing it a second time. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201015191135.471249-3-alexandre.belloni@bootlin.com commit 7390bec4ed5d510d1a637257ff75e9ab49030411 Author: Alexandre Belloni Date: Thu Oct 15 21:11:31 2020 +0200 rtc: r9701: stop setting a default time It doesn't make sense to set the RTC to a default value at probe time. Let the core handle invalid date and time. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201015191135.471249-2-alexandre.belloni@bootlin.com commit 92c6dcfbd1eb803d4669c82b3d8a0fcbb803e3f9 Author: Alexandre Belloni Date: Thu Oct 15 21:11:30 2020 +0200 rtc: r9701: remove leftover comment Commit 22652ba72453 ("rtc: stop validating rtc_time in .read_time") removed the code but not the associated comment. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201015191135.471249-1-alexandre.belloni@bootlin.com commit 2eeaa532accab8810ca9fe21f52d149713561235 Author: Alexandre Belloni Date: Tue Oct 13 16:41:10 2020 +0200 rtc: rv3032: Add a driver for Microcrystal RV-3032 New driver for the Microcrystal RV-3032, including support for: - Date/time - Alarms - Low voltage detection - Trickle charge - Trimming - Clkout - RAM - EEPROM - Temperature sensor Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201013144110.1942218-3-alexandre.belloni@bootlin.com commit 5ebe59a50593b1978f16a9bf4a7a887dc7a82b7b Author: Alexandre Belloni Date: Tue Oct 13 16:41:09 2020 +0200 dt-bindings: rtc: rv3032: add RV-3032 bindings Document the Microcrystal RV-3032 device tree bindings Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201013144110.1942218-2-alexandre.belloni@bootlin.com commit 61ee0674bcfd80eaa0173215d38839a48b08b56b Author: Alexandre Belloni Date: Tue Oct 13 16:41:08 2020 +0200 dt-bindings: rtc: add trickle-voltage-millivolt Some RTCs have a trickle charge that is able to output different voltages depending on the type of the connected auxiliary power (battery, supercap, ...). Add a property allowing to specify the necessary voltage. Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201013144110.1942218-1-alexandre.belloni@bootlin.com commit 0bd294b55a5de442370c29fa53bab17aef3ff318 Author: Shyam Prasad N Date: Thu Oct 15 10:41:31 2020 -0700 cifs: Return the error from crypt_message when enc/dec key not found. In crypt_message, when smb2_get_enc_key returns error, we need to return the error back to the caller. If not, we end up processing the message further, causing a kernel oops due to unwarranted access of memory. Call Trace: smb3_receive_transform+0x120/0x870 [cifs] cifs_demultiplex_thread+0xb53/0xc20 [cifs] ? cifs_handle_standard+0x190/0x190 [cifs] kthread+0x116/0x130 ? kthread_park+0x80/0x80 ret_from_fork+0x1f/0x30 Signed-off-by: Shyam Prasad N Reviewed-by: Pavel Shilovsky Reviewed-by: Ronnie Sahlberg CC: Stable Signed-off-by: Steve French commit 63ca5656350a9b798a20a8e5bd55be164a5abeb6 Author: Steve French Date: Thu Oct 15 23:41:40 2020 -0500 smb3.1.1: set gcm256 when requested update smb encryption code to set 32 byte key length and to set gcm256 when requested on mount. Signed-off-by: Steve French commit fd08f2dbf0c2e95f8503e2c79339fe5711f1aa1d Author: Steve French Date: Thu Oct 15 00:25:02 2020 -0500 smb3.1.1: rename nonces used for GCM and CCM encryption Now that 256 bit encryption can be negotiated, update names of the nonces to match the updated official protocol documentation (e.g. AES_GCM_NONCE instead of AES_128GCM_NONCE) since they apply to both 128 bit and 256 bit encryption. Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky commit 511ac89e591ab9affce17a8be4c45f6c2bb837f0 Author: Steve French Date: Thu Oct 15 00:14:47 2020 -0500 smb3.1.1: print warning if server does not support requested encryption type If server does not support AES-256-GCM and it was required on mount, print warning message. Also log and return a different error message (EOPNOTSUPP) when encryption mechanism is not supported vs the case when an unknown unrequested encryption mechanism could be returned (EINVAL). Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky commit 900fad45dc75c8af6015bc514cc11aa3d265426a Author: Pavel Begunkov Date: Mon Oct 19 16:39:16 2020 +0100 io_uring: fix racy REQ_F_LINK_TIMEOUT clearing io_link_timeout_fn() removes REQ_F_LINK_TIMEOUT from the link head's flags, it's not atomic and may race with what the head is doing. If io_link_timeout_fn() doesn't clear the flag, as forced by this patch, then it may happen that for "req -> link_timeout1 -> link_timeout2", __io_kill_linked_timeout() would find link_timeout2 and try to cancel it, so miscounting references. Teach it to ignore such double timeouts by marking the active one with a new flag in io_prep_linked_timeout(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 4d52f338992bfc9f494e5a7eb55f4249ab11cd66 Author: Pavel Begunkov Date: Sun Oct 18 10:17:43 2020 +0100 io_uring: do poll's hash_node init in common code Move INIT_HLIST_NODE(&req->hash_node) into __io_arm_poll_handler(), so that it doesn't duplicated and common poll code would be responsible for it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit dd221f46f68ad9df2c1daf7a7626c75fa9bd0bf0 Author: Pavel Begunkov Date: Sun Oct 18 10:17:42 2020 +0100 io_uring: inline io_poll_task_handler() io_poll_task_handler() doesn't add clarity, inline it in its only user. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 069b89384d77c8972a8aa12588e74507714159d4 Author: Pavel Begunkov Date: Sun Oct 18 10:17:41 2020 +0100 io_uring: remove extra ->file check in poll prep io_poll_add_prep() doesn't need to verify ->file because it's already done in io_init_req(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2c3bac6dd6c7af4cb38d1a67cafd29e96ba1fea7 Author: Pavel Begunkov Date: Sun Oct 18 10:17:40 2020 +0100 io_uring: make cached_cq_overflow non atomic_t ctx->cached_cq_overflow is changed only under completion_lock. Convert it from atomic_t to just int, and mark all places when it's read without lock with READ_ONCE, which guarantees atomicity (relaxed ordering). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit d148ca4b07d05656f3b25b662f2283c4d98e7299 Author: Pavel Begunkov Date: Sun Oct 18 10:17:39 2020 +0100 io_uring: inline io_fail_links() Inline io_fail_links() and kill extra io_cqring_ev_posted(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ec99ca6c4747bc7b024b35e0326694fe4f8ad140 Author: Pavel Begunkov Date: Sun Oct 18 10:17:38 2020 +0100 io_uring: kill ref get/drop in personality init Don't take an identity on personality/creds init only to drop it a few lines after. Extract a function which prepares req->work but leaves it without identity. Note: it's safe to not check REQ_F_WORK_INITIALIZED there because it's nobody had a chance to init it before io_init_req(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2e5aa6cb4d159f1785eee50e4bcc7e9ffd4e4690 Author: Pavel Begunkov Date: Sun Oct 18 10:17:37 2020 +0100 io_uring: flags-based creds init in queue Use IO_WQ_WORK_CREDS to figure out if req has creds to be used. Since recently it should rely only on flags, but not value of work.creds. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 76702a2e7280594a0add4c1283623c81a868373f Author: Tom Rix Date: Mon Oct 19 10:38:46 2020 -0700 bpf: Remove unneeded break A break is not needed if it is preceded by a return. Signed-off-by: Tom Rix Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201019173846.1021-1-trix@redhat.com commit 4a9bb58aba6db4eba2a8b3aa1edc415c94a669a8 Author: Chris Wilson Date: Tue Sep 15 14:49:21 2020 +0100 drm/i915/gt: Wait for CSB entries on Tigerlake On Tigerlake, we are seeing a repeat of commit d8f505311717 ("drm/i915/icl: Forcibly evict stale csb entries") where, presumably, due to a missing Global Observation Point synchronisation, the write pointer of the CSB ringbuffer is updated _prior_ to the contents of the ringbuffer. That is we see the GPU report more context-switch entries for us to parse, but those entries have not been written, leading us to process stale events, and eventually report a hung GPU. However, this effect appears to be much more severe than we previously saw on Icelake (though it might be best if we try the same approach there as well and measure), and Bruce suggested the good idea of resetting the CSB entry after use so that we can detect when it has been updated by the GPU. By instrumenting how long that may be, we can set a reliable upper bound for how long we should wait for: 513 late, avg of 61 retries (590 ns), max of 1061 retries (10099 ns) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2045 References: d8f505311717 ("drm/i915/icl: Forcibly evict stale csb entries") References: HSDES#22011327657, HSDES#1508287568 Suggested-by: Bruce Chang Signed-off-by: Chris Wilson Cc: Bruce Chang Cc: Mika Kuoppala Cc: stable@vger.kernel.org # v5.4 Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200915134923.30088-2-chris@chris-wilson.co.uk (cherry picked from commit 233c1ae3c83f21046c6c4083da904163ece8f110) Signed-off-by: Rodrigo Vivi commit ca05277e40216979d9976613322e64db23a850e0 Author: Chris Wilson Date: Tue Sep 15 14:49:20 2020 +0100 drm/i915/gt: Widen CSB pointer to u64 for the parsers A CSB entry is 64b, and it is simpler for us to treat it as an array of 64b entries than as an array of pairs of 32b entries. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200915134923.30088-1-chris@chris-wilson.co.uk (cherry picked from commit f24a44e52fbc9881fc5f3bcef536831a15a439f3) (cherry picked from commit 3d4dbe0e0f0d04ebcea917b7279586817da8cf46) Signed-off-by: Rodrigo Vivi commit b17a45b6e53f6613118b2e5cfc4a992cc50deb2c Author: Arvind Sankar Date: Fri Oct 16 16:04:01 2020 -0400 x86/boot/64: Explicitly map boot_params and command line Commits ca0e22d4f011 ("x86/boot/compressed/64: Always switch to own page table") 8570978ea030 ("x86/boot/compressed/64: Don't pre-map memory in KASLR code") set up a new page table in the decompressor stub, but without explicit mappings for boot_params and the kernel command line, relying on the #PF handler instead. This is fragile, as boot_params and the command line mappings are required for the main kernel. If EARLY_PRINTK and RANDOMIZE_BASE are disabled, a QEMU/OVMF boot never accesses the command line in the decompressor stub, and so it never gets mapped. The main kernel accesses it from the identity mapping if AMD_MEM_ENCRYPT is enabled, and will crash. Fix this by adding back the explicit mapping of boot_params and the command line. Note: the changes also removed the explicit mapping of the main kernel, with the result that .bss and .brk may not be in the identity mapping, but those don't get accessed by the main kernel before it switches to its own page tables. [ bp: Pass boot_params with a MOV %rsp... instead of PUSH/POP. Use block formatting for the comment. ] Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Reviewed-by: Joerg Roedel Link: https://lkml.kernel.org/r/20201016200404.1615994-1-nivedita@alum.mit.edu commit f3d301c1f2f5676465cdf3259737ea19cc82731f Author: Al Grant Date: Mon Sep 21 21:46:37 2020 +0100 perf: correct SNOOPX field offset perf_event.h has macros that define the field offsets in the data_src bitmask in perf records. The SNOOPX and REMOTE offsets were both 37. These are distinct fields, and the bitfield layout in perf_mem_data_src confirms that SNOOPX should be at offset 38. Fixes: 52839e653b5629bd ("perf tools: Add support for printing new mem_info encodings") Signed-off-by: Al Grant Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/4ac9f5cc-4388-b34a-9999-418a4099415d@foss.arm.com commit db9bc2d35f49fed248296d3216597b078c0bab37 Author: Chris Wilson Date: Fri Oct 16 10:25:27 2020 +0100 drm/i915: Use the active reference on the vma while capturing During error capture, we need to take a reference to the vma from before the reset in order to catpure the contents of the vma later. Currently we are using both an active reference and a kref, but due to nature of the i915_vma reference handling, that kref is on the vma->obj and not the vma itself. This means the vma may be destroyed as soon as it is idle, that is in between the i915_active_release(&vma->active) and the i915_vma_put(vma): <3> [197.866181] BUG: KASAN: use-after-free in intel_engine_coredump_add_vma+0x36c/0x4a0 [i915] <3> [197.866339] Read of size 8 at addr ffff8881258cb800 by task gem_exec_captur/1041 <3> [197.866467] <4> [197.866512] CPU: 2 PID: 1041 Comm: gem_exec_captur Not tainted 5.9.0-g5e4234f97efba-kasan_200+ #1 <4> [197.866521] Hardware name: Intel Corp. Broxton P/Apollolake RVP1A, BIOS APLKRVPA.X64.0150.B11.1608081044 08/08/2016 <4> [197.866530] Call Trace: <4> [197.866549] dump_stack+0x99/0xd0 <4> [197.866760] ? intel_engine_coredump_add_vma+0x36c/0x4a0 [i915] <4> [197.866783] print_address_description.constprop.8+0x3e/0x60 <4> [197.866797] ? kmsg_dump_rewind_nolock+0xd4/0xd4 <4> [197.866819] ? lockdep_hardirqs_off+0xd4/0x120 <4> [197.867037] ? intel_engine_coredump_add_vma+0x36c/0x4a0 [i915] <4> [197.867249] ? intel_engine_coredump_add_vma+0x36c/0x4a0 [i915] <4> [197.867270] kasan_report.cold.10+0x1f/0x37 <4> [197.867492] ? intel_engine_coredump_add_vma+0x36c/0x4a0 [i915] <4> [197.867710] intel_engine_coredump_add_vma+0x36c/0x4a0 [i915] <4> [197.867949] i915_gpu_coredump.part.29+0x150/0x7b0 [i915] <4> [197.868186] i915_capture_error_state+0x5e/0xc0 [i915] <4> [197.868396] intel_gt_handle_error+0x6eb/0xa20 [i915] <4> [197.868624] ? intel_gt_reset_global+0x370/0x370 [i915] <4> [197.868644] ? check_flags+0x50/0x50 <4> [197.868662] ? __lock_acquire+0xd59/0x6b00 <4> [197.868678] ? register_lock_class+0x1ad0/0x1ad0 <4> [197.868944] i915_wedged_set+0xcf/0x1b0 [i915] <4> [197.869147] ? i915_wedged_get+0x90/0x90 [i915] <4> [197.869371] ? i915_wedged_get+0x90/0x90 [i915] <4> [197.869398] simple_attr_write+0x153/0x1c0 <4> [197.869428] full_proxy_write+0xee/0x180 <4> [197.869442] ? __sb_start_write+0x1f3/0x310 <4> [197.869465] vfs_write+0x1a3/0x640 <4> [197.869492] ksys_write+0xec/0x1c0 <4> [197.869507] ? __ia32_sys_read+0xa0/0xa0 <4> [197.869525] ? lockdep_hardirqs_on_prepare+0x32b/0x4e0 <4> [197.869541] ? syscall_enter_from_user_mode+0x1c/0x50 <4> [197.869566] do_syscall_64+0x33/0x80 <4> [197.869579] entry_SYSCALL_64_after_hwframe+0x44/0xa9 <4> [197.869590] RIP: 0033:0x7fd8b7aee281 <4> [197.869604] Code: c3 0f 1f 84 00 00 00 00 00 48 8b 05 59 8d 20 00 c3 0f 1f 84 00 00 00 00 00 8b 05 8a d1 20 00 85 c0 75 16 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 57 f3 c3 0f 1f 44 00 00 41 54 55 49 89 d4 53 <4> [197.869613] RSP: 002b:00007ffea3b72008 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 <4> [197.869625] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd8b7aee281 <4> [197.869633] RDX: 0000000000000002 RSI: 00007fd8b81a82e7 RDI: 000000000000000d <4> [197.869641] RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000034 <4> [197.869650] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fd8b81a82e7 <4> [197.869658] R13: 000000000000000d R14: 0000000000000000 R15: 0000000000000000 <3> [197.869707] <3> [197.869757] Allocated by task 1041: <4> [197.869833] kasan_save_stack+0x19/0x40 <4> [197.869843] __kasan_kmalloc.constprop.5+0xc1/0xd0 <4> [197.869853] kmem_cache_alloc+0x106/0x8e0 <4> [197.870059] i915_vma_instance+0x212/0x1930 [i915] <4> [197.870270] eb_lookup_vmas+0xe06/0x1d10 [i915] <4> [197.870475] i915_gem_do_execbuffer+0x131d/0x4080 [i915] <4> [197.870682] i915_gem_execbuffer2_ioctl+0x103/0x5d0 [i915] <4> [197.870701] drm_ioctl_kernel+0x1d2/0x270 <4> [197.870710] drm_ioctl+0x40d/0x85c <4> [197.870721] __x64_sys_ioctl+0x10d/0x170 <4> [197.870731] do_syscall_64+0x33/0x80 <4> [197.870740] entry_SYSCALL_64_after_hwframe+0x44/0xa9 <3> [197.870748] <3> [197.870798] Freed by task 22: <4> [197.870865] kasan_save_stack+0x19/0x40 <4> [197.870875] kasan_set_track+0x1c/0x30 <4> [197.870884] kasan_set_free_info+0x1b/0x30 <4> [197.870894] __kasan_slab_free+0x111/0x160 <4> [197.870903] kmem_cache_free+0xcd/0x710 <4> [197.871109] i915_vma_parked+0x618/0x800 [i915] <4> [197.871307] __gt_park+0xdb/0x1e0 [i915] <4> [197.871501] ____intel_wakeref_put_last+0xb1/0x190 [i915] <4> [197.871516] process_one_work+0x8dc/0x15d0 <4> [197.871525] worker_thread+0x82/0xb30 <4> [197.871535] kthread+0x36d/0x440 <4> [197.871545] ret_from_fork+0x22/0x30 <3> [197.871553] <3> [197.871602] The buggy address belongs to the object at ffff8881258cb740 which belongs to the cache i915_vma of size 968 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2553 Fixes: 2850748ef876 ("drm/i915: Pull i915_vma_pin under the vm->mutex") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: # v5.5+ Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20201016092527.29039-1-chris@chris-wilson.co.uk (cherry picked from commit 178536b8292ecd118f59d2fac4509c7e70b99854) Signed-off-by: Rodrigo Vivi commit 64402570e12f7b63ab33fc4640d3709c9ce2b380 Author: Chris Wilson Date: Fri Oct 2 09:34:25 2020 +0100 drm/i915/gt: Undo forced context restores after trivial preemptions We may try to preempt the currently executing request, only to find that after unravelling all the dependencies that the original executing context is still the earliest in the topological sort and re-submitted back to HW (if we do detect some change in the ELSP that requires re-submission). However, due to the way we check for wrap-around during the unravelling, we mark any context that has been submitted just once (i.e. with the rq->wa_tail set, but the ring->tail earlier) as potentially wrapping and requiring a forced restore on resubmission. This was expected to be not a problem, as it was anticipated that most unwinding for preemption would result in a context switch and the few that did not would be lost in the noise. It did not take long for someone to find one particular workload where the cost of those extra context restores was measurable. However, since we know the wa_tail is of fixed size, and we know that a request must be larger than the wa_tail itself, we can safely maintain the check for request wrapping and check against a slightly future point in the ring that includes an expected wa_tail. (That is if the ring->tail is already set to rq->wa_tail, including another 8 bytes in the check does not invalidate the incremental wrap detection.) Fixes: 8ab3a3812aa9 ("drm/i915/gt: Incrementally check for rewinding") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Bruce Chang Cc: Ramalingam C Cc: Joonas Lahtinen Cc: # v5.4+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201002083425.4605-1-chris@chris-wilson.co.uk (cherry picked from commit bb65548e3c6e299175a9e8c3e24b2b9577656a5d) Signed-off-by: Rodrigo Vivi commit 9b99e5ba3e5d68039bd6b657e4bbe520a3521f4c Author: Chris Wilson Date: Thu Oct 15 20:50:23 2020 +0100 drm/i915/gt: Delay execlist processing for tgl When running gem_exec_nop, it floods the system with many requests (with the goal of userspace submitting faster than the HW can process a single empty batch). This causes the driver to continually resubmit new requests onto the end of an active context, a flood of lite-restore preemptions. If we time this just right, Tigerlake hangs. Inserting a small delay between the processing of CS events and submitting the next context, prevents the hang. Naturally it does not occur with debugging enabled. The suspicion then is that this is related to the issues with the CS event buffer, and inserting an mmio read of the CS pointer status appears to be very successful in preventing the hang. Other registers, or uncached reads, or plain mb, do not prevent the hang, suggesting that register is key -- but that the hang can be prevented by a simple udelay, suggests it is just a timing issue like that encountered by commit 233c1ae3c83f ("drm/i915/gt: Wait for CSB entries on Tigerlake"). Also note that the hang is not prevented by applying CTX_DESC_FORCE_RESTORE, or by inserting a delay on the GPU between requests. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Bruce Chang Cc: Joonas Lahtinen Cc: stable@vger.kernel.org Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20201015195023.32346-1-chris@chris-wilson.co.uk (cherry picked from commit 6ca7217dffaf1abba91558e67a2efb655ac91405) Signed-off-by: Rodrigo Vivi commit d5e8782129c22036425f29f9b6a254895482d7bd Author: Chris Wilson Date: Thu Oct 15 12:59:54 2020 +0100 drm/i915/gem: Support parsing of oversize batches Matthew Auld noted that on more recent systems (such as the parser for gen9) we may have objects that are larger than expected by the GEM uAPI (i.e. greater than u32). These objects would have incorrect implicit batch lengths, causing the parser to reject them for being incomplete, or worse. Based on a patch by Matthew Auld. Reported-by: Matthew Auld Fixes: 435e8fc059db ("drm/i915: Allow parsing of unsized batches") Testcase: igt/gem_exec_params/larger-than-life-batch Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Mika Kuoppala Cc: Jon Bloomfield Reviewed-by: Matthew Auld Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20201015115954.871-1-chris@chris-wilson.co.uk (cherry picked from commit 57b2d834bf235daab388c3ba12d035c820ae09c6) Signed-off-by: Rodrigo Vivi commit 1664ffee760a5d98952318fdd9b198fae396d660 Author: Ville Syrjälä Date: Thu Oct 15 13:21:35 2020 +0100 drm/i915: Mark ininitial fb obj as WT on eLLC machines to avoid rcu lockup during fbdev init Currently we leave the cache_level of the initial fb obj set to NONE. This means on eLLC machines the first pin_to_display() will try to switch it to WT which requires a vma unbind+bind. If that happens during the fbdev initialization rcu does not seem operational which causes the unbind to get stuck. To most appearances this looks like a dead machine on boot. Avoid the unbind by already marking the object cache_level as WT when creating it. We still do an excplicit ggtt pin which will rewrite the PTEs anyway, so they will match whatever cache level we set. Cc: # v5.7+ Suggested-by: Chris Wilson Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2381 Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20201007120329.17076-1-ville.syrjala@linux.intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20201015122138.30161-1-chris@chris-wilson.co.uk (cherry picked from commit d46b60a2e8d246f1f0faa38e52f4f5a73858c338) Signed-off-by: Rodrigo Vivi commit 849c0fe9e831dcebea1b46e2237e13f274a8756a Author: Ayaz A Siddiqui Date: Wed Jul 29 15:55:39 2020 +0530 drm/i915/gt: Initialize reserved and unspecified MOCS indices In order to avoid functional breakage of mis-programmed applications that have grown to depend on unused MOCS entries, we are programming those entries to be equal to fully cached ("L3 + LLC") entry. These reserved and unspecified entries should not be used as they may be changed to less performant variants with better coherency in the future if more entries are needed. v2: As suggested by Lucas De Marchi to utilise __init_mocs_table for programming default value, setting I915_MOCS_PTE index of tgl_mocs_table with desired value. Cc: Chris Wilson Cc: Lucas De Marchi Cc: Tomasz Lis Cc: Matt Roper Cc: Joonas Lahtinen Cc: Francisco Jerez Cc: Mathew Alwin Cc: Mcguire Russell W Cc: Spruit Neil R Cc: Zhou Cheng Cc: Benemelis Mike G Signed-off-by: Ayaz A Siddiqui Reviewed-by: Lucas De Marchi Acked-by: Joonas Lahtinen Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200729102539.134731-2-ayaz.siddiqui@intel.com Cc: stable@vger.kernel.org (cherry picked from commit 4d8a5cfe3b131f60903949f998c5961cc922e0b0) Signed-off-by: Rodrigo Vivi commit 354842df3888d63dd0371358189cafde267b4a72 Author: Sean Paul Date: Thu Sep 17 20:28:42 2020 -0400 drm/i915/dp: Tweak initial dpcd backlight.enabled value In commit 79946723092b ("drm/i915: Assume 100% brightness when not in DPCD control mode"), we fixed the brightness level when DPCD control was not active to max brightness. This is as good as we can guess since most backlights go on full when uncontrolled. However in doing so we changed the semantics of the initial 'backlight.enabled' value. At least on Pixelbooks, they were relying on the brightness level in DP_EDP_BACKLIGHT_BRIGHTNESS_MSB to be 0 on boot such that enabled would be false. This causes the device to be enabled when the brightness is set. Without this, brightness control doesn't work. So by changing brightness to max, we also flipped enabled to be true on boot. To fix this, make enabled a function of brightness and backlight control mechanism. Fixes: 79946723092b ("drm/i915: Assume 100% brightness when not in DPCD control mode") Cc: Lyude Paul Cc: Jani Nikula Cc: Juha-Pekka Heikkila Cc: "Ville Syrjälä" Cc: Rodrigo Vivi Cc: Kevin Chowski > Signed-off-by: Sean Paul Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200918002845.32766-1-sean@poorly.run (cherry picked from commit 4ade8f31c25bef7ce7ed4d7cbac17df7c4bad850) Signed-off-by: Rodrigo Vivi commit 628ade2d0816b2675ab61ba6aadfc9a94e3e1589 Author: Peter Xu Date: Mon Oct 5 12:55:31 2020 -0700 KVM: VMX: Fix x2APIC MSR intercept handling on !APICV platforms Fix an inverted flag for intercepting x2APIC MSRs and intercept writes by default, even when APICV is enabled. Fixes: 3eb900173c71 ("KVM: x86: VMX: Prevent MSR passthrough when MSR access is denied") Co-developed-by: Peter Xu [sean: added changelog] Signed-off-by: Sean Christopherson Message-Id: <20201005195532.8674-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 272d70895113ef00c03ab325787d159ee51718c8 Author: Peilin Ye Date: Sun Oct 18 14:12:04 2020 -0400 Fonts: Support FONT_EXTRA_WORDS macros for font_6x8 Recently, in commit 6735b4632def ("Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts"), we wrapped each of our built-in data buffers in a `font_data` structure, in order to use the following macros on them, see include/linux/font.h: #define REFCOUNT(fd) (((int *)(fd))[-1]) #define FNTSIZE(fd) (((int *)(fd))[-2]) #define FNTCHARCNT(fd) (((int *)(fd))[-3]) #define FNTSUM(fd) (((int *)(fd))[-4]) #define FONT_EXTRA_WORDS 4 Do the same thing to our new 6x8 font. For built-in fonts, currently we only use FNTSIZE(). Since this is only a temporary solution for an out-of-bounds issue in the framebuffer layer (see commit 5af08640795b ("fbcon: Fix global-out-of-bounds read in fbcon_get_font()")), all the three other fields are intentionally set to zero in order to discourage using these negative-indexing macros. Signed-off-by: Peilin Ye Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/926453876c92caac34cba8545716a491754d04d5.1603037079.git.yepeilin.cs@gmail.com commit eda4a7bf5d75b8b579c54622f2795696a02883b9 Author: Peilin Ye Date: Sun Oct 18 16:54:01 2020 -0400 docs: fb: Add font_6x8 to available built-in fonts Recently we added a new 6x8 font in commit e2028c8e6bf9 ("lib/fonts: add font 6x8 for OLED display"). Add its name to the "compiled-in fonts" list. Signed-off-by: Peilin Ye Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201018205401.698242-1-yepeilin.cs@gmail.com commit f8fee6e63e55a7fc0e53a460ae3523d9e4d9bd48 Author: Hubert Jasudowicz Date: Sun Oct 18 17:21:06 2020 +0200 powercap: Fix typo in Kconfig "Plance" -> "Plane" Signed-off-by: Hubert Jasudowicz Signed-off-by: Rafael J. Wysocki commit 0070ea29623904224c0f5fa279a16a4ac9223295 Author: Wei Wang Date: Fri Oct 16 11:17:22 2020 -0700 cpufreq: schedutil: restore cached freq when next_f is not changed We have the raw cached freq to reduce the chance in calling cpufreq driver where it could be costly in some arch/SoC. Currently, the raw cached freq is reset in sugov_update_single() when it avoids frequency reduction (which is not desirable sometimes), but it is better to restore the previous value of it in that case, because it may not change in the next cycle and it is not necessary to change the CPU frequency then. Adapted from https://android-review.googlesource.com/1352810/ Signed-off-by: Wei Wang Acked-by: Viresh Kumar [ rjw: Subject edit and changelog rewrite ] Signed-off-by: Rafael J. Wysocki commit 0669d2b265d0f6f9e16f1abbf5c5d2e22b219a6b Author: Peter Zijlstra Date: Mon Oct 19 12:13:53 2020 +0200 zram: Fix __zram_bvec_{read,write}() locking order Mikhail reported a lockdep spat detailing how __zram_bvec_read() and __zram_bvec_write() use zstrm->lock and zspage->lock in opposite order. Reported-by: Mikhail Gavrilov Signed-off-by: Peter Zijlstra (Intel) Tested-by: Mikhail Gavrilov Acked-by: Minchan Kim Acked-by: Sebastian Andrzej Siewior Signed-off-by: Jens Axboe commit 5368512abe08a28525d9b24abbfc2a72493e8dba Author: Wei Huang Date: Sun Oct 18 22:57:41 2020 -0500 acpi-cpufreq: Honor _PSD table setting on new AMD CPUs acpi-cpufreq has a old quirk that overrides the _PSD table supplied by BIOS on AMD CPUs. However the _PSD table of new AMD CPUs (Family 19h+) now accurately reports the P-state dependency of CPU cores. Hence this quirk needs to be fixed in order to support new CPUs' frequency control. Fixes: acd316248205 ("acpi-cpufreq: Add quirk to disable _PSD usage on all AMD CPUs") Signed-off-by: Wei Huang [ rjw: Subject edit ] Cc: 3.10+ # 3.10+ Signed-off-by: Rafael J. Wysocki commit 43c3e148830aae5469c411a2bf951d4fe7fcea29 Author: Robert Marko Date: Fri Oct 16 22:44:04 2020 +0200 MAINTAINERS: Add entry for Qualcomm IPQ4019 VQMMC regulator Add maintainers entry for the Qualcomm IPQ4019 VQMMC regulator driver. Signed-off-by: Robert Marko Cc: Luka Perkov Link: https://lore.kernel.org/r/20201016204404.2405707-1-robert.marko@sartura.hr Signed-off-by: Mark Brown commit eb5a558705c7f63d06b4ddd072898b1ca894e053 Author: Tzung-Bi Shih Date: Mon Oct 19 12:47:24 2020 +0800 ASoC: mediatek: mt8183-da7219: fix DAPM paths for rt1015 RT1015's output widget name is "SPO" instead of "Speaker". Fixes it to use the correct names. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201019044724.1601476-1-tzungbi@google.com Signed-off-by: Mark Brown commit 2c3bd2a5c86fe744e8377733c5e511a5ca1e14f5 Author: Olaf Hering Date: Thu Oct 8 09:12:15 2020 +0200 hv_balloon: disable warning when floor reached It is not an error if the host requests to balloon down, but the VM refuses to do so. Without this change a warning is logged in dmesg every five minutes. Fixes: b3bb97b8a49f3 ("Drivers: hv: balloon: Add logging for dynamic memory operations") Signed-off-by: Olaf Hering Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20201008071216.16554-1-olaf@aepfle.de Signed-off-by: Wei Liu commit 9ba0d0c81284f4ec0b24529bdba2fc68b9d6a09a Author: Jeffle Xu Date: Mon Oct 19 16:59:42 2020 +0800 io_uring: use blk_queue_nowait() to check if NOWAIT supported commit 021a24460dc2 ("block: add QUEUE_FLAG_NOWAIT") adds a new helper function blk_queue_nowait() to check if the bdev supports handling of REQ_NOWAIT or not. Since then bio-based dm device can also support REQ_NOWAIT, and currently only dm-linear supports that since commit 6abc49468eea ("dm: add support for REQ_NOWAIT and enable it for linear target"). Signed-off-by: Jeffle Xu Signed-off-by: Jens Axboe commit 852b1beecb6ff9326f7ca4bc0fe69ae860ebdb9e Author: Alex Williamson Date: Mon Oct 19 07:13:55 2020 -0600 vfio/pci: Clear token on bypass registration failure The eventfd context is used as our irqbypass token, therefore if an eventfd is re-used, our token is the same. The irqbypass code will return an -EBUSY in this case, but we'll still attempt to unregister the producer, where if that duplicate token still exists, results in removing the wrong object. Clear the token of failed producers so that they harmlessly fall out when unregistered. Fixes: 6d7425f109d2 ("vfio: Register/unregister irq_bypass_producer") Reported-by: guomin chen Tested-by: guomin chen Signed-off-by: Alex Williamson commit 822e1a90afff61826252a65e574e940c0038055c Author: Diana Craciun Date: Fri Oct 16 12:32:32 2020 +0300 vfio/fsl-mc: fix the return of the uninitialized variable ret The vfio_fsl_mc_reflck_attach function may return, on success path, an uninitialized variable. Fix the problem by initializing the return variable to 0. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: f2ba7e8c947b ("vfio/fsl-mc: Added lock support in preparation for interrupt handling") Reported-by: Colin Ian King Signed-off-by: Diana Craciun Signed-off-by: Alex Williamson commit 652af650d3f619363f64edc69794f6141bdf492b Author: Rafael J. Wysocki Date: Mon Oct 19 14:46:39 2020 +0200 ACPICA: Add missing type casts in GPE register access code Type casts needed on 32-bit systems are missing in two places in the GPE register access code, so add them. Fixes: 7a8379eb41a4 ("ACPICA: Add support for using logical addresses of GPE blocks") Reported-and-tested-by: Matthieu Baerts Signed-off-by: Rafael J. Wysocki commit 9def3b1a07c41e21c68a0eb353e3e569fdd1d2b1 Author: Bartosz Golaszewski Date: Tue Oct 13 09:30:55 2020 +0200 iommu/vt-d: Don't dereference iommu_device if IOMMU_API is not built Since commit c40aaaac1018 ("iommu/vt-d: Gracefully handle DMAR units with no supported address widths") dmar.c needs struct iommu_device to be selected. We can drop this dependency by not dereferencing struct iommu_device if IOMMU_API is not selected and by reusing the information stored in iommu->drhd->ignored instead. This fixes the following build error when IOMMU_API is not selected: drivers/iommu/intel/dmar.c: In function ‘free_iommu’: drivers/iommu/intel/dmar.c:1139:41: error: ‘struct iommu_device’ has no member named ‘ops’ 1139 | if (intel_iommu_enabled && iommu->iommu.ops) { ^ Fixes: c40aaaac1018 ("iommu/vt-d: Gracefully handle DMAR units with no supported address widths") Signed-off-by: Bartosz Golaszewski Acked-by: Lu Baolu Acked-by: David Woodhouse Link: https://lore.kernel.org/r/20201013073055.11262-1-brgl@bgdev.pl Signed-off-by: Joerg Roedel commit 358ab796ce78ba271a6ff82834183ffb2cb68c4c Author: Vasant Hegde Date: Sat Oct 17 22:12:36 2020 +0530 powerpc/powernv/dump: Handle multiple writes to ack attribute Even though we use self removing sysfs helper, we still need to make sure we do the final kobject delete conditionally. sysfs_remove_file_self() will handle parallel calls to remove the sysfs attribute file and returns true only in the caller that removed the attribute file. The other parallel callers are returned false. Do the final kobject delete checking the return value of sysfs_remove_file_self(). Signed-off-by: Vasant Hegde Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201017164236.264713-1-hegdevasant@linux.vnet.ibm.com commit 0a43ae3e2beb77e3481d812834d33abe270768ab Author: Vasant Hegde Date: Sat Oct 17 22:12:10 2020 +0530 powerpc/powernv/dump: Fix race while processing OPAL dump Every dump reported by OPAL is exported to userspace through a sysfs interface and notified using kobject_uevent(). The userspace daemon (opal_errd) then reads the dump and acknowledges that the dump is saved safely to disk. Once acknowledged the kernel removes the respective sysfs file entry causing respective resources to be released including kobject. However it's possible the userspace daemon may already be scanning dump entries when a new sysfs dump entry is created by the kernel. User daemon may read this new entry and ack it even before kernel can notify userspace about it through kobject_uevent() call. If that happens then we have a potential race between dump_ack_store->kobject_put() and kobject_uevent which can lead to use-after-free of a kernfs object resulting in a kernel crash. This patch fixes this race by protecting the sysfs file creation/notification by holding a reference count on kobject until we safely send kobject_uevent(). The function create_dump_obj() returns the dump object which if used by caller function will end up in use-after-free problem again. However, the return value of create_dump_obj() function isn't being used today and there is no need as well. Hence change it to return void to make this fix complete. Fixes: c7e64b9ce04a ("powerpc/powernv Platform dump interface") Signed-off-by: Vasant Hegde Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201017164210.264619-1-hegdevasant@linux.vnet.ibm.com commit 103a4908ad4da9decdf9bc7216ec5a4861edf703 Author: Arvind Sankar Date: Thu Oct 8 15:16:23 2020 -0400 x86/head/64: Disable stack protection for head$(BITS).o On 64-bit, the startup_64_setup_env() function added in 866b556efa12 ("x86/head/64: Install startup GDT") has stack protection enabled because of set_bringup_idt_handler(). This happens when CONFIG_STACKPROTECTOR_STRONG is enabled. It also currently needs CONFIG_AMD_MEM_ENCRYPT enabled because then set_bringup_idt_handler() is not an empty stub but that might change in the future, when the other vendor adds their similar technology. At this point, %gs is not yet initialized, and this doesn't cause a crash only because the #PF handler from the decompressor stub is still installed and handles the page fault. Disable stack protection for the whole file, and do it on 32-bit as well to avoid surprises. [ bp: Extend commit message with the exact explanation how it happens. ] Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Reviewed-by: Joerg Roedel Link: https://lkml.kernel.org/r/20201008191623.2881677-6-nivedita@alum.mit.edu commit e5ceb9a02402b984feecb95a82239be151c9f4e2 Author: Arvind Sankar Date: Sat Oct 10 15:11:10 2020 -0400 x86/boot/64: Initialize 5-level paging variables earlier Commit ca0e22d4f011 ("x86/boot/compressed/64: Always switch to own page table") started using a new set of pagetables even without KASLR. After that commit, initialize_identity_maps() is called before the 5-level paging variables are setup in choose_random_location(), which will not work if 5-level paging is actually enabled. Fix this by moving the initialization of __pgtable_l5_enabled, pgdir_shift and ptrs_per_p4d into cleanup_trampoline(), which is called immediately after the finalization of whether the kernel is executing with 4- or 5-level paging. This will be earlier than anything that might require those variables, and keeps the 4- vs 5-level paging code all in one place. Fixes: ca0e22d4f011 ("x86/boot/compressed/64: Always switch to own page table") Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Reviewed-by: Joerg Roedel Tested-by: Joerg Roedel Tested-by: Kirill A. Shutemov Link: https://lkml.kernel.org/r/20201010191110.4060905-1-nivedita@alum.mit.edu commit 84dbf66c63472069e5eb40b810731367618cd8b5 Author: Srikar Dronamraju Date: Mon Oct 19 09:57:16 2020 +0530 powerpc/smp: Use GFP_ATOMIC while allocating tmp mask Qian Cai reported a regression where CPU Hotplug fails with the latest powerpc/next BUG: sleeping function called from invalid context at mm/slab.h:494 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/88 no locks held by swapper/88/0. irq event stamp: 18074448 hardirqs last enabled at (18074447): [] tick_nohz_idle_enter+0x9c/0x110 hardirqs last disabled at (18074448): [] do_idle+0x138/0x3b0 do_idle at kernel/sched/idle.c:253 (discriminator 1) softirqs last enabled at (18074440): [] irq_enter_rcu+0x94/0xa0 softirqs last disabled at (18074439): [] irq_enter_rcu+0x70/0xa0 CPU: 88 PID: 0 Comm: swapper/88 Tainted: G W 5.9.0-rc8-next-20201007 #1 Call Trace: [c00020000a4bfcf0] [c000000000649e98] dump_stack+0xec/0x144 (unreliable) [c00020000a4bfd30] [c0000000000f6c34] ___might_sleep+0x2f4/0x310 [c00020000a4bfdb0] [c000000000354f94] slab_pre_alloc_hook.constprop.82+0x124/0x190 [c00020000a4bfe00] [c00000000035e9e8] __kmalloc_node+0x88/0x3a0 slab_alloc_node at mm/slub.c:2817 (inlined by) __kmalloc_node at mm/slub.c:4013 [c00020000a4bfe80] [c0000000006494d8] alloc_cpumask_var_node+0x38/0x80 kmalloc_node at include/linux/slab.h:577 (inlined by) alloc_cpumask_var_node at lib/cpumask.c:116 [c00020000a4bfef0] [c00000000003eedc] start_secondary+0x27c/0x800 update_mask_by_l2 at arch/powerpc/kernel/smp.c:1267 (inlined by) add_cpu_to_masks at arch/powerpc/kernel/smp.c:1387 (inlined by) start_secondary at arch/powerpc/kernel/smp.c:1420 [c00020000a4bff90] [c00000000000c468] start_secondary_resume+0x10/0x14 Allocating a temporary mask while performing a CPU Hotplug operation with CONFIG_CPUMASK_OFFSTACK enabled, leads to calling a sleepable function from a atomic context. Fix this by allocating the temporary mask with GFP_ATOMIC flag. Also instead of having to allocate twice, allocate the mask in the caller so that we only have to allocate once. If the allocation fails, assume the mask to be same as sibling mask, which will make the scheduler to drop this domain for this CPU. Fixes: 70a94089d7f7 ("powerpc/smp: Optimize update_coregroup_mask") Fixes: 3ab33d6dc3e9 ("powerpc/smp: Optimize update_mask_by_l2") Reported-by: Qian Cai Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201019042716.106234-3-srikar@linux.vnet.ibm.com commit 966730a6e8524c1b5fe64358e5884605cab6ccb3 Author: Srikar Dronamraju Date: Mon Oct 19 09:57:15 2020 +0530 powerpc/smp: Remove unnecessary variable Commit 3ab33d6dc3e9 ("powerpc/smp: Optimize update_mask_by_l2") introduced submask_fn in update_mask_by_l2 to track the right submask. However commit f6606cfdfbcd ("powerpc/smp: Dont assume l2-cache to be superset of sibling") introduced sibling_mask in update_mask_by_l2 to track the same submask. Remove sibling_mask in favour of submask_fn. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201019042716.106234-2-srikar@linux.vnet.ibm.com commit 8fe105679765700378eb328495fcfe1566cdbbd0 Author: Colin Xu Date: Mon Oct 12 12:52:31 2020 +0800 drm/i915/gvt: Set SNOOP for PAT3 on BXT/APL to workaround GPU BB hang If guest fills non-priv bb on ApolloLake/Broxton as Mesa i965 does in: 717e7539124d (i965: Use a WC map and memcpy for the batch instead of pw-) Due to the missing flush of bb filled by VM vCPU, host GPU hangs on executing these MI_BATCH_BUFFER. Temporarily workaround this by setting SNOOP bit for PAT3 used by PPGTT PML4 PTE: PAT(0) PCD(1) PWT(1). The performance is still expected to be low, will need further improvement. Acked-by: Zhenyu Wang Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20201012045231.226748-1-colin.xu@intel.com commit 97f9ca383dca6f4b425fb3c4709405fb8272a15f Author: Colin Xu Date: Fri Sep 11 14:52:39 2020 +0800 drm/i915/gvt: Allow zero out HWSP addr on hws_pga_write Guest driver may reset HWSP to 0 as init value during D3->D0: The full sequence is: - Boot ->D0 - Update HWSP - D0->D3 - ...In D3 state... - D3->D0 - DMLR reset. - Set engine HWSP to 0. - Set engine ring mode to 0. - Set engine HWSP to correct value. - Set engine ring mode to correct value. Ring mode is masked register so set 0 won't take effect. However HWPS addr 0 is considered as invalid GGTT address which will report error like: gvt: vgpu 1: write invalid HWSP address, reg:0x2080, value:0x0 gvt: vgpu 1: fail to emulate MMIO write 00002080 len 4 Detected your guest driver doesn't support GVT-g. Now vgpu 2 will enter failsafe mode. Zero out HWSP addr is considered as a valid setting from device driver so don't treat it as invalid HWSP addr. V2: Treat HWSP addr 0 as valid. (zhenyu) V3: Change patch title. Reviewed-by: Zhenyu Wang Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200911065239.147789-1-colin.xu@intel.com commit bb0bc0cfeabc0d6865865e8d3a601bea6711f951 Merge: 5fc27b098dafb 8a30c6eb29e03 Author: Dmitry Torokhov Date: Sun Oct 18 18:42:32 2020 -0700 Merge branch 'next' into for-linus Prepare input updates for 5.10 merge window. commit 40b99050455b9a6cb8faf15dcd41888312184720 Merge: c46a40ff13dc3 214bba50616f6 Author: Dave Airlie Date: Mon Oct 19 09:21:55 2020 +1000 Merge tag 'drm-intel-next-fixes-2020-10-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Set all unused color plane offsets to ~0xfff again (Ville) - Fix TGL DKL PHY DP vswing handling (Ville) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20201015181453.GA2905280@intel.com commit c46a40ff13dc3e2c4e2a40fd56fd10e8ee1dea4d Author: Eryk Brol Date: Thu Oct 15 15:40:53 2020 -0400 drm/amd/display: Fix incorrect dsc force enable logic [Why] Missed removing a '!' which results in incorrect behavior [How] Remove the offending '!' Signed-off-by: Eryk Brol Reviewed-by: Harry Wentland Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201015194053.355335-1-eryk.brol@amd.com commit 941947d29eb71d2c0b3218a0f38354e5b0ffbe92 Merge: 640eee067d9aa 8f4729e880647 Author: Dave Airlie Date: Mon Oct 19 09:11:32 2020 +1000 Merge tag 'amd-drm-fixes-5.10-2020-10-14' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-fixes-5.10-2020-10-14: amdgpu: - eDP fix - BACO fix - Kernel documentation fixes - SMU7 mclk fix - VCN1 hw bug workaround amdkfd: - kvfree vs kfree fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201014195403.4558-1-alexander.deucher@amd.com commit 0e8b8d6a2d85344d80dda5beadd98f5f86e8d3d3 Author: Taehee Yoo Date: Thu Oct 15 16:26:06 2020 +0000 net: core: use list_del_init() instead of list_del() in netdev_run_todo() dev->unlink_list is reused unless dev is deleted. So, list_del() should not be used. Due to using list_del(), dev->unlink_list can't be reused so that dev->nested_level update logic doesn't work. In order to fix this bug, list_del_init() should be used instead of list_del(). Test commands: ip link add bond0 type bond ip link add bond1 type bond ip link set bond0 master bond1 ip link set bond0 nomaster ip link set bond1 master bond0 ip link set bond1 nomaster Splat looks like: [ 255.750458][ T1030] ============================================ [ 255.751967][ T1030] WARNING: possible recursive locking detected [ 255.753435][ T1030] 5.9.0-rc8+ #772 Not tainted [ 255.754553][ T1030] -------------------------------------------- [ 255.756047][ T1030] ip/1030 is trying to acquire lock: [ 255.757304][ T1030] ffff88811782a280 (&dev_addr_list_lock_key/1){+...}-{2:2}, at: dev_mc_sync_multiple+0xc2/0x150 [ 255.760056][ T1030] [ 255.760056][ T1030] but task is already holding lock: [ 255.761862][ T1030] ffff88811130a280 (&dev_addr_list_lock_key/1){+...}-{2:2}, at: bond_enslave+0x3d4d/0x43e0 [bonding] [ 255.764581][ T1030] [ 255.764581][ T1030] other info that might help us debug this: [ 255.766645][ T1030] Possible unsafe locking scenario: [ 255.766645][ T1030] [ 255.768566][ T1030] CPU0 [ 255.769415][ T1030] ---- [ 255.770259][ T1030] lock(&dev_addr_list_lock_key/1); [ 255.771629][ T1030] lock(&dev_addr_list_lock_key/1); [ 255.772994][ T1030] [ 255.772994][ T1030] *** DEADLOCK *** [ 255.772994][ T1030] [ 255.775091][ T1030] May be due to missing lock nesting notation [ 255.775091][ T1030] [ 255.777182][ T1030] 2 locks held by ip/1030: [ 255.778299][ T1030] #0: ffffffffb1f63250 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x2e4/0x8b0 [ 255.780600][ T1030] #1: ffff88811130a280 (&dev_addr_list_lock_key/1){+...}-{2:2}, at: bond_enslave+0x3d4d/0x43e0 [bonding] [ 255.783411][ T1030] [ 255.783411][ T1030] stack backtrace: [ 255.784874][ T1030] CPU: 7 PID: 1030 Comm: ip Not tainted 5.9.0-rc8+ #772 [ 255.786595][ T1030] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 255.789030][ T1030] Call Trace: [ 255.789850][ T1030] dump_stack+0x99/0xd0 [ 255.790882][ T1030] __lock_acquire.cold.71+0x166/0x3cc [ 255.792285][ T1030] ? register_lock_class+0x1a30/0x1a30 [ 255.793619][ T1030] ? rcu_read_lock_sched_held+0x91/0xc0 [ 255.794963][ T1030] ? rcu_read_lock_bh_held+0xa0/0xa0 [ 255.796246][ T1030] lock_acquire+0x1b8/0x850 [ 255.797332][ T1030] ? dev_mc_sync_multiple+0xc2/0x150 [ 255.798624][ T1030] ? bond_enslave+0x3d4d/0x43e0 [bonding] [ 255.800039][ T1030] ? check_flags+0x50/0x50 [ 255.801143][ T1030] ? lock_contended+0xd80/0xd80 [ 255.802341][ T1030] _raw_spin_lock_nested+0x2e/0x70 [ 255.803592][ T1030] ? dev_mc_sync_multiple+0xc2/0x150 [ 255.804897][ T1030] dev_mc_sync_multiple+0xc2/0x150 [ 255.806168][ T1030] bond_enslave+0x3d58/0x43e0 [bonding] [ 255.807542][ T1030] ? __lock_acquire+0xe53/0x51b0 [ 255.808824][ T1030] ? bond_update_slave_arr+0xdc0/0xdc0 [bonding] [ 255.810451][ T1030] ? check_chain_key+0x236/0x5e0 [ 255.811742][ T1030] ? mutex_is_locked+0x13/0x50 [ 255.812910][ T1030] ? rtnl_is_locked+0x11/0x20 [ 255.814061][ T1030] ? netdev_master_upper_dev_get+0xf/0x120 [ 255.815553][ T1030] do_setlink+0x94c/0x3040 [ ... ] Reported-by: syzbot+4a0f7bc34e3997a6c7df@syzkaller.appspotmail.com Fixes: 1fc70edb7d7b ("net: core: add nested_level variable in net_device") Signed-off-by: Taehee Yoo Link: https://lore.kernel.org/r/20201015162606.9377-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski commit 7cf726a59435301046250c42131554d9ccc566b8 Merge: 41eea65e2aaad 294a7f1613ee4 Author: Linus Torvalds Date: Sun Oct 18 14:45:59 2020 -0700 Merge tag 'linux-kselftest-kunit-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull more Kunit updates from Shuah Khan: - add Kunit to kernel_init() and remove KUnit from init calls entirely. This addresses the concern that Kunit would not work correctly during late init phase. - add a linker section where KUnit can put references to its test suites. This is the first step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. - add a centralized executor to dispatch tests rather than relying on late_initcall to schedule each test suite separately. Centralized execution is for built-in tests only; modules will execute tests when loaded. - convert bitfield test to use KUnit framework - Documentation updates for naming guidelines and how kunit_test_suite() works. - add test plan to KUnit TAP format * tag 'linux-kselftest-kunit-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: lib: kunit: Fix compilation test when using TEST_BIT_FIELD_COMPILE lib: kunit: add bitfield test conversion to KUnit Documentation: kunit: add a brief blurb about kunit_test_suite kunit: test: add test plan to KUnit TAP format init: main: add KUnit to kernel init kunit: test: create a single centralized executor for all tests vmlinux.lds.h: add linker section for KUnit test suites Documentation: kunit: Add naming guidelines commit 41eea65e2aaadc0611fd56a1b177ce25dcc4c1df Merge: 373014bb517e0 b36c830f8c9b1 Author: Linus Torvalds Date: Sun Oct 18 14:34:50 2020 -0700 Merge tag 'core-rcu-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU changes from Ingo Molnar: - Debugging for smp_call_function() - RT raw/non-raw lock ordering fixes - Strict grace periods for KASAN - New smp_call_function() torture test - Torture-test updates - Documentation updates - Miscellaneous fixes [ This doesn't actually pull the tag - I've dropped the last merge from the RCU branch due to questions about the series. - Linus ] * tag 'core-rcu-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (77 commits) smp: Make symbol 'csd_bug_count' static kernel/smp: Provide CSD lock timeout diagnostics smp: Add source and destination CPUs to __call_single_data rcu: Shrink each possible cpu krcp rcu/segcblist: Prevent useless GP start if no CBs to accelerate torture: Add gdb support rcutorture: Allow pointer leaks to test diagnostic code rcutorture: Hoist OOM registry up one level refperf: Avoid null pointer dereference when buf fails to allocate rcutorture: Properly synchronize with OOM notifier rcutorture: Properly set rcu_fwds for OOM handling torture: Add kvm.sh --help and update help message rcutorture: Add CONFIG_PROVE_RCU_LIST to TREE05 torture: Update initrd documentation rcutorture: Replace HTTP links with HTTPS ones locktorture: Make function torture_percpu_rwsem_init() static torture: document --allcpus argument added to the kvm.sh script rcutorture: Output number of elapsed grace periods rcutorture: Remove KCSAN stubs rcu: Remove unused "cpu" parameter from rcu_report_qs_rdp() ... commit 373014bb517e0bb291714fe1e232fb606d54931b Merge: f66179ca7a7be c7dacf5b0f329 Author: Linus Torvalds Date: Sun Oct 18 14:29:19 2020 -0700 Merge tag 'mailbox-v5.10' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - arm: implementation of mhu as a doorbell driver and conversion of dt-bindings to json-schema - mediatek: fix platform_get_irq error handling - bcm: convert tasklets to use new tasklet_setup api - core: fix race cause by hrtimer starting inappropriately * tag 'mailbox-v5.10' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: avoid timer start from callback maiblox: mediatek: Fix handling of platform_get_irq() error mailbox: arm_mhu: Add ARM MHU doorbell driver mailbox: arm_mhu: Match only if compatible is "arm,mhu" dt-bindings: mailbox: add doorbell support to ARM MHU dt-bindings: mailbox : arm,mhu: Convert to Json-schema mailbox: bcm: convert tasklets to use new tasklet_setup() API commit f66179ca7a7beebd504bea5c4422c402162a6048 Merge: 1912b04e0f9b1 edc05fe5559e9 Author: Linus Torvalds Date: Sun Oct 18 14:20:35 2020 -0700 Merge branch 'for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux Pull coccinelle updates from Julia Lawall. * 'for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux: coccinelle: api: add kfree_mismatch script coccinelle: iterators: Add for_each_child.cocci script scripts: coccicheck: Change default condition for parallelism scripts: coccicheck: Add quotes to improve portability coccinelle: api: kfree_sensitive: print memset position coccinelle: misc: add flexible_array.cocci script coccinelle: api: add kvmalloc script scripts: coccicheck: Change default value for parallelism coccinelle: misc: add excluded_middle.cocci script scripts: coccicheck: Improve error feedback when coccicheck fails coccinelle: api: update kzfree script to kfree_sensitive coccinelle: misc: add uninitialized_var.cocci script coccinelle: ifnullfree: add vfree(), kvfree*() functions coccinelle: api: add kobj_to_dev.cocci script coccinelle: add patch rule for dma_alloc_coherent scripts: coccicheck: Add chain mode to list of modes commit bd7f14df9492e7d3772812a215fca66e6737e598 Author: Jakub Kicinski Date: Fri Oct 16 16:20:06 2020 -0700 ixgbe: fix probing of multi-port devices with one MDIO Ian reports that after upgrade from v5.8.14 to v5.9 only one of his 4 ixgbe netdevs appear in the system. Quoting the comment on ixgbe_x550em_a_has_mii(): * Returns true if hw points to lowest numbered PCI B:D.F x550_em_a device in * the SoC. There are up to 4 MACs sharing a single MDIO bus on the x550em_a, * but we only want to register one MDIO bus. This matches the symptoms, since the return value from ixgbe_mii_bus_init() is no longer ignored we need to handle the higher ports of x550em without an error. Fixes: 09ef193fef7e ("net: ethernet: ixgbe: check the return value of ixgbe_mii_bus_init()") Reported-by: Ian Kumlien Tested-by: Ian Kumlien Acked-by: Jesse Brandeburg Link: https://lore.kernel.org/r/20201016232006.3352947-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 60f1626f0f866809de801724c3d180a9f322841e Author: Anant Thazhemadam Date: Sun Oct 11 23:00:30 2020 +0530 net: usb: rtl8150: don't incorrectly assign random MAC addresses In set_ethernet_addr(), if get_registers() succeeds, the ethernet address that was read must be copied over. Otherwise, a random ethernet address must be assigned. get_registers() returns 0 if successful, and negative error number otherwise. However, in set_ethernet_addr(), this return value is incorrectly checked. Since this return value will never be equal to sizeof(node_id), a random MAC address will always be generated and assigned to the device; even in cases when get_registers() is successful. Correctly modifying the condition that checks if get_registers() was successful or not fixes this problem, and copies the ethernet address appropriately. Fixes: b2a0f274e3f7 ("net: rtl8150: Use the new usb control message API.") Signed-off-by: Anant Thazhemadam Link: https://lore.kernel.org/r/20201011173030.141582-1-anant.thazhemadam@gmail.com Signed-off-by: Jakub Kicinski commit 71a0e29e99405d89b695882d52eec60844173697 Author: Ido Schimmel Date: Thu Oct 15 11:45:25 2020 +0300 selftests: forwarding: Add missing 'rp_filter' configuration When 'rp_filter' is configured in strict mode (1) the tests fail because packets received from the macvlan netdevs would not be forwarded through them on the reverse path. Fix this by disabling the 'rp_filter', meaning no source validation is performed. Fixes: 1538812e0880 ("selftests: forwarding: Add a test for VXLAN asymmetric routing") Fixes: 438a4f5665b2 ("selftests: forwarding: Add a test for VXLAN symmetric routing") Signed-off-by: Ido Schimmel Reported-by: Hangbin Liu Tested-by: Hangbin Liu Link: https://lore.kernel.org/r/20201015084525.135121-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit f981fc3d515a588c389242b7e3a71487b40571a5 Author: Eelco Chaudron Date: Sat Oct 17 20:24:51 2020 +0200 net: openvswitch: fix to make sure flow_lookup() is not preempted The flow_lookup() function uses per CPU variables, which must be called with BH disabled. However, this is fine in the general NAPI use case where the local BH is disabled. But, it's also called from the netlink context. The below patch makes sure that even in the netlink path, the BH is disabled. In addition, u64_stats_update_begin() requires a lock to ensure one writer which is not ensured here. Making it per-CPU and disabling NAPI (softirq) ensures that there is always only one writer. Fixes: eac87c413bf9 ("net: openvswitch: reorder masks array based on usage") Reported-by: Juri Lelli Signed-off-by: Eelco Chaudron Link: https://lore.kernel.org/r/160295903253.7789.826736662555102345.stgit@ebuild Signed-off-by: Jakub Kicinski commit 1912b04e0f9b116faf2e61c5432980f87c389c51 Merge: 9453b2d4694c2 c922781fef43d Author: Linus Torvalds Date: Sun Oct 18 12:25:25 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge yet more updates from Andrew Morton: "Subsystems affected by this patch series: mm (memcg, migration, pagemap, gup, madvise, vmalloc), ia64, and misc" * emailed patches from Andrew Morton : (31 commits) mm: remove duplicate include statement in mmu.c mm: remove the filename in the top of file comment in vmalloc.c mm: cleanup the gfp_mask handling in __vmalloc_area_node mm: remove alloc_vm_area x86/xen: open code alloc_vm_area in arch_gnttab_valloc xen/xenbus: use apply_to_page_range directly in xenbus_map_ring_pv drm/i915: use vmap in i915_gem_object_map drm/i915: stop using kmap in i915_gem_object_map drm/i915: use vmap in shmem_pin_map zsmalloc: switch from alloc_vm_area to get_vm_area mm: allow a NULL fn callback in apply_to_page_range mm: add a vmap_pfn function mm: add a VM_MAP_PUT_PAGES flag for vmap mm: update the documentation for vfree mm/madvise: introduce process_madvise() syscall: an external memory hinting API pid: move pidfd_get_pid() to pid.c mm/madvise: pass mm to do_madvise selftests/vm: 10x speedup for hmm-tests binfmt_elf: take the mmap lock around find_extend_vma() mm/gup_benchmark: take the mmap lock around GUP ... commit 9453b2d4694c2cb6c30d99e65d4a3deb09e94ac3 Merge: 429731277dfd4 f06885b3f3e38 Author: Linus Torvalds Date: Sun Oct 18 10:03:23 2020 -0700 Merge tag 'for-linus-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - Improve support for non-glibc systems - Vector: Add support for scripting and dynamic tap devices - Various fixes for the vector networking driver - Various fixes for time travel mode * tag 'for-linus-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: vector: Add dynamic tap interfaces and scripting um: Clean up stacktrace dump um: Fix incorrect assumptions about max pid length um: Remove dead usage of TIF_IA32 um: Remove redundant NULL check um: change sigio_spinlock to a mutex um: time-travel: Return the sequence number in ACK messages um: time-travel: Fix IRQ handling in time_travel_handle_message() um: Allow static linking for non-glibc implementations um: Some fixes to build UML with musl um: vector: Use GFP_ATOMIC under spin lock um: Fix null pointer dereference in vector_user_bpf commit 429731277dfd4b7940cff206dcde28b771b29210 Merge: a96fd1cc3ff3f 78c7d49f55d86 Author: Linus Torvalds Date: Sun Oct 18 09:56:50 2020 -0700 Merge tag 'for-linus-5.10-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull more ubi and ubifs updates from Richard Weinberger: "UBI: - Correctly use kthread_should_stop in ubi worker UBIFS: - Fixes for memory leaks while iterating directory entries - Fix for a user triggerable error message - Fix for a space accounting bug in authenticated mode" * tag 'for-linus-5.10-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubifs: journal: Make sure to not dirty twice for auth nodes ubifs: setflags: Don't show error message when vfs_ioc_setflags_prepare() fails ubifs: ubifs_jnl_change_xattr: Remove assertion 'nlink > 0' for host inode ubi: check kthread_should_stop() after the setting of task state ubifs: dent: Fix some potential memory leaks while iterating entries ubifs: xattr: Fix some potential memory leaks while iterating entries commit a96fd1cc3ff3f9dd6f06140fc0b8c91342859450 Merge: 9d9af1007bc08 e2a05cc7f8229 Author: Linus Torvalds Date: Sun Oct 18 09:51:10 2020 -0700 Merge tag 'for-linus-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull ubifs updates from Richard Weinberger: - Kernel-doc fixes - Fixes for memory leaks in authentication option parsing * tag 'for-linus-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubifs: mount_ubifs: Release authentication resource in error handling path ubifs: Don't parse authentication mount options in remount process ubifs: Fix a memleak after dumping authentication mount options ubifs: Fix some kernel-doc warnings in tnc.c ubifs: Fix some kernel-doc warnings in replay.c ubifs: Fix some kernel-doc warnings in gc.c ubifs: Fix 'hash' kernel-doc warning in auth.c commit c922781fef43d2ddbdef36a3a281441bb153377b Author: Tian Tao Date: Sat Oct 17 16:15:49 2020 -0700 mm: remove duplicate include statement in mmu.c asm/sections.h is included more than once, Remove the one that isn't necessary. Signed-off-by: Tian Tao Signed-off-by: Andrew Morton Reviewed-by: Mike Rapoport Link: https://lkml.kernel.org/r/1600088607-17327-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Linus Torvalds commit b71df8de41d2d2cdea6c8d2756cea2d91d517596 Author: Christoph Hellwig Date: Sat Oct 17 16:15:46 2020 -0700 mm: remove the filename in the top of file comment in vmalloc.c No point in having the filename inside the file. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002124035.1539300-3-hch@lst.de Signed-off-by: Linus Torvalds commit f255935b976729dbd8ddd079b96ddb6ecb1895bc Author: Christoph Hellwig Date: Sat Oct 17 16:15:43 2020 -0700 mm: cleanup the gfp_mask handling in __vmalloc_area_node Patch series "two small vmalloc cleanups". This patch (of 2): __vmalloc_area_node currently has four different gfp_t variables to just express this simple logic: - use the passed in mask, plus __GFP_NOWARN and __GFP_HIGHMEM (if suitable) for the underlying page allocation - use just the reclaim flags from the passed in mask plus __GFP_ZERO for allocating the page array Simplify this down to just use the pre-existing nested_gfp as-is for the page array allocation, and just the passed in gfp_mask for the page allocation, after conditionally ORing __GFP_HIGHMEM into it. This also makes the allocation warning a little more correct. Also initialize two variables at the time of declaration while touching this area. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002124035.1539300-1-hch@lst.de Link: https://lkml.kernel.org/r/20201002124035.1539300-2-hch@lst.de Signed-off-by: Linus Torvalds commit 301fa9f2ddf7fb248c188af292c9cc04f8283dff Author: Christoph Hellwig Date: Sat Oct 17 16:15:39 2020 -0700 mm: remove alloc_vm_area All users are gone now. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Cc: Boris Ostrovsky Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Juergen Gross Cc: Matthew Auld Cc: "Matthew Wilcox (Oracle)" Cc: Minchan Kim Cc: Nitin Gupta Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Stefano Stabellini Cc: Tvrtko Ursulin Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002122204.1534411-12-hch@lst.de Signed-off-by: Linus Torvalds commit 5dd63bf1d0a788d1bbd9c94bb07a70133430133e Author: Christoph Hellwig Date: Sat Oct 17 16:15:36 2020 -0700 x86/xen: open code alloc_vm_area in arch_gnttab_valloc Replace the last call to alloc_vm_area with an open coded version using an iterator in struct gnttab_vm_area instead of the triple indirection magic in alloc_vm_area. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Reviewed-by: Boris Ostrovsky Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Juergen Gross Cc: Matthew Auld Cc: "Matthew Wilcox (Oracle)" Cc: Minchan Kim Cc: Nitin Gupta Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Stefano Stabellini Cc: Tvrtko Ursulin Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002122204.1534411-11-hch@lst.de Signed-off-by: Linus Torvalds commit b723caece361029fa4aec83b951db2888d611c2b Author: Christoph Hellwig Date: Sat Oct 17 16:15:32 2020 -0700 xen/xenbus: use apply_to_page_range directly in xenbus_map_ring_pv Replacing alloc_vm_area with get_vm_area_caller + apply_page_range allows to fill put the phys_addr values directly instead of doing another loop over all addresses. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Reviewed-by: Boris Ostrovsky Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Juergen Gross Cc: Matthew Auld Cc: "Matthew Wilcox (Oracle)" Cc: Minchan Kim Cc: Nitin Gupta Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Stefano Stabellini Cc: Tvrtko Ursulin Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002122204.1534411-10-hch@lst.de Signed-off-by: Linus Torvalds commit 534a6687aaccce56c4801b70c651da311b71d402 Author: Christoph Hellwig Date: Sat Oct 17 16:15:28 2020 -0700 drm/i915: use vmap in i915_gem_object_map i915_gem_object_map implements fairly low-level vmap functionality in a driver. Split it into two helpers, one for remapping kernel memory which can use vmap, and one for I/O memory that uses vmap_pfn. The only practical difference is that alloc_vm_area prefeaults the vmalloc area PTEs, which doesn't seem to be required here for the kernel memory case (and could be added to vmap using a flag if actually required). Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Reviewed-by: Tvrtko Ursulin Cc: Boris Ostrovsky Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Juergen Gross Cc: Matthew Auld Cc: "Matthew Wilcox (Oracle)" Cc: Minchan Kim Cc: Nitin Gupta Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Stefano Stabellini Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002122204.1534411-9-hch@lst.de Signed-off-by: Linus Torvalds commit 46ce3a62b1461d6950c0c353f106761d90a45258 Author: Christoph Hellwig Date: Sat Oct 17 16:15:25 2020 -0700 drm/i915: stop using kmap in i915_gem_object_map kmap for !PageHighmem is just a convoluted way to say page_address, and kunmap is a no-op in that case. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Reviewed-by: Tvrtko Ursulin Cc: Boris Ostrovsky Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Juergen Gross Cc: Matthew Auld Cc: "Matthew Wilcox (Oracle)" Cc: Minchan Kim Cc: Nitin Gupta Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Stefano Stabellini Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002122204.1534411-8-hch@lst.de Signed-off-by: Linus Torvalds commit bfed6708d6c97406d14420f3288ee775c284ff8a Author: Christoph Hellwig Date: Sat Oct 17 16:15:21 2020 -0700 drm/i915: use vmap in shmem_pin_map shmem_pin_map somewhat awkwardly reimplements vmap using alloc_vm_area and manual pte setup. The only practical difference is that alloc_vm_area prefeaults the vmalloc area PTEs, which doesn't seem to be required here (and could be added to vmap using a flag if actually required). Switch to use vmap, and use vfree to free both the vmalloc mapping and the page array, as well as dropping the references to each page. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Reviewed-by: Tvrtko Ursulin Cc: Boris Ostrovsky Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Juergen Gross Cc: Matthew Auld Cc: "Matthew Wilcox (Oracle)" Cc: Minchan Kim Cc: Nitin Gupta Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Stefano Stabellini Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002122204.1534411-7-hch@lst.de Signed-off-by: Linus Torvalds commit d1b6d2e1fe1d9d3ff2c7cb7ce84d463560aa5e33 Author: Christoph Hellwig Date: Sat Oct 17 16:15:17 2020 -0700 zsmalloc: switch from alloc_vm_area to get_vm_area Just manually pre-fault the PTEs using apply_to_page_range. Co-developed-by: Minchan Kim Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Cc: Boris Ostrovsky Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Juergen Gross Cc: Matthew Auld Cc: "Matthew Wilcox (Oracle)" Cc: Nitin Gupta Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Stefano Stabellini Cc: Tvrtko Ursulin Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002122204.1534411-6-hch@lst.de Signed-off-by: Linus Torvalds commit eeb4a05fcef39a720d24846356cf65a07e71d7a1 Author: Christoph Hellwig Date: Sat Oct 17 16:15:14 2020 -0700 mm: allow a NULL fn callback in apply_to_page_range Besides calling the callback on each page, apply_to_page_range also has the effect of pre-faulting all PTEs for the range. To support callers that only need the pre-faulting, make the callback optional. Based on a patch from Minchan Kim . Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Cc: Boris Ostrovsky Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Juergen Gross Cc: Matthew Auld Cc: "Matthew Wilcox (Oracle)" Cc: Nitin Gupta Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Stefano Stabellini Cc: Tvrtko Ursulin Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002122204.1534411-5-hch@lst.de Signed-off-by: Linus Torvalds commit 3e9a9e256b1e1e6e8f19faf76fa9c37578ae35ee Author: Christoph Hellwig Date: Sat Oct 17 16:15:10 2020 -0700 mm: add a vmap_pfn function Add a proper helper to remap PFNs into kernel virtual space so that drivers don't have to abuse alloc_vm_area and open coded PTE manipulation for it. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Cc: Boris Ostrovsky Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Juergen Gross Cc: Matthew Auld Cc: "Matthew Wilcox (Oracle)" Cc: Minchan Kim Cc: Nitin Gupta Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Stefano Stabellini Cc: Tvrtko Ursulin Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002122204.1534411-4-hch@lst.de Signed-off-by: Linus Torvalds commit b944afc9d64ddf1b6a152c23ff86bf26e1fd430c Author: Christoph Hellwig Date: Sat Oct 17 16:15:06 2020 -0700 mm: add a VM_MAP_PUT_PAGES flag for vmap Add a flag so that vmap takes ownership of the passed in page array. When vfree is called on such an allocation it will put one reference on each page, and free the page array itself. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Cc: Boris Ostrovsky Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Juergen Gross Cc: Matthew Auld Cc: "Matthew Wilcox (Oracle)" Cc: Minchan Kim Cc: Nitin Gupta Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Stefano Stabellini Cc: Tvrtko Ursulin Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002122204.1534411-3-hch@lst.de Signed-off-by: Linus Torvalds commit fa307474c62186649d02d6ce46493a3013bff675 Author: Matthew Wilcox (Oracle) Date: Sat Oct 17 16:15:03 2020 -0700 mm: update the documentation for vfree Patch series "remove alloc_vm_area", v4. This series removes alloc_vm_area, which was left over from the big vmalloc interface rework. It is a rather arkane interface, basicaly the equivalent of get_vm_area + actually faulting in all PTEs in the allocated area. It was originally addeds for Xen (which isn't modular to start with), and then grew users in zsmalloc and i915 which seems to mostly qualify as abuses of the interface, especially for i915 as a random driver should not set up PTE bits directly. This patch (of 11): * Document that you can call vfree() on an address returned from vmap() * Remove the note about the minimum size -- the minimum size of a vmalloc allocation is one page * Add a Context: section * Fix capitalisation * Reword the prohibition on calling from NMI context to avoid a double negative Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Cc: Peter Zijlstra Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Matthew Auld Cc: Rodrigo Vivi Cc: Minchan Kim Cc: Matthew Wilcox Cc: Nitin Gupta Cc: Uladzislau Rezki (Sony) Link: https://lkml.kernel.org/r/20201002122204.1534411-1-hch@lst.de Link: https://lkml.kernel.org/r/20201002122204.1534411-2-hch@lst.de Signed-off-by: Linus Torvalds commit ecb8ac8b1f146915aa6b96449b66dd48984caacc Author: Minchan Kim Date: Sat Oct 17 16:14:59 2020 -0700 mm/madvise: introduce process_madvise() syscall: an external memory hinting API There is usecase that System Management Software(SMS) want to give a memory hint like MADV_[COLD|PAGEEOUT] to other processes and in the case of Android, it is the ActivityManagerService. The information required to make the reclaim decision is not known to the app. Instead, it is known to the centralized userspace daemon(ActivityManagerService), and that daemon must be able to initiate reclaim on its own without any app involvement. To solve the issue, this patch introduces a new syscall process_madvise(2). It uses pidfd of an external process to give the hint. It also supports vector address range because Android app has thousands of vmas due to zygote so it's totally waste of CPU and power if we should call the syscall one by one for each vma.(With testing 2000-vma syscall vs 1-vector syscall, it showed 15% performance improvement. I think it would be bigger in real practice because the testing ran very cache friendly environment). Another potential use case for the vector range is to amortize the cost ofTLB shootdowns for multiple ranges when using MADV_DONTNEED; this could benefit users like TCP receive zerocopy and malloc implementations. In future, we could find more usecases for other advises so let's make it happens as API since we introduce a new syscall at this moment. With that, existing madvise(2) user could replace it with process_madvise(2) with their own pid if they want to have batch address ranges support feature. ince it could affect other process's address range, only privileged process(PTRACE_MODE_ATTACH_FSCREDS) or something else(e.g., being the same UID) gives it the right to ptrace the process could use it successfully. The flag argument is reserved for future use if we need to extend the API. I think supporting all hints madvise has/will supported/support to process_madvise is rather risky. Because we are not sure all hints make sense from external process and implementation for the hint may rely on the caller being in the current context so it could be error-prone. Thus, I just limited hints as MADV_[COLD|PAGEOUT] in this patch. If someone want to add other hints, we could hear the usecase and review it for each hint. It's safer for maintenance rather than introducing a buggy syscall but hard to fix it later. So finally, the API is as follows, ssize_t process_madvise(int pidfd, const struct iovec *iovec, unsigned long vlen, int advice, unsigned int flags); DESCRIPTION The process_madvise() system call is used to give advice or directions to the kernel about the address ranges from external process as well as local process. It provides the advice to address ranges of process described by iovec and vlen. The goal of such advice is to improve system or application performance. The pidfd selects the process referred to by the PID file descriptor specified in pidfd. (See pidofd_open(2) for further information) The pointer iovec points to an array of iovec structures, defined in as: struct iovec { void *iov_base; /* starting address */ size_t iov_len; /* number of bytes to be advised */ }; The iovec describes address ranges beginning at address(iov_base) and with size length of bytes(iov_len). The vlen represents the number of elements in iovec. The advice is indicated in the advice argument, which is one of the following at this moment if the target process specified by pidfd is external. MADV_COLD MADV_PAGEOUT Permission to provide a hint to external process is governed by a ptrace access mode PTRACE_MODE_ATTACH_FSCREDS check; see ptrace(2). The process_madvise supports every advice madvise(2) has if target process is in same thread group with calling process so user could use process_madvise(2) to extend existing madvise(2) to support vector address ranges. RETURN VALUE On success, process_madvise() returns the number of bytes advised. This return value may be less than the total number of requested bytes, if an error occurred. The caller should check return value to determine whether a partial advice occurred. FAQ: Q.1 - Why does any external entity have better knowledge? Quote from Sandeep "For Android, every application (including the special SystemServer) are forked from Zygote. The reason of course is to share as many libraries and classes between the two as possible to benefit from the preloading during boot. After applications start, (almost) all of the APIs end up calling into this SystemServer process over IPC (binder) and back to the application. In a fully running system, the SystemServer monitors every single process periodically to calculate their PSS / RSS and also decides which process is "important" to the user for interactivity. So, because of how these processes start _and_ the fact that the SystemServer is looping to monitor each process, it does tend to *know* which address range of the application is not used / useful. Besides, we can never rely on applications to clean things up themselves. We've had the "hey app1, the system is low on memory, please trim your memory usage down" notifications for a long time[1]. They rely on applications honoring the broadcasts and very few do. So, if we want to avoid the inevitable killing of the application and restarting it, some way to be able to tell the OS about unimportant memory in these applications will be useful. - ssp Q.2 - How to guarantee the race(i.e., object validation) between when giving a hint from an external process and get the hint from the target process? process_madvise operates on the target process's address space as it exists at the instant that process_madvise is called. If the space target process can run between the time the process_madvise process inspects the target process address space and the time that process_madvise is actually called, process_madvise may operate on memory regions that the calling process does not expect. It's the responsibility of the process calling process_madvise to close this race condition. For example, the calling process can suspend the target process with ptrace, SIGSTOP, or the freezer cgroup so that it doesn't have an opportunity to change its own address space before process_madvise is called. Another option is to operate on memory regions that the caller knows a priori will be unchanged in the target process. Yet another option is to accept the race for certain process_madvise calls after reasoning that mistargeting will do no harm. The suggested API itself does not provide synchronization. It also apply other APIs like move_pages, process_vm_write. The race isn't really a problem though. Why is it so wrong to require that callers do their own synchronization in some manner? Nobody objects to write(2) merely because it's possible for two processes to open the same file and clobber each other's writes --- instead, we tell people to use flock or something. Think about mmap. It never guarantees newly allocated address space is still valid when the user tries to access it because other threads could unmap the memory right before. That's where we need synchronization by using other API or design from userside. It shouldn't be part of API itself. If someone needs more fine-grained synchronization rather than process level, there were two ideas suggested - cookie[2] and anon-fd[3]. Both are applicable via using last reserved argument of the API but I don't think it's necessary right now since we have already ways to prevent the race so don't want to add additional complexity with more fine-grained optimization model. To make the API extend, it reserved an unsigned long as last argument so we could support it in future if someone really needs it. Q.3 - Why doesn't ptrace work? Injecting an madvise in the target process using ptrace would not work for us because such injected madvise would have to be executed by the target process, which means that process would have to be runnable and that creates the risk of the abovementioned race and hinting a wrong VMA. Furthermore, we want to act the hint in caller's context, not the callee's, because the callee is usually limited in cpuset/cgroups or even freezed state so they can't act by themselves quick enough, which causes more thrashing/kill. It doesn't work if the target process are ptraced(e.g., strace, debugger, minidump) because a process can have at most one ptracer. [1] https://developer.android.com/topic/performance/memory" [2] process_getinfo for getting the cookie which is updated whenever vma of process address layout are changed - Daniel Colascione - https://lore.kernel.org/lkml/20190520035254.57579-1-minchan@kernel.org/T/#m7694416fd179b2066a2c62b5b139b14e3894e224 [3] anonymous fd which is used for the object(i.e., address range) validation - Michal Hocko - https://lore.kernel.org/lkml/20200120112722.GY18451@dhcp22.suse.cz/ [minchan@kernel.org: fix process_madvise build break for arm64] Link: http://lkml.kernel.org/r/20200303145756.GA219683@google.com [minchan@kernel.org: fix build error for mips of process_madvise] Link: http://lkml.kernel.org/r/20200508052517.GA197378@google.com [akpm@linux-foundation.org: fix patch ordering issue] [akpm@linux-foundation.org: fix arm64 whoops] [minchan@kernel.org: make process_madvise() vlen arg have type size_t, per Florian] [akpm@linux-foundation.org: fix i386 build] [sfr@canb.auug.org.au: fix syscall numbering] Link: https://lkml.kernel.org/r/20200905142639.49fc3f1a@canb.auug.org.au [sfr@canb.auug.org.au: madvise.c needs compat.h] Link: https://lkml.kernel.org/r/20200908204547.285646b4@canb.auug.org.au [minchan@kernel.org: fix mips build] Link: https://lkml.kernel.org/r/20200909173655.GC2435453@google.com [yuehaibing@huawei.com: remove duplicate header which is included twice] Link: https://lkml.kernel.org/r/20200915121550.30584-1-yuehaibing@huawei.com [minchan@kernel.org: do not use helper functions for process_madvise] Link: https://lkml.kernel.org/r/20200921175539.GB387368@google.com [akpm@linux-foundation.org: pidfd_get_pid() gained an argument] [sfr@canb.auug.org.au: fix up for "iov_iter: transparently handle compat iovecs in import_iovec"] Link: https://lkml.kernel.org/r/20200928212542.468e1fef@canb.auug.org.au Signed-off-by: Minchan Kim Signed-off-by: YueHaibing Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Reviewed-by: Suren Baghdasaryan Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Cc: Alexander Duyck Cc: Brian Geffon Cc: Christian Brauner Cc: Daniel Colascione Cc: Jann Horn Cc: Jens Axboe Cc: Joel Fernandes Cc: Johannes Weiner Cc: John Dias Cc: Kirill Tkhai Cc: Michal Hocko Cc: Oleksandr Natalenko Cc: Sandeep Patil Cc: SeongJae Park Cc: SeongJae Park Cc: Shakeel Butt Cc: Sonny Rao Cc: Tim Murray Cc: Christian Brauner Cc: Florian Weimer Cc: Link: http://lkml.kernel.org/r/20200302193630.68771-3-minchan@kernel.org Link: http://lkml.kernel.org/r/20200508183320.GA125527@google.com Link: http://lkml.kernel.org/r/20200622192900.22757-4-minchan@kernel.org Link: https://lkml.kernel.org/r/20200901000633.1920247-4-minchan@kernel.org Signed-off-by: Linus Torvalds commit 1aa92cd31c1c032ddfed27e79d646bbb429e9b52 Author: Minchan Kim Date: Sat Oct 17 16:14:54 2020 -0700 pid: move pidfd_get_pid() to pid.c process_madvise syscall needs pidfd_get_pid function to translate pidfd to pid so this patch move the function to kernel/pid.c. Suggested-by: Alexander Duyck Signed-off-by: Minchan Kim Signed-off-by: Andrew Morton Reviewed-by: Suren Baghdasaryan Reviewed-by: Alexander Duyck Reviewed-by: Vlastimil Babka Acked-by: Christian Brauner Acked-by: David Rientjes Cc: Jens Axboe Cc: Jann Horn Cc: Brian Geffon Cc: Daniel Colascione Cc: Joel Fernandes Cc: Johannes Weiner Cc: John Dias Cc: Kirill Tkhai Cc: Michal Hocko Cc: Oleksandr Natalenko Cc: Sandeep Patil Cc: SeongJae Park Cc: SeongJae Park Cc: Shakeel Butt Cc: Sonny Rao Cc: Tim Murray Cc: Christian Brauner Cc: Florian Weimer Cc: Link: http://lkml.kernel.org/r/20200302193630.68771-5-minchan@kernel.org Link: http://lkml.kernel.org/r/20200622192900.22757-3-minchan@kernel.org Link: https://lkml.kernel.org/r/20200901000633.1920247-3-minchan@kernel.org Signed-off-by: Linus Torvalds commit 0726b01e70455f9900ab524117c7b520d197dc8c Author: Minchan Kim Date: Sat Oct 17 16:14:50 2020 -0700 mm/madvise: pass mm to do_madvise Patch series "introduce memory hinting API for external process", v9. Now, we have MADV_PAGEOUT and MADV_COLD as madvise hinting API. With that, application could give hints to kernel what memory range are preferred to be reclaimed. However, in some platform(e.g., Android), the information required to make the hinting decision is not known to the app. Instead, it is known to a centralized userspace daemon(e.g., ActivityManagerService), and that daemon must be able to initiate reclaim on its own without any app involvement. To solve the concern, this patch introduces new syscall - process_madvise(2). Bascially, it's same with madvise(2) syscall but it has some differences. 1. It needs pidfd of target process to provide the hint 2. It supports only MADV_{COLD|PAGEOUT|MERGEABLE|UNMEREABLE} at this moment. Other hints in madvise will be opened when there are explicit requests from community to prevent unexpected bugs we couldn't support. 3. Only privileged processes can do something for other process's address space. For more detail of the new API, please see "mm: introduce external memory hinting API" description in this patchset. This patch (of 3): In upcoming patches, do_madvise will be called from external process context so we shouldn't asssume "current" is always hinted process's task_struct. Furthermore, we must not access mm_struct via task->mm, but obtain it via access_mm() once (in the following patch) and only use that pointer [1], so pass it to do_madvise() as well. Note the vma->vm_mm pointers are safe, so we can use them further down the call stack. And let's pass current->mm as arguments of do_madvise so it shouldn't change existing behavior but prepare next patch to make review easy. [vbabka@suse.cz: changelog tweak] [minchan@kernel.org: use current->mm for io_uring] Link: http://lkml.kernel.org/r/20200423145215.72666-1-minchan@kernel.org [akpm@linux-foundation.org: fix it for upstream changes] [akpm@linux-foundation.org: whoops] [rdunlap@infradead.org: add missing includes] Signed-off-by: Minchan Kim Signed-off-by: Andrew Morton Reviewed-by: Suren Baghdasaryan Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Cc: Jens Axboe Cc: Jann Horn Cc: Tim Murray Cc: Daniel Colascione Cc: Sandeep Patil Cc: Sonny Rao Cc: Brian Geffon Cc: Michal Hocko Cc: Johannes Weiner Cc: Shakeel Butt Cc: John Dias Cc: Joel Fernandes Cc: Alexander Duyck Cc: SeongJae Park Cc: Christian Brauner Cc: Kirill Tkhai Cc: Oleksandr Natalenko Cc: SeongJae Park Cc: Christian Brauner Cc: Florian Weimer Cc: Link: https://lkml.kernel.org/r/20200901000633.1920247-1-minchan@kernel.org Link: http://lkml.kernel.org/r/20200622192900.22757-1-minchan@kernel.org Link: http://lkml.kernel.org/r/20200302193630.68771-2-minchan@kernel.org Link: http://lkml.kernel.org/r/20200622192900.22757-2-minchan@kernel.org Link: https://lkml.kernel.org/r/20200901000633.1920247-2-minchan@kernel.org Signed-off-by: Linus Torvalds commit 255965309104fc62e3161997b93aea31c2c59941 Author: John Hubbard Date: Sat Oct 17 16:14:47 2020 -0700 selftests/vm: 10x speedup for hmm-tests This patch reduces the running time for hmm-tests from about 10+ seconds, to just under 1.0 second, for an approximately 10x speedup. That brings it in line with most of the other tests in selftests/vm, which mostly run in < 1 sec. This is done with a one-line change that simply reduces the number of iterations of several tests, from 256, to 10. Thanks to Ralph Campbell for suggesting changing NTIMES as a way to get the speedup. Suggested-by: Ralph Campbell Signed-off-by: John Hubbard Signed-off-by: Andrew Morton Cc: SeongJae Park Cc: Shuah Khan Link: https://lkml.kernel.org/r/20201003011721.44238-1-jhubbard@nvidia.com Signed-off-by: Linus Torvalds commit b2767d97f5ff758250cf28684aaa48bbfd34145f Author: Jann Horn Date: Sat Oct 17 16:14:15 2020 -0700 binfmt_elf: take the mmap lock around find_extend_vma() create_elf_tables() runs after setup_new_exec(), so other tasks can already access our new mm and do things like process_madvise() on it. (At the time I'm writing this commit, process_madvise() is not in mainline yet, but has been in akpm's tree for some time.) While I believe that there are currently no APIs that would actually allow another process to mess up our VMA tree (process_madvise() is limited to MADV_COLD and MADV_PAGEOUT, and uring and userfaultfd cannot reach an mm under which no syscalls have been executed yet), this seems like an accident waiting to happen. Let's make sure that we always take the mmap lock around GUP paths as long as another process might be able to see the mm. (Yes, this diff looks suspicious because we drop the lock before doing anything with `vma`, but that's because we actually don't do anything with it apart from the NULL check.) Signed-off-by: Jann Horn Signed-off-by: Andrew Morton Acked-by: Michel Lespinasse Cc: "Eric W . Biederman" Cc: Jason Gunthorpe Cc: John Hubbard Cc: Mauro Carvalho Chehab Cc: Sakari Ailus Link: https://lkml.kernel.org/r/CAG48ez1-PBCdv3y8pn-Ty-b+FmBSLwDuVKFSt8h7wARLy0dF-Q@mail.gmail.com Signed-off-by: Linus Torvalds commit f3964599c22f70c37544c06b6b232c42746b940b Author: Jann Horn Date: Sat Oct 17 16:14:12 2020 -0700 mm/gup_benchmark: take the mmap lock around GUP To be safe against concurrent changes to the VMA tree, we must take the mmap lock around GUP operations (excluding the GUP-fast family of operations, which will take the mmap lock by themselves if necessary). This code is only for testing, and it's only reachable by root through debugfs, so this doesn't really have any impact; however, if we want to add lockdep asserts into the GUP path, we need to have clean locking here. Signed-off-by: Jann Horn Signed-off-by: Andrew Morton Reviewed-by: Jason Gunthorpe Reviewed-by: John Hubbard Acked-by: Michel Lespinasse Cc: "Eric W . Biederman" Cc: Mauro Carvalho Chehab Cc: Sakari Ailus Link: https://lkml.kernel.org/r/CAG48ez3SG6ngZLtasxJ6LABpOnqCz5-QHqb0B4k44TQ8F9n6+w@mail.gmail.com Signed-off-by: Linus Torvalds commit fb8090b699c3e147e5bef8e0008edc3bddc33fad Author: Liam R. Howlett Date: Sat Oct 17 16:14:09 2020 -0700 mm/mmap: add inline munmap_vma_range() for code readability There are two locations that have a block of code for munmapping a vma range. Change those two locations to use a function and add meaningful comments about what happens to the arguments, which was unclear in the previous code. Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/20200818154707.2515169-2-Liam.Howlett@Oracle.com Signed-off-by: Linus Torvalds commit 3903b55a6117ee5a8c90108beaf8d921474aa05a Author: Liam R. Howlett Date: Sat Oct 17 16:14:06 2020 -0700 mm/mmap: add inline vma_next() for readability of mmap code There are three places that the next vma is required which uses the same block of code. Replace the block with a function and add comments on what happens in the case where NULL is encountered. Signed-off-by: Liam R. Howlett Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/20200818154707.2515169-1-Liam.Howlett@Oracle.com Signed-off-by: Linus Torvalds commit 4dc200cee1950ac3f9b99f0c8d4a750b62958f81 Author: Miaohe Lin Date: Sat Oct 17 16:14:03 2020 -0700 mm/migrate: avoid possible unnecessary process right check in kernel_move_pages() There is no need to check if this process has the right to modify the specified process when they are same. And we could also skip the security hook call if a process is modifying its own pages. Add helper function to handle these. Suggested-by: Matthew Wilcox Signed-off-by: Hongxiang Lou Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Cc: Christopher Lameter Link: https://lkml.kernel.org/r/20200819083331.19012-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit 203e6e5ca4eac64c8909debfd64aae3fd62b2a16 Author: Joonsoo Kim Date: Sat Oct 17 16:14:00 2020 -0700 mm/memory_hotplug: remove a wrapper for alloc_migration_target() To calculate the correct node to migrate the page for hotplug, we need to check node id of the page. Wrapper for alloc_migration_target() exists for this purpose. However, Vlastimil informs that all migration source pages come from a single node. In this case, we don't need to check the node id for each page and we don't need to re-set the target nodemask for each page by using the wrapper. Set up the migration_target_control once and use it for all pages. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Christoph Hellwig Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Roman Gushchin Link: http://lkml.kernel.org/r/1594622517-20681-10-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit 546087599986be4fe4e39a621cc0828e832caccb Author: Joonsoo Kim Date: Sat Oct 17 16:13:57 2020 -0700 mm/memory-failure: remove a wrapper for alloc_migration_target() There is a well-defined standard migration target callback. Use it directly. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Christoph Hellwig Cc: Michal Hocko Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Roman Gushchin Link: http://lkml.kernel.org/r/1594622517-20681-9-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit 4127c6504f25c4fcff52dc996efda2ef859dd661 Author: Roman Gushchin Date: Sat Oct 17 16:13:53 2020 -0700 mm: kmem: enable kernel memcg accounting from interrupt contexts If a memcg to charge can be determined (using remote charging API), there are no reasons to exclude allocations made from an interrupt context from the accounting. Such allocations will pass even if the resulting memcg size will exceed the hard limit, but it will affect the application of the memory pressure and an inability to put the workload under the limit will eventually trigger the OOM. To use active_memcg() helper, memcg_kmem_bypass() is moved back to memcontrol.c. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Link: http://lkml.kernel.org/r/20200827225843.1270629-5-guro@fb.com Signed-off-by: Linus Torvalds commit 37d5985c003daab138a72dd4af9853b396d91c26 Author: Roman Gushchin Date: Sat Oct 17 16:13:50 2020 -0700 mm: kmem: prepare remote memcg charging infra for interrupt contexts Remote memcg charging API uses current->active_memcg to store the currently active memory cgroup, which overwrites the memory cgroup of the current process. It works well for normal contexts, but doesn't work for interrupt contexts: indeed, if an interrupt occurs during the execution of a section with an active memcg set, all allocations inside the interrupt will be charged to the active memcg set (given that we'll enable accounting for allocations from an interrupt context). But because the interrupt might have no relation to the active memcg set outside, it's obviously wrong from the accounting prospective. To resolve this problem, let's add a global percpu int_active_memcg variable, which will be used to store an active memory cgroup which will be used from interrupt contexts. set_active_memcg() will transparently use current->active_memcg or int_active_memcg depending on the context. To make the read part simple and transparent for the caller, let's introduce two new functions: - struct mem_cgroup *active_memcg(void), - struct mem_cgroup *get_active_memcg(void). They are returning the active memcg if it's set, hiding all implementation details: where to get it depending on the current context. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Link: http://lkml.kernel.org/r/20200827225843.1270629-4-guro@fb.com Signed-off-by: Linus Torvalds commit 67f0286498d7486a9c35f081df1dffe2ffcd02b9 Author: Roman Gushchin Date: Sat Oct 17 16:13:47 2020 -0700 mm: kmem: remove redundant checks from get_obj_cgroup_from_current() There are checks for current->mm and current->active_memcg in get_obj_cgroup_from_current(), but these checks are redundant: memcg_kmem_bypass() called just above performs same checks. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Link: http://lkml.kernel.org/r/20200827225843.1270629-3-guro@fb.com Signed-off-by: Linus Torvalds commit 279c3393e2c113365c999f16cd096bcf3d34319e Author: Roman Gushchin Date: Sat Oct 17 16:13:44 2020 -0700 mm: kmem: move memcg_kmem_bypass() calls to get_mem/obj_cgroup_from_current() Patch series "mm: kmem: kernel memory accounting in an interrupt context". This patchset implements memcg-based memory accounting of allocations made from an interrupt context. Historically, such allocations were passed unaccounted mostly because charging the memory cgroup of the current process wasn't an option. Also performance reasons were likely a reason too. The remote charging API allows to temporarily overwrite the currently active memory cgroup, so that all memory allocations are accounted towards some specified memory cgroup instead of the memory cgroup of the current process. This patchset extends the remote charging API so that it can be used from an interrupt context. Then it removes the fence that prevented the accounting of allocations made from an interrupt context. It also contains a couple of optimizations/code refactorings. This patchset doesn't directly enable accounting for any specific allocations, but prepares the code base for it. The bpf memory accounting will likely be the first user of it: a typical example is a bpf program parsing an incoming network packet, which allocates an entry in hashmap map to store some information. This patch (of 4): Currently memcg_kmem_bypass() is called before obtaining the current memory/obj cgroup using get_mem/obj_cgroup_from_current(). Moving memcg_kmem_bypass() into get_mem/obj_cgroup_from_current() reduces the number of call sites and allows further code simplifications. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Link: http://lkml.kernel.org/r/20200827225843.1270629-1-guro@fb.com Link: http://lkml.kernel.org/r/20200827225843.1270629-2-guro@fb.com Signed-off-by: Linus Torvalds commit b87d8cefe43c7f22e8aa13919c1dfa2b4b4b4e01 Author: Roman Gushchin Date: Sat Oct 17 16:13:40 2020 -0700 mm, memcg: rework remote charging API to support nesting Currently the remote memcg charging API consists of two functions: memalloc_use_memcg() and memalloc_unuse_memcg(), which set and clear the memcg value, which overwrites the memcg of the current task. memalloc_use_memcg(target_memcg); <...> memalloc_unuse_memcg(); It works perfectly for allocations performed from a normal context, however an attempt to call it from an interrupt context or just nest two remote charging blocks will lead to an incorrect accounting. On exit from the inner block the active memcg will be cleared instead of being restored. memalloc_use_memcg(target_memcg); memalloc_use_memcg(target_memcg_2); <...> memalloc_unuse_memcg(); Error: allocation here are charged to the memcg of the current process instead of target_memcg. memalloc_unuse_memcg(); This patch extends the remote charging API by switching to a single function: struct mem_cgroup *set_active_memcg(struct mem_cgroup *memcg), which sets the new value and returns the old one. So a remote charging block will look like: old_memcg = set_active_memcg(target_memcg); <...> set_active_memcg(old_memcg); This patch is heavily based on the patch by Johannes Weiner, which can be found here: https://lkml.org/lkml/2020/5/28/806 . Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Cc: Johannes Weiner Cc: Dan Schatzberg Link: https://lkml.kernel.org/r/20200821212056.3769116-1-guro@fb.com Signed-off-by: Linus Torvalds commit 7404840d87557c4092bf0272bce5e0354c774bf9 Author: Krzysztof Kozlowski Date: Sat Oct 17 16:13:37 2020 -0700 ia64: fix build error with !COREDUMP Fix linkage error when CONFIG_BINFMT_ELF is selected but CONFIG_COREDUMP is not: ia64-linux-ld: arch/ia64/kernel/elfcore.o: in function `elf_core_write_extra_phdrs': elfcore.c:(.text+0x172): undefined reference to `dump_emit' ia64-linux-ld: arch/ia64/kernel/elfcore.o: in function `elf_core_write_extra_data': elfcore.c:(.text+0x2b2): undefined reference to `dump_emit' Fixes: 1fcccbac89f5 ("elf coredump: replace ELF_CORE_EXTRA_* macros by functions") Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andrew Morton Cc: Tony Luck Cc: Fenghua Yu Cc: Link: https://lkml.kernel.org/r/20200819064146.12529-1-krzk@kernel.org Signed-off-by: Linus Torvalds commit e0770e91424f694b461141cbc99adf6b23006b60 Author: Jan Kara Date: Thu Oct 15 13:03:30 2020 +0200 ext4: Detect already used quota file early When we try to use file already used as a quota file again (for the same or different quota type), strange things can happen. At the very least lockdep annotations may be wrong but also inode flags may be wrongly set / reset. When the file is used for two quota types at once we can even corrupt the file and likely crash the kernel. Catch all these cases by checking whether passed file is already used as quota file and bail early in that case. This fixes occasional generic/219 failure due to lockdep complaint. Reviewed-by: Andreas Dilger Reported-by: Ritesh Harjani Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20201015110330.28716-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit fc750a3b44bdccb9fb96d6abbc48a9b8e480ce7b Author: changfengnan Date: Mon Oct 12 18:49:00 2020 +0200 jbd2: avoid transaction reuse after reformatting When ext4 is formatted with lazy_journal_init=1 and transactions from the previous filesystem are still on disk, it is possible that they are considered during a recovery after a crash. Because the checksum seed has changed, the CRC check will fail, and the journal recovery fails with checksum error although the journal is otherwise perfectly valid. Fix the problem by checking commit block time stamps to determine whether the data in the journal block is just stale or whether it is indeed corrupt. Reported-by: kernel test robot Reviewed-by: Andreas Dilger Signed-off-by: Fengnan Chang Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20201012164900.20197-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit d3e7d20befd9d07db2955015a3f294c0a0a771d3 Author: Kaixu Xia Date: Sat Oct 10 16:10:16 2020 +0800 ext4: use the normal helper to get the actual inode Here we use the READ_ONCE to fix race conditions in ->d_compare() and ->d_hash() when they are called in RCU-walk mode, seems we can use the normal helper d_inode_rcu() to get the actual inode. Signed-off-by: Kaixu Xia Reviewed-by: Lukas Czerner Link: https://lore.kernel.org/r/1602317416-1260-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Theodore Ts'o commit d1e18b8824dd50cff255e6cecf515ea598eaf9f0 Author: Ritesh Harjani Date: Thu Oct 8 20:32:48 2020 +0530 ext4: fix bs < ps issue reported with dioread_nolock mount opt left shifting m_lblk by blkbits was causing value overflow and hence it was not able to convert unwritten to written extent. So, make sure we typecast it to loff_t before do left shift operation. Also in func ext4_convert_unwritten_io_end_vec(), make sure to initialize ret variable to avoid accidentally returning an uninitialized ret. This patch fixes the issue reported in ext4 for bs < ps with dioread_nolock mount option. Fixes: c8cc88163f40df39e50c ("ext4: Add support for blocksize < pagesize in dioread_nolock") Cc: stable@kernel.org Reported-by: Aneesh Kumar K.V Signed-off-by: Ritesh Harjani Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/af902b5db99e8b73980c795d84ad7bb417487e76.1602168865.git.riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit afb585a97f81899e39c14658789f02259d8c306a Author: Mauricio Faria de Oliveira Date: Mon Oct 5 21:48:41 2020 -0300 ext4: data=journal: write-protect pages on j_submit_inode_data_buffers() This implements journal callbacks j_submit|finish_inode_data_buffers() with different behavior for data=journal: to write-protect pages under commit, preventing changes to buffers writeably mapped to userspace. If a buffer's content changes between commit's checksum calculation and write-out to disk, it can cause journal recovery/mount failures upon a kernel crash or power loss. [ 27.334874] EXT4-fs: Warning: mounting with data=journal disables delayed allocation, dioread_nolock, and O_DIRECT support! [ 27.339492] JBD2: Invalid checksum recovering data block 8705 in log [ 27.342716] JBD2: recovery failed [ 27.343316] EXT4-fs (loop0): error loading journal mount: /ext4: can't read superblock on /dev/loop0. In j_submit_inode_data_buffers() we write-protect the inode's pages with write_cache_pages() and redirty w/ writepage callback if needed. In j_finish_inode_data_buffers() there is nothing do to. And in order to use the callbacks, inodes are added to the inode list in transaction in __ext4_journalled_writepage() and ext4_page_mkwrite(). In ext4_page_mkwrite() we must make sure that the buffers are attached to the transaction as jbddirty with write_end_fn(), as already done in __ext4_journalled_writepage(). Signed-off-by: Mauricio Faria de Oliveira Reported-by: Dann Frazier Reported-by: kernel test robot # wbc.nr_to_write Suggested-by: Jan Kara Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20201006004841.600488-5-mfo@canonical.com Signed-off-by: Theodore Ts'o commit 64a9f1449950c774743420cf374047043e32fde4 Author: Mauricio Faria de Oliveira Date: Mon Oct 5 21:48:40 2020 -0300 ext4: data=journal: fixes for ext4_page_mkwrite() These are two fixes for data journalling required by the next patch, discovered while testing it. First, the optimization to return early if all buffers are mapped is not appropriate for the next patch: The inode _must_ be added to the transaction's list in data=journal mode (so to write-protect pages on commit) thus we cannot return early there. Second, once that optimization to reduce transactions was disabled for data=journal mode, more transactions happened, and occasionally hit this warning message: 'JBD2: Spotted dirty metadata buffer'. Reason is, block_page_mkwrite() will set_buffer_dirty() before do_journal_get_write_access() that is there to prevent it. This issue was masked by the optimization. So, on data=journal use __block_write_begin() instead. This also requires page locking and len recalculation. (see block_page_mkwrite() for implementation details.) Finally, as Jan noted there is little sharing between data=journal and other modes in ext4_page_mkwrite(). However, a prototype of ext4_journalled_page_mkwrite() showed there still would be lots of duplicated lines (tens of) that didn't seem worth it. Thus this patch ends up with an ugly goto to skip all non-data journalling code (to avoid long indentations, but that can be changed..) in the beginning, and just a conditional in the transaction section. Well, we skip a common part to data journalling which is the page truncated check, but we do it again after ext4_journal_start() when we re-acquire the page lock (so not to acquire the page lock twice needlessly for data journalling.) Signed-off-by: Mauricio Faria de Oliveira Suggested-by: Jan Kara Reviewed-by: Jan Kara Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201006004841.600488-4-mfo@canonical.com Signed-off-by: Theodore Ts'o commit 342af94ec6c02aa478fe2adcd41b950e154b03ba Author: Mauricio Faria de Oliveira Date: Mon Oct 5 21:48:39 2020 -0300 jbd2, ext4, ocfs2: introduce/use journal callbacks j_submit|finish_inode_data_buffers() Introduce journal callbacks to allow different behaviors for an inode in journal_submit|finish_inode_data_buffers(). The existing users of the current behavior (ext4, ocfs2) are adapted to use the previously exported functions that implement the current behavior. Users are callers of jbd2_journal_inode_ranged_write|wait(), which adds the inode to the transaction's inode list with the JI_WRITE|WAIT_DATA flags. Only ext4 and ocfs2 in-tree. Both CONFIG_EXT4_FS and CONFIG_OCSFS2_FS select CONFIG_JBD2, which builds fs/jbd2/commit.c and journal.c that define and export the functions, so we can call directly in ext4/ocfs2. Signed-off-by: Mauricio Faria de Oliveira Suggested-by: Jan Kara Reviewed-by: Jan Kara Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201006004841.600488-3-mfo@canonical.com Signed-off-by: Theodore Ts'o commit aa3c0c61f62d682259e3e66cdc01846290f9cd6c Author: Mauricio Faria de Oliveira Date: Mon Oct 5 21:48:38 2020 -0300 jbd2: introduce/export functions jbd2_journal_submit|finish_inode_data_buffers() Export functions that implement the current behavior done for an inode in journal_submit|finish_inode_data_buffers(). No functional change. Signed-off-by: Mauricio Faria de Oliveira Suggested-by: Jan Kara Reviewed-by: Jan Kara Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20201006004841.600488-2-mfo@canonical.com Signed-off-by: Theodore Ts'o commit 8394a6abf3aeaa02e30fd33c248adab9fbe6fd6c Author: zhangyi (F) Date: Thu Sep 24 15:33:37 2020 +0800 ext4: introduce ext4_sb_bread_unmovable() to replace sb_bread_unmovable() Now we only use sb_bread_unmovable() to read superblock and descriptor block at mount time, so there is no opportunity that we need to clear buffer verified bit and also handle buffer write_io error bit. But for the sake of unification, let's introduce ext4_sb_bread_unmovable() to replace all sb_bread_unmovable(). After this patch, we stop using read helpers in fs/buffer.c. Signed-off-by: zhangyi (F) Link: https://lore.kernel.org/r/20200924073337.861472-8-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 0a846f496db1d3996341e140364aa58563d1ebe1 Author: zhangyi (F) Date: Thu Sep 24 15:33:36 2020 +0800 ext4: use ext4_sb_bread() instead of sb_bread() We have already remove open codes that invoke helpers provide by fs/buffer.c in all places reading metadata buffers. This patch switch to use ext4_sb_bread() to replace all sb_bread() helpers, which is ext4_read_bh() helper back end. Signed-off-by: zhangyi (F) Link: https://lore.kernel.org/r/20200924073337.861472-7-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 5df1d4123d53261d9d71c7d237d0f165add7ce72 Author: zhangyi (F) Date: Thu Sep 24 15:33:35 2020 +0800 ext4: introduce ext4_sb_breadahead_unmovable() to replace sb_breadahead_unmovable() If we readahead inode tables in __ext4_get_inode_loc(), it may bypass buffer_write_io_error() check, so introduce ext4_sb_breadahead_unmovable() to handle this special case. This patch also replace sb_breadahead_unmovable() in ext4_fill_super() for the sake of unification. Signed-off-by: zhangyi (F) Link: https://lore.kernel.org/r/20200924073337.861472-6-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 60c776e50bc52a9334be8a49415479d5cb6ca2e2 Author: zhangyi (F) Date: Thu Sep 24 15:33:34 2020 +0800 ext4: use ext4_buffer_uptodate() in __ext4_get_inode_loc() We have already introduced ext4_buffer_uptodate() to re-set the uptodate bit on buffer which has been failed to write out to disk. Just remove the redundant codes and switch to use ext4_buffer_uptodate() in __ext4_get_inode_loc(). Signed-off-by: zhangyi (F) Link: https://lore.kernel.org/r/20200924073337.861472-5-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 2d069c0889ef0decda7af6ecbdc63b680b767749 Author: zhangyi (F) Date: Thu Sep 24 15:33:33 2020 +0800 ext4: use common helpers in all places reading metadata buffers Revome all open codes that read metadata buffers, switch to use ext4_read_bh_*() common helpers. Signed-off-by: zhangyi (F) Suggested-by: Jan Kara Link: https://lore.kernel.org/r/20200924073337.861472-4-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit fa491b14cd9586ad703606ef0155cd43459d2b32 Author: zhangyi (F) Date: Thu Sep 24 15:33:32 2020 +0800 ext4: introduce new metadata buffer read helpers The previous patch add clear_buffer_verified() before we read metadata block from disk again, but it's rather easy to miss clearing of this bit because currently we read metadata buffer through different open codes (e.g. ll_rw_block(), bh_submit_read() and invoke submit_bh() directly). So, it's time to add common helpers to unify in all the places reading metadata buffers instead. This patch add 3 helpers: - ext4_read_bh_nowait(): async read metadata buffer if it's actually not uptodate, clear buffer_verified bit before read from disk. - ext4_read_bh(): sync version of read metadata buffer, it will wait until the read operation return and check the return status. - ext4_read_bh_lock(): try to lock the buffer before read buffer, it will skip reading if the buffer is already locked. After this patch, we need to use these helpers in all the places reading metadata buffer instead of different open codes. Signed-off-by: zhangyi (F) Suggested-by: Jan Kara Link: https://lore.kernel.org/r/20200924073337.861472-3-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit d9befedaafcf3a111428baa7c45b02923eab2d87 Author: zhangyi (F) Date: Thu Sep 24 15:33:31 2020 +0800 ext4: clear buffer verified flag if read meta block from disk The metadata buffer is no longer trusted after we read it from disk again because it is not uptodate for some reasons (e.g. failed to write back). Otherwise we may get below memory corruption problem in ext4_ext_split()->memset() if we read stale data from the newly allocated extent block on disk which has been failed to async write out but miss verify again since the verified bit has already been set on the buffer. [ 29.774674] BUG: unable to handle kernel paging request at ffff88841949d000 ... [ 29.783317] Oops: 0002 [#2] SMP [ 29.784219] R10: 00000000000f4240 R11: 0000000000002e28 R12: ffff88842fa1c800 [ 29.784627] CPU: 1 PID: 126 Comm: kworker/u4:3 Tainted: G D W [ 29.785546] R13: ffffffff9cddcc20 R14: ffffffff9cddd420 R15: ffff88842fa1c2f8 [ 29.786679] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),BIOS ?-20190727_0738364 [ 29.787588] FS: 0000000000000000(0000) GS:ffff88842fa00000(0000) knlGS:0000000000000000 [ 29.789288] Workqueue: writeback wb_workfn [ 29.790319] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 29.790321] (flush-8:0) [ 29.790844] CR2: 0000000000000008 CR3: 00000004234f2000 CR4: 00000000000006f0 [ 29.791924] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 29.792839] RIP: 0010:__memset+0x24/0x30 [ 29.793739] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 29.794256] Code: 90 90 90 90 90 90 0f 1f 44 00 00 49 89 f9 48 89 d1 83 e2 07 48 c1 e9 033 [ 29.795161] Kernel panic - not syncing: Fatal exception in interrupt ... [ 29.808149] Call Trace: [ 29.808475] ext4_ext_insert_extent+0x102e/0x1be0 [ 29.809085] ext4_ext_map_blocks+0xa89/0x1bb0 [ 29.809652] ext4_map_blocks+0x290/0x8a0 [ 29.809085] ext4_ext_map_blocks+0xa89/0x1bb0 [ 29.809652] ext4_map_blocks+0x290/0x8a0 [ 29.810161] ext4_writepages+0xc85/0x17c0 ... Fix this by clearing buffer's verified bit if we read meta block from disk again. Signed-off-by: zhangyi (F) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200924073337.861472-2-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit af8c53c8bc087459b1aadd4c94805d8272358d79 Author: Darrick J. Wong Date: Thu Oct 1 15:21:48 2020 -0700 ext4: limit entries returned when counting fsmap records If userspace asked fsmap to try to count the number of entries, we cannot return more than UINT_MAX entries because fmh_entries is u32. Therefore, stop counting if we hit this limit or else we will waste time to return truncated results. Fixes: 0c9ec4beecac ("ext4: support GETFSMAP ioctls") Signed-off-by: Darrick J. Wong Link: https://lore.kernel.org/r/20201001222148.GA49520@magnolia Signed-off-by: Theodore Ts'o commit addd752cff27774258f593c68d283725398689c4 Author: Chunguang Xu Date: Mon Sep 28 19:36:35 2020 +0800 ext4: make mb_check_counter per group Make bb_check_counter per group, so each group has the same chance to be checked, which can expose errors more easily. Signed-off-by: Chunguang Xu Link: https://lore.kernel.org/r/1601292995-32205-2-git-send-email-brookxu@tencent.com Signed-off-by: Theodore Ts'o commit 9d1f9b27704009a0032c9a70f8a44cfb331971b5 Author: Chunguang Xu Date: Mon Sep 28 19:36:34 2020 +0800 ext4: delete invalid comments near mb_buddy_adjust_border The comment near mb_buddy_adjust_border seems meaningless, just clear it. Signed-off-by: Chunguang Xu Link: https://lore.kernel.org/r/1601292995-32205-1-git-send-email-brookxu@tencent.com Signed-off-by: Theodore Ts'o commit 9704a322ea67fdb05fc66cf431fdd01c2424bbd9 Author: Zhang Xiaoxu Date: Sun Sep 27 22:05:56 2020 -0400 ext4: fix bdev write error check failed when mount fs with ro Consider a situation when a filesystem was uncleanly shutdown and the orphan list is not empty and a read-only mount is attempted. The orphan list cleanup during mount will fail with: ext4_check_bdev_write_error:193: comm mount: Error while async write back metadata This happens because sbi->s_bdev_wb_err is not initialized when mounting the filesystem in read only mode and so ext4_check_bdev_write_error() falsely triggers. Initialize sbi->s_bdev_wb_err unconditionally to avoid this problem. Fixes: bc71726c7257 ("ext4: abort the filesystem if failed to async write metadata buffer") Cc: stable@kernel.org Signed-off-by: Zhang Xiaoxu Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20200928020556.710971-1-zhangxiaoxu5@huawei.com Signed-off-by: Theodore Ts'o commit dd0db94f305c9f5dd44d0ecc7bf29944d4867074 Author: Chunguang Xu Date: Thu Sep 24 11:03:43 2020 +0800 ext4: rename system_blks to s_system_blks inside ext4_sb_info Rename system_blks to s_system_blks inside ext4_sb_info, keep the naming rules consistent with other variables, which is convenient for code reading and writing. Signed-off-by: Chunguang Xu Reviewed-by: Andreas Dilger Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/1600916623-544-2-git-send-email-brookxu@tencent.com Signed-off-by: Theodore Ts'o commit ee7ed3aa0f08621dbf897d2a98dc6f2c7e7d0335 Author: Chunguang Xu Date: Thu Sep 24 11:03:42 2020 +0800 ext4: rename journal_dev to s_journal_dev inside ext4_sb_info Rename journal_dev to s_journal_dev inside ext4_sb_info, keep the naming rules consistent with other variables, which is convenient for code reading and writing. Signed-off-by: Chunguang Xu Reviewed-by: Andreas Dilger Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/1600916623-544-1-git-send-email-brookxu@tencent.com Signed-off-by: Theodore Ts'o commit 15a119e09344a346384ec05c781c126a29b18235 Author: Hui Su Date: Wed Sep 23 01:12:31 2020 +0800 jbd2: fix the comment of struct jbd2_journal_handle the struct name was modified long ago, but the comment still use struct handle_s. Signed-off-by: Hui Su Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20200922171231.GA53120@rlk Signed-off-by: Theodore Ts'o commit 2be7d717cafc893d4487cbc7f018d1174537fa2e Author: Zhang Qilong Date: Mon Sep 21 20:47:38 2020 +0800 ext4: add trace exit in exception path. Missing trace exit in exception path of ext4_sync_file and ext4_ind_map_blocks. Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20200921124738.23352-1-zhangqilong3@huawei.com Signed-off-by: Theodore Ts'o commit 9faac62d40131521973192e46a82d5066bb42c09 Author: Ritesh Harjani Date: Fri Sep 18 10:36:35 2020 +0530 ext4: optimize file overwrites In case if the file already has underlying blocks/extents allocated then we don't need to start a journal txn and can directly return the underlying mapping. Currently ext4_iomap_begin() is used by both DAX & DIO path. We can check if the write request is an overwrite & then directly return the mapping information. This could give a significant perf boost for multi-threaded writes specially random overwrites. On PPC64 VM with simulated pmem(DAX) device, ~10x perf improvement could be seen in random writes (overwrite). Also bcoz this optimizes away the spinlock contention during jbd2 slab cache allocation (jbd2_journal_handle). On x86 VM, ~2x perf improvement was observed. Reported-by: Dan Williams Reviewed-by: Jan Kara Signed-off-by: Ritesh Harjani Link: https://lore.kernel.org/r/88e795d8a4d5cd22165c7ebe857ba91d68d8813e.1600401668.git.riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit 7eb90a2d6a4817d73165a2a1addd5ead2fcb74b1 Author: Tian Tao Date: Fri Sep 18 10:46:05 2020 +0800 ext4: remove unused including Remove including that don't need it. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1600397165-42873-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Theodore Ts'o commit acaa532687cdc3a03757defafece9c27aa667546 Author: Constantine Sapuntzakis Date: Mon Sep 14 10:10:14 2020 -0600 ext4: fix superblock checksum calculation race The race condition could cause the persisted superblock checksum to not match the contents of the superblock, causing the superblock to be considered corrupt. An example of the race follows. A first thread is interrupted in the middle of a checksum calculation. Then, another thread changes the superblock, calculates a new checksum, and sets it. Then, the first thread resumes and sets the checksum based on the older superblock. To fix, serialize the superblock checksum calculation using the buffer header lock. While a spinlock is sufficient, the buffer header is already there and there is precedent for locking it (e.g. in ext4_commit_super). Tested the patch by booting up a kernel with the patch, creating a filesystem and some files (including some orphans), and then unmounting and remounting the file system. Cc: stable@kernel.org Signed-off-by: Constantine Sapuntzakis Reviewed-by: Jan Kara Suggested-by: Jan Kara Link: https://lore.kernel.org/r/20200914161014.22275-1-costa@purestorage.com Signed-off-by: Theodore Ts'o commit c9e87161cc621cbdcfc472fa0b2d81c63780c8f5 Author: Dinghao Liu Date: Sat Aug 29 10:54:02 2020 +0800 ext4: fix error handling code in add_new_gdb When ext4_journal_get_write_access() fails, we should terminate the execution flow and release n_group_desc, iloc.bh, dind and gdb_bh. Cc: stable@kernel.org Signed-off-by: Dinghao Liu Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20200829025403.3139-1-dinghao.liu@zju.edu.cn Signed-off-by: Theodore Ts'o commit aa2f77920b743c44e02e2dc8474bbf8bd30007a2 Author: Xiao Yang Date: Fri Aug 28 16:43:30 2020 +0800 ext4: disallow modifying DAX inode flag if inline_data has been set inline_data is mutually exclusive to DAX so enabling both of them triggers the following issue: ------------------------------------------ # mkfs.ext4 -F -O inline_data /dev/pmem1 ... # mount /dev/pmem1 /mnt # echo 'test' >/mnt/file # lsattr -l /mnt/file /mnt/file Inline_Data # xfs_io -c "chattr +x" /mnt/file # xfs_io -c "lsattr -v" /mnt/file [dax] /mnt/file # umount /mnt # mount /dev/pmem1 /mnt # cat /mnt/file cat: /mnt/file: Numerical result out of range ------------------------------------------ Fixes: b383a73f2b83 ("fs/ext4: Introduce DAX inode flag") Signed-off-by: Xiao Yang Reviewed-by: Jan Kara Reviewed-by: Ira Weiny Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20200828084330.15776-1-yangx.jy@cn.fujitsu.com Signed-off-by: Theodore Ts'o commit 15ed2851b0f42d0dc42d7172f1eaa0bea57ff807 Author: Nikolay Borisov Date: Wed Aug 26 16:31:16 2020 +0300 ext4: remove unused argument from ext4_(inc|dec)_count The 'handle' argument is not used for anything so simply remove it. Signed-off-by: Nikolay Borisov Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20200826133116.11592-1-nborisov@suse.com Signed-off-by: Theodore Ts'o commit 81e8c3c50352f4eede634a89e018e3b3907c2d44 Author: Petr Malat Date: Tue Aug 25 17:00:16 2020 +0200 ext4: do not interpret high bytes if 64bit feature is disabled Fields s_free_blocks_count_hi, s_r_blocks_count_hi and s_blocks_count_hi are not valid if EXT4_FEATURE_INCOMPAT_64BIT is not enabled and should be treated as zeroes. Signed-off-by: Petr Malat Link: https://lore.kernel.org/r/20200825150016.3363-1-oss@malat.biz Signed-off-by: Theodore Ts'o commit b483bb77194b4ec462fb23ad3fd6a6b36a635340 Author: Randy Dunlap Date: Tue Aug 4 19:48:50 2020 -0700 ext4: delete duplicated words + other fixes Delete repeated words in fs/ext4/. {the, this, of, we, after} Also change spelling of "xttr" in inline.c to "xattr" in 2 places. Signed-off-by: Randy Dunlap Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20200805024850.12129-1-rdunlap@infradead.org Signed-off-by: Theodore Ts'o commit 766ef1e101cddc8f5e722f1c0147e9c0499a2d43 Author: Jens Axboe Date: Mon Aug 3 17:02:11 2020 -0600 ext4: flag as supporting buffered async reads ext4 uses generic_file_read_iter(), which already supports this. Cc: Theodore Ts'o Signed-off-by: Jens Axboe Link: https://lore.kernel.org/r/fb90cc2d-b12c-738f-21a4-dd7a8ae0556a@kernel.dk Signed-off-by: Theodore Ts'o commit cb8d53d2c97369029cc638c9274ac7be0a316c75 Author: Eric Biggers Date: Tue Sep 22 09:24:56 2020 -0700 ext4: fix leaking sysfs kobject after failed mount ext4_unregister_sysfs() only deletes the kobject. The reference to it needs to be put separately, like ext4_put_super() does. This addresses the syzbot report "memory leak in kobject_set_name_vargs (3)" (https://syzkaller.appspot.com/bug?extid=9f864abad79fae7c17e1). Reported-by: syzbot+9f864abad79fae7c17e1@syzkaller.appspotmail.com Fixes: 72ba74508b28 ("ext4: release sysfs kobject when failing to enable quotas on mount") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20200922162456.93657-1-ebiggers@kernel.org Reviewed-by: Jan Kara Signed-off-by: Theodore Ts'o commit 5b3dc19dda6691e8ab574e8eede1aef6f02a4f1c Author: Jan Kara Date: Thu Sep 24 17:09:59 2020 +0200 ext4: discard preallocations before releasing group lock ext4_mb_discard_group_preallocations() can be releasing group lock with preallocations accumulated on its local list. Thus although discard_pa_seq was incremented and concurrent allocating processes will be retrying allocations, it can happen that premature ENOSPC error is returned because blocks used for preallocations are not available for reuse yet. Make sure we always free locally accumulated preallocations before releasing group lock. Fixes: 07b5b8e1ac40 ("ext4: mballoc: introduce pcpu seqcnt for freeing PA to improve ENOSPC handling") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20200924150959.4335-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 70022da804f0f3f152115688885608c39182082e Author: Ye Bin Date: Wed Sep 16 19:38:59 2020 +0800 ext4: fix dead loop in ext4_mb_new_blocks As we test disk offline/online with running fsstress, we find fsstress process is keeping running state. kworker/u32:3-262 [004] ...1 140.787471: ext4_mb_discard_preallocations: dev 8,32 needed 114 .... kworker/u32:3-262 [004] ...1 140.787471: ext4_mb_discard_preallocations: dev 8,32 needed 114 ext4_mb_new_blocks repeat: ext4_mb_discard_preallocations_should_retry(sb, ac, &seq) freed = ext4_mb_discard_preallocations ext4_mb_discard_group_preallocations this_cpu_inc(discard_pa_seq); ---> freed == 0 seq_retry = ext4_get_discard_pa_seq_sum for_each_possible_cpu(__cpu) __seq += per_cpu(discard_pa_seq, __cpu); if (seq_retry != *seq) { *seq = seq_retry; ret = true; } As we see seq_retry is sum of discard_pa_seq every cpu, if ext4_mb_discard_group_preallocations return zero discard_pa_seq in this cpu maybe increase one, so condition "seq_retry != *seq" have always been met. Ritesh Harjani suggest to in ext4_mb_discard_group_preallocations function we only increase discard_pa_seq when there is some PA to free. Fixes: 07b5b8e1ac40 ("ext4: mballoc: introduce pcpu seqcnt for freeing PA to improve ENOSPC handling") Signed-off-by: Ye Bin Reviewed-by: Jan Kara Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20200916113859.1556397-3-yebin10@huawei.com Signed-off-by: Theodore Ts'o commit 0e6895ba00b7be45f3ab0d2107dda3ef1245f5b4 Author: Ritesh Harjani Date: Fri Sep 4 14:46:53 2020 +0530 ext4: implement swap_activate aops using iomap After moving ext4's bmap to iomap interface, swapon functionality on files created using fallocate (which creates unwritten extents) are failing. This is since iomap_bmap interface returns 0 for unwritten extents and thus generic_swapfile_activate considers this as holes and hence bail out with below kernel msg :- [340.915835] swapon: swapfile has holes To fix this we need to implement ->swap_activate aops in ext4 which will use ext4_iomap_report_ops. Since we only need to return the list of extents so ext4_iomap_report_ops should be enough. Cc: stable@kernel.org Reported-by: Yuxuan Shui Fixes: ac58e4fb03f ("ext4: move ext4 bmap to use iomap infrastructure") Signed-off-by: Ritesh Harjani Link: https://lore.kernel.org/r/20200904091653.1014334-1-riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit edc05fe5559e9b79e64cfec3b960f6a913b73493 Author: Denis Efremov Date: Fri Oct 16 11:54:42 2020 +0300 coccinelle: api: add kfree_mismatch script Check that alloc and free types of functions match each other. Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 91989c707884ecc7cd537281ab1a4b8fb7219da3 Author: Jens Axboe Date: Fri Oct 16 09:02:26 2020 -0600 task_work: cleanup notification modes A previous commit changed the notification mode from true/false to an int, allowing notify-no, notify-yes, or signal-notify. This was backwards compatible in the sense that any existing true/false user would translate to either 0 (on notification sent) or 1, the latter which mapped to TWA_RESUME. TWA_SIGNAL was assigned a value of 2. Clean this up properly, and define a proper enum for the notification mode. Now we have: - TWA_NONE. This is 0, same as before the original change, meaning no notification requested. - TWA_RESUME. This is 1, same as before the original change, meaning that we use TIF_NOTIFY_RESUME. - TWA_SIGNAL. This uses TIF_SIGPENDING/JOBCTL_TASK_WORK for the notification. Clean up all the callers, switching their 0/1/false/true to using the appropriate TWA_* mode for notifications. Fixes: e91b48162332 ("task_work: teach task_work_add() to do signal_wake_up()") Reviewed-by: Thomas Gleixner Signed-off-by: Jens Axboe commit 3c532798ec96b6c2d77706f04ed1d8b566a805df Author: Jens Axboe Date: Sat Oct 3 10:49:22 2020 -0600 tracehook: clear TIF_NOTIFY_RESUME in tracehook_notify_resume() All the callers currently do this, clean it up and move the clearing into tracehook_notify_resume() instead. Reviewed-by: Oleg Nesterov Reviewed-by: Thomas Gleixner Signed-off-by: Jens Axboe commit 324bcf54c449c7b5b7024c9fa4549fbaaae1935d Author: Jens Axboe Date: Sat Oct 17 09:25:52 2020 -0600 mm: use limited read-ahead to satisfy read For the case where read-ahead is disabled on the file, or if the cgroup is congested, ensure that we can at least do 1 page of read-ahead to make progress on the read in an async fashion. This could potentially be larger, but it's not needed in terms of functionality, so let's error on the side of caution as larger counts of pages may run into reclaim issues (particularly if we're congested). This makes sure we're not hitting the potentially sync ->readpage() path for IO that is marked IOCB_WAITQ, which could cause us to block. It also means we'll use the same path for IO, regardless of whether or not read-ahead happens to be disabled on the lower level device. Acked-by: Johannes Weiner Reported-by: Matthew Wilcox (Oracle) Reported-by: Hao_Xu [axboe: updated for new ractl API] Signed-off-by: Jens Axboe commit 13bd691421bc191a402d2e0d3da5f248d170a632 Author: Jens Axboe Date: Sat Oct 17 08:31:29 2020 -0600 mm: mark async iocb read as NOWAIT once some data has been copied Once we've copied some data for an iocb that is marked with IOCB_WAITQ, we should no longer attempt to async lock a new page. Instead make sure we return the copied amount, and let the caller retry, instead of returning -EIOCBQUEUED for a new page. This should only be possible with read-ahead disabled on the below device, and multiple threads racing on the same file. Haven't been able to reproduce on anything else. Cc: stable@vger.kernel.org # v5.9 Fixes: 1a0a7853b901 ("mm: support async buffered reads in generic_file_buffered_read()") Reported-by: Kent Overstreet Signed-off-by: Jens Axboe commit 9d9af1007bc08971953ae915d88dc9bb21344b53 Merge: a1e16bc7d5f7c 744aec4df2c5b Author: Linus Torvalds Date: Sat Oct 17 11:47:46 2020 -0700 Merge tag 'perf-tools-for-v5.10-2020-10-15' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools updates from Arnaldo Carvalho de Melo: - cgroup improvements for 'perf stat', allowing for compact specification of events and cgroups in the command line. - Support per thread topdown metrics in 'perf stat'. - Support sample-read topdown metric group in 'perf record' - Show start of latency in addition to its start in 'perf sched latency'. - Add min, max to 'perf script' futex-contention output, in addition to avg. - Allow usage of 'perf_event_attr->exclusive' attribute via the new ':e' event modifier. - Add 'snapshot' command to 'perf record --control', using it with Intel PT. - Support FIFO file names as alternative options to 'perf record --control'. - Introduce branch history "streams", to compare 'perf record' runs with 'perf diff' based on branch records and report hot streams. - Support PE executable symbol tables using libbfd, to profile, for instance, wine binaries. - Add filter support for option 'perf ftrace -F/--funcs'. - Allow configuring the 'disassembler_style' 'perf annotate' knob via 'perf config' - Update CascadelakeX and SkylakeX JSON vendor events files. - Add support for parsing perchip/percore JSON vendor events. - Add power9 hv_24x7 core level metric events. - Add L2 prefetch, ITLB instruction fetch hits JSON events for AMD zen1. - Enable Family 19h users by matching Zen2 AMD vendor events. - Use debuginfod in 'perf probe' when required debug files not found locally. - Display negative tid in non-sample events in 'perf script'. - Make GTK2 support opt-in - Add build test with GTK+ - Add missing -lzstd to the fast path feature detection - Add scripts to auto generate 'mmap', 'mremap' string<->id tables for use in 'perf trace'. - Show python test script in verbose mode. - Fix uncore metric expressions - Msan uninitialized use fixes. - Use condition variables in 'perf bench numa' - Autodetect python3 binary in systems without python2. - Support md5 build ids in addition to sha1. - Add build id 'perf test' regression test. - Fix printable strings in python3 scripts. - Fix off by ones in 'perf trace' in arches using libaudit. - Fix JSON event code for events referencing std arch events. - Introduce 'perf test' shell script for Arm CoreSight testing. - Add rdtsc() for Arm64 for used in the PERF_RECORD_TIME_CONV metadata event and in 'perf test tsc'. - 'perf c2c' improvements: Add "RMT Load Hit" metric, "Total Stores", fixes and documentation update. - Fix usage of reloc_sym in 'perf probe' when using both kallsyms and debuginfo files. - Do not print 'Metric Groups:' unnecessarily in 'perf list' - Refcounting fixes in the event parsing code. - Add expand cgroup event 'perf test' entry. - Fix out of bounds CPU map access when handling armv8_pmu events in 'perf stat'. - Add build-id injection 'perf bench' benchmark. - Enter namespace when reading build-id in 'perf inject'. - Do not load map/dso when injecting build-id speeding up the 'perf inject' process. - Add --buildid-all option to avoid processing all samples, just the mmap metadata events. - Add feature test to check if libbfd has buildid support - Add 'perf test' entry for PE binary format support. - Fix typos in power8 PMU vendor events JSON files. - Hide libtraceevent non API functions. * tag 'perf-tools-for-v5.10-2020-10-15' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (113 commits) perf c2c: Update documentation for metrics reorganization perf c2c: Add metrics "RMT Load Hit" perf c2c: Correct LLC load hit metrics perf c2c: Change header for LLC local hit perf c2c: Use more explicit headers for HITM perf c2c: Change header from "LLC Load Hitm" to "Load Hitm" perf c2c: Organize metrics based on memory hierarchy perf c2c: Display "Total Stores" as a standalone metrics perf c2c: Display the total numbers continuously perf bench: Use condition variables in numa. perf jevents: Fix event code for events referencing std arch events perf diff: Support hot streams comparison perf streams: Report hot streams perf streams: Calculate the sum of total streams hits perf streams: Link stream pair perf streams: Compare two streams perf streams: Get the evsel_streams by evsel_idx perf streams: Introduce branch history "streams" perf intel-pt: Improve PT documentation slightly perf tools: Add support for exclusive groups/events ... commit a1e16bc7d5f7ca3599d8a7f061841c93a563665e Merge: 2a934b38c066f c7a198c700763 Author: Linus Torvalds Date: Sat Oct 17 11:18:18 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "A usual cycle for RDMA with a typical mix of driver and core subsystem updates: - Driver minor changes and bug fixes for mlx5, efa, rxe, vmw_pvrdma, hns, usnic, qib, qedr, cxgb4, hns, bnxt_re - Various rtrs fixes and updates - Bug fix for mlx4 CM emulation for virtualization scenarios where MRA wasn't working right - Use tracepoints instead of pr_debug in the CM code - Scrub the locking in ucma and cma to close more syzkaller bugs - Use tasklet_setup in the subsystem - Revert the idea that 'destroy' operations are not allowed to fail at the driver level. This proved unworkable from a HW perspective. - Revise how the umem API works so drivers make fewer mistakes using it - XRC support for qedr - Convert uverbs objects RWQ and MW to new the allocation scheme - Large queue entry sizes for hns - Use hmm_range_fault() for mlx5 On Demand Paging - uverbs APIs to inspect the GID table instead of sysfs - Move some of the RDMA code for building large page SGLs into lib/scatterlist" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (191 commits) RDMA/ucma: Fix use after free in destroy id flow RDMA/rxe: Handle skb_clone() failure in rxe_recv.c RDMA/rxe: Move the definitions for rxe_av.network_type to uAPI RDMA: Explicitly pass in the dma_device to ib_register_device lib/scatterlist: Do not limit max_segment to PAGE_ALIGNED values IB/mlx4: Convert rej_tmout radix-tree to XArray RDMA/rxe: Fix bug rejecting all multicast packets RDMA/rxe: Fix skb lifetime in rxe_rcv_mcast_pkt() RDMA/rxe: Remove duplicate entries in struct rxe_mr IB/hfi,rdmavt,qib,opa_vnic: Update MAINTAINERS IB/rdmavt: Fix sizeof mismatch MAINTAINERS: CISCO VIC LOW LATENCY NIC DRIVER RDMA/bnxt_re: Fix sizeof mismatch for allocation of pbl_tbl. RDMA/bnxt_re: Use rdma_umem_for_each_dma_block() RDMA/umem: Move to allocate SG table from pages lib/scatterlist: Add support in dynamic allocation of SG table from pages tools/testing/scatterlist: Show errors in human readable form tools/testing/scatterlist: Rejuvenate bit-rotten test RDMA/ipoib: Set rtnl_link_ops for ipoib interfaces RDMA/uverbs: Expose the new GID query API to user space ... commit 2a934b38c066ff221b08a9c703314a2a1c885dbd Merge: 6f78b9acf04fb abea14bfdebbe Author: Linus Torvalds Date: Sat Oct 17 11:01:01 2020 -0700 Merge tag 'i3c/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Boris Brezillon: - Fix DAA for the pre-reserved address case - Fix an error path in the cadence driver * tag 'i3c/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: Fix error return in cdns_i3c_master_probe() i3c: master: fix for SETDASA and DAA process i3c: master add i3c_master_attach_boardinfo to preserve boardinfo commit 6f78b9acf04fbf9ede7f4265e7282f9fb39d2c8c Merge: 5a77b6a0131f7 6402f4ce95811 Author: Linus Torvalds Date: Sat Oct 17 10:45:42 2020 -0700 Merge tag 'mtd/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Richard Weinberger: "NAND core changes: - Drop useless 'depends on' in Kconfig - Add an extra level in the Kconfig hierarchy - Trivial spellings - Dynamic allocation of the interface configurations - Dropping the default ONFI timing mode - Various cleanup (types, structures, naming, comments) - Hide the chip->data_interface indirection - Add the generic rb-gpios property - Add the ->choose_interface_config() hook - Introduce nand_choose_best_sdr_timings() - Use default values for tPROG_max and tBERS_max - Avoid redefining tR_max and tCCS_min - Add a helper to find the closest ONFI mode - bcm63xx MTD parsers: simplify CFE detection Raw NAND controller drivers changes: - fsl-upm: Deprecation of specific DT properties - fsl_upm: Driver rework and cleanup in favor of ->exec_op() - Ingenic: Cleanup ARRAY_SIZE() vs sizeof() use - brcmnand: ECC error handling on EDU transfers - brcmnand: Don't default to EDU transfers - qcom: Set BAM mode only if not set already - qcom: Avoid write to unavailable register - gpio: Driver rework in favor of ->exec_op() - tango: ->exec_op() conversion - mtk: ->exec_op() conversion Raw NAND chip drivers changes: - toshiba: Implement ->choose_interface_config() for TH58NVG2S3HBAI4 - toshiba: Implement ->choose_interface_config() for TC58NVG0S3E - toshiba: Implement ->choose_interface_config() for TC58TEG5DCLTA00 - hynix: Implement ->choose_interface_config() for H27UCG8T2ATR-BC HyperBus changes: - DMA support for TI's AM654 HyperBus controller driver. - HyperBus frontend driver for Renesas RPC-IF driver. SPI NOR core changes: - Support for Winbond w25q64jwm flash - Enable 4K sector support for mx25l12805d SPI NOR controller drivers changes: - intel-spi Add Alder Lake-S PCI ID MTD Core changes: - mtdoops: Don't run panic write twice - mtdconcat: Correctly handle panic write - Use DEFINE_SHOW_ATTRIBUTE" * tag 'mtd/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (76 commits) mtd: hyperbus: Fix build failure when only RPCIF_HYPERBUS is enabled mtd: hyperbus: add Renesas RPC-IF driver Revert "mtd: spi-nor: Prefer asynchronous probe" mtd: parsers: bcm63xx: Do not make it modular mtd: spear_smi: Enable compile testing mtd: maps: vmu-flash: fix typos for struct memcard mtd: physmap: Add Baikal-T1 physically mapped ROM support mtd: maps: vmu-flash: simplify the return expression of probe_maple_vmu mtd: onenand: simplify the return expression of onenand_transfer_auto_oob mtd: rawnand: cadence: remove a redundant dev_err call mtd: rawnand: ams-delta: Fix non-OF build warning mtd: rawnand: Don't overwrite the error code from nand_set_ecc_soft_ops() mtd: rawnand: Introduce nand_set_ecc_on_host_ops() mtd: rawnand: atmel: Check return values for nand_read_data_op mtd: rawnand: vf610: Remove unused function vf610_nfc_transfer_size() mtd: rawnand: qcom: Simplify with dev_err_probe() mtd: rawnand: marvell: Fix and update kerneldoc mtd: rawnand: marvell: Simplify with dev_err_probe() mtd: rawnand: gpmi: Simplify with dev_err_probe() mtd: rawnand: atmel: Simplify with dev_err_probe() ... commit 5a77b6a0131f7197e1a037f65fc7cbabcb4fe680 Merge: 071a0578b0ce0 48b458591749d Author: Linus Torvalds Date: Sat Oct 17 10:40:22 2020 -0700 Merge tag 'thermal-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal updates from Daniel Lezcano: - Fix Kconfig typo "acces" -> "access" (Colin Ian King) - Use dev_error_probe() to simplify the error handling on imx and imx8 platforms (Anson Huang) - Use dedicated kobj_to_dev() instead of container_of() in the sysfs core code (Tian Tao) - Fix coding style by adding braces to a one line conditional statement on rcar (Geert Uytterhoeven) - Add DT binding documentation for the r8a774e1 platform and update the Kconfig description supporting RZ/G2 SoCs (Lad Prabhakar) - Simplify the return expression of stm_thermal_prepare on the stm32 platform (Qinglang Miao) - Fix the unit in the function documentation for the idle injection cooling device (Zhuguang Qing) - Remove an unecessary mutex_init() in the core code (Qinglang Miao) - Add support for keep alive events in the core code and the specific int340x (Srinivas Pandruvada) - Remove unused thermal zone variable in devfreq and cpufreq cooling devices (Zhuguang Qing) - Add the A100's THS controller support (Yangtao Li) - Add power management on the omap3's bandgap sensor (Adam Ford) - Fix a missing nlmsg_free in the netlink core error path (Jing Xiangfeng) * tag 'thermal-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal: core: Adding missing nlmsg_free() in thermal_genl_sampling_temp() thermal: ti-soc-thermal: Enable addition power management thermal: sun8i: Add A100's THS controller support thermal: sun8i: add TEMP_CALIB_MASK for calibration data in sun50i_h6_ths_calibrate dt-bindings: thermal: sun8i: Add binding for A100's THS controller thermal: cooling: Remove unused variable *tz thermal: int340x: Add keep alive response method thermal: core: Add new event for sending keep alive notifications thermal: int340x: Provide notification for OEM variable change thermal: core: remove unnecessary mutex_init() thermal/idle_inject: Fix comment of idle_duration_us and name of latency_ns thermal: Kconfig: Update description for RCAR_GEN3_THERMAL config thermal: stm32: simplify the return expression of stm_thermal_prepare() dt-bindings: thermal: rcar-gen3-thermal: Add r8a774e1 support thermal: rcar_thermal: Add missing braces to conditional statement thermal: Use kobj_to_dev() instead of container_of() thermal: imx8mm: Use dev_err_probe() to simplify error handling thermal: imx: Use dev_err_probe() to simplify error handling drivers: thermal: Kconfig: fix spelling mistake "acces" -> "access" commit 58852d4d673760cf7c88b9360b3c24a041bec298 Author: Pavel Begunkov Date: Fri Oct 16 20:55:56 2020 +0100 io_uring: fix double poll mask init __io_queue_proc() is used by both, poll reqs and apoll. Don't use req->poll.events to copy poll mask because for apoll it aliases with private data of the request. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 4ea33a976bfe79293965d0815e1914e4b6e58967 Author: Jens Axboe Date: Thu Oct 15 13:46:44 2020 -0600 io-wq: inherit audit loginuid and sessionid Make sure the async io-wq workers inherit the loginuid and sessionid from the original task, and restore them to unset once we're done with the async work item. While at it, disable the ability for kernel threads to write to their own loginuid. Signed-off-by: Jens Axboe commit d8a6df10aac9f2e4d5f30aff3129d552d2984ce7 Author: Jens Axboe Date: Thu Oct 15 16:24:45 2020 -0600 io_uring: use percpu counters to track inflight requests Even though we place the req_issued and req_complete in separate cachelines, there's considerable overhead in doing the atomics particularly on the completion side. Get rid of having the two counters, and just use a percpu_counter for this. That's what it was made for, after all. This considerably reduces the overhead in __io_free_req(). Signed-off-by: Jens Axboe commit 500a373d731ac506612db12631ec21295c1ff360 Author: Jens Axboe Date: Thu Oct 15 17:38:03 2020 -0600 io_uring: assign new io_identity for task if members have changed This avoids doing a copy for each new async IO, if some parts of the io_identity has changed. We avoid reference counting for the normal fast path of nothing ever changing. Signed-off-by: Jens Axboe commit 5c3462cfd123b341c9d3c947c1a2bab373f1697f Author: Jens Axboe Date: Thu Oct 15 09:02:33 2020 -0600 io_uring: store io_identity in io_uring_task This is, by definition, a per-task structure. So store it in the task context, instead of doing carrying it in each io_kiocb. We're being a bit inefficient if members have changed, as that requires an alloc and copy of a new io_identity struct. The next patch will fix that up. Signed-off-by: Jens Axboe commit 1e6fa5216a0e59ef02e8b6b40d553238a3b81d49 Author: Jens Axboe Date: Thu Oct 15 08:46:24 2020 -0600 io_uring: COW io_identity on mismatch If the io_identity doesn't completely match the task, then create a copy of it and use that. The existing copy remains valid until the last user of it has gone away. This also changes the personality lookup to be indexed by io_identity, instead of creds directly. Signed-off-by: Jens Axboe commit 98447d65b4a7a59f8ea37dc6e5d743247d9a7b01 Author: Jens Axboe Date: Wed Oct 14 10:48:51 2020 -0600 io_uring: move io identity items into separate struct io-wq contains a pointer to the identity, which we just hold in io_kiocb for now. This is in preparation for putting this outside io_kiocb. The only exception is struct files_struct, which we'll need different rules for to avoid a circular dependency. No functional changes in this patch. Signed-off-by: Jens Axboe commit dfead8a8e2c494b947480bac90a6f9792f08bc12 Author: Jens Axboe Date: Wed Oct 14 10:12:37 2020 -0600 io_uring: rely solely on work flags to determine personality. We solely rely on work->work_flags now, so use that for proper checking and clearing/dropping of various identity items. Signed-off-by: Jens Axboe commit 0f203765880c4416675726be558b65da4a7604e2 Author: Jens Axboe Date: Wed Oct 14 09:23:55 2020 -0600 io_uring: pass required context in as flags We have a number of bits that decide what context to inherit. Set up io-wq flags for these instead. This is in preparation for always having the various members set, but not always needing them for all requests. No intended functional changes in this patch. Signed-off-by: Jens Axboe commit a8b595b22d31f83b715511f59012f152a269d83b Author: Jens Axboe Date: Thu Oct 15 10:13:07 2020 -0600 io-wq: assign NUMA node locality if appropriate There was an assumption that kthread_create_on_node() would properly set NUMA affinities in terms of CPUs allowed, but it doesn't. Make sure we do this when creating an io-wq context on NUMA. Cc: stable@vger.kernel.org Stefan Metzmacher Signed-off-by: Jens Axboe commit 55cbc2564ab2fd555ec0fc39311a9cfb811d7da5 Author: Jens Axboe Date: Wed Oct 14 07:35:57 2020 -0600 io_uring: fix error path cleanup in io_sqe_files_register() syzbot reports the following crash: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 1 PID: 8927 Comm: syz-executor.3 Not tainted 5.9.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:io_file_from_index fs/io_uring.c:5963 [inline] RIP: 0010:io_sqe_files_register fs/io_uring.c:7369 [inline] RIP: 0010:__io_uring_register fs/io_uring.c:9463 [inline] RIP: 0010:__do_sys_io_uring_register+0x2fd2/0x3ee0 fs/io_uring.c:9553 Code: ec 03 49 c1 ee 03 49 01 ec 49 01 ee e8 57 61 9c ff 41 80 3c 24 00 0f 85 9b 09 00 00 4d 8b af b8 01 00 00 4c 89 e8 48 c1 e8 03 <80> 3c 28 00 0f 85 76 09 00 00 49 8b 55 00 89 d8 c1 f8 09 48 98 4c RSP: 0018:ffffc90009137d68 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc9000ef2a000 RDX: 0000000000040000 RSI: ffffffff81d81dd9 RDI: 0000000000000005 RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffed1012882a37 R13: 0000000000000000 R14: ffffed1012882a38 R15: ffff888094415000 FS: 00007f4266f3c700(0000) GS:ffff8880ae500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000118c000 CR3: 000000008e57d000 CR4: 00000000001506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45de59 Code: 0d b4 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 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f4266f3bc78 EFLAGS: 00000246 ORIG_RAX: 00000000000001ab RAX: ffffffffffffffda RBX: 00000000000083c0 RCX: 000000000045de59 RDX: 0000000020000280 RSI: 0000000000000002 RDI: 0000000000000005 RBP: 000000000118bf68 R08: 0000000000000000 R09: 0000000000000000 R10: 40000000000000a1 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007fff2fa4f12f R14: 00007f4266f3c9c0 R15: 000000000118bf2c Modules linked in: ---[ end trace 2a40a195e2d5e6e6 ]--- RIP: 0010:io_file_from_index fs/io_uring.c:5963 [inline] RIP: 0010:io_sqe_files_register fs/io_uring.c:7369 [inline] RIP: 0010:__io_uring_register fs/io_uring.c:9463 [inline] RIP: 0010:__do_sys_io_uring_register+0x2fd2/0x3ee0 fs/io_uring.c:9553 Code: ec 03 49 c1 ee 03 49 01 ec 49 01 ee e8 57 61 9c ff 41 80 3c 24 00 0f 85 9b 09 00 00 4d 8b af b8 01 00 00 4c 89 e8 48 c1 e8 03 <80> 3c 28 00 0f 85 76 09 00 00 49 8b 55 00 89 d8 c1 f8 09 48 98 4c RSP: 0018:ffffc90009137d68 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc9000ef2a000 RDX: 0000000000040000 RSI: ffffffff81d81dd9 RDI: 0000000000000005 RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffed1012882a37 R13: 0000000000000000 R14: ffffed1012882a38 R15: ffff888094415000 FS: 00007f4266f3c700(0000) GS:ffff8880ae400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000074a918 CR3: 000000008e57d000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 which is a copy of fget failure condition jumping to cleanup, but the cleanup requires ctx->file_data to be assigned. Assign it when setup, and ensure that we clear it again for the error path exit. Fixes: 5398ae698525 ("io_uring: clean file_data access in files_register") Reported-by: syzbot+f4ebcc98223dafd8991e@syzkaller.appspotmail.com Signed-off-by: Jens Axboe commit 0918682be432b85ccd49285832221d9b65831ef5 Author: Jens Axboe Date: Tue Oct 13 15:01:40 2020 -0600 Revert "io_uring: mark io_uring_fops/io_op_defs as __read_mostly" This reverts commit 738277adc81929b3e7c9b63fec6693868cc5f931. This change didn't make a lot of sense, and as Linus reports, it actually fails on clang: /tmp/io_uring-dd40c4.s:26476: Warning: ignoring changed section attributes for .data..read_mostly The arrays are already marked const so, by definition, they are not just read-mostly, they are read-only. Reported-by: Linus Torvalds Signed-off-by: Jens Axboe commit 216578e55ac932cf5e348d9e65d8e129fc9e34cc Author: Pavel Begunkov Date: Tue Oct 13 09:44:00 2020 +0100 io_uring: fix REQ_F_COMP_LOCKED by killing it REQ_F_COMP_LOCKED is used and implemented in a buggy way. The problem is that the flag is set before io_put_req() but not cleared after, and if that wasn't the final reference, the request will be freed with the flag set from some other context, which may not hold a spinlock. That means possible races with removing linked timeouts and unsynchronised completion (e.g. access to CQ). Instead of fixing REQ_F_COMP_LOCKED, kill the flag and use task_work_add() to move such requests to a fresh context to free from it, as was done with __io_free_req_finish(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 4edf20f9990230e9b85e79954d5cd28fc93616e9 Author: Pavel Begunkov Date: Tue Oct 13 09:43:59 2020 +0100 io_uring: dig out COMP_LOCK from deep call chain io_req_clean_work() checks REQ_F_COMP_LOCK to pass this two layers up. Move the check up into __io_free_req(), so at least it doesn't looks so ugly and would facilitate further changes. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6a0af224c21309f24dbb1b79d0744b255d7156a0 Author: Pavel Begunkov Date: Tue Oct 13 09:43:58 2020 +0100 io_uring: don't put a poll req under spinlock Move io_put_req() in io_poll_task_handler() from under spinlock. This eliminates the need to use REQ_F_COMP_LOCKED, at the expense of potentially having to grab the lock again. That's still a better trade off than relying on the locked flag. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b1b74cfc1967bd0747ff85f650f598e84eeb3d1c Author: Pavel Begunkov Date: Tue Oct 13 09:43:57 2020 +0100 io_uring: don't unnecessarily clear F_LINK_TIMEOUT If a request had REQ_F_LINK_TIMEOUT it would've been cleared in __io_kill_linked_timeout() by the time of __io_fail_links(), so no need to care about it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 368c5481ae7c6a9719c40984faea35480d9f4872 Author: Pavel Begunkov Date: Tue Oct 13 09:43:56 2020 +0100 io_uring: don't set COMP_LOCKED if won't put __io_kill_linked_timeout() sets REQ_F_COMP_LOCKED for a linked timeout even if it can't cancel it, e.g. it's already running. It not only races with io_link_timeout_fn() for ->flags field, but also leaves the flag set and so io_link_timeout_fn() may find it and decide that it holds the lock. Hopefully, the second problem is potential. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 035fbafc7a54b8c7755b3c508b8f3ab6ff3c8d65 Author: Colin Ian King Date: Mon Oct 12 15:03:41 2020 +0100 io_uring: Fix sizeof() mismatch An incorrect sizeof() is being used, sizeof(file_data->table) is not correct, it should be sizeof(*file_data->table). Fixes: 5398ae698525 ("io_uring: clean file_data access in files_register") Signed-off-by: Colin Ian King Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") Signed-off-by: Jens Axboe commit db073272700fce69a9c41b27c62d0003dbb66488 Author: Tian Tao Date: Sat Oct 17 09:52:29 2020 +0800 skd_main: remove unused including Remove including that don't need it. Signed-off-by: Tian Tao Signed-off-by: Jens Axboe commit 9ce88a13b3016436441fec0b8b00ce8116f91269 Author: Colin Ian King Date: Fri Oct 16 23:49:13 2020 +0100 ALSA: hda/ca0132: make some const arrays static, makes object smaller Don't populate const arrays on the stack but instead make them static. Makes the object code smaller by 57 bytes. Before: text data bss dec hex filename 173256 38016 192 211464 33a08 sound/pci/hda/patch_ca0132.o After: text data bss dec hex filename 172879 38336 192 211407 339cf sound/pci/hda/patch_ca0132.o (gcc version 10.2.0) Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20201016224913.687724-1-colin.king@canonical.com Signed-off-by: Takashi Iwai commit a97cbcd00f05a23146fdd8269011c40b7229242d Author: Randy Dunlap Date: Fri Oct 16 10:44:05 2020 -0700 ALSA: sparc: dbri: fix repeated word 'the' Change the duplicated word "the" to "Then the". Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20201016174405.17745-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai commit c7dacf5b0f32957b24ef29df1207dc2cd8307743 Author: Jassi Brar Date: Fri Oct 16 12:20:56 2020 -0500 mailbox: avoid timer start from callback If the txdone is done by polling, it is possible for msg_submit() to start the timer while txdone_hrtimer() callback is running. If the timer needs recheduling, it could already be enqueued by the time hrtimer_forward_now() is called, leading hrtimer to loudly complain. WARNING: CPU: 3 PID: 74 at kernel/time/hrtimer.c:932 hrtimer_forward+0xc4/0x110 CPU: 3 PID: 74 Comm: kworker/u8:1 Not tainted 5.9.0-rc2-00236-gd3520067d01c-dirty #5 Hardware name: Libre Computer AML-S805X-AC (DT) Workqueue: events_freezable_power_ thermal_zone_device_check pstate: 20000085 (nzCv daIf -PAN -UAO BTYPE=--) pc : hrtimer_forward+0xc4/0x110 lr : txdone_hrtimer+0xf8/0x118 [...] This can be fixed by not starting the timer from the callback path. Which requires the timer reloading as long as any message is queued on the channel, and not just when current tx is not done yet. Fixes: 0cc67945ea59 ("mailbox: switch to hrtimer for tx_complete polling") Reported-by: Da Xue Reviewed-by: Sudeep Holla Tested-by: Sudeep Holla Acked-by: Jerome Brunet Tested-by: Jerome Brunet Signed-off-by: Jassi Brar commit f355a55f8202811df304de42f59868f2c6810db1 Author: Ioana Ciornei Date: Thu Oct 15 23:00:23 2020 +0300 net: pcs-xpcs: depend on MDIO_BUS instead of selecting it The below compile time error can be seen when PHYLIB is configured as a module. ld: drivers/net/pcs/pcs-xpcs.o: in function `xpcs_read': pcs-xpcs.c:(.text+0x29): undefined reference to `mdiobus_read' ld: drivers/net/pcs/pcs-xpcs.o: in function `xpcs_soft_reset.constprop.7': pcs-xpcs.c:(.text+0x80): undefined reference to `mdiobus_write' ld: drivers/net/pcs/pcs-xpcs.o: in function `xpcs_config_aneg': pcs-xpcs.c:(.text+0x318): undefined reference to `mdiobus_write' ld: pcs-xpcs.c:(.text+0x38e): undefined reference to `mdiobus_write' ld: pcs-xpcs.c:(.text+0x3eb): undefined reference to `mdiobus_write' ld: pcs-xpcs.c:(.text+0x437): undefined reference to `mdiobus_write' ld: drivers/net/pcs/pcs-xpcs.o:pcs-xpcs.c:(.text+0xb1e): more undefined references to `mdiobus_write' follow PHYLIB being a module leads to MDIO_BUS being a module as well while the XPCS is still built-in. What should happen in this configuration is that PCS_XPCS should be forced to build as module. However, that select only acts in the opposite way so we should turn it into a depends. Fix this up by explicitly depending on MDIO_BUS. Reported-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested Fixes: 2fa4e4b799e1 ("net: pcs: Move XPCS into new PCS subdirectory") Signed-off-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit b38e7819cae946e2edf869e604af1e65a5d241c5 Author: Eric Dumazet Date: Thu Oct 15 11:42:00 2020 -0700 icmp: randomize the global rate limiter Keyu Man reported that the ICMP rate limiter could be used by attackers to get useful signal. Details will be provided in an upcoming academic publication. Our solution is to add some noise, so that the attackers no longer can get help from the predictable token bucket limiter. Fixes: 4cdf507d5452 ("icmp: add a global rate limitation") Signed-off-by: Eric Dumazet Reported-by: Keyu Man Signed-off-by: Jakub Kicinski commit 137d23cea1c044b2d4853ac71bc68126b25fdbb2 Author: Dylan Hung Date: Wed Oct 14 14:06:32 2020 +0800 net: ftgmac100: Fix Aspeed ast2600 TX hang issue The new HW arbitration feature on Aspeed ast2600 will cause MAC TX to hang when handling scatter-gather DMA. Disable the problematic feature by setting MAC register 0x58 bit28 and bit27. Fixes: 39bfab8844a0 ("net: ftgmac100: Add support for DT phy-handle property") Signed-off-by: Dylan Hung Reviewed-by: Joel Stanley Signed-off-by: Jakub Kicinski commit 894645546bb12ce008dcba0f68834d270fcd1dde Author: Darrick J. Wong Date: Mon Oct 12 14:10:03 2020 -0700 xfs: fix Kconfig asking about XFS_SUPPORT_V4 when XFS_FS=n Pavel Machek complained that the question about supporting deprecated XFS v4 comes up even when XFS is disabled. This clearly makes no sense, so fix Kconfig. Reported-by: Pavel Machek Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen commit d88850bd5516a77c6f727e8b6cefb64e0cc929c7 Author: Darrick J. Wong Date: Tue Oct 13 08:46:27 2020 -0700 xfs: fix high key handling in the rt allocator's query_range function Fix some off-by-one errors in xfs_rtalloc_query_range. The highest key in the realtime bitmap is always one less than the number of rt extents, which means that the key clamp at the start of the function is wrong. The 4th argument to xfs_rtfind_forw is the highest rt extent that we want to probe, which means that passing 1 less than the high key is wrong. Finally, drop the rem variable that controls the loop because we can compare the iteration point (rtstart) against the high key directly. The sordid history of this function is that the original commit (fb3c3) incorrectly passed (high_rec->ar_startblock - 1) as the 'limit' parameter to xfs_rtfind_forw. This was wrong because the "high key" is supposed to be the largest key for which the caller wants result rows, not the key for the first row that could possibly be outside the range that the caller wants to see. A subsequent attempt (8ad56) to strengthen the parameter checking added incorrect clamping of the parameters to the number of rt blocks in the system (despite the bitmap functions all taking units of rt extents) to avoid querying ranges past the end of rt bitmap file but failed to fix the incorrect _rtfind_forw parameter. The original _rtfind_forw parameter error then survived the conversion of the startblock and blockcount fields to rt extents (a0e5c), and the most recent off-by-one fix (a3a37) thought it was patching a problem when the end of the rt volume is not in use, but none of these fixes actually solved the original problem that the author was confused about the "limit" argument to xfs_rtfind_forw. Sadly, all four of these patches were written by this author and even his own usage of this function and rt testing were inadequate to get this fixed quickly. Original-problem: fb3c3de2f65c ("xfs: add a couple of queries to iterate free extents in the rtbitmap") Not-fixed-by: 8ad560d2565e ("xfs: strengthen rtalloc query range checks") Not-fixed-by: a0e5c435babd ("xfs: fix xfs_rtalloc_rec units") Fixes: a3a374bf1889 ("xfs: fix off-by-one error in xfs_rtalloc_query_range") Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R commit 071a0578b0ce0b0e543d1e38ee6926b9cc21c198 Merge: fad70111d57e0 be4df0cea08a8 Author: Linus Torvalds Date: Fri Oct 16 15:29:46 2020 -0700 Merge tag 'ovl-update-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs updates from Miklos Szeredi: - Improve performance for certain container setups by introducing a "volatile" mode - ioctl improvements - continue preparation for unprivileged overlay mounts * tag 'ovl-update-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: use generic vfs_ioc_setflags_prepare() helper ovl: support [S|G]ETFLAGS and FS[S|G]ETXATTR ioctls for directories ovl: rearrange ovl_can_list() ovl: enumerate private xattrs ovl: pass ovl_fs down to functions accessing private xattrs ovl: drop flags argument from ovl_do_setxattr() ovl: adhere to the vfs_ vs. ovl_do_ conventions for xattrs ovl: use ovl_do_getxattr() for private xattr ovl: fold ovl_getxattr() into ovl_get_redirect_xattr() ovl: clean up ovl_getxattr() in copy_up.c duplicate ovl_getxattr() ovl: provide a mount option "volatile" ovl: check for incompatible features in work dir commit fad70111d57e0b728b587eabc6f9f9b5240faa17 Merge: 7a3dadedc82e3 7530d3eb3dcf1 Author: Linus Torvalds Date: Fri Oct 16 15:22:41 2020 -0700 Merge tag 'afs-fixes-20201016' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull afs updates from David Howells: "A collection of fixes to fix afs_cell struct refcounting, thereby fixing a slew of related syzbot bugs: - Fix the cell tree in the netns to use an rwsem rather than RCU. There seem to be some problems deriving from the use of RCU and a seqlock to walk the rbtree, but it's not entirely clear what since there are several different failures being seen. Changing things to use an rwsem instead makes it more robust. The extra performance derived from using RCU isn't necessary in this case since the only time we're looking up a cell is during mount or when cells are being manually added. - Fix the refcounting by splitting the usage counter into a memory refcount and an active users counter. The usage counter was doing double duty, keeping track of whether a cell is still in use and keeping track of when it needs to be destroyed - but this makes the clean up tricky. Separating these out simplifies the logic. - Fix purging a cell that has an alias. A cell alias pins the cell it's an alias of, but the alias is always later in the list. Trying to purge in a single pass causes rmmod to hang in such a case. - Fix cell removal. If a cell's manager is requeued whilst it's removing itself, the manager will run again and re-remove itself, causing problems in various places. Follow Hillf Danton's suggestion to insert a more terminal state that causes the manager to do nothing post-removal. In additional to the above, two other changes: - Add a tracepoint for the cell refcount and active users count. This helped with debugging the above and may be useful again in future. - Downgrade an assertion to a print when a still-active server is seen during purging. This was happening as a consequence of incomplete cell removal before the servers were cleaned up" * tag 'afs-fixes-20201016' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Don't assert on unpurgeable server records afs: Add tracing for cell refcount and active user count afs: Fix cell removal afs: Fix cell purging with aliases afs: Fix cell refcounting by splitting the usage counter afs: Fix rapid cell addition/removal by not using RCU on cells tree commit 7a3dadedc82e340f8292f64e7bfa964c525009c0 Merge: 54a4c789ca809 788e96d1d3994 Author: Linus Torvalds Date: Fri Oct 16 15:14:43 2020 -0700 Merge tag 'f2fs-for-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we've added new features such as zone capacity for ZNS and a new GC policy, ATGC, along with in-memory segment management. In addition, we could improve the decompression speed significantly by changing virtual mapping method. Even though we've fixed lots of small bugs in compression support, I feel that it becomes more stable so that I could give it a try in production. Enhancements: - suport zone capacity in NVMe Zoned Namespace devices - introduce in-memory current segment management - add standart casefolding support - support age threshold based garbage collection - improve decompression speed by changing virtual mapping method Bug fixes: - fix condition checks in some ioctl() such as compression, move_range, etc - fix 32/64bits support in data structures - fix memory allocation in zstd decompress - add some boundary checks to avoid kernel panic on corrupted image - fix disallowing compression for non-empty file - fix slab leakage of compressed block writes In addition, it includes code refactoring for better readability and minor bug fixes for compression and zoned device support" * tag 'f2fs-for-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (51 commits) f2fs: code cleanup by removing unnecessary check f2fs: wait for sysfs kobject removal before freeing f2fs_sb_info f2fs: fix writecount false positive in releasing compress blocks f2fs: introduce check_swap_activate_fast() f2fs: don't issue flush in f2fs_flush_device_cache() for nobarrier case f2fs: handle errors of f2fs_get_meta_page_nofail f2fs: fix to set SBI_NEED_FSCK flag for inconsistent inode f2fs: reject CASEFOLD inode flag without casefold feature f2fs: fix memory alignment to support 32bit f2fs: fix slab leak of rpages pointer f2fs: compress: fix to disallow enabling compress on non-empty file f2fs: compress: introduce cic/dic slab cache f2fs: compress: introduce page array slab cache f2fs: fix to do sanity check on segment/section count f2fs: fix to check segment boundary during SIT page readahead f2fs: fix uninit-value in f2fs_lookup f2fs: remove unneeded parameter in find_in_block() f2fs: fix wrong total_sections check and fsmeta check f2fs: remove duplicated code in sanity_check_area_boundary f2fs: remove unused check on version_bitmap ... commit 54a4c789ca8091ab8fcd70285caeee2c5bc62997 Merge: 93f3d8f54a22e 3e2ac9798e13a Author: Linus Torvalds Date: Fri Oct 16 15:02:21 2020 -0700 Merge tag 'docs/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull documentation updates from Mauro Carvalho Chehab: "A series of patches addressing warnings produced by make htmldocs. This includes: - kernel-doc markup fixes - ReST fixes - Updates at the build system in order to support newer versions of the docs build toolchain (Sphinx) After this series, the number of html build warnings should reduce significantly, and building with Sphinx 3.1 or later should now be supported (although it is still recommended to use Sphinx 2.4.4). As agreed with Jon, I should be sending you a late pull request by the end of the merge window addressing remaining issues with docs build, as there are a number of warning fixes that depends on pull requests that should be happening along the merge window. The end goal is to have a clean htmldocs build on Kernel 5.10. PS. It should be noticed that Sphinx 3.0 is not currently supported, as it lacks support for C domain namespaces. Such feature, needed in order to document uAPI system calls with Sphinx 3.x, was added only on Sphinx 3.1" * tag 'docs/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (75 commits) PM / devfreq: remove a duplicated kernel-doc markup mm/doc: fix a literal block markup workqueue: fix a kernel-doc warning docs: virt: user_mode_linux_howto_v2.rst: fix a literal block markup Input: sparse-keymap: add a description for @sw rcu/tree: docs: document bkvcache new members at struct kfree_rcu_cpu nl80211: docs: add a description for s1g_cap parameter usb: docs: document altmode register/unregister functions kunit: test.h: fix a bad kernel-doc markup drivers: core: fix kernel-doc markup for dev_err_probe() docs: bio: fix a kerneldoc markup kunit: test.h: solve kernel-doc warnings block: bio: fix a warning at the kernel-doc markups docs: powerpc: syscall64-abi.rst: fix a malformed table drivers: net: hamradio: fix document location net: appletalk: Kconfig: Fix docs location dt-bindings: fix references to files converted to yaml memblock: get rid of a :c:type leftover math64.h: kernel-docs: Convert some markups into normal comments media: uAPI: buffer.rst: remove a left-over documentation ... commit 93f3d8f54a22eaa5ae4ec269615729c4f9b1cf1e Merge: 8119c4332d253 ce66f6136460a Author: Linus Torvalds Date: Fri Oct 16 14:56:52 2020 -0700 Merge tag 'trace-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Fix mismatch section of adding early trace events. Fixes the issue of a mismatch section that was missed due to gcc inlining the offending function, while clang did not (and reported the issue)" * tag 'trace-v5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Remove __init from __trace_early_add_new_event() commit ec78e31852c9bb7d96b6557468fecb6f6f3b28f3 Author: Hoang Huu Le Date: Fri Oct 16 09:31:19 2020 +0700 tipc: fix incorrect setting window for bcast link In commit 16ad3f4022bb ("tipc: introduce variable window congestion control"), we applied the algorithm to select window size from minimum window to the configured maximum window for unicast link, and, besides we chose to keep the window size for broadcast link unchanged and equal (i.e fix window 50) However, when setting maximum window variable via command, the window variable was re-initialized to unexpect value (i.e 32). We fix this by updating the fix window for broadcast as we stated. Fixes: 16ad3f4022bb ("tipc: introduce variable window congestion control") Acked-by: Jon Maloy Signed-off-by: Hoang Huu Le Signed-off-by: Jakub Kicinski commit 75cee397ae6f1020fbb75db90aa22a51bc3318ac Author: Hoang Huu Le Date: Fri Oct 16 09:31:18 2020 +0700 tipc: re-configure queue limit for broadcast link The queue limit of the broadcast link is being calculated base on initial MTU. However, when MTU value changed (e.g manual changing MTU on NIC device, MTU negotiation etc.,) we do not re-calculate queue limit. This gives throughput does not reflect with the change. So fix it by calling the function to re-calculate queue limit of the broadcast link. Acked-by: Jon Maloy Signed-off-by: Hoang Huu Le Signed-off-by: Jakub Kicinski commit 8119c4332d253660e0a6b8748fe0749961cfbc97 Merge: 49dc6fbce3301 eac48eb6ce10c Author: Linus Torvalds Date: Fri Oct 16 12:52:37 2020 -0700 Merge tag 'printk-for-5.10-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk fix from Petr Mladek: "Prevent overflow in the new lockless ringbuffer" * tag 'printk-for-5.10-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: ringbuffer: Wrong data pointer when appending small string commit 49dc6fbce33011733601e4e81c551e066f1682fc Merge: 09a31a7e3723a d081a6e353168 Author: Linus Torvalds Date: Fri Oct 16 12:47:18 2020 -0700 Merge tag 'kgdb-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux Pull kgdb updates from Daniel Thompson: "A fairly modest set of changes for this cycle. Of particular note are an earlycon fix from Doug Anderson and my own changes to get kgdb/kdb to honour the kprobe blocklist. The later creates a safety rail that strongly encourages developers not to place breakpoints in, for example, arch specific trap handling code. Also included are a couple of small fixes and tweaks: an API update, eliminate a coverity dead code warning, improved handling of search during multi-line printk and a couple of typo corrections" * tag 'kgdb-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux: kdb: Fix pager search for multi-line strings kernel: debug: Centralize dbg_[de]activate_sw_breakpoints kgdb: Add NOKPROBE labels on the trap handler functions kgdb: Honour the kprobe blocklist when setting breakpoints kernel/debug: Fix spelling mistake in debug_core.c kdb: Use newer api for tasklist scanning kgdb: Make "kgdbcon" work properly with "kgdb_earlycon" kdb: remove unnecessary null check of dbg_io_ops commit 09a31a7e3723afd79022d5d3ff3634c2630c2eeb Merge: 847d4287a0c67 cf3af0a4d3b62 Author: Linus Torvalds Date: Fri Oct 16 12:40:55 2020 -0700 Merge tag 'mips_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: - removed support for PNX833x alias NXT_STB22x - included Ingenic SoC support into generic MIPS kernels - added support for new Ingenic SoCs - converted workaround selection to use Kconfig - replaced old boot mem functions by memblock_* - enabled COP2 usage in kernel for Loongson64 to make use of 16byte load/stores possible - cleanups and fixes * tag 'mips_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (92 commits) MIPS: DEC: Restore bootmem reservation for firmware working memory area MIPS: dec: fix section mismatch bcm963xx_tag.h: fix duplicated word mips: ralink: enable zboot support MIPS: ingenic: Remove CPU_SUPPORTS_HUGEPAGES MIPS: cpu-probe: remove MIPS_CPU_BP_GHIST option bit MIPS: cpu-probe: introduce exclusive R3k CPU probe MIPS: cpu-probe: move fpu probing/handling into its own file MIPS: replace add_memory_region with memblock MIPS: Loongson64: Clean up numa.c MIPS: Loongson64: Select SMP in Kconfig to avoid build error mips: octeon: Add Ubiquiti E200 and E220 boards MIPS: SGI-IP28: disable use of ll/sc in kernel MIPS: tx49xx: move tx4939_add_memory_regions into only user MIPS: pgtable: Remove used PAGE_USERIO define MIPS: alchemy: Share prom_init implementation MIPS: alchemy: Fix build breakage, if TOUCHSCREEN_WM97XX is disabled MIPS: process: include exec.h header in process.c MIPS: process: Add prototype for function arch_dup_task_struct MIPS: idle: Add prototype for function check_wait ... commit 847d4287a0c6709fd1ce24002b96d404a6da8b5b Merge: 96685f8666714 10e5afb3d260f Author: Linus Torvalds Date: Fri Oct 16 12:36:38 2020 -0700 Merge tag 's390-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Vasily Gorbik: - Remove address space overrides using set_fs() - Convert to generic vDSO - Convert to generic page table dumper - Add ARCH_HAS_DEBUG_WX support - Add leap seconds handling support - Add NVMe firmware-assisted kernel dump support - Extend NVMe boot support with memory clearing control and addition of kernel parameters - AP bus and zcrypt api code rework. Add adapter configure/deconfigure interface. Extend debug features. Add failure injection support - Add ECC secure private keys support - Add KASan support for running protected virtualization host with 4-level paging - Utilize destroy page ultravisor call to speed up secure guests shutdown - Implement ioremap_wc() and ioremap_prot() with MIO in PCI code - Various checksum improvements - Other small various fixes and improvements all over the code * tag 's390-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (85 commits) s390/uaccess: fix indentation s390/uaccess: add default cases for __put_user_fn()/__get_user_fn() s390/zcrypt: fix wrong format specifications s390/kprobes: move insn_page to text segment s390/sie: fix typo in SIGP code description s390/lib: fix kernel doc for memcmp() s390/zcrypt: Introduce Failure Injection feature s390/zcrypt: move ap_msg param one level up the call chain s390/ap/zcrypt: revisit ap and zcrypt error handling s390/ap: Support AP card SCLP config and deconfig operations s390/sclp: Add support for SCLP AP adapter config/deconfig s390/ap: add card/queue deconfig state s390/ap: add error response code field for ap queue devices s390/ap: split ap queue state machine state from device state s390/zcrypt: New config switch CONFIG_ZCRYPT_DEBUG s390/zcrypt: introduce msg tracking in zcrypt functions s390/startup: correct early pgm check info formatting s390: remove orphaned extern variables declarations s390/kasan: make sure int handler always run with DAT on s390/ipl: add support to control memory clearing for nvme re-IPL ... commit 294a7f1613ee49a608361bd319519561c0ca7e72 Author: Vitor Massaru Iha Date: Thu Oct 15 09:08:51 2020 -0300 lib: kunit: Fix compilation test when using TEST_BIT_FIELD_COMPILE A build condition was missing around a compilation test, this compilation test comes from the original test_bitfield code. And removed unnecessary code for this test. Fixes: d2585f5164c2 ("lib: kunit: add bitfield test conversion to KUnit") Reported-by: Stephen Rothwell Signed-off-by: Vitor Massaru Iha Link: https://lore.kernel.org/linux-next/20201015163056.56fcc835@canb.auug.org.au/ Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 96685f8666714233d34abb71b242448c80077536 Merge: c4cf498dc0241 ffd0b25ca049a Author: Linus Torvalds Date: Fri Oct 16 12:21:15 2020 -0700 Merge tag 'powerpc-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - A series from Nick adding ARCH_WANT_IRQS_OFF_ACTIVATE_MM & selecting it for powerpc, as well as a related fix for sparc. - Remove support for PowerPC 601. - Some fixes for watchpoints & addition of a new ptrace flag for detecting ISA v3.1 (Power10) watchpoint features. - A fix for kernels using 4K pages and the hash MMU on bare metal Power9 systems with > 16TB of RAM, or RAM on the 2nd node. - A basic idle driver for shallow stop states on Power10. - Tweaks to our sched domains code to better inform the scheduler about the hardware topology on Power9/10, where two SMT4 cores can be presented by firmware as an SMT8 core. - A series doing further reworks & cleanups of our EEH code. - Addition of a filter for RTAS (firmware) calls done via sys_rtas(), to prevent root from overwriting kernel memory. - Other smaller features, fixes & cleanups. Thanks to: Alexey Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V, Athira Rajeev, Biwen Li, Cameron Berkenpas, Cédric Le Goater, Christophe Leroy, Christoph Hellwig, Colin Ian King, Daniel Axtens, David Dai, Finn Thain, Frederic Barrat, Gautham R. Shenoy, Greg Kurz, Gustavo Romero, Ira Weiny, Jason Yan, Joel Stanley, Jordan Niethe, Kajol Jain, Konrad Rzeszutek Wilk, Laurent Dufour, Leonardo Bras, Liu Shixin, Luca Ceresoli, Madhavan Srinivasan, Mahesh Salgaonkar, Nathan Lynch, Nicholas Mc Guire, Nicholas Piggin, Nick Desaulniers, Oliver O'Halloran, Pedro Miraglia Franco de Carvalho, Pratik Rajesh Sampat, Qian Cai, Qinglang Miao, Ravi Bangoria, Russell Currey, Satheesh Rajendran, Scott Cheloha, Segher Boessenkool, Srikar Dronamraju, Stan Johnson, Stephen Kitt, Stephen Rothwell, Thiago Jung Bauermann, Tyrel Datwyler, Vaibhav Jain, Vaidyanathan Srinivasan, Vasant Hegde, Wang Wensheng, Wolfram Sang, Yang Yingliang, zhengbin. * tag 'powerpc-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (228 commits) Revert "powerpc/pci: unmap legacy INTx interrupts when a PHB is removed" selftests/powerpc: Fix eeh-basic.sh exit codes cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_reboot_notifier powerpc/time: Make get_tb() common to PPC32 and PPC64 powerpc/time: Make get_tbl() common to PPC32 and PPC64 powerpc/time: Remove get_tbu() powerpc/time: Avoid using get_tbl() and get_tbu() internally powerpc/time: Make mftb() common to PPC32 and PPC64 powerpc/time: Rename mftbl() to mftb() powerpc/32s: Remove #ifdef CONFIG_PPC_BOOK3S_32 in head_book3s_32.S powerpc/32s: Rename head_32.S to head_book3s_32.S powerpc/32s: Setup the early hash table at all time. powerpc/time: Remove ifdef in get_dec() and set_dec() powerpc: Remove get_tb_or_rtc() powerpc: Remove __USE_RTC() powerpc: Tidy up a bit after removal of PowerPC 601. powerpc: Remove support for PowerPC 601 powerpc: Remove PowerPC 601 powerpc: Drop SYNC_601() ISYNC_601() and SYNC() powerpc: Remove CONFIG_PPC601_SYNC_FIX ... commit c327a310ec4d6ecbea13185ed56c11def441d9ab Author: Dan Aloni Date: Fri Oct 2 22:33:43 2020 +0300 svcrdma: fix bounce buffers for unaligned offsets and multiple pages This was discovered using O_DIRECT at the client side, with small unaligned file offsets or IOs that span multiple file pages. Fixes: e248aa7be86 ("svcrdma: Remove max_sge check at connect time") Signed-off-by: Dan Aloni Signed-off-by: J. Bruce Fields commit c1488428a8daf5257a12dcec1739147e6aaf9557 Author: Tom Rix Date: Sun Oct 11 08:51:55 2020 -0700 nfsd: remove unneeded break Because every path through nfs4_find_file()'s switch does an explicit return, the break is not needed. Signed-off-by: Tom Rix Signed-off-by: J. Bruce Fields commit c09f56b8f68d4d536bff518227aea323b835b2ce Author: Artur Molchanov Date: Mon Oct 12 01:00:45 2020 +0300 net/sunrpc: Fix return value for sysctl sunrpc.transports Fix returning value for sysctl sunrpc.transports. Return error code from sysctl proc_handler function proc_do_xprt instead of number of the written bytes. Otherwise sysctl returns random garbage for this key. Since v1: - Handle negative returned value from memory_read_from_buffer as an error Signed-off-by: Artur Molchanov Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields commit c4cf498dc0241fa2d758dba177634268446afb06 Merge: 9ff9b0d392ea0 4d0e9df5e43db Author: Linus Torvalds Date: Fri Oct 16 11:31:55 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: "155 patches. Subsystems affected by this patch series: mm (dax, debug, thp, readahead, page-poison, util, memory-hotplug, zram, cleanups), misc, core-kernel, get_maintainer, MAINTAINERS, lib, bitops, checkpatch, binfmt, ramfs, autofs, nilfs, rapidio, panic, relay, kgdb, ubsan, romfs, and fault-injection" * emailed patches from Andrew Morton : (155 commits) lib, uaccess: add failure injection to usercopy functions lib, include/linux: add usercopy failure capability ROMFS: support inode blocks calculation ubsan: introduce CONFIG_UBSAN_LOCAL_BOUNDS for Clang sched.h: drop in_ubsan field when UBSAN is in trap mode scripts/gdb/tasks: add headers and improve spacing format scripts/gdb/proc: add struct mount & struct super_block addr in lx-mounts command kernel/relay.c: drop unneeded initialization panic: dump registers on panic_on_warn rapidio: fix the missed put_device() for rio_mport_add_riodev rapidio: fix error handling path nilfs2: fix some kernel-doc warnings for nilfs2 autofs: harden ioctl table ramfs: fix nommu mmap with gaps in the page cache mm: remove the now-unnecessary mmget_still_valid() hack mm/gup: take mmap_lock in get_dump_page() binfmt_elf, binfmt_elf_fdpic: use a VMA list snapshot coredump: rework elf/elf_fdpic vma_dump_size() into common helper coredump: refactor page range dumping into common helper coredump: let dump_emit() bail out on short writes ... commit 4d0e9df5e43dba52d38b251e3b909df8fa1110be Author: Albert van der Linde Date: Thu Oct 15 20:13:50 2020 -0700 lib, uaccess: add failure injection to usercopy functions To test fault-tolerance of user memory access functions, introduce fault injection to usercopy functions. If a failure is expected return either -EFAULT or the total amount of bytes that were not copied. Signed-off-by: Albert van der Linde Signed-off-by: Andrew Morton Reviewed-by: Akinobu Mita Reviewed-by: Alexander Potapenko Cc: Al Viro Cc: Andrey Konovalov Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Dmitry Vyukov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Marco Elver Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20200831171733.955393-3-alinde@google.com Signed-off-by: Linus Torvalds commit 2c739ced5886cd8c8361faa79a9522ec05174ed0 Author: Albert van der Linde Date: Thu Oct 15 20:13:46 2020 -0700 lib, include/linux: add usercopy failure capability Patch series "add fault injection to user memory access", v3. The goal of this series is to improve testing of fault-tolerance in usages of user memory access functions, by adding support for fault injection. syzkaller/syzbot are using the existing fault injection modes and will use this particular feature also. The first patch adds failure injection capability for usercopy functions. The second changes usercopy functions to use this new failure capability (copy_from_user, ...). The third patch adds get/put/clear_user failures to x86. This patch (of 3): Add a failure injection capability to improve testing of fault-tolerance in usages of user memory access functions. Add CONFIG_FAULT_INJECTION_USERCOPY to enable faults in usercopy functions. The should_fail_usercopy function is to be called by these functions (copy_from_user, get_user, ...) in order to fail or not. Signed-off-by: Albert van der Linde Signed-off-by: Andrew Morton Reviewed-by: Akinobu Mita Reviewed-by: Alexander Potapenko Cc: Borislav Petkov Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Arnd Bergmann Cc: Peter Zijlstra (Intel) Cc: "H. Peter Anvin" Cc: Al Viro Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Marco Elver Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20200831171733.955393-1-alinde@google.com Link: http://lkml.kernel.org/r/20200831171733.955393-2-alinde@google.com Signed-off-by: Linus Torvalds commit d9bc85de46cad90851c346b592005090674b7669 Author: Libing Zhou Date: Thu Oct 15 20:13:42 2020 -0700 ROMFS: support inode blocks calculation When use 'stat' tool to display file status, the 'Blocks' field always in '0', this is not good for tool 'du'(e.g.: busybox 'du'), it always output '0' size for the files under ROMFS since such tool calculates number of 512B Blocks. This patch calculates approx. number of 512B blocks based on inode size. Signed-off-by: Libing Zhou Signed-off-by: Andrew Morton Cc: David Howells Cc: Al Viro Link: http://lkml.kernel.org/r/20200811052606.4243-1-libing.zhou@nokia-sbell.com Signed-off-by: Linus Torvalds commit 6a6155f664e31c9be43cd690541a9a682ba3dc22 Author: George Popescu Date: Thu Oct 15 20:13:38 2020 -0700 ubsan: introduce CONFIG_UBSAN_LOCAL_BOUNDS for Clang When the kernel is compiled with Clang, -fsanitize=bounds expands to -fsanitize=array-bounds and -fsanitize=local-bounds. Enabling -fsanitize=local-bounds with Clang has the unfortunate side-effect of inserting traps; this goes back to its original intent, which was as a hardening and not a debugging feature [1]. The same feature made its way into -fsanitize=bounds, but the traps remained. For that reason, -fsanitize=bounds was split into 'array-bounds' and 'local-bounds' [2]. Since 'local-bounds' doesn't behave like a normal sanitizer, enable it with Clang only if trapping behaviour was requested by CONFIG_UBSAN_TRAP=y. Add the UBSAN_BOUNDS_LOCAL config to Kconfig.ubsan to enable the 'local-bounds' option by default when UBSAN_TRAP is enabled. [1] http://lists.llvm.org/pipermail/llvm-dev/2012-May/049972.html [2] http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20131021/091536.html Suggested-by: Marco Elver Signed-off-by: George Popescu Signed-off-by: Andrew Morton Reviewed-by: David Brazdil Reviewed-by: Marco Elver Cc: Masahiro Yamada Cc: Michal Marek Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Kees Cook Cc: Dmitry Vyukov Cc: Arnd Bergmann Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/20200922074330.2549523-1-georgepope@google.com Signed-off-by: Linus Torvalds commit 5cf53f3ce3b9ff5321b56f9ed9d90d59307be7d0 Author: Elena Petrova Date: Thu Oct 15 20:13:35 2020 -0700 sched.h: drop in_ubsan field when UBSAN is in trap mode in_ubsan field of task_struct is only used in lib/ubsan.c, which in its turn is used only `ifneq ($(CONFIG_UBSAN_TRAP),y)`. Removing unnecessary field from a task_struct will help preserve the ABI between vanilla and CONFIG_UBSAN_TRAP'ed kernels. In particular, this will help enabling bounds sanitizer transparently for Android's GKI. Signed-off-by: Elena Petrova Signed-off-by: Andrew Morton Acked-by: Kees Cook Cc: Jann Horn Link: https://lkml.kernel.org/r/20200910134802.3160311-1-lenaptr@google.com Signed-off-by: Linus Torvalds commit 4fbe310e44067e5f15c327483031f9564e6b1826 Author: Ritesh Harjani Date: Thu Oct 15 20:13:32 2020 -0700 scripts/gdb/tasks: add headers and improve spacing format With the patch. TASK PID COMM 0xffffffff82c2b8c0 0 swapper/0 0xffff888a0ba20040 1 systemd 0xffff888a0ba24040 2 kthreadd 0xffff888a0ba28040 3 rcu_gp w/o 0xffffffff82c2b8c0 0 swapper/0 0xffff888a0ba20040 1 systemd 0xffff888a0ba24040 2 kthreadd 0xffff888a0ba28040 3 rcu_gp Signed-off-by: Ritesh Harjani Signed-off-by: Andrew Morton Reviewed-by: Jan Kiszka Cc: Kieran Bingham Link: http://lkml.kernel.org/r/54c868c79b5fc364a8be7799891934a6fe6d1464.1597742951.git.riteshh@linux.ibm.com Signed-off-by: Linus Torvalds commit 998ec76b920086d9f6bac8b11719ee81976743b6 Author: Ritesh Harjani Date: Thu Oct 15 20:13:29 2020 -0700 scripts/gdb/proc: add struct mount & struct super_block addr in lx-mounts command This is many times found useful while debugging some FS related issue. mount super_block devname pathname fstype options 0xffff888a0bfa4b40 0xffff888a0bfc1000 none / rootfs rw 0 0 0xffff888a033f75c0 0xffff8889fcf65000 /dev/root / ext4 rw,relatime 0 0 0xffff8889fc8ce040 0xffff888a0bb51000 devtmpfs /dev devtmpfs rw,relatime 0 0 Signed-off-by: Ritesh Harjani Signed-off-by: Andrew Morton Reviewed-by: Jan Kiszka Cc: Kieran Bingham Link: http://lkml.kernel.org/r/a3c4177e1597b3e06d66d55e07d72c0c46a03571.1597742951.git.riteshh@linux.ibm.com Signed-off-by: Linus Torvalds commit ac05b7a1b48ba9fc79937a08db4c7131dba8fc5f Author: Sudip Mukherjee Date: Thu Oct 15 20:13:25 2020 -0700 kernel/relay.c: drop unneeded initialization The variable 'consumed' is initialized with the consumed count but immediately after that the consumed count is updated and assigned to 'consumed' again thus overwriting the previous value. So, drop the unneeded initialization. Signed-off-by: Sudip Mukherjee Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20201005205727.1147-1-sudipm.mukherjee@gmail.com Signed-off-by: Linus Torvalds commit 3f388f28639fd19d5bf6df7a882c94ccfbf49c2b Author: Alexey Kardashevskiy Date: Thu Oct 15 20:13:22 2020 -0700 panic: dump registers on panic_on_warn Currently we print stack and registers for ordinary warnings but we do not for panic_on_warn which looks as oversight - panic() will reboot the machine but won't print registers. This moves printing of registers and modules earlier. This does not move the stack dumping as panic() dumps it. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Cc: Douglas Anderson Cc: Ingo Molnar Cc: Kees Cook Cc: Rafael Aquini Cc: Thomas Gleixner Cc: Will Deacon Cc: Nicholas Piggin Link: https://lkml.kernel.org/r/20200804095054.68724-1-aik@ozlabs.ru Signed-off-by: Linus Torvalds commit 85094c05eeb47d195a74a25366a2db066f1c9d47 Author: Jing Xiangfeng Date: Thu Oct 15 20:13:18 2020 -0700 rapidio: fix the missed put_device() for rio_mport_add_riodev rio_mport_add_riodev() misses to call put_device() when the device already exists. Add the missed function call to fix it. Fixes: e8de370188d0 ("rapidio: add mport char device driver") Signed-off-by: Jing Xiangfeng Signed-off-by: Andrew Morton Reviewed-by: Dan Carpenter Cc: Matt Porter Cc: Alexandre Bounine Cc: Gustavo A. R. Silva Cc: John Hubbard Cc: Kees Cook Cc: Madhuparna Bhowmik Link: https://lkml.kernel.org/r/20200922072525.42330-1-jingxiangfeng@huawei.com Signed-off-by: Linus Torvalds commit fa63f083b3492b5ed5332b8d7c90b03b5ef24a1d Author: Souptick Joarder Date: Thu Oct 15 20:13:15 2020 -0700 rapidio: fix error handling path rio_dma_transfer() attempts to clamp the return value of pin_user_pages_fast() to be >= 0. However, the attempt fails because nr_pages is overridden a few lines later, and restored to the undesirable -ERRNO value. The return value is ultimately stored in nr_pages, which in turn is passed to unpin_user_pages(), which expects nr_pages >= 0, else, disaster. Fix this by fixing the nesting of the assignment to nr_pages: nr_pages should be clamped to zero if pin_user_pages_fast() returns -ERRNO, or set to the return value of pin_user_pages_fast(), otherwise. [jhubbard@nvidia.com: new changelog] Fixes: e8de370188d09 ("rapidio: add mport char device driver") Signed-off-by: Souptick Joarder Signed-off-by: Andrew Morton Reviewed-by: Ira Weiny Reviewed-by: John Hubbard Cc: Matthew Wilcox Cc: Matt Porter Cc: Alexandre Bounine Cc: Gustavo A. R. Silva Cc: Madhuparna Bhowmik Cc: Dan Carpenter Link: https://lkml.kernel.org/r/1600227737-20785-1-git-send-email-jrdr.linux@gmail.com Signed-off-by: Linus Torvalds commit 64ead5201e757159d1d83a5e0752090c2ab3319f Author: Wang Hai Date: Thu Oct 15 20:13:11 2020 -0700 nilfs2: fix some kernel-doc warnings for nilfs2 Fixes the following W=1 kernel build warning(s): fs/nilfs2/bmap.c:378: warning: Excess function parameter 'bhp' description in 'nilfs_bmap_assign' fs/nilfs2/cpfile.c:907: warning: Excess function parameter 'status' description in 'nilfs_cpfile_change_cpmode' fs/nilfs2/cpfile.c:946: warning: Excess function parameter 'stat' description in 'nilfs_cpfile_get_stat' fs/nilfs2/page.c:76: warning: Excess function parameter 'inode' description in 'nilfs_forget_buffer' fs/nilfs2/sufile.c:563: warning: Excess function parameter 'stat' description in 'nilfs_sufile_get_stat' Signed-off-by: Wang Hai Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/1601386269-2423-1-git-send-email-konishi.ryusuke@gmail.com Signed-off-by: Linus Torvalds commit 589f6b52682542c1b230c435e1de679755f3332a Author: Matthew Wilcox Date: Thu Oct 15 20:13:08 2020 -0700 autofs: harden ioctl table The table of ioctl functions should be marked const in order to put them in read-only memory, and we should use array_index_nospec() to avoid speculation disclosing the contents of kernel memory to userspace. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Acked-by: Ian Kent Link: https://lkml.kernel.org/r/20200818122203.GO17456@casper.infradead.org Signed-off-by: Linus Torvalds commit 50b7d85680086126d7bd91dae81d57d4cb1ab6b7 Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:13:04 2020 -0700 ramfs: fix nommu mmap with gaps in the page cache ramfs needs to check that pages are both physically contiguous and contiguous in the file. If the page cache happens to have, eg, page A for index 0 of the file, no page for index 1, and page A+1 for index 2, then an mmap of the first two pages of the file will succeed when it should fail. Fixes: 642fb4d1f1dd ("[PATCH] NOMMU: Provide shared-writable mmap support on ramfs") Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: David Howells Link: https://lkml.kernel.org/r/20200914122239.GO6583@casper.infradead.org Signed-off-by: Linus Torvalds commit 4d45e75a9955ade5c2f49bd96fc4173b2cec9a72 Author: Jann Horn Date: Thu Oct 15 20:13:00 2020 -0700 mm: remove the now-unnecessary mmget_still_valid() hack The preceding patches have ensured that core dumping properly takes the mmap_lock. Thanks to that, we can now remove mmget_still_valid() and all its users. Signed-off-by: Jann Horn Signed-off-by: Andrew Morton Acked-by: Linus Torvalds Cc: Christoph Hellwig Cc: Alexander Viro Cc: "Eric W . Biederman" Cc: Oleg Nesterov Cc: Hugh Dickins Link: http://lkml.kernel.org/r/20200827114932.3572699-8-jannh@google.com Signed-off-by: Linus Torvalds commit 7f3bfab52cab96c510fd60dd757a32db7bc52d3c Author: Jann Horn Date: Thu Oct 15 20:12:57 2020 -0700 mm/gup: take mmap_lock in get_dump_page() Properly take the mmap_lock before calling into the GUP code from get_dump_page(); and play nice, allowing the GUP code to drop the mmap_lock if it has to sleep. As Linus pointed out, we don't actually need the VMA because __get_user_pages() will flush the dcache for us if necessary. Signed-off-by: Jann Horn Signed-off-by: Andrew Morton Acked-by: Linus Torvalds Cc: Christoph Hellwig Cc: Alexander Viro Cc: "Eric W . Biederman" Cc: Oleg Nesterov Cc: Hugh Dickins Link: http://lkml.kernel.org/r/20200827114932.3572699-7-jannh@google.com Signed-off-by: Linus Torvalds commit a07279c9a8cd7dbd321640ff7210591599ee00a4 Author: Jann Horn Date: Thu Oct 15 20:12:54 2020 -0700 binfmt_elf, binfmt_elf_fdpic: use a VMA list snapshot In both binfmt_elf and binfmt_elf_fdpic, use a new helper dump_vma_snapshot() to take a snapshot of the VMA list (including the gate VMA, if we have one) while protected by the mmap_lock, and then use that snapshot instead of walking the VMA list without locking. An alternative approach would be to keep the mmap_lock held across the entire core dumping operation; however, keeping the mmap_lock locked while we may be blocked for an unbounded amount of time (e.g. because we're dumping to a FUSE filesystem or so) isn't really optimal; the mmap_lock blocks things like the ->release handler of userfaultfd, and we don't really want critical system daemons to grind to a halt just because someone "gifted" them SCM_RIGHTS to an eternally-locked userfaultfd, or something like that. Since both the normal ELF code and the FDPIC ELF code need this functionality (and if any other binfmt wants to add coredump support in the future, they'd probably need it, too), implement this with a common helper in fs/coredump.c. A downside of this approach is that we now need a bigger amount of kernel memory per userspace VMA in the normal ELF case, and that we need O(n) kernel memory in the FDPIC ELF case at all; but 40 bytes per VMA shouldn't be terribly bad. There currently is a data race between stack expansion and anything that reads ->vm_start or ->vm_end under the mmap_lock held in read mode; to mitigate that for core dumping, take the mmap_lock in write mode when taking a snapshot of the VMA hierarchy. (If we only took the mmap_lock in read mode, we could end up with a corrupted core dump if someone does get_user_pages_remote() concurrently. Not really a major problem, but taking the mmap_lock either way works here, so we might as well avoid the issue.) (This doesn't do anything about the existing data races with stack expansion in other mm code.) Signed-off-by: Jann Horn Signed-off-by: Andrew Morton Acked-by: Linus Torvalds Cc: Christoph Hellwig Cc: Alexander Viro Cc: "Eric W . Biederman" Cc: Oleg Nesterov Cc: Hugh Dickins Link: http://lkml.kernel.org/r/20200827114932.3572699-6-jannh@google.com Signed-off-by: Linus Torvalds commit 429a22e776a2b9f85a2b9c53d8e647598b553dd1 Author: Jann Horn Date: Thu Oct 15 20:12:50 2020 -0700 coredump: rework elf/elf_fdpic vma_dump_size() into common helper At the moment, the binfmt_elf and binfmt_elf_fdpic code have slightly different code to figure out which VMAs should be dumped, and if so, whether the dump should contain the entire VMA or just its first page. Eliminate duplicate code by reworking the binfmt_elf version into a generic core dumping helper in coredump.c. As part of that, change the heuristic for detecting executable/library header pages to check whether the inode is executable instead of looking at the file mode. This is less problematic in terms of locking because it lets us avoid get_user() under the mmap_sem. (And arguably it looks nicer and makes more sense in generic code.) Adjust a little bit based on the binfmt_elf_fdpic version: ->anon_vma is only meaningful under CONFIG_MMU, otherwise we have to assume that the VMA has been written to. Suggested-by: Linus Torvalds Signed-off-by: Jann Horn Signed-off-by: Andrew Morton Acked-by: Linus Torvalds Cc: Christoph Hellwig Cc: Alexander Viro Cc: "Eric W . Biederman" Cc: Oleg Nesterov Cc: Hugh Dickins Link: http://lkml.kernel.org/r/20200827114932.3572699-5-jannh@google.com Signed-off-by: Linus Torvalds commit afc63a97b764bc5a715762d0d9cc9785c2ef4e75 Author: Jann Horn Date: Thu Oct 15 20:12:46 2020 -0700 coredump: refactor page range dumping into common helper Both fs/binfmt_elf.c and fs/binfmt_elf_fdpic.c need to dump ranges of pages into the coredump file. Extract that logic into a common helper. Signed-off-by: Jann Horn Signed-off-by: Andrew Morton Acked-by: Linus Torvalds Cc: Christoph Hellwig Cc: Alexander Viro Cc: "Eric W . Biederman" Cc: Oleg Nesterov Cc: Hugh Dickins Link: http://lkml.kernel.org/r/20200827114932.3572699-4-jannh@google.com Signed-off-by: Linus Torvalds commit df0c09c0117300cd03f6e8532527bf591d4eee65 Author: Jann Horn Date: Thu Oct 15 20:12:43 2020 -0700 coredump: let dump_emit() bail out on short writes dump_emit() has a retry loop, but there seems to be no way for that retry logic to actually be used; and it was also buggy, writing the same data repeatedly after a short write. Let's just bail out on a short write. Suggested-by: Linus Torvalds Signed-off-by: Jann Horn Signed-off-by: Andrew Morton Acked-by: Linus Torvalds Cc: Christoph Hellwig Cc: Alexander Viro Cc: "Eric W . Biederman" Cc: Oleg Nesterov Cc: Hugh Dickins Link: http://lkml.kernel.org/r/20200827114932.3572699-3-jannh@google.com Signed-off-by: Linus Torvalds commit 8f942eea12ae8c5a7cde85c145234b25e38de959 Author: Jann Horn Date: Thu Oct 15 20:12:40 2020 -0700 binfmt_elf_fdpic: stop using dump_emit() on user pointers on !MMU Patch series "Fix ELF / FDPIC ELF core dumping, and use mmap_lock properly in there", v5. At the moment, we have that rather ugly mmget_still_valid() helper to work around : ELF core dumping doesn't take the mmap_sem while traversing the task's VMAs, and if anything (like userfaultfd) then remotely messes with the VMA tree, fireworks ensue. So at the moment we use mmget_still_valid() to bail out in any writers that might be operating on a remote mm's VMAs. With this series, I'm trying to get rid of the need for that as cleanly as possible. ("cleanly" meaning "avoid holding the mmap_lock across unbounded sleeps".) Patches 1, 2, 3 and 4 are relatively unrelated cleanups in the core dumping code. Patches 5 and 6 implement the main change: Instead of repeatedly accessing the VMA list with sleeps in between, we snapshot it at the start with proper locking, and then later we just use our copy of the VMA list. This ensures that the kernel won't crash, that VMA metadata in the coredump is consistent even in the presence of concurrent modifications, and that any virtual addresses that aren't being concurrently modified have their contents show up in the core dump properly. The disadvantage of this approach is that we need a bit more memory during core dumping for storing metadata about all VMAs. At the end of the series, patch 7 removes the old workaround for this issue (mmget_still_valid()). I have tested: - Creating a simple core dump on X86-64 still works. - The created coredump on X86-64 opens in GDB and looks plausible. - X86-64 core dumps contain the first page for executable mappings at offset 0, and don't contain the first page for non-executable file mappings or executable mappings at offset !=0. - NOMMU 32-bit ARM can still generate plausible-looking core dumps through the FDPIC implementation. (I can't test this with GDB because GDB is missing some structure definition for nommu ARM, but I've poked around in the hexdump and it looked decent.) This patch (of 7): dump_emit() is for kernel pointers, and VMAs describe userspace memory. Let's be tidy here and avoid accessing userspace pointers under KERNEL_DS, even if it probably doesn't matter much on !MMU systems - especially given that it looks like we can just use the same get_dump_page() as on MMU if we move it out of the CONFIG_MMU block. One small change we have to make in get_dump_page() is to use __get_user_pages_locked() instead of __get_user_pages(), since the latter doesn't exist on nommu. On mmu builds, __get_user_pages_locked() will just call __get_user_pages() for us. Signed-off-by: Jann Horn Signed-off-by: Andrew Morton Acked-by: Linus Torvalds Cc: Christoph Hellwig Cc: Alexander Viro Cc: "Eric W . Biederman" Cc: Oleg Nesterov Cc: Hugh Dickins Link: http://lkml.kernel.org/r/20200827114932.3572699-1-jannh@google.com Link: http://lkml.kernel.org/r/20200827114932.3572699-2-jannh@google.com Signed-off-by: Linus Torvalds commit 206e22f01941b19f9466f48b53cc0d19de493e7a Author: Chris Kennelly Date: Thu Oct 15 20:12:36 2020 -0700 tools/testing/selftests: add self-test for verifying load alignment This produces a PIE binary with a variety of p_align requirements, suitable for verifying that the load address meets that alignment requirement. Signed-off-by: Chris Kennelly Signed-off-by: Andrew Morton Cc: Shuah Khan Cc: Alexander Viro Cc: Alexey Dobriyan Cc: David Rientjes Cc: Fangrui Song Cc: Hugh Dickens Cc: Ian Rogers Cc: "Kirill A. Shutemov" Cc: Mike Kravetz Cc: Nick Desaulniers Cc: Sandeep Patil Cc: Song Liu Cc: Suren Baghdasaryan Link: https://lkml.kernel.org/r/20200820170541.1132271-3-ckennelly@google.com Link: https://lkml.kernel.org/r/20200821233848.3904680-3-ckennelly@google.com Signed-off-by: Linus Torvalds commit ce81bb256a224259ab686742a6284930cbe4f1fa Author: Chris Kennelly Date: Thu Oct 15 20:12:32 2020 -0700 fs/binfmt_elf: use PT_LOAD p_align values for suitable start address Patch series "Selecting Load Addresses According to p_align", v3. The current ELF loading mechancism provides page-aligned mappings. This can lead to the program being loaded in a way unsuitable for file-backed, transparent huge pages when handling PIE executables. While specifying -z,max-page-size=0x200000 to the linker will generate suitably aligned segments for huge pages on x86_64, the executable needs to be loaded at a suitably aligned address as well. This alignment requires the binary's cooperation, as distinct segments need to be appropriately paddded to be eligible for THP. For binaries built with increased alignment, this limits the number of bits usable for ASLR, but provides some randomization over using fixed load addresses/non-PIE binaries. This patch (of 2): The current ELF loading mechancism provides page-aligned mappings. This can lead to the program being loaded in a way unsuitable for file-backed, transparent huge pages when handling PIE executables. For binaries built with increased alignment, this limits the number of bits usable for ASLR, but provides some randomization over using fixed load addresses/non-PIE binaries. Tested by verifying program with -Wl,-z,max-page-size=0x200000 loading. [akpm@linux-foundation.org: fix max() warning] [ckennelly@google.com: augment comment] Link: https://lkml.kernel.org/r/20200821233848.3904680-2-ckennelly@google.com Signed-off-by: Chris Kennelly Signed-off-by: Andrew Morton Cc: Alexander Viro Cc: Alexey Dobriyan Cc: Song Liu Cc: David Rientjes Cc: Ian Rogers Cc: Hugh Dickens Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Fangrui Song Cc: Nick Desaulniers Cc: "Kirill A. Shutemov" Cc: Mike Kravetz Cc: Shuah Khan Link: https://lkml.kernel.org/r/20200820170541.1132271-1-ckennelly@google.com Link: https://lkml.kernel.org/r/20200820170541.1132271-2-ckennelly@google.com Signed-off-by: Linus Torvalds commit 48ca2d8ac8a1d404a0f85eabfe1546304adbd844 Author: Dwaipayan Ray Date: Thu Oct 15 20:12:28 2020 -0700 checkpatch: add new warnings to author signoff checks. The author signed-off-by checks are currently very vague. Cases like same name or same address are not handled separately. For example, running checkpatch on commit be6577af0cef ("parisc: Add atomic64_set_release() define to avoid CPU soft lockups"), gives: WARNING: Missing Signed-off-by: line by nominal patch author 'John David Anglin ' The signoff line was: "Signed-off-by: Dave Anglin " Clearly the author has signed off but with a slightly different version of his name. A more appropriate warning would have been to point out at the name mismatch instead. Previously, the values assumed by $authorsignoff were either 0 or 1 to indicate whether a proper sign off by author is present. Extended the checks to handle four new cases. $authorsignoff values now denote the following: 0: Missing sign off by patch author. 1: Sign off present and identical. 2: Addresses and names match, but comments differ. "James Watson(JW) ", "James Watson " 3: Addresses match, but names are different. "James Watson ", "James " 4: Names match, but addresses are different. "James Watson ", "James Watson " 5: Names match, addresses excluding subaddress details (RFC 5233) match. "James Watson ", "James Watson " Also introduced a new message type FROM_SIGN_OFF_MISMATCH for cases 2, 3, 4 and 5. Suggested-by: Joe Perches Signed-off-by: Dwaipayan Ray Signed-off-by: Andrew Morton Acked-by: Joe Perches Link: https://lore.kernel.org/linux-kernel-mentees/c1ca28e77e8e3bfa7aadf3efa8ed70f97a9d369c.camel@perches.com/ Link: https://lkml.kernel.org/r/20201007192029.551744-1-dwaipayanray1@gmail.com Signed-off-by: Linus Torvalds commit c70735c23bf6cbfc9d7dad5f4ad562f0e40a89fa Author: Łukasz Stelmach Date: Thu Oct 15 20:12:25 2020 -0700 checkpatch: fix false positive on empty block comment lines To avoid false positives in presence of SPDX-License-Identifier in networking files it is required to increase the leeway for empty block comment lines by one line. For example, checking drivers/net/loopback.c which starts with // SPDX-License-Identifier: GPL-2.0-or-later /* * INET An implementation of the TCP/IP protocol suite for the LINUX rsults in an unnecessary warning WARNING: networking block comments don't use an empty /* line, use /* Comment... +/* + * INET An implementation of the TCP/IP protocol suite for the LINUX Signed-off-by: Łukasz Stelmach Signed-off-by: Andrew Morton Acked-by: Joe Perches Cc: Bartłomiej Żolnierkiewicz Cc: Marek Szyprowski Link: https://lkml.kernel.org/r/20201006083509.19934-1-l.stelmach@samsung.com Signed-off-by: Linus Torvalds commit 2e44e8033a9bc0420f315c32843ab89c0fc7bd0f Author: Dwaipayan Ray Date: Thu Oct 15 20:12:22 2020 -0700 checkpatch: fix multi-statement macro checks for while blocks. Checkpatch.pl doesn't have a check for excluding while (...) {...} blocks from MULTISTATEMENT_MACRO_USE_DO_WHILE error. For example, running checkpatch.pl on the file mm/maccess.c in the kernel generates the following error: ERROR: Macros with complex values should be enclosed in parentheses +#define copy_from_kernel_nofault_loop(dst, src, len, type, err_label) \ + while (len >= sizeof(type)) { \ + __get_kernel_nofault(dst, src, type, err_label); \ + dst += sizeof(type); \ + src += sizeof(type); \ + len -= sizeof(type); \ + } The error is misleading for this case. Enclosing it in parentheses doesn't make any sense. Checkpatch already has an exception list for such common macro types. Added a new exception for while (...) {...} style blocks to the same. In addition, the brace flatten logic was modified by changing the substitution characters from "1" to "1u". This was done to ensure that macros in the form "#define foo(bar) while(bar){bar--;}" were also correctly procecssed. Link: https://lore.kernel.org/linux-kernel-mentees/dc985938aa3986702815a0bd68dfca8a03c85447.camel@perches.com/ Suggested-by: Joe Perches Signed-off-by: Dwaipayan Ray Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20201001171903.312021-1-dwaipayanray1@gmail.com Signed-off-by: Linus Torvalds commit a0154cdbd3dcf2b1b92f42cb1351a63f3f947e80 Author: Joe Perches Date: Thu Oct 15 20:12:19 2020 -0700 checkpatch: emit a warning on embedded filenames Embedding the complete filename path inside the file isn't particularly useful as often the path is moved around and becomes incorrect. Emit a warning when the source contains the filename. [akpm@linux-foundation.org: remove stray " di"] Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/1fd5f9188a14acdca703ca00301ee323de672a8d.camel@perches.com Signed-off-by: Linus Torvalds commit e7f929f3ca9ecadb7d38340345920af49e09eb6a Author: Dwaipayan Ray Date: Thu Oct 15 20:12:15 2020 -0700 checkpatch: extend author Signed-off-by check for split From: header Checkpatch did not handle cases where the author From: header was split into multiple lines. The author identity could not be resolved and checkpatch generated a false NO_AUTHOR_SIGN_OFF warning. A typical example is commit e33bcbab16d1 ("tee: add support for session's client UUID generation"). When checkpatch was run on this commit, it displayed: "WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author ''" This was due to split header lines not being handled properly and the author himself wrote in commit cd2614967d8b ("checkpatch: warn if missing author Signed-off-by"): "Split From: headers are not fully handled: only the first part is compared." Support split From: headers by correctly parsing the header extension lines. RFC 5322, Section-2.2.3 stated that each extended line must start with a WSP character (a space or htab). The solution was therefore to concatenate the lines which start with a WSP to get the correct long header. Suggested-by: Joe Perches Signed-off-by: Dwaipayan Ray Signed-off-by: Andrew Morton Tested-by: Lukas Bulwahn Reviewed-by: Lukas Bulwahn Acked-by: Joe Perches Link: https://lore.kernel.org/linux-kernel-mentees/f5d8124e54a50480b0a9fa638787bc29b6e09854.camel@perches.com/ Link: https://lkml.kernel.org/r/20200921085436.63003-1-dwaipayanray1@gmail.com Signed-off-by: Linus Torvalds commit f5f613259f3fea813c3f698a426c78eac61d8601 Author: Joe Perches Date: Thu Oct 15 20:12:12 2020 -0700 checkpatch: allow not using -f with files that are in git If a file exists in git and checkpatch is used without the -f flag for scanning a file, then checkpatch will scan the file assuming it's a patch and emit: ERROR: Does not appear to be a unified-diff format patch Change the behavior to assume the -f flag if the file exists in git. [joe@perches.com: fix git "fatal" warning if file argument outside kernel tree] Link: https://lkml.kernel.org/r/b6afa04112d450c2fc120a308d706acd60cee294.camel@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Reviewed-by: Julia Lawall Cc: Rasmus Villemoes Link: https://lkml.kernel.org/r/45b81a48e1568bd0126a96f5046eb7aaae9b83c9.camel@perches.com Signed-off-by: Linus Torvalds commit 99ca38c2aa7da5ab39e55f13fd425c6101903ccb Author: Joe Perches Date: Thu Oct 15 20:12:09 2020 -0700 checkpatch: warn on self-assignments The uninitialized_var() macro was removed recently via commit 63a0895d960a ("compiler: Remove uninitialized_var() macro") as it's not a particularly useful warning and its use can "paper over real bugs". Add a checkpatch test to warn on self-assignments as a means to avoid compiler warnings and as a back-door mechanism to reproduce the old uninitialized_var macro behavior. [akpm@linux-foundation.org: coding style fixes] Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Cc: Kees Cook Cc: Gustavo A. R. Silva Cc: Denis Efremov Cc: Julia Lawall Link: https://lkml.kernel.org/r/afc2cffdd315d3e4394af149278df9e8af7f49f4.camel@perches.com Signed-off-by: Linus Torvalds commit c12093a11462b775a83ed600bf0036c8bef3e841 Author: Rikard Falkeborn Date: Thu Oct 15 20:12:05 2020 -0700 const_structs.checkpatch: add pinctrl_ops and pinmux_ops All usages of include/linux of these are const pointers, and all instances in the kernel except one, that are not const can be made const (patches have been posted for those separately). Signed-off-by: Rikard Falkeborn Signed-off-by: Andrew Morton Reviewed-by: Linus Walleij Acked-by: Manivannan Sadhasivam Cc: Joe Perches Cc: Andreas Färber Cc: Rikard Falkeborn Link: https://lkml.kernel.org/r/20200830224352.37114-1-rikard.falkeborn@gmail.com Signed-off-by: Linus Torvalds commit 8020b253631286807ca41f176e96e18af14bfb2e Author: Nicolas Boichat Date: Thu Oct 15 20:12:02 2020 -0700 checkpatch: warn if trace_printk and friends are called trace_printk is meant as a debugging tool, and should not be compiled into production code without specific debug Kconfig options enabled, or source code changes, as indicated by the warning that shows up on boot if any trace_printk is called: ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** ** ** ** trace_printk() being used. Allocating extra memory. ** ** ** ** This means that this is a DEBUG kernel and it is ** ** unsafe for production use. ** Let's warn developers when they try to submit such a change. Signed-off-by: Nicolas Boichat Signed-off-by: Andrew Morton Cc: Steven Rostedt Cc: Joe Perches Link: https://lkml.kernel.org/r/20200825193600.v2.1.I723c43c155f02f726c97501be77984f1e6bb740a@changeid Signed-off-by: Linus Torvalds commit ed4761f7804743e73ba2c0c140535a16d07032b6 Author: Rikard Falkeborn Date: Thu Oct 15 20:11:59 2020 -0700 const_structs.checkpatch: add phy_ops All usages of phy_ops in include/linux uses const phy_ops * and all instances of phy_ops in the kernel that are not const already can be made const (patches have been posted for those separately). Suggested-by: Joe Perches Signed-off-by: Rikard Falkeborn Signed-off-by: Andrew Morton Cc: Kishon Vijay Abraham I Cc: Vinod Koul Link: https://lkml.kernel.org/r/20200824214132.9072-1-rikard.falkeborn@gmail.com Signed-off-by: Linus Torvalds commit 40873aba2c6b96c6f21265e6508eaa3de145e30a Author: Joe Perches Date: Thu Oct 15 20:11:56 2020 -0700 checkpatch: add test for comma use that should be semicolon There are commas used as statement terminations that should typically have used semicolons instead. Only direct assignments or use of a single function or value on a single line are detected by this test. e.g.: foo = bar(), /* typical use is semicolon not comma */ bar = baz(); Add an imperfect test to detect these comma uses. No false positives were found in testing, but many types of false negatives are possible. e.g.: foo = bar() + 1, /* comma use, but not direct assignment */ bar = baz(); Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/3bf27caf462007dfa75647b040ab3191374a59de.camel@perches.com Signed-off-by: Linus Torvalds commit 310cd06ba2496002481eb7fd3b02c51d115aa115 Author: Joe Perches Date: Thu Oct 15 20:11:52 2020 -0700 checkpatch: move repeated word test Currently this test only works on .[ch] files. Move the test to check more file types and the commit log. Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/180b3b5677771c902b2e2f7a2b7090ede65fe004.camel@perches.com Signed-off-by: Linus Torvalds commit 3e89ad8506f39c4739a6c9ca1e1552f506f000c9 Author: Jerome Forissier Date: Thu Oct 15 20:11:49 2020 -0700 checkpatch: add --kconfig-prefix Kconfig allows to customize the CONFIG_ prefix via the $CONFIG_ environment variable. Out-of-tree projects may therefore use Kconfig with a different prefix, or they may use a custom configuration tool which does not use the CONFIG_ prefix at all. Such projects may still want to adhere to the Linux kernel coding style and run checkpatch.pl. One example is OP-TEE [1] which does not use Kconfig but does have configuration options prefixed with CFG_. It also mostly follows the kernel coding style and therefore being able to use checkpatch is quite valuable. To make this possible, add the --kconfig-prefix command line option. [1] https://github.com/OP-TEE/optee_os Signed-off-by: Jerome Forissier Signed-off-by: Andrew Morton Acked-by: Joe Perches Link: http://lkml.kernel.org/r/20200818081732.800449-1-jerome@forissier.org Signed-off-by: Linus Torvalds commit 004fba1ae6ddd66ba0faa4f60c603b3ca77b3554 Author: Wei Yang Date: Thu Oct 15 20:11:46 2020 -0700 bitops: use the same mechanism for get_count_order[_long] These two functions share the same logic. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Cc: Christian Brauner Cc: Andy Shevchenko Link: https://lkml.kernel.org/r/20200807085837.11697-3-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit a9eb63705e379f10a3c9d13fc6aee8b50805e862 Author: Wei Yang Date: Thu Oct 15 20:11:41 2020 -0700 bitops: simplify get_count_order_long() These two cases could be unified into one. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Cc: Christian Brauner Cc: Andy Shevchenko Link: https://lkml.kernel.org/r/20200807085837.11697-2-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 904542dc56524f921a6bab0639ff6249c01e775f Author: Tobias Jordan Date: Thu Oct 15 20:11:38 2020 -0700 lib/crc32.c: fix trivial typo in preprocessor condition Whether crc32_be needs a lookup table is chosen based on CRC_LE_BITS. Obviously, the _be function should be governed by the _BE_ define. This probably never pops up as it's hard to come up with a configuration where CRC_BE_BITS isn't the same as CRC_LE_BITS and as nobody is using bitwise CRC anyway. Fixes: 46c5801eaf86 ("crc32: bolt on crc32c") Signed-off-by: Tobias Jordan Signed-off-by: Andrew Morton Cc: Krzysztof Kozlowski Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Link: https://lkml.kernel.org/r/20200923182122.GA3338@agrajag.zerfleddert.de Signed-off-by: Linus Torvalds commit f3c9d0a3fe97a8b05548d27e9a8e7a5e6875004c Author: Dan Carpenter Date: Thu Oct 15 20:11:34 2020 -0700 lib/test_hmm.c: fix an error code in dmirror_allocate_chunk() This is supposed to return false on failure, not a negative error code. Fixes: 170e38548b81 ("mm/hmm/test: use after free in dmirror_allocate_chunk()") Signed-off-by: Dan Carpenter Signed-off-by: Andrew Morton Reviewed-by: Ralph Campbell Cc: Jerome Glisse Cc: Stephen Rothwell Cc: Jason Gunthorpe Cc: Dan Williams Link: https://lkml.kernel.org/r/20201010200812.GA1886610@mwanda Signed-off-by: Linus Torvalds commit e130816164e244b692921de49771eeb28205152d Author: Andy Shevchenko Date: Thu Oct 15 20:11:31 2020 -0700 include/linux/list.h: add a macro to test if entry is pointing to the head Add a macro to test if entry is pointing to the head of the list which is useful in cases like: list_for_each_entry(pos, &head, member) { if (cond) break; } if (list_entry_is_head(pos, &head, member)) return -ERRNO; that allows to avoid additional variable to be added to track if loop has not been stopped in the middle. While here, convert list_for_each_entry*() family of macros to use a new one. Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton Reviewed-by: Cezary Rojewski Link: https://lkml.kernel.org/r/20200929134342.51489-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Torvalds commit 1d339638a954edce06ffcaa15d883d322e9e8291 Author: Miaohe Lin Date: Thu Oct 15 20:11:28 2020 -0700 lib/percpu_counter.c: use helper macro abs() Use helper macro abs() to simplify the "x >= t || x <= -t" cmp. Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200927122746.5964-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit 6ed9b92e290b530197c2dda2271f5312abc475e6 Author: Christophe JAILLET Date: Thu Oct 15 20:11:25 2020 -0700 lib/scatterlist.c: avoid a double memset 'sgl' is zeroed a few lines below in 'sg_init_table()'. There is no need to clear it twice. Remove the redundant initialization. Signed-off-by: Christophe JAILLET Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200920071544.368841-1-christophe.jaillet@wanadoo.fr Signed-off-by: Linus Torvalds commit 3264ceec8f17a99a3895de7de06b4d7e9c8f3f30 Author: Stephen Boyd Date: Thu Oct 15 20:11:21 2020 -0700 lib/idr.c: document that ida_simple_{get,remove}() are deprecated These two functions are deprecated. Users should call ida_alloc() or ida_free() respectively instead. Add documentation to this effect until the macro can be removed. Signed-off-by: Stephen Boyd Signed-off-by: Andrew Morton Reviewed-by: Tri Vo Cc: Greg KH Cc: Jonathan Corbet Cc: Matthew Wilcox Link: https://lkml.kernel.org/r/20200910055246.2297797-2-swboyd@chromium.org Signed-off-by: Linus Torvalds commit 3b6742618ed9216dd6caad968fe8c83b32dff485 Author: Stephen Boyd Date: Thu Oct 15 20:11:17 2020 -0700 lib/idr.c: document calling context for IDA APIs mustn't use locks The documentation for these functions indicates that callers don't need to hold a lock while calling them, but that documentation is only in one place under "IDA Usage". Let's state the same information on each IDA function so that it's clear what the calling context requires. Furthermore, let's document ida_simple_get() with the same information so that callers know how this API works. Signed-off-by: Stephen Boyd Signed-off-by: Andrew Morton Reviewed-by: Greg Kroah-Hartman Cc: Tri Vo Cc: Jonathan Corbet Cc: Matthew Wilcox Link: https://lkml.kernel.org/r/20200910055246.2297797-1-swboyd@chromium.org Signed-off-by: Linus Torvalds commit 8d8472cfdefa0f5c839f5c4a507af5e26ee6f5bf Author: Randy Dunlap Date: Thu Oct 15 20:11:14 2020 -0700 lib/mpi/mpi-bit.c: fix spello of "functions" Fix typo/spello of "functions". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/8df15173-a6df-9426-7cad-a2d279bf1170@infradead.org Signed-off-by: Linus Torvalds commit 2d0469814ade60efb5cd8ca9af93c43bc3ba831e Author: Randy Dunlap Date: Thu Oct 15 20:11:10 2020 -0700 lib: test_sysctl: delete duplicated words Drop the repeated word "the". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200823040520.1999-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 408a93a2bb4f276f28059b51fbe0bbd06be350fc Author: Randy Dunlap Date: Thu Oct 15 20:11:07 2020 -0700 lib: syscall: delete duplicated words Drop the repeated word "the". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200823040514.26136-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit e0656501a6192ebced36764a007f91cc014d896d Author: Randy Dunlap Date: Thu Oct 15 20:11:04 2020 -0700 lib: radix-tree: delete duplicated words Drop the repeated word "be". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200823040508.26086-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 4e20ace06f705404df09316b859c267e9ec99354 Author: Randy Dunlap Date: Thu Oct 15 20:11:01 2020 -0700 lib: earlycpio: delete duplicated words Drop the repeated word "the". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200823040455.25995-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit dde57fe01a0a39ce131ad5611e0a4430cec66bd8 Author: Randy Dunlap Date: Thu Oct 15 20:10:57 2020 -0700 lib: dynamic_queue_limits: delete duplicated words + fix typo Drop the repeated word "the". Fix spelling of "excess". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200823040449.25946-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 2f22385fb1211a90f53ee197e0f41ae0d35b391c Author: Randy Dunlap Date: Thu Oct 15 20:10:51 2020 -0700 lib: decompress_bunzip2: delete duplicated words Drop the repeated word "how". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200823040436.25852-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit f1e594acb1bdf29b583fe205793699a8e7c35fc0 Author: Randy Dunlap Date: Thu Oct 15 20:10:48 2020 -0700 lib: libcrc32c: delete duplicated words Drop the repeated word "the". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200823040430.25807-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 197d6c1dde4e19517e8cf843eec7fc6417241969 Author: Randy Dunlap Date: Thu Oct 15 20:10:45 2020 -0700 lib: bitmap: delete duplicated words Drop the repeated word "an". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200823040424.25760-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 32dd8afae7db4d58612338a0bdc0974450e66382 Author: Jarkko Sakkinen Date: Thu Oct 15 20:10:41 2020 -0700 MAINTAINERS: jarkko.sakkinen@linux.intel.com -> jarkko@kernel.org Use @kernel.org address as the main communications end point. Update the corresponding M-entries and .mailmap (for git shortlog translation). Signed-off-by: Jarkko Sakkinen Signed-off-by: Andrew Morton Cc: Joe Perches Cc: Jonathan Corbet Cc: Kees Cook Cc: Mauro Carvalho Chehab Cc: "David S. Miller" Cc: Rob Herring Link: https://lkml.kernel.org/r/20201015142710.8371-1-jarkko.sakkinen@linux.intel.com Signed-off-by: Linus Torvalds commit 6343f6b71f83af8ebfc6f9740d1d74f2db88e6b0 Author: Joe Perches Date: Thu Oct 15 20:10:37 2020 -0700 get_maintainer: exclude MAINTAINERS file(s) from --git-fallback MAINTAINERS files generally have no specific maintainer but are updated by individuals for subsystems all over the source tree. Exclude MAINTAINERS file(s) from --git-fallback searches so the unlucky individuals that update the files the most are not shown by default. Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Cc: Rob Herring Cc: Mauro Carvalho Chehab Cc: "David S. Miller" Link: https://lkml.kernel.org/r/2bacb0a9c06fbb6d56a43bf930e808c74243c908.camel@perches.com Signed-off-by: Linus Torvalds commit cdfe2d22047661c5e0ecf8f28e7e8843ee177aff Author: Joe Perches Date: Thu Oct 15 20:10:34 2020 -0700 get_maintainer: add test for file in VCS It's somewhat common for me to ask get_maintainer to tell me who maintains a patch file rather than the files modified by the patch. Emit a warning if using get_maintainer.pl -f Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/f63229c051567041819f25e76f49d83c6e4c0f71.camel@perches.com Signed-off-by: Linus Torvalds commit b7621ebf8a0870f8d822a09dbd040aa5c4909da5 Author: Randy Dunlap Date: Thu Oct 15 20:10:31 2020 -0700 kernel: acct.c: fix some kernel-doc nits Fix kernel-doc notation to use the documented Returns: syntax and place the function description for acct_process() on the first line where it should be. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Cc: Alexander Viro Link: https://lkml.kernel.org/r/b4c33e5d-98e8-0c47-77b6-ac1859f94d7f@infradead.org Signed-off-by: Linus Torvalds commit 7b7b8a2c9560efb5874ea1d84d1dce5ba4c8c487 Author: Randy Dunlap Date: Thu Oct 15 20:10:28 2020 -0700 kernel/: fix repeated words in comments Fix multiple occurrences of duplicated words in kernel/. Fix one typo/spello on the same line as a duplicate word. Change one instance of "the the" to "that the". Otherwise just drop one of the repeated words. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/98202fa6-8919-ef63-9efe-c0fad5ca7af1@infradead.org Signed-off-by: Linus Torvalds commit 15ec0fcff6dab37533e02e2092d9228726186366 Author: Liao Pingfang Date: Thu Oct 15 20:10:25 2020 -0700 kernel/sys.c: replace do_brk with do_brk_flags in comment of prctl_set_mm_map() Replace do_brk with do_brk_flags in comment of prctl_set_mm_map(), since do_brk was removed in following commit. Fixes: bb177a732c4369 ("mm: do not bug_on on incorrect length in __mm_populate()") Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/1600650751-43127-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Linus Torvalds commit b296a6d53339a79082c1d2c1761e948e8b3def69 Author: Andy Shevchenko Date: Thu Oct 15 20:10:21 2020 -0700 kernel.h: split out min()/max() et al. helpers kernel.h is being used as a dump for all kinds of stuff for a long time. Here is the attempt to start cleaning it up by splitting out min()/max() et al. helpers. At the same time convert users in header and lib folder to use new header. Though for time being include new header back to kernel.h to avoid twisted indirected includes for other existing users. Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Rasmus Villemoes Cc: Joe Perches Cc: Linus Torvalds Link: https://lkml.kernel.org/r/20200910164152.GA1891694@smile.fi.intel.com Signed-off-by: Linus Torvalds commit ce9bebe683a131b86be986c3b6a741a520327679 Author: Randy Dunlap Date: Thu Oct 15 20:10:18 2020 -0700 fs: configfs: delete repeated words in comments Drop duplicated words {the, that} in comments. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Cc: Joel Becker Cc: Christoph Hellwig Link: https://lkml.kernel.org/r/20200811021826.25032-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit ab130f9108dcf2062a44f9f0706824ef2e30492e Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:10:15 2020 -0700 mm: rename page_order() to buddy_order() The current page_order() can only be called on pages in the buddy allocator. For compound pages, you have to use compound_order(). This is confusing and led to a bug, so rename page_order() to buddy_order(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20201001152259.14932-2-willy@infradead.org Signed-off-by: Linus Torvalds commit 1f0f8c0de09066d23760c1f5fac2cd53b32f1127 Author: Mike Rapoport Date: Thu Oct 15 20:10:11 2020 -0700 include/linux/mmzone.h: remove unused early_pfn_valid() The early_pfn_valid() macro is defined but it is never used. Remove it. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Acked-by: David Hildenbrand Link: https://lkml.kernel.org/r/20200923162915.26935-1-rppt@kernel.org Signed-off-by: Linus Torvalds commit 73eb7f9a4ff034d20c8f9454a5a6f45a60cf8dfc Author: Miaohe Lin Date: Thu Oct 15 20:10:08 2020 -0700 mm: use helper function put_write_access() In commit 1da177e4c3f4 ("Linux-2.6.12-rc2"), the helper put_write_access() came with the atomic_dec operation of the i_writecount field. But it forgot to use this helper in __vma_link_file() and dup_mmap(). Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200924115235.5111-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit e755f4af08b74e5bee4f7a1fc2c3a05188774608 Author: Xiaofei Tan Date: Thu Oct 15 20:10:05 2020 -0700 mm/workingset.c: fix some doc warnings Fix following warnings caused by mismatch bewteen function parameters and comments. mm/workingset.c:228: warning: Function parameter or member 'lruvec' not described in 'workingset_age_nonresident' mm/workingset.c:228: warning: Excess function parameter 'memcg' description in 'workingset_age_nonresident' Signed-off-by: Xiaofei Tan Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/1600485913-11192-1-git-send-email-tanxiaofei@huawei.com Signed-off-by: Linus Torvalds commit 70b6d25ec59cbc1327456ca15c2a779421ed13ce Author: Chen Tao Date: Thu Oct 15 20:10:01 2020 -0700 mm: fix some comments formatting Correct one function name "get_partials" with "get_partial". Update the old struct name of list3 with kmem_cache_node. Signed-off-by: Chen Tao Signed-off-by: Andrew Morton Reviewed-by: Mike Rapoport Link: https://lkml.kernel.org/r/Message-ID: Signed-off-by: Linus Torvalds commit 0e9aa6755757ea5e06e6130d5e50a93442456499 Author: Miaohe Lin Date: Thu Oct 15 20:09:58 2020 -0700 mm: fix some broken comments Fix some broken comments including typo, grammar error and wrong function name. Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200913095456.54873-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit ed0173733dd468883198c3136284394320b8fad6 Author: Yu Zhao Date: Thu Oct 15 20:09:55 2020 -0700 mm: use self-explanatory macros rather than "2" Signed-off-by: Yu Zhao Signed-off-by: Andrew Morton Cc: Alex Shi Link: http://lkml.kernel.org/r/20200831175042.3527153-2-yuzhao@google.com Signed-off-by: Linus Torvalds commit 955cc774f286adddeef85bd2e69edb0f2dab3214 Author: Ira Weiny Date: Thu Oct 15 20:09:52 2020 -0700 mm/highmem.c: clean up endif comments The #endif at the end of the file matches up with the '#if defined(HASHED_PAGE_VIRTUAL)' on line 374. Not the CONFIG_HIGHMEM #if earlier. Fix comments on both of the #endif's to indicate the correct end of blocks for each. Signed-off-by: Ira Weiny Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Mike Rapoport Link: https://lkml.kernel.org/r/20200819184635.112579-1-ira.weiny@intel.com Signed-off-by: Linus Torvalds commit 58f6f03497164445edaafbcf421dff712155ca7f Author: Wei Yang Date: Thu Oct 15 20:09:49 2020 -0700 mm/page_reporting.c: drop stale list head check in page_reporting_cycle list_for_each_entry_safe() guarantees that we will never stumble over the list head; "&page->lru != list" will always evaluate to true. Let's simplify. [david@redhat.com: Changelog refinements] Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Reviewed-by: Alexander Duyck Link: http://lkml.kernel.org/r/20200818084448.33969-1-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit c7df08f1953bb6cbd61b0c37f825b6e7b4489217 Author: YueHaibing Date: Thu Oct 15 20:09:46 2020 -0700 mm/slab.h: remove duplicate include Remove duplicate header which is included twice. Signed-off-by: YueHaibing Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Link: http://lkml.kernel.org/r/20200818114323.58156-1-yuehaibing@huawei.com Signed-off-by: Linus Torvalds commit 4e79603bbd33aa9600313ae6f887741efbb01456 Author: Douglas Anderson Date: Thu Oct 15 20:09:43 2020 -0700 zram: failing to decompress is WARN_ON worthy If we fail to decompress in zram it's a pretty serious problem. We were entrusted to be able to decompress the old data but we failed. Either we've got some crazy bug in the compression code or we've got memory corruption. At the moment, when this happens the log looks like this: ERR kernel: [ 1833.099861] zram: Decompression failed! err=-22, page=336112 ERR kernel: [ 1833.099881] zram: Decompression failed! err=-22, page=336112 ALERT kernel: [ 1833.099886] Read-error on swap-device (253:0:2688896) It is true that we have an "ALERT" level log in there, but (at least to me) it feels like even this isn't enough to impart the seriousness of this error. Let's convert to a WARN_ON. Note that WARN_ON is automatically "unlikely" so we can simply replace the old annotation with the new one. Signed-off-by: Douglas Anderson Signed-off-by: Andrew Morton Acked-by: Minchan Kim Cc: Sergey Senozhatsky Cc: Sonny Rao Cc: Jens Axboe Link: https://lkml.kernel.org/r/20200917174059.1.If09c882545dbe432268f7a67a4d4cfcb6caace4f@changeid Signed-off-by: Linus Torvalds commit b86c5fc4e71a23e284b7cdfb757fb76534ab4119 Author: David Hildenbrand Date: Thu Oct 15 20:09:39 2020 -0700 mm/memory_hotplug: update comment regarding zone shuffling As we no longer shuffle via generic_online_page() and when undoing isolation, we can simplify the comment. We now effectively shuffle only once (properly) when onlining new memory. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Wei Yang Acked-by: Michal Hocko Cc: Alexander Duyck Cc: Mel Gorman Cc: Michal Hocko Cc: Dave Hansen Cc: Vlastimil Babka Cc: Wei Yang Cc: Oscar Salvador Cc: Mike Rapoport Cc: Pankaj Gupta Cc: Haiyang Zhang Cc: "K. Y. Srinivasan" Cc: Matthew Wilcox Cc: Michael Ellerman Cc: Scott Cheloha Cc: Stephen Hemminger Cc: Wei Liu Link: https://lkml.kernel.org/r/20201005121534.15649-6-david@redhat.com Signed-off-by: Linus Torvalds commit 7fef431be9c9ac255838a9578331567b9dba4477 Author: David Hildenbrand Date: Thu Oct 15 20:09:35 2020 -0700 mm/page_alloc: place pages to tail in __free_pages_core() __free_pages_core() is used when exposing fresh memory to the buddy during system boot and when onlining memory in generic_online_page(). generic_online_page() is used in two cases: 1. Direct memory onlining in online_pages(). 2. Deferred memory onlining in memory-ballooning-like mechanisms (HyperV balloon and virtio-mem), when parts of a section are kept fake-offline to be fake-onlined later on. In 1, we already place pages to the tail of the freelist. Pages will be freed to MIGRATE_ISOLATE lists first and moved to the tail of the freelists via undo_isolate_page_range(). In 2, we currently don't implement a proper rule. In case of virtio-mem, where we currently always online MAX_ORDER - 1 pages, the pages will be placed to the HEAD of the freelist - undesireable. While the hyper-v balloon calls generic_online_page() with single pages, usually it will call it on successive single pages in a larger block. The pages are fresh, so place them to the tail of the freelist and avoid the PCP. In __free_pages_core(), remove the now superflouos call to set_page_refcounted() and add a comment regarding page initialization and the refcount. Note: In 2. we currently don't shuffle. If ever relevant (page shuffling is usually of limited use in virtualized environments), we might want to shuffle after a sequence of generic_online_page() calls in the relevant callers. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Oscar Salvador Reviewed-by: Wei Yang Acked-by: Pankaj Gupta Acked-by: Michal Hocko Cc: Alexander Duyck Cc: Mel Gorman Cc: Dave Hansen Cc: Mike Rapoport Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Wei Liu Cc: Matthew Wilcox Cc: Michael Ellerman Cc: Michal Hocko Cc: Scott Cheloha Link: https://lkml.kernel.org/r/20201005121534.15649-5-david@redhat.com Signed-off-by: Linus Torvalds commit 293ffa5ebb9c08a77d8de458166c31b4d7b0cd65 Author: David Hildenbrand Date: Thu Oct 15 20:09:30 2020 -0700 mm/page_alloc: move pages to tail in move_to_free_list() Whenever we move pages between freelists via move_to_free_list()/ move_freepages_block(), we don't actually touch the pages: 1. Page isolation doesn't actually touch the pages, it simply isolates pageblocks and moves all free pages to the MIGRATE_ISOLATE freelist. When undoing isolation, we move the pages back to the target list. 2. Page stealing (steal_suitable_fallback()) moves free pages directly between lists without touching them. 3. reserve_highatomic_pageblock()/unreserve_highatomic_pageblock() moves free pages directly between freelists without touching them. We already place pages to the tail of the freelists when undoing isolation via __putback_isolated_page(), let's do it in any case (e.g., if order <= pageblock_order) and document the behavior. To simplify, let's move the pages to the tail for all move_to_free_list()/move_freepages_block() users. In 2., the target list is empty, so there should be no change. In 3., we might observe a change, however, highatomic is more concerned about allocations succeeding than cache hotness - if we ever realize this change degrades a workload, we can special-case this instance and add a proper comment. This change results in all pages getting onlined via online_pages() to be placed to the tail of the freelist. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Reviewed-by: Wei Yang Acked-by: Pankaj Gupta Acked-by: Michal Hocko Cc: Alexander Duyck Cc: Mel Gorman Cc: Dave Hansen Cc: Vlastimil Babka Cc: Mike Rapoport Cc: Scott Cheloha Cc: Michael Ellerman Cc: Haiyang Zhang Cc: "K. Y. Srinivasan" Cc: Matthew Wilcox Cc: Michal Hocko Cc: Stephen Hemminger Cc: Wei Liu Link: https://lkml.kernel.org/r/20201005121534.15649-4-david@redhat.com Signed-off-by: Linus Torvalds commit 47b6a24a23825ae7b33ff11396980da7c353843d Author: David Hildenbrand Date: Thu Oct 15 20:09:26 2020 -0700 mm/page_alloc: place pages to tail in __putback_isolated_page() __putback_isolated_page() already documents that pages will be placed to the tail of the freelist - this is, however, not the case for "order >= MAX_ORDER - 2" (see buddy_merge_likely()) - which should be the case for all existing users. This change affects two users: - free page reporting - page isolation, when undoing the isolation (including memory onlining). This behavior is desirable for pages that haven't really been touched lately, so exactly the two users that don't actually read/write page content, but rather move untouched pages. The new behavior is especially desirable for memory onlining, where we allow allocation of newly onlined pages via undo_isolate_page_range() in online_pages(). Right now, we always place them to the head of the freelist, resulting in undesireable behavior: Assume we add individual memory chunks via add_memory() and online them right away to the NORMAL zone. We create a dependency chain of unmovable allocations e.g., via the memmap. The memmap of the next chunk will be placed onto previous chunks - if the last block cannot get offlined+removed, all dependent ones cannot get offlined+removed. While this can already be observed with individual DIMMs, it's more of an issue for virtio-mem (and I suspect also ppc DLPAR). Document that this should only be used for optimizations, and no code should rely on this behavior for correction (if the order of the freelists ever changes). We won't care about page shuffling: memory onlining already properly shuffles after onlining. free page reporting doesn't care about physically contiguous ranges, and there are already cases where page isolation will simply move (physically close) free pages to (currently) the head of the freelists via move_freepages_block() instead of shuffling. If this becomes ever relevant, we should shuffle the whole zone when undoing isolation of larger ranges, and after free_contig_range(). Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Alexander Duyck Reviewed-by: Oscar Salvador Reviewed-by: Wei Yang Reviewed-by: Pankaj Gupta Acked-by: Michal Hocko Cc: Mel Gorman Cc: Dave Hansen Cc: Vlastimil Babka Cc: Mike Rapoport Cc: Scott Cheloha Cc: Michael Ellerman Cc: Haiyang Zhang Cc: "K. Y. Srinivasan" Cc: Matthew Wilcox Cc: Michal Hocko Cc: Stephen Hemminger Cc: Wei Liu Link: https://lkml.kernel.org/r/20201005121534.15649-3-david@redhat.com Signed-off-by: Linus Torvalds commit f04a5d5d913fa81b5a3456512c3991aea7227912 Author: David Hildenbrand Date: Thu Oct 15 20:09:20 2020 -0700 mm/page_alloc: convert "report" flag of __free_one_page() to a proper flag Patch series "mm: place pages to the freelist tail when onlining and undoing isolation", v2. When adding separate memory blocks via add_memory*() and onlining them immediately, the metadata (especially the memmap) of the next block will be placed onto one of the just added+onlined block. This creates a chain of unmovable allocations: If the last memory block cannot get offlined+removed() so will all dependent ones. We directly have unmovable allocations all over the place. This can be observed quite easily using virtio-mem, however, it can also be observed when using DIMMs. The freshly onlined pages will usually be placed to the head of the freelists, meaning they will be allocated next, turning the just-added memory usually immediately un-removable. The fresh pages are cold, prefering to allocate others (that might be hot) also feels to be the natural thing to do. It also applies to the hyper-v balloon xen-balloon, and ppc64 dlpar: when adding separate, successive memory blocks, each memory block will have unmovable allocations on them - for example gigantic pages will fail to allocate. While the ZONE_NORMAL doesn't provide any guarantees that memory can get offlined+removed again (any kind of fragmentation with unmovable allocations is possible), there are many scenarios (hotplugging a lot of memory, running workload, hotunplug some memory/as much as possible) where we can offline+remove quite a lot with this patchset. a) To visualize the problem, a very simple example: Start a VM with 4GB and 8GB of virtio-mem memory: [root@localhost ~]# lsmem RANGE SIZE STATE REMOVABLE BLOCK 0x0000000000000000-0x00000000bfffffff 3G online yes 0-23 0x0000000100000000-0x000000033fffffff 9G online yes 32-103 Memory block size: 128M Total online memory: 12G Total offline memory: 0B Then try to unplug as much as possible using virtio-mem. Observe which memory blocks are still around. Without this patch set: [root@localhost ~]# lsmem RANGE SIZE STATE REMOVABLE BLOCK 0x0000000000000000-0x00000000bfffffff 3G online yes 0-23 0x0000000100000000-0x000000013fffffff 1G online yes 32-39 0x0000000148000000-0x000000014fffffff 128M online yes 41 0x0000000158000000-0x000000015fffffff 128M online yes 43 0x0000000168000000-0x000000016fffffff 128M online yes 45 0x0000000178000000-0x000000017fffffff 128M online yes 47 0x0000000188000000-0x0000000197ffffff 256M online yes 49-50 0x00000001a0000000-0x00000001a7ffffff 128M online yes 52 0x00000001b0000000-0x00000001b7ffffff 128M online yes 54 0x00000001c0000000-0x00000001c7ffffff 128M online yes 56 0x00000001d0000000-0x00000001d7ffffff 128M online yes 58 0x00000001e0000000-0x00000001e7ffffff 128M online yes 60 0x00000001f0000000-0x00000001f7ffffff 128M online yes 62 0x0000000200000000-0x0000000207ffffff 128M online yes 64 0x0000000210000000-0x0000000217ffffff 128M online yes 66 0x0000000220000000-0x0000000227ffffff 128M online yes 68 0x0000000230000000-0x0000000237ffffff 128M online yes 70 0x0000000240000000-0x0000000247ffffff 128M online yes 72 0x0000000250000000-0x0000000257ffffff 128M online yes 74 0x0000000260000000-0x0000000267ffffff 128M online yes 76 0x0000000270000000-0x0000000277ffffff 128M online yes 78 0x0000000280000000-0x0000000287ffffff 128M online yes 80 0x0000000290000000-0x0000000297ffffff 128M online yes 82 0x00000002a0000000-0x00000002a7ffffff 128M online yes 84 0x00000002b0000000-0x00000002b7ffffff 128M online yes 86 0x00000002c0000000-0x00000002c7ffffff 128M online yes 88 0x00000002d0000000-0x00000002d7ffffff 128M online yes 90 0x00000002e0000000-0x00000002e7ffffff 128M online yes 92 0x00000002f0000000-0x00000002f7ffffff 128M online yes 94 0x0000000300000000-0x0000000307ffffff 128M online yes 96 0x0000000310000000-0x0000000317ffffff 128M online yes 98 0x0000000320000000-0x0000000327ffffff 128M online yes 100 0x0000000330000000-0x000000033fffffff 256M online yes 102-103 Memory block size: 128M Total online memory: 8.1G Total offline memory: 0B With this patch set: [root@localhost ~]# lsmem RANGE SIZE STATE REMOVABLE BLOCK 0x0000000000000000-0x00000000bfffffff 3G online yes 0-23 0x0000000100000000-0x000000013fffffff 1G online yes 32-39 Memory block size: 128M Total online memory: 4G Total offline memory: 0B All memory can get unplugged, all memory block can get removed. Of course, no workload ran and the system was basically idle, but it highlights the issue - the fairly deterministic chain of unmovable allocations. When a huge page for the 2MB memmap is needed, a just-onlined 4MB page will be split. The remaining 2MB page will be used for the memmap of the next memory block. So one memory block will hold the memmap of the two following memory blocks. Finally the pages of the last-onlined memory block will get used for the next bigger allocations - if any allocation is unmovable, all dependent memory blocks cannot get unplugged and removed until that allocation is gone. Note that with bigger memory blocks (e.g., 256MB), *all* memory blocks are dependent and none can get unplugged again! b) Experiment with memory intensive workload I performed an experiment with an older version of this patch set (before we used undo_isolate_page_range() in online_pages(): Hotplug 56GB to a VM with an initial 4GB, onlining all memory to ZONE_NORMAL right from the kernel when adding it. I then run various memory intensive workloads that consume most system memory for a total of 45 minutes. Once finished, I try to unplug as much memory as possible. With this change, I am able to remove via virtio-mem (adding individual 128MB memory blocks) 413 out of 448 added memory blocks. Via individual (256MB) DIMMs 380 out of 448 added memory blocks. (I don't have any numbers without this patchset, but looking at the above example, it's at most half of the 448 memory blocks for virtio-mem, and most probably none for DIMMs). Again, there are workloads that might behave very differently due to the nature of ZONE_NORMAL. This change also affects (besides memory onlining): - Other users of undo_isolate_page_range(): Pages are always placed to the tail. -- When memory offlining fails -- When memory isolation fails after having isolated some pageblocks -- When alloc_contig_range() either succeeds or fails - Other users of __putback_isolated_page(): Pages are always placed to the tail. -- Free page reporting - Other users of __free_pages_core() -- AFAIKs, any memory that is getting exposed to the buddy during boot. IIUC we will now usually allocate memory from lower addresses within a zone first (especially during boot). - Other users of generic_online_page() -- Hyper-V balloon This patch (of 5): Let's prepare for additional flags and avoid long parameter lists of bools. Follow-up patches will also make use of the flags in __free_pages_ok(). Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Alexander Duyck Reviewed-by: Vlastimil Babka Reviewed-by: Oscar Salvador Reviewed-by: Wei Yang Reviewed-by: Pankaj Gupta Acked-by: Michal Hocko Cc: Mel Gorman Cc: Dave Hansen Cc: Mike Rapoport Cc: Matthew Wilcox Cc: Haiyang Zhang Cc: "K. Y. Srinivasan" Cc: Michael Ellerman Cc: Michal Hocko Cc: Scott Cheloha Cc: Stephen Hemminger Cc: Wei Liu Cc: Michal Hocko Link: https://lkml.kernel.org/r/20201005121534.15649-1-david@redhat.com Link: https://lkml.kernel.org/r/20201005121534.15649-2-david@redhat.com Signed-off-by: Linus Torvalds commit 90c7eaeb14a325a760d732184ff1fbed47e5fa98 Author: Laurent Dufour Date: Thu Oct 15 20:09:15 2020 -0700 mm: don't panic when links can't be created in sysfs At boot time, or when doing memory hot-add operations, if the links in sysfs can't be created, the system is still able to run, so just report the error in the kernel log rather than BUG_ON and potentially make system unusable because the callpath can be called with locks held. Since the number of memory blocks managed could be high, the messages are rate limited. As a consequence, link_mem_sections() has no status to report anymore. Signed-off-by: Laurent Dufour Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Acked-by: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Fenghua Yu Cc: Nathan Lynch Cc: "Rafael J . Wysocki" Cc: Scott Cheloha Cc: Tony Luck Link: https://lkml.kernel.org/r/20200915094143.79181-4-ldufour@linux.ibm.com Signed-off-by: Linus Torvalds commit cb8e3c8b4f45e4ed8987a581956dc9c3827a5bcf Author: David Hildenbrand Date: Thu Oct 15 20:09:12 2020 -0700 kernel/resource: make iomem_resource implicit in release_mem_region_adjustable() "mem" in the name already indicates the root, similar to release_mem_region() and devm_request_mem_region(). Make it implicit. The only single caller always passes iomem_resource, other parents are not applicable. Suggested-by: Wei Yang Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Wei Yang Cc: Michal Hocko Cc: Dan Williams Cc: Jason Gunthorpe Cc: Kees Cook Cc: Ard Biesheuvel Cc: Pankaj Gupta Cc: Baoquan He Link: https://lkml.kernel.org/r/20200916073041.10355-1-david@redhat.com Signed-off-by: Linus Torvalds commit 2c76e7f6c42bcee0e25194b54140cbce866d191a Author: David Hildenbrand Date: Thu Oct 15 20:09:07 2020 -0700 hv_balloon: try to merge system ram resources Let's try to merge system ram resources we add, to minimize the number of resources in /proc/iomem. We don't care about the boundaries of individual chunks we added. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Wei Liu Cc: Michal Hocko Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Wei Liu Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Cc: Anton Blanchard Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Boris Ostrovsky Cc: Christian Borntraeger Cc: Dan Williams Cc: Dave Jiang Cc: Eric Biederman Cc: Greg Kroah-Hartman Cc: Heiko Carstens Cc: Jason Gunthorpe Cc: Jason Wang Cc: Juergen Gross Cc: Julien Grall Cc: Kees Cook Cc: Len Brown Cc: Leonardo Bras Cc: Libor Pechacek Cc: Michael Ellerman Cc: "Michael S. Tsirkin" Cc: Nathan Lynch Cc: "Oliver O'Halloran" Cc: Paul Mackerras Cc: Pingfan Liu Cc: "Rafael J. Wysocki" Cc: Roger Pau Monné Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vishal Verma Link: https://lkml.kernel.org/r/20200911103459.10306-9-david@redhat.com Signed-off-by: Linus Torvalds commit 1b989d5d72abb237ae1ee8c4ce3e15cd5a364a68 Author: David Hildenbrand Date: Thu Oct 15 20:09:01 2020 -0700 xen/balloon: try to merge system ram resources Let's try to merge system ram resources we add, to minimize the number of resources in /proc/iomem. We don't care about the boundaries of individual chunks we added. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Juergen Gross Cc: Michal Hocko Cc: Boris Ostrovsky Cc: Stefano Stabellini Cc: Roger Pau Monné Cc: Julien Grall Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Cc: Anton Blanchard Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Dan Williams Cc: Dave Jiang Cc: Eric Biederman Cc: Greg Kroah-Hartman Cc: Haiyang Zhang Cc: Heiko Carstens Cc: Jason Gunthorpe Cc: Jason Wang Cc: Kees Cook Cc: "K. Y. Srinivasan" Cc: Len Brown Cc: Leonardo Bras Cc: Libor Pechacek Cc: Michael Ellerman Cc: "Michael S. Tsirkin" Cc: Nathan Lynch Cc: "Oliver O'Halloran" Cc: Paul Mackerras Cc: Pingfan Liu Cc: "Rafael J. Wysocki" Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vishal Verma Cc: Wei Liu Link: https://lkml.kernel.org/r/20200911103459.10306-8-david@redhat.com Signed-off-by: Linus Torvalds commit 9b24247a24471e1333fb556a12d0e3be30d2a750 Author: David Hildenbrand Date: Thu Oct 15 20:08:56 2020 -0700 virtio-mem: try to merge system ram resources virtio-mem adds memory in memory block granularity, to be able to remove it in the same granularity again later, and to grow slowly on demand. This, however, results in quite a lot of resources when adding a lot of memory. Resources are effectively stored in a list-based tree. Having a lot of resources not only wastes memory, it also makes traversing that tree more expensive, and makes /proc/iomem explode in size (e.g., requiring kexec-tools to manually merge resources later when e.g., trying to create a kdump header). Before this patch, we get (/proc/iomem) when hotplugging 2G via virtio-mem on x86-64: [...] 100000000-13fffffff : System RAM 140000000-33fffffff : virtio0 140000000-147ffffff : System RAM (virtio_mem) 148000000-14fffffff : System RAM (virtio_mem) 150000000-157ffffff : System RAM (virtio_mem) 158000000-15fffffff : System RAM (virtio_mem) 160000000-167ffffff : System RAM (virtio_mem) 168000000-16fffffff : System RAM (virtio_mem) 170000000-177ffffff : System RAM (virtio_mem) 178000000-17fffffff : System RAM (virtio_mem) 180000000-187ffffff : System RAM (virtio_mem) 188000000-18fffffff : System RAM (virtio_mem) 190000000-197ffffff : System RAM (virtio_mem) 198000000-19fffffff : System RAM (virtio_mem) 1a0000000-1a7ffffff : System RAM (virtio_mem) 1a8000000-1afffffff : System RAM (virtio_mem) 1b0000000-1b7ffffff : System RAM (virtio_mem) 1b8000000-1bfffffff : System RAM (virtio_mem) 3280000000-32ffffffff : PCI Bus 0000:00 With this patch, we get (/proc/iomem): [...] fffc0000-ffffffff : Reserved 100000000-13fffffff : System RAM 140000000-33fffffff : virtio0 140000000-1bfffffff : System RAM (virtio_mem) 3280000000-32ffffffff : PCI Bus 0000:00 Of course, with more hotplugged memory, it gets worse. When unplugging memory blocks again, try_remove_memory() (via offline_and_remove_memory()) will properly split the resource up again. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Pankaj Gupta Cc: Michal Hocko Cc: Dan Williams Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Baoquan He Cc: Wei Yang Cc: Anton Blanchard Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Boris Ostrovsky Cc: Christian Borntraeger Cc: Dave Jiang Cc: Eric Biederman Cc: Greg Kroah-Hartman Cc: Haiyang Zhang Cc: Heiko Carstens Cc: Jason Gunthorpe Cc: Juergen Gross Cc: Julien Grall Cc: Kees Cook Cc: "K. Y. Srinivasan" Cc: Len Brown Cc: Leonardo Bras Cc: Libor Pechacek Cc: Michael Ellerman Cc: Nathan Lynch Cc: "Oliver O'Halloran" Cc: Paul Mackerras Cc: Pingfan Liu Cc: "Rafael J. Wysocki" Cc: Roger Pau Monné Cc: Stefano Stabellini Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vishal Verma Cc: Wei Liu Link: https://lkml.kernel.org/r/20200911103459.10306-7-david@redhat.com Signed-off-by: Linus Torvalds commit 9ca6551ee24368a4d2b09566ea4d10fe87860379 Author: David Hildenbrand Date: Thu Oct 15 20:08:49 2020 -0700 mm/memory_hotplug: MEMHP_MERGE_RESOURCE to specify merging of System RAM resources Some add_memory*() users add memory in small, contiguous memory blocks. Examples include virtio-mem, hyper-v balloon, and the XEN balloon. This can quickly result in a lot of memory resources, whereby the actual resource boundaries are not of interest (e.g., it might be relevant for DIMMs, exposed via /proc/iomem to user space). We really want to merge added resources in this scenario where possible. Let's provide a flag (MEMHP_MERGE_RESOURCE) to specify that a resource either created within add_memory*() or passed via add_memory_resource() shall be marked mergeable and merged with applicable siblings. To implement that, we need a kernel/resource interface to mark selected System RAM resources mergeable (IORESOURCE_SYSRAM_MERGEABLE) and trigger merging. Note: We really want to merge after the whole operation succeeded, not directly when adding a resource to the resource tree (it would break add_memory_resource() and require splitting resources again when the operation failed - e.g., due to -ENOMEM). Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Pankaj Gupta Cc: Michal Hocko Cc: Dan Williams Cc: Jason Gunthorpe Cc: Kees Cook Cc: Ard Biesheuvel Cc: Thomas Gleixner Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Wei Liu Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Roger Pau Monné Cc: Julien Grall Cc: Baoquan He Cc: Wei Yang Cc: Anton Blanchard Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Dave Jiang Cc: Eric Biederman Cc: Greg Kroah-Hartman Cc: Heiko Carstens Cc: Jason Wang Cc: Len Brown Cc: Leonardo Bras Cc: Libor Pechacek Cc: Michael Ellerman Cc: "Michael S. Tsirkin" Cc: Nathan Lynch Cc: "Oliver O'Halloran" Cc: Paul Mackerras Cc: Pingfan Liu Cc: "Rafael J. Wysocki" Cc: Vasily Gorbik Cc: Vishal Verma Link: https://lkml.kernel.org/r/20200911103459.10306-6-david@redhat.com Signed-off-by: Linus Torvalds commit b6117199787c60539105d2de0d010146e8396fc3 Author: David Hildenbrand Date: Thu Oct 15 20:08:44 2020 -0700 mm/memory_hotplug: prepare passing flags to add_memory() and friends We soon want to pass flags, e.g., to mark added System RAM resources. mergeable. Prepare for that. This patch is based on a similar patch by Oscar Salvador: https://lkml.kernel.org/r/20190625075227.15193-3-osalvador@suse.de Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Juergen Gross # Xen related part Reviewed-by: Pankaj Gupta Acked-by: Wei Liu Cc: Michal Hocko Cc: Dan Williams Cc: Jason Gunthorpe Cc: Baoquan He Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Greg Kroah-Hartman Cc: Vishal Verma Cc: Dave Jiang Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Wei Liu Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: David Hildenbrand Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Boris Ostrovsky Cc: Stefano Stabellini Cc: "Oliver O'Halloran" Cc: Pingfan Liu Cc: Nathan Lynch Cc: Libor Pechacek Cc: Anton Blanchard Cc: Leonardo Bras Cc: Ard Biesheuvel Cc: Eric Biederman Cc: Julien Grall Cc: Kees Cook Cc: Roger Pau Monné Cc: Thomas Gleixner Cc: Wei Yang Link: https://lkml.kernel.org/r/20200911103459.10306-5-david@redhat.com Signed-off-by: Linus Torvalds commit 3a0aaefe4134951b4e89feb873c457428154530c Author: David Hildenbrand Date: Thu Oct 15 20:08:39 2020 -0700 mm/memory_hotplug: guard more declarations by CONFIG_MEMORY_HOTPLUG We soon want to pass flags via a new type to add_memory() and friends. That revealed that we currently don't guard some declarations by CONFIG_MEMORY_HOTPLUG. While some definitions could be moved to different places, let's keep it minimal for now and use CONFIG_MEMORY_HOTPLUG for all functions only compiled with CONFIG_MEMORY_HOTPLUG. Wrap sparse_decode_mem_map() into CONFIG_MEMORY_HOTPLUG, it's only called from CONFIG_MEMORY_HOTPLUG code. While at it, remove allow_online_pfn_range(), which is no longer around, and mhp_notimplemented(), which is unused. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Cc: Michal Hocko Cc: Dan Williams Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Cc: Anton Blanchard Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Boris Ostrovsky Cc: Christian Borntraeger Cc: Dave Jiang Cc: Eric Biederman Cc: Greg Kroah-Hartman Cc: Haiyang Zhang Cc: Heiko Carstens Cc: Jason Gunthorpe Cc: Jason Wang Cc: Juergen Gross Cc: Julien Grall Cc: Kees Cook Cc: "K. Y. Srinivasan" Cc: Len Brown Cc: Leonardo Bras Cc: Libor Pechacek Cc: Michael Ellerman Cc: "Michael S. Tsirkin" Cc: Nathan Lynch Cc: "Oliver O'Halloran" Cc: Paul Mackerras Cc: Pingfan Liu Cc: "Rafael J. Wysocki" Cc: Roger Pau Monné Cc: Stefano Stabellini Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vishal Verma Cc: Wei Liu Link: https://lkml.kernel.org/r/20200911103459.10306-4-david@redhat.com Signed-off-by: Linus Torvalds commit 7cf603d17d9bddbda90c424b6f30c7bc2e6f48f2 Author: David Hildenbrand Date: Thu Oct 15 20:08:33 2020 -0700 kernel/resource: move and rename IORESOURCE_MEM_DRIVER_MANAGED IORESOURCE_MEM_DRIVER_MANAGED currently uses an unused PnP bit, which is always set to 0 by hardware. This is far from beautiful (and confusing), and the bit only applies to SYSRAM. So let's move it out of the bus-specific (PnP) defined bits. We'll add another SYSRAM specific bit soon. If we ever need more bits for other purposes, we can steal some from "desc", or reshuffle/regroup what we have. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Cc: Michal Hocko Cc: Dan Williams Cc: Jason Gunthorpe Cc: Kees Cook Cc: Ard Biesheuvel Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Cc: Eric Biederman Cc: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: Anton Blanchard Cc: Benjamin Herrenschmidt Cc: Boris Ostrovsky Cc: Christian Borntraeger Cc: Dave Jiang Cc: Haiyang Zhang Cc: Heiko Carstens Cc: Jason Wang Cc: Juergen Gross Cc: Julien Grall Cc: "K. Y. Srinivasan" Cc: Len Brown Cc: Leonardo Bras Cc: Libor Pechacek Cc: Michael Ellerman Cc: "Michael S. Tsirkin" Cc: Nathan Lynch Cc: "Oliver O'Halloran" Cc: Paul Mackerras Cc: Pingfan Liu Cc: "Rafael J. Wysocki" Cc: Roger Pau Monné Cc: Stefano Stabellini Cc: Stephen Hemminger Cc: Vasily Gorbik Cc: Vishal Verma Cc: Wei Liu Link: https://lkml.kernel.org/r/20200911103459.10306-3-david@redhat.com Signed-off-by: Linus Torvalds commit ec62d04e3fdc4ba3a7912cd7f6da1a4e787a0d75 Author: David Hildenbrand Date: Thu Oct 15 20:08:28 2020 -0700 kernel/resource: make release_mem_region_adjustable() never fail Patch series "selective merging of system ram resources", v4. Some add_memory*() users add memory in small, contiguous memory blocks. Examples include virtio-mem, hyper-v balloon, and the XEN balloon. This can quickly result in a lot of memory resources, whereby the actual resource boundaries are not of interest (e.g., it might be relevant for DIMMs, exposed via /proc/iomem to user space). We really want to merge added resources in this scenario where possible. Resources are effectively stored in a list-based tree. Having a lot of resources not only wastes memory, it also makes traversing that tree more expensive, and makes /proc/iomem explode in size (e.g., requiring kexec-tools to manually merge resources when creating a kdump header. The current kexec-tools resource count limit does not allow for more than ~100GB of memory with a memory block size of 128MB on x86-64). Let's allow to selectively merge system ram resources by specifying a new flag for add_memory*(). Patch #5 contains a /proc/iomem example. Only tested with virtio-mem. This patch (of 8): Let's make sure splitting a resource on memory hotunplug will never fail. This will become more relevant once we merge selected System RAM resources - then, we'll trigger that case more often on memory hotunplug. In general, this function is already unlikely to fail. When we remove memory, we free up quite a lot of metadata (memmap, page tables, memory block device, etc.). The only reason it could really fail would be when injecting allocation errors. All other error cases inside release_mem_region_adjustable() seem to be sanity checks if the function would be abused in different context - let's add WARN_ON_ONCE() in these cases so we can catch them. [natechancellor@gmail.com: fix use of ternary condition in release_mem_region_adjustable] Link: https://lkml.kernel.org/r/20200922060748.2452056-1-natechancellor@gmail.com Link: https://github.com/ClangBuiltLinux/linux/issues/1159 Signed-off-by: David Hildenbrand Signed-off-by: Nathan Chancellor Signed-off-by: Andrew Morton Cc: Michal Hocko Cc: Dan Williams Cc: Jason Gunthorpe Cc: Kees Cook Cc: Ard Biesheuvel Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Cc: Anton Blanchard Cc: Benjamin Herrenschmidt Cc: Boris Ostrovsky Cc: Christian Borntraeger Cc: Dave Jiang Cc: Eric Biederman Cc: Greg Kroah-Hartman Cc: Haiyang Zhang Cc: Heiko Carstens Cc: Jason Wang Cc: Juergen Gross Cc: Julien Grall Cc: "K. Y. Srinivasan" Cc: Len Brown Cc: Leonardo Bras Cc: Libor Pechacek Cc: Michael Ellerman Cc: "Michael S. Tsirkin" Cc: Nathan Lynch Cc: "Oliver O'Halloran" Cc: Paul Mackerras Cc: Pingfan Liu Cc: "Rafael J. Wysocki" Cc: Roger Pau Monn Cc: Stefano Stabellini Cc: Stephen Hemminger Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vishal Verma Cc: Wei Liu Link: https://lkml.kernel.org/r/20200911103459.10306-2-david@redhat.com Signed-off-by: Linus Torvalds commit b30c59279d6891bbd583aed2e1f0cd2a73ab475a Author: David Hildenbrand Date: Thu Oct 15 20:08:23 2020 -0700 mm/memory_hotplug: mark pageblocks MIGRATE_ISOLATE while onlining memory Currently, it can happen that pages are allocated (and freed) via the buddy before we finished basic memory onlining. For example, pages are exposed to the buddy and can be allocated before we actually mark the sections online. Allocated pages could suddenly fail pfn_to_online_page() checks. We had similar issues with pcp handling, when pages are allocated+freed before we reach zone_pcp_update() in online_pages() [1]. Instead, mark all pageblocks MIGRATE_ISOLATE, such that allocations are impossible. Once done with the heavy lifting, use undo_isolate_page_range() to move the pages to the MIGRATE_MOVABLE freelist, marking them ready for allocation. Similar to offline_pages(), we have to manually adjust zone->nr_isolate_pageblock. [1] https://lkml.kernel.org/r/1597150703-19003-1-git-send-email-charante@codeaurora.org Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Wei Yang Cc: Baoquan He Cc: Pankaj Gupta Cc: Charan Teja Reddy Cc: Dan Williams Cc: Fenghua Yu Cc: Logan Gunthorpe Cc: "Matthew Wilcox (Oracle)" Cc: Mel Gorman Cc: Mel Gorman Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Tony Luck Link: https://lkml.kernel.org/r/20200819175957.28465-11-david@redhat.com Signed-off-by: Linus Torvalds commit d882c0067d99d0f2add9a41628703cc99511a639 Author: David Hildenbrand Date: Thu Oct 15 20:08:19 2020 -0700 mm: pass migratetype into memmap_init_zone() and move_pfn_range_to_zone() On the memory onlining path, we want to start with MIGRATE_ISOLATE, to un-isolate the pages after memory onlining is complete. Let's allow passing in the migratetype. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Wei Yang Cc: Baoquan He Cc: Pankaj Gupta Cc: Tony Luck Cc: Fenghua Yu Cc: Logan Gunthorpe Cc: Dan Williams Cc: Mike Rapoport Cc: "Matthew Wilcox (Oracle)" Cc: Michel Lespinasse Cc: Charan Teja Reddy Cc: Mel Gorman Link: https://lkml.kernel.org/r/20200819175957.28465-10-david@redhat.com Signed-off-by: Linus Torvalds commit 4eb29bd9d089977cbf592e53cd074e3c5092fd15 Author: David Hildenbrand Date: Thu Oct 15 20:08:15 2020 -0700 mm/page_alloc: drop stale pageblock comment in memmap_init_zone*() Commit ac5d2539b238 ("mm: meminit: reduce number of times pageblocks are set during struct page init") moved the actual zone range check, leaving only the alignment check for pageblocks. Let's drop the stale comment and make the pageblock check easier to read. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Wei Yang Cc: Baoquan He Cc: Pankaj Gupta Cc: Mel Gorman Cc: Charan Teja Reddy Cc: Dan Williams Cc: Fenghua Yu Cc: Logan Gunthorpe Cc: "Matthew Wilcox (Oracle)" Cc: Mel Gorman Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Tony Luck Link: https://lkml.kernel.org/r/20200819175957.28465-9-david@redhat.com Signed-off-by: Linus Torvalds commit aac65321ba69425badc33f84f5307af7b21ef963 Author: David Hildenbrand Date: Thu Oct 15 20:08:11 2020 -0700 mm/memory_hotplug: simplify page onlining We don't allow to offline memory with holes, all boot memory is online, and all hotplugged memory cannot have holes. We can now simplify onlining of pages. As we only allow to online/offline full sections and sections always span full MAX_ORDER_NR_PAGES, we can just process MAX_ORDER - 1 pages without further special handling. The number of onlined pages simply corresponds to the number of pages we were requested to online. While at it, refine the comment regarding the callback not exposing all pages to the buddy. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Wei Yang Cc: Baoquan He Cc: Pankaj Gupta Cc: Charan Teja Reddy Cc: Dan Williams Cc: Fenghua Yu Cc: Logan Gunthorpe Cc: "Matthew Wilcox (Oracle)" Cc: Mel Gorman Cc: Mel Gorman Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Tony Luck Link: https://lkml.kernel.org/r/20200819175957.28465-8-david@redhat.com Signed-off-by: Linus Torvalds commit 3fa0c7c79d2499af390fbfaf60c94753e7f630f5 Author: David Hildenbrand Date: Thu Oct 15 20:08:07 2020 -0700 mm/page_isolation: simplify return value of start_isolate_page_range() Callers no longer need the number of isolated pageblocks. Let's simplify. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Wei Yang Cc: Baoquan He Cc: Pankaj Gupta Cc: Charan Teja Reddy Cc: Dan Williams Cc: Fenghua Yu Cc: Logan Gunthorpe Cc: "Matthew Wilcox (Oracle)" Cc: Mel Gorman Cc: Mel Gorman Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Tony Luck Link: https://lkml.kernel.org/r/20200819175957.28465-7-david@redhat.com Signed-off-by: Linus Torvalds commit ea15153c3d46777be28d84c1484ad80a9e119234 Author: David Hildenbrand Date: Thu Oct 15 20:08:03 2020 -0700 mm/memory_hotplug: drop nr_isolate_pageblock in offline_pages() We make sure that we cannot have any memory holes right at the beginning of offline_pages() and we only support to online/offline full sections. Both, sections and pageblocks are a power of two in size, and sections always span full pageblocks. We can directly calculate the number of isolated pageblocks from nr_pages. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Wei Yang Cc: Baoquan He Cc: Pankaj Gupta Cc: Charan Teja Reddy Cc: Dan Williams Cc: Fenghua Yu Cc: Logan Gunthorpe Cc: "Matthew Wilcox (Oracle)" Cc: Mel Gorman Cc: Mel Gorman Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Tony Luck Link: https://lkml.kernel.org/r/20200819175957.28465-6-david@redhat.com Signed-off-by: Linus Torvalds commit 257bea71582d895894201b604990a900df489103 Author: David Hildenbrand Date: Thu Oct 15 20:07:59 2020 -0700 mm/page_alloc: simplify __offline_isolated_pages() offline_pages() is the only user. __offline_isolated_pages() never gets called with ranges that contain memory holes and we no longer care about the return value. Drop the return value handling and all pfn_valid() checks. Update the documentation. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Wei Yang Cc: Baoquan He Cc: Pankaj Gupta Cc: Charan Teja Reddy Cc: Dan Williams Cc: Fenghua Yu Cc: Logan Gunthorpe Cc: "Matthew Wilcox (Oracle)" Cc: Mel Gorman Cc: Mel Gorman Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Tony Luck Link: https://lkml.kernel.org/r/20200819175957.28465-5-david@redhat.com Signed-off-by: Linus Torvalds commit 0a1a9a0008bb7b22a8b6a75264b48bd7f9d885ea Author: David Hildenbrand Date: Thu Oct 15 20:07:54 2020 -0700 mm/memory_hotplug: simplify page offlining We make sure that we cannot have any memory holes right at the beginning of offline_pages(). We no longer need walk_system_ram_range() and can call test_pages_isolated() and __offline_isolated_pages() directly. offlined_pages always corresponds to nr_pages, so we can simplify that. [akpm@linux-foundation.org: patch conflict resolution] Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Wei Yang Cc: Baoquan He Cc: Pankaj Gupta Cc: Charan Teja Reddy Cc: Dan Williams Cc: Fenghua Yu Cc: Logan Gunthorpe Cc: "Matthew Wilcox (Oracle)" Cc: Mel Gorman Cc: Mel Gorman Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Tony Luck Link: https://lkml.kernel.org/r/20200819175957.28465-4-david@redhat.com Signed-off-by: Linus Torvalds commit 4986fac160b3eb1432ca9970d51c55f4f93b1a2e Author: David Hildenbrand Date: Thu Oct 15 20:07:50 2020 -0700 mm/memory_hotplug: enforce section granularity when onlining/offlining Already two people (including me) tried to offline subsections, because the function looks like it can deal with it. But we really can only online/offline full sections that are properly aligned (e.g., we can only mark full sections online/offline via SECTION_IS_ONLINE). Add a simple safety net to document the restriction now. Current users (core and powernv/memtrace) respect these restrictions. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Wei Yang Cc: Baoquan He Cc: Pankaj Gupta Cc: Charan Teja Reddy Cc: Dan Williams Cc: Fenghua Yu Cc: Logan Gunthorpe Cc: "Matthew Wilcox (Oracle)" Cc: Mel Gorman Cc: Mel Gorman Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Tony Luck Link: https://lkml.kernel.org/r/20200819175957.28465-3-david@redhat.com Signed-off-by: Linus Torvalds commit 73a11c9658577d876d4c70730719feab3fa328b0 Author: David Hildenbrand Date: Thu Oct 15 20:07:46 2020 -0700 mm/memory_hotplug: inline __offline_pages() into offline_pages() Patch series "mm/memory_hotplug: online_pages()/offline_pages() cleanups", v2. These are a bunch of cleanups for online_pages()/offline_pages() and related code, mostly getting rid of memory hole handling that is no longer necessary. There is only a single walk_system_ram_range() call left in offline_pages(), to make sure we don't have any memory holes. I had some of these patches lying around for a longer time but didn't have time to polish them. In addition, the last patch marks all pageblocks of memory to get onlined MIGRATE_ISOLATE, so pages that have just been exposed to the buddy cannot get allocated before onlining is complete. Once heavy lifting is done, the pageblocks are set to MIGRATE_MOVABLE, such that allocations are possible. I played with DIMMs and virtio-mem on x86-64 and didn't spot any surprises. I verified that the numer of isolated pageblocks is correctly handled when onlining/offlining. This patch (of 10): There is only a single user, offline_pages(). Let's inline, to make it look more similar to online_pages(). Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Reviewed-by: Pankaj Gupta Acked-by: Michal Hocko Cc: Wei Yang Cc: Baoquan He Cc: Pankaj Gupta Cc: Charan Teja Reddy Cc: Dan Williams Cc: Fenghua Yu Cc: Logan Gunthorpe Cc: "Matthew Wilcox (Oracle)" Cc: Mel Gorman Cc: Michal Hocko Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Tony Luck Cc: Mel Gorman Link: https://lkml.kernel.org/r/20200819175957.28465-1-david@redhat.com Link: https://lkml.kernel.org/r/20200819175957.28465-2-david@redhat.com Signed-off-by: Linus Torvalds commit c9682d10271e1025ebfbb1675c7afffbef5c6856 Author: Jann Horn Date: Thu Oct 15 20:07:43 2020 -0700 mm/mmu_notifier: fix mmget() assert in __mmu_interval_notifier_insert The comment talks about having to hold mmget() (which means mm_users), but the actual check is on mm_count (which would be mmgrab()). Given that MMU notifiers are torn down in mmput() -> __mmput() -> exit_mmap() -> mmu_notifier_release(), I believe that the comment is correct and the check should be on mm->mm_users. Fix it up accordingly. Fixes: 99cb252f5e68 ("mm/mmu_notifier: add an interval tree notifier") Signed-off-by: Jann Horn Signed-off-by: Andrew Morton Reviewed-by: Jason Gunthorpe Cc: John Hubbard Cc: Christoph Hellwig Cc: Christian König commit 295a17302348bc38704ef0f11ca2ce4ce58db2e9 Author: Bartosz Golaszewski Date: Thu Oct 15 20:07:39 2020 -0700 mm/util.c: update the kerneldoc for kstrdup_const() Memory allocated with kstrdup_const() must not be passed to regular krealloc() as it is not aware of the possibility of the chunk residing in .rodata. Since there are no potential users of krealloc_const() at the moment, let's just update the doc to make it explicit. Signed-off-by: Bartosz Golaszewski Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/20200817173927.23389-1-brgl@bgdev.pl Signed-off-by: Linus Torvalds commit 406100762ae9ae5b7709c737ada3089160a0f77a Author: Miaohe Lin Date: Thu Oct 15 20:07:36 2020 -0700 mm/vmstat.c: use helper macro abs() Use helper macro abs() to simplify the "x > t || x < -t" cmp. Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200905084008.15748-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit 11c9c7edae06da789abfdeefe5123162a3f1c7dc Author: Mateusz Nosek Date: Thu Oct 15 20:07:33 2020 -0700 mm/page_poison.c: replace bool variable with static key Variable 'want_page_poisoning' is a switch deciding if page poisoning should be enabled. This patch changes it to be static key. Signed-off-by: Mateusz Nosek Signed-off-by: Andrew Morton Cc: Naoya Horiguchi Cc: Oscar Salvador Link: https://lkml.kernel.org/r/20200921152931.938-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds commit b94e02822debdf0cc473556aad7dcc859f216653 Author: Oscar Salvador Date: Thu Oct 15 20:07:29 2020 -0700 mm,hwpoison: try to narrow window race for free pages Aristeu Rozanski reported that a customer test case started to report -EBUSY after the hwpoison rework patchset. There is a race window between spotting a free page and taking it off its buddy freelist, so it might be that by the time we try to take it off, the page has been already allocated. This patch tries to handle such race window by trying to handle the new type of page again if the page was allocated under us. Reported-by: Aristeu Rozanski Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Tested-by: Aristeu Rozanski Acked-by: Naoya Horiguchi Cc: "Aneesh Kumar K.V" Cc: Aneesh Kumar K.V Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Qian Cai Cc: Tony Luck Link: https://lkml.kernel.org/r/20200922135650.1634-15-osalvador@suse.de Signed-off-by: Linus Torvalds commit 1f2481ddbe444de5bed72f167d7180d1b2708e56 Author: Naoya Horiguchi Date: Thu Oct 15 20:07:25 2020 -0700 mm,hwpoison: double-check page count in __get_any_page() Soft offlining could fail with EIO due to the race condition with hugepage migration. This issuse became visible due to the change by previous patch that makes soft offline handler take page refcount by its own. We have no way to directly pin zero refcount page, and the page considered as a zero refcount page could be allocated just after the first check. This patch adds the second check to find the race and gives us chance to handle it more reliably. Reported-by: Qian Cai Signed-off-by: Naoya Horiguchi Signed-off-by: Andrew Morton Cc: "Aneesh Kumar K.V" Cc: Aneesh Kumar K.V Cc: Aristeu Rozanski Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Tony Luck Link: https://lkml.kernel.org/r/20200922135650.1634-14-osalvador@suse.de Signed-off-by: Linus Torvalds commit 5d1fd5dc877bc1c670e7b1c174aa659b76c07de1 Author: Naoya Horiguchi Date: Thu Oct 15 20:07:21 2020 -0700 mm,hwpoison: introduce MF_MSG_UNSPLIT_THP memory_failure() is supposed to call action_result() when it handles a memory error event, but there's one missing case. So let's add it. I find that include/ras/ras_event.h has some other MF_MSG_* undefined, so this patch also adds them. Signed-off-by: Naoya Horiguchi Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Cc: "Aneesh Kumar K.V" Cc: Aneesh Kumar K.V Cc: Aristeu Rozanski Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Qian Cai Cc: Tony Luck Link: https://lkml.kernel.org/r/20200922135650.1634-13-osalvador@suse.de Signed-off-by: Linus Torvalds commit 5a2ffca3c23333a41cf8604f62994cfd28e4267b Author: Oscar Salvador Date: Thu Oct 15 20:07:17 2020 -0700 mm,hwpoison: return 0 if the page is already poisoned in soft-offline Currently, there is an inconsistency when calling soft-offline from different paths on a page that is already poisoned. 1) madvise: madvise_inject_error skips any poisoned page and continues the loop. If that was the only page to madvise, it returns 0. 2) /sys/devices/system/memory/: When calling soft_offline_page_store()->soft_offline_page(), we return -EBUSY in case the page is already poisoned. This is inconsistent with a) the above example and b) memory_failure, where we return 0 if the page was poisoned. Fix this by dropping the PageHWPoison() check in madvise_inject_error, and let soft_offline_page return 0 if it finds the page already poisoned. Please, note that this represents a user-api change, since now the return error when calling soft_offline_page_store()->soft_offline_page() will be different. Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Acked-by: Naoya Horiguchi Cc: "Aneesh Kumar K.V" Cc: Aneesh Kumar K.V Cc: Aristeu Rozanski Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Qian Cai Cc: Tony Luck Link: https://lkml.kernel.org/r/20200922135650.1634-12-osalvador@suse.de Signed-off-by: Linus Torvalds commit 6b9a217eda4a13cc72914fdf7433712122ff595b Author: Oscar Salvador Date: Thu Oct 15 20:07:13 2020 -0700 mm,hwpoison: refactor soft_offline_huge_page and __soft_offline_page Merging soft_offline_huge_page and __soft_offline_page let us get rid of quite some duplicated code, and makes the code much easier to follow. Now, __soft_offline_page will handle both normal and hugetlb pages. Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Acked-by: Naoya Horiguchi Cc: "Aneesh Kumar K.V" Cc: Aneesh Kumar K.V Cc: Aristeu Rozanski Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Qian Cai Cc: Tony Luck Link: https://lkml.kernel.org/r/20200922135650.1634-11-osalvador@suse.de Signed-off-by: Linus Torvalds commit 79f5f8fab482dfff62948214468ac4ebbf0a016f Author: Oscar Salvador Date: Thu Oct 15 20:07:09 2020 -0700 mm,hwpoison: rework soft offline for in-use pages This patch changes the way we set and handle in-use poisoned pages. Until now, poisoned pages were released to the buddy allocator, trusting that the checks that take place at allocation time would act as a safe net and would skip that page. This has proved to be wrong, as we got some pfn walkers out there, like compaction, that all they care is the page to be in a buddy freelist. Although this might not be the only user, having poisoned pages in the buddy allocator seems a bad idea as we should only have free pages that are ready and meant to be used as such. Before explaining the taken approach, let us break down the kind of pages we can soft offline. - Anonymous THP (after the split, they end up being 4K pages) - Hugetlb - Order-0 pages (that can be either migrated or invalited) * Normal pages (order-0 and anon-THP) - If they are clean and unmapped page cache pages, we invalidate then by means of invalidate_inode_page(). - If they are mapped/dirty, we do the isolate-and-migrate dance. Either way, do not call put_page directly from those paths. Instead, we keep the page and send it to page_handle_poison to perform the right handling. page_handle_poison sets the HWPoison flag and does the last put_page. Down the chain, we placed a check for HWPoison page in free_pages_prepare, that just skips any poisoned page, so those pages do not end up in any pcplist/freelist. After that, we set the refcount on the page to 1 and we increment the poisoned pages counter. If we see that the check in free_pages_prepare creates trouble, we can always do what we do for free pages: - wait until the page hits buddy's freelists - take it off, and flag it The downside of the above approach is that we could race with an allocation, so by the time we want to take the page off the buddy, the page has been already allocated so we cannot soft offline it. But the user could always retry it. * Hugetlb pages - We isolate-and-migrate them After the migration has been successful, we call dissolve_free_huge_page, and we set HWPoison on the page if we succeed. Hugetlb has a slightly different handling though. While for non-hugetlb pages we cared about closing the race with an allocation, doing so for hugetlb pages requires quite some additional and intrusive code (we would need to hook in free_huge_page and some other places). So I decided to not make the code overly complicated and just fail normally if the page we allocated in the meantime. We can always build on top of this. As a bonus, because of the way we handle now in-use pages, we no longer need the put-as-isolation-migratetype dance, that was guarding for poisoned pages to end up in pcplists. Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Acked-by: Naoya Horiguchi Cc: "Aneesh Kumar K.V" Cc: Aneesh Kumar K.V Cc: Aristeu Rozanski Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Qian Cai Cc: Tony Luck Link: https://lkml.kernel.org/r/20200922135650.1634-10-osalvador@suse.de Signed-off-by: Linus Torvalds commit 06be6ff3d2ec8be806b859fc054a1909b16d2473 Author: Oscar Salvador Date: Thu Oct 15 20:07:05 2020 -0700 mm,hwpoison: rework soft offline for free pages When trying to soft-offline a free page, we need to first take it off the buddy allocator. Once we know is out of reach, we can safely flag it as poisoned. take_page_off_buddy will be used to take a page meant to be poisoned off the buddy allocator. take_page_off_buddy calls break_down_buddy_pages, which splits a higher-order page in case our page belongs to one. Once the page is under our control, we call page_handle_poison to set it as poisoned and grab a refcount on it. Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Acked-by: Naoya Horiguchi Cc: "Aneesh Kumar K.V" Cc: Aneesh Kumar K.V Cc: Aristeu Rozanski Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Qian Cai Cc: Tony Luck Link: https://lkml.kernel.org/r/20200922135650.1634-9-osalvador@suse.de Signed-off-by: Linus Torvalds commit 694bf0b0cdf91be50e6f037ca93733ed83ca1187 Author: Oscar Salvador Date: Thu Oct 15 20:07:01 2020 -0700 mm,hwpoison: unify THP handling for hard and soft offline Place the THP's page handling in a helper and use it from both hard and soft-offline machinery, so we get rid of some duplicated code. Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Acked-by: Naoya Horiguchi Cc: "Aneesh Kumar K.V" Cc: Aneesh Kumar K.V Cc: Aristeu Rozanski Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Qian Cai Cc: Tony Luck Link: https://lkml.kernel.org/r/20200922135650.1634-8-osalvador@suse.de Signed-off-by: Linus Torvalds commit dd6e2402fad966290f35dc687294fb6049714aac Author: Oscar Salvador Date: Thu Oct 15 20:06:57 2020 -0700 mm,hwpoison: kill put_hwpoison_page After commit 4e41a30c6d50 ("mm: hwpoison: adjust for new thp refcounting"), put_hwpoison_page got reduced to a put_page. Let us just use put_page instead. Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Acked-by: Naoya Horiguchi Cc: "Aneesh Kumar K.V" Cc: Aneesh Kumar K.V Cc: Aristeu Rozanski Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Qian Cai Cc: Tony Luck Link: https://lkml.kernel.org/r/20200922135650.1634-7-osalvador@suse.de Signed-off-by: Linus Torvalds commit dc7560b496f9e045c675ae160afda010ec0c77f6 Author: Oscar Salvador Date: Thu Oct 15 20:06:53 2020 -0700 mm,hwpoison: refactor madvise_inject_error Make a proper if-else condition for {hard,soft}-offline. Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Acked-by: Naoya Horiguchi Cc: Michal Hocko Cc: Qian Cai Cc: Tony Luck Cc: "Aneesh Kumar K.V" Cc: Aneesh Kumar K.V Cc: Aristeu Rozanski Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Mike Kravetz Link: https://lkml.kernel.org/r/20200908075626.11976-3-osalvador@suse.de Signed-off-by: Linus Torvalds commit 7e27f22c9e40b66186e0675376f0495725ff1b0a Author: Oscar Salvador Date: Thu Oct 15 20:06:50 2020 -0700 mm,hwpoison: unexport get_hwpoison_page and make it static Since get_hwpoison_page is only used in memory-failure code now, let us un-export it and make it private to that code. Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Acked-by: Naoya Horiguchi Cc: "Aneesh Kumar K.V" Cc: Aneesh Kumar K.V Cc: Aristeu Rozanski Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Qian Cai Cc: Tony Luck Link: https://lkml.kernel.org/r/20200922135650.1634-5-osalvador@suse.de Signed-off-by: Linus Torvalds commit fd476720c9ba3cf16617d074a94a0852be468545 Author: Naoya Horiguchi Date: Thu Oct 15 20:06:46 2020 -0700 mm,hwpoison-inject: don't pin for hwpoison_filter Another memory error injection interface debugfs:hwpoison/corrupt-pfn also takes bogus refcount for hwpoison_filter(). It's justified because this does a coarse filter, expecting that memory_failure() redoes the check for sure. Signed-off-by: Naoya Horiguchi Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Cc: "Aneesh Kumar K.V" Cc: Aneesh Kumar K.V Cc: Aristeu Rozanski Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Qian Cai Cc: Tony Luck Link: https://lkml.kernel.org/r/20200922135650.1634-4-osalvador@suse.de Signed-off-by: Linus Torvalds commit 1b473becde09d1aec17334a34af70ccdee9fe680 Author: Naoya Horiguchi Date: Thu Oct 15 20:06:42 2020 -0700 mm, hwpoison: remove recalculating hpage hpage is never used after try_to_split_thp_page() in memory_failure(), so we don't have to update hpage. So let's not recalculate/use hpage. Suggested-by: "Aneesh Kumar K.V" Signed-off-by: Naoya Horiguchi Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Cc: Aneesh Kumar K.V Cc: Aristeu Rozanski Cc: Dave Hansen Cc: David Hildenbrand Cc: Dmitry Yakunin Cc: Michal Hocko Cc: Oscar Salvador Cc: Qian Cai Cc: Tony Luck Link: https://lkml.kernel.org/r/20200922135650.1634-3-osalvador@suse.de Signed-off-by: Linus Torvalds commit 7d9d46ac87f91b8dedad5241d64382b650e26487 Author: Naoya Horiguchi Date: Thu Oct 15 20:06:38 2020 -0700 mm,hwpoison: cleanup unused PageHuge() check Patch series "HWPOISON: soft offline rework", v7. This patchset fixes a couple of issues that the patchset Naoya sent [1] contained due to rebasing problems and a misunterdansting. Main focus of this series is to stabilize soft offline. Historically soft offlined pages have suffered from racy conditions because PageHWPoison is used to a little too aggressively, which (directly or indirectly) invades other mm code which cares little about hwpoison. This results in unexpected behavior or kernel panic, which is very far from soft offline's "do not disturb userspace or other kernel component" policy. An example of this can be found here [2]. Along with several cleanups, this code refactors and changes the way soft offline work. Main point of this change set is to contain target page "via buddy allocator" or in migrating path. For ther former we first free the target page as we do for normal pages, and once it has reached buddy and it has been taken off the freelists, we flag it as HWpoison. For the latter we never get to release the page in unmap_and_move, so the page is under our control and we can handle it in hwpoison code. [1] https://patchwork.kernel.org/cover/11704083/ [2] https://lore.kernel.org/linux-mm/20190826104144.GA7849@linux/T/#u This patch (of 14): Drop the PageHuge check, which is dead code since memory_failure() forks into memory_failure_hugetlb() for hugetlb pages. memory_failure() and memory_failure_hugetlb() shares some functions like hwpoison_user_mappings() and identify_page_state(), so they should properly handle 4kB page, thp, and hugetlb. Signed-off-by: Naoya Horiguchi Signed-off-by: Oscar Salvador Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Cc: Michal Hocko Cc: Tony Luck Cc: David Hildenbrand Cc: Aneesh Kumar K.V Cc: Dmitry Yakunin Cc: Qian Cai Cc: Dave Hansen Cc: "Aneesh Kumar K.V" Cc: Aristeu Rozanski Cc: Oscar Salvador Link: https://lkml.kernel.org/r/20200922135650.1634-1-osalvador@suse.de Link: https://lkml.kernel.org/r/20200922135650.1634-2-osalvador@suse.de Signed-off-by: Linus Torvalds commit b1647dc0deef6e923e30c46f28bf5679125c9a10 Author: David Howells Date: Thu Oct 15 20:06:35 2020 -0700 mm/readahead: pass a file_ra_state into force_page_cache_ra The file_ra_state being passed into page_cache_sync_readahead() was being ignored in favour of using the one embedded in the struct file. The only caller for which this makes a difference is the fsverity code if the file has been marked as POSIX_FADV_RANDOM, but it's confusing and worth fixing. Signed-off-by: David Howells Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Eric Biggers Link: https://lkml.kernel.org/r/20200903140844.14194-10-willy@infradead.org Signed-off-by: Linus Torvalds commit db660d462525c4a152b25e033c3dfa9c25d188e6 Author: David Howells Date: Thu Oct 15 20:06:31 2020 -0700 mm/filemap: fold ra_submit into do_sync_mmap_readahead Fold ra_submit() into its last remaining user and pass the readahead_control struct to both do_page_cache_ra() and page_cache_sync_ra(). Signed-off-by: David Howells Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Eric Biggers Link: https://lkml.kernel.org/r/20200903140844.14194-9-willy@infradead.org Signed-off-by: Linus Torvalds commit fefa7c478fdafe71c64b5ddf817ac0271aed1146 Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:06:28 2020 -0700 mm/readahead: add page_cache_sync_ra and page_cache_async_ra Reimplement page_cache_sync_readahead() and page_cache_async_readahead() as wrappers around versions of the function which take a readahead_control in preparation for making do_sync_mmap_readahead() pass down an RAC struct. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: David Howells Cc: Eric Biggers Link: https://lkml.kernel.org/r/20200903140844.14194-8-willy@infradead.org Signed-off-by: Linus Torvalds commit 7b3df3b9ac7e807bf1b6fcc03077bd80068f3d3c Author: David Howells Date: Thu Oct 15 20:06:24 2020 -0700 mm/readahead: pass readahead_control to force_page_cache_ra Reimplement force_page_cache_readahead() as a wrapper around force_page_cache_ra(). Pass the existing readahead_control from page_cache_sync_readahead(). Signed-off-by: David Howells Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Eric Biggers Link: https://lkml.kernel.org/r/20200903140844.14194-7-willy@infradead.org Signed-off-by: Linus Torvalds commit 6e4af69ae9b7ca1bc2f82d3bf061ef8abedeabc4 Author: David Howells Date: Thu Oct 15 20:06:21 2020 -0700 mm/readahead: make ondemand_readahead take a readahead_control Make ondemand_readahead() take a readahead_control struct in preparation for making do_sync_mmap_readahead() pass down an RAC struct. Signed-off-by: David Howells Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Eric Biggers Link: https://lkml.kernel.org/r/20200903140844.14194-6-willy@infradead.org Signed-off-by: Linus Torvalds commit 8238287eadb2ddaedd920ba06021c33ec36d0320 Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:06:17 2020 -0700 mm/readahead: make do_page_cache_ra take a readahead_control Rename __do_page_cache_readahead() to do_page_cache_ra() and call it directly from ondemand_readahead() instead of indirecting via ra_submit(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: David Howells Cc: Eric Biggers Link: https://lkml.kernel.org/r/20200903140844.14194-5-willy@infradead.org Signed-off-by: Linus Torvalds commit 73bb49da50cd460bb3ba31250ed2e7fbf2115edf Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:06:14 2020 -0700 mm/readahead: make page_cache_ra_unbounded take a readahead_control Define it in the callers instead of in page_cache_ra_unbounded(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: David Howells Cc: Eric Biggers Link: https://lkml.kernel.org/r/20200903140844.14194-4-willy@infradead.org Signed-off-by: Linus Torvalds commit 1aa83cfa5a20a6bbd39d2355a89c95152e4b37b4 Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:06:10 2020 -0700 mm/readahead: add DEFINE_READAHEAD Patch series "Readahead patches for 5.9/5.10". These are infrastructure for both the THP patchset and for the fscache rewrite, For both pieces of infrastructure being build on top of this patchset, we want the ractl to be available higher in the call-stack. For David's work, he wants to add the 'critical page' to the ractl so that he knows which page NEEDS to be brought in from storage, and which ones are nice-to-have. We might want something similar in block storage too. It used to be simple -- the first page was the critical one, but then mmap added fault-around and so for that usecase, the middle page is the critical one. Anyway, I don't have any code to show that yet, we just know that the lowest point in the callchain where we have that information is do_sync_mmap_readahead() and so the ractl needs to start its life there. For THP, we havew the code that needs it. It's actually the apex patch to the series; the one which finally starts to allocate THPs and present them to consenting filesystems: http://git.infradead.org/users/willy/pagecache.git/commitdiff/798bcf30ab2eff278caad03a9edca74d2f8ae760 This patch (of 8): Allow for a more concise definition of a struct readahead_control. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Eric Biggers Cc: David Howells Link: https://lkml.kernel.org/r/20200903140844.14194-1-willy@infradead.org Link: https://lkml.kernel.org/r/20200903140844.14194-3-willy@infradead.org Signed-off-by: Linus Torvalds commit c4f9c701f9b44299e6adbc58d1a4bb2c40383494 Author: Huang Ying Date: Thu Oct 15 20:06:07 2020 -0700 mm: fix a race during THP splitting It is reported that the following bug is triggered if the HDD is used as swap device, [ 5758.157556] BUG: kernel NULL pointer dereference, address: 0000000000000007 [ 5758.165331] #PF: supervisor write access in kernel mode [ 5758.171161] #PF: error_code(0x0002) - not-present page [ 5758.176894] PGD 0 P4D 0 [ 5758.179721] Oops: 0002 [#1] SMP PTI [ 5758.183614] CPU: 10 PID: 316 Comm: kswapd1 Kdump: loaded Tainted: G S --------- --- 5.9.0-0.rc3.1.tst.el8.x86_64 #1 [ 5758.196717] Hardware name: Intel Corporation S2600CP/S2600CP, BIOS SE5C600.86B.02.01.0002.082220131453 08/22/2013 [ 5758.208176] RIP: 0010:split_swap_cluster+0x47/0x60 [ 5758.213522] Code: c1 e3 06 48 c1 eb 0f 48 8d 1c d8 48 89 df e8 d0 20 6a 00 80 63 07 fb 48 85 db 74 16 48 89 df c6 07 00 66 66 66 90 31 c0 5b c3 <80> 24 25 07 00 00 00 fb 31 c0 5b c3 b8 f0 ff ff ff 5b c3 66 0f 1f [ 5758.234478] RSP: 0018:ffffb147442d7af0 EFLAGS: 00010246 [ 5758.240309] RAX: 0000000000000000 RBX: 000000000014b217 RCX: ffffb14779fd9000 [ 5758.248281] RDX: 000000000014b217 RSI: ffff9c52f2ab1400 RDI: 000000000014b217 [ 5758.256246] RBP: ffffe00c51168080 R08: ffffe00c5116fe08 R09: ffff9c52fffd3000 [ 5758.264208] R10: ffffe00c511537c8 R11: ffff9c52fffd3c90 R12: 0000000000000000 [ 5758.272172] R13: ffffe00c51170000 R14: ffffe00c51170000 R15: ffffe00c51168040 [ 5758.280134] FS: 0000000000000000(0000) GS:ffff9c52f2a80000(0000) knlGS:0000000000000000 [ 5758.289163] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5758.295575] CR2: 0000000000000007 CR3: 0000000022a0e003 CR4: 00000000000606e0 [ 5758.303538] Call Trace: [ 5758.306273] split_huge_page_to_list+0x88b/0x950 [ 5758.311433] deferred_split_scan+0x1ca/0x310 [ 5758.316202] do_shrink_slab+0x12c/0x2a0 [ 5758.320491] shrink_slab+0x20f/0x2c0 [ 5758.324482] shrink_node+0x240/0x6c0 [ 5758.328469] balance_pgdat+0x2d1/0x550 [ 5758.332652] kswapd+0x201/0x3c0 [ 5758.336157] ? finish_wait+0x80/0x80 [ 5758.340147] ? balance_pgdat+0x550/0x550 [ 5758.344525] kthread+0x114/0x130 [ 5758.348126] ? kthread_park+0x80/0x80 [ 5758.352214] ret_from_fork+0x22/0x30 [ 5758.356203] Modules linked in: fuse zram rfkill sunrpc intel_rapl_msr intel_rapl_common sb_edac x86_pkg_temp_thermal intel_powerclamp coretemp mgag200 iTCO_wdt crct10dif_pclmul iTCO_vendor_support drm_kms_helper crc32_pclmul ghash_clmulni_intel syscopyarea sysfillrect sysimgblt fb_sys_fops cec rapl joydev intel_cstate ipmi_si ipmi_devintf drm intel_uncore i2c_i801 ipmi_msghandler pcspkr lpc_ich mei_me i2c_smbus mei ioatdma ip_tables xfs libcrc32c sr_mod sd_mod cdrom t10_pi sg igb ahci libahci i2c_algo_bit crc32c_intel libata dca wmi dm_mirror dm_region_hash dm_log dm_mod [ 5758.412673] CR2: 0000000000000007 [ 0.000000] Linux version 5.9.0-0.rc3.1.tst.el8.x86_64 (mockbuild@x86-vm-15.build.eng.bos.redhat.com) (gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5), GNU ld version 2.30-79.el8) #1 SMP Wed Sep 9 16:03:34 EDT 2020 After further digging it's found that the following race condition exists in the original implementation, CPU1 CPU2 ---- ---- deferred_split_scan() split_huge_page(page) /* page isn't compound head */ split_huge_page_to_list(page, NULL) __split_huge_page(page, ) ClearPageCompound(head) /* unlock all subpages except page (not head) */ add_to_swap(head) /* not THP */ get_swap_page(head) add_to_swap_cache(head, ) SetPageSwapCache(head) if PageSwapCache(head) split_swap_cluster(/* swap entry of head */) /* Deref sis->cluster_info: NULL accessing! */ So, in split_huge_page_to_list(), PageSwapCache() is called for the already split and unlocked "head", which may be added to swap cache in another CPU. So split_swap_cluster() may be called wrongly. To fix the race, the call to split_swap_cluster() is moved to __split_huge_page() before all subpages are unlocked. So that the PageSwapCache() is stable. Fixes: 59807685a7e77 ("mm, THP, swap: support splitting THP for THP swap out") Reported-by: Rafael Aquini Signed-off-by: "Huang, Ying" Signed-off-by: Andrew Morton Tested-by: Rafael Aquini Acked-by: Kirill A. Shutemov Cc: Hugh Dickins Cc: Andrea Arcangeli Cc: Matthew Wilcox Link: https://lkml.kernel.org/r/20201009073647.1531083-1-ying.huang@intel.com Signed-off-by: Linus Torvalds commit 6f4d2f9770cf154f9867f466d7b1b463a39f05a7 Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:06:03 2020 -0700 fs: do not update nr_thps for mappings which support THPs The nr_thps counter is to support THPs in the page cache when the filesystem doesn't understand THPs. Eventually it will be removed, but we should still support filesystems which do not understand THPs yet. Move the nr_thp manipulation functions to filemap.h since they're page-cache specific. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Alexander Viro Cc: "Matthew Wilcox (Oracle)" Cc: Hugh Dickins Cc: Song Liu Cc: Rik van Riel Cc: "Kirill A . Shutemov" Cc: Johannes Weiner Cc: Dave Chinner Cc: Christoph Hellwig Link: https://lkml.kernel.org/r/20200916032717.22917-2-willy@infradead.org Signed-off-by: Linus Torvalds commit 01c70267053d6718820ac0902d8823d5dd2a6adb Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:06:00 2020 -0700 fs: add a filesystem flag for THPs The page cache needs to know whether the filesystem supports THPs so that it doesn't send THPs to filesystems which can't handle them. Dave Chinner points out that getting from the page mapping to the filesystem type is too many steps (mapping->host->i_sb->s_type->fs_flags) so cache that information in the address space flags. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Alexander Viro Cc: "Matthew Wilcox (Oracle)" Cc: Hugh Dickins Cc: Song Liu Cc: Rik van Riel Cc: "Kirill A . Shutemov" Cc: Johannes Weiner Cc: Dave Chinner Cc: Christoph Hellwig Link: https://lkml.kernel.org/r/20200916032717.22917-1-willy@infradead.org Signed-off-by: Linus Torvalds commit 3efe62e466958a1e59e68e0faa5c66b5b99b17ce Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:05:56 2020 -0700 mm/vmscan: allow arbitrary sized pages to be paged out Remove the assumption that a compound page has HPAGE_PMD_NR pins from the page cache. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: SeongJae Park Acked-by: Kirill A. Shutemov Acked-by: "Huang, Ying" Link: https://lkml.kernel.org/r/20200908195539.25896-12-willy@infradead.org Signed-off-by: Linus Torvalds commit 8854a6a7248f6c372f1aa2a47b58027d3ba600c2 Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:05:53 2020 -0700 mm/page-writeback: support tail pages in wait_for_stable_page page->mapping is undefined for tail pages, so operate exclusively on the head page. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: SeongJae Park Acked-by: Kirill A. Shutemov Cc: Huang Ying Link: https://lkml.kernel.org/r/20200908195539.25896-11-willy@infradead.org Signed-off-by: Linus Torvalds commit fc3a5ac52827960ca1e17ba243ff4ba29fcc057a Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:05:50 2020 -0700 mm/truncate: fix truncation for pages of arbitrary size Remove the assumption that a compound page is HPAGE_PMD_SIZE, and the assumption that any page is PAGE_SIZE. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: SeongJae Park Acked-by: Kirill A. Shutemov Cc: Huang Ying Link: https://lkml.kernel.org/r/20200908195539.25896-10-willy@infradead.org Signed-off-by: Linus Torvalds commit 5eaf35ab1275c4048d5c64b7bd9e982af9ea6b9f Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:05:46 2020 -0700 mm/rmap: fix assumptions of THP size Ask the page what size it is instead of assuming it's PMD size. Do this for anon pages as well as file pages for when someone decides to support that. Leave the assumption alone for pages which are PMD mapped; we don't currently grow THPs beyond PMD size, so we don't need to change this code yet. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: SeongJae Park Acked-by: Kirill A. Shutemov Cc: Huang Ying Link: https://lkml.kernel.org/r/20200908195539.25896-9-willy@infradead.org Signed-off-by: Linus Torvalds commit e2333dad2d4a3543f07beb5da61401046e54f2ff Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:05:43 2020 -0700 mm/huge_memory: fix can_split_huge_page assumption of THP size Ask the page how many subpages it has instead of assuming it's PMD size. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: SeongJae Park Acked-by: Kirill A. Shutemov Acked-by: "Huang, Ying" Link: https://lkml.kernel.org/r/20200908195539.25896-8-willy@infradead.org Signed-off-by: Linus Torvalds commit 65dfe3c3bc411caa04c4f6c7d81418b90d6a2ce8 Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:05:39 2020 -0700 mm/huge_memory: fix page_trans_huge_mapcount assumption of THP size Ask the page what size it is instead of assuming it's PMD size. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: SeongJae Park Acked-by: Kirill A. Shutemov Cc: Huang Ying Link: https://lkml.kernel.org/r/20200908195539.25896-7-willy@infradead.org Signed-off-by: Linus Torvalds commit 8cce54756806e5777069c46011c5f54f9feac717 Author: Kirill A. Shutemov Date: Thu Oct 15 20:05:36 2020 -0700 mm/huge_memory: fix split assumption of page size File THPs may now be of arbitrary size, and we can't rely on that size after doing the split so remember the number of pages before we start the split. Signed-off-by: Kirill A. Shutemov Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: SeongJae Park Cc: Huang Ying Link: https://lkml.kernel.org/r/20200908195539.25896-6-willy@infradead.org Signed-off-by: Linus Torvalds commit 86b562b629728a072e6928bdc02a105d358a007d Author: Kirill A. Shutemov Date: Thu Oct 15 20:05:33 2020 -0700 mm/huge_memory: fix total_mapcount assumption of page size File THPs may now be of arbitrary order. Signed-off-by: Kirill A. Shutemov Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: SeongJae Park Cc: Huang Ying Link: https://lkml.kernel.org/r/20200908195539.25896-5-willy@infradead.org Signed-off-by: Linus Torvalds commit 8fb156c9ee2db94f7127c930c89917634a1a9f56 Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:05:29 2020 -0700 mm/page_owner: change split_page_owner to take a count The implementation of split_page_owner() prefers a count rather than the old order of the page. When we support a variable size THP, we won't have the order at this point, but we will have the number of pages. So change the interface to what the caller and callee would prefer. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: SeongJae Park Acked-by: Kirill A. Shutemov Cc: Huang Ying Link: https://lkml.kernel.org/r/20200908195539.25896-4-willy@infradead.org Signed-off-by: Linus Torvalds commit d01ac3c35214ce362f50cada37cb7bab8c801896 Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:05:26 2020 -0700 mm/memory: remove page fault assumption of compound page size A compound page in the page cache will not necessarily be of PMD size, so check explicitly. [willy@infradead.org: fix remove page fault assumption of compound page size] Link: https://lkml.kernel.org/r/20201001152259.14932-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Huang Ying Cc: Kirill A. Shutemov Link: https://lkml.kernel.org/r/20200908195539.25896-3-willy@infradead.org Signed-off-by: Linus Torvalds commit 887b22c628c615811be3b877e02c9c1fe9d85d6d Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:05:23 2020 -0700 mm/filemap: fix page cache removal for arbitrary sized THPs Patch series "Remove assumptions of THP size". There are a number of places in the VM which assume that a THP is a PMD in size. That's true today, and remains true after this patch series, but this is a prerequisite for switching to arbitrary-sized THPs. thp_nr_pages() still returns either HPAGE_PMD_NR or 1, but will be changed later. This patch (of 11): page_cache_free_page() assumes THPs are PMD_SIZE; fix that assumption. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Acked-by: Kirill A. Shutemov Cc: Huang Ying Link: https://lkml.kernel.org/r/20200908195539.25896-1-willy@infradead.org Link: https://lkml.kernel.org/r/20200908195539.25896-2-willy@infradead.org Signed-off-by: Linus Torvalds commit 198b62f83eef1d605d70eca32759c92cdcc14175 Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:05:20 2020 -0700 mm/filemap: fix storing to a THP shadow entry When a THP is removed from the page cache by reclaim, we replace it with a shadow entry that occupies all slots of the XArray previously occupied by the THP. If the user then accesses that page again, we only allocate a single page, but storing it into the shadow entry replaces all entries with that one page. That leads to bugs like page dumped because: VM_BUG_ON_PAGE(page_to_pgoff(page) != offset) ------------[ cut here ]------------ kernel BUG at mm/filemap.c:2529! https://bugzilla.kernel.org/show_bug.cgi?id=206569 This is hard to reproduce with mainline, but happens regularly with the THP patchset (as so many more THPs are created). This solution is take from the THP patchset. It splits the shadow entry into order-0 pieces at the time that we bring a new page into cache. Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS") Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Song Liu Cc: "Kirill A . Shutemov" Cc: Qian Cai Link: https://lkml.kernel.org/r/20200903183029.14930-4-willy@infradead.org Signed-off-by: Linus Torvalds commit 8fc75643c5e14574c8be59b69182452ece28315a Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:05:16 2020 -0700 XArray: add xas_split In order to use multi-index entries for huge pages in the page cache, we need to be able to split a multi-index entry (eg if a file is truncated in the middle of a huge page entry). This version does not support splitting more than one level of the tree at a time. This is an acceptable limitation for the page cache as we do not expect to support order-12 pages in the near future. [akpm@linux-foundation.org: export xas_split_alloc() to modules] [willy@infradead.org: fix xarray split] Link: https://lkml.kernel.org/r/20200910175450.GV6583@casper.infradead.org [willy@infradead.org: fix xarray] Link: https://lkml.kernel.org/r/20201001233943.GW20115@casper.infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: "Kirill A . Shutemov" Cc: Qian Cai Cc: Song Liu Link: https://lkml.kernel.org/r/20200903183029.14930-3-willy@infradead.org Signed-off-by: Linus Torvalds commit 57417cebc96b57122a2207fc84a6077d20c84b4b Author: Matthew Wilcox (Oracle) Date: Thu Oct 15 20:05:13 2020 -0700 XArray: add xa_get_order Patch series "Fix read-only THP for non-tmpfs filesystems". As described more verbosely in the [3/3] changelog, we can inadvertently put an order-0 page in the page cache which occupies 512 consecutive entries. Users are running into this if they enable the READ_ONLY_THP_FOR_FS config option; see https://bugzilla.kernel.org/show_bug.cgi?id=206569 and Qian Cai has also reported it here: https://lore.kernel.org/lkml/20200616013309.GB815@lca.pw/ This is a rather intrusive way of fixing the problem, but has the advantage that I've actually been testing it with the THP patches, which means that it sees far more use than it does upstream -- indeed, Song has been entirely unable to reproduce it. It also has the advantage that it removes a few patches from my gargantuan backlog of THP patches. This patch (of 3): This function returns the order of the entry at the index. We need this because there isn't space in the shadow entry to encode its order. [akpm@linux-foundation.org: export xa_get_order to modules] Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: "Kirill A . Shutemov" Cc: Qian Cai Cc: Song Liu Link: https://lkml.kernel.org/r/20200903183029.14930-1-willy@infradead.org Link: https://lkml.kernel.org/r/20200903183029.14930-2-willy@infradead.org Signed-off-by: Linus Torvalds commit f14312e1ed1e40dfed38bb70eb9a71d97a6b60f4 Author: Aneesh Kumar K.V Date: Thu Oct 15 20:05:10 2020 -0700 mm/debug_vm_pgtable: avoid doing memory allocation with pgtable_t mapped. With highmem, pte_alloc_map() keep the level4 page table mapped using kmap_atomic(). Avoid doing new memory allocation with page table mapped like above. [ 9.409233] BUG: sleeping function called from invalid context at mm/page_alloc.c:4822 [ 9.410557] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper [ 9.411932] no locks held by swapper/1. [ 9.412595] CPU: 0 PID: 1 Comm: swapper Not tainted 5.9.0-rc3-00323-gc50eb1ed654b5 #2 [ 9.413824] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 [ 9.415207] Call Trace: [ 9.415651] ? ___might_sleep.cold+0xa7/0xcc [ 9.416367] ? __alloc_pages_nodemask+0x14c/0x5b0 [ 9.417055] ? swap_migration_tests+0x50/0x293 [ 9.417704] ? debug_vm_pgtable+0x4bc/0x708 [ 9.418287] ? swap_migration_tests+0x293/0x293 [ 9.418911] ? do_one_initcall+0x82/0x3cb [ 9.419465] ? parse_args+0x1bd/0x280 [ 9.419983] ? rcu_read_lock_sched_held+0x36/0x60 [ 9.420673] ? trace_initcall_level+0x1f/0xf3 [ 9.421279] ? trace_initcall_level+0xbd/0xf3 [ 9.421881] ? do_basic_setup+0x9d/0xdd [ 9.422410] ? do_basic_setup+0xc3/0xdd [ 9.422938] ? kernel_init_freeable+0x72/0xa3 [ 9.423539] ? rest_init+0x134/0x134 [ 9.424055] ? kernel_init+0x5/0x12c [ 9.424574] ? ret_from_fork+0x19/0x30 Reported-by: kernel test robot Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200913110327.645310-1-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit 401035d5c456691f79fbcc08eb6ee5479c30b606 Author: Aneesh Kumar K.V Date: Thu Oct 15 20:05:06 2020 -0700 mm/debug_vm_pgtable: avoid none pte in pte_clear_test pte_clear_tests operate on an existing pte entry. Make sure that is not a none pte entry. [aneesh.kumar@linux.ibm.com: avoid kernel crash with riscv] Link: https://lkml.kernel.org/r/20201015033206.140550-1-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Reviewed-by: Anshuman Khandual Cc: Christophe Leroy Cc: Michael Ellerman Cc: Nathan Chancellor Cc: Guenter Roeck Cc: Paul Walmsley Cc: Albert Ou Cc: Palmer Dabbelt Link: https://lkml.kernel.org/r/20200902114222.181353-14-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit 2b1dd67a78c36a30f993d0d5366177df0cd7a5db Author: Aneesh Kumar K.V Date: Thu Oct 15 20:05:03 2020 -0700 mm/debug_vm_pgtable/hugetlb: disable hugetlb test on ppc64 The seems to be missing quite a lot of details w.r.t allocating the correct pgtable_t page (huge_pte_alloc()), holding the right lock (huge_pte_lock()) etc. The vma used is also not a hugetlb VMA. ppc64 do have runtime checks within CONFIG_DEBUG_VM for most of these. Hence disable the test on ppc64. [anshuman.khandual@arm.com: drop hugetlb_advanced_tests()] Link: https://lore.kernel.org/lkml/289c3fdb-1394-c1af-bdc4-5542907089dc@linux.ibm.com/#t Link: https://lkml.kernel.org/r/1600914446-21890-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Aneesh Kumar K.V Signed-off-by: Anshuman Khandual Signed-off-by: Andrew Morton Cc: Christophe Leroy Cc: Michael Ellerman Link: https://lkml.kernel.org/r/20200902114222.181353-13-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit 13af05063033238777e4f155eeffe7c06be2a96c Author: Aneesh Kumar K.V Date: Thu Oct 15 20:04:59 2020 -0700 mm/debug_vm_pgtable/pmd_clear: don't use pmd/pud_clear on pte entries pmd_clear() should not be used to clear pmd level pte entries. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Cc: Anshuman Khandual Cc: Christophe Leroy Cc: Michael Ellerman Link: https://lkml.kernel.org/r/20200902114222.181353-12-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit 87f34986de0b3799efb1a5eaaa9baa790047f839 Author: Aneesh Kumar K.V Date: Thu Oct 15 20:04:56 2020 -0700 mm/debug_vm_pgtable/thp: use page table depost/withdraw with THP Architectures like ppc64 use deposited page table while updating the huge pte entries. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Reviewed-by: Anshuman Khandual Cc: Christophe Leroy Cc: Michael Ellerman Link: https://lkml.kernel.org/r/20200902114222.181353-11-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit 6f302e270c999d694a5d00145958760b320b15a7 Author: Aneesh Kumar K.V Date: Thu Oct 15 20:04:53 2020 -0700 mm/debug_vm_pgtable/locks: take correct page table lock Make sure we call pte accessors with correct lock held. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Cc: Anshuman Khandual Cc: Christophe Leroy Cc: Michael Ellerman Link: https://lkml.kernel.org/r/20200902114222.181353-10-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit e8edf0adb95dc311e3beae361917d30d72845e04 Author: Aneesh Kumar K.V Date: Thu Oct 15 20:04:49 2020 -0700 mm/debug_vm_pgtable/locks: move non page table modifying test together This will help in adding proper locks in a later patch Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Cc: Anshuman Khandual Cc: Christophe Leroy Cc: Michael Ellerman Link: https://lkml.kernel.org/r/20200902114222.181353-9-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit c3824e18d3f3946015ac641d46fdeeefd30bfd66 Author: Aneesh Kumar K.V Date: Thu Oct 15 20:04:46 2020 -0700 mm/debug_vm_pgtable/set_pte/pmd/pud: don't use set_*_at to update an existing pte entry set_pte_at() should not be used to set a pte entry at locations that already holds a valid pte entry. Architectures like ppc64 don't do TLB invalidate in set_pte_at() and hence expect it to be used to set locations that are not a valid PTE. Link: https://lkml.kernel.org/r/20200902114222.181353-8-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Reviewed-by: Anshuman Khandual Cc: Christophe Leroy Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4200605b1f80e4644a5cb5abc708bccfb6def11a Author: Aneesh Kumar K.V Date: Thu Oct 15 20:04:40 2020 -0700 mm/debug_vm_pgtable/savedwrite: enable savedwrite test with CONFIG_NUMA_BALANCING Saved write support was added to track the write bit of a pte after marking the pte protnone. This was done so that AUTONUMA can convert a write pte to protnone and still track the old write bit. When converting it back we set the pte write bit correctly thereby avoiding a write fault again. Hence enable the test only when CONFIG_NUMA_BALANCING is enabled and use protnone protflags. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Reviewed-by: Anshuman Khandual Cc: Christophe Leroy Cc: Michael Ellerman Link: https://lkml.kernel.org/r/20200902114222.181353-6-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit 85a144632dcc71f96dcb9172a15d6f71161144d2 Author: Aneesh Kumar K.V Date: Thu Oct 15 20:04:36 2020 -0700 mm/debug_vm_pgtables/hugevmap: use the arch helper to identify huge vmap support. ppc64 supports huge vmap only with radix translation. Hence use arch helper to determine the huge vmap support. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Reviewed-by: Anshuman Khandual Cc: Christophe Leroy Cc: Michael Ellerman Link: https://lkml.kernel.org/r/20200902114222.181353-5-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit cfc5bbc4e75da4e341b86822c3c8ab1f4d804de5 Author: Aneesh Kumar K.V Date: Thu Oct 15 20:04:33 2020 -0700 mm/debug_vm_pgtable/ppc64: avoid setting top bits in radom value ppc64 use bit 62 to indicate a pte entry (_PAGE_PTE). Avoid setting that bit in random value. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Reviewed-by: Anshuman Khandual Cc: Christophe Leroy Cc: Michael Ellerman Link: https://lkml.kernel.org/r/20200902114222.181353-4-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit 379c926d6334427b35fe7747f7758c865e20e9a9 Author: Aneesh Kumar K.V Date: Thu Oct 15 20:04:29 2020 -0700 powerpc/mm: move setting pte specific flags to pfn_pte powerpc used to set the pte specific flags in set_pte_at(). This is different from other architectures. To be consistent with other architecture update pfn_pte to set _PAGE_PTE on ppc64. Also, drop now unused pte_mkpte. We add a VM_WARN_ON() to catch the usage of calling set_pte_at() without setting _PAGE_PTE bit. We will remove that after a few releases. With respect to huge pmd entries, pmd_mkhuge() takes care of adding the _PAGE_PTE bit. [akpm@linux-foundation.org: whitespace fix, per Christophe] Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Reviewed-by: Christophe Leroy Cc: Anshuman Khandual Cc: Michael Ellerman Link: https://lkml.kernel.org/r/20200902114222.181353-3-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit 392b466981ac42f491173c37f6ed574841645bcc Author: Aneesh Kumar K.V Date: Thu Oct 15 20:04:26 2020 -0700 powerpc/mm: add DEBUG_VM WARN for pmd_clear Patch series "mm/debug_vm_pgtable fixes", v4. This patch series includes fixes for debug_vm_pgtable test code so that they follow page table updates rules correctly. The first two patches introduce changes w.r.t ppc64. Hugetlb test is disabled on ppc64 because that needs larger change to satisfy page table update rules. These tests are broken w.r.t page table update rules and results in kernel crash as below. [ 21.083519] kernel BUG at arch/powerpc/mm/pgtable.c:304! cpu 0x0: Vector: 700 (Program Check) at [c000000c6d1e76c0] pc: c00000000009a5ec: assert_pte_locked+0x14c/0x380 lr: c0000000005eeeec: pte_update+0x11c/0x190 sp: c000000c6d1e7950 msr: 8000000002029033 current = 0xc000000c6d172c80 paca = 0xc000000003ba0000 irqmask: 0x03 irq_happened: 0x01 pid = 1, comm = swapper/0 kernel BUG at arch/powerpc/mm/pgtable.c:304! [link register ] c0000000005eeeec pte_update+0x11c/0x190 [c000000c6d1e7950] 0000000000000001 (unreliable) [c000000c6d1e79b0] c0000000005eee14 pte_update+0x44/0x190 [c000000c6d1e7a10] c000000001a2ca9c pte_advanced_tests+0x160/0x3d8 [c000000c6d1e7ab0] c000000001a2d4fc debug_vm_pgtable+0x7e8/0x1338 [c000000c6d1e7ba0] c0000000000116ec do_one_initcall+0xac/0x5f0 [c000000c6d1e7c80] c0000000019e4fac kernel_init_freeable+0x4dc/0x5a4 [c000000c6d1e7db0] c000000000012474 kernel_init+0x24/0x160 [c000000c6d1e7e20] c00000000000cbd0 ret_from_kernel_thread+0x5c/0x6c With DEBUG_VM disabled [ 20.530152] BUG: Kernel NULL pointer dereference on read at 0x00000000 [ 20.530183] Faulting instruction address: 0xc0000000000df330 cpu 0x33: Vector: 380 (Data SLB Access) at [c000000c6d19f700] pc: c0000000000df330: memset+0x68/0x104 lr: c00000000009f6d8: hash__pmdp_huge_get_and_clear+0xe8/0x1b0 sp: c000000c6d19f990 msr: 8000000002009033 dar: 0 current = 0xc000000c6d177480 paca = 0xc00000001ec4f400 irqmask: 0x03 irq_happened: 0x01 pid = 1, comm = swapper/0 [link register ] c00000000009f6d8 hash__pmdp_huge_get_and_clear+0xe8/0x1b0 [c000000c6d19f990] c00000000009f748 hash__pmdp_huge_get_and_clear+0x158/0x1b0 (unreliable) [c000000c6d19fa10] c0000000019ebf30 pmd_advanced_tests+0x1f0/0x378 [c000000c6d19fab0] c0000000019ed088 debug_vm_pgtable+0x79c/0x1244 [c000000c6d19fba0] c0000000000116ec do_one_initcall+0xac/0x5f0 [c000000c6d19fc80] c0000000019a4fac kernel_init_freeable+0x4dc/0x5a4 [c000000c6d19fdb0] c000000000012474 kernel_init+0x24/0x160 [c000000c6d19fe20] c00000000000cbd0 ret_from_kernel_thread+0x5c/0x6c This patch (of 13): With the hash page table, the kernel should not use pmd_clear for clearing huge pte entries. Add a DEBUG_VM WARN to catch the wrong usage. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Cc: Michael Ellerman Cc: Anshuman Khandual Cc: Aneesh Kumar K.V Cc: Christophe Leroy Link: https://lkml.kernel.org/r/20200902114222.181353-1-aneesh.kumar@linux.ibm.com Link: https://lkml.kernel.org/r/20200902114222.181353-2-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit a455aa72f7c46b881721668b3ee810713adc7a5b Author: Dan Williams Date: Thu Oct 15 20:04:22 2020 -0700 device-dax/kmem: fix resource release The conversion to request_mem_region() is broken because it assumes that the range is marked busy prior to release. However, due to the way that the kmem driver manipulates the IORESOURCE_BUSY flag (clears it to let {add,remove}_memory() handle busy) it requires a manual release_resource() to perform cleanup. Given that the actual 'struct resource *' needs to be recalled, not just the range, add that tracking to the kmem driver-data. Fixes: 0513bd5bb114 ("device-dax/kmem: replace release_resource() with release_mem_region()") Reported-by: David Hildenbrand Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Cc: Vishal Verma Cc: Dave Hansen Cc: Pavel Tatashin Cc: Brice Goglin Cc: Dave Jiang Cc: Ira Weiny Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Link: https://lkml.kernel.org/r/160272252925.3136502.17220638073995895400.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit c7a198c700763ac89abbb166378f546aeb9afb33 Author: Maor Gottlieb Date: Mon Oct 12 07:56:00 2020 +0300 RDMA/ucma: Fix use after free in destroy id flow ucma_free_ctx() should call to __destroy_id() on all the connection requests that have not been delivered to user space. Currently it calls on the context itself and cause to use after free. Fixes the trace: BUG: Unable to handle kernel data access on write at 0x5deadbeef0000108 Faulting instruction address: 0xc0080000002428f4 Oops: Kernel access of bad area, sig: 11 [#1] Call Trace: [c000000207f2b680] [c00800000024280c] .__destroy_id+0x28c/0x610 [rdma_ucm] (unreliable) [c000000207f2b750] [c0080000002429c4] .__destroy_id+0x444/0x610 [rdma_ucm] [c000000207f2b820] [c008000000242c24] .ucma_close+0x94/0xf0 [rdma_ucm] [c000000207f2b8c0] [c00000000046fbdc] .__fput+0xac/0x330 [c000000207f2b960] [c00000000015d48c] .task_work_run+0xbc/0x110 [c000000207f2b9f0] [c00000000012fb00] .do_exit+0x430/0xc50 [c000000207f2bae0] [c0000000001303ec] .do_group_exit+0x5c/0xd0 [c000000207f2bb70] [c000000000144a34] .get_signal+0x194/0xe30 [c000000207f2bc60] [c00000000001f6b4] .do_notify_resume+0x124/0x470 [c000000207f2bd60] [c000000000032484] .interrupt_exit_user_prepare+0x1b4/0x240 [c000000207f2be20] [c000000000010034] interrupt_return+0x14/0x1c0 Rename listen_ctx to conn_req_ctx as the poor name was the cause of this bug. Fixes: a1d33b70dbbc ("RDMA/ucma: Rework how new connections are passed through event delivery") Link: https://lore.kernel.org/r/20201012045600.418271-4-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 71abf20b28ff87fee6951ec2218d5ce7969c4e87 Author: Bob Pearson Date: Tue Oct 13 13:42:37 2020 -0500 RDMA/rxe: Handle skb_clone() failure in rxe_recv.c If skb_clone() is unable to allocate memory for a new sk_buff this is not detected by the current code. Check for a NULL return and continue. This is similar to other errors in this loop over QPs attached to the multicast address and consistent with the unreliable UD transport. Fixes: e7ec96fc7932f ("RDMA/rxe: Fix skb lifetime in rxe_rcv_mcast_pkt()") Addresses-Coverity-ID: 1497804: Null pointer dereferences (NULL_RETURNS) Link: https://lore.kernel.org/r/20201013184236.5231-1-rpearson@hpe.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit e0d696d201dd5d31813787d9b61a42fc459eee89 Author: Jason Gunthorpe Date: Thu Oct 15 20:42:18 2020 -0300 RDMA/rxe: Move the definitions for rxe_av.network_type to uAPI RXE was wrongly using an internal kernel enum as part of its uAPI, split this out into a dedicated uAPI enum just for RXE. It only uses the IPv4 and IPv6 values. This was exposed by changing the internal kernel enum definition which broke RXE. Fixes: 1c15b4f2a42f ("RDMA/core: Modify enum ib_gid_type and enum rdma_network_type") Signed-off-by: Jason Gunthorpe commit e0477b34d9d11c1a7b1f80bfdbcdc8952ce2adb7 Author: Jason Gunthorpe Date: Thu Oct 8 11:27:52 2020 +0300 RDMA: Explicitly pass in the dma_device to ib_register_device The code in setup_dma_device has become rather convoluted, move all of this to the drivers. Drives now pass in a DMA capable struct device which will be used to setup DMA, or drivers must fully configure the ibdev for DMA and pass in NULL. Other than setting the masks in rvt all drivers were doing this already anyhow. mthca, mlx4 and mlx5 were already setting up maximum DMA segment size for DMA based on their hardweare limits in: __mthca_init_one() dma_set_max_seg_size (1G) __mlx4_init_one() dma_set_max_seg_size (1G) mlx5_pci_init() set_dma_caps() dma_set_max_seg_size (2G) Other non software drivers (except usnic) were extended to UINT_MAX [1, 2] instead of 2G as was before. [1] https://lore.kernel.org/linux-rdma/20200924114940.GE9475@nvidia.com/ [2] https://lore.kernel.org/linux-rdma/20200924114940.GE9475@nvidia.com/ Link: https://lore.kernel.org/r/20201008082752.275846-1-leon@kernel.org Link: https://lore.kernel.org/r/6b2ed339933d066622d5715903870676d8cc523a.1602590106.git.mchehab+huawei@kernel.org Suggested-by: Christoph Hellwig Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Christoph Hellwig Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jason Gunthorpe commit bca815d620544c27288abf4841e39922d694425c Author: Ulf Hansson Date: Tue Oct 6 18:05:15 2020 +0200 PM: AVS: smartreflex Move driver to soc specific drivers The avs drivers are all SoC specific drivers that doesn't share any code. Instead they are located in a directory, mostly to keep similar functionality together. From a maintenance point of view, it makes better sense to collect SoC specific drivers like these, into the SoC specific directories. Therefore, let's move the smartreflex driver for OMAP to the ti directory. Signed-off-by: Ulf Hansson Reviewed-by: Nishanth Menon Signed-off-by: Rafael J. Wysocki commit e943c43b32ce15ef23cc6b4574567b045c96c23b Author: Ulf Hansson Date: Tue Oct 6 18:05:14 2020 +0200 PM: AVS: rockchip-io: Move the driver to the rockchip specific drivers The avs drivers are all SoC specific drivers that doesn't share any code. Instead they are located in a directory, mostly to keep similar functionality together. From a maintenance point of view, it makes better sense to collect SoC specific drivers like these, into the SoC specific directories. Therefore, let's move the rockchip-io driver to the rockchip directory. Signed-off-by: Ulf Hansson Acked-by: Heiko Stuebner Signed-off-by: Rafael J. Wysocki commit df8f10587d3d11b055d54138994a1a9a681da0c4 Author: Saheed O. Bolarinwa Date: Thu Oct 15 14:30:39 2020 -0500 PCI/ASPM: Remove struct pcie_link_state.l1ss Previously we computed L1.2 parameters in the enumeration path, saved them in struct pcie_link_state.l1ss, and programmed them into the devices whenever we enabled or disabled L1.2 on the link. But these parameters are constant and don't need to be updated when enabling/disabling L1.2. Compute and program the L1.2 parameters once during enumeration and remove the struct pcie_link_state.l1ss member. No functional change intended. [bhelgaas: rework to program L1.2 parameters during enumeration] Link: https://lore.kernel.org/r/20201015193039.12585-13-helgaas@kernel.org Signed-off-by: Saheed O. Bolarinwa Signed-off-by: Bjorn Helgaas commit 187f91db823789f0059d337caabd5935e677399e Author: Saheed O. Bolarinwa Date: Thu Oct 15 14:30:38 2020 -0500 PCI/ASPM: Remove struct aspm_register_info.l1ss_cap Previously we stored the L1SS Capabilities value in the struct aspm_register_info. We only need this information in one place, so read it there and remove struct aspm_register_info completely, since it's now empty. No functional change intended. [bhelgaas: split up, don't cache l1ss_cap in pci_dev] Link: https://lore.kernel.org/r/20201015193039.12585-12-helgaas@kernel.org Signed-off-by: Saheed O. Bolarinwa Signed-off-by: Bjorn Helgaas commit 1e8955fd832cdbe93cfec9e507e7f1b8633f00e3 Author: Bjorn Helgaas Date: Thu Oct 15 14:30:37 2020 -0500 PCI/ASPM: Pass L1SS Capabilities value, not struct aspm_register_info aspm_calc_l1ss_info() needs only the L1SS Capabilities. It doesn't need anything else from struct aspm_register_info, so pass only the Capabilities value. No functional change intended. Link: https://lore.kernel.org/r/20201015193039.12585-11-helgaas@kernel.org Signed-off-by: Bjorn Helgaas commit 28a1488e55432b89653b2103504fdd21cab875c1 Author: Saheed O. Bolarinwa Date: Thu Oct 15 14:30:36 2020 -0500 PCI/ASPM: Remove struct aspm_register_info.l1ss_ctl1 Previously we stored the L1SS Control 1 register in the struct aspm_register_info. We only need this information in one place, so read it there and remove it from struct aspm_register_info. No functional change intended. [bhelgaas: split ctl1/ctl2] Link: https://lore.kernel.org/r/20201015193039.12585-10-helgaas@kernel.org Signed-off-by: Saheed O. Bolarinwa Signed-off-by: Bjorn Helgaas commit 81c2b807c8c278575f4e6618bcc04d21aee215e9 Author: Bjorn Helgaas Date: Thu Oct 15 14:30:35 2020 -0500 PCI/ASPM: Remove struct aspm_register_info.l1ss_ctl2 (unused) We never use the aspm_register_info.l1ss_ctl2 value, so remove it. No functional change intended. Link: https://lore.kernel.org/r/20201015193039.12585-9-helgaas@kernel.org Signed-off-by: Bjorn Helgaas commit ecdf57b4f6748f3cb89eaf2ffdc9cfae4829f493 Author: Saheed O. Bolarinwa Date: Thu Oct 15 14:30:34 2020 -0500 PCI/ASPM: Remove struct aspm_register_info.l1ss_cap_ptr Save the L1 Substates Capability pointer in struct pci_dev. Then we don't have to keep track of it in the struct aspm_register_info and struct pcie_link_state, which makes the code easier to read. No functional change intended. [bhelgaas: split to a separate patch] Link: https://lore.kernel.org/r/20201015193039.12585-8-helgaas@kernel.org Signed-off-by: Saheed O. Bolarinwa Signed-off-by: Bjorn Helgaas commit 5f7875d651c22770c7382f9b1a9de228bc69237a Author: Saheed O. Bolarinwa Date: Thu Oct 15 14:30:33 2020 -0500 PCI/ASPM: Remove struct aspm_register_info.latency_encoding Previously we stored L0s and L1 Exit Latency information from the Link Capabilities register in the struct aspm_register_info. We only need these latencies when we already have the Link Capabilities values, so use those directly and remove the latencies from struct aspm_register_info. No functional change intended. Link: https://lore.kernel.org/r/20201015193039.12585-7-helgaas@kernel.org Signed-off-by: Saheed O. Bolarinwa Signed-off-by: Bjorn Helgaas commit 67bcc9ad6810c43195959f2fd7a202959860e5c8 Author: Saheed O. Bolarinwa Date: Thu Oct 15 14:30:32 2020 -0500 PCI/ASPM: Remove struct aspm_register_info.enabled Previously we stored the "ASPM Control" bits from the Link Control register in the struct aspm_register_info. Read PCI_EXP_LNKCTL directly when needed. This means we can use the PCI_EXP_LNKCTL_ASPM_* bits directly instead of the similar but different PCIE_LINK_STATE_* bits. No functional change intended. [bhelgaas: drop get_aspm_enable() and read LNKCTL once directly] Link: https://lore.kernel.org/r/20201015193039.12585-6-helgaas@kernel.org Signed-off-by: Saheed O. Bolarinwa Signed-off-by: Bjorn Helgaas commit c6e5f02b5281a3166a9b7b4d66830cc234421ba5 Author: Saheed O. Bolarinwa Date: Thu Oct 15 14:30:31 2020 -0500 PCI/ASPM: Remove struct aspm_register_info.support Previously we stored the "ASPM Support" field from the Link Capabilities register in the struct aspm_register_info. Read the Link Capabilities directly when needed and remove it from the struct aspm_register_info. No functional change intended. [bhelgaas: remove pci_dev cached copy since LNKCAP isn't truly read-only, add PCI_EXP_LNKCAP_ASPM_L0S & PCI_EXP_LNKCAP_ASPM_L1, check them directly instead of adding aspm_support()] Link: https://lore.kernel.org/r/20201015193039.12585-5-helgaas@kernel.org Signed-off-by: Saheed O. Bolarinwa Signed-off-by: Bjorn Helgaas commit 190cd42cc1db1d7c9f3f326e03f74d1c7a3a4588 Author: Bjorn Helgaas Date: Thu Oct 15 14:30:30 2020 -0500 PCI/ASPM: Use 'parent' and 'child' for readability Other users of link->pdev and link->downstream, e.g., pcie_aspm_cap_init(), pcie_config_aspm_l1ss(), and pcie_config_aspm_link(), use "parent" and "child" as local names. Do the same in aspm_calc_l1ss_info() for readability. No functional change intended. Link: https://lore.kernel.org/r/20201015193039.12585-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas commit 08e869ee16fa9fdf144839bb204467daa44edcbd Author: Bjorn Helgaas Date: Thu Oct 15 14:30:29 2020 -0500 PCI/ASPM: Move LTR path check to where it's used pcie_get_aspm_reg() mostly reads ASPM-related registers, but in some cases it also updates the value read from PCI_L1SS_CAP based on LTR properties. Move this update to the point where the value is used to make the code more readable. No functional change intended, although previously we could clear PCI_L1SS_CAP_ASPM_L1_2 for both ends of the link, and now we'll only do it for the downstream end of a link. This shouldn't matter because we always test that bit by ANDing l1ss_cap for the upstream and downstream ends. Link: https://lore.kernel.org/r/20201015193039.12585-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas commit 0f1619cf82ef49eac4c8c8374dcf64234753ee25 Author: Bjorn Helgaas Date: Thu Oct 15 14:30:28 2020 -0500 PCI/ASPM: Move pci_clear_and_set_dword() earlier Move pci_clear_and_set_dword() earlier in file to prepare for future patch. No functional change intended. Link: https://lore.kernel.org/r/20201015193039.12585-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas commit d7a4a85c9a34b8edc3e2f6e64caf5c97c8bdcce4 Author: Rafael J. Wysocki Date: Thu Oct 15 18:59:52 2020 +0200 ACPI: DPTF: Add ACPI_DPTF Kconfig menu Add a Kconfig menu for Intel DPTF (Dynamic Platform and Thermal Framework), put both the existing participant drivers in it and set them to be built as modules by default. While at it, do a few assorted cleanups for a good measure. Signed-off-by: Rafael J. Wysocki Reviewed-by: Srinivas Pandruvada Acked-by: Borislav Petkov commit ff44fe3e67e41795cd2ef11b7d579a689ea57775 Author: Rafael J. Wysocki Date: Thu Oct 15 18:58:43 2020 +0200 ACPI: DPTF: Fix participant driver names Change the names of DPTF participant drivers to adhere to the sysfs file naming conventions (no spaces present in the name in particular). Fixes: 2ce6324eadb0 ("ACPI: DPTF: Add PCH FIVR participant driver") Fixes: 6256ebd5daf9 ("ACPI / DPTF: Add DPTF power participant driver") Signed-off-by: Rafael J. Wysocki Reviewed-by: Srinivas Pandruvada Acked-by: Borislav Petkov commit d85cc6635a2a1338f7a45f652e97b02f9a69b9f5 Author: Alex Hung Date: Tue Oct 13 19:03:40 2020 -0600 ACPI: processor: remove comment regarding string _UID support ACPI 6.3 Errata A no longer allows _UID to return a string except for Itanium (for historical reasons) as stated in section 5.2.12: "From ACPI Specification 6.3 onward, all processor objects for all architectures except Itanium must now use Device() objects with an _HID of ACPI0007, and use only integer _UID values." Therefore, the "we don't handle string _UIDs yet" comment, which implies a missing feature, is redundant, so drop it. Signed-off-by: Alex Hung [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 9a4888888cc09b0ff3d0a1dd32df88742d29a293 Author: Zhang Rui Date: Tue Oct 13 15:35:57 2020 +0800 ACPI: reboot: Avoid racing after writing to ACPI RESET_REG According to the ACPI spec, "The system must reset immediately following the write to the ACPI RESET_REG register.", but there are cases that the system does not follow this and results in racing with the subsequetial reboot mechanism, which brings unexpected behavior. Fix this by adding a 15ms delay after writing to the ACPI RESET_REG. Reported-by: Ghorai, Sukumar Signed-off-by: Zhang Rui [ rjw: Edit comment in the code and subject ] Signed-off-by: Rafael J. Wysocki commit 0fada277147ffc6d694aa32162f51198d4f10d94 Author: Jamie Iles Date: Mon Oct 12 14:04:46 2020 +0100 ACPI: debug: don't allow debugging when ACPI is disabled If ACPI is disabled then loading the acpi_dbg module will result in the following splat when lock debugging is enabled. DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 0 PID: 1 at kernel/locking/mutex.c:938 __mutex_lock+0xa10/0x1290 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.9.0-rc8+ #103 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x0/0x4d8 show_stack+0x34/0x48 dump_stack+0x174/0x1f8 panic+0x360/0x7a0 __warn+0x244/0x2ec report_bug+0x240/0x398 bug_handler+0x50/0xc0 call_break_hook+0x160/0x1d8 brk_handler+0x30/0xc0 do_debug_exception+0x184/0x340 el1_dbg+0x48/0xb0 el1_sync_handler+0x170/0x1c8 el1_sync+0x80/0x100 __mutex_lock+0xa10/0x1290 mutex_lock_nested+0x6c/0xc0 acpi_register_debugger+0x40/0x88 acpi_aml_init+0xc4/0x114 do_one_initcall+0x24c/0xb10 kernel_init_freeable+0x690/0x728 kernel_init+0x20/0x1e8 ret_from_fork+0x10/0x18 This is because acpi_debugger.lock has not been initialized as acpi_debugger_init() is not called when ACPI is disabled. Fail module loading to avoid this and any subsequent problems that might arise by trying to debug AML when ACPI is disabled. Fixes: 8cfb0cdf07e2 ("ACPI / debugger: Add IO interface to access debugger functionalities") Reviewed-by: Hanjun Guo Signed-off-by: Jamie Iles Cc: 4.10+ # 4.10+ Signed-off-by: Rafael J. Wysocki commit c6a113b52302adcfadda63af81dc05f7a669fbc8 Author: Lina Iyer Date: Thu Oct 15 14:47:22 2020 -0600 PM: domains: enable domain idle state accounting To enable better debug of PM domains, keep a track of successful and failing attempts to enter each domain idle state. This statistics are exported in debugfs when reading the idle_states node associated with each PM domain. Signed-off-by: Lina Iyer [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 505a70b783debaa84c7ebafa44a69a9401db4499 Author: Geert Uytterhoeven Date: Tue Oct 13 16:14:59 2020 +0200 PM: domains: Add curly braces to delimit comment + statement block There is not strict need to group a comment and a single statement in an if block, as comments are stripped by the pre-processor. However, adding curly braces does make the code easier to read, and may avoid mistakes when changing the code later. Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 9a40401cfa1356b0d169be8470ed7b2edc33b98f Author: Jason Gunthorpe Date: Fri Oct 16 08:46:01 2020 -0300 lib/scatterlist: Do not limit max_segment to PAGE_ALIGNED values The main intention of the max_segment argument to __sg_alloc_table_from_pages() is to match the DMA layer segment size set by dma_set_max_seg_size(). Restricting the input to be page aligned makes it impossible to just connect the DMA layer to this API. The only reason for a page alignment here is because the algorithm will overshoot the max_segment if it is not a multiple of PAGE_SIZE. Simply fix the alignment before starting and don't expose this implementation detail to the callers. A future patch will completely remove SCATTERLIST_MAX_SEGMENT. Signed-off-by: Jason Gunthorpe commit 16e7483e6f02973972f832b18042fd6c45fe26c0 Merge: bf6a47644ea09 0c16d9635e3a5 Author: Jason Gunthorpe Date: Fri Oct 9 12:56:02 2020 -0300 Merge branch 'dynamic_sg' into rdma.git for-next From Maor Gottlieb says: ==================== This series extends __sg_alloc_table_from_pages to allow chaining of new pages to an already initialized SG table. This allows for drivers to utilize the optimization of merging contiguous pages without a need to pre allocate all the pages and hold them in a very large temporary buffer prior to the call to SG table initialization. The last patch changes the Infiniband core to use the new API. It removes duplicate functionality from the code and benefits from the optimization of allocating dynamic SG table from pages. In huge pages system of 2MB page size, without this change, the SG table would contain x512 SG entries. ==================== * branch 'dynamic_sg': RDMA/umem: Move to allocate SG table from pages lib/scatterlist: Add support in dynamic allocation of SG table from pages tools/testing/scatterlist: Show errors in human readable form tools/testing/scatterlist: Rejuvenate bit-rotten test commit d4f8138354b9ec290de0c7ba527a945c5549e32b Author: Ulf Hansson Date: Tue Oct 13 14:23:39 2020 +0200 PM: domains: Add support for PM domain on/off notifiers for genpd A device may have specific HW constraints that must be obeyed to, before its corresponding PM domain (genpd) can be powered off - and vice verse at power on. These constraints can't be managed through the regular runtime PM based deployment for a device, because the access pattern for it, isn't always request based. In other words, using the runtime PM callbacks to deal with the constraints doesn't work for these cases. For these reasons, let's instead add a PM domain power on/off notification mechanism to genpd. To add/remove a notifier for a device, the device must already have been attached to the genpd, which also means that it needs to be a part of the PM domain topology. To add/remove a notifier, let's introduce two genpd specific functions: - dev_pm_genpd_add|remove_notifier() Note that, to further clarify when genpd power on/off notifiers may be used, one can compare with the existing CPU_CLUSTER_PM_ENTER|EXIT notifiers. In the long run, the genpd power on/off notifiers should be able to replace them, but that requires additional genpd based platform support for the current users. Signed-off-by: Ulf Hansson Tested-by: Lina Iyer Signed-off-by: Rafael J. Wysocki commit f1e8d7560d3051b38f73a0cf6acc1b0bf5305ad9 Author: Zhang Rui Date: Tue Oct 13 15:42:41 2020 +0800 powercap/intel_rapl: enumerate Psys RAPL domain together with package RAPL domain On multi-package systems, the Psys MSR is only valid for CPUs on specific package (master package). The current code makes the assumption that package 0 is the master package, but this is not true on new platforms like SPR. Fix the problem by emuerating the Psys RAPL domain for every package, so CPUs in slave packages will read 0 for the Psys energy counter and only CPUs in master packages can get a valid reading and register the Psys RAPL domain. The sysfs I/F for the Psys RAPL domain is not changed. Signed-off-by: Zhang Rui [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 7a57e9f112adebc9e5dc787c2a59dbc06ae5060d Author: Zhang Rui Date: Tue Oct 13 15:42:40 2020 +0800 powercap/intel_rapl: Fix domain detection As only the low 32 bits of the RAPL_DOMAIN_REG_STATUS register represents the energy counter, and the high 32 bits are reserved, detect the existence of a RAPL domain by checking the low 32 bits only. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit df9c590986fdb6db9d5636d6cd93bc919c01b451 Author: Geert Uytterhoeven Date: Thu Sep 17 15:09:20 2020 +0200 ata: sata_rcar: Fix DMA boundary mask Before commit 9495b7e92f716ab2 ("driver core: platform: Initialize dma_parms for platform devices"), the R-Car SATA device didn't have DMA parameters. Hence the DMA boundary mask supplied by its driver was silently ignored, as __scsi_init_queue() doesn't check the return value of dma_set_seg_boundary(), and the default value of 0xffffffff was used. Now the device has gained DMA parameters, the driver-supplied value is used, and the following warning is printed on Salvator-XS: DMA-API: sata_rcar ee300000.sata: mapping sg segment across boundary [start=0x00000000ffffe000] [end=0x00000000ffffefff] [boundary=0x000000001ffffffe] WARNING: CPU: 5 PID: 38 at kernel/dma/debug.c:1233 debug_dma_map_sg+0x298/0x300 (the range of start/end values depend on whether IOMMU support is enabled or not) The issue here is that SATA_RCAR_DMA_BOUNDARY doesn't have bit 0 set, so any typical end value, which is odd, will trigger the check. Fix this by increasing the DMA boundary value by 1. This also fixes the following WRITE DMA EXT timeout issue: # dd if=/dev/urandom of=/mnt/de1/file1-1024M bs=1M count=1024 ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen ata1.00: failed command: WRITE DMA EXT ata1.00: cmd 35/00:00:00:e6:0c/00:0a:00:00:00/e0 tag 0 dma 1310720 out res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) ata1.00: status: { DRDY } as seen by Shimoda-san since commit 429120f3df2dba2b ("block: fix splitting segments on boundary masks"). Fixes: 8bfbeed58665dbbf ("sata_rcar: correct 'sata_rcar_sht'") Fixes: 9495b7e92f716ab2 ("driver core: platform: Initialize dma_parms for platform devices") Fixes: 429120f3df2dba2b ("block: fix splitting segments on boundary masks") Signed-off-by: Geert Uytterhoeven Tested-by: Lad Prabhakar Tested-by: Yoshihiro Shimoda Reviewed-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Sergei Shtylyov Reviewed-by: Ulf Hansson Cc: stable Signed-off-by: Jens Axboe commit b2a182a40278bc5849730e66bca01a762188ed86 Author: Douglas Gilbert Date: Thu Oct 15 14:57:35 2020 -0400 sgl_alloc_order: fix memory leak sgl_alloc_order() can fail when 'length' is large on a memory constrained system. When order > 0 it will potentially be making several multi-page allocations with the later ones more likely to fail than the earlier one. So it is important that sgl_alloc_order() frees up any pages it has obtained before returning NULL. In the case when order > 0 it calls the wrong free page function and leaks. In testing the leak was sufficient to bring down my 8 GiB laptop with OOM. Reviewed-by: Bart Van Assche Signed-off-by: Douglas Gilbert Signed-off-by: Jens Axboe commit a48faebe65b0db55a73b9220c3d919eee849bb79 Author: Colin Ian King Date: Fri Oct 16 15:33:51 2020 +0100 lightnvm: fix out-of-bounds write to array devices->info[] There is an off-by-one array check that can lead to a out-of-bounds write to devices->info[i]. Fix this by checking by using >= rather than > for the size check. Also replace hard-coded array size limit with ARRAY_SIZE on the array. Addresses-Coverity: ("Out-of-bounds write") Fixes: cd9e9808d18f ("lightnvm: Support for Open-Channel SSDs") Signed-off-by: Colin Ian King Signed-off-by: Jens Axboe commit 75af76d0a34e048651a6af311781d7206b6964c7 Author: Mel Gorman Date: Fri Oct 16 17:28:32 2020 +0200 intel_idle: Ignore _CST if control cannot be taken from the platform e6d4f08a6776 ("intel_idle: Use ACPI _CST on server systems") avoids enabling c-states that have been disabled by the platform with the exception of C1E. Unfortunately, BIOS implementations are not always consistent in terms of how capabilities are advertised and control cannot always be handed over. If control cannot be handed over then intel_idle reports that "ACPI _CST not found or not usable" but does not clear acpi_state_table.count meaning the information is still partially used. This patch ignores ACPI information if CST control cannot be requested from the platform. This was only observed on a number of Haswell platforms that had identical CPUs but not identical BIOS versions. While this problem may be rare overall, 24 separate test cases bisected to this specific commit across 4 separate test machines and is worth addressing. If the situation occurs, the kernel behaves as it did before commit e6d4f08a6776 and uses any c-states that are discovered. The affected test cases were all ones that involved a small number of processes -- exec microbenchmark, pipe microbenchmark, git test suite, netperf, tbench with one client and system call microbenchmark. Each case benefits from being able to use turboboost which is prevented if the lower c-states are unavailable. This may mask real regressions specific to older hardware so it is worth addressing. C-state status before and after the patch 5.9.0-vanilla POLL latency:0 disabled:0 default:enabled 5.9.0-vanilla C1 latency:2 disabled:0 default:enabled 5.9.0-vanilla C1E latency:10 disabled:0 default:enabled 5.9.0-vanilla C3 latency:33 disabled:1 default:disabled 5.9.0-vanilla C6 latency:133 disabled:1 default:disabled 5.9.0-ignore-cst-v1r1 POLL latency:0 disabled:0 default:enabled 5.9.0-ignore-cst-v1r1 C1 latency:2 disabled:0 default:enabled 5.9.0-ignore-cst-v1r1 C1E latency:10 disabled:0 default:enabled 5.9.0-ignore-cst-v1r1 C3 latency:33 disabled:0 default:enabled 5.9.0-ignore-cst-v1r1 C6 latency:133 disabled:0 default:enabled Patch enables C3/C6. Netperf UDP_STREAM netperf-udp 5.5.0 5.9.0 vanilla ignore-cst-v1r1 Hmean send-64 193.41 ( 0.00%) 226.54 * 17.13%* Hmean send-128 392.16 ( 0.00%) 450.54 * 14.89%* Hmean send-256 769.94 ( 0.00%) 881.85 * 14.53%* Hmean send-1024 2994.21 ( 0.00%) 3468.95 * 15.85%* Hmean send-2048 5725.60 ( 0.00%) 6628.99 * 15.78%* Hmean send-3312 8468.36 ( 0.00%) 10288.02 * 21.49%* Hmean send-4096 10135.46 ( 0.00%) 12387.57 * 22.22%* Hmean send-8192 17142.07 ( 0.00%) 19748.11 * 15.20%* Hmean send-16384 28539.71 ( 0.00%) 30084.45 * 5.41%* Fixes: e6d4f08a6776 ("intel_idle: Use ACPI _CST on server systems") Signed-off-by: Mel Gorman Cc: 5.6+ # 5.6+ Signed-off-by: Rafael J. Wysocki commit bae314dd5d8dfdd90ee584003a0f8c06e1bf3ea2 Author: Daniel Lezcano Date: Thu Oct 15 16:44:27 2020 +0200 cpuidle: Remove pointless stub The cpuidle.h header is declaring a function with an empty stub for the cpuidle disabled case, but that function is only called by cpuidle governors which depend on cpuidle anyway. In other words, the function is only called when cpuidle is enabled, so there is no need for the stub. Remove the pointless stub. Signed-off-by: Daniel Lezcano [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 8bb2e2a887afdf8a39e68fa0dccf82a168aae655 Author: Alexander Monakov Date: Mon Oct 12 15:50:33 2020 +0300 intel_idle: mention assumption that WBINVD is not needed Intel SDM does not explicitly say that entering a C-state via MWAIT will implicitly flush CPU caches as appropriate for that C-state. However, documentation for individual Intel CPU generations does mention this behavior. Since intel_idle binds to any Intel CPU with MWAIT, list this assumption of MWAIT behavior. In passing, reword opening comment to make it clear that the driver can load on any old and future Intel CPU with MWAIT. Signed-off-by: Alexander Monakov Signed-off-by: Rafael J. Wysocki commit e05783346441ce03f5b422247ca571613360218d Author: Ulf Hansson Date: Thu Oct 1 11:28:52 2020 +0200 MAINTAINERS: Add section for cpuidle-psci PM domain The cpuidle-psci-domain.c is not listed in the section for the cpuidle driver for ARM PSCI. From discussions at LKML, Lorenzo and Sudeep prefer to add a separate section for it, so do that and add myself as the maintainer for that part. Signed-off-by: Ulf Hansson Acked-by: Lorenzo Pieralisi Acked-by: Sudeep Holla [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit cdc1719cd885ef490e30c14c01a6e7fee42bf2e2 Author: Chen Yu Date: Fri Oct 9 11:30:38 2020 +0800 cpufreq: intel_pstate: Delete intel_pstate sysfs if failed to register the driver There is a corner case that if the intel_pstate driver fails to be registered (might be due to invalid MSR access) and acpi_cpufreq takse over, the intel_pstate sysfs interface is still populated which may confuse user space (turbostat for example): grep . /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver acpi-cpufreq grep . /sys/devices/system/cpu/intel_pstate/* /sys/devices/system/cpu/intel_pstate/max_perf_pct:0 /sys/devices/system/cpu/intel_pstate/min_perf_pct:0 grep: /sys/devices/system/cpu/intel_pstate/no_turbo: Resource temporarily unavailable grep: /sys/devices/system/cpu/intel_pstate/num_pstates: Resource temporarily unavailable /sys/devices/system/cpu/intel_pstate/status:off grep: /sys/devices/system/cpu/intel_pstate/turbo_pct: Resource temporarily unavailable The mere presence of the intel_pstate sysfs interface does not mean that intel_pstate is in use (for example, echo "off" to "status"), but it should not be created in the failing case. Fix this issue by deleting the intel_pstate sysfs if the driver registration fails. Reported-by: Wendy Wang Suggested-by: Zhang Rui Signed-off-by: Chen Yu Acked-by: Srinivas Pandruvada commit 97148d0ae5303bcc18fcd1c9b968a9485292f32a Author: Viresh Kumar Date: Tue Oct 13 10:42:47 2020 +0530 cpufreq: Improve code around unlisted freq check The cpufreq core checks if the frequency programmed by the bootloaders is not listed in the freq table and programs one from the table in such a case. This is done only if the driver has set the CPUFREQ_NEED_INITIAL_FREQ_CHECK flag. Currently we print two separate messages, with almost the same content, and do this with a pr_warn() which may be a bit too much as the driver only asked us to check this as it expected this to be the case. Lower down the severity of the print message by switching to pr_info() instead and print a single message only. Reported-by: Sumit Gupta Signed-off-by: Viresh Kumar Reviewed-by: Sumit Gupta Tested-by: Sumit Gupta Signed-off-by: Rafael J. Wysocki commit 79d6c4093bb14e5a48b727c1e98f4fc8c8529e8d Merge: 0b8417c141815 527b7779e5eca Author: Rafael J. Wysocki Date: Fri Oct 16 16:10:30 2020 +0200 Merge tag 'linux-cpupower-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility updates for 5.10-rc1 from Shuah Khan: "This update consists of minor fixes for spelling and speeding up generating git version string which will in turn speed up compiles." * tag 'linux-cpupower-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: speed up generating git version string cpupowerutils: fix spelling mistake "dependant" -> "dependent" commit 1afc708dcae41bc538fda0f85d4f0ecf276fa505 Author: Filipe Manana Date: Wed Oct 14 10:10:36 2020 +0100 btrfs: fix relocation failure due to race with fallocate When doing a fallocate() we have a short time window, after reserving an extent and before starting a transaction, where if relocation for the block group containing the reserved extent happens, we can end up missing the extent in the data relocation inode causing relocation to fail later. This only happens when we don't pass a transaction to the internal fallocate function __btrfs_prealloc_file_range(), which is for all the cases where fallocate() is called from user space (the internal use cases include space cache extent allocation and relocation). When the race triggers the relocation failure, it produces a trace like the following: [200611.995995] ------------[ cut here ]------------ [200611.997084] BTRFS: Transaction aborted (error -2) [200611.998208] WARNING: CPU: 3 PID: 235845 at fs/btrfs/ctree.c:1074 __btrfs_cow_block+0x3a0/0x5b0 [btrfs] [200611.999042] Modules linked in: dm_thin_pool dm_persistent_data (...) [200612.003287] CPU: 3 PID: 235845 Comm: btrfs Not tainted 5.9.0-rc6-btrfs-next-69 #1 [200612.004442] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [200612.006186] RIP: 0010:__btrfs_cow_block+0x3a0/0x5b0 [btrfs] [200612.007110] Code: 1b 00 00 02 72 2a 83 f8 fb 0f 84 b8 01 (...) [200612.007341] BTRFS warning (device sdb): Skipping commit of aborted transaction. [200612.008959] RSP: 0018:ffffaee38550f918 EFLAGS: 00010286 [200612.009672] BTRFS: error (device sdb) in cleanup_transaction:1901: errno=-30 Readonly filesystem [200612.010428] RAX: 0000000000000000 RBX: ffff9174d96f4000 RCX: 0000000000000000 [200612.011078] BTRFS info (device sdb): forced readonly [200612.011862] RDX: 0000000000000001 RSI: ffffffffa8161978 RDI: 00000000ffffffff [200612.013215] RBP: ffff9172569a0f80 R08: 0000000000000000 R09: 0000000000000000 [200612.014263] R10: 0000000000000000 R11: 0000000000000000 R12: ffff9174b8403b88 [200612.015203] R13: ffff9174b8400a88 R14: ffff9174c90f1000 R15: ffff9174a5a60e08 [200612.016182] FS: 00007fa55cf878c0(0000) GS:ffff9174ece00000(0000) knlGS:0000000000000000 [200612.017174] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [200612.018418] CR2: 00007f8fb8048148 CR3: 0000000428a46003 CR4: 00000000003706e0 [200612.019510] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [200612.020648] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [200612.021520] Call Trace: [200612.022434] btrfs_cow_block+0x10b/0x250 [btrfs] [200612.023407] do_relocation+0x54e/0x7b0 [btrfs] [200612.024343] ? do_raw_spin_unlock+0x4b/0xc0 [200612.025280] ? _raw_spin_unlock+0x29/0x40 [200612.026200] relocate_tree_blocks+0x3bc/0x6d0 [btrfs] [200612.027088] relocate_block_group+0x2f3/0x600 [btrfs] [200612.027961] btrfs_relocate_block_group+0x15e/0x340 [btrfs] [200612.028896] btrfs_relocate_chunk+0x38/0x110 [btrfs] [200612.029772] btrfs_balance+0xb22/0x1790 [btrfs] [200612.030601] ? btrfs_ioctl_balance+0x253/0x380 [btrfs] [200612.031414] btrfs_ioctl_balance+0x2cf/0x380 [btrfs] [200612.032279] btrfs_ioctl+0x620/0x36f0 [btrfs] [200612.033077] ? _raw_spin_unlock+0x29/0x40 [200612.033948] ? handle_mm_fault+0x116d/0x1ca0 [200612.034749] ? up_read+0x18/0x240 [200612.035542] ? __x64_sys_ioctl+0x83/0xb0 [200612.036244] __x64_sys_ioctl+0x83/0xb0 [200612.037269] do_syscall_64+0x33/0x80 [200612.038190] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [200612.038976] RIP: 0033:0x7fa55d07ed87 [200612.040127] Code: 00 00 00 48 8b 05 09 91 0c 00 64 c7 00 26 (...) [200612.041669] RSP: 002b:00007ffd5ebf03e8 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [200612.042437] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fa55d07ed87 [200612.043511] RDX: 00007ffd5ebf0470 RSI: 00000000c4009420 RDI: 0000000000000003 [200612.044250] RBP: 0000000000000003 R08: 000055d8362642a0 R09: 00007fa55d148be0 [200612.044963] R10: fffffffffffff52e R11: 0000000000000206 R12: 00007ffd5ebf1614 [200612.045683] R13: 00007ffd5ebf0470 R14: 0000000000000002 R15: 00007ffd5ebf0470 [200612.046361] irq event stamp: 0 [200612.047040] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [200612.047725] hardirqs last disabled at (0): [] copy_process+0x823/0x1bc0 [200612.048387] softirqs last enabled at (0): [] copy_process+0x823/0x1bc0 [200612.049024] softirqs last disabled at (0): [<0000000000000000>] 0x0 [200612.049722] ---[ end trace 49006c6876e65227 ]--- The race happens like this: 1) Task A starts an fallocate() (plain or zero range) and it calls __btrfs_prealloc_file_range() with the 'trans' parameter set to NULL; 2) Task A calls btrfs_reserve_extent() and gets an extent that belongs to block group X; 3) Before task A gets into btrfs_replace_file_extents(), through the call to insert_prealloc_file_extent(), task B starts relocation of block group X; 4) Task B enters btrfs_relocate_block_group() and it sets block group X to RO mode; 5) Task B enters relocate_block_group(), it calls prepare_to_relocate() whichs joins/starts a transaction and then commits the transaction; 6) Task B then starts scanning the extent tree looking for extents that belong to block group X - it does not find yet the extent reserved by task A, since that extent was not yet added to the extent tree, as its delayed reference was not even yet created at this point; 7) The data relocation inode ends up not having the extent reserved by task A associated to it; 8) Task A then starts a transaction through btrfs_replace_file_extents(), inserts a file extent item in the subvolume tree pointing to the reserved extent and creates a delayed reference for it; 9) Task A finishes and returns success to user space; 10) Later on, while relocation is still in progress, the leaf where task A inserted the new file extent item is COWed, so we end up at __btrfs_cow_block(), which calls btrfs_reloc_cow_block(), and that in turn calls relocation.c:replace_file_extents(); 11) At relocation.c:replace_file_extents() we iterate over all the items in the leaf and find the file extent item pointing to the extent that was allocated by task A, and then call relocation.c:get_new_location(), to find the new location for the extent; 12) However relocation.c:get_new_location() fails, returning -ENOENT, because it couldn't find a corresponding file extent item associated with the data relocation inode. This is because the extent was not seen in the extent tree at step 6). The -ENOENT error is propagated to __btrfs_cow_block(), which aborts the transaction. So fix this simply by decrementing the block group's number of reservations after calling insert_prealloc_file_extent(), as relocation waits for that counter to go down to zero before calling prepare_to_relocate() and start looking for extents in the extent tree. This issue only started to happen recently as of commit 8fccebfa534c79 ("btrfs: fix metadata reservation for fallocate that leads to transaction aborts"), because now we can reserve an extent before starting/joining a transaction, and previously we always did it after that, so relocation ended up waiting for a concurrent fallocate() to finish because before searching for the extents of the block group, it starts/joins a transaction and then commits it (at prepare_to_relocate()), which made it wait for the fallocate task to complete first. Fixes: 8fccebfa534c79 ("btrfs: fix metadata reservation for fallocate that leads to transaction aborts") Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit ce66f6136460a51acfc32de4481fe8fd69dfd50b Author: Masami Hiramatsu Date: Fri Oct 16 13:20:02 2020 +0900 tracing: Remove __init from __trace_early_add_new_event() The commit 720dee53ad8d ("tracing/boot: Initialize per-instance event list in early boot") removes __init from __trace_early_add_events() but __trace_early_add_new_event() still has __init and will cause a section mismatch. Remove __init from __trace_early_add_new_event() as same as __trace_early_add_events(). Link: https://lore.kernel.org/lkml/CAHk-=wjU86UhovK4XuwvCqTOfc+nvtpAuaN2PJBz15z=w=u0Xg@mail.gmail.com/ Reported-by: Linus Torvalds Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 7530d3eb3dcf1a30750e8e7f1f88b782b96b72b8 Author: David Howells Date: Thu Oct 15 09:02:25 2020 +0100 afs: Don't assert on unpurgeable server records Don't give an assertion failure on unpurgeable afs_server records - which kills the thread - but rather emit a trace line when we are purging a record (which only happens during network namespace removal or rmmod) and print a notice of the problem. Signed-off-by: David Howells commit dca54a7bbb8ca9148ae10d60c66c926e222a9c4b Author: David Howells Date: Tue Oct 13 20:51:59 2020 +0100 afs: Add tracing for cell refcount and active user count Add a tracepoint to log the cell refcount and active user count and pass in a reason code through various functions that manipulate these counters. Additionally, a helper function, afs_see_cell(), is provided to log interesting places that deal with a cell without actually doing any accounting directly. Signed-off-by: David Howells commit 1d0e850a49a5b56f8f3cb51e74a11e2fedb96be6 Author: David Howells Date: Fri Oct 16 13:21:14 2020 +0100 afs: Fix cell removal Fix cell removal by inserting a more final state than AFS_CELL_FAILED that indicates that the cell has been unpublished in case the manager is already requeued and will go through again. The new AFS_CELL_REMOVED state will just immediately leave the manager function. Going through a second time in the AFS_CELL_FAILED state will cause it to try to remove the cell again, potentially leading to the proc list being removed. Fixes: 989782dcdc91 ("afs: Overhaul cell database management") Reported-by: syzbot+b994ecf2b023f14832c1@syzkaller.appspotmail.com Reported-by: syzbot+0e0db88e1eb44a91ae8d@syzkaller.appspotmail.com Reported-by: syzbot+2d0585e5efcd43d113c2@syzkaller.appspotmail.com Reported-by: syzbot+1ecc2f9d3387f1d79d42@syzkaller.appspotmail.com Reported-by: syzbot+18d51774588492bf3f69@syzkaller.appspotmail.com Reported-by: syzbot+a5e4946b04d6ca8fa5f3@syzkaller.appspotmail.com Suggested-by: Hillf Danton Signed-off-by: David Howells cc: Hillf Danton commit 286377f6bdf71568a4cf07104fe44006ae0dba6d Author: David Howells Date: Thu Oct 15 11:05:01 2020 +0100 afs: Fix cell purging with aliases When the afs module is removed, one of the things that has to be done is to purge the cell database. afs_cell_purge() cancels the management timer and then starts the cell manager work item to do the purging. This does a single run through and then assumes that all cells are now purged - but this is no longer the case. With the introduction of alias detection, a later cell in the database can now be holding an active count on an earlier cell (cell->alias_of). The purge scan passes by the earlier cell first, but this can't be got rid of until it has discarded the alias. Ordinarily, afs_unuse_cell() would handle this by setting the management timer to trigger another pass - but afs_set_cell_timer() doesn't do anything if the namespace is being removed (net->live == false). rmmod then hangs in the wait on cells_outstanding in afs_cell_purge(). Fix this by making afs_set_cell_timer() directly queue the cell manager if net->live is false. This causes additional management passes. Queueing the cell manager increments cells_outstanding to make sure the wait won't complete until all cells are destroyed. Fixes: 8a070a964877 ("afs: Detect cell aliases 1 - Cells with root volumes") Signed-off-by: David Howells commit 88c853c3f5c0a07c5db61b494ee25152535cfeee Author: David Howells Date: Tue Jul 23 11:24:59 2019 +0100 afs: Fix cell refcounting by splitting the usage counter Management of the lifetime of afs_cell struct has some problems due to the usage counter being used to determine whether objects of that type are in use in addition to whether anyone might be interested in the structure. This is made trickier by cell objects being cached for a period of time in case they're quickly reused as they hold the result of a setup process that may be slow (DNS lookups, AFS RPC ops). Problems include the cached root volume from alias resolution pinning its parent cell record, rmmod occasionally hanging and occasionally producing assertion failures. Fix this by splitting the count of active users from the struct reference count. Things then work as follows: (1) The cell cache keeps +1 on the cell's activity count and this has to be dropped before the cell can be removed. afs_manage_cell() tries to exchange the 1 to a 0 with the cells_lock write-locked, and if successful, the record is removed from the net->cells. (2) One struct ref is 'owned' by the activity count. That is put when the active count is reduced to 0 (final_destruction label). (3) A ref can be held on a cell whilst it is queued for management on a work queue without confusing the active count. afs_queue_cell() is added to wrap this. (4) The queue's ref is dropped at the end of the management. This is split out into a separate function, afs_manage_cell_work(). (5) The root volume record is put after a cell is removed (at the final_destruction label) rather then in the RCU destruction routine. (6) Volumes hold struct refs, but aren't active users. (7) Both counts are displayed in /proc/net/afs/cells. There are some management function changes: (*) afs_put_cell() now just decrements the refcount and triggers the RCU destruction if it becomes 0. It no longer sets a timer to have the manager do this. (*) afs_use_cell() and afs_unuse_cell() are added to increase and decrease the active count. afs_unuse_cell() sets the management timer. (*) afs_queue_cell() is added to queue a cell with approprate refs. There are also some other fixes: (*) Don't let /proc/net/afs/cells access a cell's vllist if it's NULL. (*) Make sure that candidate cells in lookups are properly destroyed rather than being simply kfree'd. This ensures the bits it points to are destroyed also. (*) afs_dec_cells_outstanding() is now called in cell destruction rather than at "final_destruction". This ensures that cell->net is still valid to the end of the destructor. (*) As a consequence of the previous two changes, move the increment of net->cells_outstanding that was at the point of insertion into the tree to the allocation routine to correctly balance things. Fixes: 989782dcdc91 ("afs: Overhaul cell database management") Signed-off-by: David Howells commit 8c39076c276be0b31982e44654e2c2357473258a Author: Olga Kornievskaia Date: Fri Oct 16 09:25:45 2020 -0400 NFSv4.2: support EXCHGID4_FLAG_SUPP_FENCE_OPS 4.2 EXCHANGE_ID flag RFC 7862 introduced a new flag that either client or server is allowed to set: EXCHGID4_FLAG_SUPP_FENCE_OPS. Client needs to update its bitmask to allow for this flag value. v2: changed minor version argument to unsigned int Signed-off-by: Olga Kornievskaia CC: Signed-off-by: Anna Schumaker commit 92e3cc91d8f51ce64a8b7c696377180953dd316e Author: David Howells Date: Fri Oct 9 14:11:58 2020 +0100 afs: Fix rapid cell addition/removal by not using RCU on cells tree There are a number of problems that are being seen by the rapidly mounting and unmounting an afs dynamic root with an explicit cell and volume specified (which should probably be rejected, but that's a separate issue): What the tests are doing is to look up/create a cell record for the name given and then tear it down again without actually using it to try to talk to a server. This is repeated endlessly, very fast, and the new cell collides with the old one if it's not quick enough to reuse it. It appears (as suggested by Hillf Danton) that the search through the RB tree under a read_seqbegin_or_lock() under RCU conditions isn't safe and that it's not blocking the write_seqlock(), despite taking two passes at it. He suggested that the code should take a ref on the cell it's attempting to look at - but this shouldn't be necessary until we've compared the cell names. It's possible that I'm missing a barrier somewhere. However, using an RCU search for this is overkill, really - we only need to access the cell name in a few places, and they're places where we're may end up sleeping anyway. Fix this by switching to an R/W semaphore instead. Additionally, draw the down_read() call inside the function (renamed to afs_find_cell()) since all the callers were taking the RCU read lock (or should've been[*]). [*] afs_probe_cell_name() should have been, but that doesn't appear to be involved in the bug reports. The symptoms of this look like: general protection fault, probably for non-canonical address 0xf27d208691691fdb: 0000 [#1] PREEMPT SMP KASAN KASAN: maybe wild-memory-access in range [0x93e924348b48fed8-0x93e924348b48fedf] ... RIP: 0010:strncasecmp lib/string.c:52 [inline] RIP: 0010:strncasecmp+0x5f/0x240 lib/string.c:43 afs_lookup_cell_rcu+0x313/0x720 fs/afs/cell.c:88 afs_lookup_cell+0x2ee/0x1440 fs/afs/cell.c:249 afs_parse_source fs/afs/super.c:290 [inline] ... Fixes: 989782dcdc91 ("afs: Overhaul cell database management") Reported-by: syzbot+459a5dce0b4cb70fd076@syzkaller.appspotmail.com Signed-off-by: David Howells cc: Hillf Danton cc: syzkaller-bugs@googlegroups.com commit d26dd4131d0d6ad7aa294a7f8d18782b47c27c93 Author: Marc Zyngier Date: Fri Oct 16 09:28:23 2020 +0100 irqchip/mips: Drop selection of IRQ_DOMAIN_HIERARCHY Now that GENERIC_IRQ_IPI selects IRQ_DOMAIN_HIERARCHY, there is no need to have this conditional select for IRQ_MIPS_CPU. Similarily, MIPS_GIC only needs selecting GENERIC_IRQ_IPI. Suggested-by: Thomas Gleixner Signed-off-by: Marc Zyngier commit 8d0e2101274358d9b6b1f27232b40253ca48bab5 Author: Ganesh Goudar Date: Fri Oct 9 12:10:04 2020 +0530 powerpc/mce: Avoid nmi_enter/exit in real mode on pseries hash Use of nmi_enter/exit in real mode handler causes the kernel to panic and reboot on injecting SLB mutihit on pseries machine running in hash MMU mode, because these calls try to accesses memory outside RMO region in real mode handler where translation is disabled. Add check to not to use these calls on pseries machine running in hash MMU mode. Fixes: 116ac378bb3f ("powerpc/64s: machine check interrupt update NMI accounting") Cc: stable@vger.kernel.org # v5.8+ Signed-off-by: Ganesh Goudar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201009064005.19777-2-ganeshgr@linux.ibm.com commit 3e2ac9798e13ad1f52d735ea2ea1d252cb140ae5 Author: Mauro Carvalho Chehab Date: Mon Oct 5 10:58:18 2020 +0200 PM / devfreq: remove a duplicated kernel-doc markup The update_devfreq() is also documented at devfreq.c, which has a more complete note. So, drop the duplicated markup, in order to avoid this warning: .../Documentation/driver-api/device_link.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/infrastructure'. Declaration is 'device_link_state'. (and to cause a problem with cross-references to it) Signed-off-by: Mauro Carvalho Chehab commit f910ce5266cc632fe9b8339fed4b01f6b1f2431a Author: Mauro Carvalho Chehab Date: Thu Sep 17 13:29:25 2020 +0200 mm/doc: fix a literal block markup Literal blocks with :: markup should be indented, as otherwise Sphinx complains: Documentation/vm/hmm.rst:363: WARNING: Literal block expected; none found. Fixes: f7ebd9ed7767 ("mm/doc: add usage description for migrate_vma_*()") Signed-off-by: Mauro Carvalho Chehab commit 3eb6b31bfb1732f4c48ef5a271dc15158efe8323 Author: Mauro Carvalho Chehab Date: Tue Sep 29 13:12:51 2020 +0200 workqueue: fix a kernel-doc warning As warned by Sphinx: ./Documentation/core-api/workqueue:400: ./kernel/workqueue.c:1218: WARNING: Unexpected indentation. the return code table is currently not recognized, as it lacks markups. Acked-by: Tejun Heo Signed-off-by: Mauro Carvalho Chehab commit c88773dcc66f02b06503490763853a10e83cde36 Author: Mauro Carvalho Chehab Date: Thu Oct 1 07:29:27 2020 +0200 docs: virt: user_mode_linux_howto_v2.rst: fix a literal block markup There's a missing new line for a literal block: .../Documentation/virt/uml/user_mode_linux_howto_v2.rst:682: WARNING: Unexpected indentation. Fixes: 04301bf5b072 ("docs: replace the old User Mode Linux HowTo with a new one") Signed-off-by: Mauro Carvalho Chehab commit 29e279230413cdd5e00fb5d269cae1099184ab85 Author: Steve French Date: Wed Oct 14 20:24:09 2020 -0500 smb3.1.1: add new module load parm enable_gcm_256 Add new module load parameter enable_gcm_256. If set, then add AES-256-GCM (strongest encryption type) to the list of encryption types requested. Put it in the list as the second choice (since AES-128-GCM is faster and much more broadly supported by SMB3 servers). To make this stronger encryption type, GCM-256, required (the first and only choice, you would use module parameter "require_gcm_256." Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit fbfd0b46afa9a8b50a061b0f28204fc94c7bddcf Author: Steve French Date: Fri Sep 11 16:19:28 2020 -0500 smb3.1.1: add new module load parm require_gcm_256 Add new module load parameter require_gcm_256. If set, then only request AES-256-GCM (strongest encryption type). Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit 330857a5d8224fa073bcb88d78e5be51f0848a75 Author: Stefan Metzmacher Date: Mon Feb 24 14:15:09 2020 +0100 cifs: map STATUS_ACCOUNT_LOCKED_OUT to -EACCES This is basically the same as STATUS_LOGON_FAILURE, but after the account is locked out. Signed-off-by: Stefan Metzmacher Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit 682955491a0d89ed7993d7b7f5051c858634ee70 Author: Steve French Date: Sat Oct 10 20:11:47 2020 -0500 SMB3.1.1: add defines for new signing negotiate context Currently there are three supported signing algorithms Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit c6cc4c5a72505a0ecefc9b413f16bec512f38078 Author: Ronnie Sahlberg Date: Fri Oct 9 09:32:56 2020 +1000 cifs: handle -EINTR in cifs_setattr RHBZ: 1848178 Some calls that set attributes, like utimensat(), are not supposed to return -EINTR and thus do not have handlers for this in glibc which causes us to leak -EINTR to the applications which are also unprepared to handle it. For example tar will break if utimensat() return -EINTR and abort unpacking the archive. Other applications may break too. To handle this we add checks, and retry, for -EINTR in cifs_setattr() Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 8e670f77c4a55013db6d23b962f9bf6673a5e7b6 Author: Rohith Surabattula Date: Fri Sep 18 05:37:28 2020 +0000 Handle STATUS_IO_TIMEOUT gracefully Currently STATUS_IO_TIMEOUT is not treated as retriable error. It is currently mapped to ETIMEDOUT and returned to userspace for most system calls. STATUS_IO_TIMEOUT is returned by server in case of unavailability or throttling errors. This patch will map the STATUS_IO_TIMEOUT to EAGAIN, so that it can be retried. Also, added a check to drop the connection to not overload the server in case of ongoing unavailability. Signed-off-by: Rohith Surabattula Reviewed-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky Signed-off-by: Steve French commit d4263b12a1a0e8816e021450be0765a1ad8bb53c Author: Aneesh Kumar K.V Date: Wed Oct 14 12:18:13 2020 +0530 powerpc/opal_elog: Handle multiple writes to ack attribute Even though we use self removing sysfs helper, we still need to make sure we do the final kobject delete conditionally. sysfs_remove_file_self() will handle parallel calls to remove the sysfs attribute file and returns true only in the caller that removed the attribute file. The other parallel callers are returned false. Do the final kobject delete checking the return value of sysfs_remove_file_self(). Signed-off-by: Aneesh Kumar K.V Reviewed-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201014064813.109515-1-aneesh.kumar@linux.ibm.com commit 141bc97c1bfe31397b2a12e5676d0c2692c8e07e Author: Bjorn Andersson Date: Thu Oct 15 22:14:42 2020 -0500 remoteproc/mediatek: Remove non-standard dsb() As reported by Stephen, dsb() is not declared on e.g. x86_64, preventing the mtp_scp from building. Simply remove the barrier (and the readback), suggested by Pi-Hsun to resolve this. Fixes: fd0b6c1ff85a ("remoteproc/mediatek: Add support for mt8192 SCP") Reported-by: Stephen Rothwell Suggested-by: Pi-Hsun Shih Signed-off-by: Bjorn Andersson commit 9ff9b0d392ea08090cd1780fb196f36dbb586529 Merge: 840e5bb326bbc 105faa8742437 Author: Linus Torvalds Date: Thu Oct 15 18:42:13 2020 -0700 Merge tag 'net-next-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Jakub Kicinski: - Add redirect_neigh() BPF packet redirect helper, allowing to limit stack traversal in common container configs and improving TCP back-pressure. Daniel reports ~10Gbps => ~15Gbps single stream TCP performance gain. - Expand netlink policy support and improve policy export to user space. (Ge)netlink core performs request validation according to declared policies. Expand the expressiveness of those policies (min/max length and bitmasks). Allow dumping policies for particular commands. This is used for feature discovery by user space (instead of kernel version parsing or trial and error). - Support IGMPv3/MLDv2 multicast listener discovery protocols in bridge. - Allow more than 255 IPv4 multicast interfaces. - Add support for Type of Service (ToS) reflection in SYN/SYN-ACK packets of TCPv6. - In Multi-patch TCP (MPTCP) support concurrent transmission of data on multiple subflows in a load balancing scenario. Enhance advertising addresses via the RM_ADDR/ADD_ADDR options. - Support SMC-Dv2 version of SMC, which enables multi-subnet deployments. - Allow more calls to same peer in RxRPC. - Support two new Controller Area Network (CAN) protocols - CAN-FD and ISO 15765-2:2016. - Add xfrm/IPsec compat layer, solving the 32bit user space on 64bit kernel problem. - Add TC actions for implementing MPLS L2 VPNs. - Improve nexthop code - e.g. handle various corner cases when nexthop objects are removed from groups better, skip unnecessary notifications and make it easier to offload nexthops into HW by converting to a blocking notifier. - Support adding and consuming TCP header options by BPF programs, opening the doors for easy experimental and deployment-specific TCP option use. - Reorganize TCP congestion control (CC) initialization to simplify life of TCP CC implemented in BPF. - Add support for shipping BPF programs with the kernel and loading them early on boot via the User Mode Driver mechanism, hence reusing all the user space infra we have. - Support sleepable BPF programs, initially targeting LSM and tracing. - Add bpf_d_path() helper for returning full path for given 'struct path'. - Make bpf_tail_call compatible with bpf-to-bpf calls. - Allow BPF programs to call map_update_elem on sockmaps. - Add BPF Type Format (BTF) support for type and enum discovery, as well as support for using BTF within the kernel itself (current use is for pretty printing structures). - Support listing and getting information about bpf_links via the bpf syscall. - Enhance kernel interfaces around NIC firmware update. Allow specifying overwrite mask to control if settings etc. are reset during update; report expected max time operation may take to users; support firmware activation without machine reboot incl. limits of how much impact reset may have (e.g. dropping link or not). - Extend ethtool configuration interface to report IEEE-standard counters, to limit the need for per-vendor logic in user space. - Adopt or extend devlink use for debug, monitoring, fw update in many drivers (dsa loop, ice, ionic, sja1105, qed, mlxsw, mv88e6xxx, dpaa2-eth). - In mlxsw expose critical and emergency SFP module temperature alarms. Refactor port buffer handling to make the defaults more suitable and support setting these values explicitly via the DCBNL interface. - Add XDP support for Intel's igb driver. - Support offloading TC flower classification and filtering rules to mscc_ocelot switches. - Add PTP support for Marvell Octeontx2 and PP2.2 hardware, as well as fixed interval period pulse generator and one-step timestamping in dpaa-eth. - Add support for various auth offloads in WiFi APs, e.g. SAE (WPA3) offload. - Add Lynx PHY/PCS MDIO module, and convert various drivers which have this HW to use it. Convert mvpp2 to split PCS. - Support Marvell Prestera 98DX3255 24-port switch ASICs, as well as 7-port Mediatek MT7531 IP. - Add initial support for QCA6390 and IPQ6018 in ath11k WiFi driver, and wcn3680 support in wcn36xx. - Improve performance for packets which don't require much offloads on recent Mellanox NICs by 20% by making multiple packets share a descriptor entry. - Move chelsio inline crypto drivers (for TLS and IPsec) from the crypto subtree to drivers/net. Move MDIO drivers out of the phy directory. - Clean up a lot of W=1 warnings, reportedly the actively developed subsections of networking drivers should now build W=1 warning free. - Make sure drivers don't use in_interrupt() to dynamically adapt their code. Convert tasklets to use new tasklet_setup API (sadly this conversion is not yet complete). * tag 'net-next-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2583 commits) Revert "bpfilter: Fix build error with CONFIG_BPFILTER_UMH" net, sockmap: Don't call bpf_prog_put() on NULL pointer bpf, selftest: Fix flaky tcp_hdr_options test when adding addr to lo bpf, sockmap: Add locking annotations to iterator netfilter: nftables: allow re-computing sctp CRC-32C in 'payload' statements net: fix pos incrementment in ipv6_route_seq_next net/smc: fix invalid return code in smcd_new_buf_create() net/smc: fix valid DMBE buffer sizes net/smc: fix use-after-free of delayed events bpfilter: Fix build error with CONFIG_BPFILTER_UMH cxgb4/ch_ipsec: Replace the module name to ch_ipsec from chcr net: sched: Fix suspicious RCU usage while accessing tcf_tunnel_info bpf: Fix register equivalence tracking. rxrpc: Fix loss of final ack on shutdown rxrpc: Fix bundle counting for exclusive connections netfilter: restore NF_INET_NUMHOOKS ibmveth: Identify ingress large send packets. ibmveth: Switch order of ibmveth_helper calls. cxgb4: handle 4-tuple PEDIT to NAT mode translation selftests: Add VRF route leaking tests ... commit 840e5bb326bbcb16ce82dd2416d2769de4839aea Merge: fefa636d81597 aa662fc04f5b2 Author: Linus Torvalds Date: Thu Oct 15 15:58:18 2020 -0700 Merge tag 'integrity-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity updates from Mimi Zohar: "Continuing IMA policy rule cleanup and validation in particular for measuring keys, adding/removing/updating informational and error messages (e.g. "ima_appraise" boot command line option), and other bug fixes (e.g. minimal data size validation before use, return code and NULL pointer checking)" * tag 'integrity-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: ima: Fix NULL pointer dereference in ima_file_hash evm: Check size of security.evm before using it ima: Remove semicolon at the end of ima_get_binary_runtime_size() ima: Don't ignore errors from crypto_shash_update() ima: Use kmemdup rather than kmalloc+memcpy integrity: include keyring name for unknown key request ima: limit secure boot feedback scope for appraise integrity: invalid kernel parameters feedback ima: add check for enforced appraise option integrity: Use current_uid() in integrity_audit_message() ima: Fail rule parsing when asymmetric key measurement isn't supportable ima: Pre-parse the list of keyrings in a KEY_CHECK rule commit fefa636d815975b34afc45f50852a2810fb23ba9 Merge: 2d0f6b0aab9af 6107742d15832 Author: Linus Torvalds Date: Thu Oct 15 15:51:28 2020 -0700 Merge tag 'trace-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "Updates for tracing and bootconfig: - Add support for "bool" type in synthetic events - Add per instance tracing for bootconfig - Support perf-style return probe ("SYMBOL%return") in kprobes and uprobes - Allow for kprobes to be enabled earlier in boot up - Added tracepoint helper function to allow testing if tracepoints are enabled in headers - Synthetic events can now have dynamic strings (variable length) - Various fixes and cleanups" * tag 'trace-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (58 commits) tracing: support "bool" type in synthetic trace events selftests/ftrace: Add test case for synthetic event syntax errors tracing: Handle synthetic event array field type checking correctly selftests/ftrace: Change synthetic event name for inter-event-combined test tracing: Add synthetic event error logging tracing: Check that the synthetic event and field names are legal tracing: Move is_good_name() from trace_probe.h to trace.h tracing: Don't show dynamic string internals in synthetic event description tracing: Fix some typos in comments tracing/boot: Add ftrace.instance.*.alloc_snapshot option tracing: Fix race in trace_open and buffer resize call tracing: Check return value of __create_val_fields() before using its result tracing: Fix synthetic print fmt check for use of __get_str() tracing: Remove a pointless assignment ftrace: ftrace_global_list is renamed to ftrace_ops_list ftrace: Format variable declarations of ftrace_allocate_records ftrace: Simplify the calculation of page number for ftrace_page->records ftrace: Simplify the dyn_ftrace->flags macro ftrace: Simplify the hash calculation ftrace: Use fls() to get the bits for dup_hash() ... commit 2d0f6b0aab9afbd6fdf3514cb4acc249d7aebf9c Merge: 7286d2a37eb95 626b901f60446 Author: Linus Torvalds Date: Thu Oct 15 15:48:06 2020 -0700 Merge tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull another Hyper-V update from Wei Liu: "One patch from Michael to get VMbus interrupt from ACPI DSDT" * tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: Drivers: hv: vmbus: Add parsing of VMbus interrupt in ACPI DSDT commit 7286d2a37eb955c5eeec2b042844f1c1b3ff0fe1 Merge: 578a7155c5a18 7ff3f14ddc355 Author: Linus Torvalds Date: Thu Oct 15 15:42:55 2020 -0700 Merge branch 'parisc-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: - Added fw_cfg support for parisc on qemu - Added font support in sti text console driver for byte- and word-mode ROMs - Switch to more fine grained lws locks and improve spinlock handling - Add ioread64_hi_lo() and iowrite64_hi_lo() to avoid 0-day linking errors - Mark pointers volatile in __xchg8(), __xchg32() and __xchg64() to help compiler - Header file cleanups, mostly removal of unused HP-UX compat defines - Drop one bit from our O_NONBLOCK define to become now 000200000 - Add MAP_UNINITIALIZED define to avoid userspace compile errors - Drop CONFIG_IDE from defconfigs - Speed up synchronize_caches() on UP machines - Rewrite tlb flush threshold calculation - Comment fixes and cleanups * 'parisc-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc/sticon: Add user font support parisc/sticon: Always register sticon console driver parisc: Add MAP_UNINITIALIZED define parisc: Improve spinlock handling parisc: Install vmlinuz instead of zImage file parisc: Rewrite tlb flush threshold calculation parisc: Switch to more fine grained lws locks parisc: Mark pointers volatile in __xchg8(), __xchg32() and __xchg64() parisc: Fix comments and enable interrupts later parisc: Add alternative patching to synchronize_caches define parisc: Add ioread64_hi_lo() and iowrite64_hi_lo() parisc: disable CONFIG_IDE in defconfigs parisc: Drop useless comments in uapi/asm/signal.h parisc: Define O_NONBLOCK to become 000200000 parisc: Drop HP-UX specific fcntl and signal flags parisc: Avoid external interrupts when IPI finishes parisc: Add qemu fw_cfg interface fw_cfg: Add support for parisc architecture commit 578a7155c5a1894a789d4ece181abf9d25dc6b0d Merge: 0674324b16d40 1abdd39f14b25 Author: Linus Torvalds Date: Thu Oct 15 15:17:06 2020 -0700 Merge tag 'linux-kselftest-kunit-fixes-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kunit updates from Shuah Khan: "Several kunit tool bug fixes in flag handling, run outside kernel tree, make errors, and generating results" * tag 'linux-kselftest-kunit-fixes-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: tool: fix display of make errors kunit: tool: handle when .kunit exists but .kunitconfig does not kunit: tool: fix --alltests flag kunit: tool: allow generating test results in JSON kunit: tool: fix running kunit_tool from outside kernel tree commit 0674324b16d40e14b9d8ea2d667627c010608c28 Merge: bbf6259903717 4c8511317b4ec Author: Linus Torvalds Date: Thu Oct 15 15:14:32 2020 -0700 Merge tag 'linux-kselftest-next-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: - speed up headers_install done during selftest build - add generic make nesting support - add support to select individual tests: Selftests build/install generates run_kselftest.sh script to run selftests on a target system. Currently the script doesn't have support for selecting individual tests. Add support for it. With this enhancement, user can select test collections (or tests) individually. e.g: run_kselftest.sh -c seccomp -t timers:posix_timers -t timers:nanosleep Additionally adds a way to list all known tests with "-l", usage with "-h", and perform a dry run without running tests with "-n". * tag 'linux-kselftest-next-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: doc: dev-tools: kselftest.rst: Update examples and paths selftests/run_kselftest.sh: Make each test individually selectable selftests: Extract run_kselftest.sh and generate stand-alone test list selftests: Add missing gitignore entries selftests: more general make nesting support selftests: use "$(MAKE)" instead of "make" for headers_install commit bbf625990371782370f6eacb3155dc1fe131ddfc Merge: bf36c6b946c88 2a9b29b289833 Author: Linus Torvalds Date: Thu Oct 15 15:11:56 2020 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial updates from Jiri Kosina: "The latest advances in computer science from the trivial queue" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: xtensa: fix Kconfig typo spelling.txt: Remove some duplicate entries mtd: rawnand: oxnas: cleanup/simplify code selftests: vm: add fragment CONFIG_GUP_BENCHMARK perf: Fix opt help text for --no-bpf-event HID: logitech-dj: Fix spelling in comment bootconfig: Fix kernel message mentioning CONFIG_BOOT_CONFIG MAINTAINERS: rectify MMP SUPPORT after moving cputype.h scif: Fix spelling of EACCES printk: fix global comment lib/bitmap.c: fix spello fs: Fix missing 'bit' in comment commit bf36c6b946c8895cf590f10dbd70b589b0dc101f Merge: 0cd7d9795fa82 3504e85cd8b1d Author: Linus Torvalds Date: Thu Oct 15 15:09:12 2020 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - Lenovo X1 Tablet support improvements from Mikael Wikström - "heartbeat" report fix for several Wacom devices from Jason Gerecke - bounds checking fix in hid-roccat from Dan Carpenter - stylus battery reporting fix from Dmitry Torokhov - i2c-hid support for wakeup from suspend-to-idle from Kai-Heng Feng - new driver for Vivaldi devices from Sean O'Brien - other assorted small fixes and device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: i2c-hid: Enable wakeup capability from Suspend-to-Idle HID: add vivaldi HID driver HID: hid-input: fix stylus battery reporting HID: wacom: Avoid entering wacom_wac_pen_report for pad / battery HID: i2c-hid: fix kerneldoc warnings in i2c-hid-core.c HID: core: fix kerneldoc warnings in hid-core.c HID: multitouch: Lenovo X1 Tablet Gen2 trackpoint and buttons HID: multitouch: Lenovo X1 Tablet Gen3 trackpoint and buttons HID: alps: clean up indentation issue HID: intel-ish-hid: simplify the return expression of ishtp_bus_remove_device() HID: hid-debug: fix nonblocking read semantics wrt EIO/ERESTARTSYS HID: i2c-hid: Prefer asynchronous probe HID: ite: Add USB id match for Acer One S1003 keyboard dock HID: roccat: add bounds checking in kone_sysfs_write_settings() HID: wiimote: narrow spinlock range in wiimote_hid_event() HID: wiimote: make handlers[] const HID: apple: Add support for Matias wireless keyboard HID: cp2112: Use irqchip template commit 0cd7d9795fa82226e7516d38b474bddae8b1ff26 Merge: 4a165feba2654 884ee754f5aed Author: Linus Torvalds Date: Thu Oct 15 15:07:57 2020 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching update from Jiri Kosina: "livepatching kselftest output fix from Miroslav Benes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: selftests/livepatch: Do not check order when using "comm" for dmesg checking commit 4a165feba26547d2aa84a6efc494f3f2729f35b5 Merge: b77a69b81c2fd 41b21af388f94 Author: Linus Torvalds Date: Thu Oct 15 15:03:10 2020 -0700 Merge tag 'dio_for_v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull direct-io fix from Jan Kara: "Fix for unaligned direct IO read past EOF in legacy DIO code" * tag 'dio_for_v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: direct-io: defer alignment check until after the EOF check direct-io: don't force writeback for reads beyond EOF direct-io: clean up error paths of do_blockdev_direct_IO commit b77a69b81c2fd11ac2eed31a5789b35d7f728a41 Merge: ca5387e448e1f c2bb80b8bdd04 Author: Linus Torvalds Date: Thu Oct 15 14:56:15 2020 -0700 Merge tag 'fs_for_v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull UDF, reiserfs, ext2, quota fixes from Jan Kara: - a couple of UDF fixes for issues found by syzbot fuzzing - a couple of reiserfs fixes for issues found by syzbot fuzzing - some minor ext2 cleanups - quota patches to support grace times beyond year 2038 for XFS quota APIs * tag 'fs_for_v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: reiserfs: Fix oops during mount udf: Limit sparing table size udf: Remove pointless union in udf_inode_info udf: Avoid accessing uninitialized data on failed inode read quota: clear padding in v2r1_mem2diskdqb() reiserfs: Initialize inode keys properly udf: Fix memory leak when mounting udf: Remove redundant initialization of variable ret reiserfs: only call unlock_new_inode() if I_NEW ext2: Fix some kernel-doc warnings in balloc.c quota: Expand comment describing d_itimer quota: widen timestamps for the fs_disk_quota structure reiserfs: Fix memory leak in reiserfs_parse_options() udf: Use kvzalloc() in udf_sb_alloc_bitmap() ext2: remove duplicate include commit ca5387e448e1f88440dc93e143b353592f8a8af6 Merge: 5a32c3413d334 76ecfcb0852eb Author: Linus Torvalds Date: Thu Oct 15 14:52:45 2020 -0700 Merge tag 'configfs-5.10' of git://git.infradead.org/users/hch/configfs Pull configfs updates from Christoph Hellwig: "Various cleanups for the configfs samples (Bartosz Golaszewski)" * tag 'configfs-5.10' of git://git.infradead.org/users/hch/configfs: samples: configfs: prefer pr_err() over bare printk(KERN_ERR samples: configfs: don't use spaces before tabs samples: configfs: consolidate local variables of the same type samples: configfs: don't reinitialize variables which are already zeroed samples: configfs: replace simple_strtoul() with kstrtoint() samples: configfs: fix alignment in item struct samples: configfs: drop unnecessary ternary operators samples: configfs: remove redundant newlines MAINTAINERS: add the sample directory to the configfs entry commit 5a32c3413d3340f90c82c84b375ad4b335a59f28 Merge: f065199d4df0b 2a410d09417b5 Author: Linus Torvalds Date: Thu Oct 15 14:43:29 2020 -0700 Merge tag 'dma-mapping-5.10' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - rework the non-coherent DMA allocator - move private definitions out of - lower CMA_ALIGNMENT (Paul Cercueil) - remove the omap1 dma address translation in favor of the common code - make dma-direct aware of multiple dma offset ranges (Jim Quinlan) - support per-node DMA CMA areas (Barry Song) - increase the default seg boundary limit (Nicolin Chen) - misc fixes (Robin Murphy, Thomas Tai, Xu Wang) - various cleanups * tag 'dma-mapping-5.10' of git://git.infradead.org/users/hch/dma-mapping: (63 commits) ARM/ixp4xx: add a missing include of dma-map-ops.h dma-direct: simplify the DMA_ATTR_NO_KERNEL_MAPPING handling dma-direct: factor out a dma_direct_alloc_from_pool helper dma-direct check for highmem pages in dma_direct_alloc_pages dma-mapping: merge into dma-mapping: move large parts of to kernel/dma dma-mapping: move dma-debug.h to kernel/dma/ dma-mapping: remove dma-mapping: merge into dma-contiguous: remove dma_contiguous_set_default dma-contiguous: remove dev_set_cma_area dma-contiguous: remove dma_declare_contiguous dma-mapping: split cma: decrease CMA_ALIGNMENT lower limit to 2 firewire-ohci: use dma_alloc_pages dma-iommu: implement ->alloc_noncoherent dma-mapping: add new {alloc,free}_noncoherent dma_map_ops methods dma-mapping: add a new dma_alloc_pages API dma-mapping: remove dma_cache_sync 53c700: convert to dma_alloc_noncoherent ... commit f065199d4df0b1512f935621d2de128ddb3fcc3a Merge: c48b75b7271db fc143e38ddd47 Author: Linus Torvalds Date: Thu Oct 15 14:33:52 2020 -0700 Merge tag 'dmaengine-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "Core: - Mark dma_request_slave_channel() deprecated in favour of dma_request_chan() - subsystem conversion for tasklet_setup() API - subsystem removal of local dma_parms for arm drivers Also updates to bunch of driver notably TI, DW and AXI-DMAC" * tag 'dmaengine-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (104 commits) dmaengine: owl-dma: fix kernel-doc style for enum dmaengine: zynqmp_dma: fix kernel-doc style for tasklet dmaengine: xilinx_dma: fix kernel-doc style for tasklet dmaengine: qcom: bam_dma: fix kernel-doc style for tasklet dmaengine: altera-msgdma: fix kernel-doc style for tasklet dmaengine: xilinx: dpdma: convert tasklets to use new tasklet_setup() API dmaengine: sf-pdma: convert tasklets to use new tasklet_setup() API dt-bindings: Fix 'reg' size issues in zynqmp examples dmaengine: rcar-dmac: drop double zeroing dmaengine: sh: drop double zeroing dmaengine: ioat: Allocate correct size for descriptor chunk dmaengine: ti: k3-udma: use devm_platform_ioremap_resource_byname dmaengine: fsl: remove bad channel update dmaengine: dma-jz4780: Fix race in jz4780_dma_tx_status dmaengine: pl330: fix argument for tasklet dmaengine: dmatest: Return boolean result directly in filter() dmaengine: dmatest: Check list for emptiness before access its last entry dmaengine: ti: k3-udma-glue: fix channel enable functions dmaengine: iop-adma: Fix pointer cast warnings dmaengine: dw-edma: Fix Using plain integer as NULL pointer in dw-edma-v0-debugfs.c ... commit 893a7cfb6b0bea650fafa43838d7f7f8f0f076bc Author: Marc Zyngier Date: Thu Oct 15 22:26:26 2020 +0100 irqchip/mst: Make mst_intc_of_init static mst_intc_of_init has no external caller, so let's make it static. Reported-by: kernel test robot Signed-off-by: Marc Zyngier commit 61b0648d569aca932eab87a67f7ca0ffd3ea2b68 Author: Geert Uytterhoeven Date: Wed Oct 14 15:17:03 2020 +0200 irqchip/mst: MST_IRQ should depend on ARCH_MEDIATEK or ARCH_MSTARV7 The MStar interrupt controller is only found on MStar, SigmaStar, and Mediatek SoCs. Hence add dependencies on ARCH_MEDIATEK and ARCH_MSTARV7, to prevent asking the user about the MStar interrupt controller driver when configuring a kernel without support for MStar, SigmaStar, and Mediatek SoCs. Fixes: ad4c938c92af9130 ("irqchip/irq-mst: Add MStar interrupt controller support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier Acked-by: Daniel Palmer Link: https://lore.kernel.org/r/20201014131703.18021-1-geert+renesas@glider.be commit 151a535171be6ff824a0a3875553ea38570f4c05 Author: Marc Zyngier Date: Thu Oct 15 21:41:44 2020 +0100 genirq: Let GENERIC_IRQ_IPI select IRQ_DOMAIN_HIERARCHY kernel/irq/ipi.c otherwise fails to compile if nothing else selects it. Fixes: 379b656446a3 ("genirq: Add GENERIC_IRQ_IPI Kconfig symbol") Reported-by: Pavel Machek Tested-by: Pavel Machek Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201015101222.GA32747@amd commit 82c2d81361ecd142a54e84a9da1e287113314a4f Author: Sumera Priyadarsini Date: Thu Oct 15 16:21:40 2020 +0530 coccinelle: iterators: Add for_each_child.cocci script While iterating over child nodes with the for_each functions, if control is transferred from the middle of the loop, as in the case of a break or return or goto, there is no decrement in the reference counter thus ultimately resulting in a memory leak. Add this script to detect potential memory leaks caused by the absence of of_node_put() before break, goto, or, return statements which transfer control outside the loop. Signed-off-by: Sumera Priyadarsini Signed-off-by: Julia Lawall commit 105faa8742437c28815b2a3eb8314ebc5fd9288c Merge: 2295cddf99e3f 83c11c17553c0 Author: Jakub Kicinski Date: Thu Oct 15 12:45:00 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2020-10-15 The main changes are: 1) Fix register equivalence tracking in verifier, from Alexei Starovoitov. 2) Fix sockmap error path to not call bpf_prog_put() with NULL, from Alex Dewar. 3) Fix sockmap to add locking annotations to iterator, from Lorenz Bauer. 4) Fix tcp_hdr_options test to use loopback address, from Martin KaFai Lau. ==================== Signed-off-by: Jakub Kicinski commit 2295cddf99e3f7c2be2b1160e2f5e53cc35b09be Merge: 346e320cb2103 2ecbc1f684482 Author: Jakub Kicinski Date: Thu Oct 15 12:43:21 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Minor conflicts in net/mptcp/protocol.h and tools/testing/selftests/net/Makefile. In both cases code was added on both sides in the same place so just keep both. Signed-off-by: Jakub Kicinski commit 7007fab4ae82c092cb52691c338f1b776005e32b Author: Geert Uytterhoeven Date: Wed Oct 14 15:14:15 2020 +0200 power: reset: POWER_RESET_OCELOT_RESET should depend on Ocelot or Sparx5 To add support for Sparx5, the dependency on MSCC_OCELOT was removed. However, this increases exposure of the driver question not only to Sparx5 platforms, but to everyone. Hence re-add the dependency on MSCC_OCELOT, and extend it with ARCH_SPARX5, to prevent asking the user about this driver when configuring a kernel without Ocelot and Sparx5 support. Fixes: ec871696b7776767 ("power: reset: ocelot: Add support for Sparx5") Signed-off-by: Geert Uytterhoeven Signed-off-by: Sebastian Reichel commit 2ecbc1f684482b4ed52447a39903bd9b0f222898 Author: Jakub Kicinski Date: Thu Oct 15 12:33:24 2020 -0700 Revert "bpfilter: Fix build error with CONFIG_BPFILTER_UMH" This reverts commit 1d273fcc2c29343e59658276b77b02e5897a3123. Alexei points out there's nothing implying headers will be built and therefore exist under usr/include, so this fix doesn't make much sense. Signed-off-by: Jakub Kicinski commit 83c11c17553c0fca217105c17444c4ef5ab2403f Author: Alex Dewar Date: Mon Oct 12 18:09:53 2020 +0100 net, sockmap: Don't call bpf_prog_put() on NULL pointer If bpf_prog_inc_not_zero() fails for skb_parser, then bpf_prog_put() is called unconditionally on skb_verdict, even though it may be NULL. Fix and tidy up error path. Fixes: 743df8b7749f ("bpf, sockmap: Check skb_verdict and skb_parser programs explicitly") Addresses-Coverity-ID: 1497799: Null pointer dereferences (FORWARD_NULL) Signed-off-by: Alex Dewar Signed-off-by: Daniel Borkmann Acked-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20201012170952.60750-1-alex.dewar90@gmail.com commit 8a3feed90e75283f15f830b1051bf048e4127c91 Author: Martin KaFai Lau Date: Mon Oct 12 16:49:40 2020 -0700 bpf, selftest: Fix flaky tcp_hdr_options test when adding addr to lo The tcp_hdr_options test adds a "::eB9F" addr to the lo dev. However, this non loopback address will have a race on ipv6 dad which may lead to EADDRNOTAVAIL error from time to time. Even nodad is used in the iproute2 command, there is still a race in when the route will be added. This will then lead to ENETUNREACH from time to time. To avoid the above, this patch uses the default loopback address "::1" to do the test. Fixes: ad2f8eb0095e ("bpf: selftests: Tcp header options") Reported-by: Andrii Nakryiko Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201012234940.1707941-1-kafai@fb.com commit f58423aeab28f861b67933206f322f764f05787d Author: Lorenz Bauer Date: Mon Oct 12 11:18:50 2020 +0200 bpf, sockmap: Add locking annotations to iterator The sparse checker currently outputs the following warnings: include/linux/rcupdate.h:632:9: sparse: sparse: context imbalance in 'sock_hash_seq_start' - wrong count at exit include/linux/rcupdate.h:632:9: sparse: sparse: context imbalance in 'sock_map_seq_start' - wrong count at exit Add the necessary __acquires and __release annotations to make the iterator locking schema palatable to sparse. Also add __must_hold for good measure. The kernel codebase uses both __acquires(rcu) and __acquires(RCU). I couldn't find any guidance which one is preferred, so I used what is easier to type out. Fixes: 0365351524d7 ("net: Allow iterating sockmap and sockhash") Reported-by: kernel test robot Signed-off-by: Lorenz Bauer Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20201012091850.67452-1-lmb@cloudflare.com commit 3504e85cd8b1d18005f1867aa2a72bd48bd472fd Merge: 9b14b066796d0 203c38fbe833a Author: Jiri Kosina Date: Thu Oct 15 20:46:23 2020 +0200 Merge branch 'for-5.10/i2c-hid' into for-linus - i2c-hid support for wakeup from suspend-to-idle commit 203c38fbe833abb47212db77004c05793b7220a3 Author: Kai-Heng Feng Date: Thu Jul 9 15:57:29 2020 +0800 HID: i2c-hid: Enable wakeup capability from Suspend-to-Idle Many laptops can be woken up from Suspend-to-Idle by touchpad. This is also the default behavior on other OSes. However, if touchpad and touchscreen contact to each other when lid is closed, wakeup events can be triggered inadventertly. So let's disable the wakeup by default, but enable the wakeup capability so users can enable it at their own discretion. Signed-off-by: Kai-Heng Feng Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit 159246378d8483ba63844fc03027df70501552c1 Author: Diana Craciun Date: Thu Oct 15 21:14:17 2020 +0300 vfio/fsl-mc: Fix the dead code in vfio_fsl_mc_set_irq_trigger Static analysis discovered that some code in vfio_fsl_mc_set_irq_trigger is dead code. Fixed the code by changing the conditions order. Fixes: cc0ee20bd969 ("vfio/fsl-mc: trigger an interrupt via eventfd") Reported-by: Colin Ian King Signed-off-by: Diana Craciun Signed-off-by: Alex Williamson commit 346e320cb2103edef709c4466a29140c4a8e527a Author: Davide Caratti Date: Thu Oct 15 18:39:27 2020 +0200 netfilter: nftables: allow re-computing sctp CRC-32C in 'payload' statements nftables payload statements are used to mangle SCTP headers, but they can only replace the Internet Checksum. As a consequence, nftables rules that mangle sport/dport/vtag in SCTP headers potentially generate packets that are discarded by the receiver, unless the CRC-32C is "offloaded" (e.g the rule mangles a skb having 'ip_summed' equal to 'CHECKSUM_PARTIAL'. Fix this extending uAPI definitions and L4 checksum update function, in a way that userspace programs (e.g. nft) can instruct the kernel to compute CRC-32C in SCTP headers. Also ensure that LIBCRC32C is built if NF_TABLES is 'y' or 'm' in the kernel build configuration. Signed-off-by: Davide Caratti Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Jakub Kicinski commit 9b14b066796d0e8bd05f200f30cb4222f8c0f9f1 Merge: 146f9d9189b15 505f394fa239c Author: Jiri Kosina Date: Thu Oct 15 20:41:43 2020 +0200 Merge branch 'for-5.9/upstream-fixes' into for-linus - "heartbeat" report fix for several Wacom devices - Lenovo X1 Tablet support improvements - new device IDs - bounds checking fix in hid-roccat - stylus battery reporting fix commit 146f9d9189b153c3132429578554f3a7896081fc Merge: df975502e5b79 5eae59cc876c8 Author: Jiri Kosina Date: Thu Oct 15 20:41:00 2020 +0200 Merge branch 'for-5.10/wiimote' into for-linus - code cleanups for hid-wiimote commit df975502e5b793d40e094df8c8b1252f6b28a554 Merge: d61a5d6314555 14c9c014babed Author: Jiri Kosina Date: Thu Oct 15 20:40:02 2020 +0200 Merge branch 'for-5.10/vivaldi' into for-linus - driver for Vivaldi devices (keyboards which provide vendor-defined (Google) usages in their descriptor) commit d61a5d631455544d080050916db05ef66eca187e Merge: 1341c58615e91 36725cb091c51 Author: Jiri Kosina Date: Thu Oct 15 20:39:41 2020 +0200 Merge branch 'for-5.10/intel-ish-hid' into for-linus - intel-ish-hid code cleanup commit 1341c58615e914d500fe0354b7212f7b188397d7 Merge: 1142a12ca90cc eafb2203626ae Author: Jiri Kosina Date: Thu Oct 15 20:39:08 2020 +0200 Merge branch 'for-5.10/i2c-hid' into for-linus - prefer async probing in i2c-hid even if built-in commit 1142a12ca90cce0fb2be26092be5df832f40fc9c Merge: 62b31a045757e 6bfa31756ae90 Author: Jiri Kosina Date: Thu Oct 15 20:38:07 2020 +0200 Merge branch 'for-5.10/cp2112' into for-linus - make cp2112 driver use irqchip template properly commit 62b31a045757eac81fed94b19df47418a0818528 Merge: cc51d171776f3 c27e08820bc6c Author: Jiri Kosina Date: Thu Oct 15 20:37:01 2020 +0200 Merge branch 'for-5.10/core' into for-linus - nonblocking read semantics fix for hid-debug commit cc51d171776f3a6acb6828bad0b780a4cacf5423 Merge: 35556bed836f8 4c9454267e019 Author: Jiri Kosina Date: Thu Oct 15 20:35:46 2020 +0200 Merge branch 'for-5.10/apple' into for-linus - support for Matias wireless (identifies itself as ISO RevB Alu) commit 7b84b665c874f60d84547635341e418f20cbbab2 Author: Matthew Wilcox (Oracle) Date: Sat Oct 3 03:55:23 2020 +0100 fs: Allow a NULL pos pointer to __kernel_read Match the behaviour of new_sync_read() and __kernel_write(). Reviewed-by: Christoph Hellwig Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Al Viro commit 4c207ef48269377236cd38979197c5e1631c8c16 Author: Matthew Wilcox (Oracle) Date: Sat Oct 3 03:55:22 2020 +0100 fs: Allow a NULL pos pointer to __kernel_write Linus prefers that callers be allowed to pass in a NULL pointer for ppos like new_sync_write(). Reviewed-by: Christoph Hellwig Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Al Viro commit 54086c5a7f159749bc521706bae329cbce3971e9 Merge: 0ec78cdb1ab1a ddc7834af8d56 Author: Jakub Kicinski Date: Thu Oct 15 11:19:26 2020 -0700 Merge tag 'rxrpc-next-20201015' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc fixes Here are a couple of fixes that need to be applied on top of rxrpc patches in net-next: (1) Fix a bug in the connection bundle changes in the net-next tree. (2) Fix the loss of final ACK on socket shutdown. ==================== Signed-off-by: Jakub Kicinski commit c48b75b7271db23c1b2d1204d6e8496d91f27711 Merge: 93b694d096cc1 ce1558c285f9a Author: Linus Torvalds Date: Thu Oct 15 11:07:44 2020 -0700 Merge tag 'sound-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "The amount of changes is smaller at this round (what a surprise), but lots of activity is seen. Most of changes are about ASoC driver development, especially Intel platforms. Here are some highlights: General: - Replace all tasklet usages with other alternatives - Cleanup of the ASoC error unwinding code - Fixes for trivial issues caught by static checker - Spell fixes allover the places ALSA Core: - Lockdep fix for control devices - Fix for potential OSS sequencer mutex stalls HD-audio and USB-audio: - SoundBlaster AE-7 support - Changes in quirk table for the rename handling - Quirks for HP and ASUS machines, Pioneer DJ DJM-250MK2. ASoC: - Lots of updates for Intel SOF and SoundWire enablement - Replacement of the DSP driver for some older x86 systems; the new code was written from scratch, better maintenance expected - Helpers for parsing auxiluary devices from the device tree - New support for AllWinner A64, Cirrus Logic CS4234, Mediatek MT6359 Microchip S/PDIF TX and RX controllers, Realtek RT1015P, and Texas Instruments J721E, TAS2110, TAS2564 and TAS2764" * tag 'sound-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (498 commits) ALSA: hda/hdmi: fix incorrect locking in hdmi_pcm_close ALSA: hda: fix jack detection with Realtek codecs when in D3 ALSA: fireworks: use semicolons rather than commas to separate statements ALSA: hda: use semicolons rather than commas to separate statements ALSA: hda/i915 - fix list corruption with concurrent probes ASoC: dmaengine: Document support for TX only or RX only streams ASoC: mchp-spdiftx: remove 'TX' from playback stream name ASoC: ti: davinci-mcasp: Use &pdev->dev for early dev_warn ASoC: tas2764: Add the driver for the TAS2764 dt-bindings: tas2764: Add the TAS2764 binding doc ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled ASoC: stm32: dfsdm: add actual resolution trace ASoC: stm32: dfsdm: change rate limits ASoC: qcom: sc7180: Add support for audio over DP Asoc: qcom: lpass-platform : Increase buffer size ASoC: qcom: Add support for lpass hdmi driver Asoc: qcom: lpass:Update lpaif_dmactl members order Asoc:qcom:lpass-cpu:Update dts property read API ASoC: dt-bindings: Add dt binding for lpass hdmi ... commit 93b694d096cc10994c817730d4d50288f9ae3d66 Merge: 726eb70e0d34d 640eee067d9aa Author: Linus Torvalds Date: Thu Oct 15 10:46:16 2020 -0700 Merge tag 'drm-next-2020-10-15' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "Not a major amount of change, the i915 trees got split into display and gt trees to better facilitate higher level review, and there's a major refactoring of i915 GEM locking to use more core kernel concepts (like ww-mutexes). msm gets per-process pagetables, older AMD SI cards get DC support, nouveau got a bump in displayport support with common code extraction from i915. Outside of drm this contains a couple of patches for hexint moduleparams which you've acked, and a virtio common code tree that you should also get via it's regular path. New driver: - Cadence MHDP8546 DisplayPort bridge driver core: - cross-driver scatterlist cleanups - devm_drm conversions - remove drm_dev_init - devm_drm_dev_alloc conversion ttm: - lots of refactoring and cleanups bridges: - chained bridge support in more drivers panel: - misc new panels scheduler: - cleanup priority levels displayport: - refactor i915 code into helpers for nouveau i915: - split into display and GT trees - WW locking refactoring in GEM - execbuf2 extension mechanism - syncobj timeline support - GEN 12 HOBL display powersaving - Rocket Lake display additions - Disable FBC on Tigerlake - Tigerlake Type-C + DP improvements - Hotplug interrupt refactoring amdgpu: - Sienna Cichlid updates - Navy Flounder updates - DCE6 (SI) support for DC - Plane rotation enabled - TMZ state info ioctl - PCIe DPC recovery support - DC interrupt handling refactor - OLED panel fixes amdkfd: - add SMI events for thermal throttling - SMI interface events ioctl update - process eviction counters radeon: - move to dma_ for allocations - expose sclk via sysfs msm: - DSI support for sm8150/sm8250 - per-process GPU pagetable support - Displayport support mediatek: - move HDMI phy driver to PHY - convert mtk-dpi to bridge API - disable mt2701 tmds tegra: - bridge support exynos: - misc cleanups vc4: - dual display cleanups ast: - cleanups gma500: - conversion to GPIOd API hisilicon: - misc reworks ingenic: - clock handling and format improvements mcde: - DSI support mgag200: - desktop g200 support mxsfb: - i.MX7 + i.MX8M - alpha plane support panfrost: - devfreq support - amlogic SoC support ps8640: - EDID from eDP retrieval tidss: - AM65xx YUV workaround virtio: - virtio-gpu exported resources rcar-du: - R8A7742, R8A774E1 and R8A77961 support - YUV planar format fixes - non-visible plane handling - VSP device reference count fix - Kconfig fix to avoid displaying disabled options in .config" * tag 'drm-next-2020-10-15' of git://anongit.freedesktop.org/drm/drm: (1494 commits) drm/ingenic: Fix bad revert drm/amdgpu: Fix invalid number of character '{' in amdgpu_acpi_init drm/amdgpu: Remove warning for virtual_display drm/amdgpu: kfd_initialized can be static drm/amd/pm: setup APU dpm clock table in SMU HW initialization drm/amdgpu: prevent spurious warning drm/amdgpu/swsmu: fix ARC build errors drm/amd/display: Fix OPTC_DATA_FORMAT programming drm/amd/display: Don't allow pstate if no support in blank drm/panfrost: increase readl_relaxed_poll_timeout values MAINTAINERS: Update entry for st7703 driver after the rename Revert "gpu/drm: ingenic: Add option to mmap GEM buffers cached" drm/amd/display: HDMI remote sink need mode validation for Linux drm/amd/display: Change to correct unit on audio rate drm/amd/display: Avoid set zero in the requested clk drm/amdgpu: align frag_end to covered address space drm/amdgpu: fix NULL pointer dereference for Renoir drm/vmwgfx: fix regression in thp code due to ttm init refactor. drm/amdgpu/swsmu: add interrupt work handler for smu11 parts drm/amdgpu/swsmu: add interrupt work function ... commit 094eca37193c516106ef8ed7f60ed058ed9fc458 Author: Trond Myklebust Date: Wed Oct 14 15:22:11 2020 -0400 NFSv4: Fix up RCU annotations for struct nfs_netns_client The identifier is read as an RCU protected string. Its value may be changed during the lifetime of the network namespace by writing a new string into the sysfs pseudofile (at which point, we free the old string only after a call to synchronize_rcu()). Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 6617dfd440149e42ce4d2be615eb31a4755f4d30 Author: Yonghong Song Date: Wed Oct 14 07:46:12 2020 -0700 net: fix pos incrementment in ipv6_route_seq_next Commit 4fc427e05158 ("ipv6_route_seq_next should increase position index") tried to fix the issue where seq_file pos is not increased if a NULL element is returned with seq_ops->next(). See bug https://bugzilla.kernel.org/show_bug.cgi?id=206283 The commit effectively does: - increase pos for all seq_ops->start() - increase pos for all seq_ops->next() For ipv6_route, increasing pos for all seq_ops->next() is correct. But increasing pos for seq_ops->start() is not correct since pos is used to determine how many items to skip during seq_ops->start(): iter->skip = *pos; seq_ops->start() just fetches the *current* pos item. The item can be skipped only after seq_ops->show() which essentially is the beginning of seq_ops->next(). For example, I have 7 ipv6 route entries, root@arch-fb-vm1:~/net-next dd if=/proc/net/ipv6_route bs=4096 00000000000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000001 00000000 00000001 eth0 fe800000000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000001 00000000 00000001 eth0 00000000000000000000000000000000 00 00000000000000000000000000000000 00 00000000000000000000000000000000 ffffffff 00000001 00000000 00200200 lo 00000000000000000000000000000001 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000000 00000003 00000000 80200001 lo fe800000000000002050e3fffebd3be8 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000000 00000002 00000000 80200001 eth0 ff000000000000000000000000000000 08 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000004 00000000 00000001 eth0 00000000000000000000000000000000 00 00000000000000000000000000000000 00 00000000000000000000000000000000 ffffffff 00000001 00000000 00200200 lo 0+1 records in 0+1 records out 1050 bytes (1.0 kB, 1.0 KiB) copied, 0.00707908 s, 148 kB/s root@arch-fb-vm1:~/net-next In the above, I specify buffer size 4096, so all records can be returned to user space with a single trip to the kernel. If I use buffer size 128, since each record size is 149, internally kernel seq_read() will read 149 into its internal buffer and return the data to user space in two read() syscalls. Then user read() syscall will trigger next seq_ops->start(). Since the current implementation increased pos even for seq_ops->start(), it will skip record #2, #4 and #6, assuming the first record is #1. root@arch-fb-vm1:~/net-next dd if=/proc/net/ipv6_route bs=128 00000000000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000001 00000000 00000001 eth0 00000000000000000000000000000000 00 00000000000000000000000000000000 00 00000000000000000000000000000000 ffffffff 00000001 00000000 00200200 lo fe800000000000002050e3fffebd3be8 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000000 00000002 00000000 80200001 eth0 00000000000000000000000000000000 00 00000000000000000000000000000000 00 00000000000000000000000000000000 ffffffff 00000001 00000000 00200200 lo 4+1 records in 4+1 records out 600 bytes copied, 0.00127758 s, 470 kB/s To fix the problem, create a fake pos pointer so seq_ops->start() won't actually increase seq_file pos. With this fix, the above `dd` command with `bs=128` will show correct result. Fixes: 4fc427e05158 ("ipv6_route_seq_next should increase position index") Cc: Alexei Starovoitov Suggested-by: Vasily Averin Reviewed-by: Vasily Averin Signed-off-by: Yonghong Song Acked-by: Martin KaFai Lau Acked-by: Andrii Nakryiko Signed-off-by: Jakub Kicinski commit 726eb70e0d34dc4bc4dada71f52bba8ed638431e Merge: c6dbef7307629 f3277cbfba763 Author: Linus Torvalds Date: Thu Oct 15 10:01:51 2020 -0700 Merge tag 'char-misc-5.10-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 big set of char, misc, and other assorted driver subsystem patches for 5.10-rc1. There's a lot of different things in here, all over the drivers/ directory. Some summaries: - soundwire driver updates - habanalabs driver updates - extcon driver updates - nitro_enclaves new driver - fsl-mc driver and core updates - mhi core and bus updates - nvmem driver updates - eeprom driver updates - binder driver updates and fixes - vbox minor bugfixes - fsi driver updates - w1 driver updates - coresight driver updates - interconnect driver updates - misc driver updates - other minor driver updates All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (396 commits) binder: fix UAF when releasing todo list docs: w1: w1_therm: Fix broken xref, mistakes, clarify text misc: Kconfig: fix a HISI_HIKEY_USB dependency LSM: Fix type of id parameter in kernel_post_load_data prototype misc: Kconfig: add a new dependency for HISI_HIKEY_USB firmware_loader: fix a kernel-doc markup w1: w1_therm: make w1_poll_completion static binder: simplify the return expression of binder_mmap test_firmware: Test partial read support firmware: Add request_partial_firmware_into_buf() firmware: Store opt_flags in fw_priv fs/kernel_file_read: Add "offset" arg for partial reads IMA: Add support for file reads without contents LSM: Add "contents" flag to kernel_read_file hook module: Call security_kernel_post_load_data() firmware_loader: Use security_post_load_data() LSM: Introduce kernel_post_load_data() hook fs/kernel_read_file: Add file_size output argument fs/kernel_read_file: Switch buffer size arg to size_t fs/kernel_read_file: Remove redundant size argument ... commit 0c124aa5c48dc5d42962998e4489f286aceda2b7 Merge: 1d273fcc2c293 6b1bbf94ab369 Author: Jakub Kicinski Date: Thu Oct 15 09:54:45 2020 -0700 Merge branch 'net-smc-fixes-2020-10-14' Karsten Graul says: ==================== net/smc: fixes 2020-10-14 The first patch fixes a possible use-after-free of delayed llc events. Patch 2 corrects the number of DMB buffer sizes. And patch 3 ensures a correctly formatted return code when smc_ism_register_dmb() fails to create a new DMB. ==================== Link: https://lore.kernel.org/r/20201014174329.35791-1-kgraul@linux.ibm.com Signed-off-by: Jakub Kicinski commit 6b1bbf94ab369d97ed3bdaa561521a52c27ef619 Author: Karsten Graul Date: Wed Oct 14 19:43:29 2020 +0200 net/smc: fix invalid return code in smcd_new_buf_create() smc_ism_register_dmb() returns error codes set by the ISM driver which are not guaranteed to be negative or in the errno range. Such values would not be handled by ERR_PTR() and finally the return code will be used as a memory address. Fix that by using a valid negative errno value with ERR_PTR(). Fixes: 72b7f6c48708 ("net/smc: unique reason code for exceeded max dmb count") Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit ef12ad45880b696eb993d86c481ca891836ab593 Author: Karsten Graul Date: Wed Oct 14 19:43:28 2020 +0200 net/smc: fix valid DMBE buffer sizes The SMCD_DMBE_SIZES should include all valid DMBE buffer sizes, so the correct value is 6 which means 1MB. With 7 the registration of an ISM buffer would always fail because of the invalid size requested. Fix that and set the value to 6. Fixes: c6ba7c9ba43d ("net/smc: add base infrastructure for SMC-D and ISM") Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit d535ca1367787ddc8bff22d679a11f864c8228bc Author: Karsten Graul Date: Wed Oct 14 19:43:27 2020 +0200 net/smc: fix use-after-free of delayed events When a delayed event is enqueued then the event worker will send this event the next time it is running and no other flow is currently active. The event handler is called for the delayed event, and the pointer to the event keeps set in lgr->delayed_event. This pointer is cleared later in the processing by smc_llc_flow_start(). This can lead to a use-after-free condition when the processing does not reach smc_llc_flow_start(), but frees the event because of an error situation. Then the delayed_event pointer is still set but the event is freed. Fix this by always clearing the delayed event pointer when the event is provided to the event handler for processing, and remove the code to clear it in smc_llc_flow_start(). Fixes: 555da9af827d ("net/smc: add event-based llc_flow framework") Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit c6dbef7307629cce855aa6b482b60cbf7777ed88 Merge: ade7afe3e606f 93578a25d4e21 Author: Linus Torvalds Date: Thu Oct 15 09:51:18 2020 -0700 Merge tag 'usb-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY/Thunderbolt driver updates from Greg KH: "Here is the big set of USB, PHY, and Thunderbolt driver updates for 5.10-rc1. Lots of tiny different things for these subsystems are in here, including: - phy driver updates - thunderbolt / USB 4 updates and additions - USB gadget driver updates - xhci fixes and updates - typec driver additions and updates - api conversions to various drivers for core kernel api changes - new USB control message functions to make it harder to get wrong, as found by syzbot (took 2 tries to get it right) - lots of tiny USB driver fixes and updates all over the place All of these have been in linux-next for a while, with the exception of the last "obviously correct" patch that updated a FALLTHROUGH comment that got merged last weekend" * tag 'usb-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (374 commits) usb: musb: gadget: Use fallthrough pseudo-keyword usb: typec: Add QCOM PMIC typec detection driver USB: serial: option: add Cellient MPL200 card usb: typec: tcpci_maxim: Add support for Sink FRS usb: typec: tcpci: Implement callbacks for FRS usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS) usb: typec: tcpci_maxim: Chip level TCPC driver usb: typec: tcpci: Add set_vbus tcpci callback usb: typec: tcpci: Add a getter method to retrieve tcpm_port reference usbip: vhci_hcd: fix calling usb_hcd_giveback_urb() with irqs enabled usb: cdc-acm: add quirk to blacklist ETAS ES58X devices USB: serial: ftdi_sio: use cur_altsetting for consistency USB: serial: option: Add Telit FT980-KS composition USB: core: remove polling for /sys/kernel/debug/usb/devices usb: typec: add support for STUSB160x Type-C controller family usb: typec: add typec_find_pwr_opmode usb: typec: hd3ss3220: Use OF graph API to get the connector fwnode dt-bindings: usb: renesas,usb3-peri: Document HS and SS data bus dt-bindings: usb: convert ti,hd3ss3220 bindings to json-schema usb: dwc2: Fix INTR OUT transfers in DDMA mode. ... commit 407e9c63ee571f44a2dfb0828fc30daa02abb6dc Author: Darrick J. Wong Date: Thu Oct 15 09:21:17 2020 -0700 vfs: move the generic write and copy checks out of mm The generic write check helpers also don't have much to do with the page cache, so move them to the vfs. Signed-off-by: Darrick J. Wong commit 1b2c54d63cde7e8cf15aa6319aba168d81c7e364 Author: Darrick J. Wong Date: Wed Oct 14 16:38:47 2020 -0700 vfs: move the remap range helpers to remap_range.c Complete the migration by moving the file remapping helper functions out of read_write.c and into remap_range.c. This reduces the clutter in the first file and (eventually) will make it so that we can compile out the second file if it isn't needed. Signed-off-by: Darrick J. Wong commit ade7afe3e606f9f6ff0e6deefce140157f75540b Merge: 3e4fb4346c781 e1f13c879a7c2 Author: Linus Torvalds Date: Thu Oct 15 09:46:23 2020 -0700 Merge tag 'staging-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging / IIO driver updates from Greg KH: "Here is the large set of staging and IIO driver updates for 5.10-rc1. Included in here are: - new IIO drivers - new IIO driver frameworks - various IIO driver fixes and updates - IIO device tree conversions to yaml - so many minor staging driver coding style cleanups - most cdev driver moved out of staging - no staging drivers added or removed Full details are in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'staging-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (476 commits) staging: comedi: check validity of wMaxPacketSize of usb endpoints found staging: wfx: improve robustness of wfx_get_hw_rate() staging: wfx: drop unicode characters from strings staging: wfx: gpiod_get_value() can return an error staging: wfx: increase robustness of hif_generic_confirm() staging: wfx: wfx_init_common() returns NULL on error staging: wfx: standardize the error when vif does not exist staging: wfx: check memory allocation staging: wfx: improve error handling of hif_join() staging: dpaa2-switch: add a dpaa2_switch prefix to all functions in ethsw.c staging: dpaa2-switch: add a dpaa2_switch_ prefix to all functions in ethsw-ethtool.c staging: rtl8188eu: Fix long lines dt-bindings: staging: wfx: silabs,wfx yaml conversion staging: wfx: update copyrights dates staging: wfx: fix QoS priority for slow buses staging: wfx: fix BA sessions for older firmwares staging: wfx: remove remaining code of 'secure link' feature staging: wfx: fix handling of MMIC error staging: vchiq: Fix list_for_each exit tests staging: greybus: use __force when assigning __u8 value to snd_ctl_elem_type_t ... commit 1d273fcc2c29343e59658276b77b02e5897a3123 Author: YueHaibing Date: Wed Oct 14 17:17:49 2020 +0800 bpfilter: Fix build error with CONFIG_BPFILTER_UMH IF CONFIG_BPFILTER_UMH is set, building fails: In file included from /usr/include/sys/socket.h:33:0, from net/bpfilter/main.c:6: /usr/include/bits/socket.h:390:10: fatal error: asm/socket.h: No such file or directory #include ^~~~~~~~~~~~~~ compilation terminated. scripts/Makefile.userprogs:43: recipe for target 'net/bpfilter/main.o' failed make[2]: *** [net/bpfilter/main.o] Error 1 Add missing include path to fix this. Signed-off-by: YueHaibing Signed-off-by: Jakub Kicinski commit 0ec78cdb1ab1ab740ee23a260135471f259caf02 Author: Ayush Sawal Date: Wed Oct 14 15:38:06 2020 +0530 cxgb4/ch_ipsec: Replace the module name to ch_ipsec from chcr This patch changes the module name to "ch_ipsec" and prepends "ch_ipsec" string instead of "chcr" in all debug messages and function names. V1->V2: -Removed inline keyword from functions. -Removed CH_IPSEC prefix from pr_debug. -Used proper indentation for the continuation line of the function arguments. V2->V3: Fix the checkpatch.pl warnings. Fixes: 1b77be463929 ("crypto/chcr: Moving chelsio's inline ipsec functionality to /drivers/net") Signed-off-by: Ayush Sawal Signed-off-by: Jakub Kicinski commit d086a1c65aabb5a4e1edc580ca583e2964c62b44 Author: Leon Romanovsky Date: Wed Oct 14 11:56:42 2020 +0300 net: sched: Fix suspicious RCU usage while accessing tcf_tunnel_info The access of tcf_tunnel_info() produces the following splat, so fix it by dereferencing the tcf_tunnel_key_params pointer with marker that internal tcfa_liock is held. ============================= WARNING: suspicious RCU usage 5.9.0+ #1 Not tainted ----------------------------- include/net/tc_act/tc_tunnel_key.h:59 suspicious rcu_dereference_protected() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by tc/34839: #0: ffff88828572c2a0 (&p->tcfa_lock){+...}-{2:2}, at: tc_setup_flow_action+0xb3/0x48b5 stack backtrace: CPU: 1 PID: 34839 Comm: tc Not tainted 5.9.0+ #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x9a/0xd0 tc_setup_flow_action+0x14cb/0x48b5 fl_hw_replace_filter+0x347/0x690 [cls_flower] fl_change+0x2bad/0x4875 [cls_flower] tc_new_tfilter+0xf6f/0x1ba0 rtnetlink_rcv_msg+0x5f2/0x870 netlink_rcv_skb+0x124/0x350 netlink_unicast+0x433/0x700 netlink_sendmsg+0x6f1/0xbd0 sock_sendmsg+0xb0/0xe0 ____sys_sendmsg+0x4fa/0x6d0 ___sys_sendmsg+0x12e/0x1b0 __sys_sendmsg+0xa4/0x120 do_syscall_64+0x2d/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f1f8cd4fe57 Code: 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10 RSP: 002b:00007ffdc1e193b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f1f8cd4fe57 RDX: 0000000000000000 RSI: 00007ffdc1e19420 RDI: 0000000000000003 RBP: 000000005f85aafa R08: 0000000000000001 R09: 00007ffdc1e1936c R10: 000000000040522d R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000000 R14: 00007ffdc1e1d6f0 R15: 0000000000482420 Fixes: 3ebaf6da0716 ("net: sched: Do not assume RTNL is held in tunnel key action helpers") Fixes: 7a47281439ba ("net: sched: lock action when translating it to flow_action infra") Signed-off-by: Leon Romanovsky Acked-by: Cong Wang Signed-off-by: Jakub Kicinski commit 6107742d15832011cd0396d821f3225b52551f1f Author: Axel Rasmussen Date: Fri Oct 9 15:05:23 2020 -0700 tracing: support "bool" type in synthetic trace events It's common [1] to define tracepoint fields as "bool" when they contain a true / false value. Currently, defining a synthetic event with a "bool" field yields EINVAL. It's possible to work around this by using e.g. u8 (assuming sizeof(bool) is 1, and bool is unsigned; if either of these properties don't match, you get EINVAL [2]). Supporting "bool" explicitly makes hooking this up easier and more portable for userspace. [1]: grep -r "bool" include/trace/events/ [2]: check_synth_field() in kernel/trace/trace_events_hist.c Link: https://lkml.kernel.org/r/20201009220524.485102-2-axelrasmussen@google.com Acked-by: Michel Lespinasse Acked-by: David Rientjes Signed-off-by: Axel Rasmussen Signed-off-by: Steven Rostedt (VMware) commit 81ff92a93d954efa29e1d514934d6a47cd5f4558 Author: Tom Zanussi Date: Tue Oct 13 09:17:58 2020 -0500 selftests/ftrace: Add test case for synthetic event syntax errors Add a selftest that verifies that the syntax error messages and caret positions are correct for most of the possible synthetic event syntax error cases. Link: https://lkml.kernel.org/r/af611928ce79f86eaf0af8654f1d7802d5cc21ff.1602598160.git.zanussi@kernel.org Tested-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 10819e25799aae564005b6049a45e9808797b3bb Author: Tom Zanussi Date: Tue Oct 13 09:17:57 2020 -0500 tracing: Handle synthetic event array field type checking correctly Since synthetic event array types are derived from the field name, there may be a semicolon at the end of the type which should be stripped off. If there are more characters following that, normal type string checking will result in an invalid type. Without this patch, you can end up with an invalid field type string that gets displayed in both the synthetic event description and the event format: Before: # echo 'myevent char str[16]; int v' >> synthetic_events # cat synthetic_events myevent char[16]; str; int v name: myevent ID: 1936 format: field:unsigned short common_type; offset:0; size:2; signed:0; field:unsigned char common_flags; offset:2; size:1; signed:0; field:unsigned char common_preempt_count; offset:3; size:1; signed:0; field:int common_pid; offset:4; size:4; signed:1; field:char str[16];; offset:8; size:16; signed:1; field:int v; offset:40; size:4; signed:1; print fmt: "str=%s, v=%d", REC->str, REC->v After: # echo 'myevent char str[16]; int v' >> synthetic_events # cat synthetic_events myevent char[16] str; int v # cat events/synthetic/myevent/format name: myevent ID: 1936 format: field:unsigned short common_type; offset:0; size:2; signed:0; field:unsigned char common_flags; offset:2; size:1; signed:0; field:unsigned char common_preempt_count; offset:3; size:1; signed:0; field:int common_pid; offset:4; size:4; signed:1; field:char str[16]; offset:8; size:16; signed:1; field:int v; offset:40; size:4; signed:1; print fmt: "str=%s, v=%d", REC->str, REC->v Link: https://lkml.kernel.org/r/6587663b56c2d45ab9d8c8472a2110713cdec97d.1602598160.git.zanussi@kernel.org [ : wrote parse_synth_field() snippet. ] Fixes: 4b147936fa50 (tracing: Add support for 'synthetic' events) Reported-by: Masami Hiramatsu Tested-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 96378b2088faea68f1fb05ea6b9a566fc569a44c Author: Tom Zanussi Date: Tue Oct 13 09:17:56 2020 -0500 selftests/ftrace: Change synthetic event name for inter-event-combined test This test uses waking+wakeup_latency as an event name, which doesn't make sense since it includes an operator. Illegal names are now detected by the synthetic event command parsing, which causes this test to fail. Change the name to 'waking_plus_wakeup_latency' to prevent this. Link: https://lkml.kernel.org/r/a1ee2f76ff28ef7166fb788ca8be968887808920.1602598160.git.zanussi@kernel.org Fixes: f06eec4d0f2c (selftests: ftrace: Add inter-event hist triggers testcases) Acked-by: Masami Hiramatsu Tested-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit d4d704637d935ef5e588b0610b647376dd9f37d4 Author: Tom Zanussi Date: Tue Oct 13 09:17:55 2020 -0500 tracing: Add synthetic event error logging Add support for synthetic event error logging, which entails adding a logging function for it, a way to save the synthetic event command, and a set of specific synthetic event parse error strings and handling. Link: https://lkml.kernel.org/r/ed099c66df13b40cfc633aaeb17f66c37a923066.1602598160.git.zanussi@kernel.org [ : wrote save_cmdstr() seq_buf implementation. ] Tested-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 9bbb33291f8e44819aaed32d367f702303ff663e Author: Tom Zanussi Date: Tue Oct 13 09:17:54 2020 -0500 tracing: Check that the synthetic event and field names are legal Call the is_good_name() function used by probe events to make sure synthetic event and field names don't contain illegal characters and cause unexpected parsing of synthetic event commands. Link: https://lkml.kernel.org/r/c4d4bb59d3ac39bcbd70fba0cf837d6b1cedb015.1602598160.git.zanussi@kernel.org Fixes: 4b147936fa50 (tracing: Add support for 'synthetic' events) Reported-by: Masami Hiramatsu Reviewed-by: Masami Hiramatsu Tested-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 42d120e2dda5724ea789461413b8691abc315ba1 Author: Tom Zanussi Date: Tue Oct 13 09:17:53 2020 -0500 tracing: Move is_good_name() from trace_probe.h to trace.h is_good_name() is useful for other trace infrastructure, such as synthetic events, so make it available via trace.h. Link: https://lkml.kernel.org/r/cc6d6a2d7da6957fcbe1e2922e76d18d2bb459b4.1602598160.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Tested-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 7d27adf575e7e917666f4eeca62188353a358060 Author: Tom Zanussi Date: Tue Oct 13 09:17:52 2020 -0500 tracing: Don't show dynamic string internals in synthetic event description For synthetic event dynamic fields, the type contains "__data_loc", which is basically an internal part of the type which is only meant to be displayed in the format, not in the event description itself, which is confusing to users since they can't use __data_loc on the command-line to define an event field, which printing it would lead them to believe. So filter it out from the description, while leaving it in the type. Link: https://lkml.kernel.org/r/b3b7baf7813298a5ede4ff02e2e837b91c05a724.1602598160.git.zanussi@kernel.org Reported-by: Masami Hiramatsu Tested-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 499f7bb0853570c5d9cbf2a2ecbed517852cacfa Author: Qiujun Huang Date: Sat Oct 10 22:09:24 2020 +0800 tracing: Fix some typos in comments s/wihin/within/ s/retrieven/retrieved/ s/suppport/support/ s/wil/will/ s/accidently/accidentally/ s/if the if the/if the/ Link: https://lkml.kernel.org/r/20201010140924.3809-1-hqjagain@gmail.com Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit c16340971949ba6560c8e7c985bad8a180c57aa3 Author: Masami Hiramatsu Date: Sun Oct 11 00:28:09 2020 +0900 tracing/boot: Add ftrace.instance.*.alloc_snapshot option Add ftrace.instance.*.alloc_snapshot option. This option has been described in Documentation/trace/boottime-trace.rst but not implemented yet. ftrace.[instance.INSTANCE.]alloc_snapshot Allocate snapshot buffer. The difference from kernel.alloc_snapshot is that the kernel.alloc_snapshot will allocate the buffer only for the main instance, but this can allocate buffer for any new instances. Link: https://lkml.kernel.org/r/160234368948.400560.15313384470765915015.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit bbeb97464eefc65f506084fd9f18f21653e01137 Author: Gaurav Kohli Date: Tue Oct 6 15:03:53 2020 +0530 tracing: Fix race in trace_open and buffer resize call Below race can come, if trace_open and resize of cpu buffer is running parallely on different cpus CPUX CPUY ring_buffer_resize atomic_read(&buffer->resize_disabled) tracing_open tracing_reset_online_cpus ring_buffer_reset_cpu rb_reset_cpu rb_update_pages remove/insert pages resetting pointer This race can cause data abort or some times infinte loop in rb_remove_pages and rb_insert_pages while checking pages for sanity. Take buffer lock to fix this. Link: https://lkml.kernel.org/r/1601976833-24377-1-git-send-email-gkohli@codeaurora.org Cc: stable@vger.kernel.org Fixes: b23d7a5f4a07a ("ring-buffer: speed up buffer resets by avoiding synchronize_rcu for each CPU") Signed-off-by: Gaurav Kohli Signed-off-by: Steven Rostedt (VMware) commit 6d9bd139455d9d40fec8c242985996468b34180c Author: Steven Rostedt (VMware) Date: Tue Oct 13 15:48:52 2020 -0400 tracing: Check return value of __create_val_fields() before using its result After having a typo for writing a histogram trigger. Wrote: echo 'hist:key=pid:ts=common_timestamp.usec' > events/sched/sched_waking/trigger Instead of: echo 'hist:key=pid:ts=common_timestamp.usecs' > events/sched/sched_waking/trigger and the following crash happened: BUG: kernel NULL pointer dereference, address: 0000000000000008 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 4 PID: 1641 Comm: sh Not tainted 5.9.0-rc5-test+ #549 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v03.03 07/14/2016 RIP: 0010:event_hist_trigger_func+0x70b/0x1ee0 Code: 24 08 89 d5 49 89 cc e9 8c 00 00 00 4c 89 f2 41 b9 00 10 00 00 4c 89 e1 44 89 ee 4c 89 ff e8 dc d3 ff ff 45 89 ea 4b 8b 14 d7 42 08 04 74 17 41 8b 8f c0 00 00 00 8d 71 01 41 89 b7 c0 00 00 RSP: 0018:ffff959213d53db0 EFLAGS: 00010202 RAX: ffffffffffffffea RBX: 0000000000000000 RCX: 0000000000084c04 RDX: 0000000000000000 RSI: df7326aefebd174c RDI: 0000000000031080 RBP: 0000000000000002 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000046 R12: ffff959211dcf690 R13: 0000000000000001 R14: ffff95925a36e370 R15: ffff959251c89800 FS: 00007fb9ea934740(0000) GS:ffff95925ab00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 00000000c976c005 CR4: 00000000001706e0 Call Trace: ? trigger_process_regex+0x78/0x110 trigger_process_regex+0xc5/0x110 event_trigger_write+0x71/0xd0 vfs_write+0xca/0x210 ksys_write+0x70/0xf0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fb9eaa29487 Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24 This was caused by accessing the hlist_data fields after the call to __create_val_fields() without checking if the creation succeed. Link: https://lkml.kernel.org/r/20201013154852.3abd8702@gandalf.local.home Fixes: 63a1e5de3006 ("tracing: Save normal string variables") Reviewed-by: Masami Hiramatsu Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit e2c6c8a797eea88b267743d99d593d368aa43481 Author: Bob Peterson Date: Mon Oct 12 13:57:37 2020 -0500 gfs2: eliminate GLF_QUEUED flag in favor of list_empty(gl_holders) Before this patch, glock.c maintained a flag, GLF_QUEUED, which indicated when a glock had a holder queued. It was only checked for inode glocks, although set and cleared by all glocks, and it was only used to determine whether the glock should be held for the minimum hold time before releasing. The problem is that the flag is not accurate at all. If a process holds the glock, the flag is set. When they dequeue the glock, it only cleared the flag in cases when the state actually changed. So if the state doesn't change, the flag may still be set, even when nothing is queued. This happens to iopen glocks often: the get held in SH, then the file is closed, but the glock remains in SH mode. We don't need a special flag to indicate this: we can simply tell whether the glock has any items queued to the holders queue. It's a waste of cpu time to maintain it. This patch eliminates the flag in favor of simply checking list_empty on the glock holders. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 744aec4df2c5b4d12af26a57d8858af2f59ef3d0 Author: Leo Yan Date: Thu Oct 15 15:45:48 2020 +0100 perf c2c: Update documentation for metrics reorganization The output format for metrics has been reorganized, update documentation to reflect the changes for it. Signed-off-by: Leo Yan Cc: Al Grant Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Joe Mario Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20201015144548.18482-10-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit e688c3db7ca69bea1872c5706aec6a7fdf89df17 Author: Alexei Starovoitov Date: Wed Oct 14 10:56:08 2020 -0700 bpf: Fix register equivalence tracking. The 64-bit JEQ/JNE handling in reg_set_min_max() was clearing reg->id in either true or false branch. In the case 'if (reg->id)' check was done on the other branch the counter part register would have reg->id == 0 when called into find_equal_scalars(). In such case the helper would incorrectly identify other registers with id == 0 as equivalent and propagate the state incorrectly. Fix it by preserving ID across reg_set_min_max(). In other words any kind of comparison operator on the scalar register should preserve its ID to recognize: r1 = r2 if (r1 == 20) { #1 here both r1 and r2 == 20 } else if (r2 < 20) { #2 here both r1 and r2 < 20 } The patch is addressing #1 case. The #2 was working correctly already. Fixes: 75748837b7e5 ("bpf: Propagate scalar ranges through register assignments.") Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: John Fastabend Tested-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201014175608.1416-1-alexei.starovoitov@gmail.com commit 91d933c22164e22315f860e7177fbeec5e8510b0 Author: Leo Yan Date: Wed Oct 14 06:09:21 2020 +0100 perf c2c: Add metrics "RMT Load Hit" The metrics "LLC Ld Miss" and "Load Dram" overlap with each other for accouting items: "LLC Ld Miss" = "lcl_dram" + "rmt_dram" + "rmt_hit" + "rmt_hitm" "Load Dram" = "lcl_dram" + "rmt_dram" Furthermore, the metrics "LLC Ld Miss" is not directive to show statistics due to it contains summary value and cannot give out breakdown details. For this reason, add a new metrics "RMT Load Hit" which is used to present the remote cache hit; it contains two items: "RMT Load Hit" = remote hit ("rmt_hit") + remote hitm ("rmt_hitm") As result, the metrics "LLC Ld Miss" is perfectly divided into two metrics "RMT Load Hit" and "Load Dram". It's not necessary to keep metrics "LLC Ld Miss", so remove it. Before: # ----------- Cacheline ---------- Tot ------- Load Hitm ------- Total Total Total ---- Stores ---- ----- Core Load Hit ----- - LLC Load Hit -- LLC --- Load Dram ---- # Index Address Node PA cnt Hitm Total LclHitm RmtHitm records Loads Stores L1Hit L1Miss FB L1 L2 LclHit LclHitm Ld Miss Lcl Rmt # ..... .................. .... ...... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ........ ....... ....... ........ ........ # 0 0x55f07d580100 0 1499 85.89% 481 481 0 7243 3879 3364 2599 765 548 2615 66 169 481 0 0 0 1 0x55f07d580080 0 1 13.93% 78 78 0 664 664 0 0 0 187 361 27 11 78 0 0 0 2 0x55f07d5800c0 0 1 0.18% 1 1 0 405 405 0 0 0 131 0 10 263 1 0 0 0 After: # ----------- Cacheline ---------- Tot ------- Load Hitm ------- Total Total Total ---- Stores ---- ----- Core Load Hit ----- - LLC Load Hit -- - RMT Load Hit -- --- Load Dram ---- # Index Address Node PA cnt Hitm Total LclHitm RmtHitm records Loads Stores L1Hit L1Miss FB L1 L2 LclHit LclHitm RmtHit RmtHitm Lcl Rmt # ..... .................. .... ...... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ........ ....... ........ ....... ........ ........ # 0 0x55f07d580100 0 1499 85.89% 481 481 0 7243 3879 3364 2599 765 548 2615 66 169 481 0 0 0 0 1 0x55f07d580080 0 1 13.93% 78 78 0 664 664 0 0 0 187 361 27 11 78 0 0 0 0 2 0x55f07d5800c0 0 1 0.18% 1 1 0 405 405 0 0 0 131 0 10 263 1 0 0 0 0 Signed-off-by: Leo Yan Tested-by: Joe Mario Acked-by: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20201014050921.5591-9-leo.yan@linaro.org commit 77c158698c395cf127fdc6e0b9699917f72ef47f Author: Leo Yan Date: Wed Oct 14 06:09:20 2020 +0100 perf c2c: Correct LLC load hit metrics "rmt_hit" is accounted into two metrics: one is accounted into the metrics "LLC Ld Miss" (see the function llc_miss() for calculation "llcmiss"); and it's accounted into metrics "LLC Load Hit". Thus, for the literal meaning, it is contradictory that "rmt_hit" is accounted for both "LLC Ld Miss" (LLC miss) and "LLC Load Hit" (LLC hit). Thus this is easily to introduce confusion: "LLC Load Hit" gives impression that all items belong to it are LLC hit; in fact "rmt_hit" is LLC miss and remote cache hit. To give out clear semantics for metric "LLC Load Hit", "rmt_hit" is moved out from it and changes "LLC Load Hit" to contain two items: LLC Load Hit = LLC's hit ("ld_llchit") + LLC's hitm ("lcl_hitm") For output alignment, adjusts the header for "LLC Load Hit". Signed-off-by: Leo Yan Tested-by: Joe Mario Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201014050921.5591-8-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit ed626a3e52cacd324fa1b7c4cc4c252f8f39f4d4 Author: Leo Yan Date: Wed Oct 14 06:09:19 2020 +0100 perf c2c: Change header for LLC local hit Replace the header string "Lcl" with "LclHit", which is more explicit to express the event type is LLC local hit. Signed-off-by: Leo Yan Tested-by: Joe Mario Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201014050921.5591-7-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 0fbe2fe965cb684e00ab4e94d266b2cb46a63dc5 Author: Leo Yan Date: Wed Oct 14 06:09:18 2020 +0100 perf c2c: Use more explicit headers for HITM Local and remote HITM use the headers 'Lcl' and 'Rmt' respectively, suppose if we want to extend the tool to display these two dimensions under any one metrics, users cannot understand the semantics if only based on the header string 'Lcl' or 'Rmt'. To explicit express the meaning for HITM items, this patch changes the headers string as "LclHitm" and "RmtHitm", the strings are more readable and this allows to extend metrics for using HITM items. Signed-off-by: Leo Yan Tested-by: Joe Mario Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201014050921.5591-6-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit fdd32d7e8e81de8ce93e552b57838ce5413bf5e9 Author: Leo Yan Date: Wed Oct 14 06:09:17 2020 +0100 perf c2c: Change header from "LLC Load Hitm" to "Load Hitm" The metrics "LLC Load Hitm" contains two items: one is "local Hitm" and another is "remote Hitm". "local Hitm" means: L3 HIT and was serviced by another processor core with a cross core snoop where modified copies were found; it's no doubt that "local Hitm" belongs to LLC access. But for "remote Hitm", based on the code in util/mem-events, it's the event for remote cache HIT and was serviced by another processor core with modified copies. Thus the remote Hitm is a remote cache's hit and actually it's LLC load miss. Now the display format gives users the impression that "local Hitm" and "remote Hitm" both belong to the LLC load, but this is not the fact as described. This patch changes the header from "LLC Load Hitm" to "Load Hitm", this can avoid the give the wrong impression that all Hitm belong to LLC. Signed-off-by: Leo Yan Tested-by: Joe Mario Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201014050921.5591-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 6d662d730d6cdc16a19c4bc076c03e2cd21c242d Author: Leo Yan Date: Wed Oct 14 06:09:16 2020 +0100 perf c2c: Organize metrics based on memory hierarchy The metrics are not organized based on memory hierarchy, e.g. the tool doesn't organize the metrics order based on memory nodes from the close node (e.g. L1/L2 cache) to far node (e.g. L3 cache and DRAM). To output metrics with more friendly form, this patch refines the metrics order based on memory hierarchy: "Core Load Hit" => "LLC Load Hit" => "LLC Ld Miss" => "Load Dram" Signed-off-by: Leo Yan Tested-by: Joe Mario Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201014050921.5591-4-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 4f28641bde8a005462a59d654add4e00767a962c Author: Leo Yan Date: Wed Oct 14 06:09:15 2020 +0100 perf c2c: Display "Total Stores" as a standalone metrics The total stores is displayed under the metrics "Store Reference", to output the same format with total records and all loads, extract the total stores number as a standalone metrics "Total Stores". After this patch, the tool shows the summary numbers ("Total records", "Total loads", "Total Stores") in the unified form. Before: # ----------- Cacheline ---------- Tot ----- LLC Load Hitm ----- Total Total ---- Store Reference ---- --- Load Dram ---- LLC ----- Core Load Hit ----- -- LLC Load Hit -- # Index Address Node PA cnt Hitm Total Lcl Rmt records Loads Total L1Hit L1Miss Lcl Rmt Ld Miss FB L1 L2 Llc Rmt # ..... .................. .... ...... ....... ....... ....... ....... ....... ....... ....... ....... ....... ........ ........ ....... ....... ....... ....... ........ ........ # 0 0x55f07d580100 0 1499 85.89% 481 481 0 7243 3879 3364 2599 765 0 0 0 548 2615 66 169 0 1 0x55f07d580080 0 1 13.93% 78 78 0 664 664 0 0 0 0 0 0 187 361 27 11 0 2 0x55f07d5800c0 0 1 0.18% 1 1 0 405 405 0 0 0 0 0 0 131 0 10 263 0 After: # ----------- Cacheline ---------- Tot ----- LLC Load Hitm ----- Total Total Total ---- Stores ---- --- Load Dram ---- LLC ----- Core Load Hit ----- -- LLC Load Hit -- # Index Address Node PA cnt Hitm Total Lcl Rmt records Loads Stores L1Hit L1Miss Lcl Rmt Ld Miss FB L1 L2 Llc Rmt # ..... .................. .... ...... ....... ....... ....... ....... ....... ....... ....... ....... ....... ........ ........ ....... ....... ....... ....... ........ ........ # 0 0x55f07d580100 0 1499 85.89% 481 481 0 7243 3879 3364 2599 765 0 0 0 548 2615 66 169 0 1 0x55f07d580080 0 1 13.93% 78 78 0 664 664 0 0 0 0 0 0 187 361 27 11 0 2 0x55f07d5800c0 0 1 0.18% 1 1 0 405 405 0 0 0 0 0 0 131 0 10 263 0 Signed-off-by: Leo Yan Tested-by: Joe Mario Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201014050921.5591-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit b596e979c8c929959af8ef252a16971492fc8265 Author: Leo Yan Date: Wed Oct 14 06:09:14 2020 +0100 perf c2c: Display the total numbers continuously To view the statistics with "breakdown" mode, it's good to show the summary numbers for the total records, all stores and all loads, then the sequential conlumns can be used to break into more detailed items. To achieve this purpose, this patch displays the summary numbers for records/stores/loads continuously and places them before breakdown items, this can allow uses to easily read the summarized statistics. Signed-off-by: Leo Yan Tested-by: Joe Mario Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201014050921.5591-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit b2a846dbef4ef54ef032f0f5ee188c609a0278a7 Author: Bob Peterson Date: Thu Aug 27 12:18:37 2020 -0500 gfs2: Ignore journal log writes for jdata holes When flushing out its ail1 list, gfs2_write_jdata_page calls function __block_write_full_page passing in function gfs2_get_block_noalloc. But there was a problem when a process wrote to a jdata file, then truncated it or punched a hole, leaving references to the blocks within the new hole in its ail list, which are to be written to the journal log. In writing them to the journal, after calling gfs2_block_map, function gfs2_get_block_noalloc determined that the (hole-punched) block was not mapped, so it returned -EIO to generic_writepages, which passed it back to gfs2_ail1_start_one. This, in turn, performed a withdraw, assuming there was a real IO error writing to the journal. This might be a valid error when writing metadata to the journal, but for journaled data writes, it does not warrant a withdraw. This patch adds a check to function gfs2_block_map that makes an exception for journaled data writes that correspond to jdata holes: If the iomap get function returns a block type of IOMAP_HOLE, it instead returns -ENODATA which does not cause the withdraw. Other errors are returned as before. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit a6645745d45da5b3dd3ff616a3e44f7651eda9f9 Author: Bob Peterson Date: Wed Aug 19 09:24:48 2020 -0500 gfs2: simplify gfs2_block_map Function gfs2_block_map had a lot of redundancy between its create and no_create paths. This patch simplifies the code to eliminate the redundancy. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 6302d6f43e3550495747ffbaeb75a46ea8c15b32 Author: Bob Peterson Date: Wed Aug 19 08:55:18 2020 -0500 gfs2: Only set PageChecked if we have a transaction With jdata writes, we frequently got into situations where gfs2 deadlocked because of this calling sequence: gfs2_ail1_start gfs2_ail1_flush - for every tr on the sd_ail1_list: gfs2_ail1_start_one - for every bd on the tr's tr_ail1_list: generic_writepages write_cache_pages passing __writepage() calls clear_page_dirty_for_io which calls set_page_dirty: which calls jdata_set_page_dirty which sets PageChecked. __writepage() calls mapping->a_ops->writepage AKA gfs2_jdata_writepage However, gfs2_jdata_writepage checks if PageChecked is set, and if so, it ignores the write and redirties the page. The problem is that write_cache_pages calls clear_page_dirty_for_io, which often calls set_page_dirty(). See comments in page-writeback.c starting with "Yes, Virginia". If it's jdata, set_page_dirty will call jdata_set_page_dirty which will set PageChecked. That causes a conflict because it makes it look like the page has been redirtied by another writer, in which case we need to skip writing it and redirty the page. That ends up in a deadlock because it isn't a "real" writer and nothing will ever clear PageChecked. If we do have a real writer, it will have started a transaction. So this patch checks if a transaction is in use, and if not, it skips setting PageChecked. That way, the page will be dirtied, cleaned, and written appropriately. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 249ffe18c68ee74dcfb51a16e151b45ee07e1c10 Author: Bob Peterson Date: Tue Aug 18 11:50:28 2020 -0500 gfs2: don't lock sd_ail_lock in gfs2_releasepage Patch 380f7c65a7eb3288e4b6812acf3474a1de230707 changed gfs2_releasepage so that it held the sd_ail_lock spin_lock for most of its processing. It did this for some mysterious undocumented bug somewhere in the evict code path. But in the nine years since, evict has been reworked and fixed many times, and so have the transactions and ail list. I can't see a reason to hold the sd_ail_lock unless it's protecting the actual ail lists hung off the transactions. Therefore, this patch removes the locking to increase speed and efficiency, and to further help us rework the log flush code to be more concurrent with transactions. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 36c783092d49ae71fa87963de9bb5bd9daf4d8c2 Author: Bob Peterson Date: Tue Aug 18 08:05:14 2020 -0500 gfs2: make gfs2_ail1_empty_one return the count of active items This patch is one baby step toward simplifying the journal management. It simply changes function gfs2_ail1_empty_one from a void to an int and makes it return a count of active items. This allows the caller to check the return code rather than list_empty on the tr_ail1_list. This way we can, in a later patch, combine transaction ail1 and ail2 lists. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 68942870c66a7983f1d2efb9c1c524f7ebef8097 Author: Bob Peterson Date: Wed Jul 22 10:27:50 2020 -0500 gfs2: Wipe jdata and ail1 in gfs2_journal_wipe, formerly gfs2_meta_wipe Before this patch, when blocks were freed, it called gfs2_meta_wipe to take the metadata out of the pending journal blocks. It did this mostly by calling another function called gfs2_remove_from_journal. This is shortsighted because it does not do anything with jdata blocks which may also be in the journal. This patch expands the function so that it wipes out jdata blocks from the journal as well, and it wipes it from the ail1 list if it hasn't been written back yet. Since it now processes jdata blocks as well, the function has been renamed from gfs2_meta_wipe to gfs2_journal_wipe. New function gfs2_ail1_wipe wants a static view of the ail list, so it locks the sd_ail_lock when removing items. To accomplish this, function gfs2_remove_from_journal no longer locks the sd_ail_lock, and it's now the caller's responsibility to do so. I was going to make sd_ail_lock locking conditional, but the practice is generally frowned upon. For details, see: https://lwn.net/Articles/109066/ Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 97c5e43d51a44bffdc0eb3c4b40c8d2d4cbe1a73 Author: Bob Peterson Date: Thu Aug 20 08:59:28 2020 -0500 gfs2: enhance log_blocks trace point to show log blocks free This patch adds some code to enhance the log_blocks trace point. It reports the number of free log blocks. This makes the trace point much more useful, especially for debugging performance problems when we can tell when the journal gets full and needs to wait for flushes, etc. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 77650bdbd293ac56807b8a3f24ca8152035eb2e3 Author: Bob Peterson Date: Thu Aug 20 08:53:29 2020 -0500 gfs2: add missing log_blocks trace points in gfs2_write_revokes Function gfs2_write_revokes was incrementing and decrementing the number of log blocks free, but there was never a log_blocks trace point for it. Thus, the free blocks from a log_blocks trace would jump around mysteriously. This patch adds the missing trace points so the trace makes more sense. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 21b6924bb70e77c83d508b0d188d88f5e403f1f5 Author: Bob Peterson Date: Wed Jul 22 11:51:09 2020 -0500 gfs2: rename gfs2_write_full_page to gfs2_write_jdata_page, remove parm Since the function is only used for writing jdata pages, this patch simply renames function gfs2_write_full_page to a more appropriate name: gfs2_write_jdata_page. This makes the code easier to understand. The function was only called in one place, which passed in a pointer to function gfs2_get_block_noalloc. The function doesn't need to be passed in. Therefore, this also eliminates the unnecessary parameter to increase efficiency. I also took the liberty of cleaning up the function comments. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 0ddc5154b24c96f20e94d653b0a814438de6032b Author: Anant Thazhemadam Date: Wed Oct 14 22:01:09 2020 +0530 gfs2: add validation checks for size of superblock In gfs2_check_sb(), no validation checks are performed with regards to the size of the superblock. syzkaller detected a slab-out-of-bounds bug that was primarily caused because the block size for a superblock was set to zero. A valid size for a superblock is a power of 2 between 512 and PAGE_SIZE. Performing validation checks and ensuring that the size of the superblock is valid fixes this bug. Reported-by: syzbot+af90d47a37376844e731@syzkaller.appspotmail.com Tested-by: syzbot+af90d47a37376844e731@syzkaller.appspotmail.com Suggested-by: Andrew Price Signed-off-by: Anant Thazhemadam [Minor code reordering.] Signed-off-by: Andreas Gruenbacher commit ddc7834af8d56c2c0e805f05493ba4a650c0344f Author: David Howells Date: Wed Sep 30 23:54:44 2020 +0100 rxrpc: Fix loss of final ack on shutdown Fix the loss of transmission of a call's final ack when a socket gets shut down. This means that the server will retransmit the last data packet or send a ping ack and then get an ICMP indicating the port got closed. The server will then view this as a failure. Fixes: 3136ef49a14c ("rxrpc: Delay terminal ACK transmission on a client call") Signed-off-by: David Howells commit f3af4ad1e08a8a9e61878b9f72751a5b76b3baf9 Author: David Howells Date: Tue Sep 29 22:29:44 2020 +0100 rxrpc: Fix bundle counting for exclusive connections Fix rxrpc_unbundle_conn() to not drop the bundle usage count when cleaning up an exclusive connection. Based on the suggested fix from Hillf Danton. Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager") Reported-by: syzbot+d57aaf84dd8a550e6d91@syzkaller.appspotmail.com Signed-off-by: David Howells cc: Hillf Danton commit b3e1ea16fb39fb6e1a1cf1dbdd6738531de3dc7d Author: Jisheng Zhang Date: Thu Oct 15 17:41:15 2020 +0800 mmc: sdhci: Use Auto CMD Auto Select only when v4_mode is true sdhci-of-dwcmshc meets an eMMC read performance regression with below command after commit 427b6514d095 ("mmc: sdhci: Add Auto CMD Auto Select support"): dd if=/dev/mmcblk0 of=/dev/null bs=8192 count=100000 Before the commit, the above command gives 120MB/s After the commit, the above command gives 51.3 MB/s So it looks like sdhci-of-dwcmshc expects Version 4 Mode for Auto CMD Auto Select. Fix the performance degradation by ensuring v4_mode is true to use Auto CMD Auto Select. Fixes: 427b6514d095 ("mmc: sdhci: Add Auto CMD Auto Select support") Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201015174115.4cf2c19a@xhacker.debian Signed-off-by: Ulf Hansson commit 45544eee96065cf183fbb937fe1f45a172b06f4e Author: Kalesh Singh Date: Wed Oct 14 00:53:07 2020 +0000 arm64: mremap speedup - Enable HAVE_MOVE_PMD HAVE_MOVE_PMD enables remapping pages at the PMD level if both the source and destination addresses are PMD-aligned. HAVE_MOVE_PMD is already enabled on x86. The original patch [1] that introduced this config did not enable it on arm64 at the time because of performance issues with flushing the TLB on every PMD move. These issues have since been addressed in more recent releases with improvements to the arm64 TLB invalidation and core mmu_gather code as Will Deacon mentioned in [2]. >From the data below, it can be inferred that there is approximately 8x improvement in performance when HAVE_MOVE_PMD is enabled on arm64. --------- Test Results ---------- The following results were obtained on an arm64 device running a 5.4 kernel, by remapping a PMD-aligned, 1GB sized region to a PMD-aligned destination. The results from 10 iterations of the test are given below. All times are in nanoseconds. Control HAVE_MOVE_PMD 9220833 1247761 9002552 1219896 9254115 1094792 8725885 1227760 9308646 1043698 9001667 1101771 8793385 1159896 8774636 1143594 9553125 1025833 9374010 1078125 9100885.4 1134312.6 <-- Mean Time in nanoseconds Total mremap time for a 1GB sized PMD-aligned region drops from ~9.1 milliseconds to ~1.1 milliseconds. (~8x speedup). [1] https://lore.kernel.org/r/20181108181201.88826-3-joelaf@google.com [2] https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg140837.html Signed-off-by: Kalesh Singh Acked-by: Kirill A. Shutemov Cc: Catalin Marinas Cc: Will Deacon Cc: Andrew Morton Link: https://lore.kernel.org/r/20201014005320.2233162-3-kaleshsingh@google.com Link: https://lore.kernel.org/kvmarm/20181029102840.GC13965@arm.com/ Signed-off-by: Will Deacon commit eac48eb6ce10c1dc6fd3366608f4d3ca2430166c Author: Petr Mladek Date: Wed Oct 14 19:50:51 2020 +0200 printk: ringbuffer: Wrong data pointer when appending small string data_realloc() returns wrong data pointer when the block is wrapped and the size is not increased. It might happen when pr_cont() wants to add only few characters and there is already a space for them because of alignment. It might cause writing outsite the buffer. It has been detected by LTP tests with KASAN enabled: [ 221.921944] oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=c,mems_allowed=0,oom_memcg=/0,task_memcg=in [ 221.922108] ================================================================== [ 221.922111] BUG: KASAN: global-out-of-bounds in vprintk_store+0x362/0x3d0 [ 221.922112] Write of size 2 at addr ffffffffba51dbcd by task memcg_test_1/11282 [ 221.922113] [ 221.922114] CPU: 1 PID: 11282 Comm: memcg_test_1 Not tainted 5.9.0-next-20201013 #1 [ 221.922116] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS 2.0b 07/27/2017 [ 221.922116] Call Trace: [ 221.922117] dump_stack+0xa4/0xd9 [ 221.922118] print_address_description.constprop.0+0x21/0x210 [ 221.922119] ? _raw_write_lock_bh+0xe0/0xe0 [ 221.922120] ? vprintk_store+0x362/0x3d0 [ 221.922121] kasan_report.cold+0x37/0x7c [ 221.922122] ? vprintk_store+0x362/0x3d0 [ 221.922123] check_memory_region+0x18c/0x1f0 [ 221.922124] memcpy+0x3c/0x60 [ 221.922125] vprintk_store+0x362/0x3d0 [ 221.922125] ? __ia32_sys_syslog+0x50/0x50 [ 221.922126] ? _raw_spin_lock_irqsave+0x9b/0x100 [ 221.922127] ? _raw_spin_lock_irq+0xf0/0xf0 [ 221.922128] ? __kasan_check_write+0x14/0x20 [ 221.922129] vprintk_emit+0x8d/0x1f0 [ 221.922130] vprintk_default+0x1d/0x20 [ 221.922131] vprintk_func+0x5a/0x100 [ 221.922132] printk+0xb2/0xe3 [ 221.922133] ? swsusp_write.cold+0x189/0x189 [ 221.922134] ? kernfs_vfs_xattr_set+0x60/0x60 [ 221.922134] ? _raw_write_lock_bh+0xe0/0xe0 [ 221.922135] ? trace_hardirqs_on+0x38/0x100 [ 221.922136] pr_cont_kernfs_path.cold+0x49/0x4b [ 221.922137] mem_cgroup_print_oom_context.cold+0x74/0xc3 [ 221.922138] dump_header+0x340/0x3bf [ 221.922139] oom_kill_process.cold+0xb/0x10 [ 221.922140] out_of_memory+0x1e9/0x860 [ 221.922141] ? oom_killer_disable+0x210/0x210 [ 221.922142] mem_cgroup_out_of_memory+0x198/0x1c0 [ 221.922143] ? mem_cgroup_count_precharge_pte_range+0x250/0x250 [ 221.922144] try_charge+0xa9b/0xc50 [ 221.922145] ? arch_stack_walk+0x9e/0xf0 [ 221.922146] ? memory_high_write+0x230/0x230 [ 221.922146] ? avc_has_extended_perms+0x830/0x830 [ 221.922147] ? stack_trace_save+0x94/0xc0 [ 221.922148] ? stack_trace_consume_entry+0x90/0x90 [ 221.922149] __memcg_kmem_charge+0x73/0x120 [ 221.922150] ? cred_has_capability+0x10f/0x200 [ 221.922151] ? mem_cgroup_can_attach+0x260/0x260 [ 221.922152] ? selinux_sb_eat_lsm_opts+0x2f0/0x2f0 [ 221.922153] ? obj_cgroup_charge+0x16b/0x220 [ 221.922154] ? kmem_cache_alloc+0x78/0x4c0 [ 221.922155] obj_cgroup_charge+0x122/0x220 [ 221.922156] ? vm_area_alloc+0x20/0x90 [ 221.922156] kmem_cache_alloc+0x78/0x4c0 [ 221.922157] vm_area_alloc+0x20/0x90 [ 221.922158] mmap_region+0x3ed/0x9a0 [ 221.922159] ? cap_mmap_addr+0x1d/0x80 [ 221.922160] do_mmap+0x3ee/0x720 [ 221.922161] vm_mmap_pgoff+0x16a/0x1c0 [ 221.922162] ? randomize_stack_top+0x90/0x90 [ 221.922163] ? copy_page_range+0x1980/0x1980 [ 221.922163] ksys_mmap_pgoff+0xab/0x350 [ 221.922164] ? find_mergeable_anon_vma+0x110/0x110 [ 221.922165] ? __audit_syscall_entry+0x1a6/0x1e0 [ 221.922166] __x64_sys_mmap+0x8d/0xb0 [ 221.922167] do_syscall_64+0x38/0x50 [ 221.922168] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 221.922169] RIP: 0033:0x7fe8f5e75103 [ 221.922172] Code: 54 41 89 d4 55 48 89 fd 53 4c 89 cb 48 85 ff 74 56 49 89 d9 45 89 f8 45 89 f2 44 89 e2 4c 89 ee 48 89 ef b8 09 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 7d 5b 5d 41 5c 41 5d 41 5e 41 5f c3 66 2e 0f [ 221.922173] RSP: 002b:00007ffd38c90198 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 [ 221.922175] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fe8f5e75103 [ 221.922176] RDX: 0000000000000003 RSI: 0000000000001000 RDI: 0000000000000000 [ 221.922178] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 221.922179] R10: 0000000000002022 R11: 0000000000000246 R12: 0000000000000003 [ 221.922180] R13: 0000000000001000 R14: 0000000000002022 R15: 0000000000000000 [ 221.922181] [ 213O[ 221.922182] The buggy address belongs to the variable: [ 221.922183] clear_seq+0x2d/0x40 [ 221.922183] [ 221.922184] Memory state around the buggy address: [ 221.922185] ffffffffba51da80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 221.922187] ffffffffba51db00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 221.922188] >ffffffffba51db80: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 [ 221.922189] ^ [ 221.922190] ffffffffba51dc00: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 [ 221.922191] ffffffffba51dc80: f9 f9 f9 f9 01 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 [ 221.922193] ================================================================== [ 221.922194] Disabling lock debugging due to kernel taint [ 221.922196] ,task=memcg_test_1,pid=11280,uid=0 [ 221.922205] Memory cgroup out of memory: Killed process 11280 Link: https://lore.kernel.org/r/CA+G9fYt46oC7-BKryNDaaXPJ9GztvS2cs_7GjYRjanRi4+ryCQ@mail.gmail.com Fixes: 4cfc7258f876a7feba673ac ("printk: ringbuffer: add finalization/extension support") Reported-by: Naresh Kamboju Reviewed-by: John Ogness Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20201014175051.GC13775@alley commit 7bc1a0f9e1765830e945669c99c59c35cf9bca82 Author: Ard Biesheuvel Date: Thu Oct 8 17:35:59 2020 +0200 arm64: mm: use single quantity to represent the PA to VA translation On arm64, the global variable memstart_addr represents the physical address of PAGE_OFFSET, and so physical to virtual translations or vice versa used to come down to simple additions or subtractions involving the values of PAGE_OFFSET and memstart_addr. When support for 52-bit virtual addressing was introduced, we had to deal with PAGE_OFFSET potentially being outside of the region that can be covered by the virtual range (as the 52-bit VA capable build needs to be able to run on systems that are only 48-bit VA capable), and for this reason, another translation was introduced, and recorded in the global variable physvirt_offset. However, if we go back to the original definition of memstart_addr, i.e., the physical address of PAGE_OFFSET, it turns out that there is no need for two separate translations: instead, we can simply subtract the size of the unaddressable VA space from memstart_addr to make the available physical memory appear in the 48-bit addressable VA region. This simplifies things, but also fixes a bug on KASLR builds, which may update memstart_addr later on in arm64_memblock_init(), but fails to update vmemmap and physvirt_offset accordingly. Fixes: 5383cc6efed1 ("arm64: mm: Introduce vabits_actual") Signed-off-by: Ard Biesheuvel Reviewed-by: Steve Capper Link: https://lore.kernel.org/r/20201008153602.9467-2-ardb@kernel.org Signed-off-by: Will Deacon commit 024e6f3dce9ef0bc61acc5b93bb1eba491e4f8d0 Author: Alexandre Belloni Date: Fri Oct 9 17:31:01 2020 +0200 rtc: rv3028: ensure ram configuration registers are saved If RV3028_CTRL1_EERD is not set (this is the default), the RTC will refresh the RAM configuration registers from the EEPROM at midnight. It is necessary to save the RAM registers back to EEPROM after modifying them. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201009153101.721149-4-alexandre.belloni@bootlin.com commit de0ad60e79e1ce563223b3fddf03fc19f606c6d4 Author: Alexandre Belloni Date: Fri Oct 9 17:31:00 2020 +0200 rtc: rv3028: factorize EERD bit handling Both rv3028_eeprom_write and rv3028_eeprom_read enable EERD before sending commands to the EEPROM and restore it afterwards. Factorize this code. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201009153101.721149-3-alexandre.belloni@bootlin.com commit c1efae1432018063e7e723c4267edd3f13ce0f48 Author: Alexandre Belloni Date: Fri Oct 9 17:30:59 2020 +0200 rtc: rv3028: fix trickle resistor values Version 1.0 of the application manual had the wrong resistor values. Fix them according to version 1.1 Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201009153101.721149-2-alexandre.belloni@bootlin.com commit 00e8e87f10155b06ae2bc9f93c4d006681640e65 Author: Alexandre Belloni Date: Fri Oct 9 17:30:58 2020 +0200 rtc: rv3028: fix clock output support rv3028_clkout_set_rate unconditionally sets RV3028_CLKOUT_CLKOE but clk_set_rate may be called with the clock disabled. Ensure the clock is kept disabled if it was not yet enabled. Also, the actual rate was overwritten when enabling the clock, properly write to the register only once. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201009153101.721149-1-alexandre.belloni@bootlin.com commit 770c03e6dabacd5b9f57bba93c4311d32b618640 Author: Fei Shao Date: Thu Oct 8 17:34:14 2020 +0800 rtc: mt6397: Remove unused member dev Removing the struct member "dev" in mt6397 RTC driver because it's not initialized and the only usage is for one debugging message. Also fixed a typo in the error message. Signed-off-by: Fei Shao Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201008093414.1911699-1-fshao@chromium.org commit 4b7a6ce71e033666d6f5a577deb7f1f5126ed889 Author: Peter Collingbourne Date: Tue Oct 13 22:24:30 2020 -0700 arm64: reject prctl(PR_PAC_RESET_KEYS) on compat tasks It doesn't make sense to issue prctl(PR_PAC_RESET_KEYS) on a compat task because the 32-bit instruction set does not offer PAuth instructions. For consistency with other 64-bit only prctls such as {SET,GET}_TAGGED_ADDR_CTRL, reject the prctl on compat tasks. Although this is a userspace-visible change, maybe it isn't too late to make this change given that the hardware isn't available yet and it's very unlikely that anyone has 32-bit software that actually depends on this succeeding. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/Ie885a1ff84ab498cc9f62d6451e9f2cfd4b1d06a Link: https://lore.kernel.org/r/20201014052430.11630-1-pcc@google.com [will: Do the same for the SVE prctl()s] Signed-off-by: Will Deacon commit 599809540f173f572c32a35d712accdc14d6357c Author: Georgi Djakov Date: Tue Oct 13 16:59:13 2020 +0300 interconnect: qcom: sc7180: Init BCMs before creating the nodes Currently if we use sync_state, by default the bandwidth is maxed out, but in order to set this in hardware, the BCMs (Bus Clock Managers) need to be initialized first. Move the BCM initialization before creating the nodes to fix this. Fixes: 7d3b0b0d8184 ("interconnect: qcom: Use icc_sync_state") Acked-by: Saravana Kannan Link: https://lore.kernel.org/r/20201013135913.29059-3-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 0f221a729049ab727c87b0fe47e309b952d879ce Author: Georgi Djakov Date: Tue Oct 13 16:59:12 2020 +0300 interconnect: qcom: sdm845: Init BCMs before creating the nodes Currently if we use sync_state, by default the bandwidth is maxed out, but in order to set this in hardware, the BCMs (Bus Clock Managers) need to be initialized first. Move the BCM initialization before creating the nodes to fix this. Fixes: 7d3b0b0d8184 ("interconnect: qcom: Use icc_sync_state") Acked-by: Saravana Kannan Link: https://lore.kernel.org/r/20201013135913.29059-2-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit d3703b3e255f56d543aac183f8aafdbfd7096559 Author: Georgi Djakov Date: Tue Oct 13 16:59:11 2020 +0300 interconnect: Aggregate before setting initial bandwidth When setting the initial bandwidth, make sure to call the aggregate() function (if such is implemented for the current provider), to handle cases when data needs to be aggregated first. Fixes: b1d681d8d324 ("interconnect: Add sync state support") Acked-by: Saravana Kannan Link: https://lore.kernel.org/r/20201013135913.29059-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 5be1805dc3961ce0465bcb0beab85fe8580af08d Author: Georgi Djakov Date: Mon Oct 12 22:40:34 2020 +0300 interconnect: qcom: sdm845: Enable keepalive for the MM1 BCM After enabling interconnect scaling for display on the db845c board, in certain configurations the board hangs, while the following errors are observed on the console: Error sending AMC RPMH requests (-110) qcom_rpmh TCS Busy, retrying RPMH message send: addr=0x50000 qcom_rpmh TCS Busy, retrying RPMH message send: addr=0x50000 qcom_rpmh TCS Busy, retrying RPMH message send: addr=0x50000 ... In this specific case, the above is related to one of the sequencers being stuck, while client drivers are returning from probe and trying to disable the currently unused clock and interconnect resources. Generally we want to keep the multimedia NoC enabled like the rest of the NoCs, so let's set the keepalive flag on it too. Fixes: aae57773fbe0 ("interconnect: qcom: sdm845: Split qnodes into their respective NoCs") Reported-by: Amit Pundir Reviewed-by: Mike Tipton Tested-by: John Stultz Link: https://lore.kernel.org/r/20201012194034.26944-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 7ff3f14ddc355bfbc94c766f43b90606b1f79e83 Author: Helge Deller Date: Mon Oct 12 10:44:52 2020 +0200 parisc/sticon: Add user font support This is a major rework of the sticon (parisc text console) driver in order to support user font support. Usually one want to use the stifb (parisc framebuffer driver) which is based on fbcon and does support fonts and colors, but some old machines (e.g. HP 730 workstations) don't provide a supported stifb graphic card, and for those user fonts are preferred. This patch drops unused code for software cursor and scrollback, enhances the debug output and adds better documentation. The code was tested on various machines with byte-mode and word-mode graphic cards on GSC- and PCI-busses. Signed-off-by: Helge Deller commit 58a5c67aadde68d0d31c36adbabdec28c25bb6ab Author: Helge Deller Date: Mon Oct 12 09:05:09 2020 +0200 parisc/sticon: Always register sticon console driver If the ROM provides functional STI routines, always register the sticon driver, even if the serial console was choosen as boot device. Additionally, in that case, do not make the sticon driver the default output console device. Signed-off-by: Helge Deller commit 4a770b413fe91d5d271e29a50a1f23cf189b4d2e Author: Helge Deller Date: Mon Oct 12 08:50:51 2020 +0200 parisc: Add MAP_UNINITIALIZED define We will not allow unitialized anon mmaps, but we need this define to prevent build errors, e.g. the debian foot package. Suggested-by: John David Anglin Signed-off-by: Helge Deller commit f173e3a751708b7f5e0b77dcdd4ac3c2287b735e Author: John David Anglin Date: Fri Oct 2 21:41:52 2020 +0200 parisc: Improve spinlock handling Use READ_ONCE() to check if spinlock is locked. The other changes are cleanups. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit b47cf497469fae14fcbf63526150c8c71e636c20 Author: Helge Deller Date: Fri Oct 2 21:32:39 2020 +0200 parisc: Install vmlinuz instead of zImage file Tested-by: John David Anglin Signed-off-by: Helge Deller commit a50d3d3ce0235fdc06cdb5cc2fb082964ecb56da Author: John David Anglin Date: Fri Oct 2 21:28:31 2020 +0200 parisc: Rewrite tlb flush threshold calculation Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 53a42b6324b8ddce1e9d2f34da2ca68ef21c2084 Author: John David Anglin Date: Fri Oct 2 21:21:41 2020 +0200 parisc: Switch to more fine grained lws locks Increase the number of lws locks to 256 entries (instead of 16) and choose lock entry based on bits 3-11 (instead of 4-7) of the relevant address. With this change we archieve more fine-grained locking in futex syscalls and thus reduce the number of possible stalls. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 2a7d4eed5720d163f50b26892abe45b8cf40e849 Author: John David Anglin Date: Fri Oct 2 21:16:49 2020 +0200 parisc: Mark pointers volatile in __xchg8(), __xchg32() and __xchg64() Let the complier treat the pointers volatile to ensure that they get accessed atomicly. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 4df82ce78a34b8f94f3a512ef93972f978713cbc Author: John David Anglin Date: Fri Oct 2 20:03:27 2020 +0200 parisc: Fix comments and enable interrupts later Correct the comments: The jump is forwards, not backwards. Enable the interrupts after %r29 (reference param area) was loaded. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 6caf55e570efe53f161bf9af64f22b310e86032e Author: John David Anglin Date: Fri Oct 2 19:55:04 2020 +0200 parisc: Add alternative patching to synchronize_caches define This change allows the sync barrier instruction to be patched to a nop. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit f15309d7ad5d12603941ef213ead0e7ebe6e8943 Author: Helge Deller Date: Wed Sep 30 17:24:47 2020 +0200 parisc: Add ioread64_hi_lo() and iowrite64_hi_lo() The kernel test robot reports missing functions. Add them. hppa-linux-ld: drivers/firmware/arm_scmi/perf.o: in function `scmi_perf_fc_ring_db': (.text+0x610): undefined reference to `ioread64_hi_lo' (.text+0x63c): undefined reference to `iowrite64_hi_lo' Reported-by: kernel test robot Signed-off-by: Helge Deller commit 0b5d9a063f67e9f77edb7d372eab82f33bf6b407 Author: Christoph Hellwig Date: Fri Sep 11 12:27:46 2020 +0200 parisc: disable CONFIG_IDE in defconfigs Enable libata support for the Nat Semi NS87415 controller, and disable the soon to be removed legacy ide driver entirely. Signed-off-by: Christoph Hellwig Acked-by: Helge Deller Signed-off-by: Helge Deller commit cd760704ee32a762029c08ca0702228c34846ffb Author: Helge Deller Date: Sat Aug 29 18:07:49 2020 +0200 parisc: Drop useless comments in uapi/asm/signal.h Signed-off-by: Helge Deller commit 75ae04206a4d0e4f541c1d692b7febd1c0fdb814 Author: Helge Deller Date: Sat Aug 29 14:11:35 2020 +0200 parisc: Define O_NONBLOCK to become 000200000 HPUX has separate NDELAY & NONBLOCK values. In the past we wanted to be able to run HP-UX binaries natively on parisc Linux which is why we defined O_NONBLOCK to 000200004 to distinguish NDELAY & NONBLOCK bits. But with 2 bits set in this bitmask we often ran into compatibility issues with other Linux applications which often only test one bit (or even compare the values). To avoid such issues in the future, this patch changes O_NONBLOCK to become 000200000. That way old programs will still be functional, and for new programs we now have only one bit set. Update the comment about SOCK_NONBLOCK too. Signed-off-by: Helge Deller commit 41f5a81c07cd410917c9ae3c165b9b761d48ba75 Author: Helge Deller Date: Sat Aug 29 13:57:07 2020 +0200 parisc: Drop HP-UX specific fcntl and signal flags Those flags are nowhere used in the Linux kernel and were added when we still wanted to support HP-UX in a compat mode. Since we never will support HP-UX, drop those flags. Signed-off-by: Helge Deller commit f4d0d40cd1f19104e4f60537973ff5ac2f90123e Author: Helge Deller Date: Fri Aug 14 15:14:12 2020 +0200 parisc: Avoid external interrupts when IPI finishes No need to allow external interrupts when the IPI loop is going to finish now. Signed-off-by: Helge Deller commit 024f5b597564acced9e69305f7a9ef1202186a61 Author: Helge Deller Date: Sat Aug 29 10:02:38 2020 +0200 parisc: Add qemu fw_cfg interface When running on qemu, SeaBIOS-hppa stores the iomem address for the emulated fw_cfg port in PAGE0_>pad0[2/3]. Let the Linux driver auto-configure the fw_cfg interface with it, so that the fw_cfg info shows up in /sys/firmware/qemu_fw_cfg. Signed-off-by: Helge Deller commit 6b698713d4e99e5a64e2d07f0df90545809227b9 Author: Helge Deller Date: Sat Aug 29 10:00:40 2020 +0200 fw_cfg: Add support for parisc architecture Signed-off-by: Helge Deller commit f2c6855159228861f4552d563c13f5b194b9889f Author: Mauro Carvalho Chehab Date: Thu Sep 10 10:27:17 2020 +0200 Input: sparse-keymap: add a description for @sw Add a description for it, in order to avoids this warning: ./include/linux/input/sparse-keymap.h:43: warning: Function parameter or member 'sw' not described in 'key_entry' Signed-off-by: Mauro Carvalho Chehab commit 72a2fbda53d057081d0bca2db221995435fb0d1e Author: Mauro Carvalho Chehab Date: Thu Sep 10 10:20:34 2020 +0200 rcu/tree: docs: document bkvcache new members at struct kfree_rcu_cpu Changeset 53c72b590b3a ("rcu/tree: cache specified number of objects") added new members for struct kfree_rcu_cpu, but didn't add the corresponding at the kernel-doc markup, as repoted when doing "make htmldocs": ./kernel/rcu/tree.c:3113: warning: Function parameter or member 'bkvcache' not described in 'kfree_rcu_cpu' ./kernel/rcu/tree.c:3113: warning: Function parameter or member 'nr_bkv_objs' not described in 'kfree_rcu_cpu' So, move the description for bkvcache to kernel-doc, and add a description for nr_bkv_objs. Fixes: 53c72b590b3a ("rcu/tree: cache specified number of objects") Acked-by: Paul E. McKenney Signed-off-by: Mauro Carvalho Chehab commit 8a50c0572ffa816d0067fcf24911a27efd45237c Author: Mauro Carvalho Chehab Date: Thu Sep 10 10:06:47 2020 +0200 nl80211: docs: add a description for s1g_cap parameter Changeset df78a0c0b67d ("nl80211: S1G band and channel definitions") added a new parameter, but didn't add the corresponding kernel-doc markup, as repoted when doing "make htmldocs": ./include/net/cfg80211.h:471: warning: Function parameter or member 's1g_cap' not described in 'ieee80211_supported_band' Add a documentation for it. Fixes: df78a0c0b67d ("nl80211: S1G band and channel definitions") Signed-off-by: Thomas Pedersen Signed-off-by: Mauro Carvalho Chehab commit 1b7743912bcf2b4a9d9c96de668542156450554f Author: Mauro Carvalho Chehab Date: Thu Sep 10 09:25:14 2020 +0200 usb: docs: document altmode register/unregister functions The typec_bus.rst asks for documentation of those two functions, but they don't exist: ./drivers/usb/typec/bus.c:1: warning: 'typec_altmode_unregister_driver' not found ./drivers/usb/typec/bus.c:1: warning: 'typec_altmode_register_driver' not found Also, they're not declared on bus.c but, instead, at a header file (typec_altmode.h). So, add documentation for both functions at the header and change the kernel-doc markup under typec_bus.rst to point to the right place. While here, also place the documentation for both structs declared on typec_altmode.h at the rst file. Signed-off-by: Mauro Carvalho Chehab commit 623050ae373162a65973f62c128eabe3ec288c4d Author: Mauro Carvalho Chehab Date: Wed Sep 9 12:07:49 2020 +0200 kunit: test.h: fix a bad kernel-doc markup As warned by: ./include/kunit/test.h:504: WARNING: Block quote ends without a blank line; unexpected unindent. The right way to describe a function is: name - description Instead, kunit_remove_resource was using: name: description Causing it to be improperly parsed. Signed-off-by: Mauro Carvalho Chehab commit 074b3aad307de6126fbac1fff4996d1034b48fee Author: Mauro Carvalho Chehab Date: Wed Sep 9 11:53:43 2020 +0200 drivers: core: fix kernel-doc markup for dev_err_probe() There are two literal blocks there. Fix the markups, in order to produce the right html output and solve those warnings: ./drivers/base/core.c:4218: WARNING: Unexpected indentation. ./drivers/base/core.c:4222: WARNING: Definition list ends without a blank line; unexpected unindent. ./drivers/base/core.c:4223: WARNING: Block quote ends without a blank line; unexpected unindent. Fixes: a787e5400a1c ("driver core: add device probe log helper") Signed-off-by: Mauro Carvalho Chehab commit 5cd3ddc186bbba1de57cd0bf55b67e13f961685b Author: Mauro Carvalho Chehab Date: Wed Sep 9 11:44:33 2020 +0200 docs: bio: fix a kerneldoc markup Fix this warning: ./block/bio.c:1098: WARNING: Inline emphasis start-string without end-string. The thing is that *iter is not a valid markup. That seems to be a typo: *iter -> @iter Signed-off-by: Mauro Carvalho Chehab commit 38d9b909f90e715c4b5d572e4e9c914a10931094 Author: Mauro Carvalho Chehab Date: Thu Aug 27 08:31:43 2020 +0200 kunit: test.h: solve kernel-doc warnings There are some warnings there: ./include/kunit/test.h:90: warning: Function parameter or member 'name' not described in 'kunit_resource' ./include/kunit/test.h:353: warning: Function parameter or member 'res' not described in 'kunit_add_resource' ./include/kunit/test.h:367: warning: Function parameter or member 'res' not described in 'kunit_add_named_resource' ./include/kunit/test.h:367: warning: Function parameter or member 'name' not described in 'kunit_add_named_resource' ./include/kunit/test.h:367: warning: Function parameter or member 'data' not described in 'kunit_add_named_resource' ./include/kunit/test.h:367: warning: Excess function parameter 'name_data' description in 'kunit_add_named_resource' Address them, ensuring that all non-private arguments will be properly described. With that regards, at struct kunit_resource, the free argument is described as user-provided. So, this doesn't seem to belong to the "private" part of the struct. Signed-off-by: Mauro Carvalho Chehab commit 5b874af627004ac3660c96cb1bcfaefb7c9e7130 Author: Mauro Carvalho Chehab Date: Thu Aug 27 07:51:44 2020 +0200 block: bio: fix a warning at the kernel-doc markups Using "@bio's parent" causes the following waring: ./block/bio.c:10: WARNING: Inline emphasis start-string without end-string. The main problem here is that this would be converted into: **bio**'s parent By kernel-doc, which is not a valid notation. It would be possible to use, instead, this kernel-doc markup: ``bio's`` parent Yet, here, is probably simpler to just use an altenative language: the parent of @bio Signed-off-by: Mauro Carvalho Chehab commit 209b44c804c0b99a7697950e2596b58cd838358d Author: Mauro Carvalho Chehab Date: Thu Aug 27 07:35:37 2020 +0200 docs: powerpc: syscall64-abi.rst: fix a malformed table As reported: Documentation/powerpc/syscall64-abi.rst:53: WARNING: Malformed table. Text in column margin in table line 2. =========== ============= ======================================== --- For the sc instruction, differences with the ELF ABI --- r0 Volatile (System call number.) This table requires a different notation to be valid. Signed-off-by: Mauro Carvalho Chehab commit d4dd87f83c6a09ef378172ebed6e0de2ca0dd8ba Author: Mauro Carvalho Chehab Date: Wed Aug 26 12:32:31 2020 +0200 drivers: net: hamradio: fix document location The hamradio docs were moved to a different dir. Update its location accordingly. Fixes: 14474950252c ("docs: networking: move z8530 to the hw driver section") Signed-off-by: Mauro Carvalho Chehab commit edba14eb1f45128b7c8de47e87fc95eebdbcf089 Author: Mauro Carvalho Chehab Date: Wed Aug 26 12:30:51 2020 +0200 net: appletalk: Kconfig: Fix docs location The location of ltpc.rst changed. Update it at Kconfig. Fixes: 4daedf7abb41 ("docs: networking: move AppleTalk / LocalTalk drivers to the hw driver section") Signed-off-by: Mauro Carvalho Chehab commit 480017f00c6b8f843b9604a38f544a99881a67b1 Author: Mauro Carvalho Chehab Date: Wed Aug 26 10:03:52 2020 +0200 dt-bindings: fix references to files converted to yaml There were several files converted to yaml, but the .txt file is still referenced somewhere else. Update the references for them to point to the right file. Signed-off-by: Mauro Carvalho Chehab commit 1bf162e44aac18bd1789c346ffdf12a08ff66a43 Author: Mauro Carvalho Chehab Date: Mon Sep 28 15:50:33 2020 +0200 memblock: get rid of a :c:type leftover chanseset b3a7bb1851c8 ("docs: get rid of :c:type explicit declarations for structs") removed several :c:type: markups, except by one. Now, Sphinx 3.x complains about it: .../Documentation/core-api/boot-time-mm:26: ../mm/memblock.c:51: WARNING: Unparseable C cross-reference: 'struct\nmemblock_type' Invalid C declaration: Expected identifier in nested name, got keyword: struct [error at 6] struct memblock_type ------^ As, on Sphinx 3.x, the right markup is c:struct:`foo`. So, let's remove it, relying on automarkup.py to convert it. Reviewed-by: Mike Rapoport Signed-off-by: Mauro Carvalho Chehab commit c2a9a645591f11761fdbe3c7f45c0ad32af97eb4 Author: Mauro Carvalho Chehab Date: Mon Sep 28 15:25:17 2020 +0200 math64.h: kernel-docs: Convert some markups into normal comments There are several functions at math64.h that are also defined at div64.c. As both are included at kernel-api.rst, Sphinx 3.x complains about symbol duplication: ./lib/math/div64.c:73: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'. Declaration is 'div_s64_rem'. ./lib/math/div64.c:104: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'. Declaration is 'div64_u64_rem'. ./lib/math/div64.c:144: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'. Declaration is 'div64_u64'. ./lib/math/div64.c:172: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'. Declaration is 'div64_s64'. In order to avoid Sphinx warnings about duplication, change the kernel-doc markups to just comments at math64.h. Reviewed-by: Vincenzo Frascino Signed-off-by: Mauro Carvalho Chehab commit 5e44635cc936c5d4f70b4858e2d82b26e0fd3e4e Author: Mauro Carvalho Chehab Date: Thu Sep 17 05:37:35 2020 +0200 media: uAPI: buffer.rst: remove a left-over documentation Changeset 129134e5415d ("media: media/v4l2: remove V4L2_FLAG_MEMORY_NON_CONSISTENT flag") reverted an uAPI flag, but it kept some left-overs at the documentation. Drop them too. This should solve this warning: Documentation/userspace-api/media/v4l/buffer.rst:692: WARNING: The "flat-table" directive is empty; content required. .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 Fixes: 129134e5415d ("media: media/v4l2: remove V4L2_FLAG_MEMORY_NON_CONSISTENT flag") Signed-off-by: Mauro Carvalho Chehab commit ed159f972408ae7d0630be7b653515a7d3243ea5 Author: Mauro Carvalho Chehab Date: Tue Oct 6 14:57:42 2020 +0200 docs: zh_CN: amu.rst: fix document title markup As warned by Sphinx 2.4.4: .../Documentation/translations/zh_CN/arm64/amu.rst:7: WARNING: Title overline too short. Increase its size. Signed-off-by: Mauro Carvalho Chehab commit f41f716dc3feee0ce311b7fbbc889088796b3f06 Author: Mauro Carvalho Chehab Date: Mon Oct 5 11:03:49 2020 +0200 docs: infrastructure.rst: exclude device_link_state from device.h This is already documented at device_link.rst, causing this warning, due to a broken cross-reference: .../Documentation/driver-api/device_link.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/infrastructure'. Declaration is 'device_link_state'. Signed-off-by: Mauro Carvalho Chehab commit 14059a38a434c8274e155019d0fb962d21a0499e Author: Mauro Carvalho Chehab Date: Wed Sep 30 10:14:07 2020 +0200 docs: conf.py: change the Sphinx 3.x+ text After the build fix patches, it is believed that the output with Sphinx 3.x won't be a problem. Still, the C domain support was re-written, and this can have caused hidden issues. So, let's keep the warning, changing it to a lighter warning text. Signed-off-by: Mauro Carvalho Chehab commit b34b86d7a418f38c0b2e6eee1c03f81dfcee099a Author: Mauro Carvalho Chehab Date: Mon Sep 28 09:42:44 2020 +0200 docs: conf.py: fix c:function support with Sphinx 3.x Sphinx C parser for the C domain is now more pedantic when trying to identify the function types. That prevents scope macros to be used as type defines. Yet, since 3.0.2, it is possible to provide it a list of such macros. Add them, in order to solve several Sphinx 3.x warnings. Signed-off-by: Mauro Carvalho Chehab commit a57c3522e816ab25c11fac0820bedb07e4727bdf Author: Mauro Carvalho Chehab Date: Tue Sep 29 12:51:00 2020 +0200 docs: basics.rst: avoid duplicated C function declaration pci_device_id is already documented at pci.rst: ./Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'PCI/pci'. Declaration is 'pci_device_id'. The kstrtol and kstrtoul are already at kernel-api: ./Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'. Declaration is 'kstrtoul'. ./Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'. Declaration is 'kstrtol'. And the printk is already defined at printk-basics: ./Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/printk-basics'. Declaration is 'printk'. So, exclude those identifiers from basirs.rst. Signed-off-by: Mauro Carvalho Chehab commit ccf1227313cf583cad2d47b043fc3bb90438f2ca Author: Mauro Carvalho Chehab Date: Tue Sep 29 12:43:40 2020 +0200 docs: mei.rst: fix a C expression markup Sphinx 3.x doesn't allow expressions using :c:func markup: ./Documentation/driver-api/mei/mei.rst:41: WARNING: Unparseable C cross-reference: 'close(int fd)' Invalid C declaration: Expected end of definition. [error at 5] close(int fd) -----^ So, convert it into a :c:expr. Acked-by: Tomas Winkler Signed-off-by: Mauro Carvalho Chehab commit 366a07651830a0a2c0e58c9c70ef534012d3cbe2 Author: Mauro Carvalho Chehab Date: Tue Sep 29 12:41:11 2020 +0200 docs: it_IT: hacking.rst: fix a typo on a markup There's a missing "`", causing this warning: ./Documentation/translations/it_IT/kernel-hacking/hacking.rst:404: WARNING: Unparseable C cross-reference: 'cpu_to_be32p(), che prende un puntatore\nad un tipo, e ritorna il valore convertito. L\'altra variante per\nla famiglia di conversioni "in-situ", come :c:func:`cpu_to_be32s' Invalid C declaration: Expected end of definition. [error at 14] cpu_to_be32p(), che prende un puntatore ad un tipo, e ritorna il valore convertito. L'altra variante per la famiglia di conversioni "in-situ", come :c:func:`cpu_to_be32s --------------^ Acked-by: Federico Vaga Signed-off-by: Mauro Carvalho Chehab commit 2f27ed756813887395e3b287fc6522c06a56e528 Author: Mauro Carvalho Chehab Date: Tue Sep 29 12:38:37 2020 +0200 docs: devices.rst: fix a C reference markup The C domain parser of Sphinx3 expects just function names for :c:func: markups: ./Documentation/driver-api/pm/devices.rst:413: WARNING: Unparseable C cross-reference: 'device_may_wakeup(dev)' Invalid C declaration: Expected end of definition. [error at 17] device_may_wakeup(dev) -----------------^ Signed-off-by: Mauro Carvalho Chehab commit 11604da24851ca9590bdd90bf7adb182813d3780 Author: Mauro Carvalho Chehab Date: Tue Sep 29 11:41:38 2020 +0200 docs: gpu: i915.rst: Fix several C duplication warnings As reported by Sphinx: ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1147: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_oa_wait_unlocked'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1169: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_oa_poll_wait'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1189: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_oa_read'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2669: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_oa_stream_enable'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2734: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_oa_stream_disable'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2820: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_oa_stream_init'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3010: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_read'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3098: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_poll_locked'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3129: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_poll'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3152: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_enable_locked'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3181: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_disable_locked'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3273: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_ioctl'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3296: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_destroy_locked'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3321: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_release'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3379: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_open_ioctl_locked'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3534: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'read_properties_unlocked'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3717: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_open_ioctl'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3760: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_register'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3789: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_unregister'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4009: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_add_config_ioctl'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4162: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_remove_config_ioctl'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4260: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_init'. ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4423: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. Declaration is 'i915_perf_fini'. With Sphinx 3, C declarations can't be duplicated anymore, so let's exclude those from the other internals found on i915_perf.c file. Signed-off-by: Mauro Carvalho Chehab commit afe178adb9f263922d358d0aa9a04a34c5278e27 Author: Mauro Carvalho Chehab Date: Tue Sep 29 11:50:50 2020 +0200 docs: infrastructure.rst: don't include firmware kernel-doc Those are already documented at: Documentation/driver-api/firmware/request_firmware.rst Including it twice is causing lots of warnings: ./Documentation/driver-api/infrastructure.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/firmware/request_firmware'. Declaration is 'request_firmware'. ./Documentation/driver-api/infrastructure.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/firmware/request_firmware'. Declaration is 'firmware_request_nowarn'. ./Documentation/driver-api/infrastructure.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/firmware/request_firmware'. Declaration is 'request_firmware_direct'. ./Documentation/driver-api/infrastructure.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/firmware/request_firmware'. Declaration is 'firmware_request_platform'. ./Documentation/driver-api/infrastructure.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/firmware/request_firmware'. Declaration is 'firmware_request_cache'. ./Documentation/driver-api/infrastructure.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/firmware/request_firmware'. Declaration is 'request_firmware_into_buf'. ./Documentation/driver-api/infrastructure.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/firmware/request_firmware'. Declaration is 'request_firmware_nowait'. Signed-off-by: Mauro Carvalho Chehab commit b989451b8e0015b8fe2fac0736ab84bf4389fcb0 Author: Mauro Carvalho Chehab Date: Tue Sep 29 11:23:19 2020 +0200 docs: libata.rst: fix a wrong usage of :c:type: tag The usage of :c:type: to reference to a struct member is wrong, as pointed by Sphinx 3: ./Documentation/driver-api/libata.rst:511: WARNING: Unparseable C cross-reference: 'qc->complete_fn' Invalid C declaration: Expected end of definition. [error at 2] qc->complete_fn --^ Instead, let's use :c:expr: for such purpose. Signed-off-by: Mauro Carvalho Chehab commit 365ff56f08ee4f2b933c13ab4cd950aad1454521 Author: Mauro Carvalho Chehab Date: Tue Sep 29 11:18:20 2020 +0200 docs: kgdb.rst: fix :c:type: usages Which Sphinx 3, :c:type: can't be used anymore for structs, as this should be used only for typedefs. Rely on automarkup.py for struct references. This file has an special case, though: it uses the tag also to point to an array. Let's use, instead, :c:expr: for such purpose, as it should do the right thing. This should fix this warning: ./Documentation/dev-tools/kgdb.rst:875: WARNING: Unparseable C cross-reference: 'kdb_poll_funcs[]' Invalid C declaration: Expected end of definition. [error at 14] kdb_poll_funcs[] --------------^ Acked-by: Daniel Thompson Signed-off-by: Mauro Carvalho Chehab commit 64d4151658c14b18905ba0d82cc26ccf6b92a1a1 Author: Mauro Carvalho Chehab Date: Tue Sep 29 11:09:46 2020 +0200 docs: fpga: replace :c:member: macros Those macros are not doing the right thing with Sphinx 3, causing parse errors: ./Documentation/driver-api/fpga/fpga-mgr.rst:104: WARNING: Unparseable C cross-reference: 'fpga_manager->state' Invalid C declaration: Expected end of definition. [error at 12] fpga_manager->state ------------^ ./Documentation/driver-api/fpga/fpga-programming.rst:18: WARNING: Unparseable C cross-reference: 'fpga_region->info' Invalid C declaration: Expected end of definition. [error at 11] fpga_region->info -----------^ ./Documentation/driver-api/fpga/fpga-region.rst:62: WARNING: Unparseable C cross-reference: 'fpga_region->bridge_list' Invalid C declaration: Expected end of definition. [error at 11] fpga_region->bridge_list -----------^ ./Documentation/driver-api/fpga/fpga-region.rst:62: WARNING: Unparseable C cross-reference: 'fpga_region->get_bridges' Invalid C declaration: Expected end of definition. [error at 11] fpga_region->get_bridges -----------^ Replace them by :c:expr:, with does what's desired. Reviewed-by: Moritz Fischer Signed-off-by: Mauro Carvalho Chehab commit 4d9d18ad669170eb97606bcbe832517495737c57 Author: Mauro Carvalho Chehab Date: Tue Sep 29 10:54:36 2020 +0200 docs: writing-an-alsa-driver.rst: fix some bad c:func: markups Some such markups are invalid, as reported by Sphinx: ./Documentation/sound/kernel-api/writing-an-alsa-driver.rst:3317: WARNING: Unparseable C cross-reference: 'snd_rawmidi_transmit*' Invalid C declaration: Expected end of definition. [error at 20] snd_rawmidi_transmit* --------------------^ ./Documentation/sound/kernel-api/writing-an-alsa-driver.rst:3917: WARNING: Unparseable C cross-reference: 'copy_from/to_user' Invalid C declaration: Expected end of definition. [error at 9] copy_from/to_user ---------^ The first case seems to be better replaced by a literal. For the second one, let's generate cross-references, by spliting it in two. Reviewed-by: Takashi Iwai Signed-off-by: Mauro Carvalho Chehab commit 8ac867340bd8cc8c65d4cafbf634873b8ddcf3f7 Author: Mauro Carvalho Chehab Date: Tue Sep 29 10:04:26 2020 +0200 docs: block: blk-mq.rst: get rid of :c:type The :c:type macros are not used properly there, as reported by Sphinx 3: ./Documentation/block/blk-mq.rst:112: WARNING: Unparseable C cross-reference: 'hctx->dispatch' Invalid C declaration: Expected end of definition. [error at 4] hctx->dispatch ----^ Also, they won't be generating any cross references. So, replace them by a literal markup. Reviewed-by: André Almeida Signed-off-by: Mauro Carvalho Chehab commit 687359027578068aecde0fc0bec06ccae6b762c7 Author: Mauro Carvalho Chehab Date: Tue Sep 29 09:52:52 2020 +0200 docs: sound: writing-an-alsa-driver.rst: get rid of :c:type the :c:type shouldn't be used with structs with Sphinx 3, as the C domain there uses .. c:struct for structs. As we have the automarkup extension, let's just get rid of all :c:type as a whole, as those will be automagically marked as such. This solves a bunch of warnings with Sphinx 3, like those: .../Documentation/sound/kernel-api/writing-an-alsa-driver.rst:490: WARNING: Unparseable C cross-reference: 'calling snd_card_free' Invalid C declaration: Expected end of definition. [error at 8] calling snd_card_free --------^ .../Documentation/sound/kernel-api/writing-an-alsa-driver.rst:3328: WARNING: Unparseable C cross-reference: 'snd_rawmidi_transmit*' Invalid C declaration: Expected end of definition. [error at 20] snd_rawmidi_transmit* --------------------^ .../Documentation/sound/kernel-api/writing-an-alsa-driver.rst:3928: WARNING: Unparseable C cross-reference: 'copy_from/to_user' Invalid C declaration: Expected end of definition. [error at 9] copy_from/to_user ---------^ Reviewed-by: Takashi Iwai Signed-off-by: Mauro Carvalho Chehab commit 6624d64da6bf2f62a8588fca81077dbeedb62116 Author: Mauro Carvalho Chehab Date: Tue Sep 29 09:20:06 2020 +0200 docs: devices.rst: get rid of :c:type macros There's no need to use macros to use :c:type on this file, as automarkup.py should do this automatically. Also, this breaks compatibility with Sphinx 3.x, as there, structs should be declared using .. c:struct. So, get rid of them. Signed-off-by: Mauro Carvalho Chehab commit 74e2f8d300d4bf3a899869a376fed669753913f0 Author: Mauro Carvalho Chehab Date: Wed Oct 14 08:40:47 2020 +0200 docs: fs: fscrypt.rst: get rid of :c:type: tags The :c:type: tag has problems with Sphinx 3.x, as structs there should be declared with c:struct. So, remove them, relying at automarkup.py extension to convert them into cross-references. Signed-off-by: Mauro Carvalho Chehab commit b30fd8e962cc89fe368715e0d23986b3579a6b40 Author: Mauro Carvalho Chehab Date: Tue Sep 29 09:04:22 2020 +0200 docs: pstore-blk.rst: fix kernel-doc tags There is currently a problem with kernel-doc tags from blk.c: .../Documentation/admin-guide/pstore-blk:239: ./fs/pstore/blk.c:175: WARNING: Duplicate C declaration, also defined in 'admin-guide/pstore-blk'. Declaration is 'register_pstore_device'. .../Documentation/admin-guide/pstore-blk:239: ./fs/pstore/blk.c:432: WARNING: Duplicate C declaration, also defined in 'admin-guide/pstore-blk'. Declaration is 'register_pstore_blk'. .../Documentation/admin-guide/pstore-blk:242: ./include/linux/pstore_blk.h:43: WARNING: Duplicate C declaration, also defined in 'admin-guide/pstore-blk'. Declaration is 'pstore_device_info'. Basically, the internal parts is shown with :export:, instead of :internal:. Yet, there are some other exported docs that aren't at the document, because they lack :identifiers:. So, instead, let's just use :export: at the kAPI part of the documentation. Acked-by: Kees Cook Signed-off-by: Mauro Carvalho Chehab commit 044248db5db16f8aec28c08d505a4467d3afb3cb Author: Mauro Carvalho Chehab Date: Tue Sep 29 08:39:30 2020 +0200 docs: basics.rst: get rid of rcu kernel-doc macros Those are already defined at kernel-api.rst, as part of the synchronization primitives chapter. This solves several Sphinx 3 warnings, like: .../Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'. Declaration is 'rcu_idle_enter'. .../Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'. Declaration is 'rcu_idle_exit'. .../Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'. Declaration is 'rcu_is_watching'. .../Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'. Declaration is 'call_rcu'. .../Documentation/driver-api/basics.rst: WARNING: Duplicate C declaration, also defined in 'core-api/kernel-api'. Declaration is 'synchronize_rcu'. ... Signed-off-by: Mauro Carvalho Chehab commit 58bc57b0de854f657b58a4f87f44ea82b8240719 Author: Mauro Carvalho Chehab Date: Mon Sep 28 17:01:31 2020 +0200 docs: device_link.rst: remove duplicated kernel-doc include The infrastructure.rst file already includes the external symbols from drivers/base/core.c. Duplicating 3 functions there causes namespace collisions: Documentation/driver-api/device_link.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/infrastructure'. Declaration is 'device_link_state'. Documentation/driver-api/device_link.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/infrastructure'. Declaration is 'device_link_add'. Documentation/driver-api/device_link.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/infrastructure'. Declaration is 'device_link_del'. Documentation/driver-api/device_link.rst: WARNING: Duplicate C declaration, also defined in 'driver-api/infrastructure'. Declaration is 'device_link_remove'. So, drop the reference, adding just a mention to the functions associated with device_link. Signed-off-by: Mauro Carvalho Chehab commit 3048ba60070e9ce00ed72b73cdfc1feb2641f8a1 Author: Mauro Carvalho Chehab Date: Mon Sep 28 16:54:17 2020 +0200 docs: scsi: target.rst: remove iSCSI transport class kernel-doc markup This is already included at scsi.rst. So, remove the duplication, in order to avoid Sphinx warnings. Signed-off-by: Mauro Carvalho Chehab commit c9e3d519ee37631a15d7940e9f1856c4e6206854 Author: Mauro Carvalho Chehab Date: Mon Sep 28 16:49:26 2020 +0200 docs: basics.rst: move kernel-doc workqueue markups to workqueue.rst As there's already a rst file with workqueue markups, containing part of them, move the other definitions, in order to avoid warnings with Sphinx. Signed-off-by: Mauro Carvalho Chehab commit 1842c96beebb1bab9241c3f55091d5f975f37926 Author: Mauro Carvalho Chehab Date: Mon Sep 28 16:31:44 2020 +0200 docs: remove sound API duplication The sound API is documented on two different parts: under Documentation/driver-api/sound.rst and under Documentation/sound/kernel-api/alsa-driver-api.rst. The alsa-driver-api.rst seems more complete, and APIs are split per type. There's just one missing kernel-doc markup there. Add it and drop the duplicated one. Reviewed-by: Takashi Iwai Signed-off-by: Mauro Carvalho Chehab commit f182e7fd5c066f99b7171bc659f9182f4b758e3a Author: Mauro Carvalho Chehab Date: Mon Sep 28 15:43:43 2020 +0200 docs: kernel-api.rst: drop kernel/irq/manage.c kernel-doc tag This is already included at genericirq.rst. Adding it twice causes C namespace duplication: .../Documentation/core-api/kernel-api:237: ../kernel/irq/manage.c:100: WARNING: Duplicate C declaration, also defined in 'genericirq'. Declaration is 'synchronize_hardirq'. .../Documentation/core-api/kernel-api:237: ../kernel/irq/manage.c:128: WARNING: Duplicate C declaration, also defined in 'genericirq'. Declaration is 'synchronize_irq'. .../Documentation/core-api/kernel-api:237: ../kernel/irq/manage.c:443: WARNING: Duplicate C declaration, also defined in 'genericirq'. Declaration is 'irq_set_affinity_notifier'. ... Signed-off-by: Mauro Carvalho Chehab commit 9b9b0bda7d8acc7400f868147997b55093d69416 Author: Mauro Carvalho Chehab Date: Mon Sep 28 13:13:07 2020 +0200 docs: genericirq.rst: don't document chip.c functions twice Currently, kernel/irq/chip.c is included twice, one for export functions, and then for internal ones. However, as the :export: and :internal: tags are missing, they ended being included twice. Signed-off-by: Mauro Carvalho Chehab commit 640e3f80a6f23b07525d619558b50957ee8d78a1 Author: Mauro Carvalho Chehab Date: Mon Sep 28 10:17:12 2020 +0200 docs: net: ieee802154.rst: fix C expressions There are some warnings produced with Sphinx 3.x: Documentation/networking/ieee802154.rst:29: WARNING: Error in declarator or parameters Invalid C declaration: Expecting "(" in parameters. [error at 7] int sd = socket(PF_IEEE802154, SOCK_DGRAM, 0); -------^ Documentation/networking/ieee802154.rst:134: WARNING: Invalid C declaration: Expected end of definition. [error at 81] void ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi): ---------------------------------------------------------------------------------^ Documentation/networking/ieee802154.rst:139: WARNING: Invalid C declaration: Expected end of definition. [error at 95] void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb, bool ifs_handling): -----------------------------------------------------------------------------------------------^ Documentation/networking/ieee802154.rst:158: WARNING: Invalid C declaration: Expected end of definition. [error at 35] int start(struct ieee802154_hw *hw): -----------------------------------^ Documentation/networking/ieee802154.rst:162: WARNING: Invalid C declaration: Expected end of definition. [error at 35] void stop(struct ieee802154_hw *hw): -----------------------------------^ Documentation/networking/ieee802154.rst:166: WARNING: Invalid C declaration: Expected end of definition. [error at 61] int xmit_async(struct ieee802154_hw *hw, struct sk_buff *skb): -------------------------------------------------------------^ Documentation/networking/ieee802154.rst:171: WARNING: Invalid C declaration: Expected end of definition. [error at 43] int ed(struct ieee802154_hw *hw, u8 *level): -------------------------------------------^ Documentation/networking/ieee802154.rst:176: WARNING: Invalid C declaration: Expected end of definition. [error at 62] int set_channel(struct ieee802154_hw *hw, u8 page, u8 channel): --------------------------------------------------------------^ Caused by some bad c:function: prototypes. Fix them. Acked-by: David S. Miller Signed-off-by: Mauro Carvalho Chehab commit 71a8156e9448e4edbcef64042a8612152324efb9 Author: Mauro Carvalho Chehab Date: Mon Sep 28 09:51:26 2020 +0200 docs: it_IT: fix namespace collisions at locking.rst The C domain functions there collide with the English ones, due to namespace collision, generating lots of warnings with Sphinx 3.x: ./include/linux/mutex.h:121: WARNING: Duplicate C declaration, also defined in 'translations/it_IT/kernel-hacking/locking'. Declaration is 'mutex_init'. ./include/linux/mutex.h:152: WARNING: Duplicate C declaration, also defined in 'translations/it_IT/kernel-hacking/locking'. Declaration is 'mutex_is_locked'. ./include/linux/mutex.h:226: WARNING: Duplicate C declaration, also defined in 'translations/it_IT/kernel-hacking/locking'. Declaration is 'mutex_trylock_recursive'. ./kernel/locking/mutex.c:281: WARNING: Duplicate C declaration, also defined in 'translations/it_IT/kernel-hacking/locking'. Declaration is 'mutex_lock'. ... Add a namespace tag there, in order to prevent that. Acked-by: Federico Vaga Signed-off-by: Mauro Carvalho Chehab commit d7faad159a7a8188aa759cc528498449181cedb1 Author: Mauro Carvalho Chehab Date: Sat Sep 26 09:06:17 2020 +0200 docs: trace-uses.rst: remove bogus c-domain tags There are some c-domain tags that are wrong. While this won't cause problems with Sphinx < 3.0, this cause troubles with newer versions, as the C parser won't recognize the contents of the tag, and will drop it from the output. Let's just place them at literal blocks. Reviewed-by: Kamalesh Babulal Acked-by: Steven Rostedt (VMware) Signed-off-by: Mauro Carvalho Chehab commit 9303c9d5e9883d5aef73e58baa595395f09954c5 Author: Mauro Carvalho Chehab Date: Fri Sep 25 12:01:25 2020 +0200 docs: get rid of :c:type explicit declarations for structs The :c:type:`foo` only works properly with structs before Sphinx 3.x. On Sphinx 3.x, structs should now be declared using the .. c:struct, and referenced via :c:struct tag. As we now have the automarkup.py macro, that automatically convert: struct foo into cross-references, let's get rid of that, solving several warnings when building docs with Sphinx 3.x. Reviewed-by: André Almeida # blk-mq.rst Reviewed-by: Takashi Iwai # sound Reviewed-by: Mike Rapoport Reviewed-by: Greg Kroah-Hartman Signed-off-by: Mauro Carvalho Chehab commit abc59fd4a56abba8a9d9beadac7a371f4bb76187 Author: Mauro Carvalho Chehab Date: Fri Sep 25 09:38:33 2020 +0200 docs: remove some replace macros like |struct foo| There are three files with replace macros for structs, mapping them into Sphinx 2.x C domain references. Well, this is broken on Sphinx 3.x. Also, for Sphinx 2.x, the automarkup macro should be able to take care of them. So, let's just drop those. Signed-off-by: Mauro Carvalho Chehab commit 5b76632ed957e7b43e12f4105d0efb8d734fc659 Author: Mauro Carvalho Chehab Date: Sat Sep 26 09:08:38 2020 +0200 media: cec-core.rst: don't use c:type for structs The new C domain code on Sphinx 3 doesn't allow anymore to use c:type:: for structs. Now that cdomain.py has backward support, let's use c:struct:: instead. Signed-off-by: Mauro Carvalho Chehab commit 5f536f4a221b831bc2fb666d4cdb0e0892e72dc4 Author: Mauro Carvalho Chehab Date: Fri Sep 25 07:29:25 2020 +0200 media: docs: make RC documents more compatible with Sphinx 3.1+ Sphinx 3.x broke support for the cdomain.py extension, as the c domain code was rewritten. Due to that, the c tags need to be re-written, in order to use the new c domain notation. Signed-off-by: Mauro Carvalho Chehab commit 937e68053d82e9050a0ce60172094726445c5e8b Author: Mauro Carvalho Chehab Date: Thu Sep 24 16:57:41 2020 +0200 media: docs: make MC documents more compatible with Sphinx 3.1+ Sphinx 3.x broke support for the cdomain.py extension, as the c domain code was rewritten. Due to that, the c tags need to be re-written, in order to use the new c domain notation. Signed-off-by: Mauro Carvalho Chehab commit f9b2e8aa326fefa21360a778e40cae486969293b Author: Mauro Carvalho Chehab Date: Thu Sep 24 16:56:00 2020 +0200 media: docs: make DVB documents more compatible with Sphinx 3.1+ Sphinx 3.x broke support for the cdomain.py extension, as the c domain code was rewritten. Due to that, the c tags need to be re-written, in order to use the new c domain notation. Signed-off-by: Mauro Carvalho Chehab commit 407e84cd1e9a802df1955e281d8956439abc499b Author: Mauro Carvalho Chehab Date: Thu Sep 24 14:04:26 2020 +0200 media: docs: make V4L documents more compatible with Sphinx 3.1+ Sphinx 3.x broke support for the cdomain.py extension, as the c domain code was rewritten. Due to that, the c tags need to be re-written, in order to use the new c domain notation. Signed-off-by: Mauro Carvalho Chehab commit 01fae02d8d67116f5b9bc36a8571356aa76f02f0 Author: Mauro Carvalho Chehab Date: Thu Sep 24 08:15:55 2020 +0200 media: docs: make CEC documents compatible with Sphinx 3.1+ Sphinx 3.x broke support for the cdomain.py extension, as the c domain code was rewritten. Due to that, the c tags need to be re-written, in order to use the new c domain notation. Signed-off-by: Mauro Carvalho Chehab commit c51d9b046f907b7c96760700c6bdda6fbe38de60 Author: Nícolas F. R. A. Prado Date: Tue Oct 13 23:13:34 2020 +0000 docs: automarkup.py: Add cross-reference for parametrized C macros Sphinx 3 added support for declaring C macros with parameters using the :c:macro role. To support automarkup for both functions and parametrized macros using the same regex (words ending in ()), try to cross-reference to both, and only fall back to regular text if neither exist. Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Mauro Carvalho Chehab commit 3050edfd7971da7fddc77ac7c4607697ec10a554 Author: Nícolas F. R. A. Prado Date: Tue Oct 13 23:13:23 2020 +0000 docs: automarkup.py: Skip C reserved words when cross-referencing With the transition to Sphinx 3, new warnings were caused by automarkup, exposing bugs in the name matching. When automarkup parsed a text like "struct struct" in the documentation, it tried to cross-reference to a "struct" symbol, which is recognized as a C reserved word by Sphinx 3, generating a warning. Add some C reserved words (only the ones that were causing warnings) to a list and skip them while trying to cross-reference. Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Mauro Carvalho Chehab commit f66e47f98c1e827a85654a8cfa1ba539bb381a1b Author: Nícolas F. R. A. Prado Date: Tue Oct 13 23:13:17 2020 +0000 docs: automarkup.py: Fix regexes to solve sphinx 3 warnings With the transition to Sphinx 3, new warnings were generated by automarkup, exposing bugs in the regexes. The warnings were caused by the expressions matching words in the translated versions of the documentation, since any unicode character was matched. Fix the regular expression by making the C regexes use ASCII and ensuring the expressions only match the beginning of words, in order to avoid warnings like this: WARNING: Unparseable C cross-reference: '调用debugfs_rename' That's probably due to the lack of using spaces between words on Chinese. Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Mauro Carvalho Chehab commit 06dc65b0fa6130aae73927399269bdea1b7658d8 Author: Nícolas F. R. A. Prado Date: Tue Oct 13 23:13:11 2020 +0000 docs: automarkup.py: Use new C roles in Sphinx 3 While Sphinx 2 used a single c:type role for struct, union, enum and typedef, Sphinx 3 uses a specific role for each one. To keep backward compatibility, detect the Sphinx version and use the correct roles for that version. Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Mauro Carvalho Chehab commit 2791f47d26d1e49a747a0a1aa2d694e6aab447ab Author: Mauro Carvalho Chehab Date: Tue Sep 29 11:32:18 2020 +0200 docs: kerneldoc.py: add support for kerneldoc -nosymbol Currently, there's no way to exclude identifiers from a kernel-doc markup. Add support for it. Signed-off-by: Mauro Carvalho Chehab commit 91fc6d8afe06698326bdd4d3bcb362c17c52e288 Author: Mauro Carvalho Chehab Date: Mon Sep 28 11:22:12 2020 +0200 docs: kerneldoc.py: append the name of the parsed doc file Finding where an error like this was generated: ../lib/math/div64.c:73: WARNING: Duplicate C declaration, also defined in 'kernel-api'. Can take some time, as there's no glue about what kernel-doc tag generated it. It is a way better to display it as: .../Documentation/core-api/kernel-api:171: ../lib/math/div64.c:73: WARNING: Duplicate C declaration, also defined in 'kernel-api'. Declaration is 'div_s64_rem'. Signed-off-by: Mauro Carvalho Chehab commit 95f49490515e50f7ac23c453241503cd9fb4b434 Author: Mauro Carvalho Chehab Date: Fri Sep 25 13:38:27 2020 +0200 docs: cdomain.py: extend it to handle new Sphinx 3.x tags While most of the C domain parsing is done via kernel-doc, some RST files use C domain tags directly. While several of them can be removed for Sphinx < 3.0, due to automarkup.py, and several others that could be converted into kernel-doc markups, changes like that are time-consuming, and may not fit all cases. As we already have the cdomain.py for handing backward compatibility with Sphinx versions below 3.0, let's make it more complete, in order to cover any usage of the newer tags outside kernel-doc. This way, it should be feasible to use the new tags inside the Kernel tree, without losing backward compatibility. This should allow fixing the remaining warnings with the Kernel tags. Signed-off-by: Mauro Carvalho Chehab commit 71e552aebf260239463d348ecb75b972bee0804b Author: Mauro Carvalho Chehab Date: Thu Sep 24 11:32:38 2020 +0200 docs: cdomain.py: add support for a new Sphinx 3.1+ tag Since Sphinx 3.0, the C domain code was rewritten, but only after version 3.1 it got support for setting namespaces on C domains, with is something that it is required, in order to document system calls, like ioctl() and others. As part of changing the documentation subsystem to properly build with Sphinx 3.1+, add support for such new tag: .. c:namespace::" Such tag optionally replaces the optional "name" tag for functions, setting a single namespace domain for all C references found at the file. With that, it should be possible to convert existing documentation to be compatible with both Sphinx 1.x/2.x and 3.1+. Signed-off-by: Mauro Carvalho Chehab commit 6e9e415854c15dbf920481eb1d245988e405bbc0 Author: Mauro Carvalho Chehab Date: Wed Sep 30 09:47:01 2020 +0200 scripts: kernel-doc: try to use c:function if possible There are a few namespace clashes by using c:macro everywhere: basically, when using it, we can't have something like: .. c:struct:: pwm_capture .. c:macro:: pwm_capture So, we need to use, instead: .. c:function:: int pwm_capture (struct pwm_device * pwm, struct pwm_capture * result, unsigned long timeout) for the function declaration. The kernel-doc change was proposed by Jakob Lykke Andersen here: https://github.com/jakobandersen/linux_docs/commit/6fd2076ec001cca7466857493cd678df4dfe4a65 Although I did a different implementation. Signed-off-by: Mauro Carvalho Chehab commit 5ef09c96d48b41a55121df1b57404f68d7e4e5f1 Author: Mauro Carvalho Chehab Date: Fri Oct 9 10:15:25 2020 +0200 scripts: kernel-doc: fix line number handling Address several issues related to pointing to the wrong line number: 1) ensure that line numbers will always be initialized When section is the default (Description), the line number is not initializing, producing this: $ ./scripts/kernel-doc --enable-lineno ./drivers/media/v4l2-core/v4l2-mem2mem.c|less **Description** #define LINENO 0 In case of streamoff or release called on any context, 1] If the context is currently running, then abort job will be called 2] If the context is queued, then the context will be removed from the job_queue Which is not right. Ensure that the line number will always be there. After applied, the result now points to the right location: **Description** #define LINENO 410 In case of streamoff or release called on any context, 1] If the context is currently running, then abort job will be called 2] If the context is queued, then the context will be removed from the job_queue 2) The line numbers for function prototypes are always + 1, because it is taken at the line after handling the prototype. Change the logic to point to the next line after the /** */ block; 3) The "DOC:" line number should point to the same line as this markup is found, and not to the next one. Probably part of the issues were due to a but that was causing the line number offset to be incremented by one, if --export were used. Signed-off-by: Mauro Carvalho Chehab commit 93351d4196802b3ee01074d96df47b73716984ba Author: Mauro Carvalho Chehab Date: Sun Oct 4 09:44:28 2020 +0200 scripts: kernel-doc: allow passing desired Sphinx C domain dialect When kernel-doc is called via kerneldoc.py, there's no need to auto-detect the Sphinx version, as the Sphinx module already knows it. So, add an optional parameter to allow changing the Sphinx dialect. As kernel-doc can also be manually called, keep the auto-detection logic if the parameter was not specified. On such case, emit a warning if sphinx-build can't be found at PATH. I ended using a suggestion from Joe for using a more readable regex, instead of using a complex one with a hidden group like: m/^(\d+)\.(\d+)(?:\.?(\d+)?)/ in order to get the optional argument. Thanks-to: Joe Perches Suggested-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab commit ed8348e23abce79780f3b679c74a48bcdc47c947 Author: Mauro Carvalho Chehab Date: Wed Sep 30 12:24:43 2020 +0200 scripts: kernel-doc: don't mangle with parameter list While kernel-doc needs to parse parameters in order to identify its name, it shouldn't be touching the type, as parsing it is very difficult, and errors happen. One current error is when parsing this parameter: const u32 (*tab)[256] Found at ./lib/crc32.c, on this function: u32 __pure crc32_be_generic (u32 crc, unsigned char const *p, size_t len, const u32 (*tab)[256], u32 polynomial); The current logic mangles it, producing this output: const u32 ( *tab That's something that it is not recognizeable. So, instead, let's push the argument as-is, and use it when printing the function prototype and when describing each argument. Signed-off-by: Mauro Carvalho Chehab commit 47bcacfd2b00e3795eac3faf47eb854eb9675a4f Author: Mauro Carvalho Chehab Date: Wed Sep 30 09:47:01 2020 +0200 scripts: kernel-doc: fix typedef identification Some typedef expressions are output as normal functions. As we need to be clearer about the type with Sphinx 3.x, detect such cases. While here, fix a wrongly-indented block. Signed-off-by: Mauro Carvalho Chehab commit eab795ddd84ffdb1c67250062d01a81be20bb208 Author: Mauro Carvalho Chehab Date: Tue Sep 29 14:23:39 2020 +0200 scripts: kernel-doc: reimplement -nofunction argument Right now, the build system doesn't use -nofunction, as it is pretty much useless, because it doesn't consider the other output modes (extern, internal), working only with all. Also, it is limited to exclude functions. Re-implement it in order to allow excluding any symbols from the document output, no matter what mode is used. The parameter was also renamed to "-nosymbol", as it express better its meaning. Signed-off-by: Mauro Carvalho Chehab commit dbe8ba00e5adc7573b8a91855f28a383c9728991 Author: Mauro Carvalho Chehab Date: Mon Sep 28 12:52:34 2020 +0200 scripts: kernel-doc: fix troubles with line counts There's currently a bug with the way kernel-doc script counts line numbers that can be seen with: $ ./scripts/kernel-doc -rst -enable-lineno include/linux/math64.h >all && ./scripts/kernel-doc -rst -internal -enable-lineno include/linux/math64.h >int && diff -U0 int all --- int 2020-09-28 12:58:08.927486808 +0200 +++ all 2020-09-28 12:58:08.905486845 +0200 @@ -1 +1 @@ -#define LINENO 27 +#define LINENO 26 @@ -3 +3 @@ -#define LINENO 16 +#define LINENO 15 @@ -9 +9 @@ -#define LINENO 17 +#define LINENO 16 ... This is happening with perl version 5.30.3, but I'm not so sure if this is a perl bug, or if this is due to something else. In any case, fixing it is easy. Basically, when "-internal" parameter is used, the process_export_file() function opens the handle "IN". This makes the line number to be incremented, as the handler for the main open is also "IN". Fix the problem by using a different handler for the main open(). While here, add a missing close for it. Signed-off-by: Mauro Carvalho Chehab commit e3ad05fe6e6ff645aa91e9a555231ff53470daba Author: Mauro Carvalho Chehab Date: Fri Sep 25 10:05:40 2020 +0200 scripts: kernel-doc: use a less pedantic markup for funcs on Sphinx 3.x Unfortunately, Sphinx 3.x parser for c functions is too pedantic: https://github.com/sphinx-doc/sphinx/issues/8241 While it could be relaxed with some configurations, there are several corner cases that it would make it hard to maintain, and will require teaching conf.py about several macros. So, let's instead use the :c:macro notation. This will produce an output that it is not as nice as currently, but it should still be acceptable, and will provide cross-references, removing thousands of warnings when building with newer versions of Sphinx. Signed-off-by: Mauro Carvalho Chehab commit efa44475b8f5c692be4c5822a659e1a96f16dacb Author: Mauro Carvalho Chehab Date: Thu Sep 24 15:30:37 2020 +0200 scripts: kernel-doc: make it more compatible with Sphinx 3.x With Sphinx 3.x, the ".. c:type:" tag was changed to accept either: .. c:type:: typedef-like declaration .. c:type:: name Using it for other types (including functions) don't work anymore. So, there are newer tags for macro, enum, struct, union, and others, which doesn't exist on older versions. Add a check for the Sphinx version and change the produced tags accordingly. Signed-off-by: Mauro Carvalho Chehab commit d38c8cfb057183f619dc8534030bb64b63f78043 Author: Mauro Carvalho Chehab Date: Thu Oct 1 08:23:52 2020 +0200 scripts: kernel-doc: add support for typedef enum The PHY kernel-doc markup has gained support for documenting a typedef enum. However, right now the parser was not prepared for it. So, add support for parsing it. Fixes: 4069a572d423 ("net: phy: Document core PHY structures") Signed-off-by: Mauro Carvalho Chehab commit d25e2e9388eda61b6e298585024ee3355f50c493 Author: Pablo Neira Ayuso Date: Wed Oct 14 21:34:32 2020 +0200 netfilter: restore NF_INET_NUMHOOKS This definition is used by the iptables legacy UAPI, restore it. Fixes: d3519cb89f6d ("netfilter: nf_tables: add inet ingress support") Reported-by: Jason A. Donenfeld Tested-by: Jason A. Donenfeld Signed-off-by: Pablo Neira Ayuso Signed-off-by: Jakub Kicinski commit 15f0d2922dceabd9e622feae26e88a7d3b2d6ba0 Merge: 2ef813b8f405d 413f142cc05cb Author: Jakub Kicinski Date: Wed Oct 14 20:16:36 2020 -0700 Merge branch 'ibmveth-gso-fix' David Wilder says: ==================== ibmveth gso fix The ibmveth driver is a virtual Ethernet driver used on IBM pSeries systems. Gso packets can be sent between LPARS (virtual hosts) without segmentation, by flagging gso packets using one of two methods depending on the firmware version. Some gso packet were not correctly identified by the receiver. This patch-set corrects this issue. V2: - Added fix tags. - Byteswap the constant at compilation time. - Updated the commit message to clarify what frame validation is performed by the hypervisor. ==================== Link: https://lore.kernel.org/r/20201013232014.26044-1-dwilder@us.ibm.com Signed-off-by: Jakub Kicinski commit 413f142cc05cb03f2d1ea83388e40c1ddc0d74e9 Author: David Wilder Date: Tue Oct 13 16:20:14 2020 -0700 ibmveth: Identify ingress large send packets. Ingress large send packets are identified by either: The IBMVETH_RXQ_LRG_PKT flag in the receive buffer or with a -1 placed in the ip header checksum. The method used depends on firmware version. Frame geometry and sufficient header validation is performed by the hypervisor eliminating the need for further header checks here. Fixes: 7b5967389f5a ("ibmveth: set correct gso_size and gso_type") Signed-off-by: David Wilder Reviewed-by: Thomas Falcon Reviewed-by: Cristobal Forno Reviewed-by: Pradeep Satyanarayana Acked-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit 5ce9ad815a296374ca21f43f3b1ab5083d202ee1 Author: David Wilder Date: Tue Oct 13 16:20:13 2020 -0700 ibmveth: Switch order of ibmveth_helper calls. ibmveth_rx_csum_helper() must be called after ibmveth_rx_mss_helper() as ibmveth_rx_csum_helper() may alter ip and tcp checksum values. Fixes: 66aa0678efc2 ("ibmveth: Support to enable LSO/CSO for Trunk VEA.") Signed-off-by: David Wilder Reviewed-by: Thomas Falcon Reviewed-by: Cristobal Forno Reviewed-by: Pradeep Satyanarayana Acked-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit ffd0b25ca049a477cb757e5bcf2d5e1664d12e5d Author: Qian Cai Date: Wed Oct 14 14:28:11 2020 -0400 Revert "powerpc/pci: unmap legacy INTx interrupts when a PHB is removed" This reverts commit 3a3181e16fbde752007759f8759d25e0ff1fc425 which causes memory corruptions on POWER9 powernv. eg: pci_bus 0035:08: busn_res: [bus 08-0c] is released ============================================================================= BUG kmalloc-16 (Tainted: G W O ): Object already free ----------------------------------------------------------------------------- Disabling lock debugging due to kernel taint INFO: Allocated in pcibios_scan_phb+0x104/0x3e0 age=1960714 cpu=4 pid=1 __slab_alloc+0xa4/0xf0 __kmalloc+0x294/0x330 pcibios_scan_phb+0x104/0x3e0 pcibios_init+0x84/0x124 do_one_initcall+0xac/0x528 kernel_init_freeable+0x35c/0x3fc kernel_init+0x24/0x148 ret_from_kernel_thread+0x5c/0x80 INFO: Freed in pcibios_remove_bus+0x70/0x90 age=0 cpu=16 pid=1717146 kfree+0x49c/0x510 pcibios_remove_bus+0x70/0x90 pci_remove_bus+0xe4/0x110 pci_remove_bus_device+0x74/0x170 pci_remove_bus_device+0x4c/0x170 pci_stop_and_remove_bus_device_locked+0x34/0x50 remove_store+0xc0/0xe0 dev_attr_store+0x30/0x50 sysfs_kf_write+0x68/0xb0 kernfs_fop_write+0x114/0x260 vfs_write+0xe4/0x260 ksys_write+0x74/0x130 system_call_exception+0xf8/0x1d0 system_call_common+0xe8/0x218 INFO: Slab 0x0000000099caaf22 objects=178 used=174 fp=0x00000000006a64b0 flags=0x7fff8000000201 INFO: Object 0x00000000f360132d @offset=30192 fp=0x0000000000000000 Signed-off-by: Qian Cai Acked-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201014182811.12027-1-cai@lca.pw commit 2ef813b8f405db3f72202b6fcae40a628ab80a53 Author: Herat Ramani Date: Tue Oct 13 15:01:29 2020 +0530 cxgb4: handle 4-tuple PEDIT to NAT mode translation The 4-tuple NAT offload via PEDIT always overwrites all the 4-tuple fields even if they had not been explicitly enabled. If any fields in the 4-tuple are not enabled, then the hardware overwrites the disabled fields with zeros, instead of ignoring them. So, add a parser that can translate the enabled 4-tuple PEDIT fields to one of the NAT mode combinations supported by the hardware and hence avoid overwriting disabled fields to 0. Any rule with unsupported NAT mode combination is rejected. Signed-off-by: Herat Ramani Signed-off-by: Jakub Kicinski commit f8ea4a19856070c7a4fe50a079e354300765a1e6 Merge: 1e40d75ef90c5 1a01727676a87 Author: Jakub Kicinski Date: Wed Oct 14 17:14:32 2020 -0700 Merge branch 'l3mdev-icmp-error-route-lookup-fixes' Mathieu Desnoyers says: ==================== l3mdev icmp error route lookup fixes Here is a series of fixes for ipv4 and ipv6 which ensure the route lookup is performed on the right routing table in VRF configurations when sending TTL expired icmp errors (useful for traceroute). It includes tests for both ipv4 and ipv6. These fixes address specifically address the code paths involved in sending TTL expired icmp errors. As detailed in the individual commit messages, those fixes do not address similar icmp errors related to network namespaces and unreachable / fragmentation needed messages, which appear to use different code paths. ==================== Link: https://lore.kernel.org/r/20201012145016.2023-1-mathieu.desnoyers@efficios.com Signed-off-by: Jakub Kicinski commit 1a01727676a87945bd6b9796fc5ee894c24b4fe2 Author: Michael Jeanson Date: Mon Oct 12 10:50:16 2020 -0400 selftests: Add VRF route leaking tests The objective of the tests is to check that ICMP errors generated while crossing between VRFs are properly routed back to the source host. The first ttl test sends a ping with a ttl of 1 from h1 to h2 and parses the output of the command to check that a ttl expired error is received. The second ttl test runs traceroute from h1 to h2 and parses the output to check for a hop on r1. The mtu test sends a ping with a payload of 1450 from h1 to h2, through r1 which has an interface with a mtu of 1400 and parses the output of the command to check that a fragmentation needed error is received. [ The IPv6 MTU test still fails with the symmetric routing setup. It appears to be caused by source address selection picking ::1. Fixing this is beyond the scope of this series. ] Signed-off-by: Michael Jeanson Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 272928d1cdacfc3b55f605cb0e9115832ecfb20c Author: Mathieu Desnoyers Date: Mon Oct 12 10:50:15 2020 -0400 ipv6/icmp: l3mdev: Perform icmp error route lookup on source device routing table (v2) As per RFC4443, the destination address field for ICMPv6 error messages is copied from the source address field of the invoking packet. In configurations with Virtual Routing and Forwarding tables, looking up which routing table to use for sending ICMPv6 error messages is currently done by using the destination net_device. If the source and destination interfaces are within separate VRFs, or one in the global routing table and the other in a VRF, looking up the source address of the invoking packet in the destination interface's routing table will fail if the destination interface's routing table contains no route to the invoking packet's source address. One observable effect of this issue is that traceroute6 does not work in the following cases: - Route leaking between global routing table and VRF - Route leaking between VRFs Use the source device routing table when sending ICMPv6 error messages. [ In the context of ipv4, it has been pointed out that a similar issue may exist with ICMP errors triggered when forwarding between network namespaces. It would be worthwhile to investigate whether ipv6 has similar issues, but is outside of the scope of this investigation. ] [ Testing shows that similar issues exist with ipv6 unreachable / fragmentation needed messages. However, investigation of this additional failure mode is beyond this investigation's scope. ] Link: https://tools.ietf.org/html/rfc4443 Signed-off-by: Mathieu Desnoyers Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit e1e84eb58eb494b77c8389fc6308b5042dcce791 Author: Mathieu Desnoyers Date: Mon Oct 12 10:50:14 2020 -0400 ipv4/icmp: l3mdev: Perform icmp error route lookup on source device routing table (v2) As per RFC792, ICMP errors should be sent to the source host. However, in configurations with Virtual Routing and Forwarding tables, looking up which routing table to use is currently done by using the destination net_device. commit 9d1a6c4ea43e ("net: icmp_route_lookup should use rt dev to determine L3 domain") changes the interface passed to l3mdev_master_ifindex() and inet_addr_type_dev_table() from skb_in->dev to skb_dst(skb_in)->dev. This effectively uses the destination device rather than the source device for choosing which routing table should be used to lookup where to send the ICMP error. Therefore, if the source and destination interfaces are within separate VRFs, or one in the global routing table and the other in a VRF, looking up the source host in the destination interface's routing table will fail if the destination interface's routing table contains no route to the source host. One observable effect of this issue is that traceroute does not work in the following cases: - Route leaking between global routing table and VRF - Route leaking between VRFs Preferably use the source device routing table when sending ICMP error messages. If no source device is set, fall-back on the destination device routing table. Else, use the main routing table (index 0). [ It has been pointed out that a similar issue may exist with ICMP errors triggered when forwarding between network namespaces. It would be worthwhile to investigate, but is outside of the scope of this investigation. ] [ It has also been pointed out that a similar issue exists with unreachable / fragmentation needed messages, which can be triggered by changing the MTU of eth1 in r1 to 1400 and running: ip netns exec h1 ping -s 1450 -Mdo -c1 172.16.2.2 Some investigation points to raw_icmp_error() and raw_err() as being involved in this last scenario. The focus of this patch is TTL expired ICMP messages, which go through icmp_route_lookup. Investigation of failure modes related to raw_icmp_error() is beyond this investigation's scope. ] Fixes: 9d1a6c4ea43e ("net: icmp_route_lookup should use rt dev to determine L3 domain") Link: https://tools.ietf.org/html/rfc792 Signed-off-by: Mathieu Desnoyers Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 02e83f46ebfaf9405881e290794c913d457541f0 Author: Darrick J. Wong Date: Wed Oct 14 16:47:08 2020 -0700 vfs: move generic_remap_checks out of mm I would like to move all the generic helpers for the vfs remap range functionality (aka clonerange and dedupe) into a separate file so that they won't be scattered across the vfs and the mm subsystems. The eventual goal is to be able to deselect remap_range.c if none of the filesystems need that code, but the tricky part here is picking a stable(ish) part of the merge window to rearrange code. Signed-off-by: Darrick J. Wong commit 3e4fb4346c781068610d03c12b16c0cfb0fd24a3 Merge: fe151462bd0f7 c5c553850899e Author: Linus Torvalds Date: Wed Oct 14 16:19:42 2020 -0700 Merge tag 'spdx-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx Pull SPDX updates from Greg KH: "Here are some SPDX-specific changes for 5.10-rc1. They include: - driver fixes to make spdxcheck.pl work properly - add GFDL licenses as "deprecated" but required due to some of our documentation using them - add Zlib license as "deprecated" but required because we have code with this license in the tree. - convert some drivers to have SPDX identifiers that previously didn't have them. All have been in linux-next for a very long time with no reported issues" * tag 'spdx-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: scripts/spdxcheck.py: handle license identifiers in XML comments net/mlx5: IPsec: make spdxcheck.py happy LICENSES/deprecated: add Zlib license text LICENSE: add GFDL deprecated licenses net/qla3xxx: Convert to SPDX license identifiers net/qlge: Convert to SPDX license identifiers net/qlcnic: Convert to SPDX license identifiers scsi/qla2xxx: Convert to SPDX license identifiers scsi/qla4xxx: Convert to SPDX license identifiers commit fe151462bd0f7ad0e758f1cdcbeb6426e3d1ee8e Merge: 5d6c413c92a3e ee4906770ee93 Author: Linus Torvalds Date: Wed Oct 14 16:09:32 2020 -0700 Merge tag 'driver-core-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the "big" set of driver core patches for 5.10-rc1 They include a lot of different things, all related to the driver core and/or some driver logic: - sysfs common write functions to make it easier to audit sysfs attributes - device connection cleanups and fixes - devm helpers for a few functions - NOIO allocations for when devices are being removed - minor cleanups and fixes All have been in linux-next for a while with no reported issues" * tag 'driver-core-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (31 commits) regmap: debugfs: use semicolons rather than commas to separate statements platform/x86: intel_pmc_core: do not create a static struct device drivers core: node: Use a more typical macro definition style for ACCESS_ATTR drivers core: Use sysfs_emit for shared_cpu_map_show and shared_cpu_list_show mm: and drivers core: Convert hugetlb_report_node_meminfo to sysfs_emit drivers core: Miscellaneous changes for sysfs_emit drivers core: Reindent a couple uses around sysfs_emit drivers core: Remove strcat uses around sysfs_emit and neaten drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output dyndbg: use keyword, arg varnames for query term pairs driver core: force NOIO allocations during unplug platform_device: switch to simpler IDA interface driver core: platform: Document return type of more functions Revert "driver core: Annotate dev_err_probe() with __must_check" Revert "test_firmware: Test platform fw loading on non-EFI systems" iio: adc: xilinx-xadc: use devm_krealloc() hwmon: pmbus: use more devres helpers devres: provide devm_krealloc() syscore: Use pm_pr_dbg() for syscore_{suspend,resume}() ... commit 5d6c413c92a3e6fc9399141891147d0d826517c9 Merge: e6037a753e8e9 4be87603b6dc9 Author: Linus Torvalds Date: Wed Oct 14 16:05:52 2020 -0700 Merge tag 'tty-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial updates from Greg KH: "Here is the big set of tty and serial driver patches for 5.10-rc1. Lots of little things in here, including: - tasklet_setup api conversions - sysrq support for capital letters - vt and vc cleanups and unwinding the mess some more - serial driver updates and minor tweaks - new device ids - rs485 support for some drivers - serial binding documentation updates - lots of small serial driver changes for reported issues All have been in linux-next for a while with no reported issues" * tag 'tty-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (79 commits) serial: mcf: add sysrq capability serial: fsl_lpuart: add sysrq support when using dma fbcon: remove no-op fbcon_set_origin() tty/sysrq: Extend the sysrq_key_table to cover capital letters serial: max310x: rework RX interrupt handling serial: 8250_dw: Fix clk-notifier/port suspend deadlock serial: 8250: Skip uninitialized TTY port baud rate update serial: 8250: Discard RTS/DTS setting from clock update method tty: serial: imx: disable TXDC IRQ in imx_uart_shutdown() to avoid IRQ storm serial: 8250_fsl: Fix TX interrupt handling condition serial: pl011: Fix lockdep splat when handling magic-sysrq interrupt tty: serial: fsl_lpuart: fix lpuart32_poll_get_char tty: serial: lpuart: fix lpuart32_write usage serial: qcom_geni_serial: To correct QUP Version detection logic serial: mvebu-uart: fix unused variable warning vt_ioctl: make VT_RESIZEX behave like VT_RESIZE serial: mvebu-uart: simplify the return expression of mvebu_uart_probe() tty: serial: imx: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n tty: hvc: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n pch_uart: drop double zeroing ... commit e6037a753e8e9a4146f7d94c32eb30a6717c9c70 Author: Jason A. Donenfeld Date: Thu Oct 15 01:02:09 2020 +0200 powerpc32: don't adjust unmoved stack pointer in csum_partial_copy_generic() epilogue A recent change to the checksum code removed usage of some extra arguments, alongside with storage on the stack for those, and the stack pointer no longer needed to be adjusted in the function prologue. But a left over subtraction wasn't removed in the function epilogue, causing the function to return with the stack pointer moved 16 bytes away from where it should have. This corrupted local state and lead to weird crashes. This simply removes the leftover instruction from the epilogue. Fixes: 70d65cd555c5 ("ppc: propagate the calling conventions change down to csum_partial_copy_generic()") Cc: Al Viro Signed-off-by: Jason A. Donenfeld Signed-off-by: Linus Torvalds commit 6448cbf662c7858c0d9eb0b135962bedd6d0b9a0 Merge: 1a31c12371556 97ecfda1a8ffc Author: Linus Torvalds Date: Wed Oct 14 15:59:42 2020 -0700 Merge tag 'backlight-next-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "New Drivers: - Add support for KTD253 Fix-ups: - Add Device Tree documentation; common, kinetic,ktd253 - Use correct header(s); tosa_lcd, tosa_bl Bug Fixes: - Fix refcount imbalance; sky81452-backlight" * tag 'backlight-next-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: tosa_bl: Include the right header backlight: tosa_lcd: Include the right header backlight: Add Kinetic KTD253 backlight driver dt-bindings: backlight: Add Kinetic KTD253 bindings dt-bindings: backlight: Add some common backlight properties backlight: sky81452-backlight: Fix refcount imbalance on error commit 1a31c12371556bfbe511edd268dab721b504d511 Merge: f888bdf9823c8 6d81dc3c79d46 Author: Linus Torvalds Date: Wed Oct 14 15:56:58 2020 -0700 Merge tag 'mfd-next-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - Add support for initialising shared (between children) Regmaps - Add support for Kontron SL28CPLD - Add support for ENE KB3930 Embedded Controller - Add support for Intel FPGA PAC MAX 10 BMC New Device Support: - Add support for Power to Ricoh RN5T618 - Add support for UART to Intel Lakefield - Add support for LP87524_Q1 to Texas Instruments LP87565 New Functionality: - Device Tree; ene-kb3930, sl28cpld, syscon, lp87565, lp87524-q1 - Use new helper dev_err_probe(); madera-core, stmfx, wcd934x - Use new GPIOD API; dm355evm_msp - Add wake-up capability; sprd-sc27xx-spi - Add ACPI support; kempld-core Fix-ups: - Trivial (spelling/whitespace); Kconfig, ab8500 - Fix for unused variables; khadas-mcu, kempld-core - Remove unused header file(s); mt6360-core - Use correct IRQ flags in docs; act8945a, gateworks-gsc, rohm,bd70528-pmic - Add COMPILE_TEST support; asic3, tmio_core - Add dependency on I2C; SL28CPLD Bug Fixes: - Fix memory leak(s); sm501 - Do not free regmap_config's 'name' until exit; syscon" * tag 'mfd-next-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (34 commits) mfd: kempld-core: Fix unused variable 'kempld_acpi_table' when !ACPI mfd: sl28cpld: Depend on I2C mfd: asic3: Build if COMPILE_TEST=y dt-bindings: mfd: Correct interrupt flags in examples mfd: Add ACPI support to Kontron PLD driver mfd: intel-m10-bmc: Add Intel MAX 10 BMC chip support for Intel FPGA PAC mfd: lp87565: Add LP87524-Q1 variant dt-bindings: mfd: Add LP87524-Q1 dt-bindings: mfd: lp87565: Convert to yaml mfd: mt6360: Remove unused include mfd: sm501: Fix leaks in probe() mfd: syscon: Don't free allocated name for regmap_config dt-bindings: mfd: syscon: Document Exynos3 and Exynos5433 compatibles dt-bindings: mfd: syscon: Merge Samsung Exynos Sysreg bindings dt-bindings: mfd: ab8500: Remove weird Unicode characters mfd: sprd: Add wakeup capability for PMIC IRQ mfd: intel-lpss: Add device IDs for UART ports for Lakefield mfd: dm355evm_msp: Convert LEDs to GPIO descriptor table mfd: wcd934x: Simplify with dev_err_probe() mfd: stmfx: Simplify with dev_err_probe() ... commit f888bdf9823c85fe945c4eb3ba353f749dec3856 Merge: b4e1bce85fd8f bd36e51d10e7c Author: Linus Torvalds Date: Wed Oct 14 15:31:58 2020 -0700 Merge tag 'devicetree-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: - Update dtc to upstream version v1.6.0-31-gcbca977ea121 - dtx_diff help text reformatting - Speed-up validation time for binding and dtb checks using json for intermediate files - Add support for running yamllint on DT schema files - Remove old booting-without-of.rst - Extend the example schema to address common issues - Cleanup handling of additionalProperties/unevaluatedProperties - Ensure all DSI controller schemas reference dsi-controller.yaml - Vendor prefixes for Zealz, Wandbord/Technexion, Embest RIoT, Rex, DFI, and Cisco Meraki - Convert at25, SPMI bus, TI hwlock, HiSilicon Hi3660 USB3 PHY, Arm SP805 watchdog, Arm SP804, and Samsung 11-pin USB connector to DT schema - Convert HiSilicon SoC and syscon bindings to DT schema - Convert SiFive Risc-V L2 cache, PLIC, PRCI, and PWM to DT schema - Convert i.MX bindings for w1, crypto, rng, SIM, PM, DDR, SATA, vf610 GPIO, and UART to DT schema - Add i.MX 8M compatible strings - Add LM81 and DS1780 as trivial devices - Various missing properties added to fix dtb validation warnings * tag 'devicetree-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (111 commits) dt-bindings: misc: explicitly add #address-cells for slave mode spi: dt-bindings: spi-controller: explicitly require #address-cells=<0> for slave mode dt: Remove booting-without-of.rst dt-bindings: update usb-c-connector example dt-bindings: arm: hisilicon: add missing properties into cpuctrl.yaml dt-bindings: arm: hisilicon: add missing properties into sysctrl.yaml dt-bindings: pwm: imx: document i.MX compatibles scripts/dtc: Update to upstream version v1.6.0-31-gcbca977ea121 dt-bindings: Add running yamllint to dt_binding_check dt-bindings: powerpc: Add a schema for the 'sleep' property dt-bindings: pinctrl: sirf: Fix typo abitrary dt-bindings: pinctrl: qcom: Fix typo abitrary dt-bindings: Explicitly allow additional properties in common schemas dt-bindings: Use 'additionalProperties' instead of 'unevaluatedProperties' dt-bindings: Add missing 'unevaluatedProperties' Docs: Fixing spelling errors in Documentation/devicetree/bindings/ dt-bindings: arm: hisilicon: convert Hi6220 domain controller bindings to json-schema dt-bindings: riscv: convert pwm bindings to json-schema dt-bindings: riscv: convert plic bindings to json-schema dt-bindings: fu540: prci: convert PRCI bindings to json-schema ... commit b4e1bce85fd8f43dc814049e2641cc6beaa8146b Merge: 7fafb54c7d390 55596c5445566 Author: Linus Torvalds Date: Wed Oct 14 15:25:04 2020 -0700 Merge tag 'pinctrl-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "Core changes: - NONE whatsoever, we don't even touch the core files this time around. New drivers: - New driver for the Toshiba Visconti SoC. - New subdriver for the Qualcomm MSM8226 SoC. - New subdriver for the Actions Semiconductor S500 SoC. - New subdriver for the Mediatek MT8192 SoC. - New subdriver for the Microchip SAMA7G5 SoC. Driver enhancements: - Intel Cherryview and Baytrail cleanups and refactorings. - Enhanced support for the Renesas R8A7790, more pins and groups. - Some optimizations for the MCP23S08 MCP23x17 variant. - Some cleanups around the Actions Semiconductor subdrivers. - A bunch of cleanups around the SH-PFC and Emma Mobile drivers. - The "SH-PFC" (literally SuperH pin function controller, I think) subdirectory is now renamed to the more neutral "renesas", as these are not very much centered around SuperH anymore. - Non-critical fixes for the Aspeed driver. - Non-critical fixes for the Ingenic (MIPS!) driver. - Fix a bunch of missing pins on the AMD pinctrl driver" * tag 'pinctrl-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (78 commits) pinctrl: amd: Add missing pins to the pin group list dt-bindings: pinctrl: sunxi: Allow pinctrl with more interrupt banks pinctrl: visconti: PINCTRL_TMPV7700 should depend on ARCH_VISCONTI pinctrl: mediatek: Free eint data on failure pinctrl: single: fix debug output when #pinctrl-cells = 2 pinctrl: single: fix pinctrl_spec.args_count bounds check pinctrl: sunrisepoint: Modify COMMUNITY macros to be consistent pinctrl: cannonlake: Modify COMMUNITY macros to be consistent pinctrl: tigerlake: Fix register offsets for TGL-H variant pinctrl: Document pinctrl-single,pins when #pinctrl-cells = 2 pinctrl: mediatek: use devm_platform_ioremap_resource_byname() pinctrl: nuvoton: npcm7xx: Constify static ops structs pinctrl: mediatek: mt7622: add antsel pins/groups pinctrl: ocelot: simplify the return expression of ocelot_gpiochip_register() pinctrl: at91-pio4: add support for sama7g5 SoC dt-bindings: pinctrl: at91-pio4: add microchip,sama7g5 pinctrl: spear: simplify the return expression of tvc_connect() pinctrl: spear: simplify the return expression of spear310_pinctrl_probe pinctrl: sprd: use module_platform_driver to simplify the code pinctrl: Ingenic: Add I2S pins support for Ingenic SoCs. ... commit 7fafb54c7d390e9b273a1d7d377e38d9c408046e Merge: 55e0500eb5c04 19d2e0cef0b14 Author: Linus Torvalds Date: Wed Oct 14 15:22:07 2020 -0700 Merge tag 'leds-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED updates from Pavel Machek: "Quite a lot of stuff is going on here. Great cleanups/fixes from Marek and others are biggest part. I limited CPU LED trigger to 8 LEDs, because it was willing to register 1024 'triggers' on machine with 1024 CPUs. I don't believe it will cause any problems, but we can raise the limit if it does" * tag 'leds-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: (84 commits) leds: pwm: Remove platform_data support leds: lm3697: Fix out-of-bound access leds: ns2: do not guard OF match pointer with of_match_ptr leds: ns2: convert to fwnode API leds: tlc591xx: fix leak of device node iterator leds: pca963x: use struct led_init_data when registering leds: pca963x: register LEDs immediately after parsing, get rid of platdata leds: tca6507: remove binding comment leds: tca6507: cosmetic change: use helper variable leds: tca6507: do not set GPIO names dt-bindings: leds: tca6507: convert to YAML ledtrig-cpu: Limit to 8 CPUs leds: TODO: Add documentation about possible subsystem improvements leds: pca9532: read pwm settings from device tree leds: pca9532: correct shift computation in pca9532_getled leds: lm36274: Fix warning for undefined parameters leds: lm3532: Fix warnings for undefined parameters leds: pca963x: use flexible array leds: pca963x: cosmetic: rename variables leds: pca963x: cosmetic: rename variables ... commit 55e0500eb5c0440a3d43074edbd8db3e95851b66 Merge: 4815519ed0af8 69f4ec1edb136 Author: Linus Torvalds Date: Wed Oct 14 15:15:35 2020 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "The usual driver updates (ufs, qla2xxx, tcmu, ibmvfc, lpfc, smartpqi, hisi_sas, qedi, qedf, mpt3sas) and minor bug fixes. There are only three core changes: adding sense codes, cleaning up noretry and adding an option for limitless retries" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (226 commits) scsi: hisi_sas: Recover PHY state according to the status before reset scsi: hisi_sas: Filter out new PHY up events during suspend scsi: hisi_sas: Add device link between SCSI devices and hisi_hba scsi: hisi_sas: Add check for methods _PS0 and _PR0 scsi: hisi_sas: Add controller runtime PM support for v3 hw scsi: hisi_sas: Switch to new framework to support suspend and resume scsi: hisi_sas: Use hisi_hba->cq_nvecs for calling calling synchronize_irq() scsi: qedf: Remove redundant assignment to variable 'rc' scsi: lpfc: Remove unneeded variable 'status' in lpfc_fcp_cpu_map_store() scsi: snic: Convert to use DEFINE_SEQ_ATTRIBUTE macro scsi: qla4xxx: Delete unneeded variable 'status' in qla4xxx_process_ddb_changed scsi: sun_esp: Use module_platform_driver to simplify the code scsi: sun3x_esp: Use module_platform_driver to simplify the code scsi: sni_53c710: Use module_platform_driver to simplify the code scsi: qlogicpti: Use module_platform_driver to simplify the code scsi: mac_esp: Use module_platform_driver to simplify the code scsi: jazz_esp: Use module_platform_driver to simplify the code scsi: mvumi: Fix error return in mvumi_io_attach() scsi: lpfc: Drop nodelist reference on error in lpfc_gen_req() scsi: be2iscsi: Fix a theoretical leak in beiscsi_create_eqs() ... commit 4815519ed0af833884ce9c288183bf1ae3cb9caa Merge: 6e4dc3d59284e 681cc5e8667e8 Author: Linus Torvalds Date: Wed Oct 14 15:05:38 2020 -0700 Merge tag 'for-5.10/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Improve DM core's bio splitting to use blk_max_size_offset(). Also fix bio splitting for bios that were deferred to the worker thread due to a DM device being suspended. - Remove DM core's special handling of NVMe devices now that block core has internalized efficiencies drivers previously needed to be concerned about (via now removed direct_make_request). - Fix request-based DM to not bounce through indirect dm_submit_bio; instead have block core make direct call to blk_mq_submit_bio(). - Various DM core cleanups to simplify and improve code. - Update DM cryot to not use drivers that set CRYPTO_ALG_ALLOCATES_MEMORY. - Fix DM raid's raid1 and raid10 discard limits for the purposes of linux-stable. But then remove DM raid's discard limits settings now that MD raid can efficiently handle large discards. - A couple small cleanups across various targets. * tag 'for-5.10/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: fix request-based DM to not bounce through indirect dm_submit_bio dm: remove special-casing of bio-based immutable singleton target on NVMe dm: export dm_copy_name_and_uuid dm: fix comment in __dm_suspend() dm: fold dm_process_bio() into dm_submit_bio() dm: fix missing imposition of queue_limits from dm_wq_work() thread dm snap persistent: simplify area_io() dm thin metadata: Remove unused local variable when create thin and snap dm raid: remove unnecessary discard limits for raid10 dm raid: fix discard limits for raid1 and raid10 dm crypt: don't use drivers that have CRYPTO_ALG_ALLOCATES_MEMORY dm: use dm_table_get_device_name() where appropriate in targets dm table: make 'struct dm_table' definition accessible to all of DM core dm: eliminate need for start_io_acct() forward declaration dm: simplify __process_abnormal_io() dm: push use of on-stack flush_bio down to __send_empty_flush() dm: optimize max_io_len() by inlining max_io_len_target_boundary() dm: push md->immutable_target optimization down to __process_bio() dm: change max_io_len() to use blk_max_size_offset() dm table: stack 'chunk_sectors' limit to account for target-specific splitting commit 6e4dc3d59284ea3bc7c3e40694bce84d988b01af Merge: 2f6c6d0891b47 8fe7990ceda85 Author: Linus Torvalds Date: Wed Oct 14 15:00:20 2020 -0700 Merge tag 'for-linus-5.10-1' of git://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Some minor bug fixes, return values, cleanups of prints, conversion of tasklets to the new API. The biggest change is retrying the initial information fetch from the management controller. If that fails, the iterface is not operational, and one group was having trouble with the management controller not being ready when the OS started up. So a retry was added" * tag 'for-linus-5.10-1' of git://github.com/cminyard/linux-ipmi: ipmi_si: Fix wrong return value in try_smi_init() ipmi: msghandler: Fix a signedness bug ipmi: add retry in try_get_dev_id() ipmi: Clean up some printks ipmi:msghandler: retry to get device id on an error ipmi:sm: Print current state when the state is invalid ipmi: Reset response handler when failing to send the command ipmi: add a newline when printing parameter 'panic_op' by sysfs char: ipmi: convert tasklets to use new tasklet_setup() API commit 2f6c6d0891b472bbda70dfcc51fbb3147b6f54a0 Merge: 09cad07547445 65026da59cda1 Author: Linus Torvalds Date: Wed Oct 14 14:58:32 2020 -0700 Merge branch 'for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "Two minor changes. One makes cgroup interface files ignore zero-sized writes rather than triggering -EINVAL on them. The other change is a cleanup which doesn't cause any behavior changes" * 'for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Zero sized write should be no-op cgroup: remove redundant kernfs_activate in cgroup_setup_root() commit cf3af0a4d3b62ab48e0b90180ea161d0f5d4953f Author: Maciej W. Rozycki Date: Wed Oct 14 22:34:56 2020 +0100 MIPS: DEC: Restore bootmem reservation for firmware working memory area Fix a crash on DEC platforms starting with: VFS: Mounted root (nfs filesystem) on device 0:11. Freeing unused PROM memory: 124k freed BUG: Bad page state in process swapper pfn:00001 page:(ptrval) refcount:0 mapcount:-128 mapping:00000000 index:0x1 pfn:0x1 flags: 0x0() raw: 00000000 00000100 00000122 00000000 00000001 00000000 ffffff7f 00000000 page dumped because: nonzero mapcount Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 5.9.0-00858-g865c50e1d279 #1 Stack : 8065dc48 0000000b 8065d2b8 9bc27dcc 80645bfc 9bc259a4 806a1b97 80703124 80710000 8064a900 00000001 80099574 806b116c 1000ec00 9bc27d88 806a6f30 00000000 00000000 80645bfc 00000000 31232039 80706ba4 2e392e35 8039f348 2d383538 00000070 0000000a 35363867 00000000 806c2830 80710000 806b0000 80710000 8064a900 00000001 81000000 00000000 00000000 8035af2c 80700000 ... Call Trace: [<8004bc5c>] show_stack+0x34/0x104 [<8015675c>] bad_page+0xfc/0x128 [<80157714>] free_pcppages_bulk+0x1f4/0x5dc [<801591cc>] free_unref_page+0xc0/0x130 [<8015cb04>] free_reserved_area+0x144/0x1d8 [<805abd78>] kernel_init+0x20/0x100 [<80046070>] ret_from_kernel_thread+0x14/0x1c Disabling lock debugging due to kernel taint caused by an attempt to free bootmem space that as from commit b93ddc4f9156 ("mips: Reserve memory for the kernel image resources") has not been anymore reserved due to the removal of generic MIPS arch code that used to reserve all the memory from the beginning of RAM up to the kernel load address. This memory does need to be reserved on DEC platforms however as it is used by REX firmware as working area, as per the TURBOchannel firmware specification[1]: Table 2-2 REX Memory Regions ------------------------------------------------------------------------- Starting Ending Region Address Address Use ------------------------------------------------------------------------- 0 0xa0000000 0xa000ffff Restart block, exception vectors, REX stack and bss 1 0xa0010000 0xa0017fff Keyboard or tty drivers 2 0xa0018000 0xa001f3ff 1) CRT driver 3 0xa0020000 0xa002ffff boot, cnfg, init and t objects 4 0xa0020000 0xa002ffff 64KB scratch space ------------------------------------------------------------------------- 1) Note that the last 3 Kbytes of region 2 are reserved for backward compatibility with previous system software. ------------------------------------------------------------------------- (this table uses KSEG2 unmapped virtual addresses, which in the MIPS architecture are offset from physical addresses by a fixed value of 0xa0000000 and therefore the regions referred do correspond to the beginning of the physical address space) and we call into the firmware on several occasions throughout the bootstrap process. It is believed that pre-REX firmware used with non-TURBOchannel DEC platforms has the same requirements, as hinted by note #1 cited. Recreate the discarded reservation then, in DEC platform code, removing the crash. References: [1] "TURBOchannel Firmware Specification", On-line version, EK-TCAAD-FS-004, Digital Equipment Corporation, January 1993, Chapter 2 "System Module Firmware", p. 2-5 Signed-off-by: Maciej W. Rozycki Fixes: b93ddc4f9156 ("mips: Reserve memory for the kernel image resources") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Thomas Bogendoerfer commit 09cad07547445bf3a41683e4d3abcd154c123ef5 Author: Andrii Nakryiko Date: Wed Oct 14 13:45:28 2020 -0700 fs: fix NULL dereference due to data race in prepend_path() Fix data race in prepend_path() with re-reading mnt->mnt_ns twice without holding the lock. is_mounted() does check for NULL, but is_anon_ns(mnt->mnt_ns) might re-read the pointer again which could be NULL already, if in between reads one of kern_unmount()/kern_unmount_array()/umount_tree() sets mnt->mnt_ns to NULL. This is seen in production with the following stack trace: BUG: kernel NULL pointer dereference, address: 0000000000000048 ... RIP: 0010:prepend_path.isra.4+0x1ce/0x2e0 Call Trace: d_path+0xe6/0x150 proc_pid_readlink+0x8f/0x100 vfs_readlink+0xf8/0x110 do_readlinkat+0xfd/0x120 __x64_sys_readlinkat+0x1a/0x20 do_syscall_64+0x42/0x110 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: f2683bd8d5bd ("[PATCH] fix d_absolute_path() interplay with fsmount()") Signed-off-by: Andrii Nakryiko Reviewed-by: Josef Bacik Cc: Alexander Viro Signed-off-by: Linus Torvalds commit c2a04b02c060c4858762edce4674d5cba3e5a96f Author: Jamie Iles Date: Mon Oct 12 14:13:09 2020 +0100 gfs2: use-after-free in sysfs deregistration syzkaller found the following splat with CONFIG_DEBUG_KOBJECT_RELEASE=y: Read of size 1 at addr ffff000028e896b8 by task kworker/1:2/228 CPU: 1 PID: 228 Comm: kworker/1:2 Tainted: G S 5.9.0-rc8+ #101 Hardware name: linux,dummy-virt (DT) Workqueue: events kobject_delayed_cleanup Call trace: dump_backtrace+0x0/0x4d8 show_stack+0x34/0x48 dump_stack+0x174/0x1f8 print_address_description.constprop.0+0x5c/0x550 kasan_report+0x13c/0x1c0 __asan_report_load1_noabort+0x34/0x60 memcmp+0xd0/0xd8 gfs2_uevent+0xc4/0x188 kobject_uevent_env+0x54c/0x1240 kobject_uevent+0x2c/0x40 __kobject_del+0x190/0x1d8 kobject_delayed_cleanup+0x2bc/0x3b8 process_one_work+0x96c/0x18c0 worker_thread+0x3f0/0xc30 kthread+0x390/0x498 ret_from_fork+0x10/0x18 Allocated by task 1110: kasan_save_stack+0x28/0x58 __kasan_kmalloc.isra.0+0xc8/0xe8 kasan_kmalloc+0x10/0x20 kmem_cache_alloc_trace+0x1d8/0x2f0 alloc_super+0x64/0x8c0 sget_fc+0x110/0x620 get_tree_bdev+0x190/0x648 gfs2_get_tree+0x50/0x228 vfs_get_tree+0x84/0x2e8 path_mount+0x1134/0x1da8 do_mount+0x124/0x138 __arm64_sys_mount+0x164/0x238 el0_svc_common.constprop.0+0x15c/0x598 do_el0_svc+0x60/0x150 el0_svc+0x34/0xb0 el0_sync_handler+0xc8/0x5b4 el0_sync+0x15c/0x180 Freed by task 228: kasan_save_stack+0x28/0x58 kasan_set_track+0x28/0x40 kasan_set_free_info+0x24/0x48 __kasan_slab_free+0x118/0x190 kasan_slab_free+0x14/0x20 slab_free_freelist_hook+0x6c/0x210 kfree+0x13c/0x460 Use the same pattern as f2fs + ext4 where the kobject destruction must complete before allowing the FS itself to be freed. This means that we need an explicit free_sbd in the callers. Cc: Bob Peterson Cc: Andreas Gruenbacher Signed-off-by: Jamie Iles [Also go to fail_free when init_names fails.] Signed-off-by: Andreas Gruenbacher commit 0e539ca1bbbe85a86549c97a30a765ada4a09df9 Author: Andrew Price Date: Wed Oct 7 12:30:58 2020 +0100 gfs2: Fix NULL pointer dereference in gfs2_rgrp_dump When an rindex entry is found to be corrupt, compute_bitstructs() calls gfs2_consist_rgrpd() which calls gfs2_rgrp_dump() like this: gfs2_rgrp_dump(NULL, rgd->rd_gl, fs_id_buf); gfs2_rgrp_dump then dereferences the gl without checking it and we get BUG: KASAN: null-ptr-deref in gfs2_rgrp_dump+0x28/0x280 because there's no rgrp glock involved while reading the rindex on mount. Fix this by changing gfs2_rgrp_dump to take an rgrp argument. Reported-by: syzbot+43fa87986bdd31df9de6@syzkaller.appspotmail.com Signed-off-by: Andrew Price Signed-off-by: Andreas Gruenbacher commit 2164f9b9186962ffb7c687e18ec6f5255525f09d Author: Christoph Hellwig Date: Mon Jul 1 23:54:39 2019 +0200 gfs2: use iomap for buffered I/O in ordered and writeback mode Switch to using the iomap readpage and writepage helpers for all I/O in the ordered and writeback modes, and thus eliminate using buffer_heads for I/O in these cases. The journaled data mode is left untouched. (Andreas Gruenbacher: In gfs2_unstuffer_page, switch from mark_buffer_dirty to set_page_dirty instead of accidentally leaving the page / buffer clean.) Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher commit ee1e2c773e4f4ce2213f9d77cc703b669ca6fa3f Author: Bob Peterson Date: Wed Sep 16 11:06:23 2020 -0500 gfs2: call truncate_inode_pages_final for address space glocks Before this patch, we were not calling truncate_inode_pages_final for the address space for glocks, which left the possibility of a leak. We now take care of the problem instead of complaining, and we do it during glock tear-down.. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 0a0d9f55c211d7a03b8ec5ad2d8f5b3062b4387c Author: Bob Peterson Date: Wed Sep 16 08:50:44 2020 -0500 gfs2: simplify the logic in gfs2_evict_inode Now that we've factored out the deleted and undeleted dinode cases in gfs2_evict_inode, we can greatly simplify the logic. Now the function is easy to read and understand. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit d90be6ab9ad76d4f5492e15b73b9cca5cbb03f91 Author: Bob Peterson Date: Fri Sep 11 14:53:52 2020 -0500 gfs2: factor evict_linked_inode out of gfs2_evict_inode Now that we've factored out the delete-dinode case to simplify gfs2_evict_inode, we take it a step further and factor out the other case: where we don't delete the inode. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 53dbc27eb18999619766ff994d2b33c4655c5588 Author: Bob Peterson Date: Fri Sep 11 10:30:26 2020 -0500 gfs2: further simplify gfs2_evict_inode with new func evict_should_delete This patch further simplifies function gfs2_evict_inode() by adding a new function evict_should_delete. The function may also lock the inode glock. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 6e7e9a505571db3edc926f4bc972c7ed3da29a9d Author: Bob Peterson Date: Fri Sep 11 09:29:25 2020 -0500 gfs2: factor evict_unlinked_inode out of gfs2_evict_inode Function gfs2_evict_inode is way too big, complex and unreadable. This is a baby step toward breaking it apart to be more readable. It factors out the portion that deletes the online bits for a dinode that is unlinked and needs to be deleted. A future patch will factor out more. (If I factor out too much, the patch itself becomes unreadable). Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 23d828fc3f1e309bbc23bab817e6b5c40b06d9b9 Author: Bob Peterson Date: Fri Sep 11 10:56:31 2020 -0500 gfs2: rename variable error to ret in gfs2_evict_inode Function gfs2_evict_inode is too big and unreadable. This patch is just a baby step toward improving that. This first step just renames variable error to ret. This will help make future patches more readable. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit e8a8023ee0bda6dcb32e4695bb080499d7a1ffea Author: Liu Shixin Date: Wed Sep 16 10:50:21 2020 +0800 gfs2: convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin Signed-off-by: Andreas Gruenbacher commit 521031fa970109fbf7a808322fb0c92092a51cf0 Author: Bob Peterson Date: Mon Aug 31 08:12:15 2020 -0500 gfs2: Fix bad comment for trans_drain Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 5a61ae1402f15276ee4e003e198aab816958ca69 Author: Andreas Gruenbacher Date: Fri Aug 28 23:44:36 2020 +0200 gfs2: Make sure we don't miss any delayed withdraws Commit ca399c96e96e changes gfs2_log_flush to not withdraw the filesystem while holding the log flush lock, but it fails to check if the filesystem needs to be withdrawn once the log flush lock has been released. Likewise, commit f05b86db314d depends on gfs2_log_flush to trigger for delayed withdraws. Add that and clean up the code flow somewhat. In gfs2_put_super, add a check for delayed withdraws that have been missed to prevent these kinds of bugs in the future. Fixes: ca399c96e96e ("gfs2: flesh out delayed withdraw for gfs2_log_flush") Fixes: f05b86db314d ("gfs2: Prepare to withdraw as soon as an IO error occurs in log write") Cc: stable@vger.kernel.org # v5.7+: 462582b99b607: gfs2: add some much needed cleanup for log flushes that fail Signed-off-by: Andreas Gruenbacher commit 3e4614e7fddec8a8bafd387ca93bd368e64cae9a Author: Thomas Bogendoerfer Date: Tue Oct 6 16:00:03 2020 +0200 MIPS: dec: fix section mismatch Drop inline for memory setup functions and mark them __init to fix section mismatch of pmax_setup_memory_region. Signed-off-by: Thomas Bogendoerfer Acked-by: Maciej W. Rozycki commit 4da9af0014b51c8b015ed8c622440ef28912efe6 Merge: 612e7a4c1645f 01361b665a26e Author: Linus Torvalds Date: Wed Oct 14 14:39:20 2020 -0700 Merge tag 'threads-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull pidfd updates from Christian Brauner: "This introduces a new extension to the pidfd_open() syscall. Users can now raise the new PIDFD_NONBLOCK flag to support non-blocking pidfd file descriptors. This has been requested for uses in async process management libraries such as async-pidfd in Rust. Ever since the introduction of pidfds and more advanced async io various programming languages such as Rust have grown support for async event libraries. These libraries are created to help build epoll-based event loops around file descriptors. A common pattern is to automatically make all file descriptors they manage to O_NONBLOCK. For such libraries the EAGAIN error code is treated specially. When a function is called that returns EAGAIN the function isn't called again until the event loop indicates the the file descriptor is ready. Supporting EAGAIN when waiting on pidfds makes such libraries just work with little effort. This introduces a new flag PIDFD_NONBLOCK that is equivalent to O_NONBLOCK. This follows the same patterns we have for other (anon inode) file descriptors such as EFD_NONBLOCK, IN_NONBLOCK, SFD_NONBLOCK, TFD_NONBLOCK and the same for close-on-exec flags. Passing a non-blocking pidfd to waitid() currently has no effect, i.e. is not supported. There are users which would like to use waitid() on pidfds that are O_NONBLOCK and mix it with pidfds that are blocking and both pass them to waitid(). The expected behavior is to have waitid() return -EAGAIN for non-blocking pidfds and to block for blocking pidfds without needing to perform any additional checks for flags set on the pidfd before passing it to waitid(). Non-blocking pidfds will return EAGAIN from waitid() when no child process is ready yet. Returning -EAGAIN for non-blocking pidfds makes it easier for event loops that handle EAGAIN specially. It also makes the API more consistent and uniform. In essence, waitid() is treated like a read on a non-blocking pidfd or a recvmsg() on a non-blocking socket. With the addition of support for non-blocking pidfds we support the same functionality that sockets do. For sockets() recvmsg() supports MSG_DONTWAIT for pidfds waitid() supports WNOHANG. Both flags are per-call options. In contrast non-blocking pidfds and non-blocking sockets are a setting on an open file description affecting all threads in the calling process as well as other processes that hold file descriptors referring to the same open file description. Both behaviors, per call and per open file description, have genuine use-cases. The interaction with the WNOHANG flag is documented as follows: - If a non-blocking pidfd is passed and WNOHANG is not raised we simply raise the WNOHANG flag internally. When do_wait() returns indicating that there are eligible child processes but none have exited yet we set EAGAIN. If no child process exists we continue returning ECHILD. - If a non-blocking pidfd is passed and WNOHANG is raised waitid() will continue returning 0, i.e. it will not set EAGAIN. This ensure backwards compatibility with applications passing WNOHANG explicitly with pidfds" * tag 'threads-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: tests: remove O_NONBLOCK before waiting for WSTOPPED tests: add waitid() tests for non-blocking pidfds tests: port pidfd_wait to kselftest harness pidfd: support PIDFD_NONBLOCK in pidfd_open() exit: support non-blocking pidfds commit 612e7a4c1645f09449355cf08b6fd3de80b4f8cc Merge: 9e51183e94628 06fe45634942d Author: Linus Torvalds Date: Wed Oct 14 14:32:52 2020 -0700 Merge tag 'kernel-clone-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull kernel_clone() updates from Christian Brauner: "During the v5.9 merge window we reworked the process creation codepaths across multiple architectures. After this work we were only left with the _do_fork() helper based on the struct kernel_clone_args calling convention. As was pointed out _do_fork() isn't valid kernelese especially for a helper that isn't just static. This series removes the _do_fork() helper and introduces the new kernel_clone() helper. The process creation cleanup didn't change the name to something more reasonable mainly because _do_fork() was used in quite a few places. So sending this as a separate series seemed the better strategy. I originally intended to send this early in the v5.9 development cycle after the merge window had closed but given that this was touching quite a few places I decided to defer this until the v5.10 merge window" * tag 'kernel-clone-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: sched: remove _do_fork() tracing: switch to kernel_clone() kgdbts: switch to kernel_clone() kprobes: switch to kernel_clone() x86: switch to kernel_clone() sparc: switch to kernel_clone() nios2: switch to kernel_clone() m68k: switch to kernel_clone() ia64: switch to kernel_clone() h8300: switch to kernel_clone() fork: introduce kernel_clone() commit 9e51183e9462852ad8d1f3b6c687500b770605f4 Merge: 2fc61f25fb296 aa803771a80aa Author: Linus Torvalds Date: Wed Oct 14 14:23:51 2020 -0700 Merge tag 'linux-kselftest-fixes-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: - a selftests harness fix to flush stdout before forking to avoid parent and child printing duplicates messages. This is evident when test output is redirected to a file. - a tools/ wide change to avoid comma separated statements from Joe Perches. This fix spans tools/lib, tools/power/cpupower, and selftests. * tag 'linux-kselftest-fixes-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: tools: Avoid comma separated statements selftests/harness: Flush stdout before forking commit 2fc61f25fb296827387a5f01129dbc00cbe3ca58 Merge: 37187df45af7d fe341eb151ec0 Author: Linus Torvalds Date: Wed Oct 14 14:06:06 2020 -0700 Merge tag 'xfs-5.10-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "The biggest changes are two new features for the ondisk metadata: one to record the sizes of the inode btrees in the AG to increase redundancy checks and to improve mount times; and a second new feature to support timestamps until the year 2486. We also fixed a problem where reflinking into a file that requires synchronous writes wouldn't actually flush the updates to disk; clean up a fair amount of cruft; and started fixing some bugs in the realtime volume code. Summary: - Clean up the buffer ioend calling path so that the retry strategy isn't quite so scattered everywhere. - Clean up m_sb_bp handling. - New feature: storing inode btree counts in the AGI to speed up certain mount time per-AG block reservation operatoins and add a little more metadata redundancy. - New feature: Widen inode timestamps and quota grace expiration timestamps to support dates through the year 2486. - Get rid of more of our custom buffer allocation API wrappers. - Use a proper VLA for shortform xattr structure namevals. - Force the log after reflinking or deduping into a file that is opened with O_SYNC or O_DSYNC. - Fix some math errors in the realtime allocator" * tag 'xfs-5.10-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (42 commits) xfs: ensure that fpunch, fcollapse, and finsert operations are aligned to rt extent size xfs: make sure the rt allocator doesn't run off the end xfs: Remove unneeded semicolon xfs: force the log after remapping a synchronous-writes file xfs: Convert xfs_attr_sf macros to inline functions xfs: Use variable-size array for nameval in xfs_attr_sf_entry xfs: Remove typedef xfs_attr_shortform_t xfs: remove typedef xfs_attr_sf_entry_t xfs: Remove kmem_zalloc_large() xfs: enable big timestamps xfs: trace timestamp limits xfs: widen ondisk quota expiration timestamps to handle y2038+ xfs: widen ondisk inode timestamps to deal with y2038+ xfs: redefine xfs_ictimestamp_t xfs: redefine xfs_timestamp_t xfs: move xfs_log_dinode_to_disk to the log recovery code xfs: refactor quota timestamp coding xfs: refactor default quota grace period setting code xfs: refactor quota expiration timer modification xfs: explicitly define inode timestamp range ... commit 788e96d1d39949fc91457a816f4bda0d374c257b Author: Chengguang Xu Date: Tue Oct 13 06:49:21 2020 +0800 f2fs: code cleanup by removing unnecessary check f2fs_seek_block() is only used for regular file, so don't have to check inline dentry in it. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ae284d87abade58c8db7760c808f311ef1ce693c Author: Jamie Iles Date: Mon Oct 12 14:09:48 2020 +0100 f2fs: wait for sysfs kobject removal before freeing f2fs_sb_info syzkaller found that with CONFIG_DEBUG_KOBJECT_RELEASE=y, unmounting an f2fs filesystem could result in the following splat: kobject: 'loop5' ((____ptrval____)): kobject_release, parent 0000000000000000 (delayed 250) kobject: 'f2fs_xattr_entry-7:5' ((____ptrval____)): kobject_release, parent 0000000000000000 (delayed 750) ------------[ cut here ]------------ ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x98 WARNING: CPU: 0 PID: 699 at lib/debugobjects.c:485 debug_print_object+0x180/0x240 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 699 Comm: syz-executor.5 Tainted: G S 5.9.0-rc8+ #101 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x0/0x4d8 show_stack+0x34/0x48 dump_stack+0x174/0x1f8 panic+0x360/0x7a0 __warn+0x244/0x2ec report_bug+0x240/0x398 bug_handler+0x50/0xc0 call_break_hook+0x160/0x1d8 brk_handler+0x30/0xc0 do_debug_exception+0x184/0x340 el1_dbg+0x48/0xb0 el1_sync_handler+0x170/0x1c8 el1_sync+0x80/0x100 debug_print_object+0x180/0x240 debug_check_no_obj_freed+0x200/0x430 slab_free_freelist_hook+0x190/0x210 kfree+0x13c/0x460 f2fs_put_super+0x624/0xa58 generic_shutdown_super+0x120/0x300 kill_block_super+0x94/0xf8 kill_f2fs_super+0x244/0x308 deactivate_locked_super+0x104/0x150 deactivate_super+0x118/0x148 cleanup_mnt+0x27c/0x3c0 __cleanup_mnt+0x28/0x38 task_work_run+0x10c/0x248 do_notify_resume+0x9d4/0x1188 work_pending+0x8/0x34c Like the error handling for f2fs_register_sysfs(), we need to wait for the kobject to be destroyed before returning to prevent a potential use-after-free. Fixes: bf9e697ecd42 ("f2fs: expose features to sysfs entry") Cc: Jaegeuk Kim Cc: Chao Yu Signed-off-by: Jamie Iles Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3d53c6df4299134525ad9e197f480e89bc8b06af Author: Cezary Rojewski Date: Mon Oct 12 12:32:21 2020 +0200 ASoC: Intel: catpt: Relax clock selection conditions Stress tests show that DSP may occasionally be late with signaling WAIT state when all pins are made use of simultaneously plus start/stop (pause) gets involved. While this isn't tied to standard audio scenarios where only System Pin (playback and capture) is involved, ensure user is not hindered when playing with more advanced scenarios. >From DSP perspective, clock acts as a resource: low clock equals less resources, high clock more resources. Relax clock selection procedure so only low -> high switch is allowed when awaiting WAIT signal times out. Once active stream count decreases, DSP will have more time internally to adjust thus low clock selection becomes possible again. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201012103221.30759-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 1d159edf19542793851a04202e5b0dd548a9415c Author: Cezary Rojewski Date: Mon Oct 12 12:32:20 2020 +0200 ASoC: Intel: catpt: Wake up device before configuring SSP port catpt_dai_pcm_new() invoked during new PCM runtime creation configures SSP by sending IPC to DSP firmware. For that to succeed device needs to be up and running. While components default probing behavior - snd_soc_catpt causing machine board module to load just after it - needs no changes, machine board's module may be unloaded and re-loaded at a different time e.g.: when catpt is already asleep. Wake device explicitly in catpt_dai_pcm_new() to ensure communication is established before sending any IPCs, enabling those advanced scenarios in the process. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201012103221.30759-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 1849a3872f035494639201fdefb394425233647b Author: Cezary Rojewski Date: Mon Oct 12 11:50:05 2020 +0200 ASoC: Intel: atom: Remove duplicate kconfigs SND_SST_IPC and its _PCI and _ACPI variants all target sound/soc/intel/atom solution alone. SND_SST_IPC is the core component, required for PCI and ACPI based atom platforms both. _PCI and _ACPI target Merrifield/Edison and Baytrial/Cherrytrail platforms respectively. On top of that, there is an equivalent set of configs targeting the same solution: - SND_SST_ATOM_HIFI2_PLATFORM (core) - SND_SST_ATOM_HIFI2_PLATFORM_PCI - SND_SST_ATOM_HIFI2_PLATFORM_ACPI As both sets do the same job - allow for granular platform selection - remove the duplicate set and rely on SND_SST_ATOM_HIFI2_PLATOFRM_XXX configs alone. Signed-off-by: Cezary Rojewski Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20201012095005.29859-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 9fe9efd6924c9a62ebb759025bb8927e398f51f7 Author: Tomasz Figa Date: Wed Oct 14 14:16:24 2020 +0000 ASoC: Intel: kbl_rt5663_max98927: Fix kabylake_ssp_fixup function This is a copy of commit 5c5f1baee85a ("ASoC: Intel: kbl_rt5663_rt5514_max98927: Fix kabylake_ssp_fixup function") applied to the kbl_rt5663_max98927 board file. Original explanation of the change: kabylake_ssp_fixup function uses snd_soc_dpcm to identify the codecs DAIs. The HW parameters are changed based on the codec DAI of the stream. The earlier approach to get snd_soc_dpcm was using container_of() macro on snd_pcm_hw_params. The structures have been modified over time and snd_soc_dpcm does not have snd_pcm_hw_params as a reference but as a copy. This causes the current driver to crash when used. This patch changes the way snd_soc_dpcm is extracted. snd_soc_pcm_runtime holds 2 dpcm instances (one for playback and one for capture). 2 codecs on the SSP are dmic (capture) and speakers (playback). Based on the stream direction, snd_soc_dpcm is extracted from snd_soc_pcm_runtime. Fixes a boot crash on a HP Chromebook x2: [ 16.582225] BUG: kernel NULL pointer dereference, address: 0000000000000050 [ 16.582231] #PF: supervisor read access in kernel mode [ 16.582233] #PF: error_code(0x0000) - not-present page [ 16.582234] PGD 0 P4D 0 [ 16.582238] Oops: 0000 [#1] PREEMPT SMP PTI [ 16.582241] CPU: 0 PID: 1980 Comm: cras Tainted: G C 5.4.58 #1 [ 16.582243] Hardware name: HP Soraka/Soraka, BIOS Google_Soraka.10431.75.0 08/30/2018 [ 16.582247] RIP: 0010:kabylake_ssp_fixup+0x19/0xbb [snd_soc_kbl_rt5663_max98927] [ 16.582250] Code: c6 6f c5 80 c0 44 89 f2 31 c0 e8 3e c9 4c d6 eb de 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 53 48 89 f3 48 8b 46 c8 48 8b 4e d0 <48> 8b 49 10 4c 8b 78 10 4c 8b 31 4c 89 f7 48 c7 c6 4b c2 80 c0 e8 [ 16.582252] RSP: 0000:ffffaf7e81e0b958 EFLAGS: 00010282 [ 16.582254] RAX: ffffffff96f13e0d RBX: ffffaf7e81e0ba00 RCX: 0000000000000040 [ 16.582256] RDX: ffffaf7e81e0ba00 RSI: ffffaf7e81e0ba00 RDI: ffffa3b208558028 [ 16.582258] RBP: ffffaf7e81e0b970 R08: ffffa3b203b54160 R09: ffffaf7e81e0ba00 [ 16.582259] R10: 0000000000000000 R11: ffffffffc080b345 R12: ffffa3b209fb6e00 [ 16.582261] R13: ffffa3b1b1a47838 R14: ffffa3b1e6197f28 R15: ffffaf7e81e0ba00 [ 16.582263] FS: 00007eb3f25aaf80(0000) GS:ffffa3b236a00000(0000) knlGS:0000000000000000 [ 16.582265] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 16.582267] CR2: 0000000000000050 CR3: 0000000246bc8006 CR4: 00000000003606f0 [ 16.582269] Call Trace: [ 16.582275] snd_soc_link_be_hw_params_fixup+0x21/0x68 [ 16.582278] snd_soc_dai_hw_params+0x25/0x94 [ 16.582282] soc_pcm_hw_params+0x2d8/0x583 [ 16.582288] dpcm_be_dai_hw_params+0x172/0x29e [ 16.582291] dpcm_fe_dai_hw_params+0x9f/0x12f [ 16.582295] snd_pcm_hw_params+0x137/0x41c [ 16.582298] snd_pcm_hw_params_user+0x3c/0x71 [ 16.582301] snd_pcm_common_ioctl+0x2c6/0x565 [ 16.582304] snd_pcm_ioctl+0x32/0x36 [ 16.582307] do_vfs_ioctl+0x506/0x783 [ 16.582311] ksys_ioctl+0x58/0x83 [ 16.582313] __x64_sys_ioctl+0x1a/0x1e [ 16.582316] do_syscall_64+0x54/0x7e [ 16.582319] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 16.582322] RIP: 0033:0x7eb3f1886157 [ 16.582324] Code: 8a 66 90 48 8b 05 11 dd 2b 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 e1 dc 2b 00 f7 d8 64 89 01 48 [ 16.582326] RSP: 002b:00007ffff7559818 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 16.582329] RAX: ffffffffffffffda RBX: 00005acc9188b140 RCX: 00007eb3f1886157 [ 16.582330] RDX: 00007ffff7559940 RSI: 00000000c2604111 RDI: 000000000000001e [ 16.582332] RBP: 00007ffff7559840 R08: 0000000000000004 R09: 0000000000000000 [ 16.582333] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000bb80 [ 16.582335] R13: 00005acc91702e80 R14: 00007ffff7559940 R15: 00005acc91702e80 [ 16.582337] Modules linked in: rfcomm cmac algif_hash algif_skcipher af_alg uinput hid_google_hammer snd_soc_kbl_rt5663_max98927 snd_soc_hdac_hdmi snd_soc_dmic snd_soc_skl_ssp_clk snd_soc_skl snd_soc_sst_ipc snd_soc_sst_dsp snd_soc_hdac_hda snd_soc_acpi_intel_match snd_soc_acpi snd_hda_ext_core snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core ipu3_cio2 ipu3_imgu(C) videobuf2_v4l2 videobuf2_common videobuf2_dma_sg videobuf2_memops snd_soc_rt5663 snd_soc_max98927 snd_soc_rl6231 ov5670 ov13858 acpi_als v4l2_fwnode dw9714 fuse xt_MASQUERADE iio_trig_sysfs cros_ec_light_prox cros_ec_sensors cros_ec_sensors_core cros_ec_sensors_ring industrialio_triggered_buffer kfifo_buf industrialio cros_ec_sensorhub cdc_ether usbnet btusb btrtl btintel btbcm bluetooth ecdh_generic ecc lzo_rle lzo_compress iwlmvm zram iwl7000_mac80211 r8152 mii iwlwifi cfg80211 joydev [ 16.584243] gsmi: Log Shutdown Reason 0x03 [ 16.584246] CR2: 0000000000000050 [ 16.584248] ---[ end trace c8511d090c11edff ]--- Suggested-by: Łukasz Majczak Fixes: 2e5894d73789e ("ASoC: pcm: Add support for DAI multicodec") Signed-off-by: Tomasz Figa Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201014141624.4143453-1-tfiga@chromium.org Signed-off-by: Mark Brown commit 8f4729e880647c419de0bbe3ff21d7efb4e65676 Author: Kent Russell Date: Wed Oct 14 07:47:32 2020 -0400 drm/amdkfd: Use kvfree in destroy_crat_image Now that we use kvmalloc for the crat_image, we need to use kvfree when we destroy this. Fixes: d0e63b343e575e ("drm/amdkfd: Use kvmalloc instead of kmalloc for VCRAT") Reported-by: Morris Zhang Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 187561dd76531945126b15c9486fec7cfa5f0415 Author: Veerabadhran G Date: Thu Oct 8 22:30:02 2020 +0530 drm/amdgpu: vcn and jpeg ring synchronization Synchronize the ring usage for vcn1 and jpeg1 to workaround a hardware bug. Signed-off-by: Veerabadhran Gopalakrishnan Acked-by: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 83da6eea3af669ee0b1f1bc05ffd6150af984994 Author: Evan Quan Date: Wed Sep 2 16:10:10 2020 +0800 drm/amd/pm: increase mclk switch threshold to 200 us To avoid underflow seen on Polaris10 with some 3440x1440 144Hz displays. As the threshold of 190 us cuts too close to minVBlankTime of 192 us. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 39ec39d77170a3fe9e92dcddf9060634276ee1ee Author: Mauro Carvalho Chehab Date: Tue Oct 13 13:54:20 2020 +0200 docs: amdgpu: fix a warning when building the documentation As reported by Sphinx: Documentation/gpu/amdgpu.rst:200: WARNING: Inline emphasis start-string without end-string. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher commit c0e35ed924e47be387205fa4beaf4134b992e0d4 Author: Mauro Carvalho Chehab Date: Tue Oct 13 13:54:27 2020 +0200 drm/amd/display: kernel-doc: document force_timing_sync As warned when running "make htmldocs": ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:345: warning: Function parameter or member 'force_timing_sync' not described in 'amdgpu_display_manager' This new struct member was not documented at kernel-doc markup. Fixes: 3d4e52d0cf24 ("drm/amd/display: Add debugfs for forcing stream timing sync") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Alex Deucher commit 02a1bea65bb335ebfd3a4d191742de3b6f64a414 Author: Alex Deucher Date: Mon Oct 12 10:12:28 2020 -0400 drm/amdgpu/swsmu: init the baco mutex in early_init GPU reset might get called during init time, before sw_init has been called. Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 37187df45af7d28d27b5c130c23f407ca9dbefa2 Merge: 531d29b0b6740 1a31182edd008 Author: Linus Torvalds Date: Wed Oct 14 12:23:00 2020 -0700 Merge tag 'iomap-5.10-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap updates from Darrick Wong: "There's not a lot of new stuff going on here -- a little bit of code refactoring to make iomap workable with btrfs' fsync locking model, cleanups in preparation for adding THP support for filesystems, and fixing a data corruption issue for blocksize < pagesize filesystems. Summary: - Don't WARN_ON weird states that unprivileged users can create. - Don't invalidate page cache when direct writes want to fall back to buffered. - Fix some problems when readahead ios fail. - Fix a problem where inline data pages weren't getting flushed during an unshare operation. - Rework iomap to support arbitrarily many blocks per page in preparation to support THP for the page cache. - Fix a bug in the blocksize < pagesize buffered io path where we could fail to initialize the many-blocks-per-page uptodate bitmap correctly when the backing page is actually up to date. This could cause us to forget to write out dirty pages. - Split out the generic_write_sync at the end of the directio write path so that btrfs can drop the inode lock before sync'ing the file. - Call inode_dio_end before trying to sync the file after a O_DSYNC direct write (instead of afterwards) to match the behavior of the old directio code" * tag 'iomap-5.10-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: Call inode_dio_end() before generic_write_sync() iomap: Allow filesystem to call iomap_dio_complete without i_rwsem iomap: Set all uptodate bits for an Uptodate page iomap: Change calling convention for zeroing iomap: Convert iomap_write_end types iomap: Convert write_count to write_bytes_pending iomap: Convert read_count to read_bytes_pending iomap: Support arbitrarily many blocks per page iomap: Use bitmap ops to set uptodate bits iomap: Use kzalloc to allocate iomap_page fs: Introduce i_blocks_per_page iomap: Fix misplaced page flushing iomap: Use round_down/round_up macros in __iomap_write_begin iomap: Mark read blocks uptodate in write_begin iomap: Clear page error before beginning a write iomap: Fix direct I/O write consistency check iomap: fix WARN_ON_ONCE() from unprivileged users commit 44264591a8c4da7090a4bfd10e04f4cb8fe60afe Author: Rodrigo Siqueira Date: Fri Oct 9 09:36:01 2020 -0400 drm/amd/display: Fix module load hangs when connected to an eDP It was recently introduced a change that enables driver to disable streams if pixel clock changes. Consequently, the code path executed in the disable vbios function expanded to an encoder verification part. The encoder loop is nested inside the pipe count loop, and both loops share the 'i' variable in control of their flow. This situation may lead to an infinite loop because the encoder loop constantly updates the `i` variable, making the first loop always positive. As a result, we can see a soft hang during the module load (modprobe amdgpu) and a series of dmesg log that looks like this: kernel:[ 124.538727] watchdog: BUG: soft lockup - CPU#2 stuck for 22s! [modprobe:1000] RSP: 0018:ffffabbf419bf0e8 EFLAGS: 00000282 RAX: ffffffffc0809de0 RBX: ffff93b35ccc0000 RCX: ffff93b366c21800 RDX: 0000000000000000 RSI: 0000000000000141 RDI: ffff93b35ccc0000 RBP: ffffabbf419bf108 R08: ffffabbf419bf164 R09: 0000000000000001 R10: 0000000000000003 R11: 0000000000000003 R12: 0000000008677d40 R13: 0000000000000141 R14: ffff93b35cfc0000 R15: ffff93b35abc0000 FS: 00007f1400717540(0000) GS:ffff93b37f680000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005649b66b0968 CR3: 00000003e0fec000 CR4: 0000000000350ee0 Call Trace: amdgpu_device_rreg+0x17/0x20 [amdgpu] amdgpu_cgs_read_register+0x14/0x20 [amdgpu] dm_read_reg_func+0x3a/0xb0 [amdgpu] get_pixel_clk_frequency_100hz+0x30/0x50 [amdgpu] dc_commit_state+0x8f1/0xae0 [amdgpu] ? drm_calc_timestamping_constants+0x101/0x160 [drm] amdgpu_dm_atomic_commit_tail+0x39d/0x21a0 [amdgpu] ? dcn21_validate_bandwidth+0xe5/0x290 [amdgpu] ? kfree+0xc3/0x390 ? dcn21_validate_bandwidth+0xe5/0x290 [amdgpu] ... RSP: 002b:00007fff26009bd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 RAX: ffffffffffffffda RBX: 000055a8025bea50 RCX: 00007f140085c89d RDX: 0000000000000000 RSI: 000055a8025b8290 RDI: 000000000000000c RBP: 0000000000040000 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000000c R11: 0000000000000246 R12: 000055a8025b8290 R13: 0000000000000000 R14: 000055a8025bead0 R15: 000055a8025bea50 This issue was fixed by introducing a second variable for the internal loop. Fixes: 8353d30e747f4e ("drm/amd/display: disable stream if pixel clock changed with link active") Reviewed-by: Roman Li Reviewed-by: Nicholas Kazlauskas Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 626b901f60446355e35e8c76c6b391a7d7491203 Author: Michael Kelley Date: Fri Aug 14 12:45:04 2020 -0700 Drivers: hv: vmbus: Add parsing of VMbus interrupt in ACPI DSDT On ARM64, Hyper-V now specifies the interrupt to be used by VMbus in the ACPI DSDT. This information is not used on x86 because the interrupt vector must be hardcoded. But update the generic VMbus driver to do the parsing and pass the information to the architecture specific code that sets up the Linux IRQ. Update consumers of the interrupt to get it from an architecture specific function. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1597434304-40631-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 531d29b0b674036347a04c08c0898ff1aa522180 Merge: 79db2b74aa146 7e3c3883c381a Author: Linus Torvalds Date: Wed Oct 14 12:08:34 2020 -0700 Merge tag 'iommu-updates-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu updates from Joerg Roedel: - ARM-SMMU Updates from Will: - Continued SVM enablement, where page-table is shared with CPU - Groundwork to support integrated SMMU with Adreno GPU - Allow disabling of MSI-based polling on the kernel command-line - Minor driver fixes and cleanups (octal permissions, error messages, ...) - Secure Nested Paging Support for AMD IOMMU. The IOMMU will fault when a device tries DMA on memory owned by a guest. This needs new fault-types as well as a rewrite of the IOMMU memory semaphore for command completions. - Allow broken Intel IOMMUs (wrong address widths reported) to still be used for interrupt remapping. - IOMMU UAPI updates for supporting vSVA, where the IOMMU can access address spaces of processes running in a VM. - Support for the MT8167 IOMMU in the Mediatek IOMMU driver. - Device-tree updates for the Renesas driver to support r8a7742. - Several smaller fixes and cleanups all over the place. * tag 'iommu-updates-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (57 commits) iommu/vt-d: Gracefully handle DMAR units with no supported address widths iommu/vt-d: Check UAPI data processed by IOMMU core iommu/uapi: Handle data and argsz filled by users iommu/uapi: Rename uapi functions iommu/uapi: Use named union for user data iommu/uapi: Add argsz for user filled data docs: IOMMU user API iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate() iommu/arm-smmu-v3: Add SVA device feature iommu/arm-smmu-v3: Check for SVA features iommu/arm-smmu-v3: Seize private ASID iommu/arm-smmu-v3: Share process page tables iommu/arm-smmu-v3: Move definitions to a header iommu/io-pgtable-arm: Move some definitions to a header iommu/arm-smmu-v3: Ensure queue is read after updating prod pointer iommu/amd: Re-purpose Exclusion range registers to support SNP CWWB iommu/amd: Add support for RMP_PAGE_FAULT and RMP_HW_ERR iommu/amd: Use 4K page for completion wait write-back semaphore iommu/tegra-smmu: Allow to group clients in same swgroup iommu/tegra-smmu: Fix iova->phys translation ... commit 79db2b74aa146384dc8a962495f43941e5a91ee6 Merge: defb53a7c790f b51e627158cb0 Author: Linus Torvalds Date: Wed Oct 14 12:00:02 2020 -0700 Merge branch 'stable/for-linus-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb Pull swiotlb updates from Konrad Rzeszutek Wilk: "Minor enhancement of using %p to print phys_addr_r and also compiler warnings" * 'stable/for-linus-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: swiotlb: Mark max_segment with static keyword swiotlb: Declare swiotlb_late_init_with_default_size() in header swiotlb: Use %pa to print phys_addr_t variables commit defb53a7c790f9e37a765de8a5d830ed15e2055b Merge: cf1d2b44f6c70 2ef0342530b0f Author: Linus Torvalds Date: Wed Oct 14 11:50:01 2020 -0700 Merge tag 'pnp-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull PNP updates from Rafael Wysocki: "These clean the PNP code somewhat: - Remove the now unused pnp_find_card() function (Christoph Hellwig) - Drop duplicate pci.h include from the quirks code and add an "internal.h" include to acpi_pnp.c to fix a compiler warning (Tian Tao)" * tag 'pnp-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PNP: remove the now unused pnp_find_card() function PNP: ACPI: Fix missing-prototypes in acpi_pnp.c PNP: quirks: Fix duplicate included pci.h commit cf1d2b44f6c701ffff58606b5b8a8996190d6e7d Merge: 0b8417c141815 8be2362d10e8b Author: Linus Torvalds Date: Wed Oct 14 11:42:04 2020 -0700 Merge tag 'acpi-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These add support for generic initiator-only proximity domains to the ACPI NUMA code and the architectures using it, clean up some non-ACPICA code referring to debug facilities from ACPICA, reduce the overhead related to accessing GPE registers, add a new DPTF (Dynamic Power and Thermal Framework) participant driver, update the ACPICA code in the kernel to upstream revision 20200925, add a new ACPI backlight whitelist entry, fix a few assorted issues and clean up some code. Specifics: - Add support for generic initiator-only proximity domains to the ACPI NUMA code and the architectures using it (Jonathan Cameron) - Clean up some non-ACPICA code referring to debug facilities from ACPICA that are not actually used in there (Hanjun Guo) - Add new DPTF driver for the PCH FIVR participant (Srinivas Pandruvada) - Reduce overhead related to accessing GPE registers in ACPICA and the OS interface layer and make it possible to access GPE registers using logical addresses if they are memory-mapped (Rafael Wysocki) - Update the ACPICA code in the kernel to upstream revision 20200925 including changes as follows: + Add predefined names from the SMBus sepcification (Bob Moore) + Update acpi_help UUID list (Bob Moore) + Return exceptions for string-to-integer conversions in iASL (Bob Moore) + Add a new "ALL " debugger command (Bob Moore) + Add support for 64 bit risc-v compilation (Colin Ian King) + Do assorted cleanups (Bob Moore, Colin Ian King, Randy Dunlap) - Add new ACPI backlight whitelist entry for HP 635 Notebook (Alex Hung) - Move TPS68470 OpRegion driver to drivers/acpi/pmic/ and split out Kconfig and Makefile specific for ACPI PMIC (Andy Shevchenko) - Clean up the ACPI SoC driver for AMD SoCs (Hanjun Guo) - Add missing config_item_put() to fix refcount leak (Hanjun Guo) - Drop lefrover field from struct acpi_memory_device (Hanjun Guo) - Make the ACPI extlog driver check for RDMSR failures (Ben Hutchings) - Fix handling of lid state changes in the ACPI button driver when input device is closed (Dmitry Torokhov) - Fix several assorted build issues (Barnabás Pőcze, John Garry, Nathan Chancellor, Tian Tao) - Drop unused inline functions and reduce code duplication by using kobj_to_dev() in the NFIT parsing code (YueHaibing, Wang Qing) - Serialize tools/power/acpi Makefile (Thomas Renninger)" * tag 'acpi-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (64 commits) ACPICA: Update version to 20200925 Version 20200925 ACPICA: Remove unnecessary semicolon ACPICA: Debugger: Add a new command: "ALL " ACPICA: iASL: Return exceptions for string-to-integer conversions ACPICA: acpi_help: Update UUID list ACPICA: Add predefined names found in the SMBus sepcification ACPICA: Tree-wide: fix various typos and spelling mistakes ACPICA: Drop the repeated word "an" in a comment ACPICA: Add support for 64 bit risc-v compilation ACPI: button: fix handling lid state changes when input device closed tools/power/acpi: Serialize Makefile ACPI: scan: Replace ACPI_DEBUG_PRINT() with pr_debug() ACPI: memhotplug: Remove 'state' from struct acpi_memory_device ACPI / extlog: Check for RDMSR failure ACPI: Make acpi_evaluate_dsm() prototype consistent docs: mm: numaperf.rst Add brief description for access class 1. node: Add access1 class to represent CPU to memory characteristics ACPI: HMAT: Fix handling of changes from ACPI 6.2 to ACPI 6.3 ACPI: Let ACPI know we support Generic Initiator Affinity Structures x86: Support Generic Initiator only proximity domains ... commit 87aac3a80af5cbad93e63250e8a1e19095ba0d30 Author: Xiubo Li Date: Tue Oct 13 22:45:14 2020 -0400 nbd: make the config put is called before the notifying the waiter There has one race case for ceph's rbd-nbd tool. When do mapping it may fail with EBUSY from ioctl(nbd, NBD_DO_IT), but actually the nbd device has already unmaped. It dues to if just after the wake_up(), the recv_work() is scheduled out and defers calling the nbd_config_put(), though the map process has exited the "nbd->recv_task" is not cleared. Signed-off-by: Xiubo Li Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit a73f863af4ce9730795eab7097fb2102e6854365 Author: Juri Lelli Date: Tue Oct 13 07:31:14 2020 +0200 sched/features: Fix !CONFIG_JUMP_LABEL case Commit: 765cc3a4b224e ("sched/core: Optimize sched_feat() for !CONFIG_SCHED_DEBUG builds") made sched features static for !CONFIG_SCHED_DEBUG configurations, but overlooked the CONFIG_SCHED_DEBUG=y and !CONFIG_JUMP_LABEL cases. For the latter echoing changes to /sys/kernel/debug/sched_features has the nasty effect of effectively changing what sched_features reports, but without actually changing the scheduler behaviour (since different translation units get different sysctl_sched_features). Fix CONFIG_SCHED_DEBUG=y and !CONFIG_JUMP_LABEL configurations by properly restructuring ifdefs. Fixes: 765cc3a4b224e ("sched/core: Optimize sched_feat() for !CONFIG_SCHED_DEBUG builds") Co-developed-by: Daniel Bristot de Oliveira Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Juri Lelli Signed-off-by: Ingo Molnar Acked-by: Patrick Bellasi Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20201013053114.160628-1-juri.lelli@redhat.com commit eba9f08293d76370049ec85581ab3d7f6d069e3e Author: zhuguangqing Date: Wed Oct 14 22:02:20 2020 +0800 sched: Replace zero-length array with flexible-array In the following commit: 04f5c362ec6d: ("sched/fair: Replace zero-length array with flexible-array") a zero-length array cpumask[0] has been replaced with cpumask[]. But there is still a cpumask[0] in 'struct sched_group_capacity' which was missed. The point of using [] instead of [0] is that with [] the compiler will generate a build warning if it isn't the last member of a struct. [ mingo: Rewrote the changelog. ] Signed-off-by: zhuguangqing Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20201014140220.11384-1-zhuguangqing83@gmail.com commit c3b484c439b0bab7a698495f33ef16286a1000c4 Author: Andy Lutomirski Date: Sun Oct 11 19:51:21 2020 -0700 x86/syscalls: Document the fact that syscalls 512-547 are a legacy mistake Since this commit: 6365b842aae4 ("x86/syscalls: Split the x32 syscalls into their own table") there is no need for special x32-specific syscall numbers. I forgot to update the comments in syscall_64.tbl. Add comments to make it clear to future contributors that this range is a legacy wart. Reported-by: Jessica Clarke Signed-off-by: Andy Lutomirski Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/6c56fb4ddd18fc60a238eb4d867e4b3d97c6351e.1602471055.git.luto@kernel.org commit 0b8417c14181595997091145342954332fa016cd Merge: 15cb5469fc5ff 16641d81f9ff5 Author: Linus Torvalds Date: Wed Oct 14 10:45:41 2020 -0700 Merge tag 'pm-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These rework the collection of cpufreq statistics to allow it to take place if fast frequency switching is enabled in the governor, rework the frequency invariance handling in the cpufreq core and drivers, add new hardware support to a couple of cpufreq drivers, fix a number of assorted issues and clean up the code all over. Specifics: - Rework cpufreq statistics collection to allow it to take place when fast frequency switching is enabled in the governor (Viresh Kumar). - Make the cpufreq core set the frequency scale on behalf of the driver and update several cpufreq drivers accordingly (Ionela Voinescu, Valentin Schneider). - Add new hardware support to the STI and qcom cpufreq drivers and improve them (Alain Volmat, Manivannan Sadhasivam). - Fix multiple assorted issues in cpufreq drivers (Jon Hunter, Krzysztof Kozlowski, Matthias Kaehlcke, Pali Rohár, Stephan Gerhold, Viresh Kumar). - Fix several assorted issues in the operating performance points (OPP) framework (Stephan Gerhold, Viresh Kumar). - Allow devfreq drivers to fetch devfreq instances by DT enumeration instead of using explicit phandles and modify the devfreq core code to support driver-specific devfreq DT bindings (Leonard Crestez, Chanwoo Choi). - Improve initial hardware resetting in the tegra30 devfreq driver and clean up the tegra cpuidle driver (Dmitry Osipenko). - Update the cpuidle core to collect state entry rejection statistics and expose them via sysfs (Lina Iyer). - Improve the ACPI _CST code handling diagnostics (Chen Yu). - Update the PSCI cpuidle driver to allow the PM domain initialization to occur in the OSI mode as well as in the PC mode (Ulf Hansson). - Rework the generic power domains (genpd) core code to allow domain power off transition to be aborted in the absence of the "power off" domain callback (Ulf Hansson). - Fix two suspend-to-idle issues in the ACPI EC driver (Rafael Wysocki). - Fix the handling of timer_expires in the PM-runtime framework on 32-bit systems and the handling of device links in it (Grygorii Strashko, Xiang Chen). - Add IO requests batching support to the hibernate image saving and reading code and drop a bogus get_gendisk() from there (Xiaoyi Chen, Christoph Hellwig). - Allow PCIe ports to be put into the D3cold power state if they are power-manageable via ACPI (Lukas Wunner). - Add missing header file include to a power capping driver (Pujin Shi). - Clean up the qcom-cpr AVS driver a bit (Liu Shixin). - Kevin Hilman steps down as designated reviwer of adaptive voltage scaling (AVS) drivers (Kevin Hilman)" * tag 'pm-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (65 commits) cpufreq: stats: Fix string format specifier mismatch arm: disable frequency invariance for CONFIG_BL_SWITCHER cpufreq,arm,arm64: restructure definitions of arch_set_freq_scale() cpufreq: stats: Add memory barrier to store_reset() cpufreq: schedutil: Simplify sugov_fast_switch() ACPI: EC: PM: Drop ec_no_wakeup check from acpi_ec_dispatch_gpe() ACPI: EC: PM: Flush EC work unconditionally after wakeup PCI/ACPI: Whitelist hotplug ports for D3 if power managed by ACPI PM: hibernate: remove the bogus call to get_gendisk() in software_resume() cpufreq: Move traces and update to policy->cur to cpufreq core cpufreq: stats: Enable stats for fast-switch as well cpufreq: stats: Mark few conditionals with unlikely() cpufreq: stats: Remove locking cpufreq: stats: Defer stats update to cpufreq_stats_record_transition() PM: domains: Allow to abort power off when no ->power_off() callback PM: domains: Rename power state enums for genpd PM / devfreq: tegra30: Improve initial hardware resetting PM / devfreq: event: Change prototype of devfreq_event_get_edev_by_phandle function PM / devfreq: Change prototype of devfreq_get_devfreq_by_phandle function PM / devfreq: Add devfreq_get_devfreq_by_node function ... commit 15cb5469fc5fff06969832028b743cb658d1a5b5 Merge: a09b1d78505eb 1a3f7813f38e4 Author: Linus Torvalds Date: Wed Oct 14 10:43:24 2020 -0700 Merge tag 'platform-drivers-x86-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: "Rather calm cycle for x86 platform drivers, all these have been in for-next for a couple of days with no bot complaints. Highlights: - PMC TigerLake fixes and new RocketLake support - various small fixes / updates in other drivers/tools" * tag 'platform-drivers-x86-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: MAINTAINERS: update X86 PLATFORM DRIVERS entry with new kernel.org git repo platform/x86: mlx-platform: Add capability field to platform FAN description platform_data/mlxreg: Extend core platform structure platform_data/mlxreg: Update module license platform/x86: mlx-platform: Remove PSU EEPROM configuration MAINTAINERS: Update maintainers for pmc_core driver platform/x86: intel_pmc_core: fix: Replace dev_dbg macro with dev_info() platform/x86: intel_pmc_core: Add Intel RocketLake (RKL) support platform/x86: intel_pmc_core: Clean up: Remove the duplicate comments and reorganize platform/x86: intel_pmc_core: Fix the slp_s0 counter displayed value platform/x86: intel_pmc_core: Fix TigerLake power gating status map platform/x86: pmc_core: Use descriptive names for LPM registers tools/power/x86/intel-speed-select: Update version for v5.10 tools/power/x86/intel-speed-select: Fix missing base-freq core IDs platform/x86: hp-wmi: add support for thermal policy commit b9ceca6be43233845be70792be9b5ab315d2e010 Author: Florian Fainelli Date: Tue Oct 13 19:17:37 2020 -0700 firmware: arm_scmi: Fix duplicate workqueue name When more than a single SCMI device are present in the system, the creation of the notification workqueue with the WQ_SYSFS flag will lead to the following sysfs duplicate node warning: sysfs: cannot create duplicate filename '/devices/virtual/workqueue/scmi_notify' CPU: 0 PID: 20 Comm: kworker/0:1 Not tainted 5.9.0-gdf4dd84a3f7d #29 Hardware name: Broadcom STB (Flattened Device Tree) Workqueue: events deferred_probe_work_func Backtrace: show_stack + 0x20/0x24 dump_stack + 0xbc/0xe0 sysfs_warn_dup + 0x70/0x80 sysfs_create_dir_ns + 0x15c/0x1a4 kobject_add_internal + 0x140/0x4d0 kobject_add + 0xc8/0x138 device_add + 0x1dc/0xc20 device_register + 0x24/0x28 workqueue_sysfs_register + 0xe4/0x1f0 alloc_workqueue + 0x448/0x6ac scmi_notification_init + 0x78/0x1dc scmi_probe + 0x268/0x4fc platform_drv_probe + 0x70/0xc8 really_probe + 0x184/0x728 driver_probe_device + 0xa4/0x278 __device_attach_driver + 0xe8/0x148 bus_for_each_drv + 0x108/0x158 __device_attach + 0x190/0x234 device_initial_probe + 0x1c/0x20 bus_probe_device + 0xdc/0xec deferred_probe_work_func + 0xd4/0x11c process_one_work + 0x420/0x8f0 worker_thread + 0x4fc/0x91c kthread + 0x21c/0x22c ret_from_fork + 0x14/0x20 kobject_add_internal failed for scmi_notify with -EEXIST, don't try to register things with the same name in the same directory. arm-scmi brcm_scmi@1: SCMI Notifications - Initialization Failed. arm-scmi brcm_scmi@1: SCMI Notifications NOT available. arm-scmi brcm_scmi@1: SCMI Protocol v1.0 'brcm-scmi:' Firmware version 0x1 Fix this by using dev_name(handle->dev) which guarantees that the name is unique and this also helps correlate which notification workqueue corresponds to which SCMI device instance. Link: https://lore.kernel.org/r/20201014021737.287340-1-f.fainelli@gmail.com Fixes: bd31b249692e ("firmware: arm_scmi: Add notification dispatch and delivery") Signed-off-by: Florian Fainelli [sudeep.holla: trimmed backtrace to remove all unwanted hexcodes and timestamps] Signed-off-by: Sudeep Holla commit c7821c2d9c0dda0adf2bcf88e79b02a19a430be4 Author: Cristian Marussi Date: Tue Oct 13 14:31:09 2020 +0100 firmware: arm_scmi: Fix locking in notifications When a protocol registers its events, the notification core takes care to rescan the hashtable of pending event handlers and activate all the possibly existent handlers referring to any of the events that are just registered by the new protocol. When a pending handler becomes active the core requests and enables the corresponding events in the SCMI firmware. If, for whatever reason, the enable fails, such invalid event handler must be finally removed and freed. Let us ensure to use the scmi_put_active_handler() helper which handles properly the needed additional locking. Failing to properly acquire all the needed mutexes exposes a race that leads to the following splat being observed: WARNING: CPU: 0 PID: 388 at lib/refcount.c:28 refcount_warn_saturate+0xf8/0x148 Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Jun 30 2020 pstate: 40000005 (nZcv daif -PAN -UAO BTYPE=--) pc : refcount_warn_saturate+0xf8/0x148 lr : refcount_warn_saturate+0xf8/0x148 Call trace: refcount_warn_saturate+0xf8/0x148 scmi_put_handler_unlocked.isra.10+0x204/0x208 scmi_put_handler+0x50/0xa0 scmi_unregister_notifier+0x1bc/0x240 scmi_notify_tester_remove+0x4c/0x68 [dummy_scmi_consumer] scmi_dev_remove+0x54/0x68 device_release_driver_internal+0x114/0x1e8 driver_detach+0x58/0xe8 bus_remove_driver+0x88/0xe0 driver_unregister+0x38/0x68 scmi_driver_unregister+0x1c/0x28 scmi_drv_exit+0x1c/0xae0 [dummy_scmi_consumer] __arm64_sys_delete_module+0x1a4/0x268 el0_svc_common.constprop.3+0x94/0x178 do_el0_svc+0x2c/0x98 el0_sync_handler+0x148/0x1a8 el0_sync+0x158/0x180 Link: https://lore.kernel.org/r/20201013133109.49821-1-cristian.marussi@arm.com Fixes: e7c215f358a35 ("firmware: arm_scmi: Add notification callbacks-registration") Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit a09b1d78505eb9fe27597a5174c61a7c66253fe8 Merge: 4907a43da8318 32118f97f41d2 Author: Linus Torvalds Date: Wed Oct 14 10:34:45 2020 -0700 Merge tag 'for-linus-5.10b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - two small cleanup patches - avoid error messages when initializing MCA banks in a Xen dom0 - a small series for converting the Xen gntdev driver to use pin_user_pages*() instead of get_user_pages*() - intermediate fix for running as a Xen guest on Arm with KPTI enabled (the final solution will need new Xen functionality) * tag 'for-linus-5.10b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/xen: Fix typo in xen_pagetable_p2m_free() x86/xen: disable Firmware First mode for correctable memory errors xen/arm: do not setup the runstate info page if kpti is enabled xen: remove redundant initialization of variable ret xen/gntdev.c: Convert get_user_pages*() to pin_user_pages*() xen/gntdev.c: Mark pages as dirty commit 4907a43da83184d4e88009654c9b31f5e091f709 Merge: da9803dfd3955 1f3aed01473c4 Author: Linus Torvalds Date: Wed Oct 14 10:32:10 2020 -0700 Merge tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull Hyper-V updates from Wei Liu: - a series from Boqun Feng to support page size larger than 4K - a few miscellaneous clean-ups * tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: hv: clocksource: Add notrace attribute to read_hv_sched_clock_*() functions x86/hyperv: Remove aliases with X64 in their name PCI: hv: Document missing hv_pci_protocol_negotiation() parameter scsi: storvsc: Support PAGE_SIZE larger than 4K Driver: hv: util: Use VMBUS_RING_SIZE() for ringbuffer sizes HID: hyperv: Use VMBUS_RING_SIZE() for ringbuffer sizes Input: hyperv-keyboard: Use VMBUS_RING_SIZE() for ringbuffer sizes hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication hv: hyperv.h: Introduce some hvpfn helper functions Drivers: hv: vmbus: Move virt_to_hvpfn() to hyperv header Drivers: hv: Use HV_HYP_PAGE in hv_synic_enable_regs() Drivers: hv: vmbus: Introduce types of GPADL Drivers: hv: vmbus: Move __vmbus_open() Drivers: hv: vmbus: Always use HV_HYP_PAGE_SIZE for gpadl drivers: hv: remove cast from hyperv_die_event commit f92993851f01fa5d8892329d30867acc87180d39 Author: Ian Rogers Date: Mon Oct 12 09:16:11 2020 -0700 perf bench: Use condition variables in numa. The existing approach to synchronization between threads in the numa benchmark is unbalanced mutexes. This synchronization causes thread sanitizer to warn of locks being taken twice on a thread without an unlock, as well as unlocks with no corresponding locks. This change replaces the synchronization with more regular condition variables. While this fixes one class of thread sanitizer warnings, there still remain warnings of data races due to threads reading and writing shared memory without any atomics. Committer testing: Basic run on a non-NUMA machine. # perf bench numa # List of available benchmarks for collection 'numa': mem: Benchmark for NUMA workloads all: Run all NUMA benchmarks # perf bench numa all # Running numa/mem benchmark... # Running main, "perf bench numa numa-mem" # # Running test on: Linux five 5.8.12-200.fc32.x86_64 #1 SMP Mon Sep 28 12:17:31 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux # # Running RAM-bw-local, "perf bench numa mem -p 1 -t 1 -P 1024 -C 0 -M 0 -s 20 -zZq --thp 1 --no-data_rand_walk" 20.076 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.073 secs average thread-runtime 0.190 % difference between max/avg runtime 241.828 GB data processed, per thread 241.828 GB data processed, total 0.083 nsecs/byte/thread runtime 12.045 GB/sec/thread speed 12.045 GB/sec total speed # Running RAM-bw-local-NOTHP, "perf bench numa mem -p 1 -t 1 -P 1024 -C 0 -M 0 -s 20 -zZq --thp 1 --no-data_rand_walk --thp -1" 20.045 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.014 secs average thread-runtime 0.111 % difference between max/avg runtime 234.304 GB data processed, per thread 234.304 GB data processed, total 0.086 nsecs/byte/thread runtime 11.689 GB/sec/thread speed 11.689 GB/sec total speed # Running RAM-bw-remote, "perf bench numa mem -p 1 -t 1 -P 1024 -C 0 -M 1 -s 20 -zZq --thp 1 --no-data_rand_walk" Test not applicable, system has only 1 nodes. # Running RAM-bw-local-2x, "perf bench numa mem -p 2 -t 1 -P 1024 -C 0,2 -M 0x2 -s 20 -zZq --thp 1 --no-data_rand_walk" 20.138 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.121 secs average thread-runtime 0.342 % difference between max/avg runtime 135.961 GB data processed, per thread 271.922 GB data processed, total 0.148 nsecs/byte/thread runtime 6.752 GB/sec/thread speed 13.503 GB/sec total speed # Running RAM-bw-remote-2x, "perf bench numa mem -p 2 -t 1 -P 1024 -C 0,2 -M 1x2 -s 20 -zZq --thp 1 --no-data_rand_walk" Test not applicable, system has only 1 nodes. # Running RAM-bw-cross, "perf bench numa mem -p 2 -t 1 -P 1024 -C 0,8 -M 1,0 -s 20 -zZq --thp 1 --no-data_rand_walk" Test not applicable, system has only 1 nodes. # Running 1x3-convergence, "perf bench numa mem -p 1 -t 3 -P 512 -s 100 -zZ0qcm --thp 1" 0.747 secs latency to NUMA-converge 0.747 secs slowest (max) thread-runtime 0.000 secs fastest (min) thread-runtime 0.714 secs average thread-runtime 50.000 % difference between max/avg runtime 3.228 GB data processed, per thread 9.683 GB data processed, total 0.231 nsecs/byte/thread runtime 4.321 GB/sec/thread speed 12.964 GB/sec total speed # Running 1x4-convergence, "perf bench numa mem -p 1 -t 4 -P 512 -s 100 -zZ0qcm --thp 1" 1.127 secs latency to NUMA-converge 1.127 secs slowest (max) thread-runtime 1.000 secs fastest (min) thread-runtime 1.089 secs average thread-runtime 5.624 % difference between max/avg runtime 3.765 GB data processed, per thread 15.062 GB data processed, total 0.299 nsecs/byte/thread runtime 3.342 GB/sec/thread speed 13.368 GB/sec total speed # Running 1x6-convergence, "perf bench numa mem -p 1 -t 6 -P 1020 -s 100 -zZ0qcm --thp 1" 1.003 secs latency to NUMA-converge 1.003 secs slowest (max) thread-runtime 0.000 secs fastest (min) thread-runtime 0.889 secs average thread-runtime 50.000 % difference between max/avg runtime 2.141 GB data processed, per thread 12.847 GB data processed, total 0.469 nsecs/byte/thread runtime 2.134 GB/sec/thread speed 12.805 GB/sec total speed # Running 2x3-convergence, "perf bench numa mem -p 2 -t 3 -P 1020 -s 100 -zZ0qcm --thp 1" 1.814 secs latency to NUMA-converge 1.814 secs slowest (max) thread-runtime 1.000 secs fastest (min) thread-runtime 1.716 secs average thread-runtime 22.440 % difference between max/avg runtime 3.747 GB data processed, per thread 22.483 GB data processed, total 0.484 nsecs/byte/thread runtime 2.065 GB/sec/thread speed 12.393 GB/sec total speed # Running 3x3-convergence, "perf bench numa mem -p 3 -t 3 -P 1020 -s 100 -zZ0qcm --thp 1" 2.065 secs latency to NUMA-converge 2.065 secs slowest (max) thread-runtime 1.000 secs fastest (min) thread-runtime 1.947 secs average thread-runtime 25.788 % difference between max/avg runtime 2.855 GB data processed, per thread 25.694 GB data processed, total 0.723 nsecs/byte/thread runtime 1.382 GB/sec/thread speed 12.442 GB/sec total speed # Running 4x4-convergence, "perf bench numa mem -p 4 -t 4 -P 512 -s 100 -zZ0qcm --thp 1" 1.912 secs latency to NUMA-converge 1.912 secs slowest (max) thread-runtime 1.000 secs fastest (min) thread-runtime 1.775 secs average thread-runtime 23.852 % difference between max/avg runtime 1.479 GB data processed, per thread 23.668 GB data processed, total 1.293 nsecs/byte/thread runtime 0.774 GB/sec/thread speed 12.378 GB/sec total speed # Running 4x4-convergence-NOTHP, "perf bench numa mem -p 4 -t 4 -P 512 -s 100 -zZ0qcm --thp 1 --thp -1" 1.783 secs latency to NUMA-converge 1.783 secs slowest (max) thread-runtime 1.000 secs fastest (min) thread-runtime 1.633 secs average thread-runtime 21.960 % difference between max/avg runtime 1.345 GB data processed, per thread 21.517 GB data processed, total 1.326 nsecs/byte/thread runtime 0.754 GB/sec/thread speed 12.067 GB/sec total speed # Running 4x6-convergence, "perf bench numa mem -p 4 -t 6 -P 1020 -s 100 -zZ0qcm --thp 1" 5.396 secs latency to NUMA-converge 5.396 secs slowest (max) thread-runtime 4.000 secs fastest (min) thread-runtime 4.928 secs average thread-runtime 12.937 % difference between max/avg runtime 2.721 GB data processed, per thread 65.306 GB data processed, total 1.983 nsecs/byte/thread runtime 0.504 GB/sec/thread speed 12.102 GB/sec total speed # Running 4x8-convergence, "perf bench numa mem -p 4 -t 8 -P 512 -s 100 -zZ0qcm --thp 1" 3.121 secs latency to NUMA-converge 3.121 secs slowest (max) thread-runtime 2.000 secs fastest (min) thread-runtime 2.836 secs average thread-runtime 17.962 % difference between max/avg runtime 1.194 GB data processed, per thread 38.192 GB data processed, total 2.615 nsecs/byte/thread runtime 0.382 GB/sec/thread speed 12.236 GB/sec total speed # Running 8x4-convergence, "perf bench numa mem -p 8 -t 4 -P 512 -s 100 -zZ0qcm --thp 1" 4.302 secs latency to NUMA-converge 4.302 secs slowest (max) thread-runtime 3.000 secs fastest (min) thread-runtime 4.045 secs average thread-runtime 15.133 % difference between max/avg runtime 1.631 GB data processed, per thread 52.178 GB data processed, total 2.638 nsecs/byte/thread runtime 0.379 GB/sec/thread speed 12.128 GB/sec total speed # Running 8x4-convergence-NOTHP, "perf bench numa mem -p 8 -t 4 -P 512 -s 100 -zZ0qcm --thp 1 --thp -1" 4.418 secs latency to NUMA-converge 4.418 secs slowest (max) thread-runtime 3.000 secs fastest (min) thread-runtime 4.104 secs average thread-runtime 16.045 % difference between max/avg runtime 1.664 GB data processed, per thread 53.254 GB data processed, total 2.655 nsecs/byte/thread runtime 0.377 GB/sec/thread speed 12.055 GB/sec total speed # Running 3x1-convergence, "perf bench numa mem -p 3 -t 1 -P 512 -s 100 -zZ0qcm --thp 1" 0.973 secs latency to NUMA-converge 0.973 secs slowest (max) thread-runtime 0.000 secs fastest (min) thread-runtime 0.955 secs average thread-runtime 50.000 % difference between max/avg runtime 4.124 GB data processed, per thread 12.372 GB data processed, total 0.236 nsecs/byte/thread runtime 4.238 GB/sec/thread speed 12.715 GB/sec total speed # Running 4x1-convergence, "perf bench numa mem -p 4 -t 1 -P 512 -s 100 -zZ0qcm --thp 1" 0.820 secs latency to NUMA-converge 0.820 secs slowest (max) thread-runtime 0.000 secs fastest (min) thread-runtime 0.808 secs average thread-runtime 50.000 % difference between max/avg runtime 2.555 GB data processed, per thread 10.220 GB data processed, total 0.321 nsecs/byte/thread runtime 3.117 GB/sec/thread speed 12.468 GB/sec total speed # Running 8x1-convergence, "perf bench numa mem -p 8 -t 1 -P 512 -s 100 -zZ0qcm --thp 1" 0.667 secs latency to NUMA-converge 0.667 secs slowest (max) thread-runtime 0.000 secs fastest (min) thread-runtime 0.607 secs average thread-runtime 50.000 % difference between max/avg runtime 1.009 GB data processed, per thread 8.069 GB data processed, total 0.661 nsecs/byte/thread runtime 1.512 GB/sec/thread speed 12.095 GB/sec total speed # Running 16x1-convergence, "perf bench numa mem -p 16 -t 1 -P 256 -s 100 -zZ0qcm --thp 1" 1.546 secs latency to NUMA-converge 1.546 secs slowest (max) thread-runtime 1.000 secs fastest (min) thread-runtime 1.485 secs average thread-runtime 17.664 % difference between max/avg runtime 1.162 GB data processed, per thread 18.594 GB data processed, total 1.331 nsecs/byte/thread runtime 0.752 GB/sec/thread speed 12.025 GB/sec total speed # Running 32x1-convergence, "perf bench numa mem -p 32 -t 1 -P 128 -s 100 -zZ0qcm --thp 1" 0.812 secs latency to NUMA-converge 0.812 secs slowest (max) thread-runtime 0.000 secs fastest (min) thread-runtime 0.739 secs average thread-runtime 50.000 % difference between max/avg runtime 0.309 GB data processed, per thread 9.874 GB data processed, total 2.630 nsecs/byte/thread runtime 0.380 GB/sec/thread speed 12.166 GB/sec total speed # Running 2x1-bw-process, "perf bench numa mem -p 2 -t 1 -P 1024 -s 20 -zZ0q --thp 1" 20.044 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.020 secs average thread-runtime 0.109 % difference between max/avg runtime 125.750 GB data processed, per thread 251.501 GB data processed, total 0.159 nsecs/byte/thread runtime 6.274 GB/sec/thread speed 12.548 GB/sec total speed # Running 3x1-bw-process, "perf bench numa mem -p 3 -t 1 -P 1024 -s 20 -zZ0q --thp 1" 20.148 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.090 secs average thread-runtime 0.367 % difference between max/avg runtime 85.267 GB data processed, per thread 255.800 GB data processed, total 0.236 nsecs/byte/thread runtime 4.232 GB/sec/thread speed 12.696 GB/sec total speed # Running 4x1-bw-process, "perf bench numa mem -p 4 -t 1 -P 1024 -s 20 -zZ0q --thp 1" 20.169 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.100 secs average thread-runtime 0.419 % difference between max/avg runtime 63.144 GB data processed, per thread 252.576 GB data processed, total 0.319 nsecs/byte/thread runtime 3.131 GB/sec/thread speed 12.523 GB/sec total speed # Running 8x1-bw-process, "perf bench numa mem -p 8 -t 1 -P 512 -s 20 -zZ0q --thp 1" 20.175 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.107 secs average thread-runtime 0.433 % difference between max/avg runtime 31.267 GB data processed, per thread 250.133 GB data processed, total 0.645 nsecs/byte/thread runtime 1.550 GB/sec/thread speed 12.398 GB/sec total speed # Running 8x1-bw-process-NOTHP, "perf bench numa mem -p 8 -t 1 -P 512 -s 20 -zZ0q --thp 1 --thp -1" 20.216 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.113 secs average thread-runtime 0.535 % difference between max/avg runtime 30.998 GB data processed, per thread 247.981 GB data processed, total 0.652 nsecs/byte/thread runtime 1.533 GB/sec/thread speed 12.266 GB/sec total speed # Running 16x1-bw-process, "perf bench numa mem -p 16 -t 1 -P 256 -s 20 -zZ0q --thp 1" 20.234 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.174 secs average thread-runtime 0.577 % difference between max/avg runtime 15.377 GB data processed, per thread 246.039 GB data processed, total 1.316 nsecs/byte/thread runtime 0.760 GB/sec/thread speed 12.160 GB/sec total speed # Running 1x4-bw-thread, "perf bench numa mem -p 1 -t 4 -T 256 -s 20 -zZ0q --thp 1" 20.040 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.028 secs average thread-runtime 0.099 % difference between max/avg runtime 66.832 GB data processed, per thread 267.328 GB data processed, total 0.300 nsecs/byte/thread runtime 3.335 GB/sec/thread speed 13.340 GB/sec total speed # Running 1x8-bw-thread, "perf bench numa mem -p 1 -t 8 -T 256 -s 20 -zZ0q --thp 1" 20.064 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.034 secs average thread-runtime 0.160 % difference between max/avg runtime 32.911 GB data processed, per thread 263.286 GB data processed, total 0.610 nsecs/byte/thread runtime 1.640 GB/sec/thread speed 13.122 GB/sec total speed # Running 1x16-bw-thread, "perf bench numa mem -p 1 -t 16 -T 128 -s 20 -zZ0q --thp 1" 20.092 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.052 secs average thread-runtime 0.230 % difference between max/avg runtime 16.131 GB data processed, per thread 258.088 GB data processed, total 1.246 nsecs/byte/thread runtime 0.803 GB/sec/thread speed 12.845 GB/sec total speed # Running 1x32-bw-thread, "perf bench numa mem -p 1 -t 32 -T 64 -s 20 -zZ0q --thp 1" 20.099 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.063 secs average thread-runtime 0.247 % difference between max/avg runtime 7.962 GB data processed, per thread 254.773 GB data processed, total 2.525 nsecs/byte/thread runtime 0.396 GB/sec/thread speed 12.676 GB/sec total speed # Running 2x3-bw-process, "perf bench numa mem -p 2 -t 3 -P 512 -s 20 -zZ0q --thp 1" 20.150 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.120 secs average thread-runtime 0.372 % difference between max/avg runtime 44.827 GB data processed, per thread 268.960 GB data processed, total 0.450 nsecs/byte/thread runtime 2.225 GB/sec/thread speed 13.348 GB/sec total speed # Running 4x4-bw-process, "perf bench numa mem -p 4 -t 4 -P 512 -s 20 -zZ0q --thp 1" 20.258 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.168 secs average thread-runtime 0.636 % difference between max/avg runtime 17.079 GB data processed, per thread 273.263 GB data processed, total 1.186 nsecs/byte/thread runtime 0.843 GB/sec/thread speed 13.489 GB/sec total speed # Running 4x6-bw-process, "perf bench numa mem -p 4 -t 6 -P 512 -s 20 -zZ0q --thp 1" 20.559 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.382 secs average thread-runtime 1.359 % difference between max/avg runtime 10.758 GB data processed, per thread 258.201 GB data processed, total 1.911 nsecs/byte/thread runtime 0.523 GB/sec/thread speed 12.559 GB/sec total speed # Running 4x8-bw-process, "perf bench numa mem -p 4 -t 8 -P 512 -s 20 -zZ0q --thp 1" 20.744 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.516 secs average thread-runtime 1.792 % difference between max/avg runtime 8.069 GB data processed, per thread 258.201 GB data processed, total 2.571 nsecs/byte/thread runtime 0.389 GB/sec/thread speed 12.447 GB/sec total speed # Running 4x8-bw-process-NOTHP, "perf bench numa mem -p 4 -t 8 -P 512 -s 20 -zZ0q --thp 1 --thp -1" 20.855 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.561 secs average thread-runtime 2.050 % difference between max/avg runtime 8.069 GB data processed, per thread 258.201 GB data processed, total 2.585 nsecs/byte/thread runtime 0.387 GB/sec/thread speed 12.381 GB/sec total speed # Running 3x3-bw-process, "perf bench numa mem -p 3 -t 3 -P 512 -s 20 -zZ0q --thp 1" 20.134 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.077 secs average thread-runtime 0.333 % difference between max/avg runtime 28.091 GB data processed, per thread 252.822 GB data processed, total 0.717 nsecs/byte/thread runtime 1.395 GB/sec/thread speed 12.557 GB/sec total speed # Running 5x5-bw-process, "perf bench numa mem -p 5 -t 5 -P 512 -s 20 -zZ0q --thp 1" 20.588 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.375 secs average thread-runtime 1.427 % difference between max/avg runtime 10.177 GB data processed, per thread 254.436 GB data processed, total 2.023 nsecs/byte/thread runtime 0.494 GB/sec/thread speed 12.359 GB/sec total speed # Running 2x16-bw-process, "perf bench numa mem -p 2 -t 16 -P 512 -s 20 -zZ0q --thp 1" 20.657 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.429 secs average thread-runtime 1.589 % difference between max/avg runtime 8.170 GB data processed, per thread 261.429 GB data processed, total 2.528 nsecs/byte/thread runtime 0.395 GB/sec/thread speed 12.656 GB/sec total speed # Running 1x32-bw-process, "perf bench numa mem -p 1 -t 32 -P 2048 -s 20 -zZ0q --thp 1" 22.981 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 21.996 secs average thread-runtime 6.486 % difference between max/avg runtime 8.863 GB data processed, per thread 283.606 GB data processed, total 2.593 nsecs/byte/thread runtime 0.386 GB/sec/thread speed 12.341 GB/sec total speed # Running numa02-bw, "perf bench numa mem -p 1 -t 32 -T 32 -s 20 -zZ0q --thp 1" 20.047 secs slowest (max) thread-runtime 19.000 secs fastest (min) thread-runtime 20.026 secs average thread-runtime 2.611 % difference between max/avg runtime 8.441 GB data processed, per thread 270.111 GB data processed, total 2.375 nsecs/byte/thread runtime 0.421 GB/sec/thread speed 13.474 GB/sec total speed # Running numa02-bw-NOTHP, "perf bench numa mem -p 1 -t 32 -T 32 -s 20 -zZ0q --thp 1 --thp -1" 20.088 secs slowest (max) thread-runtime 19.000 secs fastest (min) thread-runtime 20.025 secs average thread-runtime 2.709 % difference between max/avg runtime 8.411 GB data processed, per thread 269.142 GB data processed, total 2.388 nsecs/byte/thread runtime 0.419 GB/sec/thread speed 13.398 GB/sec total speed # Running numa01-bw-thread, "perf bench numa mem -p 2 -t 16 -T 192 -s 20 -zZ0q --thp 1" 20.293 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.175 secs average thread-runtime 0.721 % difference between max/avg runtime 7.918 GB data processed, per thread 253.374 GB data processed, total 2.563 nsecs/byte/thread runtime 0.390 GB/sec/thread speed 12.486 GB/sec total speed # Running numa01-bw-thread-NOTHP, "perf bench numa mem -p 2 -t 16 -T 192 -s 20 -zZ0q --thp 1 --thp -1" 20.411 secs slowest (max) thread-runtime 20.000 secs fastest (min) thread-runtime 20.226 secs average thread-runtime 1.006 % difference between max/avg runtime 7.931 GB data processed, per thread 253.778 GB data processed, total 2.574 nsecs/byte/thread runtime 0.389 GB/sec/thread speed 12.434 GB/sec total speed # Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20201012161611.366482-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit da9803dfd3955bd2f9909d55e23f188ad76dbe58 Merge: 6873139ed078b 0ddfb1cf3b6b0 Author: Linus Torvalds Date: Wed Oct 14 10:21:34 2020 -0700 Merge tag 'x86_seves_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 SEV-ES support from Borislav Petkov: "SEV-ES enhances the current guest memory encryption support called SEV by also encrypting the guest register state, making the registers inaccessible to the hypervisor by en-/decrypting them on world switches. Thus, it adds additional protection to Linux guests against exfiltration, control flow and rollback attacks. With SEV-ES, the guest is in full control of what registers the hypervisor can access. This is provided by a guest-host exchange mechanism based on a new exception vector called VMM Communication Exception (#VC), a new instruction called VMGEXIT and a shared Guest-Host Communication Block which is a decrypted page shared between the guest and the hypervisor. Intercepts to the hypervisor become #VC exceptions in an SEV-ES guest so in order for that exception mechanism to work, the early x86 init code needed to be made able to handle exceptions, which, in itself, brings a bunch of very nice cleanups and improvements to the early boot code like an early page fault handler, allowing for on-demand building of the identity mapping. With that, !KASLR configurations do not use the EFI page table anymore but switch to a kernel-controlled one. The main part of this series adds the support for that new exchange mechanism. The goal has been to keep this as much as possibly separate from the core x86 code by concentrating the machinery in two SEV-ES-specific files: arch/x86/kernel/sev-es-shared.c arch/x86/kernel/sev-es.c Other interaction with core x86 code has been kept at minimum and behind static keys to minimize the performance impact on !SEV-ES setups. Work by Joerg Roedel and Thomas Lendacky and others" * tag 'x86_seves_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (73 commits) x86/sev-es: Use GHCB accessor for setting the MMIO scratch buffer x86/sev-es: Check required CPU features for SEV-ES x86/efi: Add GHCB mappings when SEV-ES is active x86/sev-es: Handle NMI State x86/sev-es: Support CPU offline/online x86/head/64: Don't call verify_cpu() on starting APs x86/smpboot: Load TSS and getcpu GDT entry before loading IDT x86/realmode: Setup AP jump table x86/realmode: Add SEV-ES specific trampoline entry point x86/vmware: Add VMware-specific handling for VMMCALL under SEV-ES x86/kvm: Add KVM-specific VMMCALL handling under SEV-ES x86/paravirt: Allow hypervisor-specific VMMCALL handling under SEV-ES x86/sev-es: Handle #DB Events x86/sev-es: Handle #AC Events x86/sev-es: Handle VMMCALL Events x86/sev-es: Handle MWAIT/MWAITX Events x86/sev-es: Handle MONITOR/MONITORX Events x86/sev-es: Handle INVD Events x86/sev-es: Handle RDPMC Events x86/sev-es: Handle RDTSC(P) Events ... commit f6bade6875d7458e7f395d6a1bc317a1caecbc1d Author: Geert Uytterhoeven Date: Fri Aug 7 11:43:51 2020 +0200 clk: Restrict CLK_HSDK to ARC_SOC_HSDK The HSDK PLL driver is only useful when building for an ARC HSDK platform. As ARC selects OF, the dependency on OF can just be replaced by a dependency on ARC_SOC_HSDK. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200807094351.1046-1-geert+renesas@glider.be Signed-off-by: Stephen Boyd commit 6873139ed078bfe0341d4cbb69e5af1b323bf532 Merge: d5660df4a555a ab0a40ea88204 Author: Linus Torvalds Date: Wed Oct 14 10:13:37 2020 -0700 Merge tag 'objtool-core-2020-10-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool updates from Ingo Molnar: "Most of the changes are cleanups and reorganization to make the objtool code more arch-agnostic. This is in preparation for non-x86 support. Other changes: - KASAN fixes - Handle unreachable trap after call to noreturn functions better - Ignore unreachable fake jumps - Misc smaller fixes & cleanups" * tag 'objtool-core-2020-10-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) perf build: Allow nested externs to enable BUILD_BUG() usage objtool: Allow nested externs to enable BUILD_BUG() objtool: Permit __kasan_check_{read,write} under UACCESS objtool: Ignore unreachable trap after call to noreturn functions objtool: Handle calling non-function symbols in other sections objtool: Ignore unreachable fake jumps objtool: Remove useless tests before save_reg() objtool: Decode unwind hint register depending on architecture objtool: Make unwind hint definitions available to other architectures objtool: Only include valid definitions depending on source file type objtool: Rename frame.h -> objtool.h objtool: Refactor jump table code to support other architectures objtool: Make relocation in alternative handling arch dependent objtool: Abstract alternative special case handling objtool: Move macros describing structures to arch-dependent code objtool: Make sync-check consider the target architecture objtool: Group headers to check in a single list objtool: Define 'struct orc_entry' only when needed objtool: Skip ORC entry creation for non-text sections objtool: Move ORC logic out of check() ... commit fcedb589b5a88d73d3155c4a8690d6dda91a3156 Author: Claudiu Beznea Date: Wed Oct 14 17:34:32 2020 +0300 clk: at91: sam9x60: support only two programmable clocks According to datasheet (Chapter 29.16.13, PMC Programmable Clock Register) there are only two programmable clocks on SAM9X60. Fixes: 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1602686072-28296-1-git-send-email-claudiu.beznea@microchip.com Acked-by: Nicolas Ferre Signed-off-by: Stephen Boyd commit d5660df4a555a98154da850fb61f118269d0a283 Merge: b5fc7a89e58bc f1f4f3ab54e9a Author: Linus Torvalds Date: Wed Oct 14 09:57:24 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc updates from Andrew Morton: "181 patches. Subsystems affected by this patch series: kbuild, scripts, ntfs, ocfs2, vfs, mm (slab, slub, kmemleak, dax, debug, pagecache, fadvise, gup, swap, memremap, memcg, selftests, pagemap, mincore, hmm, dma, memory-failure, vmallo and migration)" * emailed patches from Andrew Morton : (181 commits) mm/migrate: remove obsolete comment about device public mm/migrate: remove cpages-- in migrate_vma_finalize() mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary memblock: use separate iterators for memory and reserved regions memblock: implement for_each_reserved_mem_region() using __next_mem_region() memblock: remove unused memblock_mem_size() x86/setup: simplify reserve_crashkernel() x86/setup: simplify initrd relocation and reservation arch, drivers: replace for_each_membock() with for_each_mem_range() arch, mm: replace for_each_memblock() with for_each_mem_pfn_range() memblock: reduce number of parameters in for_each_mem_range() memblock: make memblock_debug and related functionality private memblock: make for_each_memblock_type() iterator private mircoblaze: drop unneeded NUMA and sparsemem initializations riscv: drop unneeded node initialization h8300, nds32, openrisc: simplify detection of memory extents arm64: numa: simplify dummy_numa_init() arm, xtensa: simplify initialization of high memory pages dma-contiguous: simplify cma_early_percent_memory() KVM: PPC: Book3S HV: simplify kvm_cma_reserve() ... commit caf7f9685dd339d4fe7c3cbc0b5d7fabd3df784d Author: John Garry Date: Thu Oct 8 23:19:28 2020 +0800 perf jevents: Fix event code for events referencing std arch events The event code for events referencing std arch events is incorrectly evaluated in json_events(). The issue is that je.event is evaluated properly from try_fixup(), but later NULLified from the real_event() call, as "event" may be NULL. Fix by setting "event" same je.event in try_fixup(). Also remove support for overwriting event code for events using std arch events, as it is not used. Signed-off-by: John Garry Reviewed-By: Kajol Jain Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/1602170368-11892-1-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 2a09a84c720b436a3ded9b7e3701d391ec81892a Author: Jin Yao Date: Fri Oct 9 10:28:45 2020 +0800 perf diff: Support hot streams comparison This patch enables perf-diff with "--stream" option. "--stream": Enable hot streams comparison Now let's see example. perf record -b ... Generate perf.data.old with branch data perf record -b ... Generate perf.data with branch data perf diff --stream [ Matched hot streams ] hot chain pair 1: cycles: 1, hits: 27.77% cycles: 1, hits: 9.24% --------------------------- -------------------------- main div.c:39 main div.c:39 main div.c:44 main div.c:44 hot chain pair 2: cycles: 34, hits: 20.06% cycles: 27, hits: 16.98% --------------------------- -------------------------- __random_r random_r.c:360 __random_r random_r.c:360 __random_r random_r.c:388 __random_r random_r.c:388 __random_r random_r.c:388 __random_r random_r.c:388 __random_r random_r.c:380 __random_r random_r.c:380 __random_r random_r.c:357 __random_r random_r.c:357 __random random.c:293 __random random.c:293 __random random.c:293 __random random.c:293 __random random.c:291 __random random.c:291 __random random.c:291 __random random.c:291 __random random.c:291 __random random.c:291 __random random.c:288 __random random.c:288 rand rand.c:27 rand rand.c:27 rand rand.c:26 rand rand.c:26 rand@plt rand@plt rand@plt rand@plt compute_flag div.c:25 compute_flag div.c:25 compute_flag div.c:22 compute_flag div.c:22 main div.c:40 main div.c:40 main div.c:40 main div.c:40 main div.c:39 main div.c:39 hot chain pair 3: cycles: 9, hits: 4.48% cycles: 6, hits: 4.51% --------------------------- -------------------------- __random_r random_r.c:360 __random_r random_r.c:360 __random_r random_r.c:388 __random_r random_r.c:388 __random_r random_r.c:388 __random_r random_r.c:388 __random_r random_r.c:380 __random_r random_r.c:380 [ Hot streams in old perf data only ] hot chain 1: cycles: 18, hits: 6.75% -------------------------- __random_r random_r.c:360 __random_r random_r.c:388 __random_r random_r.c:388 __random_r random_r.c:380 __random_r random_r.c:357 __random random.c:293 __random random.c:293 __random random.c:291 __random random.c:291 __random random.c:291 __random random.c:288 rand rand.c:27 rand rand.c:26 rand@plt rand@plt compute_flag div.c:25 compute_flag div.c:22 main div.c:40 hot chain 2: cycles: 29, hits: 2.78% -------------------------- compute_flag div.c:22 main div.c:40 main div.c:40 main div.c:39 [ Hot streams in new perf data only ] hot chain 1: cycles: 4, hits: 4.54% -------------------------- main div.c:42 compute_flag div.c:28 hot chain 2: cycles: 5, hits: 3.51% -------------------------- main div.c:39 main div.c:44 main div.c:42 compute_flag div.c:28 Signed-off-by: Jin Yao Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201009022845.13141-8-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 5bbd6bad3b058bb28f41b97bf67a3cc3e52d09e6 Author: Jin Yao Date: Fri Oct 9 10:28:44 2020 +0800 perf streams: Report hot streams We show the streams separately. They are divided into different sections. 1. "Matched hot streams" 2. "Hot streams in old perf data only" 3. "Hot streams in new perf data only". For each stream, we report the cycles and hot percent (hits%). For example, cycles: 2, hits: 4.08% -------------------------- main div.c:42 compute_flag div.c:28 Signed-off-by: Jin Yao Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201009022845.13141-7-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 28904f4dcea1444adea4b51ba0af32d6c7314101 Author: Jin Yao Date: Fri Oct 9 10:28:43 2020 +0800 perf streams: Calculate the sum of total streams hits We have used callchain_node->hit to measure the hot level of one stream. This patch calculates the sum of hits of total streams. Thus in next patch, we can use following formula to report hot percent for one stream. hot percent = callchain_node->hit / sum of total hits Signed-off-by: Jin Yao Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201009022845.13141-6-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit fa79aa6485816b86f37205fd5659616d64f8be7f Author: Jin Yao Date: Fri Oct 9 10:28:42 2020 +0800 perf streams: Link stream pair In previous patch, we have created an evsel_streams for one event, and top N hottest streams will be saved in a stream array in evsel_streams. This patch compares total streams among two evsel_streams. Once two streams are fully matched, they will be linked as a pair. From the pair, we can know which streams are matched. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201009022845.13141-5-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 47ef8398c369fa77e0fdbadfebb3885879491721 Author: Jin Yao Date: Fri Oct 9 10:28:41 2020 +0800 perf streams: Compare two streams Stream is the branch history which is aggregated by the branch records from perf samples. Now we support the callchain as stream. If the callchain entries of one stream are fully matched with the callchain entries of another stream, we think two streams are matched. For example, cycles: 1, hits: 26.80% cycles: 1, hits: 27.30% ----------------------- ----------------------- main div.c:39 main div.c:39 main div.c:44 main div.c:44 Above two streams are matched (we don't consider the case that source code is changed). The matching logic is, compare the chain string first. If it's not matched, fallback to dso address comparison. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201009022845.13141-4-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit dd1d841810158086086417133a22c90dfabaeecb Author: Jin Yao Date: Fri Oct 9 10:28:40 2020 +0800 perf streams: Get the evsel_streams by evsel_idx In previous patch, we have created evsel_streams array. This patch returns the specified evsel_streams according to the evsel_idx. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201009022845.13141-3-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 480accbb17609be01abcd09517605a930791bfdb Author: Jin Yao Date: Fri Oct 9 10:28:39 2020 +0800 perf streams: Introduce branch history "streams" We define a stream as the branch history which is aggregated by the branch records from perf samples. For example, the callchains aggregated from the branch records are considered as streams. By browsing the hot stream, we can understand the hot code path. Now we only support the callchain for stream. For measuring the hot level for a stream, we use the callchain_node->hit, higher is hotter. There may be many callchains sampled so we only focus on the top N hottest callchains. N is a user defined parameter or predefined default value (nr_streams_max). This patch creates an evsel_streams array per event, and saves the top N hottest streams in a stream array. So now we can get the per-event top N hottest streams. Signed-off-by: Jin Yao Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201009022845.13141-2-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 6556a75becb51afa8f9233186d437e9b6eb6f4b5 Author: Andi Kleen Date: Tue Oct 13 20:53:46 2020 -0700 perf intel-pt: Improve PT documentation slightly Document the higher level --insn-trace etc. perf script options. Include the howto how to build xed into the manpage Signed-off-by: Andi Kleen Cc: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20201014035346.4772-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit ed3e453798d4f81c99056aa09fcd79d0874a60fd Author: Mauro Carvalho Chehab Date: Tue Oct 13 14:14:43 2020 +0200 locking/seqlocks: Fix kernel-doc warnings Right now, seqlock.h produces kernel-doc warnings: ./include/linux/seqlock.h:181: error: Cannot parse typedef! Convert it to a plain comment to avoid confusing kernel-doc. Fixes: a8772dccb2ec ("seqlock: Fold seqcount_LOCKNAME_t definition") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/a59144cdaadf7fdf1fe5d55d0e1575abbf1c0cb3.1602590106.git.mchehab+huawei@kernel.org commit f2ac57a4c49d40409c21c82d23b5706df9b438af Author: Jiri Slaby Date: Wed Oct 14 07:30:51 2020 +0200 x86/unwind/orc: Fix inactive tasks with stack pointer in %sp on GCC 10 compiled kernels GCC 10 optimizes the scheduler code differently than its predecessors. When CONFIG_DEBUG_SECTION_MISMATCH=y, the Makefile forces GCC not to inline some functions (-fno-inline-functions-called-once). Before GCC 10, "no-inlined" __schedule() starts with the usual prologue: push %bp mov %sp, %bp So the ORC unwinder simply picks stack pointer from %bp and unwinds from __schedule() just perfectly: $ cat /proc/1/stack [<0>] ep_poll+0x3e9/0x450 [<0>] do_epoll_wait+0xaa/0xc0 [<0>] __x64_sys_epoll_wait+0x1a/0x20 [<0>] do_syscall_64+0x33/0x40 [<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 But now, with GCC 10, there is no %bp prologue in __schedule(): $ cat /proc/1/stack The ORC entry of the point in __schedule() is: sp:sp+88 bp:last_sp-48 type:call end:0 In this case, nobody subtracts sizeof "struct inactive_task_frame" in __unwind_start(). The struct is put on the stack by __switch_to_asm() and only then __switch_to_asm() stores %sp to task->thread.sp. But we start unwinding from a point in __schedule() (stored in frame->ret_addr by 'call') and not in __switch_to_asm(). So for these example values in __unwind_start(): sp=ffff94b50001fdc8 bp=ffff8e1f41d29340 ip=__schedule+0x1f0 The stack is: ffff94b50001fdc8: ffff8e1f41578000 # struct inactive_task_frame ffff94b50001fdd0: 0000000000000000 ffff94b50001fdd8: ffff8e1f41d29340 ffff94b50001fde0: ffff8e1f41611d40 # ... ffff94b50001fde8: ffffffff93c41920 # bx ffff94b50001fdf0: ffff8e1f41d29340 # bp ffff94b50001fdf8: ffffffff9376cad0 # ret_addr (and end of the struct) 0xffffffff9376cad0 is __schedule+0x1f0 (after the call to __switch_to_asm). Now follow those 88 bytes from the ORC entry (sp+88). The entry is correct, __schedule() really pushes 48 bytes (8*7) + 32 bytes via subq to store some local values (like 4U below). So to unwind, look at the offset 88-sizeof(long) = 0x50 from here: ffff94b50001fe00: ffff8e1f41578618 ffff94b50001fe08: 00000cc000000255 ffff94b50001fe10: 0000000500000004 ffff94b50001fe18: 7793fab6956b2d00 # NOTE (see below) ffff94b50001fe20: ffff8e1f41578000 ffff94b50001fe28: ffff8e1f41578000 ffff94b50001fe30: ffff8e1f41578000 ffff94b50001fe38: ffff8e1f41578000 ffff94b50001fe40: ffff94b50001fed8 ffff94b50001fe48: ffff8e1f41577ff0 ffff94b50001fe50: ffffffff9376cf12 Here ^^^^^^^^^^^^^^^^ is the correct ret addr from __schedule(). It translates to schedule+0x42 (insn after a call to __schedule()). BUT, unwind_next_frame() tries to take the address starting from 0xffff94b50001fdc8. That is exactly from thread.sp+88-sizeof(long) = 0xffff94b50001fdc8+88-8 = 0xffff94b50001fe18, which is garbage marked as NOTE above. So this quits the unwinding as 7793fab6956b2d00 is obviously not a kernel address. There was a fix to skip 'struct inactive_task_frame' in unwind_get_return_address_ptr in the following commit: 187b96db5ca7 ("x86/unwind/orc: Fix unwind_get_return_address_ptr() for inactive tasks") But we need to skip the struct already in the unwinder proper. So subtract the size (increase the stack pointer) of the structure in __unwind_start() directly. This allows for removal of the code added by commit 187b96db5ca7 completely, as the address is now at '(unsigned long *)state->sp - 1', the same as in the generic case. [ mingo: Cleaned up the changelog a bit, for better readability. ] Fixes: ee9f8fce9964 ("x86/unwind: Add the ORC unwinder") Bug: https://bugzilla.suse.com/show_bug.cgi?id=1176907 Signed-off-by: Jiri Slaby Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20201014053051.24199-1-jslaby@suse.cz commit 0997a2662fa34551e37bb6f1246a179678b2f984 Author: Andi Kleen Date: Wed Oct 14 07:42:55 2020 -0700 perf tools: Add support for exclusive groups/events Peter suggested that using the exclusive mode in perf could avoid some problems with bad scheduling of groups. Exclusive is implemented in the kernel, but wasn't exposed by the perf tool, so hard to use without custom low level API users. Add support for marking groups or events with :e for exclusive in the perf tool. The implementation is basically the same as the existing pinned attribute. Committer testing: # perf test "parse event" 6: Parse event definition strings : Ok # perf test -v "parse event" |& grep :u*e running test 56 'instructions:uep' running test 57 '{cycles,cache-misses,branch-misses}:e' # # # grep "model name" -m1 /proc/cpuinfo model name : AMD Ryzen 9 3900X 12-Core Processor # # perf stat -a -e '{cycles,cache-misses,branch-misses}:e' sleep 1 Performance counter stats for 'system wide': cycles (0.00%) cache-misses (0.00%) branch-misses (0.00%) 1.001269893 seconds time elapsed Some events weren't counted. Try disabling the NMI watchdog: echo 0 > /proc/sys/kernel/nmi_watchdog perf stat ... echo 1 > /proc/sys/kernel/nmi_watchdog # echo 0 > /proc/sys/kernel/nmi_watchdog # perf stat -a -e '{cycles,cache-misses,branch-misses}:e' sleep 1 Performance counter stats for 'system wide': 1,298,663,141 cycles 30,962,215 cache-misses 5,325,150 branch-misses 1.001474934 seconds time elapsed # # The output for asking for precise events on AMD needs to improve, it # supposedly works only for system wide or per CPU # # perf stat -a -e '{cycles,cache-misses,branch-misses}:uep' sleep 1 Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cycles). /bin/dmesg | grep -i perf may provide additional information. # perf stat -a -e '{cycles,cache-misses,branch-misses}:ue' sleep 1 Performance counter stats for 'system wide': 746,363,126 cycles 16,881,611 cache-misses 2,871,259 branch-misses 1.001636066 seconds time elapsed # Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20201014144255.22699-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit 3cb73bc3fa2a3cb80b88aa63b48409939e0d996b Author: Kairui Song Date: Wed Oct 14 17:24:29 2020 +0800 hyperv_fb: Update screen_info after removing old framebuffer On gen2 HyperV VM, hyperv_fb will remove the old framebuffer, and the new allocated framebuffer address could be at a differnt location, and it might be no longer a VGA framebuffer. Update screen_info so that after kexec the kernel won't try to reuse the old invalid/stale framebuffer address as VGA, corrupting memory. [ mingo: Tidied up the changelog. ] Signed-off-by: Kairui Song Signed-off-by: Ingo Molnar Cc: Dexuan Cui Cc: Jake Oshins Cc: Wei Hu Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Link: https://lore.kernel.org/r/20201014092429.1415040-3-kasong@redhat.com commit afc18069a2cb7ead5f86623a5f3d4ad6e21f940d Author: Kairui Song Date: Wed Oct 14 17:24:28 2020 +0800 x86/kexec: Use up-to-dated screen_info copy to fill boot params kexec_file_load() currently reuses the old boot_params.screen_info, but if drivers have change the hardware state, boot_param.screen_info could contain invalid info. For example, the video type might be no longer VGA, or the frame buffer address might be changed. If the kexec kernel keeps using the old screen_info, kexec'ed kernel may attempt to write to an invalid framebuffer memory region. There are two screen_info instances globally available, boot_params.screen_info and screen_info. Later one is a copy, and is updated by drivers. So let kexec_file_load use the updated copy. [ mingo: Tidied up the changelog. ] Signed-off-by: Kairui Song Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20201014092429.1415040-2-kasong@redhat.com commit 78b2c50c5de990864f6180acea7a7037685b1b1b Author: Jiri Olsa Date: Tue Oct 13 21:24:41 2020 +0200 perf test: Add build id shell test Add a test for the build id cache that adds a binary with sha1 and md5 build ids and verifies it's added properly. The test updates build id cache with 'perf record' and 'perf buildid-cache -a'. Committer testing: # perf test "build id" 82: build id cache operations : Ok # # perf test -v "build id" 82: build id cache operations : --- start --- test child forked, pid 447218 test binaries: /tmp/perf.ex.SHA1.B8I /tmp/perf.ex.MD5.7Nv Adding d1abc1eb7568358cf23c959566f23462461834d1 /tmp/perf.ex.SHA1.B8I: Ok build id: d1abc1eb7568358cf23c959566f23462461834d1 link: /tmp/perf.debug.sS2/.build-id/d1/abc1eb7568358cf23c959566f23462461834d1 file: /tmp/perf.debug.sS2/.build-id/d1/../../tmp/perf.ex.SHA1.B8I/d1abc1eb7568358cf23c959566f23462461834d1/elf OK for /tmp/perf.ex.SHA1.B8I Adding a50e350e97c43b4708d09bcd85ebfff7 /tmp/perf.ex.MD5.7Nv: Ok build id: a50e350e97c43b4708d09bcd85ebfff7 link: /tmp/perf.debug.IuW/.build-id/a5/0e350e97c43b4708d09bcd85ebfff7 file: /tmp/perf.debug.IuW/.build-id/a5/../../tmp/perf.ex.MD5.7Nv/a50e350e97c43b4708d09bcd85ebfff7/elf OK for /tmp/perf.ex.MD5.7Nv [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.034 MB /tmp/perf.data.xrH ] build id: d1abc1eb7568358cf23c959566f23462461834d1 link: /tmp/perf.debug.eGR/.build-id/d1/abc1eb7568358cf23c959566f23462461834d1 file: /tmp/perf.debug.eGR/.build-id/d1/../../tmp/perf.ex.SHA1.B8I/d1abc1eb7568358cf23c959566f23462461834d1/elf OK for /tmp/perf.ex.SHA1.B8I [ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 0.034 MB /tmp/perf.data.cbE ] build id: a50e350e97c43b4708d09bcd85ebfff7 link: /tmp/perf.debug.82t/.build-id/a5/0e350e97c43b4708d09bcd85ebfff7 file: /tmp/perf.debug.82t/.build-id/a5/../../tmp/perf.ex.MD5.7Nv/a50e350e97c43b4708d09bcd85ebfff7/elf OK for /tmp/perf.ex.MD5.7Nv test child finished with 0 ---- end ---- build id cache operations: Ok # Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20201013192441.1299447-10-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e9ad94381cd0c694080810aea430130bb0b0e404 Author: Jiri Olsa Date: Tue Oct 13 21:24:40 2020 +0200 perf tools: Align buildid list output for short build ids With shorter md5 build ids we need to align their paths properly with other build ids: $ perf buildid-list 17f4e448cc746582ea1881528deb549f7fdb3fd5 [kernel.kallsyms] a50e350e97c43b4708d09bcd85ebfff7 .../tools/perf/buildid-ex-md5 1805c738c8f3ec0f47b7ea09080c28f34d18a82b /usr/lib64/ld-2.31.so $ Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20201013192441.1299447-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b0a323c7f0ece5dd76a5dc296ecd9175851a4283 Author: Jiri Olsa Date: Tue Oct 13 21:24:39 2020 +0200 perf tools: Add size to 'struct perf_record_header_build_id' We do not store size with build ids in perf data, but there's enough space to do it. Adding misc bit PERF_RECORD_MISC_BUILD_ID_SIZE to mark build id event with size. With this fix the dso with md5 build id will have correct build id data and will be usable for debuginfod processing if needed (coming in following patches). Committer notes: Use %zu with size_t to fix this error on 32-bit arches: util/header.c: In function '__event_process_build_id': util/header.c:2105:3: error: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'size_t' [-Werror=format=] pr_debug("build id event received for %s: %s [%lu]\n", ^ Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20201013192441.1299447-8-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bd36e51d10e7c2b7d39ffa7d075aed98a8e7473c Author: Zhen Lei Date: Wed Oct 14 00:08:43 2020 +0800 dt-bindings: misc: explicitly add #address-cells for slave mode Explicitly add "#address-cells = <0>" and "#size-cells = <0>" to eliminate below warnings. (spi_bus_bridge): /example-0/spi: incorrect #address-cells for SPI bus (spi_bus_bridge): /example-0/spi: incorrect #size-cells for SPI bus (spi_bus_reg): Failed prerequisite 'spi_bus_bridge' Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20201013160845.1772-5-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit faaa30dd1f4bb6ec5eeea751ebde8076375b916c Author: Zhen Lei Date: Wed Oct 14 00:08:42 2020 +0800 spi: dt-bindings: spi-controller: explicitly require #address-cells=<0> for slave mode scripts/dtc/checks.c: if (get_property(node, "spi-slave")) spi_addr_cells = 0; if (node_addr_cells(node) != spi_addr_cells) FAIL(c, dti, node, "incorrect #address-cells for SPI bus"); if (node_size_cells(node) != 0) FAIL(c, dti, node, "incorrect #size-cells for SPI bus"); The above code in check_spi_bus_bridge() require that the number of address cells must be 0. So we should explicitly declare "#address-cells = <0>". Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20201013160845.1772-4-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit c5b8e4644607b0319fd86a36fb0caad54ee2021e Author: Nobuhiro Iwamatsu Date: Mon Oct 5 11:30:12 2020 +0900 watchdog: Add Toshiba Visconti watchdog driver Add the watchdog driver for Toshiba Visconti series. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Punit Agrawal Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201005023012.603026-3-nobuhiro1.iwamatsu@toshiba.co.jp Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 7e65fa4a49a6d46fea32a4e6cf8c6dd27c061890 Author: Nobuhiro Iwamatsu Date: Mon Oct 5 11:30:11 2020 +0900 watchdog: bindings: Add binding documentation for Toshiba Visconti watchdog device Add documentation for the binding of Toshiba Visconti SoC's watchdog. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Punit Agrawal Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201005023012.603026-2-nobuhiro1.iwamatsu@toshiba.co.jp Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c113739ce5d3b2fcdad3a7b6650dd4bcbf56118a Author: Hanspeter Portner Date: Fri Sep 4 23:16:39 2020 +0200 watchdog: it87_wdt: add IT8784 ID IT8784 watchdog works as in IT878x Tested on SHAREVDY K10 board. Signed-off-by: Hanspeter Portner Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200904211639.18787-2-dev@open-music-kontrollers.ch Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 09da89abe36a3cb3485ed765ec37ac50227e28b5 Author: Guenter Roeck Date: Thu Sep 10 09:31:09 2020 -0700 watchdog: sp5100_tco: Enable watchdog on Family 17h devices if disabled On Family 17h (Ryzen) devices, the WatchdogTmrEn bit of PmDecodeEn not only enables watchdog memory decoding at 0xfeb00000, it also enables the watchdog hardware itself. Use this information to enable the watchdog if it is not already enabled. Cc: Jan Kiszka Tested-by: Jan Kiszka Link: https://lore.kernel.org/r/20200910163109.235136-2-linux@roeck-us.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 08c619b4923056b5dd2d5045757468c76ad0e3fe Author: Guenter Roeck Date: Thu Sep 10 09:31:08 2020 -0700 watchdog: sp5100: Fix definition of EFCH_PM_DECODEEN3 EFCH_PM_DECODEEN3 is supposed to access DECODEEN register bits 24..31, in other words the register at byte offset 3. Cc: Jan Kiszka Fixes: 887d2ec51e34b ("watchdog: sp5100_tco: Add support for recent FCH versions") Tested-by: Jan Kiszka Link: https://lore.kernel.org/r/20200910163109.235136-1-linux@roeck-us.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 962085a2bb823d8c88c6bc706c654648407e6408 Author: Wolfram Sang Date: Tue Sep 8 11:56:15 2020 +0200 watchdog: renesas_wdt: support handover from bootloader Support an already running watchdog by checking its enable bit and set up the status accordingly before registering the device. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200908095615.31376-1-wsa+renesas@sang-engineering.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0cfbe17959b69896a72dffbc2d37280859b0d086 Author: Anson Huang Date: Fri Jul 31 07:03:33 2020 +0800 watchdog: imx7ulp: Watchdog should continue running for wait/stop mode When kernel idle, system will enter wait/stop mode, wdog should continue running in this scenario, and the refresh thread can wake up system from wait/stop mode. Signed-off-by: Anson Huang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1596150213-31638-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d342951bcda6cd190309138385d5935ab1d08f92 Author: Krzysztof Kozlowski Date: Tue Sep 1 17:31:41 2020 +0200 watchdog: rti: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200901153141.18960-3-krzk@kernel.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit fc77204001d085050564bd6bd064e5cd51de2527 Author: Krzysztof Kozlowski Date: Tue Sep 1 17:31:40 2020 +0200 watchdog: davinci: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200901153141.18960-2-krzk@kernel.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit dab1122159a5e7be58e5f64099a8fe7d82ed834f Author: Krzysztof Kozlowski Date: Tue Sep 1 17:31:39 2020 +0200 watchdog: cadence: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200901153141.18960-1-krzk@kernel.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2c904630e9b18c58a2261193e6d85a3d79d87033 Author: Zhen Lei Date: Thu Aug 27 14:21:54 2020 +0800 watchdog: remove unneeded inclusion of There has been no reference to "struct sched_param" since commit 94beddacb53c ("sched,watchdog: Convert to sched_set_fifo()"), so there's no need to include any more, delete it. Signed-off-by: Zhen Lei Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200827062154.1847-1-thunder.leizhen@huawei.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 937425d4cd3ae4e2882b41e332bbbab616bcf0ad Author: Dinghao Liu Date: Mon Aug 24 11:12:30 2020 +0800 watchdog: Use put_device on error We should use put_device() instead of freeing device directly after device_initialize(). Fixes: cb36e29bb0e4b ("watchdog: initialize device before misc_register") Signed-off-by: Dinghao Liu Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200824031230.31050-1-dinghao.liu@zju.edu.cn Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5afb6d203d0293512aa2c6ae098274a2a4f6ed02 Author: Dinghao Liu Date: Mon Aug 24 10:40:01 2020 +0800 watchdog: Fix memleak in watchdog_cdev_register When watchdog_kworker is NULL, we should free wd_data before the function returns to prevent memleak. Fixes: 664a39236e718 ("watchdog: Introduce hardware maximum heartbeat in watchdog core") Signed-off-by: Dinghao Liu Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200824024001.25474-1-dinghao.liu@zju.edu.cn Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 743949466e55732ae7eef038abf291b9b39d3307 Author: Anson Huang Date: Fri Jul 31 07:03:32 2020 +0800 watchdog: imx7ulp: Strictly follow the sequence for wdog operations According to reference manual, the i.MX7ULP WDOG's operations except refresh should follow below sequence: 1. disable global interrupts; 2. unlock the wdog and wait unlock bit set; 3. reconfigure the wdog and wait for reconfiguration bit set; 4. enabel global interrupts. Strictly follow the recommended sequence can make it more robust. Signed-off-by: Anson Huang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1596150213-31638-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit beaabe0e2356648dfd08b52a78350bb531122ba8 Author: Hanspeter Portner Date: Thu Aug 27 12:59:40 2020 +0200 watchdog: it87_wdt: add IT8772 ID IT8772 watchdog works as in IT872x Tested on SHAREVDI K6-F12 board. Signed-off-by: Hanspeter Portner Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200827105940.2835910-1-hanspeter.portner@livesystems.ch Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b65762108bad73255f5f28658b6d7b79bd178be8 Author: Christophe JAILLET Date: Sun Aug 9 09:19:12 2020 +0200 watchdog: pcwd_usb: Avoid GFP_ATOMIC where it is not needed There is no need to use GFP_ATOMIC here. It is a probe function, no spinlock is taken and GFP_KERNEL is used just before and just after this 'usb_alloc_coherent()' call. Signed-off-by: Christophe JAILLET Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200809071912.742836-1-christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4b2e7f99cdd314263c9d172bc17193b8b6bba463 Author: Madhuparna Bhowmik Date: Fri Aug 7 16:59:02 2020 +0530 drivers: watchdog: rdc321x_wdt: Fix race condition bugs In rdc321x_wdt_probe(), rdc321x_wdt_device.queue is initialized after misc_register(), hence if ioctl is called before its initialization which can call rdc321x_wdt_start() function, it will see an uninitialized value of rdc321x_wdt_device.queue, hence initialize it before misc_register(). Also, rdc321x_wdt_device.default_ticks is accessed in reset() function called from write callback, thus initialize it before misc_register(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Madhuparna Bhowmik Reviewed-by: Guenter Roeck Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20200807112902.28764-1-madhuparnabhowmik10@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 39be8d0115b321ed2b28e43dca12c13ae7595f73 Author: Jiri Olsa Date: Tue Oct 13 21:24:38 2020 +0200 perf tools: Pass build_id object to dso__build_id_equal() Passing build_id object to dso__build_id_equal(), so we can properly check build id with different size than sha1. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20201013192441.1299447-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 42d3e2d041f08d1f8f078da005c936648ba77405 Author: Vivek Goyal Date: Tue Oct 6 14:53:06 2020 -0400 virtiofs: calculate number of scatter-gather elements accurately virtiofs currently maps various buffers in scatter gather list and it looks at number of pages (ap->pages) and assumes that same number of pages will be used both for input and output (sg_count_fuse_req()), and calculates total number of scatterlist elements accordingly. But looks like this assumption is not valid in all the cases. For example, Cai Qian reported that trinity, triggers warning with virtiofs sometimes. A closer look revealed that if one calls ioctl(fd, 0x5a004000, buf), it will trigger following warning. WARN_ON(out_sgs + in_sgs != total_sgs) In this case, total_sgs = 8, out_sgs=4, in_sgs=3. Number of pages is 2 (ap->pages), but out_sgs are using both the pages but in_sgs are using only one page. In this case, fuse_do_ioctl() sets different size values for input and output. args->in_args[args->in_numargs - 1].size == 6656 args->out_args[args->out_numargs - 1].size == 4096 So current method of calculating how many scatter-gather list elements will be used is not accurate. Make calculations more precise by parsing size and ap->descs. Reported-by: Qian Cai Signed-off-by: Vivek Goyal Link: https://lore.kernel.org/linux-fsdevel/5ea77e9f6cb8c2db43b09fbd4158ab2d8c066a0a.camel@redhat.com/ Reviewed-by: Stefan Hajnoczi Signed-off-by: Miklos Szeredi commit 8dfdf440d398f0bf63f1d4de881cbe9c69df53bb Author: Jiri Olsa Date: Tue Oct 13 21:24:37 2020 +0200 perf tools: Pass build_id object to dso__set_build_id() Passing build_id object to dso__set_build_id(), so it's easier to initialize dos's build id object. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20201013192441.1299447-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bf5411695a31f7bf07c3e9bad27b442c9224f2a9 Author: Jiri Olsa Date: Tue Oct 13 21:24:36 2020 +0200 perf tools: Pass build_id object to build_id__sprintf() Passing build_id object to build_id__sprintf function, so it can operate with the proper size of build id. This will create proper md5 build id readable names, like following: a50e350e97c43b4708d09bcd85ebfff7 instead of: a50e350e97c43b4708d09bcd85ebfff700000000 Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20201013192441.1299447-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3ff1b8c8cc123f21828ff9538f13f1770a9a4099 Author: Jiri Olsa Date: Tue Oct 13 21:24:35 2020 +0200 perf tools: Pass build id object to sysfs__read_build_id() Passing build id object to sysfs__read_build_id function, so it can populate the size of the build_id object. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20201013192441.1299447-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f766819cd5290d42efa55c505b9bed184fec17bf Author: Jiri Olsa Date: Tue Oct 13 21:24:34 2020 +0200 perf tools: Pass build_id object to filename__read_build_id() Pass a build_id object to filename__read_build_id function, so it can populate the size of the build_id object. Changing filename__read_build_id() code for both ELF/non-ELF code. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20201013192441.1299447-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0aba7f036a56675b7fdc536757b4c49fc76a2208 Author: Jiri Olsa Date: Tue Oct 13 21:24:33 2020 +0200 perf tools: Use build_id object in dso Replace build_id byte array with struct build_id object and all the code that references it. The objective is to carry size together with build id array, so it's better to keep both together. This is preparatory change for following patches, and there's no functional change. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20201013192441.1299447-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 996f9e0f93f16211945c8d5f18f296a88cb32f91 Author: Oliver O'Halloran Date: Wed Oct 14 13:47:11 2020 +1100 selftests/powerpc: Fix eeh-basic.sh exit codes The kselftests test running infrastructure expects tests to finish with an exit code of 4 if the test decided it should be skipped. Currently eeh-basic.sh exits with the number of devices that failed to recover, so if four devices didn't recover we'll report a skip instead of a fail. Fix this by checking if the return code is non-zero and report success and failure by returning 0 or 1 respectively. For the cases where should actually skip return 4. Fixes: 85d86c8aa52e ("selftests/powerpc: Add basic EEH selftest") Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201014024711.1138386-1-oohall@gmail.com commit 8c8cf26ae302cb9dd47935f705945c985f7f5348 Author: Daeho Jeong Date: Mon Oct 12 13:59:47 2020 +0900 f2fs: fix writecount false positive in releasing compress blocks In current condition check, if it detects writecount, it return -EBUSY regardless of f_mode of the file. Fixed it. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit af4b6b8edf6aad73ac385e06196fefa46c23e038 Author: Chao Yu Date: Mon Oct 12 17:06:05 2020 +0800 f2fs: introduce check_swap_activate_fast() check_swap_activate() will lookup block mapping via bmap() one by one, so its performance is very bad, this patch introduces check_swap_activate_fast() to use f2fs_fiemap() to boost this process, since f2fs_fiemap() will lookup block mappings in batch, therefore, it can improve swapon()'s performance significantly. Note that this enhancement only works when page size is equal to f2fs' block size. Testcase: (backend device: zram) - touch file - pin & fallocate file to 8GB - mkswap file - swapon file Before: real 0m2.999s user 0m0.000s sys 0m2.980s After: real 0m0.081s user 0m0.000s sys 0m0.064s Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6ed29fe1cac9745589b7db8de3b5089e3ff591d0 Author: Chao Yu Date: Mon Oct 12 10:28:14 2020 +0800 f2fs: don't issue flush in f2fs_flush_device_cache() for nobarrier case This patch changes f2fs_flush_device_cache() to skip issuing flush for nobarrier case. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 86f33603f8c51537265ff7ac0320638fd2cbdb1b Author: Jaegeuk Kim Date: Fri Oct 2 14:17:35 2020 -0700 f2fs: handle errors of f2fs_get_meta_page_nofail First problem is we hit BUG_ON() in f2fs_get_sum_page given EIO on f2fs_get_meta_page_nofail(). Quick fix was not to give any error with infinite loop, but syzbot caught a case where it goes to that loop from fuzzed image. In turned out we abused f2fs_get_meta_page_nofail() like in the below call stack. - f2fs_fill_super - f2fs_build_segment_manager - build_sit_entries - get_current_sit_page INFO: task syz-executor178:6870 can't die for more than 143 seconds. task:syz-executor178 state:R stack:26960 pid: 6870 ppid: 6869 flags:0x00004006 Call Trace: Showing all locks held in the system: 1 lock held by khungtaskd/1179: #0: ffffffff8a554da0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6242 1 lock held by systemd-journal/3920: 1 lock held by in:imklog/6769: #0: ffff88809eebc130 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:930 1 lock held by syz-executor178/6870: #0: ffff8880925120e0 (&type->s_umount_key#47/1){+.+.}-{3:3}, at: alloc_super+0x201/0xaf0 fs/super.c:229 Actually, we didn't have to use _nofail in this case, since we could return error to mount(2) already with the error handler. As a result, this patch tries to 1) remove _nofail callers as much as possible, 2) deal with error case in last remaining caller, f2fs_get_sum_page(). Reported-by: syzbot+ee250ac8137be41d7b13@syzkaller.appspotmail.com Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0fa21cf4489fe11737d56f8056dda1ba0257bd8d Author: Masahiro Yamada Date: Wed Oct 14 03:38:20 2020 +0900 kbuild: deb-pkg: clean up package name variables Hard-code the names of linux-headers and debug packages in the control file. The kernel package is different for ARCH=um. Change the code for better readability. Signed-off-by: Masahiro Yamada commit bac977cbc0d6731fb8e67c2be0e4acbd959e10b3 Author: Masahiro Yamada Date: Wed Oct 14 03:38:19 2020 +0900 kbuild: deb-pkg: do not build linux-headers package if CONFIG_MODULES=n Since commit 269a535ca931 ("modpost: generate vmlinux.symvers and reuse it for the second modpost"), with CONFIG_MODULES disabled, "make deb-pkg" (or "make bindeb-pkg") fails with: find: ‘Module.symvers’: No such file or directory If CONFIG_MODULES is disabled, it doesn't really make sense to build the linux-headers package. Fixes: 269a535ca931 ("modpost: generate vmlinux.symvers and reuse it for the second modpost") Reported-by: Josh Triplett Signed-off-by: Masahiro Yamada commit 1a3c4dd4e1633a4482df6dd030a365de6f26de2c Author: Paul Cercueil Date: Thu Sep 3 03:50:48 2020 +0200 clk: ingenic: Respect CLK_SET_RATE_PARENT in .round_rate Clocks that don't have a divider are in our case all marked with the CLK_SET_RATE_PARENT flag. In this case, the .round_rate implementation should modify the value pointed to by parent_rate, in order to propagate the rate change to the parent, as explained in the documentation of clk_set_rate(). Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200903015048.3091523-5-paul@crapouillou.net Signed-off-by: Stephen Boyd commit 2e4ee634f80510b54dee144773c0be3190eb4208 Author: Paul Cercueil Date: Thu Sep 3 03:50:47 2020 +0200 clk: ingenic: Don't tag custom clocks with CLK_SET_RATE_PARENT The custom clocks have custom functions to round, get or set their rate. Therefore, we can't assume that they need the CLK_SET_RATE_PARENT flag. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200903015048.3091523-4-paul@crapouillou.net Signed-off-by: Stephen Boyd commit 3860dc599b7d3de869d9d7e2274d2ca8f1e2be86 Author: Paul Cercueil Date: Thu Sep 3 03:50:46 2020 +0200 clk: ingenic: Don't use CLK_SET_RATE_GATE for PLL CLK_SET_RATE_GATE means that the clock must be gated when being reclocked. This is not the case for the PLLs in Ingenic SoCs. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200903015048.3091523-3-paul@crapouillou.net Signed-off-by: Stephen Boyd commit 21534fe39c494913849f3c46e41282b96bce7df6 Author: Paul Cercueil Date: Thu Sep 3 03:50:45 2020 +0200 clk: ingenic: Use readl_poll_timeout instead of custom loop Use the readl_poll_timeout() function instead of rolling our own busy-wait loops. This makes the code simpler. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200903015048.3091523-2-paul@crapouillou.net Signed-off-by: Stephen Boyd commit 29c37341b54f7a500727799b94565fcc5dd8e6f8 Author: Paul Cercueil Date: Thu Sep 3 03:50:44 2020 +0200 clk: ingenic: Use to_clk_info() macro for all clocks The to_clk_info() previously had a BUG_ON() to check that it was only called for PLL clocks. Yet, all the other clocks were doing the exact same thing the macro does, in-line. Move the to_clk_info() macro to the top of the file, remove the hardcoded BUG_ON(), and use it everywhere it makes sense. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200903015048.3091523-1-paul@crapouillou.net Signed-off-by: Stephen Boyd commit 1e40d75ef90c5c99d9418637cd7295fa49ecb5fb Merge: fdafed459998e 0d9826bc18ce3 Author: Jakub Kicinski Date: Tue Oct 13 20:02:54 2020 -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) Extend nf_queue selftest to cover re-queueing, non-gso mode and delayed queueing, from Florian Westphal. 2) Clear skb->tstamp in IPVS forwarding path, from Julian Anastasov. 3) Provide netlink extended error reporting for EEXIST case. 4) Missing VLAN offload tag and proto in log target. ==================== Signed-off-by: Jakub Kicinski commit f6c992ca7dd4f49042eec61f3fb426c94d901675 Author: Navid Emamdoost Date: Sun Aug 9 18:11:58 2020 -0500 clk: bcm2835: add missing release if devm_clk_hw_register fails In the implementation of bcm2835_register_pll(), the allocated pll is leaked if devm_clk_hw_register() fails to register hw. Release pll if devm_clk_hw_register() fails. Signed-off-by: Navid Emamdoost Link: https://lore.kernel.org/r/20200809231202.15811-1-navid.emamdoost@gmail.com Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks") Signed-off-by: Stephen Boyd commit c6968ac08d60d61c1f6d00b65a38b0e150688f98 Author: Claudiu Beznea Date: Tue Aug 25 09:59:11 2020 +0300 clk: at91: clk-sam9x60-pll: remove unused variable Fix variable set but not used compilation warning. Fixes: 43b1bb4a9b3e ("clk: at91: clk-sam9x60-pll: re-factor to support plls with multiple outputs") Reported-by: kernel test robot Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1598338751-20607-4-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 85d071e7f19a6a9abf30476b90b3819642568756 Author: Claudiu Beznea Date: Tue Aug 25 09:59:10 2020 +0300 clk: at91: clk-main: update key before writing AT91_CKGR_MOR SAMA5D2 datasheet specifies on chapter 33.22.8 (PMC Clock Generator Main Oscillator Register) that writing any value other than 0x37 on KEY field aborts the write operation. Use the key when selecting main clock parent. Fixes: 27cb1c2083373 ("clk: at91: rework main clk implementation") Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/1598338751-20607-3-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit eddfb2e1eed6440db9ee36cc4d2a0abeeabeb942 Author: Claudiu Beznea Date: Tue Aug 25 09:59:09 2020 +0300 clk: at91: remove the checking of parent_name There is no need to check parent_name variable while assigning it to init.parent_names. parent_name variable is already checked at the beginning of at91_clk_register_peripheral() function. Fixes: 6114067e437eb ("clk: at91: add PMC peripheral clocks") Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/1598338751-20607-2-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 50172733d01c3097b23ac8d45bf1fff72af0ba98 Merge: d5e6f064ac664 5be019040cb7b Author: Jakub Kicinski Date: Tue Oct 13 19:55:53 2020 -0700 Merge tag 'mlx5-updates-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-10-12 Updates to mlx5 driver: - Cleanup fix of uininitialized pointer read - xfrm IPSec TX offload ==================== Signed-off-by: Jakub Kicinski commit eff06bd5e5f63b14ea1ad97fbb07bd41d92d323d Author: Xu Wang Date: Mon Sep 21 03:45:22 2020 +0000 clk: clk-prima2: fix return value check in prima2_clk_init() In case of error, the function clk_register() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20200921034522.9077-1-vulab@iscas.ac.cn Acked-by: Barry Song Signed-off-by: Stephen Boyd commit 07c565b42a04f38c49c3b09f89917cdf282c4743 Author: Lubomir Rintel Date: Sat Sep 26 01:39:14 2020 +0200 clk: mmp2: Fix the display clock divider base The LCD clock dividers are apparently based on one. No datasheet, determined empirically, but seems to be confirmed by line 19 of lcd.fth in OLPC laptop's Open Firmware [1]: h# 00000700 value pmua-disp-clk-sel \ PLL1 / 7 -> 113.86 MHz [1] https://raw.githubusercontent.com/quozl/openfirmware/65a08a73b2cac/cpu/arm/olpc/lcd.fth Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200925233914.227786-1-lkundrak@v3.sk Signed-off-by: Stephen Boyd commit 6487649ee8b81d6c3a4eb7f17505f7fe397fdca3 Author: Rikard Falkeborn Date: Tue Sep 22 20:47:15 2020 +0200 clk: pxa: Constify static struct clk_ops Constify a couple of static struct clk_ops that are not modified. Their only usage is inside the macros and their address is passed to clk_register_composite() which takes pointers to const struct clk_ops. This allows the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200922184715.1854-1-rikard.falkeborn@gmail.com Signed-off-by: Stephen Boyd commit 9ba9ad8f5be0ff6af87ed23e4d872f4eb422b525 Author: Serge Semin Date: Sun Sep 20 14:03:35 2020 +0300 clk: baikal-t1: Mark Ethernet PLL as critical We've discovered that disabling the so called Ethernet PLL causes reset of the devices consuming its outgoing clock. The resets happen automatically even if each underlying clock gate is turned off. Due to that we can't disable the Ethernet PLL until the kernel is prepared for the corresponding resets. So for now just mark the PLL clock provider as critical. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: linux-mips@vger.kernel.org Link: https://lore.kernel.org/r/20200920110335.18034-1-Sergey.Semin@baikalelectronics.ru Signed-off-by: Stephen Boyd commit e9501b975a9efb499f2ecbe3374d433b25c5b4f4 Author: Zhao Qiang Date: Wed Sep 16 11:03:10 2020 +0800 clk: qoriq: modify MAX_PLL_DIV to 32 On LS2088A, Watchdog need clk divided by 32, so modify MAX_PLL_DIV to 32 Signed-off-by: Zhao Qiang Link: https://lore.kernel.org/r/20200916030311.17280-1-qiang.zhao@nxp.com Signed-off-by: Stephen Boyd commit d5e6f064ac664aacc0a6f72691b27a6db9525a89 Merge: a003ec1f47bc7 f2bf814a27c56 Author: Jakub Kicinski Date: Tue Oct 13 19:41:34 2020 -0700 Merge branch '40GbE-Intel-Wired-LAN-Driver-Updates-2020-10-12' Tony Nguyen says: ==================== 40GbE Intel Wired LAN Driver Updates 2020-10-12 This series contains updates to i40e and e1000 drivers. Jaroslaw adds support for changing FEC on i40e if the firmware supports it. Jesse fixes a kbuild-bot warning regarding ternary operator on e1000. v2: Return -EOPNOTSUPP instead of -EINVAL when FEC settings are not supported by firmware. Remove, unneeded, done label and return errors directly in i40e_set_fec_param() for patch 1. Dropped, previous patch 2, to send to net. ==================== Signed-off-by: Jakub Kicinski commit a3947209d380cfcbd081597954fe6ee254e9681f Author: Lars-Peter Clausen Date: Thu Oct 1 11:59:48 2020 +0300 clk: axi-clkgen: Set power bits for fractional mode Using the fractional dividers requires some additional power bits to be set. The fractional power bits are not documented and the current heuristic for setting them seems be insufficient for some cases. Just always set all the fractional power bits when in fractional mode. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201001085948.21412-2-alexandru.ardelean@analog.com Signed-off-by: Stephen Boyd commit 86378cf646d323d0ce0ac734d444f4d80fd9e43f Author: Lars-Peter Clausen Date: Thu Oct 1 11:59:47 2020 +0300 clk: axi-clkgen: Add support for fractional dividers The axi-clkgen has (optional) fractional dividers on the output clock divider and feedback clock divider path. Utilizing the fractional dividers allows for a better resolution of the output clock, being able to synthesize more frequencies. Rework the driver support to support the fractional register fields, both for setting a new rate as well as reading back the current rate from the hardware. For setting the rate if no perfect divider settings were found in non-fractional mode try again in fractional mode and see if better settings can be found. This appears to be the recommended mode of operation. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201001085948.21412-1-alexandru.ardelean@analog.com Signed-off-by: Stephen Boyd commit f2bf814a27c567abd51683e1e853ff3b5bbf9186 Author: Jesse Brandeburg Date: Mon Oct 12 11:13:46 2020 -0700 e1000: remove unused and incorrect code The e1000_clear_vfta function was triggering a warning in kbuild-bot testing. It's actually a bug but has no functional impact. drivers/net/ethernet/intel/e1000/e1000_hw.c:4415:58: warning: Same expression in both branches of ternary operator. [duplicateExpressionTernary] Fix this warning by removing the offending code and simplifying the routine to do exactly what it did before, no functional change. Signed-off-by: Jesse Brandeburg Tested-by: Aaron Brown Signed-off-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 30cf856a691f61d1b7614b473a89ca8156d4e0ae Author: Jaroslaw Gawin Date: Mon Oct 12 11:13:45 2020 -0700 i40e: Allow changing FEC settings on X722 if supported by FW Starting with API version 1.10 firmware for X722 devices has ability to change FEC settings in PHY. Code added in this patch allows changing FEC settings if the capability flag indicates the device supports this feature. Signed-off-by: Jaroslaw Gawin Signed-off-by: Aleksandr Loktionov Signed-off-by: Arkadiusz Kubalewski Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit f1f4f3ab54e9a52c7610c998ff8255f019742e67 Author: Ralph Campbell Date: Tue Oct 13 16:58:42 2020 -0700 mm/migrate: remove obsolete comment about device public Device public memory never had an in tree consumer and was removed in commit 25b2995a35b6 ("mm: remove MEMORY_DEVICE_PUBLIC support"). Delete the obsolete comment. Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Reviewed-by: Jason Gunthorpe Cc: Jerome Glisse Cc: John Hubbard Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20200827190735.12752-2-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit 4257889124cce4526ebf29329bae8794e97b455a Author: Ralph Campbell Date: Tue Oct 13 16:58:39 2020 -0700 mm/migrate: remove cpages-- in migrate_vma_finalize() The variable struct migrate_vma->cpages is only used in migrate_vma_setup(). There is no need to decrement it in migrate_vma_finalize() since it is never checked. Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: John Hubbard Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20200827190735.12752-1-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit 67197a4f28d28d0b073ab0427b03cb2ee5382578 Author: Suren Baghdasaryan Date: Tue Oct 13 16:58:35 2020 -0700 mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary Currently __set_oom_adj loops through all processes in the system to keep oom_score_adj and oom_score_adj_min in sync between processes sharing their mm. This is done for any task with more that one mm_users, which includes processes with multiple threads (sharing mm and signals). However for such processes the loop is unnecessary because their signal structure is shared as well. Android updates oom_score_adj whenever a tasks changes its role (background/foreground/...) or binds to/unbinds from a service, making it more/less important. Such operation can happen frequently. We noticed that updates to oom_score_adj became more expensive and after further investigation found out that the patch mentioned in "Fixes" introduced a regression. Using Pixel 4 with a typical Android workload, write time to oom_score_adj increased from ~3.57us to ~362us. Moreover this regression linearly depends on the number of multi-threaded processes running on the system. Mark the mm with a new MMF_MULTIPROCESS flag bit when task is created with (CLONE_VM && !CLONE_THREAD && !CLONE_VFORK). Change __set_oom_adj to use MMF_MULTIPROCESS instead of mm_users to decide whether oom_score_adj update should be synchronized between multiple processes. To prevent races between clone() and __set_oom_adj(), when oom_score_adj of the process being cloned might be modified from userspace, we use oom_adj_mutex. Its scope is changed to global. The combination of (CLONE_VM && !CLONE_THREAD) is rarely used except for the case of vfork(). To prevent performance regressions of vfork(), we skip taking oom_adj_mutex and setting MMF_MULTIPROCESS when CLONE_VFORK is specified. Clearing the MMF_MULTIPROCESS flag (when the last process sharing the mm exits) is left out of this patch to keep it simple and because it is believed that this threading model is rare. Should there ever be a need for optimizing that case as well, it can be done by hooking into the exit path, likely following the mm_update_next_owner pattern. With the combination of (CLONE_VM && !CLONE_THREAD && !CLONE_VFORK) being quite rare, the regression is gone after the change is applied. [surenb@google.com: v3] Link: https://lkml.kernel.org/r/20200902012558.2335613-1-surenb@google.com Fixes: 44a70adec910 ("mm, oom_adj: make sure processes sharing mm have same view of oom_score_adj") Reported-by: Tim Murray Suggested-by: Michal Hocko Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton Acked-by: Christian Brauner Acked-by: Michal Hocko Acked-by: Oleg Nesterov Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Eugene Syromiatnikov Cc: Christian Kellner Cc: Adrian Reber Cc: Shakeel Butt Cc: Aleksa Sarai Cc: Alexey Dobriyan Cc: "Eric W. Biederman" Cc: Alexey Gladkov Cc: Michel Lespinasse Cc: Daniel Jordan Cc: Andrei Vagin Cc: Bernd Edlinger Cc: John Johansen Cc: Yafang Shao Link: https://lkml.kernel.org/r/20200824153036.3201505-1-surenb@google.com Debugged-by: Minchan Kim Signed-off-by: Linus Torvalds commit cc6de1680538633e4ef9540b2313fa2481a7c641 Author: Mike Rapoport Date: Tue Oct 13 16:58:30 2020 -0700 memblock: use separate iterators for memory and reserved regions for_each_memblock() is used to iterate over memblock.memory in a few places that use data from memblock_region rather than the memory ranges. Introduce separate for_each_mem_region() and for_each_reserved_mem_region() to improve encapsulation of memblock internals from its users. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Acked-by: Ingo Molnar [x86] Acked-by: Thomas Bogendoerfer [MIPS] Acked-by: Miguel Ojeda [.clang-format] Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-18-rppt@kernel.org Signed-off-by: Linus Torvalds commit 9f3d5eaa3c60f95d9fff1ce4eea7553a3dc04906 Author: Mike Rapoport Date: Tue Oct 13 16:58:25 2020 -0700 memblock: implement for_each_reserved_mem_region() using __next_mem_region() Iteration over memblock.reserved with for_each_reserved_mem_region() used __next_reserved_mem_region() that implemented a subset of __next_mem_region(). Use __for_each_mem_range() and, essentially, __next_mem_region() with appropriate parameters to reduce code duplication. While on it, rename for_each_reserved_mem_region() to for_each_reserved_mem_range() for consistency. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Acked-by: Miguel Ojeda [.clang-format] Cc: Andy Lutomirski Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-17-rppt@kernel.org Signed-off-by: Linus Torvalds commit 5bd0960b85d7e3e4a2dc5bbf1c87d0b505115d71 Author: Mike Rapoport Date: Tue Oct 13 16:58:20 2020 -0700 memblock: remove unused memblock_mem_size() The only user of memblock_mem_size() was x86 setup code, it is gone now and memblock_mem_size() funciton can be removed. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-16-rppt@kernel.org Signed-off-by: Linus Torvalds commit 6120cdc01ef63e92f1b33547af87382364cd1b38 Author: Mike Rapoport Date: Tue Oct 13 16:58:16 2020 -0700 x86/setup: simplify reserve_crashkernel() * Replace magic numbers with defines * Replace memblock_find_in_range() + memblock_reserve() with memblock_phys_alloc_range() * Stop checking for low memory size in reserve_crashkernel_low(). The allocation from limited range will anyway fail if there is no enough memory, so there is no need for extra traversal of memblock.memory Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Acked-by: Ingo Molnar Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-15-rppt@kernel.org Signed-off-by: Linus Torvalds commit 3c45ee6dc7a1384de747e8afaa80ffb4b08be39f Author: Mike Rapoport Date: Tue Oct 13 16:58:12 2020 -0700 x86/setup: simplify initrd relocation and reservation Currently, initrd image is reserved very early during setup and then it might be relocated and re-reserved after the initial physical memory mapping is created. The "late" reservation of memblock verifies that mapped memory size exceeds the size of initrd, then checks whether the relocation required and, if yes, relocates inirtd to a new memory allocated from memblock and frees the old location. The check for memory size is excessive as memblock allocation will anyway fail if there is not enough memory. Besides, there is no point to allocate memory from memblock using memblock_find_in_range() + memblock_reserve() when there exists memblock_phys_alloc_range() with required functionality. Remove the redundant check and simplify memblock allocation. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Acked-by: Ingo Molnar Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-14-rppt@kernel.org Signed-off-by: Linus Torvalds commit b10d6bca87204cdafd0cd7aaa837ad30b4eb8c20 Author: Mike Rapoport Date: Tue Oct 13 16:58:08 2020 -0700 arch, drivers: replace for_each_membock() with for_each_mem_range() There are several occurrences of the following pattern: for_each_memblock(memory, reg) { start = __pfn_to_phys(memblock_region_memory_base_pfn(reg); end = __pfn_to_phys(memblock_region_memory_end_pfn(reg)); /* do something with start and end */ } Using for_each_mem_range() iterator is more appropriate in such cases and allows simpler and cleaner code. [akpm@linux-foundation.org: fix arch/arm/mm/pmsa-v7.c build] [rppt@linux.ibm.com: mips: fix cavium-octeon build caused by memblock refactoring] Link: http://lkml.kernel.org/r/20200827124549.GD167163@linux.ibm.com Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Cc: Andy Lutomirski Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-13-rppt@kernel.org Signed-off-by: Linus Torvalds commit c9118e6c37bff9ade90b638207a6e0db676ee6a9 Author: Mike Rapoport Date: Tue Oct 13 16:58:03 2020 -0700 arch, mm: replace for_each_memblock() with for_each_mem_pfn_range() There are several occurrences of the following pattern: for_each_memblock(memory, reg) { start_pfn = memblock_region_memory_base_pfn(reg); end_pfn = memblock_region_memory_end_pfn(reg); /* do something with start_pfn and end_pfn */ } Rather than iterate over all memblock.memory regions and each time query for their start and end PFNs, use for_each_mem_pfn_range() iterator to get simpler and clearer code. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Acked-by: Miguel Ojeda [.clang-format] Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-12-rppt@kernel.org Signed-off-by: Linus Torvalds commit 6e245ad4a17ab92dba63406d3f517520a86c0a80 Author: Mike Rapoport Date: Tue Oct 13 16:57:59 2020 -0700 memblock: reduce number of parameters in for_each_mem_range() Currently for_each_mem_range() and for_each_mem_range_rev() iterators are the most generic way to traverse memblock regions. As such, they have 8 parameters and they are hardly convenient to users. Most users choose to utilize one of their wrappers and the only user that actually needs most of the parameters is memblock itself. To avoid yet another naming for memblock iterators, rename the existing for_each_mem_range[_rev]() to __for_each_mem_range[_rev]() and add a new for_each_mem_range[_rev]() wrappers with only index, start and end parameters. The new wrapper nicely fits into init_unavailable_mem() and will be used in upcoming changes to simplify memblock traversals. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Acked-by: Thomas Bogendoerfer [MIPS] Cc: Andy Lutomirski Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-11-rppt@kernel.org Signed-off-by: Linus Torvalds commit 87c55870f01266fe22f345a0767162f85f1cf8f1 Author: Mike Rapoport Date: Tue Oct 13 16:57:54 2020 -0700 memblock: make memblock_debug and related functionality private The only user of memblock_dbg() outside memblock was s390 setup code and it is converted to use pr_debug() instead. This allows to stop exposing memblock_debug and memblock_dbg() to the rest of the kernel. [akpm@linux-foundation.org: make memblock_dbg() safer and neater] Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-10-rppt@kernel.org Signed-off-by: Linus Torvalds commit cd991db8ddc33d2d2c7af45627fc48352915001c Author: Mike Rapoport Date: Tue Oct 13 16:57:49 2020 -0700 memblock: make for_each_memblock_type() iterator private for_each_memblock_type() is not used outside mm/memblock.c, move it there from include/linux/memblock.h Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-9-rppt@kernel.org Signed-off-by: Linus Torvalds commit 49645793bce1a2bd8c56c0de709bb9093be0df2f Author: Mike Rapoport Date: Tue Oct 13 16:57:45 2020 -0700 mircoblaze: drop unneeded NUMA and sparsemem initializations microblaze does not support neither NUMA not SPARSMEM, so there is no point to call memblock_set_node() and sparse_memory_present_with_active_regions() functions during microblaze memory initialization. Remove these calls and the surrounding code. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Cc: Andy Lutomirski Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-8-rppt@kernel.org Signed-off-by: Linus Torvalds commit c8e470184a063b5fb1dc06779935247e398f2177 Author: Mike Rapoport Date: Tue Oct 13 16:57:40 2020 -0700 riscv: drop unneeded node initialization RISC-V does not (yet) support NUMA and for UMA architectures node 0 is used implicitly during early memory initialization. There is no need to call memblock_set_node(), remove this call and the surrounding code. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Cc: Andy Lutomirski Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-7-rppt@kernel.org Signed-off-by: Linus Torvalds commit 80c4574417ae42fe2ba6978772854dc67cfc5331 Author: Mike Rapoport Date: Tue Oct 13 16:57:36 2020 -0700 h8300, nds32, openrisc: simplify detection of memory extents Instead of traversing memblock.memory regions to find memory_start and memory_end, simply query memblock_{start,end}_of_DRAM(). Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Acked-by: Stafford Horne Cc: Andy Lutomirski Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-6-rppt@kernel.org Signed-off-by: Linus Torvalds commit ab8f21aa8b2ee77931e2fe7fd8a842628b780d22 Author: Mike Rapoport Date: Tue Oct 13 16:57:31 2020 -0700 arm64: numa: simplify dummy_numa_init() dummy_numa_init() loops over memblock.memory and passes nid=0 to numa_add_memblk() which essentially wraps memblock_set_node(). However, memblock_set_node() can cope with entire memory span itself, so the loop over memblock.memory regions is redundant. Using a single call to memblock_set_node() rather than a loop also fixes an issue with a buggy ACPI firmware in which the SRAT table covers some but not all of the memory in the EFI memory map. Jonathan Cameron says: This issue can be easily triggered by having an SRAT table which fails to cover all elements of the EFI memory map. This firmware error is detected and a warning printed. e.g. "NUMA: Warning: invalid memblk node 64 [mem 0x240000000-0x27fffffff]" At that point we fall back to dummy_numa_init(). However, the failed ACPI init has left us with our memblocks all broken up as we split them when trying to assign them to NUMA nodes. We then iterate over the memblocks and add them to node 0. numa_add_memblk() calls memblock_set_node() which merges regions that were previously split up during the earlier attempt to add them to different nodes during parsing of SRAT. This means elements are moved in the memblock array and we can end up in a different memblock after the call to numa_add_memblk(). Result is: Unable to handle kernel paging request at virtual address 0000000000003a40 Mem abort info: ESR = 0x96000004 EC = 0x25: 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 [0000000000003a40] user address but active_mm is swapper Internal error: Oops: 96000004 [#1] PREEMPT SMP ... Call trace: sparse_init_nid+0x5c/0x2b0 sparse_init+0x138/0x170 bootmem_init+0x80/0xe0 setup_arch+0x2a0/0x5fc start_kernel+0x8c/0x648 Replace the loop with a single call to memblock_set_node() to the entire memory. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Acked-by: Jonathan Cameron Acked-by: Catalin Marinas Cc: Andy Lutomirski Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-5-rppt@kernel.org Signed-off-by: Linus Torvalds commit cddb5ddf2b76debdb8cad1728ad0a9321383d933 Author: Mike Rapoport Date: Tue Oct 13 16:57:26 2020 -0700 arm, xtensa: simplify initialization of high memory pages free_highpages() in both arm and xtensa essentially open-code for_each_free_mem_range() loop to detect high memory pages that were not reserved and that should be initialized and passed to the buddy allocator. Replace open-coded implementation of for_each_free_mem_range() with usage of memblock API to simplify the code. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Tested-by: Max Filippov [xtensa] Reviewed-by: Max Filippov [xtensa] Cc: Andy Lutomirski Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-4-rppt@kernel.org Signed-off-by: Linus Torvalds commit e9aa36ccbb4e845d043bb51de274ae877ae925a7 Author: Mike Rapoport Date: Tue Oct 13 16:57:22 2020 -0700 dma-contiguous: simplify cma_early_percent_memory() The memory size calculation in cma_early_percent_memory() traverses memblock.memory rather than simply call memblock_phys_mem_size(). The comment in that function suggests that at some point there should have been call to memblock_analyze() before memblock_phys_mem_size() could be used. As of now, there is no memblock_analyze() at all and memblock_phys_mem_size() can be used as soon as cold-plug memory is registered with memblock. Replace loop over memblock.memory with a call to memblock_phys_mem_size(). Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Christoph Hellwig Reviewed-by: Baoquan He Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20200818151634.14343-3-rppt@kernel.org Signed-off-by: Linus Torvalds commit 04ba0a923f07df85211cf83932ab9531dd2e6f7f Author: Mike Rapoport Date: Tue Oct 13 16:57:17 2020 -0700 KVM: PPC: Book3S HV: simplify kvm_cma_reserve() Patch series "memblock: seasonal cleaning^w cleanup", v3. These patches simplify several uses of memblock iterators and hide some of the memblock implementation details from the rest of the system. This patch (of 17): The memory size calculation in kvm_cma_reserve() traverses memblock.memory rather than simply call memblock_phys_mem_size(). The comment in that function suggests that at some point there should have been call to memblock_analyze() before memblock_phys_mem_size() could be used. As of now, there is no memblock_analyze() at all and memblock_phys_mem_size() can be used as soon as cold-plug memory is registered with memblock. Replace loop over memblock.memory with a call to memblock_phys_mem_size(). Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Cc: Andy Lutomirski Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Ingo Molnar Cc: Hari Bathini Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Miguel Ojeda Cc: Thomas Bogendoerfer Link: https://lkml.kernel.org/r/20200818151634.14343-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20200818151634.14343-2-rppt@kernel.org Signed-off-by: Linus Torvalds commit 544941d788319951ae75bae5d1bce076a6f71949 Author: Miaohe Lin Date: Tue Oct 13 16:57:14 2020 -0700 mm/mempool: add 'else' to split mutually exclusive case Add else to split mutually exclusive case and avoid some unnecessary check. It doesn't seem to change code generation (compiler is smart), but I think it helps readability. [akpm@linux-foundation.org: fix comment location] Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200924111641.28922-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit f8fd52535c7326d72645c9878d7897aaf44db51c Author: Wei Yang Date: Tue Oct 13 16:57:11 2020 -0700 mm: remove unused alloc_page_vma_node() No one use this macro anymore. Also fix code style of policy_node(). Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200921021401.84508-1-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 78b132e9bae922f1e8bd9d137f0c27b81c44f15d Author: Wei Yang Date: Tue Oct 13 16:57:08 2020 -0700 mm/mempolicy: remove or narrow the lock on current It is not necessary to hold the lock of current when setting nodemask of a new policy. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200921040416.86185-1-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 1100262037be8008cc85240389fbe5eac4df034d Author: John Hubbard Date: Tue Oct 13 16:57:04 2020 -0700 selftests/vm: 8x compaction_test speedup This patch reduces the running time for compaction_test from about 27 sec, to 3.3 sec, which is about an 8x speedup. These numbers are for an Intel x86_64 system with 32 GB of DRAM. The compaction_test.c program was spending most of its time doing mmap(), 1 MB at a time, on about 25 GB of memory. Instead, do the mmaps 100 MB at a time. (Going past 100 MB doesn't make things go much faster, because other parts of the program are using the remaining time.) Signed-off-by: John Hubbard Signed-off-by: Andrew Morton Acked-by: Sri Jayaramappa Cc: Shuah Khan Cc: Mel Gorman Link: https://lkml.kernel.org/r/20201002080621.551044-2-jhubbard@nvidia.com Signed-off-by: Linus Torvalds commit 74c9da4e1dc0ecf70e7fa78568821e3ed8f77938 Author: Mateusz Nosek Date: Tue Oct 13 16:57:01 2020 -0700 include/linux/compaction.h: clean code by removing unused enum value The enum value 'COMPACT_INACTIVE' is never used so can be removed. Signed-off-by: Mateusz Nosek Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200917110750.12015-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds commit 62b35fe0eba21b09b015cdb43cddf51073e4b18c Author: Mateusz Nosek Date: Tue Oct 13 16:56:58 2020 -0700 mm/compaction.c: micro-optimization remove unnecessary branch The same code can work both for 'zone->compact_considered > defer_limit' and 'zone->compact_considered >= defer_limit'. In the latter there is one branch less which is more effective considering performance. Signed-off-by: Mateusz Nosek Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Joonsoo Kim Cc: Vlastimil Babka Cc: Mel Gorman Cc: David Rientjes Link: https://lkml.kernel.org/r/20200913190448.28649-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds commit 1860129421c37a152b3bed23d7bef8ae21545d67 Author: Xiang Chen Date: Tue Oct 13 16:56:55 2020 -0700 mm/zbud: remove redundant initialization zhdr is already initialized in the front of the function, so remove redundant initialization here. Signed-off-by: Xiang Chen Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Cc: Seth Jennings Cc: Dan Streetman Link: https://lkml.kernel.org/r/1600419885-191907-1-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Linus Torvalds commit f94afee9980c5722dfff6d3e46fd34a36293a509 Author: Hui Su Date: Tue Oct 13 16:56:52 2020 -0700 mm/z3fold.c: use xx_zalloc instead xx_alloc and memset alloc_slots() allocates memory for slots using kmem_cache_alloc(), then memsets it. We can just use kmem_cache_zalloc(). Signed-off-by: Hui Su Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200926100834.GA184671@rlk Signed-off-by: Linus Torvalds commit 01c4776ba08ca9ab8cf58fb27d311868193dd368 Author: Hui Su Date: Tue Oct 13 16:56:49 2020 -0700 mm/vmscan: fix comments for isolate_lru_page() fix comments for isolate_lru_page(): s/fundamentnal/fundamental Signed-off-by: Hui Su Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200927173923.GA8058@rlk Signed-off-by: Linus Torvalds commit 069c411de40a621c82efd2618663fee51d8c59b8 Author: Chunxin Zang Date: Tue Oct 13 16:56:46 2020 -0700 mm/vmscan: fix infinite loop in drop_slab_node We have observed that drop_caches can take a considerable amount of time (). Especially when there are many memcgs involved because they are adding an additional overhead. It is quite unfortunate that the operation cannot be interrupted by a signal currently. Add a check for fatal signals into the main loop so that userspace can control early bailout. There are two reasons: 1. We have too many memcgs, even though one object freed in one memcg, the sum of object is bigger than 10. 2. We spend a lot of time in traverse memcg once. So, the memcg who traversed at the first have been freed many objects. Traverse memcg next time, the freed count bigger than 10 again. We can get the following info through 'ps': root:~# ps -aux | grep drop root 357956 ... R Aug25 21119854:55 echo 3 > /proc/sys/vm/drop_caches root 1771385 ... R Aug16 21146421:17 echo 3 > /proc/sys/vm/drop_caches root 1986319 ... R 18:56 117:27 echo 3 > /proc/sys/vm/drop_caches root 2002148 ... R Aug24 5720:39 echo 3 > /proc/sys/vm/drop_caches root 2564666 ... R 18:59 113:58 echo 3 > /proc/sys/vm/drop_caches root 2639347 ... R Sep03 2383:39 echo 3 > /proc/sys/vm/drop_caches root 3904747 ... R 03:35 993:31 echo 3 > /proc/sys/vm/drop_caches root 4016780 ... R Aug21 7882:18 echo 3 > /proc/sys/vm/drop_caches Use bpftrace follow 'freed' value in drop_slab_node: root:~# bpftrace -e 'kprobe:drop_slab_node+70 {@ret=hist(reg("bp")); }' Attaching 1 probe... ^B^C @ret: [64, 128) 1 | | [128, 256) 28 | | [256, 512) 107 |@ | [512, 1K) 298 |@@@ | [1K, 2K) 613 |@@@@@@@ | [2K, 4K) 4435 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [4K, 8K) 442 |@@@@@ | [8K, 16K) 299 |@@@ | [16K, 32K) 100 |@ | [32K, 64K) 139 |@ | [64K, 128K) 56 | | [128K, 256K) 26 | | [256K, 512K) 2 | | In the while loop, we can check whether the TASK_KILLABLE signal is set, if so, we should break the loop. Signed-off-by: Chunxin Zang Signed-off-by: Muchun Song Signed-off-by: Andrew Morton Acked-by: Chris Down Acked-by: Michal Hocko Cc: Vlastimil Babka Cc: Matthew Wilcox Link: https://lkml.kernel.org/r/20200909152047.27905-1-zangchunxin@bytedance.com Signed-off-by: Linus Torvalds commit 0bf7b64e6e51eb69cf6fce7c9f7ff44840393e64 Author: Mike Kravetz Date: Tue Oct 13 16:56:42 2020 -0700 hugetlb: add lockdep check for i_mmap_rwsem held in huge_pmd_share As a debugging aid, huge_pmd_share should make sure i_mmap_rwsem is held if necessary. To clarify the 'if necessary', expand the comment block at the beginning of huge_pmd_share. No functional change. The added i_mmap_assert_locked() call is only enabled if CONFIG_LOCKDEP. Ideally, this should have been included with commit 34ae204f1851 ("hugetlbfs: remove call to huge_pte_alloc without i_mmap_rwsem"). Signed-off-by: Mike Kravetz Signed-off-by: Andrew Morton Cc: Matthew Wilcox Cc: Michal Hocko Cc: "Kirill A . Shutemov" Cc: Davidlohr Bueso Link: https://lkml.kernel.org/r/20200911201248.88537-1-mike.kravetz@oracle.com Signed-off-by: Linus Torvalds commit 6664bfc8e934dd008565510a41d86a552bd0bb00 Author: Wei Yang Date: Tue Oct 13 16:56:39 2020 -0700 mm/hugetlb: take the free hpage during the iteration directly Function dequeue_huge_page_node_exact() iterates the free list and return the first valid free hpage. Instead of break and check the loop variant, we could return in the loop directly. This could reduce some redundant check. [mike.kravetz@oracle.com: points out a logic error] [richard.weiyang@linux.alibaba.com: v4] Link: https://lkml.kernel.org/r/20200901014636.29737-8-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Cc: Baoquan He Cc: Mike Kravetz Cc: Vlastimil Babka Link: https://lkml.kernel.org/r/20200831022351.20916-8-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 2f37511cb6c2a59b67f8f13ad206a0298992eaf5 Author: Wei Yang Date: Tue Oct 13 16:56:36 2020 -0700 mm/hugetlb: narrow the hugetlb_lock protection area during preparing huge page set_hugetlb_cgroup_[rsvd] just manipulate page local data, which is not necessary to be protected by hugetlb_lock. Let's take this out. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Reviewed-by: Mike Kravetz Cc: Vlastimil Babka Link: https://lkml.kernel.org/r/20200831022351.20916-7-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 15a8d68e9dc23dc9def4bd7e9563db60f4f86580 Author: Wei Yang Date: Tue Oct 13 16:56:33 2020 -0700 mm/hugetlb: a page from buddy is not on any list The page allocated from buddy is not on any list, so just use list_add() is enough. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Reviewed-by: Mike Kravetz Cc: Vlastimil Babka Link: https://lkml.kernel.org/r/20200831022351.20916-6-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 972a3da355c947283f3d88fd1764f001730206f9 Author: Wei Yang Date: Tue Oct 13 16:56:30 2020 -0700 mm/hugetlb: count file_region to be added when regions_needed != NULL There are only two cases of function add_reservation_in_range() * count file_region and return the number in regions_needed * do the real list operation without counting This means it is not necessary to have two parameters to classify these two cases. Just use regions_needed to separate them. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Reviewed-by: Mike Kravetz Cc: Vlastimil Babka Link: https://lkml.kernel.org/r/20200831022351.20916-5-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit d3ec7b6e09e512ba902b86bcca2c512fb06d492f Author: Wei Yang Date: Tue Oct 13 16:56:27 2020 -0700 mm/hugetlb: use list_splice to merge two list at once Instead of add allocated file_region one by one to region_cache, we could use list_splice to merge two list at once. Also we know the number of entries in the list, increase the number directly. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Reviewed-by: Mike Kravetz Cc: Vlastimil Babka Link: https://lkml.kernel.org/r/20200831022351.20916-4-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit a1ddc2e8250eb550733a3f257ea299a84492d8a7 Author: Wei Yang Date: Tue Oct 13 16:56:23 2020 -0700 mm/hugetlb: remove VM_BUG_ON(!nrg) in get_file_region_entry_from_cache() We are sure to get a valid file_region, otherwise the VM_BUG_ON(resv->region_cache_count <= 0) at the very beginning would be triggered. Let's remove the redundant one. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Cc: Baoquan He Cc: Vlastimil Babka Link: https://lkml.kernel.org/r/20200831022351.20916-3-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 7db5e7b67e3e8d7aa96beb2a4551d211b76a05ba Author: Wei Yang Date: Tue Oct 13 16:56:20 2020 -0700 mm/hugetlb: not necessary to coalesce regions recursively Patch series "mm/hugetlb: code refine and simplification", v4. Following are some cleanups for hugetlb. Simple testing with tools/testing/selftests/vm/map_hugetlb passes. This patch (of 7): Per my understanding, we keep the regions ordered and would always coalesce regions properly. So the task to keep this property is just to coalesce its neighbour. Let's simplify this. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Reviewed-by: Mike Kravetz Cc: Vlastimil Babka Link: https://lkml.kernel.org/r/20200901014636.29737-1-richard.weiyang@linux.alibaba.com Link: https://lkml.kernel.org/r/20200831022351.20916-1-richard.weiyang@linux.alibaba.com Link: https://lkml.kernel.org/r/20200831022351.20916-2-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 540809be526724cfa8703d08b029d323fc123a41 Author: Baoquan He Date: Tue Oct 13 16:56:17 2020 -0700 doc/vm: fix typo in the hugetlb admin documentation Change 'pecify' to 'Specify'. Signed-off-by: Baoquan He Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Reviewed-by: David Hildenbrand Cc: Anshuman Khandual Link: https://lkml.kernel.org/r/20200723032248.24772-4-bhe@redhat.com Signed-off-by: Linus Torvalds commit d79d176a303775e2ccb16ca3c08bb63c030aa4dc Author: Baoquan He Date: Tue Oct 13 16:56:14 2020 -0700 mm/hugetlb.c: remove the unnecessary non_swap_entry() If a swap entry tests positive for either is_[migration|hwpoison]_entry(), then its swap_type() is among SWP_MIGRATION_READ, SWP_MIGRATION_WRITE and SWP_HWPOISON. All these types >= MAX_SWAPFILES, exactly what is asserted with non_swap_entry(). So the checking non_swap_entry() in is_hugetlb_entry_migration() and is_hugetlb_entry_hwpoisoned() is redundant. Let's remove it to optimize code. Signed-off-by: Baoquan He Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Reviewed-by: David Hildenbrand Reviewed-by: Anshuman Khandual Link: https://lkml.kernel.org/r/20200723032248.24772-3-bhe@redhat.com Signed-off-by: Linus Torvalds commit 3e5c36007e9c37378ff0bcaa2bc813d72c8659bc Author: Baoquan He Date: Tue Oct 13 16:56:10 2020 -0700 mm/hugetlb.c: make is_hugetlb_entry_hwpoisoned return bool Patch series "mm/hugetlb: Small cleanup and improvement", v2. This patch (of 3): Just like its neighbour is_hugetlb_entry_migration() has done. Signed-off-by: Baoquan He Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Reviewed-by: David Hildenbrand Reviewed-by: Anshuman Khandual Link: https://lkml.kernel.org/r/20200723032248.24772-1-bhe@redhat.com Link: https://lkml.kernel.org/r/20200723032248.24772-2-bhe@redhat.com Signed-off-by: Linus Torvalds commit ab00db216c9c78cc0a68bc4e27889c1ee374598d Author: Michal Hocko Date: Tue Oct 13 16:56:07 2020 -0700 include/linux/gfp.h: clarify usage of GFP_ATOMIC in !preemptible contexts There is a general understanding that GFP_ATOMIC/GFP_NOWAIT are to be used from atomic contexts. E.g. from within a spin lock or from the IRQ context. This is correct but there are some atomic contexts where the above doesn't hold. One of them would be an NMI context. Page allocator has never supported that and the general fear of this context didn't let anybody to actually even try to use the allocator there. Good, but let's be more specific about that. Another such a context, and that is where people seem to be more daring, is raw_spin_lock. Mostly because it simply resembles regular spin lock which is supported by the allocator and there is not any implementation difference with !RT kernels in the first place. Be explicit that such a context is not supported by the allocator. The underlying reason is that zone->lock would have to become raw_spin_lock as well and that has turned out to be a problem for RT (http://lkml.kernel.org/r/87mu305c1w.fsf@nanos.tec.linutronix.de). Signed-off-by: Michal Hocko Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Reviewed-by: Thomas Gleixner Reviewed-by: Uladzislau Rezki Cc: "Paul E. McKenney" Link: https://lkml.kernel.org/r/20200929123010.5137-1-mhocko@kernel.org Signed-off-by: Linus Torvalds commit e320d3012d25b1fb5f3df4edb7bd44a1c362ec10 Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:56:04 2020 -0700 mm/page_alloc.c: fix freeing non-compound pages Here is a very rare race which leaks memory: Page P0 is allocated to the page cache. Page P1 is free. Thread A Thread B Thread C find_get_entry(): xas_load() returns P0 Removes P0 from page cache P0 finds its buddy P1 alloc_pages(GFP_KERNEL, 1) returns P0 P0 has refcount 1 page_cache_get_speculative(P0) P0 has refcount 2 __free_pages(P0) P0 has refcount 1 put_page(P0) P1 is not freed Fix this by freeing all the pages in __free_pages() that won't be freed by the call to put_page(). It's usually not a good idea to split a page, but this is a very unlikely scenario. Fixes: e286781d5f2e ("mm: speculative page references") Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Acked-by: Mike Rapoport Cc: Nick Piggin Cc: Hugh Dickins Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/20200926213919.26642-1-willy@infradead.org Signed-off-by: Linus Torvalds commit a9b576f7253e22528584f5aeb46edf0b6b007992 Author: Ralph Campbell Date: Tue Oct 13 16:56:00 2020 -0700 mm: move call to compound_head() in release_pages() The function is_huge_zero_page() doesn't call compound_head() to make sure the page pointer is a head page. The call to is_huge_zero_page() in release_pages() is made before compound_head() is called so the test would fail if release_pages() was called with a tail page of the huge_zero_page and put_page_testzero() would be called releasing the page. This is unlikely to be happening in normal use or we would be seeing all sorts of process data corruption when accessing a THP zero page. Looking at other places where is_huge_zero_page() is called, all seem to only pass a head page so I think the right solution is to move the call to compound_head() in release_pages() to a point before calling is_huge_zero_page(). Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Yu Zhao Cc: Dan Williams Cc: Matthew Wilcox Cc: Christoph Hellwig Link: https://lkml.kernel.org/r/20200917173938.16420-1-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit 30d8ec73e8772b32a7eae626d14004bd37d8f13c Author: Mateusz Nosek Date: Tue Oct 13 16:55:57 2020 -0700 mmzone: clean code by removing unused macro parameter Previously 'for_next_zone_zonelist_nodemask' macro parameter 'zlist' was unused so this patch removes it. Signed-off-by: Mateusz Nosek Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200917211906.30059-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds commit 2187e17b02036ecd0ee83e225b28b968d3788a71 Author: Yanfei Xu Date: Tue Oct 13 16:55:54 2020 -0700 mm/page_alloc.c: __perform_reclaim should return 'unsigned long' __perform_reclaim()'s single caller expects it to return 'unsigned long', hence change its return value and a local variable to 'unsigned long'. Suggested-by: Andrew Morton Signed-off-by: Yanfei Xu Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200916022138.16740-1-yanfei.xu@windriver.com Signed-off-by: Linus Torvalds commit a0622d05374b61a37894df314c313736d1e17d0c Author: Mateusz Nosek Date: Tue Oct 13 16:55:51 2020 -0700 mm/page_alloc.c: clean code by merging two functions finalise_ac() is just 'epilogue' for 'prepare_alloc_pages'. Therefore there is no need to keep them both so 'finalise_ac' content can be merged into prepare_alloc_pages() code. It would make __alloc_pages_nodemask() cleaner when it comes to readability. Signed-off-by: Mateusz Nosek Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Mel Gorman Cc: Mike Rapoport Link: https://lkml.kernel.org/r/20200916110118.6537-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds commit fdd4fa1cd90441fd1d393e49c21c00ed73ef929c Author: Mateusz Nosek Date: Tue Oct 13 16:55:48 2020 -0700 mm/page_alloc.c: fix early params garbage value accesses Previously in '__init early_init_on_alloc' and '__init early_init_on_free' the return values from 'kstrtobool' were not handled properly. That caused potential garbage value read from variable 'bool_result'. Introduced patch fixes error handling. Signed-off-by: Mateusz Nosek Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200916214125.28271-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds commit cfb4a541918498016ea9fcd7c44fd87b99fb5701 Author: Mateusz Nosek Date: Tue Oct 13 16:55:45 2020 -0700 mm/page_alloc.c: micro-optimization remove unnecessary branch Previously flags check was separated into two separated checks with two separated branches. In case of presence of any of two mentioned flags, the same effect on flow occurs. Therefore checks can be merged and one branch can be avoided. Signed-off-by: Mateusz Nosek Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200911092310.31136-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds commit b630749f018c39f68e6ba0db95ac1cbd66cf0cbb Author: Mateusz Nosek Date: Tue Oct 13 16:55:42 2020 -0700 mm/page_alloc.c: clean code by removing unnecessary initialization Previously variable 'tmp' was initialized, but was not read later before reassigning. So the initialization can be removed. [akpm@linux-foundation.org: remove `tmp' altogether] Signed-off-by: Mateusz Nosek Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200904132422.17387-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds commit 6a654e36fa51a4ae1f109b0b30a23d3f097b3d8a Author: Li Xinhai Date: Tue Oct 13 16:55:39 2020 -0700 mm, isolation: avoid checking unmovable pages across pageblock boundary In has_unmovable_pages(), the page parameter would not always be the first page within a pageblock (see how the page pointer is passed in from start_isolate_page_range() after call __first_valid_page()), so that would cause checking unmovable pages span two pageblocks. After this patch, the checking is enforced within one pageblock no matter the page is first one or not, and obey the semantics of this function. This issue is found by code inspection. Michal said "this might lead to false negatives when an unrelated block would cause an isolation failure". Signed-off-by: Li Xinhai Signed-off-by: Andrew Morton Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: David Hildenbrand Link: https://lkml.kernel.org/r/20200824065811.383266-1-lixinhai.lxh@gmail.com Signed-off-by: Linus Torvalds commit 9181a980625a45425085ccec0fc38074a16470a5 Author: David Hildenbrand Date: Tue Oct 13 16:55:35 2020 -0700 mm: document semantics of ZONE_MOVABLE Let's document what ZONE_MOVABLE means, how it's used, and which special cases we have regarding unmovable pages (memory offlining vs. migration / allocations). Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Acked-by: Mike Rapoport Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Pankaj Gupta Cc: Baoquan He Cc: Jason Wang Cc: Qian Cai Link: http://lkml.kernel.org/r/20200816125333.7434-7-david@redhat.com Signed-off-by: Linus Torvalds commit 27f852795a0684781750b95141c6d88be102ca5b Author: David Hildenbrand Date: Tue Oct 13 16:55:31 2020 -0700 virtio-mem: don't special-case ZONE_MOVABLE When introducing virtio-mem, the semantics of ZONE_MOVABLE were rather unclear, which is why we special-cased ZONE_MOVABLE such that partially plugged blocks would never end up in ZONE_MOVABLE. Now that the semantics are much clearer (and will be documented in a follow-up patch including the new virtio-mem behavior), let's allow to online partially plugged memory blocks to ZONE_MOVABLE and also consider memory blocks that were onlined to ZONE_MOVABLE when unplugging memory. While unplugged memory pages are, in general, unmovable, they can be skipped when offlining memory. virtio-mem only unplugs fairly big chunks (in the megabyte range) and rather tries to shrink the memory region than randomly choosing memory. In theory, if all other pages in the movable zone would be movable, virtio-mem would only shrink that zone and not create any kind of fragmentation. In the future, we might want to remember the zone again and use the information when (un)plugging memory. For now, let's keep it simple. Note: Support for defragmentation is planned, to deal with fragmentation after unplug due to memory chunks within memory blocks that could not get unplugged before (e.g., somebody pinning pages within ZONE_MOVABLE for a longer time). Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Mike Kravetz Cc: Pankaj Gupta Cc: Baoquan He Cc: Mike Rapoport Cc: Qian Cai Link: http://lkml.kernel.org/r/20200816125333.7434-6-david@redhat.com Signed-off-by: Linus Torvalds commit 1c31cb493c31441562d1a548a4430aaa54157480 Author: David Hildenbrand Date: Tue Oct 13 16:55:28 2020 -0700 mm/page_isolation: cleanup set_migratetype_isolate() Let's clean it up a bit, simplifying the exit paths. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Reviewed-by: Pankaj Gupta Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Jason Wang Cc: Mike Rapoport Cc: Qian Cai Link: http://lkml.kernel.org/r/20200816125333.7434-5-david@redhat.com Signed-off-by: Linus Torvalds commit 48381d7e4c1fbbbd67993aef822f7f79ca3dc194 Author: David Hildenbrand Date: Tue Oct 13 16:55:24 2020 -0700 mm/page_isolation: drop WARN_ON_ONCE() in set_migratetype_isolate() Inside has_unmovable_pages(), we have a comment describing how unmovable data could end up in ZONE_MOVABLE - via "movablecore". Also, besides checking if the first page in the pageblock is reserved, we don't perform any further checks in case of ZONE_MOVABLE. In case of memory offlining, we set REPORT_FAILURE, properly dump_page() the page and handle the error gracefully. alloc_contig_pages() users currently never allocate from ZONE_MOVABLE. E.g., hugetlb uses alloc_contig_pages() for the allocation of gigantic pages only, which will never end up on the MOVABLE zone (see htlb_alloc_mask()). Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Pankaj Gupta Cc: Jason Wang Cc: Mike Rapoport Cc: Qian Cai Link: http://lkml.kernel.org/r/20200816125333.7434-4-david@redhat.com Signed-off-by: Linus Torvalds commit 51030a53d81e308f55e0e1d2048d23d8c8d16e5b Author: David Hildenbrand Date: Tue Oct 13 16:55:21 2020 -0700 mm/page_isolation: exit early when pageblock is isolated in set_migratetype_isolate() Right now, if we have two isolations racing on a pageblock that's in the MOVABLE zone, we would trigger the WARN_ON_ONCE(). Let's just return directly, simplifying error handling. The change was introduced in commit 3d680bdf60a5 ("mm/page_isolation: fix potential warning from user"). As far as I can see, we currently don't have alloc_contig_range() users that use the ZONE_MOVABLE (anymore), so it's currently more a cleanup and a preparation for the future than a fix. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Reviewed-by: Pankaj Gupta Acked-by: Mike Kravetz Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Qian Cai Cc: Jason Wang Cc: Mike Rapoport Link: http://lkml.kernel.org/r/20200816125333.7434-3-david@redhat.com Signed-off-by: Linus Torvalds commit c9c510dc2964420038f8527125a2cd5d8fb79cb6 Author: David Hildenbrand Date: Tue Oct 13 16:55:17 2020 -0700 mm/page_alloc: tweak comments in has_unmovable_pages() Patch series "mm / virtio-mem: support ZONE_MOVABLE", v5. When introducing virtio-mem, the semantics of ZONE_MOVABLE were rather unclear, which is why we special-cased ZONE_MOVABLE such that partially plugged blocks would never end up in ZONE_MOVABLE. Now that the semantics are much clearer (and are documented in patch #6), let's support partially plugged memory blocks in ZONE_MOVABLE, allowing partially plugged memory blocks to be online to ZONE_MOVABLE and also unplugging from such memory blocks. This avoids surprises when onlining of memory blocks suddenly fails, just because they are not completely populated by virtio-mem (yet). This is especially helpful for testing, but also paves the way for virtio-mem optimizations, allowing more memory to get reliably unplugged. Cleanup has_unmovable_pages() and set_migratetype_isolate(), providing better documentation of how ZONE_MOVABLE interacts with different kind of unmovable pages (memory offlining vs. alloc_contig_range()). This patch (of 6): Let's move the split comment regarding bootmem allocations and memory holes, especially in the context of ZONE_MOVABLE, to the PageReserved() check. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Pankaj Gupta Cc: Jason Wang Cc: Mike Rapoport Cc: Qian Cai Link: http://lkml.kernel.org/r/20200816125333.7434-1-david@redhat.com Link: http://lkml.kernel.org/r/20200816125333.7434-2-david@redhat.com Signed-off-by: Linus Torvalds commit be4f1ae978ffe98cc95ec49ceb95386fb4474974 Author: David Gow Date: Tue Oct 13 16:55:13 2020 -0700 mm: kasan: do not panic if both panic_on_warn and kasan_multishot set KASAN errors will currently trigger a panic when panic_on_warn is set. This renders kasan_multishot useless, as further KASAN errors won't be reported if the kernel has already paniced. By making kasan_multishot disable this behaviour for KASAN errors, we can still have the benefits of panic_on_warn for non-KASAN warnings, yet be able to use kasan_multishot. This is particularly important when running KASAN tests, which need to trigger multiple KASAN errors: previously these would panic the system if panic_on_warn was set, now they can run (and will panic the system should non-KASAN warnings show up). Signed-off-by: David Gow Signed-off-by: Andrew Morton Tested-by: Andrey Konovalov Reviewed-by: Andrey Konovalov Reviewed-by: Brendan Higgins Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Juri Lelli Cc: Patricia Alfonso Cc: Peter Zijlstra Cc: Shuah Khan Cc: Vincent Guittot Link: https://lkml.kernel.org/r/20200915035828.570483-6-davidgow@google.com Link: https://lkml.kernel.org/r/20200910070331.3358048-6-davidgow@google.com Signed-off-by: Linus Torvalds commit 9ab5be976898860f70f67257be725b891ded10ea Author: Patricia Alfonso Date: Tue Oct 13 16:55:09 2020 -0700 KASAN: Testing Documentation Include documentation on how to test KASAN using CONFIG_TEST_KASAN_KUNIT and CONFIG_TEST_KASAN_MODULE. Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Signed-off-by: Andrew Morton Tested-by: Andrey Konovalov Reviewed-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Acked-by: Brendan Higgins Cc: Andrey Ryabinin Cc: Ingo Molnar Cc: Juri Lelli Cc: Peter Zijlstra Cc: Shuah Khan Cc: Vincent Guittot Link: https://lkml.kernel.org/r/20200915035828.570483-5-davidgow@google.com Link: https://lkml.kernel.org/r/20200910070331.3358048-5-davidgow@google.com Signed-off-by: Linus Torvalds commit 73228c7ecc5e40c0851c4703c5ec6ed38123e989 Author: Patricia Alfonso Date: Tue Oct 13 16:55:06 2020 -0700 KASAN: port KASAN Tests to KUnit Transfer all previous tests for KASAN to KUnit so they can be run more easily. Using kunit_tool, developers can run these tests with their other KUnit tests and see "pass" or "fail" with the appropriate KASAN report instead of needing to parse each KASAN report to test KASAN functionalities. All KASAN reports are still printed to dmesg. Stack tests do not work properly when KASAN_STACK is enabled so those tests use a check for "if IS_ENABLED(CONFIG_KASAN_STACK)" so they only run if stack instrumentation is enabled. If KASAN_STACK is not enabled, KUnit will print a statement to let the user know this test was not run with KASAN_STACK enabled. copy_user_test and kasan_rcu_uaf cannot be run in KUnit so there is a separate test file for those tests, which can be run as before as a module. [trishalfonso@google.com: v14] Link: https://lkml.kernel.org/r/20200915035828.570483-4-davidgow@google.com Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Signed-off-by: Andrew Morton Tested-by: Andrey Konovalov Reviewed-by: Brendan Higgins Reviewed-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Ingo Molnar Cc: Juri Lelli Cc: Peter Zijlstra Cc: Shuah Khan Cc: Vincent Guittot Link: https://lkml.kernel.org/r/20200910070331.3358048-4-davidgow@google.com Signed-off-by: Linus Torvalds commit 83c4e7a0363bdb8104f510370907161623e31086 Author: Patricia Alfonso Date: Tue Oct 13 16:55:02 2020 -0700 KUnit: KASAN Integration Integrate KASAN into KUnit testing framework. - Fail tests when KASAN reports an error that is not expected - Use KUNIT_EXPECT_KASAN_FAIL to expect a KASAN error in KASAN tests - Expected KASAN reports pass tests and are still printed when run without kunit_tool (kunit_tool still bypasses the report due to the test passing) - KUnit struct in current task used to keep track of the current test from KASAN code Make use of "[PATCH v3 kunit-next 1/2] kunit: generalize kunit_resource API beyond allocated resources" and "[PATCH v3 kunit-next 2/2] kunit: add support for named resources" from Alan Maguire [1] - A named resource is added to a test when a KASAN report is expected - This resource contains a struct for kasan_data containing booleans representing if a KASAN report is expected and if a KASAN report is found [1] (https://lore.kernel.org/linux-kselftest/1583251361-12748-1-git-send-email-alan.maguire@oracle.com/T/#t) Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Signed-off-by: Andrew Morton Tested-by: Andrey Konovalov Reviewed-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Acked-by: Brendan Higgins Cc: Andrey Ryabinin Cc: Ingo Molnar Cc: Juri Lelli Cc: Peter Zijlstra Cc: Shuah Khan Cc: Vincent Guittot Link: https://lkml.kernel.org/r/20200915035828.570483-3-davidgow@google.com Link: https://lkml.kernel.org/r/20200910070331.3358048-3-davidgow@google.com Signed-off-by: Linus Torvalds commit 393824f650fabf6ea32bb09bea7acbc3a062dac8 Author: Patricia Alfonso Date: Tue Oct 13 16:54:58 2020 -0700 kasan/kunit: add KUnit Struct to Current Task Patch series "KASAN-KUnit Integration", v14. This patchset contains everything needed to integrate KASAN and KUnit. KUnit will be able to: (1) Fail tests when an unexpected KASAN error occurs (2) Pass tests when an expected KASAN error occurs Convert KASAN tests to KUnit with the exception of copy_user_test because KUnit is unable to test those. Add documentation on how to run the KASAN tests with KUnit and what to expect when running these tests. This patch (of 5): In order to integrate debugging tools like KASAN into the KUnit framework, add KUnit struct to the current task to keep track of the current KUnit test. Signed-off-by: Patricia Alfonso Signed-off-by: David Gow Signed-off-by: Andrew Morton Tested-by: Andrey Konovalov Reviewed-by: Brendan Higgins Cc: Brendan Higgins Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Cc: Shuah Khan Link: https://lkml.kernel.org/r/20200915035828.570483-1-davidgow@google.com Link: https://lkml.kernel.org/r/20200915035828.570483-2-davidgow@google.com Link: https://lkml.kernel.org/r/20200910070331.3358048-1-davidgow@google.com Link: https://lkml.kernel.org/r/20200910070331.3358048-2-davidgow@google.com Signed-off-by: Linus Torvalds commit 25356cfad69cd67cfaf0e703df6f888e9727b947 Author: Alexander Gordeev Date: Tue Oct 13 16:54:54 2020 -0700 docs/vm: fix 'mm_count' vs 'mm_users' counter confusion In the context of the anonymous address space lifespan description the 'mm_users' reference counter is confused with 'mm_count'. I.e a "zombie" mm gets released when "mm_count" becomes zero, not "mm_users". Signed-off-by: Alexander Gordeev Signed-off-by: Andrew Morton Cc: Jonathan Corbet Link: https://lkml.kernel.org/r/1597040695-32633-1-git-send-email-agordeev@linux.ibm.com Signed-off-by: Linus Torvalds commit 74640617e14fdae2cbac9dbd6fae38a811123e7d Author: Hui Su Date: Tue Oct 13 16:54:51 2020 -0700 mm/vmalloc.c: fix the comment of find_vm_area Fix the comment of find_vm_area() and get_vm_area() Signed-off-by: Hui Su Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200927153034.GA199877@rlk Signed-off-by: Linus Torvalds commit 82afbc32f22154d40f0bbbcfc7e18d2411f3dc92 Author: Hui Su Date: Tue Oct 13 16:54:48 2020 -0700 mm/vmalloc.c: update the comment in __vmalloc_area_node() Since c67dc624757 ("mm/vmalloc: do not call kmemleak_free() on not yet accounted memory"), the __vunmap() have been changed to __vfree(), so update the confusing comment(). Signed-off-by: Hui Su Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Roman Penyaev Link: https://lkml.kernel.org/r/20200927155409.GA3315@rlk Signed-off-by: Linus Torvalds commit 2c3125977ec1cb1ecb027727539049e277f42c25 Author: Alex Shi Date: Tue Oct 13 16:54:45 2020 -0700 mm/memory-failure.c: remove unused macro `writeback' Unlike others we don't use the marco writeback. so let's remove it to tame gcc warning: mm/memory-failure.c:827: warning: macro "writeback" is not used [-Wunused-macros] Signed-off-by: Alex Shi Signed-off-by: Andrew Morton Cc: Naoya Horiguchi Link: https://lkml.kernel.org/r/1599715096-20369-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Linus Torvalds commit c43bc03d0a872dcfcaaf1689c4f6140f9d3cb867 Author: Xianting Tian Date: Tue Oct 13 16:54:42 2020 -0700 mm/memory-failure: do pgoff calculation before for_each_process() There is no need to calculate pgoff in each loop of for_each_process(), so move it to the place before for_each_process(), which can save some CPU cycles. Signed-off-by: Xianting Tian Signed-off-by: Andrew Morton Acked-by: Naoya Horiguchi Link: http://lkml.kernel.org/r/20200818082647.34322-1-tian.xianting@h3c.com Signed-off-by: Linus Torvalds commit 41a04814a715ae561ac378587a8f7763f29beb4a Author: Andy Shevchenko Date: Tue Oct 13 16:54:38 2020 -0700 mm/dmapool.c: replace hard coded function name with __func__ No need to hard code function name when __func__ can be used. While here, replace specifiers for special types like dma_addr_t. Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton Cc: Matthew Wilcox Link: http://lkml.kernel.org/r/20200814135055.24898-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Torvalds commit 42286f83f80f58ae2cf3889d35cc60220df49cbb Author: Andy Shevchenko Date: Tue Oct 13 16:54:35 2020 -0700 mm/dmapool.c: replace open-coded list_for_each_entry_safe() There is a place in the code where open-coded version of list_for_each_entry_safe() is used. Replace that with the standard macro. Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton Cc: Matthew Wilcox Link: http://lkml.kernel.org/r/20200814135055.24898-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Torvalds commit 9b53122f616a74ddbbd6c97a3c8294c631a13d15 Author: Ralph Campbell Date: Tue Oct 13 16:54:32 2020 -0700 lib/test_hmm.c: remove unused dmirror_zero_page The variable dmirror_zero_page is unused in the HMM self test driver which was probably intended to demonstrate how a driver could use migrate_vma_setup() to share a single read-only device private zero page similar to how the CPU does. However, this isn't needed for the self tests so remove it. Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Cc: Jerome Glisse Link: https://lkml.kernel.org/r/20200914213801.16520-1-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit bfe18a0900f1188e323d3f2c3cd2d6dfe2d0789c Author: Ralph Campbell Date: Tue Oct 13 16:54:29 2020 -0700 tools/testing/selftests/vm/hmm-tests.c: use the new SKIP() macro Some tests might not be able to be run if resources like huge pages are not available. Mark these tests as skipped instead of simply passing. Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Reviewed-by: Jason Gunthorpe Cc: Jerome Glisse Cc: John Hubbard Cc: Shuah Khan Link: http://lkml.kernel.org/r/20200827190400.12608-1-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit f577e143d85aa7ea3d9c62c607ad00fc46a5730c Author: yuleixzhang Date: Tue Oct 13 16:54:25 2020 -0700 include/linux/huge_mm.h: remove mincore_huge_pmd declaration As mincore_huge_pmd() was dropped, remove the declaration from the header file. Signed-off-by: Yulei Zhang Signed-off-by: Andrew Morton Reviewed-by: Zi Yan Link: https://lkml.kernel.org/r/20200922083423.15074-1-yuleixzhang@tencent.com Signed-off-by: Linus Torvalds commit c78f463649d60f4ed12df97a32def4d77b583853 Author: Peter Xu Date: Tue Oct 13 16:54:21 2020 -0700 mm: remove src/dst mm parameter in copy_page_range() Both of the mm pointers are not needed after commit 7a4830c380f3 ("mm/fork: Pass new vma pointer into copy_page_range()"). Jason Gunthorpe also reported that the ordering of copy_page_range() is odd. Since working at it, reorder the parameters to be logical, by (1) always put the dst_* fields to be before src_* fields, and (2) keep the same type of parameters together. [peterx@redhat.com: further reorder some parameters and line format, per Jason] Link: https://lkml.kernel.org/r/20201002192647.7161-1-peterx@redhat.com [peterx@redhat.com: fix warnings] Link: https://lkml.kernel.org/r/20201006200138.GA6026@xz-x1 Reported-by: Kirill A. Shutemov Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Reviewed-by: Jason Gunthorpe Acked-by: Kirill A. Shutemov Link: https://lkml.kernel.org/r/20200930204950.6668-1-peterx@redhat.com Signed-off-by: Linus Torvalds commit 8332326e8e47fbc35711433419c31f610153dd58 Author: Liao Pingfang Date: Tue Oct 13 16:54:18 2020 -0700 mm/mmap.c: replace do_brk with do_brk_flags in comment of insert_vm_struct() Replace do_brk with do_brk_flags in comment of insert_vm_struct(), since do_brk was removed in following commit. Fixes: bb177a732c4369 ("mm: do not bug_on on incorrect length in __mm_populate()") Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/1600650778-43230-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Linus Torvalds commit cb48841fbf4ed6f5e001a79af4c2486028dfb291 Author: Miaohe Lin Date: Tue Oct 13 16:54:14 2020 -0700 mm/mmap.c: use helper function allow_write_access() in __remove_shared_vm_struct() In commit 1da177e4c3f4 ("Linux-2.6.12-rc2"), the helper allow_write_access came with the atomic_inc operation of the i_writecount field in the func __remove_shared_vm_struct(). But it forgot to use this helper function. Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200921115814.39680-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit cf508b58457cfe51b168d49ea6c79a221900d354 Author: Miaohe Lin Date: Tue Oct 13 16:54:10 2020 -0700 mm: use helper function mapping_allow_writable() Commit 4bb5f5d9395b ("mm: allow drivers to prevent new writable mappings") changed i_mmap_writable from unsigned int to atomic_t and add the helper function mapping_allow_writable() to atomic_inc i_mmap_writable. But it forgot to use this helper function in dup_mmap() and __vma_link_file(). Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Cc: Christian Brauner Cc: Ingo Molnar Cc: Peter Zijlstra Cc: "Eric W. Biederman" Cc: Christian Kellner Cc: Suren Baghdasaryan Cc: Adrian Reber Cc: Shakeel Butt Cc: Aleksa Sarai Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20200917112736.7789-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit 0fc48a6e213ab8e4033d26bd8333ee8558f210f6 Author: Wei Yang Date: Tue Oct 13 16:54:07 2020 -0700 mm/mmap: check on file instead of the rb_root_cached of its address_space In __vma_adjust(), we do the check on *root* to decide whether to adjust the address_space. It seems to be more meaningful to do the check on *file* itself. This means we are adjusting some data because it is a file backed vma. Since we seem to assume the address_space is valid if it is a file backed vma, let's just replace *root* with *file* here. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200913133631.37781-2-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 808fbdbea05f1e965da5b887d808025ba22c1946 Author: Wei Yang Date: Tue Oct 13 16:54:04 2020 -0700 mm/mmap: not necessary to check mapping separately *root* with type of struct rb_root_cached is an element of *mapping* with type of struct address_space. This implies when we have a valid *root* it must be a part of valid *mapping*. So we can merge these two checks together to make the code more easy to read and to save some cpu cycles. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200913133631.37781-1-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit f1dc1685f6ca25d435d58d16e53bb6f336f54cac Author: Randy Dunlap Date: Tue Oct 13 16:54:01 2020 -0700 mm/memory.c: fix spello of "function" Fix typo/spello of "function". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/e7bf180e-c558-b1d5-9a15-6d9708823c9c@infradead.org Signed-off-by: Linus Torvalds commit f9d86a60572295ebb53c87a4305dc89b487711bd Author: Wei Yang Date: Tue Oct 13 16:53:57 2020 -0700 mm/mmap: leave adjust_next as virtual address instead of page frame number Instead of converting adjust_next between bytes and pages number, let's just store the virtual address into adjust_next. Also, this patch fixes one typo in the comment of vma_adjust_trans_huge(). [vbabka@suse.cz: changelog tweak] Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Mike Kravetz Link: http://lkml.kernel.org/r/20200828081031.11306-1-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit a08d93e5752a35a771054f6c463f789720f9a3e8 Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:53:54 2020 -0700 mm: simplify PageDoubleMap with PF_SECOND policy Introduce the new page policy of PF_SECOND which lets us use the normal pageflags generation machinery to create the various DoubleMap manipulation functions. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: Zi Yan Link: https://lkml.kernel.org/r/20200629151933.15671-3-willy@infradead.org Signed-off-by: Linus Torvalds commit e18c45ffcfa347b13c2f300f290bacff55a4b41e Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:53:50 2020 -0700 mm: move PageDoubleMap bit Patch series "Fix PageDoubleMap". This is a purely theoretical problem for now as none of the filesystems which use PG_private_2 (ie PG_fscache) are being converted at this time, but it's confusing to leave it like this. This patch (of 2): PG_private_2 is defined as being PF_ANY (applicable to tail pages as well as regular & head pages). That means that the first tail page of a double-map page will appear to have Private2 set. Use the Workingset bit instead which is defined as PF_HEAD so any attempt to access the Workingset bit on a tail page will redirect to the head page's Workingset bit. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: Zi Yan Link: https://lkml.kernel.org/r/20200629151933.15671-1-willy@infradead.org Link: https://lkml.kernel.org/r/20200629151933.15671-2-willy@infradead.org Signed-off-by: Linus Torvalds commit ff9f47f6f00cfe1625a06a136e286a47c9483b2e Author: Chinwen Chang Date: Tue Oct 13 16:53:47 2020 -0700 mm: proc: smaps_rollup: do not stall write attempts on mmap_lock smaps_rollup will try to grab mmap_lock and go through the whole vma list until it finishes the iterating. When encountering large processes, the mmap_lock will be held for a longer time, which may block other write requests like mmap and munmap from progressing smoothly. There are upcoming mmap_lock optimizations like range-based locks, but the lock applied to smaps_rollup would be the coarse type, which doesn't avoid the occurrence of unpleasant contention. To solve aforementioned issue, we add a check which detects whether anyone wants to grab mmap_lock for write attempts. Signed-off-by: Chinwen Chang Signed-off-by: Andrew Morton Cc: Steven Price Cc: Michel Lespinasse Cc: Matthias Brugger Cc: Vlastimil Babka Cc: Daniel Jordan Cc: Davidlohr Bueso Cc: Chinwen Chang Cc: Alexey Dobriyan Cc: "Matthew Wilcox (Oracle)" Cc: Jason Gunthorpe Cc: Song Liu Cc: Jimmy Assarsson Cc: Huang Ying Cc: Daniel Kiss Cc: Laurent Dufour Link: http://lkml.kernel.org/r/1597715898-3854-4-git-send-email-chinwen.chang@mediatek.com Signed-off-by: Linus Torvalds commit 03b4b1149308b0f0d76075a25d4100f684bef326 Author: Chinwen Chang Date: Tue Oct 13 16:53:43 2020 -0700 mm: smaps*: extend smap_gather_stats to support specified beginning Extend smap_gather_stats to support indicated beginning address at which it should start gathering. To achieve the goal, we add a new parameter @start assigned by the caller and try to refactor it for simplicity. If @start is 0, it will use the range of @vma for gathering. Signed-off-by: Chinwen Chang Signed-off-by: Andrew Morton Reviewed-by: Steven Price Cc: Michel Lespinasse Cc: Alexey Dobriyan Cc: Daniel Jordan Cc: Daniel Kiss Cc: Davidlohr Bueso Cc: Huang Ying Cc: Jason Gunthorpe Cc: Jimmy Assarsson Cc: Laurent Dufour Cc: "Matthew Wilcox (Oracle)" Cc: Matthias Brugger Cc: Song Liu Cc: Vlastimil Babka Link: http://lkml.kernel.org/r/1597715898-3854-3-git-send-email-chinwen.chang@mediatek.com Signed-off-by: Linus Torvalds commit 07e5bfe651f8595ca6a777d989016aa8d8217924 Author: Chinwen Chang Date: Tue Oct 13 16:53:39 2020 -0700 mmap locking API: add mmap_lock_is_contended() Patch series "Try to release mmap_lock temporarily in smaps_rollup", v4. Recently, we have observed some janky issues caused by unpleasantly long contention on mmap_lock which is held by smaps_rollup when probing large processes. To address the problem, we let smaps_rollup detect if anyone wants to acquire mmap_lock for write attempts. If yes, just release the lock temporarily to ease the contention. smaps_rollup is a procfs interface which allows users to summarize the process's memory usage without the overhead of seq_* calls. Android uses it to sample the memory usage of various processes to balance its memory pool sizes. If no one wants to take the lock for write requests, smaps_rollup with this patch will behave like the original one. Although there are on-going mmap_lock optimizations like range-based locks, the lock applied to smaps_rollup would be the coarse one, which is hard to avoid the occurrence of aforementioned issues. So the detection and temporary release for write attempts on mmap_lock in smaps_rollup is still necessary. This patch (of 3): Add new API to query if someone wants to acquire mmap_lock for write attempts. Using this instead of rwsem_is_contended makes it more tolerant of future changes to the lock type. Signed-off-by: Chinwen Chang Signed-off-by: Andrew Morton Reviewed-by: Steven Price Acked-by: Michel Lespinasse Cc: Alexey Dobriyan Cc: Daniel Jordan Cc: Daniel Kiss Cc: Davidlohr Bueso Cc: Huang Ying Cc: Jason Gunthorpe Cc: Jimmy Assarsson Cc: Laurent Dufour Cc: "Matthew Wilcox (Oracle)" Cc: Matthias Brugger Cc: Song Liu Cc: Vlastimil Babka Link: http://lkml.kernel.org/r/1597715898-3854-1-git-send-email-chinwen.chang@mediatek.com Link: http://lkml.kernel.org/r/1597715898-3854-2-git-send-email-chinwen.chang@mediatek.com Signed-off-by: Linus Torvalds commit 4d1e72437b92598fa371120aade3f7805114bb16 Author: Wei Yang Date: Tue Oct 13 16:53:35 2020 -0700 mm/mmap: leverage vma_rb_erase_ignore() to implement vma_rb_erase() These two functions share the same logic except ignore a different vma. Let's reuse the code. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200809232057.23477-2-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 7c61f917b1617d5d1920f47d134de0b3401dc93a Author: Wei Yang Date: Tue Oct 13 16:53:32 2020 -0700 mm/mmap: rename __vma_unlink_common() to __vma_unlink() __vma_unlink_common() and __vma_unlink() are counterparts. Since there is no function named __vma_unlink(), let's rename __vma_unlink_common() to __vma_unlink() to make the code more self-explanatory and easy for audience to understand. Otherwise we may expect there are several variants of vma_unlink() and __vma_unlink_common() is used by them. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200809232057.23477-1-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit a7069ee3f891b22727303dfe0857ae47ef0c4936 Author: Yanfei Xu Date: Tue Oct 13 16:53:29 2020 -0700 mm/memory.c: replace vmf->vma with variable vma The code has declared a vma_struct named vma which is assigned a value of vmf->vma. Thus, use variable vma directly here. Signed-off-by: Yanfei Xu Signed-off-by: Andrew Morton Reviewed-by: Matthew Wilcox (Oracle) Link: http://lkml.kernel.org/r/20200818084607.37616-1-yanfei.xu@windriver.com Signed-off-by: Linus Torvalds commit d383807aaf7796d328a43f20b98b99c2fcc664d7 Author: Yanfei Xu Date: Tue Oct 13 16:53:26 2020 -0700 mm/memory.c: fix typo in __do_fault() comment It's "pte_alloc_one", not "pte_alloc_pne". Let's fix that. Signed-off-by: Yanfei Xu Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Link: http://lkml.kernel.org/r/20200818104339.5310-1-yanfei.xu@windriver.com Signed-off-by: Linus Torvalds commit b2b29d6d01194404dfef4eafa026959be301705b Author: Matthew Wilcox Date: Tue Oct 13 16:53:22 2020 -0700 mm: account PMD tables like PTE tables We account the PTE level of the page tables to the process in order to make smarter OOM decisions and help diagnose why memory is fragmented. For these same reasons, we should account pages allocated for PMDs. With larger process address spaces and ASLR, the number of PMDs in use is higher than it used to be so the inaccuracy is starting to matter. [rppt@linux.ibm.com: arm: __pmd_free_tlb(): call page table destructor] Link: https://lkml.kernel.org/r/20200825111303.GB69694@linux.ibm.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: Mike Rapoport Cc: Abdul Haleem Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Christophe Leroy Cc: Joerg Roedel Cc: Max Filippov Cc: Peter Zijlstra Cc: Satheesh Rajendran Cc: Stafford Horne Cc: Naresh Kamboju Cc: Anders Roxell Link: http://lkml.kernel.org/r/20200627184642.GF25039@casper.infradead.org Signed-off-by: Linus Torvalds commit 34d109131f485eccd3f7e3050581eb73bffa3520 Author: John Hubbard Date: Tue Oct 13 16:53:19 2020 -0700 selftests/vm: fix incorrect gcc invocation in some cases Avoid accidental wrong builds, due to built-in rules working just a little bit too well--but not quite as well as required for our situation here. In other words, "make userfaultfd" (for example) is supposed to fail to build at all, because this Makefile only supports either "make" (all), or "make /full/path". However, the built-in rules, if not suppressed, will pick up CFLAGS and the initial LDLIBS (but not the target-specific LDLIBS, because those are only set for the full path target!). This causes it to get pretty far into building things despite using incorrect values such as an *occasionally* incomplete LDLIBS value. Signed-off-by: John Hubbard Signed-off-by: Andrew Morton Cc: Shuah Khan Cc: Jason Gunthorpe Link: https://lkml.kernel.org/r/20200915012901.1655280-3-jhubbard@nvidia.com Signed-off-by: Linus Torvalds commit efc9511cecf617c828734024f4e1cde5f974f510 Author: John Hubbard Date: Tue Oct 13 16:53:16 2020 -0700 selftests/vm: fix false build success on the second and later attempts Patch series "selftests/vm: fix some minor aggravating factors in the Makefile". This fixes a couple of minor aggravating factors that I ran across while trying to do some changes in selftests/vm. These are simple things, but like most things with GNU Make, it's rarely obvious what's wrong until you understand *the entire Makefile and all of its includes*. So while there is, of course, joy in learning those details, I thought I'd fix these little things, so as to allow others to skip out on the Joy if they so choose. :) First of all, if you have an item (let's choose userfaultfd for an example) that fails to build, you might do this: $ make -j32 # ...you observe a failed item in the threaded output # OK, let's get a closer look $ make # ...but now the build quietly "succeeds". That's what Patch 0001 fixes. Second, if you instead attempt this approach for your closer look (a casual mistake, as it's not supported): $ make userfaultfd # ...userfaultfd fails to link, due to incomplete LDLIBS That's what Patch 0002 fixes. This patch (of 2): If one or more of these selftest fail to build, then after the first failure, subsequent invocations of "make" will make it appear that there are no build failures, after all. That's because the failed build products remain, with up-to-date timestamps, thus tricking Make (and you!) into believing that there's nothing else to build. Fix this by telling Make to delete targets that didn't completely succeed. Signed-off-by: John Hubbard Signed-off-by: Andrew Morton Cc: Shuah Khan Cc: Jason Gunthorpe Link: https://lkml.kernel.org/r/20200915012901.1655280-1-jhubbard@nvidia.com Link: https://lkml.kernel.org/r/20200915012901.1655280-2-jhubbard@nvidia.com Signed-off-by: Linus Torvalds commit 9a137153fc8798a89d8fce895cd0a06ea5b8e37c Author: Ralph Campbell Date: Tue Oct 13 16:53:13 2020 -0700 mm/memcg: fix device private memcg accounting The code in mc_handle_swap_pte() checks for non_swap_entry() and returns NULL before checking is_device_private_entry() so device private pages are never handled. Fix this by checking for non_swap_entry() after handling device private swap PTEs. I assume the memory cgroup accounting would be off somehow when moving a process to another memory cgroup. Currently, the device private page is charged like a normal anonymous page when allocated and is uncharged when the page is freed so I think that path is OK. Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Jerome Glisse Cc: Balbir Singh Cc: Ira Weiny Link: https://lkml.kernel.org/r/20201009215952.2726-1-rcampbell@nvidia.com xFixes: c733a82874a7 ("mm/memcontrol: support MEMORY_DEVICE_PRIVATE") Signed-off-by: Linus Torvalds commit d1b2cf6cb84a9bd0de6f151512648dd1af82f80f Author: Bharata B Rao Date: Tue Oct 13 16:53:09 2020 -0700 mm: memcg/slab: uncharge during kmem_cache_free_bulk() Object cgroup charging is done for all the objects during allocation, but during freeing, uncharging ends up happening for only one object in the case of bulk allocation/freeing. Fix this by having a separate call to uncharge all the objects from kmem_cache_free_bulk() and by modifying memcg_slab_free_hook() to take care of bulk uncharging. Fixes: 964d4bd370d5 ("mm: memcg/slab: save obj_cgroup for non-root slab objects" Signed-off-by: Bharata B Rao Signed-off-by: Andrew Morton Acked-by: Roman Gushchin Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Vlastimil Babka Cc: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Cc: Link: https://lkml.kernel.org/r/20201009060423.390479-1-bharata@linux.ibm.com Signed-off-by: Linus Torvalds commit 7a52d4d88ade00c99db007708bbcc5b9311f9ea4 Author: Miaohe Lin Date: Tue Oct 13 16:53:05 2020 -0700 mm: memcontrol: reword obsolete comment of mem_cgroup_unmark_under_oom() Since commit 79dfdaccd1d5 ("memcg: make oom_lock 0 and 1 based rather than counter"), the mem_cgroup_unmark_under_oom() is added and the comment of the mem_cgroup_oom_unlock() is moved here. But this comment make no sense here because mem_cgroup_oom_lock() does not operate on under_oom field. So we reword the comment as this would be helpful. [Thanks Michal Hocko for rewording this comment.] Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Link: https://lkml.kernel.org/r/20200930095336.21323-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit d437024e69b8c005d4eec65ee075d6725b4b8e58 Author: Miaohe Lin Date: Tue Oct 13 16:53:02 2020 -0700 mm/page_counter: correct the obsolete func name in the comment of page_counter_try_charge() Since commit bbec2e15170a ("mm: rename page_counter's count/limit into usage/max"), page_counter_limit() is renamed to page_counter_set_max(). So replace page_counter_limit with page_counter_set_max in comment. Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Cc: Roman Gushchin Cc: Johannes Weiner Link: https://lkml.kernel.org/r/20200917113629.14382-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit 5f9a4f4a709608fc15197368464a6c8ed4e3630a Author: Muchun Song Date: Tue Oct 13 16:52:59 2020 -0700 mm: memcontrol: add the missing numa_stat interface for cgroup v2 In the cgroup v1, we have a numa_stat interface. This is useful for providing visibility into the numa locality information within an memcg since the pages are allowed to be allocated from any physical node. One of the use cases is evaluating application performance by combining this information with the application's CPU allocation. But the cgroup v2 does not. So this patch adds the missing information. Suggested-by: Shakeel Butt Signed-off-by: Muchun Song Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Cc: Zefan Li Cc: Johannes Weiner Cc: Jonathan Corbet Cc: Michal Hocko Cc: Vladimir Davydov Cc: Roman Gushchin Cc: Randy Dunlap Link: https://lkml.kernel.org/r/20200916100030.71698-2-songmuchun@bytedance.com Signed-off-by: Linus Torvalds commit bd0b230fe14554bfffbae54e19038716f96f5a41 Author: Waiman Long Date: Tue Oct 13 16:52:56 2020 -0700 mm/memcg: unify swap and memsw page counters The swap page counter is v2 only while memsw is v1 only. As v1 and v2 controllers cannot be active at the same time, there is no point to keep both swap and memsw page counters in mem_cgroup. The previous patch has made sure that memsw page counter is updated and accessed only when in v1 code paths. So it is now safe to alias the v1 memsw page counter to v2 swap page counter. This saves 14 long's in the size of mem_cgroup. This is a saving of 112 bytes for 64-bit archs. While at it, also document which page counters are used in v1 and/or v2. Signed-off-by: Waiman Long Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Cc: Chris Down Cc: Johannes Weiner Cc: Roman Gushchin Cc: Tejun Heo Cc: Vladimir Davydov Cc: Yafang Shao Link: https://lkml.kernel.org/r/20200914024452.19167-4-longman@redhat.com Signed-off-by: Linus Torvalds commit 8d387a5f172f26ff8c76096d5876b881dec6b7ce Author: Waiman Long Date: Tue Oct 13 16:52:52 2020 -0700 mm/memcg: simplify mem_cgroup_get_max() mem_cgroup_get_max() used to get memory+swap max from both the v1 memsw and v2 memory+swap page counters & return the maximum of these 2 values. This is redundant and it is more efficient to just get either the v1 or the v2 values depending on which one is currently in use. [longman@redhat.com: v4] Link: https://lkml.kernel.org/r/20200914150928.7841-1-longman@redhat.com Signed-off-by: Waiman Long Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Cc: Chris Down Cc: Johannes Weiner Cc: Roman Gushchin Cc: Tejun Heo Cc: Vladimir Davydov Cc: Yafang Shao Link: https://lkml.kernel.org/r/20200914024452.19167-3-longman@redhat.com Signed-off-by: Linus Torvalds commit f9f84ec56f7e370cc6fc478b7d09fbf41de970ea Author: Waiman Long Date: Tue Oct 13 16:52:49 2020 -0700 mm/memcg: clean up obsolete enum charge_type Patch series "mm/memcg: Miscellaneous cleanups and streamlining", v2. This patch (of 3): Since commit 0a31bc97c80c ("mm: memcontrol: rewrite uncharge API") and commit 00501b531c47 ("mm: memcontrol: rewrite charge API") in v3.17, the enum charge_type was no longer used anywhere. However, the enum itself was not removed at that time. Remove the obsolete enum charge_type now. Signed-off-by: Waiman Long Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: Chris Down Cc: Vladimir Davydov Cc: Tejun Heo Cc: Roman Gushchin Cc: Yafang Shao Link: https://lkml.kernel.org/r/20200914024452.19167-1-longman@redhat.com Link: https://lkml.kernel.org/r/20200914024452.19167-2-longman@redhat.com Signed-off-by: Linus Torvalds commit 05bdc520b3ad39d216efc52112bc59be2e975299 Author: Miaohe Lin Date: Tue Oct 13 16:52:45 2020 -0700 mm: memcontrol: correct the comment of mem_cgroup_iter() Since commit bbec2e15170a ("mm: rename page_counter's count/limit into usage/max"), the arg @reclaim has no priority field anymore. Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Link: https://lkml.kernel.org/r/20200913094129.44558-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit 19b629c9795bfe67bf77be8fb611b84424b56d91 Author: Roman Gushchin Date: Tue Oct 13 16:52:42 2020 -0700 mm: memcg/slab: fix racy access to page->mem_cgroup in mem_cgroup_from_obj() mem_cgroup_from_obj() checks the lowest bit of the page->mem_cgroup pointer to determine if the page has an attached obj_cgroup vector instead of a regular memcg pointer. If it's not set, it simple returns the page->mem_cgroup value as a struct mem_cgroup pointer. The commit 10befea91b61 ("mm: memcg/slab: use a single set of kmem_caches for all allocations") changed the moment when this bit is set: if previously it was set on the allocation of the slab page, now it can be set well after, when the first accounted object is allocated on this page. It opened a race: if page->mem_cgroup is set concurrently after the first page_has_obj_cgroups(page) check, a pointer to the obj_cgroups array can be returned as a memory cgroup pointer. A simple check for page->mem_cgroup pointer for NULL before the page_has_obj_cgroups() check fixes the race. Indeed, if the pointer is not NULL, it's either a simple mem_cgroup pointer or a pointer to obj_cgroup vector. The pointer can be asynchronously changed from NULL to (obj_cgroup_vec | 0x1UL), but can't be changed from a valid memcg pointer to objcg vector or back. If the object passed to mem_cgroup_from_obj() is a slab object and page->mem_cgroup is NULL, it means that the object is not accounted, so the function must return NULL. I've discovered the race looking at the code, so far I haven't seen it in the wild. Fixes: 10befea91b61 ("mm: memcg/slab: use a single set of kmem_caches for all allocations") Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Cc: Johannes Weiner Cc: Vlastimil Babka Link: https://lkml.kernel.org/r/20200910022435.2773735-1-guro@fb.com Signed-off-by: Linus Torvalds commit 61e604e636ab9614de49df9149ef92cae17e9701 Author: Gustavo A. R. Silva Date: Tue Oct 13 16:52:39 2020 -0700 mm: memcontrol: use the preferred form for passing the size of a structure type Use the preferred form for passing the size of a structure type. The alternative form where the structure type is spelled out hurts readability and introduces an opportunity for a bug when the object type is changed but the corresponding object identifier to which the sizeof operator is applied is not. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Link: https://lkml.kernel.org/r/773e013ff2f07fe2a0b47153f14dea054c0c04f1.1596214831.git.gustavoars@kernel.org Signed-off-by: Linus Torvalds commit e90342e6d26ab6d1c38c8f5804492d76e3e9b4e9 Author: Gustavo A. R. Silva Date: Tue Oct 13 16:52:36 2020 -0700 mm: memcontrol: use flex_array_size() helper in memcpy() Make use of the flex_array_size() helper to calculate the size of a flexible array member within an enclosing structure. This helper offers defense-in-depth against potential integer overflows, while at the same time makes it explicitly clear that we are dealing with a flexible array member. Also, remove unnecessary braces. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Link: https://lkml.kernel.org/r/ddd60dae2d9aea1ccdd2be66634815c93696125e.1596214831.git.gustavoars@kernel.org Signed-off-by: Linus Torvalds commit 433e7d3177544c8cf0b6375abd310b0ef023fe9d Author: Ira Weiny Date: Tue Oct 13 16:52:33 2020 -0700 mm/memremap.c: convert devmap static branch to {inc,dec} While reviewing Protection Key Supervisor support it was pointed out that using a counter to track static branch enable was an anti-pattern which was better solved using the provided static_branch_{inc,dec} functions.[1] Fix up devmap_managed_key to work the same way. Also this should be safer because there is a very small (very unlikely) race when multiple callers try to enable at the same time. [1] https://lore.kernel.org/lkml/20200714194031.GI5523@worktop.programming.kicks-ass.net/ Signed-off-by: Ira Weiny Signed-off-by: Andrew Morton Reviewed-by: William Kucharski Cc: Dan Williams Cc: Vishal Verma Link: https://lkml.kernel.org/r/20200810235319.2796597-1-ira.weiny@intel.com Signed-off-by: Linus Torvalds commit 822bca52ee7eb279acfba261a423ed7ac47d6f73 Author: Miaohe Lin Date: Tue Oct 13 16:52:30 2020 -0700 mm/swapfile.c: fix potential memory leak in sys_swapon If we failed to drain inode, we would forget to free the swap address space allocated by init_swap_address_space() above. Fixes: dc617f29dbe5 ("vfs: don't allow writes to swap files") Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Reviewed-by: Darrick J. Wong Link: https://lkml.kernel.org/r/20200930101803.53884-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit 7a3d52e45e00dd1cb1f2e81661e53e324e0a7b82 Author: Miaohe Lin Date: Tue Oct 13 16:52:27 2020 -0700 mm/swapfile.c: remove unnecessary goto out in _swap_info_get() It's unnecessary to goto the out label while out label is just below. Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200930102549.1885-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit 12eab4289d3203be384d0c0733670c2c9daa1880 Author: Miaohe Lin Date: Tue Oct 13 16:52:24 2020 -0700 mm/swap.c: fix incomplete comment in lru_cache_add_inactive_or_unevictable() Since commit 9c4e6b1a7027 ("mm, mlock, vmscan: no more skipping pagevecs"), unevictable pages do not goes directly back onto zone's unevictable list. Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Cc: Shakeel Butt Link: https://lkml.kernel.org/r/20200927122209.59328-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit 548d9782bd844048bc6b5159c848772a5fe3da32 Author: Miaohe Lin Date: Tue Oct 13 16:52:21 2020 -0700 mm/page_io.c: remove useless out label in __swap_writepage() The out label is only used in one place and return ret directly without something like resource cleanup or lock release and so on. So we should remove this jump label and do some cleanup. Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: https://lkml.kernel.org/r/20200927124032.22521-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit f3bc52cb04bcfccd12da3f03ca8bc50484898436 Author: Miaohe Lin Date: Tue Oct 13 16:52:18 2020 -0700 mm/swap_slots.c: remove always zero and unused return value of enable_swap_slots_cache() enable_swap_slots_cache() always return zero and its return value is just ignored by the caller. So make enable_swap_slots_cache() void. Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200924113554.50614-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit a3e7bea060724c760906218f1c232c75ecb0c767 Author: Miaohe Lin Date: Tue Oct 13 16:52:15 2020 -0700 mm/swap.c: fix confusing comment in release_pages() Since commit 07d802699528 ("mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages"), we have renamed the func put_devmap_managed_page() to page_is_devmap_managed(). Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Cc: John Hubbard Link: https://lkml.kernel.org/r/20200905084453.19353-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit 6f4dd8de4835563de9bae797ce1d7a13465a7a7d Author: Yu Zhao Date: Tue Oct 13 16:52:11 2020 -0700 mm: remove superfluous __ClearPageActive() To activate a page, mark_page_accessed() always holds a reference on it. It either gets a new reference when adding a page to lru_pvecs.activate_page or reuses an existing one it previously got when it added a page to lru_pvecs.lru_add. So it doesn't call SetPageActive() on a page that doesn't have any reference left. Therefore, the race is impossible these days (I didn't brother to dig into its history). For other paths, namely reclaim and migration, a reference count is always held while calling SetPageActive() on a page. SetPageSlabPfmemalloc() also uses SetPageActive(), but it's irrelevant to LRU pages. Signed-off-by: Yu Zhao Signed-off-by: Andrew Morton Reviewed-by: Yang Shi Cc: Alexander Duyck Cc: David Hildenbrand Cc: Huang Ying Cc: Hugh Dickins Cc: Joonsoo Kim Cc: Mel Gorman Cc: Michal Hocko Cc: Nicholas Piggin Cc: Qian Cai Link: http://lkml.kernel.org/r/20200818184704.3625199-2-yuzhao@google.com Signed-off-by: Linus Torvalds commit cc2828b21c764f901128ca2e7b9f056d0e72104f Author: Yu Zhao Date: Tue Oct 13 16:52:08 2020 -0700 mm: remove activate_page() from unuse_pte() We don't initially add anon pages to active lruvec after commit b518154e59aa ("mm/vmscan: protect the workingset on anonymous LRU"). Remove activate_page() from unuse_pte(), which seems to be missed by the commit. And make the function static while we are at it. Before the commit, we called lru_cache_add_active_or_unevictable() to add new ksm pages to active lruvec. Therefore, activate_page() wasn't necessary for them in the first place. Signed-off-by: Yu Zhao Signed-off-by: Andrew Morton Reviewed-by: Yang Shi Cc: Alexander Duyck Cc: Huang Ying Cc: David Hildenbrand Cc: Michal Hocko Cc: Qian Cai Cc: Mel Gorman Cc: Nicholas Piggin Cc: Hugh Dickins Cc: Joonsoo Kim Link: http://lkml.kernel.org/r/20200818184704.3625199-1-yuzhao@google.com Signed-off-by: Linus Torvalds commit 3264631548b1f2bf89b71793d06bfd0f748f649d Author: Gao Xiang Date: Tue Oct 13 16:52:04 2020 -0700 swap: rename SWP_FS to SWAP_FS_OPS to avoid ambiguity SWP_FS is used to make swap_{read,write}page() go through the filesystem, and it's only used for swap files over NFS for now. Otherwise it will directly submit IO to blockdev according to swapfile extents reported by filesystems in advance. As Matthew pointed out [1], SWP_FS naming is somewhat confusing, so let's rename to SWP_FS_OPS. [1] https://lore.kernel.org/r/20200820113448.GM17456@casper.infradead.org Suggested-by: Matthew Wilcox Signed-off-by: Gao Xiang Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200822113019.11319-1-hsiangkao@redhat.com Signed-off-by: Linus Torvalds commit 146608bb75e6776af4cf42310f583d39311e5334 Author: John Hubbard Date: Tue Oct 13 16:52:01 2020 -0700 mm/gup: protect unpin_user_pages() against npages==-ERRNO As suggested by Dan Carpenter, fortify unpin_user_pages() just a bit, against a typical caller mistake: check if the npages arg is really a -ERRNO value, which would blow up the unpinning loop: WARN and return. If this new WARN_ON() fires, then the system *might* be leaking pages (by leaving them pinned), but probably not. More likely, gup/pup returned a hard -ERRNO error to the caller, who erroneously passed it here. Signed-off-by: John Hubbard Signed-off-by: Dan Carpenter Signed-off-by: Andrew Morton Cc: Ira Weiny Cc: Souptick Joarder Link: https://lkml.kernel.org/r/20200917065706.409079-1-jhubbard@nvidia.com Signed-off-by: Linus Torvalds commit 447f3e45c18a8f27018213bcb1b5a0076633f68a Author: Barry Song Date: Tue Oct 13 16:51:58 2020 -0700 mm/gup: don't permit users to call get_user_pages with FOLL_LONGTERM gup prohibits users from calling get_user_pages() with FOLL_PIN. But it allows users to call get_user_pages() with FOLL_LONGTERM only. It seems insensible. Since FOLL_LONGTERM is a stricter case of FOLL_PIN, we should prohibit users from calling get_user_pages() with FOLL_LONGTERM while not with FOLL_PIN. mm/gup_benchmark.c used to be the only user who did this improperly. But it has been fixed by moving to use pin_user_pages(). [akpm@linux-foundation.org: fix CONFIG_MMU=n build] Link: https://lkml.kernel.org/r/CA+G9fYuNS3k0DVT62twfV746pfNhCSrk5sVMcOcQ1PGGnEseyw@mail.gmail.com Signed-off-by: Barry Song Signed-off-by: Andrew Morton Reviewed-by: Ira Weiny Cc: John Hubbard Cc: Jan Kara Cc: Jérôme Glisse Cc: "Matthew Wilcox (Oracle)" Cc: Al Viro Cc: Christoph Hellwig Cc: Dan Williams Cc: Dave Chinner Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Michal Hocko Cc: Mike Kravetz Cc: Shuah Khan Cc: Vlastimil Babka Cc: Naresh Kamboju Link: http://lkml.kernel.org/r/20200819110100.23504-1-song.bao.hua@hisilicon.com Signed-off-by: Linus Torvalds commit 657d4f7996c6a4235069d8f9a47b64af2f007dbc Author: Barry Song Date: Tue Oct 13 16:51:54 2020 -0700 mm/gup_benchmark: use pin_user_pages for FOLL_LONGTERM flag According to Documentation/core-api/pin_user_pages.rst, FOLL_PIN is a prerequisite to FOLL_LONGTERM. Another way of saying that is, FOLL_LONGTERM is a specific case, more restrictive case of FOLL_PIN. Almost all kernel modules are using pin_user_pages() with FOLL_LONGTERM, mm/gup_benchmark.c seems to the only exception in which FOLL_PIN is not a prerequisite to FOLL_LONGTERM. Signed-off-by: Barry Song Signed-off-by: Andrew Morton Reviewed-by: John Hubbard Cc: Jan Kara Cc: Jérôme Glisse Cc: "Matthew Wilcox (Oracle)" Cc: Al Viro Cc: Christoph Hellwig Cc: Dan Williams Cc: Dave Chinner Cc: Jason Gunthorpe Cc: Jonathan Corbet Cc: Michal Hocko Cc: Mike Kravetz Cc: Shuah Khan Cc: Vlastimil Babka Link: http://lkml.kernel.org/r/20200815122056.29508-1-song.bao.hua@hisilicon.com Signed-off-by: Linus Torvalds commit 4c6cd03ed88cbeed796d840a4f9c8ac082e82409 Author: Barry Song Date: Tue Oct 13 16:51:51 2020 -0700 mm/gup_benchmark: update the documentation in Kconfig In the beginning, mm/gup_benchmark.c supported get_user_pages_fast() only, but right now, it supports the benchmarking of a couple of get_user_pages() related calls like: * get_user_pages_fast() * get_user_pages() * pin_user_pages_fast() * pin_user_pages() The documentation is confusing and needs update. Signed-off-by: Barry Song Signed-off-by: Andrew Morton Cc: John Hubbard Cc: Keith Busch Cc: Ira Weiny Cc: Kirill A. Shutemov Link: https://lkml.kernel.org/r/20200821032546.19992-1-song.bao.hua@hisilicon.com Signed-off-by: Linus Torvalds commit eb1d7a65f08a52dfb828bf45b4ead7f617c64047 Author: Yafang Shao Date: Tue Oct 13 16:51:47 2020 -0700 mm, fadvise: improve the expensive remote LRU cache draining after FADV_DONTNEED Our users reported that there're some random latency spikes when their RT process is running. Finally we found that latency spike is caused by FADV_DONTNEED. Which may call lru_add_drain_all() to drain LRU cache on remote CPUs, and then waits the per-cpu work to complete. The wait time is uncertain, which may be tens millisecond. That behavior is unreasonable, because this process is bound to a specific CPU and the file is only accessed by itself, IOW, there should be no pagecache pages on a per-cpu pagevec of a remote CPU. That unreasonable behavior is partially caused by the wrong comparation of the number of invalidated pages and the number of the target. For example, if (count < (end_index - start_index + 1)) The count above is how many pages were invalidated in the local CPU, and (end_index - start_index + 1) is how many pages should be invalidated. The usage of (end_index - start_index + 1) is incorrect, because they are virtual addresses, which may not mapped to pages. Besides that, there may be holes between start and end. So we'd better check whether there are still pages on per-cpu pagevec after drain the local cpu, and then decide whether or not to call lru_add_drain_all(). After I applied it with a hotfix to our production environment, most of the lru_add_drain_all() can be avoided. Suggested-by: Mel Gorman Signed-off-by: Yafang Shao Signed-off-by: Andrew Morton Acked-by: Mel Gorman Cc: Johannes Weiner Link: https://lkml.kernel.org/r/20200923133318.14373-1-laoar.shao@gmail.com Signed-off-by: Linus Torvalds commit 27a83a609b3b39b0a4ec6c75050b1183d7c302db Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:51:44 2020 -0700 mm/filemap: fix filemap_map_pages for THP We dereference page->mapping and page->index directly after calling find_subpage() and these fields are not valid for tail pages. While commit 4101196b19d7 ("mm: page cache: store only head pages in i_pages") introduced the call to find_subpage(), the problem existed prior to this; I'm going to suggest all the way back to when THPs first existed. The user-visible effects of this are almost negligible. To hit it, you have to mmap a tmpfs file at an unaligned address and then it's only a disabled optimisation causing page faults to happen more frequently than they otherwise would. Fix this by keeping both head and page pointers and checking the appropriate one. We could use page_mapping() and page_to_index(), but that's higher overhead. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Acked-by: Kirill A. Shutemov Cc: William Kucharski Link: https://lkml.kernel.org/r/20200911012532.24761-1-willy@infradead.org Signed-off-by: Linus Torvalds commit a8cf7f272b5a28a62ecfc39d6f7d75b4f486e350 Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:51:41 2020 -0700 mm: add find_lock_head Add a new FGP_HEAD flag which avoids calling find_subpage() and add a convenience wrapper for it. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Alexey Dobriyan Cc: Chris Wilson Cc: Huang Ying Cc: Hugh Dickins Cc: Jani Nikula Cc: Johannes Weiner Cc: Matthew Auld Cc: William Kucharski Link: https://lkml.kernel.org/r/20200910183318.20139-9-willy@infradead.org Signed-off-by: Linus Torvalds commit 63ec1973ddf3eb70feb5728088ca190f1af449cb Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:51:38 2020 -0700 mm/shmem: return head page from find_lock_entry Convert shmem_getpage_gfp() (the only remaining caller of find_lock_entry()) to cope with a head page being returned instead of the subpage for the index. [willy@infradead.org: fix BUG()s] Link https://lore.kernel.org/linux-mm/20200912032042.GA6583@casper.infradead.org/ Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Alexey Dobriyan Cc: Chris Wilson Cc: Huang Ying Cc: Hugh Dickins Cc: Jani Nikula Cc: Johannes Weiner Cc: Matthew Auld Cc: William Kucharski Link: https://lkml.kernel.org/r/20200910183318.20139-8-willy@infradead.org Signed-off-by: Linus Torvalds commit a6de4b4873e1e352f5029b0f5b3c347427d74ab4 Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:51:34 2020 -0700 mm: convert find_get_entry to return the head page There are only four callers remaining of find_get_entry(). get_shadow_from_swap_cache() only wants to see shadow entries and doesn't care about which page is returned. Push the find_subpage() call into find_lock_entry(), find_get_incore_page() and pagecache_get_page(). [willy@infradead.org: fix oops] Link: https://lkml.kernel.org/r/20200914112738.GM6583@casper.infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Alexey Dobriyan Cc: Chris Wilson Cc: Huang Ying Cc: Hugh Dickins Cc: Jani Nikula Cc: Johannes Weiner Cc: Matthew Auld Cc: William Kucharski Link: https://lkml.kernel.org/r/20200910183318.20139-7-willy@infradead.org Signed-off-by: Linus Torvalds commit 9dfc8ff34b951f83632815a87e97a625a11360f0 Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:51:31 2020 -0700 i915: use find_lock_page instead of find_lock_entry i915 does not want to see value entries. Switch it to use find_lock_page() instead, and remove the export of find_lock_entry(). Move find_lock_entry() and find_get_entry() to mm/internal.h to discourage any future use. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Cc: Alexey Dobriyan Cc: Chris Wilson Cc: Huang Ying Cc: Hugh Dickins Cc: Jani Nikula Cc: Matthew Auld Cc: William Kucharski Link: https://lkml.kernel.org/r/20200910183318.20139-6-willy@infradead.org Signed-off-by: Linus Torvalds commit 8cf886463ecc621688a9c81c387d0f9ed32e45ea Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:51:28 2020 -0700 proc: optimise smaps for shmem entries Avoid bumping the refcount on pages when we're only interested in the swap entries. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Cc: Alexey Dobriyan Cc: Chris Wilson Cc: Huang Ying Cc: Hugh Dickins Cc: Jani Nikula Cc: Matthew Auld Cc: William Kucharski Link: https://lkml.kernel.org/r/20200910183318.20139-5-willy@infradead.org Signed-off-by: Linus Torvalds commit e6e88712e43b7942df451508aafc2f083266f56b Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:51:24 2020 -0700 mm: optimise madvise WILLNEED Instead of calling find_get_entry() for every page index, use an XArray iterator to skip over NULL entries, and avoid calling get_page(), because we only want the swap entries. [willy@infradead.org: fix LTP soft lockups] Link: https://lkml.kernel.org/r/20200914165032.GS6583@casper.infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Cc: Alexey Dobriyan Cc: Chris Wilson Cc: Huang Ying Cc: Hugh Dickins Cc: Jani Nikula Cc: Matthew Auld Cc: William Kucharski Cc: Qian Cai Link: https://lkml.kernel.org/r/20200910183318.20139-4-willy@infradead.org Signed-off-by: Linus Torvalds commit f5df8635c5a3c912919c91be64aa198554b0f9ed Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:51:21 2020 -0700 mm: use find_get_incore_page in memcontrol The current code does not protect against swapoff of the underlying swap device, so this is a bug fix as well as a worthwhile reduction in code complexity. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Alexey Dobriyan Cc: Chris Wilson Cc: Huang Ying Cc: Hugh Dickins Cc: Jani Nikula Cc: Johannes Weiner Cc: Matthew Auld Cc: William Kucharski Link: https://lkml.kernel.org/r/20200910183318.20139-3-willy@infradead.org Signed-off-by: Linus Torvalds commit 61ef1865570452801f6e554a668e049c2e25c1fd Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:51:17 2020 -0700 mm: factor find_get_incore_page out of mincore_page Patch series "Return head pages from find_*_entry", v2. This patch series started out as part of the THP patch set, but it has some nice effects along the way and it seems worth splitting it out and submitting separately. Currently find_get_entry() and find_lock_entry() return the page corresponding to the requested index, but the first thing most callers do is find the head page, which we just threw away. As part of auditing all the callers, I found some misuses of the APIs and some plain inefficiencies that I've fixed. The diffstat is unflattering, but I added more kernel-doc and a new wrapper. This patch (of 8); Provide this functionality from the swap cache. It's useful for more than just mincore(). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Hugh Dickins Cc: William Kucharski Cc: Jani Nikula Cc: Alexey Dobriyan Cc: Johannes Weiner Cc: Chris Wilson Cc: Matthew Auld Cc: Huang Ying Link: https://lkml.kernel.org/r/20200910183318.20139-1-willy@infradead.org Link: https://lkml.kernel.org/r/20200910183318.20139-2-willy@infradead.org Signed-off-by: Linus Torvalds commit bac3cf4d01d43b587c873360dc8c84e3b570b344 Author: John Hubbard Date: Tue Oct 13 16:51:14 2020 -0700 mm, dump_page: rename head_mapcount() --> head_compound_mapcount() Rename head_pincount() --> head_compound_pincount(). These names are more accurate (or less misleading) than the original ones. Signed-off-by: John Hubbard Signed-off-by: Andrew Morton Cc: Qian Cai Cc: Matthew Wilcox Cc: Vlastimil Babka Cc: Kirill A. Shutemov Cc: Mike Rapoport Cc: William Kucharski Link: https://lkml.kernel.org/r/20200807183358.105097-1-jhubbard@nvidia.com Signed-off-by: Linus Torvalds commit 853322a671047f9300b9ccc2c358af2859bca2c2 Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 16:51:10 2020 -0700 mm/debug.c: do not dereference i_ino blindly __dump_page() checks i_dentry is fetchable and i_ino is earlier in the struct than i_ino, so it ought to work fine, but it's possible that struct randomisation has reordered i_ino after i_dentry and the pointer is just wild enough that i_dentry is fetchable and i_ino isn't. Also print the inode number if the dentry is invalid. Reported-by: Vlastimil Babka Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: John Hubbard Reviewed-by: Mike Rapoport Link: https://lkml.kernel.org/r/20200819185710.28180-1-willy@infradead.org Signed-off-by: Linus Torvalds commit 8490e2e25b5a1f9591145f0e3bbd09b99409be76 Author: Joao Martins Date: Tue Oct 13 16:51:06 2020 -0700 device-dax: add a range mapping allocation attribute Add a sysfs attribute which denotes a range from the dax region to be allocated. It's an write only @mapping sysfs attribute in the format of '-' to allocate a range. @start and @end use hexadecimal values and the @pgoff is implicitly ordered wrt to previous writes to @mapping sysfs e.g. a write of a range of length 1G the pgoff is 0..1G(-4K), a second write will use @pgoff for 1G+4K... This range mapping interface is useful for: 1) Application which want to implement its own allocation logic, and thus pick the desired ranges from dax_region. 2) For use cases like VMM fast restart[0] where after kexec we want to the same gpa<->phys mappings (as originally created before kexec). [0] https://static.sched.com/hosted_files/kvmforum2019/66/VMM-fast-restart_kvmforum2019.pdf Signed-off-by: Joao Martins Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Jia He Cc: Jonathan Cameron Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vishal Verma Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/159643106970.4062302.10402616567780784722.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lore.kernel.org/r/20200716172913.19658-5-joao.m.martins@oracle.com Link: https://lkml.kernel.org/r/160106119570.30709.4548889722645210610.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 5a505603a917854fd68d2c25e86e1fb96c845ced Author: Joao Martins Date: Tue Oct 13 16:51:00 2020 -0700 dax/hmem: introduce dax_hmem.region_idle parameter Introduce a new module parameter for dax_hmem which initializes all region devices as free, rather than allocating a pagemap for the region by default. All hmem devices created with dax_hmem.region_idle=1 will have full available size for creating dynamic dax devices. Signed-off-by: Joao Martins Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Jia He Cc: Jonathan Cameron Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vishal Verma Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/159643106460.4062302.5868522341307530091.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lore.kernel.org/r/20200716172913.19658-4-joao.m.martins@oracle.com Link: https://lkml.kernel.org/r/160106119033.30709.11249962152222193448.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 6d82120f41561426dd67c86380d779b4599d070d Author: Dan Williams Date: Tue Oct 13 16:50:55 2020 -0700 device-dax: add an 'align' attribute Introduce a device align attribute. While doing so, rename the region align attribute to be more explicitly named as so, but keep it named as @align to retain the API for tools like daxctl. Changes on align may not always be valid, when say certain mappings were created with 2M and then we switch to 1G. So, we validate all ranges against the new value being attempted, post resizing. Signed-off-by: Joao Martins Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Jia He Cc: Jonathan Cameron Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vishal Verma Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/159643105944.4062302.3131761052969132784.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lore.kernel.org/r/20200716172913.19658-3-joao.m.martins@oracle.com Link: https://lkml.kernel.org/r/160106118486.30709.13012322227204800596.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 33cf94d7176672174042bea0566065f356e2caab Author: Joao Martins Date: Tue Oct 13 16:50:50 2020 -0700 device-dax: make align a per-device property Introduce @align to struct dev_dax. When creating a new device, we still initialize to the default dax_region @align. Child devices belonging to a region may wish to keep a different alignment property instead of a global region-defined one. Signed-off-by: Joao Martins Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Jia He Cc: Jonathan Cameron Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vishal Verma Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/159643105377.4062302.4159447829955683131.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lore.kernel.org/r/20200716172913.19658-2-joao.m.martins@oracle.com Link: https://lkml.kernel.org/r/160106117957.30709.1142303024324655705.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 0b07ce872a9eca1ff88c0eb7f6e92dde127d21ca Author: Dan Williams Date: Tue Oct 13 16:50:45 2020 -0700 device-dax: introduce 'mapping' devices In support of interrogating the physical address layout of a device with dis-contiguous ranges, introduce a sysfs directory with 'start', 'end', and 'page_offset' attributes. The alternative is trying to parse /proc/iomem, and that file will not reflect the extent layout until the device is enabled. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Joao Martins Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Jia He Cc: Jonathan Cameron Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vishal Verma Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/159643104819.4062302.13691281391423291589.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lkml.kernel.org/r/160106117446.30709.2751020815463722537.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 60e93dc097f7f13a16a7e4b75b8803eb2adbb721 Author: Dan Williams Date: Tue Oct 13 16:50:39 2020 -0700 device-dax: add dis-contiguous resource support Break the requirement that device-dax instances are physically contiguous. With this constraint removed it allows fragmented available capacity to be fully allocated. This capability is useful to mitigate the "noisy neighbor" problem with memory-side-cache management for virtual machines, or any other scenario where a platform address boundary also designates a performance boundary. For example a direct mapped memory side cache might rotate cache colors at 1GB boundaries. With dis-contiguous allocations a device-dax instance could be configured to contain only 1 cache color. It also satisfies Joao's use case (see link) for partitioning memory for exclusive guest access. It allows for a future potential mode where the host kernel need not allocate 'struct page' capacity up-front. Reported-by: Joao Martins Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Jia He Cc: Jonathan Cameron Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vishal Verma Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lore.kernel.org/lkml/20200110190313.17144-1-joao.m.martins@oracle.com/ Link: https://lkml.kernel.org/r/159643104304.4062302.16561669534797528660.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lkml.kernel.org/r/160106116875.30709.11456649969327399771.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit b7b3c01b191596d27a6980d1a42504f5b607f802 Author: Dan Williams Date: Tue Oct 13 16:50:34 2020 -0700 mm/memremap_pages: support multiple ranges per invocation In support of device-dax growing the ability to front physically dis-contiguous ranges of memory, update devm_memremap_pages() to track multiple ranges with a single reference counter and devm instance. Convert all [devm_]memremap_pages() users to specify the number of ranges they are mapping in their 'struct dev_pagemap' instance. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Paul Mackerras Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Vishal Verma Cc: Vivek Goyal Cc: Dave Jiang Cc: Ben Skeggs Cc: David Airlie Cc: Daniel Vetter Cc: Ira Weiny Cc: Bjorn Helgaas Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: "Jérôme Glisse" Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Brice Goglin Cc: Catalin Marinas Cc: Dave Hansen Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: kernel test robot Cc: Mike Rapoport Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/159643103789.4062302.18426128170217903785.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lkml.kernel.org/r/160106116293.30709.13350662794915396198.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit a4574f63edc6f76fb46dcd65d3eb4d5a8e23ba38 Author: Dan Williams Date: Tue Oct 13 16:50:29 2020 -0700 mm/memremap_pages: convert to 'struct range' The 'struct resource' in 'struct dev_pagemap' is only used for holding resource span information. The other fields, 'name', 'flags', 'desc', 'parent', 'sibling', and 'child' are all unused wasted space. This is in preparation for introducing a multi-range extension of devm_memremap_pages(). The bulk of this change is unwinding all the places internal to libnvdimm that used 'struct resource' unnecessarily, and replacing instances of 'struct dev_pagemap'.res with 'struct dev_pagemap'.range. P2PDMA had a minor usage of the resource flags field, but only to report failures with "%pR". That is replaced with an open coded print of the range. [dan.carpenter@oracle.com: mm/hmm/test: use after free in dmirror_allocate_chunk()] Link: https://lkml.kernel.org/r/20200926121402.GA7467@kadam Signed-off-by: Dan Williams Signed-off-by: Dan Carpenter Signed-off-by: Andrew Morton Reviewed-by: Boris Ostrovsky [xen] Cc: Paul Mackerras Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Vishal Verma Cc: Vivek Goyal Cc: Dave Jiang Cc: Ben Skeggs Cc: David Airlie Cc: Daniel Vetter Cc: Ira Weiny Cc: Bjorn Helgaas Cc: Juergen Gross Cc: Stefano Stabellini Cc: "Jérôme Glisse" Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Brice Goglin Cc: Catalin Marinas Cc: Dave Hansen Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: kernel test robot Cc: Mike Rapoport Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/159643103173.4062302.768998885691711532.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lkml.kernel.org/r/160106115761.30709.13539840236873663620.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit fcffb6a1df921c81579e9c01f9caa281c3f991d5 Author: Dan Williams Date: Tue Oct 13 16:50:24 2020 -0700 device-dax: add resize support Make the device-dax 'size' attribute writable to allow capacity to be split between multiple instances in a region. The intended consumers of this capability are users that want to split a scarce memory resource between device-dax and System-RAM access, or users that want to have multiple security domains for a large region. By default the hmem instance provider allocates an entire region to the first instance. The process of creating a new instance (assuming a region-id of 0) is find the region and trigger the 'create' attribute which yields an empty instance to configure. For example: cd /sys/bus/dax/devices echo dax0.0 > dax0.0/driver/unbind echo $new_size > dax0.0/size echo 1 > $(readlink -f dax0.0)../dax_region/create seed=$(cat $(readlink -f dax0.0)../dax_region/seed) echo $new_size > $seed/size echo dax0.0 > ../drivers/{device_dax,kmem}/bind echo dax0.1 > ../drivers/{device_dax,kmem}/bind Instances can be destroyed by: echo $device > $(readlink -f $device)../dax_region/delete Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Vishal Verma Cc: Brice Goglin Cc: Dave Hansen Cc: Dave Jiang Cc: David Hildenbrand Cc: Ira Weiny Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Catalin Marinas Cc: Daniel Vetter Cc: David Airlie Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/159643102625.4062302.7431838945566033852.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lkml.kernel.org/r/160106115239.30709.9850106928133493138.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit c77f520db8ebed1ffdeb8a545526dc093365d972 Author: Dan Williams Date: Tue Oct 13 16:50:18 2020 -0700 drivers/base: make device_find_child_by_name() compatible with sysfs inputs Use sysfs_streq() in device_find_child_by_name() to allow it to use a sysfs input string that might contain a trailing newline. The other "device by name" interfaces, {bus,driver,class}_find_device_by_name(), already account for sysfs strings. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Reviewed-by: Greg Kroah-Hartman Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vishal Verma Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/159643102106.4062302.12229802117645312104.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lkml.kernel.org/r/160106114576.30709.2960091665444712180.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 0f3da14a4f0503998fc6c12da3d2fc6e8b33e669 Author: Dan Williams Date: Tue Oct 13 16:50:13 2020 -0700 device-dax: introduce 'seed' devices Add a seed device concept for dynamic dax regions to be able to split the region amongst multiple sub-instances. The seed device, similar to libnvdimm seed devices, is a device that starts with zero capacity allocated and unbound to a driver. In contrast to libnvdimm seed devices explicit 'create' and 'delete' interfaces are added to the region to trigger seeds to be created and unused devices to be reclaimed. The explicit create and delete replaces implicit create as a side effect of probe and implicit delete when writing 0 to the size that libnvdimm implements. Delete can be performed on any 0-sized and idle device. This avoids the gymnastics of needing to move device_unregister() to its own async context. Specifically, it avoids the deadlock of deleting a device via one of its own attributes. It is also less surprising to userspace which never sees an extra device it did not request. For now just add the device creation, teardown, and ->probe() prevention. A later patch will arrange for the 'dax/size' attribute to be writable to allocate capacity from the region. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Vishal Verma Cc: Brice Goglin Cc: Dave Hansen Cc: Dave Jiang Cc: David Hildenbrand Cc: Ira Weiny Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Catalin Marinas Cc: Daniel Vetter Cc: David Airlie Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/159643101583.4062302.12255093902950754962.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lkml.kernel.org/r/160106113873.30709.15168756050631539431.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit f11cf813dee20e67eac22a6d78502aa564554eb4 Author: Dan Williams Date: Tue Oct 13 16:50:08 2020 -0700 device-dax: introduce 'struct dev_dax' typed-driver operations In preparation for introducing seed devices the dax-bus core needs to be able to intercept ->probe() and ->remove() operations. Towards that end arrange for the bus and drivers to switch from raw 'struct device' driver operations to 'struct dev_dax' typed operations. Reported-by: Hulk Robot Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Jason Yan Cc: Vishal Verma Cc: Brice Goglin Cc: Dave Hansen Cc: Dave Jiang Cc: David Hildenbrand Cc: Ira Weiny Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Catalin Marinas Cc: Daniel Vetter Cc: David Airlie Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/160106113357.30709.4541750544799737855.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit c2f3011ee697f85ba0166fb3780332aafc66b8f4 Author: Dan Williams Date: Tue Oct 13 16:50:03 2020 -0700 device-dax: add an allocation interface for device-dax instances In preparation for a facility that enables dax regions to be sub-divided, introduce infrastructure to track and allocate region capacity. The new dax_region/available_size attribute is only enabled for volatile hmem devices, not pmem devices that are defined by nvdimm namespace boundaries. This is per Jeff's feedback the last time dynamic device-dax capacity allocation support was discussed. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Vishal Verma Cc: Brice Goglin Cc: Dave Hansen Cc: Dave Jiang Cc: David Hildenbrand Cc: Ira Weiny Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Catalin Marinas Cc: Daniel Vetter Cc: David Airlie Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lore.kernel.org/linux-nvdimm/x49shpp3zn8.fsf@segfault.boston.devel.redhat.com Link: https://lkml.kernel.org/r/159643101035.4062302.6785857915652647857.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lkml.kernel.org/r/160106112801.30709.14601438735305335071.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 0513bd5bb11456d45250c9283e1cb52533125180 Author: Dan Williams Date: Tue Oct 13 16:49:58 2020 -0700 device-dax/kmem: replace release_resource() with release_mem_region() Towards removing the mode specific @dax_kmem_res attribute from the generic 'struct dev_dax', and preparing for multi-range support, change the kmem driver to use the idiomatic release_mem_region() to pair with the initial request_mem_region(). This also eliminates the need to open code the release of the resource allocated by request_mem_region(). As there are no more dax_kmem_res users, delete this struct member. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: David Hildenbrand Cc: Vishal Verma Cc: Dave Hansen Cc: Pavel Tatashin Cc: Brice Goglin Cc: Dave Jiang Cc: Ira Weiny Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Catalin Marinas Cc: Daniel Vetter Cc: David Airlie Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/160106112239.30709.15909567572288425294.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 7e6b431aaef8b611a5adcd7f18fe089ff0d7bb59 Author: Dan Williams Date: Tue Oct 13 16:49:53 2020 -0700 device-dax/kmem: move resource name tracking to drvdata Towards removing the mode specific @dax_kmem_res attribute from the generic 'struct dev_dax', and preparing for multi-range support, move resource name tracking to driver data. The memory for the resource name needs to have its own lifetime separate from the device bind lifetime for cases where the driver is unbound, but the kmem range could not be unplugged from the page allocator. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: David Hildenbrand Cc: Vishal Verma Cc: Dave Hansen Cc: Pavel Tatashin Cc: Brice Goglin Cc: Dave Jiang Cc: Ira Weiny Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Catalin Marinas Cc: Daniel Vetter Cc: David Airlie Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/160106111639.30709.17624822766862009183.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 59bc8d10dc417884a3bc18a092a62e13645ed044 Author: Dan Williams Date: Tue Oct 13 16:49:48 2020 -0700 device-dax/kmem: introduce dax_kmem_range() Towards removing the mode specific @dax_kmem_res attribute from the generic 'struct dev_dax', and preparing for multi-range support, teach the driver to calculate the hotplug range from the device range. The hotplug range is the trivially calculated memory-block-size aligned version of the device range. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: David Hildenbrand Cc: Vishal Verma Cc: Dave Hansen Cc: Pavel Tatashin Cc: Brice Goglin Cc: Dave Jiang Cc: Ira Weiny Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Catalin Marinas Cc: Daniel Vetter Cc: David Airlie Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/160106111109.30709.3173462396758431559.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit f5516ec5efb9fe0f426a46eeef25d389d3c2f988 Author: Dan Williams Date: Tue Oct 13 16:49:43 2020 -0700 device-dax: make pgmap optional for instance creation The passed in dev_pagemap is only required in the pmem case as the libnvdimm core may have reserved a vmem_altmap for dev_memremap_pages() to place the memmap in pmem directly. In the hmem case there is no agent reserving an altmap so it can all be handled by a core internal default. Pass the resource range via a new @range property of 'struct dev_dax_data'. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: David Hildenbrand Cc: Vishal Verma Cc: Dave Hansen Cc: Pavel Tatashin Cc: Brice Goglin Cc: Dave Jiang Cc: Ira Weiny Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Boris Ostrovsky Cc: Catalin Marinas Cc: Daniel Vetter Cc: David Airlie Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Hulk Robot Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Jason Yan Cc: Jeff Moyer Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vivek Goyal Cc: Wei Yang Cc: Will Deacon Link: https://lkml.kernel.org/r/159643099958.4062302.10379230791041872886.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lkml.kernel.org/r/160106110513.30709.4303239334850606031.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 174ebece379bad6331048560dc7f7abfdb8442ee Author: Dan Williams Date: Tue Oct 13 16:49:38 2020 -0700 device-dax: move instance creation parameters to 'struct dev_dax_data' In preparation for adding more parameters to instance creation, move existing parameters to a new struct. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Vishal Verma Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Borislav Petkov Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jeff Moyer Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Wei Yang Cc: Will Deacon Cc: Ard Biesheuvel Cc: Bjorn Helgaas Cc: Boris Ostrovsky Cc: Hulk Robot Cc: Jason Yan Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Vivek Goyal Link: https://lkml.kernel.org/r/159643099411.4062302.1337305960720423895.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit ec826909981c0b3262681ed7021b959593426d46 Author: Dan Williams Date: Tue Oct 13 16:49:33 2020 -0700 device-dax: drop the dax_region.pfn_flags attribute All callers specify the same flags to alloc_dax_region(), so there is no need to allow for anything other than PFN_DEV|PFN_MAP, or carry a ->pfn_flags around on the region. Device-dax instances are always page backed. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Vishal Verma Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Borislav Petkov Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jeff Moyer Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Wei Yang Cc: Will Deacon Cc: Ard Biesheuvel Cc: Bjorn Helgaas Cc: Boris Ostrovsky Cc: Hulk Robot Cc: Jason Yan Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Vivek Goyal Link: https://lkml.kernel.org/r/159643098829.4062302.13611520567669439046.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 5ccac54f3e124a49789c3773d5a351e87470cf12 Author: Dan Williams Date: Tue Oct 13 16:49:28 2020 -0700 ACPI: HMAT: attach a device for each soft-reserved range The hmem enabling in commit cf8741ac57ed ("ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device") only registered ranges to the hmem driver for each soft-reservation that also appeared in the HMAT. While this is meant to encourage platform firmware to "do the right thing" and publish an HMAT, the corollary is that platforms that fail to publish an accurate HMAT will strand memory from Linux usage. Additionally, the "efi_fake_mem" kernel command line option enabling will strand memory by default without an HMAT. Arrange for "soft reserved" memory that goes unclaimed by HMAT entries to be published as raw resource ranges for the hmem driver to consume. Include a module parameter to disable either this fallback behavior, or the hmat enabling from creating hmem devices. The module parameter requires the hmem device enabling to have unique name in the module namespace: "device_hmem". The driver depends on the architecture providing phys_to_target_node() which is only x86 via numa_meminfo() and arm64 via a generic memblock implementation. [joao.m.martins@oracle.com: require NUMA_KEEP_MEMINFO for phys_to_target_node()] Link: https://lkml.kernel.org/r/aaae71a7-4846-f5cc-5acf-cf05fdb1f2dc@oracle.com Signed-off-by: Dan Williams Signed-off-by: Joao Martins Signed-off-by: Andrew Morton Reviewed-by: Joao Martins Cc: Jonathan Cameron Cc: Brice Goglin Cc: Jeff Moyer Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Borislav Petkov Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jia He Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vishal Verma Cc: Wei Yang Cc: Ard Biesheuvel Cc: Bjorn Helgaas Cc: Boris Ostrovsky Cc: Hulk Robot Cc: Jason Yan Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Vivek Goyal Link: https://lkml.kernel.org/r/159643098298.4062302.17587338161136144730.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit a035b6bf863e5c42c2746de2a8ed6600140307e7 Author: Dan Williams Date: Tue Oct 13 16:49:23 2020 -0700 mm/memory_hotplug: introduce default phys_to_target_node() implementation In preparation to set a fallback value for dev_dax->target_node, introduce generic fallback helpers for phys_to_target_node() A generic implementation based on node-data or memblock was proposed, but as noted by Mike: "Here again, I would prefer to add a weak default for phys_to_target_node() because the "generic" implementation is not really generic. The fallback to reserved ranges is x86 specfic because on x86 most of the reserved areas is not in memblock.memory. AFAIK, no other architecture does this." The info message in the generic memory_add_physaddr_to_nid() implementation is fixed up to properly reflect that memory_add_physaddr_to_nid() communicates "online" node info and phys_to_target_node() indicates "target / to-be-onlined" node info. [akpm@linux-foundation.org: fix CONFIG_MEMORY_HOTPLUG=n build] Link: https://lkml.kernel.org/r/202008252130.7YrHIyMI%25lkp@intel.com Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: David Hildenbrand Cc: Mike Rapoport Cc: Jia He Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Borislav Petkov Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jeff Moyer Cc: Joao Martins Cc: Jonathan Cameron Cc: Michael Ellerman Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vishal Verma Cc: Wei Yang Cc: Will Deacon Cc: Ard Biesheuvel Cc: Bjorn Helgaas Cc: Boris Ostrovsky Cc: Hulk Robot Cc: Jason Yan Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Vivek Goyal Link: https://lkml.kernel.org/r/159643097768.4062302.3135192588966888630.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 73fb952d83717697910d981e27fe2c252f64662b Author: Dan Williams Date: Tue Oct 13 16:49:18 2020 -0700 resource: report parent to walk_iomem_res_desc() callback In support of detecting whether a resource might have been been claimed, report the parent to the walk_iomem_res_desc() callback. For example, the ACPI HMAT parser publishes "hmem" platform devices per target range. However, if the HMAT is disabled / missing a fallback driver can attach devices to the raw memory ranges as a fallback if it sees unclaimed / orphan "Soft Reserved" resources in the resource tree. Otherwise, find_next_iomem_res() returns a resource with garbage data from the stack allocation in __walk_iomem_res_desc() for the res->parent field. There are currently no users that expect ->child and ->sibling to be valid, and the resource_lock would be needed to traverse them. Use a compound literal to implicitly zero initialize the fields that are not being returned in addition to setting ->parent. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Jason Gunthorpe Cc: Dave Hansen Cc: Wei Yang Cc: Tom Lendacky Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Borislav Petkov Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ira Weiny Cc: Jeff Moyer Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: Vishal Verma Cc: Will Deacon Cc: Ard Biesheuvel Cc: Bjorn Helgaas Cc: Boris Ostrovsky Cc: Hulk Robot Cc: Jason Yan Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Vivek Goyal Link: https://lkml.kernel.org/r/159643097166.4062302.11875688887228572793.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit c01044cc819160323f3ca4acd44fca487c4432e6 Author: Dan Williams Date: Tue Oct 13 16:49:13 2020 -0700 ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device In preparation for exposing "Soft Reserved" memory ranges without an HMAT, move the hmem device registration to its own compilation unit and make the implementation generic. The generic implementation drops usage acpi_map_pxm_to_online_node() that was translating ACPI proximity domain values and instead relies on numa_map_to_online_node() to determine the numa node for the device. [joao.m.martins@oracle.com: CONFIG_DEV_DAX_HMEM_DEVICES should depend on CONFIG_DAX=y] Link: https://lkml.kernel.org/r/8f34727f-ec2d-9395-cb18-969ec8a5d0d4@oracle.com Signed-off-by: Dan Williams Signed-off-by: Joao Martins Signed-off-by: Andrew Morton Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Borislav Petkov Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jeff Moyer Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vishal Verma Cc: Wei Yang Cc: Will Deacon Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Bjorn Helgaas Cc: Boris Ostrovsky Cc: Hulk Robot Cc: Jason Yan Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Vivek Goyal Link: https://lkml.kernel.org/r/159643096584.4062302.5035370788475153738.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lore.kernel.org/r/158318761484.2216124.2049322072599482736.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 88e9a5b7965c872d7a1f3624605ed0d2939ca03f Author: Dan Williams Date: Tue Oct 13 16:49:08 2020 -0700 efi/fake_mem: arrange for a resource entry per efi_fake_mem instance In preparation for attaching a platform device per iomem resource teach the efi_fake_mem code to create an e820 entry per instance. Similar to E820_TYPE_PRAM, bypass merging resource when the e820 map is sanitized. Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Acked-by: Ard Biesheuvel Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jeff Moyer Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Tom Lendacky Cc: Vishal Verma Cc: Wei Yang Cc: Will Deacon Cc: Ard Biesheuvel Cc: Bjorn Helgaas Cc: Boris Ostrovsky Cc: Hulk Robot Cc: Jason Yan Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Vivek Goyal Link: https://lkml.kernel.org/r/159643096068.4062302.11590041070221681669.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 3b0d31011d39759e3ba7214f75f77bb31983b5a4 Author: Dan Williams Date: Tue Oct 13 16:49:02 2020 -0700 x86/numa: add 'nohmat' option Disable parsing of the HMAT for debug, to workaround broken platform instances, or cases where it is otherwise not wanted. [rdunlap@infradead.org: fix build when CONFIG_ACPI is not set] Link: https://lkml.kernel.org/r/70e5ee34-9809-a997-7b49-499e4be61307@infradead.org Signed-off-by: Dan Williams Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ard Biesheuvel Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jeff Moyer Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: "Rafael J. Wysocki" Cc: Tom Lendacky Cc: Vishal Verma Cc: Wei Yang Cc: Will Deacon Cc: Bjorn Helgaas Cc: Boris Ostrovsky Cc: Hulk Robot Cc: Jason Yan Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Vivek Goyal Link: https://lkml.kernel.org/r/159643095540.4062302.732962081968036212.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 2dd57d3415f8623a5e9494c88978a202886041aa Author: Dan Williams Date: Tue Oct 13 16:48:57 2020 -0700 x86/numa: cleanup configuration dependent command-line options Patch series "device-dax: Support sub-dividing soft-reserved ranges", v5. The device-dax facility allows an address range to be directly mapped through a chardev, or optionally hotplugged to the core kernel page allocator as System-RAM. It is the mechanism for converting persistent memory (pmem) to be used as another volatile memory pool i.e. the current Memory Tiering hot topic on linux-mm. In the case of pmem the nvdimm-namespace-label mechanism can sub-divide it, but that labeling mechanism is not available / applicable to soft-reserved ("EFI specific purpose") memory [3]. This series provides a sysfs-mechanism for the daxctl utility to enable provisioning of volatile-soft-reserved memory ranges. The motivations for this facility are: 1/ Allow performance differentiated memory ranges to be split between kernel-managed and directly-accessed use cases. 2/ Allow physical memory to be provisioned along performance relevant address boundaries. For example, divide a memory-side cache [4] along cache-color boundaries. 3/ Parcel out soft-reserved memory to VMs using device-dax as a security / permissions boundary [5]. Specifically I have seen people (ab)using memmap=nn!ss (mark System-RAM as Persistent Memory) just to get the device-dax interface on custom address ranges. A follow-on for the VM use case is to teach device-dax to dynamically allocate 'struct page' at runtime to reduce the duplication of 'struct page' space in both the guest and the host kernel for the same physical pages. [2]: http://lore.kernel.org/r/20200713160837.13774-11-joao.m.martins@oracle.com [3]: http://lore.kernel.org/r/157309097008.1579826.12818463304589384434.stgit@dwillia2-desk3.amr.corp.intel.com [4]: http://lore.kernel.org/r/154899811738.3165233.12325692939590944259.stgit@dwillia2-desk3.amr.corp.intel.com [5]: http://lore.kernel.org/r/20200110190313.17144-1-joao.m.martins@oracle.com This patch (of 23): In preparation for adding a new numa= option clean up the existing ones to avoid ifdefs in numa_setup(), and provide feedback when the option is numa=fake= option is invalid due to kernel config. The same does not need to be done for numa=noacpi, since the capability is already hard disabled at compile-time. Suggested-by: Rafael J. Wysocki Signed-off-by: Dan Williams Signed-off-by: Andrew Morton Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Ben Skeggs Cc: Borislav Petkov Cc: Brice Goglin Cc: Catalin Marinas Cc: Daniel Vetter Cc: Dave Hansen Cc: Dave Jiang Cc: David Airlie Cc: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jeff Moyer Cc: Jia He Cc: Joao Martins Cc: Jonathan Cameron Cc: Michael Ellerman Cc: Mike Rapoport Cc: Paul Mackerras Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner Cc: Tom Lendacky Cc: Vishal Verma Cc: Wei Yang Cc: Will Deacon Cc: Ard Biesheuvel Cc: Bjorn Helgaas Cc: Boris Ostrovsky Cc: Hulk Robot Cc: Jason Yan Cc: "Jérôme Glisse" Cc: Juergen Gross Cc: kernel test robot Cc: Randy Dunlap Cc: Stefano Stabellini Cc: Vivek Goyal Link: https://lkml.kernel.org/r/160106109960.30709.7379926726669669398.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lkml.kernel.org/r/159643094279.4062302.17779410714418721328.stgit@dwillia2-desk3.amr.corp.intel.com Link: https://lkml.kernel.org/r/159643094925.4062302.14979872973043772305.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Linus Torvalds commit 1abbef4f51724fb11f09adf0e75275f7cb422a8a Author: Hui Su Date: Tue Oct 13 16:48:53 2020 -0700 mm,kmemleak-test.c: move kmemleak-test.c to samples dir kmemleak-test.c is just a kmemleak test module, which also can not be used as a built-in kernel module. Thus, i think it may should not be in mm dir, and move the kmemleak-test.c to samples/kmemleak/kmemleak-test.c. Fix the spelling of built-in by the way. Signed-off-by: Hui Su Signed-off-by: Andrew Morton Cc: Catalin Marinas Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Cc: David S. Miller Cc: Rob Herring Cc: Masahiro Yamada Cc: Sam Ravnborg Cc: Josh Poimboeuf Cc: Steven Rostedt (VMware) Cc: Miguel Ojeda Cc: Divya Indi Cc: Tomas Winkler Cc: David Howells Link: https://lkml.kernel.org/r/20200925183729.GA172837@rlk Signed-off-by: Linus Torvalds commit c4b28963fd79457315783b3b0f21c01eb88cfdc1 Author: Davidlohr Bueso Date: Tue Oct 13 16:48:50 2020 -0700 mm/kmemleak: rely on rcu for task stack scanning kmemleak_scan() currently relies on the big tasklist_lock hammer to stabilize iterating through the tasklist. Instead, this patch proposes simply using rcu along with the rcu-safe for_each_process_thread flavor (without changing scan semantics), which doesn't make use of next_thread/p->thread_group and thus cannot race with exit. Furthermore, any races with fork() and not seeing the new child should be benign as it's not running yet and can also be detected by the next scan. Avoiding the tasklist_lock could prove beneficial for performance considering the scan operation is done periodically. I have seen improvements of 30%-ish when doing similar replacements on very pathological microbenchmarks (ie stressing get/setpriority(2)). However my main motivation is that it's one less user of the global lock, something that Linus has long time wanted to see gone eventually (if ever) even if the traditional fairness issues has been dealt with now with qrwlocks. Of course this is a very long ways ahead. This patch also kills another user of the deprecated tsk->thread_group. Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Reviewed-by: Qian Cai Acked-by: Catalin Marinas Acked-by: Oleg Nesterov Link: https://lkml.kernel.org/r/20200820203902.11308-1-dave@stgolabs.net Signed-off-by: Linus Torvalds commit 9cf7a111836552d159d443491a38b3bc2cc8a174 Author: Abel Wu Date: Tue Oct 13 16:48:47 2020 -0700 mm/slub: make add_full() condition more explicit The commit below is incomplete, as it didn't handle the add_full() part. commit a4d3f8916c65 ("slub: remove useless kmem_cache_debug() before remove_full()") This patch checks for SLAB_STORE_USER instead of kmem_cache_debug(), since that should be the only context in which we need the list_lock for add_full(). Signed-off-by: Abel Wu Signed-off-by: Andrew Morton Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Liu Xiang Link: https://lkml.kernel.org/r/20200811020240.1231-1-wuyun.wu@huawei.com Signed-off-by: Linus Torvalds commit 9f986d998a3001b6eeb189be8444bc0360e61e24 Author: Abel Wu Date: Tue Oct 13 16:48:43 2020 -0700 mm/slub: fix missing ALLOC_SLOWPATH stat when bulk alloc The ALLOC_SLOWPATH statistics is missing in bulk allocation now. Fix it by doing statistics in alloc slow path. Signed-off-by: Abel Wu Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Acked-by: David Rientjes Cc: Christoph Lameter Cc: Joonsoo Kim Cc: Hewenliang Cc: Hu Shiyuan Link: http://lkml.kernel.org/r/20200811022427.1363-1-wuyun.wu@huawei.com Signed-off-by: Linus Torvalds commit c270cf3041a5cb7c5853d45a794309e66576493a Author: Abel Wu Date: Tue Oct 13 16:48:40 2020 -0700 mm/slub.c: branch optimization in free slowpath The two conditions are mutually exclusive and gcc compiler will optimise this into if-else-like pattern. Given that the majority of free_slowpath is free_frozen, let's provide some hint to the compilers. Tests (perf bench sched messaging -g 20 -l 400000, executed 10x after reboot) are done and the summarized result: un-patched patched max. 192.316 189.851 min. 187.267 186.252 avg. 189.154 188.086 stdev. 1.37 0.99 Signed-off-by: Abel Wu Signed-off-by: Andrew Morton Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Hewenliang Cc: Hu Shiyuan Link: http://lkml.kernel.org/r/20200813101812.1617-1-wuyun.wu@huawei.com Signed-off-by: Linus Torvalds commit d7cff4ded857ff7cc3e49eb39cc14df9345b9662 Author: tangjianqiang Date: Tue Oct 13 16:48:37 2020 -0700 include/linux/slab.h: fix a typo error in comment fix a typo error in slab.h "allocagtor" -> "allocator" Signed-off-by: tangjianqiang Signed-off-by: Andrew Morton Acked-by: Souptick Joarder Link: https://lkml.kernel.org/r/1600230053-24303-1-git-send-email-tangjianqiang@xiaomi.com Signed-off-by: Linus Torvalds commit c1ff3f95497e64b67230bddc1242f2d228880859 Author: Mateusz Nosek Date: Tue Oct 13 16:48:34 2020 -0700 mm/slab.c: clean code by removing redundant if condition The removed code was unnecessary and changed nothing in the flow, since in case of returning NULL by 'kmem_cache_alloc_node' returning 'freelist' from the function in question is the same as returning NULL. Signed-off-by: Mateusz Nosek Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Link: https://lkml.kernel.org/r/20200915230329.13002-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds commit 97383c741b061ed2835802264c16784e42e20fe0 Author: Luo Jiaxing Date: Tue Oct 13 16:48:30 2020 -0700 fs_parse: mark fs_param_bad_value() as static We found the following warning when build kernel with W=1: fs/fs_parser.c:192:5: warning: no previous prototype for `fs_param_bad_value' [-Wmissing-prototypes] int fs_param_bad_value(struct p_log *log, struct fs_parameter *param) ^ CC drivers/usb/gadget/udc/snps_udc_core.o And no header file define a prototype for this function, so we should mark it as static. Signed-off-by: Luo Jiaxing Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/1601293463-25763-1-git-send-email-luojiaxing@huawei.com Signed-off-by: Linus Torvalds commit da5c1c0bb316e3a0454d2c6980e9c2b618c149b0 Author: Randy Dunlap Date: Tue Oct 13 16:48:27 2020 -0700 fs/xattr.c: fix kernel-doc warnings for setxattr & removexattr Fix kernel-doc warnings in fs/xattr.c: ../fs/xattr.c:251: warning: Function parameter or member 'dentry' not described in '__vfs_setxattr_locked' ../fs/xattr.c:251: warning: Function parameter or member 'name' not described in '__vfs_setxattr_locked' ../fs/xattr.c:251: warning: Function parameter or member 'value' not described in '__vfs_setxattr_locked' ../fs/xattr.c:251: warning: Function parameter or member 'size' not described in '__vfs_setxattr_locked' ../fs/xattr.c:251: warning: Function parameter or member 'flags' not described in '__vfs_setxattr_locked' ../fs/xattr.c:251: warning: Function parameter or member 'delegated_inode' not described in '__vfs_setxattr_locked' ../fs/xattr.c:458: warning: Function parameter or member 'dentry' not described in '__vfs_removexattr_locked' ../fs/xattr.c:458: warning: Function parameter or member 'name' not described in '__vfs_removexattr_locked' ../fs/xattr.c:458: warning: Function parameter or member 'delegated_inode' not described in '__vfs_removexattr_locked' Fixes: 08b5d5014a27 ("xattr: break delegations in {set,remove}xattr") Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Cc: Al Viro Cc: Frank van der Linden Cc: Chuck Lever Link: http://lkml.kernel.org/r/7a3dd5a2-5787-adf3-d525-c203f9910ec4@infradead.org Signed-off-by: Linus Torvalds commit 8dd71b25c56a707fd492035c03e20e91040eedcf Author: Gang He Date: Tue Oct 13 16:48:24 2020 -0700 ocfs2: fix potential soft lockup during fstrim When we discard unused blocks on a mounted ocfs2 filesystem, fstrim handles each block goup with locking/unlocking global bitmap meta-file repeatedly. we should let fstrim thread take a break(if need) between unlock and lock, this will avoid the potential soft lockup problem, and also gives the upper applications more IO opportunities, these applications are not blocked for too long at writing files. Signed-off-by: Gang He Signed-off-by: Andrew Morton Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Link: https://lkml.kernel.org/r/20200927015815.14904-1-ghe@suse.com Signed-off-by: Linus Torvalds commit 679edeb0ed8ac3e5df020976249d062624f35fa5 Author: Randy Dunlap Date: Tue Oct 13 16:48:21 2020 -0700 ocfs2: delete repeated words in comments Drop duplicated words {the, and} in comments. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Link: https://lkml.kernel.org/r/20200811021845.25134-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 4f8c94022f0bc3babd0a124c0a7dcdd7547bd94e Author: Rustam Kovhaev Date: Tue Oct 13 16:48:17 2020 -0700 ntfs: add check for mft record size in superblock Number of bytes allocated for mft record should be equal to the mft record size stored in ntfs superblock as reported by syzbot, userspace might trigger out-of-bounds read by dereferencing ctx->attr in ntfs_attr_find() Reported-by: syzbot+aed06913f36eff9b544e@syzkaller.appspotmail.com Signed-off-by: Rustam Kovhaev Signed-off-by: Andrew Morton Tested-by: syzbot+aed06913f36eff9b544e@syzkaller.appspotmail.com Acked-by: Anton Altaparmakov Link: https://syzkaller.appspot.com/bug?extid=aed06913f36eff9b544e Link: https://lkml.kernel.org/r/20200824022804.226242-1-rkovhaev@gmail.com Signed-off-by: Linus Torvalds commit d72e720a19393eb611a112e4c5c377785dbd645d Author: Borislav Petkov Date: Tue Oct 13 16:48:14 2020 -0700 scripts/decodecode: add the capability to supply the program counter So that comparing with objdump output from vmlinux can ease pinpointing where the trapping instruction actually is. An example is better than a thousand words: $ PC=0xffffffff8329a927 ./scripts/decodecode < ~/tmp/syz/gfs2.splat [ 477.379104][T23917] Code: 48 83 ec 28 48 89 3c 24 48 89 54 24 08 e8 c1 b4 4a fe 48 8d bb 00 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 97 05 00 00 48 8b 9b 00 01 00 00 48 85 db 0f 84 All code ======== ffffffff8329a8fd: 48 83 ec 28 sub $0x28,%rsp ffffffff8329a901: 48 89 3c 24 mov %rdi,(%rsp) ffffffff8329a905: 48 89 54 24 08 mov %rdx,0x8(%rsp) ffffffff8329a90a: e8 c1 b4 4a fe callq 0xffffffff81745dd0 ffffffff8329a90f: 48 8d bb 00 01 00 00 lea 0x100(%rbx),%rdi ffffffff8329a916: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax ffffffff8329a91d: fc ff df ffffffff8329a920: 48 89 fa mov %rdi,%rdx ffffffff8329a923: 48 c1 ea 03 shr $0x3,%rdx ffffffff8329a927:* 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction ffffffff8329a92b: 0f 85 97 05 00 00 jne 0xffffffff8329aec8 ffffffff8329a931: 48 8b 9b 00 01 00 00 mov 0x100(%rbx),%rbx ffffffff8329a938: 48 85 db test %rbx,%rbx ffffffff8329a93b: 0f .byte 0xf ffffffff8329a93c: 84 .byte 0x84 Signed-off-by: Borislav Petkov Signed-off-by: Andrew Morton Cc: Marc Zyngier Cc: Will Deacon Cc: Rabin Vincent Link: https://lkml.kernel.org/r/20200930111416.GF6810@zn.tnic Link: https://lkml.kernel.org/r/20200929113238.GC21110@zn.tnic Signed-off-by: Linus Torvalds commit 33c5bb375ea4128b6e72b3ee260b74b59c295957 Author: Naoki Hayama Date: Tue Oct 13 16:48:11 2020 -0700 scripts/spelling.txt: add "arbitrary" typo Add "abitrary||arbitrary". Signed-off-by: Naoki Hayama Signed-off-by: Andrew Morton Cc: Colin Ian King Cc: Andy Whitcroft Cc: Joe Perches Link: https://lkml.kernel.org/r/6bf6520d-787d-5749-09b5-ff92185f501f@lineo.co.jp Signed-off-by: Linus Torvalds commit 2c92406f33433b624522acbc4e78e6c58c397cd5 Author: Wang Qing Date: Tue Oct 13 16:48:08 2020 -0700 scripts/spelling.txt: increase error-prone spell checking Increase direcly,ununsed,manger spelling error check Signed-off-by: Wang Qing Signed-off-by: Andrew Morton Cc: Colin Ian King Cc: Wang Qing Cc: Xiong Cc: SeongJae Park Cc: Jonathan Neuschfer Cc: Luca Ceresoli Cc: Joe Perches Link: https://lkml.kernel.org/r/1601085397-27586-1-git-send-email-wangqing@vivo.com Signed-off-by: Linus Torvalds commit eb38f37c3cee08a0197bdc7bbb9b4e02e40e2300 Author: Lukas Bulwahn Date: Tue Oct 13 16:48:05 2020 -0700 kbuild: doc: describe proper script invocation During an investigation to fix up the execute bits of scripts in the kernel repository, Andrew Morton and Kees Cook pointed out that the execute bit should not matter, and that build scripts cannot rely on that. Kees could not point to any documentation, though. Masahiro Yamada explained the convention of setting execute bits to make it easier for manual script invocation. Provide some basic documentation how the build shall invoke scripts, such that the execute bits do not matter, and acknowledge that execute bits are useful nonetheless. This serves as reference for further clean-up patches in the future. Suggested-by: Andrew Morton Suggested-by: Kees Cook Signed-off-by: Lukas Bulwahn Signed-off-by: Andrew Morton Cc: Masahiro Yamada Cc: Michal Marek Cc: Jonathan Corbet Cc: Ujjwal Kumar Cc: Lukas Bulwahn Link: https://lore.kernel.org/lkml/20200830174409.c24c3f67addcce0cea9a9d4c@linux-foundation.org/ Link: https://lore.kernel.org/lkml/202008271102.FEB906C88@keescook/ Link: https://lore.kernel.org/linux-kbuild/CAK7LNAQdrvMkDA6ApDJCGr+5db8SiPo=G+p8EiOvnnGvEN80gA@mail.gmail.com/ Link: https://lkml.kernel.org/r/20201001075723.24246-1-lukas.bulwahn@gmail.com Signed-off-by: Linus Torvalds commit 4d6fb34acb5d0bfc579ccd29df9cc6f653e51ab2 Author: Nick Desaulniers Date: Tue Oct 13 16:48:01 2020 -0700 export.h: fix section name for CONFIG_TRIM_UNUSED_KSYMS for Clang When enabling CONFIG_TRIM_UNUSED_KSYMS, the linker will warn about the orphan sections: (".discard.ksym") is being placed in '".discard.ksym"' repeatedly when linking vmlinux. This is because the stringification operator, `#`, in the preprocessor escapes strings. GCC and Clang differ in how they treat section names that contain \". The portable solution is to not use a string literal with the preprocessor stringification operator. Fixes: commit bbda5ec671d3 ("kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS") Reported-by: kbuild test robot Suggested-by: Kees Cook Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Cc: Nathan Chancellor Cc: Masahiro Yamada Cc: Matthias Maennich Cc: Jessica Yu Cc: Greg Kroah-Hartman Cc: Will Deacon Link: https://bugs.llvm.org/show_bug.cgi?id=42950 Link: https://github.com/ClangBuiltLinux/linux/issues/1166 Link: https://lkml.kernel.org/r/20200929190701.398762-1-ndesaulniers@google.com Signed-off-by: Linus Torvalds commit a25c13b3aa1bdbf100e8770902c30908728f8410 Author: Nick Desaulniers Date: Tue Oct 13 16:47:58 2020 -0700 compiler.h: avoid escaped section names The stringification operator, `#`, in the preprocessor escapes strings. For example, `# "foo"` becomes `"\"foo\""`. GCC and Clang differ in how they treat section names that contain \". The portable solution is to not use a string literal with the preprocessor stringification operator. In this case, since __section unconditionally uses the stringification operator, we actually want the more verbose __attribute__((__section__())). Fixes: commit e04462fb82f8 ("Compiler Attributes: remove uses of __attribute__ from compiler.h") Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Cc: Miguel Ojeda Cc: Luc Van Oostenryck Cc: Nathan Chancellor Cc: Arvind Sankar Link: https://bugs.llvm.org/show_bug.cgi?id=42950 Link: https://lkml.kernel.org/r/20200929194318.548707-1-ndesaulniers@google.com Signed-off-by: Linus Torvalds commit c8db3b0a7ba7614f761f309d6aa7499127b18a0b Author: Nick Desaulniers Date: Tue Oct 13 16:47:55 2020 -0700 compiler-gcc: improve version error As Kees suggests, doing so provides developers with two useful pieces of information: - The kernel build was attempting to use GCC. (Maybe they accidentally poked the wrong configs in a CI.) - They need 4.9 or better. ("Upgrade to what version?" doesn't need to be dug out of documentation, headers, etc.) Suggested-by: Kees Cook Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Tested-by: Sedat Dilek Reviewed-by: Kees Cook Reviewed-by: Miguel Ojeda Reviewed-by: Nathan Chancellor Reviewed-by: Sedat Dilek Cc: Andrey Konovalov Cc: Fangrui Song Cc: Marco Elver Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Will Deacon Link: https://lkml.kernel.org/r/20200902225911.209899-8-ndesaulniers@google.com Signed-off-by: Linus Torvalds commit 527f6750d92beb9c787d8aba48477b1e834d64e5 Author: Marco Elver Date: Tue Oct 13 16:47:51 2020 -0700 kasan: remove mentions of unsupported Clang versions Since the kernel now requires at least Clang 10.0.1, remove any mention of old Clang versions and simplify the documentation. Signed-off-by: Marco Elver Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Reviewed-by: Andrey Konovalov Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor Cc: Fangrui Song Cc: Miguel Ojeda Cc: Sedat Dilek Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Will Deacon Link: https://lkml.kernel.org/r/20200902225911.209899-7-ndesaulniers@google.com Signed-off-by: Linus Torvalds commit 3511af0a72efb2ba5df7f1b4c8c1bf3b1a19a9ea Author: Nick Desaulniers Date: Tue Oct 13 16:47:48 2020 -0700 Partially revert "ARM: 8905/1: Emit __gnu_mcount_nc when using Clang 10.0.0 or newer" This partially reverts commit b0fe66cf095016e0b238374c10ae366e1f087d11. The minimum supported version of clang is now clang 10.0.1. We still want to pass -meabi=gnu. Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor Cc: Andrey Konovalov Cc: Fangrui Song Cc: Marco Elver Cc: Miguel Ojeda Cc: Sedat Dilek Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Will Deacon Link: https://lkml.kernel.org/r/20200902225911.209899-6-ndesaulniers@google.com Signed-off-by: Linus Torvalds commit 3759da22e5c0dfc25ee5296ca470262204ba35a8 Author: Nick Desaulniers Date: Tue Oct 13 16:47:44 2020 -0700 Revert "arm64: vdso: Fix compilation with clang older than 8" This reverts commit 3acf4be235280f14d838581a750532219d67facc. The minimum supported version of clang is clang 10.0.1. Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor Cc: Andrey Konovalov Cc: Fangrui Song Cc: Marco Elver Cc: Miguel Ojeda Cc: Sedat Dilek Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Will Deacon Link: https://lkml.kernel.org/r/20200902225911.209899-5-ndesaulniers@google.com Signed-off-by: Linus Torvalds commit 2980e6070eefc0e0b67e223ed4e1db4f730c6f69 Author: Nick Desaulniers Date: Tue Oct 13 16:47:40 2020 -0700 Revert "arm64: bti: Require clang >= 10.0.1 for in-kernel BTI support" This reverts commit b9249cba25a5dce5de87e5404503a5e11832c2dd. The minimum supported version of clang is now 10.0.1. Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor Cc: Andrey Konovalov Cc: Fangrui Song Cc: Marco Elver Cc: Miguel Ojeda Cc: Sedat Dilek Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Will Deacon Link: https://lkml.kernel.org/r/20200902225911.209899-4-ndesaulniers@google.com Signed-off-by: Linus Torvalds commit 4c207c50ea35abf98f087bbcda8c95b23c4bb3b1 Author: Nick Desaulniers Date: Tue Oct 13 16:47:37 2020 -0700 Revert "kbuild: disable clang's default use of -fmerge-all-constants" This reverts commit 87e0d4f0f37fb0c8c4aeeac46fff5e957738df79. -fno-merge-all-constants has been the default since clang-6; the minimum supported version of clang in the kernel is clang-10 (10.0.1). Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Tested-by: Sedat Dilek Reviewed-by: Fangrui Song Reviewed-by: Nathan Chancellor Reviewed-by: Sedat Dilek Reviewed-by: Kees Cook Cc: Andrey Konovalov Cc: Marco Elver Cc: Miguel Ojeda Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Will Deacon Link: https://lkml.kernel.org/r/20200902225911.209899-3-ndesaulniers@google.com Link: https://reviews.llvm.org/rL329300. Link: https://github.com/ClangBuiltLinux/linux/issues/9 Signed-off-by: Linus Torvalds commit 1f7a44f63e6c782c9c2aa9f18f40c23914e6b46a Author: Nick Desaulniers Date: Tue Oct 13 16:47:33 2020 -0700 compiler-clang: add build check for clang 10.0.1 Patch series "set clang minimum version to 10.0.1", v3. Adds a compile time #error to compiler-clang.h setting the effective minimum supported version to clang 10.0.1. A separate patch has already been picked up into the Documentation/ tree also confirming the version. Next are a series of reverts. One for 32b arm is a partial revert. Then Marco suggested fixes to KASAN docs. Finally, improve the warning for GCC too as per Kees. This patch (of 7): During Plumbers 2020, we voted to just support the latest release of Clang for now. Add a compile time check for this. We plan to remove workarounds for older versions now, which will break in subtle and not so subtle ways. Suggested-by: Sedat Dilek Suggested-by: Nathan Chancellor Suggested-by: Kees Cook Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Tested-by: Sedat Dilek Reviewed-by: Kees Cook Reviewed-by: Miguel Ojeda Reviewed-by: Sedat Dilek Acked-by: Marco Elver Acked-by: Nathan Chancellor Acked-by: Sedat Dilek Cc: Andrey Konovalov Cc: Fangrui Song Cc: Masahiro Yamada Cc: Daniel Borkmann Cc: Alexei Starovoitov Cc: Will Deacon Cc: Vincenzo Frascino Link: https://lkml.kernel.org/r/20200902225911.209899-1-ndesaulniers@google.com Link: https://lkml.kernel.org/r/20200902225911.209899-2-ndesaulniers@google.com Link: https://github.com/ClangBuiltLinux/linux/issues/9 Link: https://github.com/ClangBuiltLinux/linux/issues/941 Signed-off-by: Linus Torvalds commit fdafed459998e2be0e877e6189b24cb7a0183224 Author: Cong Wang Date: Mon Oct 12 16:17:21 2020 -0700 ip_gre: set dev->hard_header_len and dev->needed_headroom properly GRE tunnel has its own header_ops, ipgre_header_ops, and sets it conditionally. When it is set, it assumes the outer IP header is already created before ipgre_xmit(). This is not true when we send packets through a raw packet socket, where L2 headers are supposed to be constructed by user. Packet socket calls dev_validate_header() to validate the header. But GRE tunnel does not set dev->hard_header_len, so that check can be simply bypassed, therefore uninit memory could be passed down to ipgre_xmit(). Similar for dev->needed_headroom. dev->hard_header_len is supposed to be the length of the header created by dev->header_ops->create(), so it should be used whenever header_ops is set, and dev->needed_headroom should be used when it is not set. Reported-and-tested-by: syzbot+4a2c52677a8a1aa283cb@syzkaller.appspotmail.com Cc: William Tu Acked-by: Willem de Bruijn Signed-off-by: Cong Wang Acked-by: Xie He Signed-off-by: Jakub Kicinski commit 80a18f4a8567b73b95c03d96f4f566cbd54bc36b Author: Jonathan Marek Date: Sun Sep 27 15:06:51 2020 -0400 clk: qcom: Add display clock controller driver for SM8150 and SM8250 Add support for the display clock controller found on SM8150 and SM8250. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov (SM8250) Link: https://lore.kernel.org/r/20200927190653.13876-3-jonathan@marek.ca Signed-off-by: Stephen Boyd commit d05a58047c75126a74dc32f3f94cbcd9a6fbad0e Author: Jonathan Marek Date: Sun Sep 27 15:06:50 2020 -0400 dt-bindings: clock: add QCOM SM8150 and SM8250 display clock bindings Add device tree bindings for display clock controller for Qualcomm Technology Inc's SM8150 and SM8250 SoCs. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov (SM8250) Link: https://lore.kernel.org/r/20200927190653.13876-2-jonathan@marek.ca Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 0e94711a1f29eb9ff7e2a86c096c1a2906dfcdba Author: Jonathan Marek Date: Wed Sep 23 12:06:31 2020 -0400 clk: qcom: add video clock controller driver for SM8250 Add support for the video clock controller found on SM8250 based devices. Derived from the downstream driver. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200923160635.28370-6-jonathan@marek.ca Signed-off-by: Stephen Boyd commit 5658e8cf1a8a222527870562dc06702015f6357c Author: Jonathan Marek Date: Wed Sep 23 12:06:30 2020 -0400 clk: qcom: add video clock controller driver for SM8150 Add support for the video clock controller found on SM8150 based devices. Derived from the downstream driver. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200923160635.28370-5-jonathan@marek.ca Signed-off-by: Stephen Boyd commit dafb992a95e1c19ba62596b111d88f56f20ef887 Author: Jonathan Marek Date: Wed Sep 23 12:06:29 2020 -0400 dt-bindings: clock: add SM8250 QCOM video clock bindings Add device tree bindings for video clock controller for SM8250 SoCs. Signed-off-by: Jonathan Marek Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200923160635.28370-4-jonathan@marek.ca Signed-off-by: Stephen Boyd commit df3f61d2cdc9eac4c9c8316ca2d1a2efea39c8a0 Author: Jonathan Marek Date: Wed Sep 23 12:06:28 2020 -0400 dt-bindings: clock: add SM8150 QCOM video clock bindings Add device tree bindings for video clock controller for SM8150 SoCs. Signed-off-by: Jonathan Marek Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200923160635.28370-3-jonathan@marek.ca Signed-off-by: Stephen Boyd commit 70d795d2d836e686e2fd4ed1d0abd8fb6ed3ae2a Author: Jonathan Marek Date: Wed Sep 23 12:06:27 2020 -0400 dt-bindings: clock: combine qcom,sdm845-videocc and qcom,sc7180-videocc These two bindings are almost identical, so combine them into one. This will make it easier to add the sm8150 and sm8250 videocc bindings. Signed-off-by: Jonathan Marek Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200923160635.28370-2-jonathan@marek.ca Signed-off-by: Stephen Boyd commit 8c18b41b3931ad828111ec1e185fcdfffaf1c693 Author: Konrad Dybcio Date: Mon Oct 5 16:58:55 2020 +0200 clk: qcom: gcc-msm8994: Add missing clocks, resets and GDSCs This change adds GDSCs, resets and most of the missing clocks to the msm8994 GCC driver. The remaining ones are of local_vote_clk and gate_clk type, which are not yet supported upstream. Also reorder them to match the original downstream driver. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20201005145855.149206-1-konradybcio@gmail.com Signed-off-by: Stephen Boyd commit 3270ee14557b583e9aa852d1bb413fc71ce1f0e0 Author: Julia Lawall Date: Sun Sep 27 21:12:20 2020 +0200 clk: meson: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1601233948-11629-11-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Stephen Boyd commit 39443a27cb78abc1425830e9f305d7cc0f4ad7ae Author: Julia Lawall Date: Sun Sep 27 21:12:19 2020 +0200 clk: mvebu: ap80x-cpu: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1601233948-11629-10-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Stephen Boyd commit 4f8a13e1c2c2927e393755f703104e33907cdb4f Author: Julia Lawall Date: Sun Sep 27 21:12:11 2020 +0200 clk: uniphier: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1601233948-11629-2-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Stephen Boyd commit a003ec1f47bc7c34e1dc96653b903c48f63adcdb Merge: 3618ad2a7c0e7 5fc3594d36d16 Author: Jakub Kicinski Date: Tue Oct 13 17:34:26 2020 -0700 Merge branch 'net-add-and-use-function-dev_fetch_sw_netstats-for-fetching-pcpu_sw_netstats' Heiner Kallweit says: ==================== net: add and use function dev_fetch_sw_netstats for fetching pcpu_sw_netstats In several places the same code is used to populate rtnl_link_stats64 fields with data from pcpu_sw_netstats. Therefore factor out this code to a new function dev_fetch_sw_netstats(). ==================== Signed-off-by: Jakub Kicinski commit 5fc3594d36d16794facc533cc2a80d3f5bd7c921 Author: Heiner Kallweit Date: Mon Oct 12 10:19:59 2020 +0200 xfrm: use new function dev_fetch_sw_netstats Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/a6b816f4-bbf2-9db0-d59a-7e4e9cc808fe@gmail.com Signed-off-by: Jakub Kicinski commit 3569939a811e6d87df6dbd64235b9603a576432c Author: Heiner Kallweit Date: Mon Oct 12 10:19:12 2020 +0200 net: openvswitch: use new function dev_fetch_sw_netstats Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/5e52dc91-97b1-82b0-214b-65d404e4a2ec@gmail.com Signed-off-by: Jakub Kicinski commit 6401297e761072ba880694bcef140fbd0158f1f3 Author: Heiner Kallweit Date: Mon Oct 12 10:18:19 2020 +0200 mac80211: use new function dev_fetch_sw_netstats Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/93dda477-70ae-0ccf-71b4-bfebb66c9beb@gmail.com Signed-off-by: Jakub Kicinski commit cf89f18fa4070292fbb6afe62364bf2f2d8c4294 Author: Heiner Kallweit Date: Mon Oct 12 10:17:07 2020 +0200 iptunnel: use new function dev_fetch_sw_netstats Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/050f9a83-b195-a3d6-edbd-91a59040be21@gmail.com Signed-off-by: Jakub Kicinski commit a0d269810185b427feb1ba671cffeac0be17fa27 Author: Heiner Kallweit Date: Mon Oct 12 10:16:18 2020 +0200 net: dsa: use new function dev_fetch_sw_netstats Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit Tested-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/b6047017-8226-6b7e-a3cd-064e69fdfa27@gmail.com Signed-off-by: Jakub Kicinski commit f3f04f0f3ab971a00e42ca3804d73bd8f1c88b4a Author: Heiner Kallweit Date: Mon Oct 12 10:15:22 2020 +0200 net: bridge: use new function dev_fetch_sw_netstats Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/d1c3ff29-5691-9d54-d164-16421905fa59@gmail.com Signed-off-by: Jakub Kicinski commit 1f68b2096f6530867bde34eb67fcc9ac31b58037 Author: Heiner Kallweit Date: Mon Oct 12 10:14:08 2020 +0200 qtnfmac: use new function dev_fetch_sw_netstats Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit Acked-by: Kalle Valo Link: https://lore.kernel.org/r/166259f2-084c-45d7-e610-2de2a0bdae06@gmail.com Signed-off-by: Jakub Kicinski commit ab2b3ff21b9f1378a563873badb4f3aec4210cc2 Author: Heiner Kallweit Date: Mon Oct 12 10:07:33 2020 +0200 net: usbnet: use new function dev_fetch_sw_netstats Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/70ad3e33-8ea6-e12e-31de-5fec7a3c4f6e@gmail.com Signed-off-by: Jakub Kicinski commit ec173778e96ed48e3b9b16de9029695845fc017c Author: Heiner Kallweit Date: Mon Oct 12 10:06:44 2020 +0200 net: usb: qmi_wwan: use new function dev_fetch_sw_netstats Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit Acked-by: Bjørn Mork Link: https://lore.kernel.org/r/2c97b75b-107e-0ab6-d9ef-9f38bb03f495@gmail.com Signed-off-by: Jakub Kicinski commit 9d0151673e70522692b4873be3c83c4da7ed3b13 Author: Heiner Kallweit Date: Mon Oct 12 10:04:11 2020 +0200 net: macsec: use new function dev_fetch_sw_netstats Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/0d81e0f7-7784-42df-8e10-d0b77ca5b7ee@gmail.com Signed-off-by: Jakub Kicinski commit 3b51788a2d5fd223066dc51318bcc057d0d3776c Author: Heiner Kallweit Date: Mon Oct 12 10:03:02 2020 +0200 IB/hfi1: use new function dev_fetch_sw_netstats Simplify the code by using new function dev_fetch_sw_netstats(). Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/6cad1a04-f021-d94b-45fd-7cc7cf07367d@gmail.com Signed-off-by: Jakub Kicinski commit 44fa32f008ab7092842095a7a474c48303a2f186 Author: Heiner Kallweit Date: Mon Oct 12 10:01:27 2020 +0200 net: add function dev_fetch_sw_netstats for fetching pcpu_sw_netstats In several places the same code is used to populate rtnl_link_stats64 fields with data from pcpu_sw_netstats. Therefore factor out this code to a new function dev_fetch_sw_netstats(). v2: - constify argument netstats - don't ignore netstats being NULL or an ERRPTR - switch to EXPORT_SYMBOL_GPL Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/6d16a338-52f5-df69-0020-6bc771a7d498@gmail.com Signed-off-by: Jakub Kicinski commit 3618ad2a7c0e78e4258386394d5d5f92a3dbccf8 Author: Tonghao Zhang Date: Mon Oct 12 09:58:20 2020 +0800 virtio-net: ethtool configurable RXCSUM Allow user configuring RXCSUM separately with ethtool -K, reusing the existing virtnet_set_guest_offloads helper that configures RXCSUM for XDP. This is conditional on VIRTIO_NET_F_CTRL_GUEST_OFFLOADS. If Rx checksum is disabled, LRO should also be disabled. Signed-off-by: Tonghao Zhang Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/20201012015820.62042-1-xiangxia.m.yue@gmail.com Signed-off-by: Jakub Kicinski commit 526b9e0cf3780cfa529edb3d62bc2714e5c019e1 Author: Rishabh Bhatnagar Date: Fri Oct 2 11:09:04 2020 -0700 remoteproc: Add recovery configuration to the sysfs interface Add recovery configuration to the sysfs interface. This will allow usage of this configuration feature in production devices where access to debugfs might be limited. Signed-off-by: Rishabh Bhatnagar Link: https://lore.kernel.org/r/1601662144-5964-4-git-send-email-rishabhb@codeaurora.org Signed-off-by: Bjorn Andersson commit f75c6043a38b89d01dd9ccb0d9cd81c291e04b18 Author: Rishabh Bhatnagar Date: Fri Oct 2 11:09:03 2020 -0700 remoteproc: Add coredump as part of sysfs interface Add coredump as part of the sysfs interface. This will allow usage of this configuration feature in production devices where access to debugfs might be limited. Signed-off-by: Rishabh Bhatnagar Link: https://lore.kernel.org/r/1601662144-5964-3-git-send-email-rishabhb@codeaurora.org Signed-off-by: Bjorn Andersson commit c9bf52a173c73be41742c768728e239ffbb63a71 Author: Or Cohen Date: Sun Oct 11 18:35:27 2020 +0300 net/af_unix: Remove unused old_pid variable Commit 109f6e39fa07c48f5801 ("af_unix: Allow SO_PEERCRED to work across namespaces.") introduced the old_pid variable in unix_listen, but it's never used. Remove the declaration and the call to put_pid. Signed-off-by: Or Cohen Link: https://lore.kernel.org/r/20201011153527.18628-1-orcohen@paloaltonetworks.com Signed-off-by: Jakub Kicinski commit bf41a0910cb2dd06abd4d6a920edcee798460ad7 Author: Rishabh Bhatnagar Date: Fri Oct 2 11:09:02 2020 -0700 remoteproc: Change default dump configuration to "disabled" Currently "default" configuration option means coredumps are enabled. To avoid confusion rename the "default" configuration option to "enabled" and disable collection of dumps by default as doing so makes sense for production devices. Signed-off-by: Rishabh Bhatnagar Link: https://lore.kernel.org/r/1601662144-5964-2-git-send-email-rishabhb@codeaurora.org Signed-off-by: Bjorn Andersson commit 4e3bbb33e6f36e4b05be1b1b9b02e3dd5aaa3e69 Author: Christian Eggers Date: Mon Oct 12 11:35:42 2020 +0200 socket: don't clear SOCK_TSTAMP_NEW when SO_TIMESTAMPNS is disabled SOCK_TSTAMP_NEW (timespec64 instead of timespec) is also used for hardware time stamps (configured via SO_TIMESTAMPING_NEW). User space (ptp4l) first configures hardware time stamping via SO_TIMESTAMPING_NEW which sets SOCK_TSTAMP_NEW. In the next step, ptp4l disables SO_TIMESTAMPNS(_NEW) (software time stamps), but this must not switch hardware time stamps back to "32 bit mode". This problem happens on 32 bit platforms were the libc has already switched to struct timespec64 (from SO_TIMExxx_OLD to SO_TIMExxx_NEW socket options). ptp4l complains with "missing timestamp on transmitted peer delay request" because the wrong format is received (and discarded). Fixes: 887feae36aee ("socket: Add SO_TIMESTAMP[NS]_NEW") Fixes: 783da70e8396 ("net: add sock_enable_timestamps") Signed-off-by: Christian Eggers Acked-by: Willem de Bruijn Acked-by: Deepa Dinamani Signed-off-by: Jakub Kicinski commit 59e611a566e7cd48cf54b6777a11fe3f9c2f9db5 Author: Christian Eggers Date: Mon Oct 12 11:35:41 2020 +0200 socket: fix option SO_TIMESTAMPING_NEW The comparison of optname with SO_TIMESTAMPING_NEW is wrong way around, so SOCK_TSTAMP_NEW will first be set and than reset again. Additionally move it out of the test for SOF_TIMESTAMPING_RX_SOFTWARE as this seems unrelated. This problem happens on 32 bit platforms were the libc has already switched to struct timespec64 (from SO_TIMExxx_OLD to SO_TIMExxx_NEW socket options). ptp4l complains with "missing timestamp on transmitted peer delay request" because the wrong format is received (and discarded). Fixes: 9718475e6908 ("socket: Add SO_TIMESTAMPING_NEW") Signed-off-by: Christian Eggers Reviewed-by: Willem de Bruijn Reviewed-by: Deepa Dinamani Acked-by: Willem de Bruijn Acked-by: Deepa Dinamani Signed-off-by: Jakub Kicinski commit 0403a2b53c29b49c66f89dcbc07ebab37b7af29c Author: Julia Lawall Date: Sun Oct 11 12:34:58 2020 +0200 net/tls: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1602412498-32025-6-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Jakub Kicinski commit 6159e9633f177ef0db435edc013913a8cd888ca0 Author: Julia Lawall Date: Sun Oct 11 12:34:57 2020 +0200 net/ipv6: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Acked-by: Paul Moore Link: https://lore.kernel.org/r/1602412498-32025-5-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Jakub Kicinski commit 44797589c20ecfe00e273cfe1f141f2a87187255 Author: Julia Lawall Date: Sun Oct 11 12:34:56 2020 +0200 tcp: use semicolons rather than commas to separate statements Replace commas with semicolons. Commas introduce unnecessary variability in the code structure and are hard to see. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1602412498-32025-4-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Jakub Kicinski commit 7e38b03f0fe7c642d26f8bccbead021e9d772bb2 Author: Vladimir Oltean Date: Sun Oct 11 12:20:41 2020 +0300 net: mscc: ocelot: remove duplicate ocelot_port_dev_check A helper for checking whether a net_device belongs to mscc_ocelot already existed and did not need to be rewritten. Use it. Fixes: 319e4dd11a20 ("net: mscc: ocelot: introduce conversion helpers between port and netdev") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20201011092041.3535101-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit c93c5482c7d4132e84ee7a9e8d831c00ed7aec41 Merge: ccdf7fae3afae 0a4e9ce17ba77 Author: Jakub Kicinski Date: Tue Oct 13 16:57:18 2020 -0700 Merge branch 'macb-support-the-2-deep-Tx-queue-on-at91' Willy Tarreau says: ==================== macb: support the 2-deep Tx queue on at91 while running some tests on my Breadbee board, I noticed poor network Tx performance. I had a look at the driver (macb, at91ether variant) and noticed that at91ether_start_xmit() immediately stops the queue after sending a frame and waits for the interrupt to restart the queue, causing a dead time after each packet is sent. The AT91RM9200 datasheet states that the controller supports two frames, one being sent and the other one being queued, so I performed minimal changes to support this. The transmit performance on my board has increased by 50% on medium-sized packets (HTTP traffic), and with large packets I can now reach line rate. Since this driver is shared by various platforms, I tried my best to isolate and limit the changes as much as possible and I think it's pretty reasonable as-is. I've run extensive tests and couldn't meet any unexpected situation (no stall, overflow nor lockup). There are 3 patches in this series. The first one adds the missing interrupt flag for RM9200 (TBRE, indicating the tx buffer is willing to take a new packet). The second one replaces the single skb with a 2-array and uses only index 0. It does no other change, this is just to prepare the code for the third one. The third one implements the queue. Packets are added at the tail of the queue, the queue is stopped at 2 packets and the interrupt releases 0, 1 or 2 depending on what the transmit status register reports. ==================== Signed-off-by: Jakub Kicinski commit 0a4e9ce17ba77847e5a9f87eed3c0ba46e3f82eb Author: Willy Tarreau Date: Sun Oct 11 11:09:44 2020 +0200 macb: support the two tx descriptors on at91rm9200 The at91rm9200 variant used by a few chips including the MSC313 supports two Tx descriptors (one frame being serialized and another one queued). However the driver only implemented a single one, which adds a dead time after each transfer to receive and process the interrupt and wake the queue up, preventing from reaching line rate. This patch implements a very basic 2-deep queue to address this limitation. The tests run on a Breadbee board equipped with an MSC313E show that at 1 GHz, HTTP traffic on medium-sized objects (45kB) was limited to exactly 50 Mbps before this patch, and jumped to 76 Mbps with this patch. And tests on a single TCP stream with an MTU of 576 jump from 10kpps to 15kpps. With 1500 byte packets it's now possible to reach line rate versus 75 Mbps before. Cc: Nicolas Ferre Cc: Claudiu Beznea Cc: Daniel Palmer Signed-off-by: Willy Tarreau Link: https://lore.kernel.org/r/20201011090944.10607-4-w@1wt.eu Signed-off-by: Jakub Kicinski commit 73d7422813839bbcae3dd28ff0d3c48d916e0b57 Author: Willy Tarreau Date: Sun Oct 11 11:09:43 2020 +0200 macb: prepare at91 to use a 2-frame TX queue The RM9200 supports one frame being sent while another one is waiting in queue. This avoids the dead time that follows the emission of a frame and which prevents one from reaching line speed. Right now the driver supports only a single skb, so we'll first replace the rm9200-specific skb info with an array of two macb_tx_skb (already used by other drivers). This patch only moves the skb_length to txq[0].size and skb_physaddr to skb[0].mapping but doesn't perform any other change. It already uses [desc] in order to minimize future changes. Cc: Nicolas Ferre Cc: Claudiu Beznea Cc: Daniel Palmer Signed-off-by: Willy Tarreau Link: https://lore.kernel.org/r/20201011090944.10607-3-w@1wt.eu Signed-off-by: Jakub Kicinski commit fa6031df12fcbc1cd21586576046d821f2cef2e2 Author: Willy Tarreau Date: Sun Oct 11 11:09:42 2020 +0200 macb: add RM9200's interrupt flag TBRE Transmit Buffer Register Empty replaces TXERR on RM9200 and signals the sender may try to send again becase the last queued frame is no longer in queue (being transmitted or already transmitted). Cc: Nicolas Ferre Cc: Claudiu Beznea Cc: Daniel Palmer Signed-off-by: Willy Tarreau Link: https://lore.kernel.org/r/20201011090944.10607-2-w@1wt.eu Signed-off-by: Jakub Kicinski commit b5fc7a89e58bcc059a3d5e4db79c481fb437de59 Merge: 8b05418b25216 9b80e4c4ddaca Author: Linus Torvalds Date: Tue Oct 13 16:37:39 2020 -0700 Merge tag 'overflow-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull overflow update from Kees Cook: "Just a single change to help enforce all callers are actually checking the results of the helpers" * tag 'overflow-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: overflow: Add __must_check attribute to check_*() helpers commit ea47c6887b6d99e99e2cf8602384b6b7a17eaa23 Author: Suman Anna Date: Fri Oct 2 18:42:34 2020 -0500 remoteproc: k3-r5: Add loading support for on-chip SRAM regions The K3 SoCs has various internal on-chip SRAM memories like the SRAM within the MCU domain or the shared MSMC RAM within NavSS that can be used for multiple purposes. One such purpose is to have the R5F cores use a portion of such on-chip SRAM for fast-access data or to directly execute code. Add support to the K3 R5 remoteproc driver to parse and support loading into such memories. The SRAM regions need to be mapped as normal non-cacheable memory to avoid kernel crashes when the remoteproc loader code uses the Arm64 memset library function (the "DC ZVA" instruction throws a alignment fault on device type memory). These SRAM regions are completely optional as not all firmware images require these memories, and any such memory has to be reserved as such in the DTS files. Signed-off-by: Suman Anna Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201002234234.20704-5-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 34f2653686fecc9bd5a4ee16724768c72953fb57 Author: Suman Anna Date: Fri Oct 2 18:42:33 2020 -0500 remoteproc: k3-r5: Initialize TCM memories for ECC The R5F processors on K3 SoCs all have two TCMs (ATCM and BTCM) that support 32-bit ECC. The TCMs are typically loaded with some boot-up code to initialize the R5 MPUs to further execute code out of DDR. The ECC for the TCMs is enabled by default on K3 SoCs due to internal default tie-off values, but the TCM memories are not initialized on device power up. Any read access without the corresponding TCM memory location initialized will generate an ECC error, and any such access from a A72 or A53 core will trigger a SError. So, zero initialize both the TCM memories before loading any firmware onto a R5F in remoteproc mode. Any R5F booted from U-Boot/SPL would require a similar initialization in the bootloader. Note that both the TCMs are initialized unconditionally as the TCM enable config bits only manage the access and visibility from R5. Signed-off-by: Suman Anna Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201002234234.20704-4-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 6dedbd1d544389d6ab1727423348572a11e9df5d Author: Suman Anna Date: Fri Oct 2 18:42:32 2020 -0500 remoteproc: k3-r5: Add a remoteproc driver for R5F subsystem The TI K3 family of SoCs typically have one or more dual-core Arm Cortex R5F processor clusters/subsystems (R5FSS). This R5F subsystem/cluster can be configured at boot time to be either run in a LockStep mode or in an Asymmetric Multi Processing (AMP) fashion in Split-mode. This subsystem has 64 KB each Tightly-Coupled Memory (TCM) internal memories for each core split between two banks - TCMA and TCMB (further interleaved into two banks). The subsystem does not have an MMU, but has a Region Address Translater (RAT) module that is accessible only from the R5Fs for providing translations between 32-bit CPU addresses into larger system bus addresses. Add a remoteproc driver to support this subsystem to be able to load and boot the R5F cores primarily in LockStep mode. The code also includes the base support for Split mode. Error Recovery and Power Management features are not currently supported. Loading support includes the internal TCMs and DDR. RAT support is left for a future patch, and as such the reserved memory carveout regions are all expected to be using memory regions within the first 2 GB. The R5F remote processors do not have an MMU, and so require fixed memory carveout regions matching the firmware image addresses. Support for this is provided by mandating multiple memory regions to be attached to the remoteproc device. The first memory region will be used to serve as the DMA pool for all dynamic allocations like the vrings and vring buffers. The remaining memory regions are mapped into the kernel at device probe time, and are used to provide address translations for firmware image segments without the need for any RSC_CARVEOUT entries. Any firmware image using memory outside of the supplied reserved memory carveout regions will be errored out. The R5F processors on TI K3 SoCs require a specific sequence for booting and shutting down the processors. This sequence is also dependent on the mode (LockStep or Split) the R5F cluster is configured for. The R5F cores have a Memory Protection Unit (MPU) that has a default configuration that does not allow the cores to run out of DDR out of reset. This is resolved by using the TCMs for boot-strapping code that applies the appropriate executable permissions on desired DDR memory. The loading into the TCMs requires that the resets be released first with the cores in halted state. The Power Sleep Controller (PSC) module on K3 SoCs requires that the cores be in WFI/WFE states with no active bus transactions before the cores can be put back into reset. Support for this is provided by using the newly introduced .prepare() and .unprepare() ops in the remoteproc core. The .prepare() ops is invoked before any loading, and the .unprepare() ops is invoked after the remoteproc resource cleanup. The R5F core resets are deasserted in .prepare() and asserted in .unprepare(), and the cores themselves are started and halted in .start() and .stop() ops. This ensures symmetric usage and allows the R5F cores state machine to be maintained properly between using the sysfs 'state' variable, bind/unbind and regular module load/unload flows. The subsystem is represented as a single remoteproc in LockStep mode, and as two remoteprocs in Split mode. The driver uses various TI-SCI interfaces to talk to the System Controller (DMSC) for managing configuration, power and reset management of these cores. IPC between the A53 cores and the R5 cores is supported through the virtio rpmsg stack using shared memory and OMAP Mailboxes. The AM65x SoCs typically have a single R5FSS in the MCU voltage domain. The J721E SoCs uses a slightly revised IP and typically have three R5FSSs, with one cluster present within the MCU voltage domain (MCU_R5FSS0), and the remaining two clusters present in the MAIN voltage domain (MAIN_R5FSS0 and MAIN_R5FSS1). The integration of these clusters on J721E SoC is also slightly different in that these IPs do support an actual local reset line, while they are a no-op on AM65x SoCs. Signed-off-by: Suman Anna Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20201002234234.20704-3-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 5ee79c2ed5bde842cd29f6e7b84b8d67a0ca73b2 Author: Suman Anna Date: Fri Oct 2 18:42:31 2020 -0500 dt-bindings: remoteproc: Add bindings for R5F subsystem on TI K3 SoCs The Texas Instruments K3 family of SoCs have one or more dual-core Arm Cortex R5F processor subsystems/clusters (R5FSS). The clusters can be split between multiple voltage domains as well. Add the device tree bindings document for these R5F subsystem devices. These R5F processors do not have an MMU, and so require fixed memory carveout regions matching the firmware image addresses. The nodes require more than one memory region, with the first memory region used for DMA allocations at runtime. The remaining memory regions are reserved and are used for the loading and running of the R5F remote processors. The R5F processors can also optionally use any internal on-chip SRAM memories either for executing code or using it as fast-access data. The added example illustrates the DT nodes for the single R5FSS device present on K3 AM65x family of SoCs. Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20201002234234.20704-2-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 8b05418b252166be6df3766dafdb25341488ab95 Merge: 7b540812cc063 dfe719fef03d7 Author: Linus Torvalds Date: Tue Oct 13 16:33:43 2020 -0700 Merge tag 'seccomp-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp updates from Kees Cook: "The bulk of the changes are with the seccomp selftests to accommodate some powerpc-specific behavioral characteristics. Additional cleanups, fixes, and improvements are also included: - heavily refactor seccomp selftests (and clone3 selftests dependency) to fix powerpc (Kees Cook, Thadeu Lima de Souza Cascardo) - fix style issue in selftests (Zou Wei) - upgrade "unknown action" from KILL_THREAD to KILL_PROCESS (Rich Felker) - replace task_pt_regs(current) with current_pt_regs() (Denis Efremov) - fix corner-case race in USER_NOTIF (Jann Horn) - make CONFIG_SECCOMP no longer per-arch (YiFei Zhu)" * tag 'seccomp-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (23 commits) seccomp: Make duplicate listener detection non-racy seccomp: Move config option SECCOMP to arch/Kconfig selftests/clone3: Avoid OS-defined clone_args selftests/seccomp: powerpc: Set syscall return during ptrace syscall exit selftests/seccomp: Allow syscall nr and ret value to be set separately selftests/seccomp: Record syscall during ptrace entry selftests/seccomp: powerpc: Fix seccomp return value testing selftests/seccomp: Remove SYSCALL_NUM_RET_SHARE_REG in favor of SYSCALL_RET_SET selftests/seccomp: Avoid redundant register flushes selftests/seccomp: Convert REGSET calls into ARCH_GETREG/ARCH_SETREG selftests/seccomp: Convert HAVE_GETREG into ARCH_GETREG/ARCH_SETREG selftests/seccomp: Remove syscall setting #ifdefs selftests/seccomp: mips: Remove O32-specific macro selftests/seccomp: arm64: Define SYSCALL_NUM_SET macro selftests/seccomp: arm: Define SYSCALL_NUM_SET macro selftests/seccomp: mips: Define SYSCALL_NUM_SET macro selftests/seccomp: Provide generic syscall setting macro selftests/seccomp: Refactor arch register macros to avoid xtensa special case selftests/seccomp: Use __NR_mknodat instead of __NR_mknod selftests/seccomp: Use bitwise instead of arithmetic operator for flags ... commit 1843dff66857d9601e816eebc602699139c0fdb1 Author: Wang Qing Date: Thu Sep 24 14:55:04 2020 +0800 clk/qcom: fix spelling typo Modify the comment typo: "compliment" -> "complement". Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1600930506-394-1-git-send-email-wangqing@vivo.com Signed-off-by: Stephen Boyd commit 7b540812cc0635e6c7e508359115c7cb6886fd2f Merge: 01fb1e2f42d60 0d50f059c4cdc Author: Linus Torvalds Date: Tue Oct 13 16:29:55 2020 -0700 Merge tag 'selinux-pr-20201012' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: "A decent number of SELinux patches for v5.10, twenty two in total. The highlights are listed below, but all of the patches pass our test suite and merge cleanly. - A number of changes to how the SELinux policy is loaded and managed inside the kernel with the goal of improving the atomicity of a SELinux policy load operation. These changes account for the bulk of the diffstat as well as the patch count. A special thanks to everyone who contributed patches and fixes for this work. - Convert the SELinux policy read-write lock to RCU. - A tracepoint was added for audited SELinux access control events; this should help provide a more unified backtrace across kernel and userspace. - Allow the removal of security.selinux xattrs when a SELinux policy is not loaded. - Enable policy capabilities in SELinux policies created with the scripts/selinux/mdp tool. - Provide some "no sooner than" dates for the SELinux checkreqprot sysfs deprecation" * tag 'selinux-pr-20201012' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: (22 commits) selinux: provide a "no sooner than" date for the checkreqprot removal selinux: Add helper functions to get and set checkreqprot selinux: access policycaps with READ_ONCE/WRITE_ONCE selinux: simplify away security_policydb_len() selinux: move policy mutex to selinux_state, use in lockdep checks selinux: fix error handling bugs in security_load_policy() selinux: convert policy read-write lock to RCU selinux: delete repeated words in comments selinux: add basic filtering for audit trace events selinux: add tracepoint on audited events selinux: Create new booleans and class dirs out of tree selinux: Standardize string literal usage for selinuxfs directory names selinux: Refactor selinuxfs directory populating functions selinux: Create function for selinuxfs directory cleanup selinux: permit removing security.selinux xattr before policy load selinux: fix memdup.cocci warnings selinux: avoid dereferencing the policy prior to initialization selinux: fix allocation failure check on newpolicy->sidtab selinux: refactor changing booleans selinux: move policy commit after updating selinuxfs ... commit 0d9826bc18ce356e8909919ad681ad65d0a6061e Author: Pablo Neira Ayuso Date: Mon Oct 12 17:06:06 2020 +0200 netfilter: nf_log: missing vlan offload tag and proto Dump vlan tag and proto for the usual vlan offload case if the NF_LOG_MACDECODE flag is set on. Without this information the logging is misleading as there is no reference to the VLAN header. [12716.993704] test: IN=veth0 OUT= MACSRC=86:6c:92:ea:d6:73 MACDST=0e:3b:eb:86:73:76 VPROTO=8100 VID=10 MACPROTO=0800 SRC=192.168.10.2 DST=172.217.168.163 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=2548 DF PROTO=TCP SPT=55848 DPT=80 WINDOW=501 RES=0x00 ACK FIN URGP=0 [12721.157643] test: IN=veth0 OUT= MACSRC=86:6c:92:ea:d6:73 MACDST=0e:3b:eb:86:73:76 VPROTO=8100 VID=10 MACPROTO=0806 ARP HTYPE=1 PTYPE=0x0800 OPCODE=2 MACSRC=86:6c:92:ea:d6:73 IPSRC=192.168.10.2 MACDST=0e:3b:eb:86:73:76 IPDST=192.168.10.1 Fixes: 83e96d443b37 ("netfilter: log: split family specific code to nf_log_{ip,ip6,common}.c files") Signed-off-by: Pablo Neira Ayuso commit 01fb1e2f42d607ef5eb7a7ca54a0f0901fb5856c Merge: 99a6740f88e94 c07203516439b Author: Linus Torvalds Date: Tue Oct 13 16:24:42 2020 -0700 Merge tag 'audit-pr-20201012' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "A small set of audit patches for v5.10. There are only three patches in total, and all three are trivial fixes that don't really warrant any explanations beyond their descriptions. As usual, all three patches pass our test suite" * tag 'audit-pr-20201012' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: Remove redundant null check audit: uninitialize variable audit_sig_sid audit: change unnecessary globals into statics commit 254941f323702dbebe3f9145fdb1ab24c5bd23c1 Author: Willem de Bruijn Date: Tue Oct 13 15:45:08 2020 -0400 docs: networking: update XPS to account for netif_set_xps_queue With the introduction of netif_set_xps_queue, XPS can be enabled by the driver at initialization. Update the documentation to reflect this, as otherwise users may incorrectly believe that the feature is off by default. Fixes: 537c00de1c9b ("net: Add functions netif_reset_xps_queue and netif_set_xps_queue") Signed-off-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit 99a6740f88e9438cd220096d3d96eb6ba8d5c6f0 Merge: b274279a0b0c4 edd615371b668 Author: Linus Torvalds Date: Tue Oct 13 16:18:51 2020 -0700 Merge tag 'Smack-for-5.10' of git://github.com/cschaufler/smack-next Pull smack updates from Casey Schaufler: "Two minor fixes and one performance enhancement to Smack. The performance improvement is significant and the new code is more like its counterpart in SELinux. - Two kernel test robot suggested clean-ups. - Teach Smack to use the IPv4 netlabel cache. This results in a 12-14% improvement on TCP benchmarks" * tag 'Smack-for-5.10' of git://github.com/cschaufler/smack-next: Smack: Remove unnecessary variable initialization Smack: Fix build when NETWORK_SECMARK is not set Smack: Use the netlabel cache Smack: Set socket labels only once Smack: Consolidate uses of secmark into a function commit b274279a0b0c4a52ad9cd4894fce0df8d52e8e64 Merge: d594d8f411d47 a207516776769 Author: Linus Torvalds Date: Tue Oct 13 16:10:37 2020 -0700 Merge tag 'tomoyo-pr-20201012' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1 Pull tomoyo fix from Tetsuo HandaL "One patch to make it possible to execute usermode-driver's path" * tag 'tomoyo-pr-20201012' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1: tomoyo: Loosen pathname/domainname validation. commit d594d8f411d47bf7b583ec3474b11fec348c88bb Merge: 029f56db6ac24 70333f4ff9c16 Author: Linus Torvalds Date: Tue Oct 13 15:58:10 2020 -0700 Merge tag 'printk-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk updates from Petr Mladek: "The big new thing is the fully lockless ringbuffer implementation, including the support for continuous lines. It will allow to store and read messages in any situation wihtout the risk of deadlocks and without the need of temporary per-CPU buffers. The access is still serialized by logbuf_lock. It synchronizes few more operations, for example, temporary buffer for formatting the message, syslog and kmsg_dump operations. The lock removal is being discussed and should be ready for the next release. The continuous lines are handled exactly the same way as before to avoid regressions in user space. It means that they are appended to the last message when the caller is the same. Only the last message can be extended. The data ring includes plain text of the messages. Except for an integer at the beginning of each message that points back to the descriptor ring with other metadata. The dictionary has to stay. journalctl uses it to filter the log. It allows to show messages related to a given device. The dictionary values are stored in the descriptor ring with the other metadata. This is the first part of the printk rework as discussed at Plumbers 2019, see https://lore.kernel.org/r/87k1acz5rx.fsf@linutronix.de. The next big step will be handling consoles by kthreads during the normal system operation. It will require special handling of situations when the kthreads could not get scheduled, for example, early boot, suspend, panic. Other changes: - Add John Ogness as a reviewer for printk subsystem. He is author of the rework and is familiar with the code and history. - Fix locking in serial8250_do_startup() to prevent lockdep report. - Few code cleanups" * tag 'printk-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: (27 commits) printk: Use fallthrough pseudo-keyword printk: reduce setup_text_buf size to LOG_LINE_MAX printk: avoid and/or handle record truncation printk: remove dict ring printk: move dictionary keys to dev_printk_info printk: move printk_info into separate array printk: reimplement log_cont using record extension printk: ringbuffer: add finalization/extension support printk: ringbuffer: change representation of states printk: ringbuffer: clear initial reserved fields printk: ringbuffer: add BLK_DATALESS() macro printk: ringbuffer: relocate get_data() printk: ringbuffer: avoid memcpy() on state_var printk: ringbuffer: fix setting state in desc_read() kernel.h: Move oops_in_progress to printk.h scripts/gdb: update for lockless printk ringbuffer scripts/gdb: add utils.read_ulong() docs: vmcoreinfo: add lockless printk ringbuffer vmcoreinfo printk: reduce LOG_BUF_SHIFT range for H8300 printk: ringbuffer: support dataless records ... commit a68224832118b32b0fd0226f7626b051c442125e Author: Fabien Parent Date: Fri Sep 18 15:23:03 2020 +0200 clk: mediatek: Add MT8167 clock support Add the following clock support for MT8167 SoC: topckgen, apmixedsys, infracfg, audsys, imgsys, mfgcfg, vdecsys. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20200918132303.2831815-2-fparent@baylibre.com Signed-off-by: Stephen Boyd commit 8adea9b9459cf2ea9538cd0765a12200306179df Author: Fabien Parent Date: Fri Sep 18 15:23:02 2020 +0200 dt-bindings: clock: mediatek: add bindings for MT8167 clocks Add binding documentation for topckgen, apmixedsys, infracfg, audsys, imgsys, mfgcfg, vdecsys on MT8167 SoC. Signed-off-by: Fabien Parent Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200918132303.2831815-1-fparent@baylibre.com Signed-off-by: Stephen Boyd commit 640eee067d9aae0bb98d8706001976ff1affaf00 Merge: 0d2e90f47c4f8 d3c8f2784d326 Author: Dave Airlie Date: Wed Oct 14 07:25:51 2020 +1000 Merge tag 'drm-misc-next-fixes-2020-10-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-next One fix for a bad revert in ingenic-drm, and one fix for panfrost to increase a timeout at power up. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201013065709.lwjw3fthoxwsbqsl@gilmour.lan commit 6c59a17b0d59dbffa62d0b3b8e648ccad02ea82f Author: Dan Murphy Date: Fri Oct 9 07:12:05 2020 -0500 power: supply: bq25980: Fix uninitialized wd_reg_val and overrun Fix the issue when 'i' is equal to array size then array index over runs the array when checking for the watch dog value. Fixes: 5069185fc18e ("power: supply: bq25980: Add support for the BQ259xx family") Signed-off-by: Dan Murphy Signed-off-by: Sebastian Reichel commit d8f53b0ab0337762cc9e7b50d0c60b5bd091a0e1 Author: Damien Le Moal Date: Thu Sep 24 13:53:30 2020 -0700 scsi: handle zone resources errors ZBC or ZAC disks that have a limit on the number of open zones may fail a zone open command or a write to a zone that is not already implicitly or explicitly open if the total number of open zones is already at the maximum allowed. For these operations, instead of returning the generic BLK_STS_IOERR, return BLK_STS_ZONE_OPEN_RESOURCE which is returned as -ETOOMANYREFS to the I/O issuer, allowing the device user to act appropriately on these relatively benign zone resource errors. Acked-by: Martin K. Petersen Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit afaf5c6c81d736d7a3376801f4af396b04292191 Author: Keith Busch Date: Thu Sep 24 13:53:29 2020 -0700 nvme: translate zone resource errors Translate zoned resource errors to the appropriate blk_status_t. Reviewed-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 3b481d91356e5693d8358d4ef9c383bdb92c8da0 Author: Keith Busch Date: Thu Sep 24 13:53:28 2020 -0700 block: add zone specific block statuses A zoned device with limited resources to open or activate zones may return an error when the host exceeds those limits. The same command may be successful if retried later, but the host needs to wait for specific zone states before it should expect a retry to succeed. Have the block layer provide an appropriate status for these conditions so applications can distinuguish this error for special handling. Cc: linux-api@vger.kernel.org Cc: Niklas Cassel Reviewed-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 47be77c2f80412f903134a57caea25fa3fc5f578 Author: Gioh Kim Date: Tue Oct 13 12:30:50 2020 +0200 block/rnbd-clt: send_msg_close if any error occurs after send_msg_open After send_msg_open is done, send_msg_close should be done if any error occurs and it is necessary to recover what has been done. Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 050b654b2a70a978873bd5885a615c6a47c6205a Author: Jack Wang Date: Tue Oct 13 12:30:49 2020 +0200 block/rnbd-clt: do not cap max_hw_sectors & max_segments with remote device The max_hw_secotrs is only limited by the transport, not remote device, block layer on server side will split to the device limit if it's too big. The max_segments, similar, and rtrs server will submit single buffer, so no need to cap. Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 46a99e0cf6a4990b81bff1d6df0865a7b3a7cea2 Author: Guoqing Jiang Date: Tue Oct 13 12:30:48 2020 +0200 block/rnbd-clt: remove nr argument from send_usr_msg The argument is not needed since all callers pass 1 for it. Signed-off-by: Guoqing Jiang Signed-off-by: Jack Wang Signed-off-by: Jens Axboe commit 029f56db6ac248769f2c260bfaf3c3c0e23e904c Merge: 7cd4ecd9177b9 aa5cacdc29d76 Author: Linus Torvalds Date: Tue Oct 13 13:36:07 2020 -0700 Merge tag 'x86_asm_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Borislav Petkov: "Two asm wrapper fixes: - Use XORL instead of XORQ to avoid a REX prefix and save some bytes in the .fixup section, by Uros Bizjak. - Replace __force_order dummy variable with a memory clobber to fix LLVM requiring a definition for former and to prevent memory accesses from still being cached/reordered, by Arvind Sankar" * tag 'x86_asm_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/asm: Replace __force_order with a memory clobber x86/uaccess: Use XORL %0,%0 in __get_user_asm() commit 7cd4ecd9177b94af783b8e21de7c65b41a871342 Merge: 79ec6d9cac46d 79cd16681accc Author: Linus Torvalds Date: Tue Oct 13 13:04:41 2020 -0700 Merge tag 'drivers-5.10-2020-10-12' of git://git.kernel.dk/linux-block Pull block driver updates from Jens Axboe: "Here are the driver updates for 5.10. A few SCSI updates in here too, in coordination with Martin as they depend on core block changes for the shared tag bitmap. This contains: - NVMe pull requests via Christoph: - fix keep alive timer modification (Amit Engel) - order the PCI ID list more sensibly (Andy Shevchenko) - cleanup the open by controller helper (Chaitanya Kulkarni) - use an xarray for the CSE log lookup (Chaitanya Kulkarni) - support ZNS in nvmet passthrough mode (Chaitanya Kulkarni) - fix nvme_ns_report_zones (Christoph Hellwig) - add a sanity check to nvmet-fc (James Smart) - fix interrupt allocation when too many polled queues are specified (Jeffle Xu) - small nvmet-tcp optimization (Mark Wunderlich) - fix a controller refcount leak on init failure (Chaitanya Kulkarni) - misc cleanups (Chaitanya Kulkarni) - major refactoring of the scanning code (Christoph Hellwig) - MD updates via Song: - Bug fixes in bitmap code, from Zhao Heming - Fix a work queue check, from Guoqing Jiang - Fix raid5 oops with reshape, from Song Liu - Clean up unused code, from Jason Yan - Discard improvements, from Xiao Ni - raid5/6 page offset support, from Yufen Yu - Shared tag bitmap for SCSI/hisi_sas/null_blk (John, Kashyap, Hannes) - null_blk open/active zone limit support (Niklas) - Set of bcache updates (Coly, Dongsheng, Qinglang)" * tag 'drivers-5.10-2020-10-12' of git://git.kernel.dk/linux-block: (78 commits) md/raid5: fix oops during stripe resizing md/bitmap: fix memory leak of temporary bitmap md: fix the checking of wrong work queue md/bitmap: md_bitmap_get_counter returns wrong blocks md/bitmap: md_bitmap_read_sb uses wrong bitmap blocks md/raid0: remove unused function is_io_in_chunk_boundary() nvme-core: remove extra condition for vwc nvme-core: remove extra variable nvme: remove nvme_identify_ns_list nvme: refactor nvme_validate_ns nvme: move nvme_validate_ns nvme: query namespace identifiers before adding the namespace nvme: revalidate zone bitmaps in nvme_update_ns_info nvme: remove nvme_update_formats nvme: update the known admin effects nvme: set the queue limits in nvme_update_ns_info nvme: remove the 0 lba_shift check in nvme_update_ns_info nvme: clean up the check for too large logic block sizes nvme: freeze the queue over ->lba_shift updates nvme: factor out a nvme_configure_metadata helper ... commit 79bbbabd227897745786e81ed814ad86c5e1295d Author: Arnaldo Carvalho de Melo Date: Tue Oct 13 17:03:19 2020 -0300 perf config: Export the perf_config_from_file() function We'll use it to ask for extra config files to be loaded, profile like stuff that will be used first to make 'perf trace' mimic 'strace' output via a 'perf strace' command that just sets up 'perf trace' output. At some point it'll be used for regression tests, where we'll run some simple commands like: perf strace ls > perf-strace.output strace ls > strace.output And then do some mutable syscall arg aware diff like tool to deal with arguments for things like mmap, that change at each execution, to be first ignored and then properly tracked when used accoss multiple syscalls. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 61ca2c4afd9d108899e0fa48e7b1cfc9afe80596 Author: Sargun Dhillon Date: Mon Oct 12 14:43:39 2020 -0700 NFS: Only reference user namespace from nfs4idmap struct instead of cred The nfs4idmapper only needs access to the user namespace, and not the entire cred struct. This replaces the struct cred* member with struct user_namespace*. This is mostly hygiene, so we don't have to hold onto the cred object, which has extraneous references to things like user_struct. This also makes switching away from init_user_ns more straightforward in the future. Signed-off-by: Sargun Dhillon Signed-off-by: Anna Schumaker commit 79ec6d9cac46d59db9b006bc9cde2811ef365292 Merge: 6ad4bf6ea1609 45aefe3d2251e Author: Linus Torvalds Date: Tue Oct 13 12:50:48 2020 -0700 Merge tag 'libata-5.10-2020-10-12' of git://git.kernel.dk/linux-block Pull libata updates from Jens Axboe: "Nothing major in here, just fixes or improvements collected over the last few months" * tag 'libata-5.10-2020-10-12' of git://git.kernel.dk/linux-block: ata: ahci: mvebu: Make SATA PHY optional for Armada 3720 MAINTAINERS: remove LIBATA PATA DRIVERS entry pata_cmd64x: Use fallthrough pseudo-keyword ahci: qoriq: enable acpi support in qoriq ahci driver sata, highbank: simplify the return expression of ahci_highbank_suspend ahci: Add Intel Rocket Lake PCH-H RAID PCI IDs commit 6ad4bf6ea1609fb539a62f10fca87ddbd53a0315 Merge: 3ad11d7ac8872 b2e9685283127 Author: Linus Torvalds Date: Tue Oct 13 12:36:21 2020 -0700 Merge tag 'io_uring-5.10-2020-10-12' of git://git.kernel.dk/linux-block Pull io_uring updates from Jens Axboe: - Add blkcg accounting for io-wq offload (Dennis) - A use-after-free fix for io-wq (Hillf) - Cancelation fixes and improvements - Use proper files_struct references for offload - Cleanup of io_uring_get_socket() since that can now go into our own header - SQPOLL fixes and cleanups, and support for sharing the thread - Improvement to how page accounting is done for registered buffers and huge pages, accounting the real pinned state - Series cleaning up the xarray code (Willy) - Various cleanups, refactoring, and improvements (Pavel) - Use raw spinlock for io-wq (Sebastian) - Add support for ring restrictions (Stefano) * tag 'io_uring-5.10-2020-10-12' of git://git.kernel.dk/linux-block: (62 commits) io_uring: keep a pointer ref_node in file_data io_uring: refactor *files_register()'s error paths io_uring: clean file_data access in files_register io_uring: don't delay io_init_req() error check io_uring: clean leftovers after splitting issue io_uring: remove timeout.list after hrtimer cancel io_uring: use a separate struct for timeout_remove io_uring: improve submit_state.ios_left accounting io_uring: simplify io_file_get() io_uring: kill extra check in fixed io_file_get() io_uring: clean up ->files grabbing io_uring: don't io_prep_async_work() linked reqs io_uring: Convert advanced XArray uses to the normal API io_uring: Fix XArray usage in io_uring_add_task_file io_uring: Fix use of XArray in __io_uring_files_cancel io_uring: fix break condition for __io_uring_register() waiting io_uring: no need to call xa_destroy() on empty xarray io_uring: batch account ->req_issue and task struct references io_uring: kill callback_head argument for io_req_task_work_add() io_uring: move req preps out of io_issue_sqe() ... commit 79373082fa9de8bea909836ee33ca0bc199f71f6 Author: James Clark Date: Mon Oct 5 09:06:45 2020 +0100 perf python: Autodetect python3 binary Some distros don't come with python2 and only have python3 available. This causes the "'import perf' in python" self test to fail. This change adds python3 to the list of possible python versions that are autodetected but maintains the priorities for 'python2' and 'python' detection. Python3 has the lowest priority. Committer notes: On a fedora system without python2 packages the 'perf test python' continues to work: # python2 bash: python2: command not found... Similar command is: 'python' # rpm -qa | grep python2 # That "Similar command" gives the clue: # rpm -qf /usr/bin/python python-unversioned-command-3.8.5-5.fc32.noarch # rpm -ql python-unversioned-command /usr/bin/python /usr/share/man/man1/python.1.gz # With it in place the 'python' binary is found and perf builds the python binding using python3: # perf test -v python 19: 'import perf' in python : --- start --- test child forked, pid 379988 python usage test: "echo "import sys ; sys.path.append('/tmp/build/perf/python'); import perf" | '/usr/bin/python' " test child finished with 0 ---- end ---- 'import perf' in python: Ok # Looking at that path: # ls -la /tmp/build/perf/python total 1864 drwxrwxr-x. 2 acme acme 60 Oct 13 16:20 . drwxrwxr-x. 18 acme acme 4420 Oct 13 16:28 .. -rwxrwxr-x. 1 acme acme 1907216 Oct 13 16:28 perf.cpython-38-x86_64-linux-gnu.so # And: # ldd ~/bin/perf | grep python libpython3.8.so.1.0 => /lib64/libpython3.8.so.1.0 (0x00007f5471187000) # As soon as we remove it: # rpm -e python-unversioned-command-3.8.5-5.fc32.noarch # hash -r # python bash: python: command not found... Install package 'python-unversioned-command' to provide command 'python'? [N/y] n # And rebuilding perf now doesn't find python in the system: make: Entering directory '/home/acme/git/perf/tools/perf' BUILD: Doing 'make -j24' parallel build Makefile.config:786: No python interpreter was found: disables Python support - please install python-devel/python-dev After this patch: $ rpm -qi python-unversioned-command package python-unversioned-command is not installed $ $ python bash: python: command not found... Install package 'python-unversioned-command' to provide command 'python'? [N/y] ^C $ $ m make: Entering directory '/home/acme/git/perf/tools/perf' BUILD: Doing 'make -j24' parallel build CC /tmp/build/perf/tests/attr.o CC /tmp/build/perf/tests/python-use.o DESCEND plugins GEN /tmp/build/perf/python/perf.so INSTALL trace_plugins LD /tmp/build/perf/tests/perf-in.o LD /tmp/build/perf/perf-in.o LINK /tmp/build/perf/perf make: Leaving directory '/home/acme/git/perf/tools/perf' 19: 'import perf' in python : Ok $ ldd ~/bin/perf | grep python libpython3.8.so.1.0 => /lib64/libpython3.8.so.1.0 (0x00007f2c8c708000) $ ls -la /tmp/build/perf/python total 1864 drwxrwxr-x. 2 acme acme 60 Oct 13 16:20 . drwxrwxr-x. 18 acme acme 4420 Oct 13 16:31 .. -rwxrwxr-x. 1 acme acme 1907216 Oct 13 16:31 perf.cpython-38-x86_64-linux-gnu.so $ Signed-off-by: James Clark Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra LPU-Reference: 20201005080645.6588-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 0fd0f00fdbc9fdae7651b048d546fdfab2e47fce Author: Arnaldo Carvalho de Melo Date: Tue Oct 13 16:22:03 2020 -0300 perf tests: Show python test script in verbose mode To help figure out where it is getting the binding. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 3ad11d7ac8872b1c8da54494721fad8907ee41f7 Merge: 857d64485e7c9 8858e8d98d545 Author: Linus Torvalds Date: Tue Oct 13 12:12:44 2020 -0700 Merge tag 'block-5.10-2020-10-12' of git://git.kernel.dk/linux-block Pull block updates from Jens Axboe: - Series of merge handling cleanups (Baolin, Christoph) - Series of blk-throttle fixes and cleanups (Baolin) - Series cleaning up BDI, seperating the block device from the backing_dev_info (Christoph) - Removal of bdget() as a generic API (Christoph) - Removal of blkdev_get() as a generic API (Christoph) - Cleanup of is-partition checks (Christoph) - Series reworking disk revalidation (Christoph) - Series cleaning up bio flags (Christoph) - bio crypt fixes (Eric) - IO stats inflight tweak (Gabriel) - blk-mq tags fixes (Hannes) - Buffer invalidation fixes (Jan) - Allow soft limits for zone append (Johannes) - Shared tag set improvements (John, Kashyap) - Allow IOPRIO_CLASS_RT for CAP_SYS_NICE (Khazhismel) - DM no-wait support (Mike, Konstantin) - Request allocation improvements (Ming) - Allow md/dm/bcache to use IO stat helpers (Song) - Series improving blk-iocost (Tejun) - Various cleanups (Geert, Damien, Danny, Julia, Tetsuo, Tian, Wang, Xianting, Yang, Yufen, yangerkun) * tag 'block-5.10-2020-10-12' of git://git.kernel.dk/linux-block: (191 commits) block: fix uapi blkzoned.h comments blk-mq: move cancel of hctx->run_work to the front of blk_exit_queue blk-mq: get rid of the dead flush handle code path block: get rid of unnecessary local variable block: fix comment and add lockdep assert blk-mq: use helper function to test hw stopped block: use helper function to test queue register block: remove redundant mq check block: invoke blk_mq_exit_sched no matter whether have .exit_sched percpu_ref: don't refer to ref->data if it isn't allocated block: ratelimit handle_bad_sector() message blk-throttle: Re-use the throtl_set_slice_end() blk-throttle: Open code __throtl_de/enqueue_tg() blk-throttle: Move service tree validation out of the throtl_rb_first() blk-throttle: Move the list operation after list validation blk-throttle: Fix IO hang for a corner case blk-throttle: Avoid tracking latency if low limit is invalid blk-throttle: Avoid getting the current time if tg->last_finish_time is 0 blk-throttle: Remove a meaningless parameter for throtl_downgrade_state() block: Remove redundant 'return' statement ... commit 6cf4ecf5c51d735433b3348ad055187536b1b4b6 Author: Vasily Gorbik Date: Fri Oct 9 14:25:23 2020 +0200 perf build: Allow nested externs to enable BUILD_BUG() usage Currently BUILD_BUG() macro is expanded to smth like the following: do { extern void __compiletime_assert_0(void) __attribute__((error("BUILD_BUG failed"))); if (!(!(1))) __compiletime_assert_0(); } while (0); If used in a function body this obviously would produce build errors with -Wnested-externs and -Werror. To enable BUILD_BUG() usage in tools/arch/x86/lib/insn.c which perf includes in intel-pt-decoder, build perf without -Wnested-externs. Reported-by: Stephen Rothwell Signed-off-by: Vasily Gorbik Acked-by: Jiri Olsa Tested-by: Stephen Rothwell # build tested Cc: Alexander Shishkin Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lore.kernel.org/lkml/patch-1.thread-251403.git-2514037e9477.your-ad-here.call-01602244460-ext-7088@work.hours Signed-off-by: Arnaldo Carvalho de Melo commit 857d64485e7c920364688a8a6dd0ffe5774327b6 Merge: c4439713e82a0 081dd68c89061 Author: Linus Torvalds Date: Tue Oct 13 12:02:57 2020 -0700 Merge tag 'x86_urgent_for_v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Fix the #DE oops message string format which confused tools parsing crash information (Thomas Gleixner) - Remove an unused variable in the UV5 code which was triggering a build warning with clang (Mike Travis) * tag 'x86_urgent_for_v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/uv: Remove unused variable in UV5 NMI handler x86/traps: Fix #DE Oops message regression commit 441848282c59038b6e9a57b233ac6a9449430648 Author: Rob Herring Date: Thu Oct 8 09:24:20 2020 -0500 dt: Remove booting-without-of.rst booting-without-of.rst is an ancient document that first outlined Flattened DeviceTree on PowerPC initially. The DT world has evolved a lot in the 15 years since and booting-without-of.rst is pretty stale. The name of the document itself is confusing if you don't understand the evolution from real 'OpenFirmware'. Most of what booting-without-of.rst contains is now in the DT specification (which evolved out of the ePAPR). The few things that weren't documented in the DT specification are now. All that remains is the boot entry details, so let's move these to arch specific documents. The exception is arm which already has the same details documented. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Cc: Geert Uytterhoeven Cc: Michael Ellerman Cc: Thomas Bogendoerfer Cc: Jonathan Corbet Cc: Paul Mackerras Cc: Yoshinori Sato Cc: Rich Felker Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-mips@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-sh@vger.kernel.org Acked-by: Benjamin Herrenschmidt Acked-by: Borislav Petkov Acked-by: Michael Ellerman (powerpc) Signed-off-by: Rob Herring commit 081dd68c89061077930ec7776d98837cb64b0405 Author: Mike Travis Date: Tue Oct 13 10:47:31 2020 -0500 x86/platform/uv: Remove unused variable in UV5 NMI handler Remove an unused variable. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201013154731.132565-1-mike.travis@hpe.com commit 5f1ec1fd32252af5130dac23b5542e8e66fe0bcb Author: Thomas Gleixner Date: Mon Oct 12 15:11:47 2020 +0200 x86/traps: Fix #DE Oops message regression The conversion of #DE to the idtentry mechanism introduced a change in the Ooops message which confuses tools which parse crash information in dmesg. Remove the underscore from 'divide_error' to restore previous behaviour. Fixes: 9d06c4027f21 ("x86/entry: Convert Divide Error to IDTENTRY") Reported-by: Dmitry Vyukov Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/CACT4Y+bTZFkuZd7+bPArowOv-7Die+WZpfOWnEO_Wgs3U59+oA@mail.gmail.com commit c4439713e82a0d746e533ae5ddd7dfa832e2a486 Merge: 0486beaf88d24 9b20aec24b8ab Author: Linus Torvalds Date: Tue Oct 13 10:15:31 2020 -0700 Merge tag 'hwmon-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New driver and chip support: - Moortec MR75203 PVT controller - MPS Multi-phase mp2975 controller - ADM1266 - Zen3 CPUs - Intel MAX 10 BMC Enhancements: - Support for rated attributes in hwmon core - MAX20730: - Device monitoring via debugfs - VOUT readin adjustment vie devicetree bindings - LM75: - Devicetree support - Regulator support - Improved accumulationm logic in amd_energy driver - Added fan sensor to gsc-hwmon driver - Support for simplified I2C probing Various other minor fixes and improvements" * tag 'hwmon-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (64 commits) hwmon: (pmbus/max20730) adjust the vout reading given voltage divider dt-bindings: hwmon: max20730: adding device tree doc for max20730 hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller hwmon: Add DT bindings schema for PVT controller dt-bindings: hwmon: Add the +vs supply to the lm75 bindings dt-bindings: hwmon: Convert lm75 bindings to yaml docs: hwmon: (ltc2945) update datasheet link hwmon: (mlxreg-fan) Fix double "Mellanox" hwmon: (pmbus/max20730) add device monitoring via debugfs hwmon: (pmbus/max34440) Fix OC fault limits hwmon: (bt1-pvt) Wait for the completion with timeout hwmon: (bt1-pvt) Cache current update timeout hwmon: (bt1-pvt) Test sensor power supply on probe hwmon: (lm75) Add regulator support hwmon: Add hwmon driver for Intel MAX 10 BMC dt-bindings: Add MP2975 voltage regulator device hwmon: (pmbus) Add support for MPS Multi-phase mp2975 controller hwmon: (tmp513) fix spelling typo in comments hwmon: (amd_energy) Update driver documentation hwmon: (amd_energy) Improve the accumulation logic ... commit 83e491799e631dd41e7c7a870dd3a7603c461123 Author: Diana Craciun Date: Tue Oct 13 18:06:51 2020 +0300 vfio/fsl-mc: Fixed vfio-fsl-mc driver compilation on 32 bit The FSL_MC_BUS on which the VFIO-FSL-MC driver is dependent on can be compiled on other architectures as well (not only ARM64) including 32 bit architectures. Include linux/io-64-nonatomic-hi-lo.h to make writeq/readq used in the driver available on 32bit platforms. Signed-off-by: Diana Craciun Signed-off-by: Alex Williamson commit 0486beaf88d2460e9dbcbba281dab683a838f0c6 Merge: a996b9c61729c fc709df553a34 Author: Linus Torvalds Date: Tue Oct 13 10:09:33 2020 -0700 Merge tag 'gpio-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This time very little driver changes but lots of core changes. We have some interesting cooperative work for ARM and Intel alike, making the GPIO subsystem more and more suitable for industrial systems and the like, in addition to the in-kernel users. We touch driver core (device properties) and lib/* by adding one simple string array free function, these are authored by Andy Shevchenko who is a well known and recognized core helpers maintainers so this should be fine. We also see some Android GKI-related modularization in the MXC drivers. Core changes: - The big core change is the updated (v2) userspace character device API. This corrects badly designed 64-bit alignment around the line events. We also add the debounce request feature. This echoes the often quotes passage from Frederick Brooks "The mythical man-month" to always throw one away, which we have seen before in things such as V4L2. So we put in a new one and deprecate and obsolete the old one. - All example tools in tools/gpio/* are migrated to the new API to set a good example. The libgpiod userspace library has been augmented to use this new API pretty much from day 1. - Some misc API hardening by using strn* function calls has been added as well. - Use the simpler IDA interface for GPIO chip instance enumeration. - Add device core function for counting string arrays in device properties. - Provide a generic library function kfree_strarray() that can be used throughout the kernel. Driver enhancements: - The DesignWare dwapb-gpio driver has been enhanced and now uses the IRQ handling in the gpiolib core. - The mockup and aggregator drivers have seen some substantial code clean-up and now use more of the core kernel inftrastructure. - Misc cleanups using dev_err_probe(). - The MXC drivers (Freescale/NXP) can now be built modularized, which makes modularized GKI Android kernels happy" * tag 'gpio-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (73 commits) gpiolib: Update header block in gpiolib-cdev.h gpiolib: cdev: switch from kstrdup() to kstrndup() docs: gpio: add a new document to its index.rst gpio: pca953x: Add support for the NXP PCAL9554B/C tools: gpio: add debounce support to gpio-event-mon tools: gpio: add multi-line monitoring to gpio-event-mon tools: gpio: port gpio-event-mon to v2 uAPI tools: gpio: port gpio-hammer to v2 uAPI tools: gpio: rename nlines to num_lines tools: gpio: port gpio-watch to v2 uAPI tools: gpio: port lsgpio to v2 uAPI gpio: uapi: document uAPI v1 as deprecated gpiolib: cdev: support setting debounce gpiolib: cdev: support GPIO_V2_LINE_SET_VALUES_IOCTL gpiolib: cdev: support GPIO_V2_LINE_SET_CONFIG_IOCTL gpiolib: cdev: support edge detection for uAPI v2 gpiolib: cdev: support GPIO_V2_GET_LINEINFO_IOCTL and GPIO_V2_GET_LINEINFO_WATCH_IOCTL gpiolib: cdev: support GPIO_V2_GET_LINE_IOCTL and GPIO_V2_LINE_GET_VALUES_IOCTL gpiolib: add build option for CDEV v1 ABI gpiolib: make cdev a build option ... commit a996b9c61729cd1507e48303c214dc317df890e2 Merge: 1724e02e024ad 988731181359e Author: Linus Torvalds Date: Tue Oct 13 10:03:12 2020 -0700 Merge tag 'spi-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "There's quite a lot of changes for SPI in this release but none in the core, they're all mostly small driver updates and additions. Some of the more notable changes include: - A huge set of cleanups, optimizations and improvements for the DesignWare driver from Serge Semin finishing up the work started last release. - Conversion of the Zynq gqspi driver to spi-mem. - Support for Baikal T1, Broadcom BCMSTB 7445, and Renesas R8A7742" * tag 'spi-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (137 commits) spi: cadence: Add SPI transfer delays spi: dw: Add Baikal-T1 SPI Controller bindings spi: dw: Add Baikal-T1 SPI Controller glue driver spi: dw: Add poll-based SPI transfers support spi: dw: Introduce max mem-ops SPI bus frequency setting spi: dw: Add memory operations support spi: dw: Add generic DW SSI status-check method spi: dw: Move num-of retries parameter to the header file spi: dw: Explicitly de-assert CS on SPI transfer completion spi: dw: De-assert chip-select on reset spi: dw: Discard chip enabling on DMA setup error spi: dw: Unmask IRQs after enabling the chip spi: dw: Perform IRQ setup in a dedicated function spi: dw: Refactor IRQ-based SPI transfer procedure spi: dw: Refactor data IO procedure spi: dw: Add DW SPI controller config structure spi: dw: Update Rx sample delay in the config function spi: dw: Simplify the SPI bus speed config procedure spi: dw: Update SPI bus speed in a config function spi: dw: Detach SPI device specific CR0 config method ... commit f3013f7ed465479e60c1ab1921a5718fc541cc3b Author: Jiri Slaby Date: Thu Oct 1 11:34:19 2020 +0200 perf trace: Fix off by ones in memset() after realloc() in arches using libaudit 'perf trace ls' started crashing after commit d21cb73a9025 on !HAVE_SYSCALL_TABLE_SUPPORT configs (armv7l here) like this: 0 strlen () at ../sysdeps/arm/armv6t2/strlen.S:126 1 0xb6800780 in __vfprintf_internal (s=0xbeff9908, s@entry=0xbeff9900, format=0xa27160 "]: %s()", ap=..., mode_flags=) at vfprintf-internal.c:1688 ... 5 0x0056ecdc in fprintf (__fmt=0xa27160 "]: %s()", __stream=) at /usr/include/bits/stdio2.h:100 6 trace__sys_exit (trace=trace@entry=0xbeffc710, evsel=evsel@entry=0xd968d0, event=, sample=sample@entry=0xbeffc3e8) at builtin-trace.c:2475 7 0x00566d40 in trace__handle_event (sample=0xbeffc3e8, event=, trace=0xbeffc710) at builtin-trace.c:3122 ... 15 main (argc=2, argv=0xbefff6e8) at perf.c:538 It is because memset in trace__read_syscall_info zeroes wrong memory: 1) when initializing for the first time, it does not reset the last id. 2) in other cases, it resets the last id of previous buffer. ad 1) it causes the crash above as sc->name used in the fprintf above contains garbage. ad 2) it sets nonexistent from true back to false for id 11 here. Not sure, what the consequences are. So fix it by introducing a special case for the initial initialization and do the right +1 in both cases. Fixes: d21cb73a9025 ("perf trace: Grow the syscall table as needed when using libaudit") Signed-off-by: Jiri Slaby Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20201001093419.15761-1-jslaby@suse.cz Signed-off-by: Arnaldo Carvalho de Melo commit 1724e02e024adf5a17da12fad6819e30d304da7d Merge: 57218d7f2e870 c6e70a6fd5cef Author: Linus Torvalds Date: Tue Oct 13 09:56:25 2020 -0700 Merge tag 'regulator-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This is a fairly small release for the regulator API, there's quite a few new devices supported and some important improvements around coupled regulators in the core but mostly just small fixes and improvements otherwise. Summary: - Fixes and cleanups around the handling of coupled regulators. - A special driver for some Raspberry Pi panels with some unusually custom stuff around them. - Support for Qualcomm PM660/PM660L, PM8950 and PM8953, Richtek RT4801 and RTMV20, Rohm BD9576MUF and BD9573MUF" * tag 'regulator-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (89 commits) regulator: bd9576: Fix print regulator: bd9576: fix regulator binfdings dt node names dt-bindings: regulator: document pm8950 and pm8953 smd regulators regulator: qcom_smd: add pm8953 regulators regulator: Make constraint debug processing conditional on DEBUG regulator: qcom: labibb: Constify static structs regulator: dt-bindings: Document the PM660/PM660L PMICs entries regulator: qcom_smd: Add PM660/PM660L regulator support regulator: dt-bindings: Document the PM660/660L SPMI PMIC entries regulator: qcom_spmi: Add PM660/PM660L regulators regulator: qcom_spmi: Add support for new regulator types regulator: core: Enlarge max OF property name length to 64 chars regulator: tps65910: use regmap accessors regulator: rtmv20: Add missing regcache cache only before marked as dirty regulator: rtmv20: Update DT binding document and property name parsing regulator: rtmv20: Add DT-binding document for Richtek RTMV20 regulator: rtmv20: Adds support for Richtek RTMV20 load switch regulator regulator: resolve supply after creating regulator regulator: print symbolic errors in kernel messages regulator: print state at boot ... commit 57218d7f2e87069f73c7a841b6ed6c1cc7acf616 Merge: fd5c32d808842 6e0545c4f0836 Author: Linus Torvalds Date: Tue Oct 13 09:53:59 2020 -0700 Merge tag 'regmap-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "Quite a busy release for regmap, mostly support for new features useful on fairly small subsets of devices. The user visible features are: - A new API for registering large numbers of regmap fields at once. - Support for Intel AVMM buses connected via SPI. - Support for 12/20 address/value layouts. - Support for yet another scheme for acknowledging interrupts used on some Qualcomm devices" * tag 'regmap-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: irq: Add support to clear ack registers regmap: add support to regmap_field_bulk_alloc/free apis regmap: destroy mutex (if used) in regmap_exit() regmap: debugfs: use semicolons rather than commas to separate statements regmap: debugfs: Fix more error path regressions regmap: Add support for 12/20 register formatting regmap: Add can_sleep configuration option regmap: soundwire: remove unused header mod_devicetable.h regmap: Use flexible sleep regmap: add Intel SPI Slave to AVMM Bus Bridge support commit fd5c32d80884268a381ed0e67cccef0b3d37750b Merge: 647412daeb454 c386e0797d26a Author: Linus Torvalds Date: Tue Oct 13 09:37:02 2020 -0700 Merge tag 'media/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - the usbvision driver was dropped from staging - the Zoran driver were re-added at staging. It gained lots of improvements, and was converted to use videobuf2 API - a new virtual driver (vidtv) was added in order to allow testing the digital TV framework and APIs - the media uAPI documentation gained a glossary with commonly used terms, helping to simplify some parts of the docs - more cleanups at the atomisp driver - Mediatek VPU gained support for MT8183 - added support for codecs with supports doing colorspace conversion (CSC) - support for CSC API was added at vivid and rksip1 drivers - added a helper core support and uAPI for better supporting H.264 codecs - added support for Renesas R8A774E1 - use the new SPDX GFDL-1.1-no-invariants-or-later license on media uAPI docs, instead of a license text - Venus driver has gained VP9 codec support - lots of other cleanups and driver improvements * tag 'media/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (555 commits) media: dvb-frontends/drxk_hard.c: fix uninitialized variable warning media: tvp7002: fix uninitialized variable warning media: s5k5baf: drop 'data' field in struct s5k5baf_fw media: dt-bindings: media: venus: Add an optional power domain for perf voting media: rcar-vin: rcar-dma: Fix setting VNIS_REG for RAW8 formats media: staging: rkisp1: uapi: Do not use BIT() macro media: v4l2-mem2mem: Fix spurious v4l2_m2m_buf_done media: usbtv: Fix refcounting mixup media: zoran.rst: place it at the right place this time media: add Zoran cardlist media: admin-guide: update cardlists media: siano: rename a duplicated card string media: zoran: move documentation file to the right place media: atomisp: fixes build breakage for ISP2400 due to a cleanup media: zoran: fix mixed case on vars media: zoran: get rid of an unused var media: zoran: use upper case for card types media: zoran: fix sparse warnings media: zoran: fix smatch warning media: zoran: update TODO ... commit ce1558c285f9ad04c03b46833a028230771cc0a7 Author: Kai Vehmanen Date: Tue Oct 13 18:26:28 2020 +0300 ALSA: hda/hdmi: fix incorrect locking in hdmi_pcm_close A race exists between closing a PCM and update of ELD data. In hdmi_pcm_close(), hinfo->nid value is modified without taking spec->pcm_lock. If this happens concurrently while processing an ELD update in hdmi_pcm_setup_pin(), converter assignment may be done incorrectly. This bug was found by hitting a WARN_ON in snd_hda_spdif_ctls_assign() in a HDMI receiver connection stress test: [2739.684569] WARNING: CPU: 5 PID: 2090 at sound/pci/hda/patch_hdmi.c:1898 check_non_pcm_per_cvt+0x41/0x50 [snd_hda_codec_hdmi] ... [2739.684707] Call Trace: [2739.684720] update_eld+0x121/0x5a0 [snd_hda_codec_hdmi] [2739.684736] hdmi_present_sense+0x21e/0x3b0 [snd_hda_codec_hdmi] [2739.684750] check_presence_and_report+0x81/0xd0 [snd_hda_codec_hdmi] [2739.684842] intel_audio_codec_enable+0x122/0x190 [i915] Fixes: 42b2987079ec ("ALSA: hda - hdmi playback without monitor in dynamic pcm bind mode") Signed-off-by: Kai Vehmanen Cc: Link: https://lore.kernel.org/r/20201013152628.920764-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 647412daeb454b6dad12a6c6961ab90aac9e5d29 Merge: dfef313e99905 1e23400f1a734 Author: Linus Torvalds Date: Tue Oct 13 09:25:24 2020 -0700 Merge tag 'mmc-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Export SDIO revision and info strings to userspace - Add support for specifying mmc/mmcblk index via mmc aliases in DT MMC host: - Enable support for async probe for all mmc host drivers - Enable compile testing of multiple host drivers - dw_mmc: Enable the Synopsys DesignWare driver for RISCV and CSKY - mtk-sd: Fixup support for CQHCI - owl-mmc: Add support for the actions,s700-mmc variant - renesas_sdhi: Fix regression (temporary) for re-insertion of SD cards - renesas_sdhi: Add support for the r8a774e1 variant - renesas_sdhi/tmio: Improvements for tunings - renesas_sdhi/tmio: Rework support for reset of controller - sdhci-acpi: Fix HS400 tuning for devices with invalid presets on AMDI0040 - sdhci_am654: Improve support for tunings - sdhci_am654: Add support for input tap delays - sdhci_am654: Add workaround for card detect debounce timer - sdhci-am654: Add support for the TI's J7200 variants - sdhci-esdhc-imx: Fix support for manual tuning - sdhci-iproc: Enable support for eMMC DDR 3.3V for bcm2711 - sdhci-msm: Fix stability issues with HS400 for sc7180 - sdhci-of-sparx5: Add Sparx5 SoC eMMC driver - sdhci-of-esdhc: Fixup reference clock source selection - sdhci-pci: Add LTR support for some Intel BYT controllers - sdhci-pci-gli: Add CQHCI Support for GL9763E" * tag 'mmc-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (91 commits) mmc: sdhci_am654: Fix module autoload mmc: renesas_sdhi: workaround a regression when reinserting SD cards mmc: sdhci-pci-gli: Add CQHCI Support for GL9763E mmc: sdhci-acpi: AMDI0040: Set SDHCI_QUIRK2_PRESET_VALUE_BROKEN mmc: sdhci_am654: Enable tuning for SDR50 mmc: sdhci_am654: Add support for software tuning mmc: sdhci_am654: Add support for input tap delay mmc: sdhci_am654: Fix hard coded otap delay array size dt-bindings: mmc: sdhci-am654: Add documentation for input tap delay dt-bindings: mmc: sdhci-am654: Convert sdhci-am654 controller documentation to json schema mmc: sdhci-of-esdhc: fix reference clock source selection mmc: host: fix depends for MMC_MESON_GX w/ COMPILE_TEST mmc: sdhci-s3c: hide forward declaration of of_device_id behind CONFIG_OF mmc: sdhci: fix indentation mistakes mmc: moxart: remove unneeded check for drvdata mmc: renesas_sdhi: drop local flag for tuning mmc: rtsx_usb_sdmmc: simplify the return expression of sd_change_phase() mmc: core: document mmc_hw_reset() mmc: mediatek: Drop pointer to mmc_host from msdc_host dt-bindings: mmc: owl: add compatible string actions,s700-mmc ... commit d2585f5164c298aaaed14c2c8d313cbe7bd5b253 Author: Vitor Massaru Iha Date: Wed Jul 29 14:58:49 2020 -0300 lib: kunit: add bitfield test conversion to KUnit This adds the conversion of the runtime tests of test_bitfield, from `lib/test_bitfield.c` to KUnit tests. Code Style Documentation: [0] Signed-off-by: Vitor Massaru Iha Link: [0] https://lore.kernel.org/linux-kselftest/20200620054944.167330-1-davidgow@google.com/T/#u Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 03ca0ec138927b16fab0dad7b869f42eb2849c94 Author: Thomas Cedeno Date: Tue Aug 11 15:39:51 2020 +0000 LSM: SafeSetID: Fix warnings reported by test bot Fix multiple cast-to-union warnings related to casting kuid_t and kgid_t types to kid_t union type. Also fix incompatible type warning that arises from accidental omission of "__rcu" qualifier on the struct setid_ruleset pointer in the argument list for safesetid_file_read(). Reported-by: kernel test robot Signed-off-by: Thomas Cedeno Signed-off-by: Micah Morton commit 5294bac97e12bdabbb97e9adf44d388612a700b8 Author: Thomas Cedeno Date: Thu Jul 16 19:52:01 2020 +0000 LSM: SafeSetID: Add GID security policy handling The SafeSetID LSM has functionality for restricting setuid() calls based on its configured security policies. This patch adds the analogous functionality for setgid() calls. This is mostly a copy-and-paste change with some code deduplication, plus slight modifications/name changes to the policy-rule-related structs (now contain GID rules in addition to the UID ones) and some type generalization since SafeSetID now needs to deal with kgid_t and kuid_t types. Signed-off-by: Thomas Cedeno Signed-off-by: Micah Morton commit 111767c1d86bd9661f8b72ace50cbcb13507a1bf Author: Thomas Cedeno Date: Thu Jul 16 19:13:57 2020 +0000 LSM: Signal to SafeSetID when setting group IDs For SafeSetID to properly gate set*gid() calls, it needs to know whether ns_capable() is being called from within a sys_set*gid() function or is being called from elsewhere in the kernel. This allows SafeSetID to deny CAP_SETGID to restricted groups when they are attempting to use the capability for code paths other than updating GIDs (e.g. setting up userns GID mappings). This is the identical approach to what is currently done for CAP_SETUID. NOTE: We also add signaling to SafeSetID from the setgroups() syscall, as we have future plans to restrict a process' ability to set supplementary groups in addition to what is added in this series for restricting setting of the primary group. Signed-off-by: Thomas Cedeno Signed-off-by: Micah Morton commit edac75a2f8c835c0d7768002a02ecd56c05f9981 Author: Leo Yan Date: Sun Oct 11 20:10:22 2020 +0800 perf c2c: Update usage for showing memory events Since commit b027cc6fdf1b ("perf c2c: Fix 'perf c2c record -e list' to show the default events used"), "perf c2c" tool can show the memory events properly, it's no reason to still suggest user to use the command "perf mem record -e list" for showing events. This patch updates the usage for showing memory events with command "perf c2c record -e list". Signed-off-by: Leo Yan Acked-by: Jiri Olsa Acked-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/20201011121022.22409-1-leo.yan@linaro.org commit dfef313e999058530396497fd41399c0a637c188 Merge: 11e3235b4399f 915f4c9358db6 Author: Linus Torvalds Date: Tue Oct 13 09:09:42 2020 -0700 Merge tag 'erofs-for-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "This cycle addresses a reported permission issue with overlay due to a duplicated permission check for "trusted." xattrs. Also, a REQ_RAHEAD flag is added now to all readahead requests in order to trace readahead I/Os. The others are random cleanups. All commits have been tested and have been in linux-next as well. Summary: - fix an issue which can cause overlay permission problem due to duplicated permission check for "trusted." xattrs; - add REQ_RAHEAD flag to readahead requests for blktrace; - several random cleanup" * tag 'erofs-for-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: remove unnecessary enum entries erofs: add REQ_RAHEAD flag to readahead requests erofs: fold in should_decompress_synchronously() erofs: avoid unnecessary variable `err' erofs: remove unneeded parameter erofs: avoid duplicated permission check for "trusted." xattrs commit dbaa1b3d9afba3c050d365245a36616ae3f425a7 Merge: a41c32105cc12 bef69bd7cfc36 Author: Arnaldo Carvalho de Melo Date: Tue Oct 13 13:02:20 2020 -0300 Merge branch 'perf/urgent' into perf/core To pick fixes that missed v5.9. Signed-off-by: Arnaldo Carvalho de Melo commit 11e3235b4399f7e626caa791a68a0ea8337f6683 Merge: c024a81125ca2 1fd4033dd011a Author: Linus Torvalds Date: Tue Oct 13 09:01:36 2020 -0700 Merge tag 'for-5.10-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "Mostly core updates with a few user visible bits and fixes. Hilights: - fsync performance improvements - less contention of log mutex (throughput +4%, latency -14%, dbench with 32 clients) - skip unnecessary commits for link and rename (throughput +6%, latency -30%, rename latency -75%, dbench with 16 clients) - make fast fsync wait only for writeback (throughput +10..40%, runtime -1..-20%, dbench with 1 to 64 clients on various file/block sizes) - direct io is now implemented using the iomap infrastructure, that's the main part, we still have a workaround that requires an iomap API update, coming in 5.10 - new sysfs exports: - information about the exclusive filesystem operation status (balance, device add/remove/replace, ...) - supported send stream version Core: - use ticket space reservations for data, fair policy using the same infrastructure as metadata - preparatory work to switch locking from our custom tree locks to standard rwsem, now the locking context is propagated to all callers, actual switch is expected to happen in the next dev cycle - seed device structures are now using list API - extent tracepoints print proper tree id - unified range checks for extent buffer helpers - send: avoid using temporary buffer for copying data - remove unnecessary RCU protection from space infos - remove unused readpage callback for metadata, enabling several cleanups - replace indirect function calls for end io hooks and remove extent_io_ops completely Fixes: - more lockdep warning fixes - fix qgroup reservation for delayed inode and an occasional reservation leak for preallocated files - fix device replace of a seed device - fix metadata reservation for fallocate that leads to transaction aborts - reschedule if necessary when logging directory items or when cloning lots of extents - tree-checker: fix false alert caused by legacy btrfs root item - send: fix rename/link conflicts for orphanized inodes - properly initialize device stats for seed devices - skip devices without magic signature when mounting Other: - error handling improvements, BUG_ONs replaced by proper handling, fuzz fixes - various function parameter cleanups - various W=1 cleanups - error/info messages improved Mishaps: - commit 62cf5391209a ("btrfs: move btrfs_rm_dev_replace_free_srcdev outside of all locks") is a rebase leftover after the patch got merged to 5.9-rc8 as a466c85edc6f ("btrfs: move btrfs_rm_dev_replace_free_srcdev outside of all locks"), the remaining part is trivial and the patch is in the middle of the series so I'm keeping it there instead of rebasing" * tag 'for-5.10-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (161 commits) btrfs: rename BTRFS_INODE_ORDERED_DATA_CLOSE flag btrfs: annotate device name rcu_string with __rcu btrfs: skip devices without magic signature when mounting btrfs: cleanup cow block on error btrfs: remove BTRFS_INODE_READDIO_NEED_LOCK fs: remove no longer used dio_end_io() btrfs: return error if we're unable to read device stats btrfs: init device stats for seed devices btrfs: remove struct extent_io_ops btrfs: call submit_bio_hook directly for metadata pages btrfs: stop calling submit_bio_hook for data inodes btrfs: don't opencode is_data_inode in end_bio_extent_readpage btrfs: call submit_bio_hook directly in submit_one_bio btrfs: remove extent_io_ops::readpage_end_io_hook btrfs: replace readpage_end_io_hook with direct calls btrfs: send, recompute reference path after orphanization of a directory btrfs: send, orphanize first all conflicting inodes when processing references btrfs: tree-checker: fix false alert caused by legacy btrfs root item btrfs: use unaligned helpers for stack and header set/get helpers btrfs: free-space-cache: use unaligned helpers to access data ... commit c024a81125ca2999d563d40cf4cedba771c2dc77 Merge: 6f5032a852f9b 4f2b30fd9b4bd Author: Linus Torvalds Date: Tue Oct 13 08:59:39 2020 -0700 Merge tag 'dlm-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This set continues the ongoing rework of the low level communication layer in the dlm. The focus here is on improvements to connection handling, and reworking the receiving of messages" * tag 'dlm-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: fs: dlm: fix race in nodeid2con fs: dlm: rework receive handling fs: dlm: disallow buffer size below default fs: dlm: handle range check as callback fs: dlm: fix mark per nodeid setting fs: dlm: remove lock dependency warning fs: dlm: use free_con to free connection fs: dlm: handle possible othercon writequeues fs: dlm: move free writequeue into con free fs: dlm: fix configfs memory leak fs: dlm: fix dlm_local_addr memory leak fs: dlm: make connection hash lockless fs: dlm: synchronize dlm before shutdown commit 6f5032a852f9bf3c449db58a9209ba267f11869a Merge: 39a5101f989e8 5b2a828b98ec1 Author: Linus Torvalds Date: Tue Oct 13 08:54:00 2020 -0700 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fscrypt updates from Eric Biggers: "This release, we rework the implementation of creating new encrypted files in order to fix some deadlocks and prepare for adding fscrypt support to CephFS, which Jeff Layton is working on. We also export a symbol in preparation for the above-mentioned CephFS support and also for ext4/f2fs encrypt+casefold support. Finally, there are a few other small cleanups. As usual, all these patches have been in linux-next with no reported issues, and I've tested them with xfstests" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fscrypt: export fscrypt_d_revalidate() fscrypt: rename DCACHE_ENCRYPTED_NAME to DCACHE_NOKEY_NAME fscrypt: don't call no-key names "ciphertext names" fscrypt: use sha256() instead of open coding fscrypt: make fscrypt_set_test_dummy_encryption() take a 'const char *' fscrypt: handle test_dummy_encryption in more logical way fscrypt: move fscrypt_prepare_symlink() out-of-line fscrypt: make "#define fscrypt_policy" user-only fscrypt: stop pretending that key setup is nofs-safe fscrypt: require that fscrypt_encrypt_symlink() already has key fscrypt: remove fscrypt_inherit_context() fscrypt: adjust logging for in-creation inodes ubifs: use fscrypt_prepare_new_inode() and fscrypt_set_context() f2fs: use fscrypt_prepare_new_inode() and fscrypt_set_context() ext4: use fscrypt_prepare_new_inode() and fscrypt_set_context() ext4: factor out ext4_xattr_credits_for_new_inode() fscrypt: add fscrypt_prepare_new_inode() and fscrypt_set_context() fscrypt: restrict IV_INO_LBLK_32 to ino_bits <= 32 fscrypt: drop unused inode argument from fscrypt_fname_alloc_buffer commit 39a5101f989e8d2be557136704d53990f9b402c8 Merge: 865c50e1d2796 3093e7c16e12d Author: Linus Torvalds Date: Tue Oct 13 08:50:16 2020 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Allow DRBG testing through user-space af_alg - Add tcrypt speed testing support for keyed hashes - Add type-safe init/exit hooks for ahash Algorithms: - Mark arc4 as obsolete and pending for future removal - Mark anubis, khazad, sead and tea as obsolete - Improve boot-time xor benchmark - Add OSCCA SM2 asymmetric cipher algorithm and use it for integrity Drivers: - Fixes and enhancement for XTS in caam - Add support for XIP8001B hwrng in xiphera-trng - Add RNG and hash support in sun8i-ce/sun8i-ss - Allow imx-rngc to be used by kernel entropy pool - Use crypto engine in omap-sham - Add support for Ingenic X1830 with ingenic" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (205 commits) X.509: Fix modular build of public_key_sm2 crypto: xor - Remove unused variable count in do_xor_speed X.509: fix error return value on the failed path crypto: bcm - Verify GCM/CCM key length in setkey crypto: qat - drop input parameter from adf_enable_aer() crypto: qat - fix function parameters descriptions crypto: atmel-tdes - use semicolons rather than commas to separate statements crypto: drivers - use semicolons rather than commas to separate statements hwrng: mxc-rnga - use semicolons rather than commas to separate statements hwrng: iproc-rng200 - use semicolons rather than commas to separate statements hwrng: stm32 - use semicolons rather than commas to separate statements crypto: xor - use ktime for template benchmarking crypto: xor - defer load time benchmark to a later time crypto: hisilicon/zip - fix the uninitalized 'curr_qm_qp_num' crypto: hisilicon/zip - fix the return value when device is busy crypto: hisilicon/zip - fix zero length input in GZIP decompress crypto: hisilicon/zip - fix the uncleared debug registers lib/mpi: Fix unused variable warnings crypto: x86/poly1305 - Remove assignments with no effect hwrng: npcm - modify readl to readb ... commit ace74e797a82f7ded7912dfa285bd954cc66400d Author: Darrick J. Wong Date: Thu Oct 8 07:53:33 2020 -0700 xfs: annotate grabbing the realtime bitmap/summary locks in growfs Use XFS_ILOCK_RT{BITMAP,SUM} to annotate grabbing the rt bitmap and summary locks when we grow the realtime volume, just like we do most everywhere else. This shuts up lockdep warnings about grabbing the ILOCK class of locks recursively: ============================================ WARNING: possible recursive locking detected 5.9.0-rc4-djw #rc4 Tainted: G O -------------------------------------------- xfs_growfs/4841 is trying to acquire lock: ffff888035acc230 (&xfs_nondir_ilock_class){++++}-{3:3}, at: xfs_ilock+0xac/0x1a0 [xfs] but task is already holding lock: ffff888035acedb0 (&xfs_nondir_ilock_class){++++}-{3:3}, at: xfs_ilock+0xac/0x1a0 [xfs] other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&xfs_nondir_ilock_class); lock(&xfs_nondir_ilock_class); *** DEADLOCK *** May be due to missing lock nesting notation Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R commit 7249c95a3fd72c7f47ede0275b9fc4535db43e48 Author: Darrick J. Wong Date: Wed Oct 7 13:57:52 2020 -0700 xfs: make xfs_growfs_rt update secondary superblocks When we call growfs on the data device, we update the secondary superblocks to reflect the updated filesystem geometry. We need to do this for growfs on the realtime volume too, because a future xfs_repair run could try to fix the filesystem using a backup superblock. This was observed by the online superblock scrubbers while running xfs/233. One can also trigger this by growing an rt volume, cycling the mount, and creating new rt files. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R commit f4c32e87de7d66074d5612567c5eac7325024428 Author: Darrick J. Wong Date: Wed Oct 7 13:55:16 2020 -0700 xfs: fix realtime bitmap/summary file truncation when growing rt volume The realtime bitmap and summary files are regular files that are hidden away from the directory tree. Since they're regular files, inode inactivation will try to purge what it thinks are speculative preallocations beyond the incore size of the file. Unfortunately, xfs_growfs_rt forgets to update the incore size when it resizes the inodes, with the result that inactivating the rt inodes at unmount time will cause their contents to be truncated. Fix this by updating the incore size when we change the ondisk size as part of updating the superblock. Note that we don't do this when we're allocating blocks to the rt inodes because we actually want those blocks to get purged if the growfs fails. This fixes corruption complaints from the online rtsummary checker when running xfs/233. Since that test requires rmap, one can also trigger this by growing an rt volume, cycling the mount, and creating rt files. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R commit a41c32105cc12a7d2ae11a591929a6add98987cd Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 30 14:07:33 2020 +0300 tools lib traceevent: Hide non API functions There are internal library functions, which are not declared as a static. They are used inside the library from different files. Hide them from the library users, as they are not part of the API. These functions are made hidden and are renamed without the prefix "tep_": tep_free_plugin_paths tep_peek_char tep_buffer_init tep_get_input_buf_ptr tep_get_input_buf tep_read_token tep_free_token tep_free_event tep_free_format_field __tep_parse_format Link: https://lore.kernel.org/linux-trace-devel/e4afdd82deb5e023d53231bb13e08dca78085fb0.camel@decadent.org.uk/ Reported-by: Ben Hutchings Signed-off-by: Tzvetomir Stoyanov (VMware) Reviewed-by: Steven Rostedt (VMware) Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200930110733.280534-1-tz.stoyanov@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit dc000c4593a9ce119ba7db2c4d9a00f5a9daf731 Author: Joel Fernandes (Google) Date: Fri Sep 25 19:56:34 2020 -0400 perf sched: Show start of latency as well The 'perf sched latency' tool is really useful at showing worst-case latencies that task encountered since wakeup. However it shows only the end of the latency. Often times the start of a latency is interesting as it can show what else was going on at the time to cause the latency. I certainly myself spending a lot of time backtracking to the start of the latency in "perf sched script" which wastes a lot of time. This patch therefore adds a new column "Max delay start". Considering this, also rename "Maximum delay at" to "Max delay end" as its easier to understand. Example of the new output: ---------------------------------------------------------------------------------------------------------------------------------- Task | Runtime ms | Switches | Avg delay ms | Max delay ms | Max delay start | Max delay end | ---------------------------------------------------------------------------------------------------------------------------------- MediaScannerSer:11936 | 651.296 ms | 67978 | avg: 0.113 ms | max: 77.250 ms | max start: 477.691360 s | max end: 477.768610 s audio@2.0-servi:(3) | 0.000 ms | 3440 | avg: 0.034 ms | max: 72.267 ms | max start: 477.697051 s | max end: 477.769318 s AudioOut_1D:8112 | 0.000 ms | 2588 | avg: 0.083 ms | max: 64.020 ms | max start: 477.710740 s | max end: 477.774760 s Time-limited te:14973 | 7966.090 ms | 24807 | avg: 0.073 ms | max: 15.563 ms | max start: 477.162746 s | max end: 477.178309 s surfaceflinger:8049 | 9.680 ms | 603 | avg: 0.063 ms | max: 13.275 ms | max start: 476.931791 s | max end: 476.945067 s HeapTaskDaemon:(3) | 1588.830 ms | 7040 | avg: 0.065 ms | max: 6.880 ms | max start: 473.666043 s | max end: 473.672922 s mount-passthrou:(3) | 1370.809 ms | 68904 | avg: 0.011 ms | max: 6.524 ms | max start: 478.090630 s | max end: 478.097154 s ReferenceQueueD:(3) | 11.794 ms | 1725 | avg: 0.014 ms | max: 6.521 ms | max start: 476.119782 s | max end: 476.126303 s writer:14077 | 18.410 ms | 1427 | avg: 0.036 ms | max: 6.131 ms | max start: 474.169675 s | max end: 474.175805 s Signed-off-by: Joel Fernandes (Google) Acked-by: Namhyung Kim Link: https://lore.kernel.org/r/20200925235634.4089867-1-joel@joelfernandes.org Signed-off-by: Arnaldo Carvalho de Melo commit 70830f974e8db9b43e61d9b223682e13e557022f Author: Sandipan Das Date: Mon Oct 12 10:32:05 2020 +0530 perf vendor events: Fix typos in power8 PMU events This replaces the incorrectly spelled word "localtion" with "location" in some power8 PMU event descriptions. Fixes: 2a81fa3bb5ed ("perf vendor events: Add power8 PMU events") Signed-off-by: Sandipan Das Reviewed-by: Kajol Jain Cc: Jiri Olsa Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Ravi Bangoria Cc: Sukadev Bhattiprolu Link: http://lore.kernel.org/lkml/20201012050205.328523-1-sandipan@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit bf7ef5ddb0b327099404d3e2af4b3b142c702813 Author: Namhyung Kim Date: Mon Oct 12 16:02:14 2020 +0900 perf bench: Run inject-build-id with --buildid-all option too For comparison, it now runs the benchmark twice - one if regular -b and another for --buildid-all. $ perf bench internals inject-build-id # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 21.002 msec (+- 0.172 msec) Average time per event: 2.059 usec (+- 0.017 usec) Average memory usage: 8169 KB (+- 0 KB) Average build-id-all injection took: 19.543 msec (+- 0.124 msec) Average time per event: 1.916 usec (+- 0.012 usec) Average memory usage: 7348 KB (+- 0 KB) Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Acked-by: Ian Rogers Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201012070214.2074921-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 27c9c3424fc217dab4077122069fe4b4413dbf18 Author: Namhyung Kim Date: Mon Oct 12 16:02:13 2020 +0900 perf inject: Add --buildid-all option Like 'perf record', we can even more speedup build-id processing by just using all DSOs. Then we don't need to look at all the sample events anymore. The following patch will update 'perf bench' to show the result of the --buildid-all option too. Signed-off-by: Namhyung Kim Original-patch-by: Stephane Eranian Acked-by: Ian Rogers Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201012070214.2074921-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e7b60c5a0c4b9c02fa3b471f8d5edb4989ebdf60 Author: Namhyung Kim Date: Mon Oct 12 16:02:12 2020 +0900 perf inject: Do not load map/dso when injecting build-id No need to load symbols in a DSO when injecting build-id. I guess the reason was to check the DSO is a special file like anon files. Use some helper functions in map.c to check them before reading build-id. Also pass sample event's cpumode to a new build-id event. It brought a speedup in the benchmark of 25 -> 21 msec on my laptop. Also the memory usage (Max RSS) went down by ~200 KB. # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 21.389 msec (+- 0.138 msec) Average time per event: 2.097 usec (+- 0.014 usec) Average memory usage: 8225 KB (+- 0 KB) Committer notes: Before: $ perf stat -r5 perf bench internals inject-build-id > /dev/null Performance counter stats for 'perf bench internals inject-build-id' (5 runs): 4,020.56 msec task-clock:u # 1.271 CPUs utilized ( +- 0.74% ) 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 123,354 page-faults:u # 0.031 M/sec ( +- 0.81% ) 7,119,951,568 cycles:u # 1.771 GHz ( +- 1.74% ) (83.27%) 230,086,969 stalled-cycles-frontend:u # 3.23% frontend cycles idle ( +- 1.97% ) (83.41%) 1,168,298,765 stalled-cycles-backend:u # 16.41% backend cycles idle ( +- 1.13% ) (83.44%) 11,173,083,669 instructions:u # 1.57 insn per cycle # 0.10 stalled cycles per insn ( +- 1.58% ) (83.31%) 2,413,908,936 branches:u # 600.392 M/sec ( +- 1.69% ) (83.26%) 46,576,289 branch-misses:u # 1.93% of all branches ( +- 2.20% ) (83.31%) 3.1638 +- 0.0309 seconds time elapsed ( +- 0.98% ) $ After: $ perf stat -r5 perf bench internals inject-build-id > /dev/null Performance counter stats for 'perf bench internals inject-build-id' (5 runs): 2,379.94 msec task-clock:u # 1.473 CPUs utilized ( +- 0.18% ) 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 62,584 page-faults:u # 0.026 M/sec ( +- 0.07% ) 2,372,389,668 cycles:u # 0.997 GHz ( +- 0.29% ) (83.14%) 106,937,862 stalled-cycles-frontend:u # 4.51% frontend cycles idle ( +- 4.89% ) (83.20%) 581,697,915 stalled-cycles-backend:u # 24.52% backend cycles idle ( +- 0.71% ) (83.47%) 3,659,692,199 instructions:u # 1.54 insn per cycle # 0.16 stalled cycles per insn ( +- 0.10% ) (83.63%) 791,372,961 branches:u # 332.518 M/sec ( +- 0.27% ) (83.39%) 10,648,083 branch-misses:u # 1.35% of all branches ( +- 0.22% ) (83.16%) 1.61570 +- 0.00172 seconds time elapsed ( +- 0.11% ) $ Signed-off-by: Namhyung Kim Original-patch-by: Stephane Eranian Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20201012070214.2074921-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 336c95b297e8127705e590bbd25f5c627bfcb782 Author: Namhyung Kim Date: Mon Oct 12 16:02:11 2020 +0900 perf inject: Enter namespace when reading build-id It should be in a proper mnt namespace when accessing the file. I think this had no problem since the build-id was actually read from map__load() -> dso__load() already. But I'd like to change it in the following commit. Acked-by: Jiri Olsa Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20201012070214.2074921-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2946ecedd026ca3bb6b6415de487e2836037d06f Author: Namhyung Kim Date: Mon Oct 12 16:02:10 2020 +0900 perf inject: Add missing callbacks in perf_tool I found some events (like PERF_RECORD_CGROUP) are not copied by perf inject due to the missing callbacks. Let's add them. While at it, I've changed the order of the callbacks to match with struct perf_tool so that we can compare them easily. Acked-by: Jiri Olsa Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20201012070214.2074921-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0bf02a0d80427f263195c1e5a4c8ada14bd5d261 Author: Namhyung Kim Date: Mon Oct 12 16:02:09 2020 +0900 perf bench: Add build-id injection benchmark Sometimes I can see that 'perf record' piped with 'perf inject' take a long time processing build-ids. So introduce a inject-build-id benchmark to the internals benchmark suite to measure its overhead regularly. It runs the 'perf inject' command internally and feeds the given number of synthesized events (MMAP2 + SAMPLE basically). Usage: perf bench internals inject-build-id -i, --iterations Number of iterations used to compute average (default: 100) -m, --nr-mmaps Number of mmap events for each iteration (default: 100) -n, --nr-samples Number of sample events per mmap event (default: 100) -v, --verbose be more verbose (show iteration count, DSO name, etc) By default, it measures average processing time of 100 MMAP2 events and 10000 SAMPLE events. Below is a result on my laptop. $ perf bench internals inject-build-id # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 25.789 msec (+- 0.202 msec) Average time per event: 2.528 usec (+- 0.020 usec) Average memory usage: 8411 KB (+- 7 KB) Committer testing: $ perf bench Usage: perf bench [] [] # List of all available benchmark collections: sched: Scheduler and IPC benchmarks syscall: System call benchmarks mem: Memory access benchmarks numa: NUMA scheduling and MM benchmarks futex: Futex stressing benchmarks epoll: Epoll stressing benchmarks internals: Perf-internals benchmarks all: All benchmarks $ perf bench internals # List of available benchmarks for collection 'internals': synthesize: Benchmark perf event synthesis kallsyms-parse: Benchmark kallsyms parsing inject-build-id: Benchmark build-id injection $ perf bench internals inject-build-id # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 14.202 msec (+- 0.059 msec) Average time per event: 1.392 usec (+- 0.006 usec) Average memory usage: 12650 KB (+- 10 KB) Average build-id-all injection took: 12.831 msec (+- 0.071 msec) Average time per event: 1.258 usec (+- 0.007 usec) Average memory usage: 11895 KB (+- 10 KB) $ $ perf stat -r5 perf bench internals inject-build-id # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 14.380 msec (+- 0.056 msec) Average time per event: 1.410 usec (+- 0.006 usec) Average memory usage: 12608 KB (+- 11 KB) Average build-id-all injection took: 11.889 msec (+- 0.064 msec) Average time per event: 1.166 usec (+- 0.006 usec) Average memory usage: 11838 KB (+- 10 KB) # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 14.246 msec (+- 0.065 msec) Average time per event: 1.397 usec (+- 0.006 usec) Average memory usage: 12744 KB (+- 10 KB) Average build-id-all injection took: 12.019 msec (+- 0.066 msec) Average time per event: 1.178 usec (+- 0.006 usec) Average memory usage: 11963 KB (+- 10 KB) # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 14.321 msec (+- 0.067 msec) Average time per event: 1.404 usec (+- 0.007 usec) Average memory usage: 12690 KB (+- 10 KB) Average build-id-all injection took: 11.909 msec (+- 0.041 msec) Average time per event: 1.168 usec (+- 0.004 usec) Average memory usage: 11938 KB (+- 10 KB) # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 14.287 msec (+- 0.059 msec) Average time per event: 1.401 usec (+- 0.006 usec) Average memory usage: 12864 KB (+- 10 KB) Average build-id-all injection took: 11.862 msec (+- 0.058 msec) Average time per event: 1.163 usec (+- 0.006 usec) Average memory usage: 12103 KB (+- 10 KB) # Running 'internals/inject-build-id' benchmark: Average build-id injection took: 14.402 msec (+- 0.053 msec) Average time per event: 1.412 usec (+- 0.005 usec) Average memory usage: 12876 KB (+- 10 KB) Average build-id-all injection took: 11.826 msec (+- 0.061 msec) Average time per event: 1.159 usec (+- 0.006 usec) Average memory usage: 12111 KB (+- 10 KB) Performance counter stats for 'perf bench internals inject-build-id' (5 runs): 4,267.48 msec task-clock:u # 1.502 CPUs utilized ( +- 0.14% ) 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 102,092 page-faults:u # 0.024 M/sec ( +- 0.08% ) 3,894,589,578 cycles:u # 0.913 GHz ( +- 0.19% ) (83.49%) 140,078,421 stalled-cycles-frontend:u # 3.60% frontend cycles idle ( +- 0.77% ) (83.34%) 948,581,189 stalled-cycles-backend:u # 24.36% backend cycles idle ( +- 0.46% ) (83.25%) 5,835,587,719 instructions:u # 1.50 insn per cycle # 0.16 stalled cycles per insn ( +- 0.21% ) (83.24%) 1,267,423,636 branches:u # 296.996 M/sec ( +- 0.22% ) (83.12%) 17,484,290 branch-misses:u # 1.38% of all branches ( +- 0.12% ) (83.55%) 2.84176 +- 0.00222 seconds time elapsed ( +- 0.08% ) $ Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim Link: https://lore.kernel.org/r/20201012070214.2074921-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 588614be61b7cb46f697c3e141b2aef7f6b49347 Author: Biju Das Date: Sun Sep 20 14:49:00 2020 +0100 dt-bindings: update usb-c-connector example Some hardware designs have USB typec connector attached to both SoC and super speed mux. We need to use separate connector node for such design. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20200920134905.4370-2-biju.das.jz@bp.renesas.com Signed-off-by: Rob Herring commit 84c34df158cf215b0cd1475ab3b8e6f212f81f23 Author: Matthew Wilcox (Oracle) Date: Tue Oct 13 08:46:29 2020 -0400 XArray: Fix xas_create_range for ranges above 4 billion The 'sibs' variable would be shifted as a 32-bit integer, so if 'shift' is more than 32, this is undefined behaviour. In practice, this doesn't happen because the page cache is the only user and nobody uses 16TB pages. Signed-off-by: Matthew Wilcox (Oracle) commit 16641d81f9ff5f902d084754c84b2bde3a60bc6e Merge: 2cf9ba290536f bf23e1cd46d6a 00610935158fc Author: Rafael J. Wysocki Date: Tue Oct 13 14:48:38 2020 +0200 Merge branches 'pm-avs' and 'powercap' * pm-avs: MAINTAINERS: drop myself from PM AVS drivers PM: AVS: qcom-cpr: simplify the return expression of cpr_disable() * powercap: powercap: include header to fix -Wmissing-prototypes commit 2cf9ba290536fa8c03018d073555488ae000d8ee Merge: fe5975b1b8b21 6b61d49a55796 e0e9ce390d7bc c6e331312ebfb f63816e43d904 Author: Rafael J. Wysocki Date: Tue Oct 13 14:48:20 2020 +0200 Merge branches 'pm-core', 'pm-sleep', 'pm-pci' and 'pm-domains' * pm-core: PM: runtime: Fix timer_expires data type on 32-bit arches PM: runtime: Remove link state checks in rpm_get/put_supplier() * pm-sleep: ACPI: EC: PM: Drop ec_no_wakeup check from acpi_ec_dispatch_gpe() ACPI: EC: PM: Flush EC work unconditionally after wakeup PM: hibernate: remove the bogus call to get_gendisk() in software_resume() PM: hibernate: Batch hibernate and resume IO requests * pm-pci: PCI/ACPI: Whitelist hotplug ports for D3 if power managed by ACPI * pm-domains: PM: domains: Allow to abort power off when no ->power_off() callback PM: domains: Rename power state enums for genpd commit 8be2362d10e8b0ea9844706d8c388480d37226d2 Merge: 5d2a3ca813f3d 7cecb47f55e00 c18483a8ed307 21988a8e51479 05c36e5adf2be 8e8883cef6cea Author: Rafael J. Wysocki Date: Tue Oct 13 14:45:36 2020 +0200 Merge branches 'acpi-extlog', 'acpi-memhotplug', 'acpi-button', 'acpi-tools' and 'acpi-pci' * acpi-extlog: ACPI / extlog: Check for RDMSR failure * acpi-memhotplug: ACPI: memhotplug: Remove 'state' from struct acpi_memory_device * acpi-button: ACPI: button: fix handling lid state changes when input device closed * acpi-tools: tools/power/acpi: Serialize Makefile * acpi-pci: ACPI: PCI: update kernel-doc line comments commit 5d2a3ca813f3d1dbebc39e8ad3f8ebd01b1ff627 Merge: e4174ff78b9ec 1e0cb59d5f0a4 Author: Rafael J. Wysocki Date: Tue Oct 13 14:44:57 2020 +0200 Merge branch 'acpi-misc' * acpi-misc: ACPI: Make acpi_evaluate_dsm() prototype consistent ACPI: wakeup: Remove dead ACPICA debug code ACPI: video: Remove leftover ACPICA debug code ACPI: tiny-power-button: Remove dead ACPICA debug code ACPI: processor: Remove dead ACPICA debug code ACPI: proc: Remove dead ACPICA debug code ACPI: PCI: Remove unused ACPICA debug code ACPI: event: Remove leftover ACPICA debug code ACPI: dock: Remove dead ACPICA debug code ACPI: debugfs: Remove dead ACPICA debug code ACPI: custom_method: Remove dead ACPICA debug code ACPI: container: Remove leftover ACPICA debug functionality ACPI: platform: Remove ACPI_MODULE_NAME() ACPI: memhotplug: Remove leftover ACPICA debug functionality ACPI: LPSS: Remove ACPI_MODULE_NAME() ACPI: cmos_rtc: Remove leftover ACPI_MODULE_NAME() ACPI: Remove three unused inline functions commit e4174ff78b9ec2179faeffe66640dbddce52b449 Merge: 20eeeafb917be dc9e7860df916 Author: Rafael J. Wysocki Date: Tue Oct 13 14:44:50 2020 +0200 Merge branch 'acpi-numa' * acpi-numa: docs: mm: numaperf.rst Add brief description for access class 1. node: Add access1 class to represent CPU to memory characteristics ACPI: HMAT: Fix handling of changes from ACPI 6.2 to ACPI 6.3 ACPI: Let ACPI know we support Generic Initiator Affinity Structures x86: Support Generic Initiator only proximity domains ACPI: Support Generic Initiator only domains ACPI / NUMA: Add stub function for pxm_to_node() irq-chip/gic-v3-its: Fix crash if ITS is in a proximity domain without processor or memory ACPI: Remove side effect of partly creating a node in acpi_get_node() ACPI: Rename acpi_map_pxm_to_online_node() to pxm_to_online_node() ACPI: Remove side effect of partly creating a node in acpi_map_pxm_to_online_node() ACPI: Do not create new NUMA domains from ACPI static tables that are not SRAT ACPI: Add out of bounds and numa_off protections to pxm_to_node() commit 20eeeafb917be1272eacb09d12e2f79e132f2af0 Merge: acd448f300b71 b226faab4e789 7d1eb2d8f0501 9a2e849fb6de4 05de068614ac4 Author: Rafael J. Wysocki Date: Tue Oct 13 14:44:34 2020 +0200 Merge branches 'acpi-video', 'acpi-battery', 'acpi-config' and 'acpi-scan' * acpi-video: ACPI: video: use ACPI backlight for HP 635 Notebook * acpi-battery: ACPI: battery: include linux/power_supply.h * acpi-config: ACPI: configfs: Add missing config_item_put() to fix refcount leak * acpi-scan: ACPI: scan: Replace ACPI_DEBUG_PRINT() with pr_debug() commit acd448f300b71c0b358cee8d27b1c4244ff00470 Merge: 9a15da1b84c99 5f155515d3735 399e08f1f0669 2ce6324eadb01 32c6f3ffa0182 Author: Rafael J. Wysocki Date: Tue Oct 13 14:43:16 2020 +0200 Merge branches 'acpi-tables', 'acpi-pmic', 'acpi-dptf' and 'acpi-soc' * acpi-tables: ACPI: NFIT: Use kobj_to_dev() instead * acpi-pmic: MAINTAINERS: Use my kernel.org address for Intel PMIC work ACPI / PMIC: Move TPS68470 OpRegion driver to drivers/acpi/pmic/ ACPI / PMIC: Split out Kconfig and Makefile specific for ACPI PMIC * acpi-dptf: ACPI: DPTF: Add PCH FIVR participant driver * acpi-soc: ACPI: APD: Clean up header file include statements ACPI: APD: Remove unnecessary APD_ADDR() macro stub ACPI: APD: Remove ACPI_MODULE_NAME() ACPI: APD: Remove flags from struct apd_device_desc ACPI: APD: Add kerneldoc for properties in struct apd_device_desc commit f78b8250a076ac63ddd021c7ea9739bcc2f6f737 Author: Hui Su Date: Mon Sep 28 01:15:53 2020 +0800 radix-tree: fix the comment of radix_tree_next_slot() fix the comment of radix_tree_next_slot(): interator --> iterator. Signed-off-by: Hui Su Signed-off-by: Matthew Wilcox (Oracle) commit ca7b639e8611b3260a30b18aaa0d6db9c80a75ef Author: Matthew Wilcox (Oracle) Date: Sun Aug 2 14:17:21 2020 -0400 XArray: Fix xas_reload for multi-index entries xas_reload() was only checking that the head entry was still at the head index. If the entry has been split, that's not enough as there may be a different entry at the specified index now. Solve this by checking the slot for the requested index instead of the head index. Signed-off-by: Matthew Wilcox (Oracle) commit f82cd2f0b5eb715b1a296e20b34da7d296b6e9a4 Author: Matthew Wilcox (Oracle) Date: Tue Aug 18 09:05:56 2020 -0400 XArray: Add private interface for workingset node deletion Move the tricky bits of dealing with the XArray from the workingset code to the XArray. Make it clear in the documentation that this is a private interface, and only export it for the benefit of the test suite. Signed-off-by: Matthew Wilcox (Oracle) commit fe5975b1b8b21e2a17ac80592099b9aa6efb5899 Merge: 9c2ff6650f4b7 0b9688ee95c12 4285027c733a2 Author: Rafael J. Wysocki Date: Tue Oct 13 14:39:52 2020 +0200 Merge branches 'pm-cpuidle' and 'pm-devfreq' * pm-cpuidle: cpuidle: record state entry rejection statistics cpuidle: psci: Allow PM domain to be initialized even if no OSI mode firmware: psci: Extend psci_set_osi_mode() to allow reset to PC mode ACPI: processor: Print more information when acpi_processor_evaluate_cst() fails cpuidle: tegra: Correctly handle result of arm_cpuidle_simple_enter() * pm-devfreq: PM / devfreq: tegra30: Improve initial hardware resetting PM / devfreq: event: Change prototype of devfreq_event_get_edev_by_phandle function PM / devfreq: Change prototype of devfreq_get_devfreq_by_phandle function PM / devfreq: Add devfreq_get_devfreq_by_node function commit 9c2ff6650f4b7fca7aa6474d3098a972bdc4626e Merge: 757e282188f01 b7af6080a3d2d Author: Rafael J. Wysocki Date: Tue Oct 13 14:39:35 2020 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: (30 commits) cpufreq: stats: Fix string format specifier mismatch arm: disable frequency invariance for CONFIG_BL_SWITCHER cpufreq,arm,arm64: restructure definitions of arch_set_freq_scale() cpufreq: stats: Add memory barrier to store_reset() cpufreq: schedutil: Simplify sugov_fast_switch() cpufreq: Move traces and update to policy->cur to cpufreq core cpufreq: stats: Enable stats for fast-switch as well cpufreq: stats: Mark few conditionals with unlikely() cpufreq: stats: Remove locking cpufreq: stats: Defer stats update to cpufreq_stats_record_transition() arch_topology, arm, arm64: define arch_scale_freq_invariant() arch_topology, cpufreq: constify arch_* cpumasks cpufreq: report whether cpufreq supports Frequency Invariance (FI) cpufreq: move invariance setter calls in cpufreq core arch_topology: validate input frequencies to arch_set_freq_scale() cpufreq: qcom: Don't add frequencies without an OPP cpufreq: qcom-hw: Add cpufreq support for SM8250 SoC cpufreq: qcom-hw: Use of_device_get_match_data for offsets and row size cpufreq: qcom-hw: Use devm_platform_ioremap_resource() to simplify code dt-bindings: cpufreq: cpufreq-qcom-hw: Document Qcom EPSS compatible ... commit 2a410d09417b5344ab1f3cf001ac73a1daf8dcce Author: Christoph Hellwig Date: Tue Oct 13 13:27:00 2020 +0200 ARM/ixp4xx: add a missing include of dma-map-ops.h Compilation of ixp4xx_defconfig fails with: arch/arm/mach-ixp4xx/common.c: In function 'ixp4xx_platform_notify_remove': arch/arm/mach-ixp4xx/common.c:291:3: error: implicit declaration of function 'dmabounce_unregister_dev' [-Werror=implicit-function-declaration] 291 | dmabounce_unregister_dev(dev); | ^~~~~~~~~~~~~~~~~~~~~~~~ arch/arm/mach-ixp4xx/common.c: In function 'ixp4xx_platform_notify': arch/arm/mach-ixp4xx/common.c:307:3: error: implicit declaration of function 'dmabounce_register_dev' [-Werror=implicit-function-declaration] 307 | dmabounce_register_dev(dev, 2048, 4096, ixp4xx_needs_bounce); Add a missing include that is needed because of the header reshuffle. Fixes: 0a0f0d8be76d ("dma-mapping: split ") Reported-by: Guenter Roeck Signed-off-by: Christoph Hellwig commit ab0a40ea88204e1291b56da8128e2845fec8ee88 Author: Vasily Gorbik Date: Fri Oct 9 14:25:23 2020 +0200 perf build: Allow nested externs to enable BUILD_BUG() usage Currently the BUILD_BUG() macro is expanded to the following: do { extern void __compiletime_assert_0(void) __attribute__((error("BUILD_BUG failed"))); if (!(!(1))) __compiletime_assert_0(); } while (0); If used in a function body this would obviously produce build errors with -Wnested-externs and -Werror. To enable BUILD_BUG() usage in tools/arch/x86/lib/insn.c which perf includes in intel-pt-decoder, build perf without -Wnested-externs. Reported-by: Stephen Rothwell Tested-by: Stephen Rothwell # build tested Signed-off-by: Vasily Gorbik Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/patch-1.thread-251403.git-2514037e9477.your-ad-here.call-01602244460-ext-7088@work.hours commit 3528f8ec95a5b1ee1b98d3e85371843c6428e4be Author: Randy Dunlap Date: Wed Jul 15 18:28:58 2020 -0700 bcm963xx_tag.h: fix duplicated word Change doubled word "is" to "it is". Signed-off-by: Randy Dunlap Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-mips@vger.kernel.org Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 1f0400d0e2c410b04f246aefb2e9b5155eb4b0bf Author: Chuanhong Guo Date: Tue Oct 13 10:05:47 2020 +0800 mips: ralink: enable zboot support Some of these ralink devices come with an ancient u-boot which can't extract LZMA properly when image gets too big. Enable zboot support to get a self-extracting kernel instead of relying on broken u-boot support. Signed-off-by: Chuanhong Guo Signed-off-by: Thomas Bogendoerfer commit 69b686ddd579bdaec2bfe448672e50626920d0bb Author: Paul Cercueil Date: Mon Oct 12 21:27:39 2020 +0200 MIPS: ingenic: Remove CPU_SUPPORTS_HUGEPAGES While it is true that Ingenic SoCs support huge pages, we cannot use them yet as PTEs don't have any single bit that is free. Right now, having that symbol only causes build errors, so remove it until the situation with PTEs is resolved. Fixes: f0f4a753079c ("MIPS: generic: Add support for Ingenic SoCs") Signed-off-by: Paul Cercueil Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Thomas Bogendoerfer commit 9724722fde8f9bbd2b87340f00b9300c9284001e Author: Sudeep Holla Date: Mon Oct 12 14:26:24 2020 +0100 firmware: arm_scmi: Add missing Rx size re-initialisation Few commands provide the list of description partially and require to be called consecutively until all the descriptors are fetched completely. In such cases, we don't release the buffers and reuse them for consecutive transmits. However, currently we don't reset the Rx size which will be set as per the response for the last transmit. This may result in incorrect response size being interpretted as the firmware may repond with size greater than the one set but we read only upto the size set by previous response. Let us reset the receive buffer size to max possible in such cases as we don't know the exact size of the response. Link: https://lore.kernel.org/r/20201012141746.32575-1-sudeep.holla@arm.com Fixes: b6f20ff8bd94 ("firmware: arm_scmi: add common infrastructure and support for base protocol") Reported-by: Etienne Carriere Signed-off-by: Sudeep Holla commit 07940c369a6bf940ec4a00eeb76bf51daa4f3973 Author: Jisheng Zhang Date: Fri Oct 9 15:55:05 2020 +0800 PCI: dwc: Fix MSI page leakage in suspend/resume Currently, dw_pcie_msi_init() allocates and maps page for msi, then program the PCIE_MSI_ADDR_LO and PCIE_MSI_ADDR_HI. The Root Complex may lose power during suspend-to-RAM, so when we resume, we want to redo the latter but not the former. If designware based driver (for example, pcie-tegra194.c) calls dw_pcie_msi_init() in resume path, the msi page will be leaked. As pointed out by Rob and Ard, there's no need to allocate a page for the MSI address, we could use an address in the driver data. To avoid map the MSI msg again during resume, we move the map MSI msg from dw_pcie_msi_init() to dw_pcie_host_init(). Suggested-by: Rob Herring Link: https://lore.kernel.org/r/20201009155505.5a580ef5@xhacker.debian Signed-off-by: Jisheng Zhang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 742833249198bfd07944158eca50f740faf823f3 Author: Jisheng Zhang Date: Fri Oct 9 15:54:36 2020 +0800 PCI: dwc: Skip PCIE_MSI_INTR0* programming if MSI is disabled If MSI is disabled, there's no need to program PCIE_MSI_INTR0_MASK and PCIE_MSI_INTR0_ENABLE registers. Link: https://lore.kernel.org/r/20201009155436.27e67238@xhacker.debian Signed-off-by: Jisheng Zhang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Gustavo Pimentel commit b101a39897d8369366e8a901666a32ee6db3974d Author: Kunihiko Hayashi Date: Wed Sep 30 14:36:07 2020 +0900 PCI: keystone: Remove iATU register mapping After applying "PCI: dwc: Add common iATU register support", there is no need to set own iATU in the Keystone driver itself. Suggested-by: Rob Herring Link: https://lore.kernel.org/r/1601444167-11316-5-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Kunihiko Hayashi Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Cc: Murali Karicheri Cc: Jingoo Han Cc: Gustavo Pimentel commit 13ab639ed48c1e777682d1a80097594d21a193dc Author: Kunihiko Hayashi Date: Wed Sep 30 14:36:06 2020 +0900 PCI: dwc: Add common iATU register support This gets iATU register area from reg property that has reg-names "atu". In Synopsys DWC version 4.80 or later, since iATU register area is separated from core register area, this area is necessary to get from DT independently. Suggested-by: Rob Herring Link: https://lore.kernel.org/r/1601444167-11316-4-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Kunihiko Hayashi Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Cc: Murali Karicheri Cc: Jingoo Han Cc: Gustavo Pimentel commit 1ba415a277c02f650f78fac9d493d6312cd27c47 Author: Kunihiko Hayashi Date: Wed Sep 30 14:36:05 2020 +0900 dt-bindings: PCI: uniphier-ep: Add iATU register description In the dt-bindings, "atu" reg-names is required to get the register space for iATU in Synopsis DWC version 4.80 or later. Link: https://lore.kernel.org/r/1601444167-11316-3-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Kunihiko Hayashi Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 927f56d67f474aa75be877fb548f99b71941c62f Author: Kunihiko Hayashi Date: Wed Sep 30 14:36:04 2020 +0900 dt-bindings: PCI: uniphier: Add iATU register description In the dt-bindings, "atu" reg-names is required to get the register space for iATU in Synopsys DWC version 4.80 or later. Link: https://lore.kernel.org/r/1601444167-11316-2-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Kunihiko Hayashi Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring commit 722939528a37aa0cb22d441e2045c0cf53e78fb0 Author: Sumit Garg Date: Thu Sep 17 19:10:22 2020 +0530 tee: client UUID: Skip REE kernel login method as well Since the addition of session's client UUID generation via commit [1], login via REE kernel method was disallowed. So fix that via passing nill UUID in case of TEE_IOCTL_LOGIN_REE_KERNEL method as well. Fixes: e33bcbab16d1 ("tee: add support for session's client UUID generation") [1] Signed-off-by: Sumit Garg Signed-off-by: Jens Wiklander commit 558e4c36ec9f2722af4fe8ef84dc812bcdb5c43a Author: Krzysztof Kozlowski Date: Thu Aug 27 09:31:28 2020 +0200 maiblox: mediatek: Fix handling of platform_get_irq() error platform_get_irq() returns -ERRNO on error. In such case casting to u32 and comparing to 0 would pass the check. Fixes: 623a6143a845 ("mailbox: mediatek: Add Mediatek CMDQ driver") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit 7002ca237b216d651d032439c45dc664f1f955bb Author: Sudeep Holla Date: Thu Oct 8 20:14:52 2020 +0100 mailbox: arm_mhu: Add ARM MHU doorbell driver The MHU drives the signal using a 32-bit register, with all 32 bits logically ORed together. The MHU provides a set of registers to enable software to set, clear, and check the status of each of the bits of this register independently. The use of 32 bits for each interrupt line enables software to provide more information about the source of the interrupt. For example, each bit of the register can be associated with a type of event that can contribute to raising the interrupt. This patch adds a separate the MHU controller driver for doorbel mode of operation using the extended DT binding to add support the same. Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar commit ab99e237a48298c458d49b8d8bd850e1aa58e457 Author: Sudeep Holla Date: Thu Oct 8 20:14:51 2020 +0100 mailbox: arm_mhu: Match only if compatible is "arm,mhu" Since we will be soon adding a separate driver based on this ARM MHU driver to support doorbell mode, let us add explicit check to match the default compatible for this driver. This is needed as the probe and match reuses the AMBA device ids currently and don't have any explicit compatible check. Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar commit 471de2c027422b372b1bb2578aa3123ee56b7125 Author: Sudeep Holla Date: Thu Oct 8 20:14:50 2020 +0100 dt-bindings: mailbox: add doorbell support to ARM MHU The ARM MHU's reference manual states following: "The MHU drives the signal using a 32-bit register, with all 32 bits logically ORed together. The MHU provides a set of registers to enable software to set, clear, and check the status of each of the bits of this register independently. The use of 32 bits for each interrupt line enables software to provide more information about the source of the interrupt. For example, each bit of the register can be associated with a type of event that can contribute to raising the interrupt." This patch thus extends the MHU controller's DT binding to add support for doorbell mode. Though the same MHU hardware controller is used in the two modes, A new compatible string is added here to represent the combination of the MHU hardware and the firmware sitting on the other side (which expects each bit to represent a different signal now). Reviewed-by: Rob Herring Acked-by: Arnd Bergmann Co-developed-by: Viresh Kumar Signed-off-by: Viresh Kumar Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar commit 9070f35d25ce1781e3b5a3c6f68287ce3b8f937d Author: Viresh Kumar Date: Thu Oct 8 20:14:49 2020 +0100 dt-bindings: mailbox : arm,mhu: Convert to Json-schema Convert the DT binding over to Json-schema. Reviewed-by: Rob Herring Signed-off-by: Viresh Kumar Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar commit 5b92d8e9e5fa8dac0e7e5dd5f04d9b445eb39c58 Author: Allen Pais Date: Mon Aug 17 14:46:08 2020 +0530 mailbox: bcm: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Jassi Brar commit 865c50e1d279671728c2936cb7680eb89355eeea Author: Nick Desaulniers Date: Fri Aug 7 13:59:18 2020 -0700 x86/uaccess: utilize CONFIG_CC_HAS_ASM_GOTO_OUTPUT Clang-11 shipped support for outputs to asm goto statments along the fallthrough path. Double up some of the get_user() and related macros to be able to take advantage of this extended GNU C extension. This should help improve the generated code's performance for these accesses. Cc: Bill Wendling Suggested-by: Linus Torvalds Signed-off-by: Nick Desaulniers Signed-off-by: Linus Torvalds commit d55564cfc222326e944893eff0c4118353e349ec Author: Linus Torvalds Date: Wed Apr 8 13:36:49 2020 -0700 x86: Make __put_user() generate an out-of-line call Instead of inlining the stac/mov/clac sequence (which also requires individual exception table entries and several asm instruction alternatives entries), just generate "call __put_user_nocheck_X" for the __put_user() cases, the same way we changed __get_user earlier. Unlike the get_user() case, we didn't have the same nice infrastructure to just generate the call with a single case, so this actually has to change some of the infrastructure in order to do this. But that only cleans up the code further. So now, instead of using a case statement for the sizes, we just do the same thing we've done on the get_user() side for a long time: use the size as an immediate constant to the asm, and generate the asm that way directly. In order to handle the special case of 64-bit data on a 32-bit kernel, I needed to change the calling convention slightly: the data is passed in %eax[:%edx], the pointer in %ecx, and the return value is also returned in %ecx. It used to be returned in %eax, but because of how %eax can now be a double register input, we don't want mix that with a single-register output. The actual low-level asm is easier to handle: we'll just share the code between the checking and non-checking case, with the non-checking case jumping into the middle of the function. That may sound a bit too special, but this code is all very very special anyway, so... Cc: Al Viro Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Peter Zijlstra Signed-off-by: Linus Torvalds commit ea6f043fc9847e670b91dfbf1ef1cdff3451c152 Author: Linus Torvalds Date: Wed Apr 8 12:50:01 2020 -0700 x86: Make __get_user() generate an out-of-line call Instead of inlining the whole stac/lfence/mov/clac sequence (which also requires individual exception table entries and several asm instruction alternatives entries), just generate "call __get_user_nocheck_X" for the __get_user() cases. We can use all the same infrastructure that we already do for the regular "get_user()", and the end result is simpler source code, and much simpler code generation. It also means that when I introduce asm goto with input for "unsafe_get_user()", there are no nasty interactions with the __get_user() code. Cc: Al Viro Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Peter Zijlstra Signed-off-by: Linus Torvalds commit 53acd350503d56a73aa6c61bced1699e8396c6d0 Merge: 22230cd2c55bd 1ad5f100e3ba7 Author: Linus Torvalds Date: Mon Oct 12 16:50:18 2020 -0700 Merge tag 'locks-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking fix from Jeff Layton: "Just a single patch to fix up some tracepoint output" * tag 'locks-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: Remove extra "0x" in tracepoint format specifier commit 22230cd2c55bd27ee2c3a3def97c0d5577a75b82 Merge: e18afa5bfa4a2 028abd9222df0 Author: Linus Torvalds Date: Mon Oct 12 16:44:57 2020 -0700 Merge branch 'compat.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull compat mount cleanups from Al Viro: "The last remnants of mount(2) compat buried by Christoph. Buried into NFS, that is. Generally I'm less enthusiastic about "let's use in_compat_syscall() deep in call chain" kind of approach than Christoph seems to be, but in this case it's warranted - that had been an NFS-specific wart, hopefully not to be repeated in any other filesystems (read: any new filesystem introducing non-text mount options will get NAKed even if it doesn't mess the layout up). IOW, not worth trying to grow an infrastructure that would avoid that use of in_compat_syscall()..." * 'compat.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: remove compat_sys_mount fs,nfs: lift compat nfs4 mount data handling into the nfs code nfs: simplify nfs4_parse_monolithic commit e18afa5bfa4a2f0e07b0864370485df701dacbc1 Merge: 85ed13e78dbed 80bdad3d7e3ec Author: Linus Torvalds Date: Mon Oct 12 16:37:13 2020 -0700 Merge branch 'work.quota-compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull compat quotactl cleanups from Al Viro: "More Christoph's compat cleanups: quotactl(2)" * 'work.quota-compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: quota: simplify the quotactl compat handling compat: add a compat_need_64bit_alignment_fixup() helper compat: lift compat_s64 and compat_u64 to commit 85ed13e78dbedf9433115a62c85429922bc5035c Merge: c90578360c92c 5d47b394794d3 Author: Linus Torvalds Date: Mon Oct 12 16:35:51 2020 -0700 Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull compat iovec cleanups from Al Viro: "Christoph's series around import_iovec() and compat variant thereof" * 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: security/keys: remove compat_keyctl_instantiate_key_iov mm: remove compat_process_vm_{readv,writev} fs: remove compat_sys_vmsplice fs: remove the compat readv/writev syscalls fs: remove various compat readv/writev helpers iov_iter: transparently handle compat iovecs in import_iovec iov_iter: refactor rw_copy_check_uvector and import_iovec iov_iter: move rw_copy_check_uvector() into lib/iov_iter.c compat.h: fix a spelling error in commit c90578360c92c71189308ebc71087197080e94c3 Merge: 50d228345a03c 70d65cd555c5e Author: Linus Torvalds Date: Mon Oct 12 16:24:13 2020 -0700 Merge branch 'work.csum_and_copy' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull copy_and_csum cleanups from Al Viro: "Saner calling conventions for csum_and_copy_..._user() and friends" [ Removing 800+ lines of code and cleaning stuff up is good - Linus ] * 'work.csum_and_copy' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ppc: propagate the calling conventions change down to csum_partial_copy_generic() amd64: switch csum_partial_copy_generic() to new calling conventions sparc64: propagate the calling convention changes down to __csum_partial_copy_...() xtensa: propagate the calling conventions change down into csum_partial_copy_generic() mips: propagate the calling convention change down into __csum_partial_copy_..._user() mips: __csum_partial_copy_kernel() has no users left mips: csum_and_copy_{to,from}_user() are never called under KERNEL_DS sparc32: propagate the calling conventions change down to __csum_partial_copy_sparc_generic() i386: propagate the calling conventions change down to csum_partial_copy_generic() sh: propage the calling conventions change down to csum_partial_copy_generic() m68k: get rid of zeroing destination on error in csum_and_copy_from_user() arm: propagate the calling convention changes down to csum_partial_copy_from_user() alpha: propagate the calling convention changes down to csum_partial_copy.c helpers saner calling conventions for csum_and_copy_..._user() csum_and_copy_..._user(): pass 0xffffffff instead of 0 as initial sum csum_partial_copy_nocheck(): drop the last argument unify generic instances of csum_partial_copy_nocheck() icmp_push_reply(): reorder adding the checksum up skb_copy_and_csum_bits(): don't bother with the last argument commit 50d228345a03c882dfe11928ab41b42458b3f922 Merge: ced3a9eb3cd0d 4fb220da0dd03 Author: Linus Torvalds Date: Mon Oct 12 16:21:29 2020 -0700 Merge tag 'docs-5.10' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "As hoped, things calmed down for docs this cycle; fewer changes and almost no conflicts at all. This includes: - A reworked and expanded user-mode Linux document - Some simplifications and improvements for submitting-patches.rst - An emergency fix for (some) problems with Sphinx 3.x - Some welcome automarkup improvements to automatically generate cross-references to struct definitions and other documents - The usual collection of translation updates, typo fixes, etc" * tag 'docs-5.10' of git://git.lwn.net/linux: (81 commits) gpiolib: Update indentation in driver.rst for code excerpts Documentation/admin-guide: tainted-kernels: Fix typo occured Documentation: better locations for sysfs-pci, sysfs-tagging docs: programming-languages: refresh blurb on clang support Documentation: kvm: fix a typo Documentation: Chinese translation of Documentation/arm64/amu.rst doc: zh_CN: index files in arm64 subdirectory mailmap: add entry for doc: seq_file: clarify role of *pos in ->next() docs: trace: ring-buffer-design.rst: use the new SPDX tag Documentation: kernel-parameters: clarify "module." parameters Fix references to nommu-mmap.rst docs: rewrite admin-guide/sysctl/abi.rst docs: fb: Remove vesafb scrollback boot option docs: fb: Remove sstfb scrollback boot option docs: fb: Remove matroxfb scrollback boot option docs: fb: Remove framebuffer scrollback boot option docs: replace the old User Mode Linux HowTo with a new one Documentation/admin-guide: blockdev/ramdisk: remove use of "rdev" Documentation/admin-guide: README & svga: remove use of "rdev" ... commit ced3a9eb3cd0d07462cdbaa8a0f3d46e5aaeadec Merge: 2646fb032f511 c331649e63715 Author: Linus Torvalds Date: Mon Oct 12 16:20:31 2020 -0700 Merge tag 'ia64_for_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull ia64 updates from Tony Luck: "Cleanups by Christoph: - Switch to libata instead of legacy ide driver - Drop ia64 perfmon (it's been broken for a while)" * tag 'ia64_for_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: ia64: Use libata instead of the legacy ide driver in defconfigs ia64: Remove perfmon commit ccdf7fae3afaeaf0e5dd03311b86ffa56adf85ae Merge: a308283fdbf71 376dcfe3a4e5a Author: Jakub Kicinski Date: Mon Oct 12 16:16:50 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2020-10-12 The main changes are: 1) The BPF verifier improvements to track register allocation pattern, from Alexei and Yonghong. 2) libbpf relocation support for different size load/store, from Andrii. 3) bpf_redirect_peer() helper and support for inner map array with different max_entries, from Daniel. 4) BPF support for per-cpu variables, form Hao. 5) sockmap improvements, from John. ==================== Signed-off-by: Jakub Kicinski commit 5be019040cb7bab4caf152cacadffee91a78b506 Author: Raed Salem Date: Tue Jun 16 17:53:06 2020 +0300 net/mlx5e: IPsec: Add Connect-X IPsec Tx data path offload In the TX data path, spot packets with xfrm stack IPsec offload indication. Fill Software-Parser segment in TX descriptor so that the hardware may parse the ESP protocol, and perform TX checksum offload on the inner payload. Support GSO, by providing the trailer data and ICV placeholder so HW can fill it post encryption operation. Padding alignment cannot be performed in HW (ConnectX-6Dx) due to a bug. Software can overcome this limitation by adding NETIF_F_HW_ESP to the gso_partial_features field in netdev so the packets being aligned by the stack. l4_inner_checksum cannot be offloaded by HW for IPsec tunnel type packet. Note that for GSO SKBs, the stack does not include an ESP trailer, unlike the non-GSO case. Below is the iperf3 performance report on two server of 24 cores Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz with ConnectX6-DX. All the bandwidth test uses iperf3 TCP traffic with packet size 128KB. Each tunnel uses one iperf3 stream with one thread (option -P1). TX crypto offload shows improvements on both bandwidth and CPU utilization. ---------------------------------------------------------------------- Mode | Num tunnel | BW | Send CPU util | Recv CPU util | | (Gbps) | (Average %) | (Average %) ---------------------------------------------------------------------- Cryto offload | | | | (RX only) | 1 | 4.7 | 4.2 | 3.5 ---------------------------------------------------------------------- Cryto offload | | | | (RX only) | 24 | 15.6 | 20 | 10 ---------------------------------------------------------------------- Non-offload | 1 | 4.6 | 4 | 5 ---------------------------------------------------------------------- Non-offload | 24 | 11.9 | 16 | 12 ---------------------------------------------------------------------- Cryto offload | | | | (TX & RX) | 1 | 11.9 | 2.1 | 5.9 ---------------------------------------------------------------------- Cryto offload | | | | (TX & RX) | 24 | 38 | 9.5 | 27.5 ---------------------------------------------------------------------- Cryto offload | | | | (TX only) | 1 | 4.7 | 0.7 | 5 ---------------------------------------------------------------------- Cryto offload | | | | (TX only) | 24 | 14.5 | 6 | 20 Regression tests show no degradation on non-ipsec and non-offload-ipsec traffics. The packet rate test uses pktgen UDP to transmit on single CPU, the instructions and cycles are measured on the transmit CPU. before: ---------------------------------------------------------------------- Non-offload | 1 | 4.7 | 4.2 | 5.1 ---------------------------------------------------------------------- Non-offload | 24 | 11.2 | 14 | 15 ---------------------------------------------------------------------- Non-ipsec | 1 | 28 | 4 | 5.7 ---------------------------------------------------------------------- Non-ipsec | 24 | 68.3 | 17.8 | 39.7 ---------------------------------------------------------------------- Non-ipsec packet rate(BURST=1000 BC=5 NCPUS=1 SIZE=60) 13.56Mpps, 456 instructions/pkt, 191 cycles/pkt after: ---------------------------------------------------------------------- Non-offload | 1 | 4.69 | 4.2 | 5 ---------------------------------------------------------------------- Non-offload | 24 | 11.9 | 13.5 | 15.1 ---------------------------------------------------------------------- Non-ipsec | 1 | 29 | 3.2 | 5.5 ---------------------------------------------------------------------- Non-ipsec | 24 | 68.2 | 18.5 | 39.8 ---------------------------------------------------------------------- Non-ipsec packet rate: 13.56Mpps, 472 instructions/pkt, 191 cycles/pkt Signed-off-by: Raed Salem Signed-off-by: Huy Nguyen Reviewed-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 9b9d454ddbf0c41391ed68ea82bc3d8ff6a65074 Author: Huy Nguyen Date: Fri Jun 5 20:17:51 2020 -0500 net/mlx5e: IPsec: Add TX steering rule per IPsec state Add new FTE in TX IPsec FT per IPsec state. It has the same matching criteria as the RX steering rule. The IPsec FT is created/destroyed when the first/last rule is added/deleted respectively. Signed-off-by: Huy Nguyen Reviewed-by: Boris Pismenny Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit ee92e4f1f95eb7b8820299f10fc5fba16d85cece Author: Huy Nguyen Date: Wed Apr 8 14:47:39 2020 -0500 net/mlx5: Add NIC TX domain namespace Add new namespace that represents the NIC TX domain. Signed-off-by: Huy Nguyen Signed-off-by: Raed Salem Signed-off-by: Saeed Mahameed commit 825f8b0b17a89774fe62ca5b79823185ba0dc849 Author: Colin Ian King Date: Tue Oct 6 19:12:43 2020 +0100 net/mlx5: Fix uininitialized pointer read on pointer attr Currently the error exit path err_free kfree's attr. In the case where flow and parse_attr failed to be allocated this return path will free the uninitialized pointer attr, which is not correct. In the other case where attr fails to allocate attr does not need to be freed. So in both error exits via err_free attr should not be freed, so remove it. Addresses-Coverity: ("Uninitialized pointer read") Fixes: ff7ea04ad579 ("net/mlx5e: Fix potential null pointer dereference") Signed-off-by: Colin Ian King Signed-off-by: Saeed Mahameed commit 2646fb032f511862312ec8eb7f774aaededf310d Merge: ee4a925107d1f dfc53baae3c6a Author: Linus Torvalds Date: Mon Oct 12 15:30:32 2020 -0700 Merge tag 'x86-hyperv-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 Hyper-V update from Ingo Molnar: "A single commit harmonizing the x86 and ARM64 Hyper-V constants namespace" * tag 'x86-hyperv-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/hyperv: Remove aliases with X64 in their name commit 9b80e4c4ddaca3501177ed41e49d0928ba2122a8 Author: Kees Cook Date: Wed Aug 12 14:47:03 2020 -0700 overflow: Add __must_check attribute to check_*() helpers Since the destination variable of the check_*_overflow() helpers will contain a wrapped value on failure, it would be best to make sure callers really did check the return result of the helper. Adjust the macros to use a bool-wrapping static inline that is marked with __must_check. This means the macros can continue to have their type-agnostic behavior while gaining the function attribute (that cannot be applied directly to macros). Suggested-by: Rasmus Villemoes Link: https://lore.kernel.org/lkml/202008151007.EF679DF@keescook/ Signed-off-by: Kees Cook commit ee4a925107d1f4d10ee0a935841c2491f1c06ec0 Merge: ad884ff329312 7c9f80cb76ec9 Author: Linus Torvalds Date: Mon Oct 12 15:15:24 2020 -0700 Merge tag 'x86-paravirt-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 paravirt cleanup from Ingo Molnar: "Clean up the paravirt code after the removal of 32-bit Xen PV support" * tag 'x86-paravirt-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/paravirt: Avoid needless paravirt step clearing page table entries x86/paravirt: Remove set_pte_at() pv-op x86/entry/32: Simplify CONFIG_XEN_PV build dependency x86/paravirt: Use CONFIG_PARAVIRT_XXL instead of CONFIG_PARAVIRT x86/paravirt: Clean up paravirt macros x86/paravirt: Remove 32-bit support from CONFIG_PARAVIRT_XXL commit ad884ff32931265294a8989636a5a76aea06b571 Merge: c1b4ec85ee40c 642d94cf336fe Author: Linus Torvalds Date: Mon Oct 12 15:14:11 2020 -0700 Merge tag 'x86-build-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build update from Ingo Molnar: "Remove a couple of ancient and distracting printouts from the x86 build, such as the CRC sum or limited size data - most of which can be gained via tools" * tag 'x86-build-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build: Declutter the build output commit c1b4ec85ee40cc7a9f7b48bea9013094f2d88203 Merge: b85cac574592b 7a27ef5e83089 Author: Linus Torvalds Date: Mon Oct 12 15:02:38 2020 -0700 Merge tag 'x86-mm-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mm updates from Ingo Molnar: "Do not sync vmalloc/ioremap mappings on x86-64 kernels. Hopefully now without the bugs!" * tag 'x86-mm-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/64: Update comment in preallocate_vmalloc_pages() x86/mm/64: Do not sync vmalloc/ioremap mappings commit a308283fdbf712b30061d2b4567530eb9e8dc1b4 Merge: 547848af58e3e 793d5d6124269 Author: Jakub Kicinski Date: Mon Oct 12 15:00:36 2020 -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) Inspect the reply packets coming from DR/TUN and refresh connection state and timeout, from longguang yue and Julian Anastasov. 2) Series to add support for the inet ingress chain type in nf_tables. ==================== Signed-off-by: Jakub Kicinski commit 547848af58e3eb5a0d8b0a5e6433042f111788e2 Merge: 2ad119d998e49 1388875b39168 Author: Jakub Kicinski Date: Mon Oct 12 14:42:55 2020 -0700 Merge branch 'bnxt_en-Updates-for-net-next' Michael Chan says: ==================== bnxt_en: Updates for net-next. This series contains these main changes: 1. Change of default message level to enable more logging. 2. Some cleanups related to processing async events from firmware. 3. Allow online ethtool selftest on multi-function PFs. 4. Return stored firmware version information to devlink. v2: Patch 3: Change bnxt_reset_task() to silent mode. Patch 8 & 9: Ensure we copy NULL terminated fw strings to devlink. Patch 8 & 9: Return directly after the last bnxt_dl_info_put() call. Patch 9: If FW call to get stored dev info fails, return success to devlink without the stored versions. ==================== Signed-off-by: Jakub Kicinski commit b85cac574592b843c4be93c83303feeee0c4dc25 Merge: 1c6890707eb14 76167e5c5457a Author: Linus Torvalds Date: Mon Oct 12 14:42:19 2020 -0700 Merge tag 'x86-kaslr-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 kaslr updates from Ingo Molnar: "This cleans up and simplifies the x86 KASLR code, and also fixes some corner case bugs" * tag 'x86-kaslr-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits) x86/kaslr: Replace strlen() with strnlen() x86/kaslr: Add a check that the random address is in range x86/kaslr: Make local variables 64-bit x86/kaslr: Replace 'unsigned long long' with 'u64' x86/kaslr: Make minimum/image_size 'unsigned long' x86/kaslr: Small cleanup of find_random_phys_addr() x86/kaslr: Drop unnecessary alignment in find_random_virt_addr() x86/kaslr: Drop redundant check in store_slot_info() x86/kaslr: Make the type of number of slots/slot areas consistent x86/kaslr: Drop test for command-line parameters before parsing x86/kaslr: Simplify process_gb_huge_pages() x86/kaslr: Short-circuit gb_huge_pages on x86-32 x86/kaslr: Fix off-by-one error in process_gb_huge_pages() x86/kaslr: Drop some redundant checks from __process_mem_region() x86/kaslr: Drop redundant variable in __process_mem_region() x86/kaslr: Eliminate 'start_orig' local variable from __process_mem_region() x86/kaslr: Drop redundant cur_entry from __process_mem_region() x86/kaslr: Fix off-by-one error in __process_mem_region() x86/kaslr: Initialize mem_limit to the real maximum address x86/kaslr: Fix process_efi_entries comment ... commit 1388875b391689459659335a1fdbe5c5d45f3500 Author: Vasundhara Volam Date: Mon Oct 12 05:10:54 2020 -0400 bnxt_en: Add stored FW version info to devlink info_get cb. This patch adds FW versions stored in the flash to devlink info_get callback. Return the correct fw.psid running version using the newly added bp->nvm_cfg_ver. v2: Ensure stored pkg_name string is NULL terminated when copied to devlink. Return directly from the last call to bnxt_dl_info_put(). If the FW call to get stored version fails for any reason, return success immediately to devlink without the stored versions. Reviewed-by: Andy Gospodarek Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1602493854-29283-10-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 7154917a12b20ea46b09097a22342bcdf6adac66 Author: Vasundhara Volam Date: Mon Oct 12 05:10:53 2020 -0400 bnxt_en: Refactor bnxt_dl_info_get(). Add a new function bnxt_dl_info_put() to simplify the code, as there are more stored firmware version fields to be added in the next patch. Also, rename fw_ver variable name to ncsi_ver for better naming while copying to devlink info_get cb. v2: Ensure active_pkg_name string is NULL terminated when copied to devlink. Return directly from the last call to bnxt_dl_info_put(). Reviewed-by: Pavan Chebbi Reviewed-by: Andy Gospodarek Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1602493854-29283-9-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 4933f6753b50367b581084927bf19efa1bcaac86 Author: Vasundhara Volam Date: Mon Oct 12 05:10:52 2020 -0400 bnxt_en: Add bnxt_hwrm_nvm_get_dev_info() to query NVM info. Add a new bnxt_hwrm_nvm_get_dev_info() to query firmware version information via NVM_GET_DEV_INFO firmware command. Use it to get the running version of the NVM configuration information. This new function will also be used in subsequent patches to get the stored firmware versions. Reviewed-by: Andy Gospodarek Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1602493854-29283-8-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 8eddb3e7ce124dd6375d3664f1aae13873318b0f Author: Michael Chan Date: Mon Oct 12 05:10:51 2020 -0400 bnxt_en: Log unknown link speed appropriately. If the VF virtual link is set to always enabled, the speed may be unknown when the physical link is down. The driver currently logs the link speed as 4294967295 Mbps which is SPEED_UNKNOWN. Modify the link up log message as "speed unknown" which makes more sense. Reviewed-by: Vasundhara Volam Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1602493854-29283-7-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit c966c67c09921e117991b54a83e1e9ac6dbc3899 Author: Michael Chan Date: Mon Oct 12 05:10:50 2020 -0400 bnxt_en: Log event_data1 and event_data2 when handling RESET_NOTIFY event. Log these values that contain useful firmware state information. Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1602493854-29283-6-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 03ab8ca1e920f6adb35fc7ea80e18006d652d465 Author: Michael Chan Date: Mon Oct 12 05:10:49 2020 -0400 bnxt_en: Simplify bnxt_async_event_process(). event_data1 and event_data2 are used when processing most events. Store these in local variables at the beginning of the function to simplify many of the case statements. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1602493854-29283-5-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 8fb35cd302f74e63db4ce43a44e5e5fae44d80e3 Author: Michael Chan Date: Mon Oct 12 05:10:48 2020 -0400 bnxt_en: Set driver default message level. Currently, bp->msg_enable has default value of 0. It is more useful to have the commonly used NETIF_MSG_DRV and NETIF_MSG_HW enabled by default. v2: Change the fall back bnxt_reset_task() inside bnxt_rx_ring_reset() to silent mode. With older fw, we would take the fall back path and it would be very noisy. Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1602493854-29283-4-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 6896cb35eec5020e889f755b176c41951f5976c6 Author: Vasundhara Volam Date: Mon Oct 12 05:10:47 2020 -0400 bnxt_en: Enable online self tests for multi-host/NPAR mode. Online self tests are not disruptive and can be run in NPAR mode and in multi-host NIC as well. Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1602493854-29283-3-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit cf223bfaf791f4c6ab6a5c213b91b9311ac9f2bd Author: Vasundhara Volam Date: Mon Oct 12 05:10:46 2020 -0400 bnxt_en: Return -EROFS to user space, if NVM writes are not permitted. If NVRAM resources are locked, NVM writes are not permitted. In such scenarios, firmware returns HWRM_ERR_CODE_RESOURCE_LOCKED error to firmware commands. Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/1602493854-29283-2-git-send-email-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 1c6890707eb1438b0fb4e0a10d4afe48a217628b Merge: 3bff6112c80ce bcb53209be5cb Author: Linus Torvalds Date: Mon Oct 12 14:21:15 2020 -0700 Merge tag 'perf-kprobes-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf/kprobes updates from Ingo Molnar: "This prepares to unify the kretprobe trampoline handler and make kretprobe lockless (those patches are still work in progress)" * tag 'perf-kprobes-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: kprobes: Fix to check probe enabled before disarm_kprobe_ftrace() kprobes: Make local functions static kprobes: Free kretprobe_instance with RCU callback kprobes: Remove NMI context check sparc: kprobes: Use generic kretprobe trampoline handler sh: kprobes: Use generic kretprobe trampoline handler s390: kprobes: Use generic kretprobe trampoline handler powerpc: kprobes: Use generic kretprobe trampoline handler parisc: kprobes: Use generic kretprobe trampoline handler mips: kprobes: Use generic kretprobe trampoline handler ia64: kprobes: Use generic kretprobe trampoline handler csky: kprobes: Use generic kretprobe trampoline handler arc: kprobes: Use generic kretprobe trampoline handler arm64: kprobes: Use generic kretprobe trampoline handler arm: kprobes: Use generic kretprobe trampoline handler x86/kprobes: Use generic kretprobe trampoline handler kprobes: Add generic kretprobe trampoline handler commit 64a632da538a6827fad0ea461925cedb9899ebe2 Author: Marek Vasut Date: Sat Oct 10 11:10:00 2020 +0200 net: fec: Fix phy_device lookup for phy_reset_after_clk_enable() The phy_reset_after_clk_enable() is always called with ndev->phydev, however that pointer may be NULL even though the PHY device instance already exists and is sufficient to perform the PHY reset. This condition happens in fec_open(), where the clock must be enabled first, then the PHY must be reset, and then the PHY IDs can be read out of the PHY. If the PHY still is not bound to the MAC, but there is OF PHY node and a matching PHY device instance already, use the OF PHY node to obtain the PHY device instance, and then use that PHY device instance when triggering the PHY reset. Fixes: 1b0a83ac04e3 ("net: fec: add phy_reset_after_clk_enable() support") Signed-off-by: Marek Vasut Cc: Christoph Niedermaier Cc: David S. Miller Cc: NXP Linux Team Cc: Richard Leitner Cc: Shawn Guo Signed-off-by: Jakub Kicinski commit 3bff6112c80cecb76af5fe485506f96e8adb6122 Merge: dd502a81077a5 f91072ed1b728 Author: Linus Torvalds Date: Mon Oct 12 14:14:35 2020 -0700 Merge tag 'perf-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull performance events updates from Ingo Molnar: "x86 Intel updates: - Add Jasper Lake support - Add support for TopDown metrics on Ice Lake - Fix Ice Lake & Tiger Lake uncore support, add Snow Ridge support - Add a PCI sub driver to support uncore PMUs where the PCI resources have been claimed already - extending the range of supported systems. x86 AMD updates: - Restore 'perf stat -a' behaviour to program the uncore PMU to count all CPU threads. - Fix setting the proper count when sampling Large Increment per Cycle events / 'paired' events. - Fix IBS Fetch sampling on F17h and some other IBS fine tuning, greatly reducing the number of interrupts when large sample periods are specified. - Extends Family 17h RAPL support to also work on compatible F19h machines. Core code updates: - Fix race in perf_mmap_close() - Add PERF_EV_CAP_SIBLING, to denote that sibling events should be closed if the leader is removed. - Smaller fixes and updates" * tag 'perf-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (45 commits) perf/core: Fix race in the perf_mmap_close() function perf/x86: Fix n_metric for cancelled txn perf/x86: Fix n_pair for cancelled txn x86/events/amd/iommu: Fix sizeof mismatch perf/x86/intel: Check perf metrics feature for each CPU perf/x86/intel: Fix Ice Lake event constraint table perf/x86/intel/uncore: Fix the scale of the IMC free-running events perf/x86/intel/uncore: Fix for iio mapping on Skylake Server perf/x86/msr: Add Jasper Lake support perf/x86/intel: Add Jasper Lake support perf/x86/intel/uncore: Reduce the number of CBOX counters perf/x86/intel/uncore: Update Ice Lake uncore units perf/x86/intel/uncore: Split the Ice Lake and Tiger Lake MSR uncore support perf/x86/intel/uncore: Support PCIe3 unit on Snow Ridge perf/x86/intel/uncore: Generic support for the PCI sub driver perf/x86/intel/uncore: Factor out uncore_pci_pmu_unregister() perf/x86/intel/uncore: Factor out uncore_pci_pmu_register() perf/x86/intel/uncore: Factor out uncore_pci_find_dev_pmu() perf/x86/intel/uncore: Factor out uncore_pci_get_dev_die_info() perf/amd/uncore: Inform the user how many counters each uncore PMU has ... commit b2b8a92733b288128feb57ffa694758cf475106c Author: Jonathan Lemon Date: Thu Oct 8 11:45:26 2020 -0700 mlx4: handle non-napi callers to napi_poll netcons calls napi_poll with a budget of 0 to transmit packets. Handle this by: - skipping RX processing - do not try to recycle TX packets to the RX cache Signed-off-by: Jonathan Lemon Reviewed-by: Tariq Toukan Signed-off-by: Jakub Kicinski commit dd502a81077a5f3b3e19fa9a1accffdcab5ad5bc Merge: 34eb62d868d72 69e0ad37c9f32 Author: Linus Torvalds Date: Mon Oct 12 13:58:15 2020 -0700 Merge tag 'core-static_call-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull static call support from Ingo Molnar: "This introduces static_call(), which is the idea of static_branch() applied to indirect function calls. Remove a data load (indirection) by modifying the text. They give the flexibility of function pointers, but with better performance. (This is especially important for cases where retpolines would otherwise be used, as retpolines can be pretty slow.) API overview: DECLARE_STATIC_CALL(name, func); DEFINE_STATIC_CALL(name, func); DEFINE_STATIC_CALL_NULL(name, typename); static_call(name)(args...); static_call_cond(name)(args...); static_call_update(name, func); x86 is supported via text patching, otherwise basic indirect calls are used, with function pointers. There's a second variant using inline code patching, inspired by jump-labels, implemented on x86 as well. The new APIs are utilized in the x86 perf code, a heavy user of function pointers, where static calls speed up the PMU handler by 4.2% (!). The generic implementation is not really excercised on other architectures, outside of the trivial test_static_call_init() self-test" * tag 'core-static_call-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) static_call: Fix return type of static_call_init tracepoint: Fix out of sync data passing by static caller tracepoint: Fix overly long tracepoint names x86/perf, static_call: Optimize x86_pmu methods tracepoint: Optimize using static_call() static_call: Allow early init static_call: Add some validation static_call: Handle tail-calls static_call: Add static_call_cond() x86/alternatives: Teach text_poke_bp() to emulate RET static_call: Add simple self-test for static calls x86/static_call: Add inline static call implementation for x86-64 x86/static_call: Add out-of-line static call implementation static_call: Avoid kprobes on inline static_call()s static_call: Add inline static call infrastructure static_call: Add basic static call infrastructure compiler.h: Make __ADDRESSABLE() symbol truly unique jump_label,module: Fix module lifetime for __jump_label_mod_text_reserved() module: Properly propagate MODULE_STATE_COMING failure module: Fix up module_notifier return values ... commit 34eb62d868d729e9a252aa497277081fb652eeed Merge: e6412f9833db2 6e0bf0e0e5500 Author: Linus Torvalds Date: Mon Oct 12 13:39:19 2020 -0700 Merge tag 'core-build-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull orphan section checking from Ingo Molnar: "Orphan link sections were a long-standing source of obscure bugs, because the heuristics that various linkers & compilers use to handle them (include these bits into the output image vs discarding them silently) are both highly idiosyncratic and also version dependent. Instead of this historically problematic mess, this tree by Kees Cook (et al) adds build time asserts and build time warnings if there's any orphan section in the kernel or if a section is not sized as expected. And because we relied on so many silent assumptions in this area, fix a metric ton of dependencies and some outright bugs related to this, before we can finally enable the checks on the x86, ARM and ARM64 platforms" * tag 'core-build-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits) x86/boot/compressed: Warn on orphan section placement x86/build: Warn on orphan section placement arm/boot: Warn on orphan section placement arm/build: Warn on orphan section placement arm64/build: Warn on orphan section placement x86/boot/compressed: Add missing debugging sections to output x86/boot/compressed: Remove, discard, or assert for unwanted sections x86/boot/compressed: Reorganize zero-size section asserts x86/build: Add asserts for unwanted sections x86/build: Enforce an empty .got.plt section x86/asm: Avoid generating unused kprobe sections arm/boot: Handle all sections explicitly arm/build: Assert for unwanted sections arm/build: Add missing sections arm/build: Explicitly keep .ARM.attributes sections arm/build: Refactor linker script headers arm64/build: Assert for unwanted sections arm64/build: Add missing DWARF sections arm64/build: Use common DISCARDS in linker script arm64/build: Remove .eh_frame* sections due to unwind tables ... commit e6412f9833db23740ee848ab3d6e7af18dff82a6 Merge: ed016af52ee30 4d0a4388ccdd9 Author: Linus Torvalds Date: Mon Oct 12 13:26:49 2020 -0700 Merge tag 'efi-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI changes from Ingo Molnar: - Preliminary RISC-V enablement - the bulk of it will arrive via the RISCV tree. - Relax decompressed image placement rules for 32-bit ARM - Add support for passing MOK certificate table contents via a config table rather than a EFI variable. - Add support for 18 bit DIMM row IDs in the CPER records. - Work around broken Dell firmware that passes the entire Boot#### variable contents as the command line - Add definition of the EFI_MEMORY_CPU_CRYPTO memory attribute so we can identify it in the memory map listings. - Don't abort the boot on arm64 if the EFI RNG protocol is available but returns with an error - Replace slashes with exclamation marks in efivarfs file names - Split efi-pstore from the deprecated efivars sysfs code, so we can disable the latter on !x86. - Misc fixes, cleanups and updates. * tag 'efi-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits) efi: mokvar: add missing include of asm/early_ioremap.h efi: efivars: limit availability to X86 builds efi: remove some false dependencies on CONFIG_EFI_VARS efi: gsmi: fix false dependency on CONFIG_EFI_VARS efi: efivars: un-export efivars_sysfs_init() efi: pstore: move workqueue handling out of efivars efi: pstore: disentangle from deprecated efivars module efi: mokvar-table: fix some issues in new code efi/arm64: libstub: Deal gracefully with EFI_RNG_PROTOCOL failure efivarfs: Replace invalid slashes with exclamation marks in dentries. efi: Delete deprecated parameter comments efi/libstub: Fix missing-prototypes in string.c efi: Add definition of EFI_MEMORY_CPU_CRYPTO and ability to report it cper,edac,efi: Memory Error Record: bank group/address and chip id edac,ghes,cper: Add Row Extension to Memory Error Record efi/x86: Add a quirk to support command line arguments on Dell EFI firmware efi/libstub: Add efi_warn and *_once logging helpers integrity: Load certs from the EFI MOK config table integrity: Move import of MokListRT certs to a separate routine efi: Support for MOK variable config table ... commit ed016af52ee3035b4799ebd7d53f9ae59d5782c4 Merge: edaa5ddf38336 2116d708b0580 Author: Linus Torvalds Date: Mon Oct 12 13:06:20 2020 -0700 Merge tag 'locking-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "These are the locking updates for v5.10: - Add deadlock detection for recursive read-locks. The rationale is outlined in commit 224ec489d3cd ("lockdep/ Documention: Recursive read lock detection reasoning") The main deadlock pattern we want to detect is: TASK A: TASK B: read_lock(X); write_lock(X); read_lock_2(X); - Add "latch sequence counters" (seqcount_latch_t): A sequence counter variant where the counter even/odd value is used to switch between two copies of protected data. This allows the read path, typically NMIs, to safely interrupt the write side critical section. We utilize this new variant for sched-clock, and to make x86 TSC handling safer. - Other seqlock cleanups, fixes and enhancements - KCSAN updates - LKMM updates - Misc updates, cleanups and fixes" * tag 'locking-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (67 commits) lockdep: Revert "lockdep: Use raw_cpu_*() for per-cpu variables" lockdep: Fix lockdep recursion lockdep: Fix usage_traceoverflow locking/atomics: Check atomic-arch-fallback.h too locking/seqlock: Tweak DEFINE_SEQLOCK() kernel doc lockdep: Optimize the memory usage of circular queue seqlock: Unbreak lockdep seqlock: PREEMPT_RT: Do not starve seqlock_t writers seqlock: seqcount_LOCKNAME_t: Introduce PREEMPT_RT support seqlock: seqcount_t: Implement all read APIs as statement expressions seqlock: Use unique prefix for seqcount_t property accessors seqlock: seqcount_LOCKNAME_t: Standardize naming convention seqlock: seqcount latch APIs: Only allow seqcount_latch_t rbtree_latch: Use seqcount_latch_t x86/tsc: Use seqcount_latch_t timekeeping: Use seqcount_latch_t time/sched_clock: Use seqcount_latch_t seqlock: Introduce seqcount_latch_t mm/swap: Do not abuse the seqcount_t latching API time/sched_clock: Use raw_read_seqcount_latch() during suspend ... commit edaa5ddf3833669a25654d42c0fb653dfdd906df Merge: 13cb73490f475 feff2e65efd8d Author: Linus Torvalds Date: Mon Oct 12 12:56:01 2020 -0700 Merge tag 'sched-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: - reorganize & clean up the SD* flags definitions and add a bunch of sanity checks. These new checks caught quite a few bugs or at least inconsistencies, resulting in another set of patches. - rseq updates, add MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ - add a new tracepoint to improve CPU capacity tracking - improve overloaded SMP system load-balancing behavior - tweak SMT balancing - energy-aware scheduling updates - NUMA balancing improvements - deadline scheduler fixes and improvements - CPU isolation fixes - misc cleanups, simplifications and smaller optimizations * tag 'sched-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (42 commits) sched/deadline: Unthrottle PI boosted threads while enqueuing sched/debug: Add new tracepoint to track cpu_capacity sched/fair: Tweak pick_next_entity() rseq/selftests: Test MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ rseq/selftests,x86_64: Add rseq_offset_deref_addv() rseq/membarrier: Add MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ sched/fair: Use dst group while checking imbalance for NUMA balancer sched/fair: Reduce busy load balance interval sched/fair: Minimize concurrent LBs between domain level sched/fair: Reduce minimal imbalance threshold sched/fair: Relax constraint on task's load during load balance sched/fair: Remove the force parameter of update_tg_load_avg() sched/fair: Fix wrong cpu selecting from isolated domain sched: Remove unused inline function uclamp_bucket_base_value() sched/rt: Disable RT_RUNTIME_SHARE by default sched/deadline: Fix stale throttling on de-/boosted tasks sched/numa: Use runnable_avg to classify node sched/topology: Move sd_flag_debug out of #ifdef CONFIG_SYSCTL MAINTAINERS: Add myself as SCHED_DEADLINE reviewer sched/topology: Move SD_DEGENERATE_GROUPS_MASK out of linux/sched/topology.h ... commit 4fb220da0dd03d3699776220d86ac84b38941c0c Author: Andy Shevchenko Date: Wed Oct 7 17:38:17 2020 +0300 gpiolib: Update indentation in driver.rst for code excerpts When TABs are being used to indent the code excerpts inside the bullet lists some of the tools [vim in particular] fail to recognize it and continue interpreting the special characters inside the quoted excerpt. Update indentation in driver.rst for code excerpts to avoid their special interpretation. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201007143817.76335-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Corbet commit 7a87724d0492388c3c1fe770c494d10115799598 Author: Naoki Hayama Date: Mon Oct 12 17:24:41 2020 +0900 Documentation/admin-guide: tainted-kernels: Fix typo occured Fix typo. s/occured/occurred/ Signed-off-by: Naoki Hayama Link: https://lore.kernel.org/r/20201012082441.5831-1-naoki.hayama@lineo.co.jp Signed-off-by: Jonathan Corbet commit 6402f4ce95811db7df72244ca84860332e4c2518 Author: Vignesh Raghavendra Date: Mon Oct 12 12:39:58 2020 +0530 mtd: hyperbus: Fix build failure when only RPCIF_HYPERBUS is enabled commit 5de15b610f78 ("mtd: hyperbus: add Renesas RPC-IF driver") leads to build failure[1] with COMPILE_TEST and RPCIF_HYPERBUS enabled. This is because driver needs functions RENESAS_RPCIF which is only buildable for CONFIG_ARCH_RENESAS. Fix this by dropping COMPILE_TEST from RPCIF_HYPERBUS Kconfig entry. This ensures driver can be built only when RENESAS_RPCIF is also selected. [1]: rpc-if.c:(.text+0x20): undefined reference to `rpcif_disable_rpm' ld: drivers/mtd/hyperbus/rpc-if.o: in function `rpcif_hb_prepare_read': rpc-if.c:(.text+0xd6): undefined reference to `rpcif_prepare' ld: drivers/mtd/hyperbus/rpc-if.o: in function `rpcif_hb_read16': [...] Fixes: 5de15b610f78 ("mtd: hyperbus: add Renesas RPC-IF driver") leads Reported-by: Richard Weinberger Signed-off-by: Vignesh Raghavendra Signed-off-by: Richard Weinberger commit 13cb73490f475f8e7669f9288be0bcfa85399b1f Merge: cc7343724eb77 d53d9bc0cf783 Author: Linus Torvalds Date: Mon Oct 12 12:05:24 2020 -0700 Merge tag 'x86-entry-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 entry code updates from Thomas Gleixner: "More consolidation and correctness fixes for the debug exception: - Ensure BTF synchronization under all circumstances - Distangle kernel and user mode #DB further - Get ordering vs. the debug notifier correct to make KGDB work more reliably. - Cleanup historical gunk and make the code simpler to understand" * tag 'x86-entry-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/debug: Change thread.debugreg6 to thread.virtual_dr6 x86/debug: Support negative polarity DR6 bits x86/debug: Simplify hw_breakpoint_handler() x86/debug: Remove aout_dump_debugregs() x86/debug: Remove the historical junk x86/debug: Move cond_local_irq_enable() block into exc_debug_user() x86/debug: Move historical SYSENTER junk into exc_debug_kernel() x86/debug: Simplify #DB signal code x86/debug: Remove handle_debug(.user) argument x86/debug: Move kprobe_debug_handler() into exc_debug_kernel() x86/debug: Sync BTF earlier commit 0450d1f9a295646af84455e4e5b745d151ff81e1 Author: Zhen Lei Date: Mon Oct 12 14:12:25 2020 +0800 dt-bindings: arm: hisilicon: add missing properties into cpuctrl.yaml Add properties: #address-cells, #size-cells and ranges. Due to the Hisilicon CPU controller node may contains child nodes, change the value of "additionalProperties" from "false" to "type: object". The corresponding examples are also added. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20201012061225.1597-11-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 879baf11777cdfa5a04c266c7a987907887c7443 Author: Zhen Lei Date: Mon Oct 12 14:12:24 2020 +0800 dt-bindings: arm: hisilicon: add missing properties into sysctrl.yaml Add properties: #reset-cells, #address-cells, #size-cells and ranges. Due to the Hisilicon system controller node may contains child nodes, change the value of "additionalProperties" from "false" to "type: object". The examples have also been updated. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20201012061225.1597-10-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit cc7343724eb77ce0752b1097a275f22f6fe47057 Merge: c457cc800e892 981aa1d366bf4 Author: Linus Torvalds Date: Mon Oct 12 11:40:41 2020 -0700 Merge tag 'x86-irq-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 irq updates from Thomas Gleixner: "Surgery of the MSI interrupt handling to prepare the support of upcoming devices which require non-PCI based MSI handling: - Cleanup historical leftovers all over the place - Rework the code to utilize more core functionality - Wrap XEN PCI/MSI interrupts into an irqdomain to make irqdomain assignment to PCI devices possible. - Assign irqdomains to PCI devices at initialization time which allows to utilize the full functionality of hierarchical irqdomains. - Remove arch_.*_msi_irq() functions from X86 and utilize the irqdomain which is assigned to the device for interrupt management. - Make the arch_.*_msi_irq() support conditional on a config switch and let the last few users select it" * tag 'x86-irq-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits) PCI: MSI: Fix Kconfig dependencies for PCI_MSI_ARCH_FALLBACKS x86/apic/msi: Unbreak DMAR and HPET MSI iommu/amd: Remove domain search for PCI/MSI iommu/vt-d: Remove domain search for PCI/MSI[X] x86/irq: Make most MSI ops XEN private x86/irq: Cleanup the arch_*_msi_irqs() leftovers PCI/MSI: Make arch_.*_msi_irq[s] fallbacks selectable x86/pci: Set default irq domain in pcibios_add_device() iommm/amd: Store irq domain in struct device iommm/vt-d: Store irq domain in struct device x86/xen: Wrap XEN MSI management into irqdomain irqdomain/msi: Allow to override msi_domain_alloc/free_irqs() x86/xen: Consolidate XEN-MSI init x86/xen: Rework MSI teardown x86/xen: Make xen_msi_init() static and rename it to xen_hvm_msi_init() PCI/MSI: Provide pci_dev_has_special_msi_domain() helper PCI_vmd_Mark_VMD_irqdomain_with_DOMAIN_BUS_VMD_MSI irqdomain/msi: Provide DOMAIN_BUS_VMD_MSI x86/irq: Initialize PCI/MSI domain at PCI init time x86/pci: Reducde #ifdeffery in PCI init code ... commit c457cc800e892315d428a724ede09a085c4501be Merge: f5f59336a9ae8 863bae1fbcfa0 Author: Linus Torvalds Date: Mon Oct 12 11:34:32 2020 -0700 Merge tag 'irq-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "Updates for the interrupt subsystem: Core: - Allow trimming of interrupt hierarchy to support odd hardware setups where only a subset of the interrupts requires the full hierarchy. - Allow the retrigger mechanism to follow a hierarchy to simplify driver code. - Provide a mechanism to force enable wakeup interrrupts on suspend. - More infrastructure to handle IPIs in the core code Architectures: - Convert ARM/ARM64 IPI handling to utilize the interrupt core code. Drivers: - The usual pile of new interrupt chips (MStar, Actions Owl, TI PRUSS, Designware ICTL) - ARM(64) IPI related conversions - Wakeup support for Qualcom PDC - Prevent hierarchy corruption in the NVIDIA Tegra driver - The usual small fixes, improvements and cleanups all over the place" * tag 'irq-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (59 commits) dt-bindings: interrupt-controller: Add MStar interrupt controller irqchip/irq-mst: Add MStar interrupt controller support soc/tegra: pmc: Don't create fake interrupt hierarchy levels soc/tegra: pmc: Allow optional irq parent callbacks gpio: tegra186: Allow optional irq parent callbacks genirq/irqdomain: Allow partial trimming of irq_data hierarchy irqchip/qcom-pdc: Reset PDC interrupts during init irqchip/qcom-pdc: Set IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag pinctrl: qcom: Set IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag genirq/PM: Introduce IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag pinctrl: qcom: Use return value from irq_set_wake() call pinctrl: qcom: Set IRQCHIP_SET_TYPE_MASKED and IRQCHIP_MASK_ON_SUSPEND flags ARM: Handle no IPI being registered in show_ipi_list() MAINTAINERS: Add entries for Actions Semi Owl SIRQ controller irqchip: Add Actions Semi Owl SIRQ controller dt-bindings: interrupt-controller: Add Actions SIRQ controller binding dt-bindings: dw-apb-ictl: Update binding to describe use as primary interrupt controller irqchip/dw-apb-ictl: Add primary interrupt controller support irqchip/dw-apb-ictl: Refactor priot to introducing hierarchical irq domains genirq: Add stub for set_handle_irq() when !GENERIC_IRQ_MULTI_HANDLER ... commit f5f59336a9ae8f683772d6b8cb2d6732b5e567ea Merge: 20d49bfcc3d23 1b80043ed2189 Author: Linus Torvalds Date: Mon Oct 12 11:27:54 2020 -0700 Merge tag 'timers-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timekeeping updates from Thomas Gleixner: "Updates for timekeeping, timers and related drivers: Core: - Early boot support for the NMI safe timekeeper by utilizing local_clock() up to the point where timekeeping is initialized. This allows printk() to store multiple timestamps in the ringbuffer which is useful for coordinating dmesg information across a fleet of machines. - Provide a multi-timestamp accessor for printk() - Make timer init more robust by checking for invalid timer flags. - Comma vs semicolon fixes Drivers: - Support for new platforms in existing drivers (SP804 and Renesas CMT) - Comma vs semicolon fixes * tag 'timers-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/armada-370-xp: Use semicolons rather than commas to separate statements clocksource/drivers/mps2-timer: Use semicolons rather than commas to separate statements timers: Mask invalid flags in do_init_timer() clocksource/drivers/sp804: Enable Hisilicon sp804 timer 64bit mode clocksource/drivers/sp804: Add support for Hisilicon sp804 timer clocksource/drivers/sp804: Support non-standard register offset clocksource/drivers/sp804: Prepare for support non-standard register offset clocksource/drivers/sp804: Remove a mismatched comment clocksource/drivers/sp804: Delete the leading "__" of some functions clocksource/drivers/sp804: Remove unused sp804_timer_disable() and timer-sp804.h clocksource/drivers/sp804: Cleanup clk_get_sys() dt-bindings: timer: renesas,cmt: Document r8a774e1 CMT support dt-bindings: timer: renesas,cmt: Document r8a7742 CMT support alarmtimer: Convert comma to semicolon timekeeping: Provide multi-timestamp accessor to NMI safe timekeeper timekeeping: Utilize local_clock() for NMI safe timekeeper during early boot commit d3c8f2784d3266d27956659c78835ee1d1925ad2 Author: Paul Cercueil Date: Mon Oct 12 12:25:09 2020 +0200 drm/ingenic: Fix bad revert Fix a badly reverted commit. The revert commit was cherry-picked from drm-misc-next to drm-misc-next-fixes, and in the process some unrelated code was added. Fixes: a3fb64c00d44 ("Revert "gpu/drm: ingenic: Add option to mmap GEM buffers cached"") Signed-off-by: Paul Cercueil Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201012102509.10690-1-paul@crapouillou.net commit 214bba50616f65264dfc30d095daef3ab7500f52 Author: Ville Syrjälä Date: Thu Oct 8 13:16:06 2020 +0300 drm/i915: Set all unused color plane offsets to ~0xfff again When the number of potential color planes grew to 4 we stopped setting all unused color plane offsets to ~0xfff. The code still tries to do this, but actually does nothing since the loop limits are bogus. skl_check_main_surface() actually depends on this ~0xfff behaviour as it will make sure to move the main surface offset below the aux surface offset because the hardware AUX_DIST must be a non-negative value [1], and for simplicity it doesn't bother checking if the AUX plane is actually needed or not. So currently it may end up shuffling the main surface around based on some stale leftover AUX offset. The skl+ plane code also just blindly calculates the AUX_DIST whether or not the AUX plane is actually needed by the hw or not, and that too will now potentially use some stale AUX surface offset in the calculation. Would seem nicer to guarantee a consistent non-negative AUX_DIST always. So bring back the original ~0xfff offset behaviour for unused color planes. Though it doesn't seem super likely that this inconsistency would cause any real issues. Cc: Dhinakaran Pandiyan Cc: Lucas De Marchi Cc: Imre Deak Cc: Radhakrishna Sripada Fixes: 2dfbf9d2873a ("drm/i915/tgl: Gen-12 display can decompress surfaces compressed by the media engine") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20201008101608.8652-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak (cherry picked from commit 79148ce4b25d418327feca8abb2f7392d49f5259) Signed-off-by: Rodrigo Vivi commit f0b707c125a2e228bcc047cd46040943bef61931 Author: Ville Syrjälä Date: Thu Oct 1 01:36:42 2020 +0300 drm/i915: Fix TGL DKL PHY DP vswing handling The HDMI vs. not-HDMI check got inverted whem the bogus encoder->type checks were eliminated. So now we're using 0 as the link rate on DP and potentially non-zero on HDMI, which is exactly the opposite of what we want. The original bogus check actually worked more correctly by accident since if would always evaluate to true. Due to this we now always use the RBR/HBR1 vswing table and never ever the HBR2+ vswing table. That is probably not a good way to get a high quality signal at HBR2+ rates. Fix the check so we pick the right table. Cc: stable@vger.kernel.org Cc: Vandita Kulkarni Cc: Uma Shankar Fixes: 94641eb6c696 ("drm/i915/display: Fix the encoder type check") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200930223642.28565-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza Reviewed-by: Vandita Kulkarni (cherry picked from commit 945b18fb4803b01e822ade6aef6cc0b6e4bd644f) Signed-off-by: Rodrigo Vivi commit 20d49bfcc3d234b461ab42c3c64208b8e496c927 Merge: 1e6d1d96461eb 88451f2cd3cec Author: Linus Torvalds Date: Mon Oct 12 11:21:24 2020 -0700 Merge tag 'core-debugobjects-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects updates from Thomas Gleixner: "A small set of updates for debug objects: - Make all debug object descriptors constant. There is no reason to have them writeable. - Free the per CPU object pool after CPU unplug to avoid memory waste" * tag 'core-debugobjects-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Free per CPU pool after CPU unplug treewide: Make all debug_obj_descriptors const debugobjects: Allow debug_obj_descr to be const commit 1e6d1d96461eb350a98c1a0fe9fd93ea14a157e8 Merge: 64743e652cea9 238c91115cd05 Author: Linus Torvalds Date: Mon Oct 12 11:13:15 2020 -0700 Merge tag 'x86_core_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Borislav Petkov: "A single fix making the error message when the opcode bytes at rIP cannot be accessed during an oops, more precise" * tag 'x86_core_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/dumpstack: Fix misleading instruction pointer error message commit a5917fa876946f54566a59ab59a746efc8d50226 Author: Krzysztof Kozlowski Date: Fri Sep 25 23:26:09 2020 +0200 dt-bindings: pwm: imx: document i.MX compatibles Document all ARMv5, ARMv6 and ARMv7 i.MX compatibles to fix dtbs_check warnings like: arch/arm/boot/dts/imx6dl-colibri-eval-v3.dt.yaml: pwm@2080000: compatible:0: 'fsl,imx6q-pwm' is not one of ['fsl,imx8mm-pwm', 'fsl,imx8mn-pwm', 'fsl,imx8mp-pwm', 'fsl,imx8mq-pwm'] Acked-by: Thierry Reding Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200925212609.23093-1-krzk@kernel.org Signed-off-by: Rob Herring commit 64743e652cea9d6df4264caaa1d7f95273024afb Merge: f94ab231136c5 29b6bd41ee24f Author: Linus Torvalds Date: Mon Oct 12 10:53:32 2020 -0700 Merge tag 'x86_cache_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cache resource control updates from Borislav Petkov: - Misc cleanups to the resctrl code in preparation for the ARM side (James Morse) - Add support for controlling per-thread memory bandwidth throttling delay values on hw which supports it (Fenghua Yu) * tag 'x86_cache_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Enable user to view thread or core throttling mode x86/resctrl: Enumerate per-thread MBA controls cacheinfo: Move resctrl's get_cache_id() to the cacheinfo header file x86/resctrl: Add struct rdt_cache::arch_has_{sparse, empty}_bitmaps x86/resctrl: Merge AMD/Intel parse_bw() calls x86/resctrl: Add struct rdt_membw::arch_needs_linear to explain AMD/Intel MBA difference x86/resctrl: Use is_closid_match() in more places x86/resctrl: Include pid.h x86/resctrl: Use container_of() in delayed_work handlers x86/resctrl: Fix stale comment x86/resctrl: Remove struct rdt_membw::max_delay x86/resctrl: Remove unused struct mbm_state::chunks_bw commit f94ab231136c53ee26b1ddda76b29218018834ff Merge: a0d445f70c5d7 900ffe39fec90 Author: Linus Torvalds Date: Mon Oct 12 10:51:02 2020 -0700 Merge tag 'x86_cleanups_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Borislav Petkov: "Misc minor cleanups" * tag 'x86_cleanups_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry: Fix typo in comments for syscall_enter_from_user_mode() x86/resctrl: Fix spelling in user-visible warning messages x86/entry/64: Do not include inst.h in calling.h x86/mpparse: Remove duplicate io_apic.h include commit a0d445f70c5d746eb3aa28c4d80619e624e49b4b Merge: 87194efe7ecdf 1ef5423a55c2a Author: Linus Torvalds Date: Mon Oct 12 10:49:46 2020 -0700 Merge tag 'x86_fpu_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fpu updates from Borislav Petkov: - Allow clearcpuid= to accept multiple bits (Arvind Sankar) - Move clearcpuid= parameter handling earlier in the boot, away from the FPU init code and to a generic location (Mike Hommey) * tag 'x86_fpu_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Handle FPU-related and clearcpuid command line arguments earlier x86/fpu: Allow multiple bits in clearcpuid= parameter commit 87194efe7ecdf8d145c7cef130fda9652bf77fd7 Merge: 9e536c817960c 1b9abd1755ad9 Author: Linus Torvalds Date: Mon Oct 12 10:44:24 2020 -0700 Merge tag 'x86_fsgsbase_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fsgsbase updates from Borislav Petkov: "Misc minor cleanups and corrections to the fsgsbase code and respective selftests" * tag 'x86_fsgsbase_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/x86/fsgsbase: Test PTRACE_PEEKUSER for GSBASE with invalid LDT GS selftests/x86/fsgsbase: Reap a forgotten child x86/fsgsbase: Replace static_cpu_has() with boot_cpu_has() x86/entry/64: Correct the comment over SAVE_AND_SET_GSBASE commit 9e536c817960c698c23feed6f9bff6d192805543 Merge: ac74075e5d525 f94c91f7ba3ba Author: Linus Torvalds Date: Mon Oct 12 10:42:23 2020 -0700 Merge tag 'x86_misc_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 fixes fromm Borislav Petkov: - Ratelimit the message about writes to unrecognized MSRs so that they don't spam the console log (Chris Down) - Document how the /proc/cpuinfo machinery works for future reference (Kyung Min Park, Ricardo Neri and Dave Hansen) - Correct the current NMI's duration calculation (Libing Zhou) * tag 'x86_misc_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/nmi: Fix nmi_handle() duration miscalculation Documentation/x86: Add documentation for /proc/cpuinfo feature flags x86/msr: Make source of unrecognised MSR writes unambiguous x86/msr: Prevent userspace MSR access from dominating the console commit 2099363255f123f6c9abcfa8531bbec65a8f1820 Merge: 3de066f8f86bf ac93ab2bf69a5 c10ff790c42e4 Author: Alex Williamson Date: Mon Oct 12 11:41:02 2020 -0600 Merge branches 'v5.10/vfio/fsl-mc-v6' and 'v5.10/vfio/zpci-info-v3' into v5.10/vfio/next commit ac74075e5d525f3e782f88ed8d8b1df35c1497e5 Merge: 8b6591fd0ac8b 7f5933f81bd85 Author: Linus Torvalds Date: Mon Oct 12 10:40:34 2020 -0700 Merge tag 'x86_pasid_for_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 PASID updates from Borislav Petkov: "Initial support for sharing virtual addresses between the CPU and devices which doesn't need pinning of pages for DMA anymore. Add support for the command submission to devices using new x86 instructions like ENQCMD{,S} and MOVDIR64B. In addition, add support for process address space identifiers (PASIDs) which are referenced by those command submission instructions along with the handling of the PASID state on context switch as another extended state. Work by Fenghua Yu, Ashok Raj, Yu-cheng Yu and Dave Jiang" * tag 'x86_pasid_for_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/asm: Add an enqcmds() wrapper for the ENQCMDS instruction x86/asm: Carve out a generic movdir64b() helper for general usage x86/mmu: Allocate/free a PASID x86/cpufeatures: Mark ENQCMD as disabled when configured out mm: Add a pasid member to struct mm_struct x86/msr-index: Define an IA32_PASID MSR x86/fpu/xstate: Add supervisor PASID state for ENQCMD x86/cpufeatures: Enumerate ENQCMD and ENQCMDS instructions Documentation/x86: Add documentation for SVA (Shared Virtual Addressing) iommu/vt-d: Change flags type to unsigned int in binding mm drm, iommu: Change type of pasid to u32 commit c10ff790c42e45abaf6f598ba53c9ff63198ecac Author: Matthew Rosato Date: Wed Oct 7 14:56:24 2020 -0400 MAINTAINERS: Add entry for s390 vfio-pci Add myself to cover s390-specific items related to vfio-pci. Signed-off-by: Matthew Rosato Acked-by: Cornelia Huck Signed-off-by: Alex Williamson commit e6b817d4b8217a9528fcfd59719b924ab8a5ff23 Author: Matthew Rosato Date: Wed Oct 7 14:56:23 2020 -0400 vfio-pci/zdev: Add zPCI capabilities to VFIO_DEVICE_GET_INFO Define a new configuration entry VFIO_PCI_ZDEV for VFIO/PCI. When this s390-only feature is configured we add capabilities to the VFIO_DEVICE_GET_INFO ioctl that describe features of the associated zPCI device and its underlying hardware. This patch is based on work previously done by Pierre Morel. Signed-off-by: Matthew Rosato Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit ac93ab2bf69a5b7724106ec7ce852eff9c307510 Author: Diana Craciun Date: Mon Oct 5 20:36:54 2020 +0300 vfio/fsl-mc: Add support for device reset Currently only resetting the DPRC container is supported which will reset all the objects inside it. Resetting individual objects is possible from the userspace by issueing commands towards MC firmware. Signed-off-by: Diana Craciun Reviewed-by: Eric Auger Signed-off-by: Alex Williamson commit 1bb141ed5e14f773f9e08b80fe5db3fd405399db Author: Diana Craciun Date: Mon Oct 5 20:36:53 2020 +0300 vfio/fsl-mc: Add read/write support for fsl-mc devices The software uses a memory-mapped I/O command interface (MC portals) to communicate with the MC hardware. This command interface is used to discover, enumerate, configure and remove DPAA2 objects. The DPAA2 objects use MSIs, so the command interface needs to be emulated such that the correct MSI is configured in the hardware (the guest has the virtual MSIs). This patch is adding read/write support for fsl-mc devices. The mc commands are emulated by the userspace. The host is just passing the correct command to the hardware. Also the current patch limits userspace to write complete 64byte command once and read 64byte response by one ioctl. Signed-off-by: Bharat Bhushan Signed-off-by: Diana Craciun Signed-off-by: Alex Williamson commit cc0ee20bd96971c10eba9a83ecf1c0733078a083 Author: Diana Craciun Date: Mon Oct 5 20:36:52 2020 +0300 vfio/fsl-mc: trigger an interrupt via eventfd This patch allows to set an eventfd for fsl-mc device interrupts and also to trigger the interrupt eventfd from userspace for testing. All fsl-mc device interrupts are MSIs. The MSIs are allocated from the MSI domain only once per DPRC and used by all the DPAA2 objects. The interrupts are managed by the DPRC in a pool of interrupts. Each device requests interrupts from this pool. The pool is allocated when the first virtual device is setting the interrupts. The pool of interrupts is protected by a lock. The DPRC has an interrupt of its own which indicates if the DPRC contents have changed. However, currently, the contents of a DPRC assigned to the guest cannot be changed at runtime, so this interrupt is not configured. Signed-off-by: Bharat Bhushan Signed-off-by: Diana Craciun Reviewed-by: Eric Auger Signed-off-by: Alex Williamson commit 2e0d29561f593a5ab6d37ea032513d2714a007df Author: Diana Craciun Date: Mon Oct 5 20:36:51 2020 +0300 vfio/fsl-mc: Add irq infrastructure for fsl-mc devices This patch adds the skeleton for interrupt support for fsl-mc devices. The interrupts are not yet functional, the functionality will be added by subsequent patches. Signed-off-by: Bharat Bhushan Signed-off-by: Diana Craciun Reviewed-by: Eric Auger Signed-off-by: Alex Williamson commit f2ba7e8c947bf38fec799fdf9122e05a6a3e8382 Author: Diana Craciun Date: Mon Oct 5 20:36:50 2020 +0300 vfio/fsl-mc: Added lock support in preparation for interrupt handling Only the DPRC object allocates interrupts from the MSI interrupt domain. The interrupts are managed by the DPRC in a pool of interrupts. The access to this pool of interrupts has to be protected with a lock. This patch extends the current lock implementation to have a lock per DPRC. Signed-off-by: Diana Craciun Reviewed-by: Eric Auger Signed-off-by: Alex Williamson commit 67247289688d49a610a956c23c4ff032f0281845 Author: Diana Craciun Date: Mon Oct 5 20:36:49 2020 +0300 vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions Allow userspace to mmap device regions for direct access of fsl-mc devices. Signed-off-by: Bharat Bhushan Signed-off-by: Diana Craciun Reviewed-by: Eric Auger Signed-off-by: Alex Williamson commit df747bcd5b216dae7be26945fab2558ed2f7f363 Author: Diana Craciun Date: Mon Oct 5 20:36:48 2020 +0300 vfio/fsl-mc: Implement VFIO_DEVICE_GET_REGION_INFO ioctl call Expose to userspace information about the memory regions. Signed-off-by: Bharat Bhushan Signed-off-by: Diana Craciun Reviewed-by: Eric Auger Signed-off-by: Alex Williamson commit f97f4c04e5d6ca8b90b5b412bd7e72de79426263 Author: Diana Craciun Date: Mon Oct 5 20:36:47 2020 +0300 vfio/fsl-mc: Implement VFIO_DEVICE_GET_INFO ioctl Allow userspace to get fsl-mc device info (number of regions and irqs). Signed-off-by: Bharat Bhushan Signed-off-by: Diana Craciun Reviewed-by: Eric Auger Signed-off-by: Alex Williamson commit 704f5082d8457a2166eb4cb4e460510117c70928 Author: Diana Craciun Date: Mon Oct 5 20:36:46 2020 +0300 vfio/fsl-mc: Scan DPRC objects on vfio-fsl-mc driver bind The DPRC (Data Path Resource Container) device is a bus device and has child devices attached to it. When the vfio-fsl-mc driver is probed the DPRC is scanned and the child devices discovered and initialized. Signed-off-by: Bharat Bhushan Signed-off-by: Diana Craciun Reviewed-by: Eric Auger Signed-off-by: Alex Williamson commit 8b6591fd0ac8b7e8b2873703bc24b71a6f3d2d3e Merge: 92a0610b6acd3 7a6d94f0ed957 Author: Linus Torvalds Date: Mon Oct 12 10:31:18 2020 -0700 Merge tag 'x86_platform_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Borislav Petkov: - Cleanup different aspects of the UV code and start adding support for the new UV5 class of systems (Mike Travis) - Use a flexible array for a dynamically sized struct uv_rtc_timer_head (Gustavo A. R. Silva) * tag 'x86_platform_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/uv: Update Copyrights to conform to HPE standards x86/platform/uv: Update for UV5 NMI MMR changes x86/platform/uv: Update UV5 TSC checking x86/platform/uv: Update node present counting x86/platform/uv: Update UV5 MMR references in UV GRU x86/platform/uv: Adjust GAM MMR references affected by UV5 updates x86/platform/uv: Update MMIOH references based on new UV5 MMRs x86/platform/uv: Add and decode Arch Type in UVsystab x86/platform/uv: Add UV5 direct references x86/platform/uv: Update UV MMRs for UV5 drivers/misc/sgi-xp: Adjust references in UV kernel modules x86/platform/uv: Remove SCIR MMR references for UV systems x86/platform/uv: Remove UV BAU TLB Shootdown Handler x86/uv/time: Use a flexible array in struct uv_rtc_timer_head commit 92a0610b6acd3bfdc977b612853ba6711447e887 Merge: ca1b66922a702 e1ebb2b49048c Author: Linus Torvalds Date: Mon Oct 12 10:24:40 2020 -0700 Merge tag 'x86_cpu_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu updates from Borislav Petkov: - Add support for hardware-enforced cache coherency on AMD which obviates the need to flush cachelines before changing the PTE encryption bit (Krish Sadhukhan) - Add Centaur initialization support for families >= 7 (Tony W Wang-oc) - Add a feature flag for, and expose TSX suspend load tracking feature to KVM (Cathy Zhang) - Emulate SLDT and STR so that windows programs don't crash on UMIP machines (Brendan Shanks and Ricardo Neri) - Use the new SERIALIZE insn on Intel hardware which supports it (Ricardo Neri) - Misc cleanups and fixes * tag 'x86_cpu_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: KVM: SVM: Don't flush cache if hardware enforces cache coherency across encryption domains x86/mm/pat: Don't flush cache if hardware enforces cache coherency across encryption domnains x86/cpu: Add hardware-enforced cache coherency as a CPUID feature x86/cpu/centaur: Add Centaur family >=7 CPUs initialization support x86/cpu/centaur: Replace two-condition switch-case with an if statement x86/kvm: Expose TSX Suspend Load Tracking feature x86/cpufeatures: Enumerate TSX suspend load address tracking instructions x86/umip: Add emulation/spoofing for SLDT and STR instructions x86/cpu: Fix typos and improve the comments in sync_core() x86/cpu: Use XGETBV and XSETBV mnemonics in fpu/internal.h x86/cpu: Use SERIALIZE in sync_core() when available commit a2d24bcb97dc7b0be1cb891e60ae133bdf36c786 Author: Scott Mayhew Date: Sat Oct 10 10:03:12 2020 -0400 nfs: add missing "posix" local_lock constant table definition "mount -o local_lock=posix..." was broken by the mount API conversion due to the missing constant. Fixes: e38bb238ed8c ("NFS: Convert mount option parsing to use functionality from fs_parser.h") Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker commit ca1b66922a702316734bcd5ea2100e5fb8f3caa3 Merge: a9a4b7d9a6380 b3149ffcdb31a Author: Linus Torvalds Date: Mon Oct 12 10:14:38 2020 -0700 Merge tag 'ras_updates_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Borislav Petkov: - Extend the recovery from MCE in kernel space also to processes which encounter an MCE in kernel space but while copying from user memory by sending them a SIGBUS on return to user space and umapping the faulty memory, by Tony Luck and Youquan Song. - memcpy_mcsafe() rework by splitting the functionality into copy_mc_to_user() and copy_mc_to_kernel(). This, as a result, enables support for new hardware which can recover from a machine check encountered during a fast string copy and makes that the default and lets the older hardware which does not support that advance recovery, opt in to use the old, fragile, slow variant, by Dan Williams. - New AMD hw enablement, by Yazen Ghannam and Akshay Gupta. - Do not use MSR-tracing accessors in #MC context and flag any fault while accessing MCA architectural MSRs as an architectural violation with the hope that such hw/fw misdesigns are caught early during the hw eval phase and they don't make it into production. - Misc fixes, improvements and cleanups, as always. * tag 'ras_updates_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Allow for copy_mc_fragile symbol checksum to be generated x86/mce: Decode a kernel instruction to determine if it is copying from user x86/mce: Recover from poison found while copying from user space x86/mce: Avoid tail copy when machine check terminated a copy from user x86/mce: Add _ASM_EXTABLE_CPY for copy user access x86/mce: Provide method to find out the type of an exception handler x86/mce: Pass pointer to saved pt_regs to severity calculation routines x86/copy_mc: Introduce copy_mc_enhanced_fast_string() x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}() x86/mce: Drop AMD-specific "DEFERRED" case from Intel severity rule list x86/mce: Add Skylake quirk for patrol scrub reported errors RAS/CEC: Convert to DEFINE_SHOW_ATTRIBUTE() x86/mce: Annotate mce_rd/wrmsrl() with noinstr x86/mce/dev-mcelog: Do not update kflags on AMD systems x86/mce: Stop mce_reign() from re-computing severity for every CPU x86/mce: Make mce_rdmsrl() panic on an inaccessible MSR x86/mce: Increase maximum number of banks to 64 x86/mce: Delay clearing IA32_MCG_STATUS to the end of do_machine_check() x86/MCE/AMD, EDAC/mce_amd: Remove struct smca_hwid.xec_bitmap RAS/CEC: Fix cec_init() prototype commit a9a4b7d9a6380ae4e1df2c9b90fef6c427229aab Merge: af9db1d6632b7 1dc32628d65a6 Author: Linus Torvalds Date: Mon Oct 12 10:12:26 2020 -0700 Merge tag 'edac_updates_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: - Add Amazon's Annapurna Labs memory controller EDAC driver (Talel Shenhar) - New AMD CPUs support (Yazen Ghannam) - The usual misc fixes and cleanups all over the subsystem * tag 'edac_updates_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/amd64: Set proper family type for Family 19h Models 20h-2Fh EDAC/mc_sysfs: Add missing newlines when printing {max,dimm}_location EDAC/aspeed: Use module_platform_driver() to simplify EDAC, sb_edac: Simplify switch statement EDAC/ti: Fix handling of platform_get_irq() error EDAC/aspeed: Fix handling of platform_get_irq() error EDAC/i5100: Fix error handling order in i5100_init_one() EDAC/highbank: Handover Calxeda Highbank maintenance to Andre Przywara EDAC/socfpga: Transfer SoCFPGA EDAC maintainership EDAC/thunderx: Make symbol lmc_dfs_ents static EDAC/al-mc-edac: Add Amazon's Annapurna Labs Memory Controller driver dt-bindings: EDAC: Add Amazon's Annapurna Labs Memory Controller binding EDAC/mce_amd: Add new error descriptions for existing types EDAC: Replace HTTP links with HTTPS ones commit af9db1d6632b726a2351426ab8f34374f6f38690 Merge: 024fb66772911 50c5feeea0af9 Author: Linus Torvalds Date: Mon Oct 12 10:10:56 2020 -0700 Merge tag 'm68k-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - Conversion of the Mac IDE driver to a platform driver - Minor cleanups and fixes * tag 'm68k-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: ide/macide: Convert Mac IDE driver to platform driver m68k: Replace HTTP links with HTTPS ones m68k: mm: Remove superfluous memblock_alloc*() casts m68k: mm: Use PAGE_ALIGNED() helper m68k: Sort selects in main Kconfig m68k: amiga: Clean up Amiga hardware configuration m68k: Revive _TIF_* masks m68k: Correct some typos in comments m68k: Use get_kernel_nofault() in show_registers() zorro: Fix address space collision message with RAM expansion boards m68k: amiga: Fix Denise detection on OCS commit 024fb66772911a361279c03cd1f394b7a8fd3919 Merge: 6734e20e39207 4a17e8513376b Author: Linus Torvalds Date: Mon Oct 12 10:09:41 2020 -0700 Merge tag 'microblaze-v5.10' of git://git.monstr.eu/linux-2.6-microblaze Pull Microblaze build warning fix from Michal Simek. * tag 'microblaze-v5.10' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: fix kbuild redundant file warning commit 3af5f0f5c74ecbaf757ef06c3f80d56751277637 Author: Valentin Vidic Date: Mon Oct 12 00:03:29 2020 +0200 net: korina: fix kfree of rx/tx descriptor array kmalloc returns KSEG0 addresses so convert back from KSEG1 in kfree. Also make sure array is freed when the driver is unloaded from the kernel. Fixes: ef11291bcd5f ("Add support the Korina (IDT RC32434) Ethernet MAC") Signed-off-by: Valentin Vidic Acked-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit 6734e20e39207556e17d72b5c4950d8f3a4f2de2 Merge: d04a248f1f6cb d13027bb35e08 Author: Linus Torvalds Date: Mon Oct 12 10:00:51 2020 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "There's quite a lot of code here, but much of it is due to the addition of a new PMU driver as well as some arm64-specific selftests which is an area where we've traditionally been lagging a bit. In terms of exciting features, this includes support for the Memory Tagging Extension which narrowly missed 5.9, hopefully allowing userspace to run with use-after-free detection in production on CPUs that support it. Work is ongoing to integrate the feature with KASAN for 5.11. Another change that I'm excited about (assuming they get the hardware right) is preparing the ASID allocator for sharing the CPU page-table with the SMMU. Those changes will also come in via Joerg with the IOMMU pull. We do stray outside of our usual directories in a few places, mostly due to core changes required by MTE. Although much of this has been Acked, there were a couple of places where we unfortunately didn't get any review feedback. Other than that, we ran into a handful of minor conflicts in -next, but nothing that should post any issues. Summary: - Userspace support for the Memory Tagging Extension introduced by Armv8.5. Kernel support (via KASAN) is likely to follow in 5.11. - Selftests for MTE, Pointer Authentication and FPSIMD/SVE context switching. - Fix and subsequent rewrite of our Spectre mitigations, including the addition of support for PR_SPEC_DISABLE_NOEXEC. - Support for the Armv8.3 Pointer Authentication enhancements. - Support for ASID pinning, which is required when sharing page-tables with the SMMU. - MM updates, including treating flush_tlb_fix_spurious_fault() as a no-op. - Perf/PMU driver updates, including addition of the ARM CMN PMU driver and also support to handle CPU PMU IRQs as NMIs. - Allow prefetchable PCI BARs to be exposed to userspace using normal non-cacheable mappings. - Implementation of ARCH_STACKWALK for unwinding. - Improve reporting of unexpected kernel traps due to BPF JIT failure. - Improve robustness of user-visible HWCAP strings and their corresponding numerical constants. - Removal of TEXT_OFFSET. - Removal of some unused functions, parameters and prototypes. - Removal of MPIDR-based topology detection in favour of firmware description. - Cleanups to handling of SVE and FPSIMD register state in preparation for potential future optimisation of handling across syscalls. - Cleanups to the SDEI driver in preparation for support in KVM. - Miscellaneous cleanups and refactoring work" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (148 commits) Revert "arm64: initialize per-cpu offsets earlier" arm64: random: Remove no longer needed prototypes arm64: initialize per-cpu offsets earlier kselftest/arm64: Check mte tagged user address in kernel kselftest/arm64: Verify KSM page merge for MTE pages kselftest/arm64: Verify all different mmap MTE options kselftest/arm64: Check forked child mte memory accessibility kselftest/arm64: Verify mte tag inclusion via prctl kselftest/arm64: Add utilities and a test to validate mte memory perf: arm-cmn: Fix conversion specifiers for node type perf: arm-cmn: Fix unsigned comparison to less than zero arm64: dbm: Invalidate local TLB when setting TCR_EL1.HD arm64: mm: Make flush_tlb_fix_spurious_fault() a no-op arm64: Add support for PR_SPEC_DISABLE_NOEXEC prctl() option arm64: Pull in task_stack_page() to Spectre-v4 mitigation code KVM: arm64: Allow patching EL2 vectors even with KASLR is not enabled arm64: Get rid of arm64_ssbd_state KVM: arm64: Convert ARCH_WORKAROUND_2 to arm64_get_spectre_v4_state() KVM: arm64: Get rid of kvm_arm_have_ssbd() KVM: arm64: Simplify handling of ARCH_WORKAROUND_2 ... commit 8098bd69bc4e925070313b1b95d03510f4f24738 Author: Christian Eggers Date: Mon Oct 12 10:39:42 2020 +0200 net: dsa: microchip: fix race condition Between queuing the delayed work and finishing the setup of the dsa ports, the process may sleep in request_module() (via phy_device_create()) and the queued work may be executed prior to the switch net devices being registered. In ksz_mib_read_work(), a NULL dereference will happen within netof_carrier_ok(dp->slave). Not queuing the delayed work in ksz_init_mib_timer() makes things even worse because the work will now be queued for immediate execution (instead of 2000 ms) in ksz_mac_link_down() via dsa_port_link_register_of(). Call tree: ksz9477_i2c_probe() \--ksz9477_switch_register() \--ksz_switch_register() +--dsa_register_switch() | \--dsa_switch_probe() | \--dsa_tree_setup() | \--dsa_tree_setup_switches() | +--dsa_switch_setup() | | +--ksz9477_setup() | | | \--ksz_init_mib_timer() | | | |--/* Start the timer 2 seconds later. */ | | | \--schedule_delayed_work(&dev->mib_read, msecs_to_jiffies(2000)); | | \--__mdiobus_register() | | \--mdiobus_scan() | | \--get_phy_device() | | +--get_phy_id() | | \--phy_device_create() | | |--/* sleeping, ksz_mib_read_work() can be called meanwhile */ | | \--request_module() | | | \--dsa_port_setup() | +--/* Called for non-CPU ports */ | +--dsa_slave_create() | | +--/* Too late, ksz_mib_read_work() may be called beforehand */ | | \--port->slave = ... | ... | +--Called for CPU port */ | \--dsa_port_link_register_of() | \--ksz_mac_link_down() | +--/* mib_read must be initialized here */ | +--/* work is already scheduled, so it will be executed after 2000 ms */ | \--schedule_delayed_work(&dev->mib_read, 0); \-- /* here port->slave is setup properly, scheduling the delayed work should be safe */ Solution: 1. Do not queue (only initialize) delayed work in ksz_init_mib_timer(). 2. Only queue delayed work in ksz_mac_link_down() if init is completed. 3. Queue work once in ksz_switch_register(), after dsa_register_switch() has completed. Fixes: 7c6ff470aa86 ("net: dsa: microchip: add MIB counter reading support") Signed-off-by: Christian Eggers Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit d04a248f1f6cb4bcd8e38b6894bd4f9dc64b6aa8 Merge: bbf5c979011a0 7b9be800756f6 Author: Linus Torvalds Date: Mon Oct 12 09:54:39 2020 -0700 Merge tag 'tpmdd-next-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: "Support for a new TPM device and fixes and Git URL change (infraded -> korg)" * tag 'tpmdd-next-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: MAINTAINERS: TPM DEVICE DRIVER: Update GIT tpm_tis: Add a check for invalid status tpm: use %*ph to print small buffer dt-bindings: Add SynQucer TPM MMIO as a trivial device tpm: tis: add support for MMIO TPM on SynQuacer commit 2ad119d998e49003327b81edb7b854d0983b5d58 Merge: 15f5e48f93c0e f726f3d37163f Author: Jakub Kicinski Date: Mon Oct 12 09:53:08 2020 -0700 Merge tag 'linux-can-next-for-5.10-20201012' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== linux-can-next-for-5.10-20201012 Both patches are by Oliver Hartkopp, the first one addresses Jakub's review comments of the ISOTP protocol, the other one removes version strings from various CAN protocols. ==================== Signed-off-by: Jakub Kicinski commit 15f5e48f93c0e028b4d5cc0e8ede1168a2308fe6 Author: Ondrej Zary Date: Sat Oct 10 16:00:47 2020 +0200 cx82310_eth: use netdev_err instead of dev_err Use netdev_err for better device identification in syslog. Signed-off-by: Ondrej Zary Signed-off-by: Jakub Kicinski commit ca139d76b0d9e59d18f2d2ec8f0d81b82acd6808 Author: Ondrej Zary Date: Sat Oct 10 16:00:46 2020 +0200 cx82310_eth: re-enable ethernet mode after router reboot When the router is rebooted without a power cycle, the USB device remains connected but its configuration is reset. This results in a non-working ethernet connection with messages like this in syslog: usb 2-2: RX packet too long: 65535 B Re-enable ethernet mode when receiving a packet with invalid size of 0xffff. Signed-off-by: Ondrej Zary Signed-off-by: Jakub Kicinski commit fdf09ab887829cd1b671e45d9549f8ec1ffda0fa Author: Daniel Jordan Date: Thu Oct 8 13:32:20 2020 -0400 module: statically initialize init section freeing data Corentin hit the following workqueue warning when running with CRYPTO_MANAGER_EXTRA_TESTS: WARNING: CPU: 2 PID: 147 at kernel/workqueue.c:1473 __queue_work+0x3b8/0x3d0 Modules linked in: ghash_generic CPU: 2 PID: 147 Comm: modprobe Not tainted 5.6.0-rc1-next-20200214-00068-g166c9264f0b1-dirty #545 Hardware name: Pine H64 model A (DT) pc : __queue_work+0x3b8/0x3d0 Call trace: __queue_work+0x3b8/0x3d0 queue_work_on+0x6c/0x90 do_init_module+0x188/0x1f0 load_module+0x1d00/0x22b0 I wasn't able to reproduce on x86 or rpi 3b+. This is WARN_ON(!list_empty(&work->entry)) from __queue_work(), and it happens because the init_free_wq work item isn't initialized in time for a crypto test that requests the gcm module. Some crypto tests were recently moved earlier in boot as explained in commit c4741b230597 ("crypto: run initcalls for generic implementations earlier"), which went into mainline less than two weeks before the Fixes commit. Avoid the warning by statically initializing init_free_wq and the corresponding llist. Link: https://lore.kernel.org/lkml/20200217204803.GA13479@Red/ Fixes: 1a7b7d922081 ("modules: Use vmalloc special flag") Reported-by: Corentin Labbe Tested-by: Corentin Labbe Tested-on: sun50i-h6-pine-h64 Tested-on: imx8mn-ddr4-evk Tested-on: sun50i-a64-bananapi-m64 Reviewed-by: Eric Biggers Signed-off-by: Daniel Jordan Signed-off-by: Jessica Yu commit 6e9c9686d826564f44c93cdd6f111b1c0a9dc224 Author: Rob Herring Date: Mon Oct 12 09:58:15 2020 -0500 scripts/dtc: Update to upstream version v1.6.0-31-gcbca977ea121 This adds the following commits from upstream: cbca977ea121 checks: Allow PCI bridge child nodes without an address 73e0f143b73d libfdt: fdt_strerror(): Fix comparison warning 6c2be7d85315 libfdt: fdt_get_string(): Fix sequential write comparison warnings 82525f41d59e libfdt: libfdt_wip: Fix comparison warning fb1f65f15832 libfdt: fdt_create_with_flags(): Fix comparison warning f28aa271000b libfdt: fdt_move(): Fix comparison warnings 3d7c6f44195a libfdt: fdt_add_string_(): Fix comparison warning 10f682788c30 libfdt: fdt_node_offset_by_phandle(): Fix comparison warning 07158f4cf2a2 libfdt: overlay: Fix comparison warning ce9e1f25a7de libfdt: fdt_resize(): Fix comparison warning faa76fc10bc5 libfdt: fdt_splice_(): Fix comparison warning 54dca0985316 libfdt: fdt_get_string(): Fix comparison warnings f8e11e61624e libfdt: fdt_grab_space_(): Fix comparison warning 0c43d4d7bf5a libfdt: fdt_mem_rsv(): Fix comparison warnings 442ea3dd1579 libfdt: fdt_offset_ptr(): Fix comparison warnings ca19c3db2bf6 Makefile: Specify cflags for libyaml 7bb86f1c0956 libfdt: fix fdt_check_node_offset_ w/ VALID_INPUT 3d522abc7571 dtc: Include stdlib.h in util.h 808cdaaf524f dtc: Avoid UB when shifting 3e3138b4a956 libfdt: fix fdt_check_full buffer overrun Signed-off-by: Rob Herring commit 98a381a7d4892dd9969d24433a4bca2f45092643 Author: Pablo Neira Ayuso Date: Mon Oct 12 16:54:30 2020 +0200 netfilter: nftables: extend error reporting for chain updates The initial support for netlink extended ACK is missing the chain update path, which results in misleading error reporting in case of EEXIST. Fixes 36dd1bcc07e5 ("netfilter: nf_tables: initial support for extended ACK reporting") Signed-off-by: Pablo Neira Ayuso commit 9f0b5792f07d8f0745c3620d577d6930ff2a96fd Author: Anna Schumaker Date: Mon Sep 28 13:09:01 2020 -0400 NFSD: Encode a full READ_PLUS reply Reply to the client with multiple hole and data segments. I use the result of the first vfs_llseek() call for encoding as an optimization so we don't have to immediately repeat the call. This also lets us encode any remaining reply as data if we get an unexpected result while trying to calculate a hole. Signed-off-by: Anna Schumaker Signed-off-by: J. Bruce Fields commit 278765ea0752e67922c0f2aaf1138f6ba227688d Author: Anna Schumaker Date: Mon Sep 28 13:09:00 2020 -0400 NFSD: Return both a hole and a data segment But only one of each right now. We'll expand on this in the next patch. Signed-off-by: Anna Schumaker Signed-off-by: J. Bruce Fields commit 2db27992dd565bf400658edc18f67aed0b6bc6cb Author: Anna Schumaker Date: Mon Sep 28 13:08:59 2020 -0400 NFSD: Add READ_PLUS hole segment encoding However, we still only reply to the READ_PLUS call with a single segment at this time. Signed-off-by: Anna Schumaker Signed-off-by: J. Bruce Fields commit 528b84934eb904ecafea4ed482a1c52e3c814050 Author: Anna Schumaker Date: Mon Sep 28 13:08:58 2020 -0400 NFSD: Add READ_PLUS data support This patch adds READ_PLUS support for returning a single NFS4_CONTENT_DATA segment to the client. This is basically the same as the READ operation, only with the extra information about data segments. Signed-off-by: Anna Schumaker Signed-off-by: J. Bruce Fields commit cc028a10a48c3c555d7772d02f56eea9f86fdf79 Author: Chuck Lever Date: Fri Oct 2 15:52:44 2020 -0400 NFSD: Hoist status code encoding into XDR encoder functions The original intent was presumably to reduce code duplication. The trade-off was: - No support for an NFSD proc function returning a non-success RPC accept_stat value. - No support for void NFS replies to non-NULL procedures. - Everyone pays for the deduplication with a few extra conditional branches in a hot path. In addition, nfsd_dispatch() leaves *statp uninitialized in the success path, unlike svc_generic_dispatch(). Address all of these problems by moving the logic for encoding the NFS status code into the NFS XDR encoders themselves. Then update the NFS .pc_func methods to return an RPC accept_stat value. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 44ec8b20d1e9ceabe49bc6af059220e099bbee20 Author: Rob Herring Date: Fri Oct 9 12:05:57 2020 -0500 dt-bindings: Add running yamllint to dt_binding_check Add a yamllint config file and support for running yamllint on DT binding schema files. This runs on the whole tree as yamllint is Python and suffers from Python's slow startup times. Users can run on individual files doing: yamllint -c Documentation/devicetree/bindings/.yamllint Link: https://lore.kernel.org/r/20201009170557.168785-1-robh@kernel.org Signed-off-by: Rob Herring commit 7adb2c8aaaa6a387af7140e57004beba2c04a4c6 Author: Etienne Carriere Date: Thu Oct 8 16:37:21 2020 +0200 firmware: arm_scmi: Expand SMC/HVC message pool to more than one SMC/HVC can transmit only one message at the time as the shared memory needs to be protected and the calls are synchronous. However, in order to allow multiple threads to send SCMI messages simultaneously, we need a larger poll of memory. Let us just use value of 20 to keep it in sync mailbox transport implementation. Any other value must work perfectly. Link: https://lore.kernel.org/r/20201008143722.21888-4-etienne.carriere@linaro.org Fixes: 1dc6558062da ("firmware: arm_scmi: Add smc/hvc transport") Cc: Peng Fan Signed-off-by: Etienne Carriere [sudeep.holla: reworded the commit message to indicate the practicality] Signed-off-by: Sudeep Holla commit f401b2c9931a70317b6ac0d3e6020adc3a404cc0 Merge: a6e7d0a4bdb02 c890e30b069a2 Author: Takashi Iwai Date: Mon Oct 12 16:08:57 2020 +0200 Merge tag 'asoc-v5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.10 Not a huge amount going on in the core for ASoC this time but quite a lot of driver activity, especially for the Intel platforms: - Replacement of the DSP driver for some older x86 systems with a new one which was written with closer reference to the DSP firmware so should hopefully be more robust and maintainable. - A big batch of static checker and other fixes for the rest of the x86 DSP drivers. - Cleanup of the error unwinding code from Morimoto-san, hopefully making it more robust. - Helpers for parsing auxiluary devices from the device tree from Stephan Gerhold. - New support for AllWinner A64, Cirrus Logic CS4234, Mediatek MT6359 Microchip S/PDIF TX and RX controllers, Realtek RT1015P, and Texas Instruments J721E, TAS2110, TAS2564 and TAS2764 commit 28e1581c3b4ea5f98530064a103c6217bedeea73 Author: Ilya Dryomov Date: Wed Oct 7 20:06:48 2020 +0200 libceph: clear con->out_msg on Policy::stateful_server faults con->out_msg must be cleared on Policy::stateful_server (!CEPH_MSG_CONNECT_LOSSY) faults. Not doing so botches the reconnection attempt, because after writing the banner the messenger moves on to writing the data section of that message (either from where it got interrupted by the connection reset or from the beginning) instead of writing struct ceph_msg_connect. This results in a bizarre error message because the server sends CEPH_MSGR_TAG_BADPROTOVER but we think we wrote struct ceph_msg_connect: libceph: mds0 (1)172.21.15.45:6828 socket error on write ceph: mds0 reconnect start libceph: mds0 (1)172.21.15.45:6829 socket closed (con state OPEN) libceph: mds0 (1)172.21.15.45:6829 protocol version mismatch, my 32 != server's 32 libceph: mds0 (1)172.21.15.45:6829 protocol version mismatch AFAICT this bug goes back to the dawn of the kernel client. The reason it survived for so long is that only MDS sessions are stateful and only two MDS messages have a data section: CEPH_MSG_CLIENT_RECONNECT (always, but reconnecting is rare) and CEPH_MSG_CLIENT_REQUEST (only when xattrs are involved). The connection has to get reset precisely when such message is being sent -- in this case it was the former. Cc: stable@vger.kernel.org Link: https://tracker.ceph.com/issues/47723 Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton commit a9dfe31e5ce31022b8f063b30d2907872cbab447 Author: Ilya Dryomov Date: Sat Oct 3 11:52:15 2020 +0200 libceph: format ceph_entity_addr nonces as unsigned Match the server side logs. Signed-off-by: Ilya Dryomov commit b07720d0bd1e7c2251642010efb6075dbee23bb8 Author: Ilya Dryomov Date: Fri Oct 2 14:38:08 2020 +0200 libceph: fix ENTITY_NAME format suggestion Signed-off-by: Ilya Dryomov commit 5a5036c89f345769c0049f4af04cc6647c0df058 Author: Ilya Dryomov Date: Fri Oct 2 14:15:59 2020 +0200 libceph: move a dout in queue_con_delay() The queued con->work can start executing (and therefore logging) before we get to this "con->work has been queued" message, making the logs confusing. Move it up, with the meaning of "con->work is about to be queued". Signed-off-by: Ilya Dryomov commit c74d79af9002a9cb179f7950a2c266f0de964abe Author: Jeff Layton Date: Tue Oct 6 12:24:19 2020 -0400 ceph: comment cleanups and clarifications Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 16d68903f56ae277446cc2d24ab18db835363eda Author: Jeff Layton Date: Mon Mar 30 07:20:27 2020 -0400 ceph: break up send_cap_msg Push the allocation of the msg and the send into the caller. Rename the function to encode_cap_msg and make it void return. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 5231198089afba422dd2c46fef515291fca53bdd Author: Jeff Layton Date: Mon Mar 30 13:07:23 2020 -0400 ceph: drop separate mdsc argument from __send_cap We can get it from the session if we need it. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit c403c3a2fbe24d4ed33e10cabad048583ebd4edf Author: Matthew Wilcox (Oracle) Date: Sun Oct 4 19:04:24 2020 +0100 ceph: promote to unsigned long long before shifting On 32-bit systems, this shift will overflow for files larger than 4GB. Cc: stable@vger.kernel.org Fixes: 61f68816211e ("ceph: check caps in filemap_fault and page_mkwrite") Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 7edf1ec5b249cb7f9b85b7257f638026fd1a5d2b Author: Jeff Layton Date: Thu Oct 1 13:40:49 2020 -0400 ceph: don't SetPageError on readpage errors PageError really only has meaning within a particular subsystem. Nothing looks at this bit in the core kernel code, and ceph itself doesn't care about it. Don't bother setting the PageError bit on error. Signed-off-by: Jeff Layton Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Ilya Dryomov commit f6fbdcd997f5d5d0658204ca42abdeced56fd4e5 Author: Ilya Dryomov Date: Thu Sep 17 18:45:44 2020 +0200 ceph: mark ceph_fmt_xattr() as printf-like for better type checking Signed-off-by: Ilya Dryomov commit 1cc1699070bd8f42111b92e5c8018bd7d52f0003 Author: Jeff Layton Date: Fri Jun 5 09:05:17 2020 -0400 ceph: fold ceph_update_writeable_page into ceph_write_begin ...and reorganize the loop for better clarity. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 6390987f2f4c5dcacb3ef7b9cb2ef5b8fdca3e10 Author: Jeff Layton Date: Tue Jul 14 14:37:15 2020 -0400 ceph: fold ceph_sync_writepages into writepage_nounlock Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 9b4862ecaec5487ba9b192cc70d6fa0c7aef373a Author: Jeff Layton Date: Thu May 14 12:05:45 2020 -0400 ceph: fold ceph_sync_readpages into ceph_readpage Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit d45156bf46c082d8164d93ca0dec9e7ac808dbdc Author: Jeff Layton Date: Thu May 28 14:59:49 2020 -0400 ceph: don't call ceph_update_writeable_page from page_mkwrite page_mkwrite should only be called with Uptodate pages, so we should only need to flush incompatible snap contexts. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 18d620f063b0780db2a86343dcf3a18e363626b9 Author: Jeff Layton Date: Thu May 28 13:56:54 2020 -0400 ceph: break out writeback of incompatible snap context to separate function When dirtying a page, we have to flush incompatible contexts. Move the search for an incompatible context into a separate function, and fix up the caller to wait and retry if there is one. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 4bb926e83f1e2d80409cc8b45336f5f303d49315 Author: Ilya Dryomov Date: Tue Sep 15 21:11:30 2020 +0200 ceph: add a note explaining session reject error string error_string key in the metadata map of MClientSession message is intended for humans, but unfortunately became part of the on-wire format with the introduction of recover_session=clean mode in commit 131d7eb4faa1 ("ceph: auto reconnect after blacklisted"). Signed-off-by: Ilya Dryomov commit 1b05fae7f29db4c41864aed903865086e070fa89 Author: Ilya Dryomov Date: Tue Sep 15 20:38:34 2020 +0200 libceph: switch to the new "osd blocklist add" command Signed-off-by: Ilya Dryomov commit 0b98acd6188309333c3a8a6e16feadadd31e4523 Author: Ilya Dryomov Date: Mon Sep 14 13:39:19 2020 +0200 libceph, rbd, ceph: "blacklist" -> "blocklist" Signed-off-by: Ilya Dryomov commit 2e169296603470d209d9feecbfb67b9c4cb5ca0f Author: Jeff Layton Date: Mon Sep 14 13:30:36 2020 -0400 ceph: have ceph_writepages_start call pagevec_lookup_range_tag Currently it calls pagevec_lookup_range_nr_tag(), but that may be inefficient, as we might end up having to search several times as we get down to looking for fewer pages to fill the array. Thus spake Willy: "I think ceph is misusing pagevec_lookup_range_nr_tag(). Let's suppose you get a range which is AAAAbbbbAAAAbbbbAAAAbbbbbbbb(...)bbbbAAAA and you try to fetch max_pages=13. First loop will get AAAAbbbbAAAAb and have 8 locked_pages. The next call will get bbbAA and now locked_pages=10. Next call gets AAb ... and now you're iterating your way through all the 'b' one page at a time until you find that first A." 'A' here refers to pages that are eligible for writeback and 'b' represents ones that aren't (for whatever reason). Not capping the number of return pages may mean that we sometimes find more pages than are needed, but the extra references will just get put at the end. Ceph is also the only caller of pagevec_lookup_range_nr_tag(), so this change should allow us to eliminate that call as well. That will be done in a follow-on patch. Reported-by: Matthew Wilcox Signed-off-by: Jeff Layton Reviewed-by: Matthew Wilcox Signed-off-by: Ilya Dryomov commit 470a5c77eac0e07bfe60413fb3d314b734392bc3 Author: Jeff Layton Date: Fri Sep 11 15:19:00 2020 -0400 ceph: use kill_anon_super helper ceph open-codes this around some other activity and the rationale for it isn't clear. There is no need to delay free_anon_bdev until the end of kill_sb. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 1dd8d470813699baab9112e95fce00979b21c4f7 Author: Xiubo Li Date: Thu Sep 3 09:01:40 2020 -0400 ceph: metrics for opened files, pinned caps and opened inodes In client for each inode, it may have many opened files and may have been pinned in more than one MDS servers. And some inodes are idle, which have no any opened files. This patch will show these metrics in the debugfs, likes: item total ----------------------------------------- opened files / total inodes 14 / 5 pinned i_caps / total inodes 7 / 5 opened inodes / total inodes 3 / 5 Will send these metrics to ceph, which will be used by the `fs top`, later. [ jlayton: drop unrelated hunk, count hashed inodes instead of allocated ones ] URL: https://tracker.ceph.com/issues/47005 Signed-off-by: Xiubo Li Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 2678da88f4b449300d56e0e7a9e77d1a79c83463 Author: Xiubo Li Date: Thu Sep 3 09:01:39 2020 -0400 ceph: add ceph_sb_to_mdsc helper support to parse the mdsc This will help simplify the code. [ jlayton: fix minor merge conflict in quota.c ] Signed-off-by: Xiubo Li Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit c5f575ed08c38d077a581a1ec0c48c23ee6b7c21 Author: Jeff Layton Date: Fri Aug 21 21:20:59 2020 -0700 ceph: drop special-casing for ITER_PIPE in ceph_sync_read This special casing was added in 7ce469a53e71 (ceph: fix splice read for no Fc capability case). The confirm callback for ITER_PIPE expects that the page is Uptodate and returns an error otherwise. A simpler workaround is just to use the Uptodate bit, which has no meaning for anonymous pages. Rip out the special casing for ITER_PIPE and just SetPageUptodate before we copy to the iter. Cc: John Hubbard Suggested-by: Al Viro Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 3a8ebe0b8b616c5f6d72f9a95aa29ccd0b35408f Author: Yanhu Cao Date: Mon Aug 24 11:00:58 2020 +0800 ceph: add column 'mds' to show caps in more user friendly In multi-mds, the 'caps' debugfs file will have duplicate ino, add the 'mds' column to indicate which mds session the cap belongs to. Signed-off-by: Yanhu Cao Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 3986f9a42e993075af01c17dc8968cfb96a4fe53 Author: Ilya Dryomov Date: Mon Aug 17 13:45:04 2020 +0200 libceph: multiple workspaces for CRUSH computations Replace a global map->crush_workspace (protected by a global mutex) with a list of workspaces, up to the number of CPUs + 1. This is based on a patch from Robin Geuze . Robin and his team have observed a 10-20% increase in IOPS on all queue depths and lower CPU usage as well on a high-end all-NVMe 100GbE cluster. Signed-off-by: Ilya Dryomov commit 1c30c90733879ea197dd29af54450a0f6cdcacb1 Author: Luis Henriques Date: Fri Aug 14 10:38:22 2020 +0100 ceph: remove unnecessary return in switch statement Since there's a return immediately after the 'break', there's no need for this extra 'return' in the S_IFDIR case. Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit a33f6432b3a63a4909dbbb0967f7c9df8ff2de91 Author: Yan, Zheng Date: Tue Aug 11 15:23:03 2020 +0800 ceph: encode inodes' parent/d_name in cap reconnect message Since nautilus, MDS tracks dirfrags whose child inodes have caps in open file table. When MDS recovers, it prefetches all of these dirfrags. This avoids using backtrace to load inodes. But dirfrags prefetch may load lots of useless inodes into cache, and make MDS run out of memory. Recent MDS adds an option that disables dirfrags prefetch. When dirfrags prefetch is disabled. Recovering MDS only prefetches corresponding dir inodes. Including inodes' parent/d_name in cap reconnect message can help MDS to load inodes into its cache. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 45b9e04d5ba0b043783dfe2b19bb728e712cb32e Author: Etienne Carriere Date: Thu Oct 8 16:37:22 2020 +0200 firmware: arm_scmi: Fix ARCH_COLD_RESET The defination for ARCH_COLD_RESET is wrong. Let us fix it according to the SCMI specification. Link: https://lore.kernel.org/r/20201008143722.21888-5-etienne.carriere@linaro.org Fixes: 95a15d80aa0d ("firmware: arm_scmi: Add RESET protocol in SCMI v2.0") Signed-off-by: Etienne Carriere Signed-off-by: Sudeep Holla commit 4d0a4388ccdd9482fef6b26f879d0f6099143f80 Merge: cc383a9e245c5 d32de9130f6c7 Author: Ingo Molnar Date: Mon Oct 12 13:38:31 2020 +0200 Merge branch 'efi/urgent' into efi/core, to pick up fixes These fixes missed the v5.9 merge window, pick them up for early v5.10 merge. Signed-off-by: Ingo Molnar commit f91072ed1b7283b13ca57fcfbece5a3b92726143 Author: Jiri Olsa Date: Wed Sep 16 13:53:11 2020 +0200 perf/core: Fix race in the perf_mmap_close() function There's a possible race in perf_mmap_close() when checking ring buffer's mmap_count refcount value. The problem is that the mmap_count check is not atomic because we call atomic_dec() and atomic_read() separately. perf_mmap_close: ... atomic_dec(&rb->mmap_count); ... if (atomic_read(&rb->mmap_count)) goto out_put; free_uid out_put: ring_buffer_put(rb); /* could be last */ The race can happen when we have two (or more) events sharing same ring buffer and they go through atomic_dec() and then they both see 0 as refcount value later in atomic_read(). Then both will go on and execute code which is meant to be run just once. The code that detaches ring buffer is probably fine to be executed more than once, but the problem is in calling free_uid(), which will later on demonstrate in related crashes and refcount warnings, like: refcount_t: addition on 0; use-after-free. ... RIP: 0010:refcount_warn_saturate+0x6d/0xf ... Call Trace: prepare_creds+0x190/0x1e0 copy_creds+0x35/0x172 copy_process+0x471/0x1a80 _do_fork+0x83/0x3a0 __do_sys_wait4+0x83/0x90 __do_sys_clone+0x85/0xa0 do_syscall_64+0x5b/0x1e0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Using atomic decrease and check instead of separated calls. Tested-by: Michael Petlan Signed-off-by: Jiri Olsa Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Acked-by: Namhyung Kim Acked-by: Wade Mealing Fixes: 9bb5d40cd93c ("perf: Fix mmap() accounting hole"); Link: https://lore.kernel.org/r/20200916115311.GE2301783@krava commit 70333f4ff9c16dd82a2667080c3ae48fe30a3cb4 Merge: 4e797e6ec79c0 0463d04ea03a1 Author: Petr Mladek Date: Mon Oct 12 13:01:37 2020 +0200 Merge branch 'printk-rework' into for-linus commit a6e7d0a4bdb02a7a3ffe0b44aaa8842b7efdd056 Author: Kai Vehmanen Date: Mon Oct 12 13:27:04 2020 +0300 ALSA: hda: fix jack detection with Realtek codecs when in D3 In case HDA controller becomes active, but codec is runtime suspended, jack detection is not successful and no interrupt is raised. This has been observed with multiple Realtek codecs and HDA controllers from different vendors. Bug does not occur if both codec and controller are active, or both are in suspend. Bug can be easily hit on desktop systems with no built-in speaker. The problem can be fixed by powering up the codec once after every controller runtime resume. Even if codec goes back to suspend later, the jack detection will continue to work. Add a flag to 'hda_codec' to describe codecs that require this flow from the controller driver. Modify __azx_runtime_resume() to use pm_request_resume() to make the intent clearer. Mark all Realtek codecs with the new forced_resume flag. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=209379 Cc: Kailang Yang Co-developed-by: Kai-Heng Feng Signed-off-by: Kai-Heng Feng Signed-off-by: Kai Vehmanen Cc: Link: https://lore.kernel.org/r/20201012102704.794423-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit a207516776769404dfa8ae89003efba1004a55df Author: Tetsuo Handa Date: Wed Sep 9 20:05:58 2020 +0900 tomoyo: Loosen pathname/domainname validation. Since commit e2dc9bf3f5275ca3 ("umd: Transform fork_usermode_blob into fork_usermode_driver") started calling execve() on a program written in a local mount which is not connected to mount tree, tomoyo_realpath_from_path() started returning a pathname in "$fsname:/$pathname" format which violates TOMOYO's domainname rule that it must start with "<$namespace>" followed by zero or more repetitions of pathnames which start with '/'. Since $fsname must not contain '.' since commit 79c0b2df79eb56fc ("add filesystem subtype support"), tomoyo_correct_path() can recognize a token which appears '/' before '.' appears (e.g. proc:/self/exe ) as a pathname while rejecting a token which appears '.' before '/' appears (e.g. exec.realpath="/bin/bash" ) as a condition parameter. Therefore, accept domainnames which contain pathnames which do not start with '/' but contain '/' before '.' (e.g. tmpfs:/bpfilter_umh ). Signed-off-by: Tetsuo Handa commit b7af6080a3d2d35a410db3eeb162e1ab49c4d27f Author: Viresh Kumar Date: Mon Oct 12 10:20:07 2020 +0530 cpufreq: stats: Fix string format specifier mismatch Fix following warning: drivers/cpufreq/cpufreq_stats.c:63:10: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int' Fixes: 40c3bd4cfa6f ("cpufreq: stats: Defer stats update to cpufreq_stats_record_transition()") Reported-by: kernel test robot Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 48b458591749d35c927351b4960b49e35af30fe6 Author: Jing Xiangfeng Date: Tue Sep 29 16:26:52 2020 +0800 thermal: core: Adding missing nlmsg_free() in thermal_genl_sampling_temp() thermal_genl_sampling_temp() misses to call nlmsg_free() in an error path. Jump to out_free to fix it. Fixes: 1ce50e7d408ef2 ("thermal: core: genetlink support for events/cmd/sampling") Signed-off-by: Jing Xiangfeng Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200929082652.59876-1-jingxiangfeng@huawei.com commit 5093402e5b449b64f7bbaa09057ce40a8f3c1484 Author: Adam Ford Date: Fri Sep 11 07:31:56 2020 -0500 thermal: ti-soc-thermal: Enable addition power management The bandgap sensor can be idled when the processor is too, but it isn't currently being done, so the power consumption of OMAP3 boards can elevated if the bangap sensor is enabled. This patch attempts to use some additional power management to idle the clock to the bandgap when not needed. Signed-off-by: Adam Ford Reported-by: kernel test robot Tested-by: Andreas Kemnade # GTA04 Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200911123157.759379-1-aford173@gmail.com commit 92ad897302d6335aa40984bef15079d0235dce40 Author: Yangtao Li Date: Fri Jul 24 15:11:43 2020 +0800 thermal: sun8i: Add A100's THS controller support This patch add thermal sensor controller support for A100, which is similar to the previous ones. Signed-off-by: Yangtao Li Acked-by: Maxime Ripard Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/48cc75920b5c69027134626157089d8b94942711.1595572867.git.frank@allwinnertech.com commit 771151bed994850c9afe48a8c8400d6aad33071a Author: Yangtao Li Date: Fri Jul 24 15:11:42 2020 +0800 thermal: sun8i: add TEMP_CALIB_MASK for calibration data in sun50i_h6_ths_calibrate For sun50i_h6_ths_calibrate(), the data read from nvmem needs a round of calculation. On the other hand, the newer SOC may store other data in the space other than 12bit sensor data. Add mask operation to read data to avoid conversion error. Signed-off-by: Yangtao Li Acked-by: Maxime Ripard Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/dcf98648c16aff7649ff82438bfce6caae3e176f.1595572867.git.frank@allwinnertech.com commit 691f189d817bd513b55154d54d9c378fe368bae3 Author: Yangtao Li Date: Fri Jul 24 15:10:57 2020 +0800 dt-bindings: thermal: sun8i: Add binding for A100's THS controller Add a binding for A100's ths controller. Signed-off-by: Yangtao Li Reviewed-by: Rob Herring Acked-by: Maxime Ripard Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/8280af8ad82ed340c0ef1c171684aaad91600679.1595572867.git.frank@allwinnertech.com commit ecd1d2a3e4f893584578a304d7bd1591e895a8e4 Author: zhuguangqing Date: Mon Sep 14 15:11:01 2020 +0800 thermal: cooling: Remove unused variable *tz 1. devfreq_cooling.c: The variable *tz is not used in devfreq_cooling_get_requested_power(), devfreq_cooling_state2power() and devfreq_cooling_power2state(). 2. cpufreq_cooling.c: After 84fe2cab48590, the variable *tz is not used anymore in cpufreq_get_requested_power(), cpufreq_state2power() and cpufreq_power2state(). Remove the variable *tz. Signed-off-by: zhuguangqing Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200914071101.13575-1-zhuguangqing83@gmail.com commit 94a3c35eb007d66f6d8e28ceb5967461017b2aea Author: Srinivas Pandruvada Date: Tue Sep 15 15:36:50 2020 -0700 thermal: int340x: Add keep alive response method When firmware requests keep alive response, send an event to user space to confirm by using imok sysfs entry. Create a new sysf entry called "imok". User space can write an integer, which results in execution of IMOK ACPI method of INT3400 thermal zone device. This results in sending response to firmware request for keep alive. Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200915223650.406046-4-srinivas.pandruvada@linux.intel.com commit 88052319620a35f827509d645e4c8063ded751c8 Author: Srinivas Pandruvada Date: Tue Sep 15 15:36:49 2020 -0700 thermal: core: Add new event for sending keep alive notifications This event is sent by the platform firmware to confirm that user space thermal solution is alive. The response to this event from the user space thermal solution is platform specific. Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200915223650.406046-3-srinivas.pandruvada@linux.intel.com commit 39558030fd684e839c09658b01d96473c13a91d3 Author: Srinivas Pandruvada Date: Tue Sep 15 15:36:48 2020 -0700 thermal: int340x: Provide notification for OEM variable change When we receive ACPI notification for OEM variable change pass the notification to user space handler. This will avoid polling for OEM variable change from user space. Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200915223650.406046-2-srinivas.pandruvada@linux.intel.com commit df3e647d68249384a970a76e8642bc5901488424 Author: Qinglang Miao Date: Wed Sep 16 14:21:39 2020 +0800 thermal: core: remove unnecessary mutex_init() The mutex poweroff_lock is initialized statically. It is unnecessary to initialize by mutex_init(). Signed-off-by: Qinglang Miao Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200916062139.191233-1-miaoqinglang@huawei.com commit 585834a5eeb38a9b290786b6d3ee55f22098c602 Author: zhuguangqing Date: Thu Sep 17 15:35:53 2020 +0800 thermal/idle_inject: Fix comment of idle_duration_us and name of latency_ns The comment of idle_duration_us and the name of latency_ns can be misleading, so fix them. Signed-off-by: zhuguangqing Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200917073553.898-1-zhuguangqing83@gmail.com commit bc501418f09beb40e149d9d004c128c2a7d5552a Author: Lad Prabhakar Date: Thu Sep 17 16:21:41 2020 +0100 thermal: Kconfig: Update description for RCAR_GEN3_THERMAL config The rcar_gen3_thermal driver also supports RZ/G2 SoC's, update the description to reflect this. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Reviewed-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200917152141.30070-1-prabhakar.mahadev-lad.rj@bp.renesas.com commit be52a1963f8333a0ca1bba3d3c28e6332114432a Author: Qinglang Miao Date: Mon Sep 21 21:11:07 2020 +0800 thermal: stm32: simplify the return expression of stm_thermal_prepare() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200921131107.93273-1-miaoqinglang@huawei.com commit adfe9285bed09264bf99689c4a6e932f0134cdb1 Author: Lad Prabhakar Date: Wed Jul 15 12:08:52 2020 +0100 dt-bindings: thermal: rcar-gen3-thermal: Add r8a774e1 support Document RZ/G2H (R8A774E1) SoC bindings. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1594811350-14066-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com commit 392573b73ee3373408e8b4c835d7cb3a241ec002 Author: Geert Uytterhoeven Date: Wed Aug 19 11:27:16 2020 +0200 thermal: rcar_thermal: Add missing braces to conditional statement According to Documentation/process/coding-style.rst, if one branch of a conditional statement needs braces, both branches should use braces. Fixes: bbcf90c0646ac797 ("thermal: Explicitly enable non-changing thermal zone devices") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200819092716.3191-1-geert+renesas@glider.be commit 6ad1c515b8fb572b825d31e27b902f4ae9b0aa38 Author: Tian Tao Date: Wed Aug 19 09:14:31 2020 +0800 thermal: Use kobj_to_dev() instead of container_of() Use kobj_to_dev() instead of container_of() Signed-off-by: Tian Tao Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1597799671-11530-1-git-send-email-tiantao6@hisilicon.com commit 8790710a0f07d7d044632da7737b0563c6cfa896 Author: Anson Huang Date: Tue Aug 11 14:59:45 2020 +0800 thermal: imx8mm: Use dev_err_probe() to simplify error handling dev_err_probe() can reduce code size, uniform error handling and record the defer probe reason etc., use it to simplify the code. Signed-off-by: Anson Huang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1597129185-8460-2-git-send-email-Anson.Huang@nxp.com commit 5f3c0200b15ab6bac4f08cf525fe56c8190fd9e3 Author: Anson Huang Date: Tue Aug 11 14:59:44 2020 +0800 thermal: imx: Use dev_err_probe() to simplify error handling dev_err_probe() can reduce code size, uniform error handling and record the defer probe reason etc., use it to simplify the code. Signed-off-by: Anson Huang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1597129185-8460-1-git-send-email-Anson.Huang@nxp.com commit c071cde00bd52a0b8ca0024eb8b5dbe2430c2c3c Author: Colin Ian King Date: Mon Aug 10 09:27:39 2020 +0100 drivers: thermal: Kconfig: fix spelling mistake "acces" -> "access" There is a spelling mistake in the Kconfig text, fix it. Signed-off-by: Colin Ian King Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200810082739.48007-1-colin.king@canonical.com commit 20cc5b649d9978494fb29259763c2505f6acc3c0 Author: Thomas Bogendoerfer Date: Fri Oct 9 14:26:48 2020 +0200 MIPS: cpu-probe: remove MIPS_CPU_BP_GHIST option bit MIPS_CPU_BP_GHIST is only set two times and more or less immediately used in cpu-probe.c itself. Remove this option to make room in options word. Signed-off-by: Thomas Bogendoerfer commit 90c68c6dbcb439b4d8ed9736463d80b98c95771f Author: Thomas Bogendoerfer Date: Thu Oct 8 23:33:26 2020 +0200 MIPS: cpu-probe: introduce exclusive R3k CPU probe Running a kernel on a R3k of machine definitly will never see one of the newer CPU cores. And since R3k system usually are low on memory we could save quite some kbytes: text data bss dec hex filename 15070 88 32 15190 3b56 arch/mips/kernel/cpu-probe.o 844 4 16 864 360 arch/mips/kernel/cpu-r3k-probe.o Signed-off-by: Thomas Bogendoerfer commit a616c0617aa36ea0bd51af90adfb87e8d3e9cb72 Author: Thomas Bogendoerfer Date: Thu Oct 8 23:33:25 2020 +0200 MIPS: cpu-probe: move fpu probing/handling into its own file cpu-probe.c has grown when supporting more and more CPUs and there are use cases where probing for all the CPUs isn't useful like running on a R3k system. But still the fpu handling is nearly the same. For sharing put the fpu code into it's own file. Signed-off-by: Thomas Bogendoerfer commit e7ae8d174eec0b3b9de92b76abc15f3f53b98f1c Author: Thomas Bogendoerfer Date: Fri Oct 9 14:14:46 2020 +0200 MIPS: replace add_memory_region with memblock add_memory_region was the old interface for registering memory and was already changed to used memblock internaly. Replace it by directly calling memblock functions. Signed-off-by: Thomas Bogendoerfer commit 73826d604bbf31328108c6c2a93a7a8a13a74371 Author: Tiezhu Yang Date: Sun Oct 11 07:47:52 2020 +0800 MIPS: Loongson64: Clean up numa.c (1) Replace nid_to_addroffset() with nid_to_addrbase() and then remove the related useless code. (2) Since end_pfn = start_pfn + node_psize, use "node_psize" instead of "end_pfn - start_pfn" to avoid the redundant calculation. (3) After commit 6fbde6b492df ("MIPS: Loongson64: Move files to the top-level directory"), CONFIG_ZONE_DMA32 is always set for Loongson64 due to MACH_LOONGSON64 selects ZONE_DMA32, so no need to use ifdef any more, just remove it. Signed-off-by: Tiezhu Yang Reviewed-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 1062fc45d1e93faefb93961f3be0a687f3f0e2e1 Author: Tiezhu Yang Date: Sun Oct 11 07:47:51 2020 +0800 MIPS: Loongson64: Select SMP in Kconfig to avoid build error In the current code, CONFIG_SMP can be set as N by user on the Loongson platform, then there exists the following build error under !CONFIG_SMP: CC arch/mips/kernel/asm-offsets.s In file included from ./include/linux/gfp.h:9:0, from ./include/linux/xarray.h:14, from ./include/linux/radix-tree.h:18, from ./include/linux/fs.h:15, from ./include/linux/compat.h:17, from arch/mips/kernel/asm-offsets.c:12: ./include/linux/topology.h: In function 'numa_node_id': ./include/linux/topology.h:119:2: error: implicit declaration of function 'cpu_logical_map' [-Werror=implicit-function-declaration] return cpu_to_node(raw_smp_processor_id()); ^ cc1: some warnings being treated as errors scripts/Makefile.build:117: recipe for target 'arch/mips/kernel/asm-offsets.s' failed make[1]: *** [arch/mips/kernel/asm-offsets.s] Error 1 Select SMP in Kconfig to avoid the above build error and then remove CONFIG_SMP=y in loongson3_defconfig. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 90761cee5f4c9a97e9952e1a8e2165c8ab346ea4 Author: Mikhail Gusarov Date: Sat Oct 10 12:08:58 2020 +0200 mips: octeon: Add Ubiquiti E200 and E220 boards These boards are used in - Ubiquiti EdgeRouter (E200), - Ubiquiti EdgeRouter Pro (E200) and - Ubiquiti Security Gateway Pro 4 (E220). Signed-off-by: Mikhail Gusarov Signed-off-by: Thomas Bogendoerfer commit 1dc32628d65a670625afada00f50c91add1a19a2 Merge: b4210eab9164e e23a7cdeb3da8 Author: Borislav Petkov Date: Mon Oct 12 11:05:42 2020 +0200 Merge branch 'edac-drivers' into edac-updates-for-v5.10 Signed-off-by: Borislav Petkov commit c5864560d935db879cafa21feca0156d91eba842 Author: Sumera Priyadarsini Date: Sun Oct 11 15:59:42 2020 +0530 scripts: coccicheck: Change default condition for parallelism Currently, Coccinelle uses at most one thread per core by default in machines with more than 2 hyperthreads. However, for systems with only 4 hyperthreads, this does not improve performance. Modify coccicheck to use all available threads in machines with upto 4 hyperthreads. Signed-off-by: Sumera Priyadarsini Signed-off-by: Julia Lawall commit 2f324dd8ab2e3d8b097f3eac6d380d1adbdbe6e6 Author: Sumera Priyadarsini Date: Sun Oct 11 15:58:43 2020 +0530 scripts: coccicheck: Add quotes to improve portability While fetching the number of threads per core with lscpu, the [:digit:] set is used for translation of digits from 0-9. However, using [:digit:] instead of "[:digit:]" does not seem to work uniformly for some shell types and configurations (such as zsh). Therefore, modify coccicheck to use double quotes around the [:digit:] set for uniformity and better portability. Signed-off-by: Sumera Priyadarsini Signed-off-by: Julia Lawall commit 413daa1a3f4a50af7172a862f391867711e9bc04 Author: Miklos Szeredi Date: Fri Oct 9 12:40:11 2020 +0200 fuse: connection remove fix Re-add lost removal of fc from fuse_conn_list and the control filesystem. Reported-by: kernel test robot Fixes: fcee216beb9c ("fuse: split fuse_mount off of fuse_conn") Signed-off-by: Miklos Szeredi commit f726f3d37163f714034aa5fd1f92a1a73df4297f Author: Oliver Hartkopp Date: Mon Oct 12 09:43:54 2020 +0200 can: remove obsolete version strings As pointed out by Jakub Kicinski here: http://lore.kernel.org/r/20201009175751.5c54097f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com this patch removes the obsolete version information of the different CAN protocols and the AF_CAN core module. Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201012074354.25839-2-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit ac911bfeb34b5d79fb4e23a08b8db0b89c529b53 Author: Oliver Hartkopp Date: Mon Oct 12 09:43:53 2020 +0200 can: isotp: implement cleanups / improvements from review As pointed out by Jakub Kicinski here: http://lore.kernel.org/r/20201009175751.5c54097f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com this patch addresses the remarked issues: - remove empty line in comment - remove default=y for CAN_ISOTP in Kconfig - make use of pr_notice_once() - use GFP_ATOMIC instead of gfp_any() in soft hrtimer context The version strings in the CAN subsystem are removed by a separate patch. Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20201012074354.25839-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit 7ca1db21ef8e0e6725b4d25deed1ca196f7efb28 Author: Anant Thazhemadam Date: Mon Oct 12 09:54:04 2020 +0530 net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid In p9_fd_create_unix, checking is performed to see if the addr (passed as an argument) is NULL or not. However, no check is performed to see if addr is a valid address, i.e., it doesn't entirely consist of only 0's. The initialization of sun_server.sun_path to be equal to this faulty addr value leads to an uninitialized variable, as detected by KMSAN. Checking for this (faulty addr) and returning a negative error number appropriately, resolves this issue. Link: http://lkml.kernel.org/r/20201012042404.2508-1-anant.thazhemadam@gmail.com Reported-by: syzbot+75d51fe5bf4ebe988518@syzkaller.appspotmail.com Tested-by: syzbot+75d51fe5bf4ebe988518@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam Signed-off-by: Dominique Martinet commit fe160a22aa2dc558d819660d41e08b86f041cc77 Author: Julia Lawall Date: Sun Oct 11 11:19:35 2020 +0200 ALSA: fireworks: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Acked-by: Takashi Sakamoto Link: https://lore.kernel.org/r/1602407979-29038-5-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Takashi Iwai commit 46394db4410bb640cccb0985dfb03ed4312cad2b Author: Julia Lawall Date: Sun Oct 11 11:19:33 2020 +0200 ALSA: hda: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1602407979-29038-3-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Takashi Iwai commit 4dda3a19141b44102860b46e307153ed8b32ea7b Merge: 148ebf548a1af 96e503f9000f2 Author: Takashi Iwai Date: Mon Oct 12 08:51:00 2020 +0200 Merge branch 'for-next' into for-linus commit d1542cf6165e526a6837cc9d1e20cb0da841bd0b Author: Ronnie Sahlberg Date: Mon Oct 5 12:37:53 2020 +1000 cifs: compute full_path already in cifs_readdir() Cleanup patch for followon to cache additional information for the root directory when directory lease held. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 9e81e8ff74b90af0c6eafec3ba3d7817bea16997 Author: Ronnie Sahlberg Date: Mon Oct 5 12:37:52 2020 +1000 cifs: return cached_fid from open_shroot Cleanup patch for followon to cache additional information for the root directory when directory lease held. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 3984bdc049462003c3025b0915fbb90d2a723d78 Author: Steve French Date: Sun Oct 4 17:42:27 2020 -0500 update structure definitions from updated protocol documentation MS-SMB2 was updated recently to include new protocol definitions for updated compression payload header and new RDMA transform capabilities Update structure definitions in smb2pdu.h to match Signed-off-by: Steve French Acked-by: Ronnie Sahlberg commit 119e489681f769e497637da16d5df530213f5720 Author: Steve French Date: Wed Mar 18 00:51:48 2020 -0500 smb3: add defines for new crypto algorithms In encryption capabilities negotiate context can now request AES256 GCM or CCM Signed-off-by: Steve French Acked-by: Ronnie Sahlberg commit 57c176074057531b249cf522d90c22313fa74b0b Author: Boris Protopopov Date: Thu Sep 24 00:36:38 2020 +0000 Convert trailing spaces and periods in path components When converting trailing spaces and periods in paths, do so for every component of the path, not just the last component. If the conversion is not done for every path component, then subsequent operations in directories with trailing spaces or periods (e.g. create(), mkdir()) will fail with ENOENT. This is because on the server, the directory will have a special symbol in its name, and the client needs to provide the same. Signed-off-by: Boris Protopopov Acked-by: Ronnie Sahlberg Signed-off-by: Steve French commit 376dcfe3a4e5a5475a84e6b5f926066a8614f887 Merge: 20a6d91518c41 a24fb420a5775 Author: Alexei Starovoitov Date: Sun Oct 11 18:09:45 2020 -0700 Merge branch 'bpf, sockmap: allow verdict only sk_skb progs' John Fastabend says: ==================== This allows a sockmap sk_skb verdict programs to run without a parser. For some use cases, such as verdict program that support streaming data or a l3/l4 proxy that does not use data in packet, loading the nop parser 'return skb->len' is an extra unnecessary complexity. With this series we simply call the verdict program directly from data_ready instead of bouncing through the strparser logic. Patches 1,2 do the lifting on the sockmap side then patches 3,4 add the selftests. This applies on top of the series here, sockmap/sk_skb program memory acct fixes https://patchwork.ozlabs.org/project/netdev/list/?series=206975 it will apply without the above series cleanly, but will have an incorrect memory accounting causing a failure in ./test_sockmap. I could have left it so the series passed without above series, but it seemed odd to have it out there and then require yet another patch to fix it up here. Thanks. --- ==================== Signed-off-by: Alexei Starovoitov commit a24fb420a5775581050026eba2264c87927debf7 Author: John Fastabend Date: Sat Oct 10 22:10:26 2020 -0700 bpf, selftests: Add three new sockmap tests for verdict only programs Here we add three new tests for sockmap to test having a verdict program without setting the parser program. The first test covers the most simply case, sender proxy_recv proxy_send recv | | | | verdict -----+ | | | | | +----------------+ +------------+ We load the verdict program on the proxy_recv socket without a parser program. It then does a redirect into the send path of the proxy_send socket using sendpage_locked(). Next we test the drop case to ensure if we kfree_skb as a result of the verdict program everything behaves as expected. Next we test the same configuration above, but with ktls and a redirect into socket ingress queue. Shown here tls tls sender proxy_recv proxy_send recv | | | | verdict ------------------+ | | redirect_ingress +----------------+ Also to set up ping/pong test Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160239302638.8495.17125996694402793471.stgit@john-Precision-5820-Tower commit cdf43c4bfa1a465ba7996165b75c49b5c0e46b50 Author: John Fastabend Date: Sat Oct 10 22:10:04 2020 -0700 bpf, selftests: Add option to test_sockmap to omit adding parser program Add option to allow running without a parser program in place. To test with ping/pong program use, # test_sockmap -t ping --txmsg_omit_skb_parser this will send packets between two socket bouncing through a proxy socket that does not use a parser program. (ping) (pong) sender proxy_recv proxy_send recv | | | | verdict -----+ | | | | | +----------------+ +------------+ Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160239300387.8495.11908295143121563076.stgit@john-Precision-5820-Tower commit ef5659280eb13e8ac31c296f58cfdfa1684ac06b Author: John Fastabend Date: Sat Oct 10 22:09:38 2020 -0700 bpf, sockmap: Allow skipping sk_skb parser program Currently, we often run with a nop parser namely one that just does this, 'return skb->len'. This happens when either our verdict program can handle streaming data or it is only looking at socket data such as IP addresses and other metadata associated with the flow. The second case is common for a L3/L4 proxy for instance. So lets allow loading programs without the parser then we can skip the stream parser logic and avoid having to add a BPF program that is effectively a nop. Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160239297866.8495.13345662302749219672.stgit@john-Precision-5820-Tower commit 743df8b7749fb5a289fc0c7ac94ec15533596839 Author: John Fastabend Date: Sat Oct 10 22:09:07 2020 -0700 bpf, sockmap: Check skb_verdict and skb_parser programs explicitly We are about to allow skb_verdict to run without skb_parser programs as a first step change code to check each program type specifically. This should be a mechanical change without any impact to actual result. Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160239294756.8495.5796595770890272219.stgit@john-Precision-5820-Tower commit 20a6d91518c4163cb25f4387036383c145661b1b Merge: ebb034b15bfa5 0b17ad25d8d10 Author: Alexei Starovoitov Date: Sun Oct 11 18:00:57 2020 -0700 Merge branch 'sockmap/sk_skb program memory acct fixes' John Fastabend says: ==================== Users of sockmap and skmsg trying to build proxys and other tools have pointed out to me the error handling can be problematic. If the proxy is under-provisioned and/or the BPF admin does not have the ability to update/modify memory provisions on the sockets its possible data may be dropped. For some things we have retries so everything works out OK, but for most things this is likely not great. And things go bad. The original design dropped memory accounting on the receive socket as early as possible. We did this early in sk_skb handling and then charged it to the redirect socket immediately after running the BPF program. But, this design caused a fundamental problem. Namely, what should we do if we redirect to a socket that has already reached its socket memory limits. For proxy use cases the network admin can tune memory limits. But, in general we punted on this problem and told folks to simply make your memory limits high enough to handle your workload. This is not a really good answer. When deploying into environments where we expect this to be transparent its no longer the case because we need to tune params. In fact its really only viable in cases where we have fine grained control over the application. For example a proxy redirecting from an ingress socket to an egress socket. The result is I get bug reports because its surprising for one, but more importantly also breaks some use cases. So lets fix it. This series cleans up the different cases so that in many common modes, such as passing packet up to receive socket, we can simply use the underlying assumption that the TCP stack already has done memory accounting. Next instead of trying to do memory accounting against the socket we plan to redirect into we keep memory accounting on the receive socket until the skb can be put on the redirect socket. This means if we do an egress redirect to a socket and sock_writable() returns EAGAIN we can requeue the skb on the workqueue and try again. The same scenario plays out for ingress. If the skb can not be put on the receive queue of the redirect socket than we simply requeue and retry. In both cases memory is still accounted for against the receiving socket. This also handles head of line blocking. With the above scheme the skb is on a queue associated with the socket it will be sent/recv'd on, but the memory accounting is against the received socket. This means the receive socket can advance to the next skb and avoid head of line blocking. At least until its receive memory on the socket runs out. This will put some maximum size on the amount of data any socket can enqueue giving us bounds on the skb lists so they can't grow indefinitely. Overall I think this is a win. Tested with test_sockmap. These are fixes, but I tagged it for bpf-next considering we are at -rc8. v1->v2: Fix uninitialized/unused variables (kernel test robot) v2->v3: fix typo in patch2 err=0 needs to be <0 so use err=-EIO --- ==================== Signed-off-by: Alexei Starovoitov commit 0b17ad25d8d102ffb83dcc99ebd24719194ebf4f Author: John Fastabend Date: Fri Oct 9 11:37:55 2020 -0700 bpf, sockmap: Add memory accounting so skbs on ingress lists are visible Move skb->sk assignment out of sk_psock_bpf_run() and into individual callers. Then we can use proper skb_set_owner_r() call to assign a sk to a skb. This improves things by also charging the truesize against the sockets sk_rmem_alloc counter. With this done we get some accounting in place to ensure the memory associated with skbs on the workqueue are still being accounted for somewhere. Finally, by using skb_set_owner_r the destructor is setup so we can just let the normal skb_kfree logic recover the memory. Combined with previous patch dropping skb_orphan() we now can recover from memory pressure and maintain accounting. Note, we will charge the skbs against their originating socket even if being redirected into another socket. Once the skb completes the redirect op the kfree_skb will give the memory back. This is important because if we charged the socket we are redirecting to (like it was done before this series) the sock_writeable() test could fail because of the skb trying to be sent is already charged against the socket. Also TLS case is special. Here we wait until we have decided not to simply PASS the packet up the stack. In the case where we PASS the packet up the stack we already have an skb which is accounted for on the TLS socket context. For the parser case we continue to just set/clear skb->sk this is because the skb being used here may be combined with other skbs or turned into multiple skbs depending on the parser logic. For example the parser could request a payload length greater than skb->len so that the strparser needs to collect multiple skbs. At any rate the final result will be handled in the strparser recv callback. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160226867513.5692.10579573214635925960.stgit@john-Precision-5820-Tower commit 10d58d006356a075a7b056e0f6502db416d1a261 Author: John Fastabend Date: Fri Oct 9 11:37:35 2020 -0700 bpf, sockmap: Remove skb_orphan and let normal skb_kfree do cleanup Calling skb_orphan() is unnecessary in the strp rcv handler because the skb is from a skb_clone() in __strp_recv. So it never has a destructor or a sk assigned. Plus its confusing to read because it might hint to the reader that the skb could have an sk assigned which is not true. Even if we did have an sk assigned it would be cleaner to simply wait for the upcoming kfree_skb(). Additionally, move the comment about strparser clone up so its closer to the logic it is describing and add to it so that it is more complete. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160226865548.5692.9098315689984599579.stgit@john-Precision-5820-Tower commit 9047f19e7ccba5073d983dd3882b5f46086b578a Author: John Fastabend Date: Fri Oct 9 11:37:17 2020 -0700 bpf, sockmap: Remove dropped data on errors in redirect case In the sk_skb redirect case we didn't handle the case where we overrun the sk_rmem_alloc entry on ingress redirect or sk_wmem_alloc on egress. Because we didn't have anything implemented we simply dropped the skb. This meant data could be dropped if socket memory accounting was in place. This fixes the above dropped data case by moving the memory checks later in the code where we actually do the send or recv. This pushes those checks into the workqueue and allows us to return an EAGAIN error which in turn allows us to try again later from the workqueue. Fixes: 51199405f9672 ("bpf: skb_verdict, support SK_PASS on RX BPF path") Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160226863689.5692.13861422742592309285.stgit@john-Precision-5820-Tower commit 29545f4977cf7c7b721aa4d43418632af1d6836d Author: John Fastabend Date: Fri Oct 9 11:36:57 2020 -0700 bpf, sockmap: Remove skb_set_owner_w wmem will be taken later from sendpage The skb_set_owner_w is unnecessary here. The sendpage call will create a fresh skb and set the owner correctly from workqueue. Its also not entirely harmless because it consumes cycles, but also impacts resource accounting by increasing sk_wmem_alloc. This is charging the socket we are going to send to for the skb, but we will put it on the workqueue for some time before this happens so we are artifically inflating sk_wmem_alloc for this period. Further, we don't know how many skbs will be used to send the packet or how it will be broken up when sent over the new socket so charging it with one big sum is also not correct when the workqueue may break it up if facing memory pressure. Seeing we don't know how/when this is going to be sent drop the early accounting. A later patch will do proper accounting charged on receive socket for the case where skbs get enqueued on the workqueue. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160226861708.5692.17964237936462425136.stgit@john-Precision-5820-Tower commit 9ecbfb06a078c4911fb444203e8e41d93d22f886 Author: John Fastabend Date: Fri Oct 9 11:36:37 2020 -0700 bpf, sockmap: On receive programs try to fast track SK_PASS ingress When we receive an skb and the ingress skb verdict program returns SK_PASS we currently set the ingress flag and put it on the workqueue so it can be turned into a sk_msg and put on the sk_msg ingress queue. Then finally telling userspace with data_ready hook. Here we observe that if the workqueue is empty then we can try to convert into a sk_msg type and call data_ready directly without bouncing through a workqueue. Its a common pattern to have a recv verdict program for visibility that always returns SK_PASS. In this case unless there is an ENOMEM error or we overrun the socket we can avoid the workqueue completely only using it when we fall back to error cases caused by memory pressure. By doing this we eliminate another case where data may be dropped if errors occur on memory limits in workqueue. Fixes: 51199405f9672 ("bpf: skb_verdict, support SK_PASS on RX BPF path") Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160226859704.5692.12929678876744977669.stgit@john-Precision-5820-Tower commit cfea28f890cf292d5fe90680db64b68086ef25ba Author: John Fastabend Date: Fri Oct 9 11:36:16 2020 -0700 bpf, sockmap: Skb verdict SK_PASS to self already checked rmem limits For sk_skb case where skb_verdict program returns SK_PASS to continue to pass packet up the stack, the memory limits were already checked before enqueuing in skb_queue_tail from TCP side. So, lets remove the extra checks here. The theory is if the TCP stack believes we have memory to receive the packet then lets trust the stack and not double check the limits. In fact the accounting here can cause a drop if sk_rmem_alloc has increased after the stack accepted this packet, but before the duplicate check here. And worse if this happens because TCP stack already believes the data has been received there is no retransmit. Fixes: 51199405f9672 ("bpf: skb_verdict, support SK_PASS on RX BPF path") Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160226857664.5692.668205469388498375.stgit@john-Precision-5820-Tower commit 0d2e90f47c4f80a5dcf10f5fe57b5e692e62b48f Merge: 2e49520eeec7f 9c27bc97aff8b Author: Dave Airlie Date: Mon Oct 12 10:40:42 2020 +1000 Merge tag 'amd-drm-fixes-5.10-2020-10-09' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-fixes-5.10-2020-10-09: amdgpu: - Clean up indirect register access - Navy Flounder fixes - SMU11 AC/DC interrupt fixes - GPUVM alignment fix - Display fixes - Misc other fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201009222810.4030-1-alexander.deucher@amd.com commit 172aad81a882443eefe1bd860c4eddc81b14dd5b Author: Olaf Hering Date: Sun Oct 11 20:54:31 2020 +0200 kbuild: enforce -Werror=return-type Catch errors which at least gcc tolerates by default: warning: 'return' with no value, in function returning non-void [-Wreturn-type] Signed-off-by: Olaf Hering Signed-off-by: Masahiro Yamada commit 7980d2eabde82be86c5be18aa3d07e88ec13c6a1 Author: Julian Anastasov Date: Fri Oct 9 21:24:25 2020 +0300 ipvs: clear skb->tstamp in forwarding path fq qdisc requires tstamp to be cleared in forwarding path Reported-by: Evgeny B Link: https://bugzilla.kernel.org/show_bug.cgi?id=209427 Suggested-by: Eric Dumazet Fixes: 8203e2d844d3 ("net: clear skb->tstamp in forwarding paths") Fixes: fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC") Fixes: 80b14dee2bea ("net: Add a new socket option for a future transmit time.") Signed-off-by: Julian Anastasov Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit ea2f7da1799bfc5a98b8e0c9e9cf1a7fedc32549 Author: Florian Westphal Date: Fri Oct 9 13:58:34 2020 +0200 selftests: netfilter: extend nfqueue test case add a test with re-queueing: usespace doesn't pass accept verdict, but tells to re-queue to another nf_queue instance. Also, make the second nf-queue program use non-gso mode, kernel will have to perform software segmentation. Lastly, do not queue every packet, just one per second, and add delay when re-injecting the packet to the kernel. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 793d5d61242695142460ce74f124281e0681fbc7 Author: Pablo Neira Ayuso Date: Mon Oct 12 00:18:07 2020 +0200 netfilter: flowtable: reduce calls to pskb_may_pull() Make two unfront calls to pskb_may_pull() to linearize the network and transport header. Signed-off-by: Pablo Neira Ayuso commit d3519cb89f6d5949481afa5de3ee0fc6a051e231 Author: Pablo Neira Ayuso Date: Thu Oct 8 01:14:48 2020 +0200 netfilter: nf_tables: add inet ingress support This patch adds a new ingress hook for the inet family. The inet ingress hook emulates the IP receive path code, therefore, unclean packets are drop before walking over the ruleset in this basechain. This patch also introduces the nft_base_chain_netdev() helper function to check if this hook is bound to one or more devices (through the hook list infrastructure). This check allows to perform the same handling for the inet ingress as it would be a netdev ingress chain from the control plane. Signed-off-by: Pablo Neira Ayuso commit 60a3815da702fd9e4759945f26cce5c47d3967ad Author: Pablo Neira Ayuso Date: Thu Oct 8 01:14:47 2020 +0200 netfilter: add inet ingress support This patch adds the NF_INET_INGRESS pseudohook for the NFPROTO_INET family. This is a mapping this new hook to the existing NFPROTO_NETDEV and NF_NETDEV_INGRESS hook. The hook does not guarantee that packets are inet only, users must filter out non-ip traffic explicitly. This infrastructure makes it easier to support this new hook in nf_tables. Signed-off-by: Pablo Neira Ayuso commit ddcfa710d40b39e3134d318e5fe07ba672288054 Author: Pablo Neira Ayuso Date: Thu Oct 8 01:14:46 2020 +0200 netfilter: add nf_ingress_hook() helper function Add helper function to check if this is an ingress hook. Signed-off-by: Pablo Neira Ayuso commit afd9024cd1fcfb23fe804d473f457fde07a71148 Author: Pablo Neira Ayuso Date: Thu Oct 8 01:14:45 2020 +0200 netfilter: add nf_static_key_{inc,dec} Add helper functions increment and decrement the hook static keys. Signed-off-by: Pablo Neira Ayuso commit 073b04e76be6d5c4e22ff0599260f3bf890ac53a Author: longguang.yue Date: Mon Oct 5 23:13:47 2020 +0300 ipvs: inspect reply packets from DR/TUN real servers Just like for MASQ, inspect the reply packets coming from DR/TUN real servers and alter the connection's state and timeout according to the protocol. It's ipvs's duty to do traffic statistic if packets get hit, no matter what mode it is. Signed-off-by: longguang.yue Signed-off-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso commit 2e49520eeec7f003ddff2a6f70a9a7bc0b9f0906 Merge: 083320ebe661e c60b93cd4862d Author: Dave Airlie Date: Mon Oct 12 09:13:57 2020 +1000 Merge tag 'drm-intel-next-fixes-2020-10-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Propagated from drm-intel-next-queued: - Fix CRTC state checker (Ville) Propated from drm-intel-gt-next: - Avoid implicit vmpa for highmem on 32b (Chris) - Prevent PAT attriutes for writecombine if CPU doesn't support PAT (Chris) - Clear the buffer pool age before use. (Chris) - Fix error code (Dan) - Break up error capture compression loops (Chris) - Fix uninitialized variable in context_create_request (Maarten) - Check for errors on i915_vm_alloc_pt_stash to avoid NULL dereference (Matt) - Serialize debugfs i915_gem_objects with ctx->mutex (Chris) - Fix a rebase mistake caused during drm-intel-gt-next creation (Chris) - Hold request reference for canceling an active context (Chris) - Heartbeats fixes (Chris) - Use usigned during batch copies (Chris) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20201002182610.GA2204465@intel.com commit f06885b3f3e3884f98351d7b72a4fc8400911cde Author: Anton Ivanov Date: Mon Sep 21 14:58:27 2020 +0100 um: vector: Add dynamic tap interfaces and scripting Provide functionality roughly compatible with the existing qemu ifup scripting: * invocation of an ifup script. The interface name is passed as the first and only argument * allocating tap interfaces on the fly if they are not explicitly specified Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 273fe1b676cb59d41e177980a981e27806872954 Author: Johannes Berg Date: Mon Sep 21 13:43:25 2020 +0200 um: Clean up stacktrace dump We currently get a few stray newlines, due to the interaction between printk() and the code here. Remove a few explicit newline prints to neaten the output. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit e8a58591afbc7dc279a11454c08fce1281958eef Author: Maciej Żenczykowski Date: Fri Aug 7 12:32:26 2020 -0700 um: Fix incorrect assumptions about max pid length pids are no longer limited to 16-bits, bump to 32-bits, ie. 9 decimal characters. Additionally sizeof("/") already returns 2 - ie. it already accounts for trailing zero. Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: Linux UM Mailing List Signed-off-by: Maciej Żenczykowski Signed-off-by: Richard Weinberger commit 4687615d2ded1250923123e8966463827763432e Author: Gabriel Krisman Bertazi Date: Sun Oct 4 01:04:36 2020 -0400 um: Remove dead usage of TIF_IA32 This seems like a dead artifact since TIF_IA32 is not even defined as a TI flag for UM. Looking back in git history, it made sense in the old days, but it is apparently not used since UM was split out of the x86 arch/. It is also going away from the x86 tree soon. Also, I think the variable clean up it performs is not needed as 64-bit UML doesn't run 32-bit binaries as far as I can tell, and 32-bit UML has 32-bit ulong. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Richard Weinberger commit 9a10705b42dd541feadda4817582a7efc984c917 Author: Li Heng Date: Thu Jul 23 11:15:16 2020 +0800 um: Remove redundant NULL check Fix below warnings reported by coccicheck: ./arch/um/drivers/vector_user.c:403:2-7: WARNING: NULL check before some freeing functions is not needed. Fixes: bc8f8e4e6e7a ("um: Add a generic "fd" vector transport") Signed-off-by: Li Heng Signed-off-by: Richard Weinberger commit f2d05059e15af3f70502074f4e3a504530af504a Author: Johannes Berg Date: Thu Jun 4 13:23:17 2020 +0200 um: change sigio_spinlock to a mutex Lockdep complains at boot: ============================= [ BUG: Invalid wait context ] 5.7.0-05093-g46d91ecd597b #98 Not tainted ----------------------------- swapper/1 is trying to lock: 0000000060931b98 (&desc[i].request_mutex){+.+.}-{3:3}, at: __setup_irq+0x11d/0x623 other info that might help us debug this: context-{4:4} 1 lock held by swapper/1: #0: 000000006074fed8 (sigio_spinlock){+.+.}-{2:2}, at: sigio_lock+0x1a/0x1c stack backtrace: CPU: 0 PID: 1 Comm: swapper Not tainted 5.7.0-05093-g46d91ecd597b #98 Stack: 7fa4fab0 6028dfd1 0000002a 6008bea5 7fa50700 7fa50040 7fa4fac0 6028e016 7fa4fb50 6007f6da 60959c18 00000000 Call Trace: [<60023a0e>] show_stack+0x13b/0x155 [<6028e016>] dump_stack+0x2a/0x2c [<6007f6da>] __lock_acquire+0x515/0x15f2 [<6007eb50>] lock_acquire+0x245/0x273 [<6050d9f1>] __mutex_lock+0xbd/0x325 [<6050dc76>] mutex_lock_nested+0x1d/0x1f [<6008e27e>] __setup_irq+0x11d/0x623 [<6008e8ed>] request_threaded_irq+0x169/0x1a6 [<60021eb0>] um_request_irq+0x1ee/0x24b [<600234ee>] write_sigio_irq+0x3b/0x76 [<600383ca>] sigio_broken+0x146/0x2e4 [<60020bd8>] do_one_initcall+0xde/0x281 Because we hold sigio_spinlock and then get into requesting an interrupt with a mutex. Change the spinlock to a mutex to avoid that. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit d0800609136d16418f49d01098b206c0c394d147 Author: Johannes Berg Date: Thu Sep 10 11:31:13 2020 +0200 um: time-travel: Return the sequence number in ACK messages For external time travel, the protocol says to return the incoming sequence number in the ACK message to aid debugging, so do that. Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit ebef8ea2ba967026192a26f4529890893919bc57 Author: Johannes Berg Date: Thu Sep 10 11:31:12 2020 +0200 um: time-travel: Fix IRQ handling in time_travel_handle_message() As the comment here indicates, we need to do the polling in the idle loop without blocking interrupts, since interrupts can be vhost-user messages that we must process even while in our idle loop. I don't know why I explained one thing and implemented another, but we have indeed observed random hangs due to this, depending on the timing of the messages. Fixes: 88ce64249233 ("um: Implement time-travel=ext") Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 730586ff7fada525943f1eee0681fa62a3fc6128 Author: Ignat Korchagin Date: Sun Jul 19 22:02:22 2020 +0100 um: Allow static linking for non-glibc implementations It is possible to produce a statically linked UML binary with UML_NET_VECTOR, UML_NET_VDE and UML_NET_PCAP options enabled using alternative libc implementations, which do not rely on NSS, such as musl. Allow static linking in this case. Signed-off-by: Ignat Korchagin Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Richard Weinberger commit 5e1121cd43d4d3436140a462bfc230ff8aeb1693 Author: Ignat Korchagin Date: Sun Jul 19 22:02:21 2020 +0100 um: Some fixes to build UML with musl musl toolchain and headers are a bit more strict. These fixes enable building UML with musl as well as seem not to break on glibc. Signed-off-by: Ignat Korchagin Tested-by: Brendan Higgins Signed-off-by: Richard Weinberger commit e4e721fe4ccb504a29d1e8d4047667557281d932 Author: Tiezhu Yang Date: Fri Jun 19 13:20:07 2020 +0800 um: vector: Use GFP_ATOMIC under spin lock Use GFP_ATOMIC instead of GFP_KERNEL under spin lock to fix possible sleep-in-atomic-context bugs. Fixes: 9807019a62dc ("um: Loadable BPF "Firmware" for vector drivers") Signed-off-by: Tiezhu Yang Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit bab991cf40f631d18d00cb8c2a97325c8fd4292e Author: Gaurav Singh Date: Sat Jun 13 21:19:40 2020 -0400 um: Fix null pointer dereference in vector_user_bpf The bpf_prog is being checked for !NULL after uml_kmalloc but later its used directly for example: bpf_prog->filter = bpf and is also later returned upon success. Fix this, do a NULL check and return right away. Signed-off-by: Gaurav Singh Acked-By: Anton Ivanov Signed-off-by: Richard Weinberger commit 9113ba38fb81bb0053e2baa3fa9d646d6f088bee Merge: 80510e2552294 5de15b610f785 Author: Richard Weinberger Date: Sun Oct 11 22:08:21 2020 +0200 Merge tag 'cfi/for-5.10' of gitolite.kernel.org:pub/scm/linux/kernel/git/mtd/linux into mtd/next HyperBus changes * DMA support for TI's AM654 HyperBus controller driver. * HyperBus frontend driver for Renesas RPC-IF driver. commit 80510e25522949711410b37a7864f1b2d98215d8 Merge: 3856a28cfe916 9a3422a110c86 Author: Richard Weinberger Date: Sun Oct 11 22:07:52 2020 +0200 Merge tag 'spi-nor/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next SPI NOR core changes: - Support for Winbond w25q64jwm flash - Enable 4K sector support for mx25l12805d SPI NOR controller drivers changes: - intel-spi: - Add Alder Lake-S PCI ID commit 3856a28cfe9161927fa13bb7cb561f6d8fd2e82a Merge: b597cc75f7fe7 88e315d12fbb5 Author: Richard Weinberger Date: Sun Oct 11 22:07:21 2020 +0200 Merge tag 'nand/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next NAND core changes: * Use the new generic ECC object * Create helpers to set/extract the ECC requirements * Create a helper to extract the ECC configuration * Add a NAND page I/O request type * Introduce the ECC engine framework Raw NAND core changes: * Don't overwrite the error code from nand_set_ecc_soft_ops() * Introduce nand_set_ecc_on_host_ops() * Use the NAND framework user_conf object for ECC flags * Use the ECC framework user input parsing bits * Use the ECC framework nand_ecc_is_strong_enough() helper * Use the ECC framework OOB layouts * Make use of the ECC framework * Use nanddev_get/set_ecc_requirements() when relevant * Use the new ECC engine type enumeration * Separate the ECC engine type and the ECC byte placement * Move the nand_ecc_algo enum to the generic NAND layer * Rename the ECC algorithm enumeration items * Add a kernel doc to the ECC algorithm enumeration * DT bindings: - Document boolean NAND ECC properties - Document nand-ecc-engine - Document nand-ecc-placement Raw NAND drivers changes: * Ams-Delta: Fix non-OF build warning * Atmel: - Check return values for nand_read_data_op - Simplify with dev_err_probe() - Get rid of the legacy interface implementation - Convert the driver to exec_op() - Use nand_prog_page_end_op() - Use nand_{write,read}_data_op() - Drop redundant nand_read_page_op() - Enable the NFC controller at probe time - Disable clk on error handling path in probe * Cadence: remove a redundant dev_err call * Gpmi: - Simplify with dev_err_probe() * Marvell: - Fix and update kerneldoc - Simplify with dev_err_probe() - Fix and update kerneldoc - Simplify with dev_err_probe() - Support panic_write for mtdoops * Onenand: - Simplify the return expression of onenand_transfer_auto_oob - Simplify with dev_err_probe() * Oxnas: cleanup/simplify code * Pasemi: Make pasemi_device_ready() static * Qcom: Simplify with dev_err_probe() * Stm32_fmc2: fix a buffer overflow * Vf610: Remove unused function vf610_nfc_transfer_size() SPI-NAND changes: * Use nanddev_get_ecc_conf() when relevant * Gigadevice: - Add support for GD5F4GQ4xC - Add QE Bit - Use only one dummy byte in QUADIO * Macronix: - Add support for MX31UF1GE4BC - Add support for MX31LF1GE4BC commit e2a05cc7f8229e150243cdae40f2af9021d67a4a Author: Zhihao Cheng Date: Tue Sep 29 20:45:31 2020 +0800 ubifs: mount_ubifs: Release authentication resource in error handling path Release the authentication related resource in some error handling branches in mount_ubifs(). Signed-off-by: Zhihao Cheng Cc: # 4.20+ Fixes: d8a22773a12c6d7 ("ubifs: Enable authentication support") Reviewed-by: Sascha Hauer Signed-off-by: Richard Weinberger commit bb674a4d4de1032837fcbf860a63939e66f0b7ad Author: Zhihao Cheng Date: Tue Sep 29 20:45:30 2020 +0800 ubifs: Don't parse authentication mount options in remount process There is no need to dump authentication options while remounting, because authentication initialization can only be doing once in the first mount process. Dumping authentication mount options in remount process may cause memory leak if UBIFS has already been mounted with old authentication mount options. Signed-off-by: Zhihao Cheng Cc: # 4.20+ Fixes: d8a22773a12c6d7 ("ubifs: Enable authentication support") Reviewed-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 47f6d9ce45b03a40c34b668a9884754c58122b39 Author: Zhihao Cheng Date: Tue Sep 29 20:45:29 2020 +0800 ubifs: Fix a memleak after dumping authentication mount options Fix a memory leak after dumping authentication mount options in error handling branch. Signed-off-by: Zhihao Cheng Cc: # 4.20+ Fixes: d8a22773a12c6d7 ("ubifs: Enable authentication support") Reviewed-by: Sascha Hauer Signed-off-by: Richard Weinberger commit ebb034b15bfa5182c78939dca88022d76afedf24 Author: Alexei Starovoitov Date: Sun Oct 11 13:01:49 2020 -0700 bpf: Migrate from patchwork.ozlabs.org to patchwork.kernel.org. Move the bpf/bpf-next patch processing queue to patchwork.kernel.org. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201011200149.66537-1-alexei.starovoitov@gmail.com commit d1c362e1dd68a421cf9033404cf141a4ab734a5d Author: Toke Høiland-Jørgensen Date: Fri Oct 9 20:42:34 2020 +0200 bpf: Always return target ifindex in bpf_fib_lookup The bpf_fib_lookup() helper performs a neighbour lookup for the destination IP and returns BPF_FIB_LKUP_NO_NEIGH if this fails, with the expectation that the BPF program will pass the packet up the stack in this case. However, with the addition of bpf_redirect_neigh() that can be used instead to perform the neighbour lookup, at the cost of a bit of duplicated work. For that we still need the target ifindex, and since bpf_fib_lookup() already has that at the time it performs the neighbour lookup, there is really no reason why it can't just return it in any case. So let's just always return the ifindex if the FIB lookup itself succeeds. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Cc: David Ahern Link: https://lore.kernel.org/bpf/20201009184234.134214-1-toke@redhat.com commit 52b07e56af6414a1623901e18bf6a217ec33c11f Merge: 673e375245618 321f6324500eb Author: Alexei Starovoitov Date: Sun Oct 11 12:14:36 2020 -0700 Merge branch 'samples: bpf: Refactor XDP programs with libbpf' "Daniel T. Lee" says: ==================== To avoid confusion caused by the increasing fragmentation of the BPF Loader program, this commit would like to convert the previous bpf_load loader with the libbpf loader. Thanks to libbpf's bpf_link interface, managing the tracepoint BPF program is much easier. bpf_program__attach_tracepoint manages the enable of tracepoint event and attach of BPF programs to it with a single interface bpf_link, so there is no need to manage event_fd and prog_fd separately. And due to addition of generic bpf_program__attach() to libbpf, it is now possible to attach BPF programs with __attach() instead of explicitly calling __attach_(). This patchset refactors xdp_monitor with using this libbpf API, and the bpf_load is removed and migrated to libbpf. Also, attach_tracepoint() is replaced with the generic __attach() method in xdp_redirect_cpu. Moreover, maps in kern program have been converted to BTF-defined map. --- Changes in v2: - added cleanup logic for bpf_link and bpf_object in xdp_monitor - program section match with bpf_program__is_ instead of strncmp - revert BTF key/val type to default of BPF_MAP_TYPE_PERF_EVENT_ARRAY - split increment into seperate satement - refactor pointer array initialization - error code cleanup ==================== Signed-off-by: Alexei Starovoitov commit 321f6324500eb2ec75b6fcff7dcd66d64ba18529 Author: Daniel T. Lee Date: Sun Oct 11 03:17:34 2020 +0900 samples: bpf: Refactor XDP kern program maps with BTF-defined map Most of the samples were converted to use the new BTF-defined MAP as they moved to libbpf, but some of the samples were missing. Instead of using the previous BPF MAP definition, this commit refactors xdp_monitor and xdp_sample_pkts_kern MAP definition with the new BTF-defined MAP format. Also, this commit removes the max_entries attribute at PERF_EVENT_ARRAY map type. The libbpf's bpf_object__create_map() will automatically set max_entries to the maximum configured number of CPUs on the host. Signed-off-by: Daniel T. Lee Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201010181734.1109-4-danieltimlee@gmail.com commit 151936bf51afcdd6db52b3b73e339d021064b0ea Author: Daniel T. Lee Date: Sun Oct 11 03:17:33 2020 +0900 samples: bpf: Replace attach_tracepoint() to attach() in xdp_redirect_cpu >From commit d7a18ea7e8b6 ("libbpf: Add generic bpf_program__attach()"), for some BPF programs, it is now possible to attach BPF programs with __attach() instead of explicitly calling __attach_(). This commit refactors the __attach_tracepoint() with libbpf's generic __attach() method. In addition, this refactors the logic of setting the map FD to simplify the code. Also, the missing removal of bpf_load.o in Makefile has been fixed. Signed-off-by: Daniel T. Lee Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201010181734.1109-3-danieltimlee@gmail.com commit 8ac91df6de164923c1025e340ea81d085fb4ab85 Author: Daniel T. Lee Date: Sun Oct 11 03:17:32 2020 +0900 samples: bpf: Refactor xdp_monitor with libbpf To avoid confusion caused by the increasing fragmentation of the BPF Loader program, this commit would like to change to the libbpf loader instead of using the bpf_load. Thanks to libbpf's bpf_link interface, managing the tracepoint BPF program is much easier. bpf_program__attach_tracepoint manages the enable of tracepoint event and attach of BPF programs to it with a single interface bpf_link, so there is no need to manage event_fd and prog_fd separately. This commit refactors xdp_monitor with using this libbpf API, and the bpf_load is removed and migrated to libbpf. Signed-off-by: Daniel T. Lee Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201010181734.1109-2-danieltimlee@gmail.com commit bc081a693a56061f68f736c5d596134ee3c87689 Merge: bea4b3095b9b5 82c200be7c436 Author: Jakub Kicinski Date: Sun Oct 11 11:19:25 2020 -0700 Merge branch 'Offload-tc-vlan-mangle-to-mscc_ocelot-switch' Vladimir Oltean says: ==================== Offload tc-vlan mangle to mscc_ocelot switch This series offloads one more action to the VCAP IS1 ingress TCAM, which is to change the classified VLAN for packets, according to the VCAP IS1 keys (VLAN, source MAC, source IP, EtherType, etc). ==================== Signed-off-by: Jakub Kicinski commit 82c200be7c4363c1769b32ffea485407af178bb6 Author: Vladimir Oltean Date: Thu Oct 8 14:57:00 2020 +0300 selftests: net: mscc: ocelot: add test for VLAN modify action Create a test that changes a VLAN ID from 200 to 300. We also need to modify the preferences of the filters installed for the other rules so that they are unique, because we now install the "tc-vlan modify" filter in VCAP IS1 only temporarily, and we need to perform the deletion by filter preference number. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit ea440cd2d9b2df64d77b0419fc1e4f53318d5e55 Author: Vladimir Oltean Date: Thu Oct 8 14:56:59 2020 +0300 net: dsa: tag_ocelot: use VLAN information from tagging header when available When the Extraction Frame Header contains a valid classified VLAN, use that instead of the VLAN header present in the packet. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 70edfae15a327476fb40136da9316b23c938f737 Author: Vladimir Oltean Date: Thu Oct 8 14:56:58 2020 +0300 net: mscc: ocelot: offload VLAN mangle action to VCAP IS1 The VCAP_IS1_ACT_VID_REPLACE_ENA action, from the VCAP IS1 ingress TCAM, changes the classified VLAN. We are only exposing this ability for switch ports that are under VLAN aware bridges. This is because in standalone ports mode and under a bridge with vlan_filtering=0, the ocelot driver configures the switch to operate as VLAN-unaware, so the classified VLAN is not derived from the 802.1Q header from the packet, but instead is always equal to the port-based VLAN ID of the ingress port. We _can_ still change the classified VLAN for packets when operating in this mode, but the end result will most likely be a drop, since both the ingress and the egress port need to be members of the modified VLAN. And even if we install the new classified VLAN into the VLAN table of the switch, the result would still not be as expected: we wouldn't see, on the output port, the modified VLAN tag, but the original one, even though the classified VLAN was indeed modified. This is because of how the hardware works: on egress, what is pushed to the frame is a "port tag", which gives us the following options: - Tag all frames with port tag (derived from the classified VLAN) - Tag all frames with port tag, except if the classified VLAN is 0 or equal to the native VLAN of the egress port - No port tag Needless to say, in VLAN-unaware mode we are disabling the port tag. Otherwise, the existing VLAN tag would be ignored, and a second VLAN tag (the port tag), holding the classified VLAN, would be pushed (instead of replacing the existing 802.1Q tag). This is definitely not what the user wanted when installing a "vlan modify" action. So it is simply not worth bothering with VLAN modify rules under other configurations except when the ports are fully VLAN-aware. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit bea4b3095b9b5b12cdc426d359c3860998610787 Merge: df41c19abbeaa 71b77a7a27a33 Author: Jakub Kicinski Date: Sun Oct 11 11:04:56 2020 -0700 Merge branch 'enetc-Migrate-to-PHYLINK-and-PCS_LYNX' Claudiu Manoil says: ==================== enetc: Migrate to PHYLINK and PCS_LYNX Transitioning the enetc driver from phylib to phylink. Offloading the serdes configuration to the PCS_LYNX module is a mandatory part of this transition. Aiming for a cleaner, more maintainable design, and better code reuse. The first 2 patches are clean up prerequisites. Tested on a p1028rdb board. v2: validate() explicitly rejects now all interface modes not supported by the driver instead of relying on the device tree to provide only supported interfaces, and dropped redundant activation of pcs_poll (addressing Ioana's findings) ==================== Signed-off-by: Jakub Kicinski commit 71b77a7a27a3388c97e754a2c4e282df3f568fd7 Author: Claudiu Manoil Date: Wed Oct 7 12:48:23 2020 +0300 enetc: Migrate to PHYLINK and PCS_LYNX This is a methodical transition of the driver from phylib to phylink, following the guidelines from sfp-phylink.rst. The MAC register configurations based on interface mode were moved from the probing path to the mac_config() hook. MAC enable and disable commands (enabling Rx and Tx paths at MAC level) were also extracted and assigned to their corresponding phylink hooks. As part of the migration to phylink, the serdes configuration from the driver was offloaded to the PCS_LYNX module, introduced in commit 0da4c3d393e4 ("net: phy: add Lynx PCS module"), the PCS_LYNX module being a mandatory component required to make the enetc driver work with phylink. Signed-off-by: Claudiu Manoil Reviewed-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 9fce74bf2245c795397e6b8f8ed077b24abdd6ac Author: Claudiu Manoil Date: Wed Oct 7 12:48:22 2020 +0300 arm64: dts: fsl-ls1028a-rdb: Specify in-band mode for ENETC port 0 As part of the transition of the enetc ethernet driver from phylib to phylink, the in-band operation mode of the SGMII interface from enetc port 0 needs to be specified explicitly for phylink. Signed-off-by: Claudiu Manoil Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 46456ccfd98f0df5c73a47addedb587d6471ecbe Author: Claudiu Manoil Date: Wed Oct 7 12:48:21 2020 +0300 enetc: Clean up serdes configuration Decouple internal mdio bus creation from serdes configuration, as a prerequisite to offloading serdes configuration to a different module. Group together mdio bus creation routines, cleanup. Signed-off-by: Claudiu Manoil Reviewed-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 08f90fc9d1434c74166da55d8b9c9ae1cdaea1b9 Author: Claudiu Manoil Date: Wed Oct 7 12:48:20 2020 +0300 enetc: Clean up MAC and link configuration Decouple level MAC configuration based on phy interface type from general port configuration. Group together MAC and link configuration code. Decouple external mdio bus creation from interface type parsing. No longer return an (unhandled) error code when phy_node not found, use phy_node to indicate whether the port has a phy or not. No longer fall-through when serdes configuration fails for the link modes that require internal link configuration. Signed-off-by: Claudiu Manoil Reviewed-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 863bae1fbcfa0420e5f51389218a9532542aa00f Merge: cdabce2e3dff7 63ea38a402213 Author: Thomas Gleixner Date: Sun Oct 11 19:53:13 2020 +0200 Merge tag 'irqchip-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates from Marc Zyngier: Core changes: - Allow irq retriggering to follow a hierarchy - Allow interrupt hierarchies to be trimmed at allocation time - Allow interrupts to be hidden from /proc/interrupts (IPIs) - Introduce stub for set_handle_irq() when !GENERIC_IRQ_MULTI_HANDLER - New per-cpu IPI handling flow Architecture changes: - Move arm/arm64 IPI handling to the core interrupt code, removing the home brewed accounting Driver updates: - New driver for the MStar (and more recently Mediatek) platforms - New driver for the Actions Owl SIRQ controller - New driver for the TI PRUSS infrastructure - Wake-up support for the Qualcomm PDC controller - Primary interrupt controller support for the Designware APB ICTL - Convert the IPI code for GIC, GICv3, hip04, armada-270-xp and bcm2836 to using standard interrupts - Improve GICv3 pseudo-NMI support to deal with both non-secure and secure priorities on arm64 - Convert the GIC/GICv3 drivers to using HW-based irq retrigger - A sprinkling of dev_err_probe() conversion - A set of NVIDIA Tegra fixes for interrupt hierarchy corruption - A reset fix for the Loongson HTVEC driver - A couple of error handling fixes in the TI SCI drivers commit 673e3752456180de804cf4f43de26ef1d6b90a1b Merge: ac53a0d3107c6 9f4c53ca23a28 Author: Alexei Starovoitov Date: Sun Oct 11 10:21:05 2020 -0700 Merge branch 'Follow-up BPF helper improvements' Daniel Borkmann says: ==================== This series addresses most of the feedback [0] that was to be followed up from the last series, that is, UAPI helper comment improvements and getting rid of the ifindex obj file hacks in the selftest by using a BPF map instead. The __sk_buff data/data_end pointer work, I'm planning to do in a later round as well as the mem*() BPF improvements we have in Cilium for libbpf. Next, the series adds two features, i) a helper called redirect_peer() to improve latency on netns switch, and ii) to allow map in map with dynamic inner array map sizes. Selftests for each are added as well. For details, please check individual patches, thanks! [0] https://lore.kernel.org/bpf/cover.1601477936.git.daniel@iogearbox.net/ v5 -> v6: - Going with Andrii's suggestion to make the misconfigured verifier test more robust, and only probe on -EOPNOTSUPP (Andrii) v4 -> v5: - Replace cnt == -EOPNOTSUPP check with cnt < 0; I've used < 0 here as I think it's useful to keep the existing cnt == 0 || cnt >= ARRAY_SIZE(insn_buf) for error detection (Andrii) v3 -> v4: - Rename new array map flag to BPF_F_INNER_MAP (Alexei) v2 -> v3: - Remove tab that slipped into uapi helper desc (Jakub) - Rework map in map for array to error from map_gen_lookup (Andrii) v1 -> v2: - Fixed selftest comment wrt inner1/inner2 value (Yonghong) ==================== Signed-off-by: Alexei Starovoitov commit 9f4c53ca23a28c891d2bd3ff4738f7d95ba0303b Author: Daniel Borkmann Date: Sun Oct 11 01:40:06 2020 +0200 bpf, selftests: Add redirect_peer selftest Extend the test_tc_redirect test and add a small test that exercises the new redirect_peer() helper for the IPv4 and IPv6 case. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201010234006.7075-7-daniel@iogearbox.net commit 57a73fe7c1988ae726de23ee7c3c49ca82221751 Author: Daniel Borkmann Date: Sun Oct 11 01:40:05 2020 +0200 bpf, selftests: Make redirect_neigh test more extensible Rename into test_tc_redirect.sh and move setup and test code into separate functions so they can be reused for newly added tests in here. Also remove the crude hack to override ifindex inside the object file via xxd and sed and just use a simple map instead. Map given iproute2 does not support BTF fully and therefore neither global data at this point. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201010234006.7075-6-daniel@iogearbox.net commit 6775dab73bdc17df0f19d9f9d7470dc54536a909 Author: Daniel Borkmann Date: Sun Oct 11 01:40:04 2020 +0200 bpf, selftests: Add test for different array inner map size Extend the "diff_size" subtest to also include a non-inlined array map variant where dynamic inner #elems are possible. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201010234006.7075-5-daniel@iogearbox.net commit 4a8f87e60f6db40e640f1db555d063b2c4dea5f1 Author: Daniel Borkmann Date: Sun Oct 11 01:40:03 2020 +0200 bpf: Allow for map-in-map with dynamic inner array map entries Recent work in f4d05259213f ("bpf: Add map_meta_equal map ops") and 134fede4eecf ("bpf: Relax max_entries check for most of the inner map types") added support for dynamic inner max elements for most map-in-map types. Exceptions were maps like array or prog array where the map_gen_lookup() callback uses the maps' max_entries field as a constant when emitting instructions. We recently implemented Maglev consistent hashing into Cilium's load balancer which uses map-in-map with an outer map being hash and inner being array holding the Maglev backend table for each service. This has been designed this way in order to reduce overall memory consumption given the outer hash map allows to avoid preallocating a large, flat memory area for all services. Also, the number of service mappings is not always known a-priori. The use case for dynamic inner array map entries is to further reduce memory overhead, for example, some services might just have a small number of back ends while others could have a large number. Right now the Maglev backend table for small and large number of backends would need to have the same inner array map entries which adds a lot of unneeded overhead. Dynamic inner array map entries can be realized by avoiding the inlined code generation for their lookup. The lookup will still be efficient since it will be calling into array_map_lookup_elem() directly and thus avoiding retpoline. The patch adds a BPF_F_INNER_MAP flag to map creation which therefore skips inline code generation and relaxes array_map_meta_equal() check to ignore both maps' max_entries. This also still allows to have faster lookups for map-in-map when BPF_F_INNER_MAP is not specified and hence dynamic max_entries not needed. Example code generation where inner map is dynamic sized array: # bpftool p d x i 125 int handle__sys_enter(void * ctx): ; int handle__sys_enter(void *ctx) 0: (b4) w1 = 0 ; int key = 0; 1: (63) *(u32 *)(r10 -4) = r1 2: (bf) r2 = r10 ; 3: (07) r2 += -4 ; inner_map = bpf_map_lookup_elem(&outer_arr_dyn, &key); 4: (18) r1 = map[id:468] 6: (07) r1 += 272 7: (61) r0 = *(u32 *)(r2 +0) 8: (35) if r0 >= 0x3 goto pc+5 9: (67) r0 <<= 3 10: (0f) r0 += r1 11: (79) r0 = *(u64 *)(r0 +0) 12: (15) if r0 == 0x0 goto pc+1 13: (05) goto pc+1 14: (b7) r0 = 0 15: (b4) w6 = -1 ; if (!inner_map) 16: (15) if r0 == 0x0 goto pc+6 17: (bf) r2 = r10 ; 18: (07) r2 += -4 ; val = bpf_map_lookup_elem(inner_map, &key); 19: (bf) r1 = r0 | No inlining but instead 20: (85) call array_map_lookup_elem#149280 | call to array_map_lookup_elem() ; return val ? *val : -1; | for inner array lookup. 21: (15) if r0 == 0x0 goto pc+1 ; return val ? *val : -1; 22: (61) r6 = *(u32 *)(r0 +0) ; } 23: (bc) w0 = w6 24: (95) exit Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201010234006.7075-4-daniel@iogearbox.net commit 9aa1206e8f48222f35a0c809f33b2f4aaa1e2661 Author: Daniel Borkmann Date: Sun Oct 11 01:40:02 2020 +0200 bpf: Add redirect_peer helper Add an efficient ingress to ingress netns switch that can be used out of tc BPF programs in order to redirect traffic from host ns ingress into a container veth device ingress without having to go via CPU backlog queue [0]. For local containers this can also be utilized and path via CPU backlog queue only needs to be taken once, not twice. On a high level this borrows from ipvlan which does similar switch in __netif_receive_skb_core() and then iterates via another_round. This helps to reduce latency for mentioned use cases. Pod to remote pod with redirect(), TCP_RR [1]: # percpu_netperf 10.217.1.33 RT_LATENCY: 122.450 (per CPU: 122.666 122.401 122.333 122.401 ) MEAN_LATENCY: 121.210 (per CPU: 121.100 121.260 121.320 121.160 ) STDDEV_LATENCY: 120.040 (per CPU: 119.420 119.910 125.460 115.370 ) MIN_LATENCY: 46.500 (per CPU: 47.000 47.000 47.000 45.000 ) P50_LATENCY: 118.500 (per CPU: 118.000 119.000 118.000 119.000 ) P90_LATENCY: 127.500 (per CPU: 127.000 128.000 127.000 128.000 ) P99_LATENCY: 130.750 (per CPU: 131.000 131.000 129.000 132.000 ) TRANSACTION_RATE: 32666.400 (per CPU: 8152.200 8169.842 8174.439 8169.897 ) Pod to remote pod with redirect_peer(), TCP_RR: # percpu_netperf 10.217.1.33 RT_LATENCY: 44.449 (per CPU: 43.767 43.127 45.279 45.622 ) MEAN_LATENCY: 45.065 (per CPU: 44.030 45.530 45.190 45.510 ) STDDEV_LATENCY: 84.823 (per CPU: 66.770 97.290 84.380 90.850 ) MIN_LATENCY: 33.500 (per CPU: 33.000 33.000 34.000 34.000 ) P50_LATENCY: 43.250 (per CPU: 43.000 43.000 43.000 44.000 ) P90_LATENCY: 46.750 (per CPU: 46.000 47.000 47.000 47.000 ) P99_LATENCY: 52.750 (per CPU: 51.000 54.000 53.000 53.000 ) TRANSACTION_RATE: 90039.500 (per CPU: 22848.186 23187.089 22085.077 21919.130 ) [0] https://linuxplumbersconf.org/event/7/contributions/674/attachments/568/1002/plumbers_2020_cilium_load_balancer.pdf [1] https://github.com/borkmann/netperf_scripts/blob/master/percpu_netperf Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201010234006.7075-3-daniel@iogearbox.net commit dd2ce6a5373c6f5c830be54be10775458a8bd312 Author: Daniel Borkmann Date: Sun Oct 11 01:40:01 2020 +0200 bpf: Improve bpf_redirect_neigh helper description Follow-up to address David's feedback that we should better describe internals of the bpf_redirect_neigh() helper. Suggested-by: David Ahern Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Reviewed-by: David Ahern Link: https://lore.kernel.org/bpf/20201010234006.7075-2-daniel@iogearbox.net commit 7dfbea4c468cfbc7e1ceb619fe337e7582eb1d2d Author: Jacob Keller Date: Fri Oct 9 17:18:44 2020 -0700 scripts: remove namespace.pl namespace.pl is intended to help locate symbols which are defined but are not used externally. The goal is to avoid bloat of the namespace in the resulting kernel image. The script relies on object data, and only finds unused symbols for the configuration used to generate that object data. This results in a lot of false positive warnings such as symbols only used by a single architecture, or symbols which are used externally only under certain configurations. Running namespace.pl using allyesconfig, allmodconfig, and x86_64_defconfig yields the following results: * allmodconfig * 11122 unique symbol names with no external reference * 1194 symbols listed as multiply defined * 214 symbols it can't resolve * allyesconfig * 10997 unique symbol names with no external reference * 1194 symbols listed as multiply defined * 214 symbols it can't resolve * x86_64_defconfig * 5757 unique symbol names with no external reference * 528 symbols listed as multiply defined * 154 symbols it can't resolve The script also has no way to easily limit the scope of the checks to a given subset of the kernel, such as only checking for symbols defined within a module or subsystem. Discussion on public mailing lists seems to indicate that many view the tool output as suspect or not very useful (see discussions at [1] and [2] for further context). As described by Masahiro Yamada at [2], namespace.pl provides 3 types of checks: listing multiply defined symbols, resolving external symbols, and warnings about symbols with no reference. The first category of issues is easily caught by the linker as any set of multiply defined symbols should fail to link. The second category of issues is also caught by linking, as undefined symbols would cause issues. Even with modules, these types of issues where a module relies on an external symbol are caught by modpost. The remaining category of issues reported is the list of symbols with no external reference, and is the primary motivation of this script. However, it ought to be clear from the above examples that the output is difficult to sort through. Even allyesconfig has ~10000 entries. The current submit-checklist indicates that patches ought to go through namespacecheck and fix any new issues arising. But that itself presents problems. As described at [1], many cases of reports are due to configuration where a function is used externally by some configuration settings. Prominent maintainers appear to dislike changes modify code such that symbols become static based on CONFIG_* flags ([3], and [4]) One possible solution is to adjust the advice and indicate that we only care about the output of namespacecheck on allyesconfig or allmodconfig builds... However, given the discussion at [2], I suspect that few people are actively using this tool. It doesn't have a maintainer in the MAINTAINERS flie, and it produces so many warnings for unused symbols that it is difficult to use effectively. Thus, I propose we simply remove it. [1] https://lore.kernel.org/netdev/20200708164812.384ae8ea@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/ [2] https://lore.kernel.org/lkml/20190129204319.15238-1-jacob.e.keller@intel.com/ [3] https://lore.kernel.org/netdev/20190828.154744.2058157956381129672.davem@davemloft.net/ [4] https://lore.kernel.org/netdev/20190827210928.576c5fef@cakuba.netronome.com/ Signed-off-by: Jacob Keller Acked-by: Randy Dunlap Acked-by: Jakub Kicinski Signed-off-by: Masahiro Yamada commit 58d1620c4ded303b9d94fc68b23e5af1ec507de6 Author: Iskren Chernev Date: Sat Oct 10 09:55:26 2020 +0300 power: supply: ltc2941: Fix ptr to enum cast clang complains about casting pointers to smaller enum types. Signed-off-by: Iskren Chernev Signed-off-by: Sebastian Reichel commit 28c185a88607bc361ec7f071b907285e2e75de1b Author: Denis Efremov Date: Fri Oct 9 15:54:53 2020 +0300 coccinelle: api: kfree_sensitive: print memset position Print memset() call position in addition to the kfree() position to ease issues identification. Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit df41c19abbeaae6e24c8e31cff5fdb48632be380 Author: Xie He Date: Wed Oct 7 11:32:03 2020 -0700 drivers/net/wan/hdlc_fr: Move the skb_headroom check out of fr_hard_header Move the skb_headroom check out of fr_hard_header and into pvc_xmit. This has two benefits: 1. Originally we only do this check for skbs sent by users on Ethernet- emulating PVC devices. After the change we do this check for skbs sent on normal PVC devices, too. (Also add a comment to make it clear that this is only a protection against upper layers that don't take dev->needed_headroom into account. Such upper layers should be rare and I believe they should be fixed.) 2. After the change we can simplify the parameter list of fr_hard_header. We no longer need to use a pointer to pointers (skb_p) because we no longer need to replace the skb inside fr_hard_header. Cc: Krzysztof Halasa Signed-off-by: Xie He Signed-off-by: Jakub Kicinski commit b2e9685283127f30e7f2b466af0046ff9bd27a86 Author: Pavel Begunkov Date: Sat Oct 10 18:34:16 2020 +0100 io_uring: keep a pointer ref_node in file_data ->cur_refs of struct fixed_file_data always points to percpu_ref embedded into struct fixed_file_ref_node. Don't overuse container_of() and offsetting, and point directly to fixed_file_ref_node. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 600cf3f8b3f68ad22ee9af4cf24b0a96512f7fbe Author: Pavel Begunkov Date: Sat Oct 10 18:34:15 2020 +0100 io_uring: refactor *files_register()'s error paths Don't keep repeating cleaning sequences in error paths, write it once in the and use labels. It's less error prone and looks cleaner. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 5398ae698525572d4eb0531854158ece94385318 Author: Pavel Begunkov Date: Sat Oct 10 18:34:14 2020 +0100 io_uring: clean file_data access in files_register Keep file_data in a local var and replace with it complex references such as ctx->file_data. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 692d836351ffa05016521a769543af51c9dc3e9e Author: Pavel Begunkov Date: Sat Oct 10 18:34:13 2020 +0100 io_uring: don't delay io_init_req() error check Don't postpone io_init_req() error checks and do that right after calling it. There is no control-flow statements or dependencies with sqe/submitted accounting, so do those earlier, that makes the code flow a bit more natural. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 062d04d73168d1d7109b75600a53a6a361d1fda8 Author: Pavel Begunkov Date: Sat Oct 10 18:34:12 2020 +0100 io_uring: clean leftovers after splitting issue Kill extra if in io_issue_sqe() and place send/recv[msg] calls appropriately under switch's cases. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit a71976f3fa474d0aa9b33fc2ecaa67af6103bb71 Author: Pavel Begunkov Date: Sat Oct 10 18:34:11 2020 +0100 io_uring: remove timeout.list after hrtimer cancel Remove timeouts from ctx->timeout_list after hrtimer_try_to_cancel() successfully cancels it. With this we don't need to care whether there was a race and it was removed in io_timeout_fn(), and that will be handy for following patches. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0bdf7a2ddb7d8b28d1c9f505e7f32aa2972d461b Author: Pavel Begunkov Date: Sat Oct 10 18:34:10 2020 +0100 io_uring: use a separate struct for timeout_remove Don't use struct io_timeout for both IORING_OP_TIMEOUT and IORING_OP_TIMEOUT_REMOVE, they're quite different. Split them in two, that allows to remove an unused field in struct io_timeout, and btw kill ->flags not used by either. This also easier to follow, especially for timeout remove. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 71b547c048eb10d54627932019411549b1e4cfb7 Author: Pavel Begunkov Date: Sat Oct 10 18:34:09 2020 +0100 io_uring: improve submit_state.ios_left accounting state->ios_left isn't decremented for requests that don't need a file, so it might be larger than number of SQEs left. That in some circumstances makes us to grab more files that is needed so imposing extra put. Deaccount one ios_left for each request. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8371adf53c3c5ebfde1172608d3f4e126729cb10 Author: Pavel Begunkov Date: Sat Oct 10 18:34:08 2020 +0100 io_uring: simplify io_file_get() Keep ->needs_file_no_error check out of io_file_get(), and let callers handle it. It makes it more straightforward. Also, as the only error it can hand back -EBADF, make it return a file or NULL. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 479f517be57185087c2ae3c5e5aea0c3c6d4e5cc Author: Pavel Begunkov Date: Sat Oct 10 18:34:07 2020 +0100 io_uring: kill extra check in fixed io_file_get() ctx->nr_user_files == 0 IFF ctx->file_data == NULL and there fixed files are not used. Hence, verifying fds only against ctx->nr_user_files is enough. Remove the other check from hot path. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 233295130e53c8dfe6dbef3f52634c3f7e44cd6a Author: Pavel Begunkov Date: Sat Oct 10 18:34:06 2020 +0100 io_uring: clean up ->files grabbing Move work.files grabbing into io_prep_async_work() to all other work resources initialisation. We don't need to keep it separately now, as ->ring_fd/file are gone. It also allows to not grab it when a request is not going to io-wq. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 5bf5e464f1acb1c031b4a290d63760bcb074c027 Author: Pavel Begunkov Date: Sat Oct 10 18:34:05 2020 +0100 io_uring: don't io_prep_async_work() linked reqs There is no real reason left for preparing io-wq work context for linked requests in advance, remove it as this might become a bottleneck in some cases. Reported-by: Roman Gershman Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 874fb9e2ca949b443cc419a4f2227cafd4381d39 Author: David Ahern Date: Fri Oct 9 11:01:01 2020 -0700 ipv4: Restore flowi4_oif update before call to xfrm_lookup_route Tobias reported regressions in IPsec tests following the patch referenced by the Fixes tag below. The root cause is dropping the reset of the flowi4_oif after the fib_lookup. Apparently it is needed for xfrm cases, so restore the oif update to ip_route_output_flow right before the call to xfrm_lookup_route. Fixes: 2fbc6e89b2f1 ("ipv4: Update exception handling for multipath routes via same device") Reported-by: Tobias Brunner Signed-off-by: David Ahern Signed-off-by: Jakub Kicinski commit e0b2e0d8e6692ee488387aba871d0b70e1ed400a Author: Linus Walleij Date: Thu Oct 8 23:03:40 2020 +0200 net: dsa: rtl8366rb: Roof MTU for switch The MTU setting for this DSA switch is global so we need to keep track of the MTU set for each port, then as soon as any MTU changes, roof the MTU to the biggest common denominator and poke that into the switch MTU setting. To achieve this we need a per-chip-variant state container for the RTL8366RB to use for the RTL8366RB-specific stuff. Other SMI switches does seem to have per-port MTU setting capabilities. Fixes: 5f4a8ef384db ("net: dsa: rtl8366rb: Support setting MTU") Signed-off-by: Linus Walleij Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 49fb2f33f6a401d69002a30e804a786523a7b874 Merge: 16cb3653803de 0e4f35d788015 Author: Jakub Kicinski Date: Sat Oct 10 11:05:10 2020 -0700 Merge branch 'mptcp-some-fallback-fixes' Paolo Abeni says: ==================== mptcp: some fallback fixes pktdrill pointed-out we currently don't handle properly some fallback scenario for MP_JOIN subflows The first patch addresses such issue. Patch 2/2 fixes a related pre-existing issue that is more evident after 1/2: we could keep using for MPTCP signaling closed subflows. ==================== Signed-off-by: Jakub Kicinski commit 0e4f35d7880157ceccf0a58377d778b02762af82 Author: Paolo Abeni Date: Fri Oct 9 19:00:01 2020 +0200 mptcp: subflows garbage collection The msk can close MP_JOIN subflows if the initial handshake fails. Currently such subflows are kept alive in the conn_list until the msk itself is closed. Beyond the wasted memory, we could end-up sending the DATA_FIN and the DATA_FIN ack on such socket, even after a reset. Fixes: 43b54c6ee382 ("mptcp: Use full MPTCP-level disconnect state machine") Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit d582484726c4c46c8580923e855665fb91e3463e Author: Paolo Abeni Date: Fri Oct 9 19:00:00 2020 +0200 mptcp: fix fallback for MP_JOIN subflows Additional/MP_JOIN subflows that do not pass some initial handshake tests currently causes fallback to TCP. That is an RFC violation: we should instead reset the subflow and leave the the msk untouched. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/91 Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests") Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit 14b26b127c098bbab9b364d90a007c478090bf5f Author: Calvin Johnson Date: Thu Oct 8 20:17:06 2020 +0530 net: phy: Move of_mdio from drivers/of to drivers/net/mdio Better place for of_mdio.c is drivers/net/mdio. Move of_mdio.c from drivers/of to drivers/net/mdio Signed-off-by: Calvin Johnson Acked-by: Rob Herring Signed-off-by: Jakub Kicinski commit fea9b31e25e6087b86aeb3dcdb1062b8d6c04c8e Author: Maxim Kochetkov Date: Thu Oct 8 15:03:12 2020 +0300 dpaa_eth: enable NETIF_MSG_HW by default When packets are received on the error queue, this function under net_ratelimit(): netif_err(priv, hw, net_dev, "Err FD status = 0x%08x\n"); does not get printed. Instead we only see: [ 3658.845592] net_ratelimit: 244 callbacks suppressed [ 3663.969535] net_ratelimit: 230 callbacks suppressed [ 3669.085478] net_ratelimit: 228 callbacks suppressed Enabling NETIF_MSG_HW fixes this issue, and we can see some information about the frame descriptors of packets. Signed-off-by: Maxim Kochetkov Signed-off-by: Vladimir Oltean Reviewed-by: Madalin Bucur Signed-off-by: Jakub Kicinski commit 8d6112f0a0c4ef9187959955eb67b6400577b1f2 Author: Heiner Kallweit Date: Fri Oct 9 16:20:34 2020 +0200 r8169: factor out handling rtl8169_stats Factor out handling the private packet/byte counters to new functions rtl_get_priv_stats() and rtl_inc_priv_stats(). Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 6236239d1cc479b5cf49317822241e8a97fefb7b Author: Heiner Kallweit Date: Fri Oct 9 14:10:57 2020 +0200 net: usbnet: remove driver version Obviously this driver version doesn't make sense. Go with the default and let ethtool display the kernel version. Signed-off-by: Heiner Kallweit Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jakub Kicinski commit 16cb3653803dee243547f95cb51f01bec1323cdf Author: Pujin Shi Date: Thu Oct 8 20:19:29 2020 +0800 net: smc: fix missing brace warning for old compilers For older versions of gcc, the array = {0}; will cause warnings: net/smc/smc_llc.c: In function 'smc_llc_add_link_local': net/smc/smc_llc.c:1212:9: warning: missing braces around initializer [-Wmissing-braces] struct smc_llc_msg_add_link add_llc = {0}; ^ net/smc/smc_llc.c:1212:9: warning: (near initialization for 'add_llc.hd') [-Wmissing-braces] net/smc/smc_llc.c: In function 'smc_llc_srv_delete_link_local': net/smc/smc_llc.c:1245:9: warning: missing braces around initializer [-Wmissing-braces] struct smc_llc_msg_del_link del_llc = {0}; ^ net/smc/smc_llc.c:1245:9: warning: (near initialization for 'del_llc.hd') [-Wmissing-braces] 2 warnings generated Fixes: 4dadd151b265 ("net/smc: enqueue local LLC messages") Signed-off-by: Pujin Shi Acked-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 7e94e46c16d060fe272b658ad5e7c2374eeec1bb Author: Pujin Shi Date: Thu Oct 8 20:19:28 2020 +0800 net: smc: fix missing brace warning for old compilers For older versions of gcc, the array = {0}; will cause warnings: net/smc/smc_llc.c: In function 'smc_llc_send_link_delete_all': net/smc/smc_llc.c:1317:9: warning: missing braces around initializer [-Wmissing-braces] struct smc_llc_msg_del_link delllc = {0}; ^ net/smc/smc_llc.c:1317:9: warning: (near initialization for 'delllc.hd') [-Wmissing-braces] 1 warnings generated Fixes: f3811fd7bc97 ("net/smc: send DELETE_LINK, ALL message and wait for send to complete") Signed-off-by: Pujin Shi Acked-by: Karsten Graul Signed-off-by: Jakub Kicinski commit f6e5ee6a2f3d13aa1786f3b52da7a5f663752df7 Author: Gustavo A. R. Silva Date: Thu Oct 8 09:28:06 2020 -0500 net: thunderx: Use struct_size() helper in kmalloc() Make use of the new struct_size() helper instead of the offsetof() idiom. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jakub Kicinski commit b54fa649d7e7f8081f80c052de71267a42095dfa Merge: 7b50ee3dad258 13ba4c4344228 Author: Jakub Kicinski Date: Sat Oct 10 10:21:04 2020 -0700 Merge tag 'linux-can-fixes-for-5.9-20201008' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can ==================== linux-can-fixes-for-5.9-20201008 The first patch is by Lucas Stach and fixes m_can driver by removing an erroneous call to m_can_class_suspend() in runtime suspend. Which causes the pinctrl state to get stuck on the "sleep" state, which breaks all CAN functionality on SoCs where this state is defined. The last two patches target the j1939 protocol: Cong Wang fixes a syzbot finding of an uninitialized variable in the j1939 transport protocol. I contribute a patch, that fixes the initialization of a same uninitialized variable in a different function. ==================== Signed-off-by: Jakub Kicinski commit 8df245c40aa233f9f27908c71ed035165fa4f831 Merge: 16573e7cb5ad6 b7d96bca1f004 Author: Jakub Kicinski Date: Sat Oct 10 09:36:54 2020 -0700 Merge tag 'wireless-drivers-next-2020-10-09' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.10 Fourth and last set of patches for v5.10. Most of these are iwlwifi patches, but few small fixes to other drivers as well. Major changes: iwlwifi * PNVM support (platform-specific phy config data) * bump the FW API support to 59 ==================== Signed-off-by: Jakub Kicinski commit 16573e7cb5ad6f94f1fd41153dfdf2aef85fe310 Merge: c77fb07fae36a ba6ff70a3bb76 Author: Jakub Kicinski Date: Sat Oct 10 09:12:52 2020 -0700 Merge tag 'mac80211-next-for-net-next-2020-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== A handful of changes: * fixes for the recent S1G work * a docbook build time improvement * API to pass beacon rate to lower-level driver ==================== Signed-off-by: Jakub Kicinski commit 63ea38a402213d8c9c16e58ee4901ff51bc8fe3c Merge: dde5cfffd68a7 6d8af863b89da Author: Marc Zyngier Date: Sat Oct 10 12:46:54 2020 +0100 Merge branch 'irq/mstar' into irq/irqchip-next Signed-off-by: Marc Zyngier commit 6d8af863b89da6bdce013db2216b432b4016042e Author: Mark-PK Tsai Date: Wed Sep 2 14:33:44 2020 +0800 dt-bindings: interrupt-controller: Add MStar interrupt controller Add binding for MStar interrupt controller. Signed-off-by: Mark-PK Tsai Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200902063344.1852-3-mark-pk.tsai@mediatek.com commit ad4c938c92af91302e363b1842c82f1cc4a6c4fd Author: Mark-PK Tsai Date: Wed Sep 2 14:33:43 2020 +0800 irqchip/irq-mst: Add MStar interrupt controller support Add MStar interrupt controller support using hierarchy irq domain. Signed-off-by: Mark-PK Tsai Signed-off-by: Marc Zyngier Tested-by: Daniel Palmer Link: https://lore.kernel.org/r/20200902063344.1852-2-mark-pk.tsai@mediatek.com commit dde5cfffd68a755151caf449b3870e4120cbc9c7 Merge: 408f110ef6974 1d1e5630de78f Author: Marc Zyngier Date: Sat Oct 10 12:23:26 2020 +0100 Merge branch 'irq/irqchip-fixes' into irq/irqchip-next Signed-off-by: Marc Zyngier commit 408f110ef6974b336cc0958bf123f5234f583869 Merge: 04e8c5b2fa9a2 c351ab7bf2a56 Author: Marc Zyngier Date: Sat Oct 10 12:16:24 2020 +0100 Merge branch 'irq/tegra-pmc' into irq/irqchip-next Signed-off-by: Marc Zyngier commit c351ab7bf2a565951172cadbdebe686137c3fd43 Author: Marc Zyngier Date: Sun Oct 4 18:27:04 2020 +0100 soc/tegra: pmc: Don't create fake interrupt hierarchy levels The Tegra PMC driver does ungodly things with the interrupt hierarchy, repeatedly corrupting it by pulling hwirq numbers out of thin air, overriding existing IRQ mappings and changing the handling flow of unsuspecting users. All of this is done in the name of preserving the interrupt hierarchy even when these levels do not exist in the HW. Together with the use of proper IRQs for IPIs, this leads to an unbootable system as the rescheduling IPI gets repeatedly repurposed for random drivers... Instead, let's simply mark the level from which the hierarchy does not make sense for the HW, and let the core code trim the usused levels from the hierarchy. Signed-off-by: Marc Zyngier commit 8681cc33f817842df7ebe3c36558d97f5497a177 Author: Marc Zyngier Date: Sun Oct 4 21:16:24 2020 +0100 soc/tegra: pmc: Allow optional irq parent callbacks Make the PMC driver resistent to variable depth interrupt hierarchy, which we are about to introduce. Signed-off-by: Marc Zyngier commit 986ec63d4482292570b579ac98b151acf8bdd1de Author: Marc Zyngier Date: Mon Oct 5 10:27:27 2020 +0100 gpio: tegra186: Allow optional irq parent callbacks Make the tegra186 GPIO driver resistent to variable depth interrupt hierarchy, which we are about to introduce. No functionnal change yet. Signed-off-by: Marc Zyngier commit 55567976629e58fde28fb70612ca73228271eef2 Author: Marc Zyngier Date: Tue Oct 6 10:10:20 2020 +0100 genirq/irqdomain: Allow partial trimming of irq_data hierarchy It appears that some HW is ugly enough that not all the interrupts connected to a particular interrupt controller end up with the same hierarchy depth (some of them are terminated early). This leaves the irqchip hacker with only two choices, both equally bad: - create discrete domain chains, one for each "hierarchy depth", which is very hard to maintain - create fake hierarchy levels for the shallow paths, leading to all kind of problems (what are the safe hwirq values for these fake levels?) Implement the ability to cut short a single interrupt hierarchy from a level marked as being disconnected by using the new irq_domain_disconnect_hierarchy() helper. The irqdomain allocation code will then perform the trimming Signed-off-by: Marc Zyngier commit f3277cbfba763cd2826396521b9296de67cf1bbc Author: Todd Kjos Date: Fri Oct 9 16:24:55 2020 -0700 binder: fix UAF when releasing todo list When releasing a thread todo list when tearing down a binder_proc, the following race was possible which could result in a use-after-free: 1. Thread 1: enter binder_release_work from binder_thread_release 2. Thread 2: binder_update_ref_for_handle() -> binder_dec_node_ilocked() 3. Thread 2: dec nodeA --> 0 (will free node) 4. Thread 1: ACQ inner_proc_lock 5. Thread 2: block on inner_proc_lock 6. Thread 1: dequeue work (BINDER_WORK_NODE, part of nodeA) 7. Thread 1: REL inner_proc_lock 8. Thread 2: ACQ inner_proc_lock 9. Thread 2: todo list cleanup, but work was already dequeued 10. Thread 2: free node 11. Thread 2: REL inner_proc_lock 12. Thread 1: deref w->type (UAF) The problem was that for a BINDER_WORK_NODE, the binder_work element must not be accessed after releasing the inner_proc_lock while processing the todo list elements since another thread might be handling a deref on the node containing the binder_work element leading to the node being freed. Signed-off-by: Todd Kjos Link: https://lore.kernel.org/r/20201009232455.4054810-1-tkjos@google.com Cc: # 4.14, 4.19, 5.4, 5.8 Signed-off-by: Greg Kroah-Hartman commit e1f13c879a7c21bd207dc6242455e8e3a1e88b40 Author: Anant Thazhemadam Date: Sat Oct 10 13:59:32 2020 +0530 staging: comedi: check validity of wMaxPacketSize of usb endpoints found While finding usb endpoints in vmk80xx_find_usb_endpoints(), check if wMaxPacketSize = 0 for the endpoints found. Some devices have isochronous endpoints that have wMaxPacketSize = 0 (as required by the USB-2 spec). However, since this doesn't apply here, wMaxPacketSize = 0 can be considered to be invalid. Reported-by: syzbot+009f546aa1370056b1c2@syzkaller.appspotmail.com Tested-by: syzbot+009f546aa1370056b1c2@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam Cc: stable Link: https://lore.kernel.org/r/20201010082933.5417-1-anant.thazhemadam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 868fd970e187d39c586565c875837e530c6f7e1b Author: Jérôme Pouiller Date: Fri Oct 9 19:13:07 2020 +0200 staging: wfx: improve robustness of wfx_get_hw_rate() Smatch complains: data_tx.c:37 wfx_get_hw_rate() warn: constraint '(struct ieee80211_supported_band)->bitrates' overflow 'band->bitrates' 0 <= abs_rl '0-127' user_rl '' required = '(struct ieee80211_supported_band)->n_bitrates' 23 struct ieee80211_supported_band *band; 24 25 if (rate->idx < 0) 26 return -1; 27 if (rate->flags & IEEE80211_TX_RC_MCS) { 28 if (rate->idx > 7) { 29 WARN(1, "wrong rate->idx value: %d", rate->idx); 30 return -1; 31 } 32 return rate->idx + 14; 33 } 34 // WFx only support 2GHz, else band information should be retrieved 35 // from ieee80211_tx_info 36 band = wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]; 37 return band->bitrates[rate->idx].hw_value; Add a simple check to make Smatch happy. Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201009171307.864608-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c9d47696391d17923ed34451d451fac5ff4939db Author: Jérôme Pouiller Date: Fri Oct 9 19:13:06 2020 +0200 staging: wfx: drop unicode characters from strings Smatch complains: hif_rx.c:235 hif_generic_indication() warn: format string contains non-ascii character '\xc2' hif_rx.c:235 hif_generic_indication() warn: format string contains non-ascii character '\xb0' 234 if (!wfx_api_older_than(wdev, 1, 4)) 235 dev_info(wdev->dev, "Rx test ongoing. Temperature: %d°C\n", ^ 236 body->data.rx_stats.current_temp); So, replace the unicode character. Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201009171307.864608-8-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 8522d62e6bca8c8b2fbf456523f01bf36468239c Author: Jérôme Pouiller Date: Fri Oct 9 19:13:05 2020 +0200 staging: wfx: gpiod_get_value() can return an error Smatch complains: hif_rx.c:98 hif_wakeup_indication() warn: 'gpiod_get_value(wdev->pdata.gpio_wakeup)' returns positive and negative bh.c:24 device_wakeup() warn: 'gpiod_get_value_cansleep(wdev->pdata.gpio_wakeup)' returns positive and negative Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201009171307.864608-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 5f841fe69832c8440a5d940e4d768cf7b96f3b9f Author: Jérôme Pouiller Date: Fri Oct 9 19:13:04 2020 +0200 staging: wfx: increase robustness of hif_generic_confirm() Smatch complains: drivers/staging/wfx/hif_rx.c:26 hif_generic_confirm() warn: negative user subtract: 0-u16max - 4 20 static int hif_generic_confirm(struct wfx_dev *wdev, 21 const struct hif_msg *hif, const void *buf) 22 { 23 // All confirm messages start with status 24 int status = le32_to_cpup((__le32 *)buf); 25 int cmd = hif->id; 26 int len = le16_to_cpu(hif->len) - 4; // drop header ^^^^^ 27 28 WARN(!mutex_is_locked(&wdev->hif_cmd.lock), "data locking error"); In fact, rx_helper() already make the necessary checks on the value of hif->len. Never mind, add an explicit check to make Smatch happy. Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201009171307.864608-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit b3c669be90ddfa70409ab6335dadf3ef46473f9a Author: Jérôme Pouiller Date: Fri Oct 9 19:13:03 2020 +0200 staging: wfx: wfx_init_common() returns NULL on error Smatch complains: bus_spi.c:228 wfx_spi_probe() warn: 'bus->core' could be an error pointer bus_sdio.c:221 wfx_sdio_probe() warn: 'bus->core' could be an error pointer bus->core contains the result of wfx_init_common(). With this patch, wfx_init_common() returns a valid pointer or NULL. Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201009171307.864608-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit bb97bc286171f58f3286c2d1da876c7a62708ea6 Author: Jérôme Pouiller Date: Fri Oct 9 19:13:02 2020 +0200 staging: wfx: standardize the error when vif does not exist Smatch complains: drivers/staging/wfx/hif_rx.c:177 hif_scan_complete_indication() warn: potential NULL parameter dereference 'wvif' drivers/staging/wfx/data_tx.c:576 wfx_flush() warn: potential NULL parameter dereference 'wvif' Indeed, if the vif id returned by the device does not exist anymore, wdev_to_wvif() could return NULL. In add, the error is not handled uniformly in the code, sometime a WARN() is displayed but code continue, sometime a dev_warn() is displayed, sometime it is just not tested, ... This patch standardize that. Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201009171307.864608-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit fd2575c4a45017068445bfe31e93522e2d451d76 Author: Jérôme Pouiller Date: Fri Oct 9 19:13:01 2020 +0200 staging: wfx: check memory allocation Smatch complains: main.c:228 wfx_send_pdata_pds() warn: potential NULL parameter dereference 'tmp_buf' 227 tmp_buf = kmemdup(pds->data, pds->size, GFP_KERNEL); 228 ret = wfx_send_pds(wdev, tmp_buf, pds->size); ^^^^^^^ 229 kfree(tmp_buf); Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201009171307.864608-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1cd8909642183804904e3ad6292dcee92fc7d005 Author: Jérôme Pouiller Date: Fri Oct 9 19:13:00 2020 +0200 staging: wfx: improve error handling of hif_join() Smatch complains: hif_tx.c:319 hif_join() error: we previously assumed 'channel' could be null (see line 315) 311 if (!hif) 312 return -ENOMEM; 313 body->infrastructure_bss_mode = !conf->ibss_joined; 314 body->short_preamble = conf->use_short_preamble; 315 if (channel && channel->flags & IEEE80211_CHAN_NO_IR) ^^^^^^^ 316 body->probe_for_join = 0; 317 else 318 body->probe_for_join = 1; 319 body->channel_number = channel->hw_value; ^^^^^^^^^^^^^^^^^ 320 body->beacon_interval = cpu_to_le32(conf->beacon_int); 321 body->basic_rate_set = Indeed, channel can't be NULL (else I would have seen plenty of Ooops this past year). This patch explicitly claims this restriction. Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201009171307.864608-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 0110ce655db833b5ac9386ea327c4119722db9b3 Author: Ioana Ciornei Date: Fri Oct 9 18:30:00 2020 +0300 staging: dpaa2-switch: add a dpaa2_switch prefix to all functions in ethsw.c Some static functions in the dpaa2-switch driver don't have a distinct prefix and this is becoming an inconvenience when looking at, for example, a perf top output and trying to determine easily which entries are dpaa2 switch related. Ammend this by adding the prefix to all the functions. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20201009153000.14550-3-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 5ad71958e497fc0b55704014e71e760af745f911 Author: Ioana Ciornei Date: Fri Oct 9 18:29:59 2020 +0300 staging: dpaa2-switch: add a dpaa2_switch_ prefix to all functions in ethsw-ethtool.c Some static functions in the dpaa2-switch driver don't have a distinct prefix and this is becoming an inconvenience when looking at, for example, a perf top output and trying to determine easily which entries are dpaa2 switch related. Ammend this by adding the prefix to all the functions. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20201009153000.14550-2-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 93578a25d4e21603518daf27a5f9caa4bf79de68 Author: Gustavo A. R. Silva Date: Thu Oct 8 17:28:49 2020 -0500 usb: musb: gadget: Use fallthrough pseudo-keyword In order to enable -Wimplicit-fallthrough for Clang[1], replace the existing /* FALLTHROUGH */ comment with the new pseudo-keyword macro fallthrough[2]. [1] https://git.kernel.org/linus/e2079e93f562c7f7a030eb7642017ee5eabaaa10 [2] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20201008222849.GA18634@embeddedor Signed-off-by: Greg Kroah-Hartman commit c77fb07fae36a02c382b729f856d45dade88a581 Merge: c4cc0b9c771a5 44f3625bc6165 Author: Jakub Kicinski Date: Fri Oct 9 20:22:49 2020 -0700 Merge branch 'netlink-export-policy-on-validation-failures' Johannes Berg says: ==================== netlink: export policy on validation failures Export the policy used for attribute validation when it fails, so e.g. for an out-of-range attribute userspace immediately gets the valid ranges back. v2 incorporates the suggestion from Jakub to have a function to estimate the size (netlink_policy_dump_attr_size_estimate()) and check that it does the right thing on the *normal* policy dumps, not (just) when calling it from the error scenario. v3 only addresses a few minor style issues. v4 fixes up a forgotten 'git add' ... sorry. v5 is a resend, I messed up v4's cover letter subject (saying v3) and apparently the second patch didn't go out at all. Tested using nl80211/iw in a few scenarios, seems to work fine and return the policy back, e.g. kernel reports: integer out of range policy: 04 00 0b 00 0c 00 04 00 01 00 00 00 00 00 00 00 ^ padding ^ minimum allowed value policy: 04 00 0b 00 0c 00 05 00 ff ff ff ff 00 00 00 00 ^ padding ^ maximum allowed value policy: 08 00 01 00 04 00 00 00 ^ type 4 == U32 for an out-of-range case. ==================== Signed-off-by: Jakub Kicinski commit 44f3625bc61653ea3bde9960298faf2f5518fda5 Author: Johannes Berg Date: Thu Oct 8 12:45:17 2020 +0200 netlink: export policy in extended ACK Add a new attribute NLMSGERR_ATTR_POLICY to the extended ACK to advertise the policy, e.g. if an attribute was out of range, you'll know the range that's permissible. Add new NL_SET_ERR_MSG_ATTR_POL() and NL_SET_ERR_MSG_ATTR_POL() macros to set this, since realistically it's only useful to do this when the bad attribute (offset) is also returned. Use it in lib/nlattr.c which practically does all the policy validation. v2: - add and use netlink_policy_dump_attr_size_estimate() v3: - remove redundant break v4: - really remove redundant break ... sorry Reviewed-by: Jakub Kicinski Signed-off-by: Johannes Berg Signed-off-by: Jakub Kicinski commit d2681e93b0ab7afe01d07f8c96f14afaccdcea4c Author: Johannes Berg Date: Thu Oct 8 12:45:16 2020 +0200 netlink: policy: refactor per-attr policy writing Refactor the per-attribute policy writing into a new helper function, to be used later for dumping out the policy of a rejected attribute. v2: - fix some indentation v3: - change variable order in netlink_policy_dump_write() Reviewed-by: Jakub Kicinski Signed-off-by: Johannes Berg Signed-off-by: Jakub Kicinski commit 7b50ee3dad2581dc022b4e32e55964d4fcdccf20 Author: Hoang Huu Le Date: Thu Oct 8 14:31:56 2020 +0700 tipc: fix NULL pointer dereference in tipc_named_rcv In the function node_lost_contact(), we call __skb_queue_purge() without grabbing the list->lock. This can cause to a race-condition why processing the list 'namedq' in calling path tipc_named_rcv()->tipc_named_dequeue(). [] BUG: kernel NULL pointer dereference, address: 0000000000000000 [] #PF: supervisor read access in kernel mode [] #PF: error_code(0x0000) - not-present page [] PGD 7ca63067 P4D 7ca63067 PUD 6c553067 PMD 0 [] Oops: 0000 [#1] SMP NOPTI [] CPU: 1 PID: 15 Comm: ksoftirqd/1 Tainted: G O 5.9.0-rc6+ #2 [] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS [...] [] RIP: 0010:tipc_named_rcv+0x103/0x320 [tipc] [] Code: 41 89 44 24 10 49 8b 16 49 8b 46 08 49 c7 06 00 00 00 [...] [] RSP: 0018:ffffc900000a7c58 EFLAGS: 00000282 [] RAX: 00000000000012ec RBX: 0000000000000000 RCX: ffff88807bde1270 [] RDX: 0000000000002c7c RSI: 0000000000002c7c RDI: ffff88807b38f1a8 [] RBP: ffff88807b006288 R08: ffff88806a367800 R09: ffff88806a367900 [] R10: ffff88806a367a00 R11: ffff88806a367b00 R12: ffff88807b006258 [] R13: ffff88807b00628a R14: ffff888069334d00 R15: ffff88806a434600 [] FS: 0000000000000000(0000) GS:ffff888079480000(0000) knlGS:0[...] [] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [] CR2: 0000000000000000 CR3: 0000000077320000 CR4: 00000000000006e0 [] Call Trace: [] ? tipc_bcast_rcv+0x9a/0x1a0 [tipc] [] tipc_rcv+0x40d/0x670 [tipc] [] ? _raw_spin_unlock+0xa/0x20 [] tipc_l2_rcv_msg+0x55/0x80 [tipc] [] __netif_receive_skb_one_core+0x8c/0xa0 [] process_backlog+0x98/0x140 [] net_rx_action+0x13a/0x420 [] __do_softirq+0xdb/0x316 [] ? smpboot_thread_fn+0x2f/0x1e0 [] ? smpboot_thread_fn+0x74/0x1e0 [] ? smpboot_thread_fn+0x14e/0x1e0 [] run_ksoftirqd+0x1a/0x40 [] smpboot_thread_fn+0x149/0x1e0 [] ? sort_range+0x20/0x20 [] kthread+0x131/0x150 [] ? kthread_unuse_mm+0xa0/0xa0 [] ret_from_fork+0x22/0x30 [] Modules linked in: veth tipc(O) ip6_udp_tunnel udp_tunnel [...] [] CR2: 0000000000000000 [] ---[ end trace 65c276a8e2e2f310 ]--- To fix this, we need to grab the lock of the 'namedq' list on both path calling. Fixes: cad2929dc432 ("tipc: update a binding service via broadcast") Acked-by: Jon Maloy Signed-off-by: Hoang Huu Le Signed-off-by: Jakub Kicinski commit ed42989eab57d619667d7e87dfbd8fe207db54fe Author: Cong Wang Date: Wed Oct 7 21:12:50 2020 -0700 tipc: fix the skb_unshare() in tipc_buf_append() skb_unshare() drops a reference count on the old skb unconditionally, so in the failure case, we end up freeing the skb twice here. And because the skb is allocated in fclone and cloned by caller tipc_msg_reassemble(), the consequence is actually freeing the original skb too, thus triggered the UAF by syzbot. Fix this by replacing this skb_unshare() with skb_cloned()+skb_copy(). Fixes: ff48b6222e65 ("tipc: use skb_unshare() instead in tipc_buf_append()") Reported-and-tested-by: syzbot+e96a7ba46281824cc46a@syzkaller.appspotmail.com Cc: Jon Maloy Cc: Ying Xue Signed-off-by: Cong Wang Reviewed-by: Xin Long Signed-off-by: Jakub Kicinski commit c4cc0b9c771a5199ef4e37f65e12dd25c56859d6 Merge: 8f5e71b9d3b51 f29fa003996da Author: Jakub Kicinski Date: Fri Oct 9 18:15:59 2020 -0700 Merge branch 'net-smc-updates-2020-10-07' Karsten Graul says: ==================== net/smc: updates 2020-10-07 Patch 1 and 2 address warnings from static code checkers, and patch 3 handles a case when all proposed ISM V2 devices fail to init and no V1 devices are tried afterwards. ==================== Signed-off-by: Jakub Kicinski commit f29fa003996da1b9a133713db9fb5a344eaada4f Author: Karsten Graul Date: Wed Oct 7 22:57:43 2020 +0200 net/smc: restore smcd_version when all ISM V2 devices failed to init Field ini->smcd_version is set to SMC_V2 before calling smc_listen_ism_init(). This clears the V1 bit that may be set. When all matching ISM V2 devices fail to initialize then the smcd_version field needs to get restored to allow any possible V1 devices to initialize. And be consistent, always go to the not_found label when no device was found. Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 9047a617dc2f8ea0575ef80c38e57ed52b712a1f Author: Karsten Graul Date: Wed Oct 7 22:57:42 2020 +0200 net/smc: cleanup buffer usage in smc_listen_work() coccinelle informs about net/smc/af_smc.c:1770:10-11: WARNING: opportunity for kzfree/kvfree_sensitive Its not that kzfree() would help here, the memset() is done to prepare the buffer for another socket receive. Fix that warning message by reordering the calls, while at it eliminate the unneeded variable cclc2 and use sizeof(*buf) as above in the same function. No functional changes. Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit c60a2cefb32d2f0e88141b942f92d94bd69bb56f Author: Karsten Graul Date: Wed Oct 7 22:57:41 2020 +0200 net/smc: consolidate unlocking in same function Static code checkers warn of inconsistent returns because the lgr mutex is locked in one function and unlocked in a function called by the locking function: net/smc/af_smc.c:823 smc_connect_rdma() warn: inconsistent returns 'smc_client_lgr_pending'. net/smc/af_smc.c:897 smc_connect_ism() warn: inconsistent returns 'smc_server_lgr_pending'. Make the code consistent by doing the unlock in the same function that fetches the lock. No functional changes. Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit 8f5e71b9d3b510b18cc969bc8f43a2470e19568b Merge: 3b8f56ee0c48c 164ab90d0d864 Author: Jakub Kicinski Date: Fri Oct 9 17:58:46 2020 -0700 Merge tag 'linux-can-next-for-5.10-20201007' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== linux-can-next-for-5.10-20201007 The first 3 patches are by me and fix several warnings found when compiling the kernel with W=1. Lukas Bulwahn's patch adjusts the MAINTAINERS file, to accommodate the renaming of the mcp251xfd driver. Vincent Mailhol contributes 3 patches for the CAN networking layer. First error queue support is added the the CAN RAW protocol. The second patch converts the get_can_dlc() and get_canfd_dlc() in-Kernel-only macros from using __u8 to u8. The third patch adds a helper function to calculate the length of one bit in in multiple of time quanta. Oliver Hartkopp's patch add support for the ISO 15765-2:2016 transport protocol to the CAN stack. Three patches by Lad Prabhakar add documentation for various new rcar controllers to the device tree bindings of the rcar_can and rcan_canfd driver. Michael Walle's patch adds various processors to the flexcan driver binding documentation. The next two patches are by me and target the flexcan driver aswell. The remove the ack_grp and ack_bit from the fsl,stop-mode DT property and the driver, as they are not used anymore. As these are the last two arguments this change will not break existing device trees. The last three patches are by Srinivas Neeli and target the xilinx_can driver. The first one increases the lower limit for the bit rate prescaler to 2, the other two fix sparse and coverity findings. ==================== Signed-off-by: Jakub Kicinski commit 923527dcb4d164925a2fed0b53c6a1625a60a472 Author: Randy Dunlap Date: Thu Oct 8 22:49:00 2020 -0700 net/tls: remove a duplicate function prototype Remove one of the two instances of the function prototype for tls_validate_xmit_skb(). Signed-off-by: Randy Dunlap Cc: Boris Pismenny Cc: Aviad Yehezkel Cc: John Fastabend Cc: Daniel Borkmann Signed-off-by: Jakub Kicinski commit ea1dd3e9d080c961b9a451130b61c72dc9a5397b Author: Rohit Maheshwari Date: Thu Oct 8 00:10:21 2020 +0530 net/tls: sendfile fails with ktls offload At first when sendpage gets called, if there is more data, 'more' in tls_push_data() gets set which later sets pending_open_record_frags, but when there is no more data in file left, and last time tls_push_data() gets called, pending_open_record_frags doesn't get reset. And later when 2 bytes of encrypted alert comes as sendmsg, it first checks for pending_open_record_frags, and since this is set, it creates a record with 0 data bytes to encrypt, meaning record length is prepend_size + tag_size only, which causes problem. We should set/reset pending_open_record_frags based on more bit. Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure") Signed-off-by: Rohit Maheshwari Signed-off-by: Jakub Kicinski commit 394039fe2cfd5fb15851da19e2981649585fc245 Author: Naoki Hayama Date: Thu Oct 8 17:47:31 2020 +0900 net: tlan: Fix typo abitrary Fix comment typo. s/abitrary/arbitrary/ Signed-off-by: Naoki Hayama Signed-off-by: Jakub Kicinski commit 4a65dff81a04f874fa6915c7f069b4dc2c4010e4 Author: Georg Kohmann Date: Wed Oct 7 14:53:02 2020 +0200 net: ipv6: Discard next-hop MTU less than minimum link MTU When a ICMPV6_PKT_TOOBIG report a next-hop MTU that is less than the IPv6 minimum link MTU, the estimated path MTU is reduced to the minimum link MTU. This behaviour breaks TAHI IPv6 Core Conformance Test v6LC4.1.6: Packet Too Big Less than IPv6 MTU. Referring to RFC 8201 section 4: "If a node receives a Packet Too Big message reporting a next-hop MTU that is less than the IPv6 minimum link MTU, it must discard it. A node must not reduce its estimate of the Path MTU below the IPv6 minimum link MTU on receipt of a Packet Too Big message." Drop the path MTU update if reported MTU is less than the minimum link MTU. Signed-off-by: Georg Kohmann Signed-off-by: Jakub Kicinski commit d1704382821032fede445b816f4296fd379baacf Author: Alex Elder Date: Fri Oct 9 15:28:48 2020 -0500 net: ipa: skip suspend/resume activities if not set up When processing a system suspend request we suspend modem endpoints if they are enabled, and call ipa_cmd_tag_process() (which issues IPA commands) to ensure the IPA pipeline is cleared. It is an error to attempt to issue an IPA command before setup is complete, so this is clearly a bug. But we also shouldn't suspend or resume any endpoints that have not been set up. Have ipa_endpoint_suspend() and ipa_endpoint_resume() immediately return if setup hasn't completed, to avoid any attempt to configure endpoints or issue IPA commands in that case. Fixes: 84f9bd12d46d ("soc: qcom: ipa: IPA endpoints") Tested-by: Matthias Kaehlcke Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 10e5afb3d260f2d2521889d87ebdefb7fc3d4087 Author: Heiko Carstens Date: Thu Oct 8 16:43:17 2020 +0200 s390/uaccess: fix indentation Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit db5273975622af17e265d5d96b41427cde4c25b0 Author: Heiko Carstens Date: Thu Oct 8 16:28:15 2020 +0200 s390/uaccess: add default cases for __put_user_fn()/__get_user_fn() Add default cases for __put_user_fn()/__get_user_fn(). This doesn't fix anything since the functions are only called with sane values. However we get rid of smatch warnings: ./arch/s390/include/asm/uaccess.h:143 __get_user_fn() error: uninitialized symbol 'rc'. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 4366dd7251259806e57251cb2d699f0863841775 Author: Harald Freudenberger Date: Thu Oct 8 08:43:09 2020 +0200 s390/zcrypt: fix wrong format specifications Fixes 5 wrong format specification findings found by the kernel test robot in ap_queue.c: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat] __func__, status.response_code, Signed-off-by: Harald Freudenberger Reported-by: kernel test robot Fixes: 2ea2a6099ae3 ("s390/ap: add error response code field for ap queue devices") Signed-off-by: Vasily Gorbik commit b61e1f3281c5a53f24f47849873463514f58c1b8 Author: Heiko Carstens Date: Fri Sep 18 10:26:19 2020 +0200 s390/kprobes: move insn_page to text segment Move the in-kernel kprobes insn page to text segment. Rationale: having that page in rw data segment is suboptimal, since as soon as a kprobe is set, this will split the 1:1 kernel mapping for a single page which get new permissions. Note: there is always at least one kprobe present for the kretprobe trampoline; so the mapping will always be split into smaller 4k mappings because of this. Moving the kprobes insn page into text segment makes sure that the page is mapped RO/X in any case, and avoids that the 1:1 mapping is split. The kprobe insn_page is defined as a dummy function which is filled with "br %r14" instructions. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit a82763e63ee78c9876211998d0bcc082f4ff63d8 Author: Brendan Higgins Date: Tue Aug 4 13:47:45 2020 -0700 Documentation: kunit: add a brief blurb about kunit_test_suite Add a brief blurb saying how and when the kunit_test_suite() macro works to the usage documentation. Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 45dcbb6f5ef78b0a9c1b91bea2f6f227642a65aa Author: Brendan Higgins Date: Tue Aug 4 13:47:44 2020 -0700 kunit: test: add test plan to KUnit TAP format TAP 14 allows an optional test plan to be emitted before the start of the start of testing[1]; this is valuable because it makes it possible for a test harness to detect whether the number of tests run matches the number of tests expected to be run, ensuring that no tests silently failed. Link[1]: https://github.com/isaacs/testanything.github.io/blob/tap14/tap-version-14-specification.md#the-plan Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 8c0d884986ba22f1020be9c02e41c030890ee8f2 Author: Brendan Higgins Date: Tue Aug 4 13:47:43 2020 -0700 init: main: add KUnit to kernel init Although we have not seen any actual examples where KUnit doesn't work because it runs in the late init phase of the kernel, it has been a concern for some time that this could potentially be an issue in the future. So, remove KUnit from init calls entirely, instead call directly from kernel_init() so that KUnit runs after late init. Co-developed-by: Alan Maguire Signed-off-by: Alan Maguire Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd Reviewed-by: Kees Cook Reviewed-by: Luis Chamberlain Signed-off-by: Shuah Khan commit aac35468ca20a3a0e75a24c13c0e31610727f120 Author: Alan Maguire Date: Tue Aug 4 13:47:42 2020 -0700 kunit: test: create a single centralized executor for all tests Add a centralized executor to dispatch tests rather than relying on late_initcall to schedule each test suite separately. Centralized execution is for built-in tests only; modules will execute tests when loaded. Signed-off-by: Alan Maguire Co-developed-by: Iurii Zaikin Signed-off-by: Iurii Zaikin Co-developed-by: Brendan Higgins Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd Reviewed-by: Kees Cook Signed-off-by: Shuah Khan commit 90a025a859a3ac4dfe3db62edf21070a90e98766 Author: Brendan Higgins Date: Tue Aug 4 13:47:41 2020 -0700 vmlinux.lds.h: add linker section for KUnit test suites Add a linker section where KUnit can put references to its test suites. This patch is the first step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Co-developed-by: Iurii Zaikin Signed-off-by: Iurii Zaikin Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd Signed-off-by: Shuah Khan commit 2a41fc52c21b6ece49921716bd289bfebaadcc04 Author: David Gow Date: Thu Sep 10 21:24:04 2020 -0700 Documentation: kunit: Add naming guidelines As discussed in [1], KUnit tests have hitherto not had a particularly consistent naming scheme. This adds documentation outlining how tests and test suites should be named, including how those names should be used in Kconfig entries and filenames. [1]: https://lore.kernel.org/linux-kselftest/202006141005.BA19A9D3@keescook/t/#u Signed-off-by: David Gow Reviewed-by: Kees Cook Reviewed-by: Brendan Higgins Reviewed-by: Marco Elver Reviewed-by: Tim Bird Signed-off-by: Shuah Khan commit 3b8f56ee0c48c3a8d4e8db99f87f2a8956a6456a Merge: 5d3b8ec99a3ce 051d2b5cfa1e3 Author: Jakub Kicinski Date: Fri Oct 9 13:15:32 2020 -0700 Merge branch '100GbE-Intel-Wired-LAN-Driver-Updates-2020-10-07' Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2020-10-07 This series contains updates to ice driver only. Andy Shevchenko changes usage to %*phD format to print small buffer as hex string. Bruce removes repeated words reported by checkpatch. Ani changes ice_info_get_dsn() to return void as it always returns success. Jake adds devlink reporting of fw.app.bundle_id. Moves devlink_port structure to ice_vsi to resolve issues with cleanup. Adds additional debug info for firmware updates. Bixuan Cui resolves -Wpointer-to-int-cast warnings. Dan adds additional packet type masks and checks to prevent overwriting existing Flow Director rules. ==================== Signed-off-by: Jakub Kicinski commit 051d2b5cfa1e32f4ca19f96466aff4be7e878d74 Author: Dan Nowlin Date: Wed Oct 7 10:54:47 2020 -0700 ice: fix adding IP4 IP6 Flow Director rules A subsequent addition of an IP4 or IP6 rule after other rules would overwrite any existing TCAM entries of related L4 protocols(ex: tcp4 or udp6). This was due to the mask including too many TCAM entries. Add new packet type masks with bits properly excluded so rules are not overwritten. Signed-off-by: Dan Nowlin Signed-off-by: Henry Tieman Tested-by: Brijesh Behera Signed-off-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit ecfb751f1a053a07476e34c50a8f3ed854284461 Author: Bixuan Cui Date: Wed Oct 7 10:54:46 2020 -0700 ice: Fix pointer cast warnings pointers should be casted to unsigned long to avoid -Wpointer-to-int-cast warnings: drivers/net/ethernet/intel/ice/ice_flow.h:197:33: warning: cast from pointer to integer of different size drivers/net/ethernet/intel/ice/ice_flow.h:198:32: warning: cast to pointer from integer of different size Signed-off-by: Bixuan Cui Tested-by: Aaron Brown Signed-off-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 1e8249cc9dc51d1f64b1322fa69834c589c8a3b4 Author: Jacob Keller Date: Wed Oct 7 10:54:45 2020 -0700 ice: add additional debug logging for firmware update While debugging a recent failure to update the flash of an ice device, I found it helpful to add additional logging which helped determine the root cause of the problem being a timeout issue. Add some extra dev_dbg() logging messages which can be enabled using the dynamic debug facility, including one for ice_aq_wait_for_event that will use jiffies to capture a rough estimate of how long we waited for the completion of a firmware command. Signed-off-by: Jacob Keller Tested-by: Brijesh Behera Signed-off-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 48d40025b5392dc9010eec3c99a5a4b6e5a29d1e Author: Jacob Keller Date: Wed Oct 7 10:54:44 2020 -0700 ice: refactor devlink_port to be per-VSI Currently, the devlink_port structure is stored within the ice_pf. This made sense because we create a single devlink_port for each PF. This setup does not mesh with the abstractions in the driver very well, and led to a flow where we accidentally call devlink_port_unregister twice during error cleanup. In particular, if devlink_port_register or devlink_port_unregister are called twice, this leads to a kernel panic. This appears to occur during some possible flows while cleaning up from a failure during driver probe. If register_netdev fails, then we will call devlink_port_unregister in ice_cfg_netdev as it cleans up. Later, we again call devlink_port_unregister since we assume that we must cleanup the port that is associated with the PF structure. This occurs because we cleanup the devlink_port for the main PF even though it was not allocated. We allocated the port within a per-VSI function for managing the main netdev, but did not release the port when cleaning up that VSI, the allocation and destruction are not aligned. Instead of attempting to manage the devlink_port as part of the PF structure, manage it as part of the PF VSI. Doing this has advantages, as we can match the de-allocation of the devlink_port with the unregister_netdev associated with the main PF VSI. Moving the port to the VSI is preferable as it paves the way for handling devlink ports allocated for other purposes such as SR-IOV VFs. Since we're changing up how we allocate the devlink_port, also change the indexing. Originally, we indexed the port using the PF id number. This came from an old goal of sharing a devlink for each physical function. Managing devlink instances across multiple function drivers is not workable. Instead, lets set the port number to the logical port number returned by firmware and set the index using the VSI index (sometimes referred to as VSI handle). Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 410d06879c01751e6fe6e9aebc2e0d9100a71d77 Author: Jacob Keller Date: Wed Oct 7 10:54:43 2020 -0700 ice: add the DDP Track ID to devlink info Add "fw.app.bundle_id" to display the DDP Track ID of the active DDP package. This id is similar to "fw.bundle_id" and is a unique identifier for the DDP package that is loaded in the device. Each new DDP has a unique Track ID generated for it, and the ID can be used to identify and track the DDP package. Add documentation for the new devlink info version. Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 045afac407efdbb190d965cdf119c1f1ddc7f03c Author: Anirudh Venkataramanan Date: Wed Oct 7 10:54:42 2020 -0700 ice: Change ice_info_get_dsn to be void ice_info_get_dsn always returns 0, so just make it void. Signed-off-by: Anirudh Venkataramanan Tested-by: Aaron Brown Signed-off-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit ac382a0944cd6d5b30528bca2e5465f9670b2bb9 Author: Bruce Allan Date: Wed Oct 7 10:54:41 2020 -0700 ice: remove repeated words A new test in checkpatch detects repeated words; cleanup all pre-existing occurrences of those now. Signed-off-by: Bruce Allan Tested-by: Aaron Brown Co-developed-by: Tony Nguyen Signed-off-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 4d7ebed6aa17fb253bf44b12e38169fd4dc3e057 Author: Andy Shevchenko Date: Wed Oct 7 10:54:40 2020 -0700 ice: devlink: use %*phD to print small buffer Use %*phD format to print small buffer as hex string. Signed-off-by: Andy Shevchenko Reviewed-by: Jacob Keller Tested-by: Jacob Keller Signed-off-by: Tony Nguyen Signed-off-by: Jakub Kicinski commit 5d3b8ec99a3cee8f6abe13f74f2f55f58d67726a Author: Christian Eggers Date: Wed Oct 7 11:30:49 2020 +0200 net: dsa: microchip: add ksz9563 to ksz9477 I2C driver Add support for the KSZ9563 3-Port Gigabit Ethernet Switch to the ksz9477 driver. The KSZ9563 supports both SPI (already in) and I2C. The ksz9563 is already in the device tree binding documentation. Signed-off-by: Christian Eggers Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 1abdd39f14b25dd2d69096b624a4f86f158a9feb Author: Daniel Latypov Date: Wed Sep 30 11:31:51 2020 -0700 kunit: tool: fix display of make errors CalledProcessError stores the output of the failed process as `bytes`, not a `str`. So when we log it on build error, the make output is all crammed into one line with "\n" instead of actually printing new lines. After this change, we get readable output with new lines, e.g. > CC lib/kunit/kunit-example-test.o > In file included from ../lib/kunit/test.c:9: > ../include/kunit/test.h:22:1: error: unknown type name ‘invalid_type_that_causes_compile’ > 22 | invalid_type_that_causes_compile errors; > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > make[3]: *** [../scripts/Makefile.build:283: lib/kunit/test.o] Error 1 Secondly, trying to concat exceptions to strings will fail with > TypeError: can only concatenate str (not "OSError") to str so fix this with an explicit cast to str. Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit ac53a0d3107c6582b690a8ab348bd637dbd0883f Merge: eca43ee6c46db 54fada41e8a16 Author: Daniel Borkmann Date: Fri Oct 9 22:03:06 2020 +0200 Merge branch 'bpf-llvm-reg-alloc-patterns' Alexei Starovoitov says: ==================== Make two verifier improvements: - The llvm register allocator may use two different registers representing the same virtual register. Teach the verifier to recognize that. - Track bounded scalar spill/fill. The profiler[123] test in patch 3 will fail to load without patches 1 and 2. The profiler[23] test may fail to load on older llvm due to speculative code motion nd instruction combining optimizations that are fixed in https://reviews.llvm.org/D85570 v1 -> v2: - fixed 32-bit mov issue spotted by John. - allowed r2=r1; r3=r2; sequence as suggested by John. - added comments, acks, more tests. ==================== Signed-off-by: Daniel Borkmann commit 54fada41e8a162a45ab13ac4f76af609733d4679 Author: Alexei Starovoitov Date: Thu Oct 8 18:12:40 2020 -0700 selftests/bpf: Asm tests for the verifier regalloc tracking. Add asm tests for register allocator tracking logic. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201009011240.48506-5-alexei.starovoitov@gmail.com commit 03d4d13fab3fa75fbcf09bced5e3c8acf1622969 Author: Alexei Starovoitov Date: Thu Oct 8 18:12:39 2020 -0700 selftests/bpf: Add profiler test The main purpose of the profiler test to check different llvm generation patterns to make sure the verifier can load these large programs. Note that profiler.inc.h test doesn't follow strict kernel coding style. The code was formatted in the kernel style, but variable declarations are kept as-is to preserve original llvm IR pattern. profiler1.c should pass with older and newer llvm profiler[23].c may fail on older llvm that don't have: https://reviews.llvm.org/D85570 because llvm may do speculative code motion optimization that will generate code like this: // r9 is a pointer to map_value // r7 is a scalar 17: bf 96 00 00 00 00 00 00 r6 = r9 18: 0f 76 00 00 00 00 00 00 r6 += r7 19: a5 07 01 00 01 01 00 00 if r7 < 257 goto +1 20: bf 96 00 00 00 00 00 00 r6 = r9 // r6 is used here The verifier will reject such code with the error: "math between map_value pointer and register with unbounded min value is not allowed" At insn 18 the r7 is indeed unbounded. The later insn 19 checks the bounds and the insn 20 undoes map_value addition. It is currently impossible for the verifier to understand such speculative pointer arithmetic. Hence llvm D85570 addresses it on the compiler side. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201009011240.48506-4-alexei.starovoitov@gmail.com commit 5689d49b71ad25409e41c6052dd9549fbeaf9bde Author: Yonghong Song Date: Thu Oct 8 18:12:38 2020 -0700 bpf: Track spill/fill of bounded scalars. Under register pressure the llvm may spill registers with bounds into the stack. The verifier has to track them through spill/fill otherwise many kinds of bound errors will be seen. The spill/fill of induction variables was already happening. This patch extends this logic from tracking spill/fill of a constant into any bounded register. There is no need to track spill/fill of unbounded, since no new information will be retrieved from the stack during register fill. Though extra stack difference could cause state pruning to be less effective, no adverse affects were seen from this patch on selftests and on cilium programs. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20201009011240.48506-3-alexei.starovoitov@gmail.com commit 75748837b7e56919679e02163f45d5818c644d03 Author: Alexei Starovoitov Date: Thu Oct 8 18:12:37 2020 -0700 bpf: Propagate scalar ranges through register assignments. The llvm register allocator may use two different registers representing the same virtual register. In such case the following pattern can be observed: 1047: (bf) r9 = r6 1048: (a5) if r6 < 0x1000 goto pc+1 1050: ... 1051: (a5) if r9 < 0x2 goto pc+66 1052: ... 1053: (bf) r2 = r9 /* r2 needs to have upper and lower bounds */ This is normal behavior of greedy register allocator. The slides 137+ explain why regalloc introduces such register copy: http://llvm.org/devmtg/2018-04/slides/Yatsina-LLVM%20Greedy%20Register%20Allocator.pdf There is no way to tell llvm 'not to do this'. Hence the verifier has to recognize such patterns. In order to track this information without backtracking allocate ID for scalars in a similar way as it's done for find_good_pkt_pointers(). When the verifier encounters r9 = r6 assignment it will assign the same ID to both registers. Later if either register range is narrowed via conditional jump propagate the register state into the other register. Clear register ID in adjust_reg_min_max_vals() for any alu instruction. The register ID is ignored for scalars in regsafe() and doesn't affect state pruning. mark_reg_unknown() clears the ID. It's used to process call, endian and other instructions. Hence ID is explicitly cleared only in adjust_reg_min_max_vals() and in 32-bit mov. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20201009011240.48506-2-alexei.starovoitov@gmail.com commit 083320ebe661ef276877b79f31bb875309fbe4a3 Merge: edb899841c4e4 8ba0b6d196315 Author: Dave Airlie Date: Sat Oct 10 05:44:32 2020 +1000 Merge tag 'drm-misc-next-fixes-2020-10-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Three fixes for vc4 that addresses dual-display breakages Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201002065243.ry7gp4or3ywhluer@gilmour.lan commit 9f0bb95eeeb4677fec92a17133d350430b33f027 Author: Manjunath Patil Date: Tue Oct 6 14:31:37 2020 -0700 net/rds: suppress page allocation failure error in recv buffer refill RDS/IB tries to refill the recv buffer in softirq context using GFP_NOWAIT flag. However alloc failure is handled by queueing a work to refill the recv buffer with GFP_KERNEL flag. This means failure to allocate with GFP_NOWAIT isn't fatal. Do not print the PAF warnings if softirq context fails to refill the recv buffer. We will see the PAF warnings when worker also fails to allocate. Signed-off-by: Manjunath Patil Reviewed-by: Aruna Ramakrishna Signed-off-by: Jakub Kicinski commit d3b2dc9472e1b76661bc381df4e26eaec3c9f2a8 Merge: 37198e93ced70 48d072c4e8cdb Author: Jakub Kicinski Date: Fri Oct 9 12:15:00 2020 -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 selftests fixes from Fabian Frederick: 1) Extend selftest nft_meta.sh to check for meta cpu. 2) Fix selftest nft_meta.sh error reporting. 3) Fix shellcheck warnings in selftest nft_meta.sh. 4) Extend selftest nft_meta.sh to check for meta time. ==================== Signed-off-by: Jakub Kicinski commit 9c27bc97aff8bbe62b5b29ebf528291dd85d9c86 Author: Ye Bin Date: Fri Oct 9 15:42:18 2020 +0800 drm/amdgpu: Fix invalid number of character '{' in amdgpu_acpi_init Fix follow warning: Checking drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c... [drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:770]: (error) Invalid number of character '{' when these macros are defined: ''. Checking drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: CONFIG_ACPI... [drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:770]: (error) Invalid number of character '{' when these macros are defined: 'CONFIG_ACPI'. ...... Checking drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: CONFIG_X86... [drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:770]: (error) Invalid number of character '{' when these macros are defined: 'CONFIG_X86'. Checking drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: _X86_... [drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:770]: (error) Invalid number of character '{' when these macros are defined: '_X86_'. Checking drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: __linux__... [drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:770]: (error) Invalid number of character '{' when these macros are defined: '__linux__'. Fixes: 97d798b276e9 ("drm/amdgpu: simplify ATIF backlight handling") Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Alex Deucher commit b0047e53c4a5f92b9c59c5532490bbe5023d0404 Author: Emily.Deng Date: Thu Oct 8 08:53:59 2020 +0800 drm/amdgpu: Remove warning for virtual_display Remove the virtual_display warning in drm_crtc_vblank_off when dev->num_crtcs is null. Reviewed-by: Andrey Grodzovsky Signed-off-by: Emily.Deng Signed-off-by: Alex Deucher commit 0224b2758fb0d8a09c1a034afa6f03f27a8c7cc7 Author: kernel test robot Date: Wed Sep 23 10:28:28 2020 +0800 drm/amdgpu: kfd_initialized can be static Fixes: c7651b73586600 ("drm/amdgpu: Fix handling of KFD initialization failures") Signed-off-by: kernel test robot Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3cb9d2416ccdea14c5f1b05b5fdb15d5ebfa386b Author: Evan Quan Date: Wed Sep 30 11:54:01 2020 +0800 drm/amd/pm: setup APU dpm clock table in SMU HW initialization As the dpm clock table is needed during DC HW initialization. And that (DC HW initialization) comes before smu_late_init() where current APU dpm clock table setup is performed. So, NULL pointer dereference will be triggered. By moving APU dpm clock table setup to smu_hw_init(), this can be avoided. Fixes: 02cf91c113ea ("drm/amd/powerplay: postpone operations not required for hw setup to late_init") Signed-off-by: Evan Quan Reported-by: Dirk Gouders Acked-by: Nirmoy Das Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 9142c4131a701bbb7de6262eccca1a48ace835c4 Author: Alex Deucher Date: Tue Oct 6 09:10:24 2020 -0400 drm/amdgpu: prevent spurious warning The default auto setting for kcq should not generate a warning. Fixes: a300de40f66b ("drm/amdgpu: introduce a new parameter to configure how many KCQ we want(v5)") Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit 305a81bfbd89a45711cdc1c16a602b3b7c4f017f Author: Alex Deucher Date: Tue Oct 6 09:20:47 2020 -0400 drm/amdgpu/swsmu: fix ARC build errors We want to use the dev_* functions here rather than the pr_* variants. Switch to using dev_warn() which mirrors what we do on other asics. Fixes the following build errors on ARC: ../drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c: In function 'navi10_fill_i2c_req': ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration] ../drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c: In function 'sienna_cichlid_fill_i2c_req': ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration] Reported-by: kernel test robot Cc: Randy Dunlap Cc: Evan Quan Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Acked-by: Randy Dunlap Signed-off-by: Alex Deucher commit dd7a595af15de437c38f9bddb6637afef93659c6 Author: Dmytro Laktyushkin Date: Wed Sep 16 16:49:08 2020 -0400 drm/amd/display: Fix OPTC_DATA_FORMAT programming This should be programmed with timing rather than with odm. Signed-off-by: Dmytro Laktyushkin Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 508300a57141a120430e790b487d2dba287e23f8 Author: Alvin Lee Date: Mon Sep 21 16:23:25 2020 -0400 drm/amd/display: Don't allow pstate if no support in blank [Why] We will hang if we report switch in VACTIVE but not in VBLANK and DPG_EN = 1 [How] Block switch in ACTIVE if not supported in BLANK Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 91bca7f7104c3e98b9d47c2b5e3622bf7a6a89e1 Merge: 846e463a70e91 eb79d75474ab5 Author: Jakub Kicinski Date: Fri Oct 9 12:07:10 2020 -0700 Merge branch 'devlink-add-reload-action-and-limit-options' Moshe Shemesh says: ==================== Add devlink reload action and limit options Introduce new options on devlink reload API to enable the user to select the reload action required and constrains limits on these actions that he may want to ensure. Complete support for reload actions in mlx5. The following reload actions are supported: driver_reinit: driver entities re-initialization, applying devlink-param and devlink-resource values. fw_activate: firmware activate. The uAPI is backward compatible, if the reload action option is omitted from the reload command, the driver reinit action will be used. Note that when required to do firmware activation some drivers may need to reload the driver. On the other hand some drivers may need to reset the firmware to reinitialize the driver entities. Therefore, the devlink reload command returns the actions which were actually performed. By default reload actions are not limited and driver implementation may include reset or downtime as needed to perform the actions. However, if reload limit is selected, the driver should perform only if it can do it while keeping the limit constraints. Reload limit added: no_reset: No reset allowed, no down time allowed, no link flap and no configuration is lost. Each driver which supports devlink reload command should expose the reload actions and limits supported. Add reload stats to hold the history per reload action per limit. For example, the number of times fw_activate has been done on this device since the driver module was added or if the firmware activation was done with or without reset. Patch 1 changes devlink_reload_supported() param type to enable using it before allocating devlink. Patch 2-3 add the new API reload action and reload limit options to devlink reload. Patch 4-5 add reload stats and remote reload stats. These stats are exposed through devlink dev get. Patches 6-11 add support on mlx5 for devlink reload action fw_activate and handle the firmware reset events. Patches 12-13 add devlink enable remote dev reset parameter and use it in mlx5. Patches 14-15 mlx5 add devlink reload limit no_reset support for fw_activate reload action. Patch 16 adds documentation file devlink-reload.rst ==================== Signed-off-by: Jakub Kicinski commit eb79d75474ab529f22cf0f7866f1829762a18277 Author: Moshe Shemesh Date: Wed Oct 7 09:00:57 2020 +0300 devlink: Add Documentation/networking/devlink/devlink-reload.rst Add devlink reload rst documentation file. Update index file to include it. Signed-off-by: Moshe Shemesh Signed-off-by: Jakub Kicinski commit bef878e865ea8a4e08d5b5d4ef56df681ff1d6b3 Author: Moshe Shemesh Date: Wed Oct 7 09:00:56 2020 +0300 net/mlx5: Add support for devlink reload limit no reset Add support for devlink reload action fw_activate with reload limit no_reset which does firmware live patching, updating the firmware image without reset, no downtime and no configuration lose. The driver checks if the firmware is capable of handling the pending firmware changes as a live patch. If it is then it triggers firmware live patching flow. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit 2d69356752ff862dbb0c7e6725874740799d7708 Author: Moshe Shemesh Date: Wed Oct 7 09:00:55 2020 +0300 net/mlx5: Add support for fw live patch event Firmware live patch event notifies the driver that the firmware was just updated using live patch. In such case the driver should not reload or re-initiate entities, part to updating the firmware version and re-initiate the firmware tracer which can be updated by live patch with new strings database to help debugging an issue. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit b4f7cbb3671b9a2ea3c3315f4f5e18539881cd0c Author: Moshe Shemesh Date: Wed Oct 7 09:00:54 2020 +0300 net/mlx5: Add devlink param enable_remote_dev_reset support The enable_remote_dev_reset devlink param flags that the host admin allows resets by other hosts. In case it is cleared mlx5 host PF driver will send NACK on pci sync for firmware update reset request and the command will fail. By default enable_remote_dev_reset parameter is true, so pci sync for firmware update reset is enabled. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit 195d9dece1686576ad1c7b45942b5cf9eacb3fbf Author: Moshe Shemesh Date: Wed Oct 7 09:00:53 2020 +0300 devlink: Add enable_remote_dev_reset generic parameter The enable_remote_dev_reset devlink param flags that the host admin allows device resets that can be initiated by other hosts. This parameter is useful for setups where a device is shared by different hosts, such as multi-host setup. Once the user set this parameter to false, the driver should NACK any attempt to reset the device while the driver is loaded. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 5ec697446f4630e3c30c6d7a67f4955c7bfd1a11 Author: Moshe Shemesh Date: Wed Oct 7 09:00:52 2020 +0300 net/mlx5: Add support for devlink reload action fw activate Add support for devlink reload action fw_activate. To activate firmware image the mlx5 driver resets the firmware and reloads it from flash. If a new image was stored on flash it will be loaded. Once this reload command is executed the driver initiates fw sync reset flow, where the firmware synchronizes all PFs on coming reset and driver reload. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit 7dd6df329d4cb9c4198d87e5286212ce33956e28 Author: Moshe Shemesh Date: Wed Oct 7 09:00:51 2020 +0300 net/mlx5: Handle sync reset abort event If firmware sends sync_reset_abort to driver the driver should clear the reset requested mode as reset is not expected any more. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit eabe8e5e88f509ebaef6cc85dd5d580896d9e066 Author: Moshe Shemesh Date: Wed Oct 7 09:00:50 2020 +0300 net/mlx5: Handle sync reset now event On sync_reset_now event the driver does reload and PCI link toggle to activate firmware upgrade reset. When the firmware sends this event it syncs the event on all PFs, so all PFs will do PCI link toggle at once. To do PCI link toggle, the driver ensures that no other device ID under the same bridge by checking that all the PF functions under the same PCI bridge have same device ID. If no other device it uses PCI bridge link control to turn link down and up. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit 38b9f903f22b9baa5c4b9bfb07c8bbc49f5efbba Author: Moshe Shemesh Date: Wed Oct 7 09:00:49 2020 +0300 net/mlx5: Handle sync reset request event Once the driver gets sync_reset_request from firmware it prepares for the coming reset and sends acknowledge. After getting this event the driver expects device reset, either it will trigger PCI reset on sync_reset_now event or such PCI reset will be triggered by another PF of the same device. So it moves to reset requested mode and if it gets PCI reset triggered by the other PF it detect the reset and reloads. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit e7f4d0bcb8dad6eac657e295b562b1a925d4f3ce Author: Moshe Shemesh Date: Wed Oct 7 09:00:48 2020 +0300 net/mlx5: Set cap for pci sync for fw update event Set capability to notify the firmware that this host driver is capable of handling pci sync for firmware update events. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit 3180472f582ba746ea3492c3d34f19877656bd2d Author: Moshe Shemesh Date: Wed Oct 7 09:00:47 2020 +0300 net/mlx5: Add functions to set/query MFRL register Add functions to query and set the MFRL reset options supported by firmware. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit 77069ba2e3adf48c472fbbd9cbd7a4f5370b17df Author: Moshe Shemesh Date: Wed Oct 7 09:00:46 2020 +0300 devlink: Add remote reload stats Add remote reload stats to hold the history of actions performed due devlink reload commands initiated by remote host. For example, in case firmware activation with reset finished successfully but was initiated by remote host. The function devlink_remote_reload_actions_performed() is exported to enable drivers update on remote reload actions performed as it was not initiated by their own devlink instance. Expose devlink remote reload stats to the user through devlink dev get command. Examples: $ devlink dev show pci/0000:82:00.0: stats: reload: driver_reinit 2 fw_activate 1 fw_activate_no_reset 0 remote_reload: driver_reinit 0 fw_activate 0 fw_activate_no_reset 0 pci/0000:82:00.1: stats: reload: driver_reinit 1 fw_activate 0 fw_activate_no_reset 0 remote_reload: driver_reinit 1 fw_activate 1 fw_activate_no_reset 0 $ devlink dev show -jp { "dev": { "pci/0000:82:00.0": { "stats": { "reload": { "driver_reinit": 2, "fw_activate": 1, "fw_activate_no_reset": 0 }, "remote_reload": { "driver_reinit": 0, "fw_activate": 0, "fw_activate_no_reset": 0 } } }, "pci/0000:82:00.1": { "stats": { "reload": { "driver_reinit": 1, "fw_activate": 0, "fw_activate_no_reset": 0 }, "remote_reload": { "driver_reinit": 1, "fw_activate": 1, "fw_activate_no_reset": 0 } } } } } Signed-off-by: Moshe Shemesh Reviewed-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit a254c264267e8746fb257806c166e54375cf9c06 Author: Moshe Shemesh Date: Wed Oct 7 09:00:45 2020 +0300 devlink: Add reload stats Add reload stats to hold the history per reload action type and limit. For example, the number of times fw_activate has been performed on this device since the driver module was added or if the firmware activation was performed with or without reset. Add devlink notification on stats update. Expose devlink reload stats to the user through devlink dev get command. Examples: $ devlink dev show pci/0000:82:00.0: stats: reload: driver_reinit 2 fw_activate 1 fw_activate_no_reset 0 pci/0000:82:00.1: stats: reload: driver_reinit 1 fw_activate 0 fw_activate_no_reset 0 $ devlink dev show -jp { "dev": { "pci/0000:82:00.0": { "stats": { "reload": { "driver_reinit": 2, "fw_activate": 1, "fw_activate_no_reset": 0 } } }, "pci/0000:82:00.1": { "stats": { "reload": { "driver_reinit": 1, "fw_activate": 0, "fw_activate_no_reset": 0 } } } } } Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit dc64cc7c63102ac78bac3cfbc00ef3abd7a3fdf3 Author: Moshe Shemesh Date: Wed Oct 7 09:00:44 2020 +0300 devlink: Add devlink reload limit option Add reload limit to demand restrictions on reload actions. Reload limits supported: no_reset: No reset allowed, no down time allowed, no link flap and no configuration is lost. By default reload limit is unspecified and so no constraints on reload actions are required. Some combinations of action and limit are invalid. For example, driver can not reinitialize its entities without any downtime. The no_reset reload limit will have usecase in this patchset to implement restricted fw_activate on mlx5. Have the uapi parameter of reload limit ready for future support of multiselection. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit ccdf07219da6bd1f43c6ddcde4c0e36993c7365a Author: Moshe Shemesh Date: Wed Oct 7 09:00:43 2020 +0300 devlink: Add reload action option to devlink reload command Add devlink reload action to allow the user to request a specific reload action. The action parameter is optional, if not specified then devlink driver re-init action is used (backward compatible). Note that when required to do firmware activation some drivers may need to reload the driver. On the other hand some drivers may need to reset the firmware to reinitialize the driver entities. Therefore, the devlink reload command returns the actions which were actually performed. Reload actions supported are: driver_reinit: driver entities re-initialization, applying devlink-param and devlink-resource values. fw_activate: firmware activate. command examples: $devlink dev reload pci/0000:82:00.0 action driver_reinit reload_actions_performed: driver_reinit $devlink dev reload pci/0000:82:00.0 action fw_activate reload_actions_performed: driver_reinit fw_activate Signed-off-by: Moshe Shemesh Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit 69d56e0ea0ee9c61fa70c144449945ebaedb9dfa Author: Moshe Shemesh Date: Wed Oct 7 09:00:42 2020 +0300 devlink: Change devlink_reload_supported() param type Change devlink_reload_supported() function to get devlink_ops pointer param instead of devlink pointer param. This change will be used in the next patch to check if devlink reload is supported before devlink instance is allocated. Signed-off-by: Moshe Shemesh Reviewed-by: Jakub Kicinski Reviewed-by: Jiri Pirko Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 45aefe3d2251e4e229d7662052739f96ad1d08d9 Author: Pali Rohár Date: Fri Oct 9 10:42:44 2020 +0200 ata: ahci: mvebu: Make SATA PHY optional for Armada 3720 Older ATF does not provide SMC call for SATA phy power on functionality and therefore initialization of ahci_mvebu is failing when older version of ATF is using. In this case phy_power_on() function returns -EOPNOTSUPP. This patch adds a new hflag AHCI_HFLAG_IGN_NOTSUPP_POWER_ON which cause that ahci_platform_enable_phys() would ignore -EOPNOTSUPP errors from phy_power_on() call. It fixes initialization of ahci_mvebu on Espressobin boards where is older Marvell's Arm Trusted Firmware without SMC call for SATA phy power. This is regression introduced in commit 8e18c8e58da64 ("arm64: dts: marvell: armada-3720-espressobin: declare SATA PHY property") where SATA phy was defined and therefore ahci_platform_enable_phys() on Espressobin started failing. Fixes: 8e18c8e58da64 ("arm64: dts: marvell: armada-3720-espressobin: declare SATA PHY property") Signed-off-by: Pali Rohár Tested-by: Tomasz Maciej Nowak Cc: # 5.1+: ea17a0f153af: phy: marvell: comphy: Convert internal SMCC firmware return codes to errno Signed-off-by: Jens Axboe commit 8858e8d98d5457ba23bcd0d99ce23e272b8b09a1 Author: Damien Le Moal Date: Fri Oct 9 18:07:14 2020 +0900 block: fix uapi blkzoned.h comments Update the kdoc comments for struct blk_zone (capacity field description missing) and for struct blk_zone_report (flags field description missing). Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 47ce030b7ac5a5259a9a5919f230b52497afc31a Author: Yang Yang Date: Fri Oct 9 01:00:14 2020 -0700 blk-mq: move cancel of hctx->run_work to the front of blk_exit_queue blk_exit_queue will free elevator_data, while blk_mq_run_work_fn will access it. Move cancel of hctx->run_work to the front of blk_exit_queue to avoid use-after-free. Fixes: 1b97871b501f ("blk-mq: move cancel of hctx->run_work into blk_mq_hw_sysfs_release") Signed-off-by: Yang Yang Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit c728152413312de6c95731a845d30c9ae735d656 Author: Yufen Yu Date: Thu Oct 8 23:26:33 2020 -0400 blk-mq: get rid of the dead flush handle code path After commit 923218f6166a ("blk-mq: don't allocate driver tag upfront for flush rq"), blk_mq_submit_bio() will call blk_insert_flush() directly to handle flush request rather than blk_mq_sched_insert_request() in the case of elevator. Then, all flush request either have set RQF_FLUSH_SEQ flag when call blk_mq_sched_insert_request(), or have inserted into hctx->dispatch. So, remove the dead code path. Signed-off-by: Yufen Yu Signed-off-by: Jens Axboe commit 0546858c59fb90122ca8c820e6aa221925a13bd8 Author: Yufen Yu Date: Thu Oct 8 23:26:32 2020 -0400 block: get rid of unnecessary local variable Since whole elevator register is protectd by sysfs_lock, we don't need extras 'has_elevator'. Just use q->elevator directly. Signed-off-by: Yufen Yu Signed-off-by: Jens Axboe commit f0c6ae09db1d39cbcf35776f889e0f7f861493d2 Author: Yufen Yu Date: Thu Oct 8 23:26:31 2020 -0400 block: fix comment and add lockdep assert After commit b89f625e28d4 ("block: don't release queue's sysfs lock during switching elevator"), whole elevator register and unregister function are covered by sysfs_lock. So, remove wrong comment and add lockdep assert. Signed-off-by: Yufen Yu Signed-off-by: Jens Axboe commit 0841031ab9a8fb2551880c24a8419997b8e834bc Author: Yufen Yu Date: Thu Oct 8 23:26:30 2020 -0400 blk-mq: use helper function to test hw stopped We have introduced helper function blk_mq_hctx_stopped() to test BLK_MQ_S_STOPPED. Signed-off-by: Yufen Yu Signed-off-by: Jens Axboe commit 75e6c00fc75c53577bfc4831d909162c56e799ce Author: Yufen Yu Date: Thu Oct 8 23:26:29 2020 -0400 block: use helper function to test queue register We have defined common interface blk_queue_registered() to test QUEUE_FLAG_REGISTERED. Just use it. Signed-off-by: Yufen Yu Signed-off-by: Jens Axboe commit 6251b754f5b29d44d088cc73f508d15ddfb8d978 Author: Yufen Yu Date: Thu Oct 8 23:26:28 2020 -0400 block: remove redundant mq check elv_support_iosched() will check queue_is_mq() for us. So, remove the redundant check to clean code. Signed-off-by: Yufen Yu Signed-off-by: Jens Axboe commit dd1c372d656600234a1704f456f9977ca684865c Author: Yufen Yu Date: Thu Oct 8 23:26:27 2020 -0400 block: invoke blk_mq_exit_sched no matter whether have .exit_sched We will register debugfs for scheduler no matter whether it have defined callback funciton .exit_sched. So, blk_mq_exit_sched() is always needed to unregister debugfs. Also, q->elevator should be set as NULL after exiting scheduler. For now, since all register scheduler have defined .exit_sched, it will not cause any actual problem. But It will be more reasonable to do this change. Signed-off-by: Yufen Yu Signed-off-by: Jens Axboe commit 7ea6bf2e6c409e245a31b9ac6a4ba24949ad442f Author: Ming Lei Date: Fri Oct 9 12:03:56 2020 +0800 percpu_ref: don't refer to ref->data if it isn't allocated We can't check ref->data->confirm_switch directly in __percpu_ref_exit(), since ref->data may not be allocated in one not-initialized refcount. Fixes: 2b0d3d3e4fcf ("percpu_ref: reduce memory footprint of percpu_ref in fast path") Reported-by: syzbot+fd15ff734dace9e16437@syzkaller.appspotmail.com Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit d662fad143c0470ad7f46ea7b02da539f613d7d7 Author: Chao Yu Date: Fri Oct 9 10:40:48 2020 +0800 f2fs: fix to set SBI_NEED_FSCK flag for inconsistent inode If compressed inode has inconsistent fields on i_compress_algorithm, i_compr_blocks and i_log_cluster_size, we missed to set SBI_NEED_FSCK to notice fsck to repair the inode, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b4210eab9164e3ea647b71e1049391177db9b215 Author: Yazen Ghannam Date: Fri Oct 9 17:18:03 2020 +0000 EDAC/amd64: Set proper family type for Family 19h Models 20h-2Fh AMD Family 19h Models 20h-2Fh use the same PCI IDs as Family 17h Models 70h-7Fh. The same family ops and number of channels also apply. Use the Family17h Model 70h family_type and ops for Family 19h Models 20h-2Fh. Update the controller name to match the system. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201009171803.3214354-1-Yazen.Ghannam@amd.com commit c2df75ad2a9f205820e4bc0db936d3d9af3da1ae Author: Christian Hewitt Date: Thu Oct 8 14:17:38 2020 +0000 drm/panfrost: increase readl_relaxed_poll_timeout values Amlogic SoC devices report the following errors frequently causing excessive dmesg log spam and early log rotataion, although the errors appear to be harmless as everything works fine: [ 7.202702] panfrost ffe40000.gpu: error powering up gpu L2 [ 7.203760] panfrost ffe40000.gpu: error powering up gpu shader ARM staff have advised increasing the timeout values to eliminate the errors in most normal scenarios, and testing with several different G31/G52 devices shows 20000 to be a reliable value. Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") Suggested-by: Steven Price Signed-off-by: Christian Hewitt Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20201008141738.13560-1-christianshewitt@gmail.com commit 76c37668768464a6c2d5c49abd36ba0b48a0b131 Author: Guillem Jover Date: Mon Sep 21 00:25:53 2020 +0200 builddeb: Add support for all required debian/rules targets These have been required by the Debian policy for a while, even though the tooling can detect and workaround their omission, but are a hard requirement when using rootless builds. [masahiro: The following Debian policy is particularly important for rootless builds: "Both binary-* targets should depend on the build target, or on the appropriate build-arch or build-indep target, so that the package is built if it has not been already." ] Signed-off-by: Guillem Jover Signed-off-by: Masahiro Yamada commit bf6a47644ea0928b2a6589ba9fb1221116d8bfaf Author: Håkon Bugge Date: Fri Oct 9 16:24:42 2020 +0200 IB/mlx4: Convert rej_tmout radix-tree to XArray Was missed during the initial review of the below patch Fixes: 227a0e142e37 ("IB/mlx4: Add support for REJ due to timeout") Link: https://lore.kernel.org/r/1602253482-6718-1-git-send-email-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit 6575aeab72e04396d5a674c2b6c1df51cb8a6051 Author: John Hubbard Date: Fri Oct 9 00:01:28 2020 -0700 Documentation: better locations for sysfs-pci, sysfs-tagging sysfs-pci and sysfs-tagging were mis-filed: their locations within Documentation/ implied that they were related to file systems. Actually, each topic is about a very specific *use* of sysfs, and sysfs *happens* to be a (virtual) filesystem, so this is not really the right place. It's jarring to be reading about filesystems in general and then come across these specific details about PCI, and tagging...and then back to general filesystems again. Move sysfs-pci to PCI, and move sysfs-tagging to networking. (Thanks to Jonathan Corbet for coming up with the final locations.) Signed-off-by: John Hubbard Link: https://lore.kernel.org/r/20201009070128.118639-1-jhubbard@nvidia.com Signed-off-by: Jonathan Corbet commit fd86194aca1f64df1c5fe2ed9e4c2a84f625ff48 Author: Bartlomiej Zolnierkiewicz Date: Thu Sep 24 13:22:51 2020 +0200 MAINTAINERS: remove LIBATA PATA DRIVERS entry Even though there is not much happening for libata PATA drivers I don't have time to look after them anymore. Since Jens is maintaining the whole libata anyway just remove "LIBATA PATA DRIVERS" entry. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jens Axboe commit 37198e93ced70733f0b993dff28b7c33857e254f Author: Davide Caratti Date: Tue Oct 6 18:26:17 2020 +0200 net: mptcp: make DACK4/DACK8 usage consistent among all subflows using packetdrill it's possible to observe the same MPTCP DSN being acked by different subflows with DACK4 and DACK8. This is in contrast with what specified in RFC8684 §3.3.2: if an MPTCP endpoint transmits a 64-bit wide DSN, it MUST be acknowledged with a 64-bit wide DACK. Fix 'use_64bit_ack' variable to make it a property of MPTCP sockets, not TCP subflows. Fixes: a0c1d0eafd1e ("mptcp: Use 32-bit DATA_ACK when possible") Acked-by: Paolo Abeni Signed-off-by: Davide Caratti Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 0da1ccbbefb662915228bc17e1c7d4ad28b3ddab Author: Marek Vasut Date: Tue Oct 6 15:52:53 2020 +0200 net: fec: Fix PHY init after phy_reset_after_clk_enable() The phy_reset_after_clk_enable() does a PHY reset, which means the PHY loses its register settings. The fec_enet_mii_probe() starts the PHY and does the necessary calls to configure the PHY via PHY framework, and loads the correct register settings into the PHY. Therefore, fec_enet_mii_probe() should be called only after the PHY has been reset, not before as it is now. Fixes: 1b0a83ac04e3 ("net: fec: add phy_reset_after_clk_enable() support") Reviewed-by: Andrew Lunn Tested-by: Richard Leitner Signed-off-by: Marek Vasut Cc: Christoph Niedermaier Cc: David S. Miller Cc: NXP Linux Team Cc: Shawn Guo Signed-off-by: Jakub Kicinski commit eca43ee6c46db92dd850ce659316b0680d70e137 Author: Nikita V. Shirokov Date: Fri Oct 9 07:03:25 2020 +0000 bpf: Add tcp_notsent_lowat bpf setsockopt Adding support for TCP_NOTSENT_LOWAT sockoption (https://lwn.net/Articles/560082/) in tcp bpf programs. Signed-off-by: Nikita V. Shirokov Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201009070325.226855-1-tehnerd@tehnerd.com commit 846e463a70e910f2a831aea19f9a361422a2ff5b Author: Eric Dumazet Date: Wed Oct 7 09:51:11 2020 -0700 net/sched: get rid of qdisc->padded kmalloc() of sufficiently big portion of memory is cache-aligned in regular conditions. If some debugging options are used, there is no reason qdisc structures would need 64-byte alignment if most other kernel structures are not aligned. This get rid of QDISC_ALIGN and QDISC_ALIGNTO. Addition of privdata field will help implementing the reverse of qdisc_priv() and documents where the private data is. Signed-off-by: Eric Dumazet Cc: Allen Pais Acked-by: Cong Wang Signed-off-by: Jakub Kicinski commit b7d96bca1f004b5f26ee51ea9c9749a28dac8316 Author: Luca Coelho Date: Fri Oct 9 12:21:23 2020 +0300 Revert "iwlwifi: remove wide_cmd_header field" This reverts commit 0a8159cbd11abf586693f1ec5264d0df587b71d8. It turns out that this flag is used by iwldvm, so we can't get rid of it. This broke iwldvm devices with BAD_COMMAND errors. Fixes: 0a8159cbd11a ("iwlwifi: remove wide_cmd_header field") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201009122123.3e4ee0ad7a71.Id6d95ae601f048aeb4d2ed63a1712e469da84369@changeid commit 79cd16681acccffcf5521f6e3d8c7c50aaffca0a Merge: b6bf0830a8084 b44c018cdf748 Author: Jens Axboe Date: Fri Oct 9 09:03:20 2020 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.10/drivers Pull MD updates from Song: "The main changes are: - Bug fixes in bitmap code, from Zhao Heming. - Fix a work queue check, from Guoqing Jiang. - Fix raid5 oops with reshape, from Song Liu. - Clean up unused code, from Jason Yan." * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid5: fix oops during stripe resizing md/bitmap: fix memory leak of temporary bitmap md: fix the checking of wrong work queue md/bitmap: md_bitmap_get_counter returns wrong blocks md/bitmap: md_bitmap_read_sb uses wrong bitmap blocks md/raid0: remove unused function is_io_in_chunk_boundary() commit 988731181359efd771ae967f94936906fa38868a Merge: d4f3a651ab826 855a40cd8cccf Author: Mark Brown Date: Fri Oct 9 16:01:22 2020 +0100 Merge remote-tracking branch 'spi/for-5.10' into spi-next commit d4f3a651ab82685c63e6fb38bec20b3ccf08c085 Merge: 549738f15da0e 45f0bbdafd26d Author: Mark Brown Date: Fri Oct 9 16:01:20 2020 +0100 Merge remote-tracking branch 'spi/for-5.9' into spi-linus commit 855a40cd8cccfbf5597adfa77f55cdc8c44b6e42 Author: Daniel Mack Date: Fri Oct 9 12:03:09 2020 +0200 spi: cadence: Add SPI transfer delays When processing an SPI transfer, honor the delay that might be passed along with it. Signed-off-by: Daniel Mack Link: https://lore.kernel.org/r/20201009100309.381279-1-daniel@zonque.org Signed-off-by: Mark Brown commit 5e2ed8c4f45093698855b1f45cdf43efbf6dd498 Author: Matthew Wilcox (Oracle) Date: Fri Oct 9 13:49:53 2020 +0100 io_uring: Convert advanced XArray uses to the normal API There are no bugs here that I've spotted, it's just easier to use the normal API and there are no performance advantages to using the more verbose advanced API. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Jens Axboe commit 236434c3438c4da3dfbd6aeeab807577b85e951a Author: Matthew Wilcox (Oracle) Date: Fri Oct 9 13:49:52 2020 +0100 io_uring: Fix XArray usage in io_uring_add_task_file The xas_store() wasn't paired with an xas_nomem() loop, so if it couldn't allocate memory using GFP_NOWAIT, it would leak the reference to the file descriptor. Also the node pointed to by the xas could be freed between the call to xas_load() under the rcu_read_lock() and the acquisition of the xa_lock. It's easier to just use the normal xa_load/xa_store interface here. Signed-off-by: Matthew Wilcox (Oracle) [axboe: fix missing assign after alloc, cur_uring -> tctx rename] Signed-off-by: Jens Axboe commit 3e8541803624678925a477a03e19e3c155b5fc12 Author: Guillem Jover Date: Mon Sep 21 00:25:54 2020 +0200 builddeb: Enable rootless builds This makes it possible to build the Debian packages without requiring (pseudo-)root privileges, when the build drivers support this mode of operation. See-Also: /usr/share/doc/dpkg/rootless-builds.txt.gz Signed-off-by: Guillem Jover Signed-off-by: Masahiro Yamada commit 51ccdbfbed79bae4b9c2529ec980de4508455a47 Author: Guillem Jover Date: Mon Sep 21 00:25:50 2020 +0200 builddeb: Pass -n to gzip for reproducible packages We should not be encoding the timestamp, otherwise we end up generating unreproducible files that cascade into unreproducible packages. Signed-off-by: Guillem Jover Signed-off-by: Masahiro Yamada commit 08beb669cb3f11ff5e05055bcab5e29385e69f98 Author: Masahiro Yamada Date: Fri Sep 25 00:45:46 2020 +0900 kbuild: split the build log of kallsyms Currently, the build log shows KSYM + object name. Precisely speaking, kallsyms generates a .S file and then the compiler compiles it into a .o file. Split the build log into two. [Before] GEN modules.builtin LD .tmp_vmlinux.kallsyms1 KSYM .tmp_vmlinux.kallsyms1.o LD .tmp_vmlinux.kallsyms2 KSYM .tmp_vmlinux.kallsyms2.o LD vmlinux [After] GEN modules.builtin LD .tmp_vmlinux.kallsyms1 KSYMS .tmp_vmlinux.kallsyms1.S AS .tmp_vmlinux.kallsyms1.o LD .tmp_vmlinux.kallsyms2 KSYMS .tmp_vmlinux.kallsyms2.S AS .tmp_vmlinux.kallsyms2.o LD vmlinux Signed-off-by: Masahiro Yamada commit a968433723310f35898b4a2f635a7991aeef66b1 Author: Bill Wendling Date: Tue Sep 22 16:21:40 2020 -0700 kbuild: explicitly specify the build id style ld's --build-id defaults to "sha1" style, while lld defaults to "fast". The build IDs are very different between the two, which may confuse programs that reference them. Signed-off-by: Bill Wendling Acked-by: David S. Miller Signed-off-by: Masahiro Yamada commit ce765372bc443573d1d339a2bf4995de385dea3a Author: Matthew Wilcox (Oracle) Date: Fri Oct 9 13:49:51 2020 +0100 io_uring: Fix use of XArray in __io_uring_files_cancel We have to drop the lock during each iteration, so there's no advantage to using the advanced API. Convert this to a standard xa_for_each() loop. Reported-by: syzbot+27c12725d8ff0bfe1a13@syzkaller.appspotmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Jens Axboe commit 96e503f9000f2ad17d550cd884a5e386eb7f532f Author: Takashi Iwai Date: Tue Oct 6 19:17:22 2020 +0300 ALSA: hda/i915 - fix list corruption with concurrent probes Current hdac_i915 uses a static completion instance to wait for i915 driver to complete the component bind. This design is not safe if multiple HDA controllers are active and communicating with different i915 instances, and can lead to list corruption and failed audio driver probe. Fix the design by moving completion mechanism to common acomp code and remove the related code from hdac_i915. Fixes: 7b882fe3e3e8 ("ALSA: hda - handle multiple i915 device instances") Co-developed-by: Kai Vehmanen Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20201006161722.500256-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit c890e30b069a2792a5a34e8510a7a437dd6f5b3d Merge: 7ffe09eebf732 86f29c7442ac4 Author: Mark Brown Date: Fri Oct 9 15:42:31 2020 +0100 Merge remote-tracking branch 'asoc/for-5.10' into asoc-next commit 7ffe09eebf732f9c95623613fb706dada858c07d Merge: 549738f15da0e ebb11d1d9fe2d Author: Mark Brown Date: Fri Oct 9 15:42:29 2020 +0100 Merge remote-tracking branch 'asoc/for-5.9' into asoc-linus commit c3f01fdcedf9459b2a27b22287414ab3a0d5d818 Author: Magnus Karlsson Date: Thu Oct 8 16:12:18 2020 +0200 xsk: Introduce padding between ring pointers Introduce one cache line worth of padding between the producer and consumer pointers in all the lockless rings. This so that the HW adjacency prefetcher will not prefetch the consumer pointer when the producer pointer is used and vice versa. This improves throughput performance for the l2fwd sample app with 2% on my machine with HW prefetching turned on. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1602166338-21378-1-git-send-email-magnus.karlsson@gmail.com commit bf109c64040f5b6bfe8a7044667e11d62dff6d91 Author: Max Reitz Date: Tue Apr 21 14:47:15 2020 +0200 fuse: implement crossmounts FUSE servers can indicate crossmount points by setting FUSE_ATTR_SUBMOUNT in fuse_attr.flags. The inode will then be marked as S_AUTOMOUNT, and the .d_automount implementation creates a new submount at that location, so that the submount gets a distinct st_dev value. Note that all submounts get a distinct superblock and a distinct st_dev value, so for virtio-fs, even if the same filesystem is mounted more than once on the host, none of its mount points will have the same st_dev. We need distinct superblocks because the superblock points to the root node, but the different host mounts may show different trees (e.g. due to submounts in some of them, but not in others). Right now, this behavior is only enabled when fuse_conn.auto_submounts is set, which is the case only for virtio-fs. Signed-off-by: Max Reitz Signed-off-by: Miklos Szeredi commit 86f29c7442ac4ba5fe19fc2ada457f76c0080dd6 Author: Mark Brown Date: Thu Oct 8 17:11:05 2020 +0100 ASoC: dmaengine: Document support for TX only or RX only streams We intentionally do not return an error if we get a permanent failure from dma_request_chan() in order to support systems which have TX only or RX only channels. Add a comment documenting this. Reported-by: Andy Shevchenko Signed-off-by: Mark Brown Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201008161105.21804-1-broonie@kernel.org Signed-off-by: Mark Brown commit b899e4fd7a331065d01ca14809c9e55f113f7d05 Author: Codrin Ciubotariu Date: Fri Oct 9 15:35:27 2020 +0300 ASoC: mchp-spdiftx: remove 'TX' from playback stream name Do not include the 'TX' in the stream name since it's obvious for playback. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20201009123527.2770629-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 39d43d164127da7fbc62d0ef73146e04e31a828d Author: Trond Myklebust Date: Wed Oct 7 18:24:18 2020 -0400 NFSv4: Use the net namespace uniquifier if it is set If a container sets a net namespace specific uniquifier, then use that in the setclientid/exchangeid process. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 1aee551334cda1fed8b8112dbe38257397a55c78 Author: Trond Myklebust Date: Wed Oct 7 18:24:17 2020 -0400 NFSv4: Clean up initialisation of uniquified client id strings When the user sets a uniquifier, then ensure we copy the string so that calls to strlen() etc are atomic with calls to snprintf(). Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 6c8cf369517640edcb4305b38a27f592a54b7bbe Author: Wesley Cheng Date: Thu Oct 8 16:59:31 2020 -0700 usb: typec: Add QCOM PMIC typec detection driver The QCOM SPMI typec driver handles the role and orientation detection, and notifies client drivers using the USB role switch framework. It registers as a typec port, so orientation can be communicated using the typec switch APIs. The driver also attains a handle to the VBUS output regulator, so it can enable/disable the VBUS source when acting as a host/device. Signed-off-by: Wesley Cheng Acked-by: Heikki Krogerus Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20201008235934.8931-2-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 41f0666f0f60997dea10e716df728f330525052e Author: Fan Fei Date: Thu Oct 8 20:55:24 2020 +0200 staging: rtl8188eu: Fix long lines This patch fix long lines found by checkpatch. Signed-off-by: Fan Fei Link: https://lore.kernel.org/r/20201008185524.brl467kucslxoxci@ubuntu-T470 Signed-off-by: Greg Kroah-Hartman commit 936452941cbec2b2f51cb6b7e5ac1d9b3081c6c1 Author: Krzysztof Wilczyński Date: Tue Sep 22 19:49:32 2020 +0000 PCI: iproc: Fix using plain integer as NULL pointer in iproc_pcie_pltfm_probe Fix sparse build warning: drivers/pci/controller/pcie-iproc-platform.c:102:33: warning: Using plain integer as NULL pointer The map_irq member of the struct iproc_pcie takes a function pointer serving as a callback to map interrupts, therefore we should pass a NULL pointer to it rather than a integer in the iproc_pcie_pltfm_probe() function. Related: commit b64aa11eb2dd ("PCI: Set bridge map_irq and swizzle_irq to default functions") Link: https://lore.kernel.org/r/20200922194932.465925-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 3b1954cd57bf7648417c593d60eac1ec661ad514 Author: Lad Prabhakar Date: Tue Oct 6 09:19:10 2020 +0100 dt-bindings: pwm: renesas,pwm-rcar: Add r8a7742 support Document RZ/G1H (R8A7742) SoC bindings. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Acked-by: Uwe Kleine-König Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Acked-by: Rob Herring Signed-off-by: Thierry Reding commit 6a78dfb8facadef74bdf5af5ed84f6c722299fbb Author: Lad Prabhakar Date: Tue Oct 6 09:19:09 2020 +0100 dt-bindings: pwm: renesas,tpu-pwm: Document r8a7742 support Document r8a7742 specific compatible strings. No driver change is needed as the fallback compatible string "renesas,tpu" activates the right code in the driver. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 7fe94612dd4cfcd35fe0ec87745fb31ad2be71f8 Author: Xin Long Date: Thu Oct 8 16:13:24 2020 +0800 xfrm: interface: fix the priorities for ipip and ipv6 tunnels As Nicolas noticed in his case, when xfrm_interface module is installed the standard IP tunnels will break in receiving packets. This is caused by the IP tunnel handlers with a higher priority in xfrm interface processing incoming packets by xfrm_input(), which would drop the packets and return 0 instead when anything wrong happens. Rather than changing xfrm_input(), this patch is to adjust the priority for the IP tunnel handlers in xfrm interface, so that the packets would go to xfrmi's later than the others', as the others' would not drop the packets when the handlers couldn't process them. Note that IPCOMP also defines its own IPIP tunnel handler and it calls xfrm_input() as well, so we must make its priority lower than xfrmi's, which means having xfrmi loaded would still break IPCOMP. We may seek another way to fix it in xfrm_input() in the future. Reported-by: Nicolas Dichtel Tested-by: Nicolas Dichtel Fixes: da9bbf0598c9 ("xfrm: interface: support IPIP and IPIP6 tunnels processing with .cb_handler") FIxes: d7b360c2869f ("xfrm: interface: support IP6IP6 and IP6IP tunnels processing with .cb_handler") Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit d13027bb35e089bc1bb9f19c4976decf32a09b97 Author: Will Deacon Date: Fri Oct 9 11:24:17 2020 +0100 Revert "arm64: initialize per-cpu offsets earlier" This reverts commit 353e228eb355be5a65a3c0996c774a0f46737fda. Qian Cai reports that TX2 no longer boots with his .config as it appears that task_cpu() gets instrumented and used before KASAN has been initialised. Although Mark has a proposed fix, let's take the safe option of reverting this for now and sorting it out properly later. Link: https://lore.kernel.org/r/711bc57a314d8d646b41307008db2845b7537b3d.camel@redhat.com Reported-by: Qian Cai Tested-by: Mark Rutland Signed-off-by: Will Deacon commit 01361b665a26ef0c087e53f14cf310d1cfe0cf98 Author: Christian Brauner Date: Fri Oct 9 11:52:22 2020 +0200 tests: remove O_NONBLOCK before waiting for WSTOPPED Naresh reported that selftests: pidfd: pidfd_wait hangs on linux next kernel on x86_64, i386 and arm64 Juno-r2 These devices are using NFS mounted rootfs. I have tested pidfd testcases independently and all test PASS. The Hang or exit from test run noticed when run by run_kselftest.sh pidfd_wait.c:208:wait_nonblock:Expected sys_waitid(P_PIDFD, pidfd, &info, WSTOPPED, NULL) (-1) == 0 (0) wait_nonblock: Test terminated by assertion metadata: git branch: master git repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git commit: e64997027d5f171148687e58b78c8b3c869a6158 git describe: next-20200922 make_kernelversion: 5.9.0-rc6 kernel-config: http://snapshots.linaro.org/openembedded/lkft/lkft/sumo/intel-core2-32/lkft/linux-next/865/config The reason for this is a simple race in the selftests, that I overlooked and which is more likely to hit when there's a lot of processes running on the system. Basically the child process hasn't SIGSTOPed itself yet but the parent is already calling waitid() on a O_NONBLOCK pidfd. Since it doesn't find a WSTOPPED process it returns -EAGAIN correctly. The fix for this is to move the line where we're removing the O_NONBLOCK property from the fd before the waitid() WSTOPPED call so we hang until the child becomes stopped. Fixes: cd89597bbe5a ("tests: add waitid() tests for non-blocking pidfds") Reported-by: Naresh Kamboju Tested-by: Naresh Kamboju Link: https://lkft.validation.linaro.org/scheduler/job/1813223 Signed-off-by: Christian Brauner commit 316a1bef0d1622410c9f0f301173d0a03168ce37 Author: Ye Bin Date: Fri Oct 9 16:05:52 2020 +0800 9p/xen: Fix format argument warning Fix follow warnings: [net/9p/trans_xen.c:454]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'. [net/9p/trans_xen.c:460]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'. Link: http://lkml.kernel.org/r/20201009080552.89918-1-yebin10@huawei.com Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Dominique Martinet commit 1e23400f1a7342a2805cc647e6314cd12bfb5526 Author: Faiz Abbas Date: Thu Oct 8 15:31:29 2020 +0530 mmc: sdhci_am654: Fix module autoload Add a MODULE_DEVICE_TABLE() entry so that the driver is autoloaded when built as a module. Signed-off-by: Faiz Abbas Link: https://lore.kernel.org/r/20201008100129.13917-1-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 937fb531d3b7da1f5686ee7e1b6f6ac5f5cbbcb0 Merge: db1af1e971292 4243219141b67 Author: Ulf Hansson Date: Fri Oct 9 08:58:30 2020 +0200 Merge branch 'fixes' into next commit 2116d708b0580c0048fc80b82ec4b53f4ddaa166 Merge: d6c4c11348816 0ce0c78eff7d2 Author: Ingo Molnar Date: Fri Oct 9 08:46:53 2020 +0200 Merge branch 'lkmm' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/core Pull LKMM changes for v5.10 from Paul E. McKenney. Various documentation updates. Signed-off-by: Ingo Molnar commit d6c4c11348816fb4d16e33bf47d559d7aa59350a Merge: e705d39796581 cd290ec24633f Author: Ingo Molnar Date: Fri Oct 9 08:35:01 2020 +0200 Merge branch 'kcsan' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/core Pull KCSAN updates for v5.10 from Paul E. McKenney: - Improve kernel messages. - Be more permissive with bitops races under KCSAN_ASSUME_PLAIN_WRITES_ATOMIC=y. - Optimize debugfs stat counters. - Introduce the instrument_*read_write() annotations, to provide a finer description of certain ops - using KCSAN's compound instrumentation. Use them for atomic RNW and bitops, where appropriate. Doing this might find new races. (Depends on the compiler having tsan-compound-read-before-write=1 support.) - Support atomic built-ins, which will help certain architectures, such as s390. - Misc enhancements and smaller fixes. Signed-off-by: Ingo Molnar commit e705d397965811ac528d7213b42d74ffe43caf38 Merge: d89d5f855f84c baffd723e44dc Author: Ingo Molnar Date: Fri Oct 9 08:55:17 2020 +0200 Merge branch 'locking/urgent' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit 6561e0aa4627da90f59076fec5e3a1b72a8aa63f Author: Ondrej Jirman Date: Wed Jul 1 20:46:40 2020 +0200 MAINTAINERS: Update entry for st7703 driver after the rename The driver was renamed, change the path in the MAINTAINERS file. Signed-off-by: Ondrej Jirman Signed-off-by: Daniel Vetter Link: https://lore.kernel.org/lkml/20200701184640.1674969-1-megous@megous.com/#t commit baffd723e44dc3d7f84f0b8f1fe1ece00ddd2710 Author: Peter Zijlstra Date: Mon Oct 5 09:56:57 2020 +0200 lockdep: Revert "lockdep: Use raw_cpu_*() for per-cpu variables" The thinking in commit: fddf9055a60d ("lockdep: Use raw_cpu_*() for per-cpu variables") is flawed. While it is true that when we're migratable both CPUs will have a 0 value, it doesn't hold that when we do get migrated in the middle of a raw_cpu_op(), the old CPU will still have 0 by the time we get around to reading it on the new CPU. Luckily, the reason for that commit (s390 using preempt_disable() instead of preempt_disable_notrace() in their percpu code), has since been fixed by commit: 1196f12a2c96 ("s390: don't trace preemption in percpu macros") An audit of arch/*/include/asm/percpu*.h shows there are no other architectures affected by this particular issue. Fixes: fddf9055a60d ("lockdep: Use raw_cpu_*() for per-cpu variables") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20201005095958.GJ2651@hirez.programming.kicks-ass.net commit 4d004099a668c41522242aa146a38cc4eb59cb1e Author: Peter Zijlstra Date: Fri Oct 2 11:04:21 2020 +0200 lockdep: Fix lockdep recursion Steve reported that lockdep_assert*irq*(), when nested inside lockdep itself, will trigger a false-positive. One example is the stack-trace code, as called from inside lockdep, triggering tracing, which in turn calls RCU, which then uses lockdep_assert_irqs_disabled(). Fixes: a21ee6055c30 ("lockdep: Change hardirq{s_enabled,_context} to per-cpu variables") Reported-by: Steven Rostedt Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar commit 2bb8945bcc1a768f2bc402a16c9610bba8d5187d Author: Peter Zijlstra Date: Wed Sep 30 11:49:37 2020 +0200 lockdep: Fix usage_traceoverflow Basically print_lock_class_header()'s for loop is out of sync with the the size of of ->usage_traces[]. Also clean things up a bit while at it, to avoid such mishaps in the future. Fixes: 23870f122768 ("locking/lockdep: Fix "USED" <- "IN-NMI" inversions") Reported-by: Qian Cai Debugged-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Qian Cai Link: https://lkml.kernel.org/r/20200930094937.GE2651@hirez.programming.kicks-ass.net commit b36c830f8c9b13bfe69b117e879153776c19ad82 Merge: 583090b1b8232 6fe208f63a79f Author: Ingo Molnar Date: Fri Oct 9 08:21:56 2020 +0200 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull v5.10 RCU changes from Paul E. McKenney: - Debugging for smp_call_function(). - Strict grace periods for KASAN. The point of this series is to find RCU-usage bugs, so the corresponding new RCU_STRICT_GRACE_PERIOD Kconfig option depends on both DEBUG_KERNEL and RCU_EXPERT, and is further disabled by dfefault. Finally, the help text includes a goodly list of scary caveats. - New smp_call_function() torture test. - Torture-test updates. - Documentation updates. - Miscellaneous fixes. Signed-off-by: Ingo Molnar commit b44c018cdf748b96b676ba09fdbc5b34fc443ada Author: Song Liu Date: Mon Oct 5 09:35:21 2020 -0700 md/raid5: fix oops during stripe resizing KoWei reported crash during raid5 reshape: [ 1032.252932] Oops: 0002 [#1] SMP PTI [...] [ 1032.252943] RIP: 0010:memcpy_erms+0x6/0x10 [...] [ 1032.252947] RSP: 0018:ffffba1ac0c03b78 EFLAGS: 00010286 [ 1032.252949] RAX: 0000784ac0000000 RBX: ffff91bec3d09740 RCX: 0000000000001000 [ 1032.252951] RDX: 0000000000001000 RSI: ffff91be6781c000 RDI: 0000784ac0000000 [ 1032.252953] RBP: ffffba1ac0c03bd8 R08: 0000000000001000 R09: ffffba1ac0c03bf8 [ 1032.252954] R10: 0000000000000000 R11: 0000000000000000 R12: ffffba1ac0c03bf8 [ 1032.252955] R13: 0000000000001000 R14: 0000000000000000 R15: 0000000000000000 [ 1032.252958] FS: 0000000000000000(0000) GS:ffff91becf500000(0000) knlGS:0000000000000000 [ 1032.252959] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1032.252961] CR2: 0000784ac0000000 CR3: 000000031780a002 CR4: 00000000001606e0 [ 1032.252962] Call Trace: [ 1032.252969] ? async_memcpy+0x179/0x1000 [async_memcpy] [ 1032.252977] ? raid5_release_stripe+0x8e/0x110 [raid456] [ 1032.252982] handle_stripe_expansion+0x15a/0x1f0 [raid456] [ 1032.252988] handle_stripe+0x592/0x1270 [raid456] [ 1032.252993] handle_active_stripes.isra.0+0x3cb/0x5a0 [raid456] [ 1032.252999] raid5d+0x35c/0x550 [raid456] [ 1032.253002] ? schedule+0x42/0xb0 [ 1032.253006] ? schedule_timeout+0x10e/0x160 [ 1032.253011] md_thread+0x97/0x160 [ 1032.253015] ? wait_woken+0x80/0x80 [ 1032.253019] kthread+0x104/0x140 [ 1032.253022] ? md_start_sync+0x60/0x60 [ 1032.253024] ? kthread_park+0x90/0x90 [ 1032.253027] ret_from_fork+0x35/0x40 This is because cache_size_mutex was unlocked too early in resize_stripes, which races with grow_one_stripe() that grow_one_stripe() allocates a stripe with wrong pool_size. Fix this issue by unlocking cache_size_mutex after updating pool_size. Cc: # v4.4+ Reported-by: KoWei Sung Signed-off-by: Song Liu commit 1383b347a8ae4a69c04ae3746e6cb5c8d38e2585 Author: Zhao Heming Date: Sun Sep 27 13:40:13 2020 +0800 md/bitmap: fix memory leak of temporary bitmap Callers of get_bitmap_from_slot() are responsible to free the bitmap. Suggested-by: Guoqing Jiang Signed-off-by: Zhao Heming Signed-off-by: Song Liu commit cf0b9b4821a2955f8a23813ef8f422208ced9bd7 Author: Guoqing Jiang Date: Thu Oct 8 05:19:09 2020 +0200 md: fix the checking of wrong work queue It should check md_rdev_misc_wq instead of md_misc_wq. Fixes: cc1ffe61c026 ("md: add new workqueue for delete rdev") Cc: # v5.8+ Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit d837f7277f56e70d82b3a4a037d744854e62f387 Author: Zhao Heming Date: Tue Oct 6 00:00:24 2020 +0800 md/bitmap: md_bitmap_get_counter returns wrong blocks md_bitmap_get_counter() has code: ``` if (bitmap->bp[page].hijacked || bitmap->bp[page].map == NULL) csize = ((sector_t)1) << (bitmap->chunkshift + PAGE_COUNTER_SHIFT - 1); ``` The minus 1 is wrong, this branch should report 2048 bits of space. With "-1" action, this only report 1024 bit of space. This bug code returns wrong blocks, but it doesn't inflence bitmap logic: 1. Most callers focus this function return value (the counter of offset), not the parameter blocks. 2. The bug is only triggered when hijacked is true or map is NULL. the hijacked true condition is very rare. the "map == null" only true when array is creating or resizing. 3. Even the caller gets wrong blocks, current code makes caller just to call md_bitmap_get_counter() one more time. Signed-off-by: Zhao Heming Signed-off-by: Song Liu commit a913096decbf4101271e7d87b9affb1454bb7676 Author: Zhao Heming Date: Tue Oct 6 00:00:23 2020 +0800 md/bitmap: md_bitmap_read_sb uses wrong bitmap blocks The patched code is used to get chunks number, should use round-up div to replace current sector_div. The same code is in md_bitmap_resize(): ``` chunks = DIV_ROUND_UP_SECTOR_T(blocks, 1 << chunkshift); ``` Signed-off-by: Zhao Heming Signed-off-by: Song Liu commit d7a1c483f797fb92c091e66b6a6e941f766b84e0 Author: Jason Yan Date: Tue Sep 29 14:47:59 2020 +0800 md/raid0: remove unused function is_io_in_chunk_boundary() This function is no longger needed after commit 20d0189b1012 ("block: Introduce new bio_split()"). Signed-off-by: Jason Yan Signed-off-by: Song Liu commit f6322f3f1212e005e7e6aa82ceb62be53030a64b Author: Eric Biggers Date: Thu Oct 8 12:15:22 2020 -0700 f2fs: reject CASEFOLD inode flag without casefold feature syzbot reported: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 0 PID: 6860 Comm: syz-executor835 Not tainted 5.9.0-rc8-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:utf8_casefold+0x43/0x1b0 fs/unicode/utf8-core.c:107 [...] Call Trace: f2fs_init_casefolded_name fs/f2fs/dir.c:85 [inline] __f2fs_setup_filename fs/f2fs/dir.c:118 [inline] f2fs_prepare_lookup+0x3bf/0x640 fs/f2fs/dir.c:163 f2fs_lookup+0x10d/0x920 fs/f2fs/namei.c:494 __lookup_hash+0x115/0x240 fs/namei.c:1445 filename_create+0x14b/0x630 fs/namei.c:3467 user_path_create fs/namei.c:3524 [inline] do_mkdirat+0x56/0x310 fs/namei.c:3664 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 [...] The problem is that an inode has F2FS_CASEFOLD_FL set, but the filesystem doesn't have the casefold feature flag set, and therefore super_block::s_encoding is NULL. Fix this by making sanity_check_inode() reject inodes that have F2FS_CASEFOLD_FL when the filesystem doesn't have the casefold feature. Reported-by: syzbot+05139c4039d0679e19ff@syzkaller.appspotmail.com Fixes: 2c2eb7a300cd ("f2fs: Support case-insensitive file name lookups") Signed-off-by: Eric Biggers Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 48046cb55d208eae67259887b29b3097bcf44caf Author: Jaegeuk Kim Date: Wed Oct 7 11:14:35 2020 -0700 f2fs: fix memory alignment to support 32bit In 32bit system, 64-bits key breaks memory alignment. This fixes the commit "f2fs: support 64-bits key in f2fs rb-tree node entry". Reported-by: Nicolas Chauvet Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ed6930c9201cd1e00f74474da2f095796a0d82f6 Author: Jens Axboe Date: Thu Oct 8 19:09:46 2020 -0600 io_uring: fix break condition for __io_uring_register() waiting Colin reports that there's unreachable code, since we only ever break if ret == 0. This is correct, and is due to a reversed logic condition in when to break or not. Break out of the loop if we don't process any task work, in that case we do want to return -EINTR. Fixes: af9c1a44f8de ("io_uring: process task work in io_uring_register()") Reported-by: Colin Ian King Signed-off-by: Jens Axboe commit 915f4c9358db6f96f08934dd683ae297aaa0fb91 Author: Chengguang Xu Date: Mon Oct 5 15:15:50 2020 +0800 erofs: remove unnecessary enum entries Opt_nouser_xattr and Opt_noacl are useless, so just remove them. Signed-off-by: Chengguang Xu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20201005071550.66193-1-cgxu519@mykernel.net Signed-off-by: Gao Xiang commit 036dfd8322be5214cbc19a0bdcab5a72763c6dcd Author: Matthieu Baerts Date: Tue Oct 6 18:06:30 2020 +0200 selftests: mptcp: interpret \n as a new line In case of errors, this message was printed: (...) balanced bwidth with unbalanced delay 5233 max 5005 [ fail ] client exit code 0, server 0 \nnetns ns3-0-EwnkPH socket stat for 10003: (...) Obviously, the idea was to add a new line before the socket stat and not print "\nnetns". The commit 8b974778f998 ("selftests: mptcp: interpret \n as a new line") is very similar to this one. But the modification in simult_flows.sh was missed because this commit above was done in parallel to one here below. Fixes: 1a418cb8e888 ("mptcp: simult flow self-tests") Signed-off-by: Matthieu Baerts Acked-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit de997e545df4d7c61f7fe7e7cd12650abff8642d Author: Vladimir Oltean Date: Tue Oct 6 18:02:48 2020 +0300 net: mscc: ocelot: add missing VCAP ES0 and IS1 regmaps for VSC7514 Without these definitions, the driver will crash in: mscc_ocelot_probe -> ocelot_init -> ocelot_vcap_init -> __ocelot_target_read_ix I missed this because I did not have the VSC7514 hardware to test, only the VSC9959 and VSC9953, and the probing part is different. Fixes: e3aea296d86f ("net: mscc: ocelot: add definitions for VCAP ES0 keys, actions and target") Fixes: a61e365d7c18 ("net: mscc: ocelot: add definitions for VCAP IS1 keys, actions and target") Reported-by: Divya Koppera Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit d9fb8c507d42256034b457ec59347855bec9e569 Author: Paolo Abeni Date: Tue Oct 6 08:27:34 2020 +0200 mptcp: fix infinite loop on recvmsg()/worker() race. If recvmsg() and the workqueue race to dequeue the data pending on some subflow, the current mapping for such subflow covers several skbs and some of them have not reached yet the received, either the worker or recvmsg() can find a subflow with the data_avail flag set - since the current mapping is valid and in sequence - but no skbs in the receive queue - since the other entity just processed them. The above will lead to an unbounded loop in __mptcp_move_skbs() and a subsequent hang of any task trying to acquiring the msk socket lock. This change addresses the issue stopping the __mptcp_move_skbs() loop as soon as we detect the above race (empty receive queue with data_avail set). Reported-and-tested-by: syzbot+fcf8ca5817d6e92c6567@syzkaller.appspotmail.com Fixes: ab174ad8ef76 ("mptcp: move ooo skbs into msk out of order queue.") Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 0eb484ee49c90581af87152df43a119cbe7a2e5f Author: Allen Pais Date: Tue Oct 6 11:23:32 2020 +0530 cxgb4: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Jakub Kicinski commit de55412d02a2c7554053a19dc98addd88c8c3c2a Author: Bob Pearson Date: Thu Oct 8 16:27:53 2020 -0500 RDMA/rxe: Fix bug rejecting all multicast packets Fix a bug in rxe_rcv() that causes all multicast packets to be dropped. Currently rxe_match_dgid() is called for each packet to verify that the destination IP address matches one of the entries in the port source GID table. This is incorrect for IP multicast addresses since they do not appear in the GID table. Add code to detect multicast addresses. Change function name to rxe_chk_dgid() which is clearer. Link: https://lore.kernel.org/r/20201008212753.265249-1-rpearson@hpe.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit e7ec96fc7932f48a6d6cdd05bf82004a1a04285b Author: Bob Pearson Date: Thu Oct 8 15:36:52 2020 -0500 RDMA/rxe: Fix skb lifetime in rxe_rcv_mcast_pkt() The changes referenced below replaced sbk_clone)_ by taking additional references, passing the skb along and then freeing the skb. This deleted the packets before they could be processed and additionally passed bad data in each packet. Since pkt is stored in skb->cb changing pkt->qp changed it for all the packets. Replace skb_get() by sbk_clone() in rxe_rcv_mcast_pkt() for cases where multiple QPs are receiving multicast packets on the same address. Delete kfree_skb() because the packets need to live until they have been processed by each QP. They are freed later. Fixes: 86af61764151 ("IB/rxe: remove unnecessary skb_clone") Fixes: fe896ceb5772 ("IB/rxe: replace refcount_inc with skb_get") Link: https://lore.kernel.org/r/20201008203651.256958-1-rpearson@hpe.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 1858d98b83940f7a0132569a2cf2017a0063e5d0 Author: Bob Pearson Date: Thu Oct 8 16:28:18 2020 -0500 RDMA/rxe: Remove duplicate entries in struct rxe_mr Struct rxe_mem had pd, lkey and rkey values both in itself and in the struct ib_mr which is also included in rxe_mem. Delete these entries and replace references with the ones in ibmr.Add mr_pd, mr_lkey and mr_rkey macros which extract these values from mr. Link: https://lore.kernel.org/r/20201008212818.265303-1-rpearson@hpe.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit fd15dd0586896392f6f29daa5b9eeb6c1b18df6a Author: Johannes Berg Date: Wed Oct 7 12:53:51 2020 +0200 ethtool: correct policy for ETHTOOL_MSG_CHANNELS_SET This accidentally got wired up to the *get* policy instead of the *set* policy, causing operations to be rejected. Fix it by wiring up the correct policy instead. Fixes: 5028588b62cb ("ethtool: wire up set policies to ops") Reported-by: Leon Romanovsky Signed-off-by: Johannes Berg Tested-by: Leon Romanovsky Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit db972e5325183df1265bf851b32dc7530dd4393a Author: Johannes Berg Date: Wed Oct 7 12:53:50 2020 +0200 ethtool: strset: allow ETHTOOL_A_STRSET_COUNTS_ONLY attr The ETHTOOL_A_STRSET_COUNTS_ONLY flag attribute was previously not allowed to be used, but now due to the policy size reduction we would access the tb[] array out of bounds since we tried to check for the attribute despite it not being accepted. Fix both issues by adding it correctly to the appropriate policy. Fixes: ff419afa4310 ("ethtool: trim policy tables") Fixes: 71921690f974 ("ethtool: provide string sets with STRSET_GET request") Reported-by: Leon Romanovsky Signed-off-by: Johannes Berg Tested-by: Leon Romanovsky Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit 411643e949f4e616f758e2c6079f333b0e704c49 Author: Harley A.W. Lorenzo Date: Mon Oct 5 04:44:17 2020 +0000 power: supply: test-power: revise parameter printing to use sprintf Simplify code by using sprintf instead of strcpy+strcat+strlen. Signed-off-by: Harley A.W. Lorenzo Suggested-by: Joe Perches Signed-off-by: Sebastian Reichel commit 9d49aea13f1e35869158abe7e314e16dc8f50ff1 Merge: 9faebeb2d8006 3fdd47c3b40ac Author: Jakub Kicinski Date: Thu Oct 8 15:44:50 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Small conflict around locking in rxrpc_process_event() - channel_lock moved to bundle in next, while state lock needs _bh() from net. Signed-off-by: Jakub Kicinski commit 10a4357f4aebb30d20fe5f0297930b292862fed9 Author: Colin Ian King Date: Wed Sep 2 14:31:17 2020 +0100 power: supply: charger-manager: fix incorrect check on charging_duration_ms Currently the duration check on the discharging duration setting is checking the charging duration rather than the discharging duration due to a cut-n-paste coding error. Fix this by checking the value desc->charging_max_duration_ms. Addresses-Coverity: ("Copy-paste-error") Fixes: 8fcfe088e21a ("charger-manager: Support limit of maximum possible") Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel commit 7f977e64370dad07b01601bb2ba959678a149ff3 Author: Iskren Chernev Date: Mon Oct 5 23:00:38 2020 +0300 power: supply: max17040: Fix ptr to enum cast clang complains about casting pointers to smaller enum types. Reported-by: kernel test robot Signed-off-by: Iskren Chernev Signed-off-by: Sebastian Reichel commit ca4e2ac20f938c372b83d1cb16ec00f7c89191df Author: Serge Semin Date: Thu Oct 8 02:55:09 2020 +0300 spi: dw: Add Baikal-T1 SPI Controller bindings These controllers are based on the DW APB SSI IP-core and embedded into the SoC, so two of them are equipped with IRQ, DMA, 64 words FIFOs and 4 native CS, while another one as being utilized by the Baikal-T1 System Boot Controller has got a very limited resources: no IRQ, no DMA, only a single native chip-select and just 8 bytes Tx/Rx FIFOs available. That's why we have to mark the IRQ to be optional for the later interface. The SPI controller embedded into the Baikal-T1 System Boot Controller can be also used to directly access an external SPI flash by means of a dedicated FSM. The corresponding MMIO region availability is switchable by the embedded multiplexor, which phandle can be specified in the dts node. * We added a new example to test out the non-standard Baikal-T1 System Boot SPI Controller DT binding. Co-developed-by: Ramil Zaripov Signed-off-by: Ramil Zaripov Signed-off-by: Serge Semin Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201007235511.4935-21-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit abf00907538e21c469a10809dc2991982673fcbf Author: Serge Semin Date: Thu Oct 8 02:55:10 2020 +0300 spi: dw: Add Baikal-T1 SPI Controller glue driver Baikal-T1 is equipped with three DW APB SSI-based MMIO SPI controllers. Two of them are pretty much normal: with IRQ, DMA, FIFOs of 64 words depth, 4x CSs, but the third one as being a part of the Baikal-T1 System Boot Controller has got a very limited resources: no IRQ, no DMA, only a single native chip-select and Tx/Rx FIFO with just 8 words depth available. In order to provide a transparent initial boot code execution the Boot SPI controller is also utilized by an vendor-specific IP-block, which exposes an SPI flash direct mapping interface. Since both direct mapping and SPI controller normal utilization are mutual exclusive only one of these interfaces can be used to access an external SPI slave device. That's why a dedicated mux is embedded into the System Boot Controller. All of that is taken into account in the Baikal-T1-specific DW APB SSI glue driver implemented by means of the DW SPI core module. Co-developed-by: Ramil Zaripov Signed-off-by: Ramil Zaripov Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-22-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 14345c33461bc2373bc4f75f40baf4650e95ee54 Author: Serge Semin Date: Thu Oct 8 02:55:08 2020 +0300 spi: dw: Add poll-based SPI transfers support A functionality of the poll-based transfer has been removed by commit 1ceb09717e98 ("spi: dw: remove cs_control and poll_mode members from chip_data") with a justification that "there is no user of one anymore". It turns out one of our DW APB SSI core is synthesized with no IRQ line attached and the only possible way of using it is to implement a poll-based SPI transfer procedure. So we have to get the removed functionality back, but with some alterations described below. First of all the poll-based transfer is activated only if the DW SPI controller doesn't have an IRQ line attached and the Linux IRQ number is initialized with the IRQ_NOTCONNECTED value. Secondly the transfer procedure is now executed with a delay performed between writer and reader methods. The delay value is calculated based on the number of data words expected to be received on the current iteration. Finally the errors status is checked on each iteration. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-20-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 84ecaf4a7837e8c0957a59d77fd7e8e4926968cb Author: Serge Semin Date: Thu Oct 8 02:55:07 2020 +0300 spi: dw: Introduce max mem-ops SPI bus frequency setting In some circumstances the current implementation of the SPI memory operations may occasionally fail even though they are executed in the atomic context. This may happen if the system bus is relatively slow in comparison to the SPI bus frequency, or there is a concurrent access to it, which makes the MMIO-operations occasionally stalling before push-pulling data from the DW APB SPI FIFOs. These two problems we've discovered on the Baikal-T1 SoC. In order to fix them we have no choice but to set an artificial limitation on the SPI bus speed. Note currently this limitation will be only applicable for the memory operations, since the standard SPI core interface is implemented with an assumption that there is no problem with the automatic CS toggling. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-19-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 6423207e57ea53826eaae1a14c14fd6d22561b06 Author: Serge Semin Date: Thu Oct 8 02:55:06 2020 +0300 spi: dw: Add memory operations support Aside from the synchronous Tx-Rx mode, which has been utilized to create the normal SPI transfers in the framework of the DW SSI driver, DW SPI controller supports Tx-only and EEPROM-read modes. The former one just enables the controller to transmit all the data from the Tx FIFO ignoring anything retrieved from the MISO lane. The later mode is so called write-then-read operation: DW SPI controller first pushes out all the data from the Tx FIFO, after that it'll automatically receive as much data as has been specified by means of the CTRLR1 register. Both of those modes can be used to implement the memory operations supported by the SPI-memory subsystem. The memory operation implementation is pretty much straightforward, except a few peculiarities we have had to take into account to make things working. Since DW SPI controller doesn't provide a way to directly set and clear the native CS lane level, but instead automatically de-asserts it when a transfer going on, we have to make sure the Tx FIFO isn't empty during entire Tx procedure. In addition we also need to read data from the Rx FIFO as fast as possible to prevent it' overflow with automatically fetched incoming traffic. The denoted peculiarities get to cause even more problems if DW SSI controller is equipped with relatively small FIFO and is connected to a relatively slow system bus (APB) (with respect to the SPI bus speed). In order to workaround the problems for as much as it's possible, the memory operation execution procedure collects all the Tx data into a single buffer and disables the local IRQs to speed the write-then-optionally-read method up. Note the provided memory operations are utilized by default only if a glue driver hasn't provided a custom version of ones and this is not a DW APB SSI controller with fixed automatic CS toggle functionality. Co-developed-by: Ramil Zaripov Signed-off-by: Ramil Zaripov Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-18-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit bf64b66036eef7d5a92fb1cb7398ef67a29fc64b Author: Serge Semin Date: Thu Oct 8 02:55:05 2020 +0300 spi: dw: Add generic DW SSI status-check method The DW SSI errors handling method can be generically implemented for all types of the transfers: IRQ, DMA and poll-based ones. It will be a function which checks the overflow/underflow error flags and resets the controller if any of them is set. In the framework of this commit we make use of the new method to detect the errors in the IRQ- and DMA-based SPI transfer execution procedures. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-17-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit cf75baeac72c7cb57a8cf781e90cfd8ea77f2d51 Author: Serge Semin Date: Thu Oct 8 02:55:04 2020 +0300 spi: dw: Move num-of retries parameter to the header file The parameter will be needed for another wait-done method being added in the framework of the SPI memory operation modification in a further commit. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-16-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 49d7d695ca4bb2f62290c7039c4165556f0ca1e4 Author: Serge Semin Date: Thu Oct 8 02:55:03 2020 +0300 spi: dw: Explicitly de-assert CS on SPI transfer completion By design of the currently available native set_cs callback, the CS de-assertion will be done only if it's required by the corresponding controller capability. But in order to pre-fill the Tx FIFO buffer with data during the SPI memory ops execution the SER register needs to be left cleared before that. We'll also need a way to explicitly set and clear the corresponding CS bit at a certain moment of the operation. Let's alter the set_cs function then to also de-activate the CS, when it's required. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-15-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit fbddc989a5c441099978aad320ada0d5327309f4 Author: Serge Semin Date: Thu Oct 8 02:55:02 2020 +0300 spi: dw: De-assert chip-select on reset SPI memory operations implementation will require to have the CS register cleared before executing the operation in order not to have the transmission automatically started prior the Tx FIFO is pre-initialized. Let's clear the register then on explicit controller reset to fulfil the requirements in case of an error or having the CS left set by a bootloader or another software. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-14-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit c6cb3815f70d39e377bec6b44d25f2d8b68b324e Author: Serge Semin Date: Thu Oct 8 02:55:01 2020 +0300 spi: dw: Discard chip enabling on DMA setup error It's pointless to enable the chip back if the DMA setup procedure fails, since we'll disable it on the next transfer anyway. For the same reason We don't do that in case of a failure detected in any other methods called from the transfer_one() method. While at it consider any non-zero value returned from the dma_setup callback to be erroneous as it's supposed to be in the kernel. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-13-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit da8f58909e7e047a01e4577807e648482672eddd Author: Serge Semin Date: Thu Oct 8 02:55:00 2020 +0300 spi: dw: Unmask IRQs after enabling the chip It's theoretically erroneous to enable IRQ before the chip is turned on. If IRQ handler gets executed before the chip is enabled, then any data written to the Tx FIFO will be just ignored. I say "theoretically" because we haven't noticed any problem with that, but let's fix it anyway just in case... Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-12-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 82d02944d238a6fdac729d135623b1d88ca8cbd6 Author: Serge Semin Date: Thu Oct 8 02:54:59 2020 +0300 spi: dw: Perform IRQ setup in a dedicated function In order to make the transfer_one() callback method more readable and for unification with the DMA-based transfer, let's detach the IRQ setup procedure into a dedicated function. While at it rename the IRQ-based transfer handler function to be dw_spi-prefixe and looking more like the DMA-related one. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-11-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit ddcc2733c1591c137f7ce60f24ba5401c295427f Author: Serge Semin Date: Thu Oct 8 02:54:58 2020 +0300 spi: dw: Refactor IRQ-based SPI transfer procedure Current IRQ-based SPI transfer execution procedure doesn't work well at the final stage of the execution. If all the Tx data is sent out (written to the Tx FIFO) but there is some data left to receive, the Tx FIFO Empty IRQ will constantly happen until all of the requested inbound data is received. Though for a short period of time, but it will make the system less responsive. In order to fix that let's refactor the SPI transfer execution procedure by taking the Rx FIFO Full IRQ into account. We'll read and write SPI transfer data each time the IRQ happens as before. If all the outbound data is sent out, we'll disable the Tx FIFO Empty IRQ. If there is still some data to receive, we'll adjust the Rx FIFO Threshold level, so the next IRQ would be raised at the moment of all incoming data being available in the Rx FIFO. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-10-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 8dedbeac8ab24d2da9271df2c8291971169846f2 Author: Serge Semin Date: Thu Oct 8 02:54:57 2020 +0300 spi: dw: Refactor data IO procedure The Tx and Rx data write/read procedure can be significantly simplified by using Tx/Rx transfer lengths instead of the end pointers. By having the Tx/Rx data leftover lengths (in the number of transfer words) we can get rid of all subtraction and division operations utilized here and there in the tx_max(), rx_max(), dw_writer() and dw_reader() methods. Such modification will not only give us the more optimized IO procedures, but will make the data IO methods much more readable than before. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-9-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 3ff60c6b644e2002e062ed97825ead19e31c2769 Author: Serge Semin Date: Thu Oct 8 02:54:56 2020 +0300 spi: dw: Add DW SPI controller config structure DW APB SSI controller can be used by the two SPI core interfaces: traditional SPI transfers and SPI memory operations. The controller needs to be accordingly configured at runtime when the corresponding operations are executed. In order to do that for the both interfaces from a single function we introduce a new data wrapper for the transfer mode, data width, number of data frames (for the automatic data transfer) and the bus frequency. It will be used by the update_config() method to tune the DW APB SSI up. The update_config() method is made exported to be used not only by the DW SPI core driver, but by the glue layer drivers too. This will be required in a coming further commit. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-8-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 2613d2bfbeacea2bc796a54219ba05385ae7436a Author: Serge Semin Date: Thu Oct 8 02:54:55 2020 +0300 spi: dw: Update Rx sample delay in the config function Rx sample delay can be SPI device specific, and should be synchronously initialized with the rest of the communication and peripheral device related controller setups. So let's move the Rx-sample delay setup into the DW APB SSI configuration update method. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-7-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit c449ad7425aa2eb58f275ce977130918827b0d20 Author: Serge Semin Date: Thu Oct 8 02:54:54 2020 +0300 spi: dw: Simplify the SPI bus speed config procedure The code currently responsible for the SPI communication speed setting up is a bit messy. Most likely for some historical reason the bus frequency is saved in the peripheral chip private data. It's pointless now since the custom communication speed is a SPI-transfer-specific thing and only if there is no SPI transfer data specified (like during the SPI memory operations) it can be taken from the SPI device structure. But even in the later case there is no point in having the clock divider and the SPI bus frequency saved in the chip data, because the controller can be used for both SPI-transfer-based and SPI-transfer-less communications. From software point of view keeping the current clock divider in an SPI-device specific storage may give a small performance gain (to avoid sometimes a round-up division), but in comparison to the total SPI transfer time it just doesn't worth saving a few CPU cycles in comparison to the total SPI transfer time while having the harder to read code. The only optimization, which could worth preserving in the code is to avoid unnecessary DW SPI controller registers update if it's possible. So to speak let's simplify the SPI communication speed update procedure by removing the clock-related fields from the peripheral chip data and update the DW SPI clock divider only if it's really changed. The later change is reached by keeping the effective SPI bus speed in the internal DW SPI private data. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-6-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit f76f3142c5fc90f67794f6649cecec86a6eb87b0 Author: Serge Semin Date: Thu Oct 8 02:54:53 2020 +0300 spi: dw: Update SPI bus speed in a config function The SPI bus speed update functionality will be useful in another parts of the driver too (like to implement the SPI memory operations and from the DW SPI glue layers). Let's move it to the update_cr0() method then and since the later is now updating not only the CTRLR0 register alter its prototype to have a generic function name not related to CR0. Leave the too long line with the chip->clk_div setting as is for now, since it's going to be changed later anyway. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit a3577bd8cba554f962b6af082eb43dde7fe7cd09 Author: Serge Semin Date: Thu Oct 8 02:54:52 2020 +0300 spi: dw: Detach SPI device specific CR0 config method Indeed there is no point in detecting the SPI peripheral device parameters and initializing the CR0 register fields each time an SPI transfer is executed. Instead let's define a dedicated CR0 chip-data member, which will be initialized in accordance with the SPI device settings at the moment of setting it up. By doing so we'll finally make the SPI device chip_data serving as it's supposed to - to preserve the SPI device specific DW SPI configuration. See spi-fsl-dspi.c, spi-pl022.c, spi-pxa2xx.c drivers for example of the way the chip data is utilized. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-4-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit d6bbd1193fe93b7ee037724553b3574dcb48e6da Author: Serge Semin Date: Thu Oct 8 02:54:51 2020 +0300 spi: dw: Add DWC SSI capability Currently DWC SSI core is supported by means of setting up the core-specific update_cr0() callback. It isn't suitable for multiple reasons. First of all having exported several methods doing the same thing but for different chips makes the code harder to maintain. Secondly the spi-dw-core driver exports the methods, then the spi-dw-mmio driver sets the private data callback with one of them so to be called by the core driver again. That makes the code logic too complicated. Thirdly using callbacks for just updating the CR0 register is problematic, since in case if the register needed to be updated from different parts of the code, we'd have to create another callback (for instance the SPI device-specific parameters don't need to be calculated each time the SPI transfer is submitted, so it's better to pre-calculate the CR0 data at the SPI-device setup stage). So keeping all the above in mind let's discard the update_cr0() callbacks, define a generic and static dw_spi_update_cr0() method and create the DW_SPI_CAP_DWC_SSI capability, which when enabled would activate the alternative CR0 register layout. While at it add the comments to the code path of the normal DW APB SSI controller setup to make the dw_spi_update_cr0() method looking coherent. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-3-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit f68fe8de360b9c441caf22f35557b4c9fd97dd84 Author: Serge Semin Date: Thu Oct 8 02:54:50 2020 +0300 spi: dw: Use an explicit set_cs assignment Simplify the dw_spi_add_host() method a bit by replacing the currently implemented default set_cs callback setting up and later having it overwritten by a custom function with direct if-else-based callback assignment. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201007235511.4935-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit d4fbca833b72cb58297df35a32cce77cd6409707 Author: Dan Murphy Date: Tue Oct 6 12:30:07 2020 -0500 power: supply: bq25980: Fix uninitialized wd_reg_val Fix the uninitialized wd_reg_val if the for..loop was not successful in finding an appropriate match. Fixes: 5069185fc18e ("power: supply: bq25980: Add support for the BQ259xx family") Reported-by: kernel test robot Signed-off-by: Dan Murphy Signed-off-by: Sebastian Reichel commit 804a892456b73604b7ecfb1b00a96a29f3d2aedf Author: Hanks Chen Date: Thu Jul 30 21:30:16 2020 +0800 clk: mediatek: add UART0 clock support Add MT6779 UART0 clock support. Fixes: 710774e04861 ("clk: mediatek: Add MT6779 clock support") Signed-off-by: Wendell Lin Signed-off-by: Hanks Chen Reviewed-by: Matthias Brugger Signed-off-by: Stephen Boyd commit 4b464bad37c65492f03fe6cc15bdb6a9a6a5f5e7 Author: Colin Ian King Date: Tue Oct 6 18:06:00 2020 +0100 power: supply: bq25980: remove redundant zero check on ret Currently ret is assigned to zero and the following statement checks if it is non-zero. This check is redundant and can be removed Addresses-Coverity: ("Logically dead code") Fixes: 5069185fc18e ("power: supply: bq25980: Add support for the BQ259xx family") Signed-off-by: Colin Ian King Acked-by: Dan Murphy Signed-off-by: Sebastian Reichel commit 13ba4c434422837d7c8c163f9c8d854e67bf3c99 Author: Marc Kleine-Budde Date: Thu Oct 8 23:23:10 2020 +0200 net: j1939: j1939_session_fresh_new(): fix missing initialization of skbcnt This patch add the initialization of skbcnt, similar to: e009f95b1543 can: j1935: j1939_tp_tx_dat_new(): fix missing initialization of skbcnt Let's play save and initialize this skbcnt as well. Suggested-by: Jakub Kicinski Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Marc Kleine-Budde commit ec871696b77767672cae1fe3158dbe1a86abcfdd Author: Lars Povlsen Date: Tue Oct 6 22:03:15 2020 +0200 power: reset: ocelot: Add support for Sparx5 This adds reset support for Sparx5 in the ocelot-reset driver. Signed-off-by: Lars Povlsen Signed-off-by: Sebastian Reichel commit 312e95c6e92122fac0251a84efa1cf3914c877a6 Author: Lars Povlsen Date: Tue Oct 6 22:03:14 2020 +0200 dt-bindings: reset: ocelot: Add Sparx5 support This adds the support for the Sparx5 SoC. Signed-off-by: Lars Povlsen Acked-by: Rob Herring Signed-off-by: Sebastian Reichel commit e009f95b1543e26606dca2f7e6e9f0f9174538e5 Author: Cong Wang Date: Wed Oct 7 23:18:21 2020 -0700 can: j1935: j1939_tp_tx_dat_new(): fix missing initialization of skbcnt This fixes an uninit-value warning: BUG: KMSAN: uninit-value in can_receive+0x26b/0x630 net/can/af_can.c:650 Reported-and-tested-by: syzbot+3f3837e61a48d32b495f@syzkaller.appspotmail.com Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Cc: Robin van der Gracht Cc: Oleksij Rempel Cc: Pengutronix Kernel Team Cc: Oliver Hartkopp Cc: Marc Kleine-Budde Signed-off-by: Cong Wang Link: https://lore.kernel.org/r/20201008061821.24663-1-xiyou.wangcong@gmail.com Signed-off-by: Marc Kleine-Budde commit fc709df553a34fd18010f52e6b47652268d83e7d Author: Andy Shevchenko Date: Mon Oct 5 12:56:22 2020 +0300 gpiolib: Update header block in gpiolib-cdev.h The dev_t is defined in types.h while struct gpio_device forward declaration is missed. Take into account above and update header block in gpiolib-cdev.h. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201005095622.73616-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit f188ac1251b909c2d804a6fee54e4e360754c92f Author: Kent Gibson Date: Mon Oct 5 15:02:46 2020 +0800 gpiolib: cdev: switch from kstrdup() to kstrndup() Use kstrndup() to copy line labels from the userspace provided char array, rather than ensuring the char array contains a null terminator and using kstrdup(). Note that the length provided to kstrndup() still assumes that the char array does contain a null terminator, so the maximum string length is one less than the array. This is consistent with the previous behaviour. Suggested-by: Andy Shevchenko Signed-off-by: Kent Gibson Link: https://lore.kernel.org/r/20201005070246.20927-1-warthog618@gmail.com Signed-off-by: Linus Walleij commit 8c270fbceba4e13c992ac138e51db217c4844ed6 Author: Mauro Carvalho Chehab Date: Fri Oct 2 07:49:50 2020 +0200 docs: gpio: add a new document to its index.rst There's now a new ReST file. Add it to the index.rst file. Fixes: ce7a2f77f976 ("docs: gpio: Add GPIO Aggregator documentation") Fixes: 2fd1abe99e5f ("Documentation: gpio: add documentation for gpio-mockup") Signed-off-by: Mauro Carvalho Chehab Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/bad4d85c218d59c1bf69157df8e1012577680d88.1601616399.git.mchehab+huawei@kernel.org Signed-off-by: Linus Walleij commit 1ef16a407f544408d3559e4de2ed05591df4da75 Author: Colin Ian King Date: Thu Oct 8 19:32:39 2020 +0100 scsi: qla2xxx: Fix return of uninitialized value in rval A previous change removed the initialization of rval and there is now an error where an uninitialized rval is being returned on an error return path. Fix this by returning -ENODEV. Link: https://lore.kernel.org/r/20201008183239.200358-1-colin.king@canonical.com Fixes: b994718760fa ("scsi: qla2xxx: Use constant when it is known") Reviewed-by: Himanshu Madhani Acked-by: Pavel Machek (CIP) Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Uninitialized scalar variable") commit b6ba9b0e201a1c36972143366a3c22e672c43a61 Author: Christoph Hellwig Date: Thu Oct 8 22:06:11 2020 +0200 scsi: core: Set sc_data_direction to DMA_NONE for no-transfer commands No having the special DMA_NONE logic makes libata rather unhappy. Link: https://lore.kernel.org/r/20201008200611.1818099-3-hch@lst.de Fixes: 40b93836a136 ("scsi: core: Use rq_dma_dir in scsi_setup_cmnd()") Reported-by: Qian Cai Reported-by: Naresh Kamboju Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 9120ac54cce6c37de7580d7567119d28c8988ebc Author: Christoph Hellwig Date: Thu Oct 8 22:06:10 2020 +0200 scsi: sr: Initialize ->cmd_len Ensure the command length is properly set. Previously the command code tried to find this out using the command opcode. Link: https://lore.kernel.org/r/20201008200611.1818099-2-hch@lst.de Fixes: 2ceda20f0a99 ("scsi: core: Move command size detection out of the fast path") Reported-by: Qian Cai Reported-by: Naresh Kamboju Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit dfe719fef03d752f1682fa8aeddf30ba501c8555 Author: Jann Horn Date: Mon Oct 5 03:44:01 2020 +0200 seccomp: Make duplicate listener detection non-racy Currently, init_listener() tries to prevent adding a filter with SECCOMP_FILTER_FLAG_NEW_LISTENER if one of the existing filters already has a listener. However, this check happens without holding any lock that would prevent another thread from concurrently installing a new filter (potentially with a listener) on top of the ones we already have. Theoretically, this is also a data race: The plain load from current->seccomp.filter can race with concurrent writes to the same location. Fix it by moving the check into the region that holds the siglock to guard against concurrent TSYNC. (The "Fixes" tag points to the commit that introduced the theoretical data race; concurrent installation of another filter with TSYNC only became possible later, in commit 51891498f2da ("seccomp: allow TSYNC and USER_NOTIF together").) Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Reviewed-by: Tycho Andersen Signed-off-by: Jann Horn Signed-off-by: Kees Cook Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201005014401.490175-1-jannh@google.com commit 282a181b1a0d66de1f0894d82f395fcd478f51d1 Author: YiFei Zhu Date: Thu Sep 24 07:44:16 2020 -0500 seccomp: Move config option SECCOMP to arch/Kconfig In order to make adding configurable features into seccomp easier, it's better to have the options at one single location, considering especially that the bulk of seccomp code is arch-independent. An quick look also show that many SECCOMP descriptions are outdated; they talk about /proc rather than prctl. As a result of moving the config option and keeping it default on, architectures arm, arm64, csky, riscv, sh, and xtensa did not have SECCOMP on by default prior to this and SECCOMP will be default in this change. Architectures microblaze, mips, powerpc, s390, sh, and sparc have an outdated depend on PROC_FS and this dependency is removed in this change. Suggested-by: Jann Horn Link: https://lore.kernel.org/lkml/CAG48ez1YWz9cnp08UZgeieYRhHdqh-ch7aNwc4JRBnGyrmgfMg@mail.gmail.com/ Signed-off-by: YiFei Zhu [kees: added HAVE_ARCH_SECCOMP help text, tweaked wording] Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/9ede6ef35c847e58d61e476c6a39540520066613.1600951211.git.yifeifz2@illinois.edu commit e953aeaa913bedcdabc168276ef41c83ae75f161 Author: Kees Cook Date: Sat Sep 12 04:08:19 2020 -0700 selftests/clone3: Avoid OS-defined clone_args As the UAPI headers start to appear in distros, we need to avoid outdated versions of struct clone_args to be able to test modern features, named "struct __clone_args". Additionally update the struct size macro names to match UAPI names. Acked-by: Christian Brauner Link: https://lore.kernel.org/lkml/20200921075432.u4gis3s2o5qrsb5g@wittgenstein/ Signed-off-by: Kees Cook commit 34257a72697c5bb79458fe80a51937dc06b02e73 Merge: def69f21f547c 41bceb1272164 Author: Mark Brown Date: Thu Oct 8 21:16:54 2020 +0100 Merge series "ASoC: stm32: dfsdm: change rate limits" from Olivier Moysan : Widening of the supported rate range in the STM32 DFSDM driver. The rates were previously limited to 8kHz, 16kHz and 32kHz. Allow rate capture in the whole range 8kHz-48kHz as there is no hardware limitation to support it. Actual sample resolution is dependent on audio rate and DFSDM configuration. Add a trace to allow simple check of sample resolution. Olivier Moysan (2): ASoC: stm32: dfsdm: change rate limits ASoC: stm32: dfsdm: add actual resolution trace drivers/iio/adc/stm32-dfsdm-adc.c | 4 ++++ drivers/iio/adc/stm32-dfsdm.h | 2 ++ sound/soc/stm/stm32_adfsdm.c | 8 +++----- 3 files changed, 9 insertions(+), 5 deletions(-) -- 2.17.1 commit def69f21f547c8730ac01356deb88c5e7653ed77 Merge: 18096cb0bcff1 2ad63dc8df6b6 Author: Mark Brown Date: Thu Oct 8 21:16:53 2020 +0100 Merge series "Qualcomm's lpass-hdmi ASoC driver to support audio over dp port" from Srinivasa Rao Mandadapu : These patches are to support audio over DP port on Qualcomm's SC7180 LPASS Asoc. It includes machine driver, cpu driver, platform driver updates for HDMI path support, device tree documention, lpass variant structure optimization and configuration changes. These patches depends on the DP patch series https://patchwork.kernel.org/project/dri-devel/list/?series=332029 https://lore.kernel.org/patchwork/project/lkml/list/?series=464856 changes since V10: -- Moved hdmi regmap functions from lpass-hdmi.c to lpass-cpu.c -- Moved QCOM_REGMAP_FIELD_ALLOC macro from lpass-hdmi.c to lpass.h changes since V9: -- Removed unused structures lpass_hdmi.h changes since V8: -- Removed redundant structure wrapper for reg map field memebrs -- Updated lpass_hdmi_regmap_volatile API with appropriate registers as true and others as false. changes since V7: -- Fixed typo errors -- Created Separate patch for buffer size change changes since V6: -- Removed compile time define flag, which used for enabling HDMI code, based on corresponding config param is included. -- Updated reg map alloc API with reg map bulk API. -- Removed unnecessary line splits changes since V5: -- Removed unused struct regmap *map in lpass_platform_alloc_hdmidmactl_fields. -- DMA alloc and free API signature change in lpass-apq8016.c, lpass-ipq806x.c -- Keeping API "irqreturn_t lpass_platform_hdmiif_irq" under ifdef macro Changes Since v4: -- Updated with single compatible node for both I2S and HDMI. Changes Since v3: -- Removed id in lpass variant structure and used snd_soc_dai_driver id. Changes Since v2: -- Audio buffer size(i.e. LPASS_PLATFORM_BUFFER_SIZE) in lpass-platform.c increased. Changes Since v1: -- Commit messages are updated -- Addressed Rob Herring review comments V Sujith Kumar Reddy (7): ASoC: Add sc7180-lpass binding header hdmi define ASoC: dt-bindings: Add dt binding for lpass hdmi Asoc:qcom:lpass-cpu:Update dts property read API Asoc: qcom: lpass:Update lpaif_dmactl members order ASoC: qcom: Add support for lpass hdmi driver Asoc: qcom: lpass-platform : Increase buffer size ASoC: qcom: sc7180: Add support for audio over DP .../devicetree/bindings/sound/qcom,lpass-cpu.yaml | 74 ++-- include/dt-bindings/sound/sc7180-lpass.h | 1 + sound/soc/qcom/Kconfig | 5 + sound/soc/qcom/Makefile | 2 + sound/soc/qcom/lpass-apq8016.c | 4 +- sound/soc/qcom/lpass-cpu.c | 249 ++++++++++++- sound/soc/qcom/lpass-hdmi.c | 258 ++++++++++++++ sound/soc/qcom/lpass-hdmi.h | 102 ++++++ sound/soc/qcom/lpass-ipq806x.c | 4 +- sound/soc/qcom/lpass-lpaif-reg.h | 49 ++- sound/soc/qcom/lpass-platform.c | 395 +++++++++++++++++---- sound/soc/qcom/lpass-sc7180.c | 116 +++++- sound/soc/qcom/lpass.h | 124 ++++++- 13 files changed, 1240 insertions(+), 143 deletions(-) create mode 100644 sound/soc/qcom/lpass-hdmi.c create mode 100644 sound/soc/qcom/lpass-hdmi.h -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project. commit a39caac02f2f5819d39f37d7987babe19fcafe21 Author: Kees Cook Date: Fri Sep 11 19:49:50 2020 -0700 selftests/seccomp: powerpc: Set syscall return during ptrace syscall exit Some archs (like powerpc) only support changing the return code during syscall exit when ptrace is used. Test entry vs exit phases for which portions of the syscall number and return values need to be set at which different phases. For non-powerpc, all changes are made during ptrace syscall entry, as before. For powerpc, the syscall number is changed at ptrace syscall entry and the syscall return value is changed on ptrace syscall exit. Reported-by: Thadeu Lima de Souza Cascardo Suggested-by: Thadeu Lima de Souza Cascardo Link: https://lore.kernel.org/linux-kselftest/20200911181012.171027-1-cascardo@canonical.com/ Fixes: 58d0a862f573 ("seccomp: add tests for ptrace hole") Acked-by: Christian Brauner Link: https://lore.kernel.org/lkml/20200921075300.7iylzof2w5vrutah@wittgenstein/ Signed-off-by: Kees Cook commit 18096cb0bcff1ebf4459ea5f6dc940d8eaf4b942 Author: Peter Ujfalusi Date: Thu Oct 8 11:54:00 2020 +0300 ASoC: ti: davinci-mcasp: Use &pdev->dev for early dev_warn At this point mcasp->dev is not initialized and we would have NULL pointer dereference if we would have failed to get the mem memory resource by name. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20201008085400.19944-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 827ed8a0fa50bdd365c9f4c9f6ef561ca7032e49 Author: Dan Murphy Date: Wed Oct 7 10:53:41 2020 -0500 ASoC: tas2764: Add the driver for the TAS2764 Introduce the Texas Instruments TAS2764 amplifier driver with I/V sense for loud speaker applications. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20201007155341.10139-2-dmurphy@ti.com Signed-off-by: Mark Brown commit 696bef70438359c1be333b62b2d879953768450d Author: Dan Murphy Date: Wed Oct 7 10:53:40 2020 -0500 dt-bindings: tas2764: Add the TAS2764 binding doc Add the binding for the TAS2764 Smart Amplifier. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20201007155341.10139-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 56a53ece74e4a5d47f6915f6b81623cec5151f09 Author: Cezary Rojewski Date: Wed Oct 7 15:57:01 2020 +0200 ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency catpt selects DW_DMAC_CORE which requires DMADEVICES. Fix unmet direct dependencies warning by updating driver's depends-on list. Fixes: 6cbfa11d2694 ("ASoC: Intel: Select catpt and deprecate haswell") Reported-by: Randy Dunlap Signed-off-by: Cezary Rojewski Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20201007135701.20372-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit f38d43dafb0ccd85034fe22647d353ee8be03ab6 Author: Cezary Rojewski Date: Wed Oct 7 15:57:00 2020 +0200 ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled module_is_live() is available only when CONFIG_MODULES is enabled. Replace its usage with try_module_get() which is present regardless of said config's status. Fixes: 7a10b66a5df9 ("ASoC: Intel: catpt: Device driver lifecycle") Reported-by: Randy Dunlap Signed-off-by: Cezary Rojewski Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20201007135701.20372-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit bef71f86b64de8b2eb5b2f26e1cbd7735e3551da Author: Kees Cook Date: Sat Sep 19 00:21:34 2020 -0700 selftests/seccomp: Allow syscall nr and ret value to be set separately In preparation for setting syscall nr and ret values separately, refactor the helpers to take a pointer to a value, so that a NULL can indicate "do not change this respective value". This is done to keep the regset read/write happening once and in one code path. Acked-by: Christian Brauner Link: https://lore.kernel.org/lkml/20200921075031.j4gruygeugkp2zwd@wittgenstein/ Signed-off-by: Kees Cook commit 71c87fbe720038007543abff7540ef0376c519f5 Author: Kees Cook Date: Sat Sep 19 00:14:31 2020 -0700 selftests/seccomp: Record syscall during ptrace entry In preparation for performing actions during ptrace syscall exit, save the syscall number during ptrace syscall entry. Some architectures do no have the syscall number available during ptrace syscall exit. Suggested-by: Thadeu Lima de Souza Cascardo Link: https://lore.kernel.org/linux-kselftest/20200911181012.171027-1-cascardo@canonical.com/ Acked-by: Christian Brauner Link: https://lore.kernel.org/lkml/20200921074354.6shkt2e5yhzhj3sn@wittgenstein/ Signed-off-by: Kees Cook commit 41bceb1272164ee2a6fd1ac3bed97043c94b6636 Author: Olivier Moysan Date: Wed Oct 7 17:34:59 2020 +0200 ASoC: stm32: dfsdm: add actual resolution trace Add a trace to report actual resolution of audio samples. Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20201007153459.22155-3-olivier.moysan@st.com Signed-off-by: Mark Brown commit 6101bf71192f543799a796274e160f7dfc10f2d2 Author: Olivier Moysan Date: Wed Oct 7 17:34:58 2020 +0200 ASoC: stm32: dfsdm: change rate limits The DFSDM can support a larger rate range than currently supported in driver. Increase rate upper limit to 48kHz and allow all rates in the range 8kHz to 48kHz. Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20201007153459.22155-2-olivier.moysan@st.com Signed-off-by: Mark Brown commit 1a3f7813f38e400b0b63492b626b425f0a043d0b Author: Hans de Goede Date: Thu Oct 8 21:38:30 2020 +0200 MAINTAINERS: update X86 PLATFORM DRIVERS entry with new kernel.org git repo The pdx86 maintainers have moved their git tree from infradead.org to kernel.org, update the X86 PLATFORM DRIVERS MAINTAINERS entry for this. Signed-off-by: Hans de Goede commit 848183553e431e6e9c2ea2f72421a7a1bbc6532e Author: Steven Rostedt (VMware) Date: Wed Oct 7 10:34:34 2020 -0400 tracing: Fix synthetic print fmt check for use of __get_str() A cut and paste error had the check to use __get_str() test "is_dynamic" twice, instead of checking "is_string && is_dynamic". Link: https://lore.kernel.org/r/d34dccd5-96ba-a2d9-46ea-de8807525deb@canonical.com Reported-by: Colin Ian King Acked-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 43aa422c0c07135236bd91cbb45b048fd85e73b5 Author: Sudip Mukherjee Date: Wed Sep 30 19:43:03 2020 +0100 tracing: Remove a pointless assignment The variable 'len' has been assigned a value but is not used after that. So, remove the assignement. Link: https://lkml.kernel.org/r/20200930184303.22896-1-sudipm.mukherjee@gmail.com Signed-off-by: Sudip Mukherjee Signed-off-by: Steven Rostedt (VMware) commit 40dc4a42b97ef5a52ef34a73093a7992faaab15e Author: Wei Yang Date: Mon Aug 31 11:11:04 2020 +0800 ftrace: ftrace_global_list is renamed to ftrace_ops_list Fix the comment to comply with the code. Link: https://lkml.kernel.org/r/20200831031104.23322-7-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Steven Rostedt (VMware) commit 7ba031e8b74c6aa156a0d9867dc13cf817d52047 Author: Steven Rostedt (VMware) Date: Mon Oct 5 20:37:41 2020 -0400 ftrace: Format variable declarations of ftrace_allocate_records I hate when unrelated variables are declared on the same line. Split them. Signed-off-by: Steven Rostedt (VMware) commit b40c6eabfcd409e022fcb377ac268e3ef9446fde Author: Wei Yang Date: Mon Aug 31 11:11:02 2020 +0800 ftrace: Simplify the calculation of page number for ftrace_page->records Based on the following two reasones, we could simplify the calculation: - If the number after roundup count is not power of 2, we would definitely have more than 1 empty page with a higher order. - get_count_order() just return current order, so one lower order could meet the requirement. The calculation could be simplified by lower one order level when pages are not power of 2. Link: https://lkml.kernel.org/r/20200831031104.23322-5-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Steven Rostedt (VMware) commit 02dae28f0b542969e44cbc1e14ffc9944cd2975c Author: Wei Yang Date: Mon Aug 31 11:11:01 2020 +0800 ftrace: Simplify the dyn_ftrace->flags macro All the three macro are defined to be used for ftrace_rec_count(). This can be achieved by (flags & FTRACE_REF_MAX) directly. Since no other places would use those macros, remove them for clarity. Also it fixes a typo in the comment. Link: https://lkml.kernel.org/r/20200831031104.23322-4-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Steven Rostedt (VMware) commit be49313273211c47d1b317d6b2dbe02637c2794c Author: Steven Rostedt (VMware) Date: Mon Oct 5 20:21:14 2020 -0400 ftrace: Simplify the hash calculation No need to add a check to subtract the number of bits if bits is zero after fls(). Just divide the size by two before calling it. This does give the same answer for size of 0 and 1, but that's fine. Signed-off-by: Steven Rostedt (VMware) commit 59e65b3358f44d4d0134eca3b6c269f359f21cd5 Author: Wei Yang Date: Mon Aug 31 11:11:00 2020 +0800 ftrace: Use fls() to get the bits for dup_hash() The effect here is to get the number of bits, lets use fls() to do this job. Link: https://lkml.kernel.org/r/20200831031104.23322-3-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Steven Rostedt (VMware) commit 8db4d6bfbbf9206567fd529dc73dc058b3929db0 Author: Steven Rostedt (VMware) Date: Sun Oct 4 17:14:09 2020 -0500 tracing: Change synthetic event string format to limit printed length Change the format for printing synthetic field strings to limit the length of the string printed even if it's not correctly terminated. Link: https://lore.kernel.org/r/20201002210036.0200371b@oasis.local.home Link: https://lkml.kernel.org/r/b6bdb34e70d970e8026daa3503db6b8e5cdad524.1601848695.git.zanussi@kernel.org Signed-off-by: Steven Rostedt (VMware) commit cbcd9c83695e0f24c0497e6db8b73c3819ab08d4 Author: Tom Zanussi Date: Sun Oct 4 17:14:08 2020 -0500 selftests/ftrace: Add test case for synthetic event dynamic strings Add a selftest that defines and traces a synthetic event that uses a dynamic string event field. Link: https://lkml.kernel.org/r/74445afb005046d76d59fb06696a2ceaa164dec9.1601848695.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 1bc36bd4a8557285870b34cfec7910871049e93e Author: Tom Zanussi Date: Sun Oct 4 17:14:07 2020 -0500 tracing: Add README information for synthetic_events file Add an entry with a basic description of events/synthetic_events along with a simple example. Link: https://lkml.kernel.org/r/3c7f178cf95aaeebc01eda7d95600dd937233eb7.1601848695.git.zanussi@kernel.org Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 2ad63dc8df6b6108aee82dc77c820e3918bc0a65 Author: V Sujith Kumar Reddy Date: Thu Oct 8 10:47:03 2020 +0530 ASoC: qcom: sc7180: Add support for audio over DP Add support for audio playback over DP in lpass sc7180 platform driver. Update lpass_variant structure for hdmi data configuaration. Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1602134223-2562-8-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 03f20e209d07968c410fc404b3d636dc446d3ef2 Author: V Sujith Kumar Reddy Date: Thu Oct 8 10:47:02 2020 +0530 Asoc: qcom: lpass-platform : Increase buffer size Increase buffer size to support audio over DP. Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1602134223-2562-7-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 7cb37b7bd0d3c93e381ae7abf30971819966bd9d Author: V Sujith Kumar Reddy Date: Thu Oct 8 10:47:01 2020 +0530 ASoC: qcom: Add support for lpass hdmi driver Upadate lpass cpu and platform driver to support audio over dp. Also add lpass-hdmi.c and lpass-hdmi.h. Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Reviewed-by: Srinivas Kandagatla Tested-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1602134223-2562-6-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit d9e8e61243958409645c18c9267b6dbaaaf22364 Author: V Sujith Kumar Reddy Date: Thu Oct 8 10:47:00 2020 +0530 Asoc: qcom: lpass:Update lpaif_dmactl members order Update the lpaif_dmactl struct members order to match HDMI reg map members sequence. Separate Interface reg map as it is used for I2S control but not for HDMI control, to make use of bulk API, which makes code more readable. Signed-off-by: V Sujith Kumar Reddy Reviewed-by: Srinivas Kandagatla Signed-off-by: Srinivasa Rao Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1602134223-2562-5-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 4049a3b87847fec754632d233bffbd608364917f Author: V Sujith Kumar Reddy Date: Thu Oct 8 10:46:59 2020 +0530 Asoc:qcom:lpass-cpu:Update dts property read API Update dts property read API call with platform get property by name, as it make code more readable and avoid conflicts when array of properties to be used. Signed-off-by: V Sujith Kumar Reddy Reviewed-by: Srinivas Kandagatla Signed-off-by: Srinivasa Rao Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1602134223-2562-4-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 8e3fdc52ccc64c64912b4785a39f525db9db1fbc Author: V Sujith Kumar Reddy Date: Thu Oct 8 10:46:58 2020 +0530 ASoC: dt-bindings: Add dt binding for lpass hdmi Adds bindings for lpass hdmi interface which can support audio path over dp. Signed-off-by: V Sujith Kumar Reddy Reviewed-by: Rob Herring Signed-off-by: Srinivasa Rao Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1602134223-2562-3-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 12fbfc4cabec65950bb0cc10eab0fc5c4c4d039f Author: V Sujith Kumar Reddy Date: Thu Oct 8 10:46:57 2020 +0530 ASoC: Add sc7180-lpass binding header hdmi define Add header defining hdmi dai-id for SC7180 lpass soc in dt bindings. Signed-off-by: V Sujith Kumar Reddy Acked-by: Rob Herring Signed-off-by: Srinivasa Rao Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1602134223-2562-2-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit 16b0b2baaf83f0fed8fa561d40a1bd3cefae454a Author: Rob Herring Date: Thu Oct 8 09:24:19 2020 -0500 dt-bindings: powerpc: Add a schema for the 'sleep' property Document the PowerPC specific 'sleep' property as a schema. It is currently only documented in booting-without-of.rst which is getting removed. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20201008142420.2083861-1-robh@kernel.org Signed-off-by: Rob Herring commit ec9e656854f3916fc363bb3feb9e92372fbe0b0c Author: Naoki Hayama Date: Thu Oct 8 17:47:42 2020 +0900 dt-bindings: pinctrl: sirf: Fix typo abitrary Fix comment typo. s/abitrary/arbitrary/ Signed-off-by: Naoki Hayama Link: https://lore.kernel.org/r/614fe604-ab8e-21cb-0c3a-db6ddeff2a4e@lineo.co.jp Signed-off-by: Rob Herring commit ab6ccab6df2488bf168fdca6c5455d16e55ef007 Author: Naoki Hayama Date: Thu Oct 8 17:47:35 2020 +0900 dt-bindings: pinctrl: qcom: Fix typo abitrary Fix comment typo. s/abitrary/arbitrary/ Signed-off-by: Naoki Hayama Link: https://lore.kernel.org/r/7d1856e2-84c7-ab19-863d-2d500569d58c@lineo.co.jp Signed-off-by: Rob Herring commit f2e7449f175fee0a86fe7bd0fca2695074320801 Author: Dennis Dalessandro Date: Thu Oct 8 13:18:03 2020 -0400 IB/hfi,rdmavt,qib,opa_vnic: Update MAINTAINERS Intel has spun off the Omni-Path Architecture group which is now a new company known as Cornelis Networks. Updating the MAINTAINERS file to reflect this change and our new email addresses. Link: https://lore.kernel.org/r/20201008171803.189100.43448.stgit@awfm-01.aw.intel.com Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 8e71f694e0c819db39af2336f16eb9689f1ae53f Author: Colin Ian King Date: Thu Oct 8 10:52:04 2020 +0100 IB/rdmavt: Fix sizeof mismatch An incorrect sizeof is being used, struct rvt_ibport ** is not correct, it should be struct rvt_ibport *. Note that since ** is the same size as * this is not causing any issues. Improve this fix by using sizeof(*rdi->ports) as this allows us to not even reference the type of the pointer. Also remove line breaks as the entire statement can fit on one line. Link: https://lore.kernel.org/r/20201008095204.82683-1-colin.king@canonical.com Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") Fixes: ff6acd69518e ("IB/rdmavt: Add device structure allocation") Signed-off-by: Colin Ian King Reviewed-by: Ira Weiny Acked-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 6c111baca692252b6354ce38ceee8006e419eff1 Author: Joe Perches Date: Wed Oct 7 19:46:54 2020 -0700 MAINTAINERS: CISCO VIC LOW LATENCY NIC DRIVER Parvi Kaustubhi's email bounces. Link: https://lore.kernel.org/r/f7726a1873f14972f137f64a4d6cd35e530c6c95.camel@perches.com Signed-off-by: Joe Perches Acked-by: Christian Benvenuti Signed-off-by: Jason Gunthorpe commit 09b3ab8782e79e5ab13e0cd9fce8d27582f64d03 Author: Luca Coelho Date: Thu Oct 8 18:12:50 2020 +0300 iwlwifi: bump FW API to 59 for AX devices Start supporting API version 59 for AX devices. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.0359498107fe.I559b5140be6abbee5eb759ec6e5ca046f7178f8f@changeid commit 6972592850c00e5e53ac026c22acaf0bb77aa01f Author: Luca Coelho Date: Thu Oct 8 18:12:49 2020 +0300 iwlwifi: read and parse PNVM file The driver looks for a PNVM file that contains FW configuration data for each different HW combination. The FW requests the data for a certain SKU_ID and the driver tries to find it in the PNVM file. Read the file, parse its contents and send it to the trans. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.826bc607e57a.I1d93dd6e6651586878db57fac3e7c3f09d742c42@changeid commit 6654cd4eb90f1abe637463643b8e134683845498 Author: Luca Coelho Date: Thu Oct 8 18:12:48 2020 +0300 iwlwifi: pcie: implement set_pnvm op Implement the set_pnvm op to store the PNVM settings to the context info and the corresponding code to free the DRAM block when the context is freed. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.85847cfb0972.I202d90e99779f722df14b2d4102d3e466343a6f6@changeid commit a182dfab2842396bd660ba76006c34654aba7fbd Author: Luca Coelho Date: Thu Oct 8 18:12:47 2020 +0300 iwlwifi: add trans op to set PNVM Add an op to allow setting the PNVM data in the trans. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.77300b00d3ce.I89d7e45e71f19fd36d89f363a28b4759b59b8765@changeid commit b3e4c0f34c1752c332f73aab5b9da75a5283e910 Author: Luca Coelho Date: Thu Oct 8 18:12:46 2020 +0300 iwlwifi: move PNVM implementation to common code The PNVM code is generic and can be used by other opmodes. Move it to a common file and include it in the relevant opmodes. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.232aa310693b.I03a18ffa4162753af38e759d88e27509007c7bca@changeid commit 0fafaa97ef3507689ea344eb703ca7e6c0c28afa Author: Mordechay Goodstein Date: Thu Oct 8 18:12:45 2020 +0300 iwlwifi: rs: align to new TLC config command API The new API adds 4 bytes at end of the struct. We just need to make sure that we don't break compatibility with old FWs. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.bb31ce80fc55.I8a272d1da1334b1805761c0731e5d0c76ca2ef29@changeid commit 45acebf8d6a6fc85d7b3c62aea1936686c0c9531 Author: Naftali Goldstein Date: Thu Oct 8 18:12:44 2020 +0300 iwlwifi: fix sar geo table initialization When adding support for version 3 of the GEO_TX_POWER_LIMIT command, the table argument of iwl_sar_geo_init was changed from a pointer a 1d array of now-removed iwl_per_chain_offset_group_v1 to a pointer to a 2d array of iwl_per_chain_offset (iwl_per_chain_offset_group_v1 was a struct containing 2 copies of iwl_per_chain_offset). So even for version 2 where the second dimension is of length 2, which means that the underlying memory layout of the array didn't change, this requires a small change in the way we loop over it, and this was missed. Additionally, for the case of version 3 where the second dimension is now 3, in order to fill the first two elements of each row correctly (lb and hb), iwl_sar_geo_init must get the true number of bands supported. But because we don't yet store any values for the 3rd (uhb) band, skip that band. Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.73605b6e0548.Id0ec98333277ff9e017e3938ae413b34acc68947@changeid commit 853f4954baf4c034e23c13f493190d8fa6fc0707 Author: Mordechay Goodstein Date: Thu Oct 8 18:12:43 2020 +0300 iwlwifi: stats: add new api fields for statistics cmd/ntfy The new API uses TLV format for statistics to enable fast changes and debug on the fly. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.a45fd1a34a39.I7709305a6dc7b88d0c5119b12c9251fa6c740262@changeid commit efa40c7ef689d97b9168bd4ab98ee9eb01ac48dd Author: Sara Sharon Date: Thu Oct 8 18:12:42 2020 +0300 iwlwifi: mvm: fix suspicious rcu usage warnings mvm mutex isn't held by iwl_mvm_set_aes_rx_seq or it caller. iee80211_local->key_mtx is held, but that is internal to mac80211. The same applies to iwl_mvm_wowlan_program_keys. Just hold rcu_read_lock, even though we are protected, the penalty isn't that bad. Warnings fixed are: [ 4143.788196] WARNING: suspicious RCU usage [ 4143.788211] ----------------------------- [ 4143.788220] suspicious rcu_dereference_protected() usage! [ 4143.788227] [ 4143.788234] rcu_scheduler_active = 2, debug_locks = 1 [ 4143.788242] 5 locks held by kworker/u8:9/5921: [ 4143.788331] #4: ffff88804e69ad08 (&local->key_mtx){+.+.}, at ie80211_iter_keys+0x46/0x380 [mac80211] [ 4143.788441] [ 4143.788441] Call Trace: [ 4143.788455] dump_stack+0xc1/0x11a [ 4143.788471] lockdep_rcu_suspicious+0x14a/0x153 [ 4143.788515] iwl_mvm_set_aes_rx_seq+0x4a9/0x570 [iwlmvm] [ 4143.788657] iwl_mvm_d3_update_keys+0x2ac/0x600 [iwlmvm] [ 4143.788784] ieee80211_iter_keys+0x10e/0x380 [mac80211] [ 4143.788838] iwl_mvm_setup_connection_keep+0x287/0x8d0 [iwlmvm] [ 7243.206556] WARNING: suspicious RCU usage [ 7243.206811] ----------------------------- [ 7243.206926] /suspicious rcu_dereference_protected() usage! [ 7243.207086] [ 7243.207204] rcu_scheduler_active = 2, debug_locks = 1 [ 7243.207321] 2 locks held by cat/15952: [ 7243.207564] #1: ffff888008c8ad08 (&local->key_mtx){+.+.}, at: ieee80211_iter_keys+0x46/0x380 [mac80211] [ 7243.207751] [ 7243.208094] Call Trace: [ 7243.208211] dump_stack+0xc1/0x11a [ 7243.208355] lockdep_rcu_suspicious+0x14a/0x153 [ 7243.208509] iwl_mvm_wowlan_program_keys+0x1db7/0x2340 [iwlmvm] [ 7243.209852] ieee80211_iter_keys+0x10e/0x380 [mac80211] Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.65872d5f1670.I0b2fb2a65904ae686c3c7c05f881a1e3634dc900@changeid commit 60cbad2b867fedb912458668d7ddba80a3581d39 Author: Sara Sharon Date: Thu Oct 8 18:12:41 2020 +0300 iwlwifi: mvm: remove memset of kek_kck command iwl_mvm_wowlan_program_keys is now setting data directly in the KEK_KCK command, and the memset is clearing this later, causing the data to be incomplete. Just remove the memory clearing, the structure is local and cleared in the declaration. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.0f355b4578c5.Ifbb76a2814925f215a2c889c1792d46d5bd66ab8@changeid commit 58ddd9b6d19444343aca0dd662b451683400612d Author: Emmanuel Grumbach Date: Thu Oct 8 18:12:40 2020 +0300 iwlwifi: mvm: don't send a CSA command the firmware doesn't know We introduced a new flow to remove an on-going CSA but we assumed the firwmare understands the CHANNEL_SWITCH_TIME_EVENT_CMD. This is not true for 7265 and down. Don't send this command for those devices, but rather use the older command. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.2574e3e47927.Ic0c56411da1096e9a45ee5c3383edf777c5baca0@changeid commit 8fac81b5005926b1d71473816aca439b9c142a6a Author: Luca Coelho Date: Thu Oct 8 18:12:39 2020 +0300 iwlwifi: pcie: fix the xtal latency value for a few qu devices We were using 5 s for some qu devices, but their xtal stabilizes much faster than that. Reduce the value to 500 ms. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.d0e2253c282f.Icd2ff00adff52f6c96fb261c34fbf129ce67a00d@changeid commit 24436191a3b47b5589256f7f30b7baa5648b4a87 Author: Luca Coelho Date: Thu Oct 8 18:12:38 2020 +0300 iwlwifi: pcie: fix xtal latency for 9560 devices We were using a very high latency for all 9560 devices so they all would have time to stabilize. But this causes the system to be slighly slower, so we can use the best values for each device. This requires a new trans cfg struct for devices with longer latency and some adjustments to the other structs. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008181047.34392f98fdb1.I3d3db14f6d1a8ecc547ca6afce8488816bd26081@changeid commit a48d400cc444967717a6898ee7ac454e97d25722 Author: Luca Coelho Date: Thu Oct 8 18:09:49 2020 +0300 iwlwifi: pcie: fix 0x271B and 0x271C trans cfg struct The 0x271B and 0x271C devices are part of the 9000 series (discrete), and not 9560 (integrated). Fix it accordingly. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.5cc1809940d2.If0d1e0b91fa99486403d276cf7c0fe7680a7ca2a@changeid commit bebc14db4eb7120a2c12fb08ee2ea95cdecb8042 Author: Avraham Stern Date: Thu Oct 8 18:09:48 2020 +0300 iwlwifi: mvm: avoid possible NULL pointer dereference When adding a PASN station, the station is added to the list only if a TK is configured. Otherwise the station pointer should not be used. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.b8a493c168a7.Ie9a0f9dfd9e9c58c603dd06e45151119467a7804@changeid commit 2c2c3647cde4755409aecc57c471d51c24f14c2a Author: Nathan Errera Date: Thu Oct 8 18:09:47 2020 +0300 iwlwifi: mvm: support ADD_STA_CMD_API_S ver 12 ADD_STA_CMD_API_S ver 12 was added in order to properly support auxiliary activities in CDB NICs. In the new version we don't need to allocate an aux station at initialization, instead we add an aux station only when an auxiliary activity that requires a dedicated Tx queue is needed. For now the only case we need this kind of activity is when using hot spot 2.0 Signed-off-by: Nathan Errera Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.700e6e2e3077.Icdd807b6a3ad3fed806449ea0a13f856aa20e632@changeid commit aa4936b11c6c87a7114203fbc29b5f12f4db4a04 Author: Nathan Errera Date: Thu Oct 8 18:09:46 2020 +0300 iwlwifi: mvm: add a get lmac id function As some functions need to check which lmac id to use, add a new function to find the lmac id instead of open coding it in every function. Signed-off-by: Nathan Errera Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.ac3b43e97aa8.I308f8ed2238e32d5eef9c35ad7962f0e8b9c1902@changeid commit f9084775deb915a414c2ae93f68836962d69009b Author: Nathan Errera Date: Thu Oct 8 18:09:45 2020 +0300 iwlwifi: mvm: prepare roc_done_wk to work sync As part of changes made to properly support auxiliary activities in CDB NICs, an aux sta will be added when using hot spot 2.0 and will need to be removed when roc flow is done. In order to do so, prepare the roc_done_wk to work synchronously as the rm_aux_sta is a SYNC command. Since now all of th iwl_mvm_flush_sta function are using it sync, removed the flag argument from the function. Signed-off-by: Nathan Errera Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.71b441c8b682.Ia1d216cb680308b91d6da9f73e23ae9f4baac79f@changeid commit df7203736938a19017c1134214e88c0f1dd37be5 Author: Sara Sharon Date: Thu Oct 8 18:09:44 2020 +0300 iwlwifi: mvm: re-enable TX after channel switch The FW relies on the re-enablement of the TX in order to know it can exit quiet mode. Currently in case of CSA with quiet mode, the quiet mode is never cancelled, resulting in a complete traffic hang. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.fee389c83ded.I09550fdadb61f899242d7e7b7578672372e2b7fe@changeid commit 64f55156f7adedb1ac5bb9cdbcbc9ac05ff5a724 Author: Luca Coelho Date: Thu Oct 8 18:09:43 2020 +0300 iwlwifi: mvm: don't send RFH_QUEUE_CONFIG_CMD with no queues If we have only a single RX queue, such as when MSI-X is not available, we should not send the RFH_QUEUEU_CONFIG_CMD, because our only queue is the same as the command queue and will be configured as part of the context info. Our code was actually trying to send the command with 0 queues, which caused UMAC assert 0x1D04. Fix that by not sending the command when we have a single queue. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.c35eeb3299f8.I08f79a6ebe150a7d180b7005b24504bfdba6d8b5@changeid commit 43dc85b5ec5485e0364483a073cf8d6c9250ff4d Author: Golan Ben Ami Date: Thu Oct 8 18:09:42 2020 +0300 iwlwifi: support an additional Qu subsystem id Add PCI subsystem ID 0x6074 for Qu family. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.fba1c29fc217.I7d47c8de078d48cfc1c98ce1086e71d8d2ebb980@changeid commit f0d748ad459ef826514cae9199cc046fbdb35c64 Author: Johannes Berg Date: Thu Oct 8 18:09:41 2020 +0300 iwlwifi: mvm: stop claiming NL80211_EXT_FEATURE_SET_SCAN_DWELL We've removed the code that handles it appropriately, so stop claiming we support it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.3b8936035273.I7799caa225295de44558e9da093b720afe606359@changeid commit 70d3ca86b0255e4c5739e8d44c88502875395fb5 Author: Luca Coelho Date: Thu Oct 8 18:09:40 2020 +0300 iwlwifi: mvm: ring the doorbell and wait for PNVM load completion When we receive a non-zero SKU_ID in the alive notification, we need to ring the doorbell and wait for the FW to send us a PNVM load complete notification before we continue the init phase. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.a10e8b6bbcf9.Ib5d10b3d508a4d2d4e6b7b629af89d76f4f03d81@changeid commit 7ef3e2246638e4c4ca9d343f5e3a041d7921e142 Author: Luca Coelho Date: Thu Oct 8 18:09:39 2020 +0300 iwlwifi: update prph scratch structure to include PNVM data The ROR structure was replaced by the PNVM structure. They are functionally identical, only the names have changed. For now we keep them set to 0, which means that the PNVM was not found and should not be loaded. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.065c5abcb913.Ifebf7fe47025d720ed58dda0b7ba389b473fe590@changeid commit 90824f2f3390d8d8d5024e4c893443112462c671 Author: Luca Coelho Date: Thu Oct 8 18:09:38 2020 +0300 iwlwifi: mvm: read and parse SKU ID if available In v5 of the ALIVE notification, we may receive the SKU ID of the device in use. Read and store it locally for future access. This will be needed to find the correct PNVM (platform NVM) to pass to the firmware. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.798744ad514e.Ibb0d88586a34acc904bf319974d791faafb7a905@changeid commit be9ae34ead42f88c024bc26d93ef829cd12a8446 Author: Nathan Errera Date: Thu Oct 8 18:09:37 2020 +0300 iwlwifi: mvm: get number of stations from TLV FW is changing the max number of supported stations. To adapt to the change we get the max number from the TLV and act according to the new number. Signed-off-by: Nathan Errera Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20201008180656.863ab470babc.I393223392f36436663c4e66add03fefe77b74e60@changeid commit 41b21af388f94baf7433d4e7845703c7275251de Author: Gabriel Krisman Bertazi Date: Thu Oct 8 02:26:20 2020 -0400 direct-io: defer alignment check until after the EOF check Prior to commit 9fe55eea7e4b ("Fix race when checking i_size on direct i/o read"), an unaligned direct read past end of file would trigger EOF, since generic_file_aio_read detected this read-at-EOF condition and skipped the direct IO read entirely, returning 0. After that change, the read now reaches dio_generic, which detects the misalignment and returns EINVAL. This consolidates the generic direct-io to follow the same behavior of filesystems. Apparently, this fix will only affect ocfs2 since other filesystems do this verification before calling do_blockdev_direct_IO, with the exception of f2fs, which has the same bug, but is fixed in the next patch. it can be verified by a read loop on a file that does a partial read before EOF (On file that doesn't end at an aligned address). The following code fails on an unaligned file on filesystems without prior validation without this patch, but not on btrfs, ext4, and xfs. while (done < total) { ssize_t delta = pread(fd, buf + done, total - done, off + done); if (!delta) break; ... } Fix this regression by moving the misalignment check to after the EOF check added by commit 74cedf9b6c60 ("direct-io: Fix negative return from dio read beyond eof"). Based on a patch by Jamie Liu. Link: https://lore.kernel.org/r/20201008062620.2928326-4-krisman@collabora.com Reported-by: Jamie Liu Reviewed-by: Jan Kara Reviewed-by: Jens Axboe Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Jan Kara commit 0a9164cb7ff32d6936f14657aebc3c4c2a0d5f9d Author: Gabriel Krisman Bertazi Date: Thu Oct 8 02:26:19 2020 -0400 direct-io: don't force writeback for reads beyond EOF If a DIO read starts past EOF, the kernel won't attempt it, so we don't need to flush dirty pages before failing the syscall. Link: https://lore.kernel.org/r/20201008062620.2928326-3-krisman@collabora.com Suggested-by: Jan Kara Reviewed-by: Jan Kara Reviewed-by: Jens Axboe Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Jan Kara commit 46d716025a228de835a8fd51c8420e3ce3c88795 Author: Gabriel Krisman Bertazi Date: Thu Oct 8 02:26:18 2020 -0400 direct-io: clean up error paths of do_blockdev_direct_IO In preparation to resort DIO checks, reduce code duplication of error handling in do_blockdev_direct_IO. Link: https://lore.kernel.org/r/20201008062620.2928326-2-krisman@collabora.com Reviewed-by: Jan Kara Reviewed-by: Jens Axboe Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Jan Kara commit f4ac712e4fe009635344b9af5d890fe25fcc8c0d Author: Tetsuo Handa Date: Thu Oct 8 22:37:23 2020 +0900 block: ratelimit handle_bad_sector() message syzbot is reporting unkillable task [1], for the caller is failing to handle a corrupted filesystem image which attempts to access beyond the end of the device. While we need to fix the caller, flooding the console with handle_bad_sector() message is unlikely useful. [1] https://syzkaller.appspot.com/bug?id=f1f49fb971d7a3e01bd8ab8cff2ff4572ccf3092 Signed-off-by: Tetsuo Handa Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9a15da1b84c9907f1f491023c517aa79d1ea4958 Merge: 2bfdb7b3e95b3 85f94020033f9 Author: Rafael J. Wysocki Date: Thu Oct 8 18:04:04 2020 +0200 Merge back earlier ACPICA-related changes for 5.10. commit 2bfdb7b3e95b3c11cf1d1233dac7cb9c4394ec32 Author: Bob Moore Date: Wed Oct 7 19:54:03 2020 -0700 ACPICA: Update version to 20200925 Version 20200925 ACPICA commit 70add34a9a4729b5496d0695ad14d6a1dc435879 Link: https://github.com/acpica/acpica/commit/70add34a Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 167504a0a654837799df6ec48024cc4fada1cebb Author: Bob Moore Date: Wed Oct 7 19:54:02 2020 -0700 ACPICA: Remove unnecessary semicolon ACPICA commit 02ffcba2af123a891eefbaed4d37780ba1e36ccc Reported by: Zou Wei. Link: https://github.com/acpica/acpica/commit/02ffcba2 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 6218ab30da72717f906576fd5e63c15b990235f1 Author: Bob Moore Date: Wed Oct 7 19:54:01 2020 -0700 ACPICA: Debugger: Add a new command: "ALL " This command will execute/evaluate all objects with a match to the argument. ACPICA commit a1a32ec054f067d1617067e2bafb0a27a8728e07 Link: https://github.com/acpica/acpica/commit/a1a32ec0 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit ef3efb439aef2ad4409cba5f3d865be87fa507c4 Author: Bob Moore Date: Wed Oct 7 19:54:00 2020 -0700 ACPICA: iASL: Return exceptions for string-to-integer conversions This allows iASL to generate errors by passing exceptions that may be encountered during string-to-integer conversions. The exceptions point out invalid hex, decimal, and octal integers. ACPICA commit e98b8c0a3d96fdabb167c0ef18a809b32ade3228 Link: https://github.com/acpica/acpica/commit/e98b8c0a Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 18aaa02c9b32a281832f46b9b9b3a2111db0db54 Author: Bob Moore Date: Wed Oct 7 19:53:59 2020 -0700 ACPICA: acpi_help: Update UUID list Added the following UUID's Memory Device Generic Buttons Device NVDIMM Root Device Control Method Battery Device Graphs for _DSD method Hierarchical Data Extension ARM core_sight Graph UUID This commit squashes the following ACPICA commits: 93e9aa864a7c5e10db876a9af3f2086e50cc6cf5 759aaf73942af4a1a0d13715ce5e6b054af351fa 24751ce4cf3089a7c1709e4986bc82dfb5cca7bc Link: https://github.com/acpica/acpica/commit/93e9aa86 Link: https://github.com/acpica/acpica/commit/759aaf73 Link: https://github.com/acpica/acpica/commit/24751ce4 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 4d5840372654e33d53840b7984c853f00fcbf1eb Author: Bob Moore Date: Wed Oct 7 19:53:58 2020 -0700 ACPICA: Add predefined names found in the SMBus sepcification Affects run-time (kernel) ACPICA, iASL, and acpi_help. The "SMBus Control Method Interface Specification, Version 1.0, December 10, 1999" containes predefined names: _SBA _SBI _SBR _SBT _SBW. This was done outside of the ACPI specification. This commit adds support for ACPICA to recognize these named objects as predefined named objects. ACPICA commit 2fe13bd7ba9f97d3bf25488bf1bb1b2329427093 Link: https://github.com/acpica/acpica/commit/2fe13bd7 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 465e490d290b9670c3eef7406915facd58946244 Author: Colin Ian King Date: Wed Oct 7 19:53:57 2020 -0700 ACPICA: Tree-wide: fix various typos and spelling mistakes ACPICA commit 6648a6ac8410813bcfedb5c8345259dd155ea851 Fix spelling issues found using the codespell checker Link: https://github.com/acpica/acpica/commit/6648a6ac Signed-off-by: Colin Ian King Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit ec360131ec27d611e5dc5e03a84d3dc47d4b9ea0 Author: Randy Dunlap Date: Wed Oct 7 19:53:56 2020 -0700 ACPICA: Drop the repeated word "an" in a comment ACPICA commit 9ed2c006444d1def55bc6f08164ed5d9e809c856 Link: https://github.com/acpica/acpica/commit/9ed2c006 Signed-off-by: Randy Dunlap Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 3d21044e5dbadf484232beb3c5d09f836cebb0ed Author: Colin Ian King Date: Wed Oct 7 19:53:55 2020 -0700 ACPICA: Add support for 64 bit risc-v compilation ACPICA commit 0def627be286620c64a5d4d60ce2373f119169a9 Add 64 bit risc-v architecture. Useful for acpica tools and incorporating ACPICA into the Firmware Test Suite. Link: https://github.com/acpica/acpica/commit/0def627b Signed-off-by: Colin Ian King Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 2ef0342530b0f487a65b5f6c94c85dce5f9b53b5 Author: Christoph Hellwig Date: Thu Oct 8 08:53:03 2020 +0200 PNP: remove the now unused pnp_find_card() function All user of the pnp_find_card() compat wrapper are gone, so remove the function as well. Signed-off-by: Christoph Hellwig Signed-off-by: Rafael J. Wysocki commit 3bfb8239be5753a6d7a77556d09ef99ebed89964 Merge: afb487a31d33e 3e765cab8abe7 Author: Greg Kroah-Hartman Date: Thu Oct 8 17:29:39 2020 +0200 Merge tag 'usb-serial-5.10-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 5.10-rc1 Here are the USB-serial updates for 5.10-rc1, including: - new device ids - various clean ups All have been in linux-next with no reported issues. * tag 'usb-serial-5.10-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add Cellient MPL200 card USB: serial: ftdi_sio: use cur_altsetting for consistency USB: serial: option: Add Telit FT980-KS composition USB: serial: qcserial: fix altsetting probing USB: serial: ftdi_sio: clean up jtag quirks USB: serial: pl2303: add device-id for HP GC device USB: serial: ftdi_sio: add support for FreeCalypso JTAG+UART adapters commit 6699e91c071715efefd7d5709755e557e948fdd9 Author: Ionela Voinescu Date: Thu Sep 24 13:30:16 2020 +0100 arm: disable frequency invariance for CONFIG_BL_SWITCHER big.LITTLE switching complicates the setting of a correct cpufreq-based frequency invariance scale factor due to (as observed in drivers/cpufreq/vexpress-spc-cpufreq.c): - Incorrect current and maximum frequencies as a result of the exposure of a virtual frequency table to the cpufreq core, - Missed updates as a result of asynchronous frequency adjustments caused by frequency changes in other CPU pairs. Given that its functionality is atypical in regards to frequency invariance and this is an old technology, disable frequency invariance for when big.LITTLE switching is configured in to prevent incorrect scale setting. Signed-off-by: Ionela Voinescu Suggested-by: Dietmar Eggemann Acked-by: Viresh Kumar Acked-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki commit a20b7053b5c47cd7de23288238ea4d23502f300a Author: Ionela Voinescu Date: Thu Sep 24 13:30:15 2020 +0100 cpufreq,arm,arm64: restructure definitions of arch_set_freq_scale() Compared to other arch_* functions, arch_set_freq_scale() has an atypical weak definition that can be replaced by a strong architecture specific implementation. The more typical support for architectural functions involves defining an empty stub in a header file if the symbol is not already defined in architecture code. Some examples involve: - #define arch_scale_freq_capacity topology_get_freq_scale - #define arch_scale_freq_invariant topology_scale_freq_invariant - #define arch_scale_cpu_capacity topology_get_cpu_scale - #define arch_update_cpu_topology topology_update_cpu_topology - #define arch_scale_thermal_pressure topology_get_thermal_pressure - #define arch_set_thermal_pressure topology_set_thermal_pressure Bring arch_set_freq_scale() in line with these functions by renaming it to topology_set_freq_scale() in the arch topology driver, and by defining the arch_set_freq_scale symbol to point to the new function for arm and arm64. While there are other users of the arch_topology driver, this patch defines arch_set_freq_scale for arm and arm64 only, due to their existing definitions of arch_scale_freq_capacity. This is the getter function of the frequency invariance scale factor and without a getter function, the setter function - arch_set_freq_scale() has not purpose. Signed-off-by: Ionela Voinescu Acked-by: Viresh Kumar Acked-by: Catalin Marinas Acked-by: Sudeep Holla (BL_SWITCHER and topology parts) Signed-off-by: Rafael J. Wysocki commit b6bf0830a808498146903e0e1f407a1eba95019a Merge: 103fbf8e40208 c4485252cf36a Author: Jens Axboe Date: Thu Oct 8 09:07:09 2020 -0600 Merge tag 'nvme-5.10-2020-10-08' of git://git.infradead.org/nvme into for-5.10/drivers Pull NVMe updates from Christoph: "nvme update for 5.10: - fix a controller refcount leak on init failure (Chaitanya Kulkarni) - misc cleanups (Chaitanya Kulkarni) - major refactoring of the scanning code (me)" * tag 'nvme-5.10-2020-10-08' of git://git.infradead.org/nvme: (23 commits) nvme-core: remove extra condition for vwc nvme-core: remove extra variable nvme: remove nvme_identify_ns_list nvme: refactor nvme_validate_ns nvme: move nvme_validate_ns nvme: query namespace identifiers before adding the namespace nvme: revalidate zone bitmaps in nvme_update_ns_info nvme: remove nvme_update_formats nvme: update the known admin effects nvme: set the queue limits in nvme_update_ns_info nvme: remove the 0 lba_shift check in nvme_update_ns_info nvme: clean up the check for too large logic block sizes nvme: freeze the queue over ->lba_shift updates nvme: factor out a nvme_configure_metadata helper nvme: call nvme_identify_ns as the first thing in nvme_alloc_ns_block nvme: lift the check for an unallocated namespace into nvme_identify_ns nvme: rename __nvme_revalidate_disk nvme: rename _nvme_revalidate_disk nvme: rename nvme_validate_ns to nvme_validate_or_alloc_ns nvme: remove the disk argument to nvme_update_zone_info ... commit 3e765cab8abe7f84cb80d4a7a973fc97d5742647 Author: Wilken Gottwalt Date: Sat Oct 3 11:40:29 2020 +0200 USB: serial: option: add Cellient MPL200 card Add usb ids of the Cellient MPL200 card. Signed-off-by: Wilken Gottwalt Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/3db5418fe9e516f4b290736c5a199c9796025e3c.1601715478.git.wilken.gottwalt@mailbox.org Signed-off-by: Johan Hovold commit 148ebf548a1af366fc797fcc7d03f0bb92b12a79 Author: Jeremy Szu Date: Thu Oct 8 18:56:44 2020 +0800 ALSA: hda/realtek - The front Mic on a HP machine doesn't work On a HP ZCentral, the front Mic could not be detected. The codec of the HP ZCentrol is alc671 and it needs to override the pin configuration to enable the headset mic. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20201008105645.65505-1-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit 8446466c9dd645da4c1848f35ffd0fc1df3524ee Author: Matthew Wilcox (Oracle) Date: Thu Aug 6 10:07:24 2020 -0400 XArray: Fix xas_for_each_conflict documentation At one point, xas_for_each_conflict() was going to work this way, and I forgot to update the documentation when I changed my mind. Signed-off-by: Matthew Wilcox (Oracle) commit 04e9e9bb8470bea74eafad1cafd552f3f06c32d9 Author: Matthew Wilcox (Oracle) Date: Sun Jun 14 21:52:04 2020 -0400 XArray: Test marked multiorder iterations Demonstrate that starting a marked iteration partway through a marked multi-order entry works. Signed-off-by: Matthew Wilcox (Oracle) commit 1da30f952a81718a9c3b651121a274b093f44932 Author: Baolin Wang Date: Thu Oct 8 11:52:29 2020 +0800 blk-throttle: Re-use the throtl_set_slice_end() Re-use throtl_set_slice_end() to remove duplicate code. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 29379674bda0739f184f1d234975605f7d6b428c Author: Baolin Wang Date: Thu Oct 8 11:52:28 2020 +0800 blk-throttle: Open code __throtl_de/enqueue_tg() The __throtl_de/enqueue_tg() functions are only be called by throtl_de/enqueue_tg(), thus we can just open code them to make code more readable. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 2397611ac802c4f8028b6b2e585b9857d2f8138b Author: Baolin Wang Date: Thu Oct 8 11:52:27 2020 +0800 blk-throttle: Move service tree validation out of the throtl_rb_first() The throtl_schedule_next_dispatch() will validate if the service queue is empty before calling update_min_dispatch_time(), and the update_min_dispatch_time() will call throtl_rb_first(), which will validate service queue again. Thus we can move the service queue validation out of the throtl_rb_first() to remove the redundant validation in the fast path. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit b7b609de5a0835b2ca10c71df5d9570008eb1084 Author: Baolin Wang Date: Thu Oct 8 11:52:26 2020 +0800 blk-throttle: Move the list operation after list validation We should move the list operation after validation. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 5b7048b89745c3c5fb4b3080fb7bced61dba2a2b Author: Baolin Wang Date: Thu Oct 8 11:52:25 2020 +0800 blk-throttle: Fix IO hang for a corner case It can not scale up in throtl_adjusted_limit() if we set bps or iops is 1, which will cause IO hang when enable low limit. Thus we should treat 1 as a illegal value to avoid this issue. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit b185efa78bf9f13e32f115169e4ab35e68993461 Author: Baolin Wang Date: Thu Oct 8 11:52:24 2020 +0800 blk-throttle: Avoid tracking latency if low limit is invalid The IO latency tracking is only for LOW limit, so we should add a validation to avoid redundant latency tracking if the LOW limit is not valid. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 7901601aef35082d8431d05ab50a3567f7624b55 Author: Baolin Wang Date: Thu Oct 8 11:52:23 2020 +0800 blk-throttle: Avoid getting the current time if tg->last_finish_time is 0 We only update the tg->last_finish_time when the low limitaion is enabled, so we can move the tg->last_finish_time validation a little forward to avoid getting the unnecessary current time stamp if the the low limitation is not enabled. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 4247d9c8ba810c1d4a9502893a9ce1cec6abbf7a Author: Baolin Wang Date: Thu Oct 8 11:52:22 2020 +0800 blk-throttle: Remove a meaningless parameter for throtl_downgrade_state() The throtl_downgrade_state() is always used to change to LIMIT_LOW limitation, thus remove the latter meaningless parameter which indicates the limitation index. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit fa1c3eaf4dae94a6109d436b4bad7dc9b072ad39 Author: Baolin Wang Date: Mon Sep 28 08:42:26 2020 +0800 block: Remove redundant 'return' statement Remove redundant 'return' statement for 'void' functions. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit ca6484cd308a671811bf39f3119e81966eb476e3 Author: Jens Axboe Date: Thu Oct 8 07:46:52 2020 -0600 io_uring: no need to call xa_destroy() on empty xarray The kernel test robot reports this lockdep issue: [child1:659] mbind (274) returned ENOSYS, marking as inactive. [child1:659] mq_timedsend (279) returned ENOSYS, marking as inactive. [main] 10175 iterations. [F:7781 S:2344 HI:2397] [ 24.610601] [ 24.610743] ================================ [ 24.611083] WARNING: inconsistent lock state [ 24.611437] 5.9.0-rc7-00017-g0f2122045b9462 #5 Not tainted [ 24.611861] -------------------------------- [ 24.612193] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. [ 24.612660] ksoftirqd/0/7 [HC0[0]:SC1[3]:HE0:SE0] takes: [ 24.613086] f00ed998 (&xa->xa_lock#4){+.?.}-{2:2}, at: xa_destroy+0x43/0xc1 [ 24.613642] {SOFTIRQ-ON-W} state was registered at: [ 24.614024] lock_acquire+0x20c/0x29b [ 24.614341] _raw_spin_lock+0x21/0x30 [ 24.614636] io_uring_add_task_file+0xe8/0x13a [ 24.614987] io_uring_create+0x535/0x6bd [ 24.615297] io_uring_setup+0x11d/0x136 [ 24.615606] __ia32_sys_io_uring_setup+0xd/0xf [ 24.615977] do_int80_syscall_32+0x53/0x6c [ 24.616306] restore_all_switch_stack+0x0/0xb1 [ 24.616677] irq event stamp: 939881 [ 24.616968] hardirqs last enabled at (939880): [<8105592d>] __local_bh_enable_ip+0x13c/0x145 [ 24.617642] hardirqs last disabled at (939881): [<81b6ace3>] _raw_spin_lock_irqsave+0x1b/0x4e [ 24.618321] softirqs last enabled at (939738): [<81b6c7c8>] __do_softirq+0x3f0/0x45a [ 24.618924] softirqs last disabled at (939743): [<81055741>] run_ksoftirqd+0x35/0x61 [ 24.619521] [ 24.619521] other info that might help us debug this: [ 24.620028] Possible unsafe locking scenario: [ 24.620028] [ 24.620492] CPU0 [ 24.620685] ---- [ 24.620894] lock(&xa->xa_lock#4); [ 24.621168] [ 24.621381] lock(&xa->xa_lock#4); [ 24.621695] [ 24.621695] *** DEADLOCK *** [ 24.621695] [ 24.622154] 1 lock held by ksoftirqd/0/7: [ 24.622468] #0: 823bfb94 (rcu_callback){....}-{0:0}, at: rcu_process_callbacks+0xc0/0x155 [ 24.623106] [ 24.623106] stack backtrace: [ 24.623454] CPU: 0 PID: 7 Comm: ksoftirqd/0 Not tainted 5.9.0-rc7-00017-g0f2122045b9462 #5 [ 24.624090] Call Trace: [ 24.624284] ? show_stack+0x40/0x46 [ 24.624551] dump_stack+0x1b/0x1d [ 24.624809] print_usage_bug+0x17a/0x185 [ 24.625142] mark_lock+0x11d/0x1db [ 24.625474] ? print_shortest_lock_dependencies+0x121/0x121 [ 24.625905] __lock_acquire+0x41e/0x7bf [ 24.626206] lock_acquire+0x20c/0x29b [ 24.626517] ? xa_destroy+0x43/0xc1 [ 24.626810] ? lock_acquire+0x20c/0x29b [ 24.627110] _raw_spin_lock_irqsave+0x3e/0x4e [ 24.627450] ? xa_destroy+0x43/0xc1 [ 24.627725] xa_destroy+0x43/0xc1 [ 24.627989] __io_uring_free+0x57/0x71 [ 24.628286] ? get_pid+0x22/0x22 [ 24.628544] __put_task_struct+0xf2/0x163 [ 24.628865] put_task_struct+0x1f/0x2a [ 24.629161] delayed_put_task_struct+0xe2/0xe9 [ 24.629509] rcu_process_callbacks+0x128/0x155 [ 24.629860] __do_softirq+0x1a3/0x45a [ 24.630151] run_ksoftirqd+0x35/0x61 [ 24.630443] smpboot_thread_fn+0x304/0x31a [ 24.630763] kthread+0x124/0x139 [ 24.631016] ? sort_range+0x18/0x18 [ 24.631290] ? kthread_create_worker_on_cpu+0x17/0x17 [ 24.631682] ret_from_fork+0x1c/0x28 which is complaining about xa_destroy() grabbing the xa lock in an IRQ disabling fashion, whereas the io_uring uses cases aren't interrupt safe. This is really an xarray issue, since it should not assume the lock type. But for our use case, since we know the xarray is empty at this point, there's no need to actually call xa_destroy(). So just get rid of it. Fixes: 0f2122045b94 ("io_uring: don't rely on weak ->files references") Reported-by: kernel test robot Signed-off-by: Jens Axboe commit 7dcd56123e312e8b17f85a597b33552a704ce45f Author: Naoki Hayama Date: Thu Oct 8 17:47:44 2020 +0900 ALSA: hdspm: Fix typo arbitary Fix comment typo. s/arbitary/arbitrary/ Signed-off-by: Naoki Hayama Link: https://lore.kernel.org/r/e04a8c5b-8c59-3f02-34d3-c1a871d08cc2@lineo.co.jp Signed-off-by: Takashi Iwai commit c386e0797d26a32e354daf4480c5d40165db66a1 Author: Hans Verkuil Date: Thu Oct 8 13:59:13 2020 +0200 media: dvb-frontends/drxk_hard.c: fix uninitialized variable warning drxk_hard.c: In function 'hi_command.constprop': drxk_hard.c:1016:5: warning: 'wait_cmd' may be used uninitialized in this function [-Wmaybe-uninitialized] 1015 | } while ((status < 0) && (retry_count < DRXK_MAX_RETRIES) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1016 | && (wait_cmd != 0)); | ^~~~~~~~~~~~~~~~~~ The underlying cause is that the while condition is wrong. It should be: (status < 0 || wait_cmd) && (retry_count < DRXK_MAX_RETRIES) 'wait_cmd' is only valid if '!(status < 0)'. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2311072d9905b1f810a3c0665362ee552f076c26 Author: Hans Verkuil Date: Thu Oct 8 13:59:12 2020 +0200 media: tvp7002: fix uninitialized variable warning tvp7002.c: In function 'tvp7002_g_register': tvp7002.c:691:11: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized] 691 | reg->val = val; | ~~~~~~~~~^~~~~ Just return without setting 'reg' if tvp7002_read returns an error. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7124ae48f2a45399789bcc14389614c899f6aa7c Author: Hans Verkuil Date: Thu Oct 8 13:59:11 2020 +0200 media: s5k5baf: drop 'data' field in struct s5k5baf_fw struct s5k5baf_fw ends with this: struct { u16 id; u16 offset; } seq[0]; u16 data[]; }; which is rather confusing and can cause gcc warnings: s5k5baf.c: In function 's5k5baf_load_setfile.isra': s5k5baf.c:390:13: warning: array subscript 65535 is outside the bounds of an interior zero-length array 'struct [0]' [-Wzero-length-bounds] 390 | if (f->seq[i].offset + d <= end) | ~~~~~~^~~ It turns out that 'data[]' is used in only one place and it can easily be replaced by &fw->seq[0].id and 'seq[0]' can be replaced by 'seq[]'. This is both more readable and solved that warnings. Signed-off-by: Hans Verkuil Cc: Kyungmin Park Cc: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab commit 8b2426c50f20d6f9ca4c4e42bb7afcb312daec6a Author: Chris Chiu Date: Tue Oct 6 11:59:28 2020 +0800 rtlwifi: rtl8192se: remove duplicated legacy_httxpowerdiff The legacy_httxpowerdiff in rtl8192se is pretty much the same as the legacy_ht_txpowerdiff for other chips. Use the same name to keep the consistency. Signed-off-by: Chris Chiu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201006035928.5566-1-chiu@endlessm.com commit 53708f4fd9cfe389beab5c8daa763bcd0e0b4aef Author: Tom Rix Date: Sun Oct 4 06:19:31 2020 -0700 mwifiex: fix double free clang static analysis reports this problem: sdio.c:2403:3: warning: Attempt to free released memory kfree(card->mpa_rx.buf); ^~~~~~~~~~~~~~~~~~~~~~~ When mwifiex_init_sdio() fails in its first call to mwifiex_alloc_sdio_mpa_buffer, it falls back to calling it again. If the second alloc of mpa_tx.buf fails, the error handler will try to free the old, previously freed mpa_rx.buf. Reviewing the code, it looks like a second double free would happen with mwifiex_cleanup_sdio(). So set both pointers to NULL when they are freed. Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") Signed-off-by: Tom Rix Reviewed-by: Brian Norris Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201004131931.29782-1-trix@redhat.com commit 8431350eee2e27ae60f5250e0437ab298329070e Author: Alex Dewar Date: Sun Oct 4 11:02:18 2020 +0100 ath11k: Fix memory leak on error path In ath11k_mac_setup_iface_combinations(), if memory cannot be assigned for the variable limits, then the memory assigned to combinations will be leaked. Fix this. Addresses-Coverity-ID: 1497534 ("Resource leaks") Fixes: 2626c269702e ("ath11k: add interface_modes to hw_params") Signed-off-by: Alex Dewar Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201004100218.311653-2-alex.dewar90@gmail.com commit 7d4ced86997f69cc276a92cb304db3f0ea11366d Author: Lee Jones Date: Thu Sep 10 07:54:17 2020 +0100 iwlwifi: iwl-drv: Provide descriptions debugfs dentries Also demote a non-conforming kernel-doc function header. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/iwl-drv.c:124: warning: Function parameter or member 'dbgfs_drv' not described in 'iwl_drv' drivers/net/wireless/intel/iwlwifi/iwl-drv.c:124: warning: Function parameter or member 'dbgfs_trans' not described in 'iwl_drv' drivers/net/wireless/intel/iwlwifi/iwl-drv.c:124: warning: Function parameter or member 'dbgfs_op_mode' not described in 'iwl_drv' drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1329: warning: Function parameter or member 'ucode_raw' not described in 'iwl_req_fw_callback' drivers/net/wireless/intel/iwlwifi/iwl-drv.c:1329: warning: Function parameter or member 'context' not described in 'iwl_req_fw_callback' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-16-lee.jones@linaro.org commit 6806fc7fcfb24a3459b326d01fbdc2b8182ee20c Author: Lee Jones Date: Thu Sep 10 07:54:16 2020 +0100 iwlwifi: dvm: devices: Fix function documentation formatting issues Kerneldoc expects attributes/parameters to be in '@*.: ' format and gets confused if the variable does not follow the type/attribute definitions. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/dvm/devices.c:66: warning: Function parameter or member 'priv' not described in 'iwl_beacon_time_mask_low' drivers/net/wireless/intel/iwlwifi/dvm/devices.c:66: warning: Function parameter or member 'tsf_bits' not described in 'iwl_beacon_time_mask_low' drivers/net/wireless/intel/iwlwifi/dvm/devices.c:77: warning: Function parameter or member 'priv' not described in 'iwl_beacon_time_mask_high' drivers/net/wireless/intel/iwlwifi/dvm/devices.c:77: warning: Function parameter or member 'tsf_bits' not described in 'iwl_beacon_time_mask_high' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-15-lee.jones@linaro.org commit 91b4780fbae7abc5770e52ae674b347b9d505d36 Author: Lee Jones Date: Thu Sep 10 07:54:15 2020 +0100 iwlwifi: mvm: tx: Demote misuse of kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/mvm/tx.c:1379: warning: Function parameter or member 'rate_n_flags' not described in 'iwl_mvm_hwrate_to_tx_status' drivers/net/wireless/intel/iwlwifi/mvm/tx.c:1379: warning: Function parameter or member 'info' not described in 'iwl_mvm_hwrate_to_tx_status' drivers/net/wireless/intel/iwlwifi/mvm/tx.c:1431: warning: Function parameter or member 'mvm' not described in 'iwl_mvm_get_scd_ssn' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-14-lee.jones@linaro.org commit 3a7d806926bb4f7402428b9b0b99ace94d7a1d6a Author: Lee Jones Date: Thu Sep 10 07:54:14 2020 +0100 iwlwifi: dvm: rxon: Demote non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/dvm/rxon.c:695: warning: bad line: drivers/net/wireless/intel/iwlwifi/dvm/rxon.c:701: warning: Function parameter or member 'priv' not described in 'iwl_set_rxon_channel' drivers/net/wireless/intel/iwlwifi/dvm/rxon.c:701: warning: Function parameter or member 'ctx' not described in 'iwl_set_rxon_channel' drivers/net/wireless/intel/iwlwifi/dvm/rxon.c:839: warning: Function parameter or member 'ctx' not described in 'iwl_full_rxon_required' drivers/net/wireless/intel/iwlwifi/dvm/rxon.c:1029: warning: Function parameter or member 'priv' not described in 'iwlagn_commit_rxon' drivers/net/wireless/intel/iwlwifi/dvm/rxon.c:1029: warning: Function parameter or member 'ctx' not described in 'iwlagn_commit_rxon' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-13-lee.jones@linaro.org commit de00105cf0dcfc10dc968d93e3ff72920756c5eb Author: Lee Jones Date: Thu Sep 10 07:54:13 2020 +0100 iwlwifi: dvm: scan: Demote a few nonconformant kernel-doc headers 2 of which do not attempt to document their parameters, 1 does a poor job. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/dvm/scan.c:193: warning: Function parameter or member 'priv' not described in 'iwl_scan_cancel' drivers/net/wireless/intel/iwlwifi/dvm/scan.c:205: warning: Function parameter or member 'priv' not described in 'iwl_scan_cancel_timeout' drivers/net/wireless/intel/iwlwifi/dvm/scan.c:570: warning: Function parameter or member 'frame' not described in 'iwl_fill_probe_req' drivers/net/wireless/intel/iwlwifi/dvm/scan.c:570: warning: Function parameter or member 'ta' not described in 'iwl_fill_probe_req' drivers/net/wireless/intel/iwlwifi/dvm/scan.c:570: warning: Function parameter or member 'ies' not described in 'iwl_fill_probe_req' drivers/net/wireless/intel/iwlwifi/dvm/scan.c:570: warning: Function parameter or member 'ie_len' not described in 'iwl_fill_probe_req' drivers/net/wireless/intel/iwlwifi/dvm/scan.c:570: warning: Function parameter or member 'ssid' not described in 'iwl_fill_probe_req' drivers/net/wireless/intel/iwlwifi/dvm/scan.c:570: warning: Function parameter or member 'ssid_len' not described in 'iwl_fill_probe_req' drivers/net/wireless/intel/iwlwifi/dvm/scan.c:570: warning: Function parameter or member 'left' not described in 'iwl_fill_probe_req' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-12-lee.jones@linaro.org commit 7b37b874fce380e5cae997dea1d18e76da5f099e Author: Lee Jones Date: Thu Sep 10 07:54:12 2020 +0100 iwlwifi: mvm: utils: Fix some doc-rot Fix misnamed, and missing descriptions likely due to doc-rot. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/mvm/utils.c:669: warning: Function parameter or member 'mvm' not described in 'iwl_mvm_send_lq_cmd' drivers/net/wireless/intel/iwlwifi/mvm/utils.c:669: warning: Function parameter or member 'lq' not described in 'iwl_mvm_send_lq_cmd' drivers/net/wireless/intel/iwlwifi/mvm/utils.c:669: warning: Excess function parameter 'sync' description in 'iwl_mvm_send_lq_cmd' drivers/net/wireless/intel/iwlwifi/mvm/utils.c:695: warning: Function parameter or member 'mvm' not described in 'iwl_mvm_update_smps' drivers/net/wireless/intel/iwlwifi/mvm/utils.c:695: warning: Function parameter or member 'vif' not described in 'iwl_mvm_update_smps' drivers/net/wireless/intel/iwlwifi/mvm/utils.c:695: warning: Function parameter or member 'smps_request' not described in 'iwl_mvm_update_smps' drivers/net/wireless/intel/iwlwifi/mvm/utils.c:695: warning: Excess function parameter 'smps_requests' description in 'iwl_mvm_update_smps' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-11-lee.jones@linaro.org commit 108285ec68515e79581832c9b7c7dc7f8e43f680 Author: Lee Jones Date: Thu Sep 10 07:54:11 2020 +0100 iwlwifi: dvm: Demote a couple of nonconformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/dvm/rx.c:145: warning: Function parameter or member 'priv' not described in 'iwlagn_good_plcp_health' drivers/net/wireless/intel/iwlwifi/dvm/rx.c:145: warning: Function parameter or member 'cur_ofdm' not described in 'iwlagn_good_plcp_health' drivers/net/wireless/intel/iwlwifi/dvm/rx.c:145: warning: Function parameter or member 'cur_ofdm_ht' not described in 'iwlagn_good_plcp_health' drivers/net/wireless/intel/iwlwifi/dvm/rx.c:145: warning: Function parameter or member 'msecs' not described in 'iwlagn_good_plcp_health' drivers/net/wireless/intel/iwlwifi/dvm/rx.c:939: warning: Function parameter or member 'priv' not described in 'iwl_setup_rx_handlers' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-10-lee.jones@linaro.org commit 707c528a8d51ab418e092eaa95c5b9f6114fd616 Author: Lee Jones Date: Thu Sep 10 07:54:10 2020 +0100 iwlwifi: mvm: ops: Remove unused static struct 'iwl_mvm_debug_names' Looks as if it's never been used. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/mvm/ops.c:466:36: warning: ‘iwl_mvm_debug_names’ defined but not used [-Wunused-const-variable=] Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-9-lee.jones@linaro.org commit 8f7ed7bf13840d2d2e44052bb6f4b15ac9101238 Author: Lee Jones Date: Thu Sep 10 07:54:09 2020 +0100 iwlwifi: dvm: sta: Demote a bunch of nonconformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/dvm/sta.c:244: warning: Function parameter or member 'priv' not described in 'iwl_prep_station' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:244: warning: Function parameter or member 'ctx' not described in 'iwl_prep_station' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:244: warning: Function parameter or member 'addr' not described in 'iwl_prep_station' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:244: warning: Function parameter or member 'is_ap' not described in 'iwl_prep_station' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:244: warning: Function parameter or member 'sta' not described in 'iwl_prep_station' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:332: warning: Function parameter or member 'priv' not described in 'iwl_add_station_common' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:332: warning: Function parameter or member 'ctx' not described in 'iwl_add_station_common' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:332: warning: Function parameter or member 'addr' not described in 'iwl_add_station_common' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:332: warning: Function parameter or member 'is_ap' not described in 'iwl_add_station_common' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:332: warning: Function parameter or member 'sta' not described in 'iwl_add_station_common' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:332: warning: Function parameter or member 'sta_id_r' not described in 'iwl_add_station_common' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:390: warning: Function parameter or member 'priv' not described in 'iwl_sta_ucode_deactivate' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:390: warning: Function parameter or member 'sta_id' not described in 'iwl_sta_ucode_deactivate' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:459: warning: Function parameter or member 'priv' not described in 'iwl_remove_station' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:459: warning: Function parameter or member 'sta_id' not described in 'iwl_remove_station' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:459: warning: Function parameter or member 'addr' not described in 'iwl_remove_station' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:614: warning: Function parameter or member 'priv' not described in 'iwl_clear_ucode_stations' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:614: warning: Function parameter or member 'ctx' not described in 'iwl_clear_ucode_stations' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:648: warning: Function parameter or member 'priv' not described in 'iwl_restore_stations' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:648: warning: Function parameter or member 'ctx' not described in 'iwl_restore_stations' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:790: warning: Function parameter or member 'priv' not described in 'is_lq_table_valid' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:790: warning: Function parameter or member 'ctx' not described in 'is_lq_table_valid' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:790: warning: Function parameter or member 'lq' not described in 'is_lq_table_valid' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:822: warning: Function parameter or member 'priv' not described in 'iwl_send_lq_cmd' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:822: warning: Function parameter or member 'ctx' not described in 'iwl_send_lq_cmd' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:822: warning: Function parameter or member 'lq' not described in 'iwl_send_lq_cmd' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:822: warning: Function parameter or member 'flags' not described in 'iwl_send_lq_cmd' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:1270: warning: Function parameter or member 'priv' not described in 'iwlagn_alloc_bcast_station' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:1270: warning: Function parameter or member 'ctx' not described in 'iwlagn_alloc_bcast_station' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:1309: warning: Function parameter or member 'priv' not described in 'iwl_update_bcast_station' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:1309: warning: Function parameter or member 'ctx' not described in 'iwl_update_bcast_station' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:1348: warning: Function parameter or member 'priv' not described in 'iwl_sta_tx_modify_enable_tid' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:1348: warning: Function parameter or member 'sta_id' not described in 'iwl_sta_tx_modify_enable_tid' drivers/net/wireless/intel/iwlwifi/dvm/sta.c:1348: warning: Function parameter or member 'tid' not described in 'iwl_sta_tx_modify_enable_tid' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-8-lee.jones@linaro.org commit 7619ccceae49c7a1521a5b27952d70d003b3f560 Author: Lee Jones Date: Thu Sep 10 07:54:07 2020 +0100 iwlwifi: calib: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the sourcefile and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/dvm/calib.c:770: warning: Function parameter or member 'priv' not described in 'iwl_find_disconn_antenna' drivers/net/wireless/intel/iwlwifi/dvm/calib.c:770: warning: Function parameter or member 'average_sig' not described in 'iwl_find_disconn_antenna' drivers/net/wireless/intel/iwlwifi/dvm/calib.c:770: warning: Function parameter or member 'data' not described in 'iwl_find_disconn_antenna' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-6-lee.jones@linaro.org commit c8a11a84671e547c7b5d95aca06340f1644bfe95 Author: Lee Jones Date: Thu Sep 10 07:54:06 2020 +0100 iwlwifi: dvm: lib: Demote non-compliant kernel-doc headers Neither of these headers attempt to document any function parameters. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/dvm/lib.c:121: warning: Function parameter or member 'priv' not described in 'iwlagn_txfifo_flush' drivers/net/wireless/intel/iwlwifi/dvm/lib.c:121: warning: Function parameter or member 'scd_q_msk' not described in 'iwlagn_txfifo_flush' drivers/net/wireless/intel/iwlwifi/dvm/lib.c:779: warning: Function parameter or member 'priv' not described in 'iwlagn_set_rxon_chain' drivers/net/wireless/intel/iwlwifi/dvm/lib.c:779: warning: Function parameter or member 'ctx' not described in 'iwlagn_set_rxon_chain' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-5-lee.jones@linaro.org commit 229b5582deb5189362dc6293dd7f7b9eb7582acd Author: Lee Jones Date: Thu Sep 10 07:54:05 2020 +0100 iwlwifi: dvm: tx: Demote non-compliant kernel-doc headers None of these headers attempt to document any function parameters. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/dvm/tx.c:811: warning: Function parameter or member 'priv' not described in 'iwlagn_hwrate_to_tx_control' drivers/net/wireless/intel/iwlwifi/dvm/tx.c:811: warning: Function parameter or member 'rate_n_flags' not described in 'iwlagn_hwrate_to_tx_control' drivers/net/wireless/intel/iwlwifi/dvm/tx.c:811: warning: Function parameter or member 'info' not described in 'iwlagn_hwrate_to_tx_control' drivers/net/wireless/intel/iwlwifi/dvm/tx.c:1267: warning: Function parameter or member 'priv' not described in 'iwlagn_rx_reply_compressed_ba' drivers/net/wireless/intel/iwlwifi/dvm/tx.c:1267: warning: Function parameter or member 'rxb' not described in 'iwlagn_rx_reply_compressed_ba' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-4-lee.jones@linaro.org commit b392eabc6abe67df13a7db8abc649b99d35ddbad Author: Lee Jones Date: Thu Sep 10 07:54:04 2020 +0100 iwlwifi: rs: Demote non-compliant kernel-doc headers None of these headers attempt to document any function parameters. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/dvm/rs.c:165: warning: cannot understand function prototype: 'const u16 expected_tpt_legacy[IWL_RATE_COUNT] = ' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:329: warning: Function parameter or member 'priv' not described in 'rs_program_fix_rate' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:329: warning: Function parameter or member 'lq_sta' not described in 'rs_program_fix_rate' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:452: warning: Function parameter or member 'tbl' not described in 'rs_collect_tx_data' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:452: warning: Function parameter or member 'scale_index' not described in 'rs_collect_tx_data' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:452: warning: Function parameter or member 'attempts' not described in 'rs_collect_tx_data' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:452: warning: Function parameter or member 'successes' not described in 'rs_collect_tx_data' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:681: warning: Function parameter or member 'sta' not described in 'rs_use_green' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:702: warning: Function parameter or member 'lq_sta' not described in 'rs_get_supported_rates' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:702: warning: Function parameter or member 'hdr' not described in 'rs_get_supported_rates' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:702: warning: Function parameter or member 'rate_type' not described in 'rs_get_supported_rates' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:2628: warning: duplicate section name 'NOTE' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:2632: warning: Function parameter or member 'priv' not described in 'rs_initialize_lq' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:2632: warning: Function parameter or member 'sta' not described in 'rs_initialize_lq' drivers/net/wireless/intel/iwlwifi/dvm/rs.c:2632: warning: Function parameter or member 'lq_sta' not described in 'rs_initialize_lq' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-3-lee.jones@linaro.org commit 7cb391ffdf3ceb2ec27e5a457dc42c5fb0025123 Author: Lee Jones Date: Thu Sep 10 07:54:03 2020 +0100 iwlwifi: dvm: Demote non-compliant kernel-doc headers None of these headers attempt to document any function parameters. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlwifi/dvm/main.c:388: warning: Function parameter or member 't' not described in 'iwl_bg_statistics_periodic' drivers/net/wireless/intel/iwlwifi/dvm/main.c:545: warning: Function parameter or member 't' not described in 'iwl_bg_ucode_trace' drivers/net/wireless/intel/iwlwifi/dvm/main.c:771: warning: Function parameter or member 'priv' not described in 'iwl_alive_start' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1692: warning: Function parameter or member 'priv' not described in 'iwl_print_event_log' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1692: warning: Function parameter or member 'start_idx' not described in 'iwl_print_event_log' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1692: warning: Function parameter or member 'num_events' not described in 'iwl_print_event_log' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1692: warning: Function parameter or member 'mode' not described in 'iwl_print_event_log' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1692: warning: Function parameter or member 'pos' not described in 'iwl_print_event_log' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1692: warning: Function parameter or member 'buf' not described in 'iwl_print_event_log' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1692: warning: Function parameter or member 'bufsz' not described in 'iwl_print_event_log' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1772: warning: Function parameter or member 'priv' not described in 'iwl_print_last_event_logs' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1772: warning: Function parameter or member 'capacity' not described in 'iwl_print_last_event_logs' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1772: warning: Function parameter or member 'num_wraps' not described in 'iwl_print_last_event_logs' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1772: warning: Function parameter or member 'next_entry' not described in 'iwl_print_last_event_logs' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1772: warning: Function parameter or member 'size' not described in 'iwl_print_last_event_logs' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1772: warning: Function parameter or member 'mode' not described in 'iwl_print_last_event_logs' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1772: warning: Function parameter or member 'pos' not described in 'iwl_print_last_event_logs' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1772: warning: Function parameter or member 'buf' not described in 'iwl_print_last_event_logs' drivers/net/wireless/intel/iwlwifi/dvm/main.c:1772: warning: Function parameter or member 'bufsz' not described in 'iwl_print_last_event_logs' Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-2-lee.jones@linaro.org commit ba6ff70a3bb76c1ff440d3a0044b82e97abb648f Author: Rajkumar Manoharan Date: Sat Oct 3 15:04:18 2020 -0700 mac80211: copy configured beacon tx rate to driver The user is allowed to change beacon tx rate (HT/VHT/HE) from hostapd. This information needs to be passed to the driver when the rate control is offloaded to the firmware. The driver capability of allowing beacon rate is already validated in cfg80211, so simply passing the rate information to the driver is enough. Signed-off-by: Rajkumar Manoharan Link: https://lore.kernel.org/r/1601762658-15627-1-git-send-email-rmanohar@codeaurora.org [adjust commit message slightly] Signed-off-by: Johannes Berg commit a2d0230b91f7e23ceb5d8fb6a9799f30517ec33a Author: Srikar Dronamraju Date: Tue Sep 22 13:32:54 2020 +0530 cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_reboot_notifier The patch avoids allocating cpufreq_policy on stack hence fixing frame size overflow in 'powernv_cpufreq_reboot_notifier': drivers/cpufreq/powernv-cpufreq.c: In function powernv_cpufreq_reboot_notifier: drivers/cpufreq/powernv-cpufreq.c:906:1: error: the frame size of 2064 bytes is larger than 2048 bytes Fixes: cf30af76 ("cpufreq: powernv: Set the cpus to nominal frequency during reboot/kexec") Signed-off-by: Srikar Dronamraju Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200922080254.41497-1-srikar@linux.vnet.ibm.com commit 9686e431c683ee7b8aca0f3985c244aee3d9f30d Author: Christophe Leroy Date: Thu Oct 1 12:42:44 2020 +0000 powerpc/time: Make get_tb() common to PPC32 and PPC64 mftbu() is always defined now, so the #ifdef can be removed and replaced by an IS_ENABLED(CONFIG_PPC64) inside the PPC32 version of get_tb(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/47e49717d2643169ffcbe5d507f184cf49f0fe95.1601556145.git.christophe.leroy@csgroup.eu commit 1156a6285cd38e5a6987ddee3758e7954c56cb3d Author: Christophe Leroy Date: Thu Oct 1 12:42:43 2020 +0000 powerpc/time: Make get_tbl() common to PPC32 and PPC64 On PPC64, get_tbl() is defined as an alias of get_tb() which return the result of mftb(). That exactly the same as what the PPC32 version does. We don't need two versions. Remove the PPC64 definition of get_tbl() and use the PPC32 version for both. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a8eaabb87d69534e533ebac805163e08146e05bd.1601556145.git.christophe.leroy@csgroup.eu commit e8d5bf30eafc37e31ce68bc7ccf1db970fe3cd04 Author: Christophe Leroy Date: Thu Oct 1 12:42:42 2020 +0000 powerpc/time: Remove get_tbu() get_tbu() is redundant with mftbu() and is not used anymore. Remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1746e2d11ea90c3f45877e1fcc6c79ce96cf6b98.1601556145.git.christophe.leroy@csgroup.eu commit 942e89115b588b4b5df86930b5302a5c07b820ba Author: Christophe Leroy Date: Thu Oct 1 12:42:41 2020 +0000 powerpc/time: Avoid using get_tbl() and get_tbu() internally get_tbl() is confusing as it returns the content of TBL register on PPC32 but the concatenation of TBL and TBU on PPC64. Use mftb() instead. Do the same with get_tbu() for consistency allthough it's name is less confusing. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/41573406a4eab98838decaa91649086fef1e6119.1601556145.git.christophe.leroy@csgroup.eu commit ff125fbcd45d1706861579dbe66e31f5b3f1e779 Author: Christophe Leroy Date: Thu Oct 1 12:42:40 2020 +0000 powerpc/time: Make mftb() common to PPC32 and PPC64 No need to have two versions that are identical. CONFIG_PPC_CELL is only selected by PPC64 targets. CONFIG_E500 is the only PPC64 target selecting CONFIG_FSL_BOOK3E. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6bf23ec744aab4ba63506a011f6a145ea35d620d.1601556145.git.christophe.leroy@csgroup.eu commit 15c102153e722cc6e0729764a7068c209a7469cd Author: Christophe Leroy Date: Thu Oct 1 12:42:39 2020 +0000 powerpc/time: Rename mftbl() to mftb() On PPC64, we have mftb(). On PPC32, we have mftbl() and an #define mftb() mftbl(). mftb() and mftbl() are equivalent, their purpose is to read the content of SPRN_TRBL, as returned by 'mftb' simplified instruction. binutils seems to define 'mftbl' instruction as an equivalent of 'mftb'. However in both 32 bits and 64 bits documentation, only 'mftb' is defined, and when performing a disassembly with objdump, the displayed instruction is 'mftb' No need to have two ways to do the same thing with different names, rename mftbl() to have only mftb(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/94dc68d3d9ef9eb549796d4b938b6ba0305a049b.1601556145.git.christophe.leroy@csgroup.eu commit 865418795a1dea1c2b58a5fd7b6bdcb93e0c36b8 Author: Christophe Leroy Date: Tue Oct 6 09:05:37 2020 +0000 powerpc/32s: Remove #ifdef CONFIG_PPC_BOOK3S_32 in head_book3s_32.S head_book3s_32.S is only built when CONFIG_PPC_BOOK3S_32 is selected. Remove all conditions based on CONFIG_PPC_BOOK3S_32 in the file. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1b68632425d8866d147aea9005004e4594672211.1601975100.git.christophe.leroy@csgroup.eu commit 533090e5a980ad80bbe0961b4ed45a9bcf55cc0c Author: Christophe Leroy Date: Tue Oct 6 09:05:26 2020 +0000 powerpc/32s: Rename head_32.S to head_book3s_32.S Unlike PPC64 which had a single head_64.S, PPC32 are multiple ones. There is the head_32.S, selected by default based on the value of BITS and overridden based on some CONFIG_ values. This leads to thinking that it may be selected by different types of PPC32 platform but indeed it ends up being selected by book3s/32 only. Make that explicit by: - Not doing any default selection based on BITS. - Renaming head_32.S to head_book3s_32.S. - Get head_book3s_32.S selected only by CONFIG_PPC_BOOK3S_32. Signed-off-by: Christophe Leroy [mpe: Fix head_$(BITS).o reference in arch/powerpc/Makefile] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/319d379f696412681c66a987cc75e6abf8f958d2.1601975100.git.christophe.leroy@csgroup.eu commit 69a1593abdbcf03a76367320d929a8ae7a5e3d71 Author: Christophe Leroy Date: Thu Oct 1 15:35:38 2020 +0000 powerpc/32s: Setup the early hash table at all time. At the time being, an early hash table is set up when CONFIG_KASAN is selected. There is nothing wrong with setting such an early hash table all the time, even if it is not used. This is a statically allocated 256 kB table which lies in the init data section. This makes the code simpler and may in the future allow to setup early IO mappings with fixmap instead of hard coding BATs. Put create_hpte() and flush_hash_pages() in the .ref.text section in order to avoid warning for the reference to early_hash[]. This reference is removed by MMU_init_hw_patch() before init memory is freed. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b8f8101c368b8a6451844a58d7bd7d83c14cf2aa.1601566529.git.christophe.leroy@csgroup.eu commit 63f9d9df5ed0d4f3a2c0cd08730e1cae1edd11bf Author: Christophe Leroy Date: Thu Oct 1 10:59:19 2020 +0000 powerpc/time: Remove ifdef in get_dec() and set_dec() Move SPRN_PIT definition in reg.h. This allows to remove ifdef in get_dec() and set_dec() and makes them more readable. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3c9a6eb0fc040868ac59be66f338d08fd017668d.1601549945.git.christophe.leroy@csgroup.eu commit 6601ec1c2ba929430f5585ce7f9d9960b0e0a01d Author: Christophe Leroy Date: Tue Sep 29 06:48:39 2020 +0000 powerpc: Remove get_tb_or_rtc() 601 is gone, get_tb_or_rtc() is equivalent to get_tb(). Replace the former by the later. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3e8a13ee83418630c753c30cb722ae682d5b2d39.1601362098.git.christophe.leroy@csgroup.eu commit a4c5a355422920bcbfe3fd1f01aead2d3a2a820c Author: Christophe Leroy Date: Tue Sep 29 06:48:38 2020 +0000 powerpc: Remove __USE_RTC() Now that PowerPC 601 is gone, __USE_RTC() is never true. Remove it. That also leads to removing get_rtc() and get_rtcl() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4757e1ed21fe1968c761ae081d1f3d790a9673f8.1601362098.git.christophe.leroy@csgroup.eu commit 2e38ea486615bddbc7a42d002aee93a3a9e7a36f Author: Christophe Leroy Date: Tue Sep 29 06:48:37 2020 +0000 powerpc: Tidy up a bit after removal of PowerPC 601. The removal of the 601 left some standalone blocks from former if/else. Drop the { } and re-indent. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/31c4cd093963f22831bf388449056ee045533d3b.1601362098.git.christophe.leroy@csgroup.eu commit 8b14e1dff067195dca7a42321771437cb33a99e9 Author: Christophe Leroy Date: Tue Sep 29 06:48:36 2020 +0000 powerpc: Remove support for PowerPC 601 PowerPC 601 has been retired. Remove all associated specific code. CPU_FTRS_PPC601 has CPU_FTR_COHERENT_ICACHE and CPU_FTR_COMMON. CPU_FTR_COMMON is already present via other CPU_FTRS. None of the remaining CPU selects CPU_FTR_COHERENT_ICACHE. So CPU_FTRS_PPC601 can be removed from the possible features, hence can be removed completely. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/60b725d55e21beec3335175c20b77903ff98284f.1601362098.git.christophe.leroy@csgroup.eu commit f0ed73f3fa2cdca65973659689ec9e46d99a5f60 Author: Christophe Leroy Date: Tue Sep 29 06:48:35 2020 +0000 powerpc: Remove PowerPC 601 Powerpc 601 is 25 years old. It is not selected by any defconfig. It requires a lot of special handling as it deviates from the standard 6xx. Retire it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/00a6948d659e017f8ca63437d1384222c3aede57.1601362098.git.christophe.leroy@csgroup.eu commit d2a5cd83ee984c0e9fc172d2df9591c264261a52 Author: Christophe Leroy Date: Tue Sep 29 06:48:34 2020 +0000 powerpc: Drop SYNC_601() ISYNC_601() and SYNC() Those macros are now empty at all time. Drop them. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7990bb63fc53e460bfa94f8040184881d9e6fbc3.1601362098.git.christophe.leroy@csgroup.eu commit e42a64002a507bf61e57106ed5323b1854371563 Author: Christophe Leroy Date: Tue Sep 29 06:48:33 2020 +0000 powerpc: Remove CONFIG_PPC601_SYNC_FIX This config option isn't in any defconfig. The very first versions of Powerpc 601 have a bug which requires additional sync before and/or after some instructions. This was more than 25 years ago and time has come to retire those buggy versions of the 601 from the kernel. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/55b46bff16705b1ae7bf0a60ccd522b1010ebf75.1601362098.git.christophe.leroy@csgroup.eu commit ca1d3443b4dd1e8f152bd6c881ddb3eb2996179a Author: Christophe Leroy Date: Tue Sep 29 06:48:31 2020 +0000 powerpc: Remove SYNC on non 6xx SYNC is usefull for Powerpc 601 only. On everything else, SYNC is empty. Remove it from code that is not made to run on 6xx. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/27951fa6c9a8f80724d1bc81a6117ac32343a55d.1601362098.git.christophe.leroy@csgroup.eu commit fc143e38ddd47d3b01ac276786ee78edf053bf5d Author: Vinod Koul Date: Wed Oct 7 14:01:13 2020 +0530 dmaengine: owl-dma: fix kernel-doc style for enum Driver doesn't use keyword enum for enum owl_dmadesc_offsets resulting in warning: drivers/dma/owl-dma.c:139: warning: cannot understand function prototype: 'enum owl_dmadesc_offsets ' So add the keyword to fix it and also add documentation for missing OWL_DMADESC_SIZE Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201007083113.567559-6-vkoul@kernel.org Signed-off-by: Vinod Koul commit 2997ced4eca9b57eabb777141d9db0148d0922f1 Author: Vinod Koul Date: Wed Oct 7 14:01:12 2020 +0530 dmaengine: zynqmp_dma: fix kernel-doc style for tasklet Commit f19a11d40a78 ("dmaengine: xilinx: convert tasklets to use new tasklet_setup() API") updated driver to use new tasklet_setup() API but missed to update the documentation for the tasklet function. Fixes: f19a11d40a78 ("dmaengine: xilinx: convert tasklets to use new tasklet_setup() API") Acked-by: Michal Simek Link: https://lore.kernel.org/r/20201007083113.567559-5-vkoul@kernel.org Signed-off-by: Vinod Koul commit d11913f2fb39af2c1f334fba2dd30d3561c5b3a9 Author: Vinod Koul Date: Wed Oct 7 14:01:11 2020 +0530 dmaengine: xilinx_dma: fix kernel-doc style for tasklet Commit f19a11d40a78 ("dmaengine: xilinx: convert tasklets to use new tasklet_setup() API") updated driver to use new tasklet_setup() API but missed to update the documentation for the tasklet function. Fixes: f19a11d40a78 ("dmaengine: xilinx: convert tasklets to use new tasklet_setup() API") Acked-by: Michal Simek Link: https://lore.kernel.org/r/20201007083113.567559-4-vkoul@kernel.org Signed-off-by: Vinod Koul commit a5e399a5a0996674f2b800a757deb6d475a12ef1 Author: Vinod Koul Date: Wed Oct 7 14:01:10 2020 +0530 dmaengine: qcom: bam_dma: fix kernel-doc style for tasklet Commit 00c4747a2f64 ("dmaengine: qcom: convert tasklets to use new tasklet_setup() API") updated driver to use new tasklet_setup() API but missed to update the documentation for the tasklet function. Fixes: 00c4747a2f64 ("dmaengine: qcom: convert tasklets to use new tasklet_setup() API") Link: https://lore.kernel.org/r/20201007083113.567559-3-vkoul@kernel.org Signed-off-by: Vinod Koul commit 62e13a583066c12308ed10f0a45ddc44b444c898 Author: Vinod Koul Date: Wed Oct 7 14:01:09 2020 +0530 dmaengine: altera-msgdma: fix kernel-doc style for tasklet Commit 6752e40d669a ("dmaengine: altera-msgdma: convert tasklets to use new tasklet_setup() API") updated driver to use new tasklet_setup() API but missed to update the documentation for the tasklet function. Fixes: 6752e40d669a ("dmaengine: altera-msgdma: convert tasklets to use new tasklet_setup() API") Link: https://lore.kernel.org/r/20201007083113.567559-2-vkoul@kernel.org Signed-off-by: Vinod Koul commit db1af1e9712920f47b5dc6a995fca3eec05ea85e Author: Wolfram Sang Date: Thu Oct 8 11:25:33 2020 +0200 mmc: renesas_sdhi: workaround a regression when reinserting SD cards After the conversions of the reset routines, re-inserting SD cards didn't work anymore. Apply this temporary workaround to have working SD cards during the merge window. The issue will be fixed properly until the final release. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20201008092533.76588-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit efc7d01a9ecdc59946fad1743d96a0db9925064c Author: Mauro Carvalho Chehab Date: Mon Oct 5 11:38:37 2020 +0200 docs: net: 80211: reduce docs build time the files under /80211 calls kernel-doc script 207 times, one for each single function and doc chapter. Due to that, it takes a lot of time handling it: $ touch Documentation/driver-api/80211/*rst && time make SPHINXDIRS=driver-api/80211 htmldocs ... real 0m22,928s user 0m21,644s sys 0m1,334s Reduce the build time by doing only one kernel-doc call per functions that belong to the same group. With that, there's now 50 calls to kernel-doc, which makes the build time for those docs 62% faster: $ touch Documentation/driver-api/80211/*rst && time make SPHINXDIRS=driver-api/80211 htmldocs ... real 0m8,666s user 0m8,084s sys 0m0,642s As a side effect, it should now be easier to add newer functions, as there's no need to repeat the kernel-doc pattern. Measurements made on a NUC8i7HNK machine with lots of ram and a fast SSD disk with Sphinx 3.2.1. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/f0085721d85ebc3a77164b457ed948eee48b55df.1601890703.git.mchehab+huawei@kernel.org Signed-off-by: Johannes Berg commit c1cd35c6060140cebf85f43f8c702abef9eca997 Author: Thomas Pedersen Date: Mon Oct 5 09:51:22 2020 -0700 cfg80211: only allow S1G channels on S1G band As discovered by syzbot, cfg80211 was accepting S1G channel widths on non-S1G bands. Add a check for this, and consolidate the 1MHz frequency check as it ends up being a subset of the others. Reported-by: syzbot+92715a0eccd6c881bc32@syzkaller.appspotmail.com Fixes: 11b34737b18a ("nl80211: support setting S1G channels") Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20201005165122.17583-1-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 12bf8fad4ca3cf712f80766be017a521757e14c7 Author: Thomas Pedersen Date: Mon Oct 5 09:45:22 2020 -0700 mac80211: initialize last_rate for S1G STAs last_rate is initialized to zero by sta_info_alloc(), but this indicates legacy bitrate for the last TX rate (and invalid for the last RX rate). To avoid a warning when decoding the last rate as legacy (before a data frame has been sent), initialize them as S1G MCS. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20201005164522.18069-2-thomas@adapt-ip.com [rename to ieee80211_s1g_sta_rate_init(), seems more appropriate] Signed-off-by: Johannes Berg commit b3149ffcdb31a8eb854cc442a389ae0b539bf28a Author: Borislav Petkov Date: Wed Oct 7 18:55:35 2020 +0200 x86/mce: Allow for copy_mc_fragile symbol checksum to be generated Add asm/mce.h to asm/asm-prototypes.h so that that asm symbol's checksum can be generated in order to support CONFIG_MODVERSIONS with it and fix: WARNING: modpost: EXPORT symbol "copy_mc_fragile" [vmlinux] version \ generation failed, symbol will not be versioned. For reference see: 4efca4ed05cb ("kbuild: modversions for EXPORT_SYMBOL() for asm") 334bb7738764 ("x86/kbuild: enable modversions for symbols exported from asm") Fixes: ec6347bb4339 ("x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}()") Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201007111447.GA23257@zn.tnic commit 8b783d104e7f40684333d2ec155fac39219beb2f Author: Thomas Pedersen Date: Mon Oct 5 09:45:21 2020 -0700 mac80211: handle lack of sband->bitrates in rates Even though a driver or mac80211 shouldn't produce a legacy bitrate if sband->bitrates doesn't exist, don't crash if that is the case either. This fixes a kernel panic if station dump is run before last_rate can be updated with a data frame when sband->bitrates is missing (eg. in S1G bands). Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20201005164522.18069-1-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 46dd40aa376c8158b6aa17510079caf5c3af6237 Author: Thomas Bogendoerfer Date: Wed Oct 7 12:17:04 2020 +0200 MIPS: SGI-IP28: disable use of ll/sc in kernel SGI-IP28 systems only use broken R10k rev 2.5 CPUs, which could lock up, if ll/sc sequences are issued in certain order. Since those systems are all non-SMP, we can disable ll/sc usage in kernel. Signed-off-by: Thomas Bogendoerfer commit 43fab0856eafb32d5cdb809d8225197755826128 Author: Thomas Bogendoerfer Date: Tue Oct 6 15:58:37 2020 +0200 MIPS: tx49xx: move tx4939_add_memory_regions into only user tx4939_add_memory_regions() is only used in txx9/rbtx4939/prom.c. Signed-off-by: Thomas Bogendoerfer commit 78eef5d952610b8a9c94cfee19ab83b64135e189 Author: Ivan Zaentsev Date: Thu Oct 8 08:42:59 2020 +0300 docs: w1: w1_therm: Fix broken xref, mistakes, clarify text sysfs attribute names are mixed with the same normal text terms. Use ReST to distinguish. Fix typos and mistakes. Reported-by: Mauro Carvalho Chehab Signed-off-by: Ivan Zaentsev Link: https://lore.kernel.org/r/20201008054259.5461-1-ivan.zaentsev@wirenboard.ru Signed-off-by: Greg Kroah-Hartman commit afb487a31d33e250511cd1774368775df8a6f43e Author: Badhri Jagan Sridharan Date: Wed Oct 7 23:15:49 2020 -0700 usb: typec: tcpci_maxim: Add support for Sink FRS Upon receiving ALERT_EXTENDED.TCPC_SINK_FAST_ROLE_SWAP signal tcpm to start Sink fast role swap signal. Inform when TCPM is sourcing vbus. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201008061556.1402293-9-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 11121c2406c8cc0ee493644233fbdc7fe0598981 Author: Badhri Jagan Sridharan Date: Wed Oct 7 23:15:48 2020 -0700 usb: typec: tcpci: Implement callbacks for FRS Implement tcpc.enable_frs to enable TCPC to receive Fast role swap signal. Additionally set the sink disconnect threshold to 4v to prevent disconnect during Fast Role swap. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201008061556.1402293-8-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 8dc4bd073663fa8aba2fae08b1c23ab41a2e97a2 Author: Badhri Jagan Sridharan Date: Wed Oct 7 23:15:47 2020 -0700 usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS) PD 3.0 spec defines a new mechanism for power role swap called Fast role swap. This change enables TCPM to support FRS when acting as sink. Once the explicit contract is negotiated, sink port is expected to query the source port for sink caps to determine whether the source is FRS capable. Bits 23 & 24 of fixed pdo of the sink caps from the source, when set, indicates the current needed by the source when fast role swap is in progress(Implicit contract phasae). 0 indicates that the source does not support Fast Role Swap. Upon receiving the FRS signal from the source, TCPC(TCPM_FRS_EVENT) informs TCPM to start the Fast role swap sequence. 1. TCPM sends FRS PD message: FR_SWAP_SEND 2. If response is not received within the expiry of SenderResponseTimer, Error recovery is triggered.: FR_SWAP_SEND_TIMEOUT 3. Upon receipt of the accept message, TCPM waits for PSSourceOffTimer for PS_READY message from the partner: FR_SWAP_SNK_SRC_NEW_SINK_READY. TCPC is expected to autonomously turn on vbus once the FRS signal is received and vbus voltage falls below vsafe5v within tSrcFrSwap. This is different from traditional power role swap where the vbus sourcing is turned on by TCPM. 4. By this time, TCPC most likely would have started to source vbus, TCPM waits for tSrcFrSwap to see if the lower level TCPC driver signals TCPM_SOURCING_VBUS event: FR_SWAP_SNK_SRC_SOURCE_VBUS_APPLIED. 5. When TCPC signals sourcing vbus, TCPM sends PS_READY msg and changes the CC pin from Rd to Rp. This is the end of fast role swap sequence and TCPM initiates the sequnce to negotiate explicit contract by transitioning into SRC_STARTUP after SwapSrcStart. The code is written based on the sequence described in "Figure 8-107: Dual-role Port in Sink to Source Fast Role Swap State Diagram" of USB Power Delivery Specification Revision 3.0, Version 1.2. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201008061556.1402293-7-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 6f413b559f86a2894188e082e389ff95ee428345 Author: Badhri Jagan Sridharan Date: Wed Oct 7 23:15:45 2020 -0700 usb: typec: tcpci_maxim: Chip level TCPC driver Chip level TCPC driver for Maxim's TCPCI implementation. This TCPC implementation does not support the following commands: COMMAND.SinkVbus, COMMAND.SourceVbusDefaultVoltage, COMMAND.SourceVbusHighVoltage. Instead the sinking and sourcing from vbus is supported by writes to custom registers. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201008061556.1402293-5-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit b9358a068490d0a590a860a75869853f0b6e8aee Author: Badhri Jagan Sridharan Date: Wed Oct 7 23:15:43 2020 -0700 usb: typec: tcpci: Add set_vbus tcpci callback set_vbus callback allows TCPC which are TCPCI based, however, does not support turning on sink and source mode through Command.SinkVbus and Command.SourceVbusDefaultVoltage. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201008061556.1402293-3-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 58ea326b228c3525b234adcc49ba94e44ebf529b Author: Badhri Jagan Sridharan Date: Wed Oct 7 23:15:42 2020 -0700 usb: typec: tcpci: Add a getter method to retrieve tcpm_port reference Allow chip level drivers to retrieve reference to tcpm_port. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20201008061556.1402293-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 51fbad388c855320de84c17c2cd6a9ede9fce854 Author: Mauro Carvalho Chehab Date: Thu Oct 8 08:24:53 2020 +0200 misc: Kconfig: fix a HISI_HIKEY_USB dependency The dependency should be just USB_ROLE_SWITCH, instead of CONFIG_USB_ROLE_SWITCH. Fixes: 2827d98bc5d6 ("misc: Kconfig: add a new dependency for HISI_HIKEY_USB") Reported-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/0b6dff854c4bb412c2c11f17803e84d61385415f.1602138248.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5b380f242f360256c96e96adabeb7ce9ec784306 Author: Rajendra Nayak Date: Tue Sep 1 16:20:22 2020 +0200 media: dt-bindings: media: venus: Add an optional power domain for perf voting Venus needs to vote for the performance state of a power domain (cx) to be able to support DVFS. This 'cx' power domain is controlled by rpmh and is a common power domain (scalable) not specific to venus alone. This is optional in the sense that, leaving this power domain out does not really impact the functionality but just makes the platform a little less power efficient. Signed-off-by: Rajendra Nayak Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Signed-off-by: Mauro Carvalho Chehab commit 811b8d66f936f48ec8ed330756c6be226cf28b68 Author: Lad Prabhakar Date: Fri Oct 2 12:26:52 2020 +0200 media: rcar-vin: rcar-dma: Fix setting VNIS_REG for RAW8 formats pixelformat in vin priv structure holds V4L2_PIX_FMT_* and not MEDIA_BUS_FMT_* so make sure we check against V4L2_PIX_FMT_* formats while setting the VNIS_REG. Fixes: 8c3e0f67df6c9 ("media: rcar-vin: Extend RAW8 support to all RGB layouts") Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fd777da3e7a66617d7a04eaa5e003270b02119aa Author: Niklas Söderlund Date: Mon Sep 28 23:02:50 2020 +0200 media: staging: rkisp1: uapi: Do not use BIT() macro The BIT() macro is not available to uAPI headers, replace the few usages of it by open coding it. Signed-off-by: Niklas Söderlund Acked-by: Dafna Hirschfeld Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1efe3c28eba1306b007f4cb9303a5646b47cb11b Author: Ezequiel Garcia Date: Mon Sep 28 16:03:34 2020 +0200 media: v4l2-mem2mem: Fix spurious v4l2_m2m_buf_done A seemingly bad rebase introduced a spurious v4l2_m2m_buf_done, which releases a buffer twice and therefore triggers a noisy warning on each job: WARNING: CPU: 0 PID: 0 at drivers/media/common/videobuf2/videobuf2-core.c:986 vb2_buffer_done+0x208/0x2a0 Fix it by removing the spurious v4l2_m2m_buf_done. Reported-by: Adrian Ratiu Fixes: 911ea8ec42dea ("media: v4l2-mem2mem: add v4l2_m2m_suspend, v4l2_m2m_resume") Signed-off-by: Ezequiel Garcia Tested-by: Adrian Ratiu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bf65f8aabdb37bc1a785884374e919477fe13e10 Author: Oliver Neukum Date: Thu Sep 24 11:14:10 2020 +0200 media: usbtv: Fix refcounting mixup The premature free in the error path is blocked by V4L refcounting, not USB refcounting. Thanks to Ben Hutchings for review. [v2] corrected attributions Signed-off-by: Oliver Neukum Fixes: 50e704453553 ("media: usbtv: prevent double free in error case") CC: stable@vger.kernel.org Reported-by: Ben Hutchings Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3093e7c16e12d729c325adb3c53dde7308cefbd8 Author: Herbert Xu Date: Wed Oct 7 17:05:45 2020 +1100 X.509: Fix modular build of public_key_sm2 The sm2 code was split out of public_key.c in a way that breaks modular builds. This patch moves the code back into the same file as the original motivation was to minimise ifdefs and that has nothing to do with splitting the code out. Fixes: 215525639631 ("X.509: support OSCCA SM2-with-SM3...") Reported-by: kernel test robot Signed-off-by: Herbert Xu commit 10b0f78a73237181260fc3661577d59b475f8a20 Author: Nathan Chancellor Date: Tue Oct 6 12:58:48 2020 -0700 crypto: xor - Remove unused variable count in do_xor_speed Clang warns: crypto/xor.c:101:4: warning: variable 'count' is uninitialized when used here [-Wuninitialized] count++; ^~~~~ crypto/xor.c:86:17: note: initialize the variable 'count' to silence this warning int i, j, count; ^ = 0 1 warning generated. After the refactoring to use ktime that happened in this function, count is only assigned, never read. Just remove the variable to get rid of the warning. Fixes: c055e3eae0f1 ("crypto: xor - use ktime for template benchmarking") Link: https://github.com/ClangBuiltLinux/linux/issues/1171 Signed-off-by: Nathan Chancellor Reviewed-by: Douglas Anderson Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 4f28945da0c502c794eb4e4d535d3ba65d3c9769 Author: Tianjia Zhang Date: Mon Oct 5 22:46:28 2020 +0800 X.509: fix error return value on the failed path When memory allocation fails, an appropriate return value should be set. Fixes: 215525639631 ("X.509: support OSCCA SM2-with-SM3 certificate verification") Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu commit 10a2f0b311094ffd45463a529a410a51ca025f27 Author: Herbert Xu Date: Fri Oct 2 17:55:22 2020 +1000 crypto: bcm - Verify GCM/CCM key length in setkey The setkey function for GCM/CCM algorithms didn't verify the key length before copying the key and subtracting the salt length. This patch delays the copying of the key til after the verification has been done. It also adds checks on the key length to ensure that it's at least as long as the salt. Fixes: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver") Cc: Reported-by: kiyin(尹亮) Signed-off-by: Herbert Xu commit 789f900b70b9125ed473e1eb4699dc7d298694e7 Author: Giovanni Cabiddu Date: Wed Sep 30 23:22:11 2020 +0100 crypto: qat - drop input parameter from adf_enable_aer() Remove pointer to struct pci_driver from function adf_enable_aer() as it is possible to get it directly from pdev->driver. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Wojciech Ziemba Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 83e6a1946aa043ef7a286cc7ed157237995d0425 Author: Giovanni Cabiddu Date: Wed Sep 30 23:17:47 2020 +0100 crypto: qat - fix function parameters descriptions Fix description of function parameters. This is to fix the following warnings when compiling the driver with W=1: drivers/crypto/qat/qat_common/adf_sriov.c:133: warning: Function parameter or member 'numvfs' not described in 'adf_sriov_configure' drivers/crypto/qat/qat_common/adf_dev_mgr.c:296: warning: Function parameter or member 'pci_dev' not described in 'adf_devmgr_pci_to_accel_dev' drivers/crypto/qat/qat_common/adf_dev_mgr.c:296: warning: Excess function parameter 'accel_dev' description in 'adf_devmgr_pci_to_accel_dev' Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit c881fb5cd5ffc407f78878cc43ce13699946844d Author: ching Huang Date: Mon Sep 28 18:38:09 2020 +0800 scsi: arcmsr: Update driver version to v1.50.00.02-20200819 Update driver version to v1.50.00.02-20200819. Link: https://lore.kernel.org/r/b41f9af781bc36f4e5f82fccabc86ebbd0e587f8.camel@areca.com.tw Signed-off-by: ching Huang Signed-off-by: Martin K. Petersen commit ae897ae28f9a1da2e04779a16f0a1112804a58fb Author: ching Huang Date: Mon Sep 28 18:35:05 2020 +0800 scsi: arcmsr: Add support for ARC-1886 series RAID controllers Add support for ARC-1886 series RAID controllers. [mkp: apply zeroday build warning fixes] Link: https://lore.kernel.org/r/78ae03d0ac05054c721cc3a94f41f9e656a5e176.camel@areca.com.tw Signed-off-by: ching Huang Signed-off-by: Martin K. Petersen commit 893f4a14b115c7c9fca3c78bc42d30548cd76686 Author: ching Huang Date: Mon Sep 28 18:31:27 2020 +0800 scsi: arcmsr: Fix device hot-plug monitoring timer stop Fix device hot-plug monitoring timer stop. Link: https://lore.kernel.org/r/969213d4f124e230c3febc01e2b1db291bf4585c.camel@areca.com.tw Signed-off-by: ching Huang Signed-off-by: Martin K. Petersen commit 9aae1c1fe627c850da1cc2eba02af98e060251d3 Author: ching Huang Date: Mon Sep 28 18:45:32 2020 +0800 scsi: arcmsr: Remove unnecessary syntax Remove unnecessary syntax. Link: https://lore.kernel.org/r/29486c1a50df3bb1312fb9d6a2dec075f212e4d5.camel@areca.com.tw Signed-off-by: ching Huang Signed-off-by: Martin K. Petersen commit 39a45d538dba5f0ff0a056f0dcdbf3ac30a7beb7 Author: Viswas G Date: Mon Oct 5 20:20:11 2020 +0530 scsi: pm80xx: Driver version update Update driver version from "0.1.39" -> "0.1.40" Link: https://lore.kernel.org/r/20201005145011.23674-5-Viswas.G@microchip.com.com Acked-by: Jack Wang Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Martin K. Petersen commit 5a141315ed7c2647fa4518570c4941a02588b466 Author: Viswas G Date: Mon Oct 5 20:20:10 2020 +0530 scsi: pm80xx: Increase the number of outstanding I/O supported to 1024 The pm80xx driver currently sets the controller queue depth to 256. Hoewver, the controller supports outstanding I/Os up 1024. Increase the number of outstanding I/Os from 256 to 1024. CCBs and tags are allocated according to outstanding I/Os. Also update the can_queue value (max_out_io - PM8001_RESERVE_SLOT) used by the SCSI midlayer. [mkp: fixed zeroday complaint] Link: https://lore.kernel.org/r/20201005145011.23674-4-Viswas.G@microchip.com.com Reported-by: kernel test robot Acked-by: Jack Wang Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Martin K. Petersen commit 27bc43bd7c42b3995d16ad63794e355ae865a3a3 Author: Viswas G Date: Mon Oct 5 20:20:09 2020 +0530 scsi: pm80xx: Remove DMA memory allocation for ccb and device structures Remove DMA memory allocation for Devices and CCB structure. Instead allocate memory outside of DMA memory. DMA memory is a limited system resource and it is better to allocate memory outside of DMA memory when possible. Link: https://lore.kernel.org/r/20201005145011.23674-3-Viswas.G@microchip.com.com Acked-by: Jack Wang Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Martin K. Petersen commit 05c6c029a44d9f43715577e33e95eba87f44d285 Author: Viswas G Date: Mon Oct 5 20:20:08 2020 +0530 scsi: pm80xx: Increase number of supported queues Current driver uses fixed number of Inbound and Outbound queues and all of the I/O, TMF and internal requests are submitted through those. A global spin lock is used to control the shared access. This can create a lock contention and it is real bottleneck in the I/O path. To avoid this, the number of supported Inbound and Outbound queues is increased to 64, and the number of queues used is decided based on number of CPU cores online and number of MSI-X vectors allocated. Also add locks per queue instead of using the global lock. Link: https://lore.kernel.org/r/20201005145011.23674-2-Viswas.G@microchip.com.com Acked-by: Jack Wang Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Martin K. Petersen commit 1725ba8d6ff1e98ce9d1f79d2bad7580cceace05 Author: Colin Ian King Date: Tue Oct 6 12:02:52 2020 +0100 scsi: sym53c8xx_2: Fix sizeof() mismatch An incorrect sizeof() is being used, struct sym_ccb ** is not correct, it should be struct sym_ccb *. Note that since ** is the same size as * this is not causing any issues. Improve this fix by using the idiom sizeof(*np->ccbh) as this allows one to not even reference the type of the pointer. [ Note: this is an ancient 2005 buglet, the sha is from the tglx/history repo ] Link: https://lore.kernel.org/r/20201006110252.536641-1-colin.king@canonical.com Fixes: 473c67f96e06 ("[PATCH] sym2 version 2.2.0") Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") commit 45660591ee8f5b08bfc6e3aec50639df82a19ca3 Author: Christophe JAILLET Date: Sat Oct 3 07:57:09 2020 +0200 scsi: isci: Fix a typo in a comment s/remtoe/remote/ and add a missing '.' Link: https://lore.kernel.org/r/20201003055709.766119-1-christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit 5ccdd101351df3b981b9a36f3f039e6afa531cdf Author: Ye Bin Date: Wed Sep 30 10:22:28 2020 +0800 scsi: qla4xxx: Fix inconsistent format argument type Fix the following warning: [drivers/scsi/qla4xxx/ql4_nx.c:3228]: (warning) %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. Link: https://lore.kernel.org/r/20200930022228.2840587-1-yebin10@huawei.com Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit fc29f04a5c6b946bde125a36b2bfe5414c7c03f7 Author: Ye Bin Date: Wed Sep 30 10:16:37 2020 +0800 scsi: myrb: Fix inconsistent format argument types Fix the following warnings: [drivers/scsi/myrb.c:1052]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/scsi/myrb.c:1052]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [drivers/scsi/myrb.c:1052]: (warning) %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [drivers/scsi/myrb.c:2170]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. Link: https://lore.kernel.org/r/20200930021637.2831618-1-yebin10@huawei.com Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit 5f6dcb55a7fa347a0c72fc5afb860e4012628902 Author: Jing Xiangfeng Date: Tue Sep 29 10:24:58 2020 +0800 scsi: myrb: Remove redundant assignment to variable timeout The variable timeout has been initialized with a value '0'. The assignment before while loop is redundant. Remove it. Link: https://lore.kernel.org/r/20200929022458.40652-1-jingxiangfeng@huawei.com Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit f0f6c3a4fcb80fcbcce4ff6739996dd98c228afd Author: Jing Xiangfeng Date: Fri Sep 25 14:24:23 2020 +0800 scsi: bfa: Fix error return in bfad_pci_init() Fix to return error code -ENODEV from the error handling case instead of 0. Link: https://lore.kernel.org/r/20200925062423.161504-1-jingxiangfeng@huawei.com Fixes: 11ea3824140c ("scsi: bfa: fix calls to dma_set_mask_and_coherent()") Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit de6c063fa09a671cce7bea996cfe2a9288f794a8 Author: Qinglang Miao Date: Mon Sep 21 21:11:02 2020 +0800 scsi: fcoe: Simplify the return expression of fcoe_sysfs_setup() Simplify the return expression. Link: https://lore.kernel.org/r/20200921131102.93084-1-miaoqinglang@huawei.com Signed-off-by: Qinglang Miao Signed-off-by: Martin K. Petersen commit 6afc12fa6e503670939f75e4bd3f1777401ffb99 Author: Liu Shixin Date: Mon Sep 21 16:24:55 2020 +0800 scsi: snic: Simplify the return expression of svnic_cq_alloc() Simplify the return expression. Link: https://lore.kernel.org/r/20200921082455.2592190-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen commit 39d0c6e770c2478c33b405b5729289aa1ad37957 Author: Liu Shixin Date: Mon Sep 21 16:24:52 2020 +0800 scsi: fnic: Simplify the return expression of vnic_wq_copy_alloc() Simplify the return expression. Link: https://lore.kernel.org/r/20200921082452.2592085-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen commit 4b217e015b753c83418cc548acf9fac97961e0a3 Author: Julia Lawall Date: Sun Sep 20 13:26:14 2020 +0200 scsi: target: rd: Drop double zeroing sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(*x),flags) ... sg_init_table(x,n) // Link: https://lore.kernel.org/r/1600601186-7420-3-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Julia Lawall Signed-off-by: Martin K. Petersen commit 5e7e6472eda90433b251566755533cf1e9c2e522 Author: Qinglang Miao Date: Sat Sep 19 10:52:02 2020 +0800 scsi: qla2xxx: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Link: https://lore.kernel.org/r/20200919025202.17531-1-miaoqinglang@huawei.com Reviewed-by: Himanshu Madhani Acked-by: Arun Easi Signed-off-by: Qinglang Miao Signed-off-by: Martin K. Petersen commit 21a6cd48bb483e16703f4e4415ad2e9e3c71a5dd Author: Tom Rix Date: Mon Oct 5 07:45:44 2020 -0700 scsi: qla2xxx: Initialize variable in qla8044_poll_reg() clang static analysis reports this problem: qla_nx2.c:694:3: warning: 6th function call argument is an uninitialized value ql_log(ql_log_fatal, vha, 0xb090, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In qla8044_poll_reg(), when reading the reg fails, the error is reported by reusing the timeout error reporter. Because the value is unset, a garbage value will be reported. Initialize the value. Link: https://lore.kernel.org/r/20201005144544.25335-1-trix@redhat.com Reviewed-by: Himanshu Madhani Signed-off-by: Tom Rix Signed-off-by: Martin K. Petersen commit 657ed8a8a61b15eba70f7c4e2b61f643cf1ba91f Author: Daniel Wagner Date: Tue Sep 29 09:38:02 2020 +0200 scsi: qla2xxx: Do not consume srb greedily qla2xx_process_get_sp_from_handle() will clear the slot in which the current srb is stored. As a result it can't be used in qla24xx_process_mbx_iocb_response() to check for consistency and later again in qla24xx_mbx_iocb_entry(). Move the consistency check directly into qla24xx_mbx_iocb_entry() and avoid the double call or any open coding of the qla2xx_process_get_sp_from_handle() functionality. Link: https://lore.kernel.org/r/20200929073802.18770-1-dwagner@suse.de Fixes: 31a3271ff11b ("scsi: qla2xxx: Handle incorrect entry_type entries") Reviewed-by: Arun Easi Reviewed-by: Himanshu Madhani Signed-off-by: Daniel Wagner Signed-off-by: Martin K. Petersen commit b994718760fa6de431ee7504ca4553536c77ee43 Author: Pavel Machek (CIP) Date: Mon Sep 21 13:23:40 2020 +0200 scsi: qla2xxx: Use constant when it is known Directly return constant when it is known to make code easier to understand. Link: https://lore.kernel.org/r/20200921112340.GA19336@duo.ucw.cz Reviewed-by: Himanshu Madhani Signed-off-by: Pavel Machek (CIP) Signed-off-by: Martin K. Petersen commit b608f11d49ec671739604cc763248d8e8fadbbeb Author: Stephen Boyd Date: Wed Sep 23 17:41:44 2020 -0700 clk: rockchip: Initialize hw to error to avoid undefined behavior We can get down to this return value from ERR_CAST() without initializing hw. Set it to -ENOMEM so that we always return something sane. Fixes the following smatch warning: drivers/clk/rockchip/clk-half-divider.c:228 rockchip_clk_register_halfdiv() error: uninitialized symbol 'hw'. drivers/clk/rockchip/clk-half-divider.c:228 rockchip_clk_register_halfdiv() warn: passing zero to 'ERR_CAST' Cc: Elaine Zhang Cc: Heiko Stuebner Fixes: 956060a52795 ("clk: rockchip: add support for half divider") Reviewed-by: Heiko Stuebner Signed-off-by: Stephen Boyd commit 1e9259eca8fdf04b8d12ec093711a73cde19aed5 Merge: 80348d8867c65 888d83b961f60 Author: Alexei Starovoitov Date: Wed Oct 7 18:50:27 2020 -0700 Merge branch 'libbpf: auto-resize relocatable LOAD/STORE instructions' Andrii Nakryiko says: ==================== Patch set implements logic in libbpf to auto-adjust memory size (1-, 2-, 4-, 8-bytes) of load/store (LD/ST/STX) instructions which have BPF CO-RE field offset relocation associated with it. In practice this means transparent handling of 32-bit kernels, both pointer and unsigned integers. Signed integers are not relocatable with zero-extending loads/stores, so libbpf poisons them and generates a warning. If/when BPF gets support for sign-extending loads/stores, it would be possible to automatically relocate them as well. All the details are contained in patch #2 comments and commit message. Patch #3 is a simple change in libbpf to make advanced testing with custom BTF easier. Patch #4 validates correct uses of auto-resizable loads, as well as check that libbpf fails invalid uses. Patch #1 skips CO-RE relocation for programs that had bpf_program__set_autoload(prog, false) set on them, reducing warnings and noise. v2->v3: - fix copyright (Alexei); v1->v2: - more consistent names for instruction mem size convertion routines (Alexei); - extended selftests to use relocatable STX instructions (Alexei); - added a fix for skipping CO-RE relocation for non-loadable programs. Cc: Luka Perkov Cc: Tony Ambardar ==================== Signed-off-by: Alexei Starovoitov commit 13135b461cf205941308984bd3271ec7d403dc40 Author: Vaibhav Jain Date: Mon Sep 14 02:49:04 2020 +0530 powerpc/papr_scm: Add PAPR command family to pass-through command-set Add NVDIMM_FAMILY_PAPR to the list of valid 'dimm_family_mask' acceptable by papr_scm. This is needed as since commit 92fe2aa859f5 ("libnvdimm: Validate command family indices") libnvdimm performs a validation of 'nd_cmd_pkg.nd_family' received as part of ND_CMD_CALL processing to ensure only known command families can use the general ND_CMD_CALL pass-through functionality. Without this change the ND_CMD_CALL pass-through targeting NVDIMM_FAMILY_PAPR error out with -EINVAL. Fixes: 92fe2aa859f5 ("libnvdimm: Validate command family indices") Signed-off-by: Vaibhav Jain Reviewed-by: Ira Weiny Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200913211904.24472-1-vaibhav@linux.ibm.com commit fbf2f134c8c312d3166534a8bd6a1aaee6e9c7ef Author: Aneesh Kumar K.V Date: Wed Oct 7 17:18:36 2020 +0530 powerpc/lmb-size: Use addr #size-cells value when fetching lmb-size Make it consistent with other usages. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201007114836.282468-5-aneesh.kumar@linux.ibm.com commit 950805f4d90eda14325ceab56b0f00d034baa8bc Author: Aneesh Kumar K.V Date: Wed Oct 7 17:18:35 2020 +0530 powerpc/book3s64/radix: Make radix_mem_block_size 64bit Similar to commit 89c140bbaeee ("pseries: Fix 64 bit logical memory block panic") make sure different variables tracking lmb_size are updated to be 64 bit. Fixes: af9d00e93a4f ("powerpc/mm/radix: Create separate mappings for hot-plugged memory") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201007114836.282468-4-aneesh.kumar@linux.ibm.com commit 301d2ea6572386245c5d2d2dc85c3b5a737b85ac Author: Aneesh Kumar K.V Date: Wed Oct 7 17:18:34 2020 +0530 powerpc/memhotplug: Make lmb size 64bit Similar to commit 89c140bbaeee ("pseries: Fix 64 bit logical memory block panic") make sure different variables tracking lmb_size are updated to be 64 bit. This was found by code audit. Cc: stable@vger.kernel.org Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201007114836.282468-3-aneesh.kumar@linux.ibm.com commit ec72024e35dddb88a81e40071c87ceb18b5ee835 Author: Aneesh Kumar K.V Date: Wed Oct 7 17:18:33 2020 +0530 powerpc/drmem: Make lmb_size 64 bit Similar to commit 89c140bbaeee ("pseries: Fix 64 bit logical memory block panic") make sure different variables tracking lmb_size are updated to be 64 bit. This was found by code audit. Cc: stable@vger.kernel.org Signed-off-by: Aneesh Kumar K.V Acked-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201007114836.282468-2-aneesh.kumar@linux.ibm.com commit 792254a77201453d9a77479e63dc216ad90462d2 Author: Nicholas Piggin Date: Wed Oct 7 18:06:05 2020 +1000 powerpc/security: Fix link stack flush instruction The inline execution path for the hardware assisted branch flush instruction failed to set CTR to the correct value before bcctr, causing a crash when the feature is enabled. Fixes: 4d24e21cc694 ("powerpc/security: Allow for processors that flush the link stack using the special bcctr") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201007080605.64423-1-npiggin@gmail.com commit 888d83b961f6057aa377065b60c5206fd8bff97c Author: Andrii Nakryiko Date: Wed Oct 7 17:10:24 2020 -0700 selftests/bpf: Validate libbpf's auto-sizing of LD/ST/STX instructions Add selftests validating libbpf's auto-resizing of load/store instructions when used with CO-RE relocations. An explicit and manual approach with using bpf_core_read() is also demonstrated and tested. Separate BPF program is supposed to fail due to using signed integers of sizes that differ from kernel's sizes. To reliably simulate 32-bit BTF (i.e., the one with sizeof(long) == sizeof(void *) == 4), selftest generates its own custom BTF and passes it as a replacement for real kernel BTF. This allows to test 32/64-bitness mix on all architectures. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201008001025.292064-5-andrii@kernel.org commit 2b7d88c2b582c659a6567e851d96873d0209a501 Author: Andrii Nakryiko Date: Wed Oct 7 17:10:23 2020 -0700 libbpf: Allow specifying both ELF and raw BTF for CO-RE BTF override Use generalized BTF parsing logic, making it possible to parse BTF both from ELF file, as well as a raw BTF dump. This makes it easier to write custom tests with manually generated BTFs. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201008001025.292064-4-andrii@kernel.org commit a66345bcbdf0c5070479c26103f7cb33da9e4969 Author: Andrii Nakryiko Date: Wed Oct 7 17:10:22 2020 -0700 libbpf: Support safe subset of load/store instruction resizing with CO-RE Add support for patching instructions of the following form: - rX = *(T *)(rY + ); - *(T *)(rX + ) = rY; - *(T *)(rX + ) = , where T is one of {u8, u16, u32, u64}. For such instructions, if the actual kernel field recorded in CO-RE relocation has a different size than the one recorded locally (e.g., from vmlinux.h), then libbpf will adjust T to an appropriate 1-, 2-, 4-, or 8-byte loads. In general, such transformation is not always correct and could lead to invalid final value being loaded or stored. But two classes of cases are always safe: - if both local and target (kernel) types are unsigned integers, but of different sizes, then it's OK to adjust load/store instruction according to the necessary memory size. Zero-extending nature of such instructions and unsignedness make sure that the final value is always correct; - pointer size mismatch between BPF target architecture (which is always 64-bit) and 32-bit host kernel architecture can be similarly resolved automatically, because pointer is essentially an unsigned integer. Loading 32-bit pointer into 64-bit BPF register with zero extension will leave correct pointer in the register. Both cases are necessary to support CO-RE on 32-bit kernels, as `unsigned long` in vmlinux.h generated from 32-bit kernel is 32-bit, but when compiled with BPF program for BPF target it will be treated by compiler as 64-bit integer. Similarly, pointers in vmlinux.h are 32-bit for kernel, but treated as 64-bit values by compiler for BPF target. Both problems are now resolved by libbpf for direct memory reads. But similar transformations are useful in general when kernel fields are "resized" from, e.g., unsigned int to unsigned long (or vice versa). Now, similar transformations for signed integers are not safe to perform as they will result in incorrect sign extension of the value. If such situation is detected, libbpf will emit helpful message and will poison the instruction. Not failing immediately means that it's possible to guard the instruction based on kernel version (or other conditions) and make sure it's not reachable. If there is a need to read signed integers that change sizes between different kernels, it's possible to use BPF_CORE_READ_BITFIELD() macro, which works both with bitfields and non-bitfield integers of any signedness and handles sign-extension properly. Also, bpf_core_read() with proper size and/or use of bpf_core_field_size() relocation could allow to deal with such complicated situations explicitly, if not so conventiently as direct memory reads. Selftests added in a separate patch in progs/test_core_autosize.c demonstrate both direct memory and probed use cases. BPF_CORE_READ() is not changed and it won't deal with such situations as automatically as direct memory reads due to the signedness integer limitations, which are much harder to detect and control with compiler macro magic. So it's encouraged to utilize direct memory reads as much as possible. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201008001025.292064-3-andrii@kernel.org commit 47f7cf6325f7d38e33d3dc38fa55bbe605f5b335 Author: Andrii Nakryiko Date: Wed Oct 7 17:10:21 2020 -0700 libbpf: Skip CO-RE relocations for not loaded BPF programs Bypass CO-RE relocations step for BPF programs that are not going to be loaded. This allows to have BPF programs compiled in and disabled dynamically if kernel is not supposed to provide enough relocation information. In such case, there won't be unnecessary warnings about failed relocations. Fixes: d929758101fc ("libbpf: Support disabling auto-loading BPF programs") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201008001025.292064-2-andrii@kernel.org commit ffab5e016b9b3ffee02fbf1ad688b59a56cacd62 Author: Zheng Yongjun Date: Fri Sep 18 15:14:22 2020 +0800 scsi: 53c700: Remove set but not used variable Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/53c700.c: In function NCR_700_intr: drivers/scsi/53c700.c:1488:27: warning: variable ‘state’ set but not used [-Wunused-but-set-variable] drivers/scsi/53c700.c: In function NCR_700_queuecommand_lck: drivers/scsi/53c700.c:1742:26: warning: variable ‘direction’ set but not used [-Wunused-but-set-variable] these variable is never used, so remove it. Link: https://lore.kernel.org/r/20200918071422.19566-1-zhengyongjun3@huawei.com Signed-off-by: Zheng Yongjun Signed-off-by: Martin K. Petersen commit 938b9e9ffbf8eadc09480eaa4062e033b16c395d Author: Jason Yan Date: Fri Sep 18 11:49:20 2020 +0800 scsi: gdth: Make option_setup() static Move the two functions around the '__setup' macro which uses them to avoid an 'unused-function' warning. This addresses the following sparse warning: drivers/scsi/gdth.c:3229:12: warning: symbol 'option_setup' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200918034920.3199926-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit ca57b069954ab68d936af65c871d3a122938de2a Author: Liu Shixin Date: Thu Sep 17 15:10:45 2020 +0800 scsi: initio: Use module_pci_driver() to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init() and module_exit() calls. Link: https://lore.kernel.org/r/20200917071045.1909320-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen commit 75c31c80a77d673062684d4d58260bae337c6934 Author: Liu Shixin Date: Thu Sep 17 15:10:44 2020 +0800 scsi: dc395x: Use module_pci_driver() to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init() and module_exit() calls. Link: https://lore.kernel.org/r/20200917071044.1909268-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen commit ed7fb2d018fdda4fcf0e9a8602e5000c7f0d8851 Author: Christoph Hellwig Date: Mon Oct 5 10:41:30 2020 +0200 scsi: core: Only start the request just before dispatching This has no change in behavior, but improves the accounting a bit. Link: https://lore.kernel.org/r/20201005084130.143273-11-hch@lst.de Reviewed-by: Bart Van Assche Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 74e5e6c1b18ca0ed1c8499cbaf2e3b758f67dbc6 Author: Christoph Hellwig Date: Mon Oct 5 10:41:29 2020 +0200 scsi: core: Remove scsi_setup_cmnd() and scsi_setup_fs_cmnd() Move this trivial functionality into scsi_prepare_cmd() instead of splitting it over multiple small functions, and update the comments to better document passthrough commands as the special case. Link: https://lore.kernel.org/r/20201005084130.143273-10-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 7007e9dd56767a95de0947b3f7599bcc2f21687f Author: Christoph Hellwig Date: Mon Oct 5 10:41:28 2020 +0200 scsi: core: Clean up allocation and freeing of sgtables Rename scsi_init_io() to scsi_alloc_sgtables(), and ensure callers call scsi_free_sgtables() to cleanup failures close to scsi_init_io() instead of leaking it down the generic I/O submission path. Link: https://lore.kernel.org/r/20201005084130.143273-9-hch@lst.de Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 5843cc3d5acd8e6654eb2477f3e48c30e3a2e4f7 Author: Christoph Hellwig Date: Mon Oct 5 10:41:27 2020 +0200 scsi: core: Rename scsi_mq_prep_fn() to scsi_prepare_cmd() The old name is rather confusing now that the the legacy prep_fn is gone. Link: https://lore.kernel.org/r/20201005084130.143273-8-hch@lst.de Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 822bd2db798b3c300bbbcaa67701a7661e382533 Author: Christoph Hellwig Date: Mon Oct 5 10:41:26 2020 +0200 scsi: core: Rename scsi_prep_state_check() to scsi_device_state_check() The old name is rather confusing now that the the legacy prep_fn is gone. Link: https://lore.kernel.org/r/20201005084130.143273-7-hch@lst.de Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 40b93836a136a46d7240aa13840c87fb239c865c Author: Christoph Hellwig Date: Mon Oct 5 10:41:25 2020 +0200 scsi: core: Use rq_dma_dir in scsi_setup_cmnd() Link: https://lore.kernel.org/r/20201005084130.143273-6-hch@lst.de Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 2ceda20f0a99a74a82b78870f3b3e5fa93087a7f Author: Christoph Hellwig Date: Mon Oct 5 10:41:23 2020 +0200 scsi: core: Move command size detection out of the fast path We only need to detect the command size for ioctl request from userspace, which is limited to the passthrough path. Move the check there instead of doing it for all queuecommand invocations. Link: https://lore.kernel.org/r/20201005084130.143273-4-hch@lst.de Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 3a8dc5bbc8c04db2646ed0842118b0f66659a3db Author: Christoph Hellwig Date: Mon Oct 5 10:41:22 2020 +0200 scsi: core: Remove scsi_init_cmd_errh There is no good reason to keep this functionality as a separate function, just merge it into the only caller. Link: https://lore.kernel.org/r/20201005084130.143273-3-hch@lst.de Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 2ba87c43872fc6bf30ff8c94adb96f82b61ee1d8 Author: Christoph Hellwig Date: Mon Oct 5 10:41:21 2020 +0200 scsi: core: Don't export scsi_device_from_queue() This function is only used by code built into scsi_mod.ko. Link: https://lore.kernel.org/r/20201005084130.143273-2-hch@lst.de Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 681cc5e8667e8579a2da8fa4090c48a2d73fc3bb Author: Mike Snitzer Date: Wed Oct 7 16:41:01 2020 -0400 dm: fix request-based DM to not bounce through indirect dm_submit_bio It is unnecessary to force request-based DM to call into bio-based dm_submit_bio (via indirect disk->fops->submit_bio) only to have it then call blk_mq_submit_bio(). Fix this by establishing a request-based DM block_device_operations (dm_rq_blk_dops, which doesn't have .submit_bio) and update dm_setup_md_queue() to set md->disk->fops to it for DM_TYPE_REQUEST_BASED. Remove DM_TYPE_REQUEST_BASED conditional in dm_submit_bio and unexport blk_mq_submit_bio. Fixes: c62b37d96b6eb ("block: move ->make_request_fn to struct block_device_operations") Signed-off-by: Mike Snitzer commit 9c37de297f6590937f95a28bec1b7ac68a38618f Author: Mike Snitzer Date: Wed Oct 7 15:15:08 2020 -0400 dm: remove special-casing of bio-based immutable singleton target on NVMe Since commit 5a6c35f9af416 ("block: remove direct_make_request") there is no benefit to DM special-casing NVMe. Remove all code used to establish DM_TYPE_NVME_BIO_BASED. Signed-off-by: Mike Snitzer commit f5f7ab168b9a60e12a4b8f2bb6fcc91321dc23c1 Author: Matthew Wilcox (Oracle) Date: Sun Oct 4 19:04:22 2020 +0100 9P: Cast to loff_t before multiplying On 32-bit systems, this multiplication will overflow for files larger than 4GB. Link: http://lkml.kernel.org/r/20201004180428.14494-2-willy@infradead.org Cc: stable@vger.kernel.org Fixes: fb89b45cdfdc ("9P: introduction of a new cache=mmap model.") Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Dominique Martinet commit 47a514b642cf144d6067e219474f08cde562b840 Author: Vadim Pasternak Date: Wed Sep 23 20:20:53 2020 +0300 platform/x86: mlx-platform: Add capability field to platform FAN description Set 'capability' field to FAN core platform data.. The content of 'capability' register allows to set the mapping between the drawers and tachometers. The motivation is to avoid adding a new code in the future in order to distinct between the systems types supporting a different kinds of the FAN drawers. Signed-off-by: Vadim Pasternak Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20200923172053.26296-6-vadimp@nvidia.com Signed-off-by: Hans de Goede commit d2f3ab5b6b05f67817f3bd3f2fda5f0126e95a62 Author: Vadim Pasternak Date: Wed Sep 23 20:20:52 2020 +0300 platform_data/mlxreg: Extend core platform structure Add 'capability' field to structure 'mlxreg_core_platform_data'. The purpose of this filed to indicate the actual number of the components within the particular group. Such components could be, for example the number of the FAN drawers. Some systems are equipped with FAN drawers with one tachometer inside, others with FAN drawers with several tachometers inside. Signed-off-by: Vadim Pasternak Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20200923172053.26296-5-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 638eae9bc7eb1012d1e0f5a8fd4db46447f822e9 Author: Vadim Pasternak Date: Wed Sep 23 20:20:51 2020 +0300 platform_data/mlxreg: Update module license Update license to SPDX-License. Signed-off-by: Vadim Pasternak Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20200923172053.26296-4-vadimp@nvidia.com Signed-off-by: Hans de Goede commit c071afcea6ecf24a3c119f25ce9f71ffd55b5dc2 Author: Vadim Pasternak Date: Wed Sep 23 20:20:49 2020 +0300 platform/x86: mlx-platform: Remove PSU EEPROM configuration Remove PSU EEPROM configuration for systems class equipped with Mellanox chip Spectrume-2. Till now all the systems from this class used few types of power units, all equipped with EEPROM device with address space two bytes. Thus, all these devices have been handled by EEPROM driver "24c32". There is a new requirement is to support power unit replacement by "off the shelf" device, matching electrical required parameters. Such device could be equipped with different EEPROM type, which could be one byte address space addressing or even could be not equipped with EEPROM. In such case "24c32" will not work. Fixes: 1bd42d94ccab ("platform/x86: mlx-platform: Add support for new 200G IB and Ethernet systems") Signed-off-by: Vadim Pasternak Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20200923172053.26296-2-vadimp@nvidia.com Signed-off-by: Hans de Goede commit 164ab90d0d8644d13ca498146a1732d1fff82d89 Author: Srinivas Neeli Date: Mon Sep 14 10:49:58 2020 +0200 can: xilinx_can: Fix incorrect variable and initialize with a default value Some variables with incorrect type were passed to "of_property_read_u32" API, "of_property_read_u32" API was expecting an "u32 *" but the formal parameter that was passed was of type "int *". Fixed the issue by changing the variable types from "int" to "u32" and initialized with a default value. Fixed sparse warning. Addresses-Coverity: "incompatible_param" Addresses-Coverity: "UNINIT(Using uninitialized value)" Signed-off-by: Srinivas Neeli Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/0651544d22f3c25893ca9d445b14823f0dfddfc8.1600073396.git.michal.simek@xilinx.com Signed-off-by: Marc Kleine-Budde commit a61035c5a84bc92bffa4b252d1bc97034724667c Author: Srinivas Neeli Date: Mon Sep 14 10:49:57 2020 +0200 can: xilinx_can: Check return value of set_reset_mode Check return value of set_reset_mode() for error. Addresses-Coverity: "check_return" Signed-off-by: Srinivas Neeli Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/bac2c2b857986472a11db341b3f6f7a8905ad0dd.1600073396.git.michal.simek@xilinx.com Signed-off-by: Marc Kleine-Budde commit 05ca14fdb6fe65614e0652d03e44b02748d25af7 Author: Srinivas Neeli Date: Mon Sep 14 10:49:56 2020 +0200 can: xilinx_can: Limit CANFD brp to 2 Bit enlarging is observed for CANFD2.0 when brp is 1, So change brp_min value to 2. Signed-off-by: Srinivas Neeli Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/bca871d7f3ca9c653d50e63c5b60028f2bdf3fb0.1600073396.git.michal.simek@xilinx.com Signed-off-by: Marc Kleine-Budde commit d9b081e3fc4bdc33e672dcb7bb256394909432fc Author: Marc Kleine-Budde Date: Sun Jun 14 21:09:20 2020 +0200 can: flexcan: remove ack_grp and ack_bit handling from driver Since commit: 048e3a34a2e7 can: flexcan: poll MCR_LPM_ACK instead of GPR ACK for stop mode acknowledgment the driver polls the IP core's internal bit MCR[LPM_ACK] as stop mode acknowledge and not the acknowledgment on chip level. This means the 4th and 5th value of the property "fsl,stop-mode" isn't used anymore. This patch removes the used "ack_gpr" and "ack_bit" from the driver. Link: http://lore.kernel.org/r/20201006203748.1750156-15-mkl@pengutronix.de Fixes: 048e3a34a2e7 ("can: flexcan: poll MCR_LPM_ACK instead of GPR ACK for stop mode acknowledgment") Cc: Joakim Zhang Signed-off-by: Marc Kleine-Budde commit e4245bbca91da17c7e8c026d2aecf10687519a2b Author: Marc Kleine-Budde Date: Sun Jun 14 21:10:38 2020 +0200 dt-bindings: can: flexcan: remove ack_grp and ack_bit from fsl,stop-mode Since commit: 048e3a34a2e7 can: flexcan: poll MCR_LPM_ACK instead of GPR ACK for stop mode acknowledgment the driver polls the IP core's internal bit MCR[LPM_ACK] as stop mode acknowledge and not the acknowledgment on chip level. This means the 4th and 5th value of the property "fsl,stop-mode" isn't used anymore. It will be removed from the driver in the next patch, so remove it from the binding documentation. Link: http://lore.kernel.org/r/20201006203748.1750156-14-mkl@pengutronix.de Fixes: 048e3a34a2e7 ("can: flexcan: poll MCR_LPM_ACK instead of GPR ACK for stop mode acknowledgment") Cc: devicetree Cc: Joakim Zhang Reviewed-by: Rob Herring Signed-off-by: Marc Kleine-Budde commit a62fc7ff903c1620c0536b6a549d6cf044f17023 Author: Michael Walle Date: Thu Oct 1 11:11:29 2020 +0200 dt-bindings: can: flexcan: list supported processors The compatible is a pattern match. Explicitly list all possible values. Also mention that the ls1028ar1 must be followed by lx2160ar1. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20201001091131.30514-2-michael@walle.cc Signed-off-by: Marc Kleine-Budde commit f97db2621b41b98e6e8e0fa8271db3a600fa6335 Author: Lad Prabhakar Date: Mon Oct 5 09:13:19 2020 +0100 dt-bindings: can: rcar_can: Document r8a774e1 support Document SoC specific bindings for RZ/G2H (R8A774E1) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201005081319.29322-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit d131c4b879b63aafac212cd87f20ca2fa0b256a3 Author: Lad Prabhakar Date: Mon Oct 5 09:13:18 2020 +0100 dt-bindings: can: rcar_canfd: Document r8a774e1 support Document the support for rcar_canfd on R8A774E1 SoC devices. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201005081319.29322-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Marc Kleine-Budde commit df73446a2882a4336cad473d8eb9d895e49f092b Author: Lad Prabhakar Date: Sun Aug 16 20:07:31 2020 +0100 dt-bindings: can: rcar_can: Add r8a7742 support Document RZ/G1H (r8a7742) SoC specific bindings. The R8A7742 CAN module is identical to R-Car Gen2 family. No driver change is needed due to the fallback compatible value "renesas,rcar-gen2-can". Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200816190732.6905-3-prabhakar.mahadev-lad.rj@bp.renesas.com Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Marc Kleine-Budde commit e057dd3fc20ffb3d7f150af46542a51b59b90127 Author: Oliver Hartkopp Date: Mon Sep 28 22:04:04 2020 +0200 can: add ISO 15765-2:2016 transport protocol CAN Transport Protocols offer support for segmented Point-to-Point communication between CAN nodes via two defined CAN Identifiers. As CAN frames can only transport a small amount of data bytes (max. 8 bytes for 'classic' CAN and max. 64 bytes for CAN FD) this segmentation is needed to transport longer PDUs as needed e.g. for vehicle diagnosis (UDS, ISO 14229) or IP-over-CAN traffic. This protocol driver implements data transfers according to ISO 15765-2:2016 for 'classic' CAN and CAN FD frame types. Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/r/20200928200404.82229-1-socketcan@hartkopp.net [mkl: Removed "WITH Linux-syscall-note" from isotp.c. Fixed indention, a checkpatch warning and typos. Replaced __u{8,32} by u{8,32}. Removed always false (optlen < 0) check in isotp_setsockopt().] Signed-off-by: Marc Kleine-Budde commit 1c47fa6b31c2683f03bc2f9174902bb7dcd35d83 Author: Vincent Mailhol Date: Sat Oct 3 00:41:49 2020 +0900 can: dev: add a helper function to calculate the duration of one bit Rename macro CAN_CALC_SYNC_SEG to CAN_SYNC_SEG and make it available through include/linux/can/dev.h Add an helper function can_bit_time() which returns the duration (in time quanta) of one CAN bit. Rationale for this patch: the sync segment and the bit time are two concepts which are defined in the CAN ISO standard. Device drivers for CAN might need those. Please refer to ISO 11898-1:2015, section 11.3.1.1 "Bit time" for additional information. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/r/20201002154219.4887-6-mailhol.vincent@wanadoo.fr [mkl: Let can_bit_time() return an unsinged int, make argument const] Signed-off-by: Marc Kleine-Budde commit d0e21c24de71f0c46491d2ccf3d511447a74d2c7 Author: Gayatri Kammela Date: Tue Oct 6 20:51:08 2020 -0700 MAINTAINERS: Update maintainers for pmc_core driver Update MAINTAINERS file for pmc_core driver to reflect the current maintainers. Cc: Vishwanath Somayaji Cc: Andy Shevchenko Cc: Srinivas Pandruvada Cc: David E. Box Acked-by: David E. Box Acked-by: Vishwanath Somayaji Signed-off-by: Gayatri Kammela Signed-off-by: David E. Box Reviewed-by: Andy Shevchenko Reviewed-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20201007035108.31078-5-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 46461f8709ed1998bdfae35296ba63ab12ec50a9 Author: Gayatri Kammela Date: Tue Oct 6 20:51:07 2020 -0700 platform/x86: intel_pmc_core: fix: Replace dev_dbg macro with dev_info() dev_dbg macro is used to dump the debug registers in resume from an S0ix failure. However, when CONFIG_DYNAMIC_DEBUG is not set, the user may not be able to find the debug dump on an S0ix failure which defeats the purpose. The output of these messages is already controlled by a module parameter, warn_on_s0ix_failures, making it a 2 step process to enable anyway when CONFIG_DYNAMIC_DEBUG is set. Hence, replace dev_dbg with dev_info, allowing the control of the messages solely through the module parameter which is N by default. Fixes commit 913f984a8347 ("platform/x86: intel_pmc_core: Add an additional parameter to pmc_core_lpm_display()") Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: David E. Box Signed-off-by: Gayatri Kammela Signed-off-by: David E. Box Reviewed-by: Andy Shevchenko Reviewed-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20201007035108.31078-4-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 68cb1a977e5e8b9531e7bf4fbfbde5ce1d19537b Author: Gayatri Kammela Date: Tue Oct 6 20:51:06 2020 -0700 platform/x86: intel_pmc_core: Add Intel RocketLake (RKL) support Add RocketLake to the list of the platforms that intel_pmc_core driver supports for pmc_core device. RocketLake reuses all the TigerLake PCH IPs. Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: David E. Box Cc: Tony Luck Cc: Rui Zhang Signed-off-by: Gayatri Kammela Signed-off-by: David E. Box Reviewed-by: Andy Shevchenko Reviewed-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20201007035108.31078-3-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 3976c6e365d7d50cbc96e92b0c537f5e8c744373 Author: Gayatri Kammela Date: Tue Oct 6 20:51:05 2020 -0700 platform/x86: intel_pmc_core: Clean up: Remove the duplicate comments and reorganize Some of the Cannon Lake PCH IPs are reused by most of the platforms such as Ice Lake, Tiger Lake, Elkhart Lake, Jasper Lake and can be reused by future platforms as well. The same was mentioned via comments not once but twice in an array of bit map structs for Cannon Lake (cnp_pfear_map). Hence, remove the duplicate comments and reorganize them. Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: David E. Box Cc: Tony Luck Cc: Rui Zhang Suggested-by: Dave Hansen Signed-off-by: Gayatri Kammela Signed-off-by: David E. Box Reviewed-by: Andy Shevchenko Reviewed-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20201007035108.31078-2-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 025f26de7fa0fc40c8baf6c19fb273500f3321f0 Author: Gayatri Kammela Date: Tue Oct 6 15:47:02 2020 -0700 platform/x86: intel_pmc_core: Fix the slp_s0 counter displayed value slp_s0 counter value displayed via debugfs interface is calculated by multiplying the granularity for crystal oscillator tick as 100us with the value read from using slp_s0 offset. But the granularity of the tick varies from platform to platform and it needs to be fixed. Hence, specify granularity of the tick for each platform, so that the value of the slp_s0 counter is accurate. Signed-off-by: Gayatri Kammela Signed-off-by: David E. Box Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201006224702.12697-4-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 652036bd5be0ac94fd1db851d72ece8ee133c74d Author: Gayatri Kammela Date: Tue Oct 6 15:47:01 2020 -0700 platform/x86: intel_pmc_core: Fix TigerLake power gating status map TigerLake's LPM power gating status register has errors in the bit-to-name mapping as well as with the marked reserved bits according to the actual implementation. Hence, update the right bit-to-name mapping and the reserved bits in accordance with actual implementation. Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: David E. Box Signed-off-by: Gayatri Kammela Signed-off-by: David E. Box Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201006224702.12697-3-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit e973f1d372dca5ac1d107ec6134f72e566fdf968 Author: David E. Box Date: Tue Oct 6 15:47:00 2020 -0700 platform/x86: pmc_core: Use descriptive names for LPM registers TigerLake Lower Power Mode (LPM) registers are grouped by functionality but were given simple enumerated names in the code (lpm0, lpm1, ...). Instead, give the register blocks names that describe their usage. Suggested-by: Andy Shevchenko Signed-off-by: David E. Box Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201006224702.12697-2-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit e529412f3211071b4787a8e7e153c8ced3c22a28 Author: Srinivas Pandruvada Date: Tue Oct 6 06:26:31 2020 -0700 tools/power/x86/intel-speed-select: Update version for v5.10 Update version for changes released with v5.10 kernel release. Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 7566616fb968dcc9f11d3f6b57132d33acab4e35 Author: Jonathan Doman Date: Wed Sep 30 15:26:36 2020 -0700 tools/power/x86/intel-speed-select: Fix missing base-freq core IDs The reported base-freq high-priority-cpu-list was potentially omitting some cpus, due to incorrectly using a logical core count to constrain the size of a physical punit core ID mask. We may need to read both high and low PBF CORE_MASK values regardless of the logical core count. Signed-off-by: Jonathan Doman Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 80348d8867c65e2c64ca78d82326e889550a24b6 Author: Magnus Karlsson Date: Wed Oct 7 13:42:26 2020 +0200 libbpf: Fix compatibility problem in xsk_socket__create Fix a compatibility problem when the old XDP_SHARED_UMEM mode is used together with the xsk_socket__create() call. In the old XDP_SHARED_UMEM mode, only sharing of the same device and queue id was allowed, and in this mode, the fill ring and completion ring were shared between the AF_XDP sockets. Therefore, it was perfectly fine to call the xsk_socket__create() API for each socket and not use the new xsk_socket__create_shared() API. This behavior was ruined by the commit introducing XDP_SHARED_UMEM support between different devices and/or queue ids. This patch restores the ability to use xsk_socket__create in these circumstances so that backward compatibility is not broken. Fixes: 2f6324a3937f ("libbpf: Support shared umems between queues and devices") Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1602070946-11154-1-git-send-email-magnus.karlsson@gmail.com commit 0c633f0be1dc70a6db46d90dba4cdae82073350a Author: Matthew Rosato Date: Wed Oct 7 14:56:22 2020 -0400 vfio: Introduce capability definitions for VFIO_DEVICE_GET_INFO Allow the VFIO_DEVICE_GET_INFO ioctl to include a capability chain. Add a flag indicating capability chain support, and introduce the definitions for the first set of capabilities which are specified to s390 zPCI devices. Signed-off-by: Matthew Rosato Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit 517fe298245c4c2c3d1f9b8f140e40c7f9d7518d Author: Matthew Rosato Date: Wed Oct 7 14:56:21 2020 -0400 s390/pci: track whether util_str is valid in the zpci_dev We'll need to keep track of whether or not the byte string in util_str is valid and thus needs to be passed to a vfio-pci passthrough device. Signed-off-by: Matthew Rosato Acked-by: Niklas Schnelle Acked-by: Christian Borntraeger Acked-by: Cornelia Huck Signed-off-by: Alex Williamson commit dc8c638d9e140e0a2a04ab7e3f3fde3bbad1dacf Author: Matthew Rosato Date: Wed Oct 7 14:56:20 2020 -0400 s390/pci: stash version in the zpci_dev In preparation for passing the info on to vfio-pci devices, stash the supported PCI version for the target device in the zpci_dev. Signed-off-by: Matthew Rosato Acked-by: Niklas Schnelle Acked-by: Christian Borntraeger Acked-by: Cornelia Huck Signed-off-by: Alex Williamson commit fb1ff4c1941573aea59e4cb575dc5a723303cd70 Author: Bharat Bhushan Date: Mon Oct 5 20:36:45 2020 +0300 vfio/fsl-mc: Add VFIO framework skeleton for fsl-mc devices DPAA2 (Data Path Acceleration Architecture) consists in mechanisms for processing Ethernet packets, queue management, accelerators, etc. The Management Complex (mc) is a hardware entity that manages the DPAA2 hardware resources. It provides an object-based abstraction for software drivers to use the DPAA2 hardware. The MC mediates operations such as create, discover, destroy of DPAA2 objects. The MC provides memory-mapped I/O command interfaces (MC portals) which DPAA2 software drivers use to operate on DPAA2 objects. A DPRC is a container object that holds other types of DPAA2 objects. Each object in the DPRC is a Linux device and bound to a driver. The MC-bus driver is a platform driver (different from PCI or platform bus). The DPRC driver does runtime management of a bus instance. It performs the initial scan of the DPRC and handles changes in the DPRC configuration (adding/removing objects). All objects inside a container share the same hardware isolation context, meaning that only an entire DPRC can be assigned to a virtual machine. When a container is assigned to a virtual machine, all the objects within that container are assigned to that virtual machine. The DPRC container assigned to the virtual machine is not allowed to change contents (add/remove objects) by the guest. The restriction is set by the host and enforced by the mc hardware. The DPAA2 objects can be directly assigned to the guest. However the MC portals (the memory mapped command interface to the MC) need to be emulated because there are commands that configure the interrupts and the isolation IDs which are virtual in the guest. Example: echo vfio-fsl-mc > /sys/bus/fsl-mc/devices/dprc.2/driver_override echo dprc.2 > /sys/bus/fsl-mc/drivers/vfio-fsl-mc/bind The dprc.2 is bound to the VFIO driver and all the objects within dprc.2 are going to be bound to the VFIO driver. This patch adds the infrastructure for VFIO support for fsl-mc devices. Subsequent patches will add support for binding and secure assigning these devices using VFIO. More details about the DPAA2 objects can be found here: Documentation/networking/device_drivers/freescale/dpaa2/overview.rst Signed-off-by: Bharat Bhushan Signed-off-by: Diana Craciun Reviewed-by: Eric Auger Signed-off-by: Alex Williamson commit a3fb64c00d44a3ce869c0ca8210f95f99497aa9e Author: Paul Cercueil Date: Sun Oct 4 16:17:58 2020 +0200 Revert "gpu/drm: ingenic: Add option to mmap GEM buffers cached" This reverts commit 37054fc81443 ("gpu/drm: ingenic: Add option to mmap GEM buffers cached") At the very moment this commit was created, the DMA API it relied on was modified in the DMA tree, which caused the driver to break in linux-next. Revert it for now, and it will be resubmitted later to work with the new DMA API. Signed-off-by: Paul Cercueil Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20201004141758.1013317-1-paul@crapouillou.net commit eefc69a09ca5b441ee136f9fb68ab5970cfc2d51 Author: Julian Wiedmann Date: Fri Oct 2 11:18:19 2020 +0200 s390/sie: fix typo in SIGP code description s/ait address/at address Signed-off-by: Julian Wiedmann Acked-by: Christian Borntraeger Signed-off-by: Vasily Gorbik commit 4aa32ee3c058847ff935d1a65da309b67b65354a Author: Julian Wiedmann Date: Fri Oct 2 11:16:49 2020 +0200 s390/lib: fix kernel doc for memcmp() s/count/n Signed-off-by: Julian Wiedmann Acked-by: Christian Borntraeger Signed-off-by: Vasily Gorbik commit 27c4f6738bdc535e42dfc1295dadc78ab7582939 Author: Harald Freudenberger Date: Tue Sep 29 16:07:22 2020 +0200 s390/zcrypt: Introduce Failure Injection feature Introduce a way to specify additional debug flags with an crpyto request to be able to trigger certain failures within the zcrypt device drivers and/or ap core code. This failure injection possibility is only enabled with a kernel debug build CONFIG_ZCRYPT_DEBUG) and should never be available on a regular kernel running in production environment. Details: * The ioctl(ICARSAMODEXPO) get's a struct ica_rsa_modexpo. If the leftmost bit of the 32 bit unsigned int inputdatalength field is set, the uppermost 16 bits are separated and used as debug flag value. The process is checked to have the CAP_SYS_ADMIN capability enabled or EPERM is returned. * The ioctl(ICARSACRT) get's a struct ica_rsa_modexpo_crt. If the leftmost bit of the 32 bit unsigned int inputdatalength field is set, the uppermost 16 bits are separated and used als debug flag value. The process is checked to have the CAP_SYS_ADMIN capability enabled or EPERM is returned. * The ioctl(ZSECSENDCPRB) used to send CCA CPRBs get's a struct ica_xcRB. If the leftmost bit of the 32 bit unsigned int status field is set, the uppermost 16 bits of this field are used as debug flag value. The process is checked to have the CAP_SYS_ADMIN capability enabled or EPERM is returned. * The ioctl(ZSENDEP11CPRB) used to send EP11 CPRBs get's a struct ep11_urb. If the leftmost bit of the 64 bit unsigned int req_len field is set, the uppermost 16 bits of this field are used as debug flag value. The process is checked to have the CAP_SYS_ADMIN capability enabled or EPERM is returned. So it is possible to send an additional 16 bit value to the zcrypt API to be used to carry a failure injection command which may trigger special behavior within the zcrypt API and layers below. This 16 bit value is for the rest of the test referred as 'fi command' for Failure Injection. The lower 8 bits of the fi command construct a numerical argument in the range of 1-255 and is the 'fi action' to be performed with the request or the resulting reply: * 0x00 (all requests): No failure injection action but flags may be provided which may affect the processing of the request or reply. * 0x01 (only CCA CPRBs): The CPRB's agent_ID field is set to 'FF'. This results in an reply code 0x90 (Transport-Protocol Failure). * 0x02 (only CCA CPRBs): After the APQN to send to has been chosen, the domain field within the CPRB is overwritten with value 99 to enforce an reply with RY 0x8A. * 0x03 (all requests): At NQAP invocation the invalid qid value 0xFF00 is used causing an response code of 0x01 (AP queue not valid). The upper 8 bits of the fi command may carry bit flags which may influence the processing of an request or response: * 0x01: No retry. If this bit is set, the usual loop in the zcrypt API which retries an CPRB up to 10 times when the lower layers return with EAGAIN is abandoned after the first attempt to send the CPRB. * 0x02: Toggle special. Toggles the special bit on this request. This should result in an reply code RY~0x41 and result in an ioctl failure with errno EINVAL. This failure injection possibilities may get some further extensions in the future. As of now this is a starting point for Continuous Test and Integration to trigger some failures and watch for the reaction of the ap bus and zcrypt device driver code. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 3730f5300b450bc89306c3ab79c254e6039d9197 Author: Harald Freudenberger Date: Sat Sep 26 22:51:38 2020 +0200 s390/zcrypt: move ap_msg param one level up the call chain Move the creating and disposal of the struct ap_message one level up the call chain. The ap message was constructed in the calling functions in msgtype50 and msgtype6 but only for the ica rsa messages. For CCA and EP11 CPRBs the ap message struct is created in the zcrypt api functions. This patch moves the construction of the ap message struct into the functions zcrypt_rsa_modexpo and zcrypt_rsa_crt. So now all the 4 zcrypt api functions zcrypt_rsa_modexpo, zcrypt_rsa_crt, zcrypt_send_cprb and zcrypt_send_ep11_cprb appear and act similar. There are no functional changes coming with this patch. However, the availability of the ap_message struct has advantages which will be needed by a follow up patch. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit e0332629e33d1926c93348d918aaaf451ef9a16b Author: Harald Freudenberger Date: Tue Aug 4 09:27:47 2020 +0200 s390/ap/zcrypt: revisit ap and zcrypt error handling Revisit the ap queue error handling: Based on discussions and evaluatios with the firmware folk here is now a rework of the response code handling for all the AP instructions. The idea is to distinguish between failures because of some kind of invalid request where a retry does not make any sense and a failure where another attempt to send the very same request may succeed. The first case is handled by returning EINVAL to the userspace application. The second case results in retries within the zcrypt API controlled by a per message retry counter. Revisit the zcrpyt error handling: Similar here, based on discussions with the firmware people here comes a rework of the handling of all the reply codes. Main point here is that there are only very few cases left, where a zcrypt device queue is switched to offline. It should never be the case that an AP reply message is 'unknown' to the device driver as it indicates a total mismatch between device driver and crypto card firmware. In all other cases, the code distinguishes between failure because of invalid message (see above - EINVAL) or failures of the infrastructure (see above - EAGAIN). Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 5caa2af97118308c79f29cc9876aec3ed504f9b0 Author: Harald Freudenberger Date: Mon Jul 27 14:49:34 2020 +0200 s390/ap: Support AP card SCLP config and deconfig operations Support SCLP AP adapter config and deconfig operations: The sysfs deconfig attribute /sys/devices/ap/cardxx/deconfig for each AP card is now read-write. Writing in a '1' triggers a synchronous SCLP request to configure the adapter, writing in a '0' sends a synchronous SCLP deconfigure request. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 0671cc1048744c9a6f1c896baa85966a5abc42a0 Author: Harald Freudenberger Date: Mon Jul 27 14:34:57 2020 +0200 s390/sclp: Add support for SCLP AP adapter config/deconfig Add support for AP bus adapter config and deconfig to the sclp core code. The code is statically build into the kernel when ZCRYPT is configured either as module or with static support. This is the base functionality for having configure/deconfigure support in the AP bus and card code. Another patch will exploit this soon. Signed-off-by: Harald Freudenberger Suggested-by: Pierre Morel Signed-off-by: Vasily Gorbik commit 4f2fcccdb547b09a4532c705078811e672fb9235 Author: Harald Freudenberger Date: Thu Jul 2 16:57:00 2020 +0200 s390/ap: add card/queue deconfig state This patch adds a new config state to the ap card and queue devices. This state reflects the response code 0x03 "AP deconfigured" on TQAP invocation and is tracked with every ap bus scan. Together with this new state now a card/queue device which is 'deconfigured' is not disposed any more. However, for backward compatibility the online state now needs to take this state into account. So a card/queue is offline when the device is not configured. Furthermore a device can't get switched from offline to online state when not configured. The config state is shown in sysfs at /sys/devices/ap/cardxx/config for the card and /sys/devices/ap/cardxx/xx.yyyy/config for each queue within each card. It is a read-only attribute reflecting the negation of the 'AP deconfig' state as it is noted in the AP documents. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 2ea2a6099ae3d1708f90f43c81a98cba3d4bb74c Author: Harald Freudenberger Date: Thu Jul 2 15:56:15 2020 +0200 s390/ap: add error response code field for ap queue devices On AP instruction failures the last response code is now kept in the struct ap_queue. There is also a new sysfs attribute showing this field (enabled only on debug kernels). Also slight rework of the AP_DBF macros to get some more content into one debug feature message line. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 0b641cbd24445e56073c69dd046be488dcf1965b Author: Harald Freudenberger Date: Thu Jul 2 11:22:01 2020 +0200 s390/ap: split ap queue state machine state from device state The state machine for each ap queue covered a mixture of device states and state machine (firmware queue state) states. This patch splits the device states and the state machine states into two different enums and variables. The major state is the device state with currently these values: AP_DEV_STATE_UNINITIATED - fresh and virgin, not touched AP_DEV_STATE_OPERATING - queue dev is working normal AP_DEV_STATE_SHUTDOWN - remove/unbind/shutdown in progress AP_DEV_STATE_ERROR - device is in error state only when the device state is > UNINITIATED the state machine is run. The state machine represents the states of the firmware queue: AP_SM_STATE_RESET_START - starting point, reset (RAPQ) ap queue AP_SM_STATE_RESET_WAIT - reset triggered, waiting to be finished if irqs enabled, set up irq (AQIC) AP_SM_STATE_SETIRQ_WAIT - enable irq triggered, waiting to be finished, then go to IDLE AP_SM_STATE_IDLE - queue is operational but empty AP_SM_STATE_WORKING - queue is operational, requests are stored and replies may wait for getting fetched AP_SM_STATE_QUEUE_FULL - firmware queue is full, so only replies can get fetched For debugging each ap queue shows a sysfs attribute 'states' which displays the device and state machine state and is only available when the kernel is build with CONFIG_ZCRYPT_DEBUG enabled. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 0ae88ccf4c160e02316e054db67156230568cf49 Author: Harald Freudenberger Date: Wed Sep 23 09:18:38 2020 +0200 s390/zcrypt: New config switch CONFIG_ZCRYPT_DEBUG Introduce a new config switch CONFIG_ZCRYPT_DEBUG which will be used to enable some features for debugging the zcrypt device driver and ap bus system: Another patch will use this for displaying ap card and ap queue state information via sysfs attribute. A furher patch will use this to enable some special treatment for some fields of an crypto request to be able to inject failures and so help debugging with regards to handling of failures. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 91ffc519c1997520ff3435ee227d86cfaa30d037 Author: Harald Freudenberger Date: Thu Jul 2 11:10:11 2020 +0200 s390/zcrypt: introduce msg tracking in zcrypt functions Introduce a new internal struct zcrypt_track with an retry counter field and a last return code field. Fill and update these fields at certain points during processing of an request/reply. This tracking info is then used to - avoid trying to resend the message forever. Now each message is tried to be send TRACK_AGAIN_MAX (currently 10) times and then the ioctl returns to userspace with errno EAGAIN. - avoid trying to resend the message on the very same card/domain. If possible (more than one APQN with same quality) don't use the very same qid as the previous attempt when again scheduling the request. This is done by adding penalty weight values when the dispatching takes place. There is a penalty TRACK_AGAIN_CARD_WEIGHT_PENALTY for using the same card as previously and another penalty define TRACK_AGAIN_QUEUE_WEIGHT_PENALTY to be considered when the same qid as the previous sent attempt is calculated. Both values make it harder to choose the very same card/domain but not impossible. For example when only one APQN is available a resend can only address the very same APQN. There are some more ideas for the future to extend the use of this tracking information. For example the last response code at NQAP and DQAP could be stored there, giving the possibility to extended tracing and debugging about requests failing to get processed properly. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit faf7b51c06973f947776af6c8f8a513475a2bfa1 Author: Jens Axboe Date: Wed Oct 7 12:48:53 2020 -0600 io_uring: batch account ->req_issue and task struct references Identical to how we handle the ctx reference counts, increase by the batch we're expecting to submit, and handle any slow path residual, if any. The request alloc-and-issue path is very hot, and this makes a noticeable difference by avoiding an two atomic incs for each individual request. Signed-off-by: Jens Axboe commit bff049a3b5001eb462f27eda98f32f3ff10f4ec2 Author: Anna Schumaker Date: Wed Apr 1 16:28:51 2020 -0400 NFS: Decode a full READ_PLUS reply Decode multiple hole and data segments sent by the server, placing everything directly where they need to go in the xdr pages. Signed-off-by: Anna Schumaker commit e6ac0accb27c6892b7ebc7799e7ce56b3390a678 Author: Anna Schumaker Date: Tue Apr 21 11:27:00 2020 -0400 SUNRPC: Add an xdr_align_data() function For now, this function simply aligns the data at the beginning of the pages. This can eventually be expanded to shift data to the correct offsets when we're ready. Signed-off-by: Anna Schumaker commit c05eafad6b034772921e56de5c01df2326d9e3b3 Author: Anna Schumaker Date: Thu Mar 28 16:43:44 2019 -0400 NFS: Add READ_PLUS hole segment decoding We keep things simple for now by only decoding a single hole or data segment returned by the server, even if they returned more to us. Signed-off-by: Anna Schumaker commit 84ce182ab85b8ad5002fb1125ba572df99dd0d1c Author: Anna Schumaker Date: Wed May 28 13:38:53 2014 -0400 SUNRPC: Add the ability to expand holes in data pages This patch adds the ability to "read a hole" into a set of XDR data pages by taking the following steps: 1) Shift all data after the current xdr->p to the right, possibly into the tail, 2) Zero the specified range, and 3) Update xdr->p to point beyond the hole. Signed-off-by: Anna Schumaker commit 43f0f0816cdbe7361dd17db3b4c1033446033ba6 Author: Anna Schumaker Date: Wed May 6 13:21:30 2020 -0400 SUNRPC: Split out _shift_data_right_tail() xdr_shrink_pagelen() is very similar to what we need for hole expansion, so split out the common code into its own function that can be used by both functions. Signed-off-by: Anna Schumaker commit 06216ecbd93688f7acb617e186b9556a565a13bd Author: Anna Schumaker Date: Mon Apr 20 17:38:17 2020 -0400 SUNRPC: Split out xdr_realign_pages() from xdr_align_pages() I don't need the entire align pages code for READ_PLUS, so split out the part I do need so I don't need to reimplement anything. Signed-off-by: Anna Schumaker commit c567552612ece787b178e3b147b5854ad422a836 Author: Anna Schumaker Date: Wed May 28 13:41:22 2014 -0400 NFS: Add READ_PLUS data segment support This patch adds client support for decoding a single NFS4_CONTENT_DATA segment returned by the server. This is the simplest implementation possible, since it does not account for any hole segments in the reply. Signed-off-by: Anna Schumaker commit a14a63594cc2e5bdcbb1543d29df945da71e380f Author: Anna Schumaker Date: Fri Apr 17 11:01:50 2020 -0400 NFS: Use xdr_page_pos() in NFSv4 decode_getacl() Signed-off-by: Anna Schumaker commit cf1f08cac375630af6b6307907a3fc20fcf847c7 Author: Anna Schumaker Date: Fri Apr 17 11:00:24 2020 -0400 SUNRPC: Implement a xdr_page_pos() function I'll need this for READ_PLUS to help figure out the offset where page data is stored at, but it might also be useful for other things. Signed-off-by: Anna Schumaker commit f7d61ee414cadaeb05af3bf7a64fb99760b9c6e7 Author: Anna Schumaker Date: Mon Jan 26 17:26:19 2015 -0500 SUNRPC: Split out a function for setting current page I'm going to need this bit of code in a few places for READ_PLUS decoding, so let's make it a helper function. Signed-off-by: Anna Schumaker commit 49f3d12b0f70ea867b891ad2a97f6e51bb564e18 Author: Jakub Wilk Date: Wed Oct 7 07:57:17 2020 +0200 bpf: Fix typo in uapi/linux/bpf.h Reported-by: Samanta Navarro Signed-off-by: Jakub Wilk Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201007055717.7319-1-jwilk@jwilk.net commit ebfb4d40ed9dd45d2d6780f58d0cd9336d647890 Author: Yonghong Song Date: Tue Oct 6 23:29:33 2020 -0700 bpf: Fix build failure for kernel/trace/bpf_trace.c with CONFIG_NET=n When CONFIG_NET is not defined, I hit the following build error: kernel/trace/bpf_trace.o:(.rodata+0x110): undefined reference to `bpf_prog_test_run_raw_tp' Commit 1b4d60ec162f ("bpf: Enable BPF_PROG_TEST_RUN for raw_tracepoint") added test_run support for raw_tracepoint in /kernel/trace/bpf_trace.c. But the test_run function bpf_prog_test_run_raw_tp is defined in net/bpf/test_run.c, only available with CONFIG_NET=y. Adding a CONFIG_NET guard for .test_run = bpf_prog_test_run_raw_tp; fixed the above build issue. Fixes: 1b4d60ec162f ("bpf: Enable BPF_PROG_TEST_RUN for raw_tracepoint") Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201007062933.3425899-1-yhs@fb.com commit 49a2a4d4163f95e36e2bec50e06813b73401bc76 Author: Randy Dunlap Date: Tue Oct 6 19:16:13 2020 -0700 kernel/bpf/verifier: Fix build when NET is not enabled Fix build errors in kernel/bpf/verifier.c when CONFIG_NET is not enabled. ../kernel/bpf/verifier.c:3995:13: error: ‘btf_sock_ids’ undeclared here (not in a function); did you mean ‘bpf_sock_ops’? .btf_id = &btf_sock_ids[BTF_SOCK_TYPE_SOCK_COMMON], ../kernel/bpf/verifier.c:3995:26: error: ‘BTF_SOCK_TYPE_SOCK_COMMON’ undeclared here (not in a function); did you mean ‘PTR_TO_SOCK_COMMON’? .btf_id = &btf_sock_ids[BTF_SOCK_TYPE_SOCK_COMMON], Fixes: 1df8f55a37bd ("bpf: Enable bpf_skc_to_* sock casting helper to networking prog type") Signed-off-by: Randy Dunlap Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201007021613.13646-1-rdunlap@infradead.org commit 6a0e321ea735691e726d84ee29a1a3fd3fc3541a Author: Rob Herring Date: Mon Oct 5 13:38:30 2020 -0500 dt-bindings: Explicitly allow additional properties in common schemas In order to add meta-schema checks for additional/unevaluatedProperties being present, all schema need to make this explicit. As common/shared schema are included by other schemas, they should always allow for additionalProperties. Acked-by: Mark Brown Acked-by: Krzysztof Kozlowski Acked-by: Sebastian Reichel Acked-by: Chanwoo Choi Acked-By: Vinod Koul Acked-by: Lee Jones Acked-by: Geert Uytterhoeven Acked-by: Srinivas Kandagatla Acked-by: Ulf Hansson Acked-by: Jonathan Cameron Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20201005183830.486085-5-robh@kernel.org Signed-off-by: Rob Herring commit 4828556dca12b294f1c548f05348068d141c3a36 Author: Rob Herring Date: Mon Oct 5 13:38:28 2020 -0500 dt-bindings: Use 'additionalProperties' instead of 'unevaluatedProperties' In cases where we don't reference another schema, 'additionalProperties' can be used instead. This is preferred for now as 'unevaluatedProperties' support isn't implemented yet. In a few cases, this means adding some missing property definitions of which most are for SPI bus properties. 'unevaluatedProperties' is not going to work for the SPI bus properties anyways as they are evaluated from the parent node, not the SPI child node. Acked-by: Mark Brown Acked-by: Krzysztof Kozlowski Acked-by: Lee Jones Acked-by: Jonathan Cameron Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20201005183830.486085-3-robh@kernel.org Signed-off-by: Rob Herring commit 6fdc6e23a7d13e4f7f7908b42d39595195716a61 Author: Rob Herring Date: Mon Oct 5 13:38:27 2020 -0500 dt-bindings: Add missing 'unevaluatedProperties' This doesn't yet do anything in the tools, but make it explicit so we can check either 'unevaluatedProperties' or 'additionalProperties' is present in schemas. 'unevaluatedProperties' is appropriate when including another schema (via '$ref') and all possible properties and/or child nodes are not explicitly listed in the schema with the '$ref'. This is in preparation to add a meta-schema to check for missing 'unevaluatedProperties' or 'additionalProperties'. This has been a constant source of review issues. Acked-by: Mark Brown Acked-by: Wolfram Sang Acked-by: Krzysztof Kozlowski Acked-By: Vinod Koul Acked-by: Geert Uytterhoeven Acked-by: Ulf Hansson Acked-by: Guenter Roeck Acked-by: Mathieu Poirier Acked-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20201005183830.486085-2-robh@kernel.org Signed-off-by: Rob Herring commit d89d5f855f84ccf3f7e648813b4bb95c780bd7cd Author: Paul Bolle Date: Thu Oct 1 22:20:28 2020 +0200 locking/atomics: Check atomic-arch-fallback.h too The sha1sum of include/linux/atomic-arch-fallback.h isn't checked by check-atomics.sh. It's not clear why it's skipped so let's check it too. Signed-off-by: Paul Bolle Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mark Rutland Link: https://lkml.kernel.org/r/20201001202028.1048418-1-pebolle@tiscali.nl commit 24a1877286822293684ef3f7bada4ea48a6e129e Author: Sebastian Andrzej Siewior Date: Thu Sep 24 17:48:51 2020 +0200 locking/seqlock: Tweak DEFINE_SEQLOCK() kernel doc ctags creates a warning: |ctags: Warning: include/linux/seqlock.h:738: null expansion of name pattern "\2" The DEFINE_SEQLOCK() macro is passed to ctags and being told to expect an argument. Add a dummy argument to keep ctags quiet. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Link: https://lkml.kernel.org/r/20200924154851.skmswuyj322yuz4g@linutronix.de commit 5f3ae016a68ff5400febe91885aba794ab5b0af4 Author: Marlon Rac Cambasis Date: Wed Oct 7 18:17:05 2020 +1100 Docs: Fixing spelling errors in Documentation/devicetree/bindings/ Revised patch fixing six spelling errors within Documentation/devicetree/bindings/. "specfied" replaced with "specified" in all three files modified. "atleast" seperated into "at least" three times in samsung-pinctrl.txt. This should remove any confusion that a reader might have. Signed-off-by: Marlon Rac Cambasis Link: https://lore.kernel.org/r/20201007071705.GA11381@marlonpc-debian Signed-off-by: Rob Herring commit 7f5933f81bd85a0bf6a87d65c7327ea048a75e54 Author: Dave Jiang Date: Mon Oct 5 08:11:23 2020 -0700 x86/asm: Add an enqcmds() wrapper for the ENQCMDS instruction Currently, the MOVDIR64B instruction is used to atomically submit 64-byte work descriptors to devices. Although it can encounter errors like device queue full, command not accepted, device not ready, etc when writing to a device MMIO, MOVDIR64B can not report back on errors from the device itself. This means that MOVDIR64B users need to separately interact with a device to see if a descriptor was successfully queued, which slows down device interactions. ENQCMD and ENQCMDS also atomically submit 64-byte work descriptors to devices. But, they *can* report back errors directly from the device, such as if the device was busy, or device not enabled or does not support the command. This immediate feedback from the submission instruction itself reduces the number of interactions with the device and can greatly increase efficiency. ENQCMD can be used at any privilege level, but can effectively only submit work on behalf of the current process. ENQCMDS is a ring0-only instruction and can explicitly specify a process context instead of being tied to the current process or needing to reprogram the IA32_PASID MSR. Use ENQCMDS for work submission within the kernel because a Process Address ID (PASID) is setup to translate the kernel virtual address space. This PASID is provided to ENQCMDS from the descriptor structure submitted to the device and not retrieved from IA32_PASID MSR, which is setup for the current user address space. See Intel Software Developer’s Manual for more information on the instructions. [ bp: - Make operand constraints like movdir64b() because both insns are basically doing the same thing, more or less. - Fixup comments and cleanup. ] Link: https://lkml.kernel.org/r/20200924180041.34056-3-dave.jiang@intel.com Signed-off-by: Dave Jiang Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20201005151126.657029-3-dave.jiang@intel.com commit 0888e1030d3e3e5ce9dfd8e030cf13a2e9a1519a Author: Dave Jiang Date: Mon Oct 5 08:11:22 2020 -0700 x86/asm: Carve out a generic movdir64b() helper for general usage Carve out the MOVDIR64B inline asm primitive into a generic helper so that it can be used by other functions. Move it to special_insns.h and have iosubmit_cmds512() call it. [ bp: Massage commit message. ] Suggested-by: Michael Matz Signed-off-by: Dave Jiang Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201005151126.657029-2-dave.jiang@intel.com commit e5b23740db9b9c43464223c85d68ed0de7c311d4 Author: Kaixu Xia Date: Tue Oct 6 17:50:15 2020 -0700 xfs: fix the indent in xfs_trans_mod_dquot The formatting is strange in xfs_trans_mod_dquot, so do a reindent. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 97611f936674326d6fd12225ec4150fa37c04dfa Author: Kaixu Xia Date: Tue Oct 6 17:50:14 2020 -0700 xfs: do the ASSERT for the arguments O_{u,g,p}dqpp If we pass in XFS_QMOPT_{U,G,P}QUOTA flags and different uid/gid/prid than them currently associated with the inode, the arguments O_{u,g,p}dqpp shouldn't be NULL, so add the ASSERT for them. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8ffa90e1145c70c7ac47f14b59583b2296d89e72 Author: Darrick J. Wong Date: Thu Oct 1 10:56:07 2020 -0700 xfs: fix deadlock and streamline xfs_getfsmap performance Refactor xfs_getfsmap to improve its performance: instead of indirectly calling a function that copies one record to userspace at a time, create a shadow buffer in the kernel and copy the whole array once at the end. On the author's computer, this reduces the runtime on his /home by ~20%. This also eliminates a deadlock when running GETFSMAP against the realtime device. The current code locks the rtbitmap to create fsmappings and copies them into userspace, having not released the rtbitmap lock. If the userspace buffer is an mmap of a sparse file that itself resides on the realtime device, the write page fault will recurse into the fs for allocation, which will deadlock on the rtbitmap lock. Fixes: 4c934c7dd60c ("xfs: report realtime space information via the rtbitmap") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Chandan Babu R commit acd1ac3aa22fd58803a12d26b1ab7f70232f8d8d Author: Darrick J. Wong Date: Thu Oct 1 10:56:07 2020 -0700 xfs: limit entries returned when counting fsmap records If userspace asked fsmap to count the number of entries, we cannot return more than UINT_MAX entries because fmh_entries is u32. Therefore, stop counting if we hit this limit or else we will waste time to return truncated results. Fixes: e89c041338ed ("xfs: implement the GETFSMAP ioctl") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Chandan Babu R commit 74f4d6a1e065c92428c5b588099e307a582d79d9 Author: Darrick J. Wong Date: Fri Sep 25 17:39:58 2020 -0700 xfs: only relog deferred intent items if free space in the log gets low Now that we have the ability to ask the log how far the tail needs to be pushed to maintain its free space targets, augment the decision to relog an intent item so that we only do it if the log has hit the 75% full threshold. There's no point in relogging an intent into the same checkpoint, and there's no need to relog if there's plenty of free space in the log. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit ed1575daf71e4e21d8ae735b6e687c95454aaa17 Author: Darrick J. Wong Date: Fri Sep 25 17:39:51 2020 -0700 xfs: expose the log push threshold Separate the computation of the log push threshold and the push logic in xlog_grant_push_ail. This enables higher level code to determine (for example) that it is holding on to a logged intent item and the log is so busy that it is more than 75% full. In that case, it would be desirable to move the log item towards the head to release the tail, which we will cover in the next patch. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 4e919af7827a6adfc28e82cd6c4ffcfcc3dd6118 Author: Darrick J. Wong Date: Sun Sep 27 16:18:13 2020 -0700 xfs: periodically relog deferred intent items There's a subtle design flaw in the deferred log item code that can lead to pinning the log tail. Taking up the defer ops chain examples from the previous commit, we can get trapped in sequences like this: Caller hands us a transaction t0 with D0-D3 attached. The defer ops chain will look like the following if the transaction rolls succeed: t1: D0(t0), D1(t0), D2(t0), D3(t0) t2: d4(t1), d5(t1), D1(t0), D2(t0), D3(t0) t3: d5(t1), D1(t0), D2(t0), D3(t0) ... t9: d9(t7), D3(t0) t10: D3(t0) t11: d10(t10), d11(t10) t12: d11(t10) In transaction 9, we finish d9 and try to roll to t10 while holding onto an intent item for D3 that we logged in t0. The previous commit changed the order in which we place new defer ops in the defer ops processing chain to reduce the maximum chain length. Now make xfs_defer_finish_noroll capable of relogging the entire chain periodically so that we can always move the log tail forward. Most chains will never get relogged, except for operations that generate very long chains (large extents containing many blocks with different sharing levels) or are on filesystems with small logs and a lot of ongoing metadata updates. Callers are now required to ensure that the transaction reservation is large enough to handle logging done items and new intent items for the maximum possible chain length. Most callers are careful to keep the chain lengths low, so the overhead should be minimal. The decision to relog an intent item is made based on whether the intent was logged in a previous checkpoint, since there's no point in relogging an intent into the same checkpoint. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 27dada070d59c28a441f1907d2cec891b17dcb26 Author: Darrick J. Wong Date: Fri Sep 25 17:39:51 2020 -0700 xfs: change the order in which child and parent defer ops are finished The defer ops code has been finishing items in the wrong order -- if a top level defer op creates items A and B, and finishing item A creates more defer ops A1 and A2, we'll put the new items on the end of the chain and process them in the order A B A1 A2. This is kind of weird, since it's convenient for programmers to be able to think of A and B as an ordered sequence where all the sub-tasks for A must finish before we move on to B, e.g. A A1 A2 D. Right now, our log intent items are not so complex that this matters, but this will become important for the atomic extent swapping patchset. In order to maintain correct reference counting of extents, we have to unmap and remap extents in that order, and we want to complete that work before moving on to the next range that the user wants to swap. This patch fixes defer ops to satsify that requirement. The primary symptom of the incorrect order was noticed in an early performance analysis of the atomic extent swap code. An astonishingly large number of deferred work items accumulated when userspace requested an atomic update of two very fragmented files. The cause of this was traced to the same ordering bug in the inner loop of xfs_defer_finish_noroll. If the ->finish_item method of a deferred operation queues new deferred operations, those new deferred ops are appended to the tail of the pending work list. To illustrate, say that a caller creates a transaction t0 with four deferred operations D0-D3. The first thing defer ops does is roll the transaction to t1, leaving us with: t1: D0(t0), D1(t0), D2(t0), D3(t0) Let's say that finishing each of D0-D3 will create two new deferred ops. After finish D0 and roll, we'll have the following chain: t2: D1(t0), D2(t0), D3(t0), d4(t1), d5(t1) d4 and d5 were logged to t1. Notice that while we're about to start work on D1, we haven't actually completed all the work implied by D0 being finished. So far we've been careful (or lucky) to structure the dfops callers such that D1 doesn't depend on d4 or d5 being finished, but this is a potential logic bomb. There's a second problem lurking. Let's see what happens as we finish D1-D3: t3: D2(t0), D3(t0), d4(t1), d5(t1), d6(t2), d7(t2) t4: D3(t0), d4(t1), d5(t1), d6(t2), d7(t2), d8(t3), d9(t3) t5: d4(t1), d5(t1), d6(t2), d7(t2), d8(t3), d9(t3), d10(t4), d11(t4) Let's say that d4-d11 are simple work items that don't queue any other operations, which means that we can complete each d4 and roll to t6: t6: d5(t1), d6(t2), d7(t2), d8(t3), d9(t3), d10(t4), d11(t4) t7: d6(t2), d7(t2), d8(t3), d9(t3), d10(t4), d11(t4) ... t11: d10(t4), d11(t4) t12: d11(t4) When we try to roll to transaction #12, we're holding defer op d11, which we logged way back in t4. This means that the tail of the log is pinned at t4. If the log is very small or there are a lot of other threads updating metadata, this means that we might have wrapped the log and cannot get roll to t11 because there isn't enough space left before we'd run into t4. Let's shift back to the original failure. I mentioned before that I discovered this flaw while developing the atomic file update code. In that scenario, we have a defer op (D0) that finds a range of file blocks to remap, creates a handful of new defer ops to do that, and then asks to be continued with however much work remains. So, D0 is the original swapext deferred op. The first thing defer ops does is rolls to t1: t1: D0(t0) We try to finish D0, logging d1 and d2 in the process, but can't get all the work done. We log a done item and a new intent item for the work that D0 still has to do, and roll to t2: t2: D0'(t1), d1(t1), d2(t1) We roll and try to finish D0', but still can't get all the work done, so we log a done item and a new intent item for it, requeue D0 a second time, and roll to t3: t3: D0''(t2), d1(t1), d2(t1), d3(t2), d4(t2) If it takes 48 more rolls to complete D0, then we'll finally dispense with D0 in t50: t50: D(t49), d1(t1), ..., d102(t50) We then try to roll again to get a chain like this: t51: d1(t1), d2(t1), ..., d101(t50), d102(t50) ... t152: d102(t50) Notice that in rolling to transaction #51, we're holding on to a log intent item for d1 that was logged in transaction #1. This means that the tail of the log is pinned at t1. If the log is very small or there are a lot of other threads updating metadata, this means that we might have wrapped the log and cannot roll to t51 because there isn't enough space left before we'd run into t1. This is of course problem #2 again. But notice the third problem with this scenario: we have 102 defer ops tied to this transaction! Each of these items are backed by pinned kernel memory, which means that we risk OOM if the chains get too long. Yikes. Problem #1 is a subtle logic bomb that could hit someone in the future; problem #2 applies (rarely) to the current upstream, and problem #3 applies to work under development. This is not how incremental deferred operations were supposed to work. The dfops design of logging in the same transaction an intent-done item and a new intent item for the work remaining was to make it so that we only have to juggle enough deferred work items to finish that one small piece of work. Deferred log item recovery will find that first unfinished work item and restart it, no matter how many other intent items might follow it in the log. Therefore, it's ok to put the new intents at the start of the dfops chain. For the first example, the chains look like this: t2: d4(t1), d5(t1), D1(t0), D2(t0), D3(t0) t3: d5(t1), D1(t0), D2(t0), D3(t0) ... t9: d9(t7), D3(t0) t10: D3(t0) t11: d10(t10), d11(t10) t12: d11(t10) For the second example, the chains look like this: t1: D0(t0) t2: d1(t1), d2(t1), D0'(t1) t3: d2(t1), D0'(t1) t4: D0'(t1) t5: d1(t4), d2(t4), D0''(t4) ... t148: D0<50 primes>(t147) t149: d101(t148), d102(t148) t150: d102(t148) This actually sucks more for pinning the log tail (we try to roll to t10 while holding an intent item that was logged in t1) but we've solved problem #1. We've also reduced the maximum chain length from: sum(all the new items) + nr_original_items to: max(new items that each original item creates) + nr_original_items This solves problem #3 by sharply reducing the number of defer ops that can be attached to a transaction at any given time. The change makes the problem of log tail pinning worse, but is improvement we need to solve problem #2. Actually solving #2, however, is left to the next patch. Note that a subsequent analysis of some hard-to-trigger reflink and COW livelocks on extremely fragmented filesystems (or systems running a lot of IO threads) showed the same symptoms -- uncomfortably large numbers of incore deferred work items and occasional stalls in the transaction grant code while waiting for log reservations. I think this patch and the next one will also solve these problems. As originally written, the code used list_splice_tail_init instead of list_splice_init, so change that, and leave a short comment explaining our actions. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Brian Foster commit ff4ab5e02a0447dd1e290883eb6cd7d94848e590 Author: Darrick J. Wong Date: Fri Sep 25 17:39:51 2020 -0700 xfs: fix an incore inode UAF in xfs_bui_recover In xfs_bui_item_recover, there exists a use-after-free bug with regards to the inode that is involved in the bmap replay operation. If the mapping operation does not complete, we call xfs_bmap_unmap_extent to create a deferred op to finish the unmapping work, and we retain a pointer to the incore inode. Unfortunately, the very next thing we do is commit the transaction and drop the inode. If reclaim tears down the inode before we try to finish the defer ops, we dereference garbage and blow up. Therefore, create a way to join inodes to the defer ops freezer so that we can maintain the xfs_inode reference until we're done with the inode. Note: This imposes the requirement that there be enough memory to keep every incore inode in memory throughout recovery. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig commit 64a3f3315bc60f710a0a25c1798ac0ea58c6fa1f Author: Darrick J. Wong Date: Fri Sep 25 17:39:50 2020 -0700 xfs: clean up xfs_bui_item_recover iget/trans_alloc/ilock ordering In most places in XFS, we have a specific order in which we gather resources: grab the inode, allocate a transaction, then lock the inode. xfs_bui_item_recover doesn't do it in that order, so fix it to be more consistent. This also makes the error bailout code a bit less weird. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit 919522e89f8e71fc6a8f8abe17be4011573c6ea0 Author: Darrick J. Wong Date: Fri Sep 25 17:39:50 2020 -0700 xfs: clean up bmap intent item recovery checking The bmap intent item checking code in xfs_bui_item_recover is spread all over the function. We should check the recovered log item at the top before we allocate any resources or do anything else, so do that. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 929b92f64048d90d23e40a59c47adf59f5026903 Author: Darrick J. Wong Date: Fri Sep 25 17:39:50 2020 -0700 xfs: xfs_defer_capture should absorb remaining transaction reservation When xfs_defer_capture extracts the deferred ops and transaction state from a transaction, it should record the transaction reservation type from the old transaction so that when we continue the dfops chain, we still use the same reservation parameters. Doing this means that the log item recovery functions get to determine the transaction reservation instead of abusing tr_itruncate in yet another part of xfs. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig commit 4f9a60c48078c0efa3459678fa8d6e050e8ada5d Author: Darrick J. Wong Date: Fri Sep 25 17:39:49 2020 -0700 xfs: xfs_defer_capture should absorb remaining block reservations When xfs_defer_capture extracts the deferred ops and transaction state from a transaction, it should record the remaining block reservations so that when we continue the dfops chain, we can reserve the same number of blocks to use. We capture the reservations for both data and realtime volumes. This adds the requirement that every log intent item recovery function must be careful to reserve enough blocks to handle both itself and all defer ops that it can queue. On the other hand, this enables us to do away with the handwaving block estimation nonsense that was going on in xlog_finish_defer_ops. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit e6fff81e487089e47358a028526a9f63cdbcd503 Author: Darrick J. Wong Date: Fri Sep 25 17:39:37 2020 -0700 xfs: proper replay of deferred ops queued during log recovery When we replay unfinished intent items that have been recovered from the log, it's possible that the replay will cause the creation of more deferred work items. As outlined in commit 509955823cc9c ("xfs: log recovery should replay deferred ops in order"), later work items have an implicit ordering dependency on earlier work items. Therefore, recovery must replay the items (both recovered and created) in the same order that they would have been during normal operation. For log recovery, we enforce this ordering by using an empty transaction to collect deferred ops that get created in the process of recovering a log intent item to prevent them from being committed before the rest of the recovered intent items. After we finish committing all the recovered log items, we allocate a transaction with an enormous block reservation, splice our huge list of created deferred ops into that transaction, and commit it, thereby finishing all those ops. This is /really/ hokey -- it's the one place in XFS where we allow nested transactions; the splicing of the defer ops list is is inelegant and has to be done twice per recovery function; and the broken way we handle inode pointers and block reservations cause subtle use-after-free and allocator problems that will be fixed by this patch and the two patches after it. Therefore, replace the hokey empty transaction with a structure designed to capture each chain of deferred ops that are created as part of recovering a single unfinished log intent. Finally, refactor the loop that replays those chains to do so using one transaction per chain. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig commit 901219bb25076ec0c43824dd2f3daa8c63a89184 Author: Darrick J. Wong Date: Mon Sep 28 11:01:45 2020 -0700 xfs: remove XFS_LI_RECOVERED The ->iop_recover method of a log intent item removes the recovered intent item from the AIL by logging an intent done item and committing the transaction, so it's superfluous to have this flag check. Nothing else uses it, so get rid of the flag entirely. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig commit b80b29d602a8879829fbf89115e9e6877806a2da Author: Darrick J. Wong Date: Fri Sep 25 17:39:27 2020 -0700 xfs: remove xfs_defer_reset Remove this one-line helper since the assert is trivially true in one call site and the rest obscures a bitmask operation. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster commit b41c15f4e1c1f1657da15c482fa837c1b7384452 Author: Dan Carpenter Date: Wed Oct 7 10:49:28 2020 +0300 ALSA: bebob: potential info leak in hwdep_read() The "count" variable needs to be capped on every path so that we don't copy too much information to the user. Fixes: 618eabeae711 ("ALSA: bebob: Add hwdep interface") Signed-off-by: Dan Carpenter Acked-by: Takashi Sakamoto Cc: Link: https://lore.kernel.org/r/20201007074928.GA2529578@mwanda Signed-off-by: Takashi Iwai commit ca184355db8e60290fa34bf61c13308e6f4f50d3 Author: Jian-Hong Pan Date: Wed Oct 7 13:22:25 2020 +0800 ALSA: hda/realtek: Enable audio jacks of ASUS D700SA with ALC887 The ASUS D700SA desktop's audio (1043:2390) with ALC887 cannot detect the headset microphone and another headphone jack until ALC887_FIXUP_ASUS_HMIC and ALC887_FIXUP_ASUS_AUDIO quirks are applied. The NID 0x15 maps as the headset microphone and NID 0x19 maps as another headphone jack. Also need the function like alc887_fixup_asus_jack to enable the audio jacks. Signed-off-by: Jian-Hong Pan Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/20201007052224.22611-1-jhp@endlessos.org Signed-off-by: Takashi Iwai commit efad4240da949fc3249015065b95d708b72ae670 Author: Rafael J. Wysocki Date: Tue Oct 6 21:43:43 2020 +0200 cpufreq: stats: Add memory barrier to store_reset() There is nothing to prevent the CPU or the compiler from reordering the writes to stats->reset_time and stats->reset_pending in store_reset(), in which case the readers of stats->reset_time may see a stale value. Moreover, on 32-bit arches the write to reset_time cannot be completed in one go, so the readers of it may see a partially updated value in that case. To prevent that from happening, add a write memory barrier between the writes to stats->reset_time and stats->reset_pending in store_reset() and corresponding read memory barrier in the readers of stats->reset_time. Fixes: 40c3bd4cfa6f ("cpufreq: stats: Defer stats update to cpufreq_stats_record_transition()") Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit 86836bac55f971995499978df4e62115d7baf5ef Author: Rafael J. Wysocki Date: Tue Oct 6 14:01:31 2020 +0200 cpufreq: schedutil: Simplify sugov_fast_switch() Drop a redundant local variable definition from sugov_fast_switch() and rearrange the code in there to avoid the redundant logical negation. Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit fe6f0cdc49263ae61cd3d33399662808c2398e86 Author: Johannes Thumshirn Date: Wed Oct 7 21:35:08 2020 +0900 block: soft limit zone-append sectors as well Martin rightfully noted that for normal filesystem IO we have soft limits in place, to prevent them from getting too big and not lead to unpredictable latencies. For zone append we only have the hardware limit in place. Cap the max sectors we submit via zone-append to the maximal number of sectors if the second limit is lower. Reported-by: Martin K. Petersen Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/linux-btrfs/yq1k0w8g3rw.fsf@ca-mkp.ca.oracle.com Signed-off-by: Jens Axboe commit 81c93798ef3ebd2109dc24371db3cc14cdf77777 Author: Elia Devito Date: Sun Oct 4 23:13:05 2020 +0200 platform/x86: hp-wmi: add support for thermal policy HP Spectre notebooks (and probably other model as well) support up to 4 thermal policy: - HP Recommended - Performance - Cool - Quiet at least on HP Spectre x360 Convertible 15-df0xxx the firmware sets the thermal policy to default but hardcode the odvp0 variable to 1, this causes thermald to choose the wrong DPTF profile witch result in low performance when notebook is on AC, calling thermal policy write command allow firmware to correctly set the odvp0 variable. Signed-off-by: Elia Devito Link: https://lore.kernel.org/r/20201004211305.11628-1-eliadevito@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 4c8511317b4ec75cc3868f80a7b9fddb8322e512 Author: Kees Cook Date: Mon Sep 28 13:26:50 2020 -0700 doc: dev-tools: kselftest.rst: Update examples and paths Update the installation commands and path details, detail the new options available in the run_kselftests.sh script. Signed-off-by: Kees Cook Reviewed-by: Naresh Kamboju Signed-off-by: Shuah Khan commit 5da1918446a1d50d57f2f6062f7fdede0b052473 Author: Kees Cook Date: Mon Sep 28 13:26:49 2020 -0700 selftests/run_kselftest.sh: Make each test individually selectable Currently with run_kselftest.sh there is no way to choose which test we could run. All the tests listed in kselftest-list.txt are all run every time. This patch enhanced the run_kselftest.sh to make the test collections (or tests) individually selectable. e.g.: $ ./run_kselftest.sh -c seccomp -t timers:posix_timers -t timers:nanosleep Additionally adds a way to list all known tests with "-l", usage with "-h", and perform a dry run without running tests with "-n". Co-developed-by: Hangbin Liu Signed-off-by: Hangbin Liu Signed-off-by: Kees Cook Tested-by: Naresh Kamboju Signed-off-by: Shuah Khan commit f0f0a5df4e081e7a659929303fe83450edce9a3e Author: Kees Cook Date: Mon Sep 28 13:26:48 2020 -0700 selftests: Extract run_kselftest.sh and generate stand-alone test list Instead of building a script on the fly (which just repeats the same thing for each test collection), move the script out of the Makefile and into run_kselftest.sh, which reads kselftest-list.txt. Adjust the emit_tests target to report each test on a separate line so that test running tools (e.g. LAVA) can easily remove individual tests (for example, as seen in [1]). [1] https://github.com/Linaro/test-definitions/pull/208/commits/2e7b62155e4998e54ac0587704932484d4ff84c8 Signed-off-by: Kees Cook Tested-by: Naresh Kamboju Signed-off-by: Shuah Khan commit 76ecfcb0852eb0390881a695a2f349b804d80147 Author: Bartosz Golaszewski Date: Thu Sep 24 14:45:26 2020 +0200 samples: configfs: prefer pr_err() over bare printk(KERN_ERR pr_*() printing helpers are preferred over using bare printk(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Christoph Hellwig commit 288f295e0a49481c4ff64715b6b3eb8ebfe3432b Author: Bartosz Golaszewski Date: Thu Sep 24 14:45:25 2020 +0200 samples: configfs: don't use spaces before tabs The copyright notice alarms checkpatch.pl of usin spaces before tabs. Fix this. Signed-off-by: Bartosz Golaszewski Signed-off-by: Christoph Hellwig commit 4e415a844ddd705cc7de87e01f0e6189a3def8ef Author: Bartosz Golaszewski Date: Thu Sep 24 14:45:24 2020 +0200 samples: configfs: consolidate local variables of the same type Move local variables of the same type into a single line for better readability. Signed-off-by: Bartosz Golaszewski Signed-off-by: Christoph Hellwig commit 91aad62560fc8cc11a1f04e627da0c0f0d33ef08 Author: Bartosz Golaszewski Date: Thu Sep 24 14:45:22 2020 +0200 samples: configfs: don't reinitialize variables which are already zeroed The structure containing the storeme field is allocated using kzalloc(). There's no need to set it to 0 again. Signed-off-by: Bartosz Golaszewski Signed-off-by: Christoph Hellwig commit b86ff67d5a28f3ac1479d99b8a687e7107c58ae6 Author: Bartosz Golaszewski Date: Thu Sep 24 14:45:21 2020 +0200 samples: configfs: replace simple_strtoul() with kstrtoint() simple_strtoul() is deprecated. Use kstrtoint(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Christoph Hellwig commit 1b0d36e81bdc52684af19f0cad9c9dca13ce4dbc Author: Bartosz Golaszewski Date: Thu Sep 24 14:45:20 2020 +0200 samples: configfs: fix alignment in item struct Aling the assignment of a static structure's field to be consistent with all other instances. Signed-off-by: Bartosz Golaszewski Signed-off-by: Christoph Hellwig commit e0ee1fdb3fc49102e03c34527c5185b4761c7c8f Author: Bartosz Golaszewski Date: Thu Sep 24 14:45:18 2020 +0200 samples: configfs: drop unnecessary ternary operators Checking pointers for NULL value before passing them to container_of() is pointless because even if we return NULL from the ternary operator, none of the users checks the returned value but they instead dereference it unconditionally. AFAICT this cannot really happen either. Simplify the code by removing the ternary operators from to_childless() et al. Signed-off-by: Bartosz Golaszewski Signed-off-by: Christoph Hellwig commit 447243737c9d52d9c77fe0da0ed993903b64f28c Author: Bartosz Golaszewski Date: Wed Oct 7 15:43:56 2020 +0200 samples: configfs: remove redundant newlines There's no need for suplemental newlines in the source file - especially since the examples are well divided with comments already. Signed-off-by: Bartosz Golaszewski Signed-off-by: Christoph Hellwig commit 8964bd4ff6f01462c7bdbe3d1280cf59e6157980 Author: Bartosz Golaszewski Date: Thu Sep 24 14:45:15 2020 +0200 MAINTAINERS: add the sample directory to the configfs entry Code samples for configfs don't have an explicit maintainer. Add the samples directory to the existing configfs entry in MAINTAINERS. Signed-off-by: Bartosz Golaszewski Signed-off-by: Christoph Hellwig commit 55596c5445566cf43b83238198fd038d21172d99 Author: Shyam Sundar S K Date: Wed Oct 7 16:42:20 2020 +0530 pinctrl: amd: Add missing pins to the pin group list Some of the pins were not exposed in the initial driver or kept as reserved. Exposing all of them now. Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20201007111220.744348-1-Shyam-sundar.S-k@amd.com Signed-off-by: Linus Walleij commit a82e4ef0417b89c6707706b9194fb0c7872a4c6a Merge: baab853229ec1 d433ab42fdc2c Author: Will Deacon Date: Wed Oct 7 14:36:24 2020 +0100 Merge branch 'for-next/late-arrivals' into for-next/core Late patches for 5.10: MTE selftests, minor KCSAN preparation and removal of some unused prototypes. (Amit Daniel Kachhap and others) * for-next/late-arrivals: arm64: random: Remove no longer needed prototypes arm64: initialize per-cpu offsets earlier kselftest/arm64: Check mte tagged user address in kernel kselftest/arm64: Verify KSM page merge for MTE pages kselftest/arm64: Verify all different mmap MTE options kselftest/arm64: Check forked child mte memory accessibility kselftest/arm64: Verify mte tag inclusion via prctl kselftest/arm64: Add utilities and a test to validate mte memory commit d433ab42fdc2c8a32e5df7d53833310f0ab9822c Author: Andre Przywara Date: Tue Oct 6 20:44:53 2020 +0100 arm64: random: Remove no longer needed prototypes Commit 9bceb80b3cc4 ("arm64: kaslr: Use standard early random function") removed the direct calls of the __arm64_rndr() and __early_cpu_has_rndr() functions, but left the dummy prototypes in the #else branch of the #ifdef CONFIG_ARCH_RANDOM guard. Remove the redundant prototypes, as they have no users outside of this header file. Signed-off-by: Andre Przywara Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20201006194453.36519-1-andre.przywara@arm.com Signed-off-by: Will Deacon commit abea14bfdebbe9bd02f2ad24a1f3a878ed21c8f0 Author: Jing Xiangfeng Date: Fri Sep 11 11:33:50 2020 +0800 i3c: master: Fix error return in cdns_i3c_master_probe() Fix to return negative error code -ENOMEM from the error handling case instead of 0. Fixes: 603f2bee2c54 ("i3c: master: Add driver for Cadence IP") Signed-off-by: Jing Xiangfeng Signed-off-by: Boris Brezillon Link: https://lore.kernel.org/linux-i3c/20200911033350.23904-1-jingxiangfeng@huawei.com commit 062b735912b9f3aa3e14cd02b5ede08cf8bc093f Author: Matthew Wilcox (Oracle) Date: Tue Mar 31 14:23:59 2020 -0400 XArray: Test two more things about xa_cmpxchg 1. If we xa_cmpxchg() an entry in, it marks the index as not free. 2. If we xa_cmpxchg() NULL in, it marks the index as free. Signed-off-by: Matthew Wilcox (Oracle) commit a219b856a2b993da234108307be772448f22b0ce Author: Matthew Wilcox (Oracle) Date: Thu Apr 2 14:26:13 2020 -0400 ida: Free allocated bitmap in error path If a bitmap needs to be allocated, and then by the time the thread is scheduled to be run again all the indices which would satisfy the allocation have been allocated then we would leak the allocation. Almost impossible to hit in practice, but a trivial fix. Found by Coverity. Fixes: f32f004cddf8 ("ida: Convert to XArray") Reported-by: coverity-bot Reviewed-by: Kees Cook Signed-off-by: Matthew Wilcox (Oracle) commit dd841a749d1ded8e2e5facc4242ee0b6779fc0cb Author: Matthew Wilcox (Oracle) Date: Sun Jun 14 06:07:10 2020 -0400 radix tree test suite: Fix compilation Introducing local_lock broke compilation; fix it all up. Signed-off-by: Matthew Wilcox (Oracle) commit bef69bd7cfc363ab94b84ea29102f3e913ed3c6c Author: Namhyung Kim Date: Wed Oct 7 17:13:11 2020 +0900 perf stat: Fix out of bounds CPU map access when handling armv8_pmu events It was reported that 'perf stat' crashed when using with armv8_pmu (CPU) events with the task mode. As 'perf stat' uses an empty cpu map for task mode but armv8_pmu has its own cpu mask, it has confused which map it should use when accessing file descriptors and this causes segfaults: (gdb) bt #0 0x0000000000603fc8 in perf_evsel__close_fd_cpu (evsel=, cpu=) at evsel.c:122 #1 perf_evsel__close_cpu (evsel=evsel@entry=0x716e950, cpu=7) at evsel.c:156 #2 0x00000000004d4718 in evlist__close (evlist=0x70a7cb0) at util/evlist.c:1242 #3 0x0000000000453404 in __run_perf_stat (argc=3, argc@entry=1, argv=0x30, argv@entry=0xfffffaea2f90, run_idx=119, run_idx@entry=1701998435) at builtin-stat.c:929 #4 0x0000000000455058 in run_perf_stat (run_idx=1701998435, argv=0xfffffaea2f90, argc=1) at builtin-stat.c:947 #5 cmd_stat (argc=1, argv=0xfffffaea2f90) at builtin-stat.c:2357 #6 0x00000000004bb888 in run_builtin (p=p@entry=0x9764b8 , argc=argc@entry=4, argv=argv@entry=0xfffffaea2f90) at perf.c:312 #7 0x00000000004bbb54 in handle_internal_command (argc=argc@entry=4, argv=argv@entry=0xfffffaea2f90) at perf.c:364 #8 0x0000000000435378 in run_argv (argcp=, argv=) at perf.c:408 #9 main (argc=4, argv=0xfffffaea2f90) at perf.c:538 To fix this, I simply used the given cpu map unless the evsel actually is not a system-wide event (like uncore events). Fixes: 7736627b865d ("perf stat: Use affinity for closing file descriptors") Reported-by: Wei Li Signed-off-by: Namhyung Kim Tested-by: Barry Song Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20201007081311.1831003-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6db282c8a9edcbf84e699e45ec087baf07be2236 Author: Colin Ian King Date: Tue Oct 6 16:20:24 2020 +0100 ASoC: mchp-spdifrx: fix spelling mistake "overrrun" -> "overrun" There is a spelling mistake in a dev_warn message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20201006152024.542418-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 9f5fd809d7a02e32c2e044acb9f6aed1c79a699b Author: Angelo Dureghello Date: Fri Oct 2 16:05:45 2020 +0200 serial: mcf: add sysrq capability After some unsuccessful attempts to use sysrq over console, figured out that port->has_sysrq should likely be enabled, as per other architectures, this when CONFIG_SERIAL_MCF_CONSOLE is also enabled. Tested some magic sysrq commands (h, p, t, b), they works now properly. Commands works inside 5 secs after BREAK is sent, as expected. Signed-off-by: Angelo Dureghello Signed-off-by: Greg Ungerer commit 09b791d95559ef82542063333ecaa2ac9d57118e Author: Kajol Jain Date: Sat Oct 3 13:19:43 2020 +0530 powerpc/hv-gpci: Add sysfs files inside hv-gpci device to show cpumask Patch here adds a cpumask attr to hv_gpci pmu along with ABI documentation. Primary use to expose the cpumask is for the perf tool which has the capability to parse the driver sysfs folder and understand the cpumask file. Having cpumask file will reduce the number of perf command line parameters (will avoid "-C" option in the perf tool command line). It can also notify the user which is the current cpu used to retrieve the counter data. command:# cat /sys/devices/hv_gpci/cpumask 0 Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201003074943.338618-5-kjain@linux.ibm.com commit dcb5cdf60a1fbbdb3b4dd2abc562206481f09ef1 Author: Kajol Jain Date: Sat Oct 3 13:19:42 2020 +0530 powerpc/perf/hv-gpci: Add cpu hotplug support Patch here adds cpu hotplug functions to hv_gpci pmu. A new cpuhp_state "CPUHP_AP_PERF_POWERPC_HV_GPCI_ONLINE" enum is added. The online callback function updates the cpumask only if its empty. As the primary intention of adding hotplug support is to designate a CPU to make HCALL to collect the counter data. The offline function test and clear corresponding cpu in a cpumask and update cpumask to any other active cpu. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201003074943.338618-4-kjain@linux.ibm.com commit 435387dd1f6fc03c64e3fdb4cc8737904c08a4db Author: Kajol Jain Date: Sat Oct 3 13:19:41 2020 +0530 Documentation/ABI: Add ABI documentation for hv-gpci format This patch adds ABI documentation for hv-gpci event format. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201003074943.338618-3-kjain@linux.ibm.com commit 264a034099b6e3c76fae85e75329373f3652a033 Author: Kajol Jain Date: Sat Oct 3 13:19:40 2020 +0530 Documentation/ABI: Add ABI documentation for hv-24x7 format This patch adds ABI documentation for hv-24x7 format. Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201003074943.338618-2-kjain@linux.ibm.com commit 0f9866f7e85765bbda86666df56c92f377c3bc10 Author: Kajol Jain Date: Sat Oct 3 13:19:39 2020 +0530 powerpc/perf/hv-gpci: Fix starting index value Commit 9e9f60108423f ("powerpc/perf/{hv-gpci, hv-common}: generate requests with counters annotated") adds a framework for defining gpci counters. In this patch, they adds starting_index value as '0xffffffffffffffff'. which is wrong as starting_index is of size 32 bits. Because of this, incase we try to run hv-gpci event we get error. In power9 machine: command#: perf stat -e hv_gpci/system_tlbie_count_and_time_tlbie_instructions_issued/ -C 0 -I 1000 event syntax error: '..bie_count_and_time_tlbie_instructions_issued/' \___ value too big for format, maximum is 4294967295 This patch fix this issue and changes starting_index value to '0xffffffff' After this patch: command#: perf stat -e hv_gpci/system_tlbie_count_and_time_tlbie_instructions_issued/ -C 0 -I 1000 1.000085786 1,024 hv_gpci/system_tlbie_count_and_time_tlbie_instructions_issued/ 2.000287818 1,024 hv_gpci/system_tlbie_count_and_time_tlbie_instructions_issued/ 2.439113909 17,408 hv_gpci/system_tlbie_count_and_time_tlbie_instructions_issued/ Fixes: 9e9f60108423 ("powerpc/perf/{hv-gpci, hv-common}: generate requests with counters annotated") Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201003074943.338618-1-kjain@linux.ibm.com commit 8175bd580e629dcf9cc507794da774a6b8d3a9bd Author: Oliver O'Halloran Date: Wed Oct 7 15:09:03 2020 +1100 powerpc/pseries/eeh: Fix use of uninitialised variable If the RTAS call to query the PE address for a device fails we jump the err: label where an error message is printed along with the return code. However, the printed return code is from the "ret" variable which isn't set at that point since we assigned the result to "addr" instead. Fix this by consistently using the "ret" variable for the result of the RTAS call helpers an dropping the "addr" local variable" Fixes: 98ba956f6a38 ("powerpc/pseries/eeh: Rework device EEH PE determination") Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201007040903.819081-2-oohall@gmail.com commit 269e583357df32d77368903214f10f43fa5d7a5f Author: Oliver O'Halloran Date: Wed Oct 7 15:09:02 2020 +1100 powerpc/eeh: Delete eeh_pe->config_addr The eeh_pe->config_addr field was supposed to be removed in commit 35d64734b643 ("powerpc/eeh: Clean up PE addressing") which made it largely unused. Finish the job. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201007040903.819081-1-oohall@gmail.com commit 76c3bdd67d27289b9e407113821eab2a70bbcca6 Author: Jérôme Pouiller Date: Wed Oct 7 12:19:42 2020 +0200 dt-bindings: staging: wfx: silabs,wfx yaml conversion The device can be connected on SPI or on SDIO. The original file described the two options separately. So, most of the file had to be rewritten in order to match with the Yaml requirements. Some device requirements are still written in the comments since they cannot been expressed with the current scheme (e.g. reg must be set to 1 with SDIO, interrupt is mandatory with SPI, reset-gpio in SPI is replaced by mmc-pwrseq in SDIO, etc...). The examples provided have also been reworked in order to make dt_binding_check happy. Finally, also fix typo in the name of the file (siliabs instead of silabs) Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201007101943.749898-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit f9dc9f3750e1e2bd0358122542c7cc08679a7236 Author: Jérôme Pouiller Date: Wed Oct 7 12:19:41 2020 +0200 staging: wfx: update copyrights dates Most of the files have been modified in 2020, so update the copyright notices. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201007101943.749898-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 0d2dfdb8854f50c7fbef6dfc83a352a206212f81 Author: Jérôme Pouiller Date: Wed Oct 7 12:19:40 2020 +0200 staging: wfx: fix QoS priority for slow buses The device is in charge of respecting the QoS constraints. The driver have to ensure that all the queues contain data and the device choose the right queue to send. The things starts to be more difficult when the bandwidth of the bus is lower than the bandwidth of the WiFi. The device quickly sends the frames of the highest priority queue. Then, it starts to send frames from a lower priority queue. Though, there are still some high priority frames waiting in the driver. To work around this problem, this patch add some priorities to each queue. The weigh of the queue was (roughly) calculated experimentally by checking the speed ratio of each queue when the bus does not limit the traffic: - Be/Bk -> 20Mbps/10Mbps - Vi/Be -> 36Mbps/180Kbps - Vo/Be -> 35Mbps/600Kbps - Vi/Vo -> 24Mbps/12Mbps So, if we fix the weigh of the Background to 1, the weight of Best Effort should be 2. The weight of Video should be 116. However, since there is only 32 queues, it make no sense to use a value greater than 64[1]. And finally, the weight of the Voice is set to 128. [1] Because of this approximation, with very slow bus, we can still observe frame starvation when we measure the speed ratio of Vi/Be. It is around 35Mbps/1Mbps (instead of 36Mbps/180Kbps). However, it is still in accepted error range. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201007101943.749898-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 4fd1241778b08129f196605c62636a4d6d71c2c7 Author: Jérôme Pouiller Date: Wed Oct 7 12:19:39 2020 +0200 staging: wfx: fix BA sessions for older firmwares Firmwares with API < 3.6 do not forward DELBA requests. Thus, when a Block Ack session is restarted, the reordering buffer is not flushed and the received sequence number is not contiguous. Therefore, mac80211 starts to wait some missing frames that it will never receive. This patch disables the reordering buffer for old firmware. It is harmless when the network is unencrypted. When the network is encrypted, the non-contiguous frames will be thrown away by the TKIP/CCMP replay protection. So, the user will observe some packet loss with UDP and performance drop with TCP. Fixes: e5da5fbd7741 ("staging: wfx: fix CCMP/TKIP replay protection") Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201007101943.749898-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit cac1bd60762c198c537157a78d398edd11aef68c Author: Jérôme Pouiller Date: Wed Oct 7 12:19:38 2020 +0200 staging: wfx: remove remaining code of 'secure link' feature Commit e8d607ce0c81 ("staging: wfx: drop 'secure link' feature") had removed the 'secure link' feature. However, a few lines of codes were yet here. Fixes: e8d607ce0c81 ("staging: wfx: drop 'secure link' feature") Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201007101943.749898-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 8d350c14ee5eb62ecd40b0991248bfbce511954d Author: Jérôme Pouiller Date: Wed Oct 7 12:19:37 2020 +0200 staging: wfx: fix handling of MMIC error As expected, when the device detect a MMIC error, it returns a specific status. However, it also strip IV from the frame (don't ask me why). So, with the current code, mac80211 detects a corrupted frame and it drops it before it handle the MMIC error. The expected behavior would be to detect MMIC error then to renegotiate the EAP session. So, this patch correctly informs mac80211 that IV is not available. So, mac80211 correctly takes into account the MMIC error. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20201007101943.749898-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1fd4033dd011a3525bacddf37ab9eac425d25c4f Author: Nikolay Borisov Date: Thu Oct 1 09:40:39 2020 +0300 btrfs: rename BTRFS_INODE_ORDERED_DATA_CLOSE flag Commit 8d875f95da43 ("btrfs: disable strict file flushes for renames and truncates") eliminated the notion of ordered operations and instead BTRFS_INODE_ORDERED_DATA_CLOSE only remained as a flag indicating that a file's content should be synced to disk in case a file is truncated and any writes happen to it concurrently. In fact this intendend behavior was broken until it was fixed in f6dc45c7a93a ("Btrfs: fix filemap_flush call in btrfs_file_release"). All things considered let's give the flag a more descriptive name. Also slightly reword comments. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8d1a7aae89dc0c41ffb76fe1007dbba59d13881b Author: Madhuparna Bhowmik Date: Thu Dec 5 01:49:01 2019 +0530 btrfs: annotate device name rcu_string with __rcu This patch fixes the following sparse errors in fs/btrfs/super.c in function btrfs_show_devname() fs/btrfs/super.c: error: incompatible types in comparison expression (different address spaces): fs/btrfs/super.c: struct rcu_string [noderef] * fs/btrfs/super.c: struct rcu_string * The error was because of the following line in function btrfs_show_devname(): if (first_dev) seq_escape(m, rcu_str_deref(first_dev->name), " \t\n\\"); Annotating the btrfs_device::name member with __rcu fixes the sparse error. Acked-by: Joel Fernandes (Google) Signed-off-by: Madhuparna Bhowmik Signed-off-by: David Sterba commit 96c2e067ed3e3e004580a643c76f58729206b829 Author: Anand Jain Date: Wed Sep 30 21:09:52 2020 +0800 btrfs: skip devices without magic signature when mounting Many things can happen after the device is scanned and before the device is mounted. One such thing is losing the BTRFS_MAGIC on the device. If it happens we still won't free that device from the memory and cause the userland confusion. For example: As the BTRFS_IOC_DEV_INFO still carries the device path which does not have the BTRFS_MAGIC, 'btrfs fi show' still lists device which does not belong to the filesystem anymore: $ mkfs.btrfs -fq -draid1 -mraid1 /dev/sda /dev/sdb $ wipefs -a /dev/sdb # /dev/sdb does not contain magic signature $ mount -o degraded /dev/sda /btrfs $ btrfs fi show -m Label: none uuid: 470ec6fb-646b-4464-b3cb-df1b26c527bd Total devices 2 FS bytes used 128.00KiB devid 1 size 3.00GiB used 571.19MiB path /dev/sda devid 2 size 3.00GiB used 571.19MiB path /dev/sdb We need to distinguish the missing signature and invalid superblock, so add a specific error code ENODATA for that. This also fixes failure of fstest btrfs/198. CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Josef Bacik Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 572c83acdcdafeb04e70aa46be1fa539310be20c Author: Josef Bacik Date: Tue Sep 29 08:53:54 2020 -0400 btrfs: cleanup cow block on error In fstest btrfs/064 a transaction abort in __btrfs_cow_block could lead to a system lockup. It gets stuck trying to write back inodes, and the write back thread was trying to lock an extent buffer: $ cat /proc/2143497/stack [<0>] __btrfs_tree_lock+0x108/0x250 [<0>] lock_extent_buffer_for_io+0x35e/0x3a0 [<0>] btree_write_cache_pages+0x15a/0x3b0 [<0>] do_writepages+0x28/0xb0 [<0>] __writeback_single_inode+0x54/0x5c0 [<0>] writeback_sb_inodes+0x1e8/0x510 [<0>] wb_writeback+0xcc/0x440 [<0>] wb_workfn+0xd7/0x650 [<0>] process_one_work+0x236/0x560 [<0>] worker_thread+0x55/0x3c0 [<0>] kthread+0x13a/0x150 [<0>] ret_from_fork+0x1f/0x30 This is because we got an error while COWing a block, specifically here if (test_bit(BTRFS_ROOT_SHAREABLE, &root->state)) { ret = btrfs_reloc_cow_block(trans, root, buf, cow); if (ret) { btrfs_abort_transaction(trans, ret); return ret; } } [16402.241552] BTRFS: Transaction aborted (error -2) [16402.242362] WARNING: CPU: 1 PID: 2563188 at fs/btrfs/ctree.c:1074 __btrfs_cow_block+0x376/0x540 [16402.249469] CPU: 1 PID: 2563188 Comm: fsstress Not tainted 5.9.0-rc6+ #8 [16402.249936] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 [16402.250525] RIP: 0010:__btrfs_cow_block+0x376/0x540 [16402.252417] RSP: 0018:ffff9cca40e578b0 EFLAGS: 00010282 [16402.252787] RAX: 0000000000000025 RBX: 0000000000000002 RCX: ffff9132bbd19388 [16402.253278] RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffff9132bbd19380 [16402.254063] RBP: ffff9132b41a49c0 R08: 0000000000000000 R09: 0000000000000000 [16402.254887] R10: 0000000000000000 R11: ffff91324758b080 R12: ffff91326ef17ce0 [16402.255694] R13: ffff91325fc0f000 R14: ffff91326ef176b0 R15: ffff9132815e2000 [16402.256321] FS: 00007f542c6d7b80(0000) GS:ffff9132bbd00000(0000) knlGS:0000000000000000 [16402.256973] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [16402.257374] CR2: 00007f127b83f250 CR3: 0000000133480002 CR4: 0000000000370ee0 [16402.257867] Call Trace: [16402.258072] btrfs_cow_block+0x109/0x230 [16402.258356] btrfs_search_slot+0x530/0x9d0 [16402.258655] btrfs_lookup_file_extent+0x37/0x40 [16402.259155] __btrfs_drop_extents+0x13c/0xd60 [16402.259628] ? btrfs_block_rsv_migrate+0x4f/0xb0 [16402.259949] btrfs_replace_file_extents+0x190/0x820 [16402.260873] btrfs_clone+0x9ae/0xc00 [16402.261139] btrfs_extent_same_range+0x66/0x90 [16402.261771] btrfs_remap_file_range+0x353/0x3b1 [16402.262333] vfs_dedupe_file_range_one.part.0+0xd5/0x140 [16402.262821] vfs_dedupe_file_range+0x189/0x220 [16402.263150] do_vfs_ioctl+0x552/0x700 [16402.263662] __x64_sys_ioctl+0x62/0xb0 [16402.264023] do_syscall_64+0x33/0x40 [16402.264364] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [16402.264862] RIP: 0033:0x7f542c7d15cb [16402.266901] RSP: 002b:00007ffd35944ea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [16402.267627] RAX: ffffffffffffffda RBX: 00000000009d1968 RCX: 00007f542c7d15cb [16402.268298] RDX: 00000000009d2490 RSI: 00000000c0189436 RDI: 0000000000000003 [16402.268958] RBP: 00000000009d2520 R08: 0000000000000036 R09: 00000000009d2e64 [16402.269726] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 [16402.270659] R13: 000000000001f000 R14: 00000000009d1970 R15: 00000000009d2e80 [16402.271498] irq event stamp: 0 [16402.271846] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [16402.272497] hardirqs last disabled at (0): [] copy_process+0x6b9/0x1ba0 [16402.273343] softirqs last enabled at (0): [] copy_process+0x6b9/0x1ba0 [16402.273905] softirqs last disabled at (0): [<0000000000000000>] 0x0 [16402.274338] ---[ end trace 737874a5a41a8236 ]--- [16402.274669] BTRFS: error (device dm-9) in __btrfs_cow_block:1074: errno=-2 No such entry [16402.276179] BTRFS info (device dm-9): forced readonly [16402.277046] BTRFS: error (device dm-9) in btrfs_replace_file_extents:2723: errno=-2 No such entry [16402.278744] BTRFS: error (device dm-9) in __btrfs_cow_block:1074: errno=-2 No such entry [16402.279968] BTRFS: error (device dm-9) in __btrfs_cow_block:1074: errno=-2 No such entry [16402.280582] BTRFS info (device dm-9): balance: ended with status: -30 The problem here is that as soon as we allocate the new block it is locked and marked dirty in the btree inode. This means that we could attempt to writeback this block and need to lock the extent buffer. However we're not unlocking it here and thus we deadlock. Fix this by unlocking the cow block if we have any errors inside of __btrfs_cow_block, and also free it so we do not leak it. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit e3c57805f8f2215a1586741009111b92930cc6ac Author: Goldwyn Rodrigues Date: Thu Sep 24 11:39:09 2020 -0500 btrfs: remove BTRFS_INODE_READDIO_NEED_LOCK Since we now perform direct reads using i_rwsem, we can remove this inode flag used to co-ordinate unlocked reads. The truncate call takes i_rwsem. This means it is correctly synchronized with concurrent direct reads. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Reviewed-by: Christoph Hellwig Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit c33fe275b530f1ce1ab99923d50eb399f53ed545 Author: Goldwyn Rodrigues Date: Thu Sep 24 11:39:08 2020 -0500 fs: remove no longer used dio_end_io() Since we removed the last user of dio_end_io() when btrfs got converted to iomap infrastructure ("btrfs: switch to iomap for direct IO"), remove the helper function dio_end_io(). Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit 92e26df43b1a9725c205a7e4416240ce72eac4a3 Author: Josef Bacik Date: Fri Sep 18 16:44:33 2020 -0400 btrfs: return error if we're unable to read device stats I noticed when fixing device stats for seed devices that we simply threw away the return value from btrfs_search_slot(). This is because we may not have stat items, but we could very well get an error, and thus miss reporting the error up the chain. Fix this by returning ret if it's an actual error, and then stop trying to init the rest of the devices stats and return the error up the chain. Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 124604eb50f88e6c1ff6587bdd2fc09bea810b32 Author: Josef Bacik Date: Fri Sep 18 16:44:32 2020 -0400 btrfs: init device stats for seed devices We recently started recording device stats across the fleet, and noticed a large increase in messages such as this BTRFS warning (device dm-0): get dev_stats failed, not yet valid on our tiers that use seed devices for their root devices. This is because we do not initialize the device stats for any seed devices if we have a sprout device and mount using that sprout device. The basic steps for reproducing are: $ mkfs seed device $ mount seed device # fill seed device $ umount seed device $ btrfstune -S 1 seed device $ mount seed device $ btrfs device add -f sprout device /mnt/wherever $ umount /mnt/wherever $ mount sprout device /mnt/wherever $ btrfs device stats /mnt/wherever This will fail with the above message in dmesg. Fix this by iterating over the fs_devices->seed if they exist in btrfs_init_dev_stats. This fixed the problem and properly reports the stats for both devices. Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ rename to btrfs_device_init_dev_stats ] Signed-off-by: David Sterba commit 905eb88bceb253aa0f475eb04eec149d6059126e Author: Nikolay Borisov Date: Fri Sep 18 16:34:39 2020 +0300 btrfs: remove struct extent_io_ops It's no longer used just remove the function and any related code which was initialising it for inodes. No functional changes. Removing 8 bytes from extent_io_tree in turn reduces size of other structures where it is embedded, notably btrfs_inode where it reduces size by 24 bytes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1b36294a6cd50ee5dcfee71ba5241cbb60f0295e Author: Nikolay Borisov Date: Fri Sep 18 16:34:38 2020 +0300 btrfs: call submit_bio_hook directly for metadata pages No need to go through a function pointer indirection simply call submit_bio_hook directly by exporting and renaming the helper to btrfs_submit_metadata_bio. This makes the code more readable and should result in somewhat faster code due to no longer paying the price for specualtive attack mitigations that come with indirect function calls. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 908930f3edad79f7e5e35b7fac09da8c54ca96b5 Author: Nikolay Borisov Date: Fri Sep 18 16:34:37 2020 +0300 btrfs: stop calling submit_bio_hook for data inodes Instead export and rename the function to btrfs_submit_data_bio and call it directly in submit_one_bio. This avoids paying the cost for speculative attacks mitigations and improves code readability. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit be17b3afc4a6255008d4bbf7b1b45a36ac54bece Author: Nikolay Borisov Date: Fri Sep 18 16:34:36 2020 +0300 btrfs: don't opencode is_data_inode in end_bio_extent_readpage Use the is_data_inode helper. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit cd0537449c275ca7da6f6e3ea2389ae5225c6b4e Author: Nikolay Borisov Date: Fri Sep 18 16:34:35 2020 +0300 btrfs: call submit_bio_hook directly in submit_one_bio BTRFS has 2 inode types (for the purposes of the code in submit_one_bio) - ordinary data inodes (including the freespace inode) and the btree inode. Both of these implement submit_bio_hook so btrfsic_submit_bio can never be called from submit_one_bio so just remove it. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1f03d9cfda53d86e7822bf0dd5f0ef5d8fa6d1ad Author: Nikolay Borisov Date: Fri Sep 18 16:34:34 2020 +0300 btrfs: remove extent_io_ops::readpage_end_io_hook It's no longer used so let's remove it. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9a446d6a9fc7df48e53c54b161dfdfc6f5031d4b Author: Nikolay Borisov Date: Fri Sep 18 16:34:33 2020 +0300 btrfs: replace readpage_end_io_hook with direct calls Don't call readpage_end_io_hook for the btree inode. Instead of relying on indirect calls to implement metadata buffer validation simply check if the inode whose page we are processing equals the btree inode. If it does call the necessary function. This is an improvement in 2 directions: 1. We aren't paying the penalty of indirect calls in a post-speculation attacks world. 2. The function is now named more explicitly so it's obvious what's going on This is in preparation to removing struct extent_io_ops altogether. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9c2b4e0347067396ceb3ae929d6888c81d610259 Author: Filipe Manana Date: Mon Sep 21 14:13:30 2020 +0100 btrfs: send, recompute reference path after orphanization of a directory During an incremental send, when an inode has multiple new references we might end up emitting rename operations for orphanizations that have a source path that is no longer valid due to a previous orphanization of some directory inode. This causes the receiver to fail since it tries to rename a path that does not exists. Example reproducer: $ cat reproducer.sh #!/bin/bash mkfs.btrfs -f /dev/sdi >/dev/null mount /dev/sdi /mnt/sdi touch /mnt/sdi/f1 touch /mnt/sdi/f2 mkdir /mnt/sdi/d1 mkdir /mnt/sdi/d1/d2 # Filesystem looks like: # # . (ino 256) # |----- f1 (ino 257) # |----- f2 (ino 258) # |----- d1/ (ino 259) # |----- d2/ (ino 260) btrfs subvolume snapshot -r /mnt/sdi /mnt/sdi/snap1 btrfs send -f /tmp/snap1.send /mnt/sdi/snap1 # Now do a series of changes such that: # # *) inode 258 has one new hardlink and the previous name changed # # *) both names conflict with the old names of two other inodes: # # 1) the new name "d1" conflicts with the old name of inode 259, # under directory inode 256 (root) # # 2) the new name "d2" conflicts with the old name of inode 260 # under directory inode 259 # # *) inodes 259 and 260 now have the old names of inode 258 # # *) inode 257 is now located under inode 260 - an inode with a number # smaller than the inode (258) for which we created a second hard # link and swapped its names with inodes 259 and 260 # ln /mnt/sdi/f2 /mnt/sdi/d1/f2_link mv /mnt/sdi/f1 /mnt/sdi/d1/d2/f1 # Swap d1 and f2. mv /mnt/sdi/d1 /mnt/sdi/tmp mv /mnt/sdi/f2 /mnt/sdi/d1 mv /mnt/sdi/tmp /mnt/sdi/f2 # Swap d2 and f2_link mv /mnt/sdi/f2/d2 /mnt/sdi/tmp mv /mnt/sdi/f2/f2_link /mnt/sdi/f2/d2 mv /mnt/sdi/tmp /mnt/sdi/f2/f2_link # Filesystem now looks like: # # . (ino 256) # |----- d1 (ino 258) # |----- f2/ (ino 259) # |----- f2_link/ (ino 260) # | |----- f1 (ino 257) # | # |----- d2 (ino 258) btrfs subvolume snapshot -r /mnt/sdi /mnt/sdi/snap2 btrfs send -f /tmp/snap2.send -p /mnt/sdi/snap1 /mnt/sdi/snap2 mkfs.btrfs -f /dev/sdj >/dev/null mount /dev/sdj /mnt/sdj btrfs receive -f /tmp/snap1.send /mnt/sdj btrfs receive -f /tmp/snap2.send /mnt/sdj umount /mnt/sdi umount /mnt/sdj When executed the receive of the incremental stream fails: $ ./reproducer.sh Create a readonly snapshot of '/mnt/sdi' in '/mnt/sdi/snap1' At subvol /mnt/sdi/snap1 Create a readonly snapshot of '/mnt/sdi' in '/mnt/sdi/snap2' At subvol /mnt/sdi/snap2 At subvol snap1 At snapshot snap2 ERROR: rename d1/d2 -> o260-6-0 failed: No such file or directory This happens because: 1) When processing inode 257 we end up computing the name for inode 259 because it is an ancestor in the send snapshot, and at that point it still has its old name, "d1", from the parent snapshot because inode 259 was not yet processed. We then cache that name, which is valid until we start processing inode 259 (or set the progress to 260 after processing its references); 2) Later we start processing inode 258 and collecting all its new references into the list sctx->new_refs. The first reference in the list happens to be the reference for name "d1" while the reference for name "d2" is next (the last element of the list). We compute the full path "d1/d2" for this second reference and store it in the reference (its ->full_path member). The path used for the new parent directory was "d1" and not "f2" because inode 259, the new parent, was not yet processed; 3) When we start processing the new references at process_recorded_refs() we start with the first reference in the list, for the new name "d1". Because there is a conflicting inode that was not yet processed, which is directory inode 259, we orphanize it, renaming it from "d1" to "o259-6-0"; 4) Then we start processing the new reference for name "d2", and we realize it conflicts with the reference of inode 260 in the parent snapshot. So we issue an orphanization operation for inode 260 by emitting a rename operation with a destination path of "o260-6-0" and a source path of "d1/d2" - this source path is the value we stored in the reference earlier at step 2), corresponding to the ->full_path member of the reference, however that path is no longer valid due to the orphanization of the directory inode 259 in step 3). This makes the receiver fail since the path does not exists, it should have been "o259-6-0/d2". Fix this by recomputing the full path of a reference before emitting an orphanization if we previously orphanized any directory, since that directory could be a parent in the new path. This is a rare scenario so keeping it simple and not checking if that previously orphanized directory is in fact an ancestor of the inode we are trying to orphanize. A test case for fstests follows soon. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 98272bb77bf4cc20ed1ffca89832d713e70ebf09 Author: Filipe Manana Date: Mon Sep 21 14:13:29 2020 +0100 btrfs: send, orphanize first all conflicting inodes when processing references When doing an incremental send it is possible that when processing the new references for an inode we end up issuing rename or link operations that have an invalid path, which contains the orphanized name of a directory before we actually orphanized it, causing the receiver to fail. The following reproducer triggers such scenario: $ cat reproducer.sh #!/bin/bash mkfs.btrfs -f /dev/sdi >/dev/null mount /dev/sdi /mnt/sdi touch /mnt/sdi/a touch /mnt/sdi/b mkdir /mnt/sdi/testdir # We want "a" to have a lower inode number then "testdir" (257 vs 259). mv /mnt/sdi/a /mnt/sdi/testdir/a # Filesystem looks like: # # . (ino 256) # |----- testdir/ (ino 259) # | |----- a (ino 257) # | # |----- b (ino 258) btrfs subvolume snapshot -r /mnt/sdi /mnt/sdi/snap1 btrfs send -f /tmp/snap1.send /mnt/sdi/snap1 # Now rename 259 to "testdir_2", then change the name of 257 to # "testdir" and make it a direct descendant of the root inode (256). # Also create a new link for inode 257 with the old name of inode 258. # By swapping the names and location of several inodes and create a # nasty dependency chain of rename and link operations. mv /mnt/sdi/testdir/a /mnt/sdi/a2 touch /mnt/sdi/testdir/a mv /mnt/sdi/b /mnt/sdi/b2 ln /mnt/sdi/a2 /mnt/sdi/b mv /mnt/sdi/testdir /mnt/sdi/testdir_2 mv /mnt/sdi/a2 /mnt/sdi/testdir # Filesystem now looks like: # # . (ino 256) # |----- testdir_2/ (ino 259) # | |----- a (ino 260) # | # |----- testdir (ino 257) # |----- b (ino 257) # |----- b2 (ino 258) btrfs subvolume snapshot -r /mnt/sdi /mnt/sdi/snap2 btrfs send -f /tmp/snap2.send -p /mnt/sdi/snap1 /mnt/sdi/snap2 mkfs.btrfs -f /dev/sdj >/dev/null mount /dev/sdj /mnt/sdj btrfs receive -f /tmp/snap1.send /mnt/sdj btrfs receive -f /tmp/snap2.send /mnt/sdj umount /mnt/sdi umount /mnt/sdj When running the reproducer, the receive of the incremental send stream fails: $ ./reproducer.sh Create a readonly snapshot of '/mnt/sdi' in '/mnt/sdi/snap1' At subvol /mnt/sdi/snap1 Create a readonly snapshot of '/mnt/sdi' in '/mnt/sdi/snap2' At subvol /mnt/sdi/snap2 At subvol snap1 At snapshot snap2 ERROR: link b -> o259-6-0/a failed: No such file or directory The problem happens because of the following: 1) Before we start iterating the list of new references for inode 257, we generate its current path and store it at @valid_path, done at the very beginning of process_recorded_refs(). The generated path is "o259-6-0/a", containing the orphanized name for inode 259; 2) Then we iterate over the list of new references, which has the references "b" and "testdir" in that specific order; 3) We process reference "b" first, because it is in the list before reference "testdir". We then issue a link operation to create the new reference "b" using a target path corresponding to the content at @valid_path, which corresponds to "o259-6-0/a". However we haven't yet orphanized inode 259, its name is still "testdir", and not "o259-6-0". The orphanization of 259 did not happen yet because we will process the reference named "testdir" for inode 257 only in the next iteration of the loop that goes over the list of new references. Fix the issue by having a preliminar iteration over all the new references at process_recorded_refs(). This iteration is responsible only for doing the orphanization of other inodes that have and old reference that conflicts with one of the new references of the inode we are currently processing. The emission of rename and link operations happen now in the next iteration of the new references. A test case for fstests will follow soon. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 1465af12e254a68706e110846f59cf0f09683184 Author: Qu Wenruo Date: Tue Sep 22 10:37:01 2020 +0800 btrfs: tree-checker: fix false alert caused by legacy btrfs root item Commit 259ee7754b67 ("btrfs: tree-checker: Add ROOT_ITEM check") introduced btrfs root item size check, however btrfs root item has two versions, the legacy one which just ends before generation_v2 member, is smaller than current btrfs root item size. This caused btrfs kernel to reject valid but old tree root leaves. Fix this problem by also allowing legacy root item, since kernel can already handle them pretty well and upgrade to newer root item format when needed. Reported-by: Martin Steigerwald Fixes: 259ee7754b67 ("btrfs: tree-checker: Add ROOT_ITEM check") CC: stable@vger.kernel.org # 5.4+ Tested-By: Martin Steigerwald Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e97659cefe1e9dc0bb4284195ba4ab380d0cf1fe Author: David Sterba Date: Tue Sep 15 14:58:42 2020 +0200 btrfs: use unaligned helpers for stack and header set/get helpers In the definitions generated by BTRFS_SETGET_HEADER_FUNCS there's direct pointer assignment but we should use the helpers for unaligned access for clarity. It hasn't been a problem so far because of the natural alignment. Similarly for BTRFS_SETGET_STACK_FUNCS, that usually get a structure from stack that has an aligned start but some members may not be aligned due to packing. This as well hasn't caused problems so far. Move the put/get_unaligned_le8 stubs to ctree.h so we can use them. Signed-off-by: David Sterba commit 6994ca367ce5160dea2718e0993542d148fa68f8 Author: David Sterba Date: Tue Sep 15 13:32:34 2020 +0200 btrfs: free-space-cache: use unaligned helpers to access data The free space inode stores the tracking data, checksums etc, using the io_ctl structure and moving the pointers. The data are generally aligned to at least 4 bytes (u32 for CRC) so it's not completely unaligned but for clarity we should use the proper helpers whenever a struct is initialized from io_ctl->cur pointer. Signed-off-by: David Sterba commit e2f896b3180e3b5d34b1d174b931205a43072d17 Author: David Sterba Date: Tue Sep 15 10:54:23 2020 +0200 btrfs: send: use helpers for unaligned access to header members The header is mapped onto the send buffer and thus its members may be potentially unaligned so use the helpers instead of directly assigning the pointers. This has worked so far but let's use the helpers to make that clear. Signed-off-by: David Sterba commit 2c53a14dd30124de9468316933715deaf7443096 Author: Qu Wenruo Date: Tue Sep 15 13:35:27 2020 +0800 btrfs: use own btree inode io_tree owner id Btree inode is special compared to all other inode extent io_trees, although it has a btrfs inode, it doesn't have the track_uptodate bit at all. This means a lot of things like extent locking doesn't even need to be applied to btree io tree. Since it's so special, adds a new owner value for it to make debuging a little easier. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6b613cc97f0ace77f92f7bc112b8f6ad3f52baf8 Author: Johannes Thumshirn Date: Tue Sep 22 17:27:29 2020 +0900 btrfs: reschedule when cloning lots of extents We have several occurrences of a soft lockup from fstest's generic/175 testcase, which look more or less like this one: watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [xfs_io:10030] Kernel panic - not syncing: softlockup: hung tasks CPU: 0 PID: 10030 Comm: xfs_io Tainted: G L 5.9.0-rc5+ #768 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4-rebuilt.opensuse.org 04/01/2014 Call Trace: dump_stack+0x77/0xa0 panic+0xfa/0x2cb watchdog_timer_fn.cold+0x85/0xa5 ? lockup_detector_update_enable+0x50/0x50 __hrtimer_run_queues+0x99/0x4c0 ? recalibrate_cpu_khz+0x10/0x10 hrtimer_run_queues+0x9f/0xb0 update_process_times+0x28/0x80 tick_handle_periodic+0x1b/0x60 __sysvec_apic_timer_interrupt+0x76/0x210 asm_call_on_stack+0x12/0x20 sysvec_apic_timer_interrupt+0x7f/0x90 asm_sysvec_apic_timer_interrupt+0x12/0x20 RIP: 0010:btrfs_tree_unlock+0x91/0x1a0 [btrfs] RSP: 0018:ffffc90007123a58 EFLAGS: 00000282 RAX: ffff8881cea2fbe0 RBX: ffff8881cea2fbe0 RCX: 0000000000000000 RDX: ffff8881d23fd200 RSI: ffffffff82045220 RDI: ffff8881cea2fba0 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000032 R10: 0000160000000000 R11: 0000000000001000 R12: 0000000000001000 R13: ffff8882357fd5b0 R14: ffff88816fa76e70 R15: ffff8881cea2fad0 ? btrfs_tree_unlock+0x15b/0x1a0 [btrfs] btrfs_release_path+0x67/0x80 [btrfs] btrfs_insert_replace_extent+0x177/0x2c0 [btrfs] btrfs_replace_file_extents+0x472/0x7c0 [btrfs] btrfs_clone+0x9ba/0xbd0 [btrfs] btrfs_clone_files.isra.0+0xeb/0x140 [btrfs] ? file_update_time+0xcd/0x120 btrfs_remap_file_range+0x322/0x3b0 [btrfs] do_clone_file_range+0xb7/0x1e0 vfs_clone_file_range+0x30/0xa0 ioctl_file_clone+0x8a/0xc0 do_vfs_ioctl+0x5b2/0x6f0 __x64_sys_ioctl+0x37/0xa0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f87977fc247 RSP: 002b:00007ffd51a2f6d8 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f87977fc247 RDX: 00007ffd51a2f710 RSI: 000000004020940d RDI: 0000000000000003 RBP: 0000000000000004 R08: 00007ffd51a79080 R09: 0000000000000000 R10: 00005621f11352f2 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 00005621f128b958 R15: 0000000080000000 Kernel Offset: disabled ---[ end Kernel panic - not syncing: softlockup: hung tasks ]--- All of these lockup reports have the call chain btrfs_clone_files() -> btrfs_clone() in common. btrfs_clone_files() calls btrfs_clone() with both source and destination extents locked and loops over the source extent to create the clones. Conditionally reschedule in the btrfs_clone() loop, to give some time back to other processes. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit bae12df966f0e1a9b40a2c46d01a0ad79b2c865c Author: Denis Efremov Date: Mon Sep 21 20:03:36 2020 +0300 btrfs: use kvcalloc for allocation in btrfs_ioctl_send() Replace kvzalloc() call with kvcalloc() that also checks the size internally. There's a standalone overflow check in the function so we can return invalid parameter combination. Use array_size() helper to compute the memory size for clone_sources_tmp. Cc: Kees Cook Signed-off-by: Denis Efremov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8eb2fd00153a3a96a19c62ac9c6d48c2efebe5e8 Author: Denis Efremov Date: Mon Sep 21 20:03:35 2020 +0300 btrfs: use kvzalloc() to allocate clone_roots in btrfs_ioctl_send() btrfs_ioctl_send() used open-coded kvzalloc implementation earlier. The code was accidentally replaced with kzalloc() call [1]. Restore the original code by using kvzalloc() to allocate sctx->clone_roots. [1] https://patchwork.kernel.org/patch/9757891/#20529627 Fixes: 818e010bf9d0 ("btrfs: replace opencoded kvzalloc with the helper") CC: stable@vger.kernel.org # 4.14+ Signed-off-by: Denis Efremov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c0a43603056cb79be8a0dffeedc544ce9b5d115d Author: Nikolay Borisov Date: Fri Sep 18 12:15:53 2020 +0300 btrfs: remove inode argument from btrfs_start_ordered_extent The passed in ordered_extent struct is always well-formed and contains the inode making the explicit argument redundant. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 510f85edf1cdf1dbc937eed377442b2826bbb120 Author: Nikolay Borisov Date: Fri Sep 18 12:15:52 2020 +0300 btrfs: remove inode argument from add_pending_csums It's used to reference the csum root which can be done from the trans handle as well. Simplify the signature and while at it also remove the noinline attribute as the function uses only at most 16 bytes of stack space. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3c38c877fcb9504b1db12cb24de9f514cedfae74 Author: Nikolay Borisov Date: Fri Sep 18 12:15:51 2020 +0300 btrfs: sink inode argument in insert_ordered_extent_file_extent Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 71fe0a55dae7e5ef7762c5627891b37bf1b367bf Author: Nikolay Borisov Date: Fri Sep 18 12:15:50 2020 +0300 btrfs: switch btrfs_remove_ordered_extent to btrfs_inode Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 633cc816f742ef34b0dac76581d732a28ca8d62d Author: Nikolay Borisov Date: Fri Sep 18 12:15:49 2020 +0300 btrfs: clean BTRFS_I usage in btrfs_destroy_inode Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0f208812493f4ce17910633ad3f7f3b7c8c35cd3 Author: Nikolay Borisov Date: Mon Sep 14 14:39:16 2020 +0300 btrfs: open code extent_read_full_page to its sole caller This makes reading the code a tad easier by decreasing the level of indirection by one. Reviewed-by: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit fd513000eb279347df1f5a7ce720ae66b4ac3b1b Author: Nikolay Borisov Date: Mon Sep 14 12:37:11 2020 +0300 btrfs: sink mirror_num argument in __do_readpage It's always set to 0 by the 2 callers so move it inside __do_readpage. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6f15af6060057babf03d3b0dce2b0d7a9258620c Author: Nikolay Borisov Date: Mon Sep 14 12:37:10 2020 +0300 btrfs: sink read_flags argument into extent_read_full_page It's always set to 0 by its sole caller - btrfs_readpage. Simply remove it. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 003c286aef3f73e8e7b5fce6040761966ba65b5b Author: Nikolay Borisov Date: Mon Sep 14 12:37:09 2020 +0300 btrfs: sink mirror_num argument in extent_read_full_page It's always set to 0 from the sole caller - btrfs_readpage. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c1be9c1ad5cca645ffd31284674ee4e28b9472de Author: Nikolay Borisov Date: Mon Sep 14 12:37:08 2020 +0300 btrfs: promote extent_read_full_page to btrfs_readpage Now that btrfs_readpage is the only caller of extent_read_full_page the latter can be open coded in the former. Use the occassion to rename __extent_read_full_page to extent_read_full_page. To facillitate this change submit_one_bio has to be exported as well. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 72cffee4634058b993685669cab62c5d1c1fee78 Author: Nikolay Borisov Date: Mon Sep 14 12:37:07 2020 +0300 btrfs: remove mirror_num argument from extent_read_full_page It's called only from btrfs_readpage which always passes 0 so just sink the argument into extent_read_full_page. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1a5ee1e6260368da8347e66321e157a7de288ef3 Author: Nikolay Borisov Date: Mon Sep 14 12:37:06 2020 +0300 btrfs: remove btrfs_get_extent indirection from __do_readpage Now that this function is only responsible for reading data pages it's no longer necessary to pass get_extent_t parameter across several layers of functions. This patch removes this parameter from multiple functions: __get_extent_map/__do_readpage/__extent_read_full_page/ extent_read_full_page and simply calls btrfs_get_extent directly in __get_extent_map. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 208d6341e85b4f2628a90438fce5d8a2dd97d6ba Author: Nikolay Borisov Date: Mon Sep 14 12:37:05 2020 +0300 btrfs: remove btree_get_extent The sole purpose of this function was to satisfy the requirements of __do_readpage. Since that function is no longer used to read metadata pages the need to keep btree_get_extent around has also disappeared. Simply remove it. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0420177c08b2d86034a98d45b7d3609bdc986fd2 Author: Nikolay Borisov Date: Mon Sep 14 12:37:04 2020 +0300 btrfs: simplify metadata pages reading Metadata pages currently use __do_readpage to read metadata pages, unfortunately this function is also used to deal with ordinary data pages. This makes the metadata pages reading code to go through multiple hoops in order to adhere to __do_readpage invariants. Most of these are necessary for data pages which could be compressed. For metadata it's enough to simply build a bio and submit it. To this effect simply call submit_extent_page directly from read_extent_buffer_pages which is the only callpath used to populate extent_buffers with data. This in turn enables further cleanups. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2f1d3e4b930dcb83ac7ec9b106d7adb4d36c4c9d Author: Nikolay Borisov Date: Mon Sep 14 12:37:03 2020 +0300 btrfs: remove btree_readpage There is no way for this function to be called as ->readpage() since it's called from generic_file_buffered_read/filemap_fault/do_read_cache_page/readhead code. BTRFS doesn't utilize the first 3 for the btree inode and implements it's owon readhead mechanism. So simply remove the function. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit bb56f02f26fe23798edb1b2175707419b28c752a Author: Filipe Manana Date: Mon Sep 14 15:27:50 2020 +0100 btrfs: reschedule if necessary when logging directory items Logging directories with many entries can take a significant amount of time, and in some cases monopolize a cpu/core for a long time if the logging task doesn't happen to block often enough. Johannes and Lu Fengqi reported test case generic/041 triggering a soft lockup when the kernel has CONFIG_SOFTLOCKUP_DETECTOR=y. For this test case we log an inode with 3002 hard links, and because the test removed one hard link before fsyncing the file, the inode logging causes the parent directory do be logged as well, which has 6004 directory items to log (3002 BTRFS_DIR_ITEM_KEY items plus 3002 BTRFS_DIR_INDEX_KEY items), so it can take a significant amount of time and trigger the soft lockup. So just make tree-log.c:log_dir_items() reschedule when necessary, releasing the current search path before doing so and then resume from where it was before the reschedule. The stack trace produced when the soft lockup happens is the following: [10480.277653] watchdog: BUG: soft lockup - CPU#2 stuck for 22s! [xfs_io:28172] [10480.279418] Modules linked in: dm_thin_pool dm_persistent_data (...) [10480.284915] irq event stamp: 29646366 [10480.285987] hardirqs last enabled at (29646365): [] __slab_alloc.constprop.0+0x56/0x60 [10480.288482] hardirqs last disabled at (29646366): [] irqentry_enter+0x1d/0x50 [10480.290856] softirqs last enabled at (4612): [] __do_softirq+0x323/0x56c [10480.293615] softirqs last disabled at (4483): [] asm_call_on_stack+0xf/0x20 [10480.296428] CPU: 2 PID: 28172 Comm: xfs_io Not tainted 5.9.0-rc4-default+ #1248 [10480.298948] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014 [10480.302455] RIP: 0010:__slab_alloc.constprop.0+0x19/0x60 [10480.304151] Code: 86 e8 31 75 21 00 66 66 2e 0f 1f 84 00 00 00 (...) [10480.309558] RSP: 0018:ffffadbe09397a58 EFLAGS: 00000282 [10480.311179] RAX: ffff8a495ab92840 RBX: 0000000000000282 RCX: 0000000000000006 [10480.313242] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff85249b66 [10480.315260] RBP: ffff8a497d04b740 R08: 0000000000000001 R09: 0000000000000001 [10480.317229] R10: ffff8a497d044800 R11: ffff8a495ab93c40 R12: 0000000000000000 [10480.319169] R13: 0000000000000000 R14: 0000000000000c40 R15: ffffffffc01daf70 [10480.321104] FS: 00007fa1dc5c0e40(0000) GS:ffff8a497da00000(0000) knlGS:0000000000000000 [10480.323559] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [10480.325235] CR2: 00007fa1dc5befb8 CR3: 0000000004f8a006 CR4: 0000000000170ea0 [10480.327259] Call Trace: [10480.328286] ? overwrite_item+0x1f0/0x5a0 [btrfs] [10480.329784] __kmalloc+0x831/0xa20 [10480.331009] ? btrfs_get_32+0xb0/0x1d0 [btrfs] [10480.332464] overwrite_item+0x1f0/0x5a0 [btrfs] [10480.333948] log_dir_items+0x2ee/0x570 [btrfs] [10480.335413] log_directory_changes+0x82/0xd0 [btrfs] [10480.336926] btrfs_log_inode+0xc9b/0xda0 [btrfs] [10480.338374] ? init_once+0x20/0x20 [btrfs] [10480.339711] btrfs_log_inode_parent+0x8d3/0xd10 [btrfs] [10480.341257] ? dget_parent+0x97/0x2e0 [10480.342480] btrfs_log_dentry_safe+0x3a/0x50 [btrfs] [10480.343977] btrfs_sync_file+0x24b/0x5e0 [btrfs] [10480.345381] do_fsync+0x38/0x70 [10480.346483] __x64_sys_fsync+0x10/0x20 [10480.347703] do_syscall_64+0x2d/0x70 [10480.348891] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [10480.350444] RIP: 0033:0x7fa1dc80970b [10480.351642] Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 (...) [10480.356952] RSP: 002b:00007fffb3d081d0 EFLAGS: 00000293 ORIG_RAX: 000000000000004a [10480.359458] RAX: ffffffffffffffda RBX: 0000562d93d45e40 RCX: 00007fa1dc80970b [10480.361426] RDX: 0000562d93d44ab0 RSI: 0000562d93d45e60 RDI: 0000000000000003 [10480.363367] RBP: 0000000000000001 R08: 0000000000000000 R09: 00007fa1dc7b2a40 [10480.365317] R10: 0000562d93d0e366 R11: 0000000000000293 R12: 0000000000000001 [10480.367299] R13: 0000562d93d45290 R14: 0000562d93d45e40 R15: 0000562d93d45e60 Link: https://lore.kernel.org/linux-btrfs/20180713090216.GC575@fnst.localdomain/ Reported-by: Johannes Thumshirn CC: stable@vger.kernel.org # 4.4+ Tested-by: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 49ea112da0e6e323bb923315ec54ee920759bf19 Author: Josef Bacik Date: Tue Sep 1 17:40:38 2020 -0400 btrfs: do not create raid sysfs entries under any locks While running xfstests btrfs/177 I got the following lockdep splat ====================================================== WARNING: possible circular locking dependency detected 5.9.0-rc3+ #5 Not tainted ------------------------------------------------------ kswapd0/100 is trying to acquire lock: ffff97066aa56760 (&delayed_node->mutex){+.+.}-{3:3}, at: __btrfs_release_delayed_node.part.0+0x3f/0x330 but task is already holding lock: ffffffff9fd74700 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x5/0x30 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (fs_reclaim){+.+.}-{0:0}: fs_reclaim_acquire+0x65/0x80 slab_pre_alloc_hook.constprop.0+0x20/0x200 kmem_cache_alloc+0x37/0x270 alloc_inode+0x82/0xb0 iget_locked+0x10d/0x2c0 kernfs_get_inode+0x1b/0x130 kernfs_get_tree+0x136/0x240 sysfs_get_tree+0x16/0x40 vfs_get_tree+0x28/0xc0 path_mount+0x434/0xc00 __x64_sys_mount+0xe3/0x120 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #2 (kernfs_mutex){+.+.}-{3:3}: __mutex_lock+0x7e/0x7e0 kernfs_add_one+0x23/0x150 kernfs_create_dir_ns+0x7a/0xb0 sysfs_create_dir_ns+0x60/0xb0 kobject_add_internal+0xc0/0x2c0 kobject_add+0x6e/0x90 btrfs_sysfs_add_block_group_type+0x102/0x160 btrfs_make_block_group+0x167/0x230 btrfs_alloc_chunk+0x54f/0xb80 btrfs_chunk_alloc+0x18e/0x3a0 find_free_extent+0xdf6/0x1210 btrfs_reserve_extent+0xb3/0x1b0 btrfs_alloc_tree_block+0xb0/0x310 alloc_tree_block_no_bg_flush+0x4a/0x60 __btrfs_cow_block+0x11a/0x530 btrfs_cow_block+0x104/0x220 btrfs_search_slot+0x52e/0x9d0 btrfs_insert_empty_items+0x64/0xb0 btrfs_new_inode+0x225/0x730 btrfs_create+0xab/0x1f0 lookup_open.isra.0+0x52d/0x690 path_openat+0x2a7/0x9e0 do_filp_open+0x75/0x100 do_sys_openat2+0x7b/0x130 __x64_sys_openat+0x46/0x70 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&fs_info->chunk_mutex){+.+.}-{3:3}: __mutex_lock+0x7e/0x7e0 btrfs_chunk_alloc+0x125/0x3a0 find_free_extent+0xdf6/0x1210 btrfs_reserve_extent+0xb3/0x1b0 btrfs_alloc_tree_block+0xb0/0x310 alloc_tree_block_no_bg_flush+0x4a/0x60 __btrfs_cow_block+0x11a/0x530 btrfs_cow_block+0x104/0x220 btrfs_search_slot+0x52e/0x9d0 btrfs_lookup_inode+0x2a/0x8f __btrfs_update_delayed_inode+0x80/0x240 btrfs_commit_inode_delayed_inode+0x119/0x120 btrfs_evict_inode+0x357/0x500 evict+0xcf/0x1f0 do_unlinkat+0x1a9/0x2b0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&delayed_node->mutex){+.+.}-{3:3}: __lock_acquire+0x119c/0x1fc0 lock_acquire+0xa7/0x3d0 __mutex_lock+0x7e/0x7e0 __btrfs_release_delayed_node.part.0+0x3f/0x330 btrfs_evict_inode+0x24c/0x500 evict+0xcf/0x1f0 dispose_list+0x48/0x70 prune_icache_sb+0x44/0x50 super_cache_scan+0x161/0x1e0 do_shrink_slab+0x178/0x3c0 shrink_slab+0x17c/0x290 shrink_node+0x2b2/0x6d0 balance_pgdat+0x30a/0x670 kswapd+0x213/0x4c0 kthread+0x138/0x160 ret_from_fork+0x1f/0x30 other info that might help us debug this: Chain exists of: &delayed_node->mutex --> kernfs_mutex --> fs_reclaim Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(kernfs_mutex); lock(fs_reclaim); lock(&delayed_node->mutex); *** DEADLOCK *** 3 locks held by kswapd0/100: #0: ffffffff9fd74700 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x5/0x30 #1: ffffffff9fd65c50 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x115/0x290 #2: ffff9706629780e0 (&type->s_umount_key#36){++++}-{3:3}, at: super_cache_scan+0x38/0x1e0 stack backtrace: CPU: 1 PID: 100 Comm: kswapd0 Not tainted 5.9.0-rc3+ #5 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 Call Trace: dump_stack+0x8b/0xb8 check_noncircular+0x12d/0x150 __lock_acquire+0x119c/0x1fc0 lock_acquire+0xa7/0x3d0 ? __btrfs_release_delayed_node.part.0+0x3f/0x330 __mutex_lock+0x7e/0x7e0 ? __btrfs_release_delayed_node.part.0+0x3f/0x330 ? __btrfs_release_delayed_node.part.0+0x3f/0x330 ? lock_acquire+0xa7/0x3d0 ? find_held_lock+0x2b/0x80 __btrfs_release_delayed_node.part.0+0x3f/0x330 btrfs_evict_inode+0x24c/0x500 evict+0xcf/0x1f0 dispose_list+0x48/0x70 prune_icache_sb+0x44/0x50 super_cache_scan+0x161/0x1e0 do_shrink_slab+0x178/0x3c0 shrink_slab+0x17c/0x290 shrink_node+0x2b2/0x6d0 balance_pgdat+0x30a/0x670 kswapd+0x213/0x4c0 ? _raw_spin_unlock_irqrestore+0x41/0x50 ? add_wait_queue_exclusive+0x70/0x70 ? balance_pgdat+0x670/0x670 kthread+0x138/0x160 ? kthread_create_worker_on_cpu+0x40/0x40 ret_from_fork+0x1f/0x30 This happens because when we link in a block group with a new raid index type we'll create the corresponding sysfs entries for it. This is problematic because while restriping we're holding the chunk_mutex, and while mounting we're holding the tree locks. Fixing this isn't pretty, we move the call to the sysfs stuff into the btrfs_create_pending_block_groups() work, where we're not holding any locks. This creates a slight race where other threads could see that there's no sysfs kobj for that raid type, and race to create the sysfs dir. Fix this by wrapping the creation in space_info->lock, so we only get one thread calling kobject_add() for the new directory. We don't worry about the lock on cleanup as it only gets deleted on unmount. On mount it's more straightforward, we loop through the space_infos already, just check every raid index in each space_info and added the sysfs entries for the corresponding block groups. Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 72804905001267a93e7a470430c2bcc122932ca6 Author: Josef Bacik Date: Tue Sep 1 17:40:37 2020 -0400 btrfs: kill the RCU protection for fs_info->space_info We have this thing wrapped in an RCU lock, but it's really not needed. We create all the space_info's on mount, and we destroy them on unmount. The list never changes and we're protected from messing with it by the normal mount/umount path, so kill the RCU stuff around it. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7269ddd2f60286af1f5d1d47d283d2f9a26818c6 Author: Nikolay Borisov Date: Tue Sep 1 17:40:01 2020 +0300 btrfs: improve error message in setup_items_for_insert Reword and update formats to match variable types. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ update formats ] Signed-off-by: David Sterba commit da9ffb242c448af20f70b431d3f04df50c6cb0d2 Author: Nikolay Borisov Date: Tue Sep 1 17:40:00 2020 +0300 btrfs: add kerneldoc for setup_items_for_insert Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit fc0d82e103c78faa98cf61e681b45618e879b63d Author: Nikolay Borisov Date: Tue Sep 1 17:39:59 2020 +0300 btrfs: sink total_data parameter in setup_items_for_insert That parameter can easily be derived based on the "data_size" and "nr" parameters exploit this fact to simply the function's signature. No functional changes. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3dc9dc8969dc738285cb7d43e852c98459c8f0a9 Author: Nikolay Borisov Date: Tue Sep 1 17:39:58 2020 +0300 btrfs: eliminate total_size parameter from setup_items_for_insert The value of this argument can be derived from the total_data as it's simply the value of the data size + size of btrfs_items being touched. Move the parameter calculation inside the function. This results in a simpler interface and also a minor size reduction: ./scripts/bloat-o-meter ctree.original fs/btrfs/ctree.o add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-34 (-34) Function old new delta btrfs_duplicate_item 260 259 -1 setup_items_for_insert 1200 1190 -10 btrfs_insert_empty_items 177 154 -23 Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit fc0716c2f6afed06a9306db3fb62cc1fcf389757 Author: Nikolay Borisov Date: Tue Sep 1 17:39:57 2020 +0300 btrfs: re-arrange statements in setup_items_for_insert Rearrange statements calculating the offset of the newly added items so that the calculation has to be done only once. No functional change. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7573df5547c00f067e4c0b2fd7cc99f3d3a2bda7 Author: Omar Sandoval Date: Fri Aug 21 00:39:54 2020 -0700 btrfs: sysfs: export supported send stream version This reports the latest send stream version supported by the kernel as the feature in /sys/fs/btrfs/features/send_stream_version . Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit c9a949af13d6d8983de086d9ecbf34c4c94da73e Author: Omar Sandoval Date: Fri Aug 21 00:39:53 2020 -0700 btrfs: send: use btrfs_file_extent_end() in send_write_or_clone() send_write_or_clone() basically has an open-coded copy of btrfs_file_extent_end() except that it (incorrectly) aligns to PAGE_SIZE instead of sectorsize. Fix and simplify the code by using btrfs_file_extent_end(). Reviewed-by: Filipe Manana Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8c7d9fe06f5bb87dce356dcc9ea7c003b529e6ba Author: Omar Sandoval Date: Fri Aug 21 00:39:52 2020 -0700 btrfs: send: avoid copying file data send_write() currently copies from the page cache to sctx->read_buf, and then from sctx->read_buf to sctx->send_buf. Similarly, send_hole() zeroes sctx->read_buf and then copies from sctx->read_buf to sctx->send_buf. However, if we write the TLV header manually, we can copy to sctx->send_buf directly and get rid of sctx->read_buf. Reviewed-by: Filipe Manana Reviewed-by: Josef Bacik Signed-off-by: Omar Sandoval Signed-off-by: David Sterba commit a9b2e0de92cbed84b9bca1464babaf1d67a5542b Author: Omar Sandoval Date: Fri Aug 21 00:39:51 2020 -0700 btrfs: send: get rid of i_size logic in send_write() send_write()/fill_read_buf() have some logic for avoiding reading past i_size. However, everywhere that we call send_write()/send_extent_data(), we've already clamped the length down to i_size. Get rid of the i_size handling, which simplifies the next change. Reviewed-by: Filipe Manana Reviewed-by: Josef Bacik Signed-off-by: Omar Sandoval Signed-off-by: David Sterba commit 0cbb5bdfea2675f4b9749f99120a79f9e0a28600 Author: Filipe Manana Date: Tue Sep 8 11:27:24 2020 +0100 btrfs: rename btrfs_insert_clone_extent() to a more generic name Now that we use the same mechanism to replace all the extents in a file range with either a hole, an existing extent (when cloning) or a new extent (when using fallocate), the name of btrfs_insert_clone_extent() no longer reflects its genericity. So rename it to btrfs_insert_replace_extent(), since what it does is to either insert an existing extent or a new extent into a file range. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 306bfec02b1054d24bbbeec49ece6db396d451e0 Author: Filipe Manana Date: Tue Sep 8 11:27:23 2020 +0100 btrfs: rename btrfs_punch_hole_range() to a more generic name The function btrfs_punch_hole_range() is now used to replace all the file extents in a given file range with an extent described in the given struct btrfs_replace_extent_info argument. This extent can either be an existing extent that is being cloned or it can be a new extent (namely a prealloc extent). When that argument is NULL it only punches a hole (drops all the existing extents) in the file range. So rename the function to btrfs_replace_file_extents(). Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit bf385648fa4805acf206254c77916edb58dbfe25 Author: Filipe Manana Date: Tue Sep 8 11:27:22 2020 +0100 btrfs: rename struct btrfs_clone_extent_info to a more generic name Now that we can use btrfs_clone_extent_info to convey information for a new prealloc extent as well, and not just for existing extents that are being cloned, rename it to btrfs_replace_extent_info, which reflects the fact that this is now more generic and it is used to replace all existing extents in a file range with the extent described by the structure. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit fb870f6cdd72a1f143d9d25ab864e474fed65616 Author: Filipe Manana Date: Tue Sep 8 11:27:21 2020 +0100 btrfs: remove item_size member of struct btrfs_clone_extent_info The value of item_size of struct btrfs_clone_extent_info is always set to the size of a non-inline file extent item, and in fact the infrastructure that uses this structure (btrfs_punch_hole_range()) does not work with inline file extents at all (and it is not supposed to). So just remove that field from the structure and use directly sizeof(struct btrfs_file_extent_item) instead. Also assert that the file extent type is not inline at btrfs_insert_clone_extent(). Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8fccebfa534c7984864394fa03608305e4929aae Author: Filipe Manana Date: Tue Sep 8 11:27:20 2020 +0100 btrfs: fix metadata reservation for fallocate that leads to transaction aborts When doing an fallocate(), specially a zero range operation, we assume that reserving 3 units of metadata space is enough, that at most we touch one leaf in subvolume/fs tree for removing existing file extent items and inserting a new file extent item. This assumption is generally true for most common use cases. However when we end up needing to remove file extent items from multiple leaves, we can end up failing with -ENOSPC and abort the current transaction, turning the filesystem to RO mode. When this happens a stack trace like the following is dumped in dmesg/syslog: [ 1500.620934] ------------[ cut here ]------------ [ 1500.620938] BTRFS: Transaction aborted (error -28) [ 1500.620973] WARNING: CPU: 2 PID: 30807 at fs/btrfs/inode.c:9724 __btrfs_prealloc_file_range+0x512/0x570 [btrfs] [ 1500.620974] Modules linked in: btrfs intel_rapl_msr intel_rapl_common kvm_intel (...) [ 1500.621010] CPU: 2 PID: 30807 Comm: xfs_io Tainted: G W 5.9.0-rc3-btrfs-next-67 #1 [ 1500.621012] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 1500.621023] RIP: 0010:__btrfs_prealloc_file_range+0x512/0x570 [btrfs] [ 1500.621026] Code: 8b 40 50 f0 48 (...) [ 1500.621028] RSP: 0018:ffffb05fc8803ca0 EFLAGS: 00010286 [ 1500.621030] RAX: 0000000000000000 RBX: ffff9608af276488 RCX: 0000000000000000 [ 1500.621032] RDX: 0000000000000001 RSI: 0000000000000027 RDI: 00000000ffffffff [ 1500.621033] RBP: ffffb05fc8803d90 R08: 0000000000000001 R09: 0000000000000001 [ 1500.621035] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000003200000 [ 1500.621037] R13: 00000000ffffffe4 R14: ffff9608af275fe8 R15: ffff9608af275f60 [ 1500.621039] FS: 00007fb5b2368ec0(0000) GS:ffff9608b6600000(0000) knlGS:0000000000000000 [ 1500.621041] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1500.621043] CR2: 00007fb5b2366fb8 CR3: 0000000202d38005 CR4: 00000000003706e0 [ 1500.621046] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1500.621047] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1500.621049] Call Trace: [ 1500.621076] btrfs_prealloc_file_range+0x10/0x20 [btrfs] [ 1500.621087] btrfs_fallocate+0xccd/0x1280 [btrfs] [ 1500.621108] vfs_fallocate+0x14d/0x290 [ 1500.621112] ksys_fallocate+0x3a/0x70 [ 1500.621117] __x64_sys_fallocate+0x1a/0x20 [ 1500.621120] do_syscall_64+0x33/0x80 [ 1500.621123] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 1500.621126] RIP: 0033:0x7fb5b248c477 [ 1500.621128] Code: 89 7c 24 08 (...) [ 1500.621130] RSP: 002b:00007ffc7bee9060 EFLAGS: 00000293 ORIG_RAX: 000000000000011d [ 1500.621132] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fb5b248c477 [ 1500.621134] RDX: 0000000000000000 RSI: 0000000000000010 RDI: 0000000000000003 [ 1500.621136] RBP: 0000557718faafd0 R08: 0000000000000000 R09: 0000000000000000 [ 1500.621137] R10: 0000000003200000 R11: 0000000000000293 R12: 0000000000000010 [ 1500.621139] R13: 0000557718faafb0 R14: 0000557718faa480 R15: 0000000000000003 [ 1500.621151] irq event stamp: 1026217 [ 1500.621154] hardirqs last enabled at (1026223): [] console_unlock+0x500/0x5c0 [ 1500.621156] hardirqs last disabled at (1026228): [] console_unlock+0x457/0x5c0 [ 1500.621159] softirqs last enabled at (1022486): [] __do_softirq+0x3dc/0x606 [ 1500.621161] softirqs last disabled at (1022477): [] asm_call_on_stack+0x12/0x20 [ 1500.621162] ---[ end trace 2955b08408d8b9d4 ]--- [ 1500.621167] BTRFS: error (device sdj) in __btrfs_prealloc_file_range:9724: errno=-28 No space left When we use fallocate() internally, for reserving an extent for a space cache, inode cache or relocation, we can't hit this problem since either there aren't any file extent items to remove from the subvolume tree or there is at most one. When using plain fallocate() it's very unlikely, since that would require having many file extent items representing holes for the target range and crossing multiple leafs - we attempt to increase the range (merge) of such file extent items when punching holes, so at most we end up with 2 file extent items for holes at leaf boundaries. However when using the zero range operation of fallocate() for a large range (100+ MiB for example) that's fairly easy to trigger. The following example reproducer triggers the issue: $ cat reproducer.sh #!/bin/bash umount /dev/sdj &> /dev/null mkfs.btrfs -f -n 16384 -O ^no-holes /dev/sdj > /dev/null mount /dev/sdj /mnt/sdj # Create a 100M file with many file extent items. Punch a hole every 8K # just to speedup the file creation - we could do 4K sequential writes # followed by fsync (or O_SYNC) as well, but that takes a lot of time. file_size=$((100 * 1024 * 1024)) xfs_io -f -c "pwrite -S 0xab -b 10M 0 $file_size" /mnt/sdj/foobar for ((i = 0; i < $file_size; i += 8192)); do xfs_io -c "fpunch $i 4096" /mnt/sdj/foobar done # Force a transaction commit, so the zero range operation will be forced # to COW all metadata extents it need to touch. sync xfs_io -c "fzero 0 $file_size" /mnt/sdj/foobar umount /mnt/sdj $ ./reproducer.sh wrote 104857600/104857600 bytes at offset 0 100 MiB, 10 ops; 0.0669 sec (1.458 GiB/sec and 149.3117 ops/sec) fallocate: No space left on device $ dmesg To fix this use the existing infrastructure that hole punching and extent cloning use for replacing a file range with another extent. This deals with doing the removal of file extent items and inserting the new one using an incremental approach, reserving more space when needed and always ensuring we don't leave an implicit hole in the range in case we need to do multiple iterations and a crash happens between iterations. A test case for fstests will follow up soon. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit a31a5876fae21c602f14686f1e8985f98b153d2b Author: YueHaibing Date: Wed Sep 9 21:51:42 2020 +0800 btrfs: remove unused function calc_global_rsv_need_space() It is not used since commit 0096420adb03 ("btrfs: do not account global reserve in can_overcommit"). Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: YueHaibing Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0725c0c9351d9854a61bc68f0a59d9f91d75abbd Author: Anand Jain Date: Sat Sep 5 01:34:36 2020 +0800 btrfs: move btrfs_dev_replace_update_device_in_mapping_tree to drop declaration The function is short and simple, we can get rid of the declaration as it's not necessary for a static function. Move it before its first caller. No functional changes. Reviewed-by: Nikolay Borisov Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit c83b60c0e4d27363e284123afb50ff34f0ea1f1a Author: Anand Jain Date: Sat Sep 5 01:34:35 2020 +0800 btrfs: simplify gotos in open_seed_device The function does not have a common exit block and returns immediatelly so there's no point having the goto. Remove the two cases. Reviewed-by: Nikolay Borisov Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit e493e8f9bcb5f6cf00f94d30eddc43c5be731ff4 Author: Anand Jain Date: Sat Sep 5 01:34:34 2020 +0800 btrfs: remove unnecessary tmp variable in btrfs_assign_next_active_device() We can check the argument value directly, no need for the temporary variable. Reviewed-by: Nikolay Borisov Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1888709d71806c0bdf008ea471ce9569b8efa79b Author: Anand Jain Date: Sat Sep 5 01:34:32 2020 +0800 btrfs: remove tmp variable for list traversal in btrfs_init_dev_replace_tgtdev In the function btrfs_init_dev_replace_tgtdev(), the local variable devices is used only once, we can remove it. Reviewed-by: Nikolay Borisov Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit e17125b52b7ec1075fae408e1a1da8005116e34a Author: Anand Jain Date: Sat Sep 5 01:34:31 2020 +0800 btrfs: use sprout device_list_mutex in btrfs_init_devices_late On a mounted sprout filesystem, all threads now are using the sprout::device_list_mutex, and this is the only code using the seed::device_list_mutex. This patch converts to use the sprouts fs_info->fs_devices->device_list_mutex. The same reasoning holds true here, that device delete is holding the sprout::device_list_mutex. Signed-off-by: Anand Jain Signed-off-by: David Sterba commit 2fca0db07608a303dbe9db802ecca678e358dca9 Author: Anand Jain Date: Sat Sep 5 01:34:30 2020 +0800 btrfs: reada: lock all seed/sprout devices in __reada_start_machine On an fs mounted using a sprout device, the seed fs_devices are maintained in a linked list under fs_info->fs_devices. Each seeds fs_devices also has device_list_mutex initialized to protect against the potential race with delete threads. But the delete thread (at btrfs_rm_device()) is holding the fs_info::fs_devices::device_list_mutex mutex which belongs to sprout device_list_mutex instead of seed device_list_mutex. Moreover, there aren't any significient benefits in using the seed::device_list_mutex instead of sprout::device_list_mutex. So this patch converts them of using the seed::device_list_mutex to sprout::device_list_mutex. Reviewed-by: Nikolay Borisov Signed-off-by: Anand Jain Signed-off-by: David Sterba commit 7ad3912a70a696197d03856749f89dad7a377bc9 Author: Anand Jain Date: Sat Sep 5 01:34:29 2020 +0800 btrfs: handle errors in btrfs_sysfs_add_fs_devices btrfs_sysfs_add_fs_devices() is called by btrfs_sysfs_add_mounted(). btrfs_sysfs_add_mounted() assumes that btrfs_sysfs_add_fs_devices() will either add sysfs entries for all the devices or none. So this patch keeps up to its caller expecatation and cleans up the created sysfs entries if it has to fail at some device in the list. Reviewed-by: Nikolay Borisov Signed-off-by: Anand Jain Signed-off-by: David Sterba commit 30b0e4e0e3f53944755257c7d02792ee7f9c072e Author: Anand Jain Date: Sat Sep 5 01:34:28 2020 +0800 btrfs: initialize sysfs devid and device link for seed device We don't initialize the sysfs devid kobject and device-link yet for the seed devices in an sprouted filesystem. So this patch initializes the seed device devid kobject and the device link in the sysfs. Signed-off-by: Anand Jain Signed-off-by: David Sterba commit 53f8a74cbeffd45a95de5dc6d16584aadb682a31 Author: Anand Jain Date: Sat Sep 5 01:34:27 2020 +0800 btrfs: split and refactor btrfs_sysfs_remove_devices_dir Similar to btrfs_sysfs_add_devices_dir()'s refactoring, split btrfs_sysfs_remove_devices_dir() so that we don't have to use the device argument to indicate whether to free all devices or just one device. Export btrfs_sysfs_remove_device() as device operations outside of sysfs.c now calls this instead of btrfs_sysfs_remove_devices_dir(). btrfs_sysfs_remove_devices_dir() is renamed to btrfs_sysfs_remove_fs_devices() to suite its new role. Now, no one outside of sysfs.c calls btrfs_sysfs_remove_fs_devices() so it is redeclared s static. And the same function had to be moved before its first caller. Reviewed-by: Nikolay Borisov Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit cd36da2e7ec67f0da9c1efc8a87ad31bd9242ec3 Author: Anand Jain Date: Sat Sep 5 01:34:26 2020 +0800 btrfs: simplify parameters of btrfs_sysfs_add_devices_dir When we add a device we need to add it to sysfs, so instead of using the btrfs_sysfs_add_devices_dir() fs_devices argument to specify whether to add a device or all of fs_devices, call the helper function directly btrfs_sysfs_add_device() and thus make it non-static. Reviewed-by: Nikolay Borisov Reviewed-by: Josef Bacik Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6a416a018f1a9372a43465c366e91d202da01e11 Author: Anand Jain Date: Sat Sep 5 01:34:25 2020 +0800 btrfs: make btrfs_sysfs_remove_devices_dir return void btrfs_sysfs_remove_devices_dir() return value is unused declare it as void. Reviewed-by: Nikolay Borisov Reviewed-by: Josef Bacik Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 985e233e96e56b9980d5f632fc306bfa6e03f70f Author: Anand Jain Date: Sat Sep 5 01:34:24 2020 +0800 btrfs: add btrfs_sysfs_remove_device helper btrfs_sysfs_remove_devices_dir() removes device link and devid kobject (sysfs entries) for a device or all the devices in the btrfs_fs_devices. In preparation to remove these sysfs entries for the seed as well, add a btrfs_sysfs_remove_device() helper function and avoid code duplication. Reviewed-by: Nikolay Borisov Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 178a16c94041fe5ebf86c5620094e185cec27dd2 Author: Anand Jain Date: Sat Sep 5 01:34:23 2020 +0800 btrfs: add btrfs_sysfs_add_device helper btrfs_sysfs_add_devices_dir() adds device link and devid kobject (sysfs entries) for a device or all the devices in the btrfs_fs_devices. In preparation to add these sysfs entries for the seed as well, add a btrfs_sysfs_add_device() helper function and avoid code duplication. Reviewed-by: Josef Bacik Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit c6a5d954950c5031444173ad2195efc163afcac9 Author: Anand Jain Date: Sat Sep 5 01:34:22 2020 +0800 btrfs: fix replace of seed device If you replace a seed device in a sprouted fs, it appears to have successfully replaced the seed device, but if you look closely, it didn't. Here is an example. $ mkfs.btrfs /dev/sda $ btrfstune -S1 /dev/sda $ mount /dev/sda /btrfs $ btrfs device add /dev/sdb /btrfs $ umount /btrfs $ btrfs device scan --forget $ mount -o device=/dev/sda /dev/sdb /btrfs $ btrfs replace start -f /dev/sda /dev/sdc /btrfs $ echo $? 0 BTRFS info (device sdb): dev_replace from /dev/sda (devid 1) to /dev/sdc started BTRFS info (device sdb): dev_replace from /dev/sda (devid 1) to /dev/sdc finished $ btrfs fi show Label: none uuid: ab2c88b7-be81-4a7e-9849-c3666e7f9f4f Total devices 2 FS bytes used 256.00KiB devid 1 size 3.00GiB used 520.00MiB path /dev/sdc devid 2 size 3.00GiB used 896.00MiB path /dev/sdb Label: none uuid: 10bd3202-0415-43af-96a8-d5409f310a7e Total devices 1 FS bytes used 128.00KiB devid 1 size 3.00GiB used 536.00MiB path /dev/sda So as per the replace start command and kernel log replace was successful. Now let's try to clean mount. $ umount /btrfs $ btrfs device scan --forget $ mount -o device=/dev/sdc /dev/sdb /btrfs mount: /btrfs: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error. [ 636.157517] BTRFS error (device sdc): failed to read chunk tree: -2 [ 636.180177] BTRFS error (device sdc): open_ctree failed That's because per dev items it is still looking for the original seed device. $ btrfs inspect-internal dump-tree -d /dev/sdb item 0 key (DEV_ITEMS DEV_ITEM 1) itemoff 16185 itemsize 98 devid 1 total_bytes 3221225472 bytes_used 545259520 io_align 4096 io_width 4096 sector_size 4096 type 0 generation 6 start_offset 0 dev_group 0 seek_speed 0 bandwidth 0 uuid 59368f50-9af2-4b17-91da-8a783cc418d4 <--- seed uuid fsid 10bd3202-0415-43af-96a8-d5409f310a7e <--- seed fsid item 1 key (DEV_ITEMS DEV_ITEM 2) itemoff 16087 itemsize 98 devid 2 total_bytes 3221225472 bytes_used 939524096 io_align 4096 io_width 4096 sector_size 4096 type 0 generation 0 start_offset 0 dev_group 0 seek_speed 0 bandwidth 0 uuid 56a0a6bc-4630-4998-8daf-3c3030c4256a <- sprout uuid fsid ab2c88b7-be81-4a7e-9849-c3666e7f9f4f <- sprout fsid But the replaced target has the following uuid+fsid in its superblock which doesn't match with the expected uuid+fsid in its devitem. $ btrfs in dump-super /dev/sdc | egrep '^generation|dev_item.uuid|dev_item.fsid|devid' generation 20 dev_item.uuid 59368f50-9af2-4b17-91da-8a783cc418d4 dev_item.fsid ab2c88b7-be81-4a7e-9849-c3666e7f9f4f [match] dev_item.devid 1 So if you provide the original seed device the mount shall be successful. Which so long happening in the test case btrfs/163. $ btrfs device scan --forget $ mount -o device=/dev/sda /dev/sdb /btrfs Fix in this patch: If a seed is not sprouted then there is no replacement of it, because of its read-only filesystem with a read-only device. Similarly, in the case of a sprouted filesystem, the seed device is still read only. So, mark it as you can't replace a seed device, you can only add a new device and then delete the seed device. If replace is attempted then returns -EINVAL. Signed-off-by: Anand Jain Signed-off-by: David Sterba commit 79dae17d8d44b2d15779e332180080af45df5352 Author: Anand Jain Date: Thu Sep 3 21:30:12 2020 +0800 btrfs: improve device scanning messages Systems booting without the initramfs seems to scan an unusual kind of device path (/dev/root). And at a later time, the device is updated to the correct path. We generally print the process name and PID of the process scanning the device but we don't capture the same information if the device path is rescanned with a different pathname. The current message is too long, so drop the unnecessary UUID and add process name and PID. While at this also update the duplicate device warning to include the process name and PID so the messages are consistent CC: stable@vger.kernel.org # 4.19+ Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=89721 Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 457f1864b569c4a5d49046fb9a88ab82e108cdfd Author: Josef Bacik Date: Thu Sep 3 14:29:51 2020 -0400 btrfs: pretty print leaked root name I'm a actual human being so am incapable of converting u64 to s64 in my head, so add a helper to get the pretty name of a root objectid and use that helper to spit out the name for any special roots for leaked roots, so I don't have to scratch my head and figure out which root I messed up the refs for. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 66a2823c54367b4d366cfa5dc12ef99ef560f428 Author: Goldwyn Rodrigues Date: Tue Aug 25 10:02:33 2020 -0500 btrfs: sysfs: export currently running exclusive operation /sys/fs//exclusive_operation contains the currently executing exclusive operation. Add a sysfs_notify() when operation end, so userspace can be notified of exclusive operation is finished. Reviewed-by: Nikolay Borisov Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit c3e1f96c37d0f863ac6ddcafac6921fd46f1aa37 Author: Goldwyn Rodrigues Date: Tue Aug 25 10:02:32 2020 -0500 btrfs: enumerate the type of exclusive operation in progress Instead of using a flag bit for exclusive operation, use a variable to store which exclusive operation is being performed. Introduce an API to start and finish an exclusive operation. This would enable another way for tools to check which operation is running on why starting an exclusive operation failed. The followup patch adds a sysfs_notify() to alert userspace when the state changes, so userspace can perform select() on it to get notified of the change. This would enable us to enqueue a command which will wait for current exclusive operation to complete before issuing the next exclusive operation. This has been done synchronously as opposed to a background process, or else error collection (if any) will become difficult. Reviewed-by: Nikolay Borisov Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba [ update comments ] Signed-off-by: David Sterba commit ca10845a56856fff4de3804c85e6424d0f6d0cde Author: Josef Bacik Date: Tue Sep 1 08:09:01 2020 -0400 btrfs: sysfs: init devices outside of the chunk_mutex While running btrfs/061, btrfs/073, btrfs/078, or btrfs/178 we hit the following lockdep splat: ====================================================== WARNING: possible circular locking dependency detected 5.9.0-rc3+ #4 Not tainted ------------------------------------------------------ kswapd0/100 is trying to acquire lock: ffff96ecc22ef4a0 (&delayed_node->mutex){+.+.}-{3:3}, at: __btrfs_release_delayed_node.part.0+0x3f/0x330 but task is already holding lock: ffffffff8dd74700 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x5/0x30 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (fs_reclaim){+.+.}-{0:0}: fs_reclaim_acquire+0x65/0x80 slab_pre_alloc_hook.constprop.0+0x20/0x200 kmem_cache_alloc+0x37/0x270 alloc_inode+0x82/0xb0 iget_locked+0x10d/0x2c0 kernfs_get_inode+0x1b/0x130 kernfs_get_tree+0x136/0x240 sysfs_get_tree+0x16/0x40 vfs_get_tree+0x28/0xc0 path_mount+0x434/0xc00 __x64_sys_mount+0xe3/0x120 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #2 (kernfs_mutex){+.+.}-{3:3}: __mutex_lock+0x7e/0x7e0 kernfs_add_one+0x23/0x150 kernfs_create_link+0x63/0xa0 sysfs_do_create_link_sd+0x5e/0xd0 btrfs_sysfs_add_devices_dir+0x81/0x130 btrfs_init_new_device+0x67f/0x1250 btrfs_ioctl+0x1ef/0x2e20 __x64_sys_ioctl+0x83/0xb0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&fs_info->chunk_mutex){+.+.}-{3:3}: __mutex_lock+0x7e/0x7e0 btrfs_chunk_alloc+0x125/0x3a0 find_free_extent+0xdf6/0x1210 btrfs_reserve_extent+0xb3/0x1b0 btrfs_alloc_tree_block+0xb0/0x310 alloc_tree_block_no_bg_flush+0x4a/0x60 __btrfs_cow_block+0x11a/0x530 btrfs_cow_block+0x104/0x220 btrfs_search_slot+0x52e/0x9d0 btrfs_insert_empty_items+0x64/0xb0 btrfs_insert_delayed_items+0x90/0x4f0 btrfs_commit_inode_delayed_items+0x93/0x140 btrfs_log_inode+0x5de/0x2020 btrfs_log_inode_parent+0x429/0xc90 btrfs_log_new_name+0x95/0x9b btrfs_rename2+0xbb9/0x1800 vfs_rename+0x64f/0x9f0 do_renameat2+0x320/0x4e0 __x64_sys_rename+0x1f/0x30 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&delayed_node->mutex){+.+.}-{3:3}: __lock_acquire+0x119c/0x1fc0 lock_acquire+0xa7/0x3d0 __mutex_lock+0x7e/0x7e0 __btrfs_release_delayed_node.part.0+0x3f/0x330 btrfs_evict_inode+0x24c/0x500 evict+0xcf/0x1f0 dispose_list+0x48/0x70 prune_icache_sb+0x44/0x50 super_cache_scan+0x161/0x1e0 do_shrink_slab+0x178/0x3c0 shrink_slab+0x17c/0x290 shrink_node+0x2b2/0x6d0 balance_pgdat+0x30a/0x670 kswapd+0x213/0x4c0 kthread+0x138/0x160 ret_from_fork+0x1f/0x30 other info that might help us debug this: Chain exists of: &delayed_node->mutex --> kernfs_mutex --> fs_reclaim Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(kernfs_mutex); lock(fs_reclaim); lock(&delayed_node->mutex); *** DEADLOCK *** 3 locks held by kswapd0/100: #0: ffffffff8dd74700 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x5/0x30 #1: ffffffff8dd65c50 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x115/0x290 #2: ffff96ed2ade30e0 (&type->s_umount_key#36){++++}-{3:3}, at: super_cache_scan+0x38/0x1e0 stack backtrace: CPU: 0 PID: 100 Comm: kswapd0 Not tainted 5.9.0-rc3+ #4 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 Call Trace: dump_stack+0x8b/0xb8 check_noncircular+0x12d/0x150 __lock_acquire+0x119c/0x1fc0 lock_acquire+0xa7/0x3d0 ? __btrfs_release_delayed_node.part.0+0x3f/0x330 __mutex_lock+0x7e/0x7e0 ? __btrfs_release_delayed_node.part.0+0x3f/0x330 ? __btrfs_release_delayed_node.part.0+0x3f/0x330 ? lock_acquire+0xa7/0x3d0 ? find_held_lock+0x2b/0x80 __btrfs_release_delayed_node.part.0+0x3f/0x330 btrfs_evict_inode+0x24c/0x500 evict+0xcf/0x1f0 dispose_list+0x48/0x70 prune_icache_sb+0x44/0x50 super_cache_scan+0x161/0x1e0 do_shrink_slab+0x178/0x3c0 shrink_slab+0x17c/0x290 shrink_node+0x2b2/0x6d0 balance_pgdat+0x30a/0x670 kswapd+0x213/0x4c0 ? _raw_spin_unlock_irqrestore+0x41/0x50 ? add_wait_queue_exclusive+0x70/0x70 ? balance_pgdat+0x670/0x670 kthread+0x138/0x160 ? kthread_create_worker_on_cpu+0x40/0x40 ret_from_fork+0x1f/0x30 This happens because we are holding the chunk_mutex at the time of adding in a new device. However we only need to hold the device_list_mutex, as we're going to iterate over the fs_devices devices. Move the sysfs init stuff outside of the chunk_mutex to get rid of this lockdep splat. CC: stable@vger.kernel.org # 4.4.x: f3cd2c58110dad14e: btrfs: sysfs, rename device_link add/remove functions CC: stable@vger.kernel.org # 4.4.x Reported-by: David Sterba Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit facee0a09c15805202e37d12e0fecce1d28b4d5f Author: Nikolay Borisov Date: Mon Aug 31 14:42:49 2020 +0300 btrfs: make extent_fiemap take btrfs_inode Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 948dfeb86baef1bfa108e93acac5cee23d578e62 Author: Nikolay Borisov Date: Mon Aug 31 14:42:48 2020 +0300 btrfs: make btrfs_zero_range_check_range_boundary take btrfs_inode Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 998acfe8ffc14812ad427081b156dc286901ed9a Author: Nikolay Borisov Date: Mon Aug 31 14:42:47 2020 +0300 btrfs: make copy_inline_to_page take btrfs_inode Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3c5641a83ac4d2e8ef3d542b35794962e51d7135 Author: Nikolay Borisov Date: Mon Aug 31 14:42:46 2020 +0300 btrfs: make btrfs_find_ordered_sum take btrfs_inode Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit f1bbde8d5f278050e63b7330f6d6b230fe1ea398 Author: Nikolay Borisov Date: Mon Aug 31 14:42:45 2020 +0300 btrfs: make get_extent_skip_holes take btrfs_inode Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3347c48f276754eaf8f41a6e0368ed558a9453be Author: Nikolay Borisov Date: Mon Aug 31 14:42:44 2020 +0300 btrfs: make btrfs_writepage_endio_finish_ordered btrfs_inode-centric Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 53ac7ead2446947facccbda392bbf499be435a59 Author: Nikolay Borisov Date: Mon Aug 31 14:42:43 2020 +0300 btrfs: make btrfs_invalidatepage work on btrfs_inode Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6fee248d2beb3591f6f50aeeac843b366b116e3b Author: Nikolay Borisov Date: Mon Aug 31 14:42:42 2020 +0300 btrfs: convert btrfs_inode_sectorsize to take btrfs_inode It's counterintuitive to have a function named btrfs_inode_xxx which takes a generic inode. Also move the function to btrfs_inode.h so that it has access to the definition of struct btrfs_inode. Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 90c0304c6307a68e1e4af637d56d6613ed026875 Author: Nikolay Borisov Date: Mon Aug 31 14:42:41 2020 +0300 btrfs: make btrfs_dec_test_ordered_pending take btrfs_inode Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit acbf1dd0fcbd10c67826a19958f55a053b32f532 Author: Nikolay Borisov Date: Mon Aug 31 14:42:40 2020 +0300 btrfs: make ordered extent tracepoint take btrfs_inode Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6d072c8e291f4127a7a40addb7ef553f9490a600 Author: Nikolay Borisov Date: Mon Aug 31 14:42:39 2020 +0300 btrfs: make btrfs_lookup_first_ordered_extent take btrfs_inode Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit b79b724969ad5e5a01548c75f30fc14c893e825b Author: Nikolay Borisov Date: Mon Aug 31 14:42:38 2020 +0300 btrfs: make inode_tree_del take btrfs_inode Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit ca9d473a3e300bcddc73c00fdf2f4bf6ca43c4a2 Author: Josef Bacik Date: Thu Aug 20 11:46:08 2020 -0400 btrfs: use BTRFS_NESTED_NEW_ROOT for double splits I've made this change separate since it requires both of the newly added NESTED flags and I didn't want to slip it into one of those changes. If we do a double split of a node we can end up doing a BTRFS_NESTED_SPLIT on level 0, which throws lockdep off because it appears as a double lock. Since we're maxed out on subclasses, use BTRFS_NESTED_NEW_ROOT if we had to do a double split. This is OK because we won't have to do a double split if we had to insert a new root, and the new root would be at a higher level anyway. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit cf6f34aa3ada0be8c5f90fe93f48a75fea082c51 Author: Josef Bacik Date: Thu Aug 20 11:46:07 2020 -0400 btrfs: introduce BTRFS_NESTING_NEW_ROOT for adding new roots The way we add new roots is confusing from a locking perspective for lockdep. We generally have the rule that we lock things in order from highest level to lowest, but in the case of adding a new level to the tree we actually allocate a new block for the root, which makes the locking go in reverse. A similar issue exists for snapshotting, we cow the original root for the root of a new tree, however they're at the same level. Address this by using BTRFS_NESTING_NEW_ROOT for these operations. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4dff97e69005ea90266f3e3dda295264e854c15d Author: Josef Bacik Date: Thu Aug 20 11:46:06 2020 -0400 btrfs: introduce BTRFS_NESTING_SPLIT for split blocks If we are splitting a leaf/node, we could do something like the following lock(leaf) BTRFS_NESTING_NORMAL lock(left) BTRFS_NESTING_LEFT + BTRFS_NESTING_COW push from leaf -> left reset path to point to left split left allocate new block, lock block BTRFS_NESTING_SPLIT at the new block point we need to have a different nesting level, because we have already used either BTRFS_NESTING_LEFT or BTRFS_NESTING_RIGHT when pushing items from the original leaf into the adjacent leaves. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit bf59a5a21604ef79da9105bef1bae817fd053e75 Author: Josef Bacik Date: Thu Aug 20 11:46:05 2020 -0400 btrfs: introduce BTRFS_NESTING_LEFT/RIGHT_COW For similar reasons as BTRFS_NESTING_COW, we need BTRFS_NESTING_LEFT/RIGHT_COW. The pattern is this lock leaf -> BTRFS_NESTING_NORMAL cow leaf -> BTRFS_NESTING_COW split leaf lock left -> BTRFS_NESTING_LEFT cow left -> BTRFS_NESTING_LEFT_COW We need this in order to indicate to lockdep that these locks are discrete and are being taken in a safe order. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit bf77467a93bdf11d815f5c5f25206a0d058da8de Author: Josef Bacik Date: Thu Aug 20 11:46:04 2020 -0400 btrfs: introduce BTRFS_NESTING_LEFT/BTRFS_NESTING_RIGHT Our lockdep maps are based on rootid+level, however in some cases we will lock adjacent blocks on the same level, namely in searching forward or in split/balance. Because of this lockdep will complain, so we need a separate subclass to indicate to lockdep that these are different locks. lock leaf -> BTRFS_NESTING_NORMAL cow leaf -> BTRFS_NESTING_COW split leaf lock left -> BTRFS_NESTING_LEFT lock right -> BTRFS_NESTING_RIGHT The above graph illustrates the need for this new nesting subclass. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9631e4cc1a030aa71dea588cc9a57533b657489f Author: Josef Bacik Date: Thu Aug 20 11:46:03 2020 -0400 btrfs: introduce BTRFS_NESTING_COW for cow'ing blocks When we COW a block we are holding a lock on the original block, and then we lock the new COW block. Because our lockdep maps are based on root + level, this will make lockdep complain. We need a way to indicate a subclass for locking the COW'ed block, so plumb through our btrfs_lock_nesting from btrfs_cow_block down to the btrfs_init_buffer, and then introduce BTRFS_NESTING_COW to be used for cow'ing blocks. The reason I've added all this extra infrastructure is because there will be need of different nesting classes in follow up patches. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit fd7ba1c1202d15ac96d7b42256550973e12686b5 Author: Josef Bacik Date: Thu Aug 20 11:46:02 2020 -0400 btrfs: add nesting tags to the locking helpers We will need these when we switch to an rwsem, so plumb in the infrastructure here to use later on. I violate the 80 character limit some here because it'll be cleaned up later. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 51899412dd95b2d9f50297c527b22ada3da0000c Author: Josef Bacik Date: Thu Aug 20 11:46:01 2020 -0400 btrfs: introduce btrfs_path::recurse Our current tree locking stuff allows us to recurse with read locks if we're already holding the write lock. This is necessary for the space cache inode, as we could be holding a lock on the root_tree root when we need to cache a block group, and thus need to be able to read down the root_tree to read in the inode cache. We can get away with this in our current locking, but we won't be able to with a rwsem. Handle this by purposefully annotating the places where we require recursion, so that in the future we can maybe come up with a way to avoid the recursion. In the case of the free space inode, this will be superseded by the free space tree. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 329ced799be881feab445b68163cd3869340cc08 Author: Josef Bacik Date: Thu Aug 20 11:46:00 2020 -0400 btrfs: rename extent_buffer::lock_nested to extent_buffer::lock_recursed Nested locking with lockdep and everything else refers to lock hierarchy within the same lock map. This is how we indicate the same locks for different objects are ok to take in a specific order, for our use case that would be to take the lock on a leaf and then take a lock on an adjacent leaf. What ->lock_nested _actually_ refers to is if we happen to already be holding the write lock on the extent buffer and we're allowing a read lock to be taken on that extent buffer, which is recursion. Rename this so we don't get confused when we switch to a rwsem and have to start using the _nested helpers. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit b9ba017fb0771f67903d70f57908899d7b0020b1 Author: Nikolay Borisov Date: Wed Jul 22 11:09:25 2020 +0300 btrfs: don't opencode sync_blockdev in btrfs_init_new_device Instead of opencoding filemap_write_and_wait simply call syncblockdev as it makes it abundantly clear what's going on and why this is used. No semantics changes. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4ae312e9728fe568ce0d863421c399ec829d6df9 Author: Nikolay Borisov Date: Wed Jul 22 11:09:24 2020 +0300 btrfs: remove redundant code from btrfs_free_stale_devices Following the refactor of btrfs_free_stale_devices in 7bcb8164ad94 ("btrfs: use device_list_mutex when removing stale devices") fs_devices are freed after they have been iterated by the inner list_for_each so the use-after-free fixed by introducing the break in fd649f10c3d2 ("btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device") is no longer necessary. Just remove it altogether. No functional changes. Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 44cab9ba374a0341e12c024f43a83e12ec4978fd Author: Nikolay Borisov Date: Wed Jul 22 11:09:23 2020 +0300 btrfs: refactor locked condition in btrfs_init_new_device Invert unlocked to locked and exploit the fact it can only ever be modified if we are adding a new device to a seed filesystem. This allows to simplify the check in error: label. No semantics changes. Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit f4cfa9bdd40c038ac901fbf3c57ab63e9e8eb949 Author: Nikolay Borisov Date: Wed Jul 22 11:09:22 2020 +0300 btrfs: use RCU for quick device check in btrfs_init_new_device When adding a new device there's a mandatory check to see if a device is being duplicated to the filesystem it's added to. Since this is a read-only operations not necessary to take device_list_mutex and can simply make do with an rcu-readlock. Using just RCU is safe because there won't be another device add delete running in parallel as btrfs_init_new_device is called only from btrfs_ioctl_add_dev. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit d16c702fe4f274bd77b47d3ab737eadcf24e0b93 Author: Qu Wenruo Date: Wed Aug 19 14:35:50 2020 +0800 btrfs: ctree: check key order before merging tree blocks [BUG] With a crafted image, btrfs can panic at btrfs_del_csums(): kernel BUG at fs/btrfs/ctree.c:3188! invalid opcode: 0000 [#1] SMP PTI CPU: 0 PID: 1156 Comm: btrfs-transacti Not tainted 5.0.0-rc8+ #9 RIP: 0010:btrfs_set_item_key_safe+0x16c/0x180 RSP: 0018:ffff976141257ab8 EFLAGS: 00010202 RAX: 0000000000000001 RBX: ffff898a6b890930 RCX: 0000000004b70000 RDX: 0000000000000000 RSI: ffff976141257bae RDI: ffff976141257acf RBP: ffff976141257b10 R08: 0000000000001000 R09: ffff9761412579a8 R10: 0000000000000000 R11: 0000000000000000 R12: ffff976141257abe R13: 0000000000000003 R14: ffff898a6a8be578 R15: ffff976141257bae FS: 0000000000000000(0000) GS:ffff898a77a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f779d9cd624 CR3: 000000022b2b4006 CR4: 00000000000206f0 Call Trace: truncate_one_csum+0xac/0xf0 btrfs_del_csums+0x24f/0x3a0 __btrfs_free_extent.isra.72+0x5a7/0xbe0 __btrfs_run_delayed_refs+0x539/0x1120 btrfs_run_delayed_refs+0xdb/0x1b0 btrfs_commit_transaction+0x52/0x950 ? start_transaction+0x94/0x450 transaction_kthread+0x163/0x190 kthread+0x105/0x140 ? btrfs_cleanup_transaction+0x560/0x560 ? kthread_destroy_worker+0x50/0x50 ret_from_fork+0x35/0x40 Modules linked in: ---[ end trace 93bf9db00e6c374e ]--- [CAUSE] This crafted image has a tricky key order corruption: checksum tree key (CSUM_TREE ROOT_ITEM 0) node 29741056 level 1 items 14 free 107 generation 19 owner CSUM_TREE ... key (EXTENT_CSUM EXTENT_CSUM 73785344) block 29757440 gen 19 key (EXTENT_CSUM EXTENT_CSUM 77594624) block 29753344 gen 19 ... leaf 29757440 items 5 free space 150 generation 19 owner CSUM_TREE item 0 key (EXTENT_CSUM EXTENT_CSUM 73785344) itemoff 2323 itemsize 1672 range start 73785344 end 75497472 length 1712128 item 1 key (EXTENT_CSUM EXTENT_CSUM 75497472) itemoff 2319 itemsize 4 range start 75497472 end 75501568 length 4096 item 2 key (EXTENT_CSUM EXTENT_CSUM 75501568) itemoff 579 itemsize 1740 range start 75501568 end 77283328 length 1781760 item 3 key (EXTENT_CSUM EXTENT_CSUM 77283328) itemoff 575 itemsize 4 range start 77283328 end 77287424 length 4096 item 4 key (EXTENT_CSUM EXTENT_CSUM 4120596480) itemoff 275 itemsize 300 <<< range start 4120596480 end 4120903680 length 307200 leaf 29753344 items 3 free space 1936 generation 19 owner CSUM_TREE item 0 key (18446744073457893366 EXTENT_CSUM 77594624) itemoff 2323 itemsize 1672 range start 77594624 end 79306752 length 1712128 ... Note the item 4 key of leaf 29757440, which is obviously too large, and even larger than the first key of the next leaf. However it still follows the key order in that tree block, thus tree checker is unable to detect it at read time, since tree checker can only work inside one leaf, thus such complex corruption can't be detected in advance. [FIX] The next time to detect such problem is at tree block merge time, which is in push_node_left(), balance_node_right(), push_leaf_left() or push_leaf_right(). Now we check if the key order of the right-most key of the left node is larger than the left-most key of the right node. By this we don't need to call the full tree-checker, while still keeping the key order correct as key order in each node is already checked by tree checker thus we only need to check the above two slots. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202833 Reviewed-by: Nikolay Borisov Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 07cce5cf3b489419aa8e87f48a55f4e190a30876 Author: Qu Wenruo Date: Wed Aug 19 14:35:49 2020 +0800 btrfs: extent-tree: kill the BUG_ON() in insert_inline_extent_backref() [BUG] With a crafted image, btrfs can panic at insert_inline_extent_backref(): kernel BUG at fs/btrfs/extent-tree.c:1857! invalid opcode: 0000 [#1] SMP PTI CPU: 0 PID: 1117 Comm: btrfs-transacti Not tainted 5.0.0-rc8+ #9 RIP: 0010:insert_inline_extent_backref+0xcc/0xe0 RSP: 0018:ffffac4dc1287be8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000007 RCX: 0000000000000001 RDX: 0000000000001000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffac4dc1287c28 R08: ffffac4dc1287ab8 R09: ffffac4dc1287ac0 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff8febef88a540 R14: ffff8febeaa7bc30 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8febf7a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f663ace94c0 CR3: 0000000235698006 CR4: 00000000000206f0 Call Trace: ? _cond_resched+0x1a/0x50 __btrfs_inc_extent_ref.isra.64+0x7e/0x240 ? btrfs_merge_delayed_refs+0xa5/0x330 __btrfs_run_delayed_refs+0x653/0x1120 btrfs_run_delayed_refs+0xdb/0x1b0 btrfs_commit_transaction+0x52/0x950 ? start_transaction+0x94/0x450 transaction_kthread+0x163/0x190 kthread+0x105/0x140 ? btrfs_cleanup_transaction+0x560/0x560 ? kthread_destroy_worker+0x50/0x50 ret_from_fork+0x35/0x40 Modules linked in: ---[ end trace 2ad8b3de903cf825 ]--- [CAUSE] Due to extent tree corruption (still valid by itself, but bad cross ref), we can allocate an extent which is still in extent tree. The offending tree block of that case is from csum tree. The newly allocated tree block is also for csum tree. Then we will try to insert a tree block ref for the existing tree block ref. For a tree extent item, tree block can never be shared directly by the same tree twice. We have such BUG_ON() to prevent such problem, but this is not a proper error handling. [FIX] Replace that BUG_ON() with proper error message and leaf dump for debug build. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202829 Reviewed-by: Nikolay Borisov Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 1c2a07f598d526e39acbf1837b8d521fc0dab9c5 Author: Qu Wenruo Date: Wed Aug 19 14:35:48 2020 +0800 btrfs: extent-tree: kill BUG_ON() in __btrfs_free_extent() __btrfs_free_extent() is doing two things: 1. Reduce the refs number of an extent backref Either it's an inline extent backref (inside EXTENT/METADATA item) or a keyed extent backref (SHARED_* item). We only need to locate that backref line, either reduce the number or remove the backref line completely. 2. Update the refs count in EXTENT/METADATA_ITEM During step 1), we will try to locate the EXTENT/METADATA_ITEM without triggering another btrfs_search_slot() as fast path. Only when we fail to locate that item, we will trigger another btrfs_search_slot() to get that EXTENT/METADATA_ITEM after we updated/deleted the backref line. And we have a lot of strict checks on things like refs_to_drop against extent refs and special case checks for single ref extents. There are 7 BUG_ON()s, although they're doing correct checks, they can be triggered by crafted images. This patch improves the function: - Introduce two examples to show what __btrfs_free_extent() is doing One inline backref case and one keyed case. Should cover most cases. - Kill all BUG_ON()s with proper error message and optional leaf dump - Add comment to show the overall flow Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202819 [ The report triggers one BUG_ON() in __btrfs_free_extent() ] Reviewed-by: Nikolay Borisov Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit f98b6215d7d1cda6ac552b7bc58a6ad092aa517c Author: Qu Wenruo Date: Wed Aug 19 14:35:47 2020 +0800 btrfs: extent_io: do extra check for extent buffer read write functions Although we have start, len check for extent buffer reader/write (e.g. read_extent_buffer()), these checks have limitations: - No overflow check Values like start = 1024 len = -1024 can still pass the basic (start + len) > eb->len check. - Checks are not consistent For read_extent_buffer() we only check (start + len) against eb->len. While for memcmp_extent_buffer() we also check start against eb->len. - Different error reporting mechanism We use WARN() in read_extent_buffer() but BUG() in memcpy_extent_buffer(). - Still modify memory if the request is obviously wrong In read_extent_buffer() even we find (start + len) > eb->len, we still call memset(dst, 0, len), which can easily cause memory access error if start + len overflows. To address above problems, this patch creates a new common function to check such access, check_eb_range(). - Add overflow check This function checks start, start + len against eb->len and overflow check. - Unified checks - Unified error reports Will call WARN() if CONFIG_BTRFS_DEBUG is configured. And also do btrfs_warn() message for non-debug build. - Exit ASAP if check fails No more possible memory corruption. - Add extra comment for @start @len used in those functions as it's sometimes confused with the logical addressing instead of a range inside the eb space Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202817 [ Inspired by above report, the report itself is already addressed ] Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba [ use check_add_overflow ] Signed-off-by: David Sterba commit 217f5004fee678bf238fbbc7e7a01c55df92e732 Author: Nikolay Borisov Date: Wed Aug 12 16:16:35 2020 +0300 btrfs: rework error detection in init_tree_roots To avoid duplicating 3 lines of code the error detection logic in init_tree_roots is somewhat quirky. It first checks for the presence of any error condition, then checks for the specific condition to perform any specific actions. That's spurious because directly checking for each respective error condition and doing the necessary steps is more obvious. While at it change the -EUCLEAN to -EIO in case the extent buffer is not read correctly, this is in line with other sites which return -EIO when the eb couldn't be read. Additionally it results in smaller code and the code reads more linearly: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-95 (-95) Function old new delta open_ctree 17243 17148 -95 Total: Before=113104, After=113009, chg -0.08% Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit e85fde5162bf1b242cbd6daf7dba0f9b457d592b Author: Qu Wenruo Date: Fri Jul 24 14:46:10 2020 +0800 btrfs: qgroup: fix qgroup meta rsv leak for subvolume operations [BUG] When quota is enabled for TEST_DEV, generic/013 sometimes fails like this: generic/013 14s ... _check_dmesg: something found in dmesg (see xfstests-dev/results//generic/013.dmesg) And with the following metadata leak: BTRFS warning (device dm-3): qgroup 0/1370 has unreleased space, type 2 rsv 49152 ------------[ cut here ]------------ WARNING: CPU: 2 PID: 47912 at fs/btrfs/disk-io.c:4078 close_ctree+0x1dc/0x323 [btrfs] Call Trace: btrfs_put_super+0x15/0x17 [btrfs] generic_shutdown_super+0x72/0x110 kill_anon_super+0x18/0x30 btrfs_kill_super+0x17/0x30 [btrfs] deactivate_locked_super+0x3b/0xa0 deactivate_super+0x40/0x50 cleanup_mnt+0x135/0x190 __cleanup_mnt+0x12/0x20 task_work_run+0x64/0xb0 __prepare_exit_to_usermode+0x1bc/0x1c0 __syscall_return_slowpath+0x47/0x230 do_syscall_64+0x64/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ---[ end trace a6cfd45ba80e4e06 ]--- BTRFS error (device dm-3): qgroup reserved space leaked BTRFS info (device dm-3): disk space caching is enabled BTRFS info (device dm-3): has skinny extents [CAUSE] The qgroup preallocated meta rsv operations of that offending root are: btrfs_delayed_inode_reserve_metadata: rsv_meta_prealloc root=1370 num_bytes=131072 btrfs_delayed_inode_reserve_metadata: rsv_meta_prealloc root=1370 num_bytes=131072 btrfs_subvolume_reserve_metadata: rsv_meta_prealloc root=1370 num_bytes=49152 btrfs_delayed_inode_release_metadata: convert_meta_prealloc root=1370 num_bytes=-131072 btrfs_delayed_inode_release_metadata: convert_meta_prealloc root=1370 num_bytes=-131072 It's pretty obvious that, we reserve qgroup meta rsv in btrfs_subvolume_reserve_metadata(), but doesn't have corresponding release/convert calls in btrfs_subvolume_release_metadata(). This leads to the leakage. [FIX] To fix this bug, we should follow what we're doing in btrfs_delalloc_reserve_metadata(), where we reserve qgroup space, and add it to block_rsv->qgroup_rsv_reserved. And free the qgroup reserved metadata space when releasing the block_rsv. To do this, we need to change the btrfs_subvolume_release_metadata() to accept btrfs_root, and record the qgroup_to_release number, and call btrfs_qgroup_convert_reserved_meta() for it. Fixes: 733e03a0b26a ("btrfs: qgroup: Split meta rsv type into meta_prealloc and meta_pertrans") CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit b4c5d8fdfff3e2b6c4fa4a5043e8946dff500f8c Author: Qu Wenruo Date: Fri Jul 24 14:46:09 2020 +0800 btrfs: qgroup: fix wrong qgroup metadata reserve for delayed inode For delayed inode facility, qgroup metadata is reserved for it, and later freed. However we're freeing more bytes than we reserved. In btrfs_delayed_inode_reserve_metadata(): num_bytes = btrfs_calc_metadata_size(fs_info, 1); ... ret = btrfs_qgroup_reserve_meta_prealloc(root, fs_info->nodesize, true); ... if (!ret) { node->bytes_reserved = num_bytes; But in btrfs_delayed_inode_release_metadata(): if (qgroup_free) btrfs_qgroup_free_meta_prealloc(node->root, node->bytes_reserved); else btrfs_qgroup_convert_reserved_meta(node->root, node->bytes_reserved); This means, we're always releasing more qgroup metadata rsv than we have reserved. This won't trigger selftest warning, as btrfs qgroup metadata rsv has extra protection against cases like quota enabled half-way. But we still need to fix this problem any way. This patch will use the same num_bytes for qgroup metadata rsv so we could handle it correctly. Fixes: f218ea6c4792 ("btrfs: delayed-inode: Remove wrong qgroup meta reservation calls") CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 425c6ed6486f1e2ed892eadb94fd4829c299493e Author: Josef Bacik Date: Mon Aug 10 11:42:28 2020 -0400 btrfs: do not hold device_list_mutex when closing devices The following lockdep splat ====================================================== WARNING: possible circular locking dependency detected 5.8.0-rc7-00169-g87212851a027-dirty #929 Not tainted ------------------------------------------------------ fsstress/8739 is trying to acquire lock: ffff88bfd0eb0c90 (&fs_info->reloc_mutex){+.+.}-{3:3}, at: btrfs_record_root_in_trans+0x43/0x70 but task is already holding lock: ffff88bfbd16e538 (sb_pagefaults){.+.+}-{0:0}, at: btrfs_page_mkwrite+0x6a/0x4a0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #10 (sb_pagefaults){.+.+}-{0:0}: __sb_start_write+0x129/0x210 btrfs_page_mkwrite+0x6a/0x4a0 do_page_mkwrite+0x4d/0xc0 handle_mm_fault+0x103c/0x1730 exc_page_fault+0x340/0x660 asm_exc_page_fault+0x1e/0x30 -> #9 (&mm->mmap_lock#2){++++}-{3:3}: __might_fault+0x68/0x90 _copy_to_user+0x1e/0x80 perf_read+0x141/0x2c0 vfs_read+0xad/0x1b0 ksys_read+0x5f/0xe0 do_syscall_64+0x50/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #8 (&cpuctx_mutex){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 perf_event_init_cpu+0x88/0x150 perf_event_init+0x1db/0x20b start_kernel+0x3ae/0x53c secondary_startup_64+0xa4/0xb0 -> #7 (pmus_lock){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 perf_event_init_cpu+0x4f/0x150 cpuhp_invoke_callback+0xb1/0x900 _cpu_up.constprop.26+0x9f/0x130 cpu_up+0x7b/0xc0 bringup_nonboot_cpus+0x4f/0x60 smp_init+0x26/0x71 kernel_init_freeable+0x110/0x258 kernel_init+0xa/0x103 ret_from_fork+0x1f/0x30 -> #6 (cpu_hotplug_lock){++++}-{0:0}: cpus_read_lock+0x39/0xb0 kmem_cache_create_usercopy+0x28/0x230 kmem_cache_create+0x12/0x20 bioset_init+0x15e/0x2b0 init_bio+0xa3/0xaa do_one_initcall+0x5a/0x2e0 kernel_init_freeable+0x1f4/0x258 kernel_init+0xa/0x103 ret_from_fork+0x1f/0x30 -> #5 (bio_slab_lock){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 bioset_init+0xbc/0x2b0 __blk_alloc_queue+0x6f/0x2d0 blk_mq_init_queue_data+0x1b/0x70 loop_add+0x110/0x290 [loop] fq_codel_tcf_block+0x12/0x20 [sch_fq_codel] do_one_initcall+0x5a/0x2e0 do_init_module+0x5a/0x220 load_module+0x2459/0x26e0 __do_sys_finit_module+0xba/0xe0 do_syscall_64+0x50/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #4 (loop_ctl_mutex){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 lo_open+0x18/0x50 [loop] __blkdev_get+0xec/0x570 blkdev_get+0xe8/0x150 do_dentry_open+0x167/0x410 path_openat+0x7c9/0xa80 do_filp_open+0x93/0x100 do_sys_openat2+0x22a/0x2e0 do_sys_open+0x4b/0x80 do_syscall_64+0x50/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #3 (&bdev->bd_mutex){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 blkdev_put+0x1d/0x120 close_fs_devices.part.31+0x84/0x130 btrfs_close_devices+0x44/0xb0 close_ctree+0x296/0x2b2 generic_shutdown_super+0x69/0x100 kill_anon_super+0xe/0x30 btrfs_kill_super+0x12/0x20 deactivate_locked_super+0x29/0x60 cleanup_mnt+0xb8/0x140 task_work_run+0x6d/0xb0 __prepare_exit_to_usermode+0x1cc/0x1e0 do_syscall_64+0x5c/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #2 (&fs_devs->device_list_mutex){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 btrfs_run_dev_stats+0x49/0x480 commit_cowonly_roots+0xb5/0x2a0 btrfs_commit_transaction+0x516/0xa60 sync_filesystem+0x6b/0x90 generic_shutdown_super+0x22/0x100 kill_anon_super+0xe/0x30 btrfs_kill_super+0x12/0x20 deactivate_locked_super+0x29/0x60 cleanup_mnt+0xb8/0x140 task_work_run+0x6d/0xb0 __prepare_exit_to_usermode+0x1cc/0x1e0 do_syscall_64+0x5c/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&fs_info->tree_log_mutex){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 btrfs_commit_transaction+0x4bb/0xa60 sync_filesystem+0x6b/0x90 generic_shutdown_super+0x22/0x100 kill_anon_super+0xe/0x30 btrfs_kill_super+0x12/0x20 deactivate_locked_super+0x29/0x60 cleanup_mnt+0xb8/0x140 task_work_run+0x6d/0xb0 __prepare_exit_to_usermode+0x1cc/0x1e0 do_syscall_64+0x5c/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&fs_info->reloc_mutex){+.+.}-{3:3}: __lock_acquire+0x1272/0x2310 lock_acquire+0x9e/0x360 __mutex_lock+0x9f/0x930 btrfs_record_root_in_trans+0x43/0x70 start_transaction+0xd1/0x5d0 btrfs_dirty_inode+0x42/0xd0 file_update_time+0xc8/0x110 btrfs_page_mkwrite+0x10c/0x4a0 do_page_mkwrite+0x4d/0xc0 handle_mm_fault+0x103c/0x1730 exc_page_fault+0x340/0x660 asm_exc_page_fault+0x1e/0x30 other info that might help us debug this: Chain exists of: &fs_info->reloc_mutex --> &mm->mmap_lock#2 --> sb_pagefaults Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_pagefaults); lock(&mm->mmap_lock#2); lock(sb_pagefaults); lock(&fs_info->reloc_mutex); *** DEADLOCK *** 3 locks held by fsstress/8739: #0: ffff88bee66eeb68 (&mm->mmap_lock#2){++++}-{3:3}, at: exc_page_fault+0x173/0x660 #1: ffff88bfbd16e538 (sb_pagefaults){.+.+}-{0:0}, at: btrfs_page_mkwrite+0x6a/0x4a0 #2: ffff88bfbd16e630 (sb_internal){.+.+}-{0:0}, at: start_transaction+0x3da/0x5d0 stack backtrace: CPU: 17 PID: 8739 Comm: fsstress Kdump: loaded Not tainted 5.8.0-rc7-00169-g87212851a027-dirty #929 Hardware name: Quanta Tioga Pass Single Side 01-0030993006/Tioga Pass Single Side, BIOS F08_3A18 12/20/2018 Call Trace: dump_stack+0x78/0xa0 check_noncircular+0x165/0x180 __lock_acquire+0x1272/0x2310 ? btrfs_get_alloc_profile+0x150/0x210 lock_acquire+0x9e/0x360 ? btrfs_record_root_in_trans+0x43/0x70 __mutex_lock+0x9f/0x930 ? btrfs_record_root_in_trans+0x43/0x70 ? lock_acquire+0x9e/0x360 ? join_transaction+0x5d/0x450 ? find_held_lock+0x2d/0x90 ? btrfs_record_root_in_trans+0x43/0x70 ? join_transaction+0x3d5/0x450 ? btrfs_record_root_in_trans+0x43/0x70 btrfs_record_root_in_trans+0x43/0x70 start_transaction+0xd1/0x5d0 btrfs_dirty_inode+0x42/0xd0 file_update_time+0xc8/0x110 btrfs_page_mkwrite+0x10c/0x4a0 ? handle_mm_fault+0x5e/0x1730 do_page_mkwrite+0x4d/0xc0 ? __do_fault+0x32/0x150 handle_mm_fault+0x103c/0x1730 exc_page_fault+0x340/0x660 ? asm_exc_page_fault+0x8/0x30 asm_exc_page_fault+0x1e/0x30 RIP: 0033:0x7faa6c9969c4 Was seen in testing. The fix is similar to that of btrfs: open device without device_list_mutex where we're holding the device_list_mutex and then grab the bd_mutex, which pulls in a bunch of dependencies under the bd_mutex. We only ever call btrfs_close_devices() on mount failure or unmount, so we're save to not have the device_list_mutex here. We're already holding the uuid_mutex which keeps us safe from any external modification of the fs_devices. Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 62cf5391209ac7b258a82316c4d703342863fd37 Author: Josef Bacik Date: Thu Aug 20 11:18:27 2020 -0400 btrfs: move btrfs_rm_dev_replace_free_srcdev outside of all locks When closing and freeing the source device we could end up doing our final blkdev_put() on the bdev, which will grab the bd_mutex. As such we want to be holding as few locks as possible, so move this call outside of the dev_replace->lock_finishing_cancel_unmount lock. Since we're modifying the fs_devices we need to make sure we're holding the uuid_mutex here, so take that as well. Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 68abf360160ca085bb5109d35692ea0f9581f8d1 Author: Nikolay Borisov Date: Wed Aug 12 16:26:46 2020 +0300 btrfs: remove alloc_list splice in btrfs_prepare_sprout btrfs_prepare_sprout is called when the first rw device is added to a seed filesystem. This means the filesystem can't have its alloc_list be non-empty, since seed filesystems are read only. Simply remove the code altogether. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 427c8fddb1296dd013d8af5a4957d9d88fb8ab4e Author: Nikolay Borisov Date: Wed Aug 12 17:04:36 2020 +0300 btrfs: document some invariants of seed code Without good understanding of how seed devices works it's hard to grok some of what the code in open_seed_devices or btrfs_prepare_sprout does. Add comments hopefully reducing some of the cognitive load. Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 944d3f9fac61e24e13a056b25974df3831994f29 Author: Nikolay Borisov Date: Thu Jul 16 10:25:33 2020 +0300 btrfs: switch seed device to list api While this patch touches a bunch of files the conversion is straighforward. Instead of using the implicit linked list anchored at btrfs_fs_devices::seed the code is switched to using list_for_each_entry. Previous patches in the series already factored out code that processed both main and seed devices so in those cases the factored out functions are called on the main fs_devices and then on every seed dev inside list_for_each_entry. Using list api also allows to simplify deletion from the seed dev list performed in btrfs_rm_device and btrfs_rm_dev_replace_free_srcdev by substituting a while() loop with a simple list_del_init. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit c4989c2fd0eba6e164e9a29c4a865e57dd644451 Author: Nikolay Borisov Date: Wed Jul 15 13:48:49 2020 +0300 btrfs: simplify setting/clearing fs_info to btrfs_fs_devices It makes no sense to have sysfs-related routines be responsible for properly initialising the fs_info pointer of struct btrfs_fs_device. Instead this can be streamlined by making it the responsibility of btrfs_init_devices_late to initialize it. That function already initializes fs_info of every individual device in btrfs_fs_devices. As far as clearing it is concerned it makes sense to move it to close_fs_devices. That function is only called when struct btrfs_fs_devices is no longer in use - either for holding seeds or main devices for a mounted filesystem. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 54eed6ae8d8e9df81202da64f0817d8e40d5db0e Author: Nikolay Borisov Date: Wed Jul 15 13:48:48 2020 +0300 btrfs: make close_fs_devices return void The return value of this function conveys absolutely no information. All callers already check the state of fs_devices->opened to decide how to proceed. So convert the function to returning void. While at it make btrfs_close_devices also return void. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3712ccb7f1cccd9371efdaaac4775aa79bdf5f40 Author: Nikolay Borisov Date: Thu Jul 16 10:17:04 2020 +0300 btrfs: factor out loop logic from btrfs_free_extra_devids This prepares the code to switching seeds devices to a proper list. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit dc0ab488d2cb514e08276cbbc846b2ebb6056c2a Author: Nikolay Borisov Date: Wed Jul 15 13:48:46 2020 +0300 btrfs: factor out reada loop in __reada_start_machine This is in preparation for moving fs_devices to proper lists. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 1028d1c48b95c37336bed24a1dc1594e70aa67c6 Author: Nikolay Borisov Date: Mon Aug 3 12:58:46 2020 +0300 btrfs: remove err variable from btrfs_get_extent There's no practical reason too use 'err' as a variable to convey errors. In fact it's value is either set explicitly in the beginning of the function or it simply takes the value of 'ret'. Not conforming to the usual pattern of having ret be the only variable used to convey errors makes the code more error prone to bugs. In fact one such bug was introduced by 6bf9e4bd6a27 ("btrfs: inode: Verify inode mode toi avoid NULL pointer dereference") by assigning the error value to 'ret' and not 'err'. Let's fix that issue and make the function less tricky by leaving only ret to convey error values. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0eb79294dbe328debae67961df28113141825d7b Author: Josef Bacik Date: Thu Sep 3 11:16:51 2020 -0400 btrfs: dio iomap DSYNC workaround iomap dio will run generic_write_sync() for us if the iocb is DSYNC. This is problematic for us because of 2 reasons: 1. we hold the inode_lock() during this operation, and we take it in generic_write_sync() 2. we hold a read lock on the dio_sem but take the write lock in fsync Since we don't want to rip out this code right now, but reworking the locking is a bit much to do at this point, work around this problem with this masterpiece of a patch. First, we clear DSYNC on the iocb so that the iomap stuff doesn't know that it needs to handle the sync. We save this fact in current->journal_info, because we need to see do special things once we're in iomap_begin, and we have no way to pass private information into iomap_dio_rw(). Next we specify a separate iomap_dio_ops for sync, which implements an ->end_io() callback that gets called when the dio completes. This is important for AIO, because we really do need to run generic_write_sync() if we complete asynchronously. However if we're still in the submitting context when we enter ->end_io() we clear the flag so that the submitter knows they're the ones that needs to run generic_write_sync(). This is meant to be temporary. We need to work out how to eliminate the inode_lock() and the dio_sem in our fsync and use another mechanism to protect these operations. Tested-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit f85781fb505ec02891734e77f7c69a9c85c99ec3 Author: Goldwyn Rodrigues Date: Mon Aug 17 11:18:21 2020 -0500 btrfs: switch to iomap for direct IO We're using direct io implementation based on buffer heads. This patch switches to the new iomap infrastructure. Switch from __blockdev_direct_IO() to iomap_dio_rw(). Rename btrfs_get_blocks_direct() to btrfs_dio_iomap_begin() and use it as iomap_begin() for iomap direct I/O functions. This function allocates and locks all the blocks required for the I/O. btrfs_submit_direct() is used as the submit_io() hook for direct I/O ops. Since we need direct I/O reads to go through iomap_dio_rw(), we change file_operations.read_iter() to a btrfs_file_read_iter() which calls btrfs_direct_IO() for direct reads and falls back to generic_file_buffered_read() for incomplete reads and buffered reads. We don't need address_space.direct_IO() anymore: set it to noop. Similarly, we don't need flags used in __blockdev_direct_IO(). iomap is capable of direct I/O reads from a hole, so we don't need to return -ENOENT. Btrfs direct I/O is now done under i_rwsem, shared in case of reads and exclusive in case of writes. This guards against simultaneous truncates. Use iomap->iomap_end() to check for failed or incomplete direct I/O: - for writes, call __endio_write_update_ordered() - for reads, unlock extents btrfs_dio_data is now hooked in iomap->private and not current->journal_info. It carries the reservation variable and the amount of data submitted, so we can calculate the amount of data to call __endio_write_update_ordered in case of an error. This patch removes last use of struct buffer_head from btrfs. Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit 154f7cb86809a3a796bffbc7a5a7ce0dee585eaa Author: Qu Wenruo Date: Thu Aug 20 15:42:46 2020 +0800 btrfs: add owner and fs_info to alloc_state io_tree Commit 1c11b63eff2a ("btrfs: replace pending/pinned chunks lists with io tree") introduced btrfs_device::alloc_state extent io tree, but it doesn't initialize the fs_info and owner member. This means the following features are not properly supported: - Fs owner report for insert_state() error Without fs_info initialized, although btrfs_err() won't panic, it won't output which fs is causing the error. - Wrong owner for trace events alloc_state will get the owner as pinned extents. Fix this by assiging proper fs_info and owner for btrfs_device::alloc_state. Fixes: 1c11b63eff2a ("btrfs: replace pending/pinned chunks lists with io tree") Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4c448ce8b48fb65536c903f1ed8a80554838508e Author: Marcos Paulo de Souza Date: Mon Aug 17 10:56:10 2020 -0300 btrfs: make read_block_group_item return void Since it's inclusion on 9afc66498a0b ("btrfs: block-group: refactor how we read one block group item") this function always returned 0, so there is no need to check for the returned value. Reviewed-by: Nikolay Borisov Signed-off-by: Marcos Paulo de Souza Reviewed-by: David Sterba Signed-off-by: David Sterba commit 24646481fb19a3bd86933ec30480454381ff9860 Author: Leon Romanovsky Date: Wed Aug 19 17:16:28 2020 +0300 btrfs: sysfs: fix unused-but-set-variable warnings The compilation with W=1 generates the following warnings: fs/btrfs/sysfs.c:1630:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] 1630 | int ret; | ^~~ fs/btrfs/sysfs.c:1629:6: warning: variable 'features' set but not used [-Wunused-but-set-variable] 1629 | u64 features; | ^~~~~~~~ [ The unused variables are leftover from e410e34fad91 ("Revert "btrfs: synchronize incompat feature bits with sysfs files""), which needs to be properly fixed by moving feature bit manipulation from the sysfs context. Silence the warning to save pepople time, we got several reports. ] Signed-off-by: Leon Romanovsky Reviewed-by: David Sterba Signed-off-by: David Sterba commit 487781796d302266aff993bee17d4e1ddd73445b Author: Filipe Manana Date: Tue Aug 11 12:43:58 2020 +0100 btrfs: make fast fsyncs wait only for writeback Currently regardless of a full or a fast fsync we always wait for ordered extents to complete, and then start logging the inode after that. However for fast fsyncs we can just wait for the writeback to complete, we don't need to wait for the ordered extents to complete since we use the list of modified extents maps to figure out which extents we must log and we can get their checksums directly from the ordered extents that are still in flight, otherwise look them up from the checksums tree. Until commit b5e6c3e170b770 ("btrfs: always wait on ordered extents at fsync time"), for fast fsyncs, we used to start logging without even waiting for the writeback to complete first, we would wait for it to complete after logging, while holding a transaction open, which lead to performance issues when using cgroups and probably for other cases too, as wait for IO while holding a transaction handle should be avoided as much as possible. After that, for fast fsyncs, we started to wait for ordered extents to complete before starting to log, which adds some latency to fsyncs and we even got at least one report about a performance drop which bisected to that particular change: https://lore.kernel.org/linux-btrfs/20181109215148.GF23260@techsingularity.net/ This change makes fast fsyncs only wait for writeback to finish before starting to log the inode, instead of waiting for both the writeback to finish and for the ordered extents to complete. This brings back part of the logic we had that extracts checksums from in flight ordered extents, which are not yet in the checksums tree, and making sure transaction commits wait for the completion of ordered extents previously logged (by far most of the time they have already completed by the time a transaction commit starts, resulting in no wait at all), to avoid any data loss if an ordered extent completes after the transaction used to log an inode is committed, followed by a power failure. When there are no other tasks accessing the checksums and the subvolume btrees, the ordered extent completion is pretty fast, typically taking 100 to 200 microseconds only in my observations. However when there are other tasks accessing these btrees, ordered extent completion can take a lot more time due to lock contention on nodes and leaves of these btrees. I've seen cases over 2 milliseconds, which starts to be significant. In particular when we do have concurrent fsyncs against different files there is a lot of contention on the checksums btree, since we have many tasks writing the checksums into the btree and other tasks that already started the logging phase are doing lookups for checksums in the btree. This change also turns all ranged fsyncs into full ranged fsyncs, which is something we already did when not using the NO_HOLES features or when doing a full fsync. This is to guarantee we never miss checksums due to writeback having been triggered only for a part of an extent, and we end up logging the full extent but only checksums for the written range, which results in missing checksums after log replay. Allowing ranged fsyncs to operate again only in the original range, when using the NO_HOLES feature and doing a fast fsync is doable but requires some non trivial changes to the writeback path, which can always be worked on later if needed, but I don't think they are a very common use case. Several tests were performed using fio for different numbers of concurrent jobs, each writing and fsyncing its own file, for both sequential and random file writes. The tests were run on bare metal, no virtualization, on a box with 12 cores (Intel i7-8700), 64Gb of RAM and a NVMe device, with a kernel configuration that is the default of typical distributions (debian in this case), without debug options enabled (kasan, kmemleak, slub debug, debug of page allocations, lock debugging, etc). The following script that calls fio was used: $ cat test-fsync.sh #!/bin/bash DEV=/dev/nvme0n1 MNT=/mnt/btrfs MOUNT_OPTIONS="-o ssd -o space_cache=v2" MKFS_OPTIONS="-d single -m single" if [ $# -ne 5 ]; then echo "Use $0 NUM_JOBS FILE_SIZE FSYNC_FREQ BLOCK_SIZE [write|randwrite]" exit 1 fi NUM_JOBS=$1 FILE_SIZE=$2 FSYNC_FREQ=$3 BLOCK_SIZE=$4 WRITE_MODE=$5 if [ "$WRITE_MODE" != "write" ] && [ "$WRITE_MODE" != "randwrite" ]; then echo "Invalid WRITE_MODE, must be 'write' or 'randwrite'" exit 1 fi cat < /tmp/fio-job.ini [writers] rw=$WRITE_MODE fsync=$FSYNC_FREQ fallocate=none group_reporting=1 direct=0 bs=$BLOCK_SIZE ioengine=sync size=$FILE_SIZE directory=$MNT numjobs=$NUM_JOBS EOF echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor echo echo "Using config:" echo cat /tmp/fio-job.ini echo umount $MNT &> /dev/null mkfs.btrfs -f $MKFS_OPTIONS $DEV mount $MOUNT_OPTIONS $DEV $MNT fio /tmp/fio-job.ini umount $MNT The results were the following: ************************* *** sequential writes *** ************************* ==== 1 job, 8GiB file, fsync frequency 1, block size 64KiB ==== Before patch: WRITE: bw=36.6MiB/s (38.4MB/s), 36.6MiB/s-36.6MiB/s (38.4MB/s-38.4MB/s), io=8192MiB (8590MB), run=223689-223689msec After patch: WRITE: bw=40.2MiB/s (42.1MB/s), 40.2MiB/s-40.2MiB/s (42.1MB/s-42.1MB/s), io=8192MiB (8590MB), run=203980-203980msec (+9.8%, -8.8% runtime) ==== 2 jobs, 4GiB files, fsync frequency 1, block size 64KiB ==== Before patch: WRITE: bw=35.8MiB/s (37.5MB/s), 35.8MiB/s-35.8MiB/s (37.5MB/s-37.5MB/s), io=8192MiB (8590MB), run=228950-228950msec After patch: WRITE: bw=43.5MiB/s (45.6MB/s), 43.5MiB/s-43.5MiB/s (45.6MB/s-45.6MB/s), io=8192MiB (8590MB), run=188272-188272msec (+21.5% throughput, -17.8% runtime) ==== 4 jobs, 2GiB files, fsync frequency 1, block size 64KiB ==== Before patch: WRITE: bw=50.1MiB/s (52.6MB/s), 50.1MiB/s-50.1MiB/s (52.6MB/s-52.6MB/s), io=8192MiB (8590MB), run=163446-163446msec After patch: WRITE: bw=64.5MiB/s (67.6MB/s), 64.5MiB/s-64.5MiB/s (67.6MB/s-67.6MB/s), io=8192MiB (8590MB), run=126987-126987msec (+28.7% throughput, -22.3% runtime) ==== 8 jobs, 1GiB files, fsync frequency 1, block size 64KiB ==== Before patch: WRITE: bw=64.0MiB/s (68.1MB/s), 64.0MiB/s-64.0MiB/s (68.1MB/s-68.1MB/s), io=8192MiB (8590MB), run=126075-126075msec After patch: WRITE: bw=86.8MiB/s (91.0MB/s), 86.8MiB/s-86.8MiB/s (91.0MB/s-91.0MB/s), io=8192MiB (8590MB), run=94358-94358msec (+35.6% throughput, -25.2% runtime) ==== 16 jobs, 512MiB files, fsync frequency 1, block size 64KiB ==== Before patch: WRITE: bw=79.8MiB/s (83.6MB/s), 79.8MiB/s-79.8MiB/s (83.6MB/s-83.6MB/s), io=8192MiB (8590MB), run=102694-102694msec After patch: WRITE: bw=107MiB/s (112MB/s), 107MiB/s-107MiB/s (112MB/s-112MB/s), io=8192MiB (8590MB), run=76446-76446msec (+34.1% throughput, -25.6% runtime) ==== 32 jobs, 512MiB files, fsync frequency 1, block size 64KiB ==== Before patch: WRITE: bw=93.2MiB/s (97.7MB/s), 93.2MiB/s-93.2MiB/s (97.7MB/s-97.7MB/s), io=16.0GiB (17.2GB), run=175836-175836msec After patch: WRITE: bw=111MiB/s (117MB/s), 111MiB/s-111MiB/s (117MB/s-117MB/s), io=16.0GiB (17.2GB), run=147001-147001msec (+19.1% throughput, -16.4% runtime) ==== 64 jobs, 512MiB files, fsync frequency 1, block size 64KiB ==== Before patch: WRITE: bw=108MiB/s (114MB/s), 108MiB/s-108MiB/s (114MB/s-114MB/s), io=32.0GiB (34.4GB), run=302656-302656msec After patch: WRITE: bw=133MiB/s (140MB/s), 133MiB/s-133MiB/s (140MB/s-140MB/s), io=32.0GiB (34.4GB), run=246003-246003msec (+23.1% throughput, -18.7% runtime) ************************ *** random writes *** ************************ ==== 1 job, 8GiB file, fsync frequency 16, block size 4KiB ==== Before patch: WRITE: bw=11.5MiB/s (12.0MB/s), 11.5MiB/s-11.5MiB/s (12.0MB/s-12.0MB/s), io=8192MiB (8590MB), run=714281-714281msec After patch: WRITE: bw=11.6MiB/s (12.2MB/s), 11.6MiB/s-11.6MiB/s (12.2MB/s-12.2MB/s), io=8192MiB (8590MB), run=705959-705959msec (+0.9% throughput, -1.7% runtime) ==== 2 jobs, 4GiB files, fsync frequency 16, block size 4KiB ==== Before patch: WRITE: bw=12.8MiB/s (13.5MB/s), 12.8MiB/s-12.8MiB/s (13.5MB/s-13.5MB/s), io=8192MiB (8590MB), run=638101-638101msec After patch: WRITE: bw=13.1MiB/s (13.7MB/s), 13.1MiB/s-13.1MiB/s (13.7MB/s-13.7MB/s), io=8192MiB (8590MB), run=625374-625374msec (+2.3% throughput, -2.0% runtime) ==== 4 jobs, 2GiB files, fsync frequency 16, block size 4KiB ==== Before patch: WRITE: bw=15.4MiB/s (16.2MB/s), 15.4MiB/s-15.4MiB/s (16.2MB/s-16.2MB/s), io=8192MiB (8590MB), run=531146-531146msec After patch: WRITE: bw=17.8MiB/s (18.7MB/s), 17.8MiB/s-17.8MiB/s (18.7MB/s-18.7MB/s), io=8192MiB (8590MB), run=460431-460431msec (+15.6% throughput, -13.3% runtime) ==== 8 jobs, 1GiB files, fsync frequency 16, block size 4KiB ==== Before patch: WRITE: bw=19.9MiB/s (20.8MB/s), 19.9MiB/s-19.9MiB/s (20.8MB/s-20.8MB/s), io=8192MiB (8590MB), run=412664-412664msec After patch: WRITE: bw=22.2MiB/s (23.3MB/s), 22.2MiB/s-22.2MiB/s (23.3MB/s-23.3MB/s), io=8192MiB (8590MB), run=368589-368589msec (+11.6% throughput, -10.7% runtime) ==== 16 jobs, 512MiB files, fsync frequency 16, block size 4KiB ==== Before patch: WRITE: bw=29.3MiB/s (30.7MB/s), 29.3MiB/s-29.3MiB/s (30.7MB/s-30.7MB/s), io=8192MiB (8590MB), run=279924-279924msec After patch: WRITE: bw=30.4MiB/s (31.9MB/s), 30.4MiB/s-30.4MiB/s (31.9MB/s-31.9MB/s), io=8192MiB (8590MB), run=269258-269258msec (+3.8% throughput, -3.8% runtime) ==== 32 jobs, 512MiB files, fsync frequency 16, block size 4KiB ==== Before patch: WRITE: bw=36.9MiB/s (38.7MB/s), 36.9MiB/s-36.9MiB/s (38.7MB/s-38.7MB/s), io=16.0GiB (17.2GB), run=443581-443581msec After patch: WRITE: bw=41.6MiB/s (43.6MB/s), 41.6MiB/s-41.6MiB/s (43.6MB/s-43.6MB/s), io=16.0GiB (17.2GB), run=394114-394114msec (+12.7% throughput, -11.2% runtime) ==== 64 jobs, 512MiB files, fsync frequency 16, block size 4KiB ==== Before patch: WRITE: bw=45.9MiB/s (48.1MB/s), 45.9MiB/s-45.9MiB/s (48.1MB/s-48.1MB/s), io=32.0GiB (34.4GB), run=714614-714614msec After patch: WRITE: bw=48.8MiB/s (51.1MB/s), 48.8MiB/s-48.8MiB/s (51.1MB/s-51.1MB/s), io=32.0GiB (34.4GB), run=672087-672087msec (+6.3% throughput, -6.0% runtime) Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 75b463d2b47aef96fe1dc3e0237629963034764b Author: Filipe Manana Date: Tue Aug 11 12:43:48 2020 +0100 btrfs: do not commit logs and transactions during link and rename operations Since commit d4682ba03ef618 ("Btrfs: sync log after logging new name") we started to commit logs, and fallback to transaction commits when we failed to log the new names or commit the logs, after link and rename operations when the target inodes (or their parents) were previously logged in the current transaction. This was to avoid losing directories despite an explicit fsync on them when they are ancestors of some inode that got a new named logged, due to a link or rename operation. However that adds the cost of starting IO and waiting for it to complete, which can cause higher latencies for applications. Instead of doing that, just make sure that when we log a new name for an inode we don't mark any of its ancestors as logged, so that if any one does an fsync against any of them, without doing any other change on them, the fsync commits the log. This way we only pay the cost of a log commit (or a transaction commit if something goes wrong or a new block group was created) if the application explicitly asks to fsync any of the parent directories. Using dbench, which mixes several filesystems operations including renames, revealed some significant latency gains. The following script that uses dbench was used to test this: #!/bin/bash DEV=/dev/nvme0n1 MNT=/mnt/btrfs MOUNT_OPTIONS="-o ssd -o space_cache=v2" MKFS_OPTIONS="-m single -d single" THREADS=16 echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor mkfs.btrfs -f $MKFS_OPTIONS $DEV mount $MOUNT_OPTIONS $DEV $MNT dbench -t 300 -D $MNT $THREADS umount $MNT The test was run on bare metal, no virtualization, on a box with 12 cores (Intel i7-8700), 64Gb of RAM and using a NVMe device, with a kernel configuration that is the default of typical distributions (debian in this case), without debug options enabled (kasan, kmemleak, slub debug, debug of page allocations, lock debugging, etc). Results before this patch: Operation Count AvgLat MaxLat ---------------------------------------- NTCreateX 10750455 0.011 155.088 Close 7896674 0.001 0.243 Rename 455222 2.158 1101.947 Unlink 2171189 0.067 121.638 Deltree 256 2.425 7.816 Mkdir 128 0.002 0.003 Qpathinfo 9744323 0.006 21.370 Qfileinfo 1707092 0.001 0.146 Qfsinfo 1786756 0.001 11.228 Sfileinfo 875612 0.003 21.263 Find 3767281 0.025 9.617 WriteX 5356924 0.011 211.390 ReadX 16852694 0.003 9.442 LockX 35008 0.002 0.119 UnlockX 35008 0.001 0.138 Flush 753458 4.252 1102.249 Throughput 1128.35 MB/sec 16 clients 16 procs max_latency=1102.255 ms Results after this patch: 16 clients, after Operation Count AvgLat MaxLat ---------------------------------------- NTCreateX 11471098 0.012 448.281 Close 8426396 0.001 0.925 Rename 485746 0.123 267.183 Unlink 2316477 0.080 63.433 Deltree 288 2.830 11.144 Mkdir 144 0.003 0.010 Qpathinfo 10397420 0.006 10.288 Qfileinfo 1822039 0.001 0.169 Qfsinfo 1906497 0.002 14.039 Sfileinfo 934433 0.004 2.438 Find 4019879 0.026 10.200 WriteX 5718932 0.011 200.985 ReadX 17981671 0.003 10.036 LockX 37352 0.002 0.076 UnlockX 37352 0.001 0.109 Flush 804018 5.015 778.033 Throughput 1201.98 MB/sec 16 clients 16 procs max_latency=778.036 ms (+6.5% throughput, -29.4% max latency, -75.8% rename latency) Test case generic/498 from fstests tests the scenario that the previously mentioned commit fixed. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 5522a27e59c62b3fb60448eb6c3640cf307247bb Author: Filipe Manana Date: Tue Aug 11 12:43:37 2020 +0100 btrfs: do not take the log_mutex of the subvolume when pinning the log During a rename we pin the log to make sure no one commits a log that reflects an ongoing rename operation, as it might result in a committed log where it recorded the unlink of the old name without having recorded the new name. However we are taking the subvolume's log_mutex before incrementing the log_writers counter, which is not necessary since that counter is atomic and we only remove the old name from the log and add the new name to the log after we have incremented log_writers, ensuring that no one can commit the log after we have removed the old name from the log and before we added the new name to the log. By taking the log_mutex lock we are just adding unnecessary contention on the lock, which can become visible for workloads that mix renames with fsyncs, writes for files opened with O_SYNC and unlink operations (if the inode or its parent were fsynced before in the current transaction). So just remove the lock and unlock of the subvolume's log_mutex at btrfs_pin_log_trans(). Using dbench, which mixes different types of operations that end up taking that mutex (fsyncs, renames, unlinks and writes into files opened with O_SYNC) revealed some small gains. The following script that calls dbench was used: #!/bin/bash DEV=/dev/nvme0n1 MNT=/mnt/btrfs MOUNT_OPTIONS="-o ssd -o space_cache=v2" MKFS_OPTIONS="-m single -d single" THREADS=32 echo "performance" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor mkfs.btrfs -f $MKFS_OPTIONS $DEV mount $MOUNT_OPTIONS $DEV $MNT dbench -s -t 600 -D $MNT $THREADS umount $MNT The test was run on bare metal, no virtualization, on a box with 12 cores (Intel i7-8700), 64Gb of RAM and using a NVMe device, with a kernel configuration that is the default of typical distributions (debian in this case), without debug options enabled (kasan, kmemleak, slub debug, debug of page allocations, lock debugging, etc). Results before this patch: Operation Count AvgLat MaxLat ---------------------------------------- NTCreateX 4410848 0.017 738.640 Close 3240222 0.001 0.834 Rename 186850 7.478 1272.476 Unlink 890875 0.128 785.018 Deltree 128 2.846 12.081 Mkdir 64 0.002 0.003 Qpathinfo 3997659 0.009 11.171 Qfileinfo 701307 0.001 0.478 Qfsinfo 733494 0.002 1.103 Sfileinfo 359362 0.004 3.266 Find 1546226 0.041 4.128 WriteX 2202803 7.905 1376.989 ReadX 6917775 0.003 3.887 LockX 14392 0.002 0.043 UnlockX 14392 0.001 0.085 Flush 309225 0.128 1033.936 Throughput 231.555 MB/sec (sync open) 32 clients 32 procs max_latency=1376.993 ms Results after this patch: Operation Count AvgLat MaxLat ---------------------------------------- NTCreateX 4603244 0.017 232.776 Close 3381299 0.001 1.041 Rename 194871 7.251 1073.165 Unlink 929730 0.133 119.233 Deltree 128 2.871 10.199 Mkdir 64 0.002 0.004 Qpathinfo 4171343 0.009 11.317 Qfileinfo 731227 0.001 1.635 Qfsinfo 765079 0.002 3.568 Sfileinfo 374881 0.004 1.220 Find 1612964 0.041 4.675 WriteX 2296720 7.569 1178.204 ReadX 7213633 0.003 3.075 LockX 14976 0.002 0.076 UnlockX 14976 0.001 0.061 Flush 322635 0.102 579.505 Throughput 241.4 MB/sec (sync open) 32 clients 32 procs max_latency=1178.207 ms (+4.3% throughput, -14.4% max latency) Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 1b51d6fce45ec1f2279f06f57fe1c8a703437b27 Author: David Sterba Date: Mon Aug 17 12:16:57 2020 +0200 btrfs: send: remove indirect callback parameter for changed_cb There's a custom callback passed to btrfs_compare_trees which happens to be named exactly same as the existing function implementing it. This is confusing and the indirection is not necessary for our needs. Compiler is clever enough to call it directly so there's effectively no change. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 8bb1cf1ba639d271983be29db68d30e2eebabb98 Author: David Sterba Date: Mon Aug 17 12:12:38 2020 +0200 btrfs: scrub: rename ratelimit state varaible to avoid shadowing There's already defined _rs within ctree.h:btrfs_printk_ratelimited, local variables should not use _ to avoid such name clashes with macro-local variables. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 0af447d0507b1623cd4b94ad941460951e141783 Author: David Sterba Date: Mon Aug 17 12:08:37 2020 +0200 btrfs: remove unnecessarily shadowed variables In btrfs_orphan_cleanup, there's another instance of fs_info, but it's the same as the one we already have. In btrfs_backref_finish_upper_links, rb_node is same type and used as temporary cursor to the tree. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit cb4c9198302b02c3f0eaf4267636e5ce1f4a4765 Author: David Sterba Date: Mon Aug 17 10:58:38 2020 +0200 btrfs: compression: move declarations to header The declarations of compression algorithm callbacks are defined in the .c file as they're used from there. Compiler warns that there are no declarations for public functions when compiling lzo.c/zlib.c/zstd.c. Fix that by moving the declarations to the header as it's the common place for all of them. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 9e6df7cedfdf3e2469aa46fb772ca70b422132ec Author: David Sterba Date: Mon Aug 17 10:56:00 2020 +0200 btrfs: remove const from btrfs_feature_set_name The function btrfs_feature_set_name returns a const char pointer, the second const is not necessary and reported as a warning: In file included from fs/btrfs/space-info.c:6: fs/btrfs/sysfs.h:16:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 16 | const char * const btrfs_feature_set_name(enum btrfs_feature_set set); | ^~~~~ Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit e21139c621ada48f2bc382865ea34dd49d45c2a8 Author: Qu Wenruo Date: Thu Aug 13 14:33:52 2020 +0800 btrfs: cleanup calculation of lockend in lock_and_cleanup_extent_if_need() We're just doing rounding up to sectorsize to calculate the lockend. There is no need to do the unnecessary length calculation, just direct round_up() is enough. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit c4923027bd58cdccbe54e13298a4d914668a56da Author: Josef Bacik Date: Tue Aug 25 16:56:59 2020 -0400 btrfs: fix possible infinite loop in data async reclaim Dave reported an issue where generic/102 would sometimes hang. This turned out to be because we'd get into this spot where we were no longer making progress on data reservations because our exit condition was not met. The log is basically while (!space_info->full && !list_empty(&space_info->tickets)) flush_space(space_info, flush_state); where flush state is our various flush states, but doesn't include ALLOC_CHUNK_FORCE. This is because we actually lead with allocating chunks, and so the assumption was that once you got to the actual flushing states you could no longer allocate chunks. This was a stupid assumption, because you could have deleted block groups that would be reclaimed by a transaction commit, thus unsetting space_info->full. This is essentially what happens with generic/102, and so sometimes you'd get stuck in the flushing loop because we weren't allocating chunks, but flushing space wasn't giving us what we needed to make progress. Fix this by adding ALLOC_CHUNK_FORCE to the end of our flushing states, that way we will eventually bail out because we did end up with space_info->full if we free'd a chunk previously. Otherwise, as is the case for this test, we'll allocate our chunk and continue on our happy merry way. Reported-by: David Sterba Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 1a7a92c8ddcd1edc4a5407de8f56edc6cfdf394a Author: Josef Bacik Date: Tue Jul 21 10:22:34 2020 -0400 btrfs: add a comment explaining the data flush steps The data flushing steps are not obvious to people other than myself and Chris. Write a giant comment explaining the reasoning behind each flush step for data as well as why it is in that particular order. Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 5705674081cee751659a6adb4849645a566a6cf4 Author: Josef Bacik Date: Tue Jul 21 10:22:33 2020 -0400 btrfs: do async reclaim for data reservations Now that we have the data ticketing stuff in place, move normal data reservations to use an async reclaim helper to satisfy tickets. Before we could have multiple tasks race in and both allocate chunks, resulting in more data chunks than we would necessarily need. Serializing these allocations and making a single thread responsible for flushing will only allocate chunks as needed, as well as cut down on transaction commits and other flush related activities. Priority reservations will still work as they have before, simply trying to allocate a chunk until they can make their reservation. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit cb3e3930459972dbafc274bcde3fdc1462429391 Author: Josef Bacik Date: Tue Jul 21 10:22:32 2020 -0400 btrfs: flush delayed refs when trying to reserve data space We can end up with freed extents in the delayed refs, and thus may_commit_transaction() may not think we have enough pinned space to commit the transaction and we'll ENOSPC early. Handle this by running the delayed refs in order to make sure pinned is uptodate before we try to commit the transaction. Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 327feeeb2e9bc68d2af1c581394ec6706f600bb9 Author: Josef Bacik Date: Tue Jul 21 10:22:31 2020 -0400 btrfs: run delayed iputs before committing the transaction for data Before we were waiting on iputs after we committed the transaction, but this doesn't really make much sense. We want to reclaim any space we may have in order to be more likely to commit the transaction, due to pinned space being added by running the delayed iputs. Fix this by making delayed iputs run before committing the transaction. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit bb86bd3db82ed6d28d4ab4ed33c7ee3b27290e49 Author: Josef Bacik Date: Tue Jul 21 10:22:30 2020 -0400 btrfs: don't force commit if we are data We used to unconditionally commit the transaction at least 2 times and then on the 3rd try check against pinned space to make sure committing the transaction was worth the effort. This is overkill, we know nobody is going to steal our reservation, and if we can't make our reservation with the pinned amount simply bail out. This also cleans up the passing of bytes_needed to may_commit_transaction, as that was the thing we added into place in order to accomplish this behavior. We no longer need it so remove that mess. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 028270013586681b02db49be20e05b56e662dc55 Author: Josef Bacik Date: Tue Jul 21 10:22:29 2020 -0400 btrfs: drop the commit_cycles stuff for data reservations This was an old wart left over from how we previously did data reservations. Before we could have people race in and take a reservation while we were flushing space, so we needed to make sure we looped a few times before giving up. Now that we're using the ticketing infrastructure we don't have to worry about this and can drop the logic altogether. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit f3bda421c16fe2f67cb3ff81b65ce8de331dd8e2 Author: Josef Bacik Date: Tue Jul 21 10:22:28 2020 -0400 btrfs: use the same helper for data and metadata reservations Now that data reservations follow the same pattern as metadata reservations we can simply rename __reserve_metadata_bytes to __reserve_bytes and use that helper for data reservations. Things to keep in mind, btrfs_can_overcommit() returns 0 for data, because we can never overcommit. We also will never pass in FLUSH_ALL for data, so we'll simply be added to the priority list and go straight into handle_reserve_ticket. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 0532a6f8b6ce64ced0ffcca0a2ab5d66a8eb9a6d Author: Josef Bacik Date: Tue Jul 21 10:22:27 2020 -0400 btrfs: serialize data reservations if we are flushing Nikolay reported a problem where generic/371 would fail sometimes with a slow drive. The gist of the test is that we fallocate a file in parallel with a pwrite of a different file. These two files combined are smaller than the file system, but sometimes the pwrite would ENOSPC. A fair bit of investigation uncovered the fact that the fallocate workload was racing in and grabbing the free space that the pwrite workload was trying to free up so it could make its own reservation. After a few loops of this eventually the pwrite workload would error out with an ENOSPC. We've had the same problem with metadata as well, and we serialized all metadata allocations to satisfy this problem. This wasn't usually a problem with data because data reservations are more straightforward, but obviously could still happen. Fix this by not allowing reservations to occur if there are any pending tickets waiting to be satisfied on the space info. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 1004f6860f8c64f8d959051d6299981c09046cbe Author: Josef Bacik Date: Tue Jul 21 10:22:26 2020 -0400 btrfs: use ticketing for data space reservations Now that we have all the infrastructure in place, use the ticketing infrastructure to make data allocations. This still maintains the exact same flushing behavior, but now we're using tickets to get our reservations satisfied. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 8698fc4eb7884eeba29adc4193f9d05fa2bed16b Author: Josef Bacik Date: Tue Jul 21 10:22:25 2020 -0400 btrfs: add btrfs_reserve_data_bytes and use it Create a new function btrfs_reserve_data_bytes() in order to handle data reservations. This uses the new flush types and flush states to handle making data reservations. This patch specifically does not change any functionality, and is purposefully not cleaned up in order to make bisection easier for the future patches. The new helper is identical to the old helper in how it handles data reservations. We first try to force a chunk allocation, and then we run through the flush states all at once and in the same order that they were done with the old helper. Subsequent patches will clean this up and change the behavior of the flushing, and it is important to keep those changes separate so we can easily bisect down to the patch that caused the regression, rather than the patch that made us start using the new infrastructure. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit a1ed0a8216f7c7305ccfaa2c93b498f10b340ede Author: Josef Bacik Date: Tue Jul 21 10:22:24 2020 -0400 btrfs: add the data transaction commit logic into may_commit_transaction Data space flushing currently unconditionally commits the transaction twice in a row, and the last time it checks if there's enough pinned extents to satisfy its reservation before deciding to commit the transaction for the 3rd and final time. Encode this logic into may_commit_transaction(). In the next patch we will pass in U64_MAX for bytes_needed the first two times, and the final time we will pass in the actual bytes we need so the normal logic will apply. This patch exists solely to make the logical changes I will make to the flushing state machine separate to make it easier to bisect any performance related regressions. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 058e6d1d267fe9c7e072533d2e1469d93aec3ec7 Author: Josef Bacik Date: Tue Jul 21 10:22:23 2020 -0400 btrfs: add flushing states for handling data reservations Currently the way we do data reservations is by seeing if we have enough space in our space_info. If we do not and we're a normal inode we'll 1) Attempt to force a chunk allocation until we can't anymore. 2) If that fails we'll flush delalloc, then commit the transaction, then run the delayed iputs. If we are a free space inode we're only allowed to force a chunk allocation. In order to use the normal flushing mechanism we need to encode this into a flush state array for normal inodes. Since both will start with allocating chunks until the space info is full there is no need to add this as a flush state, this will be handled specially. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 448b966b49be55af8f4aa79b24d7896809fd8e67 Author: Josef Bacik Date: Tue Jul 21 10:22:22 2020 -0400 btrfs: check tickets after waiting on ordered extents Right now if the space is freed up after the ordered extents complete (which is likely since the reservations are held until they complete), we would do extra delalloc flushing before we'd notice that we didn't have any more tickets. Fix this by moving the tickets check after our wait_ordered_extents check. Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 38d715f494f2f1dddbf3d0c6e50aefff49519232 Author: Josef Bacik Date: Tue Jul 21 10:22:21 2020 -0400 btrfs: use btrfs_start_delalloc_roots in shrink_delalloc The original iteration of flushing had us flushing delalloc and then checking to see if we could make our reservation, thus we were very careful about how many pages we would flush at once. But now that everything is async and we satisfy tickets as the space becomes available we don't have to keep track of any of this, simply try and flush the number of dirty inodes we may have in order to reclaim space to make our reservation. This cleans up our delalloc flushing significantly. The async_pages stuff is dropped because btrfs_start_delalloc_roots() handles the case that we generate async extents for us, so we no longer require this extra logic. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 39753e4a3a43c7d14a17f626f32d4a53ee59d563 Author: Josef Bacik Date: Tue Jul 21 10:22:20 2020 -0400 btrfs: use the btrfs_space_info_free_bytes_may_use helper for delalloc We are going to use the ticket infrastructure for data, so use the btrfs_space_info_free_bytes_may_use() helper in btrfs_free_reserved_data_space_noquota() so we get the btrfs_try_granting_tickets call when we free our reservation. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Tested-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 99ffb43e5d4a0710fb094f3efbdf47f85f3b87c9 Author: Josef Bacik Date: Tue Jul 21 10:22:19 2020 -0400 btrfs: call btrfs_try_granting_tickets when reserving space If we have compression on we could free up more space than we reserved, and thus be able to make a space reservation. Add the call for this scenario. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2732798c9bb647978043e4daf54a6f9f3025d4c5 Author: Josef Bacik Date: Tue Jul 21 10:22:18 2020 -0400 btrfs: call btrfs_try_granting_tickets when unpinning anything When unpinning we were only calling btrfs_try_granting_tickets() if global_rsv->space_info == space_info, which is problematic because we use ticketing for SYSTEM chunks, and want to use it for DATA as well. Fix this by moving this call outside of that if statement. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Tested-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3308234a7e9828f8cbec308010348ddf712fc15e Author: Josef Bacik Date: Tue Jul 21 10:22:17 2020 -0400 btrfs: call btrfs_try_granting_tickets when freeing reserved bytes We were missing a call to btrfs_try_granting_tickets in btrfs_free_reserved_bytes, so add it to handle the case where we're able to satisfy an allocation because we've freed a pending reservation. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit c6c453032ea3b9033f0a312175aab6519ff9bdf7 Author: Josef Bacik Date: Tue Jul 21 10:22:16 2020 -0400 btrfs: make ALLOC_CHUNK use the space info flags We have traditionally used flush_space() to flush metadata space, so we've been unconditionally using btrfs_metadata_alloc_profile() for our profile to allocate a chunk. However if we're going to use this for data we need to use btrfs_get_alloc_profile() on the space_info we pass in. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Tested-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 920a9958c2553e4e23f9ff42dca2907ecf9a5fa0 Author: Josef Bacik Date: Tue Jul 21 10:22:15 2020 -0400 btrfs: make shrink_delalloc take space_info as an arg Currently shrink_delalloc just looks up the metadata space info, but this won't work if we're trying to reclaim space for data chunks. We get the right space_info we want passed into flush_space, so simply pass that along to shrink_delalloc. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Tested-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit d7f81fac97e6d06c4e9bf090085137aa2dddff99 Author: Josef Bacik Date: Tue Jul 21 10:22:14 2020 -0400 btrfs: handle U64_MAX for shrink_delalloc Data allocations are going to want to pass in U64_MAX for flushing space, adjust shrink_delalloc to handle this properly. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Tested-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 288be2d997360c71a1126261680d95ad9df5932a Author: Josef Bacik Date: Tue Jul 21 10:22:13 2020 -0400 btrfs: remove orig from shrink_delalloc We don't use this anywhere inside of shrink_delalloc since 17024ad0a0fd ("Btrfs: fix early ENOSPC due to delalloc"), remove it. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Tested-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit b49121393f583635b78abae4037fa1e772b2a042 Author: Josef Bacik Date: Tue Jul 21 10:22:12 2020 -0400 btrfs: change nr to u64 in btrfs_start_delalloc_roots We have btrfs_wait_ordered_roots() which takes a u64 for nr, but btrfs_start_delalloc_roots() that takes an int for nr, which makes using them in conjunction, especially for something like (u64)-1, annoying and inconsistent. Fix btrfs_start_delalloc_roots() to take a u64 for nr and adjust start_delalloc_inodes() and it's callers appropriately. This means we've adjusted start_delalloc_inodes() to take a pointer of nr since we want to preserve the ability for start-delalloc_inodes() to return an error, so simply make it do the nr adjusting as necessary. Part of adjusting the callers to this means changing btrfs_writeback_inodes_sb_nr() to take a u64 for items. This may be confusing because it seems unrelated, but the caller of btrfs_writeback_inodes_sb_nr() already passes in a u64, it's just the function variable that needs to be changed. Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8e5600818022bd329a5846dd6b5242965644f150 Author: Nikolay Borisov Date: Wed Aug 12 16:18:51 2020 +0300 btrfs: remove fsid argument from btrfs_sysfs_update_sprout_fsid It can be accessed from 'fs_devices' as it's identical to fs_info->fs_devices. Also add a comment about why we are calling the function. No semantic changes. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 57297c1e8e1ce030050bf07ffa7182aaa588e2ac Author: Nikolay Borisov Date: Mon Aug 3 12:43:18 2020 +0300 btrfs: remove spurious BUG_ON in btrfs_get_extent That BUG_ON cannot ever trigger because as the comment there states - 'err' is always set. Simply remove it as it brings no value. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 260db43cd2f556677f6ae818ba09f997eed81004 Author: Randy Dunlap Date: Tue Aug 4 19:48:34 2020 -0700 btrfs: delete duplicated words + other fixes in comments Delete repeated words in fs/btrfs/. {to, the, a, and old} and change "into 2 part" to "into 2 parts". Reviewed-by: Nikolay Borisov Signed-off-by: Randy Dunlap Reviewed-by: David Sterba Signed-off-by: David Sterba commit 437490fed3b0c9ae21af8f70e0f338d34560842b Author: Qu Wenruo Date: Tue Jul 28 09:42:49 2020 +0800 btrfs: tracepoints: output proper root owner for trace_find_free_extent() The current trace event always output result like this: find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=4(METADATA) find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=4(METADATA) find_free_extent: root=2(EXTENT_TREE) len=8192 empty_size=0 flags=1(DATA) find_free_extent: root=2(EXTENT_TREE) len=8192 empty_size=0 flags=1(DATA) find_free_extent: root=2(EXTENT_TREE) len=4096 empty_size=0 flags=1(DATA) find_free_extent: root=2(EXTENT_TREE) len=4096 empty_size=0 flags=1(DATA) T's saying we're allocating data extent for EXTENT tree, which is not even possible. It's because we always use EXTENT tree as the owner for trace_find_free_extent() without using the @root from btrfs_reserve_extent(). This patch will change the parameter to use proper @root for trace_find_free_extent(): Now it looks much better: find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP) find_free_extent: root=5(FS_TREE) len=8192 empty_size=0 flags=1(DATA) find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=1(DATA) find_free_extent: root=5(FS_TREE) len=4096 empty_size=0 flags=1(DATA) find_free_extent: root=5(FS_TREE) len=8192 empty_size=0 flags=1(DATA) find_free_extent: root=5(FS_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP) find_free_extent: root=7(CSUM_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP) find_free_extent: root=2(EXTENT_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP) find_free_extent: root=1(ROOT_TREE) len=16384 empty_size=0 flags=36(METADATA|DUP) Reported-by: Hans van Kranenburg CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 19d2e0cef0b14f8c7210162f58327485f5fa7c51 Author: Alexander Dahl Date: Mon Oct 5 22:34:40 2020 +0200 leds: pwm: Remove platform_data support Since commit 141f15c66d94 ("leds: pwm: remove header") that platform interface is not usable from outside and there seems to be no in tree user anymore. All in-tree users of the leds-pwm driver seem to use DT currently. Getting rid of the old platform interface allows the leds-pwm driver to switch over from 'devm_led_classdev_register()' to 'devm_led_classdev_register_ext()'. Signed-off-by: Alexander Dahl Cc: Denis Osterland-Heim Reviewed-by: Marek Behún Signed-off-by: Pavel Machek commit 4e787e0405342e9c21558ead99d39d1cdef1b388 Author: Clément Péron Date: Mon Oct 5 21:09:39 2020 +0200 dt-bindings: pinctrl: sunxi: Allow pinctrl with more interrupt banks Recently introduced Allwinner A100 pinctrl block has 7 interrupts. This trig a warning when running dtb_checks: sun50i-a100-allwinner-perf1.dt.yaml: pinctrl@300b000: interrupts: [...] is too long From schema: .../allwinner,sun4i-a10-pinctrl.yaml Fix this by allowing up to 7 interrupts. Signed-off-by: Clément Péron Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201005190939.21016-1-peron.clem@gmail.com Signed-off-by: Linus Walleij commit b1839e7c2a42ccd9a0587c0092e880c7a213ee2a Author: Allen Pais Date: Tue Oct 6 10:34:58 2020 +0530 dmaengine: xilinx: dpdma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20201006050458.221329-2-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 1311f7c7d909e351d659e7cc597a01e9a9c81d3f Author: Allen Pais Date: Tue Oct 6 10:34:57 2020 +0530 dmaengine: sf-pdma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20201006050458.221329-1-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 7e3c3883c381aeda903778d7e99fc4cd523be610 Merge: 549738f15da0e 03c7b78b0b780 3c213562fb3eb d714aaa71594a 21d3c0402a396 7aaf0b0e8e9ad 0dd4ce65aa75d ce433d0f7063a 54ce12e02e44f c40aaaac1018f 6278eecba31f3 Author: Joerg Roedel Date: Wed Oct 7 11:51:59 2020 +0200 Merge branches 'arm/allwinner', 'arm/mediatek', 'arm/renesas', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/amd', 'x86/vt-d' and 'core' into next commit c40aaaac1018ff1382f2d35df5129a6bcea3df6b Author: David Woodhouse Date: Thu Sep 24 15:08:42 2020 +0100 iommu/vt-d: Gracefully handle DMAR units with no supported address widths Instead of bailing out completely, such a unit can still be used for interrupt remapping. Signed-off-by: David Woodhouse Reviewed-by: Lu Baolu Link: https://lore.kernel.org/linux-iommu/549928db2de6532117f36c9c810373c14cf76f51.camel@infradead.org/ Signed-off-by: Joerg Roedel commit c6662da804c465f73d2faa61dd33f1e9376cac3d Author: Geert Uytterhoeven Date: Mon Oct 5 14:50:49 2020 +0200 pinctrl: visconti: PINCTRL_TMPV7700 should depend on ARCH_VISCONTI The Toshiba Visconti TMPV7700 series pin controller is only present on Visconti SoCs. Hence add a dependency on ARCH_VISCONTI, to prevent asking the user about this driver when configuring a kernel without Visconti platform support. Fixes: a68a7844264e4fb9 ("pinctrl: visconti: Add Toshiba Visconti SoCs pinctrl support") Signed-off-by: Geert Uytterhoeven Acked-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20201005125049.26926-1-geert+renesas@glider.be Signed-off-by: Linus Walleij commit 300638101329e8f1569115f3d7197ef5ef754a3a Author: Tony Luck Date: Tue Oct 6 14:09:10 2020 -0700 x86/mce: Decode a kernel instruction to determine if it is copying from user All instructions copying data between kernel and user memory are tagged with either _ASM_EXTABLE_UA or _ASM_EXTABLE_CPY entries in the exception table. ex_fault_handler_type() returns EX_HANDLER_UACCESS for both of these. Recovery is only possible when the machine check was triggered on a read from user memory. In this case the same strategy for recovery applies as if the user had made the access in ring3. If the fault was in kernel memory while copying to user there is no current recovery plan. For MOV and MOVZ instructions a full decode of the instruction is done to find the source address. For MOVS instructions the source address is in the %rsi register. The function fault_in_kernel_space() determines whether the source address is kernel or user, upgrade it from "static" so it can be used here. Co-developed-by: Youquan Song Signed-off-by: Youquan Song Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201006210910.21062-7-tony.luck@intel.com commit c0ab7ffce275d3f83bd253c70889c28821d4a41d Author: Tony Luck Date: Tue Oct 6 14:09:09 2020 -0700 x86/mce: Recover from poison found while copying from user space Existing kernel code can only recover from a machine check on code that is tagged in the exception table with a fault handling recovery path. Add two new fields in the task structure to pass information from machine check handler to the "task_work" that is queued to run before the task returns to user mode: + mce_vaddr: will be initialized to the user virtual address of the fault in the case where the fault occurred in the kernel copying data from a user address. This is so that kill_me_maybe() can provide that information to the user SIGBUS handler. + mce_kflags: copy of the struct mce.kflags needed by kill_me_maybe() to determine if mce_vaddr is applicable to this error. Add code to recover from a machine check while copying data from user space to the kernel. Action for this case is the same as if the user touched the poison directly; unmap the page and send a SIGBUS to the task. Use a new helper function to share common code between the "fault in user mode" case and the "fault while copying from user" case. New code paths will be activated by the next patch which sets MCE_IN_KERNEL_COPYIN. Suggested-by: Borislav Petkov Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201006210910.21062-6-tony.luck@intel.com commit a2f73400e4dfd13f673c6e1b4b98d180fd1e47b3 Author: Tony Luck Date: Tue Oct 6 14:09:08 2020 -0700 x86/mce: Avoid tail copy when machine check terminated a copy from user In the page fault case it is ok to see if a few more unaligned bytes can be copied from the source address. Worst case is that the page fault will be triggered again. Machine checks are more serious. Just give up at the point where the main copy loop triggered the #MC and return from the copy code as if the copy succeeded. The machine check handler will use task_work_add() to make sure that the task is sent a SIGBUS. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201006210910.21062-5-tony.luck@intel.com commit 347f6be11de1940dc915596d17b0f94b03779c77 Author: Ben Chuang Date: Mon Oct 5 18:55:09 2020 +0800 mmc: sdhci-pci-gli: Add CQHCI Support for GL9763E Add CQHCI initialization and implement CQHCI operations for GL9763E. Use bit19 of the register (0x888) to decide whether to disable command queuing. If the bit is set, the command queuing will be disabled. Signed-off-by: Ben Chuang Link: https://lore.kernel.org/r/20201005105509.11343-1-ben.chuanggli@gmail.com Signed-off-by: Ulf Hansson commit 278b917f8cb9b02923c15249f9d1a5769d2c1976 Author: Youquan Song Date: Tue Oct 6 14:09:07 2020 -0700 x86/mce: Add _ASM_EXTABLE_CPY for copy user access _ASM_EXTABLE_UA is a general exception entry to record the exception fixup for all exception spots between kernel and user space access. To enable recovery from machine checks while coping data from user addresses it is necessary to be able to distinguish the places that are looping copying data from those that copy a single byte/word/etc. Add a new macro _ASM_EXTABLE_CPY and use it in place of _ASM_EXTABLE_UA in the copy functions. Record the exception reason number to regs->ax at ex_handler_uaccess which is used to check MCE triggered. The new fixup routine ex_handler_copy() is almost an exact copy of ex_handler_uaccess() The difference is that it sets regs->ax to the trap number. Following patches use this to avoid trying to copy remaining bytes from the tail of the copy and possibly hitting the poison again. New mce.kflags bit MCE_IN_KERNEL_COPYIN will be used by mce_severity() calculation to indicate that a machine check is recoverable because the kernel was copying from user space. Signed-off-by: Youquan Song Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201006210910.21062-4-tony.luck@intel.com commit 849facea92fa68d9292f9b06d7c4ee9e7a06b8dc Author: Christoph Hellwig Date: Wed Oct 7 11:04:08 2020 +0200 dma-direct: simplify the DMA_ATTR_NO_KERNEL_MAPPING handling Use and entirely separate code path for the DMA_ATTR_NO_KERNEL_MAPPING path. This avoids any confusion about the ret type, and avoids lots of attr checks and helpers that can be significantly simplified now. It also ensures that common handling is applied to architetures still using the arch alloc/free hooks. Signed-off-by: Christoph Hellwig commit a05d54c41ecfa1a322b229b4e5ce50c157284f74 Author: Tony Luck Date: Tue Oct 6 14:09:06 2020 -0700 x86/mce: Provide method to find out the type of an exception handler Avoid a proliferation of ex_has_*_handler() functions by having just one function that returns the type of the handler (if any). Drop the __visible attribute for this function. It is not called from assembler so the attribute is not necessary. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201006210910.21062-3-tony.luck@intel.com commit 5b138c534fda57c2ebc1e6de72578aa1d70788a6 Author: Christoph Hellwig Date: Wed Oct 7 11:06:09 2020 +0200 dma-direct: factor out a dma_direct_alloc_from_pool helper This ensures dma_direct_alloc_pages will use the right gfp mask, as well as keeping the code for that common between the two allocators. Signed-off-by: Christoph Hellwig commit 08a89c28304ae74e4c7422f784359e41a37e3e7c Author: Christoph Hellwig Date: Sat Sep 26 16:39:36 2020 +0200 dma-direct check for highmem pages in dma_direct_alloc_pages Check for highmem pages from CMA, just like in the dma_direct_alloc path. Signed-off-by: Christoph Hellwig commit 41ce0564bfe2e129d56730418d8c0a9f9f2d31b5 Author: Youquan Song Date: Tue Oct 6 14:09:05 2020 -0700 x86/mce: Pass pointer to saved pt_regs to severity calculation routines New recovery features require additional information about processor state when a machine check occurred. Pass pt_regs down to the routines that need it. No functional change. Signed-off-by: Youquan Song Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201006210910.21062-2-tony.luck@intel.com commit db7515783b99f6ae8b21470cab9ee871956b57fb Author: Enric Balletbo i Serra Date: Thu Oct 1 16:25:11 2020 +0200 pinctrl: mediatek: Free eint data on failure The pinctrl driver can work without the EINT resource, but, if it is expected to have this resource but the mtk_build_eint() function fails after allocating their data (because can't get the resource or can't map the irq), the data is not freed and you end with a NULL pointer dereference. Fix this by freeing the data if mtk_build_eint() fails, so pinctrl still works and doesn't hang. This is noticeable after commit f97dbf48ca43 ("irqchip/mtk-sysirq: Convert to a platform driver") on MT8183 because, due this commit, the pinctrl driver fails to map the irq and spots the following bug: [ 1.947597] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004 [ 1.956404] Mem abort info: [ 1.959203] ESR = 0x96000004 [ 1.962259] EC = 0x25: DABT (current EL), IL = 32 bits [ 1.967565] SET = 0, FnV = 0 [ 1.970613] EA = 0, S1PTW = 0 [ 1.973747] Data abort info: [ 1.976619] ISV = 0, ISS = 0x00000004 [ 1.980447] CM = 0, WnR = 0 [ 1.983410] [0000000000000004] user address but active_mm is swapper [ 1.989759] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 1.995322] Modules linked in: [ 1.998371] CPU: 7 PID: 1 Comm: swapper/0 Not tainted 5.9.0-rc1+ #44 [ 2.004715] Hardware name: MediaTek krane sku176 board (DT) [ 2.010280] pstate: 60000005 (nZCv daif -PAN -UAO BTYPE=--) [ 2.015850] pc : mtk_eint_set_debounce+0x48/0x1b8 [ 2.020546] lr : mtk_eint_set_debounce+0x34/0x1b8 [ 2.025239] sp : ffff80001008baa0 [ 2.028544] x29: ffff80001008baa0 x28: ffff0000ff7ff790 [ 2.033847] x27: ffff0000f9ec34b0 x26: ffff0000f9ec3480 [ 2.039150] x25: ffff0000fa576410 x24: ffff0000fa502800 [ 2.044453] x23: 0000000000001388 x22: ffff0000fa635f80 [ 2.049755] x21: 0000000000000008 x20: 0000000000000000 [ 2.055058] x19: 0000000000000071 x18: 0000000000000001 [ 2.060360] x17: 0000000000000000 x16: 0000000000000000 [ 2.065662] x15: ffff0000facc8470 x14: ffffffffffffffff [ 2.070965] x13: 0000000000000001 x12: 00000000000000c0 [ 2.076267] x11: 0000000000000040 x10: 0000000000000070 [ 2.081569] x9 : ffffaec0063d24d8 x8 : ffff0000fa800270 [ 2.086872] x7 : 0000000000000000 x6 : 0000000000000011 [ 2.092174] x5 : ffff0000fa800248 x4 : ffff0000fa800270 [ 2.097476] x3 : ffff8000100c5000 x2 : 0000000000000000 [ 2.102778] x1 : 0000000000000000 x0 : 0000000000000000 [ 2.108081] Call trace: [ 2.110520] mtk_eint_set_debounce+0x48/0x1b8 [ 2.114870] mtk_gpio_set_config+0x5c/0x78 [ 2.118958] gpiod_set_config+0x5c/0x78 [ 2.122786] gpiod_set_debounce+0x18/0x28 [ 2.126789] gpio_keys_probe+0x50c/0x910 [ 2.130705] platform_drv_probe+0x54/0xa8 [ 2.134705] really_probe+0xe4/0x3b0 [ 2.138271] driver_probe_device+0x58/0xb8 [ 2.142358] device_driver_attach+0x74/0x80 [ 2.146532] __driver_attach+0x58/0xe0 [ 2.150274] bus_for_each_dev+0x70/0xc0 [ 2.154100] driver_attach+0x24/0x30 [ 2.157666] bus_add_driver+0x14c/0x1f0 [ 2.161493] driver_register+0x64/0x120 [ 2.165319] __platform_driver_register+0x48/0x58 [ 2.170017] gpio_keys_init+0x1c/0x28 [ 2.173672] do_one_initcall+0x54/0x1b4 [ 2.177499] kernel_init_freeable+0x1d0/0x238 [ 2.181848] kernel_init+0x14/0x118 [ 2.185328] ret_from_fork+0x10/0x34 [ 2.188899] Code: a9438ac1 12001266 f94006c3 121e766a (b9400421) [ 2.194991] ---[ end trace 168cf7b3324b6570 ]--- [ 2.199611] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 2.207260] SMP: stopping secondary CPUs [ 2.211294] Kernel Offset: 0x2ebff4800000 from 0xffff800010000000 [ 2.217377] PHYS_OFFSET: 0xffffb50500000000 [ 2.221551] CPU features: 0x0240002,2188200c [ 2.225811] Memory Limit: none [ 2.228860] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--- Fixes: 89132dd8ffd2 ("pinctrl: mediatek: extend eint build to pinctrl-mtk-common-v2.c") Signed-off-by: Enric Balletbo i Serra Acked-by: Sean Wang Link: https://lore.kernel.org/r/20201001142511.3560143-1-enric.balletbo@collabora.com [rebased on changed infrastructure] Signed-off-by: Linus Walleij commit 9e8586827a7061fdb183e6571fac63af378be013 Author: Shuah Khan Date: Tue Oct 6 16:39:14 2020 -0600 usbip: vhci_hcd: fix calling usb_hcd_giveback_urb() with irqs enabled kcov testing uncovered call to usb_hcd_giveback_urb() without disabling interrupts. Link: https://lore.kernel.org/linux-usb/CAAeHK+wb4k-LGTjK9F5YbJNviF_+yU+wE_=Vpo9Rn7KFN8vG6Q@mail.gmail.com/ usb_hcd_giveback_urb() is called from vhci's urb_enqueue, when it determines it doesn't need to xmit the urb and can give it back. This path runs in task context. Disable irqs around usb_hcd_giveback_urb() call. Reported-by: Andrey Konovalov Suggested-by: Alan Stern Acked-by: Andrey Konovalov Signed-off-by: Shuah Khan Link: https://lore.kernel.org/r/20201006223914.39257-1-skhan@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 200da27ab32d89ca43bd8ef010f84b205e5c780a Author: Nathan Chancellor Date: Tue Oct 6 13:11:15 2020 -0700 LSM: Fix type of id parameter in kernel_post_load_data prototype Clang warns: security/security.c:1716:59: warning: implicit conversion from enumeration type 'enum kernel_load_data_id' to different enumeration type 'enum kernel_read_file_id' [-Wenum-conversion] ret = call_int_hook(kernel_post_load_data, 0, buf, size, id, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ security/security.c:715:22: note: expanded from macro 'call_int_hook' RC = P->hook.FUNC(__VA_ARGS__); \ ~ ^~~~~~~~~~~ 1 warning generated. There is a mismatch between the id parameter type in security_kernel_post_load_data and the function pointer prototype that is created by the LSM_HOOK macro in the security_list_options union. Fix the type in the LSM_HOOK macro as 'enum kernel_load_data_id' is what is expected. Fixes: b64fcae74b6d ("LSM: Introduce kernel_post_load_data() hook") Acked-by: Kees Cook Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20201006201115.716550-1-natechancellor@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2827d98bc5d65ebfa78cfa32ebddea3a6f60f56d Author: Mauro Carvalho Chehab Date: Wed Oct 7 07:09:54 2020 +0200 misc: Kconfig: add a new dependency for HISI_HIKEY_USB As warned by Randy: on x86_64: CONFIG_USB_ROLE_SWITCH=m and HISI_HIKEY_USB=y. ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_remove': hisi_hikey_usb.c:(.text+0x61): undefined reference to `usb_role_switch_unregister' ld: hisi_hikey_usb.c:(.text+0xa4): undefined reference to `usb_role_switch_put' ld: drivers/misc/hisi_hikey_usb.o: in function `hub_usb_role_switch_set': hisi_hikey_usb.c:(.text+0xd3): undefined reference to `usb_role_switch_get_drvdata' ld: drivers/misc/hisi_hikey_usb.o: in function `relay_set_role_switch': hisi_hikey_usb.c:(.text+0x54d): undefined reference to `usb_role_switch_set_role' ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_probe': hisi_hikey_usb.c:(.text+0x8a5): undefined reference to `usb_role_switch_get' ld: hisi_hikey_usb.c:(.text+0xa08): undefined reference to `usb_role_switch_register' ld: hisi_hikey_usb.c:(.text+0xa6e): undefined reference to `usb_role_switch_put' Make it dependent on CONFIG_USB_ROLE_SWITCH. Reported-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/0e49432d0db9ee8429a9923a1d995935b6b83552.1602047370.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7a6d94f0ed957fb667d4d74c5c6c640a26e87c8f Author: Mike Travis Date: Mon Oct 5 15:39:29 2020 -0500 x86/platform/uv: Update Copyrights to conform to HPE standards Add Copyrights to those files that have been updated for UV5 changes. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201005203929.148656-14-mike.travis@hpe.com commit ae5f8ce3c247b8d937782e76802a9036c09998ad Author: Mike Travis Date: Mon Oct 5 15:39:28 2020 -0500 x86/platform/uv: Update for UV5 NMI MMR changes The UV NMI MMR addresses and fields moved between UV4 and UV5 necessitating a rewrite of the UV NMI handler. Adjust references to accommodate those changes. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Dimitri Sivanich Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20201005203929.148656-13-mike.travis@hpe.com commit 6a7cf55e9f2b743695adac84375548aa18112327 Author: Mike Travis Date: Mon Oct 5 15:39:27 2020 -0500 x86/platform/uv: Update UV5 TSC checking Update check of BIOS TSC sync status to include both possible "invalid" states provided by newer UV5 BIOS. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20201005203929.148656-12-mike.travis@hpe.com commit d6922effe4f3d5c643c8c05d51a572d6db4c9cb3 Author: Mike Travis Date: Mon Oct 5 15:39:26 2020 -0500 x86/platform/uv: Update node present counting The changes in the UV5 arch shrunk the NODE PRESENT table to just 2x64 entries (128 total) so are in to 64 bit MMRs instead of a depth of 64 bits in an array. Adjust references when counting up the nodes present. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Dimitri Sivanich Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20201005203929.148656-11-mike.travis@hpe.com commit a74a7e992caf0745f548a63b263ac34c6a4a29dd Author: Mike Travis Date: Mon Oct 5 15:39:25 2020 -0500 x86/platform/uv: Update UV5 MMR references in UV GRU Make modifications to the GRU mappings to accommodate changes for UV5. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Dimitri Sivanich Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20201005203929.148656-10-mike.travis@hpe.com commit 8540b2cf0de09b6d96b7dce56a16e26ab4fe8a9b Author: Mike Travis Date: Mon Oct 5 15:39:24 2020 -0500 x86/platform/uv: Adjust GAM MMR references affected by UV5 updates Make modifications to the GAM MMR mappings to accommodate changes for UV5. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Dimitri Sivanich Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20201005203929.148656-9-mike.travis@hpe.com commit ffe2febca4304b9288e2d274d2ece5e66c125441 Author: Mike Travis Date: Mon Oct 5 15:39:23 2020 -0500 x86/platform/uv: Update MMIOH references based on new UV5 MMRs Make modifications to the MMIOH mappings to accommodate changes for UV5. [ Fix W=1 build warnings. ] Reported-by: kernel test robot Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20201005203929.148656-8-mike.travis@hpe.com commit 1e61f5a95f1913c015a2d6a1544c108248b3971c Author: Mike Travis Date: Mon Oct 5 15:39:22 2020 -0500 x86/platform/uv: Add and decode Arch Type in UVsystab When the UV BIOS starts the kernel it passes the UVsystab info struct to the kernel which contains information elements more specific than ACPI, and generally pertinent only to the MMRs. These are read only fields so information is passed one way only. A new field starting with UV5 is the UV architecture type so the ACPI OEM_ID field can be used for other purposes going forward. The UV Arch Type selects the entirety of the MMRs available, with their addresses and fields defined in uv_mmrs.h. Reported-by: kernel test robot Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Dimitri Sivanich Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20201005203929.148656-7-mike.travis@hpe.com commit 6c7794423a998478f6df0234d2dd5baa3ccbdb1d Author: Mike Travis Date: Mon Oct 5 15:39:21 2020 -0500 x86/platform/uv: Add UV5 direct references Add new references to UV5 (and UVY class) system MMR addresses and fields primarily caused by the expansion from 46 to 52 bits of physical memory address. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Dimitri Sivanich Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20201005203929.148656-6-mike.travis@hpe.com commit 647128f1536efacca7bedf189790d24b22f03cca Author: Mike Travis Date: Mon Oct 5 15:39:20 2020 -0500 x86/platform/uv: Update UV MMRs for UV5 Update UV MMRs in uv_mmrs.h for UV5 based on Verilog output from the UV Hub hardware design files. This is the next UV architecture with a new class (UVY) being defined for 52 bit physical address masks. Uses a bitmask for UV arch identification so a single test can cover multiple versions. Includes other adjustments to match the uv_mmrs.h file to keep from encountering compile errors. New UV5 functionality is added in the patches that follow. [ Fix W=1 build warnings. ] Reported-by: kernel test robot Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20201005203929.148656-5-mike.travis@hpe.com commit 788b66e34e8ab82a93c63a83ba5a9d04f2f4ae26 Author: Mike Travis Date: Tue Oct 6 16:34:27 2020 -0500 drivers/misc/sgi-xp: Adjust references in UV kernel modules Remove the define is_uv() is_uv_system and just use the latter as is. This removes a conflict with a new symbol in the generated uv_mmrs.h file (is_uv()). Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Dimitri Sivanich Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20201005203929.148656-4-mike.travis@hpe.com commit c4d98077443adf61268ffb8b2c5d63c6176d845f Author: Mike Travis Date: Mon Oct 5 15:39:18 2020 -0500 x86/platform/uv: Remove SCIR MMR references for UV systems UV class systems no longer use System Controller for monitoring of CPU activity provided by this driver. Other methods have been developed for BIOS and the management controller (BMC). Remove that supporting code. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Dimitri Sivanich Link: https://lkml.kernel.org/r/20201005203929.148656-3-mike.travis@hpe.com commit 39297dde7390e01bfd737052fbb5313a09062e2d Author: Mike Travis Date: Mon Oct 5 15:39:17 2020 -0500 x86/platform/uv: Remove UV BAU TLB Shootdown Handler The Broadcast Assist Unit (BAU) TLB shootdown handler is being rewritten to become the UV BAU APIC driver. It is designed to speed up sending IPIs to selective CPUs within the system. Remove the current TLB shutdown handler (tlb_uv.c) file and a couple of kernel hooks in the interim. Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Dimitri Sivanich Link: https://lkml.kernel.org/r/20201005203929.148656-2-mike.travis@hpe.com commit c4485252cf36ae62c8bf12c4aede72345cad0d2b Author: Chaitanya Kulkarni Date: Thu Oct 1 11:54:32 2020 -0700 nvme-core: remove extra condition for vwc In nvme_set_queue_limits() we initialize vwc to false and later add a condition to set vwc true. The value of the vwc can be declare initialized which makes all the blk_queue_XXX() calls uniform. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit af5d6f7ba5f99f8316473557240ae9acdd20a6bd Author: Chaitanya Kulkarni Date: Thu Oct 1 11:54:31 2020 -0700 nvme-core: remove extra variable In nvme_validate_ns() the exra variable ctrl is used only twice. Using ns->ctrl directly still maintains the redability and original length of the lines in the code. Get rid of the extra variable ctrl & use ns->ctrl directly. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 7b15336257ed5623cddefa8d33069777494c98e0 Author: Christoph Hellwig Date: Mon Sep 28 14:08:28 2020 +0200 nvme: remove nvme_identify_ns_list Just fold it into the only caller. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni commit 0a05226a3a2038b28d78101239196222d375124a Author: Christoph Hellwig Date: Mon Sep 28 13:59:06 2020 +0200 nvme: refactor nvme_validate_ns Move the logic to revalidate the block_device size or remove the namespace from the caller into nvme_validate_ns. This removes the return value and thus the status code translation. Additionally it also catches non-permanent errors from nvme_update_ns_info using the existing logic. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Damien Le Moal commit b2dc748a70c65a1b4eb1b9fceab57662cfd83e41 Author: Christoph Hellwig Date: Mon Sep 28 13:55:22 2020 +0200 nvme: move nvme_validate_ns Move nvme_validate_ns just above its only remaining caller. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Damien Le Moal commit 8b7c0ff2d46dad4974e84f2363d7e0ddefaf0677 Author: Christoph Hellwig Date: Mon Sep 28 14:07:56 2020 +0200 nvme: query namespace identifiers before adding the namespace Check the namespace identifier list first thing when scanning namespaces. This keeps the code to query the CSI common between the alloc and validate path, and helps to structure the code better for multiple command set support. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Damien Le Moal commit 3a9967ba7ace91153f9caa8e60a55c7668c7b946 Author: Christoph Hellwig Date: Mon Sep 28 12:30:16 2020 +0200 nvme: revalidate zone bitmaps in nvme_update_ns_info Consolidate the two calls into a single place. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch commit af0f446d2cad06bd678e9b912f7653b63d87fd6b Author: Christoph Hellwig Date: Mon Sep 28 11:10:36 2020 +0200 nvme: remove nvme_update_formats Now that the queue is frozen before updating ->lba_shift we can't hit the invalid references mentioned in the comment any more. More importantly this code would not have helped us if the format was changed by another controller or through implementation defined back channels. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Damien Le Moal commit 75eb779ee0d343d1eb6d8c19205bc76a1d3ba2ed Author: Christoph Hellwig Date: Fri Sep 25 08:34:43 2020 +0200 nvme: update the known admin effects A Format NVM command can change the capabilities of namespaces, while Sanitize does change the Logical Block Content and must be serialized. Also remove CSUPP bit for Format - it is not a mandatory command, and we don't check for the bit anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal commit 658d9f7c2c7044f9978623e7f429b85bbb7553a3 Author: Christoph Hellwig Date: Mon Sep 28 12:05:28 2020 +0200 nvme: set the queue limits in nvme_update_ns_info Only set the queue limits once we have the real block size. This also updates the limits on a rescan if needed. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal commit 310b30e575b1e2b9a569c3582062b79c5a562fb7 Author: Christoph Hellwig Date: Mon Sep 28 12:12:02 2020 +0200 nvme: remove the 0 lba_shift check in nvme_update_ns_info We can no longer reach this code if Identify Namespace failed. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal commit 13f0b26bbf0a8660d23cad22ed0c4b58b5675dc4 Author: Christoph Hellwig Date: Mon Sep 28 12:03:13 2020 +0200 nvme: clean up the check for too large logic block sizes Use a single statement to set both the capacity and fake block size instead of two. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch commit f9d5f4579feafa721dba2f350fc064a1852c6f8c Author: Christoph Hellwig Date: Mon Sep 28 12:11:42 2020 +0200 nvme: freeze the queue over ->lba_shift updates Ensure that there can't be any I/O in flight went we change the disk geometry in nvme_update_ns_info, most notable the LBA size by lifting the queue free from nvme_update_disk_info into the caller Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Damien Le Moal commit d4609ea8b3d3fb3423f35805843a82774cb4ef2f Author: Christoph Hellwig Date: Fri Sep 25 07:19:13 2020 +0200 nvme: factor out a nvme_configure_metadata helper Factor out a helper from nvme_update_ns_info that configures the per-namespaces metadata and PI settings. Also make sure the helpers clear the flags explicitly instead of all of ->features to allow for potentially reusing ->features for future non-metadata flags. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal commit fab72f5a046883ae5851c95b7c6e7a08f984e391 Author: Christoph Hellwig Date: Mon Sep 28 12:34:04 2020 +0200 nvme: call nvme_identify_ns as the first thing in nvme_alloc_ns_block Check if the namespace actually exists as the very first thing and don't bother with any extra work if not. This should speed up and simplify the sequential scanning for NVMe 1.0 devices. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal commit b8b8cd013327327e757529a0725a8c754c7890e3 Author: Christoph Hellwig Date: Mon Sep 28 12:33:19 2020 +0200 nvme: lift the check for an unallocated namespace into nvme_identify_ns Move the check from the two callers into the common helper. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg commit 81382f1730d24a60e2b0499592e64e6e640b1871 Author: Christoph Hellwig Date: Mon Sep 28 12:14:20 2020 +0200 nvme: rename __nvme_revalidate_disk Rename __nvme_revalidate_disk to nvme_update_ns_info and pass a namespace instead of the gendisk. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal commit 2124f096fb4521d8efdf2412e9102d475ff5cd36 Author: Christoph Hellwig Date: Mon Sep 28 10:25:54 2020 +0200 nvme: rename _nvme_revalidate_disk Rename _nvme_revalidate_disk to nvme_validate_ns to better describe what the function does, and pass the struct nvme_ns instead of the gendisk to better match the call chain. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal commit eba9bcf7fef0c4a880245b9a261186a879742355 Author: Christoph Hellwig Date: Mon Sep 28 09:42:17 2020 +0200 nvme: rename nvme_validate_ns to nvme_validate_or_alloc_ns Use a slightly more descriptive name to enable reusing nvme_validate_ns in the next patch for a lower level function. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal commit d525c3c023221619748d1e758e5a26daa775f822 Author: Christoph Hellwig Date: Thu Aug 20 14:02:18 2020 +0200 nvme: remove the disk argument to nvme_update_zone_info The queue can trivially be derived from the nvme_ns structure. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal commit 7fad20dd7c0ab1d2c224755a574576be25f13e03 Author: Christoph Hellwig Date: Thu Aug 20 09:31:36 2020 +0200 nvme: fix initialization of the zone bitmaps The removal of the ->revalidate_disk method broke the initialization of the zone bitmaps, as nvme_revalidate_disk now never gets called during initialization. Move the zone related code from nvme_revalidate_disk into a new helper in zns.c, and call it from nvme_alloc_ns in addition to nvme_validate_ns to ensure the zone bitmaps are initialized during probe. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Damien Le Moal commit 6fcd669514794da08ce6bfa272b6ec9b33cb543d Author: Christoph Hellwig Date: Thu Aug 20 09:56:58 2020 +0200 block: optimize blk_queue_zoned_model for !CONFIG_BLK_DEV_ZONED Always return BLK_ZONED_NONE if zoned device support is not enabled. This allows various compiler optimizations including the dead code elimination that we so like for avoiding ifdefs. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal commit 1401fcc4e3da97c44dcc7cbf538c07e24768d791 Author: Chaitanya Kulkarni Date: Tue Sep 29 21:24:17 2020 -0700 nvme-loop: don't put ctrl on nvme_init_ctrl error The function nvme_init_ctrl() gets the ctrl reference & when it fails it does put the ctrl reference in the error unwind code. When creating loop ctrl in nvme_loop_create_ctrl() if nvme_init_ctrl() returns non zero (i.e. error) value it jumps to the "out_put_ctrl" label which calls nvme_put_ctrl(), that will lead to douple ctrl put in error unwind path. Update nvme_loop_create_ctrl() such that this patch removes the "out_put_ctrl" label, add a new "out" label after nvme_put_ctrl() in error unwind path and jump to newly added label when nvme_init_ctrl() call retuns an error. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 8a30c6eb29e036f729b4dd6982462ca15d062087 Author: Mika Penttilä Date: Tue Oct 6 21:10:35 2020 -0700 Input: Add MAINTAINERS entry for SiS i2c touch input driver I am the author of this SiS touch driver, and willing to maintain and develop it further. Signed-off-by: Mika Penttilä Link: https://lore.kernel.org/r/20201007035108.58636-1-mika.penttila@nextfour.com Signed-off-by: Dmitry Torokhov commit bf88a80a0407e67f21ceafbf03828086f149dfad Author: Hao Luo Date: Tue Oct 6 19:28:57 2020 -0700 selftests/bpf: Fix test_verifier after introducing resolve_pseudo_ldimm64 Commit 4976b718c355 ("bpf: Introduce pseudo_btf_id") switched the order of check_subprogs() and resolve_pseudo_ldimm() in the verifier. Now an empty prog expects to see the error "last insn is not an the prog of a single invalid ldimm exit or jmp" instead, because the check for subprogs comes first. It's now pointless to validate that half of ldimm64 won't be the last instruction. Tested: # ./test_verifier Summary: 1129 PASSED, 537 SKIPPED, 0 FAILED and the full set of bpf selftests. Fixes: 4976b718c355 ("bpf: Introduce pseudo_btf_id") Signed-off-by: Hao Luo Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201007022857.2791884-1-haoluo@google.com commit 4ba8b8aec58bf8de3ca29ea08d7eb11a127e7b90 Author: Kenny Levinsen Date: Mon Oct 5 11:15:55 2020 -0700 Input: evdev - per-client waitgroups All evdev clients share a common waitgroup. On new input events, all clients waiting on this waitgroup are woken up, even those filtering out the events, possibly more than once per event. This leads to duplicated and unwanted wakeups. Split the shared waitgroup into per-client waitgroups for more fine-grained wakeups. Signed-off-by: Kenny Levinsen Link: https://lore.kernel.org/r/20200429184126.2155-1-kl@kl.wtf Signed-off-by: Dmitry Torokhov commit 69f4ec1edb136d2d2511d1ef96f94ef0aeecefdf Author: Xiang Chen Date: Fri Oct 2 22:30:38 2020 +0800 scsi: hisi_sas: Recover PHY state according to the status before reset Currently the PHY state is set according to the state of the PHYs after reset. This is invalid as the PHYs are already re-initialized. Set PHY state according to the state before the reset instead of after. Link: https://lore.kernel.org/r/1601649038-25534-8-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit b14a37e011d829404c29a5ae17849d7efb034893 Author: Xiang Chen Date: Fri Oct 2 22:30:37 2020 +0800 scsi: hisi_sas: Filter out new PHY up events during suspend Currently sas_resume_ha() is called while resuming the controller to wait for all suspended PHYs to come up and all the libsas events to be completed. There is a scenario which will cause task hung: For direct attach with two disks connected with two PHYs, disable phy0 before suspending the disk on phy1 and the controller, then enable phy0 and resume the controller, and task hung occurs as follows: [ 591.901463] hisi_sas_v3_hw 0000:b4:02.0: resuming from operating state [D0] [ 593.113525] hisi_sas_v3_hw 0000:b4:02.0: neither _PS0 nor _PR0 is defined [ 593.120301] hisi_sas_v3_hw 0000:b4:02.0: waiting up to 25 seconds for 1 phy to resume [ 593.120836] hisi_sas_v3_hw 0000:b4:02.0: phyup: phy0 link_rate=10(sata) [ 593.134680] hisi_sas_v3_hw 0000:b4:02.0: phyup: phy1 link_rate=10(sata) [ 593.134733] sas: phy-2:0 added to port-2:0, phy_mask:0x1 (5000000000000200) [ 593.148350] sas: DOING DISCOVERY on port 0, pid:948 [ 593.153227] hisi_sas_v3_hw 0000:b4:02.0: dev[3:5] found [ 593.159840] sas: Enter sas_scsi_recover_host busy: 0 failed: 0 [ 593.165663] sas: ata7: end_device-2:0: dev error handler [ 593.165730] sas: ata2: end_device-2:1: dev error handler [ 593.172532] hisi_sas_v3_hw 0000:b4:02.0: phydown: phy0 phy_state=0x2 [ 593.182570] hisi_sas_v3_hw 0000:b4:02.0: ignore flutter phy0 down [ 593.331277] hisi_sas_v3_hw 0000:b4:02.0: phyup: phy0 link_rate=10(sata) [ 593.498956] ata7.00: ATA-11: SAMSUNG MZ7LH960HAJR-00005, HXT7404Q, max UDMA/133 [ 593.506235] ata7.00: 1875385008 sectors, multi 16: LBA48 NCQ (depth 32) [ 593.514295] ata7.00: configured for UDMA/133 [ 593.518557] sas: --- Exit sas_scsi_recover_host: busy: 0 failed: 0 tries: 1 [ 593.528613] sas: ata7: end_device-2:0: model:SAMSUNG MZ7LH960HAJR-00005 serial:S45NNA0M712225 [ 593.537520] device_link_add 316: dev=2:0:2:0 supplier:2 consumer:0 [ 593.543674] device_link_add 324 [ 593.546801] device_link_add 352 [ 593.549930] device_link_add 406 [ 593.553058] device_link_add 440: dev=2:0:2:0 supplier:2 consumer:0 [ 593.559208] device_link_add 444 [ 593.562335] device_link_add 455 [ 593.565517] scsi 2:0:2:0: Direct-Access ATA SAMSUNG MZ7LH960 404Q PQ: 0 ANSI: 5 [ 620.057464] phy-2:1: resume timeout [ 738.841445] INFO: task kworker/u256:0:8 blocked for more than 120 seconds. [ 738.848295] Not tainted 5.8.0-rc1-76154-g0d52b59-dirty #744 [ 738.854361] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 738.862155] kworker/u256:0 D 0 8 2 0x00000028 [ 738.867626] Workqueue: 0000:b4:02.0_event_q sas_port_event_worker [ 738.873693] Call trace: [ 738.876133] __switch_to+0xf4/0x148 [ 738.879613] __schedule+0x270/0x5d8 [ 738.883091] schedule+0x78/0x110 [ 738.886307] schedule_timeout+0x1ac/0x280 [ 738.890299] wait_for_completion+0x94/0x138 [ 738.894472] flush_workqueue+0x114/0x438 [ 738.898377] sas_porte_bytes_dmaed+0x400/0x500 [ 738.902801] sas_port_event_worker+0x28/0x40 [ 738.907053] process_one_work+0x1e8/0x360 [ 738.911046] worker_thread+0x44/0x478 [ 738.914698] kthread+0x150/0x158 [ 738.917915] ret_from_fork+0x10/0x1c [ 738.921534] INFO: task kworker/u256:1:948 blocked for more than 120 seconds. [ 738.928550] Not tainted 5.8.0-rc1-76154-g0d52b59-dirty #744 [ 738.934614] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 738.942408] kworker/u256:1 D 0 948 2 0x00000028 [ 738.947873] Workqueue: 0000:b4:02.0_disco_q sas_discover_domain [ 738.953766] Call trace: [ 738.956203] __switch_to+0xf4/0x148 [ 738.959678] __schedule+0x270/0x5d8 [ 738.963152] schedule+0x78/0x110 [ 738.966368] rpm_resume+0xcc/0x550 [ 738.969757] __pm_runtime_resume+0x3c/0x88 [ 738.973836] rpm_get_suppliers+0x50/0x148 [ 738.977829] __pm_runtime_set_status+0x124/0x2f0 [ 738.982427] scsi_sysfs_add_sdev+0x1a0/0x2a8 [ 738.986679] scsi_probe_and_add_lun+0x888/0xab0 [ 738.991190] __scsi_scan_target+0xec/0x520 [ 738.995268] scsi_scan_target+0x11c/0x128 [ 738.999261] sas_rphy_add+0x15c/0x1e8 [ 739.002907] sas_probe_devices+0xe4/0x150 [ 739.006899] sas_discover_domain+0x33c/0x588 [ 739.011150] process_one_work+0x1e8/0x360 [ 739.015143] worker_thread+0x44/0x478 [ 739.018789] kthread+0x150/0x158 [ 739.022003] ret_from_fork+0x10/0x1c ... If an extra phy0 up happens during resume of the SAS controller, it will emit a new libsas event (event PORTE_BYTES_DMAED and event DISCE_DISCOVER_DOMAIN). We will call function scsi_sysfs_add_sdev() in event DISCE_DISCOVER_DOMAIN, which will call __pm_runtime_set_status() to resume supplier (host controller). For runtime PM core, if device is in the resuming state, the later resume request of the device will wait for previous resume request to complete synchronously. At that point in time the state of the controller is still resuming as it waits for all libsas events to be completed, while libsas event DISCE_DISCOVER_DOMAIN is blocked as the state of the controller is resuming which causes a deadlock. To avoid the issue, filter out new PHY up events while the controller is suspended. Link: https://lore.kernel.org/r/1601649038-25534-7-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 16fd4a7c5917097e9a3da03b39a92381eee40724 Author: Xiang Chen Date: Fri Oct 2 22:30:36 2020 +0800 scsi: hisi_sas: Add device link between SCSI devices and hisi_hba Runtime PM of SCSI devices is already supported in SCSI layer, we can suspend/resume every SCSI device separately. But if there is no link between hisi_hba and SCSI devices or SCSI targets it will cause issues if the controller is suspended while SCSI devices are still resuming. Only when all the SCSI devices under the controller are suspended, the controller can be suspended. Add the device link between SCSI devices and the controller. Link: https://lore.kernel.org/r/1601649038-25534-6-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit e06596d5000c58f35721f334fe2eee28e3b01a77 Author: Xiang Chen Date: Fri Oct 2 22:30:35 2020 +0800 scsi: hisi_sas: Add check for methods _PS0 and _PR0 To support system suspend/resume or runtime suspend/resume, need to use the function pci_set_power_state() to change the power state which requires at least method _PS0 or _PR0 be filled by platform for v3 hw. So check whether the method is supported, if not, print a warning. A Kconfig dependency is added as there is no stub for acpi_device_power_manageable(). Link: https://lore.kernel.org/r/1601649038-25534-5-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 65ff4aef7e9bde00871875c5fbc9c6b79df6f5ba Author: Xiang Chen Date: Fri Oct 2 22:30:34 2020 +0800 scsi: hisi_sas: Add controller runtime PM support for v3 hw Add controller runtime PM support for v3 hw. Link: https://lore.kernel.org/r/1601649038-25534-4-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 6c459ea1542b8937779cbeefb2b1cc77a554c29c Author: Xiang Chen Date: Fri Oct 2 22:30:33 2020 +0800 scsi: hisi_sas: Switch to new framework to support suspend and resume For v3 hw we will add support for runtime PM which is only supported in new framework. Legacy PM support and new framework are not allowed to be used together. Switch to new framework to support suspend and resume. Link: https://lore.kernel.org/r/1601649038-25534-3-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 7f054da7738a66fc70239ee899e74d899bad3834 Author: Luo Jiaxing Date: Fri Oct 2 22:30:32 2020 +0800 scsi: hisi_sas: Use hisi_hba->cq_nvecs for calling calling synchronize_irq() A call trace is observed when running function level reset with online CPUs less than 16 and MSI auto-affinity enabled. [16538.348038] Call trace: [16538.348422] pci_irq_vector+0x98/0xc0 [16538.348947] disable_host_v3_hw+0x8c/0x288 [hisi_sas_v3_hw] [16538.349706] hisi_sas_reset_prepare_v3_hw+0x60/0x88 [hisi_sas_v3_hw] [16538.350631] pci_dev_save_and_disable+0x38/0x68 [16538.351290] pci_reset_function+0x44/0x88 [16538.351846] reset_store+0x6c/0xb8 [16538.352429] dev_attr_store+0x44/0x60 [16538.353035] sysfs_kf_write+0x58/0x80 [16538.353558] kernfs_fop_write+0x140/0x230 [16538.354175] __vfs_write+0x48/0x80 [16538.354675] vfs_write+0xb8/0x1d8 [16538.355145] ksys_write+0x74/0xf8 [16538.355615] __arm64_sys_write+0x24/0x30 [16538.356240] el0_svc_common.constprop.4+0x80/0x1f0 [16538.356905] do_el0_svc+0x2c/0x38 [16538.357408] el0_svc+0x14/0x40 [16538.357848] el0_sync_handler+0xbc/0x2ec [16538.358388] el0_sync+0x140/0x180 The reason is that if we use pci_alloc_irq_vectors_affinity() to allocate IRQs, the number of CQ IRQs can only be less than or equal to the number of online CPUs, but we use hisi_hba->queue_count (always 16) to iterate during interrupt_disable_v3_hw(). Use hisi_hba->cq_nvecs to replace hisi_hba->queue_count to avoid synchronize IRQ on a CPU which does not exist. Link: https://lore.kernel.org/r/1601649038-25534-2-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 9b20aec24b8ab2860ea41182ba554dfcc444c0c8 Author: Chu Lin Date: Sun Oct 4 03:14:45 2020 +0000 hwmon: (pmbus/max20730) adjust the vout reading given voltage divider Problem: We use voltage dividers so that the voltage presented at the voltage sense pins is confusing. We might need to convert these readings to more meaningful readings given the voltage divider. Solution: Read the voltage divider resistance from dts and convert the voltage reading to a more meaningful reading. Testing: max20730 with voltage divider Signed-off-by: Chu Lin Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20201004031445.2321090-3-linchuyuan@google.com [groeck: Return -EINVAL instead of -ENODEV on bad deevicetree data] Signed-off-by: Guenter Roeck commit b9a9a375438e24ac36a82c56259aeccfc7b88346 Author: Chu Lin Date: Sun Oct 4 03:14:44 2020 +0000 dt-bindings: hwmon: max20730: adding device tree doc for max20730 max20730 Integrated, Step-Down Switching Regulator with PMBus Signed-off-by: Chu Lin Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201004031445.2321090-2-linchuyuan@google.com Signed-off-by: Guenter Roeck commit 9d823351a337484ad0ed436c626dd4967b5602dd Author: Rahul Tanwar Date: Mon Oct 5 17:27:46 2020 +0800 hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller PVT controller (MR75203) is used to configure & control Moortec embedded analog IP which contains temprature sensor(TS), voltage monitor(VM) & process detector(PD) modules. Add hardware monitoring driver to support MR75203 PVT controller. Signed-off-by: Rahul Tanwar Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/05b59cd860d2a1aa0a68ab300829efe709645184.1601889876.git.rahul.tanwar@linux.intel.com Signed-off-by: Guenter Roeck commit 748022ef093f73d424115ee40bf205dbbe8fb198 Author: Rahul Tanwar Date: Mon Oct 5 17:27:45 2020 +0800 hwmon: Add DT bindings schema for PVT controller PVT controller (MR75203) is used to configure & control Moortec embedded analog IP which contains temprature sensor(TS), voltage monitor(VM) & process detector(PD) modules. Add DT bindings schema for PVT controller. Signed-off-by: Rahul Tanwar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/b540b49ca47d75c5f716f8a4e4eed0664a1116bf.1601889876.git.rahul.tanwar@linux.intel.com Signed-off-by: Guenter Roeck commit 81f1f5ae8b3cbd54fdd994c9e9aacdb7b414a802 Author: Lucas Stach Date: Tue Aug 11 10:15:44 2020 +0200 can: m_can_platform: don't call m_can_class_suspend in runtime suspend 0704c5743694 can: m_can_platform: remove unnecessary m_can_class_resume() call removed the m_can_class_resume() call in the runtime resume path to get rid of a infinite recursion, so the runtime resume now only handles the device clocks. Unfortunately it did not remove the complementary m_can_class_suspend() call in the runtime suspend function, so those paths are now unbalanced, which causes the pinctrl state to get stuck on the "sleep" state, which breaks all CAN functionality on SoCs where this state is defined. Remove the m_can_class_suspend() call to fix this. Fixes: 0704c5743694 can: m_can_platform: remove unnecessary m_can_class_resume() call Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20200811081545.19921-1-l.stach@pengutronix.de Acked-by: Dan Murphy Signed-off-by: Marc Kleine-Budde commit f55a52bb2cdbc5a92ca209d0ada90a490a188f58 Author: Vincent Mailhol Date: Sat Oct 3 00:41:46 2020 +0900 can: dev: fix type of get_can_dlc() and get_canfd_dlc() macros The macros get_can_dlc() and get_canfd_dlc() are not visible in userland. As such, type u8 should be preferred over type __u8. Reference: https://lkml.org/lkml/2020/10/1/708 Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/r/20201002154219.4887-3-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde commit eb88531bdbfaafb827192d1fc6c5a3fcc4fadd96 Author: Vincent Mailhol Date: Sun Sep 27 01:24:31 2020 +0900 can: raw: add missing error queue support Error queue are not yet implemented in CAN-raw sockets. The problem: a userland call to recvmsg(soc, msg, MSG_ERRQUEUE) on a CAN-raw socket would unqueue messages from the normal queue without any kind of error or warning. As such, it prevented CAN drivers from using the functionalities that relies on the error queue such as skb_tx_timestamp(). SCM_CAN_RAW_ERRQUEUE is defined as the type for the CAN raw error queue. SCM stands for "Socket control messages". The name is inspired from SCM_J1939_ERRQUEUE of include/uapi/linux/can/j1939.h. Signed-off-by: Vincent Mailhol Link: https://lore.kernel.org/r/20200926162527.270030-1-mailhol.vincent@wanadoo.fr Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit d61469dc87ad928b16b1edd90fb59e401c3f4565 Author: Lukas Bulwahn Date: Sat Oct 3 09:55:00 2020 +0200 MAINTAINERS: adjust to mcp251xfd file renaming Commit 27cf93863cbc ("MAINTAINERS: Add entry for Microchip MCP25XXFD SPI-CAN network driver"), added the MCP25XXFD SPI-CAN NETWORK DRIVER section with the following two file entries: F: Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml F: drivers/net/can/spi/mcp25xxfd/ Commit 1f0e21a0c065 ("can: mcp251xfd: rename driver files and subdir to mcp251xfd") renamed the files from mcp25xxfd to mcp251xfd, but missed to adjust the MAINTAINERS section. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: \ Documentation/devicetree/bindings/net/can/microchip,mcp25xxfd.yaml warning: no file matches F: drivers/net/can/spi/mcp25xxfd/ Adjust the MCP251XFD SPI-CAN NETWORK DRIVER section to this driver file renaming. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20201003075500.12477-1-lukas.bulwahn@gmail.com Signed-off-by: Marc Kleine-Budde commit 71e663c4a02213d1013a3def4ed10ca63769bbb2 Author: Marc Kleine-Budde Date: Tue Oct 6 17:28:36 2020 +0200 can: c_can: reg_map_{c,d}_can: mark as __maybe_unused This patch marks the arrays reg_map_c_can and reg_map_d_can as __maybe_unused, as they are indeed unused in the c_can driver. This warning shows up, when compiling the kernel with "W=1": drivers/net/can/c_can/c_can.c:45: drivers/net/can/c_can/c_can.h:124:18: warning: ‘reg_map_d_can’ defined but not used [-Wunused-const-variable=] drivers/net/can/c_can/c_can.h:84:18: warning: ‘reg_map_c_can’ defined but not used [-Wunused-const-variable=] Link: http://lore.kernel.org/r/20201006203748.1750156-4-mkl@pengutronix.de Fixes: 33f810097769 ("can: c_can: Move overlay structure to array with offset as index") Fixes: 69927fccd96b ("can: c_can: Add support for Bosch D_CAN controller") Signed-off-by: Marc Kleine-Budde commit 47fa0336c1b7cfe2003e1e2671f588184ad08e1d Author: Marc Kleine-Budde Date: Tue Oct 6 17:19:31 2020 +0200 can: softing: softing_card_shutdown(): add braces around empty body in an 'if' statement This patch fixes the following warning when building the kernel with "W=1": warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Link: http://lore.kernel.org/r/20201006203748.1750156-3-mkl@pengutronix.de Fixes: 03fd3cf5a179 ("can: add driver for Softing card") Signed-off-by: Marc Kleine-Budde commit 80ede649ea0ac09c8f487951a4a03b86608aea7f Author: Marc Kleine-Budde Date: Sun Oct 4 14:09:48 2020 +0200 can: af_can: can_rcv_list_find(): fix kernel doc after variable renaming This patch fixes the kernel doc for can_rcv_list_find() which was broken in commit: 3ee6d2bebef8 ("can: af_can: rename find_rcv_list() to can_rcv_list_find()") while renaming a variable, but forgetting to rename the kernel doc, too. Link: http://lore.kernel.org/r/20201006203748.1750156-2-mkl@pengutronix.de Fixes: 3ee6d2bebef8 ("can: af_can: rename find_rcv_list() to can_rcv_list_find()") Signed-off-by: Marc Kleine-Budde commit a926c7afffcc0f2e35e6acbccb16921bacf34617 Author: Gabriel Krisman Bertazi Date: Tue Oct 6 15:41:25 2020 -0400 block: Consider only dispatched requests for inflight statistic According to Documentation/block/stat.rst, inflight should not include I/O requests that are in the queue but not yet dispatched to the device, but blk-mq identifies as inflight any request that has a tag allocated, which, for queues without elevator, happens at request allocation time and before it is queued in the ctx (default case in blk_mq_submit_bio). In addition, current behavior is different for queues with elevator from queues without it, since for the former the driver tag is allocated at dispatch time. A more precise approach would be to only consider requests with state MQ_RQ_IN_FLIGHT. This effectively reverts commit 6131837b1de6 ("blk-mq: count allocated but not started requests in iostats inflight") to consolidate blk-mq behavior with itself (elevator case) and with original documentation, but it differs from the behavior used by the legacy path. This version differs from v1 by using blk_mq_rq_state to access the state attribute. Avoid using blk_mq_request_started, which was suggested, since we don't want to include MQ_RQ_COMPLETE. Signed-off-by: Gabriel Krisman Bertazi Cc: Omar Sandoval Signed-off-by: Jens Axboe commit efc2360b2873abbff0d6b46b6ad610daa8e5d197 Author: Alban Bedel Date: Thu Oct 1 16:57:37 2020 +0200 dt-bindings: hwmon: Add the +vs supply to the lm75 bindings Some boards might have a regulator that control the +VS supply, add it to the bindings. Signed-off-by: Alban Bedel Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201001145738.17326-3-alban.bedel@aerq.com Signed-off-by: Guenter Roeck commit 3e37c9d48f7a71b682e98e915eff21ab8624af03 Author: Alban Bedel Date: Thu Oct 1 16:57:36 2020 +0200 dt-bindings: hwmon: Convert lm75 bindings to yaml In order to automate the verification of DT nodes convert lm75.txt to lm75.yaml. Signed-off-by: Alban Bedel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201001145738.17326-2-alban.bedel@aerq.com Signed-off-by: Guenter Roeck commit 73c5265913b4b11a56d119396f745a57c7c272b7 Author: Colin Ian King Date: Tue Oct 6 12:47:00 2020 +0100 RDMA/bnxt_re: Fix sizeof mismatch for allocation of pbl_tbl. An incorrect sizeof is being used, u64 * is not correct, it should be just u64 for a table of umem_pgs number of u64 items in the pbl_tbl. Use the idiom sizeof(*pbl_tbl) to get the object type without the need to explicitly use u64. Link: https://lore.kernel.org/r/20201006114700.537916-1-colin.king@canonical.com Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe commit 6ef999f500213284bb038f1ff0c402791c60e380 Author: Jason Gunthorpe Date: Tue Sep 29 21:24:35 2020 -0300 RDMA/bnxt_re: Use rdma_umem_for_each_dma_block() This driver is taking the SGL out of the umem and passing it through a struct bnxt_qplib_sg_info. Instead of passing the SGL pass the umem and then use rdma_umem_for_each_dma_block() directly. Move the calls of ib_umem_num_dma_blocks() closer to their actual point of use, npages is only set for non-umem pbl flows. Link: https://lore.kernel.org/r/0-v1-b37437a73f35+49c-bnxt_re_dma_block_jgg@nvidia.com Acked-by: Selvin Xavier Tested-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 12d1f4c30ec53df24b973cbb11835989be6a643c Author: Zhen Lei Date: Wed Sep 30 11:17:10 2020 +0800 dt-bindings: arm: hisilicon: convert Hi6220 domain controller bindings to json-schema Convert the Hisilicon Hi6220 domain controllers binding to DT schema format using json-schema. All of them are grouped into one yaml file, to help users understand differences and avoid repeated descriptions. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200930031712.2365-16-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 67ed375530e223624508382a9348a21c3b2ccc09 Author: Ciara Loftus Date: Fri Oct 2 13:36:12 2020 +0000 samples: bpf: Driver interrupt statistics in xdpsock Add an option to count the number of interrupts generated per second and total number of interrupts during the lifetime of the application for a given interface. This information is extracted from /proc/interrupts. Since there is no naming convention across drivers, the user must provide the string which is specific to their interface in the /proc/interrupts file on the command line. Usage: ./xdpsock ... -I eg. for queue 0 of i40e device eth0: ./xdpsock ... -I i40e-eth0-TxRx-0 Signed-off-by: Ciara Loftus Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201002133612.31536-3-ciara.loftus@intel.com commit 60dc609dbd545226e00c9e7b518d0f4873f0a3e1 Author: Ciara Loftus Date: Fri Oct 2 13:36:11 2020 +0000 samples: bpf: Count syscalls in xdpsock Categorise and record syscalls issued in the xdpsock sample app. The categories recorded are: rx_empty_polls: polls when the rx ring is empty fill_fail_polls: polls when failed to get addr from fill ring copy_tx_sendtos: sendtos issued for tx when copy mode enabled tx_wakeup_sendtos: sendtos issued when tx ring needs waking up opt_polls: polls issued since the '-p' flag is set Print the stats using '-a' on the xdpsock command line. Signed-off-by: Ciara Loftus Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201002133612.31536-2-ciara.loftus@intel.com commit 2e8806f032f5d9d5c59b790c73b83842bda78f23 Author: Ciara Loftus Date: Fri Oct 2 13:36:10 2020 +0000 samples: bpf: Split xdpsock stats into new struct New statistics will be added in future commits. In preparation for this, let's split out the existing statistics into their own struct. Signed-off-by: Ciara Loftus Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201002133612.31536-1-ciara.loftus@intel.com commit 544d6adf3c3dddbf80e5757a3098c63612f5f8f8 Author: Yonghong Song Date: Mon Oct 5 21:34:27 2020 -0700 samples/bpf: Fix a compilation error with fallthrough marking Compiling samples/bpf hits an error related to fallthrough marking. ... CC samples/bpf/hbm.o samples/bpf/hbm.c: In function ‘main’: samples/bpf/hbm.c:486:4: error: ‘fallthrough’ undeclared (first use in this function) fallthrough; ^~~~~~~~~~~ The "fallthrough" is not defined under tools/include directory. Rather, it is "__fallthrough" is defined in linux/compiler.h. Including "linux/compiler.h" and using "__fallthrough" fixed the issue. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201006043427.1891805-1-yhs@fb.com commit 9618bde489b2d23779b1e2d04c10983da21f3818 Author: Yonghong Song Date: Mon Oct 5 21:34:26 2020 -0700 samples/bpf: Change Makefile to cope with latest llvm With latest llvm trunk, bpf programs under samples/bpf directory, if using CORE, may experience the following errors: LLVM ERROR: Cannot select: intrinsic %llvm.preserve.struct.access.index PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Program arguments: llc -march=bpf -filetype=obj -o samples/bpf/test_probe_write_user_kern.o 1. Running pass 'Function Pass Manager' on module ''. 2. Running pass 'BPF DAG->DAG Pattern Instruction Selection' on function '@bpf_prog1' #0 0x000000000183c26c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/users/yhs/work/llvm-project/llvm/build.cur/install/bin/llc+0x183c26c) ... #7 0x00000000017c375e (/data/users/yhs/work/llvm-project/llvm/build.cur/install/bin/llc+0x17c375e) #8 0x00000000016a75c5 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/data/users/yhs/work/llvm-project/llvm/build.cur/install/bin/llc+0x16a75c5) #9 0x00000000016ab4f8 llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/data/users/yhs/work/llvm-project/llvm/build.cur/install/bin/llc+0x16ab4f8) ... Aborted (core dumped) | llc -march=bpf -filetype=obj -o samples/bpf/test_probe_write_user_kern.o The reason is due to llvm change https://reviews.llvm.org/D87153 where the CORE relocation global generation is moved from the beginning of target dependent optimization (llc) to the beginning of target independent optimization (opt). Since samples/bpf programs did not use vmlinux.h and its clang compilation uses native architecture, we need to adjust arch triple at opt level to do CORE relocation global generation properly. Otherwise, the above error will appear. This patch fixed the issue by introduce opt and llvm-dis to compilation chain, which will do proper CORE relocation global generation as well as O2 level optimization. Tested with llvm10, llvm11 and trunk/llvm12. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201006043427.1891742-1-yhs@fb.com commit 6b49329ae68caeefbd0d69ff85475cd54a4b0d03 Author: Sagar Kadam Date: Tue Sep 29 21:02:11 2020 +0530 dt-bindings: riscv: convert pwm bindings to json-schema Convert device tree bindings for SiFive's PWM controller to YAML format. Signed-off-by: Sagar Kadam Link: https://lore.kernel.org/r/1601393531-2402-4-git-send-email-sagar.kadam@sifive.com Signed-off-by: Rob Herring commit c825a081c169cc7f2b956a4b29c878662834e672 Author: Sagar Kadam Date: Tue Sep 29 21:02:10 2020 +0530 dt-bindings: riscv: convert plic bindings to json-schema Convert device tree bindings for SiFive's PLIC to YAML format Signed-off-by: Sagar Kadam Link: https://lore.kernel.org/r/1601393531-2402-3-git-send-email-sagar.kadam@sifive.com Signed-off-by: Rob Herring commit 406171bf9a19b15dcf80173048e444ce164381fe Author: Sagar Kadam Date: Tue Sep 29 21:02:09 2020 +0530 dt-bindings: fu540: prci: convert PRCI bindings to json-schema FU540-C000 SoC from SiFive has a PRCI block, here we convert the device tree bindings from txt to YAML. Signed-off-by: Sagar Kadam Link: https://lore.kernel.org/r/1601393531-2402-2-git-send-email-sagar.kadam@sifive.com Signed-off-by: Rob Herring commit 8cee9107e72c93a52a7f2c58658c99887bdb05e0 Author: Luigi Rizzo Date: Mon Oct 5 15:45:28 2020 -0700 bpf, libbpf: Use valid btf in bpf_program__set_attach_target bpf_program__set_attach_target(prog, fd, ...) will always fail when fd = 0 (attach to a kernel symbol) because obj->btf_vmlinux is NULL and there is no way to set it (at the moment btf_vmlinux is meant to be temporary storage for use in bpf_object__load_xattr()). Fix this by using libbpf_find_vmlinux_btf_id(). At some point we may want to opportunistically cache btf_vmlinux so it can be reused with multiple programs. Signed-off-by: Luigi Rizzo Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Petar Penkov Link: https://lore.kernel.org/bpf/20201005224528.389097-1-lrizzo@google.com commit fd08f944e0c49b26ee80b87e3c7dc0aa4f045ef3 Merge: dca4121cdc480 44c4aa2bd1511 Author: Alexei Starovoitov Date: Tue Oct 6 11:10:20 2020 -0700 Merge branch 'Fix pining maps after reuse map fd' Hangbin Liu says: ==================== When a user reuse map fd after creating a map manually and set the pin_path, then load the object via libbpf. bpf_object__create_maps() will skip pinning map if map fd exist. Fix it by add moving bpf creation to else condition and go on checking map pin_path after that. v3: for selftest: use CHECK() for bpf_object__open_file() and close map fd on error v2: a) close map fd if init map slots failed b) add bpf selftest for this scenario ==================== Signed-off-by: Alexei Starovoitov commit 44c4aa2bd1511ebd7f24d4a2eb7a26053d51d6ae Author: Hangbin Liu Date: Tue Oct 6 10:13:45 2020 +0800 selftest/bpf: Test pinning map with reused map fd This add a test to make sure that we can still pin maps with reused map fd. Signed-off-by: Hangbin Liu Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201006021345.3817033-4-liuhangbin@gmail.com commit 2c193d32caee83322a8511a88ba0cd097bba73f1 Author: Hangbin Liu Date: Tue Oct 6 10:13:44 2020 +0800 libbpf: Check if pin_path was set even map fd exist Say a user reuse map fd after creating a map manually and set the pin_path, then load the object via libbpf. In libbpf bpf_object__create_maps(), bpf_object__reuse_map() will return 0 if there is no pinned map in map->pin_path. Then after checking if map fd exist, we should also check if pin_path was set and do bpf_map__pin() instead of continue the loop. Fix it by creating map if fd not exist and continue checking pin_path after that. Suggested-by: Andrii Nakryiko Signed-off-by: Hangbin Liu Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201006021345.3817033-3-liuhangbin@gmail.com commit a0f2b7acb4b1d29127ff99c714233b973afd1411 Author: Hangbin Liu Date: Tue Oct 6 10:13:43 2020 +0800 libbpf: Close map fd if init map slots failed Previously we forgot to close the map fd if bpf_map_update_elem() failed during map slot init, which will leak map fd. Let's move map slot initialization to new function init_map_slots() to simplify the code. And close the map fd if init slot failed. Reported-by: Andrii Nakryiko Signed-off-by: Hangbin Liu Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201006021345.3817033-2-liuhangbin@gmail.com commit 36705c6fc4980aa7fe72c7a588e78ac7a0833009 Author: Krzysztof Kozlowski Date: Sat Oct 3 12:33:35 2020 +0200 dt-bindings: vendor-prefixes: favor "gateworks" over "gw" There are two vendor prefixes for Gateworks: "gw" and "gateworks". Favor the longer one (more descriptive) and mark "gw" as deprecated so it will not be used in new bindings. Reviewed-by: Linus Walleij Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201003103335.23404-1-krzk@kernel.org Signed-off-by: Rob Herring commit 8750de90ac28d646f6a57f6d23d9997aa685dffd Author: Dan Carpenter Date: Tue Oct 6 16:47:48 2020 +0300 staging: vchiq: Fix list_for_each exit tests After a list_for_each_entry() loop, the list iterator is always non-NULL so these conditions don't work. If the "waiter" is not found then this results in an out of bounds access. I have fixed it by introducing a new "found" variable. In one case, I used an else statement for readability. Fixes: 46e4b9ec4fa4 ("staging: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20201006134748.GA2076872@mwanda Signed-off-by: Greg Kroah-Hartman commit dba8648dcab90564b8a11c952c06a9e1153506fb Author: Mauro Carvalho Chehab Date: Tue Oct 6 15:21:33 2020 +0200 firmware_loader: fix a kernel-doc markup The firmware_fallback_sysfs had some changes at their parameters. Those ended by dropping a documentation for such parameter. Re-add it. Fixes: 89287c169f8f ("firmware: Store opt_flags in fw_priv") Fixes: c2c076166b58 ("firmware_loader: change enum fw_opt to u32") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/23ec441bb9c206f5899b5d64d34e5c9f6add5fd9.1601990386.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0569b3d8ae17c29f8e09db2ba683be3915fe8b47 Author: Randy Dunlap Date: Mon Oct 5 12:12:44 2020 -0700 ALSA: usb-audio: endpoint.c: fix repeated word 'there' Drop the duplicated word "there". Signed-off-by: Randy Dunlap Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/20201005191244.23902-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai commit 86b9c4cdd76fcfc98c5967f63b4ca09620e67968 Author: Randy Dunlap Date: Mon Oct 5 12:12:23 2020 -0700 ALSA: portman2x4: fix repeated word 'if' Correct duplicated word "if" to "if it". Signed-off-by: Randy Dunlap Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/20201005191223.21514-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai commit 5be478f9c24fbdf8162b8118b8da8cc685e2efb4 Author: Rob Herring Date: Fri Oct 2 18:41:43 2020 -0500 dt-bindings: Another round of adding missing 'additionalProperties' Another round of wack-a-mole. The json-schema default is additional unknown properties are allowed, but for DT all properties should be defined. Cc: Linus Walleij Cc: Stephen Boyd Cc: Shawn Guo Cc: Bjorn Andersson Cc: Baolin Wang Cc: Mauro Carvalho Chehab Cc: Laurent Pinchart Cc: "David S. Miller" Cc: Bjorn Helgaas Cc: Liam Girdwood Cc: Daniel Lezcano Reviewed-by: Guenter Roeck Reviewed-by: Greg Kroah-Hartman Acked-By: Vinod Koul Acked-by: Lee Jones Acked-by: Ulf Hansson Acked-by: Jonathan Cameron # for iio Acked-by: Thierry Reding Acked-by: Mark Brown Reviewd-by: Corey Minyard Acked-by: Pavel Machek Acked-by: Sebastian Reichel Link: https://lore.kernel.org/r/20201002234143.3570746-1-robh@kernel.org Signed-off-by: Rob Herring commit 891adc1303fe482cd683d8a3054040577484051a Author: Suman Anna Date: Mon Sep 28 17:51:55 2020 -0500 dt-bindings: hwlock: omap: Fix warnings with k3.yaml Update the AM65x HwSpinlock example to fix couple of warnings that started showing up after the conversion of K3 bindings to YAML format in commit 66e06509aa37 ("dt-bindings: arm: ti: Convert K3 board/soc bindings to DT schema"). compatible: ['ti,am654'] is not valid under any of the given schemas (Possible causes of the failure): compatible: ['ti,am654'] is too short compatible:0: 'ti,am654' is not one of ['ti,am654-evm'] Also, fix one of the node names while at this. Reviewed-by: Rob Herring Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20200928225155.12432-1-s-anna@ti.com Signed-off-by: Rob Herring commit fd6b519a30a7179026d22c98d6bf10bb5ca8ca27 Merge: 43499134f50a7 856deb866d16e Author: Mark Brown Date: Tue Oct 6 16:19:24 2020 +0100 Merge tag 'v5.9-rc5' into asoc-5.10 Linux 5.9-rc5 commit 3bfd9103c7af07915a84a6849e718622936233c1 Author: Ikjoon Jang Date: Tue Oct 6 15:54:05 2020 +0800 spi: spi-mtk-nor: Add power management support This patch adds dev_pm_ops to mtk-nor to support suspend/resume, auto suspend delay is set to -1 by default. Accessing registers are only permitted after its clock is enabled to deal with unknown state of operating clk at probe time. Signed-off-by: Ikjoon Jang Link: https://lore.kernel.org/r/20201006155010.v5.4.I68983b582d949a91866163bab588ff3c2a0d0275@changeid Signed-off-by: Mark Brown commit e836d4cf615f89c6695408e5dcacdefa5cf50167 Author: Ikjoon Jang Date: Tue Oct 6 15:54:04 2020 +0800 spi: spi-mtk-nor: support 36bit dma addressing This patch enables 36bit dma address support to spi-mtk-nor. Currently this is enabled only for mt8192-nor. Signed-off-by: Ikjoon Jang Link: https://lore.kernel.org/r/20201006155010.v5.3.Id1cb208392928afc7ceed4de06924243c7858cd0@changeid Signed-off-by: Mark Brown commit a1daaa991ed1f13b86f6d9df174f21c4e23d33ba Author: Ikjoon Jang Date: Tue Oct 6 15:54:03 2020 +0800 spi: spi-mtk-nor: use dma_alloc_coherent() for bounce buffer Use dma_alloc_coherent() for bounce buffer instead of kmalloc() to make sure the bounce buffer to be allocated within its DMAable range. Signed-off-by: Ikjoon Jang Link: https://lore.kernel.org/r/20201006155010.v5.2.I06cb65401ab5ad63ea30c4788d26633928d80f38@changeid Signed-off-by: Mark Brown commit 9935b612a5dba99cf8dc0f9fe7592a2a35c005fb Author: Ikjoon Jang Date: Tue Oct 6 15:54:02 2020 +0800 dt-bindings: spi: add mt8192-nor compatible string Add MT8192 spi-nor controller support. Signed-off-by: Ikjoon Jang Acked-by: Rob Herring Link: https://lore.kernel.org/r/20201006155010.v5.1.I4cd089ef1fe576535c6b6e4f1778eaab1c4441cf@changeid Signed-off-by: Mark Brown commit 7a64ed02ca2df68191fda98fa4f76c3cb68ae356 Author: Krzysztof Kozlowski Date: Fri Sep 25 23:26:49 2020 +0200 dt-bindings: serial: fsl-imx-uart: fix i.MX 53 and 6 compatible matching The i.MX 53 and i.MX6Q DTS use two compatibles, i.MX 6SL/6SLL/SX three so update the binding to fix dtbs_check warnings like: serial@21ec000: compatible: ['fsl,imx6q-uart', 'fsl,imx21-uart'] is not valid under any of the given schemas Acked-by: Rob Herring Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200925212649.23183-1-krzk@kernel.org Signed-off-by: Rob Herring commit 103fbf8e4020845e4fcf63819288cedb092a3c91 Author: Kashyap Desai Date: Wed Aug 19 23:20:35 2020 +0800 scsi: megaraid_sas: Added support for shared host tagset for cpuhotplug Fusion adapters can steer completions to individual queues, and we now have support for shared host-wide tags. So we can enable multiqueue support for fusion adapters. Once driver enable shared host-wide tags, cpu hotplug feature is also supported as it was enabled using below patchsets - commit bf0beec0607d ("blk-mq: drain I/O when all CPUs in a hctx are offline") Currently driver has provision to disable host-wide tags using "host_tagset_enable" module parameter. Once we do not have any major performance regression using host-wide tags, we will drop the hand-crafted interrupt affinity settings. Performance is also meeting the expecatation - (used both none and mq-deadline scheduler) 24 Drive SSD on Aero with/without this patch can get 3.1M IOPs 3 VDs consist of 8 SAS SSD on Aero with/without this patch can get 3.1M IOPs. Signed-off-by: Kashyap Desai Signed-off-by: Hannes Reinecke Signed-off-by: John Garry Tested-by: Douglas Gilbert Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe commit f7c4cdc712ab803f7cdd3d47025081831f457ecc Author: John Garry Date: Wed Aug 19 23:20:33 2020 +0800 scsi: scsi_debug: Support host tagset When host_max_queue is set (> 0), set the Scsi_Host.host_tagset such that blk-mq will use a hostwide tagset over all SCSI host submission queues. This means that we may expose all submission queues and always use the hwq chosen by blk-mq. And since if sdebug_host_max_queue is set, sdebug_max_queue is fixed to the same value, we can simplify how sdebug_driver_template.can_queue is set. Signed-off-by: John Garry Tested-by: Douglas Gilbert Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 8d98416a55ebfecbe57fd26981decf6fcdf37b11 Author: John Garry Date: Wed Aug 19 23:20:32 2020 +0800 scsi: hisi_sas: Switch v3 hw to MQ Now that the block layer provides a shared tag, we can switch the driver to expose all HW queues. Signed-off-by: John Garry Tested-by: Douglas Gilbert Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 64f1501bd2a9c8ab1df548e1ed224552f9c7ac71 Author: John Garry Date: Wed Aug 19 23:20:31 2020 +0800 scsi: core: Show nr_hw_queues in sysfs So that we don't use a value of 0 for when Scsi_Host.nr_hw_queues is unset, use the tag_set->nr_hw_queues (which holds 1 for this case). Signed-off-by: John Garry Tested-by: Douglas Gilbert Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe commit bdb01301f3ea51a59eff252b06643fc1fe843e57 Author: Hannes Reinecke Date: Wed Aug 19 23:20:30 2020 +0800 scsi: Add host and host template flag 'host_tagset' Add Host and host template flag 'host_tagset' so hostwide tagset can be shared on multiple reply queues after the SCSI device's reply queue is converted to blk-mq hw queue. [jpg: Update comment on .can_queue and add Scsi_Host.host_tagset] Signed-off-by: Hannes Reinecke Signed-off-by: John Garry Tested-by: Don Brace #SCSI resv cmds patches used Tested-by: Douglas Gilbert Acked-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 2486baae2cf6df73554144d0a4e40ae8809b54d4 Author: Vasily Gorbik Date: Mon Oct 5 17:50:28 2020 +0200 objtool: Allow nested externs to enable BUILD_BUG() Currently BUILD_BUG() macro is expanded to smth like the following: do { extern void __compiletime_assert_0(void) __attribute__((error("BUILD_BUG failed"))); if (!(!(1))) __compiletime_assert_0(); } while (0); If used in a function body this obviously would produce build errors with -Wnested-externs and -Werror. Build objtool with -Wno-nested-externs to enable BUILD_BUG() usage. Signed-off-by: Vasily Gorbik Signed-off-by: Josh Poimboeuf commit 43499134f50a77844f0503df2c995f43b858f4c3 Merge: cd7dea5e17a56 eb062e47f7c8c Author: Mark Brown Date: Tue Oct 6 15:24:41 2020 +0100 Merge series "ASoC: Intel: Remove obsolete solutions and components" from Cezary Rojewski : Follow up to catpt series as mentioned in: [PATCH v10 00/14] ASoC: Intel: Catpt - Lynx and Wildcat point https://www.spinics.net/lists/alsa-devel/msg116440.html As catpt is a direct replacement to sound/soc/intel/haswell, it leaves a lot of code redudant. The second legacy solution - baytrail - is deprecated for a long time by sound/soc/intel/atom with SOF flavor available too. This series addresses the redudancy and removes obsolete code. Along with the legacy solutions, all orphaned components are removed too. As a consequence, further cleanups are unlocked: sound/soc/intel/skylake becomes the sole user of processing code found in sound/soc/intel/common. Those are not part of this series. Changes in v2: - just a rebase so patch 04/13 applies cleanly - left the tags as no actual changes done in between Cezary Rojewski (13): ASoC: Intel: Remove haswell solution ASoC: Intel: Remove max98090 support for baytrail solution ASoC: Intel: Remove rt5640 support for baytrail solution ASoC: Intel: Remove baytrail solution ASoC: Intel: Remove SST ACPI component ASoC: Intel: Remove SST firmware components ASoC: Intel: Skylake: Unassign ram_read and read_write ops ASoC: Intel: Remove unused DSP operations ASoC: Intel: Remove unused DSP interface fields ASoC: Intel: Remove SST-legacy specific constants ASoC: Intel: Make atom components independent of sst-dsp ASoC: Intel: Remove sst_pdata structure ASoC: Intel: Remove sst_dsp_get_thread_context include/sound/soc-acpi-intel-match.h | 1 - include/trace/events/hswadsp.h | 385 --- sound/soc/intel/Kconfig | 26 - sound/soc/intel/Makefile | 1 - sound/soc/intel/atom/sst/sst.c | 1 - sound/soc/intel/atom/sst/sst.h | 7 + sound/soc/intel/atom/sst/sst_acpi.c | 1 - sound/soc/intel/atom/sst/sst_drv_interface.c | 3 - sound/soc/intel/atom/sst/sst_ipc.c | 1 - sound/soc/intel/atom/sst/sst_loader.c | 1 - sound/soc/intel/atom/sst/sst_pvt.c | 1 - sound/soc/intel/atom/sst/sst_stream.c | 1 - sound/soc/intel/baytrail/Makefile | 5 - sound/soc/intel/baytrail/sst-baytrail-dsp.c | 358 --- sound/soc/intel/baytrail/sst-baytrail-ipc.c | 772 ------ sound/soc/intel/baytrail/sst-baytrail-ipc.h | 64 - sound/soc/intel/baytrail/sst-baytrail-pcm.c | 459 ---- sound/soc/intel/boards/Kconfig | 25 - sound/soc/intel/boards/Makefile | 4 - sound/soc/intel/boards/byt-max98090.c | 182 -- sound/soc/intel/boards/byt-rt5640.c | 224 -- sound/soc/intel/boards/bytcht_es8316.c | 1 - sound/soc/intel/boards/bytcr_rt5640.c | 1 - sound/soc/intel/common/Makefile | 4 - .../intel/common/soc-acpi-intel-byt-match.c | 15 - sound/soc/intel/common/sst-acpi.c | 236 -- sound/soc/intel/common/sst-dsp-priv.h | 284 +-- sound/soc/intel/common/sst-dsp.c | 162 -- sound/soc/intel/common/sst-dsp.h | 222 -- sound/soc/intel/common/sst-firmware.c | 1273 ---------- sound/soc/intel/common/sst-ipc.c | 27 - sound/soc/intel/common/sst-ipc.h | 3 - sound/soc/intel/haswell/Makefile | 5 - sound/soc/intel/haswell/sst-haswell-dsp.c | 705 ------ sound/soc/intel/haswell/sst-haswell-ipc.c | 2222 ----------------- sound/soc/intel/haswell/sst-haswell-ipc.h | 527 ---- sound/soc/intel/haswell/sst-haswell-pcm.c | 1369 ---------- sound/soc/intel/skylake/bxt-sst.c | 2 - sound/soc/intel/skylake/cnl-sst.c | 4 +- sound/soc/intel/skylake/skl-sst-dsp.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.c | 2 +- sound/soc/intel/skylake/skl-sst.c | 2 - 42 files changed, 11 insertions(+), 9579 deletions(-) delete mode 100644 include/trace/events/hswadsp.h delete mode 100644 sound/soc/intel/baytrail/Makefile delete mode 100644 sound/soc/intel/baytrail/sst-baytrail-dsp.c delete mode 100644 sound/soc/intel/baytrail/sst-baytrail-ipc.c delete mode 100644 sound/soc/intel/baytrail/sst-baytrail-ipc.h delete mode 100644 sound/soc/intel/baytrail/sst-baytrail-pcm.c delete mode 100644 sound/soc/intel/boards/byt-max98090.c delete mode 100644 sound/soc/intel/boards/byt-rt5640.c delete mode 100644 sound/soc/intel/common/sst-acpi.c delete mode 100644 sound/soc/intel/common/sst-firmware.c delete mode 100644 sound/soc/intel/haswell/Makefile delete mode 100644 sound/soc/intel/haswell/sst-haswell-dsp.c delete mode 100644 sound/soc/intel/haswell/sst-haswell-ipc.c delete mode 100644 sound/soc/intel/haswell/sst-haswell-ipc.h delete mode 100644 sound/soc/intel/haswell/sst-haswell-pcm.c -- 2.17.1 commit cd7dea5e17a561e621e78e5863f5634cb6f9f097 Author: Alex Dewar Date: Sun Oct 4 11:25:36 2020 +0100 ASoC: omap-mcbsp: Fix use of uninitialised pointer Commit 9c34d023dc35 ("ASoC: omap-mcbsp: Re-arrange files for core McBSP and Sidetone function split"), in rearranging various files, also replaced calls to platform_get_resource_by_name() + devm_ioremap_resource() with a single call to devm_platform_ioremap_resource_byname(). However, the struct resource is needed as we access its members so at present a null pointer is dereferenced. Fix by doing things the old way. Fixes: 9c34d023dc35 ("ASoC: omap-mcbsp: Re-arrange files for core McBSP and Sidetone function split") Signed-off-by: Alex Dewar Link: https://lore.kernel.org/r/20201004102535.325547-1-alex.dewar90@gmail.com Signed-off-by: Mark Brown commit 247db73560bc3e5aef6db50c443c3c0db115bc93 Author: Ashish Sangwan Date: Mon Oct 5 02:22:43 2020 -0700 NFS: fix nfs_path in case of a rename retry We are generating incorrect path in case of rename retry because we are restarting from wrong dentry. We should restart from the dentry which was received in the call to nfs_path. CC: stable@vger.kernel.org Signed-off-by: Ashish Sangwan Signed-off-by: Anna Schumaker commit eb062e47f7c8cc28f19ba8f897481c22d13db1ec Author: Cezary Rojewski Date: Tue Oct 6 08:49:07 2020 +0200 ASoC: Intel: Remove sst_dsp_get_thread_context While sst_dsp_get_thread_context() is declared as solution-agnostic, it is only used by /skylake/ solution. Majority of thread_context field usages are direct accesses. Improve code cohesiveness and convert to single usage model. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-14-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 720811f0e4ac5a31d38aaee20905692dd7150997 Author: Cezary Rojewski Date: Tue Oct 6 08:49:06 2020 +0200 ASoC: Intel: Remove sst_pdata structure struct sst_pdata is unused among remaining /sound/soc/intel solution so remove it. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit b972153d6c53a89dc92d991c466a6b4800a9c91f Author: Cezary Rojewski Date: Tue Oct 6 08:49:05 2020 +0200 ASoC: Intel: Make atom components independent of sst-dsp With sound/soc/intel/haswell and /baytrail gone, registers left within sst-dsp header are atom-specific. Relocate these to atom internal header to make atom truely independent of sound/soc/common processing code. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 7d07f9c1ba0e670d1a967f16eda53e5c87411753 Author: Cezary Rojewski Date: Tue Oct 6 08:49:04 2020 +0200 ASoC: Intel: Remove SST-legacy specific constants As sound/soc/intel/haswell and /baytrail are no more, all SST-legacy specific constants and registers are redundant so remove them. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit b4e60807182a243d9dfe985e9e13d295f5868f81 Author: Cezary Rojewski Date: Tue Oct 6 08:49:03 2020 +0200 ASoC: Intel: Remove unused DSP interface fields With redundant DSP operations removed, several fields for structures: sst_ops, sst_addr and sst_dsp become obsolete. Remove them too. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 37465972015cf7aeb586a9245da2a87d3b531959 Author: Cezary Rojewski Date: Tue Oct 6 08:49:02 2020 +0200 ASoC: Intel: Remove unused DSP operations sound/soc/intel/common/ declares several helper functions for /intel/ solutions. In practice, differences between these - /haswell/ and /skylake/ especially - led to many of the helpers being used only by a single solution. As /skylake/ makes no use of these and /haswell/ and /baytail/ are no more, remove the unused functions. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit a4bebce26d560a4a1dff557ad7822bab90dd1c3f Author: Cezary Rojewski Date: Tue Oct 6 08:49:01 2020 +0200 ASoC: Intel: Skylake: Unassign ram_read and read_write ops Skylake driver makes no use of ram_read or ram_write operation so remove the assignments. This prepares sound/soc/common/sst-dsp* for following removal of unused DSP operations. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit fb94b7b11c6a20b786c6a8aec3d701ced8854419 Author: Cezary Rojewski Date: Tue Oct 6 08:49:00 2020 +0200 ASoC: Intel: Remove SST firmware components sst-firmware is host to many image loading over DMA operations. Majority of code targets sound/soc/intel/haswell solution as /baytrail/ never switched to DMA-based firmware loading. With /haswell/ removed this code serves no purpose. Address this redundancy. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 05668be1b3644f9bd25b22f62e79ad7a5adbd3e2 Author: Cezary Rojewski Date: Tue Oct 6 08:48:59 2020 +0200 ASoC: Intel: Remove SST ACPI component baytrail and haswell solutions present within sound/soc/intel are the only users of sst-acpi componenent and with them removed it becomes redundant so remove it too. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 07833cd0569bb73cc9f82814cdab921abb3dfb4a Author: Cezary Rojewski Date: Tue Oct 6 08:48:58 2020 +0200 ASoC: Intel: Remove baytrail solution sound/soc/intel/baytrail is a niche solution which supports limited number of BYT products - as described by snd_soc_acpi_intel_baytrail_legacy_machines table. For a long time it's deprecated in favor of sound/soc/intel/atom solution with SOF providing support for some products too effectively rendering /baytrail/ redundant. Remove deprecated code from ASoC tree. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 3056cb0082feccee9a0012440ee5e4ca6a6e80ac Author: Cezary Rojewski Date: Tue Oct 6 08:48:57 2020 +0200 ASoC: Intel: Remove rt5640 support for baytrail solution byt-rt5640 is deprecated in favor of bytcr_rt5640 used by sound/soc/intel/atom and SOF solutions both. Remove redundant machine board and all related code. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 5f3941b63c25d8123ebe4406a714c603525b1b90 Author: Cezary Rojewski Date: Tue Oct 6 08:48:56 2020 +0200 ASoC: Intel: Remove max98090 support for baytrail solution byt-max98090 is deprecated in favor of cht-bsw-max98090 used by sound/soc/intel/atom and SOF solutions both. Remove redundant machine board and all related code. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit ca756120d4bcf28dfde5e3df8882153303d4010f Author: Cezary Rojewski Date: Tue Oct 6 08:48:55 2020 +0200 ASoC: Intel: Remove haswell solution Newly added catpt solution found in sound/soc/intel/catpt is a direct replacement to sound/soc/intel/haswell. It covers all features supported by it and more - by aligning to recommended flows and requirement list based on Windows driver equivalent. No harm is done to userspace as catpt - similarly to haswell - loads no extenal topology files while sharing the exact same ADSP firmware binary. Given the above, existing haswell code is redundant so remove it. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Acked-by: Liam Girdwood Link: https://lore.kernel.org/r/20201006064907.16277-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 8c465e220bbcbf0866d6e0c14fc800ae2e96049e Author: Krzysztof Kozlowski Date: Fri Oct 2 18:18:37 2020 +0200 dt-bindings: mailbox: fsl,mu: Add missing power-domains Add quite common property - power-domains - to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: mailbox@5d280000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+' Reviewed-by: Dong Aisheng Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201002161837.5784-1-krzk@kernel.org Signed-off-by: Rob Herring commit aa6174f0d31e4d5785a843fc79a433bed7cac784 Merge: 1b25b207d207f efe84d408bf41 Author: Rob Herring Date: Tue Oct 6 08:38:32 2020 -0500 Merge branch 'dt/linus' into dt/next commit be4df0cea08a8b59eb38d73de988b7ba8022df41 Author: Amir Goldstein Date: Tue Sep 29 15:28:48 2020 +0800 ovl: use generic vfs_ioc_setflags_prepare() helper Canonalize to ioctl FS_* flags instead of inode S_* flags. Note that we do not call the helper vfs_ioc_fssetxattr_check() for FS_IOC_FSSETXATTR ioctl. The reason is that underlying filesystem will perform all the checks. We only need to perform the capability check before overriding credentials. Signed-off-by: Amir Goldstein Signed-off-by: Xiao Yang Signed-off-by: Miklos Szeredi commit 61536bed2149b082748f8a38c593d915ff3e5957 Author: Amir Goldstein Date: Tue Sep 29 15:28:47 2020 +0800 ovl: support [S|G]ETFLAGS and FS[S|G]ETXATTR ioctls for directories [S|G]ETFLAGS and FS[S|G]ETXATTR ioctls are applicable to both files and directories, so add ioctl operations to dir as well. We teach ovl_real_fdget() to get the realfile of directories which use a different type of file->private_data. Ifdef away compat ioctl implementation to conform to standard practice. With this change, xfstest generic/079 which tests these ioctls on files and directories passes. Signed-off-by: Amir Goldstein Signed-off-by: Xiao Yang Signed-off-by: Miklos Szeredi commit eda5cc997abd21054085486c9dee3fee269f3592 Author: Christoph Hellwig Date: Tue Oct 6 09:07:19 2020 +0200 block: move blk_mq_sched_try_merge to blk-merge.c Move blk_mq_sched_try_merge to blk-merge.c, which allows to mark a lot of the merge infrastructure static there. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d59da41998bc794441d7c039a059ed6eb0c2dc4d Author: Christoph Hellwig Date: Tue Oct 6 09:07:18 2020 +0200 block: remove the unused blk_integrity_merge_bio export Also move the definition from the public blkdev.h to the private block/blk.h header. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 92cf2fd156b273879198bb1d7e58851f822c481f Author: Christoph Hellwig Date: Tue Oct 6 09:07:17 2020 +0200 block: remove the unused blk_integrity_merge_rq export Also move the definition from the public blkdev.h to the private block/blk.h header. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0549e87c30ae0d43d7e10424f2222bcd8bbe986d Author: Ming Lei Date: Thu Oct 1 23:48:42 2020 +0800 block: move 'q_usage_counter' into front of 'request_queue' The field of 'q_usage_counter' is always fetched in fast path of every block driver, and move it into front of 'request_queue', so it can be fetched into 1st cacheline of 'request_queue' instance. Signed-off-by: Ming Lei Tested-by: Veronika Kabatova Reviewed-by: Christoph Hellwig Cc: Sagi Grimberg Cc: Tejun Heo Cc: Christoph Hellwig Cc: Jens Axboe Cc: Bart Van Assche Signed-off-by: Jens Axboe commit 2b0d3d3e4fcfb19d10f9a82910b8f0f05c56ee3e Author: Ming Lei Date: Thu Oct 1 23:48:41 2020 +0800 percpu_ref: reduce memory footprint of percpu_ref in fast path 'struct percpu_ref' is often embedded into one user structure, and the instance is usually referenced in fast path, however actually only 'percpu_count_ptr' is needed in fast path. So move other fields into one new structure of 'percpu_ref_data', and allocate it dynamically via kzalloc(), then memory footprint of 'percpu_ref' in fast path is reduced a lot and becomes suitable to put into hot cacheline of user structure. Signed-off-by: Ming Lei Tested-by: Veronika Kabatova Reviewed-by: Christoph Hellwig Acked-by: Tejun Heo Cc: Sagi Grimberg Cc: Tejun Heo Cc: Christoph Hellwig Cc: Jens Axboe Cc: Bart Van Assche Signed-off-by: Jens Axboe commit 9faebeb2d80065926dfbc09cb73b1bb7779a89cd Merge: 02da0b615b4bd a0de1cd356874 Author: David S. Miller Date: Tue Oct 6 06:25:56 2020 -0700 Merge branch 'ethtool-allow-dumping-policies-to-user-space' Jakub Kicinski says: ==================== ethtool: allow dumping policies to user space This series wires up ethtool policies to ops, so they can be dumped to user space for feature discovery. First patch wires up GET commands, and second patch wires up SETs. The policy tables are trimmed to save space and LoC. Next - take care of linking up nested policies for the header (which is the policy what we actually care about). And once header policy is linked make sure that attribute range validation for flags is done by policy, not a conditions in the code. New type of policy is needed to validate masks (patch 6). Netlink as always staying a step ahead of all the other kernel API interfaces :) v2: - merge patches 1 & 2 -> 1 - add patch 3 & 5 - remove .max_attr from struct ethnl_request_ops ==================== Reviewed-by: Johannes Berg Signed-off-by: David S. Miller commit a0de1cd3568749d3410c89b1c8bb70e90d61659f Author: Jakub Kicinski Date: Mon Oct 5 15:07:39 2020 -0700 ethtool: specify which header flags are supported per command Perform header flags validation through the policy. Only pause command supports ETHTOOL_FLAG_STATS. Create a separate policy to be able to express that in policy dumps to user space. Note that even though the core will validate the header policy, it cannot record multiple layers of attributes and we have to re-parse header sub-attrs. When doing so we could skip attribute validation, or use most permissive policy. Opt for the former. We will no longer return the extack cookie for flags but since we only added first new flag in this release it's not expected that any user space had a chance to make use of it. v2: - remove the re-validation in ethnl_parse_header_dev_get() Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit bdbb4e29df8b790db50cb73ce25d23543329f05f Author: Jakub Kicinski Date: Mon Oct 5 15:07:38 2020 -0700 netlink: add mask validation We don't have good validation policy for existing unsigned int attrs which serve as flags (for new ones we could use NLA_BITFIELD32). With increased use of policy dumping having the validation be expressed as part of the policy is important. Add validation policy in form of a mask of supported/valid bits. Support u64 in the uAPI to be future-proof, but really for now the embedded mask member can only hold 32 bits, so anything with bit 32+ set will always fail validation. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit ddcf3b70c5ae8444e920d28e30e7ad4e866c8015 Author: Jakub Kicinski Date: Mon Oct 5 15:07:37 2020 -0700 netlink: create helpers for checking type is an int There's a number of policies which check if type is a uint or sint. Factor the checking against the list of value sizes to a helper for easier reuse. v2: - new patch Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 329d9c333ee4a904341d555b72cd6218f4104d53 Author: Jakub Kicinski Date: Mon Oct 5 15:07:36 2020 -0700 ethtool: link up ethnl_header_policy as a nested policy To get the most out of parsing by the core, and to allow dumping full policies we need to specify which policy applies to nested attrs. For headers it's ethnl_header_policy. $ sed -i 's@\(ETHTOOL_A_.*HEADER\].*=\) { .type = NLA_NESTED },@\1\n\t\tNLA_POLICY_NESTED(ethnl_header_policy),@' net/ethtool/* Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit ff419afa43109e05d42d75629f21d9fd87f635ea Author: Jakub Kicinski Date: Mon Oct 5 15:07:35 2020 -0700 ethtool: trim policy tables Since ethtool uses strict attribute validation there's no need to initialize all attributes in policy tables. 0 is NLA_UNSPEC which is going to be rejected. Remove the NLA_REJECTs. Similarly attributes above maxattrs are rejected, so there's no need to always size the policy tables to ETHTOOL_A_..._MAX. v2: - new patch Suggested-by: Johannes Berg Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 5028588b62cbda74744f4f28b35f618e5b1078ef Author: Jakub Kicinski Date: Mon Oct 5 15:07:34 2020 -0700 ethtool: wire up set policies to ops Similarly to get commands wire up the policies of set commands to get parsing by the core and policy dumps. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4f30974feb9667f12e224b195b551a170fcc8723 Author: Jakub Kicinski Date: Mon Oct 5 15:07:33 2020 -0700 ethtool: wire up get policies to ops Wire up policies for get commands in struct nla_policy of the ethtool family. Make use of genetlink code attr validation and parsing, as well as allow dumping policies to user space. For every ETHTOOL_MSG_*_GET: - add 'ethnl_' prefix to policy name - add extern declaration in net/ethtool/netlink.h - wire up the policy & attr in ethtool_genl_ops[]. - remove .request_policy and .max_attr from ethnl_request_ops. Obviously core only records the first "layer" of parsed attrs so we still need to parse the sub-attrs of the nested header attribute. v2: - merge of patches 1 and 2 from v1 - remove stray empty lines in ops - also remove .max_attr Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 02da0b615b4bd7db747ed77199d5f1a161a0411a Merge: 9b9dda5d1dc84 560b50cf6c18c Author: David S. Miller Date: Tue Oct 6 06:23:22 2020 -0700 Merge branch 'drivers-net-add-sw_netstats_rx_add-helper' Fabian Frederick says: ==================== drivers/net: add sw_netstats_rx_add helper This small patchset creates netstats addition dev_sw_netstats_rx_add() based on dev_lstats_add() and replaces some open coding in both drivers/net and net branches. ==================== Signed-off-by: David S. Miller commit 560b50cf6c18c5223929de2cb74504f67253ed47 Author: Fabian Frederick Date: Mon Oct 5 22:37:12 2020 +0200 ipv4: use dev_sw_netstats_rx_add() use new helper for netstats settings Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller commit e40b3727f90b186d5845c96b14f7a1e9f965b712 Author: Fabian Frederick Date: Mon Oct 5 22:37:03 2020 +0200 net: openvswitch: use dev_sw_netstats_rx_add() use new helper for netstats settings Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller commit c852162ea931256284dcead244ad2dd0fbf14ed7 Author: Fabian Frederick Date: Mon Oct 5 22:36:34 2020 +0200 xfrm: use dev_sw_netstats_rx_add() use new helper for netstats settings Signed-off-by: Fabian Frederick Acked-by: Herbert Xu Signed-off-by: David S. Miller commit 5711eb05023e466c57efae32dee5541a3569c7eb Author: Fabian Frederick Date: Mon Oct 5 22:36:19 2020 +0200 ipv6: use dev_sw_netstats_rx_add() use new helper for netstats settings Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller commit 36a6f5667925f7621afdcd482eb3bdda1bd5f9b6 Author: Fabian Frederick Date: Mon Oct 5 22:35:46 2020 +0200 gtp: use dev_sw_netstats_rx_add() use new helper for netstats settings Signed-off-by: Fabian Frederick Acked-by: Harald Welte Signed-off-by: David S. Miller commit 8fdfffd0b97a0f1e46618afad7e24ebf889952c4 Author: Fabian Frederick Date: Mon Oct 5 22:35:15 2020 +0200 bareudp: use dev_sw_netstats_rx_add() use new helper for netstats settings Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller commit 1e84527b7fa92496ac7fbee9f8c3557e7fe1ecb1 Author: Fabian Frederick Date: Mon Oct 5 22:34:58 2020 +0200 geneve: use dev_sw_netstats_rx_add() use new helper for netstats settings Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller commit 1f8dda1d26d31ed6e0a188936536e8811849a041 Author: Fabian Frederick Date: Mon Oct 5 22:34:28 2020 +0200 vxlan: use dev_sw_netstats_rx_add() use new helper for netstats settings Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller commit 451b05f413d3fd89ee84ae99a5029f619ed3cb78 Author: Fabian Frederick Date: Mon Oct 5 22:34:18 2020 +0200 net: netdevice.h: sw_netstats_rx_add helper some drivers/network protocols update rx bytes/packets under u64_stats_update_begin/end sequence. Add a specific helper like dev_lstats_add() Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller commit 3dbde69575637658d2094ee4416c21bc22eb89fe Author: Peter Zijlstra Date: Mon Oct 5 10:10:24 2020 +0200 perf/x86: Fix n_metric for cancelled txn When a group that has TopDown members is failed to be scheduled, any later TopDown groups will not return valid values. Here is an example. A background perf that occupies all the GP counters and the fixed counter 1. $perf stat -e "{cycles,cycles,cycles,cycles,cycles,cycles,cycles, cycles,cycles}:D" -a A user monitors a TopDown group. It works well, because the fixed counter 3 and the PERF_METRICS are available. $perf stat -x, --topdown -- ./workload retiring,bad speculation,frontend bound,backend bound, 18.0,16.1,40.4,25.5, Then the user tries to monitor a group that has TopDown members. Because of the cycles event, the group is failed to be scheduled. $perf stat -x, -e '{slots,topdown-retiring,topdown-be-bound, topdown-fe-bound,topdown-bad-spec,cycles}' -- ./workload ,,slots,0,0.00,, ,,topdown-retiring,0,0.00,, ,,topdown-be-bound,0,0.00,, ,,topdown-fe-bound,0,0.00,, ,,topdown-bad-spec,0,0.00,, ,,cycles,0,0.00,, The user tries to monitor a TopDown group again. It doesn't work anymore. $perf stat -x, --topdown -- ./workload ,,,,, In a txn, cancel_txn() is to truncate the event_list for a canceled group and update the number of events added in this transaction. However, the number of TopDown events added in this transaction is not updated. The kernel will probably fail to add new Topdown events. Fixes: 7b2c05a15d29 ("perf/x86/intel: Generic support for hardware TopDown metrics") Reported-by: Andi Kleen Reported-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Kan Liang Link: https://lkml.kernel.org/r/20201005082611.GH2628@hirez.programming.kicks-ass.net commit 871a93b0aad65a7f44ee25f2d17932ef6d559850 Author: Peter Zijlstra Date: Mon Oct 5 10:09:06 2020 +0200 perf/x86: Fix n_pair for cancelled txn Kan reported that n_metric gets corrupted for cancelled transactions; a similar issue exists for n_pair for AMD's Large Increment thing. The problem was confirmed and confirmed fixed by Kim using: sudo perf stat -e "{cycles,cycles,cycles,cycles}:D" -a sleep 10 & # should succeed: sudo perf stat -e "{fp_ret_sse_avx_ops.all}:D" -a workload # should fail: sudo perf stat -e "{fp_ret_sse_avx_ops.all,fp_ret_sse_avx_ops.all,cycles}:D" -a workload # previously failed, now succeeds with this patch: sudo perf stat -e "{fp_ret_sse_avx_ops.all}:D" -a workload Fixes: 5738891229a2 ("perf/x86/amd: Add support for Large Increment per Cycle Events") Reported-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Kim Phillips Link: https://lkml.kernel.org/r/20201005082516.GG2628@hirez.programming.kicks-ass.net commit 9b9dda5d1dc843a55722cfa07f5570840f31d591 Merge: 302af7c6049dc 60db5e408e432 Author: David S. Miller Date: Tue Oct 6 06:16:01 2020 -0700 Merge branch 'net-atlantic-phy-tunables-from-mac-driver' Igor Russkikh says: ==================== net: atlantic: phy tunables from mac driver This series implements phy tunables settings via MAC driver callbacks. AQC 10G devices use integrated MAC+PHY solution, where PHY is fully controlled by MAC firmware. Therefore, it is not possible to implement separate phy driver for these. We use ethtool ops callbacks to implement downshift and EDPC tunables. v3: fixed flaw in EDPD logic, from Andrew v2: comments from Andrew ==================== Signed-off-by: David S. Miller commit 60db5e408e432d57f93e1eaec8fc9d7a05caa1f9 Author: Igor Russkikh Date: Mon Oct 5 18:39:39 2020 +0300 net: atlantic: implement media detect feature via phy tunables Mediadetect is another name for the EDPD (energy detect power down). This feature allows device to save extra power when no link is available. PHY goes into the extreme power saving mode and only periodically wakes up and checks for the link. AQC devices has fixed check period of 6 seconds The feature may increase linkup time. Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e193c3ab8302908b1378fc0606be561e976d2532 Author: Igor Russkikh Date: Mon Oct 5 18:39:38 2020 +0300 net: atlantic: implement phy downshift feature PHY downshift allows phy to try renegotiate if link is unstable and can carry higher speed. AQC devices has integrated PHY which is controlled by MAC firmware. Thus, driver defines new ethtool callbacks to implement phy tunables via netdev. Reviewed-by: Andrew Lunn Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit c6db31ffe202c3120147e9f3455a4dbc90546d39 Author: Igor Russkikh Date: Mon Oct 5 18:39:37 2020 +0300 ethtool: allow netdev driver to define phy tunables Define get/set phy tunable callbacks in ethtool ops. This will allow MAC drivers with integrated PHY still to implement these tunables. Reviewed-by: Andrew Lunn Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 302af7c6049dc2cbd1e07358c1912f7cce98db36 Author: Vladimir Oltean Date: Mon Oct 5 17:48:38 2020 +0300 net: always dump full packets with skb_dump Currently skb_dump has a restriction to only dump full packet for the first 5 socket buffers, then only headers will be printed. Remove this arbitrary and confusing restriction, which is only documented vaguely ("up to") in the comments above the prototype. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ebb11d1d9fe2d6b4a47755f7f09b2b631046e308 Author: Tzung-Bi Shih Date: Tue Oct 6 18:12:52 2020 +0800 ASoC: mediatek: mt8183-da7219: fix wrong ops for I2S3 DA7219 uses I2S2 and I2S3 for input and output respectively. Commit 9e30251fb22e ("ASoC: mediatek: mt8183-da7219: support machine driver with rt1015") introduces a bug that: - If using I2S2 solely, MCLK to DA7219 is 256FS. - If using I2S3 solely, MCLK to DA7219 is 128FS. - If using I2S3 first and then I2S2, the MCLK changes from 128FS to 256FS. As a result, no sound output to the headset. Also no sound input from the headset microphone. Both I2S2 and I2S3 should set MCLK to 256FS. Fixes the wrong ops for I2S3. Fixes: 9e30251fb22e ("ASoC: mediatek: mt8183-da7219: support machine driver with rt1015") Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201006101252.1890385-1-tzungbi@google.com Signed-off-by: Mark Brown commit 717f20341686245fdde9000ee09fdab5dc722477 Author: Paolo Abeni Date: Mon Oct 5 12:36:44 2020 +0200 mptcp: don't skip needed ack Currently we skip calling tcp_cleanup_rbuf() when packets are moved into the OoO queue or simply dropped. In both cases we still increment tp->copied_seq, and we should ask the TCP stack to check for ack. Fixes: c76c6956566f ("mptcp: call tcp_cleanup_rbuf on subflows") Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 72cdd117c449896c707fc6cfe5b90978160697d0 Author: Scott Cheloha Date: Wed Sep 16 09:51:22 2020 -0500 pseries/hotplug-memory: hot-add: skip redundant LMB lookup During memory hot-add, dlpar_add_lmb() calls memory_add_physaddr_to_nid() to determine which node id (nid) to use when later calling __add_memory(). This is wasteful. On pseries, memory_add_physaddr_to_nid() finds an appropriate nid for a given address by looking up the LMB containing the address and then passing that LMB to of_drconf_to_nid_single() to get the nid. In dlpar_add_lmb() we get this address from the LMB itself. In short, we have a pointer to an LMB and then we are searching for that LMB *again* in order to find its nid. If we call of_drconf_to_nid_single() directly from dlpar_add_lmb() we can skip the redundant lookup. The only error handling we need to duplicate from memory_add_physaddr_to_nid() is the fallback to the default nid when drconf_to_nid_single() returns -1 (NUMA_NO_NODE) or an invalid nid. Skipping the extra lookup makes hot-add operations faster, especially on machines with many LMBs. Consider an LPAR with 126976 LMBs. In one test, hot-adding 126000 LMBs on an upatched kernel took ~3.5 hours while a patched kernel completed the same operation in ~2 hours: Unpatched (12450 seconds): Sep 9 04:06:31 ltc-brazos1 drmgr[810169]: drmgr: -c mem -a -q 126000 Sep 9 04:06:31 ltc-brazos1 kernel: pseries-hotplug-mem: Attempting to hot-add 126000 LMB(s) [...] Sep 9 07:34:01 ltc-brazos1 kernel: pseries-hotplug-mem: Memory at 20000000 (drc index 80000002) was hot-added Patched (7065 seconds): Sep 8 21:49:57 ltc-brazos1 drmgr[877703]: drmgr: -c mem -a -q 126000 Sep 8 21:49:57 ltc-brazos1 kernel: pseries-hotplug-mem: Attempting to hot-add 126000 LMB(s) [...] Sep 8 23:27:42 ltc-brazos1 kernel: pseries-hotplug-mem: Memory at 20000000 (drc index 80000002) was hot-added It should be noted that the speedup grows more substantial when hot-adding LMBs at the end of the drconf range. This is because we are skipping a linear LMB search. To see the distinction, consider smaller hot-add test on the same LPAR. A perf-stat run with 10 iterations showed that hot-adding 4096 LMBs completed less than 1 second faster on a patched kernel: Unpatched: Performance counter stats for 'drmgr -c mem -a -q 4096' (10 runs): 104,753.42 msec task-clock # 0.992 CPUs utilized ( +- 0.55% ) 4,708 context-switches # 0.045 K/sec ( +- 0.69% ) 2,444 cpu-migrations # 0.023 K/sec ( +- 1.25% ) 394 page-faults # 0.004 K/sec ( +- 0.22% ) 445,902,503,057 cycles # 4.257 GHz ( +- 0.55% ) (66.67%) 8,558,376,740 stalled-cycles-frontend # 1.92% frontend cycles idle ( +- 0.88% ) (49.99%) 300,346,181,651 stalled-cycles-backend # 67.36% backend cycles idle ( +- 0.76% ) (50.01%) 258,091,488,691 instructions # 0.58 insn per cycle # 1.16 stalled cycles per insn ( +- 0.22% ) (66.67%) 70,568,169,256 branches # 673.660 M/sec ( +- 0.17% ) (50.01%) 3,100,725,426 branch-misses # 4.39% of all branches ( +- 0.20% ) (49.99%) 105.583 +- 0.589 seconds time elapsed ( +- 0.56% ) Patched: Performance counter stats for 'drmgr -c mem -a -q 4096' (10 runs): 104,055.69 msec task-clock # 0.993 CPUs utilized ( +- 0.32% ) 4,606 context-switches # 0.044 K/sec ( +- 0.20% ) 2,463 cpu-migrations # 0.024 K/sec ( +- 0.93% ) 394 page-faults # 0.004 K/sec ( +- 0.25% ) 442,951,129,921 cycles # 4.257 GHz ( +- 0.32% ) (66.66%) 8,710,413,329 stalled-cycles-frontend # 1.97% frontend cycles idle ( +- 0.47% ) (50.06%) 299,656,905,836 stalled-cycles-backend # 67.65% backend cycles idle ( +- 0.39% ) (50.02%) 252,731,168,193 instructions # 0.57 insn per cycle # 1.19 stalled cycles per insn ( +- 0.20% ) (66.66%) 68,902,851,121 branches # 662.173 M/sec ( +- 0.13% ) (49.94%) 3,100,242,882 branch-misses # 4.50% of all branches ( +- 0.15% ) (49.98%) 104.829 +- 0.325 seconds time elapsed ( +- 0.31% ) This is consistent. An add-by-count hot-add operation adds LMBs greedily, so LMBs near the start of the drconf range are considered first. On an otherwise idle LPAR with so many LMBs we would expect to find the LMBs we need near the start of the drconf range, hence the smaller speedup. Signed-off-by: Scott Cheloha Reviewed-by: Laurent Dufour Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200916145122.3408129-1-cheloha@linux.ibm.com commit dc9af82ea0614bb138705d1f5230d53b3b1dfb83 Author: Andrew Donnellan Date: Thu Aug 20 14:45:14 2020 +1000 selftests/powerpc: Add a rtas_filter selftest Add a selftest to test the basic functionality of CONFIG_RTAS_FILTER. Signed-off-by: Andrew Donnellan [mpe: Change rmo_start/end to 32-bit to avoid build errors on ppc64] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200820044512.7543-2-ajd@linux.ibm.com commit bd59380c5ba4147dcbaad3e582b55ccfd120b764 Author: Andrew Donnellan Date: Thu Aug 20 14:45:12 2020 +1000 powerpc/rtas: Restrict RTAS requests from userspace A number of userspace utilities depend on making calls to RTAS to retrieve information and update various things. The existing API through which we expose RTAS to userspace exposes more RTAS functionality than we actually need, through the sys_rtas syscall, which allows root (or anyone with CAP_SYS_ADMIN) to make any RTAS call they want with arbitrary arguments. Many RTAS calls take the address of a buffer as an argument, and it's up to the caller to specify the physical address of the buffer as an argument. We allocate a buffer (the "RMO buffer") in the Real Memory Area that RTAS can access, and then expose the physical address and size of this buffer in /proc/powerpc/rtas/rmo_buffer. Userspace is expected to read this address, poke at the buffer using /dev/mem, and pass an address in the RMO buffer to the RTAS call. However, there's nothing stopping the caller from specifying whatever address they want in the RTAS call, and it's easy to construct a series of RTAS calls that can overwrite arbitrary bytes (even without /dev/mem access). Additionally, there are some RTAS calls that do potentially dangerous things and for which there are no legitimate userspace use cases. In the past, this would not have been a particularly big deal as it was assumed that root could modify all system state freely, but with Secure Boot and lockdown we need to care about this. We can't fundamentally change the ABI at this point, however we can address this by implementing a filter that checks RTAS calls against a list of permitted calls and forces the caller to use addresses within the RMO buffer. The list is based off the list of calls that are used by the librtas userspace library, and has been tested with a number of existing userspace RTAS utilities. For compatibility with any applications we are not aware of that require other calls, the filter can be turned off at build time. Cc: stable@vger.kernel.org Reported-by: Daniel Axtens Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200820044512.7543-1-ajd@linux.ibm.com commit 3b6c3adbb2fa42749c3d38cfc4d4d0b7e096bb7b Author: Athira Rajeev Date: Mon Sep 21 03:10:04 2020 -0400 powerpc/perf: Exclude pmc5/6 from the irrelevant PMU group constraints PMU counter support functions enforces event constraints for group of events to check if all events in a group can be monitored. Incase of event codes using PMC5 and PMC6 ( 500fa and 600f4 respectively ), not all constraints are applicable, say the threshold or sample bits. But current code includes pmc5 and pmc6 in some group constraints (like IC_DC Qualifier bits) which is actually not applicable and hence results in those events not getting counted when scheduled along with group of other events. Patch fixes this by excluding PMC5/6 from constraints which are not relevant for it. Fixes: 7ffd948 ("powerpc/perf: factor out power8 pmu functions") Signed-off-by: Athira Rajeev Reviewed-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1600672204-1610-1-git-send-email-atrajeev@linux.vnet.ibm.com commit 70a94089d7f7fa91bc1795622426b3ed017ec71a Author: Srikar Dronamraju Date: Mon Sep 21 15:26:53 2020 +0530 powerpc/smp: Optimize update_coregroup_mask All threads of a SMT4/SMT8 core can either be part of CPU's coregroup mask or outside the coregroup. Use this relation to reduce the number of iterations needed to find all the CPUs that share the same coregroup Use a temporary mask to iterate through the CPUs that may share coregroup mask. Also instead of setting one CPU at a time into cpu_coregroup_mask, copy the SMT4/SMT8/submask at one shot. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200921095653.9701-12-srikar@linux.vnet.ibm.com commit b8a97cb4599cda28bd3b3bc13042f5803b42ad65 Author: Srikar Dronamraju Date: Mon Sep 21 15:26:52 2020 +0530 powerpc/smp: Move coregroup mask updation to a new function Move the logic for updating the coregroup mask of a CPU to its own function. This will help in reworking the updation of coregroup mask in subsequent patch. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200921095653.9701-11-srikar@linux.vnet.ibm.com commit 3ab33d6dc3e98e83b55732049e1d1d488207bb6d Author: Srikar Dronamraju Date: Mon Sep 21 15:26:51 2020 +0530 powerpc/smp: Optimize update_mask_by_l2 All threads of a SMT4 core can either be part of this CPU's l2-cache mask or not related to this CPU l2-cache mask. Use this relation to reduce the number of iterations needed to find all the CPUs that share the same l2-cache. Use a temporary mask to iterate through the CPUs that may share l2_cache mask. Also instead of setting one CPU at a time into cpu_l2_cache_mask, copy the SMT4/sub mask at one shot. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200921095653.9701-10-srikar@linux.vnet.ibm.com commit 375370a10d061d5c75c6bc5b09c5db4cc0b0fcfe Author: Srikar Dronamraju Date: Mon Sep 21 15:26:50 2020 +0530 powerpc/smp: Check for duplicate topologies and consolidate CACHE and COREGROUP domains are now part of default topology. However on systems that don't support CACHE or COREGROUP, these domains will eventually be degenerated. The degeneration happens per CPU. Do note the current fixup_topology() logic ensures that mask of a domain that is not supported on the current platform is set to the previous domain. Instead of waiting for the scheduler to degenerated try to consolidate based on their masks and sd_flags. This is done just before setting the scheduler topology. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200921095653.9701-9-srikar@linux.vnet.ibm.com commit 661e3d42f99193b7fdd71467a87e48f6e597c285 Author: Srikar Dronamraju Date: Mon Sep 21 15:26:49 2020 +0530 powerpc/smp: Depend on cpu_l1_cache_map when adding CPUs Currently on hotplug/hotunplug, CPU iterates through all the CPUs in its core to find threads in its thread group. However this info is already captured in cpu_l1_cache_map. Hence reduce iterations and cleanup add_cpu_to_smallcore_masks function. Signed-off-by: Srikar Dronamraju Tested-by: Satheesh Rajendran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200921095653.9701-8-srikar@linux.vnet.ibm.com commit 1f3a4181042107e32e44047e9dde990aced845b5 Author: Srikar Dronamraju Date: Mon Sep 21 15:26:48 2020 +0530 powerpc/smp: Stop passing mask to update_mask_by_l2 update_mask_by_l2 is called only once. But it passes cpu_l2_cache_mask as parameter. Instead of passing cpu_l2_cache_mask, use it directly in update_mask_by_l2. Signed-off-by: Srikar Dronamraju Tested-by: Satheesh Rajendran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200921095653.9701-7-srikar@linux.vnet.ibm.com commit 53516d4abacfab1faaa075c1f79957abc3da358c Author: Srikar Dronamraju Date: Mon Sep 21 15:26:47 2020 +0530 powerpc/smp: Limit CPUs traversed to within a node. All the arch specific topology cpumasks are within a node/DIE. However when setting these per CPU cpumasks, system traverses through all the online CPUs. This is redundant. Reduce the traversal to only CPUs that are online in the node to which the CPU belongs to. Signed-off-by: Srikar Dronamraju Tested-by: Satheesh Rajendran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200921095653.9701-6-srikar@linux.vnet.ibm.com commit 70edd4a7c753ba18e3e4bb9e97b6d85156cea738 Author: Srikar Dronamraju Date: Mon Sep 21 15:26:46 2020 +0530 powerpc/smp: Optimize remove_cpu_from_masks While offlining a CPU, system currently iterate through all the CPUs in the DIE to clear sibling, l2_cache and smallcore maps. However if there are more cores in a DIE, system can end up spending more time iterating through CPUs which are completely unrelated. Optimize this by only iterating through smaller but relevant cpumap. If shared_cache is set, cpu_l2_cache_map should be relevant else cpu_sibling_map would be relevant. Signed-off-by: Srikar Dronamraju Tested-by: Satheesh Rajendran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200921095653.9701-5-srikar@linux.vnet.ibm.com commit e29e9ed665eeb6f98cd88672994ecf4aaefdb943 Author: Srikar Dronamraju Date: Mon Sep 21 15:26:45 2020 +0530 powerpc/smp: Remove get_physical_package_id Now that cpu_core_mask has been removed and topology_core_cpumask has been updated to use cpu_cpu_mask, we no more need get_physical_package_id. Signed-off-by: Srikar Dronamraju Tested-by: Satheesh Rajendran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200921095653.9701-4-srikar@linux.vnet.ibm.com commit 4ca234a9cbd7c3a656b34dd98c8b156f70ed7849 Author: Srikar Dronamraju Date: Mon Sep 21 15:26:44 2020 +0530 powerpc/smp: Stop updating cpu_core_mask Anton Blanchard reported that his 4096 vcpu KVM guest took around 30 minutes to boot. He also analyzed it to the time taken to iterate while setting the cpu_core_mask. Further analysis shows that cpu_core_mask and cpu_cpu_mask for any CPU would be equal on Power. However updating cpu_core_mask took forever to update as its a per cpu cpumask variable. Instead cpu_cpu_mask was a per NODE /per DIE cpumask that was shared by all the respective CPUs. Also cpu_cpu_mask is needed from a scheduler perspective. However cpu_core_map is an exported symbol. Hence stop updating cpu_core_map and make it point to cpu_cpu_mask. Signed-off-by: Srikar Dronamraju Tested-by: Satheesh Rajendran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200921095653.9701-3-srikar@linux.vnet.ibm.com commit 4bce545903fa0290e011cf118997717f0c4f4d20 Author: Srikar Dronamraju Date: Mon Sep 21 15:26:43 2020 +0530 powerpc/topology: Update topology_core_cpumask On Power, cpu_core_mask and cpu_cpu_mask refer to the same set of CPUs. cpu_cpu_mask is needed by scheduler, hence look at deprecating cpu_core_mask. Before deleting the cpu_core_mask, ensure its only user is moved to cpu_cpu_mask. Signed-off-by: Srikar Dronamraju Tested-by: Satheesh Rajendran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200921095653.9701-2-srikar@linux.vnet.ibm.com commit d0ffdee8ff01fb21085d835ee54dc8c1c4d19226 Author: Gustavo Romero Date: Sat Sep 19 12:00:25 2020 -0300 powerpc/tm: Save and restore AMR on treclaim and trechkpt Althought AMR is stashed in the checkpoint area, currently we don't save it to the per thread checkpoint struct after a treclaim and so we don't restore it either from that struct when we trechkpt. As a consequence when the transaction is later rolled back the kernel space AMR value when the trechkpt was done appears in userspace. That commit saves and restores AMR accordingly on treclaim and trechkpt. Since AMR value is also used in kernel space in other functions, it also takes care of stashing kernel live AMR into the stack before treclaim and before trechkpt, restoring it later, just before returning from tm_reclaim and __tm_recheckpoint. Is also fixes two nonrelated comments about CR and MSR. Signed-off-by: Gustavo Romero Tested-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200919150025.9609-1-gromero@linux.ibm.com commit 35d64734b64315f2c5716c5a0a380ed1ba8fbe4a Author: Oliver O'Halloran Date: Fri Sep 18 19:30:50 2020 +1000 powerpc/eeh: Clean up PE addressing When support for EEH on PowerNV was added a lot of pseries specific code was made "generic" and some of the quirks of pseries EEH came along for the ride. One of the stranger quirks is eeh_pe containing two types of PE address: pe->addr and pe->config_addr. There reason for this appears to be historical baggage rather than any real requirements. On pseries EEH PEs are manipulated using RTAS calls. Each EEH RTAS call takes a "PE configuration address" as an input which is used to identify which EEH PE is being manipulated by the call. When initialising the EEH state for a device the first thing we need to do is determine the configuration address for the PE which contains the device so we can enable EEH on that PE. This process is outlined in PAPR which is the modern (i.e post-2003) FW specification for pseries. However, EEH support was first described in the pSeries RISC Platform Architecture (RPA) and although they are mostly compatible EEH is one of the areas where they are not. The major difference is that RPA doesn't actually have the concept of a PE. On RPA systems the EEH RTAS calls are done on a per-device basis using the same config_addr that would be passed to the RTAS functions to access PCI config space (e.g. ibm,read-pci-config). The config_addr is not identical since the function and config register offsets of the config_addr must be set to zero. EEH operations being done on a per-device basis doesn't make a whole lot of sense when you consider how EEH was implemented on legacy PCI systems. For legacy PCI(-X) systems EEH was implemented using special PCI-PCI bridges which contained logic to detect errors and freeze the secondary bus when one occurred. This means that the EEH enabled state is shared among all devices behind that EEH bridge. As a result there's no way to implement the per-device control required for the semantics specified by RPA. It can be made to work if we assume that a separate EEH bridge exists for each EEH capable PCI slot and there are no bridges behind those slots. However, RPA also specifies the ibm,configure-bridge RTAS call for re-initalising bridges behind EEH capable slots after they are reset due to an EEH event so that is probably not a valid assumption. This incoherence was fixed in later PAPR, which succeeded RPA. Unfortunately, since Linux EEH support seems to have been implemented based on the RPA spec some of the legacy assumptions were carried over (probably for POWER4 compatibility). The fix made in PAPR was the introduction of the "PE" concept and redefining the EEH RTAS calls (set-eeh-option, reset-slot, etc) to operate on a per-PE basis so all devices behind an EEH bride would share the same EEH state. The "config_addr" argument to the EEH RTAS calls became the "PE_config_addr" and the OS was required to use the ibm,get-config-addr-info RTAS call to find the correct PE address for the device. When support for the new interfaces was added to Linux it was implemented using something like: At probe time: pdn->eeh_config_addr = rtas_config_addr(pdn); pdn->eeh_pe_config_addr = rtas_get_config_addr_info(pdn); When performing an RTAS call: config_addr = pdn->eeh_config_addr; if (pdn->eeh_pe_config_addr) config_addr = pdn->eeh_pe_config_addr; rtas_call(..., config_addr, ...); In other words, if the ibm,get-config-addr-info RTAS call is implemented and returned a valid result we'd use that as the argument to the EEH RTAS calls. If not, Linux would fall back to using the device's config_addr. Over time these addresses have moved around going from pci_dn to eeh_dev and finally into eeh_pe. Today the users look like this: config_addr = pe->config_addr; if (pe->addr) config_addr = pe->addr; rtas_call(..., config_addr, ...); However, considering the EEH core always operates on a per-PE basis and even on pseries the only per-device operation is the initial call to ibm,set-eeh-option I'm not sure if any of this actually works on an RPA system today. It doesn't make much sense to have the fallback address in a generic structure either since the bulk of the code which reference it is in pseries anyway. The EEH core makes a token effort to support looking up a PE using the config_addr by having two arguments to eeh_pe_get(). However, a survey of all the callers to eeh_pe_get() shows that all bar one have the config_addr argument hard-coded to zero.The only caller that doesn't is in eeh_pe_tree_insert() which has: if (!eeh_has_flag(EEH_VALID_PE_ZERO) && !edev->pe_config_addr) return -EINVAL; pe = eeh_pe_get(hose, edev->pe_config_addr, edev->bdfn); The third argument (config_addr) is only used if the second (pe->addr) argument is invalid. The preceding check ensures that the call to eeh_pe_get() will never happen if edev->pe_config_addr is invalid so there is no situation where eeh_pe_get() will search for a PE based on the 3rd argument. The check also means that we'll never insert a PE into the tree where pe_config_addr is zero since EEH_VALID_PE_ZERO is never set on pseries. All the users of the fallback address on pseries never actually use the fallback and all the only caller that supplies something for the config_addr argument to eeh_pe_get() never use it either. It's all dead code. This patch removes the fallback address from eeh_pe since nothing uses it. Specificly, we do this by: 1) Removing pe->config_addr 2) Removing the EEH_VALID_PE_ZERO flag 3) Removing the fallback address argument to eeh_pe_get(). 4) Removing all the checks for pe->addr being zero in the pseries EEH code. This leaves us with PE's only being identified by what's in their pe->addr field and the EEH core relying on the platform to ensure that eeh_dev's are only inserted into the EEH tree if they're actually inside a PE. No functional changes, I hope. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200918093050.37344-9-oohall@gmail.com commit 42de19d5ef71b91765266557705394e52954adb3 Author: Oliver O'Halloran Date: Fri Sep 18 19:30:49 2020 +1000 powerpc/pseries/eeh: Allow zero to be a valid PE configuration address There's no real reason why zero can't be a valid PE configuration address. Under qemu each sPAPR PHB (i.e. EEH supporting) has the passed-though devices on bus zero, so the PE address of bus :00 should be zero. However, all previous versions of Linux will reject that, so Qemu at least goes out of it's way to avoid it. The Qemu implementation of ibm,get-config-addr-info2 RTAS has the following comment: > /* > * We always have PE address of form "00BB0001". "BB" > * represents the bus number of PE's primary bus. > */ So qemu puts a one into the register portion of the PE's config_addr to avoid it being zero. The whole is pretty silly considering that RTAS will return a negative error code if it can't map the device's config_addr to a PE. This patch fixes Linux to treat zero as a valid PE address. This shouldn't have any real effects due to the Qemu hack mentioned above. And the fact that Linux EEH has worked historically on PowerVM means they never pass through devices on bus zero so we would never see the problem there either. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200918093050.37344-8-oohall@gmail.com commit 98ba956f6a3891b233466b8da064f17d16dc2090 Author: Oliver O'Halloran Date: Fri Sep 18 19:30:48 2020 +1000 powerpc/pseries/eeh: Rework device EEH PE determination The process Linux uses for determining if a device supports EEH or not appears to be at odds with what PAPR says the OS should be doing. The current flow is something like: 1. Assume pe_config_addr is equal the the device's config_addr. 2. Attempt to enable EEH on that PE 3. Verify EEH was enabled (POWER4 bug workaround) 4. Try find the pe_config_addr using the ibm,get-config-addr-info2 RTAS call. 5. If that fails walk the pci_dn tree upwards trying to find a parent device with EEH support. If we find one then add the device to that PE. The first major problem with this process is that we need the PE config address in step 2) since its needs to be passed to the ibm,set-eeh-option RTAS call when enabling EEH for th PE. We hack around this requirement in by making the assumption in 1) and delay finding the actual PE address until 4). This is fine if: a) The PCI device is the 0th function, and b) The device is on the PE's root bus. Granted, the current sequence does appear to work on most systems even when these conditions are false. At a guess PowerVM's RTAS has workarounds to accommodate Linux's quirks or the RTAS call to enable EEH is treated as no-op on most platforms since EEH is usually enabled by default. However, what is currently implemented is a bit sketch and is downright confusing since it doesn't match up with what what PAPR suggests we should be doing. This patch re-works how we handle EEH init so that we find the PE config address using the ibm,get-config-addr-info2 RTAS call first, then use the found address to finish the EEH init process. It also drops the Power4 workaround since as of commit 471d7ff8b51b ("powerpc/64s: Remove POWER4 support") the kernel does not support running on a Power4 CPU so there's no need to support the Power4 platform's quirks either. With the patch applied the sequence is now: 1. Find the pe_config_addr from the device using the RTAS call. 2. Enable the PE. 3. Insert the edev into the tree and create an eeh_pe if needed. The other change made here is ignoring unsupported devices entirely. Currently the device's BARs are saved to the eeh_dev even if the device is not part of an EEH PE. Not being part of a PE means that an EEH recovery pass will never see that device so the saving the BARs is pointless. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200918093050.37344-7-oohall@gmail.com commit f61c859feb5d19787c93d6b2b3d4beeca7260034 Author: Oliver O'Halloran Date: Fri Sep 18 19:30:47 2020 +1000 powerpc/pseries/eeh: Clean up pe_config_addr lookups De-duplicate, and fix up the comments, and make the prototype just take a pci_dn since the job of the function is to return the pe_config_addr of the PE which contains a given device. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200918093050.37344-6-oohall@gmail.com commit 395ee2a2a15ba1c4c7c414db24dc3082ba8feab8 Author: Oliver O'Halloran Date: Fri Sep 18 19:30:46 2020 +1000 powerpc/eeh: Move EEH initialisation to an arch initcall The initialisation of EEH mostly happens in a core_initcall_sync initcall, followed by registering a bus notifier later on in an arch_initcall. Anything involving initcall dependecies is mostly incomprehensible unless you've spent a while staring at code so here's the full sequence: ppc_md.setup_arch <-- pci_controllers are created here ...time passes... core_initcall <-- pci_dns are created from DT nodes core_initcall_sync <-- platforms call eeh_init() postcore_initcall <-- PCI bus type is registered postcore_initcall_sync arch_initcall <-- EEH pci_bus notifier registered subsys_initcall <-- PHBs are scanned here There's no real requirement to do the EEH setup at the core_initcall_sync level. It just needs to be done after pci_dn's are created and before we start scanning PHBs. Simplify the flow a bit by moving the platform EEH inititalisation to an arch_initcall so we can fold the bus notifier registration into eeh_init(). Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200918093050.37344-5-oohall@gmail.com commit 5d69e46a2104050c0a458c6bf6abba5f58f56e4c Author: Oliver O'Halloran Date: Fri Sep 18 19:30:45 2020 +1000 powerpc/eeh: Delete eeh_ops->init No longer used since the platforms perform their EEH initialisation before calling eeh_init(). Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200918093050.37344-4-oohall@gmail.com commit 1f8fa0cd6a848ff072bffe0ee776554387128f60 Author: Oliver O'Halloran Date: Fri Sep 18 19:30:44 2020 +1000 powerpc/pseries: Stop using eeh_ops->init() Fold pseries_eeh_init() into eeh_pseries_init() rather than having eeh_init() call it via eeh_ops->init(). It's simpler and it'll let us delete eeh_ops.init. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200918093050.37344-3-oohall@gmail.com commit 82a1ea21f1bac42eb8e3f77d5d249201855f2c85 Author: Oliver O'Halloran Date: Fri Sep 18 19:30:43 2020 +1000 powerpc/powernv: Stop using eeh_ops->init() Fold pnv_eeh_init() into eeh_powernv_init() rather than having eeh_init() call it via eeh_ops->init(). It's simpler and it'll let us delete eeh_ops.init. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200918093050.37344-2-oohall@gmail.com commit d125aedb404204de0579b16028096b2cc09e4deb Author: Oliver O'Halloran Date: Fri Sep 18 19:30:42 2020 +1000 powerpc/eeh: Rework EEH initialisation Drop the EEH register / unregister ops thing and have the platform pass the ops structure into eeh_init() directly. This takes one initcall out of the EEH setup path and it means we're only doing EEH setup on the platforms which actually support it. It's also less code and generally easier to follow. No functional changes. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200918093050.37344-1-oohall@gmail.com commit 874dc62f548f28649ac3d7e31025b1e8cec3868a Author: Christoph Hellwig Date: Thu Sep 24 06:13:10 2020 +0200 powerpc: switch 85xx defconfigs from legacy ide to libata Switch the 85xx defconfigs from the soon to be removed legacy ide driver to libata. Signed-off-by: Christoph Hellwig Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200924041310.520970-1-hch@lst.de commit 5c5e46dad939b2bf4df04293ab9ac68abd7c1f55 Author: Daniel Axtens Date: Thu Sep 24 11:49:22 2020 +1000 powerpc: PPC_SECURE_BOOT should not require PowerNV In commit 61f879d97ce4 ("powerpc/pseries: Detect secure and trusted boot state of the system.") we taught the kernel how to understand the secure-boot parameters used by a pseries guest. However, CONFIG_PPC_SECURE_BOOT still requires PowerNV. I didn't catch this because pseries_le_defconfig includes support for PowerNV and so everything still worked. Indeed, most configs will. Nonetheless, technically PPC_SECURE_BOOT doesn't require PowerNV any more. The secure variables support (PPC_SECVAR_SYSFS) doesn't do anything on pSeries yet, but I don't think it's worth adding a new condition - at some stage we'll want to add a backend for pSeries anyway. Fixes: 61f879d97ce4 ("powerpc/pseries: Detect secure and trusted boot state of the system.") Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200924014922.172914-1-dja@axtens.net commit 4366337490cbe5a35b50e83755be629a502ec7e2 Author: Wang Wensheng Date: Fri Sep 18 08:59:51 2020 +0000 powerpc/papr_scm: Fix warnings about undeclared variable Build the kernel with 'make C=2': arch/powerpc/platforms/pseries/papr_scm.c:825:1: warning: symbol 'dev_attr_perf_stats' was not declared. Should it be static? Signed-off-by: Wang Wensheng Reviewed-by: Vaibhav Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200918085951.44983-1-wangwensheng4@huawei.com commit 455575533c7aa294d3c0284d59a77ae9a60c0537 Author: Nicholas Piggin Date: Tue Sep 15 21:46:49 2020 +1000 powerpc/64: make restore_interrupts 64e only This is not used by 64s. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200915114650.3980244-5-npiggin@gmail.com commit 903dd1ff453e458fc7608ee4df42a6df16d3d1a0 Author: Nicholas Piggin Date: Tue Sep 15 21:46:48 2020 +1000 powerpc/64e: remove 64s specific interrupt soft-mask code Since the assembly soft-masking code was moved to 64e specific, there are some 64s specific interrupt types still there. Remove them. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200915114650.3980244-4-npiggin@gmail.com commit 012a9a97a8fd6c96d5ec64eb0583220490d95e73 Author: Nicholas Piggin Date: Tue Sep 15 21:46:47 2020 +1000 powerpc/64e: remove PACA_IRQ_EE_EDGE This is not used anywhere. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200915114650.3980244-3-npiggin@gmail.com commit 2b48e96be2f9f7151197fd25dc41487054bc6f5b Author: Nicholas Piggin Date: Tue Sep 15 21:46:46 2020 +1000 powerpc/64: fix irq replay pt_regs->softe value Replayed interrupts get an "artificial" struct pt_regs constructed to pass to interrupt handler functions. This did not get the softe field set correctly, it's as though the interrupt has hit while irqs are disabled. It should be IRQS_ENABLED. This is possibly harmless, asynchronous handlers should not be testing if irqs were disabled, but it might be possible for example some code is shared with synchronous or NMI handlers, and it makes more sense if debug output looks at this. Fixes: 3282a3da25bd ("powerpc/64: Implement soft interrupt replay in C") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200915114650.3980244-2-npiggin@gmail.com commit 903fd31d3212ab72d564c68f6cfb5d04db68773e Author: Nicholas Piggin Date: Tue Sep 15 21:46:45 2020 +1000 powerpc/64: fix irq replay missing preempt Prior to commit 3282a3da25bd ("powerpc/64: Implement soft interrupt replay in C"), replayed interrupts returned by the regular interrupt exit code, which performs preemption in case an interrupt had set need_resched. This logic was missed by the conversion. Adding preempt_disable/enable around the interrupt replay and final irq enable will reschedule if needed. Fixes: 3282a3da25bd ("powerpc/64: Implement soft interrupt replay in C") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200915114650.3980244-1-npiggin@gmail.com commit cdb1ea0276bd6a225aa1203b4829b8c3c0d4d069 Author: Nicholas Piggin Date: Tue Aug 25 17:56:12 2020 +1000 powerpc/pseries: add new branch prediction security bits for link stack The hypervisor interface has defined branch prediction security bits for handling the link stack. Wire them up. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200825075612.224656-1-npiggin@gmail.com commit 05504b42562066ae27ce3e7dcec37f81dea476cb Author: Nicholas Piggin Date: Wed Sep 16 13:02:34 2020 +1000 powerpc/64s: Add cp_abort after tlbiel to invalidate copy-buffer address The copy buffer is implemented as a real address in the nest which is translated from EA by copy, and used for memory access by paste. This requires that it be invalidated by TLB invalidation. TLBIE does invalidate the copy buffer, but TLBIEL does not. Add cp_abort to the tlbiel sequence. Signed-off-by: Nicholas Piggin [mpe: Fixup whitespace and comment formatting] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200916030234.4110379-2-npiggin@gmail.com commit 9983efa83b0a98da33807ccf5c047e204fdcac4c Author: Nicholas Piggin Date: Wed Sep 16 13:02:33 2020 +1000 powerpc: untangle cputable mce include Having cputable.h include mce.h means it pulls in a bunch of low level headers (e.g., synch.h) which then can't use CPU_FTR_ definitions. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200916030234.4110379-1-npiggin@gmail.com commit aea948bb80b478ddc2448f7359d574387521a52d Author: Mahesh Salgaonkar Date: Tue Oct 6 13:02:18 2020 +0530 powerpc/powernv/elog: Fix race while processing OPAL error log event. Every error log reported by OPAL is exported to userspace through a sysfs interface and notified using kobject_uevent(). The userspace daemon (opal_errd) then reads the error log and acknowledges the error log is saved safely to disk. Once acknowledged the kernel removes the respective sysfs file entry causing respective resources to be released including kobject. However it's possible the userspace daemon may already be scanning elog entries when a new sysfs elog entry is created by the kernel. User daemon may read this new entry and ack it even before kernel can notify userspace about it through kobject_uevent() call. If that happens then we have a potential race between elog_ack_store->kobject_put() and kobject_uevent which can lead to use-after-free of a kernfs object resulting in a kernel crash. eg: BUG: Unable to handle kernel data access on read at 0x6b6b6b6b6b6b6bfb Faulting instruction address: 0xc0000000008ff2a0 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA PowerNV CPU: 27 PID: 805 Comm: irq/29-opal-elo Not tainted 5.9.0-rc2-gcc-8.2.0-00214-g6f56a67bcbb5-dirty #363 ... NIP kobject_uevent_env+0xa0/0x910 LR elog_event+0x1f4/0x2d0 Call Trace: 0x5deadbeef0000122 (unreliable) elog_event+0x1f4/0x2d0 irq_thread_fn+0x4c/0xc0 irq_thread+0x1c0/0x2b0 kthread+0x1c4/0x1d0 ret_from_kernel_thread+0x5c/0x6c This patch fixes this race by protecting the sysfs file creation/notification by holding a reference count on kobject until we safely send kobject_uevent(). The function create_elog_obj() returns the elog object which if used by caller function will end up in use-after-free problem again. However, the return value of create_elog_obj() function isn't being used today and there is no need as well. Hence change it to return void to make this fix complete. Fixes: 774fea1a38c6 ("powerpc/powernv: Read OPAL error log and export it through sysfs") Cc: stable@vger.kernel.org # v3.15+ Reported-by: Oliver O'Halloran Signed-off-by: Mahesh Salgaonkar Signed-off-by: Aneesh Kumar K.V Reviewed-by: Oliver O'Halloran Reviewed-by: Vasant Hegde [mpe: Rework the logic to use a single return, reword comments, add oops] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201006122051.190176-1-mpe@ellerman.id.au commit 9b7224836965550649357732f7f0b63a5bfcc305 Author: Thomas Bogendoerfer Date: Mon Oct 5 13:28:46 2020 +0200 MIPS: pgtable: Remove used PAGE_USERIO define There are no users of PAGE_USERIO. Signed-off-by: Thomas Bogendoerfer commit 026ba130a5e8861259d12fb9ae352e9ce408955d Author: Thomas Bogendoerfer Date: Mon Oct 5 13:28:45 2020 +0200 MIPS: alchemy: Share prom_init implementation All boards have the same prom_init() function. Move it to common code and delete the duplicates. Signed-off-by: Thomas Bogendoerfer commit 396c7d94c3bbe07ae00c9f694a5c731878843038 Author: Thomas Bogendoerfer Date: Mon Oct 5 11:42:19 2020 +0200 MIPS: alchemy: Fix build breakage, if TOUCHSCREEN_WM97XX is disabled Only include wm97xx touchscreen probing code, if driver is enabled. Reported-by: kernel test robot Signed-off-by: Thomas Bogendoerfer commit e0e9ce390d7bc6a705653d4a8aa4ea92c9a65e53 Author: Rafael J. Wysocki Date: Mon Oct 5 19:13:46 2020 +0200 ACPI: EC: PM: Drop ec_no_wakeup check from acpi_ec_dispatch_gpe() It turns out that in some cases there are EC events to flush in acpi_ec_dispatch_gpe() even though the ec_no_wakeup kernel parameter is set and the EC GPE is disabled while sleeping, so drop the ec_no_wakeup check that prevents those events from being processed from acpi_ec_dispatch_gpe(). Reported-by: Todd Brandt Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki commit 5e92442bb4121562231e6daf8a2d1306cb5f8805 Author: Rafael J. Wysocki Date: Mon Oct 5 19:13:15 2020 +0200 ACPI: EC: PM: Flush EC work unconditionally after wakeup Commit 607b9df63057 ("ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive") has been reported to cause some power button wakeup events to be missed on some systems, so modify acpi_ec_dispatch_gpe() to call acpi_ec_flush_work() unconditionally to effectively reverse the changes made by that commit. Also note that the problem which prompted commit 607b9df63057 is not reproducible any more on the affected machine. Fixes: 607b9df63057 ("ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive") Reported-by: Raymond Tan Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki commit 04e8c5b2fa9a2ad66496c810562454fc324446a8 Merge: 9b64efa837267 d7bc63fa20b8a Author: Marc Zyngier Date: Tue Oct 6 11:28:03 2020 +0100 Merge branch 'irq/qcom-pdc-wakeup' into irq/irqchip-next Signed-off-by: Marc Zyngier commit a17a733e377d288b3091fa79e6ce3ad5b5bf8753 Merge: 08d8c65e849d7 bc9b9c5ab9d8d Author: Rafael J. Wysocki Date: Tue Oct 6 12:26:45 2020 +0200 Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull ARM cpufreq updates for 5.10-rc1 from Viresh Kumar: "- STI cpufreq driver updates to allow new hardware (Alain Volmat). - Minor tegra driver fixes around initial frequency mismatch warnings (Jon Hunter). - dev_err simplification for s5pv210 driver (Krzysztof Kozlowski). - Qcom driver updates to allow new hardware and minor cleanup (Manivannan Sadhasivam and Matthias Kaehlcke). - Add missing MODULE_DEVICE_TABLE for armada driver (Pali Rohár). - Improved defer-probe handling in cpufreq-dt driver (Stephan Gerhold). - Call dev_pm_opp_of_remove_table() unconditionally for imx driver (Viresh Kumar)." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: qcom: Don't add frequencies without an OPP cpufreq: qcom-hw: Add cpufreq support for SM8250 SoC cpufreq: qcom-hw: Use of_device_get_match_data for offsets and row size cpufreq: qcom-hw: Use devm_platform_ioremap_resource() to simplify code dt-bindings: cpufreq: cpufreq-qcom-hw: Document Qcom EPSS compatible cpufreq: qcom-hw: Make use of cpufreq driver_data for passing pdev cpufreq: armada-37xx: Add missing MODULE_DEVICE_TABLE cpufreq: arm: Kconfig: add CPUFREQ_DT depend for STI CPUFREQ cpufreq: dt-platdev: Blacklist st,stih418 SoC cpufreq: sti-cpufreq: add stih418 support cpufreq: s5pv210: Use dev_err instead of pr_err in probe cpufreq: s5pv210: Simplify with dev_err_probe() cpufreq: tegra186: Fix initial frequency cpufreq: dt: Refactor initialization to handle probe deferral properly opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1() cpufreq: imx6q: Unconditionally call dev_pm_opp_of_remove_table() opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER commit d7bc63fa20b8a3b0d0645bed1887848c65c01529 Author: Maulik Shah Date: Mon Sep 28 10:02:04 2020 +0530 irqchip/qcom-pdc: Reset PDC interrupts during init Kexec can directly boot into a new kernel without going to complete reboot. This can leave the previous kernel's configuration for PDC interrupts as is. Clear previous kernel's configuration during init by setting interrupts in enable bank to zero. The IRQs specified in qcom,pdc-ranges property are the only ones that can be used by the new kernel so clear only those IRQs. The remaining ones may be in use by a different kernel and should not be set by new kernel. Suggested-by: Stephen Boyd Signed-off-by: Maulik Shah Signed-off-by: Marc Zyngier Tested-by: Stephen Boyd Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Acked-by: Linus Walleij Link: https://lore.kernel.org/r/1601267524-20199-7-git-send-email-mkshah@codeaurora.org commit 299d7890792e75065b906f83fcb0ca92e5c8c072 Author: Maulik Shah Date: Mon Sep 28 10:02:03 2020 +0530 irqchip/qcom-pdc: Set IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag Set IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag to enable/unmask the wakeirqs during suspend entry. Signed-off-by: Maulik Shah Signed-off-by: Marc Zyngier Tested-by: Stephen Boyd Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Acked-by: Linus Walleij Link: https://lore.kernel.org/r/1601267524-20199-6-git-send-email-mkshah@codeaurora.org commit dd87bd09822c294a3c7c4daf11f11a9f81222f80 Author: Maulik Shah Date: Mon Sep 28 10:02:02 2020 +0530 pinctrl: qcom: Set IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag Set IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag to enable/unmask the wakeirqs during suspend entry. Signed-off-by: Maulik Shah Signed-off-by: Marc Zyngier Tested-by: Stephen Boyd Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Acked-by: Linus Walleij Link: https://lore.kernel.org/r/1601267524-20199-5-git-send-email-mkshah@codeaurora.org commit 90428a8eb4947f9c7c905a178f3520dc7e2ee6d2 Author: Maulik Shah Date: Mon Sep 28 10:02:01 2020 +0530 genirq/PM: Introduce IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag An interrupt that is disabled/masked but set for wakeup may still need to be able to wake up the system from sleep states like "suspend to RAM". To that effect, introduce the IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag. If the irqchip have this flag set, the irq PM code will enable/unmask the irqs that are marked for wakeup, but that are in a disabled state. On resume, such irqs will be restored back to their disabled state. Suggested-by: Thomas Gleixner Signed-off-by: Maulik Shah [maz: commit message fix-up] Signed-off-by: Marc Zyngier Tested-by: Stephen Boyd Reviewed-by: Thomas Gleixner Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/1601267524-20199-4-git-send-email-mkshah@codeaurora.org commit f41aaca593377a4fe3984459fd4539481263b4cd Author: Maulik Shah Date: Mon Sep 28 10:02:00 2020 +0530 pinctrl: qcom: Use return value from irq_set_wake() call msmgpio irqchip was not using return value of irq_set_irq_wake() callback since previously GIC-v3 irqchip neither had IRQCHIP_SKIP_SET_WAKE flag nor it implemented .irq_set_wake callback. This lead to irq_set_irq_wake() return error -ENXIO. However from 'commit 4110b5cbb014 ("irqchip/gic-v3: Allow interrupt to be configured as wake-up sources")' GIC irqchip has IRQCHIP_SKIP_SET_WAKE flag. Use return value from irq_set_irq_wake() and irq_chip_set_wake_parent() instead of always returning success. Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy") Signed-off-by: Maulik Shah Signed-off-by: Marc Zyngier Tested-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Acked-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://lore.kernel.org/r/1601267524-20199-3-git-send-email-mkshah@codeaurora.org commit c5f72aeb659eb2f809b9531d759651514d42aa3a Author: Maulik Shah Date: Mon Sep 28 10:01:59 2020 +0530 pinctrl: qcom: Set IRQCHIP_SET_TYPE_MASKED and IRQCHIP_MASK_ON_SUSPEND flags Both IRQCHIP_SET_TYPE_MASKED and IRQCHIP_MASK_ON_SUSPEND flags are already set for msmgpio's parent PDC irqchip but GPIO interrupts do not get masked during suspend or during setting irq type since genirq checks irqchip flag of msmgpio irqchip which forwards these calls to its parent PDC irqchip. Add irqchip specific flags for msmgpio irqchip to mask non wakeirqs during suspend and mask before setting irq type. Masking before changing type make sures any spurious interrupt is not detected during this operation. Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy") Signed-off-by: Maulik Shah Signed-off-by: Marc Zyngier Tested-by: Stephen Boyd Reviewed-by: Douglas Anderson Acked-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://lore.kernel.org/r/1601267524-20199-2-git-send-email-mkshah@codeaurora.org commit c6e331312ebfb52b7186e5d82d517d68b4d2f2d8 Author: Lukas Wunner Date: Fri Oct 2 07:10:12 2020 +0200 PCI/ACPI: Whitelist hotplug ports for D3 if power managed by ACPI Recent laptops with dual AMD GPUs fail to suspend the discrete GPU, thus causing lockups on system sleep and high power consumption at runtime. The discrete GPU would normally be suspended to D3cold by turning off ACPI _PR3 Power Resources of the Root Port above the GPU. However on affected systems, the Root Port is hotplug-capable and pci_bridge_d3_possible() only allows hotplug ports to go to D3 if they belong to a Thunderbolt device or if the Root Port possesses a "HotPlugSupportInD3" ACPI property. Neither is the case on affected laptops. The reason for whitelisting only specific, known to work hotplug ports for D3 is that there have been reports of SkyLake Xeon-SP systems raising Hardware Error NMIs upon suspending their hotplug ports: https://lore.kernel.org/linux-pci/20170503180426.GA4058@otc-nc-03/ But if a hotplug port is power manageable by ACPI (as can be detected through presence of Power Resources and corresponding _PS0 and _PS3 methods) then it ought to be safe to suspend it to D3. To this end, amend acpi_pci_bridge_d3() to whitelist such ports for D3. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1222 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1252 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1304 Reported-and-tested-by: Arthur Borsboom Reported-and-tested-by: matoro Reported-by: Aaron Zakhrov Reported-by: Michal Rostecki Reported-by: Shai Coleman Signed-off-by: Lukas Wunner Acked-by: Alex Deucher Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki commit 8ae237ec0af9f754c1da00913646f3c46a99a1cb Author: Ikjoon Jang Date: Thu Sep 3 11:04:40 2020 +0800 power: supply: sbs-battery: keep error code when get_property() fails Commit 395a7251dc2b (power: supply: sbs-battery: don't assume i2c errors as battery disconnect) overwrites the original error code returned from internal functions. On such a sporadic i2c error, a user will get a wrong value without errors. Fixes: 395a7251dc2b (power: supply: sbs-battery: don't assume i2c errors as battery disconnect) Signed-off-by: Ikjoon Jang Signed-off-by: Sebastian Reichel commit 5da8e4a658109e3b7e1f45ae672b7c06ac3e7158 Author: Dan Williams Date: Mon Oct 5 20:40:25 2020 -0700 x86/copy_mc: Introduce copy_mc_enhanced_fast_string() The motivations to go rework memcpy_mcsafe() are that the benefit of doing slow and careful copies is obviated on newer CPUs, and that the current opt-in list of CPUs to instrument recovery is broken relative to those CPUs. There is no need to keep an opt-in list up to date on an ongoing basis if pmem/dax operations are instrumented for recovery by default. With recovery enabled by default the old "mcsafe_key" opt-in to careful copying can be made a "fragile" opt-out. Where the "fragile" list takes steps to not consume poison across cachelines. The discussion with Linus made clear that the current "_mcsafe" suffix was imprecise to a fault. The operations that are needed by pmem/dax are to copy from a source address that might throw #MC to a destination that may write-fault, if it is a user page. So copy_to_user_mcsafe() becomes copy_mc_to_user() to indicate the separate precautions taken on source and destination. copy_mc_to_kernel() is introduced as a non-SMAP version that does not expect write-faults on the destination, but is still prepared to abort with an error code upon taking #MC. The original copy_mc_fragile() implementation had negative performance implications since it did not use the fast-string instruction sequence to perform copies. For this reason copy_mc_to_kernel() fell back to plain memcpy() to preserve performance on platforms that did not indicate the capability to recover from machine check exceptions. However, that capability detection was not architectural and now that some platforms can recover from fast-string consumption of memory errors the memcpy() fallback now causes these more capable platforms to fail. Introduce copy_mc_enhanced_fast_string() as the fast default implementation of copy_mc_to_kernel() and finalize the transition of copy_mc_fragile() to be a platform quirk to indicate 'copy-carefully'. With this in place, copy_mc_to_kernel() is fast and recovery-ready by default regardless of hardware capability. Thanks to Vivek for identifying that copy_user_generic() is not suitable as the copy_mc_to_user() backend since the #MC handler explicitly checks ex_has_fault_handler(). Thanks to the 0day robot for catching a performance bug in the x86/copy_mc_to_user implementation. [ bp: Add the "why" for this change from the 0/2th message, massage. ] Fixes: 92b0729c34ca ("x86/mm, x86/mce: Add memcpy_mcsafe()") Reported-by: Erwin Tsaur Reported-by: 0day robot Signed-off-by: Dan Williams Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Tested-by: Erwin Tsaur Cc: Link: https://lkml.kernel.org/r/160195562556.2163339.18063423034951948973.stgit@dwillia2-desk3.amr.corp.intel.com commit ec6347bb43395cb92126788a1a5b25302543f815 Author: Dan Williams Date: Mon Oct 5 20:40:16 2020 -0700 x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}() In reaction to a proposal to introduce a memcpy_mcsafe_fast() implementation Linus points out that memcpy_mcsafe() is poorly named relative to communicating the scope of the interface. Specifically what addresses are valid to pass as source, destination, and what faults / exceptions are handled. Of particular concern is that even though x86 might be able to handle the semantics of copy_mc_to_user() with its common copy_user_generic() implementation other archs likely need / want an explicit path for this case: On Fri, May 1, 2020 at 11:28 AM Linus Torvalds wrote: > > On Thu, Apr 30, 2020 at 6:21 PM Dan Williams wrote: > > > > However now I see that copy_user_generic() works for the wrong reason. > > It works because the exception on the source address due to poison > > looks no different than a write fault on the user address to the > > caller, it's still just a short copy. So it makes copy_to_user() work > > for the wrong reason relative to the name. > > Right. > > And it won't work that way on other architectures. On x86, we have a > generic function that can take faults on either side, and we use it > for both cases (and for the "in_user" case too), but that's an > artifact of the architecture oddity. > > In fact, it's probably wrong even on x86 - because it can hide bugs - > but writing those things is painful enough that everybody prefers > having just one function. Replace a single top-level memcpy_mcsafe() with either copy_mc_to_user(), or copy_mc_to_kernel(). Introduce an x86 copy_mc_fragile() name as the rename for the low-level x86 implementation formerly named memcpy_mcsafe(). It is used as the slow / careful backend that is supplanted by a fast copy_mc_generic() in a follow-on patch. One side-effect of this reorganization is that separating copy_mc_64.S to its own file means that perf no longer needs to track dependencies for its memcpy_64.S benchmarks. [ bp: Massage a bit. ] Signed-off-by: Dan Williams Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Acked-by: Michael Ellerman Cc: Link: http://lore.kernel.org/r/CAHk-=wjSqtXAqfUJxFtWNwmguFASTgB0dz1dT3V-78Quiezqbg@mail.gmail.com Link: https://lkml.kernel.org/r/160195561680.2163339.11574962055305783722.stgit@dwillia2-desk3.amr.corp.intel.com commit 5de15b610f785f0e188fefb707f0b19de156968a Author: Sergei Shtylyov Date: Sat Oct 3 23:23:20 2020 +0300 mtd: hyperbus: add Renesas RPC-IF driver Add the HyperFLash driver for the Renesas RPC-IF. It's the "front end" driver using the "back end" APIs in the main driver to talk to the real hardware. Signed-off-by: Sergei Shtylyov Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/78abb851-2beb-fe7d-87e5-ce58ee877d35@gmail.com commit 9a3422a110c868e511387a81df25a315eaa3a7b8 Author: Vignesh Raghavendra Date: Mon Oct 5 14:25:10 2020 +0530 Revert "mtd: spi-nor: Prefer asynchronous probe" This reverts commit 03edda0e1edaa3c2e99239c66e3c14d749318fd6. This leads to warn dump like [1] on some platforms and reorders MTD devices which may break user space expectations [2]. So revert the change. [1]: [ 1.849801] ------------[ cut here ]------------ [ 1.854271] mscc_felix 0000:00:00.5: device is disabled, skipping [ 1.858753] WARNING: CPU: 1 PID: 7 at kernel/kmod.c:136 __request_module+0x3a4/0x568 [...] [2] Bug report: https://lore.kernel.org/linux-mtd/20201003150633.23416-1-michael@walle.cc/ Reported-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20201005090321.8724-1-vigneshr@ti.com commit 9f4df96b8781e40d0cb0e32eb3d1f6d87375adf9 Author: Christoph Hellwig Date: Tue Sep 22 15:36:11 2020 +0200 dma-mapping: merge into Move more nitty gritty DMA implementation details into the common internal header. Signed-off-by: Christoph Hellwig commit 19c65c3d30bb5a97170e425979d2e44ab2096c7d Author: Christoph Hellwig Date: Tue Sep 22 15:34:22 2020 +0200 dma-mapping: move large parts of to kernel/dma Most of the dma_direct symbols should only be used by direct.c and mapping.c, so move them to kernel/dma. In fact more of dma-direct.h should eventually move, but that will require more coordination with other subsystems. Signed-off-by: Christoph Hellwig commit a1fd09e8e6ae35228ecc7c1e4bfff1fd725f78a0 Author: Christoph Hellwig Date: Fri Sep 11 10:12:44 2020 +0200 dma-mapping: move dma-debug.h to kernel/dma/ Most of dma-debug.h is not required by anything outside of kernel/dma. Move the four declarations needed by dma-mappin.h or dma-ops providers into dma-mapping.h and dma-map-ops.h, and move the remainder of the file to kernel/dma/debug.h. Signed-off-by: Christoph Hellwig commit 5db5d93089880c3cc9e83ca8bba68a5502e92dfe Author: Christoph Hellwig Date: Fri Sep 11 11:04:43 2020 +0200 dma-mapping: remove Just provide a weak default definition of dma_contiguous_early_fixup and let arm override it. Signed-off-by: Christoph Hellwig commit 0b1abd1fb7efafc25231c54a67c6fbb3d3127efd Author: Christoph Hellwig Date: Fri Sep 11 10:56:52 2020 +0200 dma-mapping: merge into Merge dma-contiguous.h into dma-map-ops.h, after removing the comment describing the contiguous allocator into kernel/dma/contigous.c. Signed-off-by: Christoph Hellwig commit 580a0cc9c3f662e0b10136bc8af1e672e472806f Author: Christoph Hellwig Date: Fri Sep 11 10:56:40 2020 +0200 dma-contiguous: remove dma_contiguous_set_default dma_contiguous_set_default contains a trivial assignment, and has a single caller that is compiled if CONFIG_CMA_DMA is enabled. Signed-off-by: Christoph Hellwig commit 5af638931eb374aa0894d8343cee72f50307ef20 Author: Christoph Hellwig Date: Fri Sep 11 10:56:03 2020 +0200 dma-contiguous: remove dev_set_cma_area dev_set_cma_area contains a trivial assignment. It has just three callers that all have a non-NULL device and depend on CONFIG_DMA_CMA, so remove the wrapper. Signed-off-by: Christoph Hellwig commit 8df4051232152a0520ab3035c2d96f33083c2d6a Author: Christoph Hellwig Date: Fri Sep 11 10:29:47 2020 +0200 dma-contiguous: remove dma_declare_contiguous dma_declare_contiguous is a trivial wrapper around dma_contiguous_reserve_area and just has a single caller. Signed-off-by: Christoph Hellwig commit 0a0f0d8be76dcd4390ff538e7060fda34db79717 Author: Christoph Hellwig Date: Tue Sep 22 15:31:03 2020 +0200 dma-mapping: split Split out all the bits that are purely for dma_map_ops implementations and related code into a new header so that they don't get pulled into all the drivers. That also means the architecture specific is not pulled in by any more, which leads to a missing includes that were pulled in by the x86 or arm versions in a few not overly portable drivers. Signed-off-by: Christoph Hellwig commit 0de327969b61a245e3a47b60009eae73fe513cef Author: Paul Cercueil Date: Wed Sep 30 12:28:21 2020 +0200 cma: decrease CMA_ALIGNMENT lower limit to 2 On an embedded system with a tiny (1 MiB) CMA area for video memory, and a simple enough video pipeline, we can decrease the CMA_ALIGNMENT by a factor of 2 to avoid wasting memory, as all the allocations for video buffers will be of the exact same size (dictated by the size of the screen). Signed-off-by: Paul Cercueil Signed-off-by: Christoph Hellwig commit 6364d1b41cc382db3b03cf33c57b6007ee8f09cf Author: Randy Dunlap Date: Mon Oct 5 20:30:00 2020 -0700 arc: include/asm: fix typos of "themselves" Fix copy/paste spello of "themselves" in 3 places. Signed-off-by: Randy Dunlap Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Vineet Gupta commit 937cf85f1df8f8e287dac6b876ea55ef9f08071e Author: Mike Rapoport Date: Mon Oct 5 19:12:37 2020 +0300 ARC: SMP: fix typo and use "come up" instead of "comeup" When a secondary CPU fails to come up, there is a missing space in the log: Timeout: CPU1 FAILED to comeup !!! Fix it. Signed-off-by: Mike Rapoport Signed-off-by: Vineet Gupta commit 05b1be68c4d6d76970025e6139bfd735c2256ee5 Author: Zhen Lei Date: Thu Sep 24 15:17:54 2020 +0800 ARC: [dts] fix the errors detected by dtbs_check xxx/arc/boot/dts/axs101.dt.yaml: dw-apb-ictl@e0012000: $nodename:0: \ 'dw-apb-ictl@e0012000' does not match '^interrupt-controller(@[0-9a-f,]+)*$' From schema: xxx/interrupt-controller/snps,dw-apb-ictl.yaml The node name of the interrupt controller must start with "interrupt-controller" instead of "dw-apb-ictl". Signed-off-by: Zhen Lei Signed-off-by: Vineet Gupta commit 63bcf87cb1c57956e1179f1a78dde625c7e3cba7 Author: Necip Fazil Yildiran Date: Mon Sep 14 14:46:52 2020 +0300 arc: plat-hsdk: fix kconfig dependency warning when !RESET_CONTROLLER When ARC_SOC_HSDK is enabled and RESET_CONTROLLER is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for RESET_HSDK Depends on [n]: RESET_CONTROLLER [=n] && HAS_IOMEM [=y] && (ARC_SOC_HSDK [=y] || COMPILE_TEST [=n]) Selected by [y]: - ARC_SOC_HSDK [=y] && ISA_ARCV2 [=y] The reason is that ARC_SOC_HSDK selects RESET_HSDK without depending on or selecting RESET_CONTROLLER while RESET_HSDK is subordinate to RESET_CONTROLLER. Honor the kconfig menu hierarchy to remove kconfig dependency warnings. Fixes: a528629dfd3b ("ARC: [plat-hsdk] select CONFIG_RESET_HSDK from Kconfig") Signed-off-by: Necip Fazil Yildiran Signed-off-by: Vineet Gupta commit dd7c7ab01a04d645b7e7baa8530bfd81e31a2202 Author: Vineet Gupta Date: Tue Aug 25 18:37:17 2020 -0700 ARC: [plat-eznps]: Drop support for EZChip NPS platform NPS customers are no longer doing active development, as evident from rand config build failures reported in recent times, so drop support for NPS platform. Tested-by: kernel test robot Signed-off-by: Vineet Gupta commit 8b0308fe319b8002753ea66f8f940fb393792ddd Merge: f4f9dcc3f4c5f 7575fdda569b2 Author: David S. Miller Date: Mon Oct 5 17:33:26 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Rejecting non-native endian BTF overlapped with the addition of support for it. The rest were more simple overlapping changes, except the renesas ravb binding update, which had to follow a file move as well as a YAML conversion. Signed-off-by: David S. Miller commit 0c16d9635e3a51377e5815b9f8e14f497a4dbb42 Author: Maor Gottlieb Date: Sun Oct 4 18:43:40 2020 +0300 RDMA/umem: Move to allocate SG table from pages Remove the implementation of ib_umem_add_sg_table and instead call to __sg_alloc_table_from_pages which already has the logic to merge contiguous pages. Besides that it removes duplicated functionality, it reduces the memory consumption of the SG table significantly. Prior to this patch, the SG table was allocated in advance regardless consideration of contiguous pages. In huge pages system of 2MB page size, without this change, the SG table would contain x512 SG entries. E.g. for 100GB memory registration: Number of entries Size Before 26214400 600.0MB After 51200 1.2MB Link: https://lore.kernel.org/r/20201004154340.1080481-5-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 07da1223ec939982497db3caccd6215b55acc35c Author: Maor Gottlieb Date: Sun Oct 4 18:43:37 2020 +0300 lib/scatterlist: Add support in dynamic allocation of SG table from pages Extend __sg_alloc_table_from_pages to support dynamic allocation of SG table from pages. It should be used by drivers that can't supply all the pages at one time. This function returns the last populated SGE in the table. Users should pass it as an argument to the function from the second call and forward. As before, nents will be equal to the number of populated SGEs (chunks). With this new extension, drivers can benefit the optimization of merging contiguous pages without a need to allocate all pages in advance and hold them in a large buffer. E.g. with the Infiniband driver that allocates a single page for hold the pages. For 1TB memory registration, the temporary buffer would consume only 4KB, instead of 2GB. Link: https://lore.kernel.org/r/20201004154340.1080481-2-leon@kernel.org Signed-off-by: Maor Gottlieb Reviewed-by: Christoph Hellwig Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 29d88681fb49f1e8225addd1e783bad1f7d95afc Author: Tvrtko Ursulin Date: Sun Oct 4 18:43:39 2020 +0300 tools/testing/scatterlist: Show errors in human readable form Instead of just asserting dump some more useful info about what the test saw versus what it expected to see. Link: https://lore.kernel.org/r/20201004154340.1080481-4-leon@kernel.org Signed-off-by: Tvrtko Ursulin Cc: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit efc5b2e73cc0a8aabf377bcbd9296546e9cc9b2d Author: Tvrtko Ursulin Date: Sun Oct 4 18:43:38 2020 +0300 tools/testing/scatterlist: Rejuvenate bit-rotten test A couple small tweaks are needed to make the test build and run on current kernels. Link: https://lore.kernel.org/r/20201004154340.1080481-3-leon@kernel.org Signed-off-by: Tvrtko Ursulin Cc: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit bd82631d7ccdc894af2738e47abcba2cb6e7dea9 Author: Tom Zanussi Date: Sun Oct 4 17:14:06 2020 -0500 tracing: Add support for dynamic strings to synthetic events Currently, sythetic events only support static string fields such as: # echo 'test_latency u64 lat; char somename[32]' > /sys/kernel/debug/tracing/synthetic_events Which is fine, but wastes a lot of space in the event. It also prevents the most commonly-defined strings in the existing trace events e.g. those defined using __string(), from being passed to synthetic events via the trace() action. With this change, synthetic events with dynamic fields can be defined: # echo 'test_latency u64 lat; char somename[]' > /sys/kernel/debug/tracing/synthetic_events And the trace() action can be used to generate events using either dynamic or static strings: # echo 'hist:keys=name:lat=common_timestamp.usecs-$ts0:onmatch(sys.event).test_latency($lat,name)' > /sys/kernel/debug/tracing/events The synthetic event dynamic strings are implemented in the same way as the existing __data_loc strings and appear as such in the format file. [ : added __set_synth_event_print_fmt() changes: I added the following to make it work with trace-cmd. Dynamic strings must have __get_str() for events in the print_fmt otherwise it can't be parsed correctly. ] Link: https://lore.kernel.org/r/cover.1601588066.git.zanussi@kernel.org Link: https://lkml.kernel.org/r/3ed35b6d0e390f5b94cb4a9ba1cc18f5982ab277.1601848695.git.zanussi@kernel.org Tested-by: Axel Rasmussen Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit dca4121cdc48027320c95cbce8f5e81160aa4afe Author: Andrii Nakryiko Date: Mon Oct 5 15:36:48 2020 -0700 bpf, doc: Update Andrii's email in MAINTAINERS Update Andrii Nakryiko's reviewer email to kernel.org account. This optimizes email logistics on my side and makes it less likely for me to miss important patches. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201005223648.2437130-1-andrii@kernel.org commit 63a1e5de3006f4ad713e4d72bcb404d0301e853d Author: Tom Zanussi Date: Sun Oct 4 17:14:05 2020 -0500 tracing: Save normal string variables String variables created as field variables and save variables are already handled properly by having their values copied when set. The same isn't done for normal variables, but needs to be - simply saving a pointer to a string contained in an old event isn't sufficient, since that event's data may quickly become overwritten and therefore a string pointer to it could yield garbage. This change uses the same mechanism as field variables and simply appends the new strings to the existing per-element field_var_str[] array allocated for that purpose. Link: https://lkml.kernel.org/r/1c1a03798b02e67307412a0c719d1bfb69b13007.1601848695.git.zanussi@kernel.org Fixes: 02205a6752f2 (tracing: Add support for 'field variables') Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 8fbeb52a598c7ab5aa603d6bb083b8a8d16d607a Author: Tom Zanussi Date: Sun Oct 4 17:14:04 2020 -0500 tracing: Fix parse_synth_field() error handling synth_field_size() returns either a positive size or an error (zero or a negative value). However, the existing code assumes the only error value is 0. It doesn't handle negative error codes, as it assigns directly to field->size (a size_t; unsigned), thereby interpreting the error code as a valid size instead. Do the test before assignment to field->size. [ axelrasmussen@google.com: changelog addition, first paragraph above ] Link: https://lkml.kernel.org/r/9b6946d9776b2eeb43227678158196de1c3c6e1d.1601848695.git.zanussi@kernel.org Fixes: 4b147936fa50 (tracing: Add support for 'synthetic' events) Reviewed-by: Masami Hiramatsu Tested-by: Axel Rasmussen Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 4a4a56b4e76bbe3211c4f93d99c0c1543f5f3230 Author: Tom Zanussi Date: Sun Oct 4 17:14:03 2020 -0500 tracing: Change STR_VAR_MAX_LEN 32 is too small for this value, and anyway it makes more sense to use MAX_FILTER_STR_VAL, as this is also the value used for variable-length __strings. Link: https://lkml.kernel.org/r/6adfd1668ac1fd8670bd58206944a762061a5559.1601848695.git.zanussi@kernel.org Tested-by: Axel Rasmussen Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 39d8f0d1026a990604770a658708f5845f7dbec0 Author: Song Liu Date: Mon Oct 5 09:58:38 2020 -0700 bpf: Use raw_spin_trylock() for pcpu_freelist_push/pop in NMI Recent improvements in LOCKDEP highlighted a potential A-A deadlock with pcpu_freelist in NMI: ./tools/testing/selftests/bpf/test_progs -t stacktrace_build_id_nmi [ 18.984807] ================================ [ 18.984807] WARNING: inconsistent lock state [ 18.984808] 5.9.0-rc6-01771-g1466de1330e1 #2967 Not tainted [ 18.984809] -------------------------------- [ 18.984809] inconsistent {INITIAL USE} -> {IN-NMI} usage. [ 18.984810] test_progs/1990 [HC2[2]:SC0[0]:HE0:SE1] takes: [ 18.984810] ffffe8ffffc219c0 (&head->lock){....}-{2:2}, at: __pcpu_freelist_pop+0xe3/0x180 [ 18.984813] {INITIAL USE} state was registered at: [ 18.984814] lock_acquire+0x175/0x7c0 [ 18.984814] _raw_spin_lock+0x2c/0x40 [ 18.984815] __pcpu_freelist_pop+0xe3/0x180 [ 18.984815] pcpu_freelist_pop+0x31/0x40 [ 18.984816] htab_map_alloc+0xbbf/0xf40 [ 18.984816] __do_sys_bpf+0x5aa/0x3ed0 [ 18.984817] do_syscall_64+0x2d/0x40 [ 18.984818] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 18.984818] irq event stamp: 12 [...] [ 18.984822] other info that might help us debug this: [ 18.984823] Possible unsafe locking scenario: [ 18.984823] [ 18.984824] CPU0 [ 18.984824] ---- [ 18.984824] lock(&head->lock); [ 18.984826] [ 18.984826] lock(&head->lock); [ 18.984827] [ 18.984828] *** DEADLOCK *** [ 18.984828] [ 18.984829] 2 locks held by test_progs/1990: [...] [ 18.984838] [ 18.984838] dump_stack+0x9a/0xd0 [ 18.984839] lock_acquire+0x5c9/0x7c0 [ 18.984839] ? lock_release+0x6f0/0x6f0 [ 18.984840] ? __pcpu_freelist_pop+0xe3/0x180 [ 18.984840] _raw_spin_lock+0x2c/0x40 [ 18.984841] ? __pcpu_freelist_pop+0xe3/0x180 [ 18.984841] __pcpu_freelist_pop+0xe3/0x180 [ 18.984842] pcpu_freelist_pop+0x17/0x40 [ 18.984842] ? lock_release+0x6f0/0x6f0 [ 18.984843] __bpf_get_stackid+0x534/0xaf0 [ 18.984843] bpf_prog_1fd9e30e1438d3c5_oncpu+0x73/0x350 [ 18.984844] bpf_overflow_handler+0x12f/0x3f0 This is because pcpu_freelist_head.lock is accessed in both NMI and non-NMI context. Fix this issue by using raw_spin_trylock() in NMI. Since NMI interrupts non-NMI context, when NMI context tries to lock the raw_spinlock, non-NMI context of the same CPU may already have locked a lock and is blocked from unlocking the lock. For a system with N CPUs, there could be N NMIs at the same time, and they may block N non-NMI raw_spinlocks. This is tricky for pcpu_freelist_push(), where unlike _pop(), failing _push() means leaking memory. This issue is more likely to trigger in non-SMP system. Fix this issue with an extra list, pcpu_freelist.extralist. The extralist is primarily used to take _push() when raw_spin_trylock() failed on all the per CPU lists. It should be empty most of the time. The following table summarizes the behavior of pcpu_freelist in NMI and non-NMI: non-NMI pop(): use _lock(); check per CPU lists first; if all per CPU lists are empty, check extralist; if extralist is empty, return NULL. non-NMI push(): use _lock(); only push to per CPU lists. NMI pop(): use _trylock(); check per CPU lists first; if all per CPU lists are locked or empty, check extralist; if extralist is locked or empty, return NULL. NMI push(): use _trylock(); check per CPU lists first; if all per CPU lists are locked; try push to extralist; if extralist is also locked, keep trying on per CPU lists. Reported-by: Alexei Starovoitov Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201005165838.3735218-1-songliubraving@fb.com commit edd615371b668404d06699c04f5f90c4f438814a Author: Casey Schaufler Date: Mon Oct 5 14:20:51 2020 -0700 Smack: Remove unnecessary variable initialization The initialization of rc in smack_from_netlbl() is pointless. Reported-by: kernel test robot Signed-off-by: Casey Schaufler commit 40daf09a30a0c86a038bcce606604333f32e03f8 Author: Wolfram Sang Date: Fri Oct 2 14:44:58 2020 +0200 Documentation: i2c: add testunit docs to index Fixes: a8335c64c5f0 ("i2c: add slave testunit driver") Reported-by: Mauro Carvalho Chehab Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 53fd42ff6ccce7b8f8c138206b02e25c14ef0b16 Author: Dmitry Osipenko Date: Wed Sep 30 01:19:15 2020 +0300 i2c: tegra: Improve driver module description Use proper spelling of "NVIDIA" and don't designate driver as Tegra2-only since newer SoC generations are supported as well. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit c886a4a03a0155d5630a613b1f1c3f4fdde80b0a Author: Dmitry Osipenko Date: Wed Sep 30 01:19:14 2020 +0300 i2c: tegra: Clean up whitespaces, newlines and indentation Some places in the code are missing newlines or have unnecessary whitespaces and newlines. This creates inconsistency of the code and hurts readability. This patch removes the unnecessary and adds necessary whitespaces / newlines, clears indentation of the code. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 94a5573f0719cf82143d401658d0ad2940220b8d Author: Dmitry Osipenko Date: Wed Sep 30 01:19:13 2020 +0300 i2c: tegra: Clean up and improve comments Make all comments to be consistent in regards to capitalization and punctuation, correct spelling and grammar errors, improve wording. Reviewed-by: Thierry Reding Reviewed-by: Andy Shevchenko Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 76d06443cc5b3727e7eb8de1f2313d0d67388865 Author: Dmitry Osipenko Date: Wed Sep 30 01:19:12 2020 +0300 i2c: tegra: Clean up printk messages This patch unifies style of all messages in the driver by starting them with a lowercase letter and using consistent capitalization and wording for all messages. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit a99042e7d9fb5c9143b368210c08f8447a48c2c8 Author: Dmitry Osipenko Date: Wed Sep 30 01:19:11 2020 +0300 i2c: tegra: Clean up variable names Rename "ret" variables to "err" in order to make code a bit more expressive, emphasizing that the returned value is an error code. Same vice versa, where appropriate. Rename variable "reg" to "val" in order to better reflect the actual usage of the variable in the code and to make naming consistent with the rest of the code. Use briefer names for a few members of the tegra_i2c_dev structure in order to improve readability of the code. All dev/&pdev->dev are replaced with i2c_dev->dev in order to have uniform code style across the driver. Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 89e3748acd0bf657af0e6fc47c4ed0943afb1a75 Author: Dmitry Osipenko Date: Wed Sep 30 01:19:10 2020 +0300 i2c: tegra: Improve formatting of variables Reorder definition of variables in the code to have them sorted by length and grouped logically, also replace "unsigned long" with "u32". Do this in order to make code easier to read. Reviewed-by: Andy Shevchenko Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 3b3b8e59d0144beb3e4c5dc29abfa1f89e6d4423 Author: Dmitry Osipenko Date: Wed Sep 30 01:19:09 2020 +0300 i2c: tegra: Check errors for both positive and negative values The driver's code is inconsistent in regards to the error values checking. The correct way should be to check both positive and negative values. This patch cleans up the error-checks in the code. Note that the pm_runtime_get_sync() could return positive value on success, hence only relevant parts of the code are changed by this patch. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit d380d48ff376d6e98ce0c07a70487beb5d05cb4b Author: Dmitry Osipenko Date: Wed Sep 30 01:19:08 2020 +0300 i2c: tegra: Factor out hardware initialization into separate function Factor out hardware initialization into a separate function from the probe function. The only place where runtime PM needs to be resumed during probe is the place of hardware initialization, hence it makes sense to factor out it in order to have a bit cleaner error handling in tegra_i2c_probe(). Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 507ae6ab724b780d72c010ffb106e580799ba641 Author: Dmitry Osipenko Date: Wed Sep 30 01:19:07 2020 +0300 i2c: tegra: Factor out register polling into separate function Factor out register polling into a separate function in order to remove boilerplate code and make code cleaner. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Reviewed-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 4be62340f3ce62b90a01ce11a6bc2426606614c5 Author: Dmitry Osipenko Date: Wed Sep 30 01:19:06 2020 +0300 i2c: tegra: Factor out packet header setup from tegra_i2c_xfer_msg() The code related to packet header setting up is a bit messy and makes tegra_i2c_xfer_msg() more difficult to read than it could be. Let's factor the packet header setup from tegra_i2c_xfer_msg() into separate function in order to make code easier to read and follow. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 4a8e0f87977ec3b83db13d3ac22c6fc5a9703fd9 Author: Dmitry Osipenko Date: Wed Sep 30 01:19:05 2020 +0300 i2c: tegra: Factor out error recovery from tegra_i2c_xfer_msg() Factor out error recovery code from tegra_i2c_xfer_msg() in order to make this function easier to read and follow. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit e57ac5aba01a1f6d23fea5588252736e2e3d995c Author: Dmitry Osipenko Date: Wed Sep 30 01:19:04 2020 +0300 i2c: tegra: Rename wait/poll functions Drop '_timeout' postfix from the wait/poll completion function names in order to make the names shorter, making code cleaner a tad. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 8d57c2f3654e7e23f5552d28fad5715cb567a148 Author: Dmitry Osipenko Date: Wed Sep 30 01:19:03 2020 +0300 i2c: tegra: Remove "dma" variable from tegra_i2c_xfer_msg() The "dma" variable of tegra_i2c_xfer_msg() function doesn't bring much in regards to readability and generation of the code. Besides readability, it's also not very nice that the is_curr_dma_xfer is initialized in tegra_i2c_xfer_msg() and then could be overridden by tegra_i2c_config_fifo_trig(). In a result, the "dma" variable creates slight confusion since it's not instantly obvious why it's set after tegra_i2c_config_fifo_trig(). Hence should be better to have the variable removed. This makes code more consistent. Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit d6a7969b798096533928c2a57eb6b27ffdd344aa Author: Dmitry Osipenko Date: Wed Sep 30 01:19:02 2020 +0300 i2c: tegra: Remove redundant check in tegra_i2c_issue_bus_clear() The tegra_i2c_wait_for_config_load() checks for 'has_config_load_reg' by itself, hence there is no need to duplicate the check. Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 055ba33154a755c0fe79ec174d3b6f9353e0be11 Author: Dmitry Osipenko Date: Wed Sep 30 01:19:01 2020 +0300 i2c: tegra: Remove likely/unlikely from the code The likely/unlikely annotations should be used only in a hot paths of performance-critical code. The I2C driver doesn't have such paths, and thus, there is no justification for usage of likely/unlikely annotations in the code. Hence remove them. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 56f1cd34a4e7a2d10f41e8d8e27d16a157fdd74d Author: Dmitry Osipenko Date: Wed Sep 30 01:19:00 2020 +0300 i2c: tegra: Remove outdated barrier() The barrier() was intended to reduce possibility of racing with the interrupt handler, but driver's code evolved significantly and today's driver enables interrupt only when it waits for completion notification. Hence barrier() has no good use anymore, let's remove it. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit f1c2ff98065dced0806fc162ba99d6491d7d400a Author: Dmitry Osipenko Date: Wed Sep 30 01:18:59 2020 +0300 i2c: tegra: Clean up variable types Don't use signed types for unsigned values and use consistent types for sibling variables. Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit df384fa58a321a88b22499a43cb5c5d0fb9f5364 Author: Dmitry Osipenko Date: Wed Sep 30 01:18:58 2020 +0300 i2c: tegra: Reorder location of functions in the code Reorder location of functions in the code in order to have definition of functions closer to the place of the invocation. This change makes easier to navigate around the code and removes the need to have a prototype for tegra_i2c_init(). Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 55c52f16a017ca3b1546709f8cfa5a4c856926eb Author: Dmitry Osipenko Date: Wed Sep 30 01:18:57 2020 +0300 i2c: tegra: Clean up probe function The driver's probe function code is a bit difficult to read. This patch reorders code of the probe function, forming groups of code that are easy to work with. The probe tear-down order now matches the driver-removal order. Reviewed-by: Thierry Reding Reviewed-by: Andy Shevchenko Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 6fe3e2015faaf85e4c81b86f733316820e4af249 Author: Dmitry Osipenko Date: Wed Sep 30 01:18:56 2020 +0300 i2c: tegra: Move out all device-tree parsing into tegra_i2c_parse_dt() Move out code related to device-tree parsing from the probe function into tegra_i2c_parse_dt() in order to make code more consistent. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 586a97d907ac348c96bae1b994e59ca6b8643fb6 Author: Dmitry Osipenko Date: Wed Sep 30 01:18:55 2020 +0300 i2c: tegra: Use clk-bulk helpers Use clk-bulk helpers and factor out clocks initialization into separate function in order to make code cleaner. The clocks initialization now performed after reset-control initialization in order to avoid a noisy -PROBE_DEFER errors on T186+ from the clk-bulk helper which doesn't silence this error code. Hence reset_control_get() now may return -EPROBE_DEFER on newer Tegra SoCs because they use BPMP driver that provides reset controls and BPMP doesn't come up early during boot. Previously rst was protected by the clocks retrieval and now this patch makes dev_err_probe() to be used for the rst error handling. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 20b9a6c3ef2cb41de1bde1a89cbbb2e4abe58467 Author: Dmitry Osipenko Date: Wed Sep 30 01:18:54 2020 +0300 i2c: tegra: Use platform_get_irq() Use common helper for retrieval of the interrupt number in order to make code cleaner. Note that platform_get_irq() prints error message by itself. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit f7d62a11858ccb6b620ff28e3c9bc639ddd9a1cb Author: Dmitry Osipenko Date: Wed Sep 30 01:18:53 2020 +0300 i2c: tegra: Use devm_platform_get_and_ioremap_resource() Driver now uses devm_platform_get_and_ioremap_resource() which replaces the typical boilerplate code and makes code cleaner. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 85934909678993827fe538d994d6e3da91f6e046 Author: Dmitry Osipenko Date: Wed Sep 30 01:18:52 2020 +0300 i2c: tegra: Use reset_control_reset() Use a single reset_control_reset() instead of assert/deasset couple in order to make code cleaner a tad. Note that the reset_control_reset() uses 1 microsecond delay instead of 2 that was used previously, but this shouldn't matter because one microsecond is a default reset time for most of Tegra peripherals and TRM doesn't mention anything special in regards to I2C controller's reset propagation time. In addition don't ignore potential error of the reset control by emitting a noisy warning if it fails, which will indicate an existence of a severe problem, while still allow machine to boot up. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit d3dfd625ffb0632e2eb1edaf343df6c23bc6fd1e Author: Dmitry Osipenko Date: Wed Sep 30 01:18:51 2020 +0300 i2c: tegra: Remove error message used for devm_request_irq() failure The error message prints number of vIRQ, which isn't a useful information. In practice devm_request_irq() never fails, hence let's remove the bogus message in order to make code cleaner. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Reviewed-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 76bc845a78c5e6e8741930ea3c66e7d99ae3b8b5 Author: Dmitry Osipenko Date: Wed Sep 30 01:18:50 2020 +0300 i2c: tegra: Runtime PM always available on Tegra The runtime PM is guaranteed to be always available on Tegra after commit 40b2bb1b132a ("ARM: tegra: enforce PM requirement"). Hence let's remove all the RPM-availability checking and handling from the code. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Reviewed-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 8ff727316a0930e308032fc2814d57fdaa30047f Author: Dmitry Osipenko Date: Wed Sep 30 01:18:49 2020 +0300 i2c: tegra: Remove i2c_dev.clk_divisor_non_hs_mode member The "non_hs_mode" divisor value is fixed, thus there is no need to have the variable i2c_dev.clk_divisor_non_hs_mode struct member. Let's remove it and move the mode selection into tegra_i2c_init() where it can be united with the timing selection. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Reviewed-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 8548a75f3e8d8d39c1f4ceca04c4febfa8eaa127 Author: Dmitry Osipenko Date: Wed Sep 30 01:18:48 2020 +0300 i2c: tegra: Initialize div-clk rate unconditionally It doesn't make sense to conditionalize the div-clk rate changes because rate is fixed and it won't ever change once it's set at the driver's probe time. All further changes are NO-OPs because CCF caches rate and skips rate-change if rate is unchanged. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit ed022e5dd3a044b95a68d685d2d2871ce31351df Author: Dmitry Osipenko Date: Wed Sep 30 01:18:47 2020 +0300 i2c: tegra: Mask interrupt in tegra_i2c_issue_bus_clear() The tegra_i2c_issue_bus_clear() may fail and in this case BUS_CLR_DONE stays unmasked. Hence let's mask it for consistency. This patch doesn't fix any known problems. Reviewed-by: Andy Shevchenko Reviewed-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit c5418d4cc9f028f3f0fc61c62c781e020113108f Author: Dmitry Osipenko Date: Wed Sep 30 01:18:46 2020 +0300 i2c: tegra: Handle potential error of tegra_i2c_flush_fifos() Technically the tegra_i2c_flush_fifos() may fail and transfer should be aborted in this case, but this shouldn't ever happen in practice unless there is a bug somewhere in the driver. Let's add the error check just for completeness. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Reviewed-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit e4fc2efbc310cfb665eed558da42ac18084d20bc Author: Dmitry Osipenko Date: Wed Sep 30 01:18:45 2020 +0300 i2c: tegra: Add missing pm_runtime_put() The pm_runtime_get_sync() always bumps refcount regardless of whether it succeeds or fails. Hence driver is responsible for restoring of the RPM refcounting. This patch adds missing RPM puts which restore refcounting in a case of pm_runtime_get_sync() error. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 900aed24d3e45353e22f7fc00d6826b87c55761a Author: Dmitry Osipenko Date: Wed Sep 30 01:18:44 2020 +0300 i2c: tegra: Make tegra_i2c_flush_fifos() usable in atomic transfer The tegra_i2c_flush_fifos() shouldn't sleep in atomic transfer and jiffies are not updating if interrupts are disabled. Let's switch to use iopoll API helpers for register-polling. The iopoll API provides helpers for both atomic and non-atomic cases. Note that this patch doesn't fix any known problem because normally FIFO is flushed at the time of starting a new transfer. Reviewed-by: Michał Mirosław Reviewed-by: Andy Shevchenko Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 35baff672f80afe569905e3873d961e1ed2d64a1 Author: Wolfram Sang Date: Mon Sep 28 13:06:47 2020 +0200 i2c: testunit: improve documentation Mention that new CMDs will be NACKed while the old one is still on-going, that the I2C address parameter of READ_BYTES is 7 bit only, and reword one paragraph to be more precise. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 95d620adb48f7728e67d82f56f756e8d451cf8d2 Author: Fangzhi Zuo Date: Mon Sep 21 17:52:43 2020 -0400 drm/amd/display: HDMI remote sink need mode validation for Linux [Why] Currently mode validation is bypassed if remote sink exists. That leads to mode set issue when a BW bottle neck exists in the link path, e.g., a DP-to-HDMI converter that only supports HDMI 1.4. Any invalid mode passed to Linux user space will cause the modeset failure due to limitation of Linux user space implementation. [How] Mode validation is skipped only if in edid override. For real remote sink, clock limit check should be done for HDMI remote sink. Have HDMI related remote sink going through mode validation to elimiate modes which pixel clock exceeds BW limitation. Signed-off-by: Fangzhi Zuo Reviewed-by: Hersen Wu Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit dc3de51642add38e9dbdc6eb9f8286b3eee42fe0 Author: Chris Park Date: Tue Sep 22 18:31:38 2020 -0400 drm/amd/display: Change to correct unit on audio rate [Why] Formula uses kHz in their formula while our driver operates with Hz. [How] Divide audio rate by 1000 on the initial variable that is entered into formula. Signed-off-by: Chris Park Reviewed-by: Charlene Liu Acked-by: Eryk Brol Acked-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 2f8be0e516803cc3fd87c1671247896571a5a8fb Author: Rodrigo Siqueira Date: Wed Sep 30 13:57:54 2020 -0400 drm/amd/display: Avoid set zero in the requested clk [Why] Sometimes CRTCs can be disabled due to display unplugging or temporarily transition in the userspace; in these circumstances, DCE tries to set the minimum clock threshold. When we have this situation, the function bw_calcs is invoked with number_of_displays set to zero, making DCE set dispclk_khz and sclk_khz to zero. For these reasons, we have seen some ATOM bios errors that look like: [drm:atom_op_jump [amdgpu]] *ERROR* atombios stuck in loop for more than 5secs aborting [drm:amdgpu_atom_execute_table_locked [amdgpu]] *ERROR* atombios stuck executing EA8A (len 761, WS 0, PS 0) @ 0xEABA [How] This error happens due to an attempt to optimize the bandwidth using the sclk, and the dispclk clock set to zero. Technically we handle this in the function dce112_set_clock, but we are not considering the case that this value is set to zero. This commit fixes this issue by ensuring that we never set a minimum value below the minimum clock threshold. Signed-off-by: Rodrigo Siqueira Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 79b1eca0e4acab4c3c71e9563cbbd7ab79e9c70b Author: Alex Sierra Date: Sat Oct 3 13:31:21 2020 -0500 drm/amdgpu: align frag_end to covered address space align frag_end to the next pd when there are no page table entries on the current pde. This fixes invalidation of larger address space areas where some page tables are allocated and other aren't. Signed-off-by: Alex Sierra Signed-off-by: Christian König Signed-off-by: Alex Deucher commit 2ae78708047026397713a0e4af011bdd5d392e14 Author: Dirk Gouders Date: Thu Oct 1 21:55:25 2020 +0200 drm/amdgpu: fix NULL pointer dereference for Renoir Commit c1cf79ca5ced46 ("drm/amdgpu: use IP discovery table for renoir") introduced a NULL pointer dereference when booting with amdgpu.discovery=0, because it removed the call of vega10_reg_base_init() for that case. Fix this by calling that funcion if amdgpu_discovery == 0 in addition to the case that amdgpu_discovery_reg_base_init() failed. Fixes: c1cf79ca5ced46 ("drm/amdgpu: use IP discovery table for renoir") Signed-off-by: Dirk Gouders Cc: Hawking Zhang Cc: Evan Quan Signed-off-by: Alex Deucher commit 98d278ca00bd8f62c8bc98bd9e65372d16eb6956 Author: Gabriel David Date: Fri Oct 2 18:27:00 2020 -0400 leds: lm3697: Fix out-of-bound access If both LED banks aren't used in device tree, an out-of-bounds condition in lm3697_init occurs because of the for loop assuming that all the banks are used. Fix it by adding a variable that contains the number of used banks. Signed-off-by: Gabriel David [removed extra rename, minor tweaks] Signed-off-by: Pavel Machek Cc: stable@kernel.org commit 8fe7990ceda8597e407d06bffc4bdbe835a93ece Author: Tianjia Zhang Date: Mon Oct 5 22:52:12 2020 +0800 ipmi_si: Fix wrong return value in try_smi_init() On an error exit path, a negative error code should be returned instead of a positive return value. Fixes: 90b2d4f15ff7 ("ipmi_si: Remove hacks for adding a dummy platform devices") Cc: Corey Minyard Signed-off-by: Tianjia Zhang Message-Id: <20201005145212.84435-1-tianjia.zhang@linux.alibaba.com> Signed-off-by: Corey Minyard commit 5ce2dced8e95e76ff7439863a118a053a7fc6f91 Author: Kamal Heib Date: Sun Oct 4 16:29:48 2020 +0300 RDMA/ipoib: Set rtnl_link_ops for ipoib interfaces Report the "ipoib pkey", "mode" and "umcast" netlink attributes for every IPoiB interface type, not just children created with 'ip link add'. After setting the rtnl_link_ops for the parent interface, implement the dellink() callback to block users from trying to remove it. Fixes: 862096a8bbf8 ("IB/ipoib: Add more rtnl_link_ops callbacks") Link: https://lore.kernel.org/r/20201004132948.26669-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 353e228eb355be5a65a3c0996c774a0f46737fda Author: Mark Rutland Date: Mon Oct 5 17:43:03 2020 +0100 arm64: initialize per-cpu offsets earlier The current initialization of the per-cpu offset register is difficult to follow and this initialization is not always early enough for upcoming instrumentation with KCSAN, where the instrumentation callbacks use the per-cpu offset. To make it possible to support KCSAN, and to simplify reasoning about early bringup code, let's initialize the per-cpu offset earlier, before we run any C code that may consume it. To do so, this patch adds a new init_this_cpu_offset() helper that's called before the usual primary/secondary start functions. For consistency, this is also used to re-initialize the per-cpu offset after the runtime per-cpu areas have been allocated (which can change CPU0's offset). So that init_this_cpu_offset() isn't subject to any instrumentation that might consume the per-cpu offset, it is marked with noinstr, preventing instrumentation. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Link: https://lore.kernel.org/r/20201005164303.21389-1-mark.rutland@arm.com Signed-off-by: Will Deacon commit 6e0545c4f08368e67496111778a726f9a2031f26 Merge: 549738f15da0e 3a6f0fb7b8eb5 Author: Mark Brown Date: Mon Oct 5 18:53:24 2020 +0100 Merge remote-tracking branch 'regmap/for-5.10' into regmap-next commit aef161f4f1b829e91c4aaaac75c2b8fcdbc033fc Author: Geert Uytterhoeven Date: Mon Oct 5 13:25:47 2020 +0200 spi: renesas,sh-msiof: Add r8a77961 support Document R-Car M3-W+ (R8A77961) SoC bindings. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201005112549.22222-1-geert+renesas@glider.be Signed-off-by: Mark Brown commit 4dafc08d0ba4768e8540f49ab40c3ea26e40d554 Author: Amit Daniel Kachhap Date: Fri Oct 2 17:26:30 2020 +0530 kselftest/arm64: Check mte tagged user address in kernel Add a testcase to check that user address with valid/invalid mte tag works in kernel mode. This test verifies that the kernel API's __arch_copy_from_user/__arch_copy_to_user works by considering if the user pointer has valid/invalid allocation tags. In MTE sync mode, file memory read/write and other similar interfaces fails if a user memory with invalid tag is accessed in kernel. In async mode no such failure occurs. Signed-off-by: Amit Daniel Kachhap Tested-by: Catalin Marinas Acked-by: Catalin Marinas Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20201002115630.24683-7-amit.kachhap@arm.com Signed-off-by: Will Deacon commit f981d8fa26469e19d2ce73006685ae88205e914a Author: Amit Daniel Kachhap Date: Fri Oct 2 17:26:29 2020 +0530 kselftest/arm64: Verify KSM page merge for MTE pages Add a testcase to check that KSM should not merge pages containing same data with same/different MTE tag values. This testcase has one positive tests and passes if page merging happens according to the above rule. It also saves and restores any modified ksm sysfs entries. Signed-off-by: Amit Daniel Kachhap Tested-by: Catalin Marinas Acked-by: Catalin Marinas Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20201002115630.24683-6-amit.kachhap@arm.com Signed-off-by: Will Deacon commit 53ec81d232134f61806dfd93025320caa1aaf559 Author: Amit Daniel Kachhap Date: Fri Oct 2 17:26:28 2020 +0530 kselftest/arm64: Verify all different mmap MTE options This testcase checks the different unsupported/supported options for mmap if used with PROT_MTE memory protection flag. These checks are, * Either pstate.tco enable or prctl PR_MTE_TCF_NONE option should not cause any tag mismatch faults. * Different combinations of anonymous/file memory mmap, mprotect, sync/async error mode and private/shared mappings should work. * mprotect should not be able to clear the PROT_MTE page property. Co-developed-by: Gabor Kertesz Signed-off-by: Gabor Kertesz Signed-off-by: Amit Daniel Kachhap Tested-by: Catalin Marinas Acked-by: Catalin Marinas Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20201002115630.24683-5-amit.kachhap@arm.com Signed-off-by: Will Deacon commit dfe537cf47186bfb59db3e57eed7417cd5efde17 Author: Amit Daniel Kachhap Date: Fri Oct 2 17:26:27 2020 +0530 kselftest/arm64: Check forked child mte memory accessibility This test covers the mte memory behaviour of the forked process with different mapping properties and flags. It checks that all bytes of forked child memory are accessible with the same tag as that of the parent and memory accessed outside the tag range causes fault to occur. Co-developed-by: Gabor Kertesz Signed-off-by: Gabor Kertesz Signed-off-by: Amit Daniel Kachhap Tested-by: Catalin Marinas Acked-by: Catalin Marinas Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20201002115630.24683-4-amit.kachhap@arm.com Signed-off-by: Will Deacon commit f3b2a26ca78da2ef36cf76d5511e3c94baee96a1 Author: Amit Daniel Kachhap Date: Fri Oct 2 17:26:26 2020 +0530 kselftest/arm64: Verify mte tag inclusion via prctl This testcase verifies that the tag generated with "irg" instruction contains only included tags. This is done via prtcl call. This test covers 4 scenarios, * At least one included tag. * More than one included tags. * All included. * None included. Co-developed-by: Gabor Kertesz Signed-off-by: Gabor Kertesz Signed-off-by: Amit Daniel Kachhap Tested-by: Catalin Marinas Acked-by: Catalin Marinas Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20201002115630.24683-3-amit.kachhap@arm.com Signed-off-by: Will Deacon commit e9b60476bea058d85f8029e6701d9476f7fdb92f Author: Amit Daniel Kachhap Date: Fri Oct 2 17:26:25 2020 +0530 kselftest/arm64: Add utilities and a test to validate mte memory This test checks that the memory tag is present after mte allocation and the memory is accessible with those tags. This testcase verifies all sync, async and none mte error reporting mode. The allocated mte buffers are verified for Allocated range (no error expected while accessing buffer), Underflow range, and Overflow range. Different test scenarios covered here are, * Verify that mte memory are accessible at byte/block level. * Force underflow and overflow to occur and check the data consistency. * Check to/from between tagged and untagged memory. * Check that initial allocated memory to have 0 tag. This change also creates the necessary infrastructure to add mte test cases. MTE kselftests can use the several utility functions provided here to add wide variety of mte test scenarios. GCC compiler need flag '-march=armv8.5-a+memtag' so those flags are verified before compilation. The mte testcases can be launched with kselftest framework as, make TARGETS=arm64 ARM64_SUBTARGETS=mte kselftest or compiled as, make -C tools/testing/selftests TARGETS=arm64 ARM64_SUBTARGETS=mte CC='compiler' Co-developed-by: Gabor Kertesz Signed-off-by: Gabor Kertesz Signed-off-by: Amit Daniel Kachhap Tested-by: Catalin Marinas Acked-by: Catalin Marinas Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20201002115630.24683-2-amit.kachhap@arm.com Signed-off-by: Will Deacon commit 1fdc97ae450ede2b4911d6737a57e6fca63b5f4a Author: Martin Blumenstingl Date: Fri Sep 25 23:17:43 2020 +0200 arm64: dts: amlogic: meson-g12: use the G12A specific dwmac compatible We have a dedicated "amlogic,meson-g12a-dwmac" compatible string for the Ethernet controller since commit 3efdb92426bf4 ("dt-bindings: net: dwmac-meson: Add a compatible string for G12A onwards"). Using the AXG compatible string worked fine so far because the dwmac-meson8b driver doesn't handle the newly introduced register bits for G12A. However, once that changes the driver must be probed with the correct compatible string to manage these new register bits. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200925211743.537496-1-martin.blumenstingl@googlemail.com commit a1afbbb0285797e01313779c71287d936d069245 Author: Scott K Logan Date: Fri Sep 25 01:43:53 2020 -0700 arm64: dts: meson: add missing g12 rng clock This adds the missing perpheral clock for the RNG for Amlogic G12. As stated in amlogic,meson-rng.yaml, this isn't always necessary for the RNG to function, but is better to have in case the clock is disabled for some reason prior to loading. Signed-off-by: Scott K Logan Suggested-by: Neil Armstrong Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/520a1a8ec7a958b3d918d89563ec7e93a4100a45.camel@cottsay.net commit f450d2c219f6a6b79880c97bf910c3c72725eb70 Author: Neil Armstrong Date: Thu Sep 17 08:59:49 2020 +0200 arm64: dts: meson-axg-s400: enable USB OTG This enables USB OTG on the S400 board. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman commit 1b208bab34dc3f4ef8f408105017d4a7b72b2a2f Author: Neil Armstrong Date: Thu Sep 17 08:59:48 2020 +0200 arm64: dts: meson-axg: add USB nodes This adds the USB Glue node, with the USB2 & USB3 controllers along the single USB2 PHY node. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 3a6f0fb7b8eb5ef0447da1332225b8c87ee207d0 Author: Laxminath Kasam Date: Mon Oct 5 19:47:19 2020 +0530 regmap: irq: Add support to clear ack registers For particular codec HWs have requirement to toggle interrupt clear register twice 0->1->0. To accommodate it, need to add one more field (clear_ack) in the regmap_irq struct and update regmap-irq driver to support it. Signed-off-by: Laxminath Kasam Link: https://lore.kernel.org/r/1601907440-13373-1-git-send-email-lkasam@codeaurora.org Signed-off-by: Mark Brown commit dc155ad5fa6ef7d48fb3c3cc30497b492da0749e Author: Cezary Rojewski Date: Sun Oct 4 11:06:09 2020 +0200 ASoC: Intel: haswell: Mark FE DAIs as nonatomic PCM operations for DAI links connected with DSP platform component involve communication with DSP firmware by IPCs. As IPC protocol may cause thread to sleep while waiting for a response from DSP, propagate that information to ALSA core by marking all FE DAIs as nonatomic. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201004090609.29066-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 727d7d84f74744a6f8d583eb5034e926aecc78e7 Author: Cezary Rojewski Date: Sun Oct 4 11:06:08 2020 +0200 ASoC: Intel: broadwell: Mark FE DAIs as nonatomic PCM operations for DAI links connected with DSP platform component involve communication with DSP firmware by IPCs. As IPC protocol may cause thread to sleep while waiting for a response from DSP, propagate that information to ALSA core by marking all FE DAIs as nonatomic. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201004090609.29066-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit fc5c8729c1ef78d54432d68216c1b13791248bb1 Author: Cezary Rojewski Date: Sun Oct 4 11:06:07 2020 +0200 ASoC: Intel: bdw-rt5677: Mark FE DAIs as nonatomic PCM operations for DAI links connected with DSP platform component involve communication with DSP firmware by IPCs. As IPC protocol may cause thread to sleep while waiting for a response from DSP, propagate that information to ALSA core by marking all FE DAIs as nonatomic. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20201004090609.29066-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 4cc62da459aeee438a1fcf009e6101292025476f Author: Cezary Rojewski Date: Sun Oct 4 11:06:06 2020 +0200 ASoC: Intel: bdw-rt5650: Mark FE DAIs as nonatomic PCM operations for DAI links connected with DSP platform component involve communication with DSP firmware by IPCs. As IPC protocol may cause thread to sleep while waiting for a response from DSP, propagate that information to ALSA core by marking all FE DAIs as nonatomic. Signed-off-by: Cezary Rojewski Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20201004090609.29066-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 470d154a62c4ef22b4de384ae91798851c9631a7 Author: Hans de Goede Date: Mon Oct 5 10:13:18 2020 -0700 Input: synaptics - enable InterTouch for ThinkPad T14 Gen 1 With the new RMI4 F3A support, we're now able to enable full RMI4 support for this model. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201005114919.371592-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit cf785af19319f9fc0fc0c0604d259f1ef31b502f Author: Eric Biggers Date: Tue Sep 15 20:53:15 2020 -0700 block: warn if !__GFP_DIRECT_RECLAIM in bio_crypt_set_ctx() bio_crypt_set_ctx() assumes its gfp_mask argument always includes __GFP_DIRECT_RECLAIM, so that the mempool_alloc() will always succeed. For now this assumption is still fine, since no callers violate it. Making bio_crypt_set_ctx() able to fail would add unneeded complexity. However, if a caller didn't use __GFP_DIRECT_RECLAIM, it would be very hard to notice the bug. Make it easier by adding a WARN_ON_ONCE(). Signed-off-by: Eric Biggers Reviewed-by: Satya Tangirala Cc: Miaohe Lin Cc: Satya Tangirala Signed-off-by: Jens Axboe commit 93f221ae08381e994ac9f9ff6aa743e612e49718 Author: Eric Biggers Date: Tue Sep 15 20:53:14 2020 -0700 block: make blk_crypto_rq_bio_prep() able to fail blk_crypto_rq_bio_prep() assumes its gfp_mask argument always includes __GFP_DIRECT_RECLAIM, so that the mempool_alloc() will always succeed. However, blk_crypto_rq_bio_prep() might be called with GFP_ATOMIC via setup_clone() in drivers/md/dm-rq.c. This case isn't currently reachable with a bio that actually has an encryption context. However, it's fragile to rely on this. Just make blk_crypto_rq_bio_prep() able to fail. Suggested-by: Satya Tangirala Signed-off-by: Eric Biggers Reviewed-by: Mike Snitzer Reviewed-by: Satya Tangirala Cc: Miaohe Lin Signed-off-by: Jens Axboe commit 07560151db960d26b425410d6fd778e6757a5da2 Author: Eric Biggers Date: Tue Sep 15 20:53:13 2020 -0700 block: make bio_crypt_clone() able to fail bio_crypt_clone() assumes its gfp_mask argument always includes __GFP_DIRECT_RECLAIM, so that the mempool_alloc() will always succeed. However, bio_crypt_clone() might be called with GFP_ATOMIC via setup_clone() in drivers/md/dm-rq.c, or with GFP_NOWAIT via kcryptd_io_read() in drivers/md/dm-crypt.c. Neither case is currently reachable with a bio that actually has an encryption context. However, it's fragile to rely on this. Just make bio_crypt_clone() able to fail, analogous to bio_integrity_clone(). Reported-by: Miaohe Lin Signed-off-by: Eric Biggers Reviewed-by: Mike Snitzer Reviewed-by: Satya Tangirala Cc: Satya Tangirala Signed-off-by: Jens Axboe commit 428805c0c5e76ef643b1fbc893edfb636b3d8aef Author: Christoph Hellwig Date: Fri Sep 25 18:14:47 2020 +0200 PM: hibernate: remove the bogus call to get_gendisk() in software_resume() get_gendisk grabs a reference on the disk and file operation, so this code will leak both of them while having absolutely no use for the gendisk itself. This effectively reverts commit 2df83fa4bce421f ("PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format") Signed-off-by: Christoph Hellwig Signed-off-by: Rafael J. Wysocki commit 10ed16662da9e28a33b6c991c36c6b323b03dd5b Author: Christoph Hellwig Date: Fri Sep 25 18:06:18 2020 +0200 block: add a bdget_part helper All remaining callers of bdget() outside of fs/block_dev.c want to get a reference to the struct block_device for a given struct hd_struct. Add a helper just for that and then mark bdget static. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 155bd9d1abd60497f3e84ef3251b40209f7f7900 Author: Christoph Hellwig Date: Fri Sep 25 18:06:17 2020 +0200 drbd: remove ->this_bdev DRBD keeps a block device open just to get and set the capacity from it. Switch to primarily using the disk capacity as intended by the block layer, and sync it to the bdev using revalidate_disk_size. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f6a496a5ce8d23eee5ed6ba65d94ca95005f3e91 Author: Alexandru Ardelean Date: Mon Oct 5 16:12:26 2020 +0300 docs: hwmon: (ltc2945) update datasheet link Old one isn't working anymore. Update to the latest datasheet link. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20201005131226.1774081-1-alexandru.ardelean@analog.com Signed-off-by: Guenter Roeck commit 712d1b3749aff7ffb59412d1a4ac23a91575095e Author: Geert Uytterhoeven Date: Mon Oct 5 14:48:43 2020 +0200 hwmon: (mlxreg-fan) Fix double "Mellanox" Remove the duplicate "Mellanox" in the help text for the Mellanox FAN driver configuration option. Fixes: 65afb4c8e7e4e7e7 ("hwmon: (mlxreg-fan) Add support for Mellanox FAN driver") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201005124843.26688-1-geert+renesas@glider.be Signed-off-by: Guenter Roeck commit 8910c0bd533dc0aa13f2bc53bf8ac5373a79f7a9 Author: Ugur Usug Date: Tue Sep 22 19:15:38 2020 +0000 hwmon: (pmbus/max20730) add device monitoring via debugfs Add debugfs interface support for accessing device specific registers (MFR_VOUT_MIN, MFR_DEVSET1 and MFR_DEVSET2) and others including OPERATION, ON_OFF_CONFIG, SMB_ALERT_MASK, VOUT_MODE, VOUT_COMMAND and VOUT_MAX. Signed-off-by: Ugur Usug Link: https://lore.kernel.org/r/MWHPR11MB1965C01083AD013C630646B2FD3B0@MWHPR11MB1965.namprd11.prod.outlook.com [groeck: Resolved conflics seen due to PMBus driver API changes] Signed-off-by: Guenter Roeck commit 2b52278150c49559a472f2d6dd66f6f3b405378e Author: Steve Foreman Date: Fri Oct 2 16:35:38 2020 +0000 hwmon: (pmbus/max34440) Fix OC fault limits The max34* family have the IOUT_OC_WARN_LIMIT and IOUT_OC_CRIT_LIMIT registers swapped. Cc: stable@vger.kernel.org Signed-off-by: Steve Foreman [groeck: Updated subject, use C comment style, tab after defines] [groeck: Added missing break; statements (by alexandru.ardelean@analog.com)] Signed-off-by: Guenter Roeck commit c6e70a6fd5ceff381059e600156d78c1b94b7c60 Merge: 549738f15da0e 184cdb8f6d391 Author: Mark Brown Date: Mon Oct 5 16:54:56 2020 +0100 Merge remote-tracking branch 'regulator/for-5.10' into regulator-next commit 45f0bbdafd26d6d772172563b30bff561cec9133 Author: Marek Vasut Date: Mon Oct 5 15:22:29 2020 +0200 spi: imx: Fix freeing of DMA channels if spi_bitbang_start() fails If the SPI controller has has_dmamode = true and spi_bitbang_start() fails in spi_imx_probe(), then the driver must release the DMA channels acquired in spi_imx_sdma_init() by calling spi_imx_sdma_exit() in the fail path. Fixes: f62caccd12c1 ("spi: spi-imx: add DMA support") Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Mark Brown Cc: NXP Linux Team Cc: Robin Gong Cc: Shawn Guo Link: https://lore.kernel.org/r/20201005132229.513119-1-marex@denx.de Signed-off-by: Mark Brown commit 905705a8fd432636c22476e732cf7c7ba2d6edd7 Author: Nick Desaulniers Date: Tue Sep 29 14:19:35 2020 -0700 docs: programming-languages: refresh blurb on clang support Building the kernel with Clang doesn't rely on third party patches, and has not for a few years now. Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20200929211936.580805-1-ndesaulniers@google.com [jc: Took out duplicated "docs" pointed out by Randy] Signed-off-by: Jonathan Corbet commit f42182945d9f8a6b45dc7dd842ff23ee1b6ae240 Author: Li Qiang Date: Fri Oct 2 08:04:22 2020 -0700 Documentation: kvm: fix a typo Fixes: 9824c83f92bc8 ("Documentation: kvm: document CPUID bit for MSR_KVM_POLL_CONTROL") Signed-off-by: Li Qiang Link: https://lore.kernel.org/r/20201002150422.6267-1-liq3ea@163.com Signed-off-by: Jonathan Corbet commit 184cdb8f6d391b379bb768b0c203600f5657176b Author: Matti Vaittinen Date: Mon Oct 5 11:19:24 2020 +0300 regulator: bd9576: Fix print The print in probe is done using pr_info. Correct print call would be dev_dbg because: - Severity should really be dbg - The dev pointer is given as first argument Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/c4f55add237455555df0597c72052022f7a669f6.1601885841.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit f2deb05688c25ac124a7e33bc15b1ab13d7fb1a7 Author: Matti Vaittinen Date: Mon Oct 5 11:18:19 2020 +0300 regulator: bd9576: fix regulator binfdings dt node names Add regulator- prefix to allowed regulator node names. Prefix is expected by the driver and the actual binding yaml description. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/3d92de2085f0c074929861a2f791bf4070920e83.1601885841.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 357dd65a9aa8ee0c77c94dc4601075a33f33e528 Author: Vladimir Lypak Date: Sun Oct 4 11:34:13 2020 +0300 dt-bindings: regulator: document pm8950 and pm8953 smd regulators Add list of regulators available on PM8953 and PM8950 PMICs. Also document compatible for PM8953. Signed-off-by: Vladimir Lypak Link: https://lore.kernel.org/r/20201004083413.324351-2-junak.pub@gmail.com Signed-off-by: Mark Brown commit b1a2fb10b8ef07a32061c53426303f73533d867b Author: Vladimir Lypak Date: Sun Oct 4 11:34:12 2020 +0300 regulator: qcom_smd: add pm8953 regulators The PM8953 is commonly used on board with MSM8953 SoCs or its variants: APQ8053, SDM(SDA)450 and SDM(SDA)632. It provides 7 SMPS and 23 LDO regulators. Signed-off-by: Vladimir Lypak Link: https://lore.kernel.org/r/20201004083413.324351-1-junak.pub@gmail.com Signed-off-by: Mark Brown commit c845f21ad86528f888db27849f2d315e08126816 Author: Geert Uytterhoeven Date: Mon Oct 5 15:15:46 2020 +0200 regulator: Make constraint debug processing conditional on DEBUG If debugging is disabled, print_constraints() does not print the actual constraints, but still performs some processing and string formatting, only to throw away the result later. Fix this by moving all constraint debug processing to a separate function, and replacing it by a dummy when debugging is disabled. This reduces kernel size by almost 800 bytes (on arm/arm64). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20201005131546.22448-1-geert+renesas@glider.be Signed-off-by: Mark Brown commit 86ff02dc1d17bb0c4d91b9fc920e844bbf00ee51 Merge: c8da9069979b3 a886990c9525e Author: Mark Brown Date: Mon Oct 5 15:32:14 2020 +0100 Merge series "ASoC: sun8i-codec: support for AIF2 and AIF3" from Samuel Holland : This series adds support the other two AIFs present in the sun8i codec, which can be used for codec2codec DAI links. This series first cleans up the DAPM component driver so there is an organized place to put the new widgets. Then it fills out the DAI driver, removing assumptions that were made for AIF1 (16 bits, 2 channels, certain clock inversions). Some new logic is required to handle 3 DAIs and the ADC/DAC sharing the same clock. Finally, it adds the new DAIs, and hooks them up with DAPM widgets and routes per the hardware topology. To minimize the number of patches in this series, related device tree patches (increasing #sound-dai-cells, adding new DAI links) will be sent separately. Samuel Holland (25): ASoC: sun8i-codec: Set up clock tree at probe time ASoC: sun8i-codec: Swap module clock/reset dependencies ASoC: sun8i-codec: Sort DAPM controls, widgets, and routes ASoC: sun8i-codec: Consistently name DAPM widgets and routes ASoC: sun8i-codec: Correct DAPM widget types ASoC: sun8i-codec: Fix AIF widget channel references ASoC: sun8i-codec: Enable AIF mono/stereo control ASoC: sun8i-codec: Use snd_soc_dai_get_drvdata ASoC: sun8i-codec: Prepare to extend the DAI driver ASoC: sun8i-codec: Program format before clock inversion ASoC: sun8i-codec: Enable all supported clock inversions ASoC: sun8i-codec: Program the correct word size ASoC: sun8i-codec: Round up the LRCK divisor ASoC: sun8i-codec: Correct the BCLK divisor calculation ASoC: sun8i-codec: Support the TDM slot binding ASoC: sun8i-codec: Enforce symmetric DAI parameters ASoC: sun8i-codec: Enable all supported sample rates ASoC: sun8i-codec: Automatically set the system sample rate ASoC: sun8i-codec: Constrain to compatible sample rates ASoC: sun8i-codec: Protect the clock rate while streams are open ASoC: sun8i-codec: Require an exact BCLK divisor match ASoC: sun8i-codec: Enable all supported PCM formats ASoC: sun8i-codec: Generalize AIF clock control ASoC: sun8i-codec: Add a DAI, widgets, and routes for AIF2 ASoC: sun8i-codec: Add a DAI, widgets, and routes for AIF3 sound/soc/sunxi/sun8i-codec.c | 1135 ++++++++++++++++++++++++++------- 1 file changed, 894 insertions(+), 241 deletions(-) -- 2.26.2 commit c8da9069979b32872a3f19e5e12d48ff5040e2af Merge: 859ffd0af117e df64b9882b356 Author: Mark Brown Date: Mon Oct 5 15:32:13 2020 +0100 Merge series "ASoC: Intel: sof_sdw: minor corrections" from Pierre-Louis Bossart : This small patchset adds a missing component string needed by UCM and corrects a confusion on Realtek part numbers. Pierre-Louis Bossart (4): ASoC: Intel: sof_sdw_rt1308: add extra check on init ASoC: Intel: sof_sdw_rt1316: add missing component string ASoC: rt715-sdw: probe with RT714 Device ID ASoC: Intel: sof_sdw: add version_id to avoid rt714/rt715 confusion sound/soc/codecs/rt715-sdw.c | 1 + sound/soc/intel/boards/sof_sdw.c | 16 ++++++++++++++++ sound/soc/intel/boards/sof_sdw_rt1308.c | 4 ++++ sound/soc/intel/boards/sof_sdw_rt1316.c | 6 ++++++ 4 files changed, 27 insertions(+) -- 2.25.1 commit 859ffd0af117e7ebc4d744a648551443cc90f150 Author: Tzung-Bi Shih Date: Mon Oct 5 15:47:48 2020 +0800 ASoC: mediatek: mt8183-da7219: support jack detection for LINEOUT Supports jack detection for LINEOUT. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20201005074748.3394630-1-tzungbi@google.com Signed-off-by: Mark Brown commit 8031b93efa8d393b7e38fa66b836ac157a2f354d Author: Codrin Ciubotariu Date: Sun Oct 4 12:45:05 2020 +0300 ASoC: mchp-spdifrx: convert to devm_platform_get_and_ioremap_resource Use the helper function that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20201004094505.1041898-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 4e797e6ec79c0705791c14f3e60f38b01c78ea1d Author: Gustavo A. R. Silva Date: Fri Oct 2 17:46:27 2020 -0500 printk: Use fallthrough pseudo-keyword Replace /* FALL THRU */ comment with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20201002224627.GA30475@embeddedor commit 8731745e4821b6738189b7ac490cf042fa9f1fe0 Author: Gustavo A. R. Silva Date: Fri Oct 2 18:42:17 2020 -0500 bpf, verifier: Use fallthrough pseudo-keyword Replace /* fallthrough */ comments with the new pseudo-keyword macro fallthrough [1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20201002234217.GA12280@embeddedor commit b75597d8947f842fa525000cf9569c21e7596da9 Author: Björn Töpel Date: Mon Oct 5 11:05:25 2020 +0200 xsk: Remove internal DMA headers Christoph Hellwig correctly pointed out [1] that the AF_XDP core was pointlessly including internal headers. Let us remove those includes. [1] https://lore.kernel.org/bpf/20201005084341.GA3224@infradead.org/ Fixes: 1c1efc2af158 ("xsk: Create and free buffer pool independently from umem") Reported-by: Christoph Hellwig Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Christoph Hellwig Link: https://lore.kernel.org/bpf/20201005090525.116689-1-bjorn.topel@gmail.com commit df64b9882b35671c4916574a783b614c6164980b Author: Pierre-Louis Bossart Date: Fri Oct 2 16:19:02 2020 -0500 ASoC: Intel: sof_sdw: add version_id to avoid rt714/rt715 confusion RT715 and RT714 are essentially the same chip. In addition, there are two versions, one supporting SoundWire 1.1 and one supporting SoundWire 1.2 (SDCA). The previous configurations assumed that RT714 was SDCA-only, which isn't correct. Add support for the 4 possible combinations to avoid confusions. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Jack Yu Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201002211902.287692-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4c652df83ba42fadc884541bfec856c836822302 Author: Pierre-Louis Bossart Date: Fri Oct 2 16:19:01 2020 -0500 ASoC: rt715-sdw: probe with RT714 Device ID RT715 and RT714 are essentially the same chips but with different SoundWire Dev_ID registers, make sure we can probe the same driver if RT714 is used. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Jack Yu Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20201002211902.287692-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8cc8945da74284809c8a4a575e55e91d5557b651 Author: Pierre-Louis Bossart Date: Fri Oct 2 16:19:00 2020 -0500 ASoC: Intel: sof_sdw_rt1316: add missing component string Without this string UCM cannot fetch the relevant configurations. Fixes: b75bea4b8834c ('ASoC: intel: sof_sdw: add rt711 rt1316 rt714 SDCA codec support') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20201002211902.287692-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 044eb2d13a2147a7ac15a400c2a4f020a7857c36 Author: Pierre-Louis Bossart Date: Fri Oct 2 16:18:59 2020 -0500 ASoC: Intel: sof_sdw_rt1308: add extra check on init Apply same test as for other amplifiers - in case we enable feedback one day. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20201002211902.287692-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a886990c9525e83146829c7711ce444ff652c98a Author: Samuel Holland Date: Wed Sep 30 21:11:31 2020 -0500 ASoC: sun8i-codec: Use snd_soc_dai_get_drvdata Remove a level of indirection by getting the device directly from the passed-in struct snd_soc_dai, instead of going through its component. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201001021148.15852-9-samuel@sholland.org Signed-off-by: Mark Brown commit 18ebd62c30f0380da11d6c86e20b56c771ac1e18 Author: Samuel Holland Date: Wed Sep 30 21:11:30 2020 -0500 ASoC: sun8i-codec: Enable AIF mono/stereo control Each left/right pair of AIF input/output channels can be swapped or combined. This is useful for sending a mono audio source to both sides of a stereo sink, or for creating complex mixing scenarios. Add the support to control this feature from userspace. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201001021148.15852-8-samuel@sholland.org Signed-off-by: Mark Brown commit 4ab60cef3149d57fe56add8c60ee7e6d45816f27 Author: Samuel Holland Date: Wed Sep 30 21:11:29 2020 -0500 ASoC: sun8i-codec: Fix AIF widget channel references Both the left and right side widgets referenced channel 0. This would unnecessarily power on the right side widget (and its associated path) when a mono stream was active. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201001021148.15852-7-samuel@sholland.org Signed-off-by: Mark Brown commit fc5668f62d089ba69b343f0e80146f5a3bc6fa71 Author: Samuel Holland Date: Wed Sep 30 21:11:28 2020 -0500 ASoC: sun8i-codec: Correct DAPM widget types Whie the aif_in and aif_out widget types are handled exactly the same in the core DAPM code, a future widget event hook will need the correct widget type to derive the associated substream. Clean up the widget type for that reason, and so these widgets will match newly-added widgets for the other AIFs. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201001021148.15852-6-samuel@sholland.org Signed-off-by: Mark Brown commit 7b51f3c7029fab706e7d9ac99f67cbcf8f29beca Author: Samuel Holland Date: Wed Sep 30 21:11:27 2020 -0500 ASoC: sun8i-codec: Consistently name DAPM widgets and routes This cleans up the mixer widget names. The AIF1 AD0 Mixer names were previously wrong -- they do not control the digital side of the ADC. The DAC mixer widgets were not wrong, but they were verbose and did not match the naming scheme of the other widgets. The mixer controls are not renamed because they are exposed to userspace. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201001021148.15852-5-samuel@sholland.org Signed-off-by: Mark Brown commit d58b7247087900414aa3e988e70ecba85e06f412 Author: Samuel Holland Date: Wed Sep 30 21:11:26 2020 -0500 ASoC: sun8i-codec: Sort DAPM controls, widgets, and routes Sort the remaining pieces of the DAPM driver so that they are all in the same order among controls/widgets/routes, and so they roughly match the register word and bit order of the hardware. This nicely separates the AIF-related widgets from the ADC/DAC widgets, which allows the AIF widgets to stay in a logical order as more AIFs are added to the driver. No widgets are renamed, to ease verification that this commit makes no functional change. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201001021148.15852-4-samuel@sholland.org Signed-off-by: Mark Brown commit ed3caa3bd44c9ae1cebeb32d787adc5ed35e29fa Author: Samuel Holland Date: Wed Sep 30 21:11:25 2020 -0500 ASoC: sun8i-codec: Swap module clock/reset dependencies This matches the module power-up/down sequence from the vendor's driver. While updating these widgets/routes, reorder them to match the register and bit layout of the hardware. This puts them in the same place in the widget and route arrays (previously they were at opposite ends), and it makes it easier to track which parts of which registers are implemented. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201001021148.15852-3-samuel@sholland.org Signed-off-by: Mark Brown commit d8f006825ac57e34f7ed5e63a1e16d889dc1508e Author: Samuel Holland Date: Wed Sep 30 21:11:24 2020 -0500 ASoC: sun8i-codec: Set up clock tree at probe time The sun8i codec is effectively an on-die variant of the X-Powers AC100 codec. The AC100 can derive its clocks from either of two I2S master clocks or an internal PLL. For the on-die variant, Allwinner replaced the codec's own PLL with a connection to SoC's existing PLL_AUDIO, and they connected both I2S MCLK inputs to the same source -- which happens to be an integer divider from the same PLL_AUDIO. So there's actually no clocking flexibility. To run SYSCLK at the required rate, it must be run straight from the PLL. The only choice is whether it goes through AIF1CLK or AIF2CLK. Since both run at the same rate, the only effect of that choice is which field in SYS_SR_CTRL (AIF1_FS or AIF2_FS) controls the system sample rate. Since AIFnCLK is required to bring up the corresponding DAI, and AIF1 (connected to the CPU) is used most often, let's use AIF1CLK as the SYSCLK parent. That means we no longer need to set AIF2_FS. Since this clock tree never changes, we can program it from the component probe function, instead of using DAPM widgets. The DAPM widgets unnecessarily change clock parents when the codec goes in/out of idle and the supply widgets are powered up/down. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201001021148.15852-2-samuel@sholland.org Signed-off-by: Mark Brown commit 08d8c65e849d7579bafe2b03eab844d7860e3682 Author: Viresh Kumar Date: Mon Oct 5 13:26:05 2020 +0530 cpufreq: Move traces and update to policy->cur to cpufreq core The cpufreq core handles the updates to policy->cur and recording of cpufreq trace events for all the governors except schedutil's fast switch case. Move that as well to cpufreq core for consistency and readability. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 96f60cddf7a1c5374296dd14355b519ee3245b3e Author: Viresh Kumar Date: Mon Oct 5 13:26:04 2020 +0530 cpufreq: stats: Enable stats for fast-switch as well Now that all the blockers are gone for enabling stats in fast-switching case, enable it. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 4958b46efb6df20fa3abb3a4d007515485f6af16 Author: Viresh Kumar Date: Mon Oct 5 13:26:03 2020 +0530 cpufreq: stats: Mark few conditionals with unlikely() Since this will be part of the scheduler's hotpath in some cases, use unlikely() for few of the obvious conditionals. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 381abb942a392377f614b62c87692f4f2e8aa59b Author: Viresh Kumar Date: Mon Oct 5 13:26:02 2020 +0530 cpufreq: stats: Remove locking The locking isn't required anymore as stats can get updated only from one place at a time. Remove it. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 40c3bd4cfa6fe5756344709b98611a1ddd15bf9d Author: Viresh Kumar Date: Mon Oct 5 13:26:01 2020 +0530 cpufreq: stats: Defer stats update to cpufreq_stats_record_transition() In order to prepare for lock-less stats update, add support to defer any updates to it until cpufreq_stats_record_transition() is called. The stats were updated from two places earlier: - show_time_in_state(): This can be easily deferred, all we need is to calculate the delta duration again in this routine to show the current state's time-in-state. - store_reset(): This is a bit tricky as we need to clear the stats here and avoid races with simultaneous call to cpufreq_stats_record_transition(). Fix that by deferring the reset of the stats (within the code) to the next call to cpufreq_stats_record_transition(), but since we need to keep showing the right stats until that time, we capture the reset time and account for the time since last time reset was called until the time cpufreq_stats_record_transition() update the stats. User space will continue seeing the stats correctly, everything will be 0 after the stats are reset, apart from the time-in-state of the current state, until the time a frequency switch happens. Signed-off-by: Viresh Kumar [ rjw: Minor changelog edits ] Signed-off-by: Rafael J. Wysocki commit f4f9dcc3f4c5f576ee195bdf0fd1682da7a3a73a Author: Jisheng Zhang Date: Mon Oct 5 17:19:50 2020 +0800 net: phy: marvell: Use phy_read_paged() instead of open coding it Convert m88e1318_get_wol() to use the well implemented phy_read_paged() instead of open coding it. Signed-off-by: Jisheng Zhang Reviewed-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 1b25b207d207f2bdbc7aeff81426e6a0428a6012 Author: Rob Herring Date: Fri Oct 2 18:06:06 2020 -0500 dt-bindings: mfd: ti,j721e-system-controller: Fix incorrect pattern property Pattern properties go under 'patternProperties', not 'properties'. Otherwise, the pattern is treated as a literal string. A corresponding meta-schema check has been added to catch bad DT property names like this. Fixes: e0f946915b23 ("dt-bindings: mfd: ti,j721e-system-controller.yaml: Add J721e system controller") Cc: Roger Quadros Cc: Tero Kristo Cc: Kishon Vijay Abraham I Acked-by: Lee Jones Link: https://lore.kernel.org/r/20201002230606.3522954-1-robh@kernel.org Signed-off-by: Rob Herring commit 24d5979549d26227f3209d05a715a91d68649e80 Author: Rob Herring Date: Fri Oct 2 17:59:24 2020 -0500 dt-bindings: display: Add dsi-controller.yaml in DSI controller schemas Some DSI controllers are missing a reference to the recently added dsi-controller.yaml schema. Add it and we can drop the duplicate parts. Cc: Chen-Yu Tsai Cc: Eric Anholt Cc: Nicolas Saenz Julienne Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Robert Chiras Cc: Philippe Cornu Cc: Yannick Fertre Reviewed-by: Guido Günther Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20201002225924.3513700-1-robh@kernel.org Signed-off-by: Rob Herring commit c34095fab1052a9042ae588706705894b5aeb320 Author: Rob Herring Date: Thu Oct 1 15:09:43 2020 -0500 dt-bindings: arm: Add missing root node constraint for board/SoC bindings Board/SoC top-level compatible bindings should be constrained to the root node. Add the missing constraints that the node name must be "/". Cc: Baruch Siach Cc: Imre Kaloz Cc: Krzysztof Halasa Cc: Andy Gross Cc: Bjorn Andersson Cc: Maxime Coquelin Cc: Jonathan Hunter Cc: Dinh Nguyen Cc: Anders Berg Reviewed-by: Linus Walleij Reviewed-by: Andreas Färber Reviewed-by: Manivannan Sadhasivam Reviewed-by: Alexandre TORGUE Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20201001200943.1193870-1-robh@kernel.org Signed-off-by: Rob Herring commit 2e554a7a5d8a8092ecb20c547734bb33fddd5046 Author: Vladimir Oltean Date: Sat Oct 3 01:06:46 2020 +0300 net: dsa: propagate switchdev vlan_filtering prepare phase to drivers A driver may refuse to enable VLAN filtering for any reason beyond what the DSA framework cares about, such as: - having tc-flower rules that rely on the switch being VLAN-aware - the particular switch does not support VLAN, even if the driver does (the DSA framework just checks for the presence of the .port_vlan_add and .port_vlan_del pointers) - simply not supporting this configuration to be toggled at runtime Currently, when a driver rejects a configuration it cannot support, it does this from the commit phase, which triggers various warnings in switchdev. So propagate the prepare phase to drivers, to give them the ability to refuse invalid configurations cleanly and avoid the warnings. Since we need to modify all function prototypes and check for the prepare phase from within the drivers, take that opportunity and move the existing driver restrictions within the prepare phase where that is possible and easy. Cc: Florian Fainelli Cc: Martin Blumenstingl Cc: Hauke Mehrtens Cc: Woojung Huh Cc: Microchip Linux Driver Support Cc: Sean Wang Cc: Landen Chao Cc: Andrew Lunn Cc: Vivien Didelot Cc: Jonathan McDowell Cc: Linus Walleij Cc: Alexandre Belloni Cc: Claudiu Manoil Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 05dbb62853351cd90a538bff213aacc070dc1550 Author: Greg Kroah-Hartman Date: Mon Oct 5 14:37:03 2020 +0200 w1: w1_therm: make w1_poll_completion static kernel test robot rightly points out that w1_poll_completion() should be static, so mark it as such. Cc: Ivan Zaentsev Reported-by: kernel test robot Link: https://lore.kernel.org/r/20201005123703.GA800532@kroah.com Signed-off-by: Greg Kroah-Hartman commit 6c75a92a0065a009429cec2c69f922f07cbbcd1e Author: Coiby Xu Date: Sat Oct 3 07:30:56 2020 +0800 staging: greybus: use __force when assigning __u8 value to snd_ctl_elem_type_t (struct gb_audio_ctl_elem_info*)->type has the type of __u8 so there is no concern about the byte order. __force is safe to use. Found by sparse, $ make C=2 drivers/staging/greybus/ drivers/staging/greybus/audio_topology.c:185:24: warning: cast to restricted snd_ctl_elem_type_t Suggested-by: Alex Elder Signed-off-by: Coiby Xu Link: https://lore.kernel.org/r/20201002233057.74462-3-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8bb5b59de7aac4f7256309c272216ad61aed034e Author: Coiby Xu Date: Sat Oct 3 07:30:55 2020 +0800 staging: greybus: codecs: use SNDRV_PCM_FMTBIT_S16_LE for format bitmask snd_soc_pcm_stream.formats should use the bitmask SNDRV_PCM_FMTBIT_* instead of the sequential integers SNDRV_PCM_FORMAT_* as explained by commit e712bfca1ac1f63f622f87c2f33b57608f2a4d19 ("ASoC: codecs: use SNDRV_PCM_FMTBIT_* for format bitmask"). Found by sparse, $ make C=2 drivers/staging/greybus/ drivers/staging/greybus/audio_codec.c:691:36: warning: incorrect type in initializer (different base types) drivers/staging/greybus/audio_codec.c:691:36: expected unsigned long long [usertype] formats drivers/staging/greybus/audio_codec.c:691:36: got restricted snd_pcm_format_t [usertype] drivers/staging/greybus/audio_codec.c:701:36: warning: incorrect type in initializer (different base types) drivers/staging/greybus/audio_codec.c:701:36: expected unsigned long long [usertype] formats drivers/staging/greybus/audio_codec.c:701:36: got restricted snd_pcm_format_t [usertype] Reviewed-by: Alex Elder Signed-off-by: Coiby Xu Link: https://lore.kernel.org/r/20201002233057.74462-2-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman commit 50a390ad1512df5898acdad54714e4c299db9d82 Author: Coiby Xu Date: Sat Oct 3 07:30:54 2020 +0800 staging: greybus: fix warnings about endianness detected by sparse This patch fix the following warnings from sparse, $ make C=2 drivers/staging/greybus/ drivers/staging/greybus/audio_module.c:222:25: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_module.c:222:25: expected restricted __le16 [usertype] data_cport drivers/staging/greybus/audio_module.c:222:25: got unsigned short [usertype] intf_cport_id drivers/staging/greybus/audio_topology.c:460:40: warning: restricted __le32 degrades to integer drivers/staging/greybus/audio_topology.c:691:41: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_topology.c:691:41: expected unsigned int access drivers/staging/greybus/audio_topology.c:691:41: got restricted __le32 [usertype] access drivers/staging/greybus/audio_topology.c:746:44: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_topology.c:746:44: expected unsigned int drivers/staging/greybus/audio_topology.c:746:44: got restricted __le32 drivers/staging/greybus/audio_topology.c:748:52: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_topology.c:748:52: expected unsigned int drivers/staging/greybus/audio_topology.c:748:52: got restricted __le32 drivers/staging/greybus/audio_topology.c:802:42: warning: restricted __le32 degrades to integer drivers/staging/greybus/audio_topology.c:805:50: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_topology.c:805:50: expected restricted __le32 drivers/staging/greybus/audio_topology.c:805:50: got unsigned int drivers/staging/greybus/audio_topology.c:814:50: warning: restricted __le32 degrades to integer drivers/staging/greybus/audio_topology.c:817:58: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_topology.c:817:58: expected restricted __le32 drivers/staging/greybus/audio_topology.c:817:58: got unsigned int drivers/staging/greybus/audio_topology.c:889:25: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_topology.c:889:25: expected unsigned int access drivers/staging/greybus/audio_topology.c:889:25: got restricted __le32 [usertype] access Suggested-by: Dan Carpenter Reviewed-by: Dan Carpenter Reviewed-by: Alex Elder Signed-off-by: Coiby Xu Link: https://lore.kernel.org/r/20201002233057.74462-1-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman commit a98d2187efd9e6d554efb50e3ed3a2983d340fe5 Author: Kevin Hilman Date: Fri Sep 18 11:12:51 2020 -0700 PCI: meson: Build as module by default Enable pci-meson to build as a module whenever ARCH_MESON is enabled. Link: https://lore.kernel.org/r/20200918181251.32423-1-khilman@baylibre.com Signed-off-by: Kevin Hilman Signed-off-by: Lorenzo Pieralisi Reviewed-by: Neil Armstrong Cc: Yue Wang commit 322c512f476f07e960cecd447ef22c15bed0e5f1 Author: Greg Ungerer Date: Mon Sep 21 12:55:20 2020 +1000 m68knommu: include SDHC support only when hardware has it The mere fact that the kernel has the MMC subsystem enabled (CONFIG_MMC enabled) does not mean that the underlying hardware platform has the SDHC hardware present. Within the ColdFire hardware defines that is signified by MCFSDHC_BASE being defined with an address. The platform data for the ColdFire parts is including the SDHC hardware if CONFIG_MMC is enabled, instead of MCFSDHC_BASE. This means that if you are compiling for a ColdFire target that does not support SDHC but enable CONFIG_MMC you will fail to compile with errors like this: arch/m68k/coldfire/device.c:565:12: error: ‘MCFSDHC_BASE’ undeclared here (not in a function) .start = MCFSDHC_BASE, ^ arch/m68k/coldfire/device.c:566:25: error: ‘MCFSDHC_SIZE’ undeclared here (not in a function) .end = MCFSDHC_BASE + MCFSDHC_SIZE - 1, ^ arch/m68k/coldfire/device.c:569:12: error: ‘MCF_IRQ_SDHC’ undeclared here (not in a function) .start = MCF_IRQ_SDHC, ^ Make the SDHC platform support depend on MCFSDHC_BASE, that is only include it if the specific ColdFire SoC has that hardware module. Fixes: 991f5c4dd2422881 ("m68k: mcf5441x: add support for esdhc mmc controller") Signed-off-by: Greg Ungerer Reviewed-by: Geert Uytterhoeven Reviewed-by: Angelo Dureghello Tested-by: Angelo Dureghello commit 006967471c8b6ba382afc65222e25a283449a3e8 Author: Greg Ungerer Date: Tue Sep 15 15:16:49 2020 +1000 m68knommu: fix sparse warnings in signal code Commit 858b810bf63f ("m68knommu: switch to using asm-generic/uaccess.h") cleaned up a number of sparse warnings associated with lack of __user annotations. It also uncovered a couple of more in the signal handling code: arch/m68k/kernel/signal.c:923:16: expected char [noderef] __user *__x arch/m68k/kernel/signal.c:923:16: got void * arch/m68k/kernel/signal.c:1007:16: warning: incorrect type in initializer (different address spaces) arch/m68k/kernel/signal.c:1007:16: expected char [noderef] __user *__x arch/m68k/kernel/signal.c:1007:16: got void * arch/m68k/kernel/signal.c:1132:6: warning: symbol 'do_notify_resume' was not declared. Should it be static? These are specific to a non-MMU configuration. Fix these inserting the correct __user annotations as required. Reported-by: kernel test robot Signed-off-by: Greg Ungerer commit a27bc11f4b7c54a95a977a8e8b15c84dac804bd4 Author: Greg Ungerer Date: Wed Sep 9 11:27:27 2020 +1000 m68knommu: switch to using asm-generic/uaccess.h Switch to using the asm-generic/uaccess functions for non-MMU builds. Remove all the m68knommu local specific uaccess defines and macros. There is nothing so special about the m68knommu targets that they cannot use all of the asm-generic uaccess support. Using the asm-generic uaccess definitions also resolves some of the existing problems with missing __user annotations in the m68knommu specific functions. The elimination of all of the contents of uaccess_no.h means we can fold the uaccess_mm.h back into uaccess.h - and just have the single file now. The resulting generated code ends up being slightly smaller (by a few hundred bytes) due to the compilers ability to better optimize load and stores without forcing its hand with asm statements. Specifically trivial cases like this contrived example: get_user(x, ptr); x++; put_user(x, ptr); end up now being optimized to a single instruction on m68k. More generally the compiler can avoid using a temporary register in many cases as well. Reported-by: kernel test robot Acked-by: Geert Uytterhoeven Reviewed-by: Christoph Hellwig Signed-off-by: Greg Ungerer commit 2a3809da6186edacfd16ce4074460c7d0ed32982 Author: Liu Shixin Date: Tue Sep 29 09:52:16 2020 +0800 binder: simplify the return expression of binder_mmap Simplify the return expression. Acked-by: Martijn Coenen Acked-by: Christian Brauner Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20200929015216.1829946-1-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman commit 5d90e05c0e83ee5c67fdba1fa56e590103aac9fd Author: Scott Branden Date: Fri Oct 2 10:38:28 2020 -0700 test_firmware: Test partial read support Add additional hooks to test_firmware to pass in support for partial file read using request_firmware_into_buf(): buf_size: size of buffer to request firmware into partial: indicates that a partial file request is being made file_offset: to indicate offset into file to request Also update firmware selftests to use the new partial read test API. Signed-off-by: Scott Branden Co-developed-by: Kees Cook Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201002173828.2099543-17-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 59cdb23ca2dfef3b93411d1105409dfe9cd1f62f Author: Scott Branden Date: Fri Oct 2 10:38:27 2020 -0700 firmware: Add request_partial_firmware_into_buf() Add request_partial_firmware_into_buf() to allow for portions of a firmware file to be read into a buffer. This is needed when large firmware must be loaded in portions from a file on memory constrained systems. Signed-off-by: Scott Branden Co-developed-by: Kees Cook Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201002173828.2099543-16-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 89287c169f8ff79d466b274da1d5c862e8b29152 Author: Kees Cook Date: Fri Oct 2 10:38:26 2020 -0700 firmware: Store opt_flags in fw_priv Instead of passing opt_flags around so much, store it in the private structure so it can be examined by internals without needing to add more arguments to functions. Co-developed-by: Scott Branden Signed-off-by: Scott Branden Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201002173828.2099543-15-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 0fa8e084648779eeb8929ae004301b3acf3bad84 Author: Kees Cook Date: Fri Oct 2 10:38:25 2020 -0700 fs/kernel_file_read: Add "offset" arg for partial reads To perform partial reads, callers of kernel_read_file*() must have a non-NULL file_size argument and a preallocated buffer. The new "offset" argument can then be used to seek to specific locations in the file to fill the buffer to, at most, "buf_size" per call. Where possible, the LSM hooks can report whether a full file has been read or not so that the contents can be reasoned about. Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201002173828.2099543-14-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 34736daeecd1608bee21e3bf5170cd4c95143109 Author: Scott Branden Date: Fri Oct 2 10:38:24 2020 -0700 IMA: Add support for file reads without contents When the kernel_read_file LSM hook is called with contents=false, IMA can appraise the file directly, without requiring a filled buffer. When such a buffer is available, though, IMA can continue to use it instead of forcing a double read here. Signed-off-by: Scott Branden Link: https://lore.kernel.org/lkml/20200706232309.12010-10-scott.branden@broadcom.com/ Signed-off-by: Kees Cook Reviewed-by: Mimi Zohar Link: https://lore.kernel.org/r/20201002173828.2099543-13-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 2039bda1fa8dad3f4275b29eeaffef545bcbc85d Author: Kees Cook Date: Fri Oct 2 10:38:23 2020 -0700 LSM: Add "contents" flag to kernel_read_file hook As with the kernel_load_data LSM hook, add a "contents" flag to the kernel_read_file LSM hook that indicates whether the LSM can expect a matching call to the kernel_post_read_file LSM hook with the full contents of the file. With the coming addition of partial file read support for kernel_read_file*() API, the LSM will no longer be able to always see the entire contents of a file during the read calls. For cases where the LSM must read examine the complete file contents, it will need to do so on its own every time the kernel_read_file hook is called with contents=false (or reject such cases). Adjust all existing LSMs to retain existing behavior. Signed-off-by: Kees Cook Reviewed-by: Mimi Zohar Link: https://lore.kernel.org/r/20201002173828.2099543-12-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 38f901735a9e2b3d182fc04a1dfcdb0d3325ea5d Author: Kees Cook Date: Fri Oct 2 10:38:22 2020 -0700 module: Call security_kernel_post_load_data() Now that there is an API for checking loaded contents for modules loaded without a file, call into the LSM hooks. Signed-off-by: Kees Cook Reviewed-by: KP Singh Acked-by: Jessica Yu Link: https://lore.kernel.org/r/20201002173828.2099543-11-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 4f2d99b06b73800a5fb5b33e1899272e87ed7093 Author: Kees Cook Date: Fri Oct 2 10:38:21 2020 -0700 firmware_loader: Use security_post_load_data() Now that security_post_load_data() is wired up, use it instead of the NULL file argument style of security_post_read_file(), and update the security_kernel_load_data() call to indicate that a security_kernel_post_load_data() call is expected. Wire up the IMA check to match earlier logic. Perhaps a generalized change to ima_post_load_data() might look something like this: return process_buffer_measurement(buf, size, kernel_load_data_id_str(load_id), read_idmap[load_id] ?: FILE_CHECK, 0, NULL); Signed-off-by: Kees Cook Reviewed-by: Mimi Zohar Link: https://lore.kernel.org/r/20201002173828.2099543-10-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit b64fcae74b6d6940d14243c963ab0089e8f0d82d Author: Kees Cook Date: Fri Oct 2 10:38:20 2020 -0700 LSM: Introduce kernel_post_load_data() hook There are a few places in the kernel where LSMs would like to have visibility into the contents of a kernel buffer that has been loaded or read. While security_kernel_post_read_file() (which includes the buffer) exists as a pairing for security_kernel_read_file(), no such hook exists to pair with security_kernel_load_data(). Earlier proposals for just using security_kernel_post_read_file() with a NULL file argument were rejected (i.e. "file" should always be valid for the security_..._file hooks, but it appears at least one case was left in the kernel during earlier refactoring. (This will be fixed in a subsequent patch.) Since not all cases of security_kernel_load_data() can have a single contiguous buffer made available to the LSM hook (e.g. kexec image segments are separately loaded), there needs to be a way for the LSM to reason about its expectations of the hook coverage. In order to handle this, add a "contents" argument to the "kernel_load_data" hook that indicates if the newly added "kernel_post_load_data" hook will be called with the full contents once loaded. That way, LSMs requiring full contents can choose to unilaterally reject "kernel_load_data" with contents=false (which is effectively the existing hook coverage), but when contents=true they can allow it and later evaluate the "kernel_post_load_data" hook once the buffer is loaded. With this change, LSMs can gain coverage over non-file-backed data loads (e.g. init_module(2) and firmware userspace helper), which will happen in subsequent patches. Additionally prepare IMA to start processing these cases. Signed-off-by: Kees Cook Reviewed-by: KP Singh Link: https://lore.kernel.org/r/20201002173828.2099543-9-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 885352881f11f1f3113d8eb877786bcb6d720544 Author: Kees Cook Date: Fri Oct 2 10:38:19 2020 -0700 fs/kernel_read_file: Add file_size output argument In preparation for adding partial read support, add an optional output argument to kernel_read_file*() that reports the file size so callers can reason more easily about their reading progress. Signed-off-by: Kees Cook Reviewed-by: Mimi Zohar Reviewed-by: Luis Chamberlain Reviewed-by: James Morris Acked-by: Scott Branden Link: https://lore.kernel.org/r/20201002173828.2099543-8-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 113eeb517780add2b38932a61d4e4440a73eb72a Author: Kees Cook Date: Fri Oct 2 10:38:18 2020 -0700 fs/kernel_read_file: Switch buffer size arg to size_t In preparation for further refactoring of kernel_read_file*(), rename the "max_size" argument to the more accurate "buf_size", and correct its type to size_t. Add kerndoc to explain the specifics of how the arguments will be used. Note that with buf_size now size_t, it can no longer be negative (and was never called with a negative value). Adjust callers to use it as a "maximum size" when *buf is NULL. Signed-off-by: Kees Cook Reviewed-by: Mimi Zohar Reviewed-by: Luis Chamberlain Reviewed-by: James Morris Acked-by: Scott Branden Link: https://lore.kernel.org/r/20201002173828.2099543-7-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit f7a4f689bca6072492626938aad6dd2f32c5bf97 Author: Kees Cook Date: Fri Oct 2 10:38:17 2020 -0700 fs/kernel_read_file: Remove redundant size argument In preparation for refactoring kernel_read_file*(), remove the redundant "size" argument which is not needed: it can be included in the return code, with callers adjusted. (VFS reads already cannot be larger than INT_MAX.) Signed-off-by: Kees Cook Reviewed-by: Mimi Zohar Reviewed-by: Luis Chamberlain Reviewed-by: James Morris Acked-by: Scott Branden Link: https://lore.kernel.org/r/20201002173828.2099543-6-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 5287b07f6d7cc366528954e2c3cae22e47cb76a4 Author: Kees Cook Date: Fri Oct 2 10:38:16 2020 -0700 fs/kernel_read_file: Split into separate source file These routines are used in places outside of exec(2), so in preparation for refactoring them, move them into a separate source file, fs/kernel_read_file.c. Signed-off-by: Kees Cook Reviewed-by: Mimi Zohar Reviewed-by: Luis Chamberlain Acked-by: Scott Branden Link: https://lore.kernel.org/r/20201002173828.2099543-5-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit b89999d004931ab2e5123611ace7dab77328f8d6 Author: Scott Branden Date: Fri Oct 2 10:38:15 2020 -0700 fs/kernel_read_file: Split into separate include file Move kernel_read_file* out of linux/fs.h to its own linux/kernel_read_file.h include file. That header gets pulled in just about everywhere and doesn't really need functions not related to the general fs interface. Suggested-by: Christoph Hellwig Signed-off-by: Scott Branden Signed-off-by: Kees Cook Reviewed-by: Christoph Hellwig Reviewed-by: Mimi Zohar Reviewed-by: Luis Chamberlain Acked-by: Greg Kroah-Hartman Acked-by: James Morris Link: https://lore.kernel.org/r/20200706232309.12010-2-scott.branden@broadcom.com Link: https://lore.kernel.org/r/20201002173828.2099543-4-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 06e67b849ab910a49a629445f43edb074153d0eb Author: Kees Cook Date: Fri Oct 2 10:38:14 2020 -0700 fs/kernel_read_file: Remove FIRMWARE_EFI_EMBEDDED enum The "FIRMWARE_EFI_EMBEDDED" enum is a "where", not a "what". It should not be distinguished separately from just "FIRMWARE", as this confuses the LSMs about what is being loaded. Additionally, there was no actual validation of the firmware contents happening. Fixes: e4c2c0ff00ec ("firmware: Add new platform fallback mechanism and firmware_request_platform()") Signed-off-by: Kees Cook Reviewed-by: Luis Chamberlain Acked-by: Scott Branden Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201002173828.2099543-3-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit c307459b9d1fcb8bbf3ea5a4162979532322ef77 Author: Kees Cook Date: Fri Oct 2 10:38:13 2020 -0700 fs/kernel_read_file: Remove FIRMWARE_PREALLOC_BUFFER enum FIRMWARE_PREALLOC_BUFFER is a "how", not a "what", and confuses the LSMs that are interested in filtering between types of things. The "how" should be an internal detail made uninteresting to the LSMs. Fixes: a098ecd2fa7d ("firmware: support loading into a pre-allocated buffer") Fixes: fd90bc559bfb ("ima: based on policy verify firmware signatures (pre-allocated buffer)") Fixes: 4f0496d8ffa3 ("ima: based on policy warn about loading firmware (pre-allocated buffer)") Signed-off-by: Kees Cook Reviewed-by: Mimi Zohar Reviewed-by: Luis Chamberlain Acked-by: Scott Branden Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201002173828.2099543-2-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 4be87603b6dc9e49c2e07151bb51180dc0b6964a Author: Angelo Dureghello Date: Fri Oct 2 16:05:45 2020 +0200 serial: mcf: add sysrq capability After some unsuccessful attempts to use sysrq over console, figured out that port->has_sysrq should likely be enabled, as per other architectures, this when CONFIG_SERIAL_MCF_CONSOLE is also enabled. Tested some magic sysrq commands (h, p, t, b), they works now properly. Commands works inside 5 secs after BREAK is sent, as expected. Signed-off-by: Angelo Dureghello Link: https://lore.kernel.org/r/20201002140545.477481-1-angelo.dureghello@timesys.com Signed-off-by: Greg Kroah-Hartman commit f4eef224a09f4ea4344211dabfb875dd865df479 Author: Angelo Dureghello Date: Sun Oct 4 18:11:44 2020 +0200 serial: fsl_lpuart: add sysrq support when using dma Add handling of magic sysrq keys when using dma/edma. Tested by sending BREAK followed by a sysrq command inside a 5 secs time window, by: echo 1 > /proc/sys/kernel/sysrq BREAK + h, t, e, b, c Tested also sending a command after 5 secs after BREAK, that's properly ignored. Signed-off-by: Angelo Dureghello Link: https://lore.kernel.org/r/20201004161144.1307174-1-angelo.dureghello@timesys.com Signed-off-by: Greg Kroah-Hartman commit 757e282188f0138a06ebf925c950995feb7bd666 Merge: 549738f15da0e a5663c9b1e31c Author: Rafael J. Wysocki Date: Mon Oct 5 13:31:32 2020 +0200 Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull opertaing performance points (OPP) framework fixes for 5.10-rc1 from Viresh Kumar: "- Return -EPROBE_DEFER properly from dev_pm_opp_get_opp_table() (Stephan Gerhold). - Minor cleanups around required-opps (Stephan Gerhold). - Extends opp-supported-hw property to contain multiple versions (Viresh Kumar). - Multiple cleanups around dev_pm_opp_attach_genpd() (Viresh Kumar). - Multiple fixes, cleanups in the OPP core for overall better design (Viresh Kumar)." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: Allow opp-level to be set to 0 opp: Prevent memory leak in dev_pm_opp_attach_genpd() ARM: tegra: Pass multiple versions in opp-supported-hw property opp: Allow opp-supported-hw to contain multiple versions dt-bindings: opp: Allow opp-supported-hw to contain multiple versions opp: Set required OPPs in reverse order when scaling down opp: Reduce code duplication in _set_required_opps() opp: Drop unnecessary check from dev_pm_opp_attach_genpd() opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1() opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER opp: Remove _dev_pm_opp_find_and_remove_table() wrapper opp: Split out _opp_set_rate_zero() opp: Reuse the enabled flag in !target_freq path opp: Rename regulator_enabled and use it as status of all resources commit 21988a8e51479ceffe7b0568b170effabb708dfe Author: dmitry.torokhov@gmail.com Date: Sun Oct 4 22:11:25 2020 -0700 ACPI: button: fix handling lid state changes when input device closed The original intent of 84d3f6b76447 was to delay evaluating lid state until all drivers have been loaded, with input device being opened from userspace serving as a signal for this condition. Let's ensure that state updates happen even if userspace closed (or in the future inhibited) input device. Note that if we go through suspend/resume cycle we assume the system has been fully initialized even if LID input device has not been opened yet. This has a side-effect of fixing access to input->users outside of input->mutex protections by the way of eliminating said accesses and using driver private flag. Fixes: 84d3f6b76447 ("ACPI / button: Delay acpi_lid_initialize_state() until first user space open") Signed-off-by: Dmitry Torokhov Reviewed-by: Hans de Goede Cc: 4.15+ # 4.15+ Signed-off-by: Rafael J. Wysocki commit 6925478cad2721432e4cecf11174d64b22ed3b94 Author: Rikard Falkeborn Date: Sun Oct 4 21:32:02 2020 +0200 power: supply: Constify static w1_family_ops structs The only usage of these structs is to assign their address to the fops field in the w1_family struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. This was done with the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @r1 disable optional_qualifier @ identifier i; position p; @@ static struct w1_family_ops i@p = {...}; @ok1@ identifier r1.i; position p; identifier s; @@ static struct w1_family s = { .fops=&i@p, }; @bad1@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad1 disable optional_qualifier@ identifier r1.i; @@ static +const struct w1_family_ops i={}; // Acked-by: Sebastian Reichel Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201004193202.4044-4-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 57de2dfcabba91daedd66ac006b71734983975d6 Author: Rikard Falkeborn Date: Sun Oct 4 21:32:01 2020 +0200 w1: Constify static w1_family_ops structs The only usage of these structs is to assign their address to the fops field in the w1_family struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. This was done with the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @r1 disable optional_qualifier @ identifier i; position p; @@ static struct w1_family_ops i@p = {...}; @ok1@ identifier r1.i; position p; identifier s; @@ static struct w1_family s = { .fops=&i@p, }; @bad1@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad1 disable optional_qualifier@ identifier r1.i; @@ static +const struct w1_family_ops i={}; // Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201004193202.4044-3-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 07f8569fbe44f35e53c7a5946fbb348432c68377 Author: Rikard Falkeborn Date: Sun Oct 4 21:32:00 2020 +0200 w1: Constify struct w1_family_ops The fops field in the w1_family struct is never modified. Make it const to indicate that. Constifying the pointer makes it possible for drivers to declare static w1_family_ops structs const, which in turn will allow the compiler to put it in read-only memory. Reviewed-by: Sebastian Reichel Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20201004193202.4044-2-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit a4f88430af896bf34ec25a7a5f0e053fb3d928e0 Author: Vincent Mailhol Date: Sat Oct 3 00:41:51 2020 +0900 usb: cdc-acm: add quirk to blacklist ETAS ES58X devices The ES58X devices has a CDC ACM interface (used for debug purpose). During probing, the device is thus recognized as USB Modem (CDC ACM), preventing the etas-es58x module to load: usbcore: registered new interface driver etas_es58x usb 1-1.1: new full-speed USB device number 14 using xhci_hcd usb 1-1.1: New USB device found, idVendor=108c, idProduct=0159, bcdDevice= 1.00 usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1.1: Product: ES581.4 usb 1-1.1: Manufacturer: ETAS GmbH usb 1-1.1: SerialNumber: 2204355 cdc_acm 1-1.1:1.0: No union descriptor, testing for castrated device cdc_acm 1-1.1:1.0: ttyACM0: USB ACM device Thus, these have been added to the ignore list in drivers/usb/class/cdc-acm.c N.B. Future firmware release of the ES58X will remove the CDC-ACM interface. `lsusb -v` of the three devices variant (ES581.4, ES582.1 and ES584.1): Bus 001 Device 011: ID 108c:0159 Robert Bosch GmbH ES581.4 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x108c Robert Bosch GmbH idProduct 0x0159 bcdDevice 1.00 iManufacturer 1 ETAS GmbH iProduct 2 ES581.4 iSerial 3 2204355 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0035 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 5 Bus Powered Configuration bmAttributes 0x80 (Bus Powered) MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 0 iInterface 4 ACM Control Interface CDC Header: bcdCDC 1.10 CDC Call Management: bmCapabilities 0x01 call management bDataInterface 0 CDC ACM: bmCapabilities 0x06 sends break line coding and serial state Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 10 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Device Status: 0x0000 (Bus Powered) Bus 001 Device 012: ID 108c:0168 Robert Bosch GmbH ES582 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x108c Robert Bosch GmbH idProduct 0x0168 bcdDevice 1.00 iManufacturer 1 ETAS GmbH iProduct 2 ES582 iSerial 3 0108933 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0043 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Union: bMasterInterface 0 bSlaveInterface 1 CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 16 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) Bus 001 Device 013: ID 108c:0169 Robert Bosch GmbH ES584.1 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x108c Robert Bosch GmbH idProduct 0x0169 bcdDevice 1.00 iManufacturer 1 ETAS GmbH iProduct 2 ES584.1 iSerial 3 0100320 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0043 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 0 CDC Header: bcdCDC 1.10 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Union: bMasterInterface 0 bSlaveInterface 1 CDC Call Management: bmCapabilities 0x03 call management use DataInterface bDataInterface 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 16 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 2 Communications bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) Signed-off-by: Vincent Mailhol Cc: stable Link: https://lore.kernel.org/r/20201002154219.4887-8-mailhol.vincent@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit fccd2f0e629b357437bebc015810f7f1957a4643 Merge: fc7d17551f776 15e5d5b45b2b7 Author: Rafael J. Wysocki Date: Mon Oct 5 13:12:02 2020 +0200 Merge back cpufreq material for 5.10. commit 0b9688ee95c123e2dc4449ef667abe4209e55ee4 Merge: 1a67b9263e066 f3643b5b77f26 Author: Rafael J. Wysocki Date: Mon Oct 5 13:11:17 2020 +0200 Merge back cpuidle material for 5.10. * pm-cpuidle: cpuidle: record state entry rejection statistics cpuidle: psci: Allow PM domain to be initialized even if no OSI mode firmware: psci: Extend psci_set_osi_mode() to allow reset to PC mode ACPI: processor: Print more information when acpi_processor_evaluate_cst() fails cpuidle: tegra: Correctly handle result of arm_cpuidle_simple_enter() commit 711a37813ad9878232efa51e9c7e2bd875337b14 Author: Mychaela N. Falconia Date: Fri Oct 2 18:49:37 2020 +0000 USB: serial: ftdi_sio: use cur_altsetting for consistency ftdi_determine_type() function had this construct in it to get the number of the interface it is operating on: inter = serial->interface->altsetting->desc.bInterfaceNumber; Elsewhere in this driver cur_altsetting is used instead for this purpose. Change ftdi_determine_type() to use cur_altsetting for consistency. Signed-off-by: Mychaela N. Falconia [ johan: fix old style issues; drop braces and random white space ] Signed-off-by: Johan Hovold commit 9f126c56b9d645e7014777d7d37d74eedc4e3137 Author: Alexander Shishkin Date: Mon Oct 5 10:13:19 2020 +0300 intel_th: pci: Add Alder Lake CPU support This adds support for the Trace Hub in Alder Lake CPU. Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20201005071319.78508-9-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 951e4d71a8fa84b76aff8181d288af025f250a3c Author: Alexander Shishkin Date: Mon Oct 5 10:13:18 2020 +0300 intel_th: pci: Add Alder Lake-S support This adds support for the Trace Hub in Alder Lake-S. Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20201005071319.78508-8-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b8f8534b10b6ee3cec5e49682d7e0c4796cdccea Author: Tingwei Zhang Date: Mon Oct 5 10:13:17 2020 +0300 stm class: ftrace: Use different channel accroding to CPU To avoid mixup of packets from differnt ftrace packets simultaneously, use different channel for packets from different CPU. Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Tingwei Zhang Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20201005071319.78508-7-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e8ecea3017385858be0ba5640b3b364586743c6b Author: Tingwei Zhang Date: Mon Oct 5 10:13:16 2020 +0300 stm class: ftrace: Enable supported trace export flag Set flags for trace_export. Export function trace, event trace and trace marker to stm. Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Alexander Shishkin Signed-off-by: Tingwei Zhang Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20201005071319.78508-6-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 458999c6f67b0ffcc704a4892041dd700adf7d83 Author: Tingwei Zhang Date: Mon Oct 5 10:13:15 2020 +0300 tracing: Add trace_export support for trace_marker Add the support to route trace_marker buffer to other destination via trace_export. Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Alexander Shishkin Signed-off-by: Tingwei Zhang Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20201005071319.78508-5-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8ab7a2b7055c88c3da5e4684dfa015c6a8987c28 Author: Tingwei Zhang Date: Mon Oct 5 10:13:14 2020 +0300 tracing: Add trace_export support for event trace Only function traces can be exported to other destinations currently. This patch exports event trace as well. Move trace export related function to the beginning of file so other trace can call trace_process_export() to export. Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Alexander Shishkin Signed-off-by: Tingwei Zhang Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20201005071319.78508-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8438f5211479e4b8433f641634362264bc3bbd9e Author: Tingwei Zhang Date: Mon Oct 5 10:13:13 2020 +0300 tracing: Add flag to control different traces More traces like event trace or trace marker will be supported. Add flag for difference traces, so that they can be controlled separately. Move current function trace to it's own flag instead of global ftrace enable flag. Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Alexander Shishkin Signed-off-by: Tingwei Zhang Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20201005071319.78508-3-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7b9749bd830848bca9179b0a16251ca3c36e82e6 Author: Tingwei Zhang Date: Mon Oct 5 10:13:12 2020 +0300 stm class: ftrace: Change dependency to TRACING We will support copying event trace to STM. Change STM_SOURCE_FTRACE to depend on TRACING since we will support multiple tracers. Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Alexander Shishkin Signed-off-by: Tingwei Zhang Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20201005071319.78508-2-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d3a9ff51b916a3da939f6d5eeb90164f289b39e7 Merge: d8ccb6d873283 dbc888072a976 Author: Greg Kroah-Hartman Date: Mon Oct 5 12:37:22 2020 +0200 Merge tag 'extcon-next-for-5.10-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Detailed description for this pull request: 1. Update extcon driver with minor updates: - Covert the devicetree binding format from txt to yaml and edit the bidning document for extcon-ptn5150.c. - Clean-up the code of extcon-ptn5150.c without any behavior changes. - Replace HTTP links with HTTPS ones on extcon-palmas.c and extcon-usb-gpio.c. - Return the proper error code on extcon-max14577/max77693/max77843.c. - Simplify with dev_err_probe() on extcon-palmas.c. - Use module_platform_driver to simplify the code on extcon-axp288.c. 2. Update MAINTAINERS - Add Krzysztof Kozlowski as maintainer of NXP PTN5150A CC/extcon driver to provide review, feedback and testing. * tag 'extcon-next-for-5.10-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: (25 commits) extcon: axp288: Use module_platform_driver to simplify the code extcon: ptn5150: Do not print error during probe if nothing is attached extcon: ptn5150: Use defines for registers extcon: palmas: Simplify with dev_err_probe() extcon: max8997: Return error code of extcon_dev_allocate() extcon: max77843: Return error code of extcon_dev_allocate() extcon: max77693: Return error code of extcon_dev_allocate() extcon: max14577: Return error code of extcon_dev_allocate() extcon: ptn5150: Set the VBUS and POLARITY property capability extcon: ptn5150: Switch to GENMASK() and BIT() macros extcon: ptn5150: Deduplicate parts of dev_err_probe() extcon: Replace HTTP links with HTTPS ones MAINTAINERS: Add entry for NXP PTN5150A CC driver extcon: ptn5150: Convert to .probe_new extcon: ptn5150: Convert to module_i2c_driver extcon: ptn5150: Reduce the amount of logs on deferred probe extcon: ptn5150: Make 'vbus-gpios' optional extcon: ptn5150: Check current USB mode when probing extcon: ptn5150: Lower the noisiness of probe extcon: ptn5150: Simplify getting vbus-gpios with flags ... commit dea252fa41cd8ce332d148444e4799235a8a03ec Author: Clément Péron Date: Sat Oct 3 12:03:32 2020 +0200 ARM: dts: sun4i-a10: fix cpu_alert temperature When running dtbs_check thermal_zone warn about the temperature declared. thermal-zones: cpu-thermal:trips:cpu-alert0:temperature:0:0: 850000 is greater than the maximum of 200000 It's indeed wrong the real value is 85°C and not 850°C. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20201003100332.431178-1-peron.clem@gmail.com commit f23cc3ba491af77395cea3f9d51204398729f26b Author: Raul E Rangel Date: Mon Sep 28 15:59:20 2020 -0600 mmc: sdhci-acpi: AMDI0040: Set SDHCI_QUIRK2_PRESET_VALUE_BROKEN This change fixes HS400 tuning for devices with invalid presets. SDHCI presets are not currently used for eMMC HS/HS200/HS400, but are used for DDR52. The HS400 retuning sequence is: HS400->DDR52->HS->HS200->Perform Tuning->HS->HS400 This means that when HS400 tuning happens, we transition through DDR52 for a very brief period. This causes presets to be enabled unintentionally and stay enabled when transitioning back to HS200 or HS400. Some firmware has invalid presets, so we end up with driver strengths that can cause I/O problems. Fixes: 34597a3f60b1 ("mmc: sdhci-acpi: Add support for ACPI HID of AMD Controller with HS400") Signed-off-by: Raul E Rangel Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200928154718.1.Icc21d4b2f354e83e26e57e270dc952f5fe0b0a40@changeid Signed-off-by: Ulf Hansson commit f5810e5c329238b8553ebd98b914bdbefd8e6737 Author: Lorenzo Pieralisi Date: Wed Sep 16 12:06:58 2020 +0100 asm-generic/io.h: Fix !CONFIG_GENERIC_IOMAP pci_iounmap() implementation For arches that do not select CONFIG_GENERIC_IOMAP, the current pci_iounmap() function does nothing causing obvious memory leaks for mapped regions that are backed by MMIO physical space. In order to detect if a mapped pointer is IO vs MMIO, a check must made available to the pci_iounmap() function so that it can actually detect whether the pointer has to be unmapped. In configurations where CONFIG_HAS_IOPORT_MAP && !CONFIG_GENERIC_IOMAP, a mapped port is detected using an ioport_map() stub defined in asm-generic/io.h. Use the same logic to implement a stub (ie __pci_ioport_unmap()) that detects if the passed in pointer in pci_iounmap() is IO vs MMIO to iounmap conditionally and call it in pci_iounmap() fixing the issue. Leave __pci_ioport_unmap() as a NOP for all other config options. Tested-by: George Cherian Link: https://lore.kernel.org/lkml/20200905024811.74701-1-yangyingliang@huawei.com Link: https://lore.kernel.org/lkml/20200824132046.3114383-1-george.cherian@marvell.com Link: https://lore.kernel.org/r/a9daf8d8444d0ebd00bc6d64e336ec49dbb50784.1600254147.git.lorenzo.pieralisi@arm.com Reported-by: George Cherian Signed-off-by: Lorenzo Pieralisi Signed-off-by: Lorenzo Pieralisi Reviewed-by: Catalin Marinas Cc: Arnd Bergmann Cc: George Cherian Cc: Will Deacon Cc: Bjorn Helgaas Cc: Catalin Marinas Cc: Yang Yingliang commit 1d29b36ac7b424016d08d50051958fbff8a3a73f Author: Lorenzo Pieralisi Date: Wed Sep 16 12:06:57 2020 +0100 sparc32: Move ioremap/iounmap declaration before asm-generic/io.h include Move the ioremap/iounmap declaration before asm-generic/io.h is included so that it is visible within it. Link: https://lore.kernel.org/r/93e2f23cda474a92a4708d4c50c9c359426a2162.1600254147.git.lorenzo.pieralisi@arm.com Signed-off-by: Lorenzo Pieralisi Signed-off-by: Lorenzo Pieralisi Acked-by: "David S. Miller" Cc: "David S. Miller" commit 333a6783996765da2d5d34b0727b78e292cdf123 Author: Lorenzo Pieralisi Date: Wed Sep 16 12:06:56 2020 +0100 sparc32: Remove useless io_32.h __KERNEL__ preprocessor guard The __KERNEL_ preprocessor guard is useless in non-uapi headers. Remove it. Link: https://lore.kernel.org/r/084753d3064fe946ff1963eda2eb425cfd7daa7b.1600254147.git.lorenzo.pieralisi@arm.com Signed-off-by: Lorenzo Pieralisi Signed-off-by: Lorenzo Pieralisi Acked-by: David S. Miller Cc: David S. Miller commit 924a9213358fb92fa3c3225d6d042aa058167405 Author: Leonid Bloch Date: Sun Oct 4 18:58:13 2020 +0300 USB: serial: option: Add Telit FT980-KS composition This commit adds the following Telit FT980-KS composition: 0x1054: rndis, diag, adb, nmea, modem, modem, aux AT commands can be sent to /dev/ttyUSB2. Signed-off-by: Leonid Bloch Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/ce86bc05-f4e2-b199-0cdc-792715e3f275@asocscloud.com Link: https://lore.kernel.org/r/20201004155813.2342-1-lb.workbox@gmail.com Signed-off-by: Johan Hovold commit 6d81dc3c79d46b66b29712eb1ac5ad2cbe4231d2 Author: Lee Jones Date: Fri Oct 2 07:56:18 2020 +0100 mfd: kempld-core: Fix unused variable 'kempld_acpi_table' when !ACPI drivers/mfd/kempld-core.c:556:36: warning: unused variable 'kempld_acpi_table' [-Wunused-const-variable] Signed-off-by: Lee Jones commit 328162a8824cfefe4f891200bc77c0bf3e7fe5ff Author: Lee Jones Date: Fri Oct 2 07:53:36 2020 +0100 mfd: sl28cpld: Depend on I2C Fixes the following randconfig build error: ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe': simple-mfd-i2c.c:(.text+0x48): undefined reference to `__devm_regmap_init_i2c' ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_driver_init': simple-mfd-i2c.c:(.init.text+0x14): undefined reference to `i2c_register_driver' ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_driver_exit': simple-mfd-i2c.c:(.exit.text+0xd): undefined reference to `i2c_del_driver' Reported-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Acked-by: Randy Dunlap Signed-off-by: Lee Jones commit cba90582db9c14b1584268f63e319d3fc22162f4 Author: Ivan Safonov Date: Sun Oct 4 09:09:22 2020 +0300 staging: r8188eu: remove unnecessary type casts (struct wlan_bssid_ex *) Reduce line length, simplify refactoring. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20201004060921.8908-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit fb127a61c9d8dfd9b370ee173344d01711f3c698 Author: Ross Schmidt Date: Sat Oct 3 20:17:43 2020 -0500 staging: rtl8723bs: replace _cancel_timer with del_timer_sync Replace _cancel_timer with API function del_timer_sync. One instance of del_timer_sync is moved and an unnecessary pair of spin locks are removed. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201004011743.10750-8-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit d2e8f201a017fc8be569ca1d6f8f0e0b75495666 Author: Ross Schmidt Date: Sat Oct 3 20:17:42 2020 -0500 staging: rtl8723bs: replace RTW_GET_BE16 with get_unaligned_be16 Replace RTW_GET_BE16 macro with get_unlaligned_be16. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201004011743.10750-7-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit d48603afda8fdca35cf9be7daeb10bf0adbae986 Author: Ross Schmidt Date: Sat Oct 3 20:17:41 2020 -0500 staging: rtl8723bs: replace RTW_GET_LE16 with get_unaligned_le16 Replace RTW_GET_LE16 macro with get_unaligned_le16. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201004011743.10750-6-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 56c1493807ff33778f354867fd58f081cd98c365 Author: Ross Schmidt Date: Sat Oct 3 20:17:40 2020 -0500 staging: rtl8723bs: replace RTW_GET_BE24 with get_unaligned_be24 Replace RTW_GET_BE24 macro with get_unaligned_be24. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201004011743.10750-5-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 86f5376810c666ae10407e64e52260cff8572a2c Author: Ross Schmidt Date: Sat Oct 3 20:17:39 2020 -0500 staging: rtl8723bs: remove unused macros Remove several macros in osdep_service.h because they are not used. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201004011743.10750-4-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9a74f8d50fe1f14ec894c28e166bdd95fe29a904 Author: Ross Schmidt Date: Sat Oct 3 20:17:38 2020 -0500 staging: rtl8723bs: replace _RND8 with round_up() Use round_up instead of inline _RND8. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201004011743.10750-3-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 046bd5c9c2833fc6a0dd8bc200f6e2ab55af1755 Author: Ross Schmidt Date: Sat Oct 3 20:17:37 2020 -0500 staging: rtl8723bs: replace _RND4 with round_up() Use round_up instead of inline _RND4. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201004011743.10750-2-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 87fe08d74ca66d8d993bf28e23e70c2a80ba08ee Author: Ross Schmidt Date: Sat Oct 3 20:17:36 2020 -0500 staging: rtl8723bs: replace RND4 with round_up() Use round_up instead of define RND4. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20201004011743.10750-1-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 51c00535537018bddd4b3fb225d18c1ae049c4e9 Author: Coiby Xu Date: Sat Oct 3 07:59:41 2020 +0800 staging: qlge: fix build breakage with dumping enabled This fixes commit 0107635e15ac ("staging: qlge: replace pr_err with netdev_err") which introduced an build breakage of missing `struct ql_adapter *qdev` for some functions and a warning of type mismatch with dumping enabled, i.e., $ make CFLAGS_MODULE="-DQL_ALL_DUMP -DQL_OB_DUMP -DQL_CB_DUMP \ -DQL_IB_DUMP -DQL_REG_DUMP -DQL_DEV_DUMP" M=drivers/staging/qlge qlge_dbg.c: In function ‘ql_dump_ob_mac_rsp’: qlge_dbg.c:2051:13: error: ‘qdev’ undeclared (first use in this function); did you mean ‘cdev’? 2051 | netdev_err(qdev->ndev, "%s\n", __func__); | ^~~~ qlge_dbg.c: In function ‘ql_dump_routing_entries’: qlge_dbg.c:1435:10: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat=] 1435 | "%s: Routing Mask %d = 0x%.08x\n", | ~^ | | | char * | %d 1436 | i, value); | ~ | | | int qlge_dbg.c:1435:37: warning: format ‘%x’ expects a matching ‘unsigned int’ argument [-Wformat=] 1435 | "%s: Routing Mask %d = 0x%.08x\n", | ~~~~^ | | | unsigned int Note that now ql_dump_rx_ring/ql_dump_tx_ring won't check if the passed parameter is a null pointer. Fixes: 0107635e15ac ("staging: qlge: replace pr_err with netdev_err") Reported-by: Benjamin Poirier Suggested-by: Benjamin Poirier Reviewed-by: Benjamin Poirier Signed-off-by: Coiby Xu Link: https://lore.kernel.org/r/20201002235941.77062-1-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman commit a944a1fb9a8286fb9e4bbd0180ebd53353c7f412 Merge: c95e48b275c9a 549738f15da0e Author: Greg Kroah-Hartman Date: Mon Oct 5 08:55:26 2020 +0200 Merge 5.9-rc8 into staging-next We need the IIO fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 168ae5a74b4a9ebf0bd9c5ea7008af0b7a6ccf04 Merge: 21c949b218023 549738f15da0e Author: Greg Kroah-Hartman Date: Mon Oct 5 08:54:36 2020 +0200 Merge 5.9-rc8 into usb-next We need the USB fixes in here as well for testing. Signed-off-by: Greg Kroah-Hartman commit 7a40871da4a315a4110f5529deaaff9fca5e9aba Author: Rob Herring Date: Mon Sep 28 10:59:53 2020 -0500 dt-bindings: Fix 'reg' size issues in zynqmp examples The default sizes in examples for 'reg' are 1 cell each. Fix the incorrect sizes in zynqmp examples: Documentation/devicetree/bindings/dma/xilinx/xlnx,zynqmp-dpdma.example.dt.yaml: example-0: dma-controller@fd4c0000:reg:0: [0, 4249616384, 0, 4096] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml Documentation/devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.example.dt.yaml: example-0: display@fd4a0000:reg:0: [0, 4249485312, 0, 4096] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml Documentation/devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.example.dt.yaml: example-0: display@fd4a0000:reg:1: [0, 4249526272, 0, 4096] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml Documentation/devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.example.dt.yaml: example-0: display@fd4a0000:reg:2: [0, 4249530368, 0, 4096] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml Documentation/devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.example.dt.yaml: example-0: display@fd4a0000:reg:3: [0, 4249534464, 0, 4096] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml Signed-off-by: Rob Herring Acked-by: Michal Simek Cc: Hyun Kwon Cc: Laurent Pinchart Cc: Michal Simek Cc: Vinod Koul Cc: dri-devel@lists.freedesktop.org Cc: dmaengine@vger.kernel.org Link: https://lore.kernel.org/r/20200928155953.2819930-1-robh@kernel.org Signed-off-by: Vinod Koul commit 7ffd5c83905033e815ef2e13c680c8fc3d7ed321 Author: Julia Lawall Date: Sun Sep 20 13:26:21 2020 +0200 dmaengine: rcar-dmac: drop double zeroing sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(*x),flags) ... sg_init_table(x,n) // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1600601186-7420-10-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Vinod Koul commit aafa88f3727f13991216c2ef10df302978dcf81a Author: Julia Lawall Date: Sun Sep 20 13:26:16 2020 +0200 dmaengine: sh: drop double zeroing sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(*x),flags) ... sg_init_table(x,n) // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1600601186-7420-5-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Vinod Koul commit 028926e4ac8f21af343c25794117fd13c08b1712 Author: Logan Gunthorpe Date: Tue Sep 22 14:08:44 2020 -0600 dmaengine: ioat: Allocate correct size for descriptor chunk dma_alloc_coherent() is called with a fixed SZ_2M size, but frees happen with IOAT_CHUNK_SIZE. Recently, IOAT_CHUNK_SIZE was reduced to 512M but the allocation did not change. To fix, change to using the IOAT_CHUNK_SIZE define. This was caught with the upcoming patchset for converting Intel platforms to the dma-iommu implementation. It has a warning when the unmapped size differs from the mapped size. Fixes: a02254f8a676 ("dmaengine: ioat: Decreasing allocation chunk size 2M->512K") Suggested-by: Robin Murphy Signed-off-by: Logan Gunthorpe Acked-by: Dave Jiang Cc: Vinod Koul Cc: Dave Jiang Cc: Dan Williams Link: https://lore.kernel.org/intel-gfx/776771a2-247a-d1be-d882-bee02d919ae0@deltatee.com/ Link: https://lore.kernel.org/r/20200922200844.2982-1-logang@deltatee.com Signed-off-by: Vinod Koul commit ea275007c9473a7be66a47e0823482f6bd8aacd0 Author: Zhang Qilong Date: Mon Sep 21 17:37:01 2020 +0800 dmaengine: ti: k3-udma: use devm_platform_ioremap_resource_byname Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Zhang Qilong Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200921093701.102208-1-zhangqilong3@huawei.com Signed-off-by: Vinod Koul commit 0395f869f685c256822c5041750e6e130a16ec1b Author: Vinod Koul Date: Thu Oct 1 22:17:40 2020 +0530 dmaengine: fsl: remove bad channel update Commit 59cd818763e8 ("dmaengine: fsl: convert tasklets to use new tasklet_setup() API") broke this driver by not removing the old channel update method. Fix this by remove the offending call as channel is queried from tasklet structure. Fixes: 59cd818763e8 ("dmaengine: fsl: convert tasklets to use new tasklet_setup() API") Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20201001164740.178977-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit baf6fd97b16ea8f981b8a8b04039596f32fc2972 Author: Paul Cercueil Date: Sun Oct 4 16:03:07 2020 +0200 dmaengine: dma-jz4780: Fix race in jz4780_dma_tx_status The jz4780_dma_tx_status() function would check if a channel's cookie state was set to 'completed', and if not, it would enter the critical section. However, in that time frame, the jz4780_dma_chan_irq() function was able to set the cookie to 'completed', and clear the jzchan->vchan pointer, which was deferenced in the critical section of the first function. Fix this race by checking the channel's cookie state after entering the critical function and not before. Fixes: d894fc6046fe ("dmaengine: jz4780: add driver for the Ingenic JZ4780 DMA controller") Cc: stable@vger.kernel.org # v4.0 Signed-off-by: Paul Cercueil Reported-by: Artur Rojek Tested-by: Artur Rojek Link: https://lore.kernel.org/r/20201004140307.885556-1-paul@crapouillou.net Signed-off-by: Vinod Koul commit c2568c8c9e636a56abf31da4b28b65d3ded02524 Merge: f5083d0cee08a b980b313e5a2a Author: David S. Miller Date: Sun Oct 4 21:13:36 2020 -0700 Merge branch 'net-Constify-struct-genl_small_ops' Rikard Falkeborn says: ==================== net: Constify struct genl_small_ops Make a couple of static struct genl_small_ops const to allow the compiler to put them in read-only memory. Patches are independent. v2: Rebase on net-next, genl_ops -> genl_small_ops ==================== Signed-off-by: David S. Miller commit b980b313e5a2ace214322af9f3183c269b5c55ae Author: Rikard Falkeborn Date: Mon Oct 5 01:44:17 2020 +0200 net: openvswitch: Constify static struct genl_small_ops The only usage of these is to assign their address to the small_ops field in the genl_family struct, which is a const pointer, and applying ARRAY_SIZE() on them. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: David S. Miller commit 674d3ab94977684392200cdb193968341d452aae Author: Rikard Falkeborn Date: Mon Oct 5 01:44:16 2020 +0200 mptcp: Constify mptcp_pm_ops The only usages of mptcp_pm_ops is to assign its address to the small_ops field of the genl_family struct, which is a const pointer, and applying ARRAY_SIZE() on it. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: David S. Miller commit 127e4a1bc11e0e3d30f4d20bb888a1f680296990 Author: Jason A. Donenfeld Date: Sun Oct 4 19:49:08 2020 -0700 Input: synaptics - enable InterTouch for ThinkPad P1/X1E gen 2 With the new RMI4 F3A support, we're now able to enable full RMI4 support for this model. We also tidy up the comments a bit, as the X1E is essentially the same computer as the P1. Acked-by: Lyude Paul Signed-off-by: Jason A. Donenfeld Link: https://lore.kernel.org/r/20200930225046.173190-3-Jason@zx2c4.com Signed-off-by: Dmitry Torokhov commit a6977d758fed511a9977639465689785ac398b01 Author: Jason A. Donenfeld Date: Sun Oct 4 19:47:07 2020 -0700 Input: synaptics-rmi4 - support bootloader v8 in f34v7 With the recent addition of the F3A support, we can now accept bootloader v8, which will help support recent Thinkpads. Acked-by: Lyude Paul Signed-off-by: Jason A. Donenfeld Link: https://lore.kernel.org/r/20200930225046.173190-2-Jason@zx2c4.com Signed-off-by: Dmitry Torokhov commit 9e4c596bfd004f447a652205163234dfd4aafa69 Author: Vincent Huang Date: Sun Oct 4 19:42:24 2020 -0700 Input: synaptics-rmi4 - add support for F3A RMI4 F3A supports the touchpad GPIO function, it's designed to support more GPIOs and used on newer touchpads. This patch adds support of the touchpad buttons. Signed-off-by: Vincent Huang Reviewed-by: Hans de Goede Tested-by: Hans de Goede Reviewed-by: Andrew Duggan Link: https://lore.kernel.org/r/20200930094147.635556-3-vincent.huang@tw.synaptics.com Signed-off-by: Dmitry Torokhov commit 261bfb3328b89c63ca410ae30a0c87cd3955344c Author: Vincent Huang Date: Sun Oct 4 19:42:47 2020 -0700 Input: synaptics-rmi4 - rename f30_data to gpio_data f30_data in rmi_device_platform_data could be also referenced by RMI function 3A, so rename it and the structure name to avoid confusion. Signed-off-by: Vincent Huang Reviewed-by: Hans de Goede Tested-by: Hans de Goede Reviewed-by: Andrew Duggan Link: https://lore.kernel.org/r/20200930094147.635556-2-vincent.huang@tw.synaptics.com Signed-off-by: Dmitry Torokhov commit 32118f97f41d26a2447118fa956715cb4bd1bdac Author: Hui Su Date: Mon Sep 28 01:28:36 2020 +0800 x86/xen: Fix typo in xen_pagetable_p2m_free() Fix typo in xen_pagetable_p2m_free(): s/Fortunatly/Fortunately Signed-off-by: Hui Su Link: https://lore.kernel.org/r/20200927172836.GA7423@rlk [boris: reword commit message slightly] Signed-off-by: Boris Ostrovsky commit d759af38572f97321112a0852353613d18126038 Author: Juergen Gross Date: Fri Sep 25 16:07:51 2020 +0200 x86/xen: disable Firmware First mode for correctable memory errors When running as Xen dom0 the kernel isn't responsible for selecting the error handling mode, this should be handled by the hypervisor. So disable setting FF mode when running as Xen pv guest. Not doing so might result in boot splats like: [ 7.509696] HEST: Enabling Firmware First mode for corrected errors. [ 7.510382] mce: [Firmware Bug]: Ignoring request to disable invalid MCA bank 2. [ 7.510383] mce: [Firmware Bug]: Ignoring request to disable invalid MCA bank 3. [ 7.510384] mce: [Firmware Bug]: Ignoring request to disable invalid MCA bank 4. [ 7.510384] mce: [Firmware Bug]: Ignoring request to disable invalid MCA bank 5. [ 7.510385] mce: [Firmware Bug]: Ignoring request to disable invalid MCA bank 6. [ 7.510386] mce: [Firmware Bug]: Ignoring request to disable invalid MCA bank 7. [ 7.510386] mce: [Firmware Bug]: Ignoring request to disable invalid MCA bank 8. Reason is that the HEST ACPI table contains the real number of MCA banks, while the hypervisor is emulating only 2 banks for guests. Cc: stable@vger.kernel.org Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20200925140751.31381-1-jgross@suse.com Signed-off-by: Boris Ostrovsky commit f88af7229f6f22ce7313c11a0bbb9c88317b7c5e Author: Stefano Stabellini Date: Thu Sep 24 16:49:55 2020 -0700 xen/arm: do not setup the runstate info page if kpti is enabled The VCPUOP_register_runstate_memory_area hypercall takes a virtual address of a buffer as a parameter. The semantics of the hypercall are such that the virtual address should always be valid. When KPTI is enabled and we are running userspace code, the virtual address is not valid, thus, Linux is violating the semantics of VCPUOP_register_runstate_memory_area. Do not call VCPUOP_register_runstate_memory_area when KPTI is enabled. Signed-off-by: Stefano Stabellini CC: Bertrand Marquis CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Link: https://lore.kernel.org/r/20200924234955.15455-1-sstabellini@kernel.org Reviewed-by: Bertrand Marquis Signed-off-by: Boris Ostrovsky commit bba91dd6d70b7aa239280dc095a461bc064c98a5 Author: Jing Xiangfeng Date: Sat Sep 19 11:17:02 2020 +0800 xen: remove redundant initialization of variable ret After commit 9f51c05dc41a ("pvcalls-front: Avoid get_free_pages(GFP_KERNEL) under spinlock"), the variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it. Signed-off-by: Jing Xiangfeng Link: https://lore.kernel.org/r/20200919031702.32192-1-jingxiangfeng@huawei.com Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky commit d6bbc2ff68fd22dd972c684921ea348ed7ffcbb2 Author: Souptick Joarder Date: Sun Sep 6 12:21:54 2020 +0530 xen/gntdev.c: Convert get_user_pages*() to pin_user_pages*() In 2019, we introduced pin_user_pages*() and now we are converting get_user_pages*() to the new API as appropriate. [1] & [2] could be referred for more information. This is case 5 as per document [1]. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Boris Ostrovsky Cc: Juergen Gross Cc: David Vrabel Link: https://lore.kernel.org/r/1599375114-32360-2-git-send-email-jrdr.linux@gmail.com Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky commit 779055842da5b2e508f3ccf9a8153cb1f704f566 Author: Souptick Joarder Date: Sun Sep 6 12:21:53 2020 +0530 xen/gntdev.c: Mark pages as dirty There seems to be a bug in the original code when gntdev_get_page() is called with writeable=true then the page needs to be marked dirty before being put. To address this, a bool writeable is added in gnt_dev_copy_batch, set it in gntdev_grant_copy_seg() (and drop `writeable` argument to gntdev_get_page()) and then, based on batch->writeable, use set_page_dirty_lock(). Fixes: a4cdb556cae0 (xen/gntdev: add ioctl for grant copy) Suggested-by: Boris Ostrovsky Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Boris Ostrovsky Cc: Juergen Gross Cc: David Vrabel Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1599375114-32360-1-git-send-email-jrdr.linux@gmail.com Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky commit 26822652c85eff14e40115255727b2693400c524 Author: Michael Srba Date: Sun Oct 4 14:37:47 2020 -0700 Input: add zinitix touchscreen driver Add support for the bt541 touchscreen IC from zinitix, loosely based on downstream driver. The driver currently supports multitouch (5 touch points). The bt541 seems to support touch keys, but the support was not added because that functionality is not being utilized by the touchscreen used for testing. Based on the similartities between downstream drivers, it seems likely that other similar touchscreen ICs can be supported with this driver in the future. Signed-off-by: Michael Srba Link: https://lore.kernel.org/r/20201001122949.16846-1-michael.srba@seznam.cz Signed-off-by: Dmitry Torokhov commit 8f445ffa851e999308bbd4d133ea849936f95179 Author: Michael Srba Date: Sun Oct 4 14:37:18 2020 -0700 dt-bindings: input/touchscreen: add bindings for zinitix This patch adds dts bindings for the zinitix bt541 touchscreen. Signed-off-by: Michael Srba Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201001122949.16846-2-michael.srba@seznam.cz Signed-off-by: Dmitry Torokhov commit f5083d0cee08a4b87d5d7a5c57f60ec128bff997 Author: Xie He Date: Sat Oct 3 15:41:05 2020 -0700 drivers/net/wan/hdlc_fr: Improvements to the code of pvc_xmit 1. Keep the code for the normal (non-error) flow at the lowest indentation level. And use "goto drop" for all error handling. 2. Replace code that pads short Ethernet frames with a "__skb_pad" call. 3. Change "dev_kfree_skb" to "kfree_skb" in error handling code. "kfree_skb" is the correct function to call when dropping an skb due to an error. "dev_kfree_skb", which is an alias of "consume_skb", is for dropping skbs normally (not due to an error). Cc: Krzysztof Halasa Cc: Stephen Hemminger Signed-off-by: Xie He Signed-off-by: David S. Miller commit 3e233cac4278366547fad3176ecf3d8d5944e2ea Merge: d3a6987db0752 8d4bd96b54dcb Author: David S. Miller Date: Sun Oct 4 14:41:05 2020 -0700 Merge branch 'bnxt_en-net-next-updates' Michael Chan says: ==================== bnxt_en: net-next updates. This series starts off with the usual update of the firmware interface spec. A new firmware status bit in the interface will be used in patch add the infrastructure to read the firmware status very early during driver probe and this will allow patch #4 to do the recovery if needed. The rest of the patches add improvements to the current RX reset logic by localizing the reset to the affected RX ring only and to reset only if firmware has determined that the RX ring is in permanent error state. ==================== Signed-off-by: David S. Miller commit 8d4bd96b54dcb5997d1035f4dfd300c04d07ec11 Author: Michael Chan Date: Sun Oct 4 15:23:01 2020 -0400 bnxt_en: Eliminate unnecessary RX resets. Currently, the driver will schedule RX ring reset when we get a buffer error in the RX completion record. These RX buffer errors can be due to normal out-of-buffer conditions or a permanent error in the RX ring. Because the driver cannot distinguish between these 2 conditions, we assume all these buffer errors require reset. This is very disruptive when it is just a normal out-of-buffer condition. Newer firmware will now monitor the rings for the permanent failure and will send a notification to the driver when it happens. This allows the driver to reset only when such a notification is received. In environments where we have predominently out-of-buffer conditions, we now can avoid these unnecessary resets. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 1b5c8b63d6a4a2a33ce279ff8d42e40dec3b04ce Author: Michael Chan Date: Sun Oct 4 15:23:00 2020 -0400 bnxt_en: Reduce unnecessary message log during RX errors. There is logic in the RX path to detect unexpected handles in the RX completion. We'll print a warning and schedule a reset. The next expected handle is then set to 0xffff which is guaranteed to not match any valid handle. This will force all remaining packets in the ring to be discarded before the reset. There can be hundreds of these packets remaining in the ring and there is no need to print the warnings for these forced errors. Reviewed-by: Pavan Chebbi Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 8a27d4b9e54cdc9e3f45d3d11b0c898e92dace39 Author: Michael Chan Date: Sun Oct 4 15:22:59 2020 -0400 bnxt_en: Add a software counter for RX ring reset. Add a per ring rx_resets counter to count these RX resets. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 8fbf58e17dce8f250dda9ad6b0a49b3041f0af14 Author: Michael Chan Date: Sun Oct 4 15:22:58 2020 -0400 bnxt_en: Implement RX ring reset in response to buffer errors. On some older chips, it is necessary to do a reset when we get buffer errors associated with an RX ring. These buffer errors may become frequent if the RX ring underruns under heavy traffic. The current code does a global reset of all reasources when this happens. This works but creates a big disruption of all rings when one RX ring is having problem. This patch implements a localized RX ring reset of just the RX ring having the issue. All other rings including all TX rings will not be affected by this single RX ring reset. Only the older chips prior to the P5 class supports this reset. Because it is not a global reset, packets may still be arriving while we are calling firmware to reset that ring. We need to be sure that we don't post any buffers during this time while the ring is undergoing reset. After firmware completes successfully, the ring will be in the reset state with no buffers and we can start filling it with new buffers and posting them. Reviewed-by: Pavan Chebbi Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 7737d325f867faa5e809c607699d2253dfb6ab09 Author: Michael Chan Date: Sun Oct 4 15:22:57 2020 -0400 bnxt_en: Refactor bnxt_init_one_rx_ring(). bnxt_init_one_rx_ring() includes logic to initialize the BDs for one RX ring and to allocate the buffers. Separate the allocation logic into a new bnxt_alloc_one_rx_ring() function. The allocation function will be used later to allocate new buffers for one specified RX ring when we reset that RX ring. Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 975bc99a4a397d1b1584a99b4adb7948b6e6944b Author: Michael Chan Date: Sun Oct 4 15:22:56 2020 -0400 bnxt_en: Refactor bnxt_free_rx_skbs(). bnxt_free_rx_skbs() frees all the allocated buffers and SKBs for every RX ring. Refactor this function by calling a new function bnxt_free_one_rx_ring_skbs() to free these buffers on one specified RX ring at a time. This is preparation work for resetting one RX ring during run-time. Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit fc8864e0b6ee2120d9b438f411159afe99348ff0 Author: Michael Chan Date: Sun Oct 4 15:22:55 2020 -0400 bnxt_en: Log FW health status info, if reset is aborted. If firmware does not come out of reset, log FW health status info to provide more information on firmware status. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 87f7ab8d6f88cc594e3417fd0a7238b9c72e88eb Author: Edwin Peer Date: Sun Oct 4 15:22:54 2020 -0400 bnxt_en: perform no master recovery during startup The NS3 SoC platforms require assistance from the OP-TEE to recover firmware if a crash occurs while no driver is bound. The CRASHED_NO_MASTER condition is recorded in the firmware status register during the crash to indicate when driver intervension is needed to coordinate a firmware reload. This condition is detected during early driver initialization in order to effect a firmware fastboot on supported platforms when necessary. Reviewed-by: Vasundhara Volam Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ba02629ff6cbadce2c6452a4942ccacef658e5c0 Author: Edwin Peer Date: Sun Oct 4 15:22:53 2020 -0400 bnxt_en: log firmware status on firmware init failure Firmware now supports device independent discovery of the status register location. This status register can provide more detailed information about firmware errors, especially if problems occur before the HWRM interface is functioning. Attempt to map this register if it is present and report the firmware status on firmware init failures. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 3e9ec2bb932d746b0ae65aba79697457e7c83f90 Author: Edwin Peer Date: Sun Oct 4 15:22:52 2020 -0400 bnxt_en: refactor bnxt_alloc_fw_health() The allocator for the firmware health structure conflates allocation and capability checks, limiting the reusability of the code. This patch separates out the capability check and disablement and improves the warning message to better describe the consequences of an allocation failure. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 424174f14eeccfea747d9f078a41bd393ffe0bde Author: Vasundhara Volam Date: Sun Oct 4 15:22:51 2020 -0400 bnxt_en: Update firmware interface spec to 1.10.1.68. Main changes is to extend hwrm_nvm_get_dev_info_output() for stored firmware versions and a new flag is added to fw_status_reg. Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit d3a6987db0752e87f6c92c7230813aa8a08bedfe Merge: 321e921daa05d b71a8d6025211 Author: David S. Miller Date: Sun Oct 4 14:38:53 2020 -0700 Merge branch 'mv88e6xxx-Add-per-port-devlink-regions' Andrew Lunn says: ==================== mv88e6xxx: Add per port devlink regions This patchset extends devlink regions to support per port regions, and them makes use of them to support the ports of the mv88e6xxx switches. root@rap:~# devlink region show mdio_bus/gpio-0:00/global1: size 64 snapshot [] mdio_bus/gpio-0:00/global2: size 64 snapshot [] mdio_bus/gpio-0:00/atu: size 49152 snapshot [] mdio_bus/gpio-0:00/0/port: size 64 snapshot [] mdio_bus/gpio-0:00/1/port: size 64 snapshot [] mdio_bus/gpio-0:00/2/port: size 64 snapshot [] mdio_bus/gpio-0:00/3/port: size 64 snapshot [] mdio_bus/gpio-0:00/4/port: size 64 snapshot [] mdio_bus/gpio-0:00/5/port: size 64 snapshot [] mdio_bus/gpio-0:00/6/port: size 64 snapshot [] mdio_bus/gpio-0:00/7/port: size 64 snapshot [] mdio_bus/gpio-0:00/8/port: size 64 snapshot [] mdio_bus/gpio-0:00/9/port: size 64 snapshot [] mdio_bus/gpio-0:00/10/port: size 64 snapshot [] root@rap:~# devlink region new mdio_bus/gpio-0:00/1/port snapshot 42 root@rap:~# devlink region dump mdio_bus/gpio-0:00/1/port snapshot 42 0000000000000000 4f 1e 3e 20 00 01 01 39 3f 05 00 00 fd 07 00 00 0000000000000010 80 00 01 00 00 00 00 00 00 00 00 00 00 00 00 91 0000000000000020 00 00 00 00 00 00 00 00 00 00 00 00 22 00 00 00 0000000000000030 07 3e 00 00 00 00 00 80 00 00 00 00 00 00 5b 00 In order to support all ports of the switch, a new devlink flavour has been added for unused ports: mdio_bus/gpio-0:00/0: type notset flavour unused splittable false mdio_bus/gpio-0:00/1: type notset flavour cpu port 1 splittable false mdio_bus/gpio-0:00/2: type eth netdev red flavour physical port 2 splittable fae mdio_bus/gpio-0:00/3: type eth netdev blue flavour physical port 3 splittable fe mdio_bus/gpio-0:00/4: type eth netdev green flavour physical port 4 splittable e mdio_bus/gpio-0:00/5: type notset flavour unused splittable false mdio_bus/gpio-0:00/6: type notset flavour unused splittable false mdio_bus/gpio-0:00/7: type notset flavour unused splittable false mdio_bus/gpio-0:00/8: type eth netdev waic0 flavour physical port 8 splittable e mdio_bus/gpio-0:00/9: type notset flavour unused splittable false mdio_bus/gpio-0:00/10: type notset flavour unused splittable false The DSA core now creates the devlink port instances earlier, so that the driver setup function can make use of them. v3: Whitespace cleanup Added justification for devlink unused flavour Added Tested-by, Reviewed-by: ==================== Signed-off-by: David S. Miller commit b71a8d60252111d89dccba92ded7470faef16460 Author: Andrew Lunn Date: Sun Oct 4 18:12:57 2020 +0200 net: dsa: mv88e6xxx: Add per port devlink regions Add a devlink region to return the per port registers. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7d1e2a10681d3b6eeaace68885ef5de88ce03efe Author: Andrew Lunn Date: Sun Oct 4 18:12:56 2020 +0200 net: dsa: Add helper for converting devlink port to ds and port Hide away from DSA drivers how devlink works. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 08156ba430b412bd9c23fe6155a58c7cb166045c Author: Andrew Lunn Date: Sun Oct 4 18:12:55 2020 +0200 net: dsa: Add devlink port regions support to DSA Allow DSA drivers to make use of devlink port regions, via simple wrappers. Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 544e7c33ec2f8077685c254f5e3b03a85c0e62eb Author: Andrew Lunn Date: Sun Oct 4 18:12:54 2020 +0200 net: devlink: Add support for port regions Allow regions to be registered to a devlink port. The same netlink API is used, but the port index is provided to indicate when a region is a port region as opposed to a device region. Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 3122433eb533aac7d08302ee4b3bd3adfcd280d3 Author: Andrew Lunn Date: Sun Oct 4 18:12:53 2020 +0200 net: dsa: Register devlink ports before calling DSA driver setup() DSA drivers want to create regions on devlink ports as well as the devlink device instance, in order to export registers and other tables per port. To keep all this code together in the drivers, have the devlink ports registered early, so the setup() method can setup both device and port devlink regions. v3: Remove dp->setup Move common code out of switch statement. Fix wrong goto Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Signed-off-by: David S. Miller commit f15ec13a9630f0c2297ff94f9fd588d2525fc020 Author: Andrew Lunn Date: Sun Oct 4 18:12:52 2020 +0200 net: dsa: Make use of devlink port flavour unused If a port is unused, still create a devlink port for it, but set the flavour to unused. This allows us to attach devlink regions to the port, etc. Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit cf1166349c68816f4259d32559f54972b0d5c1a4 Author: Andrew Lunn Date: Sun Oct 4 18:12:51 2020 +0200 net: devlink: Add unused port flavour Not all ports of a switch need to be used, particularly in embedded systems. Add a port flavour for ports which physically exist in the switch, but are not connected to the front panel etc, and so are unused. By having unused ports present in devlink, it gives a more accurate representation of the hardware. It also allows regions to be associated to such ports, so allowing, for example, to determine unused ports are correctly powered off, or to compare probable reset defaults of unused ports to used ports experiences issues. Actually registering unused ports and setting the flavour to unused is optional. The DSA core will register all such switch ports, but such ports are expected to be limited in number. Bigger ASICs may decide not to list unused ports. v2: Expand the description about why it is useful Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 321e921daa05dc32a1a89ae458169d7ef783cc84 Merge: 456afe01b1008 10fdd6d80e4c2 Author: David S. Miller Date: Sun Oct 4 14:35:53 2020 -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 patchset contains Netfilter updates for net-next: 1) Rename 'searched' column to 'clashres' in conntrack /proc/ stats to amend a recent patch, from Florian Westphal. 2) Remove unused nft_data_debug(), from YueHaibing. 3) Remove unused definitions in IPVS, also from YueHaibing. 4) Fix user data memleak in tables and objects, this is also amending a recent patch, from Jose M. Guisado. 5) Use nla_memdup() to allocate user data in table and objects, also from Jose M. Guisado 6) User data support for chains, from Jose M. Guisado 7) Remove unused definition in nf_tables_offload, from YueHaibing. 8) Use kvzalloc() in ip_set_alloc(), from Vasily Averin. 9) Fix false positive reported by lockdep in nfnetlink mutexes, from Florian Westphal. 10) Extend fast variant of cmp for neq operation, from Phil Sutter. 11) Implement fast bitwise variant, also from Phil Sutter. ==================== Signed-off-by: David S. Miller commit 7b9be800756f60bf5bb7baf39c7d221ecb877863 Author: Jarkko Sakkinen Date: Sat Sep 19 02:41:19 2020 +0300 MAINTAINERS: TPM DEVICE DRIVER: Update GIT Update Git URL to git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git Signed-off-by: Jarkko Sakkinen commit 10fdd6d80e4c21ad48f3860d723f5b3b5965477b Author: Phil Sutter Date: Thu Oct 1 18:57:44 2020 +0200 netfilter: nf_tables: Implement fast bitwise expression A typical use of bitwise expression is to mask out parts of an IP address when matching on the network part only. Optimize for this common use with a fast variant for NFT_BITWISE_BOOL-type expressions operating on 32bit-sized values. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 5f48846daf3321f8a1f8aa99cd6173e3980b7a29 Author: Phil Sutter Date: Fri Oct 2 15:50:56 2020 +0200 netfilter: nf_tables: Enable fast nft_cmp for inverted matches Add a boolean indicating NFT_CMP_NEQ. To include it into the match decision, it is sufficient to XOR it with the data comparison's result. While being at it, store the mask that is calculated during expression init and free the eval routine from having to recalculate it each time. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit ab6c41eefd46b92e4f5bcdbbc6c1ea39ed148274 Author: Florian Westphal Date: Fri Oct 2 13:51:29 2020 +0200 netfilter: nfnetlink: place subsys mutexes in distinct lockdep classes From time to time there are lockdep reports similar to this one: WARNING: possible circular locking dependency detected ------------------------------------------------------ 000000004f61aa56 (&table[i].mutex){+.+.}, at: nfnl_lock [nfnetlink] but task is already holding lock: [..] (&net->nft.commit_mutex){+.+.}, at: nf_tables_valid_genid [nf_tables] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&net->nft.commit_mutex){+.+.}: [..] nf_tables_valid_genid+0x18/0x60 [nf_tables] nfnetlink_rcv_batch+0x24c/0x620 [nfnetlink] nfnetlink_rcv+0x110/0x140 [nfnetlink] netlink_unicast+0x12c/0x1e0 [..] sys_sendmsg+0x18/0x40 linux_sparc_syscall+0x34/0x44 -> #0 (&table[i].mutex){+.+.}: [..] nfnl_lock+0x24/0x40 [nfnetlink] ip_set_nfnl_get_byindex+0x19c/0x280 [ip_set] set_match_v1_checkentry+0x14/0xc0 [xt_set] xt_check_match+0x238/0x260 [x_tables] __nft_match_init+0x160/0x180 [nft_compat] [..] sys_sendmsg+0x18/0x40 linux_sparc_syscall+0x34/0x44 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&net->nft.commit_mutex); lock(&table[i].mutex); lock(&net->nft.commit_mutex); lock(&table[i].mutex); Lockdep considers this an ABBA deadlock because the different nfnl subsys mutexes reside in the same lockdep class, but this is a false positive. CPU1 table[i] refers to the nftables subsys mutex, whereas CPU1 locks the ipset subsys mutex. Yi Che reported a similar lockdep splat, this time between ipset and ctnetlink subsys mutexes. Time to place them in distinct classes to avoid these warnings. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 9446ab34ace256e5e470c5aa221d46e544ad895e Author: Vasily Averin Date: Fri Sep 25 11:56:02 2020 +0300 netfilter: ipset: enable memory accounting for ipset allocations Currently netadmin inside non-trusted container can quickly allocate whole node's memory via request of huge ipset hashtable. Other ipset-related memory allocations should be restricted too. v2: fixed typo ALLOC -> ACCOUNT Signed-off-by: Vasily Averin Signed-off-by: Pablo Neira Ayuso commit 82ec6630f9fcd129ebd839a6c862d0dbffe9eafc Author: YueHaibing Date: Fri Sep 18 21:17:29 2020 +0800 netfilter: nf_tables_offload: Remove unused macro FLOW_SETUP_BLOCK commit 9a32669fecfb ("netfilter: nf_tables_offload: support indr block call") left behind this. Signed-off-by: YueHaibing Signed-off-by: Pablo Neira Ayuso commit e8d444d3e98c255f91d228984abc46cfdfaf48b4 Author: Christoph Hellwig Date: Mon Sep 7 07:58:25 2020 +0200 riscv: remove address space overrides using set_fs() Stop providing the possibility to override the address space using set_fs() now that there is no need for that any more. Signed-off-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit d464118cdc4156c3f356507ea0f5ea0dc5be6c3d Author: Christoph Hellwig Date: Mon Sep 7 07:58:24 2020 +0200 riscv: implement __get_kernel_nofault and __put_user_nofault Implement the non-faulting kernel access helpers directly instead of abusing the uaccess routines under set_fs(KERNEL_DS). Signed-off-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit f289a34811d8fff29f304e14f7edd4576ed9b598 Author: Christoph Hellwig Date: Mon Sep 7 07:58:23 2020 +0200 riscv: refactor __get_user and __put_user Add new __get_user_nocheck and __put_user_nocheck that switch on the size and call the actual inline assembly helpers, and move the uaccess enable / disable into the actual __get_user and __put_user. This prepares for natively implementing __get_kernel_nofault and __put_kernel_nofault. Also don't bother with the deprecated register keyword for the error return. Signed-off-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit 11129e8ed4d91a062c5062d80f476adc7fbedbac Author: Christoph Hellwig Date: Mon Sep 7 07:58:22 2020 +0200 riscv: use memcpy based uaccess for nommu again This reverts commit adccfb1a805ea84d2db38eb53032533279bdaa97. Now that the generic uaccess by mempcy code handles unaligned addresses the generic code can be used for all RISC-V CPUs. Signed-off-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit 3c57fa13f6bf3906643034c57736c778ce63fa55 Author: Christoph Hellwig Date: Mon Sep 7 07:58:21 2020 +0200 asm-generic: make the set_fs implementation optional Put all the set_fs related code under CONFIG_SET_FS so that asm-generic/uaccess.h can be used for set_fs-less builds. Signed-off-by: Christoph Hellwig Acked-by: Arnd Bergmann Signed-off-by: Palmer Dabbelt commit 2d2d255467d4ea927fbf606c8b584512edee0f7b Author: Christoph Hellwig Date: Mon Sep 7 07:58:20 2020 +0200 asm-generic: add nommu implementations of __{get,put}_kernel_nofault Add native implementations of __{get,put}_kernel_nofault using {get,put}_unaligned, just like the {get,put}_user implementations. Signed-off-by: Christoph Hellwig Acked-by: Arnd Bergmann Signed-off-by: Palmer Dabbelt commit 931de11f5a374748f1d620ee17810dedf13c9f69 Author: Christoph Hellwig Date: Mon Sep 7 07:58:19 2020 +0200 asm-generic: improve the nommu {get,put}_user handling Instead of reusing raw_{copy,to}_from_user implement separate handlers using {get,put}_unaligned. This ensures unaligned access is handled correctly, and avoid the need for the small constant size optimization in raw_{copy,to}_from_user. Signed-off-by: Christoph Hellwig Acked-by: Arnd Bergmann Signed-off-by: Palmer Dabbelt commit 24ce66c04a06a678f156cf575128246f3d214b4a Author: Christoph Hellwig Date: Mon Sep 7 07:58:18 2020 +0200 uaccess: provide a generic TASK_SIZE_MAX definition Define TASK_SIZE_MAX as TASK_SIZE if not otherwise defined. Signed-off-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt commit eee4e23099c37b4e273c583ec8bb0415ad7eba32 Merge: de22d2107ced3 5ae4998b5d6fc Author: Palmer Dabbelt Date: Sun Oct 4 10:14:53 2020 -0700 Merge branch 'base.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs into for-next This is a dependency for Christoph's removal of set_fs. * 'base.set_fs' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/viro/vfs: powerpc: remove address space overrides using set_fs() powerpc: use non-set_fs based maccess routines x86: remove address space overrides using set_fs() x86: make TASK_SIZE_MAX usable from assembly code x86: move PAGE_OFFSET, TASK_SIZE & friends to page_{32,64}_types.h lkdtm: remove set_fs-based tests test_bitmap: remove user bitmap tests uaccess: add infrastructure for kernel builds with set_fs() fs: don't allow splice read/write without explicit ops fs: don't allow kernel reads and writes without iter ops sysctl: Convert to iter interfaces proc: add a read_iter method to proc proc_ops proc: cleanup the compat vs no compat file ops proc: remove a level of indentation in proc_get_inode commit 0cef13d883e4644b4cf9b521d3f3e45355e60566 Author: Mauro Carvalho Chehab Date: Sun Oct 4 17:45:22 2020 +0200 media: zoran.rst: place it at the right place this time I was too quick moving zoran.rst... it ends that the original patch didn't do the right thing and forgot to update the files that references it. Fix it. Fixes: 6b90346919d4 ("media: zoran: move documentation file to the right place") Signed-off-by: Mauro Carvalho Chehab commit 0ffd21d5985506d164ada9e8fff6daae8ef469a1 Author: Serge Semin Date: Sun Sep 20 14:09:23 2020 +0300 hwmon: (bt1-pvt) Wait for the completion with timeout If the PVT sensor is suddenly powered down while a caller is waiting for the conversion completion, the request won't be finished and the task will hang up on this procedure until the power is back up again. Let's call the wait_for_completion_timeout() method instead to prevent that. The cached timeout is exactly what we need to predict for how long conversion could normally last. Fixes: 87976ce2825d ("hwmon: Add Baikal-T1 PVT sensor driver") Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920110924.19741-4-Sergey.Semin@baikalelectronics.ru Signed-off-by: Guenter Roeck commit 0015503e5f6357f286bef34d039e43359fa4efd4 Author: Serge Semin Date: Sun Sep 20 14:09:22 2020 +0300 hwmon: (bt1-pvt) Cache current update timeout Instead of converting the update timeout data to the milliseconds each time on the read procedure let's preserve the currently set timeout in the dedicated driver private data cache. The cached value will be then used in the timeout read method and in the alarm-less data conversion to prevent the caller task hanging up in case if the PVT sensor is suddenly powered down. Fixes: 87976ce2825d ("hwmon: Add Baikal-T1 PVT sensor driver") Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920110924.19741-3-Sergey.Semin@baikalelectronics.ru Signed-off-by: Guenter Roeck commit a6db1561291fc0f2f9aa23bf38f381adc63e7b14 Author: Serge Semin Date: Sun Sep 20 14:09:21 2020 +0300 hwmon: (bt1-pvt) Test sensor power supply on probe Baikal-T1 PVT sensor has got a dedicated power supply domain (feed up by the external GPVT/VPVT_18 pins). In case if it isn't powered up, the registers will be accessible, but the sensor conversion just won't happen. Due to that an attempt to read data from any PVT sensor will cause the task hanging up. For instance that will happen if XP11 jumper isn't installed on the Baikal-T1-based BFK3.1 board. Let's at least test whether the conversion work on the device probe procedure. By doing so will make sure that the PVT sensor is powered up at least at boot time. Fixes: 87976ce2825d ("hwmon: Add Baikal-T1 PVT sensor driver") Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920110924.19741-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Guenter Roeck commit 707d151bd1ac4062796b95f9f6c32309ce69888c Author: Alban Bedel Date: Thu Oct 1 16:57:38 2020 +0200 hwmon: (lm75) Add regulator support Add regulator support for boards where the sensor first need to be powered up before it can be used. Signed-off-by: Alban Bedel Link: https://lore.kernel.org/r/20201001145738.17326-4-alban.bedel@aerq.com Signed-off-by: Guenter Roeck commit 865e4fc013ba58cc3245fc1180033ee52e9c426e Author: Xu Yilun Date: Mon Sep 21 14:17:51 2020 +0800 hwmon: Add hwmon driver for Intel MAX 10 BMC This patch adds hwmon functionality for Intel MAX 10 BMC chip. This BMC chip connects to a set of sensor chips to monitor current, voltage, thermal and power of different components on board. The BMC firmware is responsible for sensor data sampling and recording in shared registers. Host driver reads the sensor data from these shared registers and exposes them to users as hwmon interfaces. Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Signed-off-by: Matthew Gerlach Signed-off-by: Tom Rix Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1600669071-26235-3-git-send-email-yilun.xu@intel.com [groeck: Adjusted subject] Signed-off-by: Guenter Roeck commit 5f977a0630db300e3517e4383db3d74f0c39d6cf Author: Vadim Pasternak Date: Sat Sep 26 23:49:57 2020 +0300 dt-bindings: Add MP2975 voltage regulator device Monolithic Power Systems, Inc. (MPS) dual-loop, digital, multi-phase controller. Signed-off-by: Vadim Pasternak Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200926204957.10268-3-vadimp@nvidia.com Signed-off-by: Guenter Roeck commit 2c6fcbb211494f1ff6ef384776944b9e04f4c14c Author: Vadim Pasternak Date: Sat Sep 26 23:49:56 2020 +0300 hwmon: (pmbus) Add support for MPS Multi-phase mp2975 controller Add support for mp295 device from Monolithic Power Systems, Inc. (MPS) vendor. This is a dual-loop, digital, multi-phase controller. This device: - Supports two power rail. - Provides 8 pulse-width modulations (PWMs), and can be configured up to 8-phase operation for rail 1 and up to 4-phase operation for rail 2. - Supports two pages 0 and 1 for telemetry and also pages 2 and 3 for configuration. - Can configured VOUT readout in direct or VID format and allows setting of different formats on rails 1 and 2. For VID the following protocols are available: VR13 mode with 5-mV DAC; VR13 mode with 10-mV DAC, IMVP9 mode with 5-mV DAC. Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20200926204957.10268-2-vadimp@nvidia.com [groeck: Cleaned up a couple of error returns; fixed up API changes] Signed-off-by: Guenter Roeck commit c073292b166a9a0d4d2df605fcbca1ed887aa307 Author: Wang Qing Date: Sat Sep 26 10:08:33 2020 +0800 hwmon: (tmp513) fix spelling typo in comments Modify the comment typo: "compliment" -> "complement". Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1601086116-32218-1-git-send-email-wangqing@vivo.com Signed-off-by: Guenter Roeck commit 045ad73397e68e6afefe7df0af804df5fc783fcb Author: Naveen Krishna Chatradhi Date: Tue Sep 29 16:23:22 2020 +0530 hwmon: (amd_energy) Update driver documentation Update the documentation with the newly added features * Set the accumulation interval based on resolution Signed-off-by: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20200929105322.8919-5-nchatrad@amd.com Signed-off-by: Guenter Roeck commit b75394c19d0127ee8aab03c5eff7efb253de4199 Author: Naveen Krishna Chatradhi Date: Tue Sep 29 16:23:21 2020 +0530 hwmon: (amd_energy) Improve the accumulation logic Factor out the common code in the accumulation functions for core and socket accumulation. While at it, handle the return value of the amd_create_sensor() function. Signed-off-by: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20200929105322.8919-4-nchatrad@amd.com Signed-off-by: Guenter Roeck commit 463c43fcd97e493d8a17242f4f000c86fe642ed6 Merge: 7c9df3ec493e3 a1b8638ba1320 Author: Mauro Carvalho Chehab Date: Sun Oct 4 12:19:12 2020 +0200 Merge tag 'v5.9-rc7' into patchwork Linux 5.9-rc7 * tag 'v5.9-rc7': (683 commits) Linux 5.9-rc7 mm/thp: Split huge pmds/puds if they're pinned when fork() mm: Do early cow for pinned pages during fork() for ptes mm/fork: Pass new vma pointer into copy_page_range() mm: Introduce mm_struct.has_pinned mm: validate pmd after splitting mm: don't rely on system state to detect hot-plug operations mm: replace memmap_context by meminit_context arch/x86/lib/usercopy_64.c: fix __copy_user_flushcache() cache writeback lib/memregion.c: include memregion.h lib/string.c: implement stpcpy mm/migrate: correct thp migration stats mm/gup: fix gup_fast with dynamic page table folding mm: memcontrol: fix missing suffix of workingset_restore mm, THP, swap: fix allocating cluster for swapfile by mistake mm: slab: fix potential double free in ___cache_free Documentation/llvm: Fix clang target examples io_uring: ensure async buffered read-retry is setup properly KVM: SVM: Add a dedicated INVD intercept routine io_uring: don't unconditionally set plug->nowait = true ... commit 456afe01b10085518406022c69cfd2b718d6eaf8 Author: Matthieu Baerts Date: Sat Oct 3 17:36:56 2020 +0200 mptcp: ADD_ADDRs with echo bit are smaller The MPTCP ADD_ADDR suboption with echo-flag=1 has no HMAC, the size is smaller than the one initially sent without echo-flag=1. We then need to use the correct size everywhere when we need this echo bit. Before this patch, the wrong size was reserved but the correct amount of bytes were written (and read): the remaining bytes contained garbage. Fixes: 6a6c05a8b016 ("mptcp: send out ADD_ADDR with echo flag") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/95 Reported-and-tested-by: Davide Caratti Acked-by: Geliang Tang Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 3a56268ef6ee7c065520e1d73c58dbd2c2c5f3c2 Author: Kurt Kanzenbach Date: Sat Oct 3 11:30:51 2020 +0200 dt-bindings: net: dsa: b53: Fix full duplex in example There is no such property as duplex-full. It's called full-duplex. Leading to reduced speed when using the example as base for a real device tree. Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 536a82ad167b0fe156bcf82de5055af6f26d22e5 Author: Kurt Kanzenbach Date: Sat Oct 3 11:30:50 2020 +0200 dt-bindings: net: dsa: b53: Specify unit address in hex The unit address should be 1e, because the unit address is supposed to be in hexadecimal. Suggested-by: Florian Fainelli Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 2b7fea0d20cec20f17f9bbcc30fca64146f2bbd1 Author: Vladimir Oltean Date: Sat Oct 3 11:18:36 2020 +0300 net: dsa: sja1105: remove duplicate prefix for VL Lookup dynamic config This is a strictly cosmetic change that renames some macros in sja1105_dynamic_config.c. They were copy-pasted in haste and this has resulted in them having the driver prefix twice. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 93e6664e6621f1ebff0cdf94bc2b11fc7180a634 Author: Gustavo A. R. Silva Date: Fri Oct 2 18:26:11 2020 -0500 bnx2x: Use fallthrough pseudo-keyword Replace /* no break */ comments with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 401d8ce4ae07e32c46ca6cc2adbd9fced452ec93 Author: Gustavo A. R. Silva Date: Fri Oct 2 18:02:59 2020 -0500 net: ksz884x: Use fallthrough pseudo-keyword Replace /* Fallthrough... */ comment with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit e55e66e8ae84ee23863af046318c463516042bba Author: Gustavo A. R. Silva Date: Fri Oct 2 18:00:01 2020 -0500 net: bna: Use fallthrough pseudo-keyword Replace /* !!! fall through !!! */ comments with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 1a10d0bc906d3997b46d6ab22ce2e3e20624b405 Author: Gustavo A. R. Silva Date: Fri Oct 2 17:53:15 2020 -0500 usbnet: Use fallthrough pseudo-keyword Replace // FALLTHROUGH comment with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit ef743c0990337f3ed2648b6c6847eddc593241db Merge: e275d49a69c0b a45294af9e96a Author: David S. Miller Date: Sat Oct 3 17:28:45 2020 -0700 Merge branch 'net-sched-Add-actions-for-MPLS-L2-VPNs' Guillaume Nault says: ==================== net/sched: Add actions for MPLS L2 VPNs This patch series adds the necessary TC actions for supporting layer 2 MPLS VPNs (VPLS). The objective is to give the possibility to add an MPLS header right before an skb's mac header, then to prepend this MPLS packet with a new Ethernet header with the MAC address of the next hop. Patch 1 implements the actions for adding and removing the external Ethernet header. Patch 2 adds the possibility to push an MPLS header before the mac header. Most of the code already exists as these operations were first implemented in openvswitch. Practical example, with encap on Host-A and decap on Host-B: Host-A# tc filter add dev ethAx ingress matchall \ action mpls mac_push label 20 \ action vlan push_eth dst_mac 02:00:00:00:00:02 \ src_mac 02:00:00:00:00:01 \ action mirred egress redirect dev ethAy Host-B# tc filter add dev ethBx ingress protocol mpls_uc \ flower mpls_label 20 mpls_bos 1 \ action vlan pop_eth \ action mpls pop proto teb \ action mirred egress redirect dev ethBy ==================== Signed-off-by: David S. Miller commit a45294af9e96a3e060b6272fa7cd2c4b196de335 Author: Guillaume Nault Date: Sat Oct 3 00:44:31 2020 +0200 net/sched: act_mpls: Add action to push MPLS LSE before Ethernet header Define the MAC_PUSH action which pushes an MPLS LSE before the mac header (instead of between the mac and the network headers as the plain PUSH action does). The only special case is when the skb has an offloaded VLAN. In that case, it has to be inlined before pushing the MPLS header. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit 19fbcb36a39eefbe8912a13ccc02e937b1c418d6 Author: Guillaume Nault Date: Sat Oct 3 00:44:28 2020 +0200 net/sched: act_vlan: Add {POP,PUSH}_ETH actions Implement TCA_VLAN_ACT_POP_ETH and TCA_VLAN_ACT_PUSH_ETH, to respectively pop and push a base Ethernet header at the beginning of a frame. POP_ETH is just a matter of pulling ETH_HLEN bytes. VLAN tags, if any, must be stripped before calling POP_ETH. PUSH_ETH is restricted to skbs with no mac_header, and only the MAC addresses can be configured. The Ethertype is automatically set from skb->protocol. These restrictions ensure that all skb's fields remain consistent, so that this action can't confuse other part of the networking stack (like GSO). Since openvswitch already had these actions, consolidate the code in skbuff.c (like for vlan and mpls push/pop). Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit e275d49a69c0b8326a16a6e6c8f6d3c672114447 Author: Colin Ian King Date: Fri Oct 2 17:54:22 2020 +0100 net: phy: dp83869: fix unsigned comparisons against less than zero values Currently the comparisons of u16 integers value and sopass_val with less than zero for error checking is always false because the values are unsigned. Fix this by making these variables int. This does not affect the shift and mask operations performed on these variables Addresses-Coverity: ("Unsigned compared against zero") Fixes: 49fc23018ec6 ("net: phy: dp83869: support Wake on LAN") Signed-off-by: Colin Ian King Acked-by: Dan Murphy Signed-off-by: David S. Miller commit fd6ebb6fb2cf30eb03fbb8949e367832cbb82fec Author: Karsten Graul Date: Fri Oct 2 17:09:27 2020 +0200 net/smc: use an array to check fields in system EID The check for old hardware versions that did not have SMCDv2 support was using suspicious pointer magic. Address the fields using an array. Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 839d696ffb2714c06da7f55f622d0ac8286524b5 Author: Karsten Graul Date: Fri Oct 2 17:09:26 2020 +0200 net/smc: send ISM devices with unique chid in CLC proposal When building a CLC proposal message then the list of ISM devices does not need to contain multiple devices that have the same chid value, all these devices use the same function at the end. Improve smc_find_ism_v2_device_clnt() to collect only ISM devices that have unique chid values. Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 6a0c00e5d2b1d5a45d6c8f2b87d81ebf8df12d82 Merge: 9cd8b6c905293 e69eb0824d8cf Author: David S. Miller Date: Sat Oct 3 17:02:42 2020 -0700 Merge branch 'Add-Seville-Ethernet-switch-to-T1040RDB' Vladimir Oltean says: =================== Add Seville Ethernet switch to T1040RDB Seville is a DSA switch that is embedded inside the T1040 SoC, and supported by the mscc_seville DSA driver inside drivers/net/dsa/ocelot. This series adds this switch to the SoC's dtsi files and to the T1040RDB board file. I would like to send this series through net-next. There is no conflict with other patches submitted to T1040 device tree. Maybe this could at least get an ACK from devicetree maintainers. =================== Signed-off-by: David S. Miller commit e69eb0824d8cf24e38e85140ee937ec20fbfee3e Author: Vladimir Oltean Date: Fri Oct 2 16:41:06 2020 +0300 powerpc: dts: t1040rdb: add ports for Seville Ethernet switch Define the network interface names for the switch ports and hook them up to the 2 QSGMII PHYs that are onboard. A conscious decision was taken to go along with the numbers that are written on the front panel of the board and not with the hardware numbers of the switch chip ports. Signed-off-by: Vladimir Oltean Reviewed-by: Maxim Kochetkov Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit aa3098676cd05cc6c61abc54cf93f5b1bdccc8f4 Author: Vladimir Oltean Date: Fri Oct 2 16:41:05 2020 +0300 powerpc: dts: t1040: add bindings for Seville Ethernet switch Add the description of the embedded L2 switch inside the SoC dtsi file for NXP T1040. Signed-off-by: Vladimir Oltean Reviewed-by: Maxim Kochetkov Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9cd8b6c90529344694f0d941841c08e2ee5d9a82 Author: Yuchung Cheng Date: Thu Oct 1 14:05:18 2020 -0700 tcp: account total lost packets properly The retransmission refactoring patch 686989700cab ("tcp: simplify tcp_mark_skb_lost") does not properly update the total lost packet counter which may break the policer mode in BBR. This patch fixes it. Fixes: 686989700cab ("tcp: simplify tcp_mark_skb_lost") Reported-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 5069185fc18e810715a91d80fcd075e03add600c Author: Dan Murphy Date: Mon Aug 31 11:48:49 2020 -0500 power: supply: bq25980: Add support for the BQ259xx family Add support for the BQ25980, BQ25975 and BQ25960 family of flash chargers. Signed-off-by: Dan Murphy Signed-off-by: Sebastian Reichel commit 223b32db00a8d68b93985bd212a3bfc48fdb8ac0 Merge: 8e1b3884eed7d a29f245ec97f8 Author: David S. Miller Date: Sat Oct 3 16:51:07 2020 -0700 Merge branch 'net-iucv-next' Julian Wiedmann says: ==================== net/iucv: updates 2020-10-01 Just two (rare) patches, and both deal with smatch warnings. ==================== Signed-off-by: David S. Miller commit a29f245ec97f83f697c7442e0f1222f2ac7c9507 Author: Julian Wiedmann Date: Thu Oct 1 19:21:27 2020 +0200 net/iucv: fix indentation in __iucv_message_receive() smatch complains about net/iucv/iucv.c:1119 __iucv_message_receive() warn: inconsistent indenting While touching this line, also make the return logic consistent and thus get rid of a goto label. Signed-off-by: Julian Wiedmann Reviewed-by: Karsten Graul Signed-off-by: David S. Miller commit 398999bac6ea8842706d613630f907b817f47c6d Author: Julian Wiedmann Date: Thu Oct 1 19:21:26 2020 +0200 net/af_iucv: right-size the uid variable in iucv_sock_bind() smatch complains about net/iucv/af_iucv.c:624 iucv_sock_bind() error: memcpy() 'sa->siucv_user_id' too small (8 vs 9) Which is absolutely correct - the memcpy() takes 9 bytes (sizeof(uid)) from an 8-byte field (sa->siucv_user_id). Luckily the sockaddr_iucv struct contains more data after the .siucv_user_id field, and we checked the size of the passed data earlier on. So the memcpy() won't accidentally read from an invalid location. Fix the warning by reducing the size of the uid variable to what's actually needed, and thus reducing the amount of copied data. Signed-off-by: Julian Wiedmann Reviewed-by: Karsten Graul Signed-off-by: David S. Miller commit 6d3dd362fa0308fc55337623baec2b02f15b76e2 Author: Dan Murphy Date: Mon Aug 31 11:48:48 2020 -0500 dt-binding: bq25980: Add the bq25980 flash charger Add yaml for the bq25980 flash charger. Signed-off-by: Dan Murphy Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 8e1b3884eed7d96d4f1210b668611ee6a1803ea5 Author: Taehee Yoo Date: Thu Oct 1 17:12:50 2020 +0000 net: remove NETDEV_HW_ADDR_T_SLAVE NETDEV_HW_ADDR_T_SLAVE is not used anymore, remove it. Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 304bff2fb8e9ad0047c11ae0ef2ca6c3d74cd52b Author: Colin Ian King Date: Wed Sep 2 11:16:56 2020 +0100 power: supply: fix spelling mistake "unprecise" -> "imprecise" There is a spelling mistake in a dev_info message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel commit c07fa6c1631333f02750cf59f22b615d768b4d8f Author: Xiongfeng Wang Date: Fri Sep 4 14:09:58 2020 +0800 power: supply: test_power: add missing newlines when printing parameters by sysfs When I cat some module parameters by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cd /sys/module/test_power/parameters/ root@syzkaller:/sys/module/test_power/parameters# cat ac_online onroot@syzkaller:/sys/module/test_power/parameters# cat battery_present trueroot@syzkaller:/sys/module/test_power/parameters# cat battery_health goodroot@syzkaller:/sys/module/test_power/parameters# cat battery_status dischargingroot@syzkaller:/sys/module/test_power/parameters# cat battery_technology LIONroot@syzkaller:/sys/module/test_power/parameters# cat usb_online onroot@syzkaller:/sys/module/test_power/parameters# Signed-off-by: Xiongfeng Wang Signed-off-by: Sebastian Reichel commit 186e26eb139a601359a7dcf722d6a39c683824cc Merge: 678cdd4967081 e992a6eda9a1e Author: David S. Miller Date: Sat Oct 3 14:18:29 2020 -0700 Merge branch 'genetlink-per-op-policy-export' Johannes Berg says: ==================== genetlink per-op policy export Here's a respin, now including Jakub's patch last so that it will do the right thing from the start. The first patch remains the same, of course; the others have mostly some rebasing going on, except for the actual export patch (patch 4) which is adjusted per Jakub's review comments about exporting the policy only if it's actually used for do/dump. To see that, the dump for "nlctrl" (i.e. the generic netlink control) is instructive, because the ops are this: { .cmd = CTRL_CMD_GETFAMILY, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .policy = ctrl_policy_family, .maxattr = ARRAY_SIZE(ctrl_policy_family) - 1, .doit = ctrl_getfamily, .dumpit = ctrl_dumpfamily, }, { .cmd = CTRL_CMD_GETPOLICY, .policy = ctrl_policy_policy, .maxattr = ARRAY_SIZE(ctrl_policy_policy) - 1, .start = ctrl_dumppolicy_start, .dumpit = ctrl_dumppolicy, .done = ctrl_dumppolicy_done, }, So we exercise both "don't have doit" and "GENL_DONT_VALIDATE_DUMP" parts, and get (with the current genl patch): $ genl ctrl policy name nlctrl ID: 0x10 op 3 policies: do=0 ID: 0x10 op 10 policies: dump=1 ID: 0x10 policy[0]:attr[1]: type=U16 range:[0,65535] ID: 0x10 policy[0]:attr[2]: type=NUL_STRING max len:15 ID: 0x10 policy[1]:attr[1]: type=U16 range:[0,65535] ID: 0x10 policy[1]:attr[2]: type=NUL_STRING max len:15 ID: 0x10 policy[1]:attr[10]: type=U32 range:[0,4294967295] ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit e992a6eda9a1eeeab73a8d2792464e4a2b1ebc3b Author: Jakub Kicinski Date: Sat Oct 3 10:44:46 2020 +0200 genetlink: allow dumping command-specific policy Right now CTRL_CMD_GETPOLICY can only dump the family-wide policy. Support dumping policy of a specific op. v3: - rebase after per-op policy export and handle that v2: - make cmd U32, just in case. v1: - don't echo op in the output in a naive way, this should make it cleaner to extend the output format for dumping policies for all the commands at once in the future. Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20201001225933.1373426-11-kuba@kernel.org Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 50a896cf2d6f34e884a00139d6e6012c9833ace3 Author: Johannes Berg Date: Sat Oct 3 10:44:45 2020 +0200 genetlink: properly support per-op policy dumping Add support for per-op policy dumping. The data is pretty much as before, except that now the assumption that the policy with index 0 is "the" policy no longer holds - you now need to look at the new CTRL_ATTR_OP_POLICY attribute which is a nested attr (indexed by op) containing attributes for do and dump policies. When a single op is requested, the CTRL_ATTR_OP_POLICY will be added in the same way, since do and dump policies may differ. v2: - conditionally advertise per-command policies only if there actually is a policy being used for the do/dump and it's present at all Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit aa85ee5f9585434b12380efcd1d0353ecc86af26 Author: Johannes Berg Date: Sat Oct 3 10:44:44 2020 +0200 genetlink: factor skb preparation out of ctrl_dumppolicy() We'll need this later for the per-op policy index dump. Reviewed-by: Jakub Kicinski Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 04a351a62bd4be1dbcc88fae69b990362d88ffe5 Author: Johannes Berg Date: Sat Oct 3 10:44:43 2020 +0200 netlink: rework policy dump to support multiple policies Rework the policy dump code a bit to support adding multiple policies to a single dump, in order to e.g. support per-op policies in generic netlink. v2: - move kernel-doc to implementation [Jakub] - squash the first patch to not flip-flop on the prototype [Jakub] - merge netlink_policy_dump_get_policy_idx() with the old get_policy_idx() we already had - rebase without Jakub's patch to have per-op dump Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 899b07c5787fbc6d2be51d0ea31721c8c2165458 Author: Johannes Berg Date: Sat Oct 3 10:44:42 2020 +0200 netlink: compare policy more accurately The maxtype is really an integral part of the policy, and while we haven't gotten into a situation yet where this happens, it seems that some developer might eventually have two places pointing to identical policies, with different maxattr to exclude some attrs in one of the places. Even if not, it's really the right thing to compare both since the two data items fundamentally belong together. v2: - also do the proper comparison in get_policy_idx() Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 098bfcec1bfc9c1f063b3702b1c209e15c603c76 Merge: e916bfacf558e c29900d50f444 Author: Olof Johansson Date: Sat Oct 3 13:21:24 2020 -0700 Merge tag 'visconti-initial-for-5.10-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti into arm/dt Visconti5 SoC changes for v5.10 (take two) - Add dt-bindings for Toshiba Visconti ARM SoCs - Add dt-bindings for the TMPV7708 RM main board - Add initial support for Toshiba Visconti platform - Add device tree for TMPV7708 RM main board - Add information for Toshiba Visconti ARM SoCs to MAINTAINERS - Enable configs for Toshiba Visconti to arm64's defconfig * tag 'visconti-initial-for-5.10-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti: arm64: defconfig: Enable configs for Toshiba Visconti MAINTAINERS: Add information for Toshiba Visconti ARM SoCs arm64: dts: visconti: Add device tree for TMPV7708 RM main board arm64: visconti: Add initial support for Toshiba Visconti platform dt-bindings: arm: toshiba: Add the TMPV7708 RM main board dt-bindings: arm: toshiba: add Toshiba Visconti ARM SoCs Link: https://lore.kernel.org/r/20200923085236.4hu53gmnnmqkttuy@toshiba.co.jp Signed-off-by: Olof Johansson commit 4550e2c8d3e03ddffdcbfeeecc63e7c68dbec296 Merge: 017fc1516eb00 e38175f6e1174 Author: Olof Johansson Date: Sat Oct 3 13:19:47 2020 -0700 Merge tag 'qcom-arm64-defconfig-for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM64defconfig updates for v5.10 Enable Qualcomm related drivers for Lontium LT9611 HDMI bridge, SNPS high-speed USB PHY, various Interconnect providers, GPU clock controllers for SM8150 and SM8250 and audio driver for MSM8996 and APQ8016. Then enable ACM and FTDI host drivers, which are useful when working with various development boards using ARM64 hosts. * tag 'qcom-arm64-defconfig-for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: enable Qualcomm ASoC modules arm64: defconfig: qcom: enable GPU clock controller for SM8[12]50 arm64: defconfig: enable INTERCONNECT for Qualcomm chipsets arm64: defconfig: Enable Qcom SNPS Femto PHY arm64: defconfig: Enable Lontium LT9611 driver arm64: defcondfig: Enable USB ACM and FTDI drivers Link: https://lore.kernel.org/r/20200924040708.180352-1-bjorn.andersson@linaro.org Signed-off-by: Olof Johansson commit 017fc1516eb00124ce140067ab1ba1275269db9e Merge: e3a2e20297fce c80bcf19e0c56 Author: Olof Johansson Date: Sat Oct 3 13:18:18 2020 -0700 Merge tag 'imx-defconfig-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig i.MX defconfig update for 5.10: - Enable i.MX6SLL, i.MX7ULP SoC and CAAM crypto driver support in multi_v7_defconfig. - Enable the eLCDIF and Raydium RM67191 driver in arm64 defconfig to support MIPI DSI on imx8mq-evk. - Enable NWL DSI host controller, dphy and SITRONIX ST7703 panel driver in arm64 defconfig to support display on imx8mq-librem5-devkit. - Enable sl28cpld board management controller driver support in arm64 defconfig. - Enable i.MX8M SoCs support in imx_v6_v7_defconfig as they can run in AArch32 mode. * tag 'imx-defconfig-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: defconfig: enable the sl28cpld board management controller arm64: defconfig: Enable the eLCDIF and Raydium RM67191 drivers arm64: defconfig: Enable imx8mq-librem5-devkit display stack arm64: defconfig: re-sync DRM related defconfig bits ARM: imx_v6_v7_defconfig: Support i.MX8MN/P/Q ARM: multi_v7_defconfig: Enable i.MX7ULP SoC ARM: multi_v7_defconfig: Enable i.MX6SLL SoC ARM: multi_v7_defconfig: enable caam crypto module Link: https://lore.kernel.org/r/20200923073009.23678-6-shawnguo@kernel.org Signed-off-by: Olof Johansson commit f87d092fe4d45ec36e88778c5836b1c3db80fc8c Author: Krzysztof Kozlowski Date: Fri Sep 11 18:27:29 2020 +0200 power: supply: pm2301: drop duplicated i2c_device_id The driver defines two of 'struct i2c_device_id' but uses only one: drivers/power/supply/pm2301_charger.c:107:35: warning: 'pm2xxx_ident' defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit c22b90db54513ec240e892fd82c4b98f5e5a7d2e Author: Krzysztof Kozlowski Date: Fri Sep 11 18:27:28 2020 +0200 power: supply: charger-manager: drop unused charger assignment The 'charger' variable in error path is assigned but never used: drivers/power/supply/charger-manager.c: In function 'charger_manager_probe': drivers/power/supply/charger-manager.c:1626:29: warning: variable 'charger' set but not used [-Wunused-but-set-variable] Fixes: c1f73028f75d ("power: supply: charger-manager: Update extcon functions") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 5bcb3dae01da624e353ba3acdcd045a2fe540675 Author: Krzysztof Kozlowski Date: Fri Sep 11 18:27:27 2020 +0200 power: supply: rt9455: skip 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, the struct acpi_device_id becomes unused: drivers/power/supply/rt9455_charger.c:1734:36: warning: 'rt9455_i2c_acpi_match' defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 439cd7eddc77638eda29874ec84c8fafb69e1fde Author: Krzysztof Kozlowski Date: Fri Sep 11 18:27:26 2020 +0200 power: supply: goldfish: skip 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, the struct acpi_device_id becomes unused: drivers/power/supply/goldfish_battery.c:269:36: warning: 'goldfish_battery_acpi_match' defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 02067dc96c6098b5489636ccf54db1c81d9bada9 Author: Krzysztof Kozlowski Date: Fri Sep 11 18:27:25 2020 +0200 power: supply: bq25890: skip 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, the struct acpi_device_id becomes unused: drivers/power/supply/bq25890_charger.c:1076:36: warning: 'bq25890_acpi_match' defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 66ac8df5e0fd6cad6821e0cbd4bc172afdd784f7 Author: Krzysztof Kozlowski Date: Fri Sep 11 18:27:24 2020 +0200 power: supply: bq2515x: fix kerneldoc Fix kerneldoc W=1 warning: drivers/power/supply/bq2515x_charger.c:189: warning: Function parameter or member 'init_data' not described in 'bq2515x_device' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 7da9f17fc2b9a3493c6fd55e96521485035bc670 Author: Krzysztof Kozlowski Date: Fri Sep 11 18:27:23 2020 +0200 power: supply: bq24257: skip 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, the struct acpi_device_id becomes unused: drivers/power/supply/bq24257_charger.c:1155:36: warning: 'bq24257_acpi_match' defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit accdab6d9e8f715068d91ee0ca0424a6999f0d19 Merge: a4f07008bf45c fb956b3e20f0b Author: Olof Johansson Date: Sat Oct 3 13:16:48 2020 -0700 Merge tag 'imx-soc-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC update for 5.10: - A series from Fabio Estevam to remove legacy non-DT i.MX platforms support and related board files. This is a natural move, as the platforms had been converted to DT for years, and we have not seen any users around these legacy non-DT support for a while. - Enable cpufreq support for i.MX7ULP platform. * tag 'imx-soc-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (26 commits) clk: imx: imx35: Remove mx35_clocks_init() clk: imx: imx31: Remove mx31_clocks_init() clk: imx: imx27: Remove mx27_clocks_init() ARM: imx: Remove unused definitions ARM: imx35: Retrieve the IIM base address from devicetree ARM: imx3: Retrieve the AVIC base address from devicetree ARM: imx3: Retrieve the CCM base address from devicetree ARM: imx31: Retrieve the IIM base address from devicetree ARM: imx27: Retrieve the CCM base address from devicetree ARM: imx27: Retrieve the SYSCTRL base address from devicetree ARM: imx: Remove remnant board file support pieces ARM: imx: Remove imx device directory ARM: imx: Remove iomux-v3 board code ARM: imx3: Remove imx3 soc_init() ARM: imx31: Remove remaining i.MX31 board code ARM: imx27: Retrieve AVIC base address from devicetree ARM: imx27: Get rid of mm-imx27.c ARM: imx27: Remove iomux-v1 board code ARM: imx27: Remove imx27_soc_init() ARM: imx7ulp: enable cpufreq ... Link: https://lore.kernel.org/r/20200923073009.23678-2-shawnguo@kernel.org Signed-off-by: Olof Johansson commit a4f07008bf45c43e3e02a2e5116d0cbe65fe4b7c Merge: 025565212d39b c5fdb66829d16 Author: Olof Johansson Date: Sat Oct 3 13:15:38 2020 -0700 Merge tag 'hisi-arm-soc-for-5.10' of git://github.com/hisilicon/linux-hisi into arm/soc Hisilicon ARM SoC updates for v5.10 - Add SD5203 SoC support which core is ARM926EJ-S - Add Low-level debugging support for SD5203 * tag 'hisi-arm-soc-for-5.10' of git://github.com/hisilicon/linux-hisi: ARM: debug: add UART early console support for SD5203 ARM: hisi: add support for SD5203 SoC Link: https://lore.kernel.org/r/5F742928.2060202@hisilicon.com Signed-off-by: Olof Johansson commit e3a2e20297fcea9b5f35f8bd88125afb2ba3b806 Merge: b402b4e67c1be 74623757b9823 Author: Olof Johansson Date: Sat Oct 3 13:15:20 2020 -0700 Merge tag 'omap-for-v5.10/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/defconfig Defconfig changes for omaps for v5.10 merge window Enable twl4030_madc as a loadable module as the ADC is used on some devices by the battery charger. And enable more widely used networking options as loadable modules where possible. * tag 'omap-for-v5.10/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap2plus_defconfig: enable generic net options ARM: omap2plus_defconfig: enable twl4030_madc as a loadable module Link: https://lore.kernel.org/r/pull-1601445968-476435@atomide.com-3 Signed-off-by: Olof Johansson commit 025565212d39bca8ddcf3c3907effe863654038f Merge: 1d004afe5fae2 fb2c599f05664 Author: Olof Johansson Date: Sat Oct 3 13:15:03 2020 -0700 Merge tag 'omap-for-v5.10/soc-part2-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc One more SoC change for omaps for v5.10 merge window Remove debugfs dependency for enabling off mode during idle for omap3 by enabling it automatically based on the PMIC configuration. * tag 'omap-for-v5.10/soc-part2-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap3: enable off mode automatically Link: https://lore.kernel.org/r/pull-1601445968-476435@atomide.com Signed-off-by: Olof Johansson commit 1d004afe5fae271a334d3cd199a204740a76d438 Merge: 511bd85485c67 7de3f326dd24b Author: Olof Johansson Date: Sat Oct 3 13:14:13 2020 -0700 Merge tag 'davinci-for-v5.10/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into arm/soc This pull request contains a patch that shifts to using new simplified i2c driver probe method inside mach-davinci (i2c_driver->probe_new()) * tag 'davinci-for-v5.10/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: use simple i2c probe function Link: https://lore.kernel.org/r/83eff002-5247-4fb6-33b4-ce7cec3d2d5c@ti.com Signed-off-by: Olof Johansson commit 7b36c1398fb63f9c38cc83dc75f143d2e5995062 Author: Denis Efremov Date: Mon Sep 21 20:49:20 2020 +0300 coccinelle: misc: add flexible_array.cocci script One-element and zero-length arrays are deprecated [1]. Kernel code should always use "flexible array members" instead, except for existing uapi definitions. The script warns about one-element and zero-length arrays in structs. [1] commit 68e4cd17e218 ("docs: deprecated.rst: Add zero-length and one-element arrays") Cc: Kees Cook Cc: Gustavo A. R. Silva Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 9f7f26930035f557838e215797cb620b563b98ab Merge: 64de2cd335db8 bee1abc9cc021 Author: Olof Johansson Date: Sat Oct 3 13:07:42 2020 -0700 Merge tag 'v5.9-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/drivers cmdq helper: - add new functionality for writing and reading values to and from addresses * tag 'v5.9-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: drm/mediatek: reduce clear event soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api soc: mediatek: cmdq: add jump function soc: mediatek: cmdq: add write_s_mask value function soc: mediatek: cmdq: add write_s value function soc: mediatek: cmdq: add read_s function soc: mediatek: cmdq: add write_s_mask function soc: mediatek: cmdq: add write_s function soc: mediatek: cmdq: add address shift in jump soc: mediatek: mtk-infracfg: Fix kerneldoc Link: https://lore.kernel.org/r/ac672cc9-059c-b768-3a67-1f674d4a2b7a@gmail.com Signed-off-by: Olof Johansson commit 64de2cd335db8b1a7ca9ee9e26fff1038edd9a31 Merge: c8952516e8b4e 94ca85733699e Author: Olof Johansson Date: Sat Oct 3 13:06:16 2020 -0700 Merge tag 'memory-controller-drv-5.10-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.10, part two 1. Add support for MT8167 to Mediatek SMI. 2. Compile test fix (omap-gpmc) and duplicate code (tegra). 3. Simplify code with DEFINE_SHOW_ATTRIBUTE. * tag 'memory-controller-drv-5.10-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: emif: Convert to DEFINE_SHOW_ATTRIBUTE memory: tegra: Convert to DEFINE_SHOW_ATTRIBUTE memory: omap-gpmc: Fix compile test on SPARC memory: mtk-smi: add support for MT8167 dt-bindings: memory: mediatek: Add binding for MT8167 SMI memory: tegra: Delete duplicated argument to '|' in function tegra210_emc_r21021_periodic_compensation Link: https://lore.kernel.org/r/20200925152523.14608-1-krzk@kernel.org Signed-off-by: Olof Johansson commit c8952516e8b4eef1b2831ebaa451c8fd51575d56 Merge: e863e45ef97e2 68a215164e193 Author: Olof Johansson Date: Sat Oct 3 13:02:07 2020 -0700 Merge tag 'reset-for-v5.10' of git://git.pengutronix.de/pza/linux into arm/drivers Reset controller updates for v5.10 This tag allows to build reset-imx7 as a module, and adds support to reset the Cortex-M4 processor on i.MX8MQ to it, adds support for the Versal platform to the reset-zynqmp driver, and fixes some kerneldoc comments in the core and in sti/reset-syscfg. * tag 'reset-for-v5.10' of git://git.pengutronix.de/pza/linux: reset: sti: reset-syscfg: fix struct description warnings reset: imx7: add the cm4 reset for i.MX8MQ dt-bindings: reset: imx8mq: add m4 reset reset: Fix and extend kerneldoc reset: reset-zynqmp: Added support for Versal platform dt-bindings: reset: Updated binding for Versal reset driver reset: imx7: Support module build Link: https://lore.kernel.org/r/2b77c90d2b970eb8fa09000b9ecb564bffa76374.camel@pengutronix.de Signed-off-by: Olof Johansson commit e863e45ef97e28934d2766c9bf8fb4d1f37338d4 Merge: f8e87554b1763 5aabf1180fa9a Author: Olof Johansson Date: Sat Oct 3 13:00:54 2020 -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.10 - misc. pm-domain updates * tag 'amlogic-drivers' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: soc: amlogic: pm-domains: use always-on flag soc: amlogic: meson-ee-pwrc: add support for the Meson AXG SoCs dt-bindings: power: amlogic, meson-ee-pwrc: add Amlogic AXG power controller bindings Link: https://lore.kernel.org/r/7hblhukjzx.fsf@baylibre.com Signed-off-by: Olof Johansson commit f8e87554b1763d50fd19620504a9b166c5f74311 Merge: c78c6e18ab266 2899347249fe7 Author: Olof Johansson Date: Sat Oct 3 12:59:48 2020 -0700 Merge tag 'qcom-drivers-for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers Qualcomm driver updates for v5.10 Replace the busy wait for free tcs slots in the RPMh driver with a sleeping wait and use memory barriers when writing the command registers. Add a bunch of SoC ids to the socinfo driver, fix an erro printin the apr driver and migrate llcc to devm_platform_ioremap_resource_byname(). * tag 'qcom-drivers-for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: llcc: use devm_platform_ioremap_resource_byname() soc: qcom: apr: Fixup the error displayed on lookup failure soc: qcom: socinfo: Add msm8992/4 and apq8094 SoC IDs soc: qcom: rpmh-rsc: Sleep waiting for tcs slots to be free soc: qcom-geni-se: Don't use relaxed writes when writing commands soc: qcom: socinfo: add SC7180 entry to soc_id array soc: qcom: socinfo: add soc id for IPQ6018 Link: https://lore.kernel.org/r/20200924040504.179708-1-bjorn.andersson@linaro.org Signed-off-by: Olof Johansson commit c78c6e18ab266261c9967f8616fa2294b3d81d11 Merge: a39c258cc4763 d97b957e32b1e Author: Olof Johansson Date: Sat Oct 3 12:59:13 2020 -0700 Merge tag 'soc-fsl-next-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/drivers NXP/FSL SoC driver updates for v5.10 Fix various compile warnings and static analysis warnings for: - QBMan driver - DPIO driver - QE driver * tag 'soc-fsl-next-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: qe: Remove unnessesary check in ucc_set_tdm_rxtx_clk soc: fsl: qman: convert to use be32_add_cpu() soc: fsl: dpio: remove set but not used 'addr_cena' soc: fsl: qbman: Fix return value on success soc: fsl: qman: fix -Wpacked-not-aligned warnings Link: https://lore.kernel.org/r/20200923224416.25788-1-leoyang.li@nxp.com Signed-off-by: Olof Johansson commit a39c258cc4763768b02e0166a67b90e3b9f43fc1 Merge: 8fc6726d90209 e2314cf5af30d Author: Olof Johansson Date: Sat Oct 3 12:58:31 2020 -0700 Merge tag 'imx-drivers-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers i.MX drivers update for 5.10: - Use dev_err_probe() to simplify error handling for i.MX GPCv2 driver. - Add a check in i.MX SCU power domain driver to ignore the power domains that are not owned by the current partition. * tag 'imx-drivers-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: firmware: imx: scu-pd: ignore power domain not owned soc: imx: gpcv2: Use dev_err_probe() to simplify error handling Link: https://lore.kernel.org/r/20200923073009.23678-1-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 8fc6726d90209ff3167a86b7cfdc6970387c8342 Merge: aa78dd167e111 1893a2d5264e2 Author: Olof Johansson Date: Sat Oct 3 12:58:15 2020 -0700 Merge tag 'sunxi-drivers-for-5.10-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/drivers One small style fix for the Allwinner SRAM driver * tag 'sunxi-drivers-for-5.10-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: soc: sunxi: sram: remove unneeded semicolon Link: https://lore.kernel.org/r/175d36ad-bc98-4d5d-b035-ce467e932248.lettre@localhost Signed-off-by: Olof Johansson commit e916bfacf558ee835c480d2c2dad9d144baf9e1c Author: Andre Przywara Date: Mon Sep 7 13:18:27 2020 +0100 ARM: dts: nspire: Fix SP804 users Even though the SP804 binding allows to specify only one clock, the primecell driver requires a named clock to activate the bus clock. Specify the one clock three times and provide some clock-names, to make the DT match the SP804 and primecell binding. Link: https://lore.kernel.org/r/20200907121831.242281-3-andre.przywara@arm.com Signed-off-by: Andre Przywara Signed-off-by: Olof Johansson commit c9794866ac30d9440b327e96b4ecc97d8f0055f6 Author: Andre Przywara Date: Mon Sep 7 13:18:28 2020 +0100 arm64: dts: lg: Fix SP804 users Even though the SP804 binding allows to specify only one clock, the primecell driver requires a named clock to activate the bus clock. Specify the one clock three times and provide some clock-names, to make the DT match the SP804 and primecell binding. Also add the missing arm,primecell compatible string. Link: https://lore.kernel.org/r/20200907121831.242281-4-andre.przywara@arm.com Signed-off-by: Andre Przywara Signed-off-by: Olof Johansson commit fc772314a3683ab3f19aa68a660a0f70a8e836a4 Author: Andre Przywara Date: Mon Sep 7 13:18:30 2020 +0100 arm64: dts: lg: Fix SP805 clocks The SP805 DT binding requires two clocks to be specified, but the two LG platform DTs currently only specify one clock. In practice, Linux would pick a clock named "apb_pclk" for the bus clock, and the Linux (and U-Boot) SP805 driver would use the first clock to derive the actual watchdog counter frequency. Since currently both are the very same clock, we can just double the clock reference, and add the correct clock-names, to match the binding. Link: https://lore.kernel.org/r/20200907121831.242281-6-andre.przywara@arm.com Signed-off-by: Andre Przywara Acked-by: Chanho Min Signed-off-by: Olof Johansson commit f6320e326f401e077bf7a042db0740c441ca0c8e Author: Daniel Palmer Date: Fri Oct 2 22:34:18 2020 +0900 ARM: mstar: Fix up the fallout from moving the dts/dtsi files Since the dtsi/dts files have been moved some includes are now broken so this fixes up the includes so the dtbs build again. Link: https://lore.kernel.org/r/20201002133418.2250277-6-daniel@0x0f.com Signed-off-by: Daniel Palmer Signed-off-by: Olof Johansson commit f1ef5b78a76224ee741925abad0a4b3af482d57f Author: Daniel Palmer Date: Fri Oct 2 22:34:17 2020 +0900 ARM: mstar: Add mstar prefix to all of the dtsi/dts files Based on Arnd's comment[0] all of the MStar dtsi/dts files should have had a prefix. This moves the files, fixes the Makefile that generates dtbs and fixes up the MAINTAINERS entry. Fixing up some includes in the files themselves is left for a later commit as rolling it into this commit resulted in a confusing diff. 0 - https://lore.kernel.org/linux-arm-kernel/CAK8P3a0maQhfaerwG4KgFZOrUPwueKOp2+MOeG9C=+8ZNzc2Kg@mail.gmail.com/ Link: https://lore.kernel.org/r/20201002133418.2250277-5-daniel@0x0f.com Signed-off-by: Daniel Palmer Signed-off-by: Olof Johansson commit 0434460442a7f234b99d9361ca397e0bbb48fa60 Author: Daniel Palmer Date: Fri Oct 2 22:34:16 2020 +0900 ARM: mstar: Add interrupt to pm_uart Since we now have support for the interrupt controller pm_uart's interrupt is routed through it make sense to wire up it's interrupt in the device tree. The interrupt is the same for all known chips so it goes in the base dtsi. Link: https://lore.kernel.org/r/20201002133418.2250277-4-daniel@0x0f.com Signed-off-by: Daniel Palmer Signed-off-by: Olof Johansson commit 925595f77f8bcf0159d9ff97141eeb1fed506888 Author: Daniel Palmer Date: Fri Oct 2 22:34:15 2020 +0900 ARM: mstar: Add interrupt controller to base dtsi Add the IRQ and FIQ intc instances to the base MStar/SigmaStar v7 dtsi. All of the known SoCs have both and at the same place with their common IPs using the same interrupt lines. Link: https://lore.kernel.org/r/20201002133418.2250277-3-daniel@0x0f.com Signed-off-by: Daniel Palmer Signed-off-by: Olof Johansson commit 511bd85485c676744a4c3a22f26965926891b131 Author: Daniel Palmer Date: Fri Oct 2 22:34:14 2020 +0900 ARM: mstar: Select MStar intc MediaTek recently introduced support for the MStar interrupt controller that is also present in some of their chips as well as the MStar/Sigmastar chips. Almost all of the peripheral interrupts go through an instance of this controller in MStar/SigmaStar Arm v7 chips so we want to select it if CONFIG_ARCH_MSTARV7 is selected. Link: https://lore.kernel.org/r/20201002133418.2250277-2-daniel@0x0f.com Signed-off-by: Daniel Palmer Signed-off-by: Olof Johansson commit 6869f774b1cd2bf20b4e4c5bfa13da311e02d495 Merge: fbbb7c53bb246 8f04aea048d56 Author: Olof Johansson Date: Sat Oct 3 12:45:11 2020 -0700 Merge tag 'omap-for-v5.9/fixes-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Two regression fixes for omaps Fix AM33XX_IOPAD macro that broke after recent pinctrl changes to use #pinctrl-cells = 2. And fix omap_enter_idle_coupled() for cases where cpu_cluster_pm_enter() returns an error as otherwise we may end up wrongly idling the MPU domain on the next WFI. * tag 'omap-for-v5.9/fixes-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Restore MPU power domain if cpu_cluster_pm_enter() fails ARM: dts: am33xx: modify AM33XX_IOPAD for #pinctrl-cells = 2 Link: https://lore.kernel.org/r/pull-1601544624-617679@atomide.com Signed-off-by: Olof Johansson commit 5c505432deb545580b41fa6d751721f319974f13 Merge: 1ddaaa42ac3b9 a332f5f96b272 Author: Olof Johansson Date: Sat Oct 3 12:44:42 2020 -0700 Merge tag 'hisi-arm32-dt-for-5.10-tag2' of git://github.com/hisilicon/linux-hisi into arm/dt ARM: DT: Hisilicon ARM32 SoCs DT updates for 5.10 (take two) - Fix the system controller compatible for the hi3620 and hip04 SoCs - Add the basic device tree for the hisilicon SD5203 SoC * tag 'hisi-arm32-dt-for-5.10-tag2' of git://github.com/hisilicon/linux-hisi: ARM: dts: hisilicon: add SD5203 dts ARM: dts: hisilicon: fix the system controller compatible nodes Link: https://lore.kernel.org/r/5F742717.5080405@hisilicon.com Signed-off-by: Olof Johansson commit 1ddaaa42ac3b992b0dc56374db657576baeab977 Merge: 02d0bf1ae82ae 5e7998b8017f8 Author: Olof Johansson Date: Sat Oct 3 12:44:07 2020 -0700 Merge tag 'omap-for-v5.10/dt-part2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt More dts changes for omaps for v5.10 merge window Some more dts changes that did not make it to the first set of dts changes: - Drop unnessary nokia,nvm-size property - A series of changes to use "okay" instead of "ok" - A series of changes to move boards to use new cpsw switch driver and drop the drop legacy cpsw dt node - A series of changes to fix issues with the GPIO binding usage * tag 'omap-for-v5.10/dt-part2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am3874: iceboard: fix GPIO expander reset GPIOs ARM: dts: am335x: t335: align GPIO hog names with dtschema ARM: dts: am335x: lxm: fix PCA9539 GPIO expander properties ARM: dts: am437x-l4: drop legacy cpsw dt node ARM: dts: am437x: switch to new cpsw switch drv ARM: dts: am437x-l4: add dt node for new cpsw switchdev driver ARM: dts: dra7: drop legacy cpsw dt node ARM: dts: am57xx-cl-som-am57x: switch to new cpsw switch drv ARM: dts: dra7x-evm: switch to new cpsw switch drv ARM: dts: beagle-x15: switch to new cpsw switch drv ARM: dts: am57xx-idk: switch to new cpsw switch drv ARM: dts: am5729: beagleboneai: switch to new cpsw switch drv ARM: dts: am43xx: replace status value "ok" by "okay" ARM: dts: dra7xx: replace status value "ok" by "okay" ARM: dts: omap: replace status value "ok" by "okay" ARM: dts: n9, n950: Remove nokia,nvm-size property Link: https://lore.kernel.org/r/pull-1601445968-476435@atomide.com-2 Signed-off-by: Olof Johansson commit 02d0bf1ae82ae7d6d440efffae9dd414c7831058 Merge: e27312539a393 9a19a39ee48b7 Author: Olof Johansson Date: Sat Oct 3 12:43:25 2020 -0700 Merge tag 'zynqmp-dt-for-v5.10' of https://github.com/Xilinx/linux-xlnx into arm/dt arm64: soc: ZynqMP DT changes for v5.10 - Fix IRQ flag for PMIC - Align gpio hogs and leds with naming convention - Rename busses to match DT schema - Tune i2c cadence compatible string - Remove undocumented u-boot properties * tag 'zynqmp-dt-for-v5.10' of https://github.com/Xilinx/linux-xlnx: arm64: dts: zynqmp: Fix leds subnode name for zcu100/ultra96 v1 arm64: dts: zynqmp: Remove undocumented u-boot properties arm64: dts: zynqmp: Remove additional compatible string for i2c IPs arm64: dts: zynqmp: Rename buses to be align with simple-bus yaml arm64: dts: xilinx: align GPIO hog names with dtschema arm64: dts: zynqmp-zcu100-revC: correct interrupt flags arm64: dts: xilinx: Align IOMMU nodename with dtschema arm64: dts: zynqmp: Add GTR transceivers Link: https://lore.kernel.org/r/37a0333b-541e-649c-68c5-aa4b52e6b91d@monstr.eu Signed-off-by: Olof Johansson commit e27312539a393be3b38ae0112d4f72877db00f76 Merge: 02c96f8353ddc 2bd5298af55cf Author: Olof Johansson Date: Sat Oct 3 12:42:03 2020 -0700 Merge tag 'sunxi-dt-for-5.10-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt A few more DT patches for 5.10, to support simple-framebuffer on the v3s and the pinecube board * tag 'sunxi-dt-for-5.10-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun8i: v3s: Add simple-framebuffer ARM: dts: sun8i: s3l: add support for Pine64 PineCube IP camera dt-bindings: arm: sunxi: add Pine64 PineCube binding ARM: dts: sun8i: V3/V3s/S3/S3L: add pinctrl for I2C1 at PE bank ARM: dts: sun8i: V3/V3s/S3/S3L: add pinctrl for 8-bit parallel CSI ARM: dts: sun8i: V3/V3s/S3/S3L: add CSI1 device node ARM: dts: sun8i: V3/V3s/S3/S3L: add pinctrl for UART2 RX/TX ARM: dts: sun8i: V3/V3s/S3/S3L: add Ethernet support Link: https://lore.kernel.org/r/e7c12b59-8603-438d-908b-5f0bde2c8697.lettre@localhost Signed-off-by: Olof Johansson commit b402b4e67c1bed5184138b453a84dcc6fea01a1d Author: Christophe Kerello Date: Thu Sep 24 12:13:42 2020 +0200 ARM: multi_v7_defconfig: add FMC2 EBI controller support This patch adds FMC2 EBI controller support used by STM32MP SOCs. Link: https://lore.kernel.org/r/20200924101342.4707-1-alexandre.torgue@st.com Signed-off-by: Christophe Kerello Signed-off-by: Alexandre Torgue Signed-off-by: Olof Johansson commit acddaa55366f24cfb2b97412769fc0a60ad0d35f Author: Alexander A. Klimov Date: Thu Sep 24 12:11:13 2020 +0200 ARM: stm32: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Link: https://lore.kernel.org/r/20200924101113.4528-1-alexandre.torgue@st.com Signed-off-by: Alexander A. Klimov Signed-off-by: Alexandre Torgue Signed-off-by: Olof Johansson commit 02c96f8353ddc7231f765b84df9eacb138c01c2d Merge: a3ca4b5e92267 0cf10e6f94335 Author: Olof Johansson Date: Sat Oct 3 12:37:45 2020 -0700 Merge tag 'v5.10-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt cpu-supply fixes (supply for each cpu core not only cpu0) and a spelling for the status property. * tag 'v5.10-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: replace status value "ok" by "okay" ARM: dts: rockchip: update cpu supplies on rk3066a ARM: dts: rockchip: rk3066a: add label to cpu@1 ARM: dts: rockchip: update cpu supplies on rk3288 Link: https://lore.kernel.org/r/1834049.gShM3QRH0n@diego Signed-off-by: Olof Johansson commit a3ca4b5e92267670bf2fcdca7d1aaa96f89ea652 Merge: d4509b65457a4 13441281bde0b Author: Olof Johansson Date: Sat Oct 3 12:36:26 2020 -0700 Merge tag 'actions-arm64-dt-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux-actions into arm/dt Actions Semi ARM64 DT for v5.10: - Fix the memory region used by pinctrl and sps drivers on the S700 SoC. The issue is fixed by limiting the address space used by pinctrl driver. In hardware these two are separate subsystems but the hw engineers somehow merged the registers space into one. So we now limit the address space with appropriate offsets for the two drivers. - Add DMA controller support for S700 SoC. The relevant driver changes are picked up by DMA Engine mainatainer. The DMA on this SoC can be used for mem-to-mem and mem-to-peripheral transfers. * tag 'actions-arm64-dt-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux-actions: arm64: dts: actions: Add DMA Controller for S700 arm64: dts: actions: limit address range for pinctrl node Link: https://lore.kernel.org/r/20200922114030.GC11251@Mani-XPS-13-9360 Signed-off-by: Olof Johansson commit d4509b65457a456d3ed1c2fa0dd6c8d5b9d4f0bc Merge: a6d862f21ad9c 47be1cdee7ac7 Author: Olof Johansson Date: Sat Oct 3 12:35:55 2020 -0700 Merge tag 'actions-arm-dt-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux-actions into arm/dt Actions Semi ARM DT for v5.10: - Add devicetree support for Caninos Loucos Labrador SBC manufactured by Laboratory of Integrated Technological Systems (LSI-TEC), Brazil. This board is based on Actions Semi S500 SoC. More information about this board can be found in their website: https://caninosloucos.org/en/ - Fix PPI interrupt specifiers for peripherals attached to Cortex-A9 CPU - Add devicetree support for RoseapplePi SBC manufactured by Roseapple Pi team in Taiwan. This board is based on Actions Semi S500 SoC. More information about this board can be found in their website: http://roseapplepi.org/ * tag 'actions-arm-dt-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux-actions: ARM: dts: owl-s500: Add RoseapplePi ARM: dts: owl-s500: Fix incorrect PPI interrupt specifiers ARM: dts: Add Caninos Loucos Labrador v2 Link: https://lore.kernel.org/r/20200922113712.GB11251@Mani-XPS-13-9360 Signed-off-by: Olof Johansson commit a6d862f21ad9c7d2b3d0b5355741b358c8316091 Merge: 2494ad156d2a8 494eebdc7e908 Author: Olof Johansson Date: Sat Oct 3 12:35:14 2020 -0700 Merge tag 'actions-bindings-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux-actions into arm/dt Actions Semi bindings for v5.10 - Add vendor prefix for Roseapple Pi: http://roseapplepi.org/ - Document RoseapplePi SBC manufactured by Roseapple Pi team in Taiwan. This board is based on Actions Semi S500 SoC. More information about this board can be found in their website: http://roseapplepi.org/index.php/spec/ - Add vendor prefix for Caninos Loucos Program: https://caninosloucos.org/en/program-en/ - Document Caninos Loucos Labrador SBC manufactured by Laboratory of Integrated Technological Systems (LSI-TEC), Brazil. This board is based on Actions Semi S500 SoC. More information about this board can be found in their website: https://caninosloucos.org/en/labrador-32-en/ * tag 'actions-bindings-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux-actions: dt-bindings: arm: actions: Document RoseapplePi dt-bindings: Add vendor prefix for RoseapplePi.org dt-bindings: arm: actions: Document Caninos Loucos Labrador dt-bindings: Add vendor prefix for Caninos Loucos Link: https://lore.kernel.org/r/20200922113408.GA11251@Mani-XPS-13-9360 Signed-off-by: Olof Johansson commit 2494ad156d2a8018f576db8ac519c91b06bebbaf Merge: d9dd2c609b63d 96820e359e25c Author: Olof Johansson Date: Sat Oct 3 12:34:01 2020 -0700 Merge tag 'sunxi-dt-for-5.10-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt Our usual bunch of patches to support the Allwinner SoCs, this time adding: - Allwinner A100 initial support - Mali, DMA, cedrus and IR Support for the R40 - Crypto support for the v3s - New board: Allwinner A100 Perf1 * tag 'sunxi-dt-for-5.10-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (24 commits) ARM: dts: sun8i: v3s: Enable crypto engine dt-bindings: crypto: Add compatible for V3s dt-bindings: crypto: Specify that allwinner, sun8i-a33-crypto needs reset arm64: dts: allwinner: a64: Update the audio codec compatible arm64: dts: allwinner: a64: Update codec widget names ARM: dts: sun8i: a33: Update codec widget names ARM: dts: sun8i: r40: Add video engine node ARM: dts: sun8i: r40: Add node for system controller dt-bindings: sram: allwinner, sun4i-a10-system-control: Add R40 compatibles ARM: dts: sun8i: r40: bananapi-m2-ultra: Enable IR ARM: dts: sun8i: r40: Add IR nodes dt-bindings: media: allwinner, sun4i-a10-ir: Add R40 compatible ARM: dts: sun8i: r40: Add DMA node dt-bindings: dma: allwinner,sun50i-a64-dma: Add R40 compatible arm64: allwinner: A100: add support for Allwinner Perf1 board dt-bindings: arm: sunxi: Add Allwinner A100 Perf1 Board bindings arm64: allwinner: A100: add the basical Allwinner A100 DTSI file dt-bindings: irq: sun7i-nmi: Add binding for A100's NMI controller dt-bindings: irq: sun7i-nmi: fix dt-binding for a80 nmi ARM: dts: sun4i: Enable HDMI support on the Mele A1000 ... Link: https://lore.kernel.org/r/ac39ee89-ea3a-4971-8cd7-8c4b2ecef39d.lettre@localhost Signed-off-by: Olof Johansson commit d9dd2c609b63d21a3ef1a6fd2ba726d81b0dc88b Merge: ef3c139ba0425 737e7610b545c Author: Olof Johansson Date: Sat Oct 3 12:18:59 2020 -0700 Merge tag 'amlogic-dt-2' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt ARM: dts: amlogic updates for v5.10 (round 2) - GPU: remove invalid interrupt lines * tag 'amlogic-dt-2' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson8: remove two invalid interrupt lines from the GPU node Link: https://lore.kernel.org/r/20200917165040.22908-2-krzk@kernel.org Link: https://lore.kernel.org/r/20200917165040.22908-1-krzk@kernel.org Link: https://lore.kernel.org/r/7hsgawl9h2.fsf@baylibre.com Signed-off-by: Olof Johansson commit ef3c139ba04252acd2c65d4f9f01ffa487bd2c7b Merge: 7d0c5aee9616c bbcb0522ae0ce Author: Olof Johansson Date: Sat Oct 3 12:16:16 2020 -0700 Merge tag 'ti-k3-dt-for-v5.10-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux into arm/dt Second and final device tree updates towards 5.10-rc1 for TI K3 platform. * tag 'ti-k3-dt-for-v5.10-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux: (23 commits) arm64: dts: ti: k3-j7200-common-proc-board: Add USB support arm64: dts: ti: k3-j7200-common-proc-board: Configure the SERDES lane function arm64: dts: ti: k3-j7200-main: Add USB controller arm64: dts: ti: k3-j7200-main.dtsi: Add USB to SERDES lane MUX arm64: dts: ti: k3-j7200-main: Add SERDES lane control mux dt-bindings: ti-serdes-mux: Add defines for J7200 SoC arm64: dts: ti: k3-j721e-common-proc-board: align GPIO hog names with dtschema arm64: dts: ti: k3-j7200-common-proc-board: Add support for eMMC and SD card arm64: dts: ti: k3-j7200-main: Add support for MMC/SD controller nodes arm64: dts: ti: k3-j7200-som-p0: Add HyperFlash node arm64: dts: ti: k3-j7200-mcu-wakeup: Add HyperBus node arm64: dts: ti: k3-j7200-common-proc-board: Add I2C IO expanders arm64: dts: ti: k3-j7200: Add I2C nodes arm64: dts: ti: k3-j7200-common-proc-board: add mcu cpsw nuss pinmux and phy defs arm64: dts: ti: k3-j7200-mcu: add mcu cpsw nuss node arm64: dts: ti: k3-j7200-main: add main navss cpts node arm64: dts: ti: k3-j7200: add DMA support arm64: dts: ti: Add support for J7200 Common Processor Board arm64: dts: ti: Add support for J7200 SoC dt-bindings: arm: ti: Add bindings for J7200 SoC ... Link: https://lore.kernel.org/r/20201002134559.orvmgbns57qlyn3i@akan Signed-off-by: Olof Johansson commit fbbb7c53bb246900a1a43870977d6a771416e660 Merge: 6b9c8c8bb789c 08d7a73fffb67 Author: Olof Johansson Date: Sat Oct 3 12:15:07 2020 -0700 Merge tag 'renesas-fixes-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes Renesas fixes for v5.9 - Fix touch controller probe failure on the iWave RainboW G20D Qseven board. * tag 'renesas-fixes-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: dts: iwg20d-q7-common: Fix touch controller probe failure Link: https://lore.kernel.org/r/20200928115645.10985-1-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 6b9c8c8bb789c5387f2297dd3c68a2d61b3f935e Merge: f1466cdd82f48 a6f2f0fdc73aa Author: Olof Johansson Date: Sat Oct 3 12:13:56 2020 -0700 Merge tag 'zynqmp-soc-for-v5.9-v2' of https://github.com/Xilinx/linux-xlnx into arm/fixes arm64: soc: ZynqMP SoC changes for v5.9-v2 - Fix error code in zynqmp_power driver * tag 'zynqmp-soc-for-v5.9-v2' of https://github.com/Xilinx/linux-xlnx: soc: xilinx: Fix error code in zynqmp_pm_probe() Link: https://lore.kernel.org/r/9b23dd60-45f4-cd7d-e81a-e8ab8e20af7c@xilinx.com Signed-off-by: Olof Johansson commit ee2d433cb47338cd40af800cdab5133f62edca10 Author: Iskren Chernev Date: Tue Sep 22 14:42:37 2020 +0300 power: supply: max17040: Support soc alert max17048 and max17049 support SOC alerts (interrupts when battery capacity changes by +/- 1%). At the moment the driver polls for changes every second. Using the alerts removes the need for polling. Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit 1779c6e3496a53d9cbbbcd248b234b2b6a07435c Author: Iskren Chernev Date: Tue Sep 22 14:42:36 2020 +0300 power: supply: max17040: Support setting rcomp The Maxim ModelGauge family supports fine-tuning by setting a compensation value (named rcomp in the docs). The value is affected by battery chemistry and ambient temperature. Add support for reading maxim,rcomp from DT and configuring the device with the supplied value. Temperature adjustment is not implemented at the moment, because there is no provision for receiving the ambient temperature at the moment. Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit b973c9d518199bd8362aeae13d208d8889283287 Author: Iskren Chernev Date: Tue Sep 22 14:42:35 2020 +0300 dt-bindings: power: supply: max17040: Add maxim,rcomp To compensate for the battery chemistry and operating conditions the chips support a compensation value. Specify one or two byte compensation via the maxim,rcomp byte array. Signed-off-by: Iskren Chernev Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 4f7f8e87c49e029a52318dd76d561860119d0372 Author: Iskren Chernev Date: Tue Sep 22 14:42:34 2020 +0300 power: supply: max17040: Support compatible devices The max17040 fuel gauge is part of a family of 8 chips that have very similar mode of operations and registers. This change adds: - compatible strings for all supported devices and handling for the minor differences between them; - handling for devices reporting double capacity via maxim,double-soc; The datasheets of the supported devices are linked [0] [1] [2] [3]. [0] https://datasheets.maximintegrated.com/en/ds/MAX17040-MAX17041.pdf [1] https://datasheets.maximintegrated.com/en/ds/MAX17043-MAX17044.pdf [2] https://datasheets.maximintegrated.com/en/ds/MAX17048-MAX17049.pdf [3] https://datasheets.maximintegrated.com/en/ds/MAX17058-MAX17059.pdf Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker Reported-by: kernel test robot Signed-off-by: Sebastian Reichel commit 11a2bdc10f5b5e092ee84f8dc2966c78471909fd Author: Iskren Chernev Date: Tue Sep 22 14:42:33 2020 +0300 dt-bindings: power: supply: Extend max17040 compatibility Maxim max17040 is a fuel gauge from a larger family utilising the Model Gauge technology. Document all different compatible strings that the max17040 driver recognizes. Some devices in the wild report double the capacity. The maxim,double-soc (from State-Of-Charge) property fixes that. Examples: https://lore.kernel.org/patchwork/patch/1263411/#1468420 Signed-off-by: Iskren Chernev Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 59d5396a4666195f89a67e118e9e627ddd6f53a1 Author: Colin Ian King Date: Thu Oct 1 12:39:00 2020 +0100 x86/events/amd/iommu: Fix sizeof mismatch An incorrect sizeof is being used, struct attribute ** is not correct, it should be struct attribute *. Note that since ** is the same size as * this is not causing any issues. Improve this fix by using sizeof(*attrs) as this allows us to not even reference the type of the pointer. Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") Fixes: 51686546304f ("x86/events/amd/iommu: Fix sysfs perf attribute groups") Signed-off-by: Colin Ian King Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201001113900.58889-1-colin.king@canonical.com commit 80a5ce116fc084e8a25d5a936617699e2931b611 Author: Kan Liang Date: Thu Oct 1 14:17:11 2020 -0700 perf/x86/intel: Check perf metrics feature for each CPU It might be possible that different CPUs have different CPU metrics on a platform. In this case, writing the GLOBAL_CTRL_EN_PERF_METRICS bit to the GLOBAL_CTRL register of a CPU, which doesn't support the TopDown perf metrics feature, causes MSR access error. Current TopDown perf metrics feature is enumerated using the boot CPU's PERF_CAPABILITIES MSR. The MSR only indicates the boot CPU supports this feature. Check the PERF_CAPABILITIES MSR for each CPU. If any CPU doesn't support the perf metrics feature, disable the feature globally. Fixes: 59a854e2f3b9 ("perf/x86/intel: Support TopDown metrics on Ice Lake") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201001211711.25708-1-kan.liang@linux.intel.com commit feff2e65efd8d84cf831668e182b2ce73c604bbb Author: Daniel Bristot de Oliveira Date: Wed Sep 16 09:06:39 2020 +0200 sched/deadline: Unthrottle PI boosted threads while enqueuing stress-ng has a test (stress-ng --cyclic) that creates a set of threads under SCHED_DEADLINE with the following parameters: dl_runtime = 10000 (10 us) dl_deadline = 100000 (100 us) dl_period = 100000 (100 us) These parameters are very aggressive. When using a system without HRTICK set, these threads can easily execute longer than the dl_runtime because the throttling happens with 1/HZ resolution. During the main part of the test, the system works just fine because the workload does not try to run over the 10 us. The problem happens at the end of the test, on the exit() path. During exit(), the threads need to do some cleanups that require real-time mutex locks, mainly those related to memory management, resulting in this scenario: Note: locks are rt_mutexes... ------------------------------------------------------------------------ TASK A: TASK B: TASK C: activation activation activation lock(a): OK! lock(b): OK! lock(a) -> block (task A owns it) -> self notice/set throttled +--< -> arm replenished timer | switch-out | lock(b) | -> B prio> | -> boost TASK B | unlock(a) switch-out | -> handle lock a to B | -> wakeup(B) | -> B is throttled: | -> do not enqueue | switch-out | | +---------------------> replenishment timer -> TASK B is boosted: -> do not enqueue ------------------------------------------------------------------------ BOOM: TASK B is runnable but !enqueued, holding TASK C: the system crashes with hung task C. This problem is avoided by removing the throttle state from the boosted thread while boosting it (by TASK A in the example above), allowing it to be queued and run boosted. The next replenishment will take care of the runtime overrun, pushing the deadline further away. See the "while (dl_se->runtime <= 0)" on replenish_dl_entity() for more information. Reported-by: Mark Simmons Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Juri Lelli Tested-by: Mark Simmons Link: https://lkml.kernel.org/r/5076e003450835ec74e6fa5917d02c4fa41687e6.1600170294.git.bristot@redhat.com commit 51cf18c90ca1b51d1cb4af3064e85fcf8610b5d2 Author: Vincent Donnefort Date: Fri Aug 28 10:00:49 2020 +0100 sched/debug: Add new tracepoint to track cpu_capacity rq->cpu_capacity is a key element in several scheduler parts, such as EAS task placement and load balancing. Tracking this value enables testing and/or debugging by a toolkit. Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1598605249-72651-1-git-send-email-vincent.donnefort@arm.com commit 9abb897345ce1d41257567f571a78137c961c405 Author: Peter Oskolkov Date: Wed Sep 30 10:35:32 2020 -0700 sched/fair: Tweak pick_next_entity() Currently, pick_next_entity(...) has the following structure (simplified): [...] if (last_buddy_ok()) result = last_buddy; if (next_buddy_ok()) result = next_buddy; [...] The intended behavior is to prefer next buddy over last buddy; the current code somewhat obfuscates this, and also wastes cycles checking the last buddy when eventually the next buddy is picked up. So this patch refactors two 'ifs' above into [...] if (next_buddy_ok()) result = next_buddy; else if (last_buddy_ok()) result = last_buddy; [...] Signed-off-by: Peter Oskolkov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20200930173532.1069092-1-posk@google.com commit 21c949b21802341411937291fb04e153b3c8f471 Merge: 97b65223c18f1 b2c586eb07efa Author: Greg Kroah-Hartman Date: Sat Oct 3 15:59:57 2020 +0200 Merge tag 'usb-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: USB: changes for v5.10 merge window Most of changes are on dwc3 (38.8%) with cdns3 falling close behind (24.1%). The biggest changes here are a series of non-critical fixes to corner cases on dwc3, produced by Thinh N, and a series of major improvements to cdns3 produced by Peter C. We also have the traditional set of new device support (Intel Keem Bay, Hikey 970) on dwc3. A series of sparse/coccinelle and checkpatch fixes on dwc3 by yours truly and a set of minor changes all over the stack. * tag 'usb-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (117 commits) usb: dwc2: Fix INTR OUT transfers in DDMA mode. usb: dwc2: don't use ID/Vbus detection if usb-role-switch on STM32MP15 SoCs usb: dwc2: override PHY input signals with usb role switch support dt-bindings: usb: dwc2: add optional usb-role-switch property usb: dwc3: of-simple: Add compatible string for Intel Keem Bay platform dt-bindings: usb: Add Intel Keem Bay USB controller bindings usb: dwc3: gadget: Support up to max stream id usb: dwc3: gadget: Return early if no TRB update usb: dwc3: gadget: Keep TRBs in request order usb: dwc3: gadget: Revise setting IOC when no TRB left usb: dwc3: gadget: Look ahead when setting IOC usb: dwc3: gadget: Allow restarting a transfer usb: bdc: remove duplicated error message usb: dwc3: Stop active transfers before halting the controller usb: cdns3: gadget: enlarge the TRB ring length usb: cdns3: gadget: sg_support is only for DEV_VER_V2 or above usb: cdns3: gadget: need to handle sg case for workaround 2 case usb: cdns3: gadget: handle sg list use case at completion correctly usb: cdns3: gadget: add CHAIN and ISP bit for sg list use case usb: cdns3: gadget: improve the dump TRB operation at cdns3_ep_run_transfer ... commit 6455a8a84bdfd34829d23328b9d106c2652885f2 Author: Iskren Chernev Date: Tue Sep 22 14:42:32 2020 +0300 power: supply: max17040: Use regmap i2c Rewrite i2c operations from i2c client read/write to regmap i2c. As a result, most private functions now accept the private driver data instead of an i2c client pointer. Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit e55a50613d91515acaddaca8de46162feb9adb45 Author: Iskren Chernev Date: Tue Sep 22 14:42:31 2020 +0300 power: supply: max17040: Use devm_ to automate remove Two actions were performed during remove - power supply dereg and delayed work cleanup. Power supply dereg can be handled by using the devm_ version of the registration function. Work cleanup can be added as a devm_action. If probe fails after psy registration it will now be cleaned up properly. Signed-off-by: Iskren Chernev Tested-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit 05f94eb989075f6e5cd99d0772ea160efe41bff4 Author: Sebastian Reichel Date: Thu Aug 27 16:02:48 2020 +0200 power: supply: document current direction Currently the sign for CURRENT_NOW and CURRENT_AVG is a bit of a mess. There are basically 3 different ways battery fuel gauges report the current: 1. uses negative values for discharging and positive values for charging 2. uses positive values for discharging and negative values for discharging (opposit of 1) 3. only uses positive values As a result userspace currently cannot use the sign at all in a generic way. Let's solve the issue by documenting a canonical way for reporting the data and ensure new drivers follow this way. Then existing drivers can be fixed on a case-by-case basis. The 'negative value = battery discharging' has been choosen, since there are only very few drivers doing it the other way around. Signed-off-by: Sebastian Reichel commit 7c9df3ec493e353166527f56ad1540d052b92cd4 Author: Mauro Carvalho Chehab Date: Sat Oct 3 10:34:54 2020 +0200 media: add Zoran cardlist Now that Zoran was re-added, we need to add its cardlist to the admin guide. Signed-off-by: Mauro Carvalho Chehab commit 5d47b394794d3086c1c338cc014011a9ee34005c Author: Christoph Hellwig Date: Fri Sep 25 06:51:46 2020 +0200 security/keys: remove compat_keyctl_instantiate_key_iov Now that import_iovec handles compat iovecs, the native version of keyctl_instantiate_key_iov can be used for the compat case as well. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit c3973b401ef2b0b8005f8074a10e96e3ea093823 Author: Christoph Hellwig Date: Fri Sep 25 06:51:45 2020 +0200 mm: remove compat_process_vm_{readv,writev} Now that import_iovec handles compat iovecs, the native syscalls can be used for the compat case as well. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 598b3cec831fd6ccb3cbe4919a722e868c6364a8 Author: Christoph Hellwig Date: Fri Sep 25 06:51:44 2020 +0200 fs: remove compat_sys_vmsplice Now that import_iovec handles compat iovecs, the native vmsplice syscall can be used for the compat case as well. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 5f764d624a89d4d00d282157077878d4e7c69869 Author: Christoph Hellwig Date: Fri Sep 25 06:51:43 2020 +0200 fs: remove the compat readv/writev syscalls Now that import_iovec handles compat iovecs, the native readv and writev syscalls can be used for the compat case as well. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 3523a9d45478984169d7f4416a00c83afc964e2a Author: Christoph Hellwig Date: Fri Sep 25 06:51:42 2020 +0200 fs: remove various compat readv/writev helpers Now that import_iovec handles compat iovecs as well, all the duplicated code in the compat readv/writev helpers is not needed. Remove them and switch the compat syscall handlers to use the native helpers. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 89cd35c58bc2e36bfdc23dde67a429b08cf4ae03 Author: Christoph Hellwig Date: Fri Sep 25 06:51:41 2020 +0200 iov_iter: transparently handle compat iovecs in import_iovec Use in compat_syscall to import either native or the compat iovecs, and remove the now superflous compat_import_iovec. This removes the need for special compat logic in most callers, and the remaining ones can still be simplified by using __import_iovec with a bool compat parameter. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit bfdc59701d6d100c99c3b987bcffd1c204e393c8 Author: Christoph Hellwig Date: Fri Sep 25 06:51:40 2020 +0200 iov_iter: refactor rw_copy_check_uvector and import_iovec Split rw_copy_check_uvector into two new helpers with more sensible calling conventions: - iovec_from_user copies a iovec from userspace either into the provided stack buffer if it fits, or allocates a new buffer for it. Returns the actually used iovec. It also verifies that iov_len does fit a signed type, and handles compat iovecs if the compat flag is set. - __import_iovec consolidates the native and compat versions of import_iovec. It calls iovec_from_user, then validates each iovec actually points to user addresses, and ensures the total length doesn't overflow. This has two major implications: - the access_process_vm case loses the total lenght checking, which wasn't required anyway, given that each call receives two iovecs for the local and remote side of the operation, and it verifies the total length on the local side already. - instead of a single loop there now are two loops over the iovecs. Given that the iovecs are cache hot this doesn't make a major difference Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 1028ae4069991e26d1522e957939fb61d2da1d12 Author: Stanislav Fomichev Date: Fri Oct 2 17:25:44 2020 -0700 bpf: Deref map in BPF_PROG_BIND_MAP when it's already used We are missing a deref for the case when we are doing BPF_PROG_BIND_MAP on a map that's being already held by the program. There is 'if (ret) bpf_map_put(map)' below which doesn't trigger because we don't consider this an error. Let's add missing bpf_map_put() for this specific condition. Fixes: ef15314aa5de ("bpf: Add BPF_PROG_BIND_MAP syscall") Reported-by: Alexei Starovoitov Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20201003002544.3601440-1-sdf@google.com commit 678cdd4967081b3035027b346d10f6f38bf367d2 Merge: 5a38b4fc01041 a4bb4f5fc811e Author: David S. Miller Date: Fri Oct 2 19:11:12 2020 -0700 Merge branch 'genetlink-support-per-command-policy-dump' Jakub Kicinski says: ==================== genetlink: support per-command policy dump The objective of this series is to dump ethtool policies to be able to tell which flags are supported by the kernel. Current release adds ETHTOOL_FLAG_STATS for dumping extra stats, but because of strict checking we need to make sure that the flag is actually supported before setting it in a request. Ethtool policies are per command, and so far only dumping family policies was supported. The series adds new set of "light" ops to genl families which don't have all the callbacks, and won't have the policy. Most of families are then moved to these ops. This gives us 4096B in savings on an allyesconfig build (not counting the growth that would have happened when policy is added): text data bss dec hex 244415581 227958581 78372980 550747142 20d3bc06 244415581 227962677 78372980 550751238 20d3cc06 Next 5 patches deal the dumping per-op policy. v3: The actually patch to dump per-op policy was taken out and will come in a series from Johannes, to make sure uAPI is consistent from the start. For dump-specific policies I think it should be fine to add a new pair of members to the "full" ops, and not overthink it. v2: - remove the stale comment in taskstats - split patch 8 -> 8, 9 - now the getfamily policy is also in the op - make cmd u32 v1: - replace remaining uses of "light" with "small" - fix dump (ops can't be on the stack there) - coding changes in patch 4 - new patch 7 - don't echo op in responses - to make dump all easier Dave - this series will cause a very trivial conflict with the patch I sent to net. Both sides add some kdoc to struct genl_ops so we'll need to keep it all. I'm sending this already because I also need to restructure ethool policies in time for 5.10 if we want to use it for the stats flag. ==================== Signed-off-by: David S. Miller commit a4bb4f5fc811e2d227703ac41c8d44a8553a7f2a Author: Jakub Kicinski Date: Fri Oct 2 14:50:00 2020 -0700 genetlink: switch control commands to per-op policies In preparation for adding a new attribute to CTRL_CMD_GETPOLICY split the policies for getpolicy and getfamily apart. This will cause a slight user-visible change in that dumping the policies will switch from per family to per op, but supposedly sniffer-type applications (which are the main use case for policy dumping thus far) should support both, anyway. Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg Signed-off-by: David S. Miller commit 8e1ed28fd8d36fb83efc32b5abda774dafba6c7f Author: Jakub Kicinski Date: Fri Oct 2 14:49:59 2020 -0700 genetlink: use parsed attrs in dumppolicy Attributes are already parsed based on the policy specified in the family and ready-to-use in info->attrs. No need to call genlmsg_parse() again. Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg Signed-off-by: David S. Miller commit 7c1e0926da18051f4a09da1e380591213b0cdb5f Author: Jakub Kicinski Date: Fri Oct 2 14:49:58 2020 -0700 taskstats: move specifying netlink policy back to ops commit 3b0f31f2b8c9 ("genetlink: make policy common to family") had to work around removal of policy from ops by parsing in the pre_doit callback. Now that policy is back in full ops we can switch again. Set maxattr to actual size of the policies - both commands set GENL_DONT_VALIDATE_STRICT so out of range attributes will be silently ignored, anyway. v2: - remove stale comment Suggested-by: Johannes Berg Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg Signed-off-by: David S. Miller commit 48526a0f4ca2b484cab4318dc0b2c2be1d8685b7 Author: Jakub Kicinski Date: Fri Oct 2 14:49:57 2020 -0700 genetlink: bring back per op policy Add policy to the struct genl_ops structure, this time with maxattr, so it can be used properly. Propagate .policy and .maxattr from the family in genl_get_cmd() if needed, this way the rest of the code does not have to worry if the policy is per op or global. Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg Signed-off-by: David S. Miller commit 78ade619c16599c8a962451aad15f56bceed316b Author: Jakub Kicinski Date: Fri Oct 2 14:49:56 2020 -0700 genetlink: use .start callback for dumppolicy The structure of ctrl_dumppolicy() is clearly split into init and dumping. Move the init to a .start callback for clarity, it's a more idiomatic netlink dump code structure. Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg Signed-off-by: David S. Miller commit adc848450ff84e961cf7966b8a475889a92a9fd3 Author: Jakub Kicinski Date: Fri Oct 2 14:49:55 2020 -0700 genetlink: add a structure for dump state Whenever netlink dump uses more than 2 cb->args[] entries code gets hard to read. We're about to add more state to ctrl_dumppolicy() so create a structure. Since the structure is typed and clearly named we can remove the local fam_id variable and use ctx->fam_id directly. v3: - rebase onto explicit free fix v1: - s/nl_policy_dump/netlink_policy_dump_state/ - forward declare struct netlink_policy_dump_state, and move from passing unsigned long to actual pointer type - add build bug on - u16 fam_id - s/args/ctx/ Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg Signed-off-by: David S. Miller commit 66a9b9287d2447a91cef2fafc648dee32186f708 Author: Jakub Kicinski Date: Fri Oct 2 14:49:54 2020 -0700 genetlink: move to smaller ops wherever possible Bulk of the genetlink users can use smaller ops, move them. Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg Signed-off-by: David S. Miller commit 0b588afdd16f9e0b63128dc4bcd002e7f2725fe0 Author: Jakub Kicinski Date: Fri Oct 2 14:49:53 2020 -0700 genetlink: add small version of ops We want to add maxattr and policy back to genl_ops, to enable dumping per command policy to user space. This, however, would cause bloat for all the families with global policies. Introduce smaller version of ops (half the size of genl_ops). Translate these smaller ops into a full blown struct before use in the core. v1: - use struct assignment - put a full copy of the op in struct genl_dumpit_info - s/light/small/ Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg Signed-off-by: David S. Miller commit e5086736969880478abb2ac85ef8757ac6ce45bf Author: Jakub Kicinski Date: Fri Oct 2 14:49:52 2020 -0700 genetlink: reorg struct genl_family There are holes and oversized members in struct genl_family. Before: /* size: 104, cachelines: 2, members: 16 */ After: /* size: 88, cachelines: 2, members: 16 */ The command field in struct genlmsghdr is a u8, so no point in the operation count being 32 bit. Also operation 0 is usually undefined, so we only need 255 entries. netnsok and parallel_ops are only ever initialized to true. We can grow the fields as needed, compiler should warn us if someone tries to assign larger constants. Signed-off-by: Jakub Kicinski Reviewed-by: Johannes Berg Signed-off-by: David S. Miller commit da7d5d72ae8341c6b48a7e44a615fede9ab5eb90 Author: Jing Xiangfeng Date: Thu Sep 17 10:19:06 2020 +0800 scsi: qedf: Remove redundant assignment to variable 'rc' This assignment is meaningless. Remove it. Link: https://lore.kernel.org/r/20200917021906.175933-1-jingxiangfeng@huawei.com Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit 37fa429ef7bad44e5b8dd9fb0b52731b76a3fa99 Author: Ye Bin Date: Wed Sep 16 10:28:59 2020 +0800 scsi: lpfc: Remove unneeded variable 'status' in lpfc_fcp_cpu_map_store() Fixes coccicheck warning: drivers/scsi/lpfc/lpfc_attr.c:5341:5-11: Unneeded variable: "status". Return "- EINVAL" on line 5342 Link: https://lore.kernel.org/r/20200916022859.349089-1-yebin10@huawei.com Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit 936dc95d09d8f662c63cd82790c94f38ef49e9df Author: Liu Shixin Date: Wed Sep 16 10:50:30 2020 +0800 scsi: snic: Convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Link: https://lore.kernel.org/r/20200916025030.3992991-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen commit 121432e87093ca3bdfcd9023df545d01b4bf0dff Author: Ye Bin Date: Wed Sep 16 10:27:49 2020 +0800 scsi: qla4xxx: Delete unneeded variable 'status' in qla4xxx_process_ddb_changed Fixes coccicheck warning: drivers/scsi/qla4xxx/ql4_init.c:1173:5-11: Unneeded variable: "status". Return "QLA_ERROR" on line 1195 Link: https://lore.kernel.org/r/20200916022749.348923-1-yebin10@huawei.com Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit ea0dc2002ef58ff5629fda5275391a8c12bae848 Author: Liu Shixin Date: Mon Sep 14 14:54:03 2020 +0800 scsi: sun_esp: Use module_platform_driver to simplify the code Use module_platform_driver() to eliminate boilerplate code. Link: https://lore.kernel.org/r/20200914065403.3726462-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen commit 2d00ffe725a955926769c884c7c4a94623ee49c7 Author: Liu Shixin Date: Mon Sep 14 14:54:03 2020 +0800 scsi: sun3x_esp: Use module_platform_driver to simplify the code Use module_platform_driver() to eliminate boilerplate code. Link: https://lore.kernel.org/r/20200914065403.3726462-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen commit a3b73c96b4aed11658245c258802941641d8048f Author: Liu Shixin Date: Mon Sep 14 14:54:03 2020 +0800 scsi: sni_53c710: Use module_platform_driver to simplify the code Use module_platform_driver() to eliminate boilerplate code. Link: https://lore.kernel.org/r/20200914065403.3726462-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen commit e4c6d2872e25fc101d008235eeace732dd888798 Author: Liu Shixin Date: Mon Sep 14 14:54:03 2020 +0800 scsi: qlogicpti: Use module_platform_driver to simplify the code Use module_platform_driver() to eliminate boilerplate code. Link: https://lore.kernel.org/r/20200914065403.3726462-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen commit d30fbf2ce12f12d197dbd8ee647627369d96e712 Author: Liu Shixin Date: Mon Sep 14 14:54:03 2020 +0800 scsi: mac_esp: Use module_platform_driver to simplify the code Use module_platform_driver() to eliminate boilerplate code. Link: https://lore.kernel.org/r/20200914065403.3726462-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen commit 7fc83de599fe411f7c81a63e8059534a0e561656 Author: Liu Shixin Date: Mon Sep 14 14:54:03 2020 +0800 scsi: jazz_esp: Use module_platform_driver to simplify the code Use module_platform_driver() to eliminate boilerplate code. Link: https://lore.kernel.org/r/20200914065403.3726462-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen commit 055f15ab2cb4a5cbc4c0a775ef3d0066e0fa9b34 Author: Jing Xiangfeng Date: Thu Sep 10 20:38:48 2020 +0800 scsi: mvumi: Fix error return in mvumi_io_attach() Return PTR_ERR() from the error handling case instead of 0. Link: https://lore.kernel.org/r/20200910123848.93649-1-jingxiangfeng@huawei.com Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit 962d359c4d3bd4af0783456b360969edf7c4c745 Author: Hannes Reinecke Date: Thu Sep 10 10:40:59 2020 +0200 scsi: lpfc: Drop nodelist reference on error in lpfc_gen_req() If we fail to issue the iocb in lpfc_gen_req() we need to drop the nodelist reference. Link: https://lore.kernel.org/r/20200910084059.138507-1-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 38b2db564d9ab7797192ef15d7aade30633ceeae Author: Dan Carpenter Date: Mon Sep 28 12:13:00 2020 +0300 scsi: be2iscsi: Fix a theoretical leak in beiscsi_create_eqs() The be_fill_queue() function can only fail when "eq_vaddress" is NULL and since it's non-NULL here that means the function call can't fail. But imagine if it could, then in that situation we would want to store the "paddr" so that dma memory can be released. Link: https://lore.kernel.org/r/20200928091300.GD377727@mwanda Fixes: bfead3b2cb46 ("[SCSI] be2iscsi: Adding msix and mcc_rings V3") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 66ab2fa3721690d4fc912a4845f46faf0a8e2011 Author: Tomas Henzl Date: Sat Sep 26 17:00:15 2020 +0200 scsi: aacraid: Add a missing iounmap call Add a missing resource cleanup in _aac_reset_adapter. Link: https://lore.kernel.org/r/20200926150015.6187-1-thenzl@redhat.com Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit 7dc71ac8eb0bcaa76d69a3214d62a80b21c73f50 Author: Manish Rangankar Date: Thu Sep 24 00:03:38 2020 -0700 scsi: qedi: Add schedule_hw_err_handler callback for fan failure On fan failure event from MFW, bring down active connections and unload the firmware context. Link: https://lore.kernel.org/r/20200924070338.8270-1-mrangankar@marvell.com Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit 61741d8699e1fc764a309ebd20211bb1cb193110 Author: John Donnelly Date: Wed Sep 23 17:19:20 2020 -0700 scsi: target: tcmu: Fix warning: 'page' may be used uninitialized Corrects drivers/target/target_core_user.c:688:6: warning: 'page' may be used uninitialized. Link: https://lore.kernel.org/r/20200924001920.43594-1-john.p.donnelly@oracle.com Fixes: 3c58f737231e ("scsi: target: tcmu: Optimize use of flush_dcache_page") Cc: Mike Christie Acked-by: Mike Christie Signed-off-by: John Donnelly Signed-off-by: Martin K. Petersen commit 1dfbed19455b84364fdf888c2110670b419661c9 Author: Ye Bin Date: Wed Sep 30 10:19:19 2020 +0800 scsi: fnic: Fix inconsistent format argument type in fnic_debugfs.c Fix the following warnings: [drivers/scsi/fnic/fnic_debugfs.c:123]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'. [drivers/scsi/fnic/fnic_debugfs.c:125]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'. [drivers/scsi/fnic/fnic_debugfs.c:127]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'. Link: https://lore.kernel.org/r/20200930021919.2832860-2-yebin10@huawei.com Reported-by: Hulk Robot Acked-by: Karan Tilak Kumar Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit 2a7869d6c9a1f7c95bcb52a1e960bf95c5d464ac Author: Jing Xiangfeng Date: Fri Sep 25 14:07:54 2020 +0800 scsi: snic: Remove unnecessary condition ret is always zero or error so the assignment is redundant. Link: https://lore.kernel.org/r/20200925060754.156599-1-jingxiangfeng@huawei.com Acked-by: Karan Tilak Kumar Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit 712582e60f288e7cede8d6fc8769529317e0f3e0 Author: Hannes Reinecke Date: Fri May 15 13:26:47 2020 +0200 scsi: fnic: Do not call 'scsi_done()' for unhandled commands The fnic drivers assigns an ioreq structure to each command and severs this assignment once scsi_done() has been called and the command has been completed. When traversing commands to terminate outstanding I/O we should not call scsi_done() on commands which do not have a corresponding ioreq structure; these commands have either never entered the driver or have already been completed. [mkp: fixed unused label warning] Link: https://lore.kernel.org/r/20200515112647.49260-1-hare@suse.de Reported-by: kbuild test robot Reviewed-by: Laurence Oberman Acked-by: Satish Kharat Acked-by: Karan Tilak Kumar Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit f5ace5ef37b1e1de49882248656f35c45e041585 Author: Gustavo A. R. Silva Date: Fri Oct 2 18:10:33 2020 -0500 block: scsi_ioctl: Avoid the use of one-element arrays One-element arrays are being deprecated[1]. Replace the one-element array with a simple object of type compat_caddr_t: 'compat_caddr_t unused'[2], once it seems this field is actually never used. Also, update struct cdrom_generic_command in UAPI by adding an anonimous union to avoid using the one-element array _reserved_. [1] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays [2] https://github.com/KSPP/linux/issues/86 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/lkml/5f76f5d0.qJ4t%2FHWuRzSW7bTa%25lkp@intel.com/ Build-tested-by: kernel test robot Signed-off-by: Jens Axboe commit 99ba84c5de1e2f5b2b78e9e3bc89e50ec9bc0f29 Author: Gustavo A. R. Silva Date: Fri Oct 2 18:59:28 2020 -0500 rsxx: Use fallthrough pseudo-keyword Replace /* Fall through. */ comment with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jens Axboe commit 5029a0486eb4a9521e4da0db2a3824d5b63834bc Author: Gustavo A. R. Silva Date: Fri Oct 2 17:48:52 2020 -0500 pata_cmd64x: Use fallthrough pseudo-keyword Replace /* FALL THRU */ comment with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jens Axboe commit 5a38b4fc010412beda7e6e4284401559356f5827 Merge: 34ad937770d7f 061d631f7de24 Author: David S. Miller Date: Fri Oct 2 16:31:56 2020 -0700 Merge branch 'dpaa2-eth-add-devlink-parser-error-drop-trap-support' Ioana Ciornei says: ==================== dpaa2-eth: add devlink parser error drop trap support This patch set adds support in the dpaa2-eth driver for a new group of devlink drop traps - PARSER_ERROR_DROPS. The first patch adds a new generic trap group and associated traps, their definitions in devlink and their corresponding entries in the Documentation. Because there might be more devices (besides DPAA2) which do not support changing the action independently on each trap, a nre devlink callback is introduced - .trap_group_action_set(). If this callback is populated, it will take precedence over .trap_action_set() when the user requests changing the action on all the traps in a group. The next patches add basic linkage with devlink for the dpaa2-eth driver and support for the newly added PARSER_ERROR_DROPS. Nothing special here, just setting up the Rx error queue, interpreting the parse result, and then reporting any frame received on that queue to devlink. Changes in v2: - fix build error in 3/4 Changes in v3: - removed a commented line in 4/4 - added an extack in 4/4 - fixed up a warning on 32bit in 4/4 - reworded the trap_group_action_set() description in 2/4 ==================== Signed-off-by: David S. Miller commit 061d631f7de24cae30a1f931f18df643cba58246 Author: Ioana Ciornei Date: Thu Oct 1 18:11:48 2020 +0300 dpaa2-eth: add support for devlink parser error drop traps Add support for the new group of devlink traps - PARSER_ERROR_DROPS. This consists of registering the array of parser error drops supported, controlling their action through the .trap_group_action_set() callback and reporting an erroneous skb received on the error queue appropriately. DPAA2 devices do not support controlling the action of independent parser error traps, thus the .trap_action_set() callback just returns an EOPNOTSUPP while .trap_group_action_set() actually notifies the hardware what it should do with a frame marked as having a header error. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit ceeb03ad8e22ec6f9100d1bf1e2bc1b7adf6c8ac Author: Ioana Ciornei Date: Thu Oct 1 18:11:47 2020 +0300 dpaa2-eth: add basic devlink support Add basic support in dpaa2-eth for devlink. For the moment, just register the device with devlink, add the corresponding devlink port and implement the .info_get() callback. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit c50bf2be7306cd37e4a8228acfe0fee36b9097dc Author: Ioana Ciornei Date: Thu Oct 1 18:11:46 2020 +0300 devlink: add .trap_group_action_set() callback Add a new devlink callback, .trap_group_action_set(), which can be used by device drivers which do not support controlling the action (drop, trap) on each trap but rather on the entire group trap. If this new callback is populated, it will take precedence over the .trap_action_set() callback when the user requests a change of all the traps in a group. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 10c24eb23da0dc67934fcc9b5b0f201750ff8cd8 Author: Ioana Ciornei Date: Thu Oct 1 18:11:45 2020 +0300 devlink: add parser error drop packet traps Add parser error drop packet traps, so that capable device driver could register them with devlink. The new packet trap group holds any drops of packets which were marked by the device as erroneous during header parsing. Add documentation for every added packet trap and packet trap group. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 34ad937770d7f17f18f66bdd6b860306a3344d16 Merge: 7b419e658ff75 9e15410dc7450 Author: David S. Miller Date: Fri Oct 2 16:30:01 2020 -0700 Merge branch 'ionic-error-recovery' Shannon Nelson says: ==================== ionic error recovery This set of patches comes mostly from error recovery path testing, as well as a couple of upstream review comments. ==================== Signed-off-by: David S. Miller commit 9e15410dc7450b8fbc31909efc2c7100f1e9be5e Author: Shannon Nelson Date: Thu Oct 1 09:22:46 2020 -0700 ionic: add new bad firmware error code If the new firmware image downladed for update is corrupted or is a bad format, the download process will report a status code specifically for that. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit bb9f80f31d37c8bffd2d957da73fee5ff42a3dc2 Author: Shannon Nelson Date: Thu Oct 1 09:22:45 2020 -0700 ionic: use lif ident for filter count Use the lif's ident information for the uc and mc filter counts rather than the ionic's version, to be sure we're getting the info that is specific to this lif. While we're thinking about it, add some missing error checking where we get the lif's identity information. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit a21b5d49e77a2ec732b3dc7c9204c92125b0fa7a Author: Shannon Nelson Date: Thu Oct 1 09:22:44 2020 -0700 ionic: refill lif identity after fw_up After we do a fw upgrade and refill the ionic->ident.dev, we also need to update the other identity info. Since the lif identity needs to be updated each time the ionic identity is refreshed, we can pull it into ionic_identify(). The debugfs entry is moved so that it doesn't cause an error message when the data is refreshed after the fw upgrade. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit ba6ab8aca216d9be1a2eb3c96a7a8686fe9a1619 Author: Shannon Nelson Date: Thu Oct 1 09:22:43 2020 -0700 ionic: disable all queue napi contexts on timeout Some time ago we short-circuited the queue disables on a timeout error in order to not have to wait on every queue when we already know it will time out. However, this meant that we're not properly stopping all the interrupts and napi contexts. This changes queue disable to always call ionic_qcq_disable() and to give it an argument to know when to not do the adminq request. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 7c737fc43ca0ab81f92cdb2c448b2bc114d53179 Author: Shannon Nelson Date: Thu Oct 1 09:22:42 2020 -0700 ionic: check qcq ptr in ionic_qcq_disable There are a couple of error recovery paths that can come through ionic_qcq_disable() without having set up the qcq, so we need to make sure we have a valid qcq pointer before using it. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 2c580d7783c78c115cea9e50b43477f3eab5076d Author: Shannon Nelson Date: Thu Oct 1 09:22:41 2020 -0700 ionic: clear linkcheck bit on alloc fail Clear our link check requested flag on an allocation error. We end up dropping this link check request, but that should be fine as our watchdog will come back a few seconds later and request it again. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 52733cff9b6e9fc2868d10fb7171f690dcb8b5a7 Author: Shannon Nelson Date: Thu Oct 1 09:22:40 2020 -0700 ionic: drain the work queue Check through our work list for additional items. This normally will only have one item, but occasionally may have another job waiting. There really is no need reschedule ourself here. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 9576a36cc107ba206c182a6ae9fb179db6f32bef Author: Shannon Nelson Date: Thu Oct 1 09:22:39 2020 -0700 ionic: contiguous memory for notifyq The event notification queue is set up a little differently in the NIC and so the notifyq q and cq descriptor structures need to be contiguous, which got missed in an earlier patch that separated out the q and cq descriptor allocations. That patch was aimed at making the big tx and rx descriptor queue allocations easier to manage - the notifyq is much smaller and doesn't need to be split. This patch simply adds an if/else and slightly different code for the notifyq descriptor allocation. Fixes: ea5a8b09dc3a ("ionic: reduce contiguous memory allocation requirement") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 7b419e658ff750045d12aaabdae4183660075592 Merge: 14c914fcb515c 5506745537e71 Author: David S. Miller Date: Fri Oct 2 16:22:49 2020 -0700 Merge branch 's390-net-next' Julian Wiedmann says: =================== s390/net: updates 2020-10-01 Patches 1-3 enable qeth to also support the .set_channels() ethtool callback for OSA devices. This completes support for the full range of device types. The other patches are just the usual mix of cleanups. (Even one for ctcm!) =================== Signed-off-by: David S. Miller commit 5506745537e716abb8170e375f3ed9d6c57db2ce Author: Vasily Gorbik Date: Thu Oct 1 19:11:36 2020 +0200 s390/ctcm: remove orphaned function declarations drivers/s390/net/ctcm_fsms.h: fsm_action_nop - only declaration left after commit 04885948b101 ("ctc: removal of the old ctc driver") drivers/s390/net/ctcm_mpc.h: ctcmpc_open - only declaration left after commit 293d984f0e36 ("ctcm: infrastructure for replaced ctc driver") Reviewed-by: Julian Wiedmann Signed-off-by: Vasily Gorbik Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 378ac80d7f4909cd0a1cce706356d0dfbee08621 Author: Julian Wiedmann Date: Thu Oct 1 19:11:35 2020 +0200 s390/qeth: static checker cleanups - Add/delete some blanks, white spaces and braces. - Fix misindentations. - Adjust a deprecated header include, and htons() conversion. - Remove extra 'return' statements. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 84c91482eec419726ab6743d97816084a3e815cc Author: Julian Wiedmann Date: Thu Oct 1 19:11:34 2020 +0200 s390/qeth: use netdev_name() Replace our custom version of netdev_name(). Once we started to allocate the netdev at probe time with commit d3d1b205e89f ("s390/qeth: allocate netdevice early"), this stopped working as intended anyway. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 50144f675363c368400eedd52c6680163b3260eb Author: Julian Wiedmann Date: Thu Oct 1 19:11:33 2020 +0200 s390/qeth: constify the disciplines The discipline struct is a fixed group of function pointers. So declare the L2 and L3 disciplines as constant. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 949bbf4d2db873a6c229a43d816d9f8152b31704 Author: Julian Wiedmann Date: Thu Oct 1 19:11:32 2020 +0200 s390/qeth: allow configuration of TX queues for OSA devices For OSA devices that are _not_ configured in prio-queue mode, give users the option of selecting the number of active TX queues. This requires setting up the HW queues with a reasonable default QoS value in the QIB's PQUE parm area. As with the other device types, we bring up the device with a minimal number of TX queues for compatibility reasons. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 72d5e8504e3b2b83a94403b0bbe3070b70538bb9 Author: Julian Wiedmann Date: Thu Oct 1 19:11:31 2020 +0200 s390/qeth: de-magic the QIB parm area Use a proper struct, and only program the QIB extensions for devices where they are supported. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit bb5ab541942eaee4c5e175a4667df38cfc7da371 Author: Julian Wiedmann Date: Thu Oct 1 19:11:30 2020 +0200 s390/qeth: keep track of wanted TX queues When re-initializing a device, we can hit a situation where qeth_osa_set_output_queues() detects that it supports more or less HW TX queues than before. Right now we adjust dev->real_num_tx_queues from right there, but 1. it's getting more & more complicated to cover all cases, and 2. we can't re-enable the actually expected number of TX queues later because we lost the needed information. So keep track of the wanted TX queues (on initial setup, and whenever its changed via .set_channels), and later use that information when re-enabling the netdevice. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 6500251e590657066a227dce897a0392f302af24 Author: Pujin Shi Date: Fri Oct 2 14:35:38 2020 +0800 scsi: ufs: Fix missing brace warning for old compilers For older versions of gcc, the array = {0}; will cause warnings: drivers/scsi/ufs/ufshcd-crypto.c: In function 'ufshcd_crypto_keyslot_program': drivers/scsi/ufs/ufshcd-crypto.c:62:8: warning: missing braces around initializer [-Wmissing-braces] union ufs_crypto_cfg_entry cfg = { 0 }; ^ drivers/scsi/ufs/ufshcd-crypto.c:62:8: warning: (near initialization for 'cfg.reg_val') [-Wmissing-braces] drivers/scsi/ufs/ufshcd-crypto.c: In function 'ufshcd_clear_keyslot': drivers/scsi/ufs/ufshcd-crypto.c:103:8: warning: missing braces around initializer [-Wmissing-braces] union ufs_crypto_cfg_entry cfg = { 0 }; ^ 2 warnings generated Link: https://lore.kernel.org/r/20201002063538.1250-1-shipujin.t@gmail.com Fixes: 70297a8ac7a7 ("scsi: ufs: UFS crypto API") Reviewed-by: Eric Biggers Signed-off-by: Pujin Shi Signed-off-by: Martin K. Petersen commit 72e813d9a1b7a0a6dc6b27b563c389fbdb50cee2 Author: Ye Bin Date: Wed Sep 30 10:25:15 2020 +0800 scsi: qla2xxx: Fix inconsistent format argument type in qla_dbg.c Fix the following warning: [drivers/scsi/qla2xxx/qla_dbg.c:2451]: (warning) %ld in format string (no. 4) requires 'long' but the argument type is 'unsigned long'. Link: https://lore.kernel.org/r/20200930022515.2862532-4-yebin10@huawei.com Reported-by: Hulk Robot Reviewed-by: Himanshu Madhani Reviewed-by: Nilesh Javali Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit 250bd00923c72c846092271a9e51ee373db081b6 Author: Ye Bin Date: Wed Sep 30 10:25:14 2020 +0800 scsi: qla2xxx: Fix inconsistent format argument type in qla_os.c Fix the following warnings: [drivers/scsi/qla2xxx/qla_os.c:4882]: (warning) %ld in format string (no. 2) requires 'long' but the argument type is 'unsigned long'. [drivers/scsi/qla2xxx/qla_os.c:5011]: (warning) %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. Link: https://lore.kernel.org/r/20200930022515.2862532-3-yebin10@huawei.com Reported-by: Hulk Robot Reviewed-by: Himanshu Madhani Reviewed-by: Nilesh Javali Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit 7f5523f6970932e982d3da51ce0208b74c437140 Author: Ye Bin Date: Wed Sep 30 10:25:13 2020 +0800 scsi: qla2xxx: Fix inconsistent format argument type in tcm_qla2xxx.c Fix the following warnings: [drivers/scsi/qla2xxx/tcm_qla2xxx.c:884]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [drivers/scsi/qla2xxx/tcm_qla2xxx.c:885]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [drivers/scsi/qla2xxx/tcm_qla2xxx.c:886]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [drivers/scsi/qla2xxx/tcm_qla2xxx.c:887]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [drivers/scsi/qla2xxx/tcm_qla2xxx.c:888]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. Link: https://lore.kernel.org/r/20200930022515.2862532-2-yebin10@huawei.com Reported-by: Hulk Robot Reviewed-by: Himanshu Madhani Reviewed-by: Nilesh Javali Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit 0610959fbbca62b534f1f276873fd297f76b164b Author: Mike Christie Date: Thu Oct 1 10:35:54 2020 -0500 scsi: sd: Allow user to configure command retries Some iSCSI targets went with the traditional "export N ports" approach and then allowed the initiator to multipath over them. Other targets went the opposite direction and export a single port, and then software on the target side performs load balancing and failover to other targets via an iSCSI specific feature or IP takover. The problem for the 2nd type of config is we quickly run out of our five retries and get I/O errors. In these setups we want to reduce resource use on the initiator side so we only wanted the one session and no dm-multipath. To handle traditional multipath operations like failover we do IP takover on the target side. So we would have an iSCSI target running on node1. Some monitoring software decides it's dead or the node is overloaded so it starts the iSCSI target on node2. The problem is for the failover case where we might have the equivalent of a dm-multipath temporary all paths down, or we just have to try more than 5 nodes before finding a good one. To handle this type of issue allow the user to configure the disk cmd retries from -1 to the current max of 5. -1 means infinite retries and should be used for setups where some other setting is going to control when to fail. For example iSCSI has the replacement/recovery timeout and fc (some users have used FC with NPIV and done something similar as IP takover) has dev_loss_tmo/fast_io_fail which will eventually expire and fail I/O. Link: https://lore.kernel.org/r/1601566554-26752-3-git-send-email-michael.christie@oracle.com Reviewed-by: Bart Van Assche Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 2a242d59d6b908341c0d426bc6e7f8e28871cbd0 Author: Mike Christie Date: Thu Oct 1 10:35:53 2020 -0500 scsi: core: Add limitless cmd retry support Add infinite retry support to SCSI midlayer by combining common checks for retries into some helper functions, and then checking for the -1/SCSI_CMD_RETRIES_NO_LIMIT. Link: https://lore.kernel.org/r/1601566554-26752-2-git-send-email-michael.christie@oracle.com Reviewed-by: Bart Van Assche Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 14c914fcb515c424177bb6848cc2858ebfe717a8 Merge: 0c2a01dc27f68 70442ee62d70c Author: David S. Miller Date: Fri Oct 2 15:42:40 2020 -0700 Merge tag 'wireless-drivers-next-2020-10-02' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.10 Third set of patches for v5.10. Lots of iwlwifi patches this time, but also few patches ath11k and of course smaller changes to other drivers. Major changes: rtw88 * properly recover from firmware crashes on 8822c * dump firmware crash log iwlwifi * protected Target Wake Time (TWT) implementation * support disabling 5.8GHz channels via ACPI * support VHT extended NSS capability * enable Target Wake Time (TWT) by default ath11k * improvements to QCA6390 PCI support to make it more usable ==================== Signed-off-by: David S. Miller commit 0c2a01dc27f68024108b7303002678bd72446a4e Merge: 26d0a8edca288 8cd6b020b644d Author: David S. Miller Date: Fri Oct 2 15:40:30 2020 -0700 Merge branch 'Offload-tc-flower-to-mscc_ocelot-switch-using-VCAP-chains' Vladimir Oltean says: ==================== Offload tc-flower to mscc_ocelot switch using VCAP chains The purpose of this patch is to add more comprehensive support for flow offloading in the mscc_ocelot library and switch drivers. The design (with chains) is the result of this discussion: https://lkml.org/lkml/2020/6/2/203 I have tested it on Seville VSC9953 and Felix VSC9959, but it should also work on Ocelot-1 VSC7514. ==================== Signed-off-by: David S. Miller commit 8cd6b020b644d1f1fc2a8768032b8cb8472ab352 Author: Vladimir Oltean Date: Fri Oct 2 15:02:28 2020 +0300 selftests: ocelot: add some example VCAP IS1, IS2 and ES0 tc offloads Provide an example script which can be used as a skeleton for offloading TCAM rules in the Ocelot switches. Not all actions are demoed, mostly because of difficulty to automate this from a single board. For example, policing. We can set up an iperf3 UDP server and client and measure throughput at destination. But at least with DSA setups, network namespacing the individual ports is not possible because all switch ports are handled by the same DSA master. And we cannot assume that the target platform (an embedded board) has 2 other non-switch generator ports, we need to work with the generator ports as switch ports (this is the reason why mausezahn is used, and not IP traffic like ping). When somebody has an idea how to test policing, that can be added to this test. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 16a7a15f4b14c4e188d153786f433f1c8f103ebb Author: Vladimir Oltean Date: Fri Oct 2 15:02:27 2020 +0300 net: mscc: ocelot: offload redirect action to VCAP IS2 Via the OCELOT_MASK_MODE_REDIRECT flag put in the IS2 action vector, it is possible to replace previous forwarding decisions with the port mask installed in this rule. I have studied Table 54 "MASK_MODE and PORT_MASK Combinations" from the VSC7514 documentation and it appears to behave sanely when this rule is installed in either lookup 0 or 1. Namely, a redirect in lookup 1 will overwrite the forwarding decision taken by any entry in lookup 0. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f854e6f6f450c988cf2531e9551431de300a8719 Author: Vladimir Oltean Date: Fri Oct 2 15:02:26 2020 +0300 net: mscc: ocelot: relax ocelot_exclusive_mac_etype_filter_rules() The issue which led to the introduction of this check was that MAC_ETYPE rules, such as filters on dst_mac and src_mac, would only match non-IP frames. There is a knob in VCAP_S2_CFG which forces all IP frames to be treated as non-IP, which is what we're currently doing if the user requested a dst_mac filter, in order to maintain sanity. But that knob is actually per IS2 lookup. And the good thing with exposing the lookups to the user via tc chains is that we're now able to offload MAC_ETYPE keys to one lookup, and IP keys to the other lookup. So let's do that. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 226e9cd82a96a834dcd158b3324509984fa180f5 Author: Vladimir Oltean Date: Fri Oct 2 15:02:25 2020 +0300 net: mscc: ocelot: only install TCAM entries into a specific lookup and PAG We were installing TCAM rules with the LOOKUP field as unmasked, meaning that all entries were matching on all lookups. Now that lookups are exposed as individual chains, let's make the LOOKUP explicit when offloading TCAM entries. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2f17c050d8926a62ed53dce6d8a703f38c4d5d6f Author: Xiaoliang Yang Date: Fri Oct 2 15:02:24 2020 +0300 net: mscc: ocelot: offload egress VLAN rewriting to VCAP ES0 VCAP ES0 is an egress VCAP operating on all outgoing frames. This patch added ES0 driver to support vlan push action of tc filter. Usage: tc filter add dev swp1 egress protocol 802.1Q flower indev swp0 skip_sw \ vlan_id 1 vlan_prio 1 action vlan push id 2 priority 2 Signed-off-by: Xiaoliang Yang Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 75944fda1dfe836fdd406bef6cb3cc8a80f7af83 Author: Xiaoliang Yang Date: Fri Oct 2 15:02:23 2020 +0300 net: mscc: ocelot: offload ingress skbedit and vlan actions to VCAP IS1 VCAP IS1 is a VCAP module which can filter on the most common L2/L3/L4 Ethernet keys, and modify the results of the basic QoS classification and VLAN classification based on those flow keys. There are 3 VCAP IS1 lookups, mapped over chains 10000, 11000 and 12000. Currently the driver is hardcoded to use IS1_ACTION_TYPE_NORMAL half keys. Note that the VLAN_MANGLE has been omitted for now. In hardware, the VCAP_IS1_ACT_VID_REPLACE_ENA field replaces the classified VLAN (metadata associated with the frame) and not the VLAN from the header itself. There are currently some issues which need to be addressed when operating in standalone, or in bridge with vlan_filtering=0 modes, because in those cases the switch ports have VLAN awareness disabled, and changing the classified VLAN to anything other than the pvid causes the packets to be dropped. Another issue is that on egress, we expect port tagging to push the classified VLAN, but port tagging is disabled in the modes mentioned above, so although the classified VLAN is replaced, it is not visible in the packet transmitted by the switch. Signed-off-by: Xiaoliang Yang Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1397a2eb52e20e20363cc0a1cb707d5eb473dbb7 Author: Vladimir Oltean Date: Fri Oct 2 15:02:22 2020 +0300 net: mscc: ocelot: create TCAM skeleton from tc filter chains For Ocelot switches, there are 2 ingress pipelines for flow offload rules: VCAP IS1 (Ingress Classification) and IS2 (Security Enforcement). IS1 and IS2 support different sets of actions. The pipeline order for a packet on ingress is: Basic classification -> VCAP IS1 -> VCAP IS2 Furthermore, IS1 is looked up 3 times, and IS2 is looked up twice (each TCAM entry can be configured to match only on the first lookup, or only on the second, or on both etc). Because the TCAMs are completely independent in hardware, and because of the fixed pipeline, we actually have very limited options when it comes to offloading complex rules to them while still maintaining the same semantics with the software data path. This patch maps flow offload rules to ingress TCAMs according to a predefined chain index number. There is going to be a script in selftests that clarifies the usage model. There is also an egress TCAM (VCAP ES0, the Egress Rewriter), which is modeled on top of the default chain 0 of the egress qdisc, because it doesn't have multiple lookups. Suggested-by: Allan W. Nielsen Co-developed-by: Xiaoliang Yang Signed-off-by: Xiaoliang Yang Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 319e4dd11a207bac2eaa9b96060145cd0d4c12d2 Author: Vladimir Oltean Date: Fri Oct 2 15:02:21 2020 +0300 net: mscc: ocelot: introduce conversion helpers between port and netdev Since the mscc_ocelot_switch_lib is common between a pure switchdev and a DSA driver, the procedure of retrieving a net_device for a certain port index differs, as those are registered by their individual front-ends. Up to now that has been dealt with by always passing the port index to the switch library, but now, we're going to need to work with net_device pointers from the tc-flower offload, for things like indev, or mirred. It is not desirable to refactor that, so let's make sure that the flower offload core has the ability to translate between a net_device and a port index properly. Signed-off-by: Vladimir Oltean Acked-by: Alexandre Belloni Signed-off-by: David S. Miller commit ea9d1f30b128c2bc5f429b3bd822b45ac9bf5114 Author: Vladimir Oltean Date: Fri Oct 2 15:02:20 2020 +0300 net: mscc: ocelot: offload multiple tc-flower actions in same rule At this stage, the tc-flower offload of mscc_ocelot can only delegate rules to the VCAP IS2 security enforcement block. These rules have, in hardware, separate bits for policing and for overriding the destination port mask and/or copying to the CPU. So it makes sense that we attempt to expose some more of that low-level complexity instead of simply choosing between a single type of action. Something similar happens with the VCAP IS1 block, where the same action can contain enable bits for VLAN classification and for QoS classification at the same time. So model the action structure after the hardware description, and let the high-level ocelot_flower.c construct an action vector from multiple tc actions. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7010645ba7256992818b518163f46bd4cdf8002a Author: Roman Bolshakov Date: Tue Sep 29 15:59:57 2020 +0300 scsi: target: core: Add CONTROL field for trace events trace-cmd report doesn't show events from target subsystem because scsi_command_size() leaks through event format string: [target:target_sequencer_start] function scsi_command_size not defined [target:target_cmd_complete] function scsi_command_size not defined Addition of scsi_command_size() to plugin_scsi.c in trace-cmd doesn't help because an expression is used inside TP_printk(). trace-cmd event parser doesn't understand minus sign inside [ ]: Error: expected ']' but read '-' Rather than duplicating kernel code in plugin_scsi.c, provide a dedicated field for CONTROL byte. Link: https://lore.kernel.org/r/20200929125957.83069-1-r.bolshakov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 26d0a8edca2886ed82838510bf44b6b68613641c Merge: 4f359b653f7f5 75f87eaeaced8 Author: David S. Miller Date: Fri Oct 2 15:33:13 2020 -0700 Merge tag 'mac80211-next-for-net-next-2020-10-02' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Another set of changes, this time with: * lots more S1G band support * 6 GHz scanning, finally * kernel-doc fixes * non-split wiphy dump fixes in nl80211 * various other small cleanups/features ==================== Signed-off-by: David S. Miller commit 4f359b653f7f598c29a1fbcf69fa975bf510061b Author: Łukasz Stelmach Date: Wed Sep 30 16:25:25 2020 +0200 net/smscx5xx: change to of_get_mac_address() eth_platform_get_mac_address() Use more generic eth_platform_get_mac_address() which can get a MAC address from other than DT platform specific sources too. Check if the obtained address is valid. Signed-off-by: Łukasz Stelmach Signed-off-by: David S. Miller commit fb91db01c652ba9391f67c21db2d5260448b3efd Merge: 60a128b532d88 91274ca535185 Author: Alexei Starovoitov Date: Fri Oct 2 15:18:40 2020 -0700 Merge branch 'Add skb_adjust_room() for SK_SKB' John Fastabend says: ==================== This implements the helper skb_adjust_room() for BPF_SKS_SK_STREAM_VERDICT programs so we can push/pop headers from the data on recieve. One use case is to pop TLS headers off kTLS packets. The first patch implements the helper and the second updates test_sockmap to use it removing some case handling we had to do earlier to account for the TLS headers in the kTLS tests. v1->v2: Fix error path for TLS case (Daniel) check mode input is 0 because we don't use it now (Daniel) Remove incorrect/misleading comment (Lorenz) Thanks, John Acked-by: Martin KaFai Lau --- ==================== Signed-off-by: Alexei Starovoitov commit 91274ca535185813cd5eebfe5a4d3344750c74e3 Author: John Fastabend Date: Thu Oct 1 18:10:09 2020 -0700 bpf, sockmap: Update selftests to use skb_adjust_room Instead of working around TLS headers in sockmap selftests use the new skb_adjust_room helper. This allows us to avoid special casing the receive side to skip headers. Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160160100932.7052.3646935243867660528.stgit@john-Precision-5820-Tower commit 18ebe16d10496db795a9930c320c45653207a548 Author: John Fastabend Date: Thu Oct 1 18:09:52 2020 -0700 bpf, sockmap: Add skb_adjust_room to pop bytes off ingress payload This implements a new helper skb_adjust_room() so users can push/pop extra bytes from a BPF_SK_SKB_STREAM_VERDICT program. Some protocols may include headers and other information that we may not want to include when doing a redirect from a BPF_SK_SKB_STREAM_VERDICT program. One use case is to redirect TLS packets into a receive socket that doesn't expect TLS data. In TLS case the first 13B or so contain the protocol header. With KTLS the payload is decrypted so we should be able to redirect this to a receiving socket, but the receiving socket may not be expecting to receive a TLS header and discard the data. Using the above helper we can pop the header off and put an appropriate header on the payload. This allows for creating a proxy between protocols without extra hops through the stack or userspace. So in order to fix this case add skb_adjust_room() so users can strip the header. After this the user can strip the header and an unmodified receiver thread will work correctly when data is redirected into the ingress path of a sock. Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160160099197.7052.8443193973242831692.stgit@john-Precision-5820-Tower commit a3d0ba883ce05775d53a4db903bafc09ec3ba182 Author: Kurt Kanzenbach Date: Fri Oct 2 08:20:51 2020 +0200 dt-bindings: net: dsa: b53: Add missing reg property to example The switch has a certain MDIO address and this needs to be specified using the reg property. Add it to the example. Signed-off-by: Kurt Kanzenbach Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 60a128b532d88ac78d8dd60577700dea70ee8c38 Merge: 440c5752a3cad 00dc73e44a846 Author: Alexei Starovoitov Date: Fri Oct 2 15:05:37 2020 -0700 Merge branch 'bpf: BTF support for ksyms' Hao Luo says: ==================== v3 -> v4: - Rebasing - Cast bpf_[per|this]_cpu_ptr's parameter to void __percpu * before passing into per_cpu_ptr. v2 -> v3: - Rename functions and variables in verifier for better readability. - Stick to logging message convention in libbpf. - Move bpf_per_cpu_ptr and bpf_this_cpu_ptr from trace-specific helper set to base helper set. - More specific test in ksyms_btf. - Fix return type cast in bpf_*_cpu_ptr. - Fix btf leak in ksyms_btf selftest. - Fix return error code for kallsyms_find(). v1 -> v2: - Move check_pseudo_btf_id from check_ld_imm() to replace_map_fd_with_map_ptr() and rename the latter. - Add bpf_this_cpu_ptr(). - Use bpf_core_types_are_compat() in libbpf.c for checking type compatibility. - Rewrite typed ksym extern type in BTF with int to save space. - Minor revision of bpf_per_cpu_ptr()'s comments. - Avoid using long in tests that use skeleton. - Refactored test_ksyms.c by moving kallsyms_find() to trace_helpers.c - Fold the patches that sync include/linux/uapi and tools/include/linux/uapi. rfc -> v1: - Encode VAR's btf_id for PSEUDO_BTF_ID. - More checks in verifier. Checking the btf_id passed as PSEUDO_BTF_ID is valid VAR, its name and type. - Checks in libbpf on type compatibility of ksyms. - Add bpf_per_cpu_ptr() to access kernel percpu vars. Introduced new ARG and RET types for this helper. This patch series extends the previously added __ksym externs with btf support. Right now the __ksym externs are treated as pure 64-bit scalar value. Libbpf replaces ld_imm64 insn of __ksym by its kernel address at load time. This patch series extend those externs with their btf info. Note that btf support for __ksym must come with the kernel btf that has VARs encoded to work properly. The corresponding chagnes in pahole is available at [1] (with a fix at [2] for gcc 4.9+). The first 3 patches in this series add support for general kernel global variables, which include verifier checking (01/06), libpf support (02/06) and selftests for getting typed ksym extern's kernel address (03/06). The next 3 patches extends that capability further by introducing helpers bpf_per_cpu_ptr() and bpf_this_cpu_ptr(), which allows accessing kernel percpu variables correctly (04/06 and 05/06). The tests of this feature were performed against pahole that is extended with [1] and [2]. For kernel BTF that does not have VARs encoded, the selftests will be skipped. [1] https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=f3d9054ba8ff1df0fc44e507e3a01c0964cabd42 [2] https://www.spinics.net/lists/dwarves/msg00451.html ==================== Signed-off-by: Alexei Starovoitov commit 00dc73e44a846fc5310df0e1415a90af76cc135e Author: Hao Luo Date: Tue Sep 29 16:50:49 2020 -0700 bpf/selftests: Test for bpf_per_cpu_ptr() and bpf_this_cpu_ptr() Test bpf_per_cpu_ptr() and bpf_this_cpu_ptr(). Test two paths in the kernel. If the base pointer points to a struct, the returned reg is of type PTR_TO_BTF_ID. Direct pointer dereference can be applied on the returned variable. If the base pointer isn't a struct, the returned reg is of type PTR_TO_MEM, which also supports direct pointer dereference. Signed-off-by: Hao Luo Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200929235049.2533242-7-haoluo@google.com commit 63d9b80dcf2c67bc5ade61cbbaa09d7af21f43f1 Author: Hao Luo Date: Tue Sep 29 16:50:48 2020 -0700 bpf: Introducte bpf_this_cpu_ptr() Add bpf_this_cpu_ptr() to help access percpu var on this cpu. This helper always returns a valid pointer, therefore no need to check returned value for NULL. Also note that all programs run with preemption disabled, which means that the returned pointer is stable during all the execution of the program. Signed-off-by: Hao Luo Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200929235049.2533242-6-haoluo@google.com commit eaa6bcb71ef6ed3dc18fc525ee7e293b06b4882b Author: Hao Luo Date: Tue Sep 29 16:50:47 2020 -0700 bpf: Introduce bpf_per_cpu_ptr() Add bpf_per_cpu_ptr() to help bpf programs access percpu vars. bpf_per_cpu_ptr() has the same semantic as per_cpu_ptr() in the kernel except that it may return NULL. This happens when the cpu parameter is out of range. So the caller must check the returned value. Signed-off-by: Hao Luo Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200929235049.2533242-5-haoluo@google.com commit 2c2f6abeff1322a61f5ad7ce0ecccabf53e4fad5 Author: Hao Luo Date: Tue Sep 29 16:50:46 2020 -0700 selftests/bpf: Ksyms_btf to test typed ksyms Selftests for typed ksyms. Tests two types of ksyms: one is a struct, the other is a plain int. This tests two paths in the kernel. Struct ksyms will be converted into PTR_TO_BTF_ID by the verifier while int typed ksyms will be converted into PTR_TO_MEM. Signed-off-by: Hao Luo Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200929235049.2533242-4-haoluo@google.com commit d370bbe1214381f444cbd9cdf3b8647223abb536 Author: Hao Luo Date: Tue Sep 29 16:50:45 2020 -0700 bpf/libbpf: BTF support for typed ksyms If a ksym is defined with a type, libbpf will try to find the ksym's btf information from kernel btf. If a valid btf entry for the ksym is found, libbpf can pass in the found btf id to the verifier, which validates the ksym's type and value. Typeless ksyms (i.e. those defined as 'void') will not have such btf_id, but it has the symbol's address (read from kallsyms) and its value is treated as a raw pointer. Signed-off-by: Hao Luo Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200929235049.2533242-3-haoluo@google.com commit 4976b718c3551faba2c0616ef55ebeb74db1c5ca Author: Hao Luo Date: Tue Sep 29 16:50:44 2020 -0700 bpf: Introduce pseudo_btf_id Pseudo_btf_id is a type of ld_imm insn that associates a btf_id to a ksym so that further dereferences on the ksym can use the BTF info to validate accesses. Internally, when seeing a pseudo_btf_id ld insn, the verifier reads the btf_id stored in the insn[0]'s imm field and marks the dst_reg as PTR_TO_BTF_ID. The btf_id points to a VAR_KIND, which is encoded in btf_vminux by pahole. If the VAR is not of a struct type, the dst reg will be marked as PTR_TO_MEM instead of PTR_TO_BTF_ID and the mem_size is resolved to the size of the VAR's type. >From the VAR btf_id, the verifier can also read the address of the ksym's corresponding kernel var from kallsyms and use that to fill dst_reg. Therefore, the proper functionality of pseudo_btf_id depends on (1) kallsyms and (2) the encoding of kernel global VARs in pahole, which should be available since pahole v1.18. Signed-off-by: Hao Luo Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200929235049.2533242-2-haoluo@google.com commit de22d2107ced3cc5355cc9dbbd85e44183546bd5 Author: Atish Patra Date: Thu Sep 17 15:37:16 2020 -0700 RISC-V: Add page table dump support for uefi Extend the current page table dump support in RISC-V to include efi pages as well. Here is the output of efi runtime page table mappings. ---[ UEFI runtime start ]--- 0x0000000020002000-0x0000000020003000 0x00000000be732000 4K PTE D A . . . W R V 0x0000000020018000-0x0000000020019000 0x00000000be738000 4K PTE D A . . . W R V 0x000000002002c000-0x000000002002d000 0x00000000be73c000 4K PTE D A . . . W R V 0x0000000020031000-0x0000000020032000 0x00000000bff61000 4K PTE D A . . X W R V ---[ UEFI runtime end ]--- Signed-off-by: Atish Patra Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit b91540d52a08b65eb6a2b09132e1bd54fa82754c Author: Atish Patra Date: Thu Sep 17 15:37:15 2020 -0700 RISC-V: Add EFI runtime services This patch adds EFI runtime service support for RISC-V. Signed-off-by: Atish Patra [ardb: - Remove the page check] Signed-off-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Signed-off-by: Palmer Dabbelt commit d7071743db31b4f6898b1c742e4b451bb4bc4b02 Author: Atish Patra Date: Thu Sep 17 15:37:14 2020 -0700 RISC-V: Add EFI stub support. Add a RISC-V architecture specific stub code that actually copies the actual kernel image to a valid address and jump to it after boot services are terminated. Enable UEFI related kernel configs as well for RISC-V. Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20200421033336.9663-4-atish.patra@wdc.com [ardb: - move hartid fetch into check_platform_features() - use image_size not reserve_size - select ISA_C - do not use dram_base] Signed-off-by: Ard Biesheuvel Signed-off-by: Palmer Dabbelt commit cb7d2dd5612a77a2597c00fce770a52c921e2ea5 Author: Atish Patra Date: Thu Sep 17 15:37:13 2020 -0700 RISC-V: Add PE/COFF header for EFI stub Linux kernel Image can appear as an EFI application With appropriate PE/COFF header fields in the beginning of the Image header. An EFI application loader can directly load a Linux kernel Image and an EFI stub residing in kernel can boot Linux kernel directly. Add the necessary PE/COFF header. Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20200421033336.9663-3-atish.patra@wdc.com [ardb: - use C prefix for c.li to ensure the expected opcode is emitted - align all image sections according to PE/COFF section alignment ] Signed-off-by: Ard Biesheuvel Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit e8dcb61f2ade040a372d66907d220dd3fdee2505 Author: Atish Patra Date: Thu Sep 17 15:37:12 2020 -0700 RISC-V: Implement late mapping page table allocation functions Currently, page table setup is done during setup_va_final where fixmap can be used to create the temporary mappings. The physical frame is allocated from memblock_alloc_* functions. However, this won't work if page table mapping needs to be created for a different mm context (i.e. efi mm) at a later point of time. Use generic kernel page allocation function & macros for any mapping after setup_vm_final. Signed-off-by: Atish Patra Reviewed-by: Anup Patel Acked-by: Mike Rapoport Signed-off-by: Palmer Dabbelt commit 6262f661ff5d7d6a2613b95d0b7820c60b46b0b5 Author: Atish Patra Date: Thu Sep 17 15:37:11 2020 -0700 RISC-V: Add early ioremap support UEFI uses early IO or memory mappings for runtime services before normal ioremap() is usable. Add the necessary fixmap bindings and pmd mappings for generic ioremap support to work. Signed-off-by: Atish Patra Reviewed-by: Anup Patel Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 8f3a2b4a96dc014e99e1df327db1450fdbbd5e15 Author: Anup Patel Date: Thu Sep 17 15:37:10 2020 -0700 RISC-V: Move DT mapping outof fixmap Currently, RISC-V reserves 1MB of fixmap memory for device tree. However, it maps only single PMD (2MB) space for fixmap which leaves only < 1MB space left for other kernel features such as early ioremap which requires fixmap as well. The fixmap size can be increased by another 2MB but it brings additional complexity and changes the virtual memory layout as well. If we require some additional feature requiring fixmap again, it has to be moved again. Technically, DT doesn't need a fixmap as the memory occupied by the DT is only used during boot. That's why, We map device tree in early page table using two consecutive PGD mappings at lower addresses (< PAGE_OFFSET). This frees lot of space in fixmap and also makes maximum supported device tree size supported as PGDIR_SIZE. Thus, init memory section can be used for the same purpose as well. This simplifies fixmap implementation. Signed-off-by: Anup Patel Signed-off-by: Atish Patra Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 8a3f30c4319dc70547f11c18da2e7b5987543aa1 Merge: 54701a0d12e2e 762cd288fc4a2 Author: Palmer Dabbelt Date: Fri Oct 2 14:29:51 2020 -0700 Merge tag 'efi-riscv-shared-for-v5.10' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/efi/efi into for-next Stable branch for v5.10 shared between the EFI and RISC-V trees The RISC-V EFI boot and runtime support will be merged for v5.10 via the RISC-V tree. However, it incorporates some changes that conflict with other EFI changes that are in flight, so this tag serves as a shared base that allows those conflicts to be resolved beforehand. * tag 'efi-riscv-shared-for-v5.10' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi/libstub: arm32: Use low allocation for the uncompressed kernel efi/libstub: Export efi_low_alloc_above() to other units efi/libstub: arm32: Base FDT and initrd placement on image address efi: Rename arm-init to efi-init common for all arch include: pe.h: Add RISC-V related PE definition commit 3f32131fbbbf86cf44487ce033b2b27380ec49fa Author: Łukasz Stelmach Date: Fri Oct 2 14:22:43 2020 +0200 spi: spi-s3c64xx: Turn on interrupts upon resume s3c64xx_spi_hwinit() disables interrupts. In s3c64xx_spi_probe() after calling s3c64xx_spi_hwinit() they are enabled with the following call. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201002122243.26849-10-l.stelmach@samsung.com Signed-off-by: Mark Brown commit 9fe26adbe37fddeddb87e45adbc94ce2cd470ff1 Author: Łukasz Stelmach Date: Fri Oct 2 14:22:42 2020 +0200 spi: spi-s3c64xx: Increase transfer timeout Increase timeout by 30 ms for some wiggle room and set the minimum value to 100 ms. This ensures a non-zero value for short transfers which may take less than 1 ms. The timeout value does not affect performance because it is used with a completion. Similar formula is used in other drivers e.g. sun4i, sun6i. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201002122243.26849-9-l.stelmach@samsung.com Signed-off-by: Mark Brown commit 20b4016a3bea0ce0a94bf4f20f2a9670ea1dfaa3 Author: Łukasz Stelmach Date: Fri Oct 2 14:22:41 2020 +0200 spi: spi-s3c64xx: Ensure cur_speed holds actual clock value Make sure the cur_speed value used in s3c64xx_enable_datapath() to configure DMA channel and in s3c64xx_wait_for_*() to calculate the transfer timeout is set to the actual value of (half) the clock speed. Don't change non-CMU case, because no frequency calculation errors have been reported. Reviewed-by: Krzysztof Kozlowski Suggested-by: Tomasz Figa Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201002122243.26849-8-l.stelmach@samsung.com Signed-off-by: Mark Brown commit 58d54781433f4e02f598e794e1fdb29c3ac07fa1 Author: Łukasz Stelmach Date: Fri Oct 2 14:22:40 2020 +0200 spi: spi-s3c64xx: Fix doc comment for struct s3c64xx_spi_driver_data Remove descriptions for non-existent fields and fix indentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201002122243.26849-7-l.stelmach@samsung.com Signed-off-by: Mark Brown commit 913ba5c9e22789ed144a86f002a3e5e8b10c7525 Author: Łukasz Stelmach Date: Fri Oct 2 14:22:39 2020 +0200 spi: spi-s3c64xx: Rename S3C64XX_SPI_SLAVE_* to S3C64XX_SPI_CS_* Rename S3C64XX_SPI_SLAVE_* to S3C64XX_SPI_CS_* to match documentation. Signed-off-by: Łukasz Stelmach Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201002122243.26849-6-l.stelmach@samsung.com Signed-off-by: Mark Brown commit df7cd1bba2c78c04e6a6ed6b95fc3a7b4be83f3a Author: Łukasz Stelmach Date: Fri Oct 2 14:22:38 2020 +0200 spi: spi-s3c64xx: Report more information when errors occur Report amount of pending data when a transfer stops due to errors. Report if DMA was used to transfer data and print the status code. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201002122243.26849-5-l.stelmach@samsung.com Signed-off-by: Mark Brown commit 2f4db6f705c5cba85d23836c19b44d9687dc1334 Author: Łukasz Stelmach Date: Fri Oct 2 14:22:37 2020 +0200 spi: spi-s3c64xx: Check return values Check return values in prepare_dma() and s3c64xx_spi_config() and propagate errors upwards. Fixes: 788437273fa8 ("spi: s3c64xx: move to generic dmaengine API") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201002122243.26849-4-l.stelmach@samsung.com Signed-off-by: Mark Brown commit ab4efca29f6479bfae6ef433e757014ed6755710 Author: Łukasz Stelmach Date: Fri Oct 2 14:22:36 2020 +0200 spi: spi-s3s64xx: Add S3C64XX_SPI_QUIRK_CS_AUTO for Exynos3250 Fix issues with DMA transfers bigger than 512 bytes on Exynos3250. Without the patches such transfers fail. The vendor kernel for ARTIK5 handles CS in a simmilar way. Signed-off-by: Łukasz Stelmach Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201002122243.26849-3-l.stelmach@samsung.com Signed-off-by: Mark Brown commit 581e2b41977dfc2d4c26c8e976f89c43bb92f9bf Author: Łukasz Stelmach Date: Fri Oct 2 14:22:35 2020 +0200 spi: spi-s3c64xx: swap s3c64xx_spi_set_cs() and s3c64xx_enable_datapath() Fix issues with DMA transfers bigger than 512 bytes on Exynos3250. Without the patches such transfers fail to complete. This solution to the problem is found in the vendor kernel for ARTIK5 boards based on Exynos3250. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20201002122243.26849-2-l.stelmach@samsung.com Signed-off-by: Mark Brown commit 564a7eed3f349f3cff412759c8bf7f8e77edb3c9 Author: Yuantian Tang Date: Mon Aug 17 16:22:04 2020 +0800 ahci: qoriq: enable acpi support in qoriq ahci driver This patch enables ACPI support in qoriq ahci driver. Signed-off-by: Udit Kumar Signed-off-by: Yuantian Tang Signed-off-by: Jens Axboe commit 6cd32a44f080347e193dea56cd986282361b7007 Author: Liu Shixin Date: Mon Sep 21 16:24:51 2020 +0800 sata, highbank: simplify the return expression of ahci_highbank_suspend Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Jens Axboe commit 8e85f60575d30209779d1b5d41909ef2a41a9d57 Author: Mika Westerberg Date: Fri Oct 2 12:40:35 2020 +0300 ahci: Add Intel Rocket Lake PCH-H RAID PCI IDs Add Intel Rocket Lake PCH-H RAID PCI IDs to the list of supported controllers. Signed-off-by: Mika Westerberg Signed-off-by: Jens Axboe commit cb307c2d845d823da206dcaca80edb71ff9e6bc4 Merge: c16bcd70a11b5 3a68844dd2d8b Author: David S. Miller Date: Fri Oct 2 13:36:07 2020 -0700 Merge branch 'net-dsa-Improve-dsa_untag_bridge_pvid' Florian Fainelli says: ==================== net: dsa: Improve dsa_untag_bridge_pvid() This patch series is based on the recent discussions with Vladimir: https://lore.kernel.org/netdev/20201001030623.343535-1-f.fainelli@gmail.com/ the simplest way forward was to call dsa_untag_bridge_pvid() after eth_type_trans() has been set which guarantees that skb->protocol is set to a correct value and this allows us to utilize __vlan_find_dev_deep_rcu() properly without playing or using the bridge master as a net_device reference. ==================== Signed-off-by: David S. Miller commit 3a68844dd2d8b3fd23f92894b6628e02a530b445 Author: Florian Fainelli Date: Thu Oct 1 19:42:15 2020 -0700 net: dsa: Utilize __vlan_find_dev_deep_rcu() Now that we are guaranteed that dsa_untag_bridge_pvid() is called after eth_type_trans() we can utilize __vlan_find_dev_deep_rcu() which will take care of finding an 802.1Q upper on top of a bridge master. A common use case, prior to 12a1526d067 ("net: dsa: untag the bridge pvid from rx skbs") was to configure a bridge 802.1Q upper like this: ip link add name br0 type bridge vlan_filtering 0 ip link add link br0 name br0.1 type vlan id 1 in order to pop the default_pvid VLAN tag. With this change we restore that behavior while still allowing the DSA receive path to automatically pop the VLAN tag. Signed-off-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit a348292b63156290e72e2df2f724833607d1e403 Author: Florian Fainelli Date: Thu Oct 1 19:42:14 2020 -0700 net: dsa: Obtain VLAN protocol from skb->protocol Now that dsa_untag_bridge_pvid() is called after eth_type_trans() we are guaranteed that skb->protocol will be set to a correct value, thus allowing us to avoid calling vlan_eth_hdr(). Signed-off-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1c5ad5a940387ce03bc6b6ce497e3523963292bd Author: Florian Fainelli Date: Thu Oct 1 19:42:13 2020 -0700 net: dsa: b53: Set untag_bridge_pvid Indicate to the DSA receive path that we need to untage the bridge PVID, this allows us to remove the dsa_untag_bridge_pvid() calls from net/dsa/tag_brcm.c. Signed-off-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1dc0408cdf3caf3a8b8ad97c831ae52d2ab5b953 Author: Florian Fainelli Date: Thu Oct 1 19:42:12 2020 -0700 net: dsa: Call dsa_untag_bridge_pvid() from dsa_switch_rcv() When a DSA switch driver needs to call dsa_untag_bridge_pvid(), it can set dsa_switch::untag_brige_pvid to indicate this is necessary. This is a pre-requisite to making sure that we are always calling dsa_untag_bridge_pvid() after eth_type_trans() has been called. Signed-off-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4a784266c6a75f375e08915b35e909df19eff17f Author: Coly Li Date: Thu Oct 1 14:50:56 2020 +0800 bcache: remove embedded struct cache_sb from struct cache_set Since bcache code was merged into mainline kerrnel, each cache set only as one single cache in it. The multiple caches framework is here but the code is far from completed. Considering the multiple copies of cached data can also be stored on e.g. md raid1 devices, it is unnecessary to support multiple caches in one cache set indeed. The previous preparation patches fix the dependencies of explicitly making a cache set only have single cache. Now we don't have to maintain an embedded partial super block in struct cache_set, the in-memory super block can be directly referenced from struct cache. This patch removes the embedded struct cache_sb from struct cache_set, and fixes all locations where the superb lock was referenced from this removed super block by referencing the in-memory super block of struct cache. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 6f9414e0f6f35c7669dad5ac1a838ce323302f03 Author: Coly Li Date: Thu Oct 1 14:50:55 2020 +0800 bcache: check and set sync status on cache's in-memory super block Currently the cache's sync status is checked and set on cache set's in- memory partial super block. After removing the embedded struct cache_sb from cache set and reference cache's in-memory super block from struct cache_set, the sync status can set and check directly on cache's super block. This patch checks and sets the cache sync status directly on cache's in-memory super block. This is a preparation for later removing embedded struct cache_sb from struct cache_set. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit ebaa1ac12b0c97337a5bad1d57334056791aaa88 Author: Coly Li Date: Thu Oct 1 14:50:54 2020 +0800 bcache: remove can_attach_cache() After removing the embedded struct cache_sb from struct cache_set, cache set will directly reference the in-memory super block of struct cache. It is unnecessary to compare block_size, bucket_size and nr_in_set from the identical in-memory super block in can_attach_cache(). This is a preparation patch for latter removing cache_set->sb from struct cache_set. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 08a17828812adbe965b7af9a0e3e6a6024460cc8 Author: Coly Li Date: Thu Oct 1 14:50:53 2020 +0800 bcache: don't check seq numbers in register_cache_set() In order to update the partial super block of cache set, the seq numbers of cache and cache set are checked in register_cache_set(). If cache's seq number is larger than cache set's seq number, cache set must update its partial super block from cache's super block. It is unncessary when the embedded struct cache_sb is removed from struct cache set. This patch removed the seq numbers checking from register_cache_set(), because later there will be no such partial super block in struct cache set, the cache set will directly reference in-memory super block from struct cache. This is a preparation patch for removing embedded struct cache_sb from struct cache_set. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 63a96c05cd43ccf66cb671af039c7931a840efe8 Author: Coly Li Date: Thu Oct 1 14:50:52 2020 +0800 bcache: only use bucket_bytes() on struct cache Because struct cache_set and struct cache both have struct cache_sb, macro bucket_bytes() currently are used on both of them. When removing the embedded struct cache_sb from struct cache_set, this macro won't be used on struct cache_set anymore. This patch unifies all bucket_bytes() usage only on struct cache, this is one of the preparation to remove the embedded struct cache_sb from struct cache_set. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 3c4fae29826c5fc588aba946189b95dd9fb5e4e9 Author: Coly Li Date: Thu Oct 1 14:50:51 2020 +0800 bcache: remove useless bucket_pages() It seems alloc_bucket_pages() is the only user of bucket_pages(). Considering alloc_bucket_pages() is removed from bcache code, it is safe to remove the useless macro bucket_pages() now. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 421cf1c573b18b0d770a4a47aefa3199eb5b94cf Author: Coly Li Date: Thu Oct 1 14:50:50 2020 +0800 bcache: remove useless alloc_bucket_pages() Now no one uses alloc_bucket_pages() anymore, remove it from bcache.h. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 4e1ebae3ee4e0ce384c33832f66e417a965b64bc Author: Coly Li Date: Thu Oct 1 14:50:49 2020 +0800 bcache: only use block_bytes() on struct cache Because struct cache_set and struct cache both have struct cache_sb, therefore macro block_bytes() can be used on both of them. When removing the embedded struct cache_sb from struct cache_set, this macro won't be used on struct cache_set anymore. This patch unifies all block_bytes() usage only on struct cache, this is one of the preparation to remove the embedded struct cache_sb from struct cache_set. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 1132e56e78e3c8f4deaf68ed760c78456a9c61f4 Author: Coly Li Date: Thu Oct 1 14:50:48 2020 +0800 bcache: add set_uuid in struct cache_set This patch adds a separated set_uuid[16] in struct cache_set, to store the uuid of the cache set. This is the preparation to remove the embedded struct cache_sb from struct cache_set. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 08fdb2cddbdc783fecadfb606868c4498165fc30 Author: Coly Li Date: Thu Oct 1 14:50:47 2020 +0800 bcache: remove for_each_cache() Since now each cache_set explicitly has single cache, for_each_cache() is unnecessary. This patch removes this macro, and update all locations where it is used, and makes sure all code logic still being consistent. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 697e23495c94f0380c1ed8b11f830b92b64c99ea Author: Coly Li Date: Thu Oct 1 14:50:46 2020 +0800 bcache: explicitly make cache_set only have single cache Currently although the bcache code has a framework for multiple caches in a cache set, but indeed the multiple caches never completed and users use md raid1 for multiple copies of the cached data. This patch does the following change in struct cache_set, to explicitly make a cache_set only have single cache, - Change pointer array "*cache[MAX_CACHES_PER_SET]" to a single pointer "*cache". - Remove pointer array "*cache_by_alloc[MAX_CACHES_PER_SET]". - Remove "caches_loaded". Now the code looks as exactly what it does in practic: only one cache is used in the cache set. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 17e4aed8309ff28670271546c2c3263eb12f5eb6 Author: Coly Li Date: Thu Oct 1 14:50:45 2020 +0800 bcache: remove 'int n' from parameter list of bch_bucket_alloc_set() The parameter 'int n' from bch_bucket_alloc_set() is not cleared defined. From the code comments n is the number of buckets to alloc, but from the code itself 'n' is the maximum cache to iterate. Indeed all the locations where bch_bucket_alloc_set() is called, 'n' is alwasy 1. This patch removes the confused and unnecessary 'int n' from parameter list of bch_bucket_alloc_set(), and explicitly allocates only 1 bucket for its caller. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 84e5d1363cd8128820434cdb983ecab0f5c1b078 Author: Qinglang Miao Date: Thu Oct 1 14:50:44 2020 +0800 bcache: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. As inode->iprivate equals to third parameter of debugfs_create_file() which is NULL. So it's equivalent to original code logic. Signed-off-by: Qinglang Miao Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 7e59c506c338d1e42ed19f24f1a737aff8b18fc3 Author: Dongsheng Yang Date: Thu Oct 1 14:50:43 2020 +0800 bcache: check c->root with IS_ERR_OR_NULL() in mca_reserve() In mca_reserve(c) macro, we are checking root whether is NULL or not. But that's not enough, when we read the root node in run_cache_set(), if we got an error in bch_btree_node_read_done(), we will return ERR_PTR(-EIO) to c->root. And then we will go continue to unregister, but before calling unregister_shrinker(&c->shrink), there is a possibility to call bch_mca_count(), and we would get a crash with call trace like that: [ 2149.876008] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000b5 ... ... [ 2150.598931] Call trace: [ 2150.606439] bch_mca_count+0x58/0x98 [escache] [ 2150.615866] do_shrink_slab+0x54/0x310 [ 2150.624429] shrink_slab+0x248/0x2d0 [ 2150.632633] drop_slab_node+0x54/0x88 [ 2150.640746] drop_slab+0x50/0x88 [ 2150.648228] drop_caches_sysctl_handler+0xf0/0x118 [ 2150.657219] proc_sys_call_handler.isra.18+0xb8/0x110 [ 2150.666342] proc_sys_write+0x40/0x50 [ 2150.673889] __vfs_write+0x48/0x90 [ 2150.681095] vfs_write+0xac/0x1b8 [ 2150.688145] ksys_write+0x6c/0xd0 [ 2150.695127] __arm64_sys_write+0x24/0x30 [ 2150.702749] el0_svc_handler+0xa0/0x128 [ 2150.710296] el0_svc+0x8/0xc Signed-off-by: Dongsheng Yang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit a58e88bfdc4d527f99827b8d66ecf68d05c3ac87 Author: Coly Li Date: Thu Oct 1 14:50:42 2020 +0800 bcache: share register sysfs with async register Previously the experimental async registration uses a separate sysfs file register_async. Now the async registration code seems working well for a while, we can do furtuher testing with it now. This patch changes the async bcache registration shares the same sysfs file /sys/fs/bcache/register (and register_quiet). Async registration will be default behavior if BCACHE_ASYNC_REGISTRATION is set in kernel configure. By default, BCACHE_ASYNC_REGISTRATION is not configured yet. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit c16bcd70a11b52d20877aa4e0b59285690a1b268 Merge: 949ca6b82e43b 61e7113e48d3c Author: David S. Miller Date: Fri Oct 2 13:16:15 2020 -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 2020-10-02 1) Add a full xfrm compatible layer for 32-bit applications on 64-bit kernels. From Dmitry Safonov. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 949ca6b82e43b342dba153a9fd643fb1b5e9f034 Author: Johannes Berg Date: Fri Oct 2 09:46:04 2020 +0200 netlink: fix policy dump leak [ Upstream commit a95bc734e60449e7b073ff7ff70c35083b290ae9 ] If userspace doesn't complete the policy dump, we leak the allocated state. Fix this. Fixes: d07dcf9aadd6 ("netlink: add infrastructure to expose policies to userspace") Signed-off-by: Johannes Berg Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit f525facaecd22502b20b22762ec609fdd66902f0 Merge: 98bd2b506a309 80db8751d7c0b Author: Mark Brown Date: Fri Oct 2 21:05:30 2020 +0100 Merge series "Add driver for Microchip S/PDIF RX" from Codrin Ciubotariu : The Sony/Philips Digital Interface Receiver (SPDIFRX) is a serial port compliant with the IEC-60958 standard. Among its caracteristics, we mention the following: - SPDIF/AES-EBU Compatible Serial Port - 32 Samples FIFO - Data Width Configurable to 24 bits, 20 bits or 16 bits - Packed and Unpacked Data Support for System Memory Optimization - Line State Events Report and Source of Interrupt - Line Error Rate Report - Full Memory Map of 192 bits for Channel 1 and Channel 2 Status and User Data - First 32-bit Status A, Status B Change Report and Source of Interrupt - Line Digital Filter - Register Write Protection - Abnormal Software Access and Internal Sequencer Integrity Check Reports This interface is available in Microchip's SAMA7G5 SoC. Codrin Ciubotariu (2): dt-bindings: sound: add DT bindings for Microchip S/PDIF RX Controller ASoC: mchp-spdifrx: add driver for SPDIF RX .../bindings/sound/mchp,spdifrx.yaml | 73 ++ sound/soc/atmel/Kconfig | 13 + sound/soc/atmel/Makefile | 2 + sound/soc/atmel/mchp-spdifrx.c | 954 ++++++++++++++++++ 4 files changed, 1042 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mchp,spdifrx.yaml create mode 100644 sound/soc/atmel/mchp-spdifrx.c -- 2.25.1 commit 98bd2b506a309faca2f5a8388dadfc983123e14a Author: Christophe JAILLET Date: Fri Oct 2 18:59:08 2020 +0200 ASoC: wm8523: Fix a typo in a comment It is likely that this header file is about the WM8523. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20201002165908.637809-1-christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 1c71497bb5b819bf3a32cfc35e293060b6590c39 Author: Mark Brown Date: Fri Oct 2 18:28:41 2020 +0100 ASoC: fsl_spdif: Remove unused np Reported-by: Stephen Rothwell Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20201002172841.37344-1-broonie@kernel.org Signed-off-by: Mark Brown commit cec6e41ce094affad3b5f9f5e5aa1f81c66ce682 Author: Brent Lu Date: Wed Jul 15 21:01:50 2020 +0800 ASoC: hdac_hdmi: remove cancel_work_sync in runtime suspend A deadlock is identified when there are three contexts running at the same time: - a HDMI jack work which is calling snd_soc_dapm_sync(). - user space is calling snd_pcm_release() to close pcm device. - pm is calling runtime suspend function of HDMI codec driver. By removing the clear_dapm_works() invocation in the hdac_hdmi_runtime_suspend() function, the snd_pcm_release() could always returns from dapm_power_widgets() function call without blocking the hdac_hdmi_jack_dapm_work() work thread or being blocked by the hdac_hdmi_runtime_suspend() function. The purpose of the jack work is to enable/disable the dapm jack pin so it's not necessary to cancel the work in runtime suspend function which is usually called when pcm device is closed. Signed-off-by: Brent Lu Link: https://lore.kernel.org/r/1594818110-786-1-git-send-email-brent.lu@intel.com Signed-off-by: Mark Brown commit 80db8751d7c0bebe11e62df19cec9cb0a392c354 Author: Codrin Ciubotariu Date: Fri Oct 2 19:03:04 2020 +0300 ASoC: add DT bindings for Microchip S/PDIF RX Controller This patch adds DT bindings for the new Microchip S/PDIF RX Controller embedded inside sama7g5 SoCs. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20201002160305.815523-2-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit ef265c55c1ac0f02c74a33d8e054547f7eafc81b Author: Codrin Ciubotariu Date: Fri Oct 2 19:03:05 2020 +0300 ASoC: mchp-spdifrx: add driver for SPDIF RX The new SPDIF RX controller is a serial port compliant with the IEC-60958 standard. It also supports programmable User Data and Channel Status fields. This IP is embedded in Microchip's sama7g5 SoC. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20201002160305.815523-3-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 69e0ad37c9f32d5aa1beb02aab4ec0cd055be013 Author: Nathan Chancellor Date: Mon Sep 28 16:09:39 2020 -0700 static_call: Fix return type of static_call_init Functions that are passed to early_initcall should be of type initcall_t, which expects a return type of int. This is not currently an error but a patch in the Clang LTO series could change that in the future. Fixes: 9183c3f9ed71 ("static_call: Add inline static call infrastructure") Signed-off-by: Nathan Chancellor Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Link: https://lore.kernel.org/lkml/20200903203053.3411268-17-samitolvanen@google.com/ commit 547305a64632813286700cb6d768bfe773df7d19 Author: Steven Rostedt (VMware) Date: Thu Oct 1 21:27:57 2020 -0400 tracepoint: Fix out of sync data passing by static caller Naresh reported a bug that appears to be a side effect of the static calls. It happens when going from more than one tracepoint callback to a single one, and removing the first callback on the list. The list of tracepoint callbacks holds data and a function to call with the parameters of that tracepoint and a handler to the associated data. old_list: 0: func = foo; data = NULL; 1: func = bar; data = &bar_struct; new_list: 0: func = bar; data = &bar_struct; CPU 0 CPU 1 ----- ----- tp_funcs = old_list; tp_static_caller = tp_interator __DO_TRACE() data = tp_funcs[0].data = NULL; tp_funcs = new_list; tracepoint_update_call() tp_static_caller = tp_funcs[0] = bar; tp_static_caller(data) bar(data) x = data->item = NULL->item BOOM! To solve this, add a tracepoint_synchronize_unregister() between changing tp_funcs and updating the static tracepoint, that does both a synchronize_rcu() and synchronize_srcu(). This will ensure that when the static call is updated to the single callback that it will be receiving the data that it registered with. Fixes: d25e37d89dd2f ("tracepoint: Optimize using static_call()") Reported-by: Naresh Kamboju Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/linux-next/CA+G9fYvPXVRO0NV7yL=FxCmFEMYkCwdz7R=9W+_votpT824YJA@mail.gmail.com commit 440c5752a3cad6ec303613e0446adde790dc39be Merge: 48ca6243c6adf 96d46c5085061 Author: Alexei Starovoitov Date: Fri Oct 2 11:34:48 2020 -0700 Merge branch 'Do not limit cb_flags when creating child sk' Martin KaFai says: ==================== This set fixes an issue that the bpf_skops_init_child() unnecessarily limited the child sk from inheriting all bpf_sock_ops_cb_flags of the listen sk. It also adds a test to check that. ==================== Tested-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov commit 96d46c508506136ed35c4b02d74ce38e91d88421 Author: Martin KaFai Lau Date: Thu Oct 1 18:34:54 2020 -0700 bpf: selftest: Ensure the child sk inherited all bpf_sock_ops_cb_flags This patch adds a test to ensure the child sk inherited everything from the bpf_sock_ops_cb_flags of the listen sk: 1. Sets one more cb_flags (BPF_SOCK_OPS_STATE_CB_FLAG) to the listen sk in test_tcp_hdr_options.c 2. Saves the skops->bpf_sock_ops_cb_flags when handling the newly established passive connection 3. CHECK() it is the same as the listen sk This also covers the fastopen case as the existing test_tcp_hdr_options.c does. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201002013454.2542367-1-kafai@fb.com commit 82f45c6c4a70622cc0585e3f4372e192a6491d26 Author: Martin KaFai Lau Date: Thu Oct 1 18:34:48 2020 -0700 bpf: tcp: Do not limit cb_flags when creating child sk from listen sk The commit 0813a841566f ("bpf: tcp: Allow bpf prog to write and parse TCP header option") unnecessarily introduced bpf_skops_init_child() which limited the child sk from inheriting all bpf_sock_ops_cb_flags of the listen sk. That breaks existing user expectation. This patch removes the bpf_skops_init_child() and just allows sock_copy() to do its job to copy everything from listen sk to the child sk. Fixes: 0813a841566f ("bpf: tcp: Allow bpf prog to write and parse TCP header option") Reported-by: Stanislav Fomichev Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20201002013448.2542025-1-kafai@fb.com commit 737e7610b545cc901a9696083c1824a7104b8d1b Author: Martin Blumenstingl Date: Sat Aug 15 20:19:57 2020 +0200 ARM: dts: meson8: remove two invalid interrupt lines from the GPU node The 3.10 vendor kernel defines the following GPU 20 interrupt lines: #define INT_MALI_GP AM_IRQ(160) #define INT_MALI_GP_MMU AM_IRQ(161) #define INT_MALI_PP AM_IRQ(162) #define INT_MALI_PMU AM_IRQ(163) #define INT_MALI_PP0 AM_IRQ(164) #define INT_MALI_PP0_MMU AM_IRQ(165) #define INT_MALI_PP1 AM_IRQ(166) #define INT_MALI_PP1_MMU AM_IRQ(167) #define INT_MALI_PP2 AM_IRQ(168) #define INT_MALI_PP2_MMU AM_IRQ(169) #define INT_MALI_PP3 AM_IRQ(170) #define INT_MALI_PP3_MMU AM_IRQ(171) #define INT_MALI_PP4 AM_IRQ(172) #define INT_MALI_PP4_MMU AM_IRQ(173) #define INT_MALI_PP5 AM_IRQ(174) #define INT_MALI_PP5_MMU AM_IRQ(175) #define INT_MALI_PP6 AM_IRQ(176) #define INT_MALI_PP6_MMU AM_IRQ(177) #define INT_MALI_PP7 AM_IRQ(178) #define INT_MALI_PP7_MMU AM_IRQ(179) However, the driver from the 3.10 vendor kernel does not use the following four interrupt lines: - INT_MALI_PP3 - INT_MALI_PP3_MMU - INT_MALI_PP7 - INT_MALI_PP7_MMU Drop the "pp3" and "ppmmu3" interrupt lines. This is also important because there is no matching entry in interrupt-names for it (meaning the "pp2" interrupt is actually assigned to the "pp3" interrupt line). Fixes: 7d3f6b536e72c9 ("ARM: dts: meson8: add the Mali-450 MP6 GPU") Reported-by: Thomas Graichen Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Tested-by: thomas graichen Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200815181957.408649-1-martin.blumenstingl@googlemail.com commit fdda88d31addb19a35ac7962e752e55aaeb5c20a Author: Qiujun Huang Date: Fri Oct 2 22:31:26 2020 +0800 ftrace: Fix some typos in comment s/coorditate/coordinate/ s/emty/empty/ s/preeptive/preemptive/ s/succes/success/ s/carefule/careful/ Link: https://lkml.kernel.org/r/20201002143126.2890-1-hqjagain@gmail.com Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit 05c36e5adf2beae64d118f49fcaafbe8ce373db1 Author: Thomas Renninger Date: Fri Sep 25 17:21:04 2020 +0200 tools/power/acpi: Serialize Makefile Before this patch you get tools/power/acpi/Makefile.rules included in parallel trying to copy KERNEL_INCLUDE multiple times: make -j20 acpi DESCEND power/acpi DESCEND tools/acpidbg DESCEND tools/acpidump DESCEND tools/ec MKDIR include MKDIR include MKDIR include CP include CP include cp: cannot create directory '/home/abuild/rpmbuild/BUILD/linux-5.7.7+git20200917.10b82d517648/tools/power/acpi/include/acpi': File exists make[2]: *** [../../Makefile.rules:20: /home/abuild/rpmbuild/BUILD/linux-5.7.7+git20200917.10b82d517648/tools/power/acpi/include] Error 1 make[1]: *** [Makefile:16: acpidbg] Error 2 make[1]: *** Waiting for unfinished jobs.... with this patch each subdirectory will be processed serialized: DESCEND power/acpi DESCEND tools/acpidbg MKDIR include CP include CC tools/acpidbg/acpidbg.o LD acpidbg STRIP acpidbg DESCEND tools/acpidump CC tools/acpidump/apdump.o ... LD acpidump STRIP acpidump DESCEND tools/ec CC tools/ec/ec_access.o LD ec STRIP ec Signed-off-by: Thomas Renninger Signed-off-by: Rafael J. Wysocki commit f63816e43d90442684cd2fd74f602cf3c5fae69c Author: Ulf Hansson Date: Thu Sep 24 13:04:48 2020 +0200 PM: domains: Allow to abort power off when no ->power_off() callback In genpd_power_off() we may decide to abort the power off of the PM domain, even beyond the point when the governor would accept it. The abort is done if it turns out that a child domain has been requested to be powered on, which means it's waiting for the lock of the parent to be released. However, the abort is currently only considered if the genpd in question has a ->power_off() callback assigned. This is unnecessary limiting, especially if the genpd would have a parent of its own. Let's remove the limitation and make the behaviour consistent. Signed-off-by: Ulf Hansson [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 49f618e1b669ef0e26a8d8d7f8fafc7b8fd31531 Author: Ulf Hansson Date: Thu Sep 24 13:04:47 2020 +0200 PM: domains: Rename power state enums for genpd To clarify the code a bit, let's rename GPD_STATE_ACTIVE into GENPD_STATE_ON and GPD_STATE_POWER_OFF to GENPD_STATE_OFF. Signed-off-by: Ulf Hansson [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 05de068614ac4b5bc37a0f53df713cf4475ae924 Author: Tian Tao Date: Sun Sep 27 09:14:28 2020 +0800 ACPI: scan: Replace ACPI_DEBUG_PRINT() with pr_debug() Fix the following W=1 kernel build warning(s): drivers/acpi/scan.c: In function ‘acpi_bus_get_wakeup_device_flags’: drivers/acpi/scan.c:902:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] by using pr_debug() to instead of the ACPI_DEBUG_PRINT() macro, which should only be used by ACPICA code, to print a debug message. Signed-off-by: Tian Tao [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit c18483a8ed30712630bc91bb9ea035cc9e1dfef0 Author: Hanjun Guo Date: Sun Sep 27 17:55:49 2020 +0800 ACPI: memhotplug: Remove 'state' from struct acpi_memory_device After commit 315bbae9c5cb ("ACPI / memhotplug: deal with eject request in hotplug queue"), the memory device state, which is defined in struct acpi_memory_device, is not actually useful, so remove it along with symbols related to it. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 7cecb47f55e00282f972a1e0b09136c8cd938221 Author: Ben Hutchings Date: Sun Sep 27 22:50:42 2020 +0100 ACPI / extlog: Check for RDMSR failure extlog_init() uses rdmsrl() to read an MSR, which on older CPUs provokes a error message at boot: unchecked MSR access error: RDMSR from 0x179 at rIP: 0xcd047307 (native_read_msr+0x7/0x40) Use rdmsrl_safe() instead, and return -ENODEV if it fails. Reported-by: jim@photojim.ca References: https://bugs.debian.org/971058 Cc: All applicable Signed-off-by: Ben Hutchings Signed-off-by: Rafael J. Wysocki commit 1e0cb59d5f0a41d1a2b7a1e7d45024fbac62d6e7 Author: John Garry Date: Wed Sep 30 13:43:50 2020 +0100 ACPI: Make acpi_evaluate_dsm() prototype consistent When compiling a driver which includes both include/linux/acpi.h and include/acpi/acpi_bus.h for when CONFIG_ACPI=n for i386, I get this: /include/acpi/acpi_bus.h:53:20: error: conflicting types for ‘acpi_evaluate_dsm’ union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, ^~~~~~~~~~~~~~~~~ In file included from drivers/scsi/hisi_sas/hisi_sas.h:10:0, from drivers/scsi/hisi_sas/hisi_sas_main.c:7: ./include/linux/acpi.h:866:34: note: previous definition of ‘acpi_evaluate_dsm’ was here static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle, ^~~~~~~~~~~~~~~~~ Fix by making prototype in include/linux/acpi.h consistent. Signed-off-by: John Garry [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit dc9e7860df91625fef04d7016182653e8f678f05 Author: Jonathan Cameron Date: Wed Sep 30 22:05:47 2020 +0800 docs: mm: numaperf.rst Add brief description for access class 1. Try to make minimal changes to the document which already describes access class 0 in a generic fashion (including IO initiatiors that are not CPUs). Signed-off-by: Jonathan Cameron Signed-off-by: Rafael J. Wysocki commit b9fffe47212c70114f1d91e773ce5ecff8936ef5 Author: Jonathan Cameron Date: Wed Sep 30 22:05:46 2020 +0800 node: Add access1 class to represent CPU to memory characteristics New access1 class is nearly the same as access0, but always provides characteristics for CPUs to memory. The existing access0 class provides characteristics to nearest or direct connnect initiator which may be a Generic Initiator such as a GPU or network adapter. This new class allows thread placement on CPUs to be performed so as to give optimal access characteristics to memory, even if that memory is for example attached to a GPU or similar and only accessible to the CPU via an appropriate bus. Suggested-by: Dan Willaims Signed-off-by: Jonathan Cameron Signed-off-by: Rafael J. Wysocki commit 2c5b9bde95c96942f2873cea6ef383c02800e4a8 Author: Jonathan Cameron Date: Wed Sep 30 22:05:45 2020 +0800 ACPI: HMAT: Fix handling of changes from ACPI 6.2 to ACPI 6.3 In ACPI 6.3, the Memory Proximity Domain Attributes Structure changed substantially. One of those changes was that the flag for "Memory Proximity Domain field is valid" was deprecated. This was because the field "Proximity Domain for the Memory" became a required field and hence having a validity flag makes no sense. So the correct logic is to always assume the field is there. Current code assumes it never is. Signed-off-by: Jonathan Cameron Signed-off-by: Rafael J. Wysocki commit 01aabca2fd545554905321029e6c4c5b2fedb345 Author: Jonathan Cameron Date: Wed Sep 30 22:05:44 2020 +0800 ACPI: Let ACPI know we support Generic Initiator Affinity Structures Until we tell ACPI that we support generic initiators, it will have to operate in fall back domain mode and all _PXM entries should be on existing non GI domains. This patch sets the relevant OSC bit to make that happen. Signed-off-by: Jonathan Cameron Signed-off-by: Rafael J. Wysocki commit 73bf7382debb1a93fef5ff38222c6a3b62dfea44 Author: Jonathan Cameron Date: Wed Sep 30 22:05:43 2020 +0800 x86: Support Generic Initiator only proximity domains In common with memoryless domains only register GI domains if the proximity node is not online. If a domain is already a memory containing domain, or a memoryless domain there is nothing to do just because it also contains a Generic Initiator. Signed-off-by: Jonathan Cameron Acked-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki commit 894c26a1c274b8eafbb4b1dad67e70e51a106061 Author: Jonathan Cameron Date: Wed Sep 30 22:05:42 2020 +0800 ACPI: Support Generic Initiator only domains Generic Initiators are a new ACPI concept that allows for the description of proximity domains that contain a device which performs memory access (such as a network card) but neither host CPU nor Memory. This patch has the parsing code and provides the infrastructure for an architecture to associate these new domains with their nearest memory processing node. Signed-off-by: Jonathan Cameron Signed-off-by: Rafael J. Wysocki commit aa803771a80aa2aa2d5cdd38434b369066fbb8fc Author: Joe Perches Date: Mon Aug 24 21:56:26 2020 -0700 tools: Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Signed-off-by: Shuah Khan commit 82206a0c06ccbd4a80cd623b9d52fcda130d6c7d Author: Brendan Higgins Date: Mon Sep 28 13:02:27 2020 -0700 kunit: tool: handle when .kunit exists but .kunitconfig does not Right now .kunitconfig and the build dir are automatically created if the build dir does not exists; however, if the build dir is present and .kunitconfig is not, kunit_tool will crash. Fix this by checking for both the build dir as well as the .kunitconfig. NOTE: This depends on commit 5578d008d9e0 ("kunit: tool: fix running kunit_tool from outside kernel tree") Link: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?id=5578d008d9e06bb531fb3e62dd17096d9fd9c853 Signed-off-by: Brendan Higgins Signed-off-by: Shuah Khan commit b0c6ae0f8948a2be6bf4e8b4bbab9ca1343289b6 Author: Pali Rohár Date: Wed Sep 2 16:43:44 2020 +0200 PCI: aardvark: Fix initialization with old Marvell's Arm Trusted Firmware Old ATF automatically power on pcie phy and does not provide SMC call for phy power on functionality which leads to aardvark initialization failure: [ 0.330134] mvebu-a3700-comphy d0018300.phy: unsupported SMC call, try updating your firmware [ 0.338846] phy phy-d0018300.phy.1: phy poweron failed --> -95 [ 0.344753] advk-pcie d0070000.pcie: Failed to initialize PHY (-95) [ 0.351160] advk-pcie: probe of d0070000.pcie failed with error -95 This patch fixes above failure by ignoring 'not supported' error in aardvark driver. In this case it is expected that phy is already power on. Tested-by: Tomasz Maciej Nowak Link: https://lore.kernel.org/r/20200902144344.16684-3-pali@kernel.org Fixes: 366697018c9a ("PCI: aardvark: Add PHY support") Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Cc: # 5.8+: ea17a0f153af: phy: marvell: comphy: Convert internal SMCC firmware return codes to errno commit 1a4c450e57d2d7030f64379e3e80966a4ea71eb7 Merge: 2bc8831b135ce 6cbfa11d2694b Author: Mark Brown Date: Fri Oct 2 15:49:12 2020 +0100 Merge series "ASoC: Intel: Catpt - Lynx and Wildcat point" from Cezary Rojewski : Implement support for Lynxpoint and Wildcat Point AudioDSP. Catpt solution deprecates existing sound/soc/intel/haswell which is removed in the following series. Due to high range of errors and desynchronization from recommendations set by Windows solution, re-write came as a lower-cost solution compared to refactoring /haswell/ with several series of patches. Series is dependent on linux-spi change: spi: pxa2xx: Add SSC2 and SSPSP2 SSP registers https://www.spinics.net/lists/linux-spi/msg23885.html which has been already merged and is now part of linux-spi tree. Bulk of series content is device driver core code - everything up to patch 7/14 - with fs entries and trace macros introduced right after. While each core patch is shaped in such a way that no unavailable members are ever called, until patch 14/14 is applied, no code compilation can occur as no Makefile is present. Once said patch is added, Makefile and Kconfig are implemented and driver module compiles as expected. Special thanks go to Marcin Barlik and Piotr Papierkowski for sharing their LPT/WPT AudioDSP architecture expertise as well as helping backtrack its historical background. My thanks go to Amadeusz Slawinski for reviews and improvements proposed on and off the internal list. Most of internal diff below is his contribution. Krzysztof Hejmowski helped me setup my own Xtensa environment and recompile LPT/WPT FW binary sources what sped up the development greatly. This would not have been possible without help from these champions, especially considering how quickly the catpt was written: 2 weeks features, 3 weeks optimizations. Thank you. Userspace-exposed members are compatible with what is exposed by deprecated solution as well as FW binary being re-used thus no harm is done. The only visible differences are: the newly added 'Loopback Mute' kcontrol and volume support extending to quad from stereo. On top of fixing erros and design flows, catpt also adds module reload, dynamic SRAM memory allocation during PCM runtime and exposes missing userspace API: 'Loopback Mute' kcontrol, quad volume controls and sysfs fw-version entries. Event tracing is provided to ease solution debugging. Following are not included in this update and are scheduled as later addition: - fw logging - module (library) support Note: LPT power up/down sequences might get aligned with WPT once enough testing is done as capabilities are shared for both DSPs. Note #2: Both LPT and WPT power up/down sequences may get optimized in future updates as thanks to help from the Windows team, most of nuances behind why/what/when in regard to hw registers have been backtracked and reviewed again. Link to developer's deep dive message: https://www.spinics.net/lists/alsa-devel/msg113563.html Changes in v10: - reverted DUAL_MONO case relocation from v9 - indented all constants of enum catpt_module_id to the same column - new newline appended for return path of catpt_dsp_do_send_msg() Changes in v9: https://www.spinics.net/lists/alsa-devel/msg116305.html - fixed newlines in sysfs as requested by Andy, left tags as no other changes done - removed volume_map and replaced by simple formulas for volume kcontrol calculations - removed redundant parentheses in catpt_get_channel_map() and relocated DUAL_MONO case - runtime suspend no longer called during module unload - removed redundant size checks for catpt_dsp_send_tx() and catpt_dsp_copy_rx() Changes in v8: https://www.spinics.net/lists/alsa-devel/msg116168.html - updated catpt_arrange_page_table() with GENMASK and U32_MAX usage - made use of PFN_DOWN() replacing explicit right shitfs by PAGE_SIZE - made fw hash dumping in catpt_coredump() more readable and removed hardcodes - catpt_coredump() dumps fw hash now only if said segment has been found within fw_info - shortened _MSECS suffixes to _MS - IPC structs no longer contain enum members - simplified definition of catpt_set_dspvol() Changes in v7: https://www.spinics.net/lists/alsa-devel/msg116019.html - fixed licence header for fs.c - renamed fs.c to sysfs.c to better match its purpose - added documentation within Documentation/ABI/testing for entries exposed by catpt - bin_attribute fw_build replaced by attribute fw_info: fw_info contains full FW information and after successful handshake, it's always available (stored in driver data) so no need to invoke GET_FW_VERSION IPC again, just dump the stored information - rather than manually creating and removing sysfs files, now makes use of dev_groups member of struct device_driver - patch: 10/14 'ASoC: Intel: Select catpt and deprecate haswell' has been moved to the back of the list: enable catpt after machine boards have been prepared for it first - improved readability of several goto labels Changes in v6: https://www.spinics.net/lists/alsa-devel/msg115765.html - reordered and reorganized code for patches 1/13 - 8/13 of v5, so each patches makes use of no member or function which is unavailable to it. Series size increased from 13 to 14 patches: addition of base members e.g.: registers has been split from addition of device.c file which describes acpi device behavior Changes in v5: https://www.spinics.net/lists/alsa-devel/msg115621.html Basically everything below is result of Andy's review. Thank you Andy for taking time into this detailed review - catpt now makes use of common linux/pxa2xx_ssp.h header file, removing redundant SSP register declarations in the process. As stated in the opening, this is dependent upon linux-spi change: spi: pxa2xx: Add SSC2 and SSPSP2 SSP registers - updated Kconfig by removing DMADEVICES and adding COMPILE_TEST as optional depends-on - updated all register macros definitions to be more safe against common arithmetics when specifying macro's parameters - removed CONFIG_PM and CONFIG_PM_SLEEP usage in favor of __maybe_unused - all 'if (ret < 0)' converted to simple 'if (ret)' whenever possible - fixed erroneous check for platform_device_register_data within catpt_register_board() - _SLAVE/_MASTER replaced with more inclusive _CONSUMER/_PROVIDER for enum catpt_ssp_mode - catpt_acpi_probe() is now making use of high-level wrappers for ioremapping and resource assignment, reducing function's code size - due to improved catpt_acpi_probe() behavior, catpt_acpi_remove() needs not to cast dma_free_coherent() any longer - DMA source and destrination maxburst now of value 16, see: https://www.spinics.net/lists/alsa-devel/msg114394.html - simplified catpt_dsp_update_lpclock() as list_for_each_entry() is empty-safe by default - dropped '_SSP_' from all names of all CATPT_SSP_SSXXX_DEFAULT macros - catpt_updatel_pci now makes use of linux/pci.h and uapi/linux/pci.h constants such as: PCI_PM_CTRL_STATE_MASK and PCI_D3hot Changes in v4: https://www.spinics.net/lists/alsa-devel/msg113762.html - fixed compilation with i386 kconfig (conflicting names) - streamlined naming for SHIM and PCI registers to match SSP ones (SHIM_REG -> SHIM) - catpt_component_probe removed and kcontrols again initializzed statically via snd_kcontrol_new array: this is to remove kctl->id.device shenanigans - renamed catpt_set_ctlvol to catpt_set_dspvol - function name wasn't matching its purpose Changes in v3: - fixed IRAM mask usage in lpt_dsp_power_up (dsp.c) - updated dbg message formatting in catpt_restore_fwimage as suggested by Andy - fixed alignment for struct catpt_ssp_device_format - catpt_set_ctlvol now verifies all-equal scenario based on all channels rather than just first two as requested by Amadeo - fixed SPDX for registers.h Changes in v2: https://www.spinics.net/lists/alsa-devel/msg113660.html - fixed SPDX formatting for all header files as well as pcm.c - fixed size provided to memcpy() in fw_build_read() as reported by Mark - renamed struct catpt_pdata to struct catpt_spec (cosmetic) - fixed erroneous path in catpt_load_block: region is properly released - trace.h events for updating registers have been removed and usages replaced by dev_dbg (SRAMPGE/ LPCS) - as requested by Andy, struct resource has replaced struct catpt_mbank and struct catpt_mregion. This change cascaded into: - catpt_mbank_size and catpt_mregion_size replaced by resource_size - catpt_mregion_intersects replaced by resource_overlaps - all catpt_mbank_ and catpt_mregion_ handlers found in loader.c (_request, _reserve, _release, _extract, _split, _join) have been removed - __request_region and __release_region have been enlisted in their place - catpt_mregion_intersecting renamed to catpt_resource_overlapping - catpt_request_region helper has been provided to deal with -size based requests o haven't found direct replacements in resource.c/ ioport.h for both functions - catpt_mbank_create and catpt_mbank_remove renamed to catpt_sram_init and catpt_sram_free respectively - catpt_sram_init now returns void instead of int and has been converted to simple initialized. This change ultimately cascaded into: o both SRAM banks initialization being moved to catpt_dev_init from catpt_acpi_probe (device.c) o catpt_dev::spec is now initialized first, with catpt_dev_init following it soon after o catpt_acpi_probe erroneous path has been simplified as SRAM banks no longer need to be freed - catpt_sram_free now frees all resources via child -> sibling enumeration rather than region_list iteration - catpt_dsp_update_srampge and catpt_dsp_set_srampge now accept new argument: unsigned long mask. Caused by removal of catpt_mbank - mask is taken directly from catpt_dev::spec::d/iram_mask - trace.h events for catpt_mbank and catpt_mregion have been removed Diff against last drop on internal list: https://www.spinics.net/lists/alsa-devel/msg113549.html - replaced spinlock with mutex for mregion allocation and release to address sleeping in atomic context warnings - fixed coredump fw_hash dumping - kcontrol values are now always stored regardless of stream of interest is running or not - kcontrol values are now applied after stream is prepared instead of ignoring what has been set by user initially - catpt_pdata instances have been renamed from hsw_ and bdw_ to lpt_ and wpt_ respectively - reordered Makefile .o(s) (cosmetic) Cezary Rojewski (14): ASoC: Intel: Add catpt base members ASoC: Intel: catpt: Implement IPC protocol ASoC: Intel: catpt: Add IPC message handlers ASoC: Intel: catpt: Define DSP operations ASoC: Intel: catpt: Firmware loading and context restore ASoC: Intel: catpt: PCM operations ASoC: Intel: catpt: Device driver lifecycle ASoC: Intel: catpt: Event tracing ASoC: Intel: catpt: Simple sysfs attributes ASoC: Intel: haswell: Remove haswell-solution specific code ASoC: Intel: broadwell: Remove haswell-solution specific code ASoC: Intel: bdw-5650: Remove haswell-solution specific code ASoC: Intel: bdw-5677: Remove haswell-solution specific code ASoC: Intel: Select catpt and deprecate haswell .../ABI/testing/sysfs-bus-pci-devices-catpt | 16 + sound/soc/intel/Kconfig | 24 +- sound/soc/intel/Makefile | 2 +- sound/soc/intel/boards/Kconfig | 8 +- sound/soc/intel/boards/bdw-rt5650.c | 36 - sound/soc/intel/boards/bdw-rt5677.c | 33 - sound/soc/intel/boards/broadwell.c | 33 - sound/soc/intel/boards/haswell.c | 28 +- sound/soc/intel/catpt/Makefile | 6 + sound/soc/intel/catpt/core.h | 188 +++ sound/soc/intel/catpt/device.c | 352 +++++ sound/soc/intel/catpt/dsp.c | 578 ++++++++ sound/soc/intel/catpt/ipc.c | 298 +++++ sound/soc/intel/catpt/loader.c | 671 ++++++++++ sound/soc/intel/catpt/messages.c | 313 +++++ sound/soc/intel/catpt/messages.h | 401 ++++++ sound/soc/intel/catpt/pcm.c | 1175 +++++++++++++++++ sound/soc/intel/catpt/registers.h | 178 +++ sound/soc/intel/catpt/sysfs.c | 55 + sound/soc/intel/catpt/trace.h | 83 ++ 20 files changed, 4335 insertions(+), 143 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-pci-devices-catpt create mode 100644 sound/soc/intel/catpt/Makefile create mode 100644 sound/soc/intel/catpt/core.h create mode 100644 sound/soc/intel/catpt/device.c create mode 100644 sound/soc/intel/catpt/dsp.c create mode 100644 sound/soc/intel/catpt/ipc.c create mode 100644 sound/soc/intel/catpt/loader.c create mode 100644 sound/soc/intel/catpt/messages.c create mode 100644 sound/soc/intel/catpt/messages.h create mode 100644 sound/soc/intel/catpt/pcm.c create mode 100644 sound/soc/intel/catpt/registers.h create mode 100644 sound/soc/intel/catpt/sysfs.c create mode 100644 sound/soc/intel/catpt/trace.h -- 2.17.1 commit 2bc8831b135ce1a55285663505245cb79422af76 Author: Randy Dunlap Date: Thu Oct 1 11:35:37 2020 -0700 ASoC: qcom: fix SDM845 & QDSP6 dependencies more Fix a build error and Kconfig warning in sound/soc/qcom/. ld: sound/soc/qcom/qdsp6/q6afe-clocks.o: in function `q6afe_clock_dev_probe': q6afe-clocks.c:(.text+0x182): undefined reference to `devm_clk_hw_register' ld: q6afe-clocks.c:(.text+0x19d): undefined reference to `of_clk_add_hw_provider' After adding "depends on COMMON_CLK" for SND_SOC_QDSP6, the Kconfig warning appears because "select" does not honor any "depends on" clauses, so fix the dependency for SND_SOC_SDM845 also. WARNING: unmet direct dependencies detected for SND_SOC_QDSP6 Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_QCOM [=y] && QCOM_APR [=y] && COMMON_CLK [=n] Selected by [y]: - SND_SOC_SDM845 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_QCOM [=y] && QCOM_APR [=y] && I2C [=y] && SOUNDWIRE [=y] Fixes: 520a1c396d19 ("ASoC: q6afe-clocks: add q6afe clock controller") Signed-off-by: Randy Dunlap Cc: Srinivas Kandagatla Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20201001183537.5781-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit 48ca6243c6adf1a3d7e7a0fd519ba918eb7b00ca Author: Stanislav Fomichev Date: Thu Oct 1 17:04:51 2020 -0700 selftests/bpf: Properly initialize linfo in sockmap_basic When using -Werror=missing-braces, compiler complains about missing braces. Let's use use ={} initialization which should do the job: tools/testing/selftests/bpf/prog_tests/sockmap_basic.c: In function 'test_sockmap_iter': tools/testing/selftests/bpf/prog_tests/sockmap_basic.c:181:8: error: missing braces around initializer [-Werror=missing-braces] union bpf_iter_link_info linfo = {0}; ^ tools/testing/selftests/bpf/prog_tests/sockmap_basic.c:181:8: error: (near initialization for 'linfo.map') [-Werror=missing-braces] tools/testing/selftests/bpf/prog_tests/sockmap_basic.c: At top level: Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20201002000451.1794044-1-sdf@google.com commit cffcdbff70a3cf3cc4f42fa2e57012411b1c78a6 Author: Stanislav Fomichev Date: Thu Oct 1 15:54:40 2020 -0700 selftests/bpf: Initialize duration in xdp_noinline.c Fixes clang error: tools/testing/selftests/bpf/prog_tests/xdp_noinline.c:35:6: error: variable 'duration' is uninitialized when used here [-Werror,-Wuninitialized] if (CHECK(!skel, "skel_open_and_load", "failed\n")) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201001225440.1373233-1-sdf@google.com commit 6cbfa11d2694b8a1e46d6834fb9705d5589e3ef1 Author: Cezary Rojewski Date: Tue Sep 29 16:12:47 2020 +0200 ASoC: Intel: Select catpt and deprecate haswell Prevent sound/soc/intel/haswell code compile and select catpt instead as a recommended solution. Userspace-exposed members are compatible with what is exposed by deprecated solution thus no harm is done. The only visible difference is the newly added 'Loopback Mute' kcontrol. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-15-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 053743f0c49074e710401ce39dd6f7d767094f77 Author: Cezary Rojewski Date: Tue Sep 29 16:12:46 2020 +0200 ASoC: Intel: bdw-5677: Remove haswell-solution specific code Remove code specific to sound/soc/intel/haswell. Update BE dai_link definition to provide seamless transition to catpt solution. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-14-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 02f2442fb32a1f8bde7774bd58e1dbeabe7970bc Author: Cezary Rojewski Date: Tue Sep 29 16:12:45 2020 +0200 ASoC: Intel: bdw-5650: Remove haswell-solution specific code Remove code specific to sound/soc/intel/haswell. Update BE dai_link definition to provide seamless transition to catpt solution. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit e81a707a3935493ed04b62775943ae41ae254289 Author: Cezary Rojewski Date: Tue Sep 29 16:12:44 2020 +0200 ASoC: Intel: broadwell: Remove haswell-solution specific code Remove code specific to sound/soc/intel/haswell. Update BE dai_link definition to provide seamless transition to catpt solution. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 0ce1610578bcb3b4a6824eb12f1a02cfc34a21e0 Author: Cezary Rojewski Date: Tue Sep 29 16:12:43 2020 +0200 ASoC: Intel: haswell: Remove haswell-solution specific code Remove code specific to sound/soc/intel/haswell. Update BE dai_link definition to provide seamless transition to catpt solution. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 8f80a834b909784c6e1ff7fcc819b1f8bd1651be Author: Cezary Rojewski Date: Tue Sep 29 16:12:42 2020 +0200 ASoC: Intel: catpt: Simple sysfs attributes Add sysfs entries for displaying version of FW currently in use as well as dumping full FW information including build and log-providers hashes. Signed-off-by: Cezary Rojewski Reviewed-by: Greg Kroah-Hartman Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 8ba1edb9c245e63c6750c4c77bfdba1230442d4d Author: Cezary Rojewski Date: Tue Sep 29 16:12:41 2020 +0200 ASoC: Intel: catpt: Event tracing Define tracing macros for easy catpt debug. These cover all IPC message types: requests, replies and notifications. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 7a10b66a5df965ea4074aae265068b3483fa9fc6 Author: Cezary Rojewski Date: Tue Sep 29 16:12:40 2020 +0200 ASoC: Intel: catpt: Device driver lifecycle Implement ACPI device probing and removal functions as well as handlers for its PM capabilities. Device probing also takes care of enumerating ADSP subsystem components. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit a126750fc86546bf86c7536923a77cfecc15e5e3 Author: Cezary Rojewski Date: Tue Sep 29 16:12:39 2020 +0200 ASoC: Intel: catpt: PCM operations DSP designed for Lynxpoint and Wildcat Point offers no dynamic topology i.e. all pipelines are already defined within firmware and host is relegated to allocing stream for predefined pins. This is represented by 'catpt_topology' member. Implementation covers all available pin types: - system playback and capture - two offload streams - loopback (reference) - bluetooth playback and capture PCM DAI operations differentiate between those pins as some (mainly offload) are to be handled differently - DSP expects wp updates on each notify_position notification. System playback has no volume control capability as it is routed to mixer stream directly. Other primary streams - capture and two offloads - offer individual volume controls. Compared to sound/soc/intel/haswell this configures SSP device format automatically on pcm creation. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit a9aa6fb3eb6c7e0e7e117b3f2dfafef8c45b9ea6 Author: Cezary Rojewski Date: Tue Sep 29 16:12:38 2020 +0200 ASoC: Intel: catpt: Firmware loading and context restore For Lynxpoint and Wildcat Point solution, is it host's responsibility to allocate SRAM regions and ensure those already taken are not overwritten with other data until released. Blocks are transferred to SRAM - either IRAM or DRAM - via DW DMA controller. Once basefw is booted, ownership of DMA transfer is lost in favour of DSP. Hosts reponsibilities don't end on initial block allocation and binary transfer. During Dx transitions host must store FW runtime context from DRAM before putting AudioDSP subsystem into lower power state. Said context gets flashed after D0 entry to bring DSP right where it was just before suspending. Load and restore procedures are finalized with SRAM power gating and adequate clock level selection. This power gates unused EBBs and clock speed effectively reducing power consumption. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit ba202a7bc3da05ca4548c7247f9be769b4e8c9fa Author: Cezary Rojewski Date: Tue Sep 29 16:12:37 2020 +0200 ASoC: Intel: catpt: Define DSP operations Implement dsp lifecycle functions such as core RESET and STALL, SRAM power control and LP clock selection. This also adds functions for handling transport over DW DMA controller. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 64b9b1b005743a7bb4443442347024fca56433ee Author: Cezary Rojewski Date: Tue Sep 29 16:12:36 2020 +0200 ASoC: Intel: catpt: Add IPC message handlers Declare global and stream IPC message handlers for all known message types. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 92946c1d7ea8c5e19a4d7b4bd8896f04dc09c655 Author: Cezary Rojewski Date: Tue Sep 29 16:12:35 2020 +0200 ASoC: Intel: catpt: Implement IPC protocol Implement IRQ handlers for immediate and delayed replies and notifications. Communication is synchronous and allows for serialization of maximum one message at a time. DSP may respond with ADSP_PENDING status for a request - known as delayed reply - and when situation occurs, framework keeps the lock and awaits upcoming response through IPCD channel which is handled in bottom-half. Immediate replies spawn no BH at all as their processing is very short. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 4fac9b31d0b9d3b3e9dd1408f457139f94077bc5 Author: Cezary Rojewski Date: Tue Sep 29 16:12:34 2020 +0200 ASoC: Intel: Add catpt base members Declare base structures, registers and extension routines for the catpt solution. Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200929141247.8058-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit b0b8e56b82c06b3bb6e5fb66d0e9c9c3fd3ce555 Author: Jann Horn Date: Tue Sep 29 00:49:16 2020 +0200 objtool: Permit __kasan_check_{read,write} under UACCESS Building linux-next with JUMP_LABEL=n and KASAN=y, I got this objtool warning: arch/x86/lib/copy_mc.o: warning: objtool: copy_mc_to_user()+0x22: call to __kasan_check_read() with UACCESS enabled What happens here is that copy_mc_to_user() branches on a static key in a UACCESS region:         __uaccess_begin();         if (static_branch_unlikely(©_mc_fragile_key))                 ret = copy_mc_fragile(to, from, len);         ret = copy_mc_generic(to, from, len);         __uaccess_end(); and the !CONFIG_JUMP_LABEL version of static_branch_unlikely() uses static_key_enabled(), which uses static_key_count(), which uses atomic_read(), which calls instrument_atomic_read(), which uses kasan_check_read(), which is __kasan_check_read(). Let's permit these KASAN helpers in UACCESS regions - static keys should probably work under UACCESS, I think. PeterZ adds: It's not a matter of permitting, it's a matter of being safe and correct. In this case it is, because it's a thin wrapper around check_memory_region() which was already marked safe. check_memory_region() is correct because the only thing it ends up calling is kasa_report() and that is also marked safe because that is annotated with user_access_save/restore() before it does anything else. On top of that, all of KASAN is noinstr, so nothing in here will end up in tracing and/or call schedule() before the user_access_save(). Signed-off-by: Jann Horn Acked-by: Peter Zijlstra (Intel) Signed-off-by: Josh Poimboeuf commit 1b80043ed21894eca888157145b955df02887995 Author: Julia Lawall Date: Sun Sep 27 21:12:26 2020 +0200 clocksource/drivers/armada-370-xp: Use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Thomas Gleixner Cc: Daniel Lezcano Link: https://lore.kernel.org/r/1601233948-11629-17-git-send-email-Julia.Lawall@inria.fr commit d8ccb6d87328326fc50f40292762d5835e3b9c48 Author: Diana Craciun Date: Tue Sep 29 11:54:41 2020 +0300 bus/fsl-mc: Add a new version for dprc_get_obj_region command The region size reported by the firmware for mc and software portals was less than allocated by the hardware. This may be problematic when mmapping the region in user space because the region size is less than page size. However the size as reserved by the hardware is 64K. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-14-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 273ee53ddf2e7d79565aff0ddc009ea2114d763b Author: Bharat Bhushan Date: Tue Sep 29 11:54:40 2020 +0300 bus/fsl-mc: Extend ICID size from 16bit to 32bit In virtual machines the device-id range is defined between 0x10000-0x20000. The reason for using such a large range is to avoid overlapping with the PCI range. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Bharat Bhushan Signed-off-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-13-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 0dadd95216d56cec01cef066eebe6354f069ff34 Author: Diana Craciun Date: Tue Sep 29 11:54:39 2020 +0300 bus/fsl-mc: Export IRQ pool handling functions to be used by VFIO The IRQ pool handling functions can be used by both DPRC driver and VFIO. Adapt and export those functions. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-12-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 5026cf605143e764e1785bbf9158559d17f8d260 Author: Diana Craciun Date: Tue Sep 29 11:54:38 2020 +0300 bus/fsl_mc: Do not rely on caller to provide non NULL mc_io Before destroying the mc_io, check first that it was allocated. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-11-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 17eaf21320da965c2571a5f029a2becaffe8313f Author: Diana Craciun Date: Tue Sep 29 11:54:37 2020 +0300 bus/fsl-mc: Add a container setup function Both DPRC driver and VFIO driver use the same initialization code for the DPRC. Introduced a new function which groups this initialization code. The function is exported and may be used by VFIO as well. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-10-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 46f35b5fbbbb22896839e5dbcc24d020926dca36 Author: Diana Craciun Date: Tue Sep 29 11:54:36 2020 +0300 bus/fsl-mc: Export a cleanup function for DPRC Create and export a cleanup function for DPRC. The function is used by the DPRC driver, but it will be used by the VFIO driver as well. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-9-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 5d781fabe64244ccf8a954617ea8b28737517b1c Author: Diana Craciun Date: Tue Sep 29 11:54:35 2020 +0300 bus/fsl-mc: Export dprc_scan/dprc_remove functions to be used by multiple entities Currently the DPRC scan function is used only by the bus driver. But the same functionality will be needed by the VFIO driver. To support this, the dprc scan function was exported and a little bit adjusted to fit both scenarios. Also the scan mutex initialization is done when the bus object is created, not in dprc_probe in order to be used by both VFIO and bus driver. Similarily dprc_remove_devices is exported to be used by VFIO. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-8-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 715b02ce8968bd560d295945520bae6d73707a73 Author: Bharat Bhushan Date: Tue Sep 29 11:54:34 2020 +0300 bus/fsl-mc: Add dprc-reset-container support DPRC reset is required by VFIO-mc in order to stop a device to further generate DMA transactions. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Bharat Bhushan Signed-off-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-7-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 993577b2ef0387d3bed622e3e9351370f8046e61 Author: Diana Craciun Date: Tue Sep 29 11:54:33 2020 +0300 bus/fsl-mc: Cache the DPRC API version There are already firmware API commands that have multiple versions. For each multiple version command, another command to retrieve the API version is issued. This may introduce an important overhead. The version does not change while the system is running, so the DPRC API version can be safely cached. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-6-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit e0c171d5537f45185c2e8f97b9ab2e2fdea56fa9 Author: Diana Craciun Date: Tue Sep 29 11:54:32 2020 +0300 bus/fsl-mc: Set the QMAN/BMAN region flags The QMAN region is memory mapped, so it should be of type IORESOURCE_MEM. The region flags bits were wrongly used to pass additional information. Use the bus specific bits for this purpose. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-5-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 1f86a00c1159fd77e66b1bd6ff1a183f4d46f34d Author: Bharat Bhushan Date: Tue Sep 29 11:54:31 2020 +0300 bus/fsl-mc: add support for 'driver_override' in the mc-bus This patch is required for vfio-fsl-mc meta driver to successfully bind layerscape container devices for device passthrough. This patch adds a mechanism to allow a layerscape device to specify a driver rather than a layerscape driver provide a device match. Example to allow a device (dprc.1) to specifically bind with driver (vfio-fsl-mc):- - echo vfio-fsl-mc > /sys/bus/fsl-mc/devices/dprc.1/driver_override - echo dprc.1 > /sys/bus/fsl-mc/drivers/fsl_mc_dprc/unbind - echo dprc.1 > /sys/bus/fsl-mc/drivers/vfio-fsl-mc/bind Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Bharat Bhushan Signed-off-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-4-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 35df88208c8bf46bfaa65e8517b60d5c318033f1 Author: Diana Craciun Date: Tue Sep 29 11:54:30 2020 +0300 bus/fsl-mc: Add a new parameter to dprc_scan_objects function Prepare the dprc_scan_objects function to be used by the VFIO mc driver code. The function is used to scan the mc objects by the bus driver. The same functionality is needed by the VFIO mc driver, but in this case the interrupt configuration is delayed until the userspace configures the interrupts. In order to use the same function in both drivers add a new parameter. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-3-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 7490cf5e184e562097201cf49229cd212a5879e4 Author: Diana Craciun Date: Tue Sep 29 11:54:29 2020 +0300 bus/fsl-mc: Do no longer export the total number of irqs outside dprc_scan_objects The total number of interrupts is only used for some checks outside the dprc_scan_objects function. Furthermore, in some situations the check is made twice. Move the bounds check inside the function for all situations. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link: https://lore.kernel.org/r/20200929085441.17448-2-diana.craciun@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 675f0ad4046946e80412896436164d172cd92238 Author: Sherry Sun Date: Tue Sep 29 17:11:06 2020 +0800 mic: vop: copy data to kernel space then write to io memory Read and write io memory should address align on ARCH ARM. Change to use memcpy_toio to avoid kernel panic caused by the address un-align issue. Signed-off-by: Sherry Sun Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20200929091106.24624-5-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit cc1a2679865a94b83804822996eed010a50a7c1d Author: Sherry Sun Date: Tue Sep 29 17:11:05 2020 +0800 misc: vop: add round_up(x,4) for vring_size to avoid kernel panic Since struct _mic_vring_info and vring are allocated together and follow vring, if the vring_size() is not four bytes aligned, which will cause the start address of struct _mic_vring_info is not four byte aligned. For example, when vring entries is 128, the vring_size() will be 5126 bytes. The _mic_vring_info struct layout in ddr looks like: 0x90002400: 00000000 00390000 EE010000 0000C0FF Here 0x39 is the avail_idx member, and 0xC0FFEE01 is the magic member. When EP use ioread32(magic) to reads the magic in RC's share memory, it will cause kernel panic on ARM64 platform due to the cross-byte io read. Here read magic in user space use le32toh(vr0->info->magic) will meet the same issue. So add round_up(x,4) for vring_size, then the struct _mic_vring_info will store in this way: 0x90002400: 00000000 00000000 00000039 C0FFEE01 Which will avoid kernel panic when read magic in struct _mic_vring_info. Signed-off-by: Sherry Sun Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20200929091106.24624-4-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 8c56adc511afd1a4355f5209b8dc11a80ec32b63 Author: Sherry Sun Date: Tue Sep 29 17:11:04 2020 +0800 misc: vop: build VOP based on CONFIG_VOP Build module or builtin VOP based on CONFIG_VOP macro. Signed-off-by: Joakim Zhang Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20200929091106.24624-3-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit c9723750a699c3bd465493ac2be8992b72ccb105 Author: Martin Fuzzey Date: Wed Sep 30 10:36:46 2020 +0200 w1: mxc_w1: Fix timeout resolution problem leading to bus error On my platform (i.MX53) bus access sometimes fails with w1_search: max_slave_count 64 reached, will continue next search. The reason is the use of jiffies to implement a 200us timeout in mxc_w1_ds2_touch_bit(). On some platforms the jiffies timer resolution is insufficient for this. Fix by replacing jiffies by ktime_get(). For consistency apply the same change to the other use of jiffies in mxc_w1_ds2_reset_bus(). Fixes: f80b2581a706 ("w1: mxc_w1: Optimize mxc_w1_ds2_touch_bit()") Cc: stable Signed-off-by: Martin Fuzzey Link: https://lore.kernel.org/r/1601455030-6607-1-git-send-email-martin.fuzzey@flowbird.group Signed-off-by: Greg Kroah-Hartman commit e84d3896fb8d1ad1d6f39866e5f416b84304bd13 Author: Sherry Sun Date: Tue Sep 29 16:49:44 2020 +0800 misc: vop: set VIRTIO_F_ACCESS_PLATFORM for vop driver Set VIRTIO_F_ACCESS_PLATFORM feature for vop driver, as the DMA mapping details shouldn't decide on the virtio implementation, but the host PCIe implementation. Reviewed-by: Christoph Hellwig Signed-off-by: Sherry Sun Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20200929084944.24146-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit bfeb28539d1f61829232883ced0986569218c4de Author: Tetsuo Handa Date: Tue Sep 15 09:00:19 2020 +0900 fbcon: remove no-op fbcon_set_origin() We don't need to call vc->vc_sw->con_set_origin() from set_origin() if it is no-op. Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/20200915000019.3422-3-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman commit ee4906770ee931394179bcd42cabb196bc952276 Author: Julia Lawall Date: Sun Sep 27 21:12:24 2020 +0200 regmap: debugfs: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1601233948-11629-15-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Greg Kroah-Hartman commit 44577f1d98545fff565df81793418e40eecc7394 Author: Greg Kroah-Hartman Date: Wed Sep 23 20:48:03 2020 +0200 platform/x86: intel_pmc_core: do not create a static struct device A struct device is a dynamic structure, with reference counting. "Tricking" the kernel to make a dynamic structure static, by working around the driver core release detection logic, is not nice. Because of this, this code has been used as an example for others on "how to do things", which is just about the worst thing possible to have happen. Fix this all up by making the platform device dynamic and providing a real release function. Fixes: b02f6a2ef0a1 ("platform/x86: intel_pmc_core: Attach using APCI HID "INT33A1"") Cc: Rajneesh Bhardwaj Cc: Vishwanath Somayaji Cc: Darren Hart Cc: Andy Shevchenko Reported-by: Maximilian Luz Reviewed-by: Hans de Goede Acked-by: Rajat Jain Link: https://lore.kernel.org/r/20200923184803.192265-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 4b74fd793a77f6149d68dbf95574311af9506e39 Author: Chuck Lever Date: Thu Oct 1 19:00:00 2020 -0400 NFSD: Map nfserr_wrongsec outside of nfsd_dispatch Refactor: Handle this NFS version-specific mapping in the only place where nfserr_wrongsec is generated. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 14168d678a0fa0645609417ad9c384a7c6f895fd Author: Chuck Lever Date: Thu Oct 1 18:59:54 2020 -0400 NFSD: Remove the RETURN_STATUS() macro Refactor: I'm about to change the return value from .pc_func. Clear the way by replacing the RETURN_STATUS() macro with logic that plants the status code directly into the response structure. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit f0af22101d9072c6488b8d20d6e33338669029fe Author: Chuck Lever Date: Thu Oct 1 18:59:49 2020 -0400 NFSD: Call NFSv2 encoders on error returns Remove special dispatcher logic for NFSv2 error responses. These are rare to the point of becoming extinct, but all NFS responses have to pay the cost of the extra conditional branches. With this change, the NFSv2 error cases now get proper xdr_ressize_check() calls. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 1841b9b61492e35234bdca8a5737a0e5df770f27 Author: Chuck Lever Date: Thu Oct 1 18:59:44 2020 -0400 NFSD: Fix .pc_release method for NFSv2 nfsd_release_fhandle() assumes that rqstp->rq_resp always points to an nfsd_fhandle struct. In fact, no NFSv2 procedure uses struct nfsd_fhandle as its response structure. So far that has been "safe" to do because the res structs put the resp->fh field at that same offset as struct nfsd_fhandle. I don't think that's a guarantee, though, and there is certainly nothing preventing a developer from altering the fields in those structures. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 7cf8357043bb828444cd9f4296f595bdbf68fa87 Author: Chuck Lever Date: Thu Oct 1 18:59:38 2020 -0400 NFSD: Remove vestigial typedefs Clean up: These are not used. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 85085aacefc62fe58f89fdcf695e2d1155ff45d9 Author: Chuck Lever Date: Thu Oct 1 18:59:33 2020 -0400 NFSD: Refactor nfsd_dispatch() error paths nfsd_dispatch() is a hot path. Ensure the compiler takes the processing of rare error cases out of line. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 4c96cb56eefa6ae5147a40441a20d3f6a7aef31c Author: Chuck Lever Date: Thu Oct 1 18:59:28 2020 -0400 NFSD: Clean up nfsd_dispatch() variables For consistency and code legibility, use a similar organization of variables as svc_generic_dispatch(). Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 383c440d4f14ffcda32227c4de23af8a352223c1 Author: Chuck Lever Date: Thu Oct 1 18:59:23 2020 -0400 NFSD: Clean up stale comments in nfsd_dispatch() Add a documenting comment for the function. Remove comments that simply describe obvious aspects of the code, but leave comments that explain the differences in processing of each NFS version. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 84c138e78d8ec247737d2c9e8dba50f20eb01a60 Author: Chuck Lever Date: Thu Oct 1 18:59:18 2020 -0400 NFSD: Clean up switch statement in nfsd_dispatch() Reorder the arms so the compiler places checks for the most frequent case first. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit dcc46991d3c5b30a3944578511f9a51a71cc0078 Author: Chuck Lever Date: Thu Oct 1 18:59:12 2020 -0400 NFSD: Encoder and decoder functions are always present nfsd_dispatch() is a hot path. Let's optimize the XDR method calls for the by-far common case, which is that the XDR methods are indeed present. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit ba1df797e5bbba68ddd1a29bd658b1c11f9a60b6 Author: Chuck Lever Date: Thu Oct 1 18:59:07 2020 -0400 NFSACL: Replace PROC() macro with open code Clean up: Follow-up on ten-year-old commit b9081d90f5b9 ("NFS: kill off complicated macro 'PROC'") by performing the same conversion in the NFSACL code. To reduce the chance of error, I copied the original C preprocessor output and then made some minor edits. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 49d99608213b60dec319400edf997e0fe0567cdf Author: Chuck Lever Date: Thu Oct 1 18:59:02 2020 -0400 lockd: Replace PROC() macro with open code Clean up: Follow-up on ten-year-old commit b9081d90f5b9 ("NFS: kill off complicated macro 'PROC'") by performing the same conversion in the lockd code. To reduce the chance of error, I copied the original C preprocessor output and then made some minor edits. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 6b3dccd48de8a4c650b01499a0b09d1e2279649e Author: Chuck Lever Date: Thu Oct 1 18:58:56 2020 -0400 NFSD: Add missing NFSv2 .pc_func methods There's no protection in nfsd_dispatch() against a NULL .pc_func helpers. A malicious NFS client can trigger a crash by invoking the unused/unsupported NFSv2 ROOT or WRITECACHE procedures. The current NFSD dispatcher does not support returning a void reply to a non-NULL procedure, so the reply to both of these is wrong, for the moment. Cc: Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 97b65223c18f131e18d662448381b727c04c2325 Author: Sergey Korolev Date: Sun Aug 9 19:12:30 2020 +0300 USB: core: remove polling for /sys/kernel/debug/usb/devices The latest reference to usbfs_conn_disc_event() removed in commit fb28d58b72aa ("USB: remove CONFIG_USB_DEVICEFS") in 2012 and now a user poll() waits infinitely for content changes. Signed-off-by: Sergey Korolev Link: https://lore.kernel.org/r/20200809161233.13135-1-s.korolev@ndmsystems.com Signed-off-by: Greg Kroah-Hartman commit da0cb6310094c1b6113aa8d8d860b9b45d6da437 Author: Amelie Delaunay Date: Thu Sep 24 11:00:47 2020 +0200 usb: typec: add support for STUSB160x Type-C controller family STMicroelectronics USB Type-C port controllers use I2C interface to configure, control and read the operation status of the device. All ST USB Type-C port controllers are based on the same I2C register map. That's why this driver can be used with all ST USB Type-C ICs. Some ST USB Type-C port controllers are Dual Role Port (DRP), only Sink or Source, some supports USB Power Delivery. This can be configured through connector device tree bindings. This driver is a basic Type-C port controller driver, with no power delivery support. It allows to configure ST USB Type-C port controller. Interrupt is supported and enables CC connection events, to detect attach and detach and update Type-C subsystem accordingly as well as usb role switch. ST USB Type-C port controller can be supplied in three different ways depending on the target application: - through VDD pin only (so VDD is the main supply) - through VSYS pin only (so VSYS is the main supply) - through VDD and VSYS pins. When both VDD and VSYS power supplies are present, the low power supply VSYS is selected as main supply when VSYS voltage is above 3.1V, else VDD is selected as main supply. In case of Source or Dual port type, if VDD supply is present, it has to be enabled in case of Source power role to provide Vbus. When interrupt support is available, VDD supply is dynamically managed upon attach/detach interrupt. When there is no interrupt support, VDD supply is enabled by default. Acked-by: Heikki Krogerus Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20200924090049.9041-5-amelie.delaunay@st.com Signed-off-by: Greg Kroah-Hartman commit 12f3467b0d28369d3add7a0deb65fdac9b503c90 Author: Amelie Delaunay Date: Thu Sep 24 11:00:45 2020 +0200 usb: typec: add typec_find_pwr_opmode This patch adds a function that converts power operation mode string into power operation mode value. It is useful to configure power operation mode through device tree property, as power capabilities may be linked to hardware design. Acked-by: Heikki Krogerus Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20200924090049.9041-3-amelie.delaunay@st.com Signed-off-by: Greg Kroah-Hartman commit ea17a0f153af2cd890e4ce517130dcccaa428c13 Author: Pali Rohár Date: Wed Sep 2 16:43:43 2020 +0200 phy: marvell: comphy: Convert internal SMCC firmware return codes to errno Driver ->power_on and ->power_off callbacks leaks internal SMCC firmware return codes to phy caller. This patch converts SMCC error codes to standard linux errno codes. Include file linux/arm-smccc.h already provides defines for SMCC error codes, so use them instead of custom driver defines. Note that return value is signed 32bit, but stored in unsigned long type with zero padding. Tested-by: Tomasz Maciej Nowak Link: https://lore.kernel.org/r/20200902144344.16684-2-pali@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 08befca40026136c14c3cd84f9e36c4cd20a358e Author: Qiu Wenbo Date: Fri Oct 2 20:44:54 2020 +0800 ALSA: hda/realtek - Add mute Led support for HP Elitebook 845 G7 After installing archlinux, the mute led and micmute led are not working at all. This patch fix this issue by applying a fixup from similar model. These mute leds are confirmed working on HP Elitebook 845 G7. Signed-off-by: Qiu Wenbo Cc: Link: https://lore.kernel.org/r/20201002124454.7240-1-qiuwenbo@kylinos.com.cn Signed-off-by: Takashi Iwai commit a6806e32e7a41c20c6b288009cb6f30929668327 Author: Biju Das Date: Sun Sep 20 14:49:03 2020 +0100 usb: typec: hd3ss3220: Use OF graph API to get the connector fwnode Some platforms have only super speed data bus connected to this device and high speed data bus directly connected to the SoC. In such platforms modelling connector as a child of this device is making it non compliant with usb connector bindings. By modelling connector node as standalone device node along with this device and the SoC data bus will make it compliant with usb connector bindings. Update the driver to handle this model by using OF graph API to get the connector fwnode and usb role switch class API to get role switch handle. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200920134905.4370-5-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 1c6e8ee63adbaf02a1e5177610fe9b77bec93d8a Author: Biju Das Date: Sun Sep 20 14:49:02 2020 +0100 dt-bindings: usb: renesas,usb3-peri: Document HS and SS data bus Document HS and SS data bus for the "usb-role-switch" enabled case. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Reviewed-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200920134905.4370-4-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit cde8019157c07bc52b88a8e55c9e79add65ffbf4 Author: Lad Prabhakar Date: Sun Sep 20 14:49:01 2020 +0100 dt-bindings: usb: convert ti,hd3ss3220 bindings to json-schema Convert ti,hd3ss3220.txt to YAML. Updated the binding documentation as graph bindings of this device model Super Speed (SS) data bus to the Super Speed (SS) capable connector. Signed-off-by: Lad Prabhakar Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20200920134905.4370-3-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit a27eb0cb4b2104461de1a1284059b3ac875e45b5 Author: Andrzej Pietrasiewicz Date: Tue Aug 18 13:28:24 2020 +0200 tty/sysrq: Extend the sysrq_key_table to cover capital letters All slots in sysrq_key_table[] are either used, reserved or at least commented with their intended use. This patch adds capital letter versions available, which means adding 26 more entries. For already existing SysRq operations the user presses Alt-SysRq-, and for the newly added ones Alt-Shift-SysRq-. Signed-off-by: Andrzej Pietrasiewicz Acked-by: Daniel Vetter Link: https://lore.kernel.org/r/20200818112825.6445-2-andrzej.p@collabora.com Signed-off-by: Greg Kroah-Hartman commit 5904c16d2210b967caf66b04a0c26cfa6a7a0328 Author: Yang Shi Date: Sun Sep 27 04:42:20 2020 -0700 fs: nfs: return per memcg count for xattr shrinkers The list_lru_count() returns the pre node count, but the new xattr shrinkers are memcg aware, so the shrinkers should return per memcg count by calling list_lru_shrink_count() instead. Otherwise over-shrink might be experienced. The problem was spotted by visual code inspection. Cc: Trond Myklebust Cc: Anna Schumaker Cc: Frank van der Linden Signed-off-by: Yang Shi Reviewed-by: Frank van der Linden Signed-off-by: Anna Schumaker commit b4868b44c5628995fdd8ef2e24dda73cef963a75 Author: Benjamin Coddington Date: Fri Sep 25 15:48:39 2020 -0400 NFSv4: Wait for stateid updates after CLOSE/OPEN_DOWNGRADE Since commit 0e0cb35b417f ("NFSv4: Handle NFS4ERR_OLD_STATEID in CLOSE/OPEN_DOWNGRADE") the following livelock may occur if a CLOSE races with the update of the nfs_state: Process 1 Process 2 Server ========= ========= ======== OPEN file OPEN file Reply OPEN (1) Reply OPEN (2) Update state (1) CLOSE file (1) Reply OLD_STATEID (1) CLOSE file (2) Reply CLOSE (-1) Update state (2) wait for state change OPEN file wake CLOSE file OPEN file wake CLOSE file ... ... We can avoid this situation by not issuing an immediate retry with a bumped seqid when CLOSE/OPEN_DOWNGRADE receives NFS4ERR_OLD_STATEID. Instead, take the same approach used by OPEN and wait at least 5 seconds for outstanding stateid updates to complete if we can detect that we're out of sequence. Note that after this change it is still possible (though unlikely) that CLOSE waits a full 5 seconds, bumps the seqid, and retries -- and that attempt races with another OPEN at the same time. In order to avoid this race (which would result in the livelock), update nfs_need_update_open_stateid() to handle the case where: - the state is NFS_OPEN_STATE, and - the stateid doesn't match the current open stateid Finally, nfs_need_update_open_stateid() is modified to be idempotent and renamed to better suit the purpose of signaling that the stateid passed is the next stateid in sequence. Fixes: 0e0cb35b417f ("NFSv4: Handle NFS4ERR_OLD_STATEID in CLOSE/OPEN_DOWNGRADE") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit fb08334bb38f56d308d3e15b47bca67529cffc87 Author: Nick Desaulniers Date: Thu Sep 17 14:45:45 2020 -0700 nfs: remove incorrect fallthrough label There is no case after the default from which to fallthrough to. Clang will error in this case (unhelpfully without context, see link below) and GCC will with -Wswitch-unreachable. The previous commit should have just replaced the comment with a break statement. If we consider implicit fallthrough to be a design mistake of C, then all case statements should be terminated with one of the following statements: * break * continue * return * fallthrough * goto * (call of function with __attribute__(__noreturn__)) Fixes: 2a1390c95a69 ("nfs: Convert to use the preferred fallthrough macro") Link: https://bugs.llvm.org/show_bug.cgi?id=47539 Acked-by: Gustavo A. R. Silva Reviewed-by: Gustavo A. R. Silva Reviewed-by: Miaohe Lin Reviewed-by: Nathan Chancellor Suggested-by: Joe Perches Signed-off-by: Nick Desaulniers Signed-off-by: Anna Schumaker commit 4ec95ed312c4ce877fb04084991754cb8cd33f01 Author: Vasily Gorbik Date: Thu Oct 1 02:22:54 2020 +0200 s390/startup: correct early pgm check info formatting Early sclp console messages are printed in line mode on z/VM and LPAR, but under kvm newlines matter. Add a missing newline between "kernel version" and "Kernel fault". Signed-off-by: Vasily Gorbik commit 100a980c174bed82e0178766809ac664e59ca037 Author: Vasily Gorbik Date: Sun Sep 27 01:34:25 2020 +0200 s390: remove orphaned extern variables declarations arch/s390/kernel/entry.h: suspend_zero_pages - only declaration left after commit 394216275c7d ("s390: remove broken hibernate / power management support") arch/s390/include/asm/setup.h: vmhalt_cmd - only declaration left after commit 99ca4e582d4a ("[S390] kernel: Shutdown Actions Interface") arch/s390/include/asm/setup.h: vmpoff_cmd - only declaration left after commit 99ca4e582d4a ("[S390] kernel: Shutdown Actions Interface") Signed-off-by: Vasily Gorbik commit 21a66717079c3d74e8573cd48743728e4a244507 Author: Vasily Gorbik Date: Thu Sep 24 01:01:29 2020 +0200 s390/kasan: make sure int handler always run with DAT on Since commit 998f5bbe3dbd ("s390/kasan: fix early pgm check handler execution") early pgm check handler is executed with DAT on if Kasan is enabled. Still there is a window between setup_lowcore_dat_off() and setup_lowcore_dat_on() when int handlers could be executed with DAT off under Kasan. If this happens the kernel ends up in pgm check loop due to Kasan shadow memory access attempts. With Kasan enabled paging is initialized much earlier and DAT flag has to be on at all times instrumented code is executed. Make sure int handlers are set up to be called with DAT on right away in this case. Signed-off-by: Vasily Gorbik commit 5627b9224b00334e4c91122ebbb8536a9a575969 Author: Gerald Schaefer Date: Tue Jun 23 19:10:08 2020 +0200 s390/ipl: add support to control memory clearing for nvme re-IPL Re-IPL for nvme is currently done by using diag 308 with the "Load Clear" subcode, which means that all memory will be cleared. This can increase re-IPL duration considerably on very large machines. For list-directed IPL like nvme or fcp IPL, a "Load Normal" subcode was introduced with z14. The "Load Normal" diag 308 subcode allows to re-IPL without clearing memory. This patch adds a new "clear" sysfs attribute to /sys/firmware/reipl/nvme, which can be set to either "0" or "1" to disable or enable re-IPL with memory clearing. The default value is "0", which disables memory clearing. Signed-off-by: Gerald Schaefer Reviewed-by: Vasily Gorbik Tested-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik commit bd37b36832f62bf42ab66da8744191d99252a6e3 Author: Alexander Egorenkov Date: Tue Sep 29 20:24:55 2020 +0200 s390/nvme: support firmware-assisted dump to NVMe disks From the kernel perspective NVMe dump works exactly like zFCP dump. Therefore, adapt all places where code explicitly tests only for IPL of type FCP DUMP. And also set the memory end correctly in this case. Signed-off-by: Alexander Egorenkov Reviewed-by: Vasily Gorbik Reviewed-by: Philipp Rudo Signed-off-by: Vasily Gorbik commit d9f12e48d08ec08ace574050a838e001e442ee38 Author: Alexander Egorenkov Date: Tue Sep 29 20:23:17 2020 +0200 s390/ipl: support NVMe IPL kernel parameters Enable extracting of extra kernel command-line parameters from the NVMe IPL block passed by the firmware to the kernel at boot. Signed-off-by: Alexander Egorenkov Reviewed-by: Vasily Gorbik Reviewed-by: Philipp Rudo Signed-off-by: Vasily Gorbik commit d70e38cb1deef3b2acee4cd36d33fef4c98abf28 Author: Jason J. Herne Date: Tue Mar 17 09:23:41 2020 -0400 s390: nvme dump support Add the nvme dump ipl type, associated data, and sysfs entries. This allows booting into a stand alone dump environment that resides on an nvme device. Signed-off-by: Jason J. Herne Signed-off-by: Vasily Gorbik commit ba9fe6443db587e17b7fb66093a52194b79191dc Author: Mauro Carvalho Chehab Date: Fri Oct 2 14:26:30 2020 +0200 media: admin-guide: update cardlists Update them according with the current support on drivers. Signed-off-by: Mauro Carvalho Chehab commit 210191dd5314f26b062fed3a47d108a0e4f53d18 Author: Mauro Carvalho Chehab Date: Fri Oct 2 14:24:07 2020 +0200 media: siano: rename a duplicated card string There are two different variants for Hauppauge WinTV MiniCard: [SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD] = { .name = "Hauppauge WinTV MiniCard", .type = SMS_NOVA_B0, .fw[DEVICE_MODE_DVBT_BDA] = SMS_FW_DVBT_HCW_55XXX, .default_mode = DEVICE_MODE_DVBT_BDA, .lna_ctrl = 29, .board_cfg.foreign_lna0_ctrl = 29, .rf_switch = 17, .board_cfg.rf_switch_uhf = 17, }, [SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2] = { .name = "Hauppauge WinTV MiniCard Rev 2", .type = SMS_NOVA_B0, .fw[DEVICE_MODE_DVBT_BDA] = SMS_FW_DVBT_HCW_55XXX, .default_mode = DEVICE_MODE_DVBT_BDA, .lna_ctrl = -1, }, As it can be seen, the RF part of the definitions are different. So, better to use different names in order to distinguish between them. Signed-off-by: Mauro Carvalho Chehab commit 6b90346919d42ffc7c3ad283bfca2825b238147a Author: Mauro Carvalho Chehab Date: Fri Oct 2 14:20:09 2020 +0200 media: zoran: move documentation file to the right place The zoran revert patch misplaced the Zoran doc file. Move it to the right place. Signed-off-by: Mauro Carvalho Chehab commit 026b940f18bc531b2bf33a1f4ae47a2970597947 Author: Krzysztof Wilczyński Date: Tue Sep 22 03:02:57 2020 +0000 PCI: xgene: Remove unused assignment to variable msi_val The value assigned to msi_val after the inner loop finishes its run is never used for anything, and it is also immediately overridden in the line that follows with the return value from the xgene_msi_int_read() function. Since the value of msi_val following the inner loop completion is never used in any meaningful way the assignment can be removed. Addresses-Coverity-ID: 1437183 ("Unused value") Link: https://lore.kernel.org/r/20200922030257.459898-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Bjorn Helgaas commit 9846155b00fe56273b3265f85bef8b39b15305eb Author: Qinglang Miao Date: Mon Sep 21 21:10:54 2020 +0800 PCI: loongson: Simplify loongson_pci_probe() return expression Simplify the return expression. Link: https://lore.kernel.org/r/20200921131054.92797-1-miaoqinglang@huawei.com Signed-off-by: Qinglang Miao Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 9aae3af8767cdfbdcb2d59c008b9477e82ab1029 Author: Qinglang Miao Date: Mon Sep 21 21:10:53 2020 +0800 PCI: cadence: Simplify cdns_pcie_host_init_address_translation() return expression Simplify the return expression. Link: https://lore.kernel.org/r/20200921131053.92752-1-miaoqinglang@huawei.com Signed-off-by: Qinglang Miao Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit df7fc05561126f2d3299f02ad0639948ef94d739 Author: Liu Shixin Date: Mon Sep 21 16:24:47 2020 +0800 PCI: mobiveil: Simplify mobiveil_pcie_init_irq_domain() return expression Simplify the return expression by removing useless code. Link: https://lore.kernel.org/r/20200921082447.2591877-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 0c3c87d2b270a179f1149df5b84a7f7ad3474bdb Author: Liu Shixin Date: Fri Sep 18 11:08:29 2020 +0800 PCI: iproc: Use module_bcma_driver to simplify the code module_bcma_driver() makes the code simpler by eliminating boilerplate code. Link: https://lore.kernel.org/r/20200918030829.3946025-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Ray Jui commit 9f76e198dd523eacc90a38cef706aa9ddc12bf11 Merge: 37d2a36394d95 60f5a24c11f7f Author: Greg Kroah-Hartman Date: Fri Oct 2 13:45:00 2020 +0200 Merge tag 'phy-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into usb-next Vinod writes: phy for 5.9 - Core: - New PHY attribute for max_link_rate - New phy drivers: - Rockchip dphy driver moved from staging - Socionext UniPhier AHCI PHY driver - Intel LGM SoC USB phy - Intel Keem Bay eMMC PHY driver - Updates: - Support for imx8mp usb phy - Support for DP Phy and USB3+DP combo phy in QMP driver - Support for Qualcomm sc7180 DP phy - Support for cadence torrent PCIe and USB single linke and multilink configurations along with USB, SGMII/QSGMII configurations * tag 'phy-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (72 commits) phy: qcom-qmp: initialize the pointer to NULL phy: qcom-qmp: Add support for sc7180 DP phy phy: qcom-qmp: Add support for DP in USB3+DP combo phy phy: qcom-qmp: Use devm_platform_ioremap_resource() to simplify phy: qcom-qmp: Get dp_com I/O resource by index phy: qcom-qmp: Move 'serdes' and 'cfg' into 'struct qcom_phy' phy: qcom-qmp: Remove 'initialized' in favor of 'init_count' phy: qcom-qmp: Move phy mode into struct qmp_phy dt-bindings: phy: qcom,qmp-usb3-dp: Add DP phy information dt-bindings: phy: ti,phy-j721e-wiz: fix bindings for torrent phy dt-bindings: phy: cdns,torrent-phy: add reset-names phy: rockchip-dphy-rx0: Include linux/delay.h phy: fix USB_LGM_PHY warning & build errors phy: cadence-torrent: Add USB + SGMII/QSGMII multilink configuration phy: cadence-torrent: Add PCIe + USB multilink configuration phy: cadence-torrent: Add single link USB register sequences phy: cadence-torrent: Add single link SGMII/QSGMII register sequences phy: cadence-torrent: Configure PHY_PLL_CFG as part of link_cmn_vals phy: cadence-torrent: Add PHY link configuration sequences for single link phy: cadence-torrent: Add clk changes for multilink configuration ... commit 1f66d95efdb7220913bbecda2f0feb8be3bcddfd Author: Jim Quinlan Date: Fri Sep 11 13:52:30 2020 -0400 PCI: brcmstb: Add bcm7211, bcm7216, bcm7445, bcm7278 to match list Now that the support is in place with previous commits, we add several chips that use the BrcmSTB driver. Link: https://lore.kernel.org/r/20200911175232.19016-11-james.quinlan@broadcom.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Acked-by: Florian Fainelli Acked-by: Rob Herring commit 20b1d6ba606c43d682a68dec45ccaf1d2316c1f5 Author: Jim Quinlan Date: Fri Sep 11 13:52:29 2020 -0400 PCI: brcmstb: Set bus max burst size by chip type The proper value of the parameter SCB_MAX_BURST_SIZE varies per chip. The 2711 family requires 128B whereas other devices can employ 512. The assignment is complicated by the fact that the values for this two-bit field have different meanings; Value Type_Generic Type_7278 00 Reserved 128B 01 128B 256B 10 256B 512B 11 512B Reserved Link: https://lore.kernel.org/r/20200911175232.19016-10-james.quinlan@broadcom.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Florian Fainelli commit 3baec684a531866a39d9c20a0227aa272827a6ac Author: Jim Quinlan Date: Fri Sep 11 13:52:28 2020 -0400 PCI: brcmstb: Accommodate MSI for older chips Older BrcmSTB chips do not have a separate register for MSI interrupts; the MSIs are in a register that also contains unrelated interrupts. In addition, the interrupts lie in bits [31..24] for these legacy chips. This commit provides common code for both legacy and non-legacy MSI interrupt registers. Link: https://lore.kernel.org/r/20200911175232.19016-9-james.quinlan@broadcom.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Florian Fainelli commit 52ded9e4f07b7b608344c5bbef59e31f7b39cb79 Author: Jim Quinlan Date: Fri Sep 11 13:52:27 2020 -0400 PCI: brcmstb: Set additional internal memory DMA viewport sizes The Raspberry Pi (RPI) is currently the only chip using this driver (pcie-brcmstb.c). There, only one memory controller is used, without an extension region, and the SCB0 viewport size is set to the size of the first and only dma-range region. Other BrcmSTB SOCs have more complicated memory configurations that require setting additional viewport sizes. BrcmSTB PCIe controllers are intimately connected to the memory controller(s) on the SOC. The SOC may have one to three memory controllers; they are indicated by the term SCBi. Each controller has a base region and an optional extension region. In physical memory, the base and extension regions of a controller are not adjacent, but in PCIe-space they are. There is a "viewport" for each memory controller that allows DMA from endpoint devices. Each viewport's size must be set to a power of two, and that size must be equal to or larger than the amount of memory each controller supports which is the sum of base region and its optional extension. Further, the 1-3 viewports are also adjacent in PCIe-space. Unfortunately the viewport sizes cannot be ascertained from the "dma-ranges" property so they have their own property, "brcm,scb-sizes". This is because dma-range information does not indicate what memory controller it is associated. For example, consider the following case where the size of one dma-range is 2GB and the second dma-range is 1GB: /* Case 1: SCB0 size set to 4GB */ dma-range0: 2GB (from memc0-base) dma-range1: 1GB (from memc0-extension) /* Case 2: SCB0 size set to 2GB, SCB1 size set to 1GB */ dma-range0: 2GB (from memc0-base) dma-range1: 1GB (from memc0-extension) By just looking at the dma-ranges information, one cannot tell which situation applies. That is why an additional property is needed. Its length indicates the number of memory controllers being used and each value indicates the viewport size. Note that the RPI DT does not have a "brcm,scb-sizes" property value, as it is assumed that it only requires one memory controller and no extension. So the optional use of "brcm,scb-sizes" will be backwards compatible. One last layer of complexity exists: all of the viewports sizes must be added and rounded up to a power of two to determine what the "BAR" size is. Further, an offset must be given that indicates the base PCIe address of this "BAR". The use of the term BAR is typically associated with endpoint devices, and the term is used here because the PCIe HW may be used as an RC or an EP. In the former case, all of the system memory appears in a single "BAR" region in PCIe memory. As it turns out, BrcmSTB PCIe HW is rarely used in the EP role and its system of mapping memory is an artifact that requires multiple dma-ranges regions. Link: https://lore.kernel.org/r/20200911175232.19016-8-james.quinlan@broadcom.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Florian Fainelli commit 740d6c3708a9325a9ae86aee61c666847be27b36 Author: Jim Quinlan Date: Fri Sep 11 13:52:26 2020 -0400 PCI: brcmstb: Add control of rescal reset Some STB chips have a special purpose reset controller named RESCAL (reset calibration). The PCIe HW can now control RESCAL to start and stop its operation. On probe(), the RESCAL is deasserted and the driver goes through the sequence of setting registers and reading status in order to start the internal PHY that is required for the PCIe. Link: https://lore.kernel.org/r/20200911175232.19016-7-james.quinlan@broadcom.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Florian Fainelli commit 915cff7f38c5e4d47f187f8049245afc2cb3e503 Author: Dexuan Cui Date: Fri Oct 2 01:51:58 2020 -0700 PCI: hv: Fix hibernation in case interrupts are not re-created pci_restore_msi_state() directly writes the MSI/MSI-X related registers via MMIO. On a physical machine, this works perfectly; for a Linux VM running on a hypervisor, which typically enables IOMMU interrupt remapping, the hypervisor usually should trap and emulate the MMIO accesses in order to re-create the necessary interrupt remapping table entries in the IOMMU, otherwise the interrupts can not work in the VM after hibernation. Hyper-V is different from other hypervisors in that it does not trap and emulate the MMIO accesses, and instead it uses a para-virtualized method, which requires the VM to call hv_compose_msi_msg() to notify the hypervisor of the info that would be passed to the hypervisor in the case of the trap-and-emulate method. This is not an issue to a lot of PCI device drivers, which destroy and re-create the interrupts across hibernation, so hv_compose_msi_msg() is called automatically. However, some PCI device drivers (e.g. the in-tree GPU driver nouveau and the out-of-tree Nvidia proprietary GPU driver) do not destroy and re-create MSI/MSI-X interrupts across hibernation, so hv_pci_resume() has to call hv_compose_msi_msg(), otherwise the PCI device drivers can no longer receive interrupts after the VM resumes from hibernation. Hyper-V is also different in that chip->irq_unmask() may fail in a Linux VM running on Hyper-V (on a physical machine, chip->irq_unmask() can not fail because unmasking an MSI/MSI-X register just means an MMIO write): during hibernation, when a CPU is offlined, the kernel tries to move the interrupt to the remaining CPUs that haven't been offlined yet. In this case, hv_irq_unmask() -> hv_do_hypercall() always fails because the vmbus channel has been closed: here the early "return" in hv_irq_unmask() means the pci_msi_unmask_irq() is not called, i.e. the desc->masked remains "true", so later after hibernation, the MSI interrupt always remains masked, which is incorrect. Refer to cpu_disable_common() -> fixup_irqs() -> irq_migrate_all_off_this_cpu() -> migrate_one_irq(): static bool migrate_one_irq(struct irq_desc *desc) { ... if (maskchip && chip->irq_mask) chip->irq_mask(d); ... err = irq_do_set_affinity(d, affinity, false); ... if (maskchip && chip->irq_unmask) chip->irq_unmask(d); Fix the issue by calling pci_msi_unmask_irq() unconditionally in hv_irq_unmask(). Also suppress the error message for hibernation because the hypercall failure during hibernation does not matter (at this time all the devices have been frozen). Note: the correct affinity info is still updated into the irqdata data structure in migrate_one_irq() -> irq_do_set_affinity() -> hv_set_affinity(), so later when the VM resumes, hv_pci_restore_msi_state() is able to correctly restore the interrupt with the correct affinity. Link: https://lore.kernel.org/r/20201002085158.9168-1-decui@microsoft.com Fixes: ac82fc832708 ("PCI: hv: Add hibernation support") Signed-off-by: Dexuan Cui Signed-off-by: Lorenzo Pieralisi Reviewed-by: Jake Oshins commit aef85b56c3c1693571940ebaee986c26a2dab99b Author: Laurentiu Tudor Date: Mon Sep 14 13:54:59 2020 +0300 bus: fsl-mc: MC control registers are not always available As per the device tree binding, in certain scenarios such as virtualization scenarios, the MC control registers are not available so don't error out if they are not present. Signed-off-by: Laurentiu Tudor Link: https://lore.kernel.org/r/20200914105459.27448-2-laurentiu.tudor@nxp.com Signed-off-by: Greg Kroah-Hartman commit 3b844345e18042631a0f061d1f35045f2de74347 Author: Laurentiu Tudor Date: Mon Sep 14 13:54:58 2020 +0300 bus: fsl-mc: don't assume an iommu is always present There are certain scenarios where an iommu is not present, e.g. booting in a VM. Let's support these scenarios by dropping the check. Signed-off-by: Laurentiu Tudor Link: https://lore.kernel.org/r/20200914105459.27448-1-laurentiu.tudor@nxp.com Signed-off-by: Greg Kroah-Hartman commit 6284a6e8940341beb71ea7970388418eb3dd473d Author: Joe Perches Date: Wed Sep 16 13:40:45 2020 -0700 drivers core: node: Use a more typical macro definition style for ACCESS_ATTR Remove the trailing semicolon from the macro and add it to its uses. Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/faf51a671160cf884efa68fb458d3e8a44b1a7a7.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman commit e015e036aea58fe5b7f92d2d4fff9f4364e649c8 Author: Joe Perches Date: Wed Sep 16 13:40:44 2020 -0700 drivers core: Use sysfs_emit for shared_cpu_map_show and shared_cpu_list_show Do not indirect the bitmap printing of these shared_cpu show functions by using cpumap_print_to_pagebuf/bitmap_print_to_pagebuf. Use the more typical style with the vsnprintf %*pb and %*pbl extensions directly so there is no possible mixup about the use of offset_in_page(buf) by bitmap_print_to_pagebuf. Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/80457b467ab6cde13a173cfd8a4f49cd8467a7fd.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman commit 7981593bf083801035b1f1377661849805acb216 Author: Joe Perches Date: Wed Sep 16 13:40:43 2020 -0700 mm: and drivers core: Convert hugetlb_report_node_meminfo to sysfs_emit Convert the unbound sprintf in hugetlb_report_node_meminfo to use sysfs_emit_at so that no possible overrun of a PAGE_SIZE buf can occur. Signed-off-by: Joe Perches Acked-by: Mike Kravetz Link: https://lore.kernel.org/r/894b351b82da6013cde7f36ff4b5493cd0ec30d0.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman commit baab853229ec1f291cec6a70ed61ce93159d0997 Merge: 0a21ac0d30943 b5756146db3ad Author: Will Deacon Date: Fri Oct 2 12:16:11 2020 +0100 Merge branch 'for-next/mte' into for-next/core Add userspace support for the Memory Tagging Extension introduced by Armv8.5. (Catalin Marinas and others) * for-next/mte: (30 commits) arm64: mte: Fix typo in memory tagging ABI documentation arm64: mte: Add Memory Tagging Extension documentation arm64: mte: Kconfig entry arm64: mte: Save tags when hibernating arm64: mte: Enable swap of tagged pages mm: Add arch hooks for saving/restoring tags fs: Handle intra-page faults in copy_mount_options() arm64: mte: ptrace: Add NT_ARM_TAGGED_ADDR_CTRL regset arm64: mte: ptrace: Add PTRACE_{PEEK,POKE}MTETAGS support arm64: mte: Allow {set,get}_tagged_addr_ctrl() on non-current tasks arm64: mte: Restore the GCR_EL1 register after a suspend arm64: mte: Allow user control of the generated random tags via prctl() arm64: mte: Allow user control of the tag check mode via prctl() mm: Allow arm64 mmap(PROT_MTE) on RAM-based files arm64: mte: Validate the PROT_MTE request via arch_validate_flags() mm: Introduce arch_validate_flags() arm64: mte: Add PROT_MTE support to mmap() and mprotect() mm: Introduce arch_calc_vm_flag_bits() arm64: mte: Tags-aware aware memcmp_pages() implementation arm64: Avoid unnecessary clear_user_page() indirection ... commit 0a21ac0d3094349de50f42b3712931de208ba74a Merge: 57b8b1b4351da 780c083a8f840 Author: Will Deacon Date: Fri Oct 2 12:15:24 2020 +0100 Merge branch 'for-next/ghostbusters' into for-next/core Fix and subsequently rewrite Spectre mitigations, including the addition of support for PR_SPEC_DISABLE_NOEXEC. (Will Deacon and Marc Zyngier) * for-next/ghostbusters: (22 commits) arm64: Add support for PR_SPEC_DISABLE_NOEXEC prctl() option arm64: Pull in task_stack_page() to Spectre-v4 mitigation code KVM: arm64: Allow patching EL2 vectors even with KASLR is not enabled arm64: Get rid of arm64_ssbd_state KVM: arm64: Convert ARCH_WORKAROUND_2 to arm64_get_spectre_v4_state() KVM: arm64: Get rid of kvm_arm_have_ssbd() KVM: arm64: Simplify handling of ARCH_WORKAROUND_2 arm64: Rewrite Spectre-v4 mitigation code arm64: Move SSBD prctl() handler alongside other spectre mitigation code arm64: Rename ARM64_SSBD to ARM64_SPECTRE_V4 arm64: Treat SSBS as a non-strict system feature arm64: Group start_thread() functions together KVM: arm64: Set CSV2 for guests on hardware unaffected by Spectre-v2 arm64: Rewrite Spectre-v2 mitigation code arm64: Introduce separate file for spectre mitigations and reporting arm64: Rename ARM64_HARDEN_BRANCH_PREDICTOR to ARM64_SPECTRE_V2 KVM: arm64: Simplify install_bp_hardening_cb() KVM: arm64: Replace CONFIG_KVM_INDIRECT_VECTORS with CONFIG_RANDOMIZE_BASE arm64: Remove Spectre-related CONFIG_* options arm64: Run ARCH_WORKAROUND_2 enabling code on all CPUs ... commit 948b3edba8988306b635578a72b0dab6091a5eb0 Author: Joe Perches Date: Wed Sep 16 13:40:42 2020 -0700 drivers core: Miscellaneous changes for sysfs_emit Change additional instances that could use sysfs_emit and sysfs_emit_at that the coccinelle script could not convert. o macros creating show functions with ## concatenation o unbound sprintf uses with buf+len for start of output to sysfs_emit_at o returns with ?: tests and sprintf to sysfs_emit o sysfs output with struct class * not struct device * arguments Miscellanea: o remove unnecessary initializations around these changes o consistently use int len for return length of show functions o use octal permissions and not S_ o rename a few show function names so DEVICE_ATTR_ can be used o use DEVICE_ATTR_ADMIN_RO where appropriate o consistently use const char *output for strings o checkpatch/style neatening Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/8bc24444fe2049a9b2de6127389b57edfdfe324d.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman commit 27275d301813d1f3b1b2fe5576d4afd690df6b99 Author: Joe Perches Date: Wed Sep 16 13:40:41 2020 -0700 drivers core: Reindent a couple uses around sysfs_emit Just a couple of whitespace realignment to open parenthesis for multi-line statements. Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/33224191421dbb56015eded428edfddcba997d63.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman commit 973c39115cb308b6b1fe64b4f342996f3eef06d0 Author: Joe Perches Date: Wed Sep 16 13:40:40 2020 -0700 drivers core: Remove strcat uses around sysfs_emit and neaten strcat is no longer necessary for sysfs_emit and sysfs_emit_at uses. Convert the strcat uses to sysfs_emit calls and neaten other block uses of direct returns to use an intermediate const char *. Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/5d606519698ce4c8f1203a2b35797d8254c6050a.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman commit aa838896d87af561a33ecefea1caa4c15a68bc47 Author: Joe Perches Date: Wed Sep 16 13:40:39 2020 -0700 drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat sysfs_emit_dev.cocci @@ identifier d_show; identifier dev, attr, buf; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - sprintf(buf, + sysfs_emit(buf, ...); ...> } @@ identifier d_show; identifier dev, attr, buf; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> } @@ identifier d_show; identifier dev, attr, buf; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - scnprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> } @@ identifier d_show; identifier dev, attr, buf; expression chr; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - strcpy(buf, chr); + sysfs_emit(buf, chr); ...> } @@ identifier d_show; identifier dev, attr, buf; identifier len; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... len = - sprintf(buf, + sysfs_emit(buf, ...); ...> return len; } @@ identifier d_show; identifier dev, attr, buf; identifier len; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... len = - snprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> return len; } @@ identifier d_show; identifier dev, attr, buf; identifier len; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... len = - scnprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> return len; } @@ identifier d_show; identifier dev, attr, buf; identifier len; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... - len += scnprintf(buf + len, PAGE_SIZE - len, + len += sysfs_emit_at(buf, len, ...); ...> return len; } @@ identifier d_show; identifier dev, attr, buf; expression chr; @@ ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { ... - strcpy(buf, chr); - return strlen(buf); + return sysfs_emit(buf, chr); } Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/3d033c33056d88bbe34d4ddb62afd05ee166ab9a.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman commit 57b8b1b4351dafe94de09a2aab5eba885b6705f0 Merge: f75aef392f869 c2bea7a1a1c0c 3a1793066fdfb 0fdb64c2a303e 4e56de82d4ec9 9c4b4c701e531 a194c5f2d2b3a 80d6b466679c3 5fd39dc220279 887e2cff0f8dc 03c9c8fad6cb5 4b2b76cbbc8ff e093256d14fbf 9e0f085c2b33e 6f3c4afae9805 3102bc0e6ac75 9a747c91e8d69 2a30aca81a72d Author: Will Deacon Date: Fri Oct 2 12:01:41 2020 +0100 Merge branches 'for-next/acpi', 'for-next/boot', 'for-next/bpf', 'for-next/cpuinfo', 'for-next/fpsimd', 'for-next/misc', 'for-next/mm', 'for-next/pci', 'for-next/perf', 'for-next/ptrauth', 'for-next/sdei', 'for-next/selftests', 'for-next/stacktrace', 'for-next/svm', 'for-next/topology', 'for-next/tpyos' and 'for-next/vdso' into for-next/core Remove unused functions and parameters from ACPI IORT code. (Zenghui Yu via Lorenzo Pieralisi) * for-next/acpi: ACPI/IORT: Remove the unused inline functions ACPI/IORT: Drop the unused @ops of iort_add_device_replay() Remove redundant code and fix documentation of caching behaviour for the HVC_SOFT_RESTART hypercall. (Pingfan Liu) * for-next/boot: Documentation/kvm/arm: improve description of HVC_SOFT_RESTART arm64/relocate_kernel: remove redundant code Improve reporting of unexpected kernel traps due to BPF JIT failure. (Will Deacon) * for-next/bpf: arm64: Improve diagnostics when trapping BRK with FAULT_BRK_IMM Improve robustness of user-visible HWCAP strings and their corresponding numerical constants. (Anshuman Khandual) * for-next/cpuinfo: arm64/cpuinfo: Define HWCAP name arrays per their actual bit definitions Cleanups to handling of SVE and FPSIMD register state in preparation for potential future optimisation of handling across syscalls. (Julien Grall) * for-next/fpsimd: arm64/sve: Implement a helper to load SVE registers from FPSIMD state arm64/sve: Implement a helper to flush SVE registers arm64/fpsimdmacros: Allow the macro "for" to be used in more cases arm64/fpsimdmacros: Introduce a macro to update ZCR_EL1.LEN arm64/signal: Update the comment in preserve_sve_context arm64/fpsimd: Update documentation of do_sve_acc Miscellaneous changes. (Tian Tao and others) * for-next/misc: arm64/mm: return cpu_all_mask when node is NUMA_NO_NODE arm64: mm: Fix missing-prototypes in pageattr.c arm64/fpsimd: Fix missing-prototypes in fpsimd.c arm64: hibernate: Remove unused including arm64/mm: Refactor {pgd, pud, pmd, pte}_ERROR() arm64: Remove the unused include statements arm64: get rid of TEXT_OFFSET arm64: traps: Add str of description to panic() in die() Memory management updates and cleanups. (Anshuman Khandual and others) * for-next/mm: arm64: dbm: Invalidate local TLB when setting TCR_EL1.HD arm64: mm: Make flush_tlb_fix_spurious_fault() a no-op arm64/mm: Unify CONT_PMD_SHIFT arm64/mm: Unify CONT_PTE_SHIFT arm64/mm: Remove CONT_RANGE_OFFSET arm64/mm: Enable THP migration arm64/mm: Change THP helpers to comply with generic MM semantics arm64/mm/ptdump: Add address markers for BPF regions Allow prefetchable PCI BARs to be exposed to userspace using normal non-cacheable mappings. (Clint Sbisa) * for-next/pci: arm64: Enable PCI write-combine resources under sysfs Perf/PMU driver updates. (Julien Thierry and others) * for-next/perf: perf: arm-cmn: Fix conversion specifiers for node type perf: arm-cmn: Fix unsigned comparison to less than zero arm_pmu: arm64: Use NMIs for PMU arm_pmu: Introduce pmu_irq_ops KVM: arm64: pmu: Make overflow handler NMI safe arm64: perf: Defer irq_work to IPI_IRQ_WORK arm64: perf: Remove PMU locking arm64: perf: Avoid PMXEV* indirection arm64: perf: Add missing ISB in armv8pmu_enable_counter() perf: Add Arm CMN-600 PMU driver perf: Add Arm CMN-600 DT binding arm64: perf: Add support caps under sysfs drivers/perf: thunderx2_pmu: Fix memory resource error handling drivers/perf: xgene_pmu: Fix uninitialized resource struct perf: arm_dsu: Support DSU ACPI devices arm64: perf: Remove unnecessary event_idx check drivers/perf: hisi: Add missing include of linux/module.h arm64: perf: Add general hardware LLC events for PMUv3 Support for the Armv8.3 Pointer Authentication enhancements. (By Amit Daniel Kachhap) * for-next/ptrauth: arm64: kprobe: clarify the comment of steppable hint instructions arm64: kprobe: disable probe of fault prone ptrauth instruction arm64: cpufeature: Modify address authentication cpufeature to exact arm64: ptrauth: Introduce Armv8.3 pointer authentication enhancements arm64: traps: Allow force_signal_inject to pass esr error code arm64: kprobe: add checks for ARMv8.3-PAuth combined instructions Tonnes of cleanup to the SDEI driver. (Gavin Shan) * for-next/sdei: firmware: arm_sdei: Remove _sdei_event_unregister() firmware: arm_sdei: Remove _sdei_event_register() firmware: arm_sdei: Introduce sdei_do_local_call() firmware: arm_sdei: Cleanup on cross call function firmware: arm_sdei: Remove while loop in sdei_event_unregister() firmware: arm_sdei: Remove while loop in sdei_event_register() firmware: arm_sdei: Remove redundant error message in sdei_probe() firmware: arm_sdei: Remove duplicate check in sdei_get_conduit() firmware: arm_sdei: Unregister driver on error in sdei_init() firmware: arm_sdei: Avoid nested statements in sdei_init() firmware: arm_sdei: Retrieve event number from event instance firmware: arm_sdei: Common block for failing path in sdei_event_create() firmware: arm_sdei: Remove sdei_is_err() Selftests for Pointer Authentication and FPSIMD/SVE context-switching. (Mark Brown and Boyan Karatotev) * for-next/selftests: selftests: arm64: Add build and documentation for FP tests selftests: arm64: Add wrapper scripts for stress tests selftests: arm64: Add utility to set SVE vector lengths selftests: arm64: Add stress tests for FPSMID and SVE context switching selftests: arm64: Add test for the SVE ptrace interface selftests: arm64: Test case for enumeration of SVE vector lengths kselftests/arm64: add PAuth tests for single threaded consistency and differently initialized keys kselftests/arm64: add PAuth test for whether exec() changes keys kselftests/arm64: add nop checks for PAuth tests kselftests/arm64: add a basic Pointer Authentication test Implementation of ARCH_STACKWALK for unwinding. (Mark Brown) * for-next/stacktrace: arm64: Move console stack display code to stacktrace.c arm64: stacktrace: Convert to ARCH_STACKWALK arm64: stacktrace: Make stack walk callback consistent with generic code stacktrace: Remove reliable argument from arch_stack_walk() callback Support for ASID pinning, which is required when sharing page-tables with the SMMU. (Jean-Philippe Brucker) * for-next/svm: arm64: cpufeature: Export symbol read_sanitised_ftr_reg() arm64: mm: Pin down ASIDs for sharing mm with devices Rely on firmware tables for establishing CPU topology. (Valentin Schneider) * for-next/topology: arm64: topology: Stop using MPIDR for topology information Spelling fixes. (Xiaoming Ni and Yanfei Xu) * for-next/tpyos: arm64/numa: Fix a typo in comment of arm64_numa_init arm64: fix some spelling mistakes in the comments by codespell vDSO cleanups. (Will Deacon) * for-next/vdso: arm64: vdso: Fix unusual formatting in *setup_additional_pages() arm64: vdso32: Remove a bunch of #ifdef CONFIG_COMPAT_VDSO guards commit b2c586eb07efab982419f32b7c3bd96829bc8bcd Author: Minas Harutyunyan Date: Thu Sep 24 18:08:39 2020 +0400 usb: dwc2: Fix INTR OUT transfers in DDMA mode. In DDMA mode if INTR OUT transfers mps not multiple of 4 then single packet corresponds to single descriptor. Descriptor limit set to mps and desc chain limit set to mps * MAX_DMA_DESC_NUM_GENERIC. On that descriptors complete, to calculate transfer size should be considered correction value for each descriptor. In start request function, if "continue" is true then dma buffer address should be incremmented by offset for all type of transfers, not only for Control DATA_OUT transfers. Fixes: cf77b5fb9b394 ("usb: dwc2: gadget: Transfer length limit checking for DDMA") Fixes: e02f9aa6119e0 ("usb: dwc2: gadget: EP 0 specific DDMA programming") Fixes: aa3e8bc81311e ("usb: dwc2: gadget: DDMA transfer start and complete") Signed-off-by: Minas Harutyunyan Signed-off-by: Felipe Balbi commit d58ba480285a1741ec65c3e470074d7ba31c7e60 Author: Amelie Delaunay Date: Wed Sep 9 11:35:11 2020 +0200 usb: dwc2: don't use ID/Vbus detection if usb-role-switch on STM32MP15 SoCs If usb-role-switch is present in the device tree, it means that ID and Vbus signals are not connected to the OTG controller but to an external component (GPIOs, Type-C controller). In this configuration, usb role switch is used to force valid sessions on STM32MP15 SoCs. Acked-by: Minas Harutyunyan Acked-by: Martin Blumenstingl Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi commit 17f934024e84e73cd55dd620a48c1b9e21fac87f Author: Amelie Delaunay Date: Wed Sep 9 11:35:10 2020 +0200 usb: dwc2: override PHY input signals with usb role switch support This patch adds support for usb role switch to dwc2, by using overriding control of the PHY voltage valid and ID input signals. iddig signal (ID) can be overridden: - when setting GUSBCFG_FORCEHOSTMODE, iddig input pin is overridden with 1; - when setting GUSBCFG_FORCEDEVMODE, iddig input pin is overridden with 0. avalid/bvalid/vbusvalid signals can be overridden respectively with: - GOTGCTL_AVALOEN + GOTGCTL_AVALOVAL - GOTGCTL_BVALOEN + GOTGCTL_BVALOVAL - GOTGCTL_VBVALEN + GOTGCTL_VBVALOVAL It is possible to determine valid sessions thanks to usb role switch: - if USB_ROLE_NONE then !avalid && !bvalid && !vbusvalid - if USB_ROLE_DEVICE then !avalid && bvalid && vbusvalid - if USB_ROLE_HOST then avalid && !bvalid && vbusvalid Acked-by: Minas Harutyunyan Acked-by: Martin Blumenstingl Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi commit 14793faeed41249638d9e5fecefd1f5aabfe3f07 Author: Amelie Delaunay Date: Wed Sep 9 11:35:09 2020 +0200 dt-bindings: usb: dwc2: add optional usb-role-switch property This patch documents the usb-role-switch property in dwc2 bindings, now that usb-role-switch support is available in dwc2 driver. Acked-by: Minas Harutyunyan Reviewed-by: Martin Blumenstingl Acked-by: Rob Herring Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi commit e2c53515b2a63828d226250fd62b38039f613977 Author: Wan Ahmad Zainie Date: Mon Sep 21 10:44:59 2020 +0800 usb: dwc3: of-simple: Add compatible string for Intel Keem Bay platform Add compatible string to use this generic glue layer to support Intel Keem Bay platform's dwc3 controller. Signed-off-by: Wan Ahmad Zainie Signed-off-by: Felipe Balbi commit 8eb16e724fdea6b72a12ec0ee54bfca306304a87 Author: Wan Ahmad Zainie Date: Mon Sep 21 10:44:58 2020 +0800 dt-bindings: usb: Add Intel Keem Bay USB controller bindings Binding description for Intel Keem Bay USB controller. Reviewed-by: Rob Herring Signed-off-by: Wan Ahmad Zainie Signed-off-by: Felipe Balbi commit e0a93d98f488fafd9285ea835539ff58d3ab0438 Author: Thinh Nguyen Date: Tue Sep 29 15:26:29 2020 -0700 usb: dwc3: gadget: Support up to max stream id DWC3 IPs can use the maximum stream id (up to 2^16) specified by the USB 3.x specs. Don't limit to stream id 2^15 only. Note that this does not reflect the number of concurrent streams the controller handles internally. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 75f87eaeaced820cc776b3147d22ec44fbf5fc17 Author: Thomas Pedersen Date: Thu Oct 1 10:47:48 2020 -0700 mac80211: avoid processing non-S1G elements on S1G band In ieee80211_determine_chantype(), the sband->ht_cap was being processed before S1G Operation element. Since the HT capability element should not be present on the S1G band, avoid processing potential garbage by moving the call to ieee80211_apply_htcap_overrides() to after the S1G block. Also, in case of a missing S1G Operation element, we would continue trying to process non-S1G elements (and return with a channel width of 20MHz). Instead, just assume primary channel is equal to operating and infer the operating width from the BSS channel, then return. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20201001174748.24520-1-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit ab10c22bc3b2024f0c9eafa463899a071eac8d97 Author: Johannes Berg Date: Mon Sep 28 13:07:18 2020 +0200 nl80211: fix non-split wiphy information When dumping wiphy information, we try to split the data into many submessages, but for old userspace we still support the old mode where this doesn't happen. However, in this case we were not resetting our state correctly and dumping multiple messages for each wiphy, which would have broken such older userspace. This was broken pretty much immediately afterwards because it only worked in the original commit where non-split dumps didn't have any more data than split dumps... Fixes: fe1abafd942f ("nl80211: re-add channel width and extended capa advertising") Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200928130717.3e6d9c6bada2.Ie0f151a8d0d00a8e1e18f6a8c9244dd02496af67@changeid Signed-off-by: Johannes Berg commit f8d504caa9739f74c7c399e158a7dce8478b866e Author: Johannes Berg Date: Mon Sep 28 13:06:56 2020 +0200 nl80211: reduce non-split wiphy dump size When wiphy dumps cannot be split, such as in events or with older userspace that doesn't support it, the size can today be too big. Reduce it, by doing two things: 1) remove data that couldn't have been present before the split capability was introduced since it's new, such as HE capabilities 2) as suggested by Martin Willi, remove management frame subtypes from the split dumps, as just (1) isn't even enough due to other new code capabilities. This is fine as old consumers (really just wpa_supplicant) didn't check this data before they got support for split dumps. Reported-by: Martin Willi Suggested-by: Martin Willi Signed-off-by: Johannes Berg Tested-by: Martin Willi Link: https://lore.kernel.org/r/20200928130655.53bce7873164.I71f06c9a221cd0630429a1a56eeae68a13beca61@changeid Signed-off-by: Johannes Berg commit 2efc459d06f1630001e3984854848a5647086232 Author: Joe Perches Date: Wed Sep 16 13:40:38 2020 -0700 sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output Output defects can exist in sysfs content using sprintf and snprintf. sprintf does not know the PAGE_SIZE maximum of the temporary buffer used for outputting sysfs content and it's possible to overrun the PAGE_SIZE buffer length. Add a generic sysfs_emit function that knows that the size of the temporary buffer and ensures that no overrun is done. Add a generic sysfs_emit_at function that can be used in multiple call situations that also ensures that no overrun is done. Validate the output buffer argument to be page aligned. Validate the offset len argument to be within the PAGE_SIZE buf. Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/884235202216d464d61ee975f7465332c86f76b2.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman commit 9ace0b4dab1c3913810c50948d714afcbd2c767e Author: Ivan Zaentsev Date: Fri Sep 4 19:00:04 2020 +0300 w1: w1_therm: Add support for GXCAS GX20MH01 device. GX20MH01 device shares family number 0x28 with DS18B20. The device is generally compatible with DS18B20. Added are the lowest 2^-5, 2^-6 temperature bits in Config register; R2 bit in Config register enabling 13 and 14 bit resolutions. It is powered up in 14 bit mode. Signed-off-by: Ivan Zaentsev Link: https://lore.kernel.org/r/20200904160004.87710-2-ivan.zaentsev@wirenboard.ru Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman commit 021da53e65fdd0e1b8492c2670dd075c0ea910fc Author: Ivan Zaentsev Date: Fri Sep 4 19:00:03 2020 +0300 w1: w1_therm: Add sysfs entries to control conversion time and driver features The conversion time of common DS18B20 clones deviates from datasheet specs. Allow adjustment and automatic measure of the conversion time. Add 'conv_time' sysfs attribute: *read*: Current conversion time in milliseconds. *write*: '0': Set default conversion time. '1': Measure and set the conversion time. Make a single temperature conversion, poll and measure an actual value. Measured value is increased by 20% for temperature drift. A new conversion time is returned by reading the same attribute. other positive value: Set the conversion time in milliseconds. The setting is active until a resolution change. Then it is reset to default conversion time for a new resolution. Add 'features' sysfs attribute to control optional driver settings per device. Bit masks to read/write (logical OR): 1: Enable check for conversion success. If byte 6 of scratchpad memory is 0xC after conversion, and temperature reads 85.00 (powerup value) or 127.94 (insufficient power) - return a conversion error. 2: Enable poll for conversion completion. Generate read cycles after the conversion start and wait for 1's. In parasite power mode this feature is not available. There are some clones of DS18B20 with fixed 12 bit resolution. Make the driver verify the resolution by reading back the device after resolution change. Signed-off-by: Ivan Zaentsev Acked-by: Evgeniy Polyakov Link: https://lore.kernel.org/r/20200904160004.87710-1-ivan.zaentsev@wirenboard.ru Signed-off-by: Greg Kroah-Hartman commit b31de43c608ffaa83e67a410ba58d678ff405f55 Author: Sherry Sun Date: Fri Sep 25 15:18:28 2020 +0800 samples: mpssd: fix the build errors when enable DEBUG in mpssd.c If enable DEBUG, will meet the following errors when build mpssd, so fix them here. Only one error is listed here, other errors are similar. mpssd.c: In function ‘virtio_net’: mpssd.c:615:21: error: incompatible type for argument 2 of ‘disp_iovec’ disp_iovec(mic, copy, __func__, __LINE__); ^~~~ mpssd.c:361:1: note: expected ‘struct mic_copy_desc *’ but argument is of type ‘struct mic_copy_desc’ disp_iovec(struct mic_info *mic, struct mic_copy_desc *copy, ^~~~~~~~~~ Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20200925071831.8025-2-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 4292aa977f5eda0bce4a2c221260e7c2014cb0c2 Author: Liu Shixin Date: Fri Sep 18 11:02:25 2020 +0800 eeprom: ee1004: use module_i2c_driver to simplify the code Use the module_i2c_driver() macro to make the code smaller and a bit simpler. Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20200918030225.3902750-1-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman commit 03c95e591a894a5213aed4e0f2c434df1047e595 Author: Qinglang Miao Date: Mon Sep 21 21:11:13 2020 +0800 virt: vbox: simplify the return expression of vbg_input_open() Simplify the return expression. Reviewed-by: Hans de Goede Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200921131113.93459-1-miaoqinglang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 961d289b61eb7fd9839d0223a19a8ce544c69fdb Author: Qinglang Miao Date: Mon Sep 21 21:10:47 2020 +0800 ocxl: simplify the return expression of free_function_dev() Simplify the return expression. Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200921131047.92526-1-miaoqinglang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 4b53a3c72116118d86fab4112277e1dc4edf273c Author: Necip Fazil Yildiran Date: Fri Sep 18 12:41:49 2020 +0300 ocxl: fix kconfig dependency warning for OCXL When OCXL is enabled and HOTPLUG_PCI is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for HOTPLUG_PCI_POWERNV Depends on [n]: PCI [=y] && HOTPLUG_PCI [=n] && PPC_POWERNV [=y] && EEH [=y] Selected by [y]: - OCXL [=y] && PPC_POWERNV [=y] && PCI [=y] && EEH [=y] The reason is that OCXL selects HOTPLUG_PCI_POWERNV without depending on or selecting HOTPLUG_PCI while HOTPLUG_PCI_POWERNV is subordinate to HOTPLUG_PCI. HOTPLUG_PCI_POWERNV is a visible symbol with a set of dependencies. Selecting it will lead to overlooking its other dependencies as well. Let OCXL depend on HOTPLUG_PCI_POWERNV instead to avoid Kbuild issues. Fixes: 49ce94b8677c ("ocxl: Add PCI hotplug dependency to Kconfig") Acked-by: Frederic Barrat Signed-off-by: Necip Fazil Yildiran Link: https://lore.kernel.org/r/20200918094148.20525-1-fazilyildiran@gmail.com Signed-off-by: Greg Kroah-Hartman commit 238c91115cd05c71447ea071624a4c9fe661f970 Author: Mark Mossberg Date: Fri Oct 2 04:29:16 2020 +0000 x86/dumpstack: Fix misleading instruction pointer error message Printing "Bad RIP value" if copy_code() fails can be misleading for userspace pointers, since copy_code() can fail if the instruction pointer is valid but the code is paged out. This is because copy_code() calls copy_from_user_nmi() for userspace pointers, which disables page fault handling. This is reproducible in OOM situations, where it's plausible that the code may be reclaimed in the time between entry into the kernel and when this message is printed. This leaves a misleading log in dmesg that suggests instruction pointer corruption has occurred, which may alarm users. Change the message to state the error condition more precisely. [ bp: Massage a bit. ] Signed-off-by: Mark Mossberg Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201002042915.403558-1-mark.mossberg@gmail.com commit 9e8c8cc44f35bb4c55f22661702022c92ea796d7 Author: Loic Poulain Date: Tue Sep 29 23:22:18 2020 +0530 bus: mhi: debugfs: Print channel context read-pointer This value was missing in the channel debugfs output. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Loic Poulain Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-20-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5fc4997fd9d065c98fb312ef56ffadffccc6d61d Author: Manivannan Sadhasivam Date: Tue Sep 29 23:22:17 2020 +0530 bus: mhi: core: Fix the building of MHI module The Kbuild rule to build MHI should use the append operator. This fixes the below warning reported by Kbuild test bot. WARNING: modpost: missing MODULE_LICENSE() in drivers/bus/mhi/core/main.o WARNING: modpost: missing MODULE_LICENSE() in drivers/bus/mhi/core/pm.o WARNING: modpost: missing MODULE_LICENSE() in drivers/bus/mhi/core/boot.o Fixes: 0cbf260820fa ("bus: mhi: core: Add support for registering MHI controllers") Reported-by: kernel test robot Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-19-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9654ab011e28ee756d231035c488509dc214fa6f Author: Loic Poulain Date: Tue Sep 29 23:22:16 2020 +0530 bus: mhi: Remove unused nr_irqs_req variable nr_irqs_req is unused in MHI stack. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Loic Poulain Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-18-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit b0fc0167f25401a5dd0325a935e3a20d1da2aa0b Author: Loic Poulain Date: Tue Sep 29 23:22:15 2020 +0530 bus: mhi: core: Allow shared IRQ for event rings There is no requirement for using a dedicated IRQ per event ring. Some systems does not support multiple MSI vectors (e.g. intel without CONFIG_IRQ_REMAP), In that case the MHI controller can configure all the event rings to use the same interrupt (as fallback). Allow this by removing the nr_irqs = ev_ring test and add extra check in the irq_setup function. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Loic Poulain Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-17-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 21cb9b18edea0c3533799069abc95c9c55c8607d Author: Bhaumik Bhatt Date: Tue Sep 29 23:22:14 2020 +0530 bus: mhi: core: Introduce sysfs entries for MHI Introduce sysfs entries to enable userspace clients the ability to read the serial number and the OEM PK Hash values obtained from BHI. OEMs need to read these device-specific hardware information values through userspace for factory testing purposes and cannot be exposed via degbufs as it may remain disabled for performance reasons. Also, update the documentation for ABI to include these entries. Reviewed-by: Manivannan Sadhasivam [mani: used dev_groups to manage sysfs attributes] Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-16-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit c7bd825e52b3d0b9ae519a006b80521d4587f864 Author: Bhaumik Bhatt Date: Tue Sep 29 23:22:13 2020 +0530 bus: mhi: core: Introduce debugfs entries for MHI Introduce debugfs entries to show state, register, channel, device, and event rings information. Allow the host to dump registers, issue device wake, and change the MHI timeout to help in debug. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-15-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit e0af24acdabc3cdb00bb8c8e23f117ae5d8a4ef4 Author: Bhaumik Bhatt Date: Tue Sep 29 23:22:12 2020 +0530 bus: mhi: Fix entries based on Kconfig coding style Kconfig coding style mandates use of tabs for the configuration definition and an additional two spaces for the help text. Make the required changes to the MHI Kconfig adhering to those guidelines. Reviewed-by: Manivannan Sadhasivam Acked-by: Randy Dunlap Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-14-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit e1427f32b85010ca0c38104955e234ca89d4cee5 Author: Clark Williams Date: Tue Sep 29 23:22:11 2020 +0530 bus: mhi: Remove include of rwlock_types.h rwlock.h should not be included directly. Instead linux/splinlock.h should be included. Including it directly will break the RT build. Also there is no point in including _types.h headers directly. There is no benefit in including the type without the accessor. Fixes: 0cbf260820fa7 ("bus: mhi: core: Add support for registering MHI controllers") Reviewed-by: Manivannan Sadhasivam Signed-off-by: Clark Williams Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-13-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit f38173a731cae380885e843dace21c8dc4198285 Author: Hemant Kumar Date: Tue Sep 29 23:22:10 2020 +0530 bus: mhi: core: Add const qualifier to MHI config information MHI channel, event and controller config data needs to be treated read only information. Add const qualifier to make sure config information passed by MHI controller is not modified by MHI core driver. Suggested-by: Kalle Valo Reviewed-by: Manivannan Sadhasivam Signed-off-by: Hemant Kumar Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-12-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit f42dfbe8f712127031e7b9bc938a1c33cec2ff57 Author: Bhaumik Bhatt Date: Tue Sep 29 23:22:09 2020 +0530 bus: mhi: core: Introduce APIs to allocate and free the MHI controller Client devices should use the APIs provided to allocate and free the MHI controller structure. This will help ensure that the structure is zero-initialized and there are no false positives with respect to reading any values such as the serial number or the OEM PK hash. Suggested-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-11-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8e3729bfa7be159d1f94d0caab9c1beff8268672 Author: Bhaumik Bhatt Date: Tue Sep 29 23:22:08 2020 +0530 bus: mhi: core: Read and save device hardware information from BHI Device hardware specific information such as serial number and the OEM PK hash can be read using BHI and saved on host to identify the endpoint. Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-10-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 601455dae00a853d1d8d6d768b3b79a7d59a5853 Author: Bhaumik Bhatt Date: Tue Sep 29 23:22:07 2020 +0530 bus: mhi: core: Introduce counters to track MHI device state transitions Use counters to track MHI device state transitions such as those to M0, M2, or M3 states. This can help in better debug, allowing the user to see the number of transitions to a certain MHI state when queried using debugfs entries or via other mechanisms. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-9-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit a6c1fff8571ae117be7ae2e7abff006924aca9ac Author: Bhaumik Bhatt Date: Tue Sep 29 23:22:06 2020 +0530 bus: mhi: core: Introduce helper function to check device state Introduce a helper function to determine whether the device is in a powered ON state and resides in one of the active MHI states. This will allow for some use cases where access can be pre-determined. Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-8-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5aa93f0576b4e7be60ffcccb674470c59789fd1b Author: Bhaumik Bhatt Date: Tue Sep 29 23:22:05 2020 +0530 bus: mhi: core: Use generic name field for an MHI device An MHI device is not necessarily associated with only channels as we can have one associated with the controller itself. Hence, the chan_name field within the mhi_device structure should instead be replaced with a generic name to accurately reflect any type of MHI device. Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-7-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 870f81bd28f20e1b2290d83db9fe93ea8f52ba63 Author: Bhaumik Bhatt Date: Tue Sep 29 23:22:04 2020 +0530 bus: mhi: core: Trigger host resume if suspended during mhi_device_get() It is possible that the host may be suspending or suspended and may not allow an outgoing device wake assert immediately if a client has requested for it. Ensure that the host wakes up and allows for it so the client does not have to wait for an external trigger or an outgoing packet to be queued for the host resume to occur. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-6-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8b53087cab61c3b309aaa9babf9a912d4dfd12c2 Author: Bhaumik Bhatt Date: Tue Sep 29 23:22:03 2020 +0530 bus: mhi: core: Use helper API to trigger a non-blocking host resume Autonomous low power mode support requires the MHI host to resume from multiple places and post a wakeup source to exit system suspend. This needs to be done in a non-blocking manner. Introduce a helper API to trigger the host resume for data transfers and other non-blocking use cases while supporting implementation of autonomous low power modes. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-5-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 515847c557dd33167be86cb429fc0674a331bc88 Author: Bhaumik Bhatt Date: Tue Sep 29 23:22:02 2020 +0530 bus: mhi: core: Abort suspends due to outgoing pending packets Add the missing check to abort suspends if a client driver has pending outgoing packets to send to the device. This allows better utilization of the MHI bus wherein clients on the host are not left waiting for longer suspend or resume cycles to finish for data transfers. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-4-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit bcbaccdf9fbe4782d57ae5bc88fd215eb2aea09e Author: Bhaumik Bhatt Date: Tue Sep 29 23:22:01 2020 +0530 bus: mhi: core: Remove double occurrence for mhi_ctrl_ev_task() declaration mhi_ctrl_ev_task() in the internal header file occurred twice. Remove one of the occurrences for clean-up. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-3-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4d12a897fa1276737724393331d1002962f62940 Author: Randy Dunlap Date: Tue Sep 29 23:22:00 2020 +0530 bus: mhi: fix doubled words and struct image_info kernel-doc Drop doubled word "table" in kernel-doc. Fix syntax for the kernel-doc notation for struct image_info. Note that the bhi_vec field is private and not part of the kernel-doc. Drop doubled word "device" in a comment. Cc: Manivannan Sadhasivam Cc: Hemant Kumar Reviewed-by: Manivannan Sadhasivam [mani: Added bus: prefix to the commit subject] Signed-off-by: Randy Dunlap Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200929175218.8178-2-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit c5c553850899e2662ecf749ac21fff95d17f59a4 Author: Lukas Bulwahn Date: Sat Sep 26 21:03:54 2020 +0200 scripts/spdxcheck.py: handle license identifiers in XML comments Commit cc9539e7884c ("media: docs: use the new SPDX header for GFDL-1.1 on *.svg files") adds SPDX-License-Identifiers enclosed in XML comments, i.e., , for svg files. Unfortunately, ./scripts/spdxcheck.py does not handle SPDX-License-Identifiers in XML comments, so it simply fails on checking these files with 'Invalid License ID: --'. Strip the XML comment ending simply by copying how it was done for comments in C. With that, ./scripts/spdxcheck.py handles the svg files properly. Signed-off-by: Lukas Bulwahn Signed-off-by: Greg Kroah-Hartman commit 37d2a36394d954413a495da61da1b2a51ecd28ab Author: Oliver Neukum Date: Mon Sep 28 23:17:55 2020 +0900 USB: cdc-wdm: Make wdm_flush() interruptible and add wdm_fsync(). syzbot is reporting hung task at wdm_flush() [1], for there is a circular dependency that wdm_flush() from flip_close() for /dev/cdc-wdm0 forever waits for /dev/raw-gadget to be closed while close() for /dev/raw-gadget cannot be called unless close() for /dev/cdc-wdm0 completes. Tetsuo Handa considered that such circular dependency is an usage error [2] which corresponds to an unresponding broken hardware [3]. But Alan Stern responded that we should be prepared for such hardware [4]. Therefore, this patch changes wdm_flush() to use wait_event_interruptible_timeout() which gives up after 30 seconds, for hardware that remains silent must be ignored. The 30 seconds are coming out of thin air. Changing wait_event() to wait_event_interruptible_timeout() makes error reporting from close() syscall less reliable. To compensate it, this patch also implements wdm_fsync() which does not use timeout. Those who want to be very sure that data has gone out to the device are now advised to call fsync(), with a caveat that fsync() can return -EINVAL when running on older kernels which do not implement wdm_fsync(). This patch also fixes three more problems (listed below) found during exhaustive discussion and testing. Since multiple threads can concurrently call wdm_write()/wdm_flush(), we need to use wake_up_all() whenever clearing WDM_IN_USE in order to make sure that all waiters are woken up. Also, error reporting needs to use fetch-and-clear approach in order not to report same error for multiple times. Since wdm_flush() checks WDM_DISCONNECTING, wdm_write() should as well check WDM_DISCONNECTING. In wdm_flush(), since locks are not held, it is not safe to dereference desc->intf after checking that WDM_DISCONNECTING is not set [5]. Thus, remove dev_err() from wdm_flush(). [1] https://syzkaller.appspot.com/bug?id=e7b761593b23eb50855b9ea31e3be5472b711186 [2] https://lkml.kernel.org/r/27b7545e-8f41-10b8-7c02-e35a08eb1611@i-love.sakura.ne.jp [3] https://lkml.kernel.org/r/79ba410f-e0ef-2465-b94f-6b9a4a82adf5@i-love.sakura.ne.jp [4] https://lkml.kernel.org/r/20200530011040.GB12419@rowland.harvard.edu [5] https://lkml.kernel.org/r/c85331fc-874c-6e46-a77f-0ef1dc075308@i-love.sakura.ne.jp Reported-by: syzbot Cc: stable Co-developed-by: Tetsuo Handa Signed-off-by: Tetsuo Handa Signed-off-by: Oliver Neukum Cc: Alan Stern Link: https://lore.kernel.org/r/20200928141755.3476-1-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman commit fb58cf4f2881eeb21b2a5997871a1678772b746d Author: Petko Manolov Date: Sun Sep 27 15:49:08 2020 +0300 net: pegasus: Use the new usb control message API. The old usb_control_msg() let the caller handle the error and also did not account for partial reads. Since these are now considered harmful, move the driver over to usb_control_msg_recv/send() calls. Added small note about why set_registers() can't be used to substitute set_register(). Signed-off-by: Petko Manolov Acked-by: David S. Miller Link: https://lore.kernel.org/r/20200927124909.16380-2-petko.manolov@konsulko.com Signed-off-by: Greg Kroah-Hartman commit b2a0f274e3f7e5ad3b5546e4293ca1cf25126f51 Author: Petko Manolov Date: Sun Sep 27 15:49:09 2020 +0300 net: rtl8150: Use the new usb control message API. The old usb_control_msg() let the caller handle the error and also did not account for partial reads. Since these are now considered harmful, move the driver over to usb_control_msg_recv/send() calls. Signed-off-by: Petko Manolov Acked-by: David S. Miller Link: https://lore.kernel.org/r/20200927124909.16380-3-petko.manolov@konsulko.com Signed-off-by: Greg Kroah-Hartman commit 5789051fc57bb6abecb6ab5b44fdc4b5e8f90b5a Author: Heikki Krogerus Date: Mon Sep 28 16:33:24 2020 +0300 usb: typec: displayport: Reduce noise from the driver It's not an error if the mode can't be entered because another mode is already active, so no longer printing an error message if that happens. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200928133324.48841-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit fb6f076d543414cec709401ec65e5f8e6985d77a Author: Alan Stern Date: Mon Sep 28 11:22:17 2020 -0400 USB: hub: Add Kconfig option to reduce number of port initialization retries Description based on one by Yasushi Asano: According to 6.7.22 A-UUT “Device No Response” for connection timeout of USB OTG and EH automated compliance plan v1.2, enumeration failure has to be detected within 30 seconds. However, the old and new enumeration schemes each make a total of 12 attempts, and each attempt can take 5 seconds to time out, so the PET test fails. This patch adds a new Kconfig option (CONFIG_USB_FEW_INIT_RETRIES); when the option is set all the initialization retry loops except the outermost are reduced to a single iteration. This reduces the total number of attempts to four, allowing Linux hosts to pass the PET test. The new option is disabled by default to preserve the existing behavior. The reduced number of retries may fail to initialize a few devices that currently do work, but for the most part there should be no change. And in cases where the initialization does fail, it will fail much more quickly. Reported-and-tested-by: yasushi asano Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20200928152217.GB134701@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 19502e6911e4ef4a036344eed36274bb18225033 Author: Alan Stern Date: Mon Sep 28 11:20:50 2020 -0400 USB: hub: Clean up use of port initialization schemes and retries The SET_CONFIG_TRIES macro in hub.c is badly named; it controls the number of port-initialization retry attempts rather than the number of Set-Configuration attempts. Furthermore, the USE_NEW_SCHEME macro and use_new_scheme() function are written in a very confusing manner, making it almost impossible to figure out exactly what they do or check that they are correct. This patch renames SET_CONFIG_TRIES to PORT_INIT_TRIES, removes USE_NEW_SCHEME entirely, and rewrites use_new_scheme() to be much more transparent, with added comments explaining how it works. The patch also pulls the single call site of use_new_scheme() out from the Get-Descriptor retry loop (where it returns the same value each time) and renames the local variable used to store the result. The overall effect is a minor cleanup. However, there is one functional change: If the "use_both_schemes" module parameter isn't set (by default it is set), the existing code does only two retry iterations. After this patch it will always perform four, regardless of the parameter's value. Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20200928152050.GA134701@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 716a0c2881938d222bde67d7edf630ea0648b8f7 Author: Colin Ian King Date: Sun Nov 25 23:12:08 2018 +0000 ALSA: usb-audio: fix spelling mistake "Frequence" -> "Frequency" There are spelling mistakes in equalizer name fields, fix them. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20181125231208.14350-1-colin.king@canonical.com Signed-off-by: Takashi Iwai commit 4e5dc64c43192b4fd4c96ac150a8f013065f5f5b Merge: 14ef9d04928b6 ffd1b63a58609 030bdf3698b7c Author: Marc Zyngier Date: Fri Oct 2 09:25:55 2020 +0100 Merge branches 'kvm-arm64/pt-new' and 'kvm-arm64/pmu-5.9' into kvmarm-master/next Signed-off-by: Marc Zyngier commit ffd1b63a5860968068e943eab33383a766d30f64 Author: Will Deacon Date: Wed Sep 30 11:24:42 2020 +0100 KVM: arm64: Ensure user_mem_abort() return value is initialised If a change in the MMU notifier sequence number forces user_mem_abort() to return early when attempting to handle a stage-2 fault, we return uninitialised stack to kvm_handle_guest_abort(), which could potentially result in the injection of an external abort into the guest or a spurious return to userspace. Neither or these are what we want to do. Initialise 'ret' to 0 in user_mem_abort() so that bailing due to a change in the MMU notrifier sequence number is treated as though the fault was handled. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Alexandru Elisei Reviewed-by: Gavin Shan Cc: Gavin Shan Cc: Alexandru Elisei Link: https://lore.kernel.org/r/20200930102442.16142-1-will@kernel.org commit b259d137e91d80bf92eac453ffab179eb7941ede Author: Will Deacon Date: Wed Sep 30 14:18:01 2020 +0100 KVM: arm64: Pass level hint to TLBI during stage-2 permission fault Alex pointed out that we don't pass a level hint to the TLBI instruction when handling a stage-2 permission fault, even though the walker does at some point have the level information in its hands. Rework stage2_update_leaf_attrs() so that it can optionally return the level of the updated pte to its caller, which can in turn be used to provide the correct TLBI level hint. Reported-by: Alexandru Elisei Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Alexandru Elisei Reviewed-by: Gavin Shan Cc: Marc Zyngier Link: https://lore.kernel.org/r/595cc73e-636e-8b3a-f93a-b4e9fb218db8@arm.com Link: https://lore.kernel.org/r/20200930131801.16889-1-will@kernel.org commit 030bdf3698b7c3af190dd1fe714f0545f23441d0 Author: Mauro Carvalho Chehab Date: Fri Oct 2 07:49:46 2020 +0200 KVM: arm64: Fix some documentation build warnings As warned with make htmldocs: .../Documentation/virt/kvm/devices/vcpu.rst:70: WARNING: Malformed table. Text in column margin in table line 2. ======= ====================================================== -ENODEV: PMUv3 not supported or GIC not initialized -ENXIO: PMUv3 not properly configured or in-kernel irqchip not configured as required prior to calling this attribute -EBUSY: PMUv3 already initialized -EINVAL: Invalid filter range ======= ====================================================== The ':' character for two lines are above the size of the column. Besides that, other tables at the file doesn't use ':', so just drop them. While here, also fix this warning also introduced at the same patch: .../Documentation/virt/kvm/devices/vcpu.rst:88: WARNING: Block quote ends without a blank line; unexpected unindent. By marking the C code as a literal block. Fixes: 8be86a5eec04 ("KVM: arm64: Document PMU filtering API") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Marc Zyngier Acked-by: Paolo Bonzini Link: https://lore.kernel.org/r/b5385dd0213f1f070667925bf7a807bf5270ba78.1601616399.git.mchehab+huawei@kernel.org commit cc383a9e245c527d3175e2cf4cced9dbbedbbac6 Author: Ard Biesheuvel Date: Fri Oct 2 10:01:23 2020 +0200 efi: mokvar: add missing include of asm/early_ioremap.h Nathan reports that building the new mokvar table code for 32-bit ARM fails with errors such as error: implicit declaration of function 'early_memunmap' error: implicit declaration of function 'early_memremap' This is caused by the lack of an explicit #include of the appropriate header, and ARM apparently does not inherit that inclusion via another header file. So add the #include. Tested-by: Nathan Chancellor Signed-off-by: Ard Biesheuvel commit ed4424f2fb02497b0ea92bf58c533c598c0da1d3 Author: Julia Lawall Date: Sun Sep 27 21:12:27 2020 +0200 crypto: atmel-tdes - use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Herbert Xu commit 77450fd7cfc21da9f511246ed215db6b343175e1 Author: Julia Lawall Date: Sun Sep 27 21:12:23 2020 +0200 crypto: drivers - use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Herbert Xu commit 03ace9b16bd0c724c9171b8e0467490dc968a3b9 Author: Julia Lawall Date: Sun Sep 27 21:12:17 2020 +0200 hwrng: mxc-rnga - use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Herbert Xu commit f9dc446cb959d1efdb971fb3cde18c354a4a04c9 Author: Julia Lawall Date: Sun Sep 27 21:12:16 2020 +0200 hwrng: iproc-rng200 - use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Acked-by: Florian Fainelli Signed-off-by: Herbert Xu commit 436cdcdec02905d1523aec98891d3a1c889dd529 Author: Julia Lawall Date: Sun Sep 27 21:12:14 2020 +0200 hwrng: stm32 - use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Herbert Xu commit c055e3eae0f133d98e9c66ad136eefd811701b3a Author: Ard Biesheuvel Date: Sat Sep 26 12:26:51 2020 +0200 crypto: xor - use ktime for template benchmarking Currently, we use the jiffies counter as a time source, by staring at it until a HZ period elapses, and then staring at it again and perform as many XOR operations as we can at the same time until another HZ period elapses, so that we can calculate the throughput. This takes longer than necessary, and depends on HZ, which is undesirable, since HZ is system dependent. Let's use the ktime interface instead, and use it to time a fixed number of XOR operations, which can be done much faster, and makes the time spent depend on the performance level of the system itself, which is much more reasonable. To ensure that we have the resolution we need even on systems with 32 kHz time sources, while not spending too much time in the benchmark on a slow CPU, let's switch to 3 attempts of 800 repetitions each: that way, we will only misidentify algorithms that perform within 10% of each other as the fastest if they are faster than 10 GB/s to begin with, which is not expected to occur on systems with such coarse clocks. On ThunderX2, I get the following results: Before: [72625.956765] xor: measuring software checksum speed [72625.993104] 8regs : 10169.000 MB/sec [72626.033099] 32regs : 12050.000 MB/sec [72626.073095] arm64_neon: 11100.000 MB/sec [72626.073097] xor: using function: 32regs (12050.000 MB/sec) After: [72599.650216] xor: measuring software checksum speed [72599.651188] 8regs : 10491 MB/sec [72599.652006] 32regs : 12345 MB/sec [72599.652871] arm64_neon : 11402 MB/sec [72599.652873] xor: using function: 32regs (12345 MB/sec) Link: https://lore.kernel.org/linux-crypto/20200923182230.22715-3-ardb@kernel.org/ Signed-off-by: Ard Biesheuvel Reviewed-by: Douglas Anderson Signed-off-by: Herbert Xu commit 524ccdbdfb52608e9b98fcd64f4337add7009f41 Author: Ard Biesheuvel Date: Sat Sep 26 12:26:50 2020 +0200 crypto: xor - defer load time benchmark to a later time Currently, the XOR module performs its boot time benchmark at core initcall time when it is built-in, to ensure that the RAID code can make use of it when it is built-in as well. Let's defer this to a later stage during the boot, to avoid impacting the overall boot time of the system. Instead, just pick an arbitrary implementation from the list, and use that as the preliminary default. Reviewed-by: Douglas Anderson Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 2fcb4cc3b0303845752fa3f1497a0b037a319063 Author: Sihang Chen Date: Fri Sep 25 22:06:17 2020 +0800 crypto: hisilicon/zip - fix the uninitalized 'curr_qm_qp_num' The 'qm->curr_qm_qp_num' is not initialized, which will result in failure to write the current_q file. Signed-off-by: Sihang Chen Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 42856f0a5a72080ec3424550572100e698e5043e Author: Yang Shen Date: Fri Sep 25 22:06:16 2020 +0800 crypto: hisilicon/zip - fix the return value when device is busy As before, when the ZIP device is too busy to creat a request, it will return '-EBUSY'. But the crypto process think the '-EBUSY' means a successful request and wait for its completion. So replace '-EBUSY' with '-EAGAIN' to show crypto this request is failed. Fixes: 62c455ca853e("crypto: hisilicon - add HiSilicon ZIP...") Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit d340f62db2f6da7f6f05087a4f6f504af9bb4d97 Author: Zhou Wang Date: Fri Sep 25 22:06:15 2020 +0800 crypto: hisilicon/zip - fix zero length input in GZIP decompress The zero length input will cause a call trace when use GZIP decompress like this: Unable to handle kernel paging request at virtual address ... lr : get_gzip_head_size+0x7c/0xd0 [hisi_zip] Judge the input length and return '-EINVAL' when input is invalid. Fixes: 62c455ca853e("crypto: hisilicon - add HiSilicon ZIP...") Signed-off-by: Zhou Wang Signed-off-by: Yang Shen Signed-off-by: Herbert Xu commit 698f95235d242f6922cee73066db8d7a690f3ae1 Author: Hao Fang Date: Fri Sep 25 22:06:14 2020 +0800 crypto: hisilicon/zip - fix the uncleared debug registers ZIP debug registers aren't cleared even if its driver is removed, so add a clearing operation when remove driver. Signed-off-by: Hao Fang Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit ae6ee6ae2b4f4534664561161ef8087e08aff2d9 Author: Herbert Xu Date: Fri Sep 25 18:19:55 2020 +1000 lib/mpi: Fix unused variable warnings This patch removes a number of unused variables and marks others as unused in order to silence compiler warnings about them. Fixes: a8ea8bdd9df9 ("lib/mpi: Extend the MPI library") Signed-off-by: Herbert Xu Tested-by: Tianjia Zhang Signed-off-by: Herbert Xu commit 4a0c1de64bf9d9027a6f19adfba89fc27893db23 Author: Herbert Xu Date: Thu Sep 24 13:29:04 2020 +1000 crypto: x86/poly1305 - Remove assignments with no effect This patch removes a few ineffectual assignments from the function crypto_poly1305_setdctxkey. Reported-by: kernel test robot Signed-off-by: Herbert Xu commit c2fb644638ae45cc4a34aa51a18d687d4781f8a1 Author: Tomer Maimon Date: Thu Sep 24 00:23:05 2020 +0300 hwrng: npcm - modify readl to readb Modify the read size to the correct HW random registers size, 8bit. The incorrect read size caused and faulty HW random value. Signed-off-by: Tomer Maimon Signed-off-by: Herbert Xu commit 00c9211f60db2dead16856f81a3e6ab86b31f275 Author: Peter Ujfalusi Date: Wed Sep 23 13:11:44 2020 +0300 crypto: sa2ul - Fix DMA mapping API usage Make sure that we call the dma_unmap_sg on the correct scatterlist on completion with the correct sg_nents. Use sg_table to managed the DMA mapping and at the same time add the needed dma_sync calls for the sg_table. Signed-off-by: Peter Ujfalusi Signed-off-by: Herbert Xu commit 4fc983266d1eef951a7f44cb70288e331356dca0 Author: Andrei Botila Date: Tue Sep 22 19:03:28 2020 +0300 crypto: caam/qi2 - add support for XTS with 16B IV Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 3a15679b93112f1506e67196a4e514168cf5e6c4 Author: Andrei Botila Date: Tue Sep 22 19:03:27 2020 +0300 crypto: caam/qi - add support for XTS with 16B IV Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 78eebbfafbe721c9d9feadd4bcde958ff9c784a6 Author: Andrei Botila Date: Tue Sep 22 19:03:26 2020 +0300 crypto: caam/jr - add support for XTS with 16B IV Newer CAAM versions (Era 9+) support 16B IVs. Since for these devices the HW limitation is no longer present newer version should process the requests containing 16B IVs directly in hardware without using a fallback. Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 297b931c2a3cada230d8b84432ee982fc68cf76a Author: Andrei Botila Date: Tue Sep 22 19:03:25 2020 +0300 crypto: caam - add xts check for block length equal to zero XTS should not return succes when dealing with block length equal to zero. This is different than the rest of the skcipher algorithms. Fixes: 31bb2f0da1b50 ("crypto: caam - check zero-length input") Cc: # v5.4+ Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 596efd57cfa1e1bee575e2a2df44fd8ec5e4a42d Author: Andrei Botila Date: Tue Sep 22 19:03:24 2020 +0300 crypto: caam/qi2 - add support for more XTS key lengths CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: 226853ac3ebe ("crypto: caam/qi2 - add skcipher algorithms") Cc: # v4.20+ Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 62b9a6690926ee199445b23fd46e6349d9057146 Author: Andrei Botila Date: Tue Sep 22 19:03:23 2020 +0300 crypto: caam/qi - add support for more XTS key lengths CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Cc: # v4.12+ Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit c91f734862664ca86dc3ee7e55f199e2bde829e4 Author: Andrei Botila Date: Tue Sep 22 19:03:22 2020 +0300 crypto: caam/jr - add support for more XTS key lengths CAAM accelerator only supports XTS-AES-128 and XTS-AES-256 since it adheres strictly to the standard. All the other key lengths are accepted and processed through a fallback as long as they pass the xts_verify_key() checks. Fixes: c6415a6016bf ("crypto: caam - add support for acipher xts(aes)") Cc: # v4.4+ Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 36e2d7cfdcf17b6126863d884d4200191e922524 Author: Andrei Botila Date: Tue Sep 22 19:03:21 2020 +0300 crypto: caam/qi2 - add fallback for XTS with more than 8B IV A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: 226853ac3ebe ("crypto: caam/qi2 - add skcipher algorithms") Cc: # v4.20+ Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 83e8aa9121380b23ebae6e413962fa2a7b52cf92 Author: Andrei Botila Date: Tue Sep 22 19:03:20 2020 +0300 crypto: caam/qi - add fallback for XTS with more than 8B IV A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: b189817cf789 ("crypto: caam/qi - add ablkcipher and authenc algorithms") Cc: # v4.12+ Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 9d9b14dbe077c8704d8c3546e38820d35aff2d35 Author: Andrei Botila Date: Tue Sep 22 19:03:19 2020 +0300 crypto: caam/jr - add fallback for XTS with more than 8B IV A hardware limitation exists for CAAM until Era 9 which restricts the accelerator to IVs with only 8 bytes. When CAAM has a lower era a fallback is necessary to process 16 bytes IV. Fixes: c6415a6016bf ("crypto: caam - add support for acipher xts(aes)") Cc: # v4.4+ Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 17f86c5b6be5a6bd94d014d27fbbc04ef2d7653f Author: Qinglang Miao Date: Mon Sep 21 21:10:09 2020 +0800 crypto: mediatek - simplify the return expression of mtk_dfe_dse_reset() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Herbert Xu commit 5784cfb201e61cdb31e6eeed7b258bca74afc1a5 Author: Qinglang Miao Date: Mon Sep 21 21:10:07 2020 +0800 crypto: marvell/octeontx - simplify the return expression of create_sysfs_eng_grps_info() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Herbert Xu commit e356c49c6cf0db3f00e1558749170bd56e47652d Author: Pavel Machek Date: Mon Sep 21 13:34:35 2020 +0200 crypto: ccp - fix error handling Fix resource leak in error handling. Signed-off-by: Pavel Machek (CIP) Acked-by: John Allen Signed-off-by: Herbert Xu commit f74bf733feb9d09675bb12528d7079b5e08454bd Author: Liu Shixin Date: Mon Sep 21 16:24:28 2020 +0800 crypto: cpt - simplify the return expression of cav_register_algs Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Herbert Xu commit b597cc75f7fe76708bc6ab3f0e09bbff6f09ae4a Author: Florian Fainelli Date: Tue Sep 29 10:27:21 2020 -0700 mtd: parsers: bcm63xx: Do not make it modular With commit 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE detection"), we generate a reference to fw_arg3 which is the fourth firmware/command line argument on MIPS platforms. That symbol is not exported and would cause a linking failure. The parser is typically necessary to boot a BCM63xx-based system anyway so having it be part of the kernel image makes sense, therefore make it 'bool' instead of 'tristate'. Fixes: 91e81150d388 ("mtd: parsers: bcm63xx: simplify CFE detection") Signed-off-by: Florian Fainelli Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200929172726.30469-1-f.fainelli@gmail.com commit 88c4203e17241149c768590ad7dd17720d417d5e Author: Miquel Raynal Date: Mon Sep 28 17:57:15 2020 +0200 mtd: spear_smi: Enable compile testing This driver does not contain any architecture specific code, enable compile testing it. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200928155715.14370-1-miquel.raynal@bootlin.com commit 0626258af6eab7db900d5485e9b3710198c45d43 Author: Bernard Zhao Date: Tue Sep 22 04:28:02 2020 -0700 mtd: maps: vmu-flash: fix typos for struct memcard Change struct memcard`s element "removeable" -> "removable". Signed-off-by: Bernard Zhao Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200922112814.26761-1-bernard@vivo.com commit b3e79e7682e075326df8041b826b03453acacd0a Author: Serge Semin Date: Sun Sep 20 14:14:44 2020 +0300 mtd: physmap: Add Baikal-T1 physically mapped ROM support Baikal-T1 Boot Controller provides an access to a RO storages, which are physically mapped into the SoC MMIO space. In particularly there are Internal ROM embedded into the SoC with a pre-installed firmware, externally attached SPI flash (also accessed in the read-only mode) and a memory region, which mirrors one of them in accordance with the currently enabled system boot mode (also called Boot ROM). This commit adds the Internal ROM support to the physmap driver of the MTD kernel subsystem. The driver will create the Internal ROM MTD as long as it is defined in the system dts file. The physically mapped SPI flash region will be used to implement the SPI-mem interface. The mirroring memory region won't be accessible directly since it's redundant due to both bootable regions being exposed anyway. Note we had to create a dedicated code for the ROMs since read from the corresponding memory regions must be done via the dword-aligned addresses. Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Pavel Parkhomenko Cc: Lee Jones Cc: linux-mips@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200920111445.21816-1-Sergey.Semin@baikalelectronics.ru commit 6aec345ed83a834ea796220741e5d8ca94299d6e Author: Liu Shixin Date: Sat Sep 19 18:08:54 2020 +0800 mtd: maps: vmu-flash: simplify the return expression of probe_maple_vmu Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200919100854.1639267-1-liushixin2@huawei.com commit 2338484d14f3f4b3bd1f7bb416805976e7bd0cc5 Author: Thinh Nguyen Date: Wed Sep 30 17:44:38 2020 -0700 usb: dwc3: gadget: Return early if no TRB update If the transfer had already started and there's no TRB to update, then there's no need to go through __dwc3_gadget_kick_transfer(). There is no problem reissuing UPDATE_TRANSFER command. This change just saves the driver from doing a few operations. This happens when we run out of TRB and function driver still queues for more requests. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 346a15cdf65263d8a8dfdbc5d2702471a2dcef6c Author: Thinh Nguyen Date: Wed Sep 30 17:44:32 2020 -0700 usb: dwc3: gadget: Keep TRBs in request order If we couldn't finish preparing all the TRBs of a request, don't prepare the next request. Otherwise, the TRBs order will be mixed up and the controller will process the wrong TRB. This is a corner case where there's not enough TRBs for a request that needs the extra TRB but there's still 1 available TRB in the pool. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 8dbbe48c7a9989c75e39bfb2a886e163fa21660a Author: Thinh Nguyen Date: Wed Sep 30 17:44:25 2020 -0700 usb: dwc3: gadget: Revise setting IOC when no TRB left To keep the setting of interrupt-on-completion (IOC) when out of TRBs consistent and easier to read, the caller of dwc3_prepare_one_trb() will determine if the TRB must have IOC bit set. This also reduces the number of times we need to call dwc3_calc_trbs_left(). Note that we only care about setting IOC from insufficient number of TRBs for SG and not linear requests (because we don't need to split linear requests). Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit f9cc581badb144a3dcd841aee2d3bc2d242fcb2f Author: Thinh Nguyen Date: Wed Sep 30 17:44:19 2020 -0700 usb: dwc3: gadget: Look ahead when setting IOC Previously if we run out of TRBs for the last SG entry that requires an extra TRB, we set interrupt-on-completion (IOC) bit to an already prepared TRB (i.e. HWO=1). This logic is not clean, and it's not a typical way to prepare TRB. Also, this prevents showing IOC setup in tracepoint when __dwc3_prepare_one_trb() is executed. Instead, let's look ahead when preparing TRB to know whether to set the IOC bit before the last SG entry. This requires adding a new parameter "must_interrupt" to dwc3_prepare_one_trb(). Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit d72ecc08dee49cc0b032a74c7efabab877f5c3fa Author: Thinh Nguyen Date: Tue Sep 29 00:18:48 2020 -0700 usb: dwc3: gadget: Allow restarting a transfer It's possible that there's no new TRBs prepared when kicking a transfer. This happens when we need to stop and restart a transfer such as in the case of reinitiating a stream or retrying isoc transfer. For streams, sometime host may reject a stream and the device may need to reinitiate that stream by stopping and restarting a transfer. In this case, all the TRBs may have already been prepared. Allow the function __dwc3_gadget_kick_transfer() to go through even though there's no new TRB. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit a73abc28ce67989ebf881f33961d9dec9c7522b9 Author: Tang Bin Date: Mon Sep 28 20:00:51 2020 +0800 usb: bdc: remove duplicated error message in case devm_platform_ioremap_resource() fails, that function already prints a relevant error message which renders the driver's dev_err() redundant. Let's remove the unnecessary message and, while at that, also make sure to pass along the error value returned by devm_platform_ioremap_resource() instead of always returning -ENOMEM. Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin [balbi@kernel.org : improved commit log] Signed-off-by: Felipe Balbi commit ae7e86108b12351028fa7e8796a59f9b2d9e1774 Author: Wesley Cheng Date: Mon Sep 28 17:20:59 2020 -0700 usb: dwc3: Stop active transfers before halting the controller In the DWC3 databook, for a device initiated disconnect or bus reset, the driver is required to send dependxfer commands for any pending transfers. In addition, before the controller can move to the halted state, the SW needs to acknowledge any pending events. If the controller is not halted properly, there is a chance the controller will continue accessing stale or freed TRBs and buffers. Signed-off-by: Wesley Cheng Reviewed-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 71ea88f6652a52f85b2110486ca99d26b71a3d8d Author: Peter Chen Date: Thu Sep 10 17:11:30 2020 +0800 usb: cdns3: gadget: enlarge the TRB ring length At Android ADB and MTP use case, it uses f_fs which supports scatter list, it means one request may need several TRBs for it. Besides, TRB consumes very fast compared to TRB has prepared for above use case, there are at most 120 pending requests, the date size is 16KB for each request, so four TRBs (4KB per TRB) per sg entry at worst case. so we need to enlarge the TRB ring length to avoid "no free TRB error". Since each TRB only consumes 12 bytes (3 * 32 bits), we enlarge the TRB length to 600, it leaves some buffers for potential "no free TRB error", and only increases a little memory cost. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit d6be7c94f9f80fdb64d896b89657ebc9ed96e3ed Author: Peter Chen Date: Thu Sep 10 17:11:29 2020 +0800 usb: cdns3: gadget: sg_support is only for DEV_VER_V2 or above The scatter buffer list support earlier than DEV_VER_V2 is not good enough, software can't know well about short transfer for it. Cc: Pawel Laszczak Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 141e70fef4eea939a78b62517bda9ea01d936aad Author: Peter Chen Date: Thu Sep 10 17:11:28 2020 +0800 usb: cdns3: gadget: need to handle sg case for workaround 2 case Add sg case for workaround 2, the workaround 2 is described at the beginning of this file. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 249f0a25e8becebe351e0f70e00fc84f47d6584d Author: Peter Chen Date: Thu Sep 10 17:11:27 2020 +0800 usb: cdns3: gadget: handle sg list use case at completion correctly - Judge each TRB has been handled at cdns3_trb_handled, since the DMA pointer may be at the middle of the TD, we can't consider this TD has finished at that time. - Calculate req->actual according to finished TRBs. - Handle short transfer for sg list use case correctly. When the short transfer occurs, we check OUT_SMM at TRB to see if it is the last TRB. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 87e1dcd48970ea1cf2d2ce368eb70a46c2eff3ee Author: Peter Chen Date: Thu Sep 10 17:11:26 2020 +0800 usb: cdns3: gadget: add CHAIN and ISP bit for sg list use case For sg buffer list use case, we need to add ISP for each TRB, and add CHAIN bit for each TRB except for the last TRB. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 4e218882eb5a967ea042ca68069140d2c969971a Author: Peter Chen Date: Thu Sep 10 17:11:24 2020 +0800 usb: cdns3: gadget: improve the dump TRB operation at cdns3_ep_run_transfer It only dumps the first TRB per request, it is not useful if only dump the first TRB when there are several TRBs per request. We improve it by dumpping all TRBs per request in this commit. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit abc6b579048e2084ea28c677dd11106d67fe8498 Author: Peter Chen Date: Thu Sep 10 17:11:23 2020 +0800 usb: cdns3: gadget: using correct sg operations It needs to use request->num_mapped_sgs to indicate mapped sg number, the request->num_sgs is the sg number before the mapping. These two entries have different values for the platforms which iommu or swiotlb is used. Besides, it needs to use correct sg APIs for mapped sg list for TRB assignment. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 31b5de5f3799a6d1656c0ed3f9ec2c8432eeaeac Author: Mauro Carvalho Chehab Date: Tue Sep 8 09:20:57 2020 +0200 dt-bindings: document a new quirk for dwc3 At Hikey 970, setting the SPLIT disable at the General User Register 3 is required. Without that, the URBs generated by the usbhid driver return -EPROTO errors. That causes the code at hid-core.c to call hid_io_error(), which schedules a reset_work, causing a call to hid_reset(). In turn, the code there will call: usb_queue_reset_device(usbhid->intf); The net result is that the input devices won't work, and will be reset on every 0.5 seconds: [ 33.122384] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0002 [ 33.378220] usb 1-1.1: reset low-speed USB device number 3 using xhci-hcd [ 33.698394] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0000 [ 34.882365] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0002 [ 35.138217] usb 1-1.1: reset low-speed USB device number 3 using xhci-hcd [ 35.458617] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0000 [ 36.642392] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0002 [ 36.898207] usb 1-1.1: reset low-speed USB device number 3 using xhci-hcd [ 37.218598] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0000 [ 38.402368] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0002 [ 38.658174] usb 1-1.1: reset low-speed USB device number 3 using xhci-hcd [ 38.978594] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0000 [ 40.162361] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0002 [ 40.418148] usb 1-1.1: reset low-speed USB device number 3 using xhci-hcd ... [ 397.698132] usb 1-1.1: reset low-speed USB device number 3 using xhci-hcd Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Felipe Balbi commit f580170f135af14e287560d94045624d4242d712 Author: Yu Chen Date: Tue Sep 8 09:20:56 2020 +0200 usb: dwc3: Add splitdisable quirk for Hisilicon Kirin Soc SPLIT_BOUNDARY_DISABLE should be set for DesignWare USB3 DRD Core of Hisilicon Kirin Soc when dwc3 core act as host. [mchehab: dropped a dev_dbg() as only traces are now allowwed on this driver] Signed-off-by: Yu Chen Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Felipe Balbi commit 2a87445af23ec7db311ff81f141626e72a2bbd86 Author: Tang Bin Date: Sun Sep 27 21:53:04 2020 +0800 usb: bdc: Fix unused assignment in bdc_probe() Delete unused initialized value of 'ret', because it will be assigned by the function clk_prepare_enable(). Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin Signed-off-by: Felipe Balbi commit f0c485663d5976acb1cb490981a4763a215df75e Author: Zqiang Date: Sun Sep 27 16:01:16 2020 +0800 usb: gadget: uvc: Fix the wrong v4l2_device_unregister call If an error occurred before calling the 'v4l2_device_register' func, and then goto error, but no need to call 'v4l2_device_unregister' func. Signed-off-by: Zqiang Signed-off-by: Felipe Balbi commit 7f2958d9ad58a41df81a7c1e28dd5ddeeec58890 Author: Thinh Nguyen Date: Thu Sep 24 01:22:14 2020 -0700 usb: dwc3: gadget: Rename misleading function names The functions dwc3_prepare_one_trb_sg and dwc3_prepare_one_trb_linear are not necessarily preparing "one" TRB, it can prepare multiple TRBs. Rename these functions as follow: dwc3_prepare_one_trb_sg -> dwc3_prepare_trbs_sg dwc3_prepare_one_trb_linear -> dwc3_prepare_trbs_linear Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit cb1b3997b636f65cee70e03c86627be521272c5d Author: Thinh Nguyen Date: Thu Sep 24 01:22:07 2020 -0700 usb: dwc3: gadget: Refactor preparing last TRBs There are a lot of common codes for preparing SG and linear TRBs. Refactor them for easier read. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 30892cba55968fe244feac811cd00cc12b1a574b Author: Thinh Nguyen Date: Thu Sep 24 01:22:01 2020 -0700 usb: dwc3: gadget: Set IOC if not enough for extra TRBs If we run out of TRBs because we need extra TRBs, make sure to set the IOC bit for the previously prepared TRB to get completion notification to free up TRBs to resume later. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 490410b2e73cd350ba91946913b017c8f6e1b612 Author: Thinh Nguyen Date: Thu Sep 24 01:21:55 2020 -0700 usb: dwc3: gadget: Check for number of TRBs prepared By returning the number of TRBs prepared, we know whether to execute __dwc3_gadget_kick_transfer(). This allows us to check if we ran out of TRBs when extra TRBs are needed for OUT transfers. It also allows us to properly handle usb_gadget_map_request_by_dev() error. Fixes: c6267a51639b ("usb: dwc3: gadget: align transfers to wMaxPacketSize") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 13111fcb0d64fb69bd7466d6e2ca6ed7b95a9d50 Author: Thinh Nguyen Date: Thu Sep 24 01:21:49 2020 -0700 usb: dwc3: gadget: Return the number of prepared TRBs In preparation for fixing the check for number of remaining TRBs, revise dwc3_prepare_one_trb_linear() and dwc3_prepare_one_trb_sg() to return the number of prepared TRBs. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 66706077dc89c66a4777a4c6298273816afb848c Author: Thinh Nguyen Date: Thu Sep 24 01:21:43 2020 -0700 usb: dwc3: ep0: Fix ZLP for OUT ep0 requests The current ZLP handling for ep0 requests is only for control IN requests. For OUT direction, DWC3 needs to check and setup for MPS alignment. Usually, control OUT requests can indicate its transfer size via the wLength field of the control message. So usb_request->zero is usually not needed for OUT direction. To handle ZLP OUT for control endpoint, make sure the TRB is MPS size. Cc: stable@vger.kernel.org Fixes: c7fcdeb2627c ("usb: dwc3: ep0: simplify EP0 state machine") Fixes: d6e5a549cc4d ("usb: dwc3: simplify ZLP handling") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit a2841f41d07fc85cf47d13fda30e254c5413e514 Author: Thinh Nguyen Date: Thu Sep 24 01:21:36 2020 -0700 usb: dwc3: gadget: Improve TRB ZLP setup For OUT requests that requires extra TRBs for ZLP. We don't need to prepare the 0-length TRB and simply prepare the MPS size TRB. This reduces 1 TRB needed to prepare for ZLP. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 2b80357b773c4c572233d191cd849d25311c48fd Author: Thinh Nguyen Date: Thu Sep 24 01:21:30 2020 -0700 usb: dwc3: gadget: Refactor preparing extra TRB When the driver prepares the extra TRB, it uses bounce buffer. If we just add a new parameter to dwc3_prepare_one_trb() to indicate this, then we can refactor and simplify the driver quite a bit. dwc3_prepare_one_trb() also checks if a request had been moved to the started list. This is a prerequisite to subsequence patches improving the handling of extra TRBs. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 690e5c2dc29f8891fcfd30da67e0d5837c2c9df5 Author: Thinh Nguyen Date: Thu Sep 24 01:21:24 2020 -0700 usb: dwc3: gadget: Reclaim extra TRBs after request completion An SG request may be partially completed (due to no available TRBs). Don't reclaim extra TRBs and clear the needs_extra_trb flag until the request is fully completed. Otherwise, the driver will reclaim the wrong TRB. Cc: stable@vger.kernel.org Fixes: 1f512119a08c ("usb: dwc3: gadget: add remaining sg entries to ring") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit ca3df3468eec87f6374662f7de425bc44c3810c1 Author: Thinh Nguyen Date: Thu Sep 24 01:21:18 2020 -0700 usb: dwc3: gadget: Check MPS of the request length When preparing for SG, not all the entries are prepared at once. When resume, don't use the remaining request length to calculate for MPS alignment. Use the entire request->length to do that. Cc: stable@vger.kernel.org Fixes: 5d187c0454ef ("usb: dwc3: gadget: Don't setup more than requested") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 5b35dd1a5a666329192a9616ec21098591259058 Author: Chunfeng Yun Date: Mon Sep 14 14:17:30 2020 +0800 usb: gadget: bcm63xx_udc: fix up the error of undeclared usb_debug_root Fix up the build error caused by undeclared usb_debug_root Cc: stable Fixes: a66ada4f241c ("usb: gadget: bcm63xx_udc: create debugfs directory under usb root") Reported-by: kernel test robot Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi commit a50758bb6c740954c81aecb5a15df8e0c8da6250 Author: Thierry Reding Date: Thu Aug 6 18:04:17 2020 +0200 usb: gadget: tegra-xudc: Do not print errors on probe deferral Probe deferral is an expected condition and can happen multiple times during boot. Make sure not to output an error message in that case because they are not useful. Signed-off-by: Thierry Reding Signed-off-by: Felipe Balbi commit 230c1aa370890dcd87772e775c19fa603ca5ac11 Author: Thierry Reding Date: Thu Aug 6 18:04:16 2020 +0200 usb: gadget: tegra-xudc: Properly align parameters Align parameters on subsequent lines with the parameters on the first line for consistency. Signed-off-by: Thierry Reding Signed-off-by: Felipe Balbi commit 2003a419c7f3b5990433aa85f3804bb4ccacbba9 Author: Colin Ian King Date: Wed Aug 5 14:14:58 2020 +0100 usb: gadget: fix spelling mistake "Dectected" -> "Detected" There is a spelling mistake in a literal string. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi commit de21e7289b7abfe4b0a79a8a8c9d3429fd1d7263 Author: Thierry Reding Date: Thu Aug 6 18:04:15 2020 +0200 usb: gadget: tegra-xudc: Use consistent spelling and formatting Make sure to use consistent spelling and formatting in error messages. Signed-off-by: Thierry Reding Signed-off-by: Felipe Balbi commit 6c2a754a12ba9255cf34fac435fb0c448dce9a95 Author: Christophe JAILLET Date: Sun Aug 9 09:29:48 2020 +0200 usb: gadget: tegra-xudc: Avoid GFP_ATOMIC where it is not needed There is no need to use GFP_ATOMIC here. It is a probe function, no spinlock is taken. Reviewed-by: JC Kuo Acked-by: Thierry Reding Signed-off-by: Christophe JAILLET Signed-off-by: Felipe Balbi commit 5a1da544e572f58986d7bee03d31c91d1f87f214 Author: Peter Chen Date: Tue Aug 11 10:00:26 2020 +0800 usb: gadget: core: do not try to disconnect gadget if it is not connected Current UDC core connects gadget during the loading gadget flow (udc_bind_to_driver->usb_udc_connect_control), but for platforms which do not connect gadget if the VBUS is not there, they call usb_gadget_disconnect, but the gadget is not connected at this time, notify disconnecton for the gadget driver is meaningless at this situation. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 8266b08ed90cd9091dd8e3f37a740a409454e454 Author: Thinh Nguyen Date: Thu Jul 30 16:29:03 2020 -0700 usb: dwc3: gadget: Refactor ep command completion Refactor END_TRANSFER command completion handling and move it outside of the switch statement to its own function. This makes it cleaner and consistent with other event handler functions. No functional change here. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit de56298f78e449e9490a8621d3bd80a04ad40e6d Author: Krzysztof Kozlowski Date: Fri Jul 31 09:41:22 2020 +0200 usb: gadget: s3c: Remove unused 'udc' variable Remove unused 'udc' variable to fix compile warnings: drivers/usb/gadget/udc/s3c2410_udc.c: In function 's3c2410_udc_dequeue': drivers/usb/gadget/udc/s3c2410_udc.c:1268:22: warning: variable 'udc' set but not used [-Wunused-but-set-variable] Reviewed-by: Nathan Chancellor Signed-off-by: Krzysztof Kozlowski Signed-off-by: Felipe Balbi commit 5bde3f020a150aa16f396ce22b6a778627dd4484 Author: Li Jun Date: Wed Jul 22 17:02:55 2020 +0800 usb: dwc3: debugfs: do not queue work if try to change mode on non-drd Do not try to queue a drd work for change mode if the port is not a drd, this is to avoid below kernel dump: [ 60.115529] ------------[ cut here ]------------ [ 60.120166] WARNING: CPU: 1 PID: 627 at kernel/workqueue.c:1473 __queue_work+0x46c/0x520 [ 60.128254] Modules linked in: [ 60.131313] CPU: 1 PID: 627 Comm: sh Not tainted 5.7.0-rc4-00022-g914a586-dirty #135 [ 60.139054] Hardware name: NXP i.MX8MQ EVK (DT) [ 60.143585] pstate: a0000085 (NzCv daIf -PAN -UAO) [ 60.148376] pc : __queue_work+0x46c/0x520 [ 60.152385] lr : __queue_work+0x314/0x520 [ 60.156393] sp : ffff8000124ebc40 [ 60.159705] x29: ffff8000124ebc40 x28: ffff800011808018 [ 60.165018] x27: ffff800011819ef8 x26: ffff800011d39980 [ 60.170331] x25: ffff800011808018 x24: 0000000000000100 [ 60.175643] x23: 0000000000000013 x22: 0000000000000001 [ 60.180955] x21: ffff0000b7c08e00 x20: ffff0000b6c31080 [ 60.186267] x19: ffff0000bb99bc00 x18: 0000000000000000 [ 60.191579] x17: 0000000000000000 x16: 0000000000000000 [ 60.196891] x15: 0000000000000000 x14: 0000000000000000 [ 60.202202] x13: 0000000000000000 x12: 0000000000000000 [ 60.207515] x11: 0000000000000000 x10: 0000000000000040 [ 60.212827] x9 : ffff800011d55460 x8 : ffff800011d55458 [ 60.218138] x7 : ffff0000b7800028 x6 : 0000000000000000 [ 60.223450] x5 : ffff0000b7800000 x4 : 0000000000000000 [ 60.228762] x3 : ffff0000bb997cc0 x2 : 0000000000000001 [ 60.234074] x1 : 0000000000000000 x0 : ffff0000b6c31088 [ 60.239386] Call trace: [ 60.241834] __queue_work+0x46c/0x520 [ 60.245496] queue_work_on+0x6c/0x90 [ 60.249075] dwc3_set_mode+0x48/0x58 [ 60.252651] dwc3_mode_write+0xf8/0x150 [ 60.256489] full_proxy_write+0x5c/0xa8 [ 60.260327] __vfs_write+0x18/0x40 [ 60.263729] vfs_write+0xdc/0x1c8 [ 60.267045] ksys_write+0x68/0xf0 [ 60.270360] __arm64_sys_write+0x18/0x20 [ 60.274286] el0_svc_common.constprop.0+0x68/0x160 [ 60.279077] do_el0_svc+0x20/0x80 [ 60.282394] el0_sync_handler+0x10c/0x178 [ 60.286403] el0_sync+0x140/0x180 [ 60.289716] ---[ end trace 70b155582e2b7988 ]--- Signed-off-by: Li Jun Signed-off-by: Felipe Balbi commit 03c1fd622f72c7624c81b64fdba4a567ae5ee9cb Author: Li Jun Date: Tue Jul 28 20:42:41 2020 +0800 usb: dwc3: core: add phy cleanup for probe error handling Add the phy cleanup if dwc3 mode init fail, which is the missing part of de-init for dwc3 core init. Fixes: c499ff71ff2a ("usb: dwc3: core: re-factor init and exit paths") Cc: Signed-off-by: Li Jun Signed-off-by: Felipe Balbi commit 266d0493900ac5d6a21cdbe6b1624ed2da94d47a Author: Li Jun Date: Tue Jul 28 20:42:40 2020 +0800 usb: dwc3: core: don't trigger runtime pm when remove driver No need to trigger runtime pm in driver removal, otherwise if user disable auto suspend via sys file, runtime suspend may be entered, which will call dwc3_core_exit() again and there will be clock disable not balance warning: [ 2026.820154] xhci-hcd xhci-hcd.0.auto: remove, state 4 [ 2026.825268] usb usb2: USB disconnect, device number 1 [ 2026.831017] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered [ 2026.836806] xhci-hcd xhci-hcd.0.auto: remove, state 4 [ 2026.842029] usb usb1: USB disconnect, device number 1 [ 2026.848029] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered [ 2026.865889] ------------[ cut here ]------------ [ 2026.870506] usb2_ctrl_root_clk already disabled [ 2026.875082] WARNING: CPU: 0 PID: 731 at drivers/clk/clk.c:958 clk_core_disable+0xa0/0xa8 [ 2026.883170] Modules linked in: dwc3(-) phy_fsl_imx8mq_usb [last unloaded: dwc3] [ 2026.890488] CPU: 0 PID: 731 Comm: rmmod Not tainted 5.8.0-rc7-00280-g9d08cca-dirty #245 [ 2026.898489] Hardware name: NXP i.MX8MQ EVK (DT) [ 2026.903020] pstate: 20000085 (nzCv daIf -PAN -UAO BTYPE=--) [ 2026.908594] pc : clk_core_disable+0xa0/0xa8 [ 2026.912777] lr : clk_core_disable+0xa0/0xa8 [ 2026.916958] sp : ffff8000121b39a0 [ 2026.920271] x29: ffff8000121b39a0 x28: ffff0000b11f3700 [ 2026.925583] x27: 0000000000000000 x26: ffff0000b539c700 [ 2026.930895] x25: 000001d7e44e1232 x24: ffff0000b76fa800 [ 2026.936208] x23: ffff0000b76fa6f8 x22: ffff800008d01040 [ 2026.941520] x21: ffff0000b539ce00 x20: ffff0000b7105000 [ 2026.946832] x19: ffff0000b7105000 x18: 0000000000000010 [ 2026.952144] x17: 0000000000000001 x16: 0000000000000000 [ 2026.957456] x15: ffff0000b11f3b70 x14: ffffffffffffffff [ 2026.962768] x13: ffff8000921b36f7 x12: ffff8000121b36ff [ 2026.968080] x11: ffff8000119e1000 x10: ffff800011bf26d0 [ 2026.973392] x9 : 0000000000000000 x8 : ffff800011bf3000 [ 2026.978704] x7 : ffff800010695d68 x6 : 0000000000000252 [ 2026.984016] x5 : ffff0000bb9881f0 x4 : 0000000000000000 [ 2026.989327] x3 : 0000000000000027 x2 : 0000000000000023 [ 2026.994639] x1 : ac2fa471aa7cab00 x0 : 0000000000000000 [ 2026.999951] Call trace: [ 2027.002401] clk_core_disable+0xa0/0xa8 [ 2027.006238] clk_core_disable_lock+0x20/0x38 [ 2027.010508] clk_disable+0x1c/0x28 [ 2027.013911] clk_bulk_disable+0x34/0x50 [ 2027.017758] dwc3_core_exit+0xec/0x110 [dwc3] [ 2027.022122] dwc3_suspend_common+0x84/0x188 [dwc3] [ 2027.026919] dwc3_runtime_suspend+0x74/0x9c [dwc3] [ 2027.031712] pm_generic_runtime_suspend+0x28/0x40 [ 2027.036419] genpd_runtime_suspend+0xa0/0x258 [ 2027.040777] __rpm_callback+0x88/0x140 [ 2027.044526] rpm_callback+0x20/0x80 [ 2027.048015] rpm_suspend+0xd0/0x418 [ 2027.051503] __pm_runtime_suspend+0x58/0xa0 [ 2027.055693] dwc3_runtime_idle+0x7c/0x90 [dwc3] [ 2027.060224] __rpm_callback+0x88/0x140 [ 2027.063973] rpm_idle+0x78/0x150 [ 2027.067201] __pm_runtime_idle+0x58/0xa0 [ 2027.071130] dwc3_remove+0x64/0xc0 [dwc3] [ 2027.075140] platform_drv_remove+0x28/0x48 [ 2027.079239] device_release_driver_internal+0xf4/0x1c0 [ 2027.084377] driver_detach+0x4c/0xd8 [ 2027.087954] bus_remove_driver+0x54/0xa8 [ 2027.091877] driver_unregister+0x2c/0x58 [ 2027.095799] platform_driver_unregister+0x10/0x18 [ 2027.100509] dwc3_driver_exit+0x14/0x1408 [dwc3] [ 2027.105129] __arm64_sys_delete_module+0x178/0x218 [ 2027.109922] el0_svc_common.constprop.0+0x68/0x160 [ 2027.114714] do_el0_svc+0x20/0x80 [ 2027.118031] el0_sync_handler+0x88/0x190 [ 2027.121953] el0_sync+0x140/0x180 [ 2027.125267] ---[ end trace 027f4f8189958f1f ]--- [ 2027.129976] ------------[ cut here ]------------ Fixes: fc8bb91bc83e ("usb: dwc3: implement runtime PM") Cc: Signed-off-by: Li Jun Signed-off-by: Felipe Balbi commit 7595c38bb1a64b3103ded1877bbf519e7dad4b1d Author: Peter Chen Date: Fri Aug 21 10:55:49 2020 +0800 Revert "usb: udc: allow adding and removing the same gadget device" We have already allocated gadget structure dynamically at UDC (dwc3) driver, so commit fac323471df6 ("usb: udc: allow adding and removing the same gadget device")could be reverted. Cc: Greg Kroah-Hartman Cc: Alan Stern Reviewed-by: Greg Kroah-Hartman Reviewed-by: Alan Stern Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit e81a7018d93a7de31a3f121c9a7eecd0a5ec58b0 Author: Peter Chen Date: Fri Aug 21 10:55:48 2020 +0800 usb: dwc3: allocate gadget structure dynamically The current code uses commit fac323471df6 ("usb: udc: allow adding and removing the same gadget device") as the workaround to let the gadget device is re-used, but it is not allowed from driver core point. In this commit, we allocate gadget structure dynamically, and free it at its release function. Since the gadget device's driver_data has already occupied by usb_composite_dev structure, we have to use gadget device's platform data to store dwc3 structure. Cc: Greg Kroah-Hartman Cc: Alan Stern Reviewed-by: Greg Kroah-Hartman Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 6b7778924c70dad395f6aa843d641e799590f890 Author: Peter Chen Date: Fri Aug 21 10:55:47 2020 +0800 usb: cdns3: gadget: fix possible memory leak If cdns3_gadget_start is failed, it never frees cdns3_device structure. Meanwhile, there is no release function for gadget device, it causes there is no sync with driver core. To fix this, we add release function for gadget device, and free cdns3_device structure at there. Meanwhile, With the new UDC core APIs, we could work with driver core better to handle memory leak issue. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 9b719c7119e77e8ddeefe4772c554d2863579c2b Author: Alan Stern Date: Fri Aug 21 10:55:46 2020 +0800 USB: UDC: net2272: Fix memory leaks Like net2280 (on which it was based), the net2272 UDC driver has a problem with leaking memory along some of its failure pathways. It also has another problem, not previously noted, in that some of the failure pathways will call usb_del_gadget_udc() without first calling usb_add_gadget_udc_release(). And it leaks memory by calling kfree() when it should call put_device(). Until now it has been impossible to handle the memory leaks, because of lack of support in the UDC core for separately initializing and adding gadgets, or for separately deleting and freeing gadgets. An earlier patch in this series adds the necessary support, making it possible to fix the outstanding problems properly. This patch adds an "added" flag to the net2272 structure to indicate whether or not the gadget has been registered (and thus whether or not to call usb_del_gadget()), and it fixes the deallocation issues by calling usb_put_gadget() at the appropriate places. A similar memory leak issue, apparently never before recognized, stems from the fact that the driver never initializes the drvdata field in the gadget's embedded struct device! Evidently this wasn't noticed because the pointer is only ever used as an argument to kfree(), which doesn't mind getting called with a NULL pointer. In fact, the drvdata for gadget device will be written by usb_composite_dev structure if any gadget class is loaded, so it needs to use usb_gadget structure to get net2280 private data. CC: Anton Vasilyev CC: Evgeny Novikov CC: Benjamin Herrenschmidt Reviewed-by: Greg Kroah-Hartman Signed-off-by: Alan Stern Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit f770fbec4165b1acfabdeadb01ad6008d2c537b5 Author: Alan Stern Date: Fri Aug 21 10:55:45 2020 +0800 USB: UDC: net2280: Fix memory leaks As Anton and Evgeny have noted, the net2280 UDC driver has a problem with leaking memory along some of its failure pathways. It also has another problem, not previously noted, in that some of the failure pathways will call usb_del_gadget_udc() without first calling usb_add_gadget_udc_release(). And it leaks memory by calling kfree() when it should call put_device(). Previous attempts to fix the problems have failed because of lack of support in the UDC core for separately initializing and adding gadgets, or for separately deleting and freeing gadgets. The previous patch in this series adds the necessary support, making it possible to fix the outstanding problems properly. This patch adds an "added" flag to the net2280 structure to indicate whether or not the gadget has been registered (and thus whether or not to call usb_del_gadget()), and it fixes the deallocation issues by calling usb_put_gadget() at the appropriate point. A similar memory leak issue, apparently never before recognized, stems from the fact that the driver never initializes the drvdata field in the gadget's embedded struct device! Evidently this wasn't noticed because the pointer is only ever used as an argument to kfree(), which doesn't mind getting called with a NULL pointer. In fact, the drvdata for gadget device will be written by usb_composite_dev structure if any gadget class is loaded, so it needs to use usb_gadget structure to get net2280 private data. CC: Benjamin Herrenschmidt Reported-by: Anton Vasilyev Reported-by: Evgeny Novikov Reviewed-by: Greg Kroah-Hartman Signed-off-by: Alan Stern Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 3301c215a2bb94b5a0afcb444bbe9bf2a395a65d Author: Alan Stern Date: Fri Aug 21 10:55:44 2020 +0800 USB: UDC: Expand device model API interface The routines used by the UDC core to interface with the kernel's device model, namely usb_add_gadget_udc(), usb_add_gadget_udc_release(), and usb_del_gadget_udc(), provide access to only a subset of the device model's full API. They include functionality equivalent to device_register() and device_unregister() for gadgets, but they omit device_initialize(), device_add(), device_del(), get_device(), and put_device(). This patch expands the UDC API by adding usb_initialize_gadget(), usb_add_gadget(), usb_del_gadget(), usb_get_gadget(), and usb_put_gadget() to fill in the gap. It rewrites the existing routines to call the new ones. CC: Anton Vasilyev CC: Evgeny Novikov CC: Benjamin Herrenschmidt Reviewed-by: Greg Kroah-Hartman Signed-off-by: Alan Stern Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 8dafb3c04df3b3b5a3ee2c7f5d8285a8b2f0aa78 Author: Peter Chen Date: Fri Aug 21 11:14:37 2020 +0800 usb: cdns3: gadget: fix some endian issues It is found by sparse. Reported-by: kbuild test robot Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 87a2dfb136430c914f286e4b9870d538e559df29 Author: Ye Bin Date: Mon Aug 24 16:42:34 2020 +0800 usb: gadget: fsl: Fix unsigned expression compared with zero in fsl_udc_probe udc_controller->irq is "unsigned int" always >= 0, but platform_get_irq may return little than zero. So "dc_controller->irq < 0" condition is never accessible. Acked-by: Li Yang Signed-off-by: Ye Bin Signed-off-by: Felipe Balbi commit 4eea21dc67b0c6ba15ae41b1defa113a680a858e Author: Lorenzo Colitti Date: Wed Aug 19 01:19:49 2020 +0900 usb: gadget: u_ether: enable qmult on SuperSpeed Plus as well The u_ether driver has a qmult setting that multiplies the transmit queue length (which by default is 2). The intent is that it should be enabled at high/super speed, but because the code does not explicitly check for USB_SUPER_PLUS, it is disabled at that speed. Fix this by ensuring that the queue multiplier is enabled for any wired link at high speed or above. Using >= for USB_SPEED_* constants seems correct because it is what the gadget_is_xxxspeed functions do. The queue multiplier substantially helps performance at higher speeds. On a direct SuperSpeed Plus link to a Linux laptop, iperf3 single TCP stream: Before (qmult=1): 1.3 Gbps After (qmult=5): 3.2 Gbps Fixes: 04617db7aa68 ("usb: gadget: add SS descriptors to Ethernet gadget") Reviewed-by: Maciej Żenczykowski Signed-off-by: Lorenzo Colitti Signed-off-by: Felipe Balbi commit d98ef43bfb65b5201e1afe36aaf8c4f9d71b4307 Author: Yoshihiro Shimoda Date: Wed Sep 9 09:01:32 2020 +0900 usb: gadget: u_serial: clear suspended flag when disconnecting The commit aba3a8d01d62 ("usb: gadget: u_serial: add suspend resume callbacks") set/cleared the suspended flag in USB bus suspend/resume only. But, when a USB cable is disconnected in the suspend, since some controllers will not detect USB bus resume, the suspended flag is not cleared. After that, user cannot send any data. To fix the issue, clears the suspended flag in the gserial_disconnect(). Fixes: aba3a8d01d62 ("usb: gadget: u_serial: add suspend resume callbacks") Signed-off-by: Yoshihiro Shimoda Tested-by: Linh Phung Tested-by: Tam Nguyen Signed-off-by: Felipe Balbi commit 897b81384302bf2e1eaff008163e492dda4ceaca Author: Randy Dunlap Date: Tue Sep 8 17:57:19 2020 -0700 usb: phy: phy-ab8500-usb: fix spello of "function" Fix typo/spello of "function". Signed-off-by: Randy Dunlap Cc: Felipe Balbi Cc: linux-usb@vger.kernel.org Cc: Jiri Kosina Signed-off-by: Felipe Balbi commit 7974ecd7d3c0f42a98566f281e44ea8573a2ad88 Author: Lorenzo Colitti Date: Tue Aug 25 14:55:05 2020 +0900 usb: gadget: f_ncm: allow using NCM in SuperSpeed Plus gadgets. Currently, enabling f_ncm at SuperSpeed Plus speeds results in an oops in config_ep_by_speed because ncm_set_alt passes in NULL ssp_descriptors. Fix this by re-using the SuperSpeed descriptors. This is safe because usb_assign_descriptors calls usb_copy_descriptors. Tested: enabled f_ncm on a dwc3 gadget and 10Gbps link, ran iperf Reviewed-by: Maciej Żenczykowski Signed-off-by: Lorenzo Colitti Signed-off-by: Felipe Balbi commit a176b1a2a73c9598f77f2fa3df67184321092f55 Author: Lorenzo Colitti Date: Tue Aug 25 14:55:04 2020 +0900 usb: gadget: f_ncm: set SuperSpeed bulk descriptor bMaxBurst to 15 This improves performance on fast connections. When directly connecting to a Linux laptop running 5.6, single-stream iperf3 goes from ~1.7Gbps to ~2.3Gbps out, and from ~620Mbps to ~720Mbps in. Reviewed-by: Maciej Żenczykowski Signed-off-by: Lorenzo Colitti Signed-off-by: Felipe Balbi commit 986499b1569af980a819817f17238015b27793f6 Author: Lorenzo Colitti Date: Tue Aug 25 14:55:03 2020 +0900 usb: gadget: f_ncm: fix ncm_bitrate for SuperSpeed and above. Currently, SuperSpeed NCM gadgets report a speed of 851 Mbps in USB_CDC_NOTIFY_SPEED_CHANGE. But the calculation appears to assume 16 packets per microframe, and USB 3 and above no longer use microframes. Maximum speed is actually much higher. On a direct connection, theoretical throughput is at most 3.86 Gbps for gen1x1 and 9.36 Gbps for gen2x1, and I have seen gadget->host iperf throughput of >2 Gbps for gen1x1 and >4 Gbps for gen2x1. Unfortunately the ConnectionSpeedChange defined in the CDC spec only uses 32-bit values, so we can't report accurate numbers for 10Gbps and above. So, report 3.75Gbps for SuperSpeed (which is roughly maximum theoretical performance) and 4.25Gbps for SuperSpeed Plus (which is close to the maximum that we can report in a 32-bit unsigned integer). This results in: [50879.191272] cdc_ncm 2-2:1.0 enx228b127e050c: renamed from usb0 [50879.234778] cdc_ncm 2-2:1.0 enx228b127e050c: 3750 mbit/s downlink 3750 mbit/s uplink on SuperSpeed and: [50798.434527] cdc_ncm 8-2:1.0 enx228b127e050c: renamed from usb0 [50798.524278] cdc_ncm 8-2:1.0 enx228b127e050c: 4250 mbit/s downlink 4250 mbit/s uplink on SuperSpeed Plus. Fixes: 1650113888fe ("usb: gadget: f_ncm: add SuperSpeed descriptors for CDC NCM") Reviewed-by: Maciej Żenczykowski Signed-off-by: Lorenzo Colitti Signed-off-by: Felipe Balbi commit b21cf9371c2e659dbd0b7099b936b67f424fb555 Author: Peter Chen Date: Tue Sep 1 10:33:52 2020 +0800 usb: cdns3: gadget: move wait configuration operation After commit f4cfe5ce607d ("usb: cdns3: gadget: improve the set_configuration handling"), the software will inform the hardware the request has finished at cdns3_ep0_complete_setup. The configuration set bit is only set after request has finished, so it needs to move waiting operation after that. Meanwhile, if it is timeout, it will show warning message and return error. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 9f650135945fb5dba6bd6340ce834570fe0686f2 Author: Peter Chen Date: Tue Sep 1 10:33:51 2020 +0800 usb: cdns3: drd: call PHY .set_mode accordingly Some PHYs may need to enter related mode, and do some settings. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 0eeda059956d57b16143cc1dd0aed7e5fc383d5d Author: Peter Chen Date: Tue Sep 1 10:33:50 2020 +0800 usb: cdns3: gadget: clear the interrupt status when disconnect the host It is meaningless to handle any interrupts after disconnecting with host Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit b5148d946f45bb7a780c2dc45a20f5b47e73f995 Author: Peter Chen Date: Tue Sep 1 10:33:49 2020 +0800 usb: cdns3: gadget: set fast access bit Below is the recommendation from Cadence designer: Using this bit to be sure that PHY clock is keeping up in active state. It's good to keep Fast Access bit enabled as long as there is any access to USB register. It is used to fix the potential ARM core hang when visit controller register after DEVDS (.pullup is cleared) is set, the threaded irq may be scheduled at that time. Cc: Pawel Laszczak Reviewed-by: Jun Li Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 50642709f6590fe40afa6d22c32f23f5b842aed5 Author: Peter Chen Date: Tue Sep 1 10:33:48 2020 +0800 usb: cdns3: core: quit if it uses role switch class If the board uses role switch class for switching the role, it should not depends on SoC OTG hardware siginal any more, so quit early. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit a609ce2a13360d639b384b6ca783b38c1247f2db Author: Raymond Tan Date: Fri Aug 21 16:11:01 2020 +0300 usb: dwc3: pci: Allow Elkhart Lake to utilize DSM method for PM functionality Similar to some other IA platforms, Elkhart Lake too depends on the PMU register write to request transition of Dx power state. Thus, we add the PCI_DEVICE_ID_INTEL_EHLLP to the list of devices that shall execute the ACPI _DSM method during D0/D3 sequence. [heikki.krogerus@linux.intel.com: included Fixes tag] Fixes: dbb0569de852 ("usb: dwc3: pci: Add Support for Intel Elkhart Lake Devices") Cc: stable@vger.kernel.org Signed-off-by: Raymond Tan Signed-off-by: Heikki Krogerus Signed-off-by: Felipe Balbi commit 54c1960605107e1b5e562966e3dc3d29526f66b3 Author: Marc Zyngier Date: Mon Sep 14 14:06:34 2020 +0100 usb: dwc2: Always disable regulators on driver teardown If the dwc2 driver fails to probe after having enabled the regulators, it ends up being unregistered with regulators enabled, something the core regulator code is legitimately upset about: dwc2 ff400000.usb: supply vusb_d not found, using dummy regulator dwc2 ff400000.usb: supply vusb_a not found, using dummy regulator dwc2 ff400000.usb: dwc2_core_reset: HANG! AHB Idle timeout GRSTCTL GRSTCTL_AHBIDLE WARNING: CPU: 2 PID: 112 at drivers/regulator/core.c:2074 _regulator_put.part.0+0x16c/0x174 Modules linked in: dwc2(E+) dwc3(E) udc_core(E) rtc_hym8563(E) dwmac_generic(E) ulpi(E) usbcore(E) dwc3_meson_g12a(E) roles(E) meson_gx_mmc(E+) i2c_meson(E) mdio_mux_meson_g12a(E) mdio_mux(E) dwmac_meson8b(E) stmmac_platform(E) stmmac(E) mdio_xpcs(E) phylink(E) of_mdio(E) fixed_phy(E) libphy(E) pwm_regulator(E) fixed(E) CPU: 2 PID: 112 Comm: systemd-udevd Tainted: G E 5.9.0-rc4-00102-g423583bc8cf9 #1840 Hardware name: amlogic w400/w400, BIOS 2020.04 05/22/2020 pstate: 80400009 (Nzcv daif +PAN -UAO BTYPE=--) pc : _regulator_put.part.0+0x16c/0x174 lr : regulator_bulk_free+0x6c/0x9c sp : ffffffc012353820 x29: ffffffc012353820 x28: ffffff805a4b7000 x27: ffffff8059c2eac0 x26: ffffff8059c2e810 x25: ffffff805a4b7d00 x24: ffffffc008cf3028 x23: ffffffc011729ef8 x22: ffffff807e2761d8 x21: ffffffc01171df78 x20: ffffff805a4b7700 x19: ffffff805a4b7700 x18: 0000000000000030 x17: 0000000000000000 x16: 0000000000000000 x15: ffffff807ea8d178 x14: 3935312820435455 x13: 2038323a36313a37 x12: ffffffffffffffff x11: 0000000000000040 x10: 0000000000000007 x9 : ffffffc0106f77d0 x8 : ffffffffffffffe0 x7 : ffffffffffffffff x6 : 0000000000017702 x5 : ffffff805a4b7400 x4 : 0000000000000000 x3 : ffffffc01171df78 x2 : ffffff807ea8cc40 x1 : 0000000000000000 x0 : 0000000000000001 Call trace: _regulator_put.part.0+0x16c/0x174 regulator_bulk_free+0x6c/0x9c devm_regulator_bulk_release+0x28/0x3c release_nodes+0x1c8/0x2c0 devres_release_all+0x44/0x6c really_probe+0x1ec/0x504 driver_probe_device+0x100/0x170 device_driver_attach+0xcc/0xd4 __driver_attach+0xb0/0x17c bus_for_each_dev+0x7c/0xd4 driver_attach+0x30/0x3c bus_add_driver+0x154/0x250 driver_register+0x84/0x140 __platform_driver_register+0x54/0x60 dwc2_platform_driver_init+0x2c/0x1000 [dwc2] do_one_initcall+0x54/0x2d0 do_init_module+0x68/0x29c In order to fix this, tie the regulator disabling to the teardown process by registering a devm action callback. This makes sure that the regulators are disabled at the right time (just before they are released). Cc: Minas Harutyunyan Cc: Greg Kroah-Hartman Signed-off-by: Marc Zyngier Signed-off-by: Felipe Balbi commit 864bc7e7297fe9282a7e17f01806029eb1d675c1 Author: Pawel Laszczak Date: Fri Sep 18 10:30:35 2020 +0200 usb: gadget: config_ep_by_speed_and_alt instead of config_ep_by_speed This patch replace config_ep_by_speed with config_ep_by_speed_and_alt. This change allows to select proper usb_ss_ep_comp_descriptor for each stream capable endpoints. f_tcm function for SS use array of headers for both BOT/UAS alternate setting: static struct usb_descriptor_header *uasp_ss_function_desc[] = { (struct usb_descriptor_header *) &bot_intf_desc, (struct usb_descriptor_header *) &uasp_ss_bi_desc, (struct usb_descriptor_header *) &bot_bi_ep_comp_desc, (struct usb_descriptor_header *) &uasp_ss_bo_desc, (struct usb_descriptor_header *) &bot_bo_ep_comp_desc, (struct usb_descriptor_header *) &uasp_intf_desc, (struct usb_descriptor_header *) &uasp_ss_bi_desc, (struct usb_descriptor_header *) &uasp_bi_ep_comp_desc, (struct usb_descriptor_header *) &uasp_bi_pipe_desc, (struct usb_descriptor_header *) &uasp_ss_bo_desc, (struct usb_descriptor_header *) &uasp_bo_ep_comp_desc, (struct usb_descriptor_header *) &uasp_bo_pipe_desc, (struct usb_descriptor_header *) &uasp_ss_status_desc, (struct usb_descriptor_header *) &uasp_status_in_ep_comp_desc, (struct usb_descriptor_header *) &uasp_status_pipe_desc, (struct usb_descriptor_header *) &uasp_ss_cmd_desc, (struct usb_descriptor_header *) &uasp_cmd_comp_desc, (struct usb_descriptor_header *) &uasp_cmd_pipe_desc, NULL, }; The first 5 descriptors are associated with BOT alternate setting, and others are associated with UAS. During handling UAS alternate setting f_tcm driver invokes config_ep_by_speed and this function sets incorrect companion endpoint descriptor in usb_ep object. Instead setting ep->comp_desc to uasp_bi_ep_comp_desc function in this case set ep->comp_desc to bot_uasp_ss_bi_desc. And in result it uses the descriptor from BOT alternate setting instead UAS. Finally, it causes that controller driver during enabling endpoints detect that just enabled endpoint for bot. Signed-off-by: Jayshri Pawar Signed-off-by: Pawel Laszczak Reviewed-by: Peter Chen Signed-off-by: Felipe Balbi commit 5bb1d1197374aaf11523c8fd24a4e6f93fb3b343 Author: Qinglang Miao Date: Sat Sep 19 10:52:08 2020 +0800 usb: gadget: lpc32xx_udc: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Acked-by: Vladimir Zapolskiy Signed-off-by: Qinglang Miao Signed-off-by: Felipe Balbi commit 0abe3863d05f3175866cfaea50f66dc3ee043220 Author: Christian Lamparter Date: Sun Sep 20 02:18:50 2020 +0200 usb: dwc2: add support for APM82181 USB OTG adds the specific compatible string for the DWC2 IP found in the APM82181 SoCs. The IP is setup correctly through the auto detection... With the exception of the AHB Burst Size. The default of GAHBCFG_HBSTLEN_INCR4 of the "snps,dwc2" can cause a system hang when the USB and SATA is used concurrently. Because the predecessor (PPC460EX (Canyonlands)) already had the same problem, this SoC can make use of the existing dwc2_set_amcc_params() function. Signed-off-by: Christian Lamparter Signed-off-by: Felipe Balbi commit 704c70fa08ad45e618d703a8aafca5c7c01d6e9d Author: Christian Lamparter Date: Sun Sep 20 02:18:49 2020 +0200 dt-bindings: usb: dwc2: add support for APM82181 SoCs USB OTG HS and FS adds the specific compatible string for the DWC2 IP found in the APM82181 SoCs. The APM82181's USB-OTG seems like it was taken from its direct predecessor: the PPC460EX (canyonlands). Signed-off-by: Christian Lamparter Signed-off-by: Felipe Balbi commit 028296e480c782f13428f234a8239a0cd007bd92 Author: Bryan O'Donoghue Date: Sun Sep 20 18:01:58 2020 +0100 USB: gadget: f_ncm: Fix NDP16 datagram validation commit 2b74b0a04d3e ("USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb()") adds important bounds checking however it unfortunately also introduces a bug with respect to section 3.3.1 of the NCM specification. wDatagramIndex[1] : "Byte index, in little endian, of the second datagram described by this NDP16. If zero, then this marks the end of the sequence of datagrams in this NDP16." wDatagramLength[1]: "Byte length, in little endian, of the second datagram described by this NDP16. If zero, then this marks the end of the sequence of datagrams in this NDP16." wDatagramIndex[1] and wDatagramLength[1] respectively then may be zero but that does not mean we should throw away the data referenced by wDatagramIndex[0] and wDatagramLength[0] as is currently the case. Breaking the loop on (index2 == 0 || dg_len2 == 0) should come at the end as was previously the case and checks for index2 and dg_len2 should be removed since zero is valid. I'm not sure how much testing the above patch received but for me right now after enumeration ping doesn't work. Reverting the commit restores ping, scp, etc. The extra validation associated with wDatagramIndex[0] and wDatagramLength[0] appears to be valid so, this change removes the incorrect restriction on wDatagramIndex[1] and wDatagramLength[1] restoring data processing between host and device. Fixes: 2b74b0a04d3e ("USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb()") Cc: Ilja Van Sprundel Cc: Brooke Basile Cc: stable Signed-off-by: Bryan O'Donoghue Signed-off-by: Felipe Balbi commit 2eae2dfd581420f94d6041dddc7a88d7ae9ce2ff Author: Pawel Laszczak Date: Tue Sep 15 14:45:43 2020 +0300 usb: cdns3: Enable workaround for USB2.0 PHY Rx compliance test PHY lockup USB2.0 PHY hangs in Rx Compliance test when the incoming packet amplitude is varied below and above the Squelch Level of Receiver during the active packet multiple times. Version 1 of the controller allows PHY to be reset when RX fail condition is detected to work around the above issue. This feature is disabled by default and needs to be enabled using a bit from the newly added PHYRST_CFG register. This patch enables the workaround. There is no way to know controller version before device controller is started and the workaround needs to be applied for both host and device modes, so we rely on a DT property do decide when to apply the workaround. Signed-off-by: Pawel Laszczak Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi commit 5261e48f9a705bf65e3d202eb44dc2e270911684 Author: Roger Quadros Date: Tue Sep 15 14:45:42 2020 +0300 dt-bindings: usb: cdns,usb3: Add cdns,phyrst-a-enable property Controller version 0x0002450D has USB2 PHY RX sensitivity issues that needs to be worked around by enabling phyrst-a-enable bit in PHYRST_CFG register. There is no way to know controller version before device controller is started and the workaround needs to be applied for both host and device modes, so we add this DT property. Signed-off-by: Roger Quadros Acked-by: Rob Herring Signed-off-by: Felipe Balbi commit 68989fe1c39d9b324dacb7a33f358aa1c2b64cb8 Author: Roger Quadros Date: Tue Sep 15 14:45:41 2020 +0300 dt-bindings: usb: Convert cdns-usb3.txt to YAML schema Converts cdns-usb3.txt to YAML schema cdns,usb3.yaml Reviewed-by: Rob Herring Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi commit 65f3d449f4386c4aced2fb7252905240b4f45cd3 Author: Neil Armstrong Date: Thu Sep 17 08:59:47 2020 +0200 usb: dwc-meson-g12a: Add support for USB on AXG SoCs The Amlogic AXG is close to the GXL Glue but with a single OTG PHY. It needs the same init sequence as GXL & GXM, but it seems it doesn't need the host disconnect bit. Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Signed-off-by: Felipe Balbi commit cdff2c946f063f0153434dcea8408f087c584d8f Author: Neil Armstrong Date: Thu Sep 17 08:59:46 2020 +0200 dt-bindings: usb: amlogic,meson-g12a-usb-ctrl: add the Amlogic AXG Families USB Glue Bindings The Amlogic AXG is close to the GXL Glue but with a single OTG PHY. Reviewed-by: Rob Herring Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Acked-by: Martin Blumenstingl Signed-off-by: Felipe Balbi commit 5d23af6301b7f0dc5fcd170e31c777a76353422e Author: Lad Prabhakar Date: Fri Aug 28 08:50:19 2020 +0100 dt-bindings: usb: renesas,usb-xhci: Document r8a774e1 support Document r8a774e1 xhci support. The driver will use the fallback compatible string "renesas,rcar-gen3-xhci", therefore no driver change is needed. Reviewed-by: Yoshihiro Shimoda Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: Felipe Balbi commit e20849a8c883abfe4c075f72bf5538d63b7562c4 Author: Linus Walleij Date: Fri Aug 28 17:30:55 2020 +0200 usb: gadget: pch_udc: Convert to use GPIO descriptors This switches the PCH UDC driver to use GPIO descriptors. The way this is supposed to be used is confusing. The code contains the following: /* GPIO port for VBUS detecting */ static int vbus_gpio_port = -1; /* GPIO port number (-1:Not used) */ So a hardcoded GPIO number in the code. Further the probe() path very clearly will exit if the GPIO is not found, so this driver can only be configured by editing the code, hard-coding a GPIO number into this variable. This is simply not how we do things. My guess is that this is used in products by patching a GPIO number into this variable and shipping a kernel that is compile-time tailored for the target system. I switched this mechanism to using a GPIO descriptor associated with the parent PCI device. This can be added by using the 16bit subsystem ID or similar to identify which exact machine we are running on and what GPIO is present on that machine, and then add a GPIO descriptor using gpiod_add_lookup_table() from . Since I don't have any target systems I cannot add this but I'm happy to help. I put in a FIXME so the people actually using this driver knows what to do. Cc: Felipe Balbi Tested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij Signed-off-by: Felipe Balbi commit ff6d6e6c6778da68a95074d6c2dda6db18c56888 Author: Peter Chen Date: Wed Sep 2 17:57:33 2020 +0800 usb: cdns3: imx: add glue layer runtime pm implementation Add imx glue layer runtime pm implementation, and the runtime pm is default off. Reviewed-by: Pawel Laszczak Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit b1234e3b3b265588bab1e7a28508621045b87efa Author: Peter Chen Date: Wed Sep 2 17:57:32 2020 +0800 usb: cdns3: add runtime PM support Introduce runtime PM and wakeup interrupt handler for cdns3, the runtime PM is default off since other cdns3 may not implement glue layer support for runtime PM. One typical wakeup event use case is xHCI runtime suspend will clear USBCMD.RS bit, after that the xHCI will not trigger any interrupts, so its parent (cdns core device) needs to resume xHCI device when any (wakeup) events occurs at host port. When the controller is in low power mode, the lpm flag will be set. The interrupt triggered later than lpm flag is set considers as wakeup interrupt and handled at cdns_wakeup_irq. Once the wakeup occurs, it first disables interrupt to avoid later interrupt occurrence since the controller is in low power mode at that time, and access registers may be invalid at that time. At wakeup handler, it will call pm_request_resume to wakeup xHCI device, and at runtime resume handler, it will enable interrupt again. The API platform_suspend is introduced for glue layer to implement platform specific PM sequence. Reviewed-by: Pawel Laszczak Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit efe2fa0836a7a051a816c90b44f07590f2fd74c5 Author: Peter Chen Date: Wed Sep 2 17:57:31 2020 +0800 usb: cdns3: introduce set_phy_power_on{off} APIs Since we have both USB2 and USB3 PHYs for cdns3 controller, it is better we have unity APIs to handle both USB2 and USB3's power, it could simplify code for error handling and further power management implementation. Reviewed-by: Pawel Laszczak Reviewed-by: Jun Li Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 753a18c2596de2edf01259db24940010dd1c6d9e Author: YueHaibing Date: Fri Jul 31 16:20:08 2020 +0800 usb: mtu3: Remove unsused inline function is_first_entry It is never used, so can be removed. Signed-off-by: YueHaibing Signed-off-by: Felipe Balbi commit dc336b19e82d0454ea60270cd18fbb4749e162f6 Author: Li Jun Date: Sun Jul 26 11:17:39 2020 +0800 usb: dwc3: core: do not queue work if dr_mode is not USB_DR_MODE_OTG Do not try to queue a drd work if dr_mode is not USB_DR_MODE_OTG because the work is not inited, this may be triggered by user try to change mode file of debugfs on a single role port, which will cause below kernel dump: [ 60.115529] ------------[ cut here ]------------ [ 60.120166] WARNING: CPU: 1 PID: 627 at kernel/workqueue.c:1473 __queue_work+0x46c/0x520 [ 60.128254] Modules linked in: [ 60.131313] CPU: 1 PID: 627 Comm: sh Not tainted 5.7.0-rc4-00022-g914a586-dirty #135 [ 60.139054] Hardware name: NXP i.MX8MQ EVK (DT) [ 60.143585] pstate: a0000085 (NzCv daIf -PAN -UAO) [ 60.148376] pc : __queue_work+0x46c/0x520 [ 60.152385] lr : __queue_work+0x314/0x520 [ 60.156393] sp : ffff8000124ebc40 [ 60.159705] x29: ffff8000124ebc40 x28: ffff800011808018 [ 60.165018] x27: ffff800011819ef8 x26: ffff800011d39980 [ 60.170331] x25: ffff800011808018 x24: 0000000000000100 [ 60.175643] x23: 0000000000000013 x22: 0000000000000001 [ 60.180955] x21: ffff0000b7c08e00 x20: ffff0000b6c31080 [ 60.186267] x19: ffff0000bb99bc00 x18: 0000000000000000 [ 60.191579] x17: 0000000000000000 x16: 0000000000000000 [ 60.196891] x15: 0000000000000000 x14: 0000000000000000 [ 60.202202] x13: 0000000000000000 x12: 0000000000000000 [ 60.207515] x11: 0000000000000000 x10: 0000000000000040 [ 60.212827] x9 : ffff800011d55460 x8 : ffff800011d55458 [ 60.218138] x7 : ffff0000b7800028 x6 : 0000000000000000 [ 60.223450] x5 : ffff0000b7800000 x4 : 0000000000000000 [ 60.228762] x3 : ffff0000bb997cc0 x2 : 0000000000000001 [ 60.234074] x1 : 0000000000000000 x0 : ffff0000b6c31088 [ 60.239386] Call trace: [ 60.241834] __queue_work+0x46c/0x520 [ 60.245496] queue_work_on+0x6c/0x90 [ 60.249075] dwc3_set_mode+0x48/0x58 [ 60.252651] dwc3_mode_write+0xf8/0x150 [ 60.256489] full_proxy_write+0x5c/0xa8 [ 60.260327] __vfs_write+0x18/0x40 [ 60.263729] vfs_write+0xdc/0x1c8 [ 60.267045] ksys_write+0x68/0xf0 [ 60.270360] __arm64_sys_write+0x18/0x20 [ 60.274286] el0_svc_common.constprop.0+0x68/0x160 [ 60.279077] do_el0_svc+0x20/0x80 [ 60.282394] el0_sync_handler+0x10c/0x178 [ 60.286403] el0_sync+0x140/0x180 [ 60.289716] ---[ end trace 70b155582e2b7988 ]--- Signed-off-by: Li Jun Signed-off-by: Felipe Balbi commit e8d5f92b8d30bb4ade76494490c3c065e12411b1 Author: Zqiang Date: Fri Jun 5 11:05:33 2020 +0800 usb: gadget: function: printer: fix use-after-free in __lock_acquire Fix this by increase object reference count. BUG: KASAN: use-after-free in __lock_acquire+0x3fd4/0x4180 kernel/locking/lockdep.c:3831 Read of size 8 at addr ffff8880683b0018 by task syz-executor.0/3377 CPU: 1 PID: 3377 Comm: syz-executor.0 Not tainted 5.6.11 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xce/0x128 lib/dump_stack.c:118 print_address_description.constprop.4+0x21/0x3c0 mm/kasan/report.c:374 __kasan_report+0x131/0x1b0 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 __lock_acquire+0x3fd4/0x4180 kernel/locking/lockdep.c:3831 lock_acquire+0x127/0x350 kernel/locking/lockdep.c:4488 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x35/0x50 kernel/locking/spinlock.c:159 printer_ioctl+0x4a/0x110 drivers/usb/gadget/function/f_printer.c:723 vfs_ioctl fs/ioctl.c:47 [inline] ksys_ioctl+0xfb/0x130 fs/ioctl.c:763 __do_sys_ioctl fs/ioctl.c:772 [inline] __se_sys_ioctl fs/ioctl.c:770 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:770 do_syscall_64+0x9e/0x510 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4531a9 Code: ed 60 fc 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 bb 60 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fd14ad72c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000073bfa8 RCX: 00000000004531a9 RDX: fffffffffffffff9 RSI: 000000000000009e RDI: 0000000000000003 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004bbd61 R13: 00000000004d0a98 R14: 00007fd14ad736d4 R15: 00000000ffffffff Allocated by task 2393: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc.constprop.3+0xa7/0xd0 mm/kasan/common.c:515 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 kmem_cache_alloc_trace+0xfa/0x2d0 mm/slub.c:2813 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] gprinter_alloc+0xa1/0x870 drivers/usb/gadget/function/f_printer.c:1416 usb_get_function+0x58/0xc0 drivers/usb/gadget/functions.c:61 config_usb_cfg_link+0x1ed/0x3e0 drivers/usb/gadget/configfs.c:444 configfs_symlink+0x527/0x11d0 fs/configfs/symlink.c:202 vfs_symlink+0x33d/0x5b0 fs/namei.c:4201 do_symlinkat+0x11b/0x1d0 fs/namei.c:4228 __do_sys_symlinkat fs/namei.c:4242 [inline] __se_sys_symlinkat fs/namei.c:4239 [inline] __x64_sys_symlinkat+0x73/0xb0 fs/namei.c:4239 do_syscall_64+0x9e/0x510 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 3368: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x135/0x190 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 slab_free_hook mm/slub.c:1444 [inline] slab_free_freelist_hook mm/slub.c:1477 [inline] slab_free mm/slub.c:3034 [inline] kfree+0xf7/0x410 mm/slub.c:3995 gprinter_free+0x49/0xd0 drivers/usb/gadget/function/f_printer.c:1353 usb_put_function+0x38/0x50 drivers/usb/gadget/functions.c:87 config_usb_cfg_unlink+0x2db/0x3b0 drivers/usb/gadget/configfs.c:485 configfs_unlink+0x3b9/0x7f0 fs/configfs/symlink.c:250 vfs_unlink+0x287/0x570 fs/namei.c:4073 do_unlinkat+0x4f9/0x620 fs/namei.c:4137 __do_sys_unlink fs/namei.c:4184 [inline] __se_sys_unlink fs/namei.c:4182 [inline] __x64_sys_unlink+0x42/0x50 fs/namei.c:4182 do_syscall_64+0x9e/0x510 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880683b0000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 24 bytes inside of 1024-byte region [ffff8880683b0000, ffff8880683b0400) The buggy address belongs to the page: page:ffffea0001a0ec00 refcount:1 mapcount:0 mapping:ffff88806c00e300 index:0xffff8880683b1800 compound_mapcount: 0 flags: 0x100000000010200(slab|head) raw: 0100000000010200 0000000000000000 0000000600000001 ffff88806c00e300 raw: ffff8880683b1800 000000008010000a 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Reported-by: Kyungtae Kim Signed-off-by: Zqiang Signed-off-by: Felipe Balbi commit aa8c16e42991be4709ef8cba022bb19a0b81282f Author: Florian Fainelli Date: Thu Jul 9 20:48:06 2020 -0700 MAINTAINERS: Add entry for Broadcom BDC driver The Broadcom BDC driver did not have a MAINTAINERS entry which made it escape review from Al and myself, add an entry so the relevant mailing lists and people are copied. Signed-off-by: Florian Fainelli Signed-off-by: Felipe Balbi commit e7a0ed3fa31be13a4bf5f81426cb4db560e031ee Author: Michał Mirosław Date: Thu May 28 20:30:28 2020 +0200 usb: gadget: f_acm: don't disable disabled EP Make debugging real problems easier by not trying to disable an EP that was not yet enabled. Reviewed-by: Peter Chen Signed-off-by: Michał Mirosław Signed-off-by: Felipe Balbi commit a1c0169a49fc537629cc63da50d2ce0e3b48281c Author: Tao Ren Date: Wed May 27 18:11:54 2020 -0700 usb: gadget: aspeed: fixup vhub port irq handling This is a follow-on patch for commit a23be4ed8f48 ("usb: gadget: aspeed: improve vhub port irq handling"): for_each_set_bit() is replaced with simple for() loop because for() loop runs faster on ASPEED BMC. Signed-off-by: Tao Ren Signed-off-by: Felipe Balbi commit e319bd62292cb9c40ce5396b416965c2517f70d1 Author: Felipe Balbi Date: Thu Aug 13 08:35:38 2020 +0300 usb: dwc3: gadget: fix checkpatch warnings no functional changes Signed-off-by: Felipe Balbi commit 87b923a2e0591df07a48fd5e50dbc6cf3cff3d34 Author: Felipe Balbi Date: Thu Aug 13 08:35:38 2020 +0300 usb: dwc3: core: fix checkpatch warnings no functional changes Signed-off-by: Felipe Balbi commit 9ae0eb455b9136b1857cbbf12e4bf4d31f334f1e Author: Felipe Balbi Date: Thu Aug 13 09:22:34 2020 +0300 usb: dwc3: debugfs: fix checkpatch warnings no functional changes Signed-off-by: Felipe Balbi commit 993ffc5b32d29f7e94d8245f4775e0210671aea0 Author: Felipe Balbi Date: Thu Aug 13 09:15:12 2020 +0300 usb: dwc3: qcom: fix checkpatch warnings no functional changes Signed-off-by: Felipe Balbi commit c64b475b8488ae21f88e693f291e8785b0a519d3 Author: Felipe Balbi Date: Thu Aug 13 09:14:09 2020 +0300 usb: dwc3: ep0: fix checkpatch warnings no functional changes Signed-off-by: Felipe Balbi commit 035cbca1360a105288787da41ae0c1ee1366e0b5 Author: Felipe Balbi Date: Thu Aug 13 08:33:05 2020 +0300 usb: dwc3: debug: fix checkpatch warning no functional changes Signed-off-by: Felipe Balbi commit 159fdf295c67c1a8fbf1e2da58b4708023dbdb36 Author: Felipe Balbi Date: Thu Aug 13 08:32:00 2020 +0300 usb: dwc3: trace: fix checkpatch warnings no functional changes Signed-off-by: Felipe Balbi commit 2a499b45295206e7f3dc76edadde891c06cc4447 Author: Felipe Balbi Date: Thu Aug 13 08:30:38 2020 +0300 usb: dwc3: ulpi: fix checkpatch warning no functional changes. Signed-off-by: Felipe Balbi commit e5ee93d42b3fa96aa678b026919950467043abe6 Author: Felipe Balbi Date: Thu Aug 13 08:29:22 2020 +0300 usb: dwc3: meson: fix checkpatch errors and warnings no functional changes. Signed-off-by: Felipe Balbi commit 27c7ab0fdd0b0e5883930b9d9d333e0209efc036 Author: Felipe Balbi Date: Thu Aug 13 08:24:21 2020 +0300 usb: dwc3: debug: fix sparse warning Fix the following sparse warning: drivers/usb/dwc3/trace.c: note: in included file (through drivers/usb/dwc3/trace.h): drivers/usb/dwc3/debug.h:374:39: warning: cast to non-scalar Signed-off-by: Felipe Balbi commit a793cf81ad0c54c13a38f1d7fac03f91fe7136dc Author: Felipe Balbi Date: Thu Aug 13 08:09:55 2020 +0300 usb: dwc3: meson: fix coccinelle WARNING Coccinelle suggests using PTR_ERR_OR_ZERO(). Signed-off-by: Felipe Balbi commit bea46b9815154ac47baf16b64022d791a4471375 Author: Sandeep Maheswaram Date: Mon Jul 27 22:36:36 2020 +0530 usb: dwc3: qcom: Add interconnect support in dwc3 driver Add interconnect support in dwc3-qcom driver to vote for bus bandwidth. This requires for two different paths - from USB to DDR. The other is from APPS to USB. Reviewed-by: Matthias Kaehlcke Signed-off-by: Sandeep Maheswaram Signed-off-by: Chandana Kishori Chiluveru Signed-off-by: Felipe Balbi commit 072f34c2ebdb0bbc34f05187c7a770a3a23996c6 Author: Linus Walleij Date: Sat Jun 27 12:31:50 2020 +0200 usb: gadget: udc: Drop surplus include The UDC NET2272 driver includes but does not use any symbols from this file, so drop the include. Cc: Felipe Balbi Signed-off-by: Linus Walleij Signed-off-by: Felipe Balbi commit 5b311668f91a10e5e1255e77d6d61b7d14549af9 Author: Peter Chen Date: Mon Jun 15 09:06:18 2020 +0800 MAINTAINERS: add Cadence USB3 DRD IP driver entry Add Cadence USB3 DRD IP driver entry Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 360f89874635b08057757376b8cc4faa221862e2 Author: Armin Wolf Date: Wed Sep 30 22:44:56 2020 +0200 lib8390: Use netif_msg_init to initialize msg_enable bits Use netif_msg_init() to process param settings and use only the proper initialized value of ei_local->msg_level for later processing; Signed-off-by: Armin Wolf Signed-off-by: David S. Miller commit 7a333af6b1a78955d0bf363e9eb1c722f48227b6 Author: Willy Liu Date: Wed Sep 30 14:48:58 2020 +0800 net: phy: realtek: Modify 2.5G PHY name to RTL8226 Realtek single-chip Ethernet PHY solutions can be separated as below: 10M/100Mbps: RTL8201X 1Gbps: RTL8211X 2.5Gbps: RTL8226/RTL8221X RTL8226 is the first version for realtek that compatible 2.5Gbps single PHY. Since RTL8226 is single port only, realtek changes its name to RTL8221B from the second version. PHY ID for RTL8226 is 0x001cc800 and RTL8226B/RTL8221B is 0x001cc840. RTL8125 is not a single PHY solution, it integrates PHY/MAC/PCIE bus controller and embedded memory. Signed-off-by: Willy Liu Signed-off-by: David S. Miller commit f1638a4c7940716b74448cc2f4a15fa43b82eeca Author: Jing Xiangfeng Date: Wed Sep 30 09:29:54 2020 +0800 caif_virtio: Remove redundant initialization of variable err After commit a8c7687bf216 ("caif_virtio: Check that vringh_config is not null"), the variable err is being initialized with '-EINVAL' that is meaningless. So remove it. Signed-off-by: Jing Xiangfeng Signed-off-by: David S. Miller commit 000fe2685b0a59ade602918a95de450c73aaf6fc Author: Ye Bin Date: Wed Sep 30 09:08:38 2020 +0800 net-sysfs: Fix inconsistent of format with argument type in net-sysfs.c Fix follow warnings: [net/core/net-sysfs.c:1161]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'. [net/core/net-sysfs.c:1162]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'. Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: David S. Miller commit 32be425b45f71660732395a0c7a7927540eb67cb Author: Ye Bin Date: Wed Sep 30 09:08:37 2020 +0800 pktgen: Fix inconsistent of format with argument type in pktgen.c Fix follow warnings: [net/core/pktgen.c:925]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [net/core/pktgen.c:942]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [net/core/pktgen.c:962]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [net/core/pktgen.c:984]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [net/core/pktgen.c:1149]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: David S. Miller commit 8306266c1d51aac9aa7aa907fe99032a58c6382c Author: Xie He Date: Mon Sep 28 05:56:43 2020 -0700 drivers/net/wan/hdlc_fr: Correctly handle special skb->protocol values The fr_hard_header function is used to prepend the header to skbs before transmission. It is used in 3 situations: 1) When a control packet is generated internally in this driver; 2) When a user sends an skb on an Ethernet-emulating PVC device; 3) When a user sends an skb on a normal PVC device. These 3 situations need to be handled differently by fr_hard_header. Different headers should be prepended to the skb in different situations. Currently fr_hard_header distinguishes these 3 situations using skb->protocol. For situation 1 and 2, a special skb->protocol value will be assigned before calling fr_hard_header, so that it can recognize these 2 situations. All skb->protocol values other than these special ones are treated by fr_hard_header as situation 3. However, it is possible that in situation 3, the user sends an skb with one of the special skb->protocol values. In this case, fr_hard_header would incorrectly treat it as situation 1 or 2. This patch tries to solve this issue by using skb->dev instead of skb->protocol to distinguish between these 3 situations. For situation 1, skb->dev would be NULL; for situation 2, skb->dev->type would be ARPHRD_ETHER; and for situation 3, skb->dev->type would be ARPHRD_DLCI. This way fr_hard_header would be able to distinguish these 3 situations correctly regardless what skb->protocol value the user tries to use in situation 3. Cc: Krzysztof Halasa Signed-off-by: Xie He Signed-off-by: David S. Miller commit 9f85cbe50aa044a46f0a22fda323fa27b80c82da Author: Avihai Horon Date: Wed Sep 23 19:50:15 2020 +0300 RDMA/uverbs: Expose the new GID query API to user space Expose the query GID table and entry API to user space by adding two new methods and method handlers to the device object. This API provides a faster way to query a GID table using single call and will be used in libibverbs to improve current approach that requires multiple calls to open, close and read multiple sysfs files for a single GID table entry. Link: https://lore.kernel.org/r/20200923165015.2491894-5-leon@kernel.org Signed-off-by: Avihai Horon Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c4b4d548fabc15b9c5db9f61204dd0c608414d2d Author: Avihai Horon Date: Wed Sep 23 19:50:14 2020 +0300 RDMA/core: Introduce new GID table query API Introduce rdma_query_gid_table which enables querying all the GID tables of a given device and copying the attributes of all valid GID entries to a provided buffer. This API provides a faster way to query a GID table using single call and will be used in libibverbs to improve current approach that requires multiple calls to open, close and read multiple sysfs files for a single GID table entry. Link: https://lore.kernel.org/r/20200923165015.2491894-4-leon@kernel.org Signed-off-by: Avihai Horon Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1c15b4f2a42ff6697767c22c8ff5f9bcc22fdbe5 Author: Avihai Horon Date: Wed Sep 23 19:50:13 2020 +0300 RDMA/core: Modify enum ib_gid_type and enum rdma_network_type Separate IB_GID_TYPE_IB and IB_GID_TYPE_ROCE to two different values, so enum ib_gid_type will match the gid types of the new query GID table API which will be introduced in the following patches. This change in enum ib_gid_type requires to change also enum rdma_network_type by separating RDMA_NETWORK_IB and RDMA_NETWORK_ROCE_V1 values. Link: https://lore.kernel.org/r/20200923165015.2491894-3-leon@kernel.org Signed-off-by: Avihai Horon Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3ff4de8f6030cbcabb918a920037721bbc38e8f5 Author: Avihai Horon Date: Wed Sep 23 19:50:12 2020 +0300 RDMA/core: Change rdma_get_gid_attr returned error code Change the error code returned from rdma_get_gid_attr when the GID entry is invalid but the GID index is in the gid table size range to -ENODATA instead of -EINVAL. This change is done in order to provide a more accurate error reporting to be used by the new GID query API in user space. Nevertheless, -EINVAL is still returned from sysfs in the aforementioned case to maintain compatibility with user space that expects -EINVAL. Link: https://lore.kernel.org/r/20200923165015.2491894-2-leon@kernel.org Signed-off-by: Avihai Horon Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a4947e84f23474803b62a2759b5808147e4e15f9 Author: Leon Romanovsky Date: Sun Sep 13 13:29:28 2020 +0300 overflow: Include header file with SIZE_MAX declaration The various array_size functions use SIZE_MAX define, but missed limits.h causes to failure to compile code that needs overflow.h. In file included from drivers/infiniband/core/uverbs_std_types_device.c:6: ./include/linux/overflow.h: In function 'array_size': ./include/linux/overflow.h:258:10: error: 'SIZE_MAX' undeclared (first use in this function) 258 | return SIZE_MAX; | ^~~~~~~~ Fixes: 610b15c50e86 ("overflow.h: Add allocation size calculation helpers") Link: https://lore.kernel.org/r/20200913102928.134985-1-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f45271acdf9eeb003296862b017806d41ec4ec55 Author: Alok Prasad Date: Thu Oct 1 10:09:59 2020 +0000 RDMA/qedr: Endianness warnings cleanup Making a change to fix following sparse warnings reported by kbuild bot. CHECK drivers/infiniband/hw/qedr/verbs.c drivers/infiniband/hw/qedr/verbs.c:3872:59: warning: incorrect type in assignment (different base types) drivers/infiniband/hw/qedr/verbs.c:3872:59: expected restricted __le32 [usertype] sge_prod drivers/infiniband/hw/qedr/verbs.c:3872:59: got unsigned int [usertype] sge_prod drivers/infiniband/hw/qedr/verbs.c:3875:59: warning: incorrect type in assignment (different base types) drivers/infiniband/hw/qedr/verbs.c:3875:59: expected restricted __le32 [usertype] wqe_prod drivers/infiniband/hw/qedr/verbs.c:3875:59: got unsigned int [usertype] wqe_prod Link: https://lore.kernel.org/r/20201001100959.19940-1-palok@marvell.com Reported-by: kbuild test robot Fixes: acca72e2b031 ("RDMA/qedr: SRQ's bug fixes") Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: Alok Prasad Signed-off-by: Jason Gunthorpe commit 3c4e919b48f65860462f7cb94f2954a9a3fffbc4 Author: Rikard Falkeborn Date: Thu Oct 1 00:40:04 2020 +0200 RDMA/rtrs: Constify static struct attribute_group The only usage of these is to pass their address to sysfs_create_group() and sysfs_remove_group(), both which takes const pointers. Make it const to allow the compiler to put them in read-only memory. Link: https://lore.kernel.org/r/20200930224004.24279-3-rikard.falkeborn@gmail.com Signed-off-by: Rikard Falkeborn Signed-off-by: Jason Gunthorpe commit 42d5179c892e2d543fd25bdfbea98151189026ea Author: Rikard Falkeborn Date: Thu Oct 1 00:40:03 2020 +0200 RDMA/core: Constify struct attribute_group The only usage of the pma_table field in the ib_port struct is to pass its address to sysfs_create_group() and sysfs_remove_group(). Make it const to make it possible to constify a couple of static struct attribute_group. This allows the compiler to put them in read-only memory. Link: https://lore.kernel.org/r/20200930224004.24279-2-rikard.falkeborn@gmail.com Signed-off-by: Rikard Falkeborn Signed-off-by: Jason Gunthorpe commit 8f2242b91501f4510f63f400cf7dae61912c6fef Author: Cezary Rojewski Date: Tue Aug 25 22:17:43 2020 +0200 spi: pxa2xx: Add SSC2 and SSPSP2 SSP registers Update list of SSP registers with SSC2 and SSPSP2. These registers are utilized by LPT/WPT AudioDSP architecture. While SSC2 shares the same offset (0x40) as SSACDD, description of this register for SSP device present on mentioned AudioDSP is different so define separate constant to avoid any ambiguity. Cc: Andy Shevchenko Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200825201743.4926-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 184ec013fc3bd6ed99cd721f5faae93b8272046f Merge: e236893387f8f 81f13f2116cd9 Author: Mark Brown Date: Thu Oct 1 23:45:29 2020 +0100 Merge series "spi: spi-mtk-nor: make use of full capability of program mode" from Chuanhong Guo : "program" mode on this controller can trigger up to 56 bits of data shifting. During the operation, data in PRGDATA[0-5] will be shifted out from MOSI, and data from MISO will be continuously filling SHREG[0-9]. Currently this mode is used to implement transfer_one_message for 6-byte full-duplex transfer, but it can execute a transfer for up-to 7 bytes as long as the last byte is read only. transfer_one_message is expected to perform full-duplex transfer, instead of transfer with specific format. mtk_nor_spi_mem_prg is added here to use this extra byte. Newer version of this controller can trigger longer data shifting with shift bytes more than PRGDATA_MAX + SHREG_MAX. This patch is implemented with that in mind and it checks against both SHREG_MAX and PRG_CNT_MAX for future support of new controllers. Patch 3/3 is a fix for: commit a59b2c7c56bf7 ("spi: spi-mtk-nor: support standard spi properties") which breaks supports_op logic. But it can't be separated as it depends on patch 2/3. Fortuantely the broken commit isn't in stable yet. Chuanhong Guo (3): spi: spi-mtk-nor: make use of full capability of prg mode spi: spi-mtk-nor: add helper for checking prg mode ops spi: spi-mtk-nor: fix op checks in supports_op drivers/spi/spi-mtk-nor.c | 179 +++++++++++++++++++++++++++++++++----- 1 file changed, 158 insertions(+), 21 deletions(-) -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit e236893387f8fcace3660d7785b6fb05cf3bc209 Author: Barry Song Date: Sat Sep 26 12:16:16 2020 +1200 spi: spi-stm32: remove redundant irqsave and irqrestore in hardIRQ Running in hardIRQ, disabling IRQ is redundant. Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20200926001616.21292-2-song.bao.hua@hisilicon.com Signed-off-by: Mark Brown commit 69544f2c15926379d6fb182b142e044b7378b5cf Author: Barry Song Date: Sat Sep 26 12:16:15 2020 +1200 spi: spi-tegra20-sflash: remove redundant irqsave and irqrestore in hardIRQ Running in hardIRQ, disabling IRQ is redundant. Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20200926001616.21292-1-song.bao.hua@hisilicon.com Signed-off-by: Mark Brown commit 23f370c748580643d17b5e064478b89cba3fdc78 Author: Thomas Kopp Date: Mon Sep 21 09:10:36 2020 +0200 spi: atmel: Exposing effective spi speed This patch implements the reporting of the effectively used speed_hz for the transfer by setting xfer->effective_speed_hz. See the following patch, which adds this feature to the SPI core for more information: commit 5d7e2b5ed585 ("spi: core: allow reporting the effectivly used speed_hz for a transfer") Signed-off-by: Thomas Kopp Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200921071036.2091-1-thomas.kopp@microchip.com Signed-off-by: Mark Brown commit 81f13f2116cd93910d958c58052ef7dc22f1e577 Author: Chuanhong Guo Date: Thu Sep 24 23:27:30 2020 +0800 spi: spi-mtk-nor: fix op checks in supports_op commit a59b2c7c56bf7 ("spi: spi-mtk-nor: support standard spi properties") tries to inverse the logic of supports_op when adding spi_mem_default_supports_op check, but it didn't get it done properly. There are two regressions introduced by this commit: 1. reading ops supported by program mode is rejected. 2. all ops with special controller routines are incorrectly further checked against program mode. This commits inverses the logic back: 1. check spi_mem_default_supports_op and reject unsupported ops first. 2. return true for ops with special controller routines. 3. check the left ops against controller program mode. Fixes: a59b2c7c56bf7 ("spi: spi-mtk-nor: support standard spi properties") Signed-off-by: Chuanhong Guo Link: https://lore.kernel.org/r/20200924152730.733243-4-gch981213@gmail.com Signed-off-by: Mark Brown commit fd806575921ab78c8f0ee7f4dd3d4bb7c16206c8 Author: Chuanhong Guo Date: Thu Sep 24 23:27:29 2020 +0800 spi: spi-mtk-nor: add helper for checking prg mode ops op checking/resizing logic for the newly added mtk_nor_spi_mem_prg is more complicated. Add two helper functions for them: mtk_nor_match_prg: check whether an op is supported by prg mode. mtk_nor_adj_prg_size: adjust data size for mtk_nor_spi_mem_prg. mtk_nor_match_prg isn't called yet because supports_op is currently broken. It'll be used in the next fix commit. Signed-off-by: Chuanhong Guo Link: https://lore.kernel.org/r/20200924152730.733243-3-gch981213@gmail.com Signed-off-by: Mark Brown commit e7edd2cf4c7d06c6ef3e2030f66eeefa5150f0ff Author: Chuanhong Guo Date: Thu Sep 24 23:27:28 2020 +0800 spi: spi-mtk-nor: make use of full capability of prg mode "program" mode on this controller can trigger up to 56 bits of data shifting. During the operation, data in PRGDATA[0-5] will be shifted out from MOSI, and data from MISO will be continuously filling SHREG[0-9]. Currently this mode is used to implement transfer_one_message for 6-byte full-duplex transfer, but it can execute a transfer for up-to 7 bytes as long as the last byte is read only. transfer_one_message is expected to perform full-duplex transfer, instead of transfer with specific format. mtk_nor_spi_mem_prg is added here to use this extra byte. Newer version of this controller can trigger longer data shifting with shift bytes more than PRGDATA_MAX + SHREG_MAX. This patch is implemented with that in mind and it checks against both SHREG_MAX and PRG_CNT_MAX for future support of new controllers. Signed-off-by: Chuanhong Guo Link: https://lore.kernel.org/r/20200924152730.733243-2-gch981213@gmail.com Signed-off-by: Mark Brown commit 41a7431dbaa37533c3b732cdea425a7b8f2d4162 Author: Krzysztof Kozlowski Date: Sat Sep 19 16:04:18 2020 +0200 power: supply: bq27xxx: add support for TI bq34z100 Add support for new device: the TI bq34z100-G1, a Wide Range Fuel Gauge for Li-Ion, PbA, NiMH, and NiCd batteries. The device shares a lot with other models, although it has its own differences requiring new quirks. This patch was tested on a system equipped with NiMH batteries. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 7be64ae0bf369e035597691c1766d67e56f26ea1 Author: Krzysztof Kozlowski Date: Sat Sep 19 16:04:17 2020 +0200 power: supply: bq27xxx: add separate flag for capacity inaccurate bq27000, bq27010 and upcoming bq34z100 have a Capacity Inaccurate flag. However except this similarity, bq34z100 is quite different than bq27000/bq27010, so flag BQ27XXX_O_ZERO cannot be reused here. Add a new bit flag describing this capability. No functional change for bq27000 and bq27010. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit c02ca2019866726e951176ac2fca2a9b516eaacd Author: Krzysztof Kozlowski Date: Sat Sep 19 16:04:16 2020 +0200 power: supply: bq27xxx: add separate flag for single SoC register bq27000, bq27010 and upcoming bq34z100 have a single byte SoC register. However except this similarity, bq34z100 is quite different than bq27000/bq27010, so flag BQ27XXX_O_ZERO cannot be reused here. Add a new bit flag describing that SoC is a single byte register. No functional change for bq27000 and bq27010. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit bffa569fc9858aa04a763be6f4e6c91c76efb6d5 Author: Krzysztof Kozlowski Date: Sat Sep 19 16:04:15 2020 +0200 power: supply: bq27xxx: adjust whitespace and use BIT() for bitflags BIT() is a preferred way to toggle bit-like flags: no problems with 32/64 bit systems, less chances for mistakes. Remove also unneeded whitespace. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 7bf738ba110722b63e9dc8af760d3fb2aef25593 Author: Krzysztof Kozlowski Date: Sat Sep 19 16:04:14 2020 +0200 power: supply: bq27xxx: report "not charging" on all types Commit 6f24ff97e323 ("power: supply: bq27xxx_battery: Add the BQ27Z561 Battery monitor") and commit d74534c27775 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices") added support for new device types by copying most of the code and adding necessary quirks. However they did not copy the code in bq27xxx_battery_status() responsible for returning POWER_SUPPLY_STATUS_NOT_CHARGING. Unify the bq27xxx_battery_status() so for all types when charger is supplied, it will return "not charging" status. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 3e8282a3602953575f6abf420a1ccaf2c22ef8ad Author: Krzysztof Kozlowski Date: Sat Sep 19 16:04:13 2020 +0200 dt-bindings: power: bq27xxx: add bq34z100 Add compatible for bq34z100 charger. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Sebastian Reichel commit 887e2cff0f8dc4dac4c35e631b711325c6dd65b8 Author: Will Deacon Date: Thu Oct 1 11:57:01 2020 +0100 perf: arm-cmn: Fix conversion specifiers for node type The node type field is an enum type, so print it as a 32-bit quantity rather than as an unsigned short. Link: https://lore.kernel.org/r/202009302350.QIzfkx62-lkp@intel.com Reported-by: kernel test robot Signed-off-by: Will Deacon commit d9ef632fab9ba81b708763bcbcfdbea9a55c95d2 Author: Will Deacon Date: Thu Oct 1 11:54:54 2020 +0100 perf: arm-cmn: Fix unsigned comparison to less than zero Ensure that the 'irq' field of 'struct arm_cmn_dtc' is a signed int so that it can be compared '< 0'. Link: https://lore.kernel.org/r/20200929170835.GA15956@embeddedor Addresses-Coverity-ID: 1497488 ("Unsigned compared against 0") Fixes: 0ba64770a2f2 ("perf: Add Arm CMN-600 PMU driver") Reported-by: Gustavo A. R. Silva Reviewed-by: Gustavo A. R. Silva Signed-off-by: Will Deacon commit 23a1f682a925c0e15443bd2ea01bd0cbbc70e66a Merge: 7c89d9d9f9093 6208689fb3e62 Author: David S. Miller Date: Thu Oct 1 14:29:01 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2020-10-01 The following pull-request contains BPF updates for your *net-next* tree. We've added 90 non-merge commits during the last 8 day(s) which contain a total of 103 files changed, 7662 insertions(+), 1894 deletions(-). Note that once bpf(/net) tree gets merged into net-next, there will be a small merge conflict in tools/lib/bpf/btf.c between commit 1245008122d7 ("libbpf: Fix native endian assumption when parsing BTF") from the bpf tree and the commit 3289959b97ca ("libbpf: Support BTF loading and raw data output in both endianness") from the bpf-next tree. Correct resolution would be to stick with bpf-next, it should look like: [...] /* check BTF magic */ if (fread(&magic, 1, sizeof(magic), f) < sizeof(magic)) { err = -EIO; goto err_out; } if (magic != BTF_MAGIC && magic != bswap_16(BTF_MAGIC)) { /* definitely not a raw BTF */ err = -EPROTO; goto err_out; } /* get file size */ [...] The main changes are: 1) Add bpf_snprintf_btf() and bpf_seq_printf_btf() helpers to support displaying BTF-based kernel data structures out of BPF programs, from Alan Maguire. 2) Speed up RCU tasks trace grace periods by a factor of 50 & fix a few race conditions exposed by it. It was discussed to take these via BPF and networking tree to get better testing exposure, from Paul E. McKenney. 3) Support multi-attach for freplace programs, needed for incremental attachment of multiple XDP progs using libxdp dispatcher model, from Toke Høiland-Jørgensen. 4) libbpf support for appending new BTF types at the end of BTF object, allowing intrusive changes of prog's BTF (useful for future linking), from Andrii Nakryiko. 5) Several BPF helper improvements e.g. avoid atomic op in cookie generator and add a redirect helper into neighboring subsys, from Daniel Borkmann. 6) Allow map updates on sockmaps from bpf_iter context in order to migrate sockmaps from one to another, from Lorenz Bauer. 7) Fix 32 bit to 64 bit assignment from latest alu32 bounds tracking which caused a verifier issue due to type downgrade to scalar, from John Fastabend. 8) Follow-up on tail-call support in BPF subprogs which optimizes x64 JIT prologue and epilogue sections, from Maciej Fijalkowski. 9) Add an option to perf RB map to improve sharing of event entries by avoiding remove- on-close behavior. Also, add BPF_PROG_TEST_RUN for raw_tracepoint, from Song Liu. 10) Fix a crash in AF_XDP's socket_release when memory allocation for UMEMs fails, from Magnus Karlsson. ==================== Signed-off-by: David S. Miller commit 601fd3a7d849cf8a5dbd3628b3c29af9e5377961 Author: Tang Bin Date: Wed Aug 26 23:09:18 2020 +0800 ASoC: fsl_spdif: Fix unnecessary check in fsl_spdif_probe() The function fsl_spdif_probe() is only called with an openfirmware platform device. Therefore there is no need to check that the passed in device is NULL. Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin Link: https://lore.kernel.org/r/20200826150918.16116-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown commit 08dd413b9ddf253ec3ee783a0a21df3754823be9 Author: Rob Herring Date: Wed Aug 26 12:48:49 2020 -0600 ASoC: Remove unused 'linux,hdmi-audio' The binding was added in 2013 and has had no driver since 2015. Cc: Liam Girdwood Cc: Mark Brown Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20200826184851.3431531-1-robh@kernel.org Signed-off-by: Mark Brown commit 55707d531af62bd87c1b7e8d66fd9798094f9b3b Author: James Bottomley Date: Mon Sep 28 11:00:12 2020 -0700 tpm_tis: Add a check for invalid status Some TIS based TPMs can return 0xff to status reads if the locality hasn't been properly requested. Detect this condition by checking the bits that the TIS spec specifies must return zero are clear and return zero in that case. Also drop a warning so the problem can be identified in the calling path and fixed (usually a missing try_get_ops()). Signed-off-by: James Bottomley Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit e08c6d3b19930f84a8da8c18710eefdfa48a9ceb Author: Andy Shevchenko Date: Thu Jul 30 19:16:13 2020 +0300 tpm: use %*ph to print small buffer Use %*ph format to print small buffer as hex string. Signed-off-by: Andy Shevchenko Reviewed-by: Petr Vorel Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit a4c3049784551f6622be7f9a0a2dc993d4ba3149 Author: Masahisa Kojima Date: Tue Jul 28 12:14:32 2020 +0900 dt-bindings: Add SynQucer TPM MMIO as a trivial device Add a compatible string for the SynQuacer TPM to the binding for a TPM exposed via a memory mapped TIS frame. The MMIO window behaves slightly differently on this hardware, so it requires its own identifier. Cc: Rob Herring Cc: Ard Biesheuvel Acked-by: Rob Herring Signed-off-by: Masahisa Kojima Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit d5ae56a4fe5178e289e763450362d87800f9dcac Author: Masahisa Kojima Date: Tue Jul 28 12:14:31 2020 +0900 tpm: tis: add support for MMIO TPM on SynQuacer When fitted, the SynQuacer platform exposes its SPI TPM via a MMIO window that is backed by the SPI command sequencer in the SPI bus controller. This arrangement has the limitation that only byte size accesses are supported, and so we'll need to provide a separate module that take this into account. Signed-off-by: Ard Biesheuvel Signed-off-by: Masahisa Kojima Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 4cb1a880e7f774e59c2ebb68187d4811ad9d0c4e Merge: c471bf4b11c7d 0173f525b2c1b Author: Greg Kroah-Hartman Date: Thu Oct 1 22:59:55 2020 +0200 Merge tag 'soundwire-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next Vinod writes: soundwire updates for 5.10-rc1 This round of update includes: - Generic bandwidth allocation algorithm from Intel folks - PM support for Intel chipsets - Updates to Intel drivers which makes sdw usable on latest laptops - Support for MMIO SDW controllers found in QC chipsets - Update to subsystem to use helpers in bitfield.h to manage register bits * tag 'soundwire-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: (66 commits) soundwire: sysfs: add slave status and device number before probe soundwire: bus: add enumerated Slave device to device list soundwire: remove an unnecessary NULL check soundwire: cadence: add data port test fail interrupt soundwire: intel: enable test modes soundwire: enable Data Port test modes soundwire: intel: use {u32|u16}p_replace_bits soundwire: cadence: use u32p_replace_bits soundwire: qcom: get max rows and cols info from compatible soundwire: qcom: add support to block packing mode soundwire: qcom: clear BIT FIELDs before value set. soundwire: Add generic bandwidth allocation algorithm soundwire: cadence: add parity error injection through debugfs soundwire: bus: export broadcast read/write capability for tests ASoC: codecs: realtek-soundwire: ignore initial PARITY errors soundwire: bus: use quirk to filter out invalid parity errors soundwire: slave: add first_interrupt_done status soundwire: bus: filter-out unwanted interrupt reports ASoC/soundwire: bus: use property to set interrupt masks soundwire: qcom: fix SLIBMUS/SLIMBUS typo ... commit 0b5a21870694ab4c75a783f77b158840908f04a1 Merge: e6f5ff17ca964 f627691db7292 Author: Mark Brown Date: Thu Oct 1 21:43:17 2020 +0100 Merge series "Support for PM660/PM660L SPMI and SMD regulators" from kholk11@gmail.com AngeloGioacchino Del Regno : From: AngeloGioacchino Del Regno This patch series enables support for the regulators as found in the PM660 and PM660L PMICs. While at it, and to make them work, along with other regulators for other qcom PMICs, enlarge the maximum property name length in the regulator core, so that we're able to correctly parse the supply parents, which have got very long names (details in patch 1/5). This patch series has been tested against the following devices: - Sony Xperia XA2 Ultra (SDM630 Nile Discovery) - Sony Xperia 10 (SDM630 Ganges Kirin) - Sony Xperia 10 Plus (SDM636 Ganges Mermaid) AngeloGioacchino Del Regno (7): regulator: core: Enlarge max OF property name length to 64 chars regulator: qcom_spmi: Add support for new regulator types regulator: qcom_spmi: Add PM660/PM660L regulators regulator: dt-bindings: Document the PM660/660L SPMI PMIC entries regulator: qcom_smd: Add PM660/PM660L regulator support mfd: qcom-spmi-pmic: Add support for PM660/PM660L regulator: dt-bindings: Document the PM660/PM660L PMICs entries .../regulator/qcom,smd-rpm-regulator.yaml | 7 ++ .../regulator/qcom,spmi-regulator.txt | 31 +++++ drivers/mfd/qcom-spmi-pmic.c | 4 + drivers/regulator/core.c | 4 +- drivers/regulator/qcom_smd-regulator.c | 113 ++++++++++++++++++ drivers/regulator/qcom_spmi-regulator.c | 107 +++++++++++++++++ include/linux/soc/qcom/smd-rpm.h | 4 + 7 files changed, 268 insertions(+), 2 deletions(-) -- 2.28.0 commit e6f5ff17ca96456deceef94cf2577012a9df737f Author: Rikard Falkeborn Date: Wed Sep 30 18:26:02 2020 +0200 regulator: qcom: labibb: Constify static structs The only usage of qcom_labibb_ops is to assign it to the ops field in the regulator_desc struct, which is a const pointer. The only usage of pmi8998_lab_desc and pmi8998_ibb_desc is to assign their address to the desc field in the labibb_regulator_data struct which can be made const, since it is only copied into the desc field in the labbibb_regulator_data struct. This struct is modified, but that's a copy of the static one. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200930162602.18583-1-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit f627691db72921f300e333fbbfe8349142a94807 Author: AngeloGioacchino Del Regno Date: Sat Sep 26 14:55:49 2020 +0200 regulator: dt-bindings: Document the PM660/PM660L PMICs entries The PM660 and PM660L combo is found on boards featuring the SDM630, SDM636, SDM660 (and SDA variants) and it is used to give power to practically everything, from core to peripherals. Document the SMD-RPM regulator entries for both. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20200926125549.13191-8-kholk11@gmail.com Signed-off-by: Mark Brown commit 6d849653b00f2336efcd371fe85a7eb31bb094e9 Author: AngeloGioacchino Del Regno Date: Sat Sep 26 14:55:47 2020 +0200 regulator: qcom_smd: Add PM660/PM660L regulator support The PM660 and PM660L are a very very common PMIC combo, found on boards using the SDM630, SDM636, SDM660 (and SDA variants) SoC. PM660 provides 6 SMPS and 19 LDOs (of which one is unaccesible), while PM660L provides 5 SMPS (of which S3 and S4 are combined), 10 LDOs and a Buck-or-Boost (BoB) regulator. The PM660L IC also provides other regulators that are very specialized (for example, for the display) and will be managed in the other appropriate drivers (for example, labibb). Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20200926125549.13191-6-kholk11@gmail.com Signed-off-by: Mark Brown commit f9f061a5486f6a87e32fac80223ae44d4aefc06f Author: AngeloGioacchino Del Regno Date: Sat Sep 26 14:55:46 2020 +0200 regulator: dt-bindings: Document the PM660/660L SPMI PMIC entries The PM660 and PM660L combo is found on boards featuring the SDM630, SDM636, SDM660 (and SDA variants) and it is used to give power to practically everything, from core to peripherals. Document the SPMI regulator bindings for both. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20200926125549.13191-5-kholk11@gmail.com Signed-off-by: Mark Brown commit 0074c4472dcb20e989d9870c0b3aba42d0aa44b8 Author: AngeloGioacchino Del Regno Date: Sat Sep 26 14:55:45 2020 +0200 regulator: qcom_spmi: Add PM660/PM660L regulators The PM660 PMIC is very often paired with the PM660L option on SDM630/663/660 (and SDA variants) boards. The PM660 has 11 "660" LDOs (2 NMOS, 9 PMOS) and 7 HT LDOs (4 NMOS, 3 PMOS) and a quirk: the L4 regulator is unaccessible or does not exist on the PMIC. The PM660L has 8 "660" LDOs (1 NMOS, 7 PMOS) and 2 HT NMOS LDOs. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20200926125549.13191-4-kholk11@gmail.com Signed-off-by: Mark Brown commit 328816c2033160a6929fb0c6f0018b7c8d75cefe Author: AngeloGioacchino Del Regno Date: Sat Sep 26 14:55:44 2020 +0200 regulator: qcom_spmi: Add support for new regulator types This commit adds the support for some regulator types that are missing in this driver, such as the ht nmos-ldo, ht-lv nmos-ldo and new gen n/pmos-ldo, all belonging to the FTSMPS426 register layout. This is done in preparation for adding support for the PM660 and PM660L PMICs. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20200926125549.13191-3-kholk11@gmail.com Signed-off-by: Mark Brown commit e9bb4a068b206f61ef01057cfeafdb852fb244c5 Author: AngeloGioacchino Del Regno Date: Sat Sep 26 14:55:43 2020 +0200 regulator: core: Enlarge max OF property name length to 64 chars Some regulator drivers may be defining very long names: this is the case with the qcom_smd and qcom_spmi regulators, where we need to parse the regulator parents from DT. For clarity, this is an example: { "l13a", QCOM_SMD_RPM_LDOA, 13, &pm660_ht_lvpldo, "vdd_l8_l9_l10_l11_l12_l13_l14" }, pm660-regulators { ... vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04> ... }; Now, with a 32 characters limit, the function is trying to parse, exactly, "vdd_l8_l9_l10_l11_l12_l13_l14-s" (32 chars) instead of the right one, which is 37 chars long in this specific case. ... And this is not only the case with PM660/PM660L, but also with PMA8084, PM8916, PM8950 and others that are not implemented yet. The length of 64 chars was chosen based on the longest parsed property name that I could find, which is in PM8916, and would be 53 characters long. At that point, rounding that to 64 looked like being the best idea. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20200926125549.13191-2-kholk11@gmail.com Signed-off-by: Mark Brown commit 7c89d9d9f90931f170e510e9e4b84d9dafdd616a Merge: 87d5034d0758d a6f51f2efa742 Author: David S. Miller Date: Thu Oct 1 12:53:31 2020 -0700 Merge branch 'net-ravb-Add-support-for-explicit-internal-clock-delay-c onfiguration' Geert Uytterhoeven says: ==================== net/ravb: Add support for explicit internal clock delay configuration Some Renesas EtherAVB variants support internal clock delay configuration, which can add larger delays than the delays that are typically supported by the PHY (using an "rgmii-*id" PHY mode, and/or "[rt]xc-skew-ps" properties). Historically, the EtherAVB driver configured these delays based on the "rgmii-*id" PHY mode. This caused issues with PHY drivers that implement PHY internal delays properly[1]. Hence a backwards-compatible workaround was added by masking the PHY mode[2]. This patch series implements the next step of the plan outlined in [3], and adds proper support for explicit configuration of the MAC internal clock delays using new "[rt]x-internal-delay-ps" properties. If none of these properties is present, the driver falls back to the old handling. This can be considered the MAC counterpart of commit 9150069bf5fc0e86 ("dt-bindings: net: Add tx and rx internal delays"), which applies to the PHY. Note that unlike commit 92252eec913b2dd5 ("net: phy: Add a helper to return the index for of the internal delay"), no helpers are provided to parse the DT properties, as so far there is a single user only, which supports only zero or a single fixed value. Of course such helpers can be added later, when the need arises, or when deemed useful otherwise. This series consists of 3 parts: 1. DT binding updates documenting the new properties, for both the generic ethernet-controller and the EtherAVB-specific bindings, 2. Conversion to json-schema of the Renesas EtherAVB DT bindings. Technically, the conversion is independent of all of the above. I included it in this series, as it shows how all sanity checks on "[rt]x-internal-delay-ps" values are implemented as DT binding checks, 3. EtherAVB driver update implementing support for the new properties. Given Rob has provided his acks for the DT binding updates, all of this can be merged through net-next. Changes compared to v3[4]: - Add Reviewed-by, - Drop the DT updates, as they will be merged through renesas-devel and arm-soc, and have a hard dependency on this series. Changes compared to v2[5]: - Update recently added board DTS files, - Add Reviewed-by. Changes compared to v1[6]: - Added "[PATCH 1/7] dt-bindings: net: ethernet-controller: Add internal delay properties", - Replace "renesas,[rt]xc-delay-ps" by "[rt]x-internal-delay-ps", - Incorporated EtherAVB DT binding conversion to json-schema, - Add Reviewed-by. Impacted, tested: - Salvator-X(S) with R-Car H3 ES1.0 and ES2.0, M3-W, and M3-N. Not impacted, tested: - Ebisu with R-Car E3. Impacted, not tested: - Salvator-X(S) with other SoC variants, - ULCB with R-Car H3/M3-W/M3-N variants, - V3MSK and Eagle with R-Car V3M, - Draak with R-Car V3H, - HiHope RZ/G2[MN] with RZ/G2M or RZ/G2N, - Beacon EmbeddedWorks RZ/G2M Development Kit. To ease testing, I have pushed this series and the DT updates to the topic/ravb-internal-clock-delays-v4 branch of my renesas-drivers repository at git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git. Thanks for applying! References: [1] Commit bcf3440c6dd78bfe ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") [2] Commit 9b23203c32ee02cd ("ravb: Mask PHY mode to avoid inserting delays twice"). https://lore.kernel.org/r/20200529122540.31368-1-geert+renesas@glider.be/ [3] https://lore.kernel.org/r/CAMuHMdU+MR-2tr3-pH55G0GqPG9HwH3XUd=8HZxprFDMGQeWUw@mail.gmail.com/ [4] https://lore.kernel.org/linux-devicetree/20200819134344.27813-1-geert+renesas@glider.be/ [5] https://lore.kernel.org/linux-devicetree/20200706143529.18306-1-geert+renesas@glider.be/ [6] https://lore.kernel.org/linux-devicetree/20200619191554.24942-1-geert+renesas@glider.be/ ==================== Signed-off-by: David S. Miller commit a6f51f2efa742df026d206a98febd5198893a5cd Author: Geert Uytterhoeven Date: Thu Oct 1 12:10:08 2020 +0200 ravb: Add support for explicit internal clock delay configuration Some EtherAVB variants support internal clock delay configuration, which can add larger delays than the delays that are typically supported by the PHY (using an "rgmii-*id" PHY mode, and/or "[rt]xc-skew-ps" properties). Historically, the EtherAVB driver configured these delays based on the "rgmii-*id" PHY mode. This caused issues with PHY drivers that implement PHY internal delays properly[1]. Hence a backwards-compatible workaround was added by masking the PHY mode[2]. Add proper support for explicit configuration of the MAC internal clock delays using the new "[rt]x-internal-delay-ps" properties. Fall back to the old handling if none of these properties is present. [1] Commit bcf3440c6dd78bfe ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") [2] Commit 9b23203c32ee02cd ("ravb: Mask PHY mode to avoid inserting delays twice"). Signed-off-by: Geert Uytterhoeven Reviewed-by: Sergei Shtylyov Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ce19a9eb53be2fe458cad850e8e70c39cd38cca7 Author: Geert Uytterhoeven Date: Thu Oct 1 12:10:07 2020 +0200 ravb: Split delay handling in parsing and applying Currently, full delay handling is done in both the probe and resume paths. Split it in two parts, so the resume path doesn't have to redo the parsing part over and over again. Signed-off-by: Geert Uytterhoeven Reviewed-by: Sergei Shtylyov Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d7adf6331189cbe9d73729052a9ff14fed802667 Author: Geert Uytterhoeven Date: Thu Oct 1 12:10:06 2020 +0200 dt-bindings: net: renesas,etheravb: Convert to json-schema Convert the Renesas Ethernet AVB (EthernetAVB-IF) Device Tree binding documentation to json-schema. Add missing properties. Update the example to match reality. Signed-off-by: Geert Uytterhoeven Reviewed-by: Sergei Shtylyov Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 57197b66d0d68dfe7aa612853efd493c79c4ba3a Author: Geert Uytterhoeven Date: Thu Oct 1 12:10:05 2020 +0200 dt-bindings: net: renesas,ravb: Document internal clock delay properties Some EtherAVB variants support internal clock delay configuration, which can add larger delays than the delays that are typically supported by the PHY (using an "rgmii-*id" PHY mode, and/or "[rt]xc-skew-ps" properties). Add properties for configuring the internal MAC delays. These properties are mandatory, even when specified as zero, to distinguish between old and new DTBs. Update the (bogus) example accordingly. Signed-off-by: Geert Uytterhoeven Reviewed-by: Sergei Shtylyov Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 0024bad1f4b19bc11ed40ae3d09d4a83eec209fb Author: Geert Uytterhoeven Date: Thu Oct 1 12:10:04 2020 +0200 dt-bindings: net: ethernet-controller: Add internal delay properties Internal Receive and Transmit Clock Delays are a common setting for RGMII capable devices. While these delays are typically applied by the PHY, some MACs support configuring internal clock delay settings, too. Hence add standardized properties to configure this. This is the MAC counterpart of commit 9150069bf5fc0e86 ("dt-bindings: net: Add tx and rx internal delays"), which applies to the PHY. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 44d8870f21529cfa8f50b503b5d949c6d46e6fc1 Author: Denis Efremov Date: Wed Sep 30 19:00:46 2020 +0300 coccinelle: api: add kvmalloc script Suggest kvmalloc, kvfree instead of opencoded patterns. Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit a03bfc37d59de316436c46f5691c5a972ed57c82 Author: Yishai Hadas Date: Wed Sep 30 19:38:28 2020 +0300 RDMA/mlx5: Sync device with CPU pages upon ODP MR registration Sync device with CPU pages upon ODP MR registration. mlx5 already has to zero the HW's version of the PAS list, may as well deliver a PAS list that matches the current CPU page tables configuration. Link: https://lore.kernel.org/r/20200930163828.1336747-5-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 677cf51f71c97bcf98852aa2077d7289bc73e3b3 Author: Yishai Hadas Date: Wed Sep 30 19:38:27 2020 +0300 RDMA/mlx5: Extend advice MR to support non faulting mode Extend advice MR to support non faulting mode, this can improve performance by increasing the populated page tables in the device. Link: https://lore.kernel.org/r/20200930163828.1336747-4-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 8bfafde08693cc2e740134c3e32b40254f5d82ae Author: Yishai Hadas Date: Wed Sep 30 19:38:26 2020 +0300 IB/core: Enable ODP sync without faulting Enable ODP sync without faulting, this improves performance by reducing the number of page faults in the system. The gain from this option is that the device page table can be aligned with the presented pages in the CPU page table without causing page faults. As of that, the overhead on data path from hardware point of view to trigger a fault which end-up by calling the driver to bring the pages will be dropped. Link: https://lore.kernel.org/r/20200930163828.1336747-3-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 8e7875ae373a3690397c4e593629d3b9ad5ccf42 Author: Kuninori Morimoto Date: Thu Oct 1 14:07:41 2020 +0900 ASoC: soc-pcm: add missing ret=0 at soc_pcm_open() commit 140a4532cdb8c ("ASoC: soc-pcm: add soc_pcm_clean() and call it from soc_pcm_open/close()") switched to use soc_pcm_clean() at soc_pcm_open(). But it removed "return 0", and missing "ret = 0", because of it, it always return -EINVAL eventhough no error. This patch adds missing "ret = 0" for success case. Reported-by: Marek Szyprowski Signed-off-by: Kuninori Morimoto Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/87ft6ya65z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 70442ee62d70cac010c6a181c27a90549f58b69a Merge: 855f69fc05a18 fd5ad4d1e9808 Author: Kalle Valo Date: Thu Oct 1 22:40:44 2020 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.10. Major changes: ath11k * improvements to QCA6390 PCI support, adding essential missing features: ELF board files, packet log handling to avoid data stalls and crash fixes commit 36f30e486dce22345c2dd3a3ba439c12cd67f6ba Author: Yishai Hadas Date: Wed Sep 30 19:38:25 2020 +0300 IB/core: Improve ODP to use hmm_range_fault() Move to use hmm_range_fault() instead of get_user_pags_remote() to improve performance in a few aspects: This includes: - Dropping the need to allocate and free memory to hold its output - No need any more to use put_page() to unpin the pages - The logic to detect contiguous pages is done based on the returned order, no need to run per page and evaluate. In addition, moving to use hmm_range_fault() enables to reduce page faults in the system with it's snapshot mode, this will be introduced in next patches from this series. As part of this, cleanup some flows and use the required data structures to work with hmm_range_fault(). Link: https://lore.kernel.org/r/20200930163828.1336747-2-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit fd5ad4d1e9808c96245433d92a6fbc6256cc5e42 Author: Loic Poulain Date: Thu Jun 18 11:17:43 2020 +0200 wcn36xx: Advertise beacon filtering support in bmps In bmps mode, beacons are filtered, and firmware is in charge of monitoring the beacons and report changes or loss. mac80211 must be advertised about such change to prevent it's internal timer based beacon monitor to report beacon loss. Fix that by setting/clearing the IEEE80211_VIF_BEACON_FILTER vif flag on bmps entry/exit. Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592471863-31402-2-git-send-email-loic.poulain@linaro.org commit 404f5de2f9977313ad33182323a557d5d3916773 Author: Kalle Valo Date: Thu Oct 1 12:34:50 2020 +0300 ath11k: remove unnecessary casts to u32 These casts are not needed. No changes in functionality. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601544890-13450-9-git-send-email-kvalo@codeaurora.org commit c83c500b55b6de7b59c90070167c3a8e2ab40f87 Author: Carl Huang Date: Thu Oct 1 12:34:49 2020 +0300 ath11k: enable idle power save mode Host sends wmi command to allow hardware enter idle power save mode in ath11k_mac_op_start function. hw parameter idle_ps indicates whether idle power save is supported. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601544890-13450-8-git-send-email-kvalo@codeaurora.org commit 9b309970c4eafdf49e99b66232e7fceec9fb191a Author: Carl Huang Date: Thu Oct 1 12:34:48 2020 +0300 ath11k: start a timer to update HP for CE pipe 4 For QCA6390, Start a timer to update CE pipe 4 ring HP when shadow register is enabled. Its' to avoid that HP isn't updated to target register. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601544890-13450-7-git-send-email-kvalo@codeaurora.org commit 506e7e9bbf3f4c51f5f0323173aa9ff2f704ae58 Author: Carl Huang Date: Thu Oct 1 12:34:47 2020 +0300 ath11k: start a timer to update REO cmd ring Start a timer to update REO HP if HP isn't updated to target. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601544890-13450-6-git-send-email-kvalo@codeaurora.org commit 8ec5a6ab9c7eeeeb59f74e59e53de78dda402da8 Author: Carl Huang Date: Thu Oct 1 12:34:46 2020 +0300 ath11k: start a timer to update TCL HP The timer is to check if TCL HP isn't updated to target. The timer will postpone itself if there are TX operations during the interval, otherwise the timer handler updates the HP again so the index value in HP register will be forwarded to target register, and the timer stops afterwards. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601544890-13450-5-git-send-email-kvalo@codeaurora.org commit 9df6d8399d6789c4eb81878285e7808225a2a141 Author: Carl Huang Date: Thu Oct 1 12:34:45 2020 +0300 ath11k: set WMI pipe credit to 1 for QCA6390 For QCA6390, set wmi credit to 1 to avoid back-to-back write to shadow register when shadow register is enabled. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601544890-13450-4-git-send-email-kvalo@codeaurora.org commit e838c14a9ee1dfe660527128d8f2e3191c8b1aad Author: Carl Huang Date: Thu Oct 1 12:34:44 2020 +0300 ath11k: enable shadow register configuration and access To enable shadow register access, host needs to pass shadow register configuration to firmware via qmi message. Host also needs to update ring's HP or TP address to shadow register address. The write operation to shadow register will be forwarded to target register by hardware automatically, and the write operation to shadow register is permitted even when the target is in power save or sleep mode. Update the shadow config whenever power up happens. This feature is controlled by hw parameter supports_shadow_regs which is only enabled for QCA6390. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601544890-13450-3-git-send-email-kvalo@codeaurora.org commit a05bd85133357b0c1b0a52dda4ee4d7e31069f4f Author: Carl Huang Date: Thu Oct 1 12:34:43 2020 +0300 ath11k: read and write registers below unwindowed address For QCA6390, host can read and write registers below unwindowed address directly without programming the window register. For registers below bar0 + 4k - 32, host can read and write regardless of the power save state. Shadow registers are located below bar0 + 4K - 32. Before MHI power up, there is no need to wakeup MHI so ini_done is added to indicate it. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601544890-13450-2-git-send-email-kvalo@codeaurora.org commit 089ba909f8d78c6b7bba7227398587bef6535a40 Author: Carl Huang Date: Wed Sep 30 13:51:13 2020 +0300 ath11k: debugfs: fix crash during rmmod With QCA6390 when doing rmmod the kernel crashed. The reason was that the destroy functions ath11k_debugfs_pdev_destroy() and ath11k_debugfs_soc_destroy() accidentally had swapped the debugfs directories and ath11k_debugfs_soc_destroy() was removing an already removed directory, which crashed the kernel. The source of confusion is badly named function and variable names. I think the best way to clean this up is actually to merge the corresponding functions, but that's for another patch. Let's first just fix the crash. [ 43.430245] ------------[ cut here ]------------ [ 43.430247] DEBUG_LOCKS_WARN_ON(1) [ 43.430253] WARNING: CPU: 4 PID: 2148 at kernel/locking/lockdep.c:183 check_wait_context+0x231/0x290 [ 43.430255] Modules linked in: ath11k_pci(-) ath11k qmi_helpers qrtr_mhi mhi qrtr ns nvme nvme_core [ 43.430261] CPU: 4 PID: 2148 Comm: rmmod Not tainted 5.9.0-rc5-wt-ath+ #198 [ 43.430262] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0049.2018.0801.1601 08/01/2018 [ 43.430265] RIP: 0010:check_wait_context+0x231/0x290 [ 43.430267] Code: ff ff e8 42 83 bf 00 85 c0 74 f0 44 8b 15 af 0d 90 01 45 85 d2 75 e4 48 c7 c6 7f e5 37 8d 48 c7 c7 8d 81 34 8d e8 c3 01 fa ff <0f> 0b 31 c0 e9 01 fe ff f [ 43.430268] RSP: 0018:ffffa36140f23bf8 EFLAGS: 00010082 [ 43.430270] RAX: 0000000000000000 RBX: e7a8b0f303fcdbd7 RCX: 0000000000000000 [ 43.430272] RDX: 0000000000000016 RSI: ffffffff8bee5824 RDI: ffffffff8d66fd60 [ 43.430273] RBP: ffff936573551d80 R08: 0000000a1ca4fc0e R09: 0000000000000016 [ 43.430275] R10: 0000000000000046 R11: ffffa36140f23a35 R12: ffff936573552670 [ 43.430276] R13: 0000000000000000 R14: ffff936573552638 R15: 0000000000000001 [ 43.430278] FS: 00007f03e78c8700(0000) GS:ffff93659c800000(0000) knlGS:0000000000000000 [ 43.430280] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 43.430282] CR2: 000056424768fee8 CR3: 00000001f7b46003 CR4: 00000000003706e0 [ 43.430283] Call Trace: [ 43.430286] __lock_acquire+0x1c0/0x6e0 [ 43.430289] lock_acquire+0xb6/0x270 [ 43.430292] ? lockref_get+0x9/0x20 [ 43.430295] ? lock_acquire+0xb6/0x270 [ 43.430297] ? simple_pin_fs+0x1d/0xa0 [ 43.430299] ? find_held_lock+0x32/0x90 [ 43.430303] _raw_spin_lock+0x2c/0x70 [ 43.430305] ? lockref_get+0x9/0x20 [ 43.430306] lockref_get+0x9/0x20 [ 43.430308] simple_recursive_removal+0x31/0x2f0 [ 43.430310] ? debugfs_rename+0x40/0x40 [ 43.430312] debugfs_remove+0x3b/0x60 [ 43.430320] ath11k_debug_soc_destroy+0x10/0x20 [ath11k] [ 43.430325] ath11k_core_deinit+0xab/0xd0 [ath11k] [ 43.430327] ath11k_pci_remove+0x1b/0xb0 [ath11k_pci] [ 43.430329] pci_device_remove+0x36/0x90 [ 43.430331] __device_release_driver+0x16c/0x220 [ 43.430333] driver_detach+0xcf/0x110 [ 43.430334] bus_remove_driver+0x4d/0xa2 [ 43.430336] pci_unregister_driver+0x25/0xa0 [ 43.430338] __do_sys_delete_module+0x163/0x240 [ 43.430340] ? lockdep_hardirqs_on_prepare.part.0+0x9f/0x140 [ 43.430342] ? syscall_enter_from_user_mode+0x1d/0x50 [ 43.430343] ? trace_hardirqs_on+0x1c/0x100 [ 43.430345] do_syscall_64+0x33/0x40 [ 43.430347] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 43.430348] RIP: 0033:0x7f03e73f89e7 [ 43.430350] Code: 73 01 c3 48 8b 0d b1 c4 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 b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c [ 43.430351] RSP: 002b:00007ffdb61d6198 EFLAGS: 00000202 ORIG_RAX: 00000000000000b0 [ 43.430352] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f03e73f89e7 [ 43.430353] RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000556f67d922e8 [ 43.430354] RBP: 0000556f67d92280 R08: 0000000000000000 R09: 1999999999999999 [ 43.430355] R10: 0000000000000883 R11: 0000000000000202 R12: 00007ffdb61d63b0 [ 43.430356] R13: 00007ffdb61d7917 R14: 0000000000000000 R15: 0000556f67d92280 [ 43.430358] irq event stamp: 240801 [ 43.430360] hardirqs last enabled at (240801): [] cmpxchg_double_slab.constprop.0+0x185/0x1a0 [ 43.430362] hardirqs last disabled at (240800): [] cmpxchg_double_slab.constprop.0+0xde/0x1a0 [ 43.430364] softirqs last enabled at (240680): [] ath11k_pci_read32+0x87/0xe0 [ath11k_pci] [ 43.430365] softirqs last disabled at (240678): [] ath11k_pci_read32+0x48/0xe0 [ath11k_pci] [ 43.430366] ---[ end trace dc96c4234c294fe8 ]--- Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601463073-12106-6-git-send-email-kvalo@codeaurora.org commit 2f588660e34a982377109872757f1b99d7748d21 Author: Carl Huang Date: Wed Sep 30 13:51:12 2020 +0300 ath11k: fix warning caused by lockdep_assert_held Fix warning caused by lockdep_assert_held when CONFIG_LOCKDEP is enabled. [ 271.940647] WARNING: CPU: 6 PID: 0 at drivers/net/wireless/ath/ath11k/hal.c:818 ath11k_hal_srng_access_begin+0x31/0x40 [ath11k] [ 271.940655] Modules linked in: qrtr_mhi qrtr ns ath11k_pci mhi ath11k qmi_helpers nvme nvme_core [ 271.940675] CPU: 6 PID: 0 Comm: swapper/6 Kdump: loaded Tainted: G W 5.9.0-rc5-kalle-bringup-wt-ath+ #4 [ 271.940682] Hardware name: Dell Inc. Inspiron 7590/08717F, BIOS 1.3.0 07/22/2019 [ 271.940698] RIP: 0010:ath11k_hal_srng_access_begin+0x31/0x40 [ath11k] [ 271.940708] Code: 48 89 f3 85 c0 75 11 48 8b 83 a8 00 00 00 8b 00 89 83 b0 00 00 00 5b c3 48 8d 7e 58 be ff ff ff ff e8 53 24 ec fa 85 c0 75 dd <0f> 0b eb d9 90 66 2e 0f 1f 84 00 00 00 00 00 55 53 48 89 f3 8b 35 [ 271.940718] RSP: 0018:ffffbdf0c0230df8 EFLAGS: 00010246 [ 271.940727] RAX: 0000000000000000 RBX: ffffa12b34e67680 RCX: ffffa12b57a0d800 [ 271.940735] RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffffa12b34e676d8 [ 271.940742] RBP: ffffa12b34e60000 R08: 0000000000000001 R09: 0000000000000001 [ 271.940753] R10: 0000000000000001 R11: 0000000000000046 R12: 0000000000000000 [ 271.940763] R13: ffffa12b34e60000 R14: ffffa12b34e60000 R15: 0000000000000000 [ 271.940774] FS: 0000000000000000(0000) GS:ffffa12b5a400000(0000) knlGS:0000000000000000 [ 271.940788] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 271.940798] CR2: 00007f8bef282008 CR3: 00000001f4224004 CR4: 00000000003706e0 [ 271.940805] Call Trace: [ 271.940813] [ 271.940835] ath11k_dp_tx_completion_handler+0x9e/0x950 [ath11k] [ 271.940847] ? lock_acquire+0xba/0x3b0 [ 271.940876] ath11k_dp_service_srng+0x5a/0x2e0 [ath11k] [ 271.940893] ath11k_pci_ext_grp_napi_poll+0x1e/0x80 [ath11k_pci] [ 271.940908] net_rx_action+0x283/0x4f0 [ 271.940931] __do_softirq+0xcb/0x499 [ 271.940950] asm_call_on_stack+0x12/0x20 [ 271.940963] [ 271.940979] do_softirq_own_stack+0x4d/0x60 [ 271.940991] irq_exit_rcu+0xb0/0xc0 [ 271.941001] common_interrupt+0xce/0x190 [ 271.941014] asm_common_interrupt+0x1e/0x40 [ 271.941026] RIP: 0010:cpuidle_enter_state+0x115/0x500 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601463073-12106-5-git-send-email-kvalo@codeaurora.org commit 7fd85517c359a56a09711f4f2f12f9ef18bfe38c Author: Wen Gong Date: Wed Sep 30 13:51:11 2020 +0300 ath11k: mac: remove unused conf_mutex to solve a deadlock The conf_mutex is not use and lead below deadlock, remove it to solve the deadlock issue. [ 44.967496] NET: Registered protocol family 42 [ 45.119629] ath11k_pci 0000:06:00.0: WARNING: ath11k PCI support is experimental! [ 45.120087] ath11k_pci 0000:06:00.0: BAR 0: assigned [mem 0xdc000000-0xdc0fffff 64bit] [ 45.120108] ath11k_pci 0000:06:00.0: enabling device (0000 -> 0002) [ 45.206525] ath11k_pci 0000:06:00.0: aspm 0x42 changed to 0x40 [ 45.207430] mhi 0000:06:00.0: Requested to power ON [ 45.208609] mhi 0000:06:00.0: Power on setup success [ 46.190711] ath11k_pci 0000:06:00.0: chip_id 0x0 chip_family 0xb board_id 0x101 soc_id 0xffffffff [ 46.190729] ath11k_pci 0000:06:00.0: fw_version 0x306a70f fw_build_timestamp 2000-01-01 00:00 fw_build_id 1]: Starting Load/Save RF Kill Switch Status... [ 46.385118] ath11k_pci 0000:06:00.0 wlp6s0: renamed from wlan0 1]: Started Load/Save RF Kill Switch Status. [ 53.566669] wlp6s0: authenticate with 00:03:7f:48:dd:bf [ 53.809092] wlp6s0: send auth to 00:03:7f:48:dd:bf (try 1/3) [ 53.816490] wlp6s0: authenticated [ 53.818618] wlp6s0: associate with 00:03:7f:48:dd:bf (try 1/3) [ 53.820839] wlp6s0: RX AssocResp from 00:03:7f:48:dd:bf (capab=0x1 status=0 aid=2) [ 53.834859] [ 53.834861] ====================================================== [ 53.834862] WARNING: possible circular locking dependency detected [ 53.834863] 5.9.0-rc5-wt-ath+ #198 Not tainted [ 53.834864] ------------------------------------------------------ [ 53.834865] kworker/u16:3/166 is trying to acquire lock: [ 53.834866] ffff8c4b37184f78 (&ar->conf_mutex){+.+.}-{3:3}, at: ath11k_mac_op_config+0x16/0x30 [ath11k] [ 53.834875] [ 53.834875] but task is already holding lock: [ 53.834876] ffff8c4b37182808 (&local->iflist_mtx){+.+.}-{3:3}, at: ieee80211_set_associated+0x167/0x360 [ 53.834879] [ 53.834879] which lock already depends on the new lock. [ 53.834879] [ 53.834880] [ 53.834880] the existing dependency chain (in reverse order) is: [ 53.834881] [ 53.834881] -> #1 (&local->iflist_mtx){+.+.}-{3:3}: [ 53.834884] __lock_acquire+0x3bf/0x6e0 [ 53.834886] lock_acquire+0xb6/0x270 [ 53.834887] __mutex_lock+0x88/0x8e0 [ 53.834890] ieee80211_set_hw_80211_encap+0x3e/0x1f0 [ 53.834895] ath11k_mac_op_add_interface+0x348/0x7f0 [ath11k] [ 53.834897] drv_add_interface+0x7c/0x190 [ 53.834899] ieee80211_do_open+0x552/0x9a0 [ 53.834901] __dev_open+0xe5/0x190 [ 53.834902] __dev_change_flags+0x1c6/0x230 [ 53.834903] dev_change_flags+0x1c/0x50 [ 53.834905] do_setlink+0x246/0xc60 [ 53.834906] __rtnl_newlink+0x607/0x990 [ 53.834907] rtnl_newlink+0x3f/0x60 [ 53.834908] rtnetlink_rcv_msg+0x174/0x490 [ 53.834910] netlink_rcv_skb+0x42/0x100 [ 53.834911] netlink_unicast+0x18c/0x250 [ 53.834912] netlink_sendmsg+0x227/0x460 [ 53.834914] sock_sendmsg+0x59/0x60 [ 53.834915] ____sys_sendmsg+0x1f5/0x230 [ 53.834916] ___sys_sendmsg+0x70/0xb0 [ 53.834917] __sys_sendmsg+0x54/0xa0 [ 53.834919] do_syscall_64+0x33/0x40 [ 53.834920] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 53.834921] [ 53.834921] -> #0 (&ar->conf_mutex){+.+.}-{3:3}: [ 53.834923] check_prev_add+0x98/0x9f0 [ 53.834925] validate_chain+0x404/0x6c0 [ 53.834926] __lock_acquire+0x3bf/0x6e0 [ 53.834927] lock_acquire+0xb6/0x270 [ 53.834929] __mutex_lock+0x88/0x8e0 [ 53.834934] ath11k_mac_op_config+0x16/0x30 [ath11k] [ 53.834935] ieee80211_hw_config+0xb3/0x270 [ 53.834937] ieee80211_set_associated+0x17c/0x360 [ 53.834938] ieee80211_assoc_success.constprop.0+0x5a2/0xc80 [ 53.834940] ieee80211_rx_mgmt_assoc_resp+0x16a/0x350 [ 53.834941] ieee80211_sta_rx_queued_mgmt+0xca/0x410 [ 53.834943] ieee80211_iface_work+0x1f3/0x350 [ 53.834945] process_one_work+0x265/0x5d0 [ 53.834946] worker_thread+0x49/0x300 [ 53.834948] kthread+0x135/0x150 [ 53.834949] ret_from_fork+0x22/0x30 [ 53.834950] [ 53.834950] other info that might help us debug this: [ 53.834950] [ 53.834951] Possible unsafe locking scenario: [ 53.834951] [ 53.834952] CPU0 CPU1 [ 53.834952] ---- ---- [ 53.834953] lock(&local->iflist_mtx); [ 53.834954] lock(&ar->conf_mutex); [ 53.834955] lock(&local->iflist_mtx); [ 53.834956] lock(&ar->conf_mutex); [ 53.834957] [ 53.834957] *** DEADLOCK *** [ 53.834957] [ 53.834958] 4 locks held by kworker/u16:3/166: [ 53.834959] #0: ffff8c4b37c22948 ((wq_completion)phy0){+.+.}-{0:0}, at: process_one_work+0x1d3/0x5d0 [ 53.834961] #1: ffffa98300abfe70 ((work_completion)(&sdata->work)){+.+.}-{0:0}, at: process_one_work+0x1d3/0x5d0 [ 53.834963] #2: ffff8c4b371e4cd0 (&wdev->mtx){+.+.}-{3:3}, at: ieee80211_sta_rx_queued_mgmt+0x4b/0x410 [ 53.834965] #3: ffff8c4b37182808 (&local->iflist_mtx){+.+.}-{3:3}, at: ieee80211_set_associated+0x167/0x360 [ 53.834968] [ 53.834968] stack backtrace: [ 53.834969] CPU: 1 PID: 166 Comm: kworker/u16:3 Not tainted 5.9.0-rc5-wt-ath+ #198 [ 53.834970] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0049.2018.0801.1601 08/01/2018 [ 53.834972] Workqueue: phy0 ieee80211_iface_work [ 53.834974] Call Trace: [ 53.834976] dump_stack+0x77/0xa0 [ 53.834978] check_noncircular+0x15d/0x180 [ 53.834980] check_prev_add+0x98/0x9f0 [ 53.834982] ? add_chain_cache+0x143/0x440 [ 53.834984] validate_chain+0x404/0x6c0 [ 53.834986] __lock_acquire+0x3bf/0x6e0 [ 53.834988] lock_acquire+0xb6/0x270 [ 53.834993] ? ath11k_mac_op_config+0x16/0x30 [ath11k] [ 53.834999] ? ath11k_mac_op_config+0x16/0x30 [ath11k] [ 53.835001] __mutex_lock+0x88/0x8e0 [ 53.835006] ? ath11k_mac_op_config+0x16/0x30 [ath11k] [ 53.835007] ? sched_clock_cpu+0xc/0xb0 [ 53.835009] ? __lock_release+0x179/0x2c0 [ 53.835014] ath11k_mac_op_config+0x16/0x30 [ath11k] [ 53.835016] ieee80211_hw_config+0xb3/0x270 [ 53.835018] ieee80211_set_associated+0x17c/0x360 [ 53.835019] ieee80211_assoc_success.constprop.0+0x5a2/0xc80 [ 53.835021] ? lockdep_hardirqs_on_prepare.part.0+0x9f/0x140 [ 53.835023] ? cmpxchg_double_slab.constprop.0+0x185/0x1a0 [ 53.835025] ? trace_hardirqs_on+0x1c/0x100 [ 53.835027] ? __slab_free+0x8f/0x330 [ 53.835029] ? slab_free_freelist_hook+0xf8/0x150 [ 53.835031] ? ieee802_11_parse_elems_crc+0x147/0x1d0 [ 53.835032] ? kfree+0x2b0/0x2d0 [ 53.835034] ? ieee802_11_parse_elems_crc+0x147/0x1d0 [ 53.835036] ieee80211_rx_mgmt_assoc_resp+0x16a/0x350 [ 53.835041] ieee80211_sta_rx_queued_mgmt+0xca/0x410 [ 53.835043] ? __lock_acquire+0x3bf/0x6e0 [ 53.835045] ? lock_acquire+0xb6/0x270 [ 53.835046] ? skb_dequeue+0x13/0x70 [ 53.835048] ? find_held_lock+0x32/0x90 [ 53.835049] ? sched_clock_cpu+0xc/0xb0 [ 53.835051] ? mark_held_locks+0x50/0x80 [ 53.835053] ? lockdep_hardirqs_on_prepare.part.0+0x9f/0x140 [ 53.835054] ? _raw_spin_unlock_irqrestore+0x34/0x40 [ 53.835056] ? trace_hardirqs_on+0x1c/0x100 [ 53.835058] ieee80211_iface_work+0x1f3/0x350 [ 53.835060] process_one_work+0x265/0x5d0 [ 53.835062] worker_thread+0x49/0x300 [ 53.835063] ? process_one_work+0x5d0/0x5d0 [ 53.835065] kthread+0x135/0x150 [ 53.835066] ? kthread_create_worker_on_cpu+0x60/0x60 [ 53.835068] ret_from_fork+0x22/0x30 [ 53.835075] wlp6s0: associated [ 53.835132] IPv6: ADDRCONF(NETDEV_CHANGE): wlp6s0: link becomes ready Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601463073-12106-4-git-send-email-kvalo@codeaurora.org commit 6fbd8898b3012df42ba1087dd7993c18a2c212f6 Author: Carl Huang Date: Wed Sep 30 13:51:10 2020 +0300 ath11k: pci: fix rmmod crash For QCA6390 we first need to call free_irq() and only then disable_msi(). Otherwise a kernel BUG below will happen. Also free core, hal_srng and ce resources during ath11k_pci_remove(). [ 1089.425506] ------------[ cut here ]------------ [ 1089.425510] kernel BUG at drivers/pci/msi.c:375! [ 1089.425514] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC PTI [ 1089.425517] CPU: 1 PID: 20539 Comm: rmmod Not tainted 5.9.0-rc5-wt-ath+ #198 [ 1089.425519] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0049.2018.0801.1601 08/01/2018 [ 1089.425523] RIP: 0010:free_msi_irqs+0x184/0x1b0 [ 1089.425526] Code: 14 85 c0 0f 84 cc fe ff ff 31 ed eb 0f 83 c5 01 39 6b 14 0f 86 bc fe ff ff 8b 7b 10 01 ef e8 c3 01 bf ff 48 83 78 70 00 74 e3 <0f> 0b 49 8d b5 b0 00 00 0 [ 1089.425528] RSP: 0018:ffffb128c0cf7dd0 EFLAGS: 00010282 [ 1089.425530] RAX: ffff947d67549000 RBX: ffff947cd2d25200 RCX: 0000000000000000 [ 1089.425532] RDX: ffff947d94a6f928 RSI: ffff947d94a6fa18 RDI: 0000000000000099 [ 1089.425533] RBP: 0000000000000000 R08: ffff947d67549000 R09: ffffffff86670050 [ 1089.425535] R10: 0000000000000000 R11: 0000000000000000 R12: ffff947d96c194f0 [ 1089.425537] R13: ffff947d96c19000 R14: 0000000000000000 R15: ffffffffc0225250 [ 1089.425539] FS: 00007f97c44ed700(0000) GS:ffff947d9c200000(0000) knlGS:0000000000000000 [ 1089.425541] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1089.425543] CR2: 00007f97c408d701 CR3: 0000000192bc0006 CR4: 00000000003706e0 [ 1089.425544] Call Trace: [ 1089.425549] ath11k_pci_remove+0x2b/0x90 [ath11k_pci] [ 1089.425553] pci_device_remove+0x36/0x90 [ 1089.425556] __device_release_driver+0x16c/0x220 [ 1089.425559] driver_detach+0xcf/0x110 [ 1089.425561] bus_remove_driver+0x4d/0xa2 [ 1089.425564] pci_unregister_driver+0x25/0xa0 [ 1089.425568] __do_sys_delete_module+0x163/0x240 [ 1089.425571] ? trace_hardirqs_on+0x1c/0x100 [ 1089.425575] do_syscall_64+0x33/0x40 [ 1089.425577] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 1089.425579] RIP: 0033:0x7f97c401d9e7 [ 1089.425581] Code: 73 01 c3 48 8b 0d b1 c4 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 b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c [ 1089.425583] RSP: 002b:00007fff1e0fb728 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 1089.425585] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f97c401d9e7 [ 1089.425587] RDX: 000000000000000a RSI: 0000000000000800 RDI: 00005585aad022e8 [ 1089.425589] RBP: 00005585aad02280 R08: 0000000000000000 R09: 1999999999999999 [ 1089.425591] R10: 0000000000000883 R11: 0000000000000206 R12: 00007fff1e0fb940 [ 1089.425592] R13: 00007fff1e0fd917 R14: 0000000000000000 R15: 00005585aad02280 [ 1089.425596] Modules linked in: ath11k_pci(-) ath11k qmi_helpers qrtr_mhi mhi qrtr ns nvme nvme_core [last unloaded: mhi] [ 1089.425603] ---[ end trace 2a81926cc0708a38 ]--- Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601463073-12106-3-git-send-email-kvalo@codeaurora.org commit 701e48a43e1578c6095d8298ffd1afd8d0ae63be Author: Carl Huang Date: Wed Sep 30 13:51:09 2020 +0300 ath11k: add packet log support for QCA6390 Add packet log support for QCA6390, otherwise the data connection will stall within a minute or so. Enable it via debugfs and use trace-cmd to capture the pktlogs. echo 0xffff 1 > /sys/kernel/debug/ath11k/qca6390\ hw2.0/mac0/pktlog_filter The mon status ring doesn't support interrupt so far, so host starts a timer to reap this ring. The timer handler also reaps the rxdma_err_dst_ring in case of monitor mode. As QCA6390 requires bss created ahead of starting vdev, so check vdev_start_delay for monitor mode. For QCA6390, it uses wbm_desc_rel_ring to return descriptors. It also uses rx_refill_buf_ring to fill mon buffer instead of rxdma_mon_buf_ring. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601463073-12106-2-git-send-email-kvalo@codeaurora.org commit 87e8497a7d46a05574cb7cca25eabf3a3221093e Author: Govind Singh Date: Tue Sep 29 20:15:36 2020 +0300 ath11k: Use GFP_ATOMIC instead of GFP_KERNEL in idr_alloc With SLUB DEBUG CONFIG below crash is seen as kmem_cache_alloc is being called in non-atomic context. To fix this issue, use GFP_ATOMIC instead of GFP_KERNEL in idr_alloc. BUG: sleeping function called from invalid context at mm/slab.h:393 [ 59.805451] Call trace: [ 59.807971] ___might_sleep+0x110/0x118 [ 59.811915] __might_sleep+0x50/0x84 [ 59.815593] kmem_cache_alloc+0x60/0x3e0 [ 59.819630] radix_tree_node_alloc+0x4c/0xe8 [ 59.824014] radix_tree_extend+0x8c/0x164 [ 59.828135] idr_get_free_cmn+0xa4/0x27c [ 59.832167] idr_alloc_cmn+0x70/0xe8 [ 59.835856] ath11k_dp_rxbufs_replenish+0x1e8/0x310 [ath11k] [ 59.841687] ath11k_dp_rxdma_ring_buf_setup+0x50/0x60 [ath11k] [ 59.847693] ath11k_dp_rx_pdev_alloc+0x260/0x4d8 [ath11k] [ 59.853248] ath11k_dp_pdev_alloc+0x40/0xc4 [ath11k] [ 59.858357] ath11k_core_qmi_firmware_ready+0x3c4/0x490 [ath11k] [ 59.864538] ath11k_qmi_driver_event_work+0x4c8/0x1178 [ath11k] [ 59.870620] process_one_work+0x208/0x434 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601399736-3210-9-git-send-email-kvalo@codeaurora.org commit 6a8be1baa9116a038cb4f6158cc10134387ca0d0 Author: Wen Gong Date: Tue Sep 29 20:15:35 2020 +0300 ath11k: Use GFP_ATOMIC instead of GFP_KERNEL in ath11k_dp_htt_get_ppdu_desc With SLUB DEBUG CONFIG below crash is seen as kmem_cache_alloc is being called in non-atomic context. To fix this issue, use GFP_ATOMIC instead of GFP_KERNEL kzalloc. [ 357.217088] BUG: sleeping function called from invalid context at mm/slab.h:498 [ 357.217091] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/0 [ 357.217092] INFO: lockdep is turned off. [ 357.217095] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 5.9.0-rc5-wt-ath+ #196 [ 357.217096] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0049.2018.0801.1601 08/01/2018 [ 357.217097] Call Trace: [ 357.217098] [ 357.217107] ? ath11k_dp_htt_get_ppdu_desc+0xa9/0x170 [ath11k] [ 357.217110] dump_stack+0x77/0xa0 [ 357.217113] ___might_sleep.cold+0xa6/0xb6 [ 357.217116] kmem_cache_alloc_trace+0x1f2/0x270 [ 357.217122] ath11k_dp_htt_get_ppdu_desc+0xa9/0x170 [ath11k] [ 357.217129] ath11k_htt_pull_ppdu_stats.isra.0+0x96/0x270 [ath11k] [ 357.217135] ath11k_dp_htt_htc_t2h_msg_handler+0xe7/0x1d0 [ath11k] [ 357.217137] ? trace_hardirqs_on+0x1c/0x100 [ 357.217143] ath11k_htc_rx_completion_handler+0x207/0x370 [ath11k] [ 357.217149] ath11k_ce_recv_process_cb+0x15e/0x1e0 [ath11k] [ 357.217151] ? handle_irq_event+0x70/0xa8 [ 357.217154] ath11k_pci_ce_tasklet+0x10/0x30 [ath11k_pci] [ 357.217157] tasklet_action_common.constprop.0+0xd4/0xf0 [ 357.217160] __do_softirq+0xc9/0x482 [ 357.217162] asm_call_on_stack+0x12/0x20 [ 357.217163] [ 357.217166] do_softirq_own_stack+0x49/0x60 [ 357.217167] irq_exit_rcu+0x9a/0xd0 [ 357.217169] common_interrupt+0xa1/0x190 [ 357.217171] asm_common_interrupt+0x1e/0x40 [ 357.217173] RIP: 0010:cpu_idle_poll.isra.0+0x2e/0x60 [ 357.217175] Code: 8b 35 26 27 74 69 e8 11 c8 3d ff e8 bc fa 42 ff e8 e7 9f 4a ff fb 65 48 8b 1c 25 80 90 01 00 48 8b 03 a8 08 74 0b eb 1c f3 90 <48> 8b 03 a8 08 75 13 8b 0 [ 357.217177] RSP: 0018:ffffffff97403ee0 EFLAGS: 00000202 [ 357.217178] RAX: 0000000000000001 RBX: ffffffff9742b8c0 RCX: 0000000000b890ca [ 357.217180] RDX: 0000000000b890ca RSI: 0000000000000001 RDI: ffffffff968d0c49 [ 357.217181] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 357.217182] R10: ffffffff9742b8c0 R11: 0000000000000046 R12: 0000000000000000 [ 357.217183] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000066fdf520 [ 357.217186] ? cpu_idle_poll.isra.0+0x19/0x60 [ 357.217189] do_idle+0x5f/0xe0 [ 357.217191] cpu_startup_entry+0x14/0x20 [ 357.217193] start_kernel+0x443/0x464 [ 357.217196] secondary_startup_64+0xa4/0xb0 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601399736-3210-8-git-send-email-kvalo@codeaurora.org commit df648808c6b9989555e247530d8ca0ad0094b361 Author: Wen Gong Date: Tue Sep 29 20:15:34 2020 +0300 ath11k: change to disable softirqs for ath11k_regd_update to solve deadlock After base_lock which occupy by ath11k_regd_update, the softirq run for WMI_REG_CHAN_LIST_CC_EVENTID maybe arrived and it also need to accuire the spin lock, then deadlock happend, change to disable softirqis to solve it. [ 235.576990] ================================ [ 235.576991] WARNING: inconsistent lock state [ 235.576993] 5.9.0-rc5-wt-ath+ #196 Not tainted [ 235.576994] -------------------------------- [ 235.576995] inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. [ 235.576997] kworker/u16:1/98 [HC0[0]:SC0[0]:HE1:SE1] takes: [ 235.576998] ffff9655f75cad98 (&ab->base_lock){+.?.}-{2:2}, at: ath11k_regd_update+0x28/0x1d0 [ath11k] [ 235.577009] {IN-SOFTIRQ-W} state was registered at: [ 235.577013] __lock_acquire+0x219/0x6e0 [ 235.577015] lock_acquire+0xb6/0x270 [ 235.577018] _raw_spin_lock+0x2c/0x70 [ 235.577023] ath11k_reg_chan_list_event.isra.0+0x10d/0x1e0 [ath11k] [ 235.577028] ath11k_wmi_tlv_op_rx+0x3c3/0x560 [ath11k] [ 235.577033] ath11k_htc_rx_completion_handler+0x207/0x370 [ath11k] [ 235.577039] ath11k_ce_recv_process_cb+0x15e/0x1e0 [ath11k] [ 235.577041] ath11k_pci_ce_tasklet+0x10/0x30 [ath11k_pci] [ 235.577043] tasklet_action_common.constprop.0+0xd4/0xf0 [ 235.577045] __do_softirq+0xc9/0x482 [ 235.577046] asm_call_on_stack+0x12/0x20 [ 235.577048] do_softirq_own_stack+0x49/0x60 [ 235.577049] irq_exit_rcu+0x9a/0xd0 [ 235.577050] common_interrupt+0xa1/0x190 [ 235.577052] asm_common_interrupt+0x1e/0x40 [ 235.577053] cpu_idle_poll.isra.0+0x2e/0x60 [ 235.577055] do_idle+0x5f/0xe0 [ 235.577056] cpu_startup_entry+0x14/0x20 [ 235.577058] start_kernel+0x443/0x464 [ 235.577060] secondary_startup_64+0xa4/0xb0 [ 235.577061] irq event stamp: 432035 [ 235.577063] hardirqs last enabled at (432035): [] _raw_spin_unlock_irqrestore+0x34/0x40 [ 235.577064] hardirqs last disabled at (432034): [] _raw_spin_lock_irqsave+0x63/0x80 [ 235.577066] softirqs last enabled at (431998): [] inet6_fill_ifla6_attrs+0x3f1/0x430 [ 235.577067] softirqs last disabled at (431996): [] inet6_fill_ifla6_attrs+0x3cf/0x430 [ 235.577068] [ 235.577068] other info that might help us debug this: [ 235.577069] Possible unsafe locking scenario: [ 235.577069] [ 235.577070] CPU0 [ 235.577070] ---- [ 235.577071] lock(&ab->base_lock); [ 235.577072] [ 235.577073] lock(&ab->base_lock); [ 235.577074] [ 235.577074] *** DEADLOCK *** [ 235.577074] [ 235.577075] 3 locks held by kworker/u16:1/98: [ 235.577076] #0: ffff9655f75b1d48 ((wq_completion)ath11k_qmi_driver_event){+.+.}-{0:0}, at: process_one_work+0x1d3/0x5d0 [ 235.577079] #1: ffffa33cc02f3e70 ((work_completion)(&ab->qmi.event_work)){+.+.}-{0:0}, at: process_one_work+0x1d3/0x5d0 [ 235.577081] #2: ffff9655f75cad50 (&ab->core_lock){+.+.}-{3:3}, at: ath11k_core_qmi_firmware_ready.part.0+0x4e/0x160 [ath11k] [ 235.577087] [ 235.577087] stack backtrace: [ 235.577088] CPU: 3 PID: 98 Comm: kworker/u16:1 Not tainted 5.9.0-rc5-wt-ath+ #196 [ 235.577089] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0049.2018.0801.1601 08/01/2018 [ 235.577095] Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work [ath11k] [ 235.577096] Call Trace: [ 235.577100] dump_stack+0x77/0xa0 [ 235.577102] mark_lock_irq.cold+0x15/0x3c [ 235.577104] mark_lock+0x1d7/0x540 [ 235.577105] mark_usage+0xc7/0x140 [ 235.577107] __lock_acquire+0x219/0x6e0 [ 235.577108] ? sched_clock_cpu+0xc/0xb0 [ 235.577110] lock_acquire+0xb6/0x270 [ 235.577116] ? ath11k_regd_update+0x28/0x1d0 [ath11k] [ 235.577118] ? atomic_notifier_chain_register+0x2d/0x40 [ 235.577120] _raw_spin_lock+0x2c/0x70 [ 235.577125] ? ath11k_regd_update+0x28/0x1d0 [ath11k] [ 235.577130] ath11k_regd_update+0x28/0x1d0 [ath11k] [ 235.577136] __ath11k_mac_register+0x3fb/0x480 [ath11k] [ 235.577141] ath11k_mac_register+0x119/0x180 [ath11k] [ 235.577146] ath11k_core_pdev_create+0x17/0xe0 [ath11k] [ 235.577150] ath11k_core_qmi_firmware_ready.part.0+0x65/0x160 [ath11k] [ 235.577155] ath11k_qmi_driver_event_work+0x1c5/0x230 [ath11k] [ 235.577158] process_one_work+0x265/0x5d0 [ 235.577160] worker_thread+0x49/0x300 [ 235.577161] ? process_one_work+0x5d0/0x5d0 [ 235.577163] kthread+0x135/0x150 [ 235.577164] ? kthread_create_worker_on_cpu+0x60/0x60 [ 235.577166] ret_from_fork+0x22/0x30 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601399736-3210-7-git-send-email-kvalo@codeaurora.org commit 3f6e6c3291ed9ebf459b76666c7c6e379de3278e Author: Kalle Valo Date: Tue Sep 29 20:15:33 2020 +0300 ath11k: disable monitor mode on QCA6390 QCA6390 does not support monitor mode at the moment so disable it altogether, using a hack as mac80211 does not support disabling it otherwise. Add a boolean to hw_params to know if hardware supports monitor mode. IPQ8074 continues to support monitor mode normally. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601399736-3210-6-git-send-email-kvalo@codeaurora.org commit 18ac1665e78575a5148b2bd2c90749c2bcbf135a Author: Kalle Valo Date: Tue Sep 29 20:15:32 2020 +0300 ath11k: pci: check TCSR_SOC_HW_VERSION There are different versions of QCA6390. Check TCSR_SOC_HW_VERSION to make sure that the device is hw2.0, all the rest are unsupported. This needs to be checked after ath11k_pci_claim() so move the whole switch choosing hw_ver. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601399736-3210-5-git-send-email-kvalo@codeaurora.org commit 2626c269702e04bdcaaeac62ac8089281520b5ce Author: Kalle Valo Date: Tue Sep 29 20:15:31 2020 +0300 ath11k: add interface_modes to hw_params As QCA6390 does not support mesh interfaces, move the interface_modes to hw_params. Also create interface combinations dynamically so that it's easy to change the values. Now QCA6390 does not claim to support mesh interfaces to user space, but IPQ8074 continues to do that. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601399736-3210-4-git-send-email-kvalo@codeaurora.org commit b09199248905568ef8a263bcee3306c2b95ea36b Author: Carl Huang Date: Tue Sep 29 20:15:30 2020 +0300 ath11k: fix AP mode for QCA6390 For QCA6390, station vdev needs to delay startup but not for AP mode. On AP mode vdev starts up immediately after bss peer is created in chanctx assignment context. This patch does not affect IPQ8074 family of devices. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601399736-3210-3-git-send-email-kvalo@codeaurora.org commit 616c16a4b26a9f136cf8a1ad0b8c4d03a72d4328 Author: Ben Greear Date: Tue Sep 29 20:15:29 2020 +0300 ath11k: support loading ELF board files The QCA6390 board I have, model 8291M-PR comes with an ELF board file. To get this to at least somewhat work, I renamed bdwlan.e04 to 'board.bin' and then added this patch to check for ELF magic string in the beginning of the file. If that is found, use type ELF. After this the driver loads. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Ben Greear [kvalo@codeaurora.org: use elf.h, minor cleanup] Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601399736-3210-2-git-send-email-kvalo@codeaurora.org commit 476c1d3c2e61648ff675f175875740d84e4fa691 Author: Alex Dewar Date: Sun Sep 27 14:24:50 2020 +0100 ath11k: Correctly check errors for calls to debugfs_create_dir() debugfs_create_dir() returns an ERR_PTR in case of error, but never a null pointer. There are a number of places where error-checking code can accordingly be simplified. Addresses-Coverity: CID 1497150: Memory - illegal accesses (USE_AFTER_FREE) Addresses-Coverity: CID 1497158: Memory - illegal accesses (USE_AFTER_FREE) Addresses-Coverity: CID 1497160: Memory - illegal accesses (USE_AFTER_FREE) Signed-off-by: Alex Dewar Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200927132451.585473-1-alex.dewar90@gmail.com commit cb2fce94c84e2c2798dca45aa00d1e03294fab95 Author: Kuninori Morimoto Date: Thu Oct 1 10:32:48 2020 +0900 ASoC: soc-pcm: ignore un-needed mutex_unlock() case on soc_pcm_open() commit 140a4532cdb8c ("ASoC: soc-pcm: add soc_pcm_clean() and call it from soc_pcm_open/close()") switch to call soc_pcm_clean() on soc_pcm_open() when rollback case. But, it uses "goto err" (A) *before* mutex_lock() (B) when error of snd_soc_pcm_component_pm_runtime_get(). The mutex_unlock() (C) is not needed in such case. This patch fix it. static int soc_pcm_open(...) { ... ret = snd_soc_pcm_component_pm_runtime_get(rtd, substream); if (ret < 0) (A) goto err; (B) mutex_lock_nested(...); ... err: (C) mutex_unlock(..); ... } Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0waag44.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 27f41dfebf226c74691b4b30527459417b6510e8 Author: Qinglang Miao Date: Tue Sep 29 19:29:39 2020 +0800 ASoC: tegra: trimslice.c: use devm_snd_soc_register_card() Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200929112939.47661-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown commit 1047bcac2169a05575476774bfd4a88f0a9c787d Author: Qinglang Miao Date: Tue Sep 29 19:29:32 2020 +0800 ASoC: fsl: mx27vis-aic32x4: use devm_snd_soc_register_card() Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200929112932.46926-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown commit c859926abc8ebc0562a16a12b4993eab690c2281 Author: Qinglang Miao Date: Tue Sep 29 19:29:36 2020 +0800 ASoC: tegra: tegra_rt5640: use devm_snd_soc_register_card() Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200929112936.47441-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown commit 31e1fc4f11e2ede512221eba9e7291ab19ec66da Author: Zhang Qilong Date: Tue Sep 22 09:51:23 2020 +0800 ASoC: ti: omap-mcbsp: use devm_platform_ioremap_resource_byname Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20200922015123.117489-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown commit 1b59b995774a086ea74e740b2dd38bba6d3d6664 Author: Qinglang Miao Date: Tue Sep 29 19:29:38 2020 +0800 ASoC: tegra: tegra_wm8753: use devm_snd_soc_register_card() Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200929112938.47599-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown commit f8eeca97f71c92e12a2381708d5908716257028d Author: Qinglang Miao Date: Tue Sep 29 19:29:35 2020 +0800 ASoC: tegra: tegra_max98090: use devm_snd_soc_register_card() Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200929112935.47035-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown commit bc772a46125f344ffabd7596c5b6b8c6ef703ea0 Author: Qinglang Miao Date: Tue Sep 29 19:29:30 2020 +0800 ASoC: fsl: imx-mc13783: use devm_snd_soc_register_card() Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200929112930.46848-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown commit cd19836a6cea7038fe50c4824629cc7a4418381c Author: Kalle Valo Date: Tue Sep 29 11:46:00 2020 +0300 ath11k: mac: fix parenthesis alignment Commit 6aea26ce5a4c ("mac80211: rework tx encapsulation offload API") introduced a new checkpatch warning: drivers/net/wireless/ath/ath11k/mac.c:4354: Alignment should match open parenthesis Fix that. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601369160-1252-1-git-send-email-kvalo@codeaurora.org commit 87d5034d0758d4490c6524445774d89e318a6383 Merge: f2e834694b0d9 ff7ea04ad579c Author: David S. Miller Date: Thu Oct 1 12:24:52 2020 -0700 Merge tag 'mlx5-updates-2020-09-30' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-09-30 Updates and cleanups for mlx5 driver: 1) From Ariel, Dan Carpenter and Gostavo, Fixes to the previous mlx5 Connection track series. 2) From Yevgeny, trivial cleanups for Software steering 3) From Hamdan, Support for Flow source hint in software steering and E-Switch 4) From Parav and Sunil, Small and trivial E-Switch updates and cleanups in preparation for mlx5 Sub-functions support ==================== Signed-off-by: David S. Miller commit 855f69fc05a18164f138b221c770961769c266de Merge: 44492e70adc80 870f39bc9deb0 Author: Kalle Valo Date: Thu Oct 1 22:22:47 2020 +0300 Merge tag 'iwlwifi-next-for-kalle-2020-09-30-2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next iwlwifi patches intended for v5.10 * Protected TWT implementation; * Support disabling 5.8GHz channels via ACPI; * Support VHT extended NSS capability; * A few fixes in the datapath; * Enable TWT by default; * Support new PPAG FW command version * Move some trans code around for better abstraction; * Some clean-ups in the ACPI code; * A fix for AP mode; * Updates in the ACPI code to support new tables and FW versions; * FTM updates; * A bit of reorganiztion in the queue code; * A few debugging infra improvements; * Add support for new GTK rekeying; * A fix in the scanning code; * Support for some new cards; * Some updates for new or changed FW APIs; * Some new FW API command version implementations; * Some other small fixes and clean-ups; # gpg: Signature made Thu 01 Oct 2020 10:04:00 PM EEST using RSA key ID 1A3CC5FA # gpg: Good signature from "Luciano Roth Coelho (Luca) " # gpg: aka "Luciano Roth Coelho (Intel) " commit edb899841c4e4c52cd78257029929bd9c6ab011d Author: Dave Airlie Date: Thu Oct 1 14:20:12 2020 +1000 drm/vmwgfx: fix regression in thp code due to ttm init refactor. When I refactored this code with the new init paths, I failed to set the funcs back up properly, this caused a failure to bringup gdm properly. Fixes: 252f8d7b9174 ("drm/vmwgfx/ttm: convert vram mm init to new code paths") Signed-off-by: Dave Airlie Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201001042012.13114-1-airlied@gmail.com commit 61931c0ee9cf5da575996b977a2358b598ef84bb Author: Mike Snitzer Date: Thu Oct 1 15:00:56 2020 -0400 dm: export dm_copy_name_and_uuid Allow DM targets to access the configured name and uuid. Also, bump DM ioctl version. Signed-off-by: Mike Snitzer commit 0cede372ce6a8adf4d4d28fe7edd2aa913804595 Author: Mike Snitzer Date: Wed Sep 30 15:12:04 2020 -0400 dm: fix comment in __dm_suspend() Fix stale references to functions that have been renamed and fix typo. Signed-off-by: Mike Snitzer commit b2abdb1b4b9eaffc4f41aa466ce77c2d91bb23df Author: Mike Snitzer Date: Wed Sep 30 13:45:20 2020 -0400 dm: fold dm_process_bio() into dm_submit_bio() dm_process_bio() is only called by dm_submit_bio(), there is no benefit to keeping dm_process_bio() factored out, so fold it. While at it, cleanup dm_submit_bio()'s DMF_BLOCK_IO_FOR_SUSPEND related branching and expand scope of dm_get_live_table() rcu reference on map via common 'out' label to dm_put_live_table(). Signed-off-by: Mike Snitzer commit 870f39bc9deb07024ed5afccdb03f91c6c104d4e Author: Luca Coelho Date: Wed Sep 30 19:19:59 2020 +0300 iwlwifi: bump FW API to 57 for AX devices Start supporting API version 57 for AX devices. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930191738.f8660d41f62b.Iac1d5b3186e22956cfd000fd9dc5886a79617b78@changeid Signed-off-by: Luca Coelho commit 16b2afe07ace36b3e02f87e4d31918214c2ddcde Author: Mordechay Goodstein Date: Wed Sep 30 19:19:58 2020 +0300 iwlwifi: yoyo: add support for internal buffer allocation in D3 With yoyo a user can configure the internal buffer allocation in SMEM to hold more log space, which is used for debugging D3 state. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930191738.29b61ff6c78e.I235614bb2c255ee8ac49c2835796ac95a25215bf@changeid Signed-off-by: Luca Coelho commit eb95a26c11a1656dc5049d068e54103168eb0a68 Author: Johannes Berg Date: Wed Sep 30 19:19:57 2020 +0300 iwlwifi: api: fix u32 -> __le32 Even if we don't currently use this value, the firmware is putting whatever it's putting there as __le32, so fix that. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930191738.4207116e9c7a.I6d9aa1371f9a8b4e5565236d23255b5c05c70bb3@changeid Signed-off-by: Luca Coelho commit b4248c08f743b0db989a93b0954b08710e50d6d4 Author: Andrei Otcheretianski Date: Wed Sep 30 19:19:56 2020 +0300 iwlwifi: use correct group for alive notification Alive notification belongs to LEGACY_GROUP. Fix it. Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930191738.b56248653e12.I0a15c61aa1f1b4e91aa83ec5eb082337da4e9547@changeid Signed-off-by: Luca Coelho commit 9422b978355e569c2791b67f78274668102eb750 Author: Luca Coelho Date: Wed Sep 30 19:19:55 2020 +0300 iwlwifi: support version 5 of the alive notification Add support for the new version of the alive notification, which includes the SKU ID. We don't use the SKU ID yet, so we can just handle the new notification as if it were version 4. While at it, clean up a bit and rename the command and structure names in the comments so that they are aligned with the ones used in the FW. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930191738.6024b149e9e2.Ifcadb506e994ec352e9ce54399719926bc1bb7ee@changeid Signed-off-by: Luca Coelho commit 3ac13d56ec8c2bf4886dd96b734294493de12210 Author: Avraham Stern Date: Wed Sep 30 19:19:54 2020 +0300 iwlwifi: mvm: ignore the scan duration parameter The scan request may specify the request scan dwell time. However, this value may not always be optimal (e.g. short dwell time for a passive channel). This may happen in a scan request as a result of beacon report request, in which the AP may request an active scan, thus setting a short dwell time, but the station will perform a passive scan due to regulatory. Ignore the scan duration parameter and always use the internal scan dwell time which should be optimal. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930191738.6e1d2b8b4489.I9584bb40d44bf31131f57fdd32d5e8848d4fbdd8@changeid Signed-off-by: Luca Coelho commit 4bf3d7cfea3cca7a124ed4615b38da299939c47a Author: Mordechay Goodstein Date: Wed Sep 30 19:19:53 2020 +0300 iwlwifi: dbg: add debug host notification (DHN) time point This enables to listen only to DHN time point without monitoring every rx packet from FW. Also fix a typo NOTIFOCATION->NOTIFICATION in enum declaration. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930191738.435fa657a937.I1a36badd4ceecefcdfb47eaacf26c08a4bbd1b08@changeid Signed-off-by: Luca Coelho commit 0179bfff9780ae51d76b9e101a6d80205ce7b413 Author: Mordechay Goodstein Date: Wed Sep 30 19:19:52 2020 +0300 iwlwifi: pcie: make iwl_pcie_txq_update_byte_cnt_tbl bus independent To avoid duplicating code we need to call iwl_pcie_txq_update_byte_cnt_tbl function from non bus independent code so make it bus independent. Used spatch rule @r1@ struct iwl_trans_pcie *trans_pcie; @@ ( -trans_pcie->scd_bc_tbls +trans->txqs.scd_bc_tbls | -iwl_pcie_txq_update_byte_cnt_tbl +iwl_txq_gen1_update_byte_cnt_tbl | -iwl_pcie_txq_inval_byte_cnt_tbl +iwl_txq_gen1_inval_byte_cnt_tbl | -iwl_pcie_tfd_unmap +iwl_txq_gen1_tfd_unmap | -iwl_pcie_tfd_tb_get_addr +iwl_txq_gen1_tfd_tb_get_addr | -iwl_pcie_tfd_tb_get_len +iwl_txq_gen1_tfd_tb_get_len | -iwl_pcie_tfd_get_num_tbs +iwl_txq_gen1_tfd_get_num_tbs ) /* clean all new unused variables */ @ depends on r1@ type T; identifier i; expression E; @@ - T i = E; ... when != i Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930191738.8d33e791ec8c.Ica35125ed640aa3aa1ecc38fb5e8f1600caa8df6@changeid Signed-off-by: Luca Coelho commit 20e671998cf39e015ac9271df2cc13878ba53768 Author: Ayala Beker Date: Wed Sep 30 19:19:51 2020 +0300 iwlwifi: mvm: clear all scan UIDs In case of nic restart flow is called in the middle of scan abort flow, aborted scan UIDs might not be cleared. Fix it and clean these UIDs as well. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930191738.71aacc1a0358.Ie53f7ab07b42e6a5223f33e201b0f862ebda8986@changeid Signed-off-by: Luca Coelho commit bc68163ccd7d347e7e90f3e614225a156723338c Author: Johannes Berg Date: Wed Sep 30 19:19:50 2020 +0300 iwlwifi: mvm: d3: parse wowlan status version 11 The firmware is being updated to report version 11 of this response in order to include BIGTK material. Parse it, but for now keep the existing behaviour of disconnecting on any rekeying with even IGTK presence, need to fix that before BIGTK can be supported. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930191738.b7098f097a5c.I4ae1c5b2186b0e04702233a7a7068d69cfd3361a@changeid Signed-off-by: Luca Coelho commit e365e7de63e5b612d94fb433e38d9414de811f7d Author: Johannes Berg Date: Wed Sep 30 19:19:49 2020 +0300 iwlwifi: align RX status flags with firmware There are some bits declared here that simply don't exist in the firmware, and some are missing (e.g. the key) from what the firmware has. Align this and move all the fields into a single one for this status word, which makes this a bit easier. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930191738.0ba403d72e7c.I5fa3aa0538f3fbf8c3885b27a1204b5b0464c20a@changeid Signed-off-by: Luca Coelho commit abd16a58a011541d9f4e0acf426e9c4e17f6be04 Author: Luca Coelho Date: Wed Sep 30 19:19:48 2020 +0300 iwlwifi: mvm: remove redundant log in iwl_mvm_tvqm_enable_txq() We are printing the same thing twice, "Enabling TXQ #%d". Previously the second print was including more information, but now it only prints the queue number, which is already in the first print. Remove the redundant one. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930191738.1c22d1bc0a88.I24e57317bdddc6c72f69725e1d95683a935e893d@changeid Signed-off-by: Luca Coelho commit a86821069e87755d8f0f98a9bc3e848098dd28e8 Author: Mordechay Goodstein Date: Wed Sep 30 16:31:23 2020 +0300 iwlwifi: phy-ctxt: add new API VER 3 for phy context cmd The API added the ability to send for CDB nic what LMAC ID the cmd belongs to. Also driver always set apply_time to zero so no need to pass it as a param and anyway in new API it's removed for no use. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930161256.fa11d1f523b6.Id105899da82c2b08ee62b57133c4ff72bfd0bb80@changeid Signed-off-by: Luca Coelho commit 762c523f95b8fbdcd53a2652c5857ce430d27a90 Author: Gil Adam Date: Wed Sep 30 16:31:22 2020 +0300 iwlwifi: thermal: support new temperature measurement API New API for temperature measurement (DTS_MEASUREMENT_TRIGGER) involves getting an immediate response from FW, and not waiting for a notification like in previous APIs. Support new API while keeping backwards compatibility. Signed-off-by: Gil Adam Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930161256.b4893554d8e7.Ia4d7f389d4ac3256fcfe3ce6144e924dd6dbf6eb@changeid Signed-off-by: Luca Coelho commit 42f8a2735cc218b6b372134684d4cd3c1423f123 Author: Mordechay Goodstein Date: Wed Sep 30 16:31:21 2020 +0300 iwlwifi: dbg: run init_cfg function once per driver load Every time we call init_cfg driver appends the enabled triggers to the active triggers while this should be done only once per driver load. Signed-off-by: Mordechay Goodstein Fixes: 14124b25780d ("iwlwifi: dbg_ini: implement monitor allocation flow") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930161256.79bd622e604a.Ie0f79d2ea90ca5cdf363f56194ead81b0a2c6202@changeid Signed-off-by: Luca Coelho commit 19d9fa7ab9f37a76d95f4b7a92f57703f1bd1851 Author: Sara Sharon Date: Wed Sep 30 16:31:20 2020 +0300 iwlwifi: mvm: add d3 prints This is long overdue - add a special WOWLAN flag, and D3 prints. It will ease debug and enable test automation. Use a new flag, instead of one that currently isn't used. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930161256.2704e4c384c9.Ib738ffa2bc6ce635a855944a71a01fd6b82929a4@changeid Signed-off-by: Luca Coelho commit bfdb157127dab2a85d4096a68a00ad568c9eb590 Author: Mordechay Goodstein Date: Wed Sep 30 16:31:19 2020 +0300 iwlwifi: dbg: remove no filter condition Currently if group-id and command-id values are zero we trigger and collect every RX frame, this is not the right behavior and zero value should be handled like any other filter. Signed-off-by: Mordechay Goodstein Fixes: 3ed34fbf9d3b ("iwlwifi: dbg_ini: support FW response/notification region type") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930161256.6a0aae2c0507.I7bd72968279d586af420472707d53106b35efc08@changeid Signed-off-by: Luca Coelho commit c7f996eb894ed403e8e158cb478bc27454513f05 Author: Johannes Berg Date: Wed Sep 30 16:31:18 2020 +0300 iwlwifi: mvm: d3: support GCMP ciphers We really should support GCMP ciphers (both sizes) since all the handling is identical to CCMP, except for the one case where the key material is copied. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930161256.ec44673fae83.I8a9232600b99e27213eb9ea69bf46e8d25d7f260@changeid Signed-off-by: Luca Coelho commit 2a42aea795310263ec003efeda1faaa0ced5c33e Author: Nathan Errera Date: Wed Sep 30 16:31:17 2020 +0300 iwlwifi: mvm: support more GTK rekeying algorithms add and use new API version for GTK rekeying. This will allow our firmware to do GTK rekeying for more algorithms (GCMP 128, GCMP 256, SAE). Signed-off-by: Nathan Errera Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930161256.be16c51fef3c.If4fac0fbc5bede4679b5f875b60c4e9a6ea7ca7c@changeid Signed-off-by: Luca Coelho commit 0cd1ad2d7fd41e0de4969fd1dd0aa846c99830d1 Author: Mordechay Goodstein Date: Wed Sep 30 16:31:16 2020 +0300 iwlwifi: move all bus-independent TX functions to common code After moving out all Tx fields not related to pcie-bus it's time to move the code to a common place. We also rename all pcie functions name to txq. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930161256.3947a5276003.I3fe1bec2b25a965a49532df288f47b8b59eb1500@changeid Signed-off-by: Luca Coelho commit 0739a7d70e0036224022bf0495445e62afe3e544 Author: Avraham Stern Date: Wed Sep 30 16:31:15 2020 +0300 iwlwifi: mvm: initiator: add option for adding a PASN responder Add an option for adding a PASN responder, specifying the HLTK and TK (if not associated). When a receiving a range request for a PASN responder, the driver will ask for a secured measurement with the specified HLTK and TK. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930161256.28c5f5266000.I2d58b72ff92c47ac33a6aacc27fbf3790b6dfc51@changeid Signed-off-by: Luca Coelho commit 68ad24742f174735d24dc5b60653c80140d249b4 Author: Avraham Stern Date: Wed Sep 30 16:31:14 2020 +0300 iwlwifi: mvm: responder: allow to set only the HLTK for an associated station For secure ranging with an associated station, the driver only needs to set the HLTK. There is no need to add an internal station for PMF since the FW will use the existing station which already has the TK installed. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930161256.fcebaa5c9bc8.Ic584cc47fee717d0bdb43965798dbdf45d89910a@changeid Signed-off-by: Luca Coelho commit 890d814b1837a7f7d38261f84cd7af160c1ffe98 Author: Avraham Stern Date: Wed Sep 30 16:31:13 2020 +0300 iwlwifi: mvm: location: set the HLTK when PASN station is added When a PASN station is added, set the HLTK to FW. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930161256.1c7a59fd3164.I68005f0015ad04e53d0239e2d2ee85d5ffdeaa37@changeid Signed-off-by: Luca Coelho commit b68bd2e3143adbcbc7afd2bc4974c1b988b87211 Author: Ilan Peer Date: Wed Sep 30 16:31:12 2020 +0300 iwlwifi: mvm: Add FTM initiator RTT smoothing logic The overcome instabilities in the RTT results add smoothing logic to the reported results. In short, the smoothing logic tracks the RTT average of each responder for a period of time, and in case a new RTT results is found to be a spur, the tracked RTT average is reported instead of the current RTT measurement. Smooth logic debug configuration using iwl-dbg-cfg.ini: - MVM_FTM_INITIATOR_ENABLE_SMOOTH: Set to 1 to enable smoothing logic (default=0). - MVM_FTM_INITIATOR_SMOOTH_ALPHA: A value between 0 - 100, defining the weight of the current RTT results vs. the RTT average tracked based on the previous results. A value of 100 means use only the current RTT results. - MVM_FTM_INITIATOR_SMOOTH_AGE_SEC: The maximal time in seconds in which the RTT average tracked based on previous results is considered valid. - MVM_FTM_INITIATOR_SMOOTH_UNDERSHOOT: if the current RTT is positive and below the RTT average by at least this value, report the average RTT instead of the current one. In units of picoseconds. - MVM_FTM_INITIATOR_SMOOTH_OVERSHOOT: if the current RTT is positive and above the RTT average by at least this value, report the average RTT instead of the current one. In units of picoseconds. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930161256.48a9cec2081b.Iaec1e29f738232adfe9e2ea8e9eb9b6ff0323ae1@changeid Signed-off-by: Luca Coelho commit 3830a01c3bfac0c037d68fa0ce22d6f9e3ed2336 Author: Avraham Stern Date: Mon Sep 28 12:23:21 2020 +0300 iwlwifi: mvm: add support for responder dynamic config command version 3 Version 3 of the dynamic config command adds support for configuring the HLTK for secure ranging with a station. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928121852.f54be85420dd.I39b498fbbbc2f6eed6ce1f77b0f59f7a72fab343@changeid Signed-off-by: Luca Coelho commit 1c096d8935c1d65c26febb80cc5bf06b0bc6a2b5 Author: Avraham Stern Date: Mon Sep 28 12:23:20 2020 +0300 iwlwifi: mvm: add support for range request command ver 11 Version 11 of the range request command adds support for setting the PN for secure ranging. For now, this is not yet supported. The same functions that are used for version 9 and 10 are also used for version 11 as the common part is the same. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928121852.6f9ed4140e8c.I046e0d9f6dfaafda9794e5eb2ee1f02fcad2851a@changeid Signed-off-by: Luca Coelho commit 0a8159cbd11abf586693f1ec5264d0df587b71d8 Author: Mordechay Goodstein Date: Mon Sep 28 12:23:19 2020 +0300 iwlwifi: remove wide_cmd_header field Driver doesn't support fw without wide_cmd so driver always sets it to true. instead of setting it always to true just remove the field. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928121852.e6137861d917.I93405604eb503568688b28d3169fea7fbb88ed7e@changeid Signed-off-by: Luca Coelho commit e80bfd117d89e8f9d71893edc03bc7b3c6c1eea3 Author: Mordechay Goodstein Date: Mon Sep 28 12:23:18 2020 +0300 iwlwifi: fw: add default value for iwl_fw_lookup_cmd_ver For new APIs this avoids checking every return if it's IWL_FW_CMD_VER_UNKNOWN (99) or it's lower than the new API value Done with spatch: -iwl_fw_lookup_cmd_ver(E1, E2, E3) +iwl_fw_lookup_cmd_ver(E1, E2, E3, IWL_FW_CMD_VER_UNKNOWN) Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928121852.70bec6eb8008.I6ea78553801d33f7ed10fcd2e4be4ba781fe469a@changeid Signed-off-by: Luca Coelho commit 4795983b870420d165e93d2111e3d1c0fef135f6 Author: Mordechay Goodstein Date: Mon Sep 28 12:23:17 2020 +0300 iwlwifi: acpi: in non acpi compilations remove iwl_sar_geo_init In non acpi compilations iwl_sar_geo_init isn't called which results with compilation warning so just remove the declaration. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928121852.3de51c557566.I67a0eedddbd56e51eb5150c65756eb5724b65e69@changeid Signed-off-by: Luca Coelho commit 507a13f5c9c9bc93813d1ef6985bdccf1e1b82e2 Author: Mordechay Goodstein Date: Mon Sep 28 12:23:16 2020 +0300 iwlwifi: rs: set RTS protection for all non legacy rates This helps with congested environments reducing the conflict cost to RTS retries only, instead of the entire BA packet. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928121852.da97d87d7adf.If06301d4660b14e459195a15831b069b9f6c5e3c@changeid Signed-off-by: Luca Coelho commit 9e3c39361a309b4fb49bf1b20d47ab4d6b6c84b7 Author: Nathan Errera Date: Mon Sep 28 12:23:15 2020 +0300 iwlwifi: mvm: support new KEK KCK api Add a new version to iwl_wowlan_kek_kck_material_cmd struct to support akm and send the new cmd if supported. Signed-off-by: Nathan Errera Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928121852.6ec5889d793d.I32ad41a27f046a4047cf852c83936142fca4f20b@changeid Signed-off-by: Luca Coelho commit 0ea788ed0f3b0fb1f0e883abf8afb5c94f586219 Author: Luca Coelho Date: Mon Sep 28 12:23:14 2020 +0300 iwlwifi: support version 3 of GEO_TX_POWER_LIMIT Add support for the new version of the GEO_TX_POWER_LIMIT command. This new version includes UHB values in the table, but for now, since we don't have the ACPI values yet, we support the API, but don't set the extra values. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928121852.3700197ed1ed.Ia53fb9c4b5033683fd426d51a0ddc46fb444c805@changeid Signed-off-by: Luca Coelho commit dd2a1256e6a8d8162314ee5213cee8a163002c9a Author: Luca Coelho Date: Mon Sep 28 12:23:13 2020 +0300 iwlwifi: acpi: rename geo structs to contain versioning Add the version number to the iwl_geo_tx_power_profile_cmd structs and move the union into a common place. Additionally, reuse the code that sets elements that are at the same place in the struct across different versions. While at it remove an unused variable, add a comment and move the v2 specific element setting to inside the if statement. Additionally, invert the if for slightly more readability. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928121852.23ec241f16cd.I8cd21fc5a2498e820b50e1f49a4cbfe545afe30e@changeid Signed-off-by: Luca Coelho commit fbb7957d28ac897b9dcd29f96750c23543118258 Author: Luca Coelho Date: Mon Sep 28 12:23:12 2020 +0300 iwlwifi: support REDUCE_TX_POWER_CMD version 6 The new version of the command can support more subbands and CDB, so it can contain more data than earlier versions. Implement support for the new version of the command, even though we don't have more data to write to it yet. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928121852.d709a8f17d1d.I9fa54883667c72dabf6d813c70be77538d9af38d@changeid Signed-off-by: Luca Coelho commit 9c08cef87048bcec5d37579f6ba9b166196fc661 Author: Luca Coelho Date: Mon Sep 28 12:23:11 2020 +0300 iwlwifi: acpi: prepare SAR profile selection code for multiple sizes The SAR profile tables will be larger in the next version, so prepare the iwl_sar_select_profile() function to handle multiple sizes and update the relevant callers. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928121852.da5a95917df4.I84d44c9dd0b858c403a81ca621b5a7b615a3aa7e@changeid Signed-off-by: Luca Coelho commit 216cdfb5225fba6632778b6116f192b60fe795ff Author: Luca Coelho Date: Mon Sep 28 12:23:10 2020 +0300 iwlwifi: add a common struct for all iwl_tx_power_cmd versions Create a common structure to contain all different versions of the tx_power_cmd instead of making a union of the different structs everywhere we need them. Also move the common part of these structs into a separate structure (instead of reusing v3) and leave the per_chain_restriction part out of the common part, because this will change in version 6 of the command (which will be added soon). While at it, rename per_chain_restriction to per_chain to shorten it. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928121852.4f0bea9fe077.Ib3b540a8288af32d6fa213448e13f82763f85bc9@changeid Signed-off-by: Luca Coelho commit 38cb52dd4e8643fffd288f173fbb8a3fad50d09d Author: Roee Goldfiner Date: Sat Sep 26 00:30:53 2020 +0300 iwlwifi: add new card for MA family added ID for ma in AX family. Signed-off-by: Roee Goldfiner Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.8cf7040fe88c.I39ef960a4d448b7d303c2bbfcccded09a54479b0@changeid Signed-off-by: Luca Coelho commit f961e9fc35cc69ab5bbdb2e6b4d06c30857325d5 Author: Luca Coelho Date: Sat Sep 26 00:30:52 2020 +0300 iwlwifi: acpi: remove dummy definition of iwl_sar_set_profile() This function is only called from acpi.c, which is only included in the makefile if CONFIG_ACPI is set. So it doesn't make sense to declare a dummy version of it when CONFIG_ACPI is not defined. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.1833ae348c7f.I3271f9d2f7e484779a6319a1514cd0b7221fe326@changeid Signed-off-by: Luca Coelho commit f604324eefec171aef147e77ddbe581f6cbb1ca3 Author: Luca Coelho Date: Sat Sep 26 00:30:51 2020 +0300 iwlwifi: remove iwl_validate_sar_geo_profile() export Only iwlmvm uses this function and it's so simple that it's clearer if it's spelled out in the code anyway, so remove it and add the check where needed. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.9e2f296f5cfc.I4b2c025768b5ceff93a80ba0ae9ee7784d6d7402@changeid Signed-off-by: Luca Coelho commit 59ca9572dee98f6a6dc52ce65d63ad466af81adc Author: Johannes Berg Date: Sat Sep 26 00:30:50 2020 +0300 iwlwifi: mvm: use CHECKSUM_COMPLETE On newer hardware, we have the full checksum, so use it to report CHECKSUM_COMPLETE and avoid the protocol specific hardware parsing. Note that the hardware already parses/removes the SNAP header, so we actually literally get what we need to report to the stack, as we're expected to checksum everything after the L2 header (which is translated/added by mac80211). Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.869e829c815d.I70f374865b0acafc675a8d7959912eeaeb595acf@changeid Signed-off-by: Luca Coelho commit cfa5d0ca0f6127e88493f60772d7799166ed69e9 Author: Mordechay Goodstein Date: Sat Sep 26 00:30:49 2020 +0300 iwlwifi: mvm: remove redundant support_umac_log field Currently we have the same info in two variables, If umac_error_event_table is 0, we know that UMAC log is not supported, so we don't need the support_umac_log field. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.299959eeb47b.Ie1f3eecc06e3620098dda74f674f6409b90fe7fa@changeid Signed-off-by: Luca Coelho commit ee3ae3a18a74cdca6a001fb200d8951933299a9d Author: Dan Halperin Date: Sat Sep 26 00:30:48 2020 +0300 iwlwifi: mvm: add support for new WOWLAN_TSC_RSC_PARAM version - Change the iwl_all_tsc_rsc struct to hold a sta_id (__le32) field, while preserving the union, used in the older version. - Adjust the use of this command according to the TLV. Signed-off-by: Dan Halperin Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.8c621903db59.I1cc7afedc0ff2009fe1abf007684339f299b73aa@changeid Signed-off-by: Luca Coelho commit 090a5d7c8b195ee1eaa66f0420b8a4974eb5f082 Author: Luca Coelho Date: Sat Sep 26 00:30:47 2020 +0300 iwlwifi: don't export acpi functions unnecessarily A couple of functions were exported from the acpi.c file unnecessarily, since they are only used internally in that file. Make them static. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.6449efabcb8b.I030fa71253260f34b588951d78170551b633c046@changeid Signed-off-by: Luca Coelho commit 2b3eb122342c72ee18cb26b0a28f7a66612f7992 Author: Naftali Goldstein Date: Sat Sep 26 00:30:46 2020 +0300 iwlwifi: mvm: process ba-notifications also when sta rcu is invalid The the driver prevents new Tx from being sent during the remove-station flow is by invalidating the fw_id_to_mac_id rcu of that station. However, if there was any Tx still in-flight (tx-cmd was sent but the ba-notif wasn't received yet) the ba-response to those frames is simply ignored without actually reclaiming anything. This later causes the driver to think that that some of the station's queues aren't empty when in practice they are which causes errors in the station remove flow. Fix this by performing the tx-reclaim also if the rcu is invalid. any DB that can't be updated due to this is not very important at this stage since the station is about to be removed soon anyways. Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.72c604b4eda9.I21e75b31a9401870d18747355d4f4305b2fe1db8@changeid Signed-off-by: Luca Coelho commit 870bde78576c4f25fc7c85f3da8a71978fa86391 Author: Dan Halperin Date: Sat Sep 26 00:30:45 2020 +0300 iwlwifi: mvm: add support for new version of WOWLAN_TKIP_SETTING_API_S Add a sta_id (__le32) to the cmd, in order to support CDB protocol. Signed-off-by: Dan Halperin Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.5edc24ef3907.I68820c8c0946451cf0cca14dda171fa304b1dc43@changeid Signed-off-by: Luca Coelho commit a1c2ff30241340f11e16958e03c53ca373856874 Author: Andrei Otcheretianski Date: Sat Sep 26 00:30:44 2020 +0300 iwlwifi: mvm: Don't install CMAC/GMAC key in AP mode Due to a missing break, the management multicast key was installed even though we don't really support it. Fix that, so mac80211 would know that it should protect frames in software. Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.019a64e96d44.I609a995611ac5286e442cd54f764eaf4a7249ac0@changeid Signed-off-by: Luca Coelho commit 903b3f9badf1d54f77b468b96706dab679b45b14 Author: Emmanuel Grumbach Date: Wed Sep 30 10:31:20 2020 +0300 iwlwifi: mvm: split a print to avoid a WARNING in ROC A print in the remain on channel code was too long and caused a WARNING, split it. Signed-off-by: Emmanuel Grumbach Fixes: dc28e12f2125 ("iwlwifi: mvm: ROC: Extend the ROC max delay duration & limit ROC duration") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200930102759.58d57c0bdc68.Ib06008665e7bf1199c360aa92691d9c74fb84990@changeid Signed-off-by: Luca Coelho commit 22852fad9c17c64a8791a4f8060e7761f906f516 Author: Mordechay Goodstein Date: Sat Sep 26 00:30:42 2020 +0300 iwl-trans: move dev_cmd_offs, page_offs to a common trans header dev_cmd_offs, page_offs field is not directly related to the PCIe transport, so move the structures it uses to the common iwl-trans.h header. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.83b41765961f.Icd12bfb2a736ccf4cbe080973c746fb70a3c4a50@changeid Signed-off-by: Luca Coelho commit e27c506a985ca75ea0a563a30d6c2ac76709e62a Author: Gil Adam Date: Sat Sep 26 00:30:41 2020 +0300 iwlwifi: regulatory: regulatory capabilities api change Support v2 of regulatory capability flags parsed from the device NVM. New API support is determined by FW lookup of the MCC update command resposnse version, where version 6 supports the new API. Signed-off-by: Gil Adam Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.3d47f4e8ab98.I0fdd2ce23166c18284d2a7a624c40f35ea81cbc2@changeid Signed-off-by: Luca Coelho commit ba8f6f4ae2549bbe57e16a0f739e3b17bf06a441 Author: Mordechay Goodstein Date: Sat Sep 26 00:30:40 2020 +0300 iwlwifi: dbg: add dumping special device memory With the new region we can handle in user space understanding the struct type and version and driver doesn't need to be involved at all. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.88c431fad7da.I282944cbad5aa367735a9f9a5c47cfbd107a5fc0@changeid Signed-off-by: Luca Coelho commit 4c447cfadd6c24416203fb7f186f9e69374d7142 Author: Luca Coelho Date: Sat Sep 26 00:30:39 2020 +0300 iwlwifi: dbg: remove IWL_FW_INI_TIME_POINT_WDG_TIMEOUT This timepoint was removed from the FW, so we remove it from here too for consistency. It's now marked as reserved to preserve the enumeration. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200926002540.a451fdd0a0ab.Idd8f59a49816d8484fe7dea3f1cec7a36cbf86f7@changeid Signed-off-by: Luca Coelho commit f2134f66f40e3f74104562a4eb6c607601dcfa83 Author: Gil Adam Date: Thu Sep 24 16:23:39 2020 +0300 iwlwifi: acpi: support ppag table command v2 Version 2 of the PPAG table command supports more sub-bands than previous. Change relevant command structs and the reading of the ACPI tables. Signed-off-by: Gil Adam Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200924162106.fb29c33d2cb9.I942bfe645e9d47cd1fcf6435506061f8b2cea21a@changeid Signed-off-by: Luca Coelho commit bc9296f4a828bd8418908793c45f02ecab574669 Author: Ihab Zhaika Date: Thu Sep 24 16:23:38 2020 +0300 iwlwifi: add new cards for MA family add few PCI ID'S for ma with gf and mr in AX family. Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200924162105.6add94c21abe.I1aa1c5e3c2c12ce82ed30429e0ad92225ece7ce3@changeid Signed-off-by: Luca Coelho commit 8e3b79f887b9939b4a5fecef6683cbbaac418ca4 Author: Mordechay Goodstein Date: Thu Sep 24 16:23:37 2020 +0300 iwlwifi: move bc_table_dword to a common trans header The bc_table_dword code is not directly related to the PCIe transport, so move the structures it uses to the common iwl-trans.h header. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200924162105.1e3027abd0b5.Ie9f672983796586671a4374bf6dcda846875b690@changeid Signed-off-by: Luca Coelho commit 885375d0bb9ffef979e1a0e52396d25817f750af Author: Mordechay Goodstein Date: Thu Sep 24 16:23:36 2020 +0300 iwlwifi: iwl-trans: move tfd to trans layer The tfd_* code is not directly related to the PCIe transport, so move the structures it uses to the common iwl-trans.h header. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200924162105.a1a2ce2bce38.Ieada0fe087ebcc9bc84e22fc5abc9dba8914dd9f@changeid Signed-off-by: Luca Coelho commit a26014e2de3fff25a0647be40c84b9161b4962bc Author: Mordechay Goodstein Date: Thu Sep 24 16:23:35 2020 +0300 iwlwifi: move bc_pool to a common trans header The bc_pool code is not directly related to the PCIe transport, so move the structures it uses to the common iwl-trans.h header. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200924162105.f6469c62665d.Id920f1ae8f70886b66a98956a6412726d29a9481@changeid Signed-off-by: Luca Coelho commit fda1bd0d4a6b3a7de020aa329661661fc14aee7a Author: Mordechay Goodstein Date: Thu Sep 24 16:23:34 2020 +0300 iwlwifi: iwl-trans: move all txcmd init to trans alloc txcmd fields is not directly related to the PCIe transport, so move to the common iwl_trans_alloc function. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200924162105.862ef88d1ab2.Iba220a962b5d6d05c030b9275d97a89202d055dc@changeid Signed-off-by: Luca Coelho commit ccca2cb4c11813793a8cb1c145f84240f950b661 Author: Golan Ben Ami Date: Mon Sep 28 09:35:38 2020 +0300 iwlwifi: enable twt by default TWT has been disabled during stabilization and further testing of the FW code. It is now considered stable, so TWT can be enabled in the driver. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200928093526.44c9093fc632.I181fc5c80988e7ecea281c60e57a22ae7ec86716@changeid Signed-off-by: Luca Coelho commit be82ecd3a5c859dc2886cd70564634647787a9b6 Author: Avraham Stern Date: Fri Sep 11 20:44:39 2020 +0300 iwlwifi: mvm: add an option to add PASN station A FTM responder may do PASN authentication with unassociated stations to allow secure ranging. In this case, the driver will add an internal station and install the TK so the FW will accept protected FTM request frames from this station and will send a protected FTM response frame. In addition, the driver needs to configure the HLTK to the FW so the FW can derive the secure LTF bits. This is left for a later patch since it is not yet supported by the FW. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200911204056.c915b44ad7dd.I72ef7f9753964555561c27ec503241105eddb14e@changeid Signed-off-by: Luca Coelho commit 64564669e1a5d2c3202250417782b92d09c815d0 Author: Ihab Zhaika Date: Fri Sep 11 20:44:38 2020 +0300 iwlwifi: add new cards for AX201 family add few PCI ID'S for AX201 family including killer cards. Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200911204056.21397978115f.Id2d95275a36a6bb6b226d12cb6c5a629334587db@changeid Signed-off-by: Luca Coelho commit 79946ee774286c12722a3dc52de18482dc6c9c09 Author: Mordechay Goodstein Date: Fri Sep 11 20:44:37 2020 +0300 iwlwifi: fw: move assert descriptor parser to common code Move this parser to a common place, instead of having it in code that is specific to mvm. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200911204056.45b270b0bf2f.I4561138cd5be9f44fa42cfce10258de0607be40f@changeid Signed-off-by: Luca Coelho commit d14f499dd2edc5511f7f38ec8e1a48467f3077df Author: Mordechay Goodstein Date: Fri Sep 11 20:44:36 2020 +0300 iwlwifi: wowlan: adapt to wowlan status API version 10 In version 10 we actually go back to the struct size before 9 so only for version 9 we need the size fixup Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200911204056.33b55b3ca440.Ib0202c7011d8d0e09f55fcceceb9d3d5051631c6@changeid Signed-off-by: Luca Coelho commit 02d31e9b626acd9346bcd4069dcf6f54c18f53cb Author: Gil Adam Date: Fri Sep 11 20:44:35 2020 +0300 iwlwifi: acpi: evaluate dsm to disable 5.8GHz channels Evaluate the appropriate DSM from ACPI to set ETSI SRD 5.8GHz channels to passive or disabled, default behaviour is enabled. Add enums and refactor evaluation of DSM functions for better readablity and more informative debug prints. Signed-off-by: Gil Adam Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200911204056.816130ee75e0.I727a217be7c967a97960b197a816fc053d10c48a@changeid Signed-off-by: Luca Coelho commit 0cd38f4d05299f5148c60db0234ea4db862c839b Author: Mordechay Goodstein Date: Fri Sep 11 20:44:34 2020 +0300 iwlwifi: msix: limit max RX queues for 9000 family There is an issue in the HW DMA engine in the 9000 family of devices when more than 6 RX queues are used. The issue is that the FW may hang when IWL_MVM_RXQ_NSSN_SYNC notifications are sent. Fix this by limiting the number of RX queues to 6 in the 9000 family of devices. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200911204056.37d90f9ceb0c.I8dfe8a7d3a7ac9f0bc9d93e4a03f8165d8c999d2@changeid Signed-off-by: Luca Coelho commit 7e0ca7230b980b451c8265fbe75e5bd47fd832a9 Author: Mordechay Goodstein Date: Fri Sep 11 20:44:33 2020 +0300 iwlwifi: sta: defer ADDBA transmit in case reclaimed SN != next SN This avoids cases that we have a lot of packets in the queue and until we are able to transmit SSN packet the other side sends DELBA due to timeout. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200911204056.8a8481c60663.I353ab6f1bc04c7fdf873dead59f483454e2425ba@changeid Signed-off-by: Luca Coelho commit 9c11d8a9d41cb02df2871a52606e8a9b28171182 Author: Shaul Triebitz Date: Fri Sep 11 20:44:32 2020 +0300 iwlwifi: mvm: set PROTECTED_TWT feature if supported by firmware Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200911204056.a34626b2e6ba.I86ba17db16fc99bb094bef4d0cc40ee99d5ba233@changeid Signed-off-by: Luca Coelho commit 659ac93d7ced4db5c73578186ccf79a7af84169e Author: Shaul Triebitz Date: Fri Sep 11 20:44:31 2020 +0300 iwlwifi: mvm: set PROTECTED_TWT in MAC data policy If Protected-TWT is supported by BSS and by us, set the PROTECTED_TWT bit in the data_policy in the MAC context command. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200911204056.e5e36b41fbd7.I25be500451890be2165fa56cbe0b0a600b4a2a9e@changeid Signed-off-by: Luca Coelho commit bbb95d37b74f8094a801b0cdd07d74c96a694624 Author: Shaul Triebitz Date: Fri Sep 11 20:44:30 2020 +0300 iwlwifi: mvm: add PROTECTED_TWT firmware API Add the PROTECTED_TWT bit to the MAC context data_policy enum. Define the PROTECTED_TWT TLV. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200911204056.c80b994d6bf0.Ifd45dfd5066283886f969313c20ff81edde428ff@changeid Signed-off-by: Luca Coelho commit 3d70247d34fc4c9df6c5fb324e29f06f8e6b8e2a Author: Johannes Berg Date: Fri Sep 11 20:44:29 2020 +0300 iwlwifi: mvm: rs-fw: handle VHT extended NSS capability If extended NSS capability is used, the NSS for 160 may be lower than for 80. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200911204056.523f5eca82ce.Ic0cd9cc86a91b1f23a5a54921736332be9abac29@changeid Signed-off-by: Luca Coelho commit 20441614d89867142060d3bcd79cc111d8ba7a8e Author: Adam Brickman Date: Thu Oct 1 16:24:25 2020 +0100 ASoC: wm_adsp: Pass full name to snd_ctl_notify A call to wm_adsp_write_ctl() could cause a kernel crash if it does not retrieve a valid kcontrol from snd_soc_card_get_kcontrol(). This can happen due to a missing control name prefix. Then, snd_ctl_notify() crashes when it tries to use the id field. Modified wm_adsp_write_ctl() to incorporate the name_prefix (if applicable) such that it is able to retrieve a valid id field from the kcontrol once the platform has booted. Fixes: eb65ccdb0836 ("ASoC: wm_adsp: Expose mixer control API") Signed-off-by: Adam Brickman Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20201001152425.8590-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit a0947081af2ac9549e6ba19877456730713bde23 Author: Gustavo A. R. Silva Date: Thu Oct 1 09:56:08 2020 -0500 x86/uv/time: Use a flexible array in struct uv_rtc_timer_head There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. struct uv_rtc_timer_head contains a one-element array cpu[1]. Switch it to a flexible array and use the struct_size() helper to calculate the allocation size. Also, save some heap space in the process[3]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays [3] https://lore.kernel.org/lkml/20200518190114.GA7757@embeddedor/ [ bp: Massage a bit. ] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Cc: Steve Wahl Link: https://lkml.kernel.org/r/20201001145608.GA10204@embeddedor commit 3e98fd6d816cd82f529345870efd435f06e02803 Author: Stephen Boyd Date: Fri Sep 25 09:26:04 2020 -0700 ARM: dts: cros-ec-keyboard: Add alternate keymap for KEY_LEFTMETA On newer keyboards this key is in a different place. Add both options to the keymap so that both new and old keyboards work. Cc: Douglas Anderson Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Heiko Stuebner Reviewed-by: Matthias Brugger Signed-off-by: Enric Balletbo i Serra commit bd8e2cad4e2857a8f3d1098236847e5b4becb3b9 Author: Michał Mirosław Date: Sun Sep 27 01:59:15 2020 +0200 regulator: tps65910: use regmap accessors Use regmap accessors directly for register manipulation - removing one layer of abstraction. Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/e82886d0f8f5131c9fccf2a17e3a15acce507d6f.1601164493.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 6fcd5ddc3b1467b3586972ef785d0d926ae4cdf4 Author: Jiri Olsa Date: Mon Sep 28 22:11:35 2020 +0200 perf python scripting: Fix printable strings in python3 scripts Hagen reported broken strings in python3 tracepoint scripts: make PYTHON=python3 perf record -e sched:sched_switch -a -- sleep 5 perf script --gen-script py perf script -s ./perf-script.py [..] sched__sched_switch 7 563231.759525792 0 swapper prev_comm=bytearray(b'swapper/7\x00\x00\x00\x00\x00\x00\x00'), prev_pid=0, prev_prio=120, prev_state=, next_comm=bytearray(b'mutex-thread-co\x00'), The problem is in the is_printable_array function that does not take the zero byte into account and claim such string as not printable, so the code will create byte array instead of string. Committer testing: After this fix: sched__sched_switch 3 484522.497072626 1158680 kworker/3:0-eve prev_comm=kworker/3:0, prev_pid=1158680, prev_prio=120, prev_state=I, next_comm=swapper/3, next_pid=0, next_prio=120 Sample: {addr=0, cpu=3, datasrc=84410401, datasrc_decode=N/A|SNP N/A|TLB N/A|LCK N/A, ip=18446744071841817196, period=1, phys_addr=0, pid=1158680, tid=1158680, time=484522497072626, transaction=0, values=[(0, 0)], weight=0} sched__sched_switch 4 484522.497085610 1225814 perf prev_comm=perf, prev_pid=1225814, prev_prio=120, prev_state=, next_comm=migration/4, next_pid=30, next_prio=0 Sample: {addr=0, cpu=4, datasrc=84410401, datasrc_decode=N/A|SNP N/A|TLB N/A|LCK N/A, ip=18446744071841817196, period=1, phys_addr=0, pid=1225814, tid=1225814, time=484522497085610, transaction=0, values=[(0, 0)], weight=0} Fixes: 249de6e07458 ("perf script python: Fix string vs byte array resolving") Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: Hagen Paul Pfeifer Cc: Alexander Shishkin Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20200928201135.3633850-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 234676d6dbbcd8b2a495e76efdc69e24c0aa300f Author: Alex Deucher Date: Thu Oct 1 10:43:28 2020 -0400 drm/amdgpu/swsmu: add interrupt work handler for smu11 parts We need to schedule the smu AC/DC interrupt ack to avoid potentially sleeping if the smu message mutex is contended. Fixes: e1188aacad1730 ("drm/amdgpu/smu11: add support for SMU AC/DC interrupts") Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1a8a763b218cef8cf881fc0d1d739283db24c167 Author: Alex Deucher Date: Thu Oct 1 09:03:37 2020 -0400 drm/amdgpu/swsmu: add interrupt work function So we can schedule work from interrupts. This might include long tasks or things that could sleep. Fixes: e1188aacad1730 ("drm/amdgpu/smu11: add support for SMU AC/DC interrupts") Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 346dbbb8f7a0f94eb4264d1e0a253be2edca6eb8 Author: Hawking Zhang Date: Wed Sep 30 23:09:57 2020 +0800 drm/amdgpu: enable GDDR6 save-restore support for navy_flounder add mp0 11_0_11 for navy_flounder to the mem training supported list, otherwise the modeprobe would fail on navy_flounder with latest vbios. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f7ee1874b06cfda6295ef236116ef189fdb9bd06 Author: Hawking Zhang Date: Fri Sep 18 20:32:25 2020 +0800 drm/amdgpu: support indirect access reg outside of mmio bar (v2) support both direct and indirect accessor in unified helper functions. v2: Retire indirect mmio access via mm_index/data Signed-off-by: Hawking Zhang Reviewed-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Kevin Wang Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 705a2b5ba0635c2fa3e5b6a830a6b4fe178de699 Author: Hawking Zhang Date: Tue Sep 15 17:57:30 2020 +0800 drm/amdgpu: switch to indirect reg access helper Switch WREG32/RREG32_PCIE to use indirect reg access helper for soc15 and onwards Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Kevin Wang Reviewed-by: Christian König Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 1bba36834c3bc317d8a30dd5d0cc3e59d64dbfb3 Author: Hawking Zhang Date: Thu Sep 17 19:32:34 2020 +0800 drm/amdgpu: add helper function for indirect reg access (v3) Add helper function in order to remove RREG32/WREG32 in current pcie_rreg/wreg function for soc15 and onwards adapters. PCIE_INDEX/DATA pairs are used to access regsiters outside of mmio bar in the helper functions. The new helper functions help remove the recursion of amdgpu_mm_rreg/wreg from pcie_rreg/wreg and provide the oppotunity to centralize direct and indirect access in a single function. v2: Fixed typo and refine the comments v3: Remove unnecessary volatile local variable Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: Kevin Wang Reviewed-by: Christian König Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 388968d864bbe25098211bf846037547f2a82ca6 Author: Arnaldo Carvalho de Melo Date: Thu Oct 1 11:23:38 2020 -0300 perf trace: Use the autogenerated mmap 'prot' string/id table No change in behaviour: # perf trace -e mmap sleep 1 0.000 ( 0.009 ms): sleep/751870 mmap(len: 143317, prot: READ, flags: PRIVATE, fd: 3) = 0x7fa96d0f7000 0.028 ( 0.004 ms): sleep/751870 mmap(len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS) = 0x7fa96d0f5000 0.037 ( 0.005 ms): sleep/751870 mmap(len: 1872744, prot: READ, flags: PRIVATE|DENYWRITE, fd: 3) = 0x7fa96cf2b000 0.044 ( 0.011 ms): sleep/751870 mmap(addr: 0x7fa96cf50000, len: 1376256, prot: READ|EXEC, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x25000) = 0x7fa96cf50000 0.056 ( 0.007 ms): sleep/751870 mmap(addr: 0x7fa96d0a0000, len: 307200, prot: READ, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x175000) = 0x7fa96d0a0000 0.064 ( 0.007 ms): sleep/751870 mmap(addr: 0x7fa96d0eb000, len: 24576, prot: READ|WRITE, flags: PRIVATE|FIXED|DENYWRITE, fd: 3, off: 0x1bf000) = 0x7fa96d0eb000 0.075 ( 0.005 ms): sleep/751870 mmap(addr: 0x7fa96d0f1000, len: 13160, prot: READ|WRITE, flags: PRIVATE|FIXED|ANONYMOUS) = 0x7fa96d0f1000 0.253 ( 0.005 ms): sleep/751870 mmap(len: 218049136, prot: READ, flags: PRIVATE, fd: 3) = 0x7fa95ff38000 # # # set -o vi # strace -e mmap sleep 1 mmap(NULL, 143317, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f333bd83000 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f333bd81000 mmap(NULL, 1872744, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f333bbb7000 mmap(0x7f333bbdc000, 1376256, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7f333bbdc000 mmap(0x7f333bd2c000, 307200, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x175000) = 0x7f333bd2c000 mmap(0x7f333bd77000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7f333bd77000 mmap(0x7f333bd7d000, 13160, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f333bd7d000 mmap(NULL, 218049136, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f332ebc4000 +++ exited with 0 +++ # And you can as well tweak 'perf trace's output to more closely match strace's: # perf config trace.show_arg_names=no # perf config trace.show_duration=no # perf config trace.show_prefix=yes # perf config trace.show_timestamp=no # perf config trace.show_zeros=yes # perf config trace.no_inherit=yes # perf trace -e mmap sleep 1 mmap(NULL, 143317, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0d287ca000 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS) = 0x7f0d287c8000 mmap(NULL, 1872744, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0d285fe000 mmap(0x7f0d28623000, 1376256, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7f0d28623000 mmap(0x7f0d28773000, 307200, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x175000) = 0x7f0d28773000 mmap(0x7f0d287be000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7f0d287be000 mmap(0x7f0d287c4000, 13160, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS) = 0x7f0d287c4000 mmap(NULL, 218049136, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0d1b60b000 # # perf config | grep ^trace trace.show_arg_names=no trace.show_duration=no trace.show_prefix=yes trace.show_timestamp=no trace.show_zeros=yes trace.no_inherit=yes # Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 4f2b30fd9b4bd6e3620fe55786df7fc5f89ad526 Author: Alexander Aring Date: Wed Sep 30 18:37:29 2020 -0400 fs: dlm: fix race in nodeid2con This patch fixes a race in nodeid2con in cases that we parallel running a lookup and both will create a connection structure for the same nodeid. It's a rare case to create a new connection structure to keep reader lockless we just do a lookup inside the protection area again and drop previous work if this race happens. Fixes: a47666eb763cc ("fs: dlm: make connection hash lockless") Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 08fc4762149c964c0fa8682a75591fe6f22dc39e Author: Arnaldo Carvalho de Melo Date: Thu Oct 1 11:14:22 2020 -0300 tools beauty: Add script to generate table of mmap's 'prot' argument Will be wired up in the following csets: $ tools/perf/trace/beauty/mmap_prot.sh static const char *mmap_prot[] = { [ilog2(0x1) + 1] = "READ", #ifndef PROT_READ #define PROT_READ 0x1 #endif [ilog2(0x2) + 1] = "WRITE", #ifndef PROT_WRITE #define PROT_WRITE 0x2 #endif [ilog2(0x4) + 1] = "EXEC", #ifndef PROT_EXEC #define PROT_EXEC 0x4 #endif [ilog2(0x8) + 1] = "SEM", #ifndef PROT_SEM #define PROT_SEM 0x8 #endif [ilog2(0x01000000) + 1] = "GROWSDOWN", #ifndef PROT_GROWSDOWN #define PROT_GROWSDOWN 0x01000000 #endif [ilog2(0x02000000) + 1] = "GROWSUP", #ifndef PROT_GROWSUP #define PROT_GROWSUP 0x02000000 #endif }; $ $ $ $ tools/perf/trace/beauty/mmap_prot.sh alpha static const char *mmap_prot[] = { [ilog2(0x4) + 1] = "EXEC", #ifndef PROT_EXEC #define PROT_EXEC 0x4 #endif [ilog2(0x01000000) + 1] = "GROWSDOWN", #ifndef PROT_GROWSDOWN #define PROT_GROWSDOWN 0x01000000 #endif [ilog2(0x02000000) + 1] = "GROWSUP", #ifndef PROT_GROWSUP #define PROT_GROWSUP 0x02000000 #endif [ilog2(0x1) + 1] = "READ", #ifndef PROT_READ #define PROT_READ 0x1 #endif [ilog2(0x8) + 1] = "SEM", #ifndef PROT_SEM #define PROT_SEM 0x8 #endif [ilog2(0x2) + 1] = "WRITE", #ifndef PROT_WRITE #define PROT_WRITE 0x2 #endif }; $ Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 88451f2cd3cec2abc30debdf129422d2699d1eba Author: Zqiang Date: Tue Sep 8 14:27:09 2020 +0800 debugobjects: Free per CPU pool after CPU unplug If a CPU is offlined the debug objects per CPU pool is not cleaned up. If the CPU is never onlined again then the objects in the pool are wasted. Add a CPU hotplug callback which is invoked after the CPU is dead to free the pool. [ tglx: Massaged changelog and added comment about remote access safety ] Signed-off-by: Zqiang Signed-off-by: Thomas Gleixner Cc: Waiman Long Link: https://lore.kernel.org/r/20200908062709.11441-1-qiang.zhang@windriver.com commit d081a6e353168f15e63eb9e9334757f20343319f Author: Daniel Thompson Date: Wed Sep 9 15:17:08 2020 +0100 kdb: Fix pager search for multi-line strings Currently using forward search doesn't handle multi-line strings correctly. The search routine replaces line breaks with \0 during the search and, for regular searches ("help | grep Common\n"), there is code after the line has been discarded or printed to replace the break character. However during a pager search ("help\n" followed by "/Common\n") when the string is matched we will immediately return to normal output and the code that should restore the \n becomes unreachable. Fix this by restoring the replaced character when we disable the search mode and update the comment accordingly. Fixes: fb6daa7520f9d ("kdb: Provide forward search at more prompt") Link: https://lore.kernel.org/r/20200909141708.338273-1-daniel.thompson@linaro.org Reviewed-by: Douglas Anderson Signed-off-by: Daniel Thompson commit 44492e70adc8086c42d3745d21d591657a427f04 Author: Kai-Heng Feng Date: Tue Sep 29 00:55:08 2020 +0800 rtw88: pci: Power cycle device during shutdown There are reports that 8822CE fails to work rtw88 with "failed to read DBI register" error. Also I have a system with 8723DE which freezes the whole system when the rtw88 is probing the device. According to [1], platform firmware may not properly power manage the device during shutdown. I did some expirements and putting the device to D3 can workaround the issue. So let's power cycle the device by putting the device to D3 at shutdown to prevent the issue from happening. [1] https://bugzilla.kernel.org/show_bug.cgi?id=206411#c9 BugLink: https://bugs.launchpad.net/bugs/1872984 Signed-off-by: Kai-Heng Feng Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200928165508.20775-1-kai.heng.feng@canonical.com commit 6aa5a83a7ed8036c1388a811eb8bdfa77b21f19c Author: Wright Feng Date: Mon Sep 28 00:49:22 2020 -0500 brcmfmac: Fix warning message after dongle setup failed Brcmfmac showed warning message in fweh.c when checking the size of event queue which is not initialized. Therefore, we only cancel the worker and reset event handler only when it is initialized. [ 145.505899] brcmfmac 0000:02:00.0: brcmf_pcie_setup: Dongle setup [ 145.929970] ------------[ cut here ]------------ [ 145.929994] WARNING: CPU: 0 PID: 288 at drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:312 brcmf_fweh_detach+0xbc/0xd0 [brcmfmac] ... [ 145.930029] Call Trace: [ 145.930036] brcmf_detach+0x77/0x100 [brcmfmac] [ 145.930043] brcmf_pcie_remove+0x79/0x130 [brcmfmac] [ 145.930046] pci_device_remove+0x39/0xc0 [ 145.930048] device_release_driver_internal+0x141/0x200 [ 145.930049] device_release_driver+0x12/0x20 [ 145.930054] brcmf_pcie_setup+0x101/0x3c0 [brcmfmac] [ 145.930060] brcmf_fw_request_done+0x11d/0x1f0 [brcmfmac] [ 145.930062] ? lock_timer_base+0x7d/0xa0 [ 145.930063] ? internal_add_timer+0x1f/0xa0 [ 145.930064] ? add_timer+0x11a/0x1d0 [ 145.930066] ? __kmalloc_track_caller+0x18c/0x230 [ 145.930068] ? kstrdup_const+0x23/0x30 [ 145.930069] ? add_dr+0x46/0x80 [ 145.930070] ? devres_add+0x3f/0x50 [ 145.930072] ? usermodehelper_read_unlock+0x15/0x20 [ 145.930073] ? _request_firmware+0x288/0xa20 [ 145.930075] request_firmware_work_func+0x36/0x60 [ 145.930077] process_one_work+0x144/0x360 [ 145.930078] worker_thread+0x4d/0x3c0 [ 145.930079] kthread+0x112/0x150 [ 145.930080] ? rescuer_thread+0x340/0x340 [ 145.930081] ? kthread_park+0x60/0x60 [ 145.930083] ret_from_fork+0x25/0x30 Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200928054922.44580-3-wright.feng@cypress.com commit d0151c2bad0aed1694c8180ed2eed587ddaa0f26 Author: Wright Feng Date: Mon Sep 28 00:49:21 2020 -0500 brcmfmac: Fix warning when hitting FW crash with flow control feature Brcmfmac got warning message when hitting FW crash in TX throughput test with fcmode=2. It's caused by FMAC flushed TXQ in brcmf_sdio_bus_stop but without doing hanger slot cleanup. Therefore, we move brcmf_remove_interface before brcmf_bus_stop to make sure the hanger slot is clean when flushing TXQ. [ 1891.512234] WARNING: CPU: 1 PID: 2765 at drivers/net/wireless/broadcom/brcm80211/brcmutil/utils.c:49 brcmu_pkt_buf_free_skb+0x21/0x30 [brcmutil] [ 1891.512234] Modules linked in: brcmfmac(OE-) brcmutil(OE) cfg80211(OE) compat(OE) rfkill mmc_block(OE) sdhci_pci(OE) sdhci(OE) mmc_core(OE) ip6table_filter ip6_tables ebtable_nat ebtables dns_resolver fscache e1000e ppdev iTCO_wdt iTCO_vendor_support tpm_tis tpm_tis_core tpm mei_me mei pcspkr lpc_ich i2c_i801 mfd_core ptp pps_core parport_pc parport wmi tcp_bic uinput i915 iosf_mbi i2c_algo_bit drm_kms_helper drm i2c_core video [last unloaded: brcmfmac] [ 1891.512247] CPU: 1 PID: 2765 Comm: rmmod Tainted: G W OE 4.12.0 #1 [ 1891.512247] Hardware name: /DH77EB, BIOS EBH7710H.86A.0100.2013.0312.1351 03/12/2013 [ 1891.512248] task: ffff880118f08000 task.stack: ffffc90001180000 [ 1891.512249] RIP: 0010:brcmu_pkt_buf_free_skb+0x21/0x30 [brcmutil] [ 1891.512249] RSP: 0018:ffffc90001183cc0 EFLAGS: 00010086 [ 1891.512250] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000006 [ 1891.512251] RDX: 0000000000000000 RSI: 0000000000000086 RDI: ffff880118e3ab00 [ 1891.512251] RBP: ffffc90001183cc0 R08: 0000000000000000 R09: 000000000000a050 [ 1891.512252] R10: 0000000000000001 R11: 0000000000aaaaaa R12: 00000000000000bc [ 1891.512253] R13: ffff880118b40c78 R14: 0000000000000002 R15: ffff880118e3ab00 [ 1891.512253] FS: 00007f2a49760740(0000) GS:ffff88011f280000(0000) knlGS:0000000000000000 [ 1891.512254] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1891.512254] CR2: 00000000012994a8 CR3: 000000011a3c4000 CR4: 00000000001406e0 [ 1891.512255] Call Trace: [ 1891.512259] brcmf_fws_cleanup+0x1ea/0x240 [brcmfmac] [ 1891.512264] brcmf_fws_detach+0x42/0x60 [brcmfmac] [ 1891.512268] brcmf_proto_bcdc_detach+0x26/0x40 [brcmfmac] [ 1891.512273] brcmf_proto_detach+0x57/0x70 [brcmfmac] [ 1891.512277] brcmf_detach+0x89/0x100 [brcmfmac] [ 1891.512282] brcmf_sdio_remove+0x76/0x180 [brcmfmac] [ 1891.512286] brcmf_sdiod_remove+0x25/0xb0 [brcmfmac] [ 1891.512291] brcmf_ops_sdio_remove+0xbd/0x120 [brcmfmac] [ 1891.512294] sdio_bus_remove+0x33/0x100 [mmc_core] [ 1891.512295] device_release_driver_internal+0x141/0x200 [ 1891.512297] driver_detach+0x38/0x70 [ 1891.512298] bus_remove_driver+0x55/0xd0 [ 1891.512299] driver_unregister+0x2c/0x50 [ 1891.512303] sdio_unregister_driver+0x1a/0x20 [mmc_core] [ 1891.512307] brcmf_sdio_exit+0x2f/0x40 [brcmfmac] [ 1891.512312] brcmf_core_exit+0x15/0xd7 [brcmfmac] [ 1891.512316] __exit_compat+0x9/0x2b [brcmfmac] [ 1891.512318] SyS_delete_module+0x155/0x230 [ 1891.512319] ? exit_to_usermode_loop+0x70/0x99 [ 1891.512321] do_syscall_64+0x54/0xc0 [ 1891.512322] entry_SYSCALL64_slow_path+0x25/0x25 Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200928054922.44580-2-wright.feng@cypress.com commit 703314b2db3bb328b5c79822938d21ec38e3c21c Author: Julia Lawall Date: Sun Sep 27 21:12:15 2020 +0200 bcma: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601233948-11629-6-git-send-email-Julia.Lawall@inria.fr commit 771910f719651789adee8260e1a2c4c0ba161007 Author: Daniel Thompson Date: Sun Sep 27 22:15:31 2020 +0100 kernel: debug: Centralize dbg_[de]activate_sw_breakpoints During debug trap execution we expect dbg_deactivate_sw_breakpoints() to be paired with an dbg_activate_sw_breakpoint(). Currently although the calls are paired correctly they are needlessly smeared across three different functions. Worse this also results in code to drive polled I/O being called with breakpoints activated which, in turn, needlessly increases the set of functions that will recursively trap if breakpointed. Fix this by moving the activation of breakpoints into the debug core. Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20200927211531.1380577-4-daniel.thompson@linaro.org Signed-off-by: Daniel Thompson commit 4c4197eda710d197c7474abcceb3f8789ec22a64 Author: Daniel Thompson Date: Sun Sep 27 22:15:30 2020 +0100 kgdb: Add NOKPROBE labels on the trap handler functions Currently kgdb honours the kprobe blocklist but doesn't place its own trap handling code on the list. Add labels to discourage attempting to use kgdb to debug itself. Not every functions that executes from the trap handler needs to be marked up: relatively early in the trap handler execution (just after we bring the other CPUs to a halt) all breakpoints are replaced with the original opcodes. This patch marks up code in the debug_core that executes between trap entry and the breakpoints being deactivated and, also, code that executes between breakpoint activation and trap exit. To be clear these changes are not sufficient to make recursive trapping impossible since they do not include library calls made during kgdb's entry/exit logic. However going much further whilst we are sharing the kprobe blocklist risks reducing the capabilities of kprobe and this would be a bad trade off (especially so given kgdb's users are currently conditioned to avoid recursive traps). Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20200927211531.1380577-3-daniel.thompson@linaro.org Signed-off-by: Daniel Thompson commit 6278eecba31f3983fe2743fc01b198433aa18247 Author: Jacob Pan Date: Fri Sep 25 09:32:47 2020 -0700 iommu/vt-d: Check UAPI data processed by IOMMU core IOMMU generic layer already does sanity checks on UAPI data for version match and argsz range based on generic information. This patch adjusts the following data checking responsibilities: - removes the redundant version check from VT-d driver - removes the check for vendor specific data size - adds check for the use of reserved/undefined flags Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/1601051567-54787-7-git-send-email-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit d90573812eea63c6bc8ab8a38f661b4c27c3cdc0 Author: Jacob Pan Date: Fri Sep 25 09:32:46 2020 -0700 iommu/uapi: Handle data and argsz filled by users IOMMU user APIs are responsible for processing user data. This patch changes the interface such that user pointers can be passed into IOMMU code directly. Separate kernel APIs without user pointers are introduced for in-kernel users of the UAPI functionality. IOMMU UAPI data has a user filled argsz field which indicates the data length of the structure. User data is not trusted, argsz must be validated based on the current kernel data size, mandatory data size, and feature flags. User data may also be extended, resulting in possible argsz increase. Backward compatibility is ensured based on size and flags (or the functional equivalent fields) checking. This patch adds sanity checks in the IOMMU layer. In addition to argsz, reserved/unused fields in padding, flags, and version are also checked. Details are documented in Documentation/userspace-api/iommu.rst Signed-off-by: Liu Yi L Signed-off-by: Jacob Pan Reviewed-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/1601051567-54787-6-git-send-email-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit 23cc3493b5e107b8deb697cf3157a07276b5eff7 Author: Jacob Pan Date: Fri Sep 25 09:32:45 2020 -0700 iommu/uapi: Rename uapi functions User APIs such as iommu_sva_unbind_gpasid() may also be used by the kernel. Since we introduced user pointer to the UAPI functions, in-kernel callers cannot share the same APIs. In-kernel callers are also trusted, there is no need to validate the data. We plan to have two flavors of the same API functions, one called through ioctls, carrying a user pointer and one called directly with valid IOMMU UAPI structs. To differentiate both, let's rename existing functions with an iommu_uapi_ prefix. Suggested-by: Alex Williamson Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/1601051567-54787-5-git-send-email-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit 8d3bb3b8cbf2ffb3ef73720a48b3445518dcdb55 Author: Jacob Pan Date: Fri Sep 25 09:32:44 2020 -0700 iommu/uapi: Use named union for user data IOMMU UAPI data size is filled by the user space which must be validated by the kernel. To ensure backward compatibility, user data can only be extended by either re-purpose padding bytes or extend the variable sized union at the end. No size change is allowed before the union. Therefore, the minimum size is the offset of the union. To use offsetof() on the union, we must make it named. Signed-off-by: Jacob Pan Reviewed-by: Lu Baolu Reviewed-by: Eric Auger Link: https://lore.kernel.org/linux-iommu/20200611145518.0c2817d6@x1.home/ Link: https://lore.kernel.org/r/1601051567-54787-4-git-send-email-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit 1e6aaae93e9ddb9dc664993eb949b1da94cab3a5 Author: Jacob Pan Date: Fri Sep 25 09:32:43 2020 -0700 iommu/uapi: Add argsz for user filled data As IOMMU UAPI gets extended, user data size may increase. To support backward compatibiliy, this patch introduces a size field to each UAPI data structures. It is *always* the responsibility for the user to fill in the correct size. Padding fields are adjusted to ensure 8 byte alignment. Specific scenarios for user data handling are documented in: Documentation/userspace-api/iommu.rst As there is no current users of the API, struct version is not incremented. Signed-off-by: Liu Yi L Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/1601051567-54787-3-git-send-email-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit d0023e3ee28d12b2b0af4856c405f3d13fb59d1c Author: Jacob Pan Date: Fri Sep 25 09:32:42 2020 -0700 docs: IOMMU user API IOMMU UAPI is newly introduced to support communications between guest virtual IOMMU and host IOMMU. There has been lots of discussions on how it should work with VFIO UAPI and userspace in general. This document is intended to clarify the UAPI design and usage. The mechanics of how future extensions should be achieved are also covered in this documentation. Signed-off-by: Liu Yi L Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Cc: linux-api@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/1601051567-54787-2-git-send-email-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit f94c91f7ba3ba7de2bc8aa31be28e1abb22f849e Author: Libing Zhou Date: Thu Aug 20 10:56:41 2020 +0800 x86/nmi: Fix nmi_handle() duration miscalculation When nmi_check_duration() is checking the time an NMI handler took to execute, the whole_msecs value used should be read from the @duration argument, not from the ->max_duration, the latter being used to store the current maximal duration. [ bp: Rewrite commit message. ] Fixes: 248ed51048c4 ("x86/nmi: Remove irq_work from the long duration NMI handler") Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Libing Zhou Signed-off-by: Borislav Petkov Cc: Changbin Du Link: https://lkml.kernel.org/r/20200820025641.44075-1-libing.zhou@nokia-sbell.com commit 993dcfac64ebe71cc25cbdb59ebe9a0eba46a34b Author: Sagar Kadam Date: Tue Sep 29 17:48:16 2020 +0530 dt-bindings: riscv: sifive-l2-cache: convert bindings to json-schema Convert the device tree bindings for the SiFive's FU540-C000 SoC's L2 Cache controller to YAML format. Signed-off-by: Sagar Kadam Link: https://lore.kernel.org/r/1601381896-29716-2-git-send-email-sagar.kadam@sifive.com Signed-off-by: Rob Herring commit 6db13e108eb695552363280221b67c20820b8710 Author: Zhen Lei Date: Tue Sep 29 22:14:54 2020 +0800 dt-bindings: arm: hisilicon: convert LPC controller bindings to json-schema Convert the Hisilicon Hip06 SoCs implement a Low Pin Count (LPC) controller binding to DT schema format using json-schema. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200929141454.2312-18-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 9266ff505a77bed5cf92018d53a2c165900ff912 Author: Zhen Lei Date: Tue Sep 29 22:14:53 2020 +0800 dt-bindings: arm: hisilicon: convert hisilicon,hi3798cv200-perictrl bindings to json-schema Convert the Hisilicon Hi3798CV200 Peripheral Controller binding to DT schema format using json-schema. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200929141454.2312-17-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit aeb9dd8491c2b05405ffba583272cac9b47fdc08 Author: Zhen Lei Date: Tue Sep 29 22:14:51 2020 +0800 dt-bindings: arm: hisilicon: convert hisilicon,hip04-bootwrapper bindings to json-schema Convert the Hisilicon Bootwrapper boot method binding to DT schema format using json-schema. The property boot-method contains two groups of physical address range information: bootwrapper and relocation. The "uint32-array" type is not suitable for it, because the field "address" and "size" may occupy one or two cells respectively. Use "minItems: 1" and "maxItems: 2" to allow it can be written in "" or ", " format. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200929141454.2312-15-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 1dc0041db230709caf01caa38497ded973ece87f Author: Zhen Lei Date: Tue Sep 29 22:14:50 2020 +0800 dt-bindings: arm: hisilicon: convert hisilicon,hip04-fabric bindings to json-schema Convert the Hisilicon Fabric controller binding to DT schema format using json-schema. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200929141454.2312-14-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 65eb73b87c0eabe2d6b16a61b948b15eb4af02af Author: Zhen Lei Date: Tue Sep 29 22:14:49 2020 +0800 dt-bindings: arm: hisilicon: convert hisilicon,pctrl bindings to json-schema Convert the Hisilicon peripheral misc control register binding to DT schema format using json-schema. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200929141454.2312-13-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 5b6b3e21ec4a554583a018c46d06a75d8d460bd2 Author: Zhen Lei Date: Tue Sep 29 22:14:48 2020 +0800 dt-bindings: arm: hisilicon: convert hisilicon,cpuctrl bindings to json-schema Convert the Hisilicon CPU controller binding to DT schema format using json-schema. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200929141454.2312-12-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit f1d60fbb491194019c1ac4a5ea2b6f4e420614fc Author: Zhen Lei Date: Tue Sep 29 22:14:47 2020 +0800 dt-bindings: arm: hisilicon: convert system controller bindings to json-schema Convert the Hisilicon system controller and its variants binding to DT schema format using json-schema. All of them are grouped into one yaml file, to help users understand differences and avoid repeated descriptions. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200929141454.2312-11-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 42f2445fe84c0e22f4014a29c99ed0c96bb4a7ed Author: Zhen Lei Date: Tue Sep 29 22:14:42 2020 +0800 dt-bindings: arm: hisilicon: add binding for SD5203 SoC Add devicetree binding for Hisilicon SD5203 SoC. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200929141454.2312-6-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 1d86b08953240579c5d920aee7aad73d4a5ebee2 Author: Zhen Lei Date: Tue Sep 29 22:14:41 2020 +0800 dt-bindings: arm: hisilicon: convert Hisilicon board/soc bindings to json-schema Convert Hisilicon SoC bindings to DT schema format using json-schema. Signed-off-by: Zhen Lei Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit 921a31639cb537e1cae78d5e9228a2ae74fffbb4 Author: Zhen Lei Date: Tue Sep 29 22:14:40 2020 +0800 dt-bindings: arm: hisilicon: split the dt-bindings of each controller into a separate file Split the devicetree bindings of each Hisilicon controller from hisilicon.txt into a separate file, the file name is the compatible name attach the .txt file name extension. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200929141454.2312-4-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 4041a78249cdb6f43ddb3cb37a1b98b86cf82b4b Author: Zhen Lei Date: Tue Sep 29 22:14:39 2020 +0800 dt-bindings: arm: hisilicon: delete the descriptions of HiP05/HiP06 controllers The compatible strings of Hi6220 SRAM controller, HiP05/HiP06 PCIe-SAS subsystem controller, HiP05/HiP06 PERI subsystem controller and HiP05/HiP06 DSA subsystem controller is in syscon.yaml now. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200929141454.2312-3-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 5376471b2c4c71b1eddf24a9da48cef0584eb107 Author: Zhen Lei Date: Tue Sep 29 22:14:38 2020 +0800 dt-bindings: mfd: syscon: add some compatible strings for Hisilicon Add some compatible strings for Hisilicon controllers: hisilicon,hi6220-sramctrl --> Hi6220 SRAM controller hisilicon,pcie-sas-subctrl --> HiP05/HiP06 PCIe-SAS subsystem controller hisilicon,peri-subctrl --> HiP05/HiP06 PERI subsystem controller hisilicon,dsa-subctrl --> HiP05/HiP06 DSA subsystem controller Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200929141454.2312-2-thunder.leizhen@huawei.com [robh: sort entries alphabetically] Signed-off-by: Rob Herring commit 0dd4ce65aa75df2bb271efc8410e2c65852a3c63 Merge: f75aef392f869 e2eae09939a89 Author: Joerg Roedel Date: Thu Oct 1 14:23:45 2020 +0200 Merge tag 'arm-smmu-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu Arm SMMU updates for 5.10 - Continued SVM enablement, where page-table is shared with CPU - Groundwork to support integrated SMMU with Adreno GPU - Allow disabling of MSI-based polling on the kernel command-line - Minor driver fixes and cleanups (octal permissions, error messages, ...) commit 80d6b466679c3dced3b359a6379c6d913de39afd Author: Will Deacon Date: Thu Oct 1 09:48:21 2020 +0100 arm64: dbm: Invalidate local TLB when setting TCR_EL1.HD TCR_EL1.HD is permitted to be cached in a TLB, so invalidate the local TLB after setting the bit when detected support for the feature. Although this isn't strictly necessary, since we can happily operate with the bit effectively clear, the current code uses an ISB in a half-hearted attempt to make the change effective, so let's just fix that up. Link: https://lore.kernel.org/r/20201001110405.18617-1-will@kernel.org Reviewed-by: Catalin Marinas Reviewed-by: Mark Rutland Signed-off-by: Will Deacon commit eb5f6b8ee9e4fcdda3807aff02a3df2d7ca51bbf Author: Mauro Carvalho Chehab Date: Wed Sep 30 17:01:03 2020 +0200 media: atomisp: fixes build breakage for ISP2400 due to a cleanup A temporary var needed for building with ISP2400 was removed by accident on a cleanup patch. Fix the breakage. Fixes: 852a53a02cf0 ("media: atomisp: get rid of unused vars") Signed-off-by: Mauro Carvalho Chehab commit 2101bfca57d8102292b85a62331239295bfa772e Author: Tomi Valkeinen Date: Tue Sep 29 12:19:18 2020 +0300 drm: bridge: cdns-mhdp8546: fix compile warning On x64 we get: drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:751:10: warning: conversion from 'long unsigned int' to 'unsigned int' changes value from '18446744073709551613' to '4294967293' [-Woverflow] The registers are 32 bit, so fix by casting to u32. Fixes: fb43aa0acdfd ("drm: bridge: Add support for Cadence MHDP8546 DPI/DP bridge") Signed-off-by: Tomi Valkeinen Reported-by: Stephen Rothwell Reviewed-by: Swapnil Jakhade Acked-by: Laurent Pinchart Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200929091918.24813-1-tomi.valkeinen@ti.com commit c602f29dd17cad0ccbe943052be2d10c64911b60 Author: Mauro Carvalho Chehab Date: Thu Oct 1 11:15:47 2020 +0200 media: zoran: fix mixed case on vars Use this small script to replace CamelCase and wrong case on vars: This should solve almost all warnings reported by checkpatch.pl in strict mode. Signed-off-by: Mauro Carvalho Chehab commit 209ecc56aa22912a15a61919393e36a31b5c5501 Author: Mauro Carvalho Chehab Date: Thu Oct 1 11:17:51 2020 +0200 media: zoran: get rid of an unused var The jpeg_error in lowercase is not used anywhere. Drop it. Signed-off-by: Mauro Carvalho Chehab commit c2bb80b8bdd04dfe32364b78b61b6a47f717af52 Author: Jan Kara Date: Wed Sep 30 17:08:20 2020 +0200 reiserfs: Fix oops during mount With suitably crafted reiserfs image and mount command reiserfs will crash when trying to verify that XATTR_ROOT directory can be looked up in / as that recurses back to xattr code like: xattr_lookup+0x24/0x280 fs/reiserfs/xattr.c:395 reiserfs_xattr_get+0x89/0x540 fs/reiserfs/xattr.c:677 reiserfs_get_acl+0x63/0x690 fs/reiserfs/xattr_acl.c:209 get_acl+0x152/0x2e0 fs/posix_acl.c:141 check_acl fs/namei.c:277 [inline] acl_permission_check fs/namei.c:309 [inline] generic_permission+0x2ba/0x550 fs/namei.c:353 do_inode_permission fs/namei.c:398 [inline] inode_permission+0x234/0x4a0 fs/namei.c:463 lookup_one_len+0xa6/0x200 fs/namei.c:2557 reiserfs_lookup_privroot+0x85/0x1e0 fs/reiserfs/xattr.c:972 reiserfs_fill_super+0x2b51/0x3240 fs/reiserfs/super.c:2176 mount_bdev+0x24f/0x360 fs/super.c:1417 Fix the problem by bailing from reiserfs_xattr_get() when xattrs are not yet initialized. CC: stable@vger.kernel.org Reported-by: syzbot+9b33c9b118d77ff59b6f@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit 0568d6c20e03ae620d6e84579f68337afc2d9c2b Author: Mauro Carvalho Chehab Date: Thu Oct 1 11:00:29 2020 +0200 media: zoran: use upper case for card types Don't mix case there: let's just use uppercase, as this is the common pattern for such define-like enums. Signed-off-by: Mauro Carvalho Chehab commit fce3c5c1a2d9cd888f2987662ce17c0c651916b2 Author: Thomas Petazzoni Date: Thu Oct 1 09:44:15 2020 +0200 serial: max310x: rework RX interrupt handling Currently, the RX interrupt logic uses the RXEMPTY interrupt, with the RXEMPTYINV bit set, which means we get an RX interrupt as soon as the RX FIFO is non-empty. However, with the MAX310X having a FIFO of 128 bytes, this makes very poor use of the FIFO: we trigger an interrupt as soon as the RX FIFO has one byte, which means a lot of interrupts, each only collecting a few bytes from the FIFO, causing a significant CPU load. Instead this commit relies on two other RX interrupt events: - MAX310X_IRQ_RXFIFO_BIT, which triggers when the RX FIFO has reached a certain threshold, which we define to be half of the FIFO size. This ensure we get an interrupt before the RX FIFO fills up. - MAX310X_LSR_RXTO_BIT, which triggers when the RX FIFO has received some bytes, and then no more bytes are received for a certain time. Arbitrarily, this time is defined to the time is takes to receive 4 characters. On a Microchip SAMA5D3 platform that is receiving 20 bytes every 16ms over one MAX310X UART, this patch has allowed to reduce the CPU consumption of the interrupt handler thread from ~25% to 6-7%. Signed-off-by: Thomas Petazzoni Link: https://lore.kernel.org/r/20201001074415.349739-1-thomas.petazzoni@bootlin.com Signed-off-by: Greg Kroah-Hartman commit c95e48b275c9a26dbf9bd351d2e2ebf5e3dfe40d Author: Michael Straube Date: Tue Sep 29 08:28:47 2020 +0200 staging: rtl8188eu: clean up indent style issue Replace spaces with tab to clear checkpatch error. ERROR: code indent should use tabs where possible Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200929062847.23985-8-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit add81f3df1c61bb04a6b505f2eeabb70835a145d Author: Michael Straube Date: Tue Sep 29 08:28:46 2020 +0200 staging: rtl8188eu: remove unused variable ratelen After the removal of cckrates_included() and cckrates_only_included() from rtw_wlan_util.c the variable/parameter 'ratelen' is unused now. Remove it from update_wireless_mode() and judge_network_type(). Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200929062847.23985-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit f8126e4f1d0b73259a18654b59d11d56729755fe Author: Michael Straube Date: Tue Sep 29 08:28:45 2020 +0200 staging: rtl8188eu: remove cckrates{only}_included() In rtw_ieee80211.c there are rtw_is_cckrates_included() and rtw_is_cckratesonly_included() which have the same functionality as cckrates_included() and cckrates_only_included() defined in rtw_wlan_util.c. Remove the functions from rtw_wlan_util.c and use those from rtw_ieee80211.c. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200929062847.23985-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 00a367bc45fe4a3892cb8d385c7df4b3488e8875 Author: Michael Straube Date: Tue Sep 29 08:28:44 2020 +0200 staging: rtl8188eu: rename struct field bUsed -> used Rename field of struct rt_pmkid_list to avoid camel case. bUsed -> used Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200929062847.23985-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit a89b10ad9195139e9afd2e0d00b736bd073c04e4 Author: Michael Straube Date: Tue Sep 29 08:28:43 2020 +0200 staging: rtl8188eu: use ETH_ALEN Use ETH_ALEN instead of hard coded array size. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200929062847.23985-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 43320adc724b77824491cd1c25738320555f77a9 Author: Michael Straube Date: Tue Sep 29 08:28:42 2020 +0200 staging: rtl8188eu: rename struct field Bssid -> bssid Rename field of struct rt_pmkid_list to avoid camel case. Bssid -> bssid Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200929062847.23985-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit d23519c0a7e8ea1d77a7156c09dc203fff74d766 Author: Michael Straube Date: Tue Sep 29 08:28:41 2020 +0200 staging: rtl8188eu: clean up comparsions to NULL Clean up remaining comparsions to NULL reported by checkpatch. x == NULL -> !x x != NULL -> x Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200929062847.23985-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit a1070fee729a7e660f684e24481496070a1c3d08 Author: Michael Straube Date: Tue Sep 29 08:28:40 2020 +0200 staging: rtl8188eu: remove unused macros and definitions Removep unused macros and definitions from rtw_security.h leftover from previous cleanup patches. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200929062847.23985-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c1981671a4d8ec60ef3ef245f3fdba75929817aa Author: Dan Carpenter Date: Wed Sep 30 15:30:36 2020 +0300 staging: vchiq: Fix an uninitialized variable Smatch complains that "userdata" can be passed to vchiq_bulk_transfer() without being initialized. This leads to a potential information leak later on. Fixes: a4367cd2b231 ("staging: vchiq: convert compat bulk transfer") Signed-off-by: Dan Carpenter Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200930123036.GC4282@kadam Signed-off-by: Greg Kroah-Hartman commit 29838144f280fc03ca06a621568f34e1d0a65a4f Author: Dan Carpenter Date: Tue Sep 29 13:35:48 2020 +0300 staging: rtl8712: Fix enqueue_reorder_recvframe() The logic of this function was accidentally broken by a checkpatch inspired cleanup. I've modified the code to restore the original behavior and also make checkpatch happy. Fixes: 98fe05e21a6e ("staging: rtl8712: Remove unnecesary else after return statement.") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200929103548.GA493135@mwanda Signed-off-by: Greg Kroah-Hartman commit e6ac17de7815d6a094303c964813f6cf64da680a Author: Ryan Kosta Date: Sun Sep 27 10:28:55 2020 -0700 Staging: nvec: Removes repeated word typo in comment Fix a comment typo. Signed-off-by: Ryan Kosta Link: https://lore.kernel.org/r/20200927172855.9813-1-ryanpkosta@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6a1bdb173f9967b2329aab0f25bcba963f54e06b Author: Will Deacon Date: Wed Sep 30 13:20:40 2020 +0100 arm64: mm: Make flush_tlb_fix_spurious_fault() a no-op Our use of broadcast TLB maintenance means that spurious page-faults that have been handled already by another CPU do not require additional TLB maintenance. Make flush_tlb_fix_spurious_fault() a no-op and rely on the existing TLB invalidation instead. Add an explicit flush_tlb_page() when making a page dirty, as the TLB is permitted to cache the old read-only entry. Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20200728092220.GA21800@willie-the-truck Signed-off-by: Will Deacon commit aa5cacdc29d76a005cbbee018a47faa6e724dd2d Author: Arvind Sankar Date: Wed Sep 2 19:21:52 2020 -0400 x86/asm: Replace __force_order with a memory clobber The CRn accessor functions use __force_order as a dummy operand to prevent the compiler from reordering CRn reads/writes with respect to each other. The fact that the asm is volatile should be enough to prevent this: volatile asm statements should be executed in program order. However GCC 4.9.x and 5.x have a bug that might result in reordering. This was fixed in 8.1, 7.3 and 6.5. Versions prior to these, including 5.x and 4.9.x, may reorder volatile asm statements with respect to each other. There are some issues with __force_order as implemented: - It is used only as an input operand for the write functions, and hence doesn't do anything additional to prevent reordering writes. - It allows memory accesses to be cached/reordered across write functions, but CRn writes affect the semantics of memory accesses, so this could be dangerous. - __force_order is not actually defined in the kernel proper, but the LLVM toolchain can in some cases require a definition: LLVM (as well as GCC 4.9) requires it for PIE code, which is why the compressed kernel has a definition, but also the clang integrated assembler may consider the address of __force_order to be significant, resulting in a reference that requires a definition. Fix this by: - Using a memory clobber for the write functions to additionally prevent caching/reordering memory accesses across CRn writes. - Using a dummy input operand with an arbitrary constant address for the read functions, instead of a global variable. This will prevent reads from being reordered across writes, while allowing memory loads to be cached/reordered across CRn reads, which should be safe. Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Reviewed-by: Miguel Ojeda Tested-by: Nathan Chancellor Tested-by: Sedat Dilek Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82602 Link: https://lore.kernel.org/lkml/20200527135329.1172644-1-arnd@arndb.de/ Link: https://lkml.kernel.org/r/20200902232152.3709896-1-nivedita@alum.mit.edu commit 0d555b3ac49b40f94c270681b697d45dcae9faa6 Author: Julia Lawall Date: Sun Sep 27 21:12:21 2020 +0200 clocksource/drivers/mps2-timer: Use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Thomas Gleixner Cc: Daniel Lezcano Link: https://lore.kernel.org/r/1601233948-11629-12-git-send-email-Julia.Lawall@inria.fr commit 05b837920f4959771da7374e6181fd093baafff8 Author: Hans Verkuil Date: Mon Sep 28 15:16:37 2020 +0200 media: zoran: fix sparse warnings The output is not fully supported yet, so some ops are commented out. Also comment out the corresponding callbacks to prevent these sparse warnings: drivers/staging/media/zoran/zoran_driver.c:656:12: warning: 'zoran_s_output' defined but not used [-Wunused-function] 656 | static int zoran_s_output(struct file *file, void *__fh, unsigned int output) | ^~~~~~~~~~~~~~ drivers/staging/media/zoran/zoran_driver.c:649:12: warning: 'zoran_g_output' defined but not used [-Wunused-function] 649 | static int zoran_g_output(struct file *file, void *__fh, unsigned int *output) | ^~~~~~~~~~~~~~ drivers/staging/media/zoran/zoran_driver.c:635:12: warning: 'zoran_enum_output' defined but not used [-Wunused-function] 635 | static int zoran_enum_output(struct file *file, void *__fh, | ^~~~~~~~~~~~~~~~~ drivers/staging/media/zoran/zoran_driver.c:302:12: warning: 'zoran_enum_fmt_vid_overlay' defined but not used [-Wunused-function] 302 | static int zoran_enum_fmt_vid_overlay(struct file *file, void *__fh, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/media/zoran/zoran_driver.c:294:12: warning: 'zoran_enum_fmt_vid_out' defined but not used [-Wunused-function] 294 | static int zoran_enum_fmt_vid_out(struct file *file, void *__fh, | ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 72c51be87f1ccad668ced298ea3177f2eea9bb87 Author: Hans Verkuil Date: Mon Sep 28 15:11:39 2020 +0200 media: zoran: fix smatch warning drivers/staging/media/zoran/zoran_device.c:941 zoran_irq() warn: inconsistent indenting Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6dee18f7271cb9dacf1140abe0e57409c2de6a73 Author: Corentin Labbe Date: Fri Sep 25 20:30:57 2020 +0200 media: zoran: update TODO Update the TODO of the zoran driver Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 83f89a8bcbc3c520a889b5fc7c4b95669d712f65 Author: Corentin Labbe Date: Fri Sep 25 20:30:56 2020 +0200 media: zoran: convert to vb2 This is it! the ultimate last step, the vb2 conversion. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f4a2b19c37caf40f3b8487ccb9032b974a84a3a7 Author: Drew Fustini Date: Mon Sep 14 01:03:07 2020 +0200 pinctrl: single: fix debug output when #pinctrl-cells = 2 The debug output in pcs_parse_one_pinctrl_entry() needs to be updated to print the correct pinctrl register value when #pinctrl-cells is 2. Fixes: a13395418888 ("pinctrl: single: parse #pinctrl-cells = 2") Reported-by: Trent Piepho Signed-off-by: Drew Fustini Acked-by: Tony Lindgren Link: https://lore.kernel.org/linux-omap/3139716.CMS8C0sQ7x@zen.local/ Link: https://lore.kernel.org/r/20200913230306.2061645-1-drew@beagleboard.org Signed-off-by: Linus Walleij commit 8cb356d4eaae111ac525d4e476b7ca23561ddad5 Author: Corentin Labbe Date: Fri Sep 25 20:30:55 2020 +0200 media: zoran: remove deprecated .vidioc_g_jpegcomp Remove the deprecated .vidioc_g_jpegcomp and replace it with corresponding v4l2_ctrl_ops code. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d1d015376c13661436aebaaede5b81cb769bf9cb Author: Corentin Labbe Date: Fri Sep 25 20:30:54 2020 +0200 media: zoran: fix some compliance test Add TODO for "TRY_FMT cannot handle an invalid pixelformat" We need to set pixelformat in some case. We should also handle some minimum requirement. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 11c9c16f7cb5b7d6fba2d6b7f1ec92a3be0c3df2 Author: Corentin Labbe Date: Fri Sep 25 20:30:53 2020 +0200 media: zoran: fix use of buffer_size and sizeimage buffer_size was not set when it should be. Furthermore, use it instead of recalculate it. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9b9448f39e83d8e6fdfed006c5db8c304a98c2cd Author: Drew Fustini Date: Wed Sep 30 12:48:40 2020 -0500 pinctrl: single: fix pinctrl_spec.args_count bounds check The property #pinctrl-cells can either be 1 or 2: - if #pinctrl-cells = <1>, then pinctrl_spec.args_count = 2 - if #pinctrl-cells = <2>, then pinctrl_spec.args_count = 3 All other values of pinctrl_spec.args_count are incorrect. This fix checks the upper bound instead of just the lower bound. Fixes: a13395418888 ("pinctrl: single: parse #pinctrl-cells = 2") Reported-by: Trent Piepho Signed-off-by: Drew Fustini Acked-by: Tony Lindgren Link: https://lore.kernel.org/linux-omap/3139716.CMS8C0sQ7x@zen.local/ Link: https://lore.kernel.org/r/20200930174839.1308344-1-drew@beagleboard.org Signed-off-by: Linus Walleij commit 64868edc96185acc9dfac37174b039bd6de7e29a Author: Corentin Labbe Date: Fri Sep 25 20:30:52 2020 +0200 media: zoran: remove test_interrupts The test_interrupts function is useless, remove it. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 10e75b6ecdb4659930ddd6dad260c5012c0f8d06 Author: Corentin Labbe Date: Fri Sep 25 20:30:51 2020 +0200 media: zoran: add vidioc_g_parm Adding vidioc_g_parm made v4l compliance happy. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 991a0207325c8554eae2cf38f5e2c2c4dc59ad7e Author: Corentin Labbe Date: Fri Sep 25 20:30:50 2020 +0200 media: zoran: remove framebuffer support The framebuffer support is obsolete, so let's reduce code size. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f0ee19bf26fc0b64d43f0052b785449726553c7 Author: Corentin Labbe Date: Fri Sep 25 20:30:49 2020 +0200 media: zoran: enable makefile This patch enables compilation of the zoran driver. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d4ae3689226e56014320e7bcd0298f7e49cfdd8f Author: Corentin Labbe Date: Fri Sep 25 20:30:48 2020 +0200 media: zoran: device support only 32bit DMA address The zoran device only supports 32bit DMA address. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b8fb0a4740055216dfc289085701b911e6a9c7fd Author: Corentin Labbe Date: Fri Sep 25 20:30:47 2020 +0200 media: zoran: disable output Zoran is picky about jpeg data it accepts. At least it seems to not support COM and APPn. So until a way to filter data will be done, disable output. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b564cb6e0bd5870c122663a3bccf5cf7f4674b56 Author: Corentin Labbe Date: Fri Sep 25 20:30:46 2020 +0200 media: zoran: Add vb_queue This patchs adds a vb_queue without using it. This reduce the final VB2 conversion patch. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1c3629cba07c16d5f657ed3de894d8fee9aa5e27 Author: Corentin Labbe Date: Fri Sep 25 20:30:45 2020 +0200 media: zoran: Add more check for compliance The zoran driver miss some sanity checks, and this made v4l compliance happy. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d61c7451fcb712d1c3c855493c51f62a58a167e8 Author: Corentin Labbe Date: Fri Sep 25 20:30:44 2020 +0200 media: zoran: constify codec_name The codec_name could be const. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4ea8b196a7d03742c71f35deac37283fa35cc005 Author: Corentin Labbe Date: Fri Sep 25 20:30:43 2020 +0200 media: zoran: constify struct tvnorm The structure tvnorm could be consified. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 30a978180ae82bdf0603adc357ad033baec1f82c Author: Corentin Labbe Date: Fri Sep 25 20:30:42 2020 +0200 media: zoran: add stat_com buffer Adds the allocation of the stat_com buffer which be used later. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e83bf68b5827e04fb36ad555b2b1b5776a4884a1 Author: Corentin Labbe Date: Fri Sep 25 20:30:41 2020 +0200 media: zoran: use devm_ioremap Using devm_ioremap simplify code. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 845556fd8027b895282c097cc709b535ab704d4f Author: Corentin Labbe Date: Fri Sep 25 20:30:40 2020 +0200 media: zoran: use pci_request_regions Use pci_request_regions so now we can see zoran in /proc/iomem. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4bae5db2f28d6402f41aa845fe061c19eee9da4b Author: Corentin Labbe Date: Fri Sep 25 20:30:39 2020 +0200 media: zoran: use devm for videocodec_master alloc Let's use devm allocations for videocodec, this simplify code. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit af71064bc47b762b9bc78f8d2cc4cdacd863ee0f Author: Corentin Labbe Date: Fri Sep 25 20:30:38 2020 +0200 media: zoran: convert mdelay to udelay As asked by checkpath, let's use udelay. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6d1d9ba2c4396f42a134381a5bdfa0d5a416097c Author: Corentin Labbe Date: Fri Sep 25 20:30:37 2020 +0200 media: zoran: convert zoran alloc to devm Allocate the zoran structure with devm_ functions permit to simplify code. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ce72671d5d2d93ee499c4a816760bc0b2f300559 Author: Corentin Labbe Date: Fri Sep 25 20:30:36 2020 +0200 media: zoran: convert irq to pci irq This patch convert zoran to pci_irq functions. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 799cb9e3c1c4cf0c987ae10feb12a9aba295e5de Author: Corentin Labbe Date: Fri Sep 25 20:30:35 2020 +0200 media: zoran: zoran does not support STD_ALL In fact, zoran does not support V4L2_STD_ALL, so let's enumerate what we support. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7b1f41e037844a097a156e1a0d1d651b800f5221 Author: Corentin Labbe Date: Fri Sep 25 20:30:34 2020 +0200 media: zoran: use ZR_NORM Instead of using hardcoded numbers, let's use some define for ZR NORM. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 886986804ad45618b58b160e6ab003d5473f5838 Author: Corentin Labbe Date: Fri Sep 25 20:30:33 2020 +0200 media: zoran: Use DMA coherent for stat_com Instead of using a fragile virt_to_bus, let's use proper DMA coherent for the stat_com entry. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit accd0214092eed398afdcfdef95a5f2ec9661706 Author: Corentin Labbe Date: Fri Sep 25 20:30:32 2020 +0200 media: zoran: remove overlay Supporting overlay is not necessary today, so let's reduce the code size by removing it. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 000ffb5ec6dc750945debe63531cdefb2b0af12e Author: Corentin Labbe Date: Fri Sep 25 20:30:31 2020 +0200 media: zoran: Change zoran_v4l_set_format parameter from zoran_fh to zoran We need to get rid of zoran_fh, so let's change function arguments. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cd669be210b80582609d4d9bf628b20b376f8096 Author: Corentin Labbe Date: Fri Sep 25 20:30:30 2020 +0200 media: zoran: Use video_drvdata to get struct zoran Using video_drvdata() is proper and shorter than using directly fh pointers. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 109d5cc0d067add9e42140b329ca73789f913a24 Author: Corentin Labbe Date: Fri Sep 25 20:30:29 2020 +0200 media: zoran: move overlay_settings out of zoran_fh We need to get rid of zoran_fh, so move the overlay_settings directly in the zoran structure. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 66a9b5a82ff8e51a17241defbc556aa53627dd65 Author: Corentin Labbe Date: Fri Sep 25 20:30:28 2020 +0200 media: zoran: move jpg_settings out of zoran_fh We need to get rid of zoran_fh, so move the jpg_settings directly in the zoran structure. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dc5f0b5d2d0636ab6abaeffbca51cda866f1814e Author: Corentin Labbe Date: Fri Sep 25 20:30:27 2020 +0200 media: zoran: move v4l_settings out of zoran_fh We need to get rid of zoran_fh, so move the v4l_settings directly in the zoran structure. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7847f74d36836c091fbbd0291f0a31c2af920bb0 Author: Corentin Labbe Date: Fri Sep 25 20:30:26 2020 +0200 media: zoran: move buffer_size out of zoran_fh We need to get rid of zoran_fh, so move the buffer_size directly in the zoran structure. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 62d297ede7d02e3967c2b97ff96c5e1874e5fe14 Author: Corentin Labbe Date: Fri Sep 25 20:30:25 2020 +0200 media: zoran: do not print random guest 0 The slot 0 of guest is never initialized and so we print later random data. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit be4c5eb267ee73ef1d70c25c6d648625e96eb477 Author: Johan Hovold Date: Tue Sep 29 12:42:39 2020 +0200 USB: serial: qcserial: fix altsetting probing Drivers should not assume that interface descriptors have been parsed in any particular order so use the interface number to look up the second alternate setting. That number is also what the driver later use to switch setting. Note that although the driver could end up verifying the existence of the expected endpoints on the wrong interface, a later sanity check in usb_wwan_port_probe() would have caught this before it could cause any real damage. Fixes: a78b42824dd7 ("USB: serial: add qualcomm wireless modem driver") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 75240ac439eafde7e5b94107ece32b11a334d985 Author: Johan Hovold Date: Tue Sep 29 12:41:16 2020 +0200 USB: serial: ftdi_sio: clean up jtag quirks Drivers should not assume that interface descriptors have been parsed in any particular order so match on interface number instead when rejecting JTAG interfaces. Also use the interface struct device for notifications so that the interface number is included. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit e2b35ed6affc1183b03adf18ce24bdb5546071fd Author: Corentin Labbe Date: Fri Sep 25 20:30:24 2020 +0200 media: zoran: use v4l2_buffer_set_timestamp The ns_to_timeval function is removed, so replace it with v4l2_buffer_set_timestamp(). Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3f2c3423627c6cfd30eb24c0dfdde4c9a47a830c Author: Corentin Labbe Date: Fri Sep 25 20:30:23 2020 +0200 media: zoran: use VFL_TYPE_VIDEO The VFL_TYPE_GRABBER type was removed, so let's use the new type. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 60f5a24c11f7fa0c8c74018cfd4c25a3f432fdaf Author: Vinod Koul Date: Thu Oct 1 12:39:11 2020 +0530 phy: qcom-qmp: initialize the pointer to NULL Smatch complains: drivers/phy/qualcomm/phy-qcom-qmp.c:3899 qcom_qmp_phy_probe() error: uninitialized symbol 'dp_cfg'. drivers/phy/qualcomm/phy-qcom-qmp.c:3900 qcom_qmp_phy_probe() error: uninitialized symbol 'dp_serdes'. drivers/phy/qualcomm/phy-qcom-qmp.c:3902 qcom_qmp_phy_probe() error: uninitialized symbol 'usb_cfg'. This is a warning but not a practical one as dp_cfg, dp_serdes and usb_cfg will be set and used when valid. So we can set the pointers to NULL to quiesce the warnings. Fixes: 52e013d0bffa ("phy: qcom-qmp: Add support for DP in USB3+DP combo phy") Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20201001070911.140019-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit 72b23dd2456834375dcd5884cddc37f7168d7d37 Author: Corentin Labbe Date: Fri Sep 25 20:30:22 2020 +0200 media: zoran: remove proc_fs The zoran driver give some debug information in procfs, but this is not the right place. So let's remove them, we will use debugfs later. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ff559599a39abd5c8b2648f6c3121539a9370bca Author: Corentin Labbe Date: Fri Sep 25 20:30:21 2020 +0200 media: zoran: zoran_device.c: convert pr_x to pci_x Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit daae1da762c1e34fca452446443e349c045482dc Author: Corentin Labbe Date: Fri Sep 25 20:30:20 2020 +0200 media: zoran: convert dprintk debug This patch convert dprintk(debug) to pci_dbg. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9bb2720293a04feff7f8360125ebc216fec5a408 Author: Corentin Labbe Date: Fri Sep 25 20:30:19 2020 +0200 media: zoran: convert dprintk info to pci_info This patch convert dprintk(info) to pci_info (or pci_dbg if the message is not important). Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 28ea0148cf520a59bbbb492f37d01e47a94c2ca9 Author: Corentin Labbe Date: Fri Sep 25 20:30:18 2020 +0200 media: zoran: convert dprintk warn This patch convert dprintk(warn) to pci_warn. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b7c3b2bb9db4123b92d65d9905dacf7fbc370115 Author: Corentin Labbe Date: Fri Sep 25 20:30:17 2020 +0200 media: zoran: convert all error dprintk to pci_err/pr_err This patch converts all errors dprintk to pci_err/pr_err. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c638913669bbcd18282ac848b2fd2664eed62e6e Author: Corentin Labbe Date: Fri Sep 25 20:30:16 2020 +0200 media: zoran: do not forward declare zr36057_init_vfe move function for avoiding forward declaration Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5e195bbddabdd94b15eeb60439cece996d58b329 Author: Corentin Labbe Date: Fri Sep 25 20:30:15 2020 +0200 media: zoran: fix checkpatch issue Fix a lot of style issue found by checkpatch. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 874edaa5d51b5829a8b2c3d0a06c05919c25b58f Author: Corentin Labbe Date: Fri Sep 25 20:30:14 2020 +0200 media: zoran: Documentation: fix typo Fix some typo in doc. [hverkuil: The TV encoder are -> The TV encoder is] Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a7fd03f552e26c55c0ce279cf7483c05e8ae6ec3 Author: Corentin Labbe Date: Fri Sep 25 20:30:13 2020 +0200 media: zoran: datasheet is no longer available from zoran.com Simply remove this broken reference Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 754f0f1ba8d92069d6513f031027d0b85156a47e Author: Corentin Labbe Date: Fri Sep 25 20:30:12 2020 +0200 media: MAINTAINERS: change maintainer of the zoran driver Add myself as maintainer. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 61c3b19f7b9eb7c7838fd35f86566230fefd6550 Author: Corentin Labbe Date: Fri Sep 25 20:30:11 2020 +0200 media: staging: media: Revert "media: zoran: remove deprecated driver" This reverts commit 8dce4b265a5357731058f69645840dabc718c687. The revert is slighly modified: - Documentation/media/v4l-drivers/index.rst is ,ot restored since removed from tree - drivers/staging/media/Makefile is not restored since the zoran driver is not compilable yet. Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6ca3549d870724495f96debfd85e96fa19dd4009 Author: Marek Szyprowski Date: Mon Sep 28 10:48:44 2020 +0200 media: platform: s5p-mfc: Fix adding a standard frame skip mode control Add proper control type to the recently introduced V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE control. This will forward it to v4l2_ctrl_new_std_menu() not v4l2_ctrl_new_std(), what causes the failure. This fixes the following warning during driver initialization: s5p_mfc_enc_ctrls_setup:2671: Adding control (18) failed s5p_mfc_open:811: Failed to setup mfc controls Fixes: ef56b3ee4f54 ("media: s5p-mfc: Use standard frame skip mode control") Signed-off-by: Marek Szyprowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bfea1d81b5c8b36a76fe9dafbf47fa21a214daec Author: Mauro Carvalho Chehab Date: Mon Sep 21 13:33:13 2020 +0200 media: vidtv: fix decoding with gstreamer and Vlc Neither Vlc nor Gstreamer likes the PES_scrambling_control bits. In the case of GST, this can be seen with: $ GST_DEBUG=2 LANG=C gst-play-1.0 pcm_audio.ts ... 0:00:00.097973439 12308 0x55f7ddd155e0 WARN pesparser pesparse.c:411:mpegts_parse_pes_header: Wrong '0x10' marker before PES_scrambling_control (0x40) 0:00:00.097987026 12308 0x55f7ddd155e0 WARN tsdemux tsdemux.c:2314:gst_ts_demux_parse_pes_header: Error parsing PES header. pid: 0x111 stream_type: 0x6 ... So, change, it. After such change, the stream now plays fine with Vlc, Gstreamer, ffmpeg - and with programs that use such libraries, like Kaffeine. Signed-off-by: Mauro Carvalho Chehab commit a61d7d19a3715e8e4faf8275ac9ace8599b2c97c Author: Mauro Carvalho Chehab Date: Mon Sep 21 10:05:30 2020 +0200 media: vidtv: rewrite the adaption field logic When compared with a stream generated via ffmpeg, it can be noticed that the PES doesn't contain any PCR info. That could cause problems with userspace decoding. So, rewrite the logic that fills the adaptation info, in order to allow it to add PCR frames without breaking frame alignment. Signed-off-by: Mauro Carvalho Chehab commit 09196d86e36624a9f9ae02d8a645f85fec52f1b0 Author: Mauro Carvalho Chehab Date: Mon Sep 21 07:34:42 2020 +0200 media: vidtv: simplify parameters for vidtv_pes_write_stuffing() Instead of passing struct pes_ts_header_write_args fields as function parameters, just pass a pointer to the struct. That would allow adding more args without needing to change the function prototype. Signed-off-by: Mauro Carvalho Chehab commit d6a36eda73dcfbf85cea30d20cde314643f73855 Author: Mauro Carvalho Chehab Date: Sun Sep 20 10:14:28 2020 +0200 media: vidtv: fix a typo optinal -> optional Signed-off-by: Mauro Carvalho Chehab commit 2f217729612c30da28693f92e3a8dd239fc3d0ab Author: Mauro Carvalho Chehab Date: Sun Sep 20 09:40:45 2020 +0200 media: vidtv: cleanup SDT string identifiers In order to better test userspace applications, add an encoding for the strings. The original channel string is also too big. As we're just playing the first compasses of the 5th Beethoven Symphony, change the service name to just "Beethoven". Also, add a provider's name. For such purpose, let's point it to the Linux media community website. With such changes, the SDT table now looks more like one got from a real digital TV channel: SDT | table_id 0x42 | section_length 44 | one 2 | zero 1 | syntax 1 | transport_stream_id 1860 | current_next 1 | version 0 | one2 3 | section_number 0 | last_section_number 0 | network_id 65281 | reserved 255 |\ |- service 0x0880 | EIT schedule 0 | EIT present following 0 | free CA mode 0 | running status 4 | descriptor length 27 | 0x48: service_descriptor | service type 1 | provider 'LinuxTV.org' | name 'Beethoven' |_ 1 services Signed-off-by: Mauro Carvalho Chehab commit fc4405a5f1077ded3194a38b3af9b2c6b9c69437 Author: Mauro Carvalho Chehab Date: Sun Sep 20 09:17:45 2020 +0200 media: vidtv: cleanup PSI version numbers There's no reason to use static vars to store PSI version numbers. Also, currently, version numbers are starting with 0x01, because there's a code being called that increases it to 1 for all table initializer code, as the code may support dynamic changes at the PS tables on some future. So, let's just initialize them to 0x1f, in order for the versions to be reported as starting from 0. Signed-off-by: Mauro Carvalho Chehab commit 56ce9eff9492e85297403ee825078463fabe8cf7 Author: Mauro Carvalho Chehab Date: Sun Sep 20 08:34:55 2020 +0200 media: vidtv: fix initialization of the network_id field at SDT This field should point to the network ID, and has different ranges for cable, terrestrial or satellite. It also has an special range for temporary private usage. For now, let's use the temporary private one. Once the Network Information Table (NIT) gets added, this should be reviewed. Signed-off-by: Mauro Carvalho Chehab commit 02578bdf31ffeb7e2b6aa247719aab50df07c3b2 Author: Mauro Carvalho Chehab Date: Sun Sep 20 08:25:49 2020 +0200 media: vidtv: remove more ENDIAN_BITFIELD nonsense Changeset 870e350d4e39 ("media: vidtv: get rid of ENDIAN_BITFIELD nonsense") was incomplete. There are still some wrong endannes logic at the driver. Get rid of them. Signed-off-by: Mauro Carvalho Chehab commit 880a8fc077301d0b1ebc642ac53373bd0e0707e1 Author: Mauro Carvalho Chehab Date: Sun Sep 20 08:22:20 2020 +0200 media: vidtv: simplify PCR logic to get jiffies There's no need to have a check when setting timing.past_jiffies, as we can simply do the initialization earlier at vidtv_mux_init(). Signed-off-by: Mauro Carvalho Chehab commit 6208689fb3e623d3576dd61866cb99b40f75dc53 Merge: 3effc06a4dde3 d6b42068412bd Author: Alexei Starovoitov Date: Wed Sep 30 23:18:12 2020 -0700 Merge branch 'introduce BPF_F_PRESERVE_ELEMS' Song Liu says: ==================== This set introduces BPF_F_PRESERVE_ELEMS to perf event array for better sharing of perf event. By default, perf event array removes the perf event when the map fd used to add the event is closed. With BPF_F_PRESERVE_ELEMS set, however, the perf event will stay in the array until it is removed, or the map is closed. --- Changes v3 => v5: 1. Clean up in selftest. (Alexei) Changes v2 => v3: 1. Move perf_event_fd_array_map_free() to avoid unnecessary forward declaration. (Daniel) Changes v1 => v2: 1. Rename the flag as BPF_F_PRESERVE_ELEMS. (Alexei, Daniel) 2. Simplify the code and selftest. (Daniel, Alexei) ==================== Signed-off-by: Alexei Starovoitov commit d6b42068412bd17d94b3b7b51d3787120ba8c738 Author: Song Liu Date: Wed Sep 30 15:49:27 2020 -0700 selftests/bpf: Add tests for BPF_F_PRESERVE_ELEMS Add tests for perf event array with and without BPF_F_PRESERVE_ELEMS. Add a perf event to array via fd mfd. Without BPF_F_PRESERVE_ELEMS, the perf event is removed when mfd is closed. With BPF_F_PRESERVE_ELEMS, the perf event is removed when the map is freed. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200930224927.1936644-3-songliubraving@fb.com commit 792caccc4526bb489e054f9ab61d7c024b15dea2 Author: Song Liu Date: Wed Sep 30 15:49:26 2020 -0700 bpf: Introduce BPF_F_PRESERVE_ELEMS for perf event array Currently, perf event in perf event array is removed from the array when the map fd used to add the event is closed. This behavior makes it difficult to the share perf events with perf event array. Introduce perf event map that keeps the perf event open with a new flag BPF_F_PRESERVE_ELEMS. With this flag set, perf events in the array are not removed when the original map fd is closed. Instead, the perf event will stay in the map until 1) it is explicitly removed from the array; or 2) the array is freed. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200930224927.1936644-2-songliubraving@fb.com commit a841592fb3a70bc3f3c2eaa2c1781479a52f76f9 Merge: da75ba2482658 86ae924a91a4a Author: Vinod Koul Date: Thu Oct 1 10:18:59 2020 +0530 Merge branch 'topic/tasklet' into next commit 86ae924a91a4a4297ad9f47e131f74b1dab6cb7a Author: Vinod Koul Date: Wed Sep 30 17:47:35 2020 +0530 dmaengine: pl330: fix argument for tasklet Commit 59cd818763e8 ("dmaengine: fsl: convert tasklets to use new tasklet_setup() API") converted the pl330 driver to use new tasklet functions but missed that driver calls the tasklet function directly as well, so update it. Fixes: 59cd818763e8 ("dmaengine: fsl: convert tasklets to use new tasklet_setup() API") Reported-by: kernel test robot Link: https://lore.kernel.org/r/20200930121735.49699-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit ff7ea04ad579c1f5f5aed73d2d5dc13314d25c75 Author: Gustavo A. R. Silva Date: Fri Sep 25 11:49:13 2020 -0500 net/mlx5e: Fix potential null pointer dereference Calls to kzalloc() and kvzalloc() should be null-checked in order to avoid any potential failures. In this case, a potential null pointer dereference. Fix this by adding null checks for _parse_attr_ and _flow_ right after allocation. Addresses-Coverity-ID: 1497154 ("Dereference before null check") Fixes: c620b772152b ("net/mlx5: Refactor tc flow attributes structure") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 7b2b16ee54cc08e268ddae59152cc99ec8275e1c Author: Dan Carpenter Date: Mon Sep 28 12:05:56 2020 +0300 net/mlx5e: Fix a use after free on error in mlx5_tc_ct_shared_counter_get() This code frees "shared_counter" and then dereferences on the next line to get the error code. Fixes: 1edae2335adf ("net/mlx5e: CT: Use the same counter for both directions") Signed-off-by: Dan Carpenter Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 5efbe617888a4ba29e260d1233afbd9524608805 Author: Ariel Levkovich Date: Mon Sep 28 19:34:10 2020 +0300 net/mlx5: Fix dereference on pointer attr after null check When removing a flow from the slow path fdb, a flow attr struct is allocated for the rule removal process. If the allocation fails the code prints a warning message but continues with the removal flow which include dereferencing a pointer which could be null. Fix this by exiting the function in case the attr allocation failed. Fixes: c620b772152b ("net/mlx5: Refactor tc flow attributes structure") Reported-by: Dan Carpenter Signed-off-by: Ariel Levkovich Signed-off-by: Saeed Mahameed commit 7be3412a7686241042681b0a3e2fae5c9a01da0e Author: Parav Pandit Date: Wed Sep 9 20:41:38 2020 +0300 net/mlx5: Use dma device access helper Use the PCI device directly for dma accesses as non PCI device unlikely support IOMMU and dma mappings. Introduce and use helper routine to access DMA device. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 036e19b90f6d415f8c17d28862fea29bca200eba Author: Hamdan Igbaria Date: Sun Aug 30 12:32:37 2020 +0300 net/mlx5: E-Switch, Support flow source for local vport Set flow source as hint for local vport. Signed-off-by: Hamdan Igbaria Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit c7eddc6092b42f32b4f395349e7313252a44c684 Author: Parav Pandit Date: Mon Aug 31 22:47:47 2020 +0300 net/mlx5: E-switch, Move devlink eswitch ports closer to eswitch Currently devlink eswitch ports are registered and unregistered by the representor layer. However it is better to register them at eswitch layer so that in future user initiated command port add and delete commands can also register/unregister devlink ports without depending on representor layer. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 38679b5a0df20da12b8064c7497b7891a00afe52 Author: Parav Pandit Date: Mon Aug 31 21:18:59 2020 +0300 net/mlx5: E-switch, Use helper function to load unload representor To register and unregister devlink ports when loading/unload representors, refactor the code to helper functions. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 2c40db2f1d41cc1520b1cc664308fa3c32cf4178 Author: Parav Pandit Date: Wed Sep 2 08:59:30 2020 +0300 net/mlx5: E-switch, Add helper to check egress ACL need Currently only VF vports need egress ACL table. Add a generic helper to check whether a vport need egress ACL table or not. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 7cd7becdddb00620fb8deb74e6fe4e5a1522ae5a Author: sunils Date: Fri Sep 11 00:13:26 2020 +0300 net/mlx5: E-switch, Use PF num in metadata reg c0 Currently only 256 vports can be supported as only 8 bits are reserved for them and 8 bits are reserved for vhca_ids in metadata reg c0. To support more than 256 vports, replace vhca_id with a unique shorter 4-bit PF number which covers upto 16 PF's. Use remaining 12 bits for vports ranging 1-4095. This will continue to generate unique metadata even if multiple PCI devices have same switch_id. Signed-off-by: sunils Reviewed-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 01723919675dfa8d984b2b80b93092f39a4a84de Author: Hamdan Igbaria Date: Mon Jun 15 18:18:14 2020 +0300 net/mlx5: DR, Add support for rule creation with flow source hint Skip the rule according to flow arrival source, in case of RX and the source is local port skip and in case of TX and the source is uplink skip, we get this info according to the flow source hint we get from upper layers when creating the rule. This is needed because for example in case of FDB table which has a TX and RX tables and we are inserting a rule with an encap action which is only a TX action, in this case rule will fail on RX, so we can rely on the flow source hint and skip RX in such case. Until now we relied on metadata regc_0 that upper layer mapped the port in the regc_0, but the problem is that upper layer did not always use regc_0 for port mapping, so now we added support to flow source hint which upper layers will pass to SW steering when creating a rule. Signed-off-by: Alex Vesker Signed-off-by: Hamdan Igbaria Signed-off-by: Saeed Mahameed commit e6b69bf379b2423d4603cf265adf4cb050f4dab5 Author: Yevgeny Kliteynik Date: Mon Aug 31 11:56:40 2020 +0300 net/mlx5: DR, Call ste_builder directly with tag pointer Instead of getting the tag in each function, call the builder directly with the tag. This will allow to use the same function for building the tag and the bitmask. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 92b4b88531e52ad0c2fecb1c7bd4bc9ccb85a829 Author: Yevgeny Kliteynik Date: Mon Aug 31 11:57:28 2020 +0300 net/mlx5: DR, Remove unneeded local variable The misc3 variable is used only once and can be dropped. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit e6422d1da04870ae78c6b1cc5600edf4b4165857 Author: Yevgeny Kliteynik Date: Mon Aug 31 11:57:14 2020 +0300 net/mlx5: DR, Remove unneeded vlan check from L2 builder When we create a matcher we check that all fields are consumed. There is no need for this specific check. This keeps the STE builder functions simple and clean. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 38a5c59d7ed0f4ce5ab57eda31dc34d9a8b2b68c Author: Yevgeny Kliteynik Date: Mon Aug 31 11:56:59 2020 +0300 net/mlx5: DR, Remove unneeded check from source port builder Mask validity for ste builders is checked by mlx5dr_ste_build_pre_check during matcher creation. It already checks the mask value of source_vport, so removing this duplicated check. Also, moving there the check of source_eswitch_owner_vhca_id mask. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 97ffd895fe9c7b066f3e9c9ea10f5902ebcdbb11 Author: Yevgeny Kliteynik Date: Mon Aug 31 11:56:07 2020 +0300 net/mlx5: DR, Replace the check for valid STE entry Validity check is done by reading the next lu_type from the STE, this check can be replaced by checking the refcount. This will make the check independent on internal STE structure. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 87c4311fd2c28e83545cdfa4702b57db15ed1d9b Author: Jens Axboe Date: Wed Sep 30 21:00:14 2020 -0600 io_uring: kill callback_head argument for io_req_task_work_add() We always use &req->task_work anyway, no point in passing it in. Signed-off-by: Jens Axboe commit c1379e247a724b2d4c646f1947d4f78c782c0650 Author: Pavel Begunkov Date: Wed Sep 30 22:57:56 2020 +0300 io_uring: move req preps out of io_issue_sqe() All request preparations are done only during submission, reflect it in the code by moving io_req_prep() much earlier into io_queue_sqe(). That's much cleaner, because it doen't expose bits to async code which it won't ever use. Also it makes the interface harder to misuse, and there are potential places for bugs. For instance, __io_queue() doesn't clear @sqe before proceeding to a next linked request, that could have been disastrous, but hopefully there are linked requests IFF sqe==NULL, so not actually a bug. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit bfe76559833d5d76fc4eebdad7658d22522f8a22 Author: Pavel Begunkov Date: Wed Sep 30 22:57:55 2020 +0300 io_uring: decouple issuing and req preparation io_issue_sqe() does two things at once, trying to prepare request and issuing them. Split it in two and deduplicate with io_defer_prep(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 73debe68b300ca24fdbbe9b6c3787d3e239deb3d Author: Pavel Begunkov Date: Wed Sep 30 22:57:54 2020 +0300 io_uring: remove nonblock arg from io_{rw}_prep() All io_*_prep() functions including io_{read,write}_prep() are called only during submission where @force_nonblock is always true. Don't keep propagating it and instead remove the @force_nonblock argument from prep() altogether. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit a88fc400212fc1d8aa9ca4979f898fd04ca3aab5 Author: Pavel Begunkov Date: Wed Sep 30 22:57:53 2020 +0300 io_uring: set/clear IOCB_NOWAIT into io_read/write Move setting IOCB_NOWAIT from io_prep_rw() into io_read()/io_write(), so it's set/cleared in a single place. Also remove @force_nonblock parameter from io_prep_rw(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2d199895d231c0a1af3a49d1f0da777499f352c8 Author: Pavel Begunkov Date: Wed Sep 30 22:57:35 2020 +0300 io_uring: remove F_NEED_CLEANUP check in *prep() REQ_F_NEED_CLEANUP is set only by io_*_prep() and they're guaranteed to be called only once, so there is no one who may have set the flag before. Kill REQ_F_NEED_CLEANUP check in these *prep() handlers. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 5b09e37e27a878eb50f0eb96fbce8419e932a7d5 Author: Pavel Begunkov Date: Wed Sep 30 22:57:15 2020 +0300 io_uring: io_kiocb_ppos() style change Put brackets around bitwise ops in a complex expression Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 291b2821e072e16b062c5a0e83f7642143c4399a Author: Pavel Begunkov Date: Wed Sep 30 22:57:01 2020 +0300 io_uring: simplify io_alloc_req() Extract common code from if/else branches. That is cleaner and optimised even better. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 145cc8c665f406cc189cfcf15a9875689e2c73b8 Author: Jens Axboe Date: Sat Sep 26 12:37:46 2020 -0600 io-wq: kill unused IO_WORKER_F_EXITING This flag is no longer used, remove it. Signed-off-by: Jens Axboe commit c4068bf898ddaef791049a366828d9b84b467bda Author: Hillf Danton Date: Sat Sep 26 21:26:55 2020 +0800 io-wq: fix use-after-free in io_wq_worker_running The smart syzbot has found a reproducer for the following issue: ================================================================== BUG: KASAN: use-after-free in instrument_atomic_write include/linux/instrumented.h:71 [inline] BUG: KASAN: use-after-free in atomic_inc include/asm-generic/atomic-instrumented.h:240 [inline] BUG: KASAN: use-after-free in io_wqe_inc_running fs/io-wq.c:301 [inline] BUG: KASAN: use-after-free in io_wq_worker_running+0xde/0x110 fs/io-wq.c:613 Write of size 4 at addr ffff8882183db08c by task io_wqe_worker-0/7771 CPU: 0 PID: 7771 Comm: io_wqe_worker-0 Not tainted 5.9.0-rc4-syzkaller #0 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+0x198/0x1fd lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:192 instrument_atomic_write include/linux/instrumented.h:71 [inline] atomic_inc include/asm-generic/atomic-instrumented.h:240 [inline] io_wqe_inc_running fs/io-wq.c:301 [inline] io_wq_worker_running+0xde/0x110 fs/io-wq.c:613 schedule_timeout+0x148/0x250 kernel/time/timer.c:1879 io_wqe_worker+0x517/0x10e0 fs/io-wq.c:580 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 7768: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461 kmem_cache_alloc_node_trace+0x17b/0x3f0 mm/slab.c:3594 kmalloc_node include/linux/slab.h:572 [inline] kzalloc_node include/linux/slab.h:677 [inline] io_wq_create+0x57b/0xa10 fs/io-wq.c:1064 io_init_wq_offload fs/io_uring.c:7432 [inline] io_sq_offload_start fs/io_uring.c:7504 [inline] io_uring_create fs/io_uring.c:8625 [inline] io_uring_setup+0x1836/0x28e0 fs/io_uring.c:8694 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 21: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0xd8/0x120 mm/kasan/common.c:422 __cache_free mm/slab.c:3418 [inline] kfree+0x10e/0x2b0 mm/slab.c:3756 __io_wq_destroy fs/io-wq.c:1138 [inline] io_wq_destroy+0x2af/0x460 fs/io-wq.c:1146 io_finish_async fs/io_uring.c:6836 [inline] io_ring_ctx_free fs/io_uring.c:7870 [inline] io_ring_exit_work+0x1e4/0x6d0 fs/io_uring.c:7954 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the object at ffff8882183db000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 140 bytes inside of 1024-byte region [ffff8882183db000, ffff8882183db400) The buggy address belongs to the page: page:000000009bada22b refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2183db flags: 0x57ffe0000000200(slab) raw: 057ffe0000000200 ffffea0008604c48 ffffea00086a8648 ffff8880aa040700 raw: 0000000000000000 ffff8882183db000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8882183daf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8882183db000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8882183db080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8882183db100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8882183db180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== which is down to the comment below, /* all workers gone, wq exit can proceed */ if (!nr_workers && refcount_dec_and_test(&wqe->wq->refs)) complete(&wqe->wq->done); because there might be multiple cases of wqe in a wq and we would wait for every worker in every wqe to go home before releasing wq's resources on destroying. To that end, rework wq's refcount by making it independent of the tracking of workers because after all they are two different things, and keeping it balanced when workers come and go. Note the manager kthread, like other workers, now holds a grab to wq during its lifetime. Finally to help destroy wq, check IO_WQ_BIT_EXIT upon creating worker and do nothing for exiting wq. Cc: stable@vger.kernel.org # v5.5+ Reported-by: syzbot+45fa0a195b941764e0f0@syzkaller.appspotmail.com Reported-by: syzbot+9af99580130003da82b1@syzkaller.appspotmail.com Cc: Pavel Begunkov Signed-off-by: Hillf Danton Signed-off-by: Jens Axboe commit dbbe9c642411c359ad0a0e32442eb2e11d3811b5 Author: Joseph Qi Date: Tue Sep 29 09:01:22 2020 -0600 io_uring: show sqthread pid and cpu in fdinfo In most cases we'll specify IORING_SETUP_SQPOLL and run multiple io_uring instances in a host. Since all sqthreads are named "io_uring-sq", it's hard to distinguish the relations between application process and its io_uring sqthread. With this patch, application can get its corresponding sqthread pid and cpu through show_fdinfo. Steps: 1. Get io_uring fd first. $ ls -l /proc//fd | grep -w io_uring 2. Then get io_uring instance related info, including corresponding sqthread pid and cpu. $ cat /proc//fdinfo/ pos: 0 flags: 02000002 mnt_id: 13 SqThread: 6929 SqThreadCpu: 2 UserFiles: 1 0: testfile UserBufs: 0 PollList: Signed-off-by: Joseph Qi Reviewed-by: Stefano Garzarella [axboe: fixed for new shared SQPOLL] Signed-off-by: Jens Axboe commit af9c1a44f8dee7a958e07977f24ba40e3c770987 Author: Jens Axboe Date: Thu Sep 24 13:32:18 2020 -0600 io_uring: process task work in io_uring_register() We do this for CQ ring wait, in case task_work completions come in. We should do the same in io_uring_register(), to avoid spurious -EINTR if the ring quiescing ends up having to process task_work to complete the operation Reported-by: Dan Melnic Signed-off-by: Jens Axboe commit 91d8f5191e8fe6fc6a87aa5353b36f5a7409fbec Author: Dennis Zhou Date: Wed Sep 16 13:41:05 2020 -0700 io_uring: add blkcg accounting to offloaded operations There are a few operations that are offloaded to the worker threads. In this case, we lose process context and end up in kthread context. This results in ios to be not accounted to the issuing cgroup and consequently end up as issued by root. Just like others, adopt the personality of the blkcg too when issuing via the workqueues. For the SQPOLL thread, it will live and attach in the inited cgroup's context. Signed-off-by: Dennis Zhou Signed-off-by: Jens Axboe commit de2939388be564836b06f0f06b3787bdedaed822 Author: Jens Axboe Date: Thu Sep 17 16:19:16 2020 -0600 io_uring: improve registered buffer accounting for huge pages io_uring does account any registered buffer as pinned/locked memory, and checks limit and fails if the given user doesn't have a big enough limit to register the ranges specified. However, if huge pages are used, we are potentially under-accounting the memory in terms of what gets pinned on the vm side. This patch rectifies that, by ensuring that we account the full size of a compound page, regardless of how much of it is being registered. Huge pages are not accounted mulitple times - if multiple sections of a huge page is registered, then the page is only accounted once. Reported-by: Andrea Arcangeli Signed-off-by: Jens Axboe commit 14db84110d489276d9c06ea38d59d3ff0ade2ae1 Author: Zheng Bin Date: Wed Sep 9 20:12:37 2020 +0800 io_uring: remove unneeded semicolon Fixes coccicheck warning: fs/io_uring.c:4242:13-14: Unneeded semicolon Signed-off-by: Zheng Bin Signed-off-by: Jens Axboe commit e95eee2dee7862f267a169b10d384c82f71010ce Author: Jens Axboe Date: Tue Sep 8 09:11:32 2020 -0600 io_uring: cap SQ submit size for SQPOLL with multiple rings In the spirit of fairness, cap the max number of SQ entries we'll submit for SQPOLL if we have multiple rings. If we don't do that, we could be submitting tons of entries for one ring, while others are waiting to get service. The value of 8 is somewhat arbitrarily chosen as something that allows a fair bit of batching, without using an excessive time per ring. Signed-off-by: Jens Axboe commit e8c2bc1fb6c9495b71efe7af476a351ccfba73c4 Author: Jens Axboe Date: Sat Aug 15 18:44:09 2020 -0700 io_uring: get rid of req->io/io_async_ctx union There's really no point in having this union, it just means that we're always allocating enough room to cater to any command. But that's pointless, as the ->io field is request type private anyway. This gets rid of the io_async_ctx structure, and fills in the required size in the io_op_defs[] instead. Signed-off-by: Jens Axboe commit 4be1c615126963ade321492283c05fb653f55099 Author: Pavel Begunkov Date: Sun Sep 6 00:45:48 2020 +0300 io_uring: kill extra user_bufs check Testing ctx->user_bufs for NULL in io_import_fixed() is not neccessary, because in that case ctx->nr_user_bufs would be zero, and the following check would fail. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ab0b196ce5551a093388bb2ceace30df7891051c Author: Pavel Begunkov Date: Sun Sep 6 00:45:47 2020 +0300 io_uring: fix overlapped memcpy in io_req_map_rw() When io_req_map_rw() is called from io_rw_prep_async(), it memcpy() iorw->iter into itself. Even though it doesn't lead to an error, such a memcpy()'s aliasing rules violation is considered to be a bad practise. Inline io_req_map_rw() into io_rw_prep_async(). We don't really need any remapping there, so it's much simpler than the generic implementation. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit afb87658f89b65e067334e06d833ccd859e659e6 Author: Pavel Begunkov Date: Sun Sep 6 00:45:46 2020 +0300 io_uring: refactor io_req_map_rw() Set rw->free_iovec to @iovec, that gives an identical result and stresses that @iovec param rw->free_iovec play the same role. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f4bff104fffba2f069bc1b19ef0decbca7ff5459 Author: Pavel Begunkov Date: Sun Sep 6 00:45:45 2020 +0300 io_uring: simplify io_rw_prep_async() Don't touch iter->iov and iov in between __io_import_iovec() and io_req_map_rw(), the former function aleady sets it correctly, because it creates one more case with NULL'ed iov to consider in io_req_map_rw(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 90554200724d5b280439dc361fe7ee92fe459ea7 Author: Jens Axboe Date: Thu Sep 3 12:12:41 2020 -0600 io_uring: provide IORING_ENTER_SQ_WAIT for SQPOLL SQ ring waits When using SQPOLL, applications can run into the issue of running out of SQ ring entries because the thread hasn't consumed them yet. The only option for dealing with that is checking later, or busy checking for the condition. Provide IORING_ENTER_SQ_WAIT if applications want to wait on this condition. Signed-off-by: Jens Axboe commit 738277adc81929b3e7c9b63fec6693868cc5f931 Author: Jens Axboe Date: Thu Sep 3 05:54:56 2020 -0600 io_uring: mark io_uring_fops/io_op_defs as __read_mostly These structures are never written, move them appropriately. Signed-off-by: Jens Axboe commit aa06165de863a09bceebef65ecaf19294b26fd2e Author: Jens Axboe Date: Wed Sep 2 14:50:27 2020 -0600 io_uring: enable IORING_SETUP_ATTACH_WQ to attach to SQPOLL thread too We support using IORING_SETUP_ATTACH_WQ to share async backends between rings created by the same process, this now also allows the same to happen with SQPOLL. The setup procedure remains the same, the caller sets io_uring_params->wq_fd to the 'parent' context, and then the newly created ring will attach to that async backend. This means that multiple rings can share the same SQPOLL thread, saving resources. Signed-off-by: Jens Axboe commit 69fb21310fd36aad96370e05953f2c2366f492e4 Author: Jens Axboe Date: Mon Sep 14 11:16:23 2020 -0600 io_uring: base SQPOLL handling off io_sq_data Remove the SQPOLL thread from the ctx, and use the io_sq_data as the data structure we pass in. io_sq_data has a list of ctx's that we can then iterate over and handle. As of now we're ready to handle multiple ctx's, though we're still just handling a single one after this patch. Signed-off-by: Jens Axboe commit 534ca6d684f1feaf2edd90e641129725cba7e86d Author: Jens Axboe Date: Wed Sep 2 13:52:19 2020 -0600 io_uring: split SQPOLL data into separate structure Move all the necessary state out of io_ring_ctx, and into a new structure, io_sq_data. The latter now deals with any state or variables associated with the SQPOLL thread itself. In preparation for supporting more than one io_ring_ctx per SQPOLL thread. Signed-off-by: Jens Axboe commit c8d1ba583fe67c6b5e054d89f1433498a924286f Author: Jens Axboe Date: Mon Sep 14 11:07:26 2020 -0600 io_uring: split work handling part of SQPOLL into helper This is done in preparation for handling more than one ctx, but it also cleans up the code a bit since io_sq_thread() was a bit too unwieldy to get a get overview on. __io_sq_thread() is now the main handler, and it returns an enum sq_ret that tells io_sq_thread() what it ended up doing. The parent then makes a decision on idle, spinning, or work handling based on that. Signed-off-by: Jens Axboe commit 3f0e64d054114b725569c2481bbc6a8eb538bf15 Author: Jens Axboe Date: Wed Sep 2 12:42:47 2020 -0600 io_uring: move SQPOLL post-wakeup ring need wakeup flag into wake handler We need to decouple the clearing on wakeup from the the inline schedule, as that is going to be required for handling multiple rings in one thread. Wrap our wakeup handler so we can clear it when we get the wakeup, by definition that is when we no longer need the flag set. Signed-off-by: Jens Axboe commit 6a7793828fb21c1e0c119d98c2f898d8f83c8a8b Author: Jens Axboe Date: Wed Sep 2 12:21:41 2020 -0600 io_uring: use private ctx wait queue entries for SQPOLL This is in preparation to sharing the poller thread between rings. For that we need per-ring wait_queue_entry storage, and we can't easily put that on the stack if one thread is managing multiple rings. We'll also be sharing the wait_queue_head across rings for the purposes of wakeups, provide the usual private ring wait_queue_head for now but make it a pointer so we can easily override it when sharing. Signed-off-by: Jens Axboe commit ce71bfea207b4d7c21d36f24ec37618ffcea1da8 Author: Jens Axboe Date: Mon Aug 31 12:08:10 2020 -0600 fs: align IOCB_* flags with RWF_* flags We have a set of flags that are shared between the two and inherired in kiocb_set_rw_flags(), but we check and set these individually. Reorder the IOCB flags so that the bottom part of the space is synced with the RWF flag space, and then we can do them all in one mask and set operation. The only exception is RWF_SYNC, which needs to mark IOCB_SYNC and IOCB_DSYNC. Do that one separately. This shaves 15 bytes of text from kiocb_set_rw_flags() for me. Suggested-by: Matthew Wilcox (Oracle) Signed-off-by: Jens Axboe commit e35afcf91230238dc27f98d1cd7cb787474b28cb Author: Jens Axboe Date: Wed Sep 2 12:44:20 2020 -0600 io_uring: io_sq_thread() doesn't need to flush signals We're not handling signals by default in kernel threads, and we never use TWA_SIGNAL for the SQPOLL thread internally. Hence we can never have a signal pending, and we don't need to check for it (nor flush it). Signed-off-by: Jens Axboe commit 95da84659226d75698a1ab958be0af21d9cc2a9c Author: Sebastian Andrzej Siewior Date: Tue Sep 1 10:41:46 2020 +0200 io_wq: Make io_wqe::lock a raw_spinlock_t During a context switch the scheduler invokes wq_worker_sleeping() with disabled preemption. Disabling preemption is needed because it protects access to `worker->sleeping'. As an optimisation it avoids invoking schedule() within the schedule path as part of possible wake up (thus preempt_enable_no_resched() afterwards). The io-wq has been added to the mix in the same section with disabled preemption. This breaks on PREEMPT_RT because io_wq_worker_sleeping() acquires a spinlock_t. Also within the schedule() the spinlock_t must be acquired after tsk_is_pi_blocked() otherwise it will block on the sleeping lock again while scheduling out. While playing with `io_uring-bench' I didn't notice a significant latency spike after converting io_wqe::lock to a raw_spinlock_t. The latency was more or less the same. In order to keep the spinlock_t it would have to be moved after the tsk_is_pi_blocked() check which would introduce a branch instruction into the hot path. The lock is used to maintain the `work_list' and wakes one task up at most. Should io_wqe_cancel_pending_work() cause latency spikes, while searching for a specific item, then it would need to drop the lock during iterations. revert_creds() is also invoked under the lock. According to debug cred::non_rcu is 0. Otherwise it should be moved outside of the locked section because put_cred_rcu()->free_uid() acquires a sleeping lock. Convert io_wqe::lock to a raw_spinlock_t.c Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jens Axboe commit 7e84e1c7566a1df470a9e1f49d3db2ce311261a4 Author: Stefano Garzarella Date: Thu Aug 27 16:58:31 2020 +0200 io_uring: allow disabling rings during the creation This patch adds a new IORING_SETUP_R_DISABLED flag to start the rings disabled, allowing the user to register restrictions, buffers, files, before to start processing SQEs. When IORING_SETUP_R_DISABLED is set, SQE are not processed and SQPOLL kthread is not started. The restrictions registration are allowed only when the rings are disable to prevent concurrency issue while processing SQEs. The rings can be enabled using IORING_REGISTER_ENABLE_RINGS opcode with io_uring_register(2). Suggested-by: Jens Axboe Signed-off-by: Stefano Garzarella Reviewed-by: Kees Cook Signed-off-by: Jens Axboe commit 21b55dbc0653018b8cd4513c37cbca303b0f0d50 Author: Stefano Garzarella Date: Thu Aug 27 16:58:30 2020 +0200 io_uring: add IOURING_REGISTER_RESTRICTIONS opcode The new io_uring_register(2) IOURING_REGISTER_RESTRICTIONS opcode permanently installs a feature allowlist on an io_ring_ctx. The io_ring_ctx can then be passed to untrusted code with the knowledge that only operations present in the allowlist can be executed. The allowlist approach ensures that new features added to io_uring do not accidentally become available when an existing application is launched on a newer kernel version. Currently is it possible to restrict sqe opcodes, sqe flags, and register opcodes. IOURING_REGISTER_RESTRICTIONS can only be made once. Afterwards it is not possible to change restrictions anymore. This prevents untrusted code from removing restrictions. Suggested-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Reviewed-by: Kees Cook Signed-off-by: Jens Axboe commit 9d4a75efa200a31deabe9ba1c941aef697e6bb30 Author: Stefano Garzarella Date: Thu Aug 27 16:58:29 2020 +0200 io_uring: use an enumeration for io_uring_register(2) opcodes The enumeration allows us to keep track of the last io_uring_register(2) opcode available. Behaviour and opcodes names don't change. Signed-off-by: Stefano Garzarella Reviewed-by: Kees Cook Signed-off-by: Jens Axboe commit a3ec60054082ca2c2145ba487f9fc4de904e2b03 Author: Jens Axboe Date: Fri Sep 18 20:41:00 2020 -0600 io_uring: move io_uring_get_socket() into io_uring.h Now we have a io_uring kernel header, move this definition out of fs.h and into io_uring.h where it belongs. Signed-off-by: Jens Axboe commit 9b8284921513fc1ea57d87777283a59b05862f03 Author: Jens Axboe Date: Fri Sep 18 20:13:06 2020 -0600 io_uring: reference ->nsproxy for file table commands If we don't get and assign the namespace for the async work, then certain paths just don't work properly (like /dev/stdin, /proc/mounts, etc). Anything that references the current namespace of the given task should be assigned for async work on behalf of that task. Cc: stable@vger.kernel.org # v5.5+ Reported-by: Al Viro Signed-off-by: Jens Axboe commit 0f2122045b946241a9e549c2a76cea54fa58a7ff Author: Jens Axboe Date: Sun Sep 13 13:09:39 2020 -0600 io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. With that, we can grab proper references to the files table, and no longer need to rely on stashing away ring_fd and ring_file to check if the ring_fd may have been closed. Cc: stable@vger.kernel.org # v5.5+ Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e6c8aa9ac33bd7c968af7816240fc081401fddcd Author: Jens Axboe Date: Mon Sep 28 13:10:13 2020 -0600 io_uring: enable task/files specific overflow flushing This allows us to selectively flush out pending overflows, depending on the task and/or files_struct being passed in. No intended functional changes in this patch. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 76e1b6427fd8246376a97e3227049d49188dfb9c Author: Jens Axboe Date: Sat Sep 26 15:05:03 2020 -0600 io_uring: return cancelation status from poll/timeout/files handlers Return whether we found and canceled requests or not. This is in preparation for using this information, no functional changes in this patch. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e3bc8e9dad7f2f83cc807111d4472164c9210153 Author: Jens Axboe Date: Thu Sep 24 08:45:57 2020 -0600 io_uring: unconditionally grab req->task Sometimes we assign a weak reference to it, sometimes we grab a reference to it. Clean this up and make it unconditional, and drop the flag related to tracking this state. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2aede0e417db846793c276c7a1bbf7262c8349b0 Author: Jens Axboe Date: Mon Sep 14 10:45:53 2020 -0600 io_uring: stash ctx task reference for SQPOLL We can grab a reference to the task instead of stashing away the task files_struct. This is doable without creating a circular reference between the ring fd and the task itself. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f573d384456b3025d3f8e58b3eafaeeb0f510784 Author: Jens Axboe Date: Tue Sep 22 10:19:24 2020 -0600 io_uring: move dropping of files into separate helper No functional changes in this patch, prep patch for grabbing references to the files_struct. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f3606e3a92ddd36299642c78592fc87609abb1f6 Author: Jens Axboe Date: Tue Sep 22 08:18:24 2020 -0600 io_uring: allow timeout/poll/files killing to take task into account We currently cancel these when the ring exits, and we cancel all of them. This is in preparation for killing only the ones associated with a given task. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0f078896911fc6a421b0e708e910b99a28f8a0fa Merge: fb0155a09b022 c8d317aa1887b Author: Jens Axboe Date: Wed Sep 30 20:32:25 2020 -0600 Merge branch 'io_uring-5.9' into for-5.10/io_uring * io_uring-5.9: io_uring: fix async buffered reads when readahead is disabled io_uring: fix potential ABBA deadlock in ->show_fdinfo() io_uring: always delete double poll wait entry on match commit 3effc06a4dde3e2f6ee3d82e59d97ec357802a4b Author: Jean-Philippe Brucker Date: Wed Sep 30 11:36:01 2020 +0200 selftests/bpf: Fix alignment of .BTF_ids Fix a build failure on arm64, due to missing alignment information for the .BTF_ids section: resolve_btfids.test.o: in function `test_resolve_btfids': tools/testing/selftests/bpf/prog_tests/resolve_btfids.c:140:(.text+0x29c): relocation truncated to fit: R_AARCH64_LDST32_ABS_LO12_NC against `.BTF_ids' ld: tools/testing/selftests/bpf/prog_tests/resolve_btfids.c:140: warning: one possible cause of this error is that the symbol is being referenced in the indicated code as if it had a larger alignment than was declared where it was defined In vmlinux, the .BTF_ids section is aligned to 4 bytes by vmlinux.lds.h. In test_progs however, .BTF_ids doesn't have alignment constraints. The arm64 linker expects the btf_id_set.cnt symbol, a u32, to be naturally aligned but finds it misaligned and cannot apply the relocation. Enforce alignment of .BTF_ids to 4 bytes. Fixes: cd04b04de119 ("selftests/bpf: Add set test to resolve_btfids") Signed-off-by: Jean-Philippe Brucker Signed-off-by: Alexei Starovoitov Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20200930093559.2120126-1-jean-philippe@linaro.org commit f2e834694b0d92187d889172da842e27829df371 Merge: 8333c1c4ee61c b7cc6d3c5c915 Author: David S. Miller Date: Wed Sep 30 18:01:27 2020 -0700 Merge branch 'drop_monitor-Convert-to-use-devlink-tracepoint' Ido Schimmel says: ==================== drop_monitor: Convert to use devlink tracepoint Drop monitor is able to monitor both software and hardware originated drops. Software drops are monitored by having drop monitor register its probe on the 'kfree_skb' tracepoint. Hardware originated drops are monitored by having devlink call into drop monitor whenever it receives a dropped packet from the underlying hardware. This patch set converts drop monitor to monitor both software and hardware originated drops in the same way - by registering its probe on the relevant tracepoint. In addition to drop monitor being more consistent, it is now also possible to build drop monitor as module instead of as a builtin and still monitor hardware originated drops. Initially, CONFIG_NET_DEVLINK implied CONFIG_NET_DROP_MONITOR, but after commit def2fbffe62c ("kconfig: allow symbols implied by y to become m") we can have CONFIG_NET_DEVLINK=y and CONFIG_NET_DROP_MONITOR=m and hardware originated drops will not be monitored. Patch set overview: Patch #1 adds a tracepoint in devlink for trap reports. Patch #2 prepares probe functions in drop monitor for the new tracepoint. Patch #3 converts drop monitor to use the new tracepoint. Patches #4-#6 perform cleanups after the conversion. Patch #7 adds a test case for drop monitor. Both software originated drops and hardware originated drops (using netdevsim) are tested. Tested: | CONFIG_NET_DEVLINK | CONFIG_NET_DROP_MONITOR | Build | SW drops | HW drops | | -------------------|-------------------------|-------|----------|----------| | y | y | v | v | v | | y | m | v | v | v | | y | n | v | x | x | | n | y | v | v | x | | n | m | v | v | x | | n | n | v | x | x | ==================== Signed-off-by: David S. Miller commit b7cc6d3c5c9151a0475d643e212279e82531e527 Author: Ido Schimmel Date: Tue Sep 29 11:15:56 2020 +0300 selftests: net: Add drop monitor test Test that drop monitor correctly captures both software and hardware originated packet drops. # ./drop_monitor_tests.sh Software drops test TEST: Capturing active software drops [ OK ] TEST: Capturing inactive software drops [ OK ] Hardware drops test TEST: Capturing active hardware drops [ OK ] TEST: Capturing inactive hardware drops [ OK ] Tests passed: 4 Tests failed: 0 Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 93e155967ccc053b71d408edf8c0142199df5c8c Author: Ido Schimmel Date: Tue Sep 29 11:15:55 2020 +0300 drop_monitor: Filter control packets in drop monitor Previously, devlink called into drop monitor in order to report hardware originated drops / exceptions. devlink intentionally filtered control packets and did not pass them to drop monitor as they were not dropped by the underlying hardware. Now drop monitor registers its probe on a generic 'devlink_trap_report' tracepoint and should therefore perform this filtering itself instead of having devlink do that. Add the trap type as metadata and have drop monitor ignore control packets. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit a848c05f4bb6c2db9e686e2440454af811e6d2e5 Author: Ido Schimmel Date: Tue Sep 29 11:15:54 2020 +0300 drop_monitor: Remove duplicate struct 'struct net_dm_hw_metadata' is a duplicate of 'struct devlink_trap_metadata'. Remove the former and simplify the code. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit de9cbb81bd6e727dcac665e399ad4fcd01d3961b Author: Ido Schimmel Date: Tue Sep 29 11:15:53 2020 +0300 drop_monitor: Remove no longer used functions The old probe functions that were invoked by drop monitor code are no longer called and can thus be removed. They were replaced by actual probe functions that are registered on the recently introduced 'devlink_trap_report' tracepoint. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 8ee2267ad33e0ba021e9dd9b437f773906cd99d6 Author: Ido Schimmel Date: Tue Sep 29 11:15:52 2020 +0300 drop_monitor: Convert to using devlink tracepoint Convert drop monitor to use the recently introduced 'devlink_trap_report' tracepoint instead of having devlink call into drop monitor. This is both consistent with software originated drops ('kfree_skb' tracepoint) and also allows drop monitor to be built as a module and still report hardware originated drops. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 5855357cd40e8b2ccdcc30f8ae0dac3f0f892ccd Author: Ido Schimmel Date: Tue Sep 29 11:15:51 2020 +0300 drop_monitor: Prepare probe functions for devlink tracepoint Drop monitor supports two alerting modes: Summary and packet. Prepare a probe function for each, so that they could be later registered on the devlink tracepoint by calling register_trace_devlink_trap_report(), based on the configured alerting mode. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 5b88823bfe0875b327cc041017b5dcbec9dcbcc8 Author: Ido Schimmel Date: Tue Sep 29 11:15:50 2020 +0300 devlink: Add a tracepoint for trap reports Add a tracepoint for trap reports so that drop monitor could register its probe on it. Use trace_devlink_trap_report_enabled() to avoid wasting cycles setting the trap metadata if the tracepoint is not enabled. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 8333c1c4ee61c873bdb5327dba858f58de2a98d8 Merge: 11789fe7761b4 5a9323f55d52c Author: David S. Miller Date: Wed Sep 30 15:21:43 2020 -0700 Merge tag 'linux-can-next-for-5.10-20200930' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2020-09-30 this is a pull request of 13 patches for net-next. The first 10 target the mcp25xxfd driver (which is renamed to mcp251xfd during this series). The first two patches are by Thomas Kopp, which adds reference to the just related errata and updates the documentation and log messages. Dan Carpenter's patch fixes a resource leak during ifdown. A patch by me adds the missing initialization of a variable. Oleksij Rempel updates the DT binding documentation as requested by Rob Herring. The next 5 patches are by Thomas Kopp and me. During review Geert Uytterhoeven suggested to use "microchip,mcp251xfd" instead of "microchip,mcp25xxfd" as the DT autodetection compatible to avoid clashes with future but incompatible devices. We decided not only to rename the compatible but the whole driver from "mcp25xxfd" to "mcp251xfd". This is done in several patches. Joakim Zhang contributes three patches for the flexcan driver. The first one adds support for the ECC feature, which is implemented on some modern IP cores, by initializing the controller's memory during ifup. The next patch adds support for the i.MX8MP (which supports ECC) and the last patch properly disables the runtime PM if device registration fails. ==================== Signed-off-by: David S. Miller commit b0e85c3c8554944c6ec599656931b54062c38823 Author: Jim Quinlan Date: Mon Sep 28 15:46:51 2020 -0400 PCI: Add Kconfig options for MPS/MRRS strategy Add Kconfig options for changing the default pcie_bus_config, i.e., the strategy for configuration MPS and MRRS, in the same manner as the CONFIG_PCIEASPM_XXXX choice. The pci_bus_config setting may still be overridden by kernel command-line parameters, e.g., "pci=pcie_bus_tune_off". [bhelgaas: depend on EXPERT, tweak help texts] Link: https://lore.kernel.org/r/20200928194651.5393-2-james.quinlan@broadcom.com Signed-off-by: Jim Quinlan Signed-off-by: Bjorn Helgaas commit 81196e2e57fc5b88f6b8ca98372a3dde047aa49d Author: Lucas Stach Date: Wed Sep 30 10:40:47 2020 +0200 power: supply: ucs1002: fix some health status issues Some fault events like the over-current condition will get resolved by the hardware, by e.g. disabling the port. As the status in the interrupt status register is cleared on read when the fault is resolved, the sysfs health property will only contain the correct health status for the first time it is read after such an event, even if the actual fault condition (like a VBUS short) still persists. To reflect this properly in the property we cache the last health status and only update the cache when a actual change happens, i.e. the ERR bit in the status register flips, as this one properly reflects a continued fault condition. The ALERT pin however, is not driven by the ERR status, but by the actual fault status, so the pin will change back to it's default state when the hardware has automatically resolved the fault by cutting the power. Thus we never get an IRQ when the actual fault condition has been resolved and the ERR status bit has been cleared in auto-recovery mode. To get this information we need to poll the interrupt status register after some time to see if the fault is gone and update our cache in that case. To avoid any additional locking, we handle both paths (IRQ firing and delayed polling) through the same single-threaded delayed work. Signed-off-by: Lucas Stach Signed-off-by: Sebastian Reichel commit 11789fe7761b4821314d8be341b01ffc775b37a4 Merge: 9b5cbf469d7ef 0816e0c8188e7 Author: David S. Miller Date: Wed Sep 30 15:11:09 2020 -0700 Merge branch 'ionic-watchdog-training' Shannon Nelson says: ==================== ionic watchdog training Our link watchdog displayed a couple of unfriendly behaviors in some recent stress testing. These patches change the startup and stop timing in order to be sure that expected structures are ready to be used by the watchdog. ==================== Signed-off-by: David S. Miller commit 0816e0c8188e7db85a7284d3f0f456947ebb049c Author: Shannon Nelson Date: Wed Sep 30 10:48:28 2020 -0700 ionic: prevent early watchdog check In one corner case scenario, the driver device lif setup can get delayed such that the ionic_watchdog_cb() timer goes off before the ionic->lif is set, thus causing a NULL pointer panic. We catch the problem by checking for a NULL lif just a little earlier in the callback. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit df8aeaa8268f11dc3c2d0975954624cf324eab15 Author: Shannon Nelson Date: Wed Sep 30 10:48:27 2020 -0700 ionic: stop watchdog timer earlier on remove We need to be better at making sure we don't have a link check watchdog go off while we're shutting things down, so let's stop the timer as soon as we start the remove. Meanwhile, since that was the only thing in ionic_dev_teardown(), simplify and remove that function. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 638c133e5f52a3793cb5494897df008f5cef0ddd Author: Bjorn Helgaas Date: Tue Sep 29 14:24:11 2020 -0500 PCI/PM: Revert "PCI/PM: Apply D2 delay as milliseconds, not microseconds" This reverts commit 7e24bc347e57992d532bc2ed700209b0fc0a4bf5. 7e24bc347e57 was based on PCIe r5.0, sec 5.9, which claims we need a 200 ms delay when transitioning to or from D2. However, sec 5.3.1.3 states the delay as 200 μs (microseconds), as does the table in PCIe r4.0, sec 5.9.1. This looks like a typo in the r5.0 spec, so revert back to a 200 μs delay instead of a 200 ms delay. Fixes: 7e24bc347e57 ("PCI/PM: Apply D2 delay as milliseconds, not microseconds") Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit 454d082dbb47febbfe2998c3953e62cd917abbbf Author: Bjorn Helgaas Date: Tue Sep 29 14:20:15 2020 -0500 PCI/PM: Remove unused PCI_PM_BUS_WAIT 476e7faefc43 ("PCI PM: Do not wait for buses in B2 or B3 during resume") removed the last use of PCI_PM_BUS_WAIT. Remove the definition as well. Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit eec240e25ab3742624f4909802e4a01a874434c9 Author: Julia Lawall Date: Sun Sep 20 13:26:26 2020 +0200 PCI/P2PDMA: Drop double zeroing for sg_init_table() sg_init_table() zeroes its first argument, so the allocation of that argument doesn't have to. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; @@ x = - kzalloc + kmalloc (...) ... sg_init_table(x,...) // Link: https://lore.kernel.org/r/1600601186-7420-15-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Julia Lawall Signed-off-by: Bjorn Helgaas commit 0a98bb98f2c7a47563f71770e458902ec211a6cf Author: Krzysztof Wilczyński Date: Fri Sep 25 22:45:55 2020 +0000 PCI: Simplify bool comparisons Take care about Coccinelle warnings: drivers/pci/pci.c:6008:6-12: WARNING: Comparison to bool drivers/pci/pci.c:6024:7-13: WARNING: Comparison to bool No change to functionality intended. Link: https://lore.kernel.org/r/20200925224555.1752460-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 9b5cbf469d7efb8553635b1f25a6337101dd5f00 Merge: 20c168be684a9 a37c2134bed6f Author: David S. Miller Date: Wed Sep 30 14:21:30 2020 -0700 Merge branch 'tcp-exponential-backoff-in-tcp_send_ack' Eric Dumazet says: ==================== tcp: exponential backoff in tcp_send_ack() We had outages caused by repeated skb allocation failures in tcp_send_ack() It is time to add exponential backoff to reduce number of attempts. Before doing so, first patch removes icsk_ack.blocked to make room for a new field (icsk_ack.retry) ==================== Signed-off-by: David S. Miller commit a37c2134bed6f28c6d6aefa2699331e6e4e9c4f1 Author: Eric Dumazet Date: Wed Sep 30 05:54:57 2020 -0700 tcp: add exponential backoff in __tcp_send_ack() Whenever host is under very high memory pressure, __tcp_send_ack() skb allocation fails, and we setup a 200 ms (TCP_DELACK_MAX) timer before retrying. On hosts with high number of TCP sockets, we can spend considerable amount of cpu cycles in these attempts, add high pressure on various spinlocks in mm-layer, ultimately blocking threads attempting to free space from making any progress. This patch adds standard exponential backoff to avoid adding fuel to the fire. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit b6b6d6533a14b5ddcf9f9c5239fc3721fc6beda0 Author: Eric Dumazet Date: Wed Sep 30 05:54:56 2020 -0700 inet: remove icsk_ack.blocked TCP has been using it to work around the possibility of tcp_delack_timer() finding the socket owned by user. After commit 6f458dfb4092 ("tcp: improve latencies of timer triggered events") we added TCP_DELACK_TIMER_DEFERRED atomic bit for more immediate recovery, so we can get rid of icsk_ack.blocked This frees space that following patch will reuse. Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 20c168be684a97b084525906eb7ed017b7f9c0b8 Author: Alexandre Belloni Date: Wed Sep 30 12:50:59 2020 +0200 net: macb: move pdata to private header struct macb_platform_data is only used by macb_pci to register the platform device, move its definition to cadence/macb.h and remove platform_data/macb.h Signed-off-by: Alexandre Belloni Signed-off-by: David S. Miller commit e13dbc4f41db7f7b86f17a2efd7fbe19fc5b6d7a Merge: 611ba7536e7ec bfa804784e321 Author: David S. Miller Date: Wed Sep 30 14:06:54 2020 -0700 Merge branch 'mlxsw-PFC-and-headroom-selftests' Petr Machata says: ==================== mlxsw: PFC and headroom selftests Recent changes in the headroom management code made it clear that an automated way of testing this functionality is needed. This patchset brings two tests: a synthetic headroom behavior test, which verifies mechanics of headroom management. And a PFC test, which verifies whether this behavior actually translates into a working lossless configuration. Both of these tests rely on mlnx_qos[1], a tool that interfaces with Linux DCB API. The tool was originally written to work with Mellanox NICs, but does not actually rely on anything Mellanox-specific, and can be used for mlxsw as well as for any other NIC-like driver. Unlike Open LLDP it does support buffer commands and permits a fire-and-forget approach to configuration, which makes it very handy for writing of selftests. Patches #1-#3 extend the selftest devlink_lib.sh in various ways. Patch #4 then adds a helper wrapper for mlnx_qos to mlxsw's qos_lib.sh. Patch #5 adds a test for management of port headroom. Patch #6 adds a PFC test. [1] https://github.com/Mellanox/mlnx-tools/ ==================== Signed-off-by: David S. Miller commit bfa804784e321eb6a309a0959a17c64b08fb7ac7 Author: Petr Machata Date: Wed Sep 30 12:49:12 2020 +0200 selftests: mlxsw: Add a PFC test Add a test for PFC. Runs 10MB of traffic through a bottleneck and checks that none of it gets lost. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit a65cc53a0eb882c5f6d49cda947aac7fdc9b0f73 Author: Petr Machata Date: Wed Sep 30 12:49:11 2020 +0200 selftests: mlxsw: Add headroom handling test Add a test for headroom configuration. This covers projection of ETS configuration to ingress, PFC, adjustments for MTU, the qdisc / TC mode and the effect of egress SPAN session on buffer configuration. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 4b94a2fad835ad5022a099105b7bf27eb584d754 Author: Petr Machata Date: Wed Sep 30 12:49:10 2020 +0200 selftests: mlxsw: qos_lib: Add a wrapper for running mlnx_qos mlnx_qos is a script for configuration of DCB. Despite the name it is not actually Mellanox-specific in any way. It is currently the only ad-hoc tool available (in contrast to a daemon that manages an interface on an ongoing basis). However, it is very verbose and parsing out error messages is not really possible. Add a wrapper that makes it easier to use the tool. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 5b3a53c9c843b84955d5a3abda358518a3031630 Author: Petr Machata Date: Wed Sep 30 12:49:09 2020 +0200 selftests: forwarding: devlink_lib: Support port-less topologies Some selftests may not need any actual ports. Technically those are not forwarding selftests, but devlink_lib can still be handy. Fall back on NETIF_NO_CABLE in those cases. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 294f44c19fa65b0c813608d7ddfbb378875eb6b0 Author: Petr Machata Date: Wed Sep 30 12:49:08 2020 +0200 selftests: forwarding: devlink_lib: Add devlink_cell_size_get() Add a helper that answers the cell size of the devlink device. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 6e0972e0c5d8f78b64274fd1a512136aee404610 Author: Petr Machata Date: Wed Sep 30 12:49:07 2020 +0200 selftests: forwarding: devlink_lib: Split devlink_..._set() into save & set Changing pool type from static to dynamic causes reinterpretation of threshold values. They therefore need to be saved before pool type is changed, then the pool type can be changed, and then the new values need to be set up. For that reason, set cannot subsume save, because it would be saving the wrong thing, with possibly a nonsensical value, and restore would then fail to restore the nonsensical value. Thus extract a _save() from each of the relevant _set()'s. This way it is possible to save everything up front, then to tweak it, and then restore in the required order. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 14c9c014babedc6098bf4cd83c622997867bc0df Author: Sean O'Brien Date: Wed Sep 9 15:03:04 2020 -0700 HID: add vivaldi HID driver Add vivaldi HID driver. This driver allows us to read and report the top row layout of keyboards which provide a vendor-defined (Google) HID usage. Signed-off-by: Sean O'Brien Signed-off-by: Jiri Kosina commit 5a9323f55d52c9246ce85f2c9c6a8ec45413b1d0 Author: Joakim Zhang Date: Wed Sep 30 05:15:57 2020 +0800 can: flexcan: disable runtime PM if register flexcandev failed Disable runtime PM if register flexcandev failed, and balance reference of usage_count. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20200929211557.14153-4-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit 3aa2539536b323d17b12ebc15b1fbfdd33f020f7 Author: Joakim Zhang Date: Wed Sep 30 05:15:56 2020 +0800 can: flexcan: add flexcan driver for i.MX8MP Add flexcan driver for i.MX8MP, which supports CAN FD and ECC. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20200929211557.14153-3-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit a6597121d672a27886d266357569efa7af552a73 Author: Joakim Zhang Date: Wed Sep 30 05:15:55 2020 +0800 can: flexcan: initialize all flexcan memory for ECC function One issue was reported at a baremetal environment, which is used for FPGA verification. "The first transfer will fail for extended ID format(for both 2.0B and FD format), following frames can be transmitted and received successfully for extended format, and standard format don't have this issue. This issue occurred randomly with high possiblity, when it occurs, the transmitter will detect a BIT1 error, the receiver a CRC error. According to the spec, a non-correctable error may cause this transfer failure." With FLEXCAN_QUIRK_DISABLE_MECR quirk, it supports correctable errors, disable non-correctable errors interrupt and freeze mode. Platform has ECC hardware support, but select this quirk, this issue may not come to light. Initialize all FlexCAN memory before accessing them, at least it can avoid non-correctable errors detected due to memory uninitialized. The internal region can't be initialized when the hardware doesn't support ECC. According to IMX8MPRM, Rev.C, 04/2020. There is a NOTE at the section 11.8.3.13 Detection and correction of memory errors: "All FlexCAN memory must be initialized before starting its operation in order to have the parity bits in memory properly updated. CTRL2[WRMFRZ] grants write access to all memory positions that require initialization, ranging from 0x080 to 0xADF and from 0xF28 to 0xFFF when the CAN FD feature is enabled. The RXMGMASK, RX14MASK, RX15MASK, and RXFGMASK registers need to be initialized as well. MCR[RFEN] must not be set during memory initialization." Memory range from 0x080 to 0xADF, there are reserved memory (unimplemented by hardware, e.g. only configure 64 MBs), these memory can be initialized or not. In this patch, initialize all flexcan memory which includes reserved memory. In this patch, create FLEXCAN_QUIRK_SUPPORT_ECC for platforms which has ECC feature. If you have a ECC platform in your hand, please select this qurik to initialize all flexcan memory firstly, then you can select FLEXCAN_QUIRK_DISABLE_MECR to only enable correctable errors. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20200929211557.14153-2-qiangqing.zhang@nxp.com [mkl: wrap long lines] Signed-off-by: Marc Kleine-Budde commit eb79a267c9b3e608e7762a1b221428f37ace3aa3 Author: Marc Kleine-Budde Date: Wed Sep 30 10:49:00 2020 +0200 can: mcp251xfd: rename all remaining occurrence to mcp251xfd In [1] Geert noted that the autodetect compatible for the mcp25xxfd driver, which is "microchip,mcp25xxfd" might be too generic and overlap with upcoming, but incompatible chips. In the previous patch the autodetect DT compatbile has been renamed to "microchip,mcp251xfd", this patch changes all non user facing occurrence of "mcp25xxfd" to "mcp251xfd" and "MCP25XXFD" to "MCP251XFD". [1] http://lore.kernel.org/r/CAMuHMdVkwGjr6dJuMyhQNqFoJqbh6Ec5V2b5LenCshwpM2SDsQ@mail.gmail.com Link: https://lore.kernel.org/r/20200930091424.792165-10-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit f4f77366f21dfd6ac69a902313367d638b328ba1 Author: Marc Kleine-Budde Date: Wed Sep 30 10:49:00 2020 +0200 can: mcp251xfd: rename all user facing strings to mcp251xfd In [1] Geert noted that the autodetect compatible for the mcp25xxfd driver, which is "microchip,mcp25xxfd" might be too generic and overlap with upcoming, but incompatible chips. In the previous patch the autodetect DT compatbile has been renamed to "microchip,mcp251xfd", this patch changes all user facing strings from "mcp25xxfd" to "mcp251xfd" and "MCP25XXFD" to "MCP251XFD", including: - kconfig symbols - name of kernel module - DT and SPI compatible [1] http://lore.kernel.org/r/CAMuHMdVkwGjr6dJuMyhQNqFoJqbh6Ec5V2b5LenCshwpM2SDsQ@mail.gmail.com Link: https://lore.kernel.org/r/20200930091424.792165-9-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 1f0e21a0c0651ce3d837f8f76b44bf9de2b030cd Author: Marc Kleine-Budde Date: Wed Sep 30 10:49:00 2020 +0200 can: mcp251xfd: rename driver files and subdir to mcp251xfd In [1] Geert noted that the autodetect compatible for the mcp25xxfd driver, which is "microchip,mcp25xxfd" might be too generic and overlap with upcoming, but incompatible chips. In the previous patch the autodetect DT compatbile has been renamed to "microchip,mcp251xfd", this patch changes the name of the driver subdir and the individual files accordinly. [1] http://lore.kernel.org/r/CAMuHMdVkwGjr6dJuMyhQNqFoJqbh6Ec5V2b5LenCshwpM2SDsQ@mail.gmail.com Link: https://lore.kernel.org/r/20200930091424.792165-8-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 047248cab16b689b2a88ded960e1fd73c30b5510 Author: Pujin Shi Date: Tue Sep 29 17:30:47 2020 +0800 MIPS: process: include exec.h header in process.c arch/mips/kernel/process.c:696:15: error: no previous prototype for 'arch_align_stack' [-Werror=missing-prototypes] Signed-off-by: Pujin Shi Signed-off-by: Thomas Bogendoerfer commit 99419c310ee0f3f9aceff8966b2eeffc03ba76a5 Author: Pujin Shi Date: Tue Sep 29 17:30:46 2020 +0800 MIPS: process: Add prototype for function arch_dup_task_struct This commit adds a prototype to fix warning at W=1: arch/mips/kernel/process.c:95:5: error: no previous prototype for 'arch_dup_task_struct' [-Werror=missing-prototypes] Signed-off-by: Pujin Shi Signed-off-by: Thomas Bogendoerfer commit 0c2915b8c6db108b1dfb240391cc5a175f97f15b Author: Mike Snitzer Date: Mon Sep 28 13:41:36 2020 -0400 dm: fix missing imposition of queue_limits from dm_wq_work() thread If a DM device was suspended when bios were issued to it, those bios would be deferred using queue_io(). Once the DM device was resumed dm_process_bio() could be called by dm_wq_work() for original bio that still needs splitting. dm_process_bio()'s check for current->bio_list (meaning call chain is within ->submit_bio) as a prerequisite for calling blk_queue_split() for "abnormal IO" would result in dm_process_bio() never imposing corresponding queue_limits (e.g. discard_granularity, discard_max_bytes, etc). Fix this by always having dm_wq_work() resubmit deferred bios using submit_bio_noacct(). Side-effect is blk_queue_split() is always called for "abnormal IO" from ->submit_bio, be it from application thread or dm_wq_work() workqueue, so proper bio splitting and depth-first bio submission is performed. For sake of clarity, remove current->bio_list check before call to blk_queue_split(). Also, remove dm_wq_work()'s use of dm_{get,put}_live_table() -- no longer needed since IO will be reissued in terms of ->submit_bio. And rename bio variable from 'c' to 'bio'. Fixes: cf9c37865557 ("dm: fix comment in dm_process_bio()") Reported-by: Jeffle Xu Reviewed-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit f4d385e4d51d035c7f0d68a3e9564c9453c13aa4 Author: Andrii Nakryiko Date: Tue Sep 29 16:28:43 2020 -0700 selftests/bpf: Test "incremental" btf_dump in C format Add test validating that btf_dump works fine with BTFs that are modified and incrementally generated. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200929232843.1249318-5-andriin@fb.com commit 9c6c5c48d7e9c00c541e0f1a5cea3a96767e825c Author: Andrii Nakryiko Date: Tue Sep 29 16:28:40 2020 -0700 libbpf: Make btf_dump work with modifiable BTF Ensure that btf_dump can accommodate new BTF types being appended to BTF instance after struct btf_dump was created. This came up during attemp to use btf_dump for raw type dumping in selftests, but given changes are not excessive, it's good to not have any gotchas in API usage, so I decided to support such use case in general. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200929232843.1249318-2-andriin@fb.com commit f2fa07b39fafb2a5f49c71a504862c5efa57d03e Author: Ramesh Errabolu Date: Tue Sep 29 12:15:13 2020 -0500 drm/amd/amdkfd: Surface files in Sysfs to allow users to get number of compute units that are in use. [Why] Allow user to know how many compute units (CU) are in use at any given moment. [How] Surface files in Sysfs that allow user to determine the number of compute units that are in use for a given process. One Sysfs file is used per device. Signed-off-by: Ramesh Errabolu Reviewed-By: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 43a4bc828c5b156f08024fd0a966c5c2a3f09af1 Author: Ramesh Errabolu Date: Tue Sep 29 12:14:08 2020 -0500 drm/amd/amdgpu: Define and implement a function that collects number of waves that are in flight. [Why] Allow user to know how many compute units (CU) are in use at any given moment. [How] Read registers of SQ that give number of waves that are in flight of various queues. Use this information to determine number of CU's in use. Signed-off-by: Ramesh Errabolu Reviewed-By: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit ea7da1d563f11ee5f853fd19fc178ff17e990d09 Merge: 963ec27a10fa6 eef4a011f35d3 Author: Alexei Starovoitov Date: Wed Sep 30 11:50:35 2020 -0700 Merge branch 'Various BPF helper improvements' Daniel Borkmann says: ==================== This series adds two BPF helpers, that is, one for retrieving the classid of an skb and another one to redirect via the neigh subsystem, and improves also the cookie helpers by removing the atomic counter. I've also added the bpf_tail_call_static() helper to the libbpf API that we've been using in Cilium for a while now, and last but not least the series adds a few selftests. For details, please check individual patches, thanks! v3 -> v4: - Removed out_rec error path (Martin) - Integrate BPF_F_NEIGH flag into rejecting invalid flags (Martin) - I think this way it's better to avoid bit overlaps given it's right in the place that would need to be extended on new flags v2 -> v3: - Removed double skb->dev = dev assignment (David) - Added headroom check for v6 path (David) - Set set flowi4_proto for ip_route_output_flow (David) - Rebased onto latest bpf-next v1 -> v2: - Rework cookie generator to support nested contexts (Eric) - Use ip_neigh_gw6() and container_of() (David) - Rename __throw_build_bug() and improve comments (Andrii) - Use bpf_tail_call_static() also in BPF samples (Maciej) ==================== Signed-off-by: Alexei Starovoitov commit eef4a011f35d3aa657d4995c53ccb240d9eaea73 Author: Daniel Borkmann Date: Wed Sep 30 17:18:20 2020 +0200 bpf, selftests: Add redirect_neigh selftest Add a small test that exercises the new redirect_neigh() helper for the IPv4 and IPv6 case. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/0fc7d9c5f9a6cc1c65b0d3be83b44b1ec9889f43.1601477936.git.daniel@iogearbox.net commit faef26fa444dc44eeff70c9a63ebe7fef00b6c37 Author: Daniel Borkmann Date: Wed Sep 30 17:18:19 2020 +0200 bpf, selftests: Use bpf_tail_call_static where appropriate For those locations where we use an immediate tail call map index use the newly added bpf_tail_call_static() helper. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/3cfb2b799a62d22c6e7ae5897c23940bdcc24cbc.1601477936.git.daniel@iogearbox.net commit 0e9f6841f664f801a69d27f765dc70b8a93e1959 Author: Daniel Borkmann Date: Wed Sep 30 17:18:18 2020 +0200 bpf, libbpf: Add bpf_tail_call_static helper for bpf programs Port of tail_call_static() helper function from Cilium's BPF code base [0] to libbpf, so others can easily consume it as well. We've been using this in production code for some time now. The main idea is that we guarantee that the kernel's BPF infrastructure and JIT (here: x86_64) can patch the JITed BPF insns with direct jumps instead of having to fall back to using expensive retpolines. By using inline asm, we guarantee that the compiler won't merge the call from different paths with potentially different content of r2/r3. We're also using Cilium's __throw_build_bug() macro (here as: __bpf_unreachable()) in different places as a neat trick to trigger compilation errors when compiler does not remove code at compilation time. This works for the BPF back end as it does not implement the __builtin_trap(). [0] https://github.com/cilium/cilium/commit/f5537c26020d5297b70936c6b7d03a1e412a1035 Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1656a082e077552eb46642d513b4a6bde9a7dd01.1601477936.git.daniel@iogearbox.net commit b4ab31414970a7a03a5d55d75083f2c101a30592 Author: Daniel Borkmann Date: Wed Sep 30 17:18:17 2020 +0200 bpf: Add redirect_neigh helper as redirect drop-in Add a redirect_neigh() helper as redirect() drop-in replacement for the xmit side. Main idea for the helper is to be very similar in semantics to the latter just that the skb gets injected into the neighboring subsystem in order to let the stack do the work it knows best anyway to populate the L2 addresses of the packet and then hand over to dev_queue_xmit() as redirect() does. This solves two bigger items: i) skbs don't need to go up to the stack on the host facing veth ingress side for traffic egressing the container to achieve the same for populating L2 which also has the huge advantage that ii) the skb->sk won't get orphaned in ip_rcv_core() when entering the IP routing layer on the host stack. Given that skb->sk neither gets orphaned when crossing the netns as per 9c4c325252c5 ("skbuff: preserve sock reference when scrubbing the skb.") the helper can then push the skbs directly to the phys device where FQ scheduler can do its work and TCP stack gets proper backpressure given we hold on to skb->sk as long as skb is still residing in queues. With the helper used in BPF data path to then push the skb to the phys device, I observed a stable/consistent TCP_STREAM improvement on veth devices for traffic going container -> host -> host -> container from ~10Gbps to ~15Gbps for a single stream in my test environment. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Reviewed-by: David Ahern Acked-by: Martin KaFai Lau Cc: David Ahern Link: https://lore.kernel.org/bpf/f207de81629e1724899b73b8112e0013be782d35.1601477936.git.daniel@iogearbox.net commit 92acdc58ab11af66fcaef485433fde61b5e32fac Author: Daniel Borkmann Date: Wed Sep 30 17:18:16 2020 +0200 bpf, net: Rework cookie generator as per-cpu one With its use in BPF, the cookie generator can be called very frequently in particular when used out of cgroup v2 hooks (e.g. connect / sendmsg) and attached to the root cgroup, for example, when used in v1/v2 mixed environments. In particular, when there's a high churn on sockets in the system there can be many parallel requests to the bpf_get_socket_cookie() and bpf_get_netns_cookie() helpers which then cause contention on the atomic counter. As similarly done in f991bd2e1421 ("fs: introduce a per-cpu last_ino allocator"), add a small helper library that both can use for the 64 bit counters. Given this can be called from different contexts, we also need to deal with potential nested calls even though in practice they are considered extremely rare. One idea as suggested by Eric Dumazet was to use a reverse counter for this situation since we don't expect 64 bit overflows anyways; that way, we can avoid bigger gaps in the 64 bit counter space compared to just batch-wise increase. Even on machines with small number of cores (e.g. 4) the cookie generation shrinks from min/max/med/avg (ns) of 22/50/40/38.9 down to 10/35/14/17.3 when run in parallel from multiple CPUs. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Reviewed-by: Eric Dumazet Acked-by: Martin KaFai Lau Cc: Eric Dumazet Link: https://lore.kernel.org/bpf/8a80b8d27d3c49f9a14e1d5213c19d8be87d1dc8.1601477936.git.daniel@iogearbox.net commit b426ce83baa7dff947fb354118d3133f2953aac8 Author: Daniel Borkmann Date: Wed Sep 30 17:18:15 2020 +0200 bpf: Add classid helper only based on skb->sk Similarly to 5a52ae4e32a6 ("bpf: Allow to retrieve cgroup v1 classid from v2 hooks"), add a helper to retrieve cgroup v1 classid solely based on the skb->sk, so it can be used as key as part of BPF map lookups out of tc from host ns, in particular given the skb->sk is retained these days when crossing net ns thanks to 9c4c325252c5 ("skbuff: preserve sock reference when scrubbing the skb."). This is similar to bpf_skb_cgroup_id() which implements the same for v2. Kubernetes ecosystem is still operating on v1 however, hence net_cls needs to be used there until this can be dropped in with the v2 helper of bpf_skb_cgroup_id(). Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/ed633cf27a1c620e901c5aa99ebdefb028dce600.1601477936.git.daniel@iogearbox.net commit 2ee9bf346fbfd1dad0933b9eb3a4c2c0979b633e Author: Jason Gunthorpe Date: Wed Sep 30 10:20:07 2020 +0300 RDMA/addr: Fix race with netevent_callback()/rdma_addr_cancel() This three thread race can result in the work being run once the callback becomes NULL: CPU1 CPU2 CPU3 netevent_callback() process_one_req() rdma_addr_cancel() [..] spin_lock_bh() set_timeout() spin_unlock_bh() spin_lock_bh() list_del_init(&req->list); spin_unlock_bh() req->callback = NULL spin_lock_bh() if (!list_empty(&req->list)) // Skipped! // cancel_delayed_work(&req->work); spin_unlock_bh() process_one_req() // again req->callback() // BOOM cancel_delayed_work_sync() The solution is to always cancel the work once it is completed so any in between set_timeout() does not result in it running again. Cc: stable@vger.kernel.org Fixes: 44e75052bc2a ("RDMA/rdma_cm: Make rdma_addr_cancel into a fence") Link: https://lore.kernel.org/r/20200930072007.1009692-1-leon@kernel.org Reported-by: Dan Aloni Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a6f0b08dbaf289c3c57284e16ac8043140f2139b Author: Jason Gunthorpe Date: Tue Sep 29 13:09:07 2020 -0300 RDMA/core: Remove ucontext->closing Nothing reads this any more, and the reason for its existence has passed due to the deferred fput() scheme. Fixes: 8ea1f989aa07 ("drivers/IB,usnic: reduce scope of mmap_sem") Link: https://lore.kernel.org/r/0-v1-df64ff042436+42-uctx_closing_jgg@nvidia.com Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c60b93cd4862d108214a14e655358ea714d7a12a Author: Chris Wilson Date: Mon Sep 28 22:59:42 2020 +0100 drm/i915: Avoid mixing integer types during batch copies Be consistent and use unsigned long throughout the chunk copies to avoid the inherent clumsiness of mixing integer types of different widths and signs. Failing to take acount of a wider unsigned type when using min_t can lead to treating it as a negative, only for it flip back to a large unsigned value after passing a boundary check. Fixes: ed13033f0287 ("drm/i915/cmdparser: Only cache the dst vmap") Testcase: igt/gen9_exec_parse/bb-large Reported-by: "Candelaria, Jared" Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: "Candelaria, Jared" Cc: "Bloomfield, Jon" Cc: # v4.9+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200928215942.31917-1-chris@chris-wilson.co.uk (cherry picked from commit b7eeb2b4132ccf1a7d38f434cde7043913d1ed3c) Signed-off-by: Rodrigo Vivi commit 651dabe27f9638f569f6a794f9d3cc1889cd315e Author: Chris Wilson Date: Mon Sep 28 23:15:10 2020 +0100 drm/i915/gem: Always test execution status on closing the context Verify that if a context is active at the time it is closed, that it is either persistent and preemptible (with hangcheck running) or it shall be removed from execution. Fixes: 9a40bddd47ca ("drm/i915/gt: Expose heartbeat interval via sysfs") Testcase: igt/gem_ctx_persistence/heartbeat-close Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: # v5.7+ Reviewed-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20200928221510.26044-3-chris@chris-wilson.co.uk (cherry picked from commit d3bb2f9b5ee66d5e000293edd6b6575e59d11db9) Signed-off-by: Rodrigo Vivi commit ca65fc0d8e01dca8fc82f0ccf433725469256c71 Author: Chris Wilson Date: Mon Sep 28 23:15:09 2020 +0100 drm/i915/gt: Always send a pulse down the engine after disabling heartbeat Currently, we check we can send a pulse prior to disabling the heartbeat to verify that we can change the heartbeat, but since we may re-evaluate execution upon changing the heartbeat interval we need another pulse afterwards to refresh execution. v2: Tvrtko asked if we could reduce the double pulse to a single, which opened up a discussion of how we should handle the pulse-error after attempting to change the property, and the desire to serialise adjustment of the property with its validating pulse, and unwind upon failure. Fixes: 9a40bddd47ca ("drm/i915/gt: Expose heartbeat interval via sysfs") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: # v5.7+ Reviewed-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20200928221510.26044-2-chris@chris-wilson.co.uk (cherry picked from commit 3dd66a94de59d7792e7917eb3075342e70f06f44) Signed-off-by: Rodrigo Vivi commit 7d442ea7c504adcc9798b07cd8f6a0d235fca2da Author: Chris Wilson Date: Mon Sep 28 23:15:08 2020 +0100 drm/i915: Cancel outstanding work after disabling heartbeats on an engine We only allow persistent requests to remain on the GPU past the closure of their containing context (and process) so long as they are continuously checked for hangs or allow other requests to preempt them, as we need to ensure forward progress of the system. If we allow persistent contexts to remain on the system after the the hangcheck mechanism is disabled, the system may grind to a halt. On disabling the mechanism, we sent a pulse along the engine to remove all executing contexts from the engine which would check for hung contexts -- but we did not prevent those contexts from being resubmitted if they survived the final hangcheck. Fixes: 9a40bddd47ca ("drm/i915/gt: Expose heartbeat interval via sysfs") Testcase: igt/gem_ctx_persistence/heartbeat-stop Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: # v5.7+ Reviewed-by: Tvrtko Ursulin Acked-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20200928221510.26044-1-chris@chris-wilson.co.uk (cherry picked from commit 7a991cd3e3da9a56d5616b62d425db000a3242f2) Signed-off-by: Rodrigo Vivi commit 3cfea8c97c93321578823c745e2ca8c8f03993ff Author: Chris Wilson Date: Fri Sep 25 11:11:07 2020 +0100 drm/i915/gem: Hold request reference for canceling an active context We have to be very careful while walking the timeline->requests list under the RCU guard, as the requests (and so rq->link) use SLAB_TYPESAFE_BY_RCU and so the requests may be reallocated within an rcu grace period. As the requests are reallocated, they are removed from one list and placed on another, and if we are iterating over that request at that moment, the list iteration jumps from one list to the next and promptly gets confused. Verify we hold the request reference to ensure that the request is not added to a new list behind our backs. <4> [582.745252] general protection fault, probably for non-canonical address 0xcccccccccccccd5c: 0000 [#1] PREEMPT SMP PTI <4> [582.745297] CPU: 0 PID: 1475 Comm: gem_ctx_persist Not tainted 5.9.0-rc1-CI-CI_DRM_8908+ #1 <4> [582.745304] Hardware name: Intel Corporation NUC7CJYH/NUC7JYB, BIOS JYGLKCPX.86A.0027.2018.0125.1347 01/25/2018 <4> [582.745317] RIP: 0010:__lock_acquire+0x2c3/0x1f40 <4> [582.745323] Code: 00 65 8b 05 c7 8a ef 7e 85 c0 0f 85 b4 07 00 00 44 8b 9d c4 08 00 00 45 85 db 0f 84 0f 01 00 00 ba 05 00 00 00 e9 c8 06 00 00 <48> 81 3f c0 89 c7 82 b8 00 00 00 00 41 0f 45 c0 83 fe 01 41 89 c3 <4> [582.745334] RSP: 0018:ffffc9000461bc40 EFLAGS: 00010002 <4> [582.745340] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 <4> [582.745345] RDX: 0000000000000000 RSI: 0000000000000000 RDI: cccccccccccccd5c <4> [582.745350] RBP: ffff8881ec4a2880 R08: 0000000000000001 R09: 0000000000000001 <4> [582.745356] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000 <4> [582.745361] R13: 0000000000000000 R14: 0000000000000000 R15: cccccccccccccd5c <4> [582.745367] FS: 00007fb44da78e40(0000) GS:ffff888278000000(0000) knlGS:0000000000000000 <4> [582.745373] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [582.745378] CR2: 00007fb44daad040 CR3: 0000000268428000 CR4: 0000000000350ef0 <4> [582.745383] Call Trace: <4> [582.745390] ? __lock_acquire+0x913/0x1f40 <4> [582.745397] lock_acquire+0xb5/0x3c0 <4> [582.745526] ? kill_engines+0x19a/0x4b0 [i915] <4> [582.745533] ? find_held_lock+0x2d/0x90 <4> [582.745541] _raw_spin_lock_irq+0x30/0x40 <4> [582.745635] ? kill_engines+0x19a/0x4b0 [i915] <4> [582.745727] kill_engines+0x19a/0x4b0 [i915] <4> [582.745820] context_close+0x195/0x410 [i915] <4> [582.745912] i915_gem_context_close+0x5b/0x160 [i915] <4> [582.745994] i915_driver_postclose+0x14/0x40 [i915] <4> [582.746003] drm_file_free.part.13+0x240/0x290 <4> [582.746009] drm_release_noglobal+0x16/0x50 <4> [582.746016] __fput+0xa5/0x250 <4> [582.746021] task_work_run+0x6e/0xb0 <4> [582.746028] exit_to_user_mode_prepare+0x178/0x180 <4> [582.746034] syscall_exit_to_user_mode+0x36/0x220 <4> [582.746040] entry_SYSCALL_64_after_hwframe+0x44/0xa9 <4> [582.746045] RIP: 0033:0x7fb44d1dc421 <4> [582.746050] Code: f7 d8 64 89 02 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 8b 05 ea cf 20 00 85 c0 75 16 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 3f f3 c3 0f 1f 44 00 00 53 89 fb 48 83 ec 10 <4> [582.746062] RSP: 002b:00007ffed2e83818 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 <4> [582.746069] RAX: 0000000000000000 RBX: 0000556410bfe840 RCX: 00007fb44d1dc421 <4> [582.746075] RDX: 000000000000000a RSI: 00000000c0406469 RDI: 0000000000000008 <4> [582.746080] RBP: 0000000000000008 R08: 00007fb44d1c51cc R09: 00007fb44d1c5240 <4> [582.746086] R10: 0000000000000001 R11: 0000000000000246 R12: 00000000fffffffb <4> [582.746091] R13: 0000000000000006 R14: 0000000000000000 R15: 000000000000000a <4> [582.746099] Modules linked in: vgem mei_hdcp snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio btusb btrtl btbcm btintel x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul bluetooth ghash_clmulni_intel ecdh_generic ecc i915 r8169 realtek mei_me mei snd_hda_intel i2c_hid snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core snd_pcm pinctrl_geminilake pinctrl_intel prime_numbers [last unloaded: test_drm_mm] Fixes: 736e785f9b28 ("drm/i915/gem: Reduce context termination list iteration guard to RCU") Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200925101107.27869-2-chris@chris-wilson.co.uk (cherry picked from commit badef44deff1fae8d21c5c1cfc4dde95fb5bf993) Signed-off-by: Rodrigo Vivi commit 5701a66edb6b3e09a7bdba3d0d64020a70562f87 Author: Chris Wilson Date: Fri Sep 25 11:11:06 2020 +0100 drm/i915: Redo "Remove i915_request.lock requirement for execution callbacks" The reordering and rebasing of commit 2e4c6c1a9db5 ("drm/i915: Remove i915_request.lock requirement for execution callbacks") caused it to revert an earlier correction. Let us restore commit 99f0a640d464 ("drm/i915: Remove requirement for holding i915_request.lock for breadcrumbs") Fixes: 2e4c6c1a9db5 ("drm/i915: Remove i915_request.lock requirement for execution callbacks") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Rodrigo Vivi Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200925101107.27869-1-chris@chris-wilson.co.uk (cherry picked from commit 35faeb7de9ef83da510a048f2016061f1e31d5fc) Signed-off-by: Rodrigo Vivi commit 4fe9af8e881d946bf60790eeb37a7c4f96e28382 Author: Chris Wilson Date: Thu Jul 23 18:21:19 2020 +0100 drm/i915/gem: Serialise debugfs i915_gem_objects with ctx->mutex Since the debugfs may peek into the GEM contexts as the corresponding client/fd is being closed, we may try and follow a dangling pointer. However, the context closure itself is serialised with the ctx->mutex, so if we hold that mutex as we inspect the state coupled in the context, we know the pointers within the context are stable and will remain valid as we inspect their tables. Signed-off-by: Chris Wilson Cc: CQ Tang Cc: Daniel Vetter Cc: stable@vger.kernel.org Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200723172119.17649-3-chris@chris-wilson.co.uk (cherry picked from commit 102f5aa491f262c818e607fc4fee08a724a76c69) Signed-off-by: Rodrigo Vivi commit cef8ce5528bf61a91d3116f327fc6b78310facfa Author: Matthew Auld Date: Mon Sep 21 17:08:44 2020 +0100 drm/i915: check i915_vm_alloc_pt_stash for errors If we are really unlucky and encounter an error during i915_vm_alloc_pt_stash, we end up passing an empty pt/pd stash all the way down into the low-level ppgtt alloc code, leading to explosions, since it expects at least the required number of pt/pd for the va range. [ 211.981418] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 211.981421] #PF: supervisor read access in kernel mode [ 211.981422] #PF: error_code(0x0000) - not-present page [ 211.981424] PGD 80000008439cb067 P4D 80000008439cb067 PUD 84a37f067 PMD 0 [ 211.981427] Oops: 0000 [#1] SMP PTI [ 211.981428] CPU: 1 PID: 1301 Comm: i915_selftest Tainted: G U I 5.9.0-rc5+ #3 [ 211.981430] Hardware name: /NUC6i7KYB, BIOS KYSKLi70.86A.0050.2017.0831.1924 08/31/2017 [ 211.981521] RIP: 0010:__gen8_ppgtt_alloc+0x1ed/0x3c0 [i915] [ 211.981523] Code: c1 48 c7 c7 5d 5d fe c0 65 ff 0d ee 1d 03 3f e8 d9 91 1f e2 8b 55 c4 31 c0 48 8b 75 b8 85 d2 0f 95 c0 48 8b 1c c6 48 89 45 98 <48> 8b 03 48 8b 90 58 02 00 00 48 85 d2 0f 84 07 ea 15 00 48 81 fa [ 211.981526] RSP: 0018:ffffba2cc0eb3970 EFLAGS: 00010202 [ 211.981527] RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000004 [ 211.981529] RDX: 0000000000000002 RSI: ffff9be998bdb8c0 RDI: ffff9be99c844300 [ 211.981530] RBP: ffffba2cc0eb39d8 R08: 0000000000000640 R09: ffff9be97cdfd000 [ 211.981531] R10: ffff9be97cdfd614 R11: 0000000000000000 R12: 0000000000000000 [ 211.981532] R13: ffff9be98607ba20 R14: ffff9be995a0b400 R15: ffffba2cc0eb39e8 [ 211.981534] FS: 00007f0f10b31000(0000) GS:ffff9be99fc40000(0000) knlGS:0000000000000000 [ 211.981536] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 211.981538] CR2: 0000000000000000 CR3: 000000084d74e006 CR4: 00000000003706e0 [ 211.981539] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 211.981541] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 211.981542] Call Trace: [ 211.981609] gen8_ppgtt_alloc+0x79/0x90 [i915] [ 211.981678] ppgtt_bind_vma+0x36/0x80 [i915] [ 211.981756] __vma_bind+0x39/0x40 [i915] [ 211.981818] fence_work+0x21/0x98 [i915] [ 211.981879] fence_notify+0x8d/0x128 [i915] [ 211.981939] __i915_sw_fence_complete+0x62/0x240 [i915] [ 211.982018] i915_vma_pin_ww+0x1ee/0x9c0 [i915] Fixes: cd0452aa2a0d ("drm/i915: Preallocate stashes for vma page-directories") Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200921160844.73186-1-matthew.auld@intel.com (cherry picked from commit 1604cb2aa7fafd83e11f9257f765a5f5dd7c19d3) Signed-off-by: Rodrigo Vivi commit 159ace7ffe690bcdc7afbd9bab81e05dac2afeac Author: Maarten Lankhorst Date: Fri Sep 18 13:12:08 2020 +0200 drm/i915: Fix uninitialised variable in intel_context_create_request. In case backoff fails with an error, we return an undefined rq, assign err to rq correctly. Fixes: 8a929c9eb1c2 ("drm/i915: Use ww pinning for intel_context_create_request()") Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200918111208.1392128-1-maarten.lankhorst@linux.intel.com Reviewed-by: Rodrigo Vivi (cherry picked from commit 4316b19dee27cc5cd34a95fdbc0a3a5237507701) Signed-off-by: Rodrigo Vivi commit 7d5553147613b50149238ac1385c60e5c7cacb34 Author: Chris Wilson Date: Wed Sep 16 10:00:58 2020 +0100 drm/i915: Break up error capture compression loops with cond_resched() As the error capture will compress user buffers as directed to by the user, it can take an arbitrary amount of time and space. Break up the compression loops with a call to cond_resched(), that will allow other processes to schedule (avoiding the soft lockups) and also serve as a warning should we try to make this loop atomic in the future. Testcase: igt/gem_exec_capture/many-* Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: stable@vger.kernel.org Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200916090059.3189-2-chris@chris-wilson.co.uk (cherry picked from commit 293f43c80c0027ff9299036c24218ac705ce584e) Signed-off-by: Rodrigo Vivi commit eb2a27086a821a7993c5a3230022c85cc7ccfbda Author: Dan Carpenter Date: Fri Sep 11 10:52:43 2020 +0300 drm/i915: Fix an error code i915_gem_object_copy_blt() This code should use "vma[1]" instead of "vma". The "vma" variable is a valid pointer. Fixes: 6b05030496f7 ("drm/i915: Convert i915_gem_object/client_blt.c to use ww locking as well, v2.") Signed-off-by: Dan Carpenter Reviewed-by: Mika Kuoppala Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200911075243.GG12635@kadam (cherry picked from commit 68ba71e3ae6dd86a23486655e33c5f8c9bd90777) Signed-off-by: Rodrigo Vivi commit 922d369b2922b3bb8c72aadddbd7445e6dc1183a Author: Chris Wilson Date: Tue Sep 15 10:14:17 2020 +0100 drm/i915/gt: Clear the buffer pool age before use If we create a new node, it is possible for the slab allocator to return us a recently freed node. If that node was just retired, it will retain the current jiffy as its node->age. There is then a miniscule window, where as that node is retired, it will appear on the free list with an incorrect age and be eligible for reuse by one thread, and then by a second thread as the correct node->age is written. Fixes: 06b73c2d0b65 ("drm/i915/gt: Delay taking the spinlock for grabbing from the buffer pool") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200915091417.4086-3-chris@chris-wilson.co.uk (cherry picked from commit 9bb34ff25c458a2a48fb61409df42f465ede37f8) Signed-off-by: Rodrigo Vivi commit ba2ebf605d5f32a9be0f7b05d3174bbc501b83fe Author: Chris Wilson Date: Tue Sep 15 10:14:16 2020 +0100 drm/i915/gem: Prevent using pgprot_writecombine() if PAT is not supported Let's not try and use PAT attributes for I915_MAP_WC if the CPU doesn't support PAT. Fixes: 6056e50033d9 ("drm/i915/gem: Support discontiguous lmem object maps") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Cc: # v5.6+ Link: https://patchwork.freedesktop.org/patch/msgid/20200915091417.4086-2-chris@chris-wilson.co.uk (cherry picked from commit 121ba69ffddc60df11da56f6d5b29bdb45c8eb80) Signed-off-by: Rodrigo Vivi commit 4caf017ee93703ba1c4504f3d73b50e6bbd4249e Author: Chris Wilson Date: Tue Sep 15 10:14:15 2020 +0100 drm/i915/gem: Avoid implicit vmap for highmem on x86-32 On 32b, highmem using a finite set of indirect PTE (i.e. vmap) to provide virtual mappings of the high pages. As these are finite, map_new_virtual() must wait for some other kmap() to finish when it runs out. If we map a large number of objects, there is no method for it to tell us to release the mappings, and we deadlock. However, if we make an explicit vmap of the page, that uses a larger vmalloc arena, and also has the ability to tell us to release unwanted mappings. Most importantly, it will fail and propagate an error instead of waiting forever. Fixes: fb8621d3bee8 ("drm/i915: Avoid allocating a vmap arena for a single page") #x86-32 References: e87666b52f00 ("drm/i915/shrinker: Hook up vmap allocation failure notifier") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Cc: # v4.7+ Link: https://patchwork.freedesktop.org/patch/msgid/20200915091417.4086-1-chris@chris-wilson.co.uk (cherry picked from commit 060bb115c2d664f04db9c7613a104dfaef3fdd98) Signed-off-by: Rodrigo Vivi commit 220aee30213db8b866579041b2313c4ce4184e59 Author: Gioh Kim Date: Wed Sep 30 15:14:07 2020 +0200 RDMA/rtrs: Remove unused field of rtrs_iu list field is not used anywhere Link: https://lore.kernel.org/r/20200930131407.6438-1-gi-oh.kim@clous.ionos.com Signed-off-by: Gioh Kim Acked-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 39ad082459373facaa255b0791595d018597a164 Author: Jiansong Chen Date: Wed Sep 30 15:30:24 2020 +0800 drm/amdgpu: disable gfxoff temporarily for navy_flounder gfxoff is temporarily disabled for navy_flounder, since at present the feature caused some tdr when performing display operations. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 4a20300bc2b49c281f61f97dc398deefdd87d982 Author: Guchun Chen Date: Tue Sep 29 12:41:41 2020 +0800 drm/amdgpu: drop duplicated ecc check for vega10 (v5) The same ECC check has been executed in amdgpu_ras_init for vega10, prior to gmc_v9_0_late_init. v2: drop all atombios helper callings v3: use bit operation v4: correct inline comment, remove parity check statement v5: squash in build fix Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 65026da59cda16baf6c3e98b74ec439f366e468f Author: Jouni Roivas Date: Wed Sep 30 19:42:42 2020 +0300 cgroup: Zero sized write should be no-op Do not report failure on zero sized writes, and handle them as no-op. There's issues for example in case of writev() when there's iovec containing zero buffer as a first one. It's expected writev() on below example to successfully perform the write to specified writable cgroup file expecting integer value, and to return 2. For now it's returning value -1, and skipping the write: int writetest(int fd) { const char *buf1 = ""; const char *buf2 = "1\n"; struct iovec iov[2] = { { .iov_base = (void*)buf1, .iov_len = 0 }, { .iov_base = (void*)buf2, .iov_len = 2 } }; return writev(fd, iov, 2); } This patch fixes the issue by checking if there's nothing to write, and handling the write as no-op by just returning 0. Signed-off-by: Jouni Roivas Signed-off-by: Tejun Heo commit d3768874e5fe410d80c45e57bff47e8e708c0516 Author: Dmytro Laktyushkin Date: Mon Sep 28 17:59:38 2020 -0400 drm/amd/display: add pipe reassignment prevention code to dcn3 Add code to gracefuly handle any pipe reassignment occuring on dcn3 hardware. This should only happen when new surfaces are used for an update rather than old ones updated. Fixes: 69fc1f4b976cea ("amd/drm/display: avoid dcn3 on flip opp change for slave pipes") Signed-off-by: Dmytro Laktyushkin Reviewed-by: Bhawanpreet Lakha Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8ffff9b4499cbbda5b44cf84df576a7c5a3c2e06 Author: Oak Zeng Date: Thu Sep 17 18:10:12 2020 -0500 drm/amdgpu: use function pointer for gfxhub functions gfxhub functions are now called from function pointers, instead of from asic-specific functions. Signed-off-by: Oak Zeng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 825c91d0908b72f9ec2a9e0c815d2c40af5ad5f4 Author: Ramesh Errabolu Date: Tue Sep 29 12:06:15 2020 -0500 drm/amd/amdgpu: Prepare implementation to support reporting of CU usage [Why] Allow user to know number of compute units (CU) that are in use at any given moment. [How] Read registers of SQ that give number of waves that are in flight of various queues. Use this information to determine number of CU's in use. Signed-off-by: Ramesh Errabolu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b8810a142ad5494ecfe7ef2fa289868562918cd1 Author: Ramesh Errabolu Date: Tue Sep 29 11:46:51 2020 -0500 drm/amd/amdgpu: Clean up header file of symbols that are defined to be static [Why] Header file exports functions get_gpu_clock_counter(), get_cu_info() and select_se_sh() that are defined to be static Signed-off-by: Ramesh Errabolu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8fd8f94235c2c925d80b2316e0ab2bdd00af9bae Author: Marek Behún Date: Sat Sep 26 22:11:31 2020 +0200 leds: ns2: do not guard OF match pointer with of_match_ptr Do not match OF match pointer with of_match_ptr, so that even if CONFIG_OF is disabled, the driver can still be bound via another method. Move definition of of_ns2_leds_match just before ns2_led_driver definition, since it is not needed sooner. Signed-off-by: Marek Behún Tested-by: Simon Guinot Signed-off-by: Pavel Machek commit 940cca1ab5d6c3bc1f8db0c804cf7c5e0caf1853 Author: Marek Behún Date: Sat Sep 26 22:11:30 2020 +0200 leds: ns2: convert to fwnode API Convert from OF api to fwnode API, so that it is possible to bind this driver without device-tree. The fwnode API does not expose a function to read a specific element of an array. We therefore change the types of the ns2_led_modval structure so that we can read the whole modval array with one fwnode call. Signed-off-by: Marek Behún Tested-by: Simon Guinot Signed-off-by: Pavel Machek commit 108f4664e3449828114780a05393eb8d2be7fdd0 Author: Tobias Jordan Date: Sat Sep 26 02:51:17 2020 +0200 leds: tlc591xx: fix leak of device node iterator In one of the error paths of the for_each_child_of_node loop in tlc591xx_probe, add missing call to of_node_put. Fixes: 1ab4531ad132 ("leds: tlc591xx: simplify driver by using the managed led API") Signed-off-by: Tobias Jordan Reviewed-by: Marek Behún Reviewed-by: Tomi Valkeinen Signed-off-by: Pavel Machek commit 564ead1280d7590f0015d8225637d546e9fa94eb Author: Marek Behún Date: Sun Sep 20 02:25:00 2020 +0200 leds: pca963x: use struct led_init_data when registering By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Previously if the `label` DT property was not present, the code composed name for the LED in the form "pca963x:%d:%.2x:%u" For backwards compatibility we therefore set init_data->default_label to this value so that the LED will not get a different name if `label` property is not present, nor are `color` and `function`. Signed-off-by: Marek Behún Cc: Peter Meerwald Cc: Ricardo Ribalda Cc: Zahari Petkov Signed-off-by: Pavel Machek commit 85fc8efe85d405b80904f73e4e23184a84283753 Author: Marek Behún Date: Sun Sep 20 02:24:59 2020 +0200 leds: pca963x: register LEDs immediately after parsing, get rid of platdata Register LEDs immediately after parsing their properties. This allows us to get rid of platdata, and since no one in tree uses header linux/platform_data/leds-pca963x.h, remove it. Signed-off-by: Marek Behún Cc: Peter Meerwald Cc: Ricardo Ribalda Cc: Zahari Petkov Signed-off-by: Pavel Machek commit 7e2dc43da2c0e9352766de5d578edbcfd2c548eb Author: Marek Behún Date: Sun Sep 20 00:15:43 2020 +0200 leds: tca6507: remove binding comment Remove the binding comment at the beginning. The information for platdata is now obsolete and DT binding is documented in device-tree bindings. Signed-off-by: Marek Behún Cc: NeilBrown Cc: Linus Walleij Cc: H. Nikolaus Schaller Signed-off-by: Pavel Machek commit c1ff1a1d3598964bd4bfe1effff1100aa0e79f9d Author: Marek Behún Date: Sun Sep 20 00:15:41 2020 +0200 leds: tca6507: cosmetic change: use helper variable Use helper variable dev instead of always writing &client->dev. Signed-off-by: Marek Behún Cc: NeilBrown Cc: Linus Walleij Cc: H. Nikolaus Schaller Signed-off-by: Pavel Machek commit b7f0b3bd1fe362160164a3dec3e8063ba3389549 Author: Marek Behún Date: Sun Sep 20 00:15:40 2020 +0200 leds: tca6507: do not set GPIO names Do not set GPIO names. Let gpiolib determine GPIO names from the DT property `gpio-line-names`. Signed-off-by: Marek Behún Cc: NeilBrown Cc: Linus Walleij Cc: H. Nikolaus Schaller Signed-off-by: Pavel Machek commit 9694881d92f4163d556ac9e4c6d2614cb90d74e3 Author: Marek Behún Date: Sun Sep 20 00:15:38 2020 +0200 dt-bindings: leds: tca6507: convert to YAML This converts the tca6507 LED binding to yaml. Signed-off-by: Marek Behún Cc: NeilBrown Cc: Linus Walleij Cc: H. Nikolaus Schaller Cc: Tony Lindgren Cc: Adam Ford Cc: Viresh Kumar Reviewed-by: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Pavel Machek commit abcc131292aa8c7de2c5f0ed76a717436c21de63 Author: Pavel Machek Date: Sat Sep 19 11:34:58 2020 +0200 ledtrig-cpu: Limit to 8 CPUs Some machines have thousands of CPUs... and trigger mechanisms was not really meant for thousands of triggers. I doubt anyone uses this trigger on many-CPU machine; but if they do, they'll need to do it properly. Signed-off-by: Pavel Machek commit 364682d1bc16277b67f31e411a00e13c50002d2e Author: Pavel Machek Date: Fri Sep 25 11:29:17 2020 +0200 leds: TODO: Add documentation about possible subsystem improvements Help welcome :-). Signed-off-by: Pavel Machek commit 7ac5338c3c7c849729f629b6a35d88ac3d43cc56 Author: Markus Moll Date: Tue Sep 22 21:31:15 2020 +0200 leds: pca9532: read pwm settings from device tree While the two pca9532 pwms can be configured in the platform data struct, there was no corresponding dt binding. Users need to configure the pwm if some leds should blink or continue blinking during boot. Signed-off-by: Markus Moll Signed-off-by: Pavel Machek commit 2a378856e32c98f747bde3fd338ca0e322aae8cb Author: Markus Moll Date: Tue Sep 22 21:28:35 2020 +0200 leds: pca9532: correct shift computation in pca9532_getled Each led setting occupies two bits in a corresponding led register. Accessing these bits requires shifting and masking, which was implemented incorrectly in pca9532_getled. Two new helper macros concentrate the computation of those masks in one place. Signed-off-by: Markus Moll Signed-off-by: Pavel Machek commit 9adc8af4c2f414a03235ae5403433ff1090a00ff Author: Dan Murphy Date: Tue Sep 22 14:06:38 2020 -0500 leds: lm36274: Fix warning for undefined parameters Fix warnings for undefined parameters when building with W=1. Signed-off-by: Dan Murphy Reviewed-by: Marek Behún Signed-off-by: Pavel Machek commit 9e955a421d1586bfc56c667b9f2e81f4f226cfef Author: Dan Murphy Date: Tue Sep 22 14:06:37 2020 -0500 leds: lm3532: Fix warnings for undefined parameters Fix warnings for undefined parameters when W=1 is used. Signed-off-by: Dan Murphy Reviewed-by: Marek Behún Signed-off-by: Pavel Machek commit b5a3b44f2ddc4af49420f430b208ff8060ab7555 Author: Marek Behún Date: Sun Sep 20 02:24:58 2020 +0200 leds: pca963x: use flexible array Instead of doing two allocations, allocate only once, by utilizing flexible array members. Signed-off-by: Marek Behún Cc: Peter Meerwald Cc: Ricardo Ribalda Cc: Zahari Petkov Signed-off-by: Pavel Machek commit 5db8509349cea5df0e6562537d84f3e90fda3270 Author: Marek Behún Date: Sun Sep 20 02:24:57 2020 +0200 leds: pca963x: cosmetic: rename variables Rename variable of type struct pca963x_led from pca963x to simple led. Signed-off-by: Marek Behún Cc: Peter Meerwald Cc: Ricardo Ribalda Cc: Zahari Petkov Signed-off-by: Pavel Machek commit fc0b1eca2ef0d2e5a8ea9ddfd45d6858df8fb02c Author: Marek Behún Date: Sun Sep 20 02:24:56 2020 +0200 leds: pca963x: cosmetic: rename variables Rename variables chip and pca963x_chip to chipdef and chip, respectively, so that their names correspond to the names of their types. Signed-off-by: Marek Behún Cc: Peter Meerwald Cc: Ricardo Ribalda Cc: Zahari Petkov Signed-off-by: Pavel Machek commit af26bebea1199d8cbefd39b42ade40698504afba Author: Marek Behún Date: Sun Sep 20 02:24:55 2020 +0200 leds: pca963x: use devres LED registering function By using devres version of LED registering function we can remove the .remove method from this driver. The probe method also gets simpler. Signed-off-by: Marek Behún Cc: Peter Meerwald Cc: Ricardo Ribalda Cc: Zahari Petkov Signed-off-by: Pavel Machek commit 39118499a62623d32c67ffd93d94ed5f27bfc736 Author: Marek Behún Date: Sun Sep 20 02:24:54 2020 +0200 leds: pca963x: cosmetic: use helper variables, better indentation Use helper variables: instead of writing &client->dev at many places, write only dev. The same with pca963x->chip->chipdef, pca963x->chip->client). Use helper variable u8 val for i2c_smbus_write_byte_data, for better indentation. Indent better on various places. Signed-off-by: Marek Behún Cc: Peter Meerwald Cc: Ricardo Ribalda Cc: Zahari Petkov Signed-off-by: Pavel Machek commit a238098251b690b7408f26d7c5b4c6ba44d7084c Author: Marek Behún Date: Sat Sep 26 21:43:02 2020 +0200 leds: tca6507: fix potential zero passed to ERR_PTR Fix potential ERR_PTR(0). Signed-off-by: Marek Behún Fixes: d78b10f5713d9 ("leds: tca6507: use fwnode API instead of OF") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Pavel Machek commit e8b7dabc6565d9bf74e66312cf7b8b87450c7caa Author: Pavel Machek Date: Fri Sep 25 11:24:12 2020 +0200 leds: tca6507: fix warning triggered by fwnode conversion. Robot complains about: All warnings (new ones prefixed by >>): >> drivers/leds/leds-tca6507.c:750:34: warning: unused variable 'of_tca6507_leds_match' [-Wunused-const-variable] static const struct of_device_id of_tca6507_leds_match[] = { Fix it. Reported-by: kernel test robot Signed-off-by: Pavel Machek commit 96f524105b9c62904b8452dff2c2531a84e44e2c Author: Marek Behún Date: Sun Sep 20 00:15:37 2020 +0200 leds: tca6507: use fwnode API instead of OF Convert to use fwnode API instead of OF. It is more generic and if someone wants to use this driver without device-tree yet still, they will be able to via swnode fwnodes. Remove the gpio setup function from platdata. Signed-off-by: Marek Behún Cc: NeilBrown Cc: Linus Walleij Tested-by: H. Nikolaus Schaller Signed-off-by: Pavel Machek commit 38b393fec298569c8ec154c750a107299bc8385d Author: Marek Behún Date: Sun Sep 20 00:15:36 2020 +0200 leds: tca6507: Absorb platform data The only in-tree usage of this driver is via device-tree. No on else includes linux/leds-tca6507.h, so absorb the definition of platdata structure. Signed-off-by: Marek Behún Cc: NeilBrown Reviewed-by: Linus Walleij Tested-by: H. Nikolaus Schaller Signed-off-by: Pavel Machek commit cae045f495d259122cfa18a87c65a2b12fbdcbb2 Author: Mauro Carvalho Chehab Date: Mon Sep 28 08:16:02 2020 +0200 media: hist-v4l2.rst: remove :c:`type` from structs and enums Using struct|enum :c:`type` here sounds a bad idea, as it may be documenting data types that were already removed. Also, it makes the file harder to read. As automarkup.py should be able to handle those cases, let's just get rid of the markup. While not required by automarkup, in order to make easier for grep, both type and names are now at the same line. Signed-off-by: Mauro Carvalho Chehab commit f69249fcefc4f804c4c22591fc9da3357e82b117 Author: Mauro Carvalho Chehab Date: Mon Sep 28 08:11:34 2020 +0200 media: hist-v4l2.rst: remove struct duplication There are several places there where struct was used twice, on multiple lines, like: struct struct ``v4l2_zoomcap`` That's probably done during the DocBook to ReSt conversion. Probably the cases where "struct struct" were at the same line was addressed back then, but the multi-line cases are still there. Get rid of them. Signed-off-by: Mauro Carvalho Chehab commit 8162a0b5a209b541e89336f53b96ea0c22b63945 Author: Mauro Carvalho Chehab Date: Tue Sep 29 11:15:36 2020 +0200 media: v4l2-subdev.h: fix a kernel-doc markup As reported by Sphinx: ./Documentation/driver-api/media/v4l2-subdev:490: ./include/media/v4l2-subdev.h:384: WARNING: Unparseable C cross-reference: 'struct' Invalid C declaration: Expected identifier in nested name, got keyword: struct [error at 6] struct ------^ The markup there is wrong: &struct &v4l2_input -> &struct v4l2_input Signed-off-by: Mauro Carvalho Chehab commit c3cfc5f484e05e25bf855126bad949078f3dc590 Author: Mauro Carvalho Chehab Date: Sat Sep 26 09:08:38 2020 +0200 media: cec-core.rst: fix warnings with Sphinx 3.0+ The new C domain code on Sphinx 3 is a lot more pedantic. It only accepts real functions declared as c:function. So, declarations like this are not valid: .. c:function:: int (*adap_enable)(struct cec_adapter *adap, bool enable); Also, no blank lines are allowed after ".. c:function:", and continuation lines should be like: .. c:function: int (void foo, \ int bar); Change the logic there, in order to avoid lots of warnings when built with Sphinx 3.x. Signed-off-by: Mauro Carvalho Chehab commit 181220d469fe8f8c838d2f9d08fe05529fe6f440 Author: Mauro Carvalho Chehab Date: Mon Sep 28 16:21:00 2020 +0200 media: v4l2-subdev.rst: get rid of a duplicatd kernel-doc markup There are two kernel-doc markups for include/media/v4l2-async.h, one at v4l2-async.rst and another one at v4l2-subdev.rst. Sphinx 3.x checks it and complains for duplicated symbols. So, get rid of one of them. Signed-off-by: Mauro Carvalho Chehab commit deacbb8e4c7c4a8b9370d6dcbf8c2daf6baecc1a Author: Mauro Carvalho Chehab Date: Fri Sep 25 13:08:01 2020 +0200 media: dvb-frontends: remove a clone of a kernel-doc markup at zd1301_demod.h The same markup are there twice, causing warnings with Sphinx 3.x. Drop the second copy. Signed-off-by: Mauro Carvalho Chehab commit b97d4a1eb4baede15e9c9503d97f81d007e493f3 Author: Mauro Carvalho Chehab Date: Fri Sep 25 11:48:40 2020 +0200 media: docs: ipu3.rst: rely at automarkup extension There are several :c:type: definitions there, in order to do cross-references with the driver's documentation. Those are broken when docs are built with Sphinx 3.x, as it would require :c:struct: instead. For Sphinx < 3.x, the automarkup.py extension is able to do the replacement already, and a future improvement on it should make it also work with Sphinx 3.x. So, get rid of the usage of the :c:type: macro there. Reviewed-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1586d3a964c9b273ca982b750f757fbedcb57afb Author: Marek Behún Date: Thu Sep 17 21:31:40 2020 +0200 mfd: asic3: Build if COMPILE_TEST=y Build this driver on another platforms if COMPILE_TEST=y. Another drivers may depend on this, for example leds-asic3. Signed-off-by: Marek Behún Signed-off-by: Lee Jones commit b727db94e3ba451a6941b0f8d8714f9f260ab110 Author: Krzysztof Kozlowski Date: Thu Sep 17 20:56:13 2020 +0200 dt-bindings: mfd: Correct interrupt flags in examples GPIO_ACTIVE_x flags are not correct in the context of interrupt flags. These are simple defines so they could be used in DTS but they will not have the same meaning: 1. GPIO_ACTIVE_HIGH = 0 = IRQ_TYPE_NONE 2. GPIO_ACTIVE_LOW = 1 = IRQ_TYPE_EDGE_RISING Correct the interrupt flags, assuming the author of the code wanted same logical behavior behind the name "ACTIVE_xxx", this is: ACTIVE_LOW => IRQ_TYPE_LEVEL_LOW Signed-off-by: Krzysztof Kozlowski Acked-by: Matti Vaittinen # for BD70528 Acked-by: Tim Harvey # for gateworks-gsc.yaml Acked-by: Rob Herring Signed-off-by: Lee Jones commit e8299c7313af857254bc4304bc37482e9b952481 Author: Michael Brunner Date: Thu Aug 20 15:39:14 2020 +0000 mfd: Add ACPI support to Kontron PLD driver Recent Kontron COMe modules identify the PLD device using the hardware id KEM0001 in the ACPI table. This patch adds support for probing the device using the HID and also retrieving the resources. As this is not available for all products, the DMI based detection still needs to be around for older systems. It is executed if no matching ACPI HID is found during registering the platform driver or no specific device id is forced. If a device is detected using ACPI and no resource information is available, the default io resource is used. Forcing a device id with the force_device_id parameter and therefore manually generating a platform device takes precedence over ACPI during probing. Signed-off-by: Michael Brunner Signed-off-by: Lee Jones commit 876611c493b10cbb59e0e2143d3e744d0442de63 Author: Xu Yilun Date: Tue Sep 15 11:44:21 2020 +0800 mfd: intel-m10-bmc: Add Intel MAX 10 BMC chip support for Intel FPGA PAC This patch implements the basic functions of the BMC chip for some Intel FPGA PCIe Acceleration Cards (PAC). The BMC is implemented using the Intel MAX 10 CPLD. This BMC chip is connected to the FPGA by a SPI bus. To provide direct register access from the FPGA, the "SPI slave to Avalon Master Bridge" (spi-avmm) IP is integrated in the chip. It converts encoded streams of bytes from the host to the internal register read/write on the Avalon bus. So This driver uses the regmap-spi-avmm for register accessing. Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Signed-off-by: Matthew Gerlach Signed-off-by: Russ Weight Reviewed-by: Tom Rix Signed-off-by: Lee Jones commit c471bf4b11c7df0f0f9f42b5aeec424dc62d0c7e Author: Greg Kroah-Hartman Date: Wed Sep 30 14:10:07 2020 +0200 MAINTAINERS: exclude char maintainers from things they do not maintain There are a number of subdirectories and files in drivers/char/ that have their own maintainers and developers and ways of getting patches to Linus. This includes random.c, IPMI, hardware random drivers, TPM drivers, and agp drivers. Instead of sending those patches to Arnd and myself, who can't do anything with them, send them to the proper developers instead. Acked-by: Arnd Bergmann Acked-by: Corey Minyard Link: https://lore.kernel.org/r/20200930121007.GA1615300@kroah.com Signed-off-by: Greg Kroah-Hartman commit 95d325185c06cbef1c5be97825265a7129a03512 Author: Wei Yang Date: Fri Sep 25 17:11:10 2020 +0800 cgroup: remove redundant kernfs_activate in cgroup_setup_root() This step is already done in rebind_subsystems(). Not necessary to do it again. Signed-off-by: Wei Yang Signed-off-by: Tejun Heo commit 4285027c733a2a5bada0d053ace3e4f040f1b58a Merge: a1b8638ba1320 d353d1202b89a Author: Rafael J. Wysocki Date: Wed Sep 30 17:52:11 2020 +0200 Merge tag 'devfreq-next-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux into pm-devfreq Pull devfreq updates for 5.10 from Chanwoo Choi: "1. Update devfreq core - Until now, devfreq and devfreq-event framework defined the fixed 'devfreq' and 'devfreq-event' property to get the devfreq/devfreq-event phandle. But, these property names are not expressing the h/w. So, deprecate the fixed property names 'devfreq' and 'devfreq-event'. But, in order to keep the backward compatibility of devicetree, don't change the property name on devfreq device drivers and devicetree. 2. Update devfreq driver - Replace reset_control_(assert|dessert) fucntions with reset_control_reset() for reseting the h/w during probe on tegra30-devfreq.c." * tag 'devfreq-next-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: tegra30: Improve initial hardware resetting PM / devfreq: event: Change prototype of devfreq_event_get_edev_by_phandle function PM / devfreq: Change prototype of devfreq_get_devfreq_by_phandle function PM / devfreq: Add devfreq_get_devfreq_by_node function commit 4849bc777049b568a35d5d63ae326e93f0fff9de Author: Nathan Chancellor Date: Mon Sep 28 12:45:55 2020 -0700 ACPI / NUMA: Add stub function for pxm_to_node() After commit 01feba590cd6 ("ACPI: Do not create new NUMA domains from ACPI static tables that are not SRAT"): $ scripts/config --file arch/x86/configs/x86_64_defconfig -d NUMA -e ACPI_NFIT $ make -skj"$(nproc)" distclean defconfig drivers/acpi/nfit/ drivers/acpi/nfit/core.c: In function ‘acpi_nfit_register_region’: drivers/acpi/nfit/core.c:3010:27: error: implicit declaration of function ‘pxm_to_node’; did you mean ‘xa_to_node’? [-Werror=implicit-function-declaration] 3010 | ndr_desc->target_node = pxm_to_node(spa->proximity_domain); | ^~~~~~~~~~~ | xa_to_node cc1: some warnings being treated as errors ... Add a stub function like acpi_map_pxm_to_node() had so that the build continues to work. Fixes: 01feba590cd6 ("ACPI: Do not create new NUMA domains from ACPI static tables that are not SRAT") Signed-off-by: Nathan Chancellor Acked-by: Randy Dunlap # build-tested Acked-by: Jonathan Cameron Reviewed-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 963ec27a10fa6dc700c0465e95965c0bf696a606 Author: Song Liu Date: Tue Sep 29 15:29:49 2020 -0700 bpf: fix raw_tp test run in preempt kernel In preempt kernel, BPF_PROG_TEST_RUN on raw_tp triggers: [ 35.874974] BUG: using smp_processor_id() in preemptible [00000000] code: new_name/87 [ 35.893983] caller is bpf_prog_test_run_raw_tp+0xd4/0x1b0 [ 35.900124] CPU: 1 PID: 87 Comm: new_name Not tainted 5.9.0-rc6-g615bd02bf #1 [ 35.907358] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 35.916941] Call Trace: [ 35.919660] dump_stack+0x77/0x9b [ 35.923273] check_preemption_disabled+0xb4/0xc0 [ 35.928376] bpf_prog_test_run_raw_tp+0xd4/0x1b0 [ 35.933872] ? selinux_bpf+0xd/0x70 [ 35.937532] __do_sys_bpf+0x6bb/0x21e0 [ 35.941570] ? find_held_lock+0x2d/0x90 [ 35.945687] ? vfs_write+0x150/0x220 [ 35.949586] do_syscall_64+0x2d/0x40 [ 35.953443] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fix this by calling migrate_disable() before smp_processor_id(). Fixes: 1b4d60ec162f ("bpf: Enable BPF_PROG_TEST_RUN for raw_tracepoint") Reported-by: Alexei Starovoitov Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov commit 4b6ec08fd21ee3179cbfccf3605ad13d9f38b623 Author: Luca Ceresoli Date: Wed Sep 2 16:22:59 2020 +0200 mfd: lp87565: Add LP87524-Q1 variant Add support for the LP87524B/J/P-Q1 Four 4-MHz Buck Converter. This is a variant of the LP87565 having 4 single-phase outputs and up to 10 A of total output current. Signed-off-by: Luca Ceresoli Signed-off-by: Lee Jones commit f9c6785c0c5ecc7c09e38550c785184958a67201 Author: Luca Ceresoli Date: Wed Sep 2 16:22:58 2020 +0200 dt-bindings: mfd: Add LP87524-Q1 Add the LP87524-Q1 to the bindings along with an example. This is a variant of the LP87565-Q1 and LP87561-Q1 chips which already have bindings. Signed-off-by: Luca Ceresoli Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 326fa4399f6723201c10d77d3a18675915c56097 Author: Luca Ceresoli Date: Wed Sep 2 16:22:57 2020 +0200 dt-bindings: mfd: lp87565: Convert to yaml Also apply a few smaller improvements: - document that the only possible I2C slave address is 0x60 as per the datasheet and fix the second example accordingly - The definition of "xxx-in-supply" was generic, thus define in detail the possible cases for each chip variant - remove "MFD driver" from the title as it is implementation specific - replace "PMIC" with "buck converter" in title as it is more informative Signed-off-by: Luca Ceresoli Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit d38eac299151e4715c3b22e0253126440fa513b4 Author: YueHaibing Date: Mon Sep 14 22:25:18 2020 +0800 mfd: mt6360: Remove unused include This file does not make use of it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Lee Jones commit 8ce24f8967df2836b4557a23e74dc4bb098249f1 Author: Dan Carpenter Date: Fri Sep 11 14:33:26 2020 +0300 mfd: sm501: Fix leaks in probe() This code should clean up if sm501_init_dev() fails. Fixes: b6d6454fdb66 ("[PATCH] mfd: SM501 core driver") Signed-off-by: Dan Carpenter Signed-off-by: Lee Jones commit 529a1101212a785c5df92c314b0e718287150c3b Author: Marc Zyngier Date: Thu Sep 3 17:02:37 2020 +0100 mfd: syscon: Don't free allocated name for regmap_config The name allocated for the regmap_config structure is freed pretty early, right after the registration of the MMIO region. Unfortunately, that doesn't follow the life cycle that debugfs expects, as it can access the name field long after the free has occurred. Move the free on the error path, and keep it forever otherwise. Fixes: e15d7f2b81d2 ("mfd: syscon: Use a unique name with regmap_config") Signed-off-by: Marc Zyngier Signed-off-by: Lee Jones commit 05027df1b94fcb9e23e1af170733a570f5a90356 Author: Krzysztof Kozlowski Date: Wed Sep 2 18:14:52 2020 +0200 dt-bindings: mfd: syscon: Document Exynos3 and Exynos5433 compatibles Document Samsung Exynos3 and Exynos5433 compatibles for system registers. Reviewed-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 18394297562a235d41c2b410188533ea78bd0d3e Author: Krzysztof Kozlowski Date: Wed Sep 2 18:14:51 2020 +0200 dt-bindings: mfd: syscon: Merge Samsung Exynos Sysreg bindings The Samsung Exynos System Registers (Sysreg) bindings are quite simple - just additional compatible to the syscon. They do not have any value so merge them into generic MFD syscon bindings. Suggested-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Signed-off-by: Lee Jones commit a09813283981f9e9ceefd7d6a1edb8f391aad00e Author: Jonathan Neuschäfer Date: Sat Sep 5 20:58:03 2020 +0200 dt-bindings: mfd: ab8500: Remove weird Unicode characters There are stray Unicode quotation marks (U+201C DOUBLE TURNED COMMA QUOTATION MARK) in the file. Remove them, as they don't serve a purpose. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Lee Jones commit a75bfc824a2d33f57ebdc003bfe6b7a9e11e9cb9 Author: Baolin Wang Date: Tue Aug 18 11:41:58 2020 +0800 mfd: sprd: Add wakeup capability for PMIC IRQ When changing to use suspend-to-idle to save power, the PMIC irq can not wakeup the system due to lack of wakeup capability, which will cause the sub-irqs (such as power key) of the PMIC can not wake up the system. Thus we can add the wakeup capability for PMIC irq to solve this issue, as well as removing the IRQF_NO_SUSPEND flag to allow PMIC irq to be a wakeup source. Reported-by: Chunyan Zhang Signed-off-by: Baolin Wang Tested-by: Chunyan Zhang Signed-off-by: Lee Jones commit 5f039fa742b6d8b4bbb7eb1a91c0dd251f03712d Author: Andy Shevchenko Date: Fri Aug 21 17:25:09 2020 +0300 mfd: intel-lpss: Add device IDs for UART ports for Lakefield Add PCI IDs for Lakefield to the list of supported UARTs. Cc: Jarkko Nikula Cc: Mika Westerberg Cc: "Ravi V. Shankar" Signed-off-by: Ricardo Neri Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit b6d213fb0b503683c0c6d33d80c85babd36bf0fc Author: Linus Walleij Date: Wed Aug 26 22:21:49 2020 +0200 mfd: dm355evm_msp: Convert LEDs to GPIO descriptor table This converts the DaVinci DM355EVM LEDs to use GPIO descriptor look-ups. Cc: Sekhar Nori Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij Signed-off-by: Lee Jones commit 0f1b1b899521e3380a01f9f88a1bcb6163b7ee9f Author: Krzysztof Kozlowski Date: Wed Aug 26 16:49:35 2020 +0200 mfd: wcd934x: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 41c9c06c491a92e186e41ff64163fa74f08e15e6 Author: Krzysztof Kozlowski Date: Wed Aug 26 16:49:34 2020 +0200 mfd: stmfx: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit f104563fe08047b18cd3c96b41de0bc9c16739c7 Author: Krzysztof Kozlowski Date: Wed Aug 26 16:49:33 2020 +0200 mfd: madera: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Acked-by: Charles Keepax Signed-off-by: Lee Jones commit ede6b2d1dfc0d6a7b0b3161a2e911d464e28e0ad Author: Lubomir Rintel Date: Fri Jul 10 01:12:28 2020 +0200 mfd: ene-kb3930: Add driver for ENE KB3930 Embedded Controller This driver provides access to the EC RAM of said embedded controller attached to the I2C bus as well as optionally supporting its slightly weird power-off/restart protocol. A particular implementation of the EC firmware can be identified by a model byte. If this driver identifies the Dell Ariel platform, it registers the appropriate cells. Signed-off-by: Lubomir Rintel Signed-off-by: Lee Jones commit ffa9cda9e62fe0afb5e7899985d615bdb36a2a03 Author: Lubomir Rintel Date: Fri Jul 10 01:12:27 2020 +0200 dt-bindings: mfd: Add ENE KB3930 Embedded Controller binding Add binding document for the ENE KB3930 Embedded Controller. Signed-off-by: Lubomir Rintel Reviewed-by: Rob Herring Reviewed-by: Dmitry Osipenko Signed-off-by: Lee Jones commit e26ea09b6e0995cb65760e44042e26d3e40452a7 Author: Lee Jones Date: Fri Aug 28 09:37:04 2020 +0100 mfd: khadas-mcu: Fix randconfig 'unused-const-variable' warning When testing with !OF, the build system reports: >> drivers/mfd/khadas-mcu.c:125:34: warning: unused variable 'khadas_mcu_of_match' [-Wunused-const-variable] static const struct of_device_id khadas_mcu_of_match[] = { ^ Reported-by: kernel test robot Acked-by: Neil Armstrong Signed-off-by: Lee Jones commit d1264a075ed65d6b174a4742e69186125e66fd27 Author: Andreas Kemnade Date: Sat Aug 15 18:56:10 2020 +0200 mfd: rn5t618: Add a power supply subdevice The RN5T618 and RC5T619 both have a charger and a fuel gauge, so add a subdevice for it. According to drivers in the wild, things should be at least similar, but since it is not tested, add it only to the RC5T619. Signed-off-by: Andreas Kemnade Signed-off-by: Lee Jones commit 31c53962d65fb813eded2332b0fff60ffaaf2368 Author: Mauro Carvalho Chehab Date: Wed Aug 12 14:29:03 2020 +0200 mfd: Kconfig: Fix typo of 'individual' individul -> individual Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Lee Jones commit 62e5d7774629aac671c8c56a0ba016dbffb6dff2 Author: Alexandre Belloni Date: Wed Sep 30 16:53:30 2020 +0200 ASoC: atmel-pcm: remove unnecessary include Since commit 95e0e07e710e ("ASoC: atmel-pcm: use generic dmaengine framework"), the driver is using dmaengine and is not using any definition from include/linux/platform_data/dma-atmel.h, stop including it. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200930145330.3043528-1-alexandre.belloni@bootlin.com Signed-off-by: Mark Brown commit af223edd07b619749f7abc3e1db1933ac56d2e3e Author: Alexandre Belloni Date: Wed Sep 30 16:53:52 2020 +0200 spi: atmel: remove unnecessary include Since commit d5fab59cab18 ("spi: atmel: trivial: remove unused fields in DMA structure"), the driver is not using any definitions from linux/platform_data/dma-atmel.h, stop including it. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200930145353.3043699-1-alexandre.belloni@bootlin.com Signed-off-by: Mark Brown commit 7a2ba46f3693ec8fbd508c4e693692e85ac14ed6 Author: Kai Vehmanen Date: Wed Sep 30 14:41:40 2020 +0300 ASoC: hdac_hda: allow runtime pm at end of probe Align with recent change to forbid runtime suspend during codec init in snd_hda_codec_device_new(), with matching call to allow suspend at end of hdac_hda_codec_probe(). In snd-hda-intel, call to snd_hda_set_power_save() at end of controller probe does the same thing, but ASoC controller drivers do not modify runtime settings for codecs, so this has to be done in codec drivers, and in this case in hdac_hda. Signed-off-by: Kai Vehmanen Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200930114140.3839617-3-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit a0645daf16101bb9a6d87598c17e9a8b7bd60ea7 Author: Harsha Priya Date: Wed Sep 30 14:41:39 2020 +0300 ALSA: HDA: Early Forbid of runtime PM For certain codecs (like Realtek), pm_runtime_forbid() is invoked in the probe function after build_controls(). In a stress test, its observed occasionally that runtime PM calls are invoked before controls are built. This causes the codec to be runtime suspended before probe completes. Because of this, not all controls are enumerated correctly, and audio does not work until system is rebooted. This issue being common across all codecs, pm_runtime_forbid() is called when the codec object is created to fix this issue. A codec enables or disables runtime pm in its own probe function. Multiple stress tests of 2000+ cycles has been done to test the fix. Signed-off-by: Harsha Priya Signed-off-by: Emmanuel Jillela Reviewed-by: Kailang Yang Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200930114140.3839617-2-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 88e315d12fbb50c0bd12549bb04a051a4b4bc744 Author: Liu Shixin Date: Mon Sep 21 16:24:41 2020 +0800 mtd: onenand: simplify the return expression of onenand_transfer_auto_oob Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200921082441.2591669-1-liushixin2@huawei.com commit fb1c7e829209e911ad479fb64ddbcc4f923caf50 Author: Liu Shixin Date: Mon Sep 21 09:38:05 2020 +0800 mtd: rawnand: cadence: remove a redundant dev_err call There is an error message within devm_ioremap_resource already, so remove the dev_err call to avoid a redundant error message. Signed-off-by: Liu Shixin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200921013805.1724606-1-liushixin2@huawei.com commit 6d11178762f7c8338a028b428198383b8978b280 Author: Janusz Krzysztofik Date: Sat Sep 19 10:04:03 2020 +0200 mtd: rawnand: ams-delta: Fix non-OF build warning Commit 7c2f66a960fc ("mtd: rawnand: ams-delta: Add module device tables") introduced an OF module device table but wrapped a reference to it with of_match_ptr() which resolves to NULL in non-OF configs. That resulted in a clang compiler warning on unused variable in non-OF builds. Fix it. drivers/mtd/nand/raw/ams-delta.c:373:34: warning: unused variable 'gpio_nand_of_id_table' [-Wunused-const-variable] static const struct of_device_id gpio_nand_of_id_table[] = { ^ 1 warning generated. Fixes: 7c2f66a960fc ("mtd: rawnand: ams-delta: Add module device tables") Reported-by: kernel test robot Signed-off-by: Janusz Krzysztofik Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200919080403.17520-1-jmkrzyszt@gmail.com commit fb8c3810d7c8d2bca01292395e35b85419394f52 Author: Tudor Ambarus Date: Thu Sep 17 10:52:13 2020 +0300 mtd: rawnand: Don't overwrite the error code from nand_set_ecc_soft_ops() The error code received from nand_set_ecc_soft_ops() was overwritten, drop this redundant assignment and use the error code received from the callee. Signed-off-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200917075213.532161-4-tudor.ambarus@microchip.com commit 6e88127904b837a0ade47eb2994feaa2b5fae437 Author: Tudor Ambarus Date: Thu Sep 17 10:52:12 2020 +0300 mtd: rawnand: Introduce nand_set_ecc_on_host_ops() There were too many levels of indentation and the code was hard to read. Introduce a new function, similar to nand_set_ecc_soft_ops(). Signed-off-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200917075213.532161-3-tudor.ambarus@microchip.com commit d27c9859a0c2f270972c26df6b2d2cc69c6d30f4 Author: Alex Dewar Date: Mon Sep 14 22:42:44 2020 +0100 mtd: rawnand: atmel: Check return values for nand_read_data_op In atmel_nand_pmecc_read_pg(), nand_read_data_op() is called twice without the return values being checked for errors. Add these checks. Signed-off-by: Alex Dewar Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200914214245.14626-1-alex.dewar90@gmail.com commit f7721e4bfec16c9e95e26f4b66bc4574076822d9 Author: YueHaibing Date: Wed Sep 9 21:43:18 2020 +0800 mtd: rawnand: vf610: Remove unused function vf610_nfc_transfer_size() commit ecc40b8df59a ("mtd: rawnand: vf610_nfc: remove old hooks") left behind this, remove it. Signed-off-by: YueHaibing Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200909134318.36340-1-yuehaibing@huawei.com commit 07eb014faadd2e370032bc88ddbf3bf29e87411f Author: Krzysztof Kozlowski Date: Tue Sep 1 16:25:35 2020 +0200 mtd: rawnand: qcom: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200901142535.12819-6-krzk@kernel.org commit c4bc1ec9ae570156e126bb34b08ec92d92f7ead9 Author: Krzysztof Kozlowski Date: Tue Sep 1 16:25:34 2020 +0200 mtd: rawnand: marvell: Fix and update kerneldoc Fix kerneldoc comments and add missing documentation for members to fix W=1 compile warnings like: drivers/mtd/nand/raw/marvell_nand.c:251: warning: cannot understand function prototype: 'struct marvell_hw_ecc_layout ' drivers/mtd/nand/raw/marvell_nand.c:342: warning: Function parameter or member 'layout' not described in 'marvell_nand_chip' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200901142535.12819-5-krzk@kernel.org commit 6ce92faeefc0182b544cceec16392df734c35b5d Author: Krzysztof Kozlowski Date: Tue Sep 1 16:25:33 2020 +0200 mtd: rawnand: marvell: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200901142535.12819-4-krzk@kernel.org commit 78a73491662aae0cbb3e46f0366d1b45e6027071 Author: Krzysztof Kozlowski Date: Tue Sep 1 16:25:32 2020 +0200 mtd: rawnand: gpmi: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200901142535.12819-3-krzk@kernel.org commit 1caa7522fad54d8439dae8515d0a89f3fabc65a7 Author: Krzysztof Kozlowski Date: Tue Sep 1 16:25:31 2020 +0200 mtd: rawnand: atmel: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alexandre Belloni Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200901142535.12819-2-krzk@kernel.org commit 28acb2ce42c44acb11dd5825594d8dff99a2eb4a Author: Krzysztof Kozlowski Date: Tue Sep 1 16:25:30 2020 +0200 mtd: onenand: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200901142535.12819-1-krzk@kernel.org commit 85a3ebbb7fe869188644498c49bf3719d9cb054d Author: Chris Packham Date: Fri Aug 28 13:12:37 2020 +1200 mtd: rawnand: marvell: Support panic_write for mtdoops Under a panic context we can't get an interrupt. Actively poll for the RB status when performing a panic_write. Signed-off-by: Chris Packham Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200828011237.22066-1-chris.packham@alliedtelesis.co.nz commit 302d8a2288529c44401d946de09526009e4f7124 Author: Hauke Mehrtens Date: Thu Aug 20 18:51:21 2020 +0200 mtd: spinand: gigadevice: Add support for GD5F4GQ4xC This adds support for the following 4GiB chips: GD5F4GQ4RCYIG 1.8V GD5F4GQ4UCYIG 3.3V The datasheet can be found here: https://www.novitronic.ch/sixcms/media.php/2/DS-00173-GD5F4GQ4xCxIG-Rev1.574695.pdf The GD5F4GQ4UCYIGT (3.3V) version is used on the Imagination Technologies Creator Ci40 (Marduk), the 1.8V version was not tested. This device only works in single SPI mode and not in dual or quad mode for me on this board. Signed-off-by: Hauke Mehrtens Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200820165121.3192-4-hauke@hauke-m.de commit aea7687e77bebce5b67fab9d03347bd8df7933c7 Author: Hauke Mehrtens Date: Thu Aug 20 18:51:20 2020 +0200 mtd: spinand: gigadevice: Add QE Bit The following GigaDevice chips have the QE BIT in the feature flags, I checked the datasheets, but did not try this. * GD5F1GQ4xExxG * GD5F1GQ4xFxxG * GD5F1GQ4UAYIG * GD5F4GQ4UAYIG The Quad operations like 0xEB mention that the QE bit has to be set. Fixes: c93c613214ac ("mtd: spinand: add support for GigaDevice GD5FxGQ4xA") Signed-off-by: Hauke Mehrtens Tested-by: Chuanhong Guo Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200820165121.3192-3-hauke@hauke-m.de commit 6387ad9caf8f09747a8569e5876086b72ee9382c Author: Hauke Mehrtens Date: Thu Aug 20 18:51:19 2020 +0200 mtd: spinand: gigadevice: Only one dummy byte in QUADIO The datasheet only lists one dummy byte in the 0xEH operation for the following chips: * GD5F1GQ4xExxG * GD5F1GQ4xFxxG * GD5F1GQ4UAYIG * GD5F4GQ4UAYIG Fixes: c93c613214ac ("mtd: spinand: add support for GigaDevice GD5FxGQ4xA") Signed-off-by: Hauke Mehrtens Tested-by: Chuanhong Guo Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200820165121.3192-2-hauke@hauke-m.de commit cb7dc3178a9862614b1e7567d77f4679f027a074 Author: Evgeny Novikov Date: Thu Aug 6 10:26:34 2020 +0300 mtd: rawnand: vf610: disable clk on error handling path in probe vf610_nfc_probe() does not invoke clk_disable_unprepare() on one error handling path. The patch fixes that. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 6f0ce4dfc5a3 ("mtd: rawnand: vf610: Avoid a potential NULL pointer dereference") Signed-off-by: Evgeny Novikov Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200806072634.23528-1-novikov@ispras.ru commit d43511d05cd41c987c26a122c4c49cae382c5c99 Author: Pavel Machek Date: Fri Jul 24 10:38:25 2020 +0200 mtd: rawnand: oxnas: cleanup/simplify code Simplify oxnas_nand_probe. Signed-off-by: Pavel Machek (CIP) Acked-by: Neil Armstrong Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200724083825.GA31437@amd commit 75b049bb7f89a58a25592f17baf91d703f0f548e Author: YouChing Lin Date: Wed Jul 22 16:02:58 2020 +0800 mtd: spinand: macronix: Add support for MX31UF1GE4BC The Macronix MX31UF1GE4BC is a 1.8V, 1Gbit (128MB) serial NAND flash device. Validated by read, erase, read back, write and read back on Xilinx Zynq PicoZed FPGA board which included Macronix SPI Host (driver/spi/spi-mxic.c). Signed-off-by: YouChing Lin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1595404978-31079-3-git-send-email-ycllin@mxic.com.tw commit 051e070d0a019df6be9e21be1fb63352e4c4412e Author: YouChing Lin Date: Wed Jul 22 16:02:57 2020 +0800 mtd: spinand: macronix: Add support for MX31LF1GE4BC The Macronix MX31LF1GE4BC is a 3V, 1Gbit (128MB) serial NAND flash device. Validated by read, erase, read back, write and read back on Xilinx Zynq PicoZed FPGA board which included Macronix SPI Host (driver/spi/spi-mxic.c). Signed-off-by: YouChing Lin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1595404978-31079-2-git-send-email-ycllin@mxic.com.tw commit ab78e6a6cef34d0b7eefd0d8a78308cfe7bd7737 Author: Wei Yongjun Date: Tue Jul 21 23:16:57 2020 +0800 mtd: rawnand: pasemi: Make pasemi_device_ready() static The sparse tool complains as follows: drivers/mtd/nand/raw/pasemi_nand.c:71:5: warning: symbol 'pasemi_device_ready' was not declared. Should it be static? This function is not used outside of pasemi_nand.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200721151657.41027-1-weiyongjun1@huawei.com commit ab16f54ef3cdb6bbc06a36f636a89e6db8a6cea3 Author: Christophe Kerello Date: Tue Jul 21 11:52:07 2020 +0200 mtd: rawnand: stm32_fmc2: fix a buffer overflow This patch solves following static checker warning: drivers/mtd/nand/raw/stm32_fmc2_nand.c:350 stm32_fmc2_nfc_select_chip() error: buffer overflow 'nfc->data_phys_addr' 2 <= 2 The CS value can only be 0 or 1. Signed-off-by: Christophe Kerello Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1595325127-32693-1-git-send-email-christophe.kerello@st.com commit 4bc0224323994555010fbb9de4408618d24b5811 Author: Boris Brezillon Date: Mon Jul 20 16:13:56 2020 +0300 mtd: rawnand: atmel: Get rid of the legacy interface implementation Now that exec_op() is implemented, we can get rid of all the legacy hooks. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Tested-by: Tudor Ambarus Signed-off-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200720131356.1579073-7-tudor.ambarus@microchip.com commit 03b3e0c27df3df76f5ea331fbc5fd94d1d355db2 Author: Boris Brezillon Date: Mon Jul 20 16:13:55 2020 +0300 mtd: rawnand: atmel: Convert the driver to exec_op() Both SMC and HSMC are converted to exec_op(). Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Tested-by: Tudor Ambarus Signed-off-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200720131356.1579073-6-tudor.ambarus@microchip.com commit 060c931c946f33552d652d01bc1010d843e2baa6 Author: Boris Brezillon Date: Mon Jul 20 16:13:54 2020 +0300 mtd: rawnand: atmel: Use nand_prog_page_end_op() The nand_prog_page_end_op() sequence is open-coded in atmel_hsmc_nand_pmecc_write_pg(). Let's use the generic helper here. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Signed-off-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200720131356.1579073-5-tudor.ambarus@microchip.com commit 5b2baf1fe5fd0b67d28cb18436b06ccdd2c2becf Author: Boris Brezillon Date: Mon Jul 20 16:13:53 2020 +0300 mtd: rawnand: atmel: Use nand_{write,read}_data_op() Use the nand_{write,read}_data_op() helpers instead of calling the atmel_nand_{read,write}_buf() functions directly. This will ease the transition to exec_op(). Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Reviewed-by: Tudor Ambarus Signed-off-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200720131356.1579073-4-tudor.ambarus@microchip.com commit dca3c3ce3c02b92784fc7d7dc6eb4f9d50c7ebb6 Author: Boris Brezillon Date: Mon Jul 20 16:13:52 2020 +0300 mtd: rawnand: atmel: Drop redundant nand_read_page_op() The legacy page read path in atmel_hsmc_nand_pmecc_read_pg() issues a nand_read_page_op() that's already issued by atmel_nand_pmecc_read_pg(). Let's get rid of the unneeded one. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Reviewed-by: Tudor Ambarus Signed-off-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200720131356.1579073-3-tudor.ambarus@microchip.com commit b0155dadeb15574380115c8fa82853ff9d6da1ad Author: Boris Brezillon Date: Mon Jul 20 16:13:51 2020 +0300 mtd: rawnand: atmel: Enable the NFC controller at probe time No need to enable it everytime select_chip() is called. If we really care about PM, we should implement runtime PM hooks and disable the controller and all its clocks when the controller has been unused for some time. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Reviewed-by: Tudor Ambarus Signed-off-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200720131356.1579073-2-tudor.ambarus@microchip.com commit b5156335ac37f186812090795ed27884a76c3266 Author: Miquel Raynal Date: Thu Aug 27 10:52:08 2020 +0200 mtd: rawnand: Use the NAND framework user_conf object for ECC flags Instead of storing the ECC flags in chip->ecc.options, use nanddev->ecc.user_conf.flags. There is currently only one to save: NAND_ECC_MAXIMIZE. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-21-miquel.raynal@bootlin.com commit d7157ff49a5b5845b37b8f2bf31607f0af295ef1 Author: Miquel Raynal Date: Thu Aug 27 10:52:07 2020 +0200 mtd: rawnand: Use the ECC framework user input parsing bits Many helpers are generic to all NAND chips, they should not be raw-NAND specific, so use the generic ones. To avoid moving all the raw NAND core "history" into the generic NAND layer, we keep a part of this parsing in the raw NAND core to ensure backward compatibility. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-20-miquel.raynal@bootlin.com commit 8c126720fe109bcd7316c37d50b2b17c2ae1dded Author: Miquel Raynal Date: Thu Aug 27 10:52:06 2020 +0200 mtd: rawnand: Use the ECC framework nand_ecc_is_strong_enough() helper Plus, the new helper has a more "english" name. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-19-miquel.raynal@bootlin.com commit 1e3b37aab958861a9d0c01ff6dbec96a82743701 Author: Miquel Raynal Date: Thu Aug 27 10:52:05 2020 +0200 mtd: rawnand: Use the ECC framework OOB layouts No need to have our own in the raw NAND core. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-18-miquel.raynal@bootlin.com commit 671459676ab0e1d371c8d6b184ad1faa05b6941e Author: Dave Chinner Date: Wed Sep 30 07:28:52 2020 -0700 xfs: fix finobt btree block recovery ordering Nathan popped up on #xfs and pointed out that we fail to handle finobt btree blocks in xlog_recover_get_buf_lsn(). This means they always fall through the entire magic number matching code to "recover immediately". Whilst most of the time this is the correct behaviour, occasionally it will be incorrect and could potentially overwrite more recent metadata because we don't check the LSN in the on disk metadata at all. This bug has been present since the finobt was first introduced, and is a potential cause of the occasional xfs_iget_check_free_state() failures we see that indicate that the inode btree state does not match the on disk inode state. Fixes: aafc3c246529 ("xfs: support the XFS_BTNUM_FINOBT free inode btree type") Reported-by: Nathan Scott Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 14ef9d04928b61d699fd0dd858b14b5d8150113e Merge: 2e02cbb236d6a 816c347f3a48f Author: Marc Zyngier Date: Wed Sep 30 14:05:35 2020 +0100 Merge branch 'kvm-arm64/hyp-pcpu' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 85985a3dcd7415dd849cf62ec14f931cd905099a Author: Serge Semin Date: Wed Sep 23 19:19:50 2020 +0300 serial: 8250_dw: Fix clk-notifier/port suspend deadlock It has been discovered that there is a potential deadlock between the clock-change-notifier thread and the UART port suspending one: CPU0 (suspend CPU/UART) CPU1 (update clock) ---- ---- lock(&port->mutex); lock((work_completion)(&data->clk_work)); lock(&port->mutex); lock((work_completion)(&data->clk_work)); *** DEADLOCK *** The best way to fix this is to eliminate the CPU0 port->mutex/work-completion scenario. So we suggest to register and unregister the clock-notifier during the DW APB UART port probe/remove procedures, instead of doing that at the points of the port startup/shutdown. Link: https://lore.kernel.org/linux-serial/f1cd5c75-9cda-6896-a4e2-42c5bfc3f5c3@redhat.com Fixes: cc816969d7b5 ("serial: 8250_dw: Fix common clocks usage race condition") Reported-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200923161950.6237-4-Sergey.Semin@baikalelectronics.ru Signed-off-by: Greg Kroah-Hartman commit c8dff3aa824177013d90967687f09f713a55d13f Author: Serge Semin Date: Wed Sep 23 19:19:49 2020 +0300 serial: 8250: Skip uninitialized TTY port baud rate update It is erroneous to update the TTY port baud rate if it hasn't been initialized yet, because in that case the TTY struct isn't set. So there is no termios structure to get and re-calculate the baud if the current baud can't be reached. Let's skip the baud rate update then until the port is fully initialized. Note the update UART clock method still sets the uartclk member with a new ref clock value even if the port is turned off. The new UART ref clock rate will be used later on the port starting up procedure. Fixes: 868f3ee6e452 ("serial: 8250: Add 8250 port clock update method") Tested-by: Hans de Goede Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200923161950.6237-3-Sergey.Semin@baikalelectronics.ru Signed-off-by: Greg Kroah-Hartman commit 7718453e36960dadb8dc46f2b514b309659e1270 Author: Serge Semin Date: Wed Sep 23 19:19:48 2020 +0300 serial: 8250: Discard RTS/DTS setting from clock update method It has been a mistake to add the MCR register RTS/DTS fields setting in the generic method of the UART reference clock update. There is no point in asserting these lines at that procedure. Just discard the serial8250_out_MCR() mathod invocation from there then. Fixes: 868f3ee6e452 ("serial: 8250: Add 8250 port clock update method") Tested-by: Hans de Goede Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200923161950.6237-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Greg Kroah-Hartman commit 61693228b6e3f9de1c07bfec10b3204e69495fb1 Author: Arnaldo Carvalho de Melo Date: Wed Sep 30 09:34:20 2020 -0300 perf beauty mmap_flags: Conditionaly define the mmap flags So that in older systems we get it in the mmap flags scnprintf routines: $ tools/perf/trace/beauty/mmap_flags.sh | head -9 2> /dev/null static const char *mmap_flags[] = { [ilog2(0x40) + 1] = "32BIT", #ifndef MAP_32BIT #define MAP_32BIT 0x40 #endif [ilog2(0x01) + 1] = "SHARED", #ifndef MAP_SHARED #define MAP_SHARED 0x01 #endif $ Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit bbcb0522ae0cea0f2561e7dad243f8a3d5ab5559 Author: Roger Quadros Date: Wed Sep 30 15:20:32 2020 +0300 arm64: dts: ti: k3-j7200-common-proc-board: Add USB support The board uses lane 3 of SERDES for USB. Set the mux accordingly. The USB controller and EVM supports super-speed for USB0 on the Type-C port. However, the SERDES has a limitation that upto 2 protocols can be used at a time. The SERDES is wired for PCIe, QSGMII and USB super-speed. It has been chosen to use PCI2 and QSGMII as default. So restrict USB0 to high-speed mode. Signed-off-by: Roger Quadros Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200930122032.23481-7-rogerq@ti.com commit e38a45b0192c4562e610c9c81e4c742b48fa69f0 Author: Kishon Vijay Abraham I Date: Wed Sep 30 15:20:31 2020 +0300 arm64: dts: ti: k3-j7200-common-proc-board: Configure the SERDES lane function First two lanes of SERDES is connected to PCIe, third lane is connected to QSGMII and the last lane is connected to USB. However, Cadence torrent SERDES doesn't support more than 2 protocols at the same time. Configure it only for PCIe and QSGMII. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Roger Quadros Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200930122032.23481-6-rogerq@ti.com commit 6197d7139d128d3391a94bfad467ffe349a869a6 Author: Roger Quadros Date: Wed Sep 30 15:20:30 2020 +0300 arm64: dts: ti: k3-j7200-main: Add USB controller j7200 has on USB controller instance. Add that. Signed-off-by: Roger Quadros Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200930122032.23481-5-rogerq@ti.com commit 9a09e6e9cfcf5424e78636e9b9585de5c07407bc Author: Roger Quadros Date: Wed Sep 30 15:20:29 2020 +0300 arm64: dts: ti: k3-j7200-main.dtsi: Add USB to SERDES lane MUX The USB controller can be connected to one of the 2 lanes of SERDES0 using a MUX. Add a MUX controller node for that. Signed-off-by: Roger Quadros Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200930122032.23481-4-rogerq@ti.com commit 1509295295c03c570bd65c3e393b334c188218cd Author: Roger Quadros Date: Wed Sep 30 15:20:28 2020 +0300 arm64: dts: ti: k3-j7200-main: Add SERDES lane control mux The SERDES lane control mux registers are present in the CTRLMMR space. Signed-off-by: Roger Quadros Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200930122032.23481-3-rogerq@ti.com commit ba90e0c92666979298a2c42ca396ac56d00cf33e Author: Roger Quadros Date: Wed Sep 30 15:20:27 2020 +0300 dt-bindings: ti-serdes-mux: Add defines for J7200 SoC There are 4 lanes in each J7200 SERDES. Each SERDES lane mux can select upto 4 different IPs. Define all the possible functions. Signed-off-by: Roger Quadros Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Acked-by: Rob Herring Acked-by: Peter Rosin Cc: Peter Rosin Link: https://lore.kernel.org/r/20200930122032.23481-2-rogerq@ti.com commit ffb0024ecd3d3e20b8eb1d0d54ceeb7f43453118 Merge: 197bbae9ed8b4 c65176fd49f45 Author: Nishanth Menon Date: Wed Sep 30 07:32:50 2020 -0500 Merge tag 'ti-k3-dt-fixes-for-v5.9' into ti-k3-dts-next Merge fix up for TI serdes mux definition introduced in 5.9 as dependency for 5.10 series on J7200 USB. Signed-off-by: Nishanth Menon commit edd64f30792dca1aee1fc27381b7c9c1ec0e9e58 Author: Matthias Schiffer Date: Fri Sep 25 10:24:12 2020 +0200 tty: serial: imx: disable TXDC IRQ in imx_uart_shutdown() to avoid IRQ storm The IPG clock is disabled at the end of imx_uart_shutdown(); we really don't want to run any IRQ handlers after this point. At least on i.MX8MN, the UART will happily continue to generate interrupts even with its clocks disabled, but in this state, all register writes are ignored (which will cause the shadow registers to differ from the actual register values, resulting in all kinds of weirdness). In a transfer without DMA, this could lead to the following sequence of events: - The UART finishes its transmission while imx_uart_shutdown() is run, triggering the TXDC interrupt (we can trigger this fairly reliably by writing a single byte to the TTY and closing it right away) - imx_uart_shutdown() finishes, disabling the UART clocks - imx_uart_int() -> imx_uart_transmit_buffer() -> imx_uart_stop_tx() imx_uart_stop_tx() should now clear UCR4_TCEN to disable the TXDC interrupt, but this register write is ineffective. This results in an interrupt storm. To disable all interrupts in the same place, and to avoid setting UCR4 twice, clearing UCR4_OREN is moved below del_timer_sync() as well; this should be harmless. Signed-off-by: Matthias Schiffer Link: https://lore.kernel.org/r/20200925082412.12960-1-matthias.schiffer@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman commit 409cc4541ade015acd11f2566dcda599363a87a3 Author: Andrij Abyzov Date: Mon Sep 28 16:41:27 2020 +0200 serial: 8250_fsl: Fix TX interrupt handling condition This is the port of the commit db1b5bc047b3 ("serial: 8250: Fix TX interrupt handling condition") to the 8250_fsl irq handling logic. 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: Andrij Abyzov Link: https://lore.kernel.org/r/20200928144127.87156-1-aabyzov@slb.com Signed-off-by: Greg Kroah-Hartman commit 534cf755d9df99e214ddbe26b91cd4d81d2603e2 Author: Peter Zijlstra Date: Wed Sep 30 13:04:32 2020 +0100 serial: pl011: Fix lockdep splat when handling magic-sysrq interrupt Issuing a magic-sysrq via the PL011 causes the following lockdep splat, which is easily reproducible under QEMU: | sysrq: Changing Loglevel | sysrq: Loglevel set to 9 | | ====================================================== | WARNING: possible circular locking dependency detected | 5.9.0-rc7 #1 Not tainted | ------------------------------------------------------ | systemd-journal/138 is trying to acquire lock: | ffffab133ad950c0 (console_owner){-.-.}-{0:0}, at: console_lock_spinning_enable+0x34/0x70 | | but task is already holding lock: | ffff0001fd47b098 (&port_lock_key){-.-.}-{2:2}, at: pl011_int+0x40/0x488 | | which lock already depends on the new lock. [...] | Possible unsafe locking scenario: | | CPU0 CPU1 | ---- ---- | lock(&port_lock_key); | lock(console_owner); | lock(&port_lock_key); | lock(console_owner); | | *** DEADLOCK *** The issue being that CPU0 takes 'port_lock' on the irq path in pl011_int() before taking 'console_owner' on the printk() path, whereas CPU1 takes the two locks in the opposite order on the printk() path due to setting the "console_owner" prior to calling into into the actual console driver. Fix this in the same way as the msm-serial driver by dropping 'port_lock' before handling the sysrq. Cc: # 4.19+ Cc: Russell King Cc: Greg Kroah-Hartman Cc: Jiri Slaby Link: https://lore.kernel.org/r/20200811101313.GA6970@willie-the-truck Signed-off-by: Peter Zijlstra Tested-by: Will Deacon Signed-off-by: Will Deacon Link: https://lore.kernel.org/r/20200930120432.16551-1-will@kernel.org Signed-off-by: Greg Kroah-Hartman commit 29788ab1d2bf26c130de8f44f9553ee78a27e8d5 Author: Peng Fan Date: Tue Sep 29 17:55:09 2020 +0800 tty: serial: fsl_lpuart: fix lpuart32_poll_get_char The watermark is set to 1, so we need to input two chars to trigger RDRF using the original logic. With the new logic, we could always get the char when there is data in FIFO. Suggested-by: Fugang Duan Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20200929095509.21680-1-peng.fan@nxp.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 9ea40db477c024dcb87321b7f32bd6ea12130ac2 Author: Peng Fan Date: Tue Sep 29 17:19:20 2020 +0800 tty: serial: lpuart: fix lpuart32_write usage The 2nd and 3rd parameter were wrongly used, and cause kernel abort when doing kgdb debug. Fixes: 1da17d7cf8e2 ("tty: serial: fsl_lpuart: Use appropriate lpuart32_* I/O funcs") Cc: stable Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20200929091920.22612-1-peng.fan@nxp.com Signed-off-by: Greg Kroah-Hartman commit 6228cc8aed9e51afa56727b11001b37913e4dda6 Author: ChiYuan Huang Date: Wed Sep 30 18:18:52 2020 +0800 regulator: rtmv20: Add missing regcache cache only before marked as dirty Add missing regcache cache only before masked as dirty. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1601461132-15251-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit 89a5f77e3f3a7fb8d6cf25668489d66069ebe4b7 Author: ChiYuan Huang Date: Wed Sep 30 18:08:00 2020 +0800 regulator: rtmv20: Update DT binding document and property name parsing 1. Add vendor suffix to all proprietary properties. 2. Fix typo. 3. Change lsw to normal property, not pattern property. 4. Due to item 1, modify source code for property parsing. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1601460480-4259-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit 0463d04ea03a12d8a5aad42197a5945dfd78d7d6 Author: John Ogness Date: Wed Sep 30 11:07:34 2020 +0206 printk: reduce setup_text_buf size to LOG_LINE_MAX @setup_text_buf only copies the original text messages (without any prefix or extended text). It only needs to be LOG_LINE_MAX in size. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200930090134.8723-3-john.ogness@linutronix.de commit 45337656752e41d924622d1d4d7a4f34eb594c8b Author: Julia Lawall Date: Sun Sep 20 13:26:25 2020 +0200 misc: mic: drop double zeroing sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(struct scatterlist),flags) ... sg_init_table(x,n) // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1600601186-7420-14-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Greg Kroah-Hartman commit ad61b78ea8913e5cf9c91f5527428eed1bd2a862 Author: Qinglang Miao Date: Tue Sep 29 19:29:33 2020 +0800 ASoC: soc-core: use devm_snd_soc_register_card() Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200929112933.46977-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown commit 59f8bcca1ef6a5326f7c127e11b949e745bfa230 Author: John Ogness Date: Wed Sep 30 11:07:33 2020 +0206 printk: avoid and/or handle record truncation If a reader provides a buffer that is smaller than the message text, the @text_len field of @info will have a value larger than the buffer size. If readers blindly read @text_len bytes of data without checking the size, they will read beyond their buffer. Add this check to record_print_text() to properly recognize when such truncation has occurred. Add a maximum size argument to the ringbuffer function to extend records so that records can not be created that are larger than the buffer size of readers. When extending records (LOG_CONT), do not extend records beyond LOG_LINE_MAX since that is the maximum size available in the buffers used by consoles and syslog. Fixes: f5f022e53b87 ("printk: reimplement log_cont using record extension") Reported-by: Marek Szyprowski Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200930090134.8723-2-john.ogness@linutronix.de commit f4794c6064a83d2c57b264bd299c367d172d1044 Author: Hui Wang Date: Wed Sep 30 13:51:46 2020 +0800 ALSA: hda - Don't register a cb func if it is registered already If the caller of enable_callback_mst() passes a cb func, the callee function will malloc memory and link this cb func to the list unconditionally. This will introduce problem if caller is in the hda_codec_ops.init() since the init() will be repeatedly called in the codec rt_resume(). So far, the patch_hdmi.c and patch_ca0132.c call enable_callback_mst() in the hda_codec_ops.init(). Signed-off-by: Hui Wang Cc: Link: https://lore.kernel.org/r/20200930055146.5665-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 402e9228f7a6a90e4fad44b358350ae358f1bc3c Author: Vasily Gorbik Date: Sun Sep 27 22:07:40 2020 +0200 s390: remove orphaned function declarations arch/s390/pci/pci_bus.h: zpci_bus_init - only declaration left after commit 05bc1be6db4b ("s390/pci: create zPCI bus") arch/s390/include/asm/gmap.h: gmap_pte_notify - only declaration left after commit 4be130a08420 ("s390/mm: add shadow gmap support") arch/s390/include/asm/pgalloc.h: rcu_table_freelist_finish - only declaration left after commit 36409f6353fc ("[S390] use generic RCU page-table freeing code") arch/s390/include/asm/tlbflush.h: smp_ptlb_all - only declaration left after commit 5a79859ae0f3 ("s390: remove 31 bit support") arch/s390/include/asm/vtimer.h: init_cpu_vtimer - only declaration left after commit b5f87f15e200 ("s390/idle: consolidate idle functions and definitions") arch/s390/include/asm/pci.h: zpci_debug_info - only declaration left after commit 386aa051fb4b ("s390/pci: remove per device debug attribute") arch/s390/include/asm/vdso.h: vdso_alloc_boot_cpu - only declaration left after commit 4bff8cb54502 ("s390: convert to GENERIC_VDSO") arch/s390/include/asm/smp.h: smp_vcpu_scheduled - only declaration left after commit 67626fadd269 ("s390: enforce CONFIG_SMP") arch/s390/kernel/entry.h: restart_call_handler - only declaration left after commit 8b646bd75908 ("[S390] rework smp code") arch/s390/kernel/entry.h: startup_init_nobss - only declaration left after commit 2e83e0eb85ca ("s390: clean .bss before running uncompressed kernel") arch/s390/kernel/entry.h: s390_early_resume - only declaration left after commit 394216275c7d ("s390: remove broken hibernate / power management support") drivers/s390/char/raw3270.h: raw3270_request_alloc_bootmem - only declaration left after commit 33403dcfcdfd ("[S390] 3270 console: convert from bootmem to slab") drivers/s390/cio/device.h: ccw_device_schedule_sch_unregister - only declaration left after commit 37de53bb5290 ("[S390] cio: introduce ccw device todos") drivers/s390/char/tape.h: tape_hotplug_event - has only declaration since recorded git history. drivers/s390/char/tape.h: tape_oper_handler - has only declaration since recorded git history. drivers/s390/char/tape.h: tape_noper_handler - has only declaration since recorded git history. drivers/s390/char/tape_std.h: tape_std_check_locate - only declaration left after commit 161beff8f40d ("s390/tape: remove tape block leftovers") drivers/s390/char/tape_std.h: tape_std_default_handler - has only declaration since recorded git history. drivers/s390/char/tape_std.h: tape_std_unexpect_uchk_handler - has only declaration since recorded git history. drivers/s390/char/tape_std.h: tape_std_irq - has only declaration since recorded git history. drivers/s390/char/tape_std.h: tape_std_error_recovery - has only declaration since recorded git history. drivers/s390/char/tape_std.h: tape_std_error_recovery_has_failed - has only declaration since recorded git history. drivers/s390/char/tape_std.h: tape_std_error_recovery_succeded - has only declaration since recorded git history. drivers/s390/char/tape_std.h: tape_std_error_recovery_do_retry - has only declaration since recorded git history. drivers/s390/char/tape_std.h: tape_std_error_recovery_read_opposite - has only declaration since recorded git history. drivers/s390/char/tape_std.h: tape_std_error_recovery_HWBUG - has only declaration since recorded git history. Reviewed-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 3ca8b855b0112906caecab88f04a8786a2d40906 Author: Vasily Gorbik Date: Sun Aug 11 20:23:56 2019 +0200 s390/startup: add kaslr_offset to pgm check info print startup pgm check handler is active since the very beginning of kernel code execution until uncompressed kernel sets up s390_base_pgm_handler. It is useful not just for the decompressor debugging itself, but also for early code of uncompressed kernel, in particular Kasan initialization. But since there is no stack trace or symbolic representation of failing psw address it is impossible to figure out faulty code location without knowing Kaslr kernel base. So, let's add it to the startup pgm check info printed as well. Reviewed-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 3372e88b094e7ed463b92dc28e1121ec44fb6fbe Author: Vasily Gorbik Date: Sat Sep 26 00:38:41 2020 +0200 s390/sclp: remove orphaned sclp_set_columns and sclp_set_htab sclp_set_columns and sclp_set_htab are leftovers since commit 095761d28ae4 ("[S390] sclp_tty: remove ioctl interface."), remove them as a dead code. Reviewed-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit f980ec9e34f8b0e74ba524cfc1b7bd9ff10ee6b4 Author: Vasily Gorbik Date: Sat Sep 26 00:27:25 2020 +0200 s390/sclp_sdias: remove unused sclp_sdias_exit sclp_sdias cannot be built as a module, CRASH_DUMP option is a bool not a tristate. zcore_exit() has already been removed with commit cbe62fac178c ("s390: char: make zcore explicitly non-modular"). Remove orphaned sclp_sdias_exit for consistency as well. Reviewed-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 86cde618e718d0d286a565bcabfce5bdfc304685 Author: Vasily Gorbik Date: Fri Sep 25 22:42:30 2020 +0200 s390/startup: correct "dfltcc" option parsing Currently if just "dfltcc" is passed as a kernel command line option "val" going to be NULL, this leads to reading at address 0 in strcmp(val, "off") Fix that by making sure "val" is not NULL. This does not affect option handling logic. Reviewed-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 3731ac579519d6c24ad2c5ac91959586b1919b5c Author: Vasily Gorbik Date: Sun Sep 27 21:34:55 2020 +0200 s390/vdso: remove orphaned declarations Remove couple of declarations which are unused since commit 4bff8cb54502 ("s390: convert to GENERIC_VDSO"). Acked-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 54530ce6a184ed8c0accc3c50b659590ec445222 Author: Vasily Gorbik Date: Sat Sep 26 00:08:54 2020 +0200 s390/cio: remove unused channel_subsystem_reinit Added with commit 77e844b96440 ("s390/hibernate: add early resume function") unused since commit 394216275c7d ("s390: remove broken hibernate / power management support"). Reviewed-by: Vineeth Vijayan Signed-off-by: Vasily Gorbik commit ad3e6948f90ac3d71f9c03ec92009d99dfb561e9 Author: Sven Schnelle Date: Mon Sep 28 07:22:50 2020 +0200 s390: remove cad commandline option remove the cad command line option as the instruction was never published and never used by userspace. Signed-off-by: Sven Schnelle Reviewed-by: Vasily Gorbik Acked-by: Christian Borntraeger Signed-off-by: Vasily Gorbik commit 237d96164f2c2b33d0d5094192eb743e9e1b04ad Author: Mike Looijmans Date: Wed Sep 30 11:20:53 2020 +0200 gpio: pca953x: Add support for the NXP PCAL9554B/C The NXP PCAL9554B is a variant of the PCA953x GPIO expander, with 8 GPIOs, latched interrupts and some advanced configuration options. The "C" version only differs in I2C address. Signed-off-by: Mike Looijmans Reviewed-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200930092053.2114-2-mike.looijmans@topic.nl Signed-off-by: Linus Walleij commit 48d072c4e8cdb542ade06727c31d7851bcc40a89 Author: Fabian Frederick Date: Thu Sep 24 12:17:33 2020 +0200 selftests: netfilter: add time counter check Check packets are correctly placed in current year. Also do a NULL check for another one. Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit 002f2176532093753cb6ced61e5ea7b8904c6cae Author: Jose M. Guisado Gomez Date: Mon Sep 28 14:27:10 2020 +0200 netfilter: nf_tables: add userdata attributes to nft_chain Enables storing userdata for nft_chain. Field udata points to user data and udlen stores its length. Adds new attribute flag NFTA_CHAIN_USERDATA. Signed-off-by: Jose M. Guisado Gomez Signed-off-by: Pablo Neira Ayuso commit 85db827a57a9311ddb3d7f9fa18d812517b2ab9a Author: Jose M. Guisado Gomez Date: Mon Sep 28 14:24:57 2020 +0200 netfilter: nf_tables: use nla_memdup to copy udata When userdata support was added to tables and objects, user data coming from user space was allocated and copied using kzalloc + nla_memcpy. Use nla_memdup to copy userdata of tables and objects. Signed-off-by: Jose M. Guisado Gomez Signed-off-by: Pablo Neira Ayuso commit a0cec28c965285c4debc00b035552f8096f2aee4 Author: Andy Shevchenko Date: Tue Sep 29 14:03:06 2020 +0300 pinctrl: sunrisepoint: Modify COMMUNITY macros to be consistent Modify COMMUNITY macros to be consistent with Tiger Lake and others. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20200929110306.40852-3-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 701372c7e8f173f9cd6d1d353606950e77444692 Author: Andy Shevchenko Date: Tue Sep 29 14:03:05 2020 +0300 pinctrl: cannonlake: Modify COMMUNITY macros to be consistent Modify COMMUNITY macros to be consistent with Tiger Lake and others. No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20200929110306.40852-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit cb8cc18508fb0cad74929ffd080bebafe91609e2 Author: Andy Shevchenko Date: Tue Sep 29 14:03:04 2020 +0300 pinctrl: tigerlake: Fix register offsets for TGL-H variant It appears that almost traditionally the H variants have some deviations in the register offsets in comparison to LP ones. This is the case for Intel Tiger Lake as well. Fix register offsets for TGL-H variant. Fixes: 653d96455e1e ("pinctrl: tigerlake: Add support for Tiger Lake-H") Reported-by: Pierre-Louis Bossart Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20200929110306.40852-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 3163508b207f4622ba6f288127d68656a98e36a6 Author: Drew Fustini Date: Sat Sep 19 22:08:37 2020 +0200 pinctrl: Document pinctrl-single,pins when #pinctrl-cells = 2 Document the values in pinctrl-single,pins when #pinctrl-cells = <2> Fixes: 27c90e5e48d0 ("ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2") Reported-by: Trent Piepho Signed-off-by: Drew Fustini Reviewed-by: Rob Herring Acked-by: Tony Lindgren Link: https://lore.kernel.org/linux-omap/3139716.CMS8C0sQ7x@zen.local/ Link: https://lore.kernel.org/r/20200919200836.3218536-1-drew@beagleboard.org Signed-off-by: Linus Walleij commit bc7a708235f41face74f9746461f94d94e8e33ae Author: Jose M. Guisado Gomez Date: Sun Sep 27 10:36:22 2020 +0200 netfilter: nf_tables: fix userdata memleak When userdata was introduced for tables and objects its allocation was only freed inside the error path of the new{table, object} functions. Free user data inside corresponding destroy functions for tables and objects. Fixes: b131c96496b3 ("netfilter: nf_tables: add userdata support for nft_object") Fixes: 7a81575b806e ("netfilter: nf_tables: add userdata attributes to nft_table") Signed-off-by: Jose M. Guisado Gomez Signed-off-by: Pablo Neira Ayuso commit 3d5a46544b97ca1c446e13f4aa1b0f811e5a0a7c Merge: 12d16b397ce0a cf048e05b6878 Author: Linus Walleij Date: Wed Sep 30 11:35:56 2020 +0200 Merge tag 'gpio-updates-for-v5.10-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio updates for v5.10 - part 2 - refactor gpio-mockup testing module - simplify the code in gpio-mpc8xxx - implement v2 of the GPIO user API commit dba1572c23601025b99e418066c82105eca950bc Author: Thomas Kopp Date: Wed Sep 30 11:14:22 2020 +0200 can: mcp25xxfd: narrow down wildcards in device tree bindings to "microchip,mcp251xfd" The wildcard should be narrowed down to prevent existing and future devices that are not compatible from matching. It is very unlikely that incompatible devices will be released that do not match the wildcard. Discussion Reference: https://lore.kernel.org/r/CAMuHMdVkwGjr6dJuMyhQNqFoJqbh6Ec5V2b5LenCshwpM2SDsQ@mail.gmail.com Reported-by: Geert Uytterhoeven Signed-off-by: Thomas Kopp Link: https://lore.kernel.org/r/20200930091423.755-1-thomas.kopp@microchip.com Signed-off-by: Marc Kleine-Budde commit 0e051294c03e84e1dcb9c84d105d762aedb27364 Author: Thomas Kopp Date: Wed Sep 30 11:14:23 2020 +0200 dt-binding: can: mcp251xfd: narrow down wildcards in device tree bindings to "microchip,mcp251xfd" The wildcard should be narrowed down to prevent existing and future devices that are not compatible from matching. It is very unlikely that incompatible devices will be released that do not match the wildcard. This is the documentation part of the commit. Discussion Reference: https://lore.kernel.org/r/CAMuHMdVkwGjr6dJuMyhQNqFoJqbh6Ec5V2b5LenCshwpM2SDsQ@mail.gmail.com Reported-by: Geert Uytterhoeven Signed-off-by: Thomas Kopp Link: https://lore.kernel.org/r/20200930091423.755-2-thomas.kopp@microchip.com [mkl: rename file, too] Signed-off-by: Marc Kleine-Budde commit cf048e05b68789e9fa35f246f8ecbe95d79f4173 Author: Kent Gibson Date: Mon Sep 28 08:28:07 2020 +0800 tools: gpio: add debounce support to gpio-event-mon Add support for debouncing monitored lines to gpio-event-mon. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 62757c32d5db33fa3abb7b7b88201f9b4ecbc85b Author: Kent Gibson Date: Mon Sep 28 08:28:06 2020 +0800 tools: gpio: add multi-line monitoring to gpio-event-mon Extend gpio-event-mon to support monitoring multiple lines. This would require multiple lineevent requests to implement using uAPI v1, but can be performed with a single line request using uAPI v2. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 0acda979df8d065f9cb16bbc723723b036697e57 Author: Kent Gibson Date: Mon Sep 28 08:28:05 2020 +0800 tools: gpio: port gpio-event-mon to v2 uAPI Port the gpio-event-mon tool to the latest GPIO uAPI. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 7ff6d1d25a9ea3a03f795d383889ac34fbc601d5 Author: Kent Gibson Date: Mon Sep 28 08:28:04 2020 +0800 tools: gpio: port gpio-hammer to v2 uAPI Port the gpio-hammer tool to the latest GPIO uAPI. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit ed60aee0edcda1fabc39ab27c9650fa172f461b4 Author: Kent Gibson Date: Mon Sep 28 08:28:03 2020 +0800 tools: gpio: rename nlines to num_lines Rename nlines to num_lines to be consistent with other usage for fields describing the number of entries in an array. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit e86a863b337c50713b674007f74dc1854701eb93 Author: Kent Gibson Date: Mon Sep 28 08:28:02 2020 +0800 tools: gpio: port gpio-watch to v2 uAPI Port the gpio-watch tool to the latest GPIO uAPI. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 3c333c47041c905b81860478d2d8c0c3e8623b40 Author: Kent Gibson Date: Mon Sep 28 08:28:01 2020 +0800 tools: gpio: port lsgpio to v2 uAPI Port the lsgpio tool to the latest GPIO uAPI. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit b234d233fe30c63c4e461b03e2884a6765c8e5b0 Author: Kent Gibson Date: Mon Sep 28 08:28:00 2020 +0800 gpio: uapi: document uAPI v1 as deprecated Update uAPI documentation to deprecate v1 structs and ioctls. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 65cff70464068a823b3f4a28074000febdce0630 Author: Kent Gibson Date: Mon Sep 28 08:27:59 2020 +0800 gpiolib: cdev: support setting debounce Add support for setting debounce on a line via the GPIO uAPI. Where debounce is not supported by hardware, a software debounce is provided. The implementation of the software debouncer waits for the line to be stable for the debounce period before determining if a level change, and a corresponding edge event, has occurred. This provides maximum protection against glitches, but also introduces a debounce_period latency to edge events. The software debouncer is integrated with the edge detection as it utilises the line interrupt, and integration is simpler than getting the two to interwork. Where software debounce AND edge detection is required, the debouncer provides both. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 7b8e00d981680ddbbdd9874a7b46e0da58a2da4b Author: Kent Gibson Date: Mon Sep 28 08:27:58 2020 +0800 gpiolib: cdev: support GPIO_V2_LINE_SET_VALUES_IOCTL Add support for the GPIO_V2_LINE_SET_VALUES_IOCTL. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit a54756cb24eafac70ce92bfbd9bb4a4195689fb4 Author: Kent Gibson Date: Mon Sep 28 08:27:57 2020 +0800 gpiolib: cdev: support GPIO_V2_LINE_SET_CONFIG_IOCTL Add support for GPIO_V2_LINE_SET_CONFIG_IOCTL, the uAPI v2 line set config ioctl. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 73e0341992b68bb3e748134ea8c7473f9d4e279f Author: Kent Gibson Date: Mon Sep 28 08:27:56 2020 +0800 gpiolib: cdev: support edge detection for uAPI v2 Add support for edge detection to lines requested using GPIO_V2_GET_LINE_IOCTL. The edge_detector implementation is based on the v1 lineevent implementation. Unlike the v1 implementation, an overflow of the event buffer results in discarding older events, rather than the most recent, so the final event in a burst will correspond to the current state of the line. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit aad955842d1cdf56d31e600112137d82fd431140 Author: Kent Gibson Date: Mon Sep 28 08:27:55 2020 +0800 gpiolib: cdev: support GPIO_V2_GET_LINEINFO_IOCTL and GPIO_V2_GET_LINEINFO_WATCH_IOCTL Add support for GPIO_V2_GET_LINEINFO_IOCTL and GPIO_V2_GET_LINEINFO_WATCH_IOCTL. The core of this change is the event kfifo switching to contain struct gpioline_info_changed_v2, instead of v1 as v2 is richer. The two uAPI versions are mostly independent - other than where they both provide line info changes via reads on the chip fd. As the info change structs differ between v1 and v2, the infowatch implementation tracks which version of the infowatch ioctl, either GPIO_GET_LINEINFO_WATCH_IOCTL or GPIO_V2_GET_LINEINFO_WATCH_IOCTL, initiates the initial watch and returns the corresponding info change struct to the read. The version supported on that fd locks to that version on the first watch request, so subsequent watches from that process must use the same uAPI version. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 3c0d9c635ae2b2c6416928271a452017b60e3f98 Author: Kent Gibson Date: Mon Sep 28 08:27:54 2020 +0800 gpiolib: cdev: support GPIO_V2_GET_LINE_IOCTL and GPIO_V2_LINE_GET_VALUES_IOCTL Add support for requesting lines using the GPIO_V2_GET_LINE_IOCTL, and returning their current values using GPIO_V2_LINE_GET_VALUES_IOCTL. The struct linereq implementation is based on the v1 struct linehandle implementation. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 957ebb61a4761c1eb32c3f34db7ccfef2e1e95ae Author: Kent Gibson Date: Mon Sep 28 08:27:53 2020 +0800 gpiolib: add build option for CDEV v1 ABI Add a build option to allow the removal of the CDEV v1 ABI. Suggested-by: Bartosz Golaszewski Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit d143493c01b7fc3a9b9369a795e20329561222c5 Author: Kent Gibson Date: Mon Sep 28 08:27:52 2020 +0800 gpiolib: make cdev a build option Make the gpiolib-cdev module a build option. This allows the CDEV interface to be removed from the kernel to reduce kernel size in applications where is it not required, and provides the parent for other CDEV interface specific build options to follow. Suggested-by: Bartosz Golaszewski Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit b53911aa872db462be2e5f1dd611b25c4c2e663b Author: Kent Gibson Date: Mon Sep 28 08:27:51 2020 +0800 gpio: uapi: define uAPI v2 Add a new version of the uAPI to address existing 32/64-bit alignment issues, add support for debounce and event sequence numbers, allow requested lines with different configurations, and provide some future proofing by adding padding reserved for future use. The alignment issue relates to the gpioevent_data, which packs to different sizes on 32-bit and 64-bit platforms. That creates problems for 32-bit apps running on 64-bit kernels. uAPI v2 addresses that particular issue, and the problem more generally, by adding pad fields that explicitly pad structs out to 64-bit boundaries, so they will pack to the same size now, and even if some of the reserved padding is used for __u64 fields in the future. The new structs have been analysed with pahole to ensure that they are sized as expected and contain no implicit padding. The lack of future proofing in v1 makes it impossible to, for example, add the debounce feature that is included in v2. The future proofing is addressed by providing configurable attributes in line config and reserved padding in all structs for future features. Specifically, the line request, config, info, info_changed and event structs receive updated versions and new ioctls. As the majority of the structs and ioctls were being replaced, it is opportune to rework some of the other aspects of the uAPI: v1 has three different flags fields, each with their own separate bit definitions. In v2 that is collapsed to one - gpio_v2_line_flag. The handle and event requests are merged into a single request, the line request, as the two requests were mostly the same other than the edge detection provided by event requests. As a byproduct, the v2 uAPI allows for multiple lines producing edge events on the same line handle. This is a new capability as v1 only supports a single line in an event request. As a consequence, there are now only two types of file handle to be concerned with, the chip and the line, and it is clearer which ioctls apply to which type of handle. There is also some minor renaming of fields for consistency compared to their v1 counterparts, e.g. offset rather than lineoffset or line_offset, and consumer rather than consumer_label. Additionally, v1 GPIOHANDLES_MAX becomes GPIO_V2_LINES_MAX in v2 for clarity, and the gpiohandle_data __u8 array becomes a bitmap in gpio_v2_line_values. The v2 uAPI is mostly a reorganisation and extension of v1, so userspace code, particularly libgpiod, should readily port to it. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 539430fbbcc4a8d02451c77fff1ecd1f3b5f8abf Author: Kent Gibson Date: Mon Sep 28 08:27:50 2020 +0800 gpio: uapi: define GPIO_MAX_NAME_SIZE for array sizes Replace constant array sizes with a macro constant to clarify the source of array sizes, provide a place to document any constraints on the size, and to simplify array sizing in userspace if constructing structs from their composite fields. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 69e4e1368803266d0e06dba86868f64f7b277cde Author: Kent Gibson Date: Mon Sep 28 08:27:49 2020 +0800 gpiolib: cdev: replace strncpy() with strscpy() Replace usage of strncpy() with strscpy() to remove -Wstringop-truncation warnings. The structures being populated are zeroed, to prevent stack leakage as they are returned to userspace, so strscpy() performs the equivalent function without the warnings. Reported-by: kernel test robot Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 0dc11e3ad353e19b1a119e3146c69c0930ecae5f Author: Kent Gibson Date: Mon Sep 28 08:27:48 2020 +0800 gpiolib: cdev: gpio_desc_to_lineinfo() should set info offset Set the value of the line info offset in gpio_desc_to_lineinfo(), rather than relying on it being passed in the info. This makes the function behave as you would expect from the name - it generates the line info corresponding to a given GPIO desc. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 42e9acc679105208e001a2911c0241d968ab68e5 Author: Bartosz Golaszewski Date: Tue Sep 29 12:10:04 2020 +0200 gpio: mockup: refactor the module init function Let's move the code preparing the device properties into a separate routine. This has the advantage of simplifying the error handling and makes the indentation less deep. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 582be05ea42aca26cb640d1a82d7ec860e577fb5 Author: Bartosz Golaszewski Date: Tue Sep 29 12:10:03 2020 +0200 gpio: mockup: use the generic 'gpio-line-names' property GPIO line names are currently created by the driver from the chip label. We'll want to support custom formats for line names (for instance: to name all lines the same) for user-space tests so create them in the module init function and pass them to the driver using the standard 'gpio-line-names' property. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 148c2560c55b5d4a46849324498f4f0b14a8243d Author: Bartosz Golaszewski Date: Tue Sep 29 12:10:02 2020 +0200 gpio: mockup: pass the chip label as device property While we do check the "chip-name" property in probe(), we never actually use it. Let's pass the chip label to the driver using device properties as we'll want to allow users to define their own once dynamically created chips are supported. The property is renamed to "chip-label" to not cause any confusion with the actual chip name which is of the form: "gpiochipX". If the "chip-label" property is missing, let's do what most devices in drivers/gpio/ do and use dev_name(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 383bb2de4d494ec0a62a1ab2cd8438c04e9100bd Author: Bartosz Golaszewski Date: Tue Sep 29 12:10:01 2020 +0200 gpio: mockup: increase the number of supported device properties The driver actually supports 4 properties but we only ever set up up to three. This will change however in upcoming patches so increase the number of really (as in: the number the property array can hold) supported properties to 4. Reported-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 66f222ef45f3d55121fd69bd5d03e74c0d1ff1e5 Author: Bartosz Golaszewski Date: Tue Sep 29 12:10:00 2020 +0200 gpio: mockup: remove unneeded return statement There's a return; at the end of a void function. This is not needed so remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 56f6cb35e2749156c779d0cc7ae2a68305666c14 Author: Bartosz Golaszewski Date: Tue Sep 29 12:09:59 2020 +0200 gpio: mockup: use pr_fmt() We don't need a custom logging helper. Let's use the standard pr_fmt() macro which allows us to use all pr_*() routines with custom format. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 25f0006603e4a5e9a2dbdbbe1783803fa6b1e239 Author: Bartosz Golaszewski Date: Tue Sep 29 12:09:58 2020 +0200 gpio: mockup: use KBUILD_MODNAME Drop the definition for the driver name. Let's use KBUILD_MODNAME for the log format and use the "gpio-mockup" value directly in the only place where it's relevant: in the name of the device. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 94502ba9a47c2bfbd2e4d4d683392b409e9c31bb Author: Bartosz Golaszewski Date: Tue Sep 29 12:09:57 2020 +0200 gpio: mockup: drop unneeded includes This module doesn't need gpio/consumer.h - it's a provider. It also doesn't use any symbols from init.h so let's remove both includes. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 2fd1abe99e5fbc6091b2015577b43e6f365e35bb Author: Bartosz Golaszewski Date: Tue Sep 29 12:09:56 2020 +0200 Documentation: gpio: add documentation for gpio-mockup There's some documentation for gpio-mockup's debugfs interface in the driver's source but it's not much. Add proper documentation for this testing module. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 0fd16012adc0a994a7ce980a78e22e4de6220778 Author: Bartosz Golaszewski Date: Tue Sep 29 12:09:55 2020 +0200 lib: string_helpers: provide kfree_strarray() There's a common pattern of dynamically allocating an array of char pointers and then also dynamically allocating each string in this array. Provide a helper for freeing such a string array with one call. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 3795d7cc4fe13200dae9fade93441b4d5f123b74 Author: Michael Walle Date: Wed Sep 30 09:42:11 2020 +0200 gpio: mpc8xxx: simplify ls1028a/ls1088a support Some Layerscape/QoriQ SoCs have input buffers which needs to be enabled first. This was done in two different ways in the driver. Unify it. This was tested on a LS1028A SoC. Signed-off-by: Michael Walle Signed-off-by: Bartosz Golaszewski commit e0ab949f152a7f070fbf7b56d9caa4206b140190 Author: Bartosz Golaszewski Date: Tue Sep 8 15:07:49 2020 +0200 gpio: mockup: fix resource leak in error path If the module init function fails after creating the debugs directory, it's never removed. Add proper cleanup calls to avoid this resource leak. Fixes: 9202ba2397d1 ("gpio: mockup: implement event injecting over debugfs") Cc: Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 48548c786572f96cae5b7238da5338aa11cc9d34 Author: Wang Xiaojun Date: Thu Sep 17 14:41:51 2020 +0800 pinctrl: mediatek: use devm_platform_ioremap_resource_byname() Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Wang Xiaojun Acked-by: Sean Wang Link: https://lore.kernel.org/r/20200917064151.2184010-1-wangxiaojun11@huawei.com Signed-off-by: Linus Walleij commit 816c347f3a48fb15370b23664760ea61286fea05 Merge: a3bb9c3a00551 780c083a8f840 Author: Marc Zyngier Date: Wed Sep 30 09:48:30 2020 +0100 Merge remote-tracking branch 'arm64/for-next/ghostbusters' into kvm-arm64/hyp-pcpu Signed-off-by: Marc Zyngier commit 98a40a34e0b669d10a09fd90ec7dc425280e9e7f Author: Rikard Falkeborn Date: Sat Sep 26 22:23:42 2020 +0200 pinctrl: nuvoton: npcm7xx: Constify static ops structs The only usage of these structs is to assign their address to various ops fields in the pinctrl_desc struct, which are const pointers. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200926202342.31014-1-rikard.falkeborn@gmail.com Signed-off-by: Linus Walleij commit 9d5c8df1b93999191856533ead6c4ff21b13c44b Author: Oleksij Rempel Date: Wed Sep 23 14:53:01 2020 +0200 dt-binding: can: mcp25xxfd: documentation fixes Apply following fixes: - Use 'interrupts'. (interrupts-extended will automagically be supported by the tools) - *-supply is always a single item. So, drop maxItems=1 - add "additionalProperties: false" flag to detect unneeded properties. Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20200923125301.27200-1-o.rempel@pengutronix.de Reported-by: Rob Herring Reviewed-by: Rob Herring Fixes: 1b5a78e69c1f ("dt-binding: can: mcp25xxfd: document device tree bindings") Signed-off-by: Marc Kleine-Budde commit 727fba74b51175972b72dc26d225833b977a69f7 Author: Marc Kleine-Budde Date: Wed Sep 23 13:44:36 2020 +0200 can: mcp25xxfd: mcp25xxfd_irq(): add missing initialization of variable set_normal mode This patch fixes the following warning: drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:2155 mcp25xxfd_irq() error: uninitialized symbol 'set_normal_mode'. by adding the missing initialization. Reported-by: Dan Carpenter Reviewed-by: Manivannan Sadhasivam Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN") Link: https://lore.kernel.org/r/20200923114726.2704426-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 8cffc6fe65108e66c8cfe46307bf2325a4434056 Author: Dan Carpenter Date: Wed Sep 23 14:27:52 2020 +0300 can: mcp25xxfd: mcp25xxfd_ring_free(): fix memory leak during cleanup This loop doesn't free the first element of the array. The "i > 0" has to be changed to "i >= 0". Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200923112752.GA1473821@mwanda Signed-off-by: Marc Kleine-Budde commit f5b84dedf7ebf56f4af25b72aadd1a4122759b62 Author: Thomas Kopp Date: Fri Sep 25 08:56:06 2020 +0200 can: mcp25xxfd: mcp25xxfd_probe(): add SPI clk limit related errata information This patch adds a reference to the recent released MCP2517FD and MCP2518FD errata sheets and paste the explanation. The driver already implements the proposed fix. Signed-off-by: Thomas Kopp Link: https://lore.kernel.org/r/20200925065606.358-1-thomas.kopp@microchip.com [mkl: split into two patches, adjust subject and commit message] Signed-off-by: Marc Kleine-Budde commit 788b83ea2ccc6a7d8ab3177ad9448597e96cbb4b Author: Thomas Kopp Date: Fri Sep 25 08:56:06 2020 +0200 can: mcp25xxfd: mcp25xxfd_handle_eccif(): add ECC related errata and update log messages This patch adds a reference to the recent released MCP2517FD and MCP2518FD errata sheets and paste the explanation. The single error correction does not always work, so always indicate that a single error occurred. If the location of the ECC error is outside of the TX-RAM always use netdev_notice() to log the problem. For ECC errors in the TX-RAM, there is a recovery procedure. Signed-off-by: Thomas Kopp Link: https://lore.kernel.org/r/20200925065606.358-1-thomas.kopp@microchip.com [mkl: split into two patches, adjust subject and commit message] Signed-off-by: Marc Kleine-Budde commit 00c9cf49a6136e0839eaa2c74fbd58c607318b2c Author: Vignesh Raghavendra Date: Thu Sep 24 13:42:14 2020 +0530 mtd: hyperbus: hbmc-am654: Add DMA support for reads AM654 HyperBus controller provides MMIO interface to read data from flash. So add DMA memcpy support for reading data over MMIO interface. This provides 5x improvement in throughput and reduces CPU usage as well. Signed-off-by: Vignesh Raghavendra Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200924081214.16934-5-vigneshr@ti.com commit 992df3bb35a1004f86126d2f80c83450b383f7f4 Author: Vignesh Raghavendra Date: Thu Sep 24 13:42:13 2020 +0530 mtd: hyperbus: hbmc-am654: Drop pm_runtime* calls from probe Recent genpd changes for K3 platform ensure device is ON before driver probe is called. Therefore, drop redundant pm_runtime_* calls from driver to simplify the code. Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200924081214.16934-4-vigneshr@ti.com commit aca31ce96814c84d1a41aaa109c15abe61005af7 Author: Vignesh Raghavendra Date: Thu Sep 24 13:42:12 2020 +0530 mtd: hyperbus: hbmc-am654: Fix direct mapping setup flash access Setting up of direct mapping should be done with flash node's IO address space and not with controller's IO region. Fixes: b6fe8bc67d2d3 ("mtd: hyperbus: move direct mapping setup to AM654 HBMC driver") Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200924081214.16934-3-vigneshr@ti.com commit 714fb2fbe7379d0a413be217194f7af9814f2079 Author: Vignesh Raghavendra Date: Thu Sep 24 13:42:11 2020 +0530 mtd: hyperbus: Provide per device private pointer Provide per device private pointer that can be used by controller drivers to store device specific private data. Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200924081214.16934-2-vigneshr@ti.com commit 59ee364bafb2690ebdd1ea5793c2fdb2ea27433a Merge: bf1c674498333 810278da901c1 Author: Greg Kroah-Hartman Date: Wed Sep 30 09:42:36 2020 +0200 Merge tag 'thunderbolt-for-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Mika writes: thunderbolt: Changes for v5.10 merge window This includes following Thunderbolt/USB4 changes for v5.10 merge window: * A couple of optimizations around Tiger Lake force power logic and NHI (Native Host Interface) LC (Link Controller) mailbox command processing * Power management improvements for Software Connection Manager * Debugfs support * Allow KUnit tests to be enabled also when Thunderbolt driver is configured as module. * Few minor cleanups and fixes All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: (37 commits) thunderbolt: Capitalize comment on top of QUIRK_FORCE_POWER_LINK_CONTROLLER thunderbolt: Correct tb_check_quirks() kernel-doc thunderbolt: Log correct zeroX entries in decode_error() thunderbolt: Handle ERR_LOCK notification thunderbolt: Use "if USB4" instead of "depends on" in Kconfig thunderbolt: Allow KUnit tests to be built also when CONFIG_USB4=m thunderbolt: Only stop control channel when entering freeze thunderbolt: debugfs: Fix uninitialized return in counters_write() thunderbolt: Add debugfs interface thunderbolt: No need to warn in TB_CFG_ERROR_INVALID_CONFIG_SPACE thunderbolt: Introduce tb_switch_is_tiger_lake() thunderbolt: Introduce tb_switch_is_ice_lake() thunderbolt: Check for Intel vendor ID when identifying controller thunderbolt: Introduce tb_port_is_nhi() thunderbolt: Introduce tb_switch_next_cap() thunderbolt: Introduce tb_port_next_cap() thunderbolt: Move struct tb_cap_any to tb_regs.h thunderbolt: Add runtime PM for Software CM thunderbolt: Create device links from ACPI description ACPI: Export acpi_get_first_physical_node() to modules ... commit a3bb9c3a00551726590137e3974495ce6cf6b758 Author: David Brazdil Date: Tue Sep 22 21:49:10 2020 +0100 kvm: arm64: Remove unnecessary hyp mappings With all nVHE per-CPU variables being part of the hyp per-CPU region, mapping them individual is not necessary any longer. They are mapped to hyp as part of the overall per-CPU region. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Andrew Scull Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200922204910.7265-11-dbrazdil@google.com commit 30c953911c4370bfb622ee1c2fcc7e78c84df800 Author: David Brazdil Date: Tue Sep 22 21:49:09 2020 +0100 kvm: arm64: Set up hyp percpu data for nVHE Add hyp percpu section to linker script and rename the corresponding ELF sections of hyp/nvhe object files. This moves all nVHE-specific percpu variables to the new hyp percpu section. Allocate sufficient amount of memory for all percpu hyp regions at global KVM init time and create corresponding hyp mappings. The base addresses of hyp percpu regions are kept in a dynamically allocated array in the kernel. Add NULL checks in PMU event-reset code as it may run before KVM memory is initialized. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200922204910.7265-10-dbrazdil@google.com commit 2a1198c9b436402582f7beed57028044b819329c Author: David Brazdil Date: Tue Sep 22 21:49:08 2020 +0100 kvm: arm64: Create separate instances of kvm_host_data for VHE/nVHE Host CPU context is stored in a global per-cpu variable `kvm_host_data`. In preparation for introducing independent per-CPU region for nVHE hyp, create two separate instances of `kvm_host_data`, one for VHE and one for nVHE. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200922204910.7265-9-dbrazdil@google.com commit df4c8214a18d202fa0ec221a001f640e020f7e44 Author: David Brazdil Date: Tue Sep 22 21:49:07 2020 +0100 kvm: arm64: Duplicate arm64_ssbd_callback_required for nVHE hyp Hyp keeps track of which cores require SSBD callback by accessing a kernel-proper global variable. Create an nVHE symbol of the same name and copy the value from kernel proper to nVHE as KVM is being enabled on a core. Done in preparation for separating percpu memory owned by kernel proper and nVHE. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200922204910.7265-8-dbrazdil@google.com commit 572494995bc3d282336bfd8162741929402910b9 Author: David Brazdil Date: Tue Sep 22 21:49:06 2020 +0100 kvm: arm64: Add helpers for accessing nVHE hyp per-cpu vars Defining a per-CPU variable in hyp/nvhe will result in its name being prefixed with __kvm_nvhe_. Add helpers for declaring these variables in kernel proper and accessing them with this_cpu_ptr and per_cpu_ptr. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200922204910.7265-7-dbrazdil@google.com commit ea391027d35546d9155f1350123b5af8bddec706 Author: David Brazdil Date: Tue Sep 22 21:49:05 2020 +0100 kvm: arm64: Remove hyp_adr/ldr_this_cpu The hyp_adr/ldr_this_cpu helpers were introduced for use in hyp code because they always needed to use TPIDR_EL2 for base, while adr/ldr_this_cpu from kernel proper would select between TPIDR_EL2 and _EL1 based on VHE/nVHE. Simplify this now that the hyp mode case can be handled using the __KVM_VHE/NVHE_HYPERVISOR__ macros. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Andrew Scull Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200922204910.7265-6-dbrazdil@google.com commit 717cf94adb54095d14a6674baea73123188f2901 Author: David Brazdil Date: Tue Sep 22 21:49:04 2020 +0100 kvm: arm64: Remove __hyp_this_cpu_read this_cpu_ptr is meant for use in kernel proper because it selects between TPIDR_EL1/2 based on nVHE/VHE. __hyp_this_cpu_ptr was used in hyp to always select TPIDR_EL2. Unify all users behind this_cpu_ptr and friends by selecting _EL2 register under __KVM_NVHE_HYPERVISOR__. VHE continues selecting the register using alternatives. Under CONFIG_DEBUG_PREEMPT, the kernel helpers perform a preemption check which is omitted by the hyp helpers. Preserve the behavior for nVHE by overriding the corresponding macros under __KVM_NVHE_HYPERVISOR__. Extend the checks into VHE hyp code. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Andrew Scull Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200922204910.7265-5-dbrazdil@google.com commit 3471ee06e33e413d7fa73c1aa3092e6e794b9e05 Author: David Brazdil Date: Tue Sep 22 21:49:03 2020 +0100 kvm: arm64: Only define __kvm_ex_table for CONFIG_KVM Minor cleanup that only creates __kvm_ex_table ELF section and related symbols if CONFIG_KVM is enabled. Also useful as more hyp-specific sections will be added. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200922204910.7265-4-dbrazdil@google.com commit ce492a16ffb8814d9651c3fdafc363bfa1b01189 Author: David Brazdil Date: Tue Sep 22 21:49:02 2020 +0100 kvm: arm64: Move nVHE hyp namespace macros to hyp_image.h Minor cleanup to move all macros related to prefixing nVHE hyp section and symbol names into one place: hyp_image.h. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200922204910.7265-3-dbrazdil@google.com commit ab25464bdabd45f283cc1194e332040f89071106 Author: David Brazdil Date: Tue Sep 22 21:49:01 2020 +0100 kvm: arm64: Partially link nVHE hyp code, simplify HYPCOPY Relying on objcopy to prefix the ELF section names of the nVHE hyp code is brittle and prevents us from using wildcards to match specific section names. Improve the build rules by partially linking all '.nvhe.o' files and prefixing their ELF section names using a linker script. Continue using objcopy for prefixing ELF symbol names. One immediate advantage of this approach is that all subsections matching a pattern can be merged into a single prefixed section, eg. .text and .text.* can be linked into a single '.hyp.text'. This removes the need for -fno-reorder-functions on GCC and will be useful in the future too: LTO builds use .text subsections, compilers routinely generate .rodata subsections, etc. Partially linking all hyp code into a single object file also makes it easier to analyze. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200922204910.7265-2-dbrazdil@google.com commit c9ca43d42ed8d5fd635d327a664ed1d8579eb2af Author: Paras Sharma Date: Wed Sep 30 11:35:26 2020 +0530 serial: qcom_geni_serial: To correct QUP Version detection logic For QUP IP versions 2.5 and above the oversampling rate is halved from 32 to 16. Commit ce734600545f ("tty: serial: qcom_geni_serial: Update the oversampling rate") is pushed to handle this scenario. But the existing logic is failing to classify QUP Version 3.0 into the correct group ( 2.5 and above). As result Serial Engine clocks are not configured properly for baud rate and garbage data is sampled to FIFOs from the line. So, fix the logic to detect QUP with versions 2.5 and above. Fixes: ce734600545f ("tty: serial: qcom_geni_serial: Update the oversampling rate") Cc: stable Signed-off-by: Paras Sharma Reviewed-by: Akash Asthana Link: https://lore.kernel.org/r/1601445926-23673-1-git-send-email-parashar@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 5b94d6e476a1f2d845aeb2c197e8741984ee0967 Author: Oded Gabbay Date: Fri Sep 25 20:14:15 2020 +0300 habanalabs/gaudi: use correct define for qman init There was a copy-paste error, and the wrong define was used for initializing the QMAN. Signed-off-by: Oded Gabbay Link: https://lore.kernel.org/r/20200925171415.25663-1-oded.gabbay@gmail.com Signed-off-by: Greg Kroah-Hartman commit a332f5f96b2724a436d3a75b0bbf053d0a002c02 Author: Kefeng Wang Date: Tue Sep 29 22:14:45 2020 +0800 ARM: dts: hisilicon: add SD5203 dts Add sd5203.dts for Hisilicon SD5203 SoC platform. Signed-off-by: Kefeng Wang Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 227afa0488c4cb8adb474e30eb3f4527fe85eb13 Author: Zhen Lei Date: Tue Sep 29 22:14:46 2020 +0800 ARM: dts: hisilicon: fix the system controller compatible nodes The DT binding for Hisilicon system controllers require to have a "syscon" compatible string. Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 1c16b009018debb34d2abc4525fd5ad434831343 Author: Mauro Carvalho Chehab Date: Fri Sep 25 08:48:32 2020 +0200 media: glossary.rst: use the right case for glossary entries Sphinx 3.x is pedantic with glossary entries: Documentation/userspace-api/media/glossary.rst:17: WARNING: term device driver not found in case sensitive match.made a reference to Device Driver instead. Documentation/userspace-api/media/glossary.rst:59: WARNING: term media hardware not found in case sensitive match.made a reference to Media Hardware instead. Documentation/userspace-api/media/glossary.rst:59: WARNING: term IP block not found in case sensitive match.made a reference to IP Block instead. Documentation/userspace-api/media/glossary.rst:64: WARNING: term hardware component not found in case sensitive match.made a reference to Hardware Component instead. Documentation/userspace-api/media/glossary.rst:64: WARNING: term ip block not found in case sensitive match.made a reference to IP Block instead. Documentation/userspace-api/media/glossary.rst:70: WARNING: term peripheral not found in case sensitive match.made a reference to Peripheral instead. Documentation/userspace-api/media/glossary.rst:130: WARNING: term V4L2 hardware not found in case sensitive match.made a reference to V4L2 Hardware instead. Documentation/userspace-api/media/glossary.rst:151: WARNING: term hardware peripheral not found in case sensitive match.made a reference to Hardware Peripheral instead. Documentation/userspace-api/media/glossary.rst:183: WARNING: term device node not found in case sensitive match.made a reference to Device Node instead. Documentation/userspace-api/media/glossary.rst:191: WARNING: term bridge driver not found in case sensitive match.made a reference to Bridge Driver instead. While it works with case-insensitive entires, it complains. Let's fix it, in order to cleanup the warnings. Also, I won't doubt that a later change on Sphinx will end breaking support for it. Signed-off-by: Mauro Carvalho Chehab commit ed9705e4ad1c19ae51ed0cb4c112f9eb6dfc69fc Author: Tony Luck Date: Tue Sep 29 19:13:13 2020 -0700 x86/mce: Drop AMD-specific "DEFERRED" case from Intel severity rule list Way back in v3.19 Intel and AMD shared the same machine check severity grading code. So it made sense to add a case for AMD DEFERRED errors in commit e3480271f592 ("x86, mce, severity: Extend the the mce_severity mechanism to handle UCNA/DEFERRED error") But later in v4.2 AMD switched to a separate grading function in commit bf80bbd7dcf5 ("x86/mce: Add an AMD severities-grading function") Belatedly drop the DEFERRED case from the Intel rule list. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200930021313.31810-3-tony.luck@intel.com commit 6fcadfc727239a6c870a851bf6b54fcfb4805cb9 Author: Mauro Carvalho Chehab Date: Wed Sep 9 15:05:31 2020 +0200 media: camera-sensor.rst: fix a doc build warning Documentation/driver-api/media/camera-sensor.rst:123: WARNING: Inline literal start-string without end-string. There's a missing blank space over there. Signed-off-by: Mauro Carvalho Chehab commit fd258dc4442c5c1c069c6b5b42bfe7d10cddda95 Author: Borislav Petkov Date: Tue Sep 29 19:13:12 2020 -0700 x86/mce: Add Skylake quirk for patrol scrub reported errors The patrol scrubber in Skylake and Cascade Lake systems can be configured to report uncorrected errors using a special signature in the machine check bank and to signal using CMCI instead of machine check. Update the severity calculation mechanism to allow specifying the model, minimum stepping and range of machine check bank numbers. Add a new rule to detect the special signature (on model 0x55, stepping >=4 in any of the memory controller banks). [ bp: Rewrite it. aegl: Productize it. ] Suggested-by: Youquan Song Signed-off-by: Borislav Petkov Co-developed-by: Tony Luck Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200930021313.31810-2-tony.luck@intel.com commit 514db2b445df79e0a2f040842969cf58088a3886 Author: Naveen Krishna Chatradhi Date: Tue Sep 29 16:23:20 2020 +0530 hwmon: (amd_energy) optimize accumulation interval On a system with course grain resolution of energy unit (milli J) the accumulation thread can be executed less frequently than on the system with fine grain resolution(micro J). This patch sets the accumulation thread interval to an optimum value calculated based on the (energy unit) resolution supported by the hardware (assuming a peak wattage of 240W). Signed-off-by: Naveen Krishna Chatradhi Link: https://lore.kernel.org/r/20200929105322.8919-3-nchatrad@amd.com Signed-off-by: Guenter Roeck commit 6b0c0c83dc55dc2484b1d5cbf32631262ae86284 Author: Akshay Gupta Date: Tue Sep 29 16:23:19 2020 +0530 hwmon: (amd_energy) Move label out of accumulation structure At present, core & socket labels are defined in struct sensor_accumulator This patch moves it to the amd_energy_data structure, which will help in calling memset on struct sensor_accumulator to optimize the code. Signed-off-by: Akshay Gupta Link: https://lore.kernel.org/r/20200929105322.8919-2-nchatrad@amd.com Signed-off-by: Guenter Roeck commit 718c2fe92b208415fa76550975dc5d7708448f7c Author: Nilesh Javali Date: Tue Sep 29 03:21:52 2020 -0700 scsi: qla2xxx: Update version to 10.02.00.103-k Link: https://lore.kernel.org/r/20200929102152.32278-8-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 94eda2717826015a80ca271394c4378747de8936 Author: Arun Easi Date: Tue Sep 29 03:21:51 2020 -0700 scsi: qla2xxx: Fix point-to-point (N2N) device discovery issue Driver was using a shorter timeout waiting for PLOGI from the peer in point-to-point configurations. Some devices takes some time (~4 seconds) to initiate the PLOGI. This peer initiating PLOGI is when the peer has a higher P-WWN. Increase the wait time based on N2N R_A_TOV. Link: https://lore.kernel.org/r/20200929102152.32278-7-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 50457dab670f396557e60c07f086358460876353 Author: Quinn Tran Date: Tue Sep 29 03:21:50 2020 -0700 scsi: qla2xxx: Fix crash on session cleanup with unload On unload, session cleanup prematurely gave the signal for driver unload path to advance. Link: https://lore.kernel.org/r/20200929102152.32278-6-njavali@marvell.com Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery") Cc: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 3e6efab865ac943f4ec43913eb665695737112b0 Author: Arun Easi Date: Tue Sep 29 03:21:49 2020 -0700 scsi: qla2xxx: Fix reset of MPI firmware Normally, the MPI firmware is reset when an MPI dump is collected. If an unsaved MPI dump exists in the driver, though, an alternate mechanism is used. This mechanism, which was not fully correct, is not recommended and instead an MPI dump template walk is suggested to perform the MPI reset. To allow for the MPI dump template walk, extra space is reserved in the MPI dump buffer which gets used only when there is already an MPI dump in place. Link: https://lore.kernel.org/r/20200929102152.32278-5-njavali@marvell.com Fixes: cbb01c2f2f63 ("scsi: qla2xxx: Fix MPI failure AEN (8200) handling") Cc: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 7a6cdbd5e87515ebf6231b762ad903c7cff87b9c Author: Arun Easi Date: Tue Sep 29 03:21:48 2020 -0700 scsi: qla2xxx: Fix MPI reset needed message When printing the message: "MPI Heartbeat stop. MPI reset is not needed.." ..the wrong register was checked leading to always printing that MPI reset is not needed, even when it is needed. Fix the MPI reset message. Link: https://lore.kernel.org/r/20200929102152.32278-4-njavali@marvell.com Fixes: cbb01c2f2f63 ("scsi: qla2xxx: Fix MPI failure AEN (8200) handling") Cc: stable@vger.kernel.org Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 44f5a37d1e3e4e392412318666f8477601ae3024 Author: Quinn Tran Date: Tue Sep 29 03:21:47 2020 -0700 scsi: qla2xxx: Fix buffer-buffer credit extraction error Current code uses wrong mailbox option to extract bbc from firmware. This field is nested inside of PLOGI payload. Extract bbc from PLOGI template payload. Link: https://lore.kernel.org/r/20200929102152.32278-3-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 7dc0f671d89c03db95db3d4cd57257790d7a4b80 Author: Saurav Kashyap Date: Tue Sep 29 03:21:46 2020 -0700 scsi: qla2xxx: Correct the check for sscanf() return value Since the version string has been modified, sscanf() returns 4 instead of 6. Link: https://lore.kernel.org/r/20200929102152.32278-2-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 2dd39fad92a1f25f6083b172160ec2e7efbf82c9 Author: Bean Huo Date: Wed Sep 16 10:40:17 2020 +0200 scsi: ufs: ufs-exynos: Use devm_platform_ioremap_resource_byname() Use devm_platform_ioremap_resource_byname() to simplify the code. Link: https://lore.kernel.org/r/20200916084017.14086-1-huobean@gmail.com Acked-by: Alim Akhtar Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit c5fdb66829d16d4eb6d452034de4f1017ca2410e Author: Kefeng Wang Date: Tue Sep 29 22:14:44 2020 +0800 ARM: debug: add UART early console support for SD5203 Add support of early console for SD5203. Signed-off-by: Kefeng Wang Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit c0831445ad534ea0e82cecf614a6754b7cc85310 Author: Kefeng Wang Date: Tue Sep 29 22:14:43 2020 +0800 ARM: hisi: add support for SD5203 SoC Enable support for the Hisilicon SD5203 SoC. The core is ARM926EJ-S. Signed-off-by: Kefeng Wang Signed-off-by: Zhen Lei Signed-off-by: Wei Xu commit 611ba7536e7ecb58f766b1315a2f9ef4b10b3572 Merge: 879456bedbe54 98642d1aa2c68 Author: David S. Miller Date: Tue Sep 29 18:26:42 2020 -0700 Merge branch 'HW-support-for-VCAP-IS1-and-ES0-in-mscc_ocelot' Vladimir Oltean says: ==================== HW support for VCAP IS1 and ES0 in mscc_ocelot The patches from RFC series "Offload tc-flower to mscc_ocelot switch using VCAP chains" have been split into 2: https://patchwork.ozlabs.org/project/netdev/list/?series=204810&state=* This is the boring part, that deals with the prerequisites, and not with tc-flower integration. Apart from the initialization of some hardware blocks, which at this point still don't do anything, no new functionality is introduced. - Key and action field offsets are defined for the supported switches. - VCAP properties are added to the driver for the new TCAM blocks. But instead of adding them manually as was done for IS2, which is error prone, the driver is refactored to read these parameters from hardware, which is possible. - Some improvements regarding the processing of struct ocelot_vcap_filter. - Extending the code to be compatible with full and quarter keys. This series was tested, along with other patches not yet submitted, on the Felix and Seville switches. ==================== Signed-off-by: David S. Miller commit 98642d1aa2c68840c9d0d8386986bcf662f3cd30 Author: Vladimir Oltean Date: Wed Sep 30 01:27:33 2020 +0300 net: mscc: ocelot: look up the filters in flower_stats() and flower_destroy() Currently a new filter is created, containing just enough correct information to be able to call ocelot_vcap_block_find_filter_by_index() on it. This will be limiting us in the future, when we'll have more metadata associated with a filter, which will matter in the stats() and destroy() callbacks, and which we can't make up on the spot. For example, we'll start "offloading" some dummy tc filter entries for the TCAM skeleton, but we won't actually be adding them to the hardware, or to block->rules. So, it makes sense to avoid deleting those rules too. That's the kind of thing which is difficult to determine unless we look up the real filter. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 085f5b91629f65fa1bce19e9dd65a2e46457fe27 Author: Vladimir Oltean Date: Wed Sep 30 01:27:32 2020 +0300 net: mscc: ocelot: add a new ocelot_vcap_block_find_filter_by_id function And rename the existing find to ocelot_vcap_block_find_filter_by_index. The index is the position in the TCAM, and the id is the flow cookie given by tc. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 642942637c29b641975cd40b723c2986db3bd91b Author: Vladimir Oltean Date: Wed Sep 30 01:27:31 2020 +0300 net: mscc: ocelot: rename variable 'cnt' in vcap_data_offset_get() The 'cnt' variable is actually used for 2 purposes, to hold the number of sub-words per VCAP entry, and the number of sub-words per VCAP action. In fact, I'm pretty sure these 2 numbers can never be different from one another. By hardware definition, the entry (key) TCAM rows are divided into the same number of sub-words as its associated action RAM rows. But nonetheless, let's at least rename the variables such that observations like this one are easier to make in the future. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5963083a3105229286fb1ca508c452930611947b Author: Vladimir Oltean Date: Wed Sep 30 01:27:30 2020 +0300 net: mscc: ocelot: rename variable 'count' in vcap_data_offset_get() This gets rid of one of the 2 variables named, very generically, "count". Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e6ae7c506f801100ba7a1f9f6f0cfc2197bf1989 Author: Xiaoliang Yang Date: Wed Sep 30 01:27:29 2020 +0300 net: mscc: ocelot: calculate vcap offsets correctly for full and quarter entries When calculating the offsets for the current entry within the row and placing them inside struct vcap_data, the function assumes half key entry (2 keys per row). This patch modifies the vcap_data_offset_get() function to calculate a correct data offset when the setting VCAP Type-Group of a key to VCAP_TG_FULL or VCAP_TG_QUARTER. This is needed because, for example, VCAP ES0 only supports full keys. Also rename the 'count' variable to 'num_entries_per_row' to make the function just one tiny bit easier to follow. Signed-off-by: Xiaoliang Yang Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7a155fa3d84ef1418ded16ba477b20b2a4c0f528 Author: Vladimir Oltean Date: Wed Sep 30 01:27:28 2020 +0300 net: mscc: ocelot: parse flower action before key When we'll make the switch to multiple chain offloading, we'll want to know first what VCAP block the rule is offloaded to. This impacts what keys are available. Since the VCAP block is determined by what actions are used, parse the action first. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d732e9cef0e1010a15153994ac2bc3102eba1ce6 Author: Vladimir Oltean Date: Wed Sep 30 01:27:27 2020 +0300 net: mscc: ocelot: remove unneeded VCAP parameters for IS2 Now that we are deriving these from the constants exposed by the hardware, we can delete the static info we're keeping in the driver. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2096805497e2bd21df3c26bd48c43ff0ce954316 Author: Vladimir Oltean Date: Wed Sep 30 01:27:26 2020 +0300 net: mscc: ocelot: automatically detect VCAP constants The numbers in struct vcap_props are not intuitive to derive, because they are not a straightforward copy-and-paste from the reference manual but instead rely on a fairly detailed level of understanding of the layout of an entry in the TCAM and in the action RAM. For this reason, bugs are very easy to introduce here. Ease the work of hardware porters and read from hardware the constants that were exported for this particular purpose. Note that this implies that struct vcap_props can no longer be const. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e3aea296d86f0f2166f4ddc5e1325217f847e722 Author: Vladimir Oltean Date: Wed Sep 30 01:27:25 2020 +0300 net: mscc: ocelot: add definitions for VCAP ES0 keys, actions and target As a preparation step for the offloading to ES0, let's create the infrastructure for talking with this hardware block. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit a61e365d7c183c556717bbf36dcf00c941ec044e Author: Vladimir Oltean Date: Wed Sep 30 01:27:24 2020 +0300 net: mscc: ocelot: add definitions for VCAP IS1 keys, actions and target As a preparation step for the offloading to IS1, let's create the infrastructure for talking with this hardware block. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit c1c3993edb7c8cfbe6b3991b4b4c9f673268770e Author: Vladimir Oltean Date: Wed Sep 30 01:27:23 2020 +0300 net: mscc: ocelot: generalize existing code for VCAP In the Ocelot switches there are 3 TCAMs: VCAP ES0, IS1 and IS2, which have the same configuration interface, but different sets of keys and actions. The driver currently only supports VCAP IS2. In preparation of VCAP IS1 and ES0 support, the existing code must be generalized to work with any VCAP. In that direction, we should move the structures that depend upon VCAP instantiation, like vcap_is2_keys and vcap_is2_actions, out of struct ocelot and into struct vcap_props .keys and .actions, a structure that is replicated 3 times, once per VCAP. We'll pass that structure as an argument to each function that does the key and action packing - only the control logic needs to distinguish between ocelot->vcap[VCAP_IS2] or IS1 or ES0. Another change is to make use of the newly introduced ocelot_target_read and ocelot_target_write API, since the 3 VCAPs have the same registers but put at different addresses. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ed5672d82c5f0a0d3438cc6752e971dc2775cd4e Author: Xiaoliang Yang Date: Wed Sep 30 01:27:22 2020 +0300 net: mscc: ocelot: return error if VCAP filter is not found Although it doesn't look like it is possible to hit these conditions from user space, there are 2 separate, but related, issues. First, the ocelot_vcap_block_get_filter_index function, née ocelot_ace_rule_get_index_id prior to the aae4e500e106 ("net: mscc: ocelot: generalize the "ACE/ACL" names") rename, does not do what the author probably intended. If the desired filter entry is not present in the ACL block, this function returns an index equal to the total number of filters, instead of -1, which is maybe what was intended, judging from the curious initialization with -1, and the "++index" idioms. Either way, none of the callers seems to expect this behavior. Second issue, the callers don't actually check the return value at all. So in case the filter is not found in the rule list, propagate the return code. So update the callers and also take the opportunity to get rid of the odd coding idioms that appear to work but don't. Signed-off-by: Xiaoliang Yang Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3c0e37a9e4021ccbf855dfcbc5aff1ca10487cd4 Author: Vladimir Oltean Date: Wed Sep 30 01:27:21 2020 +0300 net: mscc: ocelot: introduce a new ocelot_target_{read,write} API There are some targets (register blocks) in the Ocelot switch that are instantiated more than once. For example, the VCAP IS1, IS2 and ES0 blocks all share the same register layout for interacting with the cache for the TCAM and the action RAM. For the VCAPs, the procedure for servicing them is actually common. We just need an API specifying which VCAP we are talking to, and we do that via these raw ocelot_target_read and ocelot_target_write accessors. In plain ocelot_read, the target is encoded into the register enum itself: u16 target = reg >> TARGET_OFFSET; For the VCAPs, the registers are currently defined like this: enum ocelot_reg { [...] S2_CORE_UPDATE_CTRL = S2 << TARGET_OFFSET, S2_CORE_MV_CFG, S2_CACHE_ENTRY_DAT, S2_CACHE_MASK_DAT, S2_CACHE_ACTION_DAT, S2_CACHE_CNT_DAT, S2_CACHE_TG_DAT, [...] }; which is precisely what we want to avoid, because we'd have to duplicate the same register map for S1 and for S0, and then figure out how to pass VCAP instance-specific registers to the ocelot_read calls (basically another lookup table that undoes the effect of shifting with TARGET_OFFSET). So for some targets, propose a more raw API, similar to what is currently done with ocelot_port_readl and ocelot_port_writel. Those targets can only be accessed with ocelot_target_{read,write} and not with ocelot_{read,write} after the conversion, which is fine. The VCAP registers are not actually modified to use this new API as of this patch. They will be modified in the next one. Signed-off-by: Vladimir Oltean Acked-by: Alexandre Belloni Signed-off-by: David S. Miller commit 879456bedbe54f2d38b15c21dc5e3c30232b53e1 Author: Lorenzo Bianconi Date: Tue Sep 29 23:58:57 2020 +0200 net: mvneta: avoid possible cache misses in mvneta_rx_swbm Do not use rx_desc pointers if possible since rx descriptors are stored in uncached memory and dereferencing rx_desc pointers generate extra loads. This patch improves XDP_DROP performance of ~ 110Kpps (700Kpps vs 590Kpps) on Marvell Espressobin Analyzed-by: Ilias Apalodimas Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit b0efc216f577997bf563d76d51673ed79c3d5f71 Author: Andrii Nakryiko Date: Tue Sep 29 15:06:04 2020 -0700 libbpf: Compile in PIC mode only for shared library case Libbpf compiles .o's for static and shared library modes separately, so no need to specify -fPIC for both. Keep it only for shared library mode. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200929220604.833631-3-andriin@fb.com commit 0a62291d697f1d2882650f5b9f97d331ad9a505b Author: Andrii Nakryiko Date: Tue Sep 29 15:06:03 2020 -0700 libbpf: Compile libbpf under -O2 level by default and catch extra warnings For some reason compiler doesn't complain about uninitialized variable, fixed in previous patch, if libbpf is compiled without -O2 optimization level. So do compile it with -O2 and never let similar issue slip by again. -Wall is added unconditionally, so no need to specify it again. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200929220604.833631-2-andriin@fb.com commit 33433913459a6bfbfa808c202d6f5490aa43d7a7 Author: Andrii Nakryiko Date: Tue Sep 29 15:06:02 2020 -0700 libbpf: Fix uninitialized variable in btf_parse_type_sec Fix obvious unitialized variable use that wasn't reported by compiler. libbpf Makefile changes to catch such errors are added separately. Fixes: 3289959b97ca ("libbpf: Support BTF loading and raw data output in both endianness") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200929220604.833631-1-andriin@fb.com commit 67e4ca74953ea27e2c0dac6907fb4271bd6d5d87 Merge: 6458bde368cee 4d0b8c0b46a5e Author: Alexei Starovoitov Date: Tue Sep 29 16:47:39 2020 -0700 Merge branch 'bpf, x64: optimize JIT's pro/epilogue' Maciej Fijalkowski says: ==================== Hi! This small set can be considered as a followup after recent addition of support for tailcalls in bpf subprograms and is focused on optimizing x64 JIT prologue and epilogue sections. Turns out the popping tail call counter is not needed anymore and %rsp handling when stack depth is 0 can be skipped. For longer explanations, please see commit messages. Thank you, Maciej ==================== Signed-off-by: Alexei Starovoitov commit 4d0b8c0b46a5e6f23ab8301780d689072c6c91fc Author: Maciej Fijalkowski Date: Tue Sep 29 22:46:53 2020 +0200 bpf: x64: Do not emit sub/add 0, %rsp when !stack_depth There is no particular reason for keeping the "sub 0, %rsp" insn within the BPF's x64 JIT prologue. When tail call code was skipping the whole prologue section these 7 bytes that represent the rsp subtraction could not be simply discarded as the jump target address would be broken. An option to address that would be to substitute it with nop7. Right now tail call is skipping only first 11 bytes of target program's prologue and "sub X, %rsp" is the first insn that is processed, so if stack depth is zero then this insn could be omitted without the need for nop7 swap. Therefore, do not emit the "sub 0, %rsp" in prologue when program is not making use of R10 register. Also, make the emission of "add X, %rsp" conditional in tail call code logic and take into account the presence of mentioned insn when calculating the jump offsets. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200929204653.4325-3-maciej.fijalkowski@intel.com commit d207929d97ea028fd5f432c69d69df2f51c6b6c9 Author: Maciej Fijalkowski Date: Tue Sep 29 22:46:52 2020 +0200 bpf, x64: Drop "pop %rcx" instruction on BPF JIT epilogue Back when all of the callee-saved registers where always pushed to stack in x64 JIT prologue, tail call counter was placed at the bottom of the BPF program's stack frame that had a following layout: +-------------+ | ret addr | +-------------+ | rbp | <- rbp +-------------+ | | | free space | | from: | | sub $x,%rsp | | | +-------------+ | rbx | +-------------+ | r13 | +-------------+ | r14 | +-------------+ | r15 | +-------------+ | tail call | <- rsp | counter | +-------------+ In order to restore the callee saved registers, epilogue needed to explicitly toss away the tail call counter via "pop %rbx" insn, so that %rsp would be back at the place where %r15 was stored. Currently, the tail call counter is placed on stack *before* the callee saved registers (brackets on rbx through r15 mean that they are now pushed to stack only if they are used): +-------------+ | ret addr | +-------------+ | rbp | <- rbp +-------------+ | | | free space | | from: | | sub $x,%rsp | | | +-------------+ | tail call | | counter | +-------------+ ( rbx ) +-------------+ ( r13 ) +-------------+ ( r14 ) +-------------+ ( r15 ) <- rsp +-------------+ For the record, the epilogue insns consist of (assuming all of the callee saved registers are used by program): pop %r15 pop %r14 pop %r13 pop %rbx pop %rcx leaveq retq "pop %rbx" for getting rid of tail call counter was not an option anymore as it would overwrite the restored value of %rbx register, so it was changed to use the %rcx register. Since epilogue can start popping the callee saved registers right away without any additional work, the "pop %rcx" could be dropped altogether as "leave" insn will simply move the %rbp to %rsp. IOW, tail call counter does not need the explicit handling. Having in mind the explanation above and the actual reason for that, let's piggy back on "leave" insn for discarding the tail call counter from stack and remove the "pop %rcx" from epilogue. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200929204653.4325-2-maciej.fijalkowski@intel.com commit 6458bde368cee77e798d05cccd2316db4d748c41 Author: Ilya Leoshkevich Date: Tue Sep 29 22:18:14 2020 +0200 selftests/bpf: Fix endianness issues in sk_lookup/ctx_narrow_access This test makes a lot of narrow load checks while assuming little endian architecture, and therefore fails on s390. Fix by introducing LSB and LSW macros and using them to perform narrow loads. Fixes: 0ab5539f8584 ("selftests/bpf: Tests for BPF_SK_LOOKUP attach point") Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200929201814.44360-1-iii@linux.ibm.com commit 3c8b5fb9983b7c7eb2e3557d687a3613288e0780 Author: Dan Murphy Date: Thu Sep 17 14:37:02 2020 -0500 MAINTAINERS: Remove Andrew F. Davis Andrews TI email is no longer valid and he indicated that it is OK to remove him from the MAINTAINERS file for the DMA HEAPS FRAMEWORK. For the BQ27xxx list I replaced Andrews email with mine. Signed-off-by: Dan Murphy Acked-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit ec3af53aa4edf9c770a1b31e3ee6fa6602e98ee2 Author: Wang Qing Date: Thu Sep 24 14:37:56 2020 +0800 power: supply: ab8500-fg: fix spelling typo Modify the comment typo: "compliment" -> "complement". Signed-off-by: Wang Qing Signed-off-by: Sebastian Reichel commit c8db568375fae4dc4297e8997b4ab0a541c37e5a Author: Michał Mirosław Date: Sat Sep 26 21:05:34 2020 +0200 power: supply: bq25890: document IBAT compensation DT properties Document new properties for IBAT compensation feature. Signed-off-by: Michał Mirosław Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 724083293e18adf805ce5aa6dda2fe6c12071537 Author: Michał Mirosław Date: Sat Sep 26 21:05:34 2020 +0200 power: supply: bq25890: support IBAT compensation Add configuration for compensation of IBAT measuring resistor in series with the battery. Signed-off-by: Michał Mirosław Signed-off-by: Sebastian Reichel commit 3f41e742ee9413b4d1f5d2edf3c71a5db0c87b81 Author: Wang Qing Date: Sat Sep 26 10:41:07 2020 +0800 power: supply: ds278x: fix spelling typo Modify the comment typo: "compliment" -> "complement". Signed-off-by: Wang Qing Signed-off-by: Sebastian Reichel commit 5fb768a5a47ac7d3a4d0e6747a0751de58c742ea Author: Artur Rojek Date: Sat Sep 26 19:35:29 2020 +0200 dt-bindings: power: ingenic,battery: add new compatibles This binding can support Ingenic JZ4725B and JZ4770 SoCs, as they are compatible with Ingenic JZ4740 battery. Introduce the following compatible property combinations: compatible = "ingenic,jz4725b-battery", "ingenic,jz4740-battery", compatible = "ingenic,jz4770-battery", "ingenic,jz4740-battery" Signed-off-by: Artur Rojek Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 8d58ca2754f18eed4d0461c99755e844bb5ef4cc Author: Artur Rojek Date: Sat Sep 26 19:35:28 2020 +0200 dt-bindings: power: Convert ingenic,battery.txt to YAML Convert the textual documentation of Device Tree bindings for the Ingenic JZ47xx SoCs battery to YAML. Signed-off-by: Artur Rojek Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 9012e3dda2a70cff7986e08d0a9cf3a8e04691e6 Author: Arnaldo Carvalho de Melo Date: Tue Sep 29 18:07:27 2020 -0300 perf trace beauty: Add script to autogenerate mremap's flags args string/id table It'll also conditionally generate the defines, so that if we don't have those when building a new tool tarball in an older systems, we get those, and we need them sometimes in the actual scnprintf routine, such as when checking if a flags means we have an extra arg, like with MREMAP_FIXED. $ tools/perf/trace/beauty/mremap_flags.sh static const char *mremap_flags[] = { [ilog2(1) + 1] = "MAYMOVE", #ifndef MREMAP_MAYMOVE #define MREMAP_MAYMOVE 1 #endif [ilog2(2) + 1] = "FIXED", #ifndef MREMAP_FIXED #define MREMAP_FIXED 2 #endif [ilog2(4) + 1] = "DONTUNMAP", #ifndef MREMAP_DONTUNMAP #define MREMAP_DONTUNMAP 4 #endif }; $ Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 2b2706aaaefee49ba0030bc679865db178e89e11 Author: Armin Wolf Date: Tue Sep 29 19:13:26 2020 +0200 lib8390: Replace panic() call with BUILD_BUG_ON Replace panic() call in lib8390.c with BUILD_BUG_ON() since checking the size of struct e8390_pkt_hdr should happen at compile-time. Signed-off-by: Armin Wolf Signed-off-by: David S. Miller commit e6b6be53ec91461c5ecf41a66f54f5869fd989b9 Merge: 2ec13cbcfadbb 920872e08391a Author: David S. Miller Date: Tue Sep 29 14:02:55 2020 -0700 Merge branch 'net-in_interrupt-cleanup-and-fixes' Thomas Gleixner says: ==================== net: in_interrupt() cleanup and fixes in the discussion about preempt count consistency accross kernel configurations: https://lore.kernel.org/r/20200914204209.256266093@linutronix.de/ Linus clearly requested that code in drivers and libraries which changes behaviour based on execution context should either be split up so that e.g. task context invocations and BH invocations have different interfaces or if that's not possible the context information has to be provided by the caller which knows in which context it is executing. This includes conditional locking, allocation mode (GFP_*) decisions and avoidance of code paths which might sleep. In the long run, usage of 'preemptible, in_*irq etc.' should be banned from driver code completely. This is the second version of the first batch of related changes. V1 can be found here: https://lore.kernel.org/r/20200927194846.045411263@linutronix.de Changes vs. V1: - Rebased to net-next - Fixed the half done rename sillyness in the ENIC patch. - Fixed the IONIC driver fallout. - Picked up the SFC fix from Edward and adjusted the GFP_KERNEL change accordingly. - Addressed the review comments vs. BCRFMAC. - Collected Reviewed/Acked-by tags as appropriate. ==================== Signed-off-by: David S. Miller commit 920872e08391a8efb83077a3b3d9b1097682ca80 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:45 2020 +0200 net: rtlwifi: Replace in_interrupt() for context detection rtl_lps_enter() and rtl_lps_leave() are using in_interrupt() to detect whether it is safe to acquire a mutex or if it is required to defer to a workqueue. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. in_interrupt() also is only partially correct because it fails to chose the correct code path when just preemption or interrupts are disabled. Add an argument 'may_block' to both functions and adjust the callers to pass the context information. The following call chains were analyzed to be safe to block: rtl_watchdog_wq_callback() rlf_lps_leave/enter() rtl_op_suspend() rtl_lps_leave() rtl_op_bss_info_changed() rtl_lps_leave() rtl_op_sw_scan_start() rtl_lps_leave() The following call chains were analyzed to be unsafe to block: _rtl_pci_interrupt() _rtl_pci_rx_interrupt() rtl_lps_leave() _rtl_pci_interrupt() _rtl_pci_rx_interrupt() rtl_is_special_data() rtl_lps_leave() _rtl_pci_interrupt() _rtl_pci_rx_interrupt() rtl_is_special_data() setup_special_tx() rtl_lps_leave() _rtl_pci_interrupt() _rtl_pci_tx_isr rtl_lps_leave() halbtc_leave_lps() rtl_lps_leave() This leaves four callers of rtl_lps_enter/leave() where the analyzis stopped dead in the maze of several nested pointer based callchains and lack of rtlwifi hardware to debug this via tracing: halbtc_leave_lps(), halbtc_enter_lps(), halbtc_normal_lps(), halbtc_pre_normal_lps() These four have been cautionally marked to be unable to block which is the safe option, but the rtwifi wizards should be able to clarify that. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Kalle Valo Signed-off-by: David S. Miller commit e741751bda25738647708973acdf477a872e5f2d Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:44 2020 +0200 net: rtlwifi: Remove in_interrupt() from debug macro The usage of in_interrupt() in drivers in is phased out. rtl_dbg() a printk based debug aid is using in_interrupt() in the underlying C function _rtl_dbg_out() which is almost identical to _rtl_dbg_print(). The only difference is the printout of in_interrupt(). The decoding of in_interrupt() as hexvalue is non-trivial and aside of being phased out for driver usage the return value is just by chance the masked preempt count value and not a boolean. These home brewn printk debug aids are tedious to work with and provide only minimal context. They should be replaced by trace_printk() or a debug tracepoint which automatically records all context information. To make progress on the in_interrupt() cleanup, make rtl_dbg() use _rtl_dbg_print() and remove _rtl_dbg_out(). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Kalle Valo Signed-off-by: David S. Miller commit a3b7b227f1250a90c8a9542ea6398a61e1708174 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:43 2020 +0200 net: rtlwifi: Remove void* casts related to delayed work INIT_DELAYED_WORK() takes two arguments: A pointer to the delayed work and a function reference for the callback. The rtl code casts all function references to (void *) because the callbacks in use are not matching the required function signature. That's error prone and bad pratice. Some of the callback functions are also global, but only used in a single file. Clean the mess up by: - Adding the proper arguments to the callback functions and using them in the container_of() constructs correctly which removes the hideous container_of_dwork_rtl() macro as well. - Removing the type cast at the initializers - Making the unnecessary global functions static Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Kalle Valo Signed-off-by: David S. Miller commit 021b58ef51bb0e59d456e2101689052ff03a82e2 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:42 2020 +0200 net: libertas: Use netif_rx_any_context() The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. libertas uses in_interupt() to select the netif_rx*() variant which matches the calling context. The attempt to consolidate the code by passing an arguemnt or by distangling it failed due lack of knowledge about this driver and because the call chains are hard to follow. As a stop gap use netif_rx_any_context() which invokes the correct code path depending on context and confines the in_interrupt() usage to core code. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Kalle Valo Signed-off-by: David S. Miller commit 8faee70181dafdcc48449e98adf1edc645f965b0 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:41 2020 +0200 net: libertas libertas_tf: Remove in_interrupt() from debug macro. The debug macro prints (INT) when in_interrupt() returns true. The value of this information is dubious as it does not distinguish between the various contexts which are covered by in_interrupt(). As the usage of in_interrupt() in drivers is phased out and the same information can be more precisely obtained with tracing, remove the in_interrupt() conditional from this debug printk. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Kalle Valo Signed-off-by: David S. Miller commit d36981e0bdde8e01a93267bb18d7c7155c691c0c Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:40 2020 +0200 net: mwifiex: Use netif_rx_any_context(). The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. mwifiex uses in_interupt() to select the netif_rx*() variant which matches the calling context. The attempt to consolidate the code by passing an arguemnt or by distangling it failed due lack of knowledge about this driver and because the call chains are hard to follow. As a stop gap use netif_rx_any_context() which invokes the correct code path depending on context and confines the in_interrupt() usage to core code. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Kalle Valo Signed-off-by: David S. Miller commit 75fd2963982e16dbd108aa65380bb168c8b16bf6 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:39 2020 +0200 net: hostap: Remove in_interrupt() usage in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. hfa384x_cmd() and prism2_hw_reset() check in_interrupt() at function entry and if true emit a printk at debug loglevel and return. This is clearly debug code. Both functions invoke functions which can sleep. These functions already have appropriate debug checks which cover all invalid contexts, while in_interrupt() fails to detect context which just has preemption or interrupts disabled. Remove both checks as they are incomplete, debug only and already covered by the subsequently invoked functions properly. If called from invalid context the resulting back trace is definitely more helpful to analyze the problem than a printk at debug loglevel. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Kalle Valo Signed-off-by: David S. Miller commit bd63bca5e05bfaa7da9b7d5f21d5fa190e98692a Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:38 2020 +0200 net: iwlwifi: Remove in_interrupt() from tracing macro. The usage of in_interrupt) in driver code is phased out. The iwlwifi_dbg tracepoint records in_interrupt() seperately, but that's superfluous because the trace header already records all kind of state and context information like hardirq status, softirq status, preemption count etc. Aside of that the recording of in_interrupt() as boolean does not allow to distinguish between the possible contexts (hard interrupt, soft interrupt, bottom half disabled) while the trace header gives precise information. Remove the duplicate information from the tracepoint and fixup the caller. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Luca Coelho Acked-by: Kalle Valo Signed-off-by: David S. Miller commit e4ff7d6b8cee30a823347df8651444f8fa20b320 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:37 2020 +0200 net: ipw2x00,iwlegacy,iwlwifi: Remove in_interrupt() from debug macros The usage of in_interrupt() in non-core code is phased out. The debugging macros in these drivers use in_interrupt() to print 'I' or 'U' depending on the return value of in_interrupt(). While 'U' is confusing at best and 'I' is not really describing the actual context (hard interupt, soft interrupt, bottom half disabled section) these debug macros originate from the pre ftrace kernel era and their value today is questionable. They probably should be removed completely. The macros weere added initially for ipw2100 and then spreaded when the driver was forked. Remove the in_interrupt() usage at least.. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Kalle Valo Signed-off-by: David S. Miller commit c597ede4030d7e898756ea3b3725ac4b2092e7b3 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:36 2020 +0200 net: brcmfmac: Convey allocation mode as argument The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. brcmf_fweh_process_event() uses in_interrupt() to select the allocation mode GFP_KERNEL/GFP_ATOMIC. Aside of the above reasons this check is incomplete as it cannot detect contexts which just have preemption or interrupts disabled. All callchains leading to brcmf_fweh_process_event() can clearly identify the calling context. Convey a 'gfp' argument through the callchains and let the callers hand in the appropriate GFP mode. This has also the advantage that any change of execution context or preemption/interrupt state in these callchains will be detected by the memory allocator for all GFP_KERNEL allocations. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit 687006e20c445c2461f5a03fe1361ede946f1996 Author: Thomas Gleixner Date: Tue Sep 29 22:25:35 2020 +0200 net: brcmfmac: Convey execution context via argument to brcmf_netif_rx() bcrmgf_netif_rx() uses in_interrupt to chose between netif_rx() and netif_rx_ni(). in_interrupt() usage in drivers is phased out. Convey the execution mode via an 'inirq' argument through the various callchains leading to brcmf_netif_rx(): brcmf_pcie_isr_thread() <- Task context brcmf_proto_msgbuf_rx_trigger() brcmf_msgbuf_process_rx() brcmf_msgbuf_process_msgtype() brcmf_msgbuf_process_rx_complete() brcmf_netif_mon_rx() brcmf_netif_rx(isirq = false) brcmf_netif_rx(isirq = false) brcmf_sdio_readframes() <- Task context sdio_claim_host() might sleep brcmf_rx_frame(isirq = false) brcmf_sdio_rxglom() <- Task context sdio_claim_host() might sleep brcmf_rx_frame(isirq = false) brcmf_usb_rx_complete() <- Interrupt context brcmf_rx_frame(isirq = true) brcmf_rx_frame() brcmf_proto_rxreorder() brcmf_proto_bcdc_rxreorder() brcmf_fws_rxreorder() brcmf_netif_rx() brcmf_netif_rx() Signed-off-by: Thomas Gleixner Cc: Arend van Spriel Cc: Kalle Valo Signed-off-by: David S. Miller commit d067c0fa29f3f105381192ee22c03b62ee781bc0 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:34 2020 +0200 net: brcmfmac: Replace in_interrupt() brcmf_sdio_isr() is using in_interrupt() to distinguish if it is called from a interrupt service routine or from a worker thread. Passing such information from the calling context is preferred and requested by Linus, so add an argument `in_isr' to brcmf_sdio_isr() and let the callers pass the information about the calling context. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Reviewed-by: Arend van Spriel Acked-by: Kalle Valo Signed-off-by: David S. Miller commit c2f8c900792459cdd10e49f9c9ca15328223ad3b Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:33 2020 +0200 net: wan/lmc: Remove lmc_trace() lmc_trace() was first introduced in commit e7a392d5158af ("Import 2.3.99pre6-5") and was not touched ever since. The reason for looking at this was to get rid of the in_interrupt() usage, but while looking at it the following observations were made: - At least lmc_get_stats() (->ndo_get_stats()) is invoked with disabled preemption which is not detected by the in_interrupt() check, which would cause schedule() to be called from invalid context. - The code is hidden behind #ifdef LMC_TRACE which is not defined within the kernel and wasn't at the time it was introduced. - Three jiffies don't match 50ms. msleep() would be a better match which would also avoid the schedule() invocation. But why have it to begin with? - Nobody would do something like this today. Either netdev_dbg() or trace_printk() or a trace event would be used. If only the functions related to this driver are interesting then ftrace can be used with filtering. As it is obviously broken for years, simply remove it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit cfa1b493191fbc711c924316cfc20a0c60cb8c58 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:32 2020 +0200 net: usb: net1080: Remove in_interrupt() comment The comment above nc_vendor_write() suggests that the function could become async so that is usable in `in_interrupt()' context or that it already is safe to be called from such a context. Eitherway: The function did not become async since v2.4.9.2 (2002) and it must be not be called from `in_interrupt()' context because it sleeps on mutltiple occations. Remove the misleading comment. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit a19c26190145ee9355cfe1a755217b83040314db Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:31 2020 +0200 net: usb: kaweth: Remove last user of kaweth_control() kaweth_async_set_rx_mode() invokes kaweth_contol() and has two callers: - kaweth_open() which is invoked from preemptible context . - kaweth_start_xmit() which holds a spinlock and has bottom halfs disabled. If called from kaweth_start_xmit() kaweth_async_set_rx_mode() obviously cannot block, which means it can't call kaweth_control(). This is detected with an in_interrupt() check. Replace the in_interrupt() check in kaweth_async_set_rx_mode() with an argument which is set true by the caller if the context is safe to sleep, otherwise false. Now kaweth_control() is only called from preemptible context which means there is no need for GFP_ATOMIC allocations anymore. Replace it with usb_control_msg(). Cleanup the code a bit while at it. Finally remove kaweth_control() since the last user is gone. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Signed-off-by: David S. Miller commit af3563be9d09ea2c371974ee238169a680c9398a Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:30 2020 +0200 net: usb: kaweth: Replace kaweth_control() with usb_control_msg() kaweth_control() is almost the same as usb_control_msg() except for the memory allocation mode (GFP_ATOMIC vs GFP_NOIO) and the in_interrupt() check. All the invocations of kaweth_control() are within the probe function in fully preemtible context so there is no reason to use atomic allocations, GFP_NOIO which is used by usb_control_msg() is perfectly fine. Replace kaweth_control() invocations from probe with usb_control_msg(). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit 911b8eacd738d67a43fd8b6359443ab15cc3b082 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:29 2020 +0200 net: zd1211rw: Remove ZD_ASSERT(in_interrupt()) in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. handle_regs_int() is always invoked as part of URB callback which is either invoked from hard or soft interrupt context. Remove the magic assertion. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Kalle Valo Signed-off-by: David S. Miller commit 77afca296fe328c94bfedc031c00e0231bf8b395 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:28 2020 +0200 net: vxge: Remove in_interrupt() conditionals vxge_os_dma_malloc() and vxge_os_dma_malloc_async() are both called from callchains which use GFP_KERNEL allocations unconditionally or have other requirements to be called from fully preemptible task context.. vxge_os_dma_malloc(): 1) __vxge_hw_blockpool_create() <- GFP_KERNEL 2) __vxge_hw_mempool_grow() <- vzalloc() __vxge_hw_blockpool_malloc() vxge_os_dma_malloc_async(): 1 __vxge_hw_mempool_grow() <- vzalloc() __vxge_hw_blockpool_malloc() __vxge_hw_blockpool_blocks_add() 2) vxge_hw_vpath_open() <- vzalloc() __vxge_hw_blockpool_block_allocate() That means neither of these functions needs a conditional allocation mode. Remove the in_interrupt() conditional and use GFP_KERNEL. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit a1f467463ce0cf8515b1a619f3bbfa37fd6fa7b3 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:27 2020 +0200 net: sun3lance: Remove redundant checks in interrupt handler lance_interrupt() contains two pointless checks: - A check whether the 'dev_id' argument is NULL. 'dev_id' is the pointer which was handed in to request_irq() and the interrupt handler will always be invoked with that pointer as 'dev_id' argument by the core code. - A check for interrupt reentrancy. The core code already guarantees non-reentrancy of interrupt handlers. Remove these check. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit d08749ea3fd5a6a7713fdb4d52501e484eff29c4 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:26 2020 +0200 net: sunbmac: Replace in_interrupt() usage bigmac_init_rings() has an argument signaling if it is called from the interrupt handler. This is used to decide between GFP_KERNEL and GFP_ATOMIC for memory allocations. But it also checks in_interrupt() to handle invocations which come from the timer callback bigmac_timer() via bigmac_hw_init(), which is invoked with 'in_irq = 0'. While the timer callback is clearly not in hard interrupt context it is still not sleepable context. Rename the argument to `non_blocking' and set it to true if invoked from the timer callback or the interrupt handler which allows to remove the in_interrupt() check and makes the code consistent. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit caa241f0ef88ee1c81ca9e0e7135d4241bd8dde8 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:25 2020 +0200 net: sfc: Use GFP_KERNEL in efx_ef10_try_update_nic_stats() efx_ef10_try_update_nic_stats_vf() is now only invoked from thread context and can sleep after efx::stats_lock is dropped. Change the allocation mode from GFP_ATOMIC to GFP_KERNEL. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit 623b9988bfd146a438e55816dbfdf8f9a5290dd5 Author: Edward Cree Date: Tue Sep 29 22:25:24 2020 +0200 net: sfc: Replace in_interrupt() usage efx_ef10_try_update_nic_stats_vf() used in_interrupt() to figure out whether it is safe to sleep (for MCDI) or not. The only caller from which it was not is efx_net_stats(), which can be invoked under dev_base_lock from net-sysfs::netstat_show(). So add a new update_stats_atomic() method to struct efx_nic_type, and call it from efx_net_stats(), removing the need for efx_ef10_try_update_nic_stats_vf() to behave differently for this case (which it wasn't doing correctly anyway). For all nic_types other than EF10 VF, this method is NULL so the the regular update_stats() methods are invoked , which are happy with being called from atomic contexts. Fixes: f00bf2305cab ("sfc: don't update stats on VF when called in atomic context") Reported-by: Sebastian Andrzej Siewior Signed-off-by: Edward Cree Signed-off-by: Thomas Gleixner Reviewed-by: Martin Habets Signed-off-by: David S. Miller commit 606dbf8d5df129fd6b404f69c520e2d2feddc424 Author: Thomas Gleixner Date: Tue Sep 29 22:25:23 2020 +0200 net: natsemi: Replace in_interrupt() usage. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. sonic_quiesce() uses 'in_interrupt() || irqs_disabled()' to chose either udelay() or usleep_range() in the wait loop. In all callchains leading to it the context is well defined and known. Add a 'may_sleep' argument and pass it through the various callchains leading to this function. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit 85bdebd122febd881474b46034494a7cee3ca2b9 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:22 2020 +0200 net: mdiobus: Remove WARN_ON_ONCE(in_interrupt()) in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the check covers only parts of the contexts in which these functions cannot be called. It fails to detect preemption or interrupt disabled invocations. As the functions which contain these warnings invoke mutex_lock() which contains a broad variety of checks (always enabled or debug option dependent) and therefore covers all invalid conditions already, there is no point in having inconsistent warnings in those drivers. The conditional return is not really valuable in practice either. Just remove them. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f5fc6e859e26a3d4d23ca83192be1ccaf78a0bc9 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:21 2020 +0200 net: ionic: Remove WARN_ON(in_interrupt()). in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the check covers only parts of the contexts in which these functions cannot be called. It fails to detect preemption or interrupt disabled invocations. As the functions which are invoked from ionic_adminq_post() and ionic_dev_cmd_wait() contain a broad variety of checks (always enabled or debug option dependent) which cover all invalid conditions already, there is no point in having inconsistent warnings in those drivers. Just remove them. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Shannon Nelson Signed-off-by: David S. Miller commit 1800eee1667677a37faa4c5ae297c478ee0c4062 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:20 2020 +0200 net: ionic: Replace in_interrupt() usage. The in_interrupt() usage in this driver tries to figure out which context may sleep and which context may not sleep. in_interrupt() is not really suitable as it misses both preemption disabled and interrupt disabled invocations from task context. Conditionals like that in driver code are frowned upon in general because invocations of functions from invalid contexts might not be detected as the conditional papers over it. ionic_lif_addr() and _ionoc_lif_rx_mode() can be called from: 1) ->ndo_set_rx_mode() which is under netif_addr_lock_bh()) so it must not sleep. 2) Init and setup functions which are in fully preemptible task context. ionic_link_status_check_request() has two call paths: 1) NAPI which obviously cannot sleep 2) Setup which is again fully preemptible task context Add arguments which convey the execution context to the affected functions and let the callers provide the context instead of letting the functions deduce it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit 0171f4e8d3086a3aba30c18268de791f719fb8ea Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:19 2020 +0200 net: intel: Remove in_interrupt() warnings in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the checks cover only parts of the contexts in which these functions cannot be called. They fail to detect preemption or interrupt disabled invocations. As the functions which are invoked from the various places contain already a broad variety of checks (always enabled or debug option dependent) cover all invalid conditions already, there is no point in having inconsistent warnings in those drivers. Just remove them. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit c35a0824e88bf444c978080ef7698bcf73f44c20 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:18 2020 +0200 net: fec_mpc52xx: Replace in_interrupt() usage The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. mpc52xx_fec_stop() uses in_interrupt() to check if it is safe to sleep. All callers run in well defined contexts. Pass an argument from the callers indicating whether it is safe to sleep. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit f127bab4fa2083218fc549c7aef6768de7eb871f Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:17 2020 +0200 net: e100: Remove in_interrupt() usage and pointless GFP_ATOMIC allocation e100_hw_init() invokes e100_self_test() only if in_interrupt() returns false as e100_self_test() uses msleep() which requires sleepable task context. The in_interrupt() check is incomplete because in_interrupt() cannot catch callers from contexts which have just preemption or interrupts disabled. e100_hw_init() is invoked from: - e100_loopback_test() which clearly is sleepable task context as the function uses msleep() itself. - e100_up() which clearly is sleepable task context as well because it invokes e100_alloc_cbs() abd request_irq() which both require sleepable task context due to GFP_KERNEL allocations and mutex_lock() operations. Remove the pointless in_interrupt() check. As a side effect of this analysis it turned out that e100_rx_alloc_list() which is only invoked from e100_loopback_test() and e100_up() pointlessly uses a GFP_ATOMIC allocation. The next invoked function e100_alloc_cbs() is using GFP_KERNEL already. Change the allocation mode in e100_rx_alloc_list() to GFP_KERNEL as well. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit 8aed9064c6a51b2ed33812e85eab600f578e92c0 Author: Thomas Gleixner Date: Tue Sep 29 22:25:16 2020 +0200 net: cxbg4: Remove pointless in_interrupt() check t4_sge_stop() is only ever called from task context and the in_interrupt() check is presumably a leftover from copying t3_sge_stop(). Aside of in_interrupt() being deprecated because it's not providing what it claims to provide, this check would paper over illegitimate callers. The functions invoked from t4_sge_stop() contain already warnings to catch invocations from invalid contexts. Remove it. Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit a17409e73bc559e9619d478fab92c8a160b77ff9 Author: Thomas Gleixner Date: Tue Sep 29 22:25:15 2020 +0200 net: cxgb3: Cleanup in_interrupt() usage t3_sge_stop() is called from task context and from error handlers in interrupt context. It relies on in_interrupt() to differentiate the contexts. in_interrupt() is deprecated as it is ill defined and does not provide what it suggests. Instead of replacing it with some other construct, simply split the function into t3_sge_stop_dma(), which can be called from any context, and t3_sge_stop() which can be only called from task context. This has the advantage that any bogus invocation of t3_sge_stop() from wrong contexts can be caught by debug kernels instead of being papered over by the conditional. Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit 453590a8b61034bb08f9bfb0543a6b2244d66a3e Author: Thomas Gleixner Date: Tue Sep 29 22:25:14 2020 +0200 net: atheros: Remove WARN_ON(in_interrupt()) in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the check covers only parts of the contexts in which these functions cannot be called. It fails to detect preemption or interrupt disabled invocations. As the functions which are invoked from at*_reinit_locked() contain a broad variety of checks (always enabled or debug option dependent) which cover all invalid conditions already, there is no point in having inconsistent warnings in those drivers. Just remove them. Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit f773c765c86dd2750885e470b684f7acce5b05c0 Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:13 2020 +0200 net: caif: Use netif_rx_any_context() The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. cfhsi_rx_desc() and cfhsi_rx_pld() use in_interrupt() to distinguish if they should use netif_rx() or netif_rx_ni() for receiving packets. The attempt to consolidate the code by passing an arguemnt or by distangling it failed due lack of knowledge about this driver and because the call chains are hard to follow. As a stop gap use netif_rx_any_context() which invokes the correct code path depending on context and confines the in_interrupt() usage to core code. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit c11171a413385c1a72291cdb4a7435cb189762ab Author: Sebastian Andrzej Siewior Date: Tue Sep 29 22:25:12 2020 +0200 net: Add netif_rx_any_context() Quite some drivers make conditional decisions based on in_interrupt() to invoke either netif_rx() or netif_rx_ni(). Conditionals based on in_interrupt() or other variants of preempt count checks in drivers should not exist for various reasons and Linus clearly requested to either split the code pathes or pass an argument to the common functions which provides the context. This is obviously the correct solution, but for some of the affected drivers this needs a major rewrite due to their convoluted structure. As in_interrupt() usage in drivers needs to be phased out, provide netif_rx_any_context() as a stop gap for these drivers. This confines the in_interrupt() conditional to core code which in turn allows to remove the access to this check for driver code and provides one central place to do further modifications once the driver maze is cleaned up. Suggested-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit f2bf88c4afc8c5ab92b40af24819933e57d0968c Author: Thomas Gleixner Date: Tue Sep 29 22:25:11 2020 +0200 net: caif: Remove unused caif SPI driver While chasing in_interrupt() (ab)use in drivers it turned out that the caif_spi driver has never been in use since the driver was merged 10 years ago. There never was any matching code which provides a platform device. The driver has not seen any update (asided of treewide changes and cleanups) since 8 years and the maintainers vanished from the planet. So analysing the potential contexts and the (in)correctness of in_interrupt() usage is just a pointless exercise. Remove the cruft. Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit a53b59ece86c86d16d12ccdaa1ad0c78250a9d96 Author: Thomas Gleixner Date: Tue Sep 29 22:25:10 2020 +0200 net: enic: Cure the enic api locking trainwreck enic_dev_wait() has a BUG_ON(in_interrupt()). Chasing the callers of enic_dev_wait() revealed the gems of enic_reset() and enic_tx_hang_reset() which are both invoked through work queues in order to be able to call rtnl_lock(). So far so good. After locking rtnl both functions acquire enic::enic_api_lock which serializes against the (ab)use from infiniband. This is where the trainwreck starts. enic::enic_api_lock is a spin_lock() which implicitly disables preemption, but both functions invoke a ton of functions under that lock which can sleep. The BUG_ON(in_interrupt()) does not trigger in that case because it can't detect the preempt disabled condition. This clearly has never been tested with any of the mandatory debug options for 7+ years, which would have caught that for sure. Cure it by adding a enic_api_busy member to struct enic, which is modified and evaluated with enic::enic_api_lock held. If enic_api_devcmd_proxy_by_index() observes enic::enic_api_busy as true, it drops enic::enic_api_lock and busy waits for enic::enic_api_busy to become false. It would be smarter to wait for a completion of that busy period, but enic_api_devcmd_proxy_by_index() is called with other spin locks held which obviously can't sleep. Remove the BUG_ON(in_interrupt()) check as well because it's incomplete and with proper debugging enabled the problem would have been caught from the debug checks in schedule_timeout(). Fixes: 0b038566c0ea ("drivers/net: enic: Add an interface for USNIC to interact with firmware") Signed-off-by: Thomas Gleixner Signed-off-by: David S. Miller commit 2ec13cbcfadbbeac499f3b63de0f7db490d45a7e Author: Jacob Keller Date: Tue Sep 29 11:08:59 2020 -0700 devlink: include for _BITUL Commit 5d5b4128c4ca ("devlink: introduce flash update overwrite mask") added a usage of _BITUL to the UAPI header, but failed to include the header file where it was defined. It happens that this does not break any existing kernel include chains because it gets included through other sources. However, when including the UAPI headers in a userspace application (such as devlink in iproute2), _BITUL is not defined. Fixes: 5d5b4128c4ca ("devlink: introduce flash update overwrite mask") Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit 902c2a316871ed2cb0a3da6d7f2e38e3e8b31dc8 Merge: 2c956a5ad4de7 3427e13e5a730 Author: David S. Miller Date: Tue Sep 29 13:57:03 2020 -0700 Merge branch 'cxgb4-ch_ktls-updates-in-net-next' Rohit Maheshwari says: ==================== cxgb4/ch_ktls: updates in net-next This series of patches improves connections setup and statistics. This series is broken down as follows: Patch 1 fixes the handling of connection setup failure in HW. Driver shouldn't return success to tls_dev_add, until HW returns success. Patch 2 avoids the log flood. Patch 3 adds ktls statistics at port level. v1->v2: - removed conn_up from all places. v2->v3: - Corrected timeout handling. ==================== Signed-off-by: David S. Miller commit 3427e13e5a73068f3122abe04427d33d510a0882 Author: Rohit Maheshwari Date: Tue Sep 29 23:14:25 2020 +0530 cxgb4/ch_ktls: ktls stats are added at port level All the ktls stats were at adapter level, but now changing it to port level. Fixes: 62370a4f346d ("cxgb4/chcr: Add ipv6 support and statistics") Signed-off-by: Rohit Maheshwari Signed-off-by: David S. Miller commit 7d011afbbe8af7c92a17da4bdff6cc21b5ed23b2 Author: Rohit Maheshwari Date: Tue Sep 29 23:14:24 2020 +0530 cxgb4: Avoid log flood Changing these logs to dynamic debugs. If issue is seen, these logs can be enabled at run time. Signed-off-by: Rohit Maheshwari Signed-off-by: David S. Miller commit efca3878a5fbda8d847bd4afb7ccf48b62876d48 Author: Rohit Maheshwari Date: Tue Sep 29 23:14:23 2020 +0530 ch_ktls: Issue if connection offload fails Since driver first return success to tls_dev_add, if req to HW is successful, but later if HW returns failure, that connection traffic fails permanently and connection status remains unknown to stack. v1->v2: - removed conn_up from all places. v2->v3: - Corrected timeout handling. Fixes: 34aba2c45024 ("cxgb4/chcr : Register to tls add and del callback") Signed-off-by: Rohit Maheshwari Signed-off-by: David S. Miller commit 0d50f059c4cdc9e436f6f4db8779ac0795bfdadf Author: Paul Moore Date: Sun Sep 27 22:37:01 2020 -0400 selinux: provide a "no sooner than" date for the checkreqprot removal We marked /sys/fs/selinux/checkreqprot as deprecated in Linux v5.7, but didn't provide any guidance as to the timeframe. Considering the state of checkreqprot, it seems like one year should be enough time. Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 7d837c0dd95c4ab34ffec9f61000bb3b384da1a9 Author: Qinglang Miao Date: Mon Sep 21 21:10:10 2020 +0800 dm snap persistent: simplify area_io() Signed-off-by: Qinglang Miao Signed-off-by: Mike Snitzer commit 399c9bdbd6500254895bdbb574a4acbb860cda41 Author: Huaisheng Ye Date: Tue Sep 15 16:56:08 2020 +0800 dm thin metadata: Remove unused local variable when create thin and snap The local variable disk details is not used during the creating of thin & snap devices. Remove them from dm-thin-metadata, and add pointer validity check for pointer value in btree_lookup_raw. Skip memory copy when the caller doesn't need the value. Signed-off-by: Huaisheng Ye Signed-off-by: Mike Snitzer commit f0e90b6c663a7e3b4736cb318c6c7c589f152c28 Author: Mike Snitzer Date: Thu Sep 24 16:40:12 2020 -0400 dm raid: remove unnecessary discard limits for raid10 Commit bcc90d280465e ("md/raid10: improve raid10 discard request") removes raid10's inability to properly handle large discards. So eliminate associated constraint from dm-raid's raid10 support. Signed-off-by: Mike Snitzer commit e0910c8e4f87bb9f767e61a778b0d9271c4dc512 Author: Mike Snitzer Date: Thu Sep 24 13:14:52 2020 -0400 dm raid: fix discard limits for raid1 and raid10 Block core warned that discard_granularity was 0 for dm-raid with personality of raid1. Reason is that raid_io_hints() was incorrectly special-casing raid1 rather than raid0. But since commit 29efc390b9462 ("md/md0: optimize raid0 discard handling") even raid0 properly handles large discards. Fix raid_io_hints() by removing discard limits settings for raid1. Also, fix limits for raid10 by properly stacking underlying limits as done in blk_stack_limits(). Depends-on: 29efc390b9462 ("md/md0: optimize raid0 discard handling") Fixes: 61697a6abd24a ("dm: eliminate 'split_discard_bios' flag from DM target interface") Cc: stable@vger.kernel.org Reported-by: Zdenek Kabelac Reported-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit cd74693870fb748d812867ba49af733d689a3604 Author: Mikulas Patocka Date: Thu Jul 9 23:20:42 2020 -0700 dm crypt: don't use drivers that have CRYPTO_ALG_ALLOCATES_MEMORY Don't use crypto drivers that have the flag CRYPTO_ALG_ALLOCATES_MEMORY set. These drivers allocate memory and thus they are unsuitable for block I/O processing. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit d4a512edcc65704c5df51909caeab0495ba0ced3 Author: Mike Snitzer Date: Sat Sep 19 13:36:58 2020 -0400 dm: use dm_table_get_device_name() where appropriate in targets dm_table_get_device_name() avoids calling dm_table_get_md() followed by dm_device_name() -- saves intermediate dm_table_get_md() call. Signed-off-by: Mike Snitzer commit 33bd6f0693857492ab19869d79801437ac1e42ba Author: Mike Snitzer Date: Sat Sep 19 13:09:11 2020 -0400 dm table: make 'struct dm_table' definition accessible to all of DM core Move 'struct dm_table' definition from dm-table.c to dm-core.h and update DM core to access its members directly. Helps optimize max_io_len() and other methods slightly. Signed-off-by: Mike Snitzer commit 7465d7ac50edb3158c5eb957c5ecd3a5310e1c68 Author: Mike Snitzer Date: Thu Sep 17 12:59:36 2020 -0400 dm: eliminate need for start_io_acct() forward declaration Signed-off-by: Mike Snitzer commit 9679b5a7ec400f18f1812339b59c94750db48a76 Author: Mike Snitzer Date: Tue Sep 15 21:56:29 2020 -0400 dm: simplify __process_abnormal_io() Only call bio_op() once in switch statement. Also remove the excessive factoring out to one line functions. Signed-off-by: Mike Snitzer commit 828678b87eff06a4fff1e13e8b107287d522ed30 Author: Mike Snitzer Date: Mon Sep 14 13:59:53 2020 -0400 dm: push use of on-stack flush_bio down to __send_empty_flush() Eliminates duplicate code, no functional change. Signed-off-by: Mike Snitzer commit 3720281db9ad4905c3afc1bf389314d64e145093 Author: Mike Snitzer Date: Sat Sep 19 13:12:48 2020 -0400 dm: optimize max_io_len() by inlining max_io_len_target_boundary() Saves redundant dm_target_offset() math. Also, reverse argument order for max_io_len() to be consistent with other similar functions. Signed-off-by: Mike Snitzer commit 094ee64d7de8ab72b495ff9c03d86a60272da56d Author: Mike Snitzer Date: Mon Sep 14 13:50:49 2020 -0400 dm: push md->immutable_target optimization down to __process_bio() Also, update associated stale comment in __bind(). Signed-off-by: Mike Snitzer commit 5091cdec56faeaefa79de4b6cb3c3c55e50d1ac3 Author: Mike Snitzer Date: Fri Sep 18 20:22:30 2020 -0400 dm: change max_io_len() to use blk_max_size_offset() Using blk_max_size_offset() enables DM core's splitting to impose ti->max_io_len (via q->limits.chunk_sectors) and also fallback to respecting q->limits.max_sectors if chunk_sectors isn't set. Signed-off-by: Mike Snitzer commit 882ec4e609c1a6de1836e765905f62de1502ae1e Author: Mike Snitzer Date: Mon Sep 14 12:02:23 2020 -0400 dm table: stack 'chunk_sectors' limit to account for target-specific splitting If target set ti->max_io_len it must be used when stacking DM device's queue_limits to establish a 'chunk_sectors' that is compatible with the IO stack. By using lcm_not_zero() care is taken to avoid blindly overriding the chunk_sectors limit stacked up by blk_stack_limits(). Depends-on: 07d098e6bbad ("block: allow 'chunk_sectors' to be non-power-of-2") Signed-off-by: Mike Snitzer commit 99db399876f6ee8ebe15bb6ba4d38fdab3a52678 Author: Krzysztof Kozlowski Date: Sat Sep 26 18:28:02 2020 +0200 dt-bindings: vendor-prefixes: add Zealz Document vendor prefix for Zealz. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200926162811.5335-5-krzk@kernel.org Signed-off-by: Rob Herring commit 83c84b8b9e6adb76c8b9efc1334f6ba0ac0b33d3 Author: Krzysztof Kozlowski Date: Sat Sep 26 18:28:01 2020 +0200 dt-bindings: vendor-prefixes: add Wandbord/Technexion Document vendor prefix for Wandbord/Technexion. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200926162811.5335-4-krzk@kernel.org Signed-off-by: Rob Herring commit 2c72cdba6cc7b512915783862e2234e47c7cb9d3 Author: Krzysztof Kozlowski Date: Sat Sep 26 18:28:00 2020 +0200 dt-bindings: vendor-prefixes: add Embest RIoT Document vendor prefix for Embest RIoT. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200926162811.5335-3-krzk@kernel.org Signed-off-by: Rob Herring commit cdfd07d0e284ca114e966c82bbcfd08e1b00a633 Author: Krzysztof Kozlowski Date: Sat Sep 26 18:27:59 2020 +0200 dt-bindings: vendor-prefixes: add iMX6 Rex Project Document vendor prefix for iMX6 Rex Project. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200926162811.5335-2-krzk@kernel.org Signed-off-by: Rob Herring commit 4a3c53ce68c80c0a86cdf9f05cbf9037bfbebada Author: Krzysztof Kozlowski Date: Sat Sep 26 18:27:58 2020 +0200 dt-bindings: vendor-prefixes: add DFI Document binding for DFI Inc. company (https://www.dfi.com). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200926162811.5335-1-krzk@kernel.org Signed-off-by: Rob Herring commit 873462adb0b3eef225efc756d18de6c27df178f2 Author: Geert Uytterhoeven Date: Fri Sep 25 13:14:29 2020 +0200 dt-bindings: example: Grammar improvements Improve grammar in recently added sentences: - Drop superfluous "be" in front of "have", - Add missing articles. Fixes: 73f76a41c4ed7def ("dt-bindings: example: Extend based on practice") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200925111429.3146-1-geert+renesas@glider.be Signed-off-by: Rob Herring commit b38b4183d282474de2e220b9953f021c4983da05 Author: Krzysztof Kozlowski Date: Wed Sep 23 17:03:39 2020 +0200 dt-bindings: gpu: samsung-rotator: Add missing properties Add common properties appearing in DTSes (iommus, power-domains) to fix dtbs_check warnings like: arch/arm/boot/dts/exynos4210-i9100.dt.yaml: rotator@12810000: 'iommus', 'power-domains' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200923150339.12497-1-krzk@kernel.org Signed-off-by: Rob Herring commit 8bccbeb6e501dae165a63da8a8903bb6b3f95b3b Author: Chris Packham Date: Wed Sep 23 17:16:37 2020 +1200 dt-bindings: Add LM81 and DS1780 as trivial devices The LM81 and DS1780 are close relatives of the ADM9240 and already supported by the same driver. Document them as trivial devices. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20200923051637.30464-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Rob Herring commit 1471308fb5ec4335f9ae9fc65f65048dbe7c336e Merge: 4c07ae0ad493b 76cffccd606ac Author: Mike Snitzer Date: Tue Sep 29 16:27:21 2020 -0400 Merge remote-tracking branch 'jens/for-5.10/block' into dm-5.10 DM depends on these block 5.10 commits: 22ada802ede8 block: use lcm_not_zero() when stacking chunk_sectors 07d098e6bbad block: allow 'chunk_sectors' to be non-power-of-2 021a24460dc2 block: add QUEUE_FLAG_NOWAIT 6abc49468eea dm: add support for REQ_NOWAIT and enable it for linear target Signed-off-by: Mike Snitzer commit 2c956a5ad4de7376ee792e888809edf2b2b39b86 Author: Gustavo A. R. Silva Date: Tue Sep 29 08:27:51 2020 -0500 fddi/skfp: Avoid the use of one-element array One-element arrays are being deprecated[1]. Replace the one-element array with a simple object of type u_char: 'u_char rm_pad1'[2], once it seems this is just a placeholder for padding. [1] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays [2] https://github.com/KSPP/linux/issues/86 Built-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f72c23f.%2FkPBWcZBu+W6HKH4%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 3f47cb4c1cf3bceb2438ea962bfffc6665ee4a9f Author: Tom Parkin Date: Tue Sep 29 13:35:41 2020 +0100 l2tp: report rx cookie discards in netlink get When an L2TPv3 session receives a data frame with an incorrect cookie l2tp_core logs a warning message and bumps a stats counter to reflect the fact that the packet has been dropped. However, the stats counter in question is missing from the l2tp_netlink get message for tunnel and session instances. Include the statistic in the netlink get response. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 2bd056f550808eaa2c34a14169c99f81ead083a7 Merge: fe38d95bdb391 b40f58b973865 Author: David S. Miller Date: Tue Sep 29 13:22:53 2020 -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 2020-09-29 Here's the main bluetooth-next pull request for 5.10: - Multiple fixes to suspend/resume handling - Added mgmt events for controller suspend/resume state - Improved extended advertising support - btintel: Enhanced support for next generation controllers - Added Qualcomm Bluetooth SoC WCN6855 support - Several other smaller fixes & improvements ==================== Signed-off-by: David S. Miller commit c810b31ecb036b94629726d6219ad21b0c7a64a2 Author: John Fastabend Date: Tue Sep 29 13:07:49 2020 -0700 bpf, selftests: Fix warning in snprintf_btf where system() call unchecked On my systems system() calls are marked with warn_unused_result apparently. So without error checking we get this warning, ./prog_tests/snprintf_btf.c:30:9: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result[-Wunused-result] Also it seems like a good idea to check the return value anyways to ensure ping exists even if its seems unlikely. Fixes: 076a95f5aff2c ("selftests/bpf: Add bpf_snprintf_btf helper tests") Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160141006897.25201.12095049414156293265.stgit@john-Precision-5820-Tower commit 179b4bcc4c0cf62e3737c718e05f5a69b3e9041c Author: Liu Shixin Date: Mon Sep 21 16:24:49 2020 +0800 rtc: rv8803: simplify the return expression of rv8803_nvram_write Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200921082449.2591981-1-liushixin2@huawei.com commit 9ce42e8e0323d39fad01f3d17c35dd16d91c4f46 Author: Liu Shixin Date: Sat Sep 19 18:08:56 2020 +0800 rtc: meson: simplify the return expression of meson_vrtc_probe Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Alexandre Belloni Acked-by: Kevin Hilman Link: https://lore.kernel.org/r/20200919100856.1639319-1-liushixin2@huawei.com commit ba1bcafb29571f525bf563972e4241998db74e98 Author: Bartosz Golaszewski Date: Thu Sep 17 13:46:56 2020 +0200 rtc: rx8010: rename rx8010_init_client() to rx8010_init() Since the switch to using regmap this function no longer takes the I2C client struct as argument nor do we even interact with the client anywhere other than when creating the regmap. Rename it to a less misleading name: "rx8010_init()". Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200917114656.9036-1-brgl@bgdev.pl commit fe38d95bdb39184373fb96f0fc04705a4129c049 Merge: c2f8cedae8c2a dbaae5bb4617f Author: David S. Miller Date: Tue Sep 29 13:14:24 2020 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: updates for -next There are some misc updates for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit dbaae5bb4617f8d754ba3a2bef137948a774f3e8 Author: Guangbin Huang Date: Tue Sep 29 17:32:05 2020 +0800 net: hns3: dump tqp enable status in debugfs Adds debugfs to dump tqp enable status. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit b4442ec547287a624478339d832b1dd90bba14ee Author: Guangbin Huang Date: Tue Sep 29 17:32:04 2020 +0800 net: hns3: debugfs add new command to query device specifications In order to query specifications of the device, add a new debugfs command "dev spec" to do that. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit bcc26e8dc4327d6b07e4f839c03340b83e7e174b Author: Guojia Liao Date: Tue Sep 29 17:32:03 2020 +0800 net: hns3: remove unused code in hns3_self_test() NETIF_F_HW_VLAN_CTAG_FILTER is not set in netdev->hw_feature, but set in netdev->features. So the handler of NETIF_F_HW_VLAN_CTAG_FILTER in hns3_self_test() is always true, remove it. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit fe735c84be2937b53f9011f0954c22f37b16d7de Author: Huazhong Tan Date: Tue Sep 29 17:32:02 2020 +0800 net: hns3: Add RoCE VF reset support Add RoCE VF client reset support by notifying the RoCE VF client when hns3 VF is resetting and adding a interface to query whether CMDQ is ready to work. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 0692cfe94a760d17793d2e1c8ca2fe10118e55de Author: Huazhong Tan Date: Tue Sep 29 17:32:01 2020 +0800 net: hns3: add UDP segmentation offload support Add support for UDP segmentation offload to the HNS3 driver when the device can do it. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 6ad595bc981dee97519e20cce413c700de8a5ed8 Author: Huazhong Tan Date: Tue Sep 29 17:32:00 2020 +0800 net: hns3: rename trace event hns3_over_8bd Since the maximun BD number may not be 8 now, so rename hns3_over_8bd() to hns3_over_max_bd(). Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit fd665b3dbafdfb6c1caa4908849ce545f8066f58 Author: Huazhong Tan Date: Tue Sep 29 17:31:59 2020 +0800 net: hns3: replace macro HNS3_MAX_NON_TSO_BD_NUM Currently, the driver is able to query the device's specifications, which includes the maximum BD number of non TSO packet, so replace macro HNS3_MAX_NON_TSO_BD_NUM with the queried value, and rewrite macro HNS3_MAX_NON_TSO_SIZE whose value depends on the the maximum BD number of non TSO packet. Also, add a new parameter max_non_tso_bd_num to function hns3_tx_bd_num() and hns3_skb_need_linearized(), then they can get the maximum BD number of non TSO packet from the caller instead of calculating by themself, The note of hns3_skb_need_linearized() should be update as well. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit f94582e4bc4f73c1a265fdbe9aafd6eb5d314c41 Author: Kent Russell Date: Mon Sep 28 14:20:05 2020 -0400 drm/amdgpu: Use SKU instead of DID for FRU check v2 The VG20 DIDs 66a0, 66a1 and 66a4 are used for various SKUs that may or may not have the FRU EEPROM on it. Parse the VBIOS to check for server SKU variants (D131 or D134) until a more general solution can be determined. v2: Remove string-based logic, correct the VBIOS string comment Signed-off-by: Kent Russell Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 485d531c695b0f5c87180a7724b85322d3967d39 Author: Alex Deucher Date: Mon Sep 28 14:16:25 2020 -0400 drm/amdgpu/swsmu/smu12: fix force clock handling for mclk The state array is in the reverse order compared to other asics (high to low rather than low to high). Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1313 Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit 808ec542c0297ae0b945ed0e6aba6f625ea2353c Author: Dirk Gouders Date: Sun Sep 27 11:39:45 2020 +0200 drm/amd/display: remove duplicate call to rn_vbios_smu_get_smu_version() Commit 78fe9f63947a2b ("drm/amd/display: Remove DISPCLK Limit Floor for Certain SMU Versions") added a call to rn_vbios_smu_get_smu_version() to set clk_mgr->smu_ver. That field is initialized prior to the if-statement, already. Fixes: 78fe9f63947a2b (drm/amd/display: Remove DISPCLK Limit Floor for Certain SMU Versions) Signed-off-by: Dirk Gouders Cc: Alex Deucher Cc: Sung Lee Cc: Yongqiang Sun Cc: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 12a6727dee5d1119fc1556b870848f511414bf5d Author: Xiaojian Du Date: Sun Sep 27 17:07:02 2020 +0800 drm/amd/powerplay: add one sysfs file to support the feature to modify gfx clock on Raven/Raven2/Picasso APU. This patch is to add one sysfs file -- "pp_od_clk_voltage" for Raven/Raven2/Picasso APU, which is only used by dGPU like VEGA10. This sysfs file supports the feature to modify gfx engine clock(Mhz units), it can be used to configure the min value and the max value for gfx clock limited in the safe range. Command guide: echo "s level clock" > pp_od_clk_voltage s - adjust teh sclk level level - 0 or 1, "0" represents the min value, "1" represents the max value clock - the clock value(Mhz units), like 400, 800 or 1200, the value must be within the OD_RANGE limits. Example: $ cat pp_od_clk_voltage OD_SCLK: 0: 200Mhz 1: 1400Mhz OD_RANGE: SCLK: 200MHz 1400MHz $ echo "s 0 600" > pp_od_clk_voltage $ echo "s 1 1000" > pp_od_clk_voltage $ cat pp_od_clk_voltage OD_SCLK: 0: 600Mhz 1: 1000Mhz OD_RANGE: SCLK: 200MHz 1400MHz Signed-off-by: Xiaojian Du Reviewed-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 93b8713d61982377faf2f87994a303c6f7df0162 Merge: 85e3f318506ec bee4b7e6268be Author: Alexei Starovoitov Date: Tue Sep 29 13:09:24 2020 -0700 Merge branch 'bpf: Support multi-attach for freplace' Toke Høiland-Jørgensen says: ==================== This series adds support attaching freplace BPF programs to multiple targets. This is needed to support incremental attachment of multiple XDP programs using the libxdp dispatcher model. Patch 1 moves prog_aux->linked_prog and the trampoline to be embedded in bpf_tracing_link on attach, and freed by the link release logic, and introduces a mutex to protect the writing of the pointers in prog->aux. Based on this refactoring (and previously applied patches), it becomes pretty straight-forward to support multiple-attach for freplace programs (patch 2). This is simply a matter of creating a second bpf_tracing_link if a target is supplied. However, for API consistency with other types of link attach, this option is added to the BPF_LINK_CREATE API instead of extending bpf_raw_tracepoint_open(). Patch 3 is a port of Jiri Olsa's patch to support fentry/fexit on freplace programs. His approach of getting the target type from the target program reference no longer works after we've gotten rid of linked_prog (because the bpf_tracing_link reference disappears on attach). Instead, we used the saved reference to the target prog type that is also used to verify compatibility on secondary freplace attachment. Patch 4 is the accompanying libbpf update, and patches 5-7 are selftests: patch 5 tests for the multi-freplace functionality itself; patch 6 is Jiri's previous selftest for the fentry-to-freplace fix; patch 7 is a test for the change introduced in the previously-applied patches, blocking MODIFY_RETURN functions from attaching to other BPF programs. With this series, libxdp and xdp-tools can successfully attach multiple programs one at a time. To play with this, use the 'freplace-multi-attach' branch of xdp-tools: $ git clone --recurse-submodules --branch freplace-multi-attach https://github.com/xdp-project/xdp-tools $ cd xdp-tools/xdp-loader $ make $ sudo ./xdp-loader load veth0 ../lib/testing/xdp_drop.o $ sudo ./xdp-loader load veth0 ../lib/testing/xdp_pass.o $ sudo ./xdp-loader status The series is also available here: https://git.kernel.org/pub/scm/linux/kernel/git/toke/linux.git/log/?h=bpf-freplace-multi-attach-alt-10 Changelog: v10: - Dial back the s/tgt_/dst_/ replacement a bit - Fix smatch warning (from ktest robot) - Rebase to bpf-next, drop already-applied patches v9: - Clarify commit message of patch 3 - Add new struct bpf_attach_target_info for returning from bpf_check_attach_target() and passing to bpf_trampoline_get() - Move trampoline key computation into a helper - Make sure we don't break bpffs debug umh - Add some comment blocks explaining the logic flow in bpf_tracing_prog_attach() - s/tgt_/dst_/ in prog->aux, and for local variables using those members - Always drop dst_trampoline and dst_prog from prog->aux on first attach - Don't remove syscall fmod_ret test from selftest benchmarks - Add saved_ prefix to dst_{prog,attach}_type members in prog_aux - Drop prog argument from check_attach_modify_return() - Add comment about possible NULL of tr_link->tgt_prog on link_release() v8: - Add a separate error message when trying to attach FMOD_REPLACE to tgt_prog - Better error messages in bpf_program__attach_freplace() - Don't lock mutex when setting tgt_* pointers in prog create and verifier - Remove fmod_ret programs from benchmarks in selftests (new patch 11) - Fix a few other nits in selftests v7: - Add back missing ptype == prog->type check in link_create() - Use tracing_bpf_link_attach() instead of separate freplace_bpf_link_attach() - Don't break attachment of bpf_iters in libbpf (by clobbering link_create.iter_info) v6: - Rebase to latest bpf-next - Simplify logic in bpf_tracing_prog_attach() - Don't create a new attach_type for link_create(), disambiguate on prog->type instead - Use raw_tracepoint_open() in libbpf bpf_program__attach_ftrace() if called with NULL target - Switch bpf_program__attach_ftrace() to take function name as parameter instead of btf_id - Add a patch disallowing MODIFY_RETURN programs from attaching to other BPF programs, and an accompanying selftest (patches 1 and 10) v5: - Fix typo in inline function definition of bpf_trampoline_get() - Don't put bpf_tracing_link in prog->aux, use a mutex to protect tgt_prog and trampoline instead, and move them to the link on attach. - Restore Jiri as author of the last selftest patch v4: - Cleanup the refactored check_attach_btf_id() to make the logic easier to follow - Fix cleanup paths for bpf_tracing_link - Use xchg() for removing the bpf_tracing_link from prog->aux and restore on (some) failures - Use BPF_LINK_CREATE operation to create link with target instead of extending raw_tracepoint_open - Fold update of tools/ UAPI header into main patch - Update arg dereference patch to use skeletons and set_attach_target() v3: - Get rid of prog_aux->linked_prog entirely in favour of a bpf_tracing_link - Incorporate Jiri's fix for attaching fentry to freplace programs v2: - Drop the log arguments from bpf_raw_tracepoint_open - Fix kbot errors - Rebase to latest bpf-next ==================== Signed-off-by: Alexei Starovoitov commit c2f8cedae8c2a56e6e86bfdac40821ec1a0a760d Merge: d61491a51f7e9 4cb2cce07d2df Author: David S. Miller Date: Tue Sep 29 13:12:03 2020 -0700 Merge branch 'octeontx2-af-cleanup-and-extend-parser-config' Stanislaw Kardach says: ==================== octeontx2-af: cleanup and extend parser config Current KPU configuration data is spread over multiple files which makes it hard to read. Clean this up by gathering all configuration data in a single structure and also in a single file (npc_profile.h). This should increase the readability of KPU handling code (since it always references same structure), simplify updates to the CAM key extraction code and allow abstracting out the configuration source. Additionally extend and fix the parser config to support additional DSA types, NAT-T-ESP and IPv6 fields. Patch 1 ensures that CUSTOMx LTYPEs are not aliased with meaningful LTYPEs where possible. Patch 2 gathers all KPU profile related data into a single struct and creates an adapter structure which provides an interface to the KPU profile for the octeontx2-af driver. Patches 3-4 add support for Extended DSA, eDSA and Forward DSA. Patches 5-6 adds IPv6 fields to CAM key extraction and optimize the parser performance for fragmented IPv6 packets. Patch 7 refactors ESP handling in the parser to support NAT-T-ESP. ==================== Signed-off-by: David S. Miller commit 4cb2cce07d2df88400e91dda034cca861ed3d87b Author: Kiran Kumar K Date: Tue Sep 29 11:28:20 2020 +0200 octeontx2-af: add parser support for NAT-T-ESP Add support for NAT-T-ESP to KPU parser configuration. NAT ESP is a UDP based protocol. So move ESP to LE so that both UDP and ESP can be extracted. Signed-off-by: Kiran Kumar K Acked-by: Sunil Goutham Signed-off-by: David S. Miller commit 246f7d8466535fdd808f09df29894fbcc8de2cdc Author: Abhijit Ayarekar Date: Tue Sep 29 11:28:19 2020 +0200 octeontx2-af: optimize parsing of IPv6 fragments IPv6 fragmented packet may not contain completed layer 4 information. So stop KPU parsing after setting ipv6 fragmentation flag. Signed-off-by: Abhijit Ayarekar Acked-by: Sunil Goutham Signed-off-by: David S. Miller commit e8da3c6be0ed88123a28e6d1a7d6362ead9a0518 Author: Vidhya Vidhyaraman Date: Tue Sep 29 11:28:18 2020 +0200 octeontx2-af: Add IPv6 fields to default MKEX Added some IPv6 protocol fields to the default MKEX profile. They include everything from the beginning of IP header and up to source address. The pattern occupies full KW2 in MCAM entry. Only one out of two LD registers for this protocol is used. Signed-off-by: Vidhya Vidhyaraman Acked-by: Sunil Goutham Signed-off-by: David S. Miller commit 8cfae0b5fade07489ffd4442e982900780f78f1b Author: Satha Rao Date: Tue Sep 29 11:28:17 2020 +0200 octeontx2-af: fix Extended DSA and eDSA parsing KPU profile interpret Extended DSA and eDSA by looking source dev. This was incorrect and it restricts to use few source device ids and also created confusion while parsing regular DSA tag. With below patch lookup was based on bit 12 of Word0. This is always zero for DSA tag and it should be one for Extended DSA and eDSA. Signed-off-by: Satha Rao Acked-by: Sunil Goutham Signed-off-by: David S. Miller commit b61c7261a4999e84d3b02a5ed9b6cb5170305a50 Author: Hariprasad Kelam Date: Tue Sep 29 11:28:16 2020 +0200 octeontx2-af: add parser support for Forward DSA Marvell Prestera switches supports distributed switch architecture by inserting Forward DSA tag of 4 bytes right after ethernet SMAC. This tag don't have a tpid field. This patch provides parser and extraction support for the same. Default ldata extraction profile added for FDSA such that Src_port is extracted and placed inplace of vlanid field. Like extended DSA and eDSA tags,a special PKIND of 62 is used for this tag. Signed-off-by: Hariprasad Kelam Acked-by: Sunil Goutham Signed-off-by: David S. Miller commit 42006910b5eaa36d211e3d7623bd59c1e8c18311 Author: Stanislaw Kardach Date: Tue Sep 29 11:28:15 2020 +0200 octeontx2-af: cleanup KPU config data Refactor KPU related NPC code gathering all configuration data in a structured format and putting it in one place (npc_profile.h). This increases readability and makes it easier to extend the profile configuration (as opposed to jumping between multiple header and source files). To do this: * Gather all KPU profile related data into a single adapter struct. * Convert the built-in MKEX definition to a structured one to streamline the MKEX loading. * Convert LT default register configuration into a structure, keeping default protocol settings in same file where identifiers for those protocols are defined. * Add a single point for KPU profile loading, so that its source may change in the future once proper interfaces for loading such config are in place. Signed-off-by: Stanislaw Kardach Acked-by: Sunil Goutham Signed-off-by: David S. Miller commit 450f0b978870c384dd81d1176088536555f3170e Author: Stanislaw Kardach Date: Tue Sep 29 11:28:14 2020 +0200 octeontx2-af: fix LD CUSTOM LTYPE aliasing Since LD contains LTYPE definitions tweaked toward efficient NIX_AF_RX_FLOW_KEY_ALG(0..31)_FIELD(0..4) usage, the original location of NPC_LT_LD_CUSTOM0/1 was aliased with MPLS_IN_* definitions. Moving custom frame to value 6 and 7 removes the aliasing at the cost of custom frames being also considered when TCP/UDP RSS algo is configured. However since the goal of CUSTOM frames is to classify them to a separate set of RQs, this cost is acceptable. Signed-off-by: Stanislaw Kardach Acked-by: Sunil Goutham Signed-off-by: David S. Miller commit 72e71a82d6986b2259168575b1cea7fb78f9da32 Author: Shashank Sharma Date: Wed Jul 29 16:39:39 2020 +0530 drm/amdgpu: add new trace event for page table update This patch adds a new trace event to track the PTE update events. This specific event will provide information like: - start and end of virtual memory mapping - HW engine flags for the map - physical address for mapping This will be particularly useful for memory profiling tools (like RMV) which are monitoring the page table update events. V2: Added physical address lookup logic in trace point V3: switch to use __dynamic_array added nptes int the TPprint arguments list added page size in the arg list V4: Addressed Christian's review comments add start/end instead of seg use incr instead of page_sz to be accurate V5: Addressed Christian's review comments: add pid and vm context information in the event V6: Re-sequence the variables (put pid and ctx_id first) Cc: Christian König Cc: Alex Deucher Signed-off-by: Christian König Signed-off-by: Shashank Sharma Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 125b1deb604305025958939deb96ca95cdc24680 Author: Guchun Chen Date: Tue Sep 29 12:32:29 2020 +0800 drm/amdgpu: fix incorrect comment It should be one copy-paste typo. Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 3514521ccbd25ef3bd47b3c2abc28befbea8cdb1 Author: Jean Delvare Date: Mon Sep 28 11:10:37 2020 +0200 drm/amdgpu: restore proper ref count in amdgpu_display_crtc_set_config A recent attempt to fix a ref count leak in amdgpu_display_crtc_set_config() turned out to be doing too much and "fixed" an intended decrease as if it were a leak. Undo that part to restore the proper balance. This is the very nature of this function to increase or decrease the power reference count depending on the situation. Consequences of this bug is that the power reference would eventually get down to 0 while the display was still in use, resulting in that display switching off unexpectedly. Signed-off-by: Jean Delvare Fixes: e008fa6fb415 ("drm/amdgpu: fix ref count leak in amdgpu_display_crtc_set_config") Cc: stable@vger.kernel.org Cc: Navid Emamdoost Cc: Alex Deucher Signed-off-by: Alex Deucher commit faf0389f1e4004be84ede2d603d3f150d3cdfa99 Author: Jason Yan Date: Mon Sep 28 10:35:43 2020 +0800 drm/amd/display: make two symbols static This addresses the following sparse warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_hw_sequencer.c:2740:6: warning: symbol 'dce110_set_cursor_position' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_hw_sequencer.c:2785:6: warning: symbol 'dce110_set_cursor_attribute' was not declared. Should it be static? Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Alex Deucher commit 0ac900bae2c385f169577e1bc5de711c1c648b2b Author: Jason Yan Date: Mon Sep 28 10:36:41 2020 +0800 drm/amd/display: make get_color_space_type() static This addresses the following sparse warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_hw_sequencer.c:180:26: warning: symbol 'get_color_space_type' was not declared. Should it be static? Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Alex Deucher commit 69fc1f4b976ceafe91c64e1fc4ec2a2fe8b916aa Author: Dmytro Laktyushkin Date: Mon May 11 15:21:02 2020 -0400 amd/drm/display: avoid dcn3 on flip opp change for slave pipes At the moment on flip opp reassignment does not work in all cases for non root pipes. This change simply makes sure we prefer pipes not used previously when splitting in dcn3. Signed-off-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Reviewed-by: Rodrigo Siqueira Reviewed-by: Eric Bernstein Signed-off-by: Alex Deucher commit 8353d30e747f4e5cdd867c6b054dbb85cdcc76a9 Author: Chiawen Huang Date: Fri Sep 25 10:54:55 2020 -0400 drm/amd/display: disable stream if pixel clock changed with link active [Why] Vbios uses preferred timing to turn on edp but OS could use other timing. If change pixel clock when link active, there is unexpected garbage on monitor. [How] Once pixel clock changed, the driver needs to disable stream. Signed-off-by: Chiawen Huang Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d9beecfc79b71498e7f0bc40c550155f4e6b3c98 Author: Anthony Koo Date: Fri Sep 25 10:54:54 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.35 [Header Changes] - Definition for retaining ABM settings during disable - Addition of some new AUX interface definitions - Addition of some outbox definitions Signed-off-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit bee4b7e6268be9267e288936f5b1215fec3d4368 Author: Toke Høiland-Jørgensen Date: Tue Sep 29 14:45:57 2020 +0200 selftests: Add selftest for disallowing modify_return attachment to freplace This adds a selftest that ensures that modify_return tracing programs cannot be attached to freplace programs. The security_ prefix is added to the freplace program because that would otherwise let it pass the check for modify_return. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/160138355713.48470.3811074984255709369.stgit@toke.dk commit 17d3f386757609223aa02342d29526daa67efafc Author: Jiri Olsa Date: Tue Sep 29 14:45:56 2020 +0200 selftests/bpf: Adding test for arg dereference in extension trace Adding test that setup following program: SEC("classifier/test_pkt_md_access") int test_pkt_md_access(struct __sk_buff *skb) with its extension: SEC("freplace/test_pkt_md_access") int test_pkt_md_access_new(struct __sk_buff *skb) and tracing that extension with: SEC("fentry/test_pkt_md_access_new") int BPF_PROG(fentry, struct sk_buff *skb) The test verifies that the tracing program can dereference skb argument properly. Signed-off-by: Jiri Olsa Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/160138355603.48470.9072073357530773228.stgit@toke.dk commit f6429476c2012afade24741cc08890371d2842b4 Author: Toke Høiland-Jørgensen Date: Tue Sep 29 14:45:54 2020 +0200 selftests: Add test for multiple attachments of freplace program This adds a selftest for attaching an freplace program to multiple targets simultaneously. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/160138355497.48470.17568077161540217107.stgit@toke.dk commit a535909142bf2a6f3a95cabbb8b38ce3860c4807 Author: Toke Høiland-Jørgensen Date: Tue Sep 29 14:45:53 2020 +0200 libbpf: Add support for freplace attachment in bpf_link_create This adds support for supplying a target btf ID for the bpf_link_create() operation, and adds a new bpf_program__attach_freplace() high-level API for attaching freplace functions with a target. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/160138355387.48470.18026176785351166890.stgit@toke.dk commit 43bc2874e779c17932c447bb06ef4d5188578bdd Author: Toke Høiland-Jørgensen Date: Tue Sep 29 14:45:52 2020 +0200 bpf: Fix context type resolving for extension programs Eelco reported we can't properly access arguments if the tracing program is attached to extension program. Having following program: SEC("classifier/test_pkt_md_access") int test_pkt_md_access(struct __sk_buff *skb) with its extension: SEC("freplace/test_pkt_md_access") int test_pkt_md_access_new(struct __sk_buff *skb) and tracing that extension with: SEC("fentry/test_pkt_md_access_new") int BPF_PROG(fentry, struct sk_buff *skb) It's not possible to access skb argument in the fentry program, with following error from verifier: ; int BPF_PROG(fentry, struct sk_buff *skb) 0: (79) r1 = *(u64 *)(r1 +0) invalid bpf_context access off=0 size=8 The problem is that btf_ctx_access gets the context type for the traced program, which is in this case the extension. But when we trace extension program, we want to get the context type of the program that the extension is attached to, so we can access the argument properly in the trace program. This version of the patch is tweaked slightly from Jiri's original one, since the refactoring in the previous patches means we have to get the target prog type from the new variable in prog->aux instead of directly from the target prog. Reported-by: Eelco Chaudron Suggested-by: Jiri Olsa Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/160138355278.48470.17057040257274725638.stgit@toke.dk commit 4a1e7c0c63e02daad751842b7880f9bbcdfb6e89 Author: Toke Høiland-Jørgensen Date: Tue Sep 29 14:45:51 2020 +0200 bpf: Support attaching freplace programs to multiple attach points This enables support for attaching freplace programs to multiple attach points. It does this by amending the UAPI for bpf_link_Create with a target btf ID that can be used to supply the new attachment point along with the target program fd. The target must be compatible with the target that was supplied at program load time. The implementation reuses the checks that were factored out of check_attach_btf_id() to ensure compatibility between the BTF types of the old and new attachment. If these match, a new bpf_tracing_link will be created for the new attach target, allowing multiple attachments to co-exist simultaneously. The code could theoretically support multiple-attach of other types of tracing programs as well, but since I don't have a use case for any of those, there is no API support for doing so. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/160138355169.48470.17165680973640685368.stgit@toke.dk commit 3aac1ead5eb6b76f3d2b8d111e6de1c2de23fb34 Author: Toke Høiland-Jørgensen Date: Tue Sep 29 14:45:50 2020 +0200 bpf: Move prog->aux->linked_prog and trampoline into bpf_link on attach In preparation for allowing multiple attachments of freplace programs, move the references to the target program and trampoline into the bpf_tracing_link structure when that is created. To do this atomically, introduce a new mutex in prog->aux to protect writing to the two pointers to target prog and trampoline, and rename the members to make it clear that they are related. With this change, it is no longer possible to attach the same tracing program multiple times (detaching in-between), since the reference from the tracing program to the target disappears on the first attach. However, since the next patch will let the caller supply an attach target, that will also make it possible to attach to the same place multiple times. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/160138355059.48470.2503076992210324984.stgit@toke.dk commit cbd975d0b12fca62408157ecc07379da2da8e0a5 Author: Aric Cyr Date: Fri Sep 25 10:54:53 2020 -0400 drm/amd/display: Revert check for flip pending before locking pipes Signed-off-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ec30798a82964cd3f449720bc518ed61c46be425 Author: Wesley Chalmers Date: Fri Sep 25 10:54:52 2020 -0400 drm/amd/display: Add debug param to force dio disable [WHY] At the moment, some tests are failing because cur_link_settings is invalid. As a workaround, add an option to force dio disable. Signed-off-by: Wesley Chalmers Reviewed-by: Martin Leung Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8e02c26a58f37cb35e730e01eae14f943fba4cf4 Author: Joshua Aberback Date: Fri Sep 25 10:54:51 2020 -0400 drm/amd/display: Calc DLG from dummy p-state if full p-state unsupported [Why] Currently, when full p-state changes are not supported, DLG parameters are calculated for no p-state support at all. However, we are required to always support dummy p-state changes, so we should instead calculate DLG based on dummy p-state latency when full p-state is unsupported. This behaviour already exists for DCN2. [How] - move DLG calculation inside WM calculation - if p-state unsupported, do not recalculate for set A, instead copy from set C, and perform DLG calculation with dummy p-state latency Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ba578afd5a4f6139ffe564f07575875ca51a0f4f Author: Chiawen Huang Date: Fri Sep 25 10:54:50 2020 -0400 drm/amd/display: disable stream if pixel clock changed with link active [Why] Vbios uses preferred timing to turn on edp but OS could use other timing. If change pixel clock when link active, there is unexpected garbage on monitor. [How] Once pixel clock changed, the driver needs to disable stream. Signed-off-by: Chiawen Huang Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 89b151ade71495ebe2e48923812571e8e6a92918 Author: Wyatt Wood Date: Fri Sep 25 10:54:49 2020 -0400 drm/amd/display: Ensure all debug bits are passed to fw [Why] Some debug bits are not being copied from driver to fw. [How] Copy debug bits properly. Signed-off-by: Wyatt Wood Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4ab1edbc9da1509d8a2d775cf5aa295705d131d1 Author: Eric Bernstein Date: Fri Sep 25 10:54:48 2020 -0400 drm/amd/display: Add dp_set_dsc_pps_info_packet to virtual stream encoder Signed-off-by: Eric Bernstein Reviewed-by: Dmytro Laktyushkin Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4a3dea8932d3b1199680d2056dd91d31d94d70b7 Author: Alvin Lee Date: Fri Sep 25 10:54:47 2020 -0400 drm/amd/display: Update NV1x SR latency values [Why] HW team measurement requires updating values [How] Update bounding box values Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 06856269d43ab3ce6609c90a6e42bcd9564eaa02 Author: Barry Song Date: Wed Sep 9 16:10:01 2020 +1200 i2c: busses: replace spin_lock_irqsave by spin_lock in hard IRQ The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Barry Song Reviewed-by: Akash Asthana Reviewed-by: Mukesh Kumar Savaliya Signed-off-by: Wolfram Sang commit 795ee9b8a1076915c3b08eb73cf9fd4da9c52ae6 Author: Wang ShaoBo Date: Fri Sep 18 16:25:08 2020 +0800 i2c: efm32: Use devm_platform_get_and_ioremap_resource() Make use of devm_platform_get_and_ioremap_resource() provided by driver core platform instead of duplicated analogue. dev_err() is removed because it has been done in devm_ioremap_resource(). Signed-off-by: Wang ShaoBo Acked-by: Uwe Kleine-König Signed-off-by: Wolfram Sang commit 332fdaebb64e6fe6fdd1b0463c88bafec0faa199 Author: Jarkko Nikula Date: Thu Sep 24 16:52:17 2020 +0300 i2c: i801: Add support for Intel Alder Lake PCH-S Add PCI ID of SMBus controller on Intel Alder Lake PCH-S Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 3789af9a13e5561738c0f2114e3a5e22c843ca3e Author: Krzysztof Wilczyński Date: Thu Jul 30 21:08:48 2020 +0000 PCI/PM: Rename pci_dev.d3_delay to d3hot_delay PCI devices support two variants of the D3 power state: D3hot (main power present) D3cold (main power removed). Previously struct pci_dev contained: unsigned int d3_delay; /* D3->D0 transition time in ms */ unsigned int d3cold_delay; /* D3cold->D0 transition time in ms */ "d3_delay" refers specifically to the D3hot state. Rename it to "d3hot_delay" to avoid ambiguity and align with the ACPI "_DSM for Specifying Device Readiness Durations" in the PCI Firmware spec r3.2, sec 4.6.9. There is no change to the functionality. Link: https://lore.kernel.org/r/20200730210848.1578826-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit a5d02e901e6dadd7dd60fafb6448a822a47430ff Author: Vaibhav Gupta Date: Fri Jul 31 01:14:16 2020 +0530 PCI/PM: Remove unused pcibios_pm_ops The "struct dev_pm_ops pcibios_pm_ops", declared in include/linux/pci.h and defined in drivers/pci/pci-driver.c, provided arch-specific hooks when a PCI device was doing a hibernate transition. 394216275c7d ("s390: remove broken hibernate / power management support") removed the last use of pcibios_pm_ops, so remove it completely. [bhelgaas: drop unused "error"] Link: https://lore.kernel.org/r/20200730194416.1029509-1-vaibhavgupta40@gmail.com Reported-by: Bjorn Helgaas Signed-off-by: Vaibhav Gupta Signed-off-by: Bjorn Helgaas commit 85e3f318506ece12714535821d0b3186f7121b5b Merge: f970cbcdcdb5b ed9cf248b9498 Author: Alexei Starovoitov Date: Tue Sep 29 12:21:24 2020 -0700 Merge branch 'libbpf: support loading/storing any BTF' Andrii Nakryiko says: ==================== Add support for loading and storing BTF in either little- or big-endian integer encodings, regardless of host endianness. This allows users of libbpf to not care about endianness when they don't want to and transparently open/load BTF of any endianness. libbpf will preserve original endianness and will convert output raw data as necessary back to original endianness, if necessary. This allows tools like pahole to be ignorant to such issues during cross-compilation. While working with BTF data in memory, the endianness is always native to the host. Convetion can happen only during btf__get_raw_data() call, and only in a raw data copy. Additionally, it's possible to force output BTF endianness through new btf__set_endianness() API. This which allows to create flexible tools doing arbitrary conversions of BTF endianness, just by relying on libbpf. Cc: Arnaldo Carvalho de Melo Cc: Tony Ambardar Cc: Ilya Leoshkevich Cc: Luka Perkov ==================== Signed-off-by: Alexei Starovoitov commit ed9cf248b9498815d4762fe335539210b8a283a9 Author: Andrii Nakryiko Date: Mon Sep 28 21:30:46 2020 -0700 selftests/bpf: Test BTF's handling of endianness Add selftests juggling endianness back and forth to validate BTF's handling of endianness convertions internally. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200929043046.1324350-4-andriin@fb.com commit 3289959b97cac205df006fc79c88f042bf2765ab Author: Andrii Nakryiko Date: Mon Sep 28 21:30:45 2020 -0700 libbpf: Support BTF loading and raw data output in both endianness Teach BTF to recognized wrong endianness and transparently convert it internally to host endianness. Original endianness of BTF will be preserved and used during btf__get_raw_data() to convert resulting raw data to the same endianness and a source raw_data. This means that little-endian host can parse big-endian BTF with no issues, all the type data will be presented to the client application in native endianness, but when it's time for emitting BTF to persist it in a file (e.g., after BTF deduplication), original non-native endianness will be preserved and stored. It's possible to query original endianness of BTF data with new btf__endianness() API. It's also possible to override desired output endianness with btf__set_endianness(), so that if application needs to load, say, big-endian BTF and store it as little-endian BTF, it's possible to manually override this. If btf__set_endianness() was used to change endianness, btf__endianness() will reflect overridden endianness. Given there are no known use cases for supporting cross-endianness for .BTF.ext, loading .BTF.ext in non-native endianness is not supported. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200929043046.1324350-3-andriin@fb.com commit 22ba3635163164aa86eb8a9d8645079a0bbd0a66 Author: Andrii Nakryiko Date: Mon Sep 28 21:30:44 2020 -0700 selftests/bpf: Move and extend ASSERT_xxx() testing macros Move existing ASSERT_xxx() macros out of btf_write selftest into test_progs.h to use across all selftests. Also expand a set of macros for typical cases. Now there are the following macros: - ASSERT_EQ() -- check for equality of two integers; - ASSERT_STREQ() -- check for equality of two C strings; - ASSERT_OK() -- check for successful (zero) return result; - ASSERT_ERR() -- check for unsuccessful (non-zero) return result; - ASSERT_NULL() -- check for NULL pointer; - ASSERT_OK_PTR() -- check for a valid pointer; - ASSERT_ERR_PTR() -- check for NULL or negative error encoded in a pointer. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200929043046.1324350-2-andriin@fb.com commit 4798cbbfbd00c498339bdcf4cc2429f53eb374ec Author: Alexander Aring Date: Thu Sep 24 10:31:26 2020 -0400 fs: dlm: rework receive handling This patch reworks the current receive handling of dlm. As I tried to change the send handling to fix reorder issues I took a look into the receive handling and simplified it, it works as the following: Each connection has a preallocated receive buffer with a minimum length of 4096. On receive, the upper layer protocol will process all dlm message until there is not enough data anymore. If there exists "leftover" data at the end of the receive buffer because the dlm message wasn't fully received it will be copied to the begin of the preallocated receive buffer. Next receive more data will be appended to the previous "leftover" data and processing will begin again. This will remove a lot of code of the current mechanism. Inside the processing functionality we will ensure with a memmove() that the dlm message should be memory aligned. To have a dlm message always started at the beginning of the buffer will reduce some amount of memmove() calls because src and dest pointers are the same. The cluster attribute "buffer_size" becomes a new meaning, it's now the size of application layer receive buffer size. If this is changed during runtime the receive buffer will be reallocated. It's important that the receive buffer size has at minimum the size of the maximum possible dlm message size otherwise the received message cannot be placed inside the receive buffer size. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 4e192ee68e5af301470a925b76700d788db35d96 Author: Alexander Aring Date: Thu Sep 24 10:31:25 2020 -0400 fs: dlm: disallow buffer size below default I observed that the upper layer will not send messages above this value. As conclusion the application receive buffer should not below that value, otherwise we are not capable to deliver the dlm message to the upper layer. This patch forbids to set the receive buffer below the maximum possible dlm message size. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit e1a0ec30a571f176e9b324daba4c0e3f200fe882 Author: Alexander Aring Date: Thu Sep 24 10:31:24 2020 -0400 fs: dlm: handle range check as callback This patch adds a callback to CLUSTER_ATTR macro to allow individual callbacks for attributes which might have a more complex attribute range checking just than non zero. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 3f78cd7d2449a07904b3a23751758cbdeaaa20f3 Author: Alexander Aring Date: Thu Sep 24 10:31:23 2020 -0400 fs: dlm: fix mark per nodeid setting This patch fixes to set per nodeid mark configuration for accepted sockets as well. Before this patch only the listen socket mark value was used for all accepted connections. This patch will ensure that the cluster mark attribute value will be always used for all sockets, if a per nodeid mark value is specified dlm will use this value for the specific node. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 0461e0db941f8f49dcfd0576c4449f2e5beda2f6 Author: Alexander Aring Date: Thu Sep 24 10:31:22 2020 -0400 fs: dlm: remove lock dependency warning During my experiments to make dlm robust against tcpkill application I was able to run sometimes in a circular lock dependency warning between clusters_root.subsys.su_mutex and con->sock_mutex. We don't need to held the sock_mutex when getting the mark value which held the clusters_root.subsys.su_mutex. This patch moves the specific handling just before the sock_mutex will be held. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit f970cbcdcdb5b3468a6c05332818d226fb60038f Author: Toke Høiland-Jørgensen Date: Tue Sep 29 14:30:26 2020 +0200 selftests: Make sure all 'skel' variables are declared static If programs in prog_tests using skeletons declare the 'skel' variable as global but not static, that will lead to linker errors on the final link of the prog_tests binary due to duplicate symbols. Fix a few instances of this. Fixes: b18c1f0aa477 ("bpf: selftest: Adapt sock_fields test to use skel and global variables") Fixes: 9a856cae2217 ("bpf: selftest: Add test_btf_skc_cls_ingress") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200929123026.46751-1-toke@redhat.com commit f1fc8ece6c077bd6d460d99f4f83b9d20992b68b Author: Ciara Loftus Date: Mon Sep 28 08:23:44 2020 +0000 xsk: Fix a documentation mistake in xsk_queue.h After 'peeking' the ring, the consumer, not the producer, reads the data. Fix this mistake in the comments. Fixes: 15d8c9162ced ("xsk: Add function naming comments and reorder functions") Signed-off-by: Ciara Loftus Signed-off-by: Alexei Starovoitov Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20200928082344.17110-1-ciara.loftus@intel.com commit d2197c7ff171e7ab6272fbe0e20d95057748d82a Author: Toke Høiland-Jørgensen Date: Tue Sep 29 14:30:04 2020 +0200 selftests/bpf_iter: Don't fail test due to missing __builtin_btf_type_id The new test for task iteration in bpf_iter checks (in do_btf_read()) if it should be skipped due to missing __builtin_btf_type_id. However, this 'skip' verdict is not propagated to the caller, so the parent test will still fail. Fix this by also skipping the rest of the parent test if the skip condition was reached. Fixes: b72091bd4ee4 ("selftests/bpf: Add test for bpf_seq_printf_btf helper") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Reviewed-by: Alan Maguire Link: https://lore.kernel.org/bpf/20200929123004.46694-1-toke@redhat.com commit 9d9aae53b96d0659e9085221453e48b7df9edbed Author: Toke Høiland-Jørgensen Date: Sun Sep 27 21:30:05 2020 +0200 bpf/preload: Make sure Makefile cleans up after itself, and add .gitignore The Makefile in bpf/preload builds a local copy of libbpf, but does not properly clean up after itself. This can lead to subsequent compilation failures, since the feature detection cache is kept around which can lead subsequent detection to fail. Fix this by properly setting clean-files, and while we're at it, also add a .gitignore for the directory to ignore the build artifacts. Fixes: d71fa5c9763c ("bpf: Add kernel module with user mode driver that populates bpffs.") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200927193005.8459-1-toke@redhat.com commit 3aae4a38068a5a4fe1c7731eedf26a8a5f588732 Merge: 00e8c44a147aa cfe77683b8d4c Author: Alexei Starovoitov Date: Tue Sep 29 11:10:49 2020 -0700 Merge branch 'selftests/bpf: BTF-based kernel data display' Alan Maguire says: ==================== Resolve issues in bpf selftests introduced with BTF-based kernel data display selftests; these are - a warning introduced in snprintf_btf.c; and - compilation failures with old kernels vmlinux.h ==================== Signed-off-by: Alexei Starovoitov commit cfe77683b8d4c22d25e7cc40319f1dfe5401c48a Author: Alan Maguire Date: Tue Sep 29 04:32:31 2020 -0700 selftests/bpf: Ensure snprintf_btf/bpf_iter tests compatibility with old vmlinux.h Andrii reports that bpf selftests relying on "struct btf_ptr" and BTF_F_* values will not build as vmlinux.h for older kernels will not include "struct btf_ptr" or the BTF_F_* enum values. Undefine and redefine them to work around this. Fixes: b72091bd4ee4 ("selftests/bpf: Add test for bpf_seq_printf_btf helper") Fixes: 076a95f5aff2 ("selftests/bpf: Add bpf_snprintf_btf helper tests") Reported-by: Andrii Nakryiko Signed-off-by: Alan Maguire Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1601379151-21449-3-git-send-email-alan.maguire@oracle.com commit 96c48058db150639553fc4d7b89c236bf5c9257e Author: Alan Maguire Date: Tue Sep 29 04:32:30 2020 -0700 selftests/bpf: Fix unused-result warning in snprintf_btf.c Daniel reports: + system("ping -c 1 127.0.0.1 > /dev/null"); This generates the following new warning when compiling BPF selftests: [...] EXT-OBJ [test_progs] cgroup_helpers.o EXT-OBJ [test_progs] trace_helpers.o EXT-OBJ [test_progs] network_helpers.o EXT-OBJ [test_progs] testing_helpers.o TEST-OBJ [test_progs] snprintf_btf.test.o /root/bpf-next/tools/testing/selftests/bpf/prog_tests/snprintf_btf.c: In function ‘test_snprintf_btf’: /root/bpf-next/tools/testing/selftests/bpf/prog_tests/snprintf_btf.c:30:2: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result] system("ping -c 1 127.0.0.1 > /dev/null"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [...] Fixes: 076a95f5aff2 ("selftests/bpf: Add bpf_snprintf_btf helper tests") Reported-by: Daniel Borkmann Signed-off-by: Alan Maguire Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1601379151-21449-2-git-send-email-alan.maguire@oracle.com commit 963fabf37f6a94214a823df0a785e653cb8ad6ea Author: Ard Biesheuvel Date: Wed Sep 23 10:20:10 2020 +0200 efi: efivars: limit availability to X86 builds CONFIG_EFI_VARS controls the code that exposes EFI variables via sysfs entries, which was deprecated before support for non-Intel architectures was added to EFI. So let's limit its availability to Intel architectures for the time being, and hopefully remove it entirely in the not too distant future. While at it, let's remove the module alias so that the module is no longer loaded automatically. Signed-off-by: Ard Biesheuvel commit 5ee70cd60652e85e4e8ced99f58f2fcbab405110 Author: Ard Biesheuvel Date: Wed Sep 23 10:27:36 2020 +0200 efi: remove some false dependencies on CONFIG_EFI_VARS Remove some false dependencies on CONFIG_EFI_VARS, which only controls the creation of the sysfs entries, whereas the underlying functionality that these modules rely on is enabled unconditionally when CONFIG_EFI is set. Signed-off-by: Ard Biesheuvel commit 9846d86031eeca2fb2867fe4ac9d92803a97e8e4 Author: Ard Biesheuvel Date: Wed Sep 23 10:18:31 2020 +0200 efi: gsmi: fix false dependency on CONFIG_EFI_VARS The gsmi code does not actually rely on CONFIG_EFI_VARS, since it only uses the efivars abstraction that is included unconditionally when CONFIG_EFI is defined. CONFIG_EFI_VARS controls the inclusion of the code that exposes the sysfs entries, and which has been deprecated for some time. Signed-off-by: Ard Biesheuvel commit 5d3c8617ccee6387ba73a5dba77fb9dc21cb85f4 Author: Ard Biesheuvel Date: Wed Sep 23 10:13:07 2020 +0200 efi: efivars: un-export efivars_sysfs_init() efivars_sysfs_init() is only used locally in the source file that defines it, so make it static and unexport it. Signed-off-by: Ard Biesheuvel commit c9b51a2dbfe7f47643e133bf48e1bf28f1b85d2a Author: Ard Biesheuvel Date: Wed Sep 23 10:07:49 2020 +0200 efi: pstore: move workqueue handling out of efivars The worker thread that gets kicked off to sync the state of the EFI variable list is only used by the EFI pstore implementation, and is defined in its source file. So let's move its scheduling there as well. Since our efivar_init() scan will bail on duplicate entries, there is no need to disable the workqueue like we did before, so we can run it unconditionally. Signed-off-by: Ard Biesheuvel commit 232f4eb6393f42f7f9418560ae9228e747fc6faf Author: Ard Biesheuvel Date: Wed Sep 23 09:56:14 2020 +0200 efi: pstore: disentangle from deprecated efivars module The EFI pstore implementation relies on the 'efivars' abstraction, which encapsulates the EFI variable store in a way that can be overridden by other backing stores, like the Google SMI one. On top of that, the EFI pstore implementation also relies on the efivars.ko module, which is a separate layer built on top of the 'efivars' abstraction that exposes the [deprecated] sysfs entries for each variable that exists in the backing store. Since the efivars.ko module is deprecated, and all users appear to have moved to the efivarfs file system instead, let's prepare for its removal, by removing EFI pstore's dependency on it. Signed-off-by: Ard Biesheuvel commit b89114cd018cffa5deb7def1844ce1891efd4f96 Author: Ard Biesheuvel Date: Thu Sep 24 17:58:22 2020 +0200 efi: mokvar-table: fix some issues in new code Fix a couple of issues in the new mokvar-table handling code, as pointed out by Arvind and Boris: - don't bother checking the end of the physical region against the start address of the mokvar table, - ensure that we enter the loop with err = -EINVAL, - replace size_t with unsigned long to appease pedantic type equality checks. Reviewed-by: Arvind Sankar Reviewed-by: Lenny Szubowicz Tested-by: Borislav Petkov Signed-off-by: Ard Biesheuvel commit 9b1e57ef8100b3aab8d31428df768bbb46614c04 Merge: eca1d82ea8580 da4410d4078ba Author: Greg Kroah-Hartman Date: Tue Sep 29 19:11:11 2020 +0200 Merge tag 'iio-for-5.10c' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: 3rd set of new device support features and cleanup for IIO in the 5.10 cycle. A late set given it seems the 5.10 cycle is going to start a bit later than expected and quite a bit came in. Includes some late breaking fixes that can wait for the merge window. New device support * ad9467 - ad9434 support including dt bindings update - ad9265 support including dt bindings update Yaml conversion * amlogic,meson-saradc Core rework (heading towards multiple buffer support) * refactor iio_device_register_eventset * Null-ify IIO device's event_interface during unregister. Features * ad7291 - convert from platform_data to devicetree including bindings doc. * core - Add titles to a few IIO config symbols to allow simpler out of tree building. It does little harm so why not enable it. Fixes * ad7292 - Fix missing of_node_put() * at91-sama5d2 - Fix a crash due to missordering of dma enabling as a result of recent IIO wide rework. * gyro-adc - Fix missing of_node_put() * ltc2983 - Fix missing of_node_put() * stm32-adc - Fix an issue with runtime autosuspend related to parent autosuspending. Cleanups * counter/ti-eqep - Tidy up a , instead of ; * buffer-dmaengine - Drop the unmanaged allocator functions as no one is using them. * at91-sama5d2 - devm_platform_get_and_ioremap_resouce() replacing boilerplate. * cros_ec - move the hw fifo attributes setup into the cros_ec core. * gp2ap002 - comment typo * microchip-tcb-capture: - consitifcation * ssp - Use PLATFORM_DEVID_NONE instead of -1 to convey true meaning. * stm32-dfsdm - devm_platform_get_and_ioremap_resouce() replacing boilerplate. * tag 'iio-for-5.10c' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (25 commits) iio: adc: gyroadc: fix leak of device node iterator iio: adc: stm32-adc: fix runtime autosuspend delay when slow polling iio: adc: at91-sama5d2_adc: fix DMA conversion crash iio: ad7292: Fix of_node refcounting iio: ltc2983: Fix of_node refcounting counter: use semicolons rather than commas to separate statements iio: buffer: Kconfig: add title for IIO_TRIGGERED_BUFFER symbol iio: Kconfig: Provide title for IIO_TRIGGERED_EVENT symbol iio: dma-buffer: Kconfig: Provide titles for IIO DMA Kconfig symbols iio: cros_ec: unify hw fifo attributes into the core file dt-bindings: iio: ad9467: add entries for for AD9434 & AD9265 ADCs iio: adc: ad9467: add support for AD9265 high-speed ADC iio: adc: ad9467: add support for AD9434 high-speed ADC iio: adc: ad9467: wrap a axi-adc chip-info into a ad9467_chip_info type iio: buffer-dmaengine: remove non managed alloc/free iio: adc: stm32-dfsdm: Use devm_platform_get_and_ioremap_resource() iio: adc: at91-sama5d2_adc: Use devm_platform_get_and_ioremap_resource() iio: ssp: use PLATFORM_DEVID_NONE dt-bindings: iio: adc: ad7291: add binding iio: adc: ad7291: convert to device tree ... commit cf4c0fb00d5a93cefedadb6a973416376d3321dc Author: Lang Cheng Date: Tue Sep 29 17:32:14 2020 +0800 RDMA/hns: Remove unused variables and definitions Some code was removed but the variables were still there, and some parameters have been changed to be queried from firmware. So the definitions of them are no longer needed. Fixes: 2a3d923f8730 ("RDMA/hns: Replace magic numbers with #defines") Fixes: 82e620d9c3a0 ("RDMA/hns: Modify the data structure of hns_roce_av") Fixes: 82547469782a ("IB/hns: Implement the add_gid/del_gid and optimize the GIDs management") Fixes: 21b97f538765 ("RDMA/hns: Fixup qp release bug") Link: https://lore.kernel.org/r/1601371934-40003-1-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit da4410d4078ba4ead9d6f1027d6db77c5a74ecee Author: Tobias Jordan Date: Sat Sep 26 18:19:46 2020 +0200 iio: adc: gyroadc: fix leak of device node iterator Add missing of_node_put calls when exiting the for_each_child_of_node loop in rcar_gyroadc_parse_subdevs early. Also add goto-exception handling for the error paths in that loop. Fixes: 059c53b32329 ("iio: adc: Add Renesas GyroADC driver") Signed-off-by: Tobias Jordan Link: https://lore.kernel.org/r/20200926161946.GA10240@agrajag.zerfleddert.de Cc: Signed-off-by: Jonathan Cameron commit c537d3457542a398caa1fe58e0976c5f83cf7281 Author: Fabrice Gasnier Date: Wed Jul 1 16:55:28 2020 +0200 iio: adc: stm32-adc: fix runtime autosuspend delay when slow polling When the ADC is runtime suspended and starting a conversion, the stm32-adc driver calls pm_runtime_get_sync() that gets cascaded to the parent (e.g. runtime resume of stm32-adc-core driver). This also kicks the autosuspend delay (e.g. 2s) of the parent. Once the ADC is active, calling pm_runtime_get_sync() again (upon a new capture) won't kick the autosuspend delay for the parent (stm32-adc-core driver) as already active. Currently, this makes the stm32-adc-core driver go in suspend state every 2s when doing slow polling. As an example, doing a capture, e.g. cat in_voltageY_raw at a 0.2s rate, the auto suspend delay for the parent isn't refreshed. Once it expires, the parent immediately falls into runtime suspended state, in between two captures, as soon as the child driver falls into runtime suspend state: - e.g. after 2s, + child calls pm_runtime_put_autosuspend() + 100ms autosuspend delay of the child. - stm32-adc-core switches off regulators, clocks and so on. - They get switched on back again 100ms later in this example (at 2.2s). So, use runtime_idle() callback in stm32-adc-core driver to call pm_runtime_mark_last_busy() for the parent driver (stm32-adc-core), to avoid this. Fixes: 9bdbb1139ca1 ("iio: adc: stm32-adc: add power management support") Signed-off-by: Fabrice Gasnier Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/1593615328-5180-1-git-send-email-fabrice.gasnier@st.com Signed-off-by: Jonathan Cameron commit 1a198794451449113fa86994ed491d6986802c23 Author: Eugen Hristev Date: Wed Sep 23 15:17:48 2020 +0300 iio: adc: at91-sama5d2_adc: fix DMA conversion crash After the move of the postenable code to preenable, the DMA start was done before the DMA init, which is not correct. The DMA is initialized in set_watermark. Because of this, we need to call the DMA start functions in set_watermark, after the DMA init, instead of preenable hook, when the DMA is not properly setup yet. Fixes: f3c034f61775 ("iio: at91-sama5d2_adc: adjust iio_triggered_buffer_{predisable,postenable} positions") Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/20200923121748.49384-1-eugen.hristev@microchip.com Cc: Signed-off-by: Jonathan Cameron commit b8a533f3c24b3b8f1fdbefc5ada6a7d5733d63e6 Author: Nuno Sá Date: Fri Sep 25 11:10:45 2020 +0200 iio: ad7292: Fix of_node refcounting When returning or breaking early from a `for_each_available_child_of_node()` loop, we need to explicitly call `of_node_put()` on the child node to possibly release the node. Fixes: 506d2e317a0a0 ("iio: adc: Add driver support for AD7292") Signed-off-by: Nuno Sá Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200925091045.302-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit b07c47bfab6f5c4c7182d23e854bbceaf7829c85 Author: Nuno Sá Date: Fri Sep 25 11:10:44 2020 +0200 iio: ltc2983: Fix of_node refcounting When returning or breaking early from a `for_each_available_child_of_node()` loop, we need to explicitly call `of_node_put()` on the child node to possibly release the node. Fixes: f110f3188e563 ("iio: temperature: Add support for LTC2983") Signed-off-by: Nuno Sá Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200925091045.302-1-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit bbbeac88fb3540b9421c90866a04a7a89cc6adab Author: Julia Lawall Date: Sun Sep 27 21:12:25 2020 +0200 counter: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Reviewed-by: David Lechner Link: https://lore.kernel.org/r/1601233948-11629-16-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Jonathan Cameron commit c8283ba8e28c6863d0b8703a4e567d6555c43ac2 Author: Alexandru Ardelean Date: Thu Sep 24 14:17:58 2020 +0300 iio: buffer: Kconfig: add title for IIO_TRIGGERED_BUFFER symbol For some embedded systems, a workflow involving external kernel modules that implement IIO devices is more practical than working with in-tree sources. Kconfig symbols without any titles do not show up in menuconfig, and as such are more difficult to configure granularly, as they need to be selected by potentially unused/un-needed drivers. This change adds a title to the IIO_TRIGGERED_BUFFER Kconfig symbol. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200924111758.196367-4-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit a132e5f4f3f0c94cfe05259cdc08c70813a20759 Author: Alexandru Ardelean Date: Thu Sep 24 14:17:57 2020 +0300 iio: Kconfig: Provide title for IIO_TRIGGERED_EVENT symbol For some embedded systems, a workflow involving external kernel modules that implement IIO devices is more practical than working with in-tree sources. Kconfig symbols without any titles do not show up in menuconfig, and as such are more difficult to configure granularly, as they need to be selected by potentially unused/un-needed drivers. Albeit, the IIO_TRIGGERED_EVENT is used by a single mainline driver, this could allow for some out-of-tree drivers to use this kmod. This change adds a title to the IIO_TRIGGERED_EVENT Kconfig symbol. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200924111758.196367-3-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 3cd137f591e18588f730a2c53f291d65382050d0 Author: Alexandru Ardelean Date: Thu Sep 24 14:17:56 2020 +0300 iio: dma-buffer: Kconfig: Provide titles for IIO DMA Kconfig symbols For some embedded systems, a workflow involving external kernel modules that implement IIO devices is more practical than working with in-tree sources. Kconfig symbols without any titles do not show up in menuconfig, and as such are more difficult to configure granularly, as they need to be selected by potentially unused/un-needed drivers. This change adds titles to the IIO DMA Kconfig symbols to address this. This change also updates DMAengine -> DMAEngine, which is the correct/nitpick-y name of the framework. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200924111758.196367-2-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 2e2366c2d14193d3b95bab1fb484a9377224962b Author: Alexandru Ardelean Date: Wed Sep 23 16:03:39 2020 +0300 iio: cros_ec: unify hw fifo attributes into the core file The intent here is to minimize the use of iio_buffer_set_attrs(). Since we are planning to add support for multiple IIO buffers per IIO device, the issue has to do with: 1. Accessing 'indio_dev->buffer' directly (as is done with 'iio_buffer_set_attrs(indio_dev->buffer, )'). 2. The way that the buffer attributes would get handled or expanded when there are more buffers per IIO device. Current a sysfs kobj_type expands into a 'device' object that expands into an 'iio_dev' object. We will need to change this, so that the sysfs attributes for IIO buffers expand into IIO buffers at some point. Right now, the current IIO framework works fine for the '1 IIO device == 1 IIO buffer' case (that is now). Signed-off-by: Alexandru Ardelean Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200923130339.997902-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 1d136dd71908bad82717a1c1f07528e4ea5ec63a Author: Alexandru Ardelean Date: Thu Sep 24 11:05:18 2020 +0300 dt-bindings: iio: ad9467: add entries for for AD9434 & AD9265 ADCs Add entries for the AD9434 & AD9265 high-speed ADCs which are supported by the 'ad9467' driver. Better describe the family of ADCs similar to AD9467 in the description. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200924080518.96410-5-alexandru.ardelean@analog.com commit eb61343dfd214afd9eacba958fda0e31b1f31b19 Author: Michael Hennerich Date: Thu Sep 24 11:05:17 2020 +0300 iio: adc: ad9467: add support for AD9265 high-speed ADC The AD9265 is a 16-bit, 125 MSPS analog-to-digital converter (ADC). The AD9265 is designed to support communications applications where high performance combined with low cost, small size, and versatility is desired. The ADC core features a multistage, differential pipelined architecture with integrated output error correction logic to provide 16-bit accuracy at 125 MSPS data rates and guarantees no missing codes over the full operating temperature range. The ADC features a wide bandwidth differential sample-and-hold analog input amplifier supporting a variety of user-selectable input ranges. It is suitable for multiplexed systems that switch full-scale voltage levels in successive channels and for sampling single-channel inputs at frequencies well beyond the Nyquist rate. Combined with power and cost savings over previously available ADCs, the AD9265 is suitable for applications in communications, instrumentation and medical imaging. Link: https://www.analog.com/media/en/technical-documentation/data-sheets/AD9434.pdf The driver supports the same register set as the AD9467, so the support for this chip is added to the 'ad9467' driver. Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200924080518.96410-4-alexandru.ardelean@analog.com commit 4606d0f4b05faad88fdf8472d7b2f0d600546f5e Author: Michael Hennerich Date: Thu Sep 24 11:05:16 2020 +0300 iio: adc: ad9467: add support for AD9434 high-speed ADC The AD9434 is a 12-bit monolithic sampling analog-to-digital converter (ADC) optimized for high performance, low power, and ease of use. The part operates at up to a 500 MSPS conversion rate and is optimized for outstanding dynamic performance in wideband carrier and broadband systems. All necessary functions, including a sample-and-hold and voltage reference, are included on the chip to provide a complete signal conversion solution. The VREF pin can be used to monitor the internal reference or provide an external voltage reference (external reference mode must be enabled through the SPI port). The ADC requires a 1.8 V analog voltage supply and a differential clock for full performance operation. The digital outputs are LVDS (ANSI-644) compatible and support twos complement, offset binary format, or Gray code. A data clock output is available for proper output data timing. Link: https://www.analog.com/media/en/technical-documentation/data-sheets/AD9434.pdf The driver supports the same register set as the AD9467, so the support for this chip is added to the 'ad9467' driver. Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200924080518.96410-3-alexandru.ardelean@analog.com commit 337dbb6ec1acc2e0c7f16b08ddd670faf204fcc8 Author: Alexandru Ardelean Date: Thu Sep 24 11:05:15 2020 +0300 iio: adc: ad9467: wrap a axi-adc chip-info into a ad9467_chip_info type There are 2 chip constants that can be added to the chip-info part. The default output-mode and the VREF mask. When adding new chips to this driver, these can be easily omitted, because these also need to be updated in 2 switch statements. However, if adding them in the chip-info constants, they are updated in a single place and propagated in both switch statements. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200924080518.96410-2-alexandru.ardelean@analog.com commit 25918a9c641c3c73ae94354605860c06fd73a05e Author: Alexandru Ardelean Date: Wed Sep 23 15:18:10 2020 +0300 iio: buffer-dmaengine: remove non managed alloc/free This is to encourage the use of devm_iio_dmaengine_buffer_alloc(). Currently the managed version of the DMAEngine buffer alloc is the only function used from this part of the framework. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200923121810.944075-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 57e5b8bfd633b9237f0072ef8faeef9545a61ea1 Author: Wang ShaoBo Date: Fri Sep 18 16:31:42 2020 +0800 iio: adc: stm32-dfsdm: Use devm_platform_get_and_ioremap_resource() Make use of devm_platform_get_and_ioremap_resource() provided by driver core platform instead of duplicated analogue, dev_err() is removed because it has been done in devm_ioremap_resource(). Signed-off-by: Wang ShaoBo Link: https://lore.kernel.org/r/20200918083142.32816-1-bobo.shaobowang@huawei.com Signed-off-by: Jonathan Cameron commit cbc4ca3525777f3934bd5684e8ec908135dcbcd4 Author: Wang ShaoBo Date: Fri Sep 18 16:28:37 2020 +0800 iio: adc: at91-sama5d2_adc: Use devm_platform_get_and_ioremap_resource() Make use of devm_platform_get_and_ioremap_resource() provided by driver core platform instead of duplicated analogue. Signed-off-by: Wang ShaoBo Link: https://lore.kernel.org/r/20200918082837.32610-1-bobo.shaobowang@huawei.com Signed-off-by: Jonathan Cameron commit 4c6e3dbc6b4877c77ea329f7ae813971854c035b Author: Krzysztof Kozlowski Date: Mon Sep 21 22:49:39 2020 +0200 iio: ssp: use PLATFORM_DEVID_NONE Use PLATFORM_DEVID_NONE define instead of "-1" value because: - it brings some meaning, - it might point attention why auto device ID was not used. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200921204939.20341-1-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 38e7e2213bfd221666ded01e3e6f15631cb67e34 Author: Michael Auchter Date: Tue Sep 22 09:44:21 2020 -0500 dt-bindings: iio: adc: ad7291: add binding Add device-tree binding for ADI AD7291 ADC. Signed-off-by: Michael Auchter Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200922144422.542669-2-michael.auchter@ni.com Signed-off-by: Jonathan Cameron commit 48404cf57852224c052e2e40d4dc50dd398c7a58 Author: Michael Auchter Date: Tue Sep 22 09:44:20 2020 -0500 iio: adc: ad7291: convert to device tree There are no in-tree users of the platform data for this driver, so remove it and convert the driver to use device tree instead. Signed-off-by: Michael Auchter Link: https://lore.kernel.org/r/20200922144422.542669-1-michael.auchter@ni.com Signed-off-by: Jonathan Cameron commit a3598d14dc571b484529956b33f3fdd9d2b2b97e Author: Alexandru Ardelean Date: Mon Sep 21 13:31:56 2020 +0300 iio: event: NULL-ify IIO device's event_interface ref during unregister Though we know that the iio_device_unregister_eventset() call is followed by the free-ing of the IIO device object, we should not make this assumption in the iio_device_unregister_eventset() function. It should allow for the clean unregistering of the event-set, allowing a re-register should we decide to implement this at some point later. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200921103156.194748-2-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit f2f45a53646fbe026f12f8b64be6a5def1591384 Author: Alexandru Ardelean Date: Mon Sep 21 13:31:55 2020 +0300 iio: event: use short-hand variable in iio_device_{un}register_eventset functions With the recent 'iio_dev_opaque' variable name, these two functions are looking a bit ugly. This change uses an 'ev_int' variable for the iio_device_{un}register_eventset functions to make the code a little easier to read. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200921103156.194748-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 32eb9d4116da3734ba22ebccd35bf08434abb201 Author: Jonathan Cameron Date: Sun Sep 20 14:54:36 2020 +0100 dt-bindings:iio:adc:amlogic,meson-saradc yaml conversion This binding is non trivial due to the range of different parts supported having several subtle quirks. Martin has helped clarify some of them. Note, I haven't restricted the amlogic,hhi-sysctrl to only be present on the relevant parts if nvmem stuff also is, but it would seem to be rather odd if it were otherwise. Perhaps we look to make this binding more restrictive at a later date. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Reviewed-by: Martin Blumenstingl Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Link: https://lore.kernel.org/r/20200920135436.199003-2-jic23@kernel.org commit 1f026587a57cfd62dd4495d8fb508edcf1453329 Author: Wang Qing Date: Tue Sep 22 19:06:56 2020 +0800 iio:light:gp2ap002 fix spelling typo in comments Change the comment typo: "definately" -> "definitely". Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1600772818-30882-1-git-send-email-wangqing@vivo.com Signed-off-by: Jonathan Cameron commit 9d3621525018dbff2795e2bab17572fd20431234 Merge: ad4fe1264b396 0b6bfad4cee4a Author: Mark Brown Date: Tue Sep 29 17:22:29 2020 +0100 Merge series "spi: dw: Add full Baikal-T1 SPI Controllers support" from Serge Semin : Originally I intended to merge a dedicated Baikal-T1 System Boot SPI Controller driver into the kernel and leave the DW APB SSI driver untouched. But after a long discussion (see the link at the bottom of the letter) Mark and Andy persuaded me to integrate what we developed there into the DW APB SSI core driver to be useful for another controllers, which may have got the same peculiarities/problems as ours: - No IRQ. - No DMA. - No GPIO CS, so a native CS is utilized. - small Tx/Rx FIFO depth. - Automatic CS assertion/de-assertion. - Slow system bus. All of them have been fixed in the framework of this patchset in some extent at least for the SPI memory operations. As I expected it wasn't that easy and the integration took that many patches as you can see from the subject. Though some of them are mere cleanups or weakly related with the subject fixes, but we just couldn't leave the code as is at some places since we were working with the DW APB SSI driver anyway. Here is what we did to fix the original DW APB SSI driver, to make it less messy. First two patches are just cleanups to simplify the DW APB SSI device initialization a bit. We suggest to discard the IRQ threshold macro as unused and use a ternary operator to initialize the set_cs callback instead of assigning-and-updating it. Then we've discovered that the n_bytes field of the driver private data is used by the DW APB SSI IRQ handler, which requires it to be initialized before the SMP memory barrier and to be visible from another CPUs. Speaking about the SMP memory barrier. Having one right after the shared resources initialization is enough and there is no point in using the spin-lock to protect the Tx/Rx buffer pointers. The protection functionality is redundant there by the driver design. (Though I have a doubt whether the SMP memory barrier is also required there because the normal IO-methods like readl/writel implies a full memory barrier. So any memory operations performed before them are supposed to be seen by devices and another CPUs. See the patch log for details of my concern.) Thirdly we've found out that there is some confusion in the IRQs masking/unmasking/clearing in the SPI-transfer procedure. Multiple interrupts are unmasked on the SPI-transfer initialization, but just TXEI is only masked back on completion. Similarly IRQ status isn't cleared on the controller reset, which actually makes the reset being not full and errors prone in the controller probe procedure. Another very important optimization is using the IO-relaxed accessors in the dw_read_io_reg()/dw_write_io_reg() methods. Since the Tx/Rx FIFO data registers are the most frequently accessible controller resource, using relaxed accessors there will significantly improve the data read/write performance. At least on Baikal-T1 SoC such modification opens up a way to have the DW APB SSI controller working with higher SPI bus speeds, than without it. Fifthly we've made an effort to cleanup the code using the SPI-device private data - chip_data. We suggest to remove the chip type from there since it isn't used and isn't implemented right anyway. Then instead of having a bus speed, clock divider, transfer mode preserved there, and recalculating the CR0 fields of the SPI-device-specific phase, polarity and frame format each time the SPI transfer is requested, we can save it in the chip_data instance. By doing so we'll make that structure finally used as it was supposed to by design (see the spi-fsl-dspi.c, spi-pl022.c, spi-pxa2xx.c drivers for examples). Sixthly instead of having the SPI-transfer specific CR0-update callback, we suggest to implement the DW APB SSI controller capabilities approach. By doing so we can now inject the vendor-specific peculiarities in different parts of the DW APB SSI core driver (which is required to implement both SPI-transfers and the SPI memory operations). This will also make the code less confusing like defining a callback in the core driver, setting it up in the glue layer, then calling it from the core driver again. Seeing the small capabilities implementation embedded in-situ is more readable than tracking the callbacks assignments. This will concern the CS-override, Keembay master setup, DW SSI-specific CR0 registers layout capabilities. Seventhly since there are going to be two types of the transfers implemented in the DW APB SSI core driver, we need a common method to set the controller configuration like, Tx/Rx-mode, bus speed, data frame size and number of data frames to read in case of the memory operations. So we just detached the corresponding code from the SPI-transfer-one method and made it to be a part of the new dw_spi_update_config() function, which is former update_cr0(). Note that the new method will be also useful for the glue drivers, which due to the hardware design need to create their own memory operations (for instance, for the dirmap-operations provided in the Baikal-T System Boot SPI controller driver). Eighthly it is the data IO procedure and IRQ-based SPI-transfer implementation refactoring. The former one will look much simpler if the buffers initial pointers and the buffers length data utilized instead of the Tx/Rx buffers start and end pointers. The later one currently lacks of valid execution at the final stage of the SPI-transfer. So if there is no data left to send, but there is still data which needs to be received, the Tx FIFO Empty IRQ will constantly happen until all of the requested inbound data is received. So we suggest to fix that by taking the Rx FIFO Empty IRQ into account. Ninthly it's potentially errors prone to enable the DW APB SSI interrupts before enabling the chip. It specifically concerns a case if for some reason the DW APB SSI IRQs handler is executed before the controller is enabled. That will cause a part of the outbound data loss. So we suggest to reverse the order. Tenthly in order to be able to pre-initialize the Tx FIFO with data and only the start the SPI memory operations we need to have any CS de-activated. We'll fulfil that requirement by explicitly clearing the CS on the SPI transfer completion and at the explicit controller reset. Then seeing all the currently available and potentially being created types of the SPI transfers need to perform the DW APB SSI controller status register check and the errors handler procedure, we've created a common method for all of them. Eleventhly if before we've mostly had a series of fixups, cleanups and refactorings, here we've finally come to the new functionality implementation. It concerns the poll-based transfer (as Baikal-T1 System Boot SPI controller lacks a dedicated IRQ lane connected) and the SPI memory operations implementation. If the former feature is pretty much straightforward (see the patch log for details), the later one is a bit tricky. It's based on the EEPROM-read (write-then-read) and the Tx-only modes of the DW APB SSI controller, which as performing the automatic data read and write let's us to implement the faster IO procedure than using the Tx-Rx-mode-based approach. Having the memory-operations implemented that way is the best thing we can currently do to provide the errors-less SPI transfers to SPI devices with native CS attached. Note the approach utilized here to develop the SPI memory operations can be also used to create the "automatic CS toggle problem"-free(ish) SPI transfers (combine SPI-message transfers into two buffers, disable interrupts, push-pull the combined data). But we don't provide a solution in the framework of this patchset. It is a matter of a dedicated one, which we currently don't intend to spend our time on. Finally at the closure of the this patchset you'll find patches, which provide the Baikal-T1-specific DW APB SSI controllers support. The SoC has got three SPI controllers. Two of them are pretty much normal DW APB SSI interfaces: with IRQ, DMA, FIFOs of 64 words depth, 4x CSs. But the third one as being a part of the Baikal-T1 System Boot Controller has got a very limited resources: no IRQ, no DMA, only a single native chip-select and Tx/Rx FIFOs with just 8 words depth available. In order to provide a transparent initial boot code execution the System Boot SPI Controller is also utilized by an vendor-specific IP-block, which exposes an SPI flash memory direct mapping interface. Please see the corresponding patch for details. Link: https://lore.kernel.org/linux-spi/20200508093621.31619-1-Sergey.Semin@baikalelectronics.ru/ [1] "LINUX KERNEL MEMORY BARRIERS", Documentation/memory-barriers.txt, Section "KERNEL I/O BARRIER EFFECTS" Signed-off-by: Serge Semin Cc: Alexey Malahov Cc: Ramil Zaripov Cc: Pavel Parkhomenko Cc: Andy Shevchenko Cc: Andy Shevchenko Cc: Lars Povlsen Cc: wuxu.wu Cc: Feng Tang Cc: Rob Herring Cc: linux-spi@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Serge Semin (30): spi: dw: Discard IRQ threshold macro spi: dw: Use ternary op to init set_cs callback spi: dw: Initialize n_bytes before the memory barrier Revert: spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls spi: dw: Clear IRQ status on DW SPI controller reset spi: dw: Disable all IRQs when controller is unused spi: dw: Use relaxed IO-methods to access FIFOs spi: dw: Discard DW SSI chip type storages spi: dw: Convert CS-override to DW SPI capabilities spi: dw: Add KeemBay Master capability spi: dw: Add DWC SSI capability spi: dw: Detach SPI device specific CR0 config method spi: dw: Update SPI bus speed in a config function spi: dw: Simplify the SPI bus speed config procedure spi: dw: Update Rx sample delay in the config function spi: dw: Add DW SPI controller config structure spi: dw: Refactor data IO procedure spi: dw: Refactor IRQ-based SPI transfer procedure spi: dw: Perform IRQ setup in a dedicated function spi: dw: Unmask IRQs after enabling the chip spi: dw: Discard chip enabling on DMA setup error spi: dw: De-assert chip-select on reset spi: dw: Explicitly de-assert CS on SPI transfer completion spi: dw: Move num-of retries parameter to the header file spi: dw: Add generic DW SSI status-check method spi: dw: Add memory operations support spi: dw: Introduce max mem-ops SPI bus frequency setting spi: dw: Add poll-based SPI transfers support dt-bindings: spi: dw: Add Baikal-T1 SPI Controllers spi: dw: Add Baikal-T1 SPI Controller glue driver .../bindings/spi/snps,dw-apb-ssi.yaml | 33 +- drivers/spi/Kconfig | 29 + drivers/spi/Makefile | 1 + drivers/spi/spi-dw-bt1.c | 339 +++++++++ drivers/spi/spi-dw-core.c | 642 ++++++++++++++---- drivers/spi/spi-dw-dma.c | 16 +- drivers/spi/spi-dw-mmio.c | 36 +- drivers/spi/spi-dw.h | 85 ++- 8 files changed, 960 insertions(+), 221 deletions(-) create mode 100644 drivers/spi/spi-dw-bt1.c -- 2.27.0 commit 0b6bfad4cee4a3d5c49e01fa00284db4b676360e Author: Serge Semin Date: Sun Sep 20 14:28:48 2020 +0300 spi: spi-dw: Remove extraneous locking There is no point in having the commit 19b61392c5a8 ("spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls") applied. The commit author made an assumption that the problem with the rx data mismatch was due to the lack of the data protection. While most likely it was caused by the lack of the memory barrier. So having the commit bfda044533b2 ("spi: dw: use "smp_mb()" to avoid sending spi data error") applied would be enough to fix the problem. Indeed the spin unlock operation makes sure each memory operation issued before the release will be completed before it's completed. In other words it works as an implicit one way memory barrier. So having both smp_mb() and the spin_unlock_irqrestore() here is just redundant. One of them would be enough. It's better to leave the smp_mb() since the Tx/Rx buffers consistency is provided by the data transfer algorithm implementation: first we initialize the buffers pointers, then make sure the assignments are visible by the other CPUs by calling the smp_mb(), only after that enable the interrupt, which handler uses the buffers. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112914.26501-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit ffb7ca54c95b4c76ad8a9aa1b2b16d61df2a7139 Author: Serge Semin Date: Sun Sep 20 14:28:54 2020 +0300 spi: dw: Add KeemBay Master capability In a further commit we'll have to get rid of the update_cr0() callback and define a DW SSI capability instead. Since Keem Bay master/slave functionality is controller by the CTRL0 register bitfield, we need to first move the master mode selection into the internal corresponding update_cr0 method, which would be activated by means of the dedicated DW_SPI_CAP_KEEMBAY_MST capability setup. Note this will be also useful if the driver will be ever altered to support the DW SPI slave interface. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112914.26501-11-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit cc760f3143f53ea8387cd76cffc43bdc89db9df4 Author: Serge Semin Date: Sun Sep 20 14:28:53 2020 +0300 spi: dw: Convert CS-override to DW SPI capabilities There are several vendor-specific versions of the DW SPI controllers, each of which may have some peculiarities with respect to the original IP-core. Seeing it has already caused adding flags and a callback into the DW SPI private data, let's introduce a generic capabilities interface to tune the generic DW SPI controller driver up in accordance with the particular controller specifics. It's done by converting a simple Alpine-specific CS-override capability into the DW SPI controller capability activated by setting the DW_SPI_CAP_CS_OVERRIDE flag. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112914.26501-10-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 675e7c9d71cedee3988b554c47971be77e72d2db Author: Serge Semin Date: Sun Sep 20 14:28:52 2020 +0300 spi: dw: Discard DW SSI chip type storages Keeping SPI peripheral devices type is pointless since first it hasn't been functionally utilized by any of the client drivers/code and second it won't work for Microwire type at the very least. Moreover there is no point in setting up the type by means of the chip-data in the modern kernel. The peripheral devices with specific interface type need to be detected in order to activate the corresponding frame format. It most likely will require some peripheral device specific DT property or whatever to find out the interface protocol. So let's remove the serial interface type fields from the DW APB SSI controller and the SPI peripheral device private data. Note we'll preserve the explicit SSI_MOTO_SPI interface type setting up to signify the only currently supported interface protocol. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112914.26501-9-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 7e31cea7d1e0f4b683dc45c21530cd3ee82559b4 Author: Serge Semin Date: Sun Sep 20 14:28:51 2020 +0300 spi: dw: Use relaxed IO-methods to access FIFOs In accordance with [1] the relaxed methods are guaranteed to be ordered with respect to other accesses from the same CPU thread to the same peripheral. This is what we need during the data read/write from/to the controller FIFOs being executed within a single IRQ handler or a kernel task. Such optimization shall significantly speed the data reader and writer up. For instance, the relaxed IO-accessors utilization on Baikal-T1 lets the driver to support the SPI memory operations with bus frequency three-fold faster than if normal IO-accessors would be used. [1] "LINUX KERNEL MEMORY BARRIERS", Documentation/memory-barriers.txt, Section "KERNEL I/O BARRIER EFFECTS" Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112914.26501-8-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit a1d5aa6f7f97b15e8fd917169239088823471741 Author: Serge Semin Date: Sun Sep 20 14:28:50 2020 +0300 spi: dw: Disable all IRQs when controller is unused It's a good practice to disable all IRQs if a device is fully unused. In our case it is supposed to be done before requesting the IRQ and after the last byte of an SPI transfer is received. In the former case it's required to prevent the IRQ handler invocation before the driver data is fully initialized (which may happen if the IRQs status has been left uncleared before the device is probed). So we just moved the spi_hw_init() method invocation to the earlier stage before requesting the IRQ. In the later case there is just no point in having any of the IRQs enabled between SPI transfers and when there is no SPI message currently being processed. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112914.26501-7-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit a128f6ecd56a32e559889145003425b0c7d406e3 Author: Serge Semin Date: Sun Sep 20 14:28:49 2020 +0300 spi: dw: Clear IRQ status on DW SPI controller reset It turns out the IRQ status isn't cleared after switching the controller off and getting it back on, which may cause raising false error interrupts if controller has been unsuccessfully used by, for instance, a bootloader before the driver is loaded. Let's explicitly clear the interrupts status in the dedicated controller reset method. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112914.26501-6-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 8225c1c9a073c323f68833d136fcf94fbc75a275 Author: Serge Semin Date: Sun Sep 20 14:28:47 2020 +0300 spi: dw: Initialize n_bytes before the memory barrier Since n_bytes field of the DW SPI private data is also utilized by the IRQ handler, we need to make sure it' initialization is done before the memory barrier. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112914.26501-4-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 07918df724f2fed02327e3cbfe58a5d5568b2cc2 Author: Serge Semin Date: Sun Sep 20 14:28:45 2020 +0300 spi: dw: Discard IRQ threshold macro The macro has been unused since a half of FIFO length was defined to be a marker of the IRQ. Let's remove it definition. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112914.26501-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit adfc694330d36974f2cba794d54109d42950da36 Author: Jaegeuk Kim Date: Wed Sep 23 00:54:50 2020 -0700 f2fs: fix slab leak of rpages pointer This fixes the below mem leak. [ 130.157600] ============================================================================= [ 130.159662] BUG f2fs_page_array_entry-252:16 (Tainted: G W O ): Objects remaining in f2fs_page_array_entry-252:16 on __kmem_cache_shutdown() [ 130.162742] ----------------------------------------------------------------------------- [ 130.162742] [ 130.164979] Disabling lock debugging due to kernel taint [ 130.166188] INFO: Slab 0x000000009f5a52d2 objects=22 used=4 fp=0x00000000ba72c3e9 flags=0xfffffc0010200 [ 130.168269] CPU: 7 PID: 3560 Comm: umount Tainted: G B W O 5.9.0-rc4+ #35 [ 130.170019] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1 04/01/2014 [ 130.171941] Call Trace: [ 130.172528] dump_stack+0x74/0x9a [ 130.173298] slab_err+0xb7/0xdc [ 130.174044] ? kernel_poison_pages+0xc0/0xc0 [ 130.175065] ? on_each_cpu_cond_mask+0x48/0x90 [ 130.176096] __kmem_cache_shutdown.cold+0x34/0x141 [ 130.177190] kmem_cache_destroy+0x59/0x100 [ 130.178223] f2fs_destroy_page_array_cache+0x15/0x20 [f2fs] [ 130.179527] f2fs_put_super+0x1bc/0x380 [f2fs] [ 130.180538] generic_shutdown_super+0x72/0x110 [ 130.181547] kill_block_super+0x27/0x50 [ 130.182438] kill_f2fs_super+0x76/0xe0 [f2fs] [ 130.183448] deactivate_locked_super+0x3b/0x80 [ 130.184456] deactivate_super+0x3e/0x50 [ 130.185363] cleanup_mnt+0x109/0x160 [ 130.186179] __cleanup_mnt+0x12/0x20 [ 130.187003] task_work_run+0x70/0xb0 [ 130.187841] exit_to_user_mode_prepare+0x18f/0x1b0 [ 130.188917] syscall_exit_to_user_mode+0x31/0x170 [ 130.189989] do_syscall_64+0x45/0x90 [ 130.190828] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 130.191986] RIP: 0033:0x7faf868ea2eb [ 130.192815] Code: 7b 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 90 f3 0f 1e fa 31 f6 e9 05 00 00 00 0f 1f 44 00 00 f3 0f 1e fa b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 75 7b 0c 00 f7 d8 64 89 01 [ 130.196872] RSP: 002b:00007fffb7edb478 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 [ 130.198494] RAX: 0000000000000000 RBX: 00007faf86a18204 RCX: 00007faf868ea2eb [ 130.201021] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000055971df71c50 [ 130.203415] RBP: 000055971df71a40 R08: 0000000000000000 R09: 00007fffb7eda1f0 [ 130.205772] R10: 00007faf86a04339 R11: 0000000000000246 R12: 000055971df71c50 [ 130.208150] R13: 0000000000000000 R14: 000055971df71b38 R15: 0000000000000000 [ 130.210515] INFO: Object 0x00000000a980843a @offset=744 [ 130.212476] INFO: Allocated in page_array_alloc+0x3d/0xe0 [f2fs] age=1572 cpu=0 pid=3297 [ 130.215030] __slab_alloc+0x20/0x40 [ 130.216566] kmem_cache_alloc+0x2a0/0x2e0 [ 130.218217] page_array_alloc+0x3d/0xe0 [f2fs] [ 130.219940] f2fs_init_compress_ctx+0x1f/0x40 [f2fs] [ 130.221736] f2fs_write_cache_pages+0x3db/0x860 [f2fs] [ 130.223591] f2fs_write_data_pages+0x2c9/0x300 [f2fs] [ 130.225414] do_writepages+0x43/0xd0 [ 130.226907] __filemap_fdatawrite_range+0xd5/0x110 [ 130.228632] filemap_write_and_wait_range+0x48/0xb0 [ 130.230336] __generic_file_write_iter+0x18a/0x1d0 [ 130.232035] f2fs_file_write_iter+0x226/0x550 [f2fs] [ 130.233737] new_sync_write+0x113/0x1a0 [ 130.235204] vfs_write+0x1a6/0x200 [ 130.236579] ksys_write+0x67/0xe0 [ 130.237898] __x64_sys_write+0x1a/0x20 [ 130.239309] do_syscall_64+0x38/0x90 Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 519a5a2f37b850f4eb86674a10d143088670a390 Author: Chao Yu Date: Fri Sep 18 11:03:49 2020 +0800 f2fs: compress: fix to disallow enabling compress on non-empty file Compressed inode and normal inode has different layout, so we should disallow enabling compress on non-empty file to avoid race condition during inode .i_addr array parsing and updating. Signed-off-by: Chao Yu [Jaegeuk Kim: Fix missing condition] Signed-off-by: Jaegeuk Kim commit c68d6c8830225089c185bc5945b49afcb2e01cbf Author: Chao Yu Date: Mon Sep 14 17:05:14 2020 +0800 f2fs: compress: introduce cic/dic slab cache Add two slab caches: "f2fs_cic_entry" and "f2fs_dic_entry" for memory allocation of compress_io_ctx and decompress_io_ctx structure. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 31083031709eea6530f0551d59eecdb2e68265ef Author: Chao Yu Date: Mon Sep 14 17:05:13 2020 +0800 f2fs: compress: introduce page array slab cache Add a per-sbi slab cache "f2fs_page_array_entry-%u:%u" for memory allocation of page pointer array in compress context. Signed-off-by: Chao Yu [Jaegeuk Kim: Fix wrong memory allocation] Signed-off-by: Jaegeuk Kim commit d4f40a1fb9838edef9c343ffe9a5009c41f20f6d Author: Leon Romanovsky Date: Sat Sep 26 13:24:50 2020 +0300 RDMA/i40iw: Remove intermediate pointer that points to the same struct There is no real need to have an intermediate pointer for the same struct, remove it, and use struct directly. Link: https://lore.kernel.org/r/20200926102450.2966017-11-leon@kernel.org Acked-by: Shiraz Saleem Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 21c2fe94abb2abe894e6aabe6b4e84a255c8d339 Author: Leon Romanovsky Date: Sat Sep 26 13:24:49 2020 +0300 RDMA/mthca: Combine special QP struct with mthca QP As preparation for the removal of QP allocation logic, we need to ensure that ib_core allocates the right amount of memory before a call to the driver create_qp(). It requires from driver to have the same structs for all types of QPs. Link: https://lore.kernel.org/r/20200926102450.2966017-10-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b925c555a15de8443ecb2e147b54b1bbe9b71fe3 Author: Leon Romanovsky Date: Sat Sep 26 13:24:48 2020 +0300 RDMA/drivers: Remove udata check from special QP GSI QP can't be created from the user space, hence the udata check is always false (udata == NULL). Remove that check and simplify the flow. Link: https://lore.kernel.org/r/20200926102450.2966017-9-leon@kernel.org Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5807bb32055bb8badc44bf835ebc376415cd0a17 Author: Leon Romanovsky Date: Sat Sep 26 13:24:47 2020 +0300 RDMA/core: Align write and ioctl checks of QP types The ioctl flow checks that the user provides only a supported list of QP types, while write flow didn't do it and relied on the driver to check it. Align those flows to fail as early as possible. Link: https://lore.kernel.org/r/20200926102450.2966017-8-leon@kernel.org Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 8fd3cd2ae5a09ca1caed4b3990e084cb95bf55af Author: Leon Romanovsky Date: Sat Sep 26 13:24:46 2020 +0300 RDMA/mlx4: Prepare QP allocation to remove from the driver Since all mlx4 QP have same storage type, move the QP allocation to be in one place. This change is preparation to removal of such allocation from the driver. Link: https://lore.kernel.org/r/20200926102450.2966017-7-leon@kernel.org Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 915ec7ed911493cea996f132d2629f44b7a1770d Author: Leon Romanovsky Date: Sat Sep 26 13:24:45 2020 +0300 RDMA/mlx4: Embed GSI QP into general mlx4_ib QP Refactor the storage struct of mlx4 GSI QP to be embedded in mlx4_ib QP. This allows to remove internal memory allocation of QP struct which is hidden inside the mlx4_ib_create_qp() flow. Link: https://lore.kernel.org/r/20200926102450.2966017-6-leon@kernel.org Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit eebe580feb5b8ff1322ee5f35312a9f04932c24e Author: Leon Romanovsky Date: Sat Sep 26 13:24:44 2020 +0300 RDMA/mlx5: Delete not needed GSI QP signal QP type GSI QP doesn't need signal QP type because it is initialized statically to zero, which is IB_SIGNAL_ALL_WR also wr->send_flags isn't set too. This means that the GSI QP signal QP type can be removed. Link: https://lore.kernel.org/r/20200926102450.2966017-5-leon@kernel.org Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2dc4d6725bc24e992de7fc689d8437ae3250b86f Author: Leon Romanovsky Date: Sat Sep 26 13:24:43 2020 +0300 RDMA/mlx5: Change GSI QP to have same creation flow like other QPs There is no reason to have separate create flow for the GSI QP, while general create_qp routine has all needed checks and ability to allocate and free the proper struct mlx5_ib_qp. Link: https://lore.kernel.org/r/20200926102450.2966017-4-leon@kernel.org Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f8225e3488dceffedbecdb658c1429c79645da4a Author: Leon Romanovsky Date: Sat Sep 26 13:24:42 2020 +0300 RDMA/mlx5: Reuse existing fields in parent QP storage object Remove duplication of mlx5_ib_qp and mlx5_ib_gsi_qp fields. This change returns the memory footprint of mlx5_ib QP to be as it was before embedding GSI QP. Link: https://lore.kernel.org/r/20200926102450.2966017-3-leon@kernel.org Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0d9aef8603778ec0cf46736d07e466f29ea377a2 Author: Leon Romanovsky Date: Sat Sep 26 13:24:41 2020 +0300 RDMA/mlx5: Embed GSI QP into general mlx5_ib QP The GSI QPs have different create flow from the regular QPs, but it is not really needed. Update the code to use mlx5_ib_qp as a storage class for all outside of GSI calls. Link: https://lore.kernel.org/r/20200926102450.2966017-2-leon@kernel.org Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit dbc888072a976c2a7f74ad2df1ca3e6894f96002 Author: Liu Shixin Date: Mon Sep 14 14:54:00 2020 +0800 extcon: axp288: Use module_platform_driver to simplify the code module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin Reviewed-by: Hans de Goede Signed-off-by: Chanwoo Choi commit 6be65ed4f86aa7c4ba5c0193202d563f098e783f Author: Krzysztof Kozlowski Date: Wed Sep 9 17:01:29 2020 +0200 extcon: ptn5150: Do not print error during probe if nothing is attached The commit 85256f611f66 ("extcon: ptn5150: Check current USB mode when probing") reused code for checking CC status register in the probe path to determine what is initially connected. However if nothing is connected, the CC status register will have 0x0 value and print an error message: ptn5150 1-003d: Unknown Port status : 0 This is not an error. Also any other unknown port status values are not really errors but unhandled cases. Fixes: 85256f611f66 ("extcon: ptn5150: Check current USB mode when probing") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit ad4fe1264b396e94b78d91c49ecea425a593b28d Author: Serge Semin Date: Sun Sep 20 14:23:22 2020 +0300 spi: dw-dma: Add one-by-one SG list entries transfer In case if at least one of the requested DMA engine channels doesn't support the hardware accelerated SG list entries traverse, the DMA driver will most likely work that around by performing the IRQ-based SG list entries resubmission. That might and will cause a problem if the DMA Tx channel is recharged and re-executed before the Rx DMA channel. Due to non-deterministic IRQ-handler execution latency the DMA Tx channel will start pushing data to the SPI bus before the Rx DMA channel is even reinitialized with the next inbound SG list entry. By doing so the DMA Tx channel will implicitly start filling the DW APB SSI Rx FIFO up, which while the DMA Rx channel being recharged and re-executed will eventually be overflown. In order to solve the problem we have to feed the DMA engine with SG list entries one-by-one. It shall keep the DW APB SSI Tx and Rx FIFOs synchronized and prevent the Rx FIFO overflow. Since in general the SPI tx_sg and rx_sg lists may have different number of entries of different lengths (though total length should match) we virtually split the SG-lists to the set of DMA transfers, which length is a minimum of the ordered SG-entries lengths. The solution described above is only executed if a full-duplex SPI transfer is requested and the DMA engine hasn't provided channels with hardware accelerated SG list traverse capability to handle both SG lists at once. Signed-off-by: Serge Semin Suggested-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200920112322.24585-12-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 917ce29ef559630cfeaea5b05f93d8744a6e9d97 Author: Serge Semin Date: Sun Sep 20 14:23:21 2020 +0300 spi: dw-dma: Pass exact data to the DMA submit and wait methods In order to use the DMA submission and waiting methods in both generic DMA-based SPI transfer and one-by-one DMA SG entries transmission functions, we need to modify the dw_spi_dma_wait() and dw_spi_dma_submit_tx()/dw_spi_dma_submit_rx() prototypes. So instead of getting the SPI transfer object as the second argument they must accept the exact data structure instances they imply to use. Those are the current transfer length and the SPI bus frequency in case of dw_spi_dma_wait(), and SG list together with number of list entries in case of the DMA Tx/Rx submission methods. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112322.24585-11-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 945b5b60f7110a81d1fd8145b197793edef3282d Author: Serge Semin Date: Sun Sep 20 14:23:20 2020 +0300 spi: dw-dma: Move DMAC register cleanup to DMA transfer method DW APB SSI DMA driver doesn't use the native SPI core wait API since commit bdbdf0f06337 ("spi: dw: Locally wait for the DMA transfers completion"). Due to that the driver can now clear the DMAC register in a single place synchronously with the DMA transactions completion or failure. After that all the possible code paths are still covered: 1) DMA completion callbacks are executed in case if the corresponding DMA transactions are finished. When they are, one of them will eventually wake the SPI messages pump kernel thread and dw_spi_dma_transfer_all() method will clean the DMAC register as implied by this patch. 2) dma_stop is called when the SPI core detects an error either returned from the transfer_one() callback or set in the SPI message status field. Both types of errors will be noticed by the dw_spi_dma_transfer_all() method. 3) dma_exit is called when either SPI controller driver or the corresponding device is removed. In any case the SPI core will first flush the SPI messages pump kernel thread, so any pending or in-fly SPI transfers will be finished before that. Due to all of that let's simplify the DW APB SSI DMA driver a bit and move the DMAC register cleanup to a single place in the dw_spi_dma_transfer_all() method. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112322.24585-10-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit b86fed121fe6bf5bcac1c258472791ca352f47cf Author: Serge Semin Date: Sun Sep 20 14:23:19 2020 +0300 spi: dw-dma: Detach DMA transfer into a dedicated method In order to add an alternative method of DMA-based SPI transfer first we need to detach the currently available one from the common code. Here we move the normal DMA-based SPI transfer execution functionality into a dedicated method. It will be utilized if either the DMA engine supports an unlimited number SG entries or Tx-only SPI transfer is requested. But currently just use it for any SPI transfer. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112322.24585-9-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 7a4d61f1dc94871154b2d06d671a5c20aea16ff2 Author: Serge Semin Date: Sun Sep 20 14:23:18 2020 +0300 spi: dw-dma: Remove DMA Tx-desc passing around It's pointless to pass the Rx and Tx transfers DMA Tx-descriptors, since they are used in the Tx/Rx submit method only. Instead just return the submission status from these methods. This alteration will make the code less complex. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112322.24585-8-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 9a6471a1a2c24964838a5bfa4d374e644e9daf07 Author: Serge Semin Date: Sun Sep 20 14:23:17 2020 +0300 spi: dw-dma: Check DMA Tx-desc submission status We suggest to add the dmaengine_submit() return value test for errors. It has been unnecessary while the driver was expected to be utilized in pair with DW DMAC. But since now the driver can be used with any DMA engine, it might be useful to track the errors on DMA submissions so not miss them and get into an unpredictable driver behaviour. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112322.24585-7-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit ab7a4d758b278fe44ded648e731c0638b6fa7fd3 Author: Serge Semin Date: Sun Sep 20 14:23:16 2020 +0300 spi: dw-dma: Move DMA transfers submission to the channels prep methods Indeed we can freely move the dmaengine_submit() method invocation and the Tx and Rx busy flag setting into the DMA Tx/Rx prepare methods. Since the Tx/Rx preparation method is now mainly used for the DMA transfers submission, here we suggest to rename it to have the _submit_{r,t}x suffix instead. By having this alteration applied first we implement another code preparation before adding the one-by-one DMA SG entries transmission, second we now have the dma_async_tx_descriptor descriptor used locally only in the new DMA transfers submission methods (this will be cleaned up a bit later), third we make the generic transfer method more readable, where now the functionality of submission, execution and wait procedures is transparently split up instead of having a preparation, intermixed submission/execution and wait procedures. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112322.24585-6-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit be3034d9f9f3ea28588932d10bba6d06b71489a7 Author: Serge Semin Date: Sun Sep 20 14:23:15 2020 +0300 spi: dw-dma: Check rx_buf availability in the xfer method Checking rx_buf for being NULL and returning NULL from the Rx-channel preparation method doesn't let us to distinguish that situation from errors happening during the Rx SG-list preparation. So it's better to make sure that the rx_buf not-NULL and full-duplex communication is requested prior calling the Rx preparation method. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112322.24585-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit a874d811f0c2d285fd7409b5fc569c454c05c835 Author: Serge Semin Date: Sun Sep 20 14:23:14 2020 +0300 spi: dw-dma: Configure the DMA channels in dma_setup Mainly this is a preparation patch before adding one-by-one DMA SG entries transmission. But logically the Tx and Rx DMA channels setup should be performed in the dma_setup() callback anyway. So we'll move the DMA slave channels src/dst burst lengths, address and address width configuration from the Tx/Rx channels preparation methods to the dedicated functions and then make sure it's called at the DMA setup stage. Note we now make sure the return value of the dmaengine_slave_config() method doesn't indicate an error. It has been unnecessary in case if Dw DMAC is utilized as a DMA engine, since its device_config() callback always returns zero (though it might change in future). But since DW APB SSI driver now supports any DMA back-end we must make sure the DMA device configuration has been successful before proceeding with further setups. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112322.24585-4-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 7ef30385b05fa8bc13f473c9b0b3ecc7dfb2b208 Author: Serge Semin Date: Sun Sep 20 14:23:13 2020 +0300 spi: dw-dma: Fail DMA-based transfer if no Tx-buffer specified Since commit 46164fde6b78 ("spi: dw: Fix Rx-only DMA transfers") if DMA interface is enabled, then Tx-buffer must be available in each SPI transfer. It's required since in order to activate the incoming data reception either DMA or CPU must be pushing data out to the SPI bus. But the DW APB SSI DMA driver code is still left in state as if Tx-buffer might be optional, which is no longer true. Let's fix it so an error would be returned if no Tx-buffer detected and DMA Tx would be always enabled. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112322.24585-3-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 01ddbbb0b0af255d93b279f83c4ff91d494397d9 Author: Serge Semin Date: Sun Sep 20 14:23:12 2020 +0300 spi: dw-dma: Set DMA Level registers on init Indeed the registers content doesn't get cleared when the SPI controller is disabled and enabled. Max burst lengths aren't changed since the Rx and Tx DMA channels are requested on init stage and are kept acquired until the device is removed. Obviously SPI controller FIFO depth can't be changed. Due to all of that we can safely move the DMA Transmit and Receive data level registers initialization to the SPI controller DMA init stage (when the SPI controller is being probed) instead of doing it for each SPI transfer when dma_setup is called. This shall speed the DMA-based SPI transfer initialization up a bit, particularly if the APB bus is relatively slow. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200920112322.24585-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit e2eae09939a89e0994f7965ba3c676a5eac8b4b0 Author: Yu Kuai Date: Tue Sep 29 09:40:37 2020 +0800 iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate() if of_find_device_by_node() succeed, qcom_iommu_of_xlate() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: 0ae349a0f33f ("iommu/qcom: Add qcom_iommu") Acked-by: Rob Clark Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20200929014037.2436663-1-yukuai3@huawei.com Signed-off-by: Will Deacon commit 44ac6b829c4e173fdf6df18e6dd86aecf9a3dc99 Author: Jan Kara Date: Fri Sep 25 14:53:08 2020 +0200 udf: Limit sparing table size Although UDF standard allows it, we don't support sparing table larger than a single block. Check it during mount so that we don't try to access memory beyond end of buffer. Reported-by: syzbot+9991561e714f597095da@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit 382a2287bf9cd283206764572f66ab12657218aa Author: Jan Kara Date: Fri Sep 25 12:29:54 2020 +0200 udf: Remove pointless union in udf_inode_info We use only a single member out of the i_ext union in udf_inode_info. Just remove the pointless union. Signed-off-by: Jan Kara commit 044e2e26f214e5ab26af85faffd8d1e4ec066931 Author: Jan Kara Date: Fri Sep 25 12:14:03 2020 +0200 udf: Avoid accessing uninitialized data on failed inode read When we fail to read inode, some data accessed in udf_evict_inode() may be uninitialized. Move the accesses to !is_bad_inode() branch. Reported-by: syzbot+91f02b28f9bb5f5f1341@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit 780c083a8f840ca9162c7a4090ff5e10d15152a2 Author: Will Deacon Date: Mon Sep 28 14:03:00 2020 +0100 arm64: Add support for PR_SPEC_DISABLE_NOEXEC prctl() option The PR_SPEC_DISABLE_NOEXEC option to the PR_SPEC_STORE_BYPASS prctl() allows the SSB mitigation to be enabled only until the next execve(), at which point the state will revert back to PR_SPEC_ENABLE and the mitigation will be disabled. Add support for PR_SPEC_DISABLE_NOEXEC on arm64. Reported-by: Anthony Steinhauser Signed-off-by: Will Deacon commit 5c8b0cbd9d6bac5f40943b5a7d8eac8cb86cbe7f Author: Will Deacon Date: Mon Sep 28 14:06:50 2020 +0100 arm64: Pull in task_stack_page() to Spectre-v4 mitigation code The kbuild robot reports that we're relying on an implicit inclusion to get a definition of task_stack_page() in the Spectre-v4 mitigation code, which is not always in place for some configurations: | arch/arm64/kernel/proton-pack.c:329:2: error: implicit declaration of function 'task_stack_page' [-Werror,-Wimplicit-function-declaration] | task_pt_regs(task)->pstate |= val; | ^ | arch/arm64/include/asm/processor.h:268:36: note: expanded from macro 'task_pt_regs' | ((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1) | ^ | arch/arm64/kernel/proton-pack.c:329:2: note: did you mean 'task_spread_page'? Add the missing include to fix the build error. Fixes: a44acf477220 ("arm64: Move SSBD prctl() handler alongside other spectre mitigation code") Reported-by: Anthony Steinhauser Reported-by: kernel test robot Link: https://lore.kernel.org/r/202009260013.Ul7AD29w%lkp@intel.com Signed-off-by: Will Deacon commit 9ef2b48be9bba70ded9372fc81e678e707306060 Author: Will Deacon Date: Mon Sep 28 11:45:24 2020 +0100 KVM: arm64: Allow patching EL2 vectors even with KASLR is not enabled Patching the EL2 exception vectors is integral to the Spectre-v2 workaround, where it can be necessary to execute CPU-specific sequences to nobble the branch predictor before running the hypervisor text proper. Remove the dependency on CONFIG_RANDOMIZE_BASE and allow the EL2 vectors to be patched even when KASLR is not enabled. Fixes: 7a132017e7a5 ("KVM: arm64: Replace CONFIG_KVM_INDIRECT_VECTORS with CONFIG_RANDOMIZE_BASE") Reported-by: kernel test robot Link: https://lore.kernel.org/r/202009221053.Jv1XsQUZ%lkp@intel.com Signed-off-by: Will Deacon commit 31c84d6c9cde673b3866972552ec52e4c522b4fa Author: Marc Zyngier Date: Fri Sep 18 14:11:25 2020 +0100 arm64: Get rid of arm64_ssbd_state Out with the old ghost, in with the new... Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit d63d975a71b332df36cc802e6e77a462af6b9fef Author: Marc Zyngier Date: Fri Sep 18 14:08:54 2020 +0100 KVM: arm64: Convert ARCH_WORKAROUND_2 to arm64_get_spectre_v4_state() Convert the KVM WA2 code to using the Spectre infrastructure, making the code much more readable. It also allows us to take SSBS into account for the mitigation. Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit 7311467702710cc30ac4e3a6c6670a766e7667f9 Author: Marc Zyngier Date: Fri Sep 18 13:59:32 2020 +0100 KVM: arm64: Get rid of kvm_arm_have_ssbd() kvm_arm_have_ssbd() is now completely unused, get rid of it. Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit 29e8910a566aad3ee72f729e45842858d51ced8d Author: Marc Zyngier Date: Fri Sep 18 12:25:40 2020 +0100 KVM: arm64: Simplify handling of ARCH_WORKAROUND_2 Owing to the fact that the host kernel is always mitigated, we can drastically simplify the WA2 handling by keeping the mitigation state ON when entering the guest. This means the guest is either unaffected or not mitigated. This results in a nice simplification of the mitigation space, and the removal of a lot of code that was never really used anyway. Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit c28762070ca651fe7a981b8f31d972c9b7d2c386 Author: Will Deacon Date: Fri Sep 18 11:54:33 2020 +0100 arm64: Rewrite Spectre-v4 mitigation code Rewrite the Spectre-v4 mitigation handling code to follow the same approach as that taken by Spectre-v2. For now, report to KVM that the system is vulnerable (by forcing 'ssbd_state' to ARM64_SSBD_UNKNOWN), as this will be cleared up in subsequent steps. Signed-off-by: Will Deacon commit 9e78b659b4539ee20fd0c415cf8c231cea59e9c0 Author: Will Deacon Date: Fri Sep 18 11:45:57 2020 +0100 arm64: Move SSBD prctl() handler alongside other spectre mitigation code As part of the spectre consolidation effort to shift all of the ghosts into their own proton pack, move all of the horrible SSBD prctl() code out of its own 'ssbd.c' file. Signed-off-by: Will Deacon commit 9b0955baa4208abd72840c13c5f56a0f133c7cb3 Author: Will Deacon Date: Tue Sep 15 23:00:31 2020 +0100 arm64: Rename ARM64_SSBD to ARM64_SPECTRE_V4 In a similar manner to the renaming of ARM64_HARDEN_BRANCH_PREDICTOR to ARM64_SPECTRE_V2, rename ARM64_SSBD to ARM64_SPECTRE_V4. This isn't _entirely_ accurate, as we also need to take into account the interaction with SSBS, but that will be taken care of in subsequent patches. Signed-off-by: Will Deacon commit 532d581583f25d4c297c721700f74b913f8cf37b Author: Will Deacon Date: Tue Sep 15 23:56:12 2020 +0100 arm64: Treat SSBS as a non-strict system feature If all CPUs discovered during boot have SSBS, then spectre-v4 will be considered to be "mitigated". However, we still allow late CPUs without SSBS to be onlined, albeit with a "SANITY CHECK" warning. This is problematic for userspace because it means that the system can quietly transition to "Vulnerable" at runtime. Avoid this by treating SSBS as a non-strict system feature: if all of the CPUs discovered during boot have SSBS, then late arriving secondaries better have it as well. Signed-off-by: Will Deacon commit a8de949893880a26458de03f5bc70075aba13d95 Author: Will Deacon Date: Tue Sep 15 22:20:35 2020 +0100 arm64: Group start_thread() functions together The is_ttbrX_addr() functions have somehow ended up in the middle of the start_thread() functions, so move them out of the way to keep the code readable. Signed-off-by: Will Deacon commit e1026237f90677fd5a454f63057a62f984c2188d Author: Marc Zyngier Date: Wed Sep 16 00:07:05 2020 +0100 KVM: arm64: Set CSV2 for guests on hardware unaffected by Spectre-v2 If the system is not affected by Spectre-v2, then advertise to the KVM guest that it is not affected, without the need for a safelist in the guest. Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit d4647f0a2ad711101067cba69c34716758aa1e48 Author: Will Deacon Date: Tue Sep 15 23:30:17 2020 +0100 arm64: Rewrite Spectre-v2 mitigation code The Spectre-v2 mitigation code is pretty unwieldy and hard to maintain. This is largely due to it being written hastily, without much clue as to how things would pan out, and also because it ends up mixing policy and state in such a way that it is very difficult to figure out what's going on. Rewrite the Spectre-v2 mitigation so that it clearly separates state from policy and follows a more structured approach to handling the mitigation. Signed-off-by: Will Deacon commit 455697adefdb8604cd10413da37c60014aecbbb7 Author: Will Deacon Date: Tue Sep 15 23:10:49 2020 +0100 arm64: Introduce separate file for spectre mitigations and reporting The spectre mitigation code is spread over a few different files, which makes it both hard to follow, but also hard to remove it should we want to do that in future. Introduce a new file for housing the spectre mitigations, and populate it with the spectre-v1 reporting code to start with. Signed-off-by: Will Deacon commit 688f1e4b6d8f792c44bec3a448664fd9e8949964 Author: Will Deacon Date: Tue Sep 15 23:00:31 2020 +0100 arm64: Rename ARM64_HARDEN_BRANCH_PREDICTOR to ARM64_SPECTRE_V2 For better or worse, the world knows about "Spectre" and not about "Branch predictor hardening". Rename ARM64_HARDEN_BRANCH_PREDICTOR to ARM64_SPECTRE_V2 as part of moving all of the Spectre mitigations into their own little corner. Signed-off-by: Will Deacon commit b181048f414668933c524fe077b9aa6e8e9a42b4 Author: Will Deacon Date: Tue Sep 15 22:42:07 2020 +0100 KVM: arm64: Simplify install_bp_hardening_cb() Use is_hyp_mode_available() to detect whether or not we need to patch the KVM vectors for branch hardening, which avoids the need to take the vector pointers as parameters. Signed-off-by: Will Deacon commit 5359a87d5bdacb0c27f282f40ccbd80ce8f9702a Author: Will Deacon Date: Tue Sep 15 22:16:10 2020 +0100 KVM: arm64: Replace CONFIG_KVM_INDIRECT_VECTORS with CONFIG_RANDOMIZE_BASE The removal of CONFIG_HARDEN_BRANCH_PREDICTOR means that CONFIG_KVM_INDIRECT_VECTORS is synonymous with CONFIG_RANDOMIZE_BASE, so replace it. Signed-off-by: Will Deacon commit 6e5f0927846adf39aebee450f13871e3cb4ab012 Author: Will Deacon Date: Tue Sep 15 22:11:13 2020 +0100 arm64: Remove Spectre-related CONFIG_* options The spectre mitigations are too configurable for their own good, leading to confusing logic trying to figure out when we should mitigate and when we shouldn't. Although the plethora of command-line options need to stick around for backwards compatibility, the default-on CONFIG options that depend on EXPERT can be dropped, as the mitigations only do anything if the system is vulnerable, a mitigation is available and the command-line hasn't disabled it. Remove CONFIG_HARDEN_BRANCH_PREDICTOR and CONFIG_ARM64_SSBD in favour of enabling this code unconditionally. Signed-off-by: Will Deacon commit 39533e12063be7f55e3d6ae21ffe067799d542a4 Author: Marc Zyngier Date: Thu Jul 16 17:11:10 2020 +0100 arm64: Run ARCH_WORKAROUND_2 enabling code on all CPUs Commit 606f8e7b27bf ("arm64: capabilities: Use linear array for detection and verification") changed the way we deal with per-CPU errata by only calling the .matches() callback until one CPU is found to be affected. At this point, .matches() stop being called, and .cpu_enable() will be called on all CPUs. This breaks the ARCH_WORKAROUND_2 handling, as only a single CPU will be mitigated. In order to address this, forcefully call the .matches() callback from a .cpu_enable() callback, which brings us back to the original behaviour. Fixes: 606f8e7b27bf ("arm64: capabilities: Use linear array for detection and verification") Cc: Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit 2e02cbb236d6ac12e04629f94b7032a94f968165 Merge: 41fa0f597150f 51dd2eb98c72c Author: Marc Zyngier Date: Tue Sep 29 15:12:54 2020 +0100 Merge branch 'kvm-arm64/pmu-5.9' into kvmarm-master/next Signed-off-by: Marc Zyngier commit dc4d137ee3b79a7474b747b4b326d472ccc2cb79 Author: Niklas Cassel Date: Fri Aug 28 12:54:00 2020 +0200 null_blk: add support for max open/active zone limit for zoned devices Add support for user space to set a max open zone and a max active zone limit via configfs. By default, the default values are 0 == no limit. Call the block layer API functions used for exposing the configured limits to sysfs. Add accounting in null_blk_zoned so that these new limits are respected. Performing an operation that would exceed these limits results in a standard I/O error. A max open zone limit exists in the ZBC standard. While null_blk_zoned is used to test the Zoned Block Device model in Linux, when it comes to differences between ZBC and ZNS, null_blk_zoned mostly follows ZBC. Therefore, implement the manage open zone resources function from ZBC, but additionally add support for max active zones. This enables user space not only to test against a device with an open zone limit, but also to test against a device with an active zone limit. Signed-off-by: Niklas Cassel Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 76cffccd606acffde1b91e8b029b39b5fd1a3117 Author: yangerkun Date: Sat Sep 19 11:54:25 2020 +0800 block-mq: fix comments in blk_mq_queue_tag_busy_iter 'f5bbbbe4d635 ("blk-mq: sync the update nr_hw_queues with blk_mq_queue_tag_busy_iter")' introduce a bug what we may sleep between rcu lock. Then '530ca2c9bd69 ("blk-mq: Allow blocking queue tag iter callbacks")' fix it by get request_queue's ref. And 'a9a808084d6a ("block: Remove the synchronize_rcu() call from __blk_mq_update_nr_hw_queues()")' remove the synchronize_rcu in __blk_mq_update_nr_hw_queues. We need update the confused comments in blk_mq_queue_tag_busy_iter. Signed-off-by: yangerkun Signed-off-by: Jens Axboe commit 1c36e50f05d93d5485202eed05e1743897a766f0 Author: Krzysztof Kozlowski Date: Sun Sep 20 21:58:48 2020 +0200 dt-bindings: gpio: gpio-vf610: fix iMX 7ULP compatible matching The i.MX 7ULP DTSes use two compatibles so update the binding to fix dtbs_check warnings like: arch/arm/boot/dts/imx7ulp-com.dt.yaml: gpio@40ae0000: compatible: ['fsl,imx7ulp-gpio', 'fsl,vf610-gpio'] is too long arch/arm/boot/dts/imx7ulp-com.dt.yaml: gpio@40ae0000: compatible: Additional items are not allowed ('fsl,vf610-gpio' was unexpected) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit d32de9130f6c79533508e2c7879f18997bfbe2a0 Author: Ard Biesheuvel Date: Sat Sep 26 10:52:42 2020 +0200 efi/arm64: libstub: Deal gracefully with EFI_RNG_PROTOCOL failure Currently, on arm64, we abort on any failure from efi_get_random_bytes() other than EFI_NOT_FOUND when it comes to setting the physical seed for KASLR, but ignore such failures when obtaining the seed for virtual KASLR or for early seeding of the kernel's entropy pool via the config table. This is inconsistent, and may lead to unexpected boot failures. So let's permit any failure for the physical seed, and simply report the error code if it does not equal EFI_NOT_FOUND. Cc: # v5.8+ Reported-by: Heinrich Schuchardt Signed-off-by: Ard Biesheuvel commit 19f599e83ac56dda5b35df1d23fb24efeecfadad Author: Chuanhong Guo Date: Wed Sep 23 00:41:57 2020 +0800 pinctrl: mediatek: mt7622: add antsel pins/groups These pins are named ANTSEL[0~29] in datasheet and are used by wmac for various functions. Signed-off-by: Chuanhong Guo Link: https://lore.kernel.org/r/20200922164159.120920-1-gch981213@gmail.com Signed-off-by: Linus Walleij commit 17f2c8d36f8c37d230bda4d2e6e9a903f57dcd19 Author: Qinglang Miao Date: Mon Sep 21 21:10:57 2020 +0800 pinctrl: ocelot: simplify the return expression of ocelot_gpiochip_register() Simplify the return expression. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200921131057.92895-1-miaoqinglang@huawei.com Signed-off-by: Linus Walleij commit 737894d2654395d88e12c196b129ea018daa4bdf Author: Eugen Hristev Date: Thu Sep 17 16:12:57 2020 +0300 pinctrl: at91-pio4: add support for sama7g5 SoC Add support for sama7g5 pinctrl block, which has 5 PIO banks. Signed-off-by: Eugen Hristev Reviewed-by: Nicolas Ferre Acked-by: Ludovic Desroches Link: https://lore.kernel.org/r/20200917131257.273882-2-eugen.hristev@microchip.com Signed-off-by: Linus Walleij commit 1e871d0c0bde1f7180c610d1f01f25250be20f7d Author: Eugen Hristev Date: Thu Sep 17 16:12:56 2020 +0300 dt-bindings: pinctrl: at91-pio4: add microchip,sama7g5 Add compatible string for microchip sama7g5 SoC. Signed-off-by: Eugen Hristev Reviewed-by: Nicolas Ferre Acked-by: Ludovic Desroches Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200917131257.273882-1-eugen.hristev@microchip.com Signed-off-by: Linus Walleij commit 51dd2eb98c72c1ff4cdb1526fff9a259a563c257 Author: Alexandru Elisei Date: Thu Sep 24 13:37:31 2020 +0100 KVM: arm64: Match PMU error code descriptions with error conditions Update the description of the PMU KVM_{GET, SET}_DEVICE_ATTR error codes to be a better match for the code that returns them. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20200924123731.268177-3-alexandru.elisei@arm.com commit af130d0adc8e48c73030c0d71a59ce1f7809a8fa Author: Alexandru Elisei Date: Thu Sep 24 13:37:30 2020 +0100 KVM: arm64: Add undocumented return values for PMU device control group KVM_ARM_VCPU_PMU_V3_IRQ returns -EFAULT if get_user() fails when reading the interrupt number from kvm_device_attr.addr. KVM_ARM_VCPU_PMU_V3_INIT returns the error value from kvm_vgic_set_owner(). kvm_arm_pmu_v3_init() checks that the vgic has been initialized and the interrupt number is valid, but kvm_vgic_set_owner() can still return the error code -EEXIST if another device has already claimed the interrupt. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20200924123731.268177-2-alexandru.elisei@arm.com commit 5608215665b905632dc0dd43c075aeffc00b3818 Author: Qinglang Miao Date: Mon Sep 21 21:10:58 2020 +0800 pinctrl: spear: simplify the return expression of tvc_connect() Simplify the return expression. Signed-off-by: Qinglang Miao Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20200921131058.92941-1-miaoqinglang@huawei.com Signed-off-by: Linus Walleij commit 43b7229ef86ffb1c6720316cda8bea330fc8bc2c Author: Liu Shixin Date: Mon Sep 21 16:24:48 2020 +0800 pinctrl: spear: simplify the return expression of spear310_pinctrl_probe Simplify the return expression. Signed-off-by: Liu Shixin Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20200921082448.2591929-1-liushixin2@huawei.com Signed-off-by: Linus Walleij commit 8be86a5eec046cb8bd06b4393d373cd433a32cba Author: Marc Zyngier Date: Wed Feb 12 14:40:24 2020 +0000 KVM: arm64: Document PMU filtering API Add a small blurb describing how the event filtering API gets used. Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier commit 88865beca90621ae33217d5f23664d382f99205a Author: Marc Zyngier Date: Thu Mar 12 16:11:24 2020 +0000 KVM: arm64: Mask out filtered events in PCMEID{0,1}_EL1 As we can now hide events from the guest, let's also adjust its view of PCMEID{0,1}_EL1 so that it can figure out why some common events are not counting as they should. The astute user can still look into the TRM for their CPU and find out they've been cheated, though. Nobody's perfect. Signed-off-by: Marc Zyngier commit d7eec2360e389cc877a76c2b098f7b745007d2b2 Author: Marc Zyngier Date: Wed Feb 12 11:31:02 2020 +0000 KVM: arm64: Add PMU event filtering infrastructure It can be desirable to expose a PMU to a guest, and yet not want the guest to be able to count some of the implemented events (because this would give information on shared resources, for example. For this, let's extend the PMUv3 device API, and offer a way to setup a bitmap of the allowed events (the default being no bitmap, and thus no filtering). Userspace can thus allow/deny ranges of event. The default policy depends on the "polarity" of the first filter setup (default deny if the filter allows events, and default allow if the filter denies events). This allows to setup exactly what is allowed for a given guest. Note that although the ioctl is per-vcpu, the map of allowed events is global to the VM (it can be setup from any vcpu until the vcpu PMU is initialized). Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier commit fd65a3b5f855c37167890d86e261a20bab1a14a4 Author: Marc Zyngier Date: Tue Mar 17 11:11:56 2020 +0000 KVM: arm64: Use event mask matching architecture revision The PMU code suffers from a small defect where we assume that the event number provided by the guest is always 16 bit wide, even if the CPU only implements the ARMv8.0 architecture. This isn't really problematic in the sense that the event number ends up in a system register, cropping it to the right width, but still this needs fixing. In order to make it work, let's probe the version of the PMU that the guest is going to use. This is done by temporarily creating a kernel event and looking at the PMUVer field that has been saved at probe time in the associated arm_pmu structure. This in turn gets saved in the kvm structure, and subsequently used to compute the event mask that gets used throughout the PMU code. Signed-off-by: Marc Zyngier commit 42223fb100b43430daf0c396701cd75b2579ddb7 Author: Marc Zyngier Date: Thu Mar 12 17:27:36 2020 +0000 KVM: arm64: Refactor PMU attribute error handling The PMU emulation error handling is pretty messy when dealing with attributes. Let's refactor it so that we have less duplication, and that it is easy to extend later on. A functional change is that kvm_arm_pmu_v3_init() used to return -ENXIO when the PMU feature wasn't set. The error is now reported as -ENODEV, matching the documentation. -ENXIO is still returned when the interrupt isn't properly configured. Signed-off-by: Marc Zyngier commit 6eedfd858ff6af52c85229ab027297f8ae639508 Author: Ikjoon Jang Date: Mon Sep 28 14:06:31 2020 +0800 mtd: spi-nor: winbond: Add support for w25q64jwm Add support Winbond w25q{64,128,256}jwm which are identical to existing w25q32jwm except for their sizes. This was tested with w25q64jwm, basic erase/write/readback and lock/unlock both lower/upper blocks were okay. Signed-off-by: ikjn@chromium.org Signed-off-by: Xingyu Wu Signed-off-by: ST Lin Tested-by: Nicolas Boichat Signed-off-by: Ikjoon Jang Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200928060631.2090541-1-ikjn@chromium.org commit 3a9dcb2586e1b7f4c44c1f4f51d16ab43252ddb2 Author: Mika Westerberg Date: Fri Sep 25 12:51:09 2020 +0300 mtd: spi-nor: intel-spi: Add support for Intel Alder Lake-S SPI serial flash Intel Alder Lake-S has the same SPI serial flash controller as Cannon Lake. Add Alder Lake-S PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200925095109.51148-1-mika.westerberg@linux.intel.com commit 02892d405358288e0057cbdfe6476d13ea62fd2f Author: Robert Marko Date: Tue Sep 15 12:06:23 2020 +0200 mtd: spi-nor: macronix: Add SECT_4K to mx25l12805d According to the mx25l12805d datasheet it supports using 4K or 64K sectors. So lets add the SECT_4K to enable 4K sector usage. Datasheet: https://www.mxic.com.tw/Lists/Datasheet/Attachments/7321/MX25L12805D,%203V,%20128Mb,%20v1.2.pdf Cc: Luka Perkov Signed-off-by: Robert Marko Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200915100623.708736-1-robert.marko@sartura.hr commit 03edda0e1edaa3c2e99239c66e3c14d749318fd6 Author: Douglas Anderson Date: Wed Sep 2 16:00:40 2020 -0700 mtd: spi-nor: Prefer asynchronous probe On my system the spi_nor_probe() took ~6 ms at bootup. That's not a lot, but every little bit adds up to a slow bootup. While we can get this out of the boot path by making it a module, there are times where it is convenient (or even required) for this to be builtin the kernel. Let's set that we prefer async probe so that we don't block other drivers from probing while we are probing. This is a tiny little change that is almost guaranteed to be safe for anything that is able to run as a module, which SPI_NOR is. Specifically modules are already probed asynchronously. Also: since other things in the system may have enabled asynchronous probe the system may already be doing other things during our probe. There is a small possibility that some other driver that was a client of SPI_NOR didn't handle -EPROBE_DEFER and was relying on probe ordering and only worked when the SPI_NOR and the SPI bus were builtin. In that case the other driver has a bug that's waiting to hit and the other driver should be fixed. Signed-off-by: Douglas Anderson Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200902160002.1.I658d1c0db9adfeb9a59bc55e96a19e192c959e55@changeid commit 12d16b397ce0a999d13762c4c0cae2fb82eb60ee Author: Anson Huang Date: Thu Sep 17 13:33:46 2020 +0800 gpio: mxc: Support module build Change config to tristate, add module device table, module author, description and license to support module build for i.MX GPIO driver. As this is a SoC GPIO module, it provides common functions for most of the peripheral devices, such as GPIO pins control, secondary interrupt controller for GPIO pins IRQ etc., without GPIO driver, most of the peripheral devices will NOT work properly, so GPIO module is similar with clock, pinctrl driver that should be loaded ONCE and never unloaded. Since MXC GPIO driver needs to have init function to register syscore ops once, here still use subsys_initcall(), NOT module_platform_driver(). Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1600320829-1453-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit 2835c2ea95d50625108e47a459e1a47f6be836ce Author: Vasily Gorbik Date: Thu Sep 24 19:07:04 2020 +0200 s390/startup: avoid save_area_sync overflow Currently we overflow save_area_sync and write over save_area_async. Although this is not a real problem make startup_pgm_check_handler consistent with late pgm check handler and store [%r0,%r7] directly into gpregs_save_area. Reviewed-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 1c7c83e8d2351ee3d736094115e447a5da8e5369 Author: Vasily Gorbik Date: Thu Sep 24 18:29:29 2020 +0200 s390: remove unused _swsusp_reset_dma Since commit 394216275c7d ("s390: remove broken hibernate / power management support") _swsusp_reset_dma is unused and could be safely removed. Reviewed-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 5c46f2768c4bbf8e0beebea9adac1320015816b7 Author: Vasily Gorbik Date: Fri Sep 18 16:02:45 2020 +0200 s390/kaslr: correct and explain randomization base generation Currently there are several minor problems with randomization base generation code: 1. It might misbehave in low memory conditions. In particular there might be enough space for the kernel on [0, block_sum] but after if (base < safe_addr) base = safe_addr; it might not be enough anymore. 2. It does not correctly handle minimal address constraint. In condition if (base < safe_addr) base = safe_addr; a synthetic value is compared with an address. If we have a memory setup with memory holes due to offline memory regions, and safe_addr is close to the end of the first online memory block - we might position the kernel in invalid memory. 3. block_sum calculation logic contains off-by-one error. Let's say we have a memory block in which the kernel fits perfectly (end - start == kernel_size). In this case: if (end - start < kernel_size) continue; block_sum += end - start - kernel_size; block_sum is not increased, while it is a valid kernel position. So, address problems listed and explain algorithm used. Besides that restructuring the code makes it possible to extend kernel positioning algorithm further. Currently we pick position in between single [min, max] range (min = safe_addr, max = memory_limit). In future we can do that for multiple ranges as well (by calling count_valid_kernel_positions for each range). Reviewed-by: Philipp Rudo Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik commit 07a699bc43d1feb2abe3d47781e2db3d08554bcc Author: Vasily Gorbik Date: Wed Sep 23 09:37:43 2020 +0200 s390/kaslr: avoid mixing valid random value and an error code 0 is a valid random value. To avoid mixing it with error code 0 as an return code make get_random() take extra argument to output random value and return an error code. Reviewed-by: Philipp Rudo Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik commit 62aacabc1301364446b36a418229c12a8e7162ba Author: Qinglang Miao Date: Mon Sep 21 21:11:01 2020 +0800 s390/3215: simplify the return expression of tty3215_open() Simplify the return expression. Link: https://lkml.kernel.org/r/20200921131101.93037-1-miaoqinglang@huawei.com Signed-off-by: Qinglang Miao Signed-off-by: Vasily Gorbik commit 513034d8b089b9a49dab57845aee70e830fe7334 Author: Necip Fazil Yildiran Date: Mon Sep 14 17:40:26 2020 +0300 pinctrl: bcm: fix kconfig dependency warning when !GPIOLIB When PINCTRL_BCM2835 is enabled and GPIOLIB is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for GPIOLIB_IRQCHIP Depends on [n]: GPIOLIB [=n] Selected by [y]: - PINCTRL_BCM2835 [=y] && PINCTRL [=y] && OF [=y] && (ARCH_BCM2835 [=n] || ARCH_BRCMSTB [=n] || COMPILE_TEST [=y]) The reason is that PINCTRL_BCM2835 selects GPIOLIB_IRQCHIP without depending on or selecting GPIOLIB while GPIOLIB_IRQCHIP is subordinate to GPIOLIB. Honor the kconfig menu hierarchy to remove kconfig dependency warnings. Fixes: 85ae9e512f43 ("pinctrl: bcm2835: switch to GPIOLIB_IRQCHIP") Signed-off-by: Necip Fazil Yildiran Link: https://lore.kernel.org/r/20200914144025.371370-1-fazilyildiran@gmail.com Signed-off-by: Linus Walleij commit da2ab12f99d36b233d2bba0aecf55204c1bfa9e3 Author: Liu Shixin Date: Mon Sep 14 14:54:02 2020 +0800 pinctrl: sprd: use module_platform_driver to simplify the code module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin Acked-by: Chunyan Zhang Link: https://lore.kernel.org/r/20200914065402.3726408-1-liushixin2@huawei.com Signed-off-by: Linus Walleij commit f4b5c348d65b7c76931a7f36e8240a85e4cbad29 Author: 周琰杰 (Zhou Yanjie) Date: Sun Sep 13 14:58:36 2020 +0800 pinctrl: Ingenic: Add I2S pins support for Ingenic SoCs. 1.Add I2S pins support for the JZ4780 SoC. 2.Add I2S pins support for the X1000 SoC. 3.Add I2S pins support for the X1500 SoC. 4.Add I2S pins support for the X1830 SoC. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20200913065836.12156-4-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit d9f5dc495278605c42fb9e649688d1f03ac9a6da Author: 周琰杰 (Zhou Yanjie) Date: Sun Sep 13 14:58:35 2020 +0800 pinctrl: Ingenic: Correct the pullup and pulldown parameters of JZ4780. Correct the pullup and pulldown parameters of JZ4780 to make them consistent with the parameters on the datasheet. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20200913065836.12156-3-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit d3ef8c6b22861232d38934aa9b85123fdd6563b5 Author: 周琰杰 (Zhou Yanjie) Date: Sun Sep 13 14:58:34 2020 +0800 pinctrl: Ingenic: Add SSI pins support for JZ4770 and JZ4780. Add SSI pins support for the JZ4770 SoC and the JZ4780 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20200913065836.12156-2-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 05c0a8a9feda386f7ba4ee65f07f2541cead369f Author: Andrew Jeffery Date: Thu Sep 10 12:26:31 2020 +0930 pinctrl: aspeed-g6: Add bias controls for 1.8V GPIO banks These were skipped in the original patches adding pinconf support for the AST2600. Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Cc: Johnny Huang Link: https://lore.kernel.org/r/20200910025631.2996342-4-andrew@aj.id.au Signed-off-by: Linus Walleij commit 1d6db5ae6b090d1a8edfcb36b9bf47c5f4fe27f6 Author: Andrew Jeffery Date: Thu Sep 10 12:26:30 2020 +0930 pinctrl: aspeed: Use the right pinconf mask The Aspeed pinconf data structures are split into 'conf' and 'map' types, where the 'conf' struct defines which register and bitfield to manipulate, while the 'map' struct defines what value to write to the register and bitfield. Both structs have a mask member, and the wrong mask was being used to tell the regmap which bits to update. A todo is to look at whether we can remove the mask from the 'map' struct. Fixes: 5f52c853847f ("pinctrl: aspeed: Use masks to describe pinconf bitfields") Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Cc: Johnny Huang Link: https://lore.kernel.org/r/20200910025631.2996342-3-andrew@aj.id.au Signed-off-by: Linus Walleij commit 7e8d8ac78f35b2fc8cb1548f4ea5f5d9eaf3b3f8 Author: Andrew Jeffery Date: Thu Sep 10 12:26:29 2020 +0930 pinctrl: aspeed: Format pinconf debug consistent with pinmux When displaying which pinconf register and field is being touched, format the field mask so that it's consistent with the way the pinmux portion formats the mask. Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20200910025631.2996342-2-andrew@aj.id.au Signed-off-by: Linus Walleij commit cdfd8606e096a94265984efc247e938f8dad8034 Author: Krzysztof Kozlowski Date: Mon Sep 28 20:45:15 2020 +0200 dt-bindings: pinctrl: renesas,pfc: align example GPIO hog name with dtschema The convention for node names is to use hyphens, not underscores. dtschema expects GPIO hogs to end with 'hog' suffix. Adjust the example DTS in the binding. No changes to binding itself. Reported-by: Rob Herring Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200928184515.7345-1-krzk@kernel.org Signed-off-by: Linus Walleij commit 0399961233f1ba0792b272cdd1280b5aea033ea6 Author: Krzysztof Kozlowski Date: Wed Sep 16 17:57:02 2020 +0200 dt-bindings: gpio: convert bindings for Maxim MAX732x family to dtschema Convert the Maxim MAX732x family of GPIO expanders bindings to device tree schema by merging it with existing PCA95xx schema. These are quite similar so merging reduces duplication. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200916155715.21009-3-krzk@kernel.org Signed-off-by: Linus Walleij commit dd8efeb78d640db62bdbf191e7c25e8ef3576acb Author: Krzysztof Kozlowski Date: Wed Sep 16 17:57:01 2020 +0200 dt-bindings: gpio: convert bindings for NXP PCA953x family to dtschema Convert the NXP PCA953x family of GPIO expanders bindings to device tree schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200916155715.21009-2-krzk@kernel.org Signed-off-by: Linus Walleij commit d758d5d474ac5a9eb4e23188261c75bb1393afdf Author: Arnaldo Carvalho de Melo Date: Tue Sep 29 08:56:38 2020 -0300 perf tools: Separate the checking of headers only used to build beautification tables Some headers are not used in building the tools directly, but instead to generate tables that then gets source code included to do id->string and string->id lookups for things like syscall flags and commands. We were adding it directly to tools/include/ and this sometimes gets in the way of building using system headers, lets untangle this a bit. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 60e7432914467ed5e66c6eddad5a9d67fde408f8 Author: Krzysztof Kozlowski Date: Sun Sep 20 21:58:47 2020 +0200 dt-bindings: gpio: fsl-imx-gpio: add gpio-line-names Describe common "gpio-line-names" property to fix dtbs_check warnings like: arch/arm/boot/dts/imx53-m53menlo.dt.yaml: gpio@53f84000: 'gpio-line-names' does not match any of the regexes: '^(hog-[0-9]+|.+-hog(-[0-9]+)?)$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200920195848.27075-3-krzk@kernel.org Signed-off-by: Linus Walleij commit 256012abf948f6828f49bdc0acb1673baa1199a1 Author: Krzysztof Kozlowski Date: Sun Sep 20 21:58:46 2020 +0200 dt-bindings: gpio: fsl-imx-gpio: add i.MX ARMv6 and ARMv7 compatibles Several DTSes with ARMv6 and ARMv7 i.MX SoCs introduce their own compatibles so add them to fix dtbs_check warnings like: arch/arm/boot/dts/imx35-pdk.dt.yaml: gpio@53fa4000: compatible: ['fsl,imx35-gpio', 'fsl,imx31-gpio'] is not valid under any of the given schemas arch/arm/boot/dts/imx51-babbage.dt.yaml: gpio@73f90000: compatible: ['fsl,imx51-gpio', 'fsl,imx35-gpio'] is not valid under any of the given schemas Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200920195848.27075-2-krzk@kernel.org Signed-off-by: Linus Walleij commit 20199b5c8358b32dab63c4f598e07f6edbf80034 Author: Krzysztof Kozlowski Date: Sun Sep 20 21:58:45 2020 +0200 dt-bindings: gpio: pl061: add gpio-line-names Describe common "gpio-line-names" property to fix dtbs_check warnings like: arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dt.yaml: gpio@e8a0b000: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200920195848.27075-1-krzk@kernel.org Signed-off-by: Linus Walleij commit 7233f7cf4b025ce3bddf9ae34cab45fba74c9ea0 Author: Anson Huang Date: Tue Sep 8 16:12:01 2020 +0800 pinctrl: imx: Support building i.MX pinctrl core driver as module Change PINCTRL_IMX to tristate to support loadable module build. And i.MX common pinctrl driver should depend on CONFIG_OF to make sure no build error when i.MX common pinctrl driver is enabled for different architectures without CONFIG_OF. Also add module author, description and license. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/1599552721-24872-3-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit 0080c5342826ad2b0df7e8804f94dd65836ecff6 Author: Anson Huang Date: Tue Sep 8 16:12:00 2020 +0800 pinctrl: imx: Support building SCU pinctrl core driver as module Change PINCTR_IMX_SCU to tristate, add module author, description and license to support building SCU pinctrl core driver as module. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/1599552721-24872-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit 07ae3f0784c14c3ae8e20ed11c62139f45a8ac7b Author: Anson Huang Date: Tue Sep 8 16:11:59 2020 +0800 pinctrl: imx: Use function callbacks for SCU related functions Use function callbacks for SCU related functions in pinctrl-imx.c in order to support the scenario of PINCTRL_IMX is built in while PINCTRL_IMX_SCU is built as module, all drivers using SCU pinctrl driver need to initialize the SCU related function callback, and no need to check CONFIG_PINCTRL_IMX_SCU anymore, hence stub functions also can be removed. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/1599552721-24872-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit 9a19a39ee48b73a5dc84b3e102cda2219dfd5b0f Author: Michal Simek Date: Mon Aug 24 12:28:39 2020 +0200 arm64: dts: zynqmp: Fix leds subnode name for zcu100/ultra96 v1 Fix the leds subnode names to match (^led-[0-9a-f]$|led). Similar change has been also done by commit 08dc0e5dd9aa ("arm64: dts: meson: fix leds subnodes name"). The patch is fixing this warning: avnet-ultra96-rev1.dt.yaml: leds: 'ds2', 'ds3', 'ds4', 'ds5' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/1a69c3fa0291f991ffcf113ea222c713ba4d4ff0.1598264917.git.michal.simek@xilinx.com commit db7691f9587cb01f4c9bde096f6e7ffd9f1297c0 Author: Michal Simek Date: Mon Aug 24 10:28:45 2020 +0200 arm64: dts: zynqmp: Remove undocumented u-boot properties u-boot, DT properties are not documented anywhere in Linux DT binding that's why remove them. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/8ba339425b9c9f319bdedce7741367055a30713c.1598257720.git.michal.simek@xilinx.com Reviewed-by: Krzysztof Kozlowski commit 35292518cb0a626fcdcabf739aed75060a018ab5 Author: Michal Simek Date: Mon Aug 24 10:59:14 2020 +0200 arm64: dts: zynqmp: Remove additional compatible string for i2c IPs DT binding permits only one compatible string which was decribed in past by commit 63cab195bf49 ("i2c: removed work arounds in i2c driver for Zynq Ultrascale+ MPSoC"). The commit aea37006e183 ("dt-bindings: i2c: cadence: Migrate i2c-cadence documentation to YAML") has converted binding to yaml and the following issues is reported: ...: i2c@ff030000: compatible: Additional items are not allowed ('cdns,i2c-r1p10' was unexpected) From schema: .../Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml fds ...: i2c@ff030000: compatible: ['cdns,i2c-r1p14', 'cdns,i2c-r1p10'] is too long The commit c415f9e8304a ("ARM64: zynqmp: Fix i2c node's compatible string") has added the second compatible string but without removing origin one. The patch is only keeping one compatible string "cdns,i2c-r1p14". Fixes: c415f9e8304a ("ARM64: zynqmp: Fix i2c node's compatible string") Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/cc294ae1a79ef845af6809ddb4049f0c0f5bb87a.1598259551.git.michal.simek@xilinx.com Reviewed-by: Krzysztof Kozlowski commit dfff9066e60ee8670424cfedf4269d3b51c5100f Author: Michal Simek Date: Mon Aug 24 12:05:42 2020 +0200 arm64: dts: zynqmp: Rename buses to be align with simple-bus yaml Rename amba-apu and amba to AXI. Based on Xilinx ZynqMP TRM (Chapter 15) chip is "using the advanced eXtensible interface (AXI) point-to-point channels for communicating addresses, data, and response transactions between master and slave clients." Issues are reported as: ...: amba: $nodename:0: 'amba' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' From schema: .../dt-schema/dtschema/schemas/simple-bus.yaml ...: amba-apu@0: $nodename:0: 'amba-apu@0' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' From schema: .../dt-schema/dtschema/schemas/simple-bus.yaml Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/68f20a2b2bb0feee80bc3348619c2ee98aa69963.1598263539.git.michal.simek@xilinx.com Reviewed-by: Krzysztof Kozlowski commit 58e49346672f738cf6eeb62009a5b0ae194374c4 Author: Qinglang Miao Date: Tue Sep 29 16:56:51 2020 +0800 serial: mvebu-uart: fix unused variable warning There's a warning shows that 'ret' becomes an unused variable after simplify the return expression of mvebu_uart_probe(). So remove it. Fixes: b63537020db3 ("serial: mvebu-uart: simplify the return expression of mvebu_uart_probe()") Reported-by: Stephen Rothwell Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200929085651.158283-1-miaoqinglang@huawei.com Signed-off-by: Greg Kroah-Hartman commit cbf5a878aea9ccd0236c99f028080e099365c65d Author: Krzysztof Kozlowski Date: Wed Sep 16 17:57:07 2020 +0200 arm64: dts: xilinx: align GPIO hog names with dtschema The convention for node names is to use hyphens, not underscores. dtschema for pca95xx expects GPIO hogs to end with 'hog' prefix. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200916155715.21009-8-krzk@kernel.org Signed-off-by: Michal Simek commit 031f9664f8f9356cee662335bc56c93d16e75665 Author: Scott Chen Date: Thu Sep 24 14:27:45 2020 +0800 USB: serial: pl2303: add device-id for HP GC device This is adds a device id for HP LD381 which is a pl2303GC-base device. Signed-off-by: Scott Chen Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 6a2e0923b2df5c00d1c691b0393daf1a87ffb924 Author: kernel test robot Date: Mon Sep 28 23:37:14 2020 +0800 KVM: VMX: vmx_uret_msrs_list[] can be static Fixes: 14a61b642de9 ("KVM: VMX: Rename "vmx_msr_index" to "vmx_uret_msrs_list"") Signed-off-by: kernel test robot Message-Id: <20200928153714.GA6285@a3a878002045> Signed-off-by: Paolo Bonzini commit 3a22e9ac71585bcb7667e44641f1bbb25295f0ce Author: Chao Yu Date: Tue Sep 29 09:23:34 2020 +0800 f2fs: fix to do sanity check on segment/section count As syzbot reported: BUG: KASAN: slab-out-of-bounds in init_min_max_mtime fs/f2fs/segment.c:4710 [inline] BUG: KASAN: slab-out-of-bounds in f2fs_build_segment_manager+0x9302/0xa6d0 fs/f2fs/segment.c:4792 Read of size 8 at addr ffff8880a1b934a8 by task syz-executor682/6878 CPU: 1 PID: 6878 Comm: syz-executor682 Not tainted 5.9.0-rc6-syzkaller #0 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+0x198/0x1fd lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 init_min_max_mtime fs/f2fs/segment.c:4710 [inline] f2fs_build_segment_manager+0x9302/0xa6d0 fs/f2fs/segment.c:4792 f2fs_fill_super+0x381a/0x6e80 fs/f2fs/super.c:3633 mount_bdev+0x32e/0x3f0 fs/super.c:1417 legacy_get_tree+0x105/0x220 fs/fs_context.c:592 vfs_get_tree+0x89/0x2f0 fs/super.c:1547 do_new_mount fs/namespace.c:2875 [inline] path_mount+0x1387/0x20a0 fs/namespace.c:3192 do_mount fs/namespace.c:3205 [inline] __do_sys_mount fs/namespace.c:3413 [inline] __se_sys_mount fs/namespace.c:3390 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3390 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The root cause is: if segs_per_sec is larger than one, and segment count in last section is less than segs_per_sec, we will suffer out-of-boundary memory access on sit_i->sentries[] in init_min_max_mtime(). Fix this by adding sanity check among segment count, section count and segs_per_sec value in sanity_check_raw_super(). Reported-by: syzbot+481a3ffab50fed41dcc0@syzkaller.appspotmail.com Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6a257471fa42c8c9c04a875cd3a2a22db148e0f0 Author: Chao Yu Date: Tue Sep 29 09:23:12 2020 +0800 f2fs: fix to check segment boundary during SIT page readahead As syzbot reported: kernel BUG at fs/f2fs/segment.h:657! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 16220 Comm: syz-executor.0 Not tainted 5.9.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:f2fs_ra_meta_pages+0xa51/0xdc0 fs/f2fs/segment.h:657 Call Trace: build_sit_entries fs/f2fs/segment.c:4195 [inline] f2fs_build_segment_manager+0x4b8a/0xa3c0 fs/f2fs/segment.c:4779 f2fs_fill_super+0x377d/0x6b80 fs/f2fs/super.c:3633 mount_bdev+0x32e/0x3f0 fs/super.c:1417 legacy_get_tree+0x105/0x220 fs/fs_context.c:592 vfs_get_tree+0x89/0x2f0 fs/super.c:1547 do_new_mount fs/namespace.c:2875 [inline] path_mount+0x1387/0x2070 fs/namespace.c:3192 do_mount fs/namespace.c:3205 [inline] __do_sys_mount fs/namespace.c:3413 [inline] __se_sys_mount fs/namespace.c:3390 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3390 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 @blkno in f2fs_ra_meta_pages could exceed max segment count, causing panic in following sanity check in current_sit_addr(), add check condition to avoid this issue. Reported-by: syzbot+3698081bcf0bb2d12174@syzkaller.appspotmail.com Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6d7ab88a98c1b7a47c228f8ffb4f44d631eaf284 Author: Chao Yu Date: Tue Sep 29 09:22:50 2020 +0800 f2fs: fix uninit-value in f2fs_lookup As syzbot reported: Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x21c/0x280 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:122 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:219 f2fs_lookup+0xe05/0x1a80 fs/f2fs/namei.c:503 lookup_open fs/namei.c:3082 [inline] open_last_lookups fs/namei.c:3177 [inline] path_openat+0x2729/0x6a90 fs/namei.c:3365 do_filp_open+0x2b8/0x710 fs/namei.c:3395 do_sys_openat2+0xa88/0x1140 fs/open.c:1168 do_sys_open fs/open.c:1184 [inline] __do_compat_sys_openat fs/open.c:1242 [inline] __se_compat_sys_openat+0x2a4/0x310 fs/open.c:1240 __ia32_compat_sys_openat+0x56/0x70 fs/open.c:1240 do_syscall_32_irqs_on arch/x86/entry/common.c:80 [inline] __do_fast_syscall_32+0x129/0x180 arch/x86/entry/common.c:139 do_fast_syscall_32+0x6a/0xc0 arch/x86/entry/common.c:162 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:205 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c In f2fs_lookup(), @res_page could be used before being initialized, because in __f2fs_find_entry(), once F2FS_I(dir)->i_current_depth was been fuzzed to zero, then @res_page will never be initialized, causing this kmsan warning, relocating @res_page initialization place to fix this bug. Reported-by: syzbot+0eac6f0bbd558fd866d7@syzkaller.appspotmail.com Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d353d1202b89ab039acd079cd97f7646058ebe11 Author: Dmitry Osipenko Date: Sun Sep 27 23:51:39 2020 +0300 PM / devfreq: tegra30: Improve initial hardware resetting It's safe to enable the ACTMON clock at any time during driver probing, even if we don't know the state of hardware, because it's used only for collecting and processing stats, and interrupt is kept disabled. This allows us to slightly improve code which performs initial hardware resetting by making use of a single reset_control_reset() instead of assert/deassert pair. Secondly, a potential error of the reset-control API is handled nicely now. Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit 02bdbf7d09c059b16047e3d4a05e6d584dd993b6 Author: Chanwoo Choi Date: Tue Sep 8 19:24:47 2020 +0900 PM / devfreq: event: Change prototype of devfreq_event_get_edev_by_phandle function Previously, devfreq core support 'devfreq-events' property in order to get the devfreq-event device by phandle. But, 'devfreq-events' property name is not proper on devicetree binding because this name doesn't mean the any h/w attribute. The devfreq-event core hand over the rights to decide the property name for getting the devfreq-event device on devicetree. Each devfreq-event driver will decide the property name on devicetree binding and then pass the their own property name to devfreq_event_get_edev_by_phandle function. And change the prototype of devfreq_event_get_edev_count function because of used deprecated 'devfreq-events' property. Acked-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit 86d90fd95bbc3b3fdc2ef0507b7324cd1d0a358b Author: Chanwoo Choi Date: Tue Sep 8 19:24:46 2020 +0900 PM / devfreq: Change prototype of devfreq_get_devfreq_by_phandle function Previously, devfreq core support 'devfreq' property in order to get the devfreq device by phandle. But, 'devfreq' property name is not proper on devicetree binding because this name doesn't mean the any h/w attribute. The devfreq core hand over the right to decide the property name for getting the devfreq device on devicetree. Each devfreq driver will decide the property name on devicetree binding and pass the their own property name to devfreq_get_devfreq_by_phandle function. Acked-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit 7b38b7b0427df70237e3c9c73f2db6b99be2b4b9 Author: Leonard Crestez Date: Tue Sep 8 19:24:45 2020 +0900 PM / devfreq: Add devfreq_get_devfreq_by_node function Split off part of devfreq_get_devfreq_by_phandle into a separate function. This allows callers to fetch devfreq instances by enumerating devicetree instead of explicit phandles. Acked-by: Krzysztof Kozlowski Reviewed-by: Lukasz Luba Signed-off-by: Leonard Crestez [cw00.choi: Export devfreq_get_devfreq_by_node function and add function to devfreq.h when CONFIG_PM_DEVFREQ is enabled.] Signed-off-by: Chanwoo Choi commit 17f930e0a649e158a567504df7bb01c90a8514c1 Author: Chao Yu Date: Sat Sep 26 08:20:46 2020 +0800 f2fs: remove unneeded parameter in find_in_block() We can relocate @res_page assignment in find_in_block() to its caller, so unneeded parameter could be removed for cleanup. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f99ba9add67ce63eca3fe68a3d5e9996cd2c33b5 Author: Wang Xiaojun Date: Thu Sep 17 19:11:58 2020 +0800 f2fs: fix wrong total_sections check and fsmeta check Meta area is not included in section_count computation. So the minimum number of total_sections is 1 meanwhile it cannot be greater than segment_count_main. The minimum number of meta segments is 8 (SB + 2 (CP + SIT + NAT) + SSA). Signed-off-by: Wang Xiaojun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d89f589130160a988c0108c81e6b13e0831d7603 Author: Wang Xiaojun Date: Fri Sep 18 08:31:24 2020 +0800 f2fs: remove duplicated code in sanity_check_area_boundary Use seg_end_blkaddr instead of "segment0_blkaddr + (segment_count << log_blocks_per_seg)". Signed-off-by: Wang Xiaojun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e6e421870b5f4a73802dac7c123dcb02f929989f Author: Wang Xiaojun Date: Sat Sep 19 11:35:05 2020 +0800 f2fs: remove unused check on version_bitmap A NULL will not be return by __bitmap_ptr here. Remove the unused check. Signed-off-by: Wang Xiaojun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d0660122dced9768aadfa450f723d857464a4137 Author: Chao Yu Date: Mon Sep 21 20:53:14 2020 +0800 f2fs: relocate blkzoned feature check Relocate blkzoned feature check into parse_options() like other feature check. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 07eb1d699452de04e9d389ff17fb8fc9e975d7bf Author: Chao Yu Date: Mon Sep 21 20:53:13 2020 +0800 f2fs: do sanity check on zoned block device path sbi->devs would be initialized only if image enables multiple device feature or blkzoned feature, if blkzoned feature flag was set by fuzz in non-blkzoned device, we will suffer below panic: get_zone_idx fs/f2fs/segment.c:4892 [inline] f2fs_usable_zone_blks_in_seg fs/f2fs/segment.c:4943 [inline] f2fs_usable_blks_in_seg+0x39b/0xa00 fs/f2fs/segment.c:4999 Call Trace: check_block_count+0x69/0x4e0 fs/f2fs/segment.h:704 build_sit_entries fs/f2fs/segment.c:4403 [inline] f2fs_build_segment_manager+0x51da/0xa370 fs/f2fs/segment.c:5100 f2fs_fill_super+0x3880/0x6ff0 fs/f2fs/super.c:3684 mount_bdev+0x32e/0x3f0 fs/super.c:1417 legacy_get_tree+0x105/0x220 fs/fs_context.c:592 vfs_get_tree+0x89/0x2f0 fs/super.c:1547 do_new_mount fs/namespace.c:2896 [inline] path_mount+0x12ae/0x1e70 fs/namespace.c:3216 do_mount fs/namespace.c:3229 [inline] __do_sys_mount fs/namespace.c:3437 [inline] __se_sys_mount fs/namespace.c:3414 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3414 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 Add sanity check to inconsistency on factors: blkzoned flag, device path and device character to avoid above panic. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9b66482282888d02832b7d90239e1cdb18e4b431 Author: Zhang Qilong Date: Mon Sep 21 20:45:44 2020 +0800 f2fs: add trace exit in exception path Missing the trace exit in f2fs_sync_dirty_inodes Signed-off-by: Zhang Qilong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4470eb28731102e465d562f38d07fdf0796a58b0 Author: Xiaojun Wang Date: Wed Sep 16 16:00:46 2020 +0800 f2fs: change return value of reserved_segments to unsigned int The type of SM_I(sbi)->reserved_segments is unsigned int, so change the return value to unsigned int. The type cast can be removed in reserved_sections as a result. Signed-off-by: Xiaojun Wang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 78c7d49f55d8631b67c09f9bfbe8155211a9ea06 Author: Richard Weinberger Date: Mon Sep 28 20:58:59 2020 +0200 ubifs: journal: Make sure to not dirty twice for auth nodes When removing the last reference of an inode the size of an auth node is already part of write_len. So we must not call ubifs_add_auth_dirt(). Call it only when needed. Cc: Cc: Sascha Hauer Cc: Kristof Havasi Fixes: 6a98bc4614de ("ubifs: Add authentication nodes to journal") Reported-and-tested-by: Kristof Havasi Reviewed-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 82b4f9b857e7ac38d26f853a28ca719fdc415cbe Author: Govind Singh Date: Tue Sep 29 09:25:03 2020 +0300 ath11k: Move non-fatal warn logs to dbg level During driver load below warn logs are printed in the console. Since driver may not implement all wmi events sent by fw and all of them are non-fatal, move this log to debug level to remove un-necessary warn message on console. [876.898735] ath11k_pci 0000:06:00.0: Unknown eventid: 0x16005 [879.283250] ath11k_pci 0000:06:00.0: Unknown eventid: 0x1d00a No functional changes. Compile tested only. Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1600948691-6901-1-git-send-email-govinds@codeaurora.org commit e2f1ceb8175893f1d032607a219e57a5bce735c4 Author: Li Heng Date: Tue Sep 29 09:25:03 2020 +0300 ath9k: Remove set but not used variable This addresses the following gcc warning with "make W=1": drivers/net/wireless/ath/ath9k/ar9580_1p0_initvals.h:1331:18: warning: ‘ar9580_1p0_pcie_phy_clkreq_enable_L1’ defined but not used [-Wunused-const-variable=] drivers/net/wireless/ath/ath9k/ar9580_1p0_initvals.h:1338:18: warning: ‘ar9580_1p0_pcie_phy_clkreq_disable_L1’ defined but not used [-Wunused-const-variable=] drivers/net/wireless/ath/ath9k/ar9580_1p0_initvals.h:1345:18: warning: ‘ar9580_1p0_pcie_phy_pll_on_clkreq’ defined but not used [-Wunused-const-variable=] Reported-by: Hulk Robot Signed-off-by: Li Heng Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1600831531-8573-1-git-send-email-liheng40@huawei.com commit 1d2a85382282e7c77cbde5650335c3ffc6073fa1 Author: Alex Dewar Date: Sat Sep 26 18:45:58 2020 +0100 wl3501_cs: Remove unnecessary NULL check In wl3501_detach(), link->priv is checked for a NULL value before being passed to free_netdev(). However, it cannot be NULL at this point as it has already been passed to other functions, so just remove the check. Addresses-Coverity: CID 710499: Null pointer dereferences (REVERSE_INULL) Signed-off-by: Alex Dewar Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200926174558.9436-1-alex.dewar90@gmail.com commit 42af278bff023a0bc852cb2c2758da72ed3e85cc Author: Wang Qing Date: Sat Sep 26 10:37:18 2020 +0800 wl1251/wl12xx: fix a typo in comments Modify the comment typo: "compliment" -> "complement". Signed-off-by: Wang Qing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601087891-11281-1-git-send-email-wangqing@vivo.com commit 63f6982075d890d7563e2469643f05a37d193f01 Author: Colin Ian King Date: Fri Sep 25 14:22:24 2020 +0100 qtnfmac: fix resource leaks on unsupported iftype error return path Currently if an unsupported iftype is detected the error return path does not free the cmd_skb leading to a resource leak. Fix this by free'ing cmd_skb. Addresses-Coverity: ("Resource leak") Fixes: 805b28c05c8e ("qtnfmac: prepare for AP_VLAN interface type support") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200925132224.21638-1-colin.king@canonical.com commit fada09311d17405cc2cdf24003a4207db62b2d3f Author: Tzu-En Huang Date: Fri Sep 25 14:12:19 2020 +0800 rtw88: show current regulatory in tx power table In the transmit power table, it is important to know what the regulatory currently is. For different regulatories, there are different transmit power limits. Show which regulatory the driver is currently using. Signed-off-by: Tzu-En Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200925061219.23754-6-tehuang@realtek.com commit 714f71f94ab34aa14393c305e43debd83928f98c Author: Tzu-En Huang Date: Fri Sep 25 14:12:18 2020 +0800 rtw88: add dump fw crash log This patch adds a function which is able to dump firmware fifo when firmware crashes. If firmware needs more than one time to dump all logs, it will set a bit called "more bit" in the header of the first log, and driver needs to set a register to inform firmware that it is ready for the next dump. Signed-off-by: Tzu-En Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200925061219.23754-5-tehuang@realtek.com commit 0fbc2f0f34cc57e8d6076631733e0095ac031995 Author: Tzu-En Huang Date: Fri Sep 25 14:12:17 2020 +0800 rtw88: add dump firmware fifo support Rtw88 currently has a function to dump reserved page section of the firmware fifo. Reserved page is just part of the firmware fifo, there are multiple sections in the firmware fifo for different usages, such as firmware rx fifo and tx fifo. This commit adds a function to check not only the reserved page section but also other parts of the firmware fifo. In addition, we need to dump firmware fifo to dump the debug log message if firmware crashes. Signed-off-by: Tzu-En Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200925061219.23754-4-tehuang@realtek.com commit 5c831644e1f4c9d49cdc174e788742569d117e16 Author: Tzu-En Huang Date: Fri Sep 25 14:12:16 2020 +0800 rtw88: handle and recover when firmware crash This handles the situation when firmware crashes. When firmware crashes, it will send an interrupt, and driver will queue a work for recovery. In the work, driver will reset it's internal association state, which includes removing associated sta's macid, resetting vifs' states and removing keys. After resetting the driver's state, driver will call rtw_enter_ips() to force the chipset power off to reset the chip. Finally, driver calls ieee80211_restart_hw() to inform mac80211 stack to restart. Since only 8822c firmware supports this feature, the interrupt will only be triggered when 8822c chipset is loaded. Signed-off-by: Tzu-En Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200925061219.23754-3-tehuang@realtek.com commit ee755732b7a16af018daa77d9562d2493fb7092f Author: Tzu-En Huang Date: Fri Sep 25 14:12:15 2020 +0800 rtw88: increse the size of rx buffer size The vht capability of MAX_MPDU_LENGTH is 11454 in rtw88; however, the rx buffer size for each packet is 8192. When receiving packets that are larger than rx buffer size, it will leads to rx buffer ring overflow. Signed-off-by: Tzu-En Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200925061219.23754-2-tehuang@realtek.com commit 9aa7bd452af17a3966e3583d959dcacab030bb8e Author: Wang Qing Date: Sat Sep 26 15:03:37 2020 +0800 platform/chrome: Use kobj_to_dev() instead of container_of() Use kobj_to_dev() instead of container_of(). Signed-off-by: Wang Qing Reviewed-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra commit 010cb00265f150bf82b23c02ad1fb87ce5c781e1 Author: Kan Liang Date: Mon Sep 28 06:47:26 2020 -0700 perf/x86/intel: Fix Ice Lake event constraint table An error occues when sampling non-PEBS INST_RETIRED.PREC_DIST(0x01c0) event. perf record -e cpu/event=0xc0,umask=0x01/ -- sleep 1 Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cpu/event=0xc0,umask=0x01/). /bin/dmesg | grep -i perf may provide additional information. The idxmsk64 of the event is set to 0. The event never be successfully scheduled. The event should be limit to the fixed counter 0. Fixes: 6017608936c1 ("perf/x86/intel: Add Icelake support") Reported-by: Yi, Ammy Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20200928134726.13090-1-kan.liang@linux.intel.com commit 8191016a026b8dfbb14dea64efc8e723ee99fe65 Author: Kan Liang Date: Mon Sep 28 06:32:40 2020 -0700 perf/x86/intel/uncore: Fix the scale of the IMC free-running events The "MiB" result of the IMC free-running bandwidth events, uncore_imc_free_running/read/ and uncore_imc_free_running/write/ are 16 times too small. The "MiB" value equals the raw IMC free-running bandwidth counter value times a "scale" which is inaccurate. The IMC free-running bandwidth events should be incremented per 64B cache line, not DWs (4 bytes). The "scale" should be 6.103515625e-5. Fix the "scale" for both Snow Ridge and Ice Lake. Fixes: 2b3b76b5ec67 ("perf/x86/intel/uncore: Add Ice Lake server uncore support") Fixes: ee49532b38dd ("perf/x86/intel/uncore: Add IMC uncore support for Snow Ridge") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200928133240.12977-1-kan.liang@linux.intel.com commit f797f05d917ffef94249ee0aec4c14a5b50517b2 Author: Alexander Antonov Date: Mon Sep 28 13:21:33 2020 +0300 perf/x86/intel/uncore: Fix for iio mapping on Skylake Server Introduced early attributes /sys/devices/uncore_iio_/die* are initialized by skx_iio_set_mapping(), however, for example, for multiple segment platforms skx_iio_get_topology() returns -EPERM before a list of attributes in skx_iio_mapping_group will have been initialized. As a result the list is being NULL. Thus the warning "sysfs: (bin_)attrs not set by subsystem for group: uncore_iio_*/" appears and uncore_iio pmus are not available in sysfs. Clear IIO attr_update to properly handle the cases when topology information cannot be retrieved. Fixes: bb42b3d39781 ("perf/x86/intel/uncore: Expose an Uncore unit to IIO PMON mapping") Reported-by: Kyle Meyer Suggested-by: Kan Liang Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Alexei Budankov Reviewed-by: Kan Liang Link: https://lkml.kernel.org/r/20200928102133.61041-1-alexander.antonov@linux.intel.com commit c3bb8a9fa31b99f5b7d2e45cd0a10db91349f4c9 Author: Kan Liang Date: Mon Sep 28 05:30:42 2020 -0700 perf/x86/msr: Add Jasper Lake support The Jasper Lake processor is also a Tremont microarchitecture. From the perspective of perf MSR, there is nothing changed compared with Elkhart Lake. Share the code path with Elkhart Lake. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1601296242-32763-2-git-send-email-kan.liang@linux.intel.com commit dbfd638889a0396f5fe14ff3cc2263ec1e1cac62 Author: Kan Liang Date: Mon Sep 28 05:30:41 2020 -0700 perf/x86/intel: Add Jasper Lake support The Jasper Lake processor is also a Tremont microarchitecture. From the perspective of Intel PMU, there is nothing changed compared with Elkhart Lake. Share the perf code with Elkhart Lake. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1601296242-32763-1-git-send-email-kan.liang@linux.intel.com commit ee139385432e919f4d1f59b80edbc073cdae1391 Author: Kan Liang Date: Fri Sep 25 06:49:05 2020 -0700 perf/x86/intel/uncore: Reduce the number of CBOX counters An oops is triggered by the fuzzy test. [ 327.853081] unchecked MSR access error: RDMSR from 0x70c at rIP: 0xffffffffc082c820 (uncore_msr_read_counter+0x10/0x50 [intel_uncore]) [ 327.853083] Call Trace: [ 327.853085] [ 327.853089] uncore_pmu_event_start+0x85/0x170 [intel_uncore] [ 327.853093] uncore_pmu_event_add+0x1a4/0x410 [intel_uncore] [ 327.853097] ? event_sched_in.isra.118+0xca/0x240 There are 2 GP counters for each CBOX, but the current code claims 4 counters. Accessing the invalid registers triggers the oops. Fixes: 6e394376ee89 ("perf/x86/intel/uncore: Add Intel Icelake uncore support") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200925134905.8839-3-kan.liang@linux.intel.com commit 8f5d41f3a0f495435c88ebba8fc150c931c10fef Author: Kan Liang Date: Fri Sep 25 06:49:04 2020 -0700 perf/x86/intel/uncore: Update Ice Lake uncore units There are some updates for the Icelake model specific uncore performance monitors. (The update can be found at 10th generation intel core processors families specification update Revision 004, ICL068) 1) Counter 0 of ARB uncore unit is not available for software use 2) The global 'enable bit' (bit 29) and 'freeze bit' (bit 31) of MSR_UNC_PERF_GLOBAL_CTRL cannot be used to control counter behavior. Needs to use local enable in event select MSR. Accessing the modified bit/registers will be ignored by HW. Users may observe inaccurate results with the current code. The changes of the MSR_UNC_PERF_GLOBAL_CTRL imply that groups cannot be read atomically anymore. Although the error of the result for a group becomes a bit bigger, it still far lower than not using a group. The group support is still kept. Only Remove the *_box() related implementation. Since the counter 0 of ARB uncore unit is not available, update the MSR address for the ARB uncore unit. There is no change for IMC uncore unit, which only include free-running counters. Fixes: 6e394376ee89 ("perf/x86/intel/uncore: Add Intel Icelake uncore support") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200925134905.8839-2-kan.liang@linux.intel.com commit 8abbcfefb5f7afabab4578bedd7cd400800cb039 Author: Kan Liang Date: Fri Sep 25 06:49:03 2020 -0700 perf/x86/intel/uncore: Split the Ice Lake and Tiger Lake MSR uncore support Previously, the MSR uncore for the Ice Lake and Tiger Lake are identical. The code path is shared. However, with recent update, the global MSR_UNC_PERF_GLOBAL_CTRL register and ARB uncore unit are changed for the Ice Lake. Split the Ice Lake and Tiger Lake MSR uncore support. The changes only impact the MSR ops() and the ARB uncore unit. Other codes can still be shared between the Ice Lake and the Tiger Lake. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200925134905.8839-1-kan.liang@linux.intel.com commit 6d1823ccc480866e571ab1206665d693aeb600cf Author: Boqun Feng Date: Thu Sep 17 16:01:50 2020 +0800 lockdep: Optimize the memory usage of circular queue Qian Cai reported a BFS_EQUEUEFULL warning [1] after read recursive deadlock detection merged into tip tree recently. Unlike the previous lockep graph searching, which iterate every lock class (every node in the graph) exactly once, the graph searching for read recurisve deadlock detection needs to iterate every lock dependency (every edge in the graph) once, as a result, the maximum memory cost of the circular queue changes from O(V), where V is the number of lock classes (nodes or vertices) in the graph, to O(E), where E is the number of lock dependencies (edges), because every lock class or dependency gets enqueued once in the BFS. Therefore we hit the BFS_EQUEUEFULL case. However, actually we don't need to enqueue all dependencies for the BFS, because every time we enqueue a dependency, we almostly enqueue all other dependencies in the same dependency list ("almostly" is because we currently check before enqueue, so if a dependency doesn't pass the check stage we won't enqueue it, however, we can always do in reverse ordering), based on this, we can only enqueue the first dependency from a dependency list and every time we want to fetch a new dependency to work, we can either: 1) fetch the dependency next to the current dependency in the dependency list or 2) if the dependency in 1) doesn't exist, fetch the dependency from the queue. With this approach, the "max bfs queue depth" for a x86_64_defconfig + lockdep and selftest config kernel can get descreased from: max bfs queue depth: 201 to (after apply this patch) max bfs queue depth: 61 While I'm at it, clean up the code logic a little (e.g. directly return other than set a "ret" value and goto the "exit" label). [1]: https://lore.kernel.org/lkml/17343f6f7f2438fc376125384133c5ba70c2a681.camel@redhat.com/ Reported-by: Qian Cai Reported-by: syzbot+62ebe501c1ce9a91f68c@syzkaller.appspotmail.com Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200917080210.108095-1-boqun.feng@gmail.com commit 6cf87e5edd9944e1d3b6efd966ea401effc304ee Author: Mychaela N. Falconia Date: Wed Sep 16 01:56:29 2020 +0000 USB: serial: ftdi_sio: add support for FreeCalypso JTAG+UART adapters There exist many FT2232-based JTAG+UART adapter designs in which FT2232 Channel A is used for JTAG and Channel B is used for UART. The best way to handle them in Linux is to have the ftdi_sio driver create a ttyUSB device only for Channel B and not for Channel A: a ttyUSB device for Channel A would be bogus and will disappear as soon as the user runs OpenOCD or other applications that access Channel A for JTAG from userspace, causing undesirable noise for users. The ftdi_sio driver already has a dedicated quirk for such JTAG+UART FT2232 adapters, and it requires assigning custom USB IDs to such adapters and adding these IDs to the driver with the ftdi_jtag_quirk applied. Boutique hardware manufacturer Falconia Partners LLC has created a couple of JTAG+UART adapter designs (one buffered, one unbuffered) as part of FreeCalypso project, and this hardware is specifically made to be used with Linux hosts, with the intent that Channel A will be accessed only from userspace via appropriate applications, and that Channel B will be supported by the ftdi_sio kernel driver, presenting a standard ttyUSB device to userspace. Toward this end the hardware manufacturer will be programming FT2232 EEPROMs with custom USB IDs, specifically with the intent that these IDs will be recognized by the ftdi_sio driver with the ftdi_jtag_quirk applied. Signed-off-by: Mychaela N. Falconia [johan: insert in PID order and drop unused define] Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 13468bfa8c58731dc9ecda1cd9b22a191114f944 Author: Hui Wang Date: Mon Sep 28 16:01:17 2020 +0800 ALSA: hda/realtek - set mic to auto detect on a HP AIO machine Recently we enabled a HP AIO machine, we found the mic on the machine couldn't record any sound and it couldn't detect plugging and unplugging as well. Through debugging we found the mic is set to manual detect mode, after setting it to auto detect mode, it could detect plugging and unplugging and could record sound. Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20200928080117.12435-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 00e8c44a147aa237867ba38b096da5e28b85a57b Author: John Fastabend Date: Mon Sep 28 18:50:47 2020 -0700 bpf, selftests: Fix cast to smaller integer type 'int' warning in raw_tp Fix warning in bpf selftests, progs/test_raw_tp_test_run.c:18:10: warning: cast to smaller integer type 'int' from 'struct task_struct *' [-Wpointer-to-int-cast] Change int type cast to long to fix. Discovered with gcc-9 and llvm-11+ where llvm was recent main branch. Fixes: 09d8ad16885ee ("selftests/bpf: Add raw_tp_test_run") Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/160134424745.11199.13841922833336698133.stgit@john-Precision-5820-Tower commit bc6009086588f284bdd8b0463b24a9a76777c6b5 Merge: 98b972d20a279 9141f75a3279b Author: Alexei Starovoitov Date: Mon Sep 28 19:17:14 2020 -0700 Merge branch 'libbpf: BTF writer APIs' Andrii Nakryiko says: ==================== This patch set introduces a new set of BTF APIs to libbpf that allow to conveniently produce BTF types and strings. These APIs will allow libbpf to do more intrusive modifications of program's BTF (by rewriting it, at least as of right now), which is necessary for the upcoming libbpf static linking. But they are complete and generic, so can be adopted by anyone who has a need to produce BTF type information. One such example outside of libbpf is pahole, which was actually converted to these APIs (locally, pending landing of these changes in libbpf) completely and shows reduction in amount of custom pahole code necessary and brings nice savings in memory usage (about 370MB reduction at peak for my kernel configuration) and even BTF deduplication times (one second reduction, 23.7s -> 22.7s). Memory savings are due to avoiding pahole's own copy of "uncompressed" raw BTF data. Time reduction comes from faster string search and deduplication by relying on hashmap instead of BST used by pahole's own code. Consequently, these APIs are already tested on real-world complicated kernel BTF, but there is also pretty extensive selftest doing extra validations. Selftests in patch #3 add a set of generic ASSERT_{EQ,STREQ,ERR,OK} macros that are useful for writing shorter and less repretitive selftests. I decided to keep them local to that selftest for now, but if they prove to be useful in more contexts we should move them to test_progs.h. And few more (e.g., inequality tests) macros are probably necessary to have a more complete set. Cc: Arnaldo Carvalho de Melo v2->v3: - resending original patches #7-9 as patches #1-3 due to merge conflict; v1->v2: - fixed comments (John); - renamed btf__append_xxx() into btf__add_xxx() (Alexei); - added btf__find_str() in addition to btf__add_str(); - btf__new_empty() now sets kernel FD to -1 initially. ==================== Signed-off-by: Alexei Starovoitov commit 9141f75a3279bab4a7d761c6050d96777b646767 Author: Andrii Nakryiko Date: Mon Sep 28 19:05:32 2020 -0700 selftests/bpf: Test BTF writing APIs Add selftests for BTF writer APIs. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200929020533.711288-4-andriin@fb.com commit f86ed050bcee3b7daa420eb31a8b6d079701caab Author: Andrii Nakryiko Date: Mon Sep 28 19:05:31 2020 -0700 libbpf: Add btf__str_by_offset() as a more generic variant of name_by_offset BTF strings are used not just for names, they can be arbitrary strings used for CO-RE relocations, line/func infos, etc. Thus "name_by_offset" terminology is too specific and might be misleading. Instead, introduce btf__str_by_offset() API which uses generic string terminology. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200929020533.711288-3-andriin@fb.com commit 4a3b33f8579af182ebcf9c7e9304effce505500e Author: Andrii Nakryiko Date: Mon Sep 28 19:05:30 2020 -0700 libbpf: Add BTF writing APIs Add APIs for appending new BTF types at the end of BTF object. Each BTF kind has either one API of the form btf__add_(). For types that have variable amount of additional items (struct/union, enum, func_proto, datasec), additional API is provided to emit each such item. E.g., for emitting a struct, one would use the following sequence of API calls: btf__add_struct(...); btf__add_field(...); ... btf__add_field(...); Each btf__add_field() will ensure that the last BTF type is of STRUCT or UNION kind and will automatically increment that type's vlen field. All the strings are provided as C strings (const char *), not a string offset. This significantly improves usability of BTF writer APIs. All such strings will be automatically appended to string section or existing string will be re-used, if such string was already added previously. Each API attempts to do all the reasonable validations, like enforcing non-empty names for entities with required names, proper value bounds, various bit offset restrictions, etc. Type ID validation is minimal because it's possible to emit a type that refers to type that will be emitted later, so libbpf has no way to enforce such cases. User must be careful to properly emit all the necessary types and specify type IDs that will be valid in the finally generated BTF. Each of btf__add_() APIs return new type ID on success or negative value on error. APIs like btf__add_field() that emit additional items return zero on success and negative value on error. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200929020533.711288-2-andriin@fb.com commit d61491a51f7e9e72df50d53f5d40825980bcb8b5 Author: Gustavo A. R. Silva Date: Mon Sep 28 10:30:52 2020 -0500 net/sched: cls_u32: Replace one-element array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct tc_u_hnode and use the struct_size() helper to calculate the size for the allocations. Commit 5778d39d070b ("net_sched: fix struct tc_u_hnode layout in u32") makes it clear that the code is expected to dynamically allocate divisor + 1 entries for ->ht[] in tc_uhnode. Also, based on other observations, as the piece of code below: 1232 for (h = 0; h <= ht->divisor; h++) { 1233 for (n = rtnl_dereference(ht->ht[h]); 1234 n; 1235 n = rtnl_dereference(n->next)) { 1236 if (tc_skip_hw(n->flags)) 1237 continue; 1238 1239 err = u32_reoffload_knode(tp, n, add, cb, 1240 cb_priv, extack); 1241 if (err) 1242 return err; 1243 } 1244 } we can assume that, in general, the code is actually expecting to allocate that extra space for the one-element array in tc_uhnode, everytime it allocates memory for instances of tc_uhnode or tc_u_common structures. That's the reason for passing '1' as the last argument for struct_size() in the allocation for _root_ht_ and _tp_c_, and 'divisor + 1' in the allocation code for _ht_. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f7062af.z3T9tn9yIPv6h5Ny%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit a93b6a2b9f466afb4fa1d0bd23ae2f1d29914811 Author: Gustavo A. R. Silva Date: Mon Sep 28 10:16:17 2020 -0500 qed/qed_ll2: Replace one-element array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct qed_ll2_tx_packet, instead of a one-element array and use the struct_size() helper to calculate the size for the allocations. Commit f5823fe6897c ("qed: Add ll2 option to limit the number of bds per packet") was used as a reference point for these changes. Also, it's important to notice that flexible-array members should occur last in any structure, and structures containing such arrays and that are members of other structures, must also occur last in the containing structure. That's why _cur_completing_packet_ is now moved to the bottom in struct qed_ll2_tx_queue. _descq_mem_ and _cur_send_packet_ are also moved for unification. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays Tested-by: kernel test robot Link: https://lore.kernel.org/lkml/5f707198.PA1UCZ8MYozYZYAR%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit b4c5f83ae3f3e2b3239751c304e424eace62448b Author: Rusaimi Amira Ruslan Date: Mon Sep 28 18:12:12 2020 +0800 stmmac: intel: Adding ref clock 1us tic for LPI cntr Adding reference clock (1us tic) for all LPI timer on Intel platforms. The reference clock is derived from ptp clk. This also enables all LPI counter. Signed-off-by: Rusaimi Amira Ruslan Signed-off-by: Voon Weifeng Signed-off-by: David S. Miller commit 3f53094ded4a78c87f9dada995e01cc491c196dd Merge: 280095713ce24 bf8fd8d326859 Author: David S. Miller Date: Mon Sep 28 18:34:56 2020 -0700 Merge branch 'net-ipa-miscellaneous-cleanups' Alex Elder says: ==================== net: ipa: miscellaneous cleanups This series contains some minor cleanups I've been meaning to get around to for a while. The first few remove the definitions of some currently-unused symbols. Several fix some warnings that are reported when the build is done with "W=2". All are simple and have no effect on the operation of the code. ==================== Signed-off-by: David S. Miller commit bf8fd8d3268592ce3583567f22175423102186ba Author: Alex Elder Date: Mon Sep 28 18:04:46 2020 -0500 net: ipa: fix two comments In ipa_uc_response_hdlr() a comment uses the wrong function name when it describes where a clock reference is taken. Fix this. Also fix the comment in ipa_uc_response_hdlr() to correctly refer to ipa_uc_setup(), which is where the clock reference described here is taken. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 84cec844b87e762bf69654468372fafe6a26d5ef Author: Alex Elder Date: Mon Sep 28 18:04:45 2020 -0500 net: ipa: rename a phandle variable When "W=2" is supplied to the build command, we get a warning about shadowing a global declaration (of a typedef) for a variable defined in ipa_probe(). Rename the variable to get rid of the warning. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 993cac15d1194b7ff03da67993b82c4b21680739 Author: Alex Elder Date: Mon Sep 28 18:04:44 2020 -0500 net: ipa: fix two mild warnings Fix two spots where a variable "channel_id" is unnecessarily redefined inside loops in "gsi.c". This is warned about if "W=2" is added to the build command. Note that this problem is harmless, so there's no need to backport it as a bugfix. Remove a comment in gsi_init() about waking the system; the GSI interrupt does not wake the system any more. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit fb980ef7415fd9ff00c5aef05a52358b0dea762d Author: Alex Elder Date: Mon Sep 28 18:04:43 2020 -0500 net: ipa: share field mask values for GSI general interrupt The GSI general interrupt is managed by three registers: enable; status; and clear. The three registers have same set of field bits at the same locations. Use a common set of field masks for all three registers to avoid duplication. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit d61bb7166d246241451644c2f7a730f743c8bbfa Author: Alex Elder Date: Mon Sep 28 18:04:42 2020 -0500 net: ipa: share field mask values for GSI global interrupt The GSI global interrupt is managed by three registers: enable; status; and clear. The three registers have same set of field bits at the same locations. Use a common set of field masks for all three registers to avoid duplication. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit e6580d0eb7f479473c9fdc1da0a2ac37ccf00d6e Author: Alex Elder Date: Mon Sep 28 18:04:41 2020 -0500 net: ipa: share field mask values for GSI interrupt type The GSI interrupt type register and interrupt type mask register have the same field bits at the same locations. Use a common set of field masks for both registers rather than essentially duplicating them. The only place the interrupt mask register uses any of these is in gsi_irq_enable(). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit e0ebe204916a0f9915185268ad4735eaa7adc59d Author: Alex Elder Date: Mon Sep 28 18:04:40 2020 -0500 net: ipa: remove unused status structure field masks Most of the field masks used for fields in a status structure are unused. Remove their definitions; we can add them back again when we actually use them to handle arriving status messages. These are warned about if "W=2" is added to the build command. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit ab4f71e519ddd06bde81289e74a22d23819befd1 Author: Alex Elder Date: Mon Sep 28 18:04:39 2020 -0500 net: ipa: kill unused status exceptions Only the deaggregation status exception type is ever actually used. If any other status exception type is reported we basically ignore it, and consume the packet. Remove the unused definitions of status exception type symbols; they can be added back when we actually handle them. Separately, two consecutive if statements test the same condition near the top of ipa_endpoint_suspend_one(). Instead, use a single test with a block that combines the previously-separate lines of code. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 4592139028a6d5febf7b545fbc17e8e1f6a127df Author: Alex Elder Date: Mon Sep 28 18:04:38 2020 -0500 net: ipa: kill unused status opcodes Three status opcodes are not currently supported. Symbols representing their numeric values are defined but never used. Remove those unused definitions; they can be defined again when they actually get used. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 901594589fe6f9e3404724d51b372c0eb7ebadeb Author: Alex Elder Date: Mon Sep 28 18:04:37 2020 -0500 net: ipa: kill definition of TRE_FLAGS_IEOB_FMASK In "gsi_trans.c", the field mask TRE_FLAGS_IEOB_FMASK is defined but never used. Although there's no harm in defining this, remove it for now and redefine it at some future date if it becomes needed. This is warned about if "W=2" is added to the build command. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 98b972d20a279f040e34ab86a10a25a729b75862 Merge: a871b04310248 b72091bd4ee4f Author: Alexei Starovoitov Date: Mon Sep 28 18:26:59 2020 -0700 Merge branch 'bpf: add helpers to support BTF-based kernel' Alan Maguire says: ==================== This series attempts to provide a simple way for BPF programs (and in future other consumers) to utilize BPF Type Format (BTF) information to display kernel data structures in-kernel. The use case this functionality is applied to here is to support a snprintf()-like helper to copy a BTF representation of kernel data to a string, and a BPF seq file helper to display BTF data for an iterator. There is already support in kernel/bpf/btf.c for "show" functionality; the changes here generalize that support from seq-file specific verifier display to the more generic case and add another specific use case; rather than seq_printf()ing the show data, it is copied to a supplied string using a snprintf()-like function. Other future consumers of the show functionality could include a bpf_printk_btf() function which printk()ed the data instead. Oops messaging in particular would be an interesting application for such functionality. The above potential use case hints at a potential reply to a reasonable objection that such typed display should be solved by tracing programs, where the in-kernel tracing records data and the userspace program prints it out. While this is certainly the recommended approach for most cases, I believe having an in-kernel mechanism would be valuable also. Critically in BPF programs it greatly simplifies debugging and tracing of such data to invoking a simple helper. One challenge raised in an earlier iteration of this work - where the BTF printing was implemented as a printk() format specifier - was that the amount of data printed per printk() was large, and other format specifiers were far simpler. Here we sidestep that concern by printing components of the BTF representation as we go for the seq file case, and in the string case the snprintf()-like operation is intended to be a basis for perf event or ringbuf output. The reasons for avoiding bpf_trace_printk are that 1. bpf_trace_printk() strings are restricted in size and cannot display anything beyond trivial data structures; and 2. bpf_trace_printk() is for debugging purposes only. As Alexei suggested, a bpf_trace_puts() helper could solve this in the future but it still would be limited by the 1000 byte limit for traced strings. Default output for an sk_buff looks like this (zeroed fields are omitted): (struct sk_buff){ .transport_header = (__u16)65535, .mac_header = (__u16)65535, .end = (sk_buff_data_t)192, .head = (unsigned char *)0x000000007524fd8b, .data = (unsigned char *)0x000000007524fd8b, .truesize = (unsigned int)768, .users = (refcount_t){ .refs = (atomic_t){ .counter = (int)1, }, }, } Flags can modify aspects of output format; see patch 3 for more details. Changes since v6: - Updated safe data size to 32, object name size to 80. This increases the number of safe copies done, but performance is not a key goal here. WRT name size the largest type name length in bpf-next according to "pahole -s" is 64 bytes, so that still gives room for additional type qualifiers, parens etc within the name limit (Alexei, patch 2) - Remove inlines and converted as many #defines to functions as was possible. In a few cases - btf_show_type_value[s]() specifically - I left these as macros as btf_show_type_value[s]() prepends and appends format strings to the format specifier (in order to include indentation, delimiters etc so a macro makes that simpler (Alexei, patch 2) - Handle btf_resolve_size() error in btf_show_obj_safe() (Alexei, patch 2) - Removed clang loop unroll in BTF snprintf test (Alexei) - switched to using bpf_core_type_id_kernel(type) as suggested by Andrii, and Alexei noted that __builtin_btf_type_id(,1) should be used (patch 4) - Added skip logic if __builtin_btf_type_id is not available (patches 4,8) - Bumped limits on bpf iters to support printing larger structures (Alexei, patch 5) - Updated overflow bpf_iter tests to reflect new iter max size (patch 6) - Updated seq helper to use type id only (Alexei, patch 7) - Updated BTF task iter test to use task struct instead of struct fs_struct since new limits allow a task_struct to be displayed (patch 8) - Fixed E2BIG handling in iter task (Alexei, patch 8) Changes since v5: - Moved btf print prepare into patch 3, type show seq with flags into patch 2 (Alexei, patches 2,3) - Fixed build bot warnings around static declarations and printf attributes - Renamed functions to snprintf_btf/seq_printf_btf (Alexei, patches 3-6) Changes since v4: - Changed approach from a BPF trace event-centric design to one utilizing a snprintf()-like helper and an iter helper (Alexei, patches 3,5) - Added tests to verify BTF output (patch 4) - Added support to tests for verifying BTF type_id-based display as well as type name via __builtin_btf_type_id (Andrii, patch 4). - Augmented task iter tests to cover the BTF-based seq helper. Because a task_struct's BTF-based representation would overflow the PAGE_SIZE limit on iterator data, the "struct fs_struct" (task->fs) is displayed for each task instead (Alexei, patch 6). Changes since v3: - Moved to RFC since the approach is different (and bpf-next is closed) - Rather than using a printk() format specifier as the means of invoking BTF-enabled display, a dedicated BPF helper is used. This solves the issue of printk() having to output large amounts of data using a complex mechanism such as BTF traversal, but still provides a way for the display of such data to be achieved via BPF programs. Future work could include a bpf_printk_btf() function to invoke display via printk() where the elements of a data structure are printk()ed one at a time. Thanks to Petr Mladek, Andy Shevchenko and Rasmus Villemoes who took time to look at the earlier printk() format-specifier-focused version of this and provided feedback clarifying the problems with that approach. - Added trace id to the bpf_trace_printk events as a means of separating output from standard bpf_trace_printk() events, ensuring it can be easily parsed by the reader. - Added bpf_trace_btf() helper tests which do simple verification of the various display options. Changes since v2: - Alexei and Yonghong suggested it would be good to use probe_kernel_read() on to-be-shown data to ensure safety during operation. Safe copy via probe_kernel_read() to a buffer object in "struct btf_show" is used to support this. A few different approaches were explored including dynamic allocation and per-cpu buffers. The downside of dynamic allocation is that it would be done during BPF program execution for bpf_trace_printk()s using %pT format specifiers. The problem with per-cpu buffers is we'd have to manage preemption and since the display of an object occurs over an extended period and in printk context where we'd rather not change preemption status, it seemed tricky to manage buffer safety while considering preemption. The approach of utilizing stack buffer space via the "struct btf_show" seemed like the simplest approach. The stack size of the associated functions which have a "struct btf_show" on their stack to support show operation (btf_type_snprintf_show() and btf_type_seq_show()) stays under 500 bytes. The compromise here is the safe buffer we use is small - 256 bytes - and as a result multiple probe_kernel_read()s are needed for larger objects. Most objects of interest are smaller than this (e.g. "struct sk_buff" is 224 bytes), and while task_struct is a notable exception at ~8K, performance is not the priority for BTF-based display. (Alexei and Yonghong, patch 2). - safe buffer use is the default behaviour (and is mandatory for BPF) but unsafe display - meaning no safe copy is done and we operate on the object itself - is supported via a 'u' option. - pointers are prefixed with 0x for clarity (Alexei, patch 2) - added additional comments and explanations around BTF show code, especially around determining whether objects such zeroed. Also tried to comment safe object scheme used. (Yonghong, patch 2) - added late_initcall() to initialize vmlinux BTF so that it would not have to be initialized during printk operation (Alexei, patch 5) - removed CONFIG_BTF_PRINTF config option as it is not needed; CONFIG_DEBUG_INFO_BTF can be used to gate test behaviour and determining behaviour of type-based printk can be done via retrieval of BTF data; if it's not there BTF was unavailable or broken (Alexei, patches 4,6) - fix bpf_trace_printk test to use vmlinux.h and globals via skeleton infrastructure, removing need for perf events (Andrii, patch 8) Changes since v1: - changed format to be more drgn-like, rendering indented type info along with type names by default (Alexei) - zeroed values are omitted (Arnaldo) by default unless the '0' modifier is specified (Alexei) - added an option to print pointer values without obfuscation. The reason to do this is the sysctls controlling pointer display are likely to be irrelevant in many if not most tracing contexts. Some questions on this in the outstanding questions section below... - reworked printk format specifer so that we no longer rely on format %pT but instead use a struct * which contains type information (Rasmus). This simplifies the printk parsing, makes use more dynamic and also allows specification by BTF id as well as name. - removed incorrect patch which tried to fix dereferencing of resolved BTF info for vmlinux; instead we skip modifiers for the relevant case (array element type determination) (Alexei). - fixed issues with negative snprintf format length (Rasmus) - added test cases for various data structure formats; base types, typedefs, structs, etc. - tests now iterate through all typedef, enum, struct and unions defined for vmlinux BTF and render a version of the target dummy value which is either all zeros or all 0xff values; the idea is this exercises the "skip if zero" and "print everything" cases. - added support in BPF for using the %pT format specifier in bpf_trace_printk() - added BPF tests which ensure %pT format specifier use works (Alexei). ==================== Signed-off-by: Alexei Starovoitov commit b72091bd4ee4f4bfdb50468b7465cbc5a7b4442b Author: Alan Maguire Date: Mon Sep 28 12:31:10 2020 +0100 selftests/bpf: Add test for bpf_seq_printf_btf helper Add a test verifying iterating over tasks and displaying BTF representation of task_struct succeeds. Suggested-by: Alexei Starovoitov Signed-off-by: Alan Maguire Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1601292670-1616-9-git-send-email-alan.maguire@oracle.com commit eb411377aed9e27835e77ee0710ee8f4649958f3 Author: Alan Maguire Date: Mon Sep 28 12:31:09 2020 +0100 bpf: Add bpf_seq_printf_btf helper A helper is added to allow seq file writing of kernel data structures using vmlinux BTF. Its signature is long bpf_seq_printf_btf(struct seq_file *m, struct btf_ptr *ptr, u32 btf_ptr_size, u64 flags); Flags and struct btf_ptr definitions/use are identical to the bpf_snprintf_btf helper, and the helper returns 0 on success or a negative error value. Suggested-by: Alexei Starovoitov Signed-off-by: Alan Maguire Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1601292670-1616-8-git-send-email-alan.maguire@oracle.com commit eb58bbf2e5c7917aa30bf8818761f26bbeeb2290 Author: Alan Maguire Date: Mon Sep 28 12:31:08 2020 +0100 selftests/bpf: Fix overflow tests to reflect iter size increase bpf iter size increase to PAGE_SIZE << 3 means overflow tests assuming page size need to be bumped also. Signed-off-by: Alan Maguire Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1601292670-1616-7-git-send-email-alan.maguire@oracle.com commit af65320948b848dd1ae65eb4bc3e164c53e741d8 Author: Alan Maguire Date: Mon Sep 28 12:31:07 2020 +0100 bpf: Bump iter seq size to support BTF representation of large data structures BPF iter size is limited to PAGE_SIZE; if we wish to display BTF-based representations of larger kernel data structures such as task_struct, this will be insufficient. Suggested-by: Alexei Starovoitov Signed-off-by: Alan Maguire Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1601292670-1616-6-git-send-email-alan.maguire@oracle.com commit 076a95f5aff2ce7299d1966dee06de2723554c24 Author: Alan Maguire Date: Mon Sep 28 12:31:06 2020 +0100 selftests/bpf: Add bpf_snprintf_btf helper tests Tests verifying snprintf()ing of various data structures, flags combinations using a tp_btf program. Tests are skipped if __builtin_btf_type_id is not available to retrieve BTF type ids. Signed-off-by: Alan Maguire Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1601292670-1616-5-git-send-email-alan.maguire@oracle.com commit c4d0bfb45068d853a478b9067a95969b1886a30f Author: Alan Maguire Date: Mon Sep 28 12:31:05 2020 +0100 bpf: Add bpf_snprintf_btf helper A helper is added to support tracing kernel type information in BPF using the BPF Type Format (BTF). Its signature is long bpf_snprintf_btf(char *str, u32 str_size, struct btf_ptr *ptr, u32 btf_ptr_size, u64 flags); struct btf_ptr * specifies - a pointer to the data to be traced - the BTF id of the type of data pointed to - a flags field is provided for future use; these flags are not to be confused with the BTF_F_* flags below that control how the btf_ptr is displayed; the flags member of the struct btf_ptr may be used to disambiguate types in kernel versus module BTF, etc; the main distinction is the flags relate to the type and information needed in identifying it; not how it is displayed. For example a BPF program with a struct sk_buff *skb could do the following: static struct btf_ptr b = { }; b.ptr = skb; b.type_id = __builtin_btf_type_id(struct sk_buff, 1); bpf_snprintf_btf(str, sizeof(str), &b, sizeof(b), 0, 0); Default output looks like this: (struct sk_buff){ .transport_header = (__u16)65535, .mac_header = (__u16)65535, .end = (sk_buff_data_t)192, .head = (unsigned char *)0x000000007524fd8b, .data = (unsigned char *)0x000000007524fd8b, .truesize = (unsigned int)768, .users = (refcount_t){ .refs = (atomic_t){ .counter = (int)1, }, }, } Flags modifying display are as follows: - BTF_F_COMPACT: no formatting around type information - BTF_F_NONAME: no struct/union member names/types - BTF_F_PTR_RAW: show raw (unobfuscated) pointer values; equivalent to %px. - BTF_F_ZERO: show zero-valued struct/union members; they are not displayed by default Signed-off-by: Alan Maguire Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1601292670-1616-4-git-send-email-alan.maguire@oracle.com commit 31d0bc81637d8d974a6dad9827b765b4b70c89d7 Author: Alan Maguire Date: Mon Sep 28 12:31:04 2020 +0100 bpf: Move to generic BTF show support, apply it to seq files/strings generalize the "seq_show" seq file support in btf.c to support a generic show callback of which we support two instances; the current seq file show, and a show with snprintf() behaviour which instead writes the type data to a supplied string. Both classes of show function call btf_type_show() with different targets; the seq file or the string to be written. In the string case we need to track additional data - length left in string to write and length to return that we would have written (a la snprintf). By default show will display type information, field members and their types and values etc, and the information is indented based upon structure depth. Zeroed fields are omitted. Show however supports flags which modify its behaviour: BTF_SHOW_COMPACT - suppress newline/indent. BTF_SHOW_NONAME - suppress show of type and member names. BTF_SHOW_PTR_RAW - do not obfuscate pointer values. BTF_SHOW_UNSAFE - do not copy data to safe buffer before display. BTF_SHOW_ZERO - show zeroed values (by default they are not shown). Signed-off-by: Alan Maguire Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1601292670-1616-3-git-send-email-alan.maguire@oracle.com commit 76654e67f3a01c50dc13dd6dea75e58943413956 Author: Alan Maguire Date: Mon Sep 28 12:31:03 2020 +0100 bpf: Provide function to get vmlinux BTF information It will be used later for BPF structure display support Signed-off-by: Alan Maguire Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1601292670-1616-2-git-send-email-alan.maguire@oracle.com commit a871b04310248024e022e104eba3ec81d144cc64 Author: Andrii Nakryiko Date: Fri Sep 25 18:13:54 2020 -0700 libbpf: Add btf__new_empty() to create an empty BTF object Add an ability to create an empty BTF object from scratch. This is going to be used by pahole for BTF encoding. And also by selftest for convenient creation of BTF objects. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200926011357.2366158-7-andriin@fb.com commit 919d2b1dbb074d438027135ba644411931179a59 Author: Andrii Nakryiko Date: Fri Sep 25 18:13:53 2020 -0700 libbpf: Allow modification of BTF and add btf__add_str API Allow internal BTF representation to switch from default read-only mode, in which raw BTF data is a single non-modifiable block of memory with BTF header, types, and strings layed out sequentially and contiguously in memory, into a writable representation with types and strings data split out into separate memory regions, that can be dynamically expanded. Such writable internal representation is transparent to users of libbpf APIs, but allows to append new types and strings at the end of BTF, which is a typical use case when generating BTF programmatically. All the basic guarantees of BTF types and strings layout is preserved, i.e., user can get `struct btf_type *` pointer and read it directly. Such btf_type pointers might be invalidated if BTF is modified, so some care is required in such mixed read/write scenarios. Switch from read-only to writable configuration happens automatically the first time when user attempts to modify BTF by either adding a new type or new string. It is still possible to get raw BTF data, which is a single piece of memory that can be persisted in ELF section or into a file as raw BTF. Such raw data memory is also still owned by BTF and will be freed either when BTF object is freed or if another modification to BTF happens, as any modification invalidates BTF raw representation. This patch adds the first two BTF manipulation APIs: btf__add_str(), which allows to add arbitrary strings to BTF string section, and btf__find_str() which allows to find existing string offset, but not add it if it's missing. All the added strings are automatically deduplicated. This is achieved by maintaining an additional string lookup index for all unique strings. Such index is built when BTF is switched to modifiable mode. If at that time BTF strings section contained duplicate strings, they are not de-duplicated. This is done specifically to not modify the existing content of BTF (types, their string offsets, etc), which can cause confusion and is especially important property if there is struct btf_ext associated with struct btf. By following this "imperfect deduplication" process, btf_ext is kept consitent and correct. If deduplication of strings is necessary, it can be forced by doing BTF deduplication, at which point all the strings will be eagerly deduplicated and all string offsets both in struct btf and struct btf_ext will be updated. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200926011357.2366158-6-andriin@fb.com commit 7d9c71e10baa3496d95226aa3bba668f7533ec70 Author: Andrii Nakryiko Date: Fri Sep 25 18:13:52 2020 -0700 libbpf: Extract generic string hashing function for reuse Calculating a hash of zero-terminated string is a common need when using hashmap, so extract it for reuse. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200926011357.2366158-5-andriin@fb.com commit 192f5a1fe6894dca58d14dc883e6c7030e7267f7 Author: Andrii Nakryiko Date: Fri Sep 25 18:13:51 2020 -0700 libbpf: Generalize common logic for managing dynamically-sized arrays Managing dynamically-sized array is a common, but not trivial functionality, which significant amount of logic and code to implement properly. So instead of re-implementing it all the time, extract it into a helper function ans reuse. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200926011357.2366158-4-andriin@fb.com commit b86042478fa083d87f1b67047e788d70b8c81eef Author: Andrii Nakryiko Date: Fri Sep 25 18:13:50 2020 -0700 libbpf: Remove assumption of single contiguous memory for BTF data Refactor internals of struct btf to remove assumptions that BTF header, type data, and string data are layed out contiguously in a memory in a single memory allocation. Now we have three separate pointers pointing to the start of each respective are: header, types, strings. In the next patches, these pointers will be re-assigned to point to independently allocated memory areas, if BTF needs to be modified. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200926011357.2366158-3-andriin@fb.com commit 740e69c3c511aa207155ba993a854b5bee79cdc2 Author: Andrii Nakryiko Date: Fri Sep 25 18:13:49 2020 -0700 libbpf: Refactor internals of BTF type index Refactor implementation of internal BTF type index to not use direct pointers. Instead it uses offset relative to the start of types data section. This allows for types data to be reallocatable, enabling implementation of modifiable BTF. As now getting type by ID has an extra indirection step, convert all internal type lookups to a new helper btf_type_id(), that returns non-const pointer to a type by its ID. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200926011357.2366158-2-andriin@fb.com commit 06c14f5c2d311100a447caf60ecbcf558e4e60fe Merge: 200a2186b6271 09e872d558ba6 Author: Dave Airlie Date: Tue Sep 29 10:23:49 2020 +1000 Merge tag 'mediatek-drm-next-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 5.10 1. Move Mediatek HDMI PHY driver from DRM folder to PHY folder 2. Convert mtk-dpi to drm_bridge API 3. Disable tmds on mt2701 Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20200914231227.30500-1-chunkuang.hu@kernel.org commit 200a2186b62714c099693dcb6444af373eaabf62 Author: Rob Clark Date: Mon Sep 28 17:19:12 2020 -0700 drm/msm: fix 32b build warns Neither of these code-paths apply to older 32b devices, but it is rude to introduce warnings. Signed-off-by: Rob Clark Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200929001925.2916984-1-robdclark@gmail.com commit b000def2e052fc8ddea31a18019f6ebe044defb3 Author: Toke Høiland-Jørgensen Date: Fri Sep 25 23:25:11 2020 +0200 selftests: Remove fmod_ret from test_overhead The test_overhead prog_test included an fmod_ret program that attached to __set_task_comm() in the kernel. However, this function was never listed as allowed for return modification, so this only worked because of the verifier skipping tests when a trampoline already existed for the attach point. Now that the verifier checks have been fixed, remove fmod_ret from the test so it works again. Fixes: 4eaf0b5c5e04 ("selftest/bpf: Fmod_ret prog and implement test_overhead as part of bench") Acked-by: Andrii Nakryiko Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov commit 91d0ca3d6b523ec409b9af62468886d4e1a7d0dd Merge: 32e4d9df60f71 d1ea914925856 Author: Dave Airlie Date: Tue Sep 29 10:18:49 2020 +1000 Merge tag 'drm-msm-next-2020-09-27' of https://gitlab.freedesktop.org/drm/msm into drm-next * DSI support for sm8150/sm8250 * Support for per-process GPU pagetables (finally!) for a6xx. There are still some iommu/arm-smmu changes required to enable, without which it will fallback to the current single pgtable state. The first part (ie. what doesn't depend on drm side patches) is queued up for v5.10[1]. * DisplayPort support. Userspace DP compliance tool support is already merged in IGT[2] * The usual assortment of smaller fixes/cleanups Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvqjuzH=Po_9EzzFsp2Xq3tqJUTKfsA2g09XY7_+6Ypfw@mail.gmail.com commit f7b12b6fea00988496b7606d4964cd77beef46a5 Author: Toke Høiland-Jørgensen Date: Fri Sep 25 23:25:02 2020 +0200 bpf: verifier: refactor check_attach_btf_id() The check_attach_btf_id() function really does three things: 1. It performs a bunch of checks on the program to ensure that the attachment is valid. 2. It stores a bunch of state about the attachment being requested in the verifier environment and struct bpf_prog objects. 3. It allocates a trampoline for the attachment. This patch splits out (1.) and (3.) into separate functions which will perform the checks, but return the computed values instead of directly modifying the environment. This is done in preparation for reusing the checks when the actual attachment is happening, which will allow tracing programs to have multiple (compatible) attachments. This also fixes a bug where a bunch of checks were skipped if a trampoline already existed for the tracing target. Fixes: 6ba43b761c41 ("bpf: Attachment verification for BPF_MODIFY_RETURN") Fixes: 1e6c62a88215 ("bpf: Introduce sleepable BPF programs") Acked-by: Andrii Nakryiko Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov commit efc68158c429f37d87fd02ee9a26913c78546fc9 Author: Toke Høiland-Jørgensen Date: Fri Sep 25 23:25:01 2020 +0200 bpf: change logging calls from verbose() to bpf_log() and use log pointer In preparation for moving code around, change a bunch of references to env->log (and the verbose() logging helper) to use bpf_log() and a direct pointer to struct bpf_verifier_log. While we're touching the function signature, mark the 'prog' argument to bpf_check_type_match() as const. Also enhance the bpf_verifier_log_needed() check to handle NULL pointers for the log struct so we can re-use the code with logging disabled. Acked-by: Andrii Nakryiko Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov commit 1af9270e908cd50a4f5d815c9b6f794c7d57ed07 Author: Toke Høiland-Jørgensen Date: Fri Sep 25 23:25:00 2020 +0200 bpf: disallow attaching modify_return tracing functions to other BPF programs From the checks and commit messages for modify_return, it seems it was never the intention that it should be possible to attach a tracing program with expected_attach_type == BPF_MODIFY_RETURN to another BPF program. However, check_attach_modify_return() will only look at the function name, so if the target function starts with "security_", the attach will be allowed even for bpf2bpf attachment. Fix this oversight by also blocking the modification if a target program is supplied. Fixes: 18644cec714a ("bpf: Fix use-after-free in fmod_ret check") Fixes: 6ba43b761c41 ("bpf: Attachment verification for BPF_MODIFY_RETURN") Acked-by: Andrii Nakryiko Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov commit 84a20d8e8795b45e3f1673648d43b4cf0f594359 Merge: efa90b50934c9 5b87adc3ceee3 Author: Alexei Starovoitov Date: Mon Sep 28 16:40:47 2020 -0700 Merge branch 'Sockmap copying' Lorenz Bauer says: ==================== Changes in v2: - Check sk_fullsock in map_update_elem (Martin) Enable calling map_update_elem on sockmaps from bpf_iter context. This in turn allows us to copy a sockmap by iterating its elements. The change itself is tiny, all thanks to the ground work from Martin, whose series [1] this patch is based on. I updated the tests to do some copying, and also included two cleanups. I'm sending this out now rather than when Martin's series has landed because I hope this can get in before the merge window (potentially) closes this weekend. 1: https://lore.kernel.org/bpf/20200925000337.3853598-1-kafai@fb.com/ ==================== Signed-off-by: Alexei Starovoitov commit 5b87adc3ceee3c3131e24e9bc9ef92dd41db089f Author: Lorenz Bauer Date: Mon Sep 28 10:08:05 2020 +0100 selftest: bpf: Test copying a sockmap and sockhash Since we can now call map_update_elem(sockmap) from bpf_iter context it's possible to copy a sockmap or sockhash in the kernel. Add a selftest which exercises this. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200928090805.23343-5-lmb@cloudflare.com commit 27870317337a6c24af503304620de8064c8d2e4a Author: Lorenz Bauer Date: Mon Sep 28 10:08:04 2020 +0100 selftests: bpf: Remove shared header from sockmap iter test The shared header to define SOCKMAP_MAX_ENTRIES is a bit overkill. Dynamically allocate the sock_fd array based on bpf_map__max_entries instead. Suggested-by: Yonghong Song Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200928090805.23343-4-lmb@cloudflare.com commit 26c3270ddb4955be358c888766ad1a6105dd7469 Author: Lorenz Bauer Date: Mon Sep 28 10:08:03 2020 +0100 selftests: bpf: Add helper to compare socket cookies We compare socket cookies to ensure that insertion into a sockmap worked. Pull this out into a helper function for use in other tests. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200928090805.23343-3-lmb@cloudflare.com commit 6550f2dddfab02a5b948369eeeaedfbc4ae3cc16 Author: Lorenz Bauer Date: Mon Sep 28 10:08:02 2020 +0100 bpf: sockmap: Enable map_update_elem from bpf_iter Allow passing a pointer to a BTF struct sock_common* when updating a sockmap or sockhash. Since BTF pointers can fault and therefore be NULL at runtime we need to add an additional !sk check to sock_map_update_elem. Since we may be passed a request or timewait socket we also need to check sk_fullsock. Doing this allows calling map_update_elem on sockmap from bpf_iter context, which uses BTF pointers. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200928090805.23343-2-lmb@cloudflare.com commit 2c2b364fddd551f0da98953618e264c098dfa140 Author: Artur Rojek Date: Mon Sep 28 16:12:46 2020 -0700 Input: joystick - add ADC attached joystick driver. Add a driver for joystick devices connected to ADC controllers supporting the Industrial I/O subsystem. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Tested-by: Heiko Stuebner Link: https://lore.kernel.org/r/20200927123302.31062-2-contact@artur-rojek.eu Signed-off-by: Dmitry Torokhov commit 7956b0d4694fb4bf75c4b1b4bcb6cf7092bd5195 Author: Artur Rojek Date: Mon Sep 28 16:09:09 2020 -0700 dt-bindings: input: Add docs for ADC driven joystick Add documentation for the adc-joystick driver, used to provide support for joysticks connected over ADC. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200927123302.31062-1-contact@artur-rojek.eu Signed-off-by: Dmitry Torokhov commit 280095713ce244e8dbdfb059cdca695baa72230a Merge: b9cd795b0e486 46899bde9f42a Author: David S. Miller Date: Mon Sep 28 16:06:08 2020 -0700 Merge branch 'ibmvnic-refactor-some-send-handle-functions' Lijun Pan says: ==================== ibmvnic: refactor some send/handle functions This patch series rename and factor some send crq request functions. The new naming aligns better with handle* functions such that it make the code easier to read and search by new contributors. ==================== Signed-off-by: David S. Miller commit 46899bde9f42a965158bb9434672fc66834fb8e6 Author: Lijun Pan Date: Sun Sep 27 20:13:30 2020 -0500 ibmvnic: create send_control_ip_offload Factor send_control_ip_offload out of handle_query_ip_offload_rsp. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 16e811fe0fc6b8344785feb2ab8c927685dca08e Author: Lijun Pan Date: Sun Sep 27 20:13:29 2020 -0500 ibmvnic: create send_query_ip_offload Factor send_query_ip_offload out of handle_request_cap_rsp to pair with handle_query_ip_offload_rsp. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 69980d021c47635058e3c1c37161bc8439d32606 Author: Lijun Pan Date: Sun Sep 27 20:13:28 2020 -0500 ibmvnic: rename send_map_query to send_query_map The new name send_query_map pairs with handle_query_map_rsp. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 09081b9d3ab9d7a8c67b1cbbd4287e02304dd642 Author: Lijun Pan Date: Sun Sep 27 20:13:27 2020 -0500 ibmvnic: rename ibmvnic_send_req_caps to send_request_cap The new name send_request_cap pairs with handle_request_cap_rsp. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 491099ad74e6d3de96b887766600930f9f0cabf5 Author: Lijun Pan Date: Sun Sep 27 20:13:26 2020 -0500 ibmvnic: rename send_cap_queries to send_query_cap The new name send_query_cap pairs with handle_query_cap_rsp. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit b9cd795b0e4860f482bf3741d12e1c8f3ec1cfc9 Author: Lijun Pan Date: Sun Sep 27 19:06:25 2020 -0500 ibmvnic: set up 200GBPS speed Set up the speed according to crq->query_phys_parms.rsp.speed. Fix IBMVNIC_10GBPS typo. Fixes: f8d6ae0d27ec ("ibmvnic: Report actual backing device speed and duplex values") Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 7028977965f146570c88125928cc5ed9781d0477 Author: Rikard Falkeborn Date: Sun Sep 27 23:10:42 2020 +0200 atm: atmtcp: Constify atmtcp_v_dev_ops The only usage of atmtcp_v_dev_ops is to pass its address to atm_dev_register() which takes a pointer to const, and comparing its address to another address, which does not modify it. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: David S. Miller commit e5f7e211b6aa19d5398abe3d91a508bf7f06ed54 Author: Davide Caratti Date: Sun Sep 27 16:08:21 2020 +0200 ip6gre: avoid tx_error when sending MLD/DAD on external tunnels similarly to what has been done with commit 9d149045b3c0 ("geneve: change from tx_error to tx_dropped on missing metadata"), avoid reporting errors to userspace in case the kernel doesn't find any tunnel information for a skb that is going to be transmitted: an increase of tx_dropped is enough. tested with the following script: # for t in ip6gre ip6gretap ip6erspan; do > ip link add dev gre6-test0 type $t external > ip address add dev gre6-test0 2001:db8::1/64 > ip link set dev gre6-test0 up > sleep 30 > ip -s -j link show dev gre6-test0 | jq \ > '.[0].stats64.tx | {"errors": .errors, "dropped": .dropped}' > ip link del dev gre6-test0 > done Reported-by: Jianlin Shi Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit f534d98b9d27053279da015d0187a09e3a090ccd Author: Jean-Philippe Brucker Date: Fri Sep 18 12:18:51 2020 +0200 iommu/arm-smmu-v3: Add SVA device feature Implement the IOMMU device feature callbacks to support the SVA feature. At the moment dev_has_feat() returns false since I/O Page Faults and BTM aren't yet implemented. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200918101852.582559-12-jean-philippe@linaro.org Signed-off-by: Will Deacon commit d744f9e6c222c8086376bc56c86e4380595350bd Author: Jean-Philippe Brucker Date: Fri Sep 18 12:18:50 2020 +0200 iommu/arm-smmu-v3: Check for SVA features Aggregate all sanity-checks for sharing CPU page tables with the SMMU under a single ARM_SMMU_FEAT_SVA bit. For PCIe SVA, users also need to check FEAT_ATS and FEAT_PRI. For platform SVA, they will have to check FEAT_STALLS. Introduce ARM_SMMU_FEAT_BTM (Broadcast TLB Maintenance), but don't enable it at the moment. Since the entire VMID space is shared with the CPU, enabling DVM (by clearing SMMU_CR2.PTM) could result in over-invalidation and affect performance of stage-2 mappings. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Jonathan Cameron Cc: Suzuki K Poulose Link: https://lore.kernel.org/r/20200918101852.582559-11-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 3e63033675c9b1e79b14655481a8c4ecaf23821f Author: Jean-Philippe Brucker Date: Fri Sep 18 12:18:49 2020 +0200 iommu/arm-smmu-v3: Seize private ASID The SMMU has a single ASID space, the union of shared and private ASID sets. This means that the SMMU driver competes with the arch allocator for ASIDs. Shared ASIDs are those of Linux processes, allocated by the arch, and contribute in broadcast TLB maintenance. Private ASIDs are allocated by the SMMU driver and used for "classic" map/unmap DMA. They require command-queue TLB invalidations. When we pin down an mm_context and get an ASID that is already in use by the SMMU, it belongs to a private context. We used to simply abort the bind, but this is unfair to users that would be unable to bind a few seemingly random processes. Try to allocate a new private ASID for the context, and make the old ASID shared. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200918101852.582559-10-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 3f1ce8e85ee06dbe6a8b2e037e9b35f6b32e9ab3 Author: Jean-Philippe Brucker Date: Fri Sep 18 12:18:48 2020 +0200 iommu/arm-smmu-v3: Share process page tables With Shared Virtual Addressing (SVA), we need to mirror CPU TTBR, TCR, MAIR and ASIDs in SMMU contexts. Each SMMU has a single ASID space split into two sets, shared and private. Shared ASIDs correspond to those obtained from the arch ASID allocator, and private ASIDs are used for "classic" map/unmap DMA. A possible conflict happens when trying to use a shared ASID that has already been allocated for private use by the SMMU driver. This will be addressed in a later patch by replacing the private ASID. At the moment we return -EBUSY. Each mm_struct shared with the SMMU will have a single context descriptor. Add a refcount to keep track of this. It will be protected by the global SVA lock. Introduce a new arm-smmu-v3-sva.c file and the CONFIG_ARM_SMMU_V3_SVA option to let users opt in SVA support. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200918101852.582559-9-jean-philippe@linaro.org Signed-off-by: Will Deacon commit e881e7839fba8a8452459a656eca90340cc34a2e Author: Jean-Philippe Brucker Date: Fri Sep 18 12:18:47 2020 +0200 iommu/arm-smmu-v3: Move definitions to a header Allow sharing structure definitions with the upcoming SVA support for Arm SMMUv3, by moving them to a separate header. We could surgically extract only what is needed but keeping all definitions in one place looks nicer. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200918101852.582559-8-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 7cef39ddba73077ef00de24c9f6bfc216658fafe Author: Jean-Philippe Brucker Date: Fri Sep 18 12:18:45 2020 +0200 iommu/io-pgtable-arm: Move some definitions to a header Extract some of the most generic TCR defines, so they can be reused by the page table sharing code. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Jonathan Cameron Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200918101852.582559-6-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 23cce2e00b332a7f434fe9c9f2a9c07aaff2bcd7 Author: Krzysztof Wilczyński Date: Wed Sep 23 02:52:25 2020 +0000 PCI: shpchp: Remove unused 'rc' assignment The value of the constant POWER_FAILURE assigned to the variable rc after the power fault check is never used for anything, so remove it. Addresses-Coverity-ID: 1226899 ("Unused value") Link: https://lore.kernel.org/r/20200923025225.471459-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit be589d04281495e00fd2fa5733076aed459953b7 Merge: 414698f6aa31d e8d726c8e869d Author: David S. Miller Date: Mon Sep 28 15:19:03 2020 -0700 Merge branch 'net-smc-introduce-SMC-Dv2-support' Karsten Graul says: ==================== net/smc: introduce SMC-Dv2 support SMC-Dv2 support (see https://www.ibm.com/support/pages/node/6326337) provides multi-subnet support for SMC-D, eliminating the current same-subnet restriction. The new version detects if any of the virtual ISM devices are on the same system and can therefore be used for an SMC-Dv2 connection. Furthermore, SMC-Dv2 eliminates the need for PNET IDs on s390. ==================== Signed-off-by: David S. Miller commit e8d726c8e869d132a4728d8b82f58213084278f9 Author: Ursula Braun Date: Sat Sep 26 12:44:32 2020 +0200 net/smc: CLC decline - V2 enhancements This patch covers the small SMCD version 2 changes for CLC decline. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit b81a5eb789fca0054c2cb285fdbc3630e8043cde Author: Ursula Braun Date: Sat Sep 26 12:44:31 2020 +0200 net/smc: introduce CLC first contact extension SMC Version 2 defines a first contact extension for CLC accept and CLC confirm. This patch covers sending and receiving of the CLC first contact extension. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit a7c9c5f4af7f6098da68705fc5d86565d0728ef7 Author: Ursula Braun Date: Sat Sep 26 12:44:30 2020 +0200 net/smc: CLC accept / confirm V2 The new format of SMCD V2 CLC accept and confirm is introduced, and building and checking of SMCD V2 CLC accepts / confirms is adapted accordingly. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 5c21c4ccafe85906db809de3af391fd434df8a27 Author: Ursula Braun Date: Sat Sep 26 12:44:29 2020 +0200 net/smc: determine accepted ISM devices SMCD Version 2 allows to propose up to 8 additional ISM devices offered to the peer as candidates for SMCD communication. This patch covers the server side, i.e. selection of an ISM device matching one of the proposed ISM devices, that will be used for CLC accept Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 8c3dca341aea885249e08856c4380300b75d2cf5 Author: Ursula Braun Date: Sat Sep 26 12:44:28 2020 +0200 net/smc: build and send V2 CLC proposal The new format of an SMCD V2 CLC proposal is introduced, and building and checking of SMCD V2 CLC proposals is adapted accordingly. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit d70bf4f7a99e324b8ad515b90dadec447f8c4c75 Author: Ursula Braun Date: Sat Sep 26 12:44:27 2020 +0200 net/smc: determine proposed ISM devices SMCD Version 2 allows to propose up to 8 additional ISM devices offered to the peer as candidates for SMCD communication. This patch covers determination of the ISM devices to be proposed. ISM devices without PNETID are preferred, since ISM devices with PNETID are a V1 leftover and will disappear over the time. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit e888a2e8337c96dd785d204cf8ff775e79173add Author: Ursula Braun Date: Sat Sep 26 12:44:26 2020 +0200 net/smc: introduce list of pnetids for Ethernet devices SMCD version 2 allows usage of ISM devices with hardware PNETID only, if an Ethernet net_device exists with the same hardware PNETID. This requires to maintain a list of pnetids belonging to Ethernet net_devices, which is covered by this patch. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 8caaccf521c160d231587091f1f5e8aef2dd0a5e Author: Ursula Braun Date: Sat Sep 26 12:44:25 2020 +0200 net/smc: introduce CHID callback for ISM devices With SMCD version 2 the CHIDs of ISM devices are needed for the CLC handshake. This patch provides the new callback to retrieve the CHID of an ISM device. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 201091ebb2a161a0e10aab36186690b332941f6a Author: Ursula Braun Date: Sat Sep 26 12:44:24 2020 +0200 net/smc: introduce System Enterprise ID (SEID) SMCD version 2 defines a System Enterprise ID (short SEID). This patch contains the SEID creation and adds the callback to retrieve the created SEID. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 3fc6493761372c5f6ff84d407c58948b8f2ee360 Author: Ursula Braun Date: Sat Sep 26 12:44:23 2020 +0200 net/smc: prepare for more proposed ISM devices SMCD Version 2 allows proposing of up to 8 ISM devices in addition to the native ISM device of SMCD Version 1. This patch prepares the struct smc_init_info to deal with these additional 8 ISM devices. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit e15c6c46dedd7ec307ccc0d38de4743b109adfc6 Author: Ursula Braun Date: Sat Sep 26 12:44:22 2020 +0200 net/smc: split CLC confirm/accept data to be sent When sending CLC confirm and CLC accept, separate the trailing part of the message from the initial part (to be prepared for future first contact extension). Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 7affc809822a4e14b068a7bc6462c5b035e0043d Author: Ursula Braun Date: Sat Sep 26 12:44:21 2020 +0200 net/smc: separate find device functions This patch provides better separation of device determinations in function smc_listen_work(). No functional change. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit f1eb02f952448405e360d94649846668c32364e1 Author: Ursula Braun Date: Sat Sep 26 12:44:20 2020 +0200 net/smc: CLC header fields renaming SMCD version 2 defines 2 more bits in the CLC header to specify version 2 types. This patch prepares better naming of the CLC header fields. No functional change. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit a304e29a2418ea8dd77215f5bc4bc27f4ed8e7da Author: Karsten Graul Date: Sat Sep 26 12:44:19 2020 +0200 net/smc: remove constant and introduce helper to check for a pnet id Use the existing symbol _S instead of SMC_ASCII_BLANK, and introduce a helper to check if a pnetid is set. No functional change. Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 8122dec0eab1d74c726709a2bd4a4a23d9bdd96f Merge: a76a37777f2c9 6f3c4afae9805 Author: Will Deacon Date: Mon Sep 28 23:16:20 2020 +0100 Merge branch 'for-next/svm' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux into for-joerg/arm-smmu/updates Pull in core arm64 changes required to enable Shared Virtual Memory (SVM) using SMMUv3. This brings us increasingly closer to being able to share page-tables directly between user-space tasks running on the CPU and their corresponding contexts on coherent devices performing DMA through the SMMU. Signed-off-by: Will Deacon commit 414698f6aa31d69fe7fe0fda22ac41cb7777eab5 Author: Wang Qing Date: Sat Sep 26 14:49:18 2020 +0800 net: Use kobj_to_dev() API Use kobj_to_dev() instead of container_of(). Signed-off-by: Wang Qing Signed-off-by: David S. Miller commit b5756146db3ad57a9c0e841ea01ce915db27b7de Author: Will Deacon Date: Mon Sep 28 23:02:19 2020 +0100 arm64: mte: Fix typo in memory tagging ABI documentation We offer both PTRACE_PEEKMTETAGS and PTRACE_POKEMTETAGS requests via ptrace(). Reported-by: Andrey Konovalov Signed-off-by: Will Deacon commit 632bb64f126ac181dea66aa6c00c608fd8a0eacf Author: Lorenzo Bianconi Date: Fri Sep 25 16:09:11 2020 +0200 net: mvneta: try to use in-irq pp cache in mvneta_txq_bufs_free Try to recycle the xdp tx buffer into the in-irq page_pool cache if mvneta_txq_bufs_free is executed in the NAPI context for XDP_TX use case Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit a76a37777f2c936b1f046bfc0c5982c958b16bfe Author: Zhou Wang Date: Mon Sep 28 16:32:02 2020 +0800 iommu/arm-smmu-v3: Ensure queue is read after updating prod pointer Reading the 'prod' MMIO register in order to determine whether or not there is valid data beyond 'cons' for a given queue does not provide sufficient dependency ordering, as the resulting access is address dependent only on 'cons' and can therefore be speculated ahead of time, potentially allowing stale data to be read by the CPU. Use readl() instead of readl_relaxed() when updating the shadow copy of the 'prod' pointer, so that all speculated memory reads from the corresponding queue can occur only from valid slots. Signed-off-by: Zhou Wang Link: https://lore.kernel.org/r/1601281922-117296-1-git-send-email-wangzhou1@hisilicon.com [will: Use readl() instead of explicit barrier. Update 'cons' side to match.] Signed-off-by: Will Deacon commit 35d37709f1759c12ef70caae4fb0b110d5238036 Merge: bcbf1be0ad49e cc23f4f0b6b9f Author: David S. Miller Date: Mon Sep 28 14:54:13 2020 -0700 Merge branch '1GbE' of https://github.com/anguy11/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2020-09-28 This series contains updates to igb, igc, and e1000e drivers. Sven Auhagen adds XDP support for igb. Gal Hammer allows for 82576 to display part number string correctly for igb. Sasha adds device IDs for i221 and i226 parts. Exposes LPI counters and removes unused fields in structures for igc. He also adds Meteor Lake support for e1000e. For igc, Andre renames IGC_TSYNCTXCTL_VALID to IGC_TSYNCTXCTL_TXTT_0 to match the datasheet and adds a warning if it's not set when expected. Removes the PTP Tx timestamp check in igc_ptp_tx_work() as it's already checked in the watchdog_task. Cleans up some code by removing invalid error bits, renaming a bit to match datasheet naming, and removing a, now unneeded, macro. Vinicius makes changes for igc PTP: removes calling SYSTIMR to latch timer value, stores PTP time before a reset, and rejects schedules with times in the future. v2: Remove 'inline' from igb_xdp_tx_queue_mapping() and igb_rx_offset() for patch 1 ==================== Signed-off-by: David S. Miller commit 5b2a828b98ec1872799b1b4d82113c76a12d594f Author: Eric Biggers Date: Wed Sep 23 22:47:21 2020 -0700 fscrypt: export fscrypt_d_revalidate() Dentries that represent no-key names must have a dentry_operations that includes fscrypt_d_revalidate(). Currently, this is handled by fscrypt_prepare_lookup() installing fscrypt_d_ops. However, ceph support for encryption (https://lore.kernel.org/r/20200914191707.380444-1-jlayton@kernel.org) can't use fscrypt_d_ops, since ceph already has its own dentry_operations. Similarly, ext4 and f2fs support for directories that are both encrypted and casefolded (https://lore.kernel.org/r/20200923010151.69506-1-drosen@google.com) can't use fscrypt_d_ops either, since casefolding requires some dentry operations too. To satisfy both users, we need to move the responsibility of installing the dentry_operations to filesystems. In preparation for this, export fscrypt_d_revalidate() and give it a !CONFIG_FS_ENCRYPTION stub. Reviewed-by: Jeff Layton Link: https://lore.kernel.org/r/20200924054721.187797-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit cc23f4f0b6b9f7e4d18b27d14de1f2b78e304ce4 Author: Sasha Neftin Date: Thu Aug 13 11:34:06 2020 +0300 e1000e: Add support for Meteor Lake Add devices IDs for the next LOM generations that will be available on the next Intel Client platform (Meteor Lake) This patch provides the initial support for these devices Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 67ea4065db916aba763103c08f965f10c6b230cb Author: Sasha Neftin Date: Thu Sep 10 11:16:05 2020 +0300 igc: Clean up nvm_info structure flash_bank_size and flash_base_addr field not in use and can be removed from a nvm_info structure Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 58c4ee0ea38395aa5d5836b915cb9ce650fbaee3 Author: Vinicius Costa Gomes Date: Wed Sep 2 16:36:57 2020 -0700 igc: Reject schedules with a base_time in the future When we set the BASET registers of i225 with a base_time in the future, i225 will "hold" all packets until that base_time is reached, causing a lot of TX Hangs. As this behaviour seems contrary to the expectations of the IEEE 802.1Q standard (section 8.6.9, especially 8.6.9.4.5), let's start by rejecting these types of schedules. If this is too limiting, we can for example, setup a timer to configure the BASET registers closer to the start time, only blocking the packets for a "short" while. Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit fec49eb4e00ab635ca863ff9cf8c64a44cf168f2 Author: Vinicius Costa Gomes Date: Wed Sep 2 16:36:56 2020 -0700 igc: Export a way to read the PTP timer The next patch will need a way to retrieve the current timestamp from the NIC's PTP clock. The 'i225' suffix is removed, if anything model specific is needed, those specifics should be hidden by this function. Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit f4e55d394aa76b5e33a2c28d8b3b2057fcd25dc3 Author: Sasha Neftin Date: Mon Aug 31 14:53:29 2020 +0300 igc: Remove reset disable flag Boolean reset disable flag not applicable for i225 device and could be removed. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit b03c49cde61f9e5a68cb0b1f3540fcb20b27b6fa Author: Vinicius Costa Gomes Date: Thu Aug 20 16:02:17 2020 -0700 igc: Save PTP time before a reset Many TSN features depend on the internal PTP clock, so the internal PTP jumping when the adapter is reset can cause problems, usually in the form of "TX Hangs" warnings in the driver. The solution is to save the PTP time before a reset and restore it after the reset is done. The value of the PTP time is saved before a reset and we use the difference from CLOCK_MONOTONIC from reset time to now, to correct what's going to be the new PTP time. This is heavily inspired by commit bf4bf09bdd91 ("i40e: save PTP time before a device reset"). Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit e5f020ad610b11827914245048ec55a7bb030944 Author: Vinicius Costa Gomes Date: Thu Aug 20 16:02:16 2020 -0700 igc: Remove references to SYSTIMR register In i225, it's no longer necessary to use the SYSTIMR register to latch the timer value, the timestamp is latched when SYSTIML is read. Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 40edc73469a17d247a79034acb07ec280fda6494 Author: Sasha Neftin Date: Thu Aug 13 18:18:15 2020 +0300 igc: Expose LPI counters Completion to commit 900d1e8b346b ("igc: Add LPI counters") LPI counters exposed by statistics update method. A EEE TX LPI counter reflect the transmitter entries EEE (IEEE 802.3az) into the LPI state. A EEE RX LPI counter reflect the receiver link partner entries into EEE(IEEE 802.3az) LPI state. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit ef8a17a2a42a16e7f2d9b2dcd6726527fe76fe4a Author: Andre Guedes Date: Mon Aug 10 14:08:30 2020 -0700 igc: Clean RX descriptor error flags i225 advanced receive descriptor doesn't have the following extend error bits: CE, SE, SEQ, CXE. In addition to that, the bit TCPE is called L4E in the datasheet. Clean up the code accordingly, and get rid of the macro IGC_RXDEXT_ERR_FRAME_ERR_MASK since it doesn't make much sense anymore. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 09cb2a340425fc0da1c5c61b1e13424d53314244 Author: Andre Guedes Date: Tue Jul 28 16:37:53 2020 -0700 igc: Remove timeout check from ptp_tx work The Tx timestamp timeout is already checked by the watchdog_task which runs periodically. In addition to that, from the ptp_tx work perspective, if __IGC_PTP_TX_IN_PROGRESS flag is set we always want handle the timestamp stored in hardware and update the skb. So remove the timeout check in igc_ptp_tx_work() function. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 530a763db88e9eb9671b2c56343ca08f0c43cff6 Author: Andre Guedes Date: Tue Jul 28 16:37:52 2020 -0700 igc: Don't reschedule ptp_tx work The ptp_tx work is scheduled only if TSICR.TXTS bit is set, therefore TSYNCTXCTL.TXTT_0 bit is expected to be set when we check it igc_ptp_tx_ work(). If it isn't, something is really off and rescheduling the ptp_tx work to check it later doesn't help much. This patch changes the code to WARN_ON_ONCE() if this situation ever happens. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 77370df39c4bdd9dbcd8bd64f00d4b60e925613d Author: Andre Guedes Date: Tue Jul 28 16:37:51 2020 -0700 igc: Rename IGC_TSYNCTXCTL_VALID macro Rename the IGC_TSYNCTXCTL_VALID macro to IGC_TSYNCTXCTL_TXTT_0 so it matches the datasheet. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 43546211738ec5e903a3f123e848f6f13bdfb25a Author: Sasha Neftin Date: Mon Aug 3 21:33:58 2020 +0300 igc: Add new device ID's Add new device ID's for the next step of the silicon and reflect i221 and i226 parts Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 2fc1d8ee1ed2dbf932419feb6c538fb82c5f4f76 Author: Gal Hammer Date: Sun Aug 30 08:45:29 2020 +0300 igb: read PBA number from flash Fixed flash presence check for 82576 controllers so the part number string is read and displayed correctly. Signed-off-by: Gal Hammer Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 9cbc948b5a20c9c054d9631099c0426c16da546b Author: Sven Auhagen Date: Wed Sep 2 13:32:22 2020 -0700 igb: add XDP support Add XDP support to the IGB driver. The implementation follows the IXGBE XDP implementation closely and I used the following patches as basis: 1. commit 924708081629 ("ixgbe: add XDP support for pass and drop actions") 2. commit 33fdc82f0883 ("ixgbe: add support for XDP_TX action") 3. commit ed93a3987128 ("ixgbe: tweak page counting for XDP_REDIRECT") Due to the hardware constraints of the devices using the IGB driver we must share the TX queues with XDP which means locking the TX queue for XDP. I ran tests on an older device to get better numbers. Test machine: Intel(R) Atom(TM) CPU C2338 @ 1.74GHz (2 Cores) 2x Intel I211 Routing Original Driver Network Stack: 382 Kpps Routing XDP Redirect (xdp_fwd_kern): 1.48 Mpps XDP Drop: 1.48 Mpps Using XDP we can achieve line rate forwarding even on an older Intel Atom CPU. Signed-off-by: Sven Auhagen Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen commit efa90b50934c93647e41da23d87e5d8b670014d4 Author: Lorenzo Bianconi Date: Mon Sep 28 13:24:57 2020 +0200 bpf, cpumap: Remove rcpu pointer from cpu_map_build_skb signature Get rid of bpf_cpu_map_entry pointer in cpu_map_build_skb routine signature since it is no longer needed. Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/33cb9b7dc447de3ea6fd6ce713ac41bca8794423.1601292015.git.lorenzo@kernel.org commit a0eef4a8acbb57f3ca307dcd127dcc0c2e806981 Author: Bailu Lin Date: Fri Sep 25 19:52:33 2020 -0700 Documentation: Chinese translation of Documentation/arm64/amu.rst This is a Chinese translated version of Documentation/arm64/amu.rst Signed-off-by: Bailu Lin Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20200926025233.47214-1-bailu.lin@vivo.com Signed-off-by: Jonathan Corbet commit 6f3c4afae9805bda1682e0ad17b8ce56d85c9a83 Author: Jean-Philippe Brucker Date: Fri Sep 18 12:18:46 2020 +0200 arm64: cpufeature: Export symbol read_sanitised_ftr_reg() The SMMUv3 driver would like to read the MMFR0 PARANGE field in order to share CPU page tables with devices. Allow the driver to be built as module by exporting the read_sanitized_ftr_reg() cpufeature symbol. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Jonathan Cameron Acked-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20200918101852.582559-7-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 7a5d265b68e10bd99909434eedf08ca79ab2e640 Author: Bailu Lin Date: Fri Sep 25 19:25:58 2020 -0700 doc: zh_CN: index files in arm64 subdirectory Add arm64 subdirectory into the table of Contents for zh_CN, then add other translations in arm64 conveniently. Signed-off-by: Bailu Lin Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20200926022558.46232-1-bailu.lin@vivo.com Signed-off-by: Jonathan Corbet commit fb4fed259a50f089d8d0d961bd9aaec74e900c5f Author: Mark Starovoytov Date: Mon Sep 28 18:39:59 2020 +0000 mailmap: add entry for Map the address to my private mail, because my Marvell account has been suspended. Signed-off-by: Mark Starovoytov Link: https://lore.kernel.org/r/20200928183948.589-1-mstarovo@pm.me Signed-off-by: Jonathan Corbet commit ef80c1a1d21b2845e3a60dcb936264b123ebf41c Author: Ville Syrjälä Date: Fri Sep 25 16:16:48 2020 +0300 drm/i915: Fix state checker hw.active/hw.enable readout Previously intel_dump_pipe_config() used to dump the full crtc state whether or not the crtc was logically enabled or not. As that meant occasionally dumping confusing stale garbage I changed it to check whether the crtc is logically enabled or not. However I did not realize that the state checker readout code does not populate crtc_state.hw.{active,enabled}. Hence the state checker dump would only give us a full dump of the sw state but not the hw state. Fix that by populating those bits of the hw state as well. Reviewed-by: Uma Shankar Fixes: 10d75f5428fd ("drm/i915: Fix plane state dumps") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200925131656.10022-2-ville.syrjala@linux.intel.com (cherry picked from commit 504c7bd85c6f9b14b6c7f03cb5885c0818e805ad) Signed-off-by: Rodrigo Vivi commit ce7a7eed776f994d5672ad76adb671580bd083ac Author: NeilBrown Date: Fri Sep 25 17:14:42 2020 +1000 doc: seq_file: clarify role of *pos in ->next() There are behavioural requirements on the seq_file next() function in terms of how it updates *pos at end-of-file, and these are now enforced by a warning. I was recently attempting to justify the reason this was needed, and couldn't remember the details, and didn't find them in the documentation. So I re-read the code until I understood it again, and updated the documentation to match. I also enhanced the text about SEQ_START_TOKEN as it seemed potentially misleading. Cc: Vasily Averin Signed-off-by: NeilBrown Link: https://lore.kernel.org/r/87eemqiazh.fsf@notabene.neil.brown.name Signed-off-by: Jonathan Corbet commit 48118151d8cc7a457f61d91df0c053473d4b31b1 Author: Jean-Philippe Brucker Date: Fri Sep 18 12:18:44 2020 +0200 arm64: mm: Pin down ASIDs for sharing mm with devices To enable address space sharing with the IOMMU, introduce arm64_mm_context_get() and arm64_mm_context_put(), that pin down a context and ensure that it will keep its ASID after a rollover. Export the symbols to let the modular SMMUv3 driver use them. Pinning is necessary because a device constantly needs a valid ASID, unlike tasks that only require one when running. Without pinning, we would need to notify the IOMMU when we're about to use a new ASID for a task, and it would get complicated when a new task is assigned a shared ASID. Consider the following scenario with no ASID pinned: 1. Task t1 is running on CPUx with shared ASID (gen=1, asid=1) 2. Task t2 is scheduled on CPUx, gets ASID (1, 2) 3. Task tn is scheduled on CPUy, a rollover occurs, tn gets ASID (2, 1) We would now have to immediately generate a new ASID for t1, notify the IOMMU, and finally enable task tn. We are holding the lock during all that time, since we can't afford having another CPU trigger a rollover. The IOMMU issues invalidation commands that can take tens of milliseconds. It gets needlessly complicated. All we wanted to do was schedule task tn, that has no business with the IOMMU. By letting the IOMMU pin tasks when needed, we avoid stalling the slow path, and let the pinning fail when we're out of shareable ASIDs. After a rollover, the allocator expects at least one ASID to be available in addition to the reserved ones (one per CPU). So (NR_ASIDS - NR_CPUS - 1) is the maximum number of ASIDs that can be shared with the IOMMU. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200918101852.582559-5-jean-philippe@linaro.org Signed-off-by: Will Deacon commit 4b2b76cbbc8ff5dabc18123d94a1125143aea567 Author: Gavin Shan Date: Tue Sep 22 23:04:23 2020 +1000 firmware: arm_sdei: Remove _sdei_event_unregister() _sdei_event_unregister() is called by sdei_event_unregister() and sdei_device_freeze(). _sdei_event_unregister() covers the shared and private events, but sdei_device_freeze() only covers the shared events. So the logic to cover the private events isn't needed by sdei_device_freeze(). sdei_event_unregister sdei_device_freeze _sdei_event_unregister sdei_unregister_shared _sdei_event_unregister This removes _sdei_event_unregister(). Its logic is moved to its callers accordingly. This shouldn't cause any logical changes. Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Reviewed-by: James Morse Link: https://lore.kernel.org/r/20200922130423.10173-14-gshan@redhat.com Signed-off-by: Will Deacon commit d2fc580d2dcaf92863fbb194d4e70ef1383b92c4 Author: Gavin Shan Date: Tue Sep 22 23:04:22 2020 +1000 firmware: arm_sdei: Remove _sdei_event_register() The function _sdei_event_register() is called by sdei_event_register() and sdei_device_thaw() as the following functional call chain shows. _sdei_event_register() covers the shared and private events, but sdei_device_thaw() only covers the shared events. So the logic to cover the private events in _sdei_event_register() isn't needed by sdei_device_thaw(). Similarly, sdei_reregister_event_llocked() covers the shared and private events in the regard of reenablement. The logic to cover the private events isn't needed by sdei_device_thaw() either. sdei_event_register sdei_device_thaw _sdei_event_register sdei_reregister_shared sdei_reregister_event_llocked _sdei_event_register This removes _sdei_event_register() and sdei_reregister_event_llocked(). Their logic is moved to sdei_event_register() and sdei_reregister_shared(). This shouldn't cause any logical changes. Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Reviewed-by: James Morse Link: https://lore.kernel.org/r/20200922130423.10173-13-gshan@redhat.com Signed-off-by: Will Deacon commit f4673625a52c69a12d2a8f71bcf408c685c148ec Author: Gavin Shan Date: Tue Sep 22 23:04:21 2020 +1000 firmware: arm_sdei: Introduce sdei_do_local_call() During the CPU hotplug, the private events are registered, enabled or unregistered on the specific CPU. It repeats the same steps: initializing cross call argument, make function call on local CPU, check the returned error. This introduces sdei_do_local_call() to cover the first steps. The other benefit is to make CROSSCALL_INIT and struct sdei_crosscall_args are only visible to sdei_do_{cross, local}_call(). Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Reviewed-by: James Morse Link: https://lore.kernel.org/r/20200922130423.10173-12-gshan@redhat.com Signed-off-by: Will Deacon commit a27c04e1de876297b78a6b812049e6fecc6e4d9a Author: Gavin Shan Date: Tue Sep 22 23:04:20 2020 +1000 firmware: arm_sdei: Cleanup on cross call function This applies cleanup on the cross call functions, no functional changes are introduced: * Wrap the code block of CROSSCALL_INIT inside "do { } while (0)" as linux kernel usually does. Otherwise, scripts/checkpatch.pl reports warning regarding this. * Use smp_call_func_t for @fn argument in sdei_do_cross_call() as the function is called on target CPU(s). * Remove unnecessary space before @event in sdei_do_cross_call() Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Reviewed-by: James Morse Link: https://lore.kernel.org/r/20200922130423.10173-11-gshan@redhat.com Signed-off-by: Will Deacon commit b06146b698e6e835253d01901ecf0ab84646591e Author: Gavin Shan Date: Tue Sep 22 23:04:19 2020 +1000 firmware: arm_sdei: Remove while loop in sdei_event_unregister() This removes the unnecessary while loop in sdei_event_unregister() because of the following two reasons. This shouldn't cause any functional changes. * The while loop is executed for once, meaning it's not needed in theory. * With the while loop removed, the nested statements can be avoid to make the code a bit cleaner. Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200922130423.10173-10-gshan@redhat.com Signed-off-by: Will Deacon commit 1bbc75518503fe7992c8ec09557b453ec7222dcf Author: Gavin Shan Date: Tue Sep 22 23:04:18 2020 +1000 firmware: arm_sdei: Remove while loop in sdei_event_register() This removes the unnecessary while loop in sdei_event_register() because of the following two reasons. This shouldn't cause any functional changes. * The while loop is executed for once, meaning it's not needed in theory. * With the while loop removed, the nested statements can be avoid to make the code a bit cleaner. Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200922130423.10173-9-gshan@redhat.com Signed-off-by: Will Deacon commit 101119a35ca108022391ad5b84d31e203970185c Author: Gavin Shan Date: Tue Sep 22 23:04:17 2020 +1000 firmware: arm_sdei: Remove redundant error message in sdei_probe() This removes the redundant error message in sdei_probe() because the case can be identified from the errno in next error message. Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Acked-by: James Morse Link: https://lore.kernel.org/r/20200922130423.10173-8-gshan@redhat.com Signed-off-by: Will Deacon commit bc110fd322816c9684603a55404b51228c0feca8 Author: Gavin Shan Date: Tue Sep 22 23:04:16 2020 +1000 firmware: arm_sdei: Remove duplicate check in sdei_get_conduit() The following two checks are duplicate because @acpi_disabled doesn't depend on CONFIG_ACPI. So the duplicate check (IS_ENABLED(CONFIG_ACPI)) can be dropped. More details is provided to keep the commit log complete: * @acpi_disabled is defined in arch/arm64/kernel/acpi.c when CONFIG_ACPI is enabled. * @acpi_disabled in defined in include/acpi.h when CONFIG_ACPI is disabled. Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Acked-by: James Morse Link: https://lore.kernel.org/r/20200922130423.10173-7-gshan@redhat.com Signed-off-by: Will Deacon commit 63627cae41e33763ca967bd2bb8cfe5d281bfe64 Author: Gavin Shan Date: Tue Sep 22 23:04:15 2020 +1000 firmware: arm_sdei: Unregister driver on error in sdei_init() The SDEI platform device is created from device-tree node or ACPI (SDEI) table. For the later case, the platform device is created explicitly by this module. It'd better to unregister the driver on failure to create the device to keep the symmetry. The driver, owned by this module, isn't needed if the device isn't existing. Besides, the errno (@ret) should be updated accordingly in this case. Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Reviewed-by: James Morse Link: https://lore.kernel.org/r/20200922130423.10173-6-gshan@redhat.com Signed-off-by: Will Deacon commit 10fd7c42b7953b3316806388493bff22abd3f78c Author: Gavin Shan Date: Tue Sep 22 23:04:14 2020 +1000 firmware: arm_sdei: Avoid nested statements in sdei_init() In sdei_init(), the nested statements can be avoided by bailing on error from platform_driver_register() or absent ACPI SDEI table. With it, the code looks a bit more readable. Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Reviewed-by: James Morse Link: https://lore.kernel.org/r/20200922130423.10173-5-gshan@redhat.com Signed-off-by: Will Deacon commit 663c0e89c8defd75a9d34ae31dbc315d6cf894bd Author: Gavin Shan Date: Tue Sep 22 23:04:13 2020 +1000 firmware: arm_sdei: Retrieve event number from event instance In sdei_event_create(), the event number is retrieved from the variable @event_num for the shared event. The event number was stored in the event instance. So we can fetch it from the event instance, similar to what we're doing for the private event. Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Acked-by: James Morse Link: https://lore.kernel.org/r/20200922130423.10173-4-gshan@redhat.com Signed-off-by: Will Deacon commit 119884249fdba34a06df250a4402a6b2f3697a47 Author: Gavin Shan Date: Tue Sep 22 23:04:12 2020 +1000 firmware: arm_sdei: Common block for failing path in sdei_event_create() There are multiple calls of kfree(event) in the failing path of sdei_event_create() to free the SDEI event. It means we need to call it again when adding more code in the failing path. It's prone to miss doing that and introduce memory leakage. This introduces common block for failing path in sdei_event_create() to resolve the issue. This shouldn't cause functional changes. Signed-off-by: Gavin Shan Reviewed-by: Jonathan Cameron Acked-by: James Morse Link: https://lore.kernel.org/r/20200922130423.10173-3-gshan@redhat.com Signed-off-by: Will Deacon commit 5735f515843019257913432a8c36eb558be388db Author: Gavin Shan Date: Tue Sep 22 23:04:11 2020 +1000 firmware: arm_sdei: Remove sdei_is_err() sdei_is_err() is only called by sdei_to_linux_errno(). The logic of checking on the error number is common to them. They can be combined finely. This removes sdei_is_err() and its logic is combined to the function sdei_to_linux_errno(). Also, the assignment of @err to zero is also dropped in invoke_sdei_fn() because it's always overridden afterwards. This shouldn't cause functional changes. Signed-off-by: Gavin Shan Reviewed-by: James Morse Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200922130423.10173-2-gshan@redhat.com Signed-off-by: Will Deacon commit 5061e488bc0cef34df1d6d9e25d7f3ec05500a1f Merge: 19895e92dd2b9 bcae16317bcfa Author: Mark Brown Date: Mon Sep 28 20:53:10 2020 +0100 Merge series "ASoC: merge soc_pcm_open() rollback and soc_pcm_close()" from Kuninori Morimoto : Hi Mark 1 month past and nothing happened. This is resend of v2 patch-set. soc_pcm_open() does rollback when failed (A), but, it is almost same as soc_pcm_close(). static int soc_pcm_open(xxx) { ... if (ret < 0) goto xxx_err; ... return 0; ^ config_err: | ... | rtd_startup_err: (A) ... | component_err: | ... v return ret; } This kind of duplicated code can be a hotbed of bugs, thus, this patch-set share soc_pcm_close() and rollback. v1 -> v2 - indicate more detail background/logic on git-log Link: https://lore.kernel.org/r/87wo2oku0m.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87wo1kvozz.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (7): ASoC: soc-dai: add mark for snd_soc_dai_startup/shutdown() ASoC: soc-link: add mark for snd_soc_link_startup/shutdown() ASoC: soc-component: add mark for soc_pcm_components_open/close() ASoC: soc-component: add mark for snd_soc_pcm_component_pm_runtime_get/put() ASoC: soc-pcm: add soc_pcm_clean() and call it from soc_pcm_open/close() ASoC: soc-pcm: remove unneeded dev_err() for snd_soc_dai_startup() ASoC: soc-pcm: remove unneeded dev_err() for snd_soc_component_module/open() include/sound/soc-component.h | 28 +++++--- include/sound/soc-dai.h | 5 +- include/sound/soc-link.h | 3 +- include/sound/soc.h | 3 + sound/soc/soc-component.c | 73 ++++++++++++++++++++- sound/soc/soc-compress.c | 30 +++------ sound/soc/soc-dai.c | 21 +++++- sound/soc/soc-dapm.c | 4 +- sound/soc/soc-link.c | 21 +++++- sound/soc/soc-pcm.c | 120 ++++++++++++---------------------- 10 files changed, 190 insertions(+), 118 deletions(-) -- 2.25.1 commit 09d8ad16885ee2ea3b9a4d4735ae053f425a1faf Author: Song Liu Date: Fri Sep 25 13:54:31 2020 -0700 selftests/bpf: Add raw_tp_test_run This test runs test_run for raw_tracepoint program. The test covers ctx input, retval output, and running on correct cpu. Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200925205432.1777-4-songliubraving@fb.com commit 88f7fe7233244101fa5b7786e2e298bf27fe1375 Author: Song Liu Date: Fri Sep 25 13:54:30 2020 -0700 libbpf: Support test run of raw tracepoint programs Add bpf_prog_test_run_opts() with support of new fields in bpf_attr.test, namely, flags and cpu. Also extend _opts operations to support outputs via opts. Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200925205432.1777-3-songliubraving@fb.com commit 1b4d60ec162f82ea29a2e7a907b5c6cc9f926321 Author: Song Liu Date: Fri Sep 25 13:54:29 2020 -0700 bpf: Enable BPF_PROG_TEST_RUN for raw_tracepoint Add .test_run for raw_tracepoint. Also, introduce a new feature that runs the target program on a specific CPU. This is achieved by a new flag in bpf_attr.test, BPF_F_TEST_RUN_ON_CPU. When this flag is set, the program is triggered on cpu with id bpf_attr.test.cpu. This feature is needed for BPF programs that handle perf_event and other percpu resources, as the program can access these resource locally. Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200925205432.1777-2-songliubraving@fb.com commit 19895e92dd2b914fe4e66cca862eb8c7f927bee6 Author: Srinivas Kandagatla Date: Fri Sep 25 17:48:56 2020 +0100 ASoC: lpass-platform: use devm_regmap_field_bulk_alloc use new devm_regmap_field_bulk_alloc to allocate fields as it make the code more readable! Signed-off-by: Srinivas Kandagatla Tested-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/20200925164856.10315-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 013bc9e6f70d98eaf6e9f912db5cf11b5f7240d6 Merge: d4edae9c508c8 ea470b82f205f Author: Mark Brown Date: Mon Sep 28 20:51:29 2020 +0100 Merge tag 'regmap-field-bulk-api' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into asoc-5.10 regmap: Add a bulk field API Useful for devices with many fields. commit d05199af72cbb97b6a293b632ffdd09c4757d5fe Merge: 2defc3fa18a68 ea470b82f205f Author: Mark Brown Date: Mon Sep 28 20:50:47 2020 +0100 Merge tag 'regmap-field-bulk-api' into regmap-5.10 regmap: Add a bulk field API Useful for devices with many fields. commit bcbf1be0ad49eed35f3cf27fb668f77e0c94f5f7 Merge: 8744c0a894151 33a1aaf82bcf4 Author: David S. Miller Date: Mon Sep 28 12:50:13 2020 -0700 Merge branch 'udp_tunnel-convert-Intel-drivers-with-shared-tables' Jakub Kicinski says: ==================== udp_tunnel: convert Intel drivers with shared tables This set converts Intel drivers which have the ability to spawn multiple netdevs, but have only one UDP tunnel port table. Appropriate support is added to the core infra in patch 1, followed by netdevsim support and a selftest. The table sharing works by core attaching the same table structure to all devices sharing the table. This means the reference count has to accommodate potentially large values. Once core is ready i40e and ice are converted. These are complex drivers, but we got a tested-by from Aaron, so we should be good :) Compared to v1 I've made sure the selftest is executable. Other than that patches 8 and 9 are actually from the Mellanox conversion series were kept out to avoid Mellanox vs Intel conflicts. Last patch is new, some docs to let users knows ethtool can now display UDP tunnel info. ==================== Signed-off-by: David S. Miller commit 33a1aaf82bcf41a9d23539f859c83daa385beca5 Author: Jakub Kicinski Date: Fri Sep 25 17:56:49 2020 -0700 docs: vxlan: add info about device features Add some information about VxLAN-related netdev features and how to dump port table via ethtool. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 8c4cf4bc3ea7d6a2724f9399ad3d8f189fc92456 Author: Jakub Kicinski Date: Fri Sep 25 17:56:48 2020 -0700 selftests: net: add a test for static UDP tunnel ports Check UDP_TUNNEL_NIC_INFO_STATIC_IANA_VXLAN works as expected. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit dda751731ec9f273eb650e2cb42ecf92a7ae4bb0 Author: Jakub Kicinski Date: Fri Sep 25 17:56:47 2020 -0700 netdevsim: support the static IANA VXLAN port flag Allow setting UDP_TUNNEL_NIC_INFO_STATIC_IANA_VXLAN. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit b20e6c17c4685dee273f9b5c51cdccfd40ed228f Author: Jakub Kicinski Date: Fri Sep 25 17:56:46 2020 -0700 ice: convert to new udp_tunnel infrastructure Convert ice to the new infra, use share port tables. Leave a tiny bit more error checking in place than usual, because this driver really does quite a bit of magic. We need to calculate the number of VxLAN and GENEVE entries the firmware has reserved. Thanks to the conversion the driver will no longer sleep in an atomic section. Signed-off-by: Jakub Kicinski Tested-by: Aaron Brown Signed-off-by: David S. Miller commit f049b826a814a7bb0de7a4a458ce88869701fd87 Author: Jakub Kicinski Date: Fri Sep 25 17:56:45 2020 -0700 ice: remove unused args from ice_get_open_tunnel_port() ice_get_open_tunnel_port() is always passed TNL_ALL as the second parameter. Signed-off-by: Jakub Kicinski Tested-by: Aaron Brown Signed-off-by: David S. Miller commit 40a98cb6f01f013b8ab0ce7b28f705423ee16836 Author: Jakub Kicinski Date: Fri Sep 25 17:56:44 2020 -0700 i40e: convert to new udp_tunnel infrastructure Make use of the "shared port table" to convert i40e to the new infra. i40e did not have any reference tracking, locking is also dodgy because rtnl gets released while talking to FW, so port may get removed from the table while it's getting added etc. On the good side i40e does not seem to be using the ports for TX so we can remove the table from the driver state completely. Signed-off-by: Jakub Kicinski Tested-by: Aaron Brown Signed-off-by: David S. Miller commit 53db3e53e22d77eadd079076086c32b2764578da Author: Jakub Kicinski Date: Fri Sep 25 17:56:43 2020 -0700 selftests: net: add a test for shared UDP tunnel info tables Add a test run of checks validating the shared UDP tunnel port tables function as we expect. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit dc9c07537cf200279c357b444a49df8c11f006fd Author: Jakub Kicinski Date: Fri Sep 25 17:56:42 2020 -0700 netdevsim: shared UDP tunnel port table support Add the ability to simulate a device with a shared UDP tunnel port table. Try to reject the configurations and actions which are not supported by the core, so we don't get syzcaller etc. warning reports. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 860e9d328fa585aafda2ef09aa1b13986279cbe7 Author: Jakub Kicinski Date: Fri Sep 25 17:56:41 2020 -0700 netdevsim: add warnings on unexpected UDP tunnel port errors We should never see a removal of a port which is not in the table or adding a port to an occupied entry in the table. To make sure such errors don't escape the checks in the test script add a warning/kernel spat. Error injection will not trigger those, nor should it ever put us in a bad state. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 74cc6d182d038cbba6c6d91beb1b2bab926b618b Author: Jakub Kicinski Date: Fri Sep 25 17:56:40 2020 -0700 udp_tunnel: add the ability to share port tables Unfortunately recent Intel NIC designs share the UDP port table across netdevs. So far the UDP tunnel port state was maintained per netdev, we need to extend that to cater to Intel NICs. Expect NICs to allocate the info structure dynamically and link to the state from there. All the shared NICs will record port offload information in the one instance of the table so we need to make sure that the use count can accommodate larger numbers. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit ea470b82f205fc1b0b5276575da519bb7d86db25 Author: Srinivas Kandagatla Date: Fri Sep 25 17:48:55 2020 +0100 regmap: add support to regmap_field_bulk_alloc/free apis Usage of regmap_field_alloc becomes much overhead when number of fields exceed more than 3. QCOM LPASS driver has extensively converted to use regmap_fields. Using new bulk api to allocate fields makes it much more cleaner code to read! Signed-off-by: Srinivas Kandagatla Tested-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/20200925164856.10315-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 8744c0a8941516334b4dd2a47375357f44a4f422 Merge: e87fb82ddc3b9 811ac400ea337 Author: David S. Miller Date: Mon Sep 28 12:44:13 2020 -0700 Merge branch 'DP83869-WoL-and-Speed-optimization' Dan Murphy says: ==================== DP83869 WoL and Speed optimization Add the WoL and Speed Optimization (aka downshift) support for the DP83869 Ethernet PHY. ==================== Signed-off-by: David S. Miller commit 811ac400ea33711bece7c968ee0b8ba3cd290ed9 Author: Dan Murphy Date: Mon Sep 28 09:51:35 2020 -0500 net: phy: dp83869: Add speed optimization feature Set the speed optimization bit on the DP83869 PHY. Speed optimization, also known as link downshift, enables fallback to 100M operation after multiple consecutive failed attempts at Gigabit link establishment. Such a case could occur if cabling with only four wires (two twisted pairs) were connected instead of the standard cabling with eight wires (four twisted pairs). The number of failed link attempts before falling back to 100M operation is configurable. By default, four failed link attempts are required before falling back to 100M. Signed-off-by: Dan Murphy Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 49fc23018ec64f4786e65d96a25a90711f35286f Author: Dan Murphy Date: Mon Sep 28 09:51:34 2020 -0500 net: phy: dp83869: support Wake on LAN This adds WoL support on TI DP83869 for magic, magic secure, unicast and broadcast. Signed-off-by: Dan Murphy Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e87fb82ddc3b9082af10705b7f3683ef652e51d4 Author: Kunihiko Hayashi Date: Mon Sep 28 19:04:53 2020 +0900 net: ethernet: ave: Replace alloc_etherdev() with devm_alloc_etherdev() Use devm_alloc_etherdev() to simplify the code instead of alloc_etherdev(). Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit 0e9683659c6926fd3f30345f9f58893e630379ed Author: Colin Ian King Date: Mon Sep 28 13:30:42 2020 +0100 spi: hisi-sfc-v3xx: fix spelling mistake "occured" -> "occurred" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200928123042.125359-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 1fd17c8cd0aa636afcf441ee23023b5a7cba4efa Author: Magnus Karlsson Date: Sat Sep 26 11:26:13 2020 +0200 xsk: Fix possible crash in socket_release when out-of-memory Fix possible crash in socket_release when an out-of-memory error has occurred in the bind call. If a socket using the XDP_SHARED_UMEM flag encountered an error in xp_create_and_assign_umem, the bind code jumped to the exit routine but erroneously forgot to set the err value before jumping. This meant that the exit routine thought the setup went well and set the state of the socket to XSK_BOUND. The xsk socket release code will then, at application exit, think that this is a properly setup socket, when it is not, leading to a crash when all fields in the socket have in fact not been initialized properly. Fix this by setting the err variable in xsk_bind so that the socket is not set to XSK_BOUND which leads to the clean-up in xsk_release not being triggered. Fixes: 1c1efc2af158 ("xsk: Create and free buffer pool independently from umem") Reported-by: syzbot+ddc7b4944bc61da19b81@syzkaller.appspotmail.com Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1601112373-10595-1-git-send-email-magnus.karlsson@gmail.com commit 717d182e4173c037fb9e720a046dec804fd9990e Merge: a55b7bb1c1466 fb0155a09b022 Author: Arnaldo Carvalho de Melo Date: Mon Sep 28 15:44:52 2020 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes and get v5.10 development in sync with the main kernel sources. Signed-off-by: Arnaldo Carvalho de Melo commit 71d5f4dc7baa7f1a0d69ef531af65b210b0bf04c Merge: 9f4366ec2c50d aea6cb99703e1 Author: Mark Brown Date: Mon Sep 28 19:26:34 2020 +0100 Merge series "regulator: debugging aids" from Michał Mirosław : Three simple patches to aid in debugging regulators. Michał Mirosław (3): regulator: print state at boot regulator: print symbolic errors in kernel messages regulator: resolve supply after creating regulator drivers/regulator/core.c | 124 ++++++++++++++++++++++----------------- 1 file changed, 69 insertions(+), 55 deletions(-) -- 2.20.1 commit 9f4366ec2c50dc478a06cb2cf0fadd3b38495650 Author: ChiYuan Huang Date: Mon Sep 28 15:19:44 2020 +0800 regulator: rtmv20: Add DT-binding document for Richtek RTMV20 Add DT-binding document for Richtek RTMV20 Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1601277584-5526-2-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit b8c054a5eaf0cf2b9532969e5168ce5e2d78c284 Author: ChiYuan Huang Date: Mon Sep 28 15:19:43 2020 +0800 regulator: rtmv20: Adds support for Richtek RTMV20 load switch regulator Add support for Richtek RTMV20 load switch regulator. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1601277584-5526-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit aea6cb99703e17019e025aa71643b4d3e0a24413 Author: Michał Mirosław Date: Sat Sep 26 23:32:41 2020 +0200 regulator: resolve supply after creating regulator When creating a new regulator its supply cannot create the sysfs link because the device is not yet published. Remove early supply resolving since it will be done later anyway. This makes the following error disappear and the symlinks get created instead. DCDC_REG1: supplied by VSYS VSYS: could not add device link regulator.3 err -2 Note: It doesn't fix the problem for bypassed regulators, though. Fixes: 45389c47526d ("regulator: core: Add early supply resolution for regulators") Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/ba09e0a8617ffeeb25cb4affffe6f3149319cef8.1601155770.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 61aab5ad27d551f1535861e871dd9b03f5fbfd76 Author: Michał Mirosław Date: Sat Sep 26 23:32:40 2020 +0200 regulator: print symbolic errors in kernel messages Change all error-printing messages to include error name via %pe instead of numeric error or nothing. Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/1dcf25f39188882eb56918a9aa281ab17b792aa5.1601155770.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 99ad5f6ec0cd776e34295ec9fc82bfb004c3fad5 Author: Michał Mirosław Date: Sat Sep 26 23:32:40 2020 +0200 regulator: print state at boot Make the initial state of the regulator shown when debugging. Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/53c4f3d394d68f0989174f89e3b0882cebbbd787.1601155770.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit d8f6267f7ce5dc7b8920910e7e75216f77e06d21 Author: Julien Thierry Date: Thu Sep 24 12:07:06 2020 +0100 arm_pmu: arm64: Use NMIs for PMU Add required PMU interrupt operations for NMIs. Request interrupt lines as NMIs when possible, otherwise fall back to normal interrupts. NMIs are only supported on the arm64 architecture with a GICv3 irqchip. [Alexandru E.: Added that NMIs only work on arm64 + GICv3, print message when PMU is using NMIs] Signed-off-by: Julien Thierry Signed-off-by: Alexandru Elisei Tested-by: Sumit Garg (Developerbox) Cc: Julien Thierry Cc: Will Deacon Cc: Mark Rutland Link: https://lore.kernel.org/r/20200924110706.254996-8-alexandru.elisei@arm.com Signed-off-by: Will Deacon commit f76b130bdb8949eac002b8e0ddb85576ed137838 Author: Julien Thierry Date: Thu Sep 24 12:07:05 2020 +0100 arm_pmu: Introduce pmu_irq_ops Currently the PMU interrupt can either be a normal irq or a percpu irq. Supporting NMI will introduce two cases for each existing one. It becomes a mess of 'if's when managing the interrupt. Define sets of callbacks for operations commonly done on the interrupt. The appropriate set of callbacks is selected at interrupt request time and simplifies interrupt enabling/disabling and freeing. Signed-off-by: Julien Thierry Signed-off-by: Alexandru Elisei Tested-by: Sumit Garg (Developerbox) Cc: Julien Thierry Cc: Will Deacon Cc: Mark Rutland Link: https://lore.kernel.org/r/20200924110706.254996-7-alexandru.elisei@arm.com Signed-off-by: Will Deacon commit 95e92e45a454a10a8114294d0f7aec930fb85891 Author: Julien Thierry Date: Thu Sep 24 12:07:04 2020 +0100 KVM: arm64: pmu: Make overflow handler NMI safe kvm_vcpu_kick() is not NMI safe. When the overflow handler is called from NMI context, defer waking the vcpu to an irq_work queue. A vcpu can be freed while it's not running by kvm_destroy_vm(). Prevent running the irq_work for a non-existent vcpu by calling irq_work_sync() on the PMU destroy path. [Alexandru E.: Added irq_work_sync()] Signed-off-by: Julien Thierry Signed-off-by: Alexandru Elisei Tested-by: Sumit Garg (Developerbox) Cc: Julien Thierry Cc: Marc Zyngier Cc: Will Deacon Cc: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Suzuki K Pouloze Cc: kvm@vger.kernel.org Cc: kvmarm@lists.cs.columbia.edu Link: https://lore.kernel.org/r/20200924110706.254996-6-alexandru.elisei@arm.com Signed-off-by: Will Deacon commit 05ab72813340d11205556c0d1bc08e6857a3856c Author: Julien Thierry Date: Thu Sep 24 12:07:03 2020 +0100 arm64: perf: Defer irq_work to IPI_IRQ_WORK When handling events, armv8pmu_handle_irq() calls perf_event_overflow(), and subsequently calls irq_work_run() to handle any work queued by perf_event_overflow(). As perf_event_overflow() raises IPI_IRQ_WORK when queuing the work, this isn't strictly necessary and the work could be handled as part of the IPI_IRQ_WORK handler. In the common case the IPI handler will run immediately after the PMU IRQ handler, and where the PE is heavily loaded with interrupts other handlers may run first, widening the window where some counters are disabled. In practice this window is unlikely to be a significant issue, and removing the call to irq_work_run() would make the PMU IRQ handler NMI safe in addition to making it simpler, so let's do that. [Alexandru E.: Reworded commit message] Signed-off-by: Julien Thierry Signed-off-by: Alexandru Elisei Cc: Julien Thierry Cc: Will Deacon Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Catalin Marinas Link: https://lore.kernel.org/r/20200924110706.254996-5-alexandru.elisei@arm.com Signed-off-by: Will Deacon commit 2a0e2a02e4b719174547d6f04c27410c6fe456f5 Author: Julien Thierry Date: Thu Sep 24 12:07:02 2020 +0100 arm64: perf: Remove PMU locking The PMU is disabled and enabled, and the counters are programmed from contexts where interrupts or preemption is disabled. The functions to toggle the PMU and to program the PMU counters access the registers directly and don't access data modified by the interrupt handler. That, and the fact that they're always called from non-preemptible contexts, means that we don't need to disable interrupts or use a spinlock. [Alexandru E.: Explained why locking is not needed, removed WARN_ONs] Signed-off-by: Julien Thierry Signed-off-by: Alexandru Elisei Tested-by: Sumit Garg (Developerbox) Cc: Will Deacon Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Catalin Marinas Link: https://lore.kernel.org/r/20200924110706.254996-4-alexandru.elisei@arm.com Signed-off-by: Will Deacon commit 0fdf1bb75953a67e63e5055a7709c629ab6d7692 Author: Mark Rutland Date: Thu Sep 24 12:07:01 2020 +0100 arm64: perf: Avoid PMXEV* indirection Currently we access the counter registers and their respective type registers indirectly. This requires us to write to PMSELR, issue an ISB, then access the relevant PMXEV* registers. This is unfortunate, because: * Under virtualization, accessing one register requires two traps to the hypervisor, even though we could access the register directly with a single trap. * We have to issue an ISB which we could otherwise avoid the cost of. * When we use NMIs, the NMI handler will have to save/restore the select register in case the code it preempted was attempting to access a counter or its type register. We can avoid these issues by directly accessing the relevant registers. This patch adds helpers to do so. In armv8pmu_enable_event() we still need the ISB to prevent the PE from reordering the write to PMINTENSET_EL1 register. If the interrupt is enabled before we disable the counter and the new event is configured, we might get an interrupt triggered by the previously programmed event overflowing, but which we wrongly attribute to the event that we are enabling. Execute an ISB after we disable the counter. In the process, remove the comment that refers to the ARMv7 PMU. [Julien T.: Don't inline read/write functions to avoid big code-size increase, remove unused read_pmevtypern function, fix counter index issue.] [Alexandru E.: Removed comment, removed trailing semicolons in macros, added ISB] Signed-off-by: Mark Rutland Signed-off-by: Julien Thierry Signed-off-by: Alexandru Elisei Tested-by: Sumit Garg (Developerbox) Cc: Julien Thierry Cc: Will Deacon Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Catalin Marinas Link: https://lore.kernel.org/r/20200924110706.254996-3-alexandru.elisei@arm.com Signed-off-by: Will Deacon commit 490d7b7c0845eacf5593db333fd2ae7715416e16 Author: Alexandru Elisei Date: Thu Sep 24 12:07:00 2020 +0100 arm64: perf: Add missing ISB in armv8pmu_enable_counter() Writes to the PMXEVTYPER_EL0 register are not self-synchronising. In armv8pmu_enable_event(), the PE can reorder configuring the event type after we have enabled the counter and the interrupt. This can lead to an interrupt being asserted because of the previous event type that we were counting using the same counter, not the one that we've just configured. The same rationale applies to writes to the PMINTENSET_EL1 register. The PE can reorder enabling the interrupt at any point in the future after we have enabled the event. Prevent both situations from happening by adding an ISB just before we enable the event counter. Fixes: 030896885ade ("arm64: Performance counters support") Reported-by: Julien Thierry Signed-off-by: Alexandru Elisei Tested-by: Sumit Garg (Developerbox) Cc: Julien Thierry Cc: Will Deacon Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Catalin Marinas Link: https://lore.kernel.org/r/20200924110706.254996-2-alexandru.elisei@arm.com Signed-off-by: Will Deacon commit 0ba64770a2f2e5a104bf835e133d78d3f82287ad Author: Robin Murphy Date: Fri Sep 18 14:28:38 2020 +0100 perf: Add Arm CMN-600 PMU driver Initial driver for PMU event counting on the Arm CMN-600 interconnect. CMN sports an obnoxiously complex distributed PMU system as part of its debug and trace features, which can do all manner of things like sampling, cross-triggering and generating CoreSight trace. This driver covers the PMU functionality, plus the relevant aspects of watchpoints for simply counting matching flits. Tested-by: Tsahi Zidenberg Tested-by: Tuan Phan Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit c8fdbbfa981a7bc64acec234620788c97d1f6a88 Author: Robin Murphy Date: Fri Sep 18 19:24:09 2020 +0100 perf: Add Arm CMN-600 DT binding Document the requirements for the CMN-600 DT binding. The internal topology is almost entirely discoverable by walking a tree of ID registers, but sadly both the starting point for that walk and the exact format of those registers are configuration-dependent and not discoverable from some sane fixed location. Oh well. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 3477326277451000bc667dfcc4fd0774c039184c Author: Sai Prakash Ranjan Date: Mon Sep 28 10:35:13 2020 -0600 coresight: etm4x: Fix save and restore of TRCVMIDCCTLR1 register In commit f188b5e76aae ("coresight: etm4x: Save/restore state across CPU low power states"), mistakenly TRCVMIDCCTLR1 register value was saved in trcvmidcctlr0 state variable which is used to store TRCVMIDCCTLR0 register value in etm4x_cpu_save() and then same value is written back to both TRCVMIDCCTLR0 and TRCVMIDCCTLR1 in etm4x_cpu_restore(). There is already a trcvmidcctlr1 state variable available for TRCVMIDCCTLR1, so use it. Fixes: f188b5e76aae ("coresight: etm4x: Save/restore state across CPU low power states") Reviewed-by: Suzuki K Poulose Signed-off-by: Sai Prakash Ranjan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-26-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8e264c52e1dab8a7c1e036222ef376c8920c3423 Author: Tingwei Zhang Date: Mon Sep 28 10:35:12 2020 -0600 coresight: core: Allow the coresight core driver to be built as a module Enhance coresight developer's efficiency to debug coresight drivers. - Kconfig becomes a tristate, to allow =m - append -core to source file name to allow module to be called coresight by the Makefile - modules can have only one init/exit, so we add the etm_perf register/unregister function calls to the core init/exit functions. - add a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-25-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit a114dbea544dffa9850f3f6e79bf7d8706ddd4a5 Author: Tingwei Zhang Date: Mon Sep 28 10:35:11 2020 -0600 coresight: catu: Allow catu drivers to be built as modules Allow to build coresight-catu as modules, for ease of development. - Kconfig becomes a tristate, to allow =m - add catu_remove functions, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot Reviewed-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-24-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 66af416d9dccaba7eb4efd290b9afcac71d3eeee Author: Mian Yousaf Kaukab Date: Mon Sep 28 10:35:10 2020 -0600 coresight: tmc-etr: Add function to register catu ops Make etr_catu_buf_ops static. Instead of directly accessing it in etr_buf_ops[], add a function to let catu driver register the ops at runtime. Break circular dependency between tmc-etr and catu drivers. Reviewed-by: Suzuki K Poulose Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-23-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3c3fd1a14552cd9305737ab3d278d2df542a797e Author: Tingwei Zhang Date: Mon Sep 28 10:35:09 2020 -0600 coresight: cti: Allow cti to be built as a module Allow to build coresight-cti as a module, for ease of development. - Kconfig becomes a tristate, to allow =m - append -core to source file name to allow module to be called coresight-cti by the Makefile - add an cti_remove function, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot - move cti_remove_conn_xrefs to cti_remove since all sysfs links have gone when system calls device_release. Reviewed-by Mike Leach Tested-by: Mike Leach Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-22-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit f02b089e7bddd2f66e63f926960a4e384b1f436d Author: Tingwei Zhang Date: Mon Sep 28 10:35:08 2020 -0600 coresight: cti: Increase reference count when enabling cti CTI device is enabled when associated coresight device is enabled. Increase the module and device reference count for CTI device when it's enabled. This can prevent CTI device be removed or module be unloaded when CTI device is enabled by an active trace session. Signed-off-by: Mike Leach Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-21-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit f2ccc7b7bfa91b5cad5a4d57b269f6d7bbafd67d Author: Tingwei Zhang Date: Mon Sep 28 10:35:07 2020 -0600 coresight: cti: Don't disable ect device if it's not enabled If associated ect device is not enabled at first place, disable routine should not be called. Add ect_enabled flag to check whether ect device is enabled. Fix the issue in below case. Ect device is not available when associated coresight device enabled and the association is established after coresight device is enabled. Signed-off-by: Mike Leach Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-20-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit cab280bf3533c72f95ebdb65ce534b5cdc4729dc Author: Mike Leach Date: Mon Sep 28 10:35:06 2020 -0600 coresight: cti: Fix bug clearing sysfs links on callback During module unload, a coresight driver module will call back into the CTI driver to remove any links between the two devices. The current code has 2 issues:- 1) in the CTI driver the matching code is matching to the wrong device so misses all the links. 2) The callback is called too late in the unload process resulting in a crash. This fixes both the issues. Fixes: 177af8285b59 ("coresight: cti: Enable CTI associated with devices") Reported-by: Tingwei Zhang Acked-by: Suzuki K Poulose Signed-off-by: Mike Leach Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-19-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1cce921bce7dcf6fef9bdfa4dcc9406383274408 Author: Mike Leach Date: Mon Sep 28 10:35:05 2020 -0600 coresight: cti: Fix remove sysfs link error CTI code to remove sysfs link to other devices on shutdown, incorrectly tries to remove a single ended link when these are all double ended. This implementation leaves elements in the link info structure undefined which results in a crash in recent tests for driver module unload. This patch corrects the link removal code. Fixes: 73274abb6557 ("coresight: cti: Add in sysfs links to other coresight devices") Reported-by: Tingwei Zhang Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-18-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7b0fc5d281de57a8a3e6afbfebaa37574dff4e0f Author: Tingwei Zhang Date: Mon Sep 28 10:35:04 2020 -0600 coresight: cti: Add function to register cti associate ops Add static cti_assoc_ops to coresight core driver. Let cti driver register the add_assoc and remove_assoc call back. Avoid coresight core driver to depend on cti driver. Tested-by: Mike Leach Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-17-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit ac879266322735e397957df4e119f9f5b85ed647 Author: Kim Phillips Date: Mon Sep 28 10:35:03 2020 -0600 coresight: replicator: Allow replicator driver to be built as module Allow to build coresight-replicator as modules, for ease of development. - Kconfig becomes a tristate, to allow =m - combine static and dynamic replicator init into single module_init/exit call - add replicator_remove functions, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Co-developed-by: Mian Yousaf Kaukab Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Kim Phillips Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-16-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1e8b3381c9db55385f34b1b2eb035aaffabc9ae7 Author: Kim Phillips Date: Mon Sep 28 10:35:02 2020 -0600 coresight: funnel: Allow funnel driver to be built as module Allow to build coresight-funnel as module, for ease of development. - combine static and dynamic funnel init into single module_init/exit call - add funnel_remove functions, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Co-developed-by: Mian Yousaf Kaukab Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-15-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit ecfbf09b1e3f2ac3ed1faf8385e6cf4f6efc26b5 Author: Kim Phillips Date: Mon Sep 28 10:35:01 2020 -0600 coresight: tmc: Allow tmc to be built as a module Allow to build coresight-tmc as a module, for ease of development. - Kconfig becomes a tristate, to allow =m - append -core to source file name to allow module to be called coresight-tmc by the Makefile - add an tmc_remove function, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-14-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit d9ed244ef84838ab84e7f16f609376b255dbb13d Author: Kim Phillips Date: Mon Sep 28 10:35:00 2020 -0600 coresight: tpiu: Allow tpiu to be built as a module Allow to build coresight-tpiu as a module, for ease of development. - Kconfig becomes a tristate, to allow =m - add a tpiu_remove function, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Reviewed-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-13-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 529c4451dfc33d042fe4ad301ad2f35efde27ec3 Author: Kim Phillips Date: Mon Sep 28 10:34:59 2020 -0600 coresight: etb: Allow etb to be built as a module Allow to build coresight-etb10 as a module, for ease of development. - Kconfig becomes a tristate, to allow =m - add an etb_remove function, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-12-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 22a550a306adcf312e0de8d66782e2b1cbcec11d Author: Kim Phillips Date: Mon Sep 28 10:34:58 2020 -0600 coresight: etm4x: Allow etm4x to be built as a module Allow to build coresight-etm4x as a module, for ease of development. - Kconfig becomes a tristate, to allow =m - append -core to source file name to allow module to be called coresight-etm4x by the Makefile - add an etm4_remove function, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot - delay advertising the per-cpu etmdrvdata - protect etmdrvdata[] by modifying it on relevant CPU Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-11-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 97fe626ce64c8d0adf07d2700bd3c7c7089dd12f Author: Kim Phillips Date: Mon Sep 28 10:34:57 2020 -0600 coresight: etm3x: Allow etm3x to be built as a module Allow to build coresight-etm3x as a module, for ease of development. - Kconfig becomes a tristate, to allow =m - append -core to source file name to allow module to be called coresight-etm3x by the Makefile - add an etm_remove function, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot - delay advertising the per-cpu etmdrvdata - protect etmdrvdata[] by modifying it on relevant CPU Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Reviewed-by: Mike Leach Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-10-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 716f5652a13122364a65e694386b9b26f5e98c51 Author: Tingwei Zhang Date: Mon Sep 28 10:34:56 2020 -0600 coresight: etm: perf: Fix warning caused by etm_setup_aux failure When coresight_build_path() fails on all the cpus, etm_setup_aux calls etm_free_aux() to free allocated event_data. WARN_ON(cpumask_empty(mask) will be triggered since cpu mask is empty. Check event_data->snk_config is not NULL first to avoid this warning. Fixes: f5200aa9831f38 ("coresight: perf: Refactor function free_event_data()") Reviewed-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-9-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8b0cf82677d1ffe5b441ac4684bf9135c2fb45ec Author: Tingwei Zhang Date: Mon Sep 28 10:34:55 2020 -0600 coresight: stm: Allow to build coresight-stm as a module - Kconfig becomes a tristate, to allow =m - add a stm_remove function, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-8-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 32b0707a418219b38e17276075962e25e912d4b2 Author: Tingwei Zhang Date: Mon Sep 28 10:34:54 2020 -0600 coresight: Add try_get_module() in coresight_grab_device() When coresight device is in an active session, driver module of that device should not be removed. Use try_get_module() in coresight_grab_device() to prevent module to be unloaded. Use get_device()/put_device() to protect device data in the middle of active session. Suggested-by: Suzuki K Poulose Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-7-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit d735d925f9a5029b8aaa5983d63c74f5cb4bfec0 Author: Mian Yousaf Kaukab Date: Mon Sep 28 10:34:53 2020 -0600 coresight: Export global symbols Export symbols used among coresight modules. Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-6-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 92fc7d819f6c273fb62e84eae17cd729f6e5eb65 Author: Tingwei Zhang Date: Mon Sep 28 10:34:52 2020 -0600 coresight: Add coresight prefix to barrier_pkt Add coresight prefix to make it specific. It will be a export symbol. Reviewed-by: Suzuki K Poulose Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-5-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit b8127113d01e53adba15b41aefd37b90ed83d631 Author: Kim Phillips Date: Mon Sep 28 10:34:51 2020 -0600 coresight: Use IS_ENABLED for CONFIGs that may be modules Checking for ifdef CONFIG_x fails if CONFIG_x=m. Use IS_ENABLED that is true for both built-ins and modules, instead. Required when building coresight components as modules. Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Reviewed-by: Suzuki K Poulose Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-4-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9cf087b4de237896d876df2bb2cc7fa6a8735058 Author: Tingwei Zhang Date: Mon Sep 28 10:34:50 2020 -0600 coresight: cpu_debug: Define MODULE_DEVICE_TABLE Define a MODULE_DEVICE_TABLE for cpu_debug so module can be auto loaded on boot. Reviewed-by: Suzuki K Poulose Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 32a14ad5b157ca13561f2a1d94dd229ba5956fc0 Author: Tingwei Zhang Date: Mon Sep 28 10:34:49 2020 -0600 coresight: cpu_debug: Add module name in Kconfig Provide name of cpu_debug module in Kconfig help section. Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200928163513.70169-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2defc3fa18a68963a330187f5386968e50832d06 Merge: eb45df24fe825 7f4a122d0b50b Author: Mark Brown Date: Mon Sep 28 18:28:48 2020 +0100 Merge series "use semicolons rather than commas to separate statements" from Julia Lawall : These patches replace commas by semicolons. This was done using the Coccinelle semantic patch (http://coccinelle.lip6.fr/) shown below. This semantic patch ensures that commas inside for loop headers will not be transformed. It also doesn't touch macro definitions. Coccinelle ensures that braces are added as needed when a single-statement branch turns into a multi-statement one. This semantic patch has a few false positives, for variable delcarations such as: LIST_HEAD(x), *y; The semantic patch could be improved to avoid these, but for the moment they have been removed manually (2 occurrences). // @initialize:ocaml@ @@ let infunction p = (* avoid macros *) (List.hd p).current_element <> "something_else" let combined p1 p2 = (List.hd p1).line_end = (List.hd p2).line || (((List.hd p1).line_end < (List.hd p2).line) && ((List.hd p1).col < (List.hd p2).col)) @bad@ statement S; declaration d; position p; @@ S@p d // special cases where newlines are needed (hope for no more than 5) @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @@ expression e1,e2; statement S; position p != bad.p; position p1; position p2 : script:ocaml(p1) { infunction p1 && combined p1 p2 }; @@ - e1@p1,@S@p e2@p2; + e1; e2; @r@ expression e1,e2; statement S; position p != bad.p; @@ e1 ,@S@p e2; @@ expression e1,e2; position p1; position p2 : script:ocaml(p1) { infunction p1 && not(combined p1 p2) }; statement S; position r.p; @@ e1@p1 -,@S@p +; e2@p2 ... when any // --- drivers/acpi/processor_idle.c | 4 +++- drivers/ata/pata_icside.c | 21 +++++++++++++-------- drivers/base/regmap/regmap-debugfs.c | 2 +- drivers/bcma/driver_pci_host.c | 4 ++-- drivers/block/drbd/drbd_receiver.c | 6 ++++-- drivers/char/agp/amd-k7-agp.c | 2 +- drivers/char/agp/nvidia-agp.c | 2 +- drivers/char/agp/sworks-agp.c | 2 +- drivers/char/hw_random/iproc-rng200.c | 8 ++++---- drivers/char/hw_random/mxc-rnga.c | 6 +++--- drivers/char/hw_random/stm32-rng.c | 8 ++++---- drivers/char/ipmi/bt-bmc.c | 6 +++--- drivers/clk/meson/meson-aoclk.c | 2 +- drivers/clk/mvebu/ap-cpu-clk.c | 2 +- drivers/clk/uniphier/clk-uniphier-cpugear.c | 2 +- drivers/clk/uniphier/clk-uniphier-mux.c | 2 +- drivers/clocksource/mps2-timer.c | 6 +++--- drivers/clocksource/timer-armada-370-xp.c | 8 ++++---- drivers/counter/ti-eqep.c | 2 +- drivers/crypto/amcc/crypto4xx_alg.c | 2 +- drivers/crypto/atmel-tdes.c | 2 +- drivers/crypto/hifn_795x.c | 4 ++-- drivers/crypto/talitos.c | 8 ++++---- 23 files changed, 60 insertions(+), 51 deletions(-) commit eb45df24fe825822665d1b9107d7b6730ea00953 Merge: f74d63b8c24ad 549ade5721fe1 Author: Mark Brown Date: Mon Sep 28 18:28:46 2020 +0100 Merge series "regmap: add support to regmap_field_bulk_alloc/free" from Srinivas Kandagatla : Usage of regmap_field_alloc becomes much overhead when number of fields exceed more than 3. Most of driver seems to totally covered up with these allocs/free making to very hard to read the code! On such driver is QCOM LPASS driver has extensively converted to use regmap_fields. This patchset add this new api and a user of it. Using new bulk api to allocate fields makes it much more cleaner code to read! Changes since v1: - Fix lot of spelling! No code changes! Srinivas Kandagatla (2): regmap: add support to regmap_field_bulk_alloc/free apis ASoC: lpass-platform: use devm_regmap_field_bulk_alloc drivers/base/regmap/regmap.c | 100 ++++++++++++++++++++++++++++++++ include/linux/regmap.h | 11 ++++ sound/soc/qcom/lpass-platform.c | 31 +++------- 3 files changed, 118 insertions(+), 24 deletions(-) -- 2.21.0 base-commit: f75aef392f869018f78cfedf3c320a6b3fcfda6b commit f74d63b8c24ad90ee56b5723b72feb0d1f894177 Author: Bartosz Golaszewski Date: Mon Sep 28 14:06:14 2020 +0200 regmap: destroy mutex (if used) in regmap_exit() While not destroying mutexes doesn't lead to memory leaks, it's still the correct thing to do for mutex debugging accounting. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200928120614.23172-1-brgl@bgdev.pl Signed-off-by: Mark Brown commit 7f4a122d0b50b40c64d24a5cf7aafe26dd9487ee Author: Julia Lawall Date: Sun Sep 27 21:12:24 2020 +0200 regmap: debugfs: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1601233948-11629-15-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit d4edae9c508c845d92bd59c60c4089c3addad6a8 Author: Lucas Tanure Date: Mon Sep 28 12:18:21 2020 +0100 ASoC: cs4234: Add support for Cirrus Logic CS4234 codec The CS4234 is a highly versatile CODEC that combines 4 channels of high performance analog to digital conversion, 4 channels of high performance digital to analog conversion for audio, and 1 channel of digital to analog conversion to provide a nondelayed audio reference signal to an external Class H tracking power supply. DAC5 is only supported as a 5th audio channel. Tracking Power Supply mode is not currently supported by the driver. In DSP_A mode the slots for DAC1-4 and optionally DAC5 can be set. The codec always claims 4 slots for DAC1-4 and these must be in the same nibble of the mask. The codec has a fixed mapping for ADC slots. In I2S/LJ modes the codec has a fixed mapping for DAC1-4 and ADC1-4. DAC5 is not available in these modes. The MCLK source must be preset to a valid frequency before probe() because it must be running all the time the codec is out of reset. The VA_SEL bit will be set automatically to 3.3v or 5v during probe() based on the reported voltage of the regulator supplying VA. Signed-off-by: Lucas Tanure Signed-off-by: Charles Keepax Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20200928111821.26967-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 5ebba5e7d71c965763f722e68cc60b8a4aa9cb31 Author: Charles Keepax Date: Mon Sep 28 12:18:20 2020 +0100 ASoC: cs4234: Add dtschema binding document Document the bindings for the CS4234 ASoC codec driver. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200928111821.26967-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 9fe0ec27557570e4b17735da6ce265bbe20691ed Author: Oder Chiou Date: Mon Sep 28 13:39:12 2020 +0800 ASoC: rt5682: Enable the power of "MICBIAS" and "Vref2" for the DMIC clock The power of "MICBIAS" and "Vref2" was needed while the DMIC clcok was from the PLL output. Signed-off-by: Oder Chiou Link: https://lore.kernel.org/r/20200928053912.16664-1-oder_chiou@realtek.com Signed-off-by: Mark Brown commit 5ec3c854d1a7edb95b20999d480b0c16c717254a Author: Peter Ujfalusi Date: Mon Sep 28 10:43:30 2020 +0300 ASoC: ti: j721e-evm: Fix compiler warning when CONFIG_OF=n Remove the use of of_match_ptr() macro for of_match_table to fix compiler warning when CONFIG_OF=n: sound/soc/ti/j721e-evm.c:528:34: warning: unused variable 'j721e_audio_of_match' [-Wunused-const-variable] Reported-by: kernel test robot Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200928074330.13029-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 16346a3cf02ebb8906c6a0ba907f83ea62cc874b Author: Jack Yu Date: Fri Sep 25 16:05:09 2020 -0500 ASoC: rt715: Add power-up delay to fix dmic pop sound issue. Add 400ms power-up delay recommended to fix pop noise on capture. Reviewed-by: Bard Liao Reviewed-by: Rander Wang Signed-off-by: Jack Yu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200925210509.83353-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 3bf7b94293922e436556b5ac06081af2a3775225 Author: Krzysztof Kozlowski Date: Fri Sep 25 23:27:19 2020 +0200 ASoC: dt-bindings: sgtl5000: Add common clock properties Add common properties appearing in DTSes (assigned-clocks and similar) to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dt.yaml: audio-codec@a: 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200925212719.23286-1-krzk@kernel.org Signed-off-by: Mark Brown commit ecc3e424d190eb2408751d2100e97a48f69a222d Author: Bean Huo Date: Fri Sep 18 14:38:00 2020 +0200 PCI: kirin: Return -EPROBE_DEFER in case the gpio isn't ready PCI host bridge driver can be probed before the gpiochip it requires, so, of_get_named_gpio() can return -EPROBE_DEFER. Current code lets the kirin_pcie_probe() directly return -ENODEV, which results in the PCI host controller driver probe failure; with this error code the PCI host controller driver will not be probed again when the gpiochip driver is loaded. Fix the above issue by letting kirin_pcie_probe() return -EPROBE_DEFER in such a case. Link: https://lore.kernel.org/r/20200918123800.19983-1-huobean@gmail.com Signed-off-by: Bean Huo [lorenzo.pieralisi@arm.com: commit log] Signed-off-by: Lorenzo Pieralisi commit bcae16317bcfa45f6b767cf59e02e9cc72715d27 Author: Kuninori Morimoto Date: Mon Sep 28 09:01:36 2020 +0900 ASoC: soc-pcm: remove unneeded dev_err() for snd_soc_component_module/open() snd_soc_component_module_get(), snd_soc_component_open() itself will indicate error message, thus, soc_pcm_components_open() don't need to handle it. This patch removes these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87d026bwms.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ce820145a9ec04797a417fcb01b8ff02dcfd9846 Author: Kuninori Morimoto Date: Mon Sep 28 09:01:29 2020 +0900 ASoC: soc-pcm: remove unneeded dev_err() for snd_soc_dai_startup() snd_soc_dai_startup() itself will indicate error message, thus, soc_pcm_open() don't need to handle it. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eemmbwmy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 140a4532cdb8c44a664e7e871ea5dbaa4c2829bc Author: Kuninori Morimoto Date: Mon Sep 28 09:01:24 2020 +0900 ASoC: soc-pcm: add soc_pcm_clean() and call it from soc_pcm_open/close() soc_pcm_open() does rollback when failed (A), but, it is almost same as soc_pcm_close(). static int soc_pcm_open(xxx) { ... if (ret < 0) goto xxx_err; ... return 0; ^ config_err: | ... | rtd_startup_err: (A) ... | component_err: | ... v return ret; } The difference is soc_pcm_close() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_pcm_close() and rollback. Now, soc_pcm_open/close() are handling 1) snd_soc_dai_startup/shutdown() 2) snd_soc_link_startup/shutdown() 3) snd_soc_component_module_get/put() 4) snd_soc_component_open/close() 5) pm_runtime_put/get() Now, 1) to 5) are handled. This patch adds new soc_pcm_clean() and call it from soc_pcm_open() as rollback, and from soc_pcm_close() as normal close handler. One note here is that it don't need to call snd_soc_runtime_deactivate() when rollback case, because it will be called without snd_soc_runtime_activate(). It also don't need to call snd_soc_dapm_stream_stop() when rollback case. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ft72bwn4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 939a5cfb2a5609d2d6f996b5cd853397a82a92b9 Author: Kuninori Morimoto Date: Mon Sep 28 09:01:17 2020 +0900 ASoC: soc-component: add mark for snd_soc_pcm_component_pm_runtime_get/put() soc_pcm_open() does rollback when failed (A), but, it is almost same as soc_pcm_close(). static int soc_pcm_open(xxx) { ... if (ret < 0) goto xxx_err; ... return 0; ^ config_err: | ... | rtd_startup_err: (A) ... | component_err: | ... v return ret; } The difference is soc_pcm_close() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_pcm_close() and rollback. Now, soc_pcm_open/close() are handling 1) snd_soc_dai_startup/shutdown() 2) snd_soc_link_startup/shutdown() 3) snd_soc_component_module_get/put() 4) snd_soc_component_open/close() => 5) pm_runtime_put/get() This patch is for 5) pm_runtime_put/get(). The idea of having bit-flag or counter is not enough for this purpose. For example if one DAI is used for 2xPlaybacks for some reasons, and if 1st Playback was succeeded but 2nd Playback was failed, 2nd Playback rollback doesn't need to call shutdown. But it has succeeded bit-flag or counter via 1st Playback, thus, 2nd Playback rollback will call unneeded shutdown. And 1st Playback's necessary shutdown will not be called, because bit-flag or counter was cleared by wrong 2nd Playback rollback. To avoid such case, this patch marks substream pointer when get() was succeeded. If rollback needed, it will check rollback flag and marked substream pointer. One note here is that it cares *current* get() only now. but we might want to check *whole* marked substream in the future. This patch is using macro named "push/pop", so that it can be easily update. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h7ribwnb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 51aff91ad123e03d1461ec1d980efd1814dca69e Author: Kuninori Morimoto Date: Mon Sep 28 09:01:04 2020 +0900 ASoC: soc-component: add mark for soc_pcm_components_open/close() soc_pcm_open() does rollback when failed (A), but, it is almost same as soc_pcm_close(). static int soc_pcm_open(xxx) { ... if (ret < 0) goto xxx_err; ... return 0; ^ config_err: | ... | rtd_startup_err: (A) ... | component_err: | ... v return ret; } The difference is soc_pcm_close() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_pcm_close() and rollback. Now, soc_pcm_open/close() are handling 1) snd_soc_dai_startup/shutdown() 2) snd_soc_link_startup/shutdown() => 3) snd_soc_component_module_get/put() => 4) snd_soc_component_open/close() 5) pm_runtime_put/get() This patch is for 3) snd_soc_component_module_get/put() 4) snd_soc_component_open/close(). The idea of having bit-flag or counter is not enough for this purpose. For example if one DAI is used for 2xPlaybacks for some reasons, and if 1st Playback was succeeded but 2nd Playback was failed, 2nd Playback rollback doesn't need to call shutdown. But it has succeeded bit-flag or counter via 1st Playback, thus, 2nd Playback rollback will call unneeded shutdown. And 1st Playback's necessary shutdown will not be called, because bit-flag or counter was cleared by wrong 2nd Playback rollback. To avoid such case, this patch marks substream pointer when open() was succeeded. If rollback needed, it will check rollback flag and marked substream pointer. One note here is that it cares *current* open() only now. but we might want to check *whole* marked substream in the future. This patch is using macro named "push/pop", so that it can be easily update. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87imbybwno.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6064ed73cd2405d13c252b190ac64c03ab40e4b9 Author: Kuninori Morimoto Date: Mon Sep 28 09:00:57 2020 +0900 ASoC: soc-link: add mark for snd_soc_link_startup/shutdown() soc_pcm_open() does rollback when failed (A), but, it is almost same as soc_pcm_close(). static int soc_pcm_open(xxx) { ... if (ret < 0) goto xxx_err; ... return 0; ^ config_err: | ... | rtd_startup_err: (A) ... | component_err: | ... v return ret; } The difference is soc_pcm_close() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_pcm_close() and rollback. Now, soc_pcm_open/close() are handling 1) snd_soc_dai_startup/shutdown() => 2) snd_soc_link_startup/shutdown() 3) snd_soc_component_module_get/put() 4) snd_soc_component_open/close() 5) pm_runtime_put/get() This patch is for 2) snd_soc_link_startup/shutdown(). The idea of having bit-flag or counter is not enough for this purpose. For example if one DAI is used for 2xPlaybacks for some reasons, and if 1st Playback was succeeded but 2nd Playback was failed, 2nd Playback rollback doesn't need to call shutdown. But it has succeeded bit-flag or counter via 1st Playback, thus, 2nd Playback rollback will call unneeded shutdown. And 1st Playback's necessary shutdown will not be called, because bit-flag or counter was cleared by wrong 2nd Playback rollback. To avoid such case, this patch marks substream pointer when startup() was succeeded. If rollback needed, it will check rollback flag and marked substream pointer. One note here is that it cares *current* startup() only now. but we might want to check *whole* marked substream in the future. This patch is using macro named "push/pop", so that it can be easily update. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0webwnv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 00a0b46c99e26b30ea27c1fb4f4dbdfc6f8b1c49 Author: Kuninori Morimoto Date: Mon Sep 28 09:00:40 2020 +0900 ASoC: soc-dai: add mark for snd_soc_dai_startup/shutdown() soc_pcm_open() does rollback when failed (A), but, it is almost same as soc_pcm_close(). static int soc_pcm_open(xxx) { ... if (ret < 0) goto xxx_err; ... return 0; ^ config_err: | ... | rtd_startup_err: (A) ... | component_err: | ... v return ret; } The difference is soc_pcm_close() is for all dai/component/substream, rollback is for succeeded part only. This kind of duplicated code can be a hotbed of bugs, thus, we want to share soc_pcm_close() and rollback. Now, soc_pcm_open/close() are handling => 1) snd_soc_dai_startup/shutdown() 2) snd_soc_link_startup/shutdown() 3) snd_soc_component_module_get/put() 4) snd_soc_component_open/close() 5) pm_runtime_put/get() This patch is for 1) snd_soc_dai_startup/shutdown(). The idea of having bit-flag or counter is not enough for this purpose. For example if one DAI is used for 2xPlaybacks for some reasons, and if 1st Playback was succeeded but 2nd Playback was failed, 2nd Playback rollback doesn't need to call shutdown. But it has succeeded bit-flag or counter via 1st Playback, thus, 2nd Playback rollback will call unneeded shutdown. And 1st Playback's necessary shutdown will not be called, because bit-flag or counter was cleared by wrong 2nd Playback rollback. To avoid such case, this patch marks substream pointer when startup() was succeeded. If rollback needed, it will check rollback flag and marked substream pointer. One note here is that it cares *current* startup() only now. but we might want to check *whole* marked substream in the future. This patch is using macro named "push/pop", so that it can be easily update. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lfgubwoc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1a31182edd0083bb9f26e582ed39f92f898c4d0a Author: Goldwyn Rodrigues Date: Mon Sep 28 08:51:08 2020 -0700 iomap: Call inode_dio_end() before generic_write_sync() iomap complete routine can deadlock with btrfs_fallocate because of the call to generic_write_sync(). P0 P1 inode_lock() fallocate(FALLOC_FL_ZERO_RANGE) __iomap_dio_rw() inode_lock() inode_unlock() inode_dio_wait() iomap_dio_complete() generic_write_sync() btrfs_file_fsync() inode_lock() inode_dio_end() is used to notify the end of DIO data in order to synchronize with truncate. Call inode_dio_end() before calling generic_write_sync(), so filesystems can lock i_rwsem during a sync. This matches the way it is done in fs/direct-io.c:dio_complete(). Signed-off-by: Goldwyn Rodrigues Reviewed-by: Christoph Hellwig Reviewed-by: Josef Bacik Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit c3d4ed1abecfcfc801199cfadb71f5b80e025d9e Author: Christoph Hellwig Date: Mon Sep 28 08:51:08 2020 -0700 iomap: Allow filesystem to call iomap_dio_complete without i_rwsem This is to avoid the deadlock caused in btrfs because of O_DIRECT | O_DSYNC. Filesystems such as btrfs require i_rwsem while performing sync on a file. iomap_dio_rw() is called under i_rw_sem. This leads to a deadlock because of: iomap_dio_complete() generic_write_sync() btrfs_sync_file() Separate out iomap_dio_complete() from iomap_dio_rw(), so filesystems can call iomap_dio_complete() after unlocking i_rwsem. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Goldwyn Rodrigues Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4595a298d5563cf76c1d852970f162051fd1a7a6 Author: Matthew Wilcox (Oracle) Date: Fri Sep 25 11:16:53 2020 -0700 iomap: Set all uptodate bits for an Uptodate page For filesystems with block size < page size, we need to set all the per-block uptodate bits if the page was already uptodate at the time we create the per-block metadata. This can happen if the page is invalidated (eg by a write to drop_caches) but ultimately not removed from the page cache. This is a data corruption issue as page writeback skips blocks which are marked !uptodate. Fixes: 9dc55f1389f9 ("iomap: add support for sub-pagesize buffered I/O without buffer heads") Signed-off-by: Matthew Wilcox (Oracle) Reported-by: Qian Cai Cc: Brian Foster Reviewed-by: Gao Xiang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 1ed4211dc1e8d07e3ae7d3ed1948945b9b3780f7 Merge: 163090c14a427 21cc2f3f799fa Author: Jens Axboe Date: Mon Sep 28 09:02:48 2020 -0600 Merge tag 'nvme-5.10-2020-09-27' of git://git.infradead.org/nvme into for-5.10/drivers Pull NVMe updates from Christoph: "nvme updates for 5.10 - fix keep alive timer modification (Amit Engel) - order the PCI ID list more sensibly (Andy Shevchenko) - cleanup the open by controller helper (Chaitanya Kulkarni) - use an xarray for th CSE log lookup (Chaitanya Kulkarni) - support ZNS in nvmet passthrough mode (Chaitanya Kulkarni) - fix nvme_ns_report_zones (me) - add a sanity check to nvmet-fc (James Smart) - fix interrupt allocation when too many polled queues are specified (Jeffle Xu) - small nvmet-tcp optimization (Mark Wunderlich)" * tag 'nvme-5.10-2020-09-27' of git://git.infradead.org/nvme: nvme-pci: allocate separate interrupt for the reserved non-polled I/O queue nvme: fix error handling in nvme_ns_report_zones nvmet-fc: fix missing check for no hostport struct nvmet: add passthru ZNS support nvmet: handle keep-alive timer when kato is modified by a set features cmd nvmet-tcp: have queue io_work context run on sock incoming cpu nvme-pci: Move enumeration by class to be last in the table nvme: use an xarray to lookup the Commands Supported and Effects log nvme: lift the file open code from nvme_ctrl_get_by_path commit 8229cca8c3ea70bcb3b73aa105ae1d00aafbd3c8 Author: Xianting Tian Date: Sat Sep 26 10:39:47 2020 +0800 blk-mq: add cond_resched() in __blk_mq_alloc_rq_maps() We found blk_mq_alloc_rq_maps() takes more time in kernel space when testing nvme device hot-plugging. The test and anlysis as below. Debug code, 1, blk_mq_alloc_rq_maps(): u64 start, end; depth = set->queue_depth; start = ktime_get_ns(); pr_err("[%d:%s switch:%ld,%ld] queue depth %d, nr_hw_queues %d\n", current->pid, current->comm, current->nvcsw, current->nivcsw, set->queue_depth, set->nr_hw_queues); do { err = __blk_mq_alloc_rq_maps(set); if (!err) break; set->queue_depth >>= 1; if (set->queue_depth < set->reserved_tags + BLK_MQ_TAG_MIN) { err = -ENOMEM; break; } } while (set->queue_depth); end = ktime_get_ns(); pr_err("[%d:%s switch:%ld,%ld] all hw queues init cost time %lld ns\n", current->pid, current->comm, current->nvcsw, current->nivcsw, end - start); 2, __blk_mq_alloc_rq_maps(): u64 start, end; for (i = 0; i < set->nr_hw_queues; i++) { start = ktime_get_ns(); if (!__blk_mq_alloc_rq_map(set, i)) goto out_unwind; end = ktime_get_ns(); pr_err("hw queue %d init cost time %lld ns\n", i, end - start); } Test nvme hot-plugging with above debug code, we found it totally cost more than 3ms in kernel space without being scheduled out when alloc rqs for all 16 hw queues with depth 1023, each hw queue cost about 140-250us. The cost time will be increased with hw queue number and queue depth increasing. And in an extreme case, if __blk_mq_alloc_rq_maps() returns -ENOMEM, it will try "queue_depth >>= 1", more time will be consumed. [ 428.428771] nvme nvme0: pci function 10000:01:00.0 [ 428.428798] nvme 10000:01:00.0: enabling device (0000 -> 0002) [ 428.428806] pcieport 10000:00:00.0: can't derive routing for PCI INT A [ 428.428809] nvme 10000:01:00.0: PCI INT A: no GSI [ 432.593374] [4688:kworker/u33:8 switch:663,2] queue depth 30, nr_hw_queues 1 [ 432.593404] hw queue 0 init cost time 22883 ns [ 432.593408] [4688:kworker/u33:8 switch:663,2] all hw queues init cost time 35960 ns [ 432.595953] nvme nvme0: 16/0/0 default/read/poll queues [ 432.595958] [4688:kworker/u33:8 switch:700,2] queue depth 1023, nr_hw_queues 16 [ 432.596203] hw queue 0 init cost time 242630 ns [ 432.596441] hw queue 1 init cost time 235913 ns [ 432.596659] hw queue 2 init cost time 216461 ns [ 432.596877] hw queue 3 init cost time 215851 ns [ 432.597107] hw queue 4 init cost time 228406 ns [ 432.597336] hw queue 5 init cost time 227298 ns [ 432.597564] hw queue 6 init cost time 224633 ns [ 432.597785] hw queue 7 init cost time 219954 ns [ 432.597937] hw queue 8 init cost time 150930 ns [ 432.598082] hw queue 9 init cost time 143496 ns [ 432.598231] hw queue 10 init cost time 147261 ns [ 432.598397] hw queue 11 init cost time 164522 ns [ 432.598542] hw queue 12 init cost time 143401 ns [ 432.598692] hw queue 13 init cost time 148934 ns [ 432.598841] hw queue 14 init cost time 147194 ns [ 432.598991] hw queue 15 init cost time 148942 ns [ 432.598993] [4688:kworker/u33:8 switch:700,2] all hw queues init cost time 3035099 ns [ 432.602611] nvme0n1: p1 So use this patch to trigger schedule between each hw queue init, to avoid other threads getting stuck. It is not in atomic context when executing __blk_mq_alloc_rq_maps(), so it is safe to call cond_resched(). Signed-off-by: Xianting Tian Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 6b61d49a55796dbbc479eeb4465e59fd656c719c Author: Grygorii Strashko Date: Fri Sep 18 19:55:18 2020 +0300 PM: runtime: Fix timer_expires data type on 32-bit arches Commit 8234f6734c5d ("PM-runtime: Switch autosuspend over to using hrtimers") switched PM runtime autosuspend to use hrtimers and all related time accounting in ns, but missed to update the timer_expires data type in struct dev_pm_info to u64. This causes the timer_expires value to be truncated on 32-bit architectures when assignment is done from u64 values: rpm_suspend() |- dev->power.timer_expires = expires; Fix it by changing the timer_expires type to u64. Fixes: 8234f6734c5d ("PM-runtime: Switch autosuspend over to using hrtimers") Signed-off-by: Grygorii Strashko Acked-by: Pavel Machek Acked-by: Vincent Guittot Cc: 5.0+ # 5.0+ [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit fdb46faeab2f3fa2b43a55059b33b8f98b2e1442 Author: Steven Rostedt (VMware) Date: Fri Sep 25 15:31:44 2020 -0400 x86: Use tracepoint_enabled() for msr tracepoints instead of open coding it 7f47d8cc039f ("x86, tracing, perf: Add trace point for MSR accesses") added tracing of msr read and write, but because of complexity in having tracepoints in headers, and even more so for a core header like msr.h, not to mention the bloat a tracepoint adds to inline functions, a helper function is needed to be called from the header. Use the new tracepoint_enabled() macro in tracepoint-defs.h to test if the tracepoint is active before calling the helper function, instead of open coding the same logic, which requires knowing the internals of a tracepoint. Cc: Andi Kleen Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Steven Rostedt (VMware) commit f3643b5b77f26865b566c867b1aa99d1ba903cd0 Merge: f49735f4978f4 955921289dcdb Author: Rafael J. Wysocki Date: Mon Sep 28 16:31:25 2020 +0200 Merge back cpuidle material for 5.10. commit 981aa1d366bf46bdc1c9259a5ab818a8d522724e Author: Thomas Gleixner Date: Mon Sep 28 12:13:07 2020 +0200 PCI: MSI: Fix Kconfig dependencies for PCI_MSI_ARCH_FALLBACKS The unconditional selection of PCI_MSI_ARCH_FALLBACKS has an unmet dependency because PCI_MSI_ARCH_FALLBACKS is defined in a 'if PCI' clause. As it is only relevant when PCI_MSI is enabled, update the affected architecture Kconfigs to make the selection of PCI_MSI_ARCH_FALLBACKS depend on 'if PCI_MSI'. Fixes: 077ee78e3928 ("PCI/MSI: Make arch_.*_msi_irq[s] fallbacks selectable") Reported-by: Qian Cai Signed-off-by: Thomas Gleixner Cc: Vasily Gorbik Links: https://lore.kernel.org/r/cdfd63305caa57785b0925dd24c0711ea02c8527.camel@redhat.com commit c441bcd31266dc403beb6f2c2f095696a1be5325 Author: Miquel Raynal Date: Thu Aug 27 10:52:04 2020 +0200 mtd: rawnand: Make use of the ECC framework Just enable the ECC framework with raw NAND so that we can drop, one by one, all the unnecessary/redundant definitions. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-17-miquel.raynal@bootlin.com commit 93ef92f6f42275e3d6070b1c5020bfca0e614fff Author: Miquel Raynal Date: Thu Aug 27 10:52:03 2020 +0200 mtd: nand: Use the new generic ECC object Embed a generic NAND ECC high-level object in the nand_device structure to carry all the ECC engine configuration/data. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-16-miquel.raynal@bootlin.com commit 53576c7bfc3589fc7cd58cc952168db0449886a7 Author: Miquel Raynal Date: Thu Aug 27 10:52:02 2020 +0200 mtd: rawnand: Use nanddev_get/set_ecc_requirements() when relevant Instead of accessing ->strength/step_size directly. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-15-miquel.raynal@bootlin.com commit 3316c8e3ad1fcaeefd4ffa93587dd78fb24e8afa Author: Miquel Raynal Date: Thu Aug 27 10:52:01 2020 +0200 mtd: nand: Create helpers to set/extract the ECC requirements Despite its current name, the eccreq field actually encodes both the NAND requirements and the final ECC configuration. That works fine when using on-die ECC since those 2 concepts match perfectly, but it starts being a problem as soon as we use on-host ECC engines, where we're not guaranteed to have a perfect match. Let's hide the ECC requirements access behind helpers so we can later split those 2 concepts. As the structures have not been clarified yet, these helpers access the same internal variable as nanddev_get_ecc_conf() for now. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-14-miquel.raynal@bootlin.com commit 9a333a72c1d0539be664bf121a68c31e48e10d54 Author: Miquel Raynal Date: Thu Aug 27 10:52:00 2020 +0200 mtd: spinand: Use nanddev_get_ecc_conf() when relevant Instead of accessing ->strength/step_size directly. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-13-miquel.raynal@bootlin.com commit d193792a26c216cb7db3cf12300c9414990fa603 Author: Miquel Raynal Date: Thu Aug 27 10:51:59 2020 +0200 mtd: nand: Create a helper to extract the ECC configuration Despite its current name, the eccreq field actually encodes both the NAND requirements and the final ECC configuration. That works fine when using on-die ECC since those 2 concepts match perfectly, but it starts being a problem as soon as we use on-host ECC engines, where we're not guaranteed to have a perfect match. Let's hide the ECC configuration access behind a helper so we can later split those 2 concepts. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-12-miquel.raynal@bootlin.com commit bace41f80f65dc4ba13c892bac783e7e81847379 Author: Miquel Raynal Date: Thu Aug 27 10:51:58 2020 +0200 mtd: rawnand: Use the new ECC engine type enumeration Mechanical switch from the legacy "mode" enumeration to the new "engine type" enumeration in drivers and board files. The device tree parsing is also updated to return the new enumeration from the old strings. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-11-miquel.raynal@bootlin.com commit 55c4478a8f0ecedc0c1a0c9379380249985c372a Author: Xiaoyi Chen Date: Tue Sep 22 16:19:19 2020 +0000 PM: hibernate: Batch hibernate and resume IO requests Hibernate and resume process submits individual IO requests for each page of the data, so use blk_plug to improve the batching of these requests. Testing this change with hibernate and resumes consistently shows merging of the IO requests and more than an order of magnitude improvement in hibernate and resume speed is observed. One hibernate and resume cycle for 16GB RAM out of 32GB in use takes around 21 minutes before the change, and 1 minutes after the change on a system with limited storage IOPS. Signed-off-by: Xiaoyi Chen Co-Developed-by: Anchal Agarwal Signed-off-by: Anchal Agarwal [ rjw: Subject and changelog edits, white space damage fixes ] Signed-off-by: Rafael J. Wysocki commit ef24f97daac4d9450c956ab165d8337c2feca0e9 Author: Miquel Raynal Date: Thu Aug 27 10:51:57 2020 +0200 mtd: rawnand: Separate the ECC engine type and the ECC byte placement The use of "syndrome" placement should not be encoded in the ECC engine mode/type. Create a "placement" field in NAND chip and change all occurrences of the NAND_ECC_HW_SYNDROME enumeration to be just NAND_ECC_HW and possibly a placement entry like NAND_ECC_PLACEMENT_INTERLEAVED. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-10-miquel.raynal@bootlin.com commit f5be3a61fdb5dd11ef60173e2783ccf62685f892 Author: Shaokun Zhang Date: Tue Sep 22 13:53:45 2020 +0800 arm64: perf: Add support caps under sysfs ARMv8.4-PMU introduces the PMMIR_EL1 registers and some new PMU events, like STALL_SLOT etc, are related to it. Let's add a caps directory to /sys/bus/event_source/devices/armv8_pmuv3_0/ and support slots from PMMIR_EL1 registers in this entry. The user programs can get the slots from sysfs directly. /sys/bus/event_source/devices/armv8_pmuv3_0/caps/slots is exposed under sysfs. Both ARMv8.4-PMU and STALL_SLOT event are implemented, it returns the slots from PMMIR_EL1, otherwise it will return 0. Signed-off-by: Shaokun Zhang Cc: Will Deacon Cc: Mark Rutland Link: https://lore.kernel.org/r/1600754025-53535-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit f5bec330e3010450daeb5cb6a94a4a7c54afa306 Author: Rajkumar Manoharan Date: Mon Sep 28 00:28:11 2020 -0700 nl80211: extend support to config spatial reuse parameter set Allow the user to configure below Spatial Reuse Parameter Set element. * Non-SRG OBSS PD Max Offset * SRG BSS Color Bitmap * SRG Partial BSSID Bitmap Signed-off-by: Rajkumar Manoharan Link: https://lore.kernel.org/r/1601278091-20313-2-git-send-email-rmanohar@codeaurora.org Signed-off-by: Johannes Berg commit 265a0708339daeb71848169f52b91066cc2984fd Author: Ben Greear Date: Tue Sep 22 12:19:56 2020 -0700 mac80211: Support not iterating over not-sdata-in-driver ifaces Allow drivers to request that interface-iterator does NOT iterate over interfaces that are not sdata-in-driver. This will allow us to fix crashes in ath10k (and possibly other drivers). To summarize Johannes' explanation: Consider add interface wlan0 add interface wlan1 iterate active interfaces -> wlan0 wlan1 add interface wlan2 iterate active interfaces -> wlan0 wlan1 wlan2 If you apply this scenario to a restart, which ought to be functionally equivalent to the normal startup, just compressed in time, you're basically saying that today you get add interface wlan0 add interface wlan1 iterate active interfaces -> wlan0 wlan1 wlan2 << problem here add interface wlan2 iterate active interfaces -> wlan0 wlan1 wlan2 which yeah, totally seems wrong. But fixing that to be add interface wlan0 add interface wlan1 iterate active interfaces -> add interface wlan2 iterate active interfaces -> (or maybe -> wlan0 wlan1 wlan2 if the reconfig already completed) This is also at least somewhat wrong, but better to not iterate over something that exists in the driver than iterate over something that does not. Originally the first issue was causing crashes in testing with lots of station vdevs on an ath10k radio, combined with firmware crashing. I ran with a similar patch for years with no obvious bad results, including significant testing with ath9k and ath10k. Signed-off-by: Ben Greear Link: https://lore.kernel.org/r/20200922191957.25257-1-greearb@candelatech.com Signed-off-by: Johannes Berg commit 6c8b6e4a5f745ec49286ac0a3f1d591a34818f82 Author: Rajkumar Manoharan Date: Mon Sep 28 00:28:10 2020 -0700 nl80211: fix OBSS PD min and max offset validation The SRG min and max offset won't present when SRG Information Present of SR control field of Spatial Reuse Parameter Set element set to 0. Per spec. IEEE802.11ax D7.0, SRG OBSS PD Min Offset ≤ SRG OBSS PD Max Offset. Hence fix the constrain check to allow same values in both offset and also call appropriate nla_get function to read the values. Fixes: 796e90f42b7e ("cfg80211: add support for parsing OBBS_PD attributes") Signed-off-by: Rajkumar Manoharan Link: https://lore.kernel.org/r/1601278091-20313-1-git-send-email-rmanohar@codeaurora.org Signed-off-by: Johannes Berg commit 21439b652b90600eaf0c4d8e15cb96b3bdb95212 Author: Johannes Berg Date: Mon Sep 28 13:51:30 2020 +0200 mac80211: fix some more kernel-doc in mesh Add a few more missing kernel-doc annotations in mesh code. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200928135129.6409460c28b7.I43657d0b70398723e59e4e724f56af88af0fec7e@changeid Signed-off-by: Johannes Berg commit a55b7bb1c14662490689e094964ecc5387bb2b55 Author: Ian Rogers Date: Wed Sep 23 14:06:55 2020 -0700 perf test: Fix msan uninitialized use. Ensure 'st' is initialized before an error branch is taken. Fixes test "67: Parse and process metrics" with LLVM msan: ==6757==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x5570edae947d in rblist__exit tools/perf/util/rblist.c:114:2 #1 0x5570edb1c6e8 in runtime_stat__exit tools/perf/util/stat-shadow.c:141:2 #2 0x5570ed92cfae in __compute_metric tools/perf/tests/parse-metric.c:187:2 #3 0x5570ed92cb74 in compute_metric tools/perf/tests/parse-metric.c:196:9 #4 0x5570ed92c6d8 in test_recursion_fail tools/perf/tests/parse-metric.c:318:2 #5 0x5570ed92b8c8 in test__parse_metric tools/perf/tests/parse-metric.c:356:2 #6 0x5570ed8de8c1 in run_test tools/perf/tests/builtin-test.c:410:9 #7 0x5570ed8ddadf in test_and_print tools/perf/tests/builtin-test.c:440:9 #8 0x5570ed8dca04 in __cmd_test tools/perf/tests/builtin-test.c:661:4 #9 0x5570ed8dbc07 in cmd_test tools/perf/tests/builtin-test.c:807:9 #10 0x5570ed7326cc in run_builtin tools/perf/perf.c:313:11 #11 0x5570ed731639 in handle_internal_command tools/perf/perf.c:365:8 #12 0x5570ed7323cd in run_argv tools/perf/perf.c:409:2 #13 0x5570ed731076 in main tools/perf/perf.c:539:3 Fixes: commit f5a56570a3f2 ("perf test: Fix memory leaks in parse-metric test") Signed-off-by: Ian Rogers Reviewed-by: Nick Desaulniers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: clang-built-linux@googlegroups.com Link: http://lore.kernel.org/lkml/20200923210655.4143682-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit aa98d8482c8397d4087248e1f50d50078b34326d Author: Ian Rogers Date: Thu Sep 24 17:39:03 2020 -0700 perf parse-events: Reduce casts around bp_addr perf_event_attr bp_addr is a u64. parse-events.y parses it as a u64, but casts it to a void* and then parse-events.c casts it back to a u64. Rather than all the casts, change the type of the address to be a u64. This removes an issue noted in: https://lore.kernel.org/lkml/20200903184359.GC3495158@kernel.org/ Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Jin Yao Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200925003903.561568-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 40b74c30ffb97c668e9745a098101fecaaec0ea2 Author: Namhyung Kim Date: Thu Sep 24 21:44:55 2020 +0900 perf test: Add expand cgroup event test It'll expand given events for cgroups A, B and C. $ perf test -v expansion 69: Event expansion for cgroups : --- start --- test child forked, pid 983140 metric expr 1 / IPC for CPI metric expr instructions / cycles for IPC found event instructions found event cycles adding {instructions,cycles}:W copying metric event for cgroup 'A': instructions (idx=0) copying metric event for cgroup 'B': instructions (idx=0) copying metric event for cgroup 'C': instructions (idx=0) test child finished with 0 ---- end ---- Event expansion for cgroups: Ok Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: John Garry Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200924124455.336326-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 735b2673941ec22ae866216db32bb553fec42aeb Author: Dan Carpenter Date: Wed Sep 23 11:42:03 2020 +0300 cfg80211: regulatory: remove a bogus initialization The the __freq_reg_info() never returns NULL and the callers don't check for NULL. This initialization to set "reg_rule = NULL;" is just there to make GCC happy but it's not required in current GCCs. The problem is that Smatch sees the initialization and concludes that this function can return NULL so it complains that the callers are not checking for it. Smatch used to be able to parse this correctly but we recently changed the code from: - for (bw = MHZ_TO_KHZ(20); bw >= min_bw; bw = bw / 2) { + for (bw = MHZ_TO_KHZ(bws[i]); bw >= min_bw; bw = MHZ_TO_KHZ(bws[i--])) { Originally Smatch used to understand that this code always iterates through the loop once, but the change from "MHZ_TO_KHZ(20)" to "MHZ_TO_KHZ(bws[i])" is too complicated for Smatch. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200923084203.GC1454948@mwanda Signed-off-by: Johannes Berg commit e3f25908b0b2e7e1d04d35ce46c9b9d4e4519b43 Author: Felix Fietkau Date: Sun Sep 27 12:56:05 2020 +0200 mac80211: fix regression in sta connection monitor When a frame was acked and probe frames were sent, the connection monitoring needs to be reset, otherwise it will keep probing until the connection is considered dead, even though frames have been acked in the mean time. Fixes: 9abf4e49830d ("mac80211: optimize station connection monitor") Reported-by: Georgi Valkov Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200927105605.97954-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 89fb1ca2abb7fba6587a5768cfee9f89daf9be6f Author: Namhyung Kim Date: Thu Sep 24 21:44:54 2020 +0900 perf tools: Allow creation of cgroup without open This is a preparation for a test case of expanding events for multiple cgroups. Instead of using real system cgroup, the test will use fake cgroups so it needs a way to have them without a open file descriptor. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200924124455.336326-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b214ba8c4275d66029ad34ad222326dca43e7e26 Author: Namhyung Kim Date: Thu Sep 24 21:44:53 2020 +0900 perf tools: Copy metric events properly when expand cgroups The metricgroup__copy_metric_events() is to handle metrics events when expanding event for cgroups. As the metric events keep pointers to evsel, it should be refreshed when events are cloned during the operation. The perf_stat__collect_metric_expr() is also called in case an event has a metric directly. During the copy, it references evsel by index as the evlist now has cloned evsels for the given cgroup. Also kernel test robot found an issue in the python module import so add empty implementations of those two functions to fix it. Reported-by: kernel test robot Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: John Garry Cc: Kajol Jain Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200924124455.336326-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 148fe295b7d9d892b2b0f47070233ccdc70c83cd Author: Thomas Pedersen Date: Mon Sep 21 19:28:18 2020 -0700 mac80211_hwsim: indicate support for S1G Advertise S1G Capabilities and channels to mac80211. Requires a few fixups to account for missing sband->bitrates, and a custom regulatory db to actually enable the S1G channels. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-18-thomas@adapt-ip.com [small code cleanup] Signed-off-by: Johannes Berg commit a3ffee47354fca71c24223af2b20ef69a1b0ff5b Author: Thomas Pedersen Date: Mon Sep 21 19:28:17 2020 -0700 mac80211_hwsim: write TSF timestamp correctly to S1G beacon S1G beacons are different from normal management beacons, so write the timestamp to the correct location there. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-17-thomas@adapt-ip.com [rewrite commit message that was not useful after patch reordering] Signed-off-by: Johannes Berg commit 58ef7c1b555e0e605da24b76cb2821dd3fcd6bc6 Author: Thomas Pedersen Date: Mon Sep 21 19:28:16 2020 -0700 nl80211: include frequency offset in survey info Recently channels gained a potential frequency offset, so include this in the per-channel survey info. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-16-thomas@adapt-ip.com [add the offset only if non-zero] Signed-off-by: Johannes Berg commit 1d00ce807efaa0ee3a96de7801be042a06d35873 Author: Thomas Pedersen Date: Mon Sep 21 19:28:15 2020 -0700 mac80211: support S1G association The changes required for associating in S1G are: - apply S1G BSS channel info before assoc - mark all S1G STAs as QoS STAs - include and parse AID request element - handle new Association Response format - don't fail assoc if supported rates element is missing Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-15-thomas@adapt-ip.com [pass skb to ieee80211_add_aid_request_ie(), remove unused variable 'bss'] Signed-off-by: Johannes Berg commit d1c5a0e86a4e39c9f1bfbfb5ced2ef14103cbf45 Author: Namhyung Kim Date: Thu Sep 24 21:44:52 2020 +0900 perf stat: Add --for-each-cgroup option The --for-each-cgroup option is a syntax sugar to monitor large number of cgroups easily. Current command line requires to list all the events and cgroups even if users want to monitor same events for each cgroup. This patch addresses that usage by copying given events for each cgroup on user's behalf. For instance, if they want to monitor 6 events for 200 cgroups each they should write 1200 event names (with -e) AND 1200 cgroup names (with -G) on the command line. But with this change, they can just specify 6 events and 200 cgroups with a new option. A simpler example below: It wants to measure 3 events for 2 cgroups ('A' and 'B'). The result is that total 6 events are counted like below. $ perf stat -a -e cpu-clock,cycles,instructions --for-each-cgroup A,B sleep 1 Performance counter stats for 'system wide': 988.18 msec cpu-clock A # 0.987 CPUs utilized 3,153,761,702 cycles A # 3.200 GHz (100.00%) 8,067,769,847 instructions A # 2.57 insn per cycle (100.00%) 982.71 msec cpu-clock B # 0.982 CPUs utilized 3,136,093,298 cycles B # 3.182 GHz (99.99%) 8,109,619,327 instructions B # 2.58 insn per cycle (99.99%) 1.001228054 seconds time elapsed Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200924124455.336326-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 09a740ce352e1a1d16b9984115514ba9a4f4704b Author: Thomas Pedersen Date: Mon Sep 21 19:28:14 2020 -0700 mac80211: receive and process S1G beacons S1G beacons are 802.11 Extension Frames, so the fixed header part differs from regular beacons. Add a handler to process S1G beacons and abstract out the fetching of BSSID and element start locations in the beacon body handler. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-14-thomas@adapt-ip.com [don't rename, small coding style cleanups] Signed-off-by: Johannes Berg commit 0c899c25d754ae386940f0e1b86b31d3921480b6 Author: Paolo Bonzini Date: Thu Sep 24 14:45:27 2020 +0200 KVM: x86: do not attempt TSC synchronization on guest writes KVM special-cases writes to MSR_IA32_TSC so that all CPUs have the same base for the TSC. This logic is complicated, and we do not want it to have any effect once the VM is started. In particular, if any guest started to synchronize its TSCs with writes to MSR_IA32_TSC rather than MSR_IA32_TSC_ADJUST, the additional effect of kvm_write_tsc code would be uncharted territory. Therefore, this patch makes writes to MSR_IA32_TSC behave essentially the same as writes to MSR_IA32_TSC_ADJUST when they come from the guest. A new selftest (which passes both before and after the patch) checks the current semantics of writes to MSR_IA32_TSC and MSR_IA32_TSC_ADJUST originating from both the host and the guest. Upcoming work to remove the special side effects of host-initiated writes to MSR_IA32_TSC and MSR_IA32_TSC_ADJUST will be able to build onto this test, adjusting the host side to use the new APIs and achieve the same effect. Signed-off-by: Paolo Bonzini commit a7d5c7ce41ac1e2537d78ddb57ef0ac4f737aa19 Author: Paolo Bonzini Date: Tue Sep 22 07:43:14 2020 -0400 KVM: nSVM: delay MSR permission processing to first nested VM run Allow userspace to set up the memory map after KVM_SET_NESTED_STATE; to do so, move the call to nested_svm_vmrun_msrpm inside the KVM_REQ_GET_NESTED_STATE_PAGES handler (which is currently not used by nSVM). This is similar to what VMX does already. Signed-off-by: Paolo Bonzini commit 729c15c20f1a7c9ad1d09a603ad1aa7fb60b1f88 Author: Paolo Bonzini Date: Tue Sep 22 06:53:57 2020 -0400 KVM: x86: rename KVM_REQ_GET_VMCS12_PAGES We are going to use it for SVM too, so use a more generic name. Signed-off-by: Paolo Bonzini commit d468706e313ca3ec85b0e6e71a960ee0bbadd9f3 Author: Alexander Graf Date: Fri Sep 25 16:34:22 2020 +0200 KVM: selftests: Add test for user space MSR handling Now that we have the ability to handle MSRs from user space and also to select which ones we do want to prevent in-kernel KVM code from handling, let's add a selftest to show case and verify the API. Signed-off-by: Alexander Graf Message-Id: <20200925143422.21718-9-graf@amazon.com> Signed-off-by: Paolo Bonzini commit 1a155254ff937ac92cf9940d273ea597b2c667a2 Author: Alexander Graf Date: Fri Sep 25 16:34:21 2020 +0200 KVM: x86: Introduce MSR filtering It's not desireable to have all MSRs always handled by KVM kernel space. Some MSRs would be useful to handle in user space to either emulate behavior (like uCode updates) or differentiate whether they are valid based on the CPU model. To allow user space to specify which MSRs it wants to see handled by KVM, this patch introduces a new ioctl to push filter rules with bitmaps into KVM. Based on these bitmaps, KVM can then decide whether to reject MSR access. With the addition of KVM_CAP_X86_USER_SPACE_MSR it can also deflect the denied MSR events to user space to operate on. If no filter is populated, MSR handling stays identical to before. Signed-off-by: Alexander Graf Message-Id: <20200925143422.21718-8-graf@amazon.com> Signed-off-by: Paolo Bonzini commit 3eb900173c71392087f4b0ada66f67ceae7e75f0 Author: Alexander Graf Date: Fri Sep 25 16:34:20 2020 +0200 KVM: x86: VMX: Prevent MSR passthrough when MSR access is denied We will introduce the concept of MSRs that may not be handled in kernel space soon. Some MSRs are directly passed through to the guest, effectively making them handled by KVM from user space's point of view. This patch introduces all logic required to ensure that MSRs that user space wants trapped are not marked as direct access for guests. Signed-off-by: Alexander Graf Message-Id: <20200925143422.21718-7-graf@amazon.com> [Replace "_idx" with "_slot". - Paolo] Signed-off-by: Paolo Bonzini commit fd6fa73d13377f2bff6ed668c99ca76adcda1336 Author: Alexander Graf Date: Fri Sep 25 16:34:19 2020 +0200 KVM: x86: SVM: Prevent MSR passthrough when MSR access is denied We will introduce the concept of MSRs that may not be handled in kernel space soon. Some MSRs are directly passed through to the guest, effectively making them handled by KVM from user space's point of view. This patch introduces all logic required to ensure that MSRs that user space wants trapped are not marked as direct access for guests. Signed-off-by: Alexander Graf Message-Id: <20200925143422.21718-6-graf@amazon.com> [Make terminology a bit more similar to VMX. - Paolo] Signed-off-by: Paolo Bonzini commit 476c9bd8e997b495524500cd82471e59b3aac20e Author: Aaron Lewis Date: Fri Sep 25 16:34:18 2020 +0200 KVM: x86: Prepare MSR bitmaps for userspace tracked MSRs Prepare vmx and svm for a subsequent change that ensures the MSR permission bitmap is set to allow an MSR that userspace is tracking to force a vmx_vmexit in the guest. Signed-off-by: Aaron Lewis Reviewed-by: Oliver Upton [agraf: rebase, adapt SVM scheme to nested changes that came in between] Signed-off-by: Alexander Graf Message-Id: <20200925143422.21718-5-graf@amazon.com> Signed-off-by: Paolo Bonzini commit 51de8151bd21bae0ce76f604eec6a7176f7093b3 Author: Alexander Graf Date: Fri Sep 25 16:34:17 2020 +0200 KVM: x86: Add infrastructure for MSR filtering In the following commits we will add pieces of MSR filtering. To ensure that code compiles even with the feature half-merged, let's add a few stubs and struct definitions before the real patches start. Signed-off-by: Alexander Graf Message-Id: <20200925143422.21718-4-graf@amazon.com> Signed-off-by: Paolo Bonzini commit 1ae099540e8c7f1ee066b3ad45cc91f582bb1ce8 Author: Alexander Graf Date: Fri Sep 25 16:34:16 2020 +0200 KVM: x86: Allow deflecting unknown MSR accesses to user space MSRs are weird. Some of them are normal control registers, such as EFER. Some however are registers that really are model specific, not very interesting to virtualization workloads, and not performance critical. Others again are really just windows into package configuration. Out of these MSRs, only the first category is necessary to implement in kernel space. Rarely accessed MSRs, MSRs that should be fine tunes against certain CPU models and MSRs that contain information on the package level are much better suited for user space to process. However, over time we have accumulated a lot of MSRs that are not the first category, but still handled by in-kernel KVM code. This patch adds a generic interface to handle WRMSR and RDMSR from user space. With this, any future MSR that is part of the latter categories can be handled in user space. Furthermore, it allows us to replace the existing "ignore_msrs" logic with something that applies per-VM rather than on the full system. That way you can run productive VMs in parallel to experimental ones where you don't care about proper MSR handling. Signed-off-by: Alexander Graf Reviewed-by: Jim Mattson Message-Id: <20200925143422.21718-3-graf@amazon.com> Signed-off-by: Paolo Bonzini commit 90218e434c4118fd7bba7ea7b073e6c6454140a2 Author: Alexander Graf Date: Fri Sep 25 16:34:15 2020 +0200 KVM: x86: Return -ENOENT on unimplemented MSRs When we find an MSR that we can not handle, bubble up that error code as MSR error return code. Follow up patches will use that to expose the fact that an MSR is not handled by KVM to user space. Suggested-by: Aaron Lewis Signed-off-by: Alexander Graf Message-Id: <20200925143422.21718-2-graf@amazon.com> Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 802145c56a0445bba39de481214302eb3d34e4fb Author: Sean Christopherson Date: Wed Sep 23 11:04:09 2020 -0700 KVM: VMX: Rename vmx_uret_msr's "index" to "slot" Rename "index" to "slot" in struct vmx_uret_msr to align with the terminology used by common x86's kvm_user_return_msrs, and to avoid conflating "MSR's ECX index" with "MSR's index into an array". No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-16-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 14a61b642de9e5612f091b3295da6d0c89449a49 Author: Sean Christopherson Date: Wed Sep 23 11:04:08 2020 -0700 KVM: VMX: Rename "vmx_msr_index" to "vmx_uret_msrs_list" Rename "vmx_msr_index" to "vmx_uret_msrs_list" to associate it with the uret MSRs array, and to avoid conflating "MSR's ECX index" with "MSR's index into an array". Similarly, don't use "slot" in the name as that terminology is claimed by the common x86 "user_return_msrs" mechanism. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-15-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 7bf662bb5ea806e3958638e9b80f203d11fbcc87 Author: Sean Christopherson Date: Wed Sep 23 11:04:07 2020 -0700 KVM: VMX: Rename "vmx_set_guest_msr" to "vmx_set_guest_uret_msr" Add "uret" to vmx_set_guest_msr() to explicitly associate it with the guest_uret_msrs array, and to differentiate it from vmx_set_msr() as well as VMX's load/store MSRs. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-14-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit d85a8034c016a1f50e879124bc5839c986d87a0a Author: Sean Christopherson Date: Wed Sep 23 11:04:06 2020 -0700 KVM: VMX: Rename "find_msr_entry" to "vmx_find_uret_msr" Rename "find_msr_entry" to scope it to VMX and to associate it with guest_uret_msrs. Drop the "entry" so that the function name pairs with the existing __vmx_find_uret_msr(), which intentionally uses a double underscore prefix instead of appending "index" or "slot" as those names are already claimed by other pieces of the user return MSR stack. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-13-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit bd65ba82b324e1765121f3602f9b0a89b7aa1c08 Author: Sean Christopherson Date: Wed Sep 23 11:04:05 2020 -0700 KVM: VMX: Add vmx_setup_uret_msr() to handle lookup and swap Add vmx_setup_uret_msr() to wrap the lookup and manipulation of the uret MSRs array during setup_msrs(). In addition to consolidating code, this eliminates move_msr_up(), which while being a very literally description of the function, isn't exacly helpful in understanding the net effect of the code. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-12-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 86e3e494fe32d1e7e9180458d857916155dd2856 Author: Sean Christopherson Date: Wed Sep 23 11:04:04 2020 -0700 KVM: VMX: Move uret MSR lookup into update_transition_efer() Move checking for the existence of MSR_EFER in the uret MSR array into update_transition_efer() so that the lookup and manipulation of the array in setup_msrs() occur back-to-back. This paves the way toward adding a helper to wrap the lookup and manipulation. To avoid unnecessary overhead, defer the lookup until the uret array would actually be modified in update_transition_efer(). EFER obviously exists on CPUs that support the dedicated VMCS fields for switching EFER, and EFER must exist for the guest and host EFER.NX value to diverge, i.e. there is no danger of attempting to read/write EFER when it doesn't exist. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-11-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit ef1d2ee12e6cd5abbf9986f35238f2fb2cd21a6d Author: Sean Christopherson Date: Wed Sep 23 11:04:03 2020 -0700 KVM: VMX: Check guest support for RDTSCP before processing MSR_TSC_AUX Check for RDTSCP support prior to checking if MSR_TSC_AUX is in the uret MSRs array so that the array lookup and manipulation are back-to-back. This paves the way toward adding a helper to wrap the lookup and manipulation. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-10-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 1e7a483037e8fa884c688f2213c8af10f2e8e96a Author: Sean Christopherson Date: Wed Sep 23 11:04:02 2020 -0700 KVM: VMX: Rename "__find_msr_index" to "__vmx_find_uret_msr" Rename "__find_msr_index" to scope it to VMX, associate it with guest_uret_msrs, and to avoid conflating "MSR's ECX index" with "MSR's array index". Similarly, don't use "slot" in the name so as to avoid colliding the common x86's half of "user_return_msrs" (the slot in kvm_user_return_msrs is not the same slot in guest_uret_msrs). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-9-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 658ece84f5da1cd8e36f0d13449aa95c61667b4b Author: Sean Christopherson Date: Wed Sep 23 11:04:01 2020 -0700 KVM: VMX: Rename vcpu_vmx's "guest_msrs_ready" to "guest_uret_msrs_loaded" Add "uret" to "guest_msrs_ready" to explicitly associate it with the "guest_uret_msrs" array, and replace "ready" with "loaded" to more precisely reflect what it tracks, e.g. "ready" could be interpreted as meaning ready for processing (setup_msrs() has run), which is wrong. "loaded" also aligns with the similar "guest_state_loaded" field. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-8-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit e9bb1ae92d62bd55b8093918fdec91f6fc3d3a56 Author: Sean Christopherson Date: Wed Sep 23 11:04:00 2020 -0700 KVM: VMX: Rename vcpu_vmx's "save_nmsrs" to "nr_active_uret_msrs" Add "uret" into the name of "save_nmsrs" to explicitly associate it with the guest_uret_msrs array, and replace "save" with "active" (for lack of a better word) to better describe what is being tracked. While "save" is more or less accurate when viewed as a literal description of the field, e.g. it holds the number of MSRs that were saved into the array the last time setup_msrs() was invoked, it can easily be misinterpreted by the reader, e.g. as meaning the number of MSRs that were saved from hardware at some point in the past, or as the number of MSRs that need to be saved at some point in the future, both of which are wrong. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-7-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit fbc18007382cb99ca68b1c6cb49d38f4f3b7a5da Author: Sean Christopherson Date: Wed Sep 23 11:03:59 2020 -0700 KVM: VMX: Rename vcpu_vmx's "nmsrs" to "nr_uret_msrs" Rename vcpu_vmx.nsmrs to vcpu_vmx.nr_uret_msrs to explicitly associate it with the guest_uret_msrs array. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-6-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit eb3db1b1378882a2d0abc1b6103040c97bcc91e4 Author: Sean Christopherson Date: Wed Sep 23 11:03:58 2020 -0700 KVM: VMX: Rename the "shared_msr_entry" struct to "vmx_uret_msr" Rename struct "shared_msr_entry" to "vmx_uret_msr" to align with x86's rename of "shared_msrs" to "user_return_msrs", and to call out that the struct is specific to VMX, i.e. not part of the generic "shared_msrs" framework. Abbreviate "user_return" as "uret" to keep line lengths marginally sane and code more or less readable. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit a128a934f202530036f867b284b3554e754452e9 Author: Sean Christopherson Date: Wed Sep 23 11:03:57 2020 -0700 KVM: VMX: Rename "vmx_find_msr_index" to "vmx_find_loadstore_msr_slot" Add "loadstore" to vmx_find_msr_index() to differentiate it from the so called shared MSRs helpers (which will soon be renamed), and replace "index" with "slot" to better convey that the helper returns slot in the array, not the MSR index (the value that gets stuffed into ECX). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit ce833b2324ba6e5367a54e641a36b61dedb1199b Author: Sean Christopherson Date: Wed Sep 23 11:03:56 2020 -0700 KVM: VMX: Prepend "MAX_" to MSR array size defines Add "MAX" to the LOADSTORE and so called SHARED MSR defines to make it more clear that the define controls the array size, as opposed to the actual number of valid entries that are in the array. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 7e34fbd05c6350b30161be84d4f8954c9d321292 Author: Sean Christopherson Date: Wed Sep 23 11:03:55 2020 -0700 KVM: x86: Rename "shared_msrs" to "user_return_msrs" Rename the "shared_msrs" mechanism, which is used to defer restoring MSRs that are only consumed when running in userspace, to a more banal but less likely to be confusing "user_return_msrs". The "shared" nomenclature is confusing as it's not obvious who is sharing what, e.g. reasonable interpretations are that the guest value is shared by vCPUs in a VM, or that the MSR value is shared/common to guest and host, both of which are wrong. "shared" is also misleading as the MSR value (in hardware) is not guaranteed to be shared/reused between VMs (if that's indeed the correct interpretation of the name), as the ability to share values between VMs is simply a side effect (albiet a very nice side effect) of deferring restoration of the host value until returning from userspace. "user_return" avoids the above confusion by describing the mechanism itself instead of its effects. Signed-off-by: Sean Christopherson Message-Id: <20200923180409.32255-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 04d28e375271bf0e6e31abeeb92e4f8b31443d23 Author: Sean Christopherson Date: Wed Sep 23 09:33:14 2020 -0700 KVM: x86/mmu: Move individual kvm_mmu initialization into common helper Move initialization of 'struct kvm_mmu' fields into alloc_mmu_pages() to consolidate code, and rename the helper to __kvm_mmu_create(). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923163314.8181-1-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 02f1965ff83b2f6162205576b7d708c9ad5bd138 Author: Sean Christopherson Date: Wed Sep 23 13:13:49 2020 -0700 KVM: nVMX: Read EXIT_QUAL and INTR_INFO only when needed for nested exit Read vmcs.EXIT_QUALIFICATION and vmcs.VM_EXIT_INTR_INFO only if the VM-Exit is being reflected to L1 now that they are no longer passed directly to the kvm_nested_vmexit tracepoint. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923201349.16097-8-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit cc167bd7ee99c38615da04bdadb67390eef093b5 Author: Sean Christopherson Date: Wed Sep 23 13:13:48 2020 -0700 KVM: x86: Use common definition for kvm_nested_vmexit tracepoint Use the newly introduced TRACE_EVENT_KVM_EXIT to define the guts of kvm_nested_vmexit so that it captures and prints the same information as kvm_exit. This has the bonus side effect of fixing the interrupt info and error code printing for the case where they're invalid, e.g. if the exit was a failed VM-Entry. This also sets the stage for retrieving EXIT_QUALIFICATION and VM_EXIT_INTR_INFO in nested_vmx_reflect_vmexit() if and only if the VM-Exit is being routed to L1. Signed-off-by: Sean Christopherson Message-Id: <20200923201349.16097-7-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 029e8c8ad655a253658239438644e0eea2b932fa Author: Sean Christopherson Date: Wed Sep 23 13:13:47 2020 -0700 KVM: x86: Add macro wrapper for defining kvm_exit tracepoint Macrofy the definition of kvm_exit so that the definition can be reused verbatim by kvm_nested_vmexit. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923201349.16097-6-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 235ba74f008d2e0936b29f77f68d4e2f73ffd24a Author: Sean Christopherson Date: Wed Sep 23 13:13:46 2020 -0700 KVM: x86: Add intr/vectoring info and error code to kvm_exit tracepoint Extend the kvm_exit tracepoint to align it with kvm_nested_vmexit in terms of what information is captured. On SVM, add interrupt info and error code, while on VMX it add IDT vectoring and error code. This sets the stage for macrofying the kvm_exit tracepoint definition so that it can be reused for kvm_nested_vmexit without loss of information. Opportunistically stuff a zero for VM_EXIT_INTR_INFO if the VM-Enter failed, as the field is guaranteed to be invalid. Note, it'd be possible to further filter the interrupt/exception fields based on the VM-Exit reason, but the helper is intended only for tracepoints, i.e. an extra VMREAD or two is a non-issue, the failed VM-Enter case is just low hanging fruit. Signed-off-by: Sean Christopherson Message-Id: <20200923201349.16097-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit f315f2b140156f456a091393fd0392acf9e6fb31 Author: Sean Christopherson Date: Wed Sep 23 13:13:45 2020 -0700 KVM: VMX: Add a helper to test for a valid error code given an intr info Add a helper, is_exception_with_error_code(), to provide the simple but difficult to read code of checking for a valid exception with an error code given a vmcs.VM_EXIT_INTR_INFO value. The helper will gain another user, vmx_get_exit_info(), in a future patch. Signed-off-by: Sean Christopherson Message-Id: <20200923201349.16097-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit a9d7d76c66ede215542f12b18980ef36798564b2 Author: Sean Christopherson Date: Wed Sep 23 13:13:44 2020 -0700 KVM: x86: Read guest RIP from within the kvm_nested_vmexit tracepoint Use kvm_rip_read() to read the guest's RIP for the nested VM-Exit tracepoint instead of having the caller pass in an argument. Params that are passed into a tracepoint are evaluated even if the tracepoint is disabled, i.e. passing in RIP for VMX incurs a VMREAD and retpoline to retrieve a value that may never be used, e.g. if the exit is due to a hardware interrupt. Signed-off-by: Sean Christopherson Message-Id: <20200923201349.16097-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit b2d522552ca02de3b0f72104705fb2e62fcf1ce6 Author: Sean Christopherson Date: Wed Sep 23 13:13:43 2020 -0700 KVM: x86: Add RIP to the kvm_entry, i.e. VM-Enter, tracepoint Add RIP to the kvm_entry tracepoint to help debug if the kvm_exit tracepoint is disabled or if VM-Enter fails, in which case the kvm_exit tracepoint won't be hit. Read RIP from within the tracepoint itself to avoid a potential VMREAD and retpoline if the guest's RIP isn't available. Signed-off-by: Sean Christopherson Message-Id: <20200923201349.16097-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 138534a810aa6aa3a6f27ac36ac52c0c685859a1 Author: Sean Christopherson Date: Wed Sep 23 11:44:52 2020 -0700 KVM: nVMX: WARN on attempt to switch the currently loaded VMCS WARN if KVM attempts to switch to the currently loaded VMCS. Now that nested_vmx_free_vcpu() doesn't blindly call vmx_switch_vmcs(), all paths that lead to vmx_switch_vmcs() are implicitly guarded by guest vs. host mode, e.g. KVM should never emulate VMX instructions when guest mode is active, and nested_vmx_vmexit() should never be called when host mode is active. Signed-off-by: Sean Christopherson Message-Id: <20200923184452.980-8-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit ebec153a056108ca7818caad549d3ad7c0f2369d Author: Sean Christopherson Date: Wed Sep 23 11:44:51 2020 -0700 KVM: nVMX: Drop redundant VMCS switch and free_nested() call Remove the explicit switch to vmcs01 and the call to free_nested() in nested_vmx_free_vcpu(). free_nested(), which is called unconditionally by vmx_leave_nested(), ensures vmcs01 is loaded prior to freeing vmcs02 and friends. Signed-off-by: Sean Christopherson Message-Id: <20200923184452.980-7-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit df82a24b29d1b10b965eb7d66b68867b7da76e76 Author: Sean Christopherson Date: Wed Sep 23 11:44:50 2020 -0700 KVM: nVMX: Ensure vmcs01 is the loaded VMCS when freeing nested state Add a WARN in free_nested() to ensure vmcs01 is loaded prior to freeing vmcs02 and friends, and explicitly switch to vmcs01 if it's not. KVM is supposed to keep is_guest_mode() and loaded_vmcs==vmcs02 synchronized, but bugs happen and freeing vmcs02 while it's in use will escalate a KVM error to a use-after-free and potentially crash the kernel. Do the WARN and switch even in the !vmxon case to help detect latent bugs. free_nested() is not a hot path, and the check is cheap. Signed-off-by: Sean Christopherson Message-Id: <20200923184452.980-6-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit c61ca2fcbcea62331b82a587ee6e423a97ae6f66 Author: Sean Christopherson Date: Wed Sep 23 11:44:49 2020 -0700 KVM: nVMX: Move free_nested() below vmx_switch_vmcs() Move free_nested() down below vmx_switch_vmcs() so that a future patch can do an "emergency" invocation of vmx_switch_vmcs() if vmcs01 is not the loaded VMCS when freeing nested resources. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923184452.980-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 2ba4493a8b195cc1d7dd5b762a84e6235c2d67bd Author: Sean Christopherson Date: Wed Sep 23 11:44:48 2020 -0700 KVM: nVMX: Explicitly check for valid guest state for !unrestricted guest Call guest_state_valid() directly instead of querying emulation_required when checking if L1 is attempting VM-Enter with invalid guest state. If emulate_invalid_guest_state is false, KVM will fixup segment regs to avoid emulation and will never set emulation_required, i.e. KVM will incorrectly miss the associated consistency checks because the nested path stuffs segments directly into vmcs02. Opportunsitically add Consistency Check tracing to make future debug suck a little less. Fixes: 2bb8cafea80bf ("KVM: vVMX: signal failure for nested VMEntry if emulation_required") Fixes: 3184a995f782c ("KVM: nVMX: fix vmentry failure code when L2 state would require emulation") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20200923184452.980-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit b89d5ad00e789967a5e2c5335f75c48755bebd88 Author: Sean Christopherson Date: Wed Sep 23 11:44:47 2020 -0700 KVM: nVMX: Reload vmcs01 if getting vmcs12's pages fails Reload vmcs01 when bailing from nested_vmx_enter_non_root_mode() as KVM expects vmcs01 to be loaded when is_guest_mode() is false. Fixes: 671ddc700fd08 ("KVM: nVMX: Don't leak L1 MMIO regions to L2") Cc: stable@vger.kernel.org Cc: Dan Cross Cc: Jim Mattson Cc: Peter Shier Signed-off-by: Sean Christopherson Message-Id: <20200923184452.980-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit fc387d8daf3960c5e1bc18fa353768056f4fd394 Author: Sean Christopherson Date: Wed Sep 23 11:44:46 2020 -0700 KVM: nVMX: Reset the segment cache when stuffing guest segs Explicitly reset the segment cache after stuffing guest segment regs in prepare_vmcs02_rare(). Although the cache is reset when switching to vmcs02, there is nothing that prevents KVM from re-populating the cache prior to writing vmcs02 with vmcs12's values. E.g. if the vCPU is preempted after switching to vmcs02 but before prepare_vmcs02_rare(), kvm_arch_vcpu_put() will dereference GUEST_SS_AR_BYTES via .get_cpl() and cache the stale vmcs02 value. While the current code base only caches stale data in the preemption case, it's theoretically possible future code could read a segment register during the nested flow itself, i.e. this isn't technically illegal behavior in kvm_arch_vcpu_put(), although it did introduce the bug. This manifests as an unexpected nested VM-Enter failure when running with unrestricted guest disabled if the above preemption case coincides with L1 switching L2's CPL, e.g. when switching from a L2 vCPU at CPL3 to to a L2 vCPU at CPL0. stack_segment_valid() will see the new SS_SEL but the old SS_AR_BYTES and incorrectly mark the guest state as invalid due to SS.dpl != SS.rpl. Don't bother updating the cache even though prepare_vmcs02_rare() writes every segment. With unrestricted guest, guest segments are almost never read, let alone L2 guest segments. On the other hand, populating the cache requires a large number of memory writes, i.e. it's unlikely to be a net win. Updating the cache would be a win when unrestricted guest is not supported, as guest_state_valid() will immediately cache all segment registers. But, nested virtualization without unrestricted guest is dirt slow, saving some VMREADs won't change that, and every CPU manufactured in the last decade supports unrestricted guest. In other words, the extra (minor) complexity isn't worth the trouble. Note, kvm_arch_vcpu_put() may see stale data when querying guest CPL depending on when preemption occurs. This is "ok" in that the usage is imperfect by nature, i.e. it's used heuristically to improve performance but doesn't affect functionality. kvm_arch_vcpu_put() could be "fixed" by also disabling preemption while loading segments, but that's pointless and misleading as reading state from kvm_sched_{in,out}() is guaranteed to see stale data in one form or another. E.g. even if all the usage of regs_avail is fixed to call kvm_register_mark_available() after the associated state is set, the individual state might still be stale with respect to the overall vCPU state. I.e. making functional decisions in an asynchronous hook is doomed from the get go. Thankfully KVM doesn't do that. Fixes: de63ad4cf4973 ("KVM: X86: implement the logic for spinlock optimization") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20200923184452.980-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit e88b8093698f264c990a19f792aa409fd33fb35d Author: Sean Christopherson Date: Wed Sep 23 11:37:35 2020 -0700 KVM: x86/mmu: Track write/user faults using bools Use bools to track write and user faults throughout the page fault paths and down into mmu_set_spte(). The actual usage is purely boolean, but that's not obvious without digging into all paths as the current code uses a mix of bools (TDP and try_async_pf) and ints (shadow paging and mmu_set_spte()). No true functional change intended (although the pgprintk() will now print 0/1 instead of 0/PFERR_WRITE_MASK). Signed-off-by: Sean Christopherson Message-Id: <20200923183735.584-9-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit dcc7065170d7018d9db1748d04026b2f4ce664dd Author: Sean Christopherson Date: Wed Sep 23 11:37:34 2020 -0700 KVM: x86/mmu: Hoist ITLB multi-hit workaround check up a level Move the "ITLB multi-hit workaround enabled" check into the callers of disallowed_hugepage_adjust() to make it more obvious that the helper is specific to the workaround, and to be consistent with the accounting, i.e. account_huge_nx_page() is called if and only if the workaround is enabled. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923183735.584-8-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 1d4a7372e149914095e489ada0e64395bbcc8483 Author: Sean Christopherson Date: Wed Sep 23 11:37:33 2020 -0700 KVM: x86/mmu: Rename 'hlevel' to 'level' in FNAME(fetch) Rename 'hlevel', which presumably stands for 'host level', to simply 'level' in FNAME(fetch). The variable hasn't tracked the host level for quite some time. Signed-off-by: Sean Christopherson Message-Id: <20200923183735.584-7-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 5bcaf3e1715f49de8935fc77bf74837287cae77d Author: Sean Christopherson Date: Wed Sep 23 11:37:32 2020 -0700 KVM: x86/mmu: Account NX huge page disallowed iff huge page was requested Condition the accounting of a disallowed huge NX page on the original requested level of the page being greater than the current iterator level. This does two things: accounts the page if and only if a huge page was actually disallowed, and accounts the shadow page if and only if it was the level at which the huge page was disallowed. For the latter case, the previous logic would account all shadow pages used to create the translation for the forced small page, e.g. even PML4, which can't be a huge page on current hardware, would be accounted as having been a disallowed huge page when using 5-level EPT. The overzealous accounting is purely a performance issue, i.e. the recovery thread will spuriously zap shadow pages, but otherwise the bad behavior is harmless. Cc: Junaid Shahid Fixes: b8e8c8303ff28 ("kvm: mmu: ITLB_MULTIHIT mitigation") Signed-off-by: Sean Christopherson Message-Id: <20200923183735.584-6-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 3cf066127e8754f680ecb3b63ad7dd6949e5e54c Author: Sean Christopherson Date: Wed Sep 23 11:37:31 2020 -0700 KVM: x86/mmu: Capture requested page level before NX huge page workaround Apply the "huge page disallowed" adjustment of the max level only after capturing the original requested level. The requested level will be used in a future patch to skip adding pages to the list of disallowed huge pages if a huge page wasn't possible anyways, e.g. if the page isn't mapped as a huge page in the host. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923183735.584-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 6c2fd34f5c7970915f040b502563cf339fb661cd Author: Sean Christopherson Date: Wed Sep 23 11:37:30 2020 -0700 KVM: x86/mmu: Move "huge page disallowed" calculation into mapping helpers Calculate huge_page_disallowed in __direct_map() and FNAME(fetch) in preparation for reworking the calculation so that it preserves the requested map level and eventually to avoid flagging a shadow page as being disallowed for being used as a large/huge page when it couldn't have been huge in the first place, e.g. because the backing page in the host is not large. Pass the error code into the helpers and use it to recalcuate exec and write_fault instead adding yet more booleans to the parameters. Opportunistically use huge_page_disallowed instead of lpage_disallowed to match the nomenclature used within the mapping helpers (though even they have existing inconsistencies). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923183735.584-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 7d919c7a38fb2e34d4d27e535f19979e1b415f68 Author: Sean Christopherson Date: Wed Sep 23 11:37:29 2020 -0700 KVM: x86/mmu: Refactor the zap loop for recovering NX lpages Refactor the zap loop in kvm_recover_nx_lpages() to be a for loop that iterates on to_zap and drop the !to_zap check that leads to the in-loop calling of kvm_mmu_commit_zap_page(). The in-loop commit when to_zap hits zero is superfluous now that there's an unconditional commit after the loop to handle the case where lpage_disallowed_mmu_pages is emptied. Signed-off-by: Sean Christopherson Message-Id: <20200923183735.584-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit e89505698c9f70125651060547da4ff5046124fc Author: Sean Christopherson Date: Wed Sep 23 11:37:28 2020 -0700 KVM: x86/mmu: Commit zap of remaining invalid pages when recovering lpages Call kvm_mmu_commit_zap_page() after exiting the "prepare zap" loop in kvm_recover_nx_lpages() to finish zapping pages in the unlikely event that the loop exited due to lpage_disallowed_mmu_pages being empty. Because the recovery thread drops mmu_lock() when rescheduling, it's possible that lpage_disallowed_mmu_pages could be emptied by a different thread without to_zap reaching zero despite to_zap being derived from the number of disallowed lpages. Fixes: 1aa9b9572b105 ("kvm: x86: mmu: Recovery of shattered NX large pages") Cc: Junaid Shahid Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20200923183735.584-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 5a085326d51d0c92bc5c1f62d60dcf3db450af69 Author: Sean Christopherson Date: Wed Sep 23 11:31:12 2020 -0700 KVM: VMX: Rename ops.h to vmx_ops.h Rename ops.h to vmx_ops.h to allow adding a tdx_ops.h in the future without causing massive confusion. Trust Domain Extensions (TDX) is built on VMX, but KVM cannot directly access the VMCS(es) for a TDX guest, thus TDX will need its own "ops" implementation for wrapping the low level operations. Signed-off-by: Sean Christopherson Message-Id: <20200923183112.3030-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 8888cdd0996c2d51cd417f9a60a282c034f3fa28 Author: Xiaoyao Li Date: Wed Sep 23 11:31:11 2020 -0700 KVM: VMX: Extract posted interrupt support to separate files Extract the posted interrupt code so that it can be reused for Trust Domain Extensions (TDX), which requires posted interrupts and can use KVM VMX's implementation almost verbatim. TDX is different enough from raw VMX that it is highly desirable to implement the guts of TDX in a separate file, i.e. reusing posted interrupt code by shoving TDX support into vmx.c would be a mess. Signed-off-by: Xiaoyao Li Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20200923183112.3030-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 127037591c84e8d550e8951d274a5e291d3ed56f Author: Sean Christopherson Date: Wed Sep 23 15:04:25 2020 -0700 KVM: x86/mmu: Bail early from final #PF handling on spurious faults Detect spurious page faults, e.g. page faults that occur when multiple vCPUs simultaneously access a not-present page, and skip the SPTE write, prefetch, and stats update for spurious faults. Note, the performance benefits of skipping the write and prefetch are likely negligible, and the false positive stats adjustment is probably lost in the noise. The primary motivation is to play nice with TDX's SEPT in the long term. SEAMCALLs (to program SEPT entries) are quite costly, e.g. thousands of cycles, and a spurious SEPT update will result in a SEAMCALL error (which KVM will ideally treat as fatal). Reported-by: Kai Huang Signed-off-by: Sean Christopherson Message-Id: <20200923220425.18402-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit c4371c2a682e0da1ed2cd7e3c5496f055d873554 Author: Sean Christopherson Date: Wed Sep 23 15:04:24 2020 -0700 KVM: x86/mmu: Return unique RET_PF_* values if the fault was fixed Introduce RET_PF_FIXED and RET_PF_SPURIOUS to provide unique return values instead of overloading RET_PF_RETRY. In the short term, the unique values add clarity to the code and RET_PF_SPURIOUS will be used by set_spte() to avoid unnecessary work for spurious faults. In the long term, TDX will use RET_PF_FIXED to deterministically map memory during pre-boot. The page fault flow may bail early for benign reasons, e.g. if the mmu_notifier fires for an unrelated address. With only RET_PF_RETRY, it's impossible for the caller to distinguish between "cool, page is mapped" and "darn, need to try again", and thus cannot handle benign cases like the mmu_notifier retry. Signed-off-by: Sean Christopherson Message-Id: <20200923220425.18402-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 83a2ba4cb2b596e5e89faa4e29b1d1f3b245b95e Author: Sean Christopherson Date: Wed Sep 23 15:04:23 2020 -0700 KVM: x86/mmu: Invert RET_PF_* check when falling through to emulation Explicitly check for RET_PF_EMULATE instead of implicitly doing the same by checking for !RET_PF_RETRY (RET_PF_INVALID is handled earlier). This will adding new RET_PF_ types in future patches without breaking the emulation path. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923220425.18402-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 7b367bc9a6415dc6f31135d50ab37e8ee18d6974 Author: Sean Christopherson Date: Wed Sep 23 15:04:22 2020 -0700 KVM: x86/mmu: Return -EIO if page fault returns RET_PF_INVALID Exit to userspace with an error if the MMU is buggy and returns RET_PF_INVALID when servicing a page fault. This will allow a future patch to invert the emulation path, i.e. emulate only on RET_PF_EMULATE instead of emulating on anything but RET_PF_RETRY. This technically means that KVM will exit to userspace instead of emulating on RET_PF_INVALID, but practically speaking it's a nop as the MMU never returns RET_PF_INVALID. Signed-off-by: Sean Christopherson Message-Id: <20200923220425.18402-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 2de4085ccceaf075f7c8d1688338fb82e2349f0f Author: Ben Gardon Date: Wed Sep 23 15:14:06 2020 -0700 KVM: x86/MMU: Recursively zap nested TDP SPs when zapping last/only parent Recursively zap all to-be-orphaned children, unsynced or otherwise, when zapping a shadow page for a nested TDP MMU. KVM currently only zaps the unsynced child pages, but not the synced ones. This can create problems over time when running many nested guests because it leaves unlinked pages which will not be freed until the page quota is hit. With the default page quota of 20 shadow pages per 1000 guest pages, this looks like a memory leak and can degrade MMU performance. In a recent benchmark, substantial performance degradation was observed: An L1 guest was booted with 64G memory. 2G nested Windows guests were booted, 10 at a time for 20 iterations. (200 total boots) Windows was used in this benchmark because they touch all of their memory on startup. By the end of the benchmark, the nested guests were taking ~10% longer to boot. With this patch there is no degradation in boot time. Without this patch the benchmark ends with hundreds of thousands of stale EPT02 pages cluttering up rmaps and the page hash map. As a result, VM shutdown is also much slower: deleting memslot 0 was observed to take over a minute. With this patch it takes just a few miliseconds. Cc: Peter Shier Signed-off-by: Ben Gardon Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20200923221406.16297-3-sean.j.christopherson@intel.com> Reviewed-by: Ben Gardon Signed-off-by: Paolo Bonzini commit ace569e0154a8c7a686bab8e791876d27b42d9b2 Author: Sean Christopherson Date: Wed Sep 23 15:14:05 2020 -0700 KVM: x86/mmu: Move flush logic from mmu_page_zap_pte() to FNAME(invlpg) Move the logic that controls whether or not FNAME(invlpg) needs to flush fully into FNAME(invlpg) so that mmu_page_zap_pte() doesn't return a value. This allows a future patch to redefine the return semantics for mmu_page_zap_pte() so that it can recursively zap orphaned child shadow pages for nested TDP MMUs. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923221406.16297-2-sean.j.christopherson@intel.com> Reviewed-by: Ben Gardon Signed-off-by: Paolo Bonzini commit dbcf3f96fa662bd5e1f93ea7c10a8dd0dce180ae Author: Vitaly Kuznetsov Date: Thu Sep 24 16:57:52 2020 +0200 KVM: x86: hyper-v: disallow configuring SynIC timers with no SynIC Hyper-V Synthetic timers require SynIC but we don't seem to check that upon HV_X64_MSR_STIMER[X]_CONFIG/HV_X64_MSR_STIMER0_COUNT writes. Make the behavior match synic_set_msr(). Signed-off-by: Vitaly Kuznetsov Message-Id: <20200924145757.1035782-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit b44f50d87ce2f051909b6bb2509727e05330036c Author: Vitaly Kuznetsov Date: Thu Sep 24 16:57:51 2020 +0200 KVM: x86: hyper-v: Mention SynDBG CPUID leaves in api.rst We forgot to update KVM_GET_SUPPORTED_HV_CPUID's documentation in api.rst when SynDBG leaves were added. While on it, fix 'KVM_GET_SUPPORTED_CPUID' copy-paste error. Fixes: f97f5a56f597 ("x86/kvm/hyper-v: Add support for synthetic debugger interface") Signed-off-by: Vitaly Kuznetsov Message-Id: <20200924145757.1035782-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 4d710de9646a7ea99f628e17d9d700cfaf1af8ca Author: Sean Christopherson Date: Wed Sep 23 12:12:04 2020 -0700 KVM: x86/mmu: Stash 'kvm' in a local variable in kvm_mmu_free_roots() To make kvm_mmu_free_roots() a bit more readable, capture 'kvm' in a local variable instead of doing vcpu->kvm over and over (and over). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923191204.8410-1-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 8b50b92f9f1a819cba290e24064337004c00ee36 Author: Sean Christopherson Date: Thu Sep 24 17:30:11 2020 -0700 KVM: VMX: Add a helper and macros to reduce boilerplate for sec exec ctls Add a helper function and several wrapping macros to consolidate the copy-paste code in vmx_compute_secondary_exec_control() for adjusting controls that are dependent on guest CPUID bits. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200925003011.21016-1-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 7f3603b631362340774291a961712ec07bbf8122 Author: Sean Christopherson Date: Wed Sep 23 09:50:47 2020 -0700 KVM: VMX: Rename RDTSCP secondary exec control name to insert "ENABLE" Rename SECONDARY_EXEC_RDTSCP to SECONDARY_EXEC_ENABLE_RDTSCP in preparation for consolidating the logic for adjusting secondary exec controls based on the guest CPUID model. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923165048.20486-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit b936d3eb92b7c1258805bebecc7eaac0c8a51b7f Author: Sean Christopherson Date: Wed Sep 23 09:50:46 2020 -0700 KVM: VMX: Unconditionally clear CPUID.INVPCID if !CPUID.PCID If PCID is not exposed to the guest, clear INVPCID in the guest's CPUID even if the VMCS INVPCID enable is not supported. This will allow consolidating the secondary execution control adjustment code without having to special case INVPCID. Technically, this fixes a bug where !CPUID.PCID && CPUID.INVCPID would result in unexpected guest behavior (#UD instead of #GP/#PF), but KVM doesn't support exposing INVPCID if it's not supported in the VMCS, i.e. such a config is broken/bogus no matter what. Signed-off-by: Sean Christopherson Message-Id: <20200923165048.20486-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit becdad8592254eeaa84d8f6f1167137c11c30876 Author: Sean Christopherson Date: Wed Sep 23 09:50:45 2020 -0700 KVM: VMX: Rename vmx_*_supported() helpers to cpu_has_vmx_*() Rename helpers for a few controls to conform to the more prevelant style of cpu_has_vmx_(). Consistent names will allow adding macros to consolidate the boilerplate code for adjusting secondary execution controls. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200923165048.20486-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit b785a442aa2111b6940be19cdfb3ebabf605f6a3 Author: Li Qiang Date: Thu Sep 24 08:58:00 2020 -0700 cpuidle-haltpoll: fix error comments in arch_haltpoll_disable The 'arch_haltpoll_disable' is used to disable guest halt poll. Correct the comments. Fixes: a1c4423b02b21 ("cpuidle-haltpoll: disable host side polling when kvm virtualized") Signed-off-by: Li Qiang Message-Id: <20200924155800.4939-1-liq3ea@163.com> Signed-off-by: Paolo Bonzini commit 7096cbfb6cb63420f333d0ba238d1a857ba3f290 Author: Sean Christopherson Date: Thu Sep 24 12:42:50 2020 -0700 KVM: VMX: Use "illegal GPA" helper for PT/RTIT output base check Use kvm_vcpu_is_illegal_gpa() to check for a legal GPA when validating a PT output base instead of open coding a clever, but difficult to read, variant. Code readability is far more important than shaving a few uops in a slow path. No functional change intended. Suggested-by: Paolo Bonzini Signed-off-by: Sean Christopherson Message-Id: <20200924194250.19137-6-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit dc46515cf838e37c602016cc905df051e06cb8ea Author: Sean Christopherson Date: Thu Sep 24 12:42:49 2020 -0700 KVM: x86: Move illegal GPA helper out of the MMU code Rename kvm_mmu_is_illegal_gpa() to kvm_vcpu_is_illegal_gpa() and move it to cpuid.h so that's it's colocated with cpuid_maxphyaddr(). The helper is not MMU specific and will gain a user that is completely unrelated to the MMU in a future patch. No functional change intended. Suggested-by: Paolo Bonzini Signed-off-by: Sean Christopherson Message-Id: <20200924194250.19137-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 1cc6cbc3e405536b971cbd62341197a411e7713c Author: Sean Christopherson Date: Thu Sep 24 12:42:48 2020 -0700 KVM: VMX: Replace MSR_IA32_RTIT_OUTPUT_BASE_MASK with helper function Replace the subtly not-a-constant MSR_IA32_RTIT_OUTPUT_BASE_MASK with a proper helper function to check whether or not the specified base is valid. Blindly referencing the local 'vcpu' is especially nasty. Signed-off-by: Sean Christopherson Message-Id: <20200924194250.19137-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 526ad23bc564ae60170ae18a087d018bbd6618ab Author: Sean Christopherson Date: Thu Sep 24 12:42:47 2020 -0700 KVM: x86: Unexport cpuid_query_maxphyaddr() Stop exporting cpuid_query_maxphyaddr() now that it's not being abused by VMX. Signed-off-by: Sean Christopherson Message-Id: <20200924194250.19137-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 8d921acf98ec3e82cf673a5422890939cd4c24f5 Author: Sean Christopherson Date: Thu Sep 24 12:42:46 2020 -0700 KVM: VMX: Use precomputed MAXPHYADDR for RTIT base MSR check Use cpuid_maxphyaddr() instead of cpuid_query_maxphyaddr() for the RTIT base MSR check. There is no reason to recompute MAXPHYADDR as the precomputed version is synchronized with CPUID updates, and MSR_IA32_RTIT_OUTPUT_BASE is not written between stuffing CPUID and refreshing vcpu->arch.maxphyaddr. Signed-off-by: Sean Christopherson Message-Id: <20200924194250.19137-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 28e2b2f1a40dbada5740fdd83e8645949d1c8db6 Author: Tom Lendacky Date: Thu Sep 24 13:41:58 2020 -0500 KVM: VMX: Do not perform emulation for INVD intercept The INVD instruction is emulated as a NOP, just skip the instruction instead. Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit cac8c526ae769d86ec2d785c6f41866f75152784 Author: Thomas Pedersen Date: Mon Sep 21 19:28:13 2020 -0700 mac80211: avoid rate init for S1G band minstrel_ht is confused by the lack of sband->bitrates, and S1G will likely require a unique RC algorithm, so avoid rate init for now if STA is on the S1G band. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-13-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 14e3dd8d256b7a7a281ac18a65e3c8cc9573ec88 Author: Paolo Bonzini Date: Wed Sep 23 13:01:33 2020 -0400 KVM: SEV: shorten comments around sev_clflush_pages Very similar content is present in four comments in sev.c. Unfortunately there are small differences that make it harder to place the comment in sev_clflush_pages itself, but at least we can make it more concise. Suggested-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 50085beee878e7c4e8ddbd3d634c0170589802e0 Author: Cfir Cohen Date: Fri Aug 7 17:37:46 2020 -0700 KVM: SVM: Mark SEV launch secret pages as dirty. The LAUNCH_SECRET command performs encryption of the launch secret memory contents. Mark pinned pages as dirty, before unpinning them. This matches the logic in sev_launch_update_data(). Signed-off-by: Cfir Cohen Message-Id: <20200808003746.66687-1-cfir@google.com> Reviewed-by: Brijesh Singh Signed-off-by: Paolo Bonzini commit fc595f35994233a566904bf811ffb9c3c80a84a9 Author: Sean Christopherson Date: Wed Aug 12 11:06:15 2020 -0700 KVM: nVMX: Add VM-Enter failed tracepoints for super early checks Add tracepoints for the early consistency checks in nested_vmx_run(). The "VMLAUNCH vs. VMRESUME" check in particular is useful to trace, as there is no architectural way to check VMCS.LAUNCH_STATE, and subtle bugs such as VMCLEAR on the wrong HPA can lead to confusing errors in the L1 VMM. Signed-off-by: Sean Christopherson Message-Id: <20200812180615.22372-1-sean.j.christopherson@intel.com> Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit fb0f33fdefe9f473dc5f7b71345096c8d60ab9dd Author: Krish Sadhukhan Date: Sat Aug 29 00:48:22 2020 +0000 KVM: nSVM: CR3 MBZ bits are only 63:52 Commit 761e4169346553c180bbd4a383aedd72f905bc9a created a wrong mask for the CR3 MBZ bits. According to APM vol 2, only the upper 12 bits are MBZ. Fixes: 761e41693465 ("KVM: nSVM: Check that MBZ bits in CR3 and CR4 are not set on vmrun of nested guests", 2020-07-08) Signed-off-by: Krish Sadhukhan Message-Id: <20200829004824.4577-2-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini commit a9e2e0ae686094571378c72d8146b5a1a92d0652 Author: Robert Hoo Date: Fri Aug 28 10:23:42 2020 +0800 KVM: x86: emulating RDPID failure shall return #UD rather than #GP Per Intel's SDM, RDPID takes a #UD if it is unsupported, which is more or less what KVM is emulating when MSR_TSC_AUX is not available. In fact, there are no scenarios in which RDPID is supposed to #GP. Fixes: fb6d4d340e ("KVM: x86: emulate RDPID") Signed-off-by: Robert Hoo Message-Id: <1598581422-76264-1-git-send-email-robert.hu@linux.intel.com> Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 25bb2cf97139f81e3bb8910d26016a529019528e Author: Sean Christopherson Date: Wed Aug 12 10:51:29 2020 -0700 KVM: nVMX: Morph notification vector IRQ on nested VM-Enter to pending PI On successful nested VM-Enter, check for pending interrupts and convert the highest priority interrupt to a pending posted interrupt if it matches L2's notification vector. If the vCPU receives a notification interrupt before nested VM-Enter (assuming L1 disables IRQs before doing VM-Enter), the pending interrupt (for L1) should be recognized and processed as a posted interrupt when interrupts become unblocked after VM-Enter to L2. This fixes a bug where L1/L2 will get stuck in an infinite loop if L1 is trying to inject an interrupt into L2 by setting the appropriate bit in L2's PIR and sending a self-IPI prior to VM-Enter (as opposed to KVM's method of manually moving the vector from PIR->vIRR/RVI). KVM will observe the IPI while the vCPU is in L1 context and so won't immediately morph it to a posted interrupt for L2. The pending interrupt will be seen by vmx_check_nested_events(), cause KVM to force an immediate exit after nested VM-Enter, and eventually be reflected to L1 as a VM-Exit. After handling the VM-Exit, L1 will see that L2 has a pending interrupt in PIR, send another IPI, and repeat until L2 is killed. Note, posted interrupts require virtual interrupt deliveriy, and virtual interrupt delivery requires exit-on-interrupt, ergo interrupts will be unconditionally unmasked on VM-Enter if posted interrupts are enabled. Fixes: 705699a13994 ("KVM: nVMX: Enable nested posted interrupt processing") Cc: stable@vger.kernel.org Cc: Liran Alon Signed-off-by: Sean Christopherson Message-Id: <20200812175129.12172-1-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 0b7aa58356912989a48dc24ba889f78680756831 Author: Tianjia Zhang Date: Tue Jun 23 21:14:18 2020 +0800 KVM: MIPS: clean up redundant kvm_run parameters in assembly In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This patch does a unified cleanup of these remaining redundant parameters. Signed-off-by: Tianjia Zhang Reviewed-by: Huacai Chen Tested-by: Jiaxun Yang Message-Id: <20200623131418.31473-6-tianjia.zhang@linux.alibaba.com> Signed-off-by: Paolo Bonzini commit 95b28ac9db2ac27ac7e92edf2f5bbd6f36138933 Author: Haiwei Li Date: Fri Sep 4 19:25:29 2020 +0800 KVM: SVM: Add tracepoint for cr_interception Add trace_kvm_cr_write and trace_kvm_cr_read for svm. Signed-off-by: Haiwei Li Message-Id: Signed-off-by: Paolo Bonzini commit 4e810adb5362df366aee10ac05041fc7ba0eb2fe Author: Wanpeng Li Date: Mon Sep 14 14:55:48 2020 +0800 KVM: SVM: Analyze is_guest_mode() in svm_vcpu_run() Analyze is_guest_mode() in svm_vcpu_run() instead of svm_exit_handlers_fastpath() in conformity with VMX version. Suggested-by: Vitaly Kuznetsov Signed-off-by: Wanpeng Li Message-Id: <1600066548-4343-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 1a5488ef0dcf6af5b2a69144ad6732dd67e98146 Author: Sean Christopherson Date: Tue Sep 15 12:15:05 2020 -0700 KVM: VMX: Invoke NMI handler via indirect call instead of INTn Rework NMI VM-Exit handling to invoke the kernel handler by function call instead of INTn. INTn microcode is relatively expensive, and aligning the IRQ and NMI handling will make it easier to update KVM should some newfangled method for invoking the handlers come along. Suggested-by: Andi Kleen Signed-off-by: Sean Christopherson Message-Id: <20200915191505.10355-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 535f7ef2ab7dbfbcfe732ee7634faca21417a777 Author: Sean Christopherson Date: Tue Sep 15 12:15:04 2020 -0700 KVM: VMX: Move IRQ invocation to assembly subroutine Move the asm blob that invokes the appropriate IRQ handler after VM-Exit into a proper subroutine. Unconditionally create a stack frame in the subroutine so that, as objtool sees things, the function has standard stack behavior. The dynamic stack adjustment makes using unwind hints problematic. Suggested-by: Josh Poimboeuf Cc: Uros Bizjak Signed-off-by: Sean Christopherson Message-Id: <20200915191505.10355-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 09e3e2a1cc8d8069085785f1236a64c72707e7f2 Author: Sean Christopherson Date: Tue Sep 15 16:27:02 2020 -0700 KVM: x86: Add kvm_x86_ops hook to short circuit emulation Replace the existing kvm_x86_ops.need_emulation_on_page_fault() with a more generic is_emulatable(), and unconditionally call the new function in x86_emulate_instruction(). KVM will use the generic hook to support multiple security related technologies that prevent emulation in one way or another. Similar to the existing AMD #NPF case where emulation of the current instruction is not possible due to lack of information, AMD's SEV-ES and Intel's SGX and TDX will introduce scenarios where emulation is impossible due to the guest's register state being inaccessible. And again similar to the existing #NPF case, emulation can be initiated by kvm_mmu_page_fault(), i.e. outside of the control of vendor-specific code. While the cause and architecturally visible behavior of the various cases are different, e.g. SGX will inject a #UD, AMD #NPF is a clean resume or complete shutdown, and SEV-ES and TDX "return" an error, the impact on the common emulation code is identical: KVM must stop emulation immediately and resume the guest. Query is_emulatable() in handle_ud() as well so that the force_emulation_prefix code doesn't incorrectly modify RIP before calling emulate_instruction() in the absurdly unlikely scenario that KVM encounters forced emulation in conjunction with "do not emulate". Cc: Tom Lendacky Signed-off-by: Sean Christopherson Message-Id: <20200915232702.15945-1-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit ae5a2a39e46c1e21d06d275daeef9eb0b46864fe Author: Haiwei Li Date: Wed Sep 16 16:36:21 2020 +0800 KVM: SVM: use __GFP_ZERO instead of clear_page() Use __GFP_ZERO while alloc_page(). Signed-off-by: Haiwei Li Message-Id: <20200916083621.5512-1-lihaiwei.kernel@gmail.com> Signed-off-by: Paolo Bonzini commit bddd82d19e2e580b11e62f7a1d86ee52d8e437b6 Author: Krish Sadhukhan Date: Mon Sep 21 08:10:25 2020 +0000 KVM: nVMX: KVM needs to unset "unrestricted guest" VM-execution control in vmcs02 if vmcs12 doesn't set it Currently, prepare_vmcs02_early() does not check if the "unrestricted guest" VM-execution control in vmcs12 is turned off and leaves the corresponding bit on in vmcs02. Due to this setting, vmentry checks which are supposed to render the nested guest state as invalid when this VM-execution control is not set, are passing in hardware. This patch turns off the "unrestricted guest" VM-execution control in vmcs02 if vmcs12 has turned it off. Suggested-by: Jim Mattson Suggested-by: Sean Christopherson Signed-off-by: Krish Sadhukhan Message-Id: <20200921081027.23047-2-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini commit cc5b54dd58d0420c1b1f1e9b29f53327076e9355 Author: Maxim Levitsky Date: Mon Sep 21 13:38:05 2020 +0300 KVM: x86: fix MSR_IA32_TSC read for nested migration MSR reads/writes should always access the L1 state, since the (nested) hypervisor should intercept all the msrs it wants to adjust, and these that it doesn't should be read by the guest as if the host had read it. However IA32_TSC is an exception. Even when not intercepted, guest still reads the value + TSC offset. The write however does not take any TSC offset into account. This is documented in Intel's SDM and seems also to happen on AMD as well. This creates a problem when userspace wants to read the IA32_TSC value and then write it. (e.g for migration) In this case it reads L2 value but write is interpreted as an L1 value. To fix this make the userspace initiated reads of IA32_TSC return L1 value as well. Huge thanks to Dave Gilbert for helping me understand this very confusing semantic of MSR writes. Signed-off-by: Maxim Levitsky Message-Id: <20200921103805.9102-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 871c433bae565306cfc3a1a386bf7328bc9d31cb Author: Rustam Kovhaev Date: Fri Sep 18 05:05:00 2020 -0700 KVM: use struct_size() and flex_array_size() helpers in kvm_io_bus_unregister_dev() Make use of the struct_size() helper to avoid any potential type mistakes and protect against potential integer overflows Make use of the flex_array_size() helper to calculate the size of a flexible array member within an enclosing structure Suggested-by: Gustavo A. R. Silva Signed-off-by: Rustam Kovhaev Message-Id: <20200918120500.954436-1-rkovhaev@gmail.com> Reviewed-by: Gustavo A. R. Silva Signed-off-by: Paolo Bonzini commit 4407a797e9412afba2f7815fb19395d4b32dca4e Author: Babu Moger Date: Fri Sep 11 14:29:19 2020 -0500 KVM: SVM: Enable INVPCID feature on AMD The following intercept bit has been added to support VMEXIT for INVPCID instruction: Code Name Cause A2h VMEXIT_INVPCID INVPCID instruction The following bit has been added to the VMCB layout control area to control intercept of INVPCID: Byte Offset Bit(s) Function 14h 2 intercept INVPCID Enable the interceptions when the the guest is running with shadow page table enabled and handle the tlbflush based on the invpcid instruction type. For the guests with nested page table (NPT) support, the INVPCID feature works as running it natively. KVM does not need to do any special handling in this case. AMD documentation for INVPCID feature is available at "AMD64 Architecture Programmer’s Manual Volume 2: System Programming, Pub. 24593 Rev. 3.34(or later)" The documentation can be obtained at the links below: Link: https://www.amd.com/system/files/TechDocs/24593.pdf Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Babu Moger Reviewed-by: Jim Mattson Message-Id: <159985255929.11252.17346684135277453258.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit 9715092f8d7eaab2e06a86b67bffc61c20e76f17 Author: Babu Moger Date: Fri Sep 11 14:29:12 2020 -0500 KVM: X86: Move handling of INVPCID types to x86 INVPCID instruction handling is mostly same across both VMX and SVM. So, move the code to common x86.c. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson Message-Id: <159985255212.11252.10322694343971983487.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit 3f3393b3ce383600fc7255f5ec04385209b6f404 Author: Babu Moger Date: Fri Sep 11 14:29:05 2020 -0500 KVM: X86: Rename and move the function vmx_handle_memory_failure to x86.c Handling of kvm_read/write_guest_virt*() errors can be moved to common code. The same code can be used by both VMX and SVM. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson Message-Id: <159985254493.11252.6603092560732507607.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit 830bd71f2c0684b530970d0aea792a12c0cbcdd2 Author: Babu Moger Date: Fri Sep 11 14:28:50 2020 -0500 KVM: SVM: Remove set_cr_intercept, clr_cr_intercept and is_cr_intercept Remove set_cr_intercept, clr_cr_intercept and is_cr_intercept. Instead call generic svm_set_intercept, svm_clr_intercept an dsvm_is_intercep tfor all cr intercepts. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson Message-Id: <159985253016.11252.16945893859439811480.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit 4c44e8d6c19330e48a87103184f840ffe5a423cd Author: Babu Moger Date: Fri Sep 11 14:28:35 2020 -0500 KVM: SVM: Add new intercept word in vmcb_control_area The new intercept bits have been added in vmcb control area to support few more interceptions. Here are the some of them. - INTERCEPT_INVLPGB, - INTERCEPT_INVLPGB_ILLEGAL, - INTERCEPT_INVPCID, - INTERCEPT_MCOMMIT, - INTERCEPT_TLBSYNC, Add a new intercept word in vmcb_control_area to support these instructions. Also update kvm_nested_vmrun trace function to support the new addition. AMD documentation for these instructions is available at "AMD64 Architecture Programmer’s Manual Volume 2: System Programming, Pub. 24593 Rev. 3.34(or later)" The documentation can be obtained at the links below: Link: https://www.amd.com/system/files/TechDocs/24593.pdf Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Babu Moger Reviewed-by: Jim Mattson Message-Id: <159985251547.11252.16994139329949066945.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit c62e2e94b9d4a221f489cfeacf665c50aa9ab6cf Author: Babu Moger Date: Fri Sep 11 14:28:28 2020 -0500 KVM: SVM: Modify 64 bit intercept field to two 32 bit vectors Convert all the intercepts to one array of 32 bit vectors in vmcb_control_area. This makes it easy for future intercept vector additions. Also update trace functions. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson Message-Id: <159985250813.11252.5736581193881040525.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit 9780d51dc2af1c02bed9687822ba0d6df955c302 Author: Babu Moger Date: Fri Sep 11 14:28:20 2020 -0500 KVM: SVM: Modify intercept_exceptions to generic intercepts Modify intercept_exceptions to generic intercepts in vmcb_control_area. Use the generic vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept to set/clear/test the intercept_exceptions bits. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson Message-Id: <159985250037.11252.1361972528657052410.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit 30abaa88382ce078cfc2ecebb61d9e0540fef24d Author: Babu Moger Date: Fri Sep 11 14:28:12 2020 -0500 KVM: SVM: Change intercept_dr to generic intercepts Modify intercept_dr to generic intercepts in vmcb_control_area. Use the generic vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept to set/clear/test the intercept_dr bits. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson Message-Id: <159985249255.11252.10000868032136333355.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit 03bfeeb988a970995479eb6d108c398027ab7525 Author: Babu Moger Date: Fri Sep 11 14:28:05 2020 -0500 KVM: SVM: Change intercept_cr to generic intercepts Change intercept_cr to generic intercepts in vmcb_control_area. Use the new vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept where applicable. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson Message-Id: <159985248506.11252.9081085950784508671.stgit@bmoger-ubuntu> [Change constant names. - Paolo] Signed-off-by: Paolo Bonzini commit c45ad7229d139ad48e894a271f8df6975e53d12e Author: Babu Moger Date: Fri Sep 11 14:27:58 2020 -0500 KVM: SVM: Introduce vmcb_(set_intercept/clr_intercept/_is_intercept) This is in preparation for the future intercept vector additions. Add new functions vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept using kernel APIs __set_bit, __clear_bit and test_bit espectively. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson Message-Id: <159985247876.11252.16039238014239824460.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit a90c1ed9f11dbc3d37664a8561e50e3f3695c539 Author: Babu Moger Date: Fri Sep 11 14:28:42 2020 -0500 KVM: nSVM: Remove unused field host_intercept_exceptions is not used anywhere. Clean it up. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson Message-Id: <159985252277.11252.8819848322175521354.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit 8d22b90e942c26d33dcccaef398cbf7f9b4e39d6 Author: Maxim Levitsky Date: Thu Aug 27 20:11:42 2020 +0300 KVM: SVM: refactor exit labels in svm_create_vcpu Kernel coding style suggests not to use labels like error1,error2 Suggested-by: Jim Mattson Signed-off-by: Maxim Levitsky Message-Id: <20200827171145.374620-6-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 0681de1b83697bcbc06b843d0c8302da45855205 Author: Maxim Levitsky Date: Thu Aug 27 20:11:41 2020 +0300 KVM: SVM: use __GFP_ZERO instead of clear_page Another small refactoring. Suggested-by: Jim Mattson Signed-off-by: Maxim Levitsky Message-Id: <20200827171145.374620-5-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit f4c847a95654b898834ed513870a4fb01c27b29e Author: Maxim Levitsky Date: Thu Aug 27 20:11:40 2020 +0300 KVM: SVM: refactor msr permission bitmap allocation Replace svm_vcpu_init_msrpm with svm_vcpu_alloc_msrpm, that also allocates the msr bitmap and add svm_vcpu_free_msrpm to free it. This will be used later to move the nested msr permission bitmap allocation to nested.c Signed-off-by: Maxim Levitsky Message-Id: <20200827171145.374620-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 0dd16b5b0c9bd62fbff3ea375cdd5125e19317c6 Author: Maxim Levitsky Date: Thu Aug 27 20:11:39 2020 +0300 KVM: nSVM: rename nested vmcb to vmcb12 This is to be more consistient with VMX, and to support upcoming addition of vmcb02 Hopefully no functional changes. Signed-off-by: Maxim Levitsky Message-Id: <20200827171145.374620-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 1feaba144cd395fa0ff5143ba1dc33afddb7a743 Author: Maxim Levitsky Date: Thu Aug 27 20:11:38 2020 +0300 KVM: SVM: rename a variable in the svm_create_vcpu The 'page' is to hold the vcpu's vmcb so name it as such to avoid confusion. Signed-off-by: Maxim Levitsky Reviewed-by: Jim Mattson Message-Id: <20200827171145.374620-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 010fd37fddf659ea7525b1191381e6f8c3ccab14 Author: Wanpeng Li Date: Thu Sep 10 17:50:41 2020 +0800 KVM: LAPIC: Reduce world switch latency caused by timer_advance_ns All the checks in lapic_timer_int_injected(), __kvm_wait_lapic_expire(), and these function calls waste cpu cycles when the timer mode is not tscdeadline. We can observe ~1.3% world switch time overhead by kvm-unit-tests/vmexit.flat vmcall testing on AMD server. This patch reduces the world switch latency caused by timer_advance_ns feature when the timer mode is not tscdeadline by simpling move the check against apic->lapic_timer.expired_tscdeadline much earlier. Signed-off-by: Wanpeng Li Message-Id: <1599731444-3525-7-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 68ca7663c75b099539fe675fc5387dee44d3a6cc Author: Wanpeng Li Date: Thu Sep 10 17:50:40 2020 +0800 KVM: LAPIC: Narrow down the kick target vCPU The kick after setting KVM_REQ_PENDING_TIMER is used to handle the timer fires on a different pCPU which vCPU is running on. This kick costs about 1000 clock cycles and we don't need this when injecting already-expired timer or when using the VMX preemption timer because kvm_lapic_expired_hv_timer() is called from the target vCPU. Reviewed-by: Sean Christopherson Signed-off-by: Wanpeng Li Message-Id: <1599731444-3525-6-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 275038332f22d15796f1921f672b024d5cb392bc Author: Wanpeng Li Date: Thu Sep 10 17:50:37 2020 +0800 KVM: LAPIC: Guarantee the timer is in tsc-deadline mode when setting Check apic_lvtt_tscdeadline() mode directly instead of apic_lvtt_oneshot() and apic_lvtt_period() to guarantee the timer is in tsc-deadline mode when wrmsr MSR_IA32_TSCDEADLINE. Reviewed-by: Sean Christopherson Signed-off-by: Wanpeng Li Message-Id: <1599731444-3525-3-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit a970e9b216a28b81c0417ab978ff2e248880b86d Author: Wanpeng Li Date: Thu Sep 10 17:50:36 2020 +0800 KVM: LAPIC: Return 0 when getting the tscdeadline timer if the lapic is hw disabled Return 0 when getting the tscdeadline timer if the lapic is hw disabled. Suggested-by: Paolo Bonzini Reviewed-by: Sean Christopherson Signed-off-by: Wanpeng Li Message-Id: <1599731444-3525-2-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit ae6f24968608f71a51814d80ee8fcd38e799a0fd Author: Wanpeng Li Date: Wed Aug 19 16:55:26 2020 +0800 KVM: LAPIC: Fix updating DFR missing apic map recalculation There is missing apic map recalculation after updating DFR, if it is INIT RESET, in x2apic mode, local apic is software enabled before. This patch fix it by introducing the function kvm_apic_set_dfr() to be called in INIT RESET handling path. Signed-off-by: Wanpeng Li Message-Id: <1597827327-25055-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 2fc4f15dac952b9bbc2695c9040f2c17be70dabb Author: Yi Li Date: Fri Sep 11 13:56:52 2020 +0800 kvm/eventfd: move wildcard calculation outside loop There is no need to calculate wildcard in each iteration since wildcard is not changed. Signed-off-by: Yi Li Message-Id: <20200911055652.3041762-1-yili@winhong.com> Signed-off-by: Paolo Bonzini commit b9757a4b6f46560cdd65afdb0e44bc06b7e60340 Author: Chenyi Qiang Date: Fri Aug 28 16:56:22 2020 +0800 KVM: nVMX: Simplify the initialization of nested_vmx_msrs The nested VMX controls MSRs can be initialized by the global capability values stored in vmcs_config. Signed-off-by: Chenyi Qiang Reviewed-by: Xiaoyao Li Message-Id: <20200828085622.8365-6-chenyi.qiang@intel.com> Signed-off-by: Paolo Bonzini commit efc831338bfd66e40b6ab8b2b332ab48203be9ff Author: Chenyi Qiang Date: Fri Aug 28 16:56:18 2020 +0800 KVM: nVMX: Fix VMX controls MSRs setup when nested VMX enabled KVM supports the nested VM_{EXIT, ENTRY}_LOAD_IA32_PERF_GLOBAL_CTRL and VM_{ENTRY_LOAD, EXIT_CLEAR}_BNDCFGS, but they are not exposed by the system ioctl KVM_GET_MSR. Add them to the setup of nested VMX controls MSR. Signed-off-by: Chenyi Qiang Message-Id: <20200828085622.8365-2-chenyi.qiang@intel.com> Reviewed-by: Xiaoyao Li Signed-off-by: Paolo Bonzini commit d5cd6f34014592a232ce79dc25e295778bd43c22 Author: Vitaly Kuznetsov Date: Mon Sep 14 15:37:25 2020 +0200 KVM: nSVM: Avoid freeing uninitialized pointers in svm_set_nested_state() The save and ctl pointers are passed uninitialized to kfree() when svm_set_nested_state() follows the 'goto out_set_gif' path. While the issue could've been fixed by initializing these on-stack varialbles to NULL, it seems preferable to eliminate 'out_set_gif' label completely as it is not actually a failure path and duplicating a single svm_set_gif() call doesn't look too bad. [ bp: Drop obscure Addresses-Coverity: tag. ] Fixes: 6ccbd29ade0d ("KVM: SVM: nested: Don't allocate VMCB structures on stack") Reported-by: Dan Carpenter Reported-by: Joerg Roedel Reported-by: Colin King Signed-off-by: Vitaly Kuznetsov Signed-off-by: Borislav Petkov Reviewed-by: Sean Christopherson Acked-by: Joerg Roedel Tested-by: Tom Lendacky Link: https://lkml.kernel.org/r/20200914133725.650221-1-vkuznets@redhat.com Signed-off-by: Paolo Bonzini commit 1821f8b36f112be9e3071779da82e14384fc6989 Author: Thomas Pedersen Date: Mon Sep 21 19:28:12 2020 -0700 mac80211: handle S1G low rates S1G doesn't have legacy (sband->bitrates) rates, only MCS. For now, just send a frame at MCS 0 if a low rate is requested. Note we also redefine (since we're out of TX flags) TX_RC_VHT_MCS as TX_RC_S1G_MCS to indicate an S1G MCS. This is probably OK as VHT MCS is not valid on S1G band and vice versa. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-12-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 89b8c02a35f5c6199f76a839b7a7e450f8185f1b Author: Thomas Pedersen Date: Mon Sep 21 19:28:11 2020 -0700 mac80211: don't calculate duration for S1G For now just skip the duration calculation for frames transmitted on the S1G band and avoid a warning. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-11-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 05d109576a36fd498e5db2d905eb50c7dd844b83 Author: Thomas Pedersen Date: Mon Sep 21 19:28:10 2020 -0700 mac80211: encode listen interval for S1G S1G allows listen interval up to 2^14 * 10000 beacon intervals. In order to do this listen interval needs a scaling factor applied to the lower 14 bits. Calculate this and properly encode the listen interval for S1G STAs. See IEEE802.11ah-2016 Table 9-44a for reference. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-10-thomas@adapt-ip.com [move listen_int_usf into function using it] Signed-off-by: Johannes Berg commit 7fedd9b84bf8288ccb7a88aadedffdc9221f31e6 Author: Namhyung Kim Date: Thu Sep 24 21:44:51 2020 +0900 perf evsel: Add evsel__clone() function The evsel__clone() is to create an exactly same evsel from same attributes. The function assumes the given evsel is not configured yet so it cares fields set during event parsing. Those fields are now moved together as Jiri suggested. Note that metric events will be handled by later patch. It will be used by perf stat to generate separate events for each cgroup. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200924124455.336326-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 80ca25711380c8eabe51eed875ca9432b4f8939e Author: Thomas Pedersen Date: Mon Sep 21 19:28:09 2020 -0700 cfg80211: handle Association Response from S1G STA The sending STA type is implicit based on beacon or probe response content. If sending STA was an S1G STA, adjust the Information Element location accordingly. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-9-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit cd418ba63f0c2f6157f35a41c9accc6ecb52590a Author: Thomas Pedersen Date: Mon Sep 21 19:28:08 2020 -0700 mac80211: convert S1G beacon to scan results This commit finds the correct offset for Information Elements in S1G beacon frames so they can be reported in scan results. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-8-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 66b0564d7e757a193b6f8c925ae30997814fc026 Author: Thomas Pedersen Date: Mon Sep 21 19:28:07 2020 -0700 cfg80211: parse S1G Operation element for BSS channel Extract the BSS primary channel from the S1G Operation element. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-7-thomas@adapt-ip.com [remove the goto bits] Signed-off-by: Johannes Berg commit 9eaffe5078ca0808603cdd15c4eaf0106a996f3a Author: Thomas Pedersen Date: Mon Sep 21 19:28:06 2020 -0700 cfg80211: convert S1G beacon to scan results The S1G beacon is an extension frame as opposed to management frame for the regular beacon. This means we may have to occasionally cast the frame buffer to a different header type. Luckily this isn't too bad as scan results mostly only care about the IEs. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-6-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 7957c6c8141b8c76e94feb68eff72c0aa6595915 Author: Thomas Pedersen Date: Mon Sep 21 19:28:05 2020 -0700 mac80211: support S1G STA capabilities Include the S1G Capabilities element in an association request, and support the cfg80211 capability overrides. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-5-thomas@adapt-ip.com [pass skb to ieee80211_add_s1g_capab_ie(), small code style edits] Signed-off-by: Johannes Berg commit d2b7588a47de8322891de38ec14d15105d66cb1e Author: Thomas Pedersen Date: Mon Sep 21 19:28:04 2020 -0700 nl80211: support S1G capability overrides in assoc NL80211_ATTR_S1G_CAPABILITY can be passed along with NL80211_ATTR_S1G_CAPABILITY_MASK to NL80211_CMD_ASSOCIATE to indicate S1G capabilities which should override the hardware capabilities in eg. the association request. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-4-thomas@adapt-ip.com [johannes: always require both attributes together, commit message] Signed-off-by: Johannes Berg commit 75b1593533f13a2b77306a1edb971be2d8705dd7 Author: Thomas Pedersen Date: Mon Sep 21 19:28:03 2020 -0700 mac80211: s1g: choose scanning width based on frequency An S1G BSS can beacon at either 1 or 2 MHz and the channel width is unique to a given frequency. Ignore scan channel width for now and use the allowed channel width. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-3-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 5e48077498918e9e42f689df5f14dbdc3f1b8cc2 Author: Thomas Pedersen Date: Mon Sep 21 19:28:02 2020 -0700 mac80211: get correct default channel width for S1G When deleting a channel context, mac80211 would assing NL80211_CHAN_WIDTH_20_NOHT as the default channel width. This is wrong in S1G however, so instead get the allowed channel width for a given channel. Fixes eg. configuring strange (20Mhz) width during a scan on the S1G band. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200922022818.15855-2-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 211f20415995f0c40aa91a0856b5f442154d56b2 Author: Johannes Berg Date: Thu Sep 24 19:25:12 2020 +0200 wireless: radiotap: fix some kernel-doc The vendor namespaces argument isn't described here, add it. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200924192511.2bf5cc761d3a.I9b4579ab3eebe3d7889b59eea8fa50d683611bab@changeid Signed-off-by: Johannes Berg commit f0daf54f4e761b642adbd7f514bb07956977e3ee Author: Johannes Berg Date: Thu Sep 24 19:25:11 2020 +0200 mac80211: fix some missing kernel-doc Two parameters are not described, add them. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200924192511.21411377b0a8.I1add147d782a3bf38287bde412dc98f69323c732@changeid Signed-off-by: Johannes Berg commit e83adb188b67f493fd62d4653995ef60be37368d Author: Johannes Berg Date: Thu Sep 24 19:25:10 2020 +0200 mac80211_hwsim: fix typo in kernel-doc There's a stray _ in the kernel doc, remove it. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200924192511.6a344ebd8d65.Ie95a47db5887b8d2faa8ca2df474a955a376c4c4@changeid Signed-off-by: Johannes Berg commit c8cb5b854b40f2ce52ccd032fa19750f4181d5fc Author: Tova Mussai Date: Fri Sep 18 11:33:13 2020 +0200 nl80211/cfg80211: support 6 GHz scanning Support 6 GHz scanning, by * a new scan flag to scan for colocated BSSes advertised by (and found) APs on 2.4 & 5 GHz * doing the necessary reduced neighbor report parsing for this, to find them * adding the ability to split the scan request in case the device by itself cannot support this. Also add some necessary bits in mac80211 to not break with these changes. Signed-off-by: Tova Mussai Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200918113313.232917c93af9.Ida22f0212f9122f47094d81659e879a50434a6a2@changeid Signed-off-by: Johannes Berg commit b5ff7f2799a4191eb9d91479db59c855ddeaf81e Author: Jin Yao Date: Wed May 13 16:13:33 2020 +0800 perf vendor events: Update SkylakeX events to v1.21 - Update SkylakeX events to v1.21. - Update SkylakeX JSON metrics from TMAM 4.0. Other fixes: - Add NO_NMI_WATCHDOG metric constraint to Backend_Bound - Fix misspelled error Signed-off-by: Jin Yao Reviewed-by: Andi Kleen Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/lkml/20200922031918.3723-1-yao.jin@linux.intel.com/ Signed-off-by: Arnaldo Carvalho de Melo commit 038d3b53c284bc0e9ba891e64c44abf6aee8065c Author: Jin Yao Date: Tue Sep 22 10:51:19 2020 +0800 perf vendor events intel: Update CascadelakeX events to v1.08 - Update CascadelakeX events to v1.08. - Update CascadelakeX JSON metrics from TMAM 4.0. Other fixes: - Add NO_NMI_WATCHDOG metric constraint to Backend_Bound - Change 'MB/sec' to 'MB' in UNC_M_PMM_BANDWIDTH. Signed-off-by: Jin Yao Reviewed-by: Andi Kleen Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Alexander Shishkin Cc: Kan Liang Link: https://lore.kernel.org/lkml/20200922031918.3723-1-yao.jin@linux.intel.com/ Signed-off-by: Arnaldo Carvalho de Melo commit ce31ff786ddf3dbaa4c2212d2d51611701bc0103 Author: Gustavo Pimentel Date: Tue Sep 22 11:59:10 2020 +0200 PCI: dwc: Fix 'cast truncates bits from constant value' Fixes warning given by executing "make C=2 drivers/pci/" Sparse output: CHECK drivers/pci/controller/dwc/pcie-designware.c drivers/pci/controller/dwc/pcie-designware.c:432:52: warning: cast truncates bits from constant value (ffffffff7fffffff becomes 7fffffff) Link: https://lore.kernel.org/r/7ea7f7d342f97c758949a17b870012f52ce5b3f5.1600767645.git.gustavo.pimentel@synopsys.com Reported-by: Bjorn Helgaas Signed-off-by: Gustavo Pimentel Signed-off-by: Lorenzo Pieralisi Cc: Joao Pinto commit 2bd5298af55cfd725f13ff853adcee4d117532cd Author: Martin Cerveny Date: Wed Sep 16 19:59:41 2020 +0200 ARM: dts: sun8i: v3s: Add simple-framebuffer Add support for "allwinner,simple-framebuffer" with "mixer0-lcd0" pipeline from boot loader (u-boot). It depends on boot loader implementation of DE2/TCON0 setup with LCD. Signed-off-by: Martin Cerveny Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200916175941.8448-1-m.cerveny@computer.org commit bbcf293d838b81b77e12ce7859715eac80ff11a6 Author: Icenowy Zheng Date: Wed Sep 23 09:02:15 2020 +0800 ARM: dts: sun8i: s3l: add support for Pine64 PineCube IP camera The Pine64 PineCube IP camera is an IP camera with SoChip S3 SoC. It comes with a main board, an expansion board and a camera. The main board features a Micro-USB power-only jack, a USB Type-A port, an Ethernet port connected to the internal PHY of the SoC and a Realtek RTL8189ES SDIO Wi-Fi module. A RGB LCD connector is reserved on the board. The expansion board features a TF slot, a microphone, a speaker connector with on-board amplifier and a few IR LEDs. Add support for the kit, with features on the main board and the expansion board now. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200923010215.148819-2-icenowy@aosc.io commit 61f4bc990b378d10ee2964c764f92363e1fd6ed4 Author: Icenowy Zheng Date: Wed Sep 23 09:02:14 2020 +0800 dt-bindings: arm: sunxi: add Pine64 PineCube binding Document board compatible names for Pine64 PineCube IP camera. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200923010215.148819-1-icenowy@aosc.io commit dba0491f00114b9f688bfff60545e90a270023e1 Author: Loic Poulain Date: Mon Jun 29 10:55:23 2020 +0200 mac80211: Inform AP when returning operating channel Because we can miss AP wakeup (beacon) while scanning other channels, it's better go into wakeup state and inform the AP of that upon returning to the operating channel, rather than staying asleep and waiting for the next TIM indicating traffic for us. This saves precious time, especially when we only have 200ms inter- scan period for monitoring the active connection. Signed-off-by: Loic Poulain Link: https://lore.kernel.org/r/1593420923-26668-1-git-send-email-loic.poulain@linaro.org [rewrite commit message a bit] Signed-off-by: Johannes Berg commit f2d10ff4a903813df767a4b56b651a26b938df06 Author: Daniel Thompson Date: Sun Sep 27 22:15:29 2020 +0100 kgdb: Honour the kprobe blocklist when setting breakpoints Currently kgdb has absolutely no safety rails in place to discourage or prevent a user from placing a breakpoint in dangerous places such as the debugger's own trap entry/exit and other places where it is not safe to take synchronous traps. Introduce a new config symbol KGDB_HONOUR_BLOCKLIST and modify the default implementation of kgdb_validate_break_address() so that we use the kprobe blocklist to prohibit instrumentation of critical functions if the config symbol is set. The config symbol dependencies are set to ensure that the blocklist will be enabled by default if we enable KGDB and are compiling for an architecture where we HAVE_KPROBES. Suggested-by: Peter Zijlstra Reviewed-by: Douglas Anderson Reviewed-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20200927211531.1380577-2-daniel.thompson@linaro.org Signed-off-by: Daniel Thompson commit cd198909d680f93b0cb5553d4b560794e6eb8d4a Author: Liu Shixin Date: Wed Sep 16 10:50:25 2020 +0800 PCI: tegra: Convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Link: https://lore.kernel.org/r/20200916025025.3992783-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding commit 9b64efa8372671b32dd615ea68d68b2303e58bfb Merge: eff65bd43958f 8156b80fd4885 aa524294ffb62 220387048d859 Author: Marc Zyngier Date: Mon Sep 28 11:36:40 2020 +0100 Merge branch 'irq/ipi-as-irq', remote-tracking branches 'origin/irq/dw' and 'origin/irq/owl' into irq/irqchip-next Signed-off-by: Marc Zyngier commit d56a7ed2d8f93d95de3f3217c8d563233fde858b Author: Srinivas Kandagatla Date: Sat Sep 26 18:18:44 2020 +0100 ASoC: q6afe-clocks: Fix typo in SPDX Licence Looks like there was a major typo in SPDX Licence version, Not sure how it was missed. This patch is to fix it. Reported-by: Lukas Bulwahn Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200926171844.7792-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 220387048d859896ccc362c0ebf9bc1e0fa62eb9 Author: Marc Zyngier Date: Fri Sep 25 16:22:00 2020 +0100 ARM: Handle no IPI being registered in show_ipi_list() As SMP-on-UP is a valid configuration on 32bit ARM, do not assume that IPIs are populated in show_ipi_list(). Reported-by: Guillaume Tucker Reported-by: kernelci.org bot Tested-by: Guillaume Tucker Signed-off-by: Marc Zyngier commit 764384d0640376049d1a5c8789ce1c4564c76969 Author: Faiz Abbas Date: Wed Sep 23 16:22:06 2020 +0530 mmc: sdhci_am654: Enable tuning for SDR50 According to the SW tuning App note[1], tuning is required for all UHS speed modes. Tuning for SDR50 is not enabled in Capabilities by default so enable it from the CTL_CFG registers. [1] https://www.ti.com/lit/pdf/spract9 Signed-off-by: Faiz Abbas Link: https://lore.kernel.org/r/20200923105206.7988-7-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 13ebeae68ac9830fb8e6e8dfc84f55dba5aab58b Author: Faiz Abbas Date: Wed Sep 23 16:22:05 2020 +0530 mmc: sdhci_am654: Add support for software tuning With the new SW tuning App note[1], a custom tuning algorithm is required for eMMC HS200, HS400 and SD card UHS modes. The algorithm involves running through the 32 possible input tap delay values and sending the appropriate tuning command (CMD19/21) for each of them to get a fail or pass result for each of the values. Typically, the range will have a small contiguous failing window. Considering the tuning range as a circular buffer, the algorithm then sets a final tuned value directly opposite to the failing window. [1] https://www.ti.com/lit/pdf/spract9 Signed-off-by: Faiz Abbas Reviewed-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20200923105206.7988-6-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit a0a62497f6aac0f9ba25e7befb334046c98fdf92 Author: Faiz Abbas Date: Wed Sep 23 16:22:04 2020 +0530 mmc: sdhci_am654: Add support for input tap delay DLL need only be enabled for speed modes and clock frequencies at or above 50 MHz. For speed modes that don't enable the DLL, we need to configure a static input delay value. This involves reading an optional itap-del-sel-* value from the device tree and configuring it for the appropriate speed mode. With this addition, make sure that DLL is always switched off at the beginning of the set_clock() call to simplify configuration. This also removes the need for the dll_on member in struct sdhci_am654_data. Signed-off-by: Faiz Abbas Link: https://lore.kernel.org/r/20200923105206.7988-5-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 1e753dbb9ce824fc490c0c3757c4f39df72dc28b Author: Faiz Abbas Date: Wed Sep 23 16:22:03 2020 +0530 mmc: sdhci_am654: Fix hard coded otap delay array size Change hard coded array size value to depend on struct timing_data array size. Signed-off-by: Faiz Abbas Link: https://lore.kernel.org/r/20200923105206.7988-4-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit b140954c5f5f6a595d9f474572a408caff558fa5 Author: Faiz Abbas Date: Wed Sep 23 16:22:02 2020 +0530 dt-bindings: mmc: sdhci-am654: Add documentation for input tap delay Add documentation for input tap delay bindings. Signed-off-by: Faiz Abbas Link: https://lore.kernel.org/r/20200923105206.7988-3-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 407d0c2cdd12b5e72695686d4097e7f1331a093e Author: Faiz Abbas Date: Wed Sep 23 16:22:01 2020 +0530 dt-bindings: mmc: sdhci-am654: Convert sdhci-am654 controller documentation to json schema Convert sdhci-am654 documentation to yaml format. The new file sdhci-am654.yaml will inherit from mmc-controller.yaml. Signed-off-by: Faiz Abbas Link: https://lore.kernel.org/r/20200923105206.7988-2-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 975520fc73809a3a0904f0c67d8640945696e798 Author: Yangbo Lu Date: Sun Sep 27 16:23:04 2020 +0800 mmc: sdhci-of-esdhc: fix reference clock source selection The bit ESDHC_PERIPHERAL_CLK_SEL to select using peripheral clock or platform clock is not able to be reset by SDHCI_RESET_ALL. So driver needs to initialize it as 1 or 0 once, to override the different value which may be configured in bootloader. Signed-off-by: Yangbo Lu Link: https://lore.kernel.org/r/20200927082304.9232-1-yangbo.lu@nxp.com Signed-off-by: Ulf Hansson commit 3157b035f499e48334be1ec74b297721b82adb4b Author: Randy Dunlap Date: Fri Sep 25 09:43:23 2020 -0700 mmc: host: fix depends for MMC_MESON_GX w/ COMPILE_TEST Fix build errors for meson-gx-mmc.c when CONFIG_COMMON_CLK is not set/enabled. This can happen when COMPILE_TEST is set/enabled. ERROR: modpost: "clk_divider_ops" [drivers/mmc/host/meson-gx-mmc.ko] undefined! ERROR: modpost: "devm_clk_register" [drivers/mmc/host/meson-gx-mmc.ko] undefined! ERROR: modpost: "clk_mux_ops" [drivers/mmc/host/meson-gx-mmc.ko] undefined! ERROR: modpost: "__clk_get_name" [drivers/mmc/host/meson-gx-mmc.ko] undefined! Fixes: 54d8454436a2 ("mmc: host: Enable compile testing of multiple drivers") Signed-off-by: Randy Dunlap Reviewed-by: Krzysztof Kozlowski Reported-by: kernel test robot Link: https://lore.kernel.org/r/20200925164323.29843-1-rdunlap@infradead.org Signed-off-by: Ulf Hansson commit 21685f9a7d7cdb3f68d83352377571fb24d03134 Merge: 94d4c3cffefc7 afd7f30886b0b Author: Ulf Hansson Date: Mon Sep 28 12:17:36 2020 +0200 Merge branch 'fixes' into next commit b5a2221c077a54886cc3161c95ae5c3511049299 Author: Icenowy Zheng Date: Wed Sep 23 09:00:12 2020 +0800 ARM: dts: sun8i: V3/V3s/S3/S3L: add pinctrl for I2C1 at PE bank I2C1 controller is available at PE bank, usually used for connecting an I2C-controlled camera sensor. Add pinctrl node for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200923010014.148482-2-icenowy@aosc.io commit e174afa66e09e0f836c581c082fbdd73e8875209 Author: Icenowy Zheng Date: Wed Sep 23 09:01:21 2020 +0800 ARM: dts: sun8i: V3/V3s/S3/S3L: add pinctrl for 8-bit parallel CSI The CSI1 controller of V3/V3s/S3/S3L SoCs is used for parallel CSI. As we're going to add support for Pine64 SCC board, which uses 8-bit parallel CSI (and the MCLK output), add the pinctrl node of 8-bit CSI and MCLK to the DTSI file. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200923010122.148661-1-icenowy@aosc.io commit 90e048101fa192e6e1ea48192fa22d8c684a0bf1 Author: Icenowy Zheng Date: Wed Sep 23 08:58:54 2020 +0800 ARM: dts: sun8i: V3/V3s/S3/S3L: add CSI1 device node The CSI1 controller of V3/V3s/S3/S3L chips is used for parallel CSI. Add the device tree node of it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200923005858.148261-2-icenowy@aosc.io commit c0dcfbe29edcc90d90da6b84e7d45ef39e67a726 Author: Icenowy Zheng Date: Wed Sep 23 08:58:53 2020 +0800 ARM: dts: sun8i: V3/V3s/S3/S3L: add pinctrl for UART2 RX/TX The UART2 RX/TX pins on Allwinner V3 series is at PB0/1, which is used as debugging UART on some boards. Add pinctrl node for them. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200923005858.148261-1-icenowy@aosc.io commit 02ed6bb83ec3f99806b0f3471c7ee1a02525e236 Author: Icenowy Zheng Date: Wed Sep 23 08:57:03 2020 +0800 ARM: dts: sun8i: V3/V3s/S3/S3L: add Ethernet support The Allwinner V3/V3s/S3L/SoChip S3 Ethernet MAC and internal PHY is quite similar to the ones on Allwinner H3, except for V3s the external MII is not wired out. Add ethernet support to V3/V3s/S3/S3L. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200923005709.147966-2-icenowy@aosc.io commit 61e7113e48d3ca1ea692b5c6376a4b545b312166 Merge: 02a20d4fef3da bc2652b7ae1e1 Author: Steffen Klassert Date: Mon Sep 28 11:26:56 2020 +0200 Merge 'xfrm: Add compat layer' Dmitry Safonov says: ==================== Changes since v2: - added struct xfrm_translator as API to register xfrm_compat.ko with xfrm_state.ko. This allows compilation of translator as a loadable module - fixed indention and collected reviewed-by (Johannes Berg) - moved boilerplate from commit messages into cover-letter (Steffen Klassert) - found on KASAN build and fixed non-initialised stack variable usage in the translator The resulting v2/v3 diff can be found here: https://gist.github.com/0x7f454c46/8f68311dfa1f240959fdbe7c77ed2259 Patches as a .git branch: https://github.com/0x7f454c46/linux/tree/xfrm-compat-v3 Changes since v1: - reworked patches set to use translator - separated the compat layer into xfrm_compat.c, compiled under XFRM_USER_COMPAT config - 32-bit messages now being sent in frag_list (like wext-core does) - instead of __packed add compat_u64 members in compat structures - selftest reworked to kselftest lib API - added netlink dump testing to the selftest XFRM is disabled for compatible users because of the UABI difference. The difference is in structures paddings and in the result the size of netlink messages differ. Possibility for compatible application to manage xfrm tunnels was disabled by: the commmit 19d7df69fdb2 ("xfrm: Refuse to insert 32 bit userspace socket policies on 64 bit systems") and the commit 74005991b78a ("xfrm: Do not parse 32bits compiled xfrm netlink msg on 64bits host"). This is my second attempt to resolve the xfrm/compat problem by adding the 64=>32 and 32=>64 bit translators those non-visibly to a user provide translation between compatible user and kernel. Previous attempt was to interrupt the message ABI according to a syscall by xfrm_user, which resulted in over-complicated code [1]. Florian Westphal provided the idea of translator and some draft patches in the discussion. In these patches, his idea is reused and some of his initial code is also present. There were a couple of attempts to solve xfrm compat problem: https://lkml.org/lkml/2017/1/20/733 https://patchwork.ozlabs.org/patch/44600/ http://netdev.vger.kernel.narkive.com/2Gesykj6/patch-net-next-xfrm-correctly-parse-netlink-msg-from-32bits-ip-command-on-64bits-host All the discussions end in the conclusion that xfrm should have a full compatible layer to correctly work with 32-bit applications on 64-bit kernels: https://lkml.org/lkml/2017/1/23/413 https://patchwork.ozlabs.org/patch/433279/ In some recent lkml discussion, Linus said that it's worth to fix this problem and not giving people an excuse to stay on 32-bit kernel: https://lkml.org/lkml/2018/2/13/752 There is also an selftest for ipsec tunnels. It doesn't depend on any library and compat version can be easy build with: make CFLAGS=-m32 net/ipsec [1]: https://lkml.kernel.org/r/20180726023144.31066-1-dima@arista.com ==================== Signed-off-by: Steffen Klassert commit 1f3aed01473c41c9f896fbf4c30d330655e8aa7c Author: Mohammed Gamal Date: Thu Sep 24 17:11:17 2020 +0200 hv: clocksource: Add notrace attribute to read_hv_sched_clock_*() functions When selecting function_graph tracer with the command: # echo function_graph > /sys/kernel/debug/tracing/current_tracer The kernel crashes with the following stack trace: [69703.122389] BUG: stack guard page was hit at 000000001056545c (stack is 00000000fa3f8fed..0000000005d39503) [69703.122403] kernel stack overflow (double-fault): 0000 [#1] SMP PTI [69703.122413] CPU: 0 PID: 16982 Comm: bash Kdump: loaded Not tainted 4.18.0-236.el8.x86_64 #1 [69703.122420] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.0 12/17/2019 [69703.122433] RIP: 0010repare_ftrace_return+0xa/0x110 [69703.122458] Code: 05 00 0f 0b 48 c7 c7 10 ca 69 ae 0f b6 f0 e8 4b 52 0c 00 31 c0 eb ca 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 56 41 55 41 54 <53> 48 83 ec 18 65 48 8b 04 25 28 00 00 00 48 89 45 d8 31 c0 48 85 [69703.122467] RSP: 0018:ffffbd6d01118000 EFLAGS: 00010086 [69703.122476] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000003 [69703.122484] RDX: 0000000000000000 RSI: ffffbd6d011180d8 RDI: ffffffffadce7550 [69703.122491] RBP: ffffbd6d01118018 R08: 0000000000000000 R09: ffff9d4b09266000 [69703.122498] R10: ffff9d4b0fc04540 R11: ffff9d4b0fc20a00 R12: ffff9d4b6e42aa90 [69703.122506] R13: ffff9d4b0fc20ab8 R14: 00000000000003e8 R15: ffffbd6d0111837c [69703.122514] FS: 00007fd5f2588740(0000) GS:ffff9d4b6e400000(0000) knlGS:0000000000000000 [69703.122521] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [69703.122528] CR2: ffffbd6d01117ff8 CR3: 00000000565d8001 CR4: 00000000003606f0 [69703.122538] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [69703.122545] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [69703.122552] Call Trace: [69703.122568] ftrace_graph_caller+0x6b/0xa0 [69703.122589] ? read_hv_sched_clock_tsc+0x5/0x20 [69703.122599] read_hv_sched_clock_tsc+0x5/0x20 [69703.122611] sched_clock+0x5/0x10 [69703.122621] sched_clock_local+0x12/0x80 [69703.122631] sched_clock_cpu+0x8c/0xb0 [69703.122644] trace_clock_global+0x21/0x90 [69703.122655] ring_buffer_lock_reserve+0x100/0x3c0 [69703.122671] trace_buffer_lock_reserve+0x16/0x50 [69703.122683] __trace_graph_entry+0x28/0x90 [69703.122695] trace_graph_entry+0xfd/0x1a0 [69703.122705] ? read_hv_clock_tsc_cs+0x10/0x10 [69703.122714] ? sched_clock+0x5/0x10 [69703.122723] prepare_ftrace_return+0x99/0x110 [69703.122734] ? read_hv_clock_tsc_cs+0x10/0x10 [69703.122743] ? sched_clock+0x5/0x10 [69703.122752] ftrace_graph_caller+0x6b/0xa0 [69703.122768] ? read_hv_clock_tsc_cs+0x10/0x10 [69703.122777] ? sched_clock+0x5/0x10 [69703.122786] ? read_hv_sched_clock_tsc+0x5/0x20 [69703.122796] ? ring_buffer_unlock_commit+0x1d/0xa0 [69703.122805] read_hv_sched_clock_tsc+0x5/0x20 [69703.122814] ftrace_graph_caller+0xa0/0xa0 [ ... recursion snipped ... ] Setting the notrace attribute for read_hv_sched_clock_msr() and read_hv_sched_clock_tsc() fixes it. Fixes: bd00cd52d5be ("clocksource/drivers/hyperv: Add Hyper-V specific sched clock function") Signed-off-by: Vitaly Kuznetsov Signed-off-by: Mohammed Gamal Link: https://lore.kernel.org/r/20200924151117.767442-1-mgamal@redhat.com Signed-off-by: Wei Liu commit e1471463180ddc36aa9970fe6a413feb0b608990 Author: Joseph Salisbury Date: Sat Sep 26 07:26:26 2020 -0700 x86/hyperv: Remove aliases with X64 in their name In the architecture independent version of hyperv-tlfs.h, commit c55a844f46f958b removed the "X64" in the symbol names so they would make sense for both x86 and ARM64. That commit added aliases with the "X64" in the x86 version of hyperv-tlfs.h so that existing x86 code would continue to compile. As a cleanup, update the x86 code to use the symbols without the "X64", then remove the aliases. There's no functional change. Signed-off-by: Joseph Salisbury Link: https://lore.kernel.org/r/1601130386-11111-1-git-send-email-jsalisbury@linux.microsoft.com Reviewed-by: Michael Kelley Acked-by: Paolo Bonzini Signed-off-by: Wei Liu commit 6d2730cb11214f492cbf381cef1758e15857bb69 Author: Krzysztof Wilczyński Date: Fri Sep 25 23:47:53 2020 +0000 PCI: hv: Document missing hv_pci_protocol_negotiation() parameter Add missing documentation for the parameter "version" and "num_version" of the hv_pci_protocol_negotiation() function and resolve build time kernel-doc warnings: drivers/pci/controller/pci-hyperv.c:2535: warning: Function parameter or member 'version' not described in 'hv_pci_protocol_negotiation' drivers/pci/controller/pci-hyperv.c:2535: warning: Function parameter or member 'num_version' not described in 'hv_pci_protocol_negotiation' No change to functionality intended. Signed-off-by: Krzysztof Wilczyński Link: https://lore.kernel.org/r/20200925234753.1767227-1-kw@linux.com Reviewed-by: Michael Kelley Signed-off-by: Wei Liu commit 8f43710543ef305904c18072d14ace43c74b7743 Author: Boqun Feng Date: Wed Sep 16 11:48:17 2020 +0800 scsi: storvsc: Support PAGE_SIZE larger than 4K Hyper-V always use 4k page size (HV_HYP_PAGE_SIZE), so when communicating with Hyper-V, a guest should always use HV_HYP_PAGE_SIZE as the unit for page related data. For storvsc, the data is vmbus_packet_mpb_array. And since in scsi_cmnd, sglist of pages (in unit of PAGE_SIZE) is used, we need convert pages in the sglist of scsi_cmnd into Hyper-V pages in vmbus_packet_mpb_array. This patch does the conversion by dividing pages in sglist into Hyper-V pages, offset and indexes in vmbus_packet_mpb_array are recalculated accordingly. Signed-off-by: Boqun Feng Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200916034817.30282-12-boqun.feng@gmail.com Signed-off-by: Wei Liu commit 061dc93ef602dc8cdc719375538992b8f1e53478 Author: Boqun Feng Date: Wed Sep 16 11:48:16 2020 +0800 Driver: hv: util: Use VMBUS_RING_SIZE() for ringbuffer sizes For a Hyper-V vmbus, the size of the ringbuffer has two requirements: 1) it has to take one PAGE_SIZE for the header 2) it has to be PAGE_SIZE aligned so that double-mapping can work VMBUS_RING_SIZE() could calculate a correct ringbuffer size which fulfills both requirements, therefore use it to make sure vmbus work when PAGE_SIZE != HV_HYP_PAGE_SIZE (4K). Note that since the argument for VMBUS_RING_SIZE() is the size of payload (data part), so it will be minus 4k (the size of header when PAGE_SIZE = 4k) than the original value to keep the ringbuffer total size unchanged when PAGE_SIZE = 4k. Signed-off-by: Boqun Feng Cc: Michael Kelley Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200916034817.30282-11-boqun.feng@gmail.com Signed-off-by: Wei Liu commit d02a26991ecee772f8e510ce46ccac87ce480554 Author: Boqun Feng Date: Wed Sep 16 11:48:15 2020 +0800 HID: hyperv: Use VMBUS_RING_SIZE() for ringbuffer sizes For a Hyper-V vmbus, the size of the ringbuffer has two requirements: 1) it has to take one PAGE_SIZE for the header 2) it has to be PAGE_SIZE aligned so that double-mapping can work VMBUS_RING_SIZE() could calculate a correct ringbuffer size which fulfills both requirements, therefore use it to make sure vmbus work when PAGE_SIZE != HV_HYP_PAGE_SIZE (4K). Note that since the argument for VMBUS_RING_SIZE() is the size of payload (data part), so it will be minus 4k (the size of header when PAGE_SIZE = 4k) than the original value to keep the ringbuffer total size unchanged when PAGE_SIZE = 4k. Signed-off-by: Boqun Feng Cc: Jiri Kosina Cc: Michael Kelley Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200916034817.30282-10-boqun.feng@gmail.com Signed-off-by: Wei Liu commit 50597970aa84cc087424ef8d3bc430665aebcece Author: Boqun Feng Date: Wed Sep 16 11:48:14 2020 +0800 Input: hyperv-keyboard: Use VMBUS_RING_SIZE() for ringbuffer sizes For a Hyper-V vmbus, the size of the ringbuffer has two requirements: 1) it has to take one PAGE_SIZE for the header 2) it has to be PAGE_SIZE aligned so that double-mapping can work VMBUS_RING_SIZE() could calculate a correct ringbuffer size which fulfills both requirements, therefore use it to make sure vmbus work when PAGE_SIZE != HV_HYP_PAGE_SIZE (4K). Note that since the argument for VMBUS_RING_SIZE() is the size of payload (data part), so it will be minus 4k (the size of header when PAGE_SIZE = 4k) than the original value to keep the ringbuffer total size unchanged when PAGE_SIZE = 4k. Signed-off-by: Boqun Feng Cc: Michael Kelley Cc: Dmitry Torokhov Acked-by: Dmitry Torokhov Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200916034817.30282-9-boqun.feng@gmail.com Signed-off-by: Wei Liu commit 11d8620e0867cb21313aa66ff6ce0172e28f68ff Author: Boqun Feng Date: Wed Sep 16 11:48:13 2020 +0800 hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V communication When communicating with Hyper-V, HV_HYP_PAGE_SIZE should be used since that's the page size used by Hyper-V and Hyper-V expects all page-related data using the unit of HY_HYP_PAGE_SIZE, for example, the "pfn" in hv_page_buffer is actually the HV_HYP_PAGE (i.e. the Hyper-V page) number. In order to support guest whose page size is not 4k, we need to make hv_netvsc always use HV_HYP_PAGE_SIZE for Hyper-V communication. Signed-off-by: Boqun Feng Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200916034817.30282-8-boqun.feng@gmail.com Signed-off-by: Wei Liu commit 106dee08408118c5b50387817e74419436e8b651 Author: Boqun Feng Date: Wed Sep 16 11:48:12 2020 +0800 hv: hyperv.h: Introduce some hvpfn helper functions When a guest communicate with the hypervisor, it must use HV_HYP_PAGE to calculate PFN, so introduce a few hvpfn helper functions as the counterpart of the page helper functions. This is the preparation for supporting guest whose PAGE_SIZE is not 4k. Signed-off-by: Boqun Feng Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200916034817.30282-7-boqun.feng@gmail.com Signed-off-by: Wei Liu commit bca6b91dfdd4347d8fe0bb97377dda0cacd51d82 Author: Boqun Feng Date: Wed Sep 16 11:48:11 2020 +0800 Drivers: hv: vmbus: Move virt_to_hvpfn() to hyperv header There will be more places other than vmbus where we need to calculate the Hyper-V page PFN from a virtual address, so move virt_to_hvpfn() to hyperv generic header. Signed-off-by: Boqun Feng Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200916034817.30282-6-boqun.feng@gmail.com Signed-off-by: Wei Liu commit ef514d3e38edf36764e61fc11366410041598ad9 Author: Boqun Feng Date: Wed Sep 16 11:48:10 2020 +0800 Drivers: hv: Use HV_HYP_PAGE in hv_synic_enable_regs() Both the base_*_gpa should use the guest page number in Hyper-V page, so use HV_HYP_PAGE instead of PAGE. Signed-off-by: Boqun Feng Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200916034817.30282-5-boqun.feng@gmail.com Signed-off-by: Wei Liu commit c1135c7fd0e95740cd4619ce389f43ffce043140 Author: Boqun Feng Date: Wed Sep 16 11:48:09 2020 +0800 Drivers: hv: vmbus: Introduce types of GPADL This patch introduces two types of GPADL: HV_GPADL_{BUFFER, RING}. The types of GPADL are purely the concept in the guest, IOW the hypervisor treat them as the same. The reason of introducing the types for GPADL is to support guests whose page size is not 4k (the page size of Hyper-V hypervisor). In these guests, both the headers and the data parts of the ringbuffers need to be aligned to the PAGE_SIZE, because 1) some of the ringbuffers will be mapped into userspace and 2) we use "double mapping" mechanism to support fast wrap-around, and "double mapping" relies on ringbuffers being page-aligned. However, the Hyper-V hypervisor only uses 4k (HV_HYP_PAGE_SIZE) headers. Our solution to this is that we always make the headers of ringbuffers take one guest page and when GPADL is established between the guest and hypervisor, the only first 4k of header is used. To handle this special case, we need the types of GPADL to differ different guest memory usage for GPADL. Type enum is introduced along with several general interfaces to describe the differences between normal buffer GPADL and ringbuffer GPADL. Signed-off-by: Boqun Feng Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200916034817.30282-4-boqun.feng@gmail.com Signed-off-by: Wei Liu commit edd9bbc1d934c21c537444203d50a502ad3d945f Author: Boqun Feng Date: Wed Sep 16 11:48:08 2020 +0800 Drivers: hv: vmbus: Move __vmbus_open() Pure function movement, no functional changes. The move is made, because in a later change, __vmbus_open() will rely on some static functions afterwards, so we separate the move and the modification of __vmbus_open() in two patches to make it easy to review. Signed-off-by: Boqun Feng Reviewed-by: Wei Liu Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200916034817.30282-3-boqun.feng@gmail.com Signed-off-by: Wei Liu commit a5dda201a0384e577884d9427dc60a336ced216f Author: Boqun Feng Date: Wed Sep 16 11:48:07 2020 +0800 Drivers: hv: vmbus: Always use HV_HYP_PAGE_SIZE for gpadl Since the hypervisor always uses 4K as its page size, the size of PFNs used for gpadl should be HV_HYP_PAGE_SIZE rather than PAGE_SIZE, so adjust this accordingly as the preparation for supporting 16K/64K page size guests. No functional changes on x86, since PAGE_SIZE is always 4k (equals to HV_HYP_PAGE_SIZE). Signed-off-by: Boqun Feng Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200916034817.30282-2-boqun.feng@gmail.com Signed-off-by: Wei Liu commit 50c5feeea0af99a4401fd54fd72bec1333a496ca Author: Finn Thain Date: Thu Sep 24 08:48:04 2020 +1000 ide/macide: Convert Mac IDE driver to platform driver Add platform devices for the Mac IDE controller variants. Convert the macide module into a platform driver to support two of those variants. For the third, use a generic "pata_platform" driver instead. This enables automatic loading of the appropriate module and begins the process of replacing the driver with libata alternatives. Signed-off-by: Finn Thain Tested-by: Stan Johnson Cc: Bartlomiej Zolnierkiewicz Cc: Joshua Thompson References: commit 5ed0794cde593 ("m68k/atari: Convert Falcon IDE drivers to platform drivers") References: commit 7ad19a99ad431 ("ide: officially deprecated the legacy IDE driver") Link: https://lore.kernel.org/r/edd106dad1bbea32500601c6071f37a9f02a8004.1600901284.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit 0675c285ea65540cccae64c87dfc7a00c7ede03a Author: Florian Fainelli Date: Sun Sep 27 19:31:50 2020 -0700 net: vlan: Fixed signedness in vlan_group_prealloc_vid() After commit d0186842ec5f ("net: vlan: Avoid using BUG() in vlan_proto_idx()"), vlan_proto_idx() was changed to return a signed integer, however one of its called: vlan_group_prealloc_vid() was still using an unsigned integer for its return value, fix that. Fixes: d0186842ec5f ("net: vlan: Avoid using BUG() in vlan_proto_idx()") Reported-by: kernel test robot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 7612f4e2bc0e4a7dbbebafc077d220385ab63fbb Author: Stephen Boyd Date: Wed Sep 16 16:12:00 2020 -0700 phy: qcom-qmp: Add support for sc7180 DP phy Add the necessary compatible strings and phy data for the sc7180 USB3+DP combo phy. Signed-off-by: Stephen Boyd Cc: Jeykumar Sankaran Cc: Chandan Uddaraju Cc: Vara Reddy Cc: Tanmay Shah Cc: Bjorn Andersson Cc: Manu Gautam Cc: Sandeep Maheswaram Cc: Douglas Anderson Cc: Sean Paul Cc: Jonathan Marek Cc: Dmitry Baryshkov Cc: Rob Clark Link: https://lore.kernel.org/r/20200609034623.10844-1-tanmay@codeaurora.org Link: https://lore.kernel.org/r/20200916231202.3637932-9-swboyd@chromium.org Signed-off-by: Vinod Koul commit 52e013d0bffa2238746b246074272817ec8e0807 Author: Stephen Boyd Date: Wed Sep 16 16:11:59 2020 -0700 phy: qcom-qmp: Add support for DP in USB3+DP combo phy Add support for the USB3 + DisplayPort (DP) "combo" phy to the qmp phy driver. We already have support for the USB3 part of the combo phy, so most additions are for the DP phy. Split up the qcom_qmp_phy{enable,disable}() functions into the phy init, power on, power off, and exit functions that the common phy framework expects so that the DP phy can add even more phy ops like phy_calibrate() and phy_configure(). This allows us to initialize the DP PHY and configure the AUX channel before powering on the PHY at the link rate that was negotiated during link training. The general design is as follows: 1) DP controller calls phy_init() to initialize the PHY and configure the dp_com register region. 2) DP controller calls phy_configure() to tune the link rate and voltage swing and pre-emphasis settings. 3) DP controller calls phy_power_on() to enable the PLL and power on the phy. 4) DP controller calls phy_configure() again to tune the voltage swing and pre-emphasis settings determind during link training. 5) DP controller calls phy_calibrate() some number of times to change the aux settings if the aux channel times out during link training. 6) DP controller calls phy_power_off() if the link rate is to be changed and goes back to step 2 to try again at a different link rate. 5) DP controller calls phy_power_off() and then phy_exit() to power down the PHY when it is done. The DP PHY contains a PLL that is different from the one used for the USB3 PHY. Instead of a pipe clk there is a link clk and a pixel clk output from the DP PLL after going through various dividers. Introduce clk ops for these two clks that just tell the child clks what the frequency of the pixel and link are. When the phy link rate is configured we call clk_set_rate() to update the child clks in the display clk controller on what rate is in use. The clk frequencies always differ based on the link rate (i.e. 1.6Gb/s 2.7Gb/s, 5.4Gb/s, or 8.1Gb/s corresponding to various transmission modes like HBR1, HBR2 or HBR3) so we simply store the link rate and use that to calculate the clk frequencies. The PLL enable sequence is a little different from other QMP phy PLLs so we power on the PLL in qcom_qmp_phy_configure_dp_phy() that gets called from phy_power_on(). This should probably be split out better so that each phy has a way to run the final PLL/PHY enable sequence. This code is based on a submission of this phy and PLL in the drm subsystem. Signed-off-by: Stephen Boyd Cc: Jeykumar Sankaran Cc: Chandan Uddaraju Cc: Vara Reddy Cc: Tanmay Shah Cc: Bjorn Andersson Cc: Manu Gautam Cc: Sandeep Maheswaram Cc: Douglas Anderson Cc: Sean Paul Cc: Stephen Boyd Cc: Jonathan Marek Cc: Dmitry Baryshkov Cc: Rob Clark Link: https://lore.kernel.org/r/20200609034623.10844-1-tanmay@codeaurora.org Link: https://lore.kernel.org/r/20200916231202.3637932-8-swboyd@chromium.org Signed-off-by: Vinod Koul commit f385b73192c584d0efbfa8903eac3eea7db43744 Author: Stephen Boyd Date: Wed Sep 16 16:11:58 2020 -0700 phy: qcom-qmp: Use devm_platform_ioremap_resource() to simplify We can use the wrapper API here to save some lines and remove the need for the 'base' and 'res' local variable. Suggested-by: Bjorn Andersson Signed-off-by: Stephen Boyd Cc: Jeykumar Sankaran Cc: Chandan Uddaraju Cc: Vara Reddy Cc: Tanmay Shah Cc: Bjorn Andersson Cc: Manu Gautam Cc: Sandeep Maheswaram Cc: Douglas Anderson Cc: Sean Paul Cc: Jonathan Marek Cc: Dmitry Baryshkov Cc: Rob Clark Link: https://lore.kernel.org/r/20200916231202.3637932-7-swboyd@chromium.org Signed-off-by: Vinod Koul commit dab7b10ddc83e5cdaef103cc08a162a2a2b03c15 Author: Stephen Boyd Date: Wed Sep 16 16:11:57 2020 -0700 phy: qcom-qmp: Get dp_com I/O resource by index The dp_com resource is always at index 1 according to the dts files in the kernel. Get this resource by index so that we don't need to make future additions to the DT binding use 'reg-names'. Signed-off-by: Stephen Boyd Cc: Jeykumar Sankaran Cc: Chandan Uddaraju Cc: Vara Reddy Cc: Tanmay Shah Cc: Bjorn Andersson Cc: Manu Gautam Cc: Sandeep Maheswaram Cc: Douglas Anderson Cc: Sean Paul Cc: Jonathan Marek Cc: Dmitry Baryshkov Cc: Rob Clark Link: https://lore.kernel.org/r/20200916231202.3637932-6-swboyd@chromium.org Signed-off-by: Vinod Koul commit aa968cb1a67e27de8a6d0f2012cffc53f256404a Author: Stephen Boyd Date: Wed Sep 16 16:11:56 2020 -0700 phy: qcom-qmp: Move 'serdes' and 'cfg' into 'struct qcom_phy' The serdes I/O region is where the PLL for the phy is controlled. Sometimes the PLL is shared between multiple phys, for example in the PCIe case where there are three phys inside the same wrapper. Other times the PLL is for a single phy, i.e. some USB3 phys. To complete the trifecta we have the USB3+DP combo phy where the USB3 and DP phys each have their own serdes region because they have their own PLL while they both share a common I/O region pertaining to the USB type-c pinout and cable orientation. Let's move the serdes iomem pointer into 'struct qmp_phy' so that we can correlate PLL control to the phy that uses it. This allows us to support the USB3+DP combo phy in this driver. This isn't a problem for the 3-lane/phy PCIe phy because there is a common init function that is the only place the serdes region is programmed. Furthermore, move the configuration data that contains most of the register programming sequences to the qmp phy struct. This data isn't qmp wrapper specific. It is phy specific data used to tune various settings for things like pre-emphasis, bias, etc. Signed-off-by: Stephen Boyd Cc: Jeykumar Sankaran Cc: Chandan Uddaraju Cc: Vara Reddy Cc: Tanmay Shah Cc: Bjorn Andersson Cc: Manu Gautam Cc: Sandeep Maheswaram Cc: Douglas Anderson Cc: Sean Paul Cc: Jonathan Marek Cc: Dmitry Baryshkov Cc: Rob Clark Link: https://lore.kernel.org/r/20200916231202.3637932-5-swboyd@chromium.org Signed-off-by: Vinod Koul commit e4bc7de8ae166dff1b926d031266c3866f779766 Author: Stephen Boyd Date: Wed Sep 16 16:11:55 2020 -0700 phy: qcom-qmp: Remove 'initialized' in favor of 'init_count' We already track if any phy inside the qmp wrapper has been initialized by means of the struct qcom_qmp::init_count member. Let's drop the duplicate 'initialized' member to simplify the code a bit. Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Cc: Jeykumar Sankaran Cc: Chandan Uddaraju Cc: Vara Reddy Cc: Tanmay Shah Cc: Manu Gautam Cc: Sandeep Maheswaram Cc: Douglas Anderson Cc: Sean Paul Cc: Jonathan Marek Cc: Dmitry Baryshkov Cc: Rob Clark Link: https://lore.kernel.org/r/20200916231202.3637932-4-swboyd@chromium.org Signed-off-by: Vinod Koul commit dadcf9959ccef45e2958da42850757b4f0ac3751 Author: Stephen Boyd Date: Wed Sep 16 16:11:54 2020 -0700 phy: qcom-qmp: Move phy mode into struct qmp_phy The phy mode pertains to the phy itself, i.e. 'struct qmp_phy', not the wrapper, i.e. 'struct qcom_qmp'. Move the phy mode into the phy structure to more accurately reflect what is going on. This also cleans up 'struct qcom_qmp' so that it can eventually be the place where qmp wrapper wide data is located, paving the way for the USB3+DP combo phy. Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Cc: Jeykumar Sankaran Cc: Chandan Uddaraju Cc: Vara Reddy Cc: Tanmay Shah Cc: Manu Gautam Cc: Sandeep Maheswaram Cc: Douglas Anderson Cc: Sean Paul Cc: Jonathan Marek Cc: Dmitry Baryshkov Cc: Rob Clark Link: https://lore.kernel.org/r/20200916231202.3637932-3-swboyd@chromium.org Signed-off-by: Vinod Koul commit 724fabf5df1342eae363fd3bfc091b5d160225d3 Author: Stephen Boyd Date: Wed Sep 16 16:11:53 2020 -0700 dt-bindings: phy: qcom,qmp-usb3-dp: Add DP phy information This binding only describes the USB phy inside the USB3 + DP "combo" phy. Add information for the DP phy and describe the sub-nodes that represent the DP and USB3 phys that exist inside the combo wrapper. Remove reg-names from required properties because it isn't required nor used by the kernel driver. Signed-off-by: Stephen Boyd Reviewed-by: Rob Herring Cc: Jeykumar Sankaran Cc: Chandan Uddaraju Cc: Vara Reddy Cc: Tanmay Shah Cc: Bjorn Andersson Cc: Manu Gautam Cc: Sandeep Maheswaram Cc: Douglas Anderson Cc: Sean Paul Cc: Jonathan Marek Cc: Dmitry Baryshkov Cc: Cc: Rob Herring Cc: Rob Clark Link: https://lore.kernel.org/r/20200916231202.3637932-2-swboyd@chromium.org Signed-off-by: Vinod Koul commit 0173f525b2c1b02a51784e2119d434593235aed1 Author: Pierre-Louis Bossart Date: Thu Sep 24 14:44:30 2020 -0500 soundwire: sysfs: add slave status and device number before probe The MIPI DisCo device properties that are read by the driver from platform firmware, or hard-coded in the driver, should only be provided as sysfs entries when a driver probes successfully. However the device status and device number is updated even when there is no driver present, and hence can be updated when a Slave device is detected on the bus without being described in platform firmware and without any driver registered/probed. As suggested by GregKH, the attribute group for Slave status and device number is is added by default upon device registration. Credits to Vinod Koul for the status_show() function, shared in a separate patch and used as is here. The status table was modified to remove an unnecessary enum and status_show() is handled in a different group attribute than what was suggested by Vinod. Tested-by: Srinivas Kandgatla Signed-off-by: Pierre-Louis Bossart Co-developed-by: Vinod Koul Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200924194430.121058-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit fcb9d730be1d3010e0c8fdc5aaff62836d7a942c Author: Srinivas Kandagatla Date: Thu Sep 24 14:44:29 2020 -0500 soundwire: bus: add enumerated Slave device to device list Currently Slave devices are only added on startup, either from Device Tree or ACPI entries. However Slave devices that are physically present on the bus, but not described in platform firmware, will never be added to the device list. The user/integrator can only know the list of devices by looking a dynamic debug logs. This patch suggests adding a Slave device even if there is no matching DT or ACPI entry, so that we can see this in sysfs entry. Initial code from Srinivas. Comments, fixes for ACPI probe and edits of commit message by Pierre. Signed-off-by: Srinivas Kandagatla Co-developed-by: Pierre-Louis Bossart Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200924194430.121058-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit b40f58b973865ee98ead884d2bdc7880b896ddb8 Author: Rocky Liao Date: Tue Sep 29 12:23:51 2020 +0800 Bluetooth: btusb: Add Qualcomm Bluetooth SoC WCN6855 support This patch add support for WCN6855 i.e. patch and nvm download support. T: Bus=01 Lev=01 Prnt=01 Port=00 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=0cf3 ProdID=e600 Rev= 0.01 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA 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=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 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 I: If#= 1 Alt= 7 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 65 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 65 Ivl=1ms Signed-off-by: Rocky Liao Signed-off-by: Marcel Holtmann commit e16a7c47d56b4eeee82be662014c145bce2380e5 Author: Sumera Priyadarsini Date: Thu Sep 24 16:56:08 2020 +0530 scripts: coccicheck: Change default value for parallelism By default, coccicheck utilizes all available threads to implement parallelisation. However, when all available threads are used, a decrease in performance is noted. The elapsed time is minimum when at most one thread per core is used. For example, on benchmarking the semantic patch kfree.cocci for usb/serial using hyperfine, the outputs obtained for J=5 and J=2 are 1.32 and 1.90 times faster than those for J=10 and J=9 respectively for two separate runs. For the larger drivers/staging directory, minimium elapsed time is obtained for J=3 which is 1.86 times faster than that for J=12. The optimal J value does not exceed 6 in any of the test runs. The benchmarks are run on a machine with 6 cores, with 2 threads per core, i.e, 12 hyperthreads in all. To improve performance, modify coccicheck to use at most only one thread per core by default. Signed-off-by: Sumera Priyadarsini Signed-off-by: Julia Lawall commit 4cd4b3619a2d434fe14304a925429855cfb4c953 Merge: e622129569963 4301304b04cc7 Author: David S. Miller Date: Sun Sep 27 13:35:46 2020 -0700 Merge branch 'bnxt_en-Update-for-net-next' Michael Chan says: ==================== bnxt_en: Update for net-next. This patch series adds 2 main features to the bnxt_en driver: 200G link speed support and FEC support with some refactoring of the link speed logic. The firmware interface is updated to have proper support for these 2 features. The ethtool preset max channel value is also adjusted properly to account for XDP and TCs. ==================== Signed-off-by: David S. Miller commit 4301304b04cc79f7b79bc982469fce16397f949f Author: Michael Chan Date: Sun Sep 27 13:42:20 2020 -0400 bnxt_en: Improve preset max value for ethtool -l. The current logic that calculates the preset maximum value for combined channel does not take into account the rings used for XDP and mqprio TCs. Each of these features will reduce the number of TX rings. Add the logic to divide the TX rings accordingly based on whether the device is currently in XDP mode and whether TCs are in use. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ccd6a9dcab79dc98d8d93d5aa3f68d71494f93fe Author: Michael Chan Date: Sun Sep 27 13:42:19 2020 -0400 bnxt_en: Implement ethtool set_fec_param() method. This feature allows the user to set the different FEC modes on the NIC port. Any new setting will take effect immediately after a link toggle. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 2046e3c356fd18f577cd0180a299cddd10fe5752 Author: Michael Chan Date: Sun Sep 27 13:42:18 2020 -0400 bnxt_en: Report Active FEC encoding during link up. The current code is reporting the FEC configured settings during link up. Change it to report the more useful active FEC encoding that may be negotiated or auto detected. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 8b2775890ad88d20a8f968aa88dbae487961240f Author: Michael Chan Date: Sun Sep 27 13:42:17 2020 -0400 bnxt_en: Report FEC settings to ethtool. Implement .get_fecparam() method to report the configured and active FEC settings. Also report the supported and advertised FEC settings to the .get_link_ksettings() method. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 745b5c653913829ede6d4466f36b35426d6e1823 Author: Edwin Peer Date: Sun Sep 27 13:42:16 2020 -0400 bnxt_en: avoid link reset if speed is not changed PORT_PHY_CONFIG is always sent with REQ_FLAGS_RESET_PHY set. This flag must be set in order for the firmware to institute the requested PHY change immediately, but it results in a link flap. This is unnecessary and results in an improved user experience if the PHY reconfiguration is avoided when the user requested speed does not constitute a change. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 3128e811b134128aadcf8582dded81b70980f23a Author: Michael Chan Date: Sun Sep 27 13:42:15 2020 -0400 bnxt_en: Handle ethernet link being disabled by firmware. On some 200G dual port NICs, if one port is configured to 200G, firmware will disable the ethernet link on the other port. Firmware will send notification to the driver for the disabled port when this happens. Define a new field in the link_info structure to keep track of this state. The new phy_state field replaces the unused loop_back field. Log a message when the phy_state changes state. In the disabled state, disallow any PHY configurations on the disabled port as the firmware will fail all calls to configure the PHY in this state. Reviewed-by: Vasundhara Volam Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 532262ba3b84fe77d7d420a24fa66b167bb0d93e Author: Edwin Peer Date: Sun Sep 27 13:42:14 2020 -0400 bnxt_en: ethtool: support PAM4 link speeds up to 200G Add ethtool PAM4 link modes for: 50000baseCR_Full 100000baseCR2_Full 200000baseCR4_Full Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit d058426ea84fff2bb941ecb7291a876571860dd2 Author: Edwin Peer Date: Sun Sep 27 13:42:13 2020 -0400 bnxt_en: add basic infrastructure to support PAM4 link speeds The firmware interface has added support for new link speeds using PAM4 modulation. Expand the bnxt_link_info structure to closely mirror the new firmware structures. Add logic to copy the PAM4 capabilities and settings from the firmware. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f00530bf3c9828d22a15043da5bc142760197fc2 Author: Edwin Peer Date: Sun Sep 27 13:42:12 2020 -0400 bnxt_en: refactor bnxt_get_fw_speed() It will be necessary to update more than one field in the link_info structure when PAM4 speeds are added in a later patch. Instead of merely translating ethtool speed values to firmware speed values, change the responsiblity of this function to update all the necessary link_info fields required to force the speed change to the desired ethtool value. This also reduces code duplication somewhat at the two call sites, which otherwise both have to independently update link_info fields to turn off auto negotiation advertisements. Also use the appropriate REQ_FORCE_LINK_SPEED definitions. These happen to have the same values, but req_link_speed is utilimately passed as force_link_speed in HWRM_PORT_PHY_CFG which is not defined in terms of REQ_AUTO_LINK_SPEED. Reviewed-by: Scott Branden Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c916062a8917463a469539eccee50d31e63c91c1 Author: Edwin Peer Date: Sun Sep 27 13:42:11 2020 -0400 bnxt_en: refactor code to limit speed advertising Extract the code for determining an advertised speed is no longer supported into a separate function. This will avoid some code duplication in a later patch when supporting PAM4 speeds, since these speeds are specified in a separate field. Reviewed-by: Scott Branden Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 9d6b648c3112012dac6d804d331cdd3a2247765c Author: Michael Chan Date: Sun Sep 27 13:42:10 2020 -0400 bnxt_en: Update firmware interface spec to 1.10.1.65. The main changes include FEC, ECN statistics, HWRM_PORT_PHY_QCFG response size reduction, and a new counter added to ctx_hw_stats_ext struct to support the new 58818 chip. The ctx_hw_stats_ext structure is now the superset supporting the new 58818 chips and the prior P5 chips. Add a new flag to identify the new chip and use constants for the chip specific ring statistics sizes instead of the size of the structure. Because the HWRM_PORT_PHY_QCFG response structure size has shrunk back to 96 bytes, the workaround added earlier to limit the size of this message for forwarding to the VF can be removed. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit e622129569963fa3bab976685443756e5da70da9 Author: Yangbo Lu Date: Sun Sep 27 16:01:50 2020 +0800 ptp: add stub function for ptp_get_msgtype() Added the missing stub function for ptp_get_msgtype(). Fixes: 036c508ba95e ("ptp: Add generic ptp message type function") Reported-by: Randy Dunlap Signed-off-by: Yangbo Lu Acked-by: Randy Dunlap # build-tested Signed-off-by: David S. Miller commit 36563ce6ae2886aec4ed287bbd2250d3d3612053 Author: Andrew Lunn Date: Sat Sep 26 23:26:03 2020 +0200 net: marvell: mvpp2: Fix W=1 warning with !CONFIG_ACPI rivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:7084:36: warning: ‘mvpp2_acpi_match’ defined but not used [-Wunused-const-variable=] 7084 | static const struct acpi_device_id mvpp2_acpi_match[] = { | ^~~~~~~~~~~~~~~~ Wrap the definition inside #ifdef/#endif. Compile tested only. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 7cd427e2f9d48228fb97d7c044b939eb7a81871f Merge: 603d11c4bc8c7 69f6d4ee68198 Author: David S. Miller Date: Sun Sep 27 13:27:01 2020 -0700 Merge branch 'mlxsw-Expose-transceiver-overheat-counter' Ido Schimmel says: ==================== mlxsw: Expose transceiver overheat counter Amit says: An overheated transceiver can be the root cause of various network problems such as link flapping. Counting the number of times a transceiver's temperature was higher than its configured threshold can therefore help in debugging such issues. This patch set exposes a transceiver overheat counter via ethtool. This is achieved by configuring the Spectrum ASIC to generate events whenever a transceiver is overheated. The temperature thresholds are queried from the transceiver (if available) and set to the default otherwise. Example: ... transceiver_overheat: 2 Patch set overview: Patches #1-#3 add required device registers Patches #4-#5 add required infrastructure in mlxsw to configure and count overheat events Patches #6-#9 gradually add support for the transceiver overheat counter Patch #10 exposes the transceiver overheat counter via ethtool ==================== Signed-off-by: David S. Miller commit 69f6d4ee68198f62db570342245b979820c9eed5 Author: Amit Cohen Date: Sun Sep 27 10:50:15 2020 +0300 mlxsw: spectrum_ethtool: Expose transceiver_overheat counter Add structures for port statistics which read from core and not directly from registers. When netdev's ethtool statistics are queried, query the corresponding module's overheat counter from core and expose it as "transceiver_overheat". Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 05cf5828bc8e18fcff095222395e188766683409 Author: Amit Cohen Date: Sun Sep 27 10:50:14 2020 +0300 mlxsw: Update module's settings when module is plugged in Module temperature warning events are enabled for modules that have a temperature sensor and configured according to the temperature thresholds queried from the module. When a module is unplugged we are guaranteed not to get temperature warning events. However, when a module is plugged in we need to potentially update its current settings (i.e., event enablement and thresholds). Register to port module plug/unplug events and update module's settings upon plug in events. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 3bdbab3fee87e7d2b29a61ea55808ae9d993f1d2 Author: Amit Cohen Date: Sun Sep 27 10:50:13 2020 +0300 mlxsw: spectrum: Initialize netdev's module overheat counter The overheat counter is a per-module counter, but it is exposed as part of the corresponding netdev's statistics. It should therefore be presented to user space relative to the netdev's lifetime. Query the counter just before registering the netdev, so that the value exposed to user space will be relative to this initial value. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f21b1a646f812ccc2e56f0d5c804b64f0043ea78 Author: Amit Cohen Date: Sun Sep 27 10:50:12 2020 +0300 mlxsw: Enable temperature event for all supported port module sensors MTWE (Management Temperature Warning Event) is triggered for sensors whose temperature event enable bit is enabled in the MTMP register. Enable events for all the modules that have a temperature sensor. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 943585c9eec32135750226e42d3c3510f079bd5e Author: Amit Cohen Date: Sun Sep 27 10:50:11 2020 +0300 mlxsw: Update transceiver_overheat counter according to MTWE MTWE (Management Temperature Warning Event) is triggered when module's temperature is higher than its threshold. Register for MTWE events and increase the module's overheat counter when its corresponding sensor goes above the configured threshold. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0652ac07756588d6f1aa8419f569b5894a149d6e Author: Amit Cohen Date: Sun Sep 27 10:50:10 2020 +0300 mlxsw: core: Add an infrastructure to track transceiver overheat counter Initialize an array that stores per-module overheat state and a counter indicating how many times the module was in overheat state. Export a function to query the counter according to module number. Will be used later on by the switch driver (i.e., mlxsw_spectrum) to expose module's overheat counter as part of ethtool statistics. Initialize mlxsw_env after driver initialization to be able to query number of modules from MGPIR register. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit fb1292f821cce8df765be15b2a1b8ebe9a6e304e Author: Amit Cohen Date: Sun Sep 27 10:50:09 2020 +0300 mlxsw: core_hwmon: Query MTMP before writing to set only relevant fields The MTMP register controls various temperature settings on a per-sensor basis. Subsequent patches are going to alter some of these settings for sensors found on port modules in response to certain events. In order to prevent the current callers that write to MTMP from overriding these settings, have them first query the register and then change only the relevant register fields. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 02d33b4520773a9d0a0c4ed98e4194bd3d62841e Author: Amit Cohen Date: Sun Sep 27 10:50:08 2020 +0300 mlxsw: reg: Add Ports Module Administrative and Operational Status Register PMAOS register configures and retrieves the per module status. The register is used also for enabling event for status change. It will be used to enable PMPE (Port Module Plug/Unplug) event. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit e7d62a3ca414bd668e72c97c82a094d2e0cf57f5 Author: Amit Cohen Date: Sun Sep 27 10:50:07 2020 +0300 mlxsw: reg: Add Port Module Plug/Unplug Event Register PMPE register reports any operational status change of a module. It will be used for enabling temperature warning event when a module is plugged in. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 946bd43519c9f7daf2e9417aad606e650f782a28 Author: Amit Cohen Date: Sun Sep 27 10:50:06 2020 +0300 mlxsw: reg: Add Management Temperature Warning Event Register Add MTWE (Management Temperature Warning Event) register, which is used for over temperature warning. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 603d11c4bc8c743b0be3ba9e0485585face3c3cb Merge: 090bc03bc9387 ff7e4d0df83b8 Author: David S. Miller Date: Sun Sep 27 13:25:22 2020 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: updates for -next To facilitate code maintenance and compatibility, #1 and #2 add device version to replace pci revision, #3 to #9 adds support for querying device capabilities and specifications, then the driver can use these query results to implement corresponding features (some features will be implemented later). And #10 is a minor cleanup since too many parameters for hclge_shaper_para_calc(). ==================== Signed-off-by: David S. Miller commit ff7e4d0df83b8029ee42d3dea5d1939b1ff5446f Author: Huazhong Tan Date: Sun Sep 27 15:12:48 2020 +0800 net: hns3: add a structure for IR shaper's parameter in hclge_shaper_para_calc() As function hclge_shaper_para_calc() has too many arguments to add more, so encapsulate its three arguments ir_b, ir_u, ir_s into a structure. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 1329702899db22611c8cfdf63e6d38b71b803fa1 Author: Guangbin Huang Date: Sun Sep 27 15:12:47 2020 +0800 net: hns3: add a check for device specifications queried from firmware The device specifications querying is unsupported by the old firmware, in this case, these specifications are 0. However, some specifications should not be 0 or will cause problem. So after querying from firmware, some device specifications are needed to check their value and set to default value if their values are 0. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d9c7d20dfb95b5a084e75186c5090eb09b082eac Author: Guangbin Huang Date: Sun Sep 27 15:12:46 2020 +0800 net: hns3: replace the macro of max tm rate with the queried specification The max tm rate is a fixed value(100Gb/s) now as it is defined by a macro. In order to support other rates in different kinds of device, it is better to use specification queried from firmware to replace this macro. As function hclge_shaper_para_calc() has too many arguments to add more, so encapsulate its three arguments ir_b, ir_u, ir_s into a structure. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit af2aedc57277dfd1d9ebe16777cf84dccce8e68d Author: Guangbin Huang Date: Sun Sep 27 15:12:45 2020 +0800 net: hns3: add support to query device specifications To improve code maintainability and compatibility, new commands HCLGE_OPC_QUERY_DEV_SPECS for PF and HCLGEVF_OPC_QUERY_DEV_SPECS for VF are introduced to query device specifications, instead of statically defining specifications by checking the hardware version or other methods. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 9484e3379e46afffcf0973677656bc36fe96ac71 Author: Guangbin Huang Date: Sun Sep 27 15:12:44 2020 +0800 net: hns3: add debugfs to dump device capabilities Adds debugfs to dump each device capability whether is supported. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 4cc86cb58a9993a318a56aff1d7dacdf5252b2bc Author: Guangbin Huang Date: Sun Sep 27 15:12:43 2020 +0800 net: hns3: use capabilities queried from firmware In order to improve code maintainability and compatibility, the capabilities of new features are queried from firmware. The member flag in struct hnae3_ae_dev indicates not only capabilities, but some initialized status. As capabilities bits queried from firmware is too many, it is better to use new member to indicate them. So adds member capabs in struce hnae3_ae_dev. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 74ba23a1d24934191f628a8d60dbbf437a4d0ba6 Author: Guangbin Huang Date: Sun Sep 27 15:12:42 2020 +0800 net: hns3: use capability flag to indicate FEC Currently, the revision of the pci device is used to identify whether FEC is supported, which is not good for maintainability and compatibility. So use a capability flag to do that. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit ca850f2b0ecbb24f03a706d4d11203565030570a Author: Guangbin Huang Date: Sun Sep 27 15:12:41 2020 +0800 net: hns3: add support to query device capability In order to improve code maintainability and compatibility, add support to query the device capability by expanding the existing version query command. The device capability refers to the features supported by the device. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 9b56d9a5a7ad7d02d1b1a1601cad730dfee6bce1 Author: Guangbin Huang Date: Sun Sep 27 15:12:40 2020 +0800 net: hns3: delete redundant PCI revision judgement Fibre device of PCI revision 0x20 don't support autoneg, and the ops get_autoneg() return AUTONEG_DISABLE so function hns3_nway_reset() will return earlier than judging PCI revision. Function hclge_handle_rocee_ras_error() don't need to judge PCI revision again because its caller hclge_handle_hw_ras_error() has judged once. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 295ba232a8c3c5547f9fb470a62f3585025ccd00 Author: Guangbin Huang Date: Sun Sep 27 15:12:39 2020 +0800 net: hns3: add device version to replace pci revision To better identify the device version, struct hnae3_handle adds a member dev_version to replace pci revision. The dev_version consists of hardware version and PCI revision. The hardware version is queried from firmware by an existing firmware version query command. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 32e4d9df60f71d641fbe628a9afbe2f44d7e9a37 Author: Julia Lawall Date: Sun Sep 27 21:12:18 2020 +0200 agp: use semicolons rather than commas to separate statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // @@ expression e1,e2; @@ e1 -, +; e2 ... when any // Signed-off-by: Julia Lawall Signed-off-by: Dave Airlie commit d27e623ace6af259075b6e0437380ee8d6268c5d Author: Thomas Gleixner Date: Sun Sep 27 10:46:44 2020 +0200 x86/apic/msi: Unbreak DMAR and HPET MSI Switching the DMAR and HPET MSI code to use the generic MSI domain ops missed to add the flag which tells the core code to update the domain operations with the defaults. As a consequence the core code crashes when an interrupt in one of those domains is allocated. Add the missing flags. Fixes: 9006c133a422 ("x86/msi: Use generic MSI domain ops") Reported-by: Qian Cai Reported-by: Peter Zijlstra Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/87wo0fli8b.fsf@nanos.tec.linutronix.de commit d0fa235c0a6131925ff1e9839f1135c693e73dfa Author: Krzysztof Kozlowski Date: Thu Sep 17 21:13:21 2020 +0200 dt-bindings: i2c: imx: Fix i.MX 7 compatible matching The i.MX 7 DTSes use two compatibles so update the binding to fix dtbs_check warnings like: arch/arm/boot/dts/imx7d-cl-som-imx7.dt.yaml: i2c@30a20000: compatible: ['fsl,imx7d-i2c', 'fsl,imx21-i2c'] is not valid under any of the given schemas (Possible causes of the failure): arch/arm/boot/dts/imx7d-cl-som-imx7.dt.yaml: i2c@30a20000: compatible: ['fsl,imx7d-i2c', 'fsl,imx21-i2c'] is too long Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 37859693f83f9325559d8ec980310b3a13fa5924 Author: Krzysztof Kozlowski Date: Thu Sep 17 21:13:20 2020 +0200 dt-bindings: i2c: imx: Add properties and use unevaluatedProperties Additional properties actually might appear (e.g. power-domains) so describe all typical properties, reference generic i2c schema and use unevaluatedProperties to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: i2c@30a20000: '#address-cells', '#size-cells', 'pmic@25' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 755f6292e3fae4a08ce3d238c9508b84a73ac47d Author: Krzysztof Kozlowski Date: Thu Sep 17 21:13:19 2020 +0200 dt-bindings: i2c: imx-lpi2c: Fix i.MX 8QXP compatible matching The i.MX 8QXP DTSes use two compatibles so update the binding to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: i2c@5a820000: compatible: ['fsl,imx8qxp-lpi2c', 'fsl,imx7ulp-lpi2c'] is too long Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 41c38c272e2cc021c833030c3f5a97945ae2b773 Author: Krzysztof Kozlowski Date: Thu Sep 17 21:13:18 2020 +0200 dt-bindings: i2c: imx-lpi2c: Add properties and use unevaluatedProperties Additional properties actually might appear (e.g. power-domains) so describe all typical properties, reference generic i2c schema and use unevaluatedProperties to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8qxp-ai_ml.dt.yaml: i2c@5a800000: 'assigned-clock-rates', 'assigned-clocks', 'clock-names', 'power-domains' do not match any of the regexes: 'pinctrl-[0-9]+' arch/arm64/boot/dts/freescale/imx8qxp-colibri-eval-v3.dt.yaml: i2c@5a800000: 'touchscreen@2c' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit e50e4f0b85be308a01b830c5fbdffc657e1a6dd0 Author: Krzysztof Kozlowski Date: Sun Sep 20 23:12:38 2020 +0200 i2c: imx: Fix external abort on interrupt in exit paths If interrupt comes late, during probe error path or device remove (could be triggered with CONFIG_DEBUG_SHIRQ), the interrupt handler i2c_imx_isr() will access registers with the clock being disabled. This leads to external abort on non-linefetch on Toradex Colibri VF50 module (with Vybrid VF5xx): Unhandled fault: external abort on non-linefetch (0x1008) at 0x8882d003 Internal error: : 1008 [#1] ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 5.7.0 #607 Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree) (i2c_imx_isr) from [<8017009c>] (free_irq+0x25c/0x3b0) (free_irq) from [<805844ec>] (release_nodes+0x178/0x284) (release_nodes) from [<80580030>] (really_probe+0x10c/0x348) (really_probe) from [<80580380>] (driver_probe_device+0x60/0x170) (driver_probe_device) from [<80580630>] (device_driver_attach+0x58/0x60) (device_driver_attach) from [<805806bc>] (__driver_attach+0x84/0xc0) (__driver_attach) from [<8057e228>] (bus_for_each_dev+0x68/0xb4) (bus_for_each_dev) from [<8057f3ec>] (bus_add_driver+0x144/0x1ec) (bus_add_driver) from [<80581320>] (driver_register+0x78/0x110) (driver_register) from [<8010213c>] (do_one_initcall+0xa8/0x2f4) (do_one_initcall) from [<80c0100c>] (kernel_init_freeable+0x178/0x1dc) (kernel_init_freeable) from [<80807048>] (kernel_init+0x8/0x110) (kernel_init) from [<80100114>] (ret_from_fork+0x14/0x20) Additionally, the i2c_imx_isr() could wake up the wait queue (imx_i2c_struct->queue) before its initialization happens. The resource-managed framework should not be used for interrupt handling, because the resource will be released too late - after disabling clocks. The interrupt handler is not prepared for such case. Fixes: 1c4b6c3bcf30 ("i2c: imx: implement bus recovery") Cc: Signed-off-by: Krzysztof Kozlowski Acked-by: Oleksij Rempel Signed-off-by: Wolfram Sang commit 91a73027f28748e8d84549bdc3302254fba80344 Author: Krzysztof Kozlowski Date: Wed Sep 2 17:06:41 2020 +0200 i2c: rk3x: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Heiko Stuebner Signed-off-by: Wolfram Sang commit b5b5b32081cd206baa6e58cca7f112d9723785d6 Author: Khalil Blaiech Date: Tue Sep 22 18:49:37 2020 -0400 i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC Add BlueField I2C driver to offer master and slave support for Mellanox BlueField SoCs. The driver implements an SMBus adapter and interfaces to multiple busses that can be probed using both ACPI and Device Tree infrastructures. The driver supports several SMBus operations to transfer data back and forth from/to various I2C devices. It is mainly intended to be consumed by userspace tools and utilities, such as i2c-tools and decode-dimms to collect memory module information. On the other hand, the driver has a slave function to support, among others, an IPMB interface that requires both master and slave functions to handle transfers between the BlueField SoC and a board management controllers (e.g., BMC). Signed-off-by: Khalil Blaiech Reviewed-by: Vadim Pasternak Signed-off-by: Wolfram Sang commit d9becc53b3ade81e234205e1983f2a0240974f89 Author: Khalil Blaiech Date: Tue Sep 22 18:49:38 2020 -0400 dt-bindings: i2c: I2C binding for Mellanox BlueField SoC Add device tree bindings documentation for Mellanox BlueField I2C SMBus controller. Signed-off-by: Khalil Blaiech Signed-off-by: Wolfram Sang commit 668ba5e690369b38a185943e84ecb7ac04ab5d58 Merge: 9b65b020fff70 61f764c307f6b Author: Wolfram Sang Date: Sun Sep 27 15:16:24 2020 +0200 Merge tag 'at24-updates-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-5.10 at24 updates for v5.10 - add support for masking sensitive data in VAIO EEPROMs - set the nvmem TYPE to NVMEM_TYPE_EEPROM - add support for the new 'label' property - set the nvmem ID to NVMEM_DEVID_AUTO by default (for backward compatibility) or to NVMEM_DEVID_NONE if label is defined commit e5e5fcef600e94d83c6542cdcca3ab6dada95946 Author: Jim Cromie Date: Mon Sep 21 13:04:33 2020 -0600 dyndbg: use keyword, arg varnames for query term pairs optimize for clarity by replacing word[i,i+1] refs with temps. no functional changes. Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200921190433.1149521-3-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit fc9eec4d643597cf4cb2fef17d48110e677610da Author: Vadym Kochan Date: Wed Sep 23 23:44:56 2020 +0300 nvmem: core: fix possibly memleak when use nvmem_cell_info_to_nvmem_cell() Fix missing 'kfree_const(cell->name)' when call to nvmem_cell_info_to_nvmem_cell() in several places: * after nvmem_cell_info_to_nvmem_cell() failed during nvmem_add_cells() * during nvmem_device_cell_{read,write} when cell->name is kstrdup'ed() without calling kfree_const() at the end, but really there is no reason to do that 'dup, because the cell instance is allocated on the stack for some short period to be read/write without exposing it to the caller. So the new nvmem_cell_info_to_nvmem_cell_nodup() helper is introduced which is used to convert cell_info -> cell without name duplication as a lighweight version of nvmem_cell_info_to_nvmem_cell(). Fixes: e2a5402ec7c6 ("nvmem: Add nvmem_device based consumer apis.") Reviewed-by: Srinivas Kandagatla Acked-by: Srinivas Kandagatla Signed-off-by: Vadym Kochan Link: https://lore.kernel.org/r/20200923204456.14032-1-vadym.kochan@plvision.eu Signed-off-by: Greg Kroah-Hartman commit 988d0763361bb65690d60e2bc53a6b72777040c3 Author: Tetsuo Handa Date: Sun Sep 27 20:46:30 2020 +0900 vt_ioctl: make VT_RESIZEX behave like VT_RESIZE syzbot is reporting UAF/OOB read at bit_putcs()/soft_cursor() [1][2], for vt_resizex() from ioctl(VT_RESIZEX) allows setting font height larger than actual font height calculated by con_font_set() from ioctl(PIO_FONT). Since fbcon_set_font() from con_font_set() allocates minimal amount of memory based on actual font height calculated by con_font_set(), use of vt_resizex() can cause UAF/OOB read for font data. VT_RESIZEX was introduced in Linux 1.3.3, but it is unclear that what comes to the "+ more" part, and I couldn't find a user of VT_RESIZEX. #define VT_RESIZE 0x5609 /* set kernel's idea of screensize */ #define VT_RESIZEX 0x560A /* set kernel's idea of screensize + more */ So far we are not aware of syzbot reports caused by setting non-zero value to v_vlin parameter. But given that it is possible that nobody is using VT_RESIZEX, we can try removing support for v_clin and v_vlin parameters. Therefore, this patch effectively makes VT_RESIZEX behave like VT_RESIZE, with emitting a message if somebody is still using v_clin and/or v_vlin parameters. [1] https://syzkaller.appspot.com/bug?id=32577e96d88447ded2d3b76d71254fb855245837 [2] https://syzkaller.appspot.com/bug?id=6b8355d27b2b94fb5cedf4655e3a59162d9e48e3 Reported-by: syzbot Reported-by: syzbot Signed-off-by: Tetsuo Handa Cc: stable Link: https://lore.kernel.org/r/4933b81b-9b1a-355b-df0e-9b31e8280ab9@i-love.sakura.ne.jp Signed-off-by: Greg Kroah-Hartman commit b63537020db34ac3f88086095cc49df65283fb61 Author: Qinglang Miao Date: Mon Sep 21 21:11:05 2020 +0800 serial: mvebu-uart: simplify the return expression of mvebu_uart_probe() Simplify the return expression. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200921131105.93177-1-miaoqinglang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 24c796926e2f88b383a76ddc871a7cdd62484f3a Author: Yang Yingliang Date: Sat Sep 19 14:32:40 2020 +0800 tty: serial: imx: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n aarch64-linux-gnu-ld: drivers/tty/serial/imx_earlycon.o: in function `imx_uart_console_early_write': imx_earlycon.c:(.text+0x84): undefined reference to `uart_console_write' The driver uses the uart_console_write(), but SERIAL_CORE_CONSOLE is not selected, so uart_console_write is not defined, then we get the error. Fix this by selecting SERIAL_CORE_CONSOLE. Fixes: 699cc4dfd140 ("tty: serial: imx: add imx earlycon driver") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20200919063240.2754965-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 75fc65079d8253e1c25a5f8348111a85d71e0f01 Author: Yang Yingliang Date: Sat Sep 19 14:35:35 2020 +0800 tty: hvc: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n aarch64-linux-gnu-ld: drivers/tty/hvc/hvc_dcc.o: in function `dcc_early_write': hvc_dcc.c:(.text+0x164): undefined reference to `uart_console_write' The driver uses the uart_console_write(), but SERIAL_CORE_CONSOLE is not selected, so uart_console_write is not defined, then we get the error. Fix this by selecting SERIAL_CORE_CONSOLE. Fixes: d1a1af2cdf19 ("hvc: dcc: Add earlycon support") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20200919063535.2809707-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 290ff182e92a3de286440c33990c98569ac329f4 Author: Julia Lawall Date: Sun Sep 20 13:26:13 2020 +0200 pch_uart: drop double zeroing sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(struct scatterlist),flags) ... sg_init_table(x,n) // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1600601186-7420-2-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Greg Kroah-Hartman commit 7d2bfdf1fa310728d9ce8baca3b691b4eecdeef0 Author: Lad Prabhakar Date: Wed Jul 8 18:48:25 2020 +0100 dt-bindings: serial: renesas, hscif: Document r8a774e1 bindings RZ/G2H (R8A774E1) SoC also has the R-Car gen3 compatible HSCIF ports, so document the SoC specific bindings. Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594230511-24790-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit c8d55a22bc54e9b91f8d37feaa154313d3798847 Author: Lad Prabhakar Date: Wed Jul 8 18:48:24 2020 +0100 dt-bindings: serial: renesas, scif: Document r8a774e1 bindings RZ/G2H (R8A774E1) SoC also has the R-Car gen3 compatible SCIF ports, so document the SoC specific bindings. Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594230511-24790-2-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 925b68822397eedc3b82d8c36929cec9cee26ec1 Author: Pujin Shi Date: Sun Sep 27 17:22:05 2020 +0800 MIPS: idle: Add prototype for function check_wait This commit adds a prototype to fix warning at W=1: arch/mips/kernel/idle.c:126:13: error: no previous prototype for 'check_wait' [-Werror=missing-prototypes] Signed-off-by: Pujin Shi Signed-off-by: Thomas Bogendoerfer commit eca1d82ea858044a27fa95c498cc0835a0b2e17a Author: Michael Straube Date: Sun Sep 27 10:35:35 2020 +0200 staging: rtl8188eu: Reapply "staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames" Commit 515ce733e86e ("staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames") was reverted because it caused scheduling while atomic bugs and hard freezes. Experimentation showed that there were no freezes and no BUG messages logged when lib80211_get_crypto_ops() was called directly rather than indirectly through try_then_request_module(). Reapply "staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames" with resolved revert conflicts and replace try_then_request_module() with direct call to lib80211_get_crypto_ops(). Original commit message: Put data to skb, decrypt with lib80211_crypt_ccmp, and place back to tx buffer. Cc: Ivan Safonov Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200927083535.2895-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c0c8db7bc95397f32fe60ff8b07c746a69fb22de Author: Neil Armstrong Date: Wed Sep 23 18:09:10 2020 +0200 media: MAINTAINERS: remove Maxime Jourdan as maintainer of Amlogic VDEC Maxime is no more a BayLibre employee, and his e-mail address is now invalid. I'll be happy to add him back using another e-mail address if he wants to continue maintaining this driver. Signed-off-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7eba47ab7a310ed845accab6e772d0364d75948f Author: Dafna Hirschfeld Date: Tue Sep 22 13:34:02 2020 +0200 media: staging: rkisp1: cap: protect access to buf with the spin lock The function 'rkisp1_stream_start' calls 'rkisp1_set_next_buf' which access the buffers, so the call should be protected by taking the cap->buf.lock. After this patch, all locks are reviewed and commented so remove the TODO item "review and comment every lock" Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1d5099152b0ad66b66848189c070e2fca349beaf Author: Dafna Hirschfeld Date: Tue Sep 22 13:34:01 2020 +0200 media: staging: rkisp1: use the right variants of spin_lock When locking, use either 'spin_lock' or 'spin_lock_irq' according to the context. There is nowhere need to use 'spin_lock_irqsave'. Outside of irq context, always use 'spin_lock_irq' to be on the safe side. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 816b07b6c1cdfc6b17106b5896be2fa3dfc18173 Author: Dafna Hirschfeld Date: Tue Sep 22 13:34:00 2020 +0200 media: staging: rkisp1: params: no need to lock default config In the function 'rkisp1_params_config_parameter' the lock is taken while applying the default config. But the lock only needs to protect the buffers list and the 'is_streaming' field, so move the locking to lock only what is needed. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit acb00111e906be800cf4b26625e1e0e42d123289 Author: Dafna Hirschfeld Date: Tue Sep 22 13:33:59 2020 +0200 media: staging: rkisp1: stats: protect write to 'is_streaming' in start_streaming cb The field stats->is_streaming is written in 'start_streaming' callback without the stats->lock protection. The isr might run together with the callback so 'spin_lock_irq' should be used. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dfc53baae3c6a165a35735b789e3e083786271d6 Author: Joseph Salisbury Date: Sat Sep 26 07:26:26 2020 -0700 x86/hyperv: Remove aliases with X64 in their name In the architecture independent version of hyperv-tlfs.h, commit c55a844f46f958b removed the "X64" in the symbol names so they would make sense for both x86 and ARM64. That commit added aliases with the "X64" in the x86 version of hyperv-tlfs.h so that existing x86 code would continue to compile. As a cleanup, update the x86 code to use the symbols without the "X64", then remove the aliases. There's no functional change. Signed-off-by: Joseph Salisbury Signed-off-by: Thomas Gleixner Reviewed-by: Michael Kelley Acked-by: Paolo Bonzini Link: https://lore.kernel.org/r/1601130386-11111-1-git-send-email-jsalisbury@linux.microsoft.com commit 9de6144926fea3526fac2a08f63af9a4bc678e36 Author: Dafna Hirschfeld Date: Tue Sep 22 13:33:58 2020 +0200 media: staging: rkisp1: isp: don't enable signal RKISP1_CIF_ISP_FRAME_IN The signal RKISP1_CIF_ISP_FRAME_IN is not used in the isr so there is no need to enable it. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8524fa22fd2f49ca39834fe93c952ddac1c43750 Author: Dafna Hirschfeld Date: Tue Sep 22 13:33:57 2020 +0200 media: staging: rkisp1: isp: add a warning and debugfs var for irq delay The signal RKISP1_CIF_ISP_FRAME is set when the ISP completes outputting the frame to the next block in the pipeline. In order to keep buffer synchronization we assume that the RKISP1_CIF_ISP_V_START signal never arrives together with the RKISP1_CIF_ISP_FRAME signal. In case those signals arrive together then the code is not able to tell if the RKISP1_CIF_ISP_FRAME signal relates to the frame of the current v-start or the previous. This patch adds a WARN_ONCE and a debugfs var to catch it. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 21f4417263b6c87662dc7610ab0d88d23a70a90e Author: Dafna Hirschfeld Date: Tue Sep 22 13:33:56 2020 +0200 media: staging: rkisp1: remove atomic operations for frame sequence The isp.frame_sequence is now read only from the irq handlers that are all fired from the same interrupt, so there is not need for atomic operation. In addition, the frame seq incrementation is moved from rkisp1_isp_queue_event_sof to rkisp1_isp_isr to make the code clearer and the incorrect inline comment is removed. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5f1d4b076828d803c9e7dd536e0f4a8e1b1f6938 Author: Dafna Hirschfeld Date: Tue Sep 22 13:33:55 2020 +0200 media: staging: rkisp1: params: set vb.sequence to be the isp's frame_sequence + 1 The params isr is called when the ISP finishes processing a frame (RKISP1_CIF_ISP_FRAME). Configurations performed in the params isr will be applied on the next frame. Since frame_sequence is updated on the vertical sync signal, we should use frame_sequence + 1 as the vb.sequence of the params buffer to indicate to userspace on which frame these parameters are being applied. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 98c437e3b960a2c27c892157ba088e17276d471a Author: Dafna Hirschfeld Date: Tue Sep 22 13:33:54 2020 +0200 media: staging: rkisp1: params: avoid using buffer if params is not streaming Currently, the first buffer queued in the params node is returned immediately to userspace and a copy of it is saved in the field 'cur_params'. The copy is later used for the first configuration when the stream is initiated by one of selfpath/mainpath capture nodes. There are 3 problems with this implementation: - The first params buffer is applied and returned to userspace even if userspace never calls to streamon on the params node. - If the first params buffer is queued after the stream started on the params node then it will return to userspace but will never be used. - The frame_sequence of the first buffer is set to -1 if the main/selfpath did not start streaming. A correct implementation is to apply the first params buffer when stream is started from mainpath/selfpath and only if params is also streaming. The patch adds a new function 'rkisp1_params_apply_params_cfg' which takes a buffer from the buffers queue, apply it and returns it to userspace. The function is called from the irq handler and when main/selfpath stream starts - in the function 'rkisp1_params_config_parameter' Also remove the fields 'cur_params', 'is_first_params' which are no more needed. Signed-off-by: Dafna Hirschfeld Reported-by: kernel test robot Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cd5257ebf91875676283628c56b394486ca4e1af Author: Dafna Hirschfeld Date: Tue Sep 22 13:33:53 2020 +0200 media: staging: rkisp1: params: use the new effect value in cproc config The cproc (color processing) configuration needs to know if an image effect is configured. The code uses the image effect in 'cur_params' which is the first params buffer queued in the stream. This is the wrong place to read the value. The value should be taken from the current params buffer. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 93aaba85bc2be25d7b577931a14d8f54ba4386ee Author: Dafna Hirschfeld Date: Tue Sep 22 13:33:52 2020 +0200 media: staging: rkisp1: params: in the isr, return if buffer list is empty Currently the code in the isr checks if the buffer list is not empty before referencing a buffer and then check again if the buffer is not NULL. Instead we can save one 'if' statement by returning if the buffers list is empty. Also remove non-helpful inline doc 'get one empty buffer' Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b1b2715e8d616bab68ed4e22b6617601105f2947 Author: Dafna Hirschfeld Date: Tue Sep 22 13:33:51 2020 +0200 media: staging: rkisp1: params: upon stream stop, iterate a local list to return the buffers The code in '.stop_streaming' callback releases and acquire the lock at each iteration when returning the buffers. Holding the lock disables interrupts so it should be minimized. To make the code cleaner and still minimize holding the lock, the buffer list is first moved to a local list and then can be iterated without the lock. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f6f7d89a1307c6f77824ac57a0d4fc970a7c0862 Author: Luca Ceresoli Date: Mon Sep 21 22:21:34 2020 +0200 media: docs: v4l2-subdev: move calling ops to a subsection Documentation on how to call the subdev ops is currently in the middle of synchronous and asynchronous registration. Move it to a dedicated subsection after the registration methods. Also move the final paragraph "The advantage of using v4l2_subdev..." to the beginning of the new section as it has an introductory content. [hverkuil: correct accidental deletion of the last part of a sentence] Suggested-by: Jacopo Mondi Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 976ed673571086b7f6b05f3fdfa9152e50a2c093 Author: Luca Ceresoli Date: Mon Sep 21 22:21:33 2020 +0200 media: docs: v4l2-subdev: move "Subdev registration" to a subsection The subdev registration topic is pretty lengthy, and takes more than half of the "V4L2 sub-devices" section. Help readers in finding their way through the document by dedicating a subsection to "Subdev registration". Each of the two registration methods takes many paragraphs, but since adding a subsubsection would be overkill, just emphasize them in bold. Reviewed-by: Jacopo Mondi Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c1ebbe52bd6229c554a8e7f6a17e03a929c95999 Author: Luca Ceresoli Date: Mon Sep 21 22:21:32 2020 +0200 media: docs: v4l2-subdev: fix typo Fix "Helper functions exists" -> "Helper functions exist". Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6cab05cf699062a61ae56e6c8e28f15d176ab42d Author: Luca Ceresoli Date: Mon Sep 21 22:21:31 2020 +0200 media: docs: v4l2-subdev: fix typo Fix "will to" -> "will do". Reviewed-by: Jacopo Mondi Signed-off-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8cc72b9c706bc30e5314130bedc07e40497e9f67 Author: Julia Lawall Date: Sun Sep 20 13:26:24 2020 +0200 media: saa7146: drop double zeroing sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(struct scatterlist),flags) ... sg_init_table(x,n) // Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b28e32798c78a346788d412f1958f36bb760ec03 Author: Pavel Machek Date: Sun Sep 20 11:01:37 2020 +0200 media: firewire: fix memory leak Fix memory leak in node_probe. Signed-off-by: Pavel Machek (CIP) Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8c3e0f67df6c9bcb683e7417faffe74f345da77d Author: Niklas Söderlund Date: Wed Sep 16 01:01:40 2020 +0200 media: rcar-vin: Extend RAW8 support to all RGB layouts Extend the list of supported formats to include all RGB layouts of RAW8. Signed-off-by: Niklas Söderlund Reviewed-by: Ulrich Hecht Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d9cb346055141b51df5b25088b142fab5aedabea Author: Niklas Söderlund Date: Wed Sep 16 01:01:39 2020 +0200 media: rcar-csi2: Extend RAW8 support to all RGB layouts Extend the list of supported formats to include all RGB layouts of RAW8. Signed-off-by: Niklas Söderlund Reviewed-by: Ulrich Hecht Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3fa320c62e7199585c0fa0acae43dee4b03c3417 Author: Joakim Zhang Date: Tue Sep 22 21:08:06 2020 +0200 media: bindings: media: gpio-ir-receiver: add linux,autosuspend-period property Add linux,autosuspend-period property for gpio ir receiver. Some cpuidle systems wake from idle may take a bit long time, for such case, need disable cpuidle temporarily. Signed-off-by: Joakim Zhang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit ff1c9223b7b8cb3a7e6d06a1997e91a0368bbd02 Author: Joakim Zhang Date: Tue Sep 22 21:08:07 2020 +0200 media: rc: gpio-ir-recv: add QoS support for cpuidle system GPIO IR receive is much rely on interrupt response, uneven interrupt latency will lead to incorrect timing, so the decoder fails to decode it. The issue is particularly acute on some systems which support cpuidle, not all, dynamically disable and enable cpuidle can solve this problem to a great extent. However, there is a downside to this approach, the measurement of header on the first frame may incorrect. Test on i.MX8M serials, when enable cpuidle, interrupt latency could be about 500us. With this patch: 1. has no side effect on non-cpuidle system, even runtime pm api won't be invoked to avoid a bunch of pm busy work for devices that do not need it, including spinlocks, ktime, etc. 2. latency is still much longer for the first gpio interrupt on cpuidle system, so the first frame may not be decoded. Generally, RC would transmit multiple frames at once press, we can sacrifice the first frame. 3. add "linux,autosuspend-period" property in device tree if you also suffer this cpuidle issue. Signed-off-by: Joakim Zhang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 2d4ffef1de00c883649b934bcc20109e28d2c9b4 Author: Rikard Falkeborn Date: Tue Sep 22 00:13:43 2020 +0200 media: dvb-frontends: tda18271c2dd: Constify static structs Constify a number of static structs that were not modified. In order to be able to do that, const input arguments to a couple of functions that not modify their argument. This allows the compiler to put them in read-only memory, resulting in about 6k memory being read-only, and the resulting module is 400 bytes smaller. Before: text data bss dec hex filename 15492 6873 0 22365 575d drivers/media/dvb-frontends/tda18271c2dd.ko After: text data bss dec hex filename 21021 897 0 21918 559e drivers/media/dvb-frontends/tda18271c2dd.ko Signed-off-by: Rikard Falkeborn Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit cf580e11fb6c94bc995dddc55489c65d0499cdd9 Author: Qinglang Miao Date: Mon Sep 14 08:15:13 2020 +0200 media: flexcop-usb: remove needless check before usb_free_coherent() usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Qinglang Miao Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d725d20e81c2adc2d3c956ad8aa420b7705532a8 Author: Oliver Neukum Date: Thu Sep 24 13:37:40 2020 +0200 media: flexcop-usb: sanity checking of endpoint type Make sure the endpoint is ISOC in and do not hard code USB_DIR_IN. Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit e8897acb898d4d345edab76bbd5e50b60580909a Author: Vaibhav Gupta Date: Sun Aug 30 11:44:14 2020 +0200 media: netup_unidvb: drop initialization of PM pointers The .suspend() and .resume() callbacks are not defined for this driver. Thus, just the unlisting of PM pointers in the struct initializer will make no change in its behavior. Still unlisting is necessary so as to get rid of .suspend and .resume pointers as they are part of the legacy framework and should not be used in the driver code explicitly. Signed-off-by: Vaibhav Gupta Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit a8be80053ea74bd9c3f9a3810e93b802236d6498 Author: Oliver Neukum Date: Wed Sep 16 15:50:51 2020 +0200 media: ati_remote: sanity check for both endpoints If you do sanity checks, you should do them for both endpoints. Hence introduce checking for endpoint type for the output endpoint, too. Reported-by: syzbot+998261c2ae5932458f6c@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit ce5d72b6f5a0b694b19cd812788d8e1ea49aea21 Author: Evgeny Novikov Date: Mon Sep 21 14:30:06 2020 +0200 media: dvb-frontends: rtl2832_sdr: set error code in probe If rtl2832_sdr_probe() encounters an unsupported tuner it cleans up everything and returns 0. This can result in various bad things later. The patch sets the error code on the corresponding path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 3b17c8f9a4b680b938b0bf51db38bb510e12555e Merge: b952caf2d5ca8 549437a43f45c Author: Thomas Gleixner Date: Sun Sep 27 11:21:20 2020 +0200 Merge tag 'timers-v5.10' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clocksource/event updates from Daniel Lezcano: - Add DT binding documentation to support the r8a7742 and r8a774e1 platforms (Lad Prabhakar) - Add sp804 variant support for the Hisilicon platforms (Kefeng Wang) commit 82d70627e94a04a8de0df5b9f417da3841effbd2 Author: Fabien Parent Date: Mon Sep 7 13:02:21 2020 +0200 pinctrl: mediatek: Add MT8167 Pinctrl driver This commit adds the pinctrl driver for the MediaTek's MT8167 SoC. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20200907110221.1691168-2-fparent@baylibre.com Signed-off-by: Linus Walleij commit 8c608272ec3e6926ae2e258e74e84777d932ddd6 Author: Nicolas Dufresne Date: Fri Sep 18 02:27:51 2020 +0200 media: cedrus: Propagate OUTPUT resolution to CAPTURE As per spec, the CAPTURE resolution should be automatically set based on the OUTPUT resolution. This patch properly propagate width/height to the capture when the OUTPUT format is set and override the user provided width/height with configured OUTPUT resolution when the CAPTURE fmt is updated. This also prevents userspace from selecting a CAPTURE resolution that is too small, avoiding kernel oops. Signed-off-by: Nicolas Dufresne Reviewed-by: Ezequiel Garcia Acked-by: Paul Kocialkowski Tested-by: Ondrej Jirman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f8c737ed2c1fa13ed606f2c32f7ce95688fa1d9 Author: Dafna Hirschfeld Date: Thu Sep 17 17:04:08 2020 +0200 media: MAINTAINERS: add documentation files for rkisp1 Add the files: Documentation/admin-guide/media/rkisp1.rst Documentation/userspace-api/media/v4l/pixfmt-meta-rkisp1.rst to the Rockchip ISP driver entry in the MAINTAINERS file. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5cc0ebb218e87ebca783c16c453b3ea0816ddb31 Author: Dafna Hirschfeld Date: Tue Aug 18 12:27:03 2020 +0200 media: admin-guide: add documentation file rkisp1.rst Add the file 'rkisp1.rst' that documents the rkisp1 driver. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3c41f0609e63dbef49435263198cb8b5c5d9dede Author: Fabien Parent Date: Mon Sep 7 13:02:20 2020 +0200 pinctrl: mt65xx: add OF bindings for MT8167 Add binding documentation of pinctrl-mt65xx for MT8167 SoC. Signed-off-by: Fabien Parent Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200907110221.1691168-1-fparent@baylibre.com Signed-off-by: Linus Walleij commit 409e975e681c9712f3fdf56358210e62a6d48f3c Author: Dafna Hirschfeld Date: Tue Aug 18 12:27:02 2020 +0200 media: pixfmt-meta-rkisp1.rst: add description of rkisp1 metadata formats in pixfmt-meta-rkisp1.rst The metadata formats V4L2_META_FMT_RK_ISP1_PARAMS, V4L2_META_FMT_RK_ISP1_STAT_3A are currently described in two files under drivers/staging/media/rkisp1/Documentation/media/uapi/v4l This patch moves the description to one file: Documentation/userspace-api/media/v4l/pixfmt-meta-rkisp1.rst The patch also extends the description and adds the rst file to toctree. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0ec314fff0d597d64227be0640e00c7ea05b9282 Author: Dafna Hirschfeld Date: Tue Sep 1 13:16:12 2020 +0200 media: staging: rkisp1: fix configuration for GREY pixelformat This patch changes the device configuration to support capture of V4L2_PIX_FMT_GREY video. The 'write_format' field of the format description should be planar. Also the array 'pixm->plane_fmt' that describes the planes should be memset to 0 before filling it since the the cb, cr planes should be 0. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6803a9e0e1e43e9eb2f473d1c4b5f51837610754 Author: Dafna Hirschfeld Date: Tue Sep 1 13:16:11 2020 +0200 media: staging: rkisp1: cap: simplify link validation by comparing media bus code The capture has a mapping of the mbus code needed for each pixelformat. This can be used to simplify the link validation by comparing the mbus code in the capture with the code in the resizer. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 251b6eebb6c4907659262d069341a31762efc761 Author: Dafna Hirschfeld Date: Tue Sep 1 13:16:10 2020 +0200 media: staging: rkisp1: rsz: Add support to more YUV encoded mbus codes on src pad Add support to more YUV encoded media bus formats on the resizer's source pad. The patch defines an array rkisp1_rsz_yuv_formats[] with the list of supported YUV media bus formats and their {hv}div values. The {hv}div are used in the function 'rkisp1_rsz_config' instead of the macros RKISP1_MBUS_FMT_(HV)DIV, and instead of checking the capture format. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ca5331cf9d78c968e5cf28e4131765f869840817 Author: Dafna Hirschfeld Date: Tue Sep 1 13:16:09 2020 +0200 media: staging: rkisp1: rsz: enumerate the formats on the src pad according to the capture Currently the resizer outputs the same media bus format as the input. This is wrong since the resizer is also used to downscale YUV formats. This patch changes the enumeration of the supported formats. The supported formats on the sink pad should be taken from the isp entity and the supported formats on the source pad should be taken from the capture entity. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9a8e67b8bbb2c080718222b766e2aeeb1a29a4fa Author: Dafna Hirschfeld Date: Tue Sep 1 13:16:08 2020 +0200 media: staging: rkisp1: add a helper function to enumerate supported mbus formats on capture Add a function 'rkisp1_cap_enum_mbus_codes' that receive a pointer to 'v4l2_subdev_mbus_code_enum' and returns the next supported mbus format of the capture. The function assumes that pixel formats with identical 'mbus' are grouped together in the hardcoded arrays, therefore the order of the entries in the array 'rkisp1_sp_fmts' are adjusted. This function is a helper for the media bus enumeration of the source pad of the resizer entity. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5fc929ae516537720d61139df92fa89ac4989c7b Author: Dafna Hirschfeld Date: Tue Sep 1 13:16:07 2020 +0200 media: staging: rkisp1: add capability V4L2_CAP_IO_MC to capture devices The capture devices supports YUV, RGB, and Bayer formats. Adding V4L2_CAP_IO_MC capability will reflect userspace what format should be set on the resizer in order to stream each of the video formats. The patch adds a 'mbus' field to the struct 'rkisp1_capture_fmt_cfg' which maps the video format to the needed mbus format. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 692f3ccc72975b670bcde1322e1119a6655d4b3c Author: Dafna Hirschfeld Date: Tue Sep 1 13:16:06 2020 +0200 media: staging: rkisp1: don't support bayer format on selfpath resizer The selfpath capture does not support bayer formats. Therefore there is no reason to support bayer formats on the selfpath resizer. The selfpath resizer should support only MEDIA_BUS_FMT_YUYV8_2X8. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bac8bc57207cb6930c10f08fed3d6df0171f05d0 Author: Dafna Hirschfeld Date: Tue Sep 1 13:16:05 2020 +0200 media: staging: rkisp1: cap: remove unsupported format YUV444 It is not clear if the device is able to support format V4L2_PIX_FMT_YUV444M so remove it. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ef923a76c398157a74ec52bd3c81fb77bcdc7cdd Author: Paul Cercueil Date: Thu Sep 17 15:35:28 2020 +0200 MIPS: Increase range of CONFIG_FORCE_MAX_ZONEORDER There is nothing that prevents us from using lower maximum values. It's something that we actually want, when using bigger page sizes on devices with low RAM. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit a5ce852398a4efc9df4869a71ff45b9dda58882d Author: 周琰杰 (Zhou Yanjie) Date: Tue Sep 22 09:24:44 2020 +0800 MIPS: Ingenic: Fix bugs when detecting L2 cache of JZ4775 and X1000E. 1.Fix bugs when detecting ways value of JZ4775's L2 cache. 2.Fix bugs when detecting sets value and ways value of X1000E's L2 cache. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 3acb3e06baf64e289ab1ba92819c67fcd6f511a4 Author: Dafna Hirschfeld Date: Tue Sep 1 13:16:04 2020 +0200 media: staging: rkisp1: cap: remove unsupported formats For Ycbcr packed formats only YUYV can be supported by the driver. This patch removes the other formats. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 81cdedb0aaccbcd0798d6bcaad7bcc1f1b551ee6 Author: Dafna Hirschfeld Date: Tue Sep 1 13:16:03 2020 +0200 media: staging: rkisp1: cap: change RGB24 format to XBGR32 According to the TRM [1], the YUV->RGB conversion outputs RGB 888 format with 4 bytes, where the last byte is ignored, using big endian representation: |___X___|___R___|___G___|___B___| 31 24 16 8 0 Which matches format V4L2_PIX_FMT_XBGR32 in little endian representation, so replace it accordingly. "24 bit word". What it means is that 4 bytes are used with 24bit for the RGB and the last byte is ignored. This matches format V4L2_PIX_FMT_XBGR32. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a9fee3a513e560b154ccbe662faa791d5f358875 Author: 周琰杰 (Zhou Yanjie) Date: Tue Sep 22 09:24:43 2020 +0800 MIPS: Ingenic: Add system type for new Ingenic SoCs. Add JZ4775, X1000E, X2000, and X2000E system type for cat /proc/cpuinfo to give out JZ4775, X1000E, X2000 and X2000E. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 2372b506115b411c6127c94798d575e0cf5b58b6 Author: 周琰杰 (Zhou Yanjie) Date: Tue Sep 22 09:24:42 2020 +0800 dt-bindings: MIPS: Add X2000E based CU2000-Neo. Add bindings for Ingenic X2000E based board, prepare for later dts. Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Thomas Bogendoerfer commit 57cc666d36adc7b45e37ba4cd7bc4e44ec4c43d7 Author: Aditya Pakki Date: Sun Jun 14 05:58:41 2020 +0200 media: st-delta: Fix reference count leak in delta_run_work delta_run_work() calls delta_get_sync() that increments the reference counter. In case of failure, decrement the reference count by calling delta_put_autosuspend(). Signed-off-by: Aditya Pakki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6f4432bae9f2d12fc1815b5e26cc07e69bcad0df Author: Qiushi Wu Date: Sun Jun 14 05:31:06 2020 +0200 media: sti: Fix reference count leaks pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if pm_runtime_put_noidle() is not called in error handling paths. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Signed-off-by: Qiushi Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7ef64ceea0008c17e94a8a2c60c5d6d46f481996 Author: Qiushi Wu Date: Sun Jun 14 05:18:29 2020 +0200 media: exynos4-is: Fix several reference count leaks due to pm_runtime_get_sync On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Signed-off-by: Qiushi Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c47f7c779ef0458a58583f00c9ed71b7f5a4d0a2 Author: Qiushi Wu Date: Sun Jun 14 05:10:58 2020 +0200 media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Signed-off-by: Qiushi Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 64157b2cb1940449e7df2670e85781c690266588 Author: Qiushi Wu Date: Sun Jun 14 05:01:11 2020 +0200 media: exynos4-is: Fix a reference count leak pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if pm_runtime_put_noidle() is not called in error handling paths. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Signed-off-by: Qiushi Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7dae2aaaf432767ca7aa11fa84643a7c2600dbdd Author: Qiushi Wu Date: Sun Jun 14 04:56:05 2020 +0200 media: ti-vpe: Fix a missing check and reference count leak pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if pm_runtime_put_noidle() is not called in error handling paths. And also, when the call of function vpe_runtime_get() failed, we won't call vpe_runtime_put(). Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails inside vpe_runtime_get(). Fixes: 4571912743ac ("[media] v4l: ti-vpe: Add VPE mem to mem driver") Signed-off-by: Qiushi Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 88f50a05f907d96a27a9ce3cc9e8cbb91a6f0f22 Author: Qiushi Wu Date: Sun Jun 14 04:36:59 2020 +0200 media: stm32-dcmi: Fix a reference count leak Calling pm_runtime_get_sync increments the counter even in case of failure, causing incorrect ref count if pm_runtime_put is not called in error handling paths. Thus replace the jump target "err_release_buffers" by "err_pm_putw". Fixes: 152e0bf60219 ("media: stm32-dcmi: add power saving support") Signed-off-by: Qiushi Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 78741ce98c2e36188e2343434406b0e0bc50b0e7 Author: Qiushi Wu Date: Sun Jun 14 04:31:22 2020 +0200 media: s5p-mfc: Fix a reference count leak pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if pm_runtime_put_noidle() is not called in error handling paths. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Fixes: c5086f130a77 ("[media] s5p-mfc: Use clock gating only on MFC v5 hardware") Signed-off-by: Qiushi Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d0675b67b42eb4f1a840d1513b5b00f78312f833 Author: Qiushi Wu Date: Sun Jun 14 01:27:12 2020 +0200 media: camss: Fix a reference count leak. pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if PM runtime put is not called in error handling paths. Thus call pm_runtime_put_sync() if pm_runtime_get_sync() fails. Fixes: 02afa816dbbf ("media: camss: Add basic runtime PM support") Signed-off-by: Qiushi Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 63e36a381d92a9cded97e90d481ee22566557dd1 Author: Qiushi Wu Date: Sun Jun 14 01:19:44 2020 +0200 media: platform: fcp: Fix a reference count leak. pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if pm_runtime_put_noidle() is not called in error handling paths. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Fixes: 6eaafbdb668b ("[media] v4l: rcar-fcp: Keep the coding style consistent") Signed-off-by: Qiushi Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 884d638e0853c4b5f01eb6d048fc3b6239012404 Author: Qiushi Wu Date: Sun Jun 14 01:13:49 2020 +0200 media: rockchip/rga: Fix a reference count leak. pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support") Signed-off-by: Qiushi Wu Reviewed-by: Heiko Stuebner Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 410822037cc909c4bef845a71e9cac92b75591d2 Author: Qiushi Wu Date: Sun Jun 14 01:04:32 2020 +0200 media: rcar-vin: Fix a reference count leak. pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Fixes: 2a18fbec1dab ("media: rcar-vin: Move pm_runtime_{get,put} out of helpers") Signed-off-by: Qiushi Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aaffa0126a111d65f4028c503c76192d4cc93277 Author: Qiushi Wu Date: Sun Jun 14 00:30:08 2020 +0200 media: rcar-vin: Fix a reference count leak. pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Fixes: 90dedce9bc54 ("media: rcar-vin: add function to manipulate Gen3 chsel value") Signed-off-by: Qiushi Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 98fae901c8883640202802174a4bd70a1b9118bd Author: Dinghao Liu Date: Mon Jun 8 07:29:19 2020 +0200 media: vsp1: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b4630215067a411341ceeb7850b95b341eee6511 Author: Dinghao Liu Date: Mon May 25 15:02:06 2020 +0200 media: coda: Fix runtime PM imbalance in coda_probe When coda_firmware_request() returns an error code, a pairing runtime PM usage counter decrement is needed to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dafa3605fe60d5a61239d670919b2a36e712481e Author: Dinghao Liu Date: Thu May 21 15:29:33 2020 +0200 media: platform: s3c-camif: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Also, call pm_runtime_disable() when pm_runtime_get_sync() returns an error code. Signed-off-by: Dinghao Liu Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d912a1d9e9afe69c6066c1ceb6bfc09063074075 Author: Dinghao Liu Date: Thu May 21 12:05:02 2020 +0200 media: platform: sti: hva: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dbd2f2dc025f9be8ae063e4f270099677238f620 Author: Dinghao Liu Date: Thu May 21 12:00:21 2020 +0200 media: bdisp: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Reviewed-by: Fabien Dessenne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 21cc2f3f799fa228f812f7ab971fa8d43c893392 Author: Jeffle Xu Date: Thu Sep 24 09:01:22 2020 +0200 nvme-pci: allocate separate interrupt for the reserved non-polled I/O queue One queue will be reserved for non-polled IO when nvme.poll_queues is greater or equal than the number of IO queues that the nvme controller can provide. Currently the reserved queue for non-polled IO will reuse the interrupt used by admin queue in this case, e.g, vector 0. This can work and the performance may not be an issue since the admin queue is used unfrequently. However this behaviour may be inconsistent with that when nvme.poll_queues is smaller than the number of IO queues available. Thus allocate separate interrupt for this reserved queue, and thus make the behaviour consistent. Signed-off-by: Jeffle Xu [hch: minor cleanups, mostly to the pre-existing surrounding code] Signed-off-by: Christoph Hellwig commit 936fab503ff4af94f5f9c0b549f3ab4d435500ec Author: Christoph Hellwig Date: Sun Aug 30 12:00:10 2020 +0200 nvme: fix error handling in nvme_ns_report_zones nvme_submit_sync_cmd can return positive NVMe error codes in addition to the negative Linux error code, which are currently ignored. Fix this by removing __nvme_ns_report_zones and handling the errors from nvme_submit_sync_cmd in the caller instead of multiplexing the return value and the number of zones reported into a single return value. Fixes: 240e6ee272c0 ("nvme: support for zoned namespaces") Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal commit ddd3d1051797b9f907ab9799f5ba50398c530676 Author: James Smart Date: Tue Sep 22 14:54:12 2020 -0700 nvmet-fc: fix missing check for no hostport struct A hostport port pointer is allowed to be NULL as it is not allocated if the lldd does not support the new interfaces for NVME LS request support. The hostport free routine validates the handle but forgot to validate the hostport pointer. Validate the hostport pointer before using it to validate the handle. Signed-off-by: James Smart Reviewed-by: Himanshu Madhani Signed-off-by: Christoph Hellwig commit 5b3356d9da88fe6d6f3bcd8a2336d14a767f377d Author: Chaitanya Kulkarni Date: Tue Sep 22 14:17:18 2020 -0700 nvmet: add passthru ZNS support In the default passthru implementation NVMeOF target passthru ctrl is not capable of handling Zoned Namespaces (ZNS). Update the nvmet_parse_pasthru_admin_cmd() to allow NVME_ID_CNS_CS_CTRL/NVME_CIS_ZNS and NVME_ID_CNS_CS_NS/NVME_CIS_ZNS. With this addition NVMeOF Passthru allows Zoned Namespaces. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 4e683c48db018e72e81e1e0d12a5020d29be561a Author: Amit Engel Date: Wed Sep 16 20:47:20 2020 +0300 nvmet: handle keep-alive timer when kato is modified by a set features cmd A user may modify the kato by a set features cmd. To properly deal with races or a kato value of 0 (no keep alive enabled) change nvmet_set_feat_kato to first disable the timer, then set the value and then re-enable the timer. Signed-off-by: Amit Engel Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit f7790e5de92a3b88e74704a6cb2276c09c32f511 Author: Mark Wunderlich Date: Fri Aug 28 01:00:53 2020 +0000 nvmet-tcp: have queue io_work context run on sock incoming cpu No real good need to spread queues artificially. Usually the target will serve multiple hosts, and it's better to run on the socket incoming cpu for better affinitization rather than spread queues on all online cpus. We rely on RSS to spread the work around sufficiently. Signed-off-by: Mark Wunderlich Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 0b85f59d30b91bd2b93ea7ef0816a4b7e7039e8c Author: Andy Shevchenko Date: Tue Aug 18 11:35:30 2020 +0300 nvme-pci: Move enumeration by class to be last in the table It's unusual that we have enumeration by class in the middle of the table. It might potentially be problematic in the future if we add another entry after it. So, move class matching entry to be the last in the ID table. Signed-off-by: Andy Shevchenko Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 1cf7a12e09aa48512404bf3f0f429b73182ce793 Author: Chaitanya Kulkarni Date: Tue Sep 22 14:05:29 2020 -0700 nvme: use an xarray to lookup the Commands Supported and Effects log When using linked list we have to open code the locking, search, and destroy operations with the loops even if data structure doesn't fall into the fast path. One of the main advantage of having XArray to store, search, and remove items is that it handles all the locking by itself, avoids the loops when using linked lists, provides clear API to replace the linked list's search and destroy loops. This patch replaces the ctrl->cel list with XArray and removes :- a. Extra code needed for the linked list for ctrl->cel item management such as nvme_find_cel(). b. Destroy loop in the nvme_free_ctrl(). c. Explicit insertion locking in the nvme_get_effects_log(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit b2702aaaa45c2d1028bc8c51b49106041be7aae5 Author: Chaitanya Kulkarni Date: Wed Sep 16 18:11:02 2020 -0700 nvme: lift the file open code from nvme_ctrl_get_by_path Lift opening the file open/close code from nvme_ctrl_get_by_path into the caller, just keeping a simple nvme_ctrl_from_file() helper. Signed-off-by: Chaitanya Kulkarni [hch: refactored a bit, split the bug fixes into a separate prep patch] Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe commit f2d077ff1b5c17008cff5dc27e7356a694e55462 Author: Christoph Hellwig Date: Sat Sep 26 09:04:01 2020 +0200 fs: remove KSTAT_QUERY_FLAGS KSTAT_QUERY_FLAGS expands to AT_STATX_SYNC_TYPE, which itself already is a mask. Remove the double name, especially given that the prefix is a little confusing vs the normal AT_* flags. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit b3f0515004a5ee41d65218303804bd57fdda027e Author: Christoph Hellwig Date: Sat Sep 26 09:04:00 2020 +0200 fs: remove vfs_stat_set_lookup_flags The function really obsfucates checking for valid flags and setting the lookup flags. The fact that it returns -EINVAL through and unsigned return value, which is then used as boolean really doesn't help either. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 09f1bde4017e9c34749da2918b3926799c77bce8 Author: Christoph Hellwig Date: Sat Sep 26 09:03:59 2020 +0200 fs: move vfs_fstatat out of line This allows to keep vfs_statx static in fs/stat.c to prepare for the following changes. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 0b2c6693b4220595e9cff95d829d5d5bc5d544dc Author: Christoph Hellwig Date: Sat Sep 26 09:03:58 2020 +0200 fs: implement vfs_stat and vfs_lstat in terms of vfs_fstatat Go through vfs_fstatat instead of duplicating the *stat to statx mapping three times. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit da9aa5d96bfe49e903ce2bc01cfb8a776c2619e9 Author: Christoph Hellwig Date: Sat Sep 26 09:03:57 2020 +0200 fs: remove vfs_statx_fd vfs_statx_fd is only used to implement vfs_fstat. Remove vfs_statx_fd and just implement vfs_fstat directly. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 090bc03bc9387b135307dae69a3242173d86de8d Author: Jakub Kicinski Date: Fri Sep 25 18:19:13 2020 -0700 netdevsim: fix duplicated debugfs directory The "ethtool" debugfs directory holds per-netdev knobs, so move it from the device instance directory to the port directory. This fixes the following warning when creating multiple ports: debugfs: Directory 'ethtool' with parent 'netdevsim1' already present! Fixes: ff1f7c17fb20 ("netdevsim: add pause frame stats") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit dfa6692104fa170fa3e97d696c6f5e9370e3c520 Merge: 435be28b0789b 300fd579b2e86 Author: David S. Miller Date: Sat Sep 26 14:17:59 2020 -0700 Merge branch 'Generic-adjustment-for-flow-dissector-in-DSA' Vladimir Oltean says: ==================== Generic adjustment for flow dissector in DSA This is the v2 of a series initially submitted in May: https://www.spinics.net/lists/netdev/msg651866.html The end goal is to get rid of the unintuitive code for the flow dissector that currently exists in the taggers. It can all be replaced by a single, common function. Some background work needs to be done for that. Especially the ocelot driver poses some problems, since it has a different tag length between RX and TX, and I didn't want to make DSA aware of that, since I could instead make the tag lengths equal. Changes in v3: - Added an optimization (08/15) that makes the generic case not need to call the .flow_dissect function pointer. Basically .flow_dissect now currently only exists for sja1105. - Moved the .promisc_on_master property to the tagger structure. - Added the .tail_tag property to the tagger structure. - Disabled "suppresscc = all" from my .gitconfig. ==================== Signed-off-by: David S. Miller commit 300fd579b2e8608586b002207e906ac95c74b911 Author: Vladimir Oltean Date: Sat Sep 26 22:32:15 2020 +0300 net: dsa: tag_rtl4_a: use the generic flow dissector procedure Remove the .flow_dissect procedure, so the flow dissector will call the generic variant which works for this tagging protocol. Cc: Linus Walleij Cc: DENG Qingfang Cc: Mauri Sandberg Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e665297983f140f3a80d5de84aed4897cdc94cd1 Author: Vladimir Oltean Date: Sat Sep 26 22:32:14 2020 +0300 net: dsa: tag_sja1105: use a custom flow dissector procedure The sja1105 is a bit of a special snowflake, in that not all frames are transmitted/received in the same way. L2 link-local frames are received with the source port/switch ID information put in the destination MAC address. For the rest, a tag_8021q header is used. So only the latter frames displace the rest of the headers and need to use the generic flow dissector procedure. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6b04f171dcbd6932019eafbb08c8faecde8b048d Author: Vladimir Oltean Date: Sat Sep 26 22:32:13 2020 +0300 net: dsa: tag_qca: use the generic flow dissector procedure Remove the .flow_dissect procedure, so the flow dissector will call the generic variant which works for this tagging protocol. Cc: John Crispin Cc: Alexander Lobakin Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit b1af3656371393e338a47ebacaee1fc2572b003b Author: Vladimir Oltean Date: Sat Sep 26 22:32:12 2020 +0300 net: dsa: tag_mtk: use the generic flow dissector procedure Remove the .flow_dissect procedure, so the flow dissector will call the generic variant which works for this tagging protocol. Cc: DENG Qingfang Cc: Sean Wang Cc: John Crispin Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 742b2e1951d7553ebbfd3a89e87dfc74b61fbd7b Author: Vladimir Oltean Date: Sat Sep 26 22:32:11 2020 +0300 net: dsa: tag_edsa: use the generic flow dissector procedure Remove the .flow_dissect procedure, so the flow dissector will call the generic variant which works for this tagging protocol. Cc: Andrew Lunn Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 11f5011189db4fb670d5043df299af4e26f2d7c7 Author: Vladimir Oltean Date: Sat Sep 26 22:32:10 2020 +0300 net: dsa: tag_dsa: use the generic flow dissector procedure Remove the .flow_dissect procedure, so the flow dissector will call the generic variant which works for this tagging protocol. Cc: Andrew Lunn Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f569ad52570eca01a8c57a04719b1d71085f1363 Author: Vladimir Oltean Date: Sat Sep 26 22:32:09 2020 +0300 net: dsa: tag_brcm: use generic flow dissector procedure There are 2 Broadcom tags in use, one places the DSA tag before the Ethernet destination MAC address, and the other before the EtherType. Nonetheless, both displace the rest of the headers, so this tagger can use the generic flow dissector procedure which accounts for that. The ASCII art drawing is a good reference though, so keep it but move it somewhere else. Cc: Florian Fainelli Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 54fec33582aa60a76902dbe24ac8c1b5650e8e63 Author: Vladimir Oltean Date: Sat Sep 26 22:32:08 2020 +0300 net: flow_dissector: avoid indirect call to DSA .flow_dissect for generic case With the recent mitigations against speculative execution exploits, indirect function calls are more expensive and it would be good to avoid them where possible. In the case of DSA, most switch taggers will shift the EtherType and next headers by a fixed amount equal to that tag's length in bytes. So we can use a generic procedure to determine that, without calling into custom tagger code. However we still leave the flow_dissect method inside struct dsa_device_ops as an override for the generic function. Suggested-by: Andrew Lunn Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7a6ffe764be35af0527d8cfd047945e8f8797ddf Author: Vladimir Oltean Date: Sat Sep 26 22:32:07 2020 +0300 net: dsa: point out the tail taggers The Marvell 88E6060 uses tag_trailer.c and the KSZ8795, KSZ9477 and KSZ9893 switches also use tail tags. Tell that to the DSA core, since this makes a difference for the flow dissector. Most switches break the parsing of frame headers, but these ones don't, so no flow dissector adjustment needs to be done for them. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9790cf20a8c4bb8d774797c238fa3643f4336e46 Author: Vladimir Oltean Date: Sat Sep 26 22:32:06 2020 +0300 net: dsa: add a generic procedure for the flow dissector For all DSA formats that don't use tail tags, it looks like behind the obscure number crunching they're all doing the same thing: locating the real EtherType behind the DSA tag. Nonetheless, this is not immediately obvious, so create a generic helper for those DSA taggers that put the header before the EtherType. Another assumption for the generic function is that the DSA tags are of equal length on RX and on TX. Prior to the previous patch, this was not true for ocelot and for gswip. The problem was resolved for ocelot, but for gswip it still remains, so that can't use this helper yet. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 2e8cb1b3db384382c84cc5f765c821454640aac1 Author: Vladimir Oltean Date: Sat Sep 26 22:32:05 2020 +0300 net: dsa: make the .flow_dissect tagger callback return void There is no tagger that returns anything other than zero, so just change the return type appropriately. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5124197ce58b5706bb60c2ecb3b79f4dfabab6e1 Author: Vladimir Oltean Date: Sat Sep 26 22:32:04 2020 +0300 net: dsa: tag_ocelot: use a short prefix on both ingress and egress There are 2 goals that we follow: - Reduce the header size - Make the header size equal between RX and TX The issue that required long prefix on RX was the fact that the ocelot DSA tag, being put before Ethernet as it is, would overlap with the area that a DSA master uses for RX filtering (destination MAC address mainly). Now that we can ask DSA to put the master in promiscuous mode, in theory we could remove the prefix altogether and call it a day, but it looks like we can't. Using no prefix on ingress, some packets (such as ICMP) would be received, while others (such as PTP) would not be received. This is because the DSA master we use (enetc) triggers parse errors ("MAC rx frame errors") presumably because it sees Ethernet frames with a bad length. And indeed, when using no prefix, the EtherType (bytes 12-13 of the frame, bits 96-111) falls over the REW_VAL field from the extraction header, aka the PTP timestamp. When turning the short (32-bit) prefix on, the EtherType overlaps with bits 64-79 of the extraction header, which are a reserved area transmitted as zero by the switch. The packets are not dropped by the DSA master with a short prefix. Actually, the frames look like this in tcpdump (below is a PTP frame, with an extra dsa_8021q tag - dadb 0482 - added by a downstream sja1105). 89:0c:a9:f2:01:00 > 88:80:00:0a:00:1d, 802.3, length 0: LLC, \ dsap Unknown (0x10) Individual, ssap ProWay NM (0x0e) Response, \ ctrl 0x0004: Information, send seq 2, rcv seq 0, \ Flags [Response], length 78 0x0000: 8880 000a 001d 890c a9f2 0100 0000 100f ................ 0x0010: 0400 0000 0180 c200 000e 001f 7b63 0248 ............{c.H 0x0020: dadb 0482 88f7 1202 0036 0000 0000 0000 .........6...... 0x0030: 0000 0000 0000 0000 0000 001f 7bff fe63 ............{..c 0x0040: 0248 0001 1f81 0500 0000 0000 0000 0000 .H.............. 0x0050: 0000 0000 0000 0000 0000 0000 ............ So the short prefix is our new default: we've shortened our RX frames by 12 octets, increased TX by 4, and headers are now equal between RX and TX. Note that we still need promiscuous mode for the DSA master to not drop it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 707091eb26338c0d621171a8332fed11257a63f7 Author: Vladimir Oltean Date: Sat Sep 26 22:32:03 2020 +0300 net: dsa: tag_sja1105: request promiscuous mode for master Currently PTP is broken when ports are in standalone mode (the tagger keeps printing this message): sja1105 spi0.1: Expected meta frame, is 01-80-c2-00-00-0e in the DSA master multicast filter? Sure, one might say "simply add 01-80-c2-00-00-0e to the master's RX filter" but things become more complicated because: - Actually all frames in the 01-80-c2-xx-xx-xx and 01-1b-19-xx-xx-xx range are trapped to the CPU automatically - The switch mangles bytes 3 and 4 of the MAC address via the incl_srcpt ("include source port [in the DMAC]") option, which is how source port and switch id identification is done for link-local traffic on RX. But this means that an address installed to the RX filter would, at the end of the day, not correspond to the final address seen by the DSA master. Assume RX filtering lists on DSA masters are typically too small to include all necessary addresses for PTP to work properly on sja1105, and just request promiscuous mode unconditionally. Just an example: Assuming the following addresses are trapped to the CPU: 01-80-c2-00-00-00 to 01-80-c2-00-00-ff 01-1b-19-00-00-00 to 01-1b-19-00-00-ff These are 512 addresses. Now let's say this is a board with 3 switches, and 4 ports per switch. The 512 addresses become 6144 addresses that must be managed by the DSA master's RX filtering lists. This may be refined in the future, but for now, it is simply not worth it to add the additional addresses to the master's RX filter, so simply request it to become promiscuous as soon as the driver probes. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c3975400c8014e39f7f272808377c97c906c8cee Author: Vladimir Oltean Date: Sat Sep 26 22:32:02 2020 +0300 net: dsa: allow drivers to request promiscuous mode on master Currently DSA assumes that taggers don't mess with the destination MAC address of the frames on RX. That is not always the case. Some DSA headers are placed before the Ethernet header (ocelot), and others simply mangle random bytes from the destination MAC address (sja1105 with its incl_srcpt option). Currently the DSA master goes to promiscuous mode automatically when the slave devices go too (such as when enslaved to a bridge), but in standalone mode this is a problem that needs to be dealt with. So give drivers the possibility to signal that their tagging protocol will get randomly dropped otherwise, and let DSA deal with fixing that. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 2d44b097bbb9d0af0f3b94304fee4b639ab14171 Author: Vladimir Oltean Date: Sat Sep 26 22:32:01 2020 +0300 net: mscc: ocelot: move NPI port configuration to DSA Remove the ocelot_configure_cpu() function, which was in fact bringing up 2 ports: the CPU port module, which both switchdev and DSA have, and the NPI port, which only DSA has. The (non-Ethernet) CPU port module is at a fixed index in the analyzer, whereas the NPI port is selected through the "ethernet" property in the device tree. Therefore, the function to set up an NPI port is DSA-specific, so we move it there, simplifying the ocelot switch library a little bit. Cc: Horatiu Vultur Cc: Alexandre Belloni Cc: UNGLinuxDriver Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit aa78dd167e1115cc15ae87ae09e455eb0cf18ac2 Merge: 63e15ef136d31 dcca7a97c6bff Author: Olof Johansson Date: Sat Sep 26 12:56:50 2020 -0700 Merge tag 'drivers_soc_for_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into arm/drivers ARM: soc: TI driver updates for v5.10 Consist of: - Add Ring accelerator support for AM65x - Add TI PRUSS platform driver and enable it on available platforms - Extend PRUSS driver for CORECLK_MUX/IEPCLK_MUX support - UDMA rx ring pair fix - Add socinfo entry for J7200 * tag 'drivers_soc_for_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: Add missing '#' to fix schema errors: soc: ti: Convert to DEFINE_SHOW_ATTRIBUTE dmaengine: ti: k3-udma-glue: Fix parameters for rx ring pair request soc: ti: k3-socinfo: Add entry for J7200 soc: ti: pruss: support CORECLK_MUX and IEPCLK_MUX dt-bindings: soc: ti: Update TI PRUSS bindings regarding clock-muxes firmware: ti_sci: allow frequency change for disabled clocks by default soc: ti: ti_sci_pm_domains: switch to use multiple genpds instead of one soc: ti: pruss: Enable support for ICSSG subsystems on K3 J721E SoCs soc: ti: pruss: Enable support for ICSSG subsystems on K3 AM65x SoCs soc: ti: pruss: Add support for PRU-ICSS subsystems on 66AK2G SoC soc: ti: pruss: Add support for PRU-ICSS subsystems on AM57xx SoCs soc: ti: pruss: Add support for PRU-ICSSs on AM437x SoCs soc: ti: pruss: Add a platform driver for PRUSS in TI SoCs dt-bindings: soc: ti: Add TI PRUSS bindings bindings: soc: ti: soc: ringacc: remove ti,dma-ring-reset-quirk soc: ti: k3: ringacc: add am65x sr2.0 support Link: https://lore.kernel.org/r/1600656828-29267-1-git-send-email-santosh.shilimkar@oracle.com Signed-off-by: Olof Johansson commit c49d6cab0d7fde39297949c4da257db69999292e Author: Marek Behún Date: Sat Sep 19 20:03:04 2020 +0200 leds: parse linux,default-trigger DT property in LED core Do the parsing of `linux,default-trigger` DT property to LED core. Currently it is done in many different drivers and the code is repeated. This patch removes the parsing from 23 drivers: an30259a, aw2013, bcm6328, bcm6358, cr0014114, el15203000, gpio, is31fl32xx, lm3532, lm36274, lm3692x, lm3697, lp50xx, lp8860, lt3593, max77650, mt6323, ns2, pm8058, pwm, syscon, tlc591xx and turris-omnia. There is one driver in drivers/input which parses this property on it's own. I shall send a separate patch there after this is applied. There are still 8 drivers that parse this property on their own because they do not pass the led_init_data structure to the registering function. I will try to refactor those in the future. Signed-off-by: Marek Behún Signed-off-by: Pavel Machek commit 006631969880fdc58a585d310c7e8d98dc648e47 Author: Marek Behún Date: Sat Sep 19 20:03:03 2020 +0200 leds: syscon: use struct led_init_data when registering By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Signed-off-by: Marek Behún Cc: Linus Walleij Signed-off-by: Pavel Machek commit 4b64c0510b66d3d779d1c195de1d5662bb28e948 Author: Marek Behún Date: Sat Sep 19 20:03:02 2020 +0200 leds: lm3532: don't parse label DT property This driver uses extended LED registration, so we do not need to parse the `label` DT property on our own. Signed-off-by: Marek Behún Signed-off-by: Pavel Machek commit 60bbd9d411e32328dbecaff9ec5dfab29b546aba Author: Marek Behún Date: Sat Sep 19 20:03:01 2020 +0200 leds: lm36274: use devres LED registering function Now that the potential use-after-free issue is resolved we can use devres for LED registration in this driver. By using devres version of LED registering function we can remove the .remove method from this driver. Signed-off-by: Marek Behún Tested-by: Dan Murphy Signed-off-by: Pavel Machek commit 5c0d20a968ae878ccdb2a42a0438610cf02cff13 Author: Marek Behún Date: Sat Sep 19 20:03:00 2020 +0200 leds: lm36274: use platform device as parent of LED Instead of registering LED under the MFD device, this driver sets the parent of the LED it is registering to the parent of the MFD device (the I2C client device). Because of this we cannot use devres for LED registration, since it can result in use-after-free, see commit a0972fff0947 ("leds: lm36274: fix use-after-free on unbind"). The only other in-tree driver that also registers under the MFD device (drivers/regulator/lm363x-regulator.c) sets the parent to the MFD device. Set the parent of this LED to the MFD device, instead of the I2C client device. Signed-off-by: Marek Behún Tested-by: Dan Murphy Signed-off-by: Pavel Machek commit 484456712de44c516b016b23027ad500acac4d29 Author: Marek Behún Date: Sat Sep 19 20:02:59 2020 +0200 leds: lm36274: do not set chip settings in DT parsing function These settings are not parsed from DT and therefore semantically should not be set in function with a name lm36274_parse_dt. Signed-off-by: Marek Behún Tested-by: Dan Murphy Signed-off-by: Pavel Machek commit 1aeef38c6a4a87d04bf5fc596dbf91a15525c987 Author: Marek Behún Date: Sat Sep 19 20:02:58 2020 +0200 leds: lm36274: use struct led_init_data when registering By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Previously if the `label` DT property was not present, the code composed name for the LED in the form "parent_name::" For backwards compatibility we therefore set init_data->default_label = ":"; so that the LED will not get a different name if `label` property is not present, nor are `color` and `function`. Signed-off-by: Marek Behún Tested-by: Dan Murphy Signed-off-by: Pavel Machek commit a448fcf19c9c5d3ddd9066accbd8d28c4950bb9f Author: Marek Behún Date: Sat Sep 19 20:02:57 2020 +0200 leds: lm36274: don't iterate through children since there is only one Do not use device_for_each_child_node. Since this driver works only with once child node present, use device_get_next_child_node instead. This also saves one level of indentation. Signed-off-by: Marek Behún Reviewed-by: Dan Murphy Tested-by: Dan Murphy Signed-off-by: Pavel Machek commit d3ab963cf980151f5f0ba16d842ddc80b232d9c0 Author: Marek Behún Date: Sat Sep 19 20:02:56 2020 +0200 leds: lm36274: cosmetic: rename lm36274_data to chip Rename this variable so that it is easier to read and easier to write in 80 columns. Also rename variable of this type in lm36274_brightness_set from led to chip, to be consistent. Signed-off-by: Marek Behún Tested-by: Dan Murphy Signed-off-by: Pavel Machek commit 1ece06acd29e028734431f9ccc79a57c3fc6281e Author: Dmitry Osipenko Date: Sun Sep 6 22:51:02 2020 +0300 leds: Add driver for Acer Iconia Tab A500 Acer Iconia Tab A500 is an Android tablet device which has two LEDs embedded into the Power Button. Orange LED indicates "battery charging" status and white LED indicates "wake-up/charge-done" status. The new LED driver provides control over both LEDs to userspace. Signed-off-by: Dmitry Osipenko Signed-off-by: Pavel Machek commit c4241abcd50019adafb11d8aa8269d242c4f42b4 Author: Liu Shixin Date: Sat Sep 19 18:08:53 2020 +0800 leds: pca9532 - simplify the return expression of pca9532_remove Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Pavel Machek commit f847ef543ce45c917bcbcafb2555aa9e5968c385 Author: Marek Behún Date: Fri Sep 18 00:33:37 2020 +0200 leds: ns2: use struct led_init_data when registering By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Signed-off-by: Pavel Machek commit 48b77cdca50a180fd1f22f4ae3b3d1e4ec7d2e5c Author: Marek Behún Date: Fri Sep 18 00:33:34 2020 +0200 leds: ns2: remove unneeded variable No need to use variable found, we can determine whether the mode was found by comparing iterator variable to its limit. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Signed-off-by: Pavel Machek commit a4a469b4314e95818521daef82aa7f9071123245 Author: Marek Behún Date: Fri Sep 18 00:33:33 2020 +0200 leds: ns2: register LED immediately after parsing DT properties Register each LED immediately after parsing OF properties. This simplifies the driver. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Signed-off-by: Pavel Machek commit b3f96922839a589e8417c31a1837f78382d3f0ab Author: Marek Behún Date: Fri Sep 18 00:33:32 2020 +0200 leds: ns2: cosmetic change: use helper variable Use helper variable dev instead of always writing &pdev->dev. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Signed-off-by: Pavel Machek commit a2fc703cc955c6b4b6c7fbed42df62bbadc46422 Author: Marek Behún Date: Fri Sep 18 00:33:31 2020 +0200 leds: ns2: cosmetic change Return directly instead of setting result and breaking. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Signed-off-by: Pavel Machek commit a78bd8f33fd7f76aded73a4f371270f70e1f5cb8 Author: Marek Behún Date: Fri Sep 18 00:33:30 2020 +0200 leds: ns2: cosmetic variable rename Rename variable led_dat to led in various functions. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Signed-off-by: Pavel Machek commit 01026cecf61998ddff76c280e7a710c5b396904e Author: Marek Behún Date: Fri Sep 18 00:33:29 2020 +0200 leds: ns2: cosmetic structure rename Rename structures: ns2_led -> ns2_led_of_one ns2_led_data -> ns2_led. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Signed-off-by: Pavel Machek commit 528c9515b28d48691f8ef545595be77857e211dc Author: Marek Behún Date: Fri Sep 18 00:33:28 2020 +0200 leds: ns2: use devres API for getting GPIO descriptors This drivers leaks GPIO descriptors on driver removal. Use devres API function devm_gpiod_get_from_of_node instead of gpiod_get_from_of_node to avoid this. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Not-for-stable Signed-off-by: Pavel Machek commit f72deb717d5b80b3b90ebcb4e4b73b041e2eb465 Author: Marek Behún Date: Fri Sep 18 00:33:27 2020 +0200 leds: ns2: move parsing of one LED into separate function Move parsing of DT properties of one LED into separate function. This saves indentation level and is nicer to read. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Signed-off-by: Pavel Machek commit 01d0b14d0e52d74ff7e0fc9b39c13be04acf27dd Author: Marek Behún Date: Fri Sep 18 00:33:26 2020 +0200 leds: ns2: support OF probing only, forget platdata Move forward from platform data to device tree only. Since commit c7896490dd1a ("leds: ns2: Absorb platform data") the platform data structure is absorbed into the driver, because nothing else in the source tree uses it. Since nobody complained and all usage of this driver is via device tree, change the code to work with device tree only. As Linus Walleij wrote, the device tree should be the preferred way forward anyway. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Signed-off-by: Pavel Machek commit 19d4deb7b24024fa01c6dcaa781b9e508d4f09c0 Author: Marek Behún Date: Fri Sep 18 00:33:25 2020 +0200 leds: ns2: alloc simple array instead of struct ns2_led_priv Since .remove method is not needed now that we use devres, there is no need to remember the number of LEDs in struct ns2_led_priv. Alloc simple array of ns2_led_data structs. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Signed-off-by: Pavel Machek commit 40f97281ff0540d43d3d0343d74a8e96573ed227 Author: Marek Behún Date: Fri Sep 18 00:33:24 2020 +0200 leds: ns2: use devres LED registering function By using devres version of LED registering function we can remove the .remove method from this driver. The probe method also gets simpler. Signed-off-by: Marek Behún Cc: Simon Guinot Cc: Simon Guinot Cc: Vincent Donnefort Cc: Thomas Petazzoni Cc: Linus Walleij Signed-off-by: Pavel Machek commit 6be2030dd752041fe35a948df78029aaec598b1e Author: Marek Behún Date: Fri Sep 18 00:33:12 2020 +0200 leds: is31fl32xx: use struct led_init_data when registering By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Signed-off-by: Marek Behún Cc: H. Nikolaus Schaller Cc: David Rivshin Signed-off-by: Pavel Machek commit 1016daf98179c657c226bfa820e65f286edc2d29 Author: Marek Behún Date: Fri Sep 18 00:33:10 2020 +0200 leds: pm8058: cosmetic change: no need to return in if guard We can return the last ret value. Signed-off-by: Marek Behún Cc: Linus Walleij Cc: Bjorn Andersson Signed-off-by: Pavel Machek commit fb270ba0d9ba76bf40326ac328024fe35b05c1f6 Author: Marek Behún Date: Fri Sep 18 00:33:09 2020 +0200 leds: pm8058: cosmetic change: use helper variable Use helper variable dev instead of always writing &pdev->dev. Signed-off-by: Marek Behún Cc: Linus Walleij Cc: Bjorn Andersson Signed-off-by: Pavel Machek commit eed951bbf737bb728006b1d248af6341abf79cd8 Author: Marek Behún Date: Fri Sep 18 00:33:08 2020 +0200 leds: pm8058: use struct led_init_data when registering By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Signed-off-by: Marek Behún Cc: Linus Walleij Cc: Bjorn Andersson Signed-off-by: Pavel Machek commit b23ca98af6114ee24b3ba085514677db4bfda53c Author: Marek Behún Date: Fri Sep 18 00:33:07 2020 +0200 leds: mt6323: cosmetic change: use helper variable Use helper variable dev instead of always writing &pdev->dev. Signed-off-by: Marek Behún Cc: Sean Wang Cc: John Crispin Cc: Ryder Lee Signed-off-by: Pavel Machek commit 6b8274de375b0632cfbda1081011f18738c15221 Author: Marek Behún Date: Fri Sep 18 00:33:06 2020 +0200 leds: mt6323: use struct led_init_data when registering By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Since init_data is passed with fwnode handle, we do not need to set the of_node member of the newly created LED classdev. Signed-off-by: Marek Behún Cc: Sean Wang Cc: John Crispin Cc: Ryder Lee Signed-off-by: Pavel Machek commit d7d02b8af5bcaacec9e49993049f57faeb41689c Author: Marek Behún Date: Fri Sep 18 00:33:04 2020 +0200 leds: max77650: use struct led_init_data when registering By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Previously if the `label` DT property was not present, the code composed name for the LED in the form "max77650::" For backwards compatibility we therefore set init_data->default_label = ":"; so that the LED will not get a different name if `label` property is not present. Signed-off-by: Marek Behún Cc: Bartosz Golaszewski Signed-off-by: Pavel Machek commit 0b9e3572874802f0519e85832d09058fa1c9dcb7 Author: Marek Behún Date: Fri Sep 18 00:33:03 2020 +0200 leds: lm3697: cosmetic change: use helper variable, reverse christmas tree Use helper variable dev instead of always writing &client->dev, or &priv->client->dev, or even &led->priv->client->dev. With one more line moved reverse christmas tree is also achieved. Signed-off-by: Marek Behún Reviewed-by: Dan Murphy Signed-off-by: Pavel Machek commit 3a953dc330e9ce9c00dc040e59faf66222f0c3b2 Author: Marek Behún Date: Fri Sep 18 00:33:02 2020 +0200 leds: lm3697: use struct led_init_data when registering By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Previously if the `label` DT property was not present, the code composed name for the LED in the form "parent_name::" For backwards compatibility we therefore set init_data->default_label = ":"; so that the LED will not get a different name if `label` property is not present. Signed-off-by: Marek Behún Cc: Dan Murphy Signed-off-by: Pavel Machek commit e4e912a349b2e194b15163bef5d70fd1e67a7769 Author: Marek Behún Date: Fri Sep 18 00:32:59 2020 +0200 leds: bcm6328, bcm6358: use struct led_init_data when registering By using struct led_init_data when registering we do not need to parse `label` DT property. Moreover `label` is deprecated and if it is not present but `color` and `function` are, LED core will compose a name from these properties instead. Signed-off-by: Marek Behún Cc: Álvaro Fernández Rojas Cc: Kevin Cernekee Cc: Jaedon Shin Signed-off-by: Pavel Machek commit ff5c89d44453e7ad99502b04bf798a3fc32c758b Author: Marek Behún Date: Fri Sep 18 00:32:58 2020 +0200 leds: bcm6328, bcm6358: use devres LED registering function These two drivers do not provide remove method and use devres for allocation of other resources, yet they use led_classdev_register instead of the devres variant, devm_led_classdev_register. Fix this. Signed-off-by: Marek Behún Cc: Álvaro Fernández Rojas Cc: Kevin Cernekee Cc: Jaedon Shin Signed-off-by: Pavel Machek Cc: stable@kernel.org commit 2c67756254349d2b4a1af92c846e32f7e15fae89 Author: Marek Behún Date: Fri Sep 18 00:32:57 2020 +0200 leds: various: fix OF node leaks Fix OF node leaks by calling of_node_put in for_each_available_child_of_node when the cycle breaks or returns. Signed-off-by: Marek Behún Cc: Nikita Travkin Cc: Milo Kim Cc: Dan Murphy Signed-off-by: Pavel Machek Not-for-stable: untested, theoretical, insignificant leaks commit 99a013c840a05083fd82d220685af7579238bfa8 Author: Marek Behún Date: Fri Sep 18 00:32:56 2020 +0200 leds: various: use only available OF children Various drivers count and iterate over OF children nodes via of_get_child_count and for_each_child_of_node. Instead they should use of_get_available_child_count and for_each_available_child_of_node, so that if a given node has the `status` property set to `disabled`, the child will be ignored. Signed-off-by: Marek Behún Cc: Andrew Lunn Cc: Andrey Utkin Cc: Baolin Wang Cc: Baolin Wang Cc: Benjamin Herrenschmidt Cc: Christian Mauderer Cc: Chunyan Zhang Cc: Dan Murphy Cc: David Rivshin Cc: Haojian Zhuang Cc: H. Nikolaus Schaller Cc: Michael Ellerman Cc: Milo Kim Cc: NeilBrown Cc: Nikita Travkin Cc: Orson Zhai Cc: Paul Mackerras Cc: Philippe Retornaz Cc: Riku Voipio Cc: Simon Guinot Cc: Simon Shields Cc: Vasant Hegde Cc: Xiaotong Lu Signed-off-by: Pavel Machek commit 05dec742bd20e8284e57559d53d38cffc2054fee Author: Marek Behún Date: Fri Sep 18 00:32:55 2020 +0200 leds: lt3593: do not rewrite .of_node of new LED device to wrong value The devm_led_classdev_register_ext is given init_data with fwnode set, so the LED core sets .of_node of the new LED classdev correctly. Do not rewrite this value to parent of_node. Signed-off-by: Marek Behún Cc: Daniel Mack Signed-off-by: Pavel Machek commit 8853c95e997e0a3621bd8718bdaded81ed37bc9a Author: Marek Behún Date: Fri Sep 18 00:32:54 2020 +0200 leds: various: use dev_of_node(dev) instead of dev->of_node The dev_of_node function should be preferred. Signed-off-by: Marek Behún Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Cc: Sean Wang Cc: Matthias Brugger Cc: Riku Voipio Signed-off-by: Pavel Machek commit 2779f4724b2ff0f296313e5987d10a6ec2c2ebd5 Author: Marek Behún Date: Fri Sep 18 00:32:52 2020 +0200 leds: various: use device_get_match_data Simply use device_get_match_data instead of matching against the match table again. Signed-off-by: Marek Behún Cc: H. Nikolaus Schaller Cc: David Rivshin Cc: Sebastian Reichel Cc: Christian Mauderer Cc: Andrew Lunn Signed-off-by: Pavel Machek commit 2aebb78040e741949ac71f1203f003351061b93b Author: Marek Behún Date: Fri Sep 18 00:32:50 2020 +0200 leds: ip30: compile if COMPILE_TEST=y This driver can be compiled on other platforms with small change if COMPILE_TEST=y. Signed-off-by: Marek Behún Cc: Pavel Machek Cc: Dan Murphy Cc: Thomas Bogendoerfer Signed-off-by: Pavel Machek commit f1b0a43bba3d1ed3fcd13478f8cce24c1275ba92 Author: Marek Behún Date: Fri Sep 18 00:32:49 2020 +0200 leds: various: compile if COMPILE_TEST=y These drivers can be compiled without modification when COMPILE_TEST=y: cobalt-qube, cobalt-raq, netxbig, ns2 and s3c24xx Signed-off-by: Marek Behún Cc: Pavel Machek Cc: Dan Murphy Signed-off-by: Pavel Machek commit de73f275a059a01c5b514c7762bc80821f8df6d9 Author: Alexander Dahl Date: Sat Sep 19 07:31:44 2020 +0200 leds: pwm: Allow automatic labels for DT based devices If LEDs are configured through device tree and the property 'label' is omitted, the label is supposed to be generated from the properties 'function' and 'color' if present. While this works fine for e.g. the 'leds-gpio' driver, it did not for 'leds-pwm'. The reason is, you get this label naming magic only if you add a LED device through 'devm_led_classdev_register_ext()' and pass a pointer to the current device tree node. For the following node from dts the LED appeared as 'led-5' in sysfs before and as 'red:debug' after this change. pwm_leds { compatible = "pwm-leds"; led-5 { function = LED_FUNCTION_DEBUG; color = ; pwms = <&pwm0 2 10000000 0>; max-brightness = <127>; linux,default-trigger = "heartbeat"; panic-indicator; }; }; Signed-off-by: Alexander Dahl Cc: Marek Behún Signed-off-by: Pavel Machek commit 76940c8d5ab1d3a7939eb08db10ca2cdfd05b8b1 Merge: 7a5f0085db924 0df3c29f6883f Author: Olof Johansson Date: Sat Sep 26 12:55:43 2020 -0700 Merge tag 'samsung-soc-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v5.10 1. Clear unneeded L2C-310 flag which presenc was triggering warning message. 2. Fix build of SAMSUNG_PM_DEBUG without MMU. 3. Minor cleanups and update of linux-samsung-soc mailing list in Maintainers. * tag 'samsung-soc-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: s3c64xx: bring back notes from removed debug-macro.S ARM: s3c24xx: fix Wunused-variable warning on !MMU ARM: samsung: fix PM debug build with DEBUG_LL but !MMU MAINTAINERS: mark linux-samsung-soc list non-moderated ARM: exynos: clear L310_AUX_CTRL_NS_LOCKDOWN in default l2c_aux_val Signed-off-by: Olof Johansson commit 0059e8d648afdcd85ef9fba1b58b1be5bb237117 Merge: a8ba256afe17e 4c42831b30783 Author: Olof Johansson Date: Sat Sep 26 12:44:10 2020 -0700 Merge tag 'samsung-defconfig-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/defconfig Samsung defconfig changes for v5.10 1. Re-enable platform media drivers as new dependency on MEDIA_PLATFORM_SUPPORT appeared. 2. Enable ROHM BD718x7 PMIC present on some of boards with i.MX 8 SoCs. 3. Enable Samsung S3FWRN5 NFC driver present on TM2/TM2E boards. * tag 'samsung-defconfig-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: defconfig: Enable Samsung S3FWRN5 NFC driver arm64: defconfig: Enable clock driver for ROHM BD718x7 PMIC ARM: exynos_defconfig: enable platform media drivers Link: https://lore.kernel.org/r/20200920160705.9651-2-krzk@kernel.org Signed-off-by: Olof Johansson commit a8ba256afe17eb68e7cccfbe4f157f15ea199e2c Merge: ce726b672b113 ff4c371d2bc0b Author: Olof Johansson Date: Sat Sep 26 12:43:27 2020 -0700 Merge tag 'tegra-for-5.10-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/defconfig arm64: tegra: Default configuration updates for v5.10-rc1 This pair of patches enable the ADMA, ACONNECT and AHUB drivers that are required for audio support on Tegra210 and later. * tag 'tegra-for-5.10-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: defconfig: Build ADMA and ACONNECT driver arm64: defconfig: Build AHUB component drivers Link: https://lore.kernel.org/r/20200918150303.3938852-6-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 7d0c5aee9616c5b354c58285f9d1e5e3838ae625 Merge: fffde96eb0b5c c2ef3aa464a70 Author: Olof Johansson Date: Sat Sep 26 12:41:27 2020 -0700 Merge tag 'tegra-for-5.10-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt ARM: tegra: Changes for v5.10-rc1 These changes extend support on the Nexus 7 and Acer A500 devices. * tag 'tegra-for-5.10-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: nexus7: Add SMB347 battery charger ARM: tegra: nexus7: Add touchscreen ARM: tegra: nexus7: Use PLLC for WiFi MMC clock parent ARM: tegra: acer-a500: Use PLLC for WiFi MMC clock parent ARM: tegra: acer-a500: Set WiFi MMC clock rate to 50 MHz ARM: tegra: acer-a500: Correct PINCTRL configuration ARM: tegra: acer-a500: Remove atmel,cfg_name property ARM: tegra: acer-a500: Add aliases for MMC ARM: tegra: nexus7: Add aliases for MMC dt-bindings: power: supply: Add device-tree binding for Summit SMB3xx dt-bindings: tegra: pmc: Add Tegra234 support dt-bindings: fuse: tegra: Add Tegra234 support dt-bindings: tegra: Add Tegra234 VDK compatible dt-bindings: misc: tegra186-misc: Add Tegra234 support dt-bindings: misc: tegra186-misc: Add missing compatible string dt-bindings: misc: tegra-apbmisc: Add missing compatible strings Link: https://lore.kernel.org/r/20200918150303.3938852-4-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 63e15ef136d31d14976797c59393666e77bd7f28 Merge: e8c9d35ea6eae 0ebdf11699d04 Author: Olof Johansson Date: Sat Sep 26 12:40:09 2020 -0700 Merge tag 'tegra-for-5.10-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers firmware: tegra: Changes for v5.10-rc1 This is a minor change that implements a BPMP workaround for pre-silicon platforms and is needed to enable support for BPMP on Tegra234. * tag 'tegra-for-5.10-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: Enable BPMP support on Tegra234 Link: https://lore.kernel.org/r/20200918150303.3938852-3-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit e8c9d35ea6eaef3c9406536c2b7adb02835f0971 Merge: 5746b3b88627f 34e214a996890 Author: Olof Johansson Date: Sat Sep 26 12:39:35 2020 -0700 Merge tag 'tegra-for-5.10-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers soc/tegra: Changes for v5.10-rc1 These changes contain a bit of cleanup and chip support for the upcoming Tegra234 SoC. * tag 'tegra-for-5.10-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: Add Tegra234 support soc/tegra: pmc: Reorder reset sources/levels definitions soc/tegra: misc: Add Tegra234 support soc/tegra: fuse: Add Tegra234 support soc/tegra: fuse: Implement tegra_is_silicon() soc/tegra: fuse: Extract tegra_get_platform() Link: https://lore.kernel.org/r/20200918150303.3938852-2-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 5746b3b88627ffa1289dfe777ca5085e29b6c336 Merge: 802b26b3c2af8 8c05f50fe8452 Author: Olof Johansson Date: Sat Sep 26 12:39:07 2020 -0700 Merge tag 'tee-dev-cleanup-for-v5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee into arm/drivers Simplify tee_device_register() and friends Uses cdev_device_add() instead of the cdev_add() device_add() combination. Initializes dev->groups instead of direct calls to sysfs_create_group() and friends. * tag 'tee-dev-cleanup-for-v5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee: tee: avoid explicit sysfs_create/delete_group by initialising dev->groups tee: replace cdev_add + device_add with cdev_device_add Link: https://lore.kernel.org/r/20200918144130.GB1219771@jade Signed-off-by: Olof Johansson commit 802b26b3c2af8d2e46afce1e2ba4d0db8d393990 Merge: 8119f4b91d541 1b4298f000064 Author: Olof Johansson Date: Sat Sep 26 12:38:33 2020 -0700 Merge tag 'renesas-drivers-for-v5.10-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers Renesas driver updates for v5.10 (take two) - Add core support for the R-Car V3U (R8A779A0) SoC, including System Controller (SYSC) and Reset (RST) support, - Various Kconfig cleanups. * tag 'renesas-drivers-for-v5.10-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: r8a779a0-sysc: Add r8a779a0 support soc: renesas: rcar-rst: Add support for R-Car V3U soc: renesas: Identify R-Car V3U soc: renesas: Sort driver description title soc: renesas: Use ARM32/ARM64 for menu description dt-bindings: clock: Add r8a779a0 CPG Core Clock Definitions dt-bindings: power: Add r8a779a0 SYSC power domain definitions Link: https://lore.kernel.org/r/20200918124800.15555-4-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 7a5f0085db9247271c059525eca7baa193201a39 Merge: 8af11ee90cd53 919c385dde9cd Author: Olof Johansson Date: Sat Sep 26 12:36:57 2020 -0700 Merge tag 'renesas-arm-soc-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/soc Renesas ARM SoC updates for v5.10 - Make two local functions static. * tag 'renesas-arm-soc-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: rcar-gen2: Make rcar_gen2_{timer_init, reserve}() static Link: https://lore.kernel.org/r/20200918124800.15555-3-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 8af11ee90cd530c64f0523cdb7c5747cd25c89bc Merge: 632db90624b15 faf6dc64c4b14 Author: Olof Johansson Date: Sat Sep 26 12:35:34 2020 -0700 Merge tag 'at91-soc-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/soc AT91 SoC for 5.10 - ULP0 fast wakeup support - PM cleanups * tag 'at91-soc-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: at91: pm: remove unnecessary at91sam9x60_idle ARM: at91: pm: of_node_put() after its usage ARM: at91: pm: add per soc validation of pm modes ARM: at91: pm: add support for ULP0 fast wakeup Link: https://lore.kernel.org/r/20200916211119.GA275438@piout.net Signed-off-by: Olof Johansson commit 435be28b0789b3aa679a993f47d5e480f291e604 Author: Jakub Kicinski Date: Fri Sep 25 18:56:04 2020 -0700 Revert "vxlan: move encapsulation warning" This reverts commit 546c044c9651e81a16833806feff6b369bb5de33. Nothing prevents user from sending frames to "external" VxLAN devices. In fact kernel itself may generate icmp chatter. This is fine, such frames should be dropped. The point of the "missing encapsulation" warning was that frames with missing encap should not make it into vxlan_xmit_one(). And vxlan_xmit() drops them cleanly, so let it just do that. Without this revert the warning is triggered by the udp_tunnel_nic.sh test, but the minimal repro is: $ ip link add vxlan0 type vxlan \ group 239.1.1.1 \ dev lo \ dstport 1234 \ external $ ip li set dev vxlan0 up [ 419.165981] vxlan0: Missing encapsulation instructions [ 419.166551] WARNING: CPU: 0 PID: 1041 at drivers/net/vxlan.c:2889 vxlan_xmit+0x15c0/0x1fc0 [vxlan] Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit fffde96eb0b5c6371677e1fb74cd76b7245f0686 Merge: f75ff2c7bc949 36f0a5fc52848 Author: Olof Johansson Date: Sat Sep 26 10:24:36 2020 -0700 Merge tag 'v5.9-next-dts32' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt mt2701: - add jpeg enconder node mt7623: - refactor dts and add hdmi support * tag 'v5.9-next-dts32' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm: dts: mt7623: add missing pause for switchport arm: dts: mt7623: add lima related regulator arm: dts: mt7623: add display subsystem related device nodes arm: dts: mt7623: move display nodes to separate mt7623n.dtsi arm: dts: mt2701: Add jpeg enc device tree node Link: https://lore.kernel.org/r/641d4d47-b7ad-42dd-f7a8-e028a1f64d70@gmail.com Signed-off-by: Olof Johansson commit f75ff2c7bc94981d20d23c689bd53658bd736feb Merge: 9289beb8ebb52 f866c471542e6 Author: Olof Johansson Date: Sat Sep 26 10:23:57 2020 -0700 Merge tag 'v5.9-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt mt8173: - make nor flash work - fix da9211 regulator modes mt8183: - add support for system companion processor mt8516: - set reset gpio for gpio expander in pumpkin board * tag 'v5.9-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: dts: mt8183: update watchdog device node arm64: dts: mt8173: elm: Fix nor_flash node property arm64: dts: mediatek: fix tca6416 reset GPIOs in pumpkin arm64: dts: mt8183: add scp node arm64: dts: mt8173-elm: fix supported values for regulator-allowed-modes of da9211 Link: https://lore.kernel.org/r/1580bc76-b05a-ad29-1854-d2aca657c775@gmail.com Signed-off-by: Olof Johansson commit 9289beb8ebb520538e869646a9f7c935a050dbb9 Merge: c490eab969021 63fafc5a046b1 Author: Olof Johansson Date: Sat Sep 26 10:23:15 2020 -0700 Merge tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt arm64: dtc: amlogic updates for v5.10 - new boards: libretch s905x cc v2, Hardkernel ODROID-N2+ - vim3: sound updates * tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: initial support for aml-s905x-cc v2 dt-bindings: arm: amlogic: add support for libretch s905x cc v2 arm64: dts: meson: add support for the ODROID-N2+ dt-bindings: arm: amlogic: add support for the ODROID-N2+ arm64: dts: meson: convert ODROID-N2 to dtsi arm64: dts: meson: vim3l: remove sound card definition arm64: dts: meson: vim3: make sound card common to all variants arm64: dts: meson: vim3: correct led polarity Link: https://lore.kernel.org/r/7h3636kjxd.fsf@baylibre.com Signed-off-by: Olof Johansson commit c490eab969021c3f7ea8c446508f8ef913bb5eb5 Merge: 873c331927302 8bcbcdb7293cc Author: Olof Johansson Date: Sat Sep 26 10:22:46 2020 -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.10 - minor cleanup * tag 'amlogic-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson: move the L2 cache-controller inside the SoC node Link: https://lore.kernel.org/r/7h7dsikjyt.fsf@baylibre.com Signed-off-by: Olof Johansson commit 873c331927302ab484c859601982a7cb88bc0723 Merge: a1c259cdb0288 71593c519f162 Author: Olof Johansson Date: Sat Sep 26 10:22:03 2020 -0700 Merge tag 'stm32-dt-for-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/dt STM32 DT updates for v5.10, round 1 Highlights: ---------- MCU part: -Some changes on stm32h743: enable display controler, add SPI resets, use "st,stm32h7-uart" compatible. MPU part: -Add new Odyssey SOM board based on STM32MP157CAC. It embeds 4GB eMMC, 512 MB DDR3 RAM, USB and ETH connectors and a combo wifi/BT (AP6236 chip). -Add FMC2 EBI support on EV1 board. -Add arm-pmu node. -LXA: -Change ethernet phy delays to avoid kernel warnings. -Enable DDR50 eMMC mode. -DH: -Add new DH DRC02 unit board. -Add USB OTG support on PDK2 board. -Use uart8 RTS/CTS on PDK2 board. -Fix display PWM channel on PDK2 board. -Swap phy reset line and touchscreen irq on DHCOM SOM. -Drop QSPI CS2 on DHCOM SOM. -Update SDMMC pin config on AV96. -Enable uart7 RTS/CTS on AV96. * tag 'stm32-dt-for-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: add arm-pmu node on stm32mp15 ARM: dts: stm32: add FMC2 EBI support for stm32mp157c ARM: dts: stm32: lxa-mc1: enable DDR50 mode on eMMC ARM: dts: stm32: Fix DH PDK2 display PWM channel ARM: dts: stm32: Enable RTS/CTS for DH AV96 UART7 ARM: dts: stm32: Swap PHY reset GPIO and TSC2004 IRQ on DHCOM SOM ARM: dts: stm32: use stm32h7 usart compatible string for stm32h743 ARM: dts: stm32: add resets property to spi device nodes on stm32h743 ARM: dts: stm32: add display controller node to stm32h743 ARM: dts: stm32: Enable RTS/CTS for DH PDK2 UART8 ARM: dts: stm32: Drop QSPI CS2 pinmux on DHCOM ARM: dts: stm32: Add STM32MP1 UART8 RTS/CTS pinmux ARM: dts: stm32: add initial support for stm32mp157-odyssey board dt-bindings: arm: stm32: document Odyssey compatible dt-bindings: vendor-prefixes: add Seeed Studio ARM: dts: stm32: lxa-mc1: Fix kernel warning about PHY delays ARM: dts: stm32: Add USB OTG support to DH PDK2 ARM: dts: stm32: Fix sdmmc2 pins on AV96 ARM: dts: stm32: Add DHSOM based DRC02 board ARM: dts: stm32: Move ethernet PHY into DH SoM DT Link: https://lore.kernel.org/r/7e2a93c9-cf37-bc93-ed6e-d9cb1808b7a3@st.com Signed-off-by: Olof Johansson commit a1c259cdb02885f87c2f04a0127a01548330a42e Merge: 99bf15c707537 bac12f2569d1e Author: Olof Johansson Date: Sat Sep 26 10:21:19 2020 -0700 Merge tag 'qcom-arm64-for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM64 DT updates for v5.10 Cleanup, refactor and modernize MSM8916 by sorting nodes, moving device and platform specific parts to their respective files, add and use labels for reference nodes and use IRQ defines. Migrate TCSR mutex off the depricated binding, add resin node for PM8916. Add LPASS clock controller for SC7180. Fix the LLCC reg, increase interconnect-cells, drop flags on MDSS irqs. Add interconnects for display, eMMC and SD-card, specify 'sustainable_power' for CPU thermal zones, improve pinconf states related to UART and Bluetooth. Add new DT for Lazor and Trogdor. Increase #interconnect-cells for SDM845 to allow tags, add OPP tables and power-domains for Venus and interconnects for display. Fix the ports on the HDMI nodes for DB845c and add DT for the Xiaomi Poco F1. Add interconnect providers, fix up primary USB's clock and use dt-binding defines for GPU clocks on SM8150. Add interconnect providers, CPUfreq, thermal configuration and missing uarts for SM8250. Fix up naming of debug uart, add always-on supply clock to gcc, fix up the sleep clock rate and define OPP tables for all QUP devices. Then add a new DeviceTree for the QRB5165 RB5 board. Enable watchdog on IPQ8074 and use the appropriate compatible for the PMU node. Enable DVFS support for IPQ6018. Finally correct the spelling of "interrupts" in MSM8992 uart node, fix missing # in PM660 #interrupt-cells, add second VFE power-domain to camss in MSM8996 and sort the Makefile. * tag 'qcom-arm64-for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (75 commits) arm64: dts: qcom: sm8250: Add thermal zones and throttling support arm64: dts: qcom: sm8250: Add cpufreq hw node arm64: dts: qcom: sdm845: Add interconnects property for display arm64: dts: qcom: sm8250: Add EPSS L3 interconnect provider arm64: dts: qcom: sm8150: Add OSM L3 interconnect provider arm64: dts: qcom: sm8250: add interconnect nodes arm64: dts: qcom: sm8150: add interconnect nodes arm64: dts: qcom: sc7180: Increase the number of interconnect cells arm64: dts: qcom: sdm845: Increase the number of interconnect cells arm64: dts: qcom: Makefile: Sort lines arm64: dts: qcom: pm8916: Sort nodes arm64: dts: qcom: msm8916: Sort nodes arm64: dts: qcom: msm8916: Pad addresses arm64: dts: qcom: msm8916: Rename "x-smp2p" to "smp2p-x" arm64: dts: qcom: msm8916: Use more generic node names arm64: dts: qcom: msm8916: Add MSM8916-specific compatibles to SCM/MSS arm64: dts: qcom: msm8916: Minor style fixes arm64: dts: qcom: msm8916: Drop qcom,tcsr-mutex syscon arm64: dts: qcom: msm8916: Use IRQ defines, add IRQ types arm64: dts: qcom: msm8916: Fix MDP/DSI interrupts ... Link: https://lore.kernel.org/r/20200924040607.180039-1-bjorn.andersson@linaro.org Signed-off-by: Olof Johansson commit 99bf15c707537c5e00d8f53a3e93aaaabc6d9e15 Merge: 5f7067bc3aa43 30a9a8c16865d Author: Olof Johansson Date: Sat Sep 26 10:18:12 2020 -0700 Merge tag 'v5.10-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt New boards NanoPi R2S, A95X-Z2 and more Rock-Pi4 variants. Khadas-edge additions and a some fixes. * tag 'v5.10-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: add ir-receiver node to rk3399-khadas-edge arm64: dts: rockchip: add spiflash node to rk3399-khadas-edge arm64: dts: rockchip: Add support for FriendlyARM NanoPi R2S dt-bindings: Add doc for FriendlyARM NanoPi R2S arm64: dts: rockchip: replace status value "ok" by "okay" arm64: dts: rockchip: fix cpu-supply for rk3328-evb arm64: dts: rockchip: add rk3318 A95X Z2 board dt-bindings: arm: rockchip: add Zkmagic A95X Z2 description dt-bindings: Add vendor prefix for Shenzhen Zkmagic Technology Co., Ltd. arm64: dts: rockchip: Add Radxa ROCK Pi 4C support arm64: dts: rockchip: Add Radxa ROCK Pi 4B support arm64: dts: rockchip: Mark rock-pi-4 as rock-pi-4a dts dt-bindings: arm: rockchip: Update ROCKPi 4 binding arm64: dts: rockchip: change spdif fallback compatible on rk3308 arm64: dts: rockchip: Fix power routing to support POE on rk3399-roc-pc Link: https://lore.kernel.org/r/16010805.MhVyP8KKtY@diego Signed-off-by: Olof Johansson commit 5f7067bc3aa4358a397375d451d7d52bcd4c3799 Merge: 2b7cfaaf0bace 912a6e2ef6dd8 Author: Olof Johansson Date: Sat Sep 26 10:17:44 2020 -0700 Merge tag 'imx-dt64-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm64 device tree change for 5.10: - New board/device support: Librem 5 phone, i.MX8MM DDR4 EVK, Variscite VAR-SOM-MX8MN SoM and Symphony board. - Add NWL MIPI DSI controller support for i.MX8MQ. - Several series from Krzysztof Kozlowski to clean and fix up i.MX8 based device trees according to DT schema. - A series from Michael Walle to add sl28cpld support for Kontron sl28 device based on LS1028A. - Add two parameters for Samsung picophy tuning on imx8mm-evk and imx8mn-evk boards. - Add more thermal zones for Layerscape SoCs. - Various random update and minor fix-ups. * tag 'imx-dt64-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (71 commits) arm64: dts: imx8mq-librem5: correct GPIO hog property arm64: dts: imx8mm-var-som-symphony: Drop wake-up source from RTC arm64: dts: imx8mq: correct interrupt flags arm64: dts: imx8mn: correct interrupt flags arm64: dts: imx8mm: correct interrupt flags arm64: dts: imx8mm-var-som-symphony: fix ptn5150 interrupts arm64: dts: layerscape: correct watchdog clocks for LS1088A arm64: dts: freescale: sl28: enable fan support arm64: dts: freescale: sl28: enable LED support arm64: dts: freescale: sl28: map GPIOs to input events arm64: dts: freescale: sl28: enable sl28cpld arm64: dts: imx8mq-evk: Add MIPI DSI support arm64: dts: layerscape: Add label to pcie nodes arm64: dts: imx8mn-var-som-symphony: Add Variscite Symphony board with VAR-SOM-MX8MN arm64: dts: imx8mn-var-som: Add Variscite VAR-SOM-MX8MN System on Module arm64: dts: imx8mn-ddr4-evk: Remove unneeded PMIC pin configuration arm64: dts: imx8mm-var-som-symphony: Adjust ethernet pin configuration arm64: dts: imx8mm-var-som-symphony: Remove unneeded i2c3 properties arm64: dts: imx8mm-var-som-symphony: Drop unused gpioledgrp arm64: dts: imx8mq-librem5: Add interrupt-names to ti,tps6598x ... Link: https://lore.kernel.org/r/20200923073009.23678-5-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 2b7cfaaf0bace6f22a763d7bf381cca8efe4d463 Merge: 531696020edab 05b0852ec99d4 Author: Olof Johansson Date: Sat Sep 26 10:17:03 2020 -0700 Merge tag 'imx-dt-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm32 device tree change for 5.10: - New board/device support: Tolino Shine 2 HD, TQMa6 SoM, Y Soft IOTA Orion board. - update GPMI NAND node name to nand-controller for aligning with DT schema. - Remove the legacy fsl,spi-num-chipselects property from a few board. - A series to update imx6q-logicpd support, using GPIO chipselect, adding board compatible string, and enabling DTB build for the board. - Complete RNG device node in i.MX6SL device tree, and add RNG node for i.MX6SLL and i.MX6ULL. - Correct interrupt flags for imx6qdl-gw5xxx boards. - Add missing enet_out clock for i.MX6Q/DL Ethernet device. - Enable PCIe support for imx6qp-sabreauto board. - A series from Shengjiu Wang to add audio sound card for imx7d-sdb and imx6sll-evk board, add headphone detection for sound card on a few NXP development boards. - A couple of minor fix-ups on i.MX25 pin functions. - Some random update on various boards. * tag 'imx-dt-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (37 commits) ARM: dts: imx6qdl-gw5xxx: correct interrupt flags ARM: dts: imx6q-logicpd: Use GPIO chipselect ARM: dts: imx: Add an entry for imx6q-logicpd.dtb ARM: dts: imx6q-logicpd: Add a specific board compatible string ARM: dts: imx6q: align GPIO hog names with dtschema ARM: dts: imx6qdl-tqma6: fix LM75 compatible string ARM: dts: imx6qdl-tqma6: remove obsolete fsl,spi-num-chipselects ARM: dts: imx6qdl-tqma6: fix indentation ARM: dts: imx28-m28: Align GPMI NAND node name with schema ARM: dts: imx6qdl: add enet_out clk support ARM: dts: imx6qdl: move iomuxc compatible assignment out of root node ARM: dts: vf: Fix PCA95xx GPIO expander properties on ZII CFU1 ARM: dts: imx: add devicetree for Tolino Shine 2 HD ARM: dts: imx6qdl-gw553x: Remove unneeded #address-cells/#size-cells ARM: dts: imx6sll-evk: Add audio sound card node ARM: dts: imx6sl-evk: Add headphone detection for sound card ARM: dts: imx6sx-sdb: Add headphone detection for sound card ARM: dts: imx6q-kontron-samx6i: Remove old fsl,spi-num-chipselects ARM: dts: imx: Fix the SPI chipselect polarity ARM: dts: imx25-pinfunc: Fix GPT function names ... Link: https://lore.kernel.org/r/20200923073009.23678-4-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 531696020edabb6b2be1bd38db78cd7cb1d35de4 Merge: 5310d705a934f 8e5910d2dc391 Author: Olof Johansson Date: Sat Sep 26 10:15:52 2020 -0700 Merge tag 'imx-bindings-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX DT bindings update for 5.10: - Various board compatible string additions to fsl.ymal. - Update Vybrid OCOTP binding for syscon compatible string, which is required to access the UID. * tag 'imx-bindings-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: Add binding for Variscite Symphony board with VAR-SOM-MX8MN dt-bindings: arm: fsl: Add PHYTEC i.MX6 devicetree bindings dt-bindings: arm: fsl: Add PHYTEC i.MX6 UL/ULL devicetree bindings dt-bindings: arm: fsl: Add an entry for the i.MX6 LogicPD board dt-bindings: arm: fsl: Fix matching Purism Librem5 phones dt-bindings: arm: fsl: Add imx8mm ddr4 evk board dt-bindings: arm: fsl: add compatible string for Tolino Shine 2 HD dt-bindings: nvmem: Add syscon to Vybrid OCOTP driver dt-bindings: arm: fsl: Add binding for Variscite Symphony board with VAR-SOM-MX8MM dt-bindings: arm: fsl: Add binding for Variscite VAR-SOM-MX8MM module dt-bindings: arm: fsl: Add ZII Ultra boards binding dt-bindings: arm: fsl: Fix Toradex Colibri i.MX 8 binding dt-bindings: arm: fsl: Add Beacon i.MX8M Mini Development Kit binding dt-bindings: arm: fsl: Add the librem 5 phone dt-bindings: arm: fsl: Add Y Soft IOTA Orion board Link: https://lore.kernel.org/r/20200923073009.23678-3-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 5310d705a934fdb6565824ab91a7be07c290ef47 Merge: 12f0f6f654d82 66db854b1f62d Author: Olof Johansson Date: Sat Sep 26 10:15:11 2020 -0700 Merge tag 'ti-k3-dt-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux into arm/dt Device tree updates towards 5.10-rc1 for TI K3 platform. * tag 'ti-k3-dt-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux: (23 commits) arm64: dts: ti: k3-j721e-common-proc-board: Configure the PCIe instances arm64: dts: ti: k3-j721e-main: Add PCIe device tree nodes arm64: dts: ti: k3-*: Fix up node_name_chars_strict warnings arm64: dts: ti: k3-am65-wakeup: Use generic temperature-sensor for node name arm64: dts: ti: k3-am65-base-board Use generic camera for node name instead of ov5640 arm64: dts: ti: k3-*: Use generic pinctrl for node names arm64: dts: ti: k3-am65*: Use generic clock for syscon clock names arm64: dts: ti: k3-am65*: Use generic gpio for node names arm64: dts: ti: k3-am65-main: Use lower case hexadecimal arm64: dts: ti: k3-j721e: Use lower case hexadecimal arm64: dts: ti: k3-am65: restrict PCIe to Gen2 speed arm64: dts: ti: k3-j721e-som-p0: Reserve memory for IPC between RTOS cores arm64: dts: ti: k3-j721e-som-p0: Add DDR carveout memory nodes for C71x DSP arm64: dts: ti: k3-j721e-som-p0: Add mailboxes to C71x DSP arm64: dts: ti: k3-j721e-main: Add C71x DSP node arm64: dts: ti: k3-j721e-som-p0: Add DDR carveout memory nodes for C66 DSPs arm64: dts: ti: k3-j721e-som-p0: Add mailboxes to C66x DSPs arm64: dts: ti: k3-j721e-main: Add C66x DSP nodes arm64: dts: ti: k3-j721e-som-p0: Move mailbox nodes from board dts file arm64: dts: ti: k3-j721e-main: Add crypto accelerator node ... Link: https://lore.kernel.org/r/20200922134722.2y5kqxu4lghbwp5u@akan Signed-off-by: Olof Johansson commit f1466cdd82f486252787048ad50b2c6695dc70e6 Merge: 6cd19012d0d6e bc38325703ebd Author: Olof Johansson Date: Sat Sep 26 10:11:15 2020 -0700 Merge tag 'actions-drivers-fixes-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux-actions into arm/fixes Actions Semi drivers fixes for v5.9 - Fix the missing prototype warning in owl-sps-helper driver by including owl-sps header * tag 'actions-drivers-fixes-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/linux-actions: soc: actions: include header to fix missing prototype Link: https://lore.kernel.org/r/20200922114559.GD11251@Mani-XPS-13-9360 Signed-off-by: Olof Johansson commit 6cd19012d0d6ed91a84bf4f70fa09ff97127953c Merge: 32fe0116aa3a1 22f5adc75a8d6 Author: Olof Johansson Date: Sat Sep 26 10:10:46 2020 -0700 Merge tag 'qcom-arm64-fixes-for-5.9' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm ARM64 DT fixes for v5.9 This fixes the OPP table for SDM845 QUP devices to bring back Bluetooth support, disables SMMU on SDM630 to make the devices boot again, disables the eMMC controller on Kitakami to prevent permanent damage and fixes a typo in the pm660. * tag 'qcom-arm64-fixes-for-5.9' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: pm660: Fix missing pound sign in interrupt-cells arm64: dts: qcom: kitakami: Temporarily disable SDHCI1 arm64: dts: sdm630: Temporarily disable SMMUs by default arm64: dts: sdm845: Fixup OPP table for all qup devices Link: https://lore.kernel.org/r/20200922000521.39621-1-bjorn.andersson@linaro.org Signed-off-by: Olof Johansson commit 32fe0116aa3a100b44559916b8598317d3f40ee0 Merge: 190b05d751bbc 7a366707bb6a9 Author: Olof Johansson Date: Sat Sep 26 10:10:27 2020 -0700 Merge tag 'qcom-drivers-fixes-for-5.9' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm driver fixes for v5.9 Fix the array type of the domain_list QMI response in PDR. * tag 'qcom-drivers-fixes-for-5.9' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: pdr: Fixup array type of get_domain_list_resp message Link: https://lore.kernel.org/r/20200921235241.36463-1-bjorn.andersson@linaro.org Signed-off-by: Olof Johansson commit 190b05d751bbc145bdc467ff1be24033af6eb670 Merge: abc7220b2233d 2933bf3528007 Author: Olof Johansson Date: Sat Sep 26 10:09:38 2020 -0700 Merge tag 'sunxi-fixes-for-5.9-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes Two fixes for the Allwinner SoCs, one for the H5 GPU support and one for a misconfigured regulator on the Bananapi M2 Ultra. * tag 'sunxi-fixes-for-5.9-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: h5: remove Mali GPU PMU module ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix dcdc1 regulator Link: https://lore.kernel.org/r/8a436328-b844-4599-8695-ab2088a00ade.lettre@localhost Signed-off-by: Olof Johansson commit abc7220b2233df9b13d8e0e312fb6f31e5402d7d Merge: a4da411e41892 c65176fd49f45 Author: Olof Johansson Date: Sat Sep 26 10:08:43 2020 -0700 Merge tag 'ti-k3-dt-fixes-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux into arm/fixes Tag fix up for TI serdes mux definition introduced in 5.9 * tag 'ti-k3-dt-fixes-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux: (637 commits) arm64: dts: ti: k3-j721e: Rename mux header and update macro names Linux 5.9-rc3 genirq/matrix: Deal with the sillyness of for_each_cpu() on UP fsldma: fix very broken 32-bit ppc ioread64 functionality kernel.h: Silence sparse warning in lower_32_bits cifs: fix check of tcon dfs in smb1 KVM: arm64: Set HCR_EL2.PTW to prevent AT taking synchronous exception KVM: arm64: Survive synchronous exceptions caused by AT instructions KVM: arm64: Add kvm_extable for vaxorcism code arm64: vdso32: make vdso32 install conditional arm64: use a common .arch preamble for inline assembly mfd: mfd-core: Ensure disabled devices are ignored without error usb: storage: Add unusual_uas entry for Sony PSZ drives md/raid5: make sure stripe_size as power of two powerpc/32s: Disable VMAP stack which CONFIG_ADB_PMU io_uring: don't bounce block based -EAGAIN retry off task_work io_uring: fix IOPOLL -EAGAIN retries arm64/cpuinfo: Remove unnecessary fallthrough annotation media: dib0700: Fix identation issue in dib8096_set_param_override() hwmon: (gsc-hwmon) Scale temperature to millidegrees ... Link: https://lore.kernel.org/r/20200921125402.mtwypblhb45a6ssh@akan Signed-off-by: Olof Johansson commit 12f0f6f654d82bb4583956a5efcdf5aa6bcf3d58 Merge: 76e5b12c90328 fceeb3f69e5d0 Author: Olof Johansson Date: Sat Sep 26 10:02:58 2020 -0700 Merge tag 'samsung-dt64-5.10-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v5.10, part two Minor cleanups: removal of undocumented I2S properties, alignment of OPP table node name with dtschema. * tag 'samsung-dt64-5.10-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Align OPP table name with dt-schema arm64: dts: exynos: Remove undocumented i2s properties in Exynos5433 Link: https://lore.kernel.org/r/20200920160705.9651-4-krzk@kernel.org Signed-off-by: Olof Johansson commit 76e5b12c90328e26f6e5f58594ca656cfd9e891a Merge: dd59aed76d02a 6995a4c46331e Author: Olof Johansson Date: Sat Sep 26 10:02:35 2020 -0700 Merge tag 'samsung-dt-5.10-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.10, part two 1. Further cleanup of DTS with dtschema: s5pv210, s3c6410 and s3c24xx. This fixes many minor dtschema violations, adds few missing functionalities (like clock for RTC) and improves the code maintainability in few places. Except the RTC clock, this should not have visible impact. 2. Fix few remaining Exynos dtschema violations. * tag 'samsung-dt-5.10-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (36 commits) ARM: dts: s5pv210: replace deprecated "gpios" i2c-gpio property in Goni ARM: dts: s5pv210: replace deprecated "gpios" i2c-gpio property in Aquila ARM: dts: s5pv210: move fixed regulators under root node in Goni ARM: dts: s5pv210: move fixed regulators under root node in Aquila ARM: dts: exynos: Align OPP table name with dt-schema ARM: dts: exynos: move assigned-clock* properties to i2s0 node in Odroid XU4 ARM: dts: exynos: add input clock to CMU in Exynos4412 Odroid ARM: dts: exynos: add input clock to CMU in Exynos3250 ARM: dts: s3c24xx: move fixed clocks under root node in SMDK2416 ARM: dts: s3c24xx: add address to CPU node ARM: dts: s3c24xx: align PWM/timer node name with dtschema ARM: dts: s3c24xx: override nodes by label ARM: dts: s3c24xx: fix number of PWM cells ARM: dts: s3c6410: remove additional CPU compatible ARM: dts: s3c6410: align node SROM bus node name with dtschema in SMDK6410 ARM: dts: s3c6410: align node SROM bus node name with dtschema in Mini6410 ARM: dts: s3c6410: move fixed clocks under root node in SMDK6410 ARM: dts: s3c6410: move fixed clocks under root node in Mini6410 ARM: dts: s5pv210: correct ethernet unit address in SMDKV210 ARM: dts: s5pv210: align SPI GPIO node name with dtschema in Aries ... Link: https://lore.kernel.org/r/20200920160705.9651-3-krzk@kernel.org Signed-off-by: Olof Johansson commit dd59aed76d02aa5d511ef660598a6916a2ab1e3c Merge: 61d5d791cbf75 639448912ba17 Author: Olof Johansson Date: Sat Sep 26 10:01:51 2020 -0700 Merge tag 'tegra-for-5.10-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt arm64: tegra: Changes for v5.10-rc1 This set of changes fixes some minor issues in existing device trees and adds ID EEPROMs on the Jetson Xavier NX. All ID EEPROMs are now labelled to allow them to be detected by software. It also adds support for the Tegra234 VDK board, which is a pre-silicon platform for the upcoming Orin SoC. * tag 'tegra-for-5.10-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Initial Tegra234 VDK support arm64: tegra: Populate EEPROMs for Jetson Xavier NX arm64: tegra: Add label properties for EEPROMs arm64: tegra: Add DT binding for AHUB components arm64: tegra: Enable ACONNECT, ADMA and AGIC on Jetson Nano arm64: tegra: Properly size register regions for GPU on Tegra194 arm64: tegra: Use valid PWM period for VDD_GPU on Tegra210 arm64: tegra: Describe display controller outputs for Tegra210 arm64: tegra: Disable SD card write-protection on Jetson Nano arm64: tegra: Add VBUS supply for micro USB port on Jetson Nano arm64: tegra: Wire up pinctrl states for all DPAUX controllers arm64: tegra: Add ID EEPROMs on Jetson AGX Xavier Link: https://lore.kernel.org/r/20200918150303.3938852-5-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 61d5d791cbf750f80eb3227d574c326b10e1755d Merge: 2e6115aa2bedc 2312c291f6ac3 Author: Olof Johansson Date: Sat Sep 26 10:01:05 2020 -0700 Merge tag 'tegra-for-5.10-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt dt-bindings: Changes for v5.10-rc1 This set of changes adds compatible strings for Tegra234 to existing device tree bindings. * tag 'tegra-for-5.10-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: power: supply: Add device-tree binding for Summit SMB3xx dt-bindings: tegra: pmc: Add Tegra234 support dt-bindings: fuse: tegra: Add Tegra234 support dt-bindings: tegra: Add Tegra234 VDK compatible dt-bindings: misc: tegra186-misc: Add Tegra234 support dt-bindings: misc: tegra186-misc: Add missing compatible string dt-bindings: misc: tegra-apbmisc: Add missing compatible strings Link: https://lore.kernel.org/r/20200918150303.3938852-1-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 2e6115aa2bedcd4852822e387baa8b5562526ffd Merge: 0b69d912b3d3c b08892556b3f1 Author: Olof Johansson Date: Sat Sep 26 09:59:51 2020 -0700 Merge tag 'renesas-dt-bindings-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT binding updates for v5.10 - Document core support for the R-Car V3U (R8A779A0) SoC and the Renesas Falcon CPU and BreakOut boards. * tag 'renesas-dt-bindings-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: arm: renesas: Document Renesas Falcon boards dt-bindings: reset: renesas,rst: Document r8a779a0 reset module dt-bindings: power: renesas,rcar-sysc: Document r8a779a0 SYSC bindings dt-bindings: arm: renesas: Document R-Car V3U SoC DT bindings Link: https://lore.kernel.org/r/20200918124800.15555-5-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 0b69d912b3d3cfa446fe276e723764164442121c Merge: e90ac411dcbde c91dfc9818df5 Author: Olof Johansson Date: Sat Sep 26 09:59:24 2020 -0700 Merge tag 'renesas-arm-dt-for-v5.10-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.10 (take two) - PCIe endpoint support for the RZ/G2H SoC, - SATA support for the HopeRun HiHope RZ/G2H board, - Increase support (CAN, LED, SPI NOR, VIN, VSP) for the RZ/G1H SoC on the iWave Qseven board (G21D), and its camera add-on board, - Initial support for the R-Car V3U SoC on the Falcon CPU and BreakOut boards, - HDMI display and sound support for the R-Car M3-W+ SoC on the Salvator-XS board, - Digital Radio Interface (DRIF) support for the R-Car E3 SoC, - Minor fixes and cleanups. * tag 'renesas-arm-dt-for-v5.10-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (24 commits) arm64: dts: renesas: r8a774c0: Fix MSIOF1 DMA channels arm64: dts: renesas: r8a77990: Fix MSIOF1 DMA channels arm64: dts: renesas: r8a77990: Add DRIF support ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add can0 support to camera DB ARM: dts: r8a7742: Add VSP support arm64: dts: renesas: Drop superfluous pin configuration containers arm64: dts: renesas: r8a77961: salvator-xs: Add HDMI Sound support arm64: dts: renesas: r8a77961: salvator-xs: Add HDMI Display support arm64: dts: renesas: r8a77961: Add HDMI device nodes arm64: dts: renesas: r8a77961: Add DU device nodes arm64: dts: renesas: r8a77961: Add VSP device nodes arm64: dts: renesas: r8a77961: Add FCP device nodes arm64: dts: renesas: Fix pin controller node names ARM: dts: renesas: Fix pin controller node names arm64: dts: renesas: Add Renesas Falcon boards support arm64: dts: renesas: Add Renesas R8A779A0 SoC support ARM: dts: r8a7742-iwg21d-q7: Enable SD2 LED indication ARM: dts: r8a7742-iwg21d-q7: Add can1 support to carrier board ARM: dts: r8a7742-iwg21d-q7: Add SPI NOR support ARM: dts: r8a7742: Add VIN DT nodes ... Link: https://lore.kernel.org/r/20200918124800.15555-2-geert+renesas@glider.be Signed-off-by: Olof Johansson commit e90ac411dcbdef4baaf2a1ce244bbe7bab176d4c Author: Krzysztof Kozlowski Date: Thu Sep 17 18:50:40 2020 +0200 arm64: dts: apm: add required gpio-cells to DW APB GPIO controller port The Synopsys DesignWare APB GPIO controller port must have gpio-cells property, as pointed by dtschema: arch/arm64/boot/dts/apm/apm-mustang.dt.yaml: gpio@1c024000: gpio-controller@0: '#gpio-cells' is a required property Link: https://lore.kernel.org/r/20200917165040.22908-2-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Olof Johansson commit 61163895f3e0474b2e668439d2c79708c4122265 Author: Krzysztof Kozlowski Date: Thu Sep 17 18:50:39 2020 +0200 arm64: dts: apm: drop unused reg-io-width from DW APB GPIO controller The Synopsys DesignWare APB GPIO controller driver does not parse reg-io-width and dtschema does not allow it so drop it to fix dtschema warnings like: arch/arm64/boot/dts/apm/apm-mustang.dt.yaml: gpio@1c024000: 'reg-io-width' does not match any of the regexes: '^gpio-(port|controller)@[0-9a-f]+$', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20200917165040.22908-1-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Olof Johansson commit 088a2644de6a16c49cf44d9edfc9490229865c18 Author: Krzysztof Kozlowski Date: Thu Sep 17 18:49:09 2020 +0200 ARM: dts: picoxcell: drop unused reg-io-width from DW APB GPIO controller The Synopsys DesignWare APB GPIO controller driver does not parse reg-io-width and dtschema does not allow it so drop it to fix dtschema warnings like: arch/arm/boot/dts/picoxcell-pc7302-pc3x2.dt.yaml: gpio@20000: 'reg-io-width' does not match any of the regexes: '^gpio-(port|controller)@[0-9a-f]+$', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20200917164909.22490-1-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Acked-by: Jamie Iles Signed-off-by: Olof Johansson commit e89c32fe22e431f09bafa63cf61c76c9551d56cf Author: Krzysztof Kozlowski Date: Thu Sep 17 18:39:57 2020 +0200 ARM: dts: picoxcell: build DTBs with make dtbs Add ARCH_PICOXCELL entries to Makefil so the DTBs get built with `make dtbs`. Link: https://lore.kernel.org/r/20200917163957.21895-1-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Olof Johansson commit 3e0111ecafccb8e5eb78bb7a4b774fbd66810dde Merge: b042dc742440e 860b6d803f3d5 Author: Olof Johansson Date: Sat Sep 26 09:48:35 2020 -0700 Merge tag 'at91-dt-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 DT for 5.10 - New board: GARDENA smart Gateway (Art. 19000) - dtbs_check warnings fixes * tag 'at91-dt-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama5d2: add missing flexcom spi node properties ARM: dts: at91: add unit-address to memory node ARM: dts: at91: move mmc pinctrl-names property to board dts ARM: dts: at91: fix sram nodes ARM: dts: at91: fix cpu node ARM: at91: Add GARDENA smart Gateway (Art. 19000) support dt-bindings: arm: at91: Add GARDENA smart Gateway (Art. 19000) board Link: https://lore.kernel.org/r/20200916211348.GA275895@piout.net Signed-off-by: Olof Johansson commit b042dc742440edeb3e405cc79039edf7f5ff5fd1 Merge: dc47f7e7729d5 6e043c658e791 Author: Olof Johansson Date: Sat Sep 26 09:48:12 2020 -0700 Merge tag 'socfpga_dts_update_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/dt SoCFPGA DTS updates for v5.10 - Increase shared-dma-pool size to 32MB - Add ptp_ref clock properties to the ethernet nodes on Stratix10 and Agilex * tag 'socfpga_dts_update_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: stratix10/agilex: add the ptp_ref clock arm64: dts: agilex: increase shared memory size to 32Mb Link: https://lore.kernel.org/r/20200916204422.30897-1-dinguyen@kernel.org Signed-off-by: Olof Johansson commit dc47f7e7729d5a016e6c842a924cadf8595b8977 Merge: 38c419037abe6 78efa6a766eb3 Author: Olof Johansson Date: Sat Sep 26 09:47:47 2020 -0700 Merge tag 'ux500-dts-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into arm/dt Ux500 DTS updates for the v5.10 kernel cycle: - Add the s6e63m0 display to the Golden device - Add the KTD253 backlight to the Skomer device - Update the LP5521 LED DTS entries for binding changes * tag 'ux500-dts-for-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: dts: ste-href: Add reg property to the LP5521 channel nodes ARM: dts: ux500-skomer: Add KTD253 backlight ARM: dts: ux500-golden: Add S6E63M0 DSI display Link: https://lore.kernel.org/r/CACRpkda=-cgFjN7K2vBU5x4uSYrohrZSbjqMnSFb3Qe2Az1W5g@mail.gmail.com Signed-off-by: Olof Johansson commit 38c419037abe6d5fd8df20569cd9b0262983902b Merge: a7140476d6806 5df50128050d0 Author: Olof Johansson Date: Sat Sep 26 09:47:10 2020 -0700 Merge tag 'sparx5-dt-5.10' of https://github.com/microchip-ung/linux-upstream into arm/dt Sparx5 DT updates for Linux 5.10 - Add public repo to MAINTAINERS - Add SPI controller and devices - Add eMMC controller and devices - Add temperature sensor * tag 'sparx5-dt-5.10' of https://github.com/microchip-ung/linux-upstream: arm64: dts: sparx5: Add spi-nand devices arm64: dts: sparx5: Add spi-nor support arm64: dts: sparx5: Add SPI controller and associated mmio-mux MAINTAINERS: Add git tree for Sparx5 arm64: dts: sparx5: Add hwmon temperature sensor arm64: dts: sparx5: Add Sparx5 eMMC support Link: https://lore.kernel.org/r/878sda2dj0.fsf@microchip.com Signed-off-by: Olof Johansson commit a7140476d68067d05796fcb86fc7d7a94e3523c7 Merge: 39d601ba9a4dd 3328c656663f5 Author: Olof Johansson Date: Sat Sep 26 09:46:29 2020 -0700 Merge tag 'hisi-arm32-dt-for-5.10' of git://github.com/hisilicon/linux-hisi into arm/dt ARM: DT: Hisilicon ARM32 SoCs DT updates for 5.10 - Update the SP804 nodes to have the correct clocks and clock names for the hi3620 SoC - Update the SP805 nodes to have the correct clocks and clock names for the hix5hd2 SoC * tag 'hisi-arm32-dt-for-5.10' of git://github.com/hisilicon/linux-hisi: ARM: dts: hisilicon: Fix SP805 clocks ARM: dts: hisilicon: Fix SP804 users Link: https://lore.kernel.org/r/5F617209.90003@hisilicon.com Signed-off-by: Olof Johansson commit 39d601ba9a4dd9996d841dc89334d88920b8730a Merge: 5f37a0d90360b a665b2c1d2840 Author: Olof Johansson Date: Sat Sep 26 09:46:09 2020 -0700 Merge tag 'hisi-arm64-dt-for-5.10' of git://github.com/hisilicon/linux-hisi into arm/dt ARM64: DT: Hisilicon ARM64 SoCs DT updates for 5.10 - Change the status properties from "ok" to "okay" for all the hisilicon SoCs - Update the SP805 nodes to have the correct clocks and clock names for the hi3660 and hi6220 SoCs * tag 'hisi-arm64-dt-for-5.10' of git://github.com/hisilicon/linux-hisi: arm64: dts: hisilicon: Fix SP805 clocks arm64: dts: hisilicon: replace status value "ok" by "okay" Link: https://lore.kernel.org/r/5F617134.3050705@hisilicon.com Signed-off-by: Olof Johansson commit ad5ceb33eee128346475f5efa672e6402ae15e51 Author: Sven Schnelle Date: Mon Sep 21 17:23:42 2020 +0200 s390/stp: unify stp_work_mutex and clock_sync_mutex No need to have two mutexes, and while at it rename it to stp_mutex. Signed-off-by: Sven Schnelle Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik commit 4fb53dde770cc095a6e279ca9d9c72d49488cdb3 Author: Sven Schnelle Date: Wed Jun 17 10:58:47 2020 +0200 s390/stp: add sysfs file to show scheduled leap seconds This patch introduces /sys/devices/system/stp/scheduled_leap_seconds, which will contain either 0,0 if no leap second is scheduled, or the UTC timestamp + leap second offset. Signed-off-by: Sven Schnelle Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik commit b2539aa0d7ff1e42c74a9dd8c73ec1c2771c9e5d Author: Sven Schnelle Date: Fri Jun 12 12:59:19 2020 +0200 s390/stp: add support for leap seconds In the current implementation, leap seconds are only synchronized during the bootup process when the STP clock is synced. If the Leap second offset (LSO) changes the machine must be rebooted, which is not desired. This patch adds the required code to handle Leap second changes during runtime. If the Leap second changes, a Configuration change machine check is triggered. The STP code than schedules a Leap second insertion/deletion with do_adjtimex(). Signed-off-by: Sven Schnelle Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik commit 4ab79ed223d2ff32ffe16cfd841e064199341c34 Author: Sven Schnelle Date: Tue Sep 8 10:14:00 2020 +0200 s390/stp: use u32 instead of unsigned int In hardware-dependent headers using u32 is easier to read and less error-prone. Signed-off-by: Sven Schnelle Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik commit bb7d066a091654b6d6c0b6061bda438bf36c6613 Author: Sven Schnelle Date: Mon Aug 3 08:50:38 2020 +0200 s390/stp: use __packed Use __packed instead of __attribute__((packed)) Signed-off-by: Sven Schnelle Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik commit b3bd02495cb339124f13135d51940cf48d83e5cb Author: Sven Schnelle Date: Tue Sep 15 08:53:50 2020 +0200 s390/stp: add locking to sysfs functions The sysfs function might race with stp_work_fn. To prevent that, add the required locking. Another issue is that the sysfs functions are checking the stp_online flag, but this flag just holds the user setting whether STP is enabled. Add a flag to clock_sync_flag whether stp_info holds valid data and use that instead. Cc: stable@vger.kernel.org Signed-off-by: Sven Schnelle Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik commit e88349437654f9d1b3c144049b9990026f911e56 Author: Lad Prabhakar Date: Sun Sep 13 20:16:08 2020 +0200 media: rcar-vin: Enable YDS bit depending on bus_width and data_shift Enable YDS bit if bus_width and data_shift is set to 8 in parallel mode for MEDIA_BUS_FMT_UYVY8_2X8 format. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fe98df32bd9e41b5ac2cdbd8c8ce97182b81b495 Author: Lad Prabhakar Date: Thu Jul 16 19:18:34 2020 +0200 media: rcar-vin: Enable support for R8A774E1 Add the SoC specific information for RZ/G2H (R8A774E1) SoC. Also add the routing information between CSI2 and VIN (which is similar to R-Car H3 except it lacks CSI41). Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bc39d306450d0725dc82ac32a4d7a31588d3928e Author: Lad Prabhakar Date: Thu Jul 16 19:18:33 2020 +0200 media: rcar-csi2: Enable support for R8A774E1 Add the MIPI CSI-2 driver support for RZ/G2H (R8A774E1) SoC. The CSI-2 module of RZ/G2H is similar to R-Car H3. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 200b0d9a754e5436c2952c934c813a3b26da78b2 Author: Lad Prabhakar Date: Thu Jul 16 19:18:32 2020 +0200 media: dt-bindings: media: renesas,vin: Add R8A774E1 support Document support for the VIN module in the Renesas RZ/G2H (R8A774E1) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Niklas Söderlund Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6a893d4ee149fd43d57d1ea4314e1b4a8dba8df4 Author: Lad Prabhakar Date: Thu Jul 16 19:18:31 2020 +0200 media: dt-bindings: media: renesas,csi2: Add R8A774E1 support Add the compatible string for RZ/G2H (R8A774E1) to the list of supported SoCs. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Niklas Söderlund Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7b817585b730665126b45df5508dd69526448bc8 Author: Xiaolong Huang Date: Fri Apr 17 11:52:30 2020 +0200 media: media/pci: prevent memory leak in bttv_probe In bttv_probe if some functions such as pci_enable_device, pci_set_dma_mask and request_mem_region fails the allocated memory for btv should be released. Signed-off-by: Xiaolong Huang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c8872483bb43fe6aff657190f9b71bae56fcf160 Author: Vaibhav Gupta Date: Mon Jun 22 14:02:30 2020 +0200 media: saa7134: use generic power management With the support of generic PM callbacks, drivers no longer need to use legacy .suspend() and .resume() in which they had to maintain PCI states changes and device's power state themselves. The required operations are done by PCI core. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b9dacf1b3430540519e857ae7e0c80f8391237f7 Author: Lad Prabhakar Date: Tue Sep 15 20:20:27 2020 +0200 media: rcar-vin: Kconfig: Update help description for VIDEO_RCAR_VIN config The rcar-vin driver also supports RZ/G{1,2} SoC's, update the description to reflect this. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 59d29b42baf6979868253ab4273e2032aadee2ee Author: Lad Prabhakar Date: Tue Sep 15 20:20:26 2020 +0200 media: rcar-vin: Kconfig: Update help description for VIDEO_RCAR_CSI2 config The rcar-csi2 driver also supports RZ/G2 SoC's, update the description to reflect this. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e2d7dac34c02edb283fb34a14621ae4cb18cf38a Author: Lad Prabhakar Date: Fri Sep 11 12:10:46 2020 +0200 media: rcar-fcp: Update description for VIDEO_RENESAS_FCP Kconfig entry The rcar-fcp driver is also used on Renesas RZ/G2 SoCs. Update the Kconfig entry description to reflect this. [hverkuil: incorporated Laurent's suggestions for subject and commit log] Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 77fd2ca67a79a1c7b041872412671153f7cf4c84 Author: Lad Prabhakar Date: Mon Sep 7 16:45:08 2020 +0200 media: dt-bindings: media: renesas,vin: Add device tree support for r8a7742 Add compatible string for r8a7742. No driver change is needed as "renesas,rcar-gen2-vin" will activate the right code. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8b7c0280ab03ddf465c948cb510debb85eb4e8ac Author: Marek Szyprowski Date: Fri Sep 4 15:17:11 2020 +0200 media: videobuf2: use sgtable-based scatterlist wrappers Use recently introduced common wrappers operating directly on the struct sg_table objects and scatterlist page iterators to make the code a bit more compact, robust, easier to follow and copy/paste safe. No functional change, because the code already properly did all the scatterlist related calls. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f95fc014e036c06203c0c5d75045e4ac890ef335 Author: Marek Szyprowski Date: Fri Sep 4 15:17:10 2020 +0200 media: pci: fix common ALSA DMA-mapping related codes The Documentation/DMA-API-HOWTO.txt states that dma_map_sg returns the numer of the created entries in the DMA address space. However the subsequent calls to dma_sync_sg_for_{device,cpu} and dma_unmap_sg must be called with the original number of entries passed to dma_map_sg. The sg_table->nents in turn holds the result of the dma_map_sg call as stated in include/linux/scatterlist.h. Adapt the code to obey those rules. While touching this code, update it to use the modern DMA_FROM_DEVICE definitions. Signed-off-by: Marek Szyprowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ab11fae0be7a7bcb7aec75c5b081d37ed0a0ed08 Author: Wei Yongjun Date: Wed Sep 9 13:29:21 2020 +0200 media: marvell-ccic: mmp: mark PM functions as __maybe_unused The suspend/resume functions have no callers depending on configuration, so they must be marked __maybe_unused to avoid these harmless warnings: drivers/media/platform/marvell-ccic/mmp-driver.c:347:12: warning: 'mmpcam_resume' defined but not used [-Wunused-function] 347 | static int mmpcam_resume(struct device *dev) | ^~~~~~~~~~~~~ drivers/media/platform/marvell-ccic/mmp-driver.c:338:12: warning: 'mmpcam_suspend' defined but not used [-Wunused-function] 338 | static int mmpcam_suspend(struct device *dev) | ^~~~~~~~~~~~~~ Fixes: 55cd34524aa3 ("media: marvell-ccic: add support for runtime PM") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 11fceb9b5fabdf0b99212943c20986b936f67c73 Author: Corentin Labbe Date: Fri Sep 4 13:27:54 2020 +0200 media: MAINTAINERS: media: cec: fix files location Files have moved, fixes their paths. Fixes: 4be5e8648b0c ("media: move CEC platform drivers to a separate directory") Signed-off-by: Corentin Labbe Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 877cb8a444dad2304e891294afb0915fe3c278d6 Author: Tom Rix Date: Wed Sep 2 20:32:12 2020 +0200 media: tc358743: cleanup tc358743_cec_isr tc358743_cec_isr is misnammed, it is not the main isr. So rename it to be consistent with its siblings, tc358743_cec_handler. It also does not check if its input parameter 'handled' is is non NULL like its siblings, so add a check. Fixes: a0ec8d1dc42e ("media: tc358743: add CEC support") Signed-off-by: Tom Rix Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2d307380efec79ef7e1bd91ad4886fc02e2df26a Author: Hans Verkuil Date: Tue Sep 8 12:26:11 2020 +0200 media: cec-adap.c: add 'unregistered' checks Make the code a bit more robust by checking if the adapter has been unregistered at the start of cec_transmit_msg_fh() and cec_received_msg_ts(). If it is unregistered, then just return. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5254187cfaf22facc42415ad45c16db53ffd0c87 Author: Hans Verkuil Date: Tue Sep 8 12:26:10 2020 +0200 media: cec-core.c: stop kthread_config before kthread The kthread_config relies on the main kthread (message processing loop) to be present, so stop kthread_config before kthread. It's unlikely to be a problem (and I've never seen any issues), but if nothing else it makes sense to stop the threads in this order. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0893e4b2998a5d8d0c281909508fd4e6d1273d6c Author: Sowjanya Komatineni Date: Mon Aug 31 17:37:38 2020 +0200 media: tegra-video: Fix compilation warning of unused variable vi_pattern_strings is used only when CONFIG_VIDEO_TEGRA_TPG is enabled and V4L2 control operations currently are used only in TPG mode. So when tegra-video is build for non TPG, warnings of unused variable is reported for v4l2 control operation variable. This patch fixes it. Reported-by: kernel test robot Signed-off-by: Sowjanya Komatineni Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 274cf92d5dff5c2fec1a518078542ffe70d07646 Author: Tom Rix Date: Sun Aug 30 18:30:43 2020 +0200 media: tc358743: initialize variable clang static analysis flags this error tc358743.c:1468:9: warning: Branch condition evaluates to a garbage value return handled ? IRQ_HANDLED : IRQ_NONE; ^~~~~~~ handled should be initialized to false. Fixes: d747b806abf4 ("[media] tc358743: add direct interrupt handling") Signed-off-by: Tom Rix Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0ca9454740b05eec199c5ffdb23a79eb44437917 Author: Dafna Hirschfeld Date: Fri Aug 28 15:55:41 2020 +0200 media: mtk-mdp: Fix Null pointer dereference when calling list_add In list_add, the first variable is the new node and the second is the list head. The function is called with a wrong order causing NULL dereference: [ 15.527030] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 [ 15.542317] Mem abort info: [ 15.545152] ESR = 0x96000044 [ 15.548248] EC = 0x25: DABT (current EL), IL = 32 bits [ 15.553624] SET = 0, FnV = 0 [ 15.556715] EA = 0, S1PTW = 0 [ 15.559892] Data abort info: [ 15.562799] ISV = 0, ISS = 0x00000044 [ 15.566678] CM = 0, WnR = 1 [ 15.569683] user pgtable: 4k pages, 48-bit VAs, pgdp=00000001373f0000 [ 15.576196] [0000000000000008] pgd=0000000000000000, p4d=0000000000000000 [ 15.583101] Internal error: Oops: 96000044 [#1] PREEMPT SMP [ 15.588747] Modules linked in: mtk_mdp(+) cfg80211 v4l2_mem2mem videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common vide odev mt8173_rt5650 smsc95xx usbnet ecdh_generic ecc snd_soc_rt5645 mc mt8173_afe_pcm rfkill cros_ec_sensors snd_soc_mtk_common elan_i2c crct10dif_ce cros_ec_se nsors_core snd_soc_rl6231 elants_i2c industrialio_triggered_buffer kfifo_buf mtk_vpu cros_ec_chardev cros_usbpd_charger cros_usbpd_logger sbs_battery display_c onnector pwm_bl ip_tables x_tables ipv6 [ 15.634295] CPU: 0 PID: 188 Comm: systemd-udevd Not tainted 5.9.0-rc2+ #69 [ 15.641242] Hardware name: Google Elm (DT) [ 15.645381] pstate: 20000005 (nzCv daif -PAN -UAO BTYPE=--) [ 15.651022] pc : mtk_mdp_probe+0x134/0x3a8 [mtk_mdp] [ 15.656041] lr : mtk_mdp_probe+0x128/0x3a8 [mtk_mdp] [ 15.661055] sp : ffff80001255b910 [ 15.669548] x29: ffff80001255b910 x28: 0000000000000000 [ 15.679973] x27: ffff800009089bf8 x26: ffff0000fafde800 [ 15.690347] x25: ffff0000ff7d2768 x24: ffff800009089010 [ 15.700670] x23: ffff0000f01a7cd8 x22: ffff0000fafde810 [ 15.710940] x21: ffff0000f01a7c80 x20: ffff0000f0c3c180 [ 15.721148] x19: ffff0000ff7f1618 x18: 0000000000000010 [ 15.731289] x17: 0000000000000000 x16: 0000000000000000 [ 15.741375] x15: 0000000000aaaaaa x14: 0000000000000020 [ 15.751399] x13: 00000000ffffffff x12: 0000000000000020 [ 15.761363] x11: 0000000000000028 x10: 0101010101010101 [ 15.771279] x9 : 0000000000000004 x8 : 7f7f7f7f7f7f7f7f [ 15.781148] x7 : 646bff6171606b2b x6 : 0000000000806d65 [ 15.790981] x5 : ffff0000ff7f8360 x4 : 0000000000000000 [ 15.800767] x3 : 0000000000000004 x2 : 0000000000000001 [ 15.810501] x1 : 0000000000000005 x0 : 0000000000000000 [ 15.820171] Call trace: [ 15.826944] mtk_mdp_probe+0x134/0x3a8 [mtk_mdp] [ 15.835908] platform_drv_probe+0x54/0xa8 [ 15.844247] really_probe+0xe4/0x3b0 [ 15.852104] driver_probe_device+0x58/0xb8 [ 15.860457] device_driver_attach+0x74/0x80 [ 15.868854] __driver_attach+0x58/0xe0 [ 15.876770] bus_for_each_dev+0x70/0xc0 [ 15.884726] driver_attach+0x24/0x30 [ 15.892374] bus_add_driver+0x14c/0x1f0 [ 15.900295] driver_register+0x64/0x120 [ 15.908168] __platform_driver_register+0x48/0x58 [ 15.916864] mtk_mdp_driver_init+0x20/0x1000 [mtk_mdp] [ 15.925943] do_one_initcall+0x54/0x1b4 [ 15.933662] do_init_module+0x54/0x200 [ 15.941246] load_module+0x1cf8/0x22d0 [ 15.948798] __do_sys_finit_module+0xd8/0xf0 [ 15.956829] __arm64_sys_finit_module+0x20/0x30 [ 15.965082] el0_svc_common.constprop.0+0x6c/0x168 [ 15.973527] do_el0_svc+0x24/0x90 [ 15.980403] el0_sync_handler+0x90/0x198 [ 15.987867] el0_sync+0x158/0x180 [ 15.994653] Code: 9400014b 2a0003fc 35000920 f9400280 (f9000417) [ 16.004299] ---[ end trace 76fee0203f9898e5 ]--- Fixes: 86698b9505bbc ("media: mtk-mdp: convert mtk_mdp_dev.comp array to list") Signed-off-by: Dafna Hirschfeld Reviewed-by: Matthias Brugger Tested-by: Enric Balletbo i Serra Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 25d8cf786d34b5167f2c01e092eeedcb0ae58628 Author: Dafna Hirschfeld Date: Thu Aug 27 21:46:12 2020 +0200 media: staging: rkisp1: rsz: set flags to 0 in enum_mbus_code cb The resizer calls the enum_mbus_code cb on the source pad of the isp entity since they support the same formats. The only difference is that the isp entity allows setting the quantization and sets the flag V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION. The resizer should therefore set the flags to 0. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6616726907418ec5550674c468998b4cd96cb54a Author: Dafna Hirschfeld Date: Thu Aug 27 21:46:11 2020 +0200 media: staging: rkisp1: allow quantization setting by userspace on the isp source pad The isp entity has hardware support to force full range quantization for YUV formats. Use the subdev CSC API to allow userspace to set the quantization for YUV formats on the isp entity. - The flag V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION is set for YUV formats during enumeration of the isp formats on the source pad. - The full quantization is set on YUV formats if userspace asks it on the isp entity using the flag V4L2_MBUS_FRAMEFMT_SET_CSC. On the capture and the resizer, the quantization is read-only and always set to the default quantization. Signed-off-by: Dafna Hirschfeld Reviewed-by: Laurent Pinchart Acked-by: Helen Koike Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 62aacfa9bf93f94f6949338e0c7a2ed4c4bd2c2a Author: Dafna Hirschfeld Date: Thu Aug 27 21:46:10 2020 +0200 media: v4l2: extend the CSC API to subdevice. This patch extends the CSC API in video devices to be supported also on sub-devices. The flag V4L2_MBUS_FRAMEFMT_SET_CSC set by the application when calling VIDIOC_SUBDEV_S_FMT ioctl. The flags: V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE, V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC, V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC/V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION are set by the driver in the VIDIOC_SUBDEV_ENUM_MBUS_CODE ioctl. New 'flags' fields were added to the structs v4l2_subdev_mbus_code_enum, v4l2_mbus_framefmt which are borrowed from the 'reserved' field The patch also replaces the 'ycbcr_enc' field in 'struct v4l2_mbus_framefmt' with a union that includes 'hsv_enc' Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f491463497ad43bc06968a334747c6b6b20fc74 Author: Dafna Hirschfeld Date: Thu Aug 27 21:46:09 2020 +0200 media: vivid: Add support to the CSC API The CSC API (Colorspace conversion) allows userspace to try to configure the colorspace, transfer function, Y'CbCr/HSV encoding and the quantization for capture devices. This patch adds support to the CSC API in vivid. Using the CSC API, userspace is allowed to do the following: - Set the colorspace. - Set the xfer_func. - Set the ycbcr_enc function for YUV formats. - Set the hsv_enc function for HSV formats - Set the quantization for YUV and RGB formats. Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b38c73ca1c213bbf8a872b334a6bb835becfaba5 Author: Dafna Hirschfeld Date: Thu Aug 27 21:46:08 2020 +0200 media: v4l2: add support for colorspace conversion API (CSC) for video capture For video capture it is the driver that reports the colorspace, transfer function, Y'CbCr/HSV encoding and quantization range used by the video, and there is no way to request something different, even though many HDTV receivers have some sort of colorspace conversion capabilities. For output video this feature already exists since the application specifies this information for the video format it will send out, and the transmitter will enable any available CSC if a format conversion has to be performed in order to match the capabilities of the sink. For video capture we propose adding new v4l2_pix_format flag: V4L2_PIX_FMT_FLAG_SET_CSC. The flag is set by the application, the driver will interpret the colorspace, xfer_func, ycbcr_enc/hsv_enc and quantization fields as the requested colorspace information and will attempt to do the conversion it supports. Drivers set the flags V4L2_FMT_FLAG_CSC_COLORSPACE, V4L2_FMT_FLAG_CSC_XFER_FUNC, V4L2_FMT_FLAG_CSC_YCBCR_ENC/V4L2_FMT_FLAG_CSC_HSV_ENC, V4L2_FMT_FLAG_CSC_QUANTIZATION, in the flags field of the struct v4l2_fmtdesc during enumeration to indicate that they support colorspace conversion for the respective field. Drivers do not have to actually look at the flags. If the flags are not set, then the fields 'colorspace', 'xfer_func', 'ycbcr_enc/hsv_enc', and 'quantization' are set to the default values by the core, i.e. just pass on the received format without conversion. Signed-off-by: Hans Verkuil Signed-off-by: Philipp Zabel Signed-off-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab commit 1698a7f1511267a0d07a783dd467eab19bf498f3 Author: Alexandre Courbot Date: Thu Aug 27 14:49:46 2020 +0200 media: v4l2-mem2mem: simplify poll logic Factorize redundant checks into a single code block, remove unneeded checks (a buffer in done_list is necessarily in the DONE or ERROR state), and we end up with a much simpler version of this function. Signed-off-by: Alexandre Courbot Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 566463afdbc43c7744c5a1b89250fc808df03833 Author: Alexandre Courbot Date: Thu Aug 27 14:49:45 2020 +0200 media: v4l2-mem2mem: always consider OUTPUT queue during poll If poll() is called on a m2m device with the EPOLLOUT event after the last buffer of the CAPTURE queue is dequeued, any buffer available on OUTPUT queue will never be signaled because v4l2_m2m_poll_for_data() starts by checking whether dst_q->last_buffer_dequeued is set and returns EPOLLIN in this case, without looking at the state of the OUTPUT queue. Fix this by not early returning so we keep checking the state of the OUTPUT queue afterwards. Signed-off-by: Alexandre Courbot Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 21d387b8d372f859d9e87fdcc7c3b4a432737f4d Author: Dinghao Liu Date: Wed Aug 26 11:26:04 2020 +0200 media: mx2_emmaprp: Fix memleak in emmaprp_probe When platform_get_irq() fails, we should release vfd and unregister pcdev->v4l2_dev just like the subsequent error paths. Fixes: d4e192cc44914 ("media: mx2_emmaprp: Check for platform_get_irq() error") Signed-off-by: Dinghao Liu Reviewed-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 057e212eae72f8a2741310fa03f1f522cfe36187 Author: Greg Kroah-Hartman Date: Tue Aug 18 15:36:08 2020 +0200 media: usb: uvc: 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 59b2076df4fd905471a33805526d668226f3f814 Author: Alexandre Courbot Date: Fri Aug 21 13:19:23 2020 +0200 media: mtk-vcodec: make IRQs disabled upon request The driver requests IRQs to disable them immediately. This is potentially racy, fix this by requesting the IRQs to come disabled instead using the IRQ_NOAUTOEN flag of irq_set_status_flags(). Reported-by: Ezequiel Garcia Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 42f401e751b58ef071874779ef972187ef5dfce3 Author: Alexandre Courbot Date: Fri Aug 21 12:36:08 2020 +0200 media: mtk-vcodec: venc: fix invalid time per frame in S_PARM v4l2-compliance expects the driver to adjust the time per frame if it is invalid (numerator or denominator set to 0). Adjust it to the default value in these cases. Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7ee20328e470b15528f9f53b7177e05628f92609 Author: Alexandre Courbot Date: Fri Aug 21 12:36:07 2020 +0200 media: mtk-vcodec: venc: set default time per frame The time per frame was left initialized to 0/0, which make the driver fail v4l2-compliance, and also leaves it potentially exposed to doing a division by zero. Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2c86bf67d05692b16b5a82ba62f1e9afcaeb7e7a Author: Alexandre Courbot Date: Fri Aug 21 12:36:06 2020 +0200 media: mtk-vcodec: venc: support ENUM_FRAMESIZES on OUTPUT formats v4l2-compliance requires ENUM_FRAMESIZES to support OUTPUT formats. Reuse mtk_venc_find_format() to make sure both queues are considered when serving an ENUM_FRAMESIZES. [hverkuil: fixed some checkpatch alignment warnings] Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cd385511520e22ec0e8bdbfb7fbb997a4256ac88 Author: Alexandre Courbot Date: Fri Aug 21 12:36:05 2020 +0200 media: mtk-vcodec: venc: use platform data for ENUM_FRAMESIZES vidioc_enum_framesizes() assumes that all encoders support H.264 and VP8, which is not necessarily true and requires to duplicate information about the supported codecs which is already stored in the platform data. Fix this by referring to the platform data to find out whether a given format is supported. Since the supported sizes are all the same regardless of the format, we can then return a copy of a static value if the format is supported. Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 327296920f9dedfc6ba4ef8f5a686c9667c65f38 Author: Alexandre Courbot Date: Fri Aug 21 12:36:04 2020 +0200 media: mtk-vcodec: venc: set OUTPUT buffers field to V4L2_FIELD_NONE A default value of 0 means V4L2_FIELD_ANY, which is not correct. Reported by v4l2-compliance. Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f01b10fa5abc66f24b5e5e2be7a4a3f7561387c1 Author: Alexandre Courbot Date: Fri Aug 21 12:36:03 2020 +0200 media: mtk-vcodec: venc support MIN_OUTPUT_BUFFERS control This control is required by v4l2-compliance for encoders. A value of 1 should be suitable for all scenarios. Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bcbe5adac37ab9c7051c14f7987465893f36d44f Author: Alexandre Courbot Date: Fri Aug 21 12:36:02 2020 +0200 media: Revert "media: mtk-vcodec: Remove extra area allocation in an input buffer on encoding" This reverts commit 81735ecb62f882853a37a8c157407ec4aed44fd0. The hardware needs data to follow the previous alignment, so this extra space was not superfluous after all. Besides, this also made v4l2-compliance's G_FMT and S_FMT tests regress. Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c9082c9d39987933958d9075e45721fe9b9a2fcb Author: Yunfei Dong Date: Fri Aug 21 12:36:01 2020 +0200 media: mtk-vcodec: add support for MT8183 encoder Now that all the supporting blocks are present, enable encoder for MT8183. [acourbot: refactor, cleanup and split] Signed-off-by: Yunfei Dong Co-developed-by: Alexandre Courbot Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f466afdffa64ad26e66e9441492afbb583bafda7 Author: Alexandre Courbot Date: Fri Aug 21 12:35:59 2020 +0200 media: dt-bindings: media: document mediatek,mt8183-vcodec-enc MT8183's encoder is similar to MT8173's. Signed-off-by: Alexandre Courbot Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eae6f634327eb196c8c2fe6c69800d04f73bd5bd Author: Alexandre Courbot Date: Fri Aug 21 12:35:58 2020 +0200 media: mtk-vcodec: venc: specify supported formats per-chip Different chips have different supported formats. Move the list of supported formats to the platform data, and split the output and capture formats into two lists to make it easier to find the default format for each queue. [hverkuil: fixed some checkpatch alignment warnings] Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 42f2ea26df2cef82853a33e9c40e65aeefe31228 Author: Alexandre Courbot Date: Fri Aug 21 12:35:57 2020 +0200 media: mtk-vcodec: venc: specify bitrate range per-chip Different chips have different supported bitrate ranges. Move the min and max supported bitrates to the platform data. Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c2bc04560ce0b4297f3ea2fec4e4f19848b9d11e Author: Alexandre Courbot Date: Fri Aug 21 12:35:56 2020 +0200 media: mtk-vcodec: venc: handle firmware version field Firmwares for encoders newer than MT8173 will include an ABI version number in their initialization ack message. Add the capacity to manage it and make initialization fail if the firmware ABI is of a version that we don't support. For MT8173, this ABI version field is reserved and thus undefined ; thus ignore it on this chip. There should only be one firmware version available for it anyway. Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0dc4b3286125797a3ff03c4e3d7522e6bebadf63 Author: Yunfei Dong Date: Fri Aug 21 12:35:55 2020 +0200 media: mtk-vcodec: venc: support SCP firmware Support the new extended firmware used by MT8183's encoder. [acourbot: refactor, cleanup and split] [hverkuil: fixed some checkpatch alignment warnings] Signed-off-by: Yunfei Dong Co-developed-by: Alexandre Courbot Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c7244811b1c951dca812079d16b17cb241882a80 Author: Yunfei Dong Date: Fri Aug 21 12:35:54 2020 +0200 media: mtk-vcodec: add SCP firmware ops Add support for communicating with the SCP firmware, which will be used by MT8183. [acourbot: refactor, cleanup and split] [hverkuil: fixed some checkpatch alignment warnings] Signed-off-by: Yunfei Dong Co-developed-by: Alexandre Courbot Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Reported-by: kernel test robot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 97b022a8281cdc290c5ff0d6cd4c0f29ff9fc9ad Author: Alexandre Courbot Date: Fri Aug 21 12:35:53 2020 +0200 media: dt-bindings: media: mtk-vcodec: document SCP node The mediatek codecs can use either the VPU or the SCP as their interface to firmware. Reflect this in the DT bindings. Signed-off-by: Alexandre Courbot Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bf1d556ad4e0f8d92753d3b9896d492f4f065822 Author: Yunfei Dong Date: Fri Aug 21 12:35:52 2020 +0200 media: mtk-vcodec: abstract firmware interface MT8183's codec firmware is run by a different remote processor from MT8173. While the firmware interface is basically the same, the way to invoke it differs. Abstract all firmware calls under a layer that will allow us to handle both firmware types transparently. [acourbot: refactor, cleanup and split] [pihsun: fix error path and add mtk_vcodec_fw_release] [hverkuil: fixed some checkpatch alignment warnings] [hverkuil: fixed merge conflicts] Signed-off-by: Yunfei Dong Co-developed-by: Alexandre Courbot Signed-off-by: Alexandre Courbot Signed-off-by: Pi-Hsun Shih Reviewed-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cbd2dca74926c0e4610c40923cc786b732c9e8ef Author: Alexandre Courbot Date: Fri Aug 21 20:58:32 2020 +0900 remoteproc: scp: add COMPILE_TEST dependency This will improve this driver's build coverage. Reported-by: Ezequiel Garcia Signed-off-by: Alexandre Courbot Acked-by: Bjorn Andersson Signed-off-by: Mauro Carvalho Chehab commit fd0b6c1ff85a489bcf1bcf58af64da1aeffd39f0 Author: Pi-Hsun Shih Date: Mon Sep 21 17:48:46 2020 +0800 remoteproc/mediatek: Add support for mt8192 SCP Add support for mt8192 SCP. Signed-off-by: Pi-Hsun Shih Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200921094847.2112399-1-pihsun@chromium.org Signed-off-by: Bjorn Andersson commit 1894622636745237f882bfab47925afc48e122e0 Author: Sibi Sankar Date: Wed Sep 16 20:21:00 2020 +0530 remoteproc: Fixup coredump debugfs disable request Fix the discrepancy observed between accepted input and read back value while disabling remoteproc coredump through the coredump debugfs entry. Fixes: 3afdc59e4390 ("remoteproc: Add coredump debugfs entry") Cc: stable@vger.kernel.org Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200916145100.15872-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 4360f93ac39cbd01a18fa58094311501f76b105c Author: Sibi Sankar Date: Thu Sep 17 23:28:40 2020 +0530 remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA boot On secure devices which support warm reset, the MBA firmware requires access to the modem region to clear them out. Hence provide Q6 access to this region before MBA boot. This will be a nop during a modem SSR. Reviewed-by: Stephen Boyd Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200917175840.18708-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 434ac4d51407ce3764a6ae96a89d90b8ae2826fb Author: Colin Ian King Date: Fri Sep 18 16:24:28 2020 +0100 remoteproc/mediatek: fix null pointer dereference on null scp pointer Currently when pointer scp is null a dev_err is being called that references the pointer which is the very thing we are trying to avoid doing. Remove the extraneous error message to avoid this issue. Addresses-Coverity: ("Dereference after null check") Fixes: 63c13d61eafe ("remoteproc/mediatek: add SCP support for mt8183") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200918152428.27258-1-colin.king@canonical.com Signed-off-by: Bjorn Andersson commit d1ea914925856d397b0b3241428f20b945e31434 Author: Abhinav Kumar Date: Fri Sep 25 19:55:12 2020 -0700 drm/msm/dp: fix incorrect function prototype of dp_debug_get() Fix the incorrect function prototype for dp_debug_get() in the dp_debug module to address compilation warning. Also add prototype for msm_dp_debugfs_init() for fixing compilation issue with other defconfigs. changes in v2: - add prototype for msm_dp_debugfs_init() Fixes: f913454aae8e ("drm/msm/dp: move debugfs node to /sys/kernel/debug/dri/*/") Reported-by: kernel test robot Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit 505f394fa239cecb76d916aa858f87ed7ea7fde4 Author: Dmitry Torokhov Date: Fri Sep 25 16:35:52 2020 -0700 HID: hid-input: fix stylus battery reporting With commit 4f3882177240 hid-input started clearing of "ignored" usages to avoid using garbage that might have been left in them. However "battery strength" usages should not be ignored, as we do want to use them. Fixes: 4f3882177240 ("HID: hid-input: clear unmapped usages") Reported-by: Kenneth Albanowski Tested-by: Kenneth Albanowski Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit cb9e4a7341d391564bae361b814144c0597719b7 Merge: 6fba737a93207 50db1bca55208 Author: David S. Miller Date: Fri Sep 25 17:20:57 2020 -0700 Merge branch 'devlink-flash-update-overwrite-mask' Jacob Keller says: ==================== devlink flash update overwrite mask This series introduces support for a new attribute to the flash update command: DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK. This attribute is a bitfield which allows userspace to specify what set of subfields to overwrite when performing a flash update for a device. The intention is to support the ability to control the behavior of overwriting the configuration and identifying fields in the Intel ice device flash update process. This is necessary as the firmware layout for the ice device includes some settings and configuration within the same flash section as the main firmware binary. This series, and the accompanying iproute2 series, introduce support for the attribute. Once applied, the overwrite support can be be invoked via devlink: # overwrite settings devlink dev flash pci/0000:af:00.0 file firmware.bin overwrite settings # overwrite identifiers and settings devlink dev flash pci/0000:af:00.0 file firmware.bin overwrite settings overwrite identifiers To aid in the safe addition of new parameters, first some refactoring is done to the .flash_update function: its parameters are converted from a series of function arguments into a structure. This makes it easier to add the new parameter without changing the signature of the .flash_update handler in the future. Additionally, a "supported_flash_update_params" field is added to devlink_ops. This field is similar to the ethtool "supported_coalesc_params" field. The devlink core will now check that the DEVLINK_SUPPORT_FLASH_UPDATE_COMPONENT bit is set before forwarding the component attribute. Similarly, the new overwrite attribute will also require a supported bit. Doing these refactors will aid in adding any other attributes in the future, and creates a good pattern for other interfaces to use in the future. By requiring drivers to opt-in, we reduce the risk of accidentally breaking drivers when ever we add an additional parameter. We also reduce boiler plate code in drivers which do not support the parameters. Changes since v9: * rebased to current net-next, no other changes Changes since v7 * resend, hopefully avoiding the SMTP server issues I experienced on Friday Changes since v6 * Rebased to current net-next to resolve conflicts * Added changes to the ionic driver that recently merged flash update support * Fixed the changes for mlxsw to apply to core instead of spectrum.c after the recent refactor. * Picked up the review tags from Jakub Changes since v5 * Fix *all* of the BIT usage to use _BITUL() (thanks Jakub!) Changes since v4 * Renamed nla_overwrite to nla_overwrite_mask at Jiri's suggestion * Added "by this device" to the netlink error messages for unsupported attributes * Removed use of BIT() in the uapi header * Fixed the commit message for the netdevsim patch * Picked up Jakub's reviewed ==================== Signed-off-by: David S. Miller commit 50db1bca55208d7f0528a1fa0619ce5d406a8d40 Author: Jacob Keller Date: Fri Sep 25 13:46:09 2020 -0700 ice: add support for flash update overwrite mask Support the recently added DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK parameter in the ice flash update handler. Convert the overwrite mask bitfield into the appropriate preservation level used by the firmware when updating. Because there is no equivalent preservation level for overwriting only identifiers, this combination is rejected by the driver as not supported with an appropriate extended ACK message. Signed-off-by: Jacob Keller Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit cbb58368fbccc823a85df73bd6bf7db6dfda86aa Author: Jacob Keller Date: Fri Sep 25 13:46:08 2020 -0700 netdevsim: add support for flash_update overwrite mask The devlink interface recently gained support for a new "overwrite mask" parameter that allows specifying how various sub-sections of a flash component are modified when updating. Add support for this to netdevsim, to enable easily testing the interface. Make the allowed overwrite mask values controllable via a debugfs parameter. This enables testing a flow where the driver rejects an unsupportable overwrite mask. Signed-off-by: Jacob Keller Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 5d5b4128c4caae34ddcd9b2dc30ac4d6155617a3 Author: Jacob Keller Date: Fri Sep 25 13:46:07 2020 -0700 devlink: introduce flash update overwrite mask Sections of device flash may contain settings or device identifying information. When performing a flash update, it is generally expected that these settings and identifiers are not overwritten. However, it may sometimes be useful to allow overwriting these fields when performing a flash update. Some examples include, 1) customizing the initial device config on first programming, such as overwriting default device identifying information, or 2) reverting a device configuration to known good state provided in the new firmware image, or 3) in case it is suspected that current firmware logic for managing the preservation of fields during an update is broken. Although some devices are able to completely separate these types of settings and fields into separate components, this is not true for all hardware. To support controlling this behavior, a new DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK is defined. This is an nla_bitfield32 which will define what subset of fields in a component should be overwritten during an update. If no bits are specified, or of the overwrite mask is not provided, then an update should not overwrite anything, and should maintain the settings and identifiers as they are in the previous image. If the overwrite mask has the DEVLINK_FLASH_OVERWRITE_SETTINGS bit set, then the device should be configured to overwrite any of the settings in the requested component with settings found in the provided image. Similarly, if the DEVLINK_FLASH_OVERWRITE_IDENTIFIERS bit is set, the device should be configured to overwrite any device identifiers in the requested component with the identifiers from the image. Multiple overwrite modes may be combined to indicate that a combination of the set of fields that should be overwritten. Drivers which support the new overwrite mask must set the DEVLINK_SUPPORT_FLASH_UPDATE_OVERWRITE_MASK in the supported_flash_update_params field of their devlink_ops. Signed-off-by: Jacob Keller Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit bc75c054f04048517e0b153ab38d973bbcdcef59 Author: Jacob Keller Date: Fri Sep 25 13:46:06 2020 -0700 devlink: convert flash_update to use params structure The devlink core recently gained support for checking whether the driver supports a flash_update parameter, via `supported_flash_update_params`. However, parameters are specified as function arguments. Adding a new parameter still requires modifying the signature of the .flash_update callback in all drivers. Convert the .flash_update function to take a new `struct devlink_flash_update_params` instead. By using this structure, and the `supported_flash_update_params` bit field, a new parameter to flash_update can be added without requiring modification to existing drivers. As before, all parameters except file_name will require driver opt-in. Because file_name is a necessary field to for the flash_update to make sense, no "SUPPORTED" bitflag is provided and it is always considered valid. All future additional parameters will require a new bit in the supported_flash_update_params bitfield. Signed-off-by: Jacob Keller Reviewed-by: Jakub Kicinski Cc: Jiri Pirko Cc: Jakub Kicinski Cc: Jonathan Corbet Cc: Michael Chan Cc: Bin Luo Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: Ido Schimmel Cc: Danielle Ratson Signed-off-by: David S. Miller commit 22ec3d232f8511b21355fcdb6fb2a4eced3decd8 Author: Jacob Keller Date: Fri Sep 25 13:46:05 2020 -0700 devlink: check flash_update parameter support in net core When implementing .flash_update, drivers which do not support per-component update are manually checking the component parameter to verify that it is NULL. Without this check, the driver might accept an update request with a component specified even though it will not honor such a request. Instead of having each driver check this, move the logic into net/core/devlink.c, and use a new `supported_flash_update_params` field in the devlink_ops. Drivers which will support per-component update must now specify this by setting DEVLINK_SUPPORT_FLASH_UPDATE_COMPONENT in the supported_flash_update_params in their devlink_ops. This helps ensure that drivers do not forget to check for a NULL component if they do not support per-component update. This also enables a slightly better error message by enabling the core stack to set the netlink bad attribute message to indicate precisely the unsupported attribute in the message. Going forward, any new additional parameter to flash update will require a bit in the supported_flash_update_params bitfield. Signed-off-by: Jacob Keller Reviewed-by: Jakub Kicinski Cc: Jiri Pirko Cc: Jonathan Corbet Cc: Michael Chan Cc: Bin Luo Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: Ido Schimmel Cc: Danielle Ratson Cc: Shannon Nelson Signed-off-by: David S. Miller commit 6fba737a9320758f076aa7c2eaddd3764d643e5c Merge: b4f434839e3e2 534a2109fb0c3 Author: David S. Miller Date: Fri Sep 25 17:17:14 2020 -0700 Merge branch 'simplify-TCP-loss-marking-code' Yuchung Cheng says: ==================== simplify TCP loss marking code The TCP loss marking is implemented by a set of intertwined subroutines. TCP has several loss detection algorithms (RACK, RFC6675/FACK, NewReno, etc) each calls a subset of these routines to mark a packet lost. This has led to various bugs (and fixes and fixes of fixes). This patch set is to consolidate the loss marking code so all detection algorithms call the same routine tcp_mark_skb_lost(). ==================== Signed-off-by: David S. Miller commit 534a2109fb0c31786c98845aad18d069fb874e6c Author: Yuchung Cheng Date: Fri Sep 25 10:04:31 2020 -0700 tcp: consolidate tcp_mark_skb_lost and tcp_skb_mark_lost tcp_skb_mark_lost is used by RFC6675-SACK and can easily be replaced with the new tcp_mark_skb_lost handler. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 686989700cabc444f25c1f1eb022aca8f2fc14b2 Author: Yuchung Cheng Date: Fri Sep 25 10:04:30 2020 -0700 tcp: simplify tcp_mark_skb_lost This patch consolidates and simplifes the loss marking logic used by a few loss detections (RACK, RFC6675, NewReno). Previously each detection uses a subset of several intertwined subroutines. This unncessary complexity has led to bugs (and fixes of bug fixes). tcp_mark_skb_lost now is the single one routine to mark a packet loss when a loss detection caller deems an skb ist lost: 1. rewind tp->retransmit_hint_skb if skb has lower sequence or all lost ones have been retransmitted. 2. book-keeping: adjust flags and counts depending on if skb was retransmitted or not. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit fd2146741c98569c8b4dc41b8ccae597150b122c Author: Yuchung Cheng Date: Fri Sep 25 10:04:29 2020 -0700 tcp: move tcp_mark_skb_lost A pure refactor to move tcp_mark_skb_lost to tcp_input.c to prepare for the later loss marking consolidation. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 179ac35f2f78ec54f14b6f3134b593403fd4c467 Author: Yuchung Cheng Date: Fri Sep 25 10:04:28 2020 -0700 tcp: consistently check retransmit hint tcp_simple_retransmit() used for path MTU discovery may not adjust the retransmit hint properly by deducting retrans_out before checking it to adjust the hint. This patch fixes this by a correct routine tcp_mark_skb_lost() already used by the RACK loss detection. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit b4f434839e3e269fbd23606a90c1c0cf86039a08 Author: Gustavo A. R. Silva Date: Fri Sep 25 12:03:23 2020 -0500 dpaa2-mac: Fix potential null pointer dereference There is a null-check for _pcs_, but it is being dereferenced prior to this null-check. So, if _pcs_ can actually be null, then there is a potential null pointer dereference that should be fixed by null-checking _pcs_ before being dereferenced. Addresses-Coverity-ID: 1497159 ("Dereference before null check") Fixes: 94ae899b2096 ("dpaa2-mac: add PCS support through the Lynx module") Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 9b69e5ebe656f12f650380edaa96eb11b10aa1a3 Merge: bd0b68a8abf1e 5e29c16f3a327 Author: David S. Miller Date: Fri Sep 25 17:10:27 2020 -0700 Merge branch 'dpaa2-eth-small-updates' Ioana Ciornei says: ==================== dpaa2-eth: small updates This patch set is just a collection of small updates to the dpaa2-eth driver. First, we only need to check the availability of the DTS child node, not both child and parent node. Then remove a call to dpaa2_eth_link_state_update() which is now just a leftover and it's not useful in how are things working now in the PHY integration. Lastly, modify how the driver is behaving when the the flow steering table is used between all the traffic classes. ==================== Signed-off-by: David S. Miller commit 5e29c16f3a327fb0f4e887a73588ae12e5e8b069 Author: Ionut-robert Aron Date: Fri Sep 25 17:44:21 2020 +0300 dpaa2-eth: install a single steering rule when SHARED_FS is enabled When SHARED_FS is enabled on a DPNI object the flow steering tables are shared between all the traffic classes. Modify the driver so that we only add a new flow steering entry on the TC#0 when this new option is enabled. Signed-off-by: Ionut-robert Aron Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 4c33a5bd063f9fdbced5fd1ceb7814e5f64f6a7b Author: Ioana Ciornei Date: Fri Sep 25 17:44:20 2020 +0300 dpaa2-eth: no need to check link state right after ndo_open The call to dpaa2_eth_link_state_update() is a leftover from the time when on DPAA2 platforms the PHYs were started at boot time so when an ifconfig was issued on the associated interface, the link status needed to be checked directly from the ndo_open() callback. This is not needed anymore since we are now properly integrated with the PHY layer thus a link interrupt will come directly from the PHY eventually without the need to call the sync function. Fix this up by removing the call to dpaa2_eth_link_state_update(). Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 98179709c95ecd60274668a20365a0cd0b3726eb Author: Ioana Ciornei Date: Fri Sep 25 17:44:19 2020 +0300 dpaa2-mac: do not check for both child and parent DTS nodes There is no need to check if both the MDIO controller node and its child node, the PCS device, are available since there is no chance that the child node would be enabled when the parent it's not. Suggested-by: Andrew Lunn Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ba5f4cfeac77fca981b199ec7f2396a3616e5216 Author: John Fastabend Date: Thu Sep 24 12:58:40 2020 -0700 bpf: Add comment to document BTF type PTR_TO_BTF_ID_OR_NULL The meaning of PTR_TO_BTF_ID_OR_NULL differs slightly from other types denoted with the *_OR_NULL type. For example the types PTR_TO_SOCKET and PTR_TO_SOCKET_OR_NULL can be used for branch analysis because the type PTR_TO_SOCKET is guaranteed to _not_ have a null value. In contrast PTR_TO_BTF_ID and BTF_TO_BTF_ID_OR_NULL have slightly different meanings. A PTR_TO_BTF_TO_ID may be a pointer to NULL value, but it is safe to read this pointer in the program context because the program context will handle any faults. The fallout is for PTR_TO_BTF_ID the verifier can assume reads are safe, but can not use the type in branch analysis. Additionally, authors need to be extra careful when passing PTR_TO_BTF_ID into helpers. In general helpers consuming type PTR_TO_BTF_ID will need to assume it may be null. Seeing the above is not obvious to readers without the back knowledge lets add a comment in the type definition. Editorial comment, as networking and tracing programs get closer and more tightly merged we may need to consider a new type that we can ensure is non-null for branch analysis and also passing into helpers. Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Acked-by: Lorenz Bauer commit bd0b68a8abf1eb523c0e2a59d0d2f162f9fc3ac1 Merge: 7470558240330 78ec710e7f326 Author: David S. Miller Date: Fri Sep 25 16:58:07 2020 -0700 Merge branch 'vxlan-clean-up' Fabian Frederick says: ==================== vxlan: clean-up This small patchet does some clean-up on vxlan. Second version removes VXLAN_NL2FLAG macro relevant patches as suggested by Michal and David I hope to have some feedback/ACK from vxlan developers. ==================== Signed-off-by: David S. Miller commit 78ec710e7f326c6d9ae0169b670a8d6da04ee817 Author: Fabian Frederick Date: Fri Sep 25 15:17:17 2020 +0200 vxlan: fix vxlan_find_sock() documentation for l3mdev Since commit aab8cc3630e32 ("vxlan: add support for underlay in non-default VRF") vxlan_find_sock() also checks if socket is assigned to the right level 3 master device when lower device is not in the default VRF. Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller commit 2eabcb8afe74304458ee47ee175bc16b770b7d20 Author: Fabian Frederick Date: Fri Sep 25 15:16:59 2020 +0200 vxlan: check rtnl_configure_link return code correctly rtnl_configure_link is always checked if < 0 for error code. Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller commit 546c044c9651e81a16833806feff6b369bb5de33 Author: Fabian Frederick Date: Fri Sep 25 15:16:39 2020 +0200 vxlan: move encapsulation warning vxlan_xmit_one() was only called from vxlan_xmit() without rdst and info was already tested. Emit warning in that function instead Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller commit 0189399cbb5eba6e98f02b61574b507062c476b7 Author: Fabian Frederick Date: Fri Sep 25 15:16:18 2020 +0200 vxlan: add unlikely to vxlan_remcsum check small optimization around checking as it's being done in all receptions Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller commit 2ae2904b5bac4a554e0734cf494bb6d6fdfd4cd2 Author: Fabian Frederick Date: Fri Sep 25 15:16:02 2020 +0200 vxlan: don't collect metadata if remote checksum is wrong call vxlan_remcsum() before md filling in vxlan_rcv() Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller commit 7470558240330f04dbf940430813233935314f78 Author: Nikolay Aleksandrov Date: Fri Sep 25 13:25:49 2020 +0300 net: bridge: mcast: remove only S,G port groups from sg_port hash We should remove a group from the sg_port hash only if it's an S,G entry. This makes it correct and more symmetric with group add. Also since *,G groups are not added to that hash we can hide a bug. Fixes: 085b53c8beab ("net: bridge: mcast: add sg_port rhashtable") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit e0f9956a3862b32ad73869a8e52a33c84aafa46f Author: Chuah, Kim Tatt Date: Fri Sep 25 17:40:41 2020 +0800 net: stmmac: Add option for VLAN filter fail queue enable Add option in plat_stmmacenet_data struct to enable VLAN Filter Fail Queuing. This option allows packets that fail VLAN filter to be routed to a specific Rx queue when Receive All is also set. When this option is enabled: - Enable VFFQ only when entering promiscuous mode, because Receive All will pass up all rx packets that failed address filtering (similar to promiscuous mode). - VLAN-promiscuous mode is never entered to allow rx packet to fail VLAN filters and get routed to selected VFFQ Rx queue. Reviewed-by: Voon Weifeng Reviewed-by: Ong Boon Leong Signed-off-by: Chuah, Kim Tatt Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 99d4def4d08507474b250dad6345d14715a4726b Author: John Fastabend Date: Thu Sep 24 11:45:22 2020 -0700 bpf: Add AND verifier test case where 32bit and 64bit bounds differ If we AND two values together that are known in the 32bit subregs, but not known in the 64bit registers we rely on the tnum value to report the 32bit subreg is known. And do not use mark_reg_known() directly from scalar32_min_max_and() Add an AND test to cover the case with known 32bit subreg, but unknown 64bit reg. Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov commit 4fbb38a3b2cc7bf4340fe9bd9c73622760adc19d Author: John Fastabend Date: Thu Sep 24 11:45:06 2020 -0700 bpf, verifier: Remove redundant var_off.value ops in scalar known reg cases In BPF_AND and BPF_OR alu cases we have this pattern when the src and dst tnum is a constant. 1 dst_reg->var_off = tnum_[op](dst_reg->var_off, src_reg.var_off) 2 scalar32_min_max_[op] 3 if (known) return 4 scalar_min_max_[op] 5 if (known) 6 __mark_reg_known(dst_reg, dst_reg->var_off.value [op] src_reg.var_off.value) The result is in 1 we calculate the var_off value and store it in the dst_reg. Then in 6 we duplicate this logic doing the op again on the value. The duplication comes from the the tnum_[op] handlers because they have already done the value calcuation. For example this is tnum_and(). struct tnum tnum_and(struct tnum a, struct tnum b) { u64 alpha, beta, v; alpha = a.value | a.mask; beta = b.value | b.mask; v = a.value & b.value; return TNUM(v, alpha & beta & ~v); } So lets remove the redundant op calculation. Its confusing for readers and unnecessary. Its also not harmful because those ops have the property, r1 & r1 = r1 and r1 | r1 = r1. Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov commit 17705434f3e6966b253f72ca6cfbc2d0d2142ead Merge: e666a4c668528 ff4cf8eae0a31 Author: David S. Miller Date: Fri Sep 25 16:35:27 2020 -0700 Merge branch 'Devlink-regions-for-SJA1105-DSA-driver' Vladimir Oltean says: ==================== Devlink regions for SJA1105 DSA driver This series exposes the SJA1105 static config as a devlink region. This can be used for debugging, for example with the sja1105_dump user space program that I have derived from Andrew Lunn's mv88e6xxx_dump: https://github.com/vladimiroltean/mv88e6xxx_dump/tree/sja1105 Changes in v2: - Tear down devlink params on initialization failure. - Add driver identification through devlink. ==================== Signed-off-by: David S. Miller commit ff4cf8eae0a316a09bfff2eb281caa58354be6d3 Author: Vladimir Oltean Date: Sat Sep 26 02:04:21 2020 +0300 net: dsa: sja1105: implement .devlink_info_get Return the driver name and ASIC ID so that generic user space application are able to know they're looking at sja1105 devlink regions when pretty-printing them. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit bf425b82059e0b0752c0026353c1902112200837 Author: Vladimir Oltean Date: Sat Sep 26 02:04:20 2020 +0300 net: dsa: sja1105: expose static config as devlink region As explained in Documentation/networking/dsa/sja1105.rst, this switch has a static config held in the driver's memory and re-uploaded from time to time into the device (after any major change). The format of this static config is in fact described in UM10944.pdf and it contains all the switch's settings (it also contains device ID, table CRCs, etc, just like in the manual). So it is a useful and universal devlink region to expose to user space, for debugging purposes. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 0a7bdbc23d8a1d5e6f6f74abf00ba572f7369dd6 Author: Vladimir Oltean Date: Sat Sep 26 02:04:19 2020 +0300 net: dsa: sja1105: move devlink param code to sja1105_devlink.c We'll have more devlink code soon. Group it together in a separate translation object. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e666a4c668528ae1f5b8b3a2e7cb6a5be488dfbb Merge: d0186842ec5f4 d0ea5cbdc286d Author: David S. Miller Date: Fri Sep 25 16:29:00 2020 -0700 Merge branch 'drivers-net-warning-clean' Jesse Brandeburg says: ==================== make drivers/net/ethernet W=1 clean The Goal: move to W=1 being default for drivers/net/ethernet, and then use automation to catch more code issues (warnings) being introduced. The status: Getting much closer but not quite done for all architectures. After applying the patches below, the drivers/net/ethernet directory can be built as modules with W=1 with no warnings (so far on x64_64 arch only!). As Jakub pointed out, there is much more work to do to clean up C=1, but that will be another series of changes. This series removes 1,247 warnings and hopefully allows the ethernet directory to move forward from here without more warnings being added. There is only one objtool warning now. This version drops one of the Intel patches, as I couldn't reproduce the original issue to document the warning. Some of these patches are already sent and tested on Intel Wired Lan, but the rest of the series titled drivers/net/ethernet affects other drivers. The changes are all pretty straightforward. ==================== Signed-off-by: Jesse Brandeburg Reviewed-by: Jakub Kicinski Reviewed-by: Saeed Mahameed commit d0ea5cbdc286de4efdfe6acdd8b2b9e2377c5199 Author: Jesse Brandeburg Date: Fri Sep 25 15:24:45 2020 -0700 drivers/net/ethernet: clean up mis-targeted comments As part of the W=1 cleanups for ethernet, a million [*] driver comments had to be cleaned up to get the W=1 compilation to succeed. This change finally makes the drivers/net/ethernet tree compile with W=1 set on the command line. NOTE: The kernel uses kdoc style (see Documentation/process/kernel-doc.rst) when documenting code, not doxygen or other styles. After this patch the x86_64 build has no warnings from W=1, however scripts/kernel-doc says there are 1545 more warnings in source files, that I need to develop a script to fix in a followup patch. The errors fixed here are all kdoc of a few classes, with a few outliers: In file included from drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c:10: drivers/net/ethernet/qlogic/netxen/netxen_nic.h:1193:18: warning: ‘FW_DUMP_LEVELS’ defined but not used [-Wunused-const-variable=] 1193 | static const u32 FW_DUMP_LEVELS[] = { 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff }; | ^~~~~~~~~~~~~~ ... repeats 4 times... drivers/net/ethernet/sun/cassini.c:2084:24: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] 2084 | RX_USED_ADD(page, i); drivers/net/ethernet/natsemi/ns83820.c: In function ‘phy_intr’: drivers/net/ethernet/natsemi/ns83820.c:603:6: warning: variable ‘tbisr’ set but not used [-Wunused-but-set-variable] 603 | u32 tbisr, tanar, tanlpar; | ^~~~~ drivers/net/ethernet/natsemi/ns83820.c: In function ‘ns83820_get_link_ksettings’: drivers/net/ethernet/natsemi/ns83820.c:1207:11: warning: variable ‘tanar’ set but not used [-Wunused-but-set-variable] 1207 | u32 cfg, tanar, tbicr; | ^~~~~ drivers/net/ethernet/packetengines/yellowfin.c:1063:18: warning: variable ‘yf_size’ set but not used [-Wunused-but-set-variable] 1063 | int data_size, yf_size; | ^~~~~~~ Normal kdoc fixes: warning: Function parameter or member 'x' not described in 'y' warning: Excess function parameter 'x' description in 'y' warning: Cannot understand on line - I thought it was a doc line [*] - ok it wasn't quite a million, but it felt like it. Signed-off-by: Jesse Brandeburg Signed-off-by: David S. Miller commit add3c86aa22976c4fbca4126b9d31c5f2f249a97 Author: Jesse Brandeburg Date: Fri Sep 25 15:24:44 2020 -0700 sfc: fix kdoc warning kernel-doc script as used by W=1, is confused by the macro usage inside the header describing the efx_ptp_data struct. drivers/net/ethernet/sfc/ptp.c:345: warning: Function parameter or member 'MC_CMD_PTP_IN_TRANSMIT_LENMAX' not described in 'efx_ptp_data' After some discussion on the list, break this patch out to a separate one, and fix the issue through a creative macro declaration. Signed-off-by: Jesse Brandeburg Acked-by: Edward Cree Signed-off-by: David S. Miller commit 81929a4a8792e8fcbbbaa9952fae0b2f773683ea Author: Jesse Brandeburg Date: Fri Sep 25 15:24:43 2020 -0700 drivers/net/ethernet: remove incorrectly formatted doc As part of the W=1 series for ethernet, these drivers were discovered to be using kdoc style comments but were not actually doing kdoc. The kernel uses kdoc style when documenting code, not doxygen or other styles. Fixed Warnings: drivers/net/ethernet/amazon/ena/ena_com.c:613: warning: Function parameter or member 'ena_dev' not described in 'ena_com_set_llq' drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c:1540: warning: Cannot understand * @brief Set VLAN filter table drivers/net/ethernet/xilinx/ll_temac_main.c:114: warning: Function parameter or member 'lp' not described in 'temac_indirect_busywait' drivers/net/ethernet/xilinx/ll_temac_main.c:129: warning: Function parameter or member 'lp' not described in 'temac_indirect_in32' drivers/net/ethernet/xilinx/ll_temac_main.c:129: warning: Function parameter or member 'reg' not described in 'temac_indirect_in32' drivers/net/ethernet/xilinx/ll_temac_main.c:147: warning: Function parameter or member 'lp' not described in 'temac_indirect_in32_locked' drivers/net/ethernet/xilinx/ll_temac_main.c:147: warning: Function parameter or member 'reg' not described in 'temac_indirect_in32_locked' drivers/net/ethernet/xilinx/ll_temac_main.c:172: warning: Function parameter or member 'lp' not described in 'temac_indirect_out32' drivers/net/ethernet/xilinx/ll_temac_main.c:172: warning: Function parameter or member 'reg' not described in 'temac_indirect_out32' drivers/net/ethernet/xilinx/ll_temac_main.c:172: warning: Function parameter or member 'value' not described in 'temac_indirect_out32' drivers/net/ethernet/xilinx/ll_temac_main.c:188: warning: Function parameter or member 'lp' not described in 'temac_indirect_out32_locked' drivers/net/ethernet/xilinx/ll_temac_main.c:188: warning: Function parameter or member 'reg' not described in 'temac_indirect_out32_locked' drivers/net/ethernet/xilinx/ll_temac_main.c:188: warning: Function parameter or member 'value' not described in 'temac_indirect_out32_locked' drivers/net/ethernet/xilinx/ll_temac_main.c:212: warning: Function parameter or member 'lp' not described in 'temac_dma_in32_be' drivers/net/ethernet/xilinx/ll_temac_main.c:212: warning: Function parameter or member 'reg' not described in 'temac_dma_in32_be' drivers/net/ethernet/xilinx/ll_temac_main.c:228: warning: Function parameter or member 'lp' not described in 'temac_dma_out32_be' drivers/net/ethernet/xilinx/ll_temac_main.c:228: warning: Function parameter or member 'reg' not described in 'temac_dma_out32_be' drivers/net/ethernet/xilinx/ll_temac_main.c:228: warning: Function parameter or member 'value' not described in 'temac_dma_out32_be' drivers/net/ethernet/xilinx/ll_temac_main.c:247: warning: Function parameter or member 'lp' not described in 'temac_dma_dcr_in' drivers/net/ethernet/xilinx/ll_temac_main.c:247: warning: Function parameter or member 'reg' not described in 'temac_dma_dcr_in' drivers/net/ethernet/xilinx/ll_temac_main.c:255: warning: Function parameter or member 'lp' not described in 'temac_dma_dcr_out' drivers/net/ethernet/xilinx/ll_temac_main.c:255: warning: Function parameter or member 'reg' not described in 'temac_dma_dcr_out' drivers/net/ethernet/xilinx/ll_temac_main.c:255: warning: Function parameter or member 'value' not described in 'temac_dma_dcr_out' drivers/net/ethernet/xilinx/ll_temac_main.c:265: warning: Function parameter or member 'lp' not described in 'temac_dcr_setup' drivers/net/ethernet/xilinx/ll_temac_main.c:265: warning: Function parameter or member 'op' not described in 'temac_dcr_setup' drivers/net/ethernet/xilinx/ll_temac_main.c:265: warning: Function parameter or member 'np' not described in 'temac_dcr_setup' drivers/net/ethernet/xilinx/ll_temac_main.c:300: warning: Function parameter or member 'ndev' not described in 'temac_dma_bd_release' drivers/net/ethernet/xilinx/ll_temac_main.c:330: warning: Function parameter or member 'ndev' not described in 'temac_dma_bd_init' drivers/net/ethernet/xilinx/ll_temac_main.c:600: warning: Function parameter or member 'ndev' not described in 'temac_setoptions' drivers/net/ethernet/xilinx/ll_temac_main.c:600: warning: Function parameter or member 'options' not described in 'temac_setoptions' Signed-off-by: Jesse Brandeburg Signed-off-by: David S. Miller commit f410f157f4e621651fe1f95b0a164b5403f4067c Author: Jesse Brandeburg Date: Fri Sep 25 15:24:42 2020 -0700 drivers/net/ethernet: add some basic kdoc tags A couple of drivers had a "generic documentation" section that would trigger a "can't understand" message from W=1 compiles. Fix by using correct DOC: tags in the generic sections. Fixed Warnings: drivers/net/ethernet/arc/emac_arc.c:4: info: Scanning doc for c drivers/net/ethernet/cadence/macb_pci.c:3: warning: missing initial short description on line: * Cadence GEM PCI wrapper. drivers/net/ethernet/cadence/macb_pci.c:3: info: Scanning doc for Cadence Signed-off-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 2602ddfe1929bfebfc2862400bd3bfd6f310b9bb Author: Jesse Brandeburg Date: Fri Sep 25 15:24:41 2020 -0700 drivers/net/ethernet: handle one warning explicitly While fixing the W=1 builds, this warning came up because the developers used a very tricky way to get structures initialized to a non-zero value, but this causes GCC to warn about an override. In this case the override was intentional, so just disable the warning for this code with a kernel macro that results in disabling the warning for compiles on GCC versions after 8. It is not appropriate to change the struct to initialize all the values as it will just add a lot more code for no value. The code is completely correct as is, we just want to acknowledge that this code could generate a warning and we're ok with that. NOTE: the __diag_ignore macro currently only accepts a second argument of 8 (version 80000), it's either use this one or open code the pragma. Fixed Warnings example (all the same): drivers/net/ethernet/renesas/sh_eth.c:51:12: warning: initialized field overwritten [-Woverride-init] drivers/net/ethernet/renesas/sh_eth.c:52:12: warning: initialized field overwritten [-Woverride-init] drivers/net/ethernet/renesas/sh_eth.c:53:13: warning: initialized field overwritten [-Woverride-init] + 256 more... Signed-off-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 553aca1cd5fa411a21f9601ed5dd744d5ffd5439 Author: Jesse Brandeburg Date: Fri Sep 25 15:24:40 2020 -0700 drivers/net/ethernet: rid ethernet of no-prototype warnings The W=1 builds showed a few files exporting functions (non-static) that were not prototyped. What actually happened is that there were prototypes, but the include file was forgotten in the implementation file. Add the include file and remove the warnings. Fixed Warnings: drivers/net/ethernet/cavium/liquidio/cn68xx_device.c:124:5: warning: no previous prototype for ‘lio_setup_cn68xx_octeon_device’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:159:1: warning: no previous prototype for ‘octeon_pci_read_core_mem’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:168:1: warning: no previous prototype for ‘octeon_pci_write_core_mem’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:176:5: warning: no previous prototype for ‘octeon_read_device_mem64’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:185:5: warning: no previous prototype for ‘octeon_read_device_mem32’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:194:6: warning: no previous prototype for ‘octeon_write_device_mem32’ [-Wmissing-prototypes] drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c:453:6: warning: no previous prototype for ‘hclge_dcb_ops_set’ [-Wmissing-prototypes] Signed-off-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 7c8c0291f84027558bd5fca5729cbcf288c510f4 Author: Jesse Brandeburg Date: Fri Sep 25 15:24:39 2020 -0700 drivers/net/ethernet: clean up unused assignments As part of the W=1 compliation series, these lines all created warnings about unused variables that were assigned a value. Most of them are from register reads, but some are just picking up a return value from a function and never doing anything with it. Fixed warnings: .../ethernet/brocade/bna/bnad.c:3280:6: warning: variable ‘rx_count’ set but not used [-Wunused-but-set-variable] .../ethernet/brocade/bna/bnad.c:3280:6: warning: variable ‘rx_count’ set but not used [-Wunused-but-set-variable] .../ethernet/cortina/gemini.c:512:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] .../ethernet/cortina/gemini.c:2110:21: warning: variable ‘config0’ set but not used [-Wunused-but-set-variable] .../ethernet/cavium/liquidio/octeon_device.c:1327:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable] .../ethernet/cavium/liquidio/octeon_device.c:1358:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable] .../ethernet/dec/tulip/media.c:322:8: warning: variable ‘setup’ set but not used [-Wunused-but-set-variable] .../ethernet/dec/tulip/de4x5.c:4928:13: warning: variable ‘r3’ set but not used [-Wunused-but-set-variable] .../ethernet/micrel/ksz884x.c:1652:7: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] .../ethernet/micrel/ksz884x.c:1652:7: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] .../ethernet/micrel/ksz884x.c:1652:7: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] .../ethernet/micrel/ksz884x.c:1652:7: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] .../ethernet/micrel/ksz884x.c:4981:6: warning: variable ‘rx_status’ set but not used [-Wunused-but-set-variable] .../ethernet/micrel/ksz884x.c:6510:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] .../ethernet/micrel/ksz884x.c:6087: warning: cannot understand function prototype: 'struct hw_regs ' .../ethernet/microchip/lan743x_main.c:161:6: warning: variable ‘int_en’ set but not used [-Wunused-but-set-variable] .../ethernet/microchip/lan743x_main.c:1702:6: warning: variable ‘int_sts’ set but not used [-Wunused-but-set-variable] .../ethernet/microchip/lan743x_main.c:3041:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] .../ethernet/natsemi/ns83820.c:603:6: warning: variable ‘tbisr’ set but not used [-Wunused-but-set-variable] .../ethernet/natsemi/ns83820.c:1207:11: warning: variable ‘tanar’ set but not used [-Wunused-but-set-variable] .../ethernet/marvell/mvneta.c:754:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] .../ethernet/neterion/vxge/vxge-traffic.c:33:6: warning: variable ‘val64’ set but not used [-Wunused-but-set-variable] .../ethernet/neterion/vxge/vxge-traffic.c:160:6: warning: variable ‘val64’ set but not used [-Wunused-but-set-variable] .../ethernet/neterion/vxge/vxge-traffic.c:490:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable] .../ethernet/neterion/vxge/vxge-traffic.c:2378:6: warning: variable ‘val64’ set but not used [-Wunused-but-set-variable] .../ethernet/packetengines/yellowfin.c:1063:18: warning: variable ‘yf_size’ set but not used [-Wunused-but-set-variable] .../ethernet/realtek/8139cp.c:1242:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] .../ethernet/mellanox/mlx4/en_tx.c:858:6: warning: variable ‘ring_cons’ set but not used [-Wunused-but-set-variable] .../ethernet/sis/sis900.c:792:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] .../ethernet/sfc/falcon/farch.c:878:11: warning: variable ‘rx_ev_pkt_type’ set but not used [-Wunused-but-set-variable] .../ethernet/sfc/falcon/farch.c:877:23: warning: variable ‘rx_ev_mcast_pkt’ set but not used [-Wunused-but-set-variable] .../ethernet/sfc/falcon/farch.c:877:7: warning: variable ‘rx_ev_hdr_type’ set but not used [-Wunused-but-set-variable] .../ethernet/sfc/falcon/farch.c:876:7: warning: variable ‘rx_ev_other_err’ set but not used [-Wunused-but-set-variable] .../ethernet/sfc/falcon/farch.c:1646:21: warning: variable ‘buftbl_min’ set but not used [-Wunused-but-set-variable] .../ethernet/sfc/falcon/farch.c:2535:32: warning: variable ‘spec’ set but not used [-Wunused-but-set-variable] .../ethernet/via/via-velocity.c:880:6: warning: variable ‘curr_status’ set but not used [-Wunused-but-set-variable] .../ethernet/ti/tlan.c:656:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] .../ethernet/ti/davinci_emac.c:1230:6: warning: variable ‘num_tx_pkts’ set but not used [-Wunused-but-set-variable] .../ethernet/synopsys/dwc-xlgmac-common.c:516:8: warning: variable ‘str’ set but not used [-Wunused-but-set-variable] .../ethernet/ti/cpsw_new.c:1662:22: warning: variable ‘priv’ set but not used [-Wunused-but-set-variable] The register reads should be OK, because the current implementation of readl and friends will always execute even without an lvalue. When it makes sense, just remove the lvalue assignment and the local. Other times, just remove the offending code, and occasionally, just mark the variable as maybe unused since it could be used in an ifdef or debug scenario. Only compile tested with W=1. Signed-off-by: Jesse Brandeburg Acked-by: Edward Cree Signed-off-by: David S. Miller commit 36ec148657dd97762a861a8d17e25f03208f1b59 Author: Jesse Brandeburg Date: Fri Sep 25 15:24:38 2020 -0700 intel: handle unused assignments Remove variables that were storing a return value from a register read or other read, where the return value wasn't used. Those conversions to remove the lvalue of the assignment should be safe because the readl memory mapped reads are marked volatile and should not be optimized out without an lvalue (I suspect a very long time ago this wasn't guaranteed as it is today). These changes are part of a separate patch to make it easier to review. Warnings Fixed: .../intel/e100.c:2596:9: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] .../intel/ixgb/ixgb_hw.c:101:6: warning: variable ‘icr_reg’ set but not used [-Wunused-but-set-variable] .../intel/ixgb/ixgb_hw.c:277:6: warning: variable ‘ctrl_reg’ set but not used [-Wunused-but-set-variable] .../intel/ixgb/ixgb_hw.c:952:15: warning: variable ‘temp_reg’ set but not used [-Wunused-but-set-variable] .../intel/ixgb/ixgb_hw.c:1164:7: warning: variable ‘mdio_reg’ set but not used [-Wunused-but-set-variable] .../intel/e1000/e1000_hw.c:132:6: warning: variable ‘ret_val’ set but not used [-Wunused-but-set-variable] .../intel/e1000/e1000_hw.c:380:6: warning: variable ‘icr’ set but not used [-Wunused-but-set-variable] .../intel/e1000/e1000_hw.c:2378:6: warning: variable ‘signal’ set but not used [-Wunused-but-set-variable] .../intel/e1000/e1000_hw.c:2374:6: warning: variable ‘ctrl’ set but not used [-Wunused-but-set-variable] .../intel/e1000/e1000_hw.c:2373:6: warning: variable ‘rxcw’ set but not used [-Wunused-but-set-variable] .../intel/e1000/e1000_hw.c:4678:15: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable] Signed-off-by: Jesse Brandeburg Tested-by: Aaron Brown Signed-off-by: David S. Miller commit b50f7bca5e83d9e8306ceb2a8b0ef0ed2416f133 Author: Jesse Brandeburg Date: Fri Sep 25 15:24:37 2020 -0700 intel-ethernet: clean up W=1 warnings in kdoc This takes care of all of the trivial W=1 fixes in the Intel Ethernet drivers, which allows developers and maintainers to build more of the networking tree with more complete warning checks. There are three classes of kdoc warnings fixed: - cannot understand function prototype: 'x' - Excess function parameter 'x' description in 'y' - Function parameter or member 'x' not described in 'y' All of the changes were trivial comment updates on function headers. Inspired by Lee Jones' series of wireless work to do the same. Compile tested only, and passes simple test of $ git ls-files *.[ch] | egrep drivers/net/ethernet/intel | \ xargs scripts/kernel-doc -none Signed-off-by: Jesse Brandeburg Tested-by: Aaron Brown Signed-off-by: David S. Miller commit 13956160fc7c75706178cb05c0ac9f5ca77c6411 Author: J. Bruce Fields Date: Fri Sep 25 10:12:39 2020 -0400 nfsd: rq_lease_breaker cleanup Since only the v4 code cares about it, maybe it's better to leave rq_lease_breaker out of the common dispatch code? Signed-off-by: J. Bruce Fields commit 50747dd5e47bde3b7d7f839c84d0d3b554090497 Author: J. Bruce Fields Date: Fri Sep 25 10:09:58 2020 -0400 nfsd4: remove check_conflicting_opens warning There are actually rare races where this is possible (e.g. if a new open intervenes between the read of i_writecount and the fi_fds). Signed-off-by: J. Bruce Fields commit ae3c57b5ca47665dc3416447a5534a9796096d86 Author: J. Bruce Fields Date: Fri Jul 17 18:54:54 2020 -0400 nfsd: Cache R, RW, and W opens separately The nfsd open code has always kept separate read-only, read-write, and write-only opens as necessary to ensure that when a client closes or downgrades, we don't retain more access than necessary. Also, I didn't realize the cache behaved this way when I wrote 94415b06eb8a "nfsd4: a client's own opens needn't prevent delegations". There I assumed fi_fds[O_WRONLY] and fi_fds[O_RDWR] would always be distinct. The violation of that assumption is triggering a WARN_ON_ONCE() and could also cause the server to give out a delegation when it shouldn't. Fixes: 94415b06eb8a ("nfsd4: a client's own opens needn't prevent delegations") Tested-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 0aa99c4d1f216318b1c4f4e4fe321868294a1d9f Author: J. Bruce Fields Date: Mon Sep 21 09:45:35 2020 -0400 sunrpc: simplify do_cache_clean Is it just me, or is the logic written in a slightly convoluted way? I find it a little easier to read this way. Signed-off-by: J. Bruce Fields commit c65fc2276f0f022f5ad4a84658add2b28cff7227 Author: Steven Rostedt (VMware) Date: Thu Sep 24 12:43:46 2020 -0400 mm/page_ref: Convert the open coded tracepoint enabled to the new helper As more use cases of checking if a tracepoint is enabled in a header are coming to fruition, a helper macro, tracepoint_enabled(), has been added to check if a tracepoint is enabled or not, and can be used with minimal header requirements (avoid "include hell"). Convert the page_ref logic over to the new helper macro. Cc: Joonsoo Kim Cc: Michal Nazarewicz Cc: Vlastimil Babka Cc: Minchan Kim Cc: Mel Gorman Cc: "Kirill A. Shutemov" Cc: Sergey Senozhatsky Cc: Arnd Bergmann Signed-off-by: Steven Rostedt (VMware) commit afbe7973173a7ce0a68af8b33e44c967582297be Author: Steven Rostedt (VMware) Date: Thu Sep 24 12:30:20 2020 -0400 tracepoints: Add helper to test if tracepoint is enabled in a header As tracepoints are discouraged from being added in a header because it can cause side effects if other tracepoints are in headers, as well as bloat the kernel as the trace_() function is not a small inline, the common workaround is to add a function call that calls a wrapper function in a C file that then calls the tracepoint. But as function calls add overhead, this function should only be called when the tracepoint in question is enabled. To get around this overhead, a static_branch can be used to only have the tracepoint wrapper get called when the tracepoint is enabled. Add a tracepoint_enabled(tp) macro that gets passed the name of the tracepoint, and this becomes a static_branch that is enabled when the tracepoint is enabled and is a nop when the tracepoint is disabled. Signed-off-by: Steven Rostedt (VMware) commit 9dbc1f45d512f3a90c1df8ac35bcb7a4db548286 Author: Xu Wang Date: Wed Sep 16 05:39:18 2020 +0000 sunrpc: cache : Replace seq_printf with seq_puts seq_puts is a lot cheaper than seq_printf, so use that to print literal strings. Signed-off-by: Xu Wang Signed-off-by: J. Bruce Fields commit 8c38b705b4f4ca4e7f9cc116141bc38391917c30 Author: Rik van Riel Date: Mon Sep 14 13:07:19 2020 -0400 silence nfscache allocation warnings with kvzalloc silence nfscache allocation warnings with kvzalloc Currently nfsd_reply_cache_init attempts hash table allocation through kmalloc, and manually falls back to vzalloc if that fails. This makes the code a little larger than needed, and creates a significant amount of serial console spam if you have enough systems. Switching to kvzalloc gets rid of the allocation warnings, and makes the code a little cleaner too as a side effect. Freeing of nn->drc_hashtbl is already done using kvfree currently. Signed-off-by: Rik van Riel Signed-off-by: J. Bruce Fields commit 44b49aa65f8603ad274c448310b5ff95a78d394c Author: Zheng Bin Date: Fri Sep 11 12:10:14 2020 +0800 nfsd: fix comparison to bool warning Fixes coccicheck warning: fs/nfsd/nfs4proc.c:3234:5-29: WARNING: Comparison to bool Signed-off-by: Zheng Bin Signed-off-by: J. Bruce Fields commit 5aff7d0820c472f52153ec5f9abf1df4dea28f3d Author: Chuck Lever Date: Fri Sep 11 14:47:59 2020 -0400 NFSD: Correct type annotations in COPY XDR functions Squelch some sparse warnings: /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:1860:16: warning: incorrect type in assignment (different base types) /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:1860:16: expected int status /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:1860:16: got restricted __be32 /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:1862:24: warning: incorrect type in return expression (different base types) /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:1862:24: expected restricted __be32 /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:1862:24: got int status Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit b9a492376d51facace13c1b9eb06d64925962878 Author: Chuck Lever Date: Fri Sep 11 14:47:53 2020 -0400 NFSD: Correct type annotations in user xattr XDR functions Squelch some sparse warnings: /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4692:24: warning: incorrect type in return expression (different base types) /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4692:24: expected int /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4692:24: got restricted __be32 [usertype] /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4702:32: warning: incorrect type in return expression (different base types) /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4702:32: expected int /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4702:32: got restricted __be32 [usertype] /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4739:13: warning: incorrect type in assignment (different base types) /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4739:13: expected restricted __be32 [usertype] err /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4739:13: got int /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4891:15: warning: incorrect type in assignment (different base types) /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4891:15: expected unsigned int [assigned] [usertype] count /home/cel/src/linux/linux/fs/nfsd/nfs4xdr.c:4891:15: got restricted __be32 [usertype] Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 8237284a00d99546c1c98d8f621cf5bd475b49fd Author: Chuck Lever Date: Fri Sep 11 14:47:48 2020 -0400 NFSD: Correct type annotations in user xattr helpers Squelch some sparse warnings: /home/cel/src/linux/linux/fs/nfsd/vfs.c:2264:13: warning: incorrect type in assignment (different base types) /home/cel/src/linux/linux/fs/nfsd/vfs.c:2264:13: expected int err /home/cel/src/linux/linux/fs/nfsd/vfs.c:2264:13: got restricted __be32 /home/cel/src/linux/linux/fs/nfsd/vfs.c:2266:24: warning: incorrect type in return expression (different base types) /home/cel/src/linux/linux/fs/nfsd/vfs.c:2266:24: expected restricted __be32 /home/cel/src/linux/linux/fs/nfsd/vfs.c:2266:24: got int err /home/cel/src/linux/linux/fs/nfsd/vfs.c:2288:13: warning: incorrect type in assignment (different base types) /home/cel/src/linux/linux/fs/nfsd/vfs.c:2288:13: expected int err /home/cel/src/linux/linux/fs/nfsd/vfs.c:2288:13: got restricted __be32 /home/cel/src/linux/linux/fs/nfsd/vfs.c:2290:24: warning: incorrect type in return expression (different base types) /home/cel/src/linux/linux/fs/nfsd/vfs.c:2290:24: expected restricted __be32 /home/cel/src/linux/linux/fs/nfsd/vfs.c:2290:24: got int err Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields commit 403217f30418c808600e3e8e345413ba5cc15676 Author: Anna Schumaker Date: Mon Aug 17 12:53:06 2020 -0400 SUNRPC/NFSD: Implement xdr_reserve_space_vec() Reserving space for a large READ payload requires special handling when reserving space in the xdr buffer pages. One problem we can have is use of the scratch buffer, which is used to get a pointer to a contiguous region of data up to PAGE_SIZE. When using the scratch buffer, calls to xdr_commit_encode() shift the data to it's proper alignment in the xdr buffer. If we've reserved several pages in a vector, then this could potentially invalidate earlier pointers and result in incorrect READ data being sent to the client. I get around this by looking at the amount of space left in the current page, and never reserve more than that for each entry in the read vector. This lets us place data directly where it needs to go in the buffer pages. Signed-off-by: Anna Schumaker Signed-off-by: J. Bruce Fields commit 3caf91757ced158e6c4a44d8b105bd7b3e1767d8 Author: Hou Tao Date: Fri Aug 28 15:02:55 2020 +0800 nfsd: rename delegation related tracepoints to make them less confusing Now when a read delegation is given, two delegation related traces will be printed: nfsd_deleg_open: client 5f45b854:e6058001 stateid 00000030:00000001 nfsd_deleg_none: client 5f45b854:e6058001 stateid 0000002f:00000001 Although the intention is to let developers know two stateid are returned, the traces are confusing about whether or not a read delegation is handled out. So renaming trace_nfsd_deleg_none() to trace_nfsd_open() and trace_nfsd_deleg_open() to trace_nfsd_deleg_read() to make the intension clearer. The patched traces will be: nfsd_deleg_read: client 5f48a967:b55b21cd stateid 00000003:00000001 nfsd_open: client 5f48a967:b55b21cd stateid 00000002:00000001 Suggested-by: Chuck Lever Signed-off-by: Hou Tao Signed-off-by: J. Bruce Fields commit ade3dbad1459e0a9a8ee8812925e0d968a2a5252 Author: J. Bruce Fields Date: Thu Aug 27 12:06:06 2020 -0400 Documentation: update RPCSEC_GSSv3 RFC link This draft is an official RFC now. Signed-off-by: J. Bruce Fields commit ff7e11f357abece005a44c64b72e2ab495c6e365 Author: J. Bruce Fields Date: Thu Aug 27 11:40:58 2020 -0400 MAINTAINERS: Note NFS docs under Documentation/ It struck me while watching Jon Corbet ask how to keep kernel Documentation up to date, that it might help if we were actually cc'd on Documentation/filesystems/nfs/ changes. Signed-off-by: J. Bruce Fields commit e2a1840e56a1ace8bce86bc7e40923b4b2748404 Author: Alex Dewar Date: Wed Aug 12 15:12:51 2020 +0100 nfsd: Remove unnecessary assignment in nfs4xdr.c In nfsd4_encode_listxattrs(), the variable p is assigned to at one point but this value is never used before p is reassigned. Fix this. Addresses-Coverity: ("Unused value") Signed-off-by: Alex Dewar Signed-off-by: J. Bruce Fields commit 1cc5213baada95155a25e59e21ef696aba1f8143 Author: Randy Dunlap Date: Sat Aug 22 18:07:38 2020 -0700 net: sunrpc: delete repeated words Drop duplicate words in net/sunrpc/. Also fix "Anyone" to be "Any one". Signed-off-by: Randy Dunlap Cc: "J. Bruce Fields" Cc: Chuck Lever Cc: linux-nfs@vger.kernel.org Signed-off-by: J. Bruce Fields commit 4cce11fa48b8e9634309e5eac5aa49046e6a72c1 Author: Alex Dewar Date: Mon Aug 17 18:51:26 2020 +0100 nfsd: Fix typo in comment Missing "is". Signed-off-by: Alex Dewar Signed-off-by: J. Bruce Fields commit 12ed22f3c3dc75687ec532534aa01cd41111c1f8 Author: J. Bruce Fields Date: Fri Jul 31 16:20:05 2020 -0400 nfsd: give up callbacks on revoked delegations The delegation is no longer returnable, so I don't think there's much point retrying the recall. (I think it's worth asking why we even need separate CLOSED_DELEG and REVOKED_DELEG states. But treating them the same would currently cause nfsd4_free_stateid to call list_del_init(&dp->dl_recall_lru) on a delegation that the laundromat had unhashed but not revoked, incorrectly removing it from the laundromat's reaplist or a client's dl_recall_lru.) Signed-off-by: J. Bruce Fields commit e56dc9e2949edff7932474f2552dd134734cc857 Author: J. Bruce Fields Date: Thu Jul 30 20:33:57 2020 -0400 nfsd: remove fault injection code It was an interesting idea but nobody seems to be using it, it's buggy at this point, and nfs4state.c is already complicated enough without it. The new nfsd/clients/ code provides some of the same functionality, and could probably do more if desired. This feature has been deprecated since 9d60d93198c6 ("Deprecate nfsd fault injection"). Signed-off-by: J. Bruce Fields commit 336af6a4686d885a067ecea8c3c3dd129ba4fc75 Author: Michael Schaller Date: Fri Sep 25 09:45:02 2020 +0200 efivarfs: Replace invalid slashes with exclamation marks in dentries. Without this patch efivarfs_alloc_dentry creates dentries with slashes in their name if the respective EFI variable has slashes in its name. This in turn causes EIO on getdents64, which prevents a complete directory listing of /sys/firmware/efi/efivars/. This patch replaces the invalid shlashes with exclamation marks like kobject_set_name_vargs does for /sys/firmware/efi/vars/ to have consistently named dentries under /sys/firmware/efi/vars/ and /sys/firmware/efi/efivars/. Signed-off-by: Michael Schaller Link: https://lore.kernel.org/r/20200925074502.150448-1-misch@google.com Signed-off-by: Ard Biesheuvel commit f5344e5d6ccb9ddf377202690a135bc64607c621 Author: Tian Tao Date: Thu Sep 24 10:20:18 2020 +0800 efi: Delete deprecated parameter comments Delete deprecated parameter comments to fix warnings reported by make W=1. drivers/firmware/efi/vars.c:428: warning: Excess function parameter 'atomic' description in 'efivar_init' Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1600914018-12697-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ard Biesheuvel commit aad0f3d693bbb356b9478879ecd245d4f7a2beb0 Author: Tian Tao Date: Mon Sep 21 09:53:23 2020 +0800 efi/libstub: Fix missing-prototypes in string.c Fix the following warnings. drivers/firmware/efi/libstub/string.c:83:20: warning: no previous prototype for ‘simple_strtoull’ [-Wmissing-prototypes] drivers/firmware/efi/libstub/string.c:108:6: warning: no previous prototype for ‘simple_strtol’ [-Wmissing-prototypes] Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1600653203-57909-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ard Biesheuvel commit 6277e374b0b07c1a93c829f0a27e38739b3b7a1b Author: Ard Biesheuvel Date: Thu Sep 24 13:52:24 2020 +0200 efi: Add definition of EFI_MEMORY_CPU_CRYPTO and ability to report it Incorporate the definition of EFI_MEMORY_CPU_CRYPTO from the UEFI specification v2.8, and wire it into our memory map dumping routine as well. To make a bit of space in the output buffer, which is provided by the various callers, shorten the descriptive names of the memory types. Reviewed-by: Laszlo Ersek Signed-off-by: Ard Biesheuvel commit 84085f877295b6b12d95262ec4082447214b09be Merge: 182bf3f3ddb60 9a856cae2217c Author: Alexei Starovoitov Date: Fri Sep 25 13:58:02 2020 -0700 Merge branch 'enable-bpf_skc-cast-for-networking-progs' Martin KaFai Lau says: ==================== This set allows networking prog type to directly read fields from the in-kernel socket type, e.g. "struct tcp_sock". Patch 2 has the details on the use case. v3: - Pass arg_btf_id instead of fn into check_reg_type() in Patch 1 (Lorenz) - Move arg_btf_id from func_proto to struct bpf_reg_types in Patch 2 (Lorenz) - Remove test_sock_fields from .gitignore in Patch 8 (Andrii) - Add tests to have better coverage on the modified helpers (Alexei) Patch 13 is added. - Use "void *sk" as the helper argument in UAPI bpf.h v3: - ARG_PTR_TO_SOCK_COMMON_OR_NULL was attempted in v2. The _OR_NULL was needed because the PTR_TO_BTF_ID could be NULL but note that a could be NULL PTR_TO_BTF_ID is not a scalar NULL to the verifier. "_OR_NULL" implicitly gives an expectation that the helper can take a scalar NULL which does not make sense in most (except one) helpers. Passing scalar NULL should be rejected at the verification time. Thus, this patch uses ARG_PTR_TO_BTF_ID_SOCK_COMMON to specify that the helper can take both the btf-id ptr or the legacy PTR_TO_SOCK_COMMON but not scalar NULL. It requires the func_proto to explicitly specify the arg_btf_id such that there is a very clear expectation that the helper can handle a NULL PTR_TO_BTF_ID. v2: - Add ARG_PTR_TO_SOCK_COMMON_OR_NULL (Lorenz) ==================== Signed-off-by: Alexei Starovoitov commit d0186842ec5f456af531c66ee1ca64a8682695e6 Author: Florian Fainelli Date: Thu Sep 24 17:27:44 2020 -0700 net: vlan: Avoid using BUG() in vlan_proto_idx() While we should always make sure that we specify a valid VLAN protocol to vlan_proto_idx(), killing the machine when an invalid value is specified is too harsh and not helpful for debugging. All callers are capable of dealing with an error returned by vlan_proto_idx() so check the index value and propagate it accordingly. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit c220ba6f6237ed3d83d547607f42073398571433 Author: Evan Quan Date: Thu Sep 24 12:08:04 2020 +0800 drm/amd/pm: fix screen flicker seen on Navi14 with 2*4K monitors Revert the guilty change introduced by the commit below: drm/amd/pm: postpone SOCCLK/UCLK enablement after DAL initialization(V2) Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a069a9eb73f896b84d8cfda2f2d436c1844c4e92 Author: Alex Deucher Date: Fri Sep 25 10:29:01 2020 -0400 drm/amdgpu: fix a warning in amdgpu_ras.c (v2) drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c: In function ‘amdgpu_ras_fs_init’: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1284:2: warning: ignoring return value of ‘sysfs_create_group’, declared with attribute warn_unused_result [-Wunused-result] 1284 | sysfs_create_group(&adev->dev->kobj, &group); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v2: just print an error for sysfs group creation failure Acked-by: Nirmoy Das Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit c3d4d45db2fa05462629dbb0857146f5bedfc558 Author: Guchun Chen Date: Thu Sep 24 18:09:44 2020 +0800 drm/amdgpu: clean up ras sysfs creation (v2) Merge ras sysfs creation together by calling sysfs_create_group once, as sysfs_update_group may not work properly as expected. v2: improve commit message Signed-off-by: Guchun Chen Acked-by: Christian König Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit b602ca5f31fe69588aae9ee13fd50a49ef0a57dd Author: Tiecheng Zhou Date: Wed Aug 19 10:27:09 2020 +0800 drm/amdgpu: stop data_exchange work thread before reset In FLR routine, init_data_exchange is called at reset_sriov while fini_data_exchange is not. This will duplicating work thread. So call fini_data_exchange before reset for SRIOV Signed-off-by: Tiecheng Zhou Signed-off-by: Bokun Zhang Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit 519b8b76f0b62a0be0d9fcee39819d2461fc3cb0 Author: Bokun Zhang Date: Tue Jul 28 15:29:12 2020 -0400 drm/amdgpu: Implement new guest side VF2PF message transaction (v2) - Refactor the driver code to use amdgpu_virt_read_pf2vf_data and amdgpu_virt_write_vf2pf_data instead of writing all code in one function (which is the old amdgpu_virt_init_data_exchange) - Adding a new transaction method for VF2PF message between host and guest driver. Guest side will periodically update VF2PF message in the framebuffer. In the new header, we include guest ucode information, guest framebuffer usage, and engine usage - Clean up the old macros since they will cause compile error if the new transaction method is used v2: squash in build fix Signed-off-by: Bokun Zhang Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit 9a856cae2217ca1bc0726417d32f3f1daf035389 Author: Martin KaFai Lau Date: Thu Sep 24 17:04:58 2020 -0700 bpf: selftest: Add test_btf_skc_cls_ingress This patch attaches a classifier prog to the ingress filter. It exercises the following helpers with different socket pointer types in different logical branches: 1. bpf_sk_release() 2. bpf_sk_assign() 3. bpf_skc_to_tcp_request_sock(), bpf_skc_to_tcp_sock() 4. bpf_tcp_gen_syncookie, bpf_tcp_check_syncookie Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200925000458.3859627-1-kafai@fb.com commit 0c402c6c3031fd6ba23c6a2433b9f804da093b20 Author: Martin KaFai Lau Date: Thu Sep 24 17:04:52 2020 -0700 bpf: selftest: Remove enum tcp_ca_state from bpf_tcp_helpers.h The enum tcp_ca_state is available in . Remove it from the bpf_tcp_helpers.h to avoid conflict when the bpf prog needs to include both both and bpf_tcp_helpers.h. Modify the bpf_cubic.c and bpf_dctcp.c to use instead. The is needed by . Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200925000452.3859313-1-kafai@fb.com commit edc2d66ad1851db6bd89a611b4e46470f1a40ba9 Author: Martin KaFai Lau Date: Thu Sep 24 17:04:46 2020 -0700 bpf: selftest: Use bpf_skc_to_tcp_sock() in the sock_fields test This test uses bpf_skc_to_tcp_sock() to get a kernel tcp_sock ptr "ktp". Access the ktp->lsndtime and also pass ktp to bpf_sk_storage_get(). It also exercises the bpf_sk_cgroup_id() and bpf_sk_ancestor_cgroup_id() with the "ktp". To do that, a parent cgroup and a child cgroup are created. The bpf prog is attached to the child cgroup. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200925000446.3858975-1-kafai@fb.com commit c40a565a04afd0429ecc8a1a2c9aff897796118f Author: Martin KaFai Lau Date: Thu Sep 24 17:04:40 2020 -0700 bpf: selftest: Use network_helpers in the sock_fields test This patch uses start_server() and connect_to_fd() from network_helpers.h to remove the network testing boiler plate codes. epoll is no longer needed also since the timeout has already been taken care of also. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200925000440.3858639-1-kafai@fb.com commit b18c1f0aa4775bf1ecfbe5942e4e7c6bffdeff6a Author: Martin KaFai Lau Date: Thu Sep 24 17:04:34 2020 -0700 bpf: selftest: Adapt sock_fields test to use skel and global variables skel is used. Global variables are used to store the result from bpf prog. addr_map, sock_result_map, and tcp_sock_result_map are gone. Instead, global variables listen_tp, srv_sa6, cli_tp,, srv_tp, listen_sk, srv_sk, and cli_sk are added. Because of that, bpf_addr_array_idx and bpf_result_array_idx are also no longer needed. CHECK() macro from test_progs.h is reused and bail as soon as a CHECK failure. shutdown() is used to ensure the previous data-ack is received. The bytes_acked, bytes_received, and the pkt_out_cnt checks are using "<" to accommodate the final ack may not have been received/sent. It is enough since it is not the focus of this test. The sk local storage is all initialized to 0xeB9F now, so the check_sk_pkt_out_cnt() always checks with the 0xeB9F base. It is to keep things simple. The next patch will reuse helpers from network_helpers.h to simplify things further. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200925000434.3858204-1-kafai@fb.com commit 6f521a2bd26870bcd14aac42ff2ce0b1a22ae477 Author: Martin KaFai Lau Date: Thu Sep 24 17:04:27 2020 -0700 bpf: selftest: Move sock_fields test into test_progs This is a mechanical change to 1. move test_sock_fields.c to prog_tests/sock_fields.c 2. rename progs/test_sock_fields_kern.c to progs/test_sock_fields.c Minimal change is made to the code itself. Next patch will make changes to use new ways of writing test, e.g. use skel and global variables. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200925000427.3857814-1-kafai@fb.com commit 5d13746dd8359e1d0b354b557ebb36e8e1939a6c Author: Martin KaFai Lau Date: Thu Sep 24 17:04:21 2020 -0700 bpf: selftest: Add ref_tracking verifier test for bpf_skc casting The patch tests for: 1. bpf_sk_release() can be called on a tcp_sock btf_id ptr. 2. Ensure the tcp_sock btf_id pointer cannot be used after bpf_sk_release(). Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20200925000421.3857616-1-kafai@fb.com commit 27e5203bd9c5cc6d54dcac48c3027f3f04522b8b Author: Martin KaFai Lau Date: Thu Sep 24 17:04:15 2020 -0700 bpf: Change bpf_sk_assign to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON This patch changes the bpf_sk_assign() to take ARG_PTR_TO_BTF_ID_SOCK_COMMON such that they will work with the pointer returned by the bpf_skc_to_*() helpers also. The bpf_sk_lookup_assign() is taking ARG_PTR_TO_SOCKET_"OR_NULL". Meaning it specifically takes a literal NULL. ARG_PTR_TO_BTF_ID_SOCK_COMMON does not allow a literal NULL, so another ARG type is required for this purpose and another follow-up patch can be used if there is such need. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200925000415.3857374-1-kafai@fb.com commit c0df236e1394970f3503a8fb103de95d000014ca Author: Martin KaFai Lau Date: Thu Sep 24 17:04:09 2020 -0700 bpf: Change bpf_tcp_*_syncookie to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON This patch changes the bpf_tcp_*_syncookie() to take ARG_PTR_TO_BTF_ID_SOCK_COMMON such that they will work with the pointer returned by the bpf_skc_to_*() helpers also. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20200925000409.3856725-1-kafai@fb.com commit 592a3498648af000e93dff2d36229ab11cd8c7f6 Author: Martin KaFai Lau Date: Thu Sep 24 17:04:02 2020 -0700 bpf: Change bpf_sk_storage_*() to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON This patch changes the bpf_sk_storage_*() to take ARG_PTR_TO_BTF_ID_SOCK_COMMON such that they will work with the pointer returned by the bpf_skc_to_*() helpers also. A micro benchmark has been done on a "cgroup_skb/egress" bpf program which does a bpf_sk_storage_get(). It was driven by netperf doing a 4096 connected UDP_STREAM test with 64bytes packet. The stats from "kernel.bpf_stats_enabled" shows no meaningful difference. The sk_storage_get_btf_proto, sk_storage_delete_btf_proto, btf_sk_storage_get_proto, and btf_sk_storage_delete_proto are no longer needed, so they are removed. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20200925000402.3856307-1-kafai@fb.com commit a5fa25adf03d4b063aece74ba70ccbb3a71af122 Author: Martin KaFai Lau Date: Thu Sep 24 17:03:56 2020 -0700 bpf: Change bpf_sk_release and bpf_sk_*cgroup_id to accept ARG_PTR_TO_BTF_ID_SOCK_COMMON The previous patch allows the networking bpf prog to use the bpf_skc_to_*() helpers to get a PTR_TO_BTF_ID socket pointer, e.g. "struct tcp_sock *". It allows the bpf prog to read all the fields of the tcp_sock. This patch changes the bpf_sk_release() and bpf_sk_*cgroup_id() to take ARG_PTR_TO_BTF_ID_SOCK_COMMON such that they will work with the pointer returned by the bpf_skc_to_*() helpers also. For example, the following will work: sk = bpf_skc_lookup_tcp(skb, tuple, tuplen, BPF_F_CURRENT_NETNS, 0); if (!sk) return; tp = bpf_skc_to_tcp_sock(sk); if (!tp) { bpf_sk_release(sk); return; } lsndtime = tp->lsndtime; /* Pass tp to bpf_sk_release() will also work */ bpf_sk_release(tp); Since PTR_TO_BTF_ID could be NULL, the helper taking ARG_PTR_TO_BTF_ID_SOCK_COMMON has to check for NULL at runtime. A btf_id of "struct sock" may not always mean a fullsock. Regardless the helper's running context may get a non-fullsock or not, considering fullsock check/handling is pretty cheap, it is better to keep the same verifier expectation on helper that takes ARG_PTR_TO_BTF_ID* will be able to handle the minisock situation. In the bpf_sk_*cgroup_id() case, it will try to get a fullsock by using sk_to_full_sk() as its skb variant bpf_sk"b"_*cgroup_id() has already been doing. bpf_sk_release can already handle minisock, so nothing special has to be done. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200925000356.3856047-1-kafai@fb.com commit 1df8f55a37bd286a3d40192980050bc3d7d78887 Author: Martin KaFai Lau Date: Thu Sep 24 17:03:50 2020 -0700 bpf: Enable bpf_skc_to_* sock casting helper to networking prog type There is a constant need to add more fields into the bpf_tcp_sock for the bpf programs running at tc, sock_ops...etc. A current workaround could be to use bpf_probe_read_kernel(). However, other than making another helper call for reading each field and missing CO-RE, it is also not as intuitive to use as directly reading "tp->lsndtime" for example. While already having perfmon cap to do bpf_probe_read_kernel(), it will be much easier if the bpf prog can directly read from the tcp_sock. This patch tries to do that by using the existing casting-helpers bpf_skc_to_*() whose func_proto returns a btf_id. For example, the func_proto of bpf_skc_to_tcp_sock returns the btf_id of the kernel "struct tcp_sock". These helpers are also added to is_ptr_cast_function(). It ensures the returning reg (BPF_REF_0) will also carries the ref_obj_id. That will keep the ref-tracking works properly. The bpf_skc_to_* helpers are made available to most of the bpf prog types in filter.c. The bpf_skc_to_* helpers will be limited by perfmon cap. This patch adds a ARG_PTR_TO_BTF_ID_SOCK_COMMON. The helper accepting this arg can accept a btf-id-ptr (PTR_TO_BTF_ID + &btf_sock_ids[BTF_SOCK_TYPE_SOCK_COMMON]) or a legacy-ctx-convert-skc-ptr (PTR_TO_SOCK_COMMON). The bpf_skc_to_*() helpers are changed to take ARG_PTR_TO_BTF_ID_SOCK_COMMON such that they will accept pointer obtained from skb->sk. Instead of specifying both arg_type and arg_btf_id in the same func_proto which is how the current ARG_PTR_TO_BTF_ID does, the arg_btf_id of the new ARG_PTR_TO_BTF_ID_SOCK_COMMON is specified in the compatible_reg_types[] in verifier.c. The reason is the arg_btf_id is always the same. Discussion in this thread: https://lore.kernel.org/bpf/20200922070422.1917351-1-kafai@fb.com/ The ARG_PTR_TO_BTF_ID_ part gives a clear expectation that the helper is expecting a PTR_TO_BTF_ID which could be NULL. This is the same behavior as the existing helper taking ARG_PTR_TO_BTF_ID. The _SOCK_COMMON part means the helper is also expecting the legacy SOCK_COMMON pointer. By excluding the _OR_NULL part, the bpf prog cannot call helper with a literal NULL which doesn't make sense in most cases. e.g. bpf_skc_to_tcp_sock(NULL) will be rejected. All PTR_TO_*_OR_NULL reg has to do a NULL check first before passing into the helper or else the bpf prog will be rejected. This behavior is nothing new and consistent with the current expectation during bpf-prog-load. [ ARG_PTR_TO_BTF_ID_SOCK_COMMON will be used to replace ARG_PTR_TO_SOCK* of other existing helpers later such that those existing helpers can take the PTR_TO_BTF_ID returned by the bpf_skc_to_*() helpers. The only special case is bpf_sk_lookup_assign() which can accept a literal NULL ptr. It has to be handled specially in another follow up patch if there is a need (e.g. by renaming ARG_PTR_TO_SOCKET_OR_NULL to ARG_PTR_TO_BTF_ID_SOCK_COMMON_OR_NULL). ] [ When converting the older helpers that take ARG_PTR_TO_SOCK* in the later patch, if the kernel does not support BTF, ARG_PTR_TO_BTF_ID_SOCK_COMMON will behave like ARG_PTR_TO_SOCK_COMMON because no reg->type could have PTR_TO_BTF_ID in this case. It is not a concern for the newer-btf-only helper like the bpf_skc_to_*() here though because these helpers must require BTF vmlinux to begin with. ] Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200925000350.3855720-1-kafai@fb.com commit a968d5e277f1a640a3184561ac2c39261ba79196 Author: Martin KaFai Lau Date: Thu Sep 24 17:03:44 2020 -0700 bpf: Move the PTR_TO_BTF_ID check to check_reg_type() check_reg_type() checks whether a reg can be used as an arg of a func_proto. For PTR_TO_BTF_ID, the check is actually not completely done until the reg->btf_id is pointing to a kernel struct that is acceptable by the func_proto. Thus, this patch moves the btf_id check into check_reg_type(). "arg_type" and "arg_btf_id" are passed to check_reg_type() instead of "compatible". The compatible_reg_types[] usage is localized in check_reg_type() now. The "if (!btf_id) verbose(...); " is also removed since it won't happen. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Lorenz Bauer Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200925000344.3854828-1-kafai@fb.com commit 1721bc1b2afaefbd880b4606f5147b4ff487904c Author: Bokun Zhang Date: Wed Jul 15 19:46:26 2020 -0400 drm/amdgpu: Update VF2PF interface - Update guest side VF2PF interface header file Signed-off-by: Bokun Zhang Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit 549750a383bf1c6a4a8ba3634c85e00e7f4585da Author: Ryan Taylor Date: Thu Sep 17 17:19:33 2020 -0700 drm/include: add PP_FEATURE_MASK comments (v3) Documents PP_FEATURE_MASK enum. Provides instructions on how to use ppfeaturemasks. v2: improve enum definitions and add kernel command line parameters to ppfeaturemask instructions v3: fix alignment issues Signed-off-by: Ryan Taylor Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 265c280a4807419249644156654e5c40a235ea84 Author: John Clements Date: Thu Sep 24 22:20:31 2020 +0800 drm/amdgpu: disable sienna chichlid UMC RAS disable UMC RAS in lieu of stability issues on certain sku Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit d5cc02d97ab125b62075ad296e4dca9a7fc54c9b Author: Alex Deucher Date: Wed Sep 23 09:50:24 2020 -0400 drm/amdgpu: add an auto setting to the noretry parameter This allows us to set different defaults on a per asic basis. This way we can enable noretry on dGPUs where it can increase performance in certain cases and disable it on chips where it can be problematic. For now the default is 0 for all asics, but we may want to try and enable it again for newer dGPUs. Reviewed-by: Christian König Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 9b498efae29f86d53fbd44845324f0f0faae5ff2 Author: Alex Deucher Date: Wed Sep 23 09:37:39 2020 -0400 drm/amdgpu: store noretry parameter per driver instance This will allow us to have different defaults per asic in a future patch. Reviewed-by: Christian König Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 2fbb84ff160cb9418d5768b5d9422baadcb6cbf8 Author: Alex Deucher Date: Tue Sep 22 11:34:16 2020 -0400 drm/amdgpu/display: fix CFLAGS setup for DCN30 Properly handle clang and older versions of gcc. Fixes: e77165bf7b02a3 ("drm/amd/display: Add DCN3 blocks to Makefile") Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 884dcf3c8788a977842733bbac5f5c5f349724ac Author: Emily.Deng Date: Wed Sep 23 16:36:35 2020 +0800 drm/amdgpu: Remove some useless code Signed-off-by: Emily.Deng Reviewed-by: Frank Min Signed-off-by: Alex Deucher commit 162b786f0fdac97afe27879c9120ff59b383f8f3 Author: Jingwen Chen Date: Fri Sep 18 17:43:49 2020 +0800 drm/amd: Skip not used microcode loading in SRIOV smc, sdma, sos, ta and asd fw is not used in SRIOV. Skip them to accelerate sw_init for navi12. v2: skip above fw in SRIOV for vega10 and sienna_cichlid v3: directly skip psp fw loading in SRIOV Signed-off-by: Jingwen Chen Reviewed-by: Emily.Deng Signed-off-by: Alex Deucher commit 7c67d74d101324bf75a671316b6d0d861788edc9 Author: Jingwen Chen Date: Fri Sep 18 11:23:09 2020 +0800 drm/amd/pm: Skip use smc fw data in SRIOV smc fw is not needed in SRIOV, thus driver should not try to get smc fw data. Signed-off-by: Jingwen Chen Reviewed-by: Emily.Deng Signed-off-by: Alex Deucher commit 3704cdd30aa99a4fa2551e164fe074da0e1bc1fd Author: Flora Cui Date: Wed Sep 23 14:42:59 2020 +0800 drm/amd/display: fix return value check for hdcp_work max_caps might be 0, thus hdcp_work might be ZERO_SIZE_PTR Signed-off-by: Flora Cui Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 84d244a364d3e9e115f3d189b8bd3098968eac1d Author: Jiansong Chen Date: Wed Sep 23 11:58:23 2020 +0800 drm/amdgpu: remove gpu_info fw support for sienna_cichlid etc. Remove gpu_info fw support for sienna_cichlid etc., since the information can be retrieved from discovery binary. Signed-off-by: Jiansong Chen Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit b4ac06ed7fb097b1f2a4fd2d9754387f48b6ebfe Merge: 4cafaddedb5fb b1dd565124bea Author: Mark Brown Date: Fri Sep 25 21:40:21 2020 +0100 Merge series "Add IRQ mode support for hisi-sfc-v3xx driver and some cleanups" from Yicong Yang : This series mainly add the IRQ mode support for hisi-sfc-v3xx driver, and some cleanups for the preparation of the IRQ mode. After this patch, the device can work in IRQ mode, or if firmware doesn't declare irq support it will fall back to Poll mode. Patch 1-2 refactor the .exec_op() path to make it simpler and clearer. Patch 3 factor the definition of the interrupt bits. Patch 4 add the IRQ support of the driver. Yicong Yang (4): spi: hisi-sfc-v3xx: factor out IO modes configuration spi: hisi-sfc-v3xx: factor out bus config and transfer functions spi: hisi-sfc-v3xx: factor out the bit definition of interrupt register spi: hisi-sfc-v3xx: add support for IRQ mode drivers/spi/spi-hisi-sfc-v3xx.c | 261 +++++++++++++++++++++++++++++----------- 1 file changed, 190 insertions(+), 71 deletions(-) -- 2.8.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ commit 4cafaddedb5fbef9531202ee547784409fd0de33 Author: Chuanhong Guo Date: Tue Sep 22 19:49:02 2020 +0800 spi: spi-mtk-nor: fix timeout calculation overflow CLK_TO_US macro is used to calculate potential transfer time for various timeout handling. However it overflows on transfer bigger than 512 bytes because it first did (len * 8 * 1000000). This controller typically operates at 45MHz. This patch did 2 things: 1. calculate clock / 1000000 first 2. add a 4M transfer size cap so that the final timeout in DMA reading doesn't overflow Fixes: 881d1ee9fe81f ("spi: add support for mediatek spi-nor controller") Cc: Signed-off-by: Chuanhong Guo Link: https://lore.kernel.org/r/20200922114905.2942859-1-gch981213@gmail.com Signed-off-by: Mark Brown commit b1dd565124bea0f3ecde87336b48c5d0e98cd5bc Author: Yicong Yang Date: Thu Sep 24 20:24:30 2020 +0800 spi: hisi-sfc-v3xx: add support for IRQ mode The controller can work with interrupts, so add support for it. Then we can work under IRQ mode or Poll mode now, if firmware doesn't declare the IRQ support, it will fall back to Poll mode. Acked-by: John Garry Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/1600950270-52536-5-git-send-email-yangyicong@hisilicon.com Signed-off-by: Mark Brown commit aac6edff843871d7d732a6aa6f495b9eb1dea83a Author: Yicong Yang Date: Thu Sep 24 20:24:29 2020 +0800 spi: hisi-sfc-v3xx: factor out the bit definition of interrupt register The definition of the register field in the interrupt corresponding registers are the same. So factor them out to public place. Acked-by: John Garry Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/1600950270-52536-4-git-send-email-yangyicong@hisilicon.com Signed-off-by: Mark Brown commit f6d2737720d6f6e5f4825b7203ad8b5cfcf9906c Author: Yicong Yang Date: Thu Sep 24 20:24:28 2020 +0800 spi: hisi-sfc-v3xx: factor out bus config and transfer functions In hisi_sfc_v3xx_generic_exec_op(), we will write the data to the buffer, configure and start the transfer, read the data to the buffer and check whether occurs an error. Factor out the config and transfer start codes as individual functions, to make the process a bit clearer. Acked-by: John Garry Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/1600950270-52536-3-git-send-email-yangyicong@hisilicon.com Signed-off-by: Mark Brown commit 2c8af6a59744b242a193118c799a45621476f8ed Author: Yicong Yang Date: Thu Sep 24 20:24:27 2020 +0800 spi: hisi-sfc-v3xx: factor out IO modes configuration Factor IO modes configuration out of hisi_sfc_v3xx_generic_exec_op() using an IO modes lookup table. This will make the process a bit clearer and reduce the cyclomatic complexity. Simplify the IO mode definition macros a little bit as well. Also add the .supports_op() method for the controller mem ops, in order to avoid OOB access. Acked-by: John Garry Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/1600950270-52536-2-git-send-email-yangyicong@hisilicon.com Signed-off-by: Mark Brown commit 7806f6561cd51de382f7628e7f4ecef4568d88da Merge: aafe8853f5e2b bc8befe6f9502 Author: David S. Miller Date: Fri Sep 25 13:16:29 2020 -0700 Merge tag 'wireless-drivers-next-2020-09-25' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.10 Second set of patches for v5.10. Biggest change here is wcn3680 support to wcn36xx driver, otherwise smaller features. And naturally the usual fixes and cleanups. Major changes: brcmfmac * support 4-way handshake offloading for WPA/WPA2-PSK in AP mode * support SAE authentication offload in AP mode mt76 * mt7663 runtime power management improvements * mt7915 A-MSDU offload wcn36xx * add support wcn3680 Wi-Fi 5 devices ath11k * spectral scan support for ipq6018 ==================== Signed-off-by: David S. Miller commit 24c95ec9fbb630981a42c196766c1d21f4a28052 Merge: d83fa234ae9ef dd759805d6f78 Author: Mark Brown Date: Fri Sep 25 20:58:05 2020 +0100 Merge series "Enable runtime PM for SOF device" from Daniel Baluta Daniel Baluta : From: Daniel Baluta This enables runtime PM for SOF device. Next patchseries will provide PM suspend/resume handlers for i.MX8 specific devices. Daniel Baluta (2): ASoC: SOF: Activate runtime PM with SOF OF device ASoC: SOF: Add .prepare/.complete callbacks sound/soc/sof/sof-of-dev.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 commit d83fa234ae9ef68f973e1dabe19b7ec078cfcd63 Merge: 7e6799d8f87d7 5d0576bba9eb3 Author: Mark Brown Date: Fri Sep 25 20:50:41 2020 +0100 Merge series "ASoC: qdsp6: fix some warnings when build without CONFIG_OF" from Srinivas Kandagatla : Here are fixes for two warnings types discovered while building qdsp6 drivers without CONFIG_OF and with W=1 One of them was reported by Intel kernel test robot on q6afe-clocks patch, which equally applies to rest of the qdsp6 drivers. changes since v1: - added ifdef CONFIG_OF instead of removing of_match_ptr Srinivas Kandagatla (2): ASoC: qdsp6: add ifdef CONFIG_OF around of_device_id ASoC: q6asm: fix kernel doc warnings sound/soc/qcom/qdsp6/q6adm.c | 2 ++ sound/soc/qcom/qdsp6/q6afe-clocks.c | 2 ++ sound/soc/qcom/qdsp6/q6afe-dai.c | 2 ++ sound/soc/qcom/qdsp6/q6afe.c | 2 ++ sound/soc/qcom/qdsp6/q6asm-dai.c | 2 ++ sound/soc/qcom/qdsp6/q6asm.c | 6 ++++++ sound/soc/qcom/qdsp6/q6core.c | 2 ++ sound/soc/qcom/qdsp6/q6routing.c | 2 ++ 8 files changed, 20 insertions(+) -- 2.21.0 commit 7e6799d8f87d7ab7ae55a229654d161b5bfae874 Author: V Sujith Kumar Reddy Date: Fri Sep 18 22:24:33 2020 +0530 ASoC: qcom: lpass-cpu: Enable MI2S BCLK and LRCLK together Update lpass-cpu.c to enable I2S BCLK and LRCLK together. Remove BCLK enable in lpass_cpu_daiops_startup and add in lpass_cpu_daiops_trigger API. Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/1600448073-6709-1-git-send-email-srivasam@codeaurora.org Signed-off-by: Mark Brown commit f95cc5c18c15a425c3dceec48df6b4e27a202dda Author: Xu Wang Date: Mon Sep 21 01:59:18 2020 +0000 ASoC: fsl: imx-audmix: Use devm_kcalloc() instead of devm_kzalloc() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20200921015918.24157-1-vulab@iscas.ac.cn Signed-off-by: Mark Brown commit ff1d9ff43878de14b6ee4a089eb9f4a7e8f28a7f Author: Dan Murphy Date: Thu Sep 24 09:26:41 2020 -0500 dt-bindings: tas2770: Mark ti,asi-format to deprecated Mark the property ti,asi-format to deprecated as it is no longer supported. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200924142641.12355-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 720dee53ad8dfd528941fbbc264574601b04488a Author: Masami Hiramatsu Date: Fri Sep 25 01:40:08 2020 +0900 tracing/boot: Initialize per-instance event list in early boot Initialize per-instance event list in early boot time (before initializing instance directory on tracefs). This fixes boot-time tracing to correctly handle the boot-time per-instance settings. Link: https://lkml.kernel.org/r/160096560826.182763.17110991546046128881.stgit@devnote2 Fixes: 4114fbfd02f1 ("tracing: Enable creating new instance early boot") Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 3442de9cc322500b56a5918139bffcdd62063cc9 Author: Pavel Reichl Date: Fri Sep 25 11:11:37 2020 -0700 xfs: remove deprecated sysctl options These optionr were for Irix compatibility, probably for clustered XFS clients in a heterogenous cluster which contained both Irix & Linux machines, so that behavior would be consistent. That doesn't exist anymore and it's no longer needed. Signed-off-by: Pavel Reichl Reviewed-by: Darrick J. Wong [darrick: actually state when the sysctls go away] Signed-off-by: Darrick J. Wong commit c23c393eaab5d3097d8b95e5bcbbe73e089a6165 Author: Pavel Reichl Date: Fri Sep 25 11:10:29 2020 -0700 xfs: remove deprecated mount options ikeep/noikeep was a workaround for old DMAPI code which is no longer relevant. attr2/noattr2 - is for controlling upgrade behaviour from fixed attribute fork sizes in the inode (attr1) and dynamic attribute fork sizes (attr2). mkfs has defaulted to setting attr2 since 2007, hence just about every XFS filesystem out there in production right now uses attr2. Signed-off-by: Pavel Reichl Reviewed-by: Darrick J. Wong [darrick: fix minor typos] Signed-off-by: Darrick J. Wong commit c9c626b354dca9ad59f46a5feba6c4f6c22b5a1c Author: Kaixu Xia Date: Fri Sep 25 11:10:20 2020 -0700 xfs: directly call xfs_generic_create() for ->create() and ->mkdir() The current create and mkdir handlers both call the xfs_vn_mknod() which is a wrapper routine around xfs_generic_create() function. Actually the create and mkdir handlers can directly call xfs_generic_create() function and reduce the call chain. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d7884e6e90da974b50dc2c3bf50e03b70750e5f1 Author: Darrick J. Wong Date: Thu Sep 24 09:42:55 2020 -0700 xfs: avoid shared rmap operations for attr fork extents During code review, I noticed that the rmap code uses the (slower) shared mappings rmap functions for any extent of a reflinked file, even if those extents are for the attr fork, which doesn't support sharing. We can speed up rmap a tiny bit by optimizing out this case. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit b38e07401ec7e6eefc1f84e682f5b75ce3a685e5 Author: Gao Xiang Date: Wed Sep 23 09:26:31 2020 -0700 xfs: drop the obsolete comment on filestream locking Since commit 1c1c6ebcf52 ("xfs: Replace per-ag array with a radix tree"), there is no m_peraglock anymore, so it's hard to understand the described situation since per-ag is no longer an array and no need to reallocate, call xfs_filestream_flush() in growfs. In addition, the race condition for shrink feature is quite confusing to me currently as well. Get rid of it instead. Signed-off-by: Gao Xiang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 61ef5230518a3ad224549a50a01b73989acb94b9 Author: Kaixu Xia Date: Wed Sep 23 09:14:55 2020 -0700 xfs: code cleanup in xfs_attr_leaf_entsize_{remote,local} Cleanup the typedef usage, the unnecessary parentheses, the unnecessary backslash and use the open-coded round_up call in xfs_attr_leaf_entsize_{remote,local}. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit d6b8fc6c7afa0acebaef3e17e112227237e75745 Author: Kaixu Xia Date: Wed Sep 23 09:13:28 2020 -0700 xfs: do the assert for all the log done items in xfs_trans_cancel We should do the assert for all the log intent-done items if they appear here. This patch detect intent-done items by the fact that their item ops don't have iop_unpin and iop_push methods and also move the helper xlog_item_is_intent to xfs_trans.h. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 74af4c1770f952a34e52e1eb6f1d97636d754d2c Author: Kaixu Xia Date: Tue Sep 22 09:19:18 2020 -0700 xfs: remove the unused parameter id from xfs_qm_dqattach_one Since we never use the second parameter id, so remove it from xfs_qm_dqattach_one() function. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 3feb4ffbf69321284dc78ac6ca43b4a2afadf243 Author: Kaixu Xia Date: Thu Sep 17 11:12:42 2020 -0700 xfs: remove the redundant crc feature check in xfs_attr3_rmt_verify We already check whether the crc feature is enabled before calling xfs_attr3_rmt_verify(), so remove the redundant feature check in that function. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a647d109e08ac0961ca0fd511b013d962d256987 Author: Kaixu Xia Date: Wed Sep 16 14:31:56 2020 -0700 xfs: fix some comments Fix the comments to help people understand the code. Signed-off-by: Kaixu Xia [darrick: fix the indenting problems too] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 5aff6750d56d1bbcbb525ddc6dd6b36bc426c5e7 Author: Kaixu Xia Date: Wed Sep 16 14:31:55 2020 -0700 xfs: remove the unnecessary xfs_dqid_t type cast Since the type prid_t and xfs_dqid_t both are uint32_t, seems the type cast is unnecessary, so remove it. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 9c0fce4c16fc8d4d119cc3a20f1e5ce870206706 Author: Kaixu Xia Date: Wed Sep 16 14:31:55 2020 -0700 xfs: use the existing type definition for di_projid We have already defined the project ID type prid_t, so maybe should use it here. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit c63290e300c48ee0bd77f7289b9954e99c99c729 Author: Kaixu Xia Date: Wed Sep 16 14:31:54 2020 -0700 xfs: remove the unused SYNCHRONIZE macro There are no callers of the SYNCHRONIZE() macro, so remove it. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit b560a208cda0297fef6ff85bbfd58a8f0a52a543 Author: Luiz Augusto von Dentz Date: Thu Aug 6 11:17:14 2020 -0700 Bluetooth: MGMT: Fix not checking if BT_HS is enabled This checks if BT_HS is enabled relecting it on MGMT_SETTING_HS instead of always reporting it as supported. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit b176dd0ef6afcb3bca24f41d78b0d0b731ec2d08 Author: Luiz Augusto von Dentz Date: Thu Aug 6 11:17:13 2020 -0700 Bluetooth: Disable High Speed by default Bluetooth High Speed requires hardware support which is very uncommon nowadays since HS has not pickup interest by the industry. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit f19425641cb2572a33cb074d5e30283720bd4d22 Author: Luiz Augusto von Dentz Date: Thu Aug 6 11:17:12 2020 -0700 Bluetooth: L2CAP: Fix calling sk_filter on non-socket based channel Only sockets will have the chan->data set to an actual sk, channels like A2MP would have its own data which would likely cause a crash when calling sk_filter, in order to fix this a new callback has been introduced so channels can implement their own filtering if necessary. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit eddb7732119d53400f48a02536a84c509692faa8 Author: Luiz Augusto von Dentz Date: Thu Aug 6 11:17:11 2020 -0700 Bluetooth: A2MP: Fix not initializing all members This fixes various places where a stack variable is used uninitialized. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit dd759805d6f78262cb9aa63ef37e3bc263ef1978 Author: Daniel Baluta Date: Thu Sep 24 18:15:18 2020 +0300 ASoC: SOF: Add .prepare/.complete callbacks Use SOF defined callbacks (snd_sof_prepare/snd_sof_complete) in order to update internal SOF system suspend target. Reviewed-by: Kai Vehmanen Reviewed-by: Paul Olaru Reviewed-by: Pierre-Louis Bossart Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20200924151518.15841-3-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 4fefc39894d8975d58b02b4b5f635d20891778ca Author: Daniel Baluta Date: Thu Sep 24 18:15:17 2020 +0300 ASoC: SOF: Activate runtime PM with SOF OF device SOF boots the DSP at probe and keeps it up all the time. With this change, after booting if no one is using the DSP the SOF core will turn off the DSP to save power. Reviewed-by: Kai Vehmanen Reviewed-by: Paul Olaru Reviewed-by: Pierre-Louis Bossart Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20200924151518.15841-2-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 5d0576bba9eb37bf07dc58a91568a2332a22fbcd Author: Srinivas Kandagatla Date: Fri Sep 25 17:35:52 2020 +0100 ASoC: q6asm: fix kernel doc warnings This patch fixes below kernel doc warnings on not describing all the parmeters sound/soc/qcom/qdsp6/q6asm.c:927: warning: Function parameter or member 'stream_id' not described in 'q6asm_open_write' sound/soc/qcom/qdsp6/q6asm.c:927: warning: Function parameter or member 'is_gapless' not described in 'q6asm_open_write' sound/soc/qcom/qdsp6/q6asm.c:1053: warning: Function parameter or member 'stream_id' not described in 'q6asm_run' Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200925163552.20717-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 156d0273f62fd437b25dced944788d8784f0212c Author: Srinivas Kandagatla Date: Fri Sep 25 17:35:51 2020 +0100 ASoC: qdsp6: add ifdef CONFIG_OF around of_device_id Add ifdef CONFIG_OF around of_device_id table to fix below W=1 compile test warning with !CONFIG_OF: sound/soc/qcom/qdsp6/q6afe-clocks.c:254:34: warning: unused variable 'q6afe_clock_device_id' [-Wunused-const-variable] Fix this warning for across all qdsp6 drivers. Reported-by: kernel test robot Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200925163552.20717-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 6bf28e8a05fda0547658fd51d0acc83dcac6c703 Author: Richard Fitzgerald Date: Fri Sep 25 11:59:08 2020 +0100 MAINTAINERS: Update Cirrus Logic Codecs maintainers Add patches@opensource.cirrus.com to the main group of Cirrus Logic ASoC codec drivers. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20200925105908.20640-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 22a16145af824f91014d07f8664114859900b9e6 Author: Shengjiu Wang Date: Fri Sep 18 18:26:00 2020 +0800 ASoC: fsl_sai: Instantiate snd_soc_dai_driver Instantiate snd_soc_dai_driver for independent symmetric control. Otherwise the symmetric setting may be overwritten by other instance. Fixes: 08fdf65e37d5 ("ASoC: fsl_sai: Add asynchronous mode support") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1600424760-32071-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit b03acae25e4a4ad600e91a8737c7eff2efe7d66a Author: Richard Fitzgerald Date: Fri Sep 25 10:18:30 2020 +0100 ASoC: cs47l35: Fix EPOUT->HPOUT1 Mono Mux routing EPOUT is always mono so should have a permanent routing through the HPOUT1 Mono Mux. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20200925091830.7675-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 64952377548517a14d0a6521856dde9fd8356c90 Author: Richard Fitzgerald Date: Fri Sep 25 10:18:29 2020 +0100 ASoC: cs47l15: Fix EPOUT->HPOUT1 Mono Mux routing EPOUT is always mono so should have a permanent routing through the HPOUT1 Mono Mux. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20200925091830.7675-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 4bd442e9a8388e8ec4ba7cf23a4774989d93b78e Author: Qinglang Miao Date: Sat Sep 19 09:22:52 2020 +0800 RAS/CEC: Convert to DEFINE_SHOW_ATTRIBUTE() Use the DEFINE_SHOW_ATTRIBUTE() macro and simplify the code. Signed-off-by: Qinglang Miao Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200919012252.171437-1-miaoqinglang@huawei.com commit 7d1eb2d8f05014a4970df4aeed8c096bfb5e1dcd Author: Barnabás Pőcze Date: Fri Sep 25 09:37:47 2020 +0000 ACPI: battery: include linux/power_supply.h acpi/battery.h uses 'struct power_supply *', but fails to include/create any declaration of the type. Include linux/ power_supply.h to fix that. Signed-off-by: Barnabás Pőcze [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 77569c7533a6c089c67874ad6d8b442f5c20be10 Author: Hanjun Guo Date: Thu Sep 24 10:57:07 2020 +0800 ACPI: wakeup: Remove dead ACPICA debug code The ACPICA debug code of ACPI_SYSTEM_COMPONENT and ACPI_MODULE_NAME() is not used in wakeup.c, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit e0e13705edd903b71453b2f9668d06a728eb95d7 Author: Hanjun Guo Date: Thu Sep 24 10:57:06 2020 +0800 ACPI: video: Remove leftover ACPICA debug code After commit (87521e16a7ab "acpi-video-detect: Rewrite backlight interface selection logic"), ACPI_DEBUG_PRINT() was remove, so ACPI_MODULE_NAME() and _COMPONENT are not used anymore, remove them. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit b16cd57ebc5d866c3b16664d8d19c91579b3aa88 Author: Hanjun Guo Date: Thu Sep 24 10:57:05 2020 +0800 ACPI: tiny-power-button: Remove dead ACPICA debug code The ACPICA debug code is not used, can be removed. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 34f98c29041ddbde910277fb92c1094adccd0c44 Author: Hanjun Guo Date: Thu Sep 24 10:57:04 2020 +0800 ACPI: processor: Remove dead ACPICA debug code The ACPICA debug code is not used anywhere in processor_core.c and processor_thermal.c, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit d93b767e8cb319b3062d2e6ef4328bee97da57f5 Author: Hanjun Guo Date: Thu Sep 24 10:57:03 2020 +0800 ACPI: proc: Remove dead ACPICA debug code Remove the not used ACPICA debug code _COMPONENT and ACPI_MODULE_NAME() which were not used even when proc.c was introduced. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit be690f3ed1d87ac14411772750af98ad7d6cafab Author: Hanjun Guo Date: Thu Sep 24 10:57:02 2020 +0800 ACPI: PCI: Remove unused ACPICA debug code The ACPICA debug code _COMPONENT and ACPI_MODULE_NAME() are not used, so can be removed. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 3ffa00e88df58f755b1a6ac20949ab09f92086af Author: Hanjun Guo Date: Thu Sep 24 10:57:01 2020 +0800 ACPI: event: Remove leftover ACPICA debug code After commit (ff491a7334ac "netlink: change return-value logic of netlink_broadcast()"), ACPI_DEBUG_PRINT() was removed from event.c, so the ACPICA debug code is not used, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 7ae57c6d14a28d6b04ed0fb5e05e08b113317628 Author: Hanjun Guo Date: Thu Sep 24 10:57:00 2020 +0800 ACPI: dock: Remove dead ACPICA debug code The ACPICA debug ACPI_MODULE_NAME() definition is not used, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit d0611c6e020982c691bf160854c0d004ef6f6c6c Author: Hanjun Guo Date: Thu Sep 24 10:56:59 2020 +0800 ACPI: debugfs: Remove dead ACPICA debug code The _COMPONENT and ACPI_MODULE_NAME() were not used even when the debugfs.c was introduced, remove them. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 6b168c56e5bd3cbccdd2d63cb4c15d56bdf4f7b8 Author: Hanjun Guo Date: Thu Sep 24 10:56:58 2020 +0800 ACPI: custom_method: Remove dead ACPICA debug code ACPICA debug code _COMPONENT and ACPI_MODULE_NAME() is not used in custom_method.c, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit d2c18c0db8c2f75bade2ebc483fd5dcc99da913b Author: Hanjun Guo Date: Thu Sep 24 10:56:57 2020 +0800 ACPI: container: Remove leftover ACPICA debug functionality After commit 737f1a9f8082 ("ACPI / scan: Make container driver use struct acpi_scan_handler"), ACPICA debug print function calls were removed, so the leftover ACPICA debug functionality is useless, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit da5b64329d8ff599d9683479612b50b46b4d99bf Author: Hanjun Guo Date: Thu Sep 24 10:56:56 2020 +0800 ACPI: platform: Remove ACPI_MODULE_NAME() ACPI_MODULE_NAME() is not used in the acpi_platform.c, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 8295d7900398f46f9518fa6c5465f8162b9ddc4e Author: Hanjun Guo Date: Thu Sep 24 10:56:55 2020 +0800 ACPI: memhotplug: Remove leftover ACPICA debug functionality After commit 0a34764411aa ("ACPI / scan: Make memory hotplug drive use struct acpi_scan_handler"), all the ACPICA debug functionality was removed, remove the leftover ACPICA debug code. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit cbaef23b2cb3098d7f59ea894af2315f38a8c2fc Author: Hanjun Guo Date: Thu Sep 24 10:56:54 2020 +0800 ACPI: LPSS: Remove ACPI_MODULE_NAME() ACPI_MODULE_NAME() is only needed for ACPICA debug functionality such as ACPI_DEBUG_PRINT() which is not used in acpi_lpss.c, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 1eb3d0414520c8ee91b78b9f24cf30ffe71b6e5d Author: Hanjun Guo Date: Thu Sep 24 10:56:53 2020 +0800 ACPI: cmos_rtc: Remove leftover ACPI_MODULE_NAME() ACPI_MODULE_NAME() is only needed for ACPICA debug functionality such as ACPI_DEBUG_PRINT() which is not used in acpi_cmos_rtc.c, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 8e8883cef6cea03fca63591624d6627a3e7a6eab Author: Tian Tao Date: Tue Sep 22 10:32:25 2020 +0800 ACPI: PCI: update kernel-doc line comments Update kernel-doc line comments to fix warnings reported by make W=1: drivers/acpi/pci_root.c:71: warning: Function parameter or member 'handle' not described in 'acpi_is_root_bridge' Signed-off-by: Tian Tao [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 38db63baf83a4ab89335c7c6fb210ecac74fa781 Author: Tian Tao Date: Tue Sep 22 10:11:14 2020 +0800 PNP: ACPI: Fix missing-prototypes in acpi_pnp.c Fix the following warnings. drivers/acpi/acpi_pnp.c:382:13: warning: no previous prototype for ‘acpi_pnp_init’ [-Wmissing-prototypes]. Signed-off-by: Tian Tao [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit bc8befe6f950264f2f4f6cbe267a3e934a15e26b Author: Kalle Valo Date: Fri Sep 25 11:57:21 2020 +0300 ath11k: fix undefined reference to 'ath11k_debugfs_htt_ext_stats_handler' kbuild bot reported than link fails when CONFIG_ATH11K_DEBUGFS is disabled: drivers/net/wireless/ath/ath11k/dp_rx.c:1662: undefined reference to `ath11k_debugfs_htt_ext_stats_handler' This was because I had missed to move the static inline version of the function (which are used when CONFIG_ATH11K_DEBUGFS is disabled) to debufs_htt_stats.h. Also move ath11k_debugfs_htt_stats_req() at the same time. And create a stub also for ath11k_debugfs_htt_stats_init() for consistency, even if it's not needed. Reported-by: kernel test robot Fixes: 568f06036ee2 ("ath11k: debugfs: move some function declarations to correct header files") Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1601024241-16594-1-git-send-email-kvalo@codeaurora.org commit 9a2e849fb6de471b82d19989a7944d3b7671793c Author: Hanjun Guo Date: Fri Sep 18 17:13:28 2020 +0800 ACPI: configfs: Add missing config_item_put() to fix refcount leak config_item_put() should be called in the drop_item callback, to decrement refcount for the config item. Fixes: 772bf1e2878ec ("ACPI: configfs: Unload SSDT on configfs entry removal") Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Cc: 4.13+ # 4.13+ Signed-off-by: Rafael J. Wysocki commit 759e56d9238ec0bb964965357f8bbb30ff2ec4b6 Author: Tian Tao Date: Mon Sep 14 08:44:50 2020 +0800 PNP: quirks: Fix duplicate included pci.h linux/pci.h is included more than once. Remove the one that isn't necessary. Signed-off-by: Tian Tao [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit aa524294ffb621cb51dbc0a0ccdb2929c0ca2bc1 Author: Cristian Ciocaltea Date: Mon Sep 14 23:27:19 2020 +0300 MAINTAINERS: Add entries for Actions Semi Owl SIRQ controller Add entries for Actions Semi Owl SIRQ controller binding and driver. Signed-off-by: Cristian Ciocaltea Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/174084658e46824a02edf41beae134214d858d46.1600114378.git.cristian.ciocaltea@gmail.com commit 27e9e554b01fea686929598556cb7f73a70fb964 Author: Cristian Ciocaltea Date: Mon Sep 14 23:27:18 2020 +0300 irqchip: Add Actions Semi Owl SIRQ controller This interrupt controller is found in the Actions Semi Owl SoCs (S500, S700 and S900) and provides support for handling up to 3 external interrupt lines. Each line can be independently configured as interrupt and triggers on either of the edges or either of the levels. Additionally, each line can also be masked individually. Co-developed-by: Parthiban Nallathambi Co-developed-by: Saravanan Sekar Signed-off-by: Parthiban Nallathambi Signed-off-by: Saravanan Sekar Signed-off-by: Cristian Ciocaltea Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1a010ef0eb78831b5657d74a0fcdef7a8efb2ec4.1600114378.git.cristian.ciocaltea@gmail.com commit b2bd271c3961f35dd127c99c8f576d9fcc2cb0c4 Author: Cristian Ciocaltea Date: Mon Sep 14 23:27:17 2020 +0300 dt-bindings: interrupt-controller: Add Actions SIRQ controller binding Actions Semi Owl SoCs SIRQ interrupt controller is found in S500, S700 and S900 SoCs and provides support for handling up to 3 external interrupt lines. Signed-off-by: Cristian Ciocaltea Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/c2046b747574ea56c1cf05c05b402c7f01d5e4fc.1600114378.git.cristian.ciocaltea@gmail.com commit c0ee0644df5da3f877a53e402d03634080d6e766 Author: Sathish Narasimman Date: Fri Sep 25 18:02:15 2020 +0530 Bluetooth: Fix update of own_addr_type if ll_privacy supported During system powercycle when trying to get the random address hci_get_random_address set own_addr_type as 0x01. In which if we enable ll_privacy it is supposed to be 0x03. Signed-off-by: Sathish Narasimman Signed-off-by: Marcel Holtmann commit 8156b80fd4885d0ca9748e736441cc37f4eb476a Author: Zhen Lei Date: Thu Sep 24 15:17:52 2020 +0800 dt-bindings: dw-apb-ictl: Update binding to describe use as primary interrupt controller Add the required updates to describe the use of dw-apb-ictl as a primary interrupt controller. Signed-off-by: Zhen Lei [maz: commit message] Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200924071754.4509-5-thunder.leizhen@huawei.com commit 54a38440b84f8933b555c23273deca6a396f6708 Author: Zhen Lei Date: Thu Sep 24 15:17:51 2020 +0800 irqchip/dw-apb-ictl: Add primary interrupt controller support Add support to use dw-apb-ictl as primary interrupt controller. Suggested-by: Marc Zyngier Signed-off-by: Zhen Lei [maz: minor fixups] Signed-off-by: Marc Zyngier Tested-by: Haoyu Lv Link: https://lore.kernel.org/r/20200924071754.4509-4-thunder.leizhen@huawei.com commit d59f7d159891466361808522b63cf3548ea3ecb0 Author: Zhen Lei Date: Thu Sep 24 15:17:50 2020 +0800 irqchip/dw-apb-ictl: Refactor priot to introducing hierarchical irq domains Add the required abstractions that will help introducing hierarchical domain support to the dw-apb-ictl driver. No functional change. Signed-off-by: Zhen Lei [maz: commit message, some cleanups] Signed-off-by: Marc Zyngier Tested-by: Haoyu Lv Link: https://lore.kernel.org/r/20200924071754.4509-3-thunder.leizhen@huawei.com commit fb041b598997d63c0f7d7305dfae70046bf66fe1 Author: David Laight Date: Fri Sep 25 06:51:39 2020 +0200 iov_iter: move rw_copy_check_uvector() into lib/iov_iter.c This lets the compiler inline it into import_iovec() generating much better code. Signed-off-by: David Laight Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 576d0703a81217f04e3a29ce3403231062ef2877 Author: Christoph Hellwig Date: Fri Sep 25 06:51:38 2020 +0200 compat.h: fix a spelling error in There is no compat_sys_readv64v2 syscall, only a compat_sys_preadv64v2 one. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit ea0c80d1764449acf2f70fdb25aec33800cd0348 Author: Zhen Lei Date: Thu Sep 24 15:17:49 2020 +0800 genirq: Add stub for set_handle_irq() when !GENERIC_IRQ_MULTI_HANDLER In order to avoid compilation errors when a driver references set_handle_irq(), but that the architecture doesn't select GENERIC_IRQ_MULTI_HANDLER, add a stub function that will just WARN_ON_ONCE() if ever used. Signed-off-by: Zhen Lei [maz: commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200924071754.4509-2-thunder.leizhen@huawei.com commit bee1abc9cc021f50b90f22a589d9ddc816a80db0 Author: Dennis YC Hsieh Date: Tue Jul 7 23:45:14 2020 +0800 drm/mediatek: reduce clear event No need to clear event again since event always clear before wait. This fix depend on patch: "soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api" Fixes: 2f965be7f9008 ("drm/mediatek: apply CMDQ control flow") Signed-off-by: Dennis YC Hsieh Reviewed-by: Bibby Hsieh Acked-by: Chun-Kuang Hu Link: https://lore.kernel.org/r/1594136714-11650-10-git-send-email-dennis-yc.hsieh@mediatek.com Signed-off-by: Matthias Brugger commit 23c22299cd290409c6b78f57c42b64f8dfb6dd92 Author: Dennis YC Hsieh Date: Tue Jul 7 23:45:13 2020 +0800 soc: mediatek: cmdq: add clear option in cmdq_pkt_wfe api Add clear parameter to let client decide if event should be clear to 0 after GCE receive it. Signed-off-by: Dennis YC Hsieh Acked-by: Chun-Kuang Hu Link: https://lore.kernel.org/r/1594136714-11650-9-git-send-email-dennis-yc.hsieh@mediatek.com [mb: fix commit message] Signed-off-by: Matthias Brugger commit 946f1792d3d7942acfbc6afa9a733f608f4622d6 Author: Dennis YC Hsieh Date: Tue Jul 7 23:45:12 2020 +0800 soc: mediatek: cmdq: add jump function Add jump function so that client can jump to any address which contains instruction. Signed-off-by: Dennis YC Hsieh Link: https://lore.kernel.org/r/1594136714-11650-8-git-send-email-dennis-yc.hsieh@mediatek.com Signed-off-by: Matthias Brugger commit 88a2ffc48d5bc85119ef7961df12369dcd53b4d2 Author: Dennis YC Hsieh Date: Tue Jul 7 23:45:11 2020 +0800 soc: mediatek: cmdq: add write_s_mask value function add write_s_mask_value function in cmdq helper functions which writes a constant value to address with mask and large dma access support. Signed-off-by: Dennis YC Hsieh Link: https://lore.kernel.org/r/1594136714-11650-7-git-send-email-dennis-yc.hsieh@mediatek.com Signed-off-by: Matthias Brugger commit 1af43fce813ebd74c76d080beb261603bd0853e1 Author: Dennis YC Hsieh Date: Tue Jul 7 23:45:10 2020 +0800 soc: mediatek: cmdq: add write_s value function add write_s function in cmdq helper functions which writes a constant value to address with large dma access support. Signed-off-by: Dennis YC Hsieh Link: https://lore.kernel.org/r/1594136714-11650-6-git-send-email-dennis-yc.hsieh@mediatek.com Signed-off-by: Matthias Brugger commit d3b04aab06fbc33ddea15725f3ff1667c9717929 Author: Dennis YC Hsieh Date: Tue Jul 7 23:45:09 2020 +0800 soc: mediatek: cmdq: add read_s function Add read_s function in cmdq helper functions which support read value from register or dma physical address into gce internal register. Signed-off-by: Dennis YC Hsieh Link: https://lore.kernel.org/r/1594136714-11650-5-git-send-email-dennis-yc.hsieh@mediatek.com Signed-off-by: Matthias Brugger commit 11c7842d41c82eb3551a0606ccba89ac33318b62 Author: Dennis YC Hsieh Date: Tue Jul 7 23:45:08 2020 +0800 soc: mediatek: cmdq: add write_s_mask function add write_s_mask function in cmdq helper functions which writes value contains in internal register to address with mask and large dma access support. Signed-off-by: Dennis YC Hsieh Link: https://lore.kernel.org/r/1594136714-11650-4-git-send-email-dennis-yc.hsieh@mediatek.com Signed-off-by: Matthias Brugger commit 5f6e560c2dd5be3ae446f20ae97263cbfa309630 Author: Dennis YC Hsieh Date: Tue Jul 7 23:45:07 2020 +0800 soc: mediatek: cmdq: add write_s function add write_s function in cmdq helper functions which writes value contains in internal register to address with large dma access support. Signed-off-by: Dennis YC Hsieh Link: https://lore.kernel.org/r/1594136714-11650-3-git-send-email-dennis-yc.hsieh@mediatek.com Signed-off-by: Matthias Brugger commit 2b8cf38343b378ed3717822c46f69cdee607055f Author: Dennis YC Hsieh Date: Tue Jul 7 23:45:06 2020 +0800 soc: mediatek: cmdq: add address shift in jump Add address shift when compose jump instruction to compatible with 35bit format. Signed-off-by: Dennis YC Hsieh Reviewed-by: Bibby Hsieh Link: https://lore.kernel.org/r/1594136714-11650-2-git-send-email-dennis-yc.hsieh@mediatek.com Signed-off-by: Matthias Brugger commit 11b490c6aea9666047d51127a665221102277edb Author: Krzysztof Kozlowski Date: Wed Jul 29 09:44:14 2020 +0200 soc: mediatek: mtk-infracfg: Fix kerneldoc Fix W=1 compile warnings (invalid kerneldoc): drivers/soc/mediatek/mtk-infracfg.c:34: warning: Function parameter or member 'infracfg' not described in 'mtk_infracfg_set_bus_protection' drivers/soc/mediatek/mtk-infracfg.c:34: warning: Excess function parameter 'regmap' description in 'mtk_infracfg_set_bus_protection' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200729074415.28393-1-krzk@kernel.org Signed-off-by: Matthias Brugger commit 0ddfb1cf3b6b07c97cff16ea69931d986f9622ee Author: Tom Lendacky Date: Fri Sep 25 08:38:26 2020 -0500 x86/sev-es: Use GHCB accessor for setting the MMIO scratch buffer Use ghcb_set_sw_scratch() to set the GHCB scratch field, which will also set the corresponding bit in the GHCB valid_bitmap field to denote that sw_scratch is actually valid. Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov Reviewed-by: Joerg Roedel Link: https://lkml.kernel.org/r/ba84deabdf44a7a880454fb351d189c6ad79d4ba.1601041106.git.thomas.lendacky@amd.com commit bf1c6744983339782b16078cc68b230cde7d29b9 Author: Johan Hovold Date: Mon Sep 21 15:59:51 2020 +0200 USB: cdc-acm: clean up no-union-descriptor handling For interfaces that lack a union descriptor, probe for a "combined-interface" before falling back to the call-management descriptor instead of the other way round. This allows for the removal of the NO_DATA_INTERFACE quirk and makes the probe algorithm somewhat easier to follow. Acked-by: Oliver Neukum Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200921135951.24045-5-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 319bb4a7fef74231e3297b8f70419c9d410e2e63 Author: Johan Hovold Date: Mon Sep 21 15:59:50 2020 +0200 USB: cdc-acm: use common data-class define Use the data-class define provided by USB core and drop the driver-specific one. Acked-by: Oliver Neukum Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200921135951.24045-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 960c7339de27c6d6fec13b54880501c3576bb08d Author: Johan Hovold Date: Mon Sep 21 15:59:49 2020 +0200 USB: cdc-acm: handle broken union descriptors Handle broken union functional descriptors where the master-interface doesn't exist or where its class is of neither Communication or Data type (as required by the specification) by falling back to "combined-interface" probing. Note that this still allows for handling union descriptors with switched interfaces. This specifically makes the Whistler radio scanners TRX series devices work with the driver without adding further quirks to the device-id table. Reported-by: Daniel Caujolle-Bert Tested-by: Daniel Caujolle-Bert Acked-by: Oliver Neukum Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200921135951.24045-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit e3be44cd43f312324d4eb5cdbfea184628c333fc Author: Johan Hovold Date: Mon Sep 21 15:59:48 2020 +0200 Revert "cdc-acm: hardening against malicious devices" This reverts commit 2ad9d544f2497a7bf239c34bd2b86fd19683dbb5. Drop bogus sanity check; an interface in the active configuration will always have a current altsetting assigned by USB core. Acked-by: Oliver Neukum Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200921135951.24045-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit d12544fb2aa9944b180c35914031a8384ab082c1 Author: Xiang Chen Date: Tue Sep 22 21:11:06 2020 +0800 PM: runtime: Remove link state checks in rpm_get/put_supplier() To support runtime PM for hisi SAS driver (the driver is in directory drivers/scsi/hisi_sas), we add device link between scsi_device->sdev_gendev (consumer device) and hisi_hba->dev(supplier device) with flags DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE. After runtime suspended consumers and supplier, unload the dirver which causes a hung. We found that it called function device_release_driver_internal() to release the supplier device (hisi_hba->dev), as the device link was busy, it set the device link state to DL_STATE_SUPPLIER_UNBIND, and then it called device_release_driver_internal() to release the consumer device (scsi_device->sdev_gendev). Then it would try to call pm_runtime_get_sync() to resume the consumer device, but because consumer-supplier relation existed, it would try to resume the supplier first, but as the link state was already DL_STATE_SUPPLIER_UNBIND, so it skipped resuming the supplier and only resumed the consumer which hanged (it sends IOs to resume scsi_device while the SAS controller is suspended). Simple flow is as follows: device_release_driver_internal -> (supplier device) if device_links_busy -> device_links_unbind_consumers -> ... WRITE_ONCE(link->status, DL_STATE_SUPPLIER_UNBIND) device_release_driver_internal (consumer device) pm_runtime_get_sync -> (consumer device) ... __rpm_callback -> rpm_get_suppliers -> if link->state == DL_STATE_SUPPLIER_UNBIND -> skip the action of resuming the supplier ... pm_runtime_clean_up_links ... Correct suspend/resume ordering between a supplier device and its consumer devices (resume the supplier device before resuming consumer devices, and suspend consumer devices before suspending the supplier device) should be guaranteed by runtime PM, but the state checks in rpm_get_supplier() and rpm_put_supplier() break this rule, so remove them. Signed-off-by: Xiang Chen [ rjw: Subject and changelog edits ] Cc: All applicable Signed-off-by: Rafael J. Wysocki commit 8ba0b6d196315f68c271f549e8585129caefce97 Author: Maxime Ripard Date: Wed Sep 23 10:40:32 2020 +0200 drm/vc4: crtc: Keep the previously assigned HVS FIFO The HVS FIFOs are currently assigned each time we have an atomic_check for all the enabled CRTCs. However, if we are running multiple outputs in parallel and we happen to disable the first (by index) CRTC, we end up changing the assigned FIFO of the second CRTC without disabling and reenabling the pixelvalve which ends up in a stall and eventually a VBLANK timeout. In order to fix this, we can create a special value for our assigned channel to mark it as disabled, and if our CRTC already had an assigned channel in its previous state, we keep on using it. Fixes: 87ebcd42fb7b ("drm/vc4: crtc: Assign output to channel automatically") Signed-off-by: Maxime Ripard Tested-by: Dave Stevenson Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20200923084032.218619-2-maxime@cerno.tech commit 427c4a0680a28f87bb9c7bbfeac26b39ef8682ad Author: Maxime Ripard Date: Wed Sep 23 10:40:31 2020 +0200 drm/vc4: crtc: Rework a bit the CRTC state code The current CRTC state reset hook in vc4 allocates a vc4_crtc_state structure as a drm_crtc_state, and relies on the fact that vc4_crtc_state embeds drm_crtc_state as its first member, and therefore can be safely cast. However, this is pretty fragile especially since there's no check for this in place, and we're going to need to access vc4_crtc_state member at reset so this looks like a good occasion to make it more robust. Fixes: 6d6e50039187 ("drm/vc4: Allocate the right amount of space for boot-time CRTC state.") Signed-off-by: Maxime Ripard Tested-by: Dave Stevenson Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20200923084032.218619-1-maxime@cerno.tech commit 00610935158fcc812a6425b8bda3f87c8689b805 Author: Pujin Shi Date: Tue Sep 22 12:46:52 2020 +0800 powercap: include header to fix -Wmissing-prototypes Include the linux/idle_inject.h header to fix W=1 build warning: drivers/powercap/idle_inject.c:152:6: warning: no previous prototype for ‘idle_inject_set_duration’ [-Wmissing-prototypes] drivers/powercap/idle_inject.c:167:6: warning: no previous prototype for ‘idle_inject_get_duration’ [-Wmissing-prototypes] drivers/powercap/idle_inject.c:179:6: warning: no previous prototype for ‘idle_inject_set_latency’ [-Wmissing-prototypes] drivers/powercap/idle_inject.c:195:5: warning: no previous prototype for ‘idle_inject_start’ [-Wmissing-prototypes] drivers/powercap/idle_inject.c:227:6: warning: no previous prototype for ‘idle_inject_stop’ [-Wmissing-prototypes] drivers/powercap/idle_inject.c:299:28: warning: no previous prototype for ‘idle_inject_register’ [-Wmissing-prototypes] drivers/powercap/idle_inject.c:345:6: warning: no previous prototype for ‘idle_inject_unregister’ [-Wmissing-prototypes] Signed-off-by: Pujin Shi Signed-off-by: Rafael J. Wysocki commit bec02dbbafad534674309f8b948094900f456797 Author: Tejun Heo Date: Fri Sep 18 14:41:27 2020 -0400 iocost: consider iocgs with active delays for debt forgiveness An iocg may have 0 debt but non-zero delay. The current debt forgiveness logic doesn't act on such iocgs. This can lead to unexpected behaviors - an iocg with a little bit of debt will have its delay canceled through debt forgiveness but one w/o any debt but active delay will have to wait out until its delay decays out. This patch updates the debt handling logic so that it treats delays the same as debts. If either debt or delay is active, debt forgiveness logic kicks in and acts on both the same way. Also, avoid turning the debt and delay directly to zero as that can confuse state transitions. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit c5a6561b8d99ea7d8df21308249ce05bce3dd466 Author: Tejun Heo Date: Thu Sep 17 20:44:56 2020 -0400 iocost: add iocg_forgive_debt tracepoint Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit c7af2a003a411853fc9c805efe96d10dcc8adb5f Author: Tejun Heo Date: Thu Sep 17 20:44:55 2020 -0400 iocost: reimplement debt forgiveness using average usage Debt forgiveness logic was counting the number of consecutive !busy periods as the trigger condition. While this usually works, it can easily be thrown off by temporary fluctuations especially on configurations w/ short periods. This patch reimplements debt forgiveness so that: * Use the average usage over the forgiveness period instead of counting consecutive periods. * Debt is reduced at around the target rate (1/2 every 100ms) regardless of ioc period duration. * Usage threshold is raised to 50%. Combined with the preceding changes and the switch to average usage, this makes debt forgivness a lot more effective at reducing the amount of unnecessary idleness. * Constants are renamed with DFGV_ prefix. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit d95178410b7706844491efb77fb0a37a69f7a5e6 Author: Tejun Heo Date: Thu Sep 17 20:44:54 2020 -0400 iocost: recalculate delay after debt reduction Debt sets the initial delay duration which is decayed over time. The current debt reduction halved the debt but didn't change the delay. It prevented future debts from increasing delay but didn't do anything to lower the existing delay, limiting the mechanism's ability to reduce unnecessary idling. Reset iocg->delay to 0 after debt reduction so that iocg_kick_waitq() recalculates new delay value based on the reduced debt amount. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 33a1fe6d822b3552fcad9bbb059b2fb93566f4c9 Author: Tejun Heo Date: Thu Sep 17 20:44:53 2020 -0400 iocost: replace nr_shortages cond in ioc_forgive_debts() with busy_level one Debt reduction was blocked if any iocg was short on budget in the past period to avoid reducing debts while some iocgs are saturated. However, this ends up unnecessarily blocking debt reduction due to temporary local imbalances when the device is generally being underutilized, while also failing to block when the underlying device is overwhelmed and the usage becomes low from high latency. Given that debt accumulation mostly happens with swapout bursts which can significantly deteriorate the underlying device's latency response, the current logic is not great. Let's replace it with ioc->busy_level based condition so that we block debt reduction when the underlying device is being saturated. ioc_forgive_debts() call is moved after busy_level determination. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit ab8df828b5f6eab6377fa0c349c92a3678498256 Author: Tejun Heo Date: Thu Sep 17 20:44:52 2020 -0400 iocost: factor out ioc_forgive_debts() Debt reduction logic is going to be improved and expanded. Factor it out into ioc_forgive_debts() and generalize the comment a bit. No functional change. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit dbb29de70ae73a5737506d6cfe802bee81557ae7 Author: Greg Kroah-Hartman Date: Wed Sep 23 15:43:48 2020 +0200 Bluetooth: ath3k: use usb_control_msg_send() and usb_control_msg_recv() The usb_control_msg_send() and usb_control_msg_recv() calls can return an error if a "short" write/read happens, and they can handle data off of the stack, so move the driver over to using those calls instead, saving some logic when dynamically allocating memory. v2: changed API of use usb_control_msg_send() and usb_control_msg_recv() Cc: Marcel Holtmann Cc: Johan Hedberg Link: https://lore.kernel.org/r/20200914153756.3412156-11-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200923134348.23862-15-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 10fbd979bd636629e3d08dda70f837c3b4864b47 Author: Greg Kroah-Hartman Date: Wed Sep 23 15:43:47 2020 +0200 sound: hiface: move to use usb_control_msg_send() The usb_control_msg_send() call can return an error if a "short" write happens, so move the driver over to using that call instead. v2: API change of use usb_control_msg_send() Cc: Jaroslav Kysela Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200914153756.3412156-10-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200923134348.23862-14-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 6d2d427e3b1266c3eab80cdb961c21b9f4fcdadf Author: Greg Kroah-Hartman Date: Wed Sep 23 15:43:46 2020 +0200 sound: line6: move to use usb_control_msg_send() and usb_control_msg_recv() The usb_control_msg_send() and usb_control_msg_recv() calls can return an error if a "short" write/read happens, and they can handle data off of the stack, so move the driver over to using those calls instead, saving some logic when dynamically allocating memory. v2: API change of use usb_control_msg_send() and usb_control_msg_recv() Cc: Jaroslav Kysela Cc: Vasily Khoruzhick Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200914153756.3412156-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200923134348.23862-13-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit d9f0d82f06c6775b3adb9e4925e27377bc87af54 Author: Greg Kroah-Hartman Date: Wed Sep 23 15:43:45 2020 +0200 USB: legousbtower: use usb_control_msg_recv() The usb_control_msg_recv() function can handle data on the stack, as well as properly detecting short reads, so move to use that function instead of the older usb_control_msg() call. This ends up removing a lot of extra lines in the driver. v2: change API of usb_control_msg_send() Cc: Juergen Stuber Link: https://lore.kernel.org/r/20200914153756.3412156-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200923134348.23862-12-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 9ad71af922a8b4a619665498e0094dc5206e9f50 Author: Greg Kroah-Hartman Date: Wed Sep 23 15:43:44 2020 +0200 sound: 6fire: move to use usb_control_msg_send() and usb_control_msg_recv() The usb_control_msg_send() and usb_control_msg_recv() calls can return an error if a "short" write/read happens, so move the driver over to using those calls instead, saving some logic in the wrapper functions that were being used in this driver. This also resolves a long-staging bug where data on the stack was being sent in a USB control message, which was not allowed. v2: API change of usb_control_msg_send() Cc: Jaroslav Kysela Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200914153756.3412156-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200923134348.23862-11-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit f246023816e6cd1ddcb3e426eddcd0faf31bd67e Author: Greg Kroah-Hartman Date: Wed Sep 23 15:43:43 2020 +0200 sound: usx2y: move to use usb_control_msg_send() The usb_control_msg_send() call can handle data on the stack, as well as returning an error if a "short" write happens, so move the driver over to using that call instead. This ends up removing a helper function that is no longer needed. v2: API change in usb_control_msg_send() Cc: Jaroslav Kysela Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200914153756.3412156-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200923134348.23862-10-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit ddd1198e3e0935066d6e309180d49f64ef4fa702 Author: Oliver Neukum Date: Wed Sep 23 15:43:42 2020 +0200 USB: correct API of usb_control_msg_send/recv They need to specify how memory is to be allocated, as control messages need to work in contexts that require GFP_NOIO. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200923134348.23862-9-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit cf58e8e75229cb80b2b46afc98dc5ed53cd65ddf Author: Oliver Neukum Date: Wed Sep 23 15:43:41 2020 +0200 Revert "USB: legousbtower: use usb_control_msg_recv()" This reverts commit be40c366416bf6ff74b25fd02e38cb6eaba497d1. The API has to be changed. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200923134348.23862-8-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 3b7672c3eb16e92f3efb4def59ee206593bfb721 Author: Oliver Neukum Date: Wed Sep 23 15:43:40 2020 +0200 Revert "sound: usx2y: move to use usb_control_msg_send()" This reverts commit ec8eeceb06b7a6efb6d924fd2f4ba4ec79ddc7bf. The API has to be changed. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200923134348.23862-7-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 8cc4c2ed6acd26222f6139fbfbae42738b8b097f Author: Oliver Neukum Date: Wed Sep 23 15:43:39 2020 +0200 Revert "sound: 6fire: move to use usb_control_msg_send() and usb_control_msg_recv()" This reverts commit aea67cc1418252d07b9b56688f1b5fa70fcae813. The API has to be changed. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200923134348.23862-6-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit ec4ed7dc58c6f1845098a46b97d51a5a08d67570 Author: Oliver Neukum Date: Wed Sep 23 15:43:38 2020 +0200 Revert "sound: line6: move to use usb_control_msg_send() and usb_control_msg_recv()" This reverts commit f7ef7614f89e943d7511ee121b0b849f27b60cb2. The API has to be changed. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200923134348.23862-5-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit c31db08301277e23ab7366bd4cdfb212ac1a7cca Author: Oliver Neukum Date: Wed Sep 23 15:43:37 2020 +0200 Revert "sound: hiface: move to use usb_control_msg_send()" This reverts commit 119ae38a5cdfbefdf926b34fbf65cd60dc82c95e. The API has to be changed. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200923134348.23862-4-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit cad874c4a234512bfcd81139d6fe935dee5ce7dc Author: Oliver Neukum Date: Wed Sep 23 15:43:36 2020 +0200 Revert "Bluetooth: ath3k: use usb_control_msg_send() and usb_control_msg_recv()" This reverts commit e9b20f0fe17ab06c3b55153046209987749daa48. The API has to be changed Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200923134348.23862-3-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 1afe33a788c40287f3addb81788930f1fadc18a2 Author: Oliver Neukum Date: Wed Sep 23 15:43:35 2020 +0200 Revert "USB: core: hub.c: use usb_control_msg_send() in a few places" This reverts commit d6a499249543356002a1efbb26254c7272e62f4c. Control messages are needed in contexts when memory allocations are restricted, such as handling device resets and runtime PM. For this reason the control message API internally uses GFP_NOIO. This is a band aid introduced because when we recognized the issue, the call chains were highly convoluted. Continuing this trend is not a good idea. So I am shooting the whole kennel here. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200923134348.23862-2-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 34d8f7a4627ca59ba915c7ea44fe9d9123875712 Author: Chunfeng Yun Date: Mon Sep 21 14:13:35 2020 +0800 iopoll: update kerneldoc of read_poll_timeout_atomic() Arguments description of read_poll_timeout_atomic() is out of date, update it. Cc: Alan Stern Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1600668815-12135-11-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 805ca9c2c26479d9e3e01edb884961cd33bf265e Author: Chunfeng Yun Date: Mon Sep 21 14:13:34 2020 +0800 usb: udc: net2280: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Cc: Alan Stern Cc: Felipe Balbi Acked-by: Alan Stern Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1600668815-12135-10-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit f158afecff1f8638744e7e0b90531cadae360244 Author: Chunfeng Yun Date: Mon Sep 21 14:13:33 2020 +0800 usb: phy: phy-mv-usb: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1600668815-12135-9-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit a3e20fbd9039c34bd46953d72b581dee017ddb9c Author: Chunfeng Yun Date: Mon Sep 21 14:13:32 2020 +0800 usb: phy-ulpi-viewport: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1600668815-12135-8-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 08305b45a404e8f0da7a9e6bf410e391fb4bb185 Author: Chunfeng Yun Date: Mon Sep 21 14:13:31 2020 +0800 usb: isp1760-hcd: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1600668815-12135-7-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit e7d8263bdd5c6a4f5de3652b4d96c1af24963be4 Author: Chunfeng Yun Date: Mon Sep 21 14:13:30 2020 +0800 usb: fotg210-hcd: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1600668815-12135-6-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit d43a69018e256b51265fa8f66f01f9fa94b6f0bb Author: Chunfeng Yun Date: Mon Sep 21 14:13:29 2020 +0800 usb: oxu210hp-hcd: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1600668815-12135-5-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 8469ab98a72defc1bbe978dd8b65c66a3072caae Author: Chunfeng Yun Date: Mon Sep 21 14:13:28 2020 +0800 usb: xhci-rcar: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Cc: Mathias Nyman Cc: Yoshihiro Shimoda Reviewed-by: Yoshihiro Shimoda Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1600668815-12135-4-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit eeae3afba6cabef7f5ee1ea130dd8c03c3d0f532 Author: Chunfeng Yun Date: Mon Sep 21 14:13:27 2020 +0800 usb: pci-quirks: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Cc: Mathias Nyman Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1600668815-12135-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 8f01cc875d34bfbca68eb315dec203d6cb3f9eee Author: Chunfeng Yun Date: Mon Sep 21 14:13:26 2020 +0800 usb: early: ehci-dbgp: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Cc: "Eric W. Biederman" Cc: Petr Mladek Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1600668815-12135-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 796eed4b2342c9d6b26c958e92af91253a2390e1 Author: Chunfeng Yun Date: Mon Sep 21 14:13:25 2020 +0800 usb: early: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Cc: Lu Baolu Cc: Mathias Nyman Reviewed-by: Jann Horn Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1600668815-12135-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 6abc49468eeaad2dd481779906aaa29605139087 Author: Konstantin Khlebnikov Date: Wed Sep 23 16:06:52 2020 -0400 dm: add support for REQ_NOWAIT and enable it for linear target Add DM target feature flag DM_TARGET_NOWAIT which advertises that target works with REQ_NOWAIT bios. Add dm_table_supports_nowait() and update dm_table_set_restrictions() to set/clear QUEUE_FLAG_NOWAIT accordingly. Signed-off-by: Konstantin Khlebnikov Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe commit 021a24460dc28e7412aecfae89f60e1847e685c0 Author: Mike Snitzer Date: Wed Sep 23 16:06:51 2020 -0400 block: add QUEUE_FLAG_NOWAIT Add QUEUE_FLAG_NOWAIT to allow a block device to advertise support for REQ_NOWAIT. Bio-based devices may set QUEUE_FLAG_NOWAIT where applicable. Update QUEUE_FLAG_MQ_DEFAULT to include QUEUE_FLAG_NOWAIT. Also update submit_bio_checks() to verify it is set for REQ_NOWAIT bios. Reported-by: Konstantin Khlebnikov Suggested-by: Christoph Hellwig Signed-off-by: Mike Snitzer Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 700cd59db518edc2028df7c830d6cb6f7164573b Author: Christoph Hellwig Date: Thu Sep 3 07:41:04 2020 +0200 vsprintf: use bd_partno in bdev_name No need to go through the hd_struct to find the partition number. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 8a63a86e1f933dc7f114497408c50c58a633b8bc Author: Christoph Hellwig Date: Thu Sep 3 07:41:03 2020 +0200 block: use bd_partno in bdevname No need to go through the hd_struct to find the partition number. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 57ba10592030be8c8b17184ca093db5e45cdbb2b Author: Christoph Hellwig Date: Thu Sep 3 07:41:02 2020 +0200 target/iblock: fix holder printing in iblock_show_configfs_dev_params bd_contains is never NULL for an open block device. In addition ibd_bd is always set to a block device that was exclusively opened by the target code, so the holder is guranteed to be ib_dev as well. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 74f94454099e89322f82fce35f7c73142516d17d Author: Christoph Hellwig Date: Thu Sep 3 07:41:01 2020 +0200 drbd: don't set ->bd_contains The ->bd_contains field is set by __blkdev_get and drivers have no business manipulating it. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 8c40c7c4836a1ff9e5e840e5ab28526392a5724c Author: Christoph Hellwig Date: Thu Sep 3 07:41:00 2020 +0200 drbd: don't detour through bd_contains for the gendisk bd_disk is set on all block devices, including those for partitions. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 4245e52d255418278fc4a5eec7425ad0bfeebd31 Author: Christoph Hellwig Date: Thu Sep 3 07:40:59 2020 +0200 md: don't detour through bd_contains for the gendisk bd_disk is set on all block devices, including those for partitions. Signed-off-by: Christoph Hellwig Acked-by: Song Liu Signed-off-by: Jens Axboe commit 61a27e1f521ca0dd4a38302958ccc43fd95d8879 Author: Christoph Hellwig Date: Thu Sep 3 07:40:58 2020 +0200 md: compare bd_disk instead of bd_contains To check for partitions of the same disk bd_contains works as well, but bd_disk is way more obvious. Signed-off-by: Christoph Hellwig Acked-by: Song Liu Signed-off-by: Jens Axboe commit fa01b1e9733fd59ecb8b5b6d85dfb481d2025fbf Author: Christoph Hellwig Date: Thu Sep 3 07:40:57 2020 +0200 block: add a bdev_is_partition helper Add a littler helper to make the somewhat arcane bd_contains checks a little more obvious. Signed-off-by: Christoph Hellwig Acked-by: Ulf Hansson Signed-off-by: Jens Axboe commit 250eec9e390e2be6f672f9a77cf29791c189f7da Author: Christoph Hellwig Date: Thu Sep 3 07:40:56 2020 +0200 Documentation/hdio: fix up obscure bd_contains references bd_contains is an implementation detail and should not be mentioned in a userspace API documentation. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 163090c14a42778c3ccfbdaf39133129bea68632 Merge: 0905053bdb5b7 d3ee2d8415a62 Author: Jens Axboe Date: Fri Sep 25 07:48:20 2020 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.10/drivers Pull MD updates from Song. * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid10: improve discard request for far layout md/raid10: improve raid10 discard request md/raid10: pull codes that wait for blocked dev into one function md/raid10: extend r10bio devs to raid disks md: add md_submit_discard_bio() for submitting discard bio md: Simplify code with existing definition RESYNC_SECTORS in raid10.c md/raid5: reallocate page array after setting new stripe_size md/raid5: resize stripe_head when reshape array md/raid5: let multiple devices of stripe_head share page md/raid6: let async recovery function support different page offset md/raid6: let syndrome computor support different page offset md/raid5: convert to new xor compution interface md/raid5: add new xor function to support different page offset md/raid5: make async_copy_data() to support different page offset md/raid5: add a new member of offset into r5dev md: only calculate blocksize once and use i_blocksize() commit 61f764c307f6b2079b7af0d4fb7951402b824967 Author: Jon Hunter Date: Thu Sep 24 15:20:39 2020 +0200 eeprom: at24: Support custom device names for AT24 EEPROMs By using the label property, a more descriptive name can be populated for AT24 EEPROMs NVMEM device. Update the AT24 driver to check to see if the label property is present and if so, use this as the name for NVMEM device. Please note that when the 'label' property is present for the AT24 EEPROM, we do not want the NVMEM driver to append the 'devid' to the name and so the nvmem_config.id is initialised to NVMEM_DEVID_NONE. Signed-off-by: Jon Hunter Signed-off-by: Bartosz Golaszewski commit 709ec3f7fc5773ac4aa6fb22c3f0ac8103c674db Author: Srinivas Kandagatla Date: Fri Sep 25 10:55:20 2020 +0100 slimbus: qcom-ngd-ctrl: disable ngd in qmi server down callback In QMI new server notification we enable the NGD however during delete server notification we do not disable the NGD. This can lead to multiple instances of NGD being enabled, so make sure that we disable NGD in delete server callback to fix this issue! Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200925095520.27316-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit df2c471c4ae07e18a0396db670dca2ef867c5153 Author: Srinivas Kandagatla Date: Fri Sep 25 10:55:19 2020 +0100 slimbus: core: do not enter to clock pause mode in core Let the controller logic decide when to enter into clock pause mode! Entering in to pause mode during unregistration does not really make sense as the controller is totally going down at that point in time. Fixes: 4b14e62ad3c9e ("slimbus: Add support for 'clock-pause' feature") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200925095520.27316-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit f97769fde678e111a1b7b165b380d8a3dfe54f4e Author: Srinivas Kandagatla Date: Fri Sep 25 10:55:18 2020 +0100 slimbus: core: check get_addr before removing laddr ida logical address can be either assigned by the SLIMBus controller or the core. Core uses IDA in cases where get_addr callback is not provided by the controller. Core already has this check while allocating IDR, however during absence reporting this is not checked. This patch fixes this issue. Fixes: 46a2bb5a7f7e ("slimbus: core: Add slim controllers support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200925095520.27316-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5a487cf7efe4b63e902d6883b17b8f505db21ab0 Merge: 9eb29f2ed95ed 25121d9804b84 Author: Greg Kroah-Hartman Date: Fri Sep 25 14:36:48 2020 +0200 Merge tag 'misc-habanalabs-next-2020-09-25' of git://people.freedesktop.org/~gabbayo/linux into char-misc-next Oded writes: This tag contains the following changes for kernel 5.10-rc1: - release the kernel context object after we reset the device. This is needed to prevent a race where the firmware still has some in-flight transcations that require the kernel context (and its memory mappings) to be alive. - replace constant numbers with defines in QMAN initialization of GAUDI - correct an error message text and add a few debug messages to help debug issues that happen during context open and close. * tag 'misc-habanalabs-next-2020-09-25' of git://people.freedesktop.org/~gabbayo/linux: habanalabs/gaudi: configure QMAN LDMA registers properly habanalabs: add notice of device not idle habanalabs: add debug messages for opening/closing context habanalabs: release kernel context after hw_fini habanalabs: correct an error message commit 1c954540c0eb420dfbaefe779cf23fb82759809a Author: Arnd Bergmann Date: Fri Sep 25 13:43:32 2020 +0200 staging: vchiq: avoid mixing kernel and user pointers As found earlier, there is a problem in the create_pagelist() function that takes a pointer argument that either points into vmalloc space or into user space, with the pointer value controlled by user space allowing a malicious user to trick the driver into accessing the kernel instead. Avoid this problem by adding another function argument and passing kernel pointers separately from user pointers. This makes it possible to rely on sparse to point out invalid conversions, and it prevents user space from faking a kernel pointer. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200925114424.2647144-2-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit 4184da4f316a549ae732d91088571fef46a2f58d Author: Arnd Bergmann Date: Fri Sep 25 13:43:31 2020 +0200 staging: vchiq: fix __user annotations My earlier patches caused some new sparse warnings, but it turns out that a number of those are actual bugs, or at least suspicous code. Adding __user annotations to the data structures that are defined in uapi headers helps avoid the new warnings, but that causes a different set of warnings to show up, as some of these structures are used both inside of the kernel and at the user interface but storing pointers to different things there. Duplicating the vchiq_service_params and vchiq_completion_data structures in turn takes care of most of those, and then it turns out that there is a 'data' pointer that can be any of a __user address, a dmd_addr_t and a kernel pointer in vmalloc space at times. I'm trying to annotate these as best I can without changing behavior, but there still seems to be a serious bug when user space passes a valid vmalloc space address instead of a user pointer. Adding comments in the code there, and leaving the warnings in place that seem to correspond to actual bugs. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200925114424.2647144-1-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit f166b111e0491486fca0d105f09655ab718bd1c8 Author: Peter Oskolkov Date: Wed Sep 23 16:36:18 2020 -0700 rseq/selftests: Test MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ Based on Google-internal RSEQ work done by Paul Turner and Andrew Hunter. This patch adds a selftest for MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ. The test quite often fails without the previous patch in this patchset, but consistently passes with it. Signed-off-by: Peter Oskolkov Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mathieu Desnoyers Link: https://lkml.kernel.org/r/20200923233618.2572849-3-posk@google.com commit ea366dd79c05fcd4cf5e225d2de8a3a7c293160c Author: Peter Oskolkov Date: Wed Sep 23 16:36:17 2020 -0700 rseq/selftests,x86_64: Add rseq_offset_deref_addv() This patch adds rseq_offset_deref_addv() function to tools/testing/selftests/rseq/rseq-x86.h, to be used in a selftest in the next patch in the patchset. Once an architecture adds support for this function they should define "RSEQ_ARCH_HAS_OFFSET_DEREF_ADDV". Signed-off-by: Peter Oskolkov Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mathieu Desnoyers Link: https://lkml.kernel.org/r/20200923233618.2572849-2-posk@google.com commit 2a36ab717e8fe678d98f81c14a0b124712719840 Author: Peter Oskolkov Date: Wed Sep 23 16:36:16 2020 -0700 rseq/membarrier: Add MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ This patchset is based on Google-internal RSEQ work done by Paul Turner and Andrew Hunter. When working with per-CPU RSEQ-based memory allocations, it is sometimes important to make sure that a global memory location is no longer accessed from RSEQ critical sections. For example, there can be two per-CPU lists, one is "active" and accessed per-CPU, while another one is inactive and worked on asynchronously "off CPU" (e.g. garbage collection is performed). Then at some point the two lists are swapped, and a fast RCU-like mechanism is required to make sure that the previously active list is no longer accessed. This patch introduces such a mechanism: in short, membarrier() syscall issues an IPI to a CPU, restarting a potentially active RSEQ critical section on the CPU. Signed-off-by: Peter Oskolkov Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mathieu Desnoyers Link: https://lkml.kernel.org/r/20200923233618.2572849-1-posk@google.com commit 233e7aca4c8a2c764f556bba9644c36154017e7f Author: Barry Song Date: Mon Sep 21 23:18:49 2020 +0100 sched/fair: Use dst group while checking imbalance for NUMA balancer Barry Song noted the following Something is wrong. In find_busiest_group(), we are checking if src has higher load, however, in task_numa_find_cpu(), we are checking if dst will have higher load after balancing. It seems it is not sensible to check src. It maybe cause wrong imbalance value, for example, if dst_running = env->dst_stats.nr_running + 1 results in 3 or above, and src_running = env->src_stats.nr_running - 1 results in 1; The current code is thinking imbalance as 0 since src_running is smaller than 2. This is inconsistent with load balancer. Basically, in find_busiest_group(), the NUMA imbalance is ignored if moving a task "from an almost idle domain" to a "domain with spare capacity". This patch forbids movement "from a misplaced domain" to "an almost idle domain" as that is closer to what the CPU load balancer expects. This patch is not a universal win. The old behaviour was intended to allow a task from an almost idle NUMA node to migrate to its preferred node if the destination had capacity but there are corner cases. For example, a NAS compute load could be parallelised to use 1/3rd of available CPUs but not all those potential tasks are active at all times allowing this logic to trigger. An obvious example is specjbb 2005 running various numbers of warehouses on a 2 socket box with 80 cpus. specjbb 5.9.0-rc4 5.9.0-rc4 vanilla dstbalance-v1r1 Hmean tput-1 46425.00 ( 0.00%) 43394.00 * -6.53%* Hmean tput-2 98416.00 ( 0.00%) 96031.00 * -2.42%* Hmean tput-3 150184.00 ( 0.00%) 148783.00 * -0.93%* Hmean tput-4 200683.00 ( 0.00%) 197906.00 * -1.38%* Hmean tput-5 236305.00 ( 0.00%) 245549.00 * 3.91%* Hmean tput-6 281559.00 ( 0.00%) 285692.00 * 1.47%* Hmean tput-7 338558.00 ( 0.00%) 334467.00 * -1.21%* Hmean tput-8 340745.00 ( 0.00%) 372501.00 * 9.32%* Hmean tput-9 424343.00 ( 0.00%) 413006.00 * -2.67%* Hmean tput-10 421854.00 ( 0.00%) 434261.00 * 2.94%* Hmean tput-11 493256.00 ( 0.00%) 485330.00 * -1.61%* Hmean tput-12 549573.00 ( 0.00%) 529959.00 * -3.57%* Hmean tput-13 593183.00 ( 0.00%) 555010.00 * -6.44%* Hmean tput-14 588252.00 ( 0.00%) 599166.00 * 1.86%* Hmean tput-15 623065.00 ( 0.00%) 642713.00 * 3.15%* Hmean tput-16 703924.00 ( 0.00%) 660758.00 * -6.13%* Hmean tput-17 666023.00 ( 0.00%) 697675.00 * 4.75%* Hmean tput-18 761502.00 ( 0.00%) 758360.00 * -0.41%* Hmean tput-19 796088.00 ( 0.00%) 798368.00 * 0.29%* Hmean tput-20 733564.00 ( 0.00%) 823086.00 * 12.20%* Hmean tput-21 840980.00 ( 0.00%) 856711.00 * 1.87%* Hmean tput-22 804285.00 ( 0.00%) 872238.00 * 8.45%* Hmean tput-23 795208.00 ( 0.00%) 889374.00 * 11.84%* Hmean tput-24 848619.00 ( 0.00%) 966783.00 * 13.92%* Hmean tput-25 750848.00 ( 0.00%) 903790.00 * 20.37%* Hmean tput-26 780523.00 ( 0.00%) 962254.00 * 23.28%* Hmean tput-27 1042245.00 ( 0.00%) 991544.00 * -4.86%* Hmean tput-28 1090580.00 ( 0.00%) 1035926.00 * -5.01%* Hmean tput-29 999483.00 ( 0.00%) 1082948.00 * 8.35%* Hmean tput-30 1098663.00 ( 0.00%) 1113427.00 * 1.34%* Hmean tput-31 1125671.00 ( 0.00%) 1134175.00 * 0.76%* Hmean tput-32 968167.00 ( 0.00%) 1250286.00 * 29.14%* Hmean tput-33 1077676.00 ( 0.00%) 1060893.00 * -1.56%* Hmean tput-34 1090538.00 ( 0.00%) 1090933.00 * 0.04%* Hmean tput-35 967058.00 ( 0.00%) 1107421.00 * 14.51%* Hmean tput-36 1051745.00 ( 0.00%) 1210663.00 * 15.11%* Hmean tput-37 1019465.00 ( 0.00%) 1351446.00 * 32.56%* Hmean tput-38 1083102.00 ( 0.00%) 1064541.00 * -1.71%* Hmean tput-39 1232990.00 ( 0.00%) 1303623.00 * 5.73%* Hmean tput-40 1175542.00 ( 0.00%) 1340943.00 * 14.07%* Hmean tput-41 1127826.00 ( 0.00%) 1339492.00 * 18.77%* Hmean tput-42 1198313.00 ( 0.00%) 1411023.00 * 17.75%* Hmean tput-43 1163733.00 ( 0.00%) 1228253.00 * 5.54%* Hmean tput-44 1305562.00 ( 0.00%) 1357886.00 * 4.01%* Hmean tput-45 1326752.00 ( 0.00%) 1406061.00 * 5.98%* Hmean tput-46 1339424.00 ( 0.00%) 1418451.00 * 5.90%* Hmean tput-47 1415057.00 ( 0.00%) 1381570.00 * -2.37%* Hmean tput-48 1392003.00 ( 0.00%) 1421167.00 * 2.10%* Hmean tput-49 1408374.00 ( 0.00%) 1418659.00 * 0.73%* Hmean tput-50 1359822.00 ( 0.00%) 1391070.00 * 2.30%* Hmean tput-51 1414246.00 ( 0.00%) 1392679.00 * -1.52%* Hmean tput-52 1432352.00 ( 0.00%) 1354020.00 * -5.47%* Hmean tput-53 1387563.00 ( 0.00%) 1409563.00 * 1.59%* Hmean tput-54 1406420.00 ( 0.00%) 1388711.00 * -1.26%* Hmean tput-55 1438804.00 ( 0.00%) 1387472.00 * -3.57%* Hmean tput-56 1399465.00 ( 0.00%) 1400296.00 * 0.06%* Hmean tput-57 1428132.00 ( 0.00%) 1396399.00 * -2.22%* Hmean tput-58 1432385.00 ( 0.00%) 1386253.00 * -3.22%* Hmean tput-59 1421612.00 ( 0.00%) 1371416.00 * -3.53%* Hmean tput-60 1429423.00 ( 0.00%) 1389412.00 * -2.80%* Hmean tput-61 1396230.00 ( 0.00%) 1351122.00 * -3.23%* Hmean tput-62 1418396.00 ( 0.00%) 1383098.00 * -2.49%* Hmean tput-63 1409918.00 ( 0.00%) 1374662.00 * -2.50%* Hmean tput-64 1410236.00 ( 0.00%) 1376216.00 * -2.41%* Hmean tput-65 1396405.00 ( 0.00%) 1364418.00 * -2.29%* Hmean tput-66 1395975.00 ( 0.00%) 1357326.00 * -2.77%* Hmean tput-67 1392986.00 ( 0.00%) 1349642.00 * -3.11%* Hmean tput-68 1386541.00 ( 0.00%) 1343261.00 * -3.12%* Hmean tput-69 1374407.00 ( 0.00%) 1342588.00 * -2.32%* Hmean tput-70 1377513.00 ( 0.00%) 1334654.00 * -3.11%* Hmean tput-71 1369319.00 ( 0.00%) 1334952.00 * -2.51%* Hmean tput-72 1354635.00 ( 0.00%) 1329005.00 * -1.89%* Hmean tput-73 1350933.00 ( 0.00%) 1318942.00 * -2.37%* Hmean tput-74 1351714.00 ( 0.00%) 1316347.00 * -2.62%* Hmean tput-75 1352198.00 ( 0.00%) 1309974.00 * -3.12%* Hmean tput-76 1349490.00 ( 0.00%) 1286064.00 * -4.70%* Hmean tput-77 1336131.00 ( 0.00%) 1303684.00 * -2.43%* Hmean tput-78 1308896.00 ( 0.00%) 1271024.00 * -2.89%* Hmean tput-79 1326703.00 ( 0.00%) 1290862.00 * -2.70%* Hmean tput-80 1336199.00 ( 0.00%) 1291629.00 * -3.34%* The performance at the mid-point is better but not universally better. The patch is a mixed bag depending on the workload, machine and overall levels of utilisation. Sometimes it's better (sometimes much better), other times it is worse (sometimes much worse). Given that there isn't a universally good decision in this section and more people seem to prefer the patch then it may be best to keep the LB decisions consistent and revisit imbalance handling when the load balancer code changes settle down. Jirka Hladky added the following observation. Our results are mostly in line with what you see. We observe big gains (20-50%) when the system is loaded to 1/3 of the maximum capacity and mixed results at the full load - some workloads benefit from the patch at the full load, others not, but performance changes at the full load are mostly within the noise of results (+/-5%). Overall, we think this patch is helpful. [mgorman@techsingularity.net: Rewrote changelog] Fixes: fb86f5b211 ("sched/numa: Use similar logic to the load balancer for moving between domains with spare capacity") Signed-off-by: Barry Song Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200921221849.GI3179@techsingularity.net commit 6e7499135db724539ca887b3aa64122502875c71 Author: Vincent Guittot Date: Mon Sep 21 09:24:24 2020 +0200 sched/fair: Reduce busy load balance interval The busy_factor, which increases load balance interval when a cpu is busy, is set to 32 by default. This value generates some huge LB interval on large system like the THX2 made of 2 node x 28 cores x 4 threads. For such system, the interval increases from 112ms to 3584ms at MC level. And from 228ms to 7168ms at NUMA level. Even on smaller system, a lower busy factor has shown improvement on the fair distribution of the running time so let reduce it for all. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Phil Auld Link: https://lkml.kernel.org/r/20200921072424.14813-5-vincent.guittot@linaro.org commit e4d32e4d5444977d8dc25fa98b3ce0a65544db8c Author: Vincent Guittot Date: Mon Sep 21 09:24:23 2020 +0200 sched/fair: Minimize concurrent LBs between domain level sched domains tend to trigger simultaneously the load balance loop but the larger domains often need more time to collect statistics. This slowness makes the larger domain trying to detach tasks from a rq whereas tasks already migrated somewhere else at a sub-domain level. This is not a real problem for idle LB because the period of smaller domains will increase with its CPUs being busy and this will let time for higher ones to pulled tasks. But this becomes a problem when all CPUs are already busy because all domains stay synced when they trigger their LB. A simple way to minimize simultaneous LB of all domains is to decrement the the busy interval by 1 jiffies. Because of the busy_factor, the interval of larger domain will not be a multiple of smaller ones anymore. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Phil Auld Link: https://lkml.kernel.org/r/20200921072424.14813-4-vincent.guittot@linaro.org commit 2208cdaa56c957e20d8e16f28819aeb47851cb1e Author: Vincent Guittot Date: Mon Sep 21 09:24:22 2020 +0200 sched/fair: Reduce minimal imbalance threshold The 25% default imbalance threshold for DIE and NUMA domain is large enough to generate significant unfairness between threads. A typical example is the case of 11 threads running on 2x4 CPUs. The imbalance of 20% between the 2 groups of 4 cores is just low enough to not trigger the load balance between the 2 groups. We will have always the same 6 threads on one group of 4 CPUs and the other 5 threads on the other group of CPUS. With a fair time sharing in each group, we ends up with +20% running time for the group of 5 threads. Consider decreasing the imbalance threshold for overloaded case where we use the load to balance task and to ensure fair time sharing. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Phil Auld Acked-by: Hillf Danton Link: https://lkml.kernel.org/r/20200921072424.14813-3-vincent.guittot@linaro.org commit 5a7f555904671c0737819fe4d19bd6143de3f6c0 Author: Vincent Guittot Date: Mon Sep 21 09:24:21 2020 +0200 sched/fair: Relax constraint on task's load during load balance Some UCs like 9 always running tasks on 8 CPUs can't be balanced and the load balancer currently migrates the waiting task between the CPUs in an almost random manner. The success of a rq pulling a task depends of the value of nr_balance_failed of its domains and its ability to be faster than others to detach it. This behavior results in an unfair distribution of the running time between tasks because some CPUs will run most of the time, if not always, the same task whereas others will share their time between several tasks. Instead of using nr_balance_failed as a boolean to relax the condition for detaching task, the LB will use nr_balanced_failed to relax the threshold between the tasks'load and the imbalance. This mecanism prevents the same rq or domain to always win the load balance fight. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Phil Auld Link: https://lkml.kernel.org/r/20200921072424.14813-2-vincent.guittot@linaro.org commit fe7491580d7c56152ea8d9d3124201191617435d Author: Xianting Tian Date: Thu Sep 24 09:47:55 2020 +0800 sched/fair: Remove the force parameter of update_tg_load_avg() In the file fair.c, sometims update_tg_load_avg(cfs_rq, 0) is used, sometimes update_tg_load_avg(cfs_rq, false) is used. update_tg_load_avg() has the parameter force, but in current code, it never set 1 or true to it, so remove the force parameter. Signed-off-by: Xianting Tian Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200924014755.36253-1-tian.xianting@h3c.com commit df3cb4ea1fb63ff326488efd671ba3c39034255e Author: Xunlei Pang Date: Thu Sep 24 14:48:47 2020 +0800 sched/fair: Fix wrong cpu selecting from isolated domain We've met problems that occasionally tasks with full cpumask (e.g. by putting it into a cpuset or setting to full affinity) were migrated to our isolated cpus in production environment. After some analysis, we found that it is due to the current select_idle_smt() not considering the sched_domain mask. Steps to reproduce on my 31-CPU hyperthreads machine: 1. with boot parameter: "isolcpus=domain,2-31" (thread lists: 0,16 and 1,17) 2. cgcreate -g cpu:test; cgexec -g cpu:test "test_threads" 3. some threads will be migrated to the isolated cpu16~17. Fix it by checking the valid domain mask in select_idle_smt(). Fixes: 10e2f1acd010 ("sched/core: Rewrite and improve select_idle_siblings()) Reported-by: Wetp Zhang Signed-off-by: Xunlei Pang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Jiang Biao Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/1600930127-76857-1-git-send-email-xlpang@linux.alibaba.com commit 51bd5121c4eb25b911f6bc1ab4de5fe865fe0dcb Author: YueHaibing Date: Tue Sep 22 21:24:10 2020 +0800 sched: Remove unused inline function uclamp_bucket_base_value() There is no caller in tree, so can remove it. Signed-off-by: YueHaibing Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Link: https://lkml.kernel.org/r/20200922132410.48440-1-yuehaibing@huawei.com commit 2586af1ac187f6b3a50930a4e33497074e81762d Author: Daniel Bristot de Oliveira Date: Mon Sep 21 16:39:49 2020 +0200 sched/rt: Disable RT_RUNTIME_SHARE by default The RT_RUNTIME_SHARE sched feature enables the sharing of rt_runtime between CPUs, allowing a CPU to run a real-time task up to 100% of the time while leaving more space for non-real-time tasks to run on the CPU that lend rt_runtime. The problem is that a CPU can easily borrow enough rt_runtime to allow a spinning rt-task to run forever, starving per-cpu tasks like kworkers, which are non-real-time by design. This patch disables RT_RUNTIME_SHARE by default, avoiding this problem. The feature will still be present for users that want to enable it, though. Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Tested-by: Wei Wang Link: https://lkml.kernel.org/r/b776ab46817e3db5d8ef79175fa0d71073c051c7.1600697903.git.bristot@redhat.com commit 46fcc4b00c3cca8adb9b7c9afdd499f64e427135 Author: Lucas Stach Date: Mon Aug 31 13:07:19 2020 +0200 sched/deadline: Fix stale throttling on de-/boosted tasks When a boosted task gets throttled, what normally happens is that it's immediately enqueued again with ENQUEUE_REPLENISH, which replenishes the runtime and clears the dl_throttled flag. There is a special case however: if the throttling happened on sched-out and the task has been deboosted in the meantime, the replenish is skipped as the task will return to its normal scheduling class. This leaves the task with the dl_throttled flag set. Now if the task gets boosted up to the deadline scheduling class again while it is sleeping, it's still in the throttled state. The normal wakeup however will enqueue the task with ENQUEUE_REPLENISH not set, so we don't actually place it on the rq. Thus we end up with a task that is runnable, but not actually on the rq and neither a immediate replenishment happens, nor is the replenishment timer set up, so the task is stuck in forever-throttled limbo. Clear the dl_throttled flag before dropping back to the normal scheduling class to fix this issue. Signed-off-by: Lucas Stach Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juri Lelli Link: https://lkml.kernel.org/r/20200831110719.2126930-1-l.stach@pengutronix.de commit 8e0e0eda6a13e242239799263cc354796c05434a Author: Vincent Guittot Date: Mon Sep 21 09:29:59 2020 +0200 sched/numa: Use runnable_avg to classify node Use runnable_avg to classify numa node state similarly to what is done for normal load balancer. This helps to ensure that numa and normal balancers use the same view of the state of the system. Large arm64system: 2 nodes / 224 CPUs: hackbench -l (256000/#grp) -g #grp grp tip/sched/core +patchset improvement 1 14,008(+/- 4,99 %) 13,800(+/- 3.88 %) 1,48 % 4 4,340(+/- 5.35 %) 4.283(+/- 4.85 %) 1,33 % 16 3,357(+/- 0.55 %) 3.359(+/- 0.54 %) -0,06 % 32 3,050(+/- 0.94 %) 3.039(+/- 1,06 %) 0,38 % 64 2.968(+/- 1,85 %) 3.006(+/- 2.92 %) -1.27 % 128 3,290(+/-12.61 %) 3,108(+/- 5.97 %) 5.51 % 256 3.235(+/- 3.95 %) 3,188(+/- 2.83 %) 1.45 % Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mel Gorman Link: https://lkml.kernel.org/r/20200921072959.16317-1-vincent.guittot@linaro.org commit b942fc0319a72b83146b79619eb578e989062911 Author: Liu Shixin Date: Thu Sep 17 16:13:54 2020 +0800 RDMA/mlx5: Fix type warning of sizeof in __mlx5_ib_alloc_counters() sizeof() when applied to a pointer typed expression should give the size of the pointed data, even if the data is a pointer. Fixes: e1f24a79f424 ("IB/mlx5: Support congestion related counters") Link: https://lore.kernel.org/r/20200917081354.2083293-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 197bbae9ed8b45aa5c6cacddbcacc3d67e53de3a Author: Krzysztof Kozlowski Date: Wed Sep 16 17:57:06 2020 +0200 arm64: dts: ti: k3-j721e-common-proc-board: align GPIO hog names with dtschema The convention for node names is to use hyphens, not underscores. dtschema for pca95xx expects GPIO hogs to end with 'hog' prefix. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20200916155715.21009-7-krzk@kernel.org commit 25121d9804b8421851e3ccb88d1d35a5d93692b8 Author: Ofir Bitton Date: Thu Sep 24 08:22:58 2020 +0300 habanalabs/gaudi: configure QMAN LDMA registers properly LDMA registers are configured with a fixed value. We add new define set which gives the configuration a proper meaning. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit eab1f6e7b035896a03e9683d3a80c6bd33b83476 Author: Oded Gabbay Date: Wed Sep 23 23:56:18 2020 +0300 habanalabs: add notice of device not idle The device should be idle after a context is closed. If not, print a notice. Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit 3c3aa5dbd65915abaa87d91330f4463c99d0df44 Author: Oded Gabbay Date: Wed Sep 23 23:51:03 2020 +0300 habanalabs: add debug messages for opening/closing context During debugging of error we sometimes need to know whether the error happened when a user context was open. Add debug prints when opening and closing user contexts. Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit 9e2e8fc7d65c9c2b58a4bf5b6c62a6fbb3762d05 Author: Oded Gabbay Date: Wed Sep 23 15:06:52 2020 +0300 habanalabs: release kernel context after hw_fini Some engines use resources that belong to the kernel context (e.g. MMU mappings). In case the halt-engines doesn't work properly due to H/W restriction, we need to make sure the kernel context lives on until after the hw_fini. The hw_fini resets the ASIC after that no engine is alive and we can safely close the kernel context. Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit fc6121e961cba2e4790493f656b7066e250f9521 Author: Oded Gabbay Date: Wed Sep 23 14:07:32 2020 +0300 habanalabs: correct an error message We don't try to allocate huge pages here so remove the huge word. Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit 5e7998b8017f83d421fcf41421c562f63ed125cc Author: Krzysztof Kozlowski Date: Wed Sep 16 17:57:10 2020 +0200 ARM: dts: am3874: iceboard: fix GPIO expander reset GPIOs Correct the property for reset GPIOs of the GPIO expander. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Tony Lindgren commit ccd73f07e05d0adc99d164cc919293799cca510c Author: Krzysztof Kozlowski Date: Wed Sep 16 17:57:09 2020 +0200 ARM: dts: am335x: t335: align GPIO hog names with dtschema The convention for node names is to use hyphens, not underscores. dtschema for pca95xx expects GPIO hogs to end with 'hog' prefix. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Tony Lindgren commit 97b16ed1038b1cd40114d6486c0e67029bfcd8db Author: Krzysztof Kozlowski Date: Wed Sep 16 17:57:08 2020 +0200 ARM: dts: am335x: lxm: fix PCA9539 GPIO expander properties The PCA9539 GPIO expander requires GPIO controller properties to operate properly. Signed-off-by: Krzysztof Kozlowski Acked-by: Tony Lindgren Signed-off-by: Tony Lindgren commit 8cbe7afc92d0ed0078ac00de5fc48c202bbb67f9 Author: Grygorii Strashko Date: Fri Sep 11 01:25:18 2020 +0300 ARM: dts: am437x-l4: drop legacy cpsw dt node All am437x boards have been converted to use new driver, so drop legacy cpsw dt node. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit aff7e5038c8558b68383b992e33486045cf5734a Author: Grygorii Strashko Date: Fri Sep 11 01:25:17 2020 +0300 ARM: dts: am437x: switch to new cpsw switch drv The dual_mac mode has been preserved the same way between legacy and new driver, and one port devices works the same as 1 dual_mac port - it's safe to switch drivers. So, Switch all am437x boards to use new cpsw switch driver. Those boards have or 2 Ext. port wired and configured in dual_mac mode by default, or only 1 Ext. port. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 7bf8f37aea8212d795dd5c821fa0a622b143000c Author: Grygorii Strashko Date: Fri Sep 11 01:25:16 2020 +0300 ARM: dts: am437x-l4: add dt node for new cpsw switchdev driver Add DT node for the new cpsw switchdev based driver. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 94d4c3cffefc702da2f906bfc68b774659f1c8fc Author: Krzysztof Kozlowski Date: Fri Sep 25 09:25:32 2020 +0200 mmc: sdhci-s3c: hide forward declaration of of_device_id behind CONFIG_OF The struct of_device_id is not defined with !CONFIG_OF so its forward declaration should be hidden to as well. This should address clang compile warning: drivers/mmc/host/sdhci-s3c.c:464:34: warning: tentative array definition assumed to have one element Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200925072532.10272-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit 0cb231f1e034bfbb3ccbaf759721d136a6847dde Author: Krzysztof Kozlowski Date: Wed Sep 23 17:37:39 2020 +0200 mmc: sdhci: fix indentation mistakes Fix inconsistent indenting, reported by Smatch: drivers/mmc/host/sdhci-esdhc-imx.c:1380 sdhci_esdhc_imx_hwinit() warn: inconsistent indenting drivers/mmc/host/sdhci-sprd.c:390 sdhci_sprd_request_done() warn: inconsistent indenting Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200923153739.30327-2-krzk@kernel.org Signed-off-by: Ulf Hansson commit 6b28f2c4da7e196062d84b143294cf6d86f6e02c Author: Krzysztof Kozlowski Date: Wed Sep 23 17:37:38 2020 +0200 mmc: moxart: remove unneeded check for drvdata The 'struct mmc_host *mmc' comes from drvdata set at the end of probe, so it cannot be NULL. The code already dereferences it few lines before the check with mmc_priv(). This also fixes smatch warning: drivers/mmc/host/moxart-mmc.c:692 moxart_remove() warn: variable dereferenced before check 'mmc' (see line 688) Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200923153739.30327-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit fbb31330f9b00bf62fe126a1ea118c02389b06f0 Author: Wolfram Sang Date: Tue Sep 22 19:22:53 2020 +0200 mmc: renesas_sdhi: drop local flag for tuning The MMC core has now a generic check if some tuning is in progress. Its protected area is a bit larger than the custom one in this driver but we concluded that this works equally well for the intended case. So, drop the local flag and switch to the generic one. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20200922172253.4458-1-wsa@kernel.org Signed-off-by: Ulf Hansson commit 8dae6a249c635cdc637ae07761beef866480ca0e Author: Qinglang Miao Date: Mon Sep 21 21:10:42 2020 +0800 mmc: rtsx_usb_sdmmc: simplify the return expression of sd_change_phase() Simplify the return expression. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200921131042.92340-1-miaoqinglang@huawei.com Signed-off-by: Ulf Hansson commit 3439c588c23c7058b184240b11ffe7edd7b8ac7c Author: Wolfram Sang Date: Fri Sep 18 23:54:46 2020 +0200 mmc: core: document mmc_hw_reset() Add documentation for mmc_hw_reset to make sure the intended use case is clear. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20200918215446.65654-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit d9216d753b2b1406b801243b12aaf00a5ce5b861 Author: Jason Gerecke Date: Wed Sep 23 13:14:56 2020 -0700 HID: wacom: Avoid entering wacom_wac_pen_report for pad / battery It has recently been reported that the "heartbeat" report from devices like the 2nd-gen Intuos Pro (PTH-460, PTH-660, PTH-860) or the 2nd-gen Bluetooth-enabled Intuos tablets (CTL-4100WL, CTL-6100WL) can cause the driver to send a spurious BTN_TOUCH=0 once per second in the middle of drawing. This can result in broken lines while drawing on Chrome OS. The source of the issue has been traced back to a change which modified the driver to only call `wacom_wac_pad_report()` once per report instead of once per collection. As part of this change, pad-handling code was removed from `wacom_wac_collection()` under the assumption that the `WACOM_PEN_FIELD` and `WACOM_TOUCH_FIELD` checks would not be satisfied when a pad or battery collection was being processed. To be clear, the macros `WACOM_PAD_FIELD` and `WACOM_PEN_FIELD` do not currently check exclusive conditions. In fact, most "pad" fields will also appear to be "pen" fields simply due to their presence inside of a Digitizer application collection. Because of this, the removal of the check from `wacom_wac_collection()` just causes pad / battery collections to instead trigger a call to `wacom_wac_pen_report()` instead. The pen report function in turn resets the tip switch state just prior to exiting, resulting in the observed BTN_TOUCH=0 symptom. To correct this, we restore a version of the `WACOM_PAD_FIELD` check in `wacom_wac_collection()` and return early. This effectively prevents pad / battery collections from being reported until the very end of the report as originally intended. Fixes: d4b8efeb46d9 ("HID: wacom: generic: Correct pad syncing") Cc: stable@vger.kernel.org # v4.17+ Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Tested-by: Ping Cheng Signed-off-by: Jiri Kosina commit b226faab4e7890bbbccdf794e8b94276414f9058 Author: Alex Hung Date: Sun Sep 13 16:34:03 2020 -0600 ACPI: video: use ACPI backlight for HP 635 Notebook The default backlight interface is AMD's radeon_bl0 which does not work on this system, so use the ACPI backlight interface on it instead. BugLink: https://bugs.launchpad.net/bugs/1894667 Cc: All applicable Signed-off-by: Alex Hung [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 399e08f1f06693c6734f4a071573674369151ffd Author: Andy Shevchenko Date: Fri Sep 11 19:46:13 2020 +0300 MAINTAINERS: Use my kernel.org address for Intel PMIC work Use my kernel.org address for Intel PMIC work. While here, upgrade status to maintainer of PMIC MFD devices. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 32c6f3ffa0182d7f1a8f3e385de3fef74bc27b24 Author: Hanjun Guo Date: Mon Sep 7 20:57:33 2020 +0800 ACPI: APD: Clean up header file include statements Make the included header files appear in the alphabetical order and remove the unnecessary header file inclusions. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit ee2bc5d2c4059622737c0461e60aba6c0be6793c Author: Hanjun Guo Date: Mon Sep 7 20:57:32 2020 +0800 ACPI: APD: Remove unnecessary APD_ADDR() macro stub Since APD_ADDR(desc) is only used when CONFIG_X86_AMD_PLATFORM_DEVICE or CONFIG_ARM64 is set, no need for the stub APD_ADDR(desc) definition covering the other cases, so remove it. Also update the comments for #endif. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 5df8e5f4f9cec84b72ee2607fdff364903d5d7ee Author: Hanjun Guo Date: Mon Sep 7 20:57:31 2020 +0800 ACPI: APD: Remove ACPI_MODULE_NAME() ACPI_MODULE_NAME() is used for ACPI debug output when using ACPI debug print functions, but ACPI debug print functions are not used in acpi_apd.c, so remove the ACPI_MODULE_NAME() from it. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 62d2234d333a89557cd398472dcf9d00ae624a8d Author: Hanjun Guo Date: Mon Sep 7 20:57:30 2020 +0800 ACPI: APD: Remove flags from struct apd_device_desc The flags field is not used in anywhere, so remove it along with two symbols related to it. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit ad4a0f240882135bcedc207bb52e098029e5fbc7 Author: Hanjun Guo Date: Mon Sep 7 20:57:29 2020 +0800 ACPI: APD: Add kerneldoc for properties in struct apd_device_desc commit 7ff55d174cbf ("ACPI / APD: Provide build-in properties of the UART") added the struct property_entry *properties field to struct apd_device_desc, but didn't add the kernel doc for it, so add it now. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 749626fa099085ca77f3ff05a8efcb3b87721724 Author: YueHaibing Date: Tue Sep 1 14:47:16 2020 +0800 ACPI: Remove three unused inline functions There is no callers in tree. Signed-off-by: YueHaibing [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 3d3dc274ce736227e3197868ff749cff2f175f63 Author: Eric Dumazet Date: Thu Sep 24 11:36:19 2020 -0700 quota: clear padding in v2r1_mem2diskdqb() Freshly allocated memory contains garbage, better make sure to init all struct v2r1_disk_dqblk fields to avoid KMSAN report: BUG: KMSAN: uninit-value in qtree_entry_unused+0x137/0x1b0 fs/quota/quota_tree.c:218 CPU: 0 PID: 23373 Comm: syz-executor.1 Not tainted 5.9.0-rc4-syzkaller #0 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+0x21c/0x280 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:122 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:219 qtree_entry_unused+0x137/0x1b0 fs/quota/quota_tree.c:218 v2r1_mem2diskdqb+0x43d/0x710 fs/quota/quota_v2.c:285 qtree_write_dquot+0x226/0x870 fs/quota/quota_tree.c:394 v2_write_dquot+0x1ad/0x280 fs/quota/quota_v2.c:333 dquot_commit+0x4af/0x600 fs/quota/dquot.c:482 ext4_write_dquot fs/ext4/super.c:5934 [inline] ext4_mark_dquot_dirty+0x4d8/0x6a0 fs/ext4/super.c:5985 mark_dquot_dirty fs/quota/dquot.c:347 [inline] mark_all_dquot_dirty fs/quota/dquot.c:385 [inline] dquot_alloc_inode+0xc05/0x12b0 fs/quota/dquot.c:1755 __ext4_new_inode+0x8204/0x9d70 fs/ext4/ialloc.c:1155 ext4_tmpfile+0x41a/0x850 fs/ext4/namei.c:2686 vfs_tmpfile+0x2a2/0x570 fs/namei.c:3283 do_tmpfile fs/namei.c:3316 [inline] path_openat+0x4035/0x6a90 fs/namei.c:3359 do_filp_open+0x2b8/0x710 fs/namei.c:3395 do_sys_openat2+0xa88/0x1140 fs/open.c:1168 do_sys_open fs/open.c:1184 [inline] __do_compat_sys_openat fs/open.c:1242 [inline] __se_compat_sys_openat+0x2a4/0x310 fs/open.c:1240 __ia32_compat_sys_openat+0x56/0x70 fs/open.c:1240 do_syscall_32_irqs_on arch/x86/entry/common.c:80 [inline] __do_fast_syscall_32+0x129/0x180 arch/x86/entry/common.c:139 do_fast_syscall_32+0x6a/0xc0 arch/x86/entry/common.c:162 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:205 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c RIP: 0023:0xf7ff4549 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f55cd0cc EFLAGS: 00000296 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 00000000ffffff9c RCX: 0000000020000000 RDX: 0000000000410481 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:143 [inline] kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:126 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:80 slab_alloc_node mm/slub.c:2907 [inline] slab_alloc mm/slub.c:2916 [inline] __kmalloc+0x2bb/0x4b0 mm/slub.c:3982 kmalloc include/linux/slab.h:559 [inline] getdqbuf+0x56/0x150 fs/quota/quota_tree.c:52 qtree_write_dquot+0xf2/0x870 fs/quota/quota_tree.c:378 v2_write_dquot+0x1ad/0x280 fs/quota/quota_v2.c:333 dquot_commit+0x4af/0x600 fs/quota/dquot.c:482 ext4_write_dquot fs/ext4/super.c:5934 [inline] ext4_mark_dquot_dirty+0x4d8/0x6a0 fs/ext4/super.c:5985 mark_dquot_dirty fs/quota/dquot.c:347 [inline] mark_all_dquot_dirty fs/quota/dquot.c:385 [inline] dquot_alloc_inode+0xc05/0x12b0 fs/quota/dquot.c:1755 __ext4_new_inode+0x8204/0x9d70 fs/ext4/ialloc.c:1155 ext4_tmpfile+0x41a/0x850 fs/ext4/namei.c:2686 vfs_tmpfile+0x2a2/0x570 fs/namei.c:3283 do_tmpfile fs/namei.c:3316 [inline] path_openat+0x4035/0x6a90 fs/namei.c:3359 do_filp_open+0x2b8/0x710 fs/namei.c:3395 do_sys_openat2+0xa88/0x1140 fs/open.c:1168 do_sys_open fs/open.c:1184 [inline] __do_compat_sys_openat fs/open.c:1242 [inline] __se_compat_sys_openat+0x2a4/0x310 fs/open.c:1240 __ia32_compat_sys_openat+0x56/0x70 fs/open.c:1240 do_syscall_32_irqs_on arch/x86/entry/common.c:80 [inline] __do_fast_syscall_32+0x129/0x180 arch/x86/entry/common.c:139 do_fast_syscall_32+0x6a/0xc0 arch/x86/entry/common.c:162 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:205 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c Fixes: 498c60153ebb ("quota: Implement quota format with 64-bit space and inode limits") Link: https://lore.kernel.org/r/20200924183619.4176790-1-edumazet@google.com Signed-off-by: Eric Dumazet Cc: Jan Kara Signed-off-by: Jan Kara commit 0b7e44d39c8aa7536352b57af2265e92fc253e4f Author: Tianjia Zhang Date: Mon Sep 21 00:21:03 2020 +0800 integrity: Asymmetric digsig supports SM2-with-SM3 algorithm Asymmetric digsig supports SM2-with-SM3 algorithm combination, so that IMA can also verify SM2's signature data. Signed-off-by: Tianjia Zhang Tested-by: Xufeng Zhang Reviewed-by: Mimi Zohar Reviewed-by: Vitaly Chikunov Signed-off-by: Herbert Xu commit 215525639631ade1d67e879fe2c3d7195daa9f59 Author: Tianjia Zhang Date: Mon Sep 21 00:21:02 2020 +0800 X.509: support OSCCA SM2-with-SM3 certificate verification The digital certificate format based on SM2 crypto algorithm as specified in GM/T 0015-2012. It was published by State Encryption Management Bureau, China. The method of generating Other User Information is defined as ZA=H256(ENTLA || IDA || a || b || xG || yG || xA || yA), it also specified in https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02. The x509 certificate supports SM2-with-SM3 type certificate verification. Because certificate verification requires ZA in addition to tbs data, ZA also depends on elliptic curve parameters and public key data, so you need to access tbs in sig and calculate ZA. Finally calculate the digest of the signature and complete the verification work. The calculation process of ZA is declared in specifications GM/T 0009-2012 and GM/T 0003.2-2012. Signed-off-by: Tianjia Zhang Tested-by: Xufeng Zhang Reviewed-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 254f84f559039b6d6f6e1035fd7645b42671ab48 Author: Tianjia Zhang Date: Mon Sep 21 00:21:01 2020 +0800 X.509: support OSCCA certificate parse The digital certificate format based on SM2 crypto algorithm as specified in GM/T 0015-2012. It was published by State Encryption Management Bureau, China. This patch adds the OID object identifier defined by OSCCA. The x509 certificate supports SM2-with-SM3 type certificate parsing. It uses the standard elliptic curve public key, and the sm2 algorithm signs the hash generated by sm3. Signed-off-by: Tianjia Zhang Tested-by: Xufeng Zhang Reviewed-by: Vitaly Chikunov Signed-off-by: Herbert Xu commit 8b805b97fc1aa0de89e582b206ce2efd0df05895 Author: Tianjia Zhang Date: Mon Sep 21 00:21:00 2020 +0800 crypto: sm2 - add SM2 test vectors to testmgr Add testmgr test vectors for SM2 algorithm. These vectors come from `openssl pkeyutl -sign` and libgcrypt. Signed-off-by: Tianjia Zhang Tested-by: Xufeng Zhang Signed-off-by: Herbert Xu commit 2b40386774831c9617325ca8940fb3c270cbb086 Author: Tianjia Zhang Date: Mon Sep 21 00:20:59 2020 +0800 crypto: testmgr - Fix potential memory leak in test_akcipher_one() When the 'key' allocation fails, the 'req' will not be released, which will cause memory leakage on this path. This patch adds a 'free_req' tag used to solve this problem, and two new err values are added to reflect the real reason of the error. Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu commit a1f62c217d9c371187dd14d2e1370923aae58994 Author: Tianjia Zhang Date: Mon Sep 21 00:20:58 2020 +0800 crypto: testmgr - support test with different ciphertext per encryption Some asymmetric algorithms will get different ciphertext after each encryption, such as SM2, and let testmgr support the testing of such algorithms. In struct akcipher_testvec, set c and c_size to be empty, skip the comparison of the ciphertext, and compare the decrypted plaintext with m to achieve the test purpose. Signed-off-by: Tianjia Zhang Tested-by: Xufeng Zhang Signed-off-by: Herbert Xu commit ea7ecb66440b37c035e899c60ceaf7a03d364930 Author: Tianjia Zhang Date: Mon Sep 21 00:20:57 2020 +0800 crypto: sm2 - introduce OSCCA SM2 asymmetric cipher algorithm This new module implement the SM2 public key algorithm. It was published by State Encryption Management Bureau, China. List of specifications for SM2 elliptic curve public key cryptography: * GM/T 0003.1-2012 * GM/T 0003.2-2012 * GM/T 0003.3-2012 * GM/T 0003.4-2012 * GM/T 0003.5-2012 IETF: https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02 oscca: http://www.oscca.gov.cn/sca/xxgk/2010-12/17/content_1002386.shtml scctc: http://www.gmbz.org.cn/main/bzlb.html Signed-off-by: Tianjia Zhang Tested-by: Xufeng Zhang Signed-off-by: Herbert Xu commit d58bb7e55a8a65894cc02f27c3e2bf9403e7c40f Author: Tianjia Zhang Date: Mon Sep 21 00:20:56 2020 +0800 lib/mpi: Introduce ec implementation to MPI library The implementation of EC is introduced from libgcrypt as the basic algorithm of elliptic curve, which can be more perfectly integrated with MPI implementation. Some other algorithms will be developed based on mpi ecc, such as SM2. Signed-off-by: Tianjia Zhang Tested-by: Xufeng Zhang Signed-off-by: Herbert Xu commit a8ea8bdd9df92a0e5db5b43900abb7a288b8a53e Author: Tianjia Zhang Date: Mon Sep 21 00:20:55 2020 +0800 lib/mpi: Extend the MPI library Expand the mpi library based on libgcrypt, and the ECC algorithm of mpi based on libgcrypt requires these functions. Some other algorithms will be developed based on mpi ecc, such as SM2. Signed-off-by: Tianjia Zhang Tested-by: Xufeng Zhang Signed-off-by: Herbert Xu commit f49282870fb039e3c2e5c3341bd27875282609d7 Author: Tianjia Zhang Date: Mon Sep 21 00:20:54 2020 +0800 crypto: sm3 - export crypto_sm3_final function Both crypto_sm3_update and crypto_sm3_finup have been exported, exporting crypto_sm3_final, to avoid having to use crypto_sm3_finup(desc, NULL, 0, dgst) to calculate the hash in some cases. Signed-off-by: Tianjia Zhang Tested-by: Xufeng Zhang Signed-off-by: Herbert Xu commit d8e887661711d668f5926a3d849c08c203fb0381 Author: Weili Qian Date: Sat Sep 19 19:01:36 2020 +0800 crypto: hisilicon/qm - remove the update of flags 'qm_init_qp_status' is just a help function to initiate some 'QP' status. 'QP' status should be updated separately. This patch removes the updating flags in 'QP' status. Signed-off-by: Weili Qian Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit d8140b878eb317bda057468d969844f93a5d2d18 Author: Yang Shen Date: Sat Sep 19 19:01:35 2020 +0800 crypto: hisilicon/qm - fix wrong return type of 'pci_get_drvdata' The parameter type of 'pci_set_drvdata' is 'struct hisi_qm', so here the return type of 'pci_get_drvdata' should be 'struct hisi_qm' too. Signed-off-by: Yang Shen Signed-off-by: Weili Qian Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit bfc1159e7f0607cdaaef380792c036b96310da72 Author: Meng Yu Date: Sat Sep 19 11:13:52 2020 +0800 crypto: hisilicon/hpre - fix a bug in dh algorithm Using 'g' not equal to 2 in dh algorithm may cause an error like this: arm-smmu-v3 arm-smmu-v3.1.auto: event 0x10 received: dh: Party A: generate public key test failed. err -22 11375.065672] dh alg: dh: test failed on vector 1, err=-22 arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000790000000010 arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000120800000080 hpre-dh self test failed arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000000000000000 arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000000000000000 arm-smmu-v3 arm-smmu-v3.1.auto: event 0x10 received: arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000790000000010 arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000120800000083 arm-smmu-v3 arm-smmu-v3.1.auto: 0x00000000000000c0 arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000000000000000 arm-smmu-v3 arm-smmu-v3.1.auto: event 0x10 received: arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000790000000010 arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000120800000081 arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000000000000040 arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000000000000000 arm-smmu-v3 arm-smmu-v3.1.auto: event 0x10 received: arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000790000000010 arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000120800000082 arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000000000000080 arm-smmu-v3 arm-smmu-v3.1.auto: 0x0000000000000000 hisi_hpre 0000:79:00.0: dat_rd_poison_int_set [error status=0x8] found hisi_hpre 0000:79:00.0: ooo_rdrsp_err_int_set [error status=0xfc00] found hisi_hpre 0000:79:00.0: Controller resetting... hisi_hpre 0000:79:00.0: Controller reset complete {2}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 0 {2}[Hardware Error]: event severity: recoverable {2}[Hardware Error]: Error 0, type: recoverable {2}[Hardware Error]: section type: unknown, c8b328a8-9917-4af6-9a13-2e08ab2e7586 {2}[Hardware Error]: section length: 0x4c as we missed initiating 'msg->in'. Fixes: c8b4b477079d("crypto: hisilicon - add HiSilicon HPRE accelerator") Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit 937e871762d84cd293c48b1d9689f3c97f486098 Author: Meng Yu Date: Sat Sep 19 11:13:51 2020 +0800 crypto: hisilicon/hpre - adjust some coding style Adjust some coding style to make code aligned. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit 7747cffe0676b37a38c2f320b2ddbcb8d82d81a4 Author: Meng Yu Date: Sat Sep 19 11:13:50 2020 +0800 crypto: hisilicon/hpre - remove useless code 1. Remove unused member 'debug_root' in 'struct hpre_debug'; 2. The u64 cast is redundant in 'cpu_to_le64'. Fixes: 848974151618("crypto: hisilicon - Add debugfs for HPRE") Fixes: dadbe4c11753("crypto: hisilicon/hpre - update debugfs ...") Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit 74d0dcd4c5fe67d7430ef30ad624a34e10903940 Author: Colin Ian King Date: Fri Sep 18 22:56:59 2020 +0100 crypto: chelsio - fix minor indentation issue There is a statement that is indented by one whitespace too deeply, fix this by removing the whitespace. Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit 77ebdabe8de7c02f43c6de3357f79ff96f9f0579 Author: Elena Petrova Date: Fri Sep 18 16:42:16 2020 +0100 crypto: af_alg - add extra parameters for DRBG interface Extend the user-space RNG interface: 1. Add entropy input via ALG_SET_DRBG_ENTROPY setsockopt option; 2. Add additional data input via sendmsg syscall. This allows DRBG to be tested with test vectors, for example for the purpose of CAVP testing, which otherwise isn't possible. To prevent erroneous use of entropy input, it is hidden under CRYPTO_USER_API_RNG_CAVP config option and requires CAP_SYS_ADMIN to succeed. Signed-off-by: Elena Petrova Acked-by: Stephan Müller Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit fcf5d2dcadde06f2c82eef460198e2f2f4b642f8 Author: Corentin Labbe Date: Fri Sep 18 07:23:15 2020 +0000 crypto: sun8i-ss - fix comparison of integer expressions of different signedness This patch fixes the warning: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 25d85ffca16a265a8b940ecf57da9a2270cbd829 Author: Corentin Labbe Date: Fri Sep 18 07:23:14 2020 +0000 crypto: sun8i-ce - fix comparison of integer expressions of different signedness This patch fixes the warning: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 4a07eab32f4b5f432ee9d212b8db1b8e4699e9db Author: Corentin Labbe Date: Fri Sep 18 07:23:13 2020 +0000 crypto: sun8i-ce - Add support for the TRNG This patch had support for the TRNG present in the CE. Note that according to the algorithm ID, 2 version of the TRNG exists, the first present in H3/H5/R40/A64 and the second present in H6. This patch adds support for both, but only the second is working reliabily according to rngtest. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 5eb7e946888493959b1c393144934afcbcd0cfc1 Author: Corentin Labbe Date: Fri Sep 18 07:23:12 2020 +0000 crypto: sun8i-ce - Add support for the PRNG This patch had support for the PRNG present in the CE. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 5c394170d8c652b17a9e1e35d3b99f558867dbb8 Author: Corentin Labbe Date: Fri Sep 18 07:23:11 2020 +0000 crypto: sun8i-ce - Add stat_bytes debugfs This patch adds a new stat_bytes counter in the sun8i-ce debugfs. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 56f6d5aee88d129b2424902cd630f10794550763 Author: Corentin Labbe Date: Fri Sep 18 07:23:10 2020 +0000 crypto: sun8i-ce - support hash algorithms The CE support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224, SHA256, SHA384 and SHA512. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 6b4f76c2cd9e6c3b026953150dd78cfb25a22ddc Author: Corentin Labbe Date: Fri Sep 18 07:23:09 2020 +0000 crypto: sun8i-ce - rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes Hash algorithms will need also a spetial t_dlen handling, but since the meaning will be different, rename the current flag to specify it apply only on ciphers algorithms. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit e66862e6db27a5a03595e42baae07739c8f07ad6 Author: Corentin Labbe Date: Fri Sep 18 07:23:08 2020 +0000 crypto: sun8i-ce - handle different error registers Error registers are different across SoCs. This patch handle those difference. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 0605fa0f78266cc3cb84201020f0cb7b546d72cc Author: Corentin Labbe Date: Fri Sep 18 07:23:07 2020 +0000 crypto: sun8i-ce - split into prepare/run/unprepare This patch split the do_one_request into three. Prepare will handle all DMA mapping and initialisation of the task structure. Unprepare will clean all DMA mapping. And the do_one_request will be limited to just executing the task. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit a216f8d540cf13211227daf44996e8a530b92468 Author: Corentin Labbe Date: Fri Sep 18 07:23:06 2020 +0000 crypto: sun8i-ce - move iv data to request context Instead of storing IV data in the channel context, store them in the request context. Storing them in the channel structure was conceptualy wrong since they are per request related. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 87f34260f5e09a4578132ad1c05aef2d707dd4bf Author: Corentin Labbe Date: Fri Sep 18 07:23:05 2020 +0000 crypto: sun8i-ce - handle endianness of t_common_ctl t_common_ctl is LE32 so we need to convert its value before using it. This value is only used on H6 (ignored on other SoCs) and not handling the endianness cause failure on xRNG/hashes operations on H6 when running BE. Fixes: 06f751b61329 ("crypto: allwinner - Add sun8i-ce Crypto Engine") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 68cbba1639373608194b825add1c796902adc43a Author: Corentin Labbe Date: Fri Sep 18 07:23:04 2020 +0000 crypto: sun8i-ss - better debug printing This patch reworks the way debug info are printed. Instead of printing raw numbers, let's add a bit of context. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 3bf9754b0f6c0681f22df2412d97f0d42551b4aa Author: Corentin Labbe Date: Fri Sep 18 07:23:03 2020 +0000 crypto: sun8i-ss - Add more comment on some structures This patch adds some comment on structures used by sun8i-ss. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 3b7aaa84052532bb058b8cbb9306ef2db0fbc2aa Author: Corentin Labbe Date: Fri Sep 18 07:23:02 2020 +0000 crypto: sun8i-ss - fix a trivial typo This fixes a trivial typo. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit d9b45418a91773b7672e4c60037a28074b495c6d Author: Corentin Labbe Date: Fri Sep 18 07:23:01 2020 +0000 crypto: sun8i-ss - support hash algorithms The SS support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224 and SHA256. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit ac2614d721dea2ff273af19c6c5d508d58a2bb3e Author: Corentin Labbe Date: Fri Sep 18 07:23:00 2020 +0000 crypto: sun8i-ss - Add support for the PRNG This patch had support for the PRNG present in the SS. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit f1455b18ee182e07a5d9c0fe3e102a33fc5e6f34 Author: Corentin Labbe Date: Fri Sep 18 07:22:59 2020 +0000 crypto: sun8i-ss - Add SS_START define Instead of using an hardcoded value, let's use a defined value for SS_START. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 106aaab3fc0e5a40cad9c0f713581cbeda067af5 Author: Qinglang Miao Date: Fri Sep 18 09:31:13 2020 +0800 crypto: hisilicon/qm - Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Signed-off-by: Herbert Xu commit f464851806bd7baf1333c2639a107fcb67513e97 Author: Qinglang Miao Date: Fri Sep 18 09:31:12 2020 +0800 crypto: cavium/zip - Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Signed-off-by: Herbert Xu commit c45b5d6784098bb80b2a851c35b1477a0c23ff18 Author: Qinglang Miao Date: Fri Sep 18 09:31:11 2020 +0800 crypto: caam - Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit b11d90639aa7d37a7133887db76b7fd697072343 Author: Qinglang Miao Date: Fri Sep 18 09:31:10 2020 +0800 crypto: amlogic - Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Signed-off-by: Herbert Xu commit 560daf9ee77689ab2acc2b2d834c6b50ad23fdbd Author: Qinglang Miao Date: Fri Sep 18 09:31:08 2020 +0800 crypto: allwinner - Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Signed-off-by: Herbert Xu commit fde2f57c2fece745a75a1978ef593411ddcf4f76 Author: Corentin Labbe Date: Thu Sep 17 18:59:36 2020 +0000 crypto: proc - Removing some useless only space lines Some line got only spaces, remove them Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 3cea6b36a434059a2115a29da9ea2906f593dcb1 Author: Zhang Qilong Date: Thu Sep 17 15:42:34 2020 +0800 crypto: marvell/cesa - use devm_platform_ioremap_resource_byname Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Zhang Qilong Signed-off-by: Herbert Xu commit 3ebbc035c01e7bac41fd895a16d0185680f0aec3 Author: Ard Biesheuvel Date: Wed Sep 16 15:36:42 2020 +0300 crypto: arm/aes-neonbs - use typed init/exit routines for XTS Use the typed skcipher init/exit routines instead of the generic cra_init/_exit routines when instantiating/releasing the XTS skciphers. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit be6d6993972a36bda199a9208fd8720077825dd3 Author: Ard Biesheuvel Date: Wed Sep 16 15:36:41 2020 +0300 crypto: arm/aes-neonbs - avoid loading reorder argument on encryption Reordering the tweak is never necessary for encryption, so avoid the argument load on the encryption path. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 45a4777e5b3826cb614263b200a46d305cb95c39 Author: Ard Biesheuvel Date: Wed Sep 16 15:36:40 2020 +0300 crypto: arm/aes-neonbs - avoid hacks to prevent Thumb2 mode switches Instead of using a homegrown macrofied version of the adr instruction that sets the Thumb bit in the output value, only to ensure that any bx instructions consuming that value will not switch out of Thumb mode when branching, use non-interworking mov (to PC) instructions, which achieve the same thing. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit bbf2cb1ea1e1428589d7f4d652bed15b265ce92d Author: Nicolas Toromanoff Date: Wed Sep 16 08:33:44 2020 +0200 crypto: stm32/crc32 - Avoid lock if hardware is already used If STM32 CRC device is already in use, calculate CRC by software. This will release CPU constraint for a concurrent access to the hardware, and avoid masking irqs during the whole block processing. Fixes: 7795c0baf5ac ("crypto: stm32/crc32 - protect from concurrent accesses") Signed-off-by: Nicolas Toromanoff Signed-off-by: Herbert Xu commit c4c75fcbd8b9cc9c9fcddcb8ee68ab680d486c01 Author: Qinglang Miao Date: Wed Sep 16 14:21:21 2020 +0800 crypto: qat - remove unnecessary mutex_init() The mutex adf_ctl_lock is initialized statically. It is unnecessary to initialize by mutex_init(). Signed-off-by: Qinglang Miao Acked-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 0f5e8323777bfc1c1d2cba71242db6a361de03b6 Author: Ard Biesheuvel Date: Wed Sep 16 09:14:18 2020 +0300 crypto: arm/sha512-neon - avoid ADRL pseudo instruction The ADRL pseudo instruction is not an architectural construct, but a convenience macro that was supported by the ARM proprietary assembler and adopted by binutils GAS as well, but only when assembling in 32-bit ARM mode. Therefore, it can only be used in assembler code that is known to assemble in ARM mode only, but as it turns out, the Clang assembler does not implement ADRL at all, and so it is better to get rid of it entirely. So replace the ADRL instruction with a ADR instruction that refers to a nearer symbol, and apply the delta explicitly using an additional instruction. Signed-off-by: Ard Biesheuvel Tested-by: Nick Desaulniers Signed-off-by: Herbert Xu commit 54781938ec342cadbe2d76669ef8d3294d909974 Author: Ard Biesheuvel Date: Wed Sep 16 09:14:17 2020 +0300 crypto: arm/sha256-neon - avoid ADRL pseudo instruction The ADRL pseudo instruction is not an architectural construct, but a convenience macro that was supported by the ARM proprietary assembler and adopted by binutils GAS as well, but only when assembling in 32-bit ARM mode. Therefore, it can only be used in assembler code that is known to assemble in ARM mode only, but as it turns out, the Clang assembler does not implement ADRL at all, and so it is better to get rid of it entirely. So replace the ADRL instruction with a ADR instruction that refers to a nearer symbol, and apply the delta explicitly using an additional instruction. Signed-off-by: Ard Biesheuvel Tested-by: Nick Desaulniers Signed-off-by: Herbert Xu commit 406d454bc8746c1f629153abb2421ca280baa6e6 Author: Liu Shixin Date: Wed Sep 16 10:50:17 2020 +0800 crypto: qat - convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin Acked-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 255f6c2e74b136662a191652d688bd7566c94bf6 Author: Herbert Xu Date: Tue Sep 15 13:30:24 2020 +1000 crypto: lib/chacha20poly1305 - Set SG_MITER_ATOMIC unconditionally There is no reason for the chacha20poly1305 SG miter code to use kmap instead of kmap_atomic as the critical section doesn't sleep anyway. So we can simply get rid of the preemptible check and set SG_MITER_ATOMIC unconditionally. Even if we need to reenable preemption to lower latency we should be doing that by interrupting the SG miter walk rather than using kmap. Reported-by: Linus Torvalds Signed-off-by: Herbert Xu commit 63cdd870ab058e750b7358a979f8baccbbdcfdcc Author: Herbert Xu Date: Mon Sep 14 14:22:16 2020 +1000 crypto: inside-secure - Reuse code in safexcel_hmac_alg_setkey The code in the current implementation of safexcel_hmac_alg_setkey can be reused by safexcel_cipher. This patch does just that by renaming the previous safexcel_hmac_setkey to __safexcel_hmac_setkey. The now-shared safexcel_hmac_alg_setkey becomes safexcel_hmac_setkey and a new safexcel_hmac_alg_setkey has been added for use by ahash transforms. As a result safexcel_aead_setkey's stack frame has been reduced by about half in size, or about 512 bytes. Reported-by: kernel test robot Signed-off-by: Herbert Xu commit 78cf1c8bfcb81a21347dfa57ce71d475cea9f595 Author: Herbert Xu Date: Mon Sep 14 14:22:14 2020 +1000 crypto: inside-secure - Move ipad/opad into safexcel_context As both safexcel_ahash_ctx and safexcel_cipher_ctx contain ipad and opad buffers this patch moves them into the common struct safexcel_context. It also adds a union so that they can be accessed in the appropriate endian without crazy casts. Signed-off-by: Herbert Xu commit 18e5189535910450f6cf7a63f8f0b84153b91f66 Author: Herbert Xu Date: Mon Sep 14 14:22:11 2020 +1000 crypto: inside-secure - Move priv pointer into safexcel_context This patch moves the priv pointer into struct safexcel_context because both structs that extend safexcel_context have that pointer as well. Signed-off-by: Herbert Xu commit fb7c2f4654fee2a41703b3d51d9a97492c2838e9 Author: Liu Shixin Date: Mon Sep 14 12:17:46 2020 +0800 crypto: atmel-aes - convert to use be32_add_cpu() Convert cpu_to_be32(be32_to_cpu(E1) + E2) to use be32_add_cpu(). Signed-off-by: Liu Shixin Signed-off-by: Herbert Xu commit 228d284aac61283cde508a925d666f854b57af63 Author: Xiaoliang Pang Date: Mon Sep 14 11:00:51 2020 +0800 cypto: mediatek - fix leaks in mtk_desc_ring_alloc In the init loop, if an error occurs in function 'dma_alloc_coherent', then goto the err_cleanup section, after run i--, in the array ring, the struct mtk_ring with index i will not be released, causing memory leaks Fixes: 785e5c616c849 ("crypto: mediatek - Add crypto driver support for some MediaTek chips") Cc: Ryder Lee Signed-off-by: Xiaoliang Pang Signed-off-by: Herbert Xu commit 406346d2227854bd9a5abdf07ef3d45d0de85a3e Author: 周琰杰 (Zhou Yanjie) Date: Mon Sep 14 00:10:21 2020 +0800 hwrng: ingenic - Add hardware TRNG for Ingenic X1830 Add X1830 SoC digital true random number generator driver. Tested-by: 周正 (Zhou Zheng) Co-developed-by: 漆鹏振 (Qi Pengzhen) Signed-off-by: 漆鹏振 (Qi Pengzhen) Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Herbert Xu commit 83ef53fba0c0533256bf397919c18335db67f215 Author: 周琰杰 (Zhou Yanjie) Date: Mon Sep 14 00:10:20 2020 +0800 dt-bindings: RNG: Add Ingenic TRNG bindings. Add the TRNG bindings for the X1830 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit 08d7a73fffb6769b1cf2278bf697e692daba3abf Author: Biju Das Date: Thu Sep 24 09:05:35 2020 +0100 ARM: dts: iwg20d-q7-common: Fix touch controller probe failure As per the iWave RZ/G1M schematic, the signal LVDS_PPEN controls the supply voltage for the touch panel, LVDS receiver and RGB LCD panel. Add a regulator for these device nodes and remove the powerdown-gpios property from the lvds-receiver node as it results in a touch controller driver probe failure. Fixes: 6f89dd9e9325 ("ARM: dts: iwg20d-q7-common: Add LCD support") Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200924080535.3641-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c51a9868d361a508c5340788950ece7959009c51 Author: Christoph Hellwig Date: Tue Sep 1 13:48:33 2020 +0200 firewire-ohci: use dma_alloc_pages Use dma_alloc_pages to allocate DMAable pages instead of hoping that the architecture either has GFP_DMA32 or not more than 4G of memory. Signed-off-by: Christoph Hellwig commit e8d39a903cc680c8c1ab5e528428f182f42b8a35 Author: Christoph Hellwig Date: Tue Sep 1 14:00:56 2020 +0200 dma-iommu: implement ->alloc_noncoherent Implement the alloc_noncoherent method to provide memory that is neither coherent not contiguous. Signed-off-by: Christoph Hellwig commit de7cf917768f438aae6d2f4e9bced3739f15f5b6 Author: Christoph Hellwig Date: Tue Sep 1 13:59:45 2020 +0200 dma-mapping: add new {alloc,free}_noncoherent dma_map_ops methods This will allow IOMMU drivers to allocate non-contigous memory and return a vmapped virtual address. Signed-off-by: Christoph Hellwig commit efa70f2fdc842e63a0a13223e0e83cedcc2117f1 Author: Christoph Hellwig Date: Tue Sep 1 13:34:33 2020 +0200 dma-mapping: add a new dma_alloc_pages API This API is the equivalent of alloc_pages, except that the returned memory is guaranteed to be DMA addressable by the passed in device. The implementation will also be used to provide a more sensible replacement for DMA_ATTR_NON_CONSISTENT flag. Additionally dma_alloc_noncoherent is switched over to use dma_alloc_pages as its backend. Signed-off-by: Christoph Hellwig Acked-by: Thomas Bogendoerfer (MIPS part) commit 5a84292271402cffe0717bc58e2ad9a0c7977272 Author: Christoph Hellwig Date: Tue Sep 1 13:28:13 2020 +0200 dma-mapping: remove dma_cache_sync All users are gone now, remove the API. Signed-off-by: Christoph Hellwig Acked-by: Thomas Bogendoerfer (MIPS part) commit d69d8adc5bf045e686338918292aa417c5282852 Author: Christoph Hellwig Date: Tue Aug 18 16:38:25 2020 +0200 53c700: convert to dma_alloc_noncoherent Use the new non-coherent DMA API including proper ownership transfers. Signed-off-by: Christoph Hellwig Tested-by: Thomas Bogendoerfer commit 7f3bb7f53a404c883bc289eedaa5e3c6ff9e2b47 Author: Christoph Hellwig Date: Tue Sep 1 13:24:11 2020 +0200 sgiseeq: convert to dma_alloc_noncoherent Use the new non-coherent DMA API including proper ownership transfers. This includes adding additional calls to dma_sync_desc_dev as the old syncing was rather ad-hoc. Thanks to Thomas Bogendoerfer for debugging the ownership transfer issues. Signed-off-by: Christoph Hellwig Tested-by: Thomas Bogendoerfer commit 00718b23a4730c5b155fa6f1deba532c921470c8 Author: Christoph Hellwig Date: Tue Sep 1 13:24:11 2020 +0200 lib82596: convert to dma_alloc_noncoherent Use the new non-coherent DMA API including proper ownership transfers. This includes moving the DMA helpers to lib82596 based of an ifdef to avoid include order problems. Signed-off-by: Christoph Hellwig Tested-by: Thomas Bogendoerfer (SNI part) commit ed4bc1890b4984d0af447ad3cc1f93541623f8f3 Author: Christoph Hellwig Date: Tue Sep 1 13:26:46 2020 +0200 hal2: convert to dma_alloc_noncoherent Use the new non-coherent DMA API including proper ownership transfers. This also means we can allocate the buffer memory with the proper direction instead of bidirectional. Signed-off-by: Christoph Hellwig Tested-by: Thomas Bogendoerfer commit bd9b848557b0e6bfefa64e661196aaea82c983aa Author: Christoph Hellwig Date: Tue Sep 1 13:24:21 2020 +0200 sgiwd93: convert to dma_alloc_noncoherent Use the new non-coherent DMA API including proper ownership transfers. This also means we can allocate the memory as DMA_TO_DEVICE instead of bidirectional. Signed-off-by: Christoph Hellwig Tested-by: Thomas Bogendoerfer commit 0d71675f87dc406d4c284729b8d36be050ad0d15 Author: Christoph Hellwig Date: Tue Sep 1 13:31:30 2020 +0200 dma-mapping: add a new dma_alloc_noncoherent API Add a new API to allocate and free memory that is guaranteed to be addressable by a device, but which potentially is not cache coherent for DMA. To transfer ownership to and from the device, the existing streaming DMA API calls dma_sync_single_for_device and dma_sync_single_for_cpu must be used. For now the new calls are implemented on top of dma_alloc_attrs just like the old-noncoherent API, but once all drivers are switched to the new API it will be replaced with a better working implementation that is available on all architectures. Signed-off-by: Christoph Hellwig commit 91af2dd255ac9284ee2942a359fa8d2b49849e0b Author: Christoph Hellwig Date: Tue Aug 18 16:07:21 2020 +0200 53c700: improve non-coherent DMA handling Switch the 53c700 driver to only use non-coherent descriptor memory if it really has to because dma_alloc_coherent fails. This doesn't matter for any of the platforms it runs on currently, but that will change soon. To help with this two new helpers to transfer ownership to and from the device are added that abstract the syncing of the non-coherent memory. The two current bidirectional cases are mapped to transfers to the device, as that appears to what they are used for. Note that for parisc, which is the only architecture this driver needs to use non-coherent memory on, the direction argument of dma_cache_sync is ignored, so this will not change behavior in any way. Signed-off-by: Christoph Hellwig Tested-by: Thomas Bogendoerfer commit 48d15814dd0fc429e3205b87f1af6cc472018478 Author: Christoph Hellwig Date: Mon Aug 17 15:58:21 2020 +0200 lib82596: move DMA allocation into the callers of i82596_probe This allows us to get rid of the LIB82596_DMA_ATTR defined and prepare for untangling the coherent vs non-coherent DMA allocation API. Signed-off-by: Christoph Hellwig Tested-by: Thomas Bogendoerfer (SNI part) commit 33b16dc8b805ad5c5e04fed55c1669d115102dc1 Author: Christoph Hellwig Date: Mon Aug 17 15:32:34 2020 +0200 net/au1000-eth: stop using DMA_ATTR_NON_CONSISTENT The au1000-eth driver contains none of the manual cache synchronization required for using DMA_ATTR_NON_CONSISTENT. From what I can tell it can be used on both dma coherent and non-coherent DMA platforms, but I suspect it has been buggy on the non-coherent platforms all along. Signed-off-by: Christoph Hellwig commit e0ec8a4d6432104bf0e985ccfa475f8742c78cc6 Author: Christoph Hellwig Date: Mon Aug 17 15:30:40 2020 +0200 drm/nouveau/gk20a: stop setting DMA_ATTR_NON_CONSISTENT DMA_ATTR_NON_CONSISTENT is a no-op except on PA-RISC and a few MIPS configs, so don't set it in this ARM specific driver part. Signed-off-by: Christoph Hellwig commit 08281bd3e9b970faf6297a23cd65ff7dd7cbb8ca Author: Christoph Hellwig Date: Mon Aug 17 15:29:48 2020 +0200 drm/exynos: stop setting DMA_ATTR_NON_CONSISTENT DMA_ATTR_NON_CONSISTENT is a no-op except on PA-RISC and a few MIPS configs, so don't set it in this ARM specific driver. Signed-off-by: Christoph Hellwig commit 43ee5b6daa6c45246098493dab2c229d196c9cf6 Author: Christoph Hellwig Date: Mon Aug 17 19:17:20 2020 +0200 mm: turn alloc_pages into an inline function To prevent a compiler error when a method call alloc_pages is added (which I plan to for the dma_map_ops). Signed-off-by: Christoph Hellwig commit 8c1c6c7588b2faf9dd45fb3cfb7497fd09bbfe7c Merge: 38225f2ef2f42 171d4ff79f965 Author: Christoph Hellwig Date: Fri Sep 25 06:19:19 2020 +0200 Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into dma-mapping-for-next Pull in the latest 5.9 tree for the commit to revert the V4L2_FLAG_MEMORY_NON_CONSISTENT uapi addition. commit 38225f2ef2f4263fc65acae63fdd4e8489c9ffcf Author: Christoph Hellwig Date: Wed Sep 16 09:33:59 2020 +0200 ARM/omap1: switch to use dma_direct_set_offset for lbus DMA offsets Switch the omap1510 platform ohci device to use dma_direct_set_offset to set the DMA offset instead of using direct hooks into the DMA mapping code and remove the now unused hooks. Signed-off-by: Christoph Hellwig Tested-by: Janusz Krzysztofik Acked-by: Tony Lindgren commit eba304c6861613a649ba46cfab835b1eddeacd8e Author: Christoph Hellwig Date: Fri Sep 11 09:33:42 2020 +0200 dma-mapping: better document dma_addr_t and DMA_MAPPING_ERROR Move the comment documenting dma_addr_t away from the dma_map_ops definition which isn't very related to it, and toward DMA_MAPPING_ERROR, which is somewhat related. Add a little blurb about DMA_MAPPING_ERROR as well. Signed-off-by: Christoph Hellwig commit db4268f8c575617bacdeff862c7de674dbf65075 Author: Christoph Hellwig Date: Fri Sep 11 09:31:32 2020 +0200 dma-mapping: move valid_dma_direction to dma-direction.h Move the valid_dma_direction helper to a more suitable header, and clean it up to use the proper enum as well as removing pointless braces. Signed-off-by: Christoph Hellwig commit 7ae10eb903d6ed9b3069fe1dc175b36d86667d09 Author: Christoph Hellwig Date: Fri Sep 11 09:29:50 2020 +0200 dma-mapping: remove DMA_MASK_NONE This value is only used by a PCMCIA driver and not very useful. Signed-off-by: Christoph Hellwig Acked-by: Dominik Brodowski commit aafe8853f5e2bcbdd231411aec218b8c5dc78437 Merge: 77d0cab93909e c155e22bb689a Author: David S. Miller Date: Thu Sep 24 20:19:25 2020 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: updates for -next There are some updates for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit c155e22bb689a0e467fa375d2765d85aff52f058 Author: Guangbin Huang Date: Fri Sep 25 08:26:18 2020 +0800 net: hns3: rename macro of pci device id of vf VF devices do not have speed division, its speed is depended on its PF. So macro name of PCI device id of VF is incorrent to have 100G info, it should be renamed by removing 100G info. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit ae6f010cb1a796d2dbe285e40430293e86b3e9ae Author: Guangbin Huang Date: Fri Sep 25 08:26:17 2020 +0800 net: hns3: add support for 200G device The 200G device has a new device id 0xA228, so adds this device id to pci table, then the driver can probe it. As speed_ability queried from firmware has only 8 bits and already be used up, so firmware adds extra speed_ability_ext to indicate more speed abilities to support 200G and driver needs to parse it. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 348775ebe9114e9ceedafc5c85530c7e29cea369 Author: Yufeng Mo Date: Fri Sep 25 08:26:16 2020 +0800 net: hns3: add debugfs of dumping pf interrupt resources The pf's interrupt resources will be changed with the number of enabled pf. Dumping this resource information will be helpful for debugging. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 6cd131dd10dbb91a65ac9cbcb67a0dabce08c5e5 Author: Yufeng Mo Date: Fri Sep 25 08:26:15 2020 +0800 net: hns3: add a hardware error detect type In hns3_process_hw_error(), the hardware error detection of the ROCEE AXI RESP error type is added. When this error occurs, the client needs to be notified of this error and take corresponding operation. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 9d8d5a360b515bdc7be4beb89caa7b32fccce721 Author: Yufeng Mo Date: Fri Sep 25 08:26:14 2020 +0800 net: hns3: remove unnecessary variable initialization If a variable is assigned a value before it is used, it's no need to assign an initial value to the variable. So remove these redundant operations. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 00577c8b7fa2ddd6194a989af5f005a09103ea85 Author: Yufeng Mo Date: Fri Sep 25 08:26:13 2020 +0800 net: hns3: refactor the function for dumping tc information in debugfs Remove some unnecessary parameters of hclge_title_idx_print(), and rename this function for readability. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 77d0cab93909edf1e5740643d788ac2e458b8187 Author: Florian Westphal Date: Fri Sep 25 01:23:02 2020 +0200 net: tcp: drop unused function argument from mptcp_incoming_options Since commit cfde141ea3faa30e ("mptcp: move option parsing into mptcp_incoming_options()"), the 3rd function argument is no longer used. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit a1a35529bdf8f0d5da0f9ae10a670fb0ad7df2d3 Merge: 075c156850f69 00cfd77b9063d Author: David S. Miller Date: Thu Sep 24 19:58:34 2020 -0700 Merge branch 'mptcp-RM_ADDR-ADD_ADDR-enhancements' Geliang Tang says: ==================== mptcp: RM_ADDR/ADD_ADDR enhancements This series include two enhancements for the MPTCP path management, namely RM_ADDR support and ADD_ADDR echo support, as specified by RFC sections 3.4.1 and 3.4.2. 1 RM_ADDR support include 9 patches (1-3 and 8-13): Patch 1 is the helper for patch 2, these two patches add the RM_ADDR outgoing functions, which are derived from ADD_ADDR's corresponding functions. Patch 3 adds the RM_ADDR incoming logic, when RM_ADDR suboption is received, close the subflow matching the rm_id, and update PM counter. Patch 8 is the main remove routine. When the PM netlink removes an address, we traverse all the existing msk sockets to find the relevant sockets. Then trigger the RM_ADDR signal and remove the subflow which using this local address, this subflow removing functions has been implemented in patch 9. Finally, patches 10-13 are the self-tests for RM_ADDR. 2 ADD_ADDR echo support include 7 patches (4-7 and 14-16). Patch 4 adds the ADD_ADDR echo logic, when the ADD_ADDR suboption has been received, send out the same ADD_ADDR suboption with echo-flag, and no HMAC included. Patches 5 and 6 are the self-tests for ADD_ADDR echo. Patch 7 is a little cleaning up. Patch 14 and 15 are the helpers for patch 16. These three patches add the ADD_ADDR retransmition when no ADD_ADDR echo is received. ==================== Signed-off-by: David S. Miller commit 00cfd77b9063dcdf3628a7087faba60de85a9cc8 Author: Geliang Tang Date: Thu Sep 24 08:30:02 2020 +0800 mptcp: retransmit ADD_ADDR when timeout This patch implemented the retransmition of ADD_ADDR when no ADD_ADDR echo is received. It added a timer with the announced address. When timeout occurs, ADD_ADDR will be retransmitted. Suggested-by: Mat Martineau Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 08b81d873126b413cda511b1ea1cbb0e99938bbd Author: Geliang Tang Date: Thu Sep 24 08:30:01 2020 +0800 mptcp: add sk_stop_timer_sync helper This patch added a new helper sk_stop_timer_sync, it deactivates a timer like sk_stop_timer, but waits for the handler to finish. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 0abd40f823cbd3beb2889a100c2210b13a63585b Author: Geliang Tang Date: Thu Sep 24 08:30:00 2020 +0800 mptcp: add struct mptcp_pm_add_entry Add a new struct mptcp_pm_add_entry to describe add_addr's entry. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit dd72b0fedee1747698160cf3f839f332a4788059 Author: Geliang Tang Date: Thu Sep 24 08:29:59 2020 +0800 selftests: mptcp: add remove addr and subflow test cases This patch added the remove addr and subflow test cases and two new functions. The first function run_remove_tests calls do_transfer with two new arguments, rm_nr_ns1 and rm_nr_ns2, for the numbers of addresses should be removed during the transfer process in namespace 1 and namespace 2. If both these two arguments are 0, we do the join test cases with "mptcp_connect -j" command. Otherwise, do the remove test cases with "mptcp_connect -r" command. The second function chk_rm_nr checks the RM_ADDR related mibs's counters. The output of the test cases looks like this: 11 remove single subflow syn[ ok ] - synack[ ok ] - ack[ ok ] rm [ ok ] - sf [ ok ] 12 remove multiple subflows syn[ ok ] - synack[ ok ] - ack[ ok ] rm [ ok ] - sf [ ok ] 13 remove single address syn[ ok ] - synack[ ok ] - ack[ ok ] add[ ok ] - echo [ ok ] rm [ ok ] - sf [ ok ] 14 remove subflow and signal syn[ ok ] - synack[ ok ] - ack[ ok ] add[ ok ] - echo [ ok ] rm [ ok ] - sf [ ok ] 15 remove subflows and signal syn[ ok ] - synack[ ok ] - ack[ ok ] add[ ok ] - echo [ ok ] rm [ ok ] - sf [ ok ] Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Suggested-by: Mat Martineau Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 1315332409fe4242641c2c3e0c20cd8b59f52d85 Author: Geliang Tang Date: Thu Sep 24 08:29:58 2020 +0800 selftests: mptcp: add remove cfg in mptcp_connect This patch added a new cfg, named cfg_remove in mptcp_connect. This new cfg_remove is copied from cfg_join. The only difference between them is in the do_rnd_write function. Here we slow down the transfer process of all data to let the RM_ADDR suboption can be sent and received completely. Otherwise the remove address and subflow test cases don't work. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Suggested-by: Mat Martineau Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 5c8c1640956e59797f838fb18495e3d3fb964205 Author: Geliang Tang Date: Thu Sep 24 08:29:57 2020 +0800 mptcp: add mptcp_destroy_common helper This patch added a new helper named mptcp_destroy_common containing the shared code between mptcp_destroy() and mptcp_sock_destruct(). Suggested-by: Paolo Abeni Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 7a7e52e38a40f4f6ce8f06da601556a7669cf999 Author: Geliang Tang Date: Thu Sep 24 08:29:56 2020 +0800 mptcp: add RM_ADDR related mibs This patch added two new mibs for RM_ADDR, named MPTCP_MIB_RMADDR and MPTCP_MIB_RMSUBFLOW, when the RM_ADDR suboption is received, increase the first mib counter, when the local subflow is removed, increase the second mib counter. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Suggested-by: Mat Martineau Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 0ee4261a36817c441d26ee90ad96f9cc30d678ce Author: Geliang Tang Date: Thu Sep 24 08:29:55 2020 +0800 mptcp: implement mptcp_pm_remove_subflow This patch implemented the local subflow removing function, mptcp_pm_remove_subflow, it simply called mptcp_pm_nl_rm_subflow_received under the PM spin lock. We use mptcp_pm_remove_subflow to remove a local subflow, so change it's argument from remote_id to local_id. We check subflow->local_id in mptcp_pm_nl_rm_subflow_received to remove a subflow. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Suggested-by: Mat Martineau Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit b6c08380860b926752d57c8fa9911fa388c4b876 Author: Geliang Tang Date: Thu Sep 24 08:29:54 2020 +0800 mptcp: remove addr and subflow in PM netlink This patch implements the remove announced addr and subflow logic in PM netlink. When the PM netlink removes an address, we traverse all the existing msk sockets to find the relevant sockets. We add a new list named anno_list in mptcp_pm_data, to record all the announced addrs. In the traversing, we check if it has been recorded. If it has been, we trigger the RM_ADDR signal. We also check if this address is in conn_list. If it is, we remove the subflow which using this local address. Since we call mptcp_pm_free_anno_list in mptcp_destroy, we need to move __mptcp_init_sock before the mptcp_is_enabled check in mptcp_init_sock. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Suggested-by: Mat Martineau Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit f58f065aa10683a4e2d975c71e0238cfe2c41024 Author: Geliang Tang Date: Thu Sep 24 08:29:53 2020 +0800 mptcp: add accept_subflow re-check The re-check of pm->accept_subflow with pm->lock held was missing, this patch fixed it. Suggested-by: Mat Martineau Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: David S. Miller commit be61316003d962cece23cca867aafd8e67e48a90 Author: Geliang Tang Date: Thu Sep 24 08:29:52 2020 +0800 selftests: mptcp: add ADD_ADDR mibs check function This patch added the ADD_ADDR related mibs counter check function chk_add_nr(). This function check both ADD_ADDR and ADD_ADDR with echo flag. The output looks like this: 07 unused signal address syn[ ok ] - synack[ ok ] - ack[ ok ] add[ ok ] - echo [ ok ] 08 signal address syn[ ok ] - synack[ ok ] - ack[ ok ] add[ ok ] - echo [ ok ] 09 subflow and signal syn[ ok ] - synack[ ok ] - ack[ ok ] add[ ok ] - echo [ ok ] 10 multiple subflows and signal syn[ ok ] - synack[ ok ] - ack[ ok ] add[ ok ] - echo [ ok ] 11 remove subflow and signal syn[ ok ] - synack[ ok ] - ack[ ok ] add[ ok ] - echo [ ok ] Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: David S. Miller commit a877de06718f2cc81fa4083b8becf4dd59a296c0 Author: Geliang Tang Date: Thu Sep 24 08:29:51 2020 +0800 mptcp: add ADD_ADDR related mibs This patch added two mibs for ADD_ADDR, MPTCP_MIB_ADDADDR for receiving of the ADD_ADDR suboption with echo-flag=0, and MPTCP_MIB_ECHOADD for receiving the ADD_ADDR suboption with echo-flag=1. Reviewed-by: Mat Martineau Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: David S. Miller commit 6a6c05a8b016bb5c63750f91cdb6d669b5a4b14f Author: Geliang Tang Date: Thu Sep 24 08:29:50 2020 +0800 mptcp: send out ADD_ADDR with echo flag When the ADD_ADDR suboption has been received, we need to send out the same ADD_ADDR suboption with echo-flag=1, and no HMAC. Suggested-by: Mat Martineau Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: David S. Miller commit d0876b2284cf8b34dd214b2d0aa21071c345da59 Author: Geliang Tang Date: Thu Sep 24 08:29:49 2020 +0800 mptcp: add the incoming RM_ADDR support This patch added the RM_ADDR option parsing logic: We parsed the incoming options to find if the rm_addr option is received, and called mptcp_pm_rm_addr_received to schedule PM work to a new status, named MPTCP_PM_RM_ADDR_RECEIVED. PM work got this status, and called mptcp_pm_nl_rm_addr_received to handle it. In mptcp_pm_nl_rm_addr_received, we closed the subflow matching the rm_id, and updated PM counter. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Suggested-by: Mat Martineau Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 5cb104ae55e9dbffe4552cd77ded37ec8b0518cd Author: Geliang Tang Date: Thu Sep 24 08:29:48 2020 +0800 mptcp: add the outgoing RM_ADDR support This patch added a new signal named rm_addr_signal in PM. On outgoing path, we called mptcp_pm_should_rm_signal to check if rm_addr_signal has been set. If it has been, we sent out the RM_ADDR option. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit f643b8032ee31848a5fe619a8f2d2776f8a42902 Author: Geliang Tang Date: Thu Sep 24 08:29:47 2020 +0800 mptcp: rename addr_signal and the related functions This patch renamed addr_signal and the related functions with the explicit word "add". Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 075c156850f6915ff5d040917043c08d679f4539 Merge: 54ce00ae361a1 987cd5f049a2b Author: David S. Miller Date: Thu Sep 24 19:54:40 2020 -0700 Merge tag 'mlx5-updates-2020-09-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-09-22 This series includes mlx5 updates 1) Add support for Connection Tracking offload in NIC mode. Supporting CT offload in NIC mode on Mellanox cards is useful for scenarios where the dual port NIC serves as a gateway between 2 networks and forwards traffic between these networks. Since the traffic is not terminated on the host in this case, no use of SRIOV VFs and/or switchdev mode is required. Today Mellanox NIC cards already support offloading of packet forwarding between physical ports without going to the host so combining it with CT offloading allows users to create a gateway with forwarding and CT (Including NAT) offloading capabilities in non-switchdev mode. To support connection tracking in non-Switchdev mode (Single NIC mode), we need to make use of the current Connection tracking infrastructure implemented on top of E-Switch and the mlx5 generic flow table chains APIs, to make it work on non-Eswitch steering domain e.g. NIC RX domain, the following was performed: 1.1) Refactor current flow steering chains infrastructure and updates TC nic mode implementation to use flow table chains. 1.2) Refactor current Connection Tracking (CT) infrastructure to not assume E-switch backend, and make the CT layer agnostic to underlying steering mode (E-Switch/NIC) 1.3) Plumbing to support CT offload in NIC mode. 2) Trivial code cleanups. ==================== Signed-off-by: David S. Miller commit 54ce00ae361a12a3e4801c937a1b19d52f8c2181 Merge: e2f9a8fe73d3a 94ae899b20961 Author: David S. Miller Date: Thu Sep 24 19:49:36 2020 -0700 Merge branch 'dpaa2-mac-add-PCS-support-through-the-Lynx-module' Ioana Ciornei says: ==================== dpaa2-mac: add PCS support through the Lynx module This patch set aims to add PCS support in the dpaa2-eth driver by leveraging the Lynx PCS module. The first two patches are some missing pieces: the first one adding support for 10GBASER in Lynx PCS while the second one adds a new function - of_mdio_find_device - which is helpful in retrieving the PCS represented as a mdio_device. The final patch adds the glue logic between phylink and the Lynx PCS module: it retrieves the PCS represented as an mdio_device and registers it to Lynx and phylink. From that point on, any PCS callbacks are treated by Lynx, without dpaa2-eth interaction. Changes in v2: - move put_device() after destroy - 3/3 ==================== Signed-off-by: David S. Miller commit 94ae899b20961a248693db6b284de9cf4c8cb7c3 Author: Ioana Ciornei Date: Wed Sep 23 18:41:23 2020 +0300 dpaa2-mac: add PCS support through the Lynx module Include PCS support in the dpaa2-eth driver by integrating it with the new Lynx PCS module. There is not much to talk about in terms of changes needed in the dpaa2-eth driver since the only steps necessary are to find the MDIO device representing the PCS, register it to the Lynx PCS module and then let phylink know if its existence also. After this, the PCS callbacks will be treated directly by Lynx, without interraction from dpaa2-eth's part. Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit b5b6775d72e8662b5ea7f892bf06db4831e2c1aa Author: Russell King Date: Wed Sep 23 18:41:22 2020 +0300 of: add of_mdio_find_device() api Add a helper function which finds the mdio_device structure given a device tree node. This is helpful for finding the PCS device based on a DTS node but managing it as a mdio_device instead of a phy_device. Signed-off-by: Russell King Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e7e95c900338904536f7f7af98d467118909e5eb Author: Ioana Ciornei Date: Wed Sep 23 18:41:21 2020 +0300 net: pcs-lynx: add support for 10GBASER Add support in the Lynx PCS module for the 10GBASE-R mode which is only used to get the link state, since it offers a single fixed speed. Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e2f9a8fe73d3a29edfdb4215e7596c95b6db362d Author: Vladimir Oltean Date: Wed Sep 23 14:24:20 2020 +0300 net: mscc: ocelot: always pass skb clone to ocelot_port_add_txtstamp_skb Currently, ocelot switchdev passes the skb directly to the function that enqueues it to the list of skb's awaiting a TX timestamp. Whereas the felix DSA driver first clones the skb, then passes the clone to this queue. This matters because in the case of felix, the common IRQ handler, which is ocelot_get_txtstamp(), currently clones the clone, and frees the original clone. This is useless and can be simplified by using skb_complete_tx_timestamp() instead of skb_tstamp_tx(). Signed-off-by: Vladimir Oltean Acked-by: Richard Cochran Signed-off-by: David S. Miller commit d3ee2d8415a6256c1c41e1be36e80e640c3e6359 Author: Xiao Ni Date: Wed Sep 2 20:00:23 2020 +0800 md/raid10: improve discard request for far layout For far layout, the discard region is not continuous on disks. So it needs far copies r10bio to cover all regions. It needs a way to know all r10bios have finish or not. Similar with raid10_sync_request, only the first r10bio master_bio records the discard bio. Other r10bios master_bio record the first r10bio. The first r10bio can finish after other r10bios finish and then return the discard bio. Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit bcc90d280465ebd51ab8688be86e1f00c62dccf9 Author: Xiao Ni Date: Wed Sep 2 20:00:22 2020 +0800 md/raid10: improve raid10 discard request Now the discard request is split by chunk size. So it takes a long time to finish mkfs on disks which support discard function. This patch improve handling raid10 discard request. It uses the similar way with patch 29efc390b (md/md0: optimize raid0 discard handling). But it's a little complex than raid0. Because raid10 has different layout. If raid10 is offset layout and the discard request is smaller than stripe size. There are some holes when we submit discard bio to underlayer disks. For example: five disks (disk1 - disk5) D01 D02 D03 D04 D05 D05 D01 D02 D03 D04 D06 D07 D08 D09 D10 D10 D06 D07 D08 D09 The discard bio just wants to discard from D03 to D10. For disk3, there is a hole between D03 and D08. For disk4, there is a hole between D04 and D09. D03 is a chunk, raid10_write_request can handle one chunk perfectly. So the part that is not aligned with stripe size is still handled by raid10_write_request. If reshape is running when discard bio comes and the discard bio spans the reshape position, raid10_write_request is responsible to handle this discard bio. I did a test with this patch set. Without patch: time mkfs.xfs /dev/md0 real4m39.775s user0m0.000s sys0m0.298s With patch: time mkfs.xfs /dev/md0 real0m0.105s user0m0.000s sys0m0.007s nvme3n1 259:1 0 477G 0 disk └─nvme3n1p1 259:10 0 50G 0 part nvme4n1 259:2 0 477G 0 disk └─nvme4n1p1 259:11 0 50G 0 part nvme5n1 259:6 0 477G 0 disk └─nvme5n1p1 259:12 0 50G 0 part nvme2n1 259:9 0 477G 0 disk └─nvme2n1p1 259:15 0 50G 0 part nvme0n1 259:13 0 477G 0 disk └─nvme0n1p1 259:14 0 50G 0 part Reviewed-by: Coly Li Reviewed-by: Guoqing Jiang Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit f046f5d0d79cdb968f219ce249e497fd1accf484 Author: Xiao Ni Date: Tue Aug 25 13:43:01 2020 +0800 md/raid10: pull codes that wait for blocked dev into one function The following patch will reuse these logics, so pull the same codes into one function. Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit 8650a889017cb1f6ea6813ccf83a2e9f6fa49dd3 Author: Xiao Ni Date: Tue Aug 25 13:43:00 2020 +0800 md/raid10: extend r10bio devs to raid disks Now it allocs r10bio->devs[conf->copies]. Discard bio needs to submit to all member disks and it needs to use r10bio. So extend to r10bio->devs[geo.raid_disks]. Reviewed-by: Coly Li Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit 2628089b74d5a64bd0bcb5d247a18f78d7b6f4d0 Author: Xiao Ni Date: Tue Aug 25 13:42:59 2020 +0800 md: add md_submit_discard_bio() for submitting discard bio Move these logic from raid0.c to md.c, so that we can also use it in raid10.c. Reviewed-by: Coly Li Reviewed-by: Guoqing Jiang Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit e287308b8388590ad70e8e88d1cc70a4643bacd7 Author: Zhen Lei Date: Fri Aug 21 09:29:18 2020 +0800 md: Simplify code with existing definition RESYNC_SECTORS in raid10.c #define RESYNC_SECTORS (RESYNC_BLOCK_SIZE >> 9) "RESYNC_BLOCK_SIZE/512" is equal to "RESYNC_BLOCK_SIZE >> 9", replace it with RESYNC_SECTORS. Signed-off-by: Zhen Lei Signed-off-by: Song Liu commit 389125844352c784abf8c186589343466d03cd6a Author: Yufen Yu Date: Thu Aug 20 09:22:14 2020 -0400 md/raid5: reallocate page array after setting new stripe_size When try to resize stripe_size, we also need to free old shared page array and allocate new. Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit f16acaf328c5615fdaea74f9bd0b4019544532d6 Author: Yufen Yu Date: Thu Aug 20 09:22:13 2020 -0400 md/raid5: resize stripe_head when reshape array When reshape array, we try to reuse shared pages of old stripe_head, and allocate more for the new one if needed. Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit 046169f048cdea84fd327469239e2dfa317981b5 Author: Yufen Yu Date: Thu Aug 20 09:22:12 2020 -0400 md/raid5: let multiple devices of stripe_head share page In current implementation, grow_buffers() uses alloc_page() to allocate the buffers for each stripe_head, i.e. allocate a page for each dev[i] in stripe_head. After setting stripe_size as a configurable value by writing sysfs entry, it means that we always allocate 64K buffers, but just use 4K of them when stripe_size is 4K in 64KB arm64. To avoid wasting memory, we try to let multiple sh->dev share one real page. That means, multiple sh->dev[i].page will point to the only page with different offset. Example of 64K PAGE_SIZE and 4K stripe_size as following: 64K PAGE_SIZE +---+---+---+---+------------------------------+ | | | | | | | | | | +-+-+-+-+-+-+-+-+------------------------------+ ^ ^ ^ ^ | | | +----------------------------+ | | | | | | +-------------------+ | | | | | | +----------+ | | | | | | +-+ | | | | | | | +-----+-----+------+-----+------+-----+------+------+ sh | offset(0) | offset(4K) | offset(8K) | offset(12K) | + +-----------+------------+------------+-------------+ +----> dev[0].page dev[1].page dev[2].page dev[3].page A new 'pages' array will be added into stripe_head to record shared page used by this stripe_head. Allocate them when grow_buffers() and free them when shrink_buffers(). After trying to share page, the users of sh->dev[i].page need to take care of the related page offset: page of issued bio and page passed to xor compution functions. But thanks for previous different page offset supported. Here, we just need to set correct dev[i].offset. Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit 4f86ff5580fa692f850f37f948c73814a24a722b Author: Yufen Yu Date: Thu Aug 20 09:22:11 2020 -0400 md/raid6: let async recovery function support different page offset For now, asynchronous raid6 recovery calculate functions are require common offset for pages. But, we expect them to support different page offset after introducing stripe shared page. Do that by simplily adding page offset where each page address are referred. Then, replace the old interface with the new ones in raid6 and raid6test. Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit d69454bc9fdfb63e84152e0533454079ea3e38a3 Author: Yufen Yu Date: Thu Aug 20 09:22:10 2020 -0400 md/raid6: let syndrome computor support different page offset For now, syndrome compute functions require common offset in the pages array. However, we expect them to support different offset when try to use shared page in the following. Simplily covert them by adding page offset where each page address are referred. Since the only caller of async_gen_syndrome() and async_syndrome_val() are in raid6, we don't want to reserve the old interface but modify the interface directly. After that, replacing old interfaces with new ones for raid6 and raid6test. Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit a7c224a820c36192888ad0beb11c2e612264f533 Author: Yufen Yu Date: Thu Aug 20 09:22:09 2020 -0400 md/raid5: convert to new xor compution interface We try to replace async_xor() and async_xor_val() with the new introduced interface async_xor_offs() and async_xor_val_offs() for raid456. Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit 29bcff787a2593b2126cfaff612c0b4e560022e9 Author: Yufen Yu Date: Thu Aug 20 09:22:08 2020 -0400 md/raid5: add new xor function to support different page offset raid5 will call async_xor() and async_xor_val() to compute xor. For now, both of them require the common src/dst page offset. But, we want them to support different src/dst page offset for following shared page. Here, adding two new function async_xor_offs() and async_xor_val_offs() respectively for async_xor() and async_xor_val(). Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit 248728dd04f5804ed1ff13bb4db9795899d25dca Author: Yufen Yu Date: Thu Aug 20 09:22:07 2020 -0400 md/raid5: make async_copy_data() to support different page offset ops_run_biofill() and ops_run_biodrain() will call async_copy_data() to copy sh->dev[i].page from or to bio page. For now, it implies the offset of dev[i].page is 0. But we want to support different page offset in the following. Thus, pass page offset to these functions and replace 'page_offset' with 'page_offset + poff'. No functional change. Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit 7aba13b7152979450270da5602f16f6f28fd35b8 Author: Yufen Yu Date: Thu Aug 20 09:22:06 2020 -0400 md/raid5: add a new member of offset into r5dev Add a new member of offset into struct r5dev. It indicates the offset of related dev[i].page. For now, since each device have a privated page, the value is always 0. Thus, we set offset as 0 when allcate page in grow_buffers() and resize_stripes(). To support following different page offset, we try to use the page offset rather than '0' directly for async_memcpy() and ops_run_io(). We try to support different page offset for xor compution functions in the following. To avoid repeatly allocate a new array each time, we add a memory region into scribble buffer to record offset. No functional change. Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit 313b825fa218bef78419d7b4092c1f4af222335d Author: Xianting Tian Date: Tue Aug 18 13:42:06 2020 +0800 md: only calculate blocksize once and use i_blocksize() We alreday has the interface i_blocksize(), which can be used to get blocksize, so use it. Only calculate blocksize once and use it within read_page(). Signed-off-by: Xianting Tian Signed-off-by: Song Liu commit b952caf2d5ca898cc10d63be7722ae7a5daca696 Author: Qianli Zhao Date: Thu Aug 13 23:03:14 2020 +0800 timers: Mask invalid flags in do_init_timer() do_init_timer() accepts any combination of timer flags handed in by the caller without a sanity check, but only TIMER_DEFFERABLE, TIMER_PINNED and TIMER_IRQSAFE are valid. If the supplied flags have other bits set, this could result in malfunction. If bits are set in TIMER_CPUMASK the first timer usage could deference a cpu base which is outside the range of possible CPUs. If TIMER_MIGRATION is set, then the switch_timer_base() will live lock. Prevent that with a sanity check which warns when invalid flags are supplied and masks them out. [ tglx: Made it WARN_ON_ONCE() and added context to the changelog ] Signed-off-by: Qianli Zhao Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/9d79a8aa4eb56713af7379f99f062dedabcde140.1597326756.git.zhaoqianli@xiaomi.com commit f9e62f318fd706a54b7ce9b28e5c7e49bbde8788 Author: Stephen Boyd Date: Fri Aug 14 17:40:27 2020 -0700 treewide: Make all debug_obj_descriptors const This should make it harder for the kernel to corrupt the debug object descriptor, used to call functions to fixup state and track debug objects, by moving the structure to read-only memory. Signed-off-by: Stephen Boyd Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200815004027.2046113-3-swboyd@chromium.org commit aedcade6f4fa9a1e65f327fc42de3fb47660646c Author: Stephen Boyd Date: Fri Aug 14 17:40:26 2020 -0700 debugobjects: Allow debug_obj_descr to be const The debugobject core could be slightly harder to corrupt if the debug_obj_descr would be a pointer to const memory. Depending on the architecture, const data structures are placed into read-only memory and thus are harder to corrupt or hijack. This descriptor is used to fix up stuff like timers and workqueues when core kernel data structures are busted, so moving the descriptors to read-only memory will make debugobjects more resilient to something going wrong and then corrupting the function pointers inside struct debug_obj_descr. Signed-off-by: Stephen Boyd Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200815004027.2046113-2-swboyd@chromium.org commit 0905053bdb5b7ba77ad0c2e5cfc4787c1db3d4f1 Author: John Garry Date: Wed Aug 19 23:20:29 2020 +0800 null_blk: Support shared tag bitmap Support a shared tag bitmap, whereby request tags are unique over all submission queues, and not just per submission queue. As such, per device total queue depth is normally hw_queue_depth * submit_queues, but hw_queue_depth when set. And a similar story for when shared_tags is set, where that is the queue depth over all null blk devices. Signed-off-by: John Garry Tested-by: Douglas Gilbert Signed-off-by: Jens Axboe commit ac8f7a0264404c3e982ccabdc173d46d89ee7ea1 Merge: 805c6d3c19210 f56753ac2a908 Author: Jens Axboe Date: Thu Sep 24 13:44:39 2020 -0600 Merge branch 'for-5.10/block' into for-5.10/drivers * for-5.10/block: (140 commits) bdi: replace BDI_CAP_NO_{WRITEBACK,ACCT_DIRTY} with a single flag bdi: invert BDI_CAP_NO_ACCT_WB bdi: replace BDI_CAP_STABLE_WRITES with a queue and a sb flag mm: use SWP_SYNCHRONOUS_IO more intelligently bdi: remove BDI_CAP_SYNCHRONOUS_IO bdi: remove BDI_CAP_CGROUP_WRITEBACK block: lift setting the readahead size into the block layer md: update the optimal I/O size on reshape bdi: initialize ->ra_pages and ->io_pages in bdi_init aoe: set an optimal I/O size bcache: inherit the optimal I/O size drbd: remove dead code in device_to_statistics fs: remove the unused SB_I_MULTIROOT flag block: mark blkdev_get static PM: mm: cleanup swsusp_swap_check mm: split swap_type_of PM: rewrite is_hibernate_resume_dev to not require an inode mm: cleanup claim_swapfile ocfs2: cleanup o2hb_region_dev_store dasd: cleanup dasd_scan_partitions ... commit f56753ac2a90810726334df04d735e9f8f5a32d9 Author: Christoph Hellwig Date: Thu Sep 24 08:51:40 2020 +0200 bdi: replace BDI_CAP_NO_{WRITEBACK,ACCT_DIRTY} with a single flag Replace the two negative flags that are always used together with a single positive flag that indicates the writeback capability instead of two related non-capabilities. Also remove the pointless wrappers to just check the flag. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 823423ef55f4d9c470b1edc9c5b5c93d06abfaae Author: Christoph Hellwig Date: Thu Sep 24 08:51:39 2020 +0200 bdi: invert BDI_CAP_NO_ACCT_WB Replace BDI_CAP_NO_ACCT_WB with a positive BDI_CAP_WRITEBACK_ACCT to make the checks more obvious. Also remove the pointless bdi_cap_account_writeback wrapper that just obsfucates the check. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 1cb039f3dc1619eb795c54aad0a98fdb379b4237 Author: Christoph Hellwig Date: Thu Sep 24 08:51:38 2020 +0200 bdi: replace BDI_CAP_STABLE_WRITES with a queue and a sb flag The BDI_CAP_STABLE_WRITES is one of the few bits of information in the backing_dev_info shared between the block drivers and the writeback code. To help untangling the dependency replace it with a queue flag and a superblock flag derived from it. This also helps with the case of e.g. a file system requiring stable writes due to its own checksumming, but not forcing it on other users of the block device like the swap code. One downside is that we an't support the stable_pages_required bdi attribute in sysfs anymore. It is replaced with a queue attribute which also is writable for easier testing. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 5115db10a8e0a525edf8a65b2ed4eac5c8253095 Author: Christoph Hellwig Date: Thu Sep 24 08:51:37 2020 +0200 mm: use SWP_SYNCHRONOUS_IO more intelligently There is no point in trying to call bdev_read_page if SWP_SYNCHRONOUS_IO is not set, as the device won't support it. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit a8b456d01cd6b37191f14248f3e2bdbe5ce3a89e Author: Christoph Hellwig Date: Thu Sep 24 08:51:36 2020 +0200 bdi: remove BDI_CAP_SYNCHRONOUS_IO BDI_CAP_SYNCHRONOUS_IO is only checked in the swap code, and used to decided if ->rw_page can be used on a block device. Just check up for the method instead. The only complication is that zram needs a second set of block_device_operations as it can switch between modes that actually support ->rw_page and those who don't. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit ed7b6b4f6e915cb0bc52d0000bcc63168867b6ac Author: Christoph Hellwig Date: Thu Sep 24 08:51:35 2020 +0200 bdi: remove BDI_CAP_CGROUP_WRITEBACK Just checking SB_I_CGROUPWB for cgroup writeback support is enough. Either the file system allocates its own bdi (e.g. btrfs), in which case it is known to support cgroup writeback, or the bdi comes from the block layer, which always supports cgroup writeback. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit c2e4cd57cfa1f627b786c764d185fff85fd12be9 Author: Christoph Hellwig Date: Thu Sep 24 08:51:34 2020 +0200 block: lift setting the readahead size into the block layer Drivers shouldn't really mess with the readahead size, as that is a VM concept. Instead set it based on the optimal I/O size by lifting the algorithm from the md driver when registering the disk. Also set bdi->io_pages there as well by applying the same scheme based on max_sectors. To ensure the limits work well for stacking drivers a new helper is added to update the readahead limits from the block limits, which is also called from disk_stack_limits. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Jan Kara Reviewed-by: Mike Snitzer Reviewed-by: Martin K. Petersen Acked-by: Coly Li Signed-off-by: Jens Axboe commit 16ef510139315a2147ee7525796f8dbd4e4b7864 Author: Christoph Hellwig Date: Thu Sep 24 08:51:33 2020 +0200 md: update the optimal I/O size on reshape The raid5 and raid10 drivers currently update the read-ahead size, but not the optimal I/O size on reshape. To prepare for deriving the read-ahead size from the optimal I/O size make sure it is updated as well. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Acked-by: Song Liu Signed-off-by: Jens Axboe commit 55b2598e84e97efc5d952958cb5e34236c43276b Author: Christoph Hellwig Date: Thu Sep 24 08:51:32 2020 +0200 bdi: initialize ->ra_pages and ->io_pages in bdi_init Set up a readahead size by default, as very few users have a good reason to change it. This means code, ecryptfs, and orangefs now set up the values while they were previously missing it, while ubifs, mtd and vboxsf manually set it to 0 to avoid readahead. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Acked-by: David Sterba [btrfs] Acked-by: Richard Weinberger [ubifs, mtd] Signed-off-by: Jens Axboe commit 9e82d35b95e55aa50d264caee64a17840e3981b7 Author: Christoph Hellwig Date: Thu Sep 24 08:51:31 2020 +0200 aoe: set an optimal I/O size aoe forces a larger readahead size, but any reason to do larger I/O is not limited to readahead. Also set the optimal I/O size, and remove the local constants in favor of just using SZ_2G. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 5d4ce78b254cde8aaeb829420c3f15d3606ad411 Author: Christoph Hellwig Date: Thu Sep 24 08:51:30 2020 +0200 bcache: inherit the optimal I/O size Inherit the optimal I/O size setting just like the readahead window, as any reason to do larger I/O does not apply to just readahead. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Martin K. Petersen Acked-by: Coly Li Signed-off-by: Jens Axboe commit b807a2c5e0e2e81c96160682977c6f497cfcee96 Author: Christoph Hellwig Date: Thu Sep 24 08:51:29 2020 +0200 drbd: remove dead code in device_to_statistics Ever since the switch to blk-mq, a lower device not used for VM writeback will not be marked congested, so the check will never trigger. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 402dd2cf46b177be5bcb138b7d7fd8f38aa130e4 Author: Christoph Hellwig Date: Thu Sep 24 08:51:28 2020 +0200 fs: remove the unused SB_I_MULTIROOT flag The last user of SB_I_MULTIROOT is disappeared with commit f2aedb713c28 ("NFS: Add fs_context support.") Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 30b707886aeb89eee4e6b4e0c1aba9fb50e30a5f Author: Weihang Li Date: Thu Sep 10 21:21:09 2020 +0800 RDMA/hns: Support inline data in extented sge space for RC HIP08 supports RC inline up to size of 32 Bytes, and all data should be put into SQWQE. For HIP09, this capability is extended to 1024 Bytes, if length of data is longer than 32 Bytes, they will be filled into extended sge space. Link: https://lore.kernel.org/r/1599744069-9968-1-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 502f389a0fd2d987ea7405cb57c02817328b6f7a Author: Kai Vehmanen Date: Thu Sep 24 19:10:27 2020 +0300 ALSA: hda - remove kerneldoc for internal hdac_i915 function Drop the kerneldoc markup for connectivity_check() as it's an static helper function. Fixes the following make W=1 warning: sound/hda/hdac_i915.c:80: warning: Function parameter or member 'i915' not described in 'connectivity_check' sound/hda/hdac_i915.c:80: warning: Function parameter or member 'hdac' not described in 'connectivity_check' Fixes: 7b882fe3e3e8 ('ALSA: hda - handle multiple i915 device instances') Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200924161027.3402260-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 05df49279f8926178ecb3ce88e61b63104cd6293 Author: Weihang Li Date: Sat Sep 19 18:03:22 2020 +0800 RDMA/hns: Fix missing sq_sig_type when querying QP The sq_sig_type field should be filled when querying QP, or the users may get a wrong value. Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/1600509802-44382-9-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit fbed9d2be292504e04caa2057e3a9477a1e1d040 Author: Weihang Li Date: Sat Sep 19 18:03:21 2020 +0800 RDMA/hns: Fix configuration of ack_req_freq in QPC The hardware will add AckReq flag in BTH header according to the value of ack_req_freq to request ACK from responder for the packets with this flag. It should be greater than or equal to lp_pktn_ini instead of using a fixed value. Fixes: 7b9bd73ed13d ("RDMA/hns: Fix wrong assignment of lp_pktn_ini in QPC") Link: https://lore.kernel.org/r/1600509802-44382-8-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 99fcf82521d91468ee6115a3c253aa032dc63cbc Author: Wenpeng Liang Date: Sat Sep 19 18:03:20 2020 +0800 RDMA/hns: Fix the wrong value of rnr_retry when querying qp The rnr_retry returned to the user is not correct, it should be got from another fields in QPC. Fixes: bfe860351e31 ("RDMA/hns: Fix cast from or to restricted __le32 for driver") Link: https://lore.kernel.org/r/1600509802-44382-7-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 768202a0825d447de785e87ff1ea1d3c86a71727 Author: Jiaran Zhang Date: Sat Sep 19 18:03:19 2020 +0800 RDMA/hns: Solve the overflow of the calc_pg_sz() calc_pg_sz() may gets a data calculation overflow if the PAGE_SIZE is 64 KB and hop_num is 2. It is because that all variables involved in calculation are defined in type of int. So change the type of bt_chunk_size, buf_chunk_size and obj_per_chunk_default to u64. Fixes: ba6bb7e97421 ("RDMA/hns: Add interfaces to get pf capabilities from firmware") Link: https://lore.kernel.org/r/1600509802-44382-6-git-send-email-liweihang@huawei.com Signed-off-by: Jiaran Zhang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 172505cfa3a8ee98acaa569fd3be97697b333958 Author: Jiaran Zhang Date: Sat Sep 19 18:03:18 2020 +0800 RDMA/hns: Add check for the validity of sl configuration According to the RoCE v1 specification, the sl (service level) 0-7 are mapped directly to priorities 0-7 respectively, sl 8-15 are reserved. The driver should verify whether the the value of sl is larger than 7, if so, an exception should be returned. Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/1600509802-44382-5-git-send-email-liweihang@huawei.com Signed-off-by: Jiaran Zhang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit c19893fd9c606ffdf827a6feb0e4dbd35eae99ab Author: Lang Cheng Date: Sat Sep 19 18:03:17 2020 +0800 RDMA/hns: Correct typo of hns_roce_create_cq() Change "initialze" to "initialize". Fixes: 8f3e9f3ea087 ("IB/hns: Add code for refreshing CQ CI using TPTR") Link: https://lore.kernel.org/r/1600509802-44382-4-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 221109e64316e089b79e604adaec9057e0c4785a Author: Yangyang Li Date: Sat Sep 19 18:03:16 2020 +0800 RDMA/hns: Add interception for resizing SRQs HIP08 doesn't support modifying the maximum number of outstanding WR in an SRQ. However, the driver does not return a failure message, and users may mistakenly think that the resizing is executed successfully. So the driver needs to intercept this operation. Fixes: ffb1308b88b6 ("RDMA/hns: Move SRQ code to the reasonable place") Link: https://lore.kernel.org/r/1600509802-44382-3-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 12542f1de179e5adf0701f63dff3506e5072c209 Author: Weihang Li Date: Sat Sep 19 18:03:15 2020 +0800 RDMA/hns: Refactor process about opcode in post_send() According to the IB specifications, the verbs should return an immediate error when the users set an unsupported opcode. Furthermore, refactor codes about opcode in process of post_send to make the difference between opcodes clearer. Link: https://lore.kernel.org/r/1600509802-44382-2-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 3cb2c996c9dcc18bd0a6d6a9b4b5adb956e234a0 Author: Yangyang Li Date: Wed Sep 16 16:43:26 2020 +0800 RDMA/hns: Add support for SCCC in size of 64 Bytes For HIP09, size of SCCC (Soft Congestion Control Context) is increased to 64 Bytes from 32 Bytes. The hardware will get the configuration of SCCC from driver instead of using a fixed value. Link: https://lore.kernel.org/r/1600245806-56321-5-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 98912ee82a0c22501ec1031b1885b6c510fa5aca Author: Wenpeng Liang Date: Wed Sep 16 16:43:25 2020 +0800 RDMA/hns: Add support for QPC in size of 512 Bytes The new version of RoCEE supports using QPC in size of 256B or 512B, so that HIP09 can supports new congestion control algorithms by using QPC in larger size. Link: https://lore.kernel.org/r/1600245806-56321-4-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 09a5f210f67eea4a2176820c3bc398747a564705 Author: Wenpeng Liang Date: Wed Sep 16 16:43:24 2020 +0800 RDMA/hns: Add support for CQE in size of 64 Bytes The new version of RoCEE supports using CQE in size of 32B or 64B. The performance of bus can be improved by using larger size of CQE. Link: https://lore.kernel.org/r/1600245806-56321-3-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 247fc16d734d9b9e6e4e952db39515231867bda5 Author: Wenpeng Liang Date: Wed Sep 16 16:43:23 2020 +0800 RDMA/hns: Add support for EQE in size of 64 Bytes The new version of RoCEE supports using CEQE in size of 4B or 64B, AEQE in size of 16B or 64B. The performance of bus can be improved by using larger size of EQE. Link: https://lore.kernel.org/r/1600245806-56321-2-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 548b8b5168c90c42e88f70fcf041b4ce0b8e7aa8 Author: Rasmus Villemoes Date: Thu Sep 17 08:56:11 2020 +0200 scripts/setlocalversion: make git describe output more reliable When building for an embedded target using Yocto, we're sometimes observing that the version string that gets built into vmlinux (and thus what uname -a reports) differs from the path under /lib/modules/ where modules get installed in the rootfs, but only in the length of the -gabc123def suffix. Hence modprobe always fails. The problem is that Yocto has the concept of "sstate" (shared state), which allows different developers/buildbots/etc. to share build artifacts, based on a hash of all the metadata that went into building that artifact - and that metadata includes all dependencies (e.g. the compiler used etc.). That normally works quite well; usually a clean build (without using any sstate cache) done by one developer ends up being binary identical to a build done on another host. However, one thing that can cause two developers to end up with different builds [and thus make one's vmlinux package incompatible with the other's kernel-dev package], which is not captured by the metadata hashing, is this `git describe`: The output of that can be affected by (1) git version: before 2.11 git defaulted to a minimum of 7, since 2.11 (git.git commit e6c587) the default is dynamic based on the number of objects in the repo (2) hence even if both run the same git version, the output can differ based on how many remotes are being tracked (or just lots of local development branches or plain old garbage) (3) and of course somebody could have a core.abbrev config setting in ~/.gitconfig So in order to avoid `uname -a` output relying on such random details of the build environment which are rather hard to ensure are consistent between developers and buildbots, make sure the abbreviated sha1 always consists of exactly 12 hex characters. That is consistent with the current rule for -stable patches, and is almost always enough to identify the head commit unambigously - in the few cases where it does not, the v5.4.3-00021- prefix would certainly nail it down. Signed-off-by: Rasmus Villemoes Signed-off-by: Masahiro Yamada commit e0bc9cf0a7d527ff140f851f6f1a815cc5c48fea Author: Mauro Carvalho Chehab Date: Wed Sep 9 07:14:33 2020 +0200 docs: trace: ring-buffer-design.rst: use the new SPDX tag SPDX v3.10 gained support for GFDL-1.2 with no invariant sections: https://spdx.org/licenses/GFDL-1.2-no-invariants-only.html Let's use it, instead of keeping a license text for this file. Signed-off-by: Mauro Carvalho Chehab Acked-by: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/dbc9bd9ab30c6862e465343239e82102cbdc0f39.1599628249.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 307e3ee934655a1463fe1f40dc8df339f355980e Author: Randy Dunlap Date: Tue Sep 15 19:49:02 2020 -0700 Documentation: kernel-parameters: clarify "module." parameters The command-line parameters "dyndbg" and "async_probe" are not parameters for kernel/module.c but instead they are for the module that is being loaded. Try to make that distinction in the help text. OTOH, "module.sig_enforce" is handled as a parameter of kernel/module.c so "module." is correct for it. Signed-off-by: Randy Dunlap Cc: Andrew Morton Cc: Jessica Yu Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/67d40b6d-c073-a3bf-cbb6-6cad941cceeb@infradead.org Signed-off-by: Jonathan Corbet commit dd19d2938f503671f37bef25ee8c3b5e64e44a70 Author: Stephen Kitt Date: Wed Aug 12 11:22:30 2020 +0200 Fix references to nommu-mmap.rst nommu-mmap.rst was moved to Documentation/admin-guide/mm; this patch updates the remaining stale references to Documentation/mm. Fixes: 800c02f5d030 ("docs: move nommu-mmap.txt to admin-guide and rename to ReST") Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200812092230.27541-1-steve@sk2.org Signed-off-by: Jonathan Corbet commit 1013d4d910c6bc02a2731abdce7166469d56b667 Author: Stephen Kitt Date: Thu Sep 17 09:21:23 2020 +0200 docs: rewrite admin-guide/sysctl/abi.rst Following the structure used in sysctl/kernel.rst, this updates abi.rst to use ReStructured Text more fully and updates the entries to match current kernels: * the list of files is now the table of contents; * links are used to point to other documentation and other sections; * all the existing entries are no longer present, so this removes them; * document vsyscall32. Mentions of the kernel version are dropped. Since the document is entirely rewritten, I've replaced the copyright statement. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200917072123.8847-1-steve@sk2.org Signed-off-by: Jonathan Corbet commit 363a7ac4adec468302fb06b004a4b63cb7fcaef8 Author: Bhaskar Chowdhury Date: Thu Sep 17 15:56:15 2020 +0530 docs: fb: Remove vesafb scrollback boot option In commit 50145474f6ef ("fbcon: remove soft scrollback code"), the framebuffer scrollback mode was removed, but the documentation was not updated. Properly update the documentation by removing the option that is no longer present,remove the scrollback option. Signed-off-by: Bhaskar Chowdhury Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/799e4d6ecca9aab53e823fc0001887d728be0aa5.1600333774.git.unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit fd4aa21351a7fca5c5d7a31f57238aa5690ba71d Author: Bhaskar Chowdhury Date: Thu Sep 17 15:56:14 2020 +0530 docs: fb: Remove sstfb scrollback boot option In commit 50145474f6ef ("fbcon: remove soft scrollback code"), the framebuffer scrollback mode was removed, but the documentation was not updated. Properly update the documentation by removing the option that is no longer present i.e remove a stanza related to scrollback. Signed-off-by: Bhaskar Chowdhury Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/d7e3e91ca0282d7e33a29476e51c1dd75aa1675f.1600333774.git.unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit 036e13d015d2ba6868e12783b2be31bbf5cb8a68 Author: Bhaskar Chowdhury Date: Thu Sep 17 15:56:13 2020 +0530 docs: fb: Remove matroxfb scrollback boot option In commit 50145474f6ef ("fbcon: remove soft scrollback code"), the framebuffer scrollback mode was removed, but the documentation was not updated. Properly update the documentation by removing the option that is no longer pressent, and removed the particular scrollback option. Signed-off-by: Bhaskar Chowdhury Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/e5187e70faf8237825a142313802983a6c214baa.1600333774.git.unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit cc3c2a623126a30ff967ebf0966d06e7cb9675a2 Author: Bhaskar Chowdhury Date: Thu Sep 17 15:56:12 2020 +0530 docs: fb: Remove framebuffer scrollback boot option In commit 50145474f6ef ("fbcon: remove soft scrollback code"), the framebuffer scrollback mode was removed, but the documentation was not updated. Properly update the documentation by removing the option that is no longer present, and update the section numbering because of the removal. Signed-off-by: Bhaskar Chowdhury Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/436cc046a8ff9cf2a467b633527db77dc7c7de19.1600333774.git.unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit 04301bf5b072b26218c9c6eabe579fdbef5c8d55 Author: Anton Ivanov Date: Thu Sep 17 11:35:57 2020 +0100 docs: replace the old User Mode Linux HowTo with a new one The new HowTo migrates the portions of the old howto which are still relevant to a new document, updates them to linux 5.x and adds documentation for vector transports and other new features. Signed-off-by: Anton Ivanov Link: https://lore.kernel.org/r/20200917103557.26063-1-anton.ivanov@cambridgegreys.com Signed-off-by: Jonathan Corbet commit 6b99e6e6aa6237b3f45ea24327fd3cb132b365cd Author: Randy Dunlap Date: Thu Sep 17 18:56:40 2020 -0700 Documentation/admin-guide: blockdev/ramdisk: remove use of "rdev" Remove use of "rdev" from blockdev/ramdisk.rst and update admin-guide/kernel-parameters.txt. "rdev" is considered antiquated, ancient, archaic, obsolete, deprecated {choose any or all}. "rdev" was removed from util-linux in 2010: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=a3e40c14651fccf18e7954f081e601389baefe3f Signed-off-by: Randy Dunlap Cc: Karel Zak Cc: Paul Gortmaker Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: Alexander Viro Cc: Martin Mares Cc: linux-video@atrey.karlin.mff.cuni.cz Cc: "H. Peter Anvin" Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20200918015640.8439-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit fc67d5bc876b6b224538c8848fc02e70f269ec99 Author: Randy Dunlap Date: Thu Sep 17 18:56:39 2020 -0700 Documentation/admin-guide: README & svga: remove use of "rdev" "rdev" is considered antiquated, ancient, archaic, obsolete, deprecated {choose any or all}. Remove use of "rdev" and "vidmode" (a symlink to rdev) in admin-guide/README.rst and admin-guide/svga.rst. "rdev" was removed from util-linux in 2010: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=a3e40c14651fccf18e7954f081e601389baefe3f Signed-off-by: Randy Dunlap Acked-by: Martin Mares Cc: Karel Zak Cc: Paul Gortmaker Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: Alexander Viro Cc: Martin Mares Cc: linux-video@atrey.karlin.mff.cuni.cz Cc: "H. Peter Anvin" Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20200918015640.8439-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 5aabf1180fa9a8d876debd39a8cfb60b022019bc Author: Kevin Hilman Date: Mon Sep 21 15:21:35 2020 -0700 soc: amlogic: pm-domains: use always-on flag Rather than use a governor to keep these domains always-on, instead use the flag GENPD_FLAG_ALWAYS_ON. This has the same effect, but with much lower overhead since the governor path is not used at all. Signed-off-by: Kevin Hilman Acked-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200921222135.7145-1-khilman@baylibre.com commit 5b365af4c86d1229fcb5a8683fb3284498c37606 Merge: 225060c428f0e 6a950755cec1a Author: Kalle Valo Date: Thu Sep 24 19:49:58 2020 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.10. Major changes: wcn36xx * add support wcn3680 Wi-Fi 5 devices ath11k * spectral scan support for ipq6018 commit 497de97e92da527d74932c4732cac8dee4114837 Author: Randy Dunlap Date: Thu Sep 17 22:47:22 2020 -0700 Documentation/admin-guide: kernel-parameters: capitalize Korina Fix typo, capitalize Korina proper noun. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20200918054722.28713-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 622381e62ddde55988a71b8290670d85c9f94915 Author: Randy Dunlap Date: Thu Sep 17 22:47:39 2020 -0700 Documentation: admin-guide: kernel-parameters: reformat "lapic=" boot option Reformat "lapic=" to try to make it more understandable and similar to the style that is mostly used in this file. Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20200918054739.2523-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 7c42376e07e73edbd06238bbc92f5f5cc988b7b8 Author: Randy Dunlap Date: Thu Sep 17 22:47:51 2020 -0700 Documentation/admin-guide: kernel-parameters: fix "io7" parameter description Fix punctuation and capitalization for the "io7" boot parameter. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20200918054751.6538-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 255bf90f8478b43c677ad0bc195181660781a01f Author: Randy Dunlap Date: Thu Sep 17 22:48:03 2020 -0700 Documentation/admin-guide: kernel-parameters: fix "disable_ddw" wording Drop and extraneous word (if) in a sentence. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20200918054803.6588-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit c372e741ae4c7719e55f9fd72bea532fea548ae4 Author: Tian Tao Date: Fri Sep 18 15:05:58 2020 +0800 Documentation: Remove CMA's dependency on architecture CMA only depends on MMU. It doesn't depend on arch too much. such as ARM, ARM64, X86, MIPS etc. so We remove the dependency of cma about the architecture in kernel-parameters.txt. Signed-off-by: Tian Tao Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/1600412758-60545-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Jonathan Corbet commit 225060c428f0e3a26356fd35b02d9056caced5a6 Merge: 5acbf34e2a2ce b9b852b9acae1 Author: Kalle Valo Date: Thu Sep 24 19:44:50 2020 +0300 Merge tag 'mt76-for-kvalo-2020-09-23' of https://github.com/nbd168/wireless mt76 patches for 5.10 * mt7663 runtime power management improvements * performance improvements * sdio support fixes * testmode fixes * mt7622 fixes * 7915 A-MSDU offload * cleanups # gpg: Signature made Thu 24 Sep 2020 07:10:25 PM EEST using DSA key ID 02A76EF5 # gpg: Good signature from "Felix Fietkau " # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 75D1 1A7D 91A7 710F 4900 42EF D77D 141D 02A7 6EF5 commit 1d11c35e7190f347ec7adeeda5823e8d8f59a738 Author: lijiang Date: Thu Sep 24 09:56:02 2020 +0800 docs: admin-guide: update kdump documentation due to change of crash URL Since crash utility has been moved to github, the original URL is no longer available. Let's update it accordingly. Suggested-by: Dave Young Signed-off-by: Lianbo Jiang Link: https://lore.kernel.org/r/a088bff5-1174-25fa-ac26-6e46795f4085@redhat.com Signed-off-by: Jonathan Corbet commit 4276948867a8e76f86d5b56436674ac21f42dee9 Author: Randy Dunlap Date: Fri Sep 18 17:52:02 2020 -0700 Documentation: kernel-parameters: fix formatting of MIPS "machtype" For the "machtype" boot parameter, fix word spacing, line wrap, and plural of "laptops". Signed-off-by: Randy Dunlap Cc: Jiaxun Yang Link: https://lore.kernel.org/r/c9059e35-188d-a749-1907-767b53479328@infradead.org Signed-off-by: Jonathan Corbet commit 8ede56489e954ae6b5fb2983870320bfb592e4cc Author: Randy Dunlap Date: Fri Sep 18 19:03:11 2020 -0700 Documentation: filesystems: mount_api: fix headings Fix capitalization in two headings, correct one verb, and demote one heading to a section heading. Fixes: 791a17ee1973 ("docs: filesystems: convert mount_api.txt to ReST") Signed-off-by: Randy Dunlap Cc: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/adaf123c-b394-f78c-53c0-671d7fda45e7@infradead.org Signed-off-by: Jonathan Corbet commit aed26eebf5808168bf6e78231db51df86d94461f Author: Satheesh Rajendran Date: Mon Sep 21 14:32:20 2020 +0530 Doc: admin-guide: Add entry for kvm_cma_resv_ratio kernel param Add document entry for kvm_cma_resv_ratio kernel param which is used to alter the KVM contiguous memory allocation percentage for hash pagetable allocation used by hash mode PowerPC KVM guests. Cc: Paul Mackerras Cc: Michael Ellerman Reviewed-by: Randy Dunlap Signed-off-by: Satheesh Rajendran Link: https://lore.kernel.org/r/20200921090220.14981-1-sathnaga@linux.vnet.ibm.com Signed-off-by: Jonathan Corbet commit 73589a78b86db76002b0d9bc78e3f27e9ce4e593 Author: Wilken Gottwalt Date: Wed Sep 23 08:59:54 2020 +0200 documentation: arm: sunxi: Allwinner H2+/H3 update Replaced the link to the datasheet by a link to the current version. Signed-off-by: Wilken Gottwalt Link: https://lore.kernel.org/r/20200923065954.GA22809@monster.powergraphx.local Signed-off-by: Jonathan Corbet commit b9b852b9acae1bfef01fe0f1f7f41b35aa3a7e76 Author: Lorenzo Bianconi Date: Thu Sep 17 19:18:22 2020 +0200 mt76: mt7663s: remove max_tx_fragments limitation Remove A-MSDU max_tx_fragments constraint for sdio since the check is already performed in mt7663s_tx_run_queue routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1820388bccc544cf8337405526503975d08dbf29 Author: Qinglang Miao Date: Sat Sep 19 10:12:42 2020 +0800 mt76: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Signed-off-by: Felix Fietkau commit 062d62e3976d20b6610a47bf8f829274cf7bbf89 Author: Shayne Chen Date: Tue Sep 22 19:36:01 2020 +0800 mt76: mt7915: add offchannel condition in switch channel command Add a missing offchannel condition for channel switch reason, which bypasses DPD calibration to reduce scanning time. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 59283d0987783f3d1dd9a7b0a1f2527a424c7a6b Author: Liu Shixin Date: Mon Sep 14 12:17:50 2020 +0800 mt76: mt7915: convert to use le16_add_cpu() Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu(). Signed-off-by: Liu Shixin Signed-off-by: Felix Fietkau commit 00257508a2dcc3641b31112a238de60f4010d875 Author: Ye Bin Date: Mon Aug 24 15:28:26 2020 +0800 mt76: Fix unsigned expressions compared with zero Fixes variable types in mt76x02_dfs_create_sequence and mt76x02_dfs_add_event_to_sequence Signed-off-by: Ye Bin Signed-off-by: Felix Fietkau commit 071c8ce8e92a86b8bf78678e78eb4b79fdc16768 Author: Lorenzo Bianconi Date: Mon Sep 14 20:29:01 2020 +0200 mt76: mt7915: fix possible memory leak in mt7915_mcu_add_beacon Release mcu message memory in case of failure in mt7915_mcu_add_beacon routine Fixes: e57b7901469fc ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 328cecf3ea33e20571a47a8251cb92e1b733a7af Author: Lee Jones Date: Fri Aug 21 08:16:44 2020 +0100 mt76: mt76x0: Move tables used only by init.c to their own header file Taking the same approach as initvals_phy.h. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h:218:35: warning: ‘mt76x0_dcoc_tab’ defined but not used [-Wunused-const-variable=] 218 | static const struct mt76_reg_pair mt76x0_dcoc_tab[] = { | ^~~~~~~~~~~~~~~ drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h:86:35: warning: ‘mt76x0_bbp_init_tab’ defined but not used [-Wunused-const-variable=] 86 | static const struct mt76_reg_pair mt76x0_bbp_init_tab[] = { | ^~~~~~~~~~~~~~~~~~~ drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h:48:35: warning: ‘mt76x0_mac_reg_table’ defined but not used [-Wunused-const-variable=] 48 | static const struct mt76_reg_pair mt76x0_mac_reg_table[] = { | ^~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h:14:35: warning: ‘common_mac_reg_table’ defined but not used [-Wunused-const-variable=] 14 | static const struct mt76_reg_pair common_mac_reg_table[] = { | ^~~~~~~~~~~~~~~~~~~~ Cc: Felix Fietkau Cc: Lorenzo Bianconi Cc: Ryder Lee Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Matthias Brugger Cc: Stanislaw Gruszka Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Felix Fietkau commit aab662cc8eb2ac307a76e562170ef502eb7a8760 Author: Gustavo A. R. Silva Date: Tue Sep 1 12:33:41 2020 -0500 mt76: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Felix Fietkau commit df6a38b04cf302e4eb937f72d30c003b7ba8e720 Author: Lorenzo Bianconi Date: Mon Aug 24 12:57:13 2020 +0200 mt76: mt7615: unlock dfs bands Unlock dfs channels for mt7615 devices since the driver supports radar detection. Dfs pattern detector has been tested successfully by mt7615 users. Do not unlock DFS frequencies for mt7663 devices since it has not been tested yet. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4178d96f6b351a6c8331b8e0d76e754187ad4cdb Author: Lorenzo Bianconi Date: Sat Sep 5 11:26:07 2020 +0200 mt76: mt7663: check isr read return value in mt7663s_rx_work In order to avoid using stale isr values, check return value from sdio_readsb() in mt7663s_rx_work() Tested-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1522ff731f848cf87d8ac535dc8ce7bc62a17918 Author: Lorenzo Bianconi Date: Sat Sep 5 11:26:06 2020 +0200 mt76: mt7663s: introduce sdio tx aggregation Introduce sdio tx aggregation to reduce bus transaction ands improve tx throughput. For the moment the skb are copied in a dedicated buffer since mmc APIs do not support sg table for zero-copy. Since skb data are already copied in xmit_buff[], avoid linearization in ma80211 layer. Relying on tx aggregation, we improve tx tpt of ~65%. Tested-by: Sean Wang Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 598daa4dbe14082b9369f018e46e753b2d79f730 Author: Lorenzo Bianconi Date: Sat Sep 5 11:26:05 2020 +0200 mt76: mt7663s: fix possible quota leak in mt7663s_refill_sched_quota Look just at reported quota since the hw sporadically reports mcu tx quota without setting WHIER_TX_DONE_INT_EN bit Tested-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e98e6df6d6820c8609315630409cd8766953d122 Author: Lorenzo Bianconi Date: Sat Sep 5 11:26:04 2020 +0200 mt76: move pad estimation out of mt76_skb_adjust_pad Move frame pad computation out of mt76_skb_adjust_pad routine. This is a preliminary patch to introduce sdio tx aggregation. Tested-by: Sean Wang Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ab25d9d46760d8e5450edd8e12386654940803a5 Author: Lorenzo Bianconi Date: Sat Sep 5 11:26:03 2020 +0200 mt76: mt7663s: introduce __mt7663s_xmit_queue routine This is a preliminary patch to introduce sdio tx aggregation Tested-by: Sean Wang Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 6ef2d665f64d8bb8c37b1d33381ef47378a5f915 Author: Lorenzo Bianconi Date: Sat Sep 5 11:26:02 2020 +0200 mt76: mt7663s: split mt7663s_tx_update_sched in mt7663s_tx_{pick,update}_quota In order to not update the available quota in case of a tx error, split mt7663s_tx_update_sched in mt7663s_tx_{pick,update}_quota routines Tested-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8bf71ab6aeb8cc4c9611192a6aa58dd36127dc3e Author: Lorenzo Bianconi Date: Sat Sep 5 11:26:01 2020 +0200 mt76: mt7663s: do not use altx for ctl/mgmt traffic Since the sdio engine does not report quota for altx queue, move ctl/mgmt traffic to standard data queues Tested-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 6892555dbe71ed551d3779aa20747484dc9b6ad5 Author: Lorenzo Bianconi Date: Tue Sep 8 13:54:03 2020 +0200 mt76: mt7622: fix fw hang on mt7622 Set poll timeout to 3s for mt7622 devices in order to avoid fw hangs. Swap mt7622_trigger_hif_int and doorbell configuration order in mt7615_mcu_drv_pmctrl routine. Introduce mt7615_mcu_lp_drv_pmctrl routine to take care of drv_own configuration for runtime-pm. Fixes: 08523a2a1db5 ("mt76: mt7615: add mt7615_pm_wake utility routine") Fixes: 894b7767ec2f ("mt76: mt7615: improve mt7615_driver_own reliability") Fixes: 757b0e7fd6f4 ("mt76: mt7615: avoid polling in fw_own for mt7663") Co-developed-by: Shayne Chen Signed-off-by: Shayne Chen Co-developed-by: Ryder Lee Signed-off-by: Ryder Lee Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b1b7ee2f874afe9dea0bfebce4325056664708a2 Author: Ryder Lee Date: Sat Sep 5 05:16:05 2020 +0800 mt76: mt7615: fix VHT LDPC capability The MCU field should contain a boolean 0/1, not the flag itself. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 3e19073a1f25b415157fe7458ab52a7729ab34cd Author: Wang Hai Date: Mon Sep 7 22:10:02 2020 +0800 mt76: mt7615: Remove set but unused variable 'index' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/mediatek/mt76/mt7615/testmode.c: In function mt7615_tm_set_tx_power drivers/net/wireless/mediatek/mt76/mt7615/testmode.c:83:7: warning: variable ‘index’ set but not used [-Wunused-but-set-variable]= commit 4f0bce1c8888 ("mt76: mt7615: implement testmode support") involved this unused variable, remove it. Signed-off-by: Wang Hai Signed-off-by: Felix Fietkau commit 2bffddedfcd48b6391c735f35aeabf17a4745cd5 Author: Felix Fietkau Date: Wed Sep 2 13:39:00 2020 +0200 mt76: remove retry_q from struct mt76_txq and related code Since the switch to using AQL by default, mtxq->retry_q is never filled anymore Remove it to get rid of a few more unnecessary cycles in the tx path Signed-off-by: Felix Fietkau commit dd57a95cfddc12653582d99a5127b39795c7f657 Author: Felix Fietkau Date: Tue Sep 1 18:48:40 2020 +0200 mt76: move txwi handling code to dma.c, since it is mmio specific This way we can make some functions static Signed-off-by: Felix Fietkau commit ed294cede492fba47a89b06facc093a8ee944122 Author: Felix Fietkau Date: Tue Sep 1 23:41:30 2020 +0200 mt76: mt7915: fix queue/tid mapping for airtime reporting Unlike 7615, 7915 uses the same AC index for rx and tx, which matches the LMAC queue mapping Signed-off-by: Felix Fietkau commit bd397a0bf82838d4e28b6f296cc68034f7eb49ae Author: Felix Fietkau Date: Tue Sep 1 21:26:33 2020 +0200 mt76: mt7915: simplify mt7915_lmac_mapping Compared to mac80211 ACs, MT7915 queue numbers are in reverse order There is no need for the defensive WARN_ON_ONCE, so we can simplify the function to avoid the array lookup Signed-off-by: Felix Fietkau commit 75d4bf1f5590183a60557dac4daa4749f4dac6ef Author: Felix Fietkau Date: Thu Aug 27 07:58:32 2020 +0200 mt76: dma: cache dma map address/len in struct mt76_queue_entry Accessing them from uncached memory can be expensive, so it's cheaper to cache them Signed-off-by: Felix Fietkau commit 2fe1a5d61f3aacfb9b2bd323c46df733aef8327b Author: Felix Fietkau Date: Thu Aug 27 09:05:46 2020 +0200 mt76: mt7915: fix HE BSS info he_pe_duration and he_rts_thres have the same unit as the fields in the HE operation IE Signed-off-by: Felix Fietkau commit 781eef5b34c57d9d8c772e2402d07086722e89e4 Author: Felix Fietkau Date: Fri Jul 24 16:11:52 2020 +0200 mt76: convert from tx tasklet to tx worker thread This improves performance by allowing the scheduler to move the tx scheduling work to idle CPUs. Since tx scheduling work is very latency sensitive and kept short via AQL, sched_set_fifo_low is used to keep worker priority above normal tasks Signed-off-by: Felix Fietkau commit 30bdd69246ea9726a7688ef02c60b1ec0ae66d38 Author: Felix Fietkau Date: Fri Jul 24 14:43:49 2020 +0200 mt76: add utility functions for deferring work to a kernel thread In order to avoid keeping work like tx scheduling pinned to the CPU it was scheduled from, it makes sense to switch from tasklets to kernel threads. Unlike a workqueue, this one only allows one fixed worker function to be executed by the worker thread. Because of that, there is less locking and less code for scheduling involved. This is important because the tx worker is scheduled often in a hot path Signed-off-by: Felix Fietkau commit 9729ff4cc516cb88e47cda0eff4eaf95e73c5a06 Author: Felix Fietkau Date: Tue Sep 8 19:12:22 2020 +0200 mt76: testmode: add a limit for queued tx_frames packets This avoids running out of available tx tokens Signed-off-by: Felix Fietkau commit 0642cf4020f78e187b3d71c404fddd068f4bd7bc Author: Felix Fietkau Date: Tue Aug 25 11:07:00 2020 +0200 mt76: mt7615: fix antenna selection for testmode tx_frames Do not alter the tx/rx chain settings during channel setup, antennas are remapped by the testmode specific register writes already Signed-off-by: Felix Fietkau commit f353269d59be349bc4ce56964af3026c8884eeb2 Author: Felix Fietkau Date: Tue Aug 25 07:38:00 2020 +0200 mt76: mt7615: fix MT_ANT_SWITCH_CON register definition This is used for testmode tx antenna selection Signed-off-by: Felix Fietkau commit d3c07a9e6dc924b603ba22e52e5f18bf9dd39d60 Author: Chih-Min Chen Date: Fri Sep 4 13:51:02 2020 +0800 mt76: mt7915: fix unexpected firmware mode Avoid firmware falling into spectrum mode since that will set unexpected PSE/PLE thresholds which lead to Tx hang. This mode should be cleaned before firmware download stage. Signed-off-by: Chih-Min Chen Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 9e47a683e9d222c0c08d7c9c70989591b0431cbd Author: Felix Fietkau Date: Mon Aug 24 09:41:27 2020 +0200 mt76: mt76x02: tune tx ring size Increase data queue size to improve performance. Reduce PS/mgmt queue size Signed-off-by: Felix Fietkau commit 21fd4bb7dd8b0ddbe5ab0f631ea3b0426c870a65 Author: Felix Fietkau Date: Mon Aug 24 09:37:45 2020 +0200 mt76: mt7603: tune tx ring size Stop relying on global tx ring size, reduce size for PS/mgmt queue Signed-off-by: Felix Fietkau commit f099c2e5de8f9055eaa3b800d7a1a41b85a252df Author: Felix Fietkau Date: Sun Aug 23 21:43:51 2020 +0200 mt76: remove struct mt76_sw_queue All members except for the struct mt76_queue pointer have been removed Signed-off-by: Felix Fietkau commit e1378e5228aaa1bf6bb253a379c7de1722a94e00 Author: Felix Fietkau Date: Sun Aug 23 21:22:20 2020 +0200 mt76: rely on AQL for burst size limits on tx queueing Now that AQL works well on all mt76 drivers, completely replace the arbitrary burst sizing and number of bursts logic for tx scheduling. For the short period of time in which AQL does not work well yet, limit each stations to 16 in-flight packets that have no estimated tx time. This should avoid filling the queue if a station connects and queues up a large number of packets before rate control information is available, especially with hardware rate control Signed-off-by: Felix Fietkau commit 513d6acb97d401010c905303c2cf32fb09ba33fa Author: Felix Fietkau Date: Sun Aug 23 18:21:18 2020 +0200 mt76: remove swq from struct mt76_sw_queue Since txq selection was moved to mac80211, it is no longer used Signed-off-by: Felix Fietkau commit d80e52c7b6c4d340e54ba1d0d5ac0ef234914f70 Author: Felix Fietkau Date: Sun Aug 23 15:08:02 2020 +0200 mt76: remove qid argument to drv->tx_complete_skb It is not needed Signed-off-by: Felix Fietkau commit fe5b5ab52e9d385d5e6d20e3ce2d2af69175f6ad Author: Felix Fietkau Date: Sun Aug 23 14:50:13 2020 +0200 mt76: unify queue tx cleanup code Cleanup and preparation for changing tx scheduling behavior Signed-off-by: Felix Fietkau commit 16254fc51f7df622bd870f70cf6ae84d2d4c08a3 Author: Felix Fietkau Date: Sun Aug 23 12:43:19 2020 +0200 mt76: sdio: fix use of q->head and q->tail Their use is reversed compared to DMA. The order for DMA makes more sense, so let's use that Signed-off-by: Felix Fietkau commit 95f61e17eff3d9e205ec613f85e054c5e0985f91 Author: Felix Fietkau Date: Sun Aug 23 12:42:18 2020 +0200 mt76: usb: fix use of q->head and q->tail Their use is reversed compared to DMA. The order for DMA makes more sense, so let's use that Signed-off-by: Felix Fietkau commit d407afcbd6e763171253b6a174749e0ecf49e249 Author: Felix Fietkau Date: Tue Aug 25 07:03:37 2020 +0200 mt76: mt7603: check for single-stream EEPROM configuration Some devices using MT7628 or MT7603 have only one antenna chain connected. Detect these using the EEPROM rx/tx path settings Reported-by: Qin Wei Signed-off-by: Felix Fietkau commit 2d68104742a90f035ee8ceaddf322f6e2da32f70 Author: Felix Fietkau Date: Tue Mar 24 11:57:43 2020 +0100 mt76: add memory barrier to DMA queue kick Ensure that descriptor memory has been fully written before letting the hardware read it Signed-off-by: Felix Fietkau commit c32011bbde738f36dcffbb0e3333e29f7857fd09 Author: Felix Fietkau Date: Sat Jul 25 09:40:43 2020 +0200 mt76: mt7915: add support for accessing mapped registers via bus ops Makes it possible to read/write them via debugfs, similar to mt7615/7603 Signed-off-by: Felix Fietkau commit e17d794587298924ba1aed7c642492e170f39d85 Author: Felix Fietkau Date: Sat Aug 22 17:18:37 2020 +0200 mt76: mt7615: significantly reduce interrupt load On 7615 and newer, DMA completion only triggers unmap, but not free of queued skbs, since pointers to packets are queued internally. Because of that, there is no need to process the main data queue immediately on DMA completion. To improve performance, mask out the DMA data queue completion interrupt and process the queue only when we receive a txfree event. This brings the number of interrupts under load down to a small fraction. Signed-off-by: Felix Fietkau commit f8a667a9af91981b051b0b47c01e473fca80ce4f Author: Felix Fietkau Date: Sat Aug 22 14:41:42 2020 +0200 mt76: mt7915: significantly reduce interrupt load On 7615 and newer, DMA completion only triggers unmap, but not free of queued skbs, since pointers to packets are queued internally. Because of that, there is no need to process the main data queue immediately on DMA completion. To improve performance, mask out the DMA data queue completion interrupt and process the queue only when we receive a txfree event. This brings the number of interrupts under load down to a small fraction. Signed-off-by: Felix Fietkau commit 250944596ca1236a2562d791144cf913728371dc Author: Felix Fietkau Date: Tue Jul 28 20:07:49 2020 +0200 mt76: mt7915: schedule tx tasklet in mt7915_mac_tx_free The previous scheduling round may have been limited by AQL. More frames might be available after the tx free run. Signed-off-by: Felix Fietkau commit 0b51f18653833cdc1cd0e916522c00638bd58ec8 Author: Felix Fietkau Date: Thu Aug 6 16:39:33 2020 +0200 mt76: dma: update q->queued immediately on cleanup Tx cleanup and tx enqueuing can run in parallel. In order to avoid queue starvation issues under load, update q->queued immediately. Signed-off-by: Felix Fietkau commit 0f1c443ca9cfa015f205bc003ddecc48531e511b Author: Felix Fietkau Date: Thu Aug 20 11:41:16 2020 +0200 mt76: mt7915: optimize mt7915_mac_sta_poll Since DMA completion does not imply tx completion, it makes more sense to poll for airtime from mt7915_mac_tx_free. Reduce the runtime of the function by moving all items from dev->sta_poll_list to a local list once and process any stations that were added afterwards on the next run Signed-off-by: Felix Fietkau commit 68e6644bbd6eb1189b36e933b51632887838f825 Author: Felix Fietkau Date: Tue Aug 18 12:44:05 2020 +0200 mt76: mt7615: fix reading airtime statistics - change the WTBL LMAC access function to set the mapping window only once - use ac * 2 as offset, since each AC has separate words for rx and tx Signed-off-by: Felix Fietkau commit 8da40d698111ad27b03afc40d67843e3073395e7 Author: Lorenzo Bianconi Date: Mon Aug 24 20:55:12 2020 +0200 mt76: mt7663u: fix dma header initialization Fix length field corruption in usb dma header introduced adding sdio support Fixes: 75b10f0cbd0b ("mt76: mt76u: add mt76_skb_adjust_pad utility routine") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ce8463a726a5669b200a1c2c17f95bc1394cc6bf Author: Lorenzo Bianconi Date: Fri Aug 21 12:52:15 2020 +0200 mt76: fix a possible NULL pointer dereference in mt76_testmode_dump Fix a possible NULL pointer dereference in mt76_testmode_dump() since nla_nest_start returns NULL in case of error Fixes: f0efa8621550e ("mt76: add API for testmode support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a081de174d11b12db9a94eb748041c2732f14c10 Author: Lorenzo Bianconi Date: Fri Aug 21 12:09:54 2020 +0200 mt76: mt7615: fix a possible NULL pointer dereference in mt7615_pm_wake_work Initialize wcid to global_wcid if msta is NULL in mt7615_pm_wake_work routine since wcid will be dereferenced running mt76_tx() Fixes: 2b8cdfb28d340 ("mt76: mt7615: wake device before pushing frames in mt7615_tx") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e862825dcf74203c5ab60335c341766808f47507 Author: Lorenzo Bianconi Date: Fri Aug 21 11:19:51 2020 +0200 mt76: mt7615: fix possible memory leak in mt7615_tm_set_tx_power Fix a memory leak in mt7615_tm_set_tx_power routine if mt7615_eeprom_get_target_power_index fails. Moreover do not account req_header twice in mcu skb allocation. Fixes: 4f0bce1c88882 ("mt76: mt7615: implement testmode support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b496490886f919a08e946ca4cf8bdd375f54e77f Author: Sean Wang Date: Tue Aug 18 12:12:28 2020 +0800 mt76: mt7663s: fix unable to handle kernel paging request Use buffer allocated with kmalloc instead of with stack to fix kernel crash due to Unable to handle kernel paging request at virtual address ffffffc0095cbce8. [ 156.977349] Unable to handle kernel paging request at virtual address ffffffc0095cbce8 [ 156.985270] Mem abort info: [ 156.988059] ESR = 0x96000045 [ 156.991104] Exception class = DABT (current EL), IL = 32 bits [ 156.997013] SET = 0, FnV = 0 [ 157.000057] EA = 0, S1PTW = 0 [ 157.003190] Data abort info: [ 157.006061] ISV = 0, ISS = 0x00000045 [ 157.009887] CM = 0, WnR = 1 [ 157.012850] swapper pgtable: 4k pages, 39-bit VAs, pgdp = 0000000042adcba2 [ 157.019715] [ffffffc0095cbce8] pgd=0000000000000000, pud=0000000000000000 [ 157.026499] Internal error: Oops: 96000045 [#1] PREEMPT SMP [ 157.032065] Modules linked in: mt7663s mt7663_usb_sdio_common mt7615_common ... [ 157.073007] Process CompositorTileW (pid: 1625, stack limit = 0x000000003f2389fc) [ 157.080484] CPU: 0 PID: 1625 Comm: CompositorTileW Not tainted 4.19.137 #36 [ 157.092219] pstate: 80000085 (Nzcv daIf -PAN -UAO) [ 157.097012] pc : __memcpy+0xc0/0x180 [ 157.100585] lr : swiotlb_tbl_unmap_single+0x84/0x14c [ 157.105540] sp : ffffff8008003cb0 [ 157.108845] x29: ffffff8008003cb0 x28: ffffff9c1a211f60 [ 157.114149] x27: ffffff9c19ecc018 x26: 0000000000001000 [ 157.119452] x25: ffffff9c1a378000 x24: 0000000000000001 [ 157.124755] x23: ffffff9c1a378000 x22: 00000000000001ff [ 157.130058] x21: 0000000000000000 x20: 00000000fbefe800 [ 157.135360] x19: 0000000000000070 x18: 0000000000000000 [ 157.140663] x17: 0000000000000000 x16: 0000000000000000 [ 157.145965] x15: 0000000000000000 x14: 0000000000000000 [ 157.151267] x13: 0000000000000000 x12: 000000000000000d [ 157.156569] x11: 000000000000000c x10: 0000000a7befe800 [ 157.161873] x9 : fffffff680000000 x8 : 0000000000000000 [ 157.167175] x7 : 0000000100000003 x6 : ffffffc0095cbce8 [ 157.172479] x5 : 0000000000000000 x4 : 0000000000000000 [ 157.177781] x3 : 0000000000000002 x2 : fffffffffffffff0 [ 157.183085] x1 : ffffffca7befe810 x0 : ffffffc0095cbce8 [ 157.188389] Call trace: [ 157.190832] __memcpy+0xc0/0x180 [ 157.194053] swiotlb_unmap_sg_attrs+0xa8/0xb0 [ 157.198406] __swiotlb_unmap_sg_attrs+0x8c/0xa4 [ 157.202931] msdc_unprepare_data+0x6c/0x84 [ 157.207019] msdc_request_done+0x58/0x98 [ 157.210934] msdc_data_xfer_done+0x1a8/0x1d0 [ 157.215195] msdc_irq+0x12c/0x17c [ 157.218505] __handle_irq_event_percpu+0xd8/0x298 [ 157.223202] handle_irq_event+0x60/0xdc [ 157.227031] handle_fasteoi_irq+0xa4/0x1d4 [ 157.231120] __handle_domain_irq+0x84/0xc4 [ 157.235210] gic_handle_irq+0x124/0x1a4 [ 157.239038] el0_irq_naked+0x4c/0x54 [ 157.242608] Code: 14000028 f1020042 5400024a a8c12027 (a88120c7) [ 157.248693] ---[ end trace 28b8090135b0a2e1 ]--- [ 157.265589] Kernel panic - not syncing: Fatal exception in interrupt [ 157.271944] SMP: stopping secondary CPUs [ 157.275865] Kernel Offset: 0x1c10e00000 from 0xffffff8008000000 [ 157.281779] CPU features: 0x0,2188200c [ 157.285519] Memory Limit: none Fixes: a66cbdd6573d ("mt76: mt7615: introduce mt7663s support") Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 8b7c6e1cb2cb1d4e2ee94556695d80dde6ccdcc6 Author: Sean Wang Date: Fri Aug 14 05:49:47 2020 +0800 mt76: mt7663s: fix resume failure MT7663s have to rely on MMC_PM_KEEP_POWER in pm_flags for to avoid SDIO power is being shut off. To fix sdio access failure like "mt7663s mmc1:0001:1: sdio write failed: -22" for the first sdio command to access the bus in the resume handler. Fixes: a66cbdd6573d ("mt76: mt7615: introduce mt7663s support") Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 673d7764c4f4e6589b8541d04959d24cfa899b4e Author: Lorenzo Bianconi Date: Thu Aug 13 11:55:52 2020 +0200 mt76: mt7663s: use NULL instead of 0 in sdio code Fix the following sparse warnings in mt7663s driver: drivers/net/wireless/mediatek/mt76/mt7615/sdio_mcu.c:78:62: warning: Using plain integer as NULL pointer drivers/net/wireless/mediatek/mt76/mt7615/sdio_mcu.c:110:62: warning: Using plain integer as NULL pointer drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c:229:64: warning: Using plain integer as NULL pointer drivers/net/wireless/mediatek/mt76/mt7615/sdio_txrx.c:263:64: warning: Using plain integer as NULL pointer Fixes: a66cbdd6573d ("mt76: mt7615: introduce mt7663s support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 346f810e22428cdf73ee5cf2e0ce1b79d5671de5 Author: Lorenzo Bianconi Date: Sat Aug 8 20:25:41 2020 +0200 mt76: mt7615: release mutex in mt7615_reset_test_set Reduce scope of mutex_acquire/mutex_release in mt7615_reset_test_set routine in order to fix the following static checker warning: drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c:179 mt7615_reset_test_set() warn: inconsistent returns 'dev->mt76.mutex'. Reported-by: Dan Carpenter Fixes: ea4906c4be49 ("mt76: mt7615: wake device before accessing regmap in debugfs") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b443e55fb5b371e971bafbceae28d6551376631c Author: Ryder Lee Date: Tue Aug 11 09:59:57 2020 +0200 mt76: mt7915: add Tx A-MSDU offloading support This disables the software A-MSDU aggregation in mac80211 and enables hardware offloading Suggested-by: Yiwei Chung Suggested-by: YF Luo Signed-off-by: Ryder Lee Signed-off-by: Shayne Chen Co-developed-by: Felix Fietkau Signed-off-by: Felix Fietkau commit 2a3412061a6ac854b1620bd187252cdc6cc40e08 Author: Felix Fietkau Date: Sat Aug 8 21:22:53 2020 +0200 mt76: mt7915: add missing flags in WMM parameter settings Indicate the filled parameter to the firmware Signed-off-by: Felix Fietkau commit 481e34a702b75c793aa3b85dd6c3eb10a96e6a02 Author: Felix Fietkau Date: Tue Jul 28 23:30:08 2020 +0200 mt76: mt7915: simplify aggregation session check Use the txwi data as primary source information to avoid touching skb data Use bitfield instead of state variable + spinlock Signed-off-by: Felix Fietkau commit 5c4b29fd9af68e63b281046db8c9872daf117688 Author: Felix Fietkau Date: Tue Jul 28 20:48:42 2020 +0200 mt76: mt7615: remove mtxq->agg_ssn assignment It is not used anywhere for this driver Signed-off-by: Felix Fietkau commit c50d105aa7b289fd07f87a18642c261b31b7b5f5 Author: Felix Fietkau Date: Tue Jul 28 20:41:09 2020 +0200 mt76: move mt76_check_agg_ssn to driver tx_prepare calls mt7615 and newer drivers do not need this, since they use sequence number offload Moving this code also reduces the number of callsites to make it easier to review Signed-off-by: Felix Fietkau commit 577dbc6c656da6997dddc6cf842b7954588f2d4e Author: Felix Fietkau Date: Mon Jul 27 15:33:12 2020 +0200 mt76: mt7915: enable offloading of sequence number assignment Preparation for supporting more offload features Signed-off-by: Felix Fietkau commit 3dff19180085cf6acb701ce99663570230bdd8ab Author: Felix Fietkau Date: Sat Aug 8 21:36:53 2020 +0200 mt76: mt7915: increase tx retry count Set it to 15 to match reference driver Signed-off-by: Felix Fietkau commit 1daf2522fa160466899cdcb87698daaa5f86fd55 Author: Felix Fietkau Date: Sun Jul 26 20:45:58 2020 +0200 mt76: mt7915: clean up station stats polling and rate control update Queueing a per-sta work item from the tx free path can become very expensive under load. This work is only supposed to pull rate control stats every second and deal with rate control changes. Additionally, the rate control update code was wrong, because it was confusing bit masks and bit numbers in test_bit. Fix this by introducing a dedicated device work item for rate control updates, and by polling station stats from the phy mac work. Stations requiring polling or rate control updates are added to lists protected by dev->sta_poll_lock. Signed-off-by: Felix Fietkau commit 38b04398c532e9bb9aa90fc07846ad0b0845fe94 Author: Felix Fietkau Date: Fri Aug 7 20:57:46 2020 +0200 mt76: mt7915: do not do any work in napi poll after calling napi_complete_done() Fixes a race condition where multiple tx cleanup or sta poll tasks could run in parallel. Signed-off-by: Felix Fietkau commit 6e4f584e2be6efb57d311f4309d4f5a96fb247b8 Author: Felix Fietkau Date: Fri Aug 7 20:52:20 2020 +0200 mt76: mt7615: do not do any work in napi poll after calling napi_complete_done() Fixes a race condition where multiple tx cleanup tasks could run in parallel Signed-off-by: Felix Fietkau commit 2c270b0e51ad5a29cf01e1b8d3d651b185d3d3b5 Author: Felix Fietkau Date: Fri Aug 7 22:05:17 2020 +0200 mt76: mt76x02: clean up and fix interrupt masking in the irq handler Only clear unmasked interrupts. If an interrupt is temporarily masked, its pending events need to be processed later, even if another interrupt happened in the mean time. Disable interrupts in one call before scheduling Signed-off-by: Felix Fietkau commit 40fde8c486950d03eb1ed76802c4e5a41ad94421 Author: Felix Fietkau Date: Fri Aug 7 19:31:40 2020 +0200 mt76: mt7615: only clear unmasked interrupts in irq tasklet If an interrupt is temporarily masked, its pending events need to be processed later, even if another interrupt happened in the mean time. Signed-off-by: Felix Fietkau commit acc4696dcfea8d6ed5a3748467580ca3228dde00 Author: Felix Fietkau Date: Fri Aug 7 20:56:32 2020 +0200 mt76: mt7915: clean up and fix interrupt masking in the irq handler Only clear unmasked interrupts. If an interrupt is temporarily masked, its pending events need to be processed later, even if another interrupt happened in the mean time. Signed-off-by: Felix Fietkau commit 9df8c539bed7b676af2204af2988e2c9409c135e Author: Felix Fietkau Date: Fri Aug 7 21:55:52 2020 +0200 mt76: set interrupt mask register to 0 before requesting irq Avoids spurious interrupts in case the hardware was running already Signed-off-by: Felix Fietkau commit 27d5c528a7ca08dcd44877fdd9fc08b76630bf77 Author: Felix Fietkau Date: Sat Jul 25 14:44:07 2020 +0200 mt76: fix double DMA unmap of the first buffer on 7615/7915 A small part of the first skb buffer is passed to the firmware for parsing via DMA, while the full buffer is passed as part of the TXP. Avoid calling DMA unmap on the first part (with a different length than map) Signed-off-by: Felix Fietkau commit c12b7c7944e56e526c0a457282603ebcdd04ca90 Author: Felix Fietkau Date: Fri Jul 24 16:13:10 2020 +0200 mt76: mt7915: fix crash on tx rate report for invalid stations Check wcid RCU pointer before using it Signed-off-by: Felix Fietkau commit 4bf04d33f5b7eea35fcc1a5a9cd61127dfc84ae1 Author: Ryder Lee Date: Sat Aug 1 06:24:15 2020 +0800 mt76: mt7915: enable U-APSD on AP side Enable U-APSD support for AP interface. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 35296ed28a361f629ae668c46b462870b69db7f5 Author: Lorenzo Bianconi Date: Fri Jul 31 13:50:14 2020 +0200 mt76: mt76s: get rid of unused variable Remove unused state variable in mt76_sdio structure Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4d59f8c9b5699ae59d0e4a59208057dbe2c6e7b3 Author: Lorenzo Bianconi Date: Thu Jul 30 16:09:51 2020 +0200 mt76: mt76s: move tx/rx processing in 2 separate works In order to maximize parallelism, split status work in tx status work and rx net work Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d74fda4c38ed90f4759e8724509541f29d19a1b7 Author: Lorenzo Bianconi Date: Thu Jul 30 16:09:50 2020 +0200 mt76: mt76s: move status processing in txrx wq As it has been done for tx and rx processing, move tx/rx status processing into mt76s_txrx_wq workqueue Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3e5f374d332b76f536e197a70bd24e7b02b218c8 Author: Lorenzo Bianconi Date: Thu Jul 30 16:09:49 2020 +0200 mt76: mt7663s: move rx processing in txrx wq Move rx processing to mt76s_txrx_wq in order to minimize the interval when the sdio bus is locked during rx Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 974327a4a717eaa8412113d36042a95d52655c82 Author: Lorenzo Bianconi Date: Thu Jul 30 16:09:48 2020 +0200 mt76: mt76s: move tx processing in a dedicated wq Introduce mt76s_txrx_wq workqueue and move tx processing from kthread to a dedicated work. This is preliminary patch to improve mt7663s throughput Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 72372f3afc4a1ced5edabcec5c3c3f783ad9bc73 Author: Lorenzo Bianconi Date: Thu Jul 30 11:38:46 2020 +0200 mt76: mt76s: fix oom in mt76s_tx_queue_skb_raw Free the mcu skb in case of error in mt76s_tx_queue_skb_raw routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0825af2d3307f2e2930f1070c0128e2485732b80 Author: Lorenzo Bianconi Date: Thu Jul 30 11:34:43 2020 +0200 mt76: mt7615: reschedule runtime-pm receiving a tx interrupt Reschedule runtime-pm after receiving a tx interrupt. Update runtime-pm last activity before injecting packets Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 763d750c38484cb1fbe389a5cf45b391b9eaa056 Author: Lorenzo Bianconi Date: Thu Jul 30 11:27:51 2020 +0200 mt76: do not inject packets if MT76_STATE_PM is set Do not tx packets in mt76_txq_send_burst() or mt76_txq_schedule_list() if the device is in runtime-pm Signed-off-by: Lorenzo Bianconi Reported-by: kernel test robot Signed-off-by: Felix Fietkau commit cddaaa56375615c256eb6960d3092ddb8a7a9154 Author: Lorenzo Bianconi Date: Thu Jul 30 11:21:31 2020 +0200 mt76: mt7615: hold mt76 lock queueing wd in mt7615_queue_key_update wq queue is always updated holding mt76 spinlock. Grab mt76 lock in mt7615_queue_key_update() before putting a new element at the end of the queue. Fixes: eb99cc95c3b65 ("mt76: mt7615: introduce mt7663u support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d6e08f2be71092536d01a86275e1a32c4acd6684 Author: Lorenzo Bianconi Date: Mon Jul 20 17:41:20 2020 +0200 mt76: mt7663s: move drv_own/fw_own in mt7615_mcu_ops Initialize set_drv_ctrl and set_fw_ctrl function pointers in mt7663s_mcu_init. This is a preliminary patch to enable runtime-pm for mt7663s chipset. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 186b659c0859704ef3b2fb634a659724f020889a Author: Lorenzo Bianconi Date: Mon Jul 20 17:41:19 2020 +0200 mt76: mt7615: move drv_own/fw_own in mt7615_mcu_ops Introduce set_drv_ctrl and set_fw_ctrl function pointers in mt7615_mcu_ops data structure. This is a preliminary patch to enable runtime-pm for non-pci chipsets Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7660a1bd0c22a05ef9ee36409478ee63044cad0f Author: Shayne Chen Date: Wed Jun 24 17:39:37 2020 +0800 mt76: mt7615: register ext_phy if DBDC is detected MT_EE_WIFI_CONF field can be used to detect if the chipset is MT7615D. Thus, add support to automatically register ext_phy if DBDC is detected. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 5acbf34e2a2cee13208e6466346ca987eb772d55 Author: Qinglang Miao Date: Mon Sep 21 21:11:15 2020 +0800 zd1201: simplify the return expression of zd1201_set_maxassoc() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200921131115.93504-1-miaoqinglang@huawei.com commit ac4bac99161e8f7a7a9faef70d8ca8f69d5493a9 Author: Andreas Färber Date: Sun Sep 20 15:26:21 2020 +0200 rtw88: Fix potential probe error handling race with wow firmware loading If rtw_core_init() fails to load the wow firmware, rtw_core_deinit() will not get called to clean up the regular firmware. Ensure that an error loading the wow firmware does not produce an oops for the regular firmware by waiting on its completion to be signalled before returning. Also release the loaded firmware. Fixes: c8e5695eae99 ("rtw88: load wowlan firmware if wowlan is supported") Cc: Chin-Yen Lee Cc: Yan-Hsuan Chuang Signed-off-by: Andreas Färber Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200920132621.26468-3-afaerber@suse.de commit ecda9cda3338b594a1b82d62018c247132a39e57 Author: Andreas Färber Date: Sun Sep 20 15:26:20 2020 +0200 rtw88: Fix probe error handling race with firmware loading In case of rtw8822be, a probe failure after successful rtw_core_init() has been observed to occasionally lead to an oops from rtw_load_firmware_cb(): [ 3.924268] pci 0001:01:00.0: [10ec:b822] type 00 class 0xff0000 [ 3.930531] pci 0001:01:00.0: reg 0x10: [io 0x0000-0x00ff] [ 3.936360] pci 0001:01:00.0: reg 0x18: [mem 0x00000000-0x0000ffff 64bit] [ 3.944042] pci 0001:01:00.0: supports D1 D2 [ 3.948438] pci 0001:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold [ 3.957312] pci 0001:01:00.0: BAR 2: no space for [mem size 0x00010000 64bit] [ 3.964645] pci 0001:01:00.0: BAR 2: failed to assign [mem size 0x00010000 64bit] [ 3.972332] pci 0001:01:00.0: BAR 0: assigned [io 0x10000-0x100ff] [ 3.986240] rtw_8822be 0001:01:00.0: enabling device (0000 -> 0001) [ 3.992735] rtw_8822be 0001:01:00.0: failed to map pci memory [ 3.998638] rtw_8822be 0001:01:00.0: failed to request pci io region [ 4.005166] rtw_8822be 0001:01:00.0: failed to setup pci resources [ 4.011580] rtw_8822be: probe of 0001:01:00.0 failed with error -12 [ 4.018827] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 4.029121] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 4.050828] Unable to handle kernel paging request at virtual address edafeaac9607952c [ 4.058975] Mem abort info: [ 4.058980] ESR = 0x96000004 [ 4.058990] EC = 0x25: DABT (current EL), IL = 32 bits [ 4.070353] SET = 0, FnV = 0 [ 4.073487] EA = 0, S1PTW = 0 [ 4.073501] dw-apb-uart 98007800.serial: forbid DMA for kernel console [ 4.076723] Data abort info: [ 4.086415] ISV = 0, ISS = 0x00000004 [ 4.087731] Freeing unused kernel memory: 1792K [ 4.090391] CM = 0, WnR = 0 [ 4.098091] [edafeaac9607952c] address between user and kernel address ranges [ 4.105418] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 4.111129] Modules linked in: [ 4.114275] CPU: 1 PID: 31 Comm: kworker/1:1 Not tainted 5.9.0-rc5-next-20200915+ #700 [ 4.122386] Hardware name: Realtek Saola EVB (DT) [ 4.127223] Workqueue: events request_firmware_work_func [ 4.132676] pstate: 60000005 (nZCv daif -PAN -UAO BTYPE=--) [ 4.138393] pc : rtw_load_firmware_cb+0x54/0xbc [ 4.143040] lr : request_firmware_work_func+0x44/0xb4 [ 4.148217] sp : ffff800010133d70 [ 4.151616] x29: ffff800010133d70 x28: 0000000000000000 [ 4.157069] x27: 0000000000000000 x26: 0000000000000000 [ 4.162520] x25: 0000000000000000 x24: 0000000000000000 [ 4.167971] x23: ffff00007ac21908 x22: ffff00007ebb2100 [ 4.173424] x21: ffff00007ad35880 x20: edafeaac96079504 [ 4.178877] x19: ffff00007ad35870 x18: 0000000000000000 [ 4.184328] x17: 00000000000044d8 x16: 0000000000004310 [ 4.189780] x15: 0000000000000800 x14: 00000000ef006305 [ 4.195231] x13: ffffffff00000000 x12: ffffffffffffffff [ 4.200682] x11: 0000000000000020 x10: 0000000000000003 [ 4.206135] x9 : 0000000000000000 x8 : ffff00007e73f680 [ 4.211585] x7 : 0000000000000000 x6 : ffff80001119b588 [ 4.217036] x5 : ffff00007e649c80 x4 : ffff00007e649c80 [ 4.222487] x3 : ffff80001119b588 x2 : ffff8000108d1718 [ 4.227940] x1 : ffff800011bd5000 x0 : ffff00007ac21600 [ 4.233391] Call trace: [ 4.235906] rtw_load_firmware_cb+0x54/0xbc [ 4.240198] request_firmware_work_func+0x44/0xb4 [ 4.245027] process_one_work+0x178/0x1e4 [ 4.249142] worker_thread+0x1d0/0x268 [ 4.252989] kthread+0xe8/0xf8 [ 4.256127] ret_from_fork+0x10/0x18 [ 4.259800] Code: f94013f5 a8c37bfd d65f03c0 f9000260 (f9401681) [ 4.266049] ---[ end trace f822ebae1a8545c2 ]--- To avoid this, wait on the completion callbacks in rtw_core_deinit() before releasing firmware and continuing teardown. Note that rtw_wait_firmware_completion() was introduced with c8e5695eae9959fc5774c0f490f2450be8bad3de ("rtw88: load wowlan firmware if wowlan is supported"), so backports to earlier branches may need to inline wait_for_completion(&rtwdev->fw.completion) instead. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Fixes: c8e5695eae99 ("rtw88: load wowlan firmware if wowlan is supported") Cc: Yan-Hsuan Chuang Signed-off-by: Andreas Färber Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200920132621.26468-2-afaerber@suse.de commit 72a398a63b88921067ba275e701d19eb442638cd Author: Zhang Changzhong Date: Sat Sep 19 10:06:31 2020 +0800 brcmfmac: check return value of driver_for_each_device() Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1576:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] 1576 | int ret; | ^~~ driver_for_each_device() has been declared with __must_check, so the return value should be checked. Signed-off-by: Zhang Changzhong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1600481191-14250-1-git-send-email-zhangchangzhong@huawei.com commit f9a825a7f65a1c94858667934c4ed59bc548dd1f Author: Masahiro Yamada Date: Sat Aug 29 17:14:17 2020 +0900 kconfig: qconf: create QApplication after option checks 'scripts/kconfig/qconf -h' just calls usage() and exits, with QApplication unused. There is no need to construct QApplication so early. Do it after the parse stage. Signed-off-by: Masahiro Yamada Tested-by: Randy Dunlap commit a0fce283386d76f3e77f4f45b7ec6f0084510baa Author: Masahiro Yamada Date: Sat Aug 29 17:14:16 2020 +0900 kconfig: qconf: remove Y, M, N columns There are so many ways to toggle bool / tristate options. I do not know how useful these columns are. Signed-off-by: Masahiro Yamada commit 62ed165651cc71cb1b6d39ced74e47c2b26a55a5 Author: Masahiro Yamada Date: Sat Aug 29 17:14:15 2020 +0900 kconfig: qconf: remove ConfigView class Now that ConfigView only contains ConfigList, we can remove ConfigView and just use ConfigList. Signed-off-by: Masahiro Yamada commit 7930dd91a01fe9c0ff7664c7f0bdf38fba9047bc Author: Masahiro Yamada Date: Sat Aug 29 17:14:14 2020 +0900 kconfig: qconf: move setShowName/Range() to ConfigList from ConfigView ConfigView::setShowName/Range() only get access to the 'list' member. Move them to the more relevant ConfigList class. Signed-off-by: Masahiro Yamada commit f3eea294e93facc78ffcf3881f88ea02732283a9 Author: Masahiro Yamada Date: Sat Aug 29 17:14:13 2020 +0900 kconfig: qconf: remove ConfigLineEdit class Now that "int", "hex", "string" menus are edited in-place, this class is no longer needed. Signed-off-by: Masahiro Yamada commit 37162a68bf517b6f870d63bbbcc65a81f99bd968 Author: Masahiro Yamada Date: Sat Aug 29 17:14:12 2020 +0900 kconfig: qconf: allow to edit "int", "hex", "string" menus in-place Previously, when you double-clicked the "int", "hex", or "string" menus, a line-edit gadget showed up to allow you to input the value, which looked clumsy. Also, it was buggy; the editor opened even if the config option was not editable. For example, just try to double-click CC_VERSION_TEXT, which has no prompt. This commit sub-classes QStyleItemDelegate to allow users to edit "int", "hex", "string" menus in-place. Just double-click (or press the F2 key) in the data column. Then, an editor widget is placed on top of the item view. The two methods are overridden: createEditor - process only when the data column is being accessed and the menu is visible. Otherwise, return nullptr to disallow editing. setModelData - take the new data from the editor, and set it to the addressed symbol. If it was successful, update all the list windows. Otherwise, (the reason for the failure is possibly the input data was out of range), set the old value back to the editor. Signed-off-by: Masahiro Yamada commit 669a1ee46a0e2ccad769ceca70b08ee57772be94 Author: Masahiro Yamada Date: Sat Aug 29 17:14:11 2020 +0900 kconfig: qconf: show data column all the time The next commit will allow users to edit "int", "hex", "string" menus in-place from the data column. The data column should be always displayed. Signed-off-by: Masahiro Yamada commit f9b918fae678eacdeaad821db57a107fba6fe3a1 Author: Masahiro Yamada Date: Sat Aug 29 17:14:10 2020 +0900 kconfig: qconf: move ConfigView::updateList(All) to ConfigList class ConfigView::updateList() iterates over all views, and then calls updateList() against for its ConfigList instance. This means there is no point to implement it in the ConfigView class. Move and rename as follows: ConfigView::updateList() -> ConfigList::updateListForAll() ConfigView::updateListAll() -> ConfigList::updateListAllForAll() I used QList to contain all ConfigList instances. Signed-off-by: Masahiro Yamada commit 6a143041532e7df4bd243f4994d46112bd7137ca Author: Masahiro Yamada Date: Sat Aug 29 17:14:09 2020 +0900 kconfig: qconf: remove unused ConfigItem::okRename() Commit 76538660fb08 ("Port xconfig to Qt5 - Remove custom ListView classes.") removed the original implementation, where ConfigItem::okRename() overrode Q3ListViewItem::okRename(). Commit 59e564408f88 ("Port xconfig to Qt5 - Put back some of the old implementation.") restored the empty stub, but it seems useless. Signed-off-by: Masahiro Yamada commit 1fb752416f3fb64bfe44d94b7dd646799676b523 Author: Masahiro Yamada Date: Sat Aug 29 17:14:08 2020 +0900 kconfig: qconf: update the intro message to match to the current code I do not think "Although there is no cross reference yet ..." is valid any longer. The cross reference is supported via hyperlinks enabled by the "show Debug Info" option. Update the message. Signed-off-by: Masahiro Yamada Tested-by: Randy Dunlap commit 8c30e7e60d4352c4a98c6ba3f90d602d7500c1df Author: Masahiro Yamada Date: Sat Aug 29 17:14:07 2020 +0900 kconfig: qconf: reformat the intro message The introduction message displayed by 'Help -> Introduction' does not look nice due to excessive new lines. Reformat the message. Signed-off-by: Masahiro Yamada Tested-by: Randy Dunlap commit 87de84c9140e1ccb221c68bb7e4939e880b3f2bb Author: Masahiro Yamada Date: Thu Sep 10 22:51:20 2020 +0900 kbuild: remove cc-option test of -Werror=date-time The minimal compiler versions, GCC 4.9 and Clang 10 support this flag. Here is the godbolt: https://godbolt.org/z/xvjcMa Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Acked-by: Will Deacon commit 7d4eb0d8e229fa51e14f0f85de03c02880e7d742 Author: Masahiro Yamada Date: Thu Sep 10 22:51:19 2020 +0900 kbuild: remove cc-option test of -fno-stack-check The minimal compiler version, GCC 4.9 supports this flag. Nathan Chancellor pointed out: "This flag is technically ignored by clang (see commit 05b0798916f01690b5903302e51f3136274e291f) but that obviously does not matter for the sake of this." Here is the godbolt: https://godbolt.org/z/59cK6o Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit 8b42cf2fde0ee8b63d71d4bc442a03b6ea55b00b Author: Masahiro Yamada Date: Thu Sep 10 22:51:17 2020 +0900 kbuild: remove cc-option test of -fno-strict-overflow The minimal compiler versions, GCC 4.9 and Clang 10 support this flag. Here is the godbolt: https://godbolt.org/z/odq8h9 Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Acked-by: Will Deacon commit bb2732112bc52bed7b20b9fc59d7246e4e7ce5ed Author: Masahiro Yamada Date: Thu Sep 10 22:44:29 2020 +0900 kbuild: move CFLAGS_{KASAN,UBSAN,KCSAN} exports to relevant Makefiles Move CFLAGS_KASAN*, CFLAGS_UBSAN, CFLAGS_KCSAN to Makefile.kasan, Makefile.ubsan, Makefile.kcsan, respectively. This commit also avoids the same -fsanitize=* flags being added to CFLAGS_UBSAN multiple times. Prior to this commit, the ubsan flags were appended by the '+=' operator, without any initialization. Some build targets such as 'make bindeb-pkg' recurses to the top Makefile, and ended up with adding the same flags to CFLAGS_UBSAN twice. Clear CFLAGS_UBSAN with ':=' to make it a simply expanded variable. This is better than a recursively expanded variable, which evaluates $(call cc-option, ...) multiple times before Kbuild starts descending to subdirectories. Signed-off-by: Masahiro Yamada Acked-by: Marco Elver commit 9909b7681222299dcb6f3b0613c30a65498b6c72 Author: Masahiro Yamada Date: Thu Sep 10 22:44:28 2020 +0900 kbuild: remove redundant CONFIG_KASAN check from scripts/Makefile.kasan Since commit e0fe0bbe57b8 ("kbuild: include scripts/Makefile.* only when relevant CONFIG is enabled"), this file is included only when CONFIG_KASAN=y. This ifdef is redundant. Signed-off-by: Masahiro Yamada Acked-by: Marco Elver commit 6212804f2d78e86f15dba5b46a4065cbf1403cde Author: Masahiro Yamada Date: Wed Sep 9 05:55:57 2020 +0900 kbuild: do not create built-in objects for external module builds 'make M=/path/to/your/external/module' creates a pointless built-in.a in the top of the external module directory because KBUILD_BUILTIN is set to 1. Clear KBUILD_BUILTIN when we are building external modules so that 'make M=...' and 'make M=... modules' work equivalently. Signed-off-by: Masahiro Yamada commit 596b0474d3d9b1242eab713f84d8873f9887d980 Author: Masahiro Yamada Date: Tue Sep 8 13:27:08 2020 +0900 kbuild: preprocess module linker script There was a request to preprocess the module linker script like we do for the vmlinux one. (https://lkml.org/lkml/2020/8/21/512) The difference between vmlinux.lds and module.lds is that the latter is needed for external module builds, thus must be cleaned up by 'make mrproper' instead of 'make clean'. Also, it must be created by 'make modules_prepare'. You cannot put it in arch/$(SRCARCH)/kernel/, which is cleaned up by 'make clean'. I moved arch/$(SRCARCH)/kernel/module.lds to arch/$(SRCARCH)/include/asm/module.lds.h, which is included from scripts/module.lds.S. scripts/module.lds is fine because 'make clean' keeps all the build artifacts under scripts/. You can add arch-specific sections in . Signed-off-by: Masahiro Yamada Tested-by: Jessica Yu Acked-by: Will Deacon Acked-by: Geert Uytterhoeven Acked-by: Palmer Dabbelt Reviewed-by: Kees Cook Acked-by: Jessica Yu commit df885d912f678f45a867c4eb3f3a5b0ea17796f4 Author: Chris Packham Date: Thu Sep 24 20:51:02 2020 +1200 hwmon: (adm9240) Convert to regmap Convert the adm9240 driver to using regmap and add error handling. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20200924085102.15219-4-chris.packham@alliedtelesis.co.nz [groeck: Fixed context conflict against 'hwmon: use simple i2c probe function'] Signed-off-by: Guenter Roeck commit 76bd5c016ef49683d626a48748ef1764aaf8ba63 Author: Olga Kornievskaia Date: Mon Sep 14 17:05:08 2020 -0400 NFSv4: make cache consistency bitmask dynamic Client uses static bitmask for GETATTR on CLOSE/WRITE/DELEGRETURN and ignores the fact that it might have some attributes marked invalid in its cache. Compared to v3 where all attributes are retrieved in postop attributes, v4's cache is frequently out of sync and leads to standalone GETATTRs being sent to the server. Instead, in addition to the minimum cache consistency attributes also check cache_validity and adjust the GETATTR request accordingly. Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit 9f2664512711788e4e1d06f25a925eb7ac681582 Author: Wang Qing Date: Thu Sep 17 10:19:00 2020 +0800 nfs: fix spellint typo in pnfs.c Change the comment typo: "manger" -> "manager". Signed-off-by: Wang Qing Signed-off-by: Anna Schumaker commit 6a8cdd146459a4f48d2932908b608cf44f18970e Author: Chris Packham Date: Thu Sep 24 20:51:01 2020 +1200 hwmon: (adm9240) Create functions for updating measure and config Split the body of adm9240_update_device() into two helper functions adm9240_update_measure() and adm9240_update_config(). Although neither of the new helpers returns an error yet lay the groundwork for propagating failures through to the sysfs readers. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20200924085102.15219-3-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck commit 10d097737dfe27bb0bf3f825b5ff28d26053a8c6 Author: Chris Packham Date: Thu Sep 24 20:51:00 2020 +1200 hwmon: (adm9240) Use loops to avoid duplicated code Use loops for reading temp_max and initialising FAN_MIN/TEMP_MAX rather than duplicating code. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20200924085102.15219-2-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck commit a3b1e8451d3fd54fe0df661c2c4f983932b3c0bc Author: Kan Liang Date: Mon Sep 14 07:34:20 2020 -0700 perf/x86/intel/uncore: Support PCIe3 unit on Snow Ridge The Snow Ridge integrated PCIe3 uncore unit can be used to collect performance data, e.g. utilization, between PCIe devices, plugged into the PCIe port, and the components (in M2IOSF) responsible for translating and managing requests to/from the device. The performance data is very useful for analyzing the performance of PCIe devices. The device with the PCIe3 uncore PMON units is owned by the portdrv_pci driver. Create a PCI sub driver for the PCIe3 uncore PMON units. Here are some difference between PCIe3 uncore unit and other uncore pci units. - There may be several Root Ports on a system. But the uncore counters only exist in the Root Port A. A user can configure the channel mask to collect the data from other Root Ports. - The event format of the PCIe3 uncore unit is the same as IIO unit of SKX. - The Control Register of PCIe3 uncore unit is 64 bits. - The offset of each counters is 8, which is the same as M2M unit of SNR. - New MSR addresses for unit control, counter and counter config. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1600094060-82746-7-git-send-email-kan.liang@linux.intel.com commit 95a7fc77443328ac8b68378df8e137a044ece5e8 Author: Kan Liang Date: Mon Sep 14 07:34:19 2020 -0700 perf/x86/intel/uncore: Generic support for the PCI sub driver Some uncore counters may be located in the configuration space of a PCI device, which already has a bonded driver. Currently, the uncore driver cannot register a PCI uncore PMU for these counters, because, to register a PCI uncore PMU, the uncore driver must be bond to the device. However, one device can only have one bonded driver. Add an uncore PCI sub driver to support such kind of devices. The sub driver doesn't own the device. In initialization, the sub driver searches the device via pci_get_device(), and register the corresponding PMU for the device. In the meantime, the sub driver registers a PCI bus notifier, which is used to notify the sub driver once the device is removed. The sub driver can unregister the PMU accordingly. The sub driver only searches the devices defined in its id table. The id table varies on different platforms, which will be implemented in the following platform-specific patch. Suggested-by: Bjorn Helgaas Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1600094060-82746-6-git-send-email-kan.liang@linux.intel.com commit cdcce92a3a03bccbb0b4a0342fc7e279fc507bc3 Author: Kan Liang Date: Mon Sep 14 07:34:18 2020 -0700 perf/x86/intel/uncore: Factor out uncore_pci_pmu_unregister() The PMU unregistration in the uncore PCI sub driver is similar as the normal PMU unregistration for a PCI device. The codes to unregister a PCI PMU can be shared. Factor out uncore_pci_pmu_unregister(), which will be used later. Use uncore_pci_get_dev_die_info() to replace the codes which retrieve the socket and die informaion. The pci_set_drvdata() is not included in uncore_pci_pmu_unregister() as well, because the uncore PCI sub driver will not touch the private driver data pointer of the device. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1600094060-82746-5-git-send-email-kan.liang@linux.intel.com commit 16fa64315c1bd2a61fb20d6aa9a542dd5bf52971 Author: Kan Liang Date: Mon Sep 14 07:34:17 2020 -0700 perf/x86/intel/uncore: Factor out uncore_pci_pmu_register() The PMU registration in the uncore PCI sub driver is similar as the normal PMU registration for a PCI device. The codes to register a PCI PMU can be shared. Factor out uncore_pci_pmu_register(), which will be used later. The pci_set_drvdata() is not included in uncore_pci_pmu_register(). The uncore PCI sub driver doesn't own the PCI device. It will not touch the private driver data pointer for the device. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1600094060-82746-4-git-send-email-kan.liang@linux.intel.com commit 8ed2ccaa3fa990be61619a61b9bc3914eefdc18f Author: Kan Liang Date: Mon Sep 14 07:34:16 2020 -0700 perf/x86/intel/uncore: Factor out uncore_pci_find_dev_pmu() When an uncore PCI sub driver gets a remove notification, the corresponding PMU has to be retrieved and unregistered. The codes, which find the corresponding PMU by comparing the pci_device_id table, can be shared. Factor out uncore_pci_find_dev_pmu(), which will be used later. There is no functional change. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1600094060-82746-3-git-send-email-kan.liang@linux.intel.com commit fe6507338d635f283e9618b5eaa35f503a8c375b Author: Kan Liang Date: Mon Sep 14 07:34:15 2020 -0700 perf/x86/intel/uncore: Factor out uncore_pci_get_dev_die_info() The socket and die information is required to register/unregister a PMU in the uncore PCI sub driver. The codes, which get the socket and die information from a BUS number, can be shared. Factor out uncore_pci_get_dev_die_info(), which will be used later. There is no functional change. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1600094060-82746-2-git-send-email-kan.liang@linux.intel.com commit 9ed9647dc0671486f9e998b7258f75167a9c4697 Author: Kim Phillips Date: Mon Sep 21 09:43:30 2020 -0500 perf/amd/uncore: Inform the user how many counters each uncore PMU has Previously, the uncore driver would say "NB counters detected" on F17h machines, which don't have NorthBridge (NB) counters. They have Data Fabric (DF) counters. Just use the pmu.name to inform users which pmu to use and its associated counter count. F17h dmesg BEFORE: amd_uncore: AMD NB counters detected amd_uncore: AMD LLC counters detected F17h dmesg AFTER: amd_uncore: 4 amd_df counters detected amd_uncore: 6 amd_l3 counters detected Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200921144330.6331-5-kim.phillips@amd.com commit 87a54a1fd525f2af8d82becf583c7e836918cf22 Author: Kim Phillips Date: Mon Sep 21 09:43:29 2020 -0500 perf/amd/uncore: Allow F19h user coreid, threadmask, and sliceid specification On Family 19h, the driver checks for a populated 2-bit threadmask in order to establish that the user wants to measure individual slices, individual cores (only one can be measured at a time), and lets the user also directly specify enallcores and/or enallslices if desired. Example F19h invocation to measure L3 accesses (event 4, umask 0xff) by the first thread (id 0 -> mask 0x1) of the first core (id 0) on the first slice (id 0): perf stat -a -e instructions,amd_l3/umask=0xff,event=0x4,coreid=0,threadmask=1,sliceid=0,enallcores=0,enallslices=0/ Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200921144330.6331-4-kim.phillips@amd.com commit 8170f386f19ca7120393c957d4bfbdc07f964ab6 Author: Kim Phillips Date: Mon Sep 21 09:43:28 2020 -0500 perf/amd/uncore: Allow F17h user threadmask and slicemask specification Continue to fully populate either one of threadmask or slicemask if the user doesn't. Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200921144330.6331-3-kim.phillips@amd.com commit 06f2c24584f31bc16129643bfb8239a1af82a17f Author: Kim Phillips Date: Mon Sep 21 09:43:27 2020 -0500 perf/amd/uncore: Prepare to scale for more attributes that vary per family Replace AMD_FORMAT_ATTR with the more apropos DEFINE_UNCORE_FORMAT_ATTR stolen from arch/x86/events/intel/uncore.h. This way we can clearly see the bit-variants of each of the attributes that want to have the same name across families. Also unroll AMD_ATTRIBUTE because we are going to separately add new attributes that differ between DF and L3. Also clean up the if-Family 17h-else logic in amd_uncore_init. This is basically a rewrite of commit da6adaea2b7e ("perf/x86/amd/uncore: Update sysfs attributes for Family17h processors"). No functional changes. Tested F17h+ /sys/bus/event_source/devices/amd_{l3,df}/format/* content remains unchanged: /sys/bus/event_source/devices/amd_l3/format/event:config:0-7 /sys/bus/event_source/devices/amd_l3/format/umask:config:8-15 /sys/bus/event_source/devices/amd_df/format/event:config:0-7,32-35,59-60 /sys/bus/event_source/devices/amd_df/format/umask:config:8-15 Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200921144330.6331-2-kim.phillips@amd.com commit e9ffc8c1b83931599663c21ba9082bcafa51d333 Author: Jarkko Sakkinen Date: Mon Sep 21 21:24:25 2020 -0400 kprobes: Use module_name() macro It is advised to use module_name() macro instead of dereferencing mod->name directly. This makes sense for consistencys sake and also it prevents a hard dependency to CONFIG_MODULES. Signed-off-by: Jarkko Sakkinen Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20200818050857.117998-1-jarkko.sakkinen@linux.intel.com commit 412b7a521c3094cc0d664dd20d114c717df89896 Author: Jon Hunter Date: Wed Sep 16 10:49:49 2020 +0100 dt-bindings: eeprom: at24: Add label property for AT24 Add a label property for the AT24 EEPROM to allow a custom name to be used for identifying the EEPROM on a board. This is useful when there is more than one EEPROM present. Signed-off-by: Jon Hunter Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit f434f9b7afca80e8abfe5d52b20fe34c39dd2c14 Author: Jon Hunter Date: Thu Sep 24 15:18:16 2020 +0200 eeprom: at24: Initialise AT24 NVMEM ID field The AT24 EEPROM driver does not initialise the 'id' field of the nvmem_config structure and because the entire structure is not initialised, it ends up with a random value. This causes the NVMEM driver to append the device 'devid' value to name of the NVMEM device. Ideally for I2C devices such as the AT24 that already have a unique name, we would not bother to append the 'devid'. However, given that this has always been done for AT24 devices, we cannot remove the 'devid' as this will change the name of the userspace sysfs node for the NVMEM device. Nonetheless we should ensure that the 'id' field of the nvmem_config structure is initialised so that there is no chance of a random value causes problems in the future. Therefore, set the NVMEM config.id to NVMEM_DEVID_AUTO for AT24 EEPROMs so that the 'devid' is always appended. Signed-off-by: Jon Hunter Signed-off-by: Bartosz Golaszewski commit 9eb29f2ed95edda511ce28651b1d7cdef3614c12 Merge: 26ed5146bd17c 86d6e5793e0fa Author: Greg Kroah-Hartman Date: Thu Sep 24 15:15:11 2020 +0200 Merge tag 'icc-5.10-rc1' of https://git.linaro.org/people/georgi.djakov/linux into char-misc-next Georgi writes: interconnect changes for 5.10 Here are the interconnect changes for the 5.10-rc1 merge window consisting of core changes, new drivers and cleanups. Core changes: - New bulk API helpers for managing multiple interconnect paths. - New xlate_extended() interface for parsing additional data from DT. - Support for sync_state(). Driver changes: - New drivers for SM8150 and SM8250 platforms. - New drivers for the Qualcomm OSM and EPSS hardware blocks. - Per-BCM scaling factor support. - Misc cleanups. Signed-off-by: Georgi Djakov * tag 'icc-5.10-rc1' of https://git.linaro.org/people/georgi.djakov/linux: (28 commits) interconnect: imx: simplify the return expression of imx_icc_unregister interconnect: imx: Simplify with dev_err_probe() interconnect: core: Simplify with dev_err_probe() interconnect: qcom: Use icc_sync_state interconnect: Add sync state support interconnect: Add get_bw() callback interconnect: qcom: osm-l3: Mark more structures const interconnect: qcom: Add EPSS L3 support on SM8250 dt-bindings: interconnect: Add EPSS L3 DT binding on SM8250 interconnect: qcom: Lay the groundwork for adding EPSS support interconnect: qcom: Add OSM L3 support on SM8150 dt-bindings: interconnect: Add OSM L3 DT binding on SM8150 interconnect: qcom: sc7180: Replace xlate with xlate_extended interconnect: qcom: sdm845: Replace xlate with xlate_extended interconnect: qcom: Implement xlate_extended() to parse tags dt-bindings: interconnect: Document the support of optional path tag interconnect: Introduce xlate_extended() callback interconnect: qcom: Add support for per-BCM scaling factors interconnect: qcom: Only wait for completion in AMC/WAKE by default interconnect: qcom: Support bcm-voter-specific TCS wait behavior ... commit 09fb37b35e34d4735c5cc0a60a6948c44a9c3181 Author: Hou Zhiqiang Date: Fri Sep 18 16:00:24 2020 +0800 misc: pci_endpoint_test: Add driver data for Layerscape PCIe controllers The commit 0a121f9bc3f5 ("misc: pci_endpoint_test: Use streaming DMA APIs for buffer allocation") changed to use streaming DMA APIs, however, dma_map_single() might not return a 4KB aligned address, so add the default_data as driver data for Layerscape PCIe controllers to make it 4KB aligned. Link: https://lore.kernel.org/r/20200918080024.13639-13-Zhiqiang.Hou@nxp.com Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring commit 6b8ab42137e9849ed15e00d5feaf1fa3859b4862 Author: Xiaowei Bao Date: Fri Sep 18 16:00:23 2020 +0800 misc: pci_endpoint_test: Add LS1088a in pci_device_id table Add LS1088a in pci_device_id table so that pci-epf-test can be used for testing PCIe EP in LS1088a. Link: https://lore.kernel.org/r/20200918080024.13639-12-Zhiqiang.Hou@nxp.com Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit 0caf60c4b110b5aea9a0700be277421c1f575041 Author: Amey Narkhede Date: Fri Sep 18 00:56:25 2020 +0530 mmc: mediatek: Drop pointer to mmc_host from msdc_host The MediaTek MMC driver uses pointer to get from private msdc_host structure to the generic mmc_host structure. However mmc_host always precedes msdc_host in memory so compute its address with a subtraction (which is cheaper than a dereference) using mmc_from_priv() and drop the extra pointer. Signed-off-by: Amey Narkhede Link: https://lore.kernel.org/r/20200917192624.548720-1-ameynarkhede03@gmail.com Signed-off-by: Ulf Hansson commit 7931b2d56ea4f95ed54d578b483f7c0a28c84a70 Author: Amit Singh Tomar Date: Fri Sep 11 10:54:09 2020 +0530 dt-bindings: mmc: owl: add compatible string actions,s700-mmc The commit adds a new SoC specific compatible string "actions,s700-mmc" in combination with more generic string "actions,owl-mmc". Placement order of these strings should abide by the principle of "from most specific to most general". Reviewed-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Amit Singh Tomar Link: https://lore.kernel.org/r/1599801849-6071-1-git-send-email-amittomer25@gmail.com Signed-off-by: Ulf Hansson commit a2178b83ae8f61b2a9fae2aa9a4d4ed2511690a4 Author: Faiz Abbas Date: Thu Sep 24 16:56:44 2020 +0530 arm64: dts: ti: k3-j7200-common-proc-board: Add support for eMMC and SD card Add support for the eMMC and SD card connected on the common processor board sdhci0 is connected to an eMMC while sdhci1 is connected to the micro SD slot. Signed-off-by: Faiz Abbas Signed-off-by: Nishanth Menon Tested-by: Vignesh Raghavendra Reviewed-by: Sekhar Nori Link: https://lore.kernel.org/r/20200924112644.11076-3-faiz_abbas@ti.com commit 7cd03dc78b290400875b6b54e257ba5ea4e810c3 Author: Faiz Abbas Date: Thu Sep 24 16:56:43 2020 +0530 arm64: dts: ti: k3-j7200-main: Add support for MMC/SD controller nodes Add support for MMC/SD controller nodes present on TI's j7200 SoCs. There are two nodes: 1. sdhci0 (8 bit bus width, 200 MHz, HS200, 200 MBps) 2. sdhci1 (4 bit bus width, 50 MHz, HS, 25 MBps) Signed-off-by: Faiz Abbas Signed-off-by: Nishanth Menon Tested-by: Vignesh Raghavendra Reviewed-by: Sekhar Nori Link: https://lore.kernel.org/r/20200924112644.11076-2-faiz_abbas@ti.com commit f09a433b1e4057e6379b7e1207548fff30d5dca3 Author: Amit Kumar Mahapatra Date: Thu Sep 24 09:11:19 2020 +0200 spi: spi-zynqmp-gqspi: Fix incorrect indentation Fixed incorrect indentation in ZynqMP qspi controller driver. Signed-off-by: Amit Kumar Mahapatra Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/2b246b6f0925c8a2a767a4240e8738ffeefd62be.1600931476.git.michal.simek@xilinx.com Signed-off-by: Mark Brown commit 1c26372e5aa9e53391a1f8fe0dc7cd93a7e5ba9e Author: Amit Kumar Mahapatra Date: Thu Sep 24 09:11:18 2020 +0200 spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework Updated Zynqmp qspi controller driver to use spi-mem framework. Signed-off-by: Amit Kumar Mahapatra Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/490a7642a975f4d3dd9618304e9e45f7e2414661.1600931476.git.michal.simek@xilinx.com Signed-off-by: Mark Brown commit 91af6eb04a6bbdb8bec8ed6d8ac7850a26604bad Author: Amit Kumar Mahapatra Date: Thu Sep 24 09:11:17 2020 +0200 spi: spi-zynqmp-gqspi: Fix kernel-doc warnings Fix kernel-doc warnings in ZynqMP qspi driver file. Signed-off-by: Amit Kumar Mahapatra Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/ba5920c57eee06fafa6f9d1df9859e69819ac301.1600931476.git.michal.simek@xilinx.com Signed-off-by: Mark Brown commit fb2c599f056640d289b2147fbe6d9eaee689f1b2 Author: Andreas Kemnade Date: Fri Sep 11 18:12:09 2020 +0200 ARM: omap3: enable off mode automatically Enabling off mode was only reachable deeply hidden in the debugfs. As powersaving is an important feature, move the option out of its shady place. The debugfs file can still be used to override the default. Use the presence of a device compatible to ti,twl4030-idle or ti,twl4030-idle-osc-off as an indicator that the board is wired correctly for off mode. Signed-off-by: Andreas Kemnade [tony@atomide.com: updated to fix a checkpatch warning] Signed-off-by: Tony Lindgren commit 0bf331496ae0a49758fd1082d7886e7dd90da41d Author: Vignesh Raghavendra Date: Wed Sep 23 22:01:50 2020 +0530 arm64: dts: ti: k3-j7200-som-p0: Add HyperFlash node J7200 SoM has a HyperFlash connected to HyperBus memory controller. But HyperBus is muxed with OSPI, therefore keep HyperBus node disabled. Bootloader will detect the mux and enable the node as required. Signed-off-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Reviewed-by: Sekhar Nori Link: https://lore.kernel.org/r/20200923163150.16973-3-vigneshr@ti.com commit 1b77265626a44f38d5583256247195bba2c1934c Author: Vignesh Raghavendra Date: Wed Sep 23 22:01:49 2020 +0530 arm64: dts: ti: k3-j7200-mcu-wakeup: Add HyperBus node J7200 has a Flash SubSystem that has one OSPI and one HyperBus.. Add DT nodes for HyperBus controller for now. Signed-off-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Reviewed-by: Sekhar Nori Link: https://lore.kernel.org/r/20200923163150.16973-2-vigneshr@ti.com commit e25889f8f5db5e3c4edb428611329c105bfdf7cf Author: Vignesh Raghavendra Date: Wed Sep 23 21:24:00 2020 +0530 arm64: dts: ti: k3-j7200-common-proc-board: Add I2C IO expanders Add DT nodes for I2C GPIO expanders on main_i2c0 and main_i2c1 and also add the pinmux corresponding to these I2C instances. Signed-off-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Reviewed-by: Sekhar Nori Reviewed-by: Faiz Abbas Link: https://lore.kernel.org/r/20200923155400.13757-3-vigneshr@ti.com commit 03bfeb528772d2521abe14b2e24c9b5645dcb26f Author: Vignesh Raghavendra Date: Wed Sep 23 21:23:59 2020 +0530 arm64: dts: ti: k3-j7200: Add I2C nodes J7200 has 7 I2Cs in main domain, 2 I2Cs in MCU and 1 in wakeup domain. Add DT nodes for the same. Signed-off-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Reviewed-by: Sekhar Nori Reviewed-by: Faiz Abbas Link: https://lore.kernel.org/r/20200923155400.13757-2-vigneshr@ti.com commit 95ac5bf4e471ab1f37bca522e5ea4e474fbcec31 Author: Jonathan Cameron Date: Tue Aug 18 22:24:30 2020 +0800 irq-chip/gic-v3-its: Fix crash if ITS is in a proximity domain without processor or memory Note this crash is present before any of the patches in this series, but as explained below it is highly unlikely anyone is shipping a firmware that causes it. Tests were done using an overriden SRAT. On ARM64, the gic-v3 driver directly parses SRAT to locate GIC Interrupt Translation Service (ITS) Affinity Structures. This is done much later in the boot than the parses of SRAT which identify proximity domains. As a result, an ITS placed in a proximity domain that is not defined by another SRAT structure will result in a NUMA node that is not completely configured and a crash. ITS [mem 0x202100000-0x20211ffff] ITS@0x0000000202100000: Using ITS number 0 Unable to handle kernel paging request at virtual address 0000000000001a08 ... Call trace: __alloc_pages_nodemask+0xe8/0x338 alloc_pages_node.constprop.0+0x34/0x40 its_probe_one+0x2f8/0xb18 gic_acpi_parse_madt_its+0x108/0x150 acpi_table_parse_entries_array+0x17c/0x264 acpi_table_parse_entries+0x48/0x6c acpi_table_parse_madt+0x30/0x3c its_init+0x1c4/0x644 gic_init_bases+0x4b8/0x4ec gic_acpi_init+0x134/0x264 acpi_match_madt+0x4c/0x84 acpi_table_parse_entries_array+0x17c/0x264 acpi_table_parse_entries+0x48/0x6c acpi_table_parse_madt+0x30/0x3c __acpi_probe_device_table+0x8c/0xe8 irqchip_init+0x3c/0x48 init_IRQ+0xcc/0x100 start_kernel+0x33c/0x548 ACPI 6.3 allows any set of Affinity Structures in SRAT to define a proximity domain. However, as we do not see this crash, we can conclude that no firmware is currently placing an ITS in a node that is separate from those containing memory and / or processors. We could modify the SRAT parsing behavior to identify the existence of Proximity Domains unique to the ITS structures, and handle them as a special case of a generic initiator (once support for those merges). This patch avoids the complexity that would be needed to handle this corner case, by not allowing the ITS entry parsing code to instantiate new NUMA Nodes. If one is encountered that does not already exist, then NO_NUMA_NODE is assigned and a warning printed just as if the value had been greater than allowed NUMA Nodes. "SRAT: Invalid NUMA node -1 in ITS affinity" Whilst this does not provide the full flexibility allowed by ACPI, it does fix the problem. We can revisit a more sophisticated solution if needed by future platforms. Change is simply to replace acpi_map_pxm_to_node with pxm_to_node reflecting the fact a new mapping is not created. Signed-off-by: Jonathan Cameron Reviewed-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit a62d07e0006a3a3ce77041ca07f3c488ec880790 Author: Jonathan Cameron Date: Tue Aug 18 22:24:29 2020 +0800 ACPI: Remove side effect of partly creating a node in acpi_get_node() acpi_get_node() calls acpi_get_pxm() to evaluate the _PXM AML method for entries found in DSDT/SSDT. ACPI 6.3 sec 6.2.14 states "_PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in the System Resource Affinity Table (SRAT)." Hence a _PXM method should not result in creation of a new NUMA node. Before this patch, _PXM could result in partial instantiation of NUMA node, missing elements such as zone lists. A call to devm_kzalloc(), for example, results in a NULL pointer dereference. This patch therefore replaces the acpi_map_pxm_to_node() with a call to pxm_to_node(). Signed-off-by: Jonathan Cameron Reviewed-by: Hanjun Guo Reviewed-by: Barry Song Signed-off-by: Rafael J. Wysocki commit 4eb3723f18e9ba4d4b13d82b6f7e68dd50a852ea Author: Jonathan Cameron Date: Tue Aug 18 22:24:28 2020 +0800 ACPI: Rename acpi_map_pxm_to_online_node() to pxm_to_online_node() As this function is no longer allowed to create new mappings let us rename it to reflect this. Note all nodes should already exist before any of the users of this function are called. Signed-off-by: Jonathan Cameron Reviewed-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit fe205d984e7730f4d21f6f8ebc60f0698404ac31 Author: Jonathan Cameron Date: Tue Aug 18 22:24:27 2020 +0800 ACPI: Remove side effect of partly creating a node in acpi_map_pxm_to_online_node() While this function will only return an online node, it can have the side effect of partially creating a new node. The existing comments suggest this is intentional, but the usecases of this function are related to NFIT and HMAT parsing, neither of which should be able to define new nodes. One route by which the existing behaviour would cause a crash is to have a _PXM entry in ACPI DSDT attempt to place a device within this partly created proximity domain. A subsequent call to devm_kzalloc() or similar would result in an attempt to allocate memory on a node for which zone lists have not been set up and a NULL pointer dereference. Prevent such cases by switching to pxm_to_node() within acpi_map_pxm_to_online_node() which cannot cause a new node to be partly created. If one would previously have been created we now return NO_NUMA_NODE. Documentation updated to reflect this change. Signed-off-by: Jonathan Cameron Reviewed-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 01feba590cd610780c463aa3d498200ba4503703 Author: Jonathan Cameron Date: Tue Aug 18 22:24:26 2020 +0800 ACPI: Do not create new NUMA domains from ACPI static tables that are not SRAT Several ACPI static tables contain references to proximity domains. ACPI 6.3 has clarified that only entries in SRAT may define a new domain (sec 5.2.16). Those tables described in the ACPI spec have additional clarifying text. NFIT: Table 5-132, "Integer that represents the proximity domain to which the memory belongs. This number must match with corresponding entry in the SRAT table." HMAT: Table 5-145, "... This number must match with the corresponding entry in the SRAT table's processor affinity structure ... if the initiator is a processor, or the Generic Initiator Affinity Structure if the initiator is a generic initiator". IORT and DMAR are defined by external specifications. Intel Virtualization Technology for Directed I/O Rev 3.1 does not make any explicit statements, but the general SRAT statement above will still apply. https://software.intel.com/sites/default/files/managed/c5/15/vt-directed-io-spec.pdf IO Remapping Table, Platform Design Document rev D, also makes not explicit statement, but refers to ACPI SRAT table for more information and again the generic SRAT statement above applies. https://developer.arm.com/documentation/den0049/d/ In conclusion, any proximity domain specified in these tables, should be a reference to a proximity domain also found in SRAT, and they should not be able to instantiate a new domain. Hence we switch to pxm_to_node() which will only return existing nodes. Signed-off-by: Jonathan Cameron Reviewed-by: Barry Song Reviewed-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 8a3decac087aa897df5af04358c2089e52e70ac4 Author: Jonathan Cameron Date: Tue Aug 18 22:24:25 2020 +0800 ACPI: Add out of bounds and numa_off protections to pxm_to_node() The function should check the validity of the pxm value before using it to index the pxm_to_node_map[] array. Whilst hardening this code may be good in general, the main intent here is to enable following patches that use this function to replace acpi_map_pxm_to_node() for non SRAT usecases which should return NO_NUMA_NODE for PXM entries not matching with those in SRAT. Signed-off-by: Jonathan Cameron Reviewed-by: Barry Song Reviewed-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit fc3b15506d8f22cf1f74fa60b9e4d524e5fe3430 Author: Grygorii Strashko Date: Thu Sep 24 01:09:38 2020 +0300 arm64: dts: ti: k3-j7200-common-proc-board: add mcu cpsw nuss pinmux and phy defs The TI J7200 EVM base board has TI DP83867 PHY connected to external CPSW NUSS Port 1 in rgmii-rxid mode. Hence, add pinmux and Ethernet PHY configuration for TI J7200 SoC MCU Gigabit Ethernet two ports Switch subsystem (CPSW NUSS). Signed-off-by: Grygorii Strashko Signed-off-by: Nishanth Menon Reviewed-by: Suman Anna Link: https://lore.kernel.org/r/20200923220938.30788-5-grygorii.strashko@ti.com commit a323da4b43fd1a9fbbe490375cc090d0b8feb59a Author: Grygorii Strashko Date: Thu Sep 24 01:09:37 2020 +0300 arm64: dts: ti: k3-j7200-mcu: add mcu cpsw nuss node Add DT node for The TI J7200 MCU SoC Gigabit Ethernet two ports Switch subsystem (MCU CPSW NUSS). Signed-off-by: Grygorii Strashko Signed-off-by: Nishanth Menon Reviewed-by: Suman Anna Link: https://lore.kernel.org/r/20200923220938.30788-4-grygorii.strashko@ti.com commit c5d73d8d49f62bddbce0251e0033cd2c919a039f Author: Grygorii Strashko Date: Thu Sep 24 01:09:36 2020 +0300 arm64: dts: ti: k3-j7200-main: add main navss cpts node Add DT node for Main NAVSS CPTS module. Signed-off-by: Grygorii Strashko Signed-off-by: Nishanth Menon Reviewed-by: Suman Anna Link: https://lore.kernel.org/r/20200923220938.30788-3-grygorii.strashko@ti.com commit 463742644e964037d015b1200e2084fd54508007 Author: Peter Ujfalusi Date: Thu Sep 24 01:09:35 2020 +0300 arm64: dts: ti: k3-j7200: add DMA support Add the ringacc and udmap nodes for Main and MCU NAVSS. Signed-off-by: Peter Ujfalusi Signed-off-by: Grygorii Strashko Signed-off-by: Nishanth Menon Reviewed-by: Suman Anna Link: https://lore.kernel.org/r/20200923220938.30788-2-grygorii.strashko@ti.com commit 54ce12e02e44feffa6de4f3a069b7d5c7262a966 Author: Suravee Suthikulpanit Date: Wed Sep 23 12:13:47 2020 +0000 iommu/amd: Re-purpose Exclusion range registers to support SNP CWWB When the IOMMU SNP support bit is set in the IOMMU Extended Features register, hardware re-purposes the following registers: 1. IOMMU Exclusion Base register (MMIO offset 0020h) to Completion Wait Write-Back (CWWB) Base register 2. IOMMU Exclusion Range Limit (MMIO offset 0028h) to Completion Wait Write-Back (CWWB) Range Limit register and requires the IOMMU CWWB semaphore base and range to be programmed in the register offset 0020h and 0028h accordingly. Signed-off-by: Suravee Suthikulpanit Cc: Brijesh Singh Link: https://lore.kernel.org/r/20200923121347.25365-4-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel commit 2818de6e87defc3103fd86bf6357658f7d2a661a Author: Suravee Suthikulpanit Date: Wed Sep 23 12:13:46 2020 +0000 iommu/amd: Add support for RMP_PAGE_FAULT and RMP_HW_ERR IOMMU SNP support introduces two new IOMMU events: * RMP Page Fault event * RMP Hardware Error event Hence, add reporting functions for these events. Signed-off-by: Suravee Suthikulpanit Cc: Brijesh Singh Link: https://lore.kernel.org/r/20200923121347.25365-3-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel commit c69d89aff393a212b9635c95990173b48d8bd74d Author: Suravee Suthikulpanit Date: Wed Sep 23 12:13:45 2020 +0000 iommu/amd: Use 4K page for completion wait write-back semaphore IOMMU SNP support requires the completion wait write-back semaphore to be implemented using a 4K-aligned page, where the page address is to be programmed into the newly introduced MMIO base/range registers. This new scheme uses a per-iommu atomic variable to store the current semaphore value, which is incremented for every completion wait command. Since this new scheme is also compatible with non-SNP mode, generalize the driver to use 4K page for completion-wait semaphore in both modes. Signed-off-by: Suravee Suthikulpanit Cc: Brijesh Singh Link: https://lore.kernel.org/r/20200923121347.25365-2-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel commit 21d3c0402a396f8db9856792193f5e1ee1818aa7 Author: Nicolin Chen Date: Fri Sep 11 00:16:43 2020 -0700 iommu/tegra-smmu: Allow to group clients in same swgroup There can be clients using the same swgroup in DT, for example i2c0 and i2c1. The current driver will add them to separate IOMMU groups, though it has implemented device_group() callback which is to group devices using different swgroups like DC and DCB. All clients having the same swgroup should be also added to the same IOMMU group so as to share an asid. Otherwise, the asid register may get overwritten every time a new device is attached. Signed-off-by: Nicolin Chen Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20200911071643.17212-4-nicoleotsuka@gmail.com Signed-off-by: Joerg Roedel commit 4fba98859b819961d8e1fe862b79052ff4b687b8 Author: Nicolin Chen Date: Fri Sep 11 00:16:42 2020 -0700 iommu/tegra-smmu: Fix iova->phys translation IOVA might not be always 4KB aligned. So tegra_smmu_iova_to_phys function needs to add on the lower 12-bit offset from input iova. Signed-off-by: Nicolin Chen Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20200911071643.17212-3-nicoleotsuka@gmail.com Signed-off-by: Joerg Roedel commit 82fa58e81d9edc77182aaba4110c3124481e6704 Author: Nicolin Chen Date: Fri Sep 11 00:16:41 2020 -0700 iommu/tegra-smmu: Do not use PAGE_SHIFT and PAGE_MASK PAGE_SHIFT and PAGE_MASK are defined corresponding to the page size for CPU virtual addresses, which means PAGE_SHIFT could be a number other than 12, but tegra-smmu maintains fixed 4KB IOVA pages and has fixed [21:12] bit range for PTE entries. So this patch replaces all PAGE_SHIFT/PAGE_MASK references with the macros defined with SMMU_PTE_SHIFT. Signed-off-by: Nicolin Chen Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20200911071643.17212-2-nicoleotsuka@gmail.com Signed-off-by: Joerg Roedel commit b9a32f624f7f1f0dc408fb7e62fbf10a8fe3ad9a Author: Krzysztof Kozlowski Date: Wed Sep 9 17:01:28 2020 +0200 extcon: ptn5150: Use defines for registers The register addresses are not continuous, so use simple defines for them. This also makes it easier to find the address for register. No functional change. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit d0f668101713bd029e7d19a4fe9ddab9a33c8f85 Author: Krzysztof Kozlowski Date: Fri Aug 28 17:13:37 2020 +0200 extcon: palmas: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit ce90c3c9b3ab2e25530a9bb313f3c51718d5d96b Author: Krzysztof Kozlowski Date: Sat Aug 29 14:43:56 2020 +0200 extcon: max8997: Return error code of extcon_dev_allocate() devm_extcon_dev_allocate() can fail of multiple reasons. The call returns proper error code on failure so pass it instead of fixed ENOMEM. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit a4cf11faf86243bab418f406cc8ebf16bd91bcf2 Author: Krzysztof Kozlowski Date: Sat Aug 29 14:43:55 2020 +0200 extcon: max77843: Return error code of extcon_dev_allocate() devm_extcon_dev_allocate() can fail of multiple reasons. The call returns proper error code on failure so pass it instead of fixed ENOMEM. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit 1f339f3384e85b3610482d4af7e500227311c5f2 Author: Krzysztof Kozlowski Date: Sat Aug 29 14:43:54 2020 +0200 extcon: max77693: Return error code of extcon_dev_allocate() devm_extcon_dev_allocate() can fail of multiple reasons. The call returns proper error code on failure so pass it instead of fixed ENOMEM. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit 4e984d83f444901e0187fdb228ce912e2fb7c6ff Author: Krzysztof Kozlowski Date: Sat Aug 29 14:43:53 2020 +0200 extcon: max14577: Return error code of extcon_dev_allocate() devm_extcon_dev_allocate() can fail of multiple reasons. The call returns proper error code on failure so pass it instead of fixed ENOMEM. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit ea6a95d09c1bd28113be8e90fb87c45807b1e674 Author: Ramuthevar Vadivel Murugan Date: Thu Aug 27 14:51:28 2020 +0800 extcon: ptn5150: Set the VBUS and POLARITY property capability Set the capability value of property for VBUS and POLARITY. Signed-off-by: Ramuthevar Vadivel Murugan [cw00.choi: Replace the space with tab for the indentation] Signed-off-by: Chanwoo Choi commit 7e3b1caffcfd8c260b570f21a8dc5abb5b00672c Author: Ramuthevar Vadivel Murugan Date: Thu Aug 27 11:56:32 2020 +0800 extcon: ptn5150: Switch to GENMASK() and BIT() macros Switch to GENMASK() and BIT() macros. Signed-off-by: Ramuthevar Vadivel Murugan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit 611e92a0a3dc654be2cca3617a34b433815cee00 Author: Andy Shevchenko Date: Wed Aug 26 18:23:41 2020 +0300 extcon: ptn5150: Deduplicate parts of dev_err_probe() dev_err_probe() is designed to be used like return dev_err_probe(dev, ret, "Error message\n"); Hence no need to have a separate return statement. Besides that dev_err_probe() prints already returned error code, no need to repeat that either. Signed-off-by: Andy Shevchenko Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit f6dfb3c9a0bb4bc83f6583125bd3df24e38e5779 Author: Alexander A. Klimov Date: Mon Jul 13 15:19:53 2020 +0200 extcon: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Chanwoo Choi commit c29ce4e2b314ca21e0001cb1587e6008eb061939 Author: Krzysztof Kozlowski Date: Mon Aug 17 09:00:09 2020 +0200 MAINTAINERS: Add entry for NXP PTN5150A CC driver Add Krzysztof Kozlowski as maintainer of NXP PTN5150A CC/extcon driver to provide review, feedback and testing. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit 0b0549b6ac72a0fb15cf6e1493852d4046b8e0bb Author: Krzysztof Kozlowski Date: Mon Aug 17 09:00:08 2020 +0200 extcon: ptn5150: Convert to .probe_new The 'struct i2c_device_id' argument of probe function is not used, so convert the driver to simpler 'probe_new' interface. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit 35f1f8f2a3fa0aa41bbb017d2e36248e6878ab68 Author: Krzysztof Kozlowski Date: Mon Aug 17 09:00:07 2020 +0200 extcon: ptn5150: Convert to module_i2c_driver Use module_i2c_driver() to simplify driver init boilerplate. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit b8787ff8a4f4bc9255ce041f7b735d3d2b97b857 Author: Krzysztof Kozlowski Date: Mon Aug 17 09:00:06 2020 +0200 extcon: ptn5150: Reduce the amount of logs on deferred probe There is no point to print deferred probe (and its failures to get resources) as an error. In case of multiple probe tries this would pollute the dmesg. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit fbaf3b67d4d27648daebf31cccd36eee8e26528b Author: Krzysztof Kozlowski Date: Mon Aug 17 09:00:05 2020 +0200 extcon: ptn5150: Make 'vbus-gpios' optional The PTN5150 chip can be used in hardware designs with only reporting of USB Type-C connection, without the VBUS control. The driver however unconditionally expected 'vbus-gpios'. Since all uses of the VBUS GPIO descriptor are NULL safe, the code can accept missing GPIO and provide only extcon status reporting. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit 85256f611f664b0bd0f6c1c0693d0df6e096f279 Author: Krzysztof Kozlowski Date: Mon Aug 17 09:00:04 2020 +0200 extcon: ptn5150: Check current USB mode when probing When machine boots up, the USB could be already in OTG mode. In such case there will be no interrupt coming to ptn5150 device and driver will report default state of nothing connected. Detection of USB connection would happen on first unplug of the cable. Factor out code for checking current connection mode and call it right after probe so the existing USB mode will be properly reported. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit fa31f5871759bd635a81cce02991cb0ddf334ef5 Author: Krzysztof Kozlowski Date: Mon Aug 17 09:00:03 2020 +0200 extcon: ptn5150: Lower the noisiness of probe The ptn5150 driver always prints device type on probe but as raw hex, without any translation to meaningful description. This is useful only for board bring up time so lower the verbosity to debug. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit e095882ee28a7b1c1c19c43606b83ec6a5912666 Author: Krzysztof Kozlowski Date: Mon Aug 17 09:00:02 2020 +0200 extcon: ptn5150: Simplify getting vbus-gpios with flags Instead of obtaining GPIO as input and configuring it right after to output-low, just use proper GPIOD_OUT_LOW flag. Code is smaller and simpler. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit 45ce36f5d262d7361179c21143555ae2c4b261d2 Author: Krzysztof Kozlowski Date: Mon Aug 17 09:00:01 2020 +0200 extcon: ptn5150: Use generic "interrupts" property Interrupts do not have to be always GPIO based so instead of expecting "int-gpios" property and converting the GPIO to an interrupt, just accept any interrupt via generic "interrupts" property. Keep support for old "int-gpios" for backward compatibility. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit 6aaad58c872db062f7ea2761421ca748bd0931cc Author: Krzysztof Kozlowski Date: Mon Aug 17 09:00:00 2020 +0200 extcon: ptn5150: Fix usage of atomic GPIO with sleeping GPIO chips The driver uses atomic version of gpiod_set_value() without any real reason. It is called in a workqueue under mutex so it could sleep there. Changing it to "can_sleep" flavor allows to use the driver with all GPIO chips. Fixes: 4ed754de2d66 ("extcon: Add support for ptn5150 extcon driver") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit e6b02afce100e97292c0eb0cd1ccfa71d0453e48 Author: Krzysztof Kozlowski Date: Mon Aug 17 08:59:59 2020 +0200 dt-bindings: extcon: ptn5150: Make 'vbus-gpios' optional The PTN5150 chip can be used in hardware designs with only reporting of USB Type-C connection, without the VBUS control. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit 5076372d135ae34ef65388a39590576cd9a2436c Author: Krzysztof Kozlowski Date: Mon Aug 17 08:59:58 2020 +0200 dt-bindings: extcon: ptn5150: Use generic "interrupts" property Interrupts do not have to be always GPIO based so instead of expecting "int-gpios" property and converting the GPIO to an interrupt, just accept any interrupt via generic "interrupts" property. Mark the old "int-gpios" as deprecated. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit c7eb1131bdbc4a9efb345c5aceca5deae9f28add Author: Krzysztof Kozlowski Date: Mon Aug 17 08:59:57 2020 +0200 dt-bindings: extcon: ptn5150: Convert binding to DT schema Convert the ptn-5150 extcon driver bindings to DT schema format using json-schema. The differences with original bindings document: - Use "gpios" suffix for the "int" and "vbus" gpio, - Skip generic "pinctrl" property as it is not really required. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi commit d2ef0962492c3be3563e53a431c285678849b3c1 Author: Lu Baolu Date: Tue Sep 22 14:08:43 2020 +0800 iommu/vt-d: Use device numa domain if RHSA is missing If there are multiple NUMA domains but the RHSA is missing in ACPI/DMAR table, we could default to the device NUMA domain as fall back. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Cc: Jacob Pan Cc: Kevin Tian Cc: Ashok Raj Link: https://lore.kernel.org/r/20200904010303.2961-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20200922060843.31546-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 84b522e60523b75f509db37cca44e9d5e1580099 Author: Cristian Birsan Date: Thu Jul 23 21:49:02 2020 +0300 ARM: dts: at91: sam9x60ek: enable usb device Enable usb device for sam9x60ek board. Signed-off-by: Cristian Birsan Signed-off-by: Felipe Balbi commit 26b324245018cc966c81097452017dea8f43ffc5 Author: Cristian Birsan Date: Thu Jul 23 21:49:01 2020 +0300 usb: gadget: udc: atmel: update endpoint allocation for sam9x60 The DPRAM memory from the USB High Speed Device Port (UDPHS) hardware block was increased. This patch updates the endpoint allocation for sam9x60 to take advantage of this larger memory. At the same time the constraint to allocate the endpoints in order was lifted. To handle old and new hardware in the same driver the ep_prealloc was added. Signed-off-by: Cristian Birsan Signed-off-by: Felipe Balbi commit 5b041a30448f6af2676de01685812b260bd95b31 Author: Cristian Birsan Date: Thu Jul 23 21:49:00 2020 +0300 usb: gadget: udc: atmel: use 1 bank endpoints for control transfers Use 1 bank endpoints for control transfers Signed-off-by: Cristian Birsan Signed-off-by: Felipe Balbi commit 033b8966e90611f6f76daf4d16bb7fe3ef36a819 Author: Cristian Birsan Date: Thu Jul 23 21:48:59 2020 +0300 usb: gadget: udc: atmel: simplify endpoint allocation Simplify the endpoint allocation and cleanup the code. Signed-off-by: Cristian Birsan Signed-off-by: Felipe Balbi commit 96f314987a85f1a2f8d3e69b8d38ce857898b52d Author: Cristian Birsan Date: Thu Jul 23 21:48:58 2020 +0300 dt-bindings: usb: atmel: Update DT bindings documentation for sam9x60 Add sam9x60 binding. Signed-off-by: Cristian Birsan Acked-by: Rob Herring Signed-off-by: Felipe Balbi commit 3a48217854458a35c0d74db20c3a52ec7f990360 Author: Claudiu Beznea Date: Thu Jul 23 21:48:57 2020 +0300 usb: gadget: udc: atmel: use of_find_matching_node_and_match Instead of trying to match every possible compatible use of_find_matching_node_and_match() and pass the compatible array. Signed-off-by: Claudiu Beznea Signed-off-by: Cristian Birsan Signed-off-by: Felipe Balbi commit e1c08cf23172ed6fb228d75efc9f4c80a6812116 Author: Martin Blumenstingl Date: Sat Jul 4 00:50:43 2020 +0200 usb: dwc2: Add missing cleanups when usb_add_gadget_udc() fails Call dwc2_debugfs_exit() and dwc2_hcd_remove() (if the HCD was enabled earlier) when usb_add_gadget_udc() has failed. This ensures that the debugfs entries created by dwc2_debugfs_init() as well as the HCD are cleaned up in the error path. Fixes: 207324a321a866 ("usb: dwc2: Postponed gadget registration to the udc class driver") Acked-by: Minas Harutyunyan Signed-off-by: Martin Blumenstingl Signed-off-by: Felipe Balbi commit e518bdd9f02c11c6fcbd75884f2a38782bedd1b3 Author: Thinh Nguyen Date: Fri Jul 24 14:01:09 2020 -0700 usb: dwc3: core: Print warning on unsupported speed The user may have more information to override the HW parameter to specify the maximum_speed. However, if the user specifies a maximum_speed that the controller doesn't support, print out a warning. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit b574ce3ee45937f4a01edc98c59213bfc7effe50 Author: Thinh Nguyen Date: Fri Jul 24 14:01:02 2020 -0700 usb: dwc3: core: Properly default unspecified speed If the maximum_speed is not specified, default the device speed base on its HW capability. Don't prematurely check HW capability before validating the maximum_speed device property. The device property takes precedence in dwc->maximum_speed. Fixes: 0e1e5c47f7a9 ("usb: dwc3: add support for USB 2.0-only core configuration") Reported-by: Chunfeng Yun Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 362b9398c962c9ec563653444e15ef9032ef3a90 Author: Nathan Chancellor Date: Fri Jul 24 23:03:54 2020 -0700 usb: dwc2: Fix parameter type in function pointer prototype When booting up on a Raspberry Pi 4 with Control Flow Integrity checking enabled, the following warning/panic happens: [ 1.626435] CFI failure (target: dwc2_set_bcm_params+0x0/0x4): [ 1.632408] WARNING: CPU: 0 PID: 32 at kernel/cfi.c:30 __cfi_check_fail+0x54/0x5c [ 1.640021] Modules linked in: [ 1.643137] CPU: 0 PID: 32 Comm: kworker/0:1 Not tainted 5.8.0-rc6-next-20200724-00051-g89ba619726de #1 [ 1.652693] Hardware name: Raspberry Pi 4 Model B Rev 1.2 (DT) [ 1.658637] Workqueue: events deferred_probe_work_func [ 1.663870] pstate: 60000005 (nZCv daif -PAN -UAO BTYPE=--) [ 1.669542] pc : __cfi_check_fail+0x54/0x5c [ 1.673798] lr : __cfi_check_fail+0x54/0x5c [ 1.678050] sp : ffff8000102bbaa0 [ 1.681419] x29: ffff8000102bbaa0 x28: ffffab09e21c7000 [ 1.686829] x27: 0000000000000402 x26: ffff0000f6e7c228 [ 1.692238] x25: 00000000fb7cdb0d x24: 0000000000000005 [ 1.697647] x23: ffffab09e2515000 x22: ffffab09e069a000 [ 1.703055] x21: 4c550309df1cf4c1 x20: ffffab09e2433c60 [ 1.708462] x19: ffffab09e160dc50 x18: ffff0000f6e8cc78 [ 1.713870] x17: 0000000000000041 x16: ffffab09e0bce6f8 [ 1.719278] x15: ffffab09e1c819b7 x14: 0000000000000003 [ 1.724686] x13: 00000000ffffefff x12: 0000000000000000 [ 1.730094] x11: 0000000000000000 x10: 00000000ffffffff [ 1.735501] x9 : c932f7abfc4bc600 x8 : c932f7abfc4bc600 [ 1.740910] x7 : 077207610770075f x6 : ffff0000f6c38f00 [ 1.746317] x5 : 0000000000000000 x4 : 0000000000000000 [ 1.751723] x3 : 0000000000000000 x2 : 0000000000000000 [ 1.757129] x1 : ffff8000102bb7d8 x0 : 0000000000000032 [ 1.762539] Call trace: [ 1.765030] __cfi_check_fail+0x54/0x5c [ 1.768938] __cfi_check+0x5fa6c/0x66afc [ 1.772932] dwc2_init_params+0xd74/0xd78 [ 1.777012] dwc2_driver_probe+0x484/0x6ec [ 1.781180] platform_drv_probe+0xb4/0x100 [ 1.785350] really_probe+0x228/0x63c [ 1.789076] driver_probe_device+0x80/0xc0 [ 1.793247] __device_attach_driver+0x114/0x160 [ 1.797857] bus_for_each_drv+0xa8/0x128 [ 1.801851] __device_attach.llvm.14901095709067289134+0xc0/0x170 [ 1.808050] bus_probe_device+0x44/0x100 [ 1.812044] deferred_probe_work_func+0x78/0xb8 [ 1.816656] process_one_work+0x204/0x3c4 [ 1.820736] worker_thread+0x2f0/0x4c4 [ 1.824552] kthread+0x174/0x184 [ 1.827837] ret_from_fork+0x10/0x18 CFI validates that all indirect calls go to a function with the same exact function pointer prototype. In this case, dwc2_set_bcm_params is the target, which has a parameter of type 'struct dwc2_hsotg *', but it is being implicitly cast to have a parameter of type 'void *' because that is the set_params function pointer prototype. Make the function pointer protoype match the definitions so that there is no more violation. Fixes: 7de1debcd2de ("usb: dwc2: Remove platform static params") Link: https://github.com/ClangBuiltLinux/linux/issues/1107 Signed-off-by: Nathan Chancellor Signed-off-by: Felipe Balbi commit b68d9251561f33661e53dd618f1cafe7ec9ec3c2 Author: Mauro Carvalho Chehab Date: Tue Sep 8 11:58:23 2020 +0200 usb: dwc3: simple: add support for Hikey 970 This binding driver is needed for Hikey 970 to work, as otherwise a Serror is produced: [ 1.837458] SError Interrupt on CPU0, code 0xbf000002 -- SError [ 1.837462] CPU: 0 PID: 74 Comm: kworker/0:1 Not tainted 5.8.0+ #205 [ 1.837463] Hardware name: HiKey970 (DT) [ 1.837465] Workqueue: events deferred_probe_work_func [ 1.837467] pstate: 20000005 (nzCv daif -PAN -UAO BTYPE=--) [ 1.837468] pc : _raw_spin_unlock_irqrestore+0x18/0x50 [ 1.837469] lr : regmap_unlock_spinlock+0x14/0x20 [ 1.837470] sp : ffff8000124dba60 [ 1.837471] x29: ffff8000124dba60 x28: 0000000000000000 [ 1.837474] x27: ffff0001b7e854c8 x26: ffff80001204ea18 [ 1.837476] x25: 0000000000000005 x24: ffff800011f918f8 [ 1.837479] x23: ffff800011fbb588 x22: ffff0001b7e40e00 [ 1.837481] x21: 0000000000000100 x20: 0000000000000000 [ 1.837483] x19: ffff0001b767ec00 x18: 00000000ff10c000 [ 1.837485] x17: 0000000000000002 x16: 0000b0740fdb9950 [ 1.837488] x15: ffff8000116c1198 x14: ffffffffffffffff [ 1.837490] x13: 0000000000000030 x12: 0101010101010101 [ 1.837493] x11: 0000000000000020 x10: ffff0001bf17d130 [ 1.837495] x9 : 0000000000000000 x8 : ffff0001b6938080 [ 1.837497] x7 : 0000000000000000 x6 : 000000000000003f [ 1.837500] x5 : 0000000000000000 x4 : 0000000000000000 [ 1.837502] x3 : ffff80001096a880 x2 : 0000000000000000 [ 1.837505] x1 : ffff0001b7e40e00 x0 : 0000000100000001 [ 1.837507] Kernel panic - not syncing: Asynchronous SError Interrupt [ 1.837509] CPU: 0 PID: 74 Comm: kworker/0:1 Not tainted 5.8.0+ #205 [ 1.837510] Hardware name: HiKey970 (DT) [ 1.837511] Workqueue: events deferred_probe_work_func [ 1.837513] Call trace: [ 1.837514] dump_backtrace+0x0/0x1e0 [ 1.837515] show_stack+0x18/0x24 [ 1.837516] dump_stack+0xc0/0x11c [ 1.837517] panic+0x15c/0x324 [ 1.837518] nmi_panic+0x8c/0x90 [ 1.837519] arm64_serror_panic+0x78/0x84 [ 1.837520] do_serror+0x158/0x15c [ 1.837521] el1_error+0x84/0x100 [ 1.837522] _raw_spin_unlock_irqrestore+0x18/0x50 [ 1.837523] regmap_write+0x58/0x80 [ 1.837524] hi3660_reset_deassert+0x28/0x34 [ 1.837526] reset_control_deassert+0x50/0x260 [ 1.837527] reset_control_deassert+0xf4/0x260 [ 1.837528] dwc3_probe+0x5dc/0xe6c [ 1.837529] platform_drv_probe+0x54/0xb0 [ 1.837530] really_probe+0xe0/0x490 [ 1.837531] driver_probe_device+0xf4/0x160 [ 1.837532] __device_attach_driver+0x8c/0x114 [ 1.837533] bus_for_each_drv+0x78/0xcc [ 1.837534] __device_attach+0x108/0x1a0 [ 1.837535] device_initial_probe+0x14/0x20 [ 1.837537] bus_probe_device+0x98/0xa0 [ 1.837538] deferred_probe_work_func+0x88/0xe0 [ 1.837539] process_one_work+0x1cc/0x350 [ 1.837540] worker_thread+0x2c0/0x470 [ 1.837541] kthread+0x154/0x160 [ 1.837542] ret_from_fork+0x10/0x30 [ 1.837569] SMP: stopping secondary CPUs [ 1.837570] Kernel Offset: 0x1d0000 from 0xffff800010000000 [ 1.837571] PHYS_OFFSET: 0x0 [ 1.837572] CPU features: 0x240002,20882004 [ 1.837573] Memory Limit: none Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Felipe Balbi commit 98df91f8840cf750a0bc7c4c5d6b6085bac945b3 Author: Peter Chen Date: Tue Sep 1 10:35:49 2020 +0800 usb: cdns3: gadget: free interrupt after gadget has deleted The interrupt may occur during the gadget deletion, it fixes the below oops. [ 2394.974604] configfs-gadget gadget: suspend [ 2395.042578] configfs-gadget 5b130000.usb: unregistering UDC driver [g1] [ 2395.382562] irq 229: nobody cared (try booting with the "irqpoll" option) [ 2395.389362] CPU: 0 PID: 301 Comm: kworker/u12:6 Not tainted 5.8.0-rc3-next-20200703-00060-g2f13b83cbf30-dirty #456 [ 2395.399712] Hardware name: Freescale i.MX8QM MEK (DT) [ 2395.404782] Workqueue: 2-0051 tcpm_state_machine_work [ 2395.409832] Call trace: [ 2395.412289] dump_backtrace+0x0/0x1d0 [ 2395.415950] show_stack+0x1c/0x28 [ 2395.419271] dump_stack+0xbc/0x118 [ 2395.422678] __report_bad_irq+0x50/0xe0 [ 2395.426513] note_interrupt+0x2cc/0x38c [ 2395.430355] handle_irq_event_percpu+0x88/0x90 [ 2395.434800] handle_irq_event+0x4c/0xe8 [ 2395.438640] handle_fasteoi_irq+0xbc/0x168 [ 2395.442740] generic_handle_irq+0x34/0x48 [ 2395.446752] __handle_domain_irq+0x68/0xc0 [ 2395.450846] gic_handle_irq+0x64/0x150 [ 2395.454596] el1_irq+0xb8/0x180 [ 2395.457733] __do_softirq+0xac/0x3b8 [ 2395.461310] irq_exit+0xc0/0xe0 [ 2395.464448] __handle_domain_irq+0x6c/0xc0 [ 2395.468540] gic_handle_irq+0x64/0x150 [ 2395.472295] el1_irq+0xb8/0x180 [ 2395.475436] _raw_spin_unlock_irqrestore+0x14/0x48 [ 2395.480232] usb_gadget_disconnect+0x120/0x140 [ 2395.484678] usb_gadget_remove_driver+0xb4/0xd0 [ 2395.489208] usb_del_gadget+0x6c/0xc8 [ 2395.492872] cdns3_gadget_exit+0x5c/0x120 [ 2395.496882] cdns3_role_stop+0x60/0x90 [ 2395.500634] cdns3_role_set+0x64/0xd8 [ 2395.504301] usb_role_switch_set_role.part.0+0x3c/0x90 [ 2395.509444] usb_role_switch_set_role+0x20/0x30 [ 2395.513978] tcpm_mux_set+0x60/0xf8 [ 2395.517470] tcpm_reset_port+0xa4/0xf0 [ 2395.521222] tcpm_detach.part.0+0x44/0x50 [ 2395.525227] tcpm_state_machine_work+0x8b0/0x2360 [ 2395.529932] process_one_work+0x1c8/0x470 [ 2395.533939] worker_thread+0x50/0x420 [ 2395.537603] kthread+0x148/0x168 [ 2395.540830] ret_from_fork+0x10/0x18 [ 2395.544399] handlers: [ 2395.546671] [<000000008dea28da>] cdns3_wakeup_irq [ 2395.551375] [<000000009fee5c61>] cdns3_drd_irq threaded [<000000005148eaec>] cdns3_drd_thread_irq [ 2395.560255] Disabling IRQ #229 [ 2395.563454] configfs-gadget gadget: unbind function 'Mass Storage Function'/000000000132f835 [ 2395.563657] configfs-gadget gadget: unbind [ 2395.563917] udc 5b130000.usb: releasing '5b130000.usb' Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Cc: Acked-by: Roger Quadros Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit d97c78a1908e59a1fdbcbece87cd0440b5d7a1f2 Author: Thinh Nguyen Date: Wed Sep 2 18:43:04 2020 -0700 usb: dwc3: gadget: END_TRANSFER before CLEAR_STALL command According the programming guide (for all DWC3 IPs), when the driver handles ClearFeature(halt) request, it should issue CLEAR_STALL command _after_ the END_TRANSFER command completes. The END_TRANSFER command may take some time to complete. So, delay the ClearFeature(halt) request control status stage and wait for END_TRANSFER command completion interrupt. Only after END_TRANSFER command completes that the driver may issue CLEAR_STALL command. Cc: stable@vger.kernel.org Fixes: cb11ea56f37a ("usb: dwc3: gadget: Properly handle ClearFeature(halt)") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit c503672abe1348f10f5a54a662336358c6e1a297 Author: Thinh Nguyen Date: Wed Sep 2 18:42:58 2020 -0700 usb: dwc3: gadget: Resume pending requests after CLEAR_STALL The function driver may queue new requests right after halting the endpoint (i.e. queue new requests while the endpoint is stalled). There's no restriction preventing it from doing so. However, dwc3 currently drops those requests after CLEAR_STALL. The driver should only drop started requests. Keep the pending requests in the pending list to resume and process them after the host issues ClearFeature(Halt) to the endpoint. Cc: stable@vger.kernel.org Fixes: cb11ea56f37a ("usb: dwc3: gadget: Properly handle ClearFeature(halt)") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 549437a43f45ce70cf5012317633c635c43ba4f4 Author: Zhen Lei Date: Fri Sep 18 21:22:36 2020 +0800 clocksource/drivers/sp804: Enable Hisilicon sp804 timer 64bit mode A 100MHZ 32-bit timer will be wrapped up less than 43s. Although the kernel maintains a software high 32-bit count in the tick IRQ. But it's not applicable to the user mode APPs. Note: The kernel still uses the lower 32 bits of the timer. Signed-off-by: Zhen Lei Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200918132237.3552-9-thunder.leizhen@huawei.com commit bd5a1936ffa2b69032815775fa54fc1c422d49d5 Author: Zhen Lei Date: Fri Sep 18 21:22:35 2020 +0800 clocksource/drivers/sp804: Add support for Hisilicon sp804 timer The ARM SP804 supports a maximum of 32-bit counter, but Hisilicon extends it to 64-bit. That means, the registers: TimerXload, TimerXValue and TimerXBGLoad are 64bits, all other registers are the same as those in the SP804. The driver code can be completely reused except that the register offset is different. Use compatible = "hisilicon,sp804" mark as Hisilicon sp804 timer. Signed-off-by: Zhen Lei Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200918132237.3552-8-thunder.leizhen@huawei.com commit 23c788cd48db9e2646fb5455f004e4a5626e4230 Author: Zhen Lei Date: Fri Sep 18 21:22:34 2020 +0800 clocksource/drivers/sp804: Support non-standard register offset The ARM SP804 supports a maximum of 32-bit counter, but Hisilicon extends it to 64-bit. That means, the registers: TimerXload, TimerXValue and TimerXBGLoad are 64bits, all other registers are the same as those in the SP804. The driver code can be completely reused except that the register offset is different. Currently, we get a timer register address by: add the constant register offset to the timer base address. e.g. "base + TIMER_CTRL". It can not be dynamically adjusted at run time. So create a new structure "sp804_timer" to record the original registers offset, and create a new structure "sp804_clkevt" to record the calculated registers address. So the "base + TIMER_CTRL" is changed to "clkevt->ctrl", this will faster than "base + timer->ctrl". For example: struct sp804_timer arm_sp804_timer = { .ctrl = TIMER_CTRL, }; struct sp804_clkevt clkevt; clkevt.ctrl = base + arm_sp804_timer.ctrl. - writel(0, base + TIMER_CTRL); + writel(0, clkevt->ctrl); Signed-off-by: Zhen Lei Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200918132237.3552-7-thunder.leizhen@huawei.com commit e69aae713bef63b357d4ff85bcb3f8f63dbf4ba3 Author: Zhen Lei Date: Fri Sep 18 21:22:33 2020 +0800 clocksource/drivers/sp804: Prepare for support non-standard register offset Add two local variables: timer1_base and timer2_base in sp804_of_init(), to avoid repeatedly calculate the base address of timer2, and make it easier to recognize timer1. Hope to make the next patch looks more clear. No functional change. Signed-off-by: Zhen Lei Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200918132237.3552-6-thunder.leizhen@huawei.com commit 2f71078e7753b2fbba62999aa46c2fad16df9d98 Author: Zhen Lei Date: Fri Sep 18 21:22:32 2020 +0800 clocksource/drivers/sp804: Remove a mismatched comment writel(0, base + TIMER_CTRL); ... ... writel(xxx | TIMER_CTRL_PERIODIC, base + TIMER_CTRL); The timer is just temporarily disabled, and it will be set to periodic mode later. The description of the field TimerMode of the register TimerXControl as shown below: 0 = Timer module is in free-running mode (default) 1 = Timer module is in periodic mode. Signed-off-by: Zhen Lei Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200918132237.3552-5-thunder.leizhen@huawei.com commit 975434f8b24a55af31daa4634972890c061a0a0c Author: Zhen Lei Date: Fri Sep 18 21:22:31 2020 +0800 clocksource/drivers/sp804: Delete the leading "__" of some functions Delete the leading "__" of __sp804_clocksource_and_sched_clock_init() and __sp804_clockevents_init(), make it looks a little more comfortable. Signed-off-by: Zhen Lei Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200918132237.3552-4-thunder.leizhen@huawei.com commit 65f4d7ddc7b681001246f60c22a3cf650864da35 Author: Zhen Lei Date: Fri Sep 18 21:22:30 2020 +0800 clocksource/drivers/sp804: Remove unused sp804_timer_disable() and timer-sp804.h Since commit 7484c727b636 ("ARM: realview: delete the RealView board files") and commit 16956fed35fe ("ARM: versatile: switch to DT only booting and remove legacy code"), there's no one to use the functions defined or declared in include/clocksource/timer-sp804.h. Delete it. Signed-off-by: Zhen Lei Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200918132237.3552-3-thunder.leizhen@huawei.com commit 7d19d521a034a8c58586814e0320463d1299a3a9 Author: Kefeng Wang Date: Fri Sep 18 21:22:29 2020 +0800 clocksource/drivers/sp804: Cleanup clk_get_sys() Move the clk_get_sys() part into sp804_get_clock_rate(), cleanup the same code. Signed-off-by: Kefeng Wang Signed-off-by: Zhen Lei Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200918132237.3552-2-thunder.leizhen@huawei.com commit 51b705af287d08192140d6caf16d64e32a7abfe4 Author: Lad Prabhakar Date: Wed Jul 15 12:08:55 2020 +0100 dt-bindings: timer: renesas,cmt: Document r8a774e1 CMT support Document SoC specific bindings for RZ/G2H (r8a774e1) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1594811350-14066-6-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com commit e2cb498074a9cc826828a374cc1e66e532e4762d Author: Lad Prabhakar Date: Wed Sep 2 10:19:27 2020 +0100 dt-bindings: timer: renesas,cmt: Document r8a7742 CMT support Document SoC specific compatible strings for r8a7742. No driver change is needed as the fallback strings will activate the right code. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200902091927.32211-1-prabhakar.mahadev-lad.rj@bp.renesas.com commit 0b58725fb9a446890c1fd28fc6c9e393ce21acb7 Author: Ard Biesheuvel Date: Wed Sep 16 13:56:54 2020 +0300 ARM: mvebu: drop pointless check for coherency_base The MMU off code path in ll_get_coherency_base() attempts to decide whether the coherency fabric is mapped by testing the value of coherency_base, which carries its virtual address if its mapped, and 0x0 otherwise. However, what the code actually does is take the virtual address of the coherency_base symbol, and compare it with 0x0, which are never equal, and so the branch is never taken. In fact, with the MMU off, dereferencing the VA of coherency_base is not possible to begin with, nor can its value be relied upon with the MMU off since it is not cleaned to the Dcache as is done with coherency_phys_base in armada_370_coherency_init(). Instead, the value of coherency_phys_base is returned, which results in the correct behavior since it will be 0x0 as well if the coherency fabric is not mapped, and it is accessible with the MMU off. So just drop the comparison and the branch. Fixes: 30cdef97107370a7 ("ARM: mvebu: make the coherency_ll.S functions work with no coherency fabric") Cc: Thomas Petazzoni Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory CLEMENT Cc: Sebastian Hesselbarth Signed-off-by: Ard Biesheuvel Signed-off-by: Gregory CLEMENT commit b64d814257b027e29a474bcd660f6372490138c7 Author: Pali Rohár Date: Mon Sep 7 13:27:17 2020 +0200 arm64: dts: marvell: espressobin: Add ethernet switch aliases Espressobin boards have 3 ethernet ports and some of them got assigned more then one MAC address. MAC addresses are stored in U-Boot environment. Since commit a2c7023f7075c ("net: dsa: read mac address from DT for slave device") kernel can use MAC addresses from DT for particular DSA port. Currently Espressobin DTS file contains alias just for ethernet0. This patch defines additional ethernet aliases in Espressobin DTS files, so bootloader can fill correct MAC address for DSA switch ports if more MAC addresses were specified. DT alias ethernet1 is used for wan port, DT aliases ethernet2 and ethernet3 are used for lan ports for both Espressobin revisions (V5 and V7). Fixes: 5253cb8c00a6f ("arm64: dts: marvell: espressobin: add ethernet alias") Cc: # a2c7023f7075c: dsa: read mac address Signed-off-by: Pali Rohár Reviewed-by: Andrew Lunn Reviewed-by: Andre Heider Signed-off-by: Gregory CLEMENT commit fa6999e326fe7851ecbd572b8cb9be8e930ebf41 Author: Harald Freudenberger Date: Mon Sep 21 10:45:55 2020 +0200 s390/pkey: support CCA and EP11 secure ECC private keys This patch extends the pkey kernel module to support CCA and EP11 secure ECC (private) keys as source for deriving ECC protected (private) keys. There is yet another new ioctl to support this: PKEY_KBLOB2PROTK3 can handle all the old keys plus CCA and EP11 secure ECC keys. For details see ioctl description in pkey.h. The CPACF unit currently only supports a subset of 5 different ECC curves (P-256, P-384, P-521, ED25519, ED448) and so only keys of this curve type can be transformed into protected keys. However, the pkey and the cca/ep11 low level functions do not check this but simple pass-through the key blob to the firmware onto the crypto cards. So most likely the failure will be a response carrying an error code resulting in user space errno value EIO instead of EINVAL. Deriving a protected key from an EP11 ECC secure key requires a CEX7 in EP11 mode. Deriving a protected key from an CCA ECC secure key requires a CEX7 in CCA mode. Together with this new ioctl the ioctls for querying lists of apqns (PKEY_APQNS4K and PKEY_APQNS4KT) have been extended to support EP11 and CCA ECC secure key type and key blobs. Together with this ioctl there comes a new struct ep11kblob_header which is to be prepended onto the EP11 key blob. See details in pkey.h for the fields in there. The older EP11 AES key blob with some info stored in the (unused) session field is also supported with this new ioctl. Signed-off-by: Harald Freudenberger Reviewed-by: Ingo Franzki Signed-off-by: Vasily Gorbik commit 32ca04bba6fd9775a0630534f3db52e27b062e6c Author: Harald Freudenberger Date: Fri Sep 4 16:11:37 2020 +0200 s390/zcrypt: Support for CCA APKA master keys Support for CCA APKA (used for CCA ECC keys) master keys. The existing mkvps sysfs attribute for each queue for cards in CCA mode is extended to show the APKA master key register states and verification pattern: Improve the mkvps sysfs attribute to display the APKA master key verification patterns for old, current and new master key registers. The APKA master key is used to encrypt CCA ECC secure keys. The syntax is analog to the existing AES mk verification patterns: APKA NEW: APKA CUR: APKA OLD: with : 'empty' or 'partial' or 'full' : 'valid' or 'invalid' : 'valid' or 'invalid' , , 8 byte hex string with leading 0x MKVP means Master Key Verification Pattern and is a folded hash over the key value. Only the states 'full' and 'valid' result in displaying a useful mkvp, otherwise a mkvp of all bytes zero is shown. If for any reason the FQ fails and the (cached) information is not available, the state '-' will be shown with the mkvp value also '-'. The values shown here are the very same as the cca panel tools displays. The internal function cca_findcard2() also supports to match against the APKA master key verification patterns and the pkey kernel module which uses this function needed compatible rewrite of these invocations. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 0026f1604c9ba1ae8108d4977da0366c283552bc Author: Bastian Krause Date: Thu Sep 17 20:32:46 2020 +0200 rtc: ds1307: enable rx8130's backup battery, make it chargeable optionally The ds1307 charger infrastructure now allows to add a rx8130 charger setup that.. - does not depend on trickle-resistor-ohms - does not use DS13XX_TRICKLE_CHARGER_MAGIC trickle-charge select (TCS) bits - keeps previous no-charge behavior for device trees without aux-voltage-chargeable Make that happen. Signed-off-by: Bastian Krause Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200917183246.19446-9-bst@pengutronix.de commit 0874734e09af5cc05439dbe2c8ff704f14d679f5 Author: Bastian Krause Date: Thu Sep 17 20:32:45 2020 +0200 rtc: ds1307: consider aux-voltage-chargeable Prefer aux-voltage-chargeable over trickle-diode-disable and set diode accordingly. This is then passed to the chip's appropriate charge setup function. Signed-off-by: Bastian Krause Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200917183246.19446-8-bst@pengutronix.de commit 95a74cbb21a2431dd2fd8918fa26113629b6e13e Author: Bastian Krause Date: Thu Sep 17 20:32:44 2020 +0200 rtc: ds1307: store previous charge default per chip Some RTC's batteries and supercaps were charged by default until now. In contrast other RTCs allow charging but the driver did not configure them to do so until now. These must not be charged by default to stay backwards compatible. In order to do that, store the charge default per chip. Signed-off-by: Bastian Krause Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200917183246.19446-7-bst@pengutronix.de commit 1b5b6af788ae59ee73e3f3230dbfa4f0e31d8d18 Author: Bastian Krause Date: Thu Sep 17 20:32:43 2020 +0200 rtc: ds1307: introduce requires_trickle_resistor per chip Make trickle-resistor-ohms optional for charging setups that do not require specifying ROUT bits (specifying the resistor value between Vcc and Vbackup). In order to allow specifying that, introduce requires_trickle_resistor per chip. Signed-off-by: Bastian Krause Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200917183246.19446-6-bst@pengutronix.de commit 462eb736db3db76899022e4e4db788a7b6efbe09 Author: Bastian Krause Date: Thu Sep 17 20:32:42 2020 +0200 rtc: ds1307: apply DS13XX_TRICKLE_CHARGER_MAGIC only conditionally DS13XX_TRICKLE_CHARGER_MAGIC sets the trickle-charge select (TCS) bits (7..4). The datasheet of Maxim Integrated's DS1339 [1] for instance reads: "To prevent accidental enabling, only a pattern on 1010 enables the trickle charger. All other patterns disable the trickle charger." Since not all RTCs connected to a backup battery or supercap use these bits DS13XX_TRICKLE_CHARGER_MAGIC should not get applied for all charger setups unconditionally. Epson's RX8130 is such an example: Instead of TCS bits "SMPTSEL1", "SMPTSEL0", "CHGEN" and "INIEN" are expected as bit 7..4. DS1339 and DS1340 are currently the only RTCs in the ds1307 driver that apply DS13XX_TRICKLE_CHARGER_MAGIC to their setup register value. So apply DS13XX_TRICKLE_CHARGER_MAGIC in do_trickle_setup_ds1339() which is used by both RTCs. [1] https://datasheets.maximintegrated.com/en/ds/DS1339-DS1339U.pdf [2] https://support.epson.biz/td/api/doc_check.php?dl=app_RX8130CE Signed-off-by: Bastian Krause Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200917183246.19446-5-bst@pengutronix.de commit 40d58c9742286ef95ef8dc5885d4043224490c82 Author: Bastian Krause Date: Thu Sep 17 20:32:41 2020 +0200 dt-bindings: rtc: ds1307: add rx8130 aux-voltage-chargeable support Epson's RX8130 was not charged before. A related patch will allow optional charging. Signed-off-by: Bastian Krause Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200917183246.19446-4-bst@pengutronix.de commit c53cee48670cc623a42e49319a261798d8608b0e Author: Bastian Krause Date: Thu Sep 17 20:32:40 2020 +0200 dt-bindings: rtc: ds1307: let aux-voltage-chargeable supersede trickle-diode-disable trickle-diode-disable is deprecated, so reflect that in the driver's binding and add the new aux-voltage-chargeable. Signed-off-by: Bastian Krause Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200917183246.19446-3-bst@pengutronix.de commit 965fe1ceea05de735f63d1c1f90f0310fc830a8d Author: Bastian Krause Date: Thu Sep 17 20:32:39 2020 +0200 dt-bindings: rtc: let aux-voltage-chargeable supersede trickle-diode-disable Some RTCs can be equipped with a chargeable battery or supercap. Every RTC allowing this whose driver's implement it are charged by default. To disable this the trickle-diode-disable flag exists. If a driver did not support charging and some time later one wants to add that feature, there is currently no way to do it without breaking dt backwards compatibility. RTCs on boards without the trickle-diode-disable flag in their device tree would suddenly charge their battery/supercap which is a change in behavior. Change that by introducing aux-voltage-chargeable, not as a flag but as a uint32 enum allowing to set "do not charge" (0) or "charge" (1). This dt property is optional, so we can now distinguish these cases. Care must be taken to support the old behavior for device trees without aux-voltage-chargeable nonetheless to stay compatible. Signed-off-by: Bastian Krause Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200917183246.19446-2-bst@pengutronix.de commit 1f2bd2271a105767046e02ecabd39a608270a4c6 Author: Jarkko Nikula Date: Mon Aug 24 17:55:39 2020 +0300 pwm: Allow store 64-bit duty cycle from sysfs interface PWM core was converted to u64 by the commit a9d887dc1c60 ("pwm: Convert period and duty cycle to u64") but did not change the duty_cycle_store() so it will error out if trying to pass a numeric string bigger than 2^32-1. Fix this by using u64 and kstrtou64() in duty_cycle_store(). Signed-off-by: Jarkko Nikula Acked-by: Guru Das Srinagesh Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit b39c0615d0667b3a6f2f5c4bf99ffadf3b518bb1 Author: Hauke Mehrtens Date: Thu Aug 20 19:14:25 2020 +0200 pwm: img: Fix null pointer access in probe dev_get_drvdata() is called in img_pwm_runtime_resume() before the driver data is set. When pm_runtime_enabled() returns false in img_pwm_probe() it calls img_pwm_runtime_resume() which results in a null pointer access. This patch fixes the problem by setting the driver data earlier in the img_pwm_probe() function. This crash was seen when booting the Imagination Technologies Creator Ci40 (Marduk) with kernel 5.4 in OpenWrt. Fixes: e690ae526216 ("pwm: img: Add runtime PM") Signed-off-by: Hauke Mehrtens Acked-by: Lee Jones Signed-off-by: Thierry Reding commit bce54366946a7a190a1df74f6f605412f731709c Author: David Jander Date: Fri Aug 28 14:14:15 2020 +0200 pwm: pca9685: Disable unused alternative addresses The PCA9685 supports listening to 1 or more alternative I2C chip addresses for some special features that this driver does not support. By default the LED ALLCALL address is active (default 0x70), which causes this chip to respond to address 0x70 in addition to its main address (0x41). This is not desireable if there is another device on the same bus that uses this address (like a TMP103 for example). Since this feature is not supported by this driver, it is best to disable these addresses in the chip to avoid unsuspected bus collisions. Signed-off-by: David Jander Signed-off-by: Thierry Reding commit e1057a8df16503b8d08e75d9258e6026ef88a06d Author: David Jander Date: Fri Aug 28 14:14:14 2020 +0200 pwm: pca9685: Use BIT() macro instead of shift Signed-off-by: David Jander Signed-off-by: Thierry Reding commit 316b676bd4cc022d1dd73d13045a8ab01792e0d1 Author: David Jander Date: Fri Aug 28 14:14:13 2020 +0200 pwm: pca9685: Make comments more consistent Make all explanatory comments start with an uppercase char. Signed-off-by: David Jander Signed-off-by: Thierry Reding commit 5327f34bf8ee61d2b1f27f8f31ee8b729f3993a8 Author: Krzysztof Kozlowski Date: Wed Aug 26 16:47:47 2020 +0200 pwm: sun4i: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 793bb636f549da85d1fe68228428e5e11d7db22e Author: Krzysztof Kozlowski Date: Wed Aug 26 16:47:46 2020 +0200 pwm: sprd: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Acked-by: Chunyan Zhang Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 5530fcaf9ca30b85cfe03c6fb98ec1b1ea189e6d Author: Krzysztof Kozlowski Date: Wed Aug 26 16:47:45 2020 +0200 pwm: sifive: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Acked-by: Palmer Dabbelt Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 836719f8948a0a485029e2308dbe864a33f6941d Author: Krzysztof Kozlowski Date: Wed Aug 26 16:47:44 2020 +0200 pwm: rockchip: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit c0bfe9606e036b125e8b200de5db9eb712c6b662 Author: Krzysztof Kozlowski Date: Wed Aug 26 16:47:43 2020 +0200 pwm: jz4740: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 85a5745f17b8bb6d82628c33778be293dbcbe928 Author: Krzysztof Kozlowski Date: Wed Aug 26 16:47:42 2020 +0200 pwm: bcm2835: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit f339e79bae8555b1a6d25755893c03dd3a77913e Author: Liu Shixin Date: Wed Sep 16 10:50:28 2020 +0800 pwm: Convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 457f74abbed060a0395f75ab5297f2d76cada516 Author: Simon South Date: Sat Sep 19 15:33:06 2020 -0400 pwm: rockchip: Keep enabled PWMs running while probing Following commit cfc4c189bc70 ("pwm: Read initial hardware state at request time") the Rockchip PWM driver can no longer assume a device's pwm_state structure has been populated after a call to pwmchip_add(). Consequently, the test in rockchip_pwm_probe() intended to prevent the driver from stopping PWM devices already enabled by the bootloader no longer functions reliably and this can lead to the kernel hanging during startup, particularly on devices like the Pinebook Pro that use a PWM-controlled backlight for their display. Avoid this by querying the device directly at probe time to determine whether or not it is enabled. Fixes: cfc4c189bc70 ("pwm: Read initial hardware state at request time") Signed-off-by: Simon South Reviewed-by: Uwe Kleine-König Reviewed-by: Heiko Stuebner Signed-off-by: Thierry Reding commit 0142ee3f2e88ef894427e926b3c8ad7c95964b01 Author: Marian-Cristian Rotariu Date: Tue Aug 25 11:44:54 2020 +0100 dt-bindings: pwm: renesas,pwm-rcar: Add r8a774e1 support Document RZ/G2H (R8A774E1) SoC bindings. No driver change is needed due to the fallback compatible value "renesas,pwm-rcar". Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Acked-by: Rob Herring Signed-off-by: Thierry Reding commit bc2652b7ae1e1b85b5fbd3621c98a9c743ed89d6 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Sep 21 15:36:57 2020 +0100 selftest/net/xfrm: Add test for ipsec tunnel It's an exhaustive testing for ipsec: covering all encryption/ authentication/compression algorithms. The tests are run in two network namespaces, connected by veth interfaces. To make exhaustive testing less time-consuming, the tests are run in parallel tasks, specified by parameter to the selftest. As the patches set adds support for xfrm in compatible tasks, there are tests to check structures that differ in size between 64-bit and 32-bit applications. The selftest doesn't use libnl so that it can be easily compiled as compatible application and don't require compatible .so. Here is a diagram of the selftest: --------------- | selftest | | (parent) | --------------- | | | (pipe) | ---------- / | | \ /------------- / \ -------------\ | /----- -----\ | ---------|----------|----------------|----------|--------- | --------- --------- --------- --------- | | | child | | child | NS A | child | | child | | | --------- --------- --------- --------- | -------|------------|----------------|-------------|------ veth0 veth1 veth2 vethN ---------|------------|----------------|-------------|---------- | ------------ ------------ ------------ ------------ | | | gr.child | | gr.child | NS B | gr.child | | gr.child | | | ------------ ------------ ------------ ------------ | ---------------------------------------------------------------- The parent sends the description of a test (xfrm parameters) to the child, the child and grand child setup a tunnel over veth interface and test it by sending udp packets. Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert commit 96392ee5a13b992563cfe07d23ee30d333b89126 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Sep 21 15:36:56 2020 +0100 xfrm/compat: Translate 32-bit user_policy from sockptr Provide compat_xfrm_userpolicy_info translation for xfrm setsocketopt(). Reallocate buffer and put the missing padding for 64-bit message. Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert commit 5106f4a8acff480e244300bc5097c0ad7048c3a2 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Sep 21 15:36:55 2020 +0100 xfrm/compat: Add 32=>64-bit messages translator Provide the user-to-kernel translator under XFRM_USER_COMPAT, that creates for 32-bit xfrm-user message a 64-bit translation. The translation is afterwards reused by xfrm_user code just as if userspace had sent 64-bit message. Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert commit e11eb32de3a7854d6b366dee17dd36c9ab0c39de Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Sep 21 15:36:54 2020 +0100 netlink/compat: Append NLMSG_DONE/extack to frag_list Modules those use netlink may supply a 2nd skb, (via frag_list) that contains an alternative data set meant for applications using 32bit compatibility mode. In such a case, netlink_recvmsg will use this 2nd skb instead of the original one. Without this patch, such compat applications will retrieve all netlink dump data, but will then get an unexpected EOF. Cc: Johannes Berg Signed-off-by: Florian Westphal Signed-off-by: Dmitry Safonov Reviewed-by: Johannes Berg Signed-off-by: Steffen Klassert commit 5f3eea6b7e8f58cf5c8a9d4b9679dc19e9e67ba3 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Sep 21 15:36:53 2020 +0100 xfrm/compat: Attach xfrm dumps to 64=>32 bit translator Currently nlmsg_unicast() is used by functions that dump structures that can be different in size for compat tasks, see dump_one_state() and dump_one_policy(). The following nlmsg_unicast() users exist today in xfrm: Function | Message can be different | in size on compat -------------------------------------------|------------------------------ xfrm_get_spdinfo() | N xfrm_get_sadinfo() | N xfrm_get_sa() | Y xfrm_alloc_userspi() | Y xfrm_get_policy() | Y xfrm_get_ae() | N Besides, dump_one_state() and dump_one_policy() can be used by filtered netlink dump for XFRM_MSG_GETSA, XFRM_MSG_GETPOLICY. Just as for xfrm multicast, allocate frag_list for compat skb journey down to recvmsg() which will give user the desired skb according to syscall bitness. Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert commit 5461fc0c8d9f23956b99f5907f69726a293ccb67 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Sep 21 15:36:52 2020 +0100 xfrm/compat: Add 64=>32-bit messages translator Provide the kernel-to-user translator under XFRM_USER_COMPAT, that creates for 64-bit xfrm-user message a 32-bit translation and puts it in skb's frag_list. net/compat.c layer provides MSG_CMSG_COMPAT to decide if the message should be taken from skb or frag_list. (used by wext-core which has also an ABI difference) Kernel sends 64-bit xfrm messages to the userspace for: - multicast (monitor events) - netlink dumps Wire up the translator to xfrm_nlmsg_multicast(). Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert commit c9e7c76d70fa50582ca96759829c93d0dd024662 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Sep 21 15:36:51 2020 +0100 xfrm: Provide API to register translator module Add a skeleton for xfrm_compat module and provide API to register it in xfrm_state.ko. struct xfrm_translator will have function pointers to translate messages received from 32-bit userspace or to be sent to it from 64-bit kernel. module_get()/module_put() are used instead of rcu_read_lock() as the module will vmalloc() memory for translation. The new API is registered with xfrm_state module, not with xfrm_user as the former needs translator for user_policy set by setsockopt() and xfrm_user already uses functions from xfrm_state. Signed-off-by: Dmitry Safonov Signed-off-by: Steffen Klassert commit 501e43fbea468fa93c1dff0ee744e69303ef5a43 Author: Eric Biggers Date: Wed Sep 23 21:26:24 2020 -0700 fscrypt: rename DCACHE_ENCRYPTED_NAME to DCACHE_NOKEY_NAME Originally we used the term "encrypted name" or "ciphertext name" to mean the encoded filename that is shown when an encrypted directory is listed without its key. But these terms are ambiguous since they also mean the filename stored on-disk. "Encrypted name" is especially ambiguous since it could also be understood to mean "this filename is encrypted on-disk", similar to "encrypted file". So we've started calling these encoded names "no-key names" instead. Therefore, rename DCACHE_ENCRYPTED_NAME to DCACHE_NOKEY_NAME to avoid confusion about what this flag means. Link: https://lore.kernel.org/r/20200924042624.98439-3-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 70fb2612aab62d47e03f82eaa7384a8d30ca175d Author: Eric Biggers Date: Wed Sep 23 21:26:23 2020 -0700 fscrypt: don't call no-key names "ciphertext names" Currently we're using the term "ciphertext name" ambiguously because it can mean either the actual ciphertext filename, or the encoded filename that is shown when an encrypted directory is listed without its key. The latter we're now usually calling the "no-key name"; and while it's derived from the ciphertext name, it's not the same thing. To avoid this ambiguity, rename fscrypt_name::is_ciphertext_name to fscrypt_name::is_nokey_name, and update comments that say "ciphertext name" (or "encrypted name") to say "no-key name" instead when warranted. Link: https://lore.kernel.org/r/20200924042624.98439-2-ebiggers@kernel.org Signed-off-by: Eric Biggers commit bac12f2569d1e2378d8de59eefbaa1d0ef5101dc Author: Amit Kucheria Date: Thu Sep 10 15:44:30 2020 +0530 arm64: dts: qcom: sm8250: Add thermal zones and throttling support sm8250 has 24 thermal sensors split across two tsens controllers. Add the thermal zones to expose them and wireup the cpus to throttle on crossing passive temperature thresholds. Signed-off-by: Amit Kucheria Link: https://lore.kernel.org/r/89b83b3caa4e32db08fe402cfa510feb25232aa0.1599732068.git.amitk@kernel.org Signed-off-by: Bjorn Andersson commit e38175f6e11749427d724abddf3bb8b9928eb232 Author: Dmitry Baryshkov Date: Thu Sep 17 23:39:12 2020 +0300 arm64: defconfig: enable Qualcomm ASoC modules Enable CONFIG_SND_SOC_QCOM and several platform drivers to be built as modules. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200917203913.3250205-3-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit b7340527d6225bbb61dd317eb65cb0539fca2a0f Author: Dmitry Baryshkov Date: Thu Sep 17 23:39:11 2020 +0300 arm64: defconfig: qcom: enable GPU clock controller for SM8[12]50 Enable GPU Clock Controller for SM8150 and SM8250 to allow using Adreon GPU on these SoCs. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200917203913.3250205-2-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 3ba4a661ee4915e165f3d20e23cc4de8f55f777d Author: Dmitry Baryshkov Date: Thu Sep 17 23:39:10 2020 +0300 arm64: defconfig: enable INTERCONNECT for Qualcomm chipsets Enable CONFIG_INTERCONNECT and interconnect drivers for several Qualcomm chipsets to enable bus bandwidth control on these SoCs. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200917203913.3250205-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 182bf3f3ddb607a0715b73a8396af1fce0945c14 Merge: f00f2f7fe8603 f747c7e15d7bc Author: Alexei Starovoitov Date: Wed Sep 23 19:32:09 2020 -0700 Merge branch 'rtt-speedup.2020.09.16a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into bpf-next Signed-off-by: Alexei Starovoitov commit f00f2f7fe86036a586e26bd55ad86310477199a3 Author: Alexei Starovoitov Date: Wed Sep 23 19:10:38 2020 -0700 Revert "bpf: Fix potential call bpf_link_free() in atomic context" This reverts commit 31f23a6a181c81543b10a1a9056b0e6c7ef1c747. This change made many selftests/bpf flaky: flow_dissector, sk_lookup, sk_assign and others. There was no issue in the code. Signed-off-by: Alexei Starovoitov commit e4a85c545603227f42088e9ad71fb01f9b67d6c9 Merge: e0da743066b4c ed409f3bbaa56 Author: David S. Miller Date: Wed Sep 23 18:13:45 2020 -0700 Merge branch 'net-dsa-b53-Configure-VLANs-while-not-filtering' Florian Fainelli says: ==================== net: dsa: b53: Configure VLANs while not filtering These two patches allow the b53 driver which always configures its CPU port as egress tagged to behave correctly with VLANs being always configured whenever a port is added to a bridge. Vladimir provides a patch that aligns the bridge with vlan_filtering=0 receive path to behave the same as vlan_filtering=1. Per discussion with Nikolay, this behavior is deemed to be too DSA specific to be done in the bridge proper. This is a preliminary series for Vladimir to make configure_vlan_while_filtering the default behavior for all DSA drivers in the future. Thanks! Changes in v3: - added Vladimir's Acked-by tag to patch #2 - removed unnecessary if_vlan.h inclusion in patch #2 - reworded commit message to be accurate with the code changes Changes in v2: - moved the call to dsa_untag_bridge_pvid() into net/dsa/tag_brcm.c since we have a single user for now ==================== Signed-off-by: David S. Miller commit ed409f3bbaa5632b8316f7596dec227814811620 Author: Florian Fainelli Date: Wed Sep 23 14:40:38 2020 -0700 net: dsa: b53: Configure VLANs while not filtering Update the B53 driver to support VLANs while not filtering. This requires us to enable VLAN globally within the switch upon driver initial configuration (dev->vlan_enabled). We also need to remove the code that dealt with PVID re-configuration in b53_vlan_filtering() since that function worked under the assumption that it would only be called to make a bridge VLAN filtering, or not filtering, and we would attempt to move the port's PVID accordingly. Now that VLANs are programmed all the time, even in the case of a non-VLAN filtering bridge, we would be programming a default_pvid for the bridged switch ports. We need the DSA receive path to pop the VLAN tag if it is the bridge's default_pvid because the CPU port is always programmed tagged in the programmed VLANs. In order to do so we utilize the dsa_untag_bridge_pvid() helper introduced in the commit before within net/dsa/tag_brcm.c. Acked-by: Vladimir Oltean Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 412a1526d067e355b101e84344d998c3753fe258 Author: Vladimir Oltean Date: Wed Sep 23 14:40:37 2020 -0700 net: dsa: untag the bridge pvid from rx skbs Currently the bridge untags VLANs present in its VLAN groups in __allowed_ingress() only when VLAN filtering is enabled. But when a skb is seen on the RX path as tagged with the bridge's pvid, and that bridge has vlan_filtering=0, and there isn't any 8021q upper with that VLAN either, then we have a problem. The bridge will not untag it (since it is supposed to remain VLAN-unaware), and pvid-tagged communication will be broken. There are 2 situations where we can end up like that: 1. When installing a pvid in egress-tagged mode, like this: ip link add dev br0 type bridge vlan_filtering 0 ip link set swp0 master br0 bridge vlan del dev swp0 vid 1 bridge vlan add dev swp0 vid 1 pvid This happens because DSA configures the VLAN membership of the CPU port using the same flags as swp0 (in this case "pvid and not untagged"), in an attempt to copy the frame as-is from ingress to the CPU. However, in this case, the packet may arrive untagged on ingress, it will be pvid-tagged by the ingress port, and will be sent as egress-tagged towards the CPU. Otherwise stated, the CPU will see a VLAN tag where there was none to speak of on ingress. When vlan_filtering is 1, this is not a problem, as stated in the first paragraph, because __allowed_ingress() will pop it. But currently, when vlan_filtering is 0 and we have such a VLAN configuration, we need an 8021q upper (br0.1) to be able to ping over that VLAN, which is not symmetrical with the vlan_filtering=1 case, and therefore, confusing for users. Basically what DSA attempts to do is simply an approximation: try to copy the skb with (or without) the same VLAN all the way up to the CPU. But DSA drivers treat CPU port VLAN membership in various ways (which is a good segue into situation 2). And some of those drivers simply tell the CPU port to copy the frame unmodified, which is the golden standard when it comes to VLAN processing (therefore, any driver which can configure the hardware to do that, should do that, and discard the VLAN flags requested by DSA on the CPU port). 2. Some DSA drivers always configure the CPU port as egress-tagged, in an attempt to recover the classified VLAN from the skb. These drivers cannot work at all with untagged traffic when bridged in vlan_filtering=0 mode. And they can't go for the easy "just keep the pvid as egress-untagged towards the CPU" route, because each front port can have its own pvid, and that might require conflicting VLAN membership settings on the CPU port (swp1 is pvid for VID 1 and egress-tagged for VID 2; swp2 is egress-taggeed for VID 1 and pvid for VID 2; with this simplistic approach, the CPU port, which is really a separate hardware entity and has its own VLAN membership settings, would end up being egress-untagged in both VID 1 and VID 2, therefore losing the VLAN tags of ingress traffic). So the only thing we can do is to create a helper function for resolving the problematic case (that is, a function which untags the bridge pvid when that is in vlan_filtering=0 mode), which taggers in need should call. It isn't called from the generic DSA receive path because there are drivers that fall neither in the first nor second category. Signed-off-by: Vladimir Oltean Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit e0da743066b4c59c9b67b0717462bf1dfede544b Merge: 3fc826f121d89 4069a572d423b Author: David S. Miller Date: Wed Sep 23 18:02:49 2020 -0700 Merge branch 'PHY-subsystem-kernel-doc' Andrew Lunn says: ==================== PHY subsystem kernel doc The first patches fix existing warnings in the kerneldoc for the PHY subsystem, and then the 2nd extend the kernel documentation for the major structures and functions in the PHY subsystem. v2: Drop the other fixes which have already been merged. s/phy/PHY/g TBI TypOs ==================== Signed-off-by: David S. Miller commit 4069a572d423b73919ae40a500dfc4b10f8a6f32 Author: Andrew Lunn Date: Wed Sep 23 00:29:03 2020 +0200 net: phy: Document core PHY structures Add kerneldoc for the core PHY data structures, a few inline functions and exported functions which are not already documented. v2 Typos g/phy/PHY/s Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 39097ab66dbe89b16438dd6d178d49e75cb922ed Author: Andrew Lunn Date: Wed Sep 23 00:29:02 2020 +0200 net: phy: Fixup kernel doc Add missing parameter documentation, or fixup wrong parameter names. Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 3fc826f121d89c5aa4afd7b3408b07e0ff59466b Merge: 9d33ffaaf3173 0fa45ee3c1cb7 Author: David S. Miller Date: Wed Sep 23 17:51:16 2020 -0700 Merge branch 'net-dsa-bcm_sf2-Additional-DT-changes' Florian Fainelli says: ==================== net: dsa: bcm_sf2: Additional DT changes This patch series includes some additional changes to the bcm_sf2 in order to support the Device Tree firmwares provided on such platforms. ==================== Signed-off-by: David S. Miller commit 0fa45ee3c1cb73be9d3e212d3f78557c95277fdd Author: Florian Fainelli Date: Tue Sep 22 13:03:56 2020 -0700 net: dsa: bcm_sf2: Include address 0 for MDIO diversion We need to include MDIO address 0, which is how our Device Tree blobs indicate where to find the external BCM53125 switches. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 8c28044097f28e27428922f957b08393f35c3e93 Author: Florian Fainelli Date: Tue Sep 22 13:03:55 2020 -0700 net: dsa: bcm_sf2: Disallow port 5 to be a DSA CPU port While the switch driver is written such that port 5 or 8 could be CPU ports, the use case on Broadcom STB chips is to use port 8 exclusively. The platform firmware does make port 5 comply to a proper DSA CPU port binding by specifiying an "ethernet" phandle. This is undesirable for now until we have an user-space configuration mechanism (such as devlink) which could support dynamically changing the port flavor at run time. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 9d33ffaaf3173a5850c1f8fa54ce43b47e80f182 Merge: de2b541b3b1d1 a55ff8ef5a6bd Author: David S. Miller Date: Wed Sep 23 17:45:23 2020 -0700 Merge branch 'octeontx2-Add-support-for-VLAN-based-flow-distribution' George Cherian says: ==================== octeontx2: Add support for VLAN based flow distribution This series add support for VLAN based flow distribution for octeontx2 netdev driver. This adds support for configuring the same via ethtool. Following tests have been done. - Multi VLAN flow with same SD - Multi VLAN flow with same SDFN - Single VLAN flow with multi SD - Single VLAN flow with multi SDFN All tests done for udp/tcp both v4 and v6 ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit a55ff8ef5a6bde5d2cf236ac07c3b6e3a437d421 Author: George Cherian Date: Tue Sep 22 18:37:27 2020 +0530 octeontx2-pf: Support to change VLAN based RSS hash options via ethtool Add support to control rx-flow-hash based on VLAN. By default VLAN plus 4-tuple based hashing is enabled. Changes can be done runtime using ethtool To enable 2-tuple plus VLAN based flow distribution # ethtool -N rx-flow-hash sdv To enable 4-tuple plus VLAN based flow distribution # ethtool -N rx-flow-hash sdfnv Signed-off-by: George Cherian Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 8f900363df52311cab72869668905b19d1888ef5 Author: George Cherian Date: Tue Sep 22 18:37:26 2020 +0530 octeontx2-af: Add support for VLAN based RSS hashing Added support for PF/VF drivers to choose RSS flow key algorithm with VLAN tag included in hashing input data. Only CTAG is considered. Signed-off-by: George Cherian Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit de2b541b3b1d16184f39d2b165ae9c3f12e37878 Author: Mauro Carvalho Chehab Date: Tue Sep 22 13:22:52 2020 +0200 net: fix a new kernel-doc warning at dev.c kernel-doc expects the function prototype to be just after the kernel-doc markup, as otherwise it will get it all wrong: ./net/core/dev.c:10036: warning: Excess function parameter 'dev' description in 'WAIT_REFS_MIN_MSECS' Fixes: 0e4be9e57e8c ("net: use exponential backoff in netdev_wait_allrefs") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Francesco Ruggeri Signed-off-by: David S. Miller commit 774e9ea6656c9bd7d7ddf6ac86978c4acfca72ad Merge: 35e3dbfafe6d1 06fb560602a42 Author: David S. Miller Date: Wed Sep 23 17:41:15 2020 -0700 Merge branch 'net-mdio-ipq4019-add-Clause-45-support' Robert Marko says: ==================== net: mdio-ipq4019: add Clause 45 support This patch series adds support for Clause 45 to the driver. While at it also change some defines to upper case to match rest of the driver. Changes since v4: * Rebase onto net-next.git Changes since v1: * Drop clock patches, these need further investigation and no user for non default configuration has been found ==================== Signed-off-by: David S. Miller commit 06fb560602a42246910e410d24dcb48c91b652ad Author: Robert Marko Date: Tue Sep 22 12:16:32 2020 +0200 net: mdio-ipq4019: add Clause 45 support While up-streaming the IPQ4019 driver it was thought that the controller had no Clause 45 support, but it actually does and its activated by writing a bit to the mode register. So lets add it as newer SoC-s use the same controller and Clause 45 compliant PHY-s. Signed-off-by: Robert Marko Cc: Luka Perkov Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit b840ec1efd2495b820025b7d962276662d8ac2c8 Author: Robert Marko Date: Tue Sep 22 12:16:31 2020 +0200 net: mdio-ipq4019: change defines to upper case In the commit adding the IPQ4019 MDIO driver, defines for timeout and sleep partially used lower case. Lets change it to upper case in line with the rest of driver defines. Signed-off-by: Robert Marko Cc: Luka Perkov Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 35e3dbfafe6d1cdbd37146d8dc63e327c1f4a66b Merge: 36493269120e1 31a9746062b84 Author: David S. Miller Date: Wed Sep 23 17:35:26 2020 -0700 Merge branch 'Introduce-mbox-tracepoints-for-Octeontx2' Subbaraya Sundeep says: ==================== Introduce mbox tracepoints for Octeontx2 This patchset adds tracepoints support for mailbox. In Octeontx2, PFs and VFs need to communicate with AF for allocating and freeing resources. Once all the configuration is done by AF for a PF/VF then packet I/O can happen on PF/VF queues. When an interface is brought up many mailbox messages are sent to AF for initializing queues. Say a VF is brought up then each message is sent to PF and PF forwards to AF and response also traverses from AF to PF and then VF. To aid debugging, tracepoints are added at places where messages are allocated, sent and message interrupts. Below is the trace of one of the messages from VF to AF and AF response back to VF: ~ # echo 1 > /sys/kernel/tracing/events/rvu/enable ~ # ifconfig eth20 up [ 279.379559] eth20 NIC Link is UP 10000 Mbps Full duplex ~ # cat /sys/kernel/tracing/trace ifconfig-171 [000] .... 275.753345: otx2_msg_alloc: [0002:02:00.1] msg:(0x400) size:40 ifconfig-171 [000] ...1 275.753347: otx2_msg_send: [0002:02:00.1] sent 1 msg(s) of size:48 -0 [001] dNh1 275.753356: otx2_msg_interrupt: [0002:02:00.0] mbox interrupt VF(s) to PF (0x1) kworker/u9:1-90 [001] ...1 275.753364: otx2_msg_send: [0002:02:00.0] sent 1 msg(s) of size:48 kworker/u9:1-90 [001] d.h. 275.753367: otx2_msg_interrupt: [0002:01:00.0] mbox interrupt PF(s) to AF (0x2) kworker/u9:2-167 [002] .... 275.753535: otx2_msg_process: [0002:01:00.0] msg:(0x400) error:0 kworker/u9:2-167 [002] ...1 275.753537: otx2_msg_send: [0002:01:00.0] sent 1 msg(s) of size:32 -0 [003] d.h1 275.753543: otx2_msg_interrupt: [0002:02:00.0] mbox interrupt AF to PF (0x1) -0 [001] d.h2 275.754376: otx2_msg_interrupt: [0002:02:00.1] mbox interrupt PF to VF (0x1) v3 changes: Removed EXPORT_TRACEPOINT_SYMBOLS of otx2_msg_send and otx2_msg_check since they are called locally only v2 changes: Removed otx2_msg_err tracepoint since it is similar to devlink_hwerr and it will be used instead when devlink supported is added. ==================== Signed-off-by: David S. Miller commit 31a9746062b84f7a061c82339825391073cd0960 Author: Subbaraya Sundeep Date: Tue Sep 22 08:27:05 2020 +0530 octeontx2-pf: Add tracepoints for PF/VF mailbox With tracepoints support present in the mailbox code this patch adds tracepoints in PF and VF drivers at places where mailbox messages are allocated, sent and at message interrupts. Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 49142d12363d14de5b71e4192988b7572e86f001 Author: Subbaraya Sundeep Date: Tue Sep 22 08:27:04 2020 +0530 octeontx2-af: Introduce tracepoints for mailbox Added tracepoints in mailbox code so that the mailbox operations like message allocation, sending message and message interrupts are traced. Also the mailbox errors occurred like timeout or wrong responses are traced. These will help in debugging mailbox issues. Here's an example output showing one of the mailbox messages sent by PF to AF and AF responding to it: ~# mount -t tracefs none /sys/kernel/tracing/ ~# echo 1 > /sys/kernel/tracing/events/rvu/enable ~# ifconfig eth0 up ~# cat /sys/kernel/tracing/trace ~# cat /sys/kernel/tracing/trace tracer: nop _-----=> irqs-off / _----=> need-resched | / _---=> hardirq/softirq || / _--=> preempt-depth ||| / delay TASK-PID CPU# |||| TIMESTAMP FUNCTION | | | |||| | | ifconfig-2382 [002] .... 756.161892: otx2_msg_alloc: [0002:02:00.0] msg:(0x400) size:40 ifconfig-2382 [002] ...1 756.161895: otx2_msg_send: [0002:02:00.0] sent 1 msg(s) of size:48 -0 [000] d.h1 756.161902: otx2_msg_interrupt: [0002:01:00.0] mbox interrupt PF(s) to AF (0x2) kworker/u49:0-1165 [000] .... 756.162049: otx2_msg_process: [0002:01:00.0] msg:(0x400) error:0 kworker/u49:0-1165 [000] ...1 756.162051: otx2_msg_send: [0002:01:00.0] sent 1 msg(s) of size:32 kworker/u49:0-1165 [000] d.h. 756.162056: otx2_msg_interrupt: [0002:02:00.0] mbox interrupt AF to PF (0x1) Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 36493269120e1fdc021001431b0cebad7d59958e Author: Barry Song Date: Tue Sep 22 13:56:15 2020 +1200 net: allwinner: remove redundant irqsave and irqrestore in hardIRQ The comment "holders of db->lock must always block IRQs" and related code to do irqsave and irqrestore don't make sense since we are in a IRQ-disabled hardIRQ context. Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Barry Song Acked-by: Maxime Ripard Signed-off-by: David S. Miller commit e4b9146849f246e77da4787657a3a95c1b6d2833 Author: Rikard Falkeborn Date: Tue Sep 22 00:55:17 2020 +0200 net: hns3: Constify static structs A number of static variables were not modified. Make them const to allow the compiler to put them in read-only memory. In order to do so, constify a couple of input pointers as well as some local pointers. This moves about 35Kb to read-only memory as seen by the output of the size command. Before: text data bss dec hex filename 404938 111534 640 517112 7e3f8 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge.ko After: text data bss dec hex filename 439499 76974 640 517113 7e3f9 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge.ko Signed-off-by: Rikard Falkeborn Signed-off-by: David S. Miller commit ca52a47af60f791b08a540a8e14d8f5751ee63e9 Merge: 9123e3a74ec7b 70d839e2761d2 Author: Stephen Boyd Date: Wed Sep 23 17:00:33 2020 -0700 Merge tag 'v5.10-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: Ability to build the clock driver as module and removal of an unused parent-names struct. * tag 'v5.10-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: rk3399: Support module build clk: rockchip: fix the clk config to support module build clk: rockchip: Export some clock common APIs for module drivers clk: rockchip: Export rockchip_register_softrst() clk: rockchip: Export rockchip_clk_register_ddrclk() clk: rockchip: Use clk_hw_register_composite instead of clk_register_composite calls clk: rockchip: rk3308: drop unused mux_timer_src_p commit f102ed0686b16a91473ad8ca4af8159b2d6bcb0a Author: Stephen Boyd Date: Tue Sep 22 12:16:41 2020 -0700 clk: tegra: Drop !provider check in tegra210_clk_emc_set_rate() The provider variable is already dereferenced earlier in this function. Drop the check for NULL as it is impossible. Found with smatch drivers/clk/tegra/clk-tegra210-emc.c:131 tegra210_clk_emc_set_rate() warn: variable dereferenced before check 'provider' (see line 124) Cc: Joseph Lo Cc: Thierry Reding Fixes: 0ac65fc946d3 ("clk: tegra: Implement Tegra210 EMC clock") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200922191641.2305144-1-sboyd@kernel.org Acked-by: Thierry Reding commit 987cd5f049a2b5ed46901f6a874040a08d21d31f Author: Pavel Machek (CIP) Date: Mon Sep 21 13:41:03 2020 +0200 net/mlx5: remove unreachable return The last return statement is unreachable code. I'm not sure if it will provoke any warnings, but it looks ugly. Signed-off-by: Pavel Machek (CIP) Signed-off-by: Saeed Mahameed commit d490c83ef9e91cdad0788892bc2f1836161d4168 Author: Qinglang Miao Date: Mon Sep 21 21:10:44 2020 +0800 net/mlx5: simplify the return expression of mlx5_ec_init() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Saeed Mahameed commit e1915a67f64782baf752c7330c3a146b6113040d Author: Denis Efremov Date: Mon Sep 21 19:23:45 2020 +0300 net/mlx5e: Use kfree() to free fd->g in accel_fs_tcp_create_groups() Memory ft->g in accel_fs_tcp_create_groups() is allocaed with kcalloc(). It's excessive to free ft->g with kvfree(). Use kfree() instead. Signed-off-by: Denis Efremov Signed-off-by: Saeed Mahameed commit 22db4c24452a6681c7e99c6a06b38b5418395bec Author: Denis Efremov Date: Mon Sep 21 19:23:44 2020 +0300 net/mlx5e: IPsec: Use kvfree() for memory allocated with kvzalloc() Variables flow_group_in, spec in rx_fs_create() are allocated with kvzalloc(). It's incorrect to free them with kfree(). Use kvfree() instead. Fixes: 5e466345291a ("net/mlx5e: IPsec: Add IPsec steering in local NIC RX") Signed-off-by: Denis Efremov Signed-off-by: Saeed Mahameed commit 670c239a648f0a5e19d05d8256df292564cc0c0d Author: Ariel Levkovich Date: Sun Aug 30 22:38:11 2020 +0300 net/mlx5e: Keep direct reference to mlx5_core_dev in tc ct Keep and use a direct reference to the mlx5 core device in all of tc_ct code instead of accessing it via a pointer to mlx5 eswitch in order to support nic mode ct offload for VF devices that don't have a valid eswitch pointer set. Signed-off-by: Ariel Levkovich Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 89fbdbae9b35739bb93bbc15476e846415d1eda2 Author: Saeed Mahameed Date: Tue Sep 22 18:48:04 2020 -0700 net/mlx5e: TC: Remove unused parameter from mlx5_tc_ct_add_no_trk_match() priv is never used in this function Fixes: 7e36feeb0467 ("net/mlx5e: CT: Don't offload tuple rewrites for established tuples") Signed-off-by: Saeed Mahameed commit 1edae2335adfa7006853e8b427f0c7c3f46b51dd Author: Oz Shlomo Date: Sun Jul 19 13:51:39 2020 +0000 net/mlx5e: CT: Use the same counter for both directions A connection is represented by two 5-tuple entries, one for each direction. Currently, each direction allocates its own hw counter, which is inefficient as ct aging is managed per connection. Share the counter that was allocated for the original direction with the reverse direction. Signed-off-by: Oz Shlomo Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit aedd133d17bcee184d3da35f4c808684fae94268 Author: Ariel Levkovich Date: Tue Jul 21 17:33:26 2020 +0300 net/mlx5e: Support CT offload for tc nic flows Adding support to perform CT related tc actions and matching on CT states for nic flows. The ct flows management and handling will be done using a new instance of the ct database that is declared in this patch to keep it separate from the eswitch ct flows database. Offloading and unoffloading ct flows will be done using the existing ct offload api by providing it the relevant ct database reference in each mode. In addition, refactoring the tc ct api is introduced to make it agnostic to the flow type and perform the resource allocations and rule insertion to the proper steering domain in the device. In the initialization call, the api requests and stores in the ct database instance all the relevant information that distinguishes between nic flows and esw flows, such as chains database, steering namespace and mod hdr table. This way the operations of adding and removing ct flows to the device can later performed agnostically to the flow type. Signed-off-by: Ariel Levkovich Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 211a536485f7f1d0bb48781ac629fa0613f55f78 Author: Ariel Levkovich Date: Thu May 7 19:11:27 2020 +0300 net/mlx5e: rework ct offload init messages The changes are: - Use mlx5_core print macros instead of netdev_warn since netdev is not always initialized at that stage. - Print a warning message in case the issue is with lack of support for CT offload without indicating an error. Signed-off-by: Ariel Levkovich Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit c75690972228ac300f5645184d5dece1d352c1af Author: Ariel Levkovich Date: Wed Apr 29 01:27:15 2020 +0300 net/mlx5e: Add tc chains offload support for nic flows Allow adding nic tc flow rules with goto chain action. Connecting the nic flows to the mlx5 chains infrastructure in previous patches allows us to support the creation of chained flow tables and rules that direct to another chain for further packet processing. This is a required preparation to support CT offloads for nic tc flows. We allow the creation of 256 different chains for nic flows since we have 8 bits available for the chain restore tag in case of a miss. Signed-off-by: Ariel Levkovich Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit c620b772152b8274031083bdb2e11c963e596c5c Author: Ariel Levkovich Date: Thu Apr 30 05:54:08 2020 +0300 net/mlx5: Refactor tc flow attributes structure In order to support chains and connection tracking offload for nic flows, there's a need to introduce a common flow attributes struct so that these features can be agnostic and have access to a single attributes struct, regardless of the flow type. Therefore, a new tc flow attributes format is introduced to allow access to attributes that are common to eswitch and nic flows. The common attributes will always get allocated for the new flows, regardless of their type, while the type specific attributes are separated into different structs and will be allocated based on the flow type to avoid memory waste. When allocating the flow attributes the caller provides the flow steering namespace and according the namespace type the additional space for the extra, type specific, attributes is determined and added to the total attribute allocation size. In addition, the attributes that are going to be common to both flow types are moved to the common attributes struct. Signed-off-by: Ariel Levkovich Reviewed-by: Roi Dayan Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed Signed-off-by: Saeed Mahameed commit 08247066b82cec3da87b02e4f802e02d2952fa3d Author: Ariel Levkovich Date: Tue Apr 28 21:59:25 2020 +0300 net/mlx5e: Split nic tc flow allocation and creation For future support of CT offload with nic tc flows, where the flow rule is not created immediately but rather following a future event, the patch is splitting the nic rule creation and deletion into 2 parts: 1. Creating/Deleting and setting the rule attributes. 2. Creating/Deleting the flow table and flow rule itself. This way the attributes can be prepared and stored in the flow handle when the tc flow is created but the rule can actually be created at any point in the future, using these pre allocated attributes. Signed-off-by: Ariel Levkovich Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 6a0646744c484227d74b0204783bca4dda61cf7b Author: Ariel Levkovich Date: Tue Apr 28 01:29:26 2020 +0300 net/mlx5e: Tc nic flows to use mlx5_chains flow tables Change nic tc flows offload path to use the chains and prios infrastructure for the flow table creation as a preparation to support tc multi chains and priorities for nic flows. Adding an instance of the table chaining database to the nic tc struct and perform the root table creation and desctuction via the chains api while keeping the limit of a single chain (0) in nic tc mode. This will be extendable to supporting multiple chains in the following patches. The flow table sizes and default miss table parameters that are provided to the chains creation api are kept the same. Signed-off-by: Ariel Levkovich Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 006f623e67ff281ce290276f0c937a6c57de2810 Author: Ariel Levkovich Date: Tue Apr 28 01:39:38 2020 +0300 net/mlx5: Allow ft level ignore for nic rx tables Allow setting a flow table with a lower level as a rule destination in nic rx tables. This is required in order to support table chaining of tc nic flows. Signed-off-by: Ariel Levkovich Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit ae430332557acf59272ec994b20c0c3d0a3fb37f Author: Ariel Levkovich Date: Sat Apr 25 00:06:19 2020 +0300 net/mlx5: Refactor multi chains and prios support Decouple the chains infrastructure from eswitch and make it generic to support other steering namespaces. The change defines an agnostic data structure to keep all the relevant information for maintaining flow table chaining in any steering namespace. Each namespace that requires table chaining will be required to allocate such data structure. The chains creation code will receive the steering namespace and flow table parameters from the caller so it will operate agnosticly when creating the required resources to maintain the table chaining function while Parts of the code that are relevant to eswitch specific functionality are moved to eswitch files. Signed-off-by: Ariel Levkovich Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 67e2fae3b767fd4444f3f161f6420d0d0338a10d Author: Brendan Higgins Date: Wed Sep 23 14:19:38 2020 -0700 kunit: tool: fix --alltests flag Alltests flag evidently stopped working when run from outside of the root of the source tree, so fix that. Also add an additional broken config to the broken_on_uml config. Signed-off-by: Brendan Higgins Signed-off-by: Shuah Khan commit eab1de67d292d0b88c148721a276897238150b89 Author: Zhen Lei Date: Sat Sep 19 20:44:12 2020 +0800 dt-bindings: sp804: add support for Hisilicon sp804 timer Some Hisilicon SoCs, such as Hi1212, use the Hisilicon extended sp804 timer. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20200919124412.4135-2-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 68d4fd30c83b1b208e08c954cd45e6474b148c87 Merge: 35c52c5c88d84 36cfec73595cc Author: David S. Miller Date: Wed Sep 23 13:24:35 2020 -0700 Merge branch 'net-bridge-mcast-IGMPv3-MLDv2-fast-path-part-2' Nikolay Aleksandrov says: ==================== net: bridge: mcast: IGMPv3/MLDv2 fast-path (part 2) This is the second part of the IGMPv3/MLDv2 support which adds support for the fast-path. In order to be able to handle source entries we add mdb support for S,G entries (i.e. we add source address support to br_ip), that requires to extend the current mdb netlink API, fortunately we just add another attribute which will contain nested future mdb attributes, then we use it to add support for S,G user- add, del and dump. The lookup sequence is simple: when IGMPv3/MLDv2 are enabled do the S,G lookup first and if it fails fallback to *,G. The more complex part is when we begin handling source lists and auto-installing S,G entries and *,G filter mode transitions. We have the following cases: 1) *,G INCLUDE -> EXCLUDE transition: we need to install the port in all of *,G's installed S,G entries for proper replication (except the ones explicitly blocked), this is also necessary when adding a new *,G EXCLUDE port group 2) *,G EXCLUDE -> INCLUDE transition: we need to remove the port from all of *,G's installed S,G entries, this is also necessary when removing a *,G port group 3) New S,G port entry: we need to install all current *,G EXCLUDE ports 4) Remove S,G port entry: if all other port groups were auto-installed we can safely remove them and delete the whole S,G entry Currently we compute these operations from the available ports, their source lists and their filter mode. In the future we can extend the port group structure and reduce the running time of these ops. Also one current limitation is that host-joined S,G entries are not supported. I.e. one cannot add "dev bridge port bridge" mdb S,G entries. The host join is currently considered an EXCLUDE {} join, so it's reflected in all of *,G's installed S,G entries. If an S,G,port entry is added as temporary then the kernel can take it over if a source shows up from a report, permanent entries are skipped. In order to properly handle blocked sources we add a new port group blocked flag to avoid forwarding to that port group in the S,G. Finally when forwarding we use the port group filter mode (if it's INCLUDE and the port group is from a *,G then don't replicate to it, respectively if it's EXCLUDE then forward) and the blocked flag (obviously if it's set - skip that port unless it's a router port) to decide if the port should be skipped. Another limitation is that we can't do some of the above transitions without small traffic drop while installing/removing entries. That will be taken care of when we add atomic swap of port replication lists later. Patch break down: patches 1-3: prepare the mdb code for better extack support which is used in future patches to return a more meaningful error patches 4-6: add the source address field to struct br_ip, and do minor cleanups around it patches 7-8: extend the mdb netlink API so we can send new mdb attributes and uses the new API for S,G entry add/del/dump support patch 9: takes care of S,G entries when doing a lookup (first S,G then *,G lookup) patch 10: adds a new port group field and attribute for origin protocol we use the already available RTPROT_ definitions, currently user-space entries are added as RTPROT_STATIC and kernel entries are added as RTPROT_KERNEL, we may allow user-space to set custom values later (e.g. for FRR, clag) patch 11: adds an internal S,G,port rhashtable to speed up filter mode transitions patch 12: initial automatic install of S,G entries based on port groups' source lists patch 13: handles port group modes on transitions or when new port group entries are added patch 14: self-explanatory - adds support for blocked port group entries needed to stop forwarding to particular S,G,port entries patch 15: handles host-join/leave state changes, treats host-joins as EXCLUDE {} groups (reflected in all *,G's S,G entries) patch 16: finally adds the fast-path filter mode and block flag support Here're the sets that will come next (in order): - iproute2 support for IGMPv3/MLDv2 - selftests for all mode transitions and group flags - explicit host tracking for proper fast-leave support - atomic port replication lists (these are also needed for broadcast forwarding optimizations) - mode transition optimization and removal of open-coded sorted lists Not implemented yet: - Host IGMPv3/MLDv2 filter support (currently we handle only join/leave as before) - Proper other querier source timer and value updates - IGMPv3/v2 MLDv2/v1 compat (I have a few rough patches for this one) v2: fix build with CONFIG_BATMAN_ADV_MCAST in patch 6 ==================== Signed-off-by: David S. Miller commit 36cfec73595ccbaf245b8d6ab31dadbff3962346 Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:27 2020 +0300 net: bridge: mcast: when forwarding handle filter mode and blocked flag We need to avoid forwarding to ports in MCAST_INCLUDE filter mode when the mdst entry is a *,G or when the port has the blocked flag. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 094b82fd5342fccaf27b1727a55546dc4b32047e Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:26 2020 +0300 net: bridge: mcast: handle host state Since host joins are considered as EXCLUDE {} joins we need to reflect that in all of *,G ports' S,G entries. Since the S,Gs can have host_joined == true only set automatically we can safely set it to false when removing all automatically added entries upon S,G delete. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 9116ffbf1dd71f953ffda4198d01f82d3ca16df8 Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:25 2020 +0300 net: bridge: mcast: add support for blocked port groups When excluding S,G entries we need a way to block a particular S,G,port. The new port group flag is managed based on the source's timer as per RFCs 3376 and 3810. When a source expires and its port group is in EXCLUDE mode, it will be blocked. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 8266a0491e92d39dc9af739e8380a0daa9b8836b Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:24 2020 +0300 net: bridge: mcast: handle port group filter modes We need to handle group filter mode transitions and initial state. To change a port group's INCLUDE -> EXCLUDE mode (or when we have added a new port group in EXCLUDE mode) we need to add that port to all of *,G ports' S,G entries for proper replication. When the EXCLUDE state is changed from IGMPv3 report, br_multicast_fwd_filter_exclude() must be called after the source list processing because the assumption is that all of the group's S,G entries will be created before transitioning to EXCLUDE mode, i.e. most importantly its blocked entries will already be added so it will not get automatically added to them. The transition EXCLUDE -> INCLUDE happens only when a port group timer expires, it requires us to remove that port from all of *,G ports' S,G entries where it was automatically added previously. Finally when we are adding a new S,G entry we must add all of *,G's EXCLUDE ports to it. In order to distinguish automatically added *,G EXCLUDE ports we have a new port group flag - MDB_PG_FLAGS_STAR_EXCL. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit b08123684bd55fa6d6ee4b52d4ae3040fadb5aa2 Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:23 2020 +0300 net: bridge: mcast: install S,G entries automatically based on reports This patch adds support for automatic install of S,G mdb entries based on the port group's source list and the source entry's timer. Once installed the S,G will be used when forwarding packets if the approprate multicast/mld versions are set. A new source flag called BR_SGRP_F_INSTALLED denotes if the source has a forwarding mdb entry installed. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 085b53c8beabf9b379762f73aaac562d6c428923 Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:22 2020 +0300 net: bridge: mcast: add sg_port rhashtable To speedup S,G forward handling we need to be able to quickly find out if a port is a member of an S,G group. To do that add a global S,G port rhashtable with key: source addr, group addr, protocol, vid (all br_ip fields) and port pointer. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 8f8cb77e0b22d9044d8d57ab3bb18ea8d0474752 Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:21 2020 +0300 net: bridge: mcast: add rt_protocol field to the port group struct We need to be able to differentiate between pg entries created by user-space and the kernel when we start generating S,G entries for IGMPv3/MLDv2's fast path. User-space entries are created by default as RTPROT_STATIC and the kernel entries are RTPROT_KERNEL. Later we can allow user-space to provide the entry rt_protocol so we can differentiate between who added the entries specifically (e.g. clag, admin, frr etc). Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 7d07a68c251080f8f2cfd071b7b3f7d1093a3375 Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:20 2020 +0300 net: bridge: mcast: when igmpv3/mldv2 are enabled lookup (S,G) first, then (*,G) If (S,G) entries are enabled (igmpv3/mldv2) then look them up first. If there isn't a present (S,G) entry then try to find (*,G). Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 88d4bd180419a7cde3947f191dc4e26fbb19f80b Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:19 2020 +0300 net: bridge: mdb: add support for add/del/dump of entries with source Add new mdb attributes (MDBE_ATTR_SOURCE for setting, MDBA_MDB_EATTR_SOURCE for dumping) to allow add/del and dump of mdb entries with a source address (S,G). New S,G entries are created with filter mode of MCAST_INCLUDE. The same attributes are used for IPv4 and IPv6, they're validated and parsed based on their protocol. S,G host joined entries which are added by user are not allowed yet. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 9c4258c78a2a7624c79b797f40ae2dbfd2555e26 Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:18 2020 +0300 net: bridge: mdb: add support to extend add/del commands Since the MDB add/del code expects an exact struct br_mdb_entry we can't really add any extensions, thus add a new nested attribute at the level of MDBA_SET_ENTRY called MDBA_SET_ENTRY_ATTRS which will be used to pass all new options via netlink attributes. This patch doesn't change anything functionally since the new attribute is not used yet, only parsed. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit eab3227b1240bdcc06c0a01a3fc5bfd2bc12f406 Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:17 2020 +0300 net: bridge: mcast: rename br_ip's u member to dst Since now we have src in br_ip, u no longer makes sense so rename it to dst. No functional changes. v2: fix build with CONFIG_BATMAN_ADV_MCAST CC: Marek Lindner CC: Simon Wunderlich CC: Antonio Quartulli CC: Sven Eckelmann CC: b.a.t.m.a.n@lists.open-mesh.org Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit deb965662d575649dfd1bf15d415cf3386febb59 Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:16 2020 +0300 net: bridge: mcast: use br_ip's src for src groups and querier address Now that we have src and dst in br_ip it is logical to use the src field for the cases where we need to work with a source address such as querier source address and group source address. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit e1ac11859a057ddcf7d6219bd090c7483541767d Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:15 2020 +0300 net: bridge: add src field to br_ip Add a new src field to struct br_ip which will be used to lookup S, G entries. When SSM option is added we will enable full br_ip lookups. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 83f7398ea549df793022ac6e7505040a306a2f7e Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:14 2020 +0300 net: bridge: mdb: use extack in br_mdb_add() and br_mdb_add_group() Pass and use extack all the way down to br_mdb_add_group(). Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 7eea629d07d459dfece80648c7f47f07498fdc9e Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:13 2020 +0300 net: bridge: mdb: move all port and bridge checks to br_mdb_add To avoid doing duplicate device checks and searches (the same were done in br_mdb_add and __br_mdb_add) pass the already found port to __br_mdb_add and pull the bridge's netif_running and enabled multicast checks to br_mdb_add. This would also simplify the future extack errors. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 2ac95dfe25229b13dda95b404004b9c93815c7f9 Author: Nikolay Aleksandrov Date: Tue Sep 22 10:30:12 2020 +0300 net: bridge: mdb: use extack in br_mdb_parse() We can drop the pr_info() calls and just use extack to return a meaningful error to user-space when br_mdb_parse() fails. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 35c52c5c88d8496502b71b02c6754ced9e5cc882 Author: Zheng Yongjun Date: Mon Sep 21 21:32:09 2020 +0800 net: realtek: Remove set but not used variable Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/realtek/8139cp.c: In function cp_tx_timeout: drivers/net/ethernet/realtek/8139cp.c:1242:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] `rc` is never used, so remove it. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit b1b6c110511db61b6fa6945b73b3f5fb4ff29f0b Author: Luo bin Date: Mon Sep 21 15:31:03 2020 +0800 hinic: improve the comments of function header Fix the warnings about function header comments when building hinic driver with "W=1" option. Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 6d772f328d6ad3e4fb64385784571be4be25e63d Merge: 1a26e88d534b8 dc3652d3f0d54 Author: David S. Miller Date: Wed Sep 23 13:11:11 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2020-09-23 The following pull-request contains BPF updates for your *net-next* tree. We've added 95 non-merge commits during the last 22 day(s) which contain a total of 124 files changed, 4211 insertions(+), 2040 deletions(-). The main changes are: 1) Full multi function support in libbpf, from Andrii. 2) Refactoring of function argument checks, from Lorenz. 3) Make bpf_tail_call compatible with functions (subprograms), from Maciej. 4) Program metadata support, from YiFei. 5) bpf iterator optimizations, from Yonghong. ==================== Signed-off-by: David S. Miller commit 0854fa22b9dc43cb4a4140938849dc9fd2427e3a Author: Rikard Falkeborn Date: Tue Sep 22 22:19:41 2020 +0200 counter: microchip-tcb-capture: Constify mchp_tc_ops The only usage of mchp_tc_ops is to assign its address to the ops field in the counter_device struct which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Acked-by: William Breathitt Gray Link: https://lore.kernel.org/r/20200922201941.41328-1-rikard.falkeborn@gmail.com Signed-off-by: Jonathan Cameron commit dc3652d3f0d5479768ec8eb7f7aabbba6ed75d95 Author: Jiri Olsa Date: Wed Sep 23 20:57:35 2020 +0200 tools resolve_btfids: Always force HOSTARCH Seth reported problem with cross builds, that fail on resolve_btfids build, because we are trying to build it on cross build arch. Fixing this by always forcing the host arch. Reported-by: Seth Forshee Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200923185735.3048198-2-jolsa@kernel.org commit 017dab341ee75c0d3675b9b3d28be28d38e6defc Author: Jiri Olsa Date: Wed Sep 23 20:57:34 2020 +0200 bpf: Check CONFIG_BPF option for resolve_btfids Currently all the resolve_btfids 'users' are under CONFIG_BPF code, so if we have CONFIG_BPF disabled, resolve_btfids will fail, because there's no data to resolve. Disabling resolve_btfids if there's CONFIG_BPF disabled, so we won't fail such builds. Suggested-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200923185735.3048198-1-jolsa@kernel.org commit 1a26e88d534b816c126891a4b81ad93b284d28a1 Merge: 40fe2e0db766f 2c19bb43e5572 Author: David S. Miller Date: Wed Sep 23 12:09:08 2020 -0700 Merge tag 'linux-can-next-for-5.10-20200923' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2020-09-23 this is a pull request of 20 patches for net-next. The complete series target the flexcan driver and is created by Joakim Zhang and me. The first six patches are cleanup (sort include files alphabetically, remove stray empty line, get rid of long lines) and adding more registers and documentation (registers and wakeup interrupt). Then in two patches the transceiver regulator is made optional, and a check for maximum transceiver bitrate is added. Then the ECC support for HW thats supports this is added. The next three patches improve suspend and low power mode handling. Followed by six patches that add CAN-FD support and CAN-FD related features. The last two patches add support for the flexcan IP core on the imx8qm and lx2160ar1. ==================== Signed-off-by: David S. Miller commit 40fe2e0db766f2c945d58c3ff13ade9a0708ddbb Merge: 46237bf3ee834 58fa357576d8e Author: David S. Miller Date: Wed Sep 23 12:07:55 2020 -0700 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2020-09-23 please apply the following patch series for qeth to netdev's net-next tree. This brings all sorts of cleanups. Highlights are more code sharing in the init/teardown paths, and more fine-grained rollback on errors during initialization (instead of a full-blown teardown). ==================== Signed-off-by: David S. Miller commit 58fa357576d8e9f03054d226448c5eede95fad24 Author: Julian Wiedmann Date: Wed Sep 23 10:37:00 2020 +0200 s390/qeth: remove forward declarations in L2 code Shuffle some code around (primarily all the discipline-related stuff) to get rid of all the unnecessary forward declarations. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit f2bcf9dd3ecf7c9340025fc0736416e1203b5e35 Author: Julian Wiedmann Date: Wed Sep 23 10:36:59 2020 +0200 s390/qeth: consolidate teardown code Clarify which discipline-specific steps are needed to roll back after error in qeth_l?_set_online(), and which are common to roll back from qeth_hardsetup_card(). Some steps (cancelling the RX modeset, draining the TX queues) are only necessary if the netdev was potentially UP before, so move them to the common qeth_set_offline(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit b7ea041b2e506b17cb5ec6cbd283e6fbc83c8827 Author: Julian Wiedmann Date: Wed Sep 23 10:36:58 2020 +0200 s390/qeth: consolidate online code Move duplicated code from the disciplines into the core path. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 7fb7fe5c7bacb1b1189b779f7f81c785bfc964a4 Author: Julian Wiedmann Date: Wed Sep 23 10:36:57 2020 +0200 s390/qeth: cancel cmds earlier during teardown Originators of cmd IO typically hold the rtnl or conf_mutex to protect against a concurrent teardown. Since qeth_set_offline() already holds the conf_mutex, the main reason why we still care about cancelling pending cmds is so that they release the rtnl when we need it ourselves. So move this step a little earlier into the teardown sequence. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit f3380b1edc1dd06d874227570a5fe0fbf50eb607 Author: Julian Wiedmann Date: Wed Sep 23 10:36:56 2020 +0200 s390/qeth: tighten ucast IP locking The programming of ucast IPs via qeth_l3_modify_ip() is driven independently from any of our typical locking mechanisms (eg. detaching the netdevice, or holding the conf_mutex). So when we inspect the card state to check whether the required cmd IO should be deferred, there is no protection against concurrent state changes. But by slightly re-ordering the teardown sequence, we can rely on the ip_lock to sufficiently serialize things: 1. when running concurrently to qeth_l3_set_online(), any instance of qeth_l3_modify_ip() that aquires the ip_lock _after_ qeth_l3_recover_ip() will observe the state as CARD_STATE_SOFTSETUP and not defer the IO. 2. when running concurrently to qeth_l3_set_offline(), any instance of qeth_l3_modify_ip() that aquires the ip_lock _after_ qeth_l3_clear_ip_htable() will observe the state as CARD_STATE_DOWN and defer the IO. These guarantees in mind, we can now drop the conf_mutex from the qeth_l3_modify_rxip_vipa() wrapper. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit ab29c480b19465a5174ea8eddfa1bd42becf72c9 Author: Julian Wiedmann Date: Wed Sep 23 10:36:55 2020 +0200 s390/qeth: replace deprecated simple_stroul() Convert the remaining occurences in sysfs code to kstrtouint(). While at it move some input parsing out of locked sections, replace an open-coded clamp() and remove some unnecessary run-time checks for ipatoe->mask_bits that are already enforced when creating the object. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit bcdfdf00471601c4c2f8a01b32ee03630cc1c734 Author: Julian Wiedmann Date: Wed Sep 23 10:36:54 2020 +0200 s390/qeth: clean up string ops in qeth_l3_parse_ipatoe() Indicate the max number of to-be-parsed characters, and avoid copying the address sub-string. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit d6e6426f69b3225af8d992ec6bc66fb3fd4c4196 Author: Julian Wiedmann Date: Wed Sep 23 10:36:53 2020 +0200 s390/qeth: relax locking for ipato config data card->ipato is currently protected by the conf_mutex. But most users also hold the ip_lock - in particular qeth_l3_add_ip(). So slightly expand the sections under ip_lock in a few places (to effectively cover a few error & no-op cases), and then drop the conf_mutex where it's no longer needed. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 668e225126750c47635b56519b8bcc3aac35e937 Author: Julian Wiedmann Date: Wed Sep 23 10:36:52 2020 +0200 s390/qeth: don't init refcount twice for mcast IPs mcast IP objects are allocated within qeth_l3_add_mcast_rtnl(), with .ref_counter already set to 1 via qeth_l3_init_ipaddr(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit bf253e6bf6b876a4ce74db7dcf8a13b80d84aa5f Author: Marc Kleine-Budde Date: Thu Sep 17 22:24:20 2020 +0200 spi: spi-imx: spi_imx_transfer(): add support for effective_speed_hz This patch implementes the reporting of the effectivly used speed_hz for the transfer by setting tfr->effective_speed_hz. See the following patch, which adds this feature to the SPI core for more information: 5d7e2b5ed585 spi: core: allow reporting the effectivly used speed_hz for a transfer Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200917202420.1914104-1-mkl@pengutronix.de Signed-off-by: Mark Brown commit 0789e13bc3f84f0adafe1935af036956638950f9 Author: Lorenz Bauer Date: Wed Sep 23 17:01:55 2020 +0100 bpf: Explicitly size compatible_reg_types Arrays with designated initializers have an implicit length of the highest initialized value plus one. I used this to ensure that newly added entries in enum bpf_reg_type get a NULL entry in compatible_reg_types. This is difficult to understand since it requires knowledge of the peculiarities of designated initializers. Use __BPF_ARG_TYPE_MAX to size the array instead. Suggested-by: Alexei Starovoitov Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200923160156.80814-1-lmb@cloudflare.com commit 46237bf3ee834252edb73cfc48855e99b3bd744b Author: Zheng Yongjun Date: Wed Sep 23 11:21:40 2020 +0800 net: microchip: Make `lan743x_pm_suspend` function return right value drivers/net/ethernet/microchip/lan743x_main.c: In function lan743x_pm_suspend: `ret` is set but not used. In fact, `pci_prepare_to_sleep` function value should be the right value of `lan743x_pm_suspend` function, therefore, fix it. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit bbd59df075ab793c98ff7f95dc1f05895f6a6bc9 Merge: 3121420cf9b4d 7cc3b56f7324a Author: Mark Brown Date: Wed Sep 23 18:48:04 2020 +0100 Merge series "ASoC: Intel: sdw machine driver updates for 5.10" from Kai Vehmanen : Series including fixes and improvements for Intel SoundWire machine drivers. Bard Liao (1): ASoC: Intel: add support for new SoundWire hardware layout on TGL Pierre-Louis Bossart (4): ASoC: Intel: sof_sdw: remove ternary operator ASoC: Intel: add codec name prefix to ACPI machine description ASoC: Intel: sof_sdw: remove hard-coded codec_conf table ASoC: Intel: sof_sdw_rt700: add codec prefix Rander Wang (1): ASOC: Intel: sof_sdw: restore playback functionality with max98373 amps include/sound/soc-acpi.h | 2 + sound/soc/intel/boards/sof_sdw.c | 170 +++++++++--------- sound/soc/intel/boards/sof_sdw_common.h | 3 + sound/soc/intel/boards/sof_sdw_max98373.c | 36 +++- sound/soc/intel/boards/sof_sdw_rt700.c | 6 +- .../intel/common/soc-acpi-intel-cml-match.c | 10 ++ .../intel/common/soc-acpi-intel-cnl-match.c | 1 + .../intel/common/soc-acpi-intel-icl-match.c | 6 + .../intel/common/soc-acpi-intel-tgl-match.c | 67 +++++++ 9 files changed, 216 insertions(+), 85 deletions(-) -- 2.27.0 commit 3121420cf9b4db7f2bafcdc0e562f60779bf365d Author: Dan Murphy Date: Wed Sep 23 08:26:00 2020 -0500 ASoC: tas2770: Remove unused variables Remove unused variables in the private struct and the code as these variables are initially set and then there is no additional code utilizing these variables. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200923132600.10652-6-dmurphy@ti.com Signed-off-by: Mark Brown commit dd7d9052064b4bda94a89dbc1618927319602366 Author: Dan Murphy Date: Wed Sep 23 08:25:59 2020 -0500 ASoC: tas2770: Remove ti,asi-format code Remove the code to support the asi-format binding property. The code does nothing except read the property and set a variable. No additional action is taken except to reset the variable. The property is supposed to set the rising or falling RX edge detection of the SBCLK but this edge detection is done by checking the DAI_FMT_INV_MASK. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200923132600.10652-5-dmurphy@ti.com Signed-off-by: Mark Brown commit c0a30e2e07e35f219666788c8549156eb8d74105 Author: Dan Murphy Date: Wed Sep 23 08:25:57 2020 -0500 ASoC: tas2770: Set regcache when shutting down and waking device Set the regcache to cache data and mark cache as dirty when the device is shutdown when suspend is called. When the device is woken up then sync the cache and set to not caching the data. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200923132600.10652-3-dmurphy@ti.com Signed-off-by: Mark Brown commit 5d0b9dfe0de26b8c4242145cbf7de3a5a2e98293 Author: Dan Murphy Date: Wed Sep 23 08:25:56 2020 -0500 ASoC: tas2770: Add shutdown capability via a GPIO Add the hardware shutdown mechanism to shutdown and wake up the device via a GPIO. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200923132600.10652-2-dmurphy@ti.com Signed-off-by: Mark Brown commit 29d7b36ce98eb1bfba2c5c9b2ea0d58ff778a2d4 Author: Dan Murphy Date: Wed Sep 23 08:25:55 2020 -0500 dt-bindings: tas2770: Add shutdown gpio property Add the shutdown-gpios property to the yaml to define the GPIO that can be used to place the device in shutdown mode or wake the device up. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200923132600.10652-1-dmurphy@ti.com Signed-off-by: Mark Brown commit a3f18f82a2baf7b4fe434b96ad644a541e6c8c12 Author: Pierre-Louis Bossart Date: Wed Sep 23 10:29:39 2020 +0300 ASoC: Intel: hda_dsp_common: use static function in conditional block cppcheck reports the following warning: sound/soc/intel/boards/hda_dsp_common.c:17:0: style: The function 'hda_dsp_hdmi_pcm_handle' is never used. [unusedFunction] Fix by moving to static inside compilation block. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Jaska Uimonen Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200923072939.3100468-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 7cc3b56f7324ae120cf3ce57cf0366398eb02f60 Author: Rander Wang Date: Wed Sep 23 11:05:09 2020 +0300 ASOC: Intel: sof_sdw: restore playback functionality with max98373 amps The Max98373 amplifier provides I/V feedback information, which keeps a DAPM path active even when there is no playback happening. This prevents entry in low-power mode. Rather than adding new controls and require UCM/user interaction, the method previously applied is to enable/disable the Speaker pin during the dailink trigger operations. Recent changes in the SoundWire stream management moved the stream trigger to the dailink trigger. This change removed the Maxim-specific pin handling and resulted in a regression. This patch restores functionality by combining the SoundWire stream trigger with the pin enable/disable. Fixes: ae3a3918edf57 ('ASoC: Intel: sof_sdw: add dailink .trigger callback') Fixes: 06998d49bcac8 ('ASoC: Intel: sof_sdw: add dailink .prepare and .hw_free callback') Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Reviewed-by: Keyon Jie Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200923080514.3242858-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit e787f5b5b14061bf76518d780b9bc0e9e7dd2739 Author: Bard Liao Date: Wed Sep 23 11:05:14 2020 +0300 ASoC: Intel: add support for new SoundWire hardware layout on TGL The creativity of hardware folks is endless, with a complete permutation of rt711 (was link0 now link1), rt1308 (was link1 now link2) and rt715 (was link3 now link0). Someday we will get all this information from platform firmware, for now let's add the mapping table. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200923080514.3242858-7-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit fbcc27d18115f5e2bdad15a087831190c3f05d9b Author: Pierre-Louis Bossart Date: Wed Sep 23 11:05:13 2020 +0300 ASoC: Intel: sof_sdw_rt700: add codec prefix Somehow for this codec we never used any prefix for the controls, likely because the test platform has a single SoundWire device. Follow the convention and use the codec prefix across the board to avoid possible conflicts. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200923080514.3242858-6-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 23c8aa3ebabf0008c1d05c38e9723e5deb720ba0 Author: Pierre-Louis Bossart Date: Wed Sep 23 11:05:12 2020 +0300 ASoC: Intel: sof_sdw: remove hard-coded codec_conf table Now that the ACPI machine params provide all the information needed, allocate the card codec_conf dynamically and set .dlc and .prefix_name. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200923080514.3242858-5-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit f93808308aab34071259fa8cffbda273bc346ea7 Author: Pierre-Louis Bossart Date: Wed Sep 23 11:05:11 2020 +0300 ASoC: Intel: add codec name prefix to ACPI machine description The current SOF machine driver adds a name prefix for each codec, mainly to differentiate ALSA controls for left and right amplifiers. This is a good idea, but the machine driver duplicates some of the information that already exists in ACPI descriptors, so add those prefixes there. Follow-up patches will make use of the information encoded in these tables and remove duplication. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200923080514.3242858-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit f1bf9a6b4e5ed3a764c1f5715a02f438b7c2889f Author: Pierre-Louis Bossart Date: Wed Sep 23 11:05:10 2020 +0300 ASoC: Intel: sof_sdw: remove ternary operator cppcheck reports the following warning: sound/soc/intel/boards/sof_sdw.c:866:46: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] hdmi_num = sof_sdw_quirk & SOF_SDW_TGL_HDMI ? ^ There's no reason to use the ternary operator here, we might as well use a regular if-else construct. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Jaska Uimonen Reviewed-by: Kai Vehmanen Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200923080514.3242858-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 1fb1a2ad75e33e646d33e42b9ed17d879d472859 Author: Christoph Hellwig Date: Mon Sep 21 09:19:58 2020 +0200 block: mark blkdev_get static There are no users outside the core block code left now. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 36daaa98f7ad9224421b18549a3f7bdf4d220414 Author: Christoph Hellwig Date: Mon Sep 21 09:19:57 2020 +0200 PM: mm: cleanup swsusp_swap_check Use blkdev_get_by_dev instead of bdget + blkdev_get. Signed-off-by: Christoph Hellwig Acked-by: Rafael J. Wysocki Signed-off-by: Jens Axboe commit 21bd900572f3708e281ea25f051fc92462eb1193 Author: Christoph Hellwig Date: Mon Sep 21 09:19:56 2020 +0200 mm: split swap_type_of swap_type_of is used for two entirely different purposes: (1) check what swap type a given device/offset corresponds to (2) find the first available swap device that can be written to Mixing both in a single function creates an unreadable mess. Create two separate functions instead, and switch both to pass a dev_t instead of a struct block_device to further simplify the code. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit bb3247a399801ebba20bef101c89e563f5fe7f02 Author: Christoph Hellwig Date: Mon Sep 21 09:19:55 2020 +0200 PM: rewrite is_hibernate_resume_dev to not require an inode Just check the dev_t to help simplifying the code. Signed-off-by: Christoph Hellwig Acked-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Jens Axboe commit ef16e1d98c4e05338ab9c381ac0100a4ed0626ca Author: Christoph Hellwig Date: Mon Sep 21 09:19:54 2020 +0200 mm: cleanup claim_swapfile Use blkdev_get_by_dev instead of bdgrab + blkdev_get. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e455ed22906c02c7638e127dbf60634765db02cd Author: Christoph Hellwig Date: Mon Sep 21 09:19:53 2020 +0200 ocfs2: cleanup o2hb_region_dev_store Use blkdev_get_by_dev instead of igrab (aka open coded bdgrab) + blkdev_get. Signed-off-by: Christoph Hellwig Reviewed-by: Joseph Qi Signed-off-by: Jens Axboe commit 841ab72cb5be3bbf6544f28329b81c73f0f835b3 Author: Christoph Hellwig Date: Mon Sep 21 09:19:52 2020 +0200 dasd: cleanup dasd_scan_partitions Use blkdev_get_by_dev instead of bdget_disk + blkdev_get. Signed-off-by: Christoph Hellwig Reviewed-by: Stefan Haberland Signed-off-by: Jens Axboe commit 5a56ad7882a11624043db539a2c2076923148aa6 Author: Christoph Hellwig Date: Mon Sep 21 09:19:51 2020 +0200 raw: don't keep unopened block device around Turn binding into a normal dev_t as the struct block device doesn't buy us anything and use blkdev_open_by_dev to actually open it. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0fc66c9d63143f9437cd57cf5eab50a258fa40ec Author: Christoph Hellwig Date: Mon Sep 21 09:19:50 2020 +0200 zram: cleanup backing_dev_store Use blkdev_get_by_dev instead of bdgrab + blkdev_get. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit b8d954849cf4689d88ad84fd5cdb2d71d060f66a Author: Christoph Hellwig Date: Mon Sep 21 09:19:49 2020 +0200 pktcdvd: use blkdev_get_by_dev instead of open coding it Replace bdget + blkdev_get by blkdev_get_by_dev. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 2d9e28a9a10c2381a267a5184560ddc9f673f71b Author: Christoph Hellwig Date: Mon Sep 21 09:19:48 2020 +0200 pktcdvd: remove the if 0'ed pkt_start_recovery function Remove code which has been dead since the initial commit. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 478162821dfb4396c53f07ad82dc32cd0f525cea Author: Christoph Hellwig Date: Mon Sep 21 09:19:47 2020 +0200 block: cleanup blkdev_bszset Use blkdev_get_by_dev instead of bdgrab + blkdev_get. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9301fe734384990ef9a2463cb7aeb3b00bf5dad5 Author: Christoph Hellwig Date: Mon Sep 21 09:19:46 2020 +0200 block: cleanup partition scanning in register_disk Use blkdev_get_by_dev instead of open coding it using bdget_disk + blkdev_get, and split the code to read the partition table into a separate helper to make it a little more obvious. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 38430f0876fa8b9549ec434f569dce03e057c076 Author: Christoph Hellwig Date: Mon Sep 21 09:19:45 2020 +0200 block: move the NEED_PART_SCAN flag to struct gendisk We can only scan for partitions on the whole disk, so move the flag from struct block_device to struct gendisk. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 55163a1c00fcb526e2aa9f7f952fb38d3543da5e Author: Wei Huang Date: Mon Sep 14 15:07:15 2020 -0500 hwmon: (k10temp) Add support for Zen3 CPUs Zen3 thermal info is supported via a new PCI device ID. Also the voltage telemetry registers and the current factors need to be defined. k10temp driver then searches for CPU family 0x19 and configures k10temp_data accordingly. Signed-off-by: Wei Huang Link: https://lore.kernel.org/r/20200914200715.1997757-1-wei.huang2@amd.com Signed-off-by: Guenter Roeck commit 04e216d19e4044148f16ca4eb3fade2a90a0b02e Author: Guenter Roeck Date: Thu Sep 10 03:09:49 2020 -0700 hwmon: (pmbus) Move boolean error condition check to generating code 0-day rightfully complains about a sometimes uninitialized variable in pmbus_get_boolean(). drivers/hwmon/pmbus/pmbus_core.c:903:13: warning: variable 'ret' is used uninitialized whenever 'if' condition is true } else if (!s1 || !s2) { While that is technically true, it won't be hit in the field since the condition indicates a programming error. Move the check of that condition into the code generating the attribute entry, and refuse generating the attribute if the condition is true. Swap the condition check in pmbus_get_boolean() to ensure that static analyzers don't get a hiccup (because we check if s1 and s2 are NULL, static analyzers may believe that they can be NULL independently of each other). Reported-by: kernel test robot Cc: Alex Qiu Reviewed-by: Alex Qiu Signed-off-by: Guenter Roeck commit 2cd8529cfb28eb9bc392a8a36c66dd318aafd49d Author: Andrew Jeffery Date: Thu Sep 10 11:41:06 2020 +0930 hwmon: (pmbus) Expose PEC debugfs attribute Enable runtime debug control of whether the PEC byte is exchanged with the PMBus device. Some manufacturers have asked for the PEC to be disabled as part of debugging driver communication issues with devices. Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20200910021106.2958382-1-andrew@aj.id.au [groeck: Replace %1llu with %llu] Signed-off-by: Guenter Roeck commit a919ba06979a7858dab65492eb580121ccbd524f Author: Guenter Roeck Date: Fri Sep 4 09:33:14 2020 -0700 hwmon: (pmbus) Stop caching register values Caching register values can be very expensive for PMBus chips. Some modern chips may have 10 or more pages, with several sensors supported per page. For example, MAX16601 creates more than 90 sysfs attributes. Register caching for such chips is time consuming, especially if only a few attributes are read on a regular basis. For MAX16601, it was observed that it can take up to two seconds to read all attributes on a slow I2C bus. In this situation, register caching results in the opposite of its intention: It increases the number of I2C operations, in some cases substantially, and it results in large latency when trying to access individual sensor data. Drop all register caching to solve the problem. Since it is no longer necessary, drop status register mapping as part of the change, and specify status registers directly. Cc: Alex Qiu Signed-off-by: Guenter Roeck Reviewed-by: Alex Qiu Tested-by: Alex Qiu Link: https://lore.kernel.org/r/20200904163314.259087-1-linux@roeck-us.net Signed-off-by: Guenter Roeck commit 8999eabf332acf13455f33006ea8678398b8c95e Author: Guenter Roeck Date: Tue Sep 8 10:13:45 2020 -0700 hwmon: (k10temp) Take out debugfs code The debugfs code was intended to aid figuring out functionality of undocumented registers. Turns out that wasn't very helpful, since register locations change too much between AMD chip revisions, and the data isn't really valuable for chips where it isn't already supported. On top of that, its existence has been used as argument for providing pseudo-API debugfs functions in other drivers. So let's just take it out. Signed-off-by: Guenter Roeck commit 7497d4a66c596fc8312cafe1b8d1e76ad2bc34c3 Author: Tim Harvey Date: Thu Aug 27 13:04:54 2020 -0700 hwmon: (gsc-hwmon) add fan sensor Add a fan sensor to report RPM's from a fan tach input. Signed-off-by: Tim Harvey Signed-off-by: Guenter Roeck commit d6144a40041a70ecce410a07d3a2b6906f6e7da9 Author: Wei Huang Date: Thu Aug 27 00:42:42 2020 -0500 hwmon: (k10temp) Define SVI telemetry and current factors for Zen2 CPUs The voltage telemetry registers for Zen2 are different from Zen1. Also the factors of CPU current values are changed on Zen2. Add new definitions for these register. Signed-off-by: Wei Huang Link: https://lore.kernel.org/r/20200827054242.2347-2-wei.huang2@amd.com Signed-off-by: Guenter Roeck commit 1782241704239fb7215871bd670e0ae6eefe36b0 Author: Wei Huang Date: Thu Aug 27 00:42:41 2020 -0500 hwmon: (k10temp) Create common functions and macros for Zen CPU families Many SMN thermal registers in Zen CPU families are common across different generations. For long-term code maintenance, it is better to rename these macro and function names to Zen. Signed-off-by: Wei Huang Link: https://lore.kernel.org/r/20200827054242.2347-1-wei.huang2@amd.com Signed-off-by: Guenter Roeck commit 0ef0f755b36e369d2195150fc7bf5634d4e55a2f Author: Joe Perches Date: Mon Aug 24 21:56:08 2020 -0700 hwmon: (scmi-hwmon) Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/5e1ca60df261e3bfd0e6510e388581a1d1f52c77.1598331149.git.joe@perches.com Signed-off-by: Guenter Roeck commit 0c92ddcc7e76fce82b1d348e1dd6f0347ae7aebd Author: Alexandru Tachici Date: Wed Aug 12 17:20:55 2020 +0300 dt-bindings: hwmon: Add bindings for ADM1266 Add bindings for the Analog Devices ADM1266 sequencer. Signed-off-by: Alexandru Tachici Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200812142055.9213-7-alexandru.tachici@analog.com Signed-off-by: Guenter Roeck commit 15609d1893020436e1e8ccfd9ded774a96dd17a2 Author: Alexandru Tachici Date: Wed Aug 12 17:20:54 2020 +0300 hwmon: (pmbus/adm1266) read blackbox Use the nvmem kernel api to expose the black box chip functionality to userspace. Using this feature, the device is capable of recording to nonvolatile flash memory the vital data about the system status that caused the system to perform a black box write. A blackbox is 64 bytes of data containing all the status registers, last two states of the sequencer, timestamp and counters. The mapping of this data is described in the adm1266 datasheet. On power-up the driver sets the unix time to the adm1266 using the SET_RTC command. This value is incremented by an internal clock and it is used as timestamp for the black box feature. Signed-off-by: Alexandru Tachici Link: https://lore.kernel.org/r/20200812142055.9213-6-alexandru.tachici@analog.com Signed-off-by: Guenter Roeck commit ed1ff457e1870425ea8d3c8643d9aeb7fa54300f Author: Alexandru Tachici Date: Wed Aug 12 17:20:53 2020 +0300 hwmon: (pmbus/adm1266) add debugfs for states Add a debugfs entry which prints the current state of the adm1266 sequencer. Signed-off-by: Alexandru Tachici Link: https://lore.kernel.org/r/20200812142055.9213-5-alexandru.tachici@analog.com Signed-off-by: Guenter Roeck commit d98dfad35c38c037b37c4adc99df01da571031a5 Author: Alexandru Tachici Date: Wed Aug 12 17:20:52 2020 +0300 hwmon: (pmbus/adm1266) Add support for GPIOs Adm1266 exposes 9 GPIOs and 16 PDIOs which are currently read-only. They are controlled by the internal sequencing engine. This patch makes adm1266 driver expose GPIOs and PDIOs to user-space using GPIO provider kernel api. Signed-off-by: Alexandru Tachici Link: https://lore.kernel.org/r/20200812142055.9213-4-alexandru.tachici@analog.com Signed-off-by: Guenter Roeck commit 407dc802a9c0809ca6a48de4b4c63305eb84ef56 Author: Alexandru Tachici Date: Wed Aug 12 17:20:51 2020 +0300 hwmon: (pmbus/adm1266) Add Block process call PmBus devices support Block Write-Block Read Process Call described in SMBus specification v 2.0 with the exception that Block writes and reads are permitted to have up 255 data bytes instead of max 32 bytes (SMBus). This patch adds Block WR process call support for ADM1266. Signed-off-by: Alexandru Tachici Link: https://lore.kernel.org/r/20200812142055.9213-3-alexandru.tachici@analog.com Signed-off-by: Guenter Roeck commit 9514a22866ba1300c7e3f6aab2e558bb30679743 Author: Alexandru Tachici Date: Wed Aug 12 17:20:50 2020 +0300 hwmon: (pmbus) Add support for ADM1266 Add pmbus probing driver for the adm1266 Cascadable Super Sequencer with Margin Control and Fault Recording. Driver is using the pmbus_core, creating sysfs files under hwmon for inputs: vh1->vh4 and vp1->vp13. Signed-off-by: Alexandru Tachici Link: https://lore.kernel.org/r/20200812142055.9213-2-alexandru.tachici@analog.com [groeck: Use .probe_new function, adjust for changed pmbus_do_probe API] Signed-off-by: Guenter Roeck commit d2e08eba09a5e1a46e09f93ce46f06414ab90e8a Author: Chris Ruehl Date: Sat Aug 15 09:22:27 2020 +0800 devicetree: hwmon: shtc1: add sensirion,shtc1.yaml Add documentation for the newly added DTS support in the shtc1 driver. To align with the drivers logic to have high precision by default a boolean sensirion,low-precision is used to switch to low precision. Signed-off-by: Chris Ruehl Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200815012227.32538-3-chris.ruehl@gtsys.com.hk Signed-off-by: Guenter Roeck commit be7373b60df5020c00dfac4db185a6b4e9f98395 Author: Chris Ruehl Date: Sat Aug 15 09:22:26 2020 +0800 hwmon: shtc1: add support for device tree bindings Add support for DTS bindings for the sensirion shtc1,shtw1 and shtc3. Signed-off-by: Chris Ruehl Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200815012227.32538-2-chris.ruehl@gtsys.com.hk [groeck: Resolved conflicts] Signed-off-by: Guenter Roeck commit 65b2aad0699b3915cc3a5afee0a382eda0fc93b5 Author: Anson Huang Date: Mon Aug 17 15:34:33 2020 +0800 hwmon: (pwm-fan) Use dev_err_probe() to simplify error handling dev_err_probe() can reduce code size, uniform error handling and record the defer probe reason etc., use it to simplify the code. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1597649673-22329-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Guenter Roeck commit 4e1b4d22279188e63546838144399a6dde44a5aa Author: Stephen Kitt Date: Fri Aug 21 18:00:35 2020 +0200 hwmon: (dme1737) use simple i2c probe As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200821160035.590142-1-steve@sk2.org Signed-off-by: Guenter Roeck commit f7bd7b5452978fb41879ca6a98af8c5643ad61e8 Author: Stephen Kitt Date: Fri Aug 21 18:01:59 2020 +0200 hwmon: (f75375s) use simple i2c probe As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200821160159.591293-1-steve@sk2.org Signed-off-by: Guenter Roeck commit e3b9f691252840f8cee89179a2307872eff751f1 Author: Stephen Kitt Date: Fri Aug 21 18:02:31 2020 +0200 hwmon: (tmp513) use simple i2c probe As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200821160231.592571-1-steve@sk2.org Signed-off-by: Guenter Roeck commit 673afe466166cda94053d2d2400e669fe19f8050 Author: Stephen Kitt Date: Fri Aug 21 18:03:54 2020 +0200 hwmon: use simple i2c probe function (take 2) Many hwmon drivers don't use the id information provided by the old i2c probe function, and the remainder can easily be adapted to the new form ("probe_new") by calling i2c_match_id explicitly. This avoids scanning the identifier tables during probes. Drivers which didn't use the id are converted as-is; drivers which did are modified to call i2c_match_id() with the same level of error-handling (if any) as before. This patch wraps up the transition for hwmon, with four stragglers not included in the previous large patch. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200821160354.594715-1-steve@sk2.org Signed-off-by: Guenter Roeck commit c1e60c0d571b6c0264ae18f5e2cfdb34569da762 Author: Stephen Kitt Date: Thu Aug 13 18:28:51 2020 +0200 hwmon: (ltc2947) use simple i2c probe This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200813162851.1519546-1-steve@sk2.org Signed-off-by: Guenter Roeck commit 9bf5dd8b26282778412e60c79b8db60687e3dfc4 Author: Stephen Kitt Date: Thu Aug 13 18:27:04 2020 +0200 hwmon: (emc2103) use simple i2c probe This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200813162704.1517951-1-steve@sk2.org Signed-off-by: Guenter Roeck commit 7dedb79d295b4b61144be72dfa4f48b0d3bf80f0 Author: Stephen Kitt Date: Thu Aug 13 18:25:44 2020 +0200 hwmon: (asc7621) use simple i2c probe This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200813162544.1516647-1-steve@sk2.org Signed-off-by: Guenter Roeck commit 91ed7c40f339511a33c42fcf4e7f9a358293d9b5 Author: Stephen Kitt Date: Thu Aug 13 18:23:00 2020 +0200 hwmon: (lm73) use simple i2c probe This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200813162300.1514695-1-steve@sk2.org Signed-off-by: Guenter Roeck commit 77b5b8a8021fa0258ed70d38b396654ae1dce7a4 Author: Stephen Kitt Date: Thu Aug 13 18:20:26 2020 +0200 hwmon: (w83791d) use simple i2c probe This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200813162026.1512242-1-steve@sk2.org Signed-off-by: Guenter Roeck commit 16b237f5e50624a99387245a821021194576c9d7 Author: Stephen Kitt Date: Thu Aug 13 18:18:45 2020 +0200 hwmon: (w83793) use simple i2c probe This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200813161845.1511261-1-steve@sk2.org Signed-off-by: Guenter Roeck commit 7d6ed4ba4fdc0f3029e32e4fd46d83bcc0255c30 Author: Stephen Kitt Date: Thu Aug 13 18:11:29 2020 +0200 hwmon: (adm1029) use simple i2c probe This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: Stephen Kitt Acked-by: Corentin LABBE Tested-by: Corentin Labbe Link: https://lore.kernel.org/r/20200813161129.1507599-1-steve@sk2.org Signed-off-by: Guenter Roeck commit a391adfae11f3cfb08115dc0ff3ca63fb883d70e Author: Stephen Kitt Date: Thu Aug 13 18:09:58 2020 +0200 hwmon: (adm1177) use simple i2c probe This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200813160958.1506536-1-steve@sk2.org Signed-off-by: Guenter Roeck commit 6748703856d461f8cd62b72ebca51040e06cb310 Author: Stephen Kitt Date: Thu Aug 13 18:02:22 2020 +0200 hwmon: use simple i2c probe function Many hwmon drivers don't use the id information provided by the old i2c probe function, and the remainder can easily be adapted to the new form ("probe_new") by calling i2c_match_id explicitly. This avoids scanning the identifier tables during probes. Drivers which didn't use the id are converted as-is; drivers which did are modified as follows: * if the information in i2c_client is sufficient, that's used instead (client->name); * anything else is handled by calling i2c_match_id() with the same level of error-handling (if any) as before. A few drivers aren't included in this patch because they have a different set of maintainers. They will be covered by other patches. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200813160222.1503401-1-steve@sk2.org Signed-off-by: Guenter Roeck commit dd43193976b9a7b2affe8fb71780bb96d16a8449 Author: Stephen Kitt Date: Sat Aug 8 23:00:04 2020 +0200 hwmon (pmbus) use simple i2c probe function pmbus_do_probe doesn't use the id information provided in its second argument, so this can be removed, which then allows using the single-parameter i2c probe function ("probe_new") for probes. This avoids scanning the identifier tables during probes. Drivers which didn't use the id are converted as-is; drivers which did are modified as follows: * if the information in i2c_client is sufficient, that's used instead (client->name); * configured v. probed comparisons are performed by comparing the configured name to the detected name, instead of the ids; this involves strcmp but is still cheaper than comparing all the device names when scanning the tables; * anything else is handled by calling i2c_match_id() with the same level of error-handling (if any) as before. Additionally, the mismatch message in the ltc2978 driver is adjusted so that it no longer assumes that the driver_data is an index into ltc2978_id. Signed-off-by: Stephen Kitt Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/20200808210004.30880-1-steve@sk2.org Signed-off-by: Guenter Roeck commit e40358390928f9ab9d8d7dde5c60c08981dc1d81 Author: Guenter Roeck Date: Sat Aug 8 18:07:10 2020 -0700 hwmon: (drivetemp) Add usage not describing impact on drive spin-down On some drives, reading the drive temperature resets the drive's spin-down timer. If the drive temperature is read too often, affected drives will never spin down. Add this information as usage note to the driver documentation. Reported-by: Peter Sulyok Cc: Peter Sulyok Signed-off-by: Guenter Roeck commit 787c095edaa9de28d39671282eba7bddd479c038 Author: Zbigniew Lukwinski Date: Fri Jul 31 21:37:17 2020 +0200 hwmon: (pmbus/core) Add support for rated attributes Adding implementation for new attributes (rated_min/rated_max) to cover PMBus specification about rated values reporting: MFR_VIN_MIN, MFR_VIN_MAX, MFR_IIN_MAX, MFR_PIN_MAX, MFR_VOUT_MIN, MFR_VOUT_MAX, MFR_IOUT_MAX, MFR_POUT_MAX, MFR_MAX_TEMP_1/2/3. Tested with OpenBMC stack. All rated attributes were available and reported correct values. Signed-off-by: Zbigniew Lukwinski Link: https://lore.kernel.org/r/1596224237-32280-4-git-send-email-zbigniew.lukwinski@linux.intel.com Signed-off-by: Guenter Roeck commit 1967f712677429f52ac3e8896b5ecfecc2372d95 Author: Zbigniew Lukwinski Date: Fri Jul 31 21:37:16 2020 +0200 hwmon: (core) Add support for rated attributes Adding implementation for new attributes (rated_min/rated_max) for currentX, inX, powerX, tempX and humidityX. Tested with OpenBMC stack and simple hwmon driver using rated_min/rated_max for the following types of sensors: hwmon_temp, hwmon_in, hwmon_curr, hwmon_power, hwmon_humidity. For each sensor rated attributes were available and returned expected values. Signed-off-by: Zbigniew Lukwinski Link: https://lore.kernel.org/r/1596224237-32280-3-git-send-email-zbigniew.lukwinski@linux.intel.com Signed-off-by: Guenter Roeck commit e8e612350f178674ba738ae8ae8fd31467868a05 Author: Zbigniew Lukwinski Date: Fri Jul 31 21:37:15 2020 +0200 docs: hwmon: Add attributes to report rated values New attributes (rated_min/rated_max) are being added the hwmon ABI. They are needed to cover rated values documented by PMBus specification: PMBus Power System Mgt Protocol Specification - Part II – Revision 1.3.1, chapters: 22.3.1 - 22.3.10, 22.3.15 Signed-off-by: Zbigniew Lukwinski Link: https://lore.kernel.org/r/1596224237-32280-2-git-send-email-zbigniew.lukwinski@linux.intel.com Signed-off-by: Guenter Roeck commit 18360b33a071e5883250fd1e04bfdeff8c3887a3 Author: Dan Carpenter Date: Mon Sep 21 15:52:12 2020 +0300 hwmon: (w83627ehf) Fix a resource leak in probe Smatch has a new check for resource leaks which found a bug in probe: drivers/hwmon/w83627ehf.c:2417 w83627ehf_probe() warn: 'res->start' not released on lines: 2412. We need to clean up if devm_hwmon_device_register_with_info() fails. Fixes: 266cd5835947 ("hwmon: (w83627ehf) convert to with_info interface") Signed-off-by: Dan Carpenter Reviewed-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20200921125212.GA1128194@mwanda Signed-off-by: Guenter Roeck commit 6c094b31ea2ad773824362ba0fccb88d36f8d32d Author: Guenter Roeck Date: Thu Sep 17 14:39:29 2020 -0700 hwmon: (pmbus/max34440) Fix status register reads for MAX344{51,60,61} Starting with MAX34451, the chips of this series support STATUS_IOUT and STATUS_TEMPERATURE commands, and no longer report over-current and over-temperature status with STATUS_MFR_SPECIFIC. Fixes: 7a001dbab4ade ("hwmon: (pmbus/max34440) Add support for MAX34451.") Fixes: 50115ac9b6f35 ("hwmon: (pmbus/max34440) Add support for MAX34460 and MAX34461") Reported-by: Steve Foreman Cc: Steve Foreman Signed-off-by: Guenter Roeck commit fcb575bfac80d6deb4940d2ebf506d6701761f38 Author: Lars Povlsen Date: Thu Sep 3 15:47:04 2020 +0200 hwmon: (sparx5) Fix initial reading of temperature If the temperature is read before the internal calibration is completed, the driver returns -EIO. Instead it should return -EAGAIN to encourage repeating the operation. Note (groeck): Returning -EAGAIN to userspace may result in hard loops; some userspace code interprets -EAGAIN as request to retry immediately. I would prefer -ENODATA, but it turns out that the thermal subsystem only handles -EAGAIN silently, so we'll have to stick with that. Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20200903134704.8949-1-lars.povlsen@microchip.com Signed-off-by: Guenter Roeck commit 07d098e6bbad04030dab5b3e64149601fcb063ce Author: Mike Snitzer Date: Mon Sep 21 22:32:49 2020 -0400 block: allow 'chunk_sectors' to be non-power-of-2 It is possible, albeit more unlikely, for a block device to have a non power-of-2 for chunk_sectors (e.g. 10+2 RAID6 with 128K chunk_sectors, which results in a full-stripe size of 1280K. This causes the RAID6's io_opt to be advertised as 1280K, and a stacked device _could_ then be made to use a blocksize, aka chunk_sectors, that matches non power-of-2 io_opt of underlying RAID6 -- resulting in stacked device's chunk_sectors being a non power-of-2). Update blk_queue_chunk_sectors() and blk_max_size_offset() to accommodate drivers that need a non power-of-2 chunk_sectors. Reviewed-by: Ming Lei Reviewed-by: Martin K. Petersen Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe commit 22ada802ede89829dd010a317d9b812b7df7111a Author: Mike Snitzer Date: Mon Sep 21 22:32:48 2020 -0400 block: use lcm_not_zero() when stacking chunk_sectors Like 'io_opt', blk_stack_limits() should stack 'chunk_sectors' using lcm_not_zero() rather than min_not_zero() -- otherwise the final 'chunk_sectors' could result in sub-optimal alignment of IO to component devices in the IO stack. Also, if 'chunk_sectors' isn't a multiple of 'physical_block_size' then it is a bug in the driver and the device should be flagged as 'misaligned'. Reviewed-by: Ming Lei Reviewed-by: Martin K. Petersen Signed-off-by: Mike Snitzer Signed-off-by: Jens Axboe commit 71593c519f162b5f54bafed085cdddc7a883894d Author: Alexandre Torgue Date: Thu Sep 17 05:00:35 2020 +0200 ARM: dts: stm32: add arm-pmu node on stm32mp15 Add arm-pmu node on stm32mp15. Signed-off-by: Alexandre Torgue Signed-off-by: Marek Vasut # update to linux-next Tested-by: Marek Vasut # on DH PDK2 and Avenger96 Signed-off-by: Alexandre Torgue commit fdcf9ea31c33fe9c54dc0b99ca4f744813ba6840 Author: Christophe Kerello Date: Fri Sep 4 15:20:43 2020 +0200 ARM: dts: stm32: add FMC2 EBI support for stm32mp157c This patch adds FMC2 External Bus Interface support on stm32mp157c. Signed-off-by: Christophe Kerello Signed-off-by: Alexandre Torgue commit bae2b7f6774b2db44f9001bee7465d4dadd1ede8 Author: Ahmad Fatoum Date: Fri Aug 28 15:00:02 2020 +0200 ARM: dts: stm32: lxa-mc1: enable DDR50 mode on eMMC The "eMMC high-speed DDR mode (3.3V I/O)" at 50MHz is supported on the eMMC-interface of the lxa-mc1. Set it in the device tree to benefit from the speed improvement. Signed-off-by: Ahmad Fatoum Signed-off-by: Holger Assmann Signed-off-by: Alexandre Torgue commit 57592d2a98dbc3bde3ddc062e91a8486bdcb211e Author: Marek Vasut Date: Sat Aug 22 22:32:55 2020 +0200 ARM: dts: stm32: Fix DH PDK2 display PWM channel The display PWM channel is number 3 (PWM2 CH4), make it so. Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 3c5c0eee95ece9a73969a94832093be8892cd4c1 Author: Marek Vasut Date: Sat Aug 22 22:34:25 2020 +0200 ARM: dts: stm32: Enable RTS/CTS for DH AV96 UART7 The DH AV96 has RTS/CTS lines available on UART7, describe them in DT. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 9ad98319e95263469d8ca2cb543c37c5a2f40980 Author: Marek Vasut Date: Fri Aug 28 14:14:12 2020 +0200 ARM: dts: stm32: Swap PHY reset GPIO and TSC2004 IRQ on DHCOM SOM On the production revision of the SoM, 587-200, the PHY reset GPIO and touchscreen IRQs are swapped to prevent collision between EXTi IRQs, reflect that in DT. Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 862f5c7ebc88e72990dd70c4d687b571ce999473 Author: Tobias Schramm Date: Fri Aug 14 20:11:25 2020 +0200 ARM: dts: stm32: use stm32h7 usart compatible string for stm32h743 Previously the FIFO on the stm32h743 usart was not utilized, because the stm32f7 compatible configures it without FIFO support. Signed-off-by: Tobias Schramm Signed-off-by: Alexandre Torgue commit 33aa48808619393d70f103da85db03847f29b90f Author: Tobias Schramm Date: Sat Aug 15 00:35:43 2020 +0200 ARM: dts: stm32: add resets property to spi device nodes on stm32h743 The stm32 spi driver tries to determine the fifo size of spi devices dynamically. However, if the spi was already configured by the bootloader the fifo size check can become an endless loop, because the driver expects the spi to be in its initial "after device reset" state. The driver does already support resetting the spi device at probe, thus this patch adds only the required device tree properties Signed-off-by: Tobias Schramm Signed-off-by: Alexandre Torgue commit 9fc37291831fd85e579cacccb3d887c4f240f2e8 Author: Tobias Schramm Date: Sat Aug 15 00:50:07 2020 +0200 ARM: dts: stm32: add display controller node to stm32h743 Declare LTDC (display controller) on stm32h743. Signed-off-by: Tobias Schramm Signed-off-by: Alexandre Torgue commit d0ce6f1be3d38de41369692449766dad86d21644 Author: Marek Vasut Date: Wed Aug 5 14:36:29 2020 +0200 ARM: dts: stm32: Enable RTS/CTS for DH PDK2 UART8 The DH PDK2 has RTS/CTS lines available on UART8, describe them in DT. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 30e9af4ba3e11cd80f1b5063085f2b37aeecaf62 Author: Marek Vasut Date: Wed Aug 5 14:36:28 2020 +0200 ARM: dts: stm32: Drop QSPI CS2 pinmux on DHCOM The QSPI CS2 is not used on DHCOM, remove the pinmux settings. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 9e8f500af7c59d3057fb784d6c0c5b5cd1f9430f Author: Marek Vasut Date: Wed Aug 5 14:36:27 2020 +0200 ARM: dts: stm32: Add STM32MP1 UART8 RTS/CTS pinmux Add extra RTS/CTS line pinmux for STM32MP1 UART8. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Acked-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit be78ab4f632c9f24a58b5bb91c5fb9286ae978c3 Author: Marcin Sloniewski Date: Sun Aug 9 18:44:50 2020 +0200 ARM: dts: stm32: add initial support for stm32mp157-odyssey board Add support for Seeed Studio's stm32mp157c odyssey board. Board consists of SoM with stm32mp157c with 4GB eMMC and 512 MB DDR3 RAM and carrier board with USB and ETH interfaces, SD card connector, wifi and BT chip AP6236. In this patch only basic kernel boot is supported and interfacing SD card and on-board eMMC. Signed-off-by: Marcin Sloniewski Reviewed-by: Ahmad Fatoum Signed-off-by: Alexandre Torgue commit 0e2807579a344dff804b4e111c8ccddb0e2e1feb Author: Marcin Sloniewski Date: Sun Aug 9 18:44:49 2020 +0200 dt-bindings: arm: stm32: document Odyssey compatible Document device tree bindings of Seeed SoM and carrier board. Signed-off-by: Marcin Sloniewski Reviewed-by: Rob Herring Signed-off-by: Alexandre Torgue commit f3a622297b045e03d07a2e1a6661134505fa8a8d Author: Marcin Sloniewski Date: Sun Aug 9 18:44:48 2020 +0200 dt-bindings: vendor-prefixes: add Seeed Studio Add the "seeed" vendor prefix for Seeed Technology Co., Ltd Website: https://www.seeedstudio.com/ Signed-off-by: Marcin Sloniewski Acked-by: Rob Herring Signed-off-by: Alexandre Torgue commit 42a31ac6698681363363d48335559d212a26a7ca Author: Holger Assmann Date: Fri Aug 7 17:03:56 2020 +0200 ARM: dts: stm32: lxa-mc1: Fix kernel warning about PHY delays The KSZ9031 PHY skew timings for rxc/txc, originally set to achieve the desired phase shift between clock- and data-signal, now trigger a kernel warning when used in rgmii-id mode: *-skew-ps values should be used only with phy-mode = "rgmii" This is because commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") now configures own timings when phy-mode = "rgmii-id". Device trees wanting to set their own delays should use phy-mode "rgmii" instead as the warning prescribes. The "standard" timings now used with "rgmii-id" work fine on this board, so drop the explicit timings in the device tree and thereby silence the warning. Fixes: 666b5ca85cd3 ("ARM: dts: stm32: add STM32MP1-based Linux Automation MC-1 board") Signed-off-by: Holger Assmann Acked-by: Ahmad Fatoum Signed-off-by: Alexandre Torgue commit 4e0ec51f8b9ec3802330a431357e955f552a3f99 Author: Marek Vasut Date: Mon Aug 3 12:22:54 2020 +0200 ARM: dts: stm32: Add USB OTG support to DH PDK2 The DH PDK2 board is capable of USB OTG on the X14 USB Mini-AB connector, fill in the missing bits to make USB OTG possible instead of peripheral. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 1ad6e36ec266cedb0d274aa13253ff1fb2eed4ba Author: Marek Vasut Date: Fri Jul 31 01:27:57 2020 +0200 ARM: dts: stm32: Fix sdmmc2 pins on AV96 The AV96 uses sdmmc2_d47_pins_c and sdmmc2_d47_sleep_pins_c, which differ from sdmmc2_d47_pins_b and sdmmc2_d47_sleep_pins_b in one pin, SDMMC2_D5, which is PA15 in the former and PA9 in the later. The PA15 is correct on AV96, so fix this. This error is likely a result of rebasing across the stm32mp1 DT pinctrl rework. Fixes: 611325f68102 ("ARM: dts: stm32: Add eMMC attached to SDMMC2 on AV96") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit fde180f06d7bc71c457879615cfc070a66a76ce0 Author: Marek Vasut Date: Wed Jul 29 18:51:41 2020 +0200 ARM: dts: stm32: Add DHSOM based DRC02 board Add DT for DH DRC02 unit, which is a universal controller device. The system has two ethernet ports, two CANs, RS485 and RS232, USB, capacitive buttons and an OLED display. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit b0a07f609600b6fa4c30f783db50c38456804485 Author: Marek Vasut Date: Wed Jul 29 18:51:40 2020 +0200 ARM: dts: stm32: Move ethernet PHY into DH SoM DT The PHY and the VIO regulator is populated on the SoM, move it into the SoM DT. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 0c771b99d6c9a0552fea5cc43669b726dad8f659 Author: Gao Xiang Date: Tue Sep 22 09:41:06 2020 -0700 xfs: clean up calculation of LR header blocks Let's use DIV_ROUND_UP() to calculate log record header blocks as what did in xlog_get_iclog_buffer_size() and wrap up a common helper for log recovery. Reviewed-by: Brian Foster Signed-off-by: Gao Xiang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 997a91fd4448e2600e460af31e5fb934328374a9 Author: Gabriel Krisman Bertazi Date: Sat Sep 5 01:31:39 2020 -0400 selftests: Add missing gitignore entries Prevent them from polluting git status after building selftests. Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Shuah Khan commit 69f48c7040d3a02a7a77ac6ac77e174958786c7c Author: Hagen Paul Pfeifer Date: Tue Sep 22 22:09:22 2020 +0200 perf script: Add min, max to futex-contention output, in addition to avg Average is quite informative, but the outliners - especially max - are also of interest. Before: mutex-locker[793299] lock 5637ec61e080 contended 3400 times, 446 avg ns mutex-locker[793301] lock 5637ec61e080 contended 3563 times, 385 avg ns mutex-locker[793300] lock 5637ec61e080 contended 3110 times, 1855 avg ns After: mutex-locker[795251] lock 55b14e6dd080 contended 3853 times, 1279 avg ns [max: 12270 ns, min 340 ns] mutex-locker[795253] lock 55b14e6dd080 contended 2911 times, 518 avg ns [max: 51660261 ns, min 347 ns] mutex-locker[795252] lock 55b14e6dd080 contended 3843 times, 385 avg ns [max: 24323998 ns, min 338 ns] Committer testing: [root@five ~]# perf script record futex-contention -a ^C[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.877 MB perf.data (923 samples) ] [root@five ~]# perf evlist syscalls:sys_enter_futex syscalls:sys_exit_futex dummy:HG # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events # Before: [root@five ~]# perf script report futex-contention JS Helper[2457] lock 55fe0cf82610 contended 4 times, 6657 avg ns ibus-daemon[2975] lock 56227f6d0210 contended 4 times, 1020 avg ns chromium-browse[1905801] lock 7ffe573f5088 contended 8 times, 108463 avg ns gnome-shell[2240] lock 55fe0cf82678 contended 1 times, 8616 avg ns gnome-shel:cs0[2292] lock 55fe0d0ab768 contended 3 times, 606016034 avg ns JS Helper[2458] lock 55fe0cf82690 contended 1 times, 1167840 avg ns chromium-browse[1905470] lock 7ffe573f5358 contended 1 times, 551504 avg ns chromium-browse[1905948] lock 7ffe573f5358 contended 1 times, 577422 avg ns gnome-shell[2240] lock 55fe0cf82660 contended 6 times, 202696 avg ns pool[2602] lock 7fd600008ef0 contended 1 times, 500046007 avg ns chromium-browse[1905801] lock 7ffe573f5128 contended 4 times, 285083 avg ns JS Helper[2460] lock 55fe0cf82690 contended 1 times, 680877 avg ns JS Helper[2459] lock 55fe0cf82610 contended 7 times, 4224 avg ns chromium-browse[1905434] lock 7ffe573f5358 contended 1 times, 697038 avg ns chromium-browse[212592] lock 7ffe573f53c8 contended 4 times, 460601 avg ns gnome-shel:cs0[2292] lock 55fe0d0ab76c contended 2 times, 601237648 avg ns JS Helper[2460] lock 55fe0cf82610 contended 4 times, 3340 avg ns JS Helper[2462] lock 55fe0cf82694 contended 1 times, 237275 avg ns chromium-browse[1905605] lock 7ffe573f5358 contended 2 times, 634555 avg ns chromium-browse[1905992] lock 7ffe573f5358 contended 1 times, 583965 avg ns chromium-browse[1905647] lock 7ffe573f5368 contended 8 times, 549800 avg ns JS Helper[2462] lock 55fe0cf82610 contended 2 times, 4694 avg ns JS Helper[2461] lock 55fe0cf82694 contended 1 times, 257793 avg ns JS Helper[2456] lock 55fe0cf82690 contended 1 times, 677771 avg ns JS Helper[2463] lock 55fe0cf82610 contended 3 times, 5139 avg ns gdbus[2980] lock 56227f6d0210 contended 2 times, 2465 avg ns gnome-shell[2240] lock 55fe0cf82664 contended 5 times, 8036 avg ns chromium-browse[1906308] lock 7ffe573f5358 contended 1 times, 210735 avg ns JS Helper[2463] lock 55fe0cf82694 contended 1 times, 251531 avg ns chromium-browse[1905801] lock 7ffe573f4f58 contended 4 times, 399927 avg ns [root@five ~]# After: [root@five ~]# perf script report futex-contention JS Helper[2457] lock 55fe0cf82610 contended 4 times, 6657 avg ns [max: 11502 ns, min 792 ns] ibus-daemon[2975] lock 56227f6d0210 contended 4 times, 1020 avg ns [max: 1813 ns, min 581 ns] chromium-browse[1905801] lock 7ffe573f5088 contended 8 times, 108463 avg ns [max: 380103 ns, min 57989 ns] gnome-shell[2240] lock 55fe0cf82678 contended 1 times, 8616 avg ns [max: 8616 ns, min 8616 ns] gnome-shel:cs0[2292] lock 55fe0d0ab768 contended 3 times, 606016034 avg ns [max: 611295960 ns, min 600191357 ns] JS Helper[2458] lock 55fe0cf82690 contended 1 times, 1167840 avg ns [max: 1167840 ns, min 1167840 ns] chromium-browse[1905470] lock 7ffe573f5358 contended 1 times, 551504 avg ns [max: 551504 ns, min 551504 ns] chromium-browse[1905948] lock 7ffe573f5358 contended 1 times, 577422 avg ns [max: 577422 ns, min 577422 ns] gnome-shell[2240] lock 55fe0cf82660 contended 6 times, 202696 avg ns [max: 398998 ns, min 5050 ns] pool[2602] lock 7fd600008ef0 contended 1 times, 500046007 avg ns [max: 500046007 ns, min 500046007 ns] chromium-browse[1905801] lock 7ffe573f5128 contended 4 times, 285083 avg ns [max: 389531 ns, min 76183 ns] JS Helper[2460] lock 55fe0cf82690 contended 1 times, 680877 avg ns [max: 680877 ns, min 680877 ns] JS Helper[2459] lock 55fe0cf82610 contended 7 times, 4224 avg ns [max: 12724 ns, min 1012 ns] chromium-browse[1905434] lock 7ffe573f5358 contended 1 times, 697038 avg ns [max: 697038 ns, min 697038 ns] chromium-browse[212592] lock 7ffe573f53c8 contended 4 times, 460601 avg ns [max: 594956 ns, min 232996 ns] gnome-shel:cs0[2292] lock 55fe0d0ab76c contended 2 times, 601237648 avg ns [max: 601255863 ns, min 601219434 ns] JS Helper[2460] lock 55fe0cf82610 contended 4 times, 3340 avg ns [max: 9168 ns, min 962 ns] JS Helper[2462] lock 55fe0cf82694 contended 1 times, 237275 avg ns [max: 237275 ns, min 237275 ns] chromium-browse[1905605] lock 7ffe573f5358 contended 2 times, 634555 avg ns [max: 1024060 ns, min 245050 ns] chromium-browse[1905992] lock 7ffe573f5358 contended 1 times, 583965 avg ns [max: 583965 ns, min 583965 ns] chromium-browse[1905647] lock 7ffe573f5368 contended 8 times, 549800 avg ns [max: 775293 ns, min 258375 ns] JS Helper[2462] lock 55fe0cf82610 contended 2 times, 4694 avg ns [max: 8556 ns, min 832 ns] JS Helper[2461] lock 55fe0cf82694 contended 1 times, 257793 avg ns [max: 257793 ns, min 257793 ns] JS Helper[2456] lock 55fe0cf82690 contended 1 times, 677771 avg ns [max: 677771 ns, min 677771 ns] JS Helper[2463] lock 55fe0cf82610 contended 3 times, 5139 avg ns [max: 6873 ns, min 931 ns] gdbus[2980] lock 56227f6d0210 contended 2 times, 2465 avg ns [max: 4188 ns, min 742 ns] gnome-shell[2240] lock 55fe0cf82664 contended 5 times, 8036 avg ns [max: 13105 ns, min 401 ns] chromium-browse[1906308] lock 7ffe573f5358 contended 1 times, 210735 avg ns [max: 210735 ns, min 210735 ns] JS Helper[2463] lock 55fe0cf82694 contended 1 times, 251531 avg ns [max: 251531 ns, min 251531 ns] chromium-browse[1905801] lock 7ffe573f4f58 contended 4 times, 399927 avg ns [max: 476904 ns, min 178495 ns] [root@five ~]# Signed-off-by: Hagen Paul Pfeifer Tested-by: Arnaldo Carvalho de Melo Link: http://lore.kernel.org/lkml/20200922200922.1306034-1-hagen@jauu.net Signed-off-by: Arnaldo Carvalho de Melo commit 2a684fcb605ae1febef381b85bc2b5f3edf47cc5 Author: Hagen Paul Pfeifer Date: Mon Sep 21 22:19:27 2020 +0200 perf script: Autopep8 futex-contention 10 years leaves its mark! Python has evolved and so has its style guide. Even with vim it is getting hard to follow the no longer valid guidelines (spaces vs. tabs). Autopep8 this code to modernize it! Signed-off-by: Hagen Paul Pfeifer Link: http://lore.kernel.org/lkml/20200921201928.799498-1-hagen@jauu.net Signed-off-by: Arnaldo Carvalho de Melo commit 002a3d690f95804bdef6b70b26154103518e13d9 Author: Jin Yao Date: Tue Sep 22 09:50:04 2020 +0800 perf stat: Skip duration_time in setup_system_wide Some metrics (such as DRAM_BW_Use) consists of uncore events and duration_time. For uncore events, counter->core.system_wide is true. But for duration_time, counter->core.system_wide is false so target.system_wide is set to false. Then 'enable_on_exec' is set in perf_event_attr of uncore event. Kernel will return error when trying to open the uncore event. This patch skips the duration_time in setup_system_wide then target.system_wide will be set to true for the evlist of uncore events + duration_time. Before (tested on skylake desktop): # perf stat -M DRAM_BW_Use -- sleep 1 Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (arb/event=0x84,umask=0x1/). /bin/dmesg | grep -i perf may provide additional information. After: # perf stat -M DRAM_BW_Use -- sleep 1 Performance counter stats for 'system wide': 169 arb/event=0x84,umask=0x1/ # 0.00 DRAM_BW_Use 40,427 arb/event=0x81,umask=0x1/ 1,000,902,197 ns duration_time 1.000902197 seconds time elapsed Fixes: e3ba76deef23064f ("perf tools: Force uncore events to system wide monitoring") Signed-off-by: Jin Yao Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200922015004.30114-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f692d09e9c8fd0f5557c2e87f796a16dd95222b8 Author: Gao Xiang Date: Tue Sep 22 09:41:06 2020 -0700 xfs: avoid LR buffer overrun due to crafted h_len Currently, crafted h_len has been blocked for the log header of the tail block in commit a70f9fe52daa ("xfs: detect and handle invalid iclog size set by mkfs"). However, each log record could still have crafted h_len and cause log record buffer overrun. So let's check h_len vs buffer size for each log record as well. Signed-off-by: Gao Xiang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 384ff09ba2e5170a0eec8d4af57065a47c3f8ef2 Author: Darrick J. Wong Date: Mon Sep 21 09:15:10 2020 -0700 xfs: don't release log intent items when recovery fails Nowadays, log recovery will call ->release on the recovered intent items if recovery fails. Therefore, it's redundant to release them from inside the ->recover functions when they're about to return an error. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 2dbf872c042eaf7315d35752b6222c7c832112fd Author: Darrick J. Wong Date: Mon Sep 21 09:15:10 2020 -0700 xfs: attach inode to dquot in xfs_bui_item_recover In the bmap intent item recovery code, we must be careful to attach the inode to its dquots (if quotas are enabled) so that a change in the shape of the bmap btree doesn't cause the quota counters to be incorrect. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 93293bcbde93567efaf4e6bcd58cad270e1fcbf5 Author: Darrick J. Wong Date: Mon Sep 21 09:15:09 2020 -0700 xfs: log new intent items created as part of finishing recovered intent items During a code inspection, I found a serious bug in the log intent item recovery code when an intent item cannot complete all the work and decides to requeue itself to get that done. When this happens, the item recovery creates a new incore deferred op representing the remaining work and attaches it to the transaction that it allocated. At the end of _item_recover, it moves the entire chain of deferred ops to the dummy parent_tp that xlog_recover_process_intents passed to it, but fail to log a new intent item for the remaining work before committing the transaction for the single unit of work. xlog_finish_defer_ops logs those new intent items once recovery has finished dealing with the intent items that it recovered, but this isn't sufficient. If the log is forced to disk after a recovered log item decides to requeue itself and the system goes down before we call xlog_finish_defer_ops, the second log recovery will never see the new intent item and therefore has no idea that there was more work to do. It will finish recovery leaving the filesystem in a corrupted state. The same logic applies to /any/ deferred ops added during intent item recovery, not just the one handling the remaining work. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit e581c9397a25458c06b05f37efce2c480836ef4f Author: Darrick J. Wong Date: Mon Sep 21 09:15:09 2020 -0700 xfs: check dabtree node hash values when loading child blocks When xchk_da_btree_block is loading a non-root dabtree block, we know that the parent block had to have a (hashval, address) pointer to the block that we just loaded. Check that the hashval in the parent matches the block we just loaded. This was found by fuzzing nbtree[3].hashval = ones in xfs/394. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 8df0fa39bdd86ca81a8d706a6ed9d33cc65ca625 Author: Darrick J. Wong Date: Mon Sep 21 09:15:08 2020 -0700 xfs: don't free rt blocks when we're doing a REMAP bunmapi call When callers pass XFS_BMAPI_REMAP into xfs_bunmapi, they want the extent to be unmapped from the given file fork without the extent being freed. We do this for non-rt files, but we forgot to do this for realtime files. So far this isn't a big deal since nobody makes a bunmapi call to a rt file with the REMAP flag set, but don't leave a logic bomb. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit c54e14d155f5fdbac73a8cd4bd2678cb252149dc Author: Chandan Babu R Date: Thu Sep 17 11:12:08 2020 -0700 xfs: Set xfs_buf's b_ops member when zeroing bitmap/summary files In xfs_growfs_rt(), we enlarge bitmap and summary files by allocating new blocks for both files. For each of the new blocks allocated, we allocate an xfs_buf, zero the payload, log the contents and commit the transaction. Hence these buffers will eventually find themselves appended to list at xfs_ail->ail_buf_list. Later, xfs_growfs_rt() loops across all of the new blocks belonging to the bitmap inode to set the bitmap values to 1. In doing so, it allocates a new transaction and invokes the following sequence of functions, - xfs_rtfree_range() - xfs_rtmodify_range() - xfs_rtbuf_get() We pass '&xfs_rtbuf_ops' as the ops pointer to xfs_trans_read_buf(). - xfs_trans_read_buf() We find the xfs_buf of interest in per-ag hash table, invoke xfs_buf_reverify() which ends up assigning '&xfs_rtbuf_ops' to xfs_buf->b_ops. On the other hand, if xfs_growfs_rt_alloc() had allocated a few blocks for the bitmap inode and returned with an error, all the xfs_bufs corresponding to the new bitmap blocks that have been allocated would continue to be on xfs_ail->ail_buf_list list without ever having a non-NULL value assigned to their b_ops members. An AIL flush operation would then trigger the following warning message to be printed on the console, XFS (loop0): _xfs_buf_ioapply: no buf ops on daddr 0x58 len 8 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ CPU: 3 PID: 449 Comm: xfsaild/loop0 Not tainted 5.8.0-rc4-chandan-00038-g4d8c2b9de9ab-dirty #37 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack+0x57/0x70 _xfs_buf_ioapply+0x37c/0x3b0 ? xfs_rw_bdev+0x1e0/0x1e0 ? xfs_buf_delwri_submit_buffers+0xd4/0x210 __xfs_buf_submit+0x6d/0x1f0 xfs_buf_delwri_submit_buffers+0xd4/0x210 xfsaild+0x2c8/0x9e0 ? __switch_to_asm+0x42/0x70 ? xfs_trans_ail_cursor_first+0x80/0x80 kthread+0xfe/0x140 ? kthread_park+0x90/0x90 ret_from_fork+0x22/0x30 This message indicates that the xfs_buf had its b_ops member set to NULL. This commit fixes the issue by assigning "&xfs_rtbuf_ops" to b_ops member of each of the xfs_bufs logged by xfs_growfs_rt_alloc(). Signed-off-by: Chandan Babu R Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0385971754f0aa0507ecd7f0a0f4a48781906eda Author: Christoph Hellwig Date: Wed Sep 23 17:07:13 2020 +0200 block: fix bmd->is_null_mapped initialization bmd is allocated using kmalloc in bio_alloc_map_data, so make sure is_null_mapped is properly initialized to false for the !null_mapped case. Fixes: f3256075ba49 ("block: remove the BIO_NULL_MAPPED flag") Reported-by: Marc Hartmayer Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f952eefe74a4083142b4cdf0626ebbc07378aeb5 Author: Julia Lawall Date: Sun Sep 20 13:26:18 2020 +0200 block: drop double zeroing sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; @@ x = - kzalloc + kmalloc (...) ... sg_init_table(x,...) // Signed-off-by: Julia Lawall Signed-off-by: Jens Axboe commit 26bd3f312c2ece0e8860c80fc64a112df5a620c6 Author: Lokesh Vutla Date: Mon Sep 14 21:52:31 2020 +0530 arm64: dts: ti: Add support for J7200 Common Processor Board Add support for J7200 Common Processor Board. The EVM architecture is very similar to J721E 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. Note: * The minimum configuration required to boot up the board is System On Module(SOM) + Common Processor Board. * 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. * All daughter cards beyond the basic boards shall be maintained as overlays. Signed-off-by: Lokesh Vutla Signed-off-by: Peter Ujfalusi Signed-off-by: Nishanth Menon Reviewed-by: Grygorii Strashko Reviewed-by: Suman Anna Link: https://lore.kernel.org/r/20200914162231.2535-6-lokeshvutla@ti.com commit d361ed88455feae5f7e555828b0d8104588cc53d Author: Lokesh Vutla Date: Mon Sep 14 21:52:30 2020 +0530 arm64: dts: ti: Add support for J7200 SoC The J7200 SoC is a part of the K3 Multicore SoC architecture platform. It is targeted for automotive gateway, vehicle compute systems, Vehicle-to-Vehicle (V2V) and Vehicle-to-Everything (V2X) applications. The SoC aims to meet the complex processing needs of modern embedded products. Some highlights of this SoC are: * Dual Cortex-A72s in a single cluster, two clusters of lockstep capable dual Cortex-R5F MCUs and a Centralized Device Management and Security Controller (DMSC). * Configurable L3 Cache and IO-coherent architecture with high data throughput capable distributed DMA architecture under NAVSS. * Integrated Ethernet switch supporting up to a total of 4 external ports in addition to legacy Ethernet switch of up to 2 ports. * Upto 1 PCIe-GEN3 controller, 1 USB3.0 Dual-role device subsystems, 20 MCANs, 3 McASP, eMMC and SD, OSPI/HyperBus memory controller, I3C and I2C, eCAP/eQEP, eHRPWM among other peripherals. * One hardware accelerator block containing AES/DES/SHA/MD5 called SA2UL management. See J7200 Technical Reference Manual (SPRUIU1, June 2020) for further details: https://www.ti.com/lit/pdf/spruiu1 Signed-off-by: Lokesh Vutla Signed-off-by: Nishanth Menon Reviewed-by: Grygorii Strashko Reviewed-by: Suman Anna Reviewed-by: Vignesh Raghavendra Reviewed-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20200914162231.2535-5-lokeshvutla@ti.com commit 214b0eb35e55d9d726ad02ffec62f087c09864fb Author: Lokesh Vutla Date: Mon Sep 14 21:52:29 2020 +0530 dt-bindings: arm: ti: Add bindings for J7200 SoC The J7200 SoC is a part of the K3 Multicore SoC architecture platform. It is targeted for automotive gateway, vehicle compute systems, Vehicle-to-Vehicle (V2V) and Vehicle-to-Everything (V2X) applications. The SoC aims to meet the complex processing needs of modern embedded products. Some highlights of this SoC are: * Dual Cortex-A72s in a single cluster, two clusters of lockstep capable dual Cortex-R5F MCUs and a Centralized Device Management and Security Controller (DMSC). * Configurable L3 Cache and IO-coherent architecture with high data throughput capable distributed DMA architecture under NAVSS. * Integrated Ethernet switch supporting up to a total of 4 external ports in addition to legacy Ethernet switch of up to 2 ports. * Upto 1 PCIe-GEN3 controller, 1 USB3.0 Dual-role device subsystems, 20 MCANs, 3 McASP, eMMC and SD, OSPI/HyperBus memory controller, I3C and I2C, eCAP/eQEP, eHRPWM among other peripherals. * One hardware accelerator block containing AES/DES/SHA/MD5 called SA2UL management. See J7200 Technical Reference Manual (SPRUIU1, June 2020) for further details: https://www.ti.com/lit/pdf/spruiu1 Signed-off-by: Lokesh Vutla Signed-off-by: Nishanth Menon Reviewed-by: Grygorii Strashko Reviewed-by: Rob Herring Reviewed-by: Suman Anna Link: https://lore.kernel.org/r/20200914162231.2535-4-lokeshvutla@ti.com commit 66e06509aa37bcf089ce341ec9c027922f105155 Author: Lokesh Vutla Date: Mon Sep 14 21:52:28 2020 +0530 dt-bindings: arm: ti: Convert K3 board/soc bindings to DT schema Convert TI K3 Board/SoC bindings to DT schema format. Signed-off-by: Lokesh Vutla Signed-off-by: Nishanth Menon Reviewed-by: Grygorii Strashko Reviewed-by: Rob Herring Reviewed-by: Suman Anna Link: https://lore.kernel.org/r/20200914162231.2535-3-lokeshvutla@ti.com commit 21bb8c83c94923f1f996e1cb57c4744ea1163eed Author: Lokesh Vutla Date: Mon Sep 14 21:52:27 2020 +0530 arm64: dts: ti: Makefile: Use ARCH_K3 for building dtbs To allow lesser dependency and better maintainability use CONFIG_ARCH_K3 for building dtbs for all K3 based devices. This is as per the discussion in [0]. [0] https://lore.kernel.org/linux-arm-kernel/20200908112534.t5bgrjf7y3a6l2ss@akan/ Signed-off-by: Lokesh Vutla Signed-off-by: Nishanth Menon Reviewed-by: Suman Anna Link: https://lore.kernel.org/r/20200914162231.2535-2-lokeshvutla@ti.com commit 30a9a8c16865d37bfc0f1859a398ba1b24eec569 Author: Artem Lapkin Date: Wed Sep 23 21:08:23 2020 +0800 arm64: dts: rockchip: add ir-receiver node to rk3399-khadas-edge add missed ir-receiver and ir_rx pinctl nodes to rk3399-khadas-edge Khadas Edge board uses gpio-ir-receiver on RK_PB6 gpio Signed-off-by: Artem Lapkin Link: https://lore.kernel.org/r/20200923130823.1612533-3-art@khadas.com Signed-off-by: Heiko Stuebner commit 5d71f44569941386b419398463166fdf1785f4e2 Author: Artem Lapkin Date: Wed Sep 23 21:08:22 2020 +0800 arm64: dts: rockchip: add spiflash node to rk3399-khadas-edge The Khadas Edge Boards uses winbond - w25q128 spi flash with 104Mhz Signed-off-by: Artem Lapkin Link: https://lore.kernel.org/r/20200923130823.1612533-2-art@khadas.com Signed-off-by: Heiko Stuebner commit 2759caad2600d503c3b0ed800e7e03d2cd7a4c05 Author: Takashi Iwai Date: Tue Sep 22 10:38:56 2020 +0200 ALSA: seq: oss: Avoid mutex lock for a long-time ioctl Recently we applied a fix to cover the whole OSS sequencer ioctls with the mutex for dealing with the possible races. This works fine in general, but in theory, this may lead to unexpectedly long stall if an ioctl like SNDCTL_SEQ_SYNC is issued and an event with the far future timestamp was queued. For fixing such a potential stall, this patch changes the mutex lock applied conditionally excluding such an ioctl command. Also, change the mutex_lock() with the interruptible version for user to allow escaping from the big-hammer mutex. Fixes: 80982c7e834e ("ALSA: seq: oss: Serialize ioctls") Suggested-by: Pavel Machek Link: https://lore.kernel.org/r/20200922083856.28572-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit cdc01a1558dedcee3daee7e1802d0349a07edb87 Author: František Kučera Date: Tue Sep 22 16:42:06 2020 +0200 ALSA: usb-audio: Add mixer support for Pioneer DJ DJM-250MK2 This patch extends support for DJM-250MK2 and allows mapping playback and capture channels to available sources. Configures the card through USB commands. Signed-off-by: František Kučera Link: https://lore.kernel.org/r/20200922144206.10472-1-konference@frantovo.cz Signed-off-by: Takashi Iwai commit 68a215164e1938490c82eecccb263d30c586b84a Author: Alain Volmat Date: Mon Aug 31 22:38:04 2020 +0200 reset: sti: reset-syscfg: fix struct description warnings Fix formating of struct description to avoid warning highlighted by W=1 compilation. Fixes: e5d76075d930 ("drivers: reset: STi SoC system configuration reset controller support") Signed-off-by: Alain Volmat Signed-off-by: Philipp Zabel commit f008c403270cc2b830868ec0967a3cac7f18a984 Author: Peng Fan Date: Thu Jul 30 14:46:09 2020 +0800 reset: imx7: add the cm4 reset for i.MX8MQ Add the cm4 reset used by the remoteproc driver Signed-off-by: Peng Fan Signed-off-by: Philipp Zabel commit cbc111d1552ee1364a16cfd1162dd9e8f969101e Author: Peng Fan Date: Thu Jul 30 14:46:08 2020 +0800 dt-bindings: reset: imx8mq: add m4 reset Add the m4 reset used by the remoteproc driver Signed-off-by: Peng Fan Acked-by: Rob Herring Signed-off-by: Philipp Zabel commit 3315be577411d55df393fc8ab9f7a384cb90835a Author: Krzysztof Kozlowski Date: Tue Jul 28 19:10:11 2020 +0200 reset: Fix and extend kerneldoc Fix W=1 compile warnings (invalid kerneldoc): drivers/reset/core.c:50: warning: Function parameter or member 'array' not described in 'reset_control' drivers/reset/core.c:50: warning: Function parameter or member 'deassert_count' not described in 'reset_control' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Philipp Zabel commit 552f388bbe1ffe486f89d8b97cf19e79dbe55b5e Author: Sai Krishna Potthuri Date: Wed Jul 22 12:46:05 2020 +0530 reset: reset-zynqmp: Added support for Versal platform Updated the reset driver to support Versal platform. As part of adding Versal support - Added Versal specific compatible string. - Reset Id and number of resets are different for Versal and ZynqMP, hence taken care of these two based on compatible string. Signed-off-by: Sai Krishna Potthuri Signed-off-by: Philipp Zabel commit a297104aceeb312600b0efaf8a281ad0f17167d2 Author: Sai Krishna Potthuri Date: Wed Jul 22 12:46:04 2020 +0530 dt-bindings: reset: Updated binding for Versal reset driver Added documentation and Versal reset indices to describe about Versal reset driver bindings. In Versal all reset indices includes Class, SubClass, Type, Index information whereas class refers to clock, reset, power etc., Underlying firmware in Versal have such classification and expects the ID to be this way. [13:0] - Index bits [19:14] - Type bits [25:20] - SubClass bits [31:26] - Class bits. Signed-off-by: Sai Krishna Potthuri Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit a442abbbe186e14128d18bc3e42fb0fbf1a62210 Author: Anson Huang Date: Mon Jul 20 22:21:59 2020 +0800 reset: imx7: Support module build Use module_platform_driver(), add module device table, author, description and license to support module build, and CONFIG_RESET_IMX7 is changed to default 'y' ONLY for i.MX7D, other platforms need to select it in defconfig. Signed-off-by: Anson Huang Signed-off-by: Philipp Zabel commit f49735f4978f479b0de4f50ab217d5a56bc83c55 Author: Lina Iyer Date: Tue Sep 22 12:34:16 2020 -0600 cpuidle: record state entry rejection statistics CPUs may fail to enter the chosen idle state if there was a pending interrupt, causing the cpuidle driver to return an error value. Record that and export it via sysfs along with the other idle state statistics. This could prove useful in understanding behavior of the governor and the system during usecases that involve multiple CPUs. Signed-off-by: Lina Iyer [ rjw: Changelog and documentation edits ] Signed-off-by: Rafael J. Wysocki commit ca43ab1e54c0898a6e1b40d99ffd7f57c5c42257 Author: Xiaofei Tan Date: Tue Sep 22 20:08:04 2020 +0800 HID: i2c-hid: fix kerneldoc warnings in i2c-hid-core.c Fix following warnings caused by mismatch bewteen function parameters and comments. drivers/hid/i2c-hid/i2c-hid-core.c:331: warning: Function parameter or member 'data_len' not described in 'i2c_hid_set_or_send_report' drivers/hid/i2c-hid/i2c-hid-core.c:331: warning: Excess function parameter 'len' description in 'i2c_hid_set_or_send_report' Signed-off-by: Xiaofei Tan Signed-off-by: Jiri Kosina commit 5f94e9c82a86ac1c624ac7ebf456515a07c10851 Author: Xiaofei Tan Date: Tue Sep 22 20:00:12 2020 +0800 HID: core: fix kerneldoc warnings in hid-core.c Fix following warnings caused by mismatch bewteen function parameters and comments. drivers/hid/hid-core.c:931: warning: Function parameter or member 'hid' not described in 'hid_parse_report' drivers/hid/hid-core.c:931: warning: Excess function parameter 'device' description in 'hid_parse_report' drivers/hid/hid-core.c:961: warning: Function parameter or member 'hid' not described in 'hid_validate_values' drivers/hid/hid-core.c:961: warning: Excess function parameter 'device' description in 'hid_validate_values' drivers/hid/hid-core.c:1452: warning: Function parameter or member 'report' not described in 'hid_match_report' drivers/hid/hid-core.c:1452: warning: Excess function parameter 'report_type' description in 'hid_match_report' drivers/hid/hid-core.c:2132: warning: Function parameter or member 'drv' not described in 'new_id_store' drivers/hid/hid-core.c:2132: warning: Excess function parameter 'driver' description in 'new_id_store' Signed-off-by: Xiaofei Tan Signed-off-by: Jiri Kosina commit 5ec3215e56af8f7ce30c3d9d39029a85616713c0 Author: Dan Carpenter Date: Wed Sep 23 11:32:35 2020 +0300 soundwire: remove an unnecessary NULL check The "bus" pointer isn't NULL so the address to a non-zero offset in middle of "bus" cannot be NULL. Delete the NULL check. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200923083235.GB1454948@mwanda Signed-off-by: Vinod Koul commit 9e4e6019e68cc1749bf5aba0ee5e91576de242bf Author: Pierre-Louis Bossart Date: Mon Sep 21 03:32:07 2020 +0800 soundwire: cadence: add data port test fail interrupt The Master ports can report errors in test data modes, enable the interrupt and just log a message. This capability is useful for Master sink ports only (Master source ports generate data). Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200920193207.31241-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 0f9138e75753511572f67b1bf943224d504ca170 Author: Pierre-Louis Bossart Date: Mon Sep 21 03:32:06 2020 +0800 soundwire: intel: enable test modes This patch adds debugfs support to override the Master and Slave data modes. The settings only take effect prior to a new stream being prepared/enabled, or on resume. The test mode can be set to verify data integrity and detect bus clashes, but can only be used to test capture paths. In this case the input generated by a Slave source port is replaced by a fixed or cyclical patterns. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200920193207.31241-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit dd87a72ae968f70852cd7a2d939acd9693e76095 Author: Pierre-Louis Bossart Date: Mon Sep 21 03:32:05 2020 +0800 soundwire: enable Data Port test modes Test modes are required for all SoundWire IP, and help debug integration issues. In theory each port can be configured with a different mode but to simplify this patch only offers separate configurations for the Master and Slave ports - this covers 99% of the intended cases during platform integration. The test mode value is set via platform-specific ways. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200920193207.31241-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 01cc2ec6ea044731e939e5e47f7e115b86f49465 Author: Mauro Carvalho Chehab Date: Wed Sep 23 10:17:47 2020 +0200 media: atomisp: cleanup __printf() atributes on printk messages There are still some warnings produced by -Wsuggest-attribute=format, like this one: drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c: In function ‘dtrace_dot’: drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2466:2: warning: function ‘dtrace_dot’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 2466 | ia_css_debug_vdtrace(IA_CSS_DEBUG_INFO, fmt, ap); | ^~~~~~~~~~~~~~~~~~~~ Also, on some places, is is using __atribute, while on others it is using the __printf() macro. Uniform those to always use the __printf() macro, placing it before the function, and fix the logic in order to cleanup all such warnings. Signed-off-by: Mauro Carvalho Chehab commit c29900d50f4445e25a8e70dbd794bcc51d531639 Author: Nobuhiro Iwamatsu Date: Tue Apr 28 06:47:04 2020 +0900 arm64: defconfig: Enable configs for Toshiba Visconti Enable support for the Toshiba Visconti SoCs. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Punit Agrawal commit 836863a08c99dec42337fde0d4f4620fcac69f20 Author: Nobuhiro Iwamatsu Date: Mon Apr 27 10:36:01 2020 +0900 MAINTAINERS: Add information for Toshiba Visconti ARM SoCs Add information about Toshiba Visconti ARM SoCs to MAINTAINERS. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Punit Agrawal commit 48dea9a700c8728cc31a1dd44588b97578de86ee Author: Nobuhiro Iwamatsu Date: Tue Apr 28 05:59:12 2020 +0900 arm64: dts: visconti: Add device tree for TMPV7708 RM main board Add basic support for the Visconti TMPV7708 SoC peripherals - - CPU - CA53 x 4 and 2 cluster. - not support PSCI, currently only spin-table is supported. - Interrupt controller (ARM Generic Interrupt Controller) - Timer (ARM architected timer) - UART (ARM PL011 UART controller) - SPI (ARM PL022 SPI controller) - I2C (Synopsys DesignWare APB I2C Controller) - Pin control (Visconti specific) Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Punit Agrawal commit 0aa56c7eba9ab7b7661b165f3b7dc4e73a4fb1ef Author: Nobuhiro Iwamatsu Date: Tue Apr 28 05:58:48 2020 +0900 arm64: visconti: Add initial support for Toshiba Visconti platform Add the initial device tree files for Toshiba Visconti platform. For starters, the only SoC supported will be Visconti5 TMPV7708. https://toshiba.semicon-storage.com/ap-en/semiconductor/product/image-recognition-processors-visconti.html Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Punit Agrawal commit a1fd0c367be3a7fd3c19f08aed4126d7cda1ba11 Author: Nobuhiro Iwamatsu Date: Wed Jul 22 10:50:46 2020 +0900 dt-bindings: arm: toshiba: Add the TMPV7708 RM main board Add an entry for the Toshiba Visconti TMPV7708 RM main board (tmpv7708-rm-mbrc) to the board/SoC bindings. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Punit Agrawal Reviewed-by: Rob Herring commit b3ff08bc9ba6a2047d7a5812e89a5187cf3e4aa4 Author: Nobuhiro Iwamatsu Date: Mon Apr 27 09:10:40 2020 +0900 dt-bindings: arm: toshiba: add Toshiba Visconti ARM SoCs Add device tree bindings for the Toshiba Visconti ARM SoCs. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Punit Agrawal Reviewed-by: Rob Herring commit 8e3d5d4baf0781974a224e284e837665c0d26f92 Author: Mauro Carvalho Chehab Date: Wed Sep 23 09:48:20 2020 +0200 media: atomisp: fix gcc warnings Depending on the gcc version, after changeset 72a9ff3bf7fb ("media: atomisp: get rid of -Wsuggest-attribute=format warnings"), we're now getting two warnings, which are breaking the Jenkins CI instance at https://builder.linuxtv.org: ../drivers/staging/media/atomisp/pci/atomisp_compat_css20.c: In function ‘__set_css_print_env’: ../drivers/staging/media/atomisp/pci/atomisp_compat_css20.c:860:50: error: assignment to ‘int (*)(const char *, char *)’ from incompatible pointer type ‘int (__attribute__((regparm(0))) *)(const char *, char *)’ [-Werror=incompatible-pointer-types] isp->css_env.isp_css_env.print_env.debug_print = vprintk; ^ ../drivers/staging/media/atomisp/pci/atomisp_compat_css20.c: In function ‘atomisp_css_load_firmware’: ../drivers/staging/media/atomisp/pci/atomisp_compat_css20.c:893:49: error: assignment to ‘int (*)(const char *, char *)’ from incompatible pointer type ‘int (__attribute__((regparm(0))) *)(const char *, char *)’ [-Werror=incompatible-pointer-types] isp->css_env.isp_css_env.print_env.error_print = vprintk; ^ cc1: some warnings being treated as errors So, we need to partially revert the patch. Fixes: 72a9ff3bf7fb ("media: atomisp: get rid of -Wsuggest-attribute=format warnings") Signed-off-by: Mauro Carvalho Chehab commit de194561359788871f7d8f5f7797557a2a166b4e Author: Maxime Ripard Date: Fri Sep 18 16:59:17 2020 +0200 drm/vc4: kms: Assign a FIFO to enabled CRTCs instead of active The HVS has three FIFOs that can be assigned to a number of PixelValves through a mux. However, changing that FIFO requires that we disable and then enable the pixelvalve, so we want to assign FIFOs to all the enabled CRTCs, and not just the active ones. Fixes: 87ebcd42fb7b ("drm/vc4: crtc: Assign output to channel automatically") Signed-off-by: Maxime Ripard Tested-by: Dave Stevenson Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20200918145918.101068-1-maxime@cerno.tech commit 8f04aea048d56f3e39a7e543939450246542a6fc Author: Tony Lindgren Date: Wed Sep 23 09:16:22 2020 +0300 ARM: OMAP2+: Restore MPU power domain if cpu_cluster_pm_enter() fails If cpu_cluster_pm_enter() fails, we need to set MPU power domain back to enabled to prevent the next WFI from potentially triggering an undesired MPU power domain state change. We already do this for omap_enter_idle_smp() but are missing it for omap_enter_idle_coupled(). Fixes: 55be2f50336f ("ARM: OMAP2+: Handle errors for cpu_pm") Signed-off-by: Tony Lindgren commit b753e41d9999c040c601de53cc1e072160472d80 Author: Drew Fustini Date: Tue Sep 22 00:50:55 2020 +0200 ARM: dts: am33xx: modify AM33XX_IOPAD for #pinctrl-cells = 2 Modify the AM33XX_IOPAD macro so that it works now that #pinctrl-cells = <2>. The third parameter is just a zero and the pinctrl-single driver will just OR this with the second parameter so it has no actual effect. There are no longer any dts files using this macro (following my patch to am335x-guardian.dts), but this will keep dts files not in mainline from breaking. Fixes: 27c90e5e48d0 ("ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2") Suggested-by: Tony Lindgren Reported-by: Trent Piepho Link: https://lore.kernel.org/linux-devicetree/20200921064707.GN7101@atomide.com/ Signed-off-by: Drew Fustini Signed-off-by: Tony Lindgren commit 063a9966ee1555db2375fa21339199578974b725 Author: Thomas Bogendoerfer Date: Wed Sep 23 09:26:44 2020 +0200 Revert "MIPS: OCTEON: use devm_platform_ioremap_resource" This reverts commit 0ee69c589ec8659560910815f32c13af8587a779. Resource is still needed later in the code, so using devm_platform_ioremap_resource is no win at all. Signed-off-by: Thomas Bogendoerfer commit b7132285c65b52afd73139a8386184ff81c3fcb7 Author: Tomi Valkeinen Date: Fri Sep 18 11:37:43 2020 +0300 dt-bindings: phy: ti,phy-j721e-wiz: fix bindings for torrent phy When WIZ wraps a Cadence Torrent PHY (instead of Cadence Sierra PHY) there is a difference in the refclk-dig node: Torrent only has two clocks instead of Sierra's four clocks. Add minItems: 2 to solve this. Additionally, in our use case we only need to use assigned-clock for a single clock, but the current binding requires either no assigned-clocks or two. Fix this by adding minItems: 1 to all the assigned-clock properties. There was also an extra trailing whitespace, which this patch removes. Signed-off-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20200918083743.213874-2-tomi.valkeinen@ti.com Signed-off-by: Vinod Koul commit 4feac940ec142f70dd8600c5b73bef1cab5fde10 Author: Tomi Valkeinen Date: Fri Sep 18 11:37:42 2020 +0300 dt-bindings: phy: cdns,torrent-phy: add reset-names Add reset-names as a required property. There are no dts files using torrent phy yet, so it is safe to add a new required property. Signed-off-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20200918083743.213874-1-tomi.valkeinen@ti.com Signed-off-by: Vinod Koul commit 028abd9222df0cf5855dab5014a5ebaf06f90565 Author: Christoph Hellwig Date: Thu Sep 17 10:22:34 2020 +0200 fs: remove compat_sys_mount compat_sys_mount is identical to the regular sys_mount now, so remove it and use the native version everywhere. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 67e306c6906137020267eb9bbdbc127034da3627 Author: Christoph Hellwig Date: Thu Sep 17 10:22:33 2020 +0200 fs,nfs: lift compat nfs4 mount data handling into the nfs code There is no reason the generic fs code should bother with NFS specific binary mount data - lift the conversion into nfs4_parse_monolithic instead. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit a1c7dc5d15ede2716cc7af6444e1904014854f60 Author: Christoph Hellwig Date: Thu Sep 17 10:22:32 2020 +0200 nfs: simplify nfs4_parse_monolithic Remove a level of indentation for the version 1 mount data parsing, and simplify the NULL data case a little bit as well. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit a7c9df0446d295daee68bb16c9b3746f3d21b1ef Author: Alex Dewar Date: Mon Sep 14 18:57:01 2020 +0100 fs: omfs: use kmemdup() rather than kmalloc+memcpy Issue identified with Coccinelle. Signed-off-by: Alex Dewar Acked-by: Bob Copeland Signed-off-by: Al Viro commit 573a8095f68c7a73b362b5c0f65bb6a0a8a53a03 Merge: 748d1c8a425ec 5af75c747e2a8 Author: David S. Miller Date: Tue Sep 22 17:44:59 2020 -0700 Merge tag 'mlx5-updates-2020-09-21' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-09-21 Multi packet TX descriptor support for SKBs. This series introduces some refactoring of the regular TX data path in mlx5 and adds the Enhanced TX MPWQE feature support. MPWQE stands for multi-packet work queue element, and it can serve multiple packets, reducing the PCI bandwidth spent on control traffic. It should improve performance in scenarios where PCI is the bottleneck, and xmit_more is signaled by the kernel. The refactoring done in this series also improves the packet rate on its own. MPWQE is already implemented in the XDP tx path, this series adds the support of MPWQE for regular kernel SKB tx path. MPWQE is supported from ConnectX-5 and onward, for legacy devices we need to keep backward compatibility for regular (Single packet) WQE descriptor. MPWQE is not compatible with certain offloads and features, such as TLS offload, TSO, nonlinear SKBs. If such incompatible features are in use, the driver gracefully falls back to non-MPWQE per SKB. Prior to the final patch "net/mlx5e: Enhanced TX MPWQE for SKBs" that adds the actual support, Maxim did some refactoring to the tx data path to split it into stages and smaller helper functions that can be utilized and reused for both legacy and new MPWQE feature. Performance testing: UDP performance is improved in a single stream pktgen test: Packet rate: 16.86 Mpps (±0.15 Mpps) -> 20.94 Mpps (±0.33 Mpps) Instructions per packet: 434 -> 329 Cycles per packet: 158 -> 123 Instructions per cycle: 2.75 -> 2.67 TCP and XDP_TX single stream tests show no performance difference. MPWQE can reduce PCI bandwidth: PCI Gen2, pktgen at fixed rate of 36864000 pps on 24 CPU cores: Inbound PCI utilization with MPWQE off: 80.3% Inbound PCI utilization with MPWQE on: 59.0% PCI Gen3, pktgen at fixed rate of 56064000 pps on 24 CPU cores: Inbound PCI utilization with MPWQE off: 65.4% Inbound PCI utilization with MPWQE on: 49.3% MPWQE can also reduce CPU load, increasing the packet rate in case of CPU bottleneck: PCI Gen2, pktgen at full rate on 24 CPU cores: Packet rate with MPWQE off: 37.5 Mpps Packet rate with MPWQE on: 49.0 Mpps PCI Gen3, pktgen at full rate on 24 CPU cores: Packet rate with MPWQE off: 57.0 Mpps Packet rate with MPWQE on: 66.8 Mpps Burst size in all pktgen tests is 32. CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz (x86_64) NIC: Mellanox ConnectX-6 Dx GCC 10.2.0 ==================== Signed-off-by: David S. Miller commit 748d1c8a425ec529d541f082ee7a81f6a51fa120 Merge: 3ab0a7a0c349a c49a94405b39d Author: David S. Miller Date: Tue Sep 22 17:38:42 2020 -0700 Merge branch 'devlink-Use-nla_policy-to-validate-range' Parav Pandit says: ==================== devlink: Use nla_policy to validate range This two small patches uses nla_policy to validate user specified fields are in valid range or not. Patch summary: Patch-1 checks the range of eswitch mode field Patch-2 checks for the port type field. It eliminates a check in code by using nla policy infrastructure. ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit c49a94405b39d3e3293da98f621fe4243f3cc4fa Author: Parav Pandit Date: Mon Sep 21 19:41:30 2020 +0300 devlink: Enhance policy to validate port type input value Use range checking facility of nla_policy to validate port type attribute input value is valid or not. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit ba356c90985defec30c8680077bf571a50a4004b Author: Parav Pandit Date: Mon Sep 21 19:41:29 2020 +0300 devlink: Enhance policy to validate eswitch mode value Use range checking facility of nla_policy to validate eswitch mode input attribute value is valid or not. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit c1a3bf99d76e5ae5537265433def019a34a9dac0 Author: Stanley Chu Date: Mon Sep 14 13:00:52 2020 +0800 scsi: ufs-mediatek: dt-bindings: Add mt8192-ufshci compatible string Add "mediatek,mt8192-ufshci" compatible string to for MediaTek UFS host controller present on MT8192 chipsets. Link: https://lore.kernel.org/r/20200914050052.3974-3-stanley.chu@mediatek.com Acked-by: Rob Herring Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 590b0d2372fef09f9755f40e43358fabf5a7fd63 Author: Stanley Chu Date: Mon Sep 14 13:00:51 2020 +0800 scsi: ufs-mediatek: Support performance mode for inline encryption engine Some MediaTek UFS platforms support high-performance mode that inline encryption engine can be boosted while UFS is not clock-gated. The high-performance mode will be enabled if all below conditions are well-declaired in device tree, - Proper platform-specific compatible string which enables the host capability "UFS_MTK_CAP_BOOST_CRYPT_ENGINE". - "dvfsrc-vcore" node is available in this platform. - Required minimum vcore voltage for high-performance mode. - Clock mux and clock parents of inline encryption engine for both "low-power mode" and "high-performance mode". Link: https://lore.kernel.org/r/20200914050052.3974-2-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 3d1a99e2b5400fd32ec647b290340b5ed091d3ae Author: Liu Shixin Date: Mon Sep 21 21:45:58 2020 +0800 scsi: libsas: Simplify the return expression of sas_discover_* functions Simplify the return expression. Link: https://lore.kernel.org/r/20200921134558.3478922-1-liushixin2@huawei.com Reviewed-by: Jason Yan Signed-off-by: Liu Shixin Signed-off-by: Martin K. Petersen commit 713a846884ce02e402e184c11473f6a19dce8665 Author: Jing Xiangfeng Date: Fri Sep 18 17:07:47 2020 +0800 scsi: oak: Remove redundant initialization of variable ret No point in initializing ret with -ENOMEM. Link: https://lore.kernel.org/r/20200918090747.44645-1-jingxiangfeng@huawei.com Acked-by: Finn Thain Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit 97d0e04d38b4e3b4510e251144c9e47873a89321 Author: Qinglang Miao Date: Wed Sep 16 14:21:33 2020 +0800 scsi: bnx2i: Remove unnecessary mutex_init() The mutex bnx2i_dev_lock is initialized statically. It is unnecessary to initialize by mutex_init(). Link: https://lore.kernel.org/r/20200916062133.191000-1-miaoqinglang@huawei.com Acked-by: Manish Rangankar Signed-off-by: Qinglang Miao Signed-off-by: Martin K. Petersen commit 6ea6be77086f23d4b346c9946dae24593befda2e Merge: fc88fef916e89 089d83418914a Author: Dave Airlie Date: Wed Sep 23 09:49:48 2020 +1000 Merge tag 'drm-misc-next-2020-09-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.10: UAPI Changes: Cross-subsystem Changes: - virtio: Merged a PR for patches that will affect drm/virtio Core Changes: - dev: More devm_drm convertions and removal of drm_dev_init - atomic: Split out drm_atomic_helper_calc_timestamping_constants of drm_atomic_helper_update_legacy_modeset_state - ttm: More rework Driver Changes: - i915: selftests improvements - panfrost: support for Amlogic SoC - vc4: one fix - tree-wide: conversions to devm_drm_dev_alloc, - ast: simplifications of the atomic modesetting code - panfrost: multiple fixes - vc4: multiple fixes Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200921152956.2gxnsdgxmwhvjyut@gilmour.lan commit 3ab0a7a0c349a1d7beb2bb371a62669d1528269d Merge: 92ec804f3dbf0 805c6d3c19210 Author: David S. Miller Date: Tue Sep 22 16:45:34 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Two minor conflicts: 1) net/ipv4/route.c, adding a new local variable while moving another local variable and removing it's initial assignment. 2) drivers/net/dsa/microchip/ksz9477.c, overlapping changes. One pretty prints the port mode differently, whilst another changes the driver to try and obtain the port mode from the port node rather than the switch node. Signed-off-by: David S. Miller commit 3de3c4785b1085b48fc7027d05da9e1fc9cc2396 Author: Julia Lawall Date: Sun Sep 20 13:26:17 2020 +0200 RDMA/efa: Drop double zeroing for sg_init_table() sg_init_table() zeroes its first argument, so the allocation of that argument doesn't have to. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(*x),flags) ... sg_init_table(x,n) // Link: https://lore.kernel.org/r/1600601186-7420-6-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Julia Lawall Acked-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit d97b957e32b1e7527a9b6652fa6e795f2861df7d Author: Wang Hai Date: Tue Aug 4 21:56:44 2020 +0800 soc: fsl: qe: Remove unnessesary check in ucc_set_tdm_rxtx_clk Fix smatch warning: drivers/soc/fsl/qe/ucc.c:526 ucc_set_tdm_rxtx_clk() warn: unsigned 'tdm_num' is never less than zero. 'tdm_num' is u32 type, never less than zero. Signed-off-by: Wang Hai Signed-off-by: Li Yang commit fc88fef916e8971eefeacc62241b7408b7e7939d Merge: db29dc7d33463 911d5bd5e7b85 Author: Dave Airlie Date: Wed Sep 23 09:25:17 2020 +1000 Merge tag 'amd-drm-next-5.10-2020-09-18' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-next-5.10-2020-09-18: amdgpu: - Support for PCIe DPC recovery - Sienna Cichlid updates - Navy Flounder updates - RAS fixes - Refactor DC interrupt handling - Display fixes - Fix issues with OLED panels - Mclk fixes for navi1x - Watermark fixes for renoir and raven2 - Misc code cleanups - Misc bug fixes amdkfd: - Fix a memory leak - Fix a crach in GPU reset - Add process eviction counters radeon: - expose sclk via sysfs hwmon interface - Revert bad PLL fix scheduler: - Kernel doc fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200918204322.3931-1-alexander.deucher@amd.com commit f2334964e969762e266a616acf9377f6046470a2 Author: Sindhu, Devale Date: Wed Sep 16 08:18:12 2020 -0500 i40iw: Add support to make destroy QP synchronous Occasionally ib_write_bw crash is seen due to access of a pd object in i40iw_sc_qp_destroy after it is freed. Destroy qp is not synchronous in i40iw and thus the iwqp object could be referencing a pd object that is freed by ib core as a result of successful return from i40iw_destroy_qp. Wait in i40iw_destroy_qp till all QP references are released and destroy the QP and its associated resources before returning. Switch to use the refcount API vs atomic API for lifetime management of the qp. RIP: 0010:i40iw_sc_qp_destroy+0x4b/0x120 [i40iw] [...] RSP: 0018:ffffb4a7042e3ba8 EFLAGS: 00010002 RAX: 0000000000000000 RBX: 0000000000000001 RCX: dead000000000122 RDX: ffffb4a7042e3bac RSI: ffff8b7ef9b1e940 RDI: ffff8b7efbf09080 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 8080808080808080 R11: 0000000000000010 R12: ffff8b7efbf08050 R13: 0000000000000001 R14: ffff8b7f15042928 R15: ffff8b7ef9b1e940 FS: 0000000000000000(0000) GS:ffff8b7f2fa00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000400 CR3: 000000020d60a006 CR4: 00000000001606e0 Call Trace: i40iw_exec_cqp_cmd+0x4d3/0x5c0 [i40iw] ? try_to_wake_up+0x1ea/0x5d0 ? __switch_to_asm+0x40/0x70 i40iw_process_cqp_cmd+0x95/0xa0 [i40iw] i40iw_handle_cqp_op+0x42/0x1a0 [i40iw] ? cm_event_handler+0x13c/0x1f0 [iw_cm] i40iw_rem_ref+0xa0/0xf0 [i40iw] cm_work_handler+0x99c/0xd10 [iw_cm] process_one_work+0x1a1/0x360 worker_thread+0x30/0x380 ? process_one_work+0x360/0x360 kthread+0x10c/0x130 ? kthread_park+0x80/0x80 ret_from_fork+0x35/0x40 Fixes: d37498417947 ("i40iw: add files for iwarp interface") Link: https://lore.kernel.org/r/20200916131811.2077-1-shiraz.saleem@intel.com Reported-by: Kamal Heib Signed-off-by: Sindhu, Devale Signed-off-by: Shiraz, Saleem Signed-off-by: Jason Gunthorpe commit b0cff387e1a4ba92f3f149aca0f95291e50092ef Author: Daniel Kranzdorf Date: Tue Sep 15 17:14:49 2020 +0300 RDMA/efa: Add messages and RDMA read work requests HW stats Add separate stats types for send messages and RDMA read work requests. Link: https://lore.kernel.org/r/20200915141449.8428-3-galpress@amazon.com Signed-off-by: Daniel Kranzdorf Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 215b88ac4512487b7a9b8bb8fc7edfb1ce758b41 Author: Gal Pressman Date: Tue Sep 15 17:14:48 2020 +0300 RDMA/efa: Group keep alive received counter with other SW stats The keep alive received counter is a software stat, keep it grouped with all other software stats. Since all stored stats are software stats, remove the efa_sw_stats struct and use efa_stats instead. Link: https://lore.kernel.org/r/20200915141449.8428-2-galpress@amazon.com Reviewed-by: Daniel Kranzdorf Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 5ed2da99e3fcf3eee32a050fd31eb62d49575533 Author: Liu Shixin Date: Mon Sep 14 12:17:52 2020 +0800 soc: fsl: qman: convert to use be32_add_cpu() Signed-off-by: Liu Shixin Signed-off-by: Li Yang commit db29dc7d3346328b3fc61057d224a242f9928289 Merge: 511d2ffd35ff7 8fea92536e3ef Author: Dave Airlie Date: Wed Sep 23 09:11:00 2020 +1000 Merge tag 'drm-intel-next-2020-09-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Driver Changes: - Reduce INTEL_DISPLAY_ENABLED to just removed outputs treating it as disconnected (Ville) - Introducing new AUX, DVO, and TC ports and refactoring code around hot plug interrupts for those. (Ville) - Centralize PLL_ENABLE register lookup (Anusha) - Improvements around DP downstream facing ports (DFP). (Ville) - Enable YCbCr 444->420 conversion for HDMI DFPs. Ville - Remove the old global state on Display's atomic modeset (Ville) - Nuke force_min_cdclk_changed (Ville) - Extend a TGL W/A to all SKUs and to RKL (Swathi) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20200918173013.GA748558@intel.com commit 511d2ffd35ff75f51816aa219ce0412864f9563d Merge: 1cd0f494103db afba7e6c5fc19 Author: Dave Airlie Date: Wed Sep 23 08:48:42 2020 +1000 Merge tag 'cdns-mhdp-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next Cadence MHDP8546 DisplayPort bridge driver Signed-off-by: Dave Airlie From: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/5dd15e3c-51ed-49c0-cf49-88c7af38d6b0@ti.com commit b09c4d70122091c1865cb63a9c4dad1a94a8e339 Author: Leon Romanovsky Date: Tue Sep 22 12:11:06 2020 +0300 RDMA/restrack: Improve readability in task name management Use rdma_restrack_set_name() and rdma_restrack_parent_name() instead of tricky uses of rdma_restrack_attach_task()/rdma_restrack_uadd(). This uniformly makes all restracks add'd using rdma_restrack_add(). Link: https://lore.kernel.org/r/20200922091106.2152715-6-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c34a23c28c6b0045b1f21649de30f68da72547af Author: Leon Romanovsky Date: Tue Sep 22 12:11:05 2020 +0300 RDMA/restrack: Simplify restrack tracking in kernel flows Have a single rdma_restrack_add() that adds an entry, there is no reason to split the user/kernel here, the rdma_restrack_set_task() is responsible for this difference. This patch prepares the code to the future requirement of making restrack is mandatory for managing ib objects. Link: https://lore.kernel.org/r/20200922091106.2152715-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 13ef5539def732dc7b9c58c320d97a0a95b52634 Author: Leon Romanovsky Date: Tue Sep 22 12:11:04 2020 +0300 RDMA/restrack: Count references to the verbs objects Refactor the restrack code to make sure the kref inside the restrack entry properly kref's the object in which it is embedded. This slight change is needed for future conversions of MR and QP which are refcounted before the release and kfree. The ideal flow from ib_core perspective as follows: * Allocate ib_* structure with rdma_zalloc_*. * Set everything that is known to ib_core to that newly created object. * Initialize kref with restrack help * Call to driver specific allocation functions. * Insert into restrack DB .... * Return and release restrack with restrack_put. Largely this means a rdma_restrack_new() should be called near allocating the containing structure. Link: https://lore.kernel.org/r/20200922091106.2152715-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d7ecab1e5f7d12209549813e61435d01489a1887 Author: Leon Romanovsky Date: Tue Sep 22 12:11:03 2020 +0300 RDMA/mlx5: Don't call to restrack recursively The restrack is going to manage memory of all IB objects and must be called before object is created. GSI QP in the mlx5_ib separated between creating dummy interface and HW object beneath. This was achieved by double call to ib_create_qp(). In order to skip such reentry call to internal driver create_qp code. Link: https://lore.kernel.org/r/20200922091106.2152715-3-leon@kernel.org Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 60aaeffa367c2ac72cac96edfd10452c613882f5 Author: Leon Romanovsky Date: Tue Sep 22 12:11:02 2020 +0300 RDMA/cma: Delete from restrack DB after successful destroy Update the code to have similar destroy pattern like other IB objects. This change create asymmetry to the rdma_id_private create flow to make sure that memory is managed by restrack. Link: https://lore.kernel.org/r/20200922091106.2152715-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 72f7fe2d6a2637c98ada42812ebfa0dcad0b0737 Author: Jason Yan Date: Thu Sep 10 22:04:15 2020 +0800 soc: fsl: dpio: remove set but not used 'addr_cena' This addresses the following gcc warning with "make W=1": drivers/soc/fsl/dpio/qbman-portal.c: In function ‘qbman_swp_enqueue_multiple_direct’: drivers/soc/fsl/dpio/qbman-portal.c:650:11: warning: variable ‘addr_cena’ set but not used [-Wunused-but-set-variable] 650 | uint64_t addr_cena; | ^~~~~~~~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan Reported-by: kernel test robot Reviewed-by: Krzysztof Kozlowski Signed-off-by: Li Yang commit 767c8457b729e774f5a4646f60a0598ab868c798 Author: Nilesh Javali Date: Thu Sep 3 21:51:28 2020 -0700 scsi: qla2xxx: Update version to 10.02.00.102-k Update internal driver version and remove module version macro. Link: https://lore.kernel.org/r/20200904045128.23631-14-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit cf3c54fb49a4eb5b5b83ddab0b25df47b2e958af Author: Saurav Kashyap Date: Thu Sep 3 21:51:27 2020 -0700 scsi: qla2xxx: Add SLER and PI control support BIT_13 of extended FW attribute informs about NVMe-2 support. Set BIT_15 of special feature control block for enabling SLER in FW. Set bit 8 (SLER supported) to 1 for the service parameter information when sending NVMe PRLI request. Set BIT_14 of special feature control block for enabling PI Control in FW. Driver should set bit 9 (PI Control supported) to 1 for the service parameter information when sending NVMe PRLI request. Set BIT_13 for NVMe Async events. Link: https://lore.kernel.org/r/20200904045128.23631-13-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 89c72f4245a8510ffdb0d1980944210b8bc6e49f Author: Quinn Tran Date: Thu Sep 3 21:51:26 2020 -0700 scsi: qla2xxx: Add IOCB resource tracking This patch tracks number of IOCB resources used in the I/O fast path. If the number of used IOCBs reach a high water limit, driver would return the I/O as busy and let upper layer retry. This prevents over subscription of IOCB resources where any future error recovery command is unable to cut through. Enable IOCB throttling by default. Link: https://lore.kernel.org/r/20200904045128.23631-12-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 6152d20fa6703cf364253efc4eab31151558cb01 Author: Arun Easi Date: Thu Sep 3 21:51:25 2020 -0700 scsi: qla2xxx: Add rport fields in debugfs This patch adds rport fields in debugfs. Link: https://lore.kernel.org/r/20200904045128.23631-11-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 4e5a05d1ecd92cec59b11c33821b5407984df81d Author: Arun Easi Date: Thu Sep 3 21:51:24 2020 -0700 scsi: qla2xxx: Make tgt_port_database available in initiator mode tgt_port_database data is today exported only in target mode, allow it to be shown in initiator mode as well. Link: https://lore.kernel.org/r/20200904045128.23631-10-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit a35f87bdcc0615c5a3a695d13dd1ccf827826368 Author: Arun Easi Date: Thu Sep 3 21:51:23 2020 -0700 scsi: qla2xxx: Fix I/O errors during LIP reset tests In .fcp_io(), returning ENODEV as soon as remote port delete has started can cause I/O errors. Fix this by returning EBUSY until the remote port delete finishes. Link: https://lore.kernel.org/r/20200904045128.23631-9-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 49db4d4e02aabcd4fa2f60142ef42e50fb2dd526 Author: Quinn Tran Date: Thu Sep 3 21:51:22 2020 -0700 scsi: qla2xxx: Performance tweak Move statistics fields from vha struct to qpair to reduce memory thrashing. Link: https://lore.kernel.org/r/20200904045128.23631-8-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit d38cb849e17a34637b97ce57c550ec70d63dd39a Author: Quinn Tran Date: Thu Sep 3 21:51:21 2020 -0700 scsi: qla2xxx: Fix memory size truncation Memory size calculations for Extended Login used in hardware offload got truncated. Fix this by changing definition of exlogin_size to use uint32_t. Link: https://lore.kernel.org/r/20200904045128.23631-7-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit d68930bae477e864e016aeb8d557f099b4636aac Author: Quinn Tran Date: Thu Sep 3 21:51:20 2020 -0700 scsi: qla2xxx: Reduce duplicate code in reporting speed Indicate correct speed for 16G Mezz card. Link: https://lore.kernel.org/r/20200904045128.23631-6-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 3aac0c0fde17d2fdb65c7840bdf057a681f1e035 Author: Arun Easi Date: Thu Sep 3 21:51:19 2020 -0700 scsi: qla2xxx: Honor status qualifier in FCP_RSP per spec FCP-4 (referred FCP-4 rev-2b) identifies the earlier known "retry delay timer" field as "status qualifier", which is described in SAM-5 and later specs. This fix makes appropriate driver side modifications to honor the new definition. The SAM document referred was SAM-6 rev-5. Link: https://lore.kernel.org/r/20200904045128.23631-5-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 27c8aa5e1b069b7629e41bba83b522f99132a6b6 Author: Arun Easi Date: Thu Sep 3 21:51:18 2020 -0700 scsi: qla2xxx: Allow dev_loss_tmo setting for FC-NVMe devices Add a remote port debugfs entry to get/set dev_loss_tmo for NVMe devices. Link: https://lore.kernel.org/r/20200904045128.23631-4-njavali@marvell.com Reported-by: kernel test robot Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 1e98fb0f9208da058e2b6627f9f19fa0a95d05cd Author: Arun Easi Date: Thu Sep 3 21:51:17 2020 -0700 scsi: qla2xxx: Setup debugfs entries for remote ports Create a base for adding remote port related entries in debugfs. Link: https://lore.kernel.org/r/20200904045128.23631-3-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Himanshu Madhani Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit dd8d0bf6fb72bc73dc534d0d222e769e71d2202c Author: Arun Easi Date: Thu Sep 3 21:51:16 2020 -0700 scsi: qla2xxx: Fix I/O failures during remote port toggle testing Driver was using a lower value for dev_loss_tmo making it more prone to I/O failures during remote port toggle testing. Set dev_loss_tmo to zero during remote port registration to allow nvme-fc default dev_loss_tmo to be used, which is higher than what driver was using. Link: https://lore.kernel.org/r/20200904045128.23631-2-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 750cf40c0f7088f36a8a5d102e0488b1ac47faf5 Author: Krzysztof Kozlowski Date: Sun Sep 20 22:26:25 2020 +0200 soc: fsl: qbman: Fix return value on success On error the function was meant to return -ERRNO. This also fixes compile warning: drivers/soc/fsl/qbman/bman.c:640:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] Fixes: 0505d00c8dba ("soc/fsl/qbman: Cleanup buffer pools if BMan was initialized prior to bootup") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Li Yang commit 1fe44191f361a88b0f9600a5bbc8ebf7ede642ce Author: Li Yang Date: Tue Sep 22 17:38:21 2020 -0500 soc: fsl: qman: fix -Wpacked-not-aligned warnings This fixes compile warnings from the -Wpacked-not-aligned option. In file included from ../drivers/crypto/caam/qi.c:12: ../include/soc/fsl/qman.h:259:1: warning: alignment 1 of ‘struct qm_dqrr_entry’ is less than 8 [-Wpacked-not-aligned] } __packed; ^ ../include/soc/fsl/qman.h:292:2: warning: alignment 1 of ‘struct ’ is less than 8 [-Wpacked-not-aligned] } __packed ern; ^ Reported-by: Herbert Xu Signed-off-by: Li Yang commit 1cd0f494103db1936d1f6cd8d64bc9e6d5b38122 Merge: 3e6f73b876ea1 ddfd4ab6bb088 Author: Dave Airlie Date: Wed Sep 23 08:38:08 2020 +1000 Merge tag 'exynos-drm-next-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Two cleanups - Simply use dev_err_probe() instead of returning -EPROBE_DEFER. - Drop drm_parms allocation and deallocation code which aren't needed. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1600763939-20032-1-git-send-email-inki.dae@samsung.com commit 3e6f73b876ea1ec5d4be6f589f6a00127444ab78 Merge: c03156d7d9fee d9f980ebcd01d Author: Dave Airlie Date: Wed Sep 23 08:28:10 2020 +1000 Merge tag 'drm/tegra/for-5.10-rc1' of ssh://git.freedesktop.org/git/tegra/linux into drm-next drm/tegra: Changes for v5.10-rc1 This is a handful of patches that add bridge support for Tegra devices and fix a couple of minor issues. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20200921121245.3953659-1-thierry.reding@gmail.com commit c03156d7d9fee5381e4dce5662c35cd4c95b9ef1 Merge: b40be05ed255d 2a32dbdc2c7db Author: Dave Airlie Date: Wed Sep 23 08:18:47 2020 +1000 Merge tag 'du-next-20200922' of git://linuxtv.org/pinchartl/media into drm-next Miscellaneous R-Car display driver changes: - R8A7742, R8A774E1 and R8A77961 support - Fixes for pitch of YUV planar formats, non-visible plane handling and VSP device reference count - Kconfig fix to avoid displaying disabled options in .config Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20200922111526.GG8290@pendragon.ideasonboard.com commit bf0afe673b999439b6a53c75727821795ccb27e2 Author: Casey Schaufler Date: Tue Sep 22 14:59:31 2020 -0700 Smack: Fix build when NETWORK_SECMARK is not set Use proper conditional compilation for the secmark field in the network skb. Reported-by: kernel test robot Signed-off-by: Casey Schaufler commit 2584e5aef87a921fc4bf23e2d2ea98c5277f0a0f Author: Brian King Date: Wed Sep 16 15:09:59 2020 -0500 scsi: ibmvfc: Protect vhost->task_set increment by the host lock In the discovery thread, ibmvfc does a vhost->task_set++ without any lock held. This could result in two targets getting the same cancel key, which could have strange effects in error recovery. The actual probability of this occurring should be extremely small, since this should all be done in a single threaded loop from the discovery thread, but let's fix it up anyway to be safe. Link: https://lore.kernel.org/r/1600286999-22059-1-git-send-email-brking@linux.vnet.ibm.com Signed-off-by: Brian King Signed-off-by: Martin K. Petersen commit 10e07ca312548f90d5e0fc1d862209285c9a858c Author: Wang Qing Date: Tue Sep 22 19:11:37 2020 +0800 gpu/drm/radeon: fix spelling typo in comments Modify the comment typo: "definately" -> "definitely". Signed-off-by: Wang Qing Signed-off-by: Alex Deucher commit 28d76d48368ca0df9a4fa14e65965d01d42e9d52 Author: Bernard Zhao Date: Mon Sep 21 19:11:03 2020 -0700 drm/amd/display: optimize code runtime a bit In the function dal_ddc_service_query_ddc_data, get rid of dal_ddc_i2c_payloads_destroy, call dal_vector_destruct() directly. This change is to make the code run a bit fast. Signed-off-by: Bernard Zhao Changes since V1: *get rid of dal_ddc_i2c_payloads_destroy, call dal_vector_destruct() directly. Link for V1: *https://lore.kernel.org/patchwork/patch/1309014/ Signed-off-by: Alex Deucher commit f349f772b05cafc5ab551f645e9051bcdae8ec86 Author: Bernard Zhao Date: Tue Sep 22 05:54:18 2020 -0700 drm/amd: fix typoes in comments Change the comment typo: "programm" -> "program". Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit 027f2d27b73cfdf9a56f9821e275fd84d5ecebb8 Author: Bernard Zhao Date: Tue Sep 22 05:40:29 2020 -0700 drm/radeon: fix typoes in comments Change the comment typo: "programm" -> "program". Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit 52ef3a1a6f079727d9c66feedcadd85d4f808549 Author: Ryan Taylor Date: Tue Sep 15 14:16:34 2020 -0700 drm/amdgpu: Add initial kernel documentation for the amd_ip_block_type structure. v3 Added IP block section to amdgpu.rst. Added more documentation to amd_ip_funcs. Created documentation for amd_ip_block_type. v2: Provides a more detailed DOC section on IP blocks v3: Clarifies the IP block list. Adds info on IP block enumeration. Signed-off-by: Ryan Taylor Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 78f0aef11fdee20abfd0deec2e2ae37c72406bde Author: Stanley.Yang Date: Tue Sep 22 16:56:54 2020 +0800 drm/amdgpu: fix hdp register access error mmHDP_READ_CACHE_INVALIDATE register is in HDP not in NBIO Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b362a18ada43c4d69dd5346b96f9c7bb5f61b794 Author: Likun Gao Date: Tue Sep 22 11:10:37 2020 +0800 drm/amd/pm: update driver if file for sienna cichlid Update driver if file for sienna cichlid. Signed-off-by: Likun Gao Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 227e011f37d6eb621457bf9ecbf948f5daee8b12 Author: Evan Quan Date: Mon Sep 21 10:14:06 2020 +0800 drm/amd/pm: drop redundant watermarks bitmap setting As this is already set inside the implementation of smu_set_watermarks_table(). Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d152986c5189ba213d2faf8958e5b4c7a3b78682 Author: Evan Quan Date: Fri Sep 18 16:39:13 2020 +0800 drm/amd/pm: decouple the watermark table setting from socclk/uclk dpms As they have no real dependence. And for Navi1x, the socclk/uclk dpms are enabled after DAL initialization. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b226ef95b6229d5c5a01f2ac220226a92f387587 Author: Evan Quan Date: Fri Sep 18 11:34:17 2020 +0800 drm/amd/pm: correct the pmfw version check for Navi14 Otherwise, that will be always true for Navi14. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3f975d0f71d384825f47c3598d1d5358e40a57f5 Author: Stanley.Yang Date: Tue Sep 15 16:15:05 2020 +0800 drm/amdgpu: update athub interrupt harvesting handle GCEA/MMHUB EA error should not result to DF freeze, this is fixed in next generation, but for some reasons the GCEA/MMHUB EA error will result to DF freeze in previous generation, diver should avoid to indicate GCEA/MMHUB EA error as hw fatal error in kernel message by read GCEA/MMHUB err status registers. Changed from V1: make query_ras_error_status function more general make read mmhub er status register more friendly Changed from V2: move ras error status query function into do_recovery workqueue Changed from V3: remove useless code from V2, print GCEA error status instance number Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d117413f5e1be245b7b3e0cd6afda402609b2572 Author: Sudheesh Mavila Date: Tue Sep 15 12:48:20 2020 +0530 drm/amd/pm: Removed fixed clock in auto mode DPM SMU10_UMD_PSTATE_PEAK_FCLK value should not be used to set the DPM. Suggested-by: Evan Quan Reviewed-by: Evan Quan Signed-off-by: Sudheesh Mavila Signed-off-by: Alex Deucher commit 8d89b96fe79713fc5fc2b8d9c9b9f93842b55695 Author: Evan Quan Date: Thu Jun 18 15:26:08 2020 +0800 drm/amd/powerplay: optimize the mclk dpm policy settings Different mclk dpm policy will be applied based on the VRAM width. Signed-off-by: Evan Quan Signed-off-by: Alex Deucher commit c24a3c0505987bc1e26723a1f1aedc6452b2a281 Author: Liu Shixin Date: Mon Sep 21 16:24:29 2020 +0800 drm/amdgpu/gmc9: simplify the return expression of gmc_v9_0_suspend Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Alex Deucher commit 4a78f15fb6c906c3f8c9330ed4cc0af7a24016c4 Author: Liu Shixin Date: Mon Sep 21 16:24:30 2020 +0800 drm/amd/pm: simplify the return expression of smu_hw_fini Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Alex Deucher commit da51e50d454dbfd92f1426b5674fef5f3e229ab1 Author: Qinglang Miao Date: Mon Sep 21 21:10:13 2020 +0800 drm/amdgpu: simplify the return expression Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Alex Deucher commit d94c8250c6ca97851678b7d87efc24b41ee58dbf Author: Qinglang Miao Date: Mon Sep 21 21:10:11 2020 +0800 drm/amdgpu/mes: simplify the return expression of mes_v10_1_ring_init Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Alex Deucher commit 12dbd1f7578feb51bc95e5a90eb617889cc0b04e Author: Lewis Huang Date: Wed Sep 16 17:13:11 2020 -0400 drm/amd/display: [FIX] update clock under two conditions [Why] Update clock only when non-seamless boot stream exists creates regression on multiple scenerios. [How] Update clock in two conditions 1. Non-seamless boot stream exist. 2. Stream_count = 0 Fixes: 598c13b21e25 ("drm/amd/display: update clock when non-seamless boot stream exist") Signed-off-by: Lewis Huang Reviewed-by: Martin Leung Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher Cc: commit 3c9a7c58ea3d8a9d2f7377db3fdb9d7b4da1d480 Author: Bodo Stroesser Date: Thu Sep 10 17:50:41 2020 +0200 scsi: target: tcmu: Optimize scatter_data_area() scatter_data_area() has two purposes: 1) Create the iovs for the data area buffer of a SCSI cmd. 2) If there is data in DMA_TO_DEVICE direction, copy the data from sg_list to data area buffer. Both are done in a common loop. In case of DMA_FROM_DEVICE data transfer, scatter_data_area() is called with parameter copy_data = false. But this flag is just used to skip memcpy() for data, while radix_tree_lookup still is called for every dbi of the area area buffer, and kmap and kunmap are called for every page from sg_list and data_area as well as flush_dcache_page() for the data area pages. Since the only thing to do with copy_data = false would be to set up the iovs, this is a noticeable overhead. Rework the iov creation in the main loop of scatter_data_area() providing the new function new_block_to_iov(). Based on this, create the short new function tcmu_setup_iovs() that only writes the iovs with no overhead. This new function is now called instead of scatter_data_area() for bidi buffers and for data buffers in those cases where memcpy() would have been skipped. Link: https://lore.kernel.org/r/20200910155041.17654-4-bstroesser@ts.fujitsu.com Acked-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 7e98905e9d0de04f5638a12cef902f7703436e04 Author: Bodo Stroesser Date: Thu Sep 10 17:50:40 2020 +0200 scsi: target: tcmu: Optimize queue_cmd_ring() queue_cmd_ring() needs to check whether there is enough space in cmd ring and data area for the cmd to queue. Currently the sequence is: 1) Calculate size the cmd will occupy on the ring based on estimation of needed iovs. 2) Check whether there is enough space on the ring based on size from 1) 3) Allocate buffers in data area. 4) Calculate number of iovs the command really needs while copying incoming data (if any) to data area. 5) Re-calculate real size of cmd on ring based on real number of iovs. 6) Set up possible padding and cmd on the ring. Step 1) must not underestimate the cmd size so use max possible number of iovs for the given I/O data size. The resulting overestimation can be really high so this sequence is not ideal. The earliest the real number of iovs can be calculated is after data buffer allocation. Therefore rework the code to implement the following sequence: A) Allocate buffers on data area and calculate number of necessary iovs during this. B) Calculate real size of cmd on ring based on number of iovs. C) Check whether there is enough space on the ring. D) Set up possible padding and cmd on the ring. The new sequence enforces the split of new function tcmu_alloc_data_space() from is_ring_space_avail(). Using this function, change queue_cmd_ring() according to the new sequence. Change routines called by tcmu_alloc_data_space() to allow calculating and returning the iov count. Remove counting of iovs in scatter_data_area(). Link: https://lore.kernel.org/r/20200910155041.17654-3-bstroesser@ts.fujitsu.com Acked-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 52ef2743f16cca9884a9dfd3a8bb013b8e136e4a Author: Bodo Stroesser Date: Thu Sep 10 17:50:39 2020 +0200 scsi: target: tcmu: Join tcmu_cmd_get_data_length() and tcmu_cmd_get_block_cnt() Simplify code by joining tcmu_cmd_get_data_length() and tcmu_cmd_get_block_cnt() into tcmu_cmd_set_block_cnts(). The new function sets tcmu_cmd->dbi_cnt and also the new field tcmu_cmd->dbi_bidi_cnt which is needed for further enhancements in following patches. Simplify some code by using tcmu_cmd->dbi(_bidi)_cnt instead of calculation from length. Please note: The calculation of the number of dbis needed for bidi was wrong. It was based on the length of the first bidi sg only. I changed it to correctly sum up entire length of all bidi sgs. Link: https://lore.kernel.org/r/20200910155041.17654-2-bstroesser@ts.fujitsu.com Acked-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 6045124ebe722434bb52e89881c5fa41911c24f0 Author: Tero Kristo Date: Mon Sep 7 11:26:00 2020 +0300 clk: ti: dra7: add missing clkctrl register for SHA2 instance DRA7 SoC has two SHA instances. Add the clkctrl entry for the second one. Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20200907082600.454-4-t-kristo@ti.com Signed-off-by: Stephen Boyd commit b7a7943fe291b983b104bcbd2f16e8e896f56590 Author: Tero Kristo Date: Mon Sep 7 11:25:59 2020 +0300 clk: ti: clockdomain: fix static checker warning Fix a memory leak induced by not calling clk_put after doing of_clk_get. Reported-by: Dan Murphy Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20200907082600.454-3-t-kristo@ti.com Signed-off-by: Stephen Boyd commit cec4a609a88823084bf09cb2cdacda63a363593a Author: Tero Kristo Date: Mon Sep 7 11:25:58 2020 +0300 clk: ti: autoidle: add checks against NULL pointer reference The clk pointer passed to omap2_clk_(deny|allow)_idle can be NULL, so add checks for this. Reported-by: Dan Murphy Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20200907082600.454-2-t-kristo@ti.com Signed-off-by: Stephen Boyd commit 4630ef134e41389a7170b05790c0ddcd88977b01 Author: Tero Kristo Date: Mon Sep 7 11:57:40 2020 +0300 clk: keystone: sci-clk: add 10% slack to set_rate Currently, we request exact clock rates from the firmware to be set with set_rate. Due to some rounding errors and internal functionality of the firmware itself, this can fail. Thus, add some slack to the set_rate functionality so that we are always guaranteed to pass. The firmware always attempts to use frequency as close to the target freq as possible despite the slack given here. Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20200907085740.1083-4-t-kristo@ti.com Acked-by: Santosh Shilimkar Signed-off-by: Stephen Boyd commit d3f3f499cb335eba84788a9456f7d6f92a069bbe Author: Tero Kristo Date: Mon Sep 7 11:57:39 2020 +0300 clk: keystone: sci-clk: cache results of last query rate operation Cache results of the latest query rate operation. This optimizes the firmware interface a bit, avoiding unnecessary calls to firmware if we know the result already; the firmware interface is pretty expensive to use for query rate functionality. Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20200907085740.1083-3-t-kristo@ti.com Acked-by: Santosh Shilimkar Signed-off-by: Stephen Boyd commit 2f05cced7307489faab873367fb20cd212e1d890 Author: Tero Kristo Date: Mon Sep 7 11:57:38 2020 +0300 clk: keystone: sci-clk: fix parsing assigned-clock data during probe The DT clock probe loop incorrectly terminates after processing "clocks" only, fix this by re-starting the loop when all entries for current DT property have been parsed. Fixes: 8e48b33f9def ("clk: keystone: sci-clk: probe clocks from DT instead of firmware") Reported-by: Peter Ujfalusi Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20200907085740.1083-2-t-kristo@ti.com Acked-by: Santosh Shilimkar Signed-off-by: Stephen Boyd commit a2618360abd7dfebe18862860fcc44787874528e Author: Zou Wei Date: Tue Sep 22 15:51:05 2020 +0800 clk: mediatek: fix platform_no_drv_owner.cocci warnings ./drivers/clk/mediatek/clk-mt6765.c:912: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: 1aca9939bf72 ("clk: mediatek: Add MT6765 clock support") Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1600761065-71353-1-git-send-email-zou_wei@huawei.com Signed-off-by: Stephen Boyd commit b37c1e673ec550d4b5ce03d20b32076bf7b520c4 Author: Liu Shixin Date: Mon Sep 21 16:24:26 2020 +0800 clk: mediatek: mt7629: simplify the return expression of mtk_infrasys_init Simplify the return expression. Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20200921082426.2591042-1-liushixin2@huawei.com Signed-off-by: Stephen Boyd commit eff8a85acfb4790b97a5ee2fa6271c02f91662a3 Author: Liu Shixin Date: Mon Sep 21 16:24:25 2020 +0800 clk: mediatek: mt6797: simplify the return expression of mtk_infrasys_init Simplify the return expression. Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20200921082425.2590990-1-liushixin2@huawei.com Signed-off-by: Stephen Boyd commit b10f22493512585b329fd1ed436f9c310aaf36ce Author: YueHaibing Date: Tue Sep 15 10:09:50 2020 +0800 clk: socfpga: agilex: Remove unused variable 'cntr_mux' drivers/clk/socfpga/clk-agilex.c:24:37: warning: ‘cntr_mux’ defined but not used [-Wunused-const-variable=] static const struct clk_parent_data cntr_mux[] = { ^~~~~~~~ There is no caller in tree, so can remove it. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200915020950.4688-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit 84afc9ecf4e4f51ccf9ca3ab2da49a519b0eadcc Author: Krzysztof Kozlowski Date: Wed Sep 16 18:17:39 2020 +0200 clk: si5341: drop unused 'err' variable 'err' is assigned but never read: /drivers/clk/clk-si5341.c: In function ‘si5341_output_get_parent’: drivers/clk/clk-si5341.c:886:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200916161740.14173-5-krzk@kernel.org Signed-off-by: Stephen Boyd commit f5e75b4aaec42c66b18fdfa96b4041e8af4e7b31 Author: Krzysztof Kozlowski Date: Wed Sep 16 18:17:38 2020 +0200 clk: mmp: pxa1928: drop unused 'clk' variable 'clk' is assigned but never read: drivers/clk/mmp/clk-of-pxa1928.c: In function ‘pxa1928_pll_init’: drivers/clk/mmp/clk-of-pxa1928.c:71:14: warning: variable ‘clk’ set but not used [-Wunused-but-set-variable] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200916161740.14173-4-krzk@kernel.org Signed-off-by: Stephen Boyd commit 425c23d382abb028629222c3cce5a7ea7e858618 Author: Krzysztof Kozlowski Date: Wed Sep 16 18:17:35 2020 +0200 clk: at91: drop unused at91sam9g45_pcr_layout The at91sam9g45_pcr_layout is not used so drop it to fix build warning: drivers/clk/at91/at91sam9g45.c:49:36: warning: 'at91sam9g45_pcr_layout' defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200916161740.14173-1-krzk@kernel.org Signed-off-by: Stephen Boyd commit faeda014b49ece0a175215ae41f4c38786386ca0 Author: Krzysztof Kozlowski Date: Wed Sep 16 18:17:37 2020 +0200 clk: davinci: add missing kerneldoc Add missing kerneldoc to fix compile warning: drivers/clk/davinci/da8xx-cfgchip.c:578: warning: Function parameter or member 'dev' not described in 'da8xx_cfgchip_register_usb1_clk48' Signed-off-by: Krzysztof Kozlowski Reviewed-by: David Lechner Link: https://lore.kernel.org/r/20200916161740.14173-3-krzk@kernel.org Signed-off-by: Stephen Boyd commit 52ba4fa40fb314e4d342d0f2b09c3fa525b0ad5b Author: Krzysztof Kozlowski Date: Wed Sep 16 18:17:36 2020 +0200 clk: fixed: add missing kerneldoc Add missing kerneldoc to fix compile warnings like: drivers/clk/clk-fixed-factor.c:211: warning: Function parameter or member 'node' not described in 'of_fixed_factor_clk_setup' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200916161740.14173-2-krzk@kernel.org Signed-off-by: Stephen Boyd commit 533852d71840a5f8b0cfa6ad8027e6493ea0cc7b Author: Krzysztof Kozlowski Date: Mon Sep 21 22:35:57 2020 +0200 clk: s2mps11: initialize driver via module_platform_driver The driver was using subsys_initcall() because in old times deferred probe was not supported everywhere and specific ordering was needed. Since probe deferral works fine and specific ordering is discouraged (hides dependencies between drivers and couples their boot order), the driver can be converted to regular module_platform_driver. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200921203558.19554-1-krzk@kernel.org Tested-by: Marek Szyprowski Signed-off-by: Stephen Boyd commit 4ceb4b6bd286cef772061353b03e901bd7dd7a12 Author: Hoegeun Kwon Date: Tue Sep 1 13:07:56 2020 +0900 clk: bcm: rpi: Add register to control pixel bvb clk To use QHD or higher, we need to modify the pixel_bvb_clk value. So add register to control this clock. Signed-off-by: Hoegeun Kwon Link: https://lore.kernel.org/r/20200901040759.29992-2-hoegeun.kwon@samsung.com Reviewed-by: Maxime Ripard Acked-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Signed-off-by: Stephen Boyd commit 553be99d1fe93ef34b2521991ec3122f918d0dd3 Merge: 9123e3a74ec7b ff8e0ff9b9964 Author: Stephen Boyd Date: Tue Sep 22 12:23:34 2020 -0700 Merge tag 'clk-v5.10-samsung' of https://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-samsung Pull Samsung clk driver updates from Sylwester Nawrocki: Minor refactoring removing most of the __clk_lookup() calls. * tag 'clk-v5.10-samsung' of https://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk: clk: samsung: Use cached clk_hws instead of __clk_lookup() calls clk: samsung: exynos5420/5250: Add IDs to the CPU parent clk definitions clk: samsung: Add clk ID definitions for the CPU parent clocks clk: samsung: exynos5420: Avoid __clk_lookup() calls when enabling clocks clk: samsung: exynos5420: Add definition of clock ID for mout_sw_aclk_g3d clk: samsung: Keep top BPLL mux on Exynos542x enabled commit db2a28ef95bfdfc19554e3a09310cdaf9af61be6 Merge: 9123e3a74ec7b 805837740d014 Author: Stephen Boyd Date: Tue Sep 22 12:18:57 2020 -0700 Merge tag 'clk-imx-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-imx Pull i.MX clk driver updates from Shawn Guo: - A series from Anson Huang to support building i.MX ARMv8 platforms clock driver as module - Remove i.MX21 clock driver, as i.MX21 platform support is being dropped - A couple of minor imx8mp clock correction from Jacky Bai - Add clock for CRC block found on vf610 SoC - A couple of clock flag fix-up from Peng Fan - Minor kerneldoc fix-up for i.MX clock drivers * tag 'clk-imx-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: clk: imx: imx21: Remove clock driver clk: imx: gate2: Fix a few typos clk: imx: Fix and update kerneldoc clk: imx: fix i.MX7D peripheral clk mux flags clk: imx: fix composite peripheral flags clk: imx: Correct the memrepair clock on imx8mp clk: imx: Correct the root clk of media ldb on imx8mp clk: imx: vf610: Add CRC clock clk: imx: Explicitly include bits.h clk: imx8qxp: Support building i.MX8QXP clock driver as module clk: imx8m: Support module build clk: imx: Add clock configuration for ARMv7 platforms clk: imx: Support building i.MX common clock driver as module clk: composite: Export clk_hw_register_composite() clk: imx6sl: Use BIT(x) to avoid shifting signed 32-bit value by 31 bits commit d46e5a39f9be9288f1ce2170c4c7f8098f4e7f68 Author: Konrad Dybcio Date: Tue Sep 22 14:09:09 2020 +0200 clk: qcom: gcc-sdm660: Fix wrong parent_map This was likely overlooked while porting the driver upstream. Reported-by: Pavel Dubrova Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200922120909.97203-1-konradybcio@gmail.com Fixes: f2a76a2955c0 ("clk: qcom: Add Global Clock controller (GCC) driver for SDM660") Signed-off-by: Stephen Boyd commit 355a7d754b92373cd4254f72d4b4c7d95bba4a26 Author: Stephen Boyd Date: Wed Sep 16 16:12:01 2020 -0700 clk: qcom: dispcc: Update DP clk ops for phy design The clk_rcg2_dp_determine_rate() function is used for the DP pixel clk. This function should return the rate that can be achieved by the pixel clk in 'struct clk_rate_request::rate' and match the logic similar to what is seen in clk_rcg2_dp_set_rate(). But that isn't the case. Instead the code merely bubbles the rate request up to the parent of the pixel clk and doesn't try to do a rational approximation of the rate that would be achieved by picking some m/n value for the RCG. Let's change this logic so that we can assume the parent clk frequency is fixed (it is because it's the VCO of the DP PLL that is configured based on the link rate) and so that we can calculate what the m/n value will be and adjust the req->rate appropriately. Cc: Jeykumar Sankaran Cc: Chandan Uddaraju Cc: Vara Reddy Cc: Tanmay Shah Cc: Bjorn Andersson Cc: Manu Gautam Cc: Sandeep Maheswaram Cc: Douglas Anderson Cc: Sean Paul Cc: Stephen Boyd Cc: Jonathan Marek Cc: Dmitry Baryshkov Cc: Rob Clark Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200916231202.3637932-10-swboyd@chromium.org Signed-off-by: Stephen Boyd commit 34e4c3cac6ffe9d20ae321083b519128feadb771 Author: Jason Yan Date: Fri Sep 11 09:37:22 2020 +0800 clk: qcom: gcc-msm8939: remove defined but not used variables This addresses the following gcc warning with "make W=1": drivers/clk/qcom/gcc-msm8939.c:610:32: warning: ‘gcc_xo_gpll6_gpll0a_map’ defined but not used [-Wunused-const-variable=] static const struct parent_map gcc_xo_gpll6_gpll0a_map[] = { ^~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/qcom/gcc-msm8939.c:598:32: warning: ‘gcc_xo_gpll6_gpll0_map’ defined but not used [-Wunused-const-variable=] static const struct parent_map gcc_xo_gpll6_gpll0_map[] = { ^~~~~~~~~~~~~~~~~~~~~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20200911013722.1459387-1-yanaijie@huawei.com Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit a9e545ac63c25ab84e7a546008585685dbbf994f Author: Jason Yan Date: Mon Sep 21 22:27:50 2020 +0800 clk: qcom: ipq8074: make pcie0_rchng_clk_src static This addresses the following sparse warning: drivers/clk/qcom/gcc-ipq8074.c:4325:17: warning: symbol 'pcie0_rchng_clk_src' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20200921142750.875142-1-yanaijie@huawei.com Signed-off-by: Stephen Boyd commit bf23e1cd46d6a3277aad5921e14eac40bf32b90a Author: Kevin Hilman Date: Fri Sep 18 13:16:33 2020 -0700 MAINTAINERS: drop myself from PM AVS drivers I haven't had the time or the expertise to adequately review and maintain these drivers for awhile, so make it official. Signed-off-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki commit 3de066f8f86bf3bc4921153ea952a60a11d9d94e Merge: 1c0f68252a6a8 7d6e1329652ed eac7cc21c4e49 515ecd5368f15 2c5af98592f65 Author: Alex Williamson Date: Tue Sep 22 10:56:51 2020 -0600 Merge branches 'v5.10/vfio/bardirty', 'v5.10/vfio/dma_avail', 'v5.10/vfio/misc', 'v5.10/vfio/no-cmd-mem' and 'v5.10/vfio/yan_zhao_fixes' into v5.10/vfio/next commit 2c5af98592f65517170c7bcc714566590d3f7397 Author: Yan Zhao Date: Wed Sep 16 10:30:05 2020 +0800 vfio/type1: fix dirty bitmap calculation in vfio_dma_rw The count of dirtied pages is not only determined by count of copied pages, but also by the start offset. e.g. if offset = PAGE_SIZE - 1, and *copied=2, the dirty pages count is 2, instead of 1 or 0. Fixes: d6a4c185660c ("vfio iommu: Implementation of ioctl for dirty pages tracking") Signed-off-by: Yan Zhao Signed-off-by: Alex Williamson commit 28b130244061863cf0437b7af1625fb45ec1a71e Author: Yan Zhao Date: Wed Sep 16 10:29:27 2020 +0800 vfio: fix a missed vfio group put in vfio_pin_pages When error occurs, need to put vfio group after a successful get. Fixes: 95fc87b44104 ("vfio: Selective dirty page tracking if IOMMU backed device pins pages") Signed-off-by: Yan Zhao Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit 26ed5146bd17cbcd0fb84e358902ac244728a3f3 Author: Dan Carpenter Date: Fri Sep 18 17:34:05 2020 +0300 misc: hisi_hikey_usb: delete a stray tab This return statement is indented one tab too far. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200918143405.GF909725@mwanda Signed-off-by: Greg Kroah-Hartman commit a81072a9c0ae734b7889929b0bc070fe3f353f0e Author: Souptick Joarder Date: Sun Sep 20 08:21:35 2020 +0530 misc: mic: scif: Fix error handling path Inside __scif_pin_pages(), when map_flags != SCIF_MAP_KERNEL it will call pin_user_pages_fast() to map nr_pages. However, pin_user_pages_fast() might fail with a return value -ERRNO. The return value is stored in pinned_pages->nr_pages. which in turn is passed to unpin_user_pages(), which expects pinned_pages->nr_pages >=0, else disaster. Fix this by assigning pinned_pages->nr_pages to 0 if pin_user_pages_fast() returns -ERRNO. Fixes: ba612aa8b487 ("misc: mic: SCIF memory registration and unregistration") Cc: John Hubbard Cc: Ira Weiny Cc: Dan Carpenter Reviewed-by: John Hubbard Signed-off-by: Souptick Joarder Link: https://lore.kernel.org/r/1600570295-29546-1-git-send-email-jrdr.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit a2e7408cf8fc7790a219a8b4a617fd2c91f8bf15 Author: Wang ShaoBo Date: Fri Sep 18 16:36:34 2020 +0800 misc: pvpanic: Use devm_platform_ioremap_resource() Make use of devm_platform_ioremap_resource() provided by driver core platform instead of duplicated analogue. Acked-by: Arnd Bergmann Signed-off-by: Wang ShaoBo Link: https://lore.kernel.org/r/20200918083634.33124-1-bobo.shaobowang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 515ecd5368f1510152fa4f9b9ce55b66ac56c334 Author: Matthew Rosato Date: Thu Sep 10 10:59:57 2020 -0400 vfio/pci: Decouple PCI_COMMAND_MEMORY bit checks from is_virtfn While it is true that devices with is_virtfn=1 will have a Memory Space Enable bit that is hard-wired to 0, this is not the only case where we see this behavior -- For example some bare-metal hypervisors lack Memory Space Enable bit emulation for devices not setting is_virtfn (s390). Fix this by instead checking for the newly-added no_command_memory bit which directly denotes the need for PCI_COMMAND_MEMORY emulation in vfio. Fixes: abafbc551fdd ("vfio-pci: Invalidate mmaps and block MMIO access on disabled memory") Signed-off-by: Matthew Rosato Reviewed-by: Niklas Schnelle Reviewed-by: Pierre Morel Signed-off-by: Alex Williamson commit 08b6e22b850c28b6032da1e4d767a33116e23dfb Author: Matthew Rosato Date: Thu Sep 10 10:59:56 2020 -0400 s390/pci: Mark all VFs as not implementing PCI_COMMAND_MEMORY For s390 we can have VFs that are passed-through without the associated PF. Firmware provides an emulation layer to allow these devices to operate independently, but is missing emulation of the Memory Space Enable bit. For these as well as linked VFs, set no_command_memory which specifies these devices do not implement PCI_COMMAND_MEMORY. Fixes: abafbc551fdd ("vfio-pci: Invalidate mmaps and block MMIO access on disabled memory") Signed-off-by: Matthew Rosato Reviewed-by: Niklas Schnelle Reviewed-by: Pierre Morel Signed-off-by: Alex Williamson commit d110162cafc80dad0622cfd40f3113aebb77e1bb Author: Leo Yan Date: Mon Sep 14 19:53:09 2020 +0800 perf tsc: Support cap_user_time_short for event TIME_CONV The synthesized event TIME_CONV doesn't contain the complete parameters for counters, this will lead to wrong conversion between counter cycles and timestamp. This patch extends event TIME_CONV to record flags 'cap_user_time_zero' which is used to indicate the counter parameters are valid or not, if not will directly return 0 for timestamp calculation. And record the flag 'cap_user_time_short' and its relevant fields 'time_cycles' and 'time_mask' for cycle calibration. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Gustavo A. R. Silva Cc: Ian Rogers Cc: Jiri Olsa Cc: John Garry Cc: Kemeng Shi Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Nick Gasson Cc: Peter Zijlstra Cc: Remi Bernon Cc: Stephane Eranian Cc: Steve Maclean Cc: Will Deacon Cc: Zou Wei Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20200914115311.2201-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 78a93d4cec6bc7c6011319d2b8f6509d96de186f Author: Leo Yan Date: Mon Sep 14 19:53:08 2020 +0800 perf tsc: Calculate timestamp with cap_user_time_short The perf mmap'ed buffer contains the flag 'cap_user_time_short' and two extra fields 'time_cycles' and 'time_mask', perf tool needs to know them for handling the counter wrapping case. This patch is to reads out the relevant parameters from the head of the first mmap'ed page and stores into the structure 'perf_tsc_conversion', if the flag 'cap_user_time_short' has been set, it will firstly calibrate cycle value for timestamp calculation. Committer testing: Before/after: # perf test tsc 70: Convert perf time to TSC : Ok # # perf test -v tsc 70: Convert perf time to TSC : --- start --- test child forked, pid 11059 mmap size 528384B 1st event perf time 996384576521 tsc 3850532906613 rdtsc time 996384578455 tsc 3850532913950 2nd event perf time 996384578845 tsc 3850532915428 test child finished with 0 ---- end ---- Convert perf time to TSC: Ok # Signed-off-by: Leo Yan Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Gustavo A. R. Silva Cc: Ian Rogers Cc: Jiri Olsa Cc: John Garry Cc: Kemeng Shi Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Nick Gasson Cc: Peter Zijlstra Cc: Remi Bernon Cc: Stephane Eranian Cc: Steve Maclean Cc: Will Deacon Cc: Zou Wei Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20200914115311.2201-4-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 4979e861415d59a479c7376e16d90df83da94bb1 Author: Leo Yan Date: Mon Sep 14 19:53:07 2020 +0800 perf tsc: Add rdtsc() for Arm64 The system register CNTVCT_EL0 can be used to retrieve the counter from user space. Add rdtsc() for Arm64. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Gustavo A. R. Silva Cc: Ian Rogers Cc: Jiri Olsa Cc: John Garry Cc: Kemeng Shi Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Nick Gasson Cc: Peter Zijlstra Cc: Remi Bernon Cc: Stephane Eranian Cc: Steve Maclean Cc: Will Deacon Cc: Zou Wei Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20200914115311.2201-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 03fca3af51703bd77ed14c88c3d5733840a69f3f Author: Leo Yan Date: Mon Sep 14 19:53:06 2020 +0800 perf tsc: Move out common functions from x86 Functions perf_read_tsc_conversion() and perf_event__synth_time_conv() should work as common functions rather than x86 specific, so move these two functions out from arch/x86 folder and place them into util/tsc.c. Since the function perf_event__synth_time_conv() will be linked in util/tsc.c, remove its weak version. Committer testing: Before/after: # perf test tsc 70: Convert perf time to TSC : Ok # # perf test -v tsc 70: Convert perf time to TSC : --- start --- test child forked, pid 8520 mmap size 528384B 1st event perf time 592110439891 tsc 2317172044331 rdtsc time 592110441915 tsc 2317172052010 2nd event perf time 592110442336 tsc 2317172053605 test child finished with 0 ---- end ---- Convert perf time to TSC: Ok # Signed-off-by: Leo Yan Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Gustavo A. R. Silva Cc: Ian Rogers Cc: Jiri Olsa Cc: John Garry Cc: Kemeng Shi Cc: linux-arm-kernel@lists.infradead.org Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Nick Gasson Cc: Peter Zijlstra Cc: Remi Bernon Cc: Stephane Eranian Cc: Steve Maclean Cc: Will Deacon Cc: Zou Wei Link: http://lore.kernel.org/lkml/20200914115311.2201-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 9e072793106e9e6d276eebd8a0b122c27303455a Merge: e82ed736ad2d2 f279e5cd95058 Author: Greg Kroah-Hartman Date: Tue Sep 22 18:38:09 2020 +0200 Merge tag 'misc-habanalabs-next-2020-09-22' of git://people.freedesktop.org/~gabbayo/linux into char-misc-next Oded writes: This tag contains the following changes for kernel 5.10-rc1: - Stop using the DRM's dma-fence module and instead use kernel completions. - Support PCIe AER - Use dma_mmap_coherent for memory allocated using dma_alloc_coherent - Use smallest possible alignment when allocating virtual addresses in our MMU driver. - Refactor MMU driver code to be device-oriented - Allow user to check CS status without any sleep - Add an option to map a Command Buffer to the Device's MMU - Expose sync manager resource allocation to user through INFO IOCTL - Convert code to use standard BIT(), GENMASK() and FIELD_PREP() - Many small fixes (casting, better error messages, remove unused defines, h/w configuration fixes, etc.) * tag 'misc-habanalabs-next-2020-09-22' of git://people.freedesktop.org/~gabbayo/linux: (46 commits) habanalabs: update scratchpad register map habanalabs: add indication of security-enabled F/W habanalabs/gaudi: fix DMA completions max outstanding to 15 habanalabs/gaudi: remove axi drain support habanalabs: update firmware interface file habanalabs: Add an option to map CB to device MMU habanalabs: Save context in a command buffer object habanalabs: no need for DMA_SHARED_BUFFER habanalabs: allow to wait on CS without sleep habanalabs/gaudi: increase timeout for boot fit load habanalabs: add debugfs support for MMU with 6 HOPs habanalabs: add num_hops to hl_mmu_properties habanalabs: refactor MMU as device-oriented habanalabs: rename mmu.c to mmu_v1.c habanalabs: use smallest possible alignment for virtual addresses habanalabs: check flag before reset because of f/w event habanalabs: increase PQ COMP_OFFSET by one nibble habanalabs: Fix alignment issue in cpucp_info structure habanalabs: remove unused define habanalabs: remove unused ASIC function pointer ... commit 3a83d33e18f3f61657528ae017581a4d697a88cd Author: Aric Cyr Date: Mon Sep 14 11:40:19 2020 -0400 drm/amd/display: 3.2.104 Signed-off-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 3b37260be5d7686ca87d69eff1faf3e0acb384c2 Author: Anthony Koo Date: Sun Sep 13 16:41:57 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.34 [Header Changes] - Add new SCRATCH0 status bits for detecting restore state Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit fb0fe920469ac52acc315069ca9a3aa56ebd5395 Author: Chris Park Date: Sat Sep 12 13:06:59 2020 -0400 drm/amd/display: TMDS Fallback transition [Why] HDMI requires fallback to TMDS by redetection in order to switch PHY settings. This avoids black out when link training fail during mode setting, link quality update, disable driver sequence. [How] Allow driver to redetect HDMI displays based on retraining or fallback mechanism. Signed-off-by: Chris Park Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 99d1437aa0ac1f598e9aabca8bf0e8a40c38f8a1 Author: Taimur Hassan Date: Thu Sep 10 10:13:42 2020 -0400 drm/amd/display: Check for flip pending before locking pipes. [Why] When running a game/benchmark with v-sync disabled, disabling a plane (which is v-sync) can cause an underflow. This is due to flips that are pending before pipe locking being applied after locks are released and pipes have been re-arranged or disconnected. This can potentially apply a flip on the incorrect pipe. [How] Check that any pending flips are cleared before locking any pipes to ensure flips are applied on the correct pipes. Signed-off-by: Taimur Hassan Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit a9edc81564c92b4d86670b722bbe8906e0dfd934 Author: Wyatt Wood Date: Thu Sep 10 21:50:52 2020 -0400 drm/amd/display: Implement PSR wait for enable/disable [Why] For DMUB implementation of PSR, the 'wait' parameter, used to determine if driver should wait for PSR enable/disable, is not implemented correctly. [How] Implement wait for PSR enable/disable. Signed-off-by: Wyatt Wood Reviewed-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit b50d55517da2c79cb9045bc175bcbf99098a0e28 Author: Wenjing Liu Date: Thu Sep 10 14:11:37 2020 -0400 drm/amd/display: allow DP RX to use more cr aux rd interval delay [why] Regression is caused by previous change with attempt to correct the extended cr aux rd interval delay due to mis interpretation of the DP specs. The change turns out not working well with certain RXs. So we decided to keep the cr aux rd interval logic as before. Signed-off-by: Wenjing Liu Reviewed-by: George Shen Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit f43dc909aa7f4516b5eaccbc8608d9bbe450f43e Author: Gary Li Date: Thu Sep 10 14:32:13 2020 -0400 drm/amd/display: Enable DP YCbCr420 mode support for DCN10 [WHY] In DCN10 when a panel with YCbCr420 capability is connected via USB-C to HDMI active dongle, no YCbCr420 option is listed in Radeon settings. [HOW] Enable DP YCbCr420 mode support for DCN10 Signed-off-by: Gary Li Reviewed-by: Eric Yang Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 37b7cb10f07c1174522faafc1d51c6591b1501d4 Author: Wesley Chalmers Date: Wed Sep 9 17:41:53 2020 -0400 drm/amd/display: Increase timeout for DP Disable [WHY] When disabling DP video, the current REG_WAIT timeout of 50ms is too low for certain cases with very high VSYNC intervals. [HOW] Increase the timeout to 102ms, so that refresh rates as low as 10Hz can be handled properly. Signed-off-by: Wesley Chalmers Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher Cc: commit 25b315817216eaac93ca880d736b359ababae61a Author: Wesley Chalmers Date: Tue Sep 8 16:22:25 2020 -0400 drm/amd/display: Fix ODM policy implementation [WHY] Only the leftmost ODM pipe should be offset when scaling. A previous code change was intended to implement this policy, but a section of code was overlooked. Signed-off-by: Wesley Chalmers Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher Cc: commit 099303e9a9bd77f66a1f7a8b3f447c572b532796 Author: Peikang Zhang Date: Tue Sep 8 11:27:25 2020 -0400 drm/amd/display: eDP intermittent black screen during PnP [Why] We dont's turn off backlight before power off eDP (VDD), which is a violation of eDP specs. [How] Power off eDP backlight before power off eDP Signed-off-by: Peikang Zhang Reviewed-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit cbf229bbcb7fcc5f4f75f64eee7e224aa1b31ad2 Author: Peikang Zhang Date: Thu Sep 3 13:45:07 2020 -0400 drm/amd/display: Bug in dce_is_panel_backlight_on() [Why] dce_is_panel_backlight_on() will return wrong value if LVTMA_BLON_OVRD is 0 [How] When LVTMA_BLON_OVRD is 0, read LVTMA_PWRSEQ_TARGET_STATE instead Signed-off-by: Peikang Zhang Reviewed-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit c15bc8d285fe052bc3a30ae5ea0919c3101981ef Author: Aric Cyr Date: Tue Sep 8 10:35:37 2020 -0400 drm/amd/display: 3.2.103 Signed-off-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit e4b37eec1767468a14b7418a41a857a5b6eca66d Author: Anthony Koo Date: Mon Sep 7 13:01:02 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.33 Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 651111be24aa4c8b62c10f6fff51d9ad82411249 Author: David Galiffi Date: Thu Sep 3 19:20:36 2020 -0400 drm/amd/display: Fix incorrect backlight register offset for DCN [Why] Typo in backlight refactor introduced wrong register offset. [How] SR(BIOS_SCRATCH_2) to NBIO_SR(BIOS_SCRATCH_2). Signed-off-by: David Galiffi Reviewed-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher Cc: commit d0e63b343e575e8b74c185565b0d79a93494bcaa Author: Kent Russell Date: Fri Sep 18 14:47:47 2020 -0400 drm/amdkfd: Use kvmalloc instead of kmalloc for VCRAT Since we're dynamically allocating the CPU VCRAT, use kvmalloc in case the allocation size is huge. Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e8f58ee143edff15894b132d86797fe06891ddd0 Author: Philip Cox Date: Mon Sep 21 06:45:45 2020 -0400 drm/amdkfd: Fix kfd init stack dump amdkfd is dumping a stack during initialization. kfd_procfs_add_sysfs_stats is being called twice. This removes one of them. Fixes: 4327bed2ff8e3d ("drm/amdkfd: Add process eviction counters to sysfs") Reviewed-by: Kent Russell Signed-off-by: Philip Cox Signed-off-by: Alex Deucher commit 36499e4c776ad2e51bb6d0075acdfba9f728b8c2 Author: Emily.Deng Date: Mon Sep 14 17:57:01 2020 +0800 drm/amdgpu: Fix dead lock issue for vblank Always start vblank timer, but only calls vblank function when vblank is enabled. This is used to fix the dead lock issue. When drm_crtc_vblank_off want to disable vblank, it first get event_lock, and then call hrtimer_cancel, but hrtimer_cancel want to wait timer handler function finished. Timer handler also want to aquire event_lock in drm_handle_vblank. Signed-off-by: Emily.Deng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9de9a54aba76ae6b3eb5da221114619977872ec6 Author: Shirish S Date: Thu Sep 17 14:07:32 2020 +0530 drm/amd/display: fix crash/reboot while accessing sysfs files read/writes to aux_dpcd_* sysfs entries leads to system reboot or hang. Hence fix the handling of input data and reporting of errors appropriately to the user space. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 59d7115dae02c9eea9f44e5a0081e8a62a13b12c Author: Mukul Joshi Date: Fri Sep 18 16:45:45 2020 -0400 drm/amdkfd: Move process doorbell allocation into kfd device Move doorbell allocation for a process into kfd device and allocate doorbell space in each PDD during process creation. Currently, KFD manages its own doorbell space but for some devices, amdgpu would allocate the complete doorbell space instead of leaving a chunk of doorbell space for KFD to manage. In a system with mix of such devices, KFD would need to request process doorbell space based on the type of device, either from amdgpu or from its own doorbell space. Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b7b6c38529c9ea8ebab287d84f27fca2472a5737 Author: Kent Russell Date: Fri Sep 18 07:42:57 2020 -0400 drm/amdkfd: Calculate CPU VCRAT size dynamically (v2) Instead of guessing at a sufficient size for the CPU VCRAT, base the size on the number of online NUMA nodes. v2: fix warning Signed-off-by: Kent Russell Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 900ffe39fec908e0aa26a30612e43ebc7140db79 Author: Kees Cook Date: Sat Sep 19 01:09:36 2020 -0700 x86/entry: Fix typo in comments for syscall_enter_from_user_mode() Just to help myself and others with finding the correct function names, fix a typo for "usermode" vs "user_mode". Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200919080936.259819-1-keescook@chromium.org commit c7651b73586600ddf483de51806eada02cb1616e Author: Felix Kuehling Date: Wed Sep 16 21:19:34 2020 -0400 drm/amdgpu: Fix handling of KFD initialization failures Remember KFD module initializaton status in a global variable. Skip KFD device probing when the module was not initialized. Other amdgpu_amdkfd calls are then protected by the adev->kfd.dev check. Also print a clear error message when KFD disables itself. Amdgpu continues its initialization even when KFD failed. Signed-off-by: Felix Kuehling Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit 3ffe2e7318ba705b8e0060d4696cafc75170e819 Author: Liu Shixin Date: Tue Sep 15 11:26:29 2020 +0800 PM: AVS: qcom-cpr: simplify the return expression of cpr_disable() Simplify the return expression. Signed-off-by: Liu Shixin Reviewed-by: Bjorn Andersson Acked-by: Kevin Hilman [ rjw: Minor subject edits ] Signed-off-by: Rafael J. Wysocki commit 70c179b49870929ca183421935415622d30875b5 Author: Ulf Hansson Date: Tue Sep 1 16:28:59 2020 +0200 cpuidle: psci: Allow PM domain to be initialized even if no OSI mode If the PSCI OSI mode isn't supported or fails to be enabled, the PM domain topology with the genpd providers isn't initialized. This is perfectly fine from cpuidle-psci point of view. However, since the PM domain topology in the DTS files is a description of the HW, no matter of whether the PSCI OSI mode is supported or not, other consumers besides the CPUs may rely on it. Therefore, let's always allow the initialization of the PM domain topology to succeed, independently of whether the PSCI OSI mode is supported. Consequentially we need to track if we succeed to enable the OSI mode, as to know when a domain idlestate can be selected. Note that, CPU devices are still not being attached to the PM domain topology, unless the PSCI OSI mode is supported. Acked-by: Sudeep Holla Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 10942019040c5557556ec22aae0f771b2a1a1a6d Author: Ulf Hansson Date: Tue Sep 1 16:28:58 2020 +0200 firmware: psci: Extend psci_set_osi_mode() to allow reset to PC mode The current user (cpuidle-psci) of psci_set_osi_mode() only needs to enable the PSCI OSI mode. Although, as subsequent changes shows, there is a need to be able to reset back into the PSCI PC mode. Therefore, let's extend psci_set_osi_mode() to take a bool as in-parameter, to let the user indicate whether to enable OSI or to switch back to PC mode. Reviewed-by: Sudeep Holla Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit f279e5cd95058ddbb8f86e1c32f25d36502a115c Author: Oded Gabbay Date: Thu Sep 17 17:57:03 2020 +0300 habanalabs: update scratchpad register map Our firmware use some scratchpad registers in the device for different roles. Update the file to the latest version of the firmware code. Signed-off-by: Oded Gabbay commit 57799ce9f85c23ecbbc9d356969ea54bd6b8a647 Author: Oded Gabbay Date: Sun Sep 13 15:51:28 2020 +0300 habanalabs: add indication of security-enabled F/W Future F/W versions will have enhanced security measures and the driver won't be able to do certain configurations that it always did and those configurations will be done by the firmware. We use the firmware's preboot version to determine whether security measures are enabled or not. Because we need this very early in our code, the read of the preboot version is moved to the earliest possible place, right after the device's PCI initialization. Signed-off-by: Oded Gabbay commit d1f3633599a9178572f3b25f9f23cd9dc423a9fa Author: Oded Gabbay Date: Mon Sep 14 09:26:54 2020 +0300 habanalabs/gaudi: fix DMA completions max outstanding to 15 This is a workaround for H/W bug H3-2116, where if there are more than 16 outstanding completions in the DMA transpose engine, there can be a deadlock in the engine. Signed-off-by: Oded Gabbay commit dbf053c42994460d5228e6cef3f69d3c91e52a92 Author: Oded Gabbay Date: Sun Sep 13 15:35:33 2020 +0300 habanalabs/gaudi: remove axi drain support AXI drain is broken in GAUDI so remove support for enabling it. Signed-off-by: Oded Gabbay commit 219b8f2ff024a7f8f2cd1a9a0a1d7651c1a02737 Author: Oded Gabbay Date: Thu Sep 10 16:37:59 2020 +0300 habanalabs: update firmware interface file Add new packet to fetch PLL information from firmware. This will be needed in the future when the driver won't be able to access the PLL registers directly Signed-off-by: Oded Gabbay commit ef6a0f6caa4a5dbfbb42b642e23fb06182798d30 Author: Tomer Tayar Date: Thu Jul 9 16:17:48 2020 +0300 habanalabs: Add an option to map CB to device MMU There are cases in which the device should access the host memory of a CB through the device MMU, and thus this memory should be mapped. The patch adds a flag to the CB IOCTL, in which a user can ask the driver to perform the mapping when creating a CB. The mapping is allowed only if a dedicated VA range was allocated for the specific ASIC. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit fa8641a14f2841e1712e554ebfa58f1ac7b7db1b Author: Tomer Tayar Date: Mon Sep 7 17:36:41 2020 +0300 habanalabs: Save context in a command buffer object Future changes require using a context while handling a command buffer, and thus need to save the context in the command buffer object. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 448f63badcac6e24031cbfd6952245d02c38fa84 Author: Oded Gabbay Date: Wed Sep 9 10:39:00 2020 +0300 habanalabs: no need for DMA_SHARED_BUFFER Now that the driver no longer uses dma_buf, we can remove the select of DMA_SHARED_BUFFER from kconfig. Signed-off-by: Oded Gabbay commit 681a22f55f1506023da06ebf660a4a252b35bc93 Author: Oded Gabbay Date: Mon Sep 7 18:08:51 2020 +0300 habanalabs: allow to wait on CS without sleep The user sometimes wants to check if a CS has completed to clean resources. In that case, the user doesn't want to sleep but just to check if the CS has finished and continue with his code. Add a new definition to the API of the wait on CS. The new definition says that if the timeout is 0, the driver won't sleep at all but return immediately after checking if the CS has finished. Signed-off-by: Oded Gabbay commit 230b9b7d45b6d466afd1b6e82dddc252756c5c9c Author: Oded Gabbay Date: Tue Sep 8 15:17:03 2020 +0300 habanalabs/gaudi: increase timeout for boot fit load The firmware running in the boot stage takes more time to execute due to increased security mechanisms. Therefore, we need to increase the timeout we wait for the boot fit to finish loading. Signed-off-by: Oded Gabbay commit 214afa974dd40a100765d912d005193d4907e0f0 Author: Moti Haimovski Date: Thu Aug 13 16:54:50 2020 +0300 habanalabs: add debugfs support for MMU with 6 HOPs This commit modify the existing debugfs code to support future devices that have a 6 HOPs MMU implementation instead of 5 HOPs implementation. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7edf341b9ef5012408a2ddac7ba30bc94e1dffaf Author: Moti Haimovski Date: Sun Aug 23 13:23:13 2020 +0300 habanalabs: add num_hops to hl_mmu_properties This commit adds the number of HOPs supported by the device to the device MMU properties. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d83fe66928b2ff50367c983c345d17f7b8769235 Author: Moti Haimovski Date: Wed Aug 12 13:33:44 2020 +0300 habanalabs: refactor MMU as device-oriented As preparation to MMU v2, rework MMU to be device oriented instantiated according to the device in hand. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c91324f41b27fc3dc7c2000426b1591a7f6d575c Author: Moti Haimovski Date: Wed Aug 12 11:40:08 2020 +0300 habanalabs: rename mmu.c to mmu_v1.c In the future we will have MMU v2 code, so we need to prepare the driver for it. The first step is to rename the current MMU file to mmu_v1.c. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7c52fb0a096aecd6b7ef474e9037db2194570162 Author: Omer Shpigelman Date: Sun Jun 28 21:15:53 2020 +0300 habanalabs: use smallest possible alignment for virtual addresses Change the acquiring of a device virtual address for mapping by using the smallest possible alignment, rather than the biggest, depending on the page size used by the user for allocating the memory. This will lower the virtual space memory consumption. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 1fb2f3743754994fec412f63a12cbc4d72f49e38 Author: Oded Gabbay Date: Fri Sep 4 21:39:14 2020 +0300 habanalabs: check flag before reset because of f/w event For consistency with GAUDI code, add check of the relevant flag in the device structure before resetting the GOYA device in case of firmware event. Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit 5a1b861daab8379d792bfae917f317708d1c99d2 Author: Oded Gabbay Date: Fri Sep 4 21:36:46 2020 +0300 habanalabs: increase PQ COMP_OFFSET by one nibble For future ASICs, we increase this field by one nibble. This field was not used by the current ASICs so this change doesn't break anything. Signed-off-by: Oded Gabbay commit 763a0b4d81f60beb835dc3e8991aa9e1ed9f71b1 Author: Ofir Bitton Date: Fri Sep 4 21:33:53 2020 +0300 habanalabs: Fix alignment issue in cpucp_info structure Because the device CPU compiler aligns structures to 8 bytes, struct cpucp_info has an alignment issue as some parts in the structure are not aligned to 8 bytes. It is preferred that we explicitly insert placeholders inside the structure to avoid confusion in order to validate this scenario, we printed both pointers: __u8 cpucp_version[VERSION_MAX_LEN]; (0xffff899c67ed4cbc) __le64 dram_size; (0xffff899c67ed4d40) we see difference of 132 bytes although the first array is only 128 bytes long, Meaning compiler added a 4 byte padding. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ae926514dd62673bc1a2513e5271d1d6d3d473b5 Author: Oded Gabbay Date: Fri Sep 4 20:22:35 2020 +0300 habanalabs: remove unused define Cleanup the code. Signed-off-by: Oded Gabbay commit b01a971f80be339fb072044ef201ac724db9b58c Author: Oded Gabbay Date: Fri Sep 4 20:21:39 2020 +0300 habanalabs: remove unused ASIC function pointer Old function pointer that was left when the call to this function pointer was removed. Signed-off-by: Oded Gabbay commit 6138bbe911264198ba16659c333084ab4bfb0c73 Author: Oded Gabbay Date: Fri Sep 4 20:18:16 2020 +0300 habanalabs: rename ArmCP to CPU-CP There were a couple of comments where the name ArmCP was still used. Rename it to CPU-CP. In addition, rename ArmCP or ARM in log messages to "device CPU". Signed-off-by: Oded Gabbay commit 975ab7b32b90c97046ddbdd53798391b7d8a6a1e Author: Oded Gabbay Date: Tue Sep 1 11:22:05 2020 +0300 habanalabs: count dropped CS because max CS in-flight There is a case where the user reaches the maximum number of CS in-flight. In that case, the driver rejects the new CS of the user with EAGAIN. Count that event so the user can query the driver later to see if it happened. Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit 0db575350cb1a2fa724f0198fd40b2c91ace5cb7 Author: Hillf Danton Date: Sun Aug 23 07:32:42 2020 +0800 habanalabs: make use of dma_mmap_coherent Add dma_mmap_coherent() for goya and gaudi to match their use of dma_alloc_coherent(), see the Link tag for why. Link: https://lore.kernel.org/lkml/20200609091727.GA23814@lst.de/ Cc: Christoph Hellwig Cc: Zhang Li Cc: Ding Z Nan Signed-off-by: Hillf Danton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c5e0ec66f01d6621a64837428efcbbe731d90cd5 Author: Oded Gabbay Date: Sat Aug 29 11:55:15 2020 +0300 habanalabs: clear vm_pgoff before doing the mmap The driver use vm_pgoff to hold the CB idr handle. Before we actually call the mapping function, we need to clear the handle so there won't be any garbage left in vm_pgoff. Signed-off-by: Oded Gabbay commit 3174ac9bb1045946ff563aa01d679809e87fb2db Author: Oded Gabbay Date: Sat Aug 29 11:51:39 2020 +0300 habanalabs: restructure hl_mmap Arrange the hl_mmap code to be more structured and expandable for the future. Add better defines that describe our usage of the vm_pgoff. Note that I shamelessly took the code and defines from the amdkfd driver (my previous driver). Signed-off-by: Oded Gabbay commit f763946aefe67b3ea58696b75a930ba1ed886a83 Author: Oded Gabbay Date: Sat Aug 29 11:24:03 2020 +0300 habanalabs: cast to u64 before shift > 31 bits When shifting a boolean variable by more than 31 bits and putting the result into a u64 variable, we need to cast the boolean into unsigned 64 bits to prevent possible overflow. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Oded Gabbay commit 2f55342c5e4d3ea94c0b8237f3ad26963269f90f Author: Oded Gabbay Date: Sat Aug 15 16:28:10 2020 +0300 habanalabs: replace armcp with the generic cpucp ArmCP mandates that the device CPU is always an ARM processor, which might be wrong in the future. Most of this change is an internal renaming of variables, functions and defines but there are two entries in sysfs which have armcp in their names. Add identical cpucp entries but don't remove yet the armcp entries. Those will be deprecated next year. Add the documentation about it in sysfs documentation. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 42b0698adde1beb3cd744fd4ea12bb75a80613ab Author: Oded Gabbay Date: Fri Aug 21 09:59:18 2020 +0300 habanalabs: update GAUDI hardware specs Add define for the 2 MME slave engines. Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit 9f3064913e1b9b4153accbd33aaf1983be92c569 Author: farah kassabri Date: Sun Aug 9 16:25:53 2020 +0300 habanalabs: add support for getting device total energy Add driver implementation for reading the total energy consumption from the device ARM FW. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 56004701f52e60475f0ebdb1da6fc6bf7cc4b80c Author: Tomer Tayar Date: Tue Aug 18 15:06:56 2020 +0300 habanalabs: Include linux/bitfield.h only in habanalabs.h Include linux/bitfield.h only in habanalabs.h, instead of in each and every file that needs it, as habanalabs.h is already included by all. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d90416c84d86ff78a2181f135d72d564430107b8 Author: farah kassabri Date: Wed Aug 12 17:20:13 2020 +0300 habanalabs: extend busy engines mask to 64 bits change busy engines bitmask to 64 bits in order to represent more engines, needed for future ASIC support. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 107dd314658e8e017f3a384917261ec7e3309722 Author: Oded Gabbay Date: Wed Aug 12 11:32:27 2020 +0300 habanalabs: use 1U when shifting bits Eliminate following warning: warning: Shifting signed 32-bit value by 31 bits is undefined behavior Reported-by: kernel test robot Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit 31ac1f1a5712696c45ea3ebb23e60b4e7e5cb0b6 Author: Oded Gabbay Date: Wed Aug 12 11:28:13 2020 +0300 habanalabs: check TPC vector pipe is empty The driver waits for the TPC vector pipe to be empty before checking if the TPC kernel has finished executing, but the code doesn't validate that the pipe was indeed empty, it just wait for it without checking the return value. Reported-by: kernel test robot Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit 0358372bbe86705399490d82fb022aa34bdc2ee4 Author: Oded Gabbay Date: Wed Aug 12 11:24:05 2020 +0300 habanalabs: remove redundant assignment to variable new_dma_pkt->ctl is assigned a value and then is reassigned a new value without the first value ever being used. Reported-by: kernel test robot Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit 65887291c6a80c3f2263348548899818b334cc8a Author: Oded Gabbay Date: Wed Aug 12 11:21:01 2020 +0300 habanalabs: use FIELD_PREP() instead of << Use the standard FIELD_PREP() macro instead of << operator to perform bitmask operations. This ensures type check safety and eliminate compiler warnings. Reported-by: kernel test robot Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit a0e072f5a18ffa04f83669a886dc4a4cfc3a1341 Author: Oded Gabbay Date: Wed Aug 12 10:46:33 2020 +0300 habanalabs: use standard BIT() and GENMASK() Use the standard macros to define bitmasks. Reported-by: kernel test robot Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit bd4ef3729213280522694ff714e28192e486487d Author: Oded Gabbay Date: Wed Aug 12 10:19:28 2020 +0300 habanalabs: eliminate redundant else condition If both parts of if-else are goto statements, we can remove the else and put the else goto statement after the if statement. Reported-by: kernel test robot Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit f907af183b8bf35393e3057204000c16d8cb9bbe Author: Oded Gabbay Date: Wed Aug 12 10:15:27 2020 +0300 habanalabs: cast int to u32 before printing it with %u %u is used for unsigned so we need to cast the int variable to u32 to avoid compiler warning. Reported-by: kernel test robot Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit f5b9c8cf25a562b73c80cd4bb252ccb398259056 Author: Oded Gabbay Date: Wed Aug 12 10:11:20 2020 +0300 habanalabs: change CB's ID to be 64 bits Although the possible values for CB's ID are only 32 bits, there are a few places in the code where this field is shifted and passed into a function which expects 64 bits. Reported-by: kernel test robot Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit d6b045c083842d86a749357210c3006a36e3b66f Author: Dotan Barak Date: Thu Aug 6 09:20:49 2020 +0300 habanalabs: print the queue id in case of an error If there is a failure during the testing of a queue, to ease up debugging - print the queue id. Signed-off-by: Dotan Barak Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit acd330c141b4c49f468f00719ebc944656061eac Author: farah kassabri Date: Tue Aug 4 09:41:32 2020 +0300 habanalabs: remove security from ARB_MST_QUIET register Allow user application to write to this register in order to be able to configure the quiet period of the QMAN between grants. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 2e5eda4681f91bce8f65c54c684c79397708fd80 Author: Ofir Bitton Date: Wed May 20 16:35:08 2020 +0300 habanalabs: PCIe Advanced Error Reporting support driver will now get notified upon any PCI error occurred and will respond according to the severity of the error. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 843839bec3a304f8313d6ae554f618a91e52731a Author: Ofir Bitton Date: Sun Jul 19 11:08:09 2020 +0300 habanalabs: expose sync manager resources allocation in INFO IOCTL Although the driver defines the first user-available sync manager object and monitor in habanalabs.h, we would like to also expose this information via the INFO IOCTL so the runtime can get this information dynamically. This is because in future ASICs we won't need to define it statically. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 0a068adde505a90ece23caaf19b77567e1d18298 Author: Ofir Bitton Date: Tue Jul 21 10:49:51 2020 +0300 habanalabs: add information about PCIe controller Update firmware header with new API for getting pcie info such as tx/rx throughput and replay counter. These counters are needed by customers for monitor and maintenance of multiple devices. Add new opcodes to the INFO ioctl to retrieve these counters. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit a98d73c7fae486f7fea83bdec8599d4fccb6807d Author: Ofir Bitton Date: Wed Jul 15 08:52:39 2020 +0300 habanalabs: Replace dma-fence mechanism with completions habanalabs driver uses dma-fence mechanism for synchronization. dma-fence mechanism was designed solely for GPUs, hence we purpose a simpler mechanism based on completions to replace current dma-fence objects. Signed-off-by: Ofir Bitton Cc: Greg Kroah-Hartman Cc: Daniel Vetter Reviewed-by: Oded Gabbay Reviewed-by: Daniel Vetter Signed-off-by: Oded Gabbay commit b71590efb2cd91c44fdec6424b7db7849194141c Author: Oded Gabbay Date: Sun Aug 2 11:49:09 2020 +0300 habanalabs: increase length of ASIC name Future ASIC names are longer than 15 chars so increase the variable length to 32 chars. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar commit 3c0f462da069af12211901ddf26f7e16e6951d9b Author: Luo Jiaxing Date: Wed Sep 16 16:51:38 2020 +0800 drm/msm/dpu: remove unused variables new_cnt and old_cnt in dpu_encoder_phys_vid_vblank_irq() We found two unused variables new_cnt and old_cnt when build kernel with W=1. So delete it. Signed-off-by: Luo Jiaxing Signed-off-by: Rob Clark commit 341a361c46368fe7af30035f379071945931793e Author: Qinglang Miao Date: Sat Sep 19 10:51:58 2020 +0800 drm/msm/dpu: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Signed-off-by: Rob Clark commit 63ca94adc03cff509d20b1306e48afccb44d5bdf Author: Akhil P Oommen Date: Tue Sep 22 20:25:27 2020 +0530 drm/msm: Leave inuse count intact on map failure Leave the inuse count intact on map failure to keep the accounting accurate. Signed-off-by: Akhil P Oommen Signed-off-by: Rob Clark commit 9d8baa2bf224f6f010644b2a60a3ca73d829663e Author: Akhil P Oommen Date: Tue Sep 22 20:25:26 2020 +0530 drm/msm: Fix premature purging of BO In the case where we have a back-to-back submission that shares the same BO, this BO will be prematurely moved to inactive_list while retiring the first submit. But it will be still part of the second submit which is being processed by the GPU. Now, if the shrinker happens to be triggered at this point, it will result in a premature purging of this BO. To fix this, we need to refcount BO while doing submit and retire. Then, it should be moved to inactive list when this refcount becomes 0. Signed-off-by: Akhil P Oommen Signed-off-by: Rob Clark commit 50b18e4a2608e3897f3787eaa7dfa869b40d9923 Author: Necip Fazil Yildiran Date: Thu Sep 17 17:18:04 2020 +0300 ASoC: cros_ec_codec: fix kconfig dependency warning for SND_SOC_CROS_EC_CODEC When SND_SOC_CROS_EC_CODEC is enabled and CRYPTO is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for CRYPTO_LIB_SHA256 Depends on [n]: CRYPTO [=n] Selected by [y]: - SND_SOC_CROS_EC_CODEC [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && CROS_EC [=y] The reason is that SND_SOC_CROS_EC_CODEC selects CRYPTO_LIB_SHA256 without depending on or selecting CRYPTO while CRYPTO_LIB_SHA256 is subordinate to CRYPTO. Honor the kconfig menu hierarchy to remove kconfig dependency warnings. Fixes: 93fa0af4790a ("ASoC: cros_ec_codec: switch to library API for SHA-256") Signed-off-by: Necip Fazil Yildiran Link: https://lore.kernel.org/r/20200917141803.92889-1-fazilyildiran@gmail.com Signed-off-by: Mark Brown commit 90e2a588c9e743f104849fb2da4c121e1a487201 Author: Dan Murphy Date: Tue Sep 22 09:24:11 2020 -0500 ASoC: tas2562: Remove duplicate code for I/V sense Remove duplicate code for programming the I/V sense the call to update the register was duplicated in commit 09ed395b05feb ("ASoC: tas2562: Add voltage sense slot configuration"). Fixes: 09ed395b05feb ("ASoC: tas2562: Add voltage sense slot configuration") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200922142411.10364-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 2c19bb43e5572929f00f186d43e99bfd6d7ee3b2 Author: Joakim Zhang Date: Fri Jul 12 08:03:01 2019 +0000 can: flexcan: add lx2160ar1 support The Flexcan on lx2160ar1 supports CAN FD protocol. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20190712075926.7357-9-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit 2a1993eadf8c66228e5777fbf507efeef8d82f7d Author: Joakim Zhang Date: Fri Jul 12 08:02:59 2019 +0000 can: flexcan: add imx8qm support The Flexcan on i.MX8QM supports CAN FD protocol. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20190712075926.7357-8-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit ef5f6312087e18ce55cbd067c7c12e7e7e3fb528 Author: Joakim Zhang Date: Fri Jul 12 08:02:56 2019 +0000 can: flexcan: add Transceiver Delay Compensation support The CAN-FD protocol allows the transmission and reception of data at a higher bit rate than the nominal rate used in the arbitration phase when the message's BRS bit is set. The TDC mechanism is effective only during the data phase of FD frames having BRS bit set. It has no effect either on non-FD frames, or on FD frames transmitted at normal bit rate. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20190712075926.7357-7-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit 0542920c3f0a666457a43625f4fa31cf6f059b94 Author: Joakim Zhang Date: Fri Jul 12 08:02:47 2019 +0000 can: flexcan: add CAN FD BRS support This patch adds CAN FD BitRate Switch (BRS) support to driver. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20190712075926.7357-5-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit ce885a192f1cca7ab6aeffa37fa6228db966b632 Author: Joakim Zhang Date: Fri Jul 12 08:02:51 2019 +0000 can: flexcan: add ISO CAN FD feature support ISO CAN FD is introduced to increase the failture detection capability than non-ISO CAN FD. The non-ISO CAN FD is still supported by FlexCAN so that it can be used mainly during an intermediate phase, for evaluation and development purposes. Therefore, it is strongly recommended to configure FlexCAN to the ISO CAN FD protocol by setting the ISOCANFDEN field in the CTRL2 register. NOTE: If you only set "fd on", driver will use ISO FD mode by default. You should set "fd-non-iso on" after setting "fd on" if you want to use NON ISO FD mode. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20190712075926.7357-6-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit eadf6ca918f6963cd8f3575a2f328018e1a16443 Author: Joakim Zhang Date: Fri Jul 12 08:02:44 2019 +0000 can: flexcan: add CAN-FD mode support This patch adds CAN-FD mode support to the driver, it means that payload size can extend up to 64 bytes. Bit timing always set in the CBT register, not in the CTRL1 register any more. This has an extend range of all CAN bit timing variables (PRESDIV, PROPSEG, PSEG1, PSEG2 and RJW), which will improve the bit timing accuracy. Signed-off-by: Joakim Zhang [mkl: move cbt-based bitrate support into separate function] Link: https://lore.kernel.org/r/20200922144429.2613631-16-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit d9b90b05fd78f7a7482ee22a6a6c5581695b4beb Author: Joakim Zhang Date: Fri Jul 12 08:02:41 2019 +0000 can: flexcan: use struct canfd_frame for CAN classic frame This patch prepares for CAN FD mode, using struct canfd_frame can both for classic format frame and fd format frame. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20190712075926.7357-3-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit 890599bc8618b72ba5e061d6c776cc8dce08c753 Author: Marc Kleine-Budde Date: Tue Sep 22 16:44:22 2020 +0200 can: flexcan: flexcan_set_bittiming(): move setup of CAN-2.0 bitiming into separate function This is a patch prepares for the CAN-FD support. In a later patch the setup for canfd bittiming will be added, with this patch the change is easier to read. Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200922144429.2613631-14-mkl@pengutronix.de commit 1434d04349626d7b4da49b99f79d6391b9a67f16 Author: Joakim Zhang Date: Wed Dec 4 11:36:19 2019 +0000 can: flexcan: add LPSR mode support On the i.MX7D in LPSR mode, the controller will be powered off and the configuration state is lost after system resume. Upcoming i.MX8QM/QXP will also completely power off the domain, the controller state is lost and needs restore, too. So we need to set the pinctrl state again and re-start chip to re-configuration after resume. For the wakeup case, it should not set pinctrl to sleep state by pinctrl_pm_select_sleep_state. If the interface is down before suspend, we don't need to re-configure it as it will be configured if the interface is brought up later. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20191204113249.3381-7-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit 02f71c6605e1f8259c07f16178330db766189a74 Author: Joakim Zhang Date: Tue Dec 10 09:00:13 2019 +0000 can: flexcan: disable clocks during stop mode Disable clocks while CAN core is in stop mode. Signed-off-by: Joakim Zhang Tested-by: Sean Nyekjaer Link: https://lore.kernel.org/r/20191210085721.9853-2-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit 9ad02c7f4f279504bdd38ab706fdc97d5f2b2a9c Author: Joakim Zhang Date: Tue Sep 22 16:44:19 2020 +0200 can: flexcan: flexcan_chip_stop(): add error handling and propagate error value This patch implements error handling and propagates the error value of flexcan_chip_stop(). This function will be called from flexcan_suspend() in an upcoming patch in some SoCs which support LPSR mode. Add a new function flexcan_chip_stop_disable_on_error() that tries to disable the chip even in case of errors. Signed-off-by: Joakim Zhang [mkl: introduce flexcan_chip_stop_disable_on_error() and use it in flexcan_close()] Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200922144429.2613631-11-mkl@pengutronix.de commit 15ef2072189ce1191b6315c5ed97b6f8cd7bbc84 Author: Joakim Zhang Date: Thu Apr 16 17:31:25 2020 +0800 can: flexcan: add correctable errors correction when HW supports ECC commit cdce844865be ("can: flexcan: add vf610 support for FlexCAN") From above commit by Stefan Agner, the patch just disables non-correctable errors interrupt and freeze mode. It still can correct the correctable errors since ECC enabled by default after reset (MECR[ECCDIS]=0, enable memory error correct) if HW supports ECC. commit 5e269324db5a ("can: flexcan: disable completely the ECC mechanism") From above commit by Joakim Zhang, the patch disables ECC completely (assert MECR[ECCDIS]) according to the explanation of FLEXCAN_QUIRK_DISABLE_MECR that disable memory error detection. This cause correctable errors cannot be corrected even HW supports ECC. The error correction mechanism ensures that in this 13-bit word, errors in one bit can be corrected (correctable errors) and errors in two bits can be detected but not corrected (non-correctable errors). Errors in more than two bits may not be detected. If HW supports ECC, we can use this to correct the correctable errors detected from FlexCAN memory. Then disable non-correctable errors interrupt and freeze mode to avoid that put FlexCAN in freeze mode. This patch adds correctable errors correction when HW supports ECC, and modify explanation for FLEXCAN_QUIRK_DISABLE_MECR. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20200416093126.15242-1-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit ee97302d78654eebc1decc80d70c6a7de0217545 Author: Joakim Zhang Date: Wed Oct 30 06:45:57 2019 +0000 can: flexcan: Add check for transceiver maximum bitrate limitation CAN FD can transmit up to 8Mbps, but some transceivers only can support 5Mbps, so add check in driver. Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20191030064245.12923-2-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit 3d60f33a7a7afa7ba02b96ecc835c3450bf234b1 Author: Marc Kleine-Budde Date: Tue Sep 22 16:44:16 2020 +0200 can: flexcan: flexcan_probe(): make regulator xceiver optional As the transcevier regulator is optional, this patch switches from devm_regulator_get() to devm_regulator_get_optional(). This gets rid of "using dummy regulator" warning message from the regulator core, if no regulator is available. Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200922144429.2613631-8-mkl@pengutronix.de commit ab60523a76a4d40051ece11b23b099e273f9a485 Author: Joakim Zhang Date: Wed Dec 4 11:36:08 2019 +0000 can: flexcan: Ack wakeup interrupt separately As FLEXCAN_ESR_ALL_INT is for all bus errors and state change IRQ sources, strictly speaking FLEXCAN_ESR_WAK_INT does not belong to these. So add wakeup interrupt ack separately to existing ack of the interrupts. Suggested-by: Marc Kleine-Budde Signed-off-by: Joakim Zhang Link: https://lore.kernel.org/r/20191204113249.3381-3-qiangqing.zhang@nxp.com Signed-off-by: Marc Kleine-Budde commit ef4b623b141f113b67dfd12294695a3b1111ad6c Author: Marc Kleine-Budde Date: Tue Sep 22 16:44:14 2020 +0200 can: flexcan: quirks: get rid of long lines This patch reformats the quirks to get rid of long lines. Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200922144429.2613631-6-mkl@pengutronix.de commit fe63a0661023a600e2b5cff7eff2500bf191a161 Author: Marc Kleine-Budde Date: Tue Sep 22 16:44:13 2020 +0200 can: flexcan: struct flexcan_regs: document registers not affected by soft reset This patch documents which registers are not affected by a soft reset of the flexcan IP core. Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200922144429.2613631-5-mkl@pengutronix.de commit 4b702878afc375979be48c8da427455eb8496b15 Author: Marc Kleine-Budde Date: Tue Sep 22 16:44:12 2020 +0200 can: flexcan: more register names This patch adds some new register names and tries to ensure with a static_assert that the documented offset is correct. Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200922144429.2613631-4-mkl@pengutronix.de commit ce90e073d64511f866e4029dff64c2a18546e680 Author: Marc Kleine-Budde Date: Tue Sep 22 16:44:11 2020 +0200 can: flexcan: flexcan_exit_stop_mode(): remove stray empty line This patch removes a stray empty line from the flexcan_exit_stop_mode() function. Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200922144429.2613631-3-mkl@pengutronix.de commit 555f6e568dfbbc0891c823261d55d5edb89b1397 Author: Marc Kleine-Budde Date: Tue Sep 22 16:44:10 2020 +0200 can: flexcan: sort include files alphabetically This patch sorts the include files alphabetically. Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200922144429.2613631-2-mkl@pengutronix.de commit da75ba2482658a0d9ea5245fadfea6b464fab7a3 Author: Andy Shevchenko Date: Tue Sep 22 14:58:47 2020 +0300 dmaengine: dmatest: Return boolean result directly in filter() There is no need to have a conditional for boolean expression when function returns bool. Drop unnecessary code and return boolean result directly. While at it, drop unneeded casting from void *. Cc: Vladimir Murzin Signed-off-by: Andy Shevchenko Tested-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200922115847.30100-3-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit b28de385b71abf31ce68ec0387638bee26ae9024 Author: Andy Shevchenko Date: Tue Sep 22 14:58:46 2020 +0300 dmaengine: dmatest: Check list for emptiness before access its last entry After writing a garbage to the channel we get an Oops in dmatest_chan_set() due to access to last entry in the empty list. [ 212.670672] BUG: unable to handle page fault for address: fffffff000000020 [ 212.677562] #PF: supervisor read access in kernel mode [ 212.682702] #PF: error_code(0x0000) - not-present page ... [ 212.710074] RIP: 0010:dmatest_chan_set+0x149/0x2d0 [dmatest] [ 212.715739] Code: e8 cc f9 ff ff 48 8b 1d 0d 55 00 00 48 83 7b 10 00 0f 84 63 01 00 00 48 c7 c7 d0 65 4d c0 e8 ee 4a f5 e1 48 89 c6 48 8b 43 10 <48> 8b 40 20 48 8b 78 58 48 85 ff 0f 84 f5 00 00 00 e8 b1 41 f5 e1 Fix this by checking list for emptiness before accessing its last entry. Fixes: d53513d5dc28 ("dmaengine: dmatest: Add support for multi channel testing") Cc: Vladimir Murzin Signed-off-by: Andy Shevchenko Tested-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200922115847.30100-2-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit d2dc9ab7476412e30a9ebffdd9fd01a6dc551870 Merge: 52c74d3d356b6 ce65d55f92a67 Author: Vinod Koul Date: Tue Sep 22 20:18:32 2020 +0530 Merge branch 'fixes' into next commit 488e3f52a82775bf9a4826a9eb59f10336c3f012 Author: Tomasz Figa Date: Mon Sep 21 22:56:18 2020 +0000 phy: rockchip-dphy-rx0: Include linux/delay.h Fix an implicit declaration of usleep_range(): drivers/phy/rockchip/phy-rockchip-dphy-rx0.c: In function 'rk_dphy_enable': drivers/phy/rockchip/phy-rockchip-dphy-rx0.c:203:2: error: implicit declaration of function 'usleep_range' [-Werror=implicit-function-declaration] Fixes: 32abcc4491c62 ("media: staging: phy-rockchip-dphy-rx0: add Rockchip MIPI Synopsys DPHY RX0 driver") Signed-off-by: Tomasz Figa Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20200921225618.52529-1-tfiga@chromium.org Signed-off-by: Vinod Koul commit 9b1e52137b221413bce145f8b6e4258900e575c3 Author: Randy Dunlap Date: Thu Sep 17 10:51:47 2020 -0700 phy: fix USB_LGM_PHY warning & build errors Fix a Kconfig warning that is causing lots of build errors when USB_SUPPORT is not set. USB_PHY depends on USB_SUPPORT but "select" doesn't care about dependencies, so this driver should also depend on USB_SUPPORT. It should not select USB_SUPPORT. WARNING: unmet direct dependencies detected for USB_PHY Depends on [n]: USB_SUPPORT [=n] Selected by [m]: - USB_LGM_PHY [=m] Signed-off-by: Randy Dunlap Cc: Li Yin Cc: Vadivel Murugan R Cc: Kishon Vijay Abraham I Cc: Vinod Koul Link: https://lore.kernel.org/r/d1dd0ddd-3143-5777-1c63-195e1a32f237@infradead.org Signed-off-by: Vinod Koul commit f1ec83f880dbeaceb10d33c40c47aa1769b787e8 Author: David Bauer Date: Sun Sep 20 17:45:28 2020 +0200 arm64: dts: rockchip: Add support for FriendlyARM NanoPi R2S This adds support for the NanoPi R2S from FriendlyARM. Rockchip RK3328 SoC 1GB DDR4 RAM Gigabit Ethernet (WAN) Gigabit Ethernet (USB3) (LAN) USB 2.0 Host Port MicroSD slot Reset button WAN - LAN - SYS LED Signed-off-by: David Bauer Link: https://lore.kernel.org/r/20200920154528.88185-2-mail@david-bauer.net [adapted from sdmmc0m1_gpio to renamed sdmmc0m1_pin] Reported-by: kernel test robot Signed-off-by: Heiko Stuebner commit 8cfcf3279419acbf2d2c471262bfb18d9e175fc9 Author: David Bauer Date: Sun Sep 20 17:45:27 2020 +0200 dt-bindings: Add doc for FriendlyARM NanoPi R2S Add devicetree binding documentation for the FriendlyARM NanoPi R2S. Signed-off-by: David Bauer Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200920154528.88185-1-mail@david-bauer.net Signed-off-by: Heiko Stuebner commit 0c6a113b2446e7d4c6b8222fe63518dc2e01e8c1 Author: Eric Biggers Date: Wed Sep 16 21:53:41 2020 -0700 fscrypt: use sha256() instead of open coding Now that there's a library function that calculates the SHA-256 digest of a buffer in one step, use it instead of sha256_init() + sha256_update() + sha256_final(). Link: https://lore.kernel.org/r/20200917045341.324996-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit c8c868abc91ff23f6f5c4444c419de7c277d77e1 Author: Eric Biggers Date: Wed Sep 16 21:11:36 2020 -0700 fscrypt: make fscrypt_set_test_dummy_encryption() take a 'const char *' fscrypt_set_test_dummy_encryption() requires that the optional argument to the test_dummy_encryption mount option be specified as a substring_t. That doesn't work well with filesystems that use the new mount API, since the new way of parsing mount options doesn't use substring_t. Make it take the argument as a 'const char *' instead. Instead of moving the match_strdup() into the callers in ext4 and f2fs, make them just use arg->from directly. Since the pattern is "test_dummy_encryption=%s", the argument will be null-terminated. Acked-by: Jeff Layton Link: https://lore.kernel.org/r/20200917041136.178600-14-ebiggers@kernel.org Signed-off-by: Eric Biggers commit ac4acb1f4b2b6b7e8d913537cccec8789903e164 Author: Eric Biggers Date: Wed Sep 16 21:11:35 2020 -0700 fscrypt: handle test_dummy_encryption in more logical way The behavior of the test_dummy_encryption mount option is that when a new file (or directory or symlink) is created in an unencrypted directory, it's automatically encrypted using a dummy encryption policy. That's it; in particular, the encryption (or lack thereof) of existing files (or directories or symlinks) doesn't change. Unfortunately the implementation of test_dummy_encryption is a bit weird and confusing. When test_dummy_encryption is enabled and a file is being created in an unencrypted directory, we set up an encryption key (->i_crypt_info) for the directory. This isn't actually used to do any encryption, however, since the directory is still unencrypted! Instead, ->i_crypt_info is only used for inheriting the encryption policy. One consequence of this is that the filesystem ends up providing a "dummy context" (policy + nonce) instead of a "dummy policy". In commit ed318a6cc0b6 ("fscrypt: support test_dummy_encryption=v2"), I mistakenly thought this was required. However, actually the nonce only ends up being used to derive a key that is never used. Another consequence of this implementation is that it allows for 'inode->i_crypt_info != NULL && !IS_ENCRYPTED(inode)', which is an edge case that can be forgotten about. For example, currently FS_IOC_GET_ENCRYPTION_POLICY on an unencrypted directory may return the dummy encryption policy when the filesystem is mounted with test_dummy_encryption. That seems like the wrong thing to do, since again, the directory itself is not actually encrypted. Therefore, switch to a more logical and maintainable implementation where the dummy encryption policy inheritance is done without setting up keys for unencrypted directories. This involves: - Adding a function fscrypt_policy_to_inherit() which returns the encryption policy to inherit from a directory. This can be a real policy, a dummy policy, or no policy. - Replacing struct fscrypt_dummy_context, ->get_dummy_context(), etc. with struct fscrypt_dummy_policy, ->get_dummy_policy(), etc. - Making fscrypt_fname_encrypted_size() take an fscrypt_policy instead of an inode. Acked-by: Jaegeuk Kim Acked-by: Jeff Layton Link: https://lore.kernel.org/r/20200917041136.178600-13-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 31114726b69364f3bf8dd945c600ceed4c430f4f Author: Eric Biggers Date: Wed Sep 16 21:11:34 2020 -0700 fscrypt: move fscrypt_prepare_symlink() out-of-line In preparation for moving the logic for "get the encryption policy inherited by new files in this directory" to a single place, make fscrypt_prepare_symlink() a regular function rather than an inline function that wraps __fscrypt_prepare_symlink(). This way, the new function fscrypt_policy_to_inherit() won't need to be exported to filesystems. Acked-by: Jeff Layton Link: https://lore.kernel.org/r/20200917041136.178600-12-ebiggers@kernel.org Signed-off-by: Eric Biggers commit c7f0207b613033c56b1217032d2f6326d0c69217 Author: Eric Biggers Date: Wed Sep 16 21:11:33 2020 -0700 fscrypt: make "#define fscrypt_policy" user-only The fscrypt UAPI header defines fscrypt_policy to fscrypt_policy_v1, for source compatibility with old userspace programs. Internally, the kernel doesn't want that compatibility definition. Instead, fscrypt_private.h #undefs it and re-defines it to a union. That works for now. However, in order to add fscrypt_operations::get_dummy_policy(), we'll need to forward declare 'union fscrypt_policy' in include/linux/fscrypt.h. That would cause build errors because "fscrypt_policy" is used in ioctl numbers. To avoid this, modify the UAPI header to make the fscrypt_policy compatibility definition conditional on !__KERNEL__, and make the ioctls use fscrypt_policy_v1 instead of fscrypt_policy. Note that this doesn't change the actual ioctl numbers. Acked-by: Jeff Layton Link: https://lore.kernel.org/r/20200917041136.178600-11-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 9dad5feb49a5c3b99838b102555cdbedf244320a Author: Eric Biggers Date: Wed Sep 16 21:11:32 2020 -0700 fscrypt: stop pretending that key setup is nofs-safe fscrypt_get_encryption_info() has never actually been safe to call in a context that needs GFP_NOFS, since it calls crypto_alloc_skcipher(). crypto_alloc_skcipher() isn't GFP_NOFS-safe, even if called under memalloc_nofs_save(). This is because it may load kernel modules, and also because it internally takes crypto_alg_sem. Other tasks can do GFP_KERNEL allocations while holding crypto_alg_sem for write. The use of fscrypt_init_mutex isn't GFP_NOFS-safe either. So, stop pretending that fscrypt_get_encryption_info() is nofs-safe. I.e., when it allocates memory, just use GFP_KERNEL instead of GFP_NOFS. Note, another reason to do this is that GFP_NOFS is deprecated in favor of using memalloc_nofs_save() in the proper places. Acked-by: Jeff Layton Link: https://lore.kernel.org/r/20200917041136.178600-10-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 4cc1a3e7e8520226c62019553b18f1c12388a99d Author: Eric Biggers Date: Wed Sep 16 21:11:31 2020 -0700 fscrypt: require that fscrypt_encrypt_symlink() already has key Now that all filesystems have been converted to use fscrypt_prepare_new_inode(), the encryption key for new symlink inodes is now already set up whenever we try to encrypt the symlink target. Enforce this rather than try to set up the key again when it may be too late to do so safely. Acked-by: Jeff Layton Link: https://lore.kernel.org/r/20200917041136.178600-9-ebiggers@kernel.org Signed-off-by: Eric Biggers commit e9d5e31d2fe39825b0fc276b14f2a322faf3c77b Author: Eric Biggers Date: Wed Sep 16 21:11:30 2020 -0700 fscrypt: remove fscrypt_inherit_context() Now that all filesystems have been converted to use fscrypt_prepare_new_inode() and fscrypt_set_context(), fscrypt_inherit_context() is no longer used. Remove it. Acked-by: Jeff Layton Link: https://lore.kernel.org/r/20200917041136.178600-8-ebiggers@kernel.org Signed-off-by: Eric Biggers commit ae9ff8ad81b13f2acb27c52f1d402f4d0d10d7d1 Author: Eric Biggers Date: Wed Sep 16 21:11:29 2020 -0700 fscrypt: adjust logging for in-creation inodes Now that a fscrypt_info may be set up for inodes that are currently being created and haven't yet had an inode number assigned, avoid logging confusing messages about "inode 0". Acked-by: Jeff Layton Link: https://lore.kernel.org/r/20200917041136.178600-7-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 4c030fa8870e9f0c53bcb91c607476ce7a4d6f2a Author: Eric Biggers Date: Wed Sep 16 21:11:28 2020 -0700 ubifs: use fscrypt_prepare_new_inode() and fscrypt_set_context() Convert ubifs to use the new functions fscrypt_prepare_new_inode() and fscrypt_set_context(). Unlike ext4 and f2fs, this doesn't appear to fix any deadlock bug. But it does shorten the code slightly and get all filesystems using the same helper functions, so that fscrypt_inherit_context() can be removed. It also fixes an incorrect error code where ubifs returned EPERM instead of the expected ENOKEY. Link: https://lore.kernel.org/r/20200917041136.178600-6-ebiggers@kernel.org Signed-off-by: Eric Biggers commit e075b6901047cd4c70b93cfcbe5f67dbc5741fb6 Author: Eric Biggers Date: Wed Sep 16 21:11:27 2020 -0700 f2fs: use fscrypt_prepare_new_inode() and fscrypt_set_context() Convert f2fs to use the new functions fscrypt_prepare_new_inode() and fscrypt_set_context(). This avoids calling fscrypt_get_encryption_info() from under f2fs_lock_op(), which can deadlock because fscrypt_get_encryption_info() isn't GFP_NOFS-safe. For more details about this problem, see the earlier patch "fscrypt: add fscrypt_prepare_new_inode() and fscrypt_set_context()". This also fixes a f2fs-specific deadlock when the filesystem is mounted with '-o test_dummy_encryption' and a file is created in an unencrypted directory other than the root directory: INFO: task touch:207 blocked for more than 30 seconds. Not tainted 5.9.0-rc4-00099-g729e3d0919844 #2 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:touch state:D stack: 0 pid: 207 ppid: 167 flags:0x00000000 Call Trace: [...] lock_page include/linux/pagemap.h:548 [inline] pagecache_get_page+0x25e/0x310 mm/filemap.c:1682 find_or_create_page include/linux/pagemap.h:348 [inline] grab_cache_page include/linux/pagemap.h:424 [inline] f2fs_grab_cache_page fs/f2fs/f2fs.h:2395 [inline] f2fs_grab_cache_page fs/f2fs/f2fs.h:2373 [inline] __get_node_page.part.0+0x39/0x2d0 fs/f2fs/node.c:1350 __get_node_page fs/f2fs/node.c:35 [inline] f2fs_get_node_page+0x2e/0x60 fs/f2fs/node.c:1399 read_inline_xattr+0x88/0x140 fs/f2fs/xattr.c:288 lookup_all_xattrs+0x1f9/0x2c0 fs/f2fs/xattr.c:344 f2fs_getxattr+0x9b/0x160 fs/f2fs/xattr.c:532 f2fs_get_context+0x1e/0x20 fs/f2fs/super.c:2460 fscrypt_get_encryption_info+0x9b/0x450 fs/crypto/keysetup.c:472 fscrypt_inherit_context+0x2f/0xb0 fs/crypto/policy.c:640 f2fs_init_inode_metadata+0xab/0x340 fs/f2fs/dir.c:540 f2fs_add_inline_entry+0x145/0x390 fs/f2fs/inline.c:621 f2fs_add_dentry+0x31/0x80 fs/f2fs/dir.c:757 f2fs_do_add_link+0xcd/0x130 fs/f2fs/dir.c:798 f2fs_add_link fs/f2fs/f2fs.h:3234 [inline] f2fs_create+0x104/0x290 fs/f2fs/namei.c:344 lookup_open.isra.0+0x2de/0x500 fs/namei.c:3103 open_last_lookups+0xa9/0x340 fs/namei.c:3177 path_openat+0x8f/0x1b0 fs/namei.c:3365 do_filp_open+0x87/0x130 fs/namei.c:3395 do_sys_openat2+0x96/0x150 fs/open.c:1168 [...] That happened because f2fs_add_inline_entry() locks the directory inode's page in order to add the dentry, then f2fs_get_context() tries to lock it recursively in order to read the encryption xattr. This problem is specific to "test_dummy_encryption" because normally the directory's fscrypt_info would be set up prior to f2fs_add_inline_entry() in order to encrypt the new filename. Regardless, the new design fixes this test_dummy_encryption deadlock as well as potential deadlocks with fs reclaim, by setting up any needed fscrypt_info structs prior to taking so many locks. The test_dummy_encryption deadlock was reported by Daniel Rosenberg. Reported-by: Daniel Rosenberg Acked-by: Jaegeuk Kim Link: https://lore.kernel.org/r/20200917041136.178600-5-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 02ce5316afc86274c55c7b07a81ad6411d28f077 Author: Eric Biggers Date: Wed Sep 16 21:11:26 2020 -0700 ext4: use fscrypt_prepare_new_inode() and fscrypt_set_context() Convert ext4 to use the new functions fscrypt_prepare_new_inode() and fscrypt_set_context(). This avoids calling fscrypt_get_encryption_info() from within a transaction, which can deadlock because fscrypt_get_encryption_info() isn't GFP_NOFS-safe. For more details about this problem, see the earlier patch "fscrypt: add fscrypt_prepare_new_inode() and fscrypt_set_context()". Link: https://lore.kernel.org/r/20200917041136.178600-4-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 177cc0e71008b7a0737bf55c88538d0b9e6e9191 Author: Eric Biggers Date: Wed Sep 16 21:11:25 2020 -0700 ext4: factor out ext4_xattr_credits_for_new_inode() To compute a new inode's xattr credits, we need to know whether the inode will be encrypted or not. When we switch to use the new helper function fscrypt_prepare_new_inode(), we won't find out whether the inode will be encrypted until slightly later than is currently the case. That will require moving the code block that computes the xattr credits. To make this easier and reduce the length of __ext4_new_inode(), move this code block into a new function ext4_xattr_credits_for_new_inode(). Link: https://lore.kernel.org/r/20200917041136.178600-3-ebiggers@kernel.org Signed-off-by: Eric Biggers commit a992b20cd4ee360dbbe6f69339cb07146e4304d6 Author: Eric Biggers Date: Wed Sep 16 21:11:24 2020 -0700 fscrypt: add fscrypt_prepare_new_inode() and fscrypt_set_context() fscrypt_get_encryption_info() is intended to be GFP_NOFS-safe. But actually it isn't, since it uses functions like crypto_alloc_skcipher() which aren't GFP_NOFS-safe, even when called under memalloc_nofs_save(). Therefore it can deadlock when called from a context that needs GFP_NOFS, e.g. during an ext4 transaction or between f2fs_lock_op() and f2fs_unlock_op(). This happens when creating a new encrypted file. We can't fix this by just not setting up the key for new inodes right away, since new symlinks need their key to encrypt the symlink target. So we need to set up the new inode's key before starting the transaction. But just calling fscrypt_get_encryption_info() earlier doesn't work, since it assumes the encryption context is already set, and the encryption context can't be set until the transaction. The recently proposed fscrypt support for the ceph filesystem (https://lkml.kernel.org/linux-fscrypt/20200821182813.52570-1-jlayton@kernel.org/T/#u) will have this same ordering problem too, since ceph will need to encrypt new symlinks before setting their encryption context. Finally, f2fs can deadlock when the filesystem is mounted with '-o test_dummy_encryption' and a new file is created in an existing unencrypted directory. Similarly, this is caused by holding too many locks when calling fscrypt_get_encryption_info(). To solve all these problems, add new helper functions: - fscrypt_prepare_new_inode() sets up a new inode's encryption key (fscrypt_info), using the parent directory's encryption policy and a new random nonce. It neither reads nor writes the encryption context. - fscrypt_set_context() persists the encryption context of a new inode, using the information from the fscrypt_info already in memory. This replaces fscrypt_inherit_context(). Temporarily keep fscrypt_inherit_context() around until all filesystems have been converted to use fscrypt_set_context(). Acked-by: Jeff Layton Link: https://lore.kernel.org/r/20200917041136.178600-2-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 66db854b1f62dbee48ec7373f149fa30e4b3dd4e Author: Kishon Vijay Abraham I Date: Mon Sep 14 20:51:15 2020 +0530 arm64: dts: ti: k3-j721e-common-proc-board: Configure the PCIe instances J721E Common Processor Board has PCIe connectors for the 1st three PCIe instances. Configure the three PCIe instances in RC mode and disable the 4th PCIe instance. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20200914152115.1788-3-kishon@ti.com commit 4e5833884f6656042eb100e9bcd68072e3338b25 Author: Kishon Vijay Abraham I Date: Mon Sep 14 20:51:14 2020 +0530 arm64: dts: ti: k3-j721e-main: Add PCIe device tree nodes Add PCIe device tree nodes (both RC and EP) for the four PCIe instances here. Also add the missing translations required in the "ranges" DT property of cbass_main to access all the four PCIe instances. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20200914152115.1788-2-kishon@ti.com commit 70d839e2761d22eba6facdb3b65faea4d57f355d Author: Elaine Zhang Date: Mon Sep 14 10:23:16 2020 +0800 clk: rockchip: rk3399: Support module build support CLK_OF_DECLARE and builtin_platform_driver_probe double clk init method. add module author, description and license to support building Soc Rk3399 clock driver as module. Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200914022316.24045-1-zhangqing@rock-chips.com Signed-off-by: Heiko Stuebner commit 4d98ed1e126495016f2a3ef4db6379855c4aacf2 Author: Elaine Zhang Date: Mon Sep 14 10:23:04 2020 +0800 clk: rockchip: fix the clk config to support module build use CONFIG_COMMON_CLK_ROCKCHIP for Rk common clk drivers. use CONFIG_CLK_RKXX for Rk soc clk driver. Mark CONFIG_CLK_RK3399 to "tristate", to support building Rk3399 SoC clock driver as module. Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200914022304.23908-1-zhangqing@rock-chips.com Signed-off-by: Heiko Stuebner commit ea650c26611dd61adfcc8647d6144f2c9f453d90 Author: Elaine Zhang Date: Mon Sep 14 10:22:23 2020 +0800 clk: rockchip: Export some clock common APIs for module drivers This is used by the Rockchip clk driver, export it to allow that driver to be compiled as a module. Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200914022225.23613-5-zhangqing@rock-chips.com Signed-off-by: Heiko Stuebner commit 37353491d1a8c207685c138c3640bd43864b70d9 Author: Elaine Zhang Date: Mon Sep 14 10:22:22 2020 +0800 clk: rockchip: Export rockchip_register_softrst() This is used by the Rockchip clk driver, export it to allow that driver to be compiled as a module.. Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200914022225.23613-4-zhangqing@rock-chips.com Signed-off-by: Heiko Stuebner commit f73907de3493b94d80af5122bcacc98f0e7b295b Author: Elaine Zhang Date: Mon Sep 14 10:22:21 2020 +0800 clk: rockchip: Export rockchip_clk_register_ddrclk() This is used by the Rockchip clk driver, export it to allow that driver to be compiled as a module.. Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200914022225.23613-3-zhangqing@rock-chips.com Signed-off-by: Heiko Stuebner commit 63207c37eac4f15fdebac14685a315c259c0a780 Author: Elaine Zhang Date: Mon Sep 14 10:22:20 2020 +0800 clk: rockchip: Use clk_hw_register_composite instead of clk_register_composite calls clk_hw_register_composite it's already exported. Preparation for compilation of rK common clock drivers into modules. Reported-by: kernel test robot Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang Reviewed-by: Heiko Stuebner Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200914022225.23613-2-zhangqing@rock-chips.com Signed-off-by: Heiko Stuebner commit 816e87253dec6686d2ef1bc2d84e82f033555046 Author: Krzysztof Kozlowski Date: Wed Sep 16 18:17:40 2020 +0200 clk: rockchip: rk3308: drop unused mux_timer_src_p The parent names 'mux_timer_src_p' is not used: In file included from drivers/clk/rockchip/clk-rk3308.c:13:0: drivers/clk/rockchip/clk-rk3308.c:136:7: warning: ‘mux_timer_src_p’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200916161740.14173-6-krzk@kernel.org Signed-off-by: Heiko Stuebner commit 2e3df760cd7c284494d874726e4f13ae9c34f068 Merge: bf3c0e5e7102f cf59eb13e151e Author: Paolo Bonzini Date: Tue Sep 22 08:18:16 2020 -0400 Merge tag 'kvm-ppc-next-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD PPC KVM update for 5.10 - Fix for running nested guests with in-kernel IRQ chip - Fix race condition causing occasional host hard lockup - Minor cleanups and bugfixes commit e82ed736ad2d2dddf1384fc4c8a0f26021af04fe Author: Andra Paraschiv Date: Mon Sep 21 15:17:32 2020 +0300 MAINTAINERS: Add entry for the Nitro Enclaves driver Add entry in the MAINTAINERS file for the Nitro Enclaves files such as the documentation, the header files, the driver itself and the user space sample. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Update the location of the documentation, as it has been moved to the "virt" directory. v7 -> v8 * No changes. v6 -> v7 * No changes. v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * No changes. v2 -> v3 * Update file entries to be in alphabetical order. v1 -> v2 * No changes. Reviewed-by: Alexander Graf Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-19-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit bf15d79ce142fe1d01eb88bdad96367a3887648c Author: Andra Paraschiv Date: Mon Sep 21 15:17:31 2020 +0300 nitro_enclaves: Add overview documentation Add documentation on the overview of Nitro Enclaves. Include it in the virtualization specific directory. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Move the Nitro Enclaves documentation to the "virt" directory and add an entry for it in the corresponding index file. v7 -> v8 * Add info about the primary / parent VM CID value. * Update reference link for huge pages. * Add reference link for the x86 boot protocol. * Add license mention and update doc title / chapter formatting. v6 -> v7 * No changes. v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * Update doc type from .txt to .rst. * Update documentation based on the changes from v4. v2 -> v3 * No changes. v1 -> v2 * New in v2. Reviewed-by: Alexander Graf Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-18-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit acc4229c39903dfaf97512f5738490d3bdafcd0a Author: Andra Paraschiv Date: Mon Sep 21 15:17:30 2020 +0300 nitro_enclaves: Add sample for ioctl interface usage Add a user space sample for the usage of the ioctl interface provided by the Nitro Enclaves driver. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * No changes. v7 -> v8 * Track NE custom error codes for invalid page size, invalid flags and enclave CID. * Update the heartbeat logic to have a listener fd first, then start the enclave and then accept connection to get the heartbeat. * Update the reference link to the hugetlb documentation. v6 -> v7 * Track POLLNVAL as poll event in addition to POLLHUP. v5 -> v6 * Remove "rc" mentioning when printing errno string. * Remove the ioctl to query API version. * Include usage info for NUMA-aware hugetlb configuration. * Update documentation to kernel-doc format. * Add logic for enclave image loading. v4 -> v5 * Print enclave vCPU ids when they are created. * Update logic to map the modified vCPU ioctl call. * Add check for the path to the enclave image to be less than PATH_MAX. * Update the ioctl calls error checking logic to match the NE specific error codes. v3 -> v4 * Update usage details to match the updates in v4. * Update NE ioctl interface usage. v2 -> v3 * Remove the include directory to use the uapi from the kernel. * Remove the GPL additional wording as SPDX-License-Identifier is already in place. v1 -> v2 * New in v2. Reviewed-by: Alexander Graf Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-17-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 0f5c7b7484394e26afc07c063290fb43c4ba42c7 Author: Andra Paraschiv Date: Mon Sep 21 15:17:29 2020 +0300 nitro_enclaves: Add Makefile for the Nitro Enclaves driver Add Makefile for the Nitro Enclaves driver, considering the option set in the kernel config. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Remove -Wall flags, could use W=1 as an option for this. v7 -> v8 * No changes. v6 -> v7 * No changes. v5 -> v6 * No changes. v4 -> v5 * No changes. v3 -> v4 * No changes. v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is already in place. v1 -> v2 * Update path to Makefile to match the drivers/virt/nitro_enclaves directory. Reviewed-by: Alexander Graf Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-16-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 07499cc661a926eb4ca19604502e3f0bda2aa4bf Author: Andra Paraschiv Date: Mon Sep 21 15:17:28 2020 +0300 nitro_enclaves: Add Kconfig for the Nitro Enclaves driver Add kernel config entry for Nitro Enclaves, including dependencies. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * No changes. v7 -> v8 * No changes. v6 -> v7 * Remove, for now, the dependency on ARM64 arch. x86 is currently supported, with Arm to come afterwards. The NE kernel driver can be built for aarch64 arch. v5 -> v6 * No changes. v4 -> v5 * Add arch dependency for Arm / x86. v3 -> v4 * Add PCI and SMP dependencies. v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is already in place. v1 -> v2 * Update path to Kconfig to match the drivers/virt/nitro_enclaves directory. * Update help in Kconfig. Reviewed-by: Alexander Graf Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-15-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 9c8eb50fe9e2bb8a2e725979e052fbf592b6b799 Author: Andra Paraschiv Date: Mon Sep 21 15:17:27 2020 +0300 nitro_enclaves: Add logic for terminating an enclave An enclave is associated with an fd that is returned after the enclave creation logic is completed. This enclave fd is further used to setup enclave resources. Once the enclave needs to be terminated, the enclave fd is closed. Add logic for enclave termination, that is mapped to the enclave fd release callback. Free the internal enclave info used for bookkeeping. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Use the ne_devs data structure to get the refs for the NE PCI device. v7 -> v8 * No changes. v6 -> v7 * Remove the pci_dev_put() call as the NE misc device parent field is used now to get the NE PCI device. * Update the naming and add more comments to make more clear the logic of handling full CPU cores and dedicating them to the enclave. v5 -> v6 * Update documentation to kernel-doc format. * Use directly put_page() instead of unpin_user_pages(), to match the get_user_pages() calls. v4 -> v5 * Release the reference to the NE PCI device on enclave fd release. * Adapt the logic to cpumask enclave vCPU ids and CPU cores. * Remove sanity checks for situations that shouldn't happen, only if buggy system or broken logic at all. v3 -> v4 * Use dev_err instead of custom NE log pattern. v2 -> v3 * Remove the WARN_ON calls. * Update static calls sanity checks. * Update kzfree() calls to kfree(). v1 -> v2 * Add log pattern for NE. * Remove the BUG_ON calls. * Update goto labels to match their purpose. * Add early exit in release() if there was a slot alloc error in the fd creation path. Reviewed-by: Alexander Graf Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-14-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 111c775a5f0dc8c509c31ccfbf2209ec545107a0 Author: Andra Paraschiv Date: Mon Sep 21 15:17:26 2020 +0300 nitro_enclaves: Add logic for starting an enclave After all the enclave resources are set, the enclave is ready for beginning to run. Add ioctl command logic for starting an enclave after all its resources, memory regions and CPUs, have been set. The enclave start information includes the local channel addressing - vsock CID - and the flags associated with the enclave. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Use the ne_devs data structure to get the refs for the NE PCI device. v7 -> v8 * Add check for invalid enclave CID value e.g. well-known CIDs and parent VM CID. * Add custom error code for incorrect flag in enclave start info and invalid enclave CID. v6 -> v7 * Update the naming and add more comments to make more clear the logic of handling full CPU cores and dedicating them to the enclave. v5 -> v6 * Check for invalid enclave start flags. * Update documentation to kernel-doc format. v4 -> v5 * Add early exit on enclave start ioctl function call error. * Move sanity checks in the enclave start ioctl function, outside of the switch-case block. * Remove log on copy_from_user() / copy_to_user() failure. v3 -> v4 * Use dev_err instead of custom NE log pattern. * Update the naming for the ioctl command from metadata to info. * Check for minimum enclave memory size. v2 -> v3 * Remove the WARN_ON calls. * Update static calls sanity checks. v1 -> v2 * Add log pattern for NE. * Check if enclave state is init when starting an enclave. * Remove the BUG_ON calls. Reviewed-by: Alexander Graf Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-13-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 7dc9d4309fdb7773df13a17e203c16966676f21a Author: Andra Paraschiv Date: Mon Sep 21 15:17:25 2020 +0300 nitro_enclaves: Add logic for setting an enclave memory region Another resource that is being set for an enclave is memory. User space memory regions, that need to be backed by contiguous memory regions, are associated with the enclave. One solution for allocating / reserving contiguous memory regions, that is used for integration, is hugetlbfs. The user space process that is associated with the enclave passes to the driver these memory regions. The enclave memory regions need to be from the same NUMA node as the enclave CPUs. Add ioctl command logic for setting user space memory region for an enclave. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Use the ne_devs data structure to get the refs for the NE PCI device. v7 -> v8 * Add early check, while getting user pages, to be multiple of 2 MiB for the pages that back the user space memory region. * Add custom error code for incorrect user space memory region flag. * Include in a separate function the sanity checks for each page of the user space memory region. v6 -> v7 * Update check for duplicate user space memory regions to cover additional possible scenarios. v5 -> v6 * Check for max number of pages allocated for the internal data structure for pages. * Check for invalid memory region flags. * Check for aligned physical memory regions. * Update documentation to kernel-doc format. * Check for duplicate user space memory regions. * Use directly put_page() instead of unpin_user_pages(), to match the get_user_pages() calls. v4 -> v5 * Add early exit on set memory region ioctl function call error. * Remove log on copy_from_user() failure. * Exit without unpinning the pages on NE PCI dev request failure as memory regions from the user space range may have already been added. * Add check for the memory region user space address to be 2 MiB aligned. * Update logic to not have a hardcoded check for 2 MiB memory regions. v3 -> v4 * Check enclave memory regions are from the same NUMA node as the enclave CPUs. * Use dev_err instead of custom NE log pattern. * Update the NE ioctl call to match the decoupling from the KVM API. v2 -> v3 * Remove the WARN_ON calls. * Update static calls sanity checks. * Update kzfree() calls to kfree(). v1 -> v2 * Add log pattern for NE. * Update goto labels to match their purpose. * Remove the BUG_ON calls. * Check if enclave max memory regions is reached when setting an enclave memory region. * Check if enclave state is init when setting an enclave memory region. Reviewed-by: Alexander Graf Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-12-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 988b7a471726209330b739adafc54563cbdbf986 Author: Andra Paraschiv Date: Mon Sep 21 15:17:24 2020 +0300 nitro_enclaves: Add logic for getting the enclave image load info Before setting the memory regions for the enclave, the enclave image needs to be placed in memory. After the memory regions are set, this memory cannot be used anymore by the VM, being carved out. Add ioctl command logic to get the offset in enclave memory where to place the enclave image. Then the user space tooling copies the enclave image in the memory using the given memory offset. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * No changes. v7 -> v8 * Add custom error code for incorrect enclave image load info flag. v6 -> v7 * No changes. v5 -> v6 * Check for invalid enclave image load flags. v4 -> v5 * Check for the enclave not being started when invoking this ioctl call. * Remove log on copy_from_user() / copy_to_user() failure. v3 -> v4 * Use dev_err instead of custom NE log pattern. * Set enclave image load offset based on flags. * Update the naming for the ioctl command from metadata to info. v2 -> v3 * No changes. v1 -> v2 * New in v2. Reviewed-by: Alexander Graf Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-11-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit ff8a4d3e3a99a32a54828e1b2af77aabdca2cabb Author: Andra Paraschiv Date: Mon Sep 21 15:17:23 2020 +0300 nitro_enclaves: Add logic for setting an enclave vCPU An enclave, before being started, has its resources set. One of its resources is CPU. A NE CPU pool is set and enclave CPUs are chosen from it. Offline the CPUs from the NE CPU pool during the pool setup and online them back during the NE CPU pool teardown. The CPU offline is necessary so that there would not be more vCPUs than physical CPUs available to the primary / parent VM. In that case the CPUs would be overcommitted and would change the initial configuration of the primary / parent VM of having dedicated vCPUs to physical CPUs. The enclave CPUs need to be full cores and from the same NUMA node. CPU 0 and its siblings have to remain available to the primary / parent VM. Add ioctl command logic for setting an enclave vCPU. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Use the ne_devs data structure to get the refs for the NE PCI device. v7 -> v8 * No changes. v6 -> v7 * Check for error return value when setting the kernel parameter string. * Use the NE misc device parent field to get the NE PCI device. * Update the naming and add more comments to make more clear the logic of handling full CPU cores and dedicating them to the enclave. * Calculate the number of threads per core and not use smp_num_siblings that is x86 specific. v5 -> v6 * Check CPUs are from the same NUMA node before going through CPU siblings during the NE CPU pool setup. * Update documentation to kernel-doc format. v4 -> v5 * Set empty string in case of invalid NE CPU pool. * Clear NE CPU pool mask on pool setup failure. * Setup NE CPU cores out of the NE CPU pool. * Early exit on NE CPU pool setup if enclave(s) already running. * Remove sanity checks for situations that shouldn't happen, only if buggy system or broken logic at all. * Add check for maximum vCPU id possible before looking into the CPU pool. * Remove log on copy_from_user() / copy_to_user() failure and on admin capability check for setting the NE CPU pool. * Update the ioctl call to not create a file descriptor for the vCPU. * Split the CPU pool usage logic in 2 separate functions - one to get a CPU from the pool and the other to check the given CPU is available in the pool. v3 -> v4 * Setup the NE CPU pool at runtime via a sysfs file for the kernel parameter. * Check enclave CPUs to be from the same NUMA node. * Use dev_err instead of custom NE log pattern. * Update the NE ioctl call to match the decoupling from the KVM API. v2 -> v3 * Remove the WARN_ON calls. * Update static calls sanity checks. * Update kzfree() calls to kfree(). * Remove file ops that do nothing for now - open, ioctl and release. v1 -> v2 * Add log pattern for NE. * Update goto labels to match their purpose. * Remove the BUG_ON calls. * Check if enclave state is init when setting enclave vCPU. Reviewed-by: Alexander Graf Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-10-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 38907e124088b2f5b176acdf3d89926c09d3206a Author: Andra Paraschiv Date: Mon Sep 21 15:17:22 2020 +0300 nitro_enclaves: Add logic for creating an enclave VM Add ioctl command logic for enclave VM creation. It triggers a slot allocation. The enclave resources will be associated with this slot and it will be used as an identifier for triggering enclave run. Return a file descriptor, namely enclave fd. This is further used by the associated user space enclave process to set enclave resources and trigger enclave termination. The poll function is implemented in order to notify the enclave process when an enclave exits without a specific enclave termination command trigger e.g. when an enclave crashes. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Use the ne_devs data structure to get the refs for the NE PCI device. v7 -> v8 * No changes. v6 -> v7 * Use the NE misc device parent field to get the NE PCI device. * Update the naming and add more comments to make more clear the logic of handling full CPU cores and dedicating them to the enclave. v5 -> v6 * Update the code base to init the ioctl function in this patch. * Update documentation to kernel-doc format. v4 -> v5 * Release the reference to the NE PCI device on create VM error. * Close enclave fd on copy_to_user() failure; rename fd to enclave fd while at it. * Remove sanity checks for situations that shouldn't happen, only if buggy system or broken logic at all. * Remove log on copy_to_user() failure. v3 -> v4 * Use dev_err instead of custom NE log pattern. * Update the NE ioctl call to match the decoupling from the KVM API. * Add metadata for the NUMA node for the enclave memory and CPUs. v2 -> v3 * Remove the WARN_ON calls. * Update static calls sanity checks. * Update kzfree() calls to kfree(). * Remove file ops that do nothing for now - open. v1 -> v2 * Add log pattern for NE. * Update goto labels to match their purpose. * Remove the BUG_ON calls. Reviewed-by: Alexander Graf Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-9-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit bd47c995c0e4e7b5ea2b7074a92ca3ff95e25cd0 Author: Andra Paraschiv Date: Mon Sep 21 15:17:21 2020 +0300 nitro_enclaves: Init misc device providing the ioctl interface The Nitro Enclaves driver provides an ioctl interface to the user space for enclave lifetime management e.g. enclave creation / termination and setting enclave resources such as memory and CPU. This ioctl interface is mapped to a Nitro Enclaves misc device. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Use the ne_devs data structure to get the refs for the NE misc device in the NE PCI device driver logic. v7 -> v8 * Add define for the CID of the primary / parent VM. * Update the NE PCI driver shutdown logic to include misc device deregister. v6 -> v7 * Set the NE PCI device the parent of the NE misc device to be able to use it in the ioctl logic. * Update the naming and add more comments to make more clear the logic of handling full CPU cores and dedicating them to the enclave. v5 -> v6 * Remove the ioctl to query API version. * Update documentation to kernel-doc format. v4 -> v5 * Update the size of the NE CPU pool string from 4096 to 512 chars. v3 -> v4 * Use dev_err instead of custom NE log pattern. * Remove the NE CPU pool init during kernel module loading, as the CPU pool is now setup at runtime, via a sysfs file for the kernel parameter. * Add minimum enclave memory size definition. v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is already in place. * Remove the WARN_ON calls. * Remove linux/bug and linux/kvm_host includes that are not needed. * Remove "ratelimited" from the logs that are not in the ioctl call paths. * Remove file ops that do nothing for now - open and release. v1 -> v2 * Add log pattern for NE. * Update goto labels to match their purpose. * Update ne_cpu_pool data structure to include the global mutex. * Update NE misc device mode to 0660. * Check if the CPU siblings are included in the NE CPU pool, as full CPU cores are given for the enclave(s). Reviewed-by: Alexander Graf Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-8-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit e5d616d8bb50a1c1d01e9a89030a8bcb2107fd08 Author: Andra Paraschiv Date: Mon Sep 21 15:17:20 2020 +0300 nitro_enclaves: Handle out-of-band PCI device events In addition to the replies sent by the Nitro Enclaves PCI device in response to command requests, out-of-band enclave events can happen e.g. an enclave crashes. In this case, the Nitro Enclaves driver needs to be aware of the event and notify the corresponding user space process that abstracts the enclave. Register an MSI-X interrupt vector to be used for this kind of out-of-band events. The interrupt notifies that the state of an enclave changed and the driver logic scans the state of each running enclave to identify for which this notification is intended. Create an workqueue to handle the out-of-band events. Notify user space enclave process that is using a polling mechanism on the enclave fd. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Use the reference to the pdev directly from the ne_pci_dev instead of the one from the enclave data structure. v7 -> v8 * No changes. v6 -> v7 * No changes. v5 -> v6 * Update documentation to kernel-doc format. v4 -> v5 * Remove sanity checks for situations that shouldn't happen, only if buggy system or broken logic at all. v3 -> v4 * Use dev_err instead of custom NE log pattern. * Return IRQ_NONE when interrupts are not handled. v2 -> v3 * Remove the WARN_ON calls. * Update static calls sanity checks. * Remove "ratelimited" from the logs that are not in the ioctl call paths. v1 -> v2 * Add log pattern for NE. * Update goto labels to match their purpose. Reviewed-by: Alexander Graf Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-7-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit ad2b6980d0d3c7707de084f12d75f673af5fd017 Author: Andra Paraschiv Date: Mon Sep 21 15:17:19 2020 +0300 nitro_enclaves: Handle PCI device command requests The Nitro Enclaves PCI device exposes a MMIO space that this driver uses to submit command requests and to receive command replies e.g. for enclave creation / termination or setting enclave resources. Add logic for handling PCI device command requests based on the given command type. Register an MSI-X interrupt vector for command reply notifications to handle this type of communication events. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * No changes. v7 -> v8 * Update function signature for submit request and retrive reply functions as they only returned 0, no error code. * Include command type value in the error logs of ne_do_request(). v6 -> v7 * No changes. v5 -> v6 * Update documentation to kernel-doc format. v4 -> v5 * Remove sanity checks for situations that shouldn't happen, only if buggy system or broken logic at all. v3 -> v4 * Use dev_err instead of custom NE log pattern. * Return IRQ_NONE when interrupts are not handled. v2 -> v3 * Remove the WARN_ON calls. * Update static calls sanity checks. * Remove "ratelimited" from the logs that are not in the ioctl call paths. v1 -> v2 * Add log pattern for NE. * Remove the BUG_ON calls. * Update goto labels to match their purpose. * Add fix for kbuild report: https://lore.kernel.org/lkml/202004231644.xTmN4Z1z%25lkp@intel.com/ Reviewed-by: Alexander Graf Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-6-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 89308c11ae3ba38255cd7716809437576551561b Author: Andra Paraschiv Date: Mon Sep 21 15:17:18 2020 +0300 nitro_enclaves: Init PCI device driver The Nitro Enclaves PCI device is used by the kernel driver as a means of communication with the hypervisor on the host where the primary VM and the enclaves run. It handles requests with regard to enclave lifetime. Setup the PCI device driver and add support for MSI-X interrupts. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Init the reference to the ne_pci_dev in the ne_devs data structure. v7 -> v8 * Add NE PCI driver shutdown logic. v6 -> v7 * No changes. v5 -> v6 * Update documentation to kernel-doc format. v4 -> v5 * Remove sanity checks for situations that shouldn't happen, only if buggy system or broken logic at all. v3 -> v4 * Use dev_err instead of custom NE log pattern. * Update NE PCI driver name to "nitro_enclaves". v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is already in place. * Remove the WARN_ON calls. * Remove linux/bug include that is not needed. * Update static calls sanity checks. * Remove "ratelimited" from the logs that are not in the ioctl call paths. * Update kzfree() calls to kfree(). v1 -> v2 * Add log pattern for NE. * Update PCI device setup functions to receive PCI device data structure and then get private data from it inside the functions logic. * Remove the BUG_ON calls. * Add teardown function for MSI-X setup. * Update goto labels to match their purpose. * Implement TODO for NE PCI device disable state check. * Update function name for NE PCI device probe / remove. Reviewed-by: Alexander Graf Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Alexandru Ciobotaru Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-5-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 1df624892c1ee65daba0b2ebbac72e4d4442f83a Author: Andra Paraschiv Date: Mon Sep 21 15:17:17 2020 +0300 nitro_enclaves: Define enclave info for internal bookkeeping The Nitro Enclaves driver keeps an internal info per each enclave. This is needed to be able to manage enclave resources state, enclave notifications and have a reference of the PCI device that handles command requests for enclave lifetime management. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Add data structure to keep references to both Nitro Enclaves misc and PCI devices. v7 -> v8 * No changes. v6 -> v7 * Update the naming and add more comments to make more clear the logic of handling full CPU cores and dedicating them to the enclave. v5 -> v6 * Update documentation to kernel-doc format. * Include in the enclave memory region data structure the user space address and size for duplicate user space memory regions checks. v4 -> v5 * Include enclave cores field in the enclave metadata. * Update the vCPU ids data structure to be a cpumask instead of a list. v3 -> v4 * Add NUMA node field for an enclave metadata as the enclave memory and CPUs need to be from the same NUMA node. v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is already in place. v1 -> v2 * Add enclave memory regions and vcpus count for enclave bookkeeping. * Update ne_state comments to reflect NE_START_ENCLAVE ioctl naming update. Reviewed-by: Alexander Graf Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-4-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 0a44561768c5af57a18657b860fec918a558fd8e Author: Andra Paraschiv Date: Mon Sep 21 15:17:16 2020 +0300 nitro_enclaves: Define the PCI device interface The Nitro Enclaves (NE) driver communicates with a new PCI device, that is exposed to a virtual machine (VM) and handles commands meant for handling enclaves lifetime e.g. creation, termination, setting memory regions. The communication with the PCI device is handled using a MMIO space and MSI-X interrupts. This device communicates with the hypervisor on the host, where the VM that spawned the enclave itself runs, e.g. to launch a VM that is used for the enclave. Define the MMIO space of the NE PCI device, the commands that are provided by this device. Add an internal data structure used as private data for the PCI device driver and the function for the PCI device command requests handling. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * Fix indent for the NE PCI device command types enum. v7 -> v8 * No changes. v6 -> v7 * Update the documentation to include references to the NE PCI device id and MMIO bar. v5 -> v6 * Update documentation to kernel-doc format. v4 -> v5 * Add a TODO for including flags in the request to the NE PCI device to set a memory region for an enclave. It is not used for now. v3 -> v4 * Remove the "packed" attribute and include padding in the NE data structures. v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is already in place. v1 -> v2 * Update path naming to drivers/virt/nitro_enclaves. * Update NE_ENABLE_OFF / NE_ENABLE_ON defines. Reviewed-by: Alexander Graf Signed-off-by: Alexandru-Catalin Vasile Signed-off-by: Alexandru Ciobotaru Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-3-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 15b760c37ad3c3f2b922506eaca4ca8b4292e621 Author: Andra Paraschiv Date: Mon Sep 21 15:17:15 2020 +0300 nitro_enclaves: Add ioctl interface definition The Nitro Enclaves driver handles the enclave lifetime management. This includes enclave creation, termination and setting up its resources such as memory and CPU. An enclave runs alongside the VM that spawned it. It is abstracted as a process running in the VM that launched it. The process interacts with the NE driver, that exposes an ioctl interface for creating an enclave and setting up its resources. Changelog v9 -> v10 * Update commit message to include the changelog before the SoB tag(s). v8 -> v9 * No changes. v7 -> v8 * Add NE custom error codes for user space memory regions not backed by pages multiple of 2 MiB, invalid flags and enclave CID. * Add max flag value for enclave image load info. v6 -> v7 * Clarify in the ioctls documentation that the return value is -1 and errno is set on failure. * Update the error code value for NE_ERR_INVALID_MEM_REGION_SIZE as it gets in user space as value 25 (ENOTTY) instead of 515. Update the NE custom error codes values range to not be the same as the ones defined in include/linux/errno.h, although these are not propagated to user space. v5 -> v6 * Fix typo in the description about the NE CPU pool. * Update documentation to kernel-doc format. * Remove the ioctl to query API version. v4 -> v5 * Add more details about the ioctl calls usage e.g. error codes, file descriptors used. * Update the ioctl to set an enclave vCPU to not return a file descriptor. * Add specific NE error codes. v3 -> v4 * Decouple NE ioctl interface from KVM API. * Add NE API version and the corresponding ioctl call. * Add enclave / image load flags options. v2 -> v3 * Remove the GPL additional wording as SPDX-License-Identifier is already in place. v1 -> v2 * Add ioctl for getting enclave image load metadata. * Update NE_ENCLAVE_START ioctl name to NE_START_ENCLAVE. * Add entry in Documentation/userspace-api/ioctl/ioctl-number.rst for NE ioctls. * Update NE ioctls definition based on the updated ioctl range for major and minor. Reviewed-by: Alexander Graf Reviewed-by: Stefan Hajnoczi Signed-off-by: Alexandru Vasile Signed-off-by: Andra Paraschiv Link: https://lore.kernel.org/r/20200921121732.44291-2-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 55c5cc63ab3277aa20637dc20f6528987ac23743 Author: Cheng-Yi Chiang Date: Tue Sep 22 14:23:16 2020 +0800 ASoC: hdmi-codec: Use set_jack ops to set jack Use set_jack ops to set jack so machine drivers do not need to include hdmi-codec.h explicitly. Signed-off-by: Cheng-Yi Chiang Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200922062316.1172935-1-cychiang@chromium.org Signed-off-by: Mark Brown commit 2a32dbdc2c7db5463483fa01fb220fd1b770c6bc Author: Laurent Pinchart Date: Wed Sep 16 02:23:47 2020 +0300 drm: rcar-du: Put reference to VSP device The reference to the VSP device acquired with of_find_device_by_node() in rcar_du_vsp_init() is never released. Fix it with a drmm action, which gets run both in the probe error path and in the remove path. Fixes: 6d62ef3ac30b ("drm: rcar-du: Expose the VSP1 compositor through KMS planes") Reported-by: Yu Kuai Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart commit 709b66b4b745bca5324941cd4d7a34ffeba87cf0 Author: Lad Prabhakar Date: Fri Sep 11 11:07:41 2020 +0100 drm: rcar-du: Update description for DRM_RCAR_DW_HDMI Kconfig entry The rcar_dw_hdmi driver is also used on Renesas RZ/G2 SoCs. Update the Kconfig entry description to reflect this. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit f4dfa76d73f76eb0b0016d8ebacebb85db743018 Author: Laurent Pinchart Date: Sat Aug 8 00:07:21 2020 +0300 drm: rcar-du: Fix crash when enabling a non-visible plane The DU driver handles non-visible planes (fully clipped by the display's boundaries) by considering them as disabled. It thus disables the plane at the hardware level when the plane is moved off-screen. However, if the plane was previously disabled and is non-visible when it gets enabled, the attempt to disable it crashes, as the plane wasn't previously enabled. Fix it. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit dc86d6bc9bc3d0080bd18b54777a22b70eae4aa6 Author: Laurent Pinchart Date: Thu Aug 6 05:24:34 2020 +0300 drm: rcar-du: Fix pitch handling for fully planar YUV formats When creating a frame buffer, the driver verifies that the pitches for the chroma planes match the luma plane. This is done incorrectly for fully planar YUV formats, without taking horizontal subsampling into account. Fix it. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham commit ef84ad32f41c2b84560ca3577fb0cb85dd4895fb Author: Kuninori Morimoto Date: Tue Sep 8 09:34:32 2020 +0900 drm: rcar-du: Add r8a77961 support This patch adds R-Car M3-W+ (R8A77961) support which is compatible with the R-Car M3-W (R8A77960). Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart commit 460941cd6923fdfe731d12ca97a433bc4c2f0afb Author: Kuninori Morimoto Date: Tue Sep 8 09:34:17 2020 +0900 dt-bindings: display: renesas: dw-hdmi: Add R8A77961 support This patch adds R-Car M3-W+ (R8A77961) SoC bindings. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Acked-by: Rob Herring Signed-off-by: Laurent Pinchart commit 0356f0fbc53d7d787e4d827ed06241ce9df1fbfc Author: Kuninori Morimoto Date: Tue Sep 8 09:34:11 2020 +0900 dt-bindings: display: renesas: dw-hdmi: Tidyup example compatible The DT example erronously uses the "renesas,r8a7795-dw-hdmi", when the correct value is "renesas,r8a7795-hdmi". It is furthermore missing the generic "renesas,rcar-gen3-hdmi" compatible string. Fix it. Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham [Add "renesas,rcar-gen3-hdmi" and rework commit message] Signed-off-by: Laurent Pinchart commit 542d9a658eebac0e6054a5734cb1f893778a43f2 Author: Kuninori Morimoto Date: Tue Sep 8 09:34:04 2020 +0900 dt-bindings: display: renesas: du: Document the r8a77961 bindings Document the R-Car M3-W+ (R8A77961) SoC in the R-Car DU bindings. Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Acked-by: Rob Herring Signed-off-by: Laurent Pinchart commit 6d981d276110c7d6e866179db4bb1c6cbfcd1819 Author: Marian-Cristian Rotariu Date: Wed Aug 12 15:02:15 2020 +0100 drm: rcar-du: lvds: Add support for R8A774E1 SoC The LVDS encoder on RZ/G2H (R8A774E1) SoC is identical to R-Car Gen3 so just reuse the rcar_lvds_gen3_info structure to hookup R8A774E1 to LVDS encoder driver. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 0c905a0a30d16c43efc381a29f509fbff606b91d Author: Marian-Cristian Rotariu Date: Wed Aug 12 15:02:13 2020 +0100 dt-bindings: display: renesas,dw-hdmi: Add r8a774e1 support Document RZ/G2H (R8A774E1) SoC bindings. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Laurent Pinchart commit 45d6ec79dd42258ada43fedf3bb00c04ae7c17eb Author: Marian-Cristian Rotariu Date: Wed Aug 12 15:02:12 2020 +0100 dt-bindings: display: renesas,lvds: Document r8a774e1 bindings Document the RZ/G2H (R8A774E1) LVDS bindings. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Laurent Pinchart commit 31057d444d41ea820a5c61126e2c810a80a16e79 Author: Marian-Cristian Rotariu Date: Wed Aug 12 15:02:10 2020 +0100 drm: rcar-du: Add support for R8A774E1 SoC Hookup RZ/G2H (R8A774E1) to DU driver. R8A774E1 has one RGB output, one LVDS output and one HDMI output. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 4b6f2b971e8d142474b7ab7e6d3c23e38d83057f Author: Marian-Cristian Rotariu Date: Wed Aug 12 15:02:09 2020 +0100 dt-bindings: display: renesas,du: Document r8a774e1 bindings Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Laurent Pinchart commit 946a61ab2d758cc645f6e63f1a5e2731690c3943 Author: Biju Das Date: Mon Aug 10 16:22:18 2020 +0100 drm/bridge: lvds-codec: Add support for regulator Add the support for enabling optional regulator that may be used as VCC source. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart [Replaced 'error' variable with 'ret'] [Renamed regulator from 'vcc' to 'power'] Signed-off-by: Laurent Pinchart Reviewed-by: Biju Das commit 2cd9df2be75766452fef87c37ec37d91f4cbaf6b Author: Biju Das Date: Mon Aug 10 16:22:17 2020 +0100 dt-bindings: display: bridge: lvds-codec: Document power-supply property Document optional power-supply property that may be used to specify the regulator powering up the device. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Laurent Pinchart commit bf3c0e5e7102f5787d693379d9d384b813fe890b Merge: 32251b07d5321 976bc5e2aceed Author: Paolo Bonzini Date: Tue Sep 22 06:43:17 2020 -0400 Merge branch 'x86-seves-for-paolo' of https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into HEAD commit 4443390e08d34d5771ab444f601cf71b3c9634a4 Author: Jan Kara Date: Mon Sep 21 15:08:50 2020 +0200 reiserfs: Initialize inode keys properly reiserfs_read_locked_inode() didn't initialize key length properly. Use _make_cpu_key() macro for key initialization so that all key member are properly initialized. CC: stable@vger.kernel.org Reported-by: syzbot+d94d02749498bb7bab4b@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit a7be300de800e755714c71103ae4a0d205e41e99 Author: Jan Kara Date: Tue Sep 22 12:20:14 2020 +0200 udf: Fix memory leak when mounting udf_process_sequence() allocates temporary array for processing partition descriptors on volume which it fails to free. Free the array when it is not needed anymore. Fixes: 7b78fd02fb19 ("udf: Fix handling of Partition Descriptors") CC: stable@vger.kernel.org Reported-by: syzbot+128f4dd6e796c98b3760@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit 4a6a4c966ccf38b2d74c05bb7c7dd3b94dbb3c30 Author: Mikael Wikström Date: Tue Sep 22 12:07:15 2020 +0200 HID: multitouch: Lenovo X1 Tablet Gen2 trackpoint and buttons One more device that needs 40d5bb87 to resolve regression for the trackpoint and three mouse buttons on the type cover of the Lenovo X1 Tablet Gen2. Signed-off-by: Mikael Wikström Signed-off-by: Jiri Kosina commit 140958da9ab53a7df9e9ccc7678ea64655279ac1 Author: Mikael Wikström Date: Tue Sep 22 11:48:10 2020 +0200 HID: multitouch: Lenovo X1 Tablet Gen3 trackpoint and buttons One more device that needs 40d5bb87 to resolve regression for the trackpoint and three mouse buttons on the type cover of the Lenovo X1 Tablet Gen3. It is probably also needed for the Lenovo X1 Tablet Gen2 with PID 0x60a3 Signed-off-by: Mikael Wikström Signed-off-by: Jiri Kosina commit f35efc78add6439a9fbe611f2dd517641e82d067 Author: John Ogness Date: Sat Sep 19 00:40:21 2020 +0206 printk: remove dict ring Since there is no code that will ever store anything into the dict ring, remove it. If any future dictionary properties are to be added, these should be added to the struct printk_info. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200918223421.21621-4-john.ogness@linutronix.de commit 74caba7f2a0685575b3ee5330a118f5922485e02 Author: John Ogness Date: Mon Sep 21 13:24:45 2020 +0206 printk: move dictionary keys to dev_printk_info Dictionaries are only used for SUBSYSTEM and DEVICE properties. The current implementation stores the property names each time they are used. This requires more space than otherwise necessary. Also, because the dictionary entries are currently considered optional, it cannot be relied upon that they are always available, even if the writer wanted to store them. These issues will increase should new dictionary properties be introduced. Rather than storing the subsystem and device properties in the dict ring, introduce a struct dev_printk_info with separate fields to store only the property values. Embed this struct within the struct printk_info to provide guaranteed availability. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/87mu1jl6ne.fsf@jogness.linutronix.de commit aa9f6661eddd342e8d7a621a805beb7354d8d8f9 Author: Jing Xiangfeng Date: Tue Sep 22 16:13:22 2020 +0800 udf: Remove redundant initialization of variable ret After commit 9293fcfbc181 ("udf: Remove struct ustr as non-needed intermediate storage"), the variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it. Link: https://lore.kernel.org/r/20200922081322.70535-1-jingxiangfeng@huawei.com Signed-off-by: Jing Xiangfeng Signed-off-by: Jan Kara commit 2c3468893779480f90b4a7a8e3df0ade0c4b7a75 Author: Colin Ian King Date: Sun Sep 20 15:17:16 2020 +0100 HID: alps: clean up indentation issue There is an if statement that is indented too deeply, fix this by removing the extraneous tab. Signed-off-by: Colin Ian King Signed-off-by: Jiri Kosina commit cfe2790b163acdc9c058a63bff310923e84a16b4 Author: John Ogness Date: Sat Sep 19 00:40:19 2020 +0206 printk: move printk_info into separate array The majority of the size of a descriptor is taken up by meta data, which is often not of interest to the ringbuffer (for example, when performing state checks). Since descriptors are often temporarily stored on the stack, keeping their size minimal will help reduce stack pressure. Rather than embedding the printk_info into the descriptor, create a separate printk_info array. The index of a descriptor in the descriptor array corresponds to the printk_info with the same index in the printk_info array. The rules for validity of a printk_info match the existing rules for the data blocks: the descriptor must be in a consistent state. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200918223421.21621-2-john.ogness@linutronix.de commit 36725cb091c51104e74d1008097e5d4d10ff372f Author: Qinglang Miao Date: Mon Sep 21 21:10:33 2020 +0800 HID: intel-ish-hid: simplify the return expression of ishtp_bus_remove_device() Simplify the return expression. Signed-off-by: Qinglang Miao Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 6564d0ad67efb2d977e130e7448505ee538af016 Author: Takashi Iwai Date: Tue Sep 22 10:49:53 2020 +0200 ALSA: ctl: Workaround for lockdep warning wrt card->ctl_files_rwlock The recent change in lockdep for read lock caused the deadlock warnings in ALSA control code which uses the read_lock() for notification and else while write_lock_irqsave() is used for adding and removing the list entry. Although a deadlock would practically never hit in a real usage (the addition and the deletion can't happen with the notification), it's better to fix the read_lock() usage in a semantically correct way. This patch replaces the read_lock() calls with read_lock_irqsave() version for avoiding a reported deadlock. The notification code path takes the irq disablement in anyway, and other code paths are very short execution, hence there shouldn't be any big performance hit by this change. Fixes: e918188611f0 ("locking: More accurate annotations for read_lock()") Reported-by: syzbot+561a74f84100162990b2@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20200922084953.29018-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 912a6e2ef6dd895929e910e1c4025a0f34b743b6 Author: Krzysztof Kozlowski Date: Sun Sep 20 21:57:47 2020 +0200 arm64: dts: imx8mq-librem5: correct GPIO hog property Correct the name of property for GPIO specifier in GPIO hog. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit ac938aa9aec46db5914b089a8d3f018f2b37ec79 Author: Krzysztof Kozlowski Date: Sat Sep 19 16:06:47 2020 +0200 arm64: dts: imx8mm-var-som-symphony: Drop wake-up source from RTC The RTC on Symphony board does not have its interrupt pin connected to the SoC, therefore it is not capable of waking up. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit d8fa4792dad3abc723644d5dd9dd94853593d072 Author: Krzysztof Kozlowski Date: Thu Sep 17 20:54:49 2020 +0200 arm64: dts: imx8mq: correct interrupt flags GPIO_ACTIVE_x flags are not correct in the context of interrupt flags. These are simple defines so they could be used in DTS but they will not have the same meaning: 1. GPIO_ACTIVE_HIGH = 0 = IRQ_TYPE_NONE 2. GPIO_ACTIVE_LOW = 1 = IRQ_TYPE_EDGE_RISING Correct the interrupt flags, assuming the author of the code wanted same logical behavior behind the name "ACTIVE_xxx", this is: ACTIVE_LOW => IRQ_TYPE_LEVEL_LOW Signed-off-by: Krzysztof Kozlowski Acked-By: Tim Harvey Signed-off-by: Shawn Guo commit 4153f7811a9b2b6f65f9ba5470d4f3e020ad1b7c Author: Krzysztof Kozlowski Date: Thu Sep 17 20:54:48 2020 +0200 arm64: dts: imx8mn: correct interrupt flags GPIO_ACTIVE_x flags are not correct in the context of interrupt flags. These are simple defines so they could be used in DTS but they will not have the same meaning: 1. GPIO_ACTIVE_HIGH = 0 = IRQ_TYPE_NONE 2. GPIO_ACTIVE_LOW = 1 = IRQ_TYPE_EDGE_RISING Correct the interrupt flags, assuming the author of the code wanted same logical behavior behind the name "ACTIVE_xxx", this is: ACTIVE_LOW => IRQ_TYPE_LEVEL_LOW For level low interrupts, enable also internal pull up. It is required at least on imx8mm-evk, according to schematics. Signed-off-by: Krzysztof Kozlowski Acked-By: Tim Harvey Signed-off-by: Shawn Guo commit 5f67317bd967bbdde945ce3a586d3841f8a5bf65 Author: Krzysztof Kozlowski Date: Thu Sep 17 20:54:47 2020 +0200 arm64: dts: imx8mm: correct interrupt flags GPIO_ACTIVE_x flags are not correct in the context of interrupt flags. These are simple defines so they could be used in DTS but they will not have the same meaning: 1. GPIO_ACTIVE_HIGH = 0 = IRQ_TYPE_NONE 2. GPIO_ACTIVE_LOW = 1 = IRQ_TYPE_EDGE_RISING Correct the interrupt flags, assuming the author of the code wanted same logical behavior behind the name "ACTIVE_xxx", this is: ACTIVE_LOW => IRQ_TYPE_LEVEL_LOW ACTIVE_HIGH => IRQ_TYPE_LEVEL_HIGH In case of level low interrupts, enable also internal pull up. It is required at least on imx8mm-evk, according to schematics. The schematics for Variscite imx8mm-var-som are not available and I was unable to get proper configuration from Variscite. Signed-off-by: Krzysztof Kozlowski Acked-By: Tim Harvey Signed-off-by: Shawn Guo commit 1d93b292af67e1848a87991c59be6929187cba23 Author: Krzysztof Kozlowski Date: Thu Sep 17 20:41:31 2020 +0200 arm64: dts: imx8mm-var-som-symphony: fix ptn5150 interrupts Conversion of int-gpios into interrupts property requires also interrupt-parent and uses different flags. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit f3cbcbbb4b38eb73917591b9c4fea014b167db98 Author: Zhao Qiang Date: Tue Sep 22 11:31:46 2020 +0800 arm64: dts: layerscape: correct watchdog clocks for LS1088A On LS1088A, watchdog clk are divided by 16, correct it in dts. Signed-off-by: Zhao Qiang Signed-off-by: Shawn Guo commit 499b7678758637ce47fa270fcb36d2c8e1c9fbc1 Author: Michael Walle Date: Mon Sep 14 23:43:40 2020 +0200 arm64: dts: freescale: sl28: enable fan support Add a pwm-fan mapped to the PWM channel 0 which is connected to the fan connector of the carrier. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 3672d6fa6eae5c09345a32163516df51b9f78dff Author: Michael Walle Date: Mon Sep 14 23:43:39 2020 +0200 arm64: dts: freescale: sl28: enable LED support Now that we have support for GPIO lines of the SMARC connector, enable LED support on the KBox A-230-LS. There are two LEDs without fixed functions, one is yellow and one is green. Unfortunately, it is just one multi-color LED, thus while it is possible to enable both at the same time it is hard to tell the difference between "yellow only" and "yellow and green". Signed-off-by: Michael Walle Acked-by: Pavel Machek Signed-off-by: Shawn Guo commit 945710bbdbdf6c44f467b705c327556efee67b04 Author: Michael Walle Date: Mon Sep 14 23:43:38 2020 +0200 arm64: dts: freescale: sl28: map GPIOs to input events Now that we have support for GPIO lines of the SMARC connector, map the sleep, power and lid switch signals to the corresponding keys using the gpio-keys and gpio-keys-polled drivers. The power and sleep signals have dedicated interrupts, thus we use these ones. The lid switch is just mapped to a GPIO input and needs polling. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit c86e4202fde491e5fa578a3bf3bcfd056441e18d Author: Michael Walle Date: Mon Sep 14 23:43:37 2020 +0200 arm64: dts: freescale: sl28: enable sl28cpld Add the board management controller node. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit d367e7d3351edc526133e4bd258dac2dd0b4ef4f Author: Fabio Estevam Date: Mon Sep 14 11:38:46 2020 -0300 arm64: dts: imx8mq-evk: Add MIPI DSI support imx8mq-evk has a MIPI DSI port that can be used to connect a Raydium RM67191 panel. Add support for it. Signed-off-by: Fabio Estevam Acked-by: Guido Günther Signed-off-by: Shawn Guo commit f7d48ffcfc6efc6dc35ef34f4415b311a08d0840 Author: Wasim Khan Date: Sun Sep 13 10:51:16 2020 +0530 arm64: dts: layerscape: Add label to pcie nodes Add label to pcie nodes so that they are easy to refer. Signed-off-by: Wasim Khan Signed-off-by: Shawn Guo commit 7358e05bddca16ec230596d218df62f998e310ae Author: Krzysztof Kozlowski Date: Sat Sep 19 16:13:32 2020 +0200 arm64: dts: imx8mn-var-som-symphony: Add Variscite Symphony board with VAR-SOM-MX8MN Add a basic DTS for Variscite Symphony evaluation kit with VAR-SOM-MX8MN (i.MX 8M Nano) System on Module. This brings up the board with basic functionalities although still few issues remain (e.g. I2C3 and USB OTG port, although it might not be the problem of DTS). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit ade0176dd8a0daf4448a817a718263b64913c37c Author: Krzysztof Kozlowski Date: Sat Sep 19 16:13:31 2020 +0200 arm64: dts: imx8mn-var-som: Add Variscite VAR-SOM-MX8MN System on Module Add DTSI of Variscite VAR-SOM-MX8MN (Nano) System on Module in a basic version, delivered with Variscite Symphony Evaluation kit. This version comes with: - 1 GB of RAM, - 16 GB eMMC, - Gigabit Ethernet PHY, - 802.11 ac/a/b/g/n WiFi with 4.2 Bluetooth, - CAN bus, - Audio codec (not yet configured in DTSI). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 8e5910d2dc391b9e8e3e5831b3524f32c419ef18 Author: Krzysztof Kozlowski Date: Sat Sep 19 16:13:30 2020 +0200 dt-bindings: arm: fsl: Add binding for Variscite Symphony board with VAR-SOM-MX8MN Add a binding for the Variscite Symphony evaluation kit board with VAR-SOM-MX8MN System on Module. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 0d12658dc17935f3bf2dbf50e11e64a7765f70b4 Author: Lad Prabhakar Date: Thu Jul 16 18:18:26 2020 +0100 dt-bindings: usb: renesas,usbhs: Add r8a774e1 support Document RZ/G2H (R8A774E1) SoC bindings. Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Acked-by: Rob Herring Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594919915-5225-12-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 09dc10a7b20d1100f2cbec1e2e1c54d0b4d95839 Author: Lad Prabhakar Date: Thu Jul 16 18:18:22 2020 +0100 dt-bindings: usb: renesas, usb3-peri: Document r8a774e1 support Document RZ/G2H (R8A774E1) SoC bindings. Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594919915-5225-8-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 183fba0ab1f90df01836408e52eb9fb63ee753d8 Author: Liu Shixin Date: Fri Sep 18 11:10:12 2020 +0800 usb: appledisplay: use module_usb_driver to simplify the code module_usb_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20200918031012.3980558-1-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman commit 0895660941164c0f374dd8f20c1343bb8ca636bb Author: Liu Shixin Date: Fri Sep 18 11:08:30 2020 +0800 USB: bcma: use module_bcma_driver to simplify the code module_bcma_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20200918030830.3946254-1-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman commit 2b4534185b61048bf4443d926a1b5ea91a29025b Merge: 55be22adf11b4 71ac680e6339e Author: Greg Kroah-Hartman Date: Tue Sep 22 10:16:47 2020 +0200 Merge tag 'usb-ci-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: Two changes for chipidea imx driver: - Add picophy parameter tuning interface - Restore pinctrl for system suspend/resume * tag 'usb-ci-v5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: chipidea: ci_hdrc_imx: restore pinctrl usb: chipidea: imx: add two samsung picophy parameters tuning implementation doc: dt-binding: ci-hdrc-usb2: add property for samsung picophy commit 494eebdc7e9089021192d1642d7c6d542dbc8ec8 Author: Cristian Ciocaltea Date: Fri Aug 28 16:53:19 2020 +0300 dt-bindings: arm: actions: Document RoseapplePi Define compatible strings for RoseapplePi, a SBC manufactured in Taiwan, based on Actions Semi S500 reference design. Signed-off-by: Cristian Ciocaltea Reviewed-by: Rob Herring Signed-off-by: Manivannan Sadhasivam commit dde8a1e4426d0c2816162602eb4c9ebba26398ec Author: Cristian Ciocaltea Date: Fri Aug 28 16:53:18 2020 +0300 dt-bindings: Add vendor prefix for RoseapplePi.org Add devicetree vendor prefix for RoseapplePi.org Foundation. Website: http://roseapplepi.org/ Signed-off-by: Cristian Ciocaltea Acked-by: Rob Herring Signed-off-by: Manivannan Sadhasivam commit ccc3b1ac4ac65870c02087f0727ea70ba02e3e6b Author: Matheus Castello Date: Mon Sep 21 23:43:00 2020 -0300 dt-bindings: arm: actions: Document Caninos Loucos Labrador Update the documentation to add the Caninos Loucos Labrador. Labrador project consists of the computer on module Core v2 based on the Actions Semi S500, computer on module Core v3 based on the Actions Semi S700 and the Labrador base boards. Signed-off-by: Matheus Castello Acked-by: Rob Herring Signed-off-by: Manivannan Sadhasivam commit d684ad5a4c3d85f16a7c72731914de95281a250b Author: Matheus Castello Date: Mon Sep 21 23:42:59 2020 -0300 dt-bindings: Add vendor prefix for Caninos Loucos The Caninos Loucos Program develops Single Board Computers with an open structure. The Program wants to form a community of developers to use IoT technologies and disseminate the learning of embedded systems in Brazil. It is an initiative of the Technological Integrated Systems Laboratory (LSI-TEC) with the support of Polytechnic School of the University of São Paulo (Poli-USP) and Jon "Maddog" Hall. Signed-off-by: Matheus Castello Acked-by: Rob Herring Reviewed-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam commit 8d526001bab3eebc0df1095a83e8aacf90e0e6a3 Author: Felix Winkler Date: Tue Jun 25 17:03:46 2019 +0200 media: ipu3-imgu: Fixed some coding style issues in ipu3-css.c Improved readability by fixing some issues related to maximum line length. Signed-off-by: Felix Winkler Signed-off-by: Niklas Witzel Signed-off-by: Mauro Carvalho Chehab commit 71458ac37bd8519d9cf31dfb29a965451f7fccd7 Author: Hans Verkuil Date: Thu Sep 17 11:43:10 2020 +0200 media: atomisp/pci/atomisp_ioctl.c: strlcpy -> strscpy strscpy is preferred over strlcpy and is the standard in the media subsystem. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f7e52078ce2994fc2fad8d9680e4881fcc2048fa Author: Xiaoliang Pang Date: Thu Sep 17 05:44:51 2020 +0200 media: atomisp:pci/runtime/queue: modify the return error value modify the return error value is -EDOM Fixes: 2cac05dee6e30("drm/amd/powerplay: add the hw manager for vega12 (v4)") Cc: Evan Quan Signed-off-by: Xiaoliang Pang Reviewed-by: Tianjia Zhang Signed-off-by: Mauro Carvalho Chehab commit 9ce5fe9584db7d8c5c09930b4fa3fa6569d7815d Author: Cengiz Can Date: Mon Aug 31 15:51:04 2020 +0200 media: staging: atomisp: Remove unnecessary 'fallthrough' commit df561f6688fe ("treewide: Use fallthrough pseudo-keyword") from Gustavo A. R. Silva replaced and standardized /* fallthrough */ comments with 'fallthrough' pseudo-keyword. However, in one of the switch-case statements, Coverity Static Analyzer throws a warning that 'fallthrough' is unreachable due to the adjacent 'return false' statement. (Coverity ID CID 1466511) In order to fix the unreachable code warning, remove unnecessary fallthrough keyword. Signed-off-by: Cengiz Can Reviewed-by: Gustavo A. R. Silva Signed-off-by: Mauro Carvalho Chehab commit 2394984fee7356e8c03817316cff4e9b7896fbb4 Author: Alex Dewar Date: Mon Sep 21 23:53:59 2020 +0200 media: staging: media: atomisp: Fix bool-related style issues Address the following issues: * unnecessary comparison to true/false * use of 0/1 instead of bool values * unnecessary conversion to bool These were fixed using the following Coccinelle scripts: * scripts/coccinelle/misc/bool{init,conv,return}.cocci Build-tested with allmodconfig. Signed-off-by: Alex Dewar Signed-off-by: Mauro Carvalho Chehab commit e2858fa617980243a62d6b9f659bd9321220471b Author: Alex Dewar Date: Mon Sep 21 23:53:55 2020 +0200 media: staging: media: atomisp: Don't do unnecessary zeroing of memory In a few places in pci/sh_css_params.c, memset is used to zero memory immediately before it is freed. As none of these structs appear to contain sensitive information, just remove the calls to memset. Suggested-by: Dan Carpenter Signed-off-by: Alex Dewar Signed-off-by: Mauro Carvalho Chehab commit 69fea2b4e59c52844cf5196c9c81157792d194fb Author: Ivan Safonov Date: Sun Sep 20 00:24:44 2020 +0300 staging: r8188eu: replace WIFI_REASON_CODE enum with native ieee80211_reasoncode WIFI_REASON_CODE is duplication of enum ieee80211_reasoncode. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20200919212443.264126-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit c823f6a7980b3b0972faf2abf50e120269a26f93 Author: Alex Dewar Date: Mon Sep 21 22:21:47 2020 +0100 staging: hikey9xx: Fix incorrect assignment In hi3670_phy_probe(), when reading property tx-vboost-lvl fails, its default value is assigned to priv->eye_diagram_param, rather than to priv->tx_vboost_lvl. Fix this. Fixes: 8971a3b880b2 ("staging: hikey9xx: add USB physical layer for Kirin 3670") Addresses-Coverity: CID 1497107: Incorrect expression (COPY_PASTE_ERROR) Signed-off-by: Alex Dewar Link: https://lore.kernel.org/r/20200921212146.34662-1-alex.dewar90@gmail.com Signed-off-by: Greg Kroah-Hartman commit d6628e8cbe20472d415977f9f13210e789ed6bea Author: Michael Straube Date: Sat Sep 19 17:08:23 2020 +0200 staging: rtl8192u: clean up comparsions to NULL Clean up comparsions to NULL reported by checkpatch. if (x == NULL) -> if (!x) if (x != NULL) -> if (x) Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200919150823.16923-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit e7a9c7b516285485fbbca1d84fb8e63b4ae4d5a2 Author: Michael Straube Date: Sat Sep 19 17:08:22 2020 +0200 staging: rtl8192u: correct placement of else if Move 'else if' to the same line as the closing brace of the corresponding 'if' to follow kernel coding style. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200919150823.16923-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c4309727d492b84d0f609992eeb27a454f13e625 Author: Michael Straube Date: Sat Sep 19 17:08:21 2020 +0200 staging: rtl8192u: clean up blank line style issues Add missing and remove unnecessary blank lines to clear checkpatch issues. CHECK: Please use a blank line after function/struct/union/enum declarations CHECK: Blank lines aren't necessary before a close brace '}' CHECK: Please don't use multiple blank lines CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200919150823.16923-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9079371e947b350e4a8ffd6a6d00847c7c50908e Author: Michael Straube Date: Sat Sep 19 11:00:40 2020 +0200 staging: rtl8188eu: clean up alignment style issues Clean up alignment style issues to follow kernel coding style and clear checkpatch issues. CHECK: Alignment should match open parenthesis Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200919090040.9613-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3207ff20d0ce6b3b324200caba8932e7ed07aecd Author: Michael Straube Date: Sat Sep 19 11:00:39 2020 +0200 staging: rtl8188eu: clean up block comment style issues Clean up block comment style issues to follow kernel coding style and clear checkpatch warnings. WARNING: Block comments should align the * on each line WARNING: Block comments use a trailing */ on a separate line WARNING: Block comments use * on subsequent lines Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200919090040.9613-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4ed7f05244a2b51376e1351cdb08657f8d22ea82 Author: Michael Straube Date: Sat Sep 19 10:50:32 2020 +0200 staging: rtl8712: use shorter array initializations Use empty brace syntax to initialize zero valued arrays. Simplifies and shortens the code a little bit. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200919085032.32453-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0e934ce2904e05d80f79f7fcb08632df3d994b6b Author: Michael Straube Date: Sat Sep 19 10:50:31 2020 +0200 staging: rtl8712: clean up comparsions to NULL Clean up comparsions to NULL Reported by checkpatch. if (x == NULL) -> if (!x) if (x != NULL) -> if (x) Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200919085032.32453-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit dbbc8fdf2ad57629436bcdb421c2d4ad9aa1974f Author: Dan Carpenter Date: Fri Sep 18 17:33:38 2020 +0300 staging: spmi: hisi-spmi-controller: Use devm_ version of ioremap(). The ioremap() was never unmapped in the probe error handling or in the remove function. The fix is to use the devm_ioremap() function so it gets cleaned up automatically. Fixes: 70f59c90c819 ("staging: spmi: add Hikey 970 SPMI controller driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200918143338.GE909725@mwanda Signed-off-by: Greg Kroah-Hartman commit e2bb57d233ce973a8e61cbb6ab79a91779a4a6c4 Author: Colin Ian King Date: Fri Sep 18 22:47:31 2020 +0100 staging/emxx_udc: fix indenting issue on a couple of statements A couple of statements are indented too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200918214731.48750-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 5d240a54be7e5921856ce1baa3642351aa118dbc Author: Arnd Bergmann Date: Fri Sep 18 11:54:41 2020 +0200 staging: vchiq: convert compat await_completion Split out the ioctl implementation for VCHIQ_IOC_QUEUE_BULK_TRANSMIT into a separate function so it can be shared with the compat implementation. This one is the trickiest conversion, as the compat implementation is already quite different from the native one. By using a common handler, the behavior is changed to be the same again: The indirect __user pointer accesses are now handled through helper functions that check for compat mode internally. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200918095441.1446041-6-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit a4367cd2b2316862c5085a6beb12511f9f57608b Author: Arnd Bergmann Date: Fri Sep 18 11:54:40 2020 +0200 staging: vchiq: convert compat bulk transfer Split out the ioctl implementation for VCHIQ_IOC_QUEUE_BULK_TRANSMIT into a separate function so it can be shared with the compat implementation. Here, the input data is converted separately in the compat handler, while the output data is passed as a __user pointer to thec vchiq_queue_bulk_transfer->mode word that is compatible. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200918095441.1446041-5-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit f618affa770c5daa2cec997370874d02e51eb31d Author: Arnd Bergmann Date: Fri Sep 18 11:54:39 2020 +0200 staging: vchiq: convert compat dequeue_message Split out the ioctl implementation for VCHIQ_IOC_DEQUEUE_MESSAGE into a separate function so it can be shared with the compat implementation. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200918095441.1446041-4-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit 9f9caab91ab80144b971efe38d875df9edc963e6 Author: Arnd Bergmann Date: Fri Sep 18 11:54:38 2020 +0200 staging: vchiq: convert compat create_service Split out the ioctl implementation for VCHIQ_IOC_CREATE_SERVICE into a separate function so it can be shared with the compat implementation. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200918095441.1446041-3-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit 06c78d4e359f30b0f77130a6b191e925efb414a3 Author: Arnd Bergmann Date: Fri Sep 18 11:54:37 2020 +0200 staging: vchiq: rework compat handling The compat handlers for VCHIQ_IOC_QUEUE_MESSAGE32 and VCHIQ_IOC_GET_CONFIG32 can simply call the underlying implementations that are already separate functions rather than using copy_in_user to simulate the native 64-bit interface for the full ioctl handler. vchiq_ioc_queue_message gets a small update to the calling conventions to simplify the compat version by directly returning a normal errno value. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200918095441.1446041-2-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit 6a950755cec1a90ddaaff3e4acb5333617441c32 Author: Dan Carpenter Date: Fri Sep 18 17:27:32 2020 +0300 ath6kl: wmi: prevent a shift wrapping bug in ath6kl_wmi_delete_pstream_cmd() The "tsid" is a user controlled u8 which comes from debugfs. Values more than 15 are invalid because "active_tsids" is a 16 bit variable. If the value of "tsid" is more than 31 then that leads to a shift wrapping bug. Fixes: 8fffd9e5ec9e ("ath6kl: Implement support for QOS-enable and QOS-disable from userspace") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200918142732.GA909725@mwanda commit aac352d6810ec9d4575464e0d46adb4885a78db9 Author: Liu Shixin Date: Wed Sep 16 10:50:15 2020 +0800 ath5k: convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200916025015.3992315-1-liushixin2@huawei.com commit 191e7f9f05c668f2e3fea546743046a253943a60 Author: YueHaibing Date: Fri Sep 18 21:12:42 2020 +0800 ath11k: Remove unused function ath11k_htc_restore_tx_skb() There is no caller in tree, so can remove it. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200918131242.24000-1-yuehaibing@huawei.com commit b290f902b857d75a5eaeb0aa8d0a12fbc8312699 Merge: 93b61540dfa56 596fd0162ac70 Author: Greg Kroah-Hartman Date: Tue Sep 22 09:45:11 2020 +0200 Merge tag 'iio-for-5.10b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of features and cleanups for IIO in 5.10 We have a couple of changes that apply to large sets of drivers, so I have grouped those to keep this short. There are a few late breaking fixes in here that can wait for the merge window. dt yaml conversions ------------------- * adi,ad7768-1 * adi,ad7949 * aspeed,ast2400 * cosmic,10001-adc * dlg,da9150-gpadc * fsl,imx25-gcq * fsl,imx7d-adc * fsl,vf610 * holt,hi8435 * marvell,berlin2-adc * motorola,cpcap-adc * nuvoton,nau7802 * nuvoton,npcm750-adc * nxp,lpc1850-adc * nxp,lpc3220 * sprd,sc2720-adc * st,stmpe-adc * ti,adc12138 * ti,ads1015 * ti,ads7950 * ti,twl4030-madc Features -------- * adxrs290 - Add triggered buffer support and expose data ready signal as a possible trigger. Includes updating bindings. - Add debugfs hooks for register access. * mlx90632 - Add a clear user interface to override the measured ambient temperature. * vl53l0x - Add IRQ support including dt bindings. Cleanups and minor fixes ------------------------ (groups) Replace mlock with local lock: * adf4350 * exynos-adc * fls-imx25-gcq * stm32-dac devm use to simplify probe error handling and remove functions. * adis16201 * adis16203 * adis16209 * adis16240 * adis16136 * adis16260 * adis16400 * adis16460 * adis16480 * adis library - drop unused adis_setup_buffer_and_trigger() of_match_ptr removal and incorrect ACPI binding removal of_match_ptr() rarely makes sense in an IIO driver as space saving is trivial and it breaks ACPI PRP0001 based instantiation. Mostly this series is about removing examples that get copied into new drivers. * ad2s1200 * ad5272 * ad5446 * ad5592r * ad5593r * ad5703 * ak8974 * ak8975 * ams-iaq-core * as3935 * atlas-sensor * ds1803 * hdc100x * htu21 * icp10100 * lmp91000 * pulsedlight * max30102 * max5432 * max5481 * mcp4018 * mcp4131 * mcp4531 * mcp4725 * ms5611 * ms5637 * si7020 * sgp30 * ti-dac082s085 * ti-dac5571 * tmp007 * tsys01 * vz89x * zpa2326 kernel-doc fixes * iio-core * ad7303 * ad7947 * adis16080 * adis16400 * iio_dummy_evgen * sgp30 Fixes for buffer alignment when passed to iio_push_to_buffers_with_timestamp() This is a long running effort. There are a few more drivers to come. * inv_mpu6050 * itg3200 * si1145 * st_lsm6dsx * ti-adc0832 * ti-adc12138 (not driver focused) * MAINTAINERS - Consolidate Analog Device IIO entries whilst removing Beniamin Bia. - Remove Hartmut Knaack as a listed IIO maintainer as he hasn't been active for a long time and people are getting intermitted bounces. * Add __printf() markings to a few functions that were missing them. * drop some rotted documentation from staging. * rework buffer sysfs file creation (precursor to multiple buffer support) (individual drivers) * ad5592r - Fix use of true for IIO_SHARED_BY_TYPE - Tidy up locking and indentation. * ad9467 - Improve error message on chip-id missmatch. - Use more appropriate error value if chip-id not recognised. * adis-library - Simplify burst mode handling. * adxrs290 - Make sure to switch device to standby mode during remove. * as73211 - Increase measurement timeout as seems some devices are slower. * bma180 - Fix use of true fo IIO_SHARED_BY_TYPE * exynos_adc - Update binding to require second interrut with touch screen. - Update binding to not require syscon on S5Pv210 * hmc5843 - Fix use of true for IIO_SHARED_BY_TYPE * inv_mpu6050 - Use regmap_noinc_read() for fifo reading. * palmas_gpadc - Use module_platform_driver() to remove boilerplate. * meson-saradc - style consistency fixes * rockchip_saradc - Allow compile testing with !ARM. * st_lsm6dsx - Changing scaling factor to use IIO_VAL_INT_PLUS_NANO to improve precision. - Fix an issue with unchecked return value. * stm32-adc - Fix a missing return introduced in dev_err_probe() patch earlier in cycle. * sx9310 - Prefer async mode for probe as paticularly slow startup. * vcnl4000 - Add missing interrupt property to dt binding. * tag 'iio-for-5.10b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (126 commits) dt-bindings: iio: vishay,vcnl4000: add interrupts property iio:imu:inv_mpu6050: Use regmap_noinc_read for fifo reads. iio:imu:inv_mpu6050 Fix dma and ts alignment and data leak issues. iio:adc:ti-adc12138 Fix alignment issue with timestamp iio:adc:ti-adc0832 Fix alignment issue with timestamp iio:imu:st_lsm6dsx Fix alignment and data leak issues iio:light:si1145: Fix timestamp alignment and prevent data leak. iio:gyro:itg3200: Fix timestamp alignment and prevent data leak. iio:imu:st_lsm6dsx: check st_lsm6dsx_shub_read_output return iio: adc: exynos_adc: Replace indio_dev->mlock with own device lock dt-bindings:iio:adc:holt,hi8435 yaml conversion dt-bindings:iio:adc:adi,ad7768-1 yaml conversion dt-bindings:iio:adc:adi,ad7949 yaml conversion dt-bindings:iio:adc:dlg,da9150-gpadc yaml conversion dt-bindings:iio:adc:motorola,cpcap-adc yaml conversion dt-bindings:iio:adc:nxp,lpc3220-adc yaml conversion dt-bindings:iio:adc:nxp,lpc1850-adc yaml conversion dt-bindings:iio:adc:fsl,imx25-gcq yaml conversion dt-bindings:iio:adc:fsl,imx7d-adc yaml conversion dt-bindings:iio:adc:ti,ads1015 yaml conversion ... commit 9883c0d075f1ba86248be90d82051f30f684deff Author: Kalle Valo Date: Thu Sep 17 19:46:30 2020 +0300 ath11k: remove redundant num_keep_alive_pattern assignment There were two asignments to num_keep_alive_pattern, remove the first one which is wrong. No functional changes. Compile tested only. Reported-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1600361190-22047-1-git-send-email-kvalo@codeaurora.org commit c695faf745f991ca3ab467a00afe015fdac3bbb8 Author: Kalle Valo Date: Thu Sep 17 18:28:27 2020 +0300 ath11k: wmi: remove redundant configuration values from init In commit 2d4bcbed5b7d ("ath11k: initialize wmi config based on hw_params") the wmi config initialisation was moved to hw_ops->wmi_init_config() but the old initialisation values were accidentally left to ath11k_wmi_cmd_init(). This is very confusing, so remove the redundant values. And this was actually so confusing that in commit aa2092a9bab3 ("ath11k: add raw mode and software crypto support") I actually it caused a bug: when ATH11K_FLAG_RAW_MODE was enabled rx_decap_mode was assigned back to TARGET_DECAP_MODE_NATIVE_WIFI in ath11k_init_wmi_config_ipq8074(). Fix this at the same time. Compile tested only. Fixes: 2d4bcbed5b7d ("ath11k: initialize wmi config based on hw_params") Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1600356507-29237-1-git-send-email-kvalo@codeaurora.org commit 5cca5fa1c164492e905cd2b28be5371ed2311761 Author: Karthikeyan Periyasamy Date: Wed Sep 16 11:42:56 2020 +0530 ath11k: Add support spectral scan for IPQ6018 IPQ6018 supported with 4 bytes FFT BIN size. so supported 4 bytes parsing logic in FFT report process. since spectral_fft_sz is configured as zero in hw_params, spectral is not supported in QCA6390 platform. Tested-on: IPQ6018 WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1600236776-4042-1-git-send-email-periyasa@codeaurora.org commit 568f06036ee23a003542227975f69a75ac172ba2 Author: Kalle Valo Date: Wed Sep 16 16:55:23 2020 +0300 ath11k: debugfs: move some function declarations to correct header files Some of the function declarations are for functions in debugfs_htt_stats.c and debugfs_sta.c, move them to corresponding header files. As debugfs_sta.h didn't exist create it. Also in debugfs_htt_stats.h move dunction declarations to the end of the file. No functional changes. Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1600264523-12939-4-git-send-email-kvalo@codeaurora.org commit 56292162b9a29171d2dd2c4d533fe0e9bf8f2a34 Author: Kalle Valo Date: Wed Sep 16 16:55:22 2020 +0300 ath11k: rename debug_htt_stats.[c|h] to debugfs_htt_stats.[c|h] For consistency with debugfs.c rename debug_htt_stats files and functions to debugfs_htt_stats. No functional changes. Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1600264523-12939-3-git-send-email-kvalo@codeaurora.org commit cb4e57db2ff0c8d546b3362dd0e52276d582e6e7 Author: Kalle Valo Date: Wed Sep 16 16:55:21 2020 +0300 ath11k: debugfs: use ath11k_debugfs_ prefix As these functions are now defined in debugfs.c change the prefix to use ath11k_debugfs_ as well. No functional changes. Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1600264523-12939-2-git-send-email-kvalo@codeaurora.org commit da3a9d3c15769b8a8a4201c5b20074d3bb561fa4 Author: Kalle Valo Date: Wed Sep 16 16:55:20 2020 +0300 ath11k: refactor debugfs code into debugfs.c If CONFIG_ATH11K_DEBUGFS is disabled there are warnings debug.c: drivers/net/wireless/ath/ath11k/debug.c:36:20: warning: 'htt_bp_lmac_ring' defined but not used [-Wunused-variable] 36 | static const char *htt_bp_lmac_ring[HTT_SW_LMAC_RING_IDX_MAX] = { | ^~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath11k/debug.c:15:20: warning: 'htt_bp_umac_ring' defined but not used [-Wunused-variable] 15 | static const char *htt_bp_umac_ring[HTT_SW_UMAC_RING_IDX_MAX] = { | ^~~~~~~~~~~~~~~~ Fix this by refactoring debugfs code to debugfs.c. This also reduces the number of ifdefs in debug.c and makes it easier to maintain the code. No functional changes. Compile tested only. Reported-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1600264523-12939-1-git-send-email-kvalo@codeaurora.org commit 80b892fc8a90e91498babf0f6817139e5ec64b5c Author: Bo YU Date: Mon Sep 21 16:21:22 2020 +0300 ath11k: Add checked value for ath11k_ahb_remove Return value form wait_for_completion_timeout should to be checked. This is detected by Coverity: #CID:1464479 (CHECKED_RETURN) Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Bo YU Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200621095136.7xdbzkthoxuw2qow@debian.debian-2 commit 214091517f0c3ca98d3955d2c4929acb4fe346d2 Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:21 2020 +0300 wcn36xx: Ensure spaces between functions This is a small update to fix an error I saw where a few functions do not have a blank line in between them. Affects smd.c and main.c - no logic is affected by this change. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150845.2179320-3-bryan.odonoghue@linaro.org commit 7f885b0bdf6f7642a69c7efd20223015494dbbe4 Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:21 2020 +0300 wcn36xx: Mark internal smd functions static This commit marks all smd.c functions that are only used inside of smd.c as static. Previous commits added some VHT specific setup functions non-static which is the right thing to do in terms of having granular git commits that compile warning free. What we really want is for local not global scope on those functions. This patch makes the conversion from global to local scope. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150845.2179320-2-bryan.odonoghue@linaro.org commit b421d04e4978f58c7a2ba91b6452c2785b7e1aef Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:21 2020 +0300 wcn36xx: Advertise ieee802.11 VHT flags This patch adds ieee802.11 VHT flags for the wcn3680b. - RX_STBC1 - SU Beamformee - MU Beamformee - VHT80 SGI - Single spatial stream RX LDPC is declared as supported in the datasheet but not enabled at this time. After this patch is applied an AP should see the wcn3680 as an 802.11ac capable device. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150822.2179261-5-bryan.odonoghue@linaro.org commit 87d3f1f34157a22be9c9c621bcad9e8a00ec4b3c Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:20 2020 +0300 wcn36xx: Add VHT rates to wcn36xx_update_allowed_rates() This commit adds VHT rates to the wcn36xx_update_allowed_rates() routine. Thus allowing the driver to latch the declared rates and transmit them to the firmware in the same way as other 80211.n rates are. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150822.2179261-4-bryan.odonoghue@linaro.org commit d961fdfaa20837f625a941835b10ad83e65f96a3 Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:20 2020 +0300 wcn36xx: Convert to VHT parameter structure on wcn3680 In order to send VHT parameters to wcn3680 we need to pass the extended V1 parameter structures to the firmware. These commands need to have the version number set to 1. This patch makes the conversion. The conversion consists of 1. Setting the version number for wcn3680 or leaving it at 0 otherwise 2. Setting the size of the packet header lower for wcn3620 and wcn3660 Once done all three chips can continue to use the same code to pass parameters to their respective firmware. In the case of the wcn3680 the passed structures will be slightly larger to accommodate communication of VHT descriptors. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150822.2179261-3-bryan.odonoghue@linaro.org commit f97fe43a949502e9c47183c5aafcd49e2e74e448 Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:20 2020 +0300 wcn36xx: Define INIT_HAL_MSG_V1() In order to pass 802.11ac VHT parameters from the SoC to wcn36xx we need to use the V1 data structures associated with BSS and STA parameters. The means of identifying a V1 data-structure is via the SMD version field. This patch defines a INIT_HAL_MSG_V1() which operates the same way as INIT_HAL_MSG() with the exception that it defines VERSION1 as opposed to VERSION0. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150822.2179261-2-bryan.odonoghue@linaro.org commit 52054ebd05324fb8e05953ccd96c005562d1bc2a Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:19 2020 +0300 wcn36xx: Latch VHT specific BSS parameters to firmware This commit makes use of wcn36xx_smd_set_bss_vht_params() to extract VHT parameters from the 80211_sta structure and latch appropriate bits in the bss_params_v1 structure for transmission to the wcnss firmware. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150747.2179122-5-bryan.odonoghue@linaro.org commit 2f0c0e3b856dcd961d1193e5e832cc989a3b7cca Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:19 2020 +0300 wcn36xx: Add ability to download wcn3680 specific firmware parameters This commit modifies wcn36xx_smd_start() so that it can download wcn3680 specific firmware parameters if we are talking to the wcn3680. If not the original generic firmware parameter table should continue to be used for wcn3620 and wcn3660. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150747.2179122-4-bryan.odonoghue@linaro.org commit 3e977c5c523dcbad38953b03ad1e83a6da9a5da2 Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:18 2020 +0300 wcn36xx: Define wcn3680 specific firmware parameters This commit defines a firmware configuration for the wcn3680 which represents a working downstream configuration. This configuration has been successfully applied to the upstream driver with antecedent patches resulting in the same or better through-put in comparison to the downstream driver on the test hardware. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150747.2179122-3-bryan.odonoghue@linaro.org commit 8ec5568b4e2e641b85156d446d6873afed801685 Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:18 2020 +0300 wcn36xx: Extend HAL param config list In order to get 802.11ac working the way we want, additional parameters need to be passed down to the firmware. This patch takes the full remaining set of parameters defined in the downstream riva/inc/wlan_hal_cfg.h and imports them into hal.h with some minor name length adjustments. This addition will allow us to pass a larger firmware configuration set later on. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150747.2179122-2-bryan.odonoghue@linaro.org commit e042bc19aaceeb9aed24bfd4b53dfb4fe8bd0fd0 Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:18 2020 +0300 wcn36xx: Set PHY into correct mode for 80MHz channel width For the 80MHz channel we need to set the PHY mode to one of four PHY modes that span the 80MHz range. This patch latches the hw_value PHY field previously defined for 5GHz channels directly to the parameter passed to the firmware. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150708.2179043-6-bryan.odonoghue@linaro.org commit fc4d4008f810ef7936c503467e377437bdc24490 Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:17 2020 +0300 wcn36xx: Encode PHY mode for 80MHz channel in hw_value This commit encodes the 802.11ac PHY mode for a given channel in the upper bits of the hw_value field. This allows for a neat read-out and application of the relevant PHY setting. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150708.2179043-5-bryan.odonoghue@linaro.org commit 235b9ae0265b08fe676b142593638e3018e2ef5f Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:17 2020 +0300 wcn36xx: Add accessor macro HW_VALUE_PHY for PHY settings Adds HW_VALUE_PHY(hw_value) an access macro that will be used to extract a hardware specific PHY setting for a given channel. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150708.2179043-4-bryan.odonoghue@linaro.org commit f779a92f7b69bf4f421b8bdcc744307fa9c46b32 Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:17 2020 +0300 wcn36xx: Use HW_VALUE_CHANNEL macro to get channel number Uses HW_VALUE_CHANNEL() to extract the channel number from a struct ieee80211_channel->hw_value. Once done we can use the upper bits of the hw_value to encode PHY related data. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150708.2179043-3-bryan.odonoghue@linaro.org commit 59b5c8447c14e7aeda90439f05968bcdbae11af1 Author: Bryan O'Donoghue Date: Mon Sep 21 16:21:16 2020 +0300 wcn36xx: Add accessor macro HW_VALUE_CHANNEL for hardware channels Adds HW_VALUE_CHANNEL(hw_value) an access macro that will be used to extract the channel number from struct ieee80211_channel->hw_value in preparation for also storing PHY settings for 802.11ac in the upper bits of hw_value. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150708.2179043-2-bryan.odonoghue@linaro.org commit 4e938105654720489a645b0e25c64a44d2315a19 Author: Rakesh Pillai Date: Mon Sep 21 16:21:13 2020 +0300 ath10k: Use bdf calibration variant for snoc targets Board Data File (BDF) is loaded upon driver boot-up procedure. The right board data file is identified using bus and qmi-board-id. The problem, however, can occur when the (default) board data file cannot fulfill with the vendor requirements and it is necessary to use a different board data file. Also using the chip_id for identifying the board data helps in dealing with different variants of the board data file based on the RF card. If the chip_id is not programmed, a default value of 0xff will be used for parsing the board data file. Add the support to get the variant field from DTSI and use this information along with the chip_id to load the vendor specific BDF. The device tree requires addition strings to define the variant name wifi@a000000 { status = "okay"; qcom,ath10k-calibration-variant = "xyz-v2"; }; wifi@a800000 { status = "okay"; qcom,ath10k-calibration-variant = "xyz-v1"; }; This would create the boarddata identifiers for the board-2.bin search * bus=snoc,qmi-board-id=16,qmi-chip-id=0,variant=xyz-v1 * bus=snoc,qmi-board-id=17,qmi-chip-id=0,variant=xyz-v2 Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1600157948-2042-1-git-send-email-pillair@codeaurora.org commit dd7a3a331f5dec4f61fa2ba48512125a89401c25 Author: Jason Yan Date: Sat Sep 19 15:44:37 2020 +0800 rtlwifi: rtl8723be: use true,false for bool variable large_cfo_hit This addresses the following coccinelle warning: drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:1155:27-47: WARNING: Comparison of 0/1 to bool variable drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:1156:3-23: WARNING: Assignment of 0/1 to bool variable drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:1159:3-23: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200919074437.3459305-1-yanaijie@huawei.com commit ff4d1d726e7fcdce5d73b196cbb8665335e2fce0 Author: Jason Yan Date: Sat Sep 19 15:44:28 2020 +0800 rtlwifi: rtl8821ae: use true,false for bool variable large_cfo_hit This addresses the following coccinelle warning: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:2680:27-47: WARNING: Comparison of 0/1 to bool variable drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:2683:3-23: WARNING: Assignment of 0/1 to bool variable drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:2686:3-23: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200919074428.3459234-1-yanaijie@huawei.com commit a03efb41bb15bb317a5f9430d5f146a1b8362e60 Author: Jason Yan Date: Sat Sep 19 15:44:12 2020 +0800 rtlwifi: rtl8192ee: use true,false for bool variable large_cfo_hit This addresses the following coccinelle warning: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c:721:27-47: WARNING: Comparison of 0/1 to bool variable drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c:722:3-23: WARNING: Assignment of 0/1 to bool variable drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c:725:2-22: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200919074412.3459163-1-yanaijie@huawei.com commit 6c1d61913570d4255548ac598cfbef6f1e3c3eee Author: Joe Perches Date: Fri Sep 18 23:37:47 2020 -0700 rtlwifi: Use ffs in _phy_calculate_bit_shift Remove the loop and use the generic ffs instead. Signed-off-by: Joe Perches Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/e2ab424d24b74901bc0c39f0c60f75e871adf2ba.camel@perches.com commit 47be1cdee7ac71cec6ab71be654b3204496a8325 Author: Cristian Ciocaltea Date: Fri Aug 28 16:53:20 2020 +0300 ARM: dts: owl-s500: Add RoseapplePi Add a Device Tree for the RoseapplePi SBC. Signed-off-by: Cristian Ciocaltea Reviewed-by: Peter Korsgaard Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 55f6c9931f7c32f19cf221211f099dfd8dab3af9 Author: Cristian Ciocaltea Date: Fri Aug 28 16:53:17 2020 +0300 ARM: dts: owl-s500: Fix incorrect PPI interrupt specifiers The PPI interrupts for cortex-a9 were incorrectly specified, fix them. Fixes: fdfe7f4f9d85 ("ARM: dts: Add Actions Semi S500 and LeMaker Guitar") Signed-off-by: Cristian Ciocaltea Reviewed-by: Peter Korsgaard Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit 874a36f057647e1d9e6c17c15c5c0f5e60fe93a3 Author: Matheus Castello Date: Mon Sep 21 23:43:01 2020 -0300 ARM: dts: Add Caninos Loucos Labrador v2 Add Device Trees for Caninos Loucos Labrador CoM Core v2 and base board M v1. Based on the work of Andreas Färber on Lemaker Guitar device tree. Signed-off-by: Matheus Castello Reviewed-by: Manivannan Sadhasivam Reviewed-by: Andreas Färber Signed-off-by: Manivannan Sadhasivam commit 7f1e215b39cb0aec39a7084b98848585efe7ba5e Author: Qinglang Miao Date: Sat Sep 19 10:48:38 2020 +0800 mt7601u: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200919024838.14172-1-miaoqinglang@huawei.com commit bc38325703ebd0a00fecfb965020c255ffc582fe Author: Krzysztof Kozlowski Date: Sun Sep 20 22:26:52 2020 +0200 soc: actions: include header to fix missing prototype Include the header with prototype of owl_sps_set_pg to fix: drivers/soc/actions/owl-sps-helper.c:16:5: warning: no previous prototype for 'owl_sps_set_pg' [-Wmissing-prototypes] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam commit d0c8ff7c1e472df2c1427f57a6192da2e2e2c768 Author: YueHaibing Date: Fri Sep 18 21:13:05 2020 +0800 wlcore: Remove unused function no_write_handler() There is no caller in tree, so can remove it. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200918131305.20976-1-yuehaibing@huawei.com commit 13441281bde0b63c6a4767182adbb0c5c1313321 Author: Amit Singh Tomar Date: Sun Jul 19 23:12:03 2020 +0530 arm64: dts: actions: Add DMA Controller for S700 This commit adds DMA controller present on Actions S700, it differs from S900 in terms of number of dma channels and requests. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Amit Singh Tomar Signed-off-by: Manivannan Sadhasivam commit 4bb1eb3cd4bd6241d5e5f99bbfd801ea5a007b6c Author: Amit Singh Tomar Date: Sun Jul 19 23:12:02 2020 +0530 arm64: dts: actions: limit address range for pinctrl node After commit 7cdf8446ed1d ("arm64: dts: actions: Add pinctrl node for Actions Semi S700") following error has been observed while booting Linux on Cubieboard7-lite(based on S700 SoC). [ 0.257415] pinctrl-s700 e01b0000.pinctrl: can't request region for resource [mem 0xe01b0000-0xe01b0fff] [ 0.266902] pinctrl-s700: probe of e01b0000.pinctrl failed with error -16 This is due to the fact that memory range for "sps" power domain controller clashes with pinctrl. One way to fix it, is to limit pinctrl address range which is safe to do as current pinctrl driver uses address range only up to 0x100. This commit limits the pinctrl address range to 0x100 so that it doesn't conflict with sps range. Fixes: 7cdf8446ed1d ("arm64: dts: actions: Add pinctrl node for Actions Semi S700") Reviewed-by: Manivannan Sadhasivam Suggested-by: Andre Przywara Signed-off-by: Amit Singh Tomar Signed-off-by: Manivannan Sadhasivam commit 05b0852ec99d45cc95d8f587561239a9095c2949 Author: Krzysztof Kozlowski Date: Thu Sep 17 20:54:46 2020 +0200 ARM: dts: imx6qdl-gw5xxx: correct interrupt flags GPIO_ACTIVE_x flags are not correct in the context of interrupt flags. These are simple defines so they could be used in DTS but they will not have the same meaning: 1. GPIO_ACTIVE_HIGH = 0 = IRQ_TYPE_NONE 2. GPIO_ACTIVE_LOW = 1 = IRQ_TYPE_EDGE_RISING Correct the interrupt flags, assuming the author of the code wanted same logical behavior behind the name "ACTIVE_xxx", this is: ACTIVE_LOW => IRQ_TYPE_LEVEL_LOW Signed-off-by: Krzysztof Kozlowski Acked-By: Tim Harvey Signed-off-by: Shawn Guo commit e8c677195cae38175ca45e4ded5b369278a38fec Author: Stefan Riedmueller Date: Thu Sep 17 10:30:03 2020 +0200 dt-bindings: arm: fsl: Add PHYTEC i.MX6 devicetree bindings Add devicetree bindings for i.MX6 based phyCORE-i.MX6, phyBOARD-Mira and phyFLEX-i.MX6. Signed-off-by: Stefan Riedmueller Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 7b0bb204ee705c3b46d8e48f1893979ea6af4753 Author: Stefan Riedmueller Date: Thu Sep 17 10:30:02 2020 +0200 dt-bindings: arm: fsl: Add PHYTEC i.MX6 UL/ULL devicetree bindings Add devicetree bindings for i.MX6 UL/ULL based phyCORE-i.MX6 UL/ULL and phyBOARD-Segin. Signed-off-by: Stefan Riedmueller Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 805837740d0142c38ab94b2269ca28da3890ae68 Author: Fabio Estevam Date: Wed Sep 16 21:41:25 2020 -0300 clk: imx: imx21: Remove clock driver As i.MX21 support has been removed, get rid of its clock driver too. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit fb956b3e20f0bbeac8c17a7a08e63528a23bd54c Author: Fabio Estevam Date: Wed Sep 16 21:41:24 2020 -0300 clk: imx: imx35: Remove mx35_clocks_init() mx35_clocks_init() has been used to register clocks on i.MX35 non-devicetree platforms. Now that i.MX is a devicetree-only platform, it is safe to remove mx35_clocks_init() as there are no more users. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit 30c1951790df5e7ad6b4dbc1c46a6361dce6f946 Author: Fabio Estevam Date: Wed Sep 16 21:41:23 2020 -0300 clk: imx: imx31: Remove mx31_clocks_init() mx31_clocks_init() has been used to register clocks on i.MX31 non-devicetree platforms. Now that i.MX is a devicetree-only platform, it is safe to remove mx31_clocks_init() as there are no more users. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit 4d66bc3c5f4aefc45d307293a9d2b38a5e5a29a9 Author: Fabio Estevam Date: Wed Sep 16 21:41:22 2020 -0300 clk: imx: imx27: Remove mx27_clocks_init() mx27_clocks_init() has been used to register clocks on i.MX27 non-devicetree platforms. Now that i.MX is a devicetree-only platform, it is safe to remove mx27_clocks_init() as there are no more users. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit b70c9cacbfb1f9b15ffa29f4d949e9e31cb81179 Author: Fabio Estevam Date: Wed Sep 16 21:41:21 2020 -0300 ARM: imx: Remove unused definitions Most of the definitions for peripheral base addresses, interrupt and DMA information is no longer used, so get rid of them. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit f68ea682d1da77e0133a7726640c22836a900a67 Author: Fabio Estevam Date: Wed Sep 16 21:41:20 2020 -0300 ARM: imx35: Retrieve the IIM base address from devicetree Now that imx35 has been converted to a devicetree-only platform, retrieve the IIM base address from devicetree. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit 445cf02cada4b32f95c2bbce3fdaf184ef3ff3ce Author: Fabio Estevam Date: Wed Sep 16 21:41:19 2020 -0300 ARM: imx3: Retrieve the AVIC base address from devicetree Now that imx31 and imx35 has been converted to a devicetree-only platform, retrieve the AVIC base address from devicetree. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit 2cf98d12958cbb52c23e9e613687171dd6e60120 Author: Fabio Estevam Date: Wed Sep 16 21:41:18 2020 -0300 ARM: imx3: Retrieve the CCM base address from devicetree Now that imx31 and imx35 has been converted to a devicetree-only platform, retrieve the CCM base address from devicetree. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit 3172225d45bd918a5c4865e7cd8eb0c9d79f8530 Author: Fabio Estevam Date: Wed Sep 16 21:41:17 2020 -0300 ARM: imx31: Retrieve the IIM base address from devicetree Now that imx31 has been converted to a devicetree-only platform, retrieve the IIM base address from devicetree. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit d54debc72f5f836917c957dce610ec50546ec158 Author: Fabio Estevam Date: Wed Sep 16 21:41:16 2020 -0300 ARM: imx27: Retrieve the CCM base address from devicetree Now that imx27 has been converted to a devicetree-only platform, retrieve the CCM base address from devicetree. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit 94b2bec1b0e054b27b0a0b5f52a0cd55c83340f4 Author: Fabio Estevam Date: Wed Sep 16 21:41:15 2020 -0300 ARM: imx27: Retrieve the SYSCTRL base address from devicetree Now that imx27 has been converted to a devicetree-only platform, retrieve the SYSCTRL base address from devicetree. To keep devicetree compatibilty the SYSCTRL base address will be retrieved from the CCM base address plus an 0x800 offset. This is not a problem as the imx27.dtsi describes the CCM register range as 0x1000. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit ddfd4ab6bb08832e1261d7c8c4ae11e5568485af Author: Marek Szyprowski Date: Tue Jul 7 13:08:27 2020 +0200 drm/exynos: Fix dma_parms allocation Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices") driver core handles allocation of the dma_parms structure for platform device, so there is no need to manually allocate nor free it. Reported-by: Tomi Valkeinen Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae commit c80bcf19e0c56dade92501cfcb08ab0911110272 Author: Michael Walle Date: Mon Sep 14 23:43:41 2020 +0200 arm64: defconfig: enable the sl28cpld board management controller Enable the kernel modules for the board management controller "sl28cpld" which is used on the SMARC-sAL28 board. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 5af75c747e2a868abbf8611494b50ed5e076fca7 Author: Maxim Mikityanskiy Date: Thu Jul 2 12:37:29 2020 +0300 net/mlx5e: Enhanced TX MPWQE for SKBs This commit adds support for Enhanced TX MPWQE feature in the regular (SKB) data path. A MPWQE (multi-packet work queue element) can serve multiple packets, reducing the PCI bandwidth on control traffic. Two new stats (tx*_mpwqe_blks and tx*_mpwqe_pkts) are added. The feature is on by default and controlled by the skb_tx_mpwqe private flag. In a MPWQE, eseg is shared among all packets, so eseg-based offloads (IPSEC, GENEVE, checksum) run on a separate eseg that is compared to the eseg of the current MPWQE session to decide if the new packet can be added to the same session. MPWQE is not compatible with certain offloads and features, such as TLS offload, TSO, nonlinear SKBs. If such incompatible features are in use, the driver gracefully falls back to non-MPWQE. This change has no performance impact in TCP single stream test and XDP_TX single stream test. UDP pktgen, 64-byte packets, single stream, MPWQE off: Packet rate: 16.96 Mpps (±0.12 Mpps) -> 17.01 Mpps (±0.20 Mpps) Instructions per packet: 421 -> 429 Cycles per packet: 156 -> 161 Instructions per cycle: 2.70 -> 2.67 UDP pktgen, 64-byte packets, single stream, MPWQE on: Packet rate: 16.96 Mpps (±0.12 Mpps) -> 20.94 Mpps (±0.33 Mpps) Instructions per packet: 421 -> 329 Cycles per packet: 156 -> 123 Instructions per cycle: 2.70 -> 2.67 Enabling MPWQE can reduce PCI bandwidth: PCI Gen2, pktgen at fixed rate of 36864000 pps on 24 CPU cores: Inbound PCI utilization with MPWQE off: 80.3% Inbound PCI utilization with MPWQE on: 59.0% PCI Gen3, pktgen at fixed rate of 56064000 pps on 24 CPU cores: Inbound PCI utilization with MPWQE off: 65.4% Inbound PCI utilization with MPWQE on: 49.3% Enabling MPWQE can also reduce CPU load, increasing the packet rate in case of CPU bottleneck: PCI Gen2, pktgen at full rate on 24 CPU cores: Packet rate with MPWQE off: 37.5 Mpps Packet rate with MPWQE on: 49.0 Mpps PCI Gen3, pktgen at full rate on 24 CPU cores: Packet rate with MPWQE off: 57.0 Mpps Packet rate with MPWQE on: 66.8 Mpps Burst size in all pktgen tests is 32. CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz (x86_64) NIC: Mellanox ConnectX-6 Dx GCC 10.2.0 Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 67044a88aa0556b929cd07ba0656b101f3a6a67c Author: Maxim Mikityanskiy Date: Mon Dec 9 15:07:57 2019 +0200 net/mlx5e: Move TX code into functions to be used by MPWQE mlx5e_txwqe_complete performs some actions that can be taken to separate functions: 1. Update the flags needed for hardware timestamping. 2. Stop the TX queue if it's full. Take these actions into separate functions to be reused by the MPWQE code in the following commit and to maintain clear responsibilities of functions. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit b39fe61edc50aff03a7188c1ad925c61af5ea882 Author: Maxim Mikityanskiy Date: Thu Apr 16 11:30:14 2020 +0300 net/mlx5e: Rename xmit-related structs to generalize them As preparation for the upcoming TX MPWQE support for SKBs, rename struct mlx5e_xdp_mpwqe to mlx5e_tx_mpwqe and move it above struct mlx5e_txqsq. This structure will be reused in the regular SQ and in the regular TX data path. Also rename mlx5e_xdp_xmit_data to mlx5e_xmit_data - it will be used in the upcoming TX MPWQE flow. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 530d5ce22ca2d7f54b756580c02d0772c053d221 Author: Maxim Mikityanskiy Date: Thu Jun 4 16:43:27 2020 +0300 net/mlx5e: Generalize TX MPWQE checks for full session As preparation for the upcoming TX MPWQE for SKBs, create a function (mlx5e_tx_mpwqe_is_full) to check whether an MPWQE session is full. This function will be shared by MPWQE code for XDP and for SKBs. Defines are renamed and moved to make them not XDP-specific. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 338c46c636a790cb22f880435c8c60554c0d50fb Author: Maxim Mikityanskiy Date: Thu Apr 16 11:30:33 2020 +0300 net/mlx5e: Support multiple SKBs in a TX WQE TX MPWQE support for SKBs is coming in one of the following patches, and a single MPWQE can send multiple SKBs. This commit prepares the TX path code to handle such cases: 1. An additional FIFO for SKBs is added, just like the FIFO for DMA chunks. 2. struct mlx5e_tx_wqe_info will contain num_fifo_pkts. If a given WQE contains only one packet, num_fifo_pkts will be zero, and the SKB will be stored in mlx5e_tx_wqe_info, as usual. If num_fifo_pkts > 0, the SKB pointer will be NULL, and the SKBs will be stored in the FIFO. This change has no performance impact in TCP single stream test and XDP_TX single stream test. When compiled with a recent GCC, this change shows no visible performance impact on UDP pktgen (burst 32) single stream test either: Packet rate: 16.95 Mpps (±0.15 Mpps) -> 16.96 Mpps (±0.12 Mpps) Instructions per packet: 429 -> 421 Cycles per packet: 160 -> 156 Instructions per cycle: 2.69 -> 2.70 CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz (x86_64) NIC: Mellanox ConnectX-6 Dx GCC 10.2.0 Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 56e4da669a36b56c502ca360b3c44a6089b0aa22 Author: Maxim Mikityanskiy Date: Thu Jul 30 17:53:46 2020 +0300 net/mlx5e: Move the TLS resync check out of the function Before this patch, mlx5e_ktls_tx_handle_resync_dump_comp checked for resync_dump_frag_page. It happened for all WQEs without an SKB, including padding WQEs, and required a function call. Normally, padding WQEs happen more often than TLS resyncs. Take this check out of the function and put it to an inline function to save a call on all padding WQEs. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 97e3afd64dc2918f79026986c575f3343197e7c8 Author: Maxim Mikityanskiy Date: Thu Jul 9 14:05:31 2020 +0300 net/mlx5e: Unify constants for WQE_EMPTY_DS_COUNT A constant for the number of DS in an empty WQE (i.e. a WQE without data segments) is needed in multiple places (normal TX data path, MPWQE in XDP), but currently we have a constant for XDP and an inline formula in normal TX. This patch introduces a common constant. Additionally, mlx5e_xdp_mpwqe_session_start is converted to use struct assignment, because the code nearby is touched. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 388a2b56e5b042e0d1ad4d309f875a944b1d1c11 Author: Maxim Mikityanskiy Date: Thu Jul 30 16:14:58 2020 +0300 net/mlx5e: Small improvements for XDP TX MPWQE logic Use MLX5E_XDP_MPW_MAX_WQEBBS to reserve space for a MPWQE, because it's actually the maximal size a MPWQE can take. Reorganize the logic that checks when to close the MPWQE session: 1. Put all checks into a single function. 2. When inline is on, make only one comparison - if it's false, the less strict one will also be false. The compiler probably optimized it out anyway, but it's clearer to also reflect it in the code. The MLX5E_XDP_INLINE_WQE_* defines are also changed to make the calculations more correct from the logical point of view. Though MLX5E_XDP_INLINE_WQE_MAX_DS_CNT used to be 16 and didn't change its value, the calculation used to be DIV_ROUND_UP(max inline packet size, MLX5_SEND_WQE_DS), and the numerator should have included sizeof(struct mlx5_wqe_inline_seg). Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 8e4b53f60f7d33cf6c60f790cf506220b2bcbb0f Author: Maxim Mikityanskiy Date: Fri Feb 14 11:22:49 2020 +0200 net/mlx5e: Refactor xmit functions A huge function mlx5e_sq_xmit was split into several to achieve multiple goals: 1. Reuse the code in IPoIB. 2. Better intergrate with TLS, IPSEC, GENEVE and checksum offloads. Now it's possible to reserve space in the WQ before running eseg-based offloads, so: 2.1. It's not needed to copy cseg and eseg after mlx5e_fill_sq_frag_edge anymore. 2.2. mlx5e_txqsq_get_next_pi will be used instead of the legacy mlx5e_fill_sq_frag_edge for better code maintainability and reuse. 3. Prepare for the upcoming TX MPWQE for SKBs. It will intervene after mlx5e_sq_calc_wqe_attr to check if it's possible to use MPWQE, and the code flow will split into two paths: MPWQE and non-MPWQE. Two high-level functions are provided to send packets: * mlx5e_xmit is called by the networking stack, runs offloads and sends the packet. In one of the following patches, MPWQE support will be added to this flow. * mlx5e_sq_xmit_simple is called by the TLS offload, runs only the checksum offload and sends the packet. This change has no performance impact in TCP single stream test and XDP_TX single stream test. When compiled with a recent GCC, this change shows no visible performance impact on UDP pktgen (burst 32) single stream test either: Packet rate: 16.86 Mpps (±0.15 Mpps) -> 16.95 Mpps (±0.15 Mpps) Instructions per packet: 434 -> 429 Cycles per packet: 158 -> 160 Instructions per cycle: 2.75 -> 2.69 CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz (x86_64) NIC: Mellanox ConnectX-6 Dx GCC 10.2.0 Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit d02dfcd51f1fa38ab9ff0a18ea791effa128819c Author: Maxim Mikityanskiy Date: Tue Sep 8 11:03:51 2020 +0300 net/mlx5e: Move mlx5e_tx_wqe_inline_mode to en_tx.c Move mlx5e_tx_wqe_inline_mode from en/txrx.h to en_tx.c as it's only used there. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 8ba6f18399c946cc2de58ece7e9636d52829a0d9 Author: Maxim Mikityanskiy Date: Tue Sep 8 10:46:09 2020 +0300 net/mlx5e: Use struct assignment to initialize mlx5e_tx_wqe_info Struct assignment guarantees that all fields of the structure are initialized (those that are not mentioned are zeroed). It makes code mode robust and reduces chances for unpredictable behavior when one forgets to reset some field and it holds an old value from previous iterations of using the structure. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 6d55af43fe9398b67165c47d474d47a84681bbeb Author: Maxim Mikityanskiy Date: Mon Dec 9 15:39:32 2019 +0200 net/mlx5e: Refactor inline header size calculation in the TX path As preparation for the next patch, don't increase ihs to calculate ds_cnt and then decrease it, but rather calculate the intermediate value temporarily. This code has the same amount of arithmetic operations, but now allows to split out ds_cnt calculation, which will be performed in the next patch. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 19bc26e0ba37be93d5cfea6ed106b6e900a6319f Author: Fabio Estevam Date: Mon Sep 14 11:38:47 2020 -0300 arm64: defconfig: Enable the eLCDIF and Raydium RM67191 drivers Select the eLCDIF display controller and Raydium RM67191 panel drivers, so that MIPI DSI can be functional by default on a imx8mq-evk board. Signed-off-by: Fabio Estevam Reviewed-by: Guido Günther Signed-off-by: Shawn Guo commit 55df2079eb6faa048a0d65306556e6d7423a5029 Author: Fabio Estevam Date: Sun Sep 13 13:29:13 2020 -0300 ARM: dts: imx6q-logicpd: Use GPIO chipselect Using the native SPI chipselect on i.MX6 is known to be problematic. Doing it on a imx6q-sabresd causes the SPI NOR probe to fail: [ 5.388704] spi-nor spi0.0: unrecognized JEDEC id bytes: 00 00 00 00 00 00 Use the GPIO chipselect to avoid such problem. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit dd1d4def682048cae8aafad0453c1e65e6596183 Author: Fabio Estevam Date: Sun Sep 13 13:29:12 2020 -0300 ARM: dts: imx: Add an entry for imx6q-logicpd.dtb Add an entry for imx6q-logicpd.dtb so that it can be built by default. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 9249d286984cb0dec97aeef4cea2a680cbe58724 Author: Fabio Estevam Date: Sun Sep 13 13:29:10 2020 -0300 ARM: dts: imx6q-logicpd: Add a specific board compatible string It is standard practice to have a specific board compatible string, so pass "logicpd,imx6q-logicpd". Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 928b960fe5aff659de33a3f04ace1ba7d379d5fa Author: Fabio Estevam Date: Sun Sep 13 13:29:11 2020 -0300 dt-bindings: arm: fsl: Add an entry for the i.MX6 LogicPD board Add an entry for the i.MX6 LogicPD board. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit dcdd4f2e829e707c6cf4f6f6554252bb31f7b98a Author: Krzysztof Kozlowski Date: Wed Sep 16 17:57:15 2020 +0200 ARM: dts: imx6q: align GPIO hog names with dtschema dtschema for pca95xx expects GPIO hogs to end with 'hog' prefix. While touching the hogs, fix indentation (spaces -> tabs). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit cf59eb13e151ef42c37ae31864046c17e481ed8f Author: Wang Wensheng Date: Mon Sep 21 11:22:11 2020 +0000 KVM: PPC: Book3S: Fix symbol undeclared warnings Build the kernel with `C=2`: arch/powerpc/kvm/book3s_hv_nested.c:572:25: warning: symbol 'kvmhv_alloc_nested' was not declared. Should it be static? arch/powerpc/kvm/book3s_64_mmu_radix.c:350:6: warning: symbol 'kvmppc_radix_set_pte_at' was not declared. Should it be static? arch/powerpc/kvm/book3s_hv.c:3568:5: warning: symbol 'kvmhv_p9_guest_entry' was not declared. Should it be static? arch/powerpc/kvm/book3s_hv_rm_xics.c:767:15: warning: symbol 'eoi_rc' was not declared. Should it be static? arch/powerpc/kvm/book3s_64_vio_hv.c:240:13: warning: symbol 'iommu_tce_kill_rm' was not declared. Should it be static? arch/powerpc/kvm/book3s_64_vio.c:492:6: warning: symbol 'kvmppc_tce_iommu_do_map' was not declared. Should it be static? arch/powerpc/kvm/book3s_pr.c:572:6: warning: symbol 'kvmppc_set_pvr_pr' was not declared. Should it be static? Those symbols are used only in the files that define them so make them static to fix the warnings. Signed-off-by: Wang Wensheng Signed-off-by: Paul Mackerras commit eb173559c97c3b5d8905cd8a93a5d3f3fb24916d Author: Jing Xiangfeng Date: Sat Sep 19 15:12:30 2020 +0800 KVM: PPC: Book3S: Remove redundant initialization of variable ret The variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it. Signed-off-by: Jing Xiangfeng Reviewed-by: Fabiano Rosas Signed-off-by: Paul Mackerras commit 4517076608c51c74966cf0c54bc66dada7dec223 Author: Qinglang Miao Date: Sat Sep 19 09:29:25 2020 +0800 KVM: PPC: Book3S HV: XIVE: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Reviewed-by: Cédric Le Goater Signed-off-by: Paul Mackerras commit c48cf8e5d88bcbeaeb3c3e779cebd58d1e5e7653 Author: Krzysztof Kozlowski Date: Tue Sep 22 09:46:48 2020 +0800 arm64: dts: imx8mn-ddr4-evk: Remove unneeded PMIC pin configuration The pin configuration for PMIC interrupt is already set by imx8mn-evk.dtsi with exactly the same values. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 12cdf9d2c9f8b846ebca210c523fa6c3c5db0ac0 Author: Krzysztof Kozlowski Date: Wed Sep 9 17:17:54 2020 +0200 arm64: dts: imx8mm-var-som-symphony: Adjust ethernet pin configuration The Symphony board uses GPIO from expander as Ethernet PHY reset pin, not the GPIO1_IO9. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 510ed6749fa62f9013d73e1b74ae942704904e71 Author: Krzysztof Kozlowski Date: Wed Sep 9 17:17:53 2020 +0200 arm64: dts: imx8mm-var-som-symphony: Remove unneeded i2c3 properties The i2c3 clock frequency and pin configuration are already set by imx8mm-var-som.dtsi. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit fd264ce96c382bc2e36eb1f49ac45c5980650244 Author: Masami Hiramatsu Date: Thu Sep 10 21:39:27 2020 +0900 Documentation: tracing: Add the startup timing of boot-time tracing Add the note about when to start the boot-time tracing. This will be needed for the people who wants to trace earlier boot sequence. Link: https://lkml.kernel.org/r/159974156678.478751.10215894815285734481.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit ba0fbfbb21cd90d51e4f6668ee8397e810818028 Author: Masami Hiramatsu Date: Thu Sep 10 21:39:17 2020 +0900 tracing/boot, kprobe, synth: Initialize boot-time tracing earlier Initialize boot-time tracing in core_initcall_sync instead of fs_initcall, and initialize required tracers (kprobes and synth) in core_initcall. This will allow the boot-time tracing to trace __init code from the beginning of postcore_initcall stage. Link: https://lkml.kernel.org/r/159974155727.478751.7486926132902849578.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 4114fbfd02f12d7a58cc4bd6fc36e0925266f9f7 Author: Masami Hiramatsu Date: Thu Sep 10 21:39:07 2020 +0900 tracing: Enable creating new instance early boot Enable creating new trace_array instance in early boot stage. If the instances directory is not created, postpone it until the tracefs is initialized. Link: https://lkml.kernel.org/r/159974154763.478751.6289753509587233103.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit a838deab4e635994476bfc5b254bdf461e168752 Author: Masami Hiramatsu Date: Thu Sep 10 21:38:58 2020 +0900 tracing: Enable adding dynamic events early stage Split the event fields initialization from creating new event directory. This allows the boot-time tracing to define dynamic events before initializing events directory on tracefs. Link: https://lkml.kernel.org/r/159974153790.478751.3475515065034825374.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit ac343da7bc9048629f9d12d98e8f0573df88836b Author: Masami Hiramatsu Date: Thu Sep 10 21:38:48 2020 +0900 tracing: Define event fields early stage Define event fields at early stage so that boot-time tracing can access the event fields (like per-event filter setting). Link: https://lkml.kernel.org/r/159974152862.478751.2023768466808361350.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 36dadef23fcca55bb6531dc12822d3b165319ccc Author: Masami Hiramatsu Date: Thu Sep 10 21:38:39 2020 +0900 kprobes: Init kprobes in early_initcall Init kprobes feature in early_initcall as same as jump_label and dynamic_debug does, so that we can use kprobes events in earlier boot stage. Link: https://lkml.kernel.org/r/159974151897.478751.8342374158615496628.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 8f2a59968f961570fe7b9d99e3a615dd21477638 Author: Masami Hiramatsu Date: Thu Sep 10 17:56:16 2020 +0900 selftests/ftrace: Add %return suffix tests Add kprobe %return suffix testcase and syntax error tests for %return suffix. Link: https://lkml.kernel.org/r/159972817653.428528.9180599115849301184.stgit@devnote2 Acked-by: Shuah Khan Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 19c311ae7c0f4f2475617a8acb7ba7b7b4575f0e Author: Masami Hiramatsu Date: Thu Sep 10 17:56:06 2020 +0900 Documentation: tracing: boot: Add an example of tracing function-calls Add an example of tracing function calls on a specific function. Link: https://lkml.kernel.org/r/159972816669.428528.12390560334549382316.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 638e476d1df6812fad0c700ee3e17727a4ff0d40 Author: Masami Hiramatsu Date: Thu Sep 10 17:55:56 2020 +0900 Documentation: tracing: Add %return suffix description Add a description of the %return suffix option for kprobe event and uprobe event. Link: https://lkml.kernel.org/r/159972815624.428528.10450874184415697524.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 3dd3aae32dc91efab916b28cf95986186c6e8d6b Author: Masami Hiramatsu Date: Thu Sep 10 17:55:46 2020 +0900 tracing/uprobes: Support perf-style return probe Support perf-style return probe ("SYMBOL%return") for uprobe events as same as kprobe events does. Link: https://lkml.kernel.org/r/159972814601.428528.7641183316212425445.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 4725cd89978c26405a20414f3a0fa6cbd2bf9aad Author: Masami Hiramatsu Date: Thu Sep 10 17:55:35 2020 +0900 tracing/kprobes: Support perf-style return probe Support perf-style return probe ("SYMBOL%return") for kprobe events. This will allow boot-time tracing user to define a return probe event. Link: https://lkml.kernel.org/r/159972813535.428528.4437029657208468954.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit c51ba517989efb4be3d8658f31c98786d88a89fe Author: Masami Hiramatsu Date: Fri Sep 11 09:47:15 2020 +0900 Documentation: tracing: Add tracing_on option to boot-time tracer Add tracing_on option description to the boot-time tracer. Link: https://lkml.kernel.org/r/159978523520.485820.9250337223076929279.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 8490db06f914100fc8a5110481cbd37d8968be90 Author: Masami Hiramatsu Date: Thu Sep 10 17:55:15 2020 +0900 tracing/boot: Add per-instance tracing_on option support Add per-instance tracing_on option, which will be useful with traceon/traceoff event trigger actions. For example, if we disable tracing_on by default and set traceon and traceoff on a pair of events, we can trace functions between the pair of events. Link: https://lkml.kernel.org/r/159972811538.428528.2561315102284268611.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 40d14da383670db21a09e63d52db8dee9b77741e Author: Davidlohr Bueso Date: Sun Sep 6 18:33:26 2020 -0700 fgraph: Convert ret_stack tasklist scanning to rcu It seems that alloc_retstack_tasklist() can also take a lockless approach for scanning the tasklist, instead of using the big global tasklist_lock. For this we also kill another deprecated and rcu-unsafe tsk->thread_group user replacing it with for_each_process_thread(), maintaining semantics. Here tasklist_lock does not protect anything other than the list against concurrent fork/exit. And considering that the whole thing is capped by FTRACE_RETSTACK_ALLOC_SIZE (32), it should not be a problem to have a pontentially stale, yet stable, list. The task cannot go away either, so we don't risk racing with ftrace_graph_exit_task() which clears the retstack. The tsk->ret_stack management is not protected by tasklist_lock, being serialized with the corresponding publish/subscribe barriers against concurrent ftrace_push_return_trace(). In addition this plays nicer with cachelines by avoiding two atomic ops in the uncontended case. Link: https://lkml.kernel.org/r/20200907013326.9870-1-dave@stgolabs.net Acked-by: Oleg Nesterov Signed-off-by: Davidlohr Bueso Signed-off-by: Steven Rostedt (VMware) commit eb8d8b4c9848b200586aa98e105b39f159656ba6 Author: Dan Carpenter Date: Sat Sep 5 15:50:20 2020 +0300 tracing: remove a pointless assignment The "tr" is a stack variable so setting it to NULL before a return is a no-op. Delete the assignment. Signed-off-by: Dan Carpenter Signed-off-by: Steven Rostedt (VMware) commit f3d36426618ee2b2d1fa99aefb5fe4d2dc33807e Author: Jarkko Sakkinen Date: Tue Aug 18 08:08:57 2020 +0300 kprobes: Use module_name() macro It is advised to use module_name() macro instead of dereferencing mod->name directly. This makes sense for consistencys sake and also it prevents a hard dependency to CONFIG_MODULES. Link: https://lkml.kernel.org/r/20200818050857.117998-1-jarkko.sakkinen@linux.intel.com Cc: Mark Rutland Cc: Ingo Molnar Cc: linux-mm@kvack.org Cc: Andi Kleen Cc: Ard Biesheuvel Cc: Jessica Yu Cc: Mark Rutland , Cc: Masami Hiramatsu Cc: Mike Rapoport Cc: Peter Zijlstra Cc: Russell King Cc: Will Deacon Acked-by: Masami Hiramatsu Signed-off-by: Jarkko Sakkinen Signed-off-by: Steven Rostedt (VMware) commit b427e765bdffcc18911ace199a17b09332a47d55 Author: Xianting Tian Date: Thu Aug 13 19:28:03 2020 +0800 tracing: Use __this_cpu_read() in trace_buffered_event_enable() The code is executed with preemption disabled, so it's safe to use __this_cpu_read(). Link: https://lkml.kernel.org/r/20200813112803.12256-1-tian.xianting@h3c.com Signed-off-by: Xianting Tian Signed-off-by: Steven Rostedt (VMware) commit 5c8c206e4308ee33dea7c60b0cfcbed48a6438b4 Author: Randy Dunlap Date: Thu Aug 6 20:32:59 2020 -0700 tracing: Delete repeated words in comments Drop repeated words in kernel/trace/. {and, the, not} Link: https://lkml.kernel.org/r/20200807033259.13778-1-rdunlap@infradead.org Cc: Ingo Molnar Signed-off-by: Randy Dunlap Signed-off-by: Steven Rostedt (VMware) commit 92ec804f3dbf0d986f8e10850bfff14f316d7aaf Author: Florian Fainelli Date: Mon Sep 21 15:10:53 2020 -0700 net: phy: bcm7xxx: Add an entry for BCM72113 BCM72113 features a 28nm integrated EPHY, add an entry to the driver for it. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 7b1d96813317358312440d0d07abbfbeb0ef8d22 Author: Aswath Govindraju Date: Thu Sep 10 17:56:24 2020 +0530 spi: omap2-mcspi: Improve performance waiting for CHSTAT This reverts commit 13d515c796 (spi: omap2-mcspi: Switch to readl_poll_timeout()). The amount of time spent polling for the MCSPI_CHSTAT bits to be set on AM335x-icev2 platform is less than 1us (about 0.6us) in most cases, with or without using DMA. So, in most cases the function need not sleep. Also, setting the sleep_usecs to zero would not be optimal here because ktime_add_us() used in readl_poll_timeout() is slower compared to the direct addition used after the revert. So, it is sub-optimal to use readl_poll_timeout in this case. When DMA is not enabled, this revert results in an increase of about 27% in throughput and decrease of about 20% in CPU usage. However, the CPU usage and throughput are almost the same when used with DMA. Therefore, fix this by reverting the commit which switched to using readl_poll_timeout(). Fixes: 13d515c796ad ("spi: omap2-mcspi: Switch to readl_poll_timeout()") Signed-off-by: Aswath Govindraju Link: https://lore.kernel.org/r/20200910122624.8769-1-a-govindraju@ti.com Signed-off-by: Mark Brown commit 4c3a14fbc05a09fc369fb68a86cdbf6f441a29f2 Author: Qinglang Miao Date: Mon Sep 21 21:11:06 2020 +0800 spi: npcm-fiu: simplify the return expression of npcm_fiu_probe() Simplify the return expression. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200921131106.93228-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown commit d30a7d54e8481acbb5cc42016c817e598c3d697b Author: Fabian Frederick Date: Wed Sep 9 20:26:24 2020 +0200 selftests: netfilter: remove unused cnt and simplify command testing cnt was not used in nft_meta.sh This patch also fixes 2 shellcheck SC2181 warnings: "check exit code directly with e.g. 'if mycmd;', not indirectly with $?." Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit 5b1a995bfa93667762badbe1d8f0f7ad680bdf29 Author: Fabian Frederick Date: Wed Sep 9 20:26:13 2020 +0200 selftests: netfilter: fix nft_meta.sh error reporting When some test directly done with check_one_counter() fails, counter variable is undefined. This patch calls ip with cname which avoids errors like: FAIL: oskuidcounter, want "packets 2", got Error: syntax error, unexpected newline, expecting string list counter inet filter ^ Error is now correctly rendered: FAIL: oskuidcounter, want "packets 2", got table inet filter { counter oskuidcounter { packets 1 bytes 84 } } Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit f02ced62ec35e847ebadb1c6759320345c30fcb5 Author: Fabian Frederick Date: Wed Sep 9 20:25:36 2020 +0200 selftests: netfilter: add cpu counter check run task on first CPU with netfilter counters reset and check cpu meta after another ping Signed-off-by: Fabian Frederick Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 8d23b0b8fc950cba2046840c46b21db9b5c0573c Author: Krzysztof Kozlowski Date: Mon Sep 21 22:36:16 2020 +0200 regulator: s5m8767: initialize driver via module_platform_driver The driver was using subsys_initcall() because in old times deferred probe was not supported everywhere and specific ordering was needed. Since probe deferral works fine and specific ordering is discouraged (hides dependencies between drivers and couples their boot order), the driver can be converted to regular module_platform_driver. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200921203616.19623-1-krzk@kernel.org Signed-off-by: Mark Brown commit 0c7d1b4d0c1e7c4309e01532b811392b11b81693 Author: Krzysztof Kozlowski Date: Sun Sep 20 23:41:07 2020 +0200 regulator: enable compile testing for Maxim and Samsung PMIC drivers Most of Maxim and Samsung PMIC/MUIC regulator drivers can be compile tested to increase build coverage. This allows to build them on configurations without I2C (as I2C is required by dependency - parent MFD driver). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200920214107.6299-1-krzk@kernel.org Signed-off-by: Mark Brown commit be35cc4695aa1b26d00b30bfd1d8408eddd357ec Author: Colin Ian King Date: Sun Sep 20 15:24:54 2020 +0100 regulator: fix indentation issue There is a return statement that is indented with an extra space, fix this by removing it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200920142454.33352-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 18cd9b00fffe416f8c17990519dd80f05b312617 Author: YueHaibing Date: Fri Sep 18 21:16:56 2020 +0800 ipvs: Remove unused macros They are not used since commit e4ff67513096 ("ipvs: add sync_maxlen parameter for the sync daemon") Signed-off-by: YueHaibing Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 8a8b9047a8975ad4bdee34b7affad66edfbe626d Author: YueHaibing Date: Wed Sep 16 22:16:56 2020 +0800 netfilter: nf_tables: Remove ununsed function nft_data_debug It is never used, so can be removed. Signed-off-by: YueHaibing Signed-off-by: Pablo Neira Ayuso commit 1702ad79d31ef236adcd9999fae7617e8eda515d Author: Florian Westphal Date: Wed Sep 9 13:29:01 2020 +0200 netfilter: conntrack: proc: rename stat column Rename 'searched' column to 'clashres' (same len). conntrack(8) using the old /proc interface (ctnetlink not available) shows: cpu=0 entries=4784 clashres=2292 [..] Another alternative is to add another column, but this increases the number of always-0 columns. Fixes: bc92470413f3af1 ("netfilter: conntrack: add clash resolution stat counter") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit a8a717963fe5ecfd274eb93dd1285ee9428ffca7 Author: Jiri Olsa Date: Fri Sep 18 13:23:38 2020 +0200 selftests/bpf: Fix stat probe in d_path test Some kernels builds might inline vfs_getattr call within fstat syscall code path, so fentry/vfs_getattr trampoline is not called. Add security_inode_getattr to allowlist and switch the d_path test stat trampoline to security_inode_getattr. Keeping dentry_open and filp_close, because they are in their own files, so unlikely to be inlined, but in case they are, adding security_file_open. Adding flags that indicate trampolines were called and failing the test if any of them got missed, so it's easier to identify the issue next time. Fixes: e4d1af4b16f8 ("selftests/bpf: Add test for d_path helper") Suggested-by: Alexei Starovoitov Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200918112338.2618444-1-jolsa@kernel.org commit 1d512ee861b80da63cbc501b973c53131aa22f29 Author: Charles Keepax Date: Fri Sep 18 16:22:12 2020 +0100 regmap: debugfs: Fix more error path regressions Many error paths in __regmap_init rely on ret being pre-initialised to -EINVAL, add an extra initialisation in after the new call to regmap_set_name. Fixes: 94cc89eb8fa5 ("regmap: debugfs: Fix handling of name string for debugfs init delays") Reported-by: Dan Carpenter Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200918152212.22200-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 376dd57d88633e455da0fdf54adc1f8682ab8d95 Merge: 163cd1059a85d 2ca210112ad91 Author: Mark Brown Date: Mon Sep 21 23:57:25 2020 +0100 Merge series "ASoC: SOF: fix kcontrol size checks" from Kai Vehmanen : Series that fixes checks for 'size' in kcontrol get/put ext_bytes methods for SOF. The gaps in these checks were discovered via cppcheck warnings on unused variable values. Pierre-Louis Bossart (5): ASoC: SOF: control: fix size checks for ext_bytes control .get() ASoC: SOF: control: fix size checks for volatile ext_bytes control .get() ASoC: SOF: control: add size checks for ext_bytes control .put() ASoC: SOF: control: remove const in sizeof() ASoC: SOF: topology: remove const in sizeof() sound/soc/sof/control.c | 53 +++++++++++++++++++++++++++++++--------- sound/soc/sof/topology.c | 2 +- 2 files changed, 43 insertions(+), 12 deletions(-) -- 2.27.0 commit 163cd1059a85d225b811ddb4192fabd1553f77f1 Author: Kai Vehmanen Date: Mon Sep 21 13:08:41 2020 +0300 ASoC: hdac: make SOF HDA codec driver probe deterministic To provide backward compatibility to older systems, the SOF HDA driver allows user to specify which HDMI codec driver to use at runtime via kernel parameter. This mechanism has a subtle flaw in that it assumes the codec drivers not to be loaded when the SOF PCI driver is loaded. The problem is rooted in use of the hdev->type field. snd_hdac_ext_bus_device_init() initializes this field to HDA_DEV_ASOC. This signals the HDA core that ASoC drivers should be considered in driver matching (hda_bus_match()). The SOF and SST drivers continue by overriding this field to HDA_DEV_LEGACY and proceeding to load driver modules with request_module(). Correct drivers will get loaded and attached. If however the codec drivers are already loaded when snd_hdac_ext_bus_device_init() is called, the matching will not work as expected as device type is still set to HDA_DEV_ASOC. Specifically if hdac-hdmi is attached when machine driver is configured to use hdac-hda, this leads to out-of-bounds memory access in hda_dsp_hdmi_build_controls(). Fix the issue by adding codec type as a parameter to snd_hdac_ext_bus_device_init() and ensuring type is set correctly from the start. Fixes: 139c7febad1a ("ASoC: SOF: Intel: add support for snd-hda-codec-hdmi") Signed-off-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200921100841.2882662-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit be05ab41c61858cce557a1fe863ed00f38e31e97 Author: Dan Murphy Date: Fri Sep 18 14:05:48 2020 -0500 ASoC: tas2770: Refactor sample rate function Refactor the tas2770_set_samplerate to simplify the code and access the I2C bus only once per rate request. The ramp rate and sample rate bits are contained in the same register so a single call to the snd_soc_update_bits function is all that is needed Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918190548.12598-9-dmurphy@ti.com Signed-off-by: Mark Brown commit d3964aff7331cd9695d0c18655e053b08837ff78 Author: Dan Murphy Date: Fri Sep 18 14:05:47 2020 -0500 ASoC: tas2770: Fix the spacing and new lines Fix up the spacing for argument alignment and add new lines to separate code. Eliminate unneccessary goto statements when the error code could just be returned. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918190548.12598-8-dmurphy@ti.com Signed-off-by: Mark Brown commit ec9377dca2ca77eaf4fbdb09ac803f379b10d731 Author: Dan Murphy Date: Fri Sep 18 14:05:45 2020 -0500 ASoC: tas2770: Convert bit mask to GENMASK in header Update the hardcoded masks with the GENMASK macro. Also update some of the hardcoded bits with the BIT macro Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918190548.12598-6-dmurphy@ti.com Signed-off-by: Mark Brown commit d3d71c99b541040da198f43da3bbd85d8e9598cb Author: Dan Murphy Date: Fri Sep 18 14:05:44 2020 -0500 ASoC: tas2770: Fix unbalanced calls to pm_runtime Fix the unbalanced call to the pm_runtime_disable when removing the module. pm_runtime_enable is not called nor is the pm_runtime setup in the code. Remove the i2c_remove function and the pm_runtime_disable. Fixes: 1a476abc723e6 ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918190548.12598-5-dmurphy@ti.com Signed-off-by: Mark Brown commit b23d9eb897a1209e4d741fd69e5490f1b5b9e7cf Author: Dan Murphy Date: Fri Sep 18 14:05:42 2020 -0500 dt-bindings: tas2770: Fix I2C addresses for the TAS2770 The I2C addresses listed in the yaml are not correct. The addresses can range from 0x41 through 0x48 based on register configurations. Fix the example and the description. Fixes: 4b7151dadfd4 ("dt-bindings: ASoC: Add tas2770 smart PA dt bindings") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918190548.12598-3-dmurphy@ti.com Signed-off-by: Mark Brown commit 8adcdbe63aa7745ecd253b6dcf03cd2d30ece8f5 Author: Dan Murphy Date: Mon Sep 21 10:38:20 2020 -0500 ASoC: tas2562: Add the TAS2110 class-D amplifier Add the TAS2110 amplifier to the TAS2562 driver. The TAS2110 is register and bitmap compatible. The chips differ in that the TAS2110 does not have the I/V Sense feedback path. Since these features do not exist the device needs to be registered without these controls. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200921153820.18357-2-dmurphy@ti.com Signed-off-by: Mark Brown commit 9074a078435eb9c4e16862ec08faaf19aee6190f Author: Dan Murphy Date: Mon Sep 21 10:38:19 2020 -0500 dt-bindings: tas2562: Add the TAS2110 amplifier Add the TAS2110 amplifier compatible. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200921153820.18357-1-dmurphy@ti.com Signed-off-by: Mark Brown commit c69d2ddb2072eb7ffca1a31ee5ddc16dcd414ed9 Author: Yonghong Song Date: Wed Sep 16 15:46:45 2020 -0700 bpf: Using rcu_read_lock for bpf_sk_storage_map iterator If a bucket contains a lot of sockets, during bpf_iter traversing a bucket, concurrent userspace bpf_map_update_elem() and bpf program bpf_sk_storage_{get,delete}() may experience some undesirable delays as they will compete with bpf_iter for bucket lock. Note that the number of buckets for bpf_sk_storage_map is roughly the same as the number of cpus. So if there are lots of sockets in the system, each bucket could contain lots of sockets. Different actual use cases may experience different delays. Here, using selftest bpf_iter subtest bpf_sk_storage_map, I hacked the kernel with ktime_get_mono_fast_ns() to collect the time when a bucket was locked during bpf_iter prog traversing that bucket. This way, the maximum incurred delay was measured w.r.t. the number of elements in a bucket. # elems in each bucket delay(ns) 64 17000 256 72512 2048 875246 The potential delays will be further increased if we have even more elemnts in a bucket. Using rcu_read_lock() is a reasonable compromise here. It may lose some precision, e.g., access stale sockets, but it will not hurt performance of bpf program or user space application which also tries to get/delete or update map elements. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Cc: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200916224645.720172-1-yhs@fb.com commit 1ef5423a55c2ac6f1361811efe75b6e46d1023ed Author: Mike Hommey Date: Tue Sep 22 06:56:38 2020 +0900 x86/fpu: Handle FPU-related and clearcpuid command line arguments earlier FPU initialization handles them currently. However, in the case of clearcpuid=, some other early initialization code may check for features before the FPU initialization code is called. Handling the argument earlier allows the command line to influence those early initializations. Signed-off-by: Mike Hommey Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200921215638.37980-1-mh@glandium.org commit 2ca210112ad91880d2d5a3f85fecc838600afbce Author: Pierre-Louis Bossart Date: Mon Sep 21 14:08:12 2020 +0300 ASoC: SOF: control: add size checks for ext_bytes control .put() Make sure the TLV header and size are consistent before copying from userspace. Fixes: c3078f5397046 ('ASoC: SOF: Add Sound Open Firmware KControl support') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200921110814.2910477-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit ec5a97624a8de4f44b090cf53bd48c05458e0b17 Author: Pierre-Louis Bossart Date: Mon Sep 21 14:08:11 2020 +0300 ASoC: SOF: control: fix size checks for volatile ext_bytes control .get() Mirror addition of checks for regular ext_bytes controls. Fixes: 783560d02dd61 ('ASoC: SOF: Implement snd_sof_bytes_ext_volatile_get kcontrol IO') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200921110814.2910477-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 3331bcd6a2f2dbe9c1fa764df695422c99e2f1fb Author: Pierre-Louis Bossart Date: Mon Sep 21 14:08:10 2020 +0300 ASoC: SOF: control: fix size checks for ext_bytes control .get() cppcheck complains twice: sound/soc/sof/control.c:436:2: style: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg] size -= sizeof(const struct snd_ctl_tlv); ^ sound/soc/sof/control.c:436:7: style: Variable 'size' is assigned a value that is never used. [unreadVariable] size -= sizeof(const struct snd_ctl_tlv); Somehow we dropped the checks for the size argument when upstreaming the code, somewhere between v5 and v6. Re-add a size check to avoid providing userspace with more data that it asked for. Also fix all error codes, we should return -ENOSPC instead of -EINVAL. Fixes: c3078f5397046 ('ASoC: SOF: Add Sound Open Firmware KControl support') Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200921110814.2910477-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 4153b89b41265a4b35820deb58b92a6c52bd805a Merge: 31f23a6a181c8 f79e7ea571732 Author: Alexei Starovoitov Date: Mon Sep 21 15:00:41 2020 -0700 Merge branch 'refactor-check_func_arg' Lorenz Bauer says: ==================== Changes in v4: - Output the desired type on BTF ID mismatch (Martin) Changes in v3: - Fix BTF_ID_LIST_SINGLE if BTF is disabled (Martin) - Drop incorrect arg_btf_id in bpf_sk_storage.c (Martin) - Check for arg_btf_id in check_func_proto (Martin) - Drop incorrect PTR_TO_BTF_ID from fullsock_types (Martin) - Introduce btf_seq_file_ids in bpf_trace.c to reduce duplication Changes in v2: - Make the series stand alone (Martin) - Drop incorrect BTF_SET_START fix (Andrii) - Only support a single BTF ID per argument (Martin) - Introduce BTF_ID_LIST_SINGLE macro (Andrii) - Skip check_ctx_reg iff register is NULL - Change output of check_reg_type slightly, to avoid touching tests Original cover letter: Currently, check_func_arg has this pretty gnarly if statement that compares the valid arg_type with the actualy reg_type. Sprinkled in-between are checks for register_is_null, to short circuit these tests if we're dealing with a nullable arg_type. There is also some code for later bounds / access checking hidden away in there. This series of patches refactors the function into something like this: if (reg_is_null && arg_type_is_nullable) skip type checking do type checking, including BTF validation do bounds / access checking The type checking is now table driven, which makes it easy to extend the acceptable types. Maybe more importantly, using a table makes it easy to provide more helpful verifier output (see the last patch). ==================== Signed-off-by: Alexei Starovoitov commit f79e7ea571732a6e16f15c6e2f000c347e2d7431 Author: Lorenz Bauer Date: Mon Sep 21 13:12:27 2020 +0100 bpf: Use a table to drive helper arg type checks The mapping between bpf_arg_type and bpf_reg_type is encoded in a big hairy if statement that is hard to follow. The debug output also leaves to be desired: if a reg_type doesn't match we only print one of the options, instead printing all the valid ones. Convert the if statement into a table which is then used to drive type checking. If none of the reg_types match we print all options, e.g.: R2 type=rdonly_buf expected=fp, pkt, pkt_meta, map_value Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200921121227.255763-12-lmb@cloudflare.com commit fd1b0d604c56e0d9f143b39a92132a2ea9625e6d Author: Lorenz Bauer Date: Mon Sep 21 13:12:26 2020 +0100 bpf: Hoist type checking for nullable arg types check_func_arg has a plethora of weird if statements with empty branches. They work around the fact that *_OR_NULL argument types should accept a SCALAR_VALUE register, as long as it's value is 0. These statements make it difficult to reason about the type checking logic. Instead, skip more detailed type checking logic iff the register is 0, and the function expects a nullable type. This allows simplifying the type checking itself. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200921121227.255763-11-lmb@cloudflare.com commit c18f0b6aee2aaa6ab2aefd4b9aa1d89142a48824 Author: Lorenz Bauer Date: Mon Sep 21 13:12:25 2020 +0100 bpf: Check ARG_PTR_TO_SPINLOCK register type in check_func_arg Move the check for PTR_TO_MAP_VALUE to check_func_arg, where all other checking is done as well. Move the invocation of process_spin_lock away from the register type checking, to allow a future refactoring. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200921121227.255763-10-lmb@cloudflare.com commit a2bbe7cc90755283f1db719eb757616cefd2a9fd Author: Lorenz Bauer Date: Mon Sep 21 13:12:24 2020 +0100 bpf: Set meta->raw_mode for pointers close to use If we encounter a pointer to memory, we set meta->raw_mode depending on the type of memory we point at. What isn't obvious is that this information is only used when the next memory size argument is encountered. Move the assignment closer to where it's used, and add a comment that explains what is going on. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200921121227.255763-9-lmb@cloudflare.com commit feec70401672bd9b0268ae59ec5efd15d86ae138 Author: Lorenz Bauer Date: Mon Sep 21 13:12:23 2020 +0100 bpf: Make context access check generic Always check context access if the register we're operating on is PTR_TO_CTX, rather than relying on ARG_PTR_TO_CTX. This allows simplifying the arg_type checking section of the function. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200921121227.255763-8-lmb@cloudflare.com commit 02f7c9585d1e2d5d76cac497bd5ced8ecf9d6f56 Author: Lorenz Bauer Date: Mon Sep 21 13:12:22 2020 +0100 bpf: Make reference tracking generic Instead of dealing with reg->ref_obj_id individually for every arg type that needs it, rely on the fact that ref_obj_id is zero if the register is not reference tracked. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200921121227.255763-7-lmb@cloudflare.com commit d7b9454a4f6333bf145189b8e769011d15bdd50e Author: Lorenz Bauer Date: Mon Sep 21 13:12:21 2020 +0100 bpf: Make BTF pointer type checking generic Perform BTF type checks if the register we're working on contains a BTF pointer, rather than if the argument is for a BTF pointer. This is easier to understand, and allows removing the code from the arg_type checking section of the function. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200921121227.255763-6-lmb@cloudflare.com commit 9436ef6e862b9ca22e5b12f87b106e07d5af4cae Author: Lorenz Bauer Date: Mon Sep 21 13:12:20 2020 +0100 bpf: Allow specifying a BTF ID per argument in function protos Function prototypes using ARG_PTR_TO_BTF_ID currently use two ways to signal which BTF IDs are acceptable. First, bpf_func_proto.btf_id is an array of IDs, one for each argument. This array is only accessed up to the highest numbered argument that uses ARG_PTR_TO_BTF_ID and may therefore be less than five arguments long. It usually points at a BTF_ID_LIST. Second, check_btf_id is a function pointer that is called by the verifier if present. It gets the actual BTF ID of the register, and the argument number we're currently checking. It turns out that the only user check_arg_btf_id ignores the argument, and is simply used to check whether the BTF ID has a struct sock_common at it's start. Replace both of these mechanisms with an explicit BTF ID for each argument in a function proto. Thanks to btf_struct_ids_match this is very flexible: check_arg_btf_id can be replaced by requiring struct sock_common. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200921121227.255763-5-lmb@cloudflare.com commit 27774b7073b5d520c80f1fcb8e9993fc139f21bd Author: Lorenz Bauer Date: Mon Sep 21 13:12:19 2020 +0100 btf: Add BTF_ID_LIST_SINGLE macro Add a convenience macro that allows defining a BTF ID list with a single item. This lets us cut down on repetitive macros. Suggested-by: Andrii Nakryiko Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200921121227.255763-4-lmb@cloudflare.com commit 0d004c020b5574e51f7a525e57d2a11958b334b5 Author: Lorenz Bauer Date: Mon Sep 21 13:12:18 2020 +0100 bpf: Check scalar or invalid register in check_helper_mem_access Move the check for a NULL or zero register to check_helper_mem_access. This makes check_stack_boundary easier to understand. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200921121227.255763-3-lmb@cloudflare.com commit 2af30f115d6957f372ce3096c7198763ff253d97 Author: Lorenz Bauer Date: Mon Sep 21 13:12:17 2020 +0100 btf: Make btf_set_contains take a const pointer bsearch doesn't modify the contents of the array, so we can take a const pointer. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200921121227.255763-2-lmb@cloudflare.com commit c5a2a132a38619d24d6d115c66cc277594b4fe01 Merge: ae4dd9a8c2179 64fb587cfdc32 Author: David S. Miller Date: Mon Sep 21 14:57:05 2020 -0700 Merge tag 'linux-can-next-for-5.10-20200921' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2020-09-21 this is a pull request of 38 patches for net-next. the first 5 patches are by Colin Ian King, Alexandre Belloni and me and they fix various spelling mistakes. The next patch is by me and fixes the indention in the CAN raw protocol according to the kernel coding style. Diego Elio Pettenò contributes two patches to fix dead links in CAN's Kconfig. Masahiro Yamada's patch removes the "WITH Linux-syscall-note" from SPDX tag of C files. AThe next 4 patches are by me and target the CAN device infrastructure and add error propagation and improve the output of various messages to ease driver development and debugging. YueHaibing's patch for the c_can driver removes an unused inline function. Next follows another patch by Colin Ian King, which removes the unneeded initialization of a variable in the mcba_usb driver. A patch by me annotates a fallthrough in the mscan driver. The ti_hecc driver is converted to use devm_platform_ioremap_resource_byname() in a patch by Dejin Zheng. Liu Shixin's patch converts the pcan_usb_pro driver to make use of le32_add_cpu() instead of open coding it. Wang Hai's patch for the peak_pciefd_main driver removes an unused makro. Vaibhav Gupta's patch converts the pch_can driver to generic power management. Stephane Grosjean improves the pcan_usb usb driver by first documenting the commands sent to the device and by adding support of rxerr/txerr counters. The next patch is by me and cleans up the Kconfig of the CAN SPI drivers. The next 6 patches all target the mcp251x driver, they are by Timo Schlüßler, Andy Shevchenko, Tim Harvey and me. They update the DT bindings documentation, sort the include files alphabetically, add GPIO support, make use of the readx_poll_timeout() helper, and add support for half duplex SPI-controllers. Wolfram Sang contributes a patch to update the contact email address in the mscan driver, while Zhang Changzhong updates the clock handling. The next patch is by and updates the rx-offload infrastructure to support callback less usage. The last 6 patches add support for the mcp25xxfd CAN SPI driver. First the dt-bindings are added by Oleksij Rempel, the regmap infrastructure and the main driver is contributed by me. Kurt Van Dijck adds listen-only support, Manivannan Sadhasivam adds himself as maintainer, and Thomas Kopp himself as a reviewer. ==================== Signed-off-by: David S. Miller commit ae4dd9a8c21790b3a5eea81f8a56b3743c6d74cc Merge: 3ba6baf64b9a9 7fba53ebb5b2d Author: David S. Miller Date: Mon Sep 21 14:55:09 2020 -0700 Merge tag 'mac80211-next-for-net-next-2020-09-21' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== This time we have: * some AP-side infrastructure for FILS discovery and unsolicited probe resonses * a major rework of the encapsulation/header conversion offload from Felix, to fit better with e.g. AP_VLAN interfaces * performance fix for VHT A-MPDU size, don't limit to HT * some initial patches for S1G (sub 1 GHz) support, more will come in this area * minor cleanups ==================== Signed-off-by: David S. Miller commit 3ba6baf64b9a967d731b9c93e3dcd64bd82db83d Author: Zheng Yongjun Date: Mon Sep 21 20:18:41 2020 +0800 net: natsemi: Remove set but not used variable Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/natsemi/ns83820.c: In function ns83820_get_link_ksettings: drivers/net/ethernet/natsemi/ns83820.c:1210:11: warning: variable ‘tanar’ set but not used [-Wunused-but-set-variable] `tanar` is never used, so remove it. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit c8c33b80f4e83d3e29623fb08d935fa152f6a3db Author: Jing Xiangfeng Date: Mon Sep 21 11:29:52 2020 +0800 net: unix: remove redundant assignment to variable 'err' After commit 37ab4fa7844a ("net: unix: allow bind to fail on mutex lock"), the assignment to err is redundant. So remove it. Signed-off-by: Jing Xiangfeng Signed-off-by: David S. Miller commit 66e22932eb795f12cc78c7592581673049d85a8c Author: Jisheng Zhang Date: Mon Sep 21 09:13:54 2020 +0800 net: phy: realtek: enable ALDPS to save power for RTL8211F Enable ALDPS(Advanced Link Down Power Saving) to save power when link down. Signed-off-by: Jisheng Zhang Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a7920efdd86d8a0d74402dbc80ead03b023294ba Author: Linus Walleij Date: Sun Sep 20 22:37:33 2020 +0200 net: dsa: rtl8366rb: Support all 4096 VLANs There is an off-by-one error in rtl8366rb_is_vlan_valid() making VLANs 0..4094 valid while it should be 1..4095. Fix it. Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Signed-off-by: Linus Walleij Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5b398f8fc186d48bb6a0966aa5c6ce12535f8e33 Merge: e777f8c8f9f6a a0bf06dc51dbb Author: Linus Walleij Date: Mon Sep 21 23:44:41 2020 +0200 Merge tag 'intel-pinctrl-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v5.10-1 * Add last part of cleanup Cherryview driver to align with other drivers * Due to above clean up Cherryview and Baytrail drivers to use common API The following is an automated git shortlog grouped by driver: baytrail: - Switch to use intel_pinctrl_get_soc_data() cherryview: - Preserve CHV_PADCTRL1_INVRXTX_TXDATA flag on GPIOs - Switch to use intel_pinctrl_get_soc_data() - Utilize temporary variable to hold device pointer - Switch to use struct intel_pinctrl - Move custom community members to separate data struct - Drop stale comment intel: - Update header block to reflect direct dependencies - Extract intel_pinctrl_get_soc_data() helper for wider use commit e777f8c8f9f6a3fe4f42f5f101620adc60b78616 Merge: 84f28fc38d2ff 540d9757cea82 Author: Linus Walleij Date: Mon Sep 21 23:43:30 2020 +0200 Merge tag 'renesas-pinctrl-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v5.10 - Add CAN and USB1 PWEN pin groups on R-Car H2 and RZ/G1, - Three more conversion of DT bindings to json-schema, - Group all Renesas pinctrl drivers and improve visual Kconfig structure, - Rename drivers/pinctrl/sh-pfc to drivers/pinctrl/renesas, - Minor fixes and improvements. commit 0ce0c3cd2239502187ccfca3b46ab0344799ec4e Author: Alex Dewar Date: Sat Sep 19 20:28:10 2020 +0100 net: dsa: mt7530: Add some return-value checks In mt7531_cpu_port_config(), if the variable port is neither 5 nor 6, then variable interface will be used uninitialised. Change the function to return -EINVAL in this case. As the return value of mt7531_cpu_port_config() is never checked (even though it returns an int) add a check in the correct place so that the error can be passed up the call stack. Now that we correctly handle errors thrown in this function, also check the return value of mt7531_mac_config() in case an error occurs here. Also add misisng checks to mt7530_setup() and mt7531_setup(), which are another level further up the call stack. Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch") Addresses-Coverity: 1496993 ("Uninitialized variables") Signed-off-by: Alex Dewar Signed-off-by: David S. Miller commit 36eccdb58fb55d2bea6a0e62932e4d7e5192d409 Merge: 0a2d411b56b7c 587823d39f85f Author: Linus Walleij Date: Mon Sep 21 23:39:50 2020 +0200 Merge tag 'gpio-updates-for-v5.10-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio updates for v5.10 - part 1 - automatically drive GPHY leds in gpio-stp-xway - refactor ->{get, set}_multiple() in gpio-aggregator - add support for a new model in rcar-gpio DT bindings - simplify several GPIO drivers with dev_err_probe() - disable Direct KBD interrupts in gpio-tc35894 - use DEFINE_SEQ_ATTRIBUTE() in GPIO chardev to shrink code - switch to using a simpler IDA API in gpiolib - make devprop_gpiochip_set_names() more generic by using device properties instead of using fwnode helpers commit 97ee967e6c56db6eb5ed5951276b9a6db04c6489 Merge: 534c0f4391a49 ec96690de82ce Author: Mark Brown Date: Mon Sep 21 22:37:14 2020 +0100 Merge branch 'asoc-5.9' into asoc-5.10 commit 1226fa0e541c89af22683676b9829fce849efe31 Author: Rob Clark Date: Sat Sep 5 13:04:21 2020 -0700 iommu/arm-smmu: Constify some helpers Sprinkle a few `const`s where helpers don't need write access. Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson Signed-off-by: Will Deacon commit 556db53a71e0e0bcfb30b4d8e4fdd7bb49951b99 Author: Jordan Crouse Date: Sat Sep 5 13:04:20 2020 -0700 iommu/arm-smmu: Prepare for the adreno-smmu implementation Do a bit of prep work to add the upcoming adreno-smmu implementation. Add an hook to allow the implementation to choose which context banks to allocate. Move some of the common structs to arm-smmu.h in anticipation of them being used by the implementations and update some of the existing hooks to pass more information that the implementation will need. These modifications will be used by the upcoming Adreno SMMU implementation to identify the GPU device and properly configure it for pagetable switching. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson Signed-off-by: Will Deacon commit 67f1a7a314a2c29832ae604f839653408492ee5d Author: Jordan Crouse Date: Sat Sep 5 13:04:19 2020 -0700 iommu/arm-smmu: Add support for split pagetables Enable TTBR1 for a context bank if IO_PGTABLE_QUIRK_ARM_TTBR1 is selected by the io-pgtable configuration. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson Signed-off-by: Will Deacon commit dd147a89f37d5ad32fe601eb11967326312da71a Author: Jordan Crouse Date: Sat Sep 5 13:04:18 2020 -0700 iommu/arm-smmu: Pass io-pgtable config to implementation specific function Construct the io-pgtable config before calling the implementation specific init_context function and pass it so the implementation specific function can get a chance to change it before the io-pgtable is created. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson Signed-off-by: Will Deacon commit ec96690de82cee2cb028c07b1e72cb4a446ad03a Author: Miquel Raynal Date: Fri Sep 11 19:31:40 2020 +0200 ASoC: tlv320aic32x4: Enable fast charge At power-up the analog circuits may take up to one full second before being charged with the default configuration. Using the analog blocks before they are ready generates a *very* crappy sound. Enable the fast charge feature, which will require a bit more power than normal charge but will definitely speed up the starting operation by shrinking this delay to up to 40 ms. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20200911173140.29984-4-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit 40b37136287ba6b34aa2f1f6123f3d6d205dc2f0 Author: Miquel Raynal Date: Fri Sep 11 19:31:39 2020 +0200 ASoC: tlv320aic32x4: Fix bdiv clock rate derivation Current code expects a single channel to be always used. Fix this situation by forwarding the number of channels used. Then fix the derivation of the bdiv clock rate. Fixes: 96c3bb00239d ("ASoC: tlv320aic32x4: Dynamically Determine Clocking") Suggested-by: Alexandre Belloni Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20200911173140.29984-3-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit 5b4458ebb4c8007dae7eaeb88cb52b2bb4879894 Author: Miquel Raynal Date: Fri Sep 11 19:31:38 2020 +0200 ASoC: tlv320aic32x4: Ensure a minimum delay before clock stabilization As indicated in the datasheet, a 10ms delay must be observed after programming the divisors. The lack of delay prevents the codec to work properly and the playback appears extremely slow and totally un-audible on a custom sama5 based board. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20200911173140.29984-2-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit a194c5f2d2b3a05428805146afcabe5140b5d378 Author: Zhengyuan Liu Date: Mon Sep 21 10:39:36 2020 +0800 arm64/mm: return cpu_all_mask when node is NUMA_NO_NODE The @node passed to cpumask_of_node() can be NUMA_NO_NODE, in that case it will trigger the following WARN_ON(node >= nr_node_ids) due to mismatched data types of @node and @nr_node_ids. Actually we should return cpu_all_mask just like most other architectures do if passed NUMA_NO_NODE. Also add a similar check to the inline cpumask_of_node() in numa.h. Signed-off-by: Zhengyuan Liu Reviewed-by: Gavin Shan Link: https://lore.kernel.org/r/20200921023936.21846-1-liuzhengyuan@tj.kylinos.cn Signed-off-by: Will Deacon commit 7d6e1329652ed971d1b6e0e7bea66fba5044e271 Author: Matthew Rosato Date: Tue Sep 15 15:05:18 2020 -0400 vfio iommu: Add dma available capability Commit 492855939bdb ("vfio/type1: Limit DMA mappings per container") added the ability to limit the number of memory backed DMA mappings. However on s390x, when lazy mapping is in use, we use a very large number of concurrent mappings. Let's provide the current allowable number of DMA mappings to userspace via the IOMMU info chain so that userspace can take appropriate mitigation. Signed-off-by: Matthew Rosato Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit 7d58e6555870d01d85b181ba2a16b217a1ea8bdd Author: Paolo Abeni Date: Fri Sep 18 18:00:46 2020 +0200 net-sysfs: add backlog len and CPU id to softnet data Currently the backlog status in not exposed to user-space. Since long backlogs (or simply not empty ones) can be a source of noticeable latency, -RT deployments need some way to inspect it. Additionally, there isn't a direct match between 'softnet_stat' lines and the related CPU - sd for offline CPUs are not dumped - so this patch also includes the CPU id into such entry. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 5eefe5e183173ae997acc2e831299fbcb301662e Merge: 9123e3a74ec7b a3ba99a24b36b Author: Stephen Boyd Date: Mon Sep 21 13:55:22 2020 -0700 Merge tag 'sunxi-clk-for-5.10-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner clk driver updates from Maxime Ripard: Our usual PR for the Allwinner SoCs, this time adding support for the Allwinner A100 SoC, and adding support for the sigma-delta modulation on the audio PLL for the R40. * tag 'sunxi-clk-for-5.10-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: sun8i: r40: Use sigma delta modulation for audio PLL clk: sunxi-ng: add support for the Allwinner A100 CCU dt-bindings: clk: sunxi-ccu: add compatible string for A100 CCU and R-CCU commit c4f084edd358e54a89c0c562b9c7c50994caffe0 Merge: b696db590f5d5 c452f37597bd9 Author: David S. Miller Date: Mon Sep 21 13:54:23 2020 -0700 Merge branch 'Update-license-and-polish-ENA-driver-code' Shay Agroskin says: ==================== Update license and polish ENA driver code This series adds the following: - Change driver's license into SPDX format - Capitalize all log prints in ENA driver - Fix issues raised by static checkers - Improve code readability by adding functions, fix spelling mistakes etc. - Update driver's documentation Changed from previous version: v1->v2: dropped patch that transforms pr_* log prints into dev_* prints ==================== Signed-off-by: David S. Miller commit c452f37597bd965d0e279e455d61cc5f5963f22e Author: Shay Agroskin Date: Mon Sep 21 11:37:42 2020 +0300 net: ena: update ena documentation The PCI vendor IDs in the documentation inaccurately describe the ENA devices. For example, the 1d0f:ec20 can have LLQ support. The driver loads in LLQ mode by default, and a message is printed to the kernel ring if the mode isn't supported by the device, so the device table isn't needed. Also, LLQ can support various entry sizes, so the documentation is updated to reflect that. Interrupt moderation description is also updated to be more accurate. Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit f49ed500d60e6c86c27f0c8eb90df50b6489ccba Author: Shay Agroskin Date: Mon Sep 21 11:37:41 2020 +0300 net: ena: Fix all static chekers' warnings After running Sparse checker on the driver using make C=1 M=drivers/net/ethernet/amazon/ena the only error that is thrown is: sparse: sparse: Using plain integer as NULL pointer about the line struct ena_calc_queue_size_ctx calc_queue_ctx = { 0 }; This patch fixes this warning, thus making our driver free (for now) of Sparse errors/warnings. To make a more complete work, this patch also fixes all static warnings that were found using an internal static checker. Signed-off-by: Ido Segev Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 0deca83ff1118f305fc7fb11e5a4b13e876201e8 Author: Shay Agroskin Date: Mon Sep 21 11:37:40 2020 +0300 net: ena: Change RSS related macros and variables names The formal name changes to "ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG". Indirection is the ability to reference "something" using "something else" instead of the value itself. Indirection table, as the name implies, is the ability to reference CPU/Queue value using hash-to-CPU table instead of CPU/Queue itself. This patch renames the variable keys_num, which describes the number of words in the RSS hash key, to key_parts which makes its purpose clearer in RSS context. Signed-off-by: Amit Bernstein Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit a8aea84981ad1b0074670a284b13d416d2881f32 Author: Shay Agroskin Date: Mon Sep 21 11:37:39 2020 +0300 net: ena: Remove redundant print of placement policy The placement policy is printed in the process of queue creation in ena_up(). No need to print it in ena_probe(). Signed-off-by: Arthur Kiyanovski Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit bf2746e849c951a7338abeab591cbef5c78555d7 Author: Shay Agroskin Date: Mon Sep 21 11:37:38 2020 +0300 net: ena: Capitalize all log strings and improve code readability Capitalize all log strings printed by the ena driver to make their format uniform across it. Also fix indentation, spelling mistakes and comments to improve code readability. This also includes adding comments to macros/enums whose purpose might be difficult to understand. Separate some code into functions to make it easier to understand the purpose of these lines. Signed-off-by: Amit Bernstein Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit f0525298f3cce9c572f3fe2782d8070ef40884fa Author: Shay Agroskin Date: Mon Sep 21 11:37:37 2020 +0300 net: ena: Change log message to netif/dev function Make log prints in ena_netdev use the same log functions as the rest of the driver. For the sake of consistency, all prints in ena_netdev file were converted into netif_* format except where netdev struct isn't yet defined. For these places, dev_* log functions are used (similar to the patch for ena_com files). This commit leaves some corner cases which would be changed in a future patch. Signed-off-by: Amit Bernstein Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 2246cbc2c298ff923896284f301ecc3b6566df8a Author: Shay Agroskin Date: Mon Sep 21 11:37:36 2020 +0300 net: ena: Change license into format to SPDX in all files All ena files should now use SPDX format in their license string. This doesn't change the license of the files, but rather states the same license in fewer words. Also update the license years in some of the files. Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 871ca96f1c7d5e98c468473aa822268c4bc75b4f Merge: 9123e3a74ec7b 7b5c5720a3689 Author: Stephen Boyd Date: Mon Sep 21 13:53:15 2020 -0700 Merge tag 'clk-meson-v5.10-1' of https://github.com/BayLibre/clk-meson into clk-amlogic Pull amlogic clk driver updates from Jerome Brunet: - g12: update audio clock inverter and fdiv2 flag - config: allow to disable unnecessary amlogic clock controllers * tag 'clk-meson-v5.10-1' of https://github.com/BayLibre/clk-meson: clk: meson: make shipped controller configurable clk: meson: g12a: mark fclk_div2 as critical clk: meson: axg-audio: fix g12a tdmout sclk inverter clk: meson: axg-audio: separate axg and g12a regmap tables clk: meson: add sclk-ws driver commit 7ef32e52368f62a4e041a4f0abefb4fb64e7fd4a Author: Yan Zhao Date: Wed Sep 16 10:28:33 2020 +0800 vfio: add a singleton check for vfio_group_pin_pages Page pinning is used both to translate and pin device mappings for DMA purpose, as well as to indicate to the IOMMU backend to limit the dirty page scope to those pages that have been pinned, in the case of an IOMMU backed device. To support this, the vfio_pin_pages() interface limits itself to only singleton groups such that the IOMMU backend can consider dirty page scope only at the group level. Implement the same requirement for the vfio_group_pin_pages() interface. Fixes: 95fc87b44104 ("vfio: Selective dirty page tracking if IOMMU backed device pins pages") Signed-off-by: Yan Zhao Signed-off-by: Alex Williamson commit 7aa908b48d6e8dae468022429166030d8b609ba5 Merge: 9123e3a74ec7b 15d683e61bdde Author: Stephen Boyd Date: Mon Sep 21 13:49:11 2020 -0700 Merge tag 'clk-renesas-for-v5.10-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 support for the new R-Car V3U (R8A779A0) SoC - Add support for the VSP for Resizing clock on RZ/G1H, - Fix VSP clock names to match corrected hardware documentation. - Minor fixes and improvements * tag 'clk-renesas-for-v5.10-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: rcar-gen3: Update description for RZ/G2 clk: renesas: cpg-mssr: Add support for R-Car V3U clk: renesas: cpg-mssr: Add register pointers into struct cpg_mssr_priv clk: renesas: cpg-mssr: Use enum clk_reg_layout instead of a boolean flag dt-bindings: clock: renesas,cpg-mssr: Document r8a779a0 dt-bindings: clock: Add r8a779a0 CPG Core Clock Definitions dt-bindings: power: Add r8a779a0 SYSC power domain definitions clk: renesas: rcar-gen2: Rename vsp1-(sy|rt) clocks to vsp(s|r) clk: renesas: r8a7742: Add clk entry for VSPR commit b696db590f5d57902a074a676eecd3b8cbbad271 Author: Qinglang Miao Date: Mon Sep 21 21:10:05 2020 +0800 chelsio: simplify the return expression of t3_ael2020_phy_prep() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: David S. Miller commit fe6bc89abe2c2fb93157627def365f33cc05a05e Author: Qinglang Miao Date: Mon Sep 21 21:10:06 2020 +0800 connector: simplify the return expression of cn_add_callback() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: David S. Miller commit d4b717dd2009f9003a5b4844a0e0ae0370d4c506 Author: Qinglang Miao Date: Mon Sep 21 21:10:26 2020 +0800 enetc: simplify the return expression of enetc_vf_set_mac_addr() Simplify the return expression. Signed-off-by: Qinglang Miao Reviewed-by: Claudiu Manoil Signed-off-by: David S. Miller commit ccb5942addd7f9713d643a8a6f0d7eabc51488b2 Author: Qinglang Miao Date: Mon Sep 21 21:10:34 2020 +0800 ice: simplify the return expression of ice_finalize_update() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: David S. Miller commit 2595b113d9d9674b98ee4c03e9a917e20b352776 Author: Qinglang Miao Date: Mon Sep 21 21:10:41 2020 +0800 mlxsw: spectrum_router: simplify the return expression of __mlxsw_sp_router_init() Simplify the return expression. Signed-off-by: Qinglang Miao Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit f621df96acb44164b1375445e1c7b372979a2b1a Author: Qinglang Miao Date: Mon Sep 21 21:10:43 2020 +0800 net: hns3: simplify the return expression of hclgevf_client_start() Signed-off-by: Qinglang Miao Signed-off-by: David S. Miller commit 05c3b6e79db2910cdf9b80755204e96be3a83dcc Author: Qinglang Miao Date: Mon Sep 21 21:10:46 2020 +0800 net: qlcnic: simplify the return expression of qlcnic_83xx_shutdown Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: David S. Miller commit 12856e7acde4702b7c3238c15fcba86ff6aa507f Author: Matthew Rosato Date: Thu Sep 10 10:59:55 2020 -0400 PCI/IOV: Mark VFs as not implementing PCI_COMMAND_MEMORY For VFs, the Memory Space Enable bit in the Command Register is hard-wired to 0. Add a new bit to signify devices where the Command Register Memory Space Enable bit does not control the device's response to MMIO accesses. Fixes: abafbc551fdd ("vfio-pci: Invalidate mmaps and block MMIO access on disabled memory") Signed-off-by: Matthew Rosato Acked-by: Bjorn Helgaas Signed-off-by: Alex Williamson commit 262623961478836b0f467f9bbb9a3dd2a0c8a9be Author: Youling Tang Date: Sat Sep 19 09:55:46 2020 +0800 MIPS: kexec: Add crashkernel=YM handling When the kernel crashkernel parameter is specified with just a size, we are supposed to allocate a region from RAM to store the crashkernel. However, MIPS merely reserves physical address zero with no checking that there is even RAM there. Fix this by lifting similar code from x86, importing it to MIPS with the MIPS specific parameters added. In the absence of any platform specific information, we allocate the crashkernel region from the first 512MB of physical memory (limited to CKSEG0 or KSEG0 address range). When X is not specified, crash_base defaults to 0 (crashkernel=YM@XM). E.g. without this patch: The environment as follows: [ 0.000000] MIPS: machine is loongson,loongson64c-4core-ls7a ... [ 0.000000] Kernel command line: root=/dev/sda2 crashkernel=96M ... The warning as follows: [ 0.000000] Invalid memory region reserved for crash kernel And the iomem as follows: 00200000-0effffff : System RAM 00200000-00b47f87 : Kernel code 00b47f88-00dfffff : Kernel data 00e60000-01f73c7f : Kernel bss 1a000000-1bffffff : pci@1a000000 ... With this patch: After increasing crash_base <= 0 handling. And the iomem as follows: 00200000-0effffff : System RAM 00200000-00b47f87 : Kernel code 00b47f88-00dfffff : Kernel data 00e60000-01f73c7f : Kernel bss 04000000-09ffffff : Crash kernel 1a000000-1bffffff : pci@1a000000 ... Signed-off-by: Youling Tang Signed-off-by: Thomas Bogendoerfer commit 5fa1f7680f2728d62561db6d4a9282c4d21f2324 Author: Tiezhu Yang Date: Thu Sep 17 20:39:01 2020 +0800 MIPS: Loongson64: Add UART node for LS7A PCH When I update the latest kernel on the Loongson platform used with LS7A bridge chip, the serial console has no output, this is because the machine uses LS7A UART0 instead of CPU UART0, add UART node for LS7A PCH to enhance the compatibility. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit c1f6b45e630a76d47506303defe111a48b651db1 Author: 周琰杰 (Zhou Yanjie) Date: Sat Sep 19 19:38:59 2020 +0800 MIPS: Ingenic: Add CPU nodes for Ingenic SoCs. Add 'cpus' node to the jz4725b.dtsi, jz4740.dtsi, jz4770.dtsi, jz4780.dtsi, x1000.dtsi, and x1830.dtsi files. Tested-by: H. Nikolaus Schaller Tested-by: Paul Boddie Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 307c9926393aed6c48600bea218b9565f2292fcb Author: Thomas Bogendoerfer Date: Sun Sep 20 23:13:42 2020 +0200 MIPS: malta: remove mach-malta/malta-dtshim.h header file To clean up mach-* directories move external declaration of malta_dt_shim() to mips-boards/malta.h and remove malta-dtshim.h. Signed-off-by: Thomas Bogendoerfer commit 0c0938ea1d7c0619a096fa40d5bb23586b7ffb51 Author: Thomas Bogendoerfer Date: Sun Sep 20 23:08:34 2020 +0200 MIPS: malta: remove unused header file Remove unused heasder file asm/mach-malta/malta-pm.h. Signed-off-by: Thomas Bogendoerfer commit b350041e6f23a71f63f1eee6d939c846838e7e25 Author: Thomas Bogendoerfer Date: Sun Sep 20 23:03:47 2020 +0200 MIPS: alchemy: remove unused ALCHEMY_GPIOINT_AU1000 Remove unused config option ALCHEMY_GPIOINT_AU1000. Signed-off-by: Thomas Bogendoerfer commit b123c46cf55853c0d56098c00b35943ae6f719d3 Author: Thomas Bogendoerfer Date: Sun Sep 20 23:03:46 2020 +0200 MIPS: alchemy: remove unused ALCHEMY_GPIOINT_AU1300 Remove unused config option ALCHEMY_GPIOINT_AU1300 and related code. Signed-off-by: Thomas Bogendoerfer commit 7895d662bab8827176d44326d0a7423221287ca9 Author: Thomas Bogendoerfer Date: Sun Sep 20 22:51:50 2020 +0200 MIPS: SGI-IP30: Move irq bits to better header files Move HEART specific parts of mach-ip30/irq.h to asm/sgi/heart.h and IP30 specific parts to sgi-ip30/ip30-common.h. Signed-off-by: Thomas Bogendoerfer commit bc1c969f1158485f64e360659f755d19136bb5b0 Author: Huacai Chen Date: Mon Sep 21 17:12:28 2020 +0800 MIPS: Loongson-3: Calculate ra properly when unwinding the stack Loongson-3 has 16-bytes load/store instructions: gslq and gssq. This patch calculate ra properly when unwinding the stack, if ra is saved by gssq and restored by gslq. Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 195615ecc8309082a524433cf552eda722b26c1c Author: Huacai Chen Date: Mon Sep 21 17:12:27 2020 +0800 MIPS: Loongson-3: Enable COP2 usage in kernel Loongson-3's COP2 is Multi-Media coprocessor, it is disabled in kernel mode by default. However, gslq/gssq (16-bytes load/store instructions) overrides the instruction format of lwc2/swc2. If we wan't to use gslq/ gssq for optimization in kernel, we should enable COP2 usage in kernel. Please pay attention that in this patch we only enable COP2 in kernel, which means it will lose ST0_CU2 when a process go to user space (try to use COP2 in user space will trigger an exception and then grab COP2, which is similar to FPU). And as a result, we need to modify the context switching code because the new scheduled process doesn't contain ST0_CU2 in its THERAD_STATUS probably. For zboot, we disable gslq/gssq be generated by toolchain. Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 4e43e5df5850ca8300180f422727e42a5065aaaa Author: Huacai Chen Date: Mon Sep 21 17:12:26 2020 +0800 MIPS: context switch: Use save/restore instead of set/clear for Status.CU2 Some processors (such as Loongson-3) need to enable CU2 in kernel mode, current set/clear method will lose Status.CU2 during context switching, so use save/restore method instead. Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 6fa573a3e307af923c3220beeba65e8f566e94c2 Author: Pujin Shi Date: Tue Sep 22 00:18:21 2020 +0800 MIPS: kernel: include probes-common.h header in branch.c arch/mips/kernel/branch.c:876:5: error: no previous prototype for '__insn_is_compact_branch' [-Werror=missing-prototypes] Signed-off-by: Pujin Shi Signed-off-by: Pujin Shi Signed-off-by: Thomas Bogendoerfer commit d976ae6ba04cdbe62a60fc6dc6f363da596d5622 Author: Jason Yan Date: Fri Sep 11 10:01:32 2020 +0800 MIPS: Make setup_elfcorehdr and setup_elfcorehdr_size static This addresses the following sparse warning: arch/mips/kernel/setup.c:446:33: warning: symbol 'setup_elfcorehdr_size' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Thomas Bogendoerfer commit 1c0f68252a6a8a793ff3352e3580664d18ec5955 Author: Zenghui Yu Date: Mon Sep 21 12:51:16 2020 +0800 vfio/pci: Don't regenerate vconfig for all BARs if !bardirty Now we regenerate vconfig for all the BARs via vfio_bar_fixup(), every time any offset of any of them are read. Though BARs aren't re-read regularly, the regeneration can be avoided if no BARs had been written since they were last read, in which case vdev->bardirty is false. Let's return immediately in vfio_bar_fixup() if bardirty is false. Suggested-by: Alex Williamson Signed-off-by: Zenghui Yu Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit eac7cc21c4e49ab7dfeef22e29abdee8432face9 Author: Zenghui Yu Date: Mon Sep 21 12:51:15 2020 +0800 vfio/pci: Remove redundant declaration of vfio_pci_driver It was added by commit 137e5531351d ("vfio/pci: Add sriov_configure support") but duplicates a forward declaration earlier in the file. Remove it. Signed-off-by: Zenghui Yu Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit c12fa88c6d16ed3865072d91154cff6fd1cd9cd4 Author: Zenghui Yu Date: Thu Sep 10 20:25:08 2020 +0800 vfio: Fix typo of the device_state A typo fix ("_RUNNNG" => "_RUNNING") in comment block of the uapi header. Signed-off-by: Zenghui Yu Reviewed-by: Cornelia Huck Reviewed-by: Kirti Wankhede Signed-off-by: Alex Williamson commit 501ef013390b774e8e61000a78d1d640d6c3411d Author: Shuming Fan Date: Mon Sep 21 17:43:08 2020 +0800 ASoC: rt711: wait for the delayed work to finish when the system suspends To avoid the IO error, we need to cancel the delayed work and wait for it to finish. Signed-off-by: Shuming Fan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200921094308.31921-1-shumingf@realtek.com Signed-off-by: Mark Brown commit cadab0aefcbadf488b16caf2770430e69f4d7839 Author: Dan Murphy Date: Fri Sep 18 14:05:46 2020 -0500 ASoC: tas2770: Fix error handling with update_bits snd_soc_update_bits returns a 1 when the bit was successfully updated, returns a 0 is no update was needed and a negative if the call failed. The code is currently failing the case of a successful update by just checking for a non-zero number. Modify these checks and return the error code only if there is a negative. Fixes: 1a476abc723e6 ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918190548.12598-7-dmurphy@ti.com Signed-off-by: Mark Brown commit 4b8ab8a7761fe2ba1c4e741703a848cb8f390f79 Author: Dan Murphy Date: Fri Sep 18 14:05:43 2020 -0500 ASoC: tas2770: Fix required DT properties in the code The devicetree binding indicates that the ti,asi-format, ti,imon-slot-no and ti,vmon-slot-no are not required but the driver requires them or it fails to probe. Honor the binding and allow these entries to be optional and set the corresponding values to the default values for each as defined in the data sheet. Fixes: 1a476abc723e6 ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918190548.12598-4-dmurphy@ti.com Signed-off-by: Mark Brown commit 4272caf34aa4699eca8e6e7f4a8e5ea2bde275c9 Author: Dan Murphy Date: Fri Sep 18 14:05:41 2020 -0500 ASoC: tas2770: Add missing bias level power states Add the BIAS_STANDBY and BIAS_PREPARE to the set_bias_level or else the driver will return -EINVAL which is not correct as they are valid states. Fixes: 1a476abc723e6 ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918190548.12598-2-dmurphy@ti.com Signed-off-by: Mark Brown commit b0bcbe615756d5923eec4e95996e4041627e5741 Author: Dan Murphy Date: Fri Sep 18 14:05:40 2020 -0500 ASoC: tas2770: Fix calling reset in probe tas2770_reset is called during i2c probe. The reset calls the snd_soc_component_write which depends on the tas2770->component being available. The component pointer is not set until codec_probe so move the reset to the codec_probe after the pointer is set. Fixes: 1a476abc723e6 ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918190548.12598-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 5f2df2a4583b0d7b85054f0c1820f11a01936d35 Author: Shuming Fan Date: Mon Sep 21 17:42:44 2020 +0800 ASoC: rt700: wait for the delayed work to finish when the system suspends To avoid the IO error, we need to cancel the delayed work and wait for it to finish. Signed-off-by: Shuming Fan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200921094244.31869-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 31f23a6a181c81543b10a1a9056b0e6c7ef1c747 Author: Muchun Song Date: Thu Sep 17 15:44:53 2020 +0800 bpf: Fix potential call bpf_link_free() in atomic context The in_atomic() macro cannot always detect atomic context, in particular, it cannot know about held spinlocks in non-preemptible kernels. Although, there is no user call bpf_link_put() with holding spinlock now, be on the safe side, so we can avoid this in the future. Signed-off-by: Muchun Song Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200917074453.20621-1-songmuchun@bytedance.com commit 596fd0162ac70c2253041e60394ecb5cccb15b07 Author: Krzysztof Kozlowski Date: Sun Sep 20 22:38:45 2020 +0200 dt-bindings: iio: vishay,vcnl4000: add interrupts property The dtschema should list all properties, including the common ones like interrupts. This fixes dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dt.yaml: prox@60: 'interrupt-parent', 'interrupts' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200920203845.17758-1-krzk@kernel.org Signed-off-by: Jonathan Cameron commit da83df66265b79c956f556b97554a0f23431c11f Author: Jonathan Cameron Date: Wed Jul 22 16:50:54 2020 +0100 iio:imu:inv_mpu6050: Use regmap_noinc_read for fifo reads. We should not be assuming that we are reading a sequence of registers as here we are doing a read of a lot of data from a single register address. Not marked for stable as by coincidence it being wrong doesn't make any difference. Suggested-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron Reviewed-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20200722155103.979802-19-jic23@kernel.org commit 6b0cc5dce0725ae8f1a2883514da731c55eeb35e Author: Jonathan Cameron Date: Wed Jul 22 16:50:53 2020 +0100 iio:imu:inv_mpu6050 Fix dma and ts alignment and data leak issues. This case is a bit different to the rest of the series. The driver was doing a regmap_bulk_read into a buffer that wasn't dma safe as it was on the stack with no guarantee of it being in a cacheline on it's own. Fixing that also dealt with the data leak and alignment issues that Lars-Peter pointed out. Also removed some unaligned handling as we are now aligned. Fixes tag is for the dma safe buffer issue. Potentially we would need to backport timestamp alignment futher but that is a totally different patch. Fixes: fd64df16f40e ("iio: imu: inv_mpu6050: Add SPI support for MPU6000") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Reviewed-by: Jean-Baptiste Maneyrol Cc: Link: https://lore.kernel.org/r/20200722155103.979802-18-jic23@kernel.org commit 293e809b2e8e608b65a949101aaf7c0bd1224247 Author: Jonathan Cameron Date: Wed Jul 22 16:51:01 2020 +0100 iio:adc:ti-adc12138 Fix alignment issue with timestamp One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. We move to a suitable structure in the iio_priv() data with alignment explicitly requested. This data is allocated with kzalloc so no data can leak apart from previous readings. Note that previously no leak at all could occur, but previous readings should never be a problem. In this case the timestamp location depends on what other channels are enabled. As such we can't use a structure without misleading by suggesting only one possible timestamp location. Fixes: 50a6edb1b6e0 ("iio: adc: add ADC12130/ADC12132/ADC12138 ADC driver") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Akinobu Mita Cc: Link: https://lore.kernel.org/r/20200722155103.979802-26-jic23@kernel.org commit 39e91f3be4cba51c1560bcda3a343ed1f64dc916 Author: Jonathan Cameron Date: Wed Jul 22 16:51:00 2020 +0100 iio:adc:ti-adc0832 Fix alignment issue with timestamp One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. We fix this issues by moving to a suitable structure in the iio_priv() data with alignment explicitly requested. This data is allocated with kzalloc so no data can leak apart from previous readings. Note that previously no data could leak 'including' previous readings but I don't think it is an issue to potentially leak them like this now does. In this case the postioning of the timestamp is depends on what other channels are enabled. As such we cannot use a structure to make the alignment explicit as it would be missleading by suggesting only one possible location for the timestamp. Fixes: 815bbc87462a ("iio: ti-adc0832: add triggered buffer support") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Akinobu Mita Cc: Link: https://lore.kernel.org/r/20200722155103.979802-25-jic23@kernel.org commit c14edb4d0bdc53f969ea84c7f384472c28b1a9f8 Author: Jonathan Cameron Date: Wed Jul 22 16:50:52 2020 +0100 iio:imu:st_lsm6dsx Fix alignment and data leak issues One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to an array of suitable structures in the iio_priv() data. This data is allocated with kzalloc so no data can leak apart from previous readings. For the tagged path the data is aligned by using __aligned(8) for the buffer on the stack. There has been a lot of churn in this driver, so likely backports may be needed for stable. Fixes: 290a6ce11d93 ("iio: imu: add support to lsm6dsx driver") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Lorenzo Bianconi Cc: Link: https://lore.kernel.org/r/20200722155103.979802-17-jic23@kernel.org commit 0456ecf34d466261970e0ff92b2b9c78a4908637 Author: Jonathan Cameron Date: Wed Jul 22 16:50:44 2020 +0100 iio:light:si1145: Fix timestamp alignment and prevent data leak. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses a 24 byte array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable array in the iio_priv() data with alignment explicitly requested. This data is allocated with kzalloc so no data can leak appart from previous readings. Depending on the enabled channels, the location of the timestamp can be at various aligned offsets through the buffer. As such we any use of a structure to enforce this alignment would incorrectly suggest a single location for the timestamp. Comments adjusted to express this clearly in the code. Fixes: ac45e57f1590 ("iio: light: Add driver for Silabs si1132, si1141/2/3 and si1145/6/7 ambient light, uv index and proximity sensors") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Peter Meerwald-Stadler Cc: Link: https://lore.kernel.org/r/20200722155103.979802-9-jic23@kernel.org commit 10ab7cfd5522f0041028556dac864a003e158556 Author: Jonathan Cameron Date: Wed Jul 22 16:50:41 2020 +0100 iio:gyro:itg3200: Fix timestamp alignment and prevent data leak. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses a 16 byte array of smaller elements on the stack. This is fixed by using an explicit c structure. As there are no holes in the structure, there is no possiblity of data leakage in this case. The explicit alignment of ts is not strictly necessary but potentially makes the code slightly less fragile. It also removes the possibility of this being cut and paste into another driver where the alignment isn't already true. Fixes: 36e0371e7764 ("iio:itg3200: Use iio_push_to_buffers_with_timestamp()") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Link: https://lore.kernel.org/r/20200722155103.979802-6-jic23@kernel.org commit f71e41e23e129640f620b65fc362a6da02580310 Author: Tom Rix Date: Sun Aug 9 10:55:51 2020 -0700 iio:imu:st_lsm6dsx: check st_lsm6dsx_shub_read_output return Potential error return is not checked. This can lead to use of undefined data. Detected by clang static analysis. st_lsm6dsx_shub.c:540:8: warning: Assigned value is garbage or undefined *val = (s16)le16_to_cpu(*((__le16 *)data)); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: c91c1c844ebd ("iio: imu: st_lsm6dsx: add i2c embedded controller support") Signed-off-by: Tom Rix Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200809175551.6794-1-trix@redhat.com Signed-off-by: Jonathan Cameron commit d390ff735d0a61e4703bf124866ef6d4be7fdc64 Author: Sergiu Cuciurean Date: Wed Sep 16 12:31:23 2020 +0300 iio: adc: exynos_adc: Replace indio_dev->mlock with own device lock As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock, to protect potential concurrent access to the completion callback during a conversion. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200916093123.78954-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 7f6fc073fd8571a0a37df332cf40b805ff6f4756 Author: Jonathan Cameron Date: Wed Sep 9 18:59:43 2020 +0100 dt-bindings:iio:adc:holt,hi8435 yaml conversion Very simple binding. I've changed the example to use the node name threshold-detector@0 as sensor@0 seemed too generic. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Vladimir Barinov Link: https://lore.kernel.org/r/20200909175946.395313-18-jic23@kernel.org commit dd29b1297377bfa025b6fd293afbd9f825bbceb1 Author: Jonathan Cameron Date: Wed Sep 9 18:59:41 2020 +0100 dt-bindings:iio:adc:adi,ad7768-1 yaml conversion Fairly straight conversion. The one oddity in the original binding is that spi-cpha and spi-cpol were not marked as required, but were in the example. Looking at the datasheet, there isn't any documented flexibility in the possible SPI modes, so I have moved these to requires. For spi-max-frequency I have gone the other way. I absolutely agree that it is good to specify this in the dt-binding, but it's not strictly required. As Stefan's email is bouncing I have gone with Michael as maintainer of this one as it falls under the ADI catch all entry in MAINTAINERS. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Michael Hennerich Link: https://lore.kernel.org/r/20200909175946.395313-16-jic23@kernel.org commit e294abc7bef0eaad0719c106670e0fa1d760fcf6 Author: Jonathan Cameron Date: Wed Sep 9 18:59:40 2020 +0100 dt-bindings:iio:adc:adi,ad7949 yaml conversion Simple SPI driver. I've added the #io-channel-cells as an optional parameter to allow use of this device as a provider of ADC capabilities to other devices. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Charles-Antoine Couret Link: https://lore.kernel.org/r/20200909175946.395313-15-jic23@kernel.org commit e13b686b18e37231f7f13fda8e1ef09076b495a8 Author: Jonathan Cameron Date: Wed Sep 9 18:59:38 2020 +0100 dt-bindings:iio:adc:dlg,da9150-gpadc yaml conversion This is a small part of an MFD so perhaps ultimately it makes more sense to document it with that MFD binding rather than separately. In the meantime it's a straightforward conversion from txt to yaml. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Adam Thomson Link: https://lore.kernel.org/r/20200909175946.395313-13-jic23@kernel.org commit 1ca9d1b1342db5176db6bf5a93cdf8d759d257da Author: Jonathan Cameron Date: Wed Sep 9 18:59:37 2020 +0100 dt-bindings:iio:adc:motorola,cpcap-adc yaml conversion Conversion from txt to yaml. Slightly expanded example to give a bit more context. Description lifted from the original driver commit. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Tony Lindgren Link: https://lore.kernel.org/r/20200909175946.395313-12-jic23@kernel.org commit 45f90fe986ad8bf3404a402cea1d1b2ec1b2d788 Author: Jonathan Cameron Date: Wed Sep 9 18:59:36 2020 +0100 dt-bindings:iio:adc:nxp,lpc3220-adc yaml conversion Renamed to remove the wild cards. These go wrong far too often so in general preferred to use the name of a specific part. As this binding only provides one compatible, I went with that. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Gregory Clement Link: https://lore.kernel.org/r/20200909175946.395313-11-jic23@kernel.org commit 75440ae305b69db0a666a131d4d759fd9954ccf5 Author: Jonathan Cameron Date: Wed Sep 9 18:59:35 2020 +0100 dt-bindings:iio:adc:nxp,lpc1850-adc yaml conversion Most of the description in the original doc is effectively boilerplate and does not bring much value so I have not carried it over into the yaml. Added #io-channel-cells to simplify use of channels on this ADC by consumer drivers. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Joachim Eastwood Link: https://lore.kernel.org/r/20200909175946.395313-10-jic23@kernel.org commit 49703a3685eee70e2145f93b3c14bc2723dc9d84 Author: Jonathan Cameron Date: Wed Sep 9 18:59:46 2020 +0100 dt-bindings:iio:adc:fsl,imx25-gcq yaml conversion This binding has a few corners that would have been done different today but hopefully the yaml schema captures the constraints correctly. The child node names are not constrained hence the fairly open regexp. I've also documented the defaults for the two references that the driver seems to use and copied the value descriptions from the header because I think they should be in the dt-binding itself. This is part of a general effort to convert all the IIO bindings over to yaml Unfortunately I don't have a current address for Markus, so have put myself as the maintainer for this binding until someone else steps up! Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Shawn Guo Cc: Sascha Hauer Link: https://lore.kernel.org/r/20200909175946.395313-21-jic23@kernel.org commit 964adff5fa49eecbfe313961f290d3a810e047e3 Author: Jonathan Cameron Date: Wed Sep 9 18:59:45 2020 +0100 dt-bindings:iio:adc:fsl,imx7d-adc yaml conversion A nice simple binding. Only real different from txt is that I dropped some descriptions where the naming of the parameter was self explanatory Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Haibo Chen Cc: Shawn Guo Cc: Sascha Hauer Link: https://lore.kernel.org/r/20200909175946.395313-20-jic23@kernel.org commit 8655d6977b0d559d41ab6b6f1c652665b8debdad Author: Jonathan Cameron Date: Wed Sep 9 18:59:42 2020 +0100 dt-bindings:iio:adc:ti,ads1015 yaml conversion This binding was moved over from hwmon some time ago so is a bit unusual in terms of IIO bindings. However, conversion was fairly straight forwards. I've listed both Dirk (who think wrote original binding) and Daniel who added the IIO driver for this device. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Daniel Baluta Link: https://lore.kernel.org/r/20200909175946.395313-17-jic23@kernel.org commit 1f3b18732e36fcf5ac91b0a65ada2b6c3be9d2a6 Author: Jonathan Cameron Date: Wed Sep 9 18:59:39 2020 +0100 dt-bindings:iio:adc:cosmic,10001-adc yaml conversion I don't really know much about this one, hence the binding is a simple conversion of what was in the txt file. Note that I have taken on maintenance of this binding as I don't have a recent address for Phani Movva. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200909175946.395313-14-jic23@kernel.org commit 6e7625a9f0c9fdbbc080f2dc37cccd1ad51e8b7d Author: Jonathan Cameron Date: Wed Sep 9 18:59:34 2020 +0100 dt-bindings:iio:adc:nuvoton,npcm750-adc yaml conversion Renamed the file to reflect the only compatible. Added #io-channel-cells to make it easier to support consumers of the ADC channels this device provides. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Tomer Maimon Link: https://lore.kernel.org/r/20200909175946.395313-9-jic23@kernel.org commit 6d15f62f5090a1a616e11072e30436b0faaa7de4 Author: Jonathan Cameron Date: Wed Sep 9 18:59:33 2020 +0100 dt-bindings:iio:adc:nuvoton,nau7802 yaml conversion A simple conversion from txt file to yaml. I added the #io-channel-cells property as optional to allow the channels of this ADCs to be used to provide services to other drivers, for example if an analog accelerometer is connected. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Alexandre Belloni Cc: Maxime Ripard Link: https://lore.kernel.org/r/20200909175946.395313-8-jic23@kernel.org commit 97218c6d1eb9a045ae5b05e5f9d7f7d0d99d03da Author: Jonathan Cameron Date: Wed Sep 9 18:59:32 2020 +0100 dt-bindings:iio:adc:sprd,sc2720-adc yaml conversion. I changed the name to reflect a specific part in line with normal naming conventions. If there is a particularly strong reason to keep the wild cards let me know. Otherwise this was a fairly simple conversion as part of converting all the IIO bindings to yaml. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Link: https://lore.kernel.org/r/20200909175946.395313-7-jic23@kernel.org commit 9c146a575b48445797dae7d0c10615ca9424eb60 Author: Jonathan Cameron Date: Wed Sep 9 18:59:31 2020 +0100 dt-bindings:iio:adc:marvell,berlin2-adc yaml conversion Part of a general move of IIO bindings over to yaml. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Antoine Tenart Link: https://lore.kernel.org/r/20200909175946.395313-6-jic23@kernel.org commit f384720e39887371fd6633faf3e3a69e6b299316 Author: Jonathan Cameron Date: Wed Sep 9 18:59:30 2020 +0100 dt-bindings:iio:adc: aspeed,ast2400 yaml conversion Simple txt to yaml conversion. Part of a general move to convert all the IIO bindings over to yaml. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Joel Stanley Cc: Rick Altherr Cc: Joel Stanley Cc: Andrew Jeffery Link: https://lore.kernel.org/r/20200909175946.395313-5-jic23@kernel.org commit 994235f3234f748cda901338ff78c8aaafee6934 Author: Jonathan Cameron Date: Wed Sep 9 18:59:29 2020 +0100 dt-bindings:iio:adc:st,stmpe-adc yaml conversion Conversion from freeform text to yaml. One oddity in this binding is that, for historical reasons it requires the node name to be stmpe_adc. I've put that in the decription field but I'm not sure if there is a better way to specify this? Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Stefan Agner Link: https://lore.kernel.org/r/20200909175946.395313-4-jic23@kernel.org commit 128aba07d3a68a5af64f93d168e96a3858a1a2c6 Author: Jonathan Cameron Date: Wed Sep 9 18:59:28 2020 +0100 dt-bindings:iio:adc:ti,twl4030-madc yaml conversion Conversion from txt to yaml as part of a general move of IIO bindings to the new format. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Sebastian Reichel Link: https://lore.kernel.org/r/20200909175946.395313-3-jic23@kernel.org commit 22daffe295dbb0ae6866c6ef4bb2a34625d91250 Author: Jonathan Cameron Date: Wed Sep 9 18:59:27 2020 +0100 dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml. A simple conversion of this freescale ADC binding from txt to yaml. For maintainer I went with Fugang Duan as the original author of the binding. Would be great to have confirmation of this. Signed-off-by: Jonathan Cameron Reviewed-by: Fugang Duan Reviewed-by: Rob Herring Cc: Shawn Guo Cc: Sascha Hauer Link: https://lore.kernel.org/r/20200909175946.395313-2-jic23@kernel.org commit 44a76de8ca4d13b157c49a16d0ef47ccff91a2e3 Author: Mario Tesi Date: Thu Sep 17 18:47:16 2020 +0200 iio: imu: st_lsm6dsx: Scaling factor type set to IIO_VAL_INT_PLUS_NANO Scaling factor values for Acc lead to an unacceptable rounding of the full scale (FS) calculated by some SensorHAL on Android devices. For examples setting FS to 4g the in_accel_x_scale, in_accel_y_scale and in_accel_z_scale are 0.001196 on 6 decimal digits and the FS is 0.001196 × ((2^15) − 1) ~= 39.1893 m/s^2. Android CTS R10 SensorParameterRangeTest test expects a value greater than 39.20 m/s^2 so this test fails (ACCELEROMETER_MAX_RANGE = 4 * 9.80). Using 9 decimal digits the new scale factor is 0.001196411 and the FS now is 0.001196411 × ((2^15)−1) ~= 39.2028 m/s^2. This patch extends to IIO_VAL_INT_PLUS_NANO type the scaling factor to all IMU devices where SensorParameterRangeTest CTS test fails. Signed-off-by: Mario Tesi Acked-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/1600361236-2285-1-git-send-email-martepisa@gmail.com commit e8173161746d1d8a8b9dfd8968cf695efaa90d09 Author: Nuno Sá Date: Thu Sep 17 17:52:23 2020 +0200 iio: adis. Drop adis_burst struct As there are no users anymore of this structure, it can be safely removed. Signed-off-by: Nuno Sá Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200917155223.218500-5-nuno.sa@analog.com commit 0dfaa465fc734fec8554f9a700594ea28242dc75 Author: Nuno Sá Date: Thu Sep 17 17:52:22 2020 +0200 iio: adis16475: Drop adis_burst usage Burst mode variables are now part of the `adis_data` struct. The driver also has now to explicitly define the length of the burst buffer. Signed-off-by: Nuno Sá Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200917155223.218500-4-nuno.sa@analog.com commit f81d053bb4614fd2b71d774521f9016b6e8548e7 Author: Nuno Sá Date: Thu Sep 17 17:52:21 2020 +0200 iio: adis16400: Drop adis_burst usage Burst mode variables are now part of the `adis_data` struct. The driver also has now to explicitly define the length of the burst buffer. Signed-off-by: Nuno Sá Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200917155223.218500-3-nuno.sa@analog.com commit 36e322ec5dd24f1d0840061ffe406458669bccf1 Author: Nuno Sá Date: Thu Sep 17 17:52:20 2020 +0200 iio: adis: Move burst mode into adis_data Add burst mode variables in the per device specific data structure. As some drivers support multiple devices with different burst sizes it makes sense this data to be in `adis_data`. While moving the variables, there are two main differences: 1. The `en`variable is dropped. If a device supports burst mode, it will just use it as it will has better performance for almost all real use cases. 2. Replace `extra_len` by `burst_len`. Users should now explicitly define the length of the burst buffer as it is typically constant. This also allows to remove the following line from the library: ``` /* All but the timestamp channel */ burst_length = (indio_dev->num_channels - 1) * sizeof(u16); ``` The library should not assume that a timestamp channel is defined. Moreover, most parts also include some diagnostic data, crc, etc.. in the burst buffer that needed to be included in an `extra_len` variable which is not that nice. On top of this, some devices already start to have some 32bit size channels ... This patch is also a move to completely drop the `struct adis_burst` from the library. Signed-off-by: Nuno Sá Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200917155223.218500-2-nuno.sa@analog.com commit 9e7c7d92747f653c528d8af9e4244ac7a9cb048d Author: Jonathan Cameron Date: Sun Sep 13 13:12:27 2020 +0100 iio:accel:bma180: Fix use of true when should be iio_shared_by enum Given a value of 1 corresponds to IIO_SHARE_BY_TYPE I have replaced it with that. Should cause no functional change. Fixes: fdadbce0da42 ("iio: add Bosch BMA180 acceleration sensor driver") Signed-off-by: Jonathan Cameron Reviewed-by: Matt Ranostay Reviewed-by: Lars-Peter Clausen Reviewed-by: Andy Shevchenko Cc: Oleksandr Kravchenko Cc: Peter Meerwald Cc: Jonathan Bakker Link: https://lore.kernel.org/r/20200913121227.764626-1-jic23@kernel.org commit 9e0f085c2b33ebe13bcec53cbacce505fe78fde7 Author: Mark Brown Date: Mon Sep 21 13:23:41 2020 +0100 arm64: Move console stack display code to stacktrace.c Currently the code for displaying a stack trace on the console is located in traps.c rather than stacktrace.c, using the unwinding code that is in stacktrace.c. This can be confusing and make the code hard to find since such output is often referred to as a stack trace which might mislead the unwary. Due to this and since traps.c doesn't interact with this code except for via the public interfaces move the code to stacktrace.c to make it easier to find. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200921122341.11280-1-broonie@kernel.org Signed-off-by: Will Deacon commit e8a26c5b767b5ffc541f1c80336f2faa802441f4 Author: Jonathan Cameron Date: Sun Sep 13 12:25:46 2020 +0100 iio:magn:hmc5843: Fix passing true where iio_shared_by enum required. So it's obvious that the code is wrong in passing true, but I'm assuming that will actually evaluate to 1 and hence IIO_SHARED_BY_TYPE. The documentation however has this attribute as IIO_SHARED_BY_ALL. My current assumption is the documentation is wrong. If anyone knows otherwise please shout out! Fixes: 7247645f6865 ("iio: hmc5843: Move hmc5843 out of staging") Signed-off-by: Jonathan Cameron Reviewed-by: Matt Ranostay Reviewed-by: Lars-Peter Clausen Reviewed-by: Andy Shevchenko Tested-by: H. Nikolaus Schaller Link: https://lore.kernel.org/r/20200913112546.715624-1-jic23@kernel.org commit cd7798cbd28044a3026619e36993160ba8fa118d Author: Jonathan Cameron Date: Sun Sep 13 14:21:14 2020 +0100 iio: Add __printf() attributes to various allocation functions A partial set of these was added to IIO a long time back. This fills in some gaps in coverage highlighted by building with W=1 Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200913132115.800131-3-jic23@kernel.org commit c9561fd21a06f854d3df6db7dd83b38e91ed6e93 Author: Jonathan Cameron Date: Sun Sep 13 14:21:15 2020 +0100 iio:core: Tidy up kernel-doc. One comment isn't kernel-doc at all, but starts with /** and another is simply missing a parameter that was introduced recently. Signed-off-by: Jonathan Cameron Acked-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200913132115.800131-4-jic23@kernel.org commit c8bb10c50d60cf4bd083eb7f7956999942694c90 Author: Alexandru Ardelean Date: Mon Jul 6 14:02:59 2020 +0300 iio: dac: ad5592r: localize locks only where needed in ad5592r_read_raw() Since there was a recently discovered issue with these locks, it probably makes sense to cleanup the code a bit, to prevent it from being used as an example/reference. This change moves the lock only where it is explicitly needed to protect resources from potential concurrent accesses. It also reworks the switch statements to do direct returns vs caching the return value on a variable. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200706110259.23947-3-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit b004fe33034cc64f72c20923be71cf1e6c9a624c Author: Alexandru Ardelean Date: Mon Jul 6 14:02:58 2020 +0300 iio: dac: ad5592r: un-indent code-block for scale read The next rework may require an unindentation of a code block in ad5592r_read_raw(), which would make review a bit more difficult. This change unindents the code block for reading the scale of the non-temperature channels. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200706110259.23947-2-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 5fe68a4d85bfd7d0ed1a4bcfb12120e2b7dd26f5 Author: Jonathan Cameron Date: Wed Jul 22 15:25:15 2020 +0100 iio:dac:ad5592r: Fix use of true for IIO_SHARED_BY_TYPE struct iio_chan_spec_ext_info shared element is of type enum iio_shared_by, not boolean. It's like the enum value will for IIO_SHARED_BY_TYPE == 1 == true, hence no actual problem has been observed. CC [M] drivers/iio/dac/ad5592r-base.o 491 | .shared = true, | Fixes: 56ca9db862bf ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs") Signed-off-by: Jonathan Cameron Acked-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200722142515.897378-1-jic23@kernel.org commit 376cdf66f62444a1b4ebb393bab9fc44966f9b49 Author: Jean-Philippe Brucker Date: Fri Sep 18 16:18:57 2020 +0200 iommu/arm-smmu-v3: Fix endianness annotations When building with C=1, sparse reports some issues regarding endianness annotations: arm-smmu-v3.c:221:26: warning: cast to restricted __le64 arm-smmu-v3.c:221:24: warning: incorrect type in assignment (different base types) arm-smmu-v3.c:221:24: expected restricted __le64 [usertype] arm-smmu-v3.c:221:24: got unsigned long long [usertype] arm-smmu-v3.c:229:20: warning: incorrect type in argument 1 (different base types) arm-smmu-v3.c:229:20: expected restricted __le64 [usertype] *[assigned] dst arm-smmu-v3.c:229:20: got unsigned long long [usertype] *ent arm-smmu-v3.c:229:25: warning: incorrect type in argument 2 (different base types) arm-smmu-v3.c:229:25: expected unsigned long long [usertype] *[assigned] src arm-smmu-v3.c:229:25: got restricted __le64 [usertype] * arm-smmu-v3.c:396:20: warning: incorrect type in argument 1 (different base types) arm-smmu-v3.c:396:20: expected restricted __le64 [usertype] *[assigned] dst arm-smmu-v3.c:396:20: got unsigned long long * arm-smmu-v3.c:396:25: warning: incorrect type in argument 2 (different base types) arm-smmu-v3.c:396:25: expected unsigned long long [usertype] *[assigned] src arm-smmu-v3.c:396:25: got restricted __le64 [usertype] * arm-smmu-v3.c:1349:32: warning: invalid assignment: |= arm-smmu-v3.c:1349:32: left side has type restricted __le64 arm-smmu-v3.c:1349:32: right side has type unsigned long arm-smmu-v3.c:1396:53: warning: incorrect type in argument 3 (different base types) arm-smmu-v3.c:1396:53: expected restricted __le64 [usertype] *dst arm-smmu-v3.c:1396:53: got unsigned long long [usertype] *strtab arm-smmu-v3.c:1424:39: warning: incorrect type in argument 1 (different base types) arm-smmu-v3.c:1424:39: expected unsigned long long [usertype] *[assigned] strtab arm-smmu-v3.c:1424:39: got restricted __le64 [usertype] *l2ptr While harmless, they are incorrect and could hide actual errors during development. Fix them. Signed-off-by: Jean-Philippe Brucker Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20200918141856.629722-1-jean-philippe@linaro.org Signed-off-by: Will Deacon commit b76f0ea013125358d1b4ca147a6f9b6883dd2493 Author: Denis Efremov Date: Mon Sep 21 18:28:50 2020 +0300 coccinelle: misc: add excluded_middle.cocci script Check for !A || A && B condition. It's equivalent to !A || B. Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit ed33833ea822212a961e920b7b3c33dd299837cd Author: Lee Jones Date: Thu Jul 16 14:59:03 2020 +0100 iio: chemical: sgp30: Add description for sgp_read_cmd()'s 'duration_us' Fixes the following W=1 kernel build warning(s): drivers/iio/chemical/sgp30.c:236: warning: Function parameter or member 'duration_us' not described in 'sgp_read_cmd' Signed-off-by: Lee Jones Cc: Andreas Brauchli Cc: Pascal Sachs Link: https://lore.kernel.org/r/20200716135928.1456727-6-lee.jones@linaro.org Signed-off-by: Jonathan Cameron commit faeda9190758fbd127e60ec147f7b6cae60f8578 Author: Lee Jones Date: Thu Jul 16 14:59:10 2020 +0100 iio: gyro: adis16080: Fix formatting issue Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/gyro/adis16080.c:49: warning: Function parameter or member 'lock' not described in 'adis16080_state' Signed-off-by: Lee Jones Cc: Michael Hennerich Cc: Barry Song <21cnbao@gmail.com> Link: https://lore.kernel.org/r/20200716135928.1456727-13-lee.jones@linaro.org Signed-off-by: Jonathan Cameron commit ee21014b102e01a62851e02d64f2c1b9d70309bc Author: Lee Jones Date: Thu Jul 16 14:59:13 2020 +0100 iio: dummy: iio_dummy_evgen: Demote file header and supply description for 'irq_sim_domain' File headers are not good candidates for kerneldoc. Fixes the following W=1 kernel build warning(s): drivers/iio/dummy/iio_dummy_evgen.c:30: warning: Cannot understand * @regs: irq regs we are faking on line 30 - I thought it was a doc line drivers/iio/dummy/iio_dummy_evgen.c:42: warning: Function parameter or member 'irq_sim_domain' not described in 'iio_dummy_eventgen' Signed-off-by: Lee Jones Cc: Marc Zyngier Cc: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200716135928.1456727-16-lee.jones@linaro.org Signed-off-by: Jonathan Cameron commit c5e6c649b4c4ed52d4cefeba8bf303d37db96893 Author: Lee Jones Date: Thu Jul 16 14:59:15 2020 +0100 iio: adc: ad7949: Fix misspelling issue Fixes the following W=1 kernel build warning(s): drivers/iio/adc/ad7949.c:58: warning: Function parameter or member 'indio_dev' not described in 'ad7949_adc_chip' Signed-off-by: Lee Jones Cc: Michael Hennerich Cc: Charles-Antoine Couret Link: https://lore.kernel.org/r/20200716135928.1456727-18-lee.jones@linaro.org Signed-off-by: Jonathan Cameron commit 1536a8ee142f8e89f156117dc853db723bd668e8 Author: Lee Jones Date: Thu Jul 16 14:59:17 2020 +0100 iio: dac: ad5064: Fix a few kerneldoc misdemeanours Misspelling, missing description. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5064.c:71: warning: bad line: internal vref. drivers/iio/dac/ad5064.c:83: warning: Function parameter or member 'channels' not described in 'ad5064_chip_info' drivers/iio/dac/ad5064.c:125: warning: Function parameter or member 'lock' not described in 'ad5064_state' Signed-off-by: Lee Jones Cc: Michael Hennerich Cc: Liam Girdwood Cc: Mark Brown Link: https://lore.kernel.org/r/20200716135928.1456727-20-lee.jones@linaro.org Signed-off-by: Jonathan Cameron commit 6026292469e7f5d92d381e535c724be4967793d0 Author: Lee Jones Date: Thu Jul 16 14:59:28 2020 +0100 iio: dac: ad7303: Complete 'struct ad7303_state' doc Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'vdd_reg' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'vref_reg' not described in 'ad7303_state' drivers/iio/dac/ad7303.c:49: warning: Function parameter or member 'lock' not described in 'ad7303_state' Signed-off-by: Lee Jones Cc: Michael Hennerich Cc: Liam Girdwood Cc: Mark Brown Link: https://lore.kernel.org/r/20200716135928.1456727-31-lee.jones@linaro.org Signed-off-by: Jonathan Cameron commit 8a0f412fca6e55765ad04c67037eb3907f0ad076 Author: Sergiu Cuciurean Date: Wed Sep 16 12:29:28 2020 +0300 iio: adc: fsl-imx25-gcq: Replace indio_dev->mlock with own device lock As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock, to protect against any other accesses during the reading of sample. Reading a sample requires multiple consecutive regmap operations and a completion callback, so this requires that no other read occurs until it completes. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200916092928.78026-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 3cef2e31b54b5975f45dfd7f88204bb78b03d535 Author: Ivan Drobyshevskyi Date: Wed Sep 16 10:44:58 2020 +0300 iio: proximity: vl53l0x: Add IRQ support VL53L0X can be configured to use interrupt pin (GPIO1) to notify host about readiness of new measurement. If interrupt pin is not specified, driver still uses polling. Signed-off-by: Ivan Drobyshevskyi Link: https://lore.kernel.org/r/20200916074458.873359-2-drobyshevskyi@gmail.com Signed-off-by: Jonathan Cameron commit 58601d102dc336c89cba5b3d8e3f89136edf7414 Author: Ivan Drobyshevskyi Date: Wed Sep 16 10:44:57 2020 +0300 dt-bindings: iio: proximity: vl53l0x: Add IRQ support Since IRQ support was added to the driver, update bindings accordingly. Signed-off-by: Ivan Drobyshevskyi Link: https://lore.kernel.org/r/20200916074458.873359-1-drobyshevskyi@gmail.com Signed-off-by: Jonathan Cameron commit 322da39090f0ef07f8196b6c6e42e65a991f9948 Author: Jonathan Cameron Date: Thu Sep 10 18:32:42 2020 +0100 iio:health:max30102: Drop of_match_ptr and use generic fw accessors This enables use of the driver with ACPI PRP0001 and also removes an antipattern that I am trying to clear out of IIO to avoid it being copied into new drivers. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20200910173242.621168-39-jic23@kernel.org commit 4231f9d166bb90420b1950b303be078eeda1821a Author: Jonathan Cameron Date: Thu Sep 10 18:32:41 2020 +0100 iio:humidity:si7020: Drop of_match_ptr protection This prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: David Barksdale Link: https://lore.kernel.org/r/20200910173242.621168-38-jic23@kernel.org commit 7f33a29a747f1db1c1cbc4543bb9bd89369ac9be Author: Jonathan Cameron Date: Thu Sep 10 18:32:40 2020 +0100 iio:humidity:htu21: Drop of_match_ptr protection This prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Ludovic Tancerel Link: https://lore.kernel.org/r/20200910173242.621168-37-jic23@kernel.org commit 2b4f0172ae688e0c7c70fdedfb4b232dad9df52f Author: Jonathan Cameron Date: Thu Sep 10 18:32:39 2020 +0100 iio:magn:ak8974: Drop of_match_ptr protection This prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Linus Walleij Link: https://lore.kernel.org/r/20200910173242.621168-36-jic23@kernel.org commit 8e5a0426dddb6fd94ba2b369c12785474c30e29c Author: Jonathan Cameron Date: Thu Sep 10 18:32:38 2020 +0100 iio:magn:ak8975: Drop of_match_ptr and ACPI_PTR protections. Both would result in only a small size saving. For simplicity it is best to remove them. I also wish to remove both these antipatterns from IIO. Signed-off-by: Jonathan Cameron Tested-by: Jonathan Albrieux Reviewed-by: Andy Shevchenko Acked-by: Jonathan Albrieux Link: https://lore.kernel.org/r/20200910173242.621168-35-jic23@kernel.org commit 03303e8425436372472993f988a20262a263fbcf Author: Jonathan Cameron Date: Thu Sep 10 18:32:37 2020 +0100 iio:proximity:pulsedlight: Drop of_match_ptr protection This prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20200910173242.621168-34-jic23@kernel.org commit 00fa493b99894b930e431c05a9dba294c5189120 Author: Jonathan Cameron Date: Thu Sep 10 18:32:36 2020 +0100 iio:proximity:as3935: Drop of_match_ptr and use generic fw accessors This change allows the driver to be used with ACPI PRP0001 and removes an antipattern that I want to avoid being copied into new IIO drivers. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20200910173242.621168-33-jic23@kernel.org commit c457b7efa302a8c3706176636f7f2702556f93ab Author: Jonathan Cameron Date: Thu Sep 10 18:32:35 2020 +0100 iio:proximity:as3935: Use local struct device pointer to simplify code. This makes the existing code easier to read and will make the following patch a little simpler. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20200910173242.621168-32-jic23@kernel.org commit d13643143074102f2264d3cbf8052f57a371dd5f Author: Jonathan Cameron Date: Thu Sep 10 18:32:34 2020 +0100 iio:humidity:hdc100x: Drop of_match_ptr protection. This prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20200910173242.621168-31-jic23@kernel.org commit b3fce99a57377673eaf7c89ae9a42f4fd60966e2 Author: Jonathan Cameron Date: Thu Sep 10 18:32:33 2020 +0100 iio:chemical:vz89x: Drop of_match_ptr protection and use generic fw accessors This change allow the driver to be used with ACPI PRP0001 and removes an antipattern that I want to avoid being copied into new IIO drivers. The handling of match_data uses a different approach as device_get_match_data() doesn't distinguish between no match, and a match but with NULL data. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20200910173242.621168-30-jic23@kernel.org commit e12b3a6150f1ce271e2a5282d3cfd116a144d796 Author: Jonathan Cameron Date: Thu Sep 10 18:32:32 2020 +0100 iio:chemical:vz89x: Introduce local struct device pointer. Avoids lots of repetition of &client->dev and will make the next patch tidier. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20200910173242.621168-29-jic23@kernel.org commit 6ac282edd653d28b4d64744c7ad05e9a4e1aeaf4 Author: Jonathan Cameron Date: Thu Sep 10 18:32:31 2020 +0100 iio:chemical:sgp30: Drop of_match_ptr and use generic fw accessors This change allow the driver to be used with ACPI PRP0001 and removes an antipattern that I want to avoid being copied into new IIO drivers. The handling of match_data uses a different approach as device_get_match_data doesn't distinguish between no match, and a match but with NULL data. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Andreas Brauchli Link: https://lore.kernel.org/r/20200910173242.621168-28-jic23@kernel.org commit cb26d236861ca6a3354f1623ae5b9c049fd2f972 Author: Jonathan Cameron Date: Thu Sep 10 18:32:30 2020 +0100 iio:chemical:sgp30: Use local variable dev to simplify code This cleans up the code at bit, but is primarily here as a precusor to the next patch. I've only done this for the two functions which use the dev pointer repeatedly. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Andreas Brauchli Link: https://lore.kernel.org/r/20200910173242.621168-27-jic23@kernel.org commit a867e8986759bf25251c8cad3798cba0e4c25a6e Author: Jonathan Cameron Date: Thu Sep 10 18:32:29 2020 +0100 iio:chemical:atlas-sensor: Drop of_match_ptr and use generic fw accessors of_match_ptr() prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver and use generic fw accessors to check if there is a fw_node and get the id. It might be neater to use pointers rather than indexes for the device_data but that is another issue and should be handled separately. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20200910173242.621168-26-jic23@kernel.org commit 4d36d4df68d3db9aca1e0785f464b5092f39952b Author: Jonathan Cameron Date: Thu Sep 10 18:32:28 2020 +0100 iio:chemical:ams-iaq-core: Drop of_match_ptr protection This prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20200910173242.621168-25-jic23@kernel.org commit 184ac728db0354c9a8b467027a5a125ab9ef18ee Author: Jonathan Cameron Date: Thu Sep 10 18:32:27 2020 +0100 iio:resolver:ad2s1200: Drop of_match_ptr protection This prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200910173242.621168-24-jic23@kernel.org commit b5c35aedf98d9060c85969dbb6b79511d2c3c54c Author: Jonathan Cameron Date: Thu Sep 10 18:32:26 2020 +0100 iio:temperature:tmp007: Drop of_match_ptr protection This prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200910173242.621168-23-jic23@kernel.org commit c5b411bc9a7058d57afd43d4d075e7a34a242b9e Author: Jonathan Cameron Date: Thu Sep 10 18:32:25 2020 +0100 iio:temperature:tsys01: Drop of_match_ptr protection This prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Ludovic Tancerel Link: https://lore.kernel.org/r/20200910173242.621168-22-jic23@kernel.org commit a409d2b6391376180d4440a4336d4e67ee4fd754 Author: Jonathan Cameron Date: Thu Sep 10 18:32:24 2020 +0100 iio:pressure:zpa2326: Drop of_match_ptr protection This prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Gregor Boirie Link: https://lore.kernel.org/r/20200910173242.621168-21-jic23@kernel.org commit 444f5f854b35260361a9a6448b151740b86194af Author: Jonathan Cameron Date: Thu Sep 10 18:32:23 2020 +0100 iio:pressure:ms5637: Drop of_match_ptr protection This prevents use of this driver with ACPI via PRP0001 and is an example of an anti pattern I'm trying to remove from IIO. Hence drop from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Ludovic Tancerel Link: https://lore.kernel.org/r/20200910173242.621168-20-jic23@kernel.org commit 0e62470652faed4a657123373a5ff725320d0b3d Author: Jonathan Cameron Date: Thu Sep 10 18:32:22 2020 +0100 iio:pressure:ms5611: Drop of_match_ptr and CONFIG_OF protections These prevents use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Hence drop them from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Tomasz Duszynski Link: https://lore.kernel.org/r/20200910173242.621168-19-jic23@kernel.org commit eb25d0aa4ae02cc31d77c9b677713d3be37761d8 Author: Jonathan Cameron Date: Thu Sep 10 18:32:21 2020 +0100 iio:pressure:icp10100: Drop of_match_ptr and CONFIG_OF protections These prevents use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Hence drop them from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20200910173242.621168-18-jic23@kernel.org commit 4c55fb8c9917246d1d0c77cc7c13673a0f480d78 Author: Jonathan Cameron Date: Thu Sep 10 18:32:20 2020 +0100 iio:potentiostat:lmp91000: Drop of_match_ptr and use generic fw accessors This change allows use of this driver with ACPI via PRP0001 and removes an example of an anti pattern I'm trying to remove from IIO. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Acked-by: Matt Ranostay Link: https://lore.kernel.org/r/20200910173242.621168-17-jic23@kernel.org commit 16723c6eaa9ec12145e178415e9861689221c664 Author: Jonathan Cameron Date: Thu Sep 10 18:32:19 2020 +0100 iio:dac:ti-dac5571: Drop of_match_ptr and CONFIG_OF protections These prevent the use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Hence drop them from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Sean Nyekjaer Link: https://lore.kernel.org/r/20200910173242.621168-16-jic23@kernel.org commit 40f84dd0e60c5ed5c21ab8204d24604db0612dbc Author: Jonathan Cameron Date: Thu Sep 10 18:32:18 2020 +0100 iio:dac:ti-dac082s085: Drop of_match_ptr and CONFIG_OF protections These prevent the use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Hence drop them from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Lukas Wunner Link: https://lore.kernel.org/r/20200910173242.621168-15-jic23@kernel.org commit 2de887b0cfc7ec9dbfe3fa458599419689e4c5d6 Author: Jonathan Cameron Date: Thu Sep 10 18:32:17 2020 +0100 iio:dac:mcp4725: drop of_match_ptr and use generic fw properties This enables use of ACPI PRP0001 and removes an antipattern I am trying to stop people copying in IIO. This particular case is more complex than most because it allowed probing via sysfs with out a fwnode but would presumably always have then failed. Now the code will assume that properties are the defaults if not specified or the firmware node is not present. This relaxation of the constraints should not break any existing cases and may enable some new ones. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Peter Meerwald Link: https://lore.kernel.org/r/20200910173242.621168-14-jic23@kernel.org commit 34860a19a3ac5546757cacfba191cb2b635835c3 Author: Jonathan Cameron Date: Thu Sep 10 18:32:16 2020 +0100 iio:dac:ad7303: Drop of_match_ptr protection This prevents use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Also add mod_devicetable.h include given struct of_device_id is declared there. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Michael Hennerich Cc: Lars-Peter Clausen Link: https://lore.kernel.org/r/20200910173242.621168-13-jic23@kernel.org commit fe506cc5af0b5c44ce593467c0500dd16bf78919 Author: Jonathan Cameron Date: Thu Sep 10 18:32:15 2020 +0100 iio:dac:ad5593r: Drop of_match_ptr and ACPI_PTR protections. These result in a very small reduction in driver size, but at the cost of more complex build and slightly harder to read code. In the case of of_match_ptr it also prevents use of PRP0001 ACPI based identification. In this particular case we have a valid ACPI/PNP ID that I am assuming was issued by Analog Devices. That should be used in preference to PRP0001 but doesn't mean we should prevent that route. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Michael Hennerich Cc: Lars-Peter Clausen Link: https://lore.kernel.org/r/20200910173242.621168-12-jic23@kernel.org commit 23636b479a39719ea1bbc5687048245f9b0ea22b Author: Jonathan Cameron Date: Thu Sep 10 18:32:14 2020 +0100 iio:dac:ad5592r: Drop of_match_ptr and ACPI_PTR protections. These result in a very small reduction in driver size, but at the cost of more complex build and slightly harder to read code. In the case of of_match_ptr it also prevents use of PRP0001 ACPI based identification. In this particular case we have a valid ACPI/PNP ID that I am assuming was issued by Analog Devices. That should be used in preference to PRP0001 but doesn't mean we should prevent that route. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Michael Hennerich Cc: Lars-Peter Clausen Link: https://lore.kernel.org/r/20200910173242.621168-11-jic23@kernel.org commit b49e6eb1c7dffd86af7aaf922380ce2e231e8492 Author: Jonathan Cameron Date: Thu Sep 10 18:32:13 2020 +0100 iio:dac:ad5446: Drop of_match_ptr and CONFIG_OF protections These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Hence drop them from this driver. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Michael Hennerich Link: https://lore.kernel.org/r/20200910173242.621168-10-jic23@kernel.org commit 20e39f3aa278667a50d3b5b6f467538ab0e1d5ce Author: Jonathan Cameron Date: Thu Sep 10 18:32:12 2020 +0100 iio:potentiometer:mcp4531: Drop of_match_ptr and CONFIG_OF protections. These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Hence drop them from this driver. Also switch to device_get_match_data() from of_ variant and adjust headers to reflect the change. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Peter Rosin Link: https://lore.kernel.org/r/20200910173242.621168-9-jic23@kernel.org commit a51a834997861e720fddf81f942e090a6be26233 Author: Jonathan Cameron Date: Thu Sep 10 18:32:11 2020 +0100 iio:potentiometer:mcp4131: Drop of_match_ptr and use generic fw interfaces. This change allows the use of the driver with ACPI via PRP0001 and remove an example of an anti pattern I'm trying to remove from IIO. Also adjust includes to reflect this change. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Slawomir Stepien Link: https://lore.kernel.org/r/20200910173242.621168-8-jic23@kernel.org commit 6fad8ae45692a12596d88f6e26103e35624c65c7 Author: Jonathan Cameron Date: Thu Sep 10 18:32:10 2020 +0100 iio:potentiometer:mcp4018: Drop of_match_ptr and CONFIG_OF protections. These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Also use device_get_match_data() rather than devicetree only version. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Peter Rosin Link: https://lore.kernel.org/r/20200910173242.621168-7-jic23@kernel.org commit 9c5149cd92e477b83550a28e486e3c72c2724257 Author: Jonathan Cameron Date: Thu Sep 10 18:32:09 2020 +0100 iio:potentiometer:max5481: Drop invalid ACPI binding. Given that an ACPI binding must start with 3 or 4 capitals, this cannot represent a valid binding. It seems unlikely anything out there is using it. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Maury Anderson Cc: Matthew Weber Cc: Slawomir Stepien Link: https://lore.kernel.org/r/20200910173242.621168-6-jic23@kernel.org commit 1c372dd71da4aeadf341b9751733a6d3653b97c6 Author: Jonathan Cameron Date: Thu Sep 10 18:32:08 2020 +0100 iio:potentiometer:max5481: Drop of_match_ptr and CONFIG_OF protections. These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Whilst this driver has an ACPI binding, it is not of a form that is valid under ACPI so will be dropped shortly. Also switch to device_get_match_data() and switch headers. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Maury Anderson Cc: Matthew Weber Cc: Slawomir Stepien Link: https://lore.kernel.org/r/20200910173242.621168-5-jic23@kernel.org commit 458c7665f82afe361746107212ff6122d8d3f8f7 Author: Jonathan Cameron Date: Thu Sep 10 18:32:07 2020 +0100 iio:potentiometer:max5432: Drop of_match_ptr and use generic fw accessors These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Drop them to remove this restriction. Also switch headers to reflect this change. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Reviewed-by: Martin Kaiser Link: https://lore.kernel.org/r/20200910173242.621168-4-jic23@kernel.org commit 18fce56134c987e5b4eceddafdbe4b00c07e2ae1 Author: Marc Zyngier Date: Thu Jul 16 17:11:09 2020 +0100 arm64: Run ARCH_WORKAROUND_1 enabling code on all CPUs Commit 73f381660959 ("arm64: Advertise mitigation of Spectre-v2, or lack thereof") changed the way we deal with ARCH_WORKAROUND_1, by moving most of the enabling code to the .matches() callback. This has the unfortunate effect that the workaround gets only enabled on the first affected CPU, and no other. In order to address this, forcefully call the .matches() callback from a .cpu_enable() callback, which brings us back to the original behaviour. Fixes: 73f381660959 ("arm64: Advertise mitigation of Spectre-v2, or lack thereof") Cc: Reviewed-by: Suzuki K Poulose Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit b11483ef5a502663732c6ca1b58d14ff9eedd6f7 Author: Marc Zyngier Date: Thu Jul 16 17:11:08 2020 +0100 arm64: Make use of ARCH_WORKAROUND_1 even when KVM is not enabled We seem to be pretending that we don't have any firmware mitigation when KVM is not compiled in, which is not quite expected. Bring back the mitigation in this case. Fixes: 4db61fef16a1 ("arm64: kvm: Modernize __smccc_workaround_1_smc_start annotations") Cc: Signed-off-by: Marc Zyngier Signed-off-by: Will Deacon commit 9c4b4c701e53183df94f6b9802b63762f0c0e1e3 Author: Julien Grall Date: Fri Aug 28 19:11:53 2020 +0100 arm64/sve: Implement a helper to load SVE registers from FPSIMD state In a follow-up patch, we may save the FPSIMD rather than the full SVE state when the state has to be zeroed on return to userspace (e.g during a syscall). Introduce an helper to load SVE vectors from FPSIMD state and zero the rest of SVE registers. Signed-off-by: Julien Grall Signed-off-by: Mark Brown Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20200828181155.17745-7-broonie@kernel.org Signed-off-by: Will Deacon commit 1e530f1352a2709d7bcacdb8b6d42c8900ba2c80 Author: Julien Grall Date: Fri Aug 28 19:11:52 2020 +0100 arm64/sve: Implement a helper to flush SVE registers Introduce a new helper that will zero all SVE registers but the first 128-bits of each vector. This will be used by subsequent patches to avoid costly store/maipulate/reload sequences in places like do_sve_acc(). Signed-off-by: Julien Grall Signed-off-by: Mark Brown Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20200828181155.17745-6-broonie@kernel.org Signed-off-by: Will Deacon commit 6d40f05fad0babfb3e991edb2d0bd28a30a2f10c Author: Julien Grall Date: Fri Aug 28 19:11:50 2020 +0100 arm64/fpsimdmacros: Allow the macro "for" to be used in more cases The current version of the macro "for" is not able to work when the counter is used to generate registers using mnemonics. This is because gas is not able to evaluate the expression generated if used in register's name (i.e x\n). Gas offers a way to evaluate macro arguments by using % in front of them under the alternate macro mode. The implementation of "for" is updated to use the alternate macro mode and %, so we can use the macro in more cases. As the alternate macro mode may have side-effects, this is disabled when expanding the body. While it is enough to prefix the argument of the macro "__for_body" with %, the arguments of "__for" are also prefixed to get a more bearable value in case of compilation error. Suggested-by: Dave Martin Signed-off-by: Julien Grall Signed-off-by: Mark Brown Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20200828181155.17745-4-broonie@kernel.org Signed-off-by: Will Deacon commit 315cf047d230a363515bedce177cfbf460cbb2d6 Author: Julien Grall Date: Fri Aug 28 19:11:51 2020 +0100 arm64/fpsimdmacros: Introduce a macro to update ZCR_EL1.LEN A follow-up patch will need to update ZCR_EL1.LEN. Add a macro that could be re-used in the current and new places to avoid code duplication. Signed-off-by: Julien Grall Signed-off-by: Mark Brown Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20200828181155.17745-5-broonie@kernel.org Signed-off-by: Will Deacon commit 68a4c52e55e024ad946779f20d50ab31860eb0cc Author: Julien Grall Date: Fri Aug 28 19:11:49 2020 +0100 arm64/signal: Update the comment in preserve_sve_context The SVE state is saved by fpsimd_signal_preserve_current_state() and not preserve_fpsimd_context(). Update the comment in preserve_sve_context to reflect the current behavior. Signed-off-by: Julien Grall Signed-off-by: Mark Brown Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20200828181155.17745-3-broonie@kernel.org Signed-off-by: Will Deacon commit f186a84d8abecc7dfbd5bbd0a8ad0358078e4767 Author: Julien Grall Date: Fri Aug 28 19:11:48 2020 +0100 arm64/fpsimd: Update documentation of do_sve_acc fpsimd_restore_current_state() enables and disables the SVE access trap based on TIF_SVE, not task_fpsimd_load(). Update the documentation of do_sve_acc to reflect this behavior. Signed-off-by: Julien Grall Signed-off-by: Mark Brown Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20200828181155.17745-2-broonie@kernel.org Signed-off-by: Will Deacon commit f866c471542e6dddca2ab971a85ebc54fd3713a4 Author: Crystal Guo Date: Mon Aug 3 15:14:58 2020 +0800 arm64: dts: mt8183: update watchdog device node The watchdog driver for MT8183 relies on DT data, so the fallback compatible MT6589 won't work, need to update watchdog device node to sync with watchdog dt-binding document. Signed-off-by: Crystal Guo Acked-by: Guenter Roeck Signed-off-by: Matthias Brugger commit ca03dba30f2b8ff45a2972c6691e4c96d8c52b3b Author: Julia Lawall Date: Sun Sep 20 13:26:23 2020 +0200 spi/topcliff-pch: drop double zeroing sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(*x),flags) ... sg_init_table(x,n) // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1600601186-7420-12-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit 72cc95132a93293dcd0b6f68353f4741591c9aeb Author: Chandan Babu R Date: Tue Sep 15 20:50:42 2020 -0700 xfs: Set xfs_buf type flag when growing summary/bitmap files The following sequence of commands, mkfs.xfs -f -m reflink=0 -r rtdev=/dev/loop1,size=10M /dev/loop0 mount -o rtdev=/dev/loop1 /dev/loop0 /mnt xfs_growfs /mnt ... causes the following call trace to be printed on the console, XFS: Assertion failed: (bip->bli_flags & XFS_BLI_STALE) || (xfs_blft_from_flags(&bip->__bli_format) > XFS_BLFT_UNKNOWN_BUF && xfs_blft_from_flags(&bip->__bli_format) < XFS_BLFT_MAX_BUF), file: fs/xfs/xfs_buf_item.c, line: 331 Call Trace: xfs_buf_item_format+0x632/0x680 ? kmem_alloc_large+0x29/0x90 ? kmem_alloc+0x70/0x120 ? xfs_log_commit_cil+0x132/0x940 xfs_log_commit_cil+0x26f/0x940 ? xfs_buf_item_init+0x1ad/0x240 ? xfs_growfs_rt_alloc+0x1fc/0x280 __xfs_trans_commit+0xac/0x370 xfs_growfs_rt_alloc+0x1fc/0x280 xfs_growfs_rt+0x1a0/0x5e0 xfs_file_ioctl+0x3fd/0xc70 ? selinux_file_ioctl+0x174/0x220 ksys_ioctl+0x87/0xc0 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x3e/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xa9 This occurs because the buffer being formatted has the value of XFS_BLFT_UNKNOWN_BUF assigned to the 'type' subfield of bip->bli_formats->blf_flags. This commit fixes the issue by assigning one of XFS_BLFT_RTSUMMARY_BUF and XFS_BLFT_RTBITMAP_BUF to the 'type' subfield of bip->bli_formats->blf_flags before committing the corresponding transaction. Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R Signed-off-by: Darrick J. Wong commit 6dd379c7fa81ea08f44a567be79b29af3bc6af78 Author: Brian Foster Date: Tue Sep 15 20:44:46 2020 -0700 xfs: drop extra transaction roll from inode extent truncate The inode extent truncate path unmaps extents from the inode block mapping, finishes deferred ops to free the associated extents and then explicitly rolls the transaction before processing the next extent. The latter extent roll is spurious as xfs_defer_finish() always returns a clean transaction and automatically relogs inodes attached to the transaction (with lock_flags == 0). This can unnecessarily increase the number of log ticket regrants that occur during a long running truncate operation. Remove the explicit transaction roll. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4c9db39361da5dcf0e77f4aeb4817be3bf7d626b Author: Michał Mirosław Date: Sat Sep 19 23:28:25 2020 +0200 regulator: unexport regulator_lock/unlock() regulator_lock/unlock() was used only to guard regulator_notifier_call_chain(). As no users remain, make the functions internal. Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/d3381aabd2632aff5e7b839d55868bec6e85c811.1600550732.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 534c0f4391a497d10c2b5eb3df2016221b6ec4f6 Author: Dan Murphy Date: Fri Sep 18 10:01:30 2020 -0500 ASoC: tas2562: Add the TAS2564 compatible Add the TAS2564 as a supported amplifier. This amplifier is register, bitmap and feature compatible to the TAS2562. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918150130.21015-2-dmurphy@ti.com Signed-off-by: Mark Brown commit 7a477213923fe07c17db7c3104cce6b316f75f60 Author: Dan Murphy Date: Fri Sep 18 10:01:29 2020 -0500 dt-bindings: tas2562: Add TAS2564 to binding Add the TAS2564 compatible and data sheet link to the binding. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200918150130.21015-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 5b51b9221f711d205e361f8d1182fd6aea667296 Author: Kai Vehmanen Date: Mon Sep 21 13:47:46 2020 +0300 ASoC: SOF: imx: add missing MODULE_LICENSE() for imx-common Fix build warning: WARNING: modpost: missing MODULE_LICENSE() in sound/soc/sof/imx/imx-common.o Fixes: 18ebffe4d043 ("ASoC: SOF: imx: Add debug support for imx platforms") Reported-by: Stephen Rothwell Signed-off-by: Kai Vehmanen Reviewed-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200921104746.2903507-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 43437d0417a36bc9174deedce4ecc2c516ffde57 Author: Daniel Baluta Date: Mon Sep 21 13:50:38 2020 +0300 ASoC: SOF: pm: Fix prepare callback behavior for OF usecase On i.MX platforms PM is not managed via ACPI although CONFIG_ACPI can be set. So, in order to correctly set the system target state we introduce a flag for platforms that require to use acpi target states. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200921105038.2909899-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 641088722244f59fed00b68f7f5aaa3d56c1d73d Author: Guillermo Rodríguez Date: Fri Sep 18 15:43:16 2020 +0200 ASoC: cs42l51: add additional ADC volume controls Add volume controls for: - Analog programmable gain amplifier (PGA) (-3 .. +12 dB) - ADC attenuator (0 .. -96 dB) Signed-off-by: Guillermo Rodríguez Acked-by: David Rhodes Link: https://lore.kernel.org/r/20200918134317.22574-1-guille.rodriguez@gmail.com Signed-off-by: Mark Brown commit 2263063fc4880d544a1eb87713f642384fe03cb7 Author: Keyon Jie Date: Mon Sep 21 13:45:44 2020 +0300 ASoC: SOF: topology: fix the process being scheduled on core0 always In commit 783898ce68de ("ASoC: SOF: append extended data to sof_ipc_comp_process") the process components are set to run on the fixed core 0, this break us from scheduling components on any other DSP core. Since we can get the DSP core index from swidget->core, it is duplicated to pass the extra 'core' argument for those sof_widget_load_xx() functions. Here removes the duplicate 'core' argument and get component core from swidget->core directly to fix the issue mentioned above. Fixes: 783898ce68de ("ASoC: SOF: append extended data to sof_ipc_comp_process") Signed-off-by: Keyon Jie Reviewed-by: Jaska Uimonen Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200921104544.2897112-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 79d924e92fb02ae64158d9e6206832a294d3aab4 Merge: 33f16b25a0916 a31128384dfd9 Author: Greg Kroah-Hartman Date: Mon Sep 21 18:26:09 2020 +0200 Merge ba31128384dfd ("Merge tag 'libnvdimm-fixes-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm") into tty-next We need the dax build fix in here so that our builds do not keep breaking. Signed-off-by: Greg Kroah-Hartman commit 653f68b6ecd15cf147817bb01c2b7d02f4bffc8e Author: Chen Yu Date: Wed Aug 19 11:23:54 2020 +0800 ACPI: processor: Print more information when acpi_processor_evaluate_cst() fails Some platforms have bogus _CST which might cause unexpectd behavior in the CPU idle driver. Some bogus _CST might be unable to be disassembled by acpica-tools due to broken format. Print extra log if the _CST extraction/verification failes. This can be used to help narrow down why the CPU idle driver fails to behave as expected. Suggested-by: Zhang Rui Signed-off-by: Chen Yu [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 55be22adf11b48c80ea181366685ec91a4700b7e Merge: 629b9111535f2 a31128384dfd9 Author: Greg Kroah-Hartman Date: Mon Sep 21 18:23:56 2020 +0200 Merge a31128384dfd ("Merge tag 'libnvdimm-fixes-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm") into usb-next We need the dax build fix in here as well, so that the build does not break. Signed-off-by: Greg Kroah-Hartman commit ed38c33f1cc5a4e6da63f71879106acc0027e286 Author: Julia Lawall Date: Sun Sep 20 13:26:20 2020 +0200 xprtrdma: drop double zeroing sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(*x),flags) ... sg_init_table(x,n) // Signed-off-by: Julia Lawall Acked-by: Chuck Lever Signed-off-by: Anna Schumaker commit c754e137f55e075d6b6ad9b866c32e9aad260a83 Author: Trond Myklebust Date: Fri Sep 18 15:29:59 2020 -0400 pNFS/flexfiles: Be consistent about mirror index types A mirror index is always of type u32. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit b9bb694b9f62f4b31652223ed3ca38cf98bbb370 Author: Robin Murphy Date: Mon Sep 21 16:08:01 2020 +0100 iommu/io-pgtable-arm: Clean up faulty sanity check Checking for a nonzero dma_pfn_offset was a quick shortcut to validate whether the DMA == phys assumption could hold at all. Checking for a non-NULL dma_range_map is not quite equivalent, since a map may be present to describe a limited DMA window even without an offset, and thus this check can now yield false positives. However, it only ever served to short-circuit going all the way through to __arm_lpae_alloc_pages(), failing the canonical test there, and having a bit more to clean up. As such, we can simply remove it without loss of correctness. Reported-by: Naresh Kamboju Signed-off-by: Robin Murphy Signed-off-by: Christoph Hellwig commit 81ee8e52a71c712dbe04994f1430cb4c88b87ad6 Author: Matthew Wilcox (Oracle) Date: Mon Sep 21 08:58:42 2020 -0700 iomap: Change calling convention for zeroing Pass the full length to iomap_zero() and dax_iomap_zero(), and have them return how many bytes they actually handled. This is preparatory work for handling THP, although it looks like DAX could actually take advantage of it if there's a larger contiguous area. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e25ba8cbfd16bb10df8d90a138c743676fb8ee40 Author: Matthew Wilcox (Oracle) Date: Mon Sep 21 08:58:41 2020 -0700 iomap: Convert iomap_write_end types iomap_write_end cannot return an error, so switch it to return size_t instead of int and remove the error checking from the callers. Also convert the arguments to size_t from unsigned int, in case anyone ever wants to support a page size larger than 2GB. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0fb2d7209d66a84d58d9337ffe9f609fd552b07b Author: Matthew Wilcox (Oracle) Date: Mon Sep 21 08:58:41 2020 -0700 iomap: Convert write_count to write_bytes_pending Instead of counting bio segments, count the number of bytes submitted. This insulates us from the block layer's definition of what a 'same page' is, which is not necessarily clear once THPs are involved. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7d636676d2841ba5d92462dfa99a89c2f2da8919 Author: Matthew Wilcox (Oracle) Date: Mon Sep 21 08:58:40 2020 -0700 iomap: Convert read_count to read_bytes_pending Instead of counting bio segments, count the number of bytes submitted. This insulates us from the block layer's definition of what a 'same page' is, which is not necessarily clear once THPs are involved. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 0a195b91e8991367a94ee199f3af7faa7607e7db Author: Matthew Wilcox (Oracle) Date: Mon Sep 21 08:58:40 2020 -0700 iomap: Support arbitrarily many blocks per page Size the uptodate array dynamically to support larger pages in the page cache. With a 64kB page, we're only saving 8 bytes per page today, but with a 2MB maximum page size, we'd have to allocate more than 4kB per page. Add a few debugging assertions. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit b21866f514cb50bd75614851a8d066398a114cab Author: Matthew Wilcox (Oracle) Date: Mon Sep 21 08:58:40 2020 -0700 iomap: Use bitmap ops to set uptodate bits Now that the bitmap is protected by a spinlock, we can use the more efficient bitmap ops instead of individual test/set bit ops. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a6901d4d148dcbad7efb3174afbdf68c995618c2 Author: Matthew Wilcox (Oracle) Date: Mon Sep 21 08:58:39 2020 -0700 iomap: Use kzalloc to allocate iomap_page We can skip most of the initialisation, although spinlocks still need explicit initialisation as architectures may use a non-zero value to indicate unlocked. The comment is no longer useful as attach_page_private() handles the refcount now. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 24addd848a45747bcda68418710c72fdc8e145e4 Author: Matthew Wilcox (Oracle) Date: Mon Sep 21 08:58:39 2020 -0700 fs: Introduce i_blocks_per_page This helper is useful for both THPs and for supporting block size larger than page size. Convert all users that I could find (we have a few different ways of writing this idiom, and I may have missed some). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Kleikamp commit 7ed3cd1a69e3aedb29d4edf0b02624a1833a952d Author: Matthew Wilcox (Oracle) Date: Mon Sep 21 08:58:38 2020 -0700 iomap: Fix misplaced page flushing If iomap_unshare_actor() unshares to an inline iomap, the page was not being flushed. block_write_end() and __iomap_write_end() already contain flushes, so adding it to iomap_write_end_inline() seems like the best place. That means we can remove it from iomap_write_actor(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 6cc19c5fad0908e4e5ed99c2236d740668985364 Author: Nikolay Borisov Date: Thu Sep 10 08:38:06 2020 -0700 iomap: Use round_down/round_up macros in __iomap_write_begin Signed-off-by: Nikolay Borisov Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 534ad9afb19b5ac810a5e1c638f371e81e0c1ed6 Author: Kai Vehmanen Date: Mon Sep 21 17:17:41 2020 +0300 ALSA: hda - fix CONTROLLER_IN_GPU macro name The CONTROLLER_IN_GPU() macro has different semantics than the similarly named macro in hda_intel.c. The name is also misleading as the macro is used to apply a Intel HSW/BDW programming logic for HDA controller clock configuration. Rename macro to reflect the actual implementation. Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200921141741.2983072-5-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 7b882fe3e3e8bfd6427bf61780e59d5bed6699b4 Author: Kai Vehmanen Date: Mon Sep 21 17:17:40 2020 +0300 ALSA: hda - handle multiple i915 device instances Currently i915_component_master_match() will return the first matching i915 instance. This does not work in case system has multiple i915 and HDA audio controller instances. Add a new connectivity check that handles following cases: - i915 and HDA controller on same PCI bus - discrete GPU with embedded HDA audio controller connected via PCI bridge Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200921141741.2983072-4-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit c0a1d129d3e01751d410343cb8e4a694716ca825 Author: Trond Myklebust Date: Fri Sep 18 15:29:58 2020 -0400 pNFS/flexfiles: Ensure we initialise the mirror bsizes correctly on read While it is true that reading from an unmirrored source always uses index 0, that is no longer true for mirrored sources when we fail over. Fixes: 563c53e73b8b ("NFS: Fix flexfiles read failover") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 1bee263dfda57e45ad39c59a663c123a357ce38b Author: Kai Vehmanen Date: Mon Sep 21 17:17:39 2020 +0300 ALSA: hda - controller is in GPU on the DG1 Add Intel DG1 to the CONTROLLER_IN_GPU list to ensure audio power is requested whenever programming the controller. Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200921141741.2983072-3-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 69b08bdfa8181bc7babd7d81c93dc60142c4bfd3 Author: Kai Vehmanen Date: Mon Sep 21 17:17:38 2020 +0300 ALSA: hda - add Intel DG1 PCI and HDMI ids Add Intel DG1 PCI id to list of supported HDA controllers and add its HDMI id as well. Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200921141741.2983072-2-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 1170433e6611402b869c583fa1fbfd85106ff066 Author: Dmitry Osipenko Date: Thu Jul 9 20:35:32 2020 +0300 cpuidle: tegra: Correctly handle result of arm_cpuidle_simple_enter() The enter() callback of CPUIDLE drivers returns index of the entered idle state on success or a negative value on failure. The negative value could any negative value, i.e. it doesn't necessarily needs to be a error code. That's because CPUIDLE core only cares about the fact of failure and not about the reason of the enter() failure. Like every other enter() callback, the arm_cpuidle_simple_enter() returns the entered idle-index on success. Unlike some of other drivers, it never fails. It happened that TEGRA_C1=index=err=0 in the code of cpuidle-tegra driver, and thus, there is no problem for the cpuidle-tegra driver created by the typo in the code which assumes that the arm_cpuidle_simple_enter() returns a error code. The arm_cpuidle_simple_enter() also may return a -ENODEV error if CPU_IDLE is disabled in a kernel's config, but all CPUIDLE drivers are disabled if CPU_IDLE is disabled, including the cpuidle-tegra driver. So we can't ever see the error code from arm_cpuidle_simple_enter() today. Of course the code may get some changes in the future and then the typo may transform into a real bug, so let's correct the typo! The tegra_cpuidle_state_enter() is now changed to make it return the entered idle-index on success and negative error code on fail, which puts it on par with the arm_cpuidle_simple_enter(), making code consistent in regards to the error handling. This patch fixes a minor typo in the code, it doesn't fix any bugs. Signed-off-by: Dmitry Osipenko Reviewed-by: Jon Hunter Signed-off-by: Rafael J. Wysocki commit 14db1f0a93331d0958e90da522c429ff0890d2d6 Author: Ilie Halip Date: Sat Sep 19 09:41:18 2020 +0300 objtool: Ignore unreachable trap after call to noreturn functions With CONFIG_UBSAN_TRAP enabled, the compiler may insert a trap instruction after a call to a noreturn function. In this case, objtool warns that the UD2 instruction is unreachable. This is a behavior seen with Clang, from the oldest version capable of building the mainline x64_64 kernel (9.0), to the latest experimental version (12.0). Objtool silences similar warnings (trap after dead end instructions), so so expand that check to include dead end functions. Cc: Nick Desaulniers Cc: Rong Chen Cc: Marco Elver Cc: Philip Li Cc: Borislav Petkov Cc: kasan-dev@googlegroups.com Cc: x86@kernel.org Cc: clang-built-linux@googlegroups.com BugLink: https://github.com/ClangBuiltLinux/linux/issues/1148 Link: https://lore.kernel.org/lkml/CAKwvOdmptEpi8fiOyWUo=AiZJiX+Z+VHJOM2buLPrWsMTwLnyw@mail.gmail.com Suggested-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Reported-by: kbuild test robot Signed-off-by: Ilie Halip Tested-by: Sedat Dilek Signed-off-by: Josh Poimboeuf commit 2b232a22d8225df419a92ca69ddeeb4e5fe902f7 Author: Julien Thierry Date: Tue Sep 15 08:53:18 2020 +0100 objtool: Handle calling non-function symbols in other sections Relocation for a call destination could point to a symbol that has type STT_NOTYPE. Lookup such a symbol when no function is available. Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit a97740f81874c8063c12c24f34d25f10c4f5e9aa Author: Xu Wang Date: Mon Sep 21 07:09:26 2020 +0000 dma-debug: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Xu Wang Signed-off-by: Christoph Hellwig commit 089d83418914abd4d908db117d9a3eca7f51a68c Author: Maxime Ripard Date: Thu Sep 17 14:16:23 2020 +0200 drm/vc4: hvs: Pull the state of all the CRTCs prior to PV muxing The vc4 display engine has a first controller called the HVS that will perform the composition of the planes. That HVS has 3 FIFOs and can therefore compose planes for up to three outputs. The timings part is generated through a component called the Pixel Valve, and the BCM2711 has 6 of them. Thus, the HVS has some bits to control which FIFO gets output to which Pixel Valve. The current code supports that muxing by looking at all the CRTCs in a new DRM atomic state in atomic_check, and given the set of constraints that we have, assigns FIFOs to CRTCs or reject the mode entirely. The actual muxing will occur during atomic_commit. However, that doesn't work if only a fraction of the CRTCs' state is updated in that state, since it will ignore the CRTCs that are kept running unmodified, and will thus unassign its associated FIFO, and later disable it. In order to make the code work as expected, let's pull the CRTC state of all the enabled CRTC in our atomic_check so that we can operate on all the running CRTCs, no matter whether they are affected by the new state or not. Fixes: 87ebcd42fb7b ("drm/vc4: crtc: Assign output to channel automatically") Signed-off-by: Maxime Ripard Tested-by: Hoegeun Kwon Tested-by: Dave Stevenson Reviewed-by: Dave Stevenson Reviewed-by: Hoegeun Kwon Link: https://patchwork.freedesktop.org/patch/msgid/20200917121623.42023-1-maxime@cerno.tech commit 68274f97aeb6ebcd74c391ddbff0b517b9b0ca0f Author: Frank van der Linden Date: Thu Aug 27 20:46:55 2020 +0000 NFSv4.2: xattr cache: remove unused cache struct field The hash_lock field of the cache structure was a leftover of a previous iteration of the code. It is now unused, so remove it. Signed-off-by: Frank van der Linden Signed-off-by: Anna Schumaker commit cf65e49f89f2ccad54b1d560691cfa3cd371b2d2 Author: Miaohe Lin Date: Thu Aug 20 08:01:49 2020 -0400 nfs: Convert to use the preferred fallthrough macro Convert the uses of fallthrough comments to fallthrough macro. Please see commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough' pseudo keyword for switch/case use") for detail. Signed-off-by: Hongxiang Lou Signed-off-by: Miaohe Lin Signed-off-by: Anna Schumaker commit d8a6ad913c286d4763ae20b14c02fe6f39d7cd9f Author: Dave Wysochanski Date: Tue Aug 4 12:11:47 2020 -0400 NFS4: Fix oops when copy_file_range is attempted with NFS4.0 source The following oops is seen during xfstest/565 when the 'test' (source of the copy) is NFS4.0 and 'scratch' (destination) is NFS4.2 [ 59.692458] run fstests generic/565 at 2020-08-01 05:50:35 [ 60.613588] BUG: kernel NULL pointer dereference, address: 0000000000000008 [ 60.624970] #PF: supervisor read access in kernel mode [ 60.627671] #PF: error_code(0x0000) - not-present page [ 60.630347] PGD 0 P4D 0 [ 60.631853] Oops: 0000 [#1] SMP PTI [ 60.634086] CPU: 6 PID: 2828 Comm: xfs_io Kdump: loaded Not tainted 5.8.0-rc3 #1 [ 60.637676] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 [ 60.639901] RIP: 0010:nfs4_check_serverowner_major_id+0x5/0x30 [nfsv4] [ 60.642719] Code: 89 ff e8 3e b3 b8 e1 e9 71 fe ff ff 41 bc da d8 ff ff e9 c3 fe ff ff e8 e9 9d 08 e2 66 0f 1f 84 00 00 00 00 00 66 66 66 66 90 <8b> 57 08 31 c0 3b 56 08 75 12 48 83 c6 0c 48 83 c7 0c e8 c4 97 bb [ 60.652629] RSP: 0018:ffffc265417f7e10 EFLAGS: 00010287 [ 60.655379] RAX: ffffa0664b066400 RBX: 0000000000000000 RCX: 0000000000000001 [ 60.658754] RDX: ffffa066725fb000 RSI: ffffa066725fd000 RDI: 0000000000000000 [ 60.662292] RBP: 0000000000020000 R08: 0000000000020000 R09: 0000000000000000 [ 60.666189] R10: 0000000000000003 R11: 0000000000000000 R12: ffffa06648258d00 [ 60.669914] R13: 0000000000000000 R14: 0000000000000000 R15: ffffa06648258100 [ 60.673645] FS: 00007faa9fb35800(0000) GS:ffffa06677d80000(0000) knlGS:0000000000000000 [ 60.677698] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 60.680773] CR2: 0000000000000008 CR3: 0000000203f14000 CR4: 00000000000406e0 [ 60.684476] Call Trace: [ 60.685809] nfs4_copy_file_range+0xfc/0x230 [nfsv4] [ 60.688704] vfs_copy_file_range+0x2ee/0x310 [ 60.691104] __x64_sys_copy_file_range+0xd6/0x210 [ 60.693527] do_syscall_64+0x4d/0x90 [ 60.695512] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 60.698006] RIP: 0033:0x7faa9febc1bd Signed-off-by: Dave Wysochanski Signed-off-by: Anna Schumaker commit 0bdd4cea12a9fd79a7eb7de8493a5fef54d0eea6 Author: Alexander A. Klimov Date: Tue Jul 7 21:50:12 2020 +0200 Replace HTTP links with HTTPS ones: NFS, SUNRPC, and LOCKD clients Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Anna Schumaker commit 1138ce1cf60954d1c0e2d7b4eba5b4df5813fd86 Author: Randy Dunlap Date: Wed Jul 15 18:31:30 2020 -0700 sunrpc: fix duplicated word in Change "time time" to "time expiry_time" to match the field name. Signed-off-by: Randy Dunlap Cc: "J. Bruce Fields" Cc: Chuck Lever Cc: Trond Myklebust Cc: Anna Schumaker Cc: linux-nfs@vger.kernel.org Signed-off-by: Anna Schumaker commit 5589cc4778e23424c44c3a82cd0685f87904fe91 Author: Chuck Lever Date: Wed Jul 8 16:10:56 2020 -0400 SUNRPC: Remove remaining dprintks from sched.c Clean up. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 721a1d388b5536adb220aba25775a256f09790c3 Author: Chuck Lever Date: Wed Jul 8 16:10:50 2020 -0400 SUNRPC: Remove dprintk call sites in RPC queuing functions Remove redundant call sites or call sites that are already covered by tracepoints. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 1466c2216382fc392817fc8888e4ebefb2ef4816 Author: Chuck Lever Date: Wed Jul 8 16:10:45 2020 -0400 SUNRPC: Clean up RPC scheduler tracepoints Remove several redundant dprintk call sites, and replace a couple of potentially useful ones with tracepoints. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit c3adcc7dfbfcb1bd7e29fa95f03d1f96b514e03e Author: Chuck Lever Date: Wed Jul 8 16:10:40 2020 -0400 SUNRPC: Replace rpcbind dprintk call sites with tracepoints In many cases, tracepoints already report these errors. In others, the dprintks were mainly useful when this code was less mature. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 1e664987a9165ada0dfb347a9e6cf935a6d495e7 Author: Chuck Lever Date: Wed Jul 8 16:10:35 2020 -0400 SUNRPC: Remove more dprintks in rpcb_clnt.c Clean up: These are superfluous now that rpc_create() and friends have tracepoints to report errors. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 15a798d6ce7ea67680973541e8a690edee9a71e9 Author: Chuck Lever Date: Wed Jul 8 16:10:29 2020 -0400 SUNRPC: Remove dprintk call sites in rpcbind XDR functions Clean up: Other XDR functions no longer have dprintk call sites. These were added during development and can be removed now that the code is mature. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit ac1ae534215b9b0a346547654b4720abd0882f15 Author: Chuck Lever Date: Wed Jul 8 16:10:24 2020 -0400 SUNRPC: Hoist trace_xprtrdma_op_setport into generic code Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit e465cc3fa86341121205d3faca26866bdf331ed5 Author: Chuck Lever Date: Wed Jul 8 16:10:19 2020 -0400 SUNRPC: Remove rpcb_getport_async dprintk call sites In many cases, tracepoints already report these errors. In others, the dprintks were mainly useful when this code was less mature. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 42ebfc2cbf22df0abf2a17414db256d1db87c154 Author: Chuck Lever Date: Wed Jul 8 16:10:14 2020 -0400 SUNRPC: Clean up call_bind_status() observability Time to remove dprintk call sites in here. Regarding the rpc_bind_status tracepoint: It's friendlier to administrators if they don't have to look up the error code to figure out what went wrong. Replace trace_rpc_bind_status with a set of tracepoints that report more specifically what the problem was, and what RPC program/version was being queried. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit fd66e2a79d96efcbea78e0dc33797e25fe353a71 Author: Chuck Lever Date: Wed Jul 8 16:10:08 2020 -0400 SUNRPC: Remove dprintk call site in call_decode Clean up. When enabled, this dprintk adds a line in /var/log/messages after every RPC that reports the task ID (no connection to on the wire XID values) and the RPC's result (no connection to the program, operation, or the arguments and results). Thus it's value is pretty low. Let's remove it. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 7c8099f6ada2654ef87aa992ec1b69b86249a353 Author: Chuck Lever Date: Wed Jul 8 16:10:03 2020 -0400 SUNRPC: Trace call_refresh events Clean up: Replace dprintk call sites. Note that rpc_call_rpcerror() already has a trace point, so perhaps adding trace_rpc_refresh_status() isn't necessary. However, it does report a particular category of error. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 914cdcc78a668a90bc627542f82fc3a92525141c Author: Chuck Lever Date: Wed Jul 8 16:09:58 2020 -0400 SUNRPC: Add trace_rpc_timeout_status() For a long while we've wanted a tracepoint that fires when a major timeout is reported in the system log. Such a tracepoint can be attached to other actions that can take place when a timeout is detected (eg, server or connection health assessment). Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 6f9f17287e78e5049931af2037b15b26d134a32a Author: Chuck Lever Date: Wed Jul 8 16:09:53 2020 -0400 SUNRPC: Mitigate cond_resched() in xprt_transmit() The original purpose of this expensive call is to prevent a long queue of requests from blocking other work. The cond_resched() call is unnecessary after just a single send operation. For longer queues, instead of invoking the kernel scheduler, simply release the transport send lock and return to the RPC scheduler. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit db0a86c4266ac36769f54e2ce33fff0300c9bc00 Author: Chuck Lever Date: Wed Jul 8 16:09:47 2020 -0400 SUNRPC: Replace connect dprintk call sites with a tracepoint This trace event can be used to audit transport connections from the client. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 0ec36cc9cd991d0cd9055949abd582921bbcfea8 Author: Chuck Lever Date: Wed Jul 8 16:09:42 2020 -0400 SUNRPC: Remove dprintk call site in call_start() Clean up: The rpc_rpc_request tracepoint serves the same purpose. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 6387039d6d753e02d9a6eed9a80a38a386d996d3 Author: Chuck Lever Date: Wed Jul 8 16:09:37 2020 -0400 SUNRPC: Remove the dprint_status() macro Clean up: The rpc_task_run_action tracepoint serves the same purpose. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 015747d296798510f94035a832252fcf477db434 Author: Chuck Lever Date: Wed Jul 8 16:09:32 2020 -0400 SUNRPC: Replace dprintk() call site in xs_nospace() "no socket space" is an exceptional and infrequent condition that troubleshooters want to know about. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 9ce07ae5eb1d968c975a4dace0cac25d9e602c9a Author: Chuck Lever Date: Wed Jul 8 16:09:26 2020 -0400 SUNRPC: Replace dprintk() call site in xprt_prepare_transmit Generate a trace event when an RPC request is queued without being sent immediately. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 09d2ba0cb1b311b2e3b144a0bbccc99f3c0d82d1 Author: Chuck Lever Date: Wed Jul 8 16:09:21 2020 -0400 SUNRPC: Update debugging instrumentation in xprt_do_reserve() Replace a dprintk() with a tracepoint. The tracepoint marks the point where an RPC request is assigned an XID. Additional clean up: Remove trace_xprt_enq_xmit, which reports much the same thing. That tracepoint was added for debugging commit 918f3c1fe83c ("SUNRPC: Improve latency for interactive tasks"). Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 78069487539dbb18e10aae15644019b468829ab2 Author: Chuck Lever Date: Wed Jul 8 16:09:16 2020 -0400 SUNRPC: Remove debugging instrumentation from xprt_release These instruments don't appear to add any substantial value. We already have this at the termination of each RPC: iozone-2617 [002] 975.713126: rpc_stats_latency: task:418@5 xid=0x260eab5d nfsv3 LOOKUP backlog=15 rtt=32 execute=58 iozone-2617 [002] 975.713127: xprt_release_cong: task:418@5 snd_task:4294967295 cong=256 cwnd=16384 iozone-2617 [002] 975.713127: xprt_put_cong: task:418@5 snd_task:4294967295 cong=0 cwnd=16384 Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 06e234c6132784c56198423c653f1ad0e1e1fdc1 Author: Chuck Lever Date: Wed Jul 8 16:09:11 2020 -0400 SUNRPC: Hoist trace_xprtrdma_op_allocate into generic code Introduce a tracepoint in call_allocate that reports the exact sizes in the RPC buffer allocation request and the status of the result. This helps catch problems with XDR buffer provisioning, and replaces transport-specific debugging instrumentation. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit e4378a0fdd43a676bb4dbd858bc9e61c6661193b Author: Chuck Lever Date: Wed Jul 8 16:09:05 2020 -0400 SUNRPC: Remove trace_xprt_complete_rqst() Request completion is already recorded by an "rpc_task_wakeup queue=xprt_pending" trace record. A subsequent rpc_xdr_recvfrom trace record shows the number of bytes received. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 88428cc4ae7abcc879295fbb19373dd76aad2bdd Author: Olga Kornievskaia Date: Tue Jun 23 11:24:09 2020 -0400 SUNRPC dont update timeout value on connection reset Current behaviour: every time a v3 operation is re-sent to the server we update (double) the timeout. There is no distinction between whether or not the previous timer had expired before the re-sent happened. Here's the scenario: 1. Client sends a v3 operation 2. Server RST-s the connection (prior to the timeout) (eg., connection is immediately reset) 3. Client re-sends a v3 operation but the timeout is now 120sec. As a result, an application sees 2mins pause before a retry in case server again does not reply. Where as if a connection reset didn't change the timeout value, the client would have re-tried (the 3rd time) after 60secs. Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit 82c596ebaa104f994d25256523ae2f9047323fe7 Author: Chengguang Xu Date: Wed Jun 17 09:09:39 2020 +0800 nfs4: strengthen error check to avoid unexpected result The variable error is ssize_t, which is signed and will cast to unsigned when comapre with variable size, so add a check to avoid unexpected result in case of negative value of error. Signed-off-by: Chengguang Xu Signed-off-by: Anna Schumaker commit 48bb6ec17cde09122931438add817a69a91c3ab6 Author: Colin Ian King Date: Wed Jun 10 00:22:57 2020 +0100 NFS: remove redundant pointer clnt The pointer clnt is being initialized with a value that is never read and so this is assignment redundant and can be removed. The pointer can removed because it is being used as a temporary variable and it is clearer to make the direct assignment and remove it completely. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Anna Schumaker commit d1e11d5f21675077b10c4205d93b59f67e2f0269 Author: Bryan O'Donoghue Date: Thu Sep 10 16:06:31 2020 +0100 wcn36xx: Remove dead code in wcn36xx_smd_config_bss() wcn36xx_smd_config_bss_v0() and wcn36xx_smd_config_bss_v1() have been designed to operate in standalone fashion. As a result we can drop the dead code now present in wcn36xx_smd_config_bss() and happily remove one kzalloc from the BSS config path as we do so. Signed-off-by: Bryan O'Donoghue Reviewed-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150631.2178970-8-bryan.odonoghue@linaro.org commit 5a7b60ad56d7824ee4aeb78e94de4f4eefdc602f Author: Bryan O'Donoghue Date: Thu Sep 10 16:06:30 2020 +0100 wcn36xx: Convert to using wcn36xx_smd_config_bss_v0() A previous patch added wcn36xx_smd_config_bss_v0() this patch converts the version 0 data-path in wcn36xx_smd_config_bss() to use wcn36xx_smd_config_bss_v0(). Signed-off-by: Bryan O'Donoghue Reviewed-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150631.2178970-7-bryan.odonoghue@linaro.org commit 1cdab0f89663913c654c06b5b89619baa21a4f29 Author: Bryan O'Donoghue Date: Thu Sep 10 16:06:29 2020 +0100 wcn36xx: Add wcn36xx_smd_config_bss_v0 This commit adds wcn36xx_smd_config_bss_v0() as a step along the road of functionally decomposing wcn36xx_smd_config_bss(). Signed-off-by: Bryan O'Donoghue Reviewed-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150631.2178970-6-bryan.odonoghue@linaro.org commit 7656d17985560ee7477e3aaa35fb8bd93e14160a Author: Bryan O'Donoghue Date: Thu Sep 10 16:06:28 2020 +0100 wcn36xx: Update wcn36xx_smd_config_bss_v1() to operate internally This patch updates wcn36xx_smd_config_bss_v1() to update on internally derived parameters only, specifically making use of STA v1 wrapper routines previously added. Once done we no longer need to pass a struct wcn36xx_hal_config_bss_req_msg which gives us options in later patches to eliminate the kzalloc() in wcn36xx_smd_config_bss entirely. Signed-off-by: Bryan O'Donoghue Reviewed-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150631.2178970-5-bryan.odonoghue@linaro.org commit 683693102072132a754e267677af15eadd6c2386 Author: Bryan O'Donoghue Date: Thu Sep 10 16:06:27 2020 +0100 wcn36xx: Move BSS parameter setup to wcn36xx_smd_set_bss_params() This commit moves BSS parameter setup to a separate function wcn36xx_smd_set_bss_params(). This will allow for further functional decomposition and fewer kzalloc() operations in subsequent patches. Signed-off-by: Bryan O'Donoghue Reviewed-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150631.2178970-4-bryan.odonoghue@linaro.org commit 9e212908b547e2b969a6415f6864ebf04c76f09a Author: Bryan O'Donoghue Date: Thu Sep 10 16:06:26 2020 +0100 wcn36xx: Move wcn36xx_smd_set_sta_params() inside wcn36xx_smd_config_bss() In order to facilitate functional decomposition of wcn36xx_smd_config_bss() we need to move wcn36xx_smd_set_sta_params() later in function. Signed-off-by: Bryan O'Donoghue Reviewed-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150631.2178970-3-bryan.odonoghue@linaro.org commit fe784c28fee1aaf1d8d2863e13e628abe13daecb Author: Bryan O'Donoghue Date: Thu Sep 10 16:06:25 2020 +0100 wcn36xx: Functionally decompose wcn36xx_smd_config_sta() This commit functionally decomposes wcn36xx_smd_config_sta into a clearly defined wcn36xx_smd_config_sta_v0 and wcn36xx_smd_config_sta_v1 path. Signed-off-by: Bryan O'Donoghue Reviewed-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150631.2178970-2-bryan.odonoghue@linaro.org commit c05a8bd80c17cb4b20d7fe61e6fe6ef19979f987 Author: Bryan O'Donoghue Date: Thu Sep 10 16:05:52 2020 +0100 wcn36xx: Add wrapper function wcn36xx_smd_set_sta_params_v1() This commit adds a wrapper function wcn36xx_smd_set_sta_params_v1() which calls into wcn36xx_smd_set_sta_params() and then subsequently sets version-1 specific parameters. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150552.2178882-8-bryan.odonoghue@linaro.org commit 5a32029ad02259b3976ec95c4aa4bd6991f5f268 Author: Bryan O'Donoghue Date: Thu Sep 10 16:05:51 2020 +0100 wcn36xx: Add wcn36xx_smd_set_bss_vht_params() This commit adds wcn36xx_smd_set_bss_vht_params(). The job of this function is to decide if the BSS is VHT capable and if so set the appropriate bit in the BSS parameter structure for passing to the firmware. VHT Channel width set is not set since we don't support 160MHz. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150552.2178882-7-bryan.odonoghue@linaro.org commit 17801df251e87111d8a6a2df03ed2a2eb3733659 Author: Bryan O'Donoghue Date: Thu Sep 10 16:05:50 2020 +0100 wcn36xx: Add wcn36xx_smd_set_sta_ht_ldpc_params() Adds a routine to allow setting the LDPC bit for HT parameter passing inside the version 1 STA parameters data structure. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150552.2178882-6-bryan.odonoghue@linaro.org commit 287c9310eab85c676985fcdf7459355b0b7d5650 Author: Bryan O'Donoghue Date: Thu Sep 10 16:05:49 2020 +0100 wcn36xx: Add wcn36xx_smd_set_sta_vht_params() This commit adds support for setting VHT parameters based on the declared VHT capability bits in the VHT capability structure. We cannot do 160MHz so VHT Channel width set should be zero. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150552.2178882-5-bryan.odonoghue@linaro.org commit 5a3b4ae1f32f16dd4bdf8548c48ce54a51f8c925 Author: Bryan O'Donoghue Date: Thu Sep 10 16:05:48 2020 +0100 wcn36xx: Add wcn36xx_smd_set_sta_default_ht_ldpc_params() Toggling the LDPC enabled bit is possible only via the extended V1 data-structure. This function provides a means of setting the default depending on chip-type. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150552.2178882-4-bryan.odonoghue@linaro.org commit 21ba284ca9f07e9d523829ccdfb6027fd0d8e46d Author: Bryan O'Donoghue Date: Thu Sep 10 16:05:47 2020 +0100 wcn36xx: Add wcn36xx_smd_set_sta_default_vht_params() This commit adds support for setting default VHT parameters, which are exposed by the extended version 1 STA parameter type. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150552.2178882-3-bryan.odonoghue@linaro.org commit c84515bd8f1c43d574b4fc720182ae51ddc7ba10 Author: Bryan O'Donoghue Date: Thu Sep 10 16:05:46 2020 +0100 wcn36xx: Add wcn36xx_set_default_rates_v1 Add a routine to set some additional default parameters associated with the V1 data structure. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150552.2178882-2-bryan.odonoghue@linaro.org commit 617e7cf80c92891094b4a206fe6e03ada14a0d26 Author: Bryan O'Donoghue Date: Thu Sep 10 16:04:50 2020 +0100 wcn36xx: Use V1 data structure to store supported rates This patch converts the internal data structure used to store data-rates from version 0 to version 1. This allows us to extend out the internal storage to represent VHT parameters. Using the extended version 1 data-structure allows us to avoid a whole raft of version 1 specific fixup functions. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150450.2178784-3-bryan.odonoghue@linaro.org commit 96d6617d64ee0c3864f7c0ca9c90d924976bbf4f Author: Bryan O'Donoghue Date: Thu Sep 10 16:04:49 2020 +0100 wcn36xx: Add VHT fields to parameter data structures In order to pass VHT parameters to wcn3680 we need to use a super-set of the V1 data-structures with additional VHT parameters tacked on. This patch adds the additional fields to the STA and BSS parameter structures. Since neither wcn3620 nor wcn3660 support VHT the size of the passed message is fixed to the previous message length. Subsequent changes will differentiate between wcn3620/wcn3660 and wcn3680 which does use the larger message size. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910150450.2178784-2-bryan.odonoghue@linaro.org commit ba929d6fe31a3d7d3538b590c0a90ccafaeaa8dc Author: Govind Singh Date: Mon Sep 14 19:06:55 2020 +0530 ath11k: Remove rproc references from common core layer IPQ8074 HW uses rproc with AHB as underlying hif layer. Move rproc references from common core layer to target hif layer. Remove IS_ENABLED check for CONFIG_REMOTEPROC as it's not required anymore. No functional changes. Compile tested only. Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1600090615-18904-1-git-send-email-govinds@codeaurora.org commit 31026c72f9f29644d130d740e7060f431247085a Author: Krzysztof Kozlowski Date: Fri Sep 4 16:53:02 2020 +0200 dt-bindings: arm: fsl: Fix matching Purism Librem5 phones All Purism Librem5 phones have three compatibles so they need their own entry to fix dbts_check warnings like: arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dt.yaml: /: compatible: ['purism,librem5r2', 'purism,librem5', 'fsl,imx8mq'] is not valid under any of the given schemas arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dt.yaml: /: compatible: ['purism,librem5r2', 'purism,librem5', 'fsl,imx8mq'] is too long Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 03fb92a432ea5abe5909bca1455b7e44a9380480 Author: Brooke Basile Date: Fri Sep 11 03:14:27 2020 -0400 ath9k: hif_usb: fix race condition between usb_get_urb() and usb_kill_anchored_urbs() Calls to usb_kill_anchored_urbs() after usb_kill_urb() on multiprocessor systems create a race condition in which usb_kill_anchored_urbs() deallocates the URB before the completer callback is called in usb_kill_urb(), resulting in a use-after-free. To fix this, add proper lock protection to usb_kill_urb() calls that can possibly run concurrently with usb_kill_anchored_urbs(). Reported-by: syzbot+89bd486af9427a9fc605@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=cabffad18eb74197f84871802fd2c5117b61febf Signed-off-by: Brooke Basile Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200911071427.32354-1-brookebasile@gmail.com commit 02686841d58faa920bf56ff724ab95f619c6374b Author: Zheng Bin Date: Fri Sep 18 18:25:05 2020 +0800 rtlwifi: rtl8723be: fix comparison to bool warning in hw.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c:861:6-35: WARNING: Comparison to bool Signed-off-by: Zheng Bin Acked-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200918102505.16036-10-zhengbin13@huawei.com commit 9dbde387e2839849ef94dcedd063d40d80fa90e1 Author: Zheng Bin Date: Fri Sep 18 18:25:04 2020 +0800 rtlwifi: rtl8192de: fix comparison to bool warning in hw.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:566:14-20: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:572:13-19: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:581:14-20: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:587:13-19: WARNING: Comparison to bool Signed-off-by: Zheng Bin Acked-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200918102505.16036-9-zhengbin13@huawei.com commit d544707ae078755e9101105334ce639986978fcc Author: Zheng Bin Date: Fri Sep 18 18:25:03 2020 +0800 rtlwifi: rtl8192ce: fix comparison to bool warning in hw.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:616:14-20: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:621:13-19: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:626:14-20: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:631:13-19: WARNING: Comparison to bool Signed-off-by: Zheng Bin Acked-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200918102505.16036-8-zhengbin13@huawei.com commit 77205bc3db80556a1d346974a9d925f80665e4c9 Author: Zheng Bin Date: Fri Sep 18 18:25:02 2020 +0800 rtlwifi: rtl8192cu: fix comparison to bool warning in hw.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c:831:14-49: WARNING: Comparison to bool Signed-off-by: Zheng Bin Acked-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200918102505.16036-7-zhengbin13@huawei.com commit 07cc5f0345ae9f8d98c7e0d55fafceb8ca868004 Author: Zheng Bin Date: Fri Sep 18 18:25:01 2020 +0800 rtlwifi: rtl8821ae: fix comparison to bool warning in phy.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:1816:5-13: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:1825:5-13: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:1839:5-13: WARNING: Comparison to bool Signed-off-by: Zheng Bin Acked-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200918102505.16036-6-zhengbin13@huawei.com commit d87a8d4d5eef9f715dafeacc324fba7294b5d5d1 Author: Zheng Bin Date: Fri Sep 18 18:25:00 2020 +0800 rtlwifi: rtl8821ae: fix comparison to bool warning in hw.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c:1897:5-13: WARNING: Comparison to bool Signed-off-by: Zheng Bin Acked-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200918102505.16036-5-zhengbin13@huawei.com commit 03ce8159395159d46e549a6bcfc42fcdfa12307f Author: Zheng Bin Date: Fri Sep 18 18:24:59 2020 +0800 rtlwifi: rtl8192cu: fix comparison to bool warning in mac.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:161:14-17: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:168:13-16: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:179:14-17: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:186:13-16: WARNING: Comparison to bool Signed-off-by: Zheng Bin Acked-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200918102505.16036-4-zhengbin13@huawei.com commit 4cff897cb2f8e33332213fb8000c0a7187cc25f1 Author: Zheng Bin Date: Fri Sep 18 18:24:58 2020 +0800 rtlwifi: rtl8192c: fix comparison to bool warning in phy_common.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c:1106:14-18: WARNING: Comparison to bool Signed-off-by: Zheng Bin Acked-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200918102505.16036-3-zhengbin13@huawei.com commit 027a4c9c305fe5557b341c8fa05750d4ed3f4f29 Author: Zheng Bin Date: Fri Sep 18 18:24:57 2020 +0800 rtlwifi: rtl8192ee: fix comparison to bool warning in hw.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c:797:6-33: WARNING: Comparison to bool Signed-off-by: Zheng Bin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200918102505.16036-2-zhengbin13@huawei.com commit 55bd149978679742374c800e56e8f6bc74378bbe Author: Huang Guobin Date: Thu Sep 17 08:30:19 2020 -0400 net: wilc1000: clean up resource in error path of init mon interface The wilc_wfi_init_mon_int() forgets to clean up resource when register_netdevice() failed. Add the missed call to fix it. And the return value of netdev_priv can't be NULL, so remove the unnecessary error handling. Fixes: 588713006ea4 ("staging: wilc1000: avoid the use of 'wilc_wfi_mon' static variable") Reported-by: Hulk Robot Signed-off-by: Huang Guobin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200917123019.206382-1-huangguobin4@huawei.com commit 41650c45fbd2d687c5d140be1779600d84201b72 Author: Jing Xiangfeng Date: Tue Sep 15 10:03:30 2020 +0800 ssb: Remove meaningless jump label to simplify the code The out jump label has nothing to do. So remove it to simplify the code. Signed-off-by: Jing Xiangfeng Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200915020330.96067-1-jingxiangfeng@huawei.com commit c65176fd49f45bd5a5ffaa1790109745d1fa462c Author: Roger Quadros Date: Fri Sep 18 19:59:30 2020 +0300 arm64: dts: ti: k3-j721e: Rename mux header and update macro names We intend to use one header file for SERDES MUX for all TI SoCs so rename the header file. The exsting macros are too generic. Prefix them with SoC name. While at that, add the missing configurations for completeness. Fixes: b766e3b0d5f6 ("arm64: dts: ti: k3-j721e-main: Add system controller node and SERDES lane mux") Reported-by: Peter Rosin Signed-off-by: Roger Quadros Signed-off-by: Nishanth Menon Acked-by: Peter Rosin Link: https://lore.kernel.org/r/20200918165930.2031-1-rogerq@ti.com commit 1b6a0e43a1a128265d4a4edbf0ba3120fdf2297c Author: Xiaowei Bao Date: Fri Sep 18 16:00:21 2020 +0800 PCI: layerscape: Add EP mode support for ls1088a and ls2088a Add PCIe EP mode support for ls1088a and ls2088a, there are some difference between LS1 and LS2 platform, so refactor the code of the EP driver. Link: https://lore.kernel.org/r/20200918080024.13639-10-Zhiqiang.Hou@nxp.com Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit e64844b6da31011ba7369da2593f3c08dbdf511d Author: Xiaowei Bao Date: Fri Sep 18 16:00:20 2020 +0800 PCI: layerscape: Modify the MSIX to the doorbell mode dw_pcie_ep_raise_msix_irq was never called in the exisitng driver before, because the ls1046a platform don't support the MSIX feature and msix_capable was always set to false. Now that add the ls1088a platform with MSIX support, use the doorbell method to support the MSIX feature. Link: https://lore.kernel.org/r/20200918080024.13639-9-Zhiqiang.Hou@nxp.com Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit cc255eb0bfbe86e388383971087f4f93b6191d1e Author: Xiaowei Bao Date: Fri Sep 18 16:00:19 2020 +0800 PCI: layerscape: Modify the way of getting capability with different PEX The different PCIe controller in one board may be have different capability of MSI or MSIX, so change the way of getting the MSI capability, make it more flexible. Link: https://lore.kernel.org/r/20200918080024.13639-8-Zhiqiang.Hou@nxp.com Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 20e458fb92af8175bfee35ef176c449b184de732 Author: Xiaowei Bao Date: Fri Sep 18 16:00:18 2020 +0800 PCI: layerscape: Fix some format issue of the code Fix some format issue of the code in EP driver. Link: https://lore.kernel.org/r/20200918080024.13639-7-Zhiqiang.Hou@nxp.com Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit 16421e14ad5a4a79f45d8dde18cd4d55e5cce5f1 Author: Xiaowei Bao Date: Fri Sep 18 16:00:17 2020 +0800 dt-bindings: pci: layerscape-pci: Add compatible strings for ls1088a and ls2088a Add compatible strings for ls1088a and ls2088a. Link: https://lore.kernel.org/r/20200918080024.13639-6-Zhiqiang.Hou@nxp.com Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring commit 47a062609a30d820aa2fe62450f0212f7f26b223 Author: Xiaowei Bao Date: Fri Sep 18 16:00:16 2020 +0800 PCI: designware-ep: Modify MSI and MSIX CAP way of finding Each PF of EP device should have its own MSI or MSIX capabitily struct, so create a dw_pcie_ep_func struct and move the msi_cap and msix_cap to this struct from dw_pcie_ep, and manage the PFs via a list. Link: https://lore.kernel.org/r/20200918080024.13639-5-Zhiqiang.Hou@nxp.com Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi commit 6bfc9c3a2c70a987e6432925769ec1376a12aed0 Author: Xiaowei Bao Date: Fri Sep 18 16:00:15 2020 +0800 PCI: designware-ep: Move the function of getting MSI capability forward Move the function of getting MSI capability to the front of init function, because the init function of the EP platform driver will use the return value by the function of getting MSI capability. Link: https://lore.kernel.org/r/20200918080024.13639-4-Zhiqiang.Hou@nxp.com Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit 2f7f7001d0e58f3f1c010c0ccdb049602c889b1d Author: Xiaowei Bao Date: Fri Sep 18 16:00:14 2020 +0800 PCI: designware-ep: Add the doorbell mode of MSI-X in EP mode Add the doorbell mode of MSI-X in DWC EP driver. Link: https://lore.kernel.org/r/20200918080024.13639-3-Zhiqiang.Hou@nxp.com Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit 24ede430fa49d27ee4dd95ef6d234069fa034b9c Author: Xiaowei Bao Date: Fri Sep 18 16:00:13 2020 +0800 PCI: designware-ep: Add multiple PFs support for DWC Add multiple PFs support for DWC, due to different PF have different config space, we use func_conf_select callback function to access the different PF's config space, the different chip company need to implement this callback function when use the DWC IP core and intend to support multiple PFs feature. Link: https://lore.kernel.org/r/20200918080024.13639-2-Zhiqiang.Hou@nxp.com Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Gustavo Pimentel commit 9b65b020fff70bc070c4cb8fcf8ea8a1f70b111b Author: Andy Shevchenko Date: Thu Jul 16 17:53:19 2020 +0300 i2c: nvidia-gpu: Use put_unaligned_be24() This makes the driver code slightly easier to read. Signed-off-by: Andy Shevchenko Reviewed-by: Ajay Gupta Signed-off-by: Wolfram Sang commit 1276be23fd53e1c4e752966d0eab42aa54a343da Author: Hsin-Yi Wang Date: Mon Jul 27 15:41:24 2020 +0800 arm64: dts: mt8173: elm: Fix nor_flash node property bus-width and non-removable is not used by the driver. max-frequency should be spi-max-frequency for flash node. Fixes: 689b937bedde ("arm64: dts: mediatek: add mt8173 elm and hana board") Reported-by: Nicolas Boichat Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20200727074124.3779237-1-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 36f0a5fc5284838c544218666c63ee8cfa46a9c3 Author: Frank Wunderlich Date: Mon Sep 7 09:05:17 2020 +0200 arm: dts: mt7623: add missing pause for switchport port6 of mt7530 switch (= cpu port 0) on bananapi-r2 misses pause option which causes rx drops on running iperf. Fixes: f4ff257cd160 ("arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board") Signed-off-by: Frank Wunderlich Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200907070517.51715-1-linux@fw-web.de Signed-off-by: Matthias Brugger commit 86d36a5e9c1b3c3aeb4b60d0f5f496d1162321f4 Author: Andy Shevchenko Date: Mon Jun 15 19:10:01 2020 +0300 i2c: ismt: Add support for Intel Emmitsburg PCH Add PCI ID for the Intel Emmitsburg PCH iSMT SMBus controller. Signed-off-by: Andy Shevchenko Reviewed-by: Seth Heasley Signed-off-by: Wolfram Sang commit 77dae8056a13158251d012a90abb0e076fc3c98a Author: Andy Shevchenko Date: Wed Jul 22 16:43:55 2020 +0300 i2c: ismt: Describe parameters in kernel doc Kernel doc validation script complains: CHECK .../drivers/i2c/busses/i2c-ismt.c .../i2c-ismt.c:182: warning: cannot understand function prototype: 'const struct pci_device_id ismt_ids[] = ' .../i2c-ismt.c:202: warning: Function parameter or member 'dev' not described in '__ismt_desc_dump' .../i2c-ismt.c:202: warning: Function parameter or member 'desc' not described in '__ismt_desc_dump' .../i2c-ismt.c:649: warning: cannot understand function prototype: 'const struct i2c_algorithm smbus_algorithm = ' Fix corresponding descriptions to make reader and kernel doc validator happy. Signed-off-by: Andy Shevchenko Reviewed-by: Seth Heasley Signed-off-by: Wolfram Sang commit 7eecca9daf9acafd8d3b910af52bd1453aa501da Author: Paul Cercueil Date: Fri Sep 4 15:11:52 2020 +0200 i2c: jz4780: Remove of_match_ptr() CONFIG_OF is selected by CONFIG_MACH_INGENIC, therefore we don't need to handle the case where Device Tree is not supported. Signed-off-by: Paul Cercueil Signed-off-by: Wolfram Sang commit 266fd91f2b2fb4efe50550298e8bb0692fb9477f Author: Paul Cercueil Date: Fri Sep 4 15:11:51 2020 +0200 i2c: jz4780: Add compatible string for JZ4770 SoC The I2C controller in the JZ4770 SoC seems to work the exact same as in the JZ4780 SoC. Signed-off-by: Paul Cercueil Signed-off-by: Wolfram Sang commit b74b33f5f7eb5e3cdc134b3f7fb3daa224415ffd Author: Paul Cercueil Date: Fri Sep 4 15:11:50 2020 +0200 dt-bindings: i2c: ingenic: Add compatible string for the JZ4770 The I2C controller in the JZ4770 SoC seems to work the exact same as in the JZ4780 SoC. We could use "ingenic,jz4780-i2c" as a fallback string in the Device Tree, but that would be awkward, since the JZ4780 is newer. Instead, add a "ingenic,jz4770-i2c" string and use it as fallback for the "ingenic,jz4780-i2c" string. Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 97c93e06f506107362f1630aa25ec3e3ae71d070 Author: Tom Rix Date: Fri Sep 4 11:06:47 2020 -0700 i2c: amd_mp2: handle num is 0 input for i2c_amd_xfer clang static analyzer reports this problem i2c-amd-mp2-plat.c:174:9: warning: Branch condition evaluates to a garbage value return err ? err : num; ^~~ err is not initialized, it depends on the being set in the transfer loop which will not happen if num is 0. Surveying other master_xfer() implementations show all handle a 0 num. Because returning 0 is expected, initialize err to 0. Signed-off-by: Tom Rix Acked-by: Elie Morisse Signed-off-by: Wolfram Sang commit 703b3228a8fffcadf4651fde527a1b68c693e3a1 Author: Krzysztof Kozlowski Date: Mon Sep 14 12:40:34 2020 +0200 i2c: stm32: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alain Volmat Signed-off-by: Wolfram Sang commit 27c90870e7018cd5b93991ca398444a9b0f74113 Author: Alain Volmat Date: Mon Sep 14 12:40:33 2020 +0200 i2c: stm32: fix error message on upon dma_request_chan & defer handling DMA usage is optional for the I2C driver. check for the -ENODEV error in order to avoid displaying an error when no DMA has been requested. Cleaning up the error messages during probe, remove the additional -EPROBE_DEFER within probe function since additional error message doesn't give much more information than what is already reported within the stm32_i2c_dma_request function. Signed-off-by: Alain Volmat Signed-off-by: Wolfram Sang commit 8ce98dd21fcfaab3b6177cfc167d6b6b71dc9fc1 Author: Wolfram Sang Date: Sat Sep 19 08:56:15 2020 +0200 misc: eeprom: use helper to get i2c_client from kobj Slightly easier to read. Signed-off-by: Wolfram Sang Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit b1d4dc15b2f430a4f541ab6c91e63a71cf230b7d Author: Tian Tao Date: Tue Sep 15 09:38:18 2020 +0800 i2c: Switch to using the new API kobj_to_dev() Switch to using the new API kobj_to_dev(). Signed-off-by: Tian Tao Signed-off-by: Wolfram Sang commit e2a8fa1e0faa5000c89a5af33d6c357e55c86014 Author: Krzysztof Kozlowski Date: Thu Sep 10 19:57:21 2020 +0200 arm64: dts: mediatek: fix tca6416 reset GPIOs in pumpkin Correct the property for reset GPIOs of tca6416 GPIO expander. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200910175733.11046-4-krzk@kernel.org Signed-off-by: Matthias Brugger commit 92fdb97d648a0120bc342342d199f5be119cfd67 Author: Tian Tao Date: Fri Sep 18 17:52:58 2020 +0800 drm/ttm: update kernel-doc line comments Update kernel-doc line comments to fix warnings reported by make W=1. drivers/gpu/drm/ttm/ttm_memory.c:271: warning: Function parameter or member 'glob' not described in 'ttm_shrink' drivers/gpu/drm/ttm/ttm_memory.c:271: warning: Function parameter or member 'from_wq' not described in 'ttm_shrink' drivers/gpu/drm/ttm/ttm_memory.c:271: warning: Function parameter or member 'extra' not described in 'ttm_shrink' drivers/gpu/drm/ttm/ttm_memory.c:271: warning: Function parameter or member 'ctx' not described in 'ttm_shrink' Signed-off-by: Tian Tao Reviewed-by: Christian König Acked-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/391317/ Signed-off-by: Christian König commit afcd0c7d3d4c22afc8befcfc906db6ce3058d3ee Author: Neil Armstrong Date: Wed Sep 16 17:01:47 2020 +0200 drm/panfrost: add Amlogic GPU integration quirks This adds the required GPU quirks, including the quirk in the PWR registers at the GPU reset time and the IOMMU quirk for shareability issues observed on G52 in Amlogic G12B SoCs. Signed-off-by: Neil Armstrong Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20200916150147.25753-4-narmstrong@baylibre.com commit 110003002291525bb209f47e6dbf121a63249a97 Author: Neil Armstrong Date: Wed Sep 16 17:01:46 2020 +0200 drm/panfrost: add amlogic reset quirk callback The T820, G31 & G52 GPUs integrated by Amlogic in the respective GXM, G12A/SM1 & G12B SoCs needs a quirk in the PWR registers at the GPU reset time. Since the Amlogic's integration of the GPU cores with the SoC is not publicly documented we do not know what does these values, but they permit having a fully functional GPU running with Panfrost. Signed-off-by: Neil Armstrong [Steven: Fix typo in commit log] Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20200916150147.25753-3-narmstrong@baylibre.com commit 91e89097b86f566636ea5a7329c79d5521be46d2 Author: Neil Armstrong Date: Wed Sep 16 17:01:45 2020 +0200 drm/panfrost: add support for vendor quirk The T820, G31 & G52 GPUs integrated by Amlogic in the respective GXM, G12A/SM1 & G12B SoCs needs a quirk in the PWR registers after each reset. This adds a callback in the device compatible struct of permit this. Signed-off-by: Neil Armstrong [Steven: Fix typo in commit log] Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20200916150147.25753-2-narmstrong@baylibre.com commit c4651f11d09ac975b6593653edbf74b892523a8f Author: Wolfram Sang Date: Thu Sep 10 11:11:18 2020 +0200 i2c: rcar: add HostNotify support The I2C core can now utilize a slave interface to handle SMBus HostNotify events. Enable it in this driver. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit a8335c64c5f0916c9ee8b88835ce114085c3642e Author: Wolfram Sang Date: Fri Sep 11 09:16:58 2020 +0200 i2c: add slave testunit driver Here is an I2C slave backend driver which allows to test some uncommon functionalities of the I2C and SMBus world. Usually, you need specific devices to test e.g. SMBus Host Notify and such. With this driver you just need the slave interface of another I2C controller. This initial version has testcases for multi-master and SMBus Host Notify. Already planned but not yet implemented are SMBus Alert and messages with I2C_M_RECV_LEN. Please read the documentation for further details. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 6b194ee986463ec7e6de7ccf3728ae4ede3b8d29 Author: Prashant Malani Date: Mon Sep 21 10:51:58 2020 +0200 platform/chrome: cros_ec_proto: Drop cros_ec_cmd_xfer() Since cros_ec_cmd_xfer_status() now returns Linux error codes and all other files use that command, remove the now-unused function cros_ec_cmd_xfer(). Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra commit 64b02e54e50fea8ebe0a2b2dc37ea096d0030cc5 Author: Prashant Malani Date: Mon Sep 21 10:51:58 2020 +0200 platform/chrome: cros_ec_proto: Update cros_ec_cmd_xfer() call-sites Since all the other call-sites of cros_ec_cmd_xfer() have been converted to use cros_ec_cmd_xfer_status() instead, update the remaining call-sites to prepare for the merge of cros_ec_cmd_xfer() into cros_ec_cmd_xfer_status(). As part of this update, change the error handling inside cros_ec_get_sensor_count() such that the legacy LPC interface is tried on all error values, not just when msg->result != EC_RESULT_SUCCESS. Note that there is a slight change in API in cros_ec_get_sensor_count(): it will return a negative number of sensors when there are no sensors on arm platform when MOTIONSENSE_CMD_DUMP is not supported (typical for sensorless chromebook) instead of 0. However, this is not a problem when probing the EC as we ignore errors only looking for cros_ec_get_sensor_count() returning a positive number of sensors. Signed-off-by: Prashant Malani Reviewed-by: Gwendal Grignou Tested-by: Gwendal Grignou Signed-off-by: Enric Balletbo i Serra commit a7d39439f8bd14b5becebc095aef3f1ec3191fe2 Author: Daniel Vetter Date: Fri Sep 18 15:25:05 2020 +0200 drm/dev: Remove drm_dev_init We can now also delete drm_dev_init, now that vkms, vgem and i915 selftests are resolved. Reviewed-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200918132505.2316382-5-daniel.vetter@ffwll.ch commit df2ce4596c04485fd77adcb18ec033d6c94da2dd Author: Luben Tuikov Date: Fri Sep 18 15:25:04 2020 +0200 drm/amdgpu: Convert to using devm_drm_dev_alloc() (v2) Convert to using devm_drm_dev_alloc(), as drm_dev_init() is going away. v2: Remove drm_dev_put() since a) devres doesn't do refcounting, see Documentation/driver-api/driver-model/devres.rst, Section 4, paragraph 1; and since b) devres acts as garbage collector when the DRM device's parent's devres "action" callback is called to free the container device (amdgpu_device), which embeds the DRM dev. Acked-by: Alex Deucher Signed-off-by: Luben Tuikov Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200918132505.2316382-4-daniel.vetter@ffwll.ch commit cd01269d11a352f06490a286227f3a50504248e5 Author: Daniel Vetter Date: Sat Sep 19 15:40:32 2020 +0200 drm/i915/selftests: align more to real device lifetimes To avoid having to create all the device and driver scaffolding we just manually create and destroy a devres_group. v2: Rebased v3: use devres_open/release_group so we can use devm without real hacks in the driver core or having to create an entire fake bus for testing drivers. Might want to extract this into helpers eventually, maybe as a mock_drm_dev_alloc or test_drm_dev_alloc. v4: - Fix IS_ERR handling (Matt) - Delete surplus put_device() in mock_device_release (intel-gfx-ci) v5: - do not switch to device_add - it breaks runtime pm in the tests and with the devres_group_add/release no longer needed for automatic cleanup (CI). Update commit message to match. - print correct error in pr_err (Matt) v6: Remove now unused err variable (CI). v7: More warning fixes ... Acked-by: Rodrigo Vivi Cc: Matthew Auld Reviewed-by: Maarten Lankhorst (v3) Cc: Maarten Lankhorst Reviewed-by: Matthew Auld (v4) Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200919134032.2488403-1-daniel.vetter@ffwll.ch commit 18d122c0287b29e70bc312a994c7ee79738cec77 Author: Arnd Bergmann Date: Fri Sep 18 11:56:19 2020 +0200 ALSA: compat_ioctl: avoid compat_alloc_user_space Using compat_alloc_user_space() tends to add complexity to the ioctl handling, so I am trying to remove it everywhere. The two callers in sound/core can rewritten to just call the same code that operates on a kernel pointer as the native handler. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200918095642.1446243-1-arnd@arndb.de Signed-off-by: Takashi Iwai commit 82be0d7540b1046d8950a180731b68371778f98e Author: Daniel Vetter Date: Fri Sep 18 15:25:02 2020 +0200 drm/i915/selftest: Create mock_destroy_device Just some prep work before we rework the lifetime handling, which requires replacing all the drm_dev_put in selftests by something else. v2: Don't go with a static inline, upsets the header tests and separation. Acked-by: Rodrigo Vivi Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200918132505.2316382-2-daniel.vetter@ffwll.ch commit 2b987515e1d18836d9df96a5876290c8c8208348 Author: Wang Qing Date: Thu Sep 17 15:55:52 2020 +0800 ALSA: asihpi: fix spellint typo in comments Change the comment typo: "ununsed" -> "unused". Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1600329372-2266-1-git-send-email-wangqing@vivo.com Signed-off-by: Takashi Iwai commit 86d6e5793e0fa3a510cff466894d0d3051fd716e Author: Liu Shixin Date: Mon Sep 21 16:24:37 2020 +0800 interconnect: imx: simplify the return expression of imx_icc_unregister Simplify the return expression. Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20200921082437.2591461-1-liushixin2@huawei.com Signed-off-by: Georgi Djakov commit 64fb587cfdc325e60903be85353c8a42219757b7 Author: Thomas Kopp Date: Fri Sep 18 19:25:36 2020 +0200 MAINTAINERS: Add reviewer entry for microchip mcp25xxfd SPI-CAN network driver This patch adds Thomas Kopp as a reviewer for the mcp25xxfd CAN driver. Signed-off-by: Thomas Kopp Link: https://lore.kernel.org/r/20200916101334.1277-1-thomas.kopp@microchip.com Signed-off-by: Marc Kleine-Budde commit 27cf93863cbcd08e49136d548ee44e8a7525a1c3 Author: Manivannan Sadhasivam Date: Fri Sep 18 19:25:35 2020 +0200 MAINTAINERS: Add entry for Microchip MCP25XXFD SPI-CAN network driver Add MAINTAINERS entry for Microchip MCP25XXFD SPI-CAN network driver. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200910133806.25077-7-manivannan.sadhasivam@linaro.org Signed-off-by: Marc Kleine-Budde commit 33ea42f69f194ee6f00761e14d0f9db9b1701c1e Author: Kurt Van Dijck Date: Fri Sep 18 19:25:34 2020 +0200 can: mcp25xxfd: add listen-only mode This commit enables listen-only mode, which works internally like CANFD mode. Signed-off-by: Kurt Van Dijck Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200918172536.2074504-5-mkl@pengutronix.de commit 55e5b97f003e85e66babb55f357627d52081a264 Author: Marc Kleine-Budde Date: Fri Sep 18 19:25:33 2020 +0200 can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN This patch adds support for the Microchip MCP25xxFD SPI CAN controller family. Tested-by: Kurt Van Dijck Tested-by: Manivannan Sadhasivam Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200918172536.2074504-4-mkl@pengutronix.de commit 875347fe57563693b29cafe24fdee72f0faf6434 Author: Marc Kleine-Budde Date: Fri Sep 18 19:25:32 2020 +0200 can: mcp25xxfd: add regmap infrastructure This patch adds the regmap infrastructure for the Microchip MCP25xxFD SPI CAN controller family. The actual driver is added in the next commit. Tested-by: Kurt Van Dijck Tested-by: Manivannan Sadhasivam Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200918172536.2074504-3-mkl@pengutronix.de commit 1b5a78e69c1fdae9aa8a62c45acb820639ccad87 Author: Oleksij Rempel Date: Fri Sep 18 19:25:31 2020 +0200 dt-binding: can: mcp25xxfd: document device tree bindings This patch adds the device-tree binding documentation for the Microchip MCP25xxFD SPI CAN controller family. Signed-off-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200918172536.2074504-2-mkl@pengutronix.de commit 728fc9ff73d3f25220f6b8a52aaf063ec51ef294 Author: Marc Kleine-Budde Date: Wed Sep 16 00:35:22 2020 +0200 can: rx-offload: can_rx_offload_add_manual(): add new initialization function This patch adds a new initialization function: can_rx_offload_add_manual() It should be used to add support rx-offload to a driver, if the callback mechanism should not be used. Use e.g. can_rx_offload_queue_sorted() to queue skbs into rx-offload. Link: https://lore.kernel.org/r/20200915223527.1417033-33-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit b2527eb271c81d0ba83446063f91c74a2df3718e Author: Zhang Changzhong Date: Fri Jul 17 16:01:15 2020 +0800 can: mscan: simplify clock enable/disable All the NULL checks are pointless, clk_*() routines already deal with NULL just fine. Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1594972875-27631-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Marc Kleine-Budde commit 01fb4254e1d480a1c91a53e7d35a9399f3e2ab53 Author: Wolfram Sang Date: Sat May 2 16:26:56 2020 +0200 can: mscan: mpc5xxx_can: update contact email The 'pengutronix' address is defunct for years. Use the proper contact address. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20200502142657.19199-1-wsa@kernel.org Signed-off-by: Marc Kleine-Budde commit e0e25001d088a4964abd2498e26dbf725ffab128 Author: Tim Harvey Date: Thu Jul 23 07:57:55 2020 -0700 can: mcp251x: add support for half duplex controllers Some SPI host controllers do not support full-duplex SPI and are marked as such via the SPI_CONTROLLER_HALF_DUPLEX controller flag. For such controllers use half duplex transactions but retain full duplex transactions for the controllers that can handle those. Signed-off-by: Tim Harvey Link: https://lore.kernel.org/r/1595516275-1179-1-git-send-email-tharvey@gateworks.com Signed-off-by: Marc Kleine-Budde commit 74fa565b63dc0811499918faa0bc1abce0869c96 Author: Andy Shevchenko Date: Mon Feb 17 18:10:38 2020 +0200 can: mcp251x: Use readx_poll_timeout() helper We may use special helper macro to poll IO till condition or timeout occurs. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200217161038.25009-1-andriy.shevchenko@linux.intel.com Signed-off-by: Marc Kleine-Budde commit 2d52dabbef60da91b72617519495fe77b621e6b8 Author: Timo Schlüßler Date: Fri Oct 11 15:38:21 2019 +0200 can: mcp251x: add GPIO support The mcp251x variants feature 3 general purpose digital inputs and 2 outputs. With this patch they are accessible through the gpio framework. Signed-off-by: Timo Schlüßler Tested-by: Timo Schlüßler Link: https://lore.kernel.org/r/20200915223527.1417033-28-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit cfc24a0aa7a1f263f9e4fd7d470b245a7a15df19 Author: Marc Kleine-Budde Date: Wed Sep 16 00:35:16 2020 +0200 can: mcp251x: sort include files alphabetically This patch sorts the include files alphabetically. Link: https://lore.kernel.org/r/20200915223527.1417033-27-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 864e48ebe93df485a9d9b6d6244ac629d8f25db4 Author: Marc Kleine-Budde Date: Wed Sep 16 00:35:15 2020 +0200 dt-bindings: can: mcp251x: document GPIO support The next patch adds gpio controller support to the mcp251x driver. This patch updates the binding accordingly. Cc: Timo Schlüßler Link: https://lore.kernel.org/r/20200915223527.1417033-26-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 14243910a8f6dd81cfe612c5d3ac466b4e41851c Author: Marc Kleine-Budde Date: Wed Sep 16 00:35:14 2020 +0200 dt-bindings: can: mcp251x: change example interrupt type to IRQ_TYPE_LEVEL_LOW The MCP2515 datasheet clearly describes a level-triggered interrupt pin. Change example bindings accordingly. Link: https://lore.kernel.org/r/20200915223527.1417033-25-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 2640aaa4f6bd251883eddb4722676661e0439303 Author: Marc Kleine-Budde Date: Wed Sep 16 00:35:13 2020 +0200 can: spi: Kconfig: remove unneeded dependencies form Kconfig symbols Since commits 653ee35ce6d5 ("can: hi311x: remove custom DMA mapped buffer") Fixes: df58525df395 ("can: mcp251x: remove custom DMA mapped buffer") both the hi3111x and the mcp251x driver don't make use of the DMA API any more. So we can safely remove the HAS_DMA dependency. While we're here, remove the unneeded CAN_DEV and SPI dependencies from the CAN_HI311X symbol, as the parent menus already have these dependencies. Link: https://lore.kernel.org/r/20200915223527.1417033-24-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit ea8b33bde76c8fcef347b9b9cf15649fe41a5a6e Author: Stephane Grosjean Date: Fri Dec 6 16:38:03 2019 +0100 can: pcan_usb: add support of rxerr/txerr counters This patch adds the support of the rx/tx errors CAN counters to the driver of the PCAN-USB PC-CAN interface from PEAK-System GmbH. The PCAN-USB is capable of giving back the values of the rx/tx errors counters, to provide more details and statistics to the linux-can layer. Getting these values allows the driver to better tune CAN_ERR_CRTL_TX_xxx and CAN_ERR_CRTL_RX_xxx bits in case of the interface enters any CAN_STATE_ERROR_xxx state. Signed-off-by: Stephane Grosjean Link: https://lore.kernel.org/r/20191206153803.17725-3-s.grosjean@peak-system.com Signed-off-by: Marc Kleine-Budde commit a8bb19dfab5a6420b07de7720545ac2277febe07 Author: Stephane Grosjean Date: Fri Dec 6 16:38:02 2019 +0100 can: pcan_usb: Document the commands sent to the device This patch documents the functions and numbers of the commands sent by the driver to the PCAN-USB CAN device from PEAK-System GmbH. Signed-off-by: Stephane Grosjean Link: https://lore.kernel.org/r/20191206153803.17725-2-s.grosjean@peak-system.com Signed-off-by: Marc Kleine-Budde commit 306df0b00b90c5786ca3c6310f4008bebd9fc6da Author: Vaibhav Gupta Date: Tue Jul 28 14:27:57 2020 +0530 can: pch_can: use generic power management Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions, as through the generic framework PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200728085757.888620-1-vaibhavgupta40@gmail.com Signed-off-by: Marc Kleine-Budde commit b060585d92cb0fe9c4f29ea412ea6b3da3ab136b Author: Wang Hai Date: Fri Sep 4 21:12:47 2020 +0800 can: peak_canfd: Remove unused macros CANFD_CLK_SEL_DIV_MASK and CANFD_OPTIONS_SET are never used after they were introduced. Remove them. Reported-by: Hulk Robot Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20200904131247.23021-1-wanghai38@huawei.com [mkl: keep CANFD_CLK_SEL_DIV_MASK for documentation purpose] Signed-off-by: Marc Kleine-Budde commit bd412492465c5d29f3e9de01c7efdcc0b3c7c69d Author: Liu Shixin Date: Mon Sep 14 12:17:44 2020 +0800 can: peak_usb: convert to use le32_add_cpu() Convert cpu_to_le32(le32_to_cpu(E1) + E2) to use le32_add_cpu(). Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20200914041744.3701840-1-liushixin2@huawei.com Signed-off-by: Marc Kleine-Budde commit 0cf38586c2162a67edd50c7c1f346a6b56718607 Author: Dejin Zheng Date: Mon Apr 20 21:22:07 2020 +0800 can: ti_hecc: convert to devm_platform_ioremap_resource_byname() Use the function devm_platform_ioremap_resource_byname() to simplify source code which calls the functions platform_get_resource_byname() and devm_ioremap_resource(). Remove also a few error messages which became unnecessary with this software refactoring. Signed-off-by: Dejin Zheng Link: https://lore.kernel.org/r/20200420132207.8536-1-zhengdejin5@gmail.com Signed-off-by: Marc Kleine-Budde commit 71ef9dfda730dac915f5fba8f4d47d337d47def6 Author: Marc Kleine-Budde Date: Wed Sep 16 00:35:06 2020 +0200 can: mscan: mark expected switch fall-through As -Wimplicit-fallthrough is now enabled the mscan driver shows this warning, which is fixed by this patch: drivers/net/can/mscan/mscan.c: In function ‘mscan_start_xmit’: drivers/net/can/mscan/mscan.c:211:3: warning: this statement may fall through [-Wimplicit-fallthrough=] 211 | netif_stop_queue(dev); | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/can/mscan/mscan.c:212:2: note: here 212 | case 2: | ^~~~ Link: https://lore.kernel.org/r/20200915223527.1417033-17-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 29f45adbb72701098fd52c635b054d2b401b6863 Author: Colin Ian King Date: Mon Jul 6 17:42:40 2020 +0100 can: mcba_usb: remove redundant initialization of 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 Link: https://lore.kernel.org/r/20200706164240.518623-1-colin.king@canonical.com Signed-off-by: Marc Kleine-Budde commit 9d23a9818cb146886eb089ddbaa06894d04c26aa Author: YueHaibing Date: Tue May 5 16:41:49 2020 +0800 can: c_can: Remove unused inline function commit 524369e2391f ("can: c_can: remove obsolete STRICT_FRAME_ORDERING Kconfig option") left behind this, remove it. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200505084149.23848-1-yuehaibing@huawei.com Signed-off-by: Marc Kleine-Budde commit 0719631a61df4472439c4c00edd256a402d5f506 Author: Marc Kleine-Budde Date: Wed Sep 16 00:35:03 2020 +0200 can: dev: can_bus_off(): print scheduling of restart if activated If a CAN device goes into bus-off and has automatic restart enabled, inform user that a automatic restart is scheduled after the configured delay. Link: https://lore.kernel.org/r/20200915223527.1417033-14-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit f81eb48b06fc619c10b47a1b0d5298f0f8bfa803 Author: Marc Kleine-Budde Date: Wed Sep 16 00:35:02 2020 +0200 can: dev: can_change_state(): print human readable state change messages In order to ease debugging let can_change_state() print the human readable state change messages. Also print the old and new state. Link: https://lore.kernel.org/r/20200915223527.1417033-13-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 80a71815d8cd1be6481ad16fad3167f095045a06 Author: Marc Kleine-Budde Date: Wed Sep 16 00:35:01 2020 +0200 can: dev: can_put_echo_skb(): propagate error in case of errors The function can_put_echo_skb() can fail for several reasons. It may fail due to OOM, but when it fails it's usually due to locking problems in the driver. In order to help developing and debugging of new drivers propagate error value in case of errors. Link: https://lore.kernel.org/r/20200915223527.1417033-12-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 87245f1f1183083b219eaa72861889dba84d128b Author: Marc Kleine-Budde Date: Wed Sep 16 00:35:00 2020 +0200 can: dev: can_put_echo_skb(): print number of echo_skb that is occupied This patch prints the number of the occupied echo_skb, to ease implementing and debugging of new drivers. Link: https://lore.kernel.org/r/20200915223527.1417033-11-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit d77cd7fefc0d288b362f3f17bb6fd6c073ef4217 Author: Masahiro Yamada Date: Fri Apr 3 16:37:41 2020 +0900 can: remove "WITH Linux-syscall-note" from SPDX tag of C files The "WITH Linux-syscall-note" exception is intended for UAPI headers. See LICENSES/exceptions/Linux-syscall-note Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200403073741.18352-1-masahiroy@kernel.org Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit f61e7bfa50c8895ef07007f09744af246fe4195c Author: Diego Elio Pettenò Date: Mon Apr 13 18:02:41 2020 +0100 can: softing: update dead link BerliOS has not been operating for more than five years. linux-can moved to GitHub. Signed-off-by: Diego Elio Pettenò Link: https://lore.kernel.org/r/20200413170241.13207-1-flameeyes@flameeyes.com [mkl: split into two patches - handle softing part here] Signed-off-by: Marc Kleine-Budde commit 1eb11012d48f958f0af09361efa912ee56e8978e Author: Diego Elio Pettenò Date: Mon Apr 13 18:02:41 2020 +0100 can: slcan: update dead link BerliOS has not been operating for more than five years. linux-can moved to GitHub. Signed-off-by: Diego Elio Pettenò Link: https://lore.kernel.org/r/20200413170241.13207-1-flameeyes@flameeyes.com [mkl: split into two patches - handle slcan part here] Signed-off-by: Marc Kleine-Budde commit 6a54dde843f7fa1c2c372f77940cfb0c81782845 Author: Marc Kleine-Budde Date: Wed Sep 16 00:34:56 2020 +0200 can: raw: fix indention This patch fixes the indention to follow kernel coding style. Link: https://lore.kernel.org/r/20200915223527.1417033-7-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 88bfb9a713563550b1febb1a89b3a192efe2d091 Author: Marc Kleine-Budde Date: Wed Sep 16 00:34:55 2020 +0200 can: drivers: fix spelling mistakes This patch fixes spelling erros found by "codespell" in the drivers/net/can subtree. Link: https://lore.kernel.org/r/20200915223527.1417033-6-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 0436ea360eba4bae7a26458abea1e22b405fd07b Author: Marc Kleine-Budde Date: Wed Sep 16 00:34:54 2020 +0200 can: net: fix spelling mistakes This patch fixes spelling erros found by "codespell" in the net/can subtree. Link: https://lore.kernel.org/r/20200915223527.1417033-5-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 49347755a84052fd1317c3897c7cea954c8f89fe Author: Marc Kleine-Budde Date: Wed Sep 16 00:34:53 2020 +0200 can: include: fix spelling mistakes This patch fixes spelling erros found by "codespell" in the include/linux/can subtree. Link: https://lore.kernel.org/r/20200915223527.1417033-4-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 6850863999334748f5c5a16ff2dd1f06cd7c95ab Author: Alexandre Belloni Date: Fri Feb 14 15:17:51 2020 +0100 can: flexcan: fix spelling mistake "reserverd" -> "reserved" Fix a mistake in a register layout description. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200214141751.21168-1-alexandre.belloni@bootlin.com Signed-off-by: Marc Kleine-Budde commit 1006bf37353a3863ea20ef853d8a6849d3bdb839 Author: Colin Ian King Date: Thu Aug 6 11:56:16 2020 +0100 can: grcan: fix spelling mistake "buss" -> "bus" There is a spelling mistake in a netdev_err error message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200806105616.46790-1-colin.king@canonical.com Signed-off-by: Marc Kleine-Budde commit fa7a98eb47f4d0aa431994dfd5cf2d621771ebe5 Author: Krzysztof Kozlowski Date: Thu Sep 17 20:50:52 2020 +0200 arm64: dts: zynqmp-zcu100-revC: correct interrupt flags GPIO_ACTIVE_x flags are not correct in the context of interrupt flags. These are simple defines so they could be used in DTS but they will not have the same meaning: 1. GPIO_ACTIVE_HIGH = 0 = IRQ_TYPE_NONE 2. GPIO_ACTIVE_LOW = 1 = IRQ_TYPE_EDGE_RISING Correct the interrupt flags, assuming the author of the code wanted same logical behavior behind the name "ACTIVE_xxx", this is: ACTIVE_LOW => IRQ_TYPE_LEVEL_LOW Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200917185052.5084-1-krzk@kernel.org Signed-off-by: Michal Simek commit 33f16b25a091687388152d4b29593a39d819aa22 Merge: 23f87274f0ad4 ba4f184e126b7 Author: Greg Kroah-Hartman Date: Mon Sep 21 09:23:55 2020 +0200 Merge 5.9.0-rc6 into tty-next We need the tty/serial fixes in here and this resolves a merge issue in the 8250 driver. Signed-off-by: Greg Kroah-Hartman commit 629b9111535f2a2607bbea1599d285a25f32835d Merge: 673d74683627b ba4f184e126b7 Author: Greg Kroah-Hartman Date: Mon Sep 21 09:06:42 2020 +0200 Merge 5.0-rc6 into usb-next We want the USB fixes in here, and this resolves a merge issue in the uas driver. Signed-off-by: Greg Kroah-Hartman commit 5596c4c106baf3c915724dc0ae3ed293b4d1af55 Author: Vasily Gorbik Date: Fri Sep 18 19:04:36 2020 +0200 s390/sclp: remove unused sclp_early_printk_forced This reverts commit 55a5542a5462 ("s390/hibernate: fix error handling when suspend cpu != resume cpu"). It added sclp_early_printk_force() which is no longer used since commit 394216275c7d ("s390: remove broken hibernate / power management support"). No hibernate - no problem. Signed-off-by: Vasily Gorbik commit 14ab622432415326ab832441ec5d19003a3b1176 Author: Vasily Gorbik Date: Wed Sep 16 12:06:02 2020 +0200 s390/sclp: clean up unneeded .data section usage Since commit 980d5f9ab36b ("s390/boot: enable .bss section for compressed kernel") .bss section usage is no longer restricted. .bss section is a part of the decompressor's image and is zeroed by the linker. For that reason clean up now unneeded .data section usage. Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik commit bcf1650c9b826602ad860f4465a3b66be611508a Author: Vasily Gorbik Date: Wed Sep 16 12:02:49 2020 +0200 s390/boot: avoid unnecessary zeroing of .bss section .bss section is a part of the decompressor's image now, linker fills it with zeros already. No need do it with memset additionally. Reviewed-by: Alexander Egorenkov Signed-off-by: Vasily Gorbik commit dcca7a97c6bfff2a7a18b928a0b9bf215cc8f4f5 Author: Krzysztof Kozlowski Date: Sun Sep 20 19:32:38 2020 -0700 Add missing '#' to fix schema errors: $id: 'http://devicetree.org/schemas/soc/ti/ti,pruss.yaml' does not match 'http://devicetree.org/schemas/.*\\.yaml#' $schema: 'http://devicetree.org/meta-schemas/core.yaml' is not one of ['http://devicetree.org/meta-schemas/core.yaml#', 'http://devicetree.org/meta-schemas/base.yaml#'] Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml: ignoring, error in schema: $id Fixes: bd691ce0ba9d ("dt-bindings: soc: ti: Add TI PRUSS bindings") Acked-by: Suman Anna Signed-off-by: Krzysztof Kozlowski Signed-off-by: Santosh Shilimkar commit 74e0e43a09cea3189c12ad6a5444d313f45664ac Author: Qinglang Miao Date: Sun Sep 20 19:30:30 2020 -0700 soc: ti: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Signed-off-by: Santosh Shilimkar commit 3cec0369905d086a56a7515f3449982403057599 Author: Julia Lawall Date: Sun Sep 20 13:26:19 2020 +0200 RDS: drop double zeroing sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(*x),flags) ... sg_init_table(x,n) // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller commit d4ceb8de805ce46b9f3931ef58bdf0b5bdea8366 Author: Julia Lawall Date: Sun Sep 20 13:26:15 2020 +0200 dpaa2-eth: drop double zeroing sg_init_table zeroes its first argument, so the allocation of that argument doesn't have to. the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,n,flags; @@ x = - kcalloc + kmalloc_array (n,sizeof(struct scatterlist),flags) ... sg_init_table(x,n) // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller commit c3d6d0ce5ca0053a5f21d9e382cd6315858820c6 Merge: 098c2fc6d91d1 88525fc01cbe7 Author: David S. Miller Date: Sun Sep 20 19:01:34 2020 -0700 Merge branch 'DSA-with-VLAN-filtering-and-offloading-masters' Vladimir Oltean says: ==================== DSA with VLAN filtering and offloading masters This series attempts to make DSA VLANs work in the presence of a master interface that is: - filtering, so it drops VLANs that aren't explicitly added to its filter list - offloading, so the old assumptions in the tagging code about there being a VLAN tag in the skb are not necessarily true anymore. For more context: https://lore.kernel.org/netdev/20200910150738.mwhh2i6j2qgacqev@skbuf/ This probably marks the beginning of a series of patches in which DSA starts paying much more attention to its upper interfaces, not only for VLAN purposes but also for address filtering and for management of the CPU flooding domain. There was a comment from Florian on whether we could factor some of the mlxsw logic into some common functionality, but it doesn't look so. This seems bound to be open-coded, but frankly there isn't a lot to it. Changes in v2: Applied Florian's cosmetic suggestion in patch 4/9. ==================== Signed-off-by: David S. Miller commit 88525fc01cbe70052c4687c1ce29fd08f5c8fcbe Author: Vladimir Oltean Date: Mon Sep 21 03:10:31 2020 +0300 net: dsa: tag_sja1105: add compatibility with hwaccel VLAN tags Check whether there is any hwaccel VLAN tag on RX, and if there is, treat it as the tag_8021q header. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit bbed0bbdddaf46260aeb1a8910a3b32941e321a2 Author: Vladimir Oltean Date: Mon Sep 21 03:10:30 2020 +0300 net: dsa: tag_8021q: add VLANs to the master interface too The whole purpose of tag_8021q is to send VLAN-tagged traffic to the CPU, from which the driver can decode the source port and switch id. Currently this only works if the VLAN filtering on the master is disabled. Change that by explicitly adding code to tag_8021q.c to add the VLANs corresponding to the tags to the filter of the master interface. Because we now need to call vlan_vid_add, then we also need to hold the RTNL mutex. Propagate that requirement to the callers of dsa_8021q_setup and modify the existing call sites as appropriate. Note that one call path, sja1105_best_effort_vlan_filtering_set -> sja1105_vlan_filtering -> sja1105_setup_8021q_tagging, was already holding this lock. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 2209158c9055dbc937673ec09c032505667d839e Author: Vladimir Oltean Date: Mon Sep 21 03:10:29 2020 +0300 net: dsa: install VLANs into the master's RX filter too Most DSA switch tags shift the EtherType to the right, causing the master to not parse the VLAN as VLAN. However, not all switches do that (example: tail tags, tag_8021q etc), and if the DSA master has "rx-vlan-filter: on" in ethtool -k, then we have a problem. Therefore, we could populate the VLAN table of the master, just in case (for some switches it will not make a difference), so that network I/O can work even with a VLAN filtering master. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit adb256eb1769dec74b809690f418e8e46bee62a7 Author: Vladimir Oltean Date: Mon Sep 21 03:10:28 2020 +0300 net: dsa: allow 8021q uppers while the bridge has vlan_filtering=0 When the bridge has VLAN awareness disabled there isn't any duplication of functionality, since the bridge does not process VLAN. Don't deny adding 8021q uppers to DSA switch ports in that case. The switch is supposed to simply pass traffic leaving the VLAN tag as-is, and the stack will happily strip the VLAN tag for all 8021q uppers that exist. We need to ensure that there are no 8021q uppers when the user attempts to enable bridge vlan_filtering. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 707ec383b369b8da9f009c3ab2236b335ec10788 Author: Vladimir Oltean Date: Mon Sep 21 03:10:27 2020 +0300 net: dsa: refuse configuration in prepare phase of dsa_port_vlan_filtering() The current logic beats me a little bit. The comment that "bridge skips -EOPNOTSUPP, so skip the prepare phase" was introduced in commit fb2dabad69f0 ("net: dsa: support VLAN filtering switchdev attr"). I'm not sure: (a) ok, the bridge skips -EOPNOTSUPP, but, so what, where are we returning -EOPNOTSUPP? (b) even if we are, and I'm just not seeing it, what is the causality relationship between the bridge skipping -EOPNOTSUPP and DSA skipping the prepare phase, and just returning zero? One thing is certain beyond doubt though, and that is that DSA currently refuses VLAN filtering from the "commit" phase instead of "prepare", and that this is not a good thing: ip link add br0 type bridge ip link add br1 type bridge vlan_filtering 1 ip link set swp2 master br0 ip link set swp3 master br1 [ 3790.379389] 001: sja1105 spi0.1: VLAN filtering is a global setting [ 3790.379399] 001: ------------[ cut here ]------------ [ 3790.379403] 001: WARNING: CPU: 1 PID: 515 at net/switchdev/switchdev.c:157 switchdev_port_attr_set_now+0x9c/0xa4 [ 3790.379420] 001: swp3: Commit of attribute (id=6) failed. [ 3790.379533] 001: [] (switchdev_port_attr_set_now) from [] (nbp_vlan_init+0x84/0x148) [ 3790.379544] 001: [] (nbp_vlan_init) from [] (br_add_if+0x514/0x670) [ 3790.379554] 001: [] (br_add_if) from [] (do_setlink+0x38c/0xab0) [ 3790.379565] 001: [] (do_setlink) from [] (__rtnl_newlink+0x44c/0x748) [ 3790.379573] 001: [] (__rtnl_newlink) from [] (rtnl_newlink+0x44/0x60) [ 3790.379580] 001: [] (rtnl_newlink) from [] (rtnetlink_rcv_msg+0x124/0x2f8) [ 3790.379590] 001: [] (rtnetlink_rcv_msg) from [] (netlink_rcv_skb+0xb8/0x110) [ 3790.379806] 001: ---[ end trace 0000000000000002 ]--- [ 3790.379819] 001: sja1105 spi0.1 swp3: failed to initialize vlan filtering on this port So move the current logic that may fail (except ds->ops->port_vlan_filtering, that is way harder) into the prepare stage of the switchdev transaction. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 1ce39f0ee8da0b2d8b5f30bcc9180b8f0148353f Author: Vladimir Oltean Date: Mon Sep 21 03:10:26 2020 +0300 net: dsa: convert denying bridge VLAN with existing 8021q upper to PRECHANGEUPPER This is checking for the following order of operations, and makes sure to deny that configuration: ip link add link swp2 name swp2.100 type vlan id 100 ip link add br0 type bridge vlan_filtering 1 ip link set swp2 master br0 bridge vlan add dev swp2 vid 100 Instead of using vlan_for_each(), which looks at the VLAN filters installed with vlan_vid_add(), just track the 8021q uppers. This has the advantage of freeing up the vlan_vid_add() call for actual VLAN filtering. There is another change in this patch. The check is moved in slave.c, from switch.c. I don't think it makes sense to have this 8021q upper check for each switch port that gets notified of that VLAN addition (these include DSA links and CPU ports, we know those can't have 8021q uppers because they don't have a net_device registered for them), so just do it in slave.c, for that one slave interface. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 2b13840672340e1698aa0913a088c9dac7df82f7 Author: Vladimir Oltean Date: Mon Sep 21 03:10:25 2020 +0300 net: dsa: convert check for 802.1Q upper when bridged into PRECHANGEUPPER DSA tries to prevent having a VLAN added by a bridge and by an 802.1Q upper at the same time. It does that by checking the VID in .ndo_vlan_rx_add_vid(), since that's something that the 8021q module calls, via vlan_vid_add(). When a VLAN matches in both subsystems, this check returns -EBUSY. However the vlan_vid_add() function isn't specific to the 8021q module in any way at all. It is simply the kernel's way to tell an interface to add a VLAN to its RX filter and not drop that VLAN. So there's no reason to return -EBUSY when somebody tries to call vlan_vid_add() for a VLAN that was installed by the bridge. The proper behavior is to accept that configuration. So what's wrong is how DSA checks that it has an 8021q upper. It should look at the actual uppers for that, not just assume that the 8021q module was somewhere in the call stack of .ndo_vlan_rx_add_vid(). Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit eb46e8da1d2c52963718697d90cc8cddb73425dd Author: Vladimir Oltean Date: Mon Sep 21 03:10:24 2020 +0300 net: dsa: rename dsa_slave_upper_vlan_check to something more suggestive We'll be adding a new check in the PRECHANGEUPPER notifier, where we'll need to check some VLAN uppers. It is hard to do that when there is already a function named dsa_slave_upper_vlan_check. So rename this one. Not to mention that this function probably shouldn't have started with "dsa_slave_" in the first place, since the struct net_device argument isn't a DSA slave, but an 8021q upper of one. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8350129930d2d74426b03d2d59d121156c204531 Author: Vladimir Oltean Date: Mon Sep 21 03:10:23 2020 +0300 net: dsa: deny enslaving 802.1Q upper to VLAN-aware bridge from PRECHANGEUPPER There doesn't seem to be any strong technical reason for doing it this way, but we'll be adding more checks for invalid upper device configurations, and it will be easier to have them all grouped under PRECHANGEUPPER. Tested that it still works: ip link set br0 type bridge vlan_filtering 1 ip link add link swp2 name swp2.100 type vlan id 100 ip link set swp2.100 master br0 [ 20.321312] br0: port 5(swp2.100) entered blocking state [ 20.326711] br0: port 5(swp2.100) entered disabled state Error: dsa_core: Cannot enslave VLAN device into VLAN aware bridge. [ 20.346549] br0: port 5(swp2.100) entered blocking state [ 20.351957] br0: port 5(swp2.100) entered disabled state Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 231a474dd2b1fbd47671ca1f56fa221d9b0e72cb Author: Krzysztof Kozlowski Date: Wed Aug 26 16:55:13 2020 +0200 drm/exynos: hdmi: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae commit 73bb394cb969ba11d612cc0bc05b375bd599a28c Author: Krzysztof Kozlowski Date: Wed Aug 26 16:55:12 2020 +0200 drm/exynos: dsi: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae commit 098c2fc6d91d11bfa0d0b7db0b1b0a5a19a80867 Author: Zhang Changzhong Date: Sat Sep 19 10:26:51 2020 +0800 net: mventa: remove unused variable 'dummy' in mvneta_mib_counters_clear() Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/marvell/mvneta.c:754:6: warning: variable 'dummy' set but not used [-Wunused-but-set-variable] 754 | u32 dummy; | ^~~~~ This variable is not used in function mvneta_mib_counters_clear(), so remove it to avoid build warning. Signed-off-by: Zhang Changzhong Signed-off-by: David S. Miller commit 1f14bd99e6d393f55ca5f62dcf7bed0152ec4db6 Author: Yunsheng Lin Date: Sat Sep 19 10:24:47 2020 +0800 net: remove unnecessary NULL checking in napi_consume_skb() When budget is non-zero, skb_unref() has already handled the NULL checking. When budget is zero, the dev_consume_skb_any() has handled NULL checking in __dev_kfree_skb_irq(), or dev_kfree_skb() which also ultimately call skb_unref(). So remove the unnecessary checking in napi_consume_skb(). Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 5273144116d10f66c206a068266584cc60a526ac Author: Lorenzo Bianconi Date: Sat Sep 19 02:03:26 2020 +0200 net: mvneta: avoid copying shared_info frags in mvneta_swbm_build_skb Avoid copying skb_shared_info frags array in mvneta_swbm_build_skb() since __build_skb_around() does not overwrite it Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 3dfe8dde093a07e82fa472c0f8c29a7f6a2006a5 Author: Linus Walleij Date: Sat Sep 19 00:29:54 2020 +0200 net: dsa: rtl8366: Skip PVID setting if not requested We go to lengths to determine whether the PVID should be set for this port or not, and then fail to take it into account. Fix this oversight. Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Signed-off-by: Linus Walleij Signed-off-by: David S. Miller commit ca9b38e6d671616e95bdf247cf5ded269e3f3fb9 Author: Georgi Djakov Date: Wed Sep 16 14:07:06 2020 +0300 drm/msm: Remove depends on interconnect The dependency on interconnect in the Kconfig was introduced to avoid the case of interconnect=m and driver=y, but the interconnect framework has been converted from tristate to bool now. Remove the dependency as the framework can't be a module anymore. Signed-off-by: Georgi Djakov Signed-off-by: Rob Clark commit e9ba8d550dd1e28870a0bdc7c11af026c2a94702 Author: Jordan Crouse Date: Tue Sep 15 10:35:51 2020 -0600 drm/msm: Fix the a650 hw_apriv check Commit 604234f33658 ("drm/msm: Enable expanded apriv support for a650") was checking the result of adreno_is_a650() before the gpu revision got probed in adreno_gpu_init() so it was always coming across as false. Snoop into the revision ID ahead of time to correctly set the hw_apriv flag so that it can be used by msm_gpu to properly setup global buffers. Fixes: 604234f33658 ("drm/msm: Enable expanded apriv support for a650") Reported-by: Jonathan Marek Signed-off-by: Jordan Crouse Tested-by: Jonathan Marek Signed-off-by: Rob Clark commit 710a040a4dd7ff0e0b8df007c885e7f916a7b099 Author: Stephen Boyd Date: Thu Sep 17 15:44:25 2020 -0700 drm/msm/dp: Sleep properly in dp_hpd_handler kthread We shouldn't be waiting for an event here with a timeout of 100ms when we're not in the 'timeout' arm of the if condition. Instead we should be sleeping in the interruptible state (S) until something happens and we need to wakeup. Right now this kthread is running almost all the time because it sleeps for 100ms, wakes up, sees there's nothing to do, and then starts the process all over again. Looking at top it shows up in the D state (uninterruptible) because it uses wait_event_timeout(). FIx this up. Cc: Tanmay Shah Cc: Kuogee Hsieh Reported-by: Douglas Anderson Fixes: 8ede2ecc3e5e ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets") Signed-off-by: Stephen Boyd Reviewed-by: Kuogee Hsieh Signed-off-by: Rob Clark commit 94ca85733699e09c691e63c5bc2475f92f9dd52a Author: Qinglang Miao Date: Thu Sep 17 20:51:13 2020 +0800 memory: emif: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Along with this change, we get additionally: .owner = THIS_MODULE, .llseek = seq_lseek, 1. The llseek method is used to change the current read/write position in a file which can be ignored if you don't use it. 2. The owner is not even a method. Instead, it is a pointer to the module that “owns” this structure; it is used by the kernel to maintain the module's usage count which can be ignored. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200917125113.103550-1-miaoqinglang@huawei.com Signed-off-by: Krzysztof Kozlowski commit 67a344e889669690906324f09ffd07fb02a76889 Author: Qinglang Miao Date: Thu Sep 17 20:51:14 2020 +0800 memory: tegra: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200917125114.103598-1-miaoqinglang@huawei.com Signed-off-by: Krzysztof Kozlowski commit 673d74683627bc78eaca1fdbe24b6cf45c5c8d84 Author: Li Jun Date: Fri Sep 18 16:17:52 2020 +0300 usb: xhci: add debugfs support for ep with stream To show the trb ring of streams, use the exsiting ring files of bulk ep to show trb ring of one specific stream ID, which stream ID's trb ring will be shown, is controlled by a new debugfs file stream_id, this is to avoid to create a large number of dir for every allocate stream IDs, another debugfs file stream_context_array is created to show all the allocated stream context array entries. Signed-off-by: Li Jun Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200918131752.16488-11-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 167657a1bb5fcde53ac304ce6c564bd90a2f9185 Author: Mathias Nyman Date: Fri Sep 18 16:17:51 2020 +0300 xhci: don't create endpoint debugfs entry before ring buffer is set. Make sure xHC completes the configure endpoint command and xhci driver sets the ring pointers correctly before we create the user readable debugfs file. In theory there was a small gap where a user could have read the debugfs file and cause a NULL pointer dereference error as ring pointer was not yet set, in practise we want this change to simplify the upcoming streams debugfs support. Fixes: 02b6fdc2a153 ("usb: xhci: Add debugfs interface for xHCI driver") Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200918131752.16488-10-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit edc649a8234118f80869ca860a0048821a4898e6 Author: Mathias Nyman Date: Fri Sep 18 16:17:50 2020 +0300 xhci: Tune interrupt blocking for isochronous transfers controllers with XHCI_AVOID_BEI quirk cause too frequent interrupts and affect power management. To avoid interrupting on every isochronous interval the BEI (Block Event Interrupt) flag is set for all except the last Isoch TRB in a URB. This lead to event ring filling up in case several isoc URB were queued and cancelled rapidly, which some controllers didn't handle well, and thus the XHCI_AVOID_BEI quirk was introduced. see commit 227a4fd801c8 ("usb: xhci: apply XHCI_AVOID_BEI quirk to all Intel xHCI controllers") With the XHCI_AVOID_BEI quirk each Isoch TRB will trigger an interrupt. This can cause up to 8000 interrupts per second for isochronous transfers with HD USB3 cameras, affecting power saving. The event ring fits 256 events, instead of interrupting on every isochronous TRB if XHCI_AVOID_BEI is set we make sure at least every 8th Isochronous TRB asserts an interrupt, clearing the event ring. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200918131752.16488-9-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 18a367e8947d72dd91b6fc401e88a2952c6363f7 Author: Peter Chen Date: Fri Sep 18 16:17:49 2020 +0300 usb: xhci: omit duplicate actions when suspending a runtime suspended host. If the xhci-plat.c is the platform driver, after the runtime pm is enabled, the xhci_suspend is called if nothing is connected on the port. When the system goes to suspend, it will call xhci_suspend again if USB wakeup is enabled. Since the runtime suspend wakeup setting is not always the same as system suspend wakeup setting, eg, at runtime suspend we always need wakeup if the controller is in low power mode; but at system suspend, we may not need wakeup. So, we move the judgement after changing wakeup setting. [commit message rewording -Mathias] Reviewed-by: Jun Li Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200918131752.16488-8-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9cdda28d3278e4fd6105dcccdab8985eca2f42ff Author: Peter Chen Date: Fri Sep 18 16:17:48 2020 +0300 usb: host: xhci-plat: improve the comments for xhci_plat_suspend To reflect the current code status. Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200918131752.16488-7-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 4bb4fc0dbfa23acab9b762949b91ffd52106fe4b Author: Peter Chen Date: Fri Sep 18 16:17:47 2020 +0300 usb: host: xhci-plat: add wakeup entry at sysfs With this change, there will be a wakeup entry at /sys/../power/wakeup, and the user could use this entry to choose whether enable xhci wakeup features (wake up system from suspend) or not. Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200918131752.16488-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f768e718911e03a4a20b65f984eaa9b09045e4cd Author: Peter Chen Date: Fri Sep 18 16:17:46 2020 +0300 usb: host: xhci-plat: add priv quirk for skip PHY initialization Some DRD controllers (eg, dwc3 & cdns3) have PHY management at their own driver to cover both device and host mode, so add one priv quirk for such users to skip PHY management from HCD core. Reviewed-by: Jun Li Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200918131752.16488-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 93cb8f13be872bc2895a97a42a666201e68b2a1d Author: Peter Chen Date: Fri Sep 18 16:17:45 2020 +0300 usb: host: xhci-plat: delete the unnecessary code The if {} condition is duplicated with outer if {} condition. Reviewed-by: Jun Li Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200918131752.16488-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5e0e54ff89248776739bdf08e5bf6c64f2ac4185 Author: Peter Chen Date: Fri Sep 18 16:17:44 2020 +0300 usb: host: xhci-plat: add .suspend_quirk for struct xhci_plat_priv Some platforms (eg cdns3) may have special sequences between xhci_bus_suspend and xhci_suspend, add .suspend_quick for it. Reviewed-by: Jun Li Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200918131752.16488-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 46034a999c07fff750deb44d1bf5161e8c63646e Author: Peter Chen Date: Fri Sep 18 16:17:43 2020 +0300 usb: host: xhci-plat: add platform data support Some xhci hosts (eg dwc3 and cdns3) do not use OF to create platform device, they create xhci-plat platform device runtime. And these platforms may also have quirks, and the quirks could be supplied by their parent device through platform data. Reviewed-by: Jun Li Signed-off-by: Peter Chen Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200918131752.16488-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 93b61540dfa56b2385ec188a29615e062cd571be Author: Greg Kroah-Hartman Date: Sun Sep 20 16:00:19 2020 +0200 Revert "staging: rtl8192e: fix kconfig dependency warning for RTLLIB_CRYPTO_WEP" This reverts commit 02c4260713d62eff0875ca4a47019cd56371ffa7 as it conflicts with a change and fix coming in through the crypto tree as reported by Stephen and Herbert. Cc: Necip Fazil Yildiran Fixes: 02c4260713d6 ("staging: rtl8192e: fix kconfig dependency warning for RTLLIB_CRYPTO_WEP") Reported-by: Stephen Rothwell Reported-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman commit a0a94cc7b0bc05b7ec3cb13f062fde96476e3ccd Author: Greg Kroah-Hartman Date: Sun Sep 20 15:58:39 2020 +0200 Revert "staging: rtl8192e: fix kconfig dependency warning for RTLLIB_CRYPTO_TKIP" This reverts commit 243d040a6e4ae95408e133269dd72be2ba03dd48 as it conflicts with a change and fix coming in through the crypto tree as reported by Stephen and Herbert. Cc: Necip Fazil Yildiran Fixes: 243d040a6e4a ("staging: rtl8192e: fix kconfig dependency warning for RTLLIB_CRYPTO_TKIP") Reported-by: Stephen Rothwell Reported-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman commit a46b7ed4d52d09bd6c7ab53b2217d04fc2f02c65 Author: Sonny Sasaka Date: Fri Aug 14 12:09:09 2020 -0700 Bluetooth: Fix auto-creation of hci_conn at Conn Complete event Currently the code auto-creates hci_conn only if the remote address has been discovered before. This may not be the case. For example, the remote device may trigger connection after reboot at already-paired state so there is no inquiry result found, but it is still correct to create the hci_conn when Connection Complete event is received. A better guard is to check against bredr allowlist. Devices in the allowlist have been given permission to auto-connect. Fixes: 4f40afc6c764 ("Bluetooth: Handle BR/EDR devices during suspend") Signed-off-by: Sonny Sasaka Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit e99f38b81107c572392c3c6b859d063344afd865 Author: Rocky Liao Date: Thu Sep 17 21:09:23 2020 +0800 Bluetooth: btusb: Enable wide band speech support for BTUSB_QCA_ROME QCA Rome supports wide band speech, this patch enables the wide band speech support by set the BTUSB_WIDEBAND_SPEECH flag. Signed-off-by: Rocky Liao Signed-off-by: Marcel Holtmann commit 291f0c550f43c7b1c985738208d8ca1c6808dc4f Author: Howard Chung Date: Fri Sep 18 11:11:49 2020 +0800 Bluetooth: Set scan parameters for ADV Monitor Set scan parameters when there is at least one Advertisement monitor. Signed-off-by: Howard Chung Reviewed-by: Alain Michaud Reviewed-by: Manish Mandlik Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou Signed-off-by: Marcel Holtmann commit c88e397968e3ada66041527222a648485f51ac54 Author: Miao-chen Chou Date: Fri Sep 18 11:11:48 2020 +0800 Bluetooth: Update Adv monitor count upon removal This fixes the count of Adv monitor upon monitor removal. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-remove command on one console and observe a MGMT_EV_ADV_MONITOR_REMOVED event on the other. Signed-off-by: Miao-chen Chou Signed-off-by: Howard Chung Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann commit dd92f1798981a9d7241d788dd478aea3460b09a1 Merge: 09599729ee1ae 9ef7e18ba52b4 Author: David S. Miller Date: Sat Sep 19 16:54:35 2020 -0700 Merge branch '100base-Fx-link-modes' Dan Murphy says: ==================== 100base Fx link modes As per patch https://lore.kernel.org/patchwork/patch/1300241/ the link modes for 100base FX full and half duplex modes did not exist. Adding these link modes to the core and ethtool allow devices like the DP83822, DP83869 and Broadcomm PHYs to properly advertise the correct mode for Fiber 100Mbps. Corresponding user land ethtool patches are available but rely on these patches to be applied first. ==================== Signed-off-by: David S. Miller commit 9ef7e18ba52b4970934bed24589cff0c8be50c83 Author: Dan Murphy Date: Fri Sep 18 14:14:53 2020 -0500 net: phy: dp83822: Update the fiber advertisement for speed Update the fiber advertisement for speed and duplex modes with the 100base-FX full and half linkmode entries. Signed-off-by: Dan Murphy Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a29de52ba2a156873505d8b8cef44e69925b8114 Author: Dan Murphy Date: Fri Sep 18 14:14:52 2020 -0500 net: dp83869: Add ability to advertise Fiber connection Add the ability to advertise the Fiber connection if the strap or the op-mode is configured for 100Base-FX. Auto negotiation is not supported on this PHY when in fiber mode. Signed-off-by: Dan Murphy Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 55f13311785cebd60b9bab9ca7fd64205436c462 Author: Dan Murphy Date: Fri Sep 18 14:14:51 2020 -0500 ethtool: Add 100base-FX link mode entries Add entries for the 100base-FX full and half duplex supported modes. $ ethtool eth0 Supported ports: [ FIBRE ] Supported link modes: 100baseFX/Half 100baseFX/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: No Supported FEC modes: Not reported Advertised link modes: 100baseFX/Half 100baseFX/Full Advertised pause frame use: No Advertised auto-negotiation: No Advertised FEC modes: Not reported Speed: 100Mb/s Duplex: Full Auto-negotiation: off Port: MII PHYAD: 1 Transceiver: external Supports Wake-on: gs Wake-on: d SecureOn password: 00:00:00:00:00:00 Current message level: 0x00000000 (0) Link detected: yes Signed-off-by: Dan Murphy Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 09599729ee1ae9c418c0bd0fd48efff8a98d1c4d Author: Xie He Date: Fri Sep 18 06:56:16 2020 -0700 net/packet: Fix a comment about network_header skb->nh.raw has been renamed as skb->network_header in 2007, in commit b0e380b1d8a8 ("[SK_BUFF]: unions of just one member don't get anything done, kill them") So here we change it to the new name. Cc: Willem de Bruijn Signed-off-by: Xie He Signed-off-by: David S. Miller commit a78766d9375bcf1460450047c7565f1c9cd42614 Author: Jason Yan Date: Sat Sep 19 15:46:17 2020 +0800 net: ethernet: ti: cpsw: use true,false for bool variables This addresses the following coccinelle warning: drivers/net/ethernet/ti/cpsw.c:1599:2-17: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/ti/cpsw.c:1300:2-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: David S. Miller commit 65dc8e12f158e24eee79a754751f56e603eaa5f2 Author: Jason Yan Date: Sat Sep 19 15:46:09 2020 +0800 8139too: use true,false for bool variables This addresses the following coccinelle warning: drivers/net/ethernet/realtek/8139too.c:981:2-8: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: David S. Miller commit f3a3f346742b8439d76cb67191a41f2debaf6d4d Author: Jason Yan Date: Sat Sep 19 15:45:56 2020 +0800 bnx2x: use true,false for bool variables This addresses the following coccinelle warning: drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:15415:1-26: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:12393:2-17: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:15497:2-27: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: David S. Miller commit 889bafe91b84398221b9a1b48c26b06fd8fef2af Author: Jason Yan Date: Sat Sep 19 15:45:43 2020 +0800 net: qed: use true,false for bool variables This addresses the following coccinelle warning: drivers/net/ethernet/qlogic/qed/qed_rdma.c:1465:2-13: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/qlogic/qed/qed_rdma.c:1468:2-14: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/qlogic/qed/qed_rdma.c:1471:2-13: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/qlogic/qed/qed_rdma.c:1472:2-14: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: David S. Miller commit ebe65334abc89bcccc0d574e9957752ed910c52e Author: Jason Yan Date: Sat Sep 19 15:45:27 2020 +0800 net: b44: use true,false for bool variables This addresses the following coccinelle warning: drivers/net/ethernet/broadcom/b44.c:2213:6-20: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/b44.c:2218:2-16: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/b44.c:2226:3-17: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/b44.c:2230:3-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: David S. Miller commit bf2977ae01f5477401160f4ca69f66859127fb7d Author: Zheng Yongjun Date: Sat Sep 19 10:32:35 2020 +0800 net: micrel: Remove set but not used variable Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/micrel/ksz884x.c: In function rx_proc: drivers/net/ethernet/micrel/ksz884x.c:4981:6: warning: variable ‘rx_status’ set but not used [-Wunused-but-set-variable] drivers/net/ethernet/micrel/ksz884x.c: In function netdev_get_ethtool_stats: drivers/net/ethernet/micrel/ksz884x.c:6512:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] these variable is never used, so remove it. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit f9d80a09be9a8a1c7f81f5404d05f4c3f192c7dd Author: Zheng Yongjun Date: Sat Sep 19 09:50:20 2020 +0800 net: e1000: Remove set but not used variable Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/intel/e1000/e1000_hw.c: In function e1000_phy_init_script: drivers/net/ethernet/intel/e1000/e1000_hw.c:132:6: warning: variable ‘ret_val’ set but not used [-Wunused-but-set-variable] `ret_val` is never used, so remove it. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 47dae52b0096ee26cc834c922007aa72aab63dc6 Author: Zheng Yongjun Date: Sat Sep 19 09:31:23 2020 +0800 net: liquidio: Remove set but not used variable Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/cavium/liquidio/octeon_device.c: In function lio_pci_readq: drivers/net/ethernet/cavium/liquidio/octeon_device.c:1327:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable] drivers/net/ethernet/cavium/liquidio/octeon_device.c: In function lio_pci_writeq: drivers/net/ethernet/cavium/liquidio/octeon_device.c:1358:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable] these variable is never used, so remove it. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit e1ebb2b49048c4767cfa0d8466f9c701e549fa5e Author: Krish Sadhukhan Date: Thu Sep 17 21:20:38 2020 +0000 KVM: SVM: Don't flush cache if hardware enforces cache coherency across encryption domains In some hardware implementations, coherency between the encrypted and unencrypted mappings of the same physical page in a VM is enforced. In such a system, it is not required for software to flush the VM's page from all CPU caches in the system prior to changing the value of the C-bit for the page. So check that bit before flushing the cache. Signed-off-by: Krish Sadhukhan Signed-off-by: Borislav Petkov Acked-by: Paolo Bonzini Link: https://lkml.kernel.org/r/20200917212038.5090-4-krish.sadhukhan@oracle.com commit 55fd7dd29d679836a308d81c27c770b0a9c6a8d1 Author: Rob Clark Date: Sat Sep 19 10:17:53 2020 -0700 drm/msm/dp: Fix crash if no DP device Signed-off-by: Rob Clark commit 46138329faeac3598f5a4dc991a174386b6de833 Author: Kees Cook Date: Sat Sep 12 04:08:17 2020 -0700 selftests/seccomp: powerpc: Fix seccomp return value testing On powerpc, the errno is not inverted, and depends on ccr.so being set. Add this to a powerpc definition of SYSCALL_RET_SET(). Co-developed-by: Thadeu Lima de Souza Cascardo Signed-off-by: Thadeu Lima de Souza Cascardo Link: https://lore.kernel.org/linux-kselftest/20200911181012.171027-1-cascardo@canonical.com/ Fixes: 5d83c2b37d43 ("selftests/seccomp: Add powerpc support") Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-13-keescook@chromium.org Reviewed-by: Michael Ellerman commit f04cf78bbfcd1fa5b1819613a5f354b228f36e03 Author: Kees Cook Date: Sat Sep 12 04:08:16 2020 -0700 selftests/seccomp: Remove SYSCALL_NUM_RET_SHARE_REG in favor of SYSCALL_RET_SET Instead of special-casing the specific case of shared registers, create a default SYSCALL_RET_SET() macro (mirroring SYSCALL_NUM_SET()), that writes to the SYSCALL_RET register. For architectures that can't set the return value (for whatever reason), they can define SYSCALL_RET_SET() without an associated SYSCALL_RET() macro. This also paves the way for architectures that need to do special things to set the return value (e.g. powerpc). Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-12-keescook@chromium.org Acked-by: Christian Brauner commit e4e8e5d28d5e1dac24f775452d4cc6f49f5c069e Author: Kees Cook Date: Sat Sep 12 04:08:15 2020 -0700 selftests/seccomp: Avoid redundant register flushes When none of the registers have changed, don't flush them back. This can happen if the architecture uses a non-register way to change the syscall (e.g. arm64) , and a return value hasn't been written. Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-11-keescook@chromium.org Acked-by: Christian Brauner commit dc2ad165f4fbef0fe1028b6b3720c5bec034874f Author: Kees Cook Date: Sat Sep 12 04:08:14 2020 -0700 selftests/seccomp: Convert REGSET calls into ARCH_GETREG/ARCH_SETREG Consolidate the REGSET logic into the new ARCH_GETREG() and ARCH_SETREG() macros, avoiding more #ifdef code in function bodies. Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-10-keescook@chromium.org Acked-by: Christian Brauner commit fdbaa798eaf52a3f1d5d86c5bc035fe8dcc3a384 Author: Kees Cook Date: Sat Sep 12 04:08:13 2020 -0700 selftests/seccomp: Convert HAVE_GETREG into ARCH_GETREG/ARCH_SETREG Instead of special-casing the get/set-registers routines, move the HAVE_GETREG logic into the new ARCH_GETREG() and ARCH_SETREG() macros. Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-9-keescook@chromium.org Acked-by: Christian Brauner commit 78f26627fd36cb74277dd562ec277aee384525a1 Author: Kees Cook Date: Sat Sep 12 04:08:12 2020 -0700 selftests/seccomp: Remove syscall setting #ifdefs With all architectures now using the common SYSCALL_NUM_SET() macro, the arch-specific #ifdef can be removed from change_syscall() itself. Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-8-keescook@chromium.org Acked-by: Christian Brauner commit 37989de731dbea5af143806192c4cd1484990ab4 Author: Kees Cook Date: Sat Sep 12 04:08:11 2020 -0700 selftests/seccomp: mips: Remove O32-specific macro Instead of having the mips O32 macro special-cased, pull the logic into the SYSCALL_NUM() macro. Additionally include the ABI headers, since these appear to have been missing, leaving __NR_O32_Linux undefined. Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-7-keescook@chromium.org Acked-by: Christian Brauner commit 0dd7d68572d9393765b57c001adc30822e3003ed Author: Kees Cook Date: Sat Sep 12 04:08:10 2020 -0700 selftests/seccomp: arm64: Define SYSCALL_NUM_SET macro Remove the arm64 special-case in change_syscall(). Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-6-keescook@chromium.org Acked-by: Christian Brauner commit aa8fbb80a8034af23b08310142af1d9824d25533 Author: Kees Cook Date: Sat Sep 12 04:08:09 2020 -0700 selftests/seccomp: arm: Define SYSCALL_NUM_SET macro Remove the arm special-case in change_syscall(). Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-5-keescook@chromium.org Acked-by: Christian Brauner commit a084a6cba37cfa7c03e88f86ade961fb1d7c18a2 Author: Kees Cook Date: Sat Sep 12 04:08:08 2020 -0700 selftests/seccomp: mips: Define SYSCALL_NUM_SET macro Remove the mips special-case in change_syscall(). Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-4-keescook@chromium.org Acked-by: Christian Brauner commit 31c36eb87c85b6de0f341b1184f90137106a9f81 Author: Kees Cook Date: Sat Sep 12 04:08:07 2020 -0700 selftests/seccomp: Provide generic syscall setting macro In order to avoid "#ifdef"s in the main function bodies, create a new macro, SYSCALL_NUM_SET(), where arch-specific logic can live. Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-3-keescook@chromium.org Acked-by: Christian Brauner commit a6a4d78419a04095221ec2b518edefb080218d55 Author: Kees Cook Date: Sat Sep 12 04:08:06 2020 -0700 selftests/seccomp: Refactor arch register macros to avoid xtensa special case To avoid an xtensa special-case, refactor all arch register macros to take the register variable instead of depending on the macro expanding as a struct member name. Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-2-keescook@chromium.org Acked-by: Christian Brauner commit 05b52c6625278cc6ed1245a569167f86a971ff86 Author: Kees Cook Date: Sat Sep 12 04:08:20 2020 -0700 selftests/seccomp: Use __NR_mknodat instead of __NR_mknod The __NR_mknod syscall doesn't exist on arm64 (only __NR_mknodat). Switch to the modern syscall. Fixes: ad5682184a81 ("selftests/seccomp: Check for EPOLLHUP for user_notif") Signed-off-by: Kees Cook Link: https://lore.kernel.org/lkml/20200912110820.597135-16-keescook@chromium.org Acked-by: Christian Brauner commit 6ea5aad32dd8b35af68b1ba955daa368900d3b98 Author: Gao Xiang Date: Sat Sep 19 15:27:30 2020 +0800 erofs: add REQ_RAHEAD flag to readahead requests Let's add REQ_RAHEAD flag so it'd be easier to identify readahead I/O requests in blktrace. Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20200919072730.24989-3-hsiangkao@redhat.com Signed-off-by: Gao Xiang commit bf9a123b9cf8d8c67c4c59757cbf4e4b2c4ab2e3 Author: Gao Xiang Date: Sat Sep 19 15:27:29 2020 +0800 erofs: fold in should_decompress_synchronously() should_decompress_synchronously() has one single condition for now, so fold it instead. Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20200919072730.24989-2-hsiangkao@redhat.com Signed-off-by: Gao Xiang commit 6c3e485ea37da2bcca68e6b8c635ddd2b4da540d Author: Gao Xiang Date: Sat Sep 19 15:27:28 2020 +0800 erofs: avoid unnecessary variable `err' variable `err' in z_erofs_submit_queue() isn't useful here, remove it instead. Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20200919072730.24989-1-hsiangkao@redhat.com Signed-off-by: Gao Xiang commit 22c36b18263426bdd97ef5e04c0e92224c612ee1 Author: Wei Yang Date: Sun Jul 12 09:10:36 2020 +0800 tracing: make tracing_init_dentry() returns an integer instead of a d_entry pointer Current tracing_init_dentry() return a d_entry pointer, while is not necessary. This function returns NULL on success or error on failure, which means there is no valid d_entry pointer return. Let's return 0 on success and negative value for error. Link: https://lkml.kernel.org/r/20200712011036.70948-5-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Steven Rostedt (VMware) commit dc300d77b86a122d3fd099206e1adf699ed80bd7 Author: Wei Yang Date: Sun Jul 12 09:10:35 2020 +0800 tracing: toplevel d_entry already initialized Currently we have following call flow: tracer_init_tracefs() tracing_init_dentry() event_trace_init() tracing_init_dentry() This shows tracing_init_dentry() is called twice in this flow and this is not necessary. Let's remove the second one when it is for sure be properly initialized. Link: https://lkml.kernel.org/r/20200712011036.70948-4-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Steven Rostedt (VMware) commit 5675fd4ef51f0b505a7f802e4d23a37336d521f0 Author: Masami Hiramatsu Date: Mon Aug 10 17:35:32 2020 +0900 tools/bootconfig: Add --init option for bconf2ftrace.sh Since the ftrace current setting may conflict with the new setting from bootconfig, add the --init option to initialize ftrace before setting for bconf2ftrace.sh. E.g. $ bconf2ftrace.sh --init boottrace.bconf This initialization method copied from selftests/ftrace. Link: https://lkml.kernel.org/r/159704853203.175360.17029578033994278231.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 2b86062a34a81427fca082540e3593b5a6b49a13 Author: Masami Hiramatsu Date: Mon Aug 10 17:35:21 2020 +0900 tools/bootconfig: Add a script to generates bootconfig from ftrace Add a ftrace2bconf.sh under tools/bootconfig/scripts which generates a bootconfig file from the current ftrace settings. To read the ftrace settings, ftrace2bconf.sh requires the root privilege (or sudo). The ftrace2bconf.sh will output the bootconfig to stdout and error messages to stderr, so usually you'll run it as # ftrace2bconf.sh > ftrace.bconf Note that some ftrace configurations are not supported. For example, function-call/callgraph trace/notrace settings are not supported because the wildcard has been expanded and lost in the ftrace anymore. Link: https://lkml.kernel.org/r/159704852163.175360.16738029520293360558.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 7e66ef0046ccf896674955b819c27c49783a4deb Author: Masami Hiramatsu Date: Mon Aug 10 17:35:11 2020 +0900 tools/bootconfig: Add a script to generate ftrace shell-command from bootconfig Add a bconf2ftrace.sh under tools/bootconfig/scripts which generates a shell script to setup boot-time trace from bootconfig file for testing the bootconfig. bconf2ftrace.sh will take a bootconfig file (includes boot-time tracing) and convert it into a shell-script which is almost same as the boot-time tracer does. If --apply option is given, it also tries to apply those command to the running kernel, which requires the root privilege (or sudo). For example, if you just want to confirm the shell commands, save the output as below. # bconf2ftrace.sh ftrace.bconf > ftrace.sh Or, you can apply it directly. # bconf2ftrace.sh --apply ftrace.bconf Note that some boot-time tracing parameters under kernel.* are not able to set via tracefs nor procfs (e.g. tp_printk, traceoff_on_warning.), so those are ignored. Link: https://lkml.kernel.org/r/159704851101.175360.15119132351139842345.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 483ce6708dce7116ef2c83b36a1cfe28a36c4fc9 Author: Masami Hiramatsu Date: Mon Aug 10 17:35:01 2020 +0900 tools/bootconfig: Make all functions static Make all functions static except for main(). This is just a cleanup. Link: https://lkml.kernel.org/r/159704850135.175360.12465608936326167517.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit e4f70b7badb40598ceea31c122d7c2fb6203672a Author: Masami Hiramatsu Date: Mon Aug 10 17:34:51 2020 +0900 tools/bootconfig: Add list option Add list option (-l) to show the bootconfig in the list style. This is same output of /proc/bootconfig. So users can check how their bootconfig will be shown in procfs. This will help them to write a user-space script to parse the /proc/bootconfig. Link: https://lkml.kernel.org/r/159704849087.175360.8761890802048625207.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit d052e1c6909f9ccbdc4112a50796afca19094229 Author: Masami Hiramatsu Date: Mon Aug 10 17:34:41 2020 +0900 tools/bootconfig: Show bootconfig compact tree from bootconfig file Show the bootconfig compact tree from the bootconfig file instead of an initrd if the given file has no magic number and is smaller than 32KB. User can use this for checking the syntax error or output checking before applying the bootconfig to initrd. Link: https://lkml.kernel.org/r/159704848156.175360.6621139371000789360.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit a5a3303e26cdf6867bc1f4cdd3f0a56673d70ea7 Merge: 0db0561d13df0 93157307f7b4e Author: David S. Miller Date: Fri Sep 18 18:19:42 2020 -0700 Merge branch 'mv88e6xxx-Add-devlink-regions-support' Andrew Lunn says: ==================== mv88e6xxx: Add devlink regions support Make use of devlink regions to allow read access to some of the internal of the switches. Currently access to global1, global2 and the ATU is provided. The switch itself will never trigger a region snapshot, it is assumed it is performed from user space as needed. v2: Remove left of debug print Comment ATU format is generic to mv88e6xxx Combine declaration and the assignment on a single line. v3: Drop support for port regions Improve the devlink API with a priv member and passing the region to the snapshot function Make the helper to convert from devlink to ds an inline function v4: Add missing kerneldoc in ICE driver Fix typo for global2 reading global1 registers Make use of enum to make code more readable ==================== Signed-off-by: David S. Miller commit 93157307f7b4e11232d972d325ab688f1a08f487 Author: Andrew Lunn Date: Fri Sep 18 21:11:09 2020 +0200 net: dsa: mv88e6xxx: Implement devlink info get callback Return the driver name and the asic.id with the switch name. Reviewed-by: Florian Fainelli Reviewed-by: Jakub Kicinski Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 0f06b855a93c3b449253b91abc94c4d483af0a44 Author: Andrew Lunn Date: Fri Sep 18 21:11:08 2020 +0200 net: dsa: wire up devlink info get Allow the DSA drivers to implement the devlink call to get info info, e.g. driver name, firmware version, ASIC ID, etc. v2: Combine declaration and the assignment on a single line. Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit bfb255428966e2ab2c406cf6c71d95e9e63241e4 Author: Andrew Lunn Date: Fri Sep 18 21:11:07 2020 +0200 net: dsa: mv88e6xxx: Add devlink regions Allow the global registers, and the ATU to be snapshot via devlink regions. It is later planned to add support for the port registers. v2: Remove left over debug prints Comment ATU format is generic for mv88e6xxx, not wider v3: Make use of ops structure passed to snapshot function Remove port regions v4: Make use of enum mv88e6xxx_region_id Fix global2/global1 read typ0 Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 90b6dbdf415e74b5a317f1d6069c48eb731a0b7a Author: Andrew Lunn Date: Fri Sep 18 21:11:06 2020 +0200 net: dsa: mv88e6xxx: Create helper for FIDs in use Refactor the code in mv88e6xxx_atu_new() which builds a bitmaps of FIDs in use into a helper function. This will be reused by the devlink code when dumping the ATU. Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 9dd43aa211809f5c6641fa6c11a7eaf1514e5d53 Author: Andrew Lunn Date: Fri Sep 18 21:11:05 2020 +0200 net: dsa: mv88e6xxx: Move devlink code into its own file There will soon be more devlink code. Move the existing code into a file of its own, before we start adding this new code. Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 97c82c23135187878acea76bc5f0b03007e17ac7 Author: Andrew Lunn Date: Fri Sep 18 21:11:04 2020 +0200 net: dsa: Add devlink regions support to DSA Allow DSA drivers to make use of devlink regions, via simple wrappers. Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit ccc3e6b0191c58784c4b4ffc735f81970df33a11 Author: Andrew Lunn Date: Fri Sep 18 21:11:03 2020 +0200 net: dsa: Add helper to convert from devlink to ds Given a devlink instance, return the dsa switch it is associated to. Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit d4602a9f47196dd62deba66ec361b5897f1ae62b Author: Andrew Lunn Date: Fri Sep 18 21:11:02 2020 +0200 net: devlink: region: Pass the region ops to the snapshot function Pass the region to be snapshotted to the function performing the snapshot. This allows one function to operate on numerous regions. v4: Add missing kerneldoc for ICE Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e14e05e71d106aef973e2cf100e540d911703a6e Author: Andrew Lunn Date: Fri Sep 18 21:11:01 2020 +0200 net: devlink: regions: Add a priv member to the regions ops struct The driver may have multiple regions which can be dumped using one function. However, for this to work, additional information is needed. Add a priv member to the ops structure for the driver to use however it likes. Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 0db0561d13df07978bea63a19f644fc16a60f54a Merge: 42ccf1cd6aa5b d60bc62de4ae0 Author: David S. Miller Date: Fri Sep 18 17:53:05 2020 -0700 Merge branch 'Felix-DSA-driver-cleanup-build-Seville-separately' Vladimir Oltean says: ==================== Felix DSA driver cleanup: build Seville separately When introducing the Seville switch support to the Felix driver, some technical debt was created. Since both VSC9959 and VSC9953 are embedded switches (one on an arm64 SoC and the other on a powerpc SoC), there is no use case for having the code for both be present in the same module. This was necessary at the time due to the common SERDES PCS code that they were using, but that has been since refactored into drivers/net/pcs/pcs-lynx.c. This makes the Seville driver stop uselessly depending upon PCI and FSL_ENETC_MDIO, which were only dependencies of Felix in fact. Some whitespace/tab conversions are also present in this series as part of the cleanup process. ==================== Signed-off-by: David S. Miller commit d60bc62de4ae068ed4b215c24cdfdd5035aa986e Author: Vladimir Oltean Date: Fri Sep 18 13:57:53 2020 +0300 net: dsa: seville: build as separate module Seville does not need to depend on PCI or on the ENETC MDIO controller. There will also be other compile-time differences in the future. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2ac7c6c5b61b3eaeca5da998a16d912bdfb62bae Author: Vladimir Oltean Date: Fri Sep 18 13:57:52 2020 +0300 net: dsa: felix: move the PTP clock structure to felix_vsc9959.c Not only does Sevile not have a PTP clock, but with separate modules, this structure cannot even live in felix.c, due to the .owner = THIS_MODULE assignment causing this link time error: drivers/net/dsa/ocelot/felix.o:(.data+0x0): undefined reference to `__this_module' Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 881321b6ed9e983ad733268404245fcf0be0b23c Author: Vladimir Oltean Date: Fri Sep 18 13:57:51 2020 +0300 net: mscc: ocelot: make ocelot_init_timestamp take a const struct ptp_clock_info It is a good measure to ensure correctness if the structures that are meant to remain constant are only processed by functions that thake constant arguments. Signed-off-by: Vladimir Oltean Reviewed-by: Alexandre Belloni Signed-off-by: David S. Miller commit ccfdbab568a2d240f4241b737e3c7fbd7a6cb59f Author: Vladimir Oltean Date: Fri Sep 18 13:57:50 2020 +0300 net: dsa: seville: duplicate vsc9959_mdio_bus_free While we don't plan on making any changes to this function, currently this is the only remaining dependency between felix and seville, after the PCS has been refactored out into pcs-lynx.c. Duplicate this function in seville to break the dependency completely. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f8320ec14dedb7aafc24c61d91cb0babd0588e5a Author: Vladimir Oltean Date: Fri Sep 18 13:57:49 2020 +0300 net: dsa: felix: replace tabs with spaces Over the time, some patches have introduced structures aligned with spaces, near structures aligned with tabs. Fix the inconsistencies. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 123d231a166369b31b212ef3106fad9c4104f126 Author: Vladimir Oltean Date: Fri Sep 18 13:57:48 2020 +0300 net: dsa: seville: reindent defines for MDIO controller Reindent these definitions to be in line with the rest of the driver. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 9ef9e0d28240a3bb2bee838afe322401e79fd572 Author: Vladimir Oltean Date: Fri Sep 18 13:57:47 2020 +0300 net: dsa: seville: remove unused defines for the mdio controller Some definitions were likely copied from drivers/net/mdio/mdio-mscc-miim.c. They are not necessary, remove them. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit c129fc55fec59ab744f5e1fb9eb5bb0e68c789fd Author: Vladimir Oltean Date: Fri Sep 18 13:57:46 2020 +0300 net: dsa: ocelot: document why reset procedure is different for felix/seville The overall idea (issue soft reset, enable memories, initialize memories, enable core) is the same, so it would make sense that an attempt is made to unify the procedures. It is not immediately obvious that the fields are not part of the same register targets, though. So add a comment. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 9a73f0b580ff0b6d027298681737bec07d603fb4 Author: Vladimir Oltean Date: Fri Sep 18 13:57:45 2020 +0300 net: dsa: seville: first enable memories, then initialize them As per documentation, proper startup sequence is: * Enable memories * Initialize memories * Enable core Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6b6d804f0826185a708786f18f9a493949d6743c Author: Vladimir Oltean Date: Fri Sep 18 13:57:44 2020 +0300 net: dsa: seville: don't write to MEM_ENA twice There is another one of these right above the readx_poll_status. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 75cea9cb94009771ec1200ba763a218a334096b7 Author: Vladimir Oltean Date: Fri Sep 18 13:57:43 2020 +0300 net: dsa: felix: use ocelot_field_{read,write} helpers consistently Since these helpers for regmap fields are available, use them. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 42ccf1cd6aa5bb6fba7a2bfeb08c88d822e05916 Merge: 5e43df14d6b43 6d23d831e9bd0 Author: David S. Miller Date: Fri Sep 18 17:49:20 2020 -0700 Merge branch 'ptp_qoriq-support-FIPER3' Yangbo Lu says: ==================== ptp_qoriq: support FIPER3 The FIPER3 (fixed interval period pulse generator) is supported on DPAA2 and ENETC network controller hardware. This patch-set is to support it in ptp_qoriq driver and dt-binding. Changes for v2: - Some improvement in code. - Added ACK from Vladimir. ==================== Signed-off-by: David S. Miller commit 6d23d831e9bd0b1d2bcd9a1ecdc6ac8e6d162c36 Author: Yangbo Lu Date: Fri Sep 18 17:48:01 2020 +0800 ptp_qoriq: support FIPER3 The FIPER3 (fixed interval period pulse generator) is supported on DPAA2 and ENETC network controller hardware. This patch is to support it in ptp_qoriq driver. Signed-off-by: Yangbo Lu Acked-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8725e9fc61ebe396df89efd3e0245d15e416bb49 Author: Yangbo Lu Date: Fri Sep 18 17:48:00 2020 +0800 dt-binding: ptp_qoriq: support fsl,tmr-fiper3 property Add fsl,tmr-fiper3 property definition which is supported only on DPAA2 and ENETC network controller hardware. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 5e43df14d6b436ca767676bc8e41506dc03c4d89 Merge: ba4ee3c053659 54f7e44353a73 Author: David S. Miller Date: Fri Sep 18 17:47:07 2020 -0700 Merge branch 'net-ipa-wake-up-system-on-RX-available' Alex Elder says: ==================== net: ipa: wake up system on RX available This series arranges for the IPA driver to wake up a suspended system if the IPA hardware has a packet to deliver to the AP. Version 2 replaced the first patch from version 1 with three patches, in response to David Miller's feedback. And based on Bjorn Andersson's feedback on version 2, this version reworks the tracking of IPA clock references. As a result, we no longer need a flag to determine whether a "don't' suspend" clock reference is held (though an bit in a bitmask is still used for a different purpose). In summary: - A refcount_t is used to track IPA clock references where an atomic_t was previously used. (This may go away soon as well, with upcoming work to implement runtime PM.) - We no longer track whether a special reference has been taken to avoid suspending IPA. - A bit in a bitmask is used to ensure we only trigger a system resume once per system suspend. And from the original series: - Suspending endpoints only occurs when suspending the driver, not when dropping the last clock reference. Resuming endpoints is also disconnected from starting the clock. - The IPA SUSPEND interrupt is now a wakeup interrupt. If it fires, it schedules a system resume operation. - The GSI interrupt is no longer a wakeup interrupt. ==================== Signed-off-by: David S. Miller commit 54f7e44353a7319a8f779fdc1ed9ec02c5eaf826 Author: Alex Elder Date: Thu Sep 17 12:39:26 2020 -0500 net: ipa: do not enable GSI interrupt for wakeup We now trigger a system resume when we receive an IPA SUSPEND interrupt. We should *not* wake up on GSI interrupts. Signed-off-by: Alex Elder Reviewed-by: Bjorn Andersson Signed-off-by: David S. Miller commit d1b5126af021daf733f91258abc0f6a543b5565d Author: Alex Elder Date: Thu Sep 17 12:39:25 2020 -0500 net: ipa: enable wakeup on IPA interrupt Now that we handle wakeup interrupts properly, arrange for the IPA interrupt to be treated as a wakeup interrupt. Signed-off-by: Alex Elder Reviewed-by: Bjorn Andersson Signed-off-by: David S. Miller commit 3c6ccdde0fe37efaa3d1ae7a141a31b4e054ab03 Author: Alex Elder Date: Thu Sep 17 12:39:24 2020 -0500 net: ipa: repurpose CLOCK_HELD flag The previous patch causes a system resume to be triggered when a packet is available for receipt on a suspended RX endpoint. The CLOCK_HELD flag was previously used to indicate that an extra clock reference was held, preventing suspend. But we no longer need such a flag: - We take an initial reference in ipa_config(). - That reference is held until ipa_suspend() releases it. - A subsequent system resume leads to a reference getting re-acquired in ipa_resume(). - This can repeat until ultimately the module is removed, where ipa_remove() releases the reference. We no longer need a special flag to determine whether this extra reference is held--it is, provided probe has completed successfully and the driver is not suspended (or removed). On the other hand, once suspended, it's possible for more than one endpoint to trip the IPA SUSPEND interrupt, and we only want to trigger the system resume once. So repurpose the Boolean CLOCK_HELD flag to record whether the IPA SUSPEND handler should initiate a system resume. The flag will be be cleared each time ipa_suspend() is called, *before* any endpoints are suspended. And it will be set inside the IPA SUSPEND interrupt handler exactly once per suspend. Rename the flag IPA_FLAG_RESUMED to reflect its new purpose. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 8529b4b0dca31244aae495dbbe0013b5a4b2a6ee Author: Alex Elder Date: Thu Sep 17 12:39:23 2020 -0500 net: ipa: use device_init_wakeup() The call to wakeup_source_register() in ipa_probe() does not do what it was intended to do. Call device_init_wakeup() in ipa_setup() instead, to set the IPA device as wakeup-capable and to initially enable wakeup capability. When we receive a SUSPEND interrupt, call pm_wakeup_dev_event() with a zero processing time, to simply call for a resume without any other processing. The ipa_resume() call will take care of waking things up again, and will handle receiving the packet. Note that this gets rid of a clock reference counting bug that occurred when handling an IPA SUSPEND interrupt. Specifically, ipa_suspend_handler() took an IPA clock reference *in addition* to the one taken by ipa_resume(). There is no need to back-port this fix however, because it only affects code that was not previously working (this patch is part of fixing that). Signed-off-by: Alex Elder Reviewed-by: Bjorn Andersson Signed-off-by: David S. Miller commit dc6e6072d33f83527896f4d75a991a030b54a858 Author: Alex Elder Date: Thu Sep 17 12:39:22 2020 -0500 net: ipa: manage endpoints separate from clock Currently, when (before) the last IPA clock reference is dropped, all endpoints are suspended. And whenever the first IPA clock reference is taken, all endpoints are resumed (or started). In most cases there's no need to start endpoints when the clock starts. So move the calls to ipa_endpoint_suspend() and ipa_endpoint_resume() out of ipa_clock_put() and ipa_clock_get(), respectiely. Instead, only suspend endpoints when handling a system suspend, and only resume endpoints when handling a system resume. Signed-off-by: Alex Elder Reviewed-by: Bjorn Andersson Signed-off-by: David S. Miller commit 2b09841c7e57c34dc11741ffd3696e91b81bcd79 Author: Alex Elder Date: Thu Sep 17 12:39:21 2020 -0500 net: ipa: replace ipa->suspend_ref with a flag bit We take a clock reference in ipa_config() in order to prevent the the IPA clock from being shutdown until a power management suspend request arrives. An atomic field in the IPA structure records whether that extra reference had been taken. Rather than using an atomic to represent a Boolean value, define a new flags bitmap, and define a "clock held" flag to represent whether the extra clock reference has been taken. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 0305b709906e755d7fbdeccd9c2539442ebd1ead Author: Alex Elder Date: Thu Sep 17 12:39:20 2020 -0500 net: ipa: use refcount_t for IPA clock reference count Take advantage of the checking provided by refcount_t, rather than using a plain atomic to represent the IPA clock reference count. Note that we need to *set* the value to 1 in ipa_clock_get() rather than incrementing it from 0 (because doing that is considered an error for a refcount_t). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit ba4ee3c053659119472135231dbef8f6880ce1fb Author: Florian Fainelli Date: Wed Sep 16 19:04:13 2020 -0700 net: phy: bcm7xxx: request and manage GPHY clock The internal Gigabit PHY on Broadcom STB chips has a digital clock which drives its MDIO interface among other things, the driver now requests and manage that clock during .probe() and .remove() accordingly. Because the PHY driver can be probed with the clocks turned off we need to apply the dummy BMSR workaround during the driver probe function to ensure subsequent MDIO read or write towards the PHY will succeed. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f5449e74802c1112dea984aec8af7a33c4516af1 Author: Jason Gunthorpe Date: Mon Sep 14 08:59:56 2020 -0300 RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy ucma_destroy_id() assumes that all things accessing the ctx will do so via the xarray. This assumption violated only in the case the FD is being closed, then the ctx is reached via the ctx_list. Normally this is OK since ucma_destroy_id() cannot run concurrenty with release(), however with ucma_migrate_id() is involved this can violated as the close of the 2nd FD can run concurrently with destroy on the first: CPU0 CPU1 ucma_destroy_id(fda) ucma_migrate_id(fda -> fdb) ucma_get_ctx() xa_lock() _ucma_find_context() xa_erase() xa_unlock() xa_lock() ctx->file = new_file list_move() xa_unlock() ucma_put_ctx() ucma_close(fdb) _destroy_id() kfree(ctx) _destroy_id() wait_for_completion() // boom, ctx was freed The ctx->file must be modified under the handler and xa_lock, and prior to modification the ID must be rechecked that it is still reachable from cur_file, ie there is no parallel destroy or migrate. To make this work remove the double locking and streamline the control flow. The double locking was obsoleted by the handler lock now directly preventing new uevents from being created, and the ctx_list cannot be read while holding fgets on both files. Removing the double locking also removes the need to check for the same file. Fixes: 88314e4dda1e ("RDMA/cma: add support for rdma_migrate_id()") Link: https://lore.kernel.org/r/0-v1-05c5a4090305+3a872-ucma_syz_migrate_jgg@nvidia.com Reported-and-tested-by: syzbot+cc6fc752b3819e082d0c@syzkaller.appspotmail.com Signed-off-by: Jason Gunthorpe commit 70b971118e074d5042715587953f27929e99117a Author: Martin KaFai Lau Date: Wed Sep 16 13:44:53 2020 -0700 bpf: Use hlist_add_head_rcu when linking to local_storage The local_storage->list will be traversed by rcu reader in parallel. Thus, hlist_add_head_rcu() is needed in bpf_selem_link_storage_nolock(). This patch fixes it. This part of the code has recently been refactored in bpf-next and this patch makes changes to the new file "bpf_local_storage.c". Instead of using the original offending commit in the Fixes tag, the commit that created the file "bpf_local_storage.c" is used. A separate fix has been provided to the bpf tree. Fixes: 450af8d0f6be ("bpf: Split bpf_local_storage to bpf_sk_storage") Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200916204453.2003915-1-kafai@fb.com commit f55f4c349a03d820c27145bdf457013b42e4b487 Author: Ilya Leoshkevich Date: Tue Sep 15 13:55:19 2020 +0200 samples/bpf: Fix test_map_in_map on s390 s390 uses socketcall multiplexer instead of individual socket syscalls. Therefore, "kprobe/" SYSCALL(sys_connect) does not trigger and test_map_in_map fails. Fix by using "kprobe/__sys_connect" instead. Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200915115519.3769807-1-iii@linux.ibm.com commit fec47bbc10b243690f5d0ee484a0bbdee273e71b Author: Ilya Leoshkevich Date: Tue Sep 15 13:39:28 2020 +0200 selftests/bpf: Fix endianness issue in test_sockopt_sk getsetsockopt() calls getsockopt() with optlen == 1, but then checks the resulting int. It is ok on little endian, but not on big endian. Fix by checking char instead. Fixes: 8a027dc0d8f5 ("selftests/bpf: add sockopt test that exercises sk helpers") Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200915113928.3768496-1-iii@linux.ibm.com commit 5f3666e8394580179b81dd90bf8b930efaf5138e Author: Wang Hai Date: Fri Sep 18 21:18:19 2020 +0800 net: tipc: Supply missing udp_media.h include file If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): net/tipc/udp_media.c:446:5: warning: no previous prototype for ‘tipc_udp_nl_dump_remoteip’ [-Wmissing-prototypes] net/tipc/udp_media.c:532:5: warning: no previous prototype for ‘tipc_udp_nl_add_bearer_data’ [-Wmissing-prototypes] net/tipc/udp_media.c:614:5: warning: no previous prototype for ‘tipc_udp_nl_bearer_add’ [-Wmissing-prototypes] Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 7eae7f72edd02389dfaa8780e37eeb9ed5f01fab Author: YueHaibing Date: Fri Sep 18 21:16:15 2020 +0800 tipc: Remove unused macro CF_SERVER It is no used any more, so can remove it. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit a61432d4726716c50dc3fa8c89243075fe7d0c04 Author: Wang Hai Date: Fri Sep 18 21:06:53 2020 +0800 net: hns3: Supply missing hclge_dcb.h include file If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c:453:6: warning: no previous prototype for ‘hclge_dcb_ops_set’ [-Wmissing-prototypes] Signed-off-by: Wang Hai Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit b77f3ce0fd95cd4216e784d1192fd32980d4c244 Author: Wang Hai Date: Fri Sep 18 20:55:51 2020 +0800 net/appletalk: Supply missing net/Space.h include file If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): drivers/net/appletalk/cops.c:213:28: warning: no previous prototype for ‘cops_probe’ [-Wmissing-prototypes] drivers/net/appletalk/ltpc.c:1014:28: warning: no previous prototype for ‘ltpc_probe’ [-Wmissing-prototypes] Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 98cf1c671a5fd181590f54be948135a20ace68d3 Author: Wang Hai Date: Fri Sep 18 21:02:10 2020 +0800 liquidio: Fix -Wmissing-prototypes warnings for liquidio If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/cavium/liquidio/cn68xx_device.c:124:5: warning: no previous prototype for ‘lio_setup_cn68xx_octeon_device’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:159:1: warning: no previous prototype for ‘octeon_pci_read_core_mem’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:168:1: warning: no previous prototype for ‘octeon_pci_write_core_mem’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:176:5: warning: no previous prototype for ‘octeon_read_device_mem64’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:185:5: warning: no previous prototype for ‘octeon_read_device_mem32’ [-Wmissing-prototypes] drivers/net/ethernet/cavium/liquidio/octeon_mem_ops.c:194:6: warning: no previous prototype for ‘octeon_write_device_mem32’ [-Wmissing-prototypes] Signed-off-by: Wang Hai Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit fc177304d12664ba693d2237a5763ce44bff98e1 Author: Lorenzo Pieralisi Date: Wed Sep 16 11:30:45 2020 +0100 ARM/PCI: Remove unused fields from struct hw_pci The msi_ctrl, io_optional and align_resource fields in struct hw_pci are currently unused by arm/mach PCI host controller drivers and we won't be adding any new users. Remove them and related code. Link: https://lore.kernel.org/r/20200904141607.4066-1-lorenzo.pieralisi@arm.com Link: https://lore.kernel.org/r/20200916103045.28651-1-lorenzo.pieralisi@arm.com Signed-off-by: Lorenzo Pieralisi Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Cc: Rob Herring Cc: Russell King commit f52e4b27d1ac837caa84973262f7057578f6e316 Author: Tom Parkin Date: Fri Sep 18 11:23:21 2020 +0100 l2tp: fix up inconsistent rx/tx statistics Historically L2TP core statistics count the L2TP header in the per-session and per-tunnel byte counts tracked for transmission and receipt. Now that l2tp_xmit_skb updates tx stats, it is necessary for l2tp_xmit_core to pass out the length of the transmitted packet so that the statistics can be updated correctly. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit c011410d9145695c460567fa5ba1ade6a7b16f06 Author: Dan Carpenter Date: Fri Sep 18 17:27:56 2020 +0300 ipmi: msghandler: Fix a signedness bug The type for the completion codes should be unsigned char instead of char. If it is declared as a normal char then the conditions in __get_device_id() are impossible because the IPMI_DEVICE_IN_FW_UPDATE_ERR error codes are higher than 127. drivers/char/ipmi/ipmi_msghandler.c:2449 __get_device_id() warn: impossible condition '(bmc->cc == 209) => ((-128)-127 == 209)' Fixes: f8910ffa81b0 ("ipmi:msghandler: retry to get device id on an error") Signed-off-by: Dan Carpenter Message-Id: <20200918142756.GB909725@mwanda> Signed-off-by: Corey Minyard commit a9fd686a71e97f7be3e3e640957a3228cb1fd1d7 Author: Luo bin Date: Fri Sep 18 17:23:22 2020 +0800 hinic: modify irq name Make a distinction between different irqs by netdev name or pci name. Signed-off-by: Luo bin Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit f313edfe085bb9a16c96208dd6db8218c081dfaf Author: Zheng Yongjun Date: Fri Sep 18 16:49:51 2020 +0800 net: cortina: Remove set but not used variable Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/cortina/gemini.c: In function gmac_get_ringparam: drivers/net/ethernet/cortina/gemini.c:2125:21: warning: variable ‘config0’ set but not used [-Wunused-but-set-variable] drivers/net/ethernet/cortina/gemini.c: In function gmac_init: drivers/net/ethernet/cortina/gemini.c:512:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] these variable is never used, so remove it. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit a9609d79b45130424bd675f3a54d208eb02955c9 Merge: 7b066d173b6de c55211892f463 Author: David S. Miller Date: Fri Sep 18 14:32:48 2020 -0700 Merge branch 'dpaa2_eth-support-1588-one-step-timestamping' Yangbo Lu says: ==================== dpaa2_eth: support 1588 one-step timestamping This patch-set is to add MC APIs of 1588 one-step timestamping, and support one-step timestamping for PTP Sync packet on DPAA2. Before egress, one-step timestamping enablement needs, - Enabling timestamp and FAS (Frame Annotation Status) in dpni buffer layout. - Write timestamp to frame annotation and set PTP bit in FAS to mark as one-step timestamping event. - Enabling one-step timestamping by dpni_set_single_step_cfg() API, with offset provided to insert correction time on frame. The offset must respect all MAC headers, VLAN tags and other protocol headers accordingly. The correction field update can consider delays up to one second. So PTP frame needs to be filtered and parsed, and written timestamp into Sync frame originTimestamp field. The operation of API dpni_set_single_step_cfg() has to be done when no one-step timestamping frames are in flight. So we have to make sure the last one-step timestamping frame has already been transmitted on hardware before starting to send the current one. The resolution is, - Utilize skb->cb[0] to mark timestamping request per packet. If it is one-step timestamping PTP sync packet, queue to skb queue. If not, transmit immediately. - Schedule a work to transmit skbs in skb queue. - mutex lock is used to ensure the last one-step timestamping packet has already been transmitted on hardware through TX confirmation queue before transmitting current packet. Changes for v2: - Removed unused variable priv in dpaa2_eth_xdp_create_fd(). Changes for v3: - Fixed sparse warnings. - Fix build issue on 32-bit. - Converted to use ptp_parse_header. Changes for v4: - Used WARN_ONCE instead of netdev_err in data path. - Enabled timestamping only when PTP driver is ready. - Added comments in using onestep_tstamp_lock. - Dropped dpmac.c sparse warning fix-up patch. ==================== Signed-off-by: David S. Miller commit c55211892f463fd0c4d69eb012241d18ad45effa Author: Yangbo Lu Date: Fri Sep 18 17:08:02 2020 +0800 dpaa2-eth: support PTP Sync packet one-step timestamping This patch is to add PTP sync packet one-step timestamping support. Before egress, one-step timestamping enablement needs, - Enabling timestamp and FAS (Frame Annotation Status) in dpni buffer layout. - Write timestamp to frame annotation and set PTP bit in FAS to mark as one-step timestamping event. - Enabling one-step timestamping by dpni_set_single_step_cfg() API, with offset provided to insert correction time on frame. The offset must respect all MAC headers, VLAN tags and other protocol headers accordingly. The correction field update can consider delays up to one second. So PTP frame needs to be filtered and parsed, and written timestamp into Sync frame originTimestamp field. The operation of API dpni_set_single_step_cfg() has to be done when no one-step timestamping frames are in flight. So we have to make sure the last one-step timestamping frame has already been transmitted on hardware before starting to send the current one. The resolution is, - Utilize skb->cb[0] to mark timestamping request per packet. If it is one-step timestamping PTP sync packet, queue to skb queue. If not, transmit immediately. - Schedule a work to transmit skbs in skb queue. - mutex lock is used to ensure the last one-step timestamping packet has already been transmitted on hardware through TX confirmation queue before transmitting current packet. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 1cf773bd5a29caf170c2e4386e367d59276e8be1 Author: Yangbo Lu Date: Fri Sep 18 17:08:01 2020 +0800 dpaa2-eth: utilize skb->cb[0] for hardware timestamping This patch is a preparation for next hardware one-step timestamping support. For DPAA2, the one step timestamping configuration on hardware registers has to be done when there is no one-step timestamping packet in flight. So we will have to use workqueue and skb queue for such packets transmitting, to make sure waiting the last packet has already been sent on hardware, and starting to transmit the current one. So the tx timestamping flag in private data may not reflect the actual request for the one-step timestamping packets of skb queue. This also affects skb headroom allocation. Let's use skb->cb[0] to mark the timestamping request for each skb. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 64a965dedc8c31058e807fe960e6b893ebd6ad4a Author: Yangbo Lu Date: Fri Sep 18 17:08:00 2020 +0800 dpaa2-eth: invoke dpaa2_eth_enable_tx_tstamp() once in code Invoke dpaa2_eth_enable_tx_tstamp() once in code after building FD, rather than calling it in dpaa2_eth_build_single_fd(), dpaa2_eth_build_sg_fd_single_buf(), and dpaa2_eth_build_sg_fd(). Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit d21c784c785c63a0b731e7516a9eb94cd68a646b Author: Yangbo Lu Date: Fri Sep 18 17:07:59 2020 +0800 dpaa2-eth: define a global ptp_qoriq structure pointer Define a global ptp_qoriq structure pointer, and export to use. The ptp clock operations will be used in dpaa2-eth driver. For example, supporting one step timestamping needs to write current time to hardware frame annotation before sending and then hardware inserts the delay time on frame during sending. So in driver, at least clock gettime operation will be needed to make sure right time is written to hardware frame annotation for one step timestamping. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 23cd4f27f1d6d19aae7bbf0ff44b9b88036a6f96 Author: Yangbo Lu Date: Fri Sep 18 17:07:58 2020 +0800 dpaa2-eth: add APIs of 1588 single step timestamping This patch is to add APIs of 1588 single step timestamping. - dpni_set_single_step_cfg - dpni_get_single_step_cfg Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 7b066d173b6de76153396162085382f35010f7b4 Author: Zeng Tao Date: Fri Sep 18 15:14:30 2020 +0800 net: openswitch: reuse the helper variable to improve the code readablity In the function ovs_ct_limit_exit, there is already a helper vaibale which could be reused to improve the readability, so i fix it in this patch. Signed-off-by: Zeng Tao Signed-off-by: David S. Miller commit 3753d9779038ab011e01b949253492aaa37bf57a Author: Mahesh Bandewar Date: Thu Sep 17 22:08:32 2020 -0700 net: fix build without CONFIG_SYSCTL definition Earlier commit 316cdaa1158a ("net: add option to not create fall-back tunnels in root-ns as well") removed the CONFIG_SYSCTL to enable the kernel-commandline to work. However, this variable gets defined only when CONFIG_SYSCTL option is selected. With this change the behavior would default to creating fall-back tunnels in all namespaces when CONFIG_SYSCTL is not selected and the kernel commandline option will be ignored. Fixes: 316cdaa1158a ("net: add option to not create fall-back tunnels in root-ns as well") Signed-off-by: Mahesh Bandewar Reported-by: Randy Dunlap Reported-by: kernel test robot Acked-by: Randy Dunlap # build-tested Signed-off-by: David S. Miller commit d134b78ee34823c607875c77426e18c762a911ea Merge: 785a2b1036273 4bbd026cb9037 Author: David S. Miller Date: Fri Sep 18 14:12:43 2020 -0700 Merge branch 'net-various-delete-duplicated-words' Randy Dunlap says: ==================== net: various: delete duplicated words [PATCH 1/7 net-next] net: core: delete duplicated words [PATCH 2/7 net-next] net: rds: delete duplicated words [PATCH 3/7 net-next] net: ipv6: delete duplicated words [PATCH 4/7 net-next] net: bluetooth: delete duplicated words [PATCH 5/7 net-next] net: tipc: delete duplicated words [PATCH 6/7 net-next] net: atm: delete duplicated words [PATCH 7/7 net-next] net: bridge: delete duplicated words ==================== Signed-off-by: David S. Miller commit 4bbd026cb9037d8da0979e8725944336cf62d0c1 Author: Randy Dunlap Date: Thu Sep 17 21:35:21 2020 -0700 net: bridge: delete duplicated words Drop repeated words in net/bridge/. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Roopa Prabhu Cc: Nikolay Aleksandrov Cc: bridge@lists.linux-foundation.org Signed-off-by: David S. Miller commit 563f63e3967df608f45fb3ee37eea51e5229f6d0 Author: Randy Dunlap Date: Thu Sep 17 21:35:20 2020 -0700 net: atm: delete duplicated words Drop repeated words in net/atm/. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Chas Williams <3chas3@gmail.com> Cc: linux-atm-general@lists.sourceforge.net Signed-off-by: David S. Miller commit 604621911603741ae33c9c5e2c9a0332ac9ccb52 Author: Randy Dunlap Date: Thu Sep 17 21:35:19 2020 -0700 net: tipc: delete duplicated words Drop repeated words in net/tipc/. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Jon Maloy Cc: Ying Xue Cc: tipc-discussion@lists.sourceforge.net Signed-off-by: David S. Miller commit bb6d6895e2f90aaffe8568ff3e7612ca1b5a5f93 Author: Randy Dunlap Date: Thu Sep 17 21:35:18 2020 -0700 net: bluetooth: delete duplicated words Drop repeated words in net/bluetooth/. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Alexey Kuznetsov Cc: Hideaki YOSHIFUJI Signed-off-by: David S. Miller commit 634a63e73f059439bb44d1c26ba742ee6311957e Author: Randy Dunlap Date: Thu Sep 17 21:35:17 2020 -0700 net: ipv6: delete duplicated words Drop repeated words in net/ipv6/. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit d936b1d537dfd66d78ecd8cff2e1841be407aa16 Author: Randy Dunlap Date: Thu Sep 17 21:35:16 2020 -0700 net: rds: delete duplicated words Drop repeated words in net/rds/. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Santosh Shilimkar Cc: linux-rdma@vger.kernel.org Cc: rds-devel@oss.oracle.com Signed-off-by: David S. Miller commit 4250b75b40c5d2de6d5a180723f68167bf9b006a Author: Randy Dunlap Date: Thu Sep 17 21:35:15 2020 -0700 net: core: delete duplicated words Drop repeated words in net/core/. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit 785a2b1036273f6b7f78740cc4b0f32ffc9846f5 Author: Lijun Pan Date: Thu Sep 17 21:12:46 2020 -0500 Revert "ibmvnic: remove never executed if statement" This reverts commit 550f4d46aff6fe57c9b1c6719c3c9de2237d7ac2. adapter->from_passive_init may be changed in ibmvnic_handle_crq while ibmvnic_reset_init is waiting for the completion of adapter->init_done. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit b62590a92058f3edf8884b46312848e8aafe0922 Author: Alain Volmat Date: Tue Sep 15 11:11:41 2020 +0200 i2c: stm32: name slave slot to ease maintenance Name slave slots in order to ease code maintenance. Signed-off-by: Alain Volmat Signed-off-by: Wolfram Sang commit b713aa86df99f117f2ccee0ce22be03a54d24a90 Author: Krzysztof Kozlowski Date: Wed Sep 2 17:06:37 2020 +0200 i2c: bcm2835: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Signed-off-by: Wolfram Sang commit 43f83cd020bea8bcbfdd3f87d8be889b4356ea34 Author: Krzysztof Kozlowski Date: Wed Sep 2 17:06:43 2020 +0200 i2c: mux: reg: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Acked-by: Peter Rosin Signed-off-by: Wolfram Sang commit 432d159a02bdca446578290015d0874e26fc5342 Author: Krzysztof Kozlowski Date: Wed Sep 2 17:06:42 2020 +0200 i2c: mux: gpmux: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Acked-by: Peter Rosin Signed-off-by: Wolfram Sang commit 74779f6eeb5a1bbe0acc046a99a2ac5042e9a505 Author: Wolfram Sang Date: Sat Aug 29 22:38:10 2020 +0200 i2c: rcar: refactor and shorten timeout when resetting LOOP_TIMEOUT was only used back then because we didn't want to introduce another constant. The timeout value can easily be a magnitude shorter because the typical range is 3us - 8us. Refactor the code to use the poll_timeout helper, use a specific timeout value and get rid of the ugly LOOP_TIMEOUT constant. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Signed-off-by: Wolfram Sang commit 9374ed1dfe1f862f6dd7552b8164252fe5cc424f Author: Wolfram Sang Date: Sat Aug 29 22:38:09 2020 +0200 i2c: rcar: improve bus busy detection I2C doesn't define a timeout for bus busy, so an arbitrary value like LOOP_TIMEOUT is not a good idea. Let's use the timeout value in struct adapter which is meant for such cases and is user-configurable (via IOCTL). To reduce the load, wait 10us instead of 1us which is good enough for the slow frequencies used by I2C. Finally, use the poll_timeout helper instead of open coding it. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Signed-off-by: Wolfram Sang commit 6af077194600d5445f802ce4587a3254a215a851 Author: Alain Volmat Date: Mon Aug 3 07:17:56 2020 +0200 i2c: stm32f7: Add SMBus Host-Notify protocol support Rely on the core functions to implement the host-notify protocol via the a I2C slave device. Signed-off-by: Alain Volmat Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit 5d7d28e5fff9668ee8ea6a5f1459276330767aa9 Merge: cb589a55f45af 23700da29b83e Author: David S. Miller Date: Fri Sep 18 13:58:37 2020 -0700 Merge branch 'tipc-add-more-features-to-TIPC-encryption' Tuong Lien says: ==================== tipc: add more features to TIPC encryption This series adds some new features to TIPC encryption: - Patch 1 ("tipc: optimize key switching time and logic") optimizes the code and logic in preparation for the following commits. - Patch 2 ("tipc: introduce encryption master key") introduces support of 'master key' for authentication of new nodes and key exchange. A master key can be set/changed by user via netlink (eg. using the same 'tipc node set key' command in iproute2/tipc). - Patch 3 ("tipc: add automatic session key exchange") allows a session key to be securely exchanged between nodes as needed. - Patch 4 ("tipc: add automatic rekeying for encryption key") adds automatic 'rekeying' of session keys a specific interval. The new key will be distributed automatically to peer nodes, so become active then. The rekeying interval is configurable via netlink as well. v2: update the "tipc: add automatic session key exchange" patch to fix "implicit declaration" issue when built without "CONFIG_TIPC_CRYPTO". v3: update the patches according to David comments by using the "genl_info->extack" for messages in response to netlink user config requests. ==================== Signed-off-by: David S. Miller commit 23700da29b83e859a8c3727fddd33ba74c4f3a39 Author: Tuong Lien Date: Fri Sep 18 08:17:29 2020 +0700 tipc: add automatic rekeying for encryption key Rekeying is required for security since a key is less secure when using for a long time. Also, key will be detached when its nonce value (or seqno ...) is exhausted. We now make the rekeying process automatic and configurable by user. Basically, TIPC will at a specific interval generate a new key by using the kernel 'Random Number Generator' cipher, then attach it as the node TX key and securely distribute to others in the cluster as RX keys (- the key exchange). The automatic key switching will then take over, and make the new key active shortly. Afterwards, the traffic from this node will be encrypted with the new session key. The same can happen in peer nodes but not necessarily at the same time. For simplicity, the automatically generated key will be initiated as a per node key. It is not too hard to also support a cluster key rekeying (e.g. a given node will generate a unique cluster key and update to the others in the cluster...), but that doesn't bring much benefit, while a per-node key is even more secure. We also enable user to force a rekeying or change the rekeying interval via netlink, the new 'set key' command option: 'TIPC_NLA_NODE_REKEYING' is added for these purposes as follows: - A value >= 1 will be set as the rekeying interval (in minutes); - A value of 0 will disable the rekeying; - A value of 'TIPC_REKEYING_NOW' (~0) will force an immediate rekeying; The default rekeying interval is (60 * 24) minutes i.e. done every day. There isn't any restriction for the value but user shouldn't set it too small or too large which results in an "ineffective" rekeying (thats ok for testing though). Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit 1ef6f7c9390ff5308c940ff8d0a53533a4673ad9 Author: Tuong Lien Date: Fri Sep 18 08:17:28 2020 +0700 tipc: add automatic session key exchange With support from the master key option in the previous commit, it becomes easy to make frequent updates/exchanges of session keys between authenticated cluster nodes. Basically, there are two situations where the key exchange will take in place: - When a new node joins the cluster (with the master key), it will need to get its peer's TX key, so that be able to decrypt further messages from that peer. - When a new session key is generated (by either user manual setting or later automatic rekeying feature), the key will be distributed to all peer nodes in the cluster. A key to be exchanged is encapsulated in the data part of a 'MSG_CRYPTO /KEY_DISTR_MSG' TIPC v2 message, then xmit-ed as usual and encrypted by using the master key before sending out. Upon receipt of the message it will be decrypted in the same way as regular messages, then attached as the sender's RX key in the receiver node. In this way, the key exchange is reliable by the link layer, as well as security, integrity and authenticity by the crypto layer. Also, the forward security will be easily achieved by user changing the master key actively but this should not be required very frequently. The key exchange feature is independent on the presence of a master key Note however that the master key still is needed for new nodes to be able to join the cluster. It is also optional, and can be turned off/on via the sysfs: 'net/tipc/key_exchange_enabled' [default 1: enabled]. Backward compatibility is guaranteed because for nodes that do not have master key support, key exchange using master key ie. tx_key = 0 if any will be shortly discarded at the message validation step. In other words, the key exchange feature will be automatically disabled to those nodes. v2: fix the "implicit declaration of function 'tipc_crypto_key_flush'" error in node.c. The function only exists when built with the TIPC "CONFIG_TIPC_CRYPTO" option. v3: use 'info->extack' for a message emitted due to netlink operations instead (- David's comment). Reported-by: kernel test robot Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit daef1ee3798b25e8464b8eb618eaa74b8f423ac7 Author: Tuong Lien Date: Fri Sep 18 08:17:27 2020 +0700 tipc: introduce encryption master key In addition to the supported cluster & per-node encryption keys for the en/decryption of TIPC messages, we now introduce one option for user to set a cluster key as 'master key', which is simply a symmetric key like the former but has a longer life cycle. It has two purposes: - Authentication of new member nodes in the cluster. New nodes, having no knowledge of current session keys in the cluster will still be able to join the cluster as long as they know the master key. This is because all neighbor discovery (LINK_CONFIG) messages must be encrypted with this key. - Encryption of session encryption keys during automatic exchange and update of those.This is a feature we will introduce in a later commit in this series. We insert the new key into the currently unused slot 0 in the key array and start using it immediately once the user has set it. After joining, a node only knowing the master key should be fully communicable to existing nodes in the cluster, although those nodes may have their own session keys activated (i.e. not the master one). To support this, we define a 'grace period', starting from the time a node itself reports having no RX keys, so the existing nodes will use the master key for encryption instead. The grace period can be extended but will automatically stop after e.g. 5 seconds without a new report. This is also the basis for later key exchanging feature as the new node will be impossible to decrypt anything without the support from master key. For user to set a master key, we define a new netlink flag - 'TIPC_NLA_NODE_KEY_MASTER', so it can be added to the current 'set key' netlink command to specify the setting key to be a master key. Above all, the traditional cluster/per-node key mechanism is guaranteed to work when user comes not to use this master key option. This is also compatible to legacy nodes without the feature supported. Even this master key can be updated without any interruption of cluster connectivity but is so is needed, this has to be coordinated and set by the user. Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit f779bf792284fed78fedee61b46df2d4652636d3 Author: Tuong Lien Date: Fri Sep 18 08:17:26 2020 +0700 tipc: optimize key switching time and logic We reduce the lasting time for a pending TX key to be active as well as for a passive RX key to be freed which generally helps speed up the key switching. It is not expected to be too fast but should not be too slow either. Also the key handling logic is simplified that a pending RX key will be removed automatically if it is found not working after a number of times; the probing for a pending TX key is now carried on a specific message user ('LINK_PROTOCOL' or 'LINK_CONFIG') which is more efficient than using a timer on broadcast messages, the timer is reserved for use later as needed. The kernel logs or 'pr***()' are now made as clear as possible to user. Some prints are added, removed or changed to the debug-level. The 'TIPC_CRYPTO_DEBUG' definition is removed, and the 'pr_debug()' is used instead which will be much helpful in runtime. Besides we also optimize the code in some other places as a preparation for later commits. v2: silent more kernel logs, also use 'info->extack' for a message emitted due to netlink operations instead (- David's comments). Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit b6ed6cf4a3acdeab9aed8e0a524850761ec9b152 Author: Ilya Leoshkevich Date: Tue Sep 15 13:38:15 2020 +0200 selftests/bpf: Fix endianness issue in sk_assign server_map's value size is 8, but the test tries to put an int there. This sort of works on x86 (unless followed by non-0), but hard fails on s390. Fix by using __s64 instead of int. Fixes: 2d7824ffd25c ("selftests: bpf: Add test for sk_assign") Signed-off-by: Ilya Leoshkevich Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200915113815.3768217-1-iii@linux.ibm.com commit cb589a55f45af3c96c4c828eeb78b52584d483e0 Merge: 0e4be9e57e8cb 30b5191ad103b Author: David S. Miller Date: Fri Sep 18 13:54:23 2020 -0700 Merge branch 'ionic-add-devlink-dev-flash-support' Shannon Nelson says: ==================== ionic: add devlink dev flash support Add support for using devlink's dev flash facility to update the firmware on an ionic device, and add a new timeout parameter to the devlink flash netlink message. For long-running flash commands, we add a timeout element to the dev flash notify message in order for a userland utility to display a timeout deadline to the user. This allows the userland utility to display a count down to the user when a firmware update action is otherwise going to go for ahile without any updates. An example use is added to the netdevsim module. The ionic driver uses this timeout element in its new flash function. The driver uses a simple model of pushing the firmware file to the NIC, asking the NIC to unpack and install the file into the device, and then selecting it for the next boot. If any of these steps fail, the whole transaction is failed. A couple of the steps can take a long time, so we use the timeout status message rather than faking it with bogus done/total messages. The driver doesn't currently support doing these steps individually. In the future we want to be able to list the FW that is installed and selectable but we don't yet have the API to fully support that. v5: pulled the cmd field back out of the new params struct changed netdevsim example message to "Flash select" v4: Added a new devlink status notify message for showing timeout information, and modified the ionic fw update to use it for its long running firmware commands. v3: Changed long dev_cmd timeout on status check calls to a loop around calls with a normal timeout, which allows for more intermediate log messaging when in a long wait, and for letting other threads run dev_cmds if waiting. v2: Changed "Activate" to "Select" in status messages. ==================== Signed-off-by: David S. Miller commit 30b5191ad103b8ebfbbbeb3f45dc511c3156cfe6 Author: Shannon Nelson Date: Thu Sep 17 18:13:27 2020 -0700 ionic: add devlink firmware update Add support for firmware update through the devlink interface. This update copies the firmware object into the device, asks the current firmware to install it, then asks the firmware to select the new firmware for the next boot-up. The install and select steps are launched as asynchronous requests, which are then followed up with status request commands. These status request commands will be answered with an EAGAIN return value and will try again until the request has completed or reached the timeout specified. Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 87c905d84f3714a1b57b9e245961ef8b1b9ad2db Author: Shannon Nelson Date: Thu Sep 17 18:13:26 2020 -0700 ionic: update the fw update api Add the rest of the firmware api bits needed to support the driver running a firmware update. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit b311b001dea14555753c6c4f1f089689a18413bb Author: Shannon Nelson Date: Thu Sep 17 18:13:25 2020 -0700 netdevsim: devlink flash timeout message Add a simple devlink flash timeout message to exercise the message mechanism. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 6700acc5f1fe97b5705832f2678cba9e9756a0dc Author: Shannon Nelson Date: Thu Sep 17 18:13:24 2020 -0700 devlink: collect flash notify params into a struct The dev flash status notify function parameter lists are getting rather long, so add a struct to be filled and passed rather than continuously changing the function signatures. Signed-off-by: Shannon Nelson Reviewed-by: Jacob Keller Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit f92970c694b36a4dbac2b650b173c78c0f0954cc Author: Shannon Nelson Date: Thu Sep 17 18:13:23 2020 -0700 devlink: add timeout information to status_notify Add a timeout element to the DEVLINK_CMD_FLASH_UPDATE_STATUS netlink message for use by a userland utility to show that a particular firmware flash activity may take a long but bounded time to finish. Also add a handy helper for drivers to make use of the new timeout value. UI usage hints: - if non-zero, add timeout display to the end of the status line [component] status_msg ( Xm Ys : Am Bs ) using the timeout value for Am Bs and updating the Xm Ys every second - if the timeout expires while awaiting the next update, display something like [component] status_msg ( timeout reached : Am Bs ) - if new status notify messages are received, remove the timeout and start over Signed-off-by: Shannon Nelson Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 0e4be9e57e8cb8f2130280c26a2d6de9c06a8500 Author: Francesco Ruggeri Date: Fri Sep 18 13:19:01 2020 -0700 net: use exponential backoff in netdev_wait_allrefs The combination of aca_free_rcu, introduced in commit 2384d02520ff ("net/ipv6: Add anycast addresses to a global hashtable"), and fib6_info_destroy_rcu, introduced in commit 9b0a8da8c4c6 ("net/ipv6: respect rcu grace period before freeing fib6_info"), can result in an extra rcu grace period being needed when deleting an interface, with the result that netdev_wait_allrefs ends up hitting the msleep(250), which is considerably longer than the required grace period. This can result in long delays when deleting a large number of interfaces, and it can be observed with this script: ns=dummy-ns NIFS=100 ip netns add $ns ip netns exec $ns ip link set lo up ip netns exec $ns sysctl net.ipv6.conf.default.disable_ipv6=0 ip netns exec $ns sysctl net.ipv6.conf.default.forwarding=1 for ((i=0; i<$NIFS; i++)) do if=eth$i ip netns exec $ns ip link add $if type dummy ip netns exec $ns ip link set $if up ip netns exec $ns ip -6 addr add 2021:$i::1/120 dev $if done for ((i=0; i<$NIFS; i++)) do if=eth$i ip netns exec $ns ip link del $if done ip netns del $ns Instead of using a fixed msleep(250), this patch tries an extra rcu_barrier() followed by an exponential backoff. Time with this patch on a 5.4 kernel: real 0m7.704s user 0m0.385s sys 0m1.230s Time without this patch: real 0m31.522s user 0m0.438s sys 0m1.156s v2: use exponential backoff instead of trying to wake up netdev_wait_allrefs. v3: preserve reverse christmas tree ordering of local variables v4: try an extra rcu_barrier before the backoff, plus some cosmetic changes. Signed-off-by: Francesco Ruggeri Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 6d1349c769ea28543bdde20a658cbc93c3bc936d Author: Al Viro Date: Fri Sep 18 16:45:50 2020 -0400 [PATCH] reduce boilerplate in fsid handling Get rid of boilerplate in most of ->statfs() instances... Signed-off-by: Al Viro commit 63fafc5a046b1e21756de691b48f0c70c25e1426 Author: Jerome Brunet Date: Tue Sep 15 16:19:21 2020 +0200 arm64: dts: meson: initial support for aml-s905x-cc v2 Add initial support for the libretech aml-s905x-cc (Le Potato) v2 Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200915141921.57258-3-jbrunet@baylibre.com commit 0748c77fc8dc6bb20f9af395872ea35d8ac85998 Author: Jerome Brunet Date: Tue Sep 15 16:19:20 2020 +0200 dt-bindings: arm: amlogic: add support for libretch s905x cc v2 Add support for the 2nd version of the libretch aml-s905x-cc. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200915141921.57258-2-jbrunet@baylibre.com commit 98d24896ee117b1f0969405476c943e9307e30d4 Author: Christian Hewitt Date: Tue Sep 15 17:24:32 2020 +0200 arm64: dts: meson: add support for the ODROID-N2+ HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher clock speeds than the original ODROID-N2. The rev. C support a slighly higher VDDCPU_A & VDDCPU_B voltages and supports the same OPPs as the Amlogic A311D SoC from the same G12B family. Suggested-by: Dongjin Kim Signed-off-by: Christian Hewitt Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20200915152432.30616-4-narmstrong@baylibre.com commit 88ba71cdc5497390350c87e68ce35688e88be3e8 Author: Christian Hewitt Date: Tue Sep 15 17:24:31 2020 +0200 dt-bindings: arm: amlogic: add support for the ODROID-N2+ HardKernel ODROID-N2+ uses a revised Amlogic S922X v2 chip that supports higher cpu clock speeds than the original ODROID-N2. Signed-off-by: Christian Hewitt Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman Acked-by: Rob Herring Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20200915152432.30616-3-narmstrong@baylibre.com commit ef599f5f3e10bf1979d8ece29fd7fa511fedd59d Author: Christian Hewitt Date: Tue Sep 15 17:24:30 2020 +0200 arm64: dts: meson: convert ODROID-N2 to dtsi Convert the current ODROID-N2 dts into a common dtsi in preparation for adding ODROID-N2+ support. Signed-off-by: Christian Hewitt Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman Acked-by: Neil Armstrong Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20200915152432.30616-2-narmstrong@baylibre.com commit 525054782a74d28503c3f585e00d9860d67d7ad1 Author: Neil Armstrong Date: Thu Sep 17 08:47:02 2020 +0200 soc: amlogic: meson-ee-pwrc: add support for the Meson AXG SoCs The Power Controller in the Amlogic AXG SoCs is similar to the GXL one but with less VPU memory domains to enable and a supplementary Audio memory power domain. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20200917064702.1459-3-narmstrong@baylibre.com commit 97de44c5ecd413d3da3d4ace74272a1ad6a409ca Author: Neil Armstrong Date: Thu Sep 17 08:47:01 2020 +0200 dt-bindings: power: amlogic, meson-ee-pwrc: add Amlogic AXG power controller bindings This add the bindings of the Power Controller found in the Amlogic AXG SoCs. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman Reviewed-by: Rob Herring Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20200917064702.1459-2-narmstrong@baylibre.com commit 911d5bd5e7b8531b39301c2c27e5b90d7bd71b88 Author: Jingwen Chen Date: Thu Sep 17 15:58:40 2020 +0800 drm/amd/pm: Skip smu_post_init in SRIOV smu_post_init needs to enable SMU feature, while this require virtualization off. Skip it since this feature is not used in SRIOV. v2: move the check to the early stage of smu_post_init. v3: fix typo Signed-off-by: Jingwen Chen Reviewed-by: Emily.Deng Signed-off-by: Alex Deucher commit e491214613ffe52516df623d81e06e6999bbaaed Author: Evan Quan Date: Fri Sep 18 10:31:14 2020 +0800 drm/amd/pm: apply dummy reads workaround for CDR enabled only For CDR disabled case, the dummy reads workaround is not needed. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 15e5d5b45b2b7072214af519357a1c0af078c50b Author: Valentin Schneider Date: Tue Sep 1 21:55:49 2020 +0100 arch_topology, arm, arm64: define arch_scale_freq_invariant() arch_scale_freq_invariant() is used by schedutil to determine whether the scheduler's load-tracking signals are frequency invariant. Its definition is overridable, though by default it is hardcoded to 'true' if arch_scale_freq_capacity() is defined ('false' otherwise). This behaviour is not overridden on arm, arm64 and other users of the generic arch topology driver, which is somewhat precarious: arch_scale_freq_capacity() will always be defined, yet not all cpufreq drivers are guaranteed to drive the frequency invariance scale factor setting. In other words, the load-tracking signals may very well *not* be frequency invariant. Now that cpufreq can be queried on whether the current driver is driving the Frequency Invariance (FI) scale setting, the current situation can be improved. This combines the query of whether cpufreq supports the setting of the frequency scale factor, with whether all online CPUs are counter-based FI enabled. While cpufreq FI enablement applies at system level, for all CPUs, counter-based FI support could also be used for only a subset of CPUs to set the invariance scale factor. Therefore, if cpufreq-based FI support is present, we consider the system to be invariant. If missing, we require all online CPUs to be counter-based FI enabled in order for the full system to be considered invariant. If the system ends up not being invariant, a new condition is needed in the counter initialization code that disables all scale factor setting based on counters. Precedence of counters over cpufreq use is not important here. The invariant status is only given to the system if all CPUs have at least one method of setting the frequency scale factor. Signed-off-by: Valentin Schneider Signed-off-by: Ionela Voinescu Acked-by: Catalin Marinas Acked-by: Viresh Kumar Reviewed-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki commit ecddc3a0d5d752071c627aa1a1d4d7b529ddae67 Author: Valentin Schneider Date: Tue Sep 1 21:55:48 2020 +0100 arch_topology, cpufreq: constify arch_* cpumasks The passed cpumask arguments to arch_set_freq_scale() and arch_freq_counters_available() are only iterated over, so reflect this in the prototype. This also allows to pass system cpumasks like cpu_online_mask without getting a warning. Signed-off-by: Valentin Schneider Signed-off-by: Ionela Voinescu Acked-by: Catalin Marinas Acked-by: Viresh Kumar Reviewed-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki commit 874f635310648a5adcedbd7e02ea0555cfa1da56 Author: Ionela Voinescu Date: Tue Sep 1 21:55:47 2020 +0100 cpufreq: report whether cpufreq supports Frequency Invariance (FI) Now that the update of the FI scale factor is done in cpufreq core for selected functions - target(), target_index() and fast_switch(), we can provide feedback to the task scheduler and architecture code on whether cpufreq supports FI. For this purpose provide an external function to expose whether the cpufreq drivers support FI, by using a static key. The logic behind the enablement of cpufreq-based invariance is as follows: - cpufreq-based invariance is disabled by default - cpufreq-based invariance is enabled if any of the callbacks above is implemented while the unsupported setpolicy() is not The cpufreq_supports_freq_invariance() function only returns whether cpufreq is instrumented with the arch_set_freq_scale() calls that result in support for frequency invariance. Due to the lack of knowledge on whether the implementation of arch_set_freq_scale() actually results in the setting of a scale factor based on cpufreq information, it is up to the architecture code to ensure the setting and provision of the scale factor to the scheduler. Signed-off-by: Ionela Voinescu Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 1a0419b0db4647107a9cf4a28b331c343c0378a0 Author: Ionela Voinescu Date: Tue Sep 1 21:55:46 2020 +0100 cpufreq: move invariance setter calls in cpufreq core To properly scale its per-entity load-tracking signals, the task scheduler needs to be given a frequency scale factor, i.e. some image of the current frequency the CPU is running at. Currently, this scale can be computed either by using counters (APERF/MPERF on x86, AMU on arm64), or by piggy-backing on the frequency selection done by cpufreq. For the latter, drivers have to explicitly set the scale factor themselves, despite it being purely boiler-plate code: the required information depends entirely on the kind of frequency switch callback implemented by the driver, i.e. either of: target_index(), target(), fast_switch() and setpolicy(). The fitness of those callbacks with regard to driving the Frequency Invariance Engine (FIE) is studied below: target_index() ============== Documentation states that the chosen frequency "must be determined by freq_table[index].frequency". It isn't clear if it *has* to be that frequency, or if it can use that frequency value to do some computation that ultimately leads to a different frequency selection. All drivers go for the former, while the vexpress-spc-cpufreq has an atypical implementation which is handled separately. Therefore, the hook works on the assumption the core can use freq_table[index].frequency. target() ======= This has been flagged as deprecated since: commit 9c0ebcf78fde ("cpufreq: Implement light weight ->target_index() routine") It also doesn't have that many users: gx-suspmod.c:439: .target = cpufreq_gx_target, s3c24xx-cpufreq.c:428: .target = s3c_cpufreq_target, intel_pstate.c:2528: .target = intel_cpufreq_target, cppc_cpufreq.c:401: .target = cppc_cpufreq_set_target, cpufreq-nforce2.c:371: .target = nforce2_target, sh-cpufreq.c:163: .target = sh_cpufreq_target, pcc-cpufreq.c:573: .target = pcc_cpufreq_target, Similarly to the path taken for target_index() calls in the cpufreq core during a frequency change, all of the drivers above will mark the end of a frequency change by a call to cpufreq_freq_transition_end(). Therefore, cpufreq_freq_transition_end() can be used as the location for the arch_set_freq_scale() call to potentially inform the scheduler of the frequency change. This change maintains the previous functionality for the drivers that implement the target_index() callback, while also adding support for the few drivers that implement the deprecated target() callback. fast_switch() ============= This callback *has* to return the frequency that was selected. setpolicy() =========== This callback does not have any designated way of informing what was the end choice. But there are only two drivers using setpolicy(), and none of them have current FIE support: drivers/cpufreq/longrun.c:281: .setpolicy = longrun_set_policy, drivers/cpufreq/intel_pstate.c:2215: .setpolicy = intel_pstate_set_policy, The intel_pstate is known to use counter-driven frequency invariance. Conclusion ========== Given that the significant majority of current FIE enabled drivers use callbacks that lend themselves to triggering the setting of the FIE scale factor in a generic way, move the invariance setter calls to cpufreq core. As a result of setting the frequency scale factor in cpufreq core, after callbacks that lend themselves to trigger it, remove this functionality from the driver side. To be noted that despite marking a successful frequency change, many cpufreq drivers will consider the new frequency as the requested frequency, although this is might not be the one granted by the hardware. Therefore, the call to arch_set_freq_scale() is a "best effort" one, and it is up to the architecture if the new frequency is used in the new frequency scale factor setting (determined by the implementation of arch_set_freq_scale()) or eventually used by the scheduler (determined by the implementation of arch_scale_freq_capacity()). The architecture is in a better position to decide if it has better methods to obtain more accurate information regarding the current frequency and use that information instead (for example, the use of counters). Also, the implementation to arch_set_freq_scale() will now have to handle error conditions (current frequency == 0) in order to prevent the overhead in cpufreq core when the default arch_set_freq_scale() implementation is used. Signed-off-by: Ionela Voinescu Suggested-by: Valentin Schneider Acked-by: Viresh Kumar Acked-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki commit 0a10d3fe3e5c601031676e81b41fb2977650b4d4 Author: Ionela Voinescu Date: Tue Sep 1 21:55:45 2020 +0100 arch_topology: validate input frequencies to arch_set_freq_scale() The current frequency passed to arch_set_freq_scale() could end up being 0, signaling an error in setting a new frequency. Also, if the maximum frequency in 0, this will result in a division by 0 error. Therefore, validate these input values before using them for the setting of the frequency scale factor. Signed-off-by: Ionela Voinescu Acked-by: Viresh Kumar Reviewed-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki commit fb136219f0e2b417d84e67b2a3adc1f933997d04 Author: Julien Thierry Date: Tue Sep 15 08:53:17 2020 +0100 objtool: Ignore unreachable fake jumps It is possible for alternative code to unconditionally jump out of the alternative region. In such a case, if a fake jump is added at the end of the alternative instructions, the fake jump will never be reached. Since the fake jump is just a mean to make sure code validation does not go beyond the set of alternatives, reaching it is not a requirement. Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit f4f803984c3685f416a74e9e2fa7d39bdafbe02b Author: Julien Thierry Date: Tue Sep 15 08:53:16 2020 +0100 objtool: Remove useless tests before save_reg() save_reg already checks that the register being saved does not already have a saved state. Remove redundant checks before processing a register storing operation. Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit ac15a54e03d13686d2fc016a88311801b0734046 Author: Marc Zyngier Date: Fri Sep 18 17:19:46 2020 +0100 arm: Move ipi_teardown() to a CONFIG_HOTPLUG_CPU section ipi_teardown() is only used when CONFIG_HOTPLUG_CPU is enabled. Move the function to a location guarded by this config option. Signed-off-by: Marc Zyngier commit 2ce6324eadb014136a4baaf7a174f47d771364a0 Author: Srinivas Pandruvada Date: Tue Sep 15 16:18:14 2020 -0700 ACPI: DPTF: Add PCH FIVR participant driver This driver adds support for Dynamic Platform and Thermal Framework (DPTF) PCH (Platform Controller Hub) FIVR (Fully Integrated Voltage Regulator) participant support. This participant is responsible for exposing platform telemetry and control for: freq_mhz_high_clock freq_mhz_low_clock These attributes are used to get and set PCH FIVR switching frequency for thermal and radio frequency interference mitigation. Refer to Documentation/ABI/testing/sysfs-platform-dptf for ABI details. ACPI methods description used in this driver: RFC0: This ACPI method to set PCH FIVR switching frequency when FIVR clock is 19.2MHz or 24MHz. The ACPI method takes a DWORD value. GFC0: This ACPI method to get PCH FIVR switching frequency when FIVR clock is 19.2MHz or 24MHz. RFC1: This ACPI method to set PCH FIVR switching frequency when FIVR clock is 38.4MHz. The ACPI method takes a DWORD value. GFC1: This ACPI method to get PCH FIVR switching frequency when FIVR clock is 38.4MHz. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 8383da3e4a610496c6790e46e48b2b26be0cc252 Author: Jason Gunthorpe Date: Mon Sep 14 14:26:53 2020 +0300 RDMA/mlx5: Clarify what the UMR is for when creating MRs Once a mkey is created it can be modified using UMR. This is desirable for performance reasons. However, different hardware has restrictions on what modifications are possible using UMR. Make sense of these checks: - mlx5_ib_can_reconfig_with_umr() returns true if the access flags can be altered. Most cases create MRs using 0 access flags (now made clear by consistent use of set_mkc_access_pd_addr_fields()), but the old logic here was tormented. Make it clear that this is checking if the current access_flags can be modified using UMR to different access_flags. It is always OK to use UMR to change flags that all HW supports. - mlx5_ib_can_load_pas_with_umr() returns true if UMR can be used to enable and update the PAS/XLT. Enabling requires updating the entity size, so UMR ends up completely disabled on this old hardware. Make it clear why it is disabled. FRWR, ODP and cache always requires mlx5_ib_can_load_pas_with_umr(). - mlx5_ib_pas_fits_in_mr() is used to tell if an existing MR can be resized to hold a new PAS list. This only works for cached MR's because we don't store the PAS list size in other cases. To be very clear, arrange things so any pre-created MR's in the cache check the newly requested access_flags before allowing the MR to leave the cache. If UMR cannot set the required access_flags the cache fails to create the MR. This in turn means relaxed ordering and atomic are now correctly blocked early for implicit ODP on older HW. Link: https://lore.kernel.org/r/20200914112653.345244-6-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0ec52f0194638e2d284ad55eba5a7aff753de1b9 Author: Jason Gunthorpe Date: Mon Sep 14 14:26:52 2020 +0300 RDMA/mlx5: Disable IB_DEVICE_MEM_MGT_EXTENSIONS if IB_WR_REG_MR can't work set_reg_wr() always fails if !umr_modify_entity_size_disabled because mlx5_ib_can_use_umr() always fails. Without set_reg_wr() IB_WR_REG_MR doesn't work and that means the device should not advertise IB_DEVICE_MEM_MGT_EXTENSIONS. Fixes: 841b07f99a47 ("IB/mlx5: Block MR WR if UMR is not possible") Link: https://lore.kernel.org/r/20200914112653.345244-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5eb29f0d13a66502b91954597270003c90fb66c5 Author: Jason Gunthorpe Date: Mon Sep 14 14:26:51 2020 +0300 RDMA/mlx5: Make mkeys always owned by the kernel's PD when not enabled Any mkey that is not enabled and assigned to userspace should have the PD set to a kernel owned PD. When cache entries are created for the first time the PDN is set to 0, which is probably a kernel PD, but be explicit. When a MR is registered using the hybrid reg_create with UMR xlt & enable the disabled mkey is pointing at the user PD, keep it pointing at the kernel until a UMR enables it and sets the user PD. Fixes: 9ec4483a3f0f ("IB/mlx5: Move MRs to a kernel PD when freeing them to the MR cache") Link: https://lore.kernel.org/r/20200914112653.345244-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1c97ca3da0d12e0156a177f48ed3184c3f202002 Author: Jason Gunthorpe Date: Mon Sep 14 14:26:50 2020 +0300 RDMA/mlx5: Use set_mkc_access_pd_addr_fields() in reg_create() reg_create() open codes this helper, use the shared code. Link: https://lore.kernel.org/r/20200914112653.345244-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2e4e706e094a3fe654c893ac5c1c294de96be25b Author: Jason Gunthorpe Date: Mon Sep 14 14:26:49 2020 +0300 RDMA/mlx5: Remove dead check for EAGAIN after alloc_mr_from_cache() alloc_mr_from_cache() no longer returns EAGAIN, this is just dead code now. Fixes: aad719dcf379 ("RDMA/mlx5: Allow MRs to be created in the cache synchronously") Link: https://lore.kernel.org/r/20200914112653.345244-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 9d9edb962e910552c9c008800ec907293a47852e Author: YueHaibing Date: Fri Sep 18 20:33:18 2020 +0800 arm64: Fix -Wunused-function warning when !CONFIG_HOTPLUG_CPU If CONFIG_HOTPLUG_CPU is n, gcc warns: arch/arm64/kernel/smp.c:967:13: warning: ‘ipi_teardown’ defined but not used [-Wunused-function] static void ipi_teardown(int cpu) ^~~~~~~~~~~~ Use #ifdef guard this. Signed-off-by: YueHaibing Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200918123318.23764-1-yuehaibing@huawei.com commit 22d3e1ed2cc837af87f76c3c8a4ccf4455e225c5 Author: Lijun Ou Date: Thu Sep 17 21:50:15 2020 +0800 RDMA/hns: Set the unsupported wr opcode hip06 does not support IB_WR_LOCAL_INV, so the ps_opcode should be set to an invalid value instead of being left uninitialized. Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver") Fixes: a2f3d4479fe9 ("RDMA/hns: Avoid unncessary initialization") Link: https://lore.kernel.org/r/1600350615-115217-1-git-send-email-oulijun@huawei.com Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit 3e45410fe3c202ffb619f301beff0644f717e132 Author: Keita Suzuki Date: Fri Sep 11 12:51:59 2020 +0000 RDMA/qedr: Fix resource leak in qedr_create_qp When xa_insert() fails, the acquired resource in qedr_create_qp should also be freed. However, current implementation does not handle the error. Fix this by adding a new goto label that calls qedr_free_qp_resources. Fixes: 1212767e23bb ("qedr: Add wrapping generic structure for qpidr and adjust idr routines.") Link: https://lore.kernel.org/r/20200911125159.4577-1-keitasuzuki.park@sslab.ics.keio.ac.jp Signed-off-by: Keita Suzuki Acked-by: Michal Kalderon  Signed-off-by: Jason Gunthorpe commit 0fdb64c2a303e4d2562245501920241c0e507951 Author: Will Deacon Date: Tue Sep 15 15:48:09 2020 +0100 arm64: Improve diagnostics when trapping BRK with FAULT_BRK_IMM When generating instructions at runtime, for example due to kernel text patching or the BPF JIT, we can emit a trapping BRK instruction if we are asked to encode an invalid instruction such as an out-of-range] branch. This is indicative of a bug in the caller, and will result in a crash on executing the generated code. Unfortunately, the message from the crash is really unhelpful, and mumbles something about ptrace: | Unexpected kernel BRK exception at EL1 | Internal error: ptrace BRK handler: f2000100 [#1] SMP We can do better than this. Install a break handler for FAULT_BRK_IMM, which is the immediate used to encode the "I've been asked to generate an invalid instruction" error, and triage the faulting PC to determine whether or not the failure occurred in the BPF JIT. Link: https://lore.kernel.org/r/20200915141707.GB26439@willie-the-truck Reported-by: Ilias Apalodimas Signed-off-by: Will Deacon commit 41fa0f597150f2ae01ae264a70126f44e783bdc7 Merge: 8910f089606e7 cb62e0b5c8db7 Author: Marc Zyngier Date: Fri Sep 18 16:22:28 2020 +0100 Merge branch 'kvm-arm64/misc-5.10' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 8910f089606e7772933d49444fd1d7f4202a3947 Merge: 81867b75dbfde c9c0279cc02b4 Author: Marc Zyngier Date: Fri Sep 18 16:22:18 2020 +0100 Merge branch 'kvm-arm64/pt-new' into kvmarm-master/next Signed-off-by: Marc Zyngier # Conflicts: # arch/arm64/kvm/mmu.c commit 6b0290b147eab876119e0bd0f2d8bd57dd476670 Author: Manivannan Sadhasivam Date: Fri Sep 18 18:23:12 2020 +0530 arm64: defconfig: Enable Qcom SNPS Femto PHY Enable Qualcomm USB high-speed SNPS Femto phy found in Qualcomm chipsets. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200918125312.2920-1-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit c9c0279cc02b4e161686de7ccd1973357f29db8c Author: Xiaofei Tan Date: Thu Sep 17 09:47:49 2020 +0800 KVM: arm64: Fix doc warnings in mmu code Fix following warnings caused by mismatch bewteen function parameters and comments. arch/arm64/kvm/mmu.c:128: warning: Function parameter or member 'mmu' not described in '__unmap_stage2_range' arch/arm64/kvm/mmu.c:128: warning: Function parameter or member 'may_block' not described in '__unmap_stage2_range' arch/arm64/kvm/mmu.c:128: warning: Excess function parameter 'kvm' description in '__unmap_stage2_range' arch/arm64/kvm/mmu.c:499: warning: Function parameter or member 'writable' not described in 'kvm_phys_addr_ioremap' arch/arm64/kvm/mmu.c:538: warning: Function parameter or member 'mmu' not described in 'stage2_wp_range' arch/arm64/kvm/mmu.c:538: warning: Excess function parameter 'kvm' description in 'stage2_wp_range' Signed-off-by: Xiaofei Tan Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/1600307269-50957-1-git-send-email-tanxiaofei@huawei.com commit ada329e6b5b406f33fae665e62caff7814409906 Author: Alexandru Elisei Date: Tue Sep 15 18:04:42 2020 +0100 KVM: arm64: Do not flush memslot if FWB is supported As a result of a KVM_SET_USER_MEMORY_REGION ioctl, KVM flushes the dcache for the memslot being changed to ensure a consistent view of memory between the host and the guest: the host runs with caches enabled, and it is possible for the data written by the hypervisor to still be in the caches, but the guest is running with stage 1 disabled, meaning data accesses are to Device-nGnRnE memory, bypassing the caches entirely. Flushing the dcache is not necessary when KVM enables FWB, because it forces the guest to uses cacheable memory accesses. The current behaviour does not change, as the dcache flush helpers execute the cache operation only if FWB is not enabled, but walking the stage 2 table is avoided. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915170442.131635-1-alexandru.elisei@arm.com commit cb62e0b5c8db778cd29e63c2f844f36caf6859ed Author: Liu Shixin Date: Wed Sep 16 10:50:23 2020 +0800 KVM: arm64: vgic-debug: Convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200916025023.3992679-1-liushixin2@huawei.com commit 8a4374f97deefb36f927c608af63dcc925521b3c Author: Tian Tao Date: Tue Sep 15 15:21:52 2020 +0800 KVM: arm64: Fix inject_fault.c kernel-doc warnings Fix kernel-doc warnings. arch/arm64/kvm/inject_fault.c:210: warning: Function parameter or member 'vcpu' not described in 'kvm_inject_undefined' Signed-off-by: Tian Tao Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/1600154512-44624-1-git-send-email-tiantao6@hisilicon.com commit b34e9b0de3c4117e70f09ae354d763cc4dd85bdf Author: Tom Murphy Date: Thu Sep 10 13:25:38 2020 +0100 iommu/dma: Handle init_iova_flush_queue() failure in dma-iommu path The init_iova_flush_queue() function can fail if we run out of memory. Fall back to noflush queue if it fails. Signed-off-by: Tom Murphy Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20200910122539.3662-1-murphyt7@tcd.ie Signed-off-by: Joerg Roedel commit 523b3999e5f620cb5ccce6a7ca2780a4cab579a2 Author: Alexandru Elisei Date: Thu Sep 10 14:33:51 2020 +0100 KVM: arm64: Try PMD block mappings if PUD mappings are not supported When userspace uses hugetlbfs for the VM memory, user_mem_abort() tries to use the same block size to map the faulting IPA in stage 2. If stage 2 cannot the same block mapping because the block size doesn't fit in the memslot or the memslot is not properly aligned, user_mem_abort() will fall back to a page mapping, regardless of the block size. We can do better for PUD backed hugetlbfs by checking if a PMD block mapping is supported before deciding to use a page. vma_pagesize is an unsigned long, use 1UL instead of 1ULL when assigning its value. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200910133351.118191-1-alexandru.elisei@arm.com commit d41afc398fbc9dfb8c40b951e97a7f0283346c6a Author: Paul Cercueil Date: Sun Sep 6 21:29:35 2020 +0200 MAINTAINERS: Update paths to Ingenic platform code Support for Ingenic chips has been moved to the generic MIPS platform. Update the paths accordingly. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 8446fd61b5e3b64cc7800f3c9fb625fdd4012b6d Author: Paul Cercueil Date: Sun Sep 6 21:29:34 2020 +0200 MIPS: configs: Regenerate configs of Ingenic boards For each board the MACH_INGENIC_SOC option was selected instead of MACH_INGENIC. Nothing else was changed in the menuconfig. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit a103e9b951f9094792fd0dab0a0dcd1b3408825a Author: Paul Cercueil Date: Sun Sep 6 21:29:33 2020 +0200 MIPS: jz4740: Rename jz4740 folders to ingenic Now that all the jz4740 platform code has been removed, and we're left with only a Kconfig and the cpu-feature-overrides.h file, finalize the cleanup process by renaming the jz4740 and include/mach-jz4740 folders to ingenic and include/mach-ingenic. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit b4a30e9c7480603a02d8ad788975428b9c6dc876 Author: Paul Cercueil Date: Sun Sep 6 21:29:32 2020 +0200 MIPS: jz4740: Drop all obsolete files Support for Ingenic SoCs is now provided by the arch/mips/generic/ code, so all files in the arch/mips/jz4740/ folder can dropped, except for the Kconfig, and the cpu-feature-overrides.h header file. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit f0f4a753079c636d5d43a102edbde0dad1e7de51 Author: Paul Cercueil Date: Sun Sep 6 21:29:31 2020 +0200 MIPS: generic: Add support for Ingenic SoCs Add support for Ingenic SoCs in arch/mips/generic/. The Kconfig changes are here to ensure that it is possible to compile either a generic kernel that supports Ingenic SoCs, or a Ingenic-only kernel, both using the same code base, to avoid duplicated code. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 02bd530f888c6d6ba4995c3afcd10f87c136f173 Author: Paul Cercueil Date: Sun Sep 6 21:29:30 2020 +0200 MIPS: generic: Increase NR_IRQS to 256 128 IRQs is not enough to support Ingenic SoCs. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit c3e2ee657418f4f2bff1269c0550f8135ed0c927 Author: Paul Cercueil Date: Sun Sep 6 21:29:29 2020 +0200 MIPS: generic: Add support for zboot There is no reason we can't create compressed kernels here, so select the option SYS_SUPPORTS_ZBOOT. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 323690d23be14fa4b7be8bd2961810df6fe42138 Author: Paul Cercueil Date: Sun Sep 6 21:29:28 2020 +0200 MIPS: generic: Support booting with built-in or appended DTB The plat_get_fdt() checked that the kernel was booted using UHI before reading the 'fw_passed_dtb' variable. However, this variable is also set when the DT has been appended, or when it has been built into the kernel. Support these usecases by removing the UHI check. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 13a0ea28e8c698cc0d600fdeed8da3e4d478b97e Author: Paul Cercueil Date: Sun Sep 6 21:29:27 2020 +0200 MIPS: generic: Init command line with fw_init_cmdline() The function bootcmdline_init() in arch/mips/kernel/setup.c will populate the boot_command_line string using the parameters hardcoded in the kernel, and those provided in the devicetree file. Then, it would append the content of the arcs_cmdline variable, which is filled by the board's plat_mem_setup() function. The plat_mem_setup() function for the generic MIPS board would just copy the current boot_command_line to arcs_cmdline, which is nonsense for two reasons: - the result will be appended to the boot_command_line anyway, so all it does is duplicate every single parameter on the command line; - the code did not perform at all what it's supposed to, which is to retrieve the parameters passed by the bootloader. Fix this by calling fw_init_cmdline() in plat_mem_setup(), which will properly initialize arcs_cmdline to the parameters passed by the bootloader. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 8d539c6109f203bb237c7c1eb73d4665869bab1a Author: Potnuri Bharat Teja Date: Wed Sep 9 21:07:07 2020 +0530 RDMA/iw_cxgb4: Disable delayed ack by default Receive side delayed ack mode is needed only for certain area networks/ connections. Therefore disable it by default. Link: https://lore.kernel.org/r/20200909153707.2795-1-bharat@chelsio.com Signed-off-by: Potnuri Bharat Teja Signed-off-by: Jason Gunthorpe commit 8405419942f2f012dc23b5c8817eded2d591b033 Author: Paul Cercueil Date: Sun Sep 6 21:29:26 2020 +0200 MIPS: generic: Allow boards to set system type Check for the system_type variable in the get_system_type() function. If non-NULL, return it as the system type. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit c434b9f80b0923e6460031b0fd964f8b0bf3c6a6 Author: Paul Cercueil Date: Sun Sep 6 21:29:25 2020 +0200 MIPS: Kconfig: add MIPS_GENERIC_KERNEL symbol The MIPS_GENERIC symbol now won't select any other configuration option. The MIPS_GENERIC_KERNEL will select all the options that the previous MIPS_GENERIC option did select, and will select MIPS_GENERIC as well. The whole point of this, is that it now becomes possible to compile a kernel for a SoC supported by the arch/mips/generic/ code, without making that kernel generic itself. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 5f5ed0ebcf84c7479c93a28c5c0e1b0b6926883b Author: Paul Cercueil Date: Sun Sep 6 21:29:24 2020 +0200 MIPS: cpu-probe: ingenic: Fix broken BUG_ON The previous code was doing: BUG_ON(!__builtin_constant_p(cpu_has_counter) || cpu_has_counter); This only worked as the "cpu_has_counter" macro was overridden in . The default "cpu_has_counter" macro is non-constant, which triggered the BUG_ON() independently of the value returned by the macro. What we want to check here, is that *if* the macro was overridden to a compile-time constant, then must be defined to zero, otherwise it's a bug. So the correct check is: BUG_ON(__builtin_constant_p(cpu_has_counter) && cpu_has_counter); Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 5ef415107dfd42a334d62a9b7be9754817df92ed Author: Paul Cercueil Date: Sun Sep 6 21:29:23 2020 +0200 MIPS: cpu-probe: Mark XBurst CPU as having vtagged caches XBurst CPUs present in Ingenic SoCs have virtually tagged caches, according to the header. Add that information to cpu_probe_ingenic(). Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 95b1f6db67aea9135b018497f7ed4446a060cba2 Author: Paul Cercueil Date: Sun Sep 6 21:29:22 2020 +0200 MIPS: cpu-probe: Set Ingenic's writecombine to _CACHE_CACHABLE_WA Previously, in cpu_probe_ingenic(), c->writecombine was set to _CACHE_UNCACHED_ACCELERATED, but this macro was defined differently when CONFIG_MACH_INGENIC was set. This made it impossible to support multiple CPUs. Address this issue by setting c->writecombine to _CACHE_CACHABLE_WA directly and removing the dependency on CONFIG_MACH_INGENIC. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 7487abbe85afd02c35c283315cefc5e19c28d40f Author: Paul Cercueil Date: Sun Sep 6 21:29:21 2020 +0200 MIPS: configs: lb60: Fix defconfig not selecting correct board Since INGENIC_GENERIC_BOARD was introduced, the JZ4740_QI_LB60 option is no longer the default, so the symbol has to be selected by the defconfig, otherwise the kernel built will be for a generic Ingenic board and won't have the Device Tree blob built-in. Cc: stable@vger.kernel.org # v5.7 Fixes: 62249209a772 ("MIPS: ingenic: Default to a generic board") Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit e3f78d5e7e6b0825f4e646f74b0e469b023e5df4 Author: Chao Yu Date: Thu Sep 17 09:18:21 2020 +0800 erofs: remove unneeded parameter After commit 0615090c5044 ("erofs: convert compressed files from readpages to readahead"), add_to_page_cache_lru() was moved to mm code, so that in below call path, no page will be cached into @pagepool list or grabbed from @pagepool list: - z_erofs_readpage - z_erofs_do_read_page - preload_compressed_pages - erofs_allocpage Let's get rid of this unneeded @pagepool parameter. Signed-off-by: Chao Yu Link: https://lore.kernel.org/r/20200917011821.22767-1-yuchao0@huawei.com Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang commit d578b46db69d125a654f509bdc9091d84e924dc8 Author: Gao Xiang Date: Tue Aug 11 15:00:20 2020 +0800 erofs: avoid duplicated permission check for "trusted." xattrs Don't recheck it since xattr_permission() already checks CAP_SYS_ADMIN capability. Just follow 5d3ce4f70172 ("f2fs: avoid duplicated permission check for "trusted." xattrs") Reported-by: Hongyu Jin [ Gao Xiang: since it could cause some complex Android overlay permission issue as well on android-5.4+, it'd be better to backport to 5.4+ rather than pure cleanup on mainline. ] Cc: # 5.4+ Link: https://lore.kernel.org/r/20200811070020.6339-1-hsiangkao@redhat.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 639448912ba17a9af9e759efbab37d36c6e29dea Author: Thierry Reding Date: Thu Sep 17 12:07:52 2020 +0200 arm64: tegra: Initial Tegra234 VDK support The NVIDIA Tegra234 VDK is a simulation platform for the Orin SoC. It supports a subset of the peripherals that will be available in the final chip and serves as a bootstrapping platform. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 0ebdf11699d0491c0a1eee5bb5d920f4f36810ba Author: Thierry Reding Date: Thu Sep 17 12:07:51 2020 +0200 firmware: tegra: Enable BPMP support on Tegra234 Enable support for the BPMP on Tegra234 to avoid relying on Tegra194 being enabled to pull in the needed OF device ID table entry. On simulation platforms the BPMP hasn't booted up yet by the time we probe the BPMP driver and the BPMP hasn't had a chance to mark the doorbell as ringable by the CCPLEX. This corresponding check in the BPMP driver will therefore fail. Work around this by disabling the check on simulation platforms. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit e5c88986b990ce8a647554204ef84cfc5d660bb8 Merge: 9123e3a74ec7b 52e6d399a41da Author: Thierry Reding Date: Fri Sep 18 15:56:22 2020 +0200 Merge branch 'for-5.10/soc' into for-5.10/firmware commit 34e214a99689054e666cd4149500a37fa0c5ac98 Author: Thierry Reding Date: Thu Sep 17 12:07:50 2020 +0200 soc/tegra: pmc: Add Tegra234 support The PMC block is largely similar to that found on earlier chips, but not completely compatible. Allow binding to the instantiation found on Tegra234. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit f98485e4edbbbe5a691e87447a21bff0bbac574d Author: Thierry Reding Date: Thu Sep 17 12:07:49 2020 +0200 soc/tegra: pmc: Reorder reset sources/levels definitions Move the definitions of reset sources and levels into a more natural location. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 03d285230708c6d851c8c570778b748449c5b852 Author: Thierry Reding Date: Thu Sep 17 12:07:48 2020 +0200 soc/tegra: misc: Add Tegra234 support The MISC block is largely similar to that found on earlier chips, but not completely compatible. Allow binding to the instantiation found on Tegra234. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 1f44febf71ba3d8a8694669197ec5a384c8d3011 Author: Thierry Reding Date: Thu Sep 17 12:07:47 2020 +0200 soc/tegra: fuse: Add Tegra234 support Add support for FUSE block found on the Tegra234 SoC, which is largely similar to the IP found on previous generations. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 52e6d399a41da68125ec107f5f5f688a74ab7ac4 Author: Thierry Reding Date: Thu Sep 17 12:07:46 2020 +0200 soc/tegra: fuse: Implement tegra_is_silicon() This function can be used by drivers to determine whether code is running on silicon or on a simulation platform. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 775edf7856d81fde852968212cd58fc9a3f8cd7d Author: Thierry Reding Date: Thu Sep 17 12:07:45 2020 +0200 soc/tegra: fuse: Extract tegra_get_platform() This function extracts the PRE_SI_PLATFORM field from the HIDREV register and can be used to determine which platform the kernel runs on (silicon, simulation, ...). Note that while only Tegra194 and later define this field, it should be safe to call this on prior generations as well since this field should read as 0, indicating silicon. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 2312c291f6ac340af88eee0867fdfdfa2299ffc3 Author: David Heidelberg Date: Fri Aug 14 00:34:01 2020 +0300 dt-bindings: power: supply: Add device-tree binding for Summit SMB3xx Summit SMB3xx series is a Programmable Switching Li+ Battery Charger. This patch adds device-tree binding for Summit SMB345, SMB347 and SMB358 chargers. Signed-off-by: David Heidelberg Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit b198a6ed02562b1a5aaae4f22598706b912c026a Author: Thierry Reding Date: Thu Sep 17 12:07:44 2020 +0200 dt-bindings: tegra: pmc: Add Tegra234 support The PMC found on Tegra234 is mostly similar to the one on Tegra194 but supports slightly different I/O pads and wake events. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit e4fb9a715f75efb28e7d92a573bd6216ca5355ac Author: Thierry Reding Date: Thu Sep 17 12:07:43 2020 +0200 dt-bindings: fuse: tegra: Add Tegra234 support The Tegra234 FUSE block is very similar to that on prior chips but not completely compatible. Document the new compatible string. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit b0e0423cfabc1eb407baee52cabbd9df2830feb0 Author: Thierry Reding Date: Thu Sep 17 12:07:42 2020 +0200 dt-bindings: tegra: Add Tegra234 VDK compatible The NVIDIA Tegra234 VDK is a simulation platform for the Orin SoC. It supports a subset of the peripherals that will be available in the final chip and serves as a bootstrapping platform. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit c9e43d13f02785c5dc53ff62c6c94d6df8c6f978 Author: Thierry Reding Date: Thu Sep 17 12:07:41 2020 +0200 dt-bindings: misc: tegra186-misc: Add Tegra234 support The MISC block found on Tegra234 is mostly similar to the one on Tegra194 but supports slightly different register sets that make it incompatible. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit c8f413b930058726ad0bb59ac35d9241a375e905 Author: Thierry Reding Date: Thu Sep 17 12:07:40 2020 +0200 dt-bindings: misc: tegra186-misc: Add missing compatible string Add the missing compatible string for the Tegra194 MISC block. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 54cc33a3a44fc7f7d6743f7cfabc5de086a0e056 Author: Thierry Reding Date: Thu Sep 17 12:07:39 2020 +0200 dt-bindings: misc: tegra-apbmisc: Add missing compatible strings The compatible string for the Tegra210 APBMISC block was missing from the bindings. Add it and while at it, rewrite the description of the compatible string to make it clearer. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 055444c2663ba9139dec0340bf7a6b29a8a5f7f6 Author: Huacai Chen Date: Fri Sep 11 18:26:17 2020 +0800 MIPS: Loongson64: Increase NR_IRQS to 320 Modernized Loongson64 uses a hierarchical organization for interrupt controllers (INTCs), all INTC nodes (not only leaf nodes) need some IRQ numbers. This means 280 (i.e., NR_IRQS_LEGACY + NR_MIPS_CPU_IRQS + 256) is not enough to represent all interrupts, so let's increase NR_IRQS to 320 (NR_IRQS_LEGACY + NR_MIPS_CPU_IRQS + NR_MAX_CHAINED_IRQS + 256). Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 688494a407d1419a6b158c644b262c61cde39f48 Author: Mark Salter Date: Tue Sep 15 16:41:10 2020 -0400 drivers/perf: thunderx2_pmu: Fix memory resource error handling In tx2_uncore_pmu_init_dev(), a call to acpi_dev_get_resources() is used to create a list _CRS resources which is searched for the device base address. There is an error check following this: if (!rentry->res) return NULL In no case, will rentry->res be NULL, so the test is useless. Even if the test worked, it comes before the resource list memory is freed. None of this really matters as long as the ACPI table has the memory resource. Let's clean it up so that it makes sense and will give a meaningful error should firmware leave out the memory resource. Fixes: 69c32972d593 ("drivers/perf: Add Cavium ThunderX2 SoC UNCORE PMU driver") Signed-off-by: Mark Salter Link: https://lore.kernel.org/r/20200915204110.326138-2-msalter@redhat.com Signed-off-by: Will Deacon commit a76b8236edcf5b785d044b930f9e14ad02b4a484 Author: Mark Salter Date: Tue Sep 15 16:41:09 2020 -0400 drivers/perf: xgene_pmu: Fix uninitialized resource struct This splat was reported on newer Fedora kernels booting on certain X-gene based machines: xgene-pmu APMC0D83:00: X-Gene PMU version 3 Unable to handle kernel read from unreadable memory at virtual \ address 0000000000004006 ... Call trace: string+0x50/0x100 vsnprintf+0x160/0x750 devm_kvasprintf+0x5c/0xb4 devm_kasprintf+0x54/0x60 __devm_ioremap_resource+0xdc/0x1a0 devm_ioremap_resource+0x14/0x20 acpi_get_pmu_hw_inf.isra.0+0x84/0x15c acpi_pmu_dev_add+0xbc/0x21c acpi_ns_walk_namespace+0x16c/0x1e4 acpi_walk_namespace+0xb4/0xfc xgene_pmu_probe_pmu_dev+0x7c/0xe0 xgene_pmu_probe.part.0+0x2c0/0x310 xgene_pmu_probe+0x54/0x64 platform_drv_probe+0x60/0xb4 really_probe+0xe8/0x4a0 driver_probe_device+0xe4/0x100 device_driver_attach+0xcc/0xd4 __driver_attach+0xb0/0x17c bus_for_each_dev+0x6c/0xb0 driver_attach+0x30/0x40 bus_add_driver+0x154/0x250 driver_register+0x84/0x140 __platform_driver_register+0x54/0x60 xgene_pmu_driver_init+0x28/0x34 do_one_initcall+0x40/0x204 do_initcalls+0x104/0x144 kernel_init_freeable+0x198/0x210 kernel_init+0x20/0x12c ret_from_fork+0x10/0x18 Code: 91000400 110004e1 eb08009f 540000c0 (38646846) ---[ end trace f08c10566496a703 ]--- This is due to use of an uninitialized local resource struct in the xgene pmu driver. The thunderx2_pmu driver avoids this by using the resource list constructed by acpi_dev_get_resources() rather than using a callback from that function. The callback in the xgene driver didn't fully initialize the resource. So get rid of the callback and search the resource list as done by thunderx2. Fixes: 832c927d119b ("perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver") Signed-off-by: Mark Salter Link: https://lore.kernel.org/r/20200915204110.326138-1-msalter@redhat.com Signed-off-by: Will Deacon commit 152d75d66428afc636ec34bcef8c90a4aa2a7848 Author: Tian Tao Date: Wed Sep 16 10:20:47 2020 +0800 arm64: mm: Fix missing-prototypes in pageattr.c Fix the following warnings. ‘set_memory_valid’ [-Wmissing-prototypes] int set_memory_valid(unsigned long addr, int numpages, int enable) ^ ‘set_direct_map_invalid_noflush’ [-Wmissing-prototypes] int set_direct_map_invalid_noflush(struct page *page) ^ ‘set_direct_map_default_noflush’ [-Wmissing-prototypes] int set_direct_map_default_noflush(struct page *page) ^ Signed-off-by: Tian Tao Reviewed-by: Gavin Shan Link: https://lore.kernel.org/r/1600222847-56792-1-git-send-email-tiantao6@hisilicon.com arch/arm64/mm/pageattr.c:138:5: warning: no previous prototype for arch/arm64/mm/pageattr.c:150:5: warning: no previous prototype for arch/arm64/mm/pageattr.c:165:5: warning: no previous prototype for Signed-off-by: Will Deacon commit c6b90d5cf637ac1186ca25ec1f9e410455a0ca7d Author: Tian Tao Date: Tue Sep 15 16:19:59 2020 +0800 arm64/fpsimd: Fix missing-prototypes in fpsimd.c Fix the following warnings. arch/arm64/kernel/fpsimd.c:935:6: warning: no previous prototype for ‘do_sve_acc’ [-Wmissing-prototypes] arch/arm64/kernel/fpsimd.c:962:6: warning: no previous prototype for ‘do_fpsimd_acc’ [-Wmissing-prototypes] arch/arm64/kernel/fpsimd.c:971:6: warning: no previous prototype for ‘do_fpsimd_exc’ [-Wmissing-prototypes] arch/arm64/kernel/fpsimd.c:1266:6: warning: no previous prototype for ‘kernel_neon_begin’ [-Wmissing-prototypes] arch/arm64/kernel/fpsimd.c:1292:6: warning: no previous prototype for ‘kernel_neon_end’ [-Wmissing-prototypes] Signed-off-by: Tian Tao Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/1600157999-14802-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Will Deacon commit a1255fff5d9066f9f3c761cba258b75d49bd8750 Merge: 5dee5872f8755 54a38b6627d3f Author: Jason Gunthorpe Date: Fri Sep 18 09:42:21 2020 -0300 Merge branch 'mlx_sw_owner_v2' into rdma.git for-next Leon Romanovsky says: ==================== This series from Alex extends software steering interface to support devices with extra capability "sw_owner_2" which will replace existing "sw_owner". ==================== Based on the mlx5-next branch at git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux due to dependencies. * branch 'mlx5_sw_owner_v2: RDMA/mlx5: Expose TIR and QP ICM address for sw_owner_v2 devices RDMA/mlx5: Allow DM allocation for sw_owner_v2 enabled devices RDMA/mlx5: Add sw_owner_v2 bit capability commit 5dee5872f87552cfb173c899d35fc1413c2aa77f Merge: c0a6b5ecc5b7d 376ceb31ff879 Author: Jason Gunthorpe Date: Thu Sep 17 15:12:22 2020 -0300 Merge branch 'mlx5_active_speed' into rdma.git for-next Leon Romanovsky says: ==================== IBTA declares speed as 16 bits, but kernel stores it in u8. This series fixes in-kernel declaration while keeping external interface intact. ==================== Based on the mlx5-next branch at git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux due to dependencies. * branch 'mlx5_active_speed': RDMA: Fix link active_speed size RDMA/mlx5: Delete duplicated mlx5_ptys_width enum net/mlx5: Refactor query port speed functions commit 376ceb31ff879c2ee6b48eef841d6fa7720f6f43 Author: Aharon Landau Date: Thu Sep 17 12:02:23 2020 +0300 RDMA: Fix link active_speed size According to the IB spec active_speed size should be u16 and not u8 as before. Changing it to allow further extensions in offered speeds. Link: https://lore.kernel.org/r/20200917090223.1018224-4-leon@kernel.org Signed-off-by: Aharon Landau Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 338a93a497e48cb2366314ac9e545fadbf128bb4 Author: Youling Tang Date: Sat Sep 12 09:54:39 2020 +0800 MIPS: netlogic: Remove unused code Remove some unused code. Signed-off-by: Youling Tang Signed-off-by: Thomas Bogendoerfer commit 0ee69c589ec8659560910815f32c13af8587a779 Author: Qinglang Miao Date: Wed Sep 16 14:21:27 2020 +0800 MIPS: OCTEON: use devm_platform_ioremap_resource Note that error handling on the result of a call to platform_get_resource() is unneeded when the value is passed to devm_ioremap_resource(), so remove it. Then use the helper function that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Qinglang Miao Signed-off-by: Thomas Bogendoerfer commit b0a1c2903b5f43861a78a25fe4f389d99607ae04 Author: Zhang Qilong Date: Thu Sep 17 15:46:22 2020 +0800 MIPS: pci: use devm_platform_ioremap_resource_byname Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Zhang Qilong Signed-off-by: Thomas Bogendoerfer commit 38a6445cab6ba4bf6b32f28552d2a7d87dc4414a Author: Wei Li Date: Fri Sep 18 09:41:11 2020 +0800 MIPS: Correct the header guard of r4k-timer.h Rename the header guard of r4k-timer.h from __ASM_R4K_TYPES_H to __ASM_R4K_TIMER_H what corresponding with the file name. Signed-off-by: Wei Li Signed-off-by: Thomas Bogendoerfer commit 5fc57df2f6fdc18b9f9273f98318ff7919968c2c Author: Mark Brown Date: Mon Sep 14 16:34:09 2020 +0100 arm64: stacktrace: Convert to ARCH_STACKWALK Historically architectures have had duplicated code in their stack trace implementations for filtering what gets traced. In order to avoid this duplication some generic code has been provided using a new interface arch_stack_walk(), enabled by selecting ARCH_STACKWALK in Kconfig, which factors all this out into the generic stack trace code. Convert arm64 to use this common infrastructure. Signed-off-by: Mark Brown Reviewed-by: Miroslav Benes Link: https://lore.kernel.org/r/20200914153409.25097-4-broonie@kernel.org Signed-off-by: Will Deacon commit baa2cd417053cb674deb90ee66b88afea0517335 Author: Mark Brown Date: Mon Sep 14 16:34:08 2020 +0100 arm64: stacktrace: Make stack walk callback consistent with generic code As with the generic arch_stack_walk() code the arm64 stack walk code takes a callback that is called per stack frame. Currently the arm64 code always passes a struct stackframe to the callback and the generic code just passes the pc, however none of the users ever reference anything in the struct other than the pc value. The arm64 code also uses a return type of int while the generic code uses a return type of bool though in both cases the return value is a boolean value and the sense is inverted between the two. In order to reduce code duplication when arm64 is converted to use arch_stack_walk() change the signature and return sense of the arm64 specific callback to match that of the generic code. Signed-off-by: Mark Brown Reviewed-by: Miroslav Benes Link: https://lore.kernel.org/r/20200914153409.25097-3-broonie@kernel.org Signed-off-by: Will Deacon commit 264c03a245de7c5b1cc3836db45de6b991f877ca Author: Mark Brown Date: Mon Sep 14 16:34:07 2020 +0100 stacktrace: Remove reliable argument from arch_stack_walk() callback Currently the callback passed to arch_stack_walk() has an argument called reliable passed to it to indicate if the stack entry is reliable, a comment says that this is used by some printk() consumers. However in the current kernel none of the arch_stack_walk() implementations ever set this flag to true and the only callback implementation we have is in the generic stacktrace code which ignores the flag. It therefore appears that this flag is redundant so we can simplify and clarify things by removing it. Signed-off-by: Mark Brown Reviewed-by: Miroslav Benes Link: https://lore.kernel.org/r/20200914153409.25097-2-broonie@kernel.org Signed-off-by: Will Deacon commit e100777016fdf6ec3a9d7c1773b15a2b5eca6c55 Author: Borislav Petkov Date: Mon Sep 14 19:21:28 2020 +0200 x86/mce: Annotate mce_rd/wrmsrl() with noinstr They do get called from the #MC handler which is already marked "noinstr". Commit e2def7d49d08 ("x86/mce: Make mce_rdmsrl() panic on an inaccessible MSR") already got rid of the instrumentation in the MSR accessors, fix the annotation now too, in order to get rid of: vmlinux.o: warning: objtool: do_machine_check()+0x4a: call to mce_rdmsrl() leaves .noinstr.text section Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200915194020.28807-1-bp@alien8.de commit e093256d14fbf9e8aaf02ed0ac69087eef6792bd Author: Mark Brown Date: Wed Aug 19 12:48:37 2020 +0100 selftests: arm64: Add build and documentation for FP tests Integrate the FP tests with the build system and add some documentation for the ones run outside the kselftest infrastructure. The content in the README was largely written by Dave Martin with edits by me. Signed-off-by: Mark Brown Acked-by: Dave Martin Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20200819114837.51466-7-broonie@kernel.org Signed-off-by: Will Deacon commit 25f47e3eb66e6ee31b3ed3f8c0b7bdce098106fe Author: Mark Brown Date: Wed Aug 19 12:48:36 2020 +0100 selftests: arm64: Add wrapper scripts for stress tests Add wrapper scripts which invoke fpsimd-test and sve-test with several copies per CPU such that the context switch code will be appropriately exercised. Signed-off-by: Mark Brown Acked-by: Dave Martin Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20200819114837.51466-6-broonie@kernel.org Signed-off-by: Will Deacon commit fc7e611f9f38de7166c5f8951df93f7351542448 Author: Mark Brown Date: Wed Aug 19 12:48:35 2020 +0100 selftests: arm64: Add utility to set SVE vector lengths vlset is a small utility for use in conjunction with tests like the sve-test stress test which allows another executable to be invoked with a configured SVE vector length. Signed-off-by: Mark Brown Acked-by: Dave Martin Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20200819114837.51466-5-broonie@kernel.org Signed-off-by: Will Deacon commit 5e992c638ea55d928e43d3c1aab1bd8e13835e6e Author: Mark Brown Date: Wed Aug 19 12:48:34 2020 +0100 selftests: arm64: Add stress tests for FPSMID and SVE context switching Add programs sve-test and fpsimd-test which spin reading and writing to the SVE and FPSIMD registers, verifying the operations they perform. The intended use is to leave them running to stress the context switch code's handling of these registers which isn't compatible with what kselftest does so they're not integrated into the framework but there's no other obvious testsuite where they fit so let's store them here. These tests were written by Dave Martin and lightly adapted by me. Signed-off-by: Mark Brown Acked-by: Dave Martin Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20200819114837.51466-4-broonie@kernel.org Signed-off-by: Will Deacon commit 0dca276ac4d20d4071b3d3095b1ad33269ea5272 Author: Mark Brown Date: Wed Aug 19 12:48:33 2020 +0100 selftests: arm64: Add test for the SVE ptrace interface Add a test case that does some basic verification of the SVE ptrace interface, forking off a child with known values in the registers and then using ptrace to inspect and manipulate the SVE registers of the child, including in FPSIMD mode to account for sharing between the SVE and FPSIMD registers. This program was written by Dave Martin and modified for kselftest by me. Signed-off-by: Mark Brown Acked-by: Dave Martin Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20200819114837.51466-3-broonie@kernel.org Signed-off-by: Will Deacon commit ca765153eb90577e5fda281485048427b80a9a77 Author: Mark Brown Date: Wed Aug 19 12:48:32 2020 +0100 selftests: arm64: Test case for enumeration of SVE vector lengths Add a test case that verifies that we can enumerate the SVE vector lengths on systems where we detect SVE, and that those SVE vector lengths are valid. This program was written by Dave Martin and adapted to kselftest by me. Signed-off-by: Mark Brown Acked-by: Dave Martin Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20200819114837.51466-2-broonie@kernel.org Signed-off-by: Will Deacon commit 1866d779d5d2abae59d304e809600ca3ca8d0071 Author: Max Reitz Date: Wed Sep 9 17:52:17 2020 +0200 fuse: Allow fuse_fill_super_common() for submounts Submounts have their own superblock, which needs to be initialized. However, they do not have a fuse_fs_context associated with them, and the root node's attributes should be taken from the mountpoint's node. Extend fuse_fill_super_common() to work for submounts by making the @ctx parameter optional, and by adding a @submount_finode parameter. (There is a plain "unsigned" in an existing code block that is being indented by this commit. Extend it to "unsigned int" so checkpatch does not complain.) Signed-off-by: Max Reitz Signed-off-by: Miklos Szeredi commit fcee216beb9c15c3e1466bb76575358415687c55 Author: Max Reitz Date: Wed May 6 17:44:12 2020 +0200 fuse: split fuse_mount off of fuse_conn We want to allow submounts for the same fuse_conn, but with different superblocks so that each of the submounts has its own device ID. To do so, we need to split all mount-specific information off of fuse_conn into a new fuse_mount structure, so that multiple mounts can share a single fuse_conn. We need to take care only to perform connection-level actions once (i.e. when the fuse_conn and thus the first fuse_mount are established, or when the last fuse_mount and thus the fuse_conn are destroyed). For example, fuse_sb_destroy() must invoke fuse_send_destroy() until the last superblock is released. To do so, we keep track of which fuse_mount is the root mount and perform all fuse_conn-level actions only when this fuse_mount is involved. Signed-off-by: Max Reitz Reviewed-by: Stefan Hajnoczi Signed-off-by: Miklos Szeredi commit 8f622e9497bbbd5df4675edf782500cd9fe961ba Author: Max Reitz Date: Mon Apr 20 17:59:34 2020 +0200 fuse: drop fuse_conn parameter where possible With the last commit, all functions that handle some existing fuse_req no longer need to be given the associated fuse_conn, because they can get it from the fuse_req object. Signed-off-by: Max Reitz Reviewed-by: Stefan Hajnoczi Signed-off-by: Miklos Szeredi commit 24754db2728a87c513cc480c70c09072a7a40ba6 Author: Max Reitz Date: Mon Apr 20 17:54:38 2020 +0200 fuse: store fuse_conn in fuse_req Every fuse_req belongs to a fuse_conn. Right now, we always know which fuse_conn that is based on the respective device, but we want to allow multiple (sub)mounts per single connection, and then the corresponding filesystem is not going to be so trivial to obtain. Storing a pointer to the associated fuse_conn in every fuse_req will allow us to trivially find any request's superblock (and thus filesystem) even then. Signed-off-by: Max Reitz Reviewed-by: Stefan Hajnoczi Signed-off-by: Miklos Szeredi commit c6ff213fe5b8696c9539a1b34ff03de9306dfff9 Author: Max Reitz Date: Tue Sep 8 18:01:48 2020 +0200 fuse: add submount support to - Add fuse_attr.flags - Add FUSE_ATTR_SUBMOUNT This is a flag for fuse_attr.flags that indicates that the given entry resides on a different filesystem than the parent, and as such should have a different st_dev. - Add FUSE_SUBMOUNTS The client sets this flag if it supports automounting directories. Signed-off-by: Max Reitz Signed-off-by: Miklos Szeredi commit d21435e9670b11a02bcb1b5683dddd50da61966d Author: Boyan Karatotev Date: Fri Sep 18 11:47:15 2020 +0100 kselftests/arm64: add PAuth tests for single threaded consistency and differently initialized keys PAuth adds 5 different keys that can be used to sign addresses. Add a test that verifies that the kernel initializes them to different values and preserves them across context switches. Signed-off-by: Boyan Karatotev Reviewed-by: Vincenzo Frascino Reviewed-by: Amit Daniel Kachhap Acked-by: Shuah Khan Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20200918104715.182310-5-boian4o1@gmail.com Signed-off-by: Will Deacon commit 806a15b2545e6b5949f14ea8401ce295bd38a018 Author: Boyan Karatotev Date: Fri Sep 18 11:47:14 2020 +0100 kselftests/arm64: add PAuth test for whether exec() changes keys Kernel documentation states that it will change PAuth keys on exec() calls. Verify that all keys are correctly switched to new ones. Signed-off-by: Boyan Karatotev Reviewed-by: Vincenzo Frascino Reviewed-by: Amit Daniel Kachhap Acked-by: Shuah Khan Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20200918104715.182310-4-boian4o1@gmail.com Signed-off-by: Will Deacon commit 766d95b1ed93ebdd07ac87490e60e442342f5dc4 Author: Boyan Karatotev Date: Fri Sep 18 11:47:13 2020 +0100 kselftests/arm64: add nop checks for PAuth tests PAuth adds sign/verify controls to enable and disable groups of instructions in hardware for compatibility with libraries that do not implement PAuth. The kernel always enables them if it detects PAuth. Add a test that checks that each group of instructions is enabled, if the kernel reports PAuth as detected. Note: For groups, for the purpose of this patch, we intend instructions that use a certain key. Signed-off-by: Boyan Karatotev Reviewed-by: Vincenzo Frascino Reviewed-by: Amit Daniel Kachhap Acked-by: Shuah Khan Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20200918104715.182310-3-boian4o1@gmail.com Signed-off-by: Will Deacon commit e74e1d55728509b352e4eec4283dd5b2781b2070 Author: Boyan Karatotev Date: Fri Sep 18 11:47:12 2020 +0100 kselftests/arm64: add a basic Pointer Authentication test PAuth signs and verifies return addresses on the stack. It does so by inserting a Pointer Authentication code (PAC) into some of the unused top bits of an address. This is achieved by adding paciasp/autiasp instructions at the beginning and end of a function. This feature is partially backwards compatible with earlier versions of the ARM architecture. To coerce the compiler into emitting fully backwards compatible code the main file is compiled to target an earlier ARM version. This allows the tests to check for the feature and print meaningful error messages instead of crashing. Add a test to verify that corrupting the return address results in a SIGSEGV on return. Signed-off-by: Boyan Karatotev Reviewed-by: Vincenzo Frascino Reviewed-by: Amit Daniel Kachhap Acked-by: Shuah Khan Cc: Shuah Khan Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20200918104715.182310-2-boian4o1@gmail.com Signed-off-by: Will Deacon commit 5fd39dc220279108131edbc85832a5fef821a826 Author: Clint Sbisa Date: Fri Sep 18 03:33:12 2020 +0000 arm64: Enable PCI write-combine resources under sysfs This change exposes write-combine mappings under sysfs for prefetchable PCI resources on arm64. Originally, the usage of "write combine" here was driven by the x86 definition of write combine. This definition is specific to x86 and does not generalize to other architectures. However, the usage of WC has mutated to "write combine" semantics, which is implemented differently on each arch. Generally, prefetchable BARs are accepted to allow speculative accesses, write combining, and re-ordering-- from the PCI perspective, this means there are no read side effects. (This contradicts the PCI spec which allows prefetchable BARs to have read side effects, but this definition is ill-advised as it is impossible to meet.) On x86, prefetchable BARs are mapped as WC as originally defined (with some conditionals on arch features). On arm64, WC is taken to mean normal non-cacheable memory. In practice, write combine semantics are used to minimize write operations. A common usage of this is minimizing PCI TLPs which can significantly improve performance with PCI devices. In order to provide the same benefits to userspace, we need to allow userspace to map prefetchable BARs with write combine semantics. The resourceX_wc mapping is used today by userspace programs and libraries. While this model is flawed as "write combine" is very ill-defined, it is already used by multiple non-x86 archs to expose write combine semantics to user space. We enable this on arm64 to give userspace on arm64 an equivalent mechanism for utilizing write combining with PCI devices. Signed-off-by: Clint Sbisa Acked-by: Catalin Marinas Acked-by: Lorenzo Pieralisi Acked-by: Ard Biesheuvel Cc: Benjamin Herrenschmidt Cc: Bjorn Helgaas Cc: Catalin Marinas Cc: Jason Gunthorpe Cc: Lorenzo Pieralisi Cc: Will Deacon Link: https://lore.kernel.org/r/20200918033312.ddfpibgfylfjpex2@amazon.com Signed-off-by: Will Deacon commit c7b360612fe7583350b0bb8ecec18abf1029695e Author: Jing Xiangfeng Date: Fri Sep 18 09:05:21 2020 +0800 fbcon: Remove the superfluous break Remove the superfluous break, as there is a 'return' before it. Fixes: bad07ff74c32 ("fbcon: smart blitter usage for scrolling") Signed-off-by: Jing Xiangfeng Reviewed-by: Nick Desaulniers Reviewed-by: Gustavo A. R. Silva Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200918010521.69950-1-jingxiangfeng@huawei.com commit 4e139a9abb007370e8d0266ea31192e606c800cf Author: Vaibhav Gupta Date: Thu Sep 17 17:23:14 2020 +0530 fbdev: aty: remove CONFIG_PM container The changes made in below mentioned commit removed CONFIG_PM containers from drivers/video/fbdev/aty/atyfb_base.c but not from drivers/video/fbdev/aty/atyfb.h for respective callbacks. This resulted in error for implicit declaration for those callbacks. Fixes: 348b2956d5e6 ("fbdev: aty: use generic power management") Signed-off-by: Vaibhav Gupta Reported-by: kernel test robot Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200917115313.725622-1-vaibhavgupta40@gmail.com commit 54a38b6627d3f11028f806f1f529a68453a77f46 Author: Alex Vesker Date: Thu Sep 3 10:38:57 2020 +0300 RDMA/mlx5: Expose TIR and QP ICM address for sw_owner_v2 devices Expose the ICM address to access TIR and QP, this will allow sw_owned_v2 devices to steer traffic to TIRs and QPs same as done with sw_owner capability. Link: https://lore.kernel.org/r/20200903073857.1129166-4-leon@kernel.org Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 8310e327046df6b8d729ffa41ed7cfd6676abc42 Author: Alex Vesker Date: Thu Sep 3 10:38:56 2020 +0300 RDMA/mlx5: Allow DM allocation for sw_owner_v2 enabled devices sw_owner_v2 will replace sw_owner for future devices, this means that if sw_owner_v2 is set sw_owner should be ignored and DM allocation is required for sw_owner_v2 devices to function. Link: https://lore.kernel.org/r/20200903073857.1129166-3-leon@kernel.org Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7cd5738d0d8bb192fc86736ac7fb4a6cdb57f957 Author: Masami Hiramatsu Date: Fri Sep 18 17:01:41 2020 +0900 perf probe: Fall back to debuginfod query if debuginfo and source not found locally Since 'perf probe' heavily depends on debuginfo, debuginfod gives us many benefits on the 'perf probe' command on remote machine. Especially, this will be helpful for the embedded devices which will not have enough storage, or boot with a cross-build kernel whose source code is in the host machine. This will work as similar to commit c7a14fdcb3fa7736 ("perf build-ids: Fall back to debuginfod query if debuginfo not found") Tested with: (host) $ cd PATH/TO/KBUILD/DIR/ (host) $ debuginfod -F . ... (remote) # perf probe -L vfs_read Failed to find the path for the kernel: No such file or directory Error: Failed to show lines. (remote) # export DEBUGINFOD_URLS="http://$HOST_IP:8002/" (remote) # perf probe -L vfs_read 0 ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) { 2 ssize_t ret; if (!(file->f_mode & FMODE_READ)) return -EBADF; 6 if (!(file->f_mode & FMODE_CAN_READ)) return -EINVAL; 8 if (unlikely(!access_ok(buf, count))) return -EFAULT; 11 ret = rw_verify_area(READ, file, pos, count); 12 if (ret) return ret; if (count > MAX_RW_COUNT) ... (remote) # perf probe -a "vfs_read count" Added new event: probe:vfs_read (on vfs_read with count) (remote) # perf probe -l probe:vfs_read (on vfs_read@ksrc/linux/fs/read_write.c with count) Signed-off-by: Masami Hiramatsu Reviewed-by: Frank Ch. Eigler Cc: Aaron Merey Cc: Daniel Thompson Link: http://lore.kernel.org/lkml/160041610083.912668.13659563860278615846.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit f067c9251797ab0ff13cb4c6d5f5a0e6dc2c65d3 Author: Vinod Koul Date: Thu Sep 17 17:31:46 2020 +0530 soundwire: intel: use {u32|u16}p_replace_bits FIELD_PREP() does not replace the bits so it is not apt in case where we modify a register. Use u32_replace_bits() or u16_replace_bits() instead. Fixes: 3b4979cabd4b ("soundwire: intel: use FIELD_{GET|PREP}") Tested-by: Bard Liao Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20200917120146.1780323-3-vkoul@kernel.org Signed-off-by: Vinod Koul commit 714db045cf30f7897dded6417cf70f9426c6b87b Author: Vinod Koul Date: Thu Sep 17 17:31:45 2020 +0530 soundwire: cadence: use u32p_replace_bits FIELD_PREP() does not replace the bits so it is not apt in case where we modify a register. Use u32p_replace_bits() instead. Fixes: 3cf25d63b1b9 ("soundwire: cadence: use FIELD_{GET|PREP}") Tested-by: Bard Liao Link: https://lore.kernel.org/r/20200917120146.1780323-2-vkoul@kernel.org Signed-off-by: Vinod Koul commit ac7a75d1fbe072fc5535311ecc080f10645aeba1 Author: Masami Hiramatsu Date: Fri Sep 18 17:01:30 2020 +0900 perf probe: Fix to adjust symbol address with correct reloc_sym address 'perf probe' uses ref_reloc_sym to adjust symbol offset address from debuginfo address or ref_reloc_sym based address, but that is misusing reloc_sym->addr and reloc_sym->unrelocated_addr. If map is not relocated (map->reloc == 0), we can use reloc_sym->addr as unrelocated address instead of reloc_sym->unrelocated_addr. This usually does not happen. If we have a non-stripped ELF binary, we will use it for map and debuginfo, if not, we use only kallsyms without debuginfo. Thus, the map is always relocated (ELF and DWARF binary) or not relocated (kallsyms). However, if we allow the combination of debuginfo and kallsyms based map (like using debuginfod), we have to check the map->reloc and choose the collect address of reloc_sym. Signed-off-by: Masami Hiramatsu Reviewed-by: Frank Ch. Eigler Cc: Aaron Merey Cc: Daniel Thompson Link: http://lore.kernel.org/lkml/160041609047.912668.14314639291419159274.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 8cb3b4e74cd810b86e18bcf832c2a4a877737981 Author: Srinivas Kandagatla Date: Thu Sep 17 13:01:38 2020 +0100 soundwire: qcom: get max rows and cols info from compatible currently the max rows and cols values are hardcoded. In reality these values depend on the IP version. So get these based on device tree compatible strings. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200917120138.11313-4-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 5ffba1fb6d555556c554d373643b0eafbd3e6a4f Author: Srinivas Kandagatla Date: Thu Sep 17 13:01:37 2020 +0100 soundwire: qcom: add support to block packing mode This patch adds support to block pack mode, which is required on Qcom soundwire controllers v1.5.x on few ports! Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200917120138.11313-3-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 578ddced239f554baf6ba935a53077f6a80cb584 Author: Srinivas Kandagatla Date: Thu Sep 17 13:01:36 2020 +0100 soundwire: qcom: clear BIT FIELDs before value set. According to usage (bitfields.h) of REG_FIELDS, Modify is: reg &= ~REG_FIELD_C; reg |= FIELD_PREP(REG_FIELD_C, c); Patch ("soundwire: qcom : use FIELD_{GET|PREP}") seems to have accidentally removed clearing bit field while modifying the register. Fix this by using u32p_replace_bits() to clear and set the values. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200917120138.11313-2-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 9026118f20e28f202dab34f219bbb831ffb8c4dc Author: Bard Liao Date: Tue Sep 8 21:15:20 2020 +0800 soundwire: Add generic bandwidth allocation algorithm This algorithm computes bus parameters like clock frequency, frame shape and port transport parameters based on active stream(s) running on the bus. Developers can also implement their own .compute_params() callback for specific resource management algorithm, and set if before calling sdw_add_bus_master() Credits: this patch is based on an earlier internal contribution by Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. All hard-coded values were removed from the initial contribution to use BIOS information instead. Signed-off-by: Bard Liao Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20200908131520.5712-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit afba7e6c5fc190b687f3d87bc6d1029d1500c059 Author: Swapnil Jakhade Date: Fri Sep 18 14:09:23 2020 +0200 drm: bridge: cdns-mhdp8546: Add TI J721E wrapper Add J721E wrapper for mhdp, which sets up the clock and data muxes. Signed-off-by: Jyri Sarha Signed-off-by: Yuti Amonkar Signed-off-by: Swapnil Jakhade Reviewed-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen commit fb43aa0acdfd600c75b8c877bdf9f6e9893ffc9b Author: Swapnil Jakhade Date: Fri Sep 18 14:09:22 2020 +0200 drm: bridge: Add support for Cadence MHDP8546 DPI/DP bridge Add a new DRM bridge driver for Cadence MHDP8546 DPTX IP used in TI J721E SoC. MHDP DPTX IP is the component that complies with VESA DisplayPort (DP) and embedded Display Port (eDP) standards. It integrates uCPU running the embedded Firmware (FW) interfaced over APB interface. Basically, it takes a DPI stream as input and outputs it encoded in DP format. Currently, it supports only SST mode. Co-developed-by: Tomi Valkeinen Co-developed-by: Jyri Sarha Signed-off-by: Tomi Valkeinen Signed-off-by: Jyri Sarha Signed-off-by: Quentin Schulz Signed-off-by: Yuti Amonkar Signed-off-by: Swapnil Jakhade Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen commit 85649cc8dc509dfb97f5ac87f7efefe03539323a Author: Yuti Amonkar Date: Fri Sep 18 14:09:21 2020 +0200 dt-bindings: drm/bridge: Document Cadence MHDP8546 bridge bindings Document the bindings used for the Cadence MHDP8546 DPI/DP bridge in yaml format. Signed-off-by: Yuti Amonkar Signed-off-by: Swapnil Jakhade Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen commit 92ffad62a6fb60126cfe39456bdc27f633333f1f Merge: b40be05ed255d 0ffcc3787e34d Author: Tomi Valkeinen Date: Fri Sep 18 15:14:35 2020 +0300 Merge tag 'phy-attrs-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into 5.10/dp-pull New phy attributes slated for kernel release v5.10. These are needed by the Cadence MHDP driver. commit d5214321498a43558d9ffcce4153775c2c296bad Author: Camel Guo Date: Fri Sep 18 13:40:25 2020 +0200 ASoC: tlv320adcx140: Add support for configuring GPIO pin Add support to configure the GPIO pin to the specific configuration. The GPIO pin can be configured as GPO, IRQ, SDOUT2, PDMCLK, MICBASE_EN, GPI, MCLK, SDIN, PDMDIN1, PDMDIN2, PDMDIN3 or PDMDIN4 and the output drive can be configured with various configuration. Signed-off-by: Camel Guo Link: https://lore.kernel.org/r/20200918114025.18205-2-camel.guo@axis.com Signed-off-by: Mark Brown commit 15b3d324c8980022071710b5096b705eb6b74fca Author: Camel Guo Date: Fri Sep 18 13:40:24 2020 +0200 dt-bindings: tlv320adcx140: Add GPIO config and drive config Add properties for configuring the General Purpose Input Output (GPIO). There are 2 settings for GPIO, configuration and the output drive type. Signed-off-by: Camel Guo Acked-by: Dan Murphy Link: https://lore.kernel.org/r/20200918114025.18205-1-camel.guo@axis.com Signed-off-by: Mark Brown commit 7fba53ebb5b2d89d95b697f4c42c73c6fb7ba0c6 Author: Johannes Berg Date: Fri Sep 18 13:21:16 2020 +0200 mac80211: fix some encapsulation offload kernel-doc Add a missing kernel-doc entry for the offload_flags, and correct the name of the update_vif_offload method. Link: https://lore.kernel.org/r/20200918132115.d46a0915ba8a.Ibba536d04a5a5fb655f8ef6e51b247457bfda4ca@changeid Signed-off-by: Johannes Berg commit 9ff167e178224069221a5771c12dfea9737bf3a3 Author: Johannes Berg Date: Fri Sep 18 13:19:22 2020 +0200 cfg80211: add missing kernel-doc for S1G band capabilities Add missing kernel-doc for the S1G band capabilities in the per band data. Link: https://lore.kernel.org/r/20200918131921.08c893cd73a1.Id71583c37baca8a9a3329426e02b66d9ab65ac03@changeid Signed-off-by: Johannes Berg commit 632189a0180fdaae6715c83c68cc5c8998d6c841 Author: Aloka Dixit Date: Fri Sep 11 00:33:01 2020 +0000 mac80211: Unsolicited broadcast probe response support This patch adds mac80211 support to configure unsolicited broadcast probe response transmission for in-band discovery in 6GHz. Changes include functions to store and retrieve probe response template, and packet interval (0 - 20 TUs). Setting interval to 0 disables the unsolicited broadcast probe response transmission. Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/010101747a946b35-ad25858a-1f1f-48df-909e-dc7bf26d9169-000000@us-west-2.amazonses.com Signed-off-by: Johannes Berg commit 7443dcd1f1718a355e9c4ebeb7e95c3f9f27bb5f Author: Aloka Dixit Date: Fri Sep 11 00:33:00 2020 +0000 nl80211: Unsolicited broadcast probe response support This patch adds new attributes to support unsolicited broadcast probe response transmission used for in-band discovery in 6GHz band (IEEE P802.11ax/D6.0 26.17.2.3.2, AP behavior for fast passive scanning). The new attribute, NL80211_ATTR_UNSOL_BCAST_PROBE_RESP, is nested which supports following parameters: (1) NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT - Packet interval (2) NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL - Template data Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/010101747a946698-aac263ae-2ed3-4dab-9590-0bc7131214e1-000000@us-west-2.amazonses.com Signed-off-by: Johannes Berg commit 295b02c4be74bebf988593b8322369513fcecf68 Author: Aloka Dixit Date: Fri Sep 11 00:05:31 2020 +0000 mac80211: Add FILS discovery support This patch adds mac80211 support to configure FILS discovery transmission. Changes include functions to store and retrieve FILS discovery template, minimum and maximum packet intervals. Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20200805011838.28166-3-alokad@codeaurora.org [remove SUPPORTS_FILS_DISCOVERY, driver can just set wiphy info] Link: https://lore.kernel.org/r/010101747a7b3cbb-6edaa89c-436d-4391-8765-61456d7f5f4e-000000@us-west-2.amazonses.com Signed-off-by: Johannes Berg commit 291c49ded2fda1fd0d7bd6056de99fe47d2332e6 Author: Aloka Dixit Date: Fri Sep 11 00:05:29 2020 +0000 nl80211: Add FILS discovery support FILS discovery attribute, NL80211_ATTR_FILS_DISCOVERY, is nested which supports following parameters as given in IEEE Std 802.11ai-2016, Annex C.3 MIB detail: (1) NL80211_FILS_DISCOVERY_ATTR_INT_MIN - Minimum packet interval (2) NL80211_FILS_DISCOVERY_ATTR_INT_MAX - Maximum packet interval (3) NL80211_FILS_DISCOVERY_ATTR_TMPL - Template data Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20200805011838.28166-2-alokad@codeaurora.org [fix attribute and other names, use NLA_RANGE(), use policy only once] Link: https://lore.kernel.org/r/010101747a7b38a8-306f06b2-9061-4baf-81c1-054a42a18e22-000000@us-west-2.amazonses.com Signed-off-by: Johannes Berg commit 5595870f77c7f9de3481b0c0d5ad03176586556e Author: Felix Fietkau Date: Wed Sep 16 18:46:11 2020 +0200 mac80211: allow bigger A-MSDU sizes in VHT, even if HT is limited Some APs (e.g. Asus RT-AC88U) have been observed to report an HT MSDU size limit of 3839 and a VHT limit of 7991. These APs can handle bigger frames than 3839 bytes just fine, so we should remove the VHT limit based on the HT capabilities. This improves tx throughput. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200916164611.8022-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 11b34737b18a70c74d5cf13ee58d36e95879013c Author: Thomas Pedersen Date: Tue Sep 8 12:03:06 2020 -0700 nl80211: support setting S1G channels S1G channels have a single width defined per frequency, so derive it from the channel flags with ieee80211_s1g_channel_width(). Also support setting an S1G channel where control frequency may differ from operating, and add some basic validation to ensure the control channel is with the operating. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200908190323.15814-6-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 1d47f1198d58117735edc6b8b1a687db47883f1e Author: Thomas Pedersen Date: Tue Sep 8 12:03:05 2020 -0700 nl80211: correctly validate S1G beacon head The S1G beacon has a different header size than regular beacons, so adjust the beacon head validator. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200908190323.15814-5-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 68dbad8c656960292142832c3b44c63db9831d67 Author: Thomas Pedersen Date: Tue Sep 8 12:03:04 2020 -0700 cfg80211: regulatory: handle S1G channels S1G channels have a minimum bandwidth of 1Mhz, and there is a 1:1 mapping of allowed bandwidth to channel number. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200908190323.15814-4-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit d65a977087f94f3bb97f351798d864556063109a Author: Thomas Pedersen Date: Tue Sep 8 12:03:03 2020 -0700 nl80211: advertise supported channel width in S1G S1G supports 5 channel widths: 1, 2, 4, 8, and 16. One channel width is allowed per frequency in each operating class, so it makes more sense to advertise the specific channel width allowed. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200908190323.15814-3-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 37050e3ab0b3f02819e3d70ab01d97addb810b28 Author: Thomas Pedersen Date: Tue Sep 8 12:03:02 2020 -0700 ieee80211: redefine S1G bits with GENMASK The S1G capability fields were defined by ORing BITS() together, and expecting a custom macro to use the _SHIFT definitions. Use the Linux kernel GENMASK for the definitions now, and FIELD_{GET,PREP} to access the fields in the future. Take the chance to rename eg. S1G_CAPAB_B0 to the more compact S1G_CAP0. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200908190323.15814-2-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit 4b7afb52c8e2b4bf0d72a8f0bfe9024ff7391c5c Author: Felix Fietkau Date: Tue Sep 8 14:37:02 2020 +0200 mac80211: reorganize code to remove a forward declaration Remove the newly added ieee80211_set_vif_encap_ops declaration. No further code changes. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-15-nbd@nbd.name Signed-off-by: Johannes Berg commit f02dff93e26bef46f5511f1e8229061bd23c3074 Author: Felix Fietkau Date: Tue Sep 8 14:37:00 2020 +0200 mac80211: extend ieee80211_tx_status_ext to support bulk free Store processed skbs ready to be freed in a list so the driver bulk free them Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-13-nbd@nbd.name Signed-off-by: Johannes Berg commit 23e9f1ef16629da70acb171589e33c0a3f6ec628 Author: Felix Fietkau Date: Tue Sep 8 14:36:59 2020 +0200 mac80211: support using ieee80211_tx_status_ext to free skbs without status info For encap-offloaded packets, ieee80211_free_txskb cannot be used, since it does not have the vif pointer. Using ieee80211_tx_status_ext for this purpose has the advantage of being able avoid an extra station lookup for AQL Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-12-nbd@nbd.name Signed-off-by: Johannes Berg commit a260e495252019b37a5cc2f83b75ac0cf5198ef1 Author: Felix Fietkau Date: Tue Sep 8 14:36:58 2020 +0200 mac80211: unify 802.3 (offload) and 802.11 tx status codepath Make ieee80211_tx_status_8023 call ieee80211_tx_status_ext, similar to ieee80211_tx_status. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-11-nbd@nbd.name Signed-off-by: Johannes Berg commit 9abf4e49830d606f18a05111cfa96b8f0b724c7d Author: Felix Fietkau Date: Tue Sep 8 14:36:56 2020 +0200 mac80211: optimize station connection monitor Calling mod_timer for every rx/tx packet can be quite expensive. Instead of constantly updating the timer, we can simply let it run out and check the timestamp of the last ACK or rx packet to re-arm it. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-9-nbd@nbd.name Signed-off-by: Johannes Berg commit 1ff4e8f2dec8b145b451f05320e4f9e01d254ae2 Author: Felix Fietkau Date: Tue Sep 8 14:37:01 2020 +0200 mac80211: notify the driver when a sta uses 4-address mode This is needed for encapsulation offload of 4-address mode packets Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-14-nbd@nbd.name Signed-off-by: Johannes Berg commit cc20ff2c6b5d3e28747c6d30ecd097ea1a4d2502 Author: Felix Fietkau Date: Tue Sep 8 14:36:57 2020 +0200 mac80211: swap NEED_TXPROCESSING and HW_80211_ENCAP tx flags In order to unify the tx status path, the hw 802.11 encapsulation flag needs to survive the trip to the tx status call. Since we don't have any free bits in info->flags, we need to move one. IEEE80211_TX_INTFL_NEED_TXPROCESSING is only used internally in mac80211, and only before the call into the driver. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-10-nbd@nbd.name Signed-off-by: Johannes Berg commit c74114d7d51521bd785bf6aa0f90ee87d99bee8a Author: Felix Fietkau Date: Tue Sep 8 14:36:55 2020 +0200 mac80211: remove tx status call to ieee80211_sta_register_airtime All drivers using airtime fairness are calling ieee80211_sta_register_airtime directly, now they must. Document this as well. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-8-nbd@nbd.name [johannes: update the documentation to suit] Signed-off-by: Johannes Berg commit 3318111cf63d97f1e1792ed4fdf9472e60b0a2cc Author: Felix Fietkau Date: Tue Sep 8 14:36:54 2020 +0200 mac80211: reduce duplication in tx status functions Move redundant functionality from __ieee80211_tx_status into ieee80211_tx_status_ext. Preparation for unifying with the 802.3 tx status codepath. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-7-nbd@nbd.name Signed-off-by: Johannes Berg commit ebbfeef0d8093a06ff39c60105b6650be3344cbe Author: Cédric Le Goater Date: Mon Sep 14 23:10:07 2020 +0200 powerpc/32: Declare stack_overflow_exception() prototype This fixes a compile error with W=1. CC arch/powerpc/kernel/traps.o ../arch/powerpc/kernel/traps.c:1663:6: error: no previous prototype for ‘stack_overflow_exception’ [-Werror=missing-prototypes] void stack_overflow_exception(struct pt_regs *regs) ^~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 3978eb78517c ("powerpc/32: Add early stack overflow detection with VMAP stack.") Signed-off-by: Cédric Le Goater Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200914211007.2285999-8-clg@kaod.org commit 2228f19cf90ef796c8d84f54f3a5db2dcc85c83f Author: Cédric Le Goater Date: Mon Sep 14 23:10:04 2020 +0200 powerpc/xive: Make debug routines static This fixes a compile error with W=1. CC arch/powerpc/sysdev/xive/common.o ../arch/powerpc/sysdev/xive/common.c:1568:6: error: no previous prototype for ‘xive_debug_show_cpu’ [-Werror=missing-prototypes] void xive_debug_show_cpu(struct seq_file *m, int cpu) ^~~~~~~~~~~~~~~~~~~ ../arch/powerpc/sysdev/xive/common.c:1602:6: error: no previous prototype for ‘xive_debug_show_irq’ [-Werror=missing-prototypes] void xive_debug_show_irq(struct seq_file *m, u32 hw_irq, struct irq_data *d) ^~~~~~~~~~~~~~~~~~~ Fixes: 930914b7d528 ("powerpc/xive: Add a debugfs file to dump internal XIVE state") Signed-off-by: Cédric Le Goater Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200914211007.2285999-5-clg@kaod.org commit 5ab187e01a5310e1f9cd2f6b192b2343b8bd14cb Author: Cédric Le Goater Date: Mon Sep 14 23:10:03 2020 +0200 powerpc/sstep: Remove empty if statement checking for invalid form The check should be performed by the caller. This fixes a compile error with W=1. ../arch/powerpc/lib/sstep.c: In function ‘mlsd_8lsd_ea’: ../arch/powerpc/lib/sstep.c:225:3: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body] ; /* Invalid form. Should already be checked for by caller! */ ^ Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200914211007.2285999-4-clg@kaod.org commit 7b2aab5f22f0f7cc9e2f8672c9e65e2e88d30102 Author: Cédric Le Goater Date: Mon Sep 14 23:10:01 2020 +0200 powerpc/sysfs: Remove unused 'err' variable in sysfs_create_dscr_default() This fixes a compile error with W=1. arch/powerpc/kernel/sysfs.c: In function ‘sysfs_create_dscr_default’: arch/powerpc/kernel/sysfs.c:228:7: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable] int err = 0; ^~~ cc1: all warnings being treated as errors Signed-off-by: Cédric Le Goater Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200914211007.2285999-2-clg@kaod.org commit 6aea26ce5a4cf854c1a86f3760753b5e2617578f Author: Felix Fietkau Date: Tue Sep 8 14:36:53 2020 +0200 mac80211: rework tx encapsulation offload API The current API (which lets the driver turn on/off per vif directly) has a number of limitations: - it does not deal with AP_VLAN - conditions for enabling (no tkip, no monitor) are only checked at add_interface time - no way to indicate 4-addr support In order to address this, store offload flags in struct ieee80211_vif (easy to extend for decap offload later). mac80211 initially sets the enable flag, but gives the driver a chance to modify it before its settings are applied. In addition to the .add_interface op, a .update_vif_offload op is introduced, which can be used for runtime changes. If a driver can't disable encap offload at runtime, or if it has some extra limitations, it can simply override the flags within those ops. Support for encap offload with 4-address mode interfaces can be enabled by setting a flag from .add_interface or .update_vif_offload. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-6-nbd@nbd.name [resolved conflict with commit aa2092a9bab3 ("ath11k: add raw mode and software crypto support")] Signed-off-by: Johannes Berg commit ae045152764229e11c6833f5ccae4b62e9a0b60f Author: Felix Fietkau Date: Tue Sep 8 14:36:52 2020 +0200 mac80211: set info->control.hw_key for encap offload packets This is needed for drivers that don't do the key lookup themselves Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-5-nbd@nbd.name Signed-off-by: Johannes Berg commit 8ec5cb12cd957e59b0470b75d26c901aaf645bc3 Author: Qinglang Miao Date: Wed Sep 16 14:21:29 2020 +0800 powerpc/powernv: fix wrong warning message in opalcore_config_init() The logic of the warn output is incorrect. The two args should be exchanged. Signed-off-by: Qinglang Miao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200916062129.190864-1-miaoqinglang@huawei.com commit 1d42e07e9c249b7a032fba82b673ee8a8d6bd7b7 Author: Qinglang Miao Date: Wed Sep 16 14:21:38 2020 +0800 serial: pmac_zilog: use for_each_child_of_node() macro Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200916062138.191188-1-miaoqinglang@huawei.com commit acff5e6c37fa4bf8d002c917a762c4f7615f6eaf Author: Qinglang Miao Date: Wed Sep 16 14:21:25 2020 +0800 macintosh: smu_sensors: use for_each_child_of_node() macro Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200916062125.190729-1-miaoqinglang@huawei.com commit 9c826d31a73815464bd3df81e56d39b3d908ac73 Author: Qinglang Miao Date: Wed Sep 16 14:21:22 2020 +0800 drivers/macintosh/smu.c: use for_each_child_of_node() macro Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200916062122.190586-1-miaoqinglang@huawei.com commit 6c71cfcc01685ef495ca7886471a76e73446424e Author: Michael Ellerman Date: Fri Aug 21 20:34:07 2020 +1000 powerpc/prom_init: Check display props exist before enabling btext It's possible to enable CONFIG_PPC_EARLY_DEBUG_BOOTX for a pseries kernel (maybe it shouldn't be), which is then booted with qemu/slof. But if you do that the kernel crashes in draw_byte(), with a DAR pointing somewhere near INT_MAX. Adding some debug to prom_init we see that we're not able to read the "address" property from OF, so we're just using whatever junk value was on the stack. So check the properties can be read properly from OF, if not we bail out before initialising btext, which avoids the crash. Signed-off-by: Michael Ellerman Reviewed-by: Alexey Kardashevskiy Link: https://lore.kernel.org/r/20200821103407.3362149-1-mpe@ellerman.id.au commit 39f87561454dc33efb2a3d8354d066207acac8a6 Author: Michael Ellerman Date: Wed Aug 19 11:56:34 2020 +1000 powerpc/smp: Move ppc_md.cpu_die() to smp_ops.cpu_offline_self() We have smp_ops->cpu_die() and ppc_md.cpu_die(). One of them offlines the current CPU and one offlines another CPU, can you guess which is which? Also one is in smp_ops and one is in ppc_md? So rename ppc_md.cpu_die(), to cpu_offline_self(), because that's what it does. And move it into smp_ops where it belongs. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015634.1974478-3-mpe@ellerman.id.au commit bf3c1464db883a953ad7bbed64924480b8b2b244 Author: Michael Ellerman Date: Wed Aug 19 11:56:33 2020 +1000 powerpc/smp: Fold cpu_die() into its only caller Avoid the eternal confusion between cpu_die() and __cpu_die() by removing the former, folding it into its only caller. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015634.1974478-2-mpe@ellerman.id.au commit 1ea21ba231f248034e8c794aa675869ca2b97d42 Author: Michael Ellerman Date: Wed Aug 19 11:56:32 2020 +1000 powerpc: Move arch_cpu_idle_dead() into smp.c arch_cpu_idle_dead() is in idle.c, which makes sense, but it's inside a CONFIG_HOTPLUG_CPU block. It would be more at home in smp.c, inside the existing CONFIG_HOTPLUG_CPU block. Note that CONFIG_HOTPLUG_CPU depends on CONFIG_SMP so even though smp.c is not built for SMP=n builds, that's fine. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015634.1974478-1-mpe@ellerman.id.au commit d10ebe79dfae7dc59b6cf77ffa615f0b8dae21bf Author: Michael Ellerman Date: Wed Sep 16 21:56:37 2020 +1000 powerpc/perf: Add declarations to fix sparse warnings Sparse warns about all the init functions: symbol init_ppc970_pmu was not declared. Should it be static? symbol init_power5p_pmu was not declared. Should it be static? symbol init_power5_pmu was not declared. Should it be static? symbol init_power6_pmu was not declared. Should it be static? symbol init_power7_pmu was not declared. Should it be static? symbol init_power9_pmu was not declared. Should it be static? symbol init_power8_pmu was not declared. Should it be static? symbol init_generic_compat_pmu was not declared. Should it be static? They're already declared in internal.h, so just make sure all the C files include that directly or indirectly. Signed-off-by: Michael Ellerman Reviewed-by: Madhavan Srinivasan Link: https://lore.kernel.org/r/20200916115637.3100484-2-mpe@ellerman.id.au commit ef1edbba52883907caf02ab85e0d00a2e4648f05 Author: Michael Ellerman Date: Wed Sep 16 21:56:36 2020 +1000 powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning Sparse says: symbol slb_setup_new_exec was not declared. Should it be static? No, it should have a declaration in a header, add one. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200916115637.3100484-1-mpe@ellerman.id.au commit 96543e7352bded5d6d1a0e0022376ebdd6c1b8ab Author: Liu Shixin Date: Wed Sep 16 10:50:26 2020 +0800 powerpc/pseries: convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200916025026.3992835-1-liushixin2@huawei.com commit bda7673d64b6c2e92423363a756caa657464e096 Author: Yang Yingliang Date: Thu Sep 17 10:06:43 2020 +0800 powerpc/book3s64: fix link error with CONFIG_PPC_RADIX_MMU=n Fix link error when CONFIG_PPC_RADIX_MMU is disabled: powerpc64-linux-gnu-ld: arch/powerpc/platforms/pseries/lpar.o:(.toc+0x0): undefined reference to `mmu_pid_bits' Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200917020643.90375-1-yangyingliang@huawei.com commit aea6a3f03108532537aec8e18771c1d47a280744 Author: Felix Fietkau Date: Tue Sep 8 14:36:51 2020 +0200 mac80211: skip encap offload for tx multicast/control packets This simplifies the checks in the encap offload tx handler and allows using it in cases where software crypto is used for multicast packets, e.g. when using an AP_VLAN. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-4-nbd@nbd.name Signed-off-by: Johannes Berg commit 96ae9cd02c0fd527db6cd8c090abfbcac1546a9f Author: Felix Fietkau Date: Tue Sep 8 14:36:50 2020 +0200 mac80211: check and refresh aggregation session in encap offload tx Update the last_tx timestamp to avoid tearing down the aggregation session early. Fall back to the slow path if the session setup is still running Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-3-nbd@nbd.name Signed-off-by: Johannes Berg commit 5f8d69eaab1915df97f4f2aca89ea16abdd092d5 Author: Felix Fietkau Date: Tue Sep 8 14:36:49 2020 +0200 mac80211: add missing queue/hash initialization to 802.3 xmit Fixes AQL for encap-offloaded tx Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-2-nbd@nbd.name Signed-off-by: Johannes Berg commit 9d6e371dda7f3294e1b7d2a00d8e77a042b42988 Author: Wright Feng Date: Tue Sep 8 01:01:57 2020 -0500 cfg80211: add more comments for ap_isolate in bss_parameters The value of struct bss_parameters::ap_isolate will be -1, 0 or 1. The value -1 means not to change. To prevent developers from thinking ap_isolate is only 0 or 1, I add more comments on it. Signed-off-by: Wright Feng Reviewed-by: Kalle Valo Link: https://lore.kernel.org/r/20200908060157.98846-1-wright.feng@cypress.com Signed-off-by: Johannes Berg commit 9e0b3bfe5ff0b11145b8299c1dfa3b8c3465029c Author: YueHaibing Date: Sat Aug 29 19:55:06 2020 +0800 lib80211: Remove unused macro DRV_NAME There is no caller in tree any more. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200829115506.17828-1-yuehaibing@huawei.com Signed-off-by: Johannes Berg commit 675d12acb66bb190d32a3fae187e379f01cbd8ce Author: Nicolin Chen Date: Thu Sep 17 04:31:55 2020 -0700 memory: tegra: Correct num_tlb_lines for tegra210 According to Tegra210 TRM, the default value of TLB_ACTIVE_LINES field of register MC_SMMU_TLB_CONFIG_0 is 0x30. So num_tlb_lines should be 48 (0x30) rather than 32 (0x20). Signed-off-by: Nicolin Chen Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20200917113155.13438-3-nicoleotsuka@gmail.com Signed-off-by: Joerg Roedel commit d5c152c3409ac1982a9277d8d344e073eda17e78 Author: Nicolin Chen Date: Thu Sep 17 04:31:54 2020 -0700 iommu/tegra-smmu: Fix tlb_mask The "num_tlb_lines" might not be a power-of-2 value, being 48 on Tegra210 for example. So the current way of calculating tlb_mask using the num_tlb_lines is not correct: tlb_mask=0x5f in case of num_tlb_lines=48, which will trim a setting of 0x30 (48) to 0x10. Signed-off-by: Nicolin Chen Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20200917113155.13438-2-nicoleotsuka@gmail.com Signed-off-by: Joerg Roedel commit ce433d0f7063ab68de3a998de722d28f7a46d2a1 Author: Alex Dewar Date: Fri Sep 11 14:53:25 2020 +0100 iommu/pamu: Replace use of kzfree with kfree_sensitive kzfree() is effectively deprecated as of commit 453431a54934 ("mm, treewide: rename kzfree() to kfree_sensitive()") and is now simply an alias for kfree_sensitive(). So just replace it with kfree_sensitive(). Signed-off-by: Alex Dewar Link: https://lore.kernel.org/r/20200911135325.66156-1-alex.dewar90@gmail.com Signed-off-by: Joerg Roedel commit 75d1cc0e05af579301ce4e49cf6399be4b4e6e76 Author: Krish Sadhukhan Date: Thu Sep 17 21:20:37 2020 +0000 x86/mm/pat: Don't flush cache if hardware enforces cache coherency across encryption domnains In some hardware implementations, coherency between the encrypted and unencrypted mappings of the same physical page is enforced. In such a system, it is not required for software to flush the page from all CPU caches in the system prior to changing the value of the C-bit for the page. So check that bit before flushing the cache. [ bp: Massage commit message. ] Suggested-by: Tom Lendacky Signed-off-by: Krish Sadhukhan Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200917212038.5090-3-krish.sadhukhan@oracle.com commit 5866e9205b47a983a77ebc8654949f696342f2ab Author: Krish Sadhukhan Date: Thu Sep 17 21:20:36 2020 +0000 x86/cpu: Add hardware-enforced cache coherency as a CPUID feature In some hardware implementations, coherency between the encrypted and unencrypted mappings of the same physical page is enforced. In such a system, it is not required for software to flush the page from all CPU caches in the system prior to changing the value of the C-bit for a page. This hardware- enforced cache coherency is indicated by EAX[10] in CPUID leaf 0x8000001f. [ bp: Use one of the free slots in word 3. ] Suggested-by: Tom Lendacky Signed-off-by: Krish Sadhukhan Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200917212038.5090-2-krish.sadhukhan@oracle.com commit 8c05f50fe8452f9d3220efad77bef42c7b498193 Author: Sudeep Holla Date: Tue Sep 1 11:33:35 2020 +0100 tee: avoid explicit sysfs_create/delete_group by initialising dev->groups If the dev->groups is initialised, the sysfs group is created as part of device_add call. There is no need to call sysfs_create/delete_group explicitly. Signed-off-by: Sudeep Holla Signed-off-by: Jens Wiklander commit ab3d8e1baaee4b167cc99120f640ee4de6d05d50 Author: Sudeep Holla Date: Tue Sep 1 11:33:34 2020 +0100 tee: replace cdev_add + device_add with cdev_device_add Commit 233ed09d7fda ("chardev: add helper function to register char devs with a struct device") added a helper function 'cdev_device_add'. Make use of cdev_device_add in tee_device_register to replace cdev_add and device_add. Since cdev_device_add takes care of setting the kobj->parent, drop explicit initialisation in tee_device_alloc. Signed-off-by: Sudeep Holla Signed-off-by: Jens Wiklander commit d714aaa71594a4869b75689a32b23858e4021173 Author: Lad Prabhakar Date: Fri Sep 11 11:19:12 2020 +0100 iommu/renesas: Update help description for IPMMU_VMSA config ipmmu-vmsa driver is also used on Renesas RZ/G{1,2} Soc's, update the same to reflect the help description for IPMMU_VMSA config. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200911101912.20701-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Joerg Roedel commit d78092e4937de9ce55edcb4ee4c5e3c707be0190 Author: Miklos Szeredi Date: Fri Sep 18 10:36:50 2020 +0200 fuse: fix page dereference after free After unlock_request() pages from the ap->pages[] array may be put (e.g. by aborting the connection) and the pages can be freed. Prevent use after free by grabbing a reference to the page before calling unlock_request(). The original patch was created by Pradeep P V K. Reported-by: Pradeep P V K Cc: Signed-off-by: Miklos Szeredi commit 3c213562fb3eba5c27032da219346e73cd240f9b Author: Fabien Parent Date: Mon Sep 7 12:16:49 2020 +0200 iommu/mediatek: Add support for MT8167 Add support for the IOMMU on MT8167 Signed-off-by: Fabien Parent Reviewed-by: Yong Wu Link: https://lore.kernel.org/r/20200907101649.1573134-3-fparent@baylibre.com Signed-off-by: Joerg Roedel commit d1b5ef0054c6b7443f5e9d3e7c3b7879499b7f95 Author: Fabien Parent Date: Mon Sep 7 12:16:48 2020 +0200 iommu/mediatek: Add flag for legacy ivrp paddr Add a new flag in order to select which IVRP_PADDR format is used by an SoC. Signed-off-by: Fabien Parent Reviewed-by: Yong Wu Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20200907101649.1573134-2-fparent@baylibre.com Signed-off-by: Joerg Roedel commit f7f842cc1fe8a9be1916aa0ff8a52f08389bf394 Author: Fabien Parent Date: Mon Sep 7 12:16:47 2020 +0200 dt-bindings: iommu: Add binding for MediaTek MT8167 IOMMU This commit adds IOMMU binding documentation and larb port definitions for the MT8167 SoC. Signed-off-by: Fabien Parent Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200907101649.1573134-1-fparent@baylibre.com Signed-off-by: Joerg Roedel commit 0b30191b277a13f75700b495dcd75a661b4f70a6 Merge: d208e13c6a227 a665eec0a22e1 Author: Michael Ellerman Date: Fri Sep 18 18:14:06 2020 +1000 Merge branch 'topic/irqs-off-activate-mm' into next Merge Nick's series to add ARCH_WANT_IRQS_OFF_ACTIVATE_MM. commit d208e13c6a2277d9fb71fad6a1394c70bdd7b634 Author: Michael Ellerman Date: Thu Sep 17 12:20:16 2020 +1000 powerpc/process: Fix uninitialised variable error Clang, and GCC with -Wmaybe-uninitialized, can't see that val is unused in get_fpexec_mode(): arch/powerpc/kernel/process.c:1940:7: error: variable 'val' is used uninitialized whenever 'if' condition is true if (cpu_has_feature(CPU_FTR_SPE)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ We know that CPU_FTR_SPE will only be true iff CONFIG_SPE is also true, but the compiler doesn't. Avoid it by initialising val to zero. Reported-by: kernel test robot Fixes: 532ed1900d37 ("powerpc/process: Remove useless #ifdef CONFIG_SPE") Signed-off-by: Michael Ellerman Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Link: https://lore.kernel.org/r/20200917024509.3253837-1-mpe@ellerman.id.au commit 52c74d3d356b60f3c53dc69e5109752347e144e8 Author: Grygorii Strashko Date: Wed Sep 16 15:09:55 2020 +0300 dmaengine: ti: k3-udma-glue: fix channel enable functions Now the K3 UDMA glue layer enable functions perform RMW operation on UDMA RX/TX RT_CTL registers to set EN bit and enable channel, which is incorrect, because only EN bit has to be set in those registers to enable channel (all other bits should be cleared 0). More over, this causes issues when bootloader leaves UDMA channel RX/TX RT_CTL registers in incorrect state - TDOWN bit set, for example. As result, UDMA channel will just perform teardown right after it's enabled. Hence, fix it by writing correct values (EN=1) directly in UDMA channel RX/TX RT_CTL registers in k3_udma_glue_enable_tx/rx_chn() functions. Fixes: d70241913413 ("dmaengine: ti: k3-udma: Add glue layer for non DMAengine users") Signed-off-by: Grygorii Strashko Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200916120955.7963-1-grygorii.strashko@ti.com Signed-off-by: Vinod Koul commit 985d51371140d367c1b0df35c57cdc43c3d01a30 Author: YueHaibing Date: Tue Aug 18 19:51:01 2020 +0800 dmaengine: iop-adma: Fix pointer cast warnings drivers/dma/iop-adma.c: In function ‘iop_adma_alloc_chan_resources’: drivers/dma/iop-adma.c:447:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] hw_desc = (char *) iop_chan->device->dma_desc_pool; ^ drivers/dma/iop-adma.c:449:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (dma_addr_t) &hw_desc[idx * IOP_ADMA_SLOT_SIZE]; ^ drivers/dma/iop-adma.c: In function ‘iop_adma_probe’: drivers/dma/iop-adma.c:1301:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (void *) adev->dma_desc_pool); Use dma_addr_t for dma_desc_pool, and %pad to print dma_addr_t. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200818115101.55700-1-yuehaibing@huawei.com Signed-off-by: Vinod Koul commit 1674aea5f080c9f61424354f6870a548770eb07e Author: Ard Biesheuvel Date: Fri Sep 11 17:11:03 2020 +0300 crypto: Kconfig - mark unused ciphers as obsolete We have a few interesting pieces in our cipher museum, which are never used internally, and were only ever provided as generic C implementations. Unfortunately, we cannot simply remove this code, as we cannot be sure that it is not being used via the AF_ALG socket API, however unlikely. So let's mark the Anubis, Khazad, SEED and TEA algorithms as obsolete, which means they can only be enabled in the build if the socket API is enabled in the first place. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit dbc756fcf7f3b843a3c96ac4d9522a86a757ae58 Author: Pascal van Leeuwen Date: Fri Sep 11 09:46:39 2020 +0200 crypto: inside-secure - Add support for EIP197 with output classifier This patch adds support for EIP197 instances that include the output classifier (OCE) option, as used by one of our biggest customers. The OCE normally requires initialization and dedicated firmware, but for the simple operations supported by this driver, we just bypass it completely for now (using what is formally a debug feature). Signed-off-by: Pascal van Leeuwen Acked-by: Antoine Tenart Signed-off-by: Herbert Xu commit 6d77282fafd77b97e66c06ec7256c5889f262d9b Author: Herbert Xu Date: Fri Sep 11 16:55:05 2020 +1000 crypto: n2 - Fix sparse endianness warning This patch fixes sparse endianness warnings by changing the type of hash_init to u8 from u32. There should be no difference in the generated code. Signed-off-by: Herbert Xu commit e61a23564e6fa709c5519bbe157ccf67af9c521f Author: Krzysztof Kozlowski Date: Thu Sep 10 21:29:19 2020 +0200 crypto: sun8i - Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Acked-by: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Herbert Xu commit 5a062f09168f4291a89c0ff3ed556e1403819910 Author: Krzysztof Kozlowski Date: Thu Sep 10 21:29:18 2020 +0200 crypto: stm32-hash - Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit 9d72d022eecdee4e6cf39ef355eaa31577f69f10 Author: Krzysztof Kozlowski Date: Thu Sep 10 21:29:17 2020 +0200 crypto: caam - Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Iuliana Prodan Signed-off-by: Herbert Xu commit 319936bf8f83c0ceda837188802557437f71baa6 Author: Krzysztof Kozlowski Date: Thu Sep 10 21:29:16 2020 +0200 crypto: caam - Fix kerneldoc Fix kerneldoc warnings like: drivers/crypto/caam/caamalg_qi2.c:73: warning: cannot understand function prototype: 'struct caam_ctx' drivers/crypto/caam/caamalg_qi2.c:2962: warning: cannot understand function prototype: 'struct caam_hash_ctx' drivers/crypto/caam/ctrl.c:449: warning: Function parameter or member 'ctrl' not described in 'caam_get_era' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Iuliana Prodan Signed-off-by: Herbert Xu commit 24efcec2919afa7d56f848c83a605b46c8042a53 Author: Longfang Liu Date: Thu Sep 10 19:56:43 2020 +0800 crypto: hisilicon - fixed memory allocation error 1. Fix the bug of 'mac' memory leak as allocating 'pbuf' failing. 2. Fix the bug of 'qps' leak as allocating 'qp_ctx' failing. Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit 0542a9416af3b59ae31d0599d5da6ce43bec209c Author: Longfang Liu Date: Thu Sep 10 19:56:42 2020 +0800 crypto: hisilicon - update ZIP module parameter description In order to pass kernel CRYPTO test, ZIP module parameter 'pf_q_num' needs to be set as greater than 1. Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit 7c1f38aa2c3d2f26b7b0290087d37743efa7758d Author: Longfang Liu Date: Thu Sep 10 19:56:41 2020 +0800 crypto: hisilicon - update SEC module parameter description In order to pass kernel CRYPTO test, SEC module parameter 'pf_q_num' needs to be set as greater than 1. Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit ad5af2e9df1f9dca33d5372667391b85fa3429da Author: Longfang Liu Date: Thu Sep 10 19:56:40 2020 +0800 crypto: hisilicon - update HPRE module parameter description In order to pass kernel CRYPTO test, HPRE module parameter 'pf_q_num' needs to be set as greater than 1. Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit c4f8f62fe13ae397fb7339d31eaee5fbe81f4560 Author: Longfang Liu Date: Thu Sep 10 19:56:39 2020 +0800 crypto: hisilicon - update mininum queue At present, as HPRE/SEC/ZIP modules' parameter 'pf_q_num' is 1, kernel CRYPTO test will fail on the algorithms from the modules, since 'QP' hardware resources are not enough for CRYPTO TFM. To fix this, the minimum value of 'pf_q_num' should be 2. Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit 37b15fa97e12796854ed41d3a6d7e8f54e27ef1f Author: Giovanni Cabiddu Date: Wed Sep 9 11:59:40 2020 +0100 crypto: qat - use PCI_VDEVICE Build pci_device_id structure using the PCI_VDEVICE macro. This removes any references to the ADF_SYSTEM_DEVICE macro. Suggested-by: Andy Shevchenko Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 92db31989944c0f0da9eb184272901f8af08d516 Author: Giovanni Cabiddu Date: Wed Sep 9 11:59:39 2020 +0100 crypto: qat - replace device ids defines Replace device ids defined in the QAT drivers with the ones in include/linux/pci_ids.h. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit 2baace5feb86c6916221911f391f11fcd8e1a259 Author: Dan Carpenter Date: Wed Sep 9 12:45:28 2020 +0300 crypto: sa2ul - Fix pm_runtime_get_sync() error checking The pm_runtime_get_sync() function returns either 0 or 1 on success but this code treats a return of 1 as a failure. Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver") Signed-off-by: Dan Carpenter Signed-off-by: Herbert Xu commit bd03b0214ad426c078d46c2b54a3b14f81b97f6b Author: Pascal van Leeuwen Date: Tue Sep 8 08:10:45 2020 +0200 crypto: inside-secure - Prevent missing of processing errors On systems with coherence issues, packet processed could succeed while it should have failed, e.g. because of an authentication fail. This is because the driver would read stale status information that had all error bits initialised to zero = no error. Since this is potential a security risk, we want to prevent it from being a possibility at all. So initialize all error bits to error state, so that reading stale status information will always result in errors. Signed-off-by: Pascal van Leeuwen Acked-by: Antoine Tenart Signed-off-by: Herbert Xu commit 9b20cbf8ebf072ef7ef603c139c004904b2ddd52 Author: Herbert Xu Date: Tue Sep 8 15:00:36 2020 +1000 crypto: sun4i-ss - Fix sparse endianness markers This patch also fixes the incorrect endianness markings in the sun4i-ss driver. It should have no effect in the genereated code. Instead of using cpu_to_Xe32 followed by a memcpy, this patch converts the final hash write to use put_unaligned_X instead. Reported-by: kernel test robot Signed-off-by: Herbert Xu Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit 2ca73193ccab4f02ffde11f3f0a3185fbd1c50b3 Author: Yang Shen Date: Mon Sep 7 16:22:02 2020 +0800 crypto: hisilicon/zip - fix some coding styles 1.Unified alignment styles 2.Remove unnecessary goto branch 3.Remove address printf Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 2a928693d7102e35addcd0cc9dbae05253ee2ed1 Author: Yang Shen Date: Mon Sep 7 16:22:01 2020 +0800 crypto: hisilicon/zip - supplement some comments Supplement some comments. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit f97a3d7558d7f77deccbac79eaf8ffa9d1a131d3 Author: Yang Shen Date: Mon Sep 7 16:22:00 2020 +0800 crypto: hisilicon/zip - move some private macros from 'zip.h' to 'zip_crypto.c' Some macros which are defined in 'zip.h' are related to the struct 'hisi_zip_sqe' and are only used in 'zip_crypto.c'. So move them from 'zip.h' to 'zip_crypto.c'. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit eb175f7c0a67d6f1b078b6dec70bd1a1cd9c6e7b Author: Yang Shen Date: Mon Sep 7 16:21:59 2020 +0800 crypto: hisilicon/zip - fix static check warning Fix some code for PClint warning: Warning - Suspicious Cast Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit b1a25820a69c0eb78d6435f5e23bc1e328a80d62 Author: Yang Shen Date: Mon Sep 7 16:21:58 2020 +0800 crypto: hisilicon/zip - add print for error branch Add print for some error branches. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit de590233074ffbd28d15020a88b558127921f11f Author: Yang Shen Date: Mon Sep 7 16:21:57 2020 +0800 crypto: hisilicon/zip - use a enum parameter instead of some macros Macros 'QPC_COMP', 'QPC_DECOMP' and 'HZIP_CTX_Q_NUM' are relative and incremental. So, use an enum instead. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 533b2079291c5941b98b624738511a22e0dca10d Author: Yang Shen Date: Mon Sep 7 16:21:56 2020 +0800 crypto: hisilicon/zip - replace 'sprintf' with 'scnprintf' Replace 'sprintf' with 'scnprintf' to avoid overrun. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 4b33f057ee99631df8588031a6c3ef640e08783d Author: Shukun Tan Date: Mon Sep 7 16:21:55 2020 +0800 crypto: hisilicon/zip - modify debugfs interface parameters Update debugfs interface parameters Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 15b0694f797ead9ac6de70f7fdee7ef5fc86ced6 Author: Yang Shen Date: Mon Sep 7 16:21:54 2020 +0800 crypto: hisilicon/zip - unify naming style for functions and macros 1.Add prefix 'HZIP' for some macros 2.Add prefix 'hisi_zip' for some functions Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 70af3e7e0cbe23eaaa1e7fccc8dc416058b5faaf Author: Yang Shen Date: Mon Sep 7 16:21:53 2020 +0800 crypto: hisilicon/zip - remove some useless parameters 1.Remove the macro 'HZIP_VF_NUM'. 2.Remove 'list' of the struct 'hisi_zip' Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 3faf757bad75f3fc1b2736f0431e295a073a7423 Author: Tero Kristo Date: Mon Sep 7 10:56:24 2020 +0300 crypto: omap-sham - fix digcnt register handling with export/import Running export/import for hashes in peculiar order (mostly done by openssl) can mess up the internal book keeping of the OMAP SHA core. Fix by forcibly writing the correct DIGCNT back to hardware. This issue was noticed while transitioning to openssl 1.1 support. Fixes: 0d373d603202 ("crypto: omap-sham - Add OMAP4/AM33XX SHAM Support") Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 133c3d434d91d3d126c07c47420a21e40ed411e1 Author: Tero Kristo Date: Mon Sep 7 10:56:10 2020 +0300 crypto: omap-sham - convert to use crypto engine Convert the omap-sham driver to use crypto engine for queue handling, instead of using local implementation. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 61f033ba18c37e6b9ddfc4ee6dffe049d981fe7e Author: Herbert Xu Date: Mon Sep 7 16:22:40 2020 +1000 crypto: sa2ul - Select CRYPTO_AUTHENC The sa2ul driver uses crypto_authenc_extractkeys and therefore must select CRYPTO_AUTHENC. Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver") Reported-by: kernel test robot Signed-off-by: Herbert Xu Reviewed-by: Keerthy Signed-off-by: Herbert Xu commit e6bbde8b2b4f5aeb129c5a6cb99f0b773c871b8c Author: Xiongfeng Wang Date: Mon Sep 14 10:48:54 2020 +0800 EDAC/mc_sysfs: Add missing newlines when printing {max,dimm}_location Reading those sysfs entries gives: [root@localhost /]# cat /sys/devices/system/edac/mc/mc0/max_location memory 3 [root@localhost /]# cat /sys/devices/system/edac/mc/mc0/dimm0/dimm_location memory 0 [root@localhost /]# Add newlines after the value it prints for better readability. [ bp: Make len a signed int and change the check to catch wraparound. Increment the pointer p only when the length check passes. Use scnprintf(). ] Signed-off-by: Xiongfeng Wang Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1600051734-8993-1-git-send-email-wangxiongfeng2@huawei.com commit 07def58717dab4ff0055c61c316df65d59c53c83 Author: Liu Shixin Date: Mon Sep 14 14:53:58 2020 +0800 EDAC/aspeed: Use module_platform_driver() to simplify Use module_platform_driver() which makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin Signed-off-by: Borislav Petkov Reviewed-by: Joel Stanley Link: https://lkml.kernel.org/r/20200914065358.3726216-1-liushixin2@huawei.com commit 7f35e2798d01c90d6a2f306f7a9de4d7e004e905 Author: Gustavo Pimentel Date: Tue Sep 15 23:56:11 2020 +0200 dmaengine: dw-edma: Fix Using plain integer as NULL pointer in dw-edma-v0-debugfs.c Fixes warning given by executing "make C=2 drivers/dma/dw-edma/" Sparse output: drivers/dma/dw-edma/dw-edma-v0-debugfs.c:296:49: warning: Using plain integer as NULL pointer Cc: Joao Pinto Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/6569fd8ca5ddaa73afef1241ad7978c2a1fae0c7.1600206938.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit c91dfc9818df5f43c10c727f1cecaebdb5e2fa92 Author: Geert Uytterhoeven Date: Thu Sep 17 15:21:17 2020 +0200 arm64: dts: renesas: r8a774c0: Fix MSIOF1 DMA channels According to Technical Update TN-RCT-S0352A/E, MSIOF1 DMA can only be used with SYS-DMAC0 on R-Car E3. Fixes: 62c0056f1c3eb15d ("arm64: dts: renesas: r8a774c0: Add MSIOF nodes") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200917132117.8515-3-geert+renesas@glider.be commit 453802c463abd003a7c38ffbc90b67ba162335b6 Author: Geert Uytterhoeven Date: Thu Sep 17 15:21:16 2020 +0200 arm64: dts: renesas: r8a77990: Fix MSIOF1 DMA channels According to Technical Update TN-RCT-S0352A/E, MSIOF1 DMA can only be used with SYS-DMAC0 on R-Car E3. Fixes: 8517042060b55a37 ("arm64: dts: renesas: r8a77990: Add DMA properties to MSIOF nodes") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200917132117.8515-2-geert+renesas@glider.be commit ceae069803ef04f733c594dc196cc0626639be49 Author: Liu Shixin Date: Tue Sep 15 11:26:22 2020 +0800 dmaengine: mediatek: simplify the return expression of mtk_uart_apdma_runtime_resume() Simplify the return expression. Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20200915032622.1772309-1-liushixin2@huawei.com Signed-off-by: Vinod Koul commit 0143db65b0465da8bb37679056d9f14bacb9cfbd Author: Jason Yan Date: Sat Sep 12 15:21:58 2020 +0800 dmaengine: ioat: Make two symbols static This eliminates the following sparse warning: drivers/dma/ioat/dma.c:29:5: warning: symbol 'completion_timeout' was not declared. Should it be static? drivers/dma/ioat/dma.c:33:5: warning: symbol 'idle_timeout' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20200912072158.602585-1-yanaijie@huawei.com Signed-off-by: Vinod Koul commit d8344fa93ed1b3f80417718deb70aea76f7948be Author: Vinod Koul Date: Mon Sep 14 11:23:02 2020 +0530 dmaengine: sf-pdma: remove unused 'desc' 'desc' variable is now defined but not used in sf_pdma_donebh_tasklet(), causing this warning: drivers/dma/sf-pdma/sf-pdma.c: In function 'sf_pdma_donebh_tasklet': drivers/dma/sf-pdma/sf-pdma.c:287:23: warning: unused variable 'desc' [-Wunused-variable] Remove this unused variable Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20200914055302.22962-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit 55f8b2543a36734377c4000bde6198b1dcb42d4b Author: Barry Song Date: Sat Sep 12 21:40:36 2020 +1200 dmaengine: zx: remove redundant irqsave in hardIRQ Running in hardIRQ context, disabling IRQ is redundant. Cc: Jun Nie Cc: Shawn Guo Cc: Dan Williams Cc: Vinod Koul Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20200912094036.32112-1-song.bao.hua@hisilicon.com Signed-off-by: Vinod Koul commit e0cbf2f0a756f27d7b468947123d6ac9d3fc059f Author: Krzysztof Kozlowski Date: Wed Sep 2 19:24:33 2020 +0200 interconnect: imx: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902172433.1138-2-krzk@kernel.org Signed-off-by: Georgi Djakov commit 392da338b25e5a7d87929db22e93cb4aaf0251fe Author: Krzysztof Kozlowski Date: Wed Sep 2 19:24:32 2020 +0200 interconnect: core: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902172433.1138-1-krzk@kernel.org Signed-off-by: Georgi Djakov commit 59cd818763e8b12e85f28e27fa0a6821faf45660 Author: Allen Pais Date: Mon Aug 31 19:17:45 2020 +0530 dmaengine: fsl: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831134745.314945-1-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 2fa9bc98b5310b336ced0caa469a00f9e871758b Author: Allen Pais Date: Mon Aug 31 16:05:42 2020 +0530 dmaengine: k3-udma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Allen Pais Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200831103542.305571-36-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 6c1fd9ad2c5b722cf4b6c300ea3660ba324dae98 Author: Allen Pais Date: Mon Aug 31 16:05:40 2020 +0530 dmaengine: plx_dma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-34-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit f19a11d40a78866e06b92fe157aa9258ed3388a3 Author: Allen Pais Date: Mon Aug 31 16:05:39 2020 +0530 dmaengine: xilinx: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-33-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 0e71d9b9e82be42019c4dce13457e3458f21c911 Author: Allen Pais Date: Mon Aug 31 16:05:38 2020 +0530 dmaengine: xgene: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-32-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 3f7a660474f80834d9688c8120e391b73f9fc778 Author: Allen Pais Date: Mon Aug 31 16:05:37 2020 +0530 dmaengine: virt-dma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200831103542.305571-31-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit a81b0e6d201dd72b93d532cff892333cbca4c0e1 Author: Allen Pais Date: Mon Aug 31 16:05:36 2020 +0530 dmaengine: txx9dmac: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-30-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 835479586ab877035d150425e93ea61d9c6249c3 Author: Allen Pais Date: Mon Aug 31 16:05:35 2020 +0530 dmaengine: timb_dma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-29-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 86fc54fa2f48c34a673a30cd42b06d2356159656 Author: Allen Pais Date: Mon Aug 31 16:05:34 2020 +0530 dmaengine: tegra20: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-28-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit aaf9d3d6c5cbb09545cfdc4e091456c266a21adf Author: Allen Pais Date: Mon Aug 31 16:05:33 2020 +0530 dmaengine: sun6i: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200831103542.305571-27-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit b1880c90749637da354b7884d4e260f0722f4755 Author: Allen Pais Date: Mon Aug 31 16:05:32 2020 +0530 dmaengine: ste_dma40: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-26-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 758cc054aa3ad65bed179260ab7e4fdd6eea678e Author: Allen Pais Date: Mon Aug 31 16:05:31 2020 +0530 dmaengine: sirf-dma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-25-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 8a536883e09c30db57eee4ebdf6fcc4e309bf6ab Author: Allen Pais Date: Mon Aug 31 16:05:30 2020 +0530 dmaengine: sa11x0: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-24-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 00c4747a2f64d8d8f7db10127b394e915b20a7f4 Author: Allen Pais Date: Mon Aug 31 16:05:29 2020 +0530 dmaengine: qcom: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-23-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 7f8281765f9949af30541428e29596b3025dc09a Author: Allen Pais Date: Mon Aug 31 16:05:28 2020 +0530 dmaengine: ppc4xx: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-22-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit ab2a98ae4105d805383f840c54fabbb6560e2fc7 Author: Allen Pais Date: Mon Aug 31 16:05:27 2020 +0530 dmaengine: pl330: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-21-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 88ff5093ca30b73121930d2cf5f069ed2ffee6bb Author: Allen Pais Date: Mon Aug 31 16:05:26 2020 +0530 dmaengine: pch_dma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-20-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit bbc61540058a95366c35eac6b9acf046d5cb7c9d Author: Allen Pais Date: Mon Aug 31 16:05:25 2020 +0530 dmaengine: nbpfaxi: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-19-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 6afe87786e50c396bda61a091ce2baa3a3eac59b Author: Allen Pais Date: Mon Aug 31 16:05:24 2020 +0530 dmaengine: mxs-dma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-18-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 34ca9a53ea94cd4c87753e93288042272a8f2ef1 Author: Allen Pais Date: Mon Aug 31 16:05:23 2020 +0530 dmaengine: mv_xor: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-17-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 8125968550b3ed80f098508dfa4ee069586febca Author: Allen Pais Date: Mon Aug 31 16:05:22 2020 +0530 dmaengine: mpc512x: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-16-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 77a4f4f74eecaba5357dbc188dbe935aa9cf8fcf Author: Allen Pais Date: Mon Aug 31 16:05:21 2020 +0530 dmaengine: mmp: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-15-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 80ef88693e96d7a2b491a5951b9e708d1bd75325 Author: Allen Pais Date: Mon Aug 31 16:05:20 2020 +0530 dmaengine: mediatek: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-14-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 881bd142898e32f8bae93ec22f9ef6a104d8e0a8 Author: Allen Pais Date: Mon Aug 31 16:05:19 2020 +0530 dmaengine: k3dma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-13-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit fae985d3ea16a72093dcfaa9ce306ce49a2a0efc Author: Allen Pais Date: Mon Aug 31 16:05:18 2020 +0530 dmaengine: ipu: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-12-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 5bbb671f1350540b53c613029fa32b8823e76161 Author: Allen Pais Date: Mon Aug 31 16:05:17 2020 +0530 dmaengine: iop_adma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-11-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 3b8040de1282c58ca6915b3311f6cbe54fb5c629 Author: Allen Pais Date: Mon Aug 31 16:05:16 2020 +0530 dmaengine: ioat: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20200831103542.305571-10-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit cce010a5320967424ceaa7f23aa6d7cf1eb1aff9 Author: Allen Pais Date: Mon Aug 31 16:05:15 2020 +0530 dmaengine: imx-dma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-9-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 95fbf16349f828c07a8a1aaad31e3a120c1329ca Author: Allen Pais Date: Mon Aug 31 16:05:13 2020 +0530 dmaengine: ep93xx: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-7-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 169bb74f89c67527952107314faeb3b627ec1c01 Author: Allen Pais Date: Mon Aug 31 16:05:12 2020 +0530 dmaengine: dw: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-6-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 52fcf656ad2a7ee00613ef202af4602f7bd13210 Author: Allen Pais Date: Mon Aug 31 16:05:11 2020 +0530 dmaengine: coh901318: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-5-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 00217d198c5f42c726623115c4e9e2fad666a63a Author: Allen Pais Date: Mon Aug 31 16:05:10 2020 +0530 dmaengine: at_xdmac: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-4-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit f6a0eb52743ce65ca6bbb1427f2a4032b53be65a Author: Allen Pais Date: Mon Aug 31 16:05:09 2020 +0530 dmaengine: at_hdmac: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-3-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 6752e40d669a960ffa80ff423e800c49b2fd1263 Author: Allen Pais Date: Mon Aug 31 16:05:08 2020 +0530 dmaengine: altera-msgdma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200831103542.305571-2-allen.lkml@gmail.com Signed-off-by: Vinod Koul commit 628fdbcf9d665ab68f5493936ca23383a5844ff7 Merge: b1a367bb1cbba 7d3b0b0d8184c Author: Georgi Djakov Date: Fri Sep 18 09:12:40 2020 +0300 Merge branch 'icc-syncstate' into icc-next * icc-syncstate: interconnect: Add get_bw() callback interconnect: Add sync state support interconnect: qcom: Use icc_sync_state Signed-off-by: Georgi Djakov commit 7d3b0b0d8184ce4a20fd9f48cd12484139bec939 Author: Georgi Djakov Date: Tue Aug 25 20:01:52 2020 +0300 interconnect: qcom: Use icc_sync_state Lowering the bandwidth on the bus might have negative consequences if it's done before all consumers had a chance to cast their vote. Now by default the framework sets the bandwidth to maximum during boot. We need to use the icc_sync_state callback to notify the framework when all consumers are probed and there is no need to keep the bandwidth set to maximum anymore. Link: https://lore.kernel.org/r/20200825170152.6434-4-georgi.djakov@linaro.org Reviewed-by: Saravana Kannan Signed-off-by: Georgi Djakov commit b1d681d8d32499bcf284462d92aeb5f9fe72bf5b Author: Georgi Djakov Date: Tue Aug 25 20:01:51 2020 +0300 interconnect: Add sync state support The bootloaders often do some initial configuration of the interconnects in the system and we want to keep this configuration until all consumers have probed and expressed their bandwidth needs. This is because we don't want to change the configuration by starting to disable unused paths until every user had a chance to request the amount of bandwidth it needs. To accomplish this we will implement an interconnect specific sync_state callback which will synchronize (aggregate and set) the current bandwidth settings when all consumers have been probed. Link: https://lore.kernel.org/r/20200825170152.6434-3-georgi.djakov@linaro.org Reviewed-by: Saravana Kannan Signed-off-by: Georgi Djakov commit cc80d10d6fcf6f47a2a3efe2c4139e50906a4764 Author: Georgi Djakov Date: Tue Aug 25 20:01:50 2020 +0300 interconnect: Add get_bw() callback The interconnect controller hardware may support querying the current bandwidth settings, so add a callback for providers to implement this functionality if supported. Link: https://lore.kernel.org/r/20200825170152.6434-2-georgi.djakov@linaro.org Reviewed-by: Saravana Kannan Signed-off-by: Georgi Djakov commit 6fd428f7806000d4be141f2ab4b08e2c5e998f05 Author: Swapnil Jakhade Date: Thu Sep 17 09:30:46 2020 +0200 phy: cadence-torrent: Add USB + SGMII/QSGMII multilink configuration Add USB + SGMII/QSGMII multilink configuration sequences. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600327846-9733-14-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 4acea473f38865e6bc438c1a17ff8f136dc6a0c8 Author: Swapnil Jakhade Date: Thu Sep 17 09:30:45 2020 +0200 phy: cadence-torrent: Add PCIe + USB multilink configuration Add PCIe + USB Unique SSC multilink configuration sequences. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600327846-9733-13-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 9855d84b6bb1969e45c90d8ed82235a868b99cb6 Author: Swapnil Jakhade Date: Thu Sep 17 09:30:44 2020 +0200 phy: cadence-torrent: Add single link USB register sequences Add support for single link USB configuration. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600327846-9733-12-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 9f33b76a35999a20dcea634639b88cf9d486ec9e Author: Swapnil Jakhade Date: Thu Sep 17 09:30:43 2020 +0200 phy: cadence-torrent: Add single link SGMII/QSGMII register sequences Add support for single link SGMII/QSGMII configuration. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600327846-9733-11-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit d66a63666919e9bf27ed9b45c50d35b59c86108d Author: Swapnil Jakhade Date: Thu Sep 17 09:30:42 2020 +0200 phy: cadence-torrent: Configure PHY_PLL_CFG as part of link_cmn_vals Include PHY_PLL_CFG as a first register value to configure in link_cmn_vals array values. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600327846-9733-10-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit cd9aa94737477c9d7cd8595ebc3558b00403f093 Author: Swapnil Jakhade Date: Thu Sep 17 09:30:41 2020 +0200 phy: cadence-torrent: Add PHY link configuration sequences for single link Add support to configure link_cmn_vals and xcvr_diag_vals in case of single link PHY configuration. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600327846-9733-9-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 07084c9566635fa1029502e79315a7fe785b80f4 Author: Swapnil Jakhade Date: Thu Sep 17 09:30:40 2020 +0200 phy: cadence-torrent: Add clk changes for multilink configuration Prepare and enable clock in probe instead of phy_init. Also, remove phy_exit callback. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600327846-9733-8-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit f0f1fa04581f0671837dc60d96cda58127f384c0 Author: Swapnil Jakhade Date: Thu Sep 17 09:30:39 2020 +0200 phy: cadence-torrent: Update PHY reset for multilink configuration For multilink configuration, deassert PHY and link reset after PHY registers are configured in probe and only check link status in power_on callback. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600327846-9733-7-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 6bcf3cb300376b73abcb2d241ffce4e909741ac5 Author: Swapnil Jakhade Date: Thu Sep 17 09:30:38 2020 +0200 phy: cadence-torrent: Add support for PHY multilink configuration Added support for multilink configuration of Torrent PHY. Currently, maximum two links are supported. In case of multilink configuration, PHY needs to be configured for both the protocols simultaneously at the beginning as per the requirement of Torrent PHY. Also, register sequences for PCIe + SGMII/QSGMII Unique SSC PHY multilink configurations are added. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600327846-9733-6-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 51862859fb7483421a6f498ffd364f06a51a57bf Author: Swapnil Jakhade Date: Thu Sep 17 09:30:37 2020 +0200 dt-bindings: phy: Add PHY_TYPE_QSGMII definition Add definition for QSGMII phy type. Signed-off-by: Swapnil Jakhade Acked-by: Rob Herring Link: https://lore.kernel.org/r/1600327846-9733-5-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 15c6a048e5f00af108fb9f9e56ca5bd38e11b1a6 Author: Swapnil Jakhade Date: Thu Sep 17 09:30:36 2020 +0200 phy: cadence-torrent: Add PHY APB reset support Add support for PHY APB reset and make it optional. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600327846-9733-4-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 8e4c95b9c9f4413a12f94379dccd9e31a36483a4 Author: Swapnil Jakhade Date: Thu Sep 17 09:30:35 2020 +0200 phy: cadence-torrent: Check cmn_ready assertion during PHY power on Check if cmn_ready is set after both PLL0 and PLL1 are locked. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600327846-9733-3-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit b54b47bd035bcff42e454db07cda9636cb71880b Author: Swapnil Jakhade Date: Thu Sep 17 09:30:34 2020 +0200 phy: cadence-torrent: Add single link PCIe support Add single link PCIe register sequences in Torrent PHY driver. Also, add support for getting SSC type from DT. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600327846-9733-2-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 074e991535942369b95ee5520a424e868cfaf8f7 Author: Swapnil Jakhade Date: Wed Sep 16 20:28:31 2020 +0200 dt-bindings: phy: cadence-torrent: Update Torrent PHY bindings for generic use Torrent PHY can be used in different multi-link multi-protocol configurations including protocols other than DisplayPort also, such as PCIe, USB, SGMII, QSGMII etc. Update the bindings to have support for these configurations. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600280911-9214-8-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 962fad301c33dec69324dc2d9320fd84a119a24c Author: Swapnil Jakhade Date: Wed Sep 16 20:28:30 2020 +0200 dt-bindings: phy: cadence-torrent: Add binding to specify SSC mode Add binding to specify Spread Spectrum Clocking mode used. Signed-off-by: Swapnil Jakhade Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1600280911-9214-7-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit d09945eacad0ef16ca8a1ca45be6a25e066e85a5 Author: Swapnil Jakhade Date: Wed Sep 16 20:28:29 2020 +0200 phy: cadence-torrent: Check total lane count for all subnodes is within limit Add checking if total number of lanes for all subnodes is not greater than number of lanes supported by PHY. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600280911-9214-6-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 2e70c84995b232850419e081d9668467dbbe1fe3 Author: Swapnil Jakhade Date: Wed Sep 16 20:28:28 2020 +0200 phy: cadence-torrent: Add separate regmap functions for torrent and DP Added separate functions for regmap initialization of torrent PHY generic registers and DP specific registers. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600280911-9214-5-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 7c12b46c6313cfeb5cb9ac5ff11eaaf5f8b9c530 Author: Swapnil Jakhade Date: Wed Sep 16 20:28:27 2020 +0200 phy: cadence-torrent: Enable support for multiple subnodes Enable support for multiple subnodes in torrent PHY to include multi-link combinations. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600280911-9214-4-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 46d205af3015b325dffa1b11495071c637bce0f6 Author: Swapnil Jakhade Date: Wed Sep 16 20:28:26 2020 +0200 phy: cadence-torrent: Use devm_platform_ioremap_resource() to get reg addresses Use devm_platform_ioremap_resource() to get register addresses instead of boilerplate code. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600280911-9214-3-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 29d1fd2f2cc6a112abf93bca23a6852b6f1f112d Author: Swapnil Jakhade Date: Wed Sep 16 20:28:25 2020 +0200 phy: cadence-torrent: Use of_device_get_match_data() to get driver data Use of_device_get_match_data() to get driver data instead of boilerplate code. Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1600280911-9214-2-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 3b0379111197fb97f4f46f93946fe30b22a15223 Author: Maciej Fijalkowski Date: Wed Sep 16 23:10:10 2020 +0200 selftests/bpf: Add tailcall_bpf2bpf tests Add four tests to tailcalls selftest explicitly named "tailcall_bpf2bpf_X" as their purpose is to validate that combination of tailcalls with bpf2bpf calls are working properly. These tests also validate LD_ABS from subprograms. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov commit 09b28d76eac48e922dc293da1aa2b2b85c32aeee Author: Alexei Starovoitov Date: Thu Sep 17 19:09:18 2020 -0700 bpf: Add abnormal return checks. LD_[ABS|IND] instructions may return from the function early. bpf_tail_call pseudo instruction is either fallthrough or return. Allow them in the subprograms only when subprograms are BTF annotated and have scalar return types. Allow ld_abs and tail_call in the main program even if it calls into subprograms. In the past that was not ok to do for ld_abs, since it was JITed with special exit sequence. Since bpf_gen_ld_abs() was introduced the ld_abs looks like normal exit insn from JIT point of view, so it's safe to allow them in the main program. Signed-off-by: Alexei Starovoitov commit e411901c0b775a3ae7f3e2505f8d2d90ac696178 Author: Maciej Fijalkowski Date: Wed Sep 16 23:10:09 2020 +0200 bpf: allow for tailcalls in BPF subprograms for x64 JIT Relax verifier's restriction that was meant to forbid tailcall usage when subprog count was higher than 1. Also, do not max out the stack depth of program that utilizes tailcalls. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov commit ebf7d1f508a73871acf3b2bfbfa1323a477acdb3 Author: Maciej Fijalkowski Date: Wed Sep 16 23:10:08 2020 +0200 bpf, x64: rework pro/epilogue and tailcall handling in JIT This commit serves two things: 1) it optimizes BPF prologue/epilogue generation 2) it makes possible to have tailcalls within BPF subprogram Both points are related to each other since without 1), 2) could not be achieved. In [1], Alexei says: "The prologue will look like: nop5 xor eax,eax  // two new bytes if bpf_tail_call() is used in this // function push rbp mov rbp, rsp sub rsp, rounded_stack_depth push rax // zero init tail_call counter variable number of push rbx,r13,r14,r15 Then bpf_tail_call will pop variable number rbx,.. and final 'pop rax' Then 'add rsp, size_of_current_stack_frame' jmp to next function and skip over 'nop5; xor eax,eax; push rpb; mov rbp, rsp' This way new function will set its own stack size and will init tail call counter with whatever value the parent had. If next function doesn't use bpf_tail_call it won't have 'xor eax,eax'. Instead it would need to have 'nop2' in there." Implement that suggestion. Since the layout of stack is changed, tail call counter handling can not rely anymore on popping it to rbx just like it have been handled for constant prologue case and later overwrite of rbx with actual value of rbx pushed to stack. Therefore, let's use one of the register (%rcx) that is considered to be volatile/caller-saved and pop the value of tail call counter in there in the epilogue. Drop the BUILD_BUG_ON in emit_prologue and in emit_bpf_tail_call_indirect where instruction layout is not constant anymore. Introduce new poke target, 'tailcall_bypass' to poke descriptor that is dedicated for skipping the register pops and stack unwind that are generated right before the actual jump to target program. For case when the target program is not present, BPF program will skip the pop instructions and nop5 dedicated for jmpq $target. An example of such state when only R6 of callee saved registers is used by program: ffffffffc0513aa1: e9 0e 00 00 00 jmpq 0xffffffffc0513ab4 ffffffffc0513aa6: 5b pop %rbx ffffffffc0513aa7: 58 pop %rax ffffffffc0513aa8: 48 81 c4 00 00 00 00 add $0x0,%rsp ffffffffc0513aaf: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) ffffffffc0513ab4: 48 89 df mov %rbx,%rdi When target program is inserted, the jump that was there to skip pops/nop5 will become the nop5, so CPU will go over pops and do the actual tailcall. One might ask why there simply can not be pushes after the nop5? In the following example snippet: ffffffffc037030c: 48 89 fb mov %rdi,%rbx (...) ffffffffc0370332: 5b pop %rbx ffffffffc0370333: 58 pop %rax ffffffffc0370334: 48 81 c4 00 00 00 00 add $0x0,%rsp ffffffffc037033b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) ffffffffc0370340: 48 81 ec 00 00 00 00 sub $0x0,%rsp ffffffffc0370347: 50 push %rax ffffffffc0370348: 53 push %rbx ffffffffc0370349: 48 89 df mov %rbx,%rdi ffffffffc037034c: e8 f7 21 00 00 callq 0xffffffffc0372548 There is the bpf2bpf call (at ffffffffc037034c) right after the tailcall and jump target is not present. ctx is in %rbx register and BPF subprogram that we will call into on ffffffffc037034c is relying on it, e.g. it will pick ctx from there. Such code layout is therefore broken as we would overwrite the content of %rbx with the value that was pushed on the prologue. That is the reason for the 'bypass' approach. Special care needs to be taken during the install/update/remove of tailcall target. In case when target program is not present, the CPU must not execute the pop instructions that precede the tailcall. To address that, the following states can be defined: A nop, unwind, nop B nop, unwind, tail C skip, unwind, nop D skip, unwind, tail A is forbidden (lead to incorrectness). The state transitions between tailcall install/update/remove will work as follows: First install tail call f: C->D->B(f) * poke the tailcall, after that get rid of the skip Update tail call f to f': B(f)->B(f') * poke the tailcall (poke->tailcall_target) and do NOT touch the poke->tailcall_bypass Remove tail call: B(f')->C(f') * poke->tailcall_bypass is poked back to jump, then we wait the RCU grace period so that other programs will finish its execution and after that we are safe to remove the poke->tailcall_target Install new tail call (f''): C(f')->D(f'')->B(f''). * same as first step This way CPU can never be exposed to "unwind, tail" state. Last but not least, when tailcalls get mixed with bpf2bpf calls, it would be possible to encounter the endless loop due to clearing the tailcall counter if for example we would use the tailcall3-like from BPF selftests program that would be subprogram-based, meaning the tailcall would be present within the BPF subprogram. This test, broken down to particular steps, would do: entry -> set tailcall counter to 0, bump it by 1, tailcall to func0 func0 -> call subprog_tail (we are NOT skipping the first 11 bytes of prologue and this subprogram has a tailcall, therefore we clear the counter...) subprog -> do the same thing as entry and then loop forever. To address this, the idea is to go through the call chain of bpf2bpf progs and look for a tailcall presence throughout whole chain. If we saw a single tail call then each node in this call chain needs to be marked as a subprog that can reach the tailcall. We would later feed the JIT with this info and: - set eax to 0 only when tailcall is reachable and this is the entry prog - if tailcall is reachable but there's no tailcall in insns of currently JITed prog then push rax anyway, so that it will be possible to propagate further down the call chain - finally if tailcall is reachable, then we need to precede the 'call' insn with mov rax, [rbp - (stack_depth + 8)] Tail call related cases from test_verifier kselftest are also working fine. Sample BPF programs that utilize tail calls (sockex3, tracex5) work properly as well. [1]: https://lore.kernel.org/bpf/20200517043227.2gpq22ifoq37ogst@ast-mbp.dhcp.thefacebook.com/ Suggested-by: Alexei Starovoitov Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov commit 7f6e4312e15a5c370e84eaa685879b6bdcc717e4 Author: Maciej Fijalkowski Date: Wed Sep 16 23:10:07 2020 +0200 bpf: Limit caller's stack depth 256 for subprogs with tailcalls Protect against potential stack overflow that might happen when bpf2bpf calls get combined with tailcalls. Limit the caller's stack depth for such case down to 256 so that the worst case scenario would result in 8k stack size (32 which is tailcall limit * 256 = 8k). Suggested-by: Alexei Starovoitov Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov commit d34c7b7b6b9180cc4a1d3447c398792e65c7b04e Author: Alex Deucher Date: Tue Sep 15 13:36:20 2020 -0400 drm/amdgpu: remove experimental flag from navi12 Navi12 has worked fine for a while now. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 783a25f4c7bc9a75099f5b0df78e4e8459ec851b Author: Philip Cox Date: Wed Sep 9 15:44:14 2020 -0400 drm/amdkfd: Reduce eviction/restore message levels Reduce the eviction and restore messages from INFO level to DEBUG level. Signed-off-by: Philip Cox Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4327bed2ff8e3ddc57beb27fed8ad2faef240d72 Author: Philip Cox Date: Tue Jun 30 15:51:05 2020 -0400 drm/amdkfd: Add process eviction counters to sysfs Add per-process eviction counters to sysfs to keep track of how many eviction events have happened for each process. v2: rename the stats dir, and track all evictions per process, per device. v3: Simplify the stats kobject handling and cleanup. v4: more code cleanup Signed-off-by: Philip Cox Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 8a491bb31ba40246ae15cbb3c044d72fb9e0d13e Author: Philip Cox Date: Mon Jun 29 09:49:59 2020 -0400 drm/amdkfd: Add some eveiction debugging code Extending the module parameter debug_evictions to also print a stack trace when the eviction code path is called. Signed-off-by: Philip Cox Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 35d1a405cada8b61dd866e7815a226486b8d55b2 Author: Xiaoliang Pang Date: Thu Sep 17 11:46:10 2020 +0800 drm/amdgpu/powerplay: hwmgr - modify the return value Return value should be -EINVAL rather than EINVAL Fixes: f83a9991648bb("drm/amd/powerplay: add Vega10 powerplay support (v5)") Fixes: 2cac05dee6e30("drm/amd/powerplay: add the hw manager for vega12 (v4)") Cc: Eric Huang Cc: Evan Quan Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Xiaoliang Pang Signed-off-by: Alex Deucher commit 71f49c4898eef4b0a5bb39549d8459cbb0ad70ab Author: Ye Bin Date: Thu Sep 17 18:57:59 2020 +0800 drm/amd/display: Delete duplicated argument to '&&' or '||' Fixes coccicheck warnig: drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.c:282:12-42: duplicated argument to && or || drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c:3240:12-42: duplicated argument to && or || drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c:5520:7-91: duplicated argument to && or || drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c:5309:86-122: duplicated argument to && or || Fixes: 6725a88f88a7 ("drm/amd/display: Add DCN3 DML") Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Alex Deucher commit 8c4e4fd607b17973e54a7e9cc4c275b12ab7308e Author: Mauro Rossi Date: Thu Sep 17 09:33:31 2020 +0200 drm/amd/display: dc/clk_mgr: make function static [Why] linux-next kernel test robot reported the following problem: warning: no previous prototype for 'dce60_get_dp_ref_freq_khz' [-Wmissing-prototypes] [How] mark dce60_get_dp_ref_freq_khz() as static Fixes: 3ecb3b794e2c "drm/amd/display: dc/clk_mgr: add support for SI parts (v2)" Reported-by: kernel test robot Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 1d39cd8cf75f79d082ee97f5fd2a6286bcc692c1 Author: Paolo Abeni Date: Thu Sep 17 23:07:24 2020 +0200 mptcp: fix integer overflow in mptcp_subflow_discard_data() Christoph reported an infinite loop in the subflow receive path under stress condition. If there are multiple subflows, each of them using a large send buffer, the delta between the sequence number used by MPTCP-level retransmission can and the current msk->ack_seq can be greater than MAX_INT. In the above scenario, when calling mptcp_subflow_discard_data(), such delta will be truncated to int, and could result in a negative number: no bytes will be dropped, and subflow_check_data_avail() will try again to process the same packet, looping forever. This change addresses the issue by expanding the 'limit' size to 64 bits, so that overflows are not possible anymore. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/87 Fixes: 6719331c2f73 ("mptcp: trigger msk processing even for OoO data") Reported-and-tested-by: Christoph Paasch Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit ac679364b98edb4ba46a482c7ab52e2ccb82b8de Author: Ursula Braun Date: Thu Sep 17 22:46:02 2020 +0200 net/smc: fix double kfree in smc_listen_work() If smc_listen_rmda_finish() returns with an error, the storage addressed by 'buf' is freed a second time. Consolidate freeing under a common label and jump to that label. Fixes: 6bb14e48ee8d ("net/smc: dynamic allocation of CLC proposal buffer") Reported-by: Dan Carpenter Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 86d009f1cb046d826ac0222df8b5e25967af369c Author: Shannon Nelson Date: Thu Sep 17 13:33:35 2020 -0700 ionic: add DIMLIB to Kconfig >> ld.lld: error: undefined symbol: net_dim_get_rx_moderation >>> referenced by ionic_lif.c:52 (drivers/net/ethernet/pensando/ionic/ionic_lif.c:52) >>> net/ethernet/pensando/ionic/ionic_lif.o:(ionic_dim_work) in archive drivers/built-in.a >> ld.lld: error: undefined symbol: net_dim >>> referenced by ionic_txrx.c:456 (drivers/net/ethernet/pensando/ionic/ionic_txrx.c:456) >>> net/ethernet/pensando/ionic/ionic_txrx.o:(ionic_dim_update) in archive drivers/built-in.a v2: removed sketchy dashes in commit message Fixes: 04a834592bf5 ("ionic: dynamic interrupt moderation") Reported-by: kernel test robot Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 78a3ea5557137b0811f3c5a020afaafa7b61d6aa Author: Jakub Kicinski Date: Thu Sep 17 10:51:32 2020 -0700 net: remove comments on struct rtnl_link_stats We removed the misleading comments from struct rtnl_link_stats64 when we added proper kdoc. struct rtnl_link_stats has the same inline comments, so remove them, too. Signed-off-by: Jakub Kicinski Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit 529d1fdf9719c2ca6b35c24e88e0e7dd62a9a172 Author: Andrew Lunn Date: Thu Sep 17 18:19:49 2020 +0200 net: mdio: octeon: Select MDIO_DEVRES This driver makes use of devm_mdiobus_alloc_size. To ensure this is available select MDIO_DEVRES which provides it. Signed-off-by: Andrew Lunn Reported-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested Signed-off-by: David S. Miller commit 897217b9a00426a037215c5539f467733a3823fe Author: David Ahern Date: Thu Sep 17 09:13:33 2020 -0600 selftests: Set default protocol for raw sockets in nettest IPPROTO_IP (0) is not valid for raw sockets. Default the protocol for raw sockets to IPPROTO_RAW if the protocol has not been set via the -P option. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 77646b63ff2513dfe256d9dbf0929221f083369e Author: Qinglang Miao Date: Thu Sep 17 20:45:08 2020 +0800 dpaa2-eth: Convert to DEFINE_SHOW_ATTRIBUTE Signed-off-by: Qinglang Miao Reviewed-by: Ioana Ciornei Signed-off-by: David S. Miller commit 2170ff081977846e4a24e1056056031eafb9c857 Author: Qinglang Miao Date: Thu Sep 17 20:45:07 2020 +0800 net: hsr: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao Signed-off-by: David S. Miller commit 72d61d30097fea6c74cc06eee3d911788f5f4c6b Merge: 4d11af5d008d5 509f04ca62989 Author: David S. Miller Date: Thu Sep 17 17:01:38 2020 -0700 Merge branch 'mlxsw-Support-dcbnl_setbuffer-dcbnl_getbuffer' Ido Schimmel says: ==================== mlxsw: Support dcbnl_setbuffer, dcbnl_getbuffer Petr says: On Spectrum, port buffers, also called port headroom, is where packets are stored while they are parsed and the forwarding decision is being made. For lossless traffic flows, in case shared buffer admission is not allowed, headroom is also where to put the extra traffic received before the sent PAUSE takes effect. Linux supports two DCB interfaces related to the headroom: dcbnl_setbuffer for configuration, and dcbnl_getbuffer for inspection. This patch set implements them. With dcbnl_setbuffer in place, there will be two sources of authority over the ingress configuration: the DCB ETS hook, because ETS configuration is mirrored to ingress, and the DCB setbuffer hook. mlxsw is in a similar situation on the egress side, where there are two sources of the ETS configuration: the DCB ETS hook, and the TC qdisc hooks. This is a non-intuitive situation, because the way the ASIC ends up being configured depends not only on the actual configured bits, but also on the order in which they were configured. To prevent these issues on the ingress side, two configuration modes will exist: DCB mode and TC mode. DCB ETS will keep getting projected to ingress in the (default) DCB mode. When a qdisc is installed on a port, it will be switched to the TC mode, the ingress configuration will be done through the dcbnl_setbuffer callback. The reason is that the dcbnl_setbuffer hook is not standardized and supported by lldpad. Projecting DCB ETS configuration to ingress is a reasonable heuristic to configure ingress especially when PFC is in effect. In patch #1, the toggle between the DCB and TC modes of headroom configuration, described above, is introduced. Patch #2 implements dcbnl_getbuffer and dcbnl_setbuffer. dcbnl_getbuffer can be always used to determine the current port headroom configuration. dcbnl_setbuffer is only permitted in the TC mode. In patch #3, make the qdisc module toggle the headroom mode from DCB to TC and back, depending on whether there is an offloaded qdisc on the port. ==================== Signed-off-by: David S. Miller commit 509f04ca6298981860544f03bc0e8ae407678438 Author: Petr Machata Date: Thu Sep 17 09:49:03 2020 +0300 mlxsw: spectrum_qdisc: Disable port buffer autoresize with qdiscs There are two interfaces to configure ETS: qdiscs and DCB. Historically, DCB ETS configuration was projected to ingress as well, and configured port buffers. Qdisc was not. Keep qdiscs behaving this way, and if an offloaded qdisc is configured on a port, move this port's headroom to a manual mode, thus allowing configuration of port buffers through dcbnl_setbuffer. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5ebc6031e6794ea8409cc1d4305f104ac9784398 Author: Petr Machata Date: Thu Sep 17 09:49:02 2020 +0300 mlxsw: spectrum_dcb: Implement dcbnl_setbuffer / getbuffer Add dcbnl_setbuffer, which bounces requests if a headroom is in DCB mode. Implement dcbnl_getbuffer such that it can always be used to determine port-buffer configuration, regardless of headroom mode. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 69e408a2cfa1ed26cdc2bd10ffa44b3e2b327da9 Author: Petr Machata Date: Thu Sep 17 09:49:01 2020 +0300 mlxsw: spectrum_buffers: Support two headroom modes There are two interfaces to configure ETS: qdiscs and DCB. Historically, DCB ETS configuration was projected to ingress as well, and configured port buffers. Qdisc was not. So as not to break clients that today use DCB ETS and PFC and rely on getting a reasonable ingress buffer priomap, keep the ETS mirroring in effect. Since qdiscs have not done this mirroring historically, it is reasonable not to introduce it, but rather permit manual ingress configuration through dcbnl_setbuffer only in the qdisc mode. This will require a toggle to indicate whether buffer sizes should be autocomputed or taken from dcbnl_setbuffer, and likewise for priomaps. Introduce such and initialize it, and guard port buffer size configuration as appropriate. The toggle is currently left in the DCB position. In a following patch, qdisc code will switch it. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 4d11af5d008d57de12a3e0813313f9c099ddb084 Author: Yang Yingliang Date: Thu Sep 17 11:32:23 2020 +0800 netlink: add spaces around '&' in netlink_recv/sendmsg() It's hard to read the code without spaces around '&', for better reading, add spaces around '&'. Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 2492c205d2bbbc01f5c9e49fffe4b2e633c33f38 Author: YueHaibing Date: Thu Sep 17 10:19:10 2020 +0800 netdev: Remove unused functions There is no callers in tree, so can remove it. Signed-off-by: YueHaibing Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit c2ec6bc010d2bbaa6a38fec8709890511f298e1c Author: Ye Bin Date: Thu Sep 17 09:12:33 2020 +0800 mptcp: Fix unsigned 'max_seq' compared with zero in mptcp_data_queue_ofo Fixes coccicheck warnig: net/mptcp/protocol.c:164:11-18: WARNING: Unsigned expression compared with zero: max_seq > 0 Fixes: ab174ad8ef76 ("mptcp: move ooo skbs into msk out of order queue") Reported-by: Hulk Robot Signed-off-by: Ye Bin Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit 3ce406bda027dacffcb3f9cfc6455c6d8314751e Merge: 5114b33105198 40acc05271abc Author: David S. Miller Date: Thu Sep 17 16:35:47 2020 -0700 Merge branch 'net-marvell-prestera-Add-Switchdev-driver-for-Prestera-family-ASIC-device-98DX3255-AC3x' Vadym Kochan says: ==================== net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX3255 (AC3x) Marvell Prestera 98DX3255 integrates up to 24 ports of 1GbE with 8 ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely wireless SMB deployment. Prestera Switchdev is a firmware based driver that operates via PCI bus. The current implementation supports only boards designed for the Marvell Switchdev solution and requires special firmware. This driver implementation includes only L1, basic L2 support, and RX/TX. The core Prestera switching logic is implemented in prestera_main.c, there is an intermediate hw layer between core logic and firmware. It is implemented in prestera_hw.c, the purpose of it is to encapsulate hw related logic, in future there is a plan to support more devices with different HW related configurations. The following Switchdev features are supported: - VLAN-aware bridge offloading - VLAN-unaware bridge offloading - FDB offloading (learning, ageing) - Switchport configuration The original firmware image is uploaded to the linux-firmware repository. PATCH v9: 1) Replace read_poll_timeout_atomic() by original 'do {} while()' loop because it works much better than read_poll_timeout_atomic() considering the TX rate. Also it fixes warning reported on v8. 2) Use ENOENT instead of EEXIST when item is not found in few places - prestera_hw.c and prestera_rxtx.c Patches updated: [1] net: marvell: prestera: Add driver for Prestera family ASIC devices PATCH v8: 1) Put license in one line. 2) Sort includes. 3) Add missing comma for last enum member 4) Return original error code from last called func in places where instead other error code was used. 5) Add comma for last member in initialized struct in prestera_hw.c 6) Do not initialize 'int err = 0' where it is not needed. 7) Simplify device-tree "marvell,prestera" node parsing by removing not needed checking on 'np == NULL'. 8) Use u32p_replace_bits() instead of open-coded ((word & ~mask) | val) 9) Use dev_warn_ratelimited() instead of pr_warn_ratelimited to indicate the device instance in prestera_rxtx.c 10) Simplify circular buffer list creation in prestera_sdma_{rx,tx}_init() by using do { } while (prev != tail) construction. 11) Use MSEC_PER_SEC instead of hard-coded 1000. 12) Use traditional error handling pattern: err = F(); if (err) return err; 13) Use ether_addr_copy() instead of memcpy() for mac FDB copying in prestera_hw.c 14) Drop swdev->ageing_time member which is not used. 15) Fix ageing macro to be in ms instead of seconds. Patches updated: [1] net: marvell: prestera: Add driver for Prestera family ASIC devices [2] net: marvell: prestera: Add PCI interface support [3] net: marvell: prestera: Add basic devlink support [4] net: marvell: prestera: Add ethtool interface support [5] net: marvell: prestera: Add Switchdev driver implementation PATCH v7: 1) Use ether_addr_copy() in prestera_main.c:prestera_port_set_mac_address() instead of memcpy(). 2) Removed not needed device's DMA address range check on dma_pool_alloc() in prestera_rxtx.c:prestera_sdma_buf_init(), this should be handled by dma_xxx() API considerig device's DMA mask. 3) Removed not needed device's DMA address range check on dma_map_single() in prestera_rxtx.c:prestera_sdma_rx_skb_alloc(), this should be handled by dma_xxx() API considerig device's DMA mask. 4) Add comment about port mac address limitation in the code where it is used and checked - prestera_main.c: - prestera_is_valid_mac_addr() - prestera_port_create() 5) Add missing destroy_workqueue(swdev_wq) in prestera_switchdev.c:prestera_switchdev_init() on error path handling. Patches updated: [1] net: marvell: prestera: Add driver for Prestera family ASIC devices [5] net: marvell: prestera: Add Switchdev driver implementation PATCH v6: 1) Use rwlock to protect port list on create/delete stages. The list is mostly readable by fw event handler or packets receiver, but updated only on create/delete port which are performed on switch init/fini stages. 2) Remove not needed variable initialization in prestera_dsa.c:prestera_dsa_parse() 3) Get rid of bounce buffer used by tx handler in prestera_rxtx.c, the bounce buffer should be handled by dma_xxx API via swiotlb. 4) Fix PRESTERA_SDMA_RX_DESC_PKT_LEN macro by using correct GENMASK(13, 0) in prestera_rxtx.c Patches updated: [1] net: marvell: prestera: Add driver for Prestera family ASIC devices PATCH v5: 0) add Co-developed tags for people who was involved in development. 1) Make SPDX license as separate comment 2) Change 'u8 *' -> 'void *', It allows to avoid not-needed u8* casting. 3) Remove "," in terminated enum's. 4) Use GENMASK(end, start) where it is applicable in. 5) Remove not-needed 'u8 *' casting. 6) Apply common error-check pattern 7) Use ether_addr_copy instead of memcpy 8) Use define for maximum MAC address range (255) 9) Simplify prestera_port_state_set() in prestera_main.c by using separate if-blocks for state setting: if (is_up) { ... } else { ... } which makes logic more understandable. 10) Simplify sdma tx wait logic when checking/updating tx_ring->burst. 11) Remove not-needed packed & aligned attributes 12) Use USEC_PER_MSEC as multiplier when converting ms -> usec on calling readl_poll_timeout. 13) Simplified some error path handling by simple return error code in. 14) Remove not-needed err assignment in. 15) Use dev_err() in prestera_devlink_register(...). Patches updated: [1] net: marvell: prestera: Add driver for Prestera family ASIC devices [2] net: marvell: prestera: Add PCI interface support [3] net: marvell: prestera: Add basic devlink support [4] net: marvell: prestera: Add ethtool interface support [5] net: marvell: prestera: Add Switchdev driver implementation PATCH v4: 1) Use prestera_ prefix in netdev_ops variable. 2) Kconfig: use 'default PRESTERA' build type for CONFIG_PRESTERA_PCI to be synced by default with prestera core module. 3) Use memcpy_xxio helpers in prestera_pci.c for IO buffer copying. 4) Generate fw image path via snprintf() instead of macroses. 5) Use pcim_ helpers in prestera_pci.c which simplified the probe/remove logic. 6) Removed not needed initializations of variables which are used in readl_poll_xxx() helpers. 7) Fixed few grammar mistakes in patch[2] description. 8) Export only prestera_ethtool_ops struct instead of each ethtool handler. 9) Add check for prestera_dev_check() in switchdev event handling to make sure there is no wrong topology. Patches updated: [1] net: marvell: prestera: Add driver for Prestera family ASIC devices [2] net: marvell: prestera: Add PCI interface support [4] net: marvell: prestera: Add ethtool interface support [5] net: marvell: prestera: Add Switchdev driver implementation PATCH v3: 1) Simplify __be32 type casting in prestera_dsa.c 2) Added per-patch changelog under "---" line. PATCH v2: 1) Use devlink_port_type_clear() 2) Add _MS prefix to timeout defines. 3) Remove not-needed packed attribute from the firmware ipc structs, also the firmware image needs to be uploaded too (will do it soon). 4) Introduce prestera_hw_switch_fini(), to be mirrored with init and do simple validation if the event handlers are unregistered. 5) Use kfree_rcu() for event handler unregistering. 6) Get rid of rcu-list usage when dealing with ports, not needed for now. 7) Little spelling corrections in the error/info messages. 8) Make pci probe & remove logic mirrored. 9) Get rid of ETH_FCS_LEN in headroom setting, not needed. PATCH: 1) Fixed W=1 warnings 2) Renamed PCI driver name to be more generic "Prestera DX" because there will be more devices supported. 3) Changed firmware image dir path: marvell/ -> mrvl/prestera/ to be aligned with location in linux-firmware.git (if such will be accepted). RFC v3: 1) Fix prestera prefix in prestera_rxtx.c 2) Protect concurrent access from multiple ports on multiple CPU system on tx path by spinlock in prestera_rxtx.c 3) Try to get base mac address from device-tree, otherwise use a random generated one. 4) Move ethtool interface support into separate prestera_ethtool.c file. 5) Add basic devlink support and get rid of physical port naming ops. 6) Add STP support in Switchdev driver. 7) Removed MODULE_AUTHOR 8) Renamed prestera.c -> prestera_main.c, and kernel module to prestera.ko RFC v2: 1) Use "pestera_" prefix in struct's and functions instead of mvsw_pr_ 2) Original series split into additional patches for Switchdev ethtool support. 3) Use major and minor firmware version numbers in the firmware image filename. 4) Removed not needed prints. 5) Use iopoll API for waiting on register's value in prestera_pci.c 6) Use standart approach for describing PCI ID matching section instead of using custom wrappers in prestera_pci.c 7) Add RX/TX support in prestera_rxtx.c. 8) Rewritten prestera_switchdev.c with following changes: - handle netdev events from prestera.c - use struct prestera_bridge for bridge objects, and get rid of struct prestera_bridge_device which may confuse. - use refcount_t 9) Get rid of macro usage for sending fw requests in prestera_hw.c 10) Add base_mac setting as module parameter. base_mac is required for generation default port's mac. ==================== Signed-off-by: David S. Miller commit 40acc05271abc2852c32622edbebd75698736b9b Author: Vadym Kochan Date: Wed Sep 16 19:31:02 2020 +0300 dt-bindings: marvell,prestera: Add description for device-tree bindings Add brief description how to configure base mac address binding in device-tree. Describe requirement for the PCI port which is connected to the ASIC, to allow access to the firmware related registers. Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit e1189d9a5fbec8153dbe03f3589bc2baa96694e2 Author: Vadym Kochan Date: Wed Sep 16 19:31:01 2020 +0300 net: marvell: prestera: Add Switchdev driver implementation The following features are supported: - VLAN-aware bridge offloading - VLAN-unaware bridge offloading - FDB offloading (learning, ageing) - Switchport configuration Currently there are some limitations like: - Only 1 VLAN-aware bridge instance supported - FDB ageing timeout parameter is set globally per device Co-developed-by: Serhiy Boiko Signed-off-by: Serhiy Boiko Co-developed-by: Serhiy Pshyk Signed-off-by: Serhiy Pshyk Co-developed-by: Taras Chornyi Signed-off-by: Taras Chornyi Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit a97d3c69399d35c792b65b49f812f99fd5731dba Author: Vadym Kochan Date: Wed Sep 16 19:31:00 2020 +0300 net: marvell: prestera: Add ethtool interface support The ethtool API provides support for the configuration of the following features: speed and duplex, auto-negotiation, MDI-x, forward error correction, port media type. The API also provides information about the port status, hardware and software statistic. The following limitation exists: - port media type should be configured before speed setting - ethtool -m option is not supported - ethtool -p option is not supported - ethtool -r option is supported for RJ45 port only - the following combination of parameters is not supported: ethtool -s sw1pX port XX autoneg on - forward error correction feature is supported only on SFP ports, 10G speed - auto-negotiation and MDI-x features are not supported on Copper-to-Fiber SFP module Co-developed-by: Andrii Savka Signed-off-by: Andrii Savka Co-developed-by: Serhiy Boiko Signed-off-by: Serhiy Boiko Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit 34dd1710f5a3c9a7dc78e1ff6de69a19d407db25 Author: Vadym Kochan Date: Wed Sep 16 19:30:59 2020 +0300 net: marvell: prestera: Add basic devlink support Add very basic support for devlink interface: - driver name - fw version - devlink ports Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit 4c2703dfd7fabb0824b3bc345f9fa47e33248c14 Author: Vadym Kochan Date: Wed Sep 16 19:30:58 2020 +0300 net: marvell: prestera: Add PCI interface support Add PCI interface driver for Prestera Switch ASICs family devices, which provides: - Firmware loading mechanism - Requests & events handling to/from the firmware - Access to the firmware on the bus level The firmware has to be loaded each time the device is reset. The driver is loading it from: /lib/firmware/mrvl/prestera/mvsw_prestera_fw-v{MAJOR}.{MINOR}.img The full firmware image version is located within the internal header and consists of 3 numbers - MAJOR.MINOR.PATCH. Additionally, driver has hard-coded minimum supported firmware version which it can work with: MAJOR - reflects the support on ABI level between driver and loaded firmware, this number should be the same for driver and loaded firmware. MINOR - this is the minimum supported version between driver and the firmware. PATCH - indicates only fixes, firmware ABI is not changed. Firmware image file name contains only MAJOR and MINOR numbers to make driver be compatible with any PATCH version. Co-developed-by: Oleksandr Mazur Signed-off-by: Oleksandr Mazur Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit 501ef3066c89d7f9045315e1be58749cf9e6814d Author: Vadym Kochan Date: Wed Sep 16 19:30:57 2020 +0300 net: marvell: prestera: Add driver for Prestera family ASIC devices Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8 ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely wireless SMB deployment. The current implementation supports only boards designed for the Marvell Switchdev solution and requires special firmware. The core Prestera switching logic is implemented in prestera_main.c, there is an intermediate hw layer between core logic and firmware. It is implemented in prestera_hw.c, the purpose of it is to encapsulate hw related logic, in future there is a plan to support more devices with different HW related configurations. This patch contains only basic switch initialization and RX/TX support over SDMA mechanism. Currently supported devices have DMA access range <= 32bit and require ZONE_DMA to be enabled, for such cases SDMA driver checks if the skb allocated in proper range supported by the Prestera device. Also meanwhile there is no TX interrupt support in current firmware version so recycling work is scheduled on each xmit. Port's mac address is generated from the switch base mac which may be provided via device-tree (static one or as nvme cell), or randomly generated. This is required by the firmware. Co-developed-by: Andrii Savka Signed-off-by: Andrii Savka Co-developed-by: Oleksandr Mazur Signed-off-by: Oleksandr Mazur Co-developed-by: Serhiy Boiko Signed-off-by: Serhiy Boiko Co-developed-by: Serhiy Pshyk Signed-off-by: Serhiy Pshyk Co-developed-by: Taras Chornyi Signed-off-by: Taras Chornyi Co-developed-by: Volodymyr Mytnyk Signed-off-by: Volodymyr Mytnyk Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit c8bd596f9388bceda6cf008d554cbb1a4f2244e7 Author: Michael Ellerman Date: Thu Sep 17 14:15:19 2020 +1000 selftests/harness: Flush stdout before forking The test harness forks() a child to run each test. Both the parent and the child print to stdout using libc functions. That can lead to duplicated (or more) output if the libc buffers are not flushed before forking. It's generally not seen when running programs directly, because stdout will usually be line buffered when it's pointing to a terminal. This was noticed when running the seccomp_bpf test, eg: $ ./seccomp_bpf | tee test.log $ grep -c "TAP version 13" test.log 2 But we only expect the TAP header to appear once. It can be exacerbated using stdbuf to increase the buffer size: $ stdbuf -o 1MB ./seccomp_bpf > test.log $ grep -c "TAP version 13" test.log 13 The fix is simple, we just flush stdout & stderr before fork. Usually stderr is unbuffered, but that can be changed, so flush it as well just to be safe. Signed-off-by: Michael Ellerman Tested-by: Max Filippov Acked-by: Shuah Khan Acked-by: Kees Cook Signed-off-by: Shuah Khan commit 5114b331051981ecbdf144b5ad33387ae8d0f0d5 Author: YueHaibing Date: Wed Sep 16 22:17:28 2020 +0800 genetlink: Remove unused function genl_err_attr() It is never used, so can remove it. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 2b7ea122a0c437442bf54a5f1c60155757df270c Author: YueHaibing Date: Wed Sep 16 22:16:29 2020 +0800 net/sched: Remove unused function qdisc_queue_drop_head() It is not used since commit a09ceb0e0814 ("sched: remove qdisc->drop") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 8b974778f998ab1be23eca7436fc13d2d8c6bd59 Author: Matthieu Baerts Date: Wed Sep 16 15:13:51 2020 +0200 selftests: mptcp: interpret \n as a new line In case of errors, this message was printed: (...) # read: Resource temporarily unavailable # client exit code 0, server 3 # \nnetns ns1-0-BJlt5D socket stat for 10003: (...) Obviously, the idea was to add a new line before the socket stat and not print "\nnetns". Fixes: b08fbf241064 ("selftests: add test-cases for MPTCP MP_JOIN") Fixes: 048d19d444be ("mptcp: add basic kselftest for mptcp") Signed-off-by: Matthieu Baerts Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit b79a80bd6dd85e284b160734c86a1caaa9c54f6f Author: Xie He Date: Wed Sep 16 05:23:08 2020 -0700 net/packet: Fix a comment about mac_header 1. Change all "dev->hard_header" to "dev->header_ops" 2. On receiving incoming frames when header_ops == NULL: The comment only says what is wrong, but doesn't say what is right. This patch changes the comment to make it clear what is right. 3. On transmitting and receiving outgoing frames when header_ops == NULL: The comment explains that the LL header will be later added by the driver. However, I think it's better to simply say that the LL header is invisible to us. This phrasing is better from a software engineering perspective, because this makes it clear that what happens in the driver should be hidden from us and we should not care about what happens internally in the driver. 4. On resuming the LL header (for RAW frames) when header_ops == NULL: The comment says we are "unlikely" to restore the LL header. However, we should say that we are "unable" to restore it. It's not possible (rather than not likely) to restore it, because: 1) There is no way for us to restore because the LL header internally processed by the driver should be invisible to us. 2) In function packet_rcv and tpacket_rcv, the code only tries to restore the LL header when header_ops != NULL. Cc: Willem de Bruijn Signed-off-by: Xie He Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 31660a97665272ce2b5f4ddf5b3268bcba01e433 Merge: b948577b984a0 619ae331d1fd4 Author: David S. Miller Date: Thu Sep 17 16:14:28 2020 -0700 Merge branch 'net-hns3-updates-for-next' Huazhong Tan says: ==================== net: hns3: updates for -next There are some optimizations related to IO path. Change since V1: - fixes a unsuitable handling in hns3_lb_clear_tx_ring() of #6 which pointed out by Saeed Mahameed. previous version: V1: https://patchwork.ozlabs.org/project/netdev/cover/1600085217-26245-1-git-send-email-tanhuazhong@huawei.com/ ==================== Signed-off-by: David S. Miller commit 619ae331d1fd4cc0098800a56d55d163bd06d821 Author: Yunsheng Lin Date: Wed Sep 16 17:33:50 2020 +0800 net: hns3: use napi_consume_skb() when cleaning tx desc Use napi_consume_skb() to batch consuming skb when cleaning tx desc in NAPI polling. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 48ee56fd0b3785481a521fb7daaf1465219fc3af Author: Yunsheng Lin Date: Wed Sep 16 17:33:49 2020 +0800 net: hns3: use writel() to optimize the barrier operation writel() can be used to order I/O vs memory by default when writing portable drivers. Use writel() to replace wmb() + writel_relaxed(), and writel() is dma_wmb() + writel_relaxed() for ARM64, so there is an optimization here because dma_wmb() is a lighter barrier than wmb(). Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 8c30e19460e1bb935c788a077cc063fb15f1ef04 Author: Yunsheng Lin Date: Wed Sep 16 17:33:48 2020 +0800 net: hns3: optimize the rx clean process Currently HNS3_RING_RX_RING_FBDNUM_REG register is read to determine how many rx desc can be cleaned. To avoid the register read operation in the critical data path, use the valid bit in the rx desc to determine if a specific rx desc can be cleaned. The hns3 driver clear valid bit in the rx desc before notifying the rx desc to the hw, and hw will only set the valid bit of the rx desc after corresponding buffer is filled with packet data and other field in the rx desc is set accordingly. Add hns3_rx_ring_move_fw() function to clear the valid bit in the rx desc before moving rx ring's next_to_clean forward to avoid double cleaning a rx desc, also add a dma_rmb() barrier in hns3_handle_rx_bd() to make sure valid bit is set before reading other field in the rx desc. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 20d06ca2679cb1810135c70be340e5477c83a808 Author: Yunsheng Lin Date: Wed Sep 16 17:33:47 2020 +0800 net: hns3: optimize the tx clean process Currently HNS3_RING_TX_RING_HEAD_REG register is read to determine how many tx desc can be cleaned. To avoid the register read operation in the critical data path, use the valid bit in the tx desc to determine if a specific tx desc can be cleaned. The hns3 driver sets valid bit in the tx desc before ringing a doorbell to the hw, and hw will only clear the valid bit of the tx desc after corresponding packet is sent out to the wire. And because next_to_use for tx ring is a changing variable when the driver is filling the tx desc, so reuse the pull_len for rx ring to record the tx desc that has notified to the hw, so that hns3_nic_reclaim_desc() can decide how many tx desc's valid bit need checking when reclaiming tx desc. And io_err_cnt stat is also removed for it is not used anymore. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit f6061a056c8b5cc76f23e61859519ea555b9e6fc Author: Yunsheng Lin Date: Wed Sep 16 17:33:46 2020 +0800 net: hns3: batch tx doorbell operation Use netdev_xmit_more() to defer the tx doorbell operation when the skb is passed to the driver continuously. By doing this we can improve the overall xmit performance by avoid some doorbell operations. Also, the tx_err_cnt stat is not used, so rename it to tx_more stat. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit aeda9bf87a4573906d6dff5fcf7a3df0f41529da Author: Yunsheng Lin Date: Wed Sep 16 17:33:45 2020 +0800 net: hns3: batch the page reference count updates Batch the page reference count updates instead of doing them one at a time. By doing this we can improve the overall receive performance by avoid some atomic increment operations when the rx page is reused. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 61278d14bb483308c6065ff3da0f71383ea97403 Author: Likun Gao Date: Thu Jan 16 10:45:38 2020 +0800 drm/amdgpu: add device ID for sienna_cichlid (v2) Add device ID for sienna_cichlid. v2: squash in additional device ids. Reviewed-by: Hawking Zhang Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d9ed8cb5aa1cafa4001b0a081ababcb605e7e9f6 Author: Alex Deucher Date: Fri May 1 16:46:11 2020 -0400 drm/amdgpu: use the AV1 defines for VCN 3.0 Switch from magic numbers to defines for AV1 clockgating. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2f7c3686a6b26d86017180fab07751645b885f30 Author: Alex Deucher Date: Fri May 1 16:45:09 2020 -0400 drm/amdgpu: add VCN 3.0 AV1 registers This adds the AV1 registers. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7663edc13ed0a5390944e49038815ee0a8e7ae05 Author: Alex Deucher Date: Fri May 1 16:42:56 2020 -0400 drm/amdgpu: add the GC 10.3 VRS registers Add the VRS registers. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8906e5bcf951d9a624cb35b3ecd291330413a5d5 Author: Ye Bin Date: Wed Sep 16 09:08:58 2020 +0800 drm/amd/display: Remove set but used 'temp' Addresses the following gcc warning with "make W=1": In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../dmub_srv.h:67:0, from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn21.c:26: drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../inc/dmub_cmd.h: In function ‘dmub_rb_flush_pending’: drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../inc/dmub_cmd.h:795:12: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable] uint64_t temp; ^ In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../dmub_srv.h:67:0, from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn30.c:26: drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../inc/dmub_cmd.h: In function ‘dmub_rb_flush_pending’: drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../inc/dmub_cmd.h:795:12: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable] uint64_t temp; Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Alex Deucher commit 4192f7b5768912ceda82be2f83c87ea7181f9980 Author: Alex Deucher Date: Wed Sep 16 10:28:55 2020 -0400 drm/amdgpu: unmap register bar on device init failure We never unmapped the regiser BAR on failure. Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit b6c91dadaffee8bf253b0b5ac26a2638c388c6c6 Author: Tom St Denis Date: Wed Sep 16 12:17:04 2020 -0400 drm/amd/amdgpu: add mmUVD_FW_STATUS register to uvd700 This register was requested for umr debugging support. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d5c0af5732798e09857a5a8f1a57cfc69c85a4f3 Author: Bhawanpreet Lakha Date: Wed Sep 16 12:44:46 2020 -0400 drm/amd/display: Add missing "Copy GSL groups when committing a new context" [Why] "Copy GSL groups when committing a new context" patch was accidentally removed during a refactor Patch: 21ffcc94d5b ("drm/amd/display: Copy GSL groups when committing a new context") [How] Re add it Fixes: b6e881c9474 ("drm/amd/display: update navi to use new surface programming behaviour") Signed-off-by: Bhawanpreet Lakha Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 143678d12b6d5eb883366b335b22236e6a8e34de Author: Bhawanpreet Lakha Date: Tue Sep 15 17:26:29 2020 -0400 drm/amd/display: Don't log hdcp module warnings in dmesg [Why] DTM topology updates happens by default now. This results in DTM warnings when hdcp is not even being enabled. This spams the dmesg and doesn't effect normal display functionality so it is better to log it using DRM_DEBUG_KMS() [How] Change the DRM_WARN() to DRM_DEBUG_KMS() Signed-off-by: Bhawanpreet Lakha Acked-by: Alex Deucher Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c8e74b17c156db32190cc782ff1a471715155e9e Author: Philip Yang Date: Tue Sep 15 17:07:35 2020 -0400 drm/amdgpu: prevent double kfree ttm->sg Set ttm->sg to NULL after kfree, to avoid memory corruption backtrace: [ 420.932812] kernel BUG at /build/linux-do9eLF/linux-4.15.0/mm/slub.c:295! [ 420.934182] invalid opcode: 0000 [#1] SMP NOPTI [ 420.935445] Modules linked in: xt_conntrack ipt_MASQUERADE [ 420.951332] Hardware name: Dell Inc. PowerEdge R7525/0PYVT1, BIOS 1.5.4 07/09/2020 [ 420.952887] RIP: 0010:__slab_free+0x180/0x2d0 [ 420.954419] RSP: 0018:ffffbe426291fa60 EFLAGS: 00010246 [ 420.955963] RAX: ffff9e29263e9c30 RBX: ffff9e29263e9c30 RCX: 000000018100004b [ 420.957512] RDX: ffff9e29263e9c30 RSI: fffff3d33e98fa40 RDI: ffff9e297e407a80 [ 420.959055] RBP: ffffbe426291fb00 R08: 0000000000000001 R09: ffffffffc0d39ade [ 420.960587] R10: ffffbe426291fb20 R11: ffff9e49ffdd4000 R12: ffff9e297e407a80 [ 420.962105] R13: fffff3d33e98fa40 R14: ffff9e29263e9c30 R15: ffff9e2954464fd8 [ 420.963611] FS: 00007fa2ea097780(0000) GS:ffff9e297e840000(0000) knlGS:0000000000000000 [ 420.965144] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 420.966663] CR2: 00007f16bfffefb8 CR3: 0000001ff0c62000 CR4: 0000000000340ee0 [ 420.968193] Call Trace: [ 420.969703] ? __page_cache_release+0x3c/0x220 [ 420.971294] ? amdgpu_ttm_tt_unpopulate+0x5e/0x80 [amdgpu] [ 420.972789] kfree+0x168/0x180 [ 420.974353] ? amdgpu_ttm_tt_set_user_pages+0x64/0xc0 [amdgpu] [ 420.975850] ? kfree+0x168/0x180 [ 420.977403] amdgpu_ttm_tt_unpopulate+0x5e/0x80 [amdgpu] [ 420.978888] ttm_tt_unpopulate.part.10+0x53/0x60 [amdttm] [ 420.980357] ttm_tt_destroy.part.11+0x4f/0x60 [amdttm] [ 420.981814] ttm_tt_destroy+0x13/0x20 [amdttm] [ 420.983273] ttm_bo_cleanup_memtype_use+0x36/0x80 [amdttm] [ 420.984725] ttm_bo_release+0x1c9/0x360 [amdttm] [ 420.986167] amdttm_bo_put+0x24/0x30 [amdttm] [ 420.987663] amdgpu_bo_unref+0x1e/0x30 [amdgpu] [ 420.989165] amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x9ca/0xb10 [amdgpu] [ 420.990666] kfd_ioctl_alloc_memory_of_gpu+0xef/0x2c0 [amdgpu] Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5aea5327ea2ddf544cbeff096f45fc2319b0714e Author: Luben Tuikov Date: Wed Sep 16 13:03:50 2020 -0400 drm/amdgpu: No sysfs, not an error condition Not being able to create amdgpu sysfs attributes is not a fatal error warranting not to continue to try to bring up the display. Thus, if we get an error trying to create amdgpu sysfs attrs, report it and continue on to try to bring up a display. Signed-off-by: Luben Tuikov Acked-by: Slava Abramov Signed-off-by: Alex Deucher commit 24b763d0fb05e8c3b565a3813baafc53b973dba7 Author: Jiansong Chen Date: Wed Sep 16 19:17:20 2020 +0800 drm/amdgpu: declare ta firmware for navy_flounder The firmware provided via MODULE_FIRMWARE appears in the module information. External tools(eg. dracut) may use the list of fw files to include them as appropriate in an initramfs, thus missing declaration will lead to request firmware failure in boot time. Signed-off-by: Jiansong Chen Reviewed-by: Tianci Yin Signed-off-by: Alex Deucher commit 0eaa80124271966c595322ec0ac4b9c54f6aa7ee Author: Shirish S Date: Mon Sep 14 10:11:23 2020 +0530 amdgpu/gmc_v9: Warn if SDPIF_MMIO_CNTRL_0 is not set With IOMMU enabled, if SDPIF_MMIO_CNTRL_0 is not set appropriately the system hangs without any trace during S3. To ease debug and to ensure that the failure, if any, was caused by a race conditions that disabled write access to SDPIF_MMIO_CNTRL_0 register, warn the user about it. Signed-off-by: Shirish S Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 92e005936e8a34b16d6e40be114ad263cded49bc Author: Evan Quan Date: Fri Sep 4 16:08:15 2020 +0800 drm/amd/pm: correct Renoir UMD Stable Pstate settings Update the UMD stable Pstate settings with correct clocks. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit abf6b7c78ed4ffd40b7240f8b0fd403da30a3284 Author: Evan Quan Date: Fri Sep 4 15:49:08 2020 +0800 drm/amd/pm: lower Raven UMD Stable Pstate VCN values SMU FCLK,SOCCLK have dependency on VCN CLKs. Lower VCN values so that FCLK, SOCCLK reflect values set by UMD Stable Pstate. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 1653a179c822278cf4a7cb97d4d6d3534ce82dbe Author: Evan Quan Date: Fri Sep 4 15:05:55 2020 +0800 drm/amd/pm: move NAVI1X power mode switching workaround to post_init Since that should be the correct place to put ASIC specific workarounds. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 236b156f738886d12336215434c605cbc4da7b89 Author: Evan Quan Date: Fri Sep 4 14:55:43 2020 +0800 drm/amd/pm: apply no power source workaround if dc reported by gpio If dc reported by gpio is supported, the power source switching will be performed by pmfw automatically. Thus the power source setting workaround for Navi1x will be not needed. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 71f9404f19af1da2a4cc583e2d6db448f25a5e1a Author: Evan Quan Date: Fri Sep 4 14:41:07 2020 +0800 drm/amd/pm: process pending AC/DC switch interrupt Process any pending interrupt that occured before driver register for interrupt from GPIO/SMU. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 911779e3fc282cbdcae96c70131e3fe89cd5c1bc Author: Evan Quan Date: Thu Sep 3 15:42:59 2020 +0800 drm/amd/pm: add Raven2 watermark WmType setting Which tells it's a normal pstate change or memory retraining. Signed-off-by: Evan Quan Tested-by: Changfeng Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ce2c00061b2810ff0523e34ab392893556e17bbf Author: Evan Quan Date: Thu Sep 3 15:13:09 2020 +0800 drm/amd/pm: add Renoir watermark WmType setting Which tells it's a normal pstate change or memory retraining. Signed-off-by: Evan Quan Tested-by: Changfeng Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 7b9c7e30ab50c1b2f6814509b14fb0d04a697529 Author: Evan Quan Date: Thu Sep 3 15:02:37 2020 +0800 drm/amd/pm: drop unnecessary wrappers around watermark setting The convertion to "struct dm_pp_clock_range_for_mcif_wm_set_soc15" is totally unnecessary and can be dropped. Signed-off-by: Evan Quan Tested-by: Changfeng Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 12684c665f7ab0adbc2d1734aa141f31de0452b6 Author: Evan Quan Date: Thu Sep 3 14:41:47 2020 +0800 drm/amd/pm: drop dead code Raven never goes to swsmu path. So "adev->smu.ppt_funcs" will be always false. Signed-off-by: Evan Quan Tested-by: Changfeng Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 6c20f1573c28f96191485853dc97d01ff9f6a878 Author: Evan Quan Date: Mon Aug 24 15:25:28 2020 +0800 drm/amd/pm: minor cleanups Drop unneeded "ret". Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 38d11e024963c41c373d0207286b36dc218d0c50 Author: Evan Quan Date: Mon Aug 24 15:21:30 2020 +0800 drm/amd/pm: drop unnecessary table existence and dpm enablement check Either this was already performed in parent API. Or the table is confirmed to exist. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 7ee98e1b3415963b7fc211743bee35554e2ec42b Author: Evan Quan Date: Mon Aug 24 15:18:00 2020 +0800 drm/amd/pm: drop unnecessary smu_baco->mutex lock protections(V2) As these operations are performed in hardware setup and there is actually no race conditions during this period considering: 1. the hardware setup is serial and cannot be in parallel 2. all other operations can be performed only after hardware setup complete. V2: rich the commit log description Signed-off-by: Evan Quan Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit b66effb18a55eaf81fcb9147b7454151b0655f23 Author: Evan Quan Date: Mon Aug 24 15:11:47 2020 +0800 drm/amd/pm: drop unnecessary feature->mutex lock protections(V2) As these operations are performed in hardware setup and there is actually no race conditions during this period considering: 1. the hardware setup is serial and cannot be in parallel 2. all other operations can be performed only after hardware setup complete. V2: rich the commit log description Signed-off-by: Evan Quan Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 12f04120d393102b56bbbfdcfec47aa839dfc69f Author: Evan Quan Date: Wed Aug 26 18:37:00 2020 +0800 drm/amd/pm: make namings and comments more readable And to fit more accurately what the cod does. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit eb5f69e7660f2b2ff23a362f1b33a74e078e1508 Author: Evan Quan Date: Wed Aug 26 18:27:09 2020 +0800 drm/amd/pm: correct the requirement for umc cdr workaround The workaround can be applied only with UCLK DPM enabled. And expand the workaround to more Navi10 SKUs and also Navi14. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit bb7257b5a8b0182019df3b9819417301978d7538 Author: Evan Quan Date: Wed Aug 26 18:19:28 2020 +0800 drm/amd/pm: apply the CDR workarounds only with some specific UMC firmwares(V2) And different workaround will be applied based on hybrid cdr bit. V2: add pmfw version guard to make sure the new workaround applied only with pmfw >= 42.53.0 Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 665945eb49d559588633ca8653d4e9e437161df8 Author: Evan Quan Date: Wed Aug 26 17:58:29 2020 +0800 drm/amd/pm: implement a new umc cdr workaround By uploading dummy pstate tables. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2379be2faf09b3e270796bb6a43941634d39c626 Author: Evan Quan Date: Wed Aug 26 16:10:29 2020 +0800 drm/amd/pm: allocate a new buffer for pstate dummy reading This dummy reading buffer will be used for the new Navi1x UMC CDR workaround. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3646c00e74b26b90043353b8cc7475670a625fae Author: Evan Quan Date: Wed Aug 26 16:50:30 2020 +0800 drm/amd/pm: revise the umc hybrid cdr workaround Drop the unused message(SMU_MSG_DAL_DISABLE_DUMMY_PSTATE_CHANGE). And do not apply this workaround when the max uclk frequency is greater than 750Mhz. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 82cac71c1b646e581bd4f5c054982fcaf5b9f70f Author: Evan Quan Date: Tue Sep 1 11:33:53 2020 +0800 drm/amd/pm: put Navi1X umc cdr workaround in post_smu_init That's where the uclk dpm get enabled and then the uclk cdr workaround can be applied. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 10144762e2c37093fed8e2fcac7fbe2bcbb87e54 Author: Evan Quan Date: Tue Sep 1 11:02:31 2020 +0800 drm/amd/pm: postpone SOCCLK/UCLK enablement after DAL initialization(V2) This is needed for Navi1X only. And it may help for display missing or hang issue seen on some high resolution monitors. V2: no UCLK DPM enablement for Navi10 A0 secure SKU Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4bdd4d25ed0d31e50e77ca2b37d4b97c0d5a9a2f Author: Evan Quan Date: Tue Sep 1 10:23:34 2020 +0800 drm/amd/pm: wrapper for postponing some setup job after DAL initializatioa(V2) So that ASIC specific actions can be added. V2: better namings Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 32b313ce9db54991a053da66883289e99d6ad820 Author: Gustavo Pimentel Date: Thu Sep 17 23:30:27 2020 +0200 PCI: endpoint: Use "NULL" instead of "0" as a NULL pointer When returning a NULL pointer, use "NULL" instead of "0". Fixes sparse warning given by executing "make C=2 drivers/pci/": CHECK drivers/pci/endpoint/pci-epc-core.c drivers/pci/endpoint/pci-epc-core.c: note: in included file: ./include/linux/pci-ep-cfs.h:22:16: warning: Using plain integer as NULL pointer CHECK drivers/pci/endpoint/pci-epf-core.c drivers/pci/endpoint/pci-epf-core.c: note: in included file: ./include/linux/pci-ep-cfs.h:31:16: warning: Using plain integer as NULL pointer Link: https://lore.kernel.org/r/80895f7465719edb3aa259e907acc4bc3217945c.1600378209.git.gustavo.pimentel@synopsys.com Reported-by: Bjorn Helgaas Signed-off-by: Gustavo Pimentel Signed-off-by: Bjorn Helgaas Cc: Kishon Vijay Abraham I Cc: Joao Pinto commit 10791141a6cfc96eecf578fb1240f191ac112e02 Author: Lukas Wunner Date: Tue Jul 21 13:24:51 2020 +0200 PCI: Simplify pci_dev_reset_slot_function() pci_dev_reset_slot_function() refuses to reset a hotplug slot if it is shared by multiple pci_devs. That's the case if and only if the slot is occupied by a multifunction device. Simplify the function to check the device's multifunction flag instead of iterating over the devices on the bus. (Iterating over the devices requires holding pci_bus_sem, which the function erroneously does not acquire.) Link: https://lore.kernel.org/r/c6aab5af096f7b1b3db57f6335cebba8f0fcca89.1595330431.git.lukas@wunner.de Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Cc: Alex Williamson commit 8a61449941057e9d36fe468c97d3879356fa2881 Author: Lukas Wunner Date: Thu Sep 17 16:13:20 2020 -0500 PCI: pciehp: Reduce noisiness on hot removal When a PCIe card is hot-removed, the Presence Detect State and Data Link Layer Link Active bits often do not clear simultaneously. I've seen delays of up to 244 msec between the two events with Thunderbolt. After pciehp has brought down the slot in response to the first event, the other bit may still be set. It's not discernible whether it's set because a new card is already in the slot or if it will soon clear. So pciehp tries to bring up the slot and in the latter case fails with a bunch of messages, some of them at KERN_ERR severity. If the slot is no longer occupied, the messages are false positives and annoy users. Stuart Hayes reports the following splat on hot removal: KERN_INFO pcieport 0000:3c:06.0: pciehp: Slot(180): Link Up KERN_INFO pcieport 0000:3c:06.0: pciehp: Timeout waiting for Presence Detect KERN_ERR pcieport 0000:3c:06.0: pciehp: link training error: status 0x0001 KERN_ERR pcieport 0000:3c:06.0: pciehp: Failed to check link status Dongdong Liu complains about a similar splat: KERN_INFO pciehp 0000:80:10.0:pcie004: Slot(36): Link Down KERN_INFO iommu: Removing device 0000:87:00.0 from group 12 KERN_INFO pciehp 0000:80:10.0:pcie004: Slot(36): Card present KERN_INFO pcieport 0000:80:10.0: Data Link Layer Link Active not set in 1000 msec KERN_ERR pciehp 0000:80:10.0:pcie004: Failed to check link status Users are particularly irritated to see a bringup attempt even though the slot was explicitly brought down via sysfs. In a perfect world, we could avoid this by setting Link Disable on slot bringdown and re-enabling it upon a Presence Detect State change. In reality however, there are broken hotplug ports which hardwire Presence Detect to zero, see 80696f991424 ("PCI: pciehp: Tolerate Presence Detect hardwired to zero"). Conversely, PCIe r1.0 hotplug ports hardwire Link Active to zero because Link Active Reporting wasn't specified before PCIe r1.1. On unplug, some ports first clear Presence then Link (see Stuart Hayes' splat) whereas others use the inverse order (see Dongdong Liu's splat). To top it off, there are hotplug ports which flap the Presence and Link bits on slot bringup, see 6c35a1ac3da6 ("PCI: pciehp: Tolerate initially unstable link"). pciehp is designed to work with all of these variants. Surplus attempts at slot bringup are a lesser evil than not being able to bring up slots at all. Although we could try to perfect the behavior for specific hotplug controllers, we'd risk breaking others or increasing code complexity. But we can certainly minimize annoyance by emitting only a single message with KERN_INFO severity if bringup is unsuccessful: * Drop the "Timeout waiting for Presence Detect" message in pcie_wait_for_presence(). The sole caller of that function, pciehp_check_link_status(), ignores the timeout and carries on. It emits error messages of its own and I don't think this particular message adds much value. * There's a single error condition in pciehp_check_link_status() which does not emit a message. Adding one allows dropping the "Failed to check link status" message emitted by board_added() if pciehp_check_link_status() returns a non-zero integer. * Tone down all messages in pciehp_check_link_status() to KERN_INFO severity and rephrase them to look as innocuous as possible. To this end, move the message emitted by pcie_wait_for_link_delay() to its callers. As a result, Stuart Hayes' splat becomes: KERN_INFO pcieport 0000:3c:06.0: pciehp: Slot(180): Link Up KERN_INFO pcieport 0000:3c:06.0: pciehp: Slot(180): Cannot train link: status 0x0001 Dongdong Liu's splat becomes: KERN_INFO pciehp 0000:80:10.0:pcie004: Slot(36): Card present KERN_INFO pciehp 0000:80:10.0:pcie004: Slot(36): No link The messages now merely serve as information that presence or link bits were set a little longer than expected. Bringup failures which are not false positives are still reported, albeit no longer at KERN_ERR severity. Link: https://lore.kernel.org/linux-pci/20200310182100.102987-1-stuart.w.hayes@gmail.com/ Link: https://lore.kernel.org/linux-pci/1547649064-19019-1-git-send-email-liudongdong3@huawei.com/ Link: https://lore.kernel.org/r/b45e46fd8a6aa6930aaac9d7718c2e4b787a4e5e.1595935071.git.lukas@wunner.de Reported-by: Stuart Hayes Reported-by: Dongdong Liu Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 85d79c5281a954492aa0532954fd2ecb1a00cc3e Author: Qinglang Miao Date: Wed Sep 16 14:21:28 2020 +0800 PCI: rpadlpar: Use for_each_child_of_node() and for_each_node_by_name() Use for_each_child_of_node() and for_each_node_by_name() macros instead of open coding them. Link: https://lore.kernel.org/r/20200916062128.190819-1-miaoqinglang@huawei.com Signed-off-by: Qinglang Miao Signed-off-by: Bjorn Helgaas commit b30e2238b7ff0c3cbe27f7bf024d73e17842f5fc Author: Wang Hai Date: Mon Sep 14 21:56:54 2020 +0800 ubifs: Fix some kernel-doc warnings in tnc.c Fixes the following W=1 kernel build warning(s): fs/ubifs/tnc.c:3479: warning: Excess function parameter 'inum' description in 'dbg_check_inode_size' fs/ubifs/tnc.c:366: warning: Excess function parameter 'node' description in 'lnc_free' @inum in 'dbg_check_inode_size' should be @inode, fix it. @node in 'lnc_free' is not in use, Remove it. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Richard Weinberger commit f279e5a491fd96c1347c3268dacc771dc796778e Author: Wang Hai Date: Mon Sep 14 21:56:53 2020 +0800 ubifs: Fix some kernel-doc warnings in replay.c Fixes the following W=1 kernel build warning(s): fs/ubifs/replay.c:942: warning: Excess function parameter 'ref_lnum' description in 'validate_ref' fs/ubifs/replay.c:942: warning: Excess function parameter 'ref_offs' description in 'validate_ref' They're not in use. Remove them. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Richard Weinberger commit 7889042b658085248581bfd30e9b1abf415c3c0b Author: Wang Hai Date: Mon Sep 14 21:56:52 2020 +0800 ubifs: Fix some kernel-doc warnings in gc.c Fixes the following W=1 kernel build warning(s): fs/ubifs/gc.c:70: warning: Excess function parameter 'buf' description in 'switch_gc_head' fs/ubifs/gc.c:70: warning: Excess function parameter 'len' description in 'switch_gc_head' fs/ubifs/gc.c:70: warning: Excess function parameter 'lnum' description in 'switch_gc_head' fs/ubifs/gc.c:70: warning: Excess function parameter 'offs' description in 'switch_gc_head' They're not in use. Remove them. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Richard Weinberger commit f39d9f4cb902fb42fce39a090304d428f9ab3c30 Author: Wang Hai Date: Mon Sep 14 21:56:51 2020 +0800 ubifs: Fix 'hash' kernel-doc warning in auth.c Fixes the following W=1 kernel build warning(s): fs/ubifs/auth.c:66: warning: Excess function parameter 'hash' description in 'ubifs_prepare_auth_node' Rename hash to inhash. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Richard Weinberger commit 121b8fcbf98892d5f26d8326a00d09e4cdb76369 Author: Zhihao Cheng Date: Fri Aug 28 11:32:50 2020 +0800 ubifs: setflags: Don't show error message when vfs_ioc_setflags_prepare() fails Following process will trigger ubifs_err: 1. useradd -m freg (Under root) 2. cd /home/freg && mkdir mp (Under freg) 3. mount -t ubifs /dev/ubi0_0 /home/freg/mp (Under root) 4. cd /home/freg && echo 123 > mp/a (Under root) 5. cd mp && chown freg a && chgrp freg a && chmod 777 a (Under root) 6. chattr +i a (Under freg) UBIFS error (ubi0:0 pid 1723): ubifs_ioctl [ubifs]: can't modify inode 65 attributes chattr: Operation not permitted while setting flags on a This is not an UBIFS problem, it was caused by task priviliage checking on file operations. Remove error message printing from kernel just like other filesystems (eg. ext4), since we already have enough information from userspace tools. Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit dd7db149bcd914db8fdeb19cd5597c0740121bc7 Author: Zhihao Cheng Date: Mon Aug 17 22:29:09 2020 +0800 ubifs: ubifs_jnl_change_xattr: Remove assertion 'nlink > 0' for host inode Changing xattr of a temp file will trigger following assertion failed and make ubifs turn into readonly filesystem: ubifs_assert_failed [ubifs]: UBIFS assert failed: host->i_nlink > 0, in fs/ubifs/journal.c:1801 Reproducer: 1. fd = open(__O_TMPFILE) 2. fsetxattr(fd, key, value2, XATTR_CREATE) 3. fsetxattr(fd, key, value2, XATTR_REPLACE) Fix this by removing assertion 'nlink > 0' for host inode. Reported-by: Chengsong Ke Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit d005f8c6588efcfbe88099b6edafc6f58c84a9c1 Author: Zhihao Cheng Date: Mon Jun 1 17:12:31 2020 +0800 ubi: check kthread_should_stop() after the setting of task state A detach hung is possible when a race occurs between the detach process and the ubi background thread. The following sequences outline the race: ubi thread: if (list_empty(&ubi->works)... ubi detach: set_bit(KTHREAD_SHOULD_STOP, &kthread->flags) => by kthread_stop() wake_up_process() => ubi thread is still running, so 0 is returned ubi thread: set_current_state(TASK_INTERRUPTIBLE) schedule() => ubi thread will never be scheduled again ubi detach: wait_for_completion() => hung task! To fix that, we need to check kthread_should_stop() after we set the task state, so the ubi thread will either see the stop bit and exit or the task state is reset to runnable such that it isn't scheduled out indefinitely. Signed-off-by: Zhihao Cheng Cc: Fixes: 801c135ce73d5df1ca ("UBI: Unsorted Block Images") Reported-by: syzbot+853639d0cb16c31c7a14@syzkaller.appspotmail.com Signed-off-by: Richard Weinberger commit 58f6e78a65f1fcbf732f60a7478ccc99873ff3ba Author: Zhihao Cheng Date: Mon Jun 1 17:10:37 2020 +0800 ubifs: dent: Fix some potential memory leaks while iterating entries Fix some potential memory leaks in error handling branches while iterating dent entries. For example, function dbg_check_dir() forgets to free pdent if it exists. Signed-off-by: Zhihao Cheng Cc: Fixes: 1e51764a3c2ac05a2 ("UBIFS: add new flash file system") Signed-off-by: Richard Weinberger commit f2aae745b82c842221f4f233051f9ac641790959 Author: Zhihao Cheng Date: Mon Jun 1 17:10:36 2020 +0800 ubifs: xattr: Fix some potential memory leaks while iterating entries Fix some potential memory leaks in error handling branches while iterating xattr entries. For example, function ubifs_tnc_remove_ino() forgets to free pxent if it exists. Similar problems also exist in ubifs_purge_xattrs(), ubifs_add_orphan() and ubifs_jnl_write_inode(). Signed-off-by: Zhihao Cheng Cc: Fixes: 1e51764a3c2ac05a2 ("UBIFS: add new flash file system") Signed-off-by: Richard Weinberger commit 8fea92536e3efff14fa4cde7ed37c595b40a52b5 Author: Rodrigo Vivi Date: Thu Sep 17 16:43:57 2020 -0400 drm/i915: Update DRIVER_DATE to 20200917 Signed-off-by: Rodrigo Vivi commit dcc81be0fc4e66943041e6e19a5faf8f8704a27e Author: Ian Rogers Date: Thu Sep 17 13:18:07 2020 -0700 perf metricgroup: Fix uncore metric expressions A metric like DRAM_BW_Use has on SkylakeX events uncore_imc/cas_count_read/ and uncore_imc/case_count_write/. These events open 6 events per socket with pmu names of uncore_imc_[0-5]. The current metric setup code in find_evsel_group assumes one ID will map to 1 event to be recorded in metric_events. For events with multiple matches, the first event is recorded in metric_events (avoiding matching >1 event with the same name) and the evlist_used updated so that duplicate events aren't removed when the evlist has unused events removed. Before this change: $ /tmp/perf/perf stat -M DRAM_BW_Use -a -- sleep 1 Performance counter stats for 'system wide': 41.14 MiB uncore_imc/cas_count_read/ 1,002,614,251 ns duration_time 1.002614251 seconds time elapsed After this change: $ /tmp/perf/perf stat -M DRAM_BW_Use -a -- sleep 1 Performance counter stats for 'system wide': 157.47 MiB uncore_imc/cas_count_read/ # 0.00 DRAM_BW_Use 126.97 MiB uncore_imc/cas_count_write/ 1,003,019,728 ns duration_time Erroneous duplication introduced in: commit 2440689d62e9 ("perf metricgroup: Remove duped metric group events"). Fixes: ded80bda8bc9 ("perf expr: Migrate expr ids table to a hashmap"). Reported-by: Jin Yao Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Andrii Nakryiko Cc: Athira Jajeev Cc: Daniel Borkmann Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Yonghong Song Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20200917201807.4090224-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4856e5aa0ef1d4c62f6f30bf273a778735507837 Author: Dave Airlie Date: Thu Sep 17 16:13:03 2020 +1000 drm/ttm: drop evicted from ttm_bo. This was unused. Signed-off-by: Dave Airlie Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200917064132.148521-3-airlied@gmail.com commit e46f468fef953dea30e7a7c69ad7e0370af26855 Author: Dave Airlie Date: Thu Sep 17 16:36:14 2020 +1000 drm/ttm: drop special pipeline accel cleanup function. The two accel cleanup paths were mostly the same once refactored. Just pass a bool to say if the evictions are to be pipelined. Signed-off-by: Dave Airlie Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200917064132.148521-2-airlied@gmail.com commit 92afce9095300cb652ea74a617c6679c4c4d4429 Author: Dave Airlie Date: Thu Sep 17 14:13:06 2020 +1000 drm/ttm: make common function for wait/free node path. The pipeline and accel cleansups has similiar paths here. Signed-off-by: Dave Airlie Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-8-airlied@gmail.com commit 13a8f46d8030e519939bfb674f7aa541109f6ce2 Author: Dave Airlie Date: Thu Sep 17 14:08:29 2020 +1000 drm/ttm: move ghost object creation to a common function Both accel cleanup and pipeline move had the same code, make a single function for it. Signed-off-by: Dave Airlie Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-7-airlied@gmail.com commit 2ee476f77ffe5a7ecbd4e1e20fa0859cb541530d Author: Dave Airlie Date: Thu Sep 17 14:03:46 2020 +1000 drm/ttm: add a simple assign mem to bo wrapper This pattern is called in a few places, just clean it up. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-6-airlied@gmail.com commit cae515f4a5d9e17eb1f0db1eef9028601ab2decf Author: Dave Airlie Date: Thu Sep 17 13:48:59 2020 +1000 drm/ttm/drivers: call the bind function directly. Now the bind functions have all the protection explicitly the drivers can just call them directly, and the api can be unexported Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-5-airlied@gmail.com commit 37bff6542c4e140a11657406c1bab50a40329cc1 Author: Dave Airlie Date: Thu Sep 17 13:24:50 2020 +1000 drm/ttm: move unbind into the tt destroy. This moves unbind into the driver side on destroy paths. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-4-airlied@gmail.com commit 7626168fd132009c79a0457bccc58014abc738f5 Author: Dave Airlie Date: Thu Sep 17 13:20:48 2020 +1000 drm/ttm: flip tt destroy ordering. Call the driver first and have it call the common code cleanup. This is useful later to fix unbind. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-3-airlied@gmail.com commit 0b988ca1c7c4c73983b4ea96ef7c2af2263c87eb Author: Dave Airlie Date: Thu Sep 17 12:54:24 2020 +1000 drm/ttm: protect against reentrant bind in the drivers This moves the generic tracking into the drivers and protects against reentrancy in the drivers. It fixes up radeon and agp to be able to query the bound status as that is required. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-2-airlied@gmail.com commit cf71b174d3464c7dc22f86f25d629a8d9d5c3519 Author: Maciej Fijalkowski Date: Wed Sep 16 23:10:06 2020 +0200 bpf: rename poke descriptor's 'ip' member to 'tailcall_target' Reflect the actual purpose of poke->ip and rename it to poke->tailcall_target so that it will not the be confused with another poke target that will be introduced in next commit. While at it, do the same thing with poke->ip_stable - rename it to poke->tailcall_target_stable. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov commit a748c6975dea325da540610c2ba9b5f332c603e6 Author: Maciej Fijalkowski Date: Wed Sep 16 23:10:05 2020 +0200 bpf: propagate poke descriptors to subprograms Previously, there was no need for poke descriptors being present in subprogram's bpf_prog_aux struct since tailcalls were simply not allowed in them. Each subprog is JITed independently so in order to enable JITing subprograms that use tailcalls, do the following: - in fixup_bpf_calls() store the index of tailcall insn onto the generated poke descriptor, - in case when insn patching occurs, adjust the tailcall insn idx from bpf_patch_insn_data, - then in jit_subprogs() check whether the given poke descriptor belongs to the current subprog by checking if that previously stored absolute index of tail call insn is in the scope of the insns of given subprog, - update the insn->imm with new poke descriptor slot so that while JITing the proper poke descriptor will be grabbed This way each of the main program's poke descriptors are distributed across the subprograms poke descriptor array, so main program's descriptors can be untracked out of the prog array map. Add also subprog's aux struct to the BPF map poke_progs list by calling on it map_poke_track(). In case of any error, call the map_poke_untrack() on subprog's aux structs that have already been registered to prog array map. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov commit 0d4ddce300bd9031a36b55451045d505ebf7cae2 Author: Maciej Fijalkowski Date: Wed Sep 16 23:10:04 2020 +0200 bpf, x64: use %rcx instead of %rax for tail call retpolines Currently, %rax is used to store the jump target when BPF program is emitting the retpoline instructions that are handling the indirect tailcall. There is a plan to use %rax for different purpose, which is storing the tail call counter. In order to preserve this value across the tailcalls, adjust the BPF indirect tailcalls so that the target program will reside in %rcx and teach the retpoline instructions about new location of jump target. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov commit dc6798a5207b9f334c680b37e590b48b7d3099ea Author: Swathi Dhanavanthri Date: Fri Sep 11 15:11:58 2020 -0700 drm/i915/tgl, rkl: Make Wa_1606700617/22010271021 permanent This workaround applies to all TGL and RKL steppings. Signed-off-by: Swathi Dhanavanthri Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200911221158.4700-1-swathi.dhanavanthri@intel.com commit 7d537a8d2e76bc4fc71e34545ceaa463ac2cd928 Author: Adrian Hunter Date: Wed Sep 9 11:49:23 2020 +0300 perf intel-pt: Fix "context_switch event has no tid" error A context_switch event can have no tid because pids can be detached from a task while the task is still running (in do_exit()). Note this won't happen with per-task contexts because then tracing stops at perf_event_exit_task() If a task with no tid gets preempted, or a dying task gets preempted and its parent releases it, when it subsequently gets switched back in, Intel PT will not be able to determine what task is running and prints an error "context_switch event has no tid". However, it is not really an error because the task is in kernel space and the decoder can continue to decode successfully. Fix by changing the error to be only a logged message, and make allowance for tid == -1. Example: Using 5.9-rc4 with Preemptible Kernel (Low-Latency Desktop) e.g. $ uname -r 5.9.0-rc4 $ grep PREEMPT .config # CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT=y CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y CONFIG_PREEMPT_RCU=y CONFIG_PREEMPT_NOTIFIERS=y CONFIG_DRM_I915_PREEMPT_TIMEOUT=640 CONFIG_DEBUG_PREEMPT=y # CONFIG_PREEMPT_TRACER is not set # CONFIG_PREEMPTIRQ_DELAY_TEST is not set Before: $ cat forkit.c #include #include #include int main() { pid_t child; int status = 0; child = fork(); if (child == 0) return 123; wait(&status); return 0; } $ gcc -o forkit forkit.c $ sudo ~/bin/perf record --kcore -a -m,64M -e intel_pt/cyc/k & [1] 11016 $ taskset 2 ./forkit $ sudo pkill perf $ [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 17.262 MB perf.data ] [1]+ Terminated sudo ~/bin/perf record --kcore -a -m,64M -e intel_pt/cyc/k $ sudo ~/bin/perf script --show-task-events --show-switch-events --itrace=iqqe-o -C 1 --ns | grep -C 2 forkit context_switch event has no tid taskset 11019 [001] 66663.270045029: 1 instructions:k: ffffffffb1d9f844 strnlen_user+0xb4 ([kernel.kallsyms]) taskset 11019 [001] 66663.270201816: 1 instructions:k: ffffffffb1a83121 unmap_page_range+0x561 ([kernel.kallsyms]) forkit 11019 [001] 66663.270327553: PERF_RECORD_COMM exec: forkit:11019/11019 forkit 11019 [001] 66663.270420028: 1 instructions:k: ffffffffb1db9537 __clear_user+0x27 ([kernel.kallsyms]) forkit 11019 [001] 66663.270648704: 1 instructions:k: ffffffffb18829e6 do_user_addr_fault+0xf6 ([kernel.kallsyms]) forkit 11019 [001] 66663.270833163: 1 instructions:k: ffffffffb230a825 irqentry_exit_to_user_mode+0x15 ([kernel.kallsyms]) forkit 11019 [001] 66663.271092359: 1 instructions:k: ffffffffb1aea3d9 lock_page_memcg+0x9 ([kernel.kallsyms]) forkit 11019 [001] 66663.271207092: PERF_RECORD_FORK(11020:11020):(11019:11019) forkit 11019 [001] 66663.271234775: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 11020/11020 forkit 11020 [001] 66663.271238407: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 11019/11019 forkit 11020 [001] 66663.271312066: 1 instructions:k: ffffffffb1a88140 handle_mm_fault+0x10 ([kernel.kallsyms]) forkit 11020 [001] 66663.271476225: PERF_RECORD_EXIT(11020:11020):(11019:11019) forkit 11020 [001] 66663.271497488: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 11019/11019 forkit 11019 [001] 66663.271500523: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 11020/11020 forkit 11019 [001] 66663.271517241: 1 instructions:k: ffffffffb24012cd error_entry+0x6d ([kernel.kallsyms]) forkit 11019 [001] 66663.271664080: PERF_RECORD_EXIT(11019:11019):(1386:1386) After: $ sudo ~/bin/perf script --show-task-events --show-switch-events --itrace=iqqe-o -C 1 --ns | grep -C 2 forkit taskset 11019 [001] 66663.270045029: 1 instructions:k: ffffffffb1d9f844 strnlen_user+0xb4 ([kernel.kallsyms]) taskset 11019 [001] 66663.270201816: 1 instructions:k: ffffffffb1a83121 unmap_page_range+0x561 ([kernel.kallsyms]) forkit 11019 [001] 66663.270327553: PERF_RECORD_COMM exec: forkit:11019/11019 forkit 11019 [001] 66663.270420028: 1 instructions:k: ffffffffb1db9537 __clear_user+0x27 ([kernel.kallsyms]) forkit 11019 [001] 66663.270648704: 1 instructions:k: ffffffffb18829e6 do_user_addr_fault+0xf6 ([kernel.kallsyms]) forkit 11019 [001] 66663.270833163: 1 instructions:k: ffffffffb230a825 irqentry_exit_to_user_mode+0x15 ([kernel.kallsyms]) forkit 11019 [001] 66663.271092359: 1 instructions:k: ffffffffb1aea3d9 lock_page_memcg+0x9 ([kernel.kallsyms]) forkit 11019 [001] 66663.271207092: PERF_RECORD_FORK(11020:11020):(11019:11019) forkit 11019 [001] 66663.271234775: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 11020/11020 forkit 11020 [001] 66663.271238407: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 11019/11019 forkit 11020 [001] 66663.271312066: 1 instructions:k: ffffffffb1a88140 handle_mm_fault+0x10 ([kernel.kallsyms]) forkit 11020 [001] 66663.271476225: PERF_RECORD_EXIT(11020:11020):(11019:11019) forkit 11020 [001] 66663.271497488: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 11019/11019 forkit 11019 [001] 66663.271500523: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 11020/11020 forkit 11019 [001] 66663.271517241: 1 instructions:k: ffffffffb24012cd error_entry+0x6d ([kernel.kallsyms]) forkit 11019 [001] 66663.271664080: PERF_RECORD_EXIT(11019:11019):(1386:1386) forkit 11019 [001] 66663.271688752: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: -1/-1 :-1 -1 [001] 66663.271692086: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 11019/11019 :-1 -1 [001] 66663.271707466: 1 instructions:k: ffffffffb18eb096 update_load_avg+0x306 ([kernel.kallsyms]) Fixes: 86c2786994bd7c ("perf intel-pt: Add support for PERF_RECORD_SWITCH") Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Yu-cheng Yu Link: http://lore.kernel.org/lkml/20200909084923.9096-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit fc18380fb9d2f2f0f16b04e3fbaa1fa286776b01 Author: Adrian Hunter Date: Wed Sep 9 11:49:22 2020 +0300 perf script: Display negative tid in non-sample events The kernel can release tasks while they are still running. This can result in a task having no tid, in which case perf records a tid of -1. Improve the perf script output in that case. Example: Before: # cat ./autoreap.c #include #include #include #include struct sigaction act = { .sa_handler = SIG_IGN, }; int main() { pid_t child; int status = 0; sigaction(SIGCHLD, &act, NULL); child = fork(); if (child == 0) return 123; wait(&status); return 0; } # gcc -o autoreap autoreap.c # ./perf record -a -e dummy --switch-events ./autoreap [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.948 MB perf.data ] # ./perf script --show-task-events --show-switch-events | grep -C2 'autoreap\|4294967295\|-1' swapper 0 [004] 18462.673613: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 25189/25189 perf 25189 [004] 18462.673614: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 0/0 autoreap 25189 [004] 18462.673800: PERF_RECORD_COMM exec: autoreap:25189/25189 autoreap 25189 [004] 18462.674042: PERF_RECORD_FORK(25191:25191):(25189:25189) autoreap 25189 [004] 18462.674050: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 0/0 swapper 0 [004] 18462.674051: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 25189/25189 swapper 0 [005] 18462.674083: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 25191/25191 autoreap 25191 [005] 18462.674084: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 0/0 swapper 0 [003] 18462.674121: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 11/11 rcu_preempt 11 [003] 18462.674121: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 0/0 rcu_preempt 11 [003] 18462.674124: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 0/0 swapper 0 [003] 18462.674124: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 11/11 autoreap 25191 [005] 18462.674138: PERF_RECORD_EXIT(25191:25191):(25189:25189) PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 0/0 swapper 0 [005] 18462.674149: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 4294967295/4294967295 swapper 0 [004] 18462.674182: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 25189/25189 autoreap 25189 [004] 18462.674183: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 0/0 autoreap 25189 [004] 18462.674218: PERF_RECORD_EXIT(25189:25189):(25188:25188) autoreap 25189 [004] 18462.674225: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 0/0 swapper 0 [004] 18462.674226: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 25189/25189 swapper 0 [007] 18462.674257: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 25188/25188 After: # ./perf script --show-task-events --show-switch-events | grep -C2 'autoreap\|4294967295\|-1' swapper 0 [004] 18462.673613: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 25189/25189 perf 25189 [004] 18462.673614: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 0/0 autoreap 25189 [004] 18462.673800: PERF_RECORD_COMM exec: autoreap:25189/25189 autoreap 25189 [004] 18462.674042: PERF_RECORD_FORK(25191:25191):(25189:25189) autoreap 25189 [004] 18462.674050: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 0/0 swapper 0 [004] 18462.674051: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 25189/25189 swapper 0 [005] 18462.674083: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 25191/25191 autoreap 25191 [005] 18462.674084: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 0/0 swapper 0 [003] 18462.674121: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 11/11 rcu_preempt 11 [003] 18462.674121: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 0/0 rcu_preempt 11 [003] 18462.674124: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 0/0 swapper 0 [003] 18462.674124: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 11/11 autoreap 25191 [005] 18462.674138: PERF_RECORD_EXIT(25191:25191):(25189:25189) :-1 -1 [005] 18462.674149: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 0/0 swapper 0 [005] 18462.674149: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: -1/-1 swapper 0 [004] 18462.674182: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 25189/25189 autoreap 25189 [004] 18462.674183: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 0/0 autoreap 25189 [004] 18462.674218: PERF_RECORD_EXIT(25189:25189):(25188:25188) autoreap 25189 [004] 18462.674225: PERF_RECORD_SWITCH_CPU_WIDE OUT next pid/tid: 0/0 swapper 0 [004] 18462.674226: PERF_RECORD_SWITCH_CPU_WIDE IN prev pid/tid: 25189/25189 swapper 0 [007] 18462.674257: PERF_RECORD_SWITCH_CPU_WIDE OUT preempt next pid/tid: 25188/25188 Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Jiri Olsa Cc: Yu-cheng Yu Link: http://lore.kernel.org/lkml/20200909084923.9096-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 99f638173e186dea7c7f106f566bbca59e923c24 Author: Zejiang Tang Date: Wed Sep 9 17:53:14 2020 +0800 perf docs: Improve help information in perf.txt perf has many undocumented options, such as:-vv, --exec-path, --html-path, -p, --paginate,--no-pager, --debugfs-dir, --buildid-dir, --list-cmds, --list-opts. Add entris for these options in perf.txt. Signed-off-by: Zejiang Tang Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lore.kernel.org/lkml/1599645194-8438-1-git-send-email-tangzejiang@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit bc3d924399b823fd971d0441db57bfd7bab17c66 Merge: 9599f341889c8 b0e4dfe93714b Author: Mark Brown Date: Thu Sep 17 19:56:05 2020 +0100 Merge series "spi: Fixes for FSI-attached controller" from Eddie James : This series implements a number of fixes for the FSI-attached SPI controller driver. Changes since v1: - Switch to a new compatible string for the restricted version of the SPI controller, rather than a new boolean parameter. Brad Bishop (3): spi: fsi: Handle 9 to 15 byte transfers lengths spi: fsi: Fix clock running too fast spi: fsi: Fix use of the bneq+ sequencer instruction Eddie James (3): dt-bindings: fsi: fsi2spi: Add compatible string for restricted version spi: fsi: Implement restricted size for certain controllers spi: fsi: Check mux status before transfers .../devicetree/bindings/fsi/ibm,fsi2spi.yaml | 1 + drivers/spi/spi-fsi.c | 139 ++++++++++++++---- 2 files changed, 109 insertions(+), 31 deletions(-) -- 2.26.2 commit 9599f341889c87e56bb944659c32490d05e2532f Author: Jay Fang Date: Tue Sep 15 09:22:49 2020 +0800 spi: dw-pci: free previously allocated IRQs if desc->setup() fails Free previously allocated IRQs when return an error code of desc->setup() which is not always successful. And simplify the code by adding a goto label. Fixes: 8f5c285f3ef5 ("SPI: designware: pci: Switch over to MSI interrupts") CC: Felipe Balbi Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1600132969-53037-1-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 55ab8487e01d18466ddf596acc7a11e8c53b2812 Author: kuldip dwivedi Date: Fri Sep 11 18:33:31 2020 +0530 spi: spi-nxp-fspi: Add ACPI support Currently NXP fspi driver has support of DT only. Adding ACPI support to the driver so that it can be used by UEFI firmware booting in ACPI mode. This driver will be probed if any firmware will expose HID "NXP0009" in DSDT table. Signed-off-by: kuldip dwivedi Reviewed-by: Ashish Kumar Link: https://lore.kernel.org/r/20200911130331.6313-1-kuldip.dwivedi@puresoftware.com Signed-off-by: Mark Brown commit 7349201d9dfe0420489aa551c2dcc80fd6364799 Author: Barry Song Date: Wed Sep 16 22:10:42 2020 +1200 spi: lantiq: remove redundant irqsave and irqrestore in hardIRQ Running in hardIRQ, disabling irq is redundant. Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20200916101042.21860-1-song.bao.hua@hisilicon.com Signed-off-by: Mark Brown commit 985be7ebfbf79767bc3705eee7de635edd4eba7d Author: Ricardo Ribalda Date: Tue Sep 15 13:29:36 2020 +0200 spi: xilinx: Fix info message during probe The info message was showing the mapped address of the device. To avoid security problems, all virtual addresses are converted to __ptrval__, so the message was useless/ugly: [ 2.304949] xilinx_spi b0010000.spi-flash: at 0xB0010000 mapped to 0x(____ptrval____), irq=37 Use %pR instead: [ 15.021354] xilinx_spi b0010000.spi-flash: at [mem 0xb0010000-0xb001ffff], irq=37 Signed-off-by: Ricardo Ribalda Acked-by: Michal Simek Link: https://lore.kernel.org/r/20200915112936.320647-1-ribalda@kernel.org Signed-off-by: Mark Brown commit a803fbe61d973ca3d65d2892a62d5fcbe6d195ff Author: YueHaibing Date: Tue Sep 15 16:15:41 2020 +0800 perf metric: Remove duplicate include Remove duplicate header which is included twice. Signed-off-by: YueHaibing Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200915081541.41004-1-yuehaibing@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 328781df86fa8f9299219c74ffae876bd625c6d1 Author: Andi Kleen Date: Fri Sep 11 07:48:08 2020 -0700 perf tools: Add documentation for topdown metrics Add some documentation how to use the topdown metrics in ring 3. Signed-off-by: Andi Kleen Co-developed-by: Kan Liang Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200911144808.27603-5-kan.liang@linux.intel.com Signed-off-by: Kan Liang Signed-off-by: Arnaldo Carvalho de Melo commit 55c36a9fc2aaac6a0c77eeaeefd8d8f691c98e19 Author: Andi Kleen Date: Fri Sep 11 07:48:07 2020 -0700 perf stat: Support new per thread TopDown metrics Icelake has support for reporting per thread TopDown metrics. These are reported differently than the previous TopDown support, each metric is standalone, but scaled to pipeline "slots". We don't need to do anything special for HyperThreading anymore. Teach perf stat --topdown to handle these new metrics and print them in the same way as the previous TopDown metrics. The restrictions of only being able to report information per core is gone. Signed-off-by: Andi Kleen Co-developed-by: Kan Liang Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200911144808.27603-4-kan.liang@linux.intel.com Signed-off-by: Kan Liang Signed-off-by: Arnaldo Carvalho de Melo commit acb65150a47c2baea5ea02fd7cb66460f7733fcd Author: Kan Liang Date: Fri Sep 11 07:48:06 2020 -0700 perf record: Support sample-read topdown metric group With the hardware TopDown metrics feature, sample-read feature should be supported for a topdown group, e.g., sample a non-topdown event and read a topdown metric group. But the current perf record code errors out. For a topdown metric group, the slots event must be the leader of the group, but the leader slots event doesn't support sampling. To support sample-read the topdown metric group, use the 2nd event of the group as the "leader" for the purposes of sampling. Only the platform with Topdown metic feature supports sample-read the topdown group. Add arch_topdown_sample_read() to indicate whether the topdown group supports sample-read. Signed-off-by: Kan Liang Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Andi Kleen Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200911144808.27603-3-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 687986bbeb668068d39a47658edf4d7a6414eefb Author: Kan Liang Date: Fri Sep 11 07:48:05 2020 -0700 perf tools: Rename group to topdown The group.h/c only include TopDown group related functions. The name "group" is too generic and inaccurate. Use the name "topdown" to replace it. Move topdown related functions to a dedicated file, topdown.c. Signed-off-by: Kan Liang Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Andi Kleen Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200911144808.27603-2-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c57f5eaa094ee93b4e27f6624349bc90d41a4e68 Author: Jiri Olsa Date: Sun Sep 13 23:03:08 2020 +0200 perf machine: Add machine__for_each_dso() function Add the machine__for_each_dso() to iterate over all dso objects defined for the within a machine object. It will be used in the MMAP3 patch series. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Frank Ch. Eigler Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200913210313.1985612-22-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 056c1722014104b70d36fe71b683f71637f1a708 Merge: 8366f0d268c20 5925fa68fe824 Author: Arnaldo Carvalho de Melo Date: Thu Sep 17 15:45:05 2020 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo commit b0e4dfe93714b21e2fa9b03819b3e99383e5c330 Author: Eddie James Date: Wed Sep 9 17:28:55 2020 -0500 spi: fsi: fsi2spi: Add compatible string for restricted version Add a compatible string for the restricted version of the SPI controller. The restricted version cannot process sequence loop operations and therefore has a smaller transfer size. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20200909222857.28653-5-eajames@linux.ibm.com Signed-off-by: Mark Brown commit 9211a441e60686eec2ebd8f7bd65c4f780416404 Author: Eddie James Date: Wed Sep 9 17:28:57 2020 -0500 spi: fsi: Check mux status before transfers The SPI controllers are not accessible if the mux isn't set. Therefore, check the mux status before starting a transfer and fail out if it isn't set. Signed-off-by: Eddie James Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20200909222857.28653-7-eajames@linux.ibm.com Signed-off-by: Mark Brown commit 49c9fc1d7c101eceaddb655e4f0e062b0c8f403b Author: Eddie James Date: Wed Sep 9 17:28:56 2020 -0500 spi: fsi: Implement restricted size for certain controllers Some of the FSI-attached SPI controllers cannot use the loop command in programming the sequencer due to security requirements. Check the devicetree compatibility that indicates this condition and restrict the size for these controllers. Also, add more transfers directly in the sequence up to the length of the sequence register. Fixes: bbb6b2f9865b ("spi: Add FSI-attached SPI controller driver") Signed-off-by: Eddie James Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20200909222857.28653-6-eajames@linux.ibm.com Signed-off-by: Mark Brown commit 7909eebb2bea7fdbb2de0aa794cf29843761ed5b Author: Brad Bishop Date: Wed Sep 9 17:28:54 2020 -0500 spi: fsi: Fix use of the bneq+ sequencer instruction All of the switches in N2_count_control in the counter configuration are required to make the branch if not equal and increment command work. Set them when using bneq+. A side effect of this mode requires a dummy write to TDR when both transmitting and receiving otherwise the controller won't start shifting receive data. It is likely not possible to avoid TDR underrun errors in this mode and they are harmless, so do not check for them. Fixes: bbb6b2f9865b ("spi: Add FSI-attached SPI controller driver") Signed-off-by: Brad Bishop Signed-off-by: Eddie James Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20200909222857.28653-4-eajames@linux.ibm.com Signed-off-by: Mark Brown commit 0b546bbe9474ff23e6843916ad6d567f703b2396 Author: Brad Bishop Date: Wed Sep 9 17:28:53 2020 -0500 spi: fsi: Fix clock running too fast Use a clock divider tuned to a 200MHz FSI bus frequency (the maximum). Use of the previous divider at 200MHz results in corrupt data from endpoint devices. Ideally the clock divider would be calculated from the FSI clock, but that would require some significant work on the FSI driver. With FSI frequencies slower than 200MHz, the SPI clock will simply run slower, but safely. Signed-off-by: Brad Bishop Signed-off-by: Eddie James Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20200909222857.28653-3-eajames@linux.ibm.com Signed-off-by: Mark Brown commit 2b3cef0fc757bd06ed9b83bd4c436bfa55f47370 Author: Brad Bishop Date: Wed Sep 9 17:28:52 2020 -0500 spi: fsi: Handle 9 to 15 byte transfers lengths The trailing - 8 bytes of transfer data in this size range is no longer ignored. Fixes: bbb6b2f9865b ("spi: Add FSI-attached SPI controller driver") Signed-off-by: Brad Bishop Signed-off-by: Eddie James Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20200909222857.28653-2-eajames@linux.ibm.com Signed-off-by: Mark Brown commit 20f0afd1fb3d7d44f4a3db5a4b6e904410862140 Author: Fenghua Yu Date: Tue Sep 15 09:30:13 2020 -0700 x86/mmu: Allocate/free a PASID A PASID is allocated for an "mm" the first time any thread binds to an SVA-capable device and is freed from the "mm" when the SVA is unbound by the last thread. It's possible for the "mm" to have different PASID values in different binding/unbinding SVA cycles. The mm's PASID (non-zero for valid PASID or 0 for invalid PASID) is propagated to a per-thread PASID MSR for all threads within the mm through IPI, context switch, or inherited. This is done to ensure that a running thread has the right PASID in the MSR matching the mm's PASID. [ bp: s/SVM/SVA/g; massage. ] Suggested-by: Andy Lutomirski Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/1600187413-163670-10-git-send-email-fenghua.yu@intel.com commit 1478b99a76534b6c244cfe24fa616280a9441118 Author: Fenghua Yu Date: Tue Sep 15 09:30:12 2020 -0700 x86/cpufeatures: Mark ENQCMD as disabled when configured out Currently, the ENQCMD feature depends on CONFIG_IOMMU_SUPPORT. Add X86_FEATURE_ENQCMD to the disabled features mask so that it gets disabled when the IOMMU config option above is not enabled. Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/1600187413-163670-9-git-send-email-fenghua.yu@intel.com commit 52ad9bc64c74167466e70e0df4b99ee5ccef0078 Author: Fenghua Yu Date: Tue Sep 15 09:30:11 2020 -0700 mm: Add a pasid member to struct mm_struct A PASID is shared by all threads in a process. So the logical place to keep track of it is in the mm_struct. Both ARM and x86 would use this PASID. [ bp: Massage commit message. ] Suggested-by: Christoph Hellwig Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/1600187413-163670-8-git-send-email-fenghua.yu@intel.com commit f0f2f9feb4ee6f28729e5388da3c03ce1dac077a Author: Fenghua Yu Date: Tue Sep 15 09:30:10 2020 -0700 x86/msr-index: Define an IA32_PASID MSR The IA32_PASID MSR (0xd93) contains the Process Address Space Identifier (PASID), a 20-bit value. Bit 31 must be set to indicate the value programmed in the MSR is valid. Hardware uses the PASID to identify a process address space and direct responses to the right address space. Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/1600187413-163670-7-git-send-email-fenghua.yu@intel.com commit b454feb9abc1a9ee876fb84bfea0fc8d726f5bc4 Author: Yu-cheng Yu Date: Tue Sep 15 09:30:09 2020 -0700 x86/fpu/xstate: Add supervisor PASID state for ENQCMD The ENQCMD instruction reads a PASID from the IA32_PASID MSR. The MSR is stored in the task's supervisor XSAVE* PASID state and is context-switched by XSAVES/XRSTORS. [ bp: Add (in-)definite articles and massage. ] Signed-off-by: Yu-cheng Yu Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/1600187413-163670-6-git-send-email-fenghua.yu@intel.com commit c34bed923d40ef197412b0fa0b4b79892b7f6035 Author: Jonathan Cameron Date: Thu Sep 10 18:32:06 2020 +0100 iio:potentiometer:ds1803: Drop of_match_ptr and CONFIG_OF protections These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Drop them to remove this restriction. Also switch of.h for mod_devicetable.h include given use of struct of_device_id which is defined in that header. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Slawomir Stepien Link: https://lore.kernel.org/r/20200910173242.621168-3-jic23@kernel.org commit 19061b3c590d20ed555cbe848427ef5e69d18559 Author: Jonathan Cameron Date: Thu Sep 10 18:32:05 2020 +0100 iio:potentiometer:ad5272: Drop of_match_ptr and CONFIG_OF protections. These prevent use of this driver with ACPI via PRP0001 and are an example of an anti pattern I'm trying to remove from IIO. Drop them to remove this restriction. Also added mod_devicetable.h include given use of struct of_device_id which is defined in that header. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Phil Reid Link: https://lore.kernel.org/r/20200910173242.621168-2-jic23@kernel.org commit 9d8feb460adb90e89e64101ce2c1cfcd548a6d83 Author: Alex Vesker Date: Mon Aug 31 10:01:48 2020 +0300 RDMA/mlx5: Add sw_owner_v2 bit capability Added sw_owner_v2 which will be enabled for future devices, replacing sw_owner bit. Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky commit ff4f82816dff28ffaaff96d1409bb3811d345514 Author: Fenghua Yu Date: Tue Sep 15 09:30:08 2020 -0700 x86/cpufeatures: Enumerate ENQCMD and ENQCMDS instructions Work submission instruction comes in two flavors. ENQCMD can be called both in ring 3 and ring 0 and always uses the contents of a PASID MSR when shipping the command to the device. ENQCMDS allows a kernel driver to submit commands on behalf of a user process. The driver supplies the PASID value in ENQCMDS. There isn't any usage of ENQCMD in the kernel as of now. The CPU feature flag is shown as "enqcmd" in /proc/cpuinfo. Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/1600187413-163670-5-git-send-email-fenghua.yu@intel.com commit d563d4d834641bae50564bd1e6e48187b630c563 Author: Jonathan Cameron Date: Sun Sep 13 14:21:13 2020 +0100 iio:imu:adis16400: Sort out missing kernel doc. I'd like to be enable W=1 for all IIO builds as it catches real issues as well as more minor documentation issues such as this (also good to fix though!) drivers/iio/imu/adis16400.c:183: warning: Function parameter or member 'avail_scan_mask' not described in 'adis16400_state' Signed-off-by: Jonathan Cameron Acked-by: Alexandru Ardelean Cc: Alexandru Ardelean Link: https://lore.kernel.org/r/20200913132115.800131-2-jic23@kernel.org commit e16e0a778fec8ac1b3755c9c4a322eaea37e8a47 Author: Alexandru Ardelean Date: Thu Sep 17 15:59:51 2020 +0300 iio: buffer: split buffer sysfs creation to take buffer as primary arg Currently the iio_buffer_{alloc,free}_sysfs_and_mask() take 'indio_dev' as primary argument. This change splits the main logic into a private function that takes an IIO buffer as primary argument. That way, the functions can be extended to configure the sysfs for multiple buffers. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200917125951.861-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 8c46d543aaa900942365b2b46a165fb49e939954 Author: Clint Sbisa Date: Fri Aug 21 15:51:21 2020 +0000 PCI: Update mmap-related #ifdef comments f719582435af ("PCI: Add pci_mmap_resource_range() and use it for ARM64") changed the #ifdef condition around pci_create_resource_files(), pci_remove_resource_files(), and related functions, but did not update comments at the #else and #ifdef. Update the comments to match the #ifdef. [bhelgaas: commit log, drop #endif comment since it's close to the #else] Link: https://lore.kernel.org/r/20200821155121.nzxjeeoze4h5pone@amazon.com Signed-off-by: Clint Sbisa Signed-off-by: Bjorn Helgaas commit 7b6f2240880b42dad2f8d3c750c5bcb9decfe245 Author: Dongdong Liu Date: Thu Sep 10 19:24:15 2020 +0800 PCI/LINK: Print IRQ number used by port Print the IRQ used by PCIe Link Bandwidth Notification services port as AER, PME and DPC do. It provides convenience to track PCIe BW notification interrupt counts of certain port from /proc/interrupts. The dmesg log is as below: pcieport 0000:00:00.0: bw_notification: enabled with IRQ 1166 Link: https://lore.kernel.org/r/1599737055-73624-1-git-send-email-liudongdong3@huawei.com Signed-off-by: Dongdong Liu Signed-off-by: Bjorn Helgaas commit 462bd2fdf56ab2af50d1b483f6783a5a30562e02 Author: Liu Shixin Date: Thu Sep 17 15:10:42 2020 +0800 PCI/IOV: Simplify pci-pf-stub with module_pci_driver() Use the module_pci_driver() macro to make the code simpler by eliminating module_init() and module_exit() calls. Link: https://lore.kernel.org/r/20200917071042.1909191-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Bjorn Helgaas Acked-by: Alexander Duyck commit 4e7b11567d946ebe14a3d10b697b078971a9da89 Author: Ashok Raj Date: Tue Sep 15 09:30:07 2020 -0700 Documentation/x86: Add documentation for SVA (Shared Virtual Addressing) ENQCMD and Data Streaming Accelerator (DSA) and all of their associated features are a complicated stack with lots of interconnected pieces. This documentation provides a big picture overview for all of the features. Signed-off-by: Ashok Raj Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/1600187413-163670-4-git-send-email-fenghua.yu@intel.com commit 877c1a5f79c6984bbe3f2924234c08e2f4f1acd5 Author: Tuan Phan Date: Thu Aug 6 14:57:34 2020 -0700 PCI/ACPI: Add Ampere Altra SOC MCFG quirk Ampere Altra SOC supports only 32-bit ECAM reads. Add an MCFG quirk for the platform. Link: https://lore.kernel.org/r/1596751055-12316-1-git-send-email-tuanphan@os.amperecomputing.com Signed-off-by: Tuan Phan Signed-off-by: Bjorn Helgaas commit 0199f866615921ddc5d22fbbab7510e8b403d40c Merge: 2b37a18b58ed1 b014e9fae7e7d Author: Mark Brown Date: Thu Sep 17 18:25:39 2020 +0100 Merge series "Support ROHM BD9576MUF and BD9573MUF PMICs" from Matti Vaittinen : Initial support for ROHM BD9576MUF and BD9573MUF PMICs. These PMICs are primarily intended to be used to power the R-Car family processors. BD9576MUF includes some additional safety features the BD9573MUF does not have. This initial version of drivers does not utilize these features and for now the SW behaviour is identical. Please note that this version of drivers is only tested on BD9576MUF but according to the data-sheets the relevant parts of registers should be same so drivers should also work on BD9573MUF. This patch series includes MFD, watchdog and regulator drivers with basic functionality such as: - Enabling and pinging the watchdog - configuring watchog timeout / window from device-tree - reading regulator states/voltages - enabling/disabling VOUT1 (VD50) when control mode B is used. This patch series does not bring interrupt support. BD9576MUF and BD9573MUF are designed to keep the IRQ line low for whole duration of error condition. IRQ can't be 'acked'. So proper IRQ support would require some IRQ limiter implementation (delayed unmask?) in order to not hog the CPU. --- Matti Vaittinen (6): dt_bindings: mfd: Add ROHM BD9576MUF and BD9573MUF PMICs dt_bindings: regulator: Add ROHM BD9576MUF and BD9573MUF PMICs mfd: Support ROHM BD9576MUF and BD9573MUF wdt: Support wdt on ROHM BD9576MUF and BD9573MUF regulator: Support ROHM BD9576MUF and BD9573MUF MAINTAINERS: Add ROHM BD9576MUF and BD9573MUF drivers .../bindings/mfd/rohm,bd9576-pmic.yaml | 129 +++++++ .../regulator/rohm,bd9576-regulator.yaml | 33 ++ MAINTAINERS | 4 + drivers/mfd/Kconfig | 11 + drivers/mfd/Makefile | 1 + drivers/mfd/rohm-bd9576.c | 130 +++++++ drivers/regulator/Kconfig | 10 + drivers/regulator/Makefile | 1 + drivers/regulator/bd9576-regulator.c | 337 ++++++++++++++++++ drivers/watchdog/Kconfig | 13 + drivers/watchdog/Makefile | 1 + drivers/watchdog/bd9576_wdt.c | 295 +++++++++++++++ include/linux/mfd/rohm-bd957x.h | 61 ++++ include/linux/mfd/rohm-generic.h | 2 + 14 files changed, 1028 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/rohm,bd9576-pmic.yaml create mode 100644 Documentation/devicetree/bindings/regulator/rohm,bd9576-regulator.yaml create mode 100644 drivers/mfd/rohm-bd9576.c create mode 100644 drivers/regulator/bd9576-regulator.c create mode 100644 drivers/watchdog/bd9576_wdt.c create mode 100644 include/linux/mfd/rohm-bd957x.h base-commit: f4d51dffc6c01a9e94650d95ce0104964f8ae822 -- 2.21.0 -- Matti Vaittinen, Linux device drivers ROHM Semiconductors, Finland SWDC Kiviharjunlenkki 1E 90220 OULU FINLAND ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ Simon says - in Latin please. ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ Thanks to Simon Glass for the translation =] commit b014e9fae7e7de4329a7092ade4256982c5ce974 Author: Matti Vaittinen Date: Thu Sep 17 11:03:31 2020 +0300 regulator: Support ROHM BD9576MUF and BD9573MUF Add initial support for ROHM BD9576MUF and BD9573MUF PMICs regulators. These PMICs are mainly used to power the R-Car series processors. The BD9576 includes some functional-safety features which are not present on BD9573. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/78baea1d7922506827ca717e277e4e6b391bbb78.1600329307.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit fdb2f9ffc9f533ceef16666818557ea7b6edfe2a Author: Matti Vaittinen Date: Thu Sep 17 11:02:18 2020 +0300 dt_bindings: regulator: Add ROHM BD9576MUF and BD9573MUF PMICs Add bindings for regulators on ROHM BD9576MUF and BD9573MUF PMICs. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/91f6bcbcfce7de3d92c40a6b3a9e4bd84420deee.1600329307.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 2ce02a864ac1a2bf99baeb20d38100d2cc413ac2 Author: Jiang Biao Date: Mon Aug 24 13:20:25 2020 +0800 PCI: Add schedule point in pci_read_config() The PCI sysfs "config" file allows large reads, and the resulting PCI config reads can take several milliseconds to complete. Testing with the cyclictest [1] benchmark showed 5ms+ latencies. Add a schedule point in pci_read_config() to reduce the maximum latency. [1] https://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git/ [bhelgaas: commit log] Link: https://lore.kernel.org/r/20200824052025.48362-1-benbjiang@tencent.com Reported-by: Bin Lai Signed-off-by: Jiang Biao Signed-off-by: Bjorn Helgaas commit 2a5054c6e7b16906984ac36a7363ca46b8d99ade Author: Fenghua Yu Date: Tue Sep 15 09:30:06 2020 -0700 iommu/vt-d: Change flags type to unsigned int in binding mm "flags" passed to intel_svm_bind_mm() is a bit mask and should be defined as "unsigned int" instead of "int". Change its type to "unsigned int". Suggested-by: Thomas Gleixner Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Lu Baolu Acked-by: Joerg Roedel Link: https://lkml.kernel.org/r/1600187413-163670-3-git-send-email-fenghua.yu@intel.com commit c7b6bac9c72c5fcbd6e9e12545bd3022c7f21860 Author: Fenghua Yu Date: Tue Sep 15 09:30:05 2020 -0700 drm, iommu: Change type of pasid to u32 PASID is defined as a few different types in iommu including "int", "u32", and "unsigned int". To be consistent and to match with uapi definitions, define PASID and its variations (e.g. max PASID) as "u32". "u32" is also shorter and a little more explicit than "unsigned int". No PASID type change in uapi although it defines PASID as __u64 in some places. Suggested-by: Thomas Gleixner Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Reviewed-by: Lu Baolu Acked-by: Felix Kuehling Acked-by: Joerg Roedel Link: https://lkml.kernel.org/r/1600187413-163670-2-git-send-email-fenghua.yu@intel.com commit dc98f50fa5a05735c70ffe34fe5d2468fc20d44d Author: Ville Syrjälä Date: Tue Jul 14 18:26:26 2020 +0300 drm/i915: Nuke force_min_cdclk_changed Since we now have proper old and new cdclk state we no longer need to keep this flag to indicate that the force min cdclk has changed. Instead just check if the old vs. new value are different. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200714152626.380-4-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit e161da331618e31b3f66d9d47d7f02d75ba815a1 Author: Ville Syrjälä Date: Wed Sep 2 15:21:41 2020 +0300 drm/i915: Remove the old global state stuff With the dbuf code mostly converted over to the new global state handling we can remove the leftovers of the old global state stuff. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200902122141.15181-1-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit c0a6b5ecc5b7dd028c2921415ea036074a8f8b00 Author: Leon Romanovsky Date: Wed Sep 2 11:16:23 2020 +0300 RDMA: Convert RWQ table logic to ib_core allocation scheme Move struct ib_rwq_ind_table allocation to ib_core. Link: https://lore.kernel.org/r/20200902081623.746359-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d18bb3e15201918b8d07e85a6e010ca5ed28dad5 Author: Leon Romanovsky Date: Wed Sep 2 11:16:22 2020 +0300 RDMA: Clean MW allocation and free flows Move allocation and destruction of memory windows under ib_core responsibility and clean drivers to ensure that no updates to MW ib_core structures are done in driver layer. Link: https://lore.kernel.org/r/20200902081623.746359-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 80bdad3d7e3ec03f812471d9309f5f682e10f52b Author: Christoph Hellwig Date: Thu Sep 17 09:41:59 2020 +0200 quota: simplify the quotactl compat handling Fold the misaligned u64 workarounds into the main quotactl flow instead of implementing a separate compat syscall handler. Signed-off-by: Christoph Hellwig Acked-by: Jan Kara Signed-off-by: Al Viro commit 527c412519eb63ed354790f4291c3728815d11a6 Author: Christoph Hellwig Date: Thu Sep 17 09:41:58 2020 +0200 compat: add a compat_need_64bit_alignment_fixup() helper Add a helper to check if the calling syscall needs a fixup for non-natural 64-bit type alignment in the compat ABI. This will only return true for i386 syscalls on x86_64. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit cc7886d25bcaffe7f4412d774365d85b462366f8 Author: Christoph Hellwig Date: Thu Sep 17 09:41:57 2020 +0200 compat: lift compat_s64 and compat_u64 to lift the compat_s64 and compat_u64 definitions into common code using the COMPAT_FOR_U64_ALIGNMENT symbol for the x86 special case. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 0c2191c3da345e0fe73118445ddb1f0df114aadf Author: Ricardo Ribalda Date: Thu Sep 17 13:47:27 2020 +0200 regmap: Add support for 12/20 register formatting Devices such as the AD5628 require 32 bits of data divided in 12 bits for dummy, command and address, and 20 for data and dummy. Eg: XXXXCCCCAAAADDDDDDDDDDDDDDDDXXXX Where X is dont care, C is command, A is address and D is data bits. Which would requierd the following regmap_config: static const struct regmap_config config_dac = { .reg_bits = 12, .val_bits = 20, .max_register = 0xff, }; Signed-off-by: Ricardo Ribalda Link: https://lore.kernel.org/r/20200917114727.1120373-1-ribalda@kernel.org Signed-off-by: Mark Brown commit 37329036f67f2592a01c62fcc33b13dd55c42140 Author: Oliver Neukum Date: Thu Sep 17 13:02:35 2020 +0200 USB: cdc-acm: cleanup of data structures Buffers should be u8*, not unsigned char* Buffers have an unsigned length and using an int as a boolean is a bit outdated. No functional change intended. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200917110235.11854-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit c56150c1bc8da5524831b1dac2eec3c67b89f587 Author: Oliver Neukum Date: Thu Sep 17 13:26:00 2020 +0200 USB: adutux: fix debugging Handling for removal of the controller was missing at one place. Add it. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200917112600.26508-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 8fd0e2a6df262539eaa28b0a2364cca10d1dc662 Author: Lang Dai Date: Mon Sep 14 11:26:41 2020 +0800 uio: free uio id after uio file node is freed uio_register_device() do two things. 1) get an uio id from a global pool, e.g. the id is 2) create file nodes like /sys/class/uio/uio uio_unregister_device() do two things. 1) free the uio id and return it to the global pool 2) free the file node /sys/class/uio/uio There is a situation is that one worker is calling uio_unregister_device(), and another worker is calling uio_register_device(). If the two workers are X and Y, they go as below sequence, 1) X free the uio id 2) Y get an uio id 3) Y create file node /sys/class/uio/uio 4) X free the file note /sys/class/uio/uio Then it will failed at the 3rd step and cause the phenomenon we saw as it is creating a duplicated file node. Failure reports as follows: sysfs: cannot create duplicate filename '/class/uio/uio10' Call Trace: sysfs_do_create_link_sd.isra.2+0x9e/0xb0 sysfs_create_link+0x25/0x40 device_add+0x2c4/0x640 __uio_register_device+0x1c5/0x576 [uio] adf_uio_init_bundle_dev+0x231/0x280 [intel_qat] adf_uio_register+0x1c0/0x340 [intel_qat] adf_dev_start+0x202/0x370 [intel_qat] adf_dev_start_async+0x40/0xa0 [intel_qat] process_one_work+0x14d/0x410 worker_thread+0x4b/0x460 kthread+0x105/0x140 ? process_one_work+0x410/0x410 ? kthread_bind+0x40/0x40 ret_from_fork+0x1f/0x40 Code: 85 c0 48 89 c3 74 12 b9 00 10 00 00 48 89 c2 31 f6 4c 89 ef e8 ec c4 ff ff 4c 89 e2 48 89 de 48 c7 c7 e8 b4 ee b4 e8 6a d4 d7 ff <0f> 0b 48 89 df e8 20 fa f3 ff 5b 41 5c 41 5d 5d c3 66 0f 1f 84 ---[ end trace a7531c1ed5269e84 ]--- c6xxvf b002:00:00.0: Failed to register UIO devices c6xxvf b002:00:00.0: Failed to register UIO devices Signed-off-by: Lang Dai Link: https://lore.kernel.org/r/1600054002-17722-1-git-send-email-lang.dai@intel.com Signed-off-by: Greg Kroah-Hartman commit 8436f932d84b1d53d2f4a2fa88c7aacdb0313265 Author: Mauro Carvalho Chehab Date: Thu Sep 17 12:42:12 2020 +0200 staging: hikey9xx: convert phy-kirin970-usb3.txt to yaml Use the new YAML for this physical layer. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/03535ba996b3d82d522ce9c529bc2ce8e1d8d531.1600338981.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit aa125e718785808f7677dc23a44b93400fcc5d6e Author: Mauro Carvalho Chehab Date: Thu Sep 17 12:42:11 2020 +0200 staging: hikey9xx: phy-hi3670-usb3: change some DT properties Do some changes at the DT properties in order to make it follow the phy-hi3660-usb3 example and to simplify usb3-phy-tx-vboost-lvl name. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/da128b9943bcb6a3d44a9512cedc7fa7a4aedee6.1600338981.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8c2a794c8774eddbea00ae22e1a75ae4c7491024 Author: Mauro Carvalho Chehab Date: Thu Sep 17 12:42:10 2020 +0200 staging: hikey9xx: phy-hi3670-usb3: fix coding style Address the issues reported by checkpatch --strict, and add a SPDX tag. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6b1f66068905b7d0a9a988c9d0bd4ebef19a6fc2.1600338981.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit cf58bf42da0a015b312a239891faf34ff4106ed3 Author: Mauro Carvalho Chehab Date: Thu Sep 17 12:42:09 2020 +0200 staging: hikey9xx: phy-hi3670-usb3.txt: use a consistent namespace While this driver is not used yet, use a more consistent namespace, similar to the PHY layer for Kirin 960 (hi3660). Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/49c2f648516e62d75d339edf42a029bac138e6c0.1600338981.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 521703d6e38225049271a7e46d3c88f3f436d701 Author: Mauro Carvalho Chehab Date: Thu Sep 17 12:42:08 2020 +0200 staging: hikey9xx: phy-hi3670-usb3: use a consistent namespace Rename hikey970 to hi3670, in order to use a namespace similar to hi3660 driver. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/0a2b7d1d1779551be604532a9959237fd3513971.1600338981.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit b9e1814a915174edd6f55db7c7d029d76703466a Author: Yu Chen Date: Thu Sep 17 12:42:07 2020 +0200 staging: hikey9xx: phy-hi3670-usb3: fix some issues at the init code There are some problems at the initialization part of this phy. Solve them. Signed-off-by: Yu Chen Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5080774c68784afed1183cb54f540350e0551b07.1600338981.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2a0dc2c368fccc9d69bf72ce389065939187af23 Author: Mauro Carvalho Chehab Date: Thu Sep 17 12:42:06 2020 +0200 staging: hikey9xx: add build for the Kirin 970 PHY driver Add the needed bits in order to build the Kirin 970 PHY driver. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/60aae73e91348430e940638cf9668a0a63a85c1c.1600338981.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8971a3b880b2fa8086ddc79d83f1fddc6238b3ee Author: Yu Chen Date: Thu Sep 17 12:42:05 2020 +0200 staging: hikey9xx: add USB physical layer for Kirin 3670 Add the Hisilicon Kirin 3670 USB phy driver. This driver was imported from Linaro's official Hikey 970 tree, from the original patch, removing the addition of the dwg3-specific parts, and getting the missing SoB from its original author: https://github.com/96boards-hikey/linux/commit/9d168f580c9977f9c7f48b228b72035e2f6e3eba#diff-93bb70bc97bdd7be752cb6722adf2124 [mchehab: moved to staging and dropped Makefile/Kconfig changes] Signed-off-by: Yu Chen Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/0e6b2fa68cabd317511637fdfdeadc574196ea90.1600338981.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2d5f72b0f101eb0aeadaa078a0d0a98ecec1e7ec Author: Michael Straube Date: Thu Sep 17 09:13:30 2020 +0200 staging: rtl8188eu: clean up comparsion style issues Move constants to the right side of comparsions to follow kernel coding style and clear checkpatch warnings. In case of comparsion to _FAIL we can use '!' since _FAIL is defined as '0'. WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200917071330.31740-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit a620afdb6d16af95fa4216bd084725c406e22b89 Author: Michael Straube Date: Thu Sep 17 09:13:29 2020 +0200 staging: rtl8188eu: use __func__ in hal directory Use __func__ instead of hardcoded function names to clear checkpatch warnings. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200917071330.31740-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit b1c194dcdb1425fa59eec61ab927cfff33096149 Author: Vadym Kochan Date: Thu Sep 17 14:44:37 2020 +0100 nvmem: core: fix missing of_node_put() in of_nvmem_device_get() of_parse_phandle() returns device_node with incremented ref count which needs to be decremented by of_node_put() when device_node is not used. Fixes: e2a5402ec7c6 ("nvmem: Add nvmem_device based consumer apis.") Signed-off-by: Vadym Kochan Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200917134437.16637-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1eb51d6a4fce66e7c4428b5761b75b357931422a Author: Bartosz Golaszewski Date: Thu Sep 17 14:44:36 2020 +0100 nvmem: switch to simpler IDA interface We don't need to specify any ranges when allocating IDs so we can switch to ida_alloc() and ida_free() instead of the ida_simple_ counterparts. ida_simple_get(ida, 0, 0, gfp) is equivalent to ida_alloc_range(ida, 0, UINT_MAX, gfp) which is equivalent to ida_alloc(ida, gfp). Note: IDR will never actually allocate an ID larger than INT_MAX. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200917134437.16637-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 28371cc610962479bd4cb1b4b088081a23ac2e71 Author: Tian Tao Date: Thu Sep 17 14:44:35 2020 +0100 nvmem: core: Use kobj_to_dev() instead of container_of() Use kobj_to_dev() instead of container_of() Signed-off-by: Tian Tao Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200917134437.16637-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8e2aeb5b128e4a90fdd7b27ad3740a4b07284333 Author: Chih-En Hsu Date: Thu Sep 17 14:44:34 2020 +0100 nvmem: mtk-efuse: Remove EFUSE register write support This patch is to remove function "mtk_reg_write" since Mediatek EFUSE hardware only supports read functionality for NVMEM consumers. Fixes: ba360fd040e3 ("nvmem: mtk-efuse: remove nvmem regmap dependency") Acked-by: Andrew-CT Chen Signed-off-by: Chih-En Hsu Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200917134437.16637-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1d62a2cedfb58d27718f266da4b35f8367969836 Author: Vadym Kochan Date: Wed Sep 16 20:09:33 2020 +0300 eeprom: 93xx46: set type id as EEPROM Set type as NVMEM_TYPE_EEPROM to expose this info via sysfs: $ cat /sys/bus/nvmem/devices/{DEVICE}/type EEPROM Signed-off-by: Vadym Kochan Link: https://lore.kernel.org/r/20200916170933.20302-4-vadym.kochan@plvision.eu Signed-off-by: Greg Kroah-Hartman commit 5e180e6f6ac9892b15870d43741c47f2cd4dbe6e Author: Vadym Kochan Date: Wed Sep 16 20:09:32 2020 +0300 eeprom: at25: set type id as EEPROM Set type as NVMEM_TYPE_EEPROM to expose this info via sysfs: $ cat /sys/bus/nvmem/devices/{DEVICE}/type EEPROM Signed-off-by: Vadym Kochan Link: https://lore.kernel.org/r/20200916170933.20302-3-vadym.kochan@plvision.eu Signed-off-by: Greg Kroah-Hartman commit 14ea4db18c069816e7ff0441a2f39a12d2feb11c Author: Mike Leach Date: Wed Sep 16 13:17:37 2020 -0600 coresight: etm4x: Fix number of resources check for ETM 4.3 and above The initialisation code checks TRCIDR4 to determine the number of resource selectors available on the system. Since ETM v 4.3, the value 0 has a different meaning. This patch takes into account this change. Signed-off-by: Mike Leach [Removed '.' in patch title, added stable] Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-17-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 685d84a7862eb0ca80e47f4179a7f0774462e539 Author: Jonathan Zhou Date: Wed Sep 16 13:17:36 2020 -0600 coresight: etm4x: Fix mis-usage of nr_resource in sysfs interface The member @nr_resource represents how many resource selector pairs, and the pair 0 is always implemented and reserved. So let's multiply by 2 when resetting the selector configuration. And also update the validation of the input @idx. Cc: Mathieu Poirier Cc: Suzuki K Poulose Cc: Mike Leach Cc: Shaokun Zhang Signed-off-by: Jonathan Zhou [Fixed typographical error in changelog, added stable] Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-16-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6d578258b955fc8888e1bbd9a8fefe7b10065a84 Author: Linu Cherian Date: Wed Sep 16 13:17:35 2020 -0600 coresight: Make sysfs functional on topologies with per core sink Coresight driver assumes sink is common across all the ETMs, and tries to build a path between ETM and the first enabled sink found using bus based search. This breaks sysFS usage on implementations that has multiple per core sinks in enabled state. To fix this, coresight_get_enabled_sink API is updated to do a connection based search starting from the given source, instead of bus based search. With sink selection using sysfs depecrated for perf interface, provision for reset is removed as well in this API. Signed-off-by: Linu Cherian [Fixed indentation problem and removed obsolete comment] Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-15-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit bb1860efc817c18fce4112f25f51043e44346d1b Author: Linu Cherian Date: Wed Sep 16 13:17:34 2020 -0600 coresight: etm: perf: Sink selection using sysfs is deprecated When using the perf interface, sink selection using sysfs is deprecated. Signed-off-by: Linu Cherian Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-14-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2fee15c10d18a09cc9926eafeaef9750be1104b2 Author: Mathieu Poirier Date: Wed Sep 16 13:17:33 2020 -0600 MAINTAINERS: Add CoreSight mailing list Add CoreSight mailing list so that people can participate in patch reviews and know what features are coming next. Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-13-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4cd83037cd957ad97756055355ab4ee63f259380 Author: Jonathan Zhou Date: Wed Sep 16 13:17:32 2020 -0600 coresight: etm4x: Fix issues on trcseqevr access The TRCSEQEVR(3) is reserved, using '@nrseqstate - 1' instead to avoid accessing the reserved register. Fixes: f188b5e76aae ("coresight: etm4x: Save/restore state across CPU low power states") Cc: Mathieu Poirier Cc: Suzuki K Poulose Cc: Mike Leach Cc: Shaokun Zhang Signed-off-by: Jonathan Zhou [Fixed capital letter in title] Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-12-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 859d510e58dac94f0b204b7b5cccafbc130d2291 Author: Suzuki K Poulose Date: Wed Sep 16 13:17:31 2020 -0600 coresight: etm4x: Handle unreachable sink in perf mode If the specified/hinted sink is not reachable from a subset of the CPUs, we could end up unable to trace the event on those CPUs. This is the best effort we could do until we support 1:1 configurations. Fail gracefully in such cases avoiding a WARN_ON, which can be easily triggered by the user on certain platforms (Arm N1SDP), with the following trace paths : CPU0 \ -- Funnel0 --> ETF0 --> / \ CPU1 \ MainFunnel CPU2 / \ / -- Funnel1 --> ETF1 --> / CPU1 $ perf record --per-thread -e cs_etm/@ETF0/u -- could trigger the following WARNING, when the event is scheduled on CPU2. [10919.513250] ------------[ cut here ]------------ [10919.517861] WARNING: CPU: 2 PID: 24021 at drivers/hwtracing/coresight/coresight-etm-perf.c:316 etm_event_start+0xf8/0x100 ... [10919.564403] CPU: 2 PID: 24021 Comm: perf Not tainted 5.8.0+ #24 [10919.570308] pstate: 80400089 (Nzcv daIf +PAN -UAO BTYPE=--) [10919.575865] pc : etm_event_start+0xf8/0x100 [10919.580034] lr : etm_event_start+0x80/0x100 [10919.584202] sp : fffffe001932f940 [10919.587502] x29: fffffe001932f940 x28: fffffc834995f800 [10919.592799] x27: 0000000000000000 x26: fffffe0011f3ced0 [10919.598095] x25: fffffc837fce244c x24: fffffc837fce2448 [10919.603391] x23: 0000000000000002 x22: fffffc8353529c00 [10919.608688] x21: fffffc835bb31000 x20: 0000000000000000 [10919.613984] x19: fffffc837fcdcc70 x18: 0000000000000000 [10919.619281] x17: 0000000000000000 x16: 0000000000000000 [10919.624577] x15: 0000000000000000 x14: 00000000000009f8 [10919.629874] x13: 00000000000009f8 x12: 0000000000000018 [10919.635170] x11: 0000000000000000 x10: 0000000000000000 [10919.640467] x9 : fffffe00108cd168 x8 : 0000000000000000 [10919.645763] x7 : 0000000000000020 x6 : 0000000000000001 [10919.651059] x5 : 0000000000000002 x4 : 0000000000000001 [10919.656356] x3 : 0000000000000000 x2 : 0000000000000000 [10919.661652] x1 : fffffe836eb40000 x0 : 0000000000000000 [10919.666949] Call trace: [10919.669382] etm_event_start+0xf8/0x100 [10919.673203] etm_event_add+0x40/0x60 [10919.676765] event_sched_in.isra.134+0xcc/0x210 [10919.681281] merge_sched_in+0xb0/0x2a8 [10919.685017] visit_groups_merge.constprop.140+0x15c/0x4b8 [10919.690400] ctx_sched_in+0x15c/0x170 [10919.694048] perf_event_sched_in+0x6c/0xa0 [10919.698130] ctx_resched+0x60/0xa0 [10919.701517] perf_event_exec+0x288/0x2f0 [10919.705425] begin_new_exec+0x4c8/0xf58 [10919.709247] load_elf_binary+0x66c/0xf30 [10919.713155] exec_binprm+0x15c/0x450 [10919.716716] __do_execve_file+0x508/0x748 [10919.720711] __arm64_sys_execve+0x40/0x50 [10919.724707] do_el0_svc+0xf4/0x1b8 [10919.728095] el0_sync_handler+0xf8/0x124 [10919.732003] el0_sync+0x140/0x180 Even though we don't support using separate sinks for the ETMs yet (e.g, for 1:1 configurations), we should at least honor the user's choice and handle the limitations gracefully, by simply skipping the tracing on ETMs which can't reach the requested sink. Fixes: f9d81a657bb8 ("coresight: perf: Allow tracing on hotplugged CPUs") Cc: Mathieu Poirier Cc: Mike Leach Reported-by: Jeremy Linton Tested-by: Jeremy Linton Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-11-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 984f37efa3857dcefa649fbdf64abb94591935c3 Author: Tingwei Zhang Date: Wed Sep 16 13:17:30 2020 -0600 coresight: cti: Write regsiters directly in cti_enable_hw() Deadlock as below is triggered by one CPU holds drvdata->spinlock and calls cti_enable_hw(). Smp_call_function_single() is called in cti_enable_hw() and tries to let another CPU write CTI registers. That CPU is trying to get drvdata->spinlock in cti_cpu_pm_notify() and doesn't response to IPI from smp_call_function_single(). [ 988.335937] CPU: 6 PID: 10258 Comm: sh Tainted: G W L 5.8.0-rc6-mainline-16783-gc38daa79b26b-dirty #1 [ 988.346364] Hardware name: Thundercomm Dragonboard 845c (DT) [ 988.352073] pstate: 20400005 (nzCv daif +PAN -UAO BTYPE=--) [ 988.357689] pc : smp_call_function_single+0x158/0x1b8 [ 988.362782] lr : smp_call_function_single+0x124/0x1b8 ... [ 988.451638] Call trace: [ 988.454119] smp_call_function_single+0x158/0x1b8 [ 988.458866] cti_enable+0xb4/0xf8 [coresight_cti] [ 988.463618] coresight_control_assoc_ectdev+0x6c/0x128 [coresight] [ 988.469855] coresight_enable+0x1f0/0x364 [coresight] [ 988.474957] enable_source_store+0x5c/0x9c [coresight] [ 988.480140] dev_attr_store+0x14/0x28 [ 988.483839] sysfs_kf_write+0x38/0x4c [ 988.487532] kernfs_fop_write+0x1c0/0x2b0 [ 988.491585] vfs_write+0xfc/0x300 [ 988.494931] ksys_write+0x78/0xe0 [ 988.498283] __arm64_sys_write+0x18/0x20 [ 988.502240] el0_svc_common+0x98/0x160 [ 988.506024] do_el0_svc+0x78/0x80 [ 988.509377] el0_sync_handler+0xd4/0x270 [ 988.513337] el0_sync+0x164/0x180 This change write CTI registers directly in cti_enable_hw(). Config->hw_powered has been checked to be true with spinlock holded. CTI is powered and can be programmed until spinlock is released. Fixes: 6a0953ce7de9 ("coresight: cti: Add CPU idle pm notifer to CTI devices") Signed-off-by: Tingwei Zhang [Re-ordered variable declaration] Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-10-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4020fc8d4658dc1dbc27c5644bcb6254caa05e5e Author: Jonathan Zhou Date: Wed Sep 16 13:17:29 2020 -0600 coresight: etm4x: Fix issues within reset interface of sysfs The member @nr_addr_cmp is not a bool value, using operator '>' instead to avoid unexpected failure. Fixes: a77de2637c9e ("coresight: etm4x: moving sysFS entries to a dedicated file") Cc: Mathieu Poirier Cc: Suzuki K Poulose Cc: Mike Leach Cc: Shaokun Zhang Signed-off-by: Jonathan Zhou Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-9-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 096dcfb9cd6fefa7c03884b50c247593dc5f7dd3 Author: Mike Leach Date: Wed Sep 16 13:17:28 2020 -0600 coresight: etm4x: Ensure default perf settings filter user/kernel Moving from using an address filter to trace the default "all addresses" range to no filtering to acheive the same result, has caused the perf filtering of kernel/user address spaces from not working unless an explicit address filter was used. This is due to the original code using a side-effect of the address filtering rather than setting the global TRCVICTLR exception level filtering. The use of the mode sysfs file is also similarly affected. A helper function is added to fix both instances. Fixes: ae2041510d5d ("coresight: etmv4: Update default filter and initialisation") Reported-by: Leo Yan Tested-by: Leo Yan Reviewed-by: Leo Yan Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-8-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6e8836c6df5327bdb24211424f1ad1411d1ed64a Author: Tingwei Zhang Date: Wed Sep 16 13:17:27 2020 -0600 coresight: cti: remove pm_runtime_get_sync() from CPU hotplug Below BUG is triggered by call pm_runtime_get_sync() in cti_cpuhp_enable_hw(). It's in CPU hotplug callback with interrupt disabled. Pm_runtime_get_sync() calls clock driver to enable clock which could sleep. Remove pm_runtime_get_sync() in cti_cpuhp_enable_hw() since pm_runtime_get_sync() is called in cti_enabld and pm_runtime_put() is called in cti_disabled. No need to increase pm count when CPU gets online since it's not decreased when CPU is offline. [ 105.800279] BUG: scheduling while atomic: swapper/1/0/0x00000002 [ 105.800290] Modules linked in: [ 105.800327] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G W 5.9.0-rc1-gff1304be0a05-dirty #21 [ 105.800337] Hardware name: Thundercomm Dragonboard 845c (DT) [ 105.800353] Call trace: [ 105.800414] dump_backtrace+0x0/0x1d4 [ 105.800439] show_stack+0x14/0x1c [ 105.800462] dump_stack+0xc0/0x100 [ 105.800490] __schedule_bug+0x58/0x74 [ 105.800523] __schedule+0x590/0x65c [ 105.800538] schedule+0x78/0x10c [ 105.800553] schedule_timeout+0x188/0x250 [ 105.800585] qmp_send.constprop.10+0x12c/0x1b0 [ 105.800599] qmp_qdss_clk_prepare+0x18/0x20 [ 105.800622] clk_core_prepare+0x48/0xd4 [ 105.800639] clk_prepare+0x20/0x34 [ 105.800663] amba_pm_runtime_resume+0x54/0x90 [ 105.800695] __rpm_callback+0xdc/0x138 [ 105.800709] rpm_callback+0x24/0x78 [ 105.800724] rpm_resume+0x328/0x47c [ 105.800739] __pm_runtime_resume+0x50/0x74 [ 105.800768] cti_starting_cpu+0x40/0xa4 [ 105.800795] cpuhp_invoke_callback+0x84/0x1e0 [ 105.800814] notify_cpu_starting+0x9c/0xb8 [ 105.800834] secondary_start_kernel+0xd8/0x164 [ 105.800933] CPU1: Booted secondary processor 0x0000000100 [0x517f803c] Fixes: e9b880581d55 ("coresight: cti: Add CPU Hotplug handling to CTI driver") Reviewed-by: Mike Leach Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-7-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0dee28268ddbe53a981d4d87faf5dc0f1700e698 Author: Tingwei Zhang Date: Wed Sep 16 13:17:26 2020 -0600 coresight: cti: disclaim device only when it's claimed Coresight_claim_device() is called in cti_starting_cpu() only when CTI is enabled while coresight_disclaim_device() is called uncontionally in cti_dying_cpu(). This triggered below WARNING. Only call disclaim device when CTI device is enabled to fix it. [ 75.989643] WARNING: CPU: 1 PID: 14 at kernel/drivers/hwtracing/coresight/coresight.c:209 coresight_disclaim_device_unlocked+0x10/0x24 [ 75.989697] CPU: 1 PID: 14 Comm: migration/1 Not tainted 5.9.0-rc1-gff1304be0a05-dirty #21 [ 75.989709] Hardware name: Thundercomm Dragonboard 845c (DT) [ 75.989737] pstate: 80c00085 (Nzcv daIf +PAN +UAO BTYPE=--) [ 75.989758] pc : coresight_disclaim_device_unlocked+0x10/0x24 [ 75.989775] lr : coresight_disclaim_device+0x24/0x38 [ 75.989783] sp : ffff800011cd3c90 . [ 75.990018] Call trace: [ 75.990041] coresight_disclaim_device_unlocked+0x10/0x24 [ 75.990066] cti_dying_cpu+0x34/0x4c [ 75.990101] cpuhp_invoke_callback+0x84/0x1e0 [ 75.990121] take_cpu_down+0x90/0xe0 [ 75.990154] multi_cpu_stop+0x134/0x160 [ 75.990171] cpu_stopper_thread+0xb0/0x13c [ 75.990196] smpboot_thread_fn+0x1c4/0x270 [ 75.990222] kthread+0x128/0x154 [ 75.990251] ret_from_fork+0x10/0x18 Fixes: e9b880581d55 ("coresight: cti: Add CPU Hotplug handling to CTI driver") Reviewed-by: Mike Leach Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-6-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 447a612ea474d71d724504163426c5834a63022a Author: Qi Liu Date: Wed Sep 16 13:17:25 2020 -0600 coresight: etm4x: Add Support for HiSilicon ETM device Add ETMv4 periperhal ID for HiSilicon Hip08 and Hip09 platform. Hip08 contains ETMv4.2 device and Hip09 contains ETMv4.5 device. Acked-by: Suzuki K Poulose Signed-off-by: Qi Liu Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-5-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9554c3551ed35d79b029e5e69383ae33117d9765 Author: Mian Yousaf Kaukab Date: Wed Sep 16 13:17:24 2020 -0600 coresight: fix offset by one error in counting ports Since port-numbers start from 0, add 1 to port-number to get the port count. Fix following crash when Coresight is enabled on ACPI based systems: [ 61.061736] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 ... [ 61.135494] pc : acpi_coresight_parse_graph+0x1c4/0x37c [ 61.140705] lr : acpi_coresight_parse_graph+0x160/0x37c [ 61.145915] sp : ffff800012f4ba40 [ 61.145917] x29: ffff800012f4ba40 x28: ffff00becce62f98 [ 61.159896] x27: 0000000000000005 x26: ffff00becd8a7c88 [ 61.165195] x25: ffff00becd8a7d88 x24: ffff00becce62f80 [ 61.170492] x23: ffff800011ef99c0 x22: ffff009efb8bc010 [ 61.175790] x21: 0000000000000018 x20: 0000000000000005 [ 61.181087] x19: ffff00becce62e80 x18: 0000000000000020 [ 61.186385] x17: 0000000000000001 x16: 00000000000002a8 [ 61.191682] x15: ffff000838648550 x14: ffffffffffffffff [ 61.196980] x13: 0000000000000000 x12: ffff00becce62d87 [ 61.202277] x11: 00000000ffffff76 x10: 000000000000002e [ 61.207575] x9 : ffff8000107e1a68 x8 : ffff00becce63000 [ 61.212873] x7 : 0000000000000018 x6 : 000000000000003f [ 61.218170] x5 : 0000000000000000 x4 : 0000000000000000 [ 61.223467] x3 : 0000000000000000 x2 : 0000000000000000 [ 61.228764] x1 : ffff00becce62f80 x0 : 0000000000000000 [ 61.234062] Call trace: [ 61.236497] acpi_coresight_parse_graph+0x1c4/0x37c [ 61.241361] coresight_get_platform_data+0xdc/0x130 [ 61.246225] tmc_probe+0x138/0x2dc [ 61.246227] amba_probe+0xdc/0x220 [ 61.255779] really_probe+0xe8/0x49c [ 61.255781] driver_probe_device+0xec/0x140 [ 61.255782] device_driver_attach+0xc8/0xd0 [ 61.255785] __driver_attach+0xac/0x180 [ 61.265857] bus_for_each_dev+0x78/0xcc [ 61.265859] driver_attach+0x2c/0x40 [ 61.265861] bus_add_driver+0x150/0x244 [ 61.265863] driver_register+0x80/0x13c [ 61.273591] amba_driver_register+0x60/0x70 [ 61.273594] tmc_driver_init+0x20/0x2c [ 61.281582] do_one_initcall+0x50/0x230 [ 61.281585] do_initcalls+0x104/0x144 [ 61.291831] kernel_init_freeable+0x168/0x1dc [ 61.291834] kernel_init+0x1c/0x120 [ 61.299215] ret_from_fork+0x10/0x18 [ 61.299219] Code: b9400022 f9400660 9b277c42 8b020000 (f9400404) [ 61.307381] ---[ end trace 63c6c3d7ec6a9b7c ]--- [ 61.315225] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Fixes: d375b356e687 ("coresight: Fix support for sparsely populated ports") Reported-by: Ruediger Oertel Tested-by: Jeremy Linton Reviewed-by: Suzuki K Poulose Reviewed-by: Jeremy Linton Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-4-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4af8b3d3eb5032fe6f4a8104c48c176bf68a6946 Author: Tingwei Zhang Date: Wed Sep 16 13:17:23 2020 -0600 coresight: stm: Support marked packet STP_PACKET_MARKED is not supported by STM currently. Add STM_FLAG_MARKED to support marked packet in STM. Signed-off-by: Tingwei Zhang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2d1a8bfb61ec0177343e99ebd745e3e4ceb0d0d5 Author: Sai Prakash Ranjan Date: Wed Sep 16 13:17:22 2020 -0600 coresight: etm4x: Fix etm4_count race by moving cpuhp callbacks to init etm4_count keeps track of number of ETMv4 registered and on some systems, a race is observed on etm4_count variable which can lead to multiple calls to cpuhp_setup_state_nocalls_cpuslocked(). This function internally calls cpuhp_store_callbacks() which prevents multiple registrations of callbacks for a given state and due to this race, it returns -EBUSY leading to ETM probe failures like below. coresight-etm4x: probe of 7040000.etm failed with error -16 This race can easily be triggered with async probe by setting probe type as PROBE_PREFER_ASYNCHRONOUS and with ETM power management property "arm,coresight-loses-context-with-cpu". Prevent this race by moving cpuhp callbacks to etm driver init since the cpuhp callbacks doesn't have to depend on the etm4_count and can be once setup during driver init. Similarly we move cpu_pm notifier registration to driver init and completely remove etm4_count usage. Also now we can use non cpuslocked version of cpuhp callbacks with this movement. Fixes: 9b6a3f3633a5 ("coresight: etmv4: Fix CPU power management setup in probe() function") Fixes: 58eb457be028 ("hwtracing/coresight-etm4x: Convert to hotplug state machine") Suggested-by: Suzuki K Poulose Tested-by: Stephen Boyd Reviewed-by: Stephen Boyd Reviewed-by: Suzuki K Poulose Signed-off-by: Sai Prakash Ranjan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200916191737.4001561-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit e0d072782c734d27f5af062c62266f2598f68542 Author: Jim Quinlan Date: Thu Sep 17 18:43:40 2020 +0200 dma-mapping: introduce DMA range map, supplanting dma_pfn_offset The new field 'dma_range_map' in struct device is used to facilitate the use of single or multiple offsets between mapping regions of cpu addrs and dma addrs. It subsumes the role of "dev->dma_pfn_offset" which was only capable of holding a single uniform offset and had no region bounds checking. The function of_dma_get_range() has been modified so that it takes a single argument -- the device node -- and returns a map, NULL, or an error code. The map is an array that holds the information regarding the DMA regions. Each range entry contains the address offset, the cpu_start address, the dma_start address, and the size of the region. of_dma_configure() is the typical manner to set range offsets but there are a number of ad hoc assignments to "dev->dma_pfn_offset" in the kernel driver code. These cases now invoke the function dma_direct_set_offset(dev, cpu_addr, dma_addr, size). Signed-off-by: Jim Quinlan [hch: various interface cleanups] Signed-off-by: Christoph Hellwig Reviewed-by: Mathieu Poirier Tested-by: Mathieu Poirier Tested-by: Nathan Chancellor commit 6eb0233ec2d0df288fe8515d5b0b2b15562e05bb Author: Christoph Hellwig Date: Thu Sep 10 18:03:49 2020 +0200 usb: don't inherity DMA properties for USB devices As the comment in usb_alloc_dev correctly states, drivers can't use the DMA API on usb device, and at least calling dma_set_mask on them is highly dangerous. Unlike what the comment states upper level drivers also can't really use the presence of a dma mask to check for DMA support, as the dma_mask is set by default for most busses. Setting the dma_mask comes from "[PATCH] usbcore dma updates (and doc)" in BitKeeper times, as it seems like it was primarily for setting the NETIF_F_HIGHDMA flag in USB drivers, something that has long been fixed up since. Setting the dma_pfn_offset comes from commit b44bbc46a8bb ("usb: core: setup dma_pfn_offset for USB devices and, interfaces"), which worked around the fact that the scsi_calculate_bounce_limits functions wasn't going through the proper driver interface to query DMA information, but that function was removed in commit 21e07dba9fb1 ("scsi: reduce use of block bounce buffers") years ago. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman commit cf141ae989e2ff119cd320326da5923b480d1641 Author: Christoph Hellwig Date: Tue Sep 8 19:24:00 2020 +0200 ARM/keystone: move the DMA offset handling under ifdef CONFIG_ARM_LPAE The DMA offset notifier can only be used if PHYS_OFFSET is at least KEYSTONE_HIGH_PHYS_START, which can't be represented by a 32-bit phys_addr_t. Currently the code compiles fine despite that, a pending change to the DMA offset handling would create a compiler warning for this case. Add an ifdef to not compile the code except for LPAE configs. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 3799e402a4f0d69690e0838c4a68cab26d06283a Author: Christoph Hellwig Date: Mon Sep 14 08:37:11 2020 +0200 ARM/dma-mapping: move various helpers from dma-mapping.h to dma-direct.h Move the helpers to translate to and from direct mapping DMA addresses to dma-direct.h. This not only is the most logical place, but the new placement also avoids dependency loops with pending commits. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 002a26fb55282f7832e132d046d22e2c55f47103 Author: Christoph Hellwig Date: Tue Sep 8 09:02:56 2020 +0200 ARM/dma-mapping: remove dma_to_virt dma_to_virt is entirely unused, remove it. Signed-off-by: Christoph Hellwig commit f982438e82bbecb32200d5f22f405ec64f1fdd1b Author: Christoph Hellwig Date: Fri Sep 11 08:26:37 2020 +0200 ARM/dma-mapping: remove a __arch_page_to_dma #error The __arch_page_to_dma hook is long gone. Signed-off-by: Christoph Hellwig commit f959dcd6ddfd29235030e8026471ac1b022ad2b0 Author: Thomas Tai Date: Thu Sep 17 18:43:03 2020 +0200 dma-direct: Fix potential NULL pointer dereference When booting the kernel v5.9-rc4 on a VM, the kernel would panic when printing a warning message in swiotlb_map(). The dev->dma_mask must not be a NULL pointer when calling the dma mapping layer. A NULL pointer check can potentially avoid the panic. Signed-off-by: Thomas Tai Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Christoph Hellwig commit 41cfc734abfdb257dc7b3defcf921e7ee0ae6023 Merge: e6937b6d1af73 a57d4e8730c1a Author: Mark Brown Date: Thu Sep 17 17:40:16 2020 +0100 Merge series "ASoC: fsl_sai: update the register list" from Shengjiu Wang : As sai ip is upgraded, so update sai register list. Shengjiu Wang (3): ASoC: fsl_sai: Add new added registers and new bit definition ASoC: fsl_sai: Add fsl_sai_check_version function ASoC: fsl_sai: Set MCLK input or output direction changes in v2: - update commit message for first commit - Add acked-by Nicolin sound/soc/fsl/fsl_sai.c | 77 ++++++++++++++++++++++++++++++++++++ sound/soc/fsl/fsl_sai.h | 87 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+) -- 2.27.0 commit e6937b6d1af73a9b5643f83433062f4594a65130 Merge: 4c3021f0af2cc 776100a4ce6da Author: Mark Brown Date: Thu Sep 17 17:40:15 2020 +0100 Merge series "ASoC: SOF: small fixes for 5.10" from Kai Vehmanen : Series that adds debug support for IMX platforms, more details to FW version information, adds missing -EACCESS handling to pm_runtime_get_sync() calls and a set of minor cosmetic, trace verbosity and coding style issues. Guennadi Liakhovetski (3): ASoC: SOF: (cosmetic) remove redundant "ret" variable uses ASoC: SOF: remove several superfluous type-casts ASoC: SOF: fix range checks Iulian Olaru (1): ASoC: SOF: imx: Add debug support for imx platforms Karol Trzcinski (1): ASoC: SOF: Add `src_hash` to `sof_ipc_fw_version` structure Pierre-Louis Bossart (3): ASoC: SOF: debug: update test for pm_runtime_get_sync() ASoC: SOF: control: update test for pm_runtime_get_sync() ASoC: SOF: Intel: hda: reduce verbosity of boot error logs include/sound/sof/info.h | 4 +- sound/soc/sof/control.c | 62 +++++++++++++-------------- sound/soc/sof/debug.c | 2 +- sound/soc/sof/imx/Kconfig | 8 ++++ sound/soc/sof/imx/Makefile | 3 ++ sound/soc/sof/imx/imx-common.c | 72 ++++++++++++++++++++++++++++++++ sound/soc/sof/imx/imx-common.h | 16 +++++++ sound/soc/sof/imx/imx8.c | 23 +++++++++- sound/soc/sof/imx/imx8m.c | 17 +++++++- sound/soc/sof/intel/hda-loader.c | 16 +++---- sound/soc/sof/intel/hda.c | 12 ++++-- sound/soc/sof/intel/hda.h | 2 + sound/soc/sof/sof-audio.c | 6 +-- sound/soc/sof/sof-priv.h | 8 ++++ sound/soc/sof/topology.c | 44 ++++++++++--------- 15 files changed, 226 insertions(+), 69 deletions(-) create mode 100644 sound/soc/sof/imx/imx-common.c create mode 100644 sound/soc/sof/imx/imx-common.h -- 2.27.0 commit 4c3021f0af2cc517b580bd4e1ff89495f3798080 Merge: 337d348b8399a 520a1c396d196 Author: Mark Brown Date: Thu Sep 17 17:40:14 2020 +0100 Merge series "ASoC: q6afe: add clocks support" from Srinivas Kandagatla : q6afe already exposes clocks using apis, but not as proper clock controller driver. This patch puts those clocks in to a proper clock controller so that other drivers that depend on those clocks can be properly expressed. Srinivas Kandagatla (2): ASoC: q6afe: dt-bindings: add q6afe clock bindings ASoC: q6afe-clocks: add q6afe clock controller .../devicetree/bindings/sound/qcom,q6afe.txt | 23 ++ include/dt-bindings/sound/qcom,q6afe.h | 74 ++++- sound/soc/qcom/Kconfig | 4 + sound/soc/qcom/qdsp6/Makefile | 1 + sound/soc/qcom/qdsp6/q6afe-clocks.c | 270 ++++++++++++++++++ 5 files changed, 371 insertions(+), 1 deletion(-) create mode 100644 sound/soc/qcom/qdsp6/q6afe-clocks.c -- 2.21.0 commit 337d348b8399adf1a19c8d65f6407939b4743fc9 Author: Shengjiu Wang Date: Tue Sep 15 21:57:00 2020 +0800 ASoC: ak4458: Add DSD support for ak4458 and ak4497 Ak4458 can't support DSD512 format, but ak4497 can, so add a new enum variable (enum ak4458_type) in ak4458_drvdata to distinguish these two platforms. Ak4497 has two kinds of DSD input pin, it can be selected by the dsd-path property from DT. In hw_params(), bit clock is calculated according to different DSD format (DSD64, DSD128, DSD256, DSD512), then registers are configured. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1600178220-28973-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit fc50e26de9677206ae43a261ddc4181ed7e4af78 Author: Shengjiu Wang Date: Tue Sep 15 21:56:59 2020 +0800 ASoC: dt-bindings: ak4458: Add dsd-path property Add "dsd-path" property, which is used for ak4497 codec to select the DSD input pin. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1600178220-28973-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 38b9b7ca6f08489f3065e081e71c743775ed50c8 Author: Dan Murphy Date: Tue Sep 15 14:06:03 2020 -0500 ASoC: tlv320adcx140: Add ASI Tx drive Add a property to indicate if the device is to go into a High-z state on the Tx ASI output pins when the device is idle. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200915190606.1744-3-dmurphy@ti.com Signed-off-by: Mark Brown commit 42d5031d3ee858bc14df704439eefdbf38b8f628 Author: Dan Murphy Date: Tue Sep 15 14:06:04 2020 -0500 ASoC: tlv320adcx140: Add the config to configure Tx ASI output Add code to allow the ASI Tx output to be placed into High-z mode during unused ASI cycles. This allows for other devices that may be on the bus to drive the ASI out. By default the 320adcx140 sends 0's for unused cycles. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200915190606.1744-4-dmurphy@ti.com Signed-off-by: Mark Brown commit dcde34c47d8f7befc647fda65e8efa8cc0e795ca Author: Douglas Anderson Date: Wed Sep 16 11:15:55 2020 -0700 ASoC: qcom: lpass-sc7180: Add MODULE_DEVICE_TABLE The lpass-sc7180 driver can be built as a module but is lacking a MODULE_DEVICE_TABLE. This means it won't auto-load. Fix this oversight. Fixes: 24caf8d9eb10 ("ASoC: qcom: lpass-sc7180: Add platform driver for lpass audio") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200916111545.1.I4c3758817d94c433bafeac344a395e21ea6657e3@changeid Signed-off-by: Mark Brown commit 30ee3738f849b3f4af623c20adec73cdc4573a2e Author: Rander Wang Date: Thu Sep 17 13:36:09 2020 +0300 ASoC: SOF: Intel: Add support for tgl-h SOF will support tgl-h and tgl-lp in different FW binaries due to hardware difference, so create another dev_desc entry with FW name of sof-tgl-h.ri and dsp_desc named tglh_chip_info for tgl-h. Fixes: c8d2e2bfaeffa ("ASoC: SOF: Intel: add PCI IDs for ICL-H and TGL-H") Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200917103609.2559916-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit df44bc16e616809172cda90fd816596ded4ea219 Author: Matthias Schiffer Date: Wed Sep 2 15:30:43 2020 +0200 ASoC: codec: tlv320aic32x4: do software reset before clock registration To avoid the actual PLL settings to differ from the state expected by the clock driver, the codec should only be fully reset before the clocks are registered. But we also need to ensure that the software reset happens at all before clock registration, as not all boards have a reset GPIO. Move the software reset from aic32x4_component_probe() to aic32x4_probe() and reorder the reset and registration sequence: 1. Reset via GPIO (if available) 2. Reset via software 3. Register component 4. Register clocks Note that aic32x4_component_probe() is only called after aic32x4_probe() has finished, so the reset in aic32x4_component_probe() was happening too late. Signed-off-by: Matthias Schiffer Link: https://lore.kernel.org/r/20200902133043.19504-2-matthias.schiffer@ew.tq-group.com Signed-off-by: Mark Brown commit 251e5c8694db01cd10828e39c07f90d958d7b303 Author: Matthias Schiffer Date: Wed Sep 2 15:30:42 2020 +0200 ASoC: codec: tlv320aic32x4: fix missing aic32x4_disable_regulators() in error path The regulators need to be disabled in the aic32x4_register_clocks() failure case as well. Fixes: 9d4befff5a95 ("ASoC: codec: tlv3204: Moving GPIO reset and add ADC reset") Signed-off-by: Matthias Schiffer Link: https://lore.kernel.org/r/20200902133043.19504-1-matthias.schiffer@ew.tq-group.com Signed-off-by: Mark Brown commit abe42b09118914f01246f880dd9029150fdc727c Author: Krzysztof Kozlowski Date: Tue Sep 8 16:59:54 2020 +0200 ASoC: dt-bindings: Correct interrupt flags in examples GPIO_ACTIVE_x flags are not correct in the context of interrupt flags. These are simple defines so they could be used in DTS but they will not have the same meaning: 1. GPIO_ACTIVE_HIGH = 0 = IRQ_TYPE_NONE 2. GPIO_ACTIVE_LOW = 1 = IRQ_TYPE_EDGE_RISING Correct the interrupt flags, assuming the author of the code wanted some logical behavior behind the name "ACTIVE_xxx", this is: ACTIVE_HIGH => IRQ_TYPE_LEVEL_HIGH Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200908145954.4629-1-krzk@kernel.org Signed-off-by: Mark Brown commit cac17861c950832a60d405f597c2acc2f40a0136 Author: Krzysztof Kozlowski Date: Wed Sep 2 18:00:25 2020 +0200 ASoC: dt-bindings: aries-wm8994: Match compatibles with enum The common pattern for enumerating compatibles is enum, not oneOf. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200902160025.20922-1-krzk@kernel.org Signed-off-by: Mark Brown commit 96820e359e25c7a61c4c8b994745aaa9d9db6a5e Author: Martin Cerveny Date: Mon Sep 7 18:24:58 2020 +0200 ARM: dts: sun8i: v3s: Enable crypto engine V3s contains crypto engine that is compatible with A33. Add device tree node. Signed-off-by: Martin Cerveny Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200907162458.23730-3-m.cerveny@computer.org commit b7158866c3b8aaff16fbea1a35cbbb4ab068ea3e Author: Martin Cerveny Date: Mon Sep 7 18:24:57 2020 +0200 dt-bindings: crypto: Add compatible for V3s Allwinner V3s has crypto engine similar to that in A33. So add compatible. Signed-off-by: Martin Cerveny Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200907162458.23730-2-m.cerveny@computer.org commit 884d1a334ae8130fabede56f59b224619ad6bca4 Author: Corentin Labbe Date: Mon Sep 7 19:54:37 2020 +0200 dt-bindings: crypto: Specify that allwinner, sun8i-a33-crypto needs reset When adding allwinner,sun8i-a33-crypto, I forgot to add that it needs reset. Furthermore, there are no need to use items to list only one compatible in compatible list. Fixes: f81547ba7a98 ("dt-bindings: crypto: add new compatible for A33 SS") Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200907175437.4464-1-clabbe.montjoie@gmail.com commit db9c6ad2e88603f5c58d53894ffefcabd55ce3d2 Author: Samuel Holland Date: Sat Jul 25 20:25:57 2020 -0500 arm64: dts: allwinner: a64: Update the audio codec compatible The audio codec in the A64 has some differences from the A33 codec, so it needs its own compatible. Since the two codecs are similar, the A33 codec compatible is kept as a fallback. Using the correct compatible fixes a channel inversion issue and cleans up some DAPM widgets that are no longer used. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200726012557.38282-8-samuel@sholland.org commit 631e6a353060981675cc15d71417e3379fb414e2 Author: Samuel Holland Date: Sat Jul 25 20:25:56 2020 -0500 arm64: dts: allwinner: a64: Update codec widget names The sun8i-codec driver introduced a new set of DAPM widgets that more accurately describe the hardware topology. Update the various device trees to use the new widget names. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200726012557.38282-7-samuel@sholland.org commit 44967e8182e6265158d769f56993870aa08e800d Author: Samuel Holland Date: Sat Jul 25 20:25:55 2020 -0500 ARM: dts: sun8i: a33: Update codec widget names The sun8i-codec driver introduced a new set of DAPM widgets that more accurately describe the hardware topology. Update the various device trees to use the new widget names. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200726012557.38282-6-samuel@sholland.org commit a770df83d85eca56c7e842e9ecbdc5fe91701958 Author: Jernej Skrabec Date: Tue Aug 25 19:35:23 2020 +0200 ARM: dts: sun8i: r40: Add video engine node Allwinner R40 SoC has a video engine. Add a node for it. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200825173523.1289379-6-jernej.skrabec@siol.net commit e27014bdb47eb435f78573685f4196c07329f1f7 Author: Aharon Landau Date: Thu Sep 17 12:02:22 2020 +0300 RDMA/mlx5: Delete duplicated mlx5_ptys_width enum Combine two same enums to avoid duplication. Signed-off-by: Aharon Landau Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky commit 639bf4415cadff4c18e13aa5cb0dba2d443e3aa7 Author: Aharon Landau Date: Thu Sep 17 12:02:21 2020 +0300 net/mlx5: Refactor query port speed functions The functions mlx5_query_port_link_width_oper and mlx5_query_port_ib_proto_oper are always called together, so combine them to a new function called mlx5_query_port_oper to avoid duplication. And while the mlx5i_get_port_settings is the same as mlx5_query_port_oper therefore let's remove it. According to the IB spec link_width_oper and ib_proto_oper should be u16 and not as written u8, so perform casting as a preparation to cross-RDMA patch which will fix that type for all drivers in the RDMA subsystem. Fixes: ada68c31ba9c ("net/mlx5: Introduce a new header file for physical port functions") Signed-off-by: Aharon Landau Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky commit 0f1b550e29c1f9522f0a7a11ee2cf95d33a98d79 Author: Namhyung Kim Date: Thu Sep 17 15:02:18 2020 +0900 perf parse-event: Release cpu_map refcount if evsel alloc failed Signed-off-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200917060219.1287863-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5d680be3b014d5836ad6c2a8bdda70cce89dbfc8 Author: Namhyung Kim Date: Thu Sep 17 15:02:19 2020 +0900 perf parse-event: Fix cpu map refcounting Like evlist cpu map, evsel's cpu map should have a proper refcount. As it's created with a refcount, we don't need to get an extra count. Thanks to Arnaldo for the simpler suggestion. This, together with the following patch, fixes the following ASAN report: Direct leak of 840 byte(s) in 70 object(s) allocated from: #0 0x7fe36703f628 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x107628) #1 0x559fbbf611ca in cpu_map__trim_new /home/namhyung/project/linux/tools/lib/perf/cpumap.c:79 #2 0x559fbbf6229c in perf_cpu_map__new /home/namhyung/project/linux/tools/lib/perf/cpumap.c:237 #3 0x559fbbcc6c6d in __add_event util/parse-events.c:357 #4 0x559fbbcc6c6d in add_event_tool util/parse-events.c:408 #5 0x559fbbcc6c6d in parse_events_add_tool util/parse-events.c:1414 #6 0x559fbbd8474d in parse_events_parse util/parse-events.y:439 #7 0x559fbbcc95da in parse_events__scanner util/parse-events.c:2096 #8 0x559fbbcc95da in __parse_events util/parse-events.c:2141 #9 0x559fbbc2788b in check_parse_id tests/pmu-events.c:406 #10 0x559fbbc2788b in check_parse_id tests/pmu-events.c:393 #11 0x559fbbc2788b in check_parse_fake tests/pmu-events.c:436 #12 0x559fbbc2788b in metric_parse_fake tests/pmu-events.c:553 #13 0x559fbbc27e2d in test_parsing_fake tests/pmu-events.c:599 #14 0x559fbbc27e2d in test_parsing_fake tests/pmu-events.c:574 #15 0x559fbbc0109b in run_test tests/builtin-test.c:410 #16 0x559fbbc0109b in test_and_print tests/builtin-test.c:440 #17 0x559fbbc03e69 in __cmd_test tests/builtin-test.c:695 #18 0x559fbbc03e69 in cmd_test tests/builtin-test.c:807 #19 0x559fbbc691f4 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:312 #20 0x559fbbb071a8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:364 #21 0x559fbbb071a8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:408 #22 0x559fbbb071a8 in main /home/namhyung/project/linux/tools/perf/perf.c:538 #23 0x7fe366b68cc9 in __libc_start_main ../csu/libc-start.c:308 And I've failed which commit introduced this bug as the code was heavily changed since then. ;-/ Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200917060219.1287863-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c2ef3aa464a70f73f4fc763e6f54f689c2ee6d6a Author: David Heidelberg Date: Fri Aug 14 00:34:09 2020 +0300 ARM: tegra: nexus7: Add SMB347 battery charger SMB347 is a battery charger controller which is found on the Nexus 7 device. Signed-off-by: David Heidelberg Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit c82ef94b3a2105482deebc37156d682f194d067e Author: Dmitry Osipenko Date: Fri Aug 14 03:21:38 2020 +0300 ARM: tegra: nexus7: Add touchscreen Nexus 7 2012 has Elantech EKTF3624 touchscreen, this patch adds TS node to the device-tree. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 17110cbbef701b56136aabaaab5652b9ea4618a0 Author: Dmitry Osipenko Date: Sun Aug 23 17:47:25 2020 +0300 ARM: tegra: nexus7: Use PLLC for WiFi MMC clock parent The default parent for all MMCs is PLLP, which is running at 408 MHz on Tegra30 and 50 MHz clock can't be derived from PLLP. The maximum SDIO clock rate is 50 MHz, but this rate isn't achievable using PLLP. Let's switch the WiFi MMC clock parent to PLLC in order to get true 50 MHz. This patch doesn't fix any problems, it's just a minor improvement. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 98e710a01738cc99fce0830e4949710bb10fd4ee Author: Dmitry Osipenko Date: Sun Aug 23 17:47:24 2020 +0300 ARM: tegra: acer-a500: Use PLLC for WiFi MMC clock parent The default parent for all MMCs is PLLP, which is running at 216 MHz on Tegra20 and 50 MHz clock can't be derived from PLLP. The maximum SDIO clock rate is 50 MHz, but this rate isn't achievable using PLLP. Let's switch the WiFi MMC clock parent to PLLC in order to get true 50 MHz. This patch doesn't fix any problems, it's just a minor improvement. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit a252efadf3e7ffa8f5793cb431f35bb95bdc4795 Author: Dmitry Osipenko Date: Sun Aug 23 17:47:23 2020 +0300 ARM: tegra: acer-a500: Set WiFi MMC clock rate to 50 MHz Previously 50MHz clock rate didn't work because of the wrong PINCTRL configuration used for SDIO pins. Now the PINCTRL config is corrected and the MMC clock rate could be bumped safely to 50MHz, increasing WiFi TX throughput by 20 Mbit/s and allowing to hit the maximum 40 Mbit/s. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit eb885f5ef73b1716d34f872ca37ac0b1a6e8cf2e Author: Dmitry Osipenko Date: Sun Aug 23 17:47:22 2020 +0300 ARM: tegra: acer-a500: Correct PINCTRL configuration The low-power-mode drive was set to DIV_4 for some of PINCTRL groups, while these groups should use DIV_1. This patch fixes the wrong PINCTRL configurations and adds a full drive-setup for the changed configs, just for completeness since the added values match the default configuration. Now WiFi SDIO communication works properly using legacy signaling mode if SDIO BUS clocked at 50MHz, which is a maximum SDIO clock rate on Tegra20. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 878fd50925f9e88b620d4a4a173647a487adcb42 Author: Dmitry Osipenko Date: Sun Sep 6 22:00:08 2020 +0300 ARM: tegra: acer-a500: Remove atmel,cfg_name property This property was supposed to be upstreamed, but it was NAKed recently in a favor to a better approach of firmware loading. It also turned out that the firmware loading isn't really necessary because it's stored in a non-volatile memory inside of the touchscreen controller and previously the FW loading was needed in order to get touchscreen working, but it actually was a TS driver problem which is resolved now. Hence remove the unsupported property. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 21806bb0a1dc742c5d2b19edcd7b3410d67ec895 Author: Dmitry Osipenko Date: Sun Sep 6 22:00:07 2020 +0300 ARM: tegra: acer-a500: Add aliases for MMC MMC core now supports binding to a specific ID, which is very handy for embedded devices, like Acer A500, because MMC ID may change depending on kernel version or configuration which affects MMC driver probe order. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 110a5803424255b876e25b28093cd13d86d0ccd2 Author: Dmitry Osipenko Date: Sun Sep 6 22:00:06 2020 +0300 ARM: tegra: nexus7: Add aliases for MMC MMC core now supports binding to a specific ID, which is very handy for embedded devices, like Nexus 7, because MMC ID may change depending on kernel version or configuration which affects MMC driver probe order. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 6c3550e91a7862f1a05bcd10e6e3b80016732d85 Merge: 9123e3a74ec7b e9b641030d916 Author: Thierry Reding Date: Thu Sep 17 18:09:25 2020 +0200 Merge branch 'for-5.10/dt-bindings' into for-5.10/arm/dt commit e9b641030d916b60bfbca8fd081820a8757bfc16 Author: David Heidelberg Date: Fri Aug 14 00:34:01 2020 +0300 dt-bindings: power: supply: Add device-tree binding for Summit SMB3xx Summit SMB3xx series is a Programmable Switching Li+ Battery Charger. This patch adds device-tree binding for Summit SMB345, SMB347 and SMB358 chargers. Signed-off-by: David Heidelberg Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit eff65bd43958fbb9a2912a1e2069e32057d2accc Merge: 7e62dd911ace4 1b57d91b969cd Author: Marc Zyngier Date: Thu Sep 17 16:50:02 2020 +0100 Merge remote-tracking branch 'origin/irq/gic-retrigger' into irq/irqchip-next Signed-off-by: Marc Zyngier commit ac82240510b319d7d85a4da34816a2a14c530507 Author: Thierry Reding Date: Thu Sep 17 12:07:44 2020 +0200 dt-bindings: tegra: pmc: Add Tegra234 support The PMC found on Tegra234 is mostly similar to the one on Tegra194 but supports slightly different I/O pads and wake events. Signed-off-by: Thierry Reding commit ba81973044b4cb1fd299be3651e4f6b323e22e71 Author: Thierry Reding Date: Thu Sep 17 12:07:43 2020 +0200 dt-bindings: fuse: tegra: Add Tegra234 support The Tegra234 FUSE block is very similar to that on prior chips but not completely compatible. Document the new compatible string. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 97cb586ad2437a540c730d710391468368dc14c3 Author: Thierry Reding Date: Thu Sep 17 12:07:42 2020 +0200 dt-bindings: tegra: Add Tegra234 VDK compatible The NVIDIA Tegra234 VDK is a simulation platform for the Orin SoC. It supports a subset of the peripherals that will be available in the final chip and serves as a bootstrapping platform. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 7e62dd911ace44ff50d7891bc7821888eabfd61d Merge: 696966ec06edc 8594c3b85171b Author: Marc Zyngier Date: Thu Sep 17 16:47:27 2020 +0100 Merge remote-tracking branch 'origin/irq/ipi-as-irq' into irq/irqchip-next Signed-off-by: Marc Zyngier commit 2778aca0b429dff1925c882da6ec4170ff25e971 Author: Thierry Reding Date: Thu Sep 17 12:07:41 2020 +0200 dt-bindings: misc: tegra186-misc: Add Tegra234 support The MISC block found on Tegra234 is mostly similar to the one on Tegra194 but supports slightly different register sets that make it incompatible. Signed-off-by: Thierry Reding commit 24989476352599c68e91eb601a6751fd250a458f Author: Thierry Reding Date: Thu Sep 17 12:07:40 2020 +0200 dt-bindings: misc: tegra186-misc: Add missing compatible string Add the missing compatible string for the Tegra194 MISC block. Signed-off-by: Thierry Reding commit f5ddee15086be2efaaa218aa5731f5afebf05835 Author: Thierry Reding Date: Thu Sep 17 12:07:39 2020 +0200 dt-bindings: misc: tegra-apbmisc: Add missing compatible strings The compatible string for the Tegra210 APBMISC block was missing from the bindings. Add it and while at it, rewrite the description of the compatible string to make it clearer. Signed-off-by: Thierry Reding commit 696966ec06edc8322c7abd002754a14b9cb44af4 Merge: bf476c601b0d3 336780590990e Author: Marc Zyngier Date: Thu Sep 17 16:46:45 2020 +0100 Merge remote-tracking branch 'origin/irq/gic-v3-nmi-ns' into irq/irqchip-next Signed-off-by: Marc Zyngier commit bf476c601b0d348bf3cf27d837663699d6ed88b0 Merge: cd4c3566f97da e0c45b107fc94 Author: Marc Zyngier Date: Thu Sep 17 16:45:54 2020 +0100 Merge remote-tracking branch 'origin/irq/dev_err_probe' into irq/irqchip-next Signed-off-by: Marc Zyngier commit cd4c3566f97daf30577a46eb6b0a0fb61fbccf23 Merge: 7e92dee60cba5 72d44c0cbc436 Author: Marc Zyngier Date: Thu Sep 17 16:45:43 2020 +0100 Merge remote-tracking branch 'origin/irq/misc-5.10' into irq/irqchip-next Signed-off-by: Marc Zyngier commit 2b9ee384b450d4b8b7a44806f382e43f61a47a4c Author: Jon Hunter Date: Wed Sep 16 10:49:52 2020 +0100 arm64: tegra: Populate EEPROMs for Jetson Xavier NX Populate the EEPROMs that are present on the Jetson Xavier NX developer platform. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit a4387f2973a0562c9432e79f3b7eb33de59ee045 Author: Jon Hunter Date: Wed Sep 16 10:49:51 2020 +0100 arm64: tegra: Add label properties for EEPROMs Populate the label property for the AT24 EEPROMs on the various Jetson platforms. Note that the name 'module' is used to identify the EEPROM on the processor module board and the name 'system' is used to identify the EEPROM on the main base board (which is sometimes referred to as the carrier board). Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 181567aa9f0d297804f1ea5d3ff4ba4518e05f2c Author: Ville Syrjälä Date: Fri Sep 4 14:53:54 2020 +0300 drm/i915: Do YCbCr 444->420 conversion via DP protocol converters For platforms that can't do native 4:2:0 outout we may still be able to do it by getting the DP->HDMI protocol converter to perform the 4:4:4->4:2:0 downsamling for us. In this case we have to configure our hardware to output YCbCr 4:4:4, which we've already hooked up so all we need to do is flip the switch. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-19-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit 2ef8d0f7de0ec0bc30c48e5f544a6082eb03e9f7 Author: Ville Syrjälä Date: Fri Sep 4 14:53:53 2020 +0300 drm/dp: Add helpers for DFP YCbCr 4:2:0 handling Add helpers to determine whether the DFP supports YCbCr 4:2:0 passthrough or YCbCr 4:4:4->4:2:0 conversion. v2: Add kdocs (Lyude) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-18-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit bc7ca6a647bf3c073a109d4ff0e8cad773a2f1d9 Author: Ville Syrjälä Date: Fri Sep 4 14:53:52 2020 +0300 drm/i915: DP->HDMI TMDS clock limits vs. deep color Account for the TMDS clock limits declared by the DFP when determining what color depth we're going to use. v2: Drop the reference to DP++ dongle since it's not handled here Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-17-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit 04e18e01b3c35dd4f598db4feccd51da643cdf1f Author: Ville Syrjälä Date: Fri Sep 4 14:53:51 2020 +0300 drm/i915: Extract intel_hdmi_has_audio() Pull the "do we want to enable audio?" computation into a small helper to make intel_hdmi_compute_config() less messy. Will make it easier to add more checks for this later (eg. we should actually be checking at the hblank is long enough for audio transmission). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-16-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit 4b3bb839873f9e8c3c7f6297274d48d50388c16b Author: Ville Syrjälä Date: Fri Sep 4 14:53:50 2020 +0300 drm/i915: Handle downstream facing ports w/o EDID Use drm_dp_downstream_mode() to get a suitable mode for downstream facing ports which don't have an EDID. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-15-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit 8594c3b85171b6f68e34e07b533ec2f1bf7fb065 Author: Marc Zyngier Date: Tue Sep 15 14:03:51 2020 +0100 irqchip/gic: Cleanup Franken-GIC handling Introduce a static key identifying Samsung's unique creation, allowing to replace the indirect call to compute the base addresses with a simple test on the static key. Faster, cheaper, negative diffstat. Tested-by: Marek Szyprowski Signed-off-by: Marc Zyngier commit c3330399931be38ce459e82bf7dea140338ae43f Author: Marc Zyngier Date: Mon Sep 14 17:21:16 2020 +0100 irqchip/bcm2836: Provide mask/unmask dummy methods for IPIs Although it doesn't seem possible to disable individual mailbox interrupts, we still need to provide some callbacks. Fixes: 09eb672ce4fb ("irqchip/bcm2836: Configure mailbox interrupts as standard interrupts") Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Marc Zyngier commit 5ebf353af22c89d18964bb3b877a95200dfe07b9 Author: Marc Zyngier Date: Tue Jun 23 21:15:00 2020 +0100 ARM: Remove custom IRQ stat accounting Let's switch the arm code to the core accounting, which already does everything we need. Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier commit 8aa837cb7a032884c787b15de81f7d9de8af0869 Author: Marc Zyngier Date: Mon Jun 22 22:15:54 2020 +0100 ARM: Kill __smp_cross_call and co The old IPI registration interface is now unused on arm, so let's get rid of it. Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier commit a263881525310e10ecd46ae8e8531ac9e968b1b4 Author: Marc Zyngier Date: Sat Jun 20 17:19:00 2020 +0100 arm64: Remove custom IRQ stat accounting Let's switch the arm64 code to the core accounting, which already does everything we need. Reviewed-by: Valentin Schneider Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier commit 5cebfd2d47c214f69d918e3d34ad183c061eddb2 Author: Marc Zyngier Date: Sat May 9 14:00:23 2020 +0100 arm64: Kill __smp_cross_call and co The old IPI registration interface is now unused on arm64, so let's get rid of it. Reviewed-by: Valentin Schneider Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier commit f02147dd02eb5fab31b55b73e7524f94b5f20324 Author: Marc Zyngier Date: Mon Jun 22 21:23:36 2020 +0100 irqchip/armada-370-xp: Configure IPIs as standard interrupts To introduce IPIs as standard interrupts to the Armada 370-XP driver, let's allocate a completely separate irqdomain and irqchip combo that lives parallel to the "standard" one. This effectively should be modelled as a chained interrupt controller, but the code is in such a state that it is pretty hard to shoehorn, as it would require the rewrite of the MSI layer as well. Signed-off-by: Marc Zyngier commit a2df12c5899e9bb181cb64385b04f2bc755780b6 Author: Marc Zyngier Date: Sat Jun 20 20:02:18 2020 +0100 irqchip/hip04: Configure IPIs as standard interrupts In order to switch the hip04 driver to provide standard interrupts for IPIs, rework the way interrupts are allocated, making sure the irqdomain covers the SGIs as well as the rest of the interrupt range. The driver is otherwise so old-school that it creates all interrupts upfront (duh!), so there is hardly anything else to change, apart from communicating the IPIs to the arch code. Signed-off-by: Marc Zyngier commit 0809ae724904c3c5dbdddf4169d48aac9c6fcdc8 Author: Marc Zyngier Date: Tue May 5 12:59:04 2020 +0100 irqchip/bcm2836: Configure mailbox interrupts as standard interrupts In order to switch the bcm2836 driver to privide standard interrupts for IPIs, it first needs to stop lying about the way things work. The mailbox interrupt is actually a multiplexer, with enough bits to store 32 pending interrupts per CPU. So let's turn it into a chained irqchip. Once this is done, we can instanciate the corresponding IPIs, and pass them to the architecture code. Signed-off-by: Marc Zyngier commit 3567c6ca47546106d36d995790e4eb80e3f14632 Author: Marc Zyngier Date: Tue May 19 09:42:46 2020 +0100 irqchip/gic-common: Don't enable SGIs by default The architecture code now enables the IPIs as required, so no need to enable SGIs by default in the GIC code. Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier commit 64a267e9a41c5a91efdfa5bf55bd2509cb4f7170 Author: Marc Zyngier Date: Sat Apr 25 15:24:01 2020 +0100 irqchip/gic: Configure SGIs as standard interrupts Change the way we deal with GIC SGIs by turning them into proper IRQs, and calling into the arch code to register the interrupt range instead of a callback. Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier commit 7ec46b519467852fc8eb83b6214ad568f8007846 Author: Marc Zyngier Date: Sat Apr 25 15:24:01 2020 +0100 irqchip/gic: Refactor SMP configuration As we are about to change quite a lot of the SMP support code, let's start by moving it around so that it minimizes the amount of #ifdefery. Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier commit 64b499d8df40dadb1818ad9f74c4546951b37a8f Author: Marc Zyngier Date: Sat Apr 25 15:24:01 2020 +0100 irqchip/gic-v3: Configure SGIs as standard interrupts Change the way we deal with GICv3 SGIs by turning them into proper IRQs, and calling into the arch code to register the interrupt range instead of a callback. Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier commit 4db68e62a0b912655c598de829b05b2383da0cab Merge: d70a4412e264c 244ac15de75ca Author: Mark Brown Date: Thu Sep 17 16:35:38 2020 +0100 Merge branch 'asoc-5.9' into asoc-5.10 commit a57d4e8730c1a55b2547ff81aef4753b67121cb8 Author: Shengjiu Wang Date: Thu Sep 17 14:11:19 2020 +0800 ASoC: fsl_sai: Set MCLK input or output direction SAI support select MCLK direction with version.major > 3 and version.minor > 1, the default direction is input, set it to be output according to DT property. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1600323079-5317-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 1dc658b13c1c365274b27bfc3c4d4f2955348fb8 Author: Shengjiu Wang Date: Thu Sep 17 14:11:18 2020 +0800 ASoC: fsl_sai: Add fsl_sai_check_version function fsl_sai_check_version can help to parse the version info in VERID and PARAM registers. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1600323079-5317-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 0b2cbce6898600aae5e87285f1c2000162d59c76 Author: Shengjiu Wang Date: Thu Sep 17 14:11:17 2020 +0800 ASoC: fsl_sai: Add new added registers and new bit definition On i.MX8MQ/i.MX8MN/i.MX8MM platform, the sai IP is upgraded. There are some new registers and new bit definition. This patch is to complete the register list. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1600323079-5317-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 7af655bce275f49b200b552921e55673624943c5 Author: Ville Syrjälä Date: Fri Sep 4 14:53:49 2020 +0300 drm/dp: Add drm_dp_downstream_mode() The downstream facing port caps in the DPCD can give us a hint as to what kind of display mode the sink can use if it doesn't have an EDID. Use that information to pick a suitable mode. v2: Use Returns: for kdoc (Lyude) Add kdocs for drm_display_mode_from_cea_vic() (Lyude) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-14-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit b7feffd584ba15de54ba465a3b32f775c70e1907 Author: Ville Syrjälä Date: Fri Sep 4 14:53:48 2020 +0300 drm/i915: Configure DP 1.3+ protocol converted HDMI mode DP 1.3 adds some extra control knobs for DP->HDMI protocol conversion. Let's use that to configure the "HDMI mode" (ie. infoframes vs. not) based on the capabilities of the sink. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-13-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit 3977cd1c1dcbfdc64138710d0470356a458f731c Author: Ville Syrjälä Date: Fri Sep 4 14:53:47 2020 +0300 drm/i915: Deal with TMDS DFP clock limits Use the new helpers to extract the TMDS clock limits from the downstream facing port and check them in .mode_valid(). TODO: we should check these in .compute_config() too to eg. determine if we can do deep color on the HDMI side or not Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-12-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit 6509ca051abf4ff60d63732badcb2173a715f741 Author: Ville Syrjälä Date: Fri Sep 4 14:53:46 2020 +0300 drm/dp: Add drm_dp_downstream_{min,max}_tmds_clock() Add helpers to get the TMDS clock limits for HDMI/DVI downstream facing ports. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-11-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit fe7cf496e5000b68275ee5898cbe1eeb722c134a Author: Ville Syrjälä Date: Fri Sep 4 14:53:45 2020 +0300 drm/i915: Reworkd DP DFP clock handling Move the downstream facing port dotclock check into a new function (intel_dp_mode_valid_downstream()) so that we have a nice future place where we can collect other related checks. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-10-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit b770e84311451506d822574595631009267c7e78 Author: Ville Syrjälä Date: Fri Sep 4 14:53:44 2020 +0300 drm/dp: Redo drm_dp_downstream_max_clock() as drm_dp_downstream_max_dotclock() We want to differentiate between the DFP dotclock and TMDS clock limits. Let's convert the current thing to just give us the dotclock limit. v2: Use Returns: for kdoc (Lyude) Fix up nouveau code too Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-9-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit 520a1c396d1966b64884d8e0176a580150d5a09e Author: Srinivas Kandagatla Date: Thu Sep 10 14:57:08 2020 +0100 ASoC: q6afe-clocks: add q6afe clock controller q6afe already exposes lpass clocks, however this was not presented as proper clock controller driver. This patch basically adds clock controller support for q6afe clocks. This is useful for other drivers like lpass digital codec or lpass lowpower island drivers to request or vote for these clocks. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200910135708.14842-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 4e398353a7e51410c34fd19f8b7dfc56fff5901b Author: Srinivas Kandagatla Date: Thu Sep 10 14:57:07 2020 +0100 ASoC: q6afe: dt-bindings: add q6afe clock bindings q6afe exposes various lpass clocks controls via q6dsp q6afe commands. This patch adds bindings required for this clock controller. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200910135708.14842-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 3f697027bcb0959d7c24d59550ab1da07c2dd609 Author: Michael Walle Date: Mon Sep 14 23:43:36 2020 +0200 hwmon: Add support for the sl28cpld hardware monitoring controller Add support for the hardware monitoring controller of the sl28cpld board management controller. This driver is part of a multi-function device. Signed-off-by: Michael Walle Acked-by: Guenter Roeck Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones commit b7536d8749e54923c9a7e8c4175e1e4f9b8c1541 Author: Michael Walle Date: Mon Sep 14 23:43:35 2020 +0200 gpio: Add support for the sl28cpld GPIO controller Add support for the GPIO controller of the sl28 board management controller. This driver is part of a multi-function device. A controller has 8 lines. There are three different flavors: full-featured GPIO with interrupt support, input-only and output-only. Signed-off-by: Michael Walle Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones commit 9db33d221efcca9503ac481edcbf2b3f4404bdb8 Author: Michael Walle Date: Mon Sep 14 23:43:34 2020 +0200 pwm: Add support for sl28cpld PWM controller Add support for the PWM controller of the sl28cpld board management controller. This is part of a multi-function device driver. The controller has one PWM channel and can just generate four distinct frequencies. Signed-off-by: Michael Walle Acked-by: Thierry Reding Reviewed-by: Uwe Kleine-König Signed-off-by: Lee Jones commit 85174ca663767c1c6f8dca3b0a2acfd4b5c37289 Author: Michael Walle Date: Mon Sep 14 23:43:33 2020 +0200 watchdog: add support for sl28cpld watchdog Add support for the watchdog of the sl28cpld board management controller. This is part of a multi-function device driver. Signed-off-by: Michael Walle Acked-by: Guenter Roeck Signed-off-by: Lee Jones commit 03ac990e0ac0c2823282d5b8dd2d536d88bbe6c2 Author: Michael Walle Date: Mon Sep 14 23:43:32 2020 +0200 irqchip: Add sl28cpld interrupt controller support Add support for the interrupt controller inside the sl28 CPLD management controller. The interrupt controller can handle at most 8 interrupts and is really simplistic and consists only of an interrupt mask and an interrupt pending register. Signed-off-by: Michael Walle Acked-by: Marc Zyngier Signed-off-by: Lee Jones commit a538ad229bbee4f8c68204c75b2e1ae43db875d6 Author: Michael Walle Date: Mon Sep 14 23:43:31 2020 +0200 mfd: simple-mfd-i2c: Add sl28cpld support Add the core support for the board management controller found on the SMARC-sAL28 board. Also add a virtual symbol which pulls in the simple-mfd-i2c driver and provide a common symbol on which the subdevice drivers can depend on. At the moment, this controller is used on the Kontron SMARC-sAL28 board. Signed-off-by: Michael Walle Signed-off-by: Lee Jones commit 48e28a249e3bcc31e6a2d27267410a6f5a03e39e Author: Michael Walle Date: Mon Sep 14 23:43:30 2020 +0200 dt-bindings: mfd: Add bindings for sl28cpld Add a device tree bindings for the board management controller found on the Kontron SMARC-sAL28 board. Signed-off-by: Michael Walle Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 3abee4579484c554961bb0af92a77adc0ebd791d Author: Michael Walle Date: Mon Sep 14 23:43:29 2020 +0200 mfd: Add simple regmap based I2C driver There are I2C devices which contain several different functions but doesn't require any special access functions. For these kind of drivers an I2C regmap should be enough. Create an I2C driver which creates an I2C regmap and enumerates its children. If a device wants to use this as its MFD core driver, it has to add an individual compatible string. It may provide its own regmap configuration. Subdevices can use dev_get_regmap() on the parent to get their regmap instance. Signed-off-by: Michael Walle Signed-off-by: Lee Jones commit 776100a4ce6da8f7fa451509e46852d69c2162a8 Author: Pierre-Louis Bossart Date: Thu Sep 17 13:56:33 2020 +0300 ASoC: SOF: Intel: hda: reduce verbosity of boot error logs Previous commits reduced the verbosity of errors during boot iterations, but there are still a couple remaining which generate false positives. Errors should only be logged when after last attempt to download firmware failed. Duplicating logs and assigning them different levels based on the iteration number isn't really elegant, use macro as suggested by Guennadi. Suggested-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200917105633.2579047-9-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 0e4ea878708be903566ad93d4972ad3dd4c1c30e Author: Guennadi Liakhovetski Date: Thu Sep 17 13:56:32 2020 +0300 ASoC: SOF: fix range checks On multiple locations checks are performed of untrusted values after adding a constant to them. This is wrong, because the addition might overflow and the result can then pass the check, although the original value is invalid. Fix multiple such issues by checking the actual value and not a sum of it and a constant. Signed-off-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200917105633.2579047-8-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit db69bcf915a37d7b8e54acf5f67d09d8159eb616 Author: Guennadi Liakhovetski Date: Thu Sep 17 13:56:31 2020 +0300 ASoC: SOF: remove several superfluous type-casts No need to type-cast assignments between void and other pointers in C. Signed-off-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200917105633.2579047-7-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit b9f8e1387cf0c9911b26c9d1fca84605d923de66 Author: Guennadi Liakhovetski Date: Thu Sep 17 13:56:30 2020 +0300 ASoC: SOF: (cosmetic) remove redundant "ret" variable uses In some cases no "ret" variable is even needed, those functions always return 0 anyway, in other cases "ret" initialisation is redundant. Signed-off-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200917105633.2579047-6-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 99ceec5ca0cb29e3b1d556d108ddc54654377792 Author: Pierre-Louis Bossart Date: Thu Sep 17 13:56:29 2020 +0300 ASoC: SOF: control: update test for pm_runtime_get_sync() We need to avoid reporting an error for -EACCESS when pm_runtime is not enabled. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200917105633.2579047-5-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 7db6db9d1a4a7864cd2557e983e06f3adf788c6a Author: Pierre-Louis Bossart Date: Thu Sep 17 13:56:28 2020 +0300 ASoC: SOF: debug: update test for pm_runtime_get_sync() We need to avoid reporting an error for -EACCESS when pm_runtime is not enabled. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200917105633.2579047-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 6eab771472af50e11a484d56ba444e2ec82e9126 Author: Karol Trzcinski Date: Thu Sep 17 13:56:27 2020 +0300 ASoC: SOF: Add `src_hash` to `sof_ipc_fw_version` structure This field will be used to compare ldc file with loaded fw version, to assert validity of trace logs. Value used in sof-logger. Signed-off-by: Karol Trzcinski Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200917105633.2579047-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 18ebffe4d043bf5f3a9b669d8d91f855bde8f6b7 Author: Iulian Olaru Date: Thu Sep 17 13:56:26 2020 +0300 ASoC: SOF: imx: Add debug support for imx platforms This patch adds debug support for imx platforms. This is important in order to gather information about the state of the DSP in case of an oops and the reason for the oops. This is done by checking if a message with a panic code has been placed in the debug box, in the imx8_dsp_handle_request function from sof/imx. If positive, the function imx8_dump, added in common, will be called. The first step is to gather information about the registers, filename, line number and stack by calling the imx8_get_registers, added in common. Then the information will be printed to the console by calling the get_status function. Signed-off-by: Iulian Olaru Reviewed-by: Guennadi Liakhovetski Reviewed-by: Daniel Baluta Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200917105633.2579047-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 67d6a8b358eac488112a4775f77dc3dbf63bea88 Author: Christian König Date: Wed Sep 16 15:31:28 2020 +0200 drm/ttm: remove superflous extern attribute from funcs Extern is the default attribute for functions anyway. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/390972/ commit 42f2562ca1b52810415107d919535c552196384e Author: Ville Syrjälä Date: Fri Sep 4 14:53:43 2020 +0300 drm/dp: Pimp drm_dp_downstream_max_bpc() Deal with more cases in drm_dp_downstream_max_bpc(): - DPCD 1.0 -> assume 8bpc for non-DP - DPCD 1.1+ DP (or DP++ with DP sink) -> allow anything - DPCD 1.1+ TMDS -> check the caps, assume 8bpc if the value is crap - anything else -> assume 8bpc v2: Use Returns: for kdoc (Lyude) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-8-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit 38784f6f880580cbe168edbe7ba38c161dee3216 Author: Ville Syrjälä Date: Fri Sep 4 14:53:42 2020 +0300 drm/dp: Add helpers to identify downstream facing port types Add a few helpers to let us better identify which kind of DFP we're dealing with. v2: Use Returns: for kdoc (Lyude) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-7-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit 530df3c031a65a57dae8f1ade0e8266b33530b70 Author: Ville Syrjälä Date: Fri Sep 4 14:53:41 2020 +0300 drm/i915: Reworkd DFP max bpc handling Stash the downstream facing port max bpc away during intel_dp_set_edid(). We'll soon need the EDID in there so we can't figure this out so easily during .compute_config() anymore. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-6-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit 57d6a6851f05bf594d2918888c350347fb0c2eef Author: Ville Syrjälä Date: Fri Sep 4 14:53:40 2020 +0300 drm/dp: Define more downstream facing port caps Our definitions for the DPCD DFP capabilities are lacking. Add the missing bits. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-5-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit a77ed90da6bb4062e3d8bc6daaa200a5494c7b0e Author: Ville Syrjälä Date: Fri Sep 4 14:53:39 2020 +0300 drm/dp: Define protocol converter DPCD registers DP 1.3 and 1.4 introduced some new registers for DP->HDMI protocol converters. Define those. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-4-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit f7af425dce9d572ad421b14dd94642457da40ad2 Author: Ville Syrjälä Date: Fri Sep 4 14:53:38 2020 +0300 drm/i915/lspcon: Do not send infoframes to non-HDMI sinks Non-HDMI sinks shouldn't be sent infoframes. Check for that when using LSPCON. FIXME: How do we turn off infoframes once enabled? Do we even have to? Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-3-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit 637f7240f602c078070cd2373845b7a80b59ae3f Author: Ville Syrjälä Date: Fri Sep 4 14:53:37 2020 +0300 drm/dp: Dump downstream facing port caps It helps when the logs have a dump of the DFP capabilities. v2: Move the dumping to the new helper Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-2-ville.syrjala@linux.intel.com Reviewed-by: Lyude Paul Acked-by: Daniel Vetter commit 244ac15de75ca62ed7a09c7291b67aeead9e12ac Author: Dan Murphy Date: Tue Sep 15 14:06:02 2020 -0500 ASoC: tlv320adcx140: Fix BCLK inversion for DSP modes Fix the BCLK inversion for DSP modes This is how it is defined by ASoC: * BCLK: * - "normal" polarity means signal is available at rising edge of BCLK * - "inverted" polarity means signal is available at falling edge of BCLK The adcx140 defines the BCLK edge based on coding type. The PCM (DSP_A/B) should drive on rising and sample on falling edge, so from ASoC pov, it is IB_NF. But from the codec pov if it is configured in DSP mode, then the BCLK should not be inverted, defaults to the coding standard. For i2s, it is NB_NF from ASoC pov (drive on falling, sample on rising). >From the codec's pov BCLK should not invert either, as this is the default for the coding. So, inversion must take the format into account: IB_NF + DSP_A/B == the codec bclk inversion should be disabled NB_NF + DSP_A/B == the codec bclk inversion should be enabled NB_NF + I2S == the codec bclk inversion should be disabled Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200915190606.1744-2-dmurphy@ti.com Signed-off-by: Mark Brown commit df16e2210454ca0b8a59caf364dd287fbb76a804 Author: Dan Murphy Date: Tue Sep 15 14:06:01 2020 -0500 ASoC: tlv320adcx140: Idle the device while writing registers It was observed that if the device was active and register writes were performed there were some unwanted behaviors particularly when writing the word length and some filter options. So when writing to the device the device should be placed in sleep mode and then exit sleep mode once the register update is complete. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200915190606.1744-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 73154aca4a03a2ab4833fd36683feb884af06d4b Author: Camel Guo Date: Tue Sep 8 11:04:17 2020 +0200 ASoC: tlv320adcx140: Fix digital gain range According to its datasheet, the digital gain should be -100 dB when CHx_DVOL is 1 and 27 dB when CHx_DVOL is 255. But with the current dig_vol_tlv, "Digital CHx Out Volume" shows 27.5 dB if CHx_DVOL is 255 and -95.5 dB if CHx_DVOL is 1. This commit fixes this bug. Fixes: 689c7655b50c ("ASoC: tlv320adcx140: Add the tlv320adcx140 codec driver family") Signed-off-by: Camel Guo Link: https://lore.kernel.org/r/20200908090417.16695-1-camel.guo@axis.com Signed-off-by: Mark Brown commit 6788fc1a66a0c1d1cec7a0f84f94b517eae8611c Author: Pierre-Louis Bossart Date: Thu Sep 17 13:39:12 2020 +0300 ASoC: topology: disable size checks for bytes_ext controls if needed When CONFIG_SND_CTL_VALIDATION is set, accesses to extended bytes control generate spurious error messages when the size exceeds 512 bytes, such as [ 11.224223] sof_sdw sof_sdw: control 2:0:0:EQIIR5.0 eqiir_coef_5:0: invalid count 1024 In addition the error check returns -EINVAL which has the nasty side effect of preventing applications accessing controls from working, e.g. root@plb:~# alsamixer cannot load mixer controls: Invalid argument It's agreed that the control interface has been abused since 2014, but forcing a check should not prevent existing solutions from working. This patch skips the checks conditionally if CONFIG_SND_CTL_VALIDATION is set and the byte array provided by topology is > 512. This preserves the checks for all other cases. Fixes: 1a3232d2f61d2 ('ASoC: topology: Add support for TLV bytes controls') BugLink: https://github.com/thesofproject/linux/issues/2430 Reported-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Jaska Uimonen Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200917103912.2565907-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 944c517b8c838832a166f1c89afbf8724f4a6b49 Author: Viorel Suman Date: Mon Sep 14 20:24:34 2020 +0300 ASoC: fsl_audmix: make clock and output src write only "alsactl -f state.conf store/restore" sequence fails because setting "mixing clock source" and "output source" requires active TDM clock being started for configuration propagation. Make these two controls write only so that their values are not stored at "alsactl store". Signed-off-by: Viorel Suman Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1600104274-13110-1-git-send-email-viorel.suman@oss.nxp.com Signed-off-by: Mark Brown commit 15d683e61bdded719e6202fed2c7401f4dcd95ab Author: Lad Prabhakar Date: Fri Sep 11 11:17:03 2020 +0100 clk: renesas: rcar-gen3: Update description for RZ/G2 The rcar-gen3-cpg driver is also used on Renesas RZ/G2 SoC's, update the description for the CLK_RCAR_GEN3_CPG config symbol to reflect this. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200911101703.20521-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 17bcc8035d2d19fc96f8e61f41edd5e1df5dbaa1 Author: Yoshihiro Shimoda Date: Fri Sep 11 16:43:51 2020 +0900 clk: renesas: cpg-mssr: Add support for R-Car V3U Initial support for R-Car V3U (r8a779a0), including core, module clocks, resets, and register access, because register specification differs from R-Car Gen2/3. Inspired by patches in the BSP by LUU HOAI. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599810232-29035-4-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 776e4ad0a04212ae37363f21d5589b5db9fea68e Merge: 8b652aa8a1fb0 fa2d185f75184 Author: Geert Uytterhoeven Date: Thu Sep 17 15:32:03 2020 +0200 Merge tag 'renesas-r8a779a0-dt-binding-defs-tag' into clk-renesas-for-v5.10 Renesas R-Car V3U DT Binding Definitions Clock and Power Domain definitions for the Renesas R-Car V3U (R8A779A0) SoC, shared by driver and DT source files. commit 8b652aa8a1fb02c596494d3cbcad7c916d2ecee6 Author: Yoshihiro Shimoda Date: Fri Sep 11 16:43:50 2020 +0900 clk: renesas: cpg-mssr: Add register pointers into struct cpg_mssr_priv To support other register layouts in the future, add register pointers of {control,status,reset,reset_clear}_regs into struct cpg_mssr_priv. After that, we can remove unused macros like MSTPSR(). No behavioral changes. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599810232-29035-3-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit ffbf9cf3f9460e320c3f1a90a51145da86c16781 Author: Yoshihiro Shimoda Date: Fri Sep 11 16:43:49 2020 +0900 clk: renesas: cpg-mssr: Use enum clk_reg_layout instead of a boolean flag Geert suggested defining multiple register layout variants using an enum [1] to support further devices like R-Car V3U. So, use enum clk_reg_layout instead of a boolean .stbyctrl flag. No behavioral change. [1] https://lore.kernel.org/linux-renesas-soc/CAMuHMdVAgN69p9FFnQdO4iHk2CHkeNaVui2Q-FOY6_BFVjQ-Nw@mail.gmail.com/ Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599810232-29035-2-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit a69f802ea1e542bfbb7e3a5958e939138e967210 Author: Yoshihiro Shimoda Date: Mon Sep 7 18:19:42 2020 +0900 dt-bindings: clock: renesas,cpg-mssr: Document r8a779a0 Add binding documentation for the R-Car V3U (R8A779A0) Clock Pulse Generator. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599470390-29719-7-git-send-email-yoshihiro.shimoda.uh@renesas.com Acked-by: Rob Herring Signed-off-by: Geert Uytterhoeven commit 7dd1b884f777beee4c0f3471a327697005118db8 Author: Daniel Vetter Date: Tue Jul 28 15:58:39 2020 +0200 dma-resv: lockdep-prime address_space->i_mmap_rwsem for dma-resv GPU drivers need this in their shrinkers, to be able to throw out mmap'ed buffers. Note that we also need dma_resv_lock in shrinkers, but that loop is resolved by trylocking in shrinkers. So full hierarchy is now (ignore some of the other branches we already have primed): mmap_read_lock -> dma_resv -> shrinkers -> i_mmap_lock_write I hope that's not inconsistent with anything mm or fs does, adding relevant people. Reviewed-by: Thomas Hellström Reviewed-by: Christian König Signed-off-by: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Cc: Dave Chinner Cc: Qian Cai Cc: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: Thomas Hellström (Intel) Cc: Andrew Morton Cc: Jason Gunthorpe Cc: linux-mm@kvack.org Cc: linux-rdma@vger.kernel.org Cc: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200728135839.1035515-1-daniel.vetter@ffwll.ch commit 48175fed1deaf8f37e918f504a5cff7504c583ad Author: Qinglang Miao Date: Wed Sep 16 14:21:30 2020 +0800 s390/ap: remove unnecessary spin_lock_init() The spinlock ap_poll_timer_lock is initialized statically. It is unnecessary to initialize by spin_lock_init(). Signed-off-by: Qinglang Miao Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 61f2e77489182b9b0e2fabe875e151fd46d286a1 Author: Liu Shixin Date: Wed Sep 16 10:50:29 2020 +0800 s390/diag: convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 110a6dbb2eca6b10bf60c61a51063d7fe1e55078 Author: Heiko Carstens Date: Mon Sep 14 13:42:25 2020 +0200 s390/uaccess: add HAVE_GET_KERNEL_NOFAULT support Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit fc3f61e1bcd5f88bfb7241bf509a3f63bab49ea8 Author: Heiko Carstens Date: Mon Sep 14 13:15:15 2020 +0200 s390/dis: get rid of set_fs() usage Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 52f72feba9dbe4fac848ae0d90bc0b85b17f91bc Author: Harald Freudenberger Date: Tue Sep 15 17:01:58 2020 +0200 s390/zcrypt: remove set_fs() invocation in zcrypt device driver This patch reworks the zcrypt device driver so that the set_fs() invocation is not needed any more. Instead there is a new flag bool userspace passed through all the functions which tells if the pointer arguments are userspace or kernelspace. Together with the two new inline functions z_copy_from_user() and z_copy_to_user() which either invoke copy_from_user (userspace is true) or memcpy (userspace is false) the zcrypt dd and the AP bus now has no requirement for the set_fs() functionality any more. Signed-off-by: Harald Freudenberger Reviewed-by: Ingo Franzki Reviewed-by: Christoph Hellwig Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b5de0c60cc30c2a3513c7188c73f3f29acc29234 Author: Jason Gunthorpe Date: Wed Sep 2 11:11:22 2020 +0300 RDMA/cma: Fix use after free race in roce multicast join The roce path triggers a work queue that continues to touch the id_priv but doesn't hold any reference on it. Futher, unlike in the IB case, the work queue is not fenced during rdma_destroy_id(). This can trigger a use after free if a destroy is triggered in the incredibly narrow window after the queue_work and the work starting and obtaining the handler_mutex. The only purpose of this work queue is to run the ULP event callback from the standard context, so switch the design to use the existing cma_work_handler() scheme. This simplifies quite a lot of the flow: - Use the cma_work_handler() callback to launch the work for roce. This requires generating the event synchronously inside the rdma_join_multicast(), which in turn means the dummy struct ib_sa_multicast can become a simple stack variable. - cm_work_handler() used the id_priv kref, so we can entirely eliminate the kref inside struct cma_multicast. Since the cma_multicast never leaks into an unprotected work queue the kfree can be done at the same time as for IB. - Eliminating the general multicast.ib requires using cma_set_mgid() in a few places to recompute the mgid. Fixes: 3c86aa70bf67 ("RDMA/cm: Add RDMA CM support for IBoE devices") Link: https://lore.kernel.org/r/20200902081122.745412-9-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3788d2997bc0150ea911a964d5b5a2e11808a936 Author: Jason Gunthorpe Date: Wed Sep 2 11:11:21 2020 +0300 RDMA/cma: Consolidate the destruction of a cma_multicast in one place Two places were open coding this sequence, and also pull in cma_leave_roce_mc_group() which was called only once. Link: https://lore.kernel.org/r/20200902081122.745412-8-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1bb5091def706732c749df9aae45fbca003696f2 Author: Jason Gunthorpe Date: Wed Sep 2 11:11:20 2020 +0300 RDMA/cma: Remove dead code for kernel rdmacm multicast There is no kernel user of RDMA CM multicast so this code managing the multicast subscription of the kernel-only internal QP is dead. Remove it. This makes the bug fixes in the next patches much simpler. Link: https://lore.kernel.org/r/20200902081122.745412-7-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7e85bcda8bfe883f4244672ed79f81b7762a1a7e Author: Jason Gunthorpe Date: Wed Sep 2 11:11:19 2020 +0300 RDMA/cma: Combine cma_ndev_work with cma_work These are the same thing, except that cma_ndev_work doesn't have a state transition. Signal no state transition by setting old_state and new_state == 0. In all cases the handler function should not be called once rdma_destroy_id() has progressed passed setting the state. Link: https://lore.kernel.org/r/20200902081122.745412-6-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5cfbf9291e1d56b28df30929a5b4bb2d70193855 Author: Jason Gunthorpe Date: Wed Sep 2 11:11:18 2020 +0300 RDMA/cma: Remove cma_comp() The only place that still uses it is rdma_join_multicast() which is only doing a sanity check that the caller hasn't done something wrong and doesn't need the spinlock. At least in the case of rdma_join_multicast() the information it needs will remain until the ID is destroyed once it enters these states. Similarly there is no reason to check for these specific states in the handler callback, instead use the usual check for a destroyed id under the handler_mutex. Link: https://lore.kernel.org/r/20200902081122.745412-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d490ee52f0a5dbd9d1bccabd6bf00c40c1234a79 Author: Jason Gunthorpe Date: Wed Sep 2 11:11:17 2020 +0300 RDMA/cma: Fix locking for the RDMA_CM_LISTEN state There is a strange unlocked read of the ID state when checking for reuseaddr. This is because an ID cannot be reusable once it becomes a listening ID. Instead of using the state to exclude reuse, just clear it as part of rdma_listen()'s flow to convert reusable into not reusable. Once a ID goes to listen there is no way back out, and the only use of reusable is on the bind_list check. Finally, update the checks under handler_mutex to use READ_ONCE and audit that once RDMA_CM_LISTEN is observed in a req callback it is stable under the handler_mutex. Link: https://lore.kernel.org/r/20200902081122.745412-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 732d41c545bb359cbb8c94698bdc1f8bcf82279c Author: Jason Gunthorpe Date: Wed Sep 2 11:11:16 2020 +0300 RDMA/cma: Make the locking for automatic state transition more clear Re-organize things so the state variable is not read unlocked. The first attempt to go directly from ADDR_BOUND immediately tells us if the ID is already bound, if we can't do that then the attempt inside rdma_bind_addr() to go from IDLE to ADDR_BOUND confirms the ID needs binding. Link: https://lore.kernel.org/r/20200902081122.745412-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2a7cec538169ada48a7810e77abff2ca99dbb098 Author: Jason Gunthorpe Date: Wed Sep 2 11:11:15 2020 +0300 RDMA/cma: Fix locking for the RDMA_CM_CONNECT state It is currently a bit confusing, but the design is if the handler_mutex is held, and the state is in RDMA_CM_CONNECT, then the state cannot leave RDMA_CM_CONNECT without also serializing with the handler_mutex. Make this clearer by adding a direct assertion, fixing the usage in rdma_connect and generally using READ_ONCE to read the state value. Link: https://lore.kernel.org/r/20200902081122.745412-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e5e1065f922380ced35e6b6ec3c58c28f57b74fd Author: Wang Qing Date: Thu Sep 17 10:04:32 2020 +0800 drm: fix spelling error in comments Change the comment typo: "manger" -> "manager". Signed-off-by: Wang Qing Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1600308275-32094-1-git-send-email-wangqing@vivo.com commit b731e4ea1054f41115b0968038c2b118c7e7e5be Author: Lukas Bulwahn Date: Sat Sep 12 20:33:34 2020 +0200 MAINTAINERS: make linux-aspeed list remarks consistent Commit f15a3ea80391 ("MAINTAINERS: Add ASPEED BMC GFX DRM driver entry") does not mention that linux-aspeed@lists.ozlabs.org is moderated for non-subscribers, but the other three entries for linux-aspeed@lists.ozlabs.org do. By 'majority vote' among entries, let us assume it was just missed here and adjust it to be consistent with others. Signed-off-by: Lukas Bulwahn Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200912183334.22683-1-lukas.bulwahn@gmail.com commit 04356ac30771091f60e0a45d91bd8027d45c2427 Author: Jim Quinlan Date: Fri Sep 11 13:52:25 2020 -0400 PCI: brcmstb: Add bcm7278 PERST# support The PERST# bit was moved to a different register in 7278-type STB chips. In addition, the polarity of the bit was also changed; for other chips writing a 1 specified assert; for 7278-type chips, writing a 0 specifies assert. Of course, PERST# is a PCIe asserted-low signal. While we are here, also change the bridge_sw_init_set() functions so like the perst_set() functions they are chip specific and we no longer rely on data wrt chip specific field mask and shift values. Link: https://lore.kernel.org/r/20200911175232.19016-6-james.quinlan@broadcom.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Florian Fainelli commit 8195b7417018c24b793e2881e9e8bb1d50ace397 Author: Jim Quinlan Date: Fri Sep 11 13:52:24 2020 -0400 PCI: brcmstb: Add suspend and resume pm_ops Broadcom Set-top (BrcmSTB) boards typically support S2, S3, and S5 suspend and resume. Now the PCIe driver may do so as well. Link: https://lore.kernel.org/r/20200911175232.19016-5-james.quinlan@broadcom.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Florian Fainelli commit 1cf1b0a6dd95250e30a7706c962044c51c5e06bd Author: Jim Quinlan Date: Fri Sep 11 13:52:23 2020 -0400 PCI: brcmstb: Add bcm7278 register info Add in compatibility strings and code for three Broadcom STB chips. Some of the register locations, shifts, and masks are different for certain chips, requiring the use of different constants based on of_id. We would like to add the following at this time to the match list but we need to wait until the end of this patchset so that everything works. { .compatible = "brcm,bcm7211-pcie", .data = &generic_cfg }, { .compatible = "brcm,bcm7278-pcie", .data = &bcm7278_cfg }, { .compatible = "brcm,bcm7216-pcie", .data = &bcm7278_cfg }, { .compatible = "brcm,bcm7445-pcie", .data = &generic_cfg }, Link: https://lore.kernel.org/r/20200911175232.19016-4-james.quinlan@broadcom.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Acked-by: Florian Fainelli Acked-by: Rob Herring commit e6f98b292413f175391b52f5e3b20500c5c834c8 Author: Jim Quinlan Date: Fri Sep 11 13:52:22 2020 -0400 dt-bindings: PCI: Add bindings for more Brcmstb chips - Add compatible strings for three more Broadcom STB chips: 7278, 7216, 7211 (STB version of RPi4). - Add new property 'brcm,scb-sizes'. - Add new property 'resets'. - Add new property 'reset-names' for 7216 only. - Allow 'ranges' and 'dma-ranges' to have more than one item and update the example to show this. Link: https://lore.kernel.org/r/20200911175232.19016-3-james.quinlan@broadcom.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit b927ad3405f96058014f97a610905b689cfbc563 Author: Jim Quinlan Date: Fri Sep 11 13:52:21 2020 -0400 PCI: brcmstb: PCIE_BRCMSTB depends on ARCH_BRCMSTB Have PCIE_BRCMSTB depend on ARCH_BRCMSTB. Also set the default value to ARCH_BRCMSTB. Link: https://lore.kernel.org/r/20200911175232.19016-2-james.quinlan@broadcom.com Signed-off-by: Jim Quinlan Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Florian Fainelli commit 7e92dee60cba51f8a5c7637bac815e70c85935f7 Author: Suman Anna Date: Wed Sep 16 18:36:38 2020 +0200 irqchip/irq-pruss-intc: Add support for ICSSG INTC on K3 SoCs The K3 AM65x and J721E SoCs have the next generation of the PRU-ICSS IP, commonly called ICSSG. The PRUSS INTC present within the ICSSG supports more System Events (160 vs 64), more Interrupt Channels and Host Interrupts (20 vs 10) compared to the previous generation PRUSS INTC instances. The first 2 and the last 10 of these host interrupt lines are used by the PRU and other auxiliary cores and sub-modules within the ICSSG, with 8 host interrupts connected to MPU. The host interrupts 5, 6, 7 are also connected to the other ICSSG instances within the SoC and can be partitioned as per system integration through the board dts files. Enhance the PRUSS INTC driver to add support for this ICSSG INTC instance. Co-developed-by: Grzegorz Jaszczyk Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Marc Zyngier commit b1026e8a95e430e615579f14f0f73c94f9690468 Author: David Lechner Date: Wed Sep 16 18:36:37 2020 +0200 irqchip/irq-pruss-intc: Implement irq_{get, set}_irqchip_state ops This implements the irq_get_irqchip_state and irq_set_irqchip_state callbacks for the TI PRUSS INTC driver. The set callback can be used by drivers to "kick" a PRU by injecting a PRU system event. Co-developed-by: Suman Anna Co-developed-by: Grzegorz Jaszczyk Signed-off-by: Suman Anna Signed-off-by: David Lechner Signed-off-by: Grzegorz Jaszczyk Reviewed-by: Lee Jones Signed-off-by: Marc Zyngier commit 6016f32d1de2798cc88c1a4b703d0ea096c19793 Author: Suman Anna Date: Wed Sep 16 18:36:36 2020 +0200 irqchip/irq-pruss-intc: Add logic for handling reserved interrupts The PRUSS INTC has a fixed number of output interrupt lines that are connected to a number of processors or other PRUSS instances or other devices (like DMA) on the SoC. The output interrupt lines 2 through 9 are usually connected to the main Arm host processor and are referred to as host interrupts 0 through 7 from ARM/MPU perspective. All of these 8 host interrupts are not always exclusively connected to the Arm interrupt controller. Some SoCs have some interrupt lines not connected to the Arm interrupt controller at all, while a few others have the interrupt lines connected to multiple processors in which they need to be partitioned as per SoC integration needs. For example, AM437x and 66AK2G SoCs have 2 PRUSS instances each and have the host interrupt 5 connected to the other PRUSS, while AM335x has host interrupt 0 shared between MPU and TSC_ADC and host interrupts 6 & 7 shared between MPU and a DMA controller. Add logic to the PRUSS INTC driver to ignore both these shared and invalid interrupts. Co-developed-by: Grzegorz Jaszczyk Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Marc Zyngier commit 04e2d1e06978026759e507ff41187d7a7d2c389b Author: Grzegorz Jaszczyk Date: Wed Sep 16 18:36:03 2020 +0200 irqchip/irq-pruss-intc: Add a PRUSS irqchip driver for PRUSS interrupts The Programmable Real-Time Unit Subsystem (PRUSS) contains a local interrupt controller (INTC) that can handle various system input events and post interrupts back to the device-level initiators. The INTC can support upto 64 input events with individual control configuration and hardware prioritization. These events are mapped onto 10 output interrupt lines through two levels of many-to-one mapping support. Different interrupt lines are routed to the individual PRU cores or to the host CPU, or to other devices on the SoC. Some of these events are sourced from peripherals or other sub-modules within that PRUSS, while a few others are sourced from SoC-level peripherals/devices. The PRUSS INTC platform driver manages this PRUSS interrupt controller and implements an irqchip driver to provide a Linux standard way for the PRU client users to enable/disable/ack/re-trigger a PRUSS system event. The system events to interrupt channels and output interrupts relies on the mapping configuration provided either through the PRU firmware blob (for interrupts routed to PRU cores) or via the PRU application's device tree node (for interrupt routed to the main CPU). In the first case the mappings will be programmed on PRU remoteproc driver demand (via irq_create_fwspec_mapping) during the boot of a PRU core and cleaned up after the PRU core is stopped. Reference counting is used to allow multiple system events to share a single channel and to allow multiple channels to share a single host event. The PRUSS INTC module is reference counted during the interrupt setup phase through the irqchip's irq_request_resources() and irq_release_resources() ops. This restricts the module from being removed as long as there are active interrupt users. The driver currently supports and can be built for OMAP architecture based AM335x, AM437x and AM57xx SoCs; Keystone2 architecture based 66AK2G SoCs and Davinci architecture based OMAP-L13x/AM18x/DA850 SoCs. All of these SoCs support 64 system events, 10 interrupt channels and 10 output interrupt lines per PRUSS INTC with a few SoC integration differences. NOTE: Each PRU-ICSS's INTC on AM57xx SoCs is preceded by a Crossbar that enables multiple external events to be routed to a specific number of input interrupt events. Any non-default external interrupt event directed towards PRUSS needs this crossbar to be setup properly. Co-developed-by: Suman Anna Co-developed-by: Andrew F. Davis Co-developed-by: Roger Quadros Co-developed-by: David Lechner Signed-off-by: Suman Anna Signed-off-by: Andrew F. Davis Signed-off-by: Roger Quadros Signed-off-by: David Lechner Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Marc Zyngier commit 8a1b09ed4308caf12c231430afb78d3331a85dc2 Author: Suman Anna Date: Wed Sep 16 18:34:54 2020 +0200 dt-bindings: irqchip: Add PRU-ICSS interrupt controller bindings The Programmable Real-Time Unit and Industrial Communication Subsystem (PRU-ICSS or simply PRUSS) contains an interrupt controller (INTC) that can handle various system input events and post interrupts back to the device-level initiators. The INTC can support up to 64 input events on most SoCs with individual control configuration and h/w prioritization. These events are mapped onto 10 output interrupt lines through two levels of many-to-one mapping support. Different interrupt lines are routed to the individual PRU cores or to the host CPU or to other PRUSS instances. The K3 AM65x and J721E SoCs have the next generation of the PRU-ICSS IP, commonly called ICSSG. The ICSSG interrupt controller on K3 SoCs provide a higher number of host interrupts (20 vs 10) and can handle an increased number of input events (160 vs 64) from various SoC interrupt sources. Add the bindings document for these interrupt controllers on all the applicable SoCs. It covers the OMAP architecture SoCs - AM33xx, AM437x and AM57xx; the Keystone 2 architecture based 66AK2G SoC; the Davinci architecture based OMAPL138 SoCs, and the K3 architecture based AM65x and J721E SoCs. Co-developed-by: Andrew F. Davis Co-developed-by: Roger Quadros Co-developed-by: Grzegorz Jaszczyk Signed-off-by: Andrew F. Davis Signed-off-by: Roger Quadros Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Reviewed-by: Rob Herring Signed-off-by: Marc Zyngier commit d9f980ebcd01d90a2a76ea2383c925abf9223cab Author: Dmitry Osipenko Date: Fri Aug 14 01:06:56 2020 +0300 drm/tegra: output: rgb: Wrap directly-connected panel into DRM bridge Currently Tegra DRM driver manually manages display panel, but this management could be moved out into DRM core if we'll wrap panel into DRM bridge. This patch wraps RGB panel into a DRM bridge and removes manual handling of the panel from the RGB output code. Suggested-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 29efdc2902027e6cc19f665441a3de87a674282a Author: Dmitry Osipenko Date: Fri Aug 14 01:06:55 2020 +0300 drm/tegra: output: rgb: Support LVDS encoder bridge Newer Tegra device-trees will specify a video output graph, which involves LVDS encoder bridge. This patch adds support for the LVDS encoder bridge to the RGB output, allowing us to model the display hardware properly. Reviewed-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit f00b9dd579d0078123e33434c25f37d42747574d Author: Dmitry Osipenko Date: Fri Aug 14 01:06:54 2020 +0300 drm/tegra: output: Support DRM bridges Newer Tegra device-trees will specify a video output graph which involves a bridge. This patch adds initial support for the DRM bridges to the Tegra DRM output. Acked-by: Sam Ravnborg Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 3d2e7aec70130af53289eccd41696c15ce2c3e89 Author: Dmitry Osipenko Date: Fri Aug 14 01:06:53 2020 +0300 drm/tegra: output: Don't leak OF node on error The OF node should be put before returning error in tegra_output_probe(), otherwise node's refcount will be leaked. Reviewed-by: Laurent Pinchart Reviewed-by: Sam Ravnborg Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 2340dc15f05f595688ae10f6512cef5ad51476d3 Author: Thierry Reding Date: Wed Apr 8 20:01:00 2020 +0200 drm/tegra: Properly reference count the DDC I2C adapter Use the of_get_i2c_adapter_by_node(), which is similar to the existing call to of_find_i2c_adapter_by_node() except that it also takes a reference to the owner module of the I2C adapter. In order to properly balance this out, call i2c_put_adapter() to release the reference to the I2C adapter and its owner module. For the special case where the DDC comes from the DPAUX, care must be taken to perform the same steps (i.e. get_device() and module_get()) so that the reference counts are all balanced. Signed-off-by: Thierry Reding commit 587823d39f85ff9777a862019eca720b97a16a52 Author: Bartosz Golaszewski Date: Thu Sep 17 09:48:57 2020 +0200 gpiolib: check for parent device in devprop_gpiochip_set_names() It's possible for a GPIO chip to not have a parent device (whose properties we inspect for 'gpio-line-names'). In this case we should simply return from devprop_gpiochip_set_names(). Add an appropriate check for this use-case. Fixes: 7cba1a4d5e16 ("gpiolib: generalize devprop_gpiochip_set_names() for device properties") Reported-by: Anders Roxell Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Tested-by: Anders Roxell Reviewed-by: Mika Westerberg commit ff8e0ff9b99643a32f7e33a96867e76d0fa10f76 Author: Sylwester Nawrocki Date: Wed Aug 26 19:15:29 2020 +0200 clk: samsung: Use cached clk_hws instead of __clk_lookup() calls For the CPU clock registration two parent clocks are required, these are now being passed as struct clk_hw pointers, rather than by the global scope names. That allows us to avoid __clk_lookup() calls and simplifies a bit the CPU clock registration function. While at it drop unneeded extern keyword in the function declaration. Reviewed-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Link: https://lore.kernel.org/r/20200826171529.23618-3-s.nawrocki@samsung.com Reported-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki commit 1f6e17d20245e86678c75ed99ce115f46cd3410f Author: Sylwester Nawrocki Date: Wed Aug 26 19:15:28 2020 +0200 clk: samsung: exynos5420/5250: Add IDs to the CPU parent clk definitions Use non-zero clock IDs in definitions of the CPU parent clocks for exynos5420, exynos5250 SoCs. This will allow us to reference the parent clocks directly in the driver by cached struct clk_hw pointers, rather than doing clk lookup by name. Reviewed-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Link: https://lore.kernel.org/r/20200826171529.23618-2-s.nawrocki@samsung.com Signed-off-by: Sylwester Nawrocki commit f493602db56beee1514b37180599a1f3f66f816e Author: Sylwester Nawrocki Date: Wed Aug 26 19:15:27 2020 +0200 clk: samsung: Add clk ID definitions for the CPU parent clocks Add clock ID definitions for the CPU parent clocks for SoCs which don't have such definitions yet. This will allow us to reference the parent clocks directly by cached struct clk_hw pointers in the clock provider, rather than doing clk lookup by name. Reviewed-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200826171529.23618-1-s.nawrocki@samsung.com Signed-off-by: Sylwester Nawrocki commit 8b066520ff7e5d8e843f4e405da0069636980666 Author: Sylwester Nawrocki Date: Tue Aug 11 17:12:51 2020 +0200 clk: samsung: exynos5420: Avoid __clk_lookup() calls when enabling clocks This patch adds a clk ID to the mout_sw_aclk_g3d clk definition so related clk pointer gets cached in the driver's private data and can be used later instead of a __clk_lookup() call. With that we have all clocks used in the clk_prepare_enable() calls in the clk provider init callback cached in clk_data.hws[] and we can reference the clk pointers directly rather than using __clk_lookup() with global names. Link: https://lore.kernel.org/r/20200811151251.31613-2-s.nawrocki@samsung.com Signed-off-by: Sylwester Nawrocki commit 3f1cc53b5f6f26e80e3176936714ec5dcab74244 Author: Sylwester Nawrocki Date: Tue Aug 11 17:12:50 2020 +0200 clk: samsung: exynos5420: Add definition of clock ID for mout_sw_aclk_g3d This patch adds ID for the mout_sw_aclk_g3d (SW_CLKMUX_ACLK_G3D) clock, mostly for internal use in the CMU driver. It will allow to avoid the __clk_lookup() call when setting up the clock during the clock provider initialization. Link: https://lore.kernel.org/r/20200811151251.31613-1-s.nawrocki@samsung.com Signed-off-by: Sylwester Nawrocki commit 9e76f2cff7a17af92c819ca0489ec5399f8367f7 Author: Mauro Carvalho Chehab Date: Thu Sep 17 11:48:17 2020 +0200 media: vidtv: remove an impossible condition As warned by smatch: drivers/media/test-drivers/vidtv/vidtv_psi.c:93 vidtv_psi_update_version_num() warn: impossible condition '(h->version > 32) => (0-31 > 32)' h_version is declared as: u8 version:5; Meaning that its value ranges from 0 to 31. Incrementing 31 on such data will overflow to zero, as expected. So, just drop the uneeded overflow check. While here, use "foo++" instead of "++foo", as this is a much more common pattern. Signed-off-by: Mauro Carvalho Chehab commit ad458524b3fa2cef0b322984591bbdfd527367c3 Author: Mauro Carvalho Chehab Date: Thu Sep 17 11:03:37 2020 +0200 media: vidtv: cleanup the logic which estimates buffer size There's no need to use u64 over there. In a matter of fact, the div is not even needed, as it is multiplying by 1000 and dividing by 1000. So, simplify the logic. While here, constrain the buffer size to a certain range (between the current value and 10 times it) Signed-off-by: Mauro Carvalho Chehab commit 37b288f54bb9acb42bf384d92f7c95d8bad45ca8 Author: Daniel W. S. Almeida Date: Wed Sep 16 22:05:40 2020 +0200 media: vidtv: fix build on 32bit architectures Fix the following error for builds on 32bit architectures: ERROR: modpost: "__udivdi3" [drivers/media/test-drivers/vidtv/dvb-vidtv-bridge.ko] undefined! Which is due to 64bit divisions that did not go through the helpers in linux/math64.h As vidtv_mux_check_mux_rate was not operational in its current form, drop the entire function while it is not fixed properly. For now, call vidtv_mux_pad_with_nulls with a constant number of packets to avoid warnings due to unused functions when building this driver. The 64bit division used in the s302m is not needed, remove them and use a fixed number of frames and a constant PTS increment instead. Fixes: f90cf6079bf67988 ("media: vidtv: add a bridge driver") Signed-off-by: Daniel W. S. Almeida Signed-off-by: Mauro Carvalho Chehab commit c5d83ba23e66e539200de347cd6dca93b1041e3c Author: Mauro Carvalho Chehab Date: Tue Sep 15 15:50:52 2020 +0200 media: vidtv: Add a music instead of playing a single tone Keep playing a single tone is not too nice, and prevents checking some weird things. So, instead, implement a simple tone generator, changing the code to play a public domain song (5th Symphony of Beethoven), using sinusoidal waves. Signed-off-by: Mauro Carvalho Chehab commit c2a9baf96fe72f3474067273bf4d928c955d82ac Author: Mauro Carvalho Chehab Date: Tue Sep 15 13:24:42 2020 +0200 media: vidtv: get rid of its own sinusoidal waveform Instead, use the code from linux/fixp-arith.h. Signed-off-by: Mauro Carvalho Chehab commit 82d00a1a2ac8b112728c98a88948456a0e308672 Author: Mauro Carvalho Chehab Date: Tue Sep 15 10:06:52 2020 +0200 media: vidtv: add a poor guy's simulation to preBER stats A typical digital TV stream has errors that are corrected by Viterbi. While the error rate after Viterbi is usually zero, with good signals, there are some chances of getting random errors before that, which are auto-corrected by the error code algorithm. Add a poor guy's implementation that would show some noise at the pre-BER part of the demod. Signed-off-by: Mauro Carvalho Chehab commit 2cf846b1f3006b88b7f381082b23ba25030a1650 Author: Mauro Carvalho Chehab Date: Tue Sep 15 09:18:32 2020 +0200 media: vidtv.rst: update it to better describe the frequencies The virtual driver has now a minimal set of frequencies for a single transponder to be found by each DVB standard. Document it, and update related information about the simulated LNBf. Signed-off-by: Mauro Carvalho Chehab commit 9ec6f4bb600476df92773c216ccc830f4aebb3b2 Author: Mauro Carvalho Chehab Date: Tue Sep 15 08:25:56 2020 +0200 media: vidtv: fix DVB-S/S2 tuning logic Satellite setups are different than terrestrial and cable ones, as there is a device coupled at the antenna, called LNBf, which converts the frequency from a GHz range at C-Band or Ku-Band into an intermediate frequency at S-Band (ranging up to ~2GHz). There are several different models of LNBf, with different IF conversions, but the most common nowadays is called Universal LNBf. Those got their frequency ranges extended in the past, when Astra 19.2E sattellite was launched. The universal LNBf has two local oscilators: - 9.75 GHz - 10.6 GHz The first one is used when the frequency is between 10.7 GHz up to 11.7 GHz. The second one is for frequencies between 11.7 GHz to 12.75 GHz. With that, the IF signal will be at 950 MHz to 2,150 MHz range. Add support for doing the above math, and make clear that the frequencies expected by the driver should be at Ku-Band range. Signed-off-by: Mauro Carvalho Chehab commit d38829a5e10de93561c34bae844e36b47fdaa8d9 Author: Mauro Carvalho Chehab Date: Tue Sep 15 08:42:04 2020 +0200 media: vidtv: add DiSEqC dummy ops Those are needed for real applications to work with Satellite systems. Signed-off-by: Mauro Carvalho Chehab commit 36183150e086977cadcffba84ecd84cbbeec9324 Author: Christian König Date: Tue Sep 15 16:29:26 2020 +0200 drm/ttm: some cleanups Unexport ttm_check_under_lowerlimit. Make ttm_bo_acc_size static and unexport it. Remove ttm_get_kernel_zone_memory_size. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/390515/ commit 774b9f43716d5a79272e052bcae2f3939b02a2c6 Author: Vadym Kochan Date: Wed Sep 16 20:09:31 2020 +0300 eeprom: at24: set type id as EEPROM Set type as NVMEM_TYPE_EEPROM to expose this info via sysfs: $ cat /sys/bus/nvmem/devices/{DEVICE}/type EEPROM Signed-off-by: Vadym Kochan Signed-off-by: Bartosz Golaszewski commit 612b5d506d066cdf0a739963e7cd28642d500ec1 Author: Alex Kluver Date: Wed Aug 19 09:35:44 2020 -0500 cper,edac,efi: Memory Error Record: bank group/address and chip id Updates to the UEFI 2.8 Memory Error Record allow splitting the bank field into bank address and bank group, and using the last 3 bits of the extended field as a chip identifier. When needed, print correct version of bank field, bank group, and chip identification. Based on UEFI 2.8 Table 299. Memory Error Record. Signed-off-by: Alex Kluver Reviewed-by: Russ Anderson Reviewed-by: Kyle Meyer Reviewed-by: Steve Wahl Acked-by: Borislav Petkov Link: https://lore.kernel.org/r/20200819143544.155096-3-alex.kluver@hpe.com Signed-off-by: Ard Biesheuvel commit 9baf68cc4544056f33797b78ec09388f54ecc8f0 Author: Alex Kluver Date: Wed Aug 19 09:35:43 2020 -0500 edac,ghes,cper: Add Row Extension to Memory Error Record Memory errors could be printed with incorrect row values since the DIMM size has outgrown the 16 bit row field in the CPER structure. UEFI Specification Version 2.8 has increased the size of row by allowing it to use the first 2 bits from a previously reserved space within the structure. When needed, add the extension bits to the row value printed. Based on UEFI 2.8 Table 299. Memory Error Record Signed-off-by: Alex Kluver Tested-by: Russ Anderson Reviewed-by: Steve Wahl Reviewed-by: Kyle Meyer Acked-by: Borislav Petkov Link: https://lore.kernel.org/r/20200819143544.155096-2-alex.kluver@hpe.com Signed-off-by: Ard Biesheuvel commit 4a568ce29d3f48df95919f82a80e4b9be7ea0dc1 Author: Arvind Sankar Date: Mon Sep 14 17:35:35 2020 -0400 efi/x86: Add a quirk to support command line arguments on Dell EFI firmware At least some versions of Dell EFI firmware pass the entire EFI_LOAD_OPTION descriptor, rather than just the OptionalData part, to the loaded image. This was verified with firmware revision 2.15.0 on a Dell Precision T3620 by Jacobo Pantoja. To handle this, add a quirk to check if the options look like a valid EFI_LOAD_OPTION descriptor, and if so, use the OptionalData part as the command line. Signed-off-by: Arvind Sankar Reported-by: Jacobo Pantoja Link: https://lore.kernel.org/linux-efi/20200907170021.GA2284449@rani.riverdale.lan/ Link: https://lore.kernel.org/r/20200914213535.933454-2-nivedita@alum.mit.edu Signed-off-by: Ard Biesheuvel commit b85300173d027131ced9a654c506785f15cfdd6f Author: Oliver Neukum Date: Wed Sep 16 21:15:44 2020 +0200 driver core: force NOIO allocations during unplug There is one overlooked situation under which a driver must not do IO to allocate memory. You cannot do that while disconnecting a device. A device being disconnected is no longer functional in most cases, yet IO may fail only when the handler runs. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200916191544.5104-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit b40be05ed255d9a0257fb66ab2728ecca2c9d597 Merge: 818280d5adf1d be0704beb2294 Author: Dave Airlie Date: Thu Sep 17 14:18:51 2020 +1000 Merge branch 'for-5.10-drm-sg-fix' of https://github.com/mszyprow/linux into drm-next Please pull a set of fixes for various DRM drivers that finally resolve incorrect usage of the scatterlists (struct sg_table nents and orig_nents entries), what causes issues when IOMMU is used. Signed-off-by: Dave Airlie From: Marek Szyprowski Link: https://patchwork.freedesktop.org/patch/msgid/20200910080505.24456-1-m.szyprowski@samsung.com commit 2899347249fe7567cb04bb810a85f848fc0ce475 Author: Qilong Zhang Date: Wed Sep 16 19:15:17 2020 +0800 soc: qcom: llcc: use devm_platform_ioremap_resource_byname() Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20200916111517.99670-1-zhangqilong3@huawei.com Signed-off-by: Bjorn Andersson commit 02ae4a0ed14d94709a707dfb02b0a4a4dfcced59 Author: Bjorn Andersson Date: Tue Sep 15 12:54:20 2020 +0530 arm64: dts: qcom: sm8250: Add cpufreq hw node Add cpufreq HW device node to scale 4-Silver/3-Gold/1-Gold+ cores on SM8250 SoCs. Signed-off-by: Bjorn Andersson Signed-off-by: Manivannan Sadhasivam Acked-by: Viresh Kumar Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20200915072423.18437-3-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 35dfb43c243b28658ef757a2b9c6454f99cfc43c Author: Paul Mackerras Date: Thu Sep 3 17:55:40 2020 +1000 KVM: PPC: Book3S HV: Set LPCR[HDICE] before writing HDEC POWER8 and POWER9 machines have a hardware deviation where generation of a hypervisor decrementer exception is suppressed if the HDICE bit in the LPCR register is 0 at the time when the HDEC register decrements from 0 to -1. When entering a guest, KVM first writes the HDEC register with the time until it wants the CPU to exit the guest, and then writes the LPCR with the guest value, which includes HDICE = 1. If HDEC decrements from 0 to -1 during the interval between those two events, it is possible that we can enter the guest with HDEC already negative but no HDEC exception pending, meaning that no HDEC interrupt will occur while the CPU is in the guest, or at least not until HDEC wraps around. Thus it is possible for the CPU to keep executing in the guest for a long time; up to about 4 seconds on POWER8, or about 4.46 years on POWER9 (except that the host kernel hard lockup detector will fire first). To fix this, we set the LPCR[HDICE] bit before writing HDEC on guest entry. Signed-off-by: Paul Mackerras commit 05e6295dc7de859c9d56334805485c4d20bebf25 Author: Fabiano Rosas Date: Fri Sep 11 01:16:07 2020 -0300 KVM: PPC: Book3S HV: Do not allocate HPT for a nested guest The current nested KVM code does not support HPT guests. This is informed/enforced in some ways: - Hosts < P9 will not be able to enable the nested HV feature; - The nested hypervisor MMU capabilities will not contain KVM_CAP_PPC_MMU_HASH_V3; - QEMU reflects the MMU capabilities in the 'ibm,arch-vec-5-platform-support' device-tree property; - The nested guest, at 'prom_parse_mmu_model' ignores the 'disable_radix' kernel command line option if HPT is not supported; - The KVM_PPC_CONFIGURE_V3_MMU ioctl will fail if trying to use HPT. There is, however, still a way to start a HPT guest by using max-compat-cpu=power8 at the QEMU machine options. This leads to the guest being set to use hash after QEMU calls the KVM_PPC_ALLOCATE_HTAB ioctl. With the guest set to hash, the nested hypervisor goes through the entry path that has no knowledge of nesting (kvmppc_run_vcpu) and crashes when it tries to execute an hypervisor-privileged (mtspr HDEC) instruction at __kvmppc_vcore_entry: root@L1:~ $ qemu-system-ppc64 -machine pseries,max-cpu-compat=power8 ... [ 538.543303] CPU: 83 PID: 25185 Comm: CPU 0/KVM Not tainted 5.9.0-rc4 #1 [ 538.543355] NIP: c00800000753f388 LR: c00800000753f368 CTR: c0000000001e5ec0 [ 538.543417] REGS: c0000013e91e33b0 TRAP: 0700 Not tainted (5.9.0-rc4) [ 538.543470] MSR: 8000000002843033 CR: 22422882 XER: 20040000 [ 538.543546] CFAR: c00800000753f4b0 IRQMASK: 3 GPR00: c0080000075397a0 c0000013e91e3640 c00800000755e600 0000000080000000 GPR04: 0000000000000000 c0000013eab19800 c000001394de0000 00000043a054db72 GPR08: 00000000003b1652 0000000000000000 0000000000000000 c0080000075502e0 GPR12: c0000000001e5ec0 c0000007ffa74200 c0000013eab19800 0000000000000008 GPR16: 0000000000000000 c00000139676c6c0 c000000001d23948 c0000013e91e38b8 GPR20: 0000000000000053 0000000000000000 0000000000000001 0000000000000000 GPR24: 0000000000000001 0000000000000001 0000000000000000 0000000000000001 GPR28: 0000000000000001 0000000000000053 c0000013eab19800 0000000000000001 [ 538.544067] NIP [c00800000753f388] __kvmppc_vcore_entry+0x90/0x104 [kvm_hv] [ 538.544121] LR [c00800000753f368] __kvmppc_vcore_entry+0x70/0x104 [kvm_hv] [ 538.544173] Call Trace: [ 538.544196] [c0000013e91e3640] [c0000013e91e3680] 0xc0000013e91e3680 (unreliable) [ 538.544260] [c0000013e91e3820] [c0080000075397a0] kvmppc_run_core+0xbc8/0x19d0 [kvm_hv] [ 538.544325] [c0000013e91e39e0] [c00800000753d99c] kvmppc_vcpu_run_hv+0x404/0xc00 [kvm_hv] [ 538.544394] [c0000013e91e3ad0] [c0080000072da4fc] kvmppc_vcpu_run+0x34/0x48 [kvm] [ 538.544472] [c0000013e91e3af0] [c0080000072d61b8] kvm_arch_vcpu_ioctl_run+0x310/0x420 [kvm] [ 538.544539] [c0000013e91e3b80] [c0080000072c7450] kvm_vcpu_ioctl+0x298/0x778 [kvm] [ 538.544605] [c0000013e91e3ce0] [c0000000004b8c2c] sys_ioctl+0x1dc/0xc90 [ 538.544662] [c0000013e91e3dc0] [c00000000002f9a4] system_call_exception+0xe4/0x1c0 [ 538.544726] [c0000013e91e3e20] [c00000000000d140] system_call_common+0xf0/0x27c [ 538.544787] Instruction dump: [ 538.544821] f86d1098 60000000 60000000 48000099 e8ad0fe8 e8c500a0 e9264140 75290002 [ 538.544886] 7d1602a6 7cec42a6 40820008 7d0807b4 <7d164ba6> 7d083a14 f90d10a0 480104fd [ 538.544953] ---[ end trace 74423e2b948c2e0c ]--- This patch makes the KVM_PPC_ALLOCATE_HTAB ioctl fail when running in the nested hypervisor, causing QEMU to abort. Reported-by: Satheesh Rajendran Signed-off-by: Fabiano Rosas Reviewed-by: Greg Kurz Reviewed-by: David Gibson Signed-off-by: Paul Mackerras commit 4e1b2ab7e6299937219097fc581de7d29d79aade Author: Greg Kurz Date: Fri Sep 11 12:53:45 2020 +0200 KVM: PPC: Don't return -ENOTSUPP to userspace in ioctls ENOTSUPP is a linux only thingy, the value of which is unknown to userspace, not to be confused with ENOTSUP which linux maps to EOPNOTSUPP, as permitted by POSIX [1]: [EOPNOTSUPP] Operation not supported on socket. The type of socket (address family or protocol) does not support the requested operation. A conforming implementation may assign the same values for [EOPNOTSUPP] and [ENOTSUP]. Return -EOPNOTSUPP instead of -ENOTSUPP for the following ioctls: - KVM_GET_FPU for Book3s and BookE - KVM_SET_FPU for Book3s and BookE - KVM_GET_DIRTY_LOG for BookE This doesn't affect QEMU which doesn't call the KVM_GET_FPU and KVM_SET_FPU ioctls on POWER anyway since they are not supported, and _buggily_ ignores anything but -EPERM for KVM_GET_DIRTY_LOG. [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html Signed-off-by: Greg Kurz Acked-by: Thadeu Lima de Souza Cascardo Signed-off-by: Paul Mackerras commit b948577b984a01d24d401d2264efbccc7f0146c1 Author: Liu Shixin Date: Wed Sep 16 10:50:18 2020 +0800 cxgb4vf: convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin Signed-off-by: David S. Miller commit 04a834592bf51355383db6fc00cb09f776a6b8dc Author: Shannon Nelson Date: Tue Sep 15 16:59:03 2020 -0700 ionic: dynamic interrupt moderation Use the dim library to manage dynamic interrupt moderation in ionic. v3: rebase v2: untangled declarations in ionic_dim_work() Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit ddcc9b7feb451c5c8145d11879a6585a4ddd317d Author: Karsten Graul Date: Tue Sep 15 22:57:09 2020 +0200 net/smc: check variable before dereferencing in smc_close.c smc->clcsock and smc->clcsock->sk are used before the check if they can be dereferenced. Fix this by checking the variables first. Fixes: a60a2b1e0af1 ("net/smc: reduce active tcp_listen workers") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit d5bf31ddd8b21d2aa0af2500ff4fcda068ad50c7 Author: Nikolay Aleksandrov Date: Tue Sep 15 17:57:24 2020 +0300 net: bridge: mcast: don't ignore return value of __grp_src_toex_excl When we're handling TO_EXCLUDE report in EXCLUDE filter mode we should not ignore the return value of __grp_src_toex_excl() as we'll miss sending notifications about group changes. Fixes: 5bf1e00b6849 ("net: bridge: mcast: support for IGMPV3/MLDv2 CHANGE_TO_INCLUDE/EXCLUDE report") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit f747c7e15d7bc71a967a94ceda686cf2460b69e8 Author: Paul E. McKenney Date: Tue Sep 15 14:27:38 2020 -0700 rcu-tasks: Enclose task-list scan in rcu_read_lock() The rcu_tasks_trace_postgp() function uses for_each_process_thread() to scan the task list without the benefit of RCU read-side protection, which can result in use-after-free errors on task_struct structures. This error was missed because the TRACE01 rcutorture scenario enables lockdep, but also builds with CONFIG_PREEMPT_NONE=y. In this situation, preemption is disabled everywhere, so lockdep thinks everywhere can be a legitimate RCU reader. This commit therefore adds the needed rcu_read_lock() and rcu_read_unlock(). Note that this bug can occur only after an RCU Tasks Trace CPU stall warning, which by default only happens after a grace period has extended for ten minutes (yes, not a typo, minutes). Fixes: 4593e772b502 ("rcu-tasks: Add stall warnings for RCU Tasks Trace") Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Cc: # 5.7.x Signed-off-by: Paul E. McKenney commit 592031cc10858be4adb10f6c0f2608f6f21824aa Author: Paul E. McKenney Date: Tue Sep 15 14:03:34 2020 -0700 rcu-tasks: Fix low-probability task_struct leak When rcu_tasks_trace_postgp() function detects an RCU Tasks Trace CPU stall, it adds all tasks blocking the current grace period to a list, invoking get_task_struct() on each to prevent them from being freed while on the list. It then traverses that list, printing stall-warning messages for each one that is still blocking the current grace period and removing it from the list. The list removal invokes the matching put_task_struct(). This of course means that in the admittedly unlikely event that some task executes its outermost rcu_read_unlock_trace() in the meantime, it won't be removed from the list and put_task_struct() won't be executing, resulting in a task_struct leak. This commit therefore makes the list removal and put_task_struct() unconditional, stopping the leak. Note further that this bug can occur only after an RCU Tasks Trace CPU stall warning, which by default only happens after a grace period has extended for ten minutes (yes, not a typo, minutes). Fixes: 4593e772b502 ("rcu-tasks: Add stall warnings for RCU Tasks Trace") Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Cc: # 5.7.x Signed-off-by: Paul E. McKenney commit ba3a86e47232ad9f76160929f33ac9c64e4d0567 Author: Paul E. McKenney Date: Mon Sep 14 15:44:37 2020 -0700 rcu-tasks: Fix grace-period/unlock race in RCU Tasks Trace The more intense grace-period processing resulting from the 50x RCU Tasks Trace grace-period speedups exposed the following race condition: o Task A running on CPU 0 executes rcu_read_lock_trace(), entering a read-side critical section. o When Task A eventually invokes rcu_read_unlock_trace() to exit its read-side critical section, this function notes that the ->trc_reader_special.s flag is zero and and therefore invoke wil set ->trc_reader_nesting to zero using WRITE_ONCE(). But before that happens... o The RCU Tasks Trace grace-period kthread running on some other CPU interrogates Task A, but this fails because this task is currently running. This kthread therefore sends an IPI to CPU 0. o CPU 0 receives the IPI, and thus invokes trc_read_check_handler(). Because Task A has not yet cleared its ->trc_reader_nesting counter, this function sees that Task A is still within its read-side critical section. This function therefore sets the ->trc_reader_nesting.b.need_qs flag, AKA the .need_qs flag. Except that Task A has already checked the .need_qs flag, which is part of the ->trc_reader_special.s flag. The .need_qs flag therefore remains set until Task A's next rcu_read_unlock_trace(). o Task A now invokes synchronize_rcu_tasks_trace(), which cannot start a new grace period until the current grace period completes. And thus cannot return until after that time. But Task A's .need_qs flag is still set, which prevents the current grace period from completing. And because Task A is blocked, it will never execute rcu_read_unlock_trace() until its call to synchronize_rcu_tasks_trace() returns. We are therefore deadlocked. This race is improbable, but 80 hours of rcutorture made it happen twice. The race was possible before the grace-period speedup, but roughly 50x less probable. Several thousand hours of rcutorture would have been necessary to have a reasonable chance of making this happen before this 50x speedup. This commit therefore eliminates this deadlock by setting ->trc_reader_nesting to a large negative number before checking the .need_qs and zeroing (or decrementing with respect to its initial value) ->trc_reader_nesting. For its part, the IPI handler's trc_read_check_handler() function adds a check for negative values, deferring evaluation of the task in this case. Taken together, these changes avoid this deadlock scenario. Fixes: 276c410448db ("rcu-tasks: Split ->trc_reader_need_end") Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Cc: # 5.7.x Signed-off-by: Paul E. McKenney commit 4fe192dfbe5ba9780df699d411aa4f25ba24cf61 Author: Paul E. McKenney Date: Wed Sep 9 22:05:41 2020 -0700 rcu-tasks: Shorten per-grace-period sleep for RCU Tasks Trace The various RCU tasks flavors currently wait 100 milliseconds between each grace period in order to prevent CPU-bound loops and to favor efficiency over latency. However, RCU Tasks Trace needs to have a grace-period latency of roughly 25 milliseconds, which is completely infeasible given the 100-millisecond per-grace-period sleep. This commit therefore reduces this sleep duration to 5 milliseconds (or one jiffy, whichever is longer) in kernels built with CONFIG_TASKS_TRACE_RCU_READ_MB=y. Link: https://lore.kernel.org/bpf/CAADnVQK_AiX+S_L_A4CQWT11XyveppBbQSQgH_qWGyzu_E8Yeg@mail.gmail.com/ Reported-by: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Signed-off-by: Paul E. McKenney commit 574de8766f6efa0757f3c7ac15c9eb29a4636861 Author: Paul E. McKenney Date: Wed Sep 9 21:51:09 2020 -0700 rcu-tasks: Selectively enable more RCU Tasks Trace IPIs Many workloads are quite sensitive to IPIs, and such workloads should build kernels with CONFIG_TASKS_TRACE_RCU_READ_MB=y to prevent RCU Tasks Trace from using them under normal conditions. However, other workloads are quite happy to permit more IPIs if doing so makes BPF program updates go faster. This commit therefore sets the default value for the rcupdate.rcu_task_ipi_delay kernel parameter to zero for kernels that have been built with CONFIG_TASKS_TRACE_RCU_READ_MB=n, while retaining the old default of (HZ / 10) for kernels that have indicated an aversion to IPIs via CONFIG_TASKS_TRACE_RCU_READ_MB=y. Link: https://lore.kernel.org/bpf/CAADnVQK_AiX+S_L_A4CQWT11XyveppBbQSQgH_qWGyzu_E8Yeg@mail.gmail.com/ Reported-by: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Signed-off-by: Paul E. McKenney commit 2393a613d2e3da35bd73ee55d9dca0fb04810955 Author: Paul E. McKenney Date: Wed Sep 9 21:36:34 2020 -0700 rcu-tasks: Use more aggressive polling for RCU Tasks Trace The RCU Tasks Trace grace periods are too slow, as in 40x slower than those of RCU Tasks. This is due to my having assumed a one-second grace period was OK, and thus not having optimized any further. This commit provides the first step in this optimization process, namely by allowing the task_list scan backoff interval to be specified on a per-flavor basis, and then speeding up the scans for RCU Tasks Trace. However, kernels built with CONFIG_TASKS_TRACE_RCU_READ_MB=y continue to use the old slower backoff, consistent with that Kconfig option's goal of reducing IPIs. Link: https://lore.kernel.org/bpf/CAADnVQK_AiX+S_L_A4CQWT11XyveppBbQSQgH_qWGyzu_E8Yeg@mail.gmail.com/ Reported-by: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jiri Olsa Cc: Signed-off-by: Paul E. McKenney commit 6731da9e0ff33d8c5f340705d118a27d3b817d1e Author: Paul E. McKenney Date: Wed Sep 9 14:14:34 2020 -0700 rcu-tasks: Mark variables static The n_heavy_reader_attempts, n_heavy_reader_updates, and n_heavy_reader_ofl_updates variables are not used outside of their translation unit, so this commit marks them static. Signed-off-by: Paul E. McKenney commit aabf59432c51be174994ecfe280f75ac139b5550 Author: Krzysztof Wilczyński Date: Sun Sep 6 22:39:49 2020 +0000 fs: Remove duplicated flag O_NDELAY occurring twice in VALID_OPEN_FLAGS The O_NDELAY flag occurs twice in the VALID_OPEN_FLAGS definition, this change removes the duplicate. There is no change to the functionality. Note, that the flags O_NONBLOCK and O_NDELAY are not duplicates, as values of these flags are platform dependent, and on platforms like Sparc O_NONBLOCK and O_NDELAY are not the same. This has been done that way to maintain the ABI compatibility with Solaris since the Sparc port was first introduced. This change resolves the following Coccinelle warning: include/linux/fcntl.h:11:13-21: duplicated argument to & or | Signed-off-by: Krzysztof Wilczyński Signed-off-by: Al Viro commit aa042f60e4961d4bec57e3268624df1f3a6befa4 Author: Song, Yoong Siang Date: Wed Sep 16 15:40:20 2020 +0800 net: stmmac: Add support to Ethtool get/set ring parameters This patch add support to --show-ring & --set-ring Ethtool functions: - Adding min, max, power of two check to new ring parameter's value. - Bring down the network interface before changing the value of ring parameters. - Bring up the network interface after changing the value of ring parameters. Signed-off-by: Song, Yoong Siang Signed-off-by: Voon Weifeng Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 18e9a407323fa8ffa2ba64c4240a2d4faeb9ad4d Merge: 045e42f3e6b1d 22881adf85934 Author: David S. Miller Date: Wed Sep 16 15:19:30 2020 -0700 Merge branch 'mlxsw-Refactor-headroom-management' Ido Schimmel says: ==================== mlxsw: Refactor headroom management Petr says: On Spectrum, port buffers, also called port headroom, is where packets are stored while they are parsed and the forwarding decision is being made. For lossless traffic flows, in case shared buffer admission is not allowed, headroom is also where to put the extra traffic received before the sent PAUSE takes effect. Another aspect of the port headroom is the so called internal buffer, which is used for egress mirroring. Linux supports two DCB interfaces related to the headroom: dcbnl_setbuffer for configuration, and dcbnl_getbuffer for inspection. In order to make it possible to implement these interfaces, it is first necessary to clean up headroom handling, which is currently strewn in several places in the driver. The end goal is an architecture whereby it is possible to take a copy of the current configuration, adjust parameters, and then hand the proposed configuration over to the system to implement it. When everything works, the proposed configuration is accepted and saved. First, this centralizes the reconfiguration handling to one function, which takes care of coordinating buffer size changes and priority map changes to avoid introducing drops. Second, the fact that the configuration is all in one place makes it easy to keep a backup and handle error path rollbacks, which were previously hard to understand. Patch #1 introduces struct mlxsw_sp_hdroom, which will keep port headroom configuration. Patch #2 unifies handling of delay provision between PFC and PAUSE. From now on, delay is to be measured in bytes of extra space, and will not include MTU. PFC handler sets the delay directly from the parameter it gets through the DCB interface. For PAUSE, MLXSW_SP_PAUSE_DELAY is converted to have the same meaning. In patches #3-#5, MTU, lossiness and priorities are gradually moved over to struct mlxsw_sp_hdroom. In patches #6-#11, handling of buffer resizing and priority maps is moved from spectrum.c and spectrum_dcb.c to spectrum_buffers.c. The API is gradually adapted so that struct mlxsw_sp_hdroom becomes the main interface through which the various clients express how the headroom should be configured. Patch #12 is a small cleanup that the previous transformation made possible. In patch #13, the port init code becomes a boring client of the headroom code, instead of rolling its own thing. Patches #14 and #15 move handling of internal mirroring buffer to the new headroom code as well. Previously, this code was in the SPAN module. This patchset converts the SPAN module to another boring client of the headroom code. ==================== Signed-off-by: David S. Miller commit 22881adf85934f220764636f0ec79a6124e93f64 Author: Petr Machata Date: Wed Sep 16 09:35:28 2020 +0300 mlxsw: spectrum_buffers: Manage internal buffer in the hdroom code Traffic mirroring modes that are in-chip implemented on egress need an internal buffer to work. As the only client, the SPAN module was managing the buffer so far. However logically it belongs to the buffers module. E.g. buffer size validation needs to take the size of the internal buffer into account. Therefore move the related code from SPAN to spectrum_buffers. Move over the callbacks that determine the minimum buffer size as a function of maximum speed and MTU. Add a field describing the internal buffer to struct mlxsw_sp_hdroom. Extend mlxsw_sp_hdroom_bufs_reset_sizes() to take care of sizing the internal buffer as well. Change the SPAN module to invoke that function and mlxsw_sp_hdroom_configure() like all the other hdroom clients. Drop the now-unnecessary mlxsw_sp_span_port_buffer_disable(). Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a41b96267c1d5b3a84492a01b0924541639a3372 Author: Petr Machata Date: Wed Sep 16 09:35:27 2020 +0300 mlxsw: spectrum_buffers: Introduce shared buffer ops The size of the internal buffer is currently calculated in the SPAN module. Logically it belongs to the spectrum_buffers module, where it should be moved. However, that being a chip-specific operation, it needs dynamic dispatch. There currently is a chip-specific structure for description of shared buffer values, struct mlxsw_sp_sb_vals. However placing ops into this structure would be confusing. Therefore introduce a new per-chip structure, currently empty, and initialize the ops pointer as appropriate. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0cda1a9b452333fbb4d74636de0a92f128972fd0 Author: Petr Machata Date: Wed Sep 16 09:35:26 2020 +0300 mlxsw: spectrum_buffers: Convert mlxsw_sp_port_headroom_init() Currently mlxsw_sp_port_headroom_init() configures both priomap and buffers by hand. Additionally, for port buffers, it configures buffer 0 with a size that it will never again have if PFC configuration is touched. Rewrite the init code to become a client of the new hdroom code. The only difference in invocation is that the configuration is forced, so that it is issued even if the desired configuration happens to match what is contained in (hitherto not initialized with meaningful values) mlxsw_sp_port->hdroom. Since now mlxsw_sp_port_headroom_init() initializes all the PG buffers to meaningful values, mlxsw_sp_hdroom_configure_buffers() can avoid querying the current configuration, and can fill the whole PBMC itself. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit bd3e86a5be721786f7967d64c2c99617637dbe43 Author: Petr Machata Date: Wed Sep 16 09:35:25 2020 +0300 mlxsw: spectrum_buffers: Inline mlxsw_sp_sb_max_headroom_cells() This function is now only used from the buffers module, and is a trivial field reference. Just inline it and drop the related artifacts. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 4c22f29f6369243af177ebfaaa2057aa620f5a64 Author: Petr Machata Date: Wed Sep 16 09:35:24 2020 +0300 mlxsw: spectrum_buffers: Move here the new headroom code Move all the headroom code to the spectrum_buffers module, where it belongs. Rename mlxsw_sp_pg_buf_threshold_get() and mlxsw_sp_pg_buf_pack() to ..._hdroom_... to match the naming convention of the new headroom code. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 7ace2c36aa8e797a4e163fda1f46433a86799b37 Author: Petr Machata Date: Wed Sep 16 09:35:23 2020 +0300 mlxsw: spectrum: Move here the three-step headroom configuration from DCB The ETS handler performs the headroom configuration in three steps: first it resizes the buffers and adds any new ones. Then it redirects priorities to the new buffers. And finally it sets the size of the now-unused buffers to zero. This way no packet drops are introduced. This sort of careful approach will also be useful for configuring port buffer sizes and priority map by hand, through dcbnl_setbuffer. Therefore move the code from the DCB handler to the generic headroom function. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit e9c97e0ece6b89cfe1cb33f171c62917522c4ce3 Author: Petr Machata Date: Wed Sep 16 09:35:22 2020 +0300 mlxsw: spectrum_dcb: Convert mlxsw_sp_port_pg_prio_map() to hdroom code The new hdroom code has certain conventions: iteration over priorities is done through a variable named `prio', configuration is not pushed unless it is dirty, but a `force' flag can be used to override this, updated configuration is written to port. Convert the function mlxsw_sp_port_pg_prio_map() to use these conventions and rename appropriately to fit in. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 8ec5e6b9776b21ac5d2b55c9632b5f9d394a4c5f Author: Petr Machata Date: Wed Sep 16 09:35:21 2020 +0300 mlxsw: spectrum_dcb: Convert ETS handler fully to mlxsw_sp_hdroom_configure() The ETS handler performs the headroom configuration in three steps: first it resizes the buffers and adds any new ones. Then it redirects priorities to the new buffers. And finally it sets the size of the now-unused buffers to zero. This way no packet drops are introduced. Both of the buffer size configuration operations are simply buffer size configurations, there is no material difference between setting buffers to zero and any other value. Therefore simply invoke the same mlxsw_sp_hdroom_configure(), and drop mlxsw_sp_port_pg_destroy() and mlxsw_sp_ets_has_pg() which are now unused. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 2d9f703f63015d61aeca6b21af5f29e23c5a72e7 Author: Petr Machata Date: Wed Sep 16 09:35:20 2020 +0300 mlxsw: spectrum: Split headroom autoresize out of buffer configuration Split mlxsw_sp_port_headroom_set() to three functions. mlxsw_sp_hdroom_bufs_reset_sizes() changes the sizes of the individual PG buffers, and mlxsw_sp_hdroom_configure_buffers() will actually apply the configuration. A third function, mlxsw_sp_hdroom_bufs_fit(), verifies that the requested buffer configuration matches total headroom size requirements. Add wrappers, mlxsw_sp_hdroom_configure() and __..., that will eventually perform full headroom configuration, but for now, only have them verify the configured headroom size, and invoke mlxsw_sp_hdroom_configure_buffers(). Have them take the `force` argument to prepare for a later patch, even though it is currently unused. Note that the loop in mlxsw_sp_hdroom_configure_buffers() only goes through DCBX_MAX_BUFFERS. Since there is no logic to configure the control buffer, it needs to keep the values queried from the FW. Eventually this function should configure all the PGs. Note that conversion of __mlxsw_sp_dcbnl_ieee_setets() is not trivial. That function performs the headroom configuration in three steps: first it resizes the buffers and adds any new ones. Then it redirects priorities to the new buffers. And finally it sets the size of the now-unused buffers to zero. This way no packet drops are introduced. So after invoking mlxsw_sp_hdroom_bufs_reset_sizes(), tweak the configuration to keep the old sizes of PG buffers for those buffers whose size was set to zero. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit aa7c06218474e866bd45163c208821b2c50497dd Author: Petr Machata Date: Wed Sep 16 09:35:19 2020 +0300 mlxsw: spectrum: Track buffer sizes in struct mlxsw_sp_hdroom So far, port buffers were always autoconfigured. When dcbnl_setbuffer callback is implemented, it will allow the user to change the buffer size configuration by hand. The sizes therefore need to be a configuration parameter, not always deduced, and therefore belong to struct mlxsw_sp_hdroom, where the configuration routine should take them from. Update mlxsw_sp_port_headroom_set() to update these sizes. Have the function update the sizes even for the case that a given buffer is not used. Additionally, change the loop iteration end to DCBX_MAX_BUFFERS instead of IEEE_8021QAZ_MAX_TCS. The value is the same, but the semantics differ. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ca21e84e7e14d2357386d7828402dcc6c5ccf77c Author: Petr Machata Date: Wed Sep 16 09:35:18 2020 +0300 mlxsw: spectrum: Track lossiness in struct mlxsw_sp_hdroom Client-side configuration has lossiness as an attribute of a priority. Therefore add a "lossy" attribute to struct mlxsw_sp_hdroom_prio. To a Spectrum ASIC, lossiness is a feature of a port buffer. Therefore add struct mlxsw_sp_hdroom_buf, which in the following patches will get more attributes, but right now only use it to track port buffer lossiness. Instead of passing around the primary indicators of PFC and pause_en, add a function mlxsw_sp_hdroom_bufs_reset_lossiness() to compute the buffer lossiness from the priority map and priority lossiness. Change mlxsw_sp_port_headroom_set() to take the buffer lossy flag from the headroom configuration. Have the PFC and pause handlers configure priority lossiness in mlxsw_sp_hdroom, from where it will propagate. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5df825ede4d3007b3401d4b06111a124fac29d21 Author: Petr Machata Date: Wed Sep 16 09:35:17 2020 +0300 mlxsw: spectrum: Track priorities in struct mlxsw_sp_hdroom The mapping from priorities to buffers determines which buffers should be configured. Lossiness of these priorities combined with the mapping determines whether a given buffer should be lossy. Currently this configuration is stored implicitly in DCB ETS, PFC and ethtool PAUSE configuration. Keeping it together with the rest of the headroom configuration and deriving it as needed from PFC / ETS / PAUSE will make things clearer. To that end, add a field "prios" to struct mlxsw_sp_hdroom. Previously, __mlxsw_sp_port_headroom_set() took prio_tc as an argument, and assumed that the same mapping as we use on the egress should be used on ingress as well. Instead, track this configuration at each priority, so that it can be adjusted flexibly. In the following patches, as dcbnl_setbuffer is implemented, it will need to store its own mapping, and it will also be sometimes necessary to revert back to the original ETS mapping. Therefore track two buffer indices: the one for chip configuration (buf_idx), and the source one (ets_buf_idx). Introduce a function to configure the chip-level buffer index, and for now have it simply copy the ETS mapping over to the chip mapping. Update the ETS handler to project prio_tc to the ets_buf_idx and invoke the buf_idx recomputation. Now that there is a canonical place to look for this configuration, mlxsw_sp_port_headroom_set() does not need to invent def_prio_tc to use if DCB is compiled out. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0103a3e452d613a6cfc0824e3a86d946e9ab3eef Author: Petr Machata Date: Wed Sep 16 09:35:16 2020 +0300 mlxsw: spectrum: Track MTU in struct mlxsw_sp_hdroom MTU influences sizes of auto-allocated buffers. Make it a part of port buffer configuration and have __mlxsw_sp_port_headroom_set() take it from there, instead of as an argument. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit b7e07bbd4873c4ea3265fb403c3ebab9dd241db9 Author: Petr Machata Date: Wed Sep 16 09:35:15 2020 +0300 mlxsw: spectrum: Unify delay handling between PFC and pause When a priority is marked as lossless using DCB PFC, or when pause frames are enabled on a port, mlxsw adds to port buffers an extra space to cover the traffic that will arrive between the time that a pause or PFC frame is emitted, and the time traffic actually stops. This is called the delay. The concept is the same in PFC and pause, however the way the extra buffer space is calculated differs. In this patch, unify this handling. Delay is to be measured in bytes of extra space, and will not include MTU. PFC handler sets the delay directly from the parameter it gets through the DCB interface. To convert pause handler, move MLXSW_SP_PAUSE_DELAY to ethtool module, convert to bytes, and reduce it by maximum MTU, and divide by two. Then it has the same meaning as the delay_bytes set by the PFC handler. Keep the delay_bytes value in struct mlxsw_sp_hdroom introduced in the previous patch. Change PFC and pause handlers to store the new delay value there and have __mlxsw_sp_port_headroom_set() take it from there. Instead of mlxsw_sp_pfc_delay_get() and mlxsw_sp_pg_buf_delay_get(), introduce mlxsw_sp_hdroom_buf_delay_get() to calculate the delay provision. Drop the unnecessary MLXSW_SP_CELL_FACTOR, and instead add an explanatory comment describing the formula used. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 3a77f5a2d23aab8b12b74d12ca429cba5b5db317 Author: Petr Machata Date: Wed Sep 16 09:35:14 2020 +0300 mlxsw: spectrum_buffers: Add struct mlxsw_sp_hdroom The port headroom handling is currently strewn across several modules and tricky to follow: MTU, DCB PFC, DCB ETS and ethtool pause all influence the settings, and then there is the completely separate initial configuraion in spectrum_buffers. A following patch will implement the dcbnl_setbuffer callback, which is going to further complicate the landscape. In order to simplify work with port buffers, the following patches are going to centralize all port-buffer handling in spectrum_buffers. As a first step, introduce a (currently empty) struct mlxsw_sp_hdroom that will keep the configuration parameters, and allocate and free it in appropriate places. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 045e42f3e6b1dd4c78ec82e980894543be86f782 Merge: 897dccb8db0d0 b7cf0806e8783 Author: David S. Miller Date: Wed Sep 16 15:16:51 2020 -0700 Merge tag 'mlx5-updates-2020-09-15' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-09-15 Various updates to mlx5 driver, 1) Eli adds support for TC trap action. 2) Eran, minor improvements to clock.c code structure 3) Better handling of error reporting in LAG from Jianbo 4) IPv6 traffic class (DSCP) header rewrite support from Maor 5) Ofer Levi adds support for CQE compression of multi-strides packets 6) Vu, Enables use of vport meta data by default. 7) Some minor code cleanup ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit aa662fc04f5b290b3979332588bf8d812b189962 Author: KP Singh Date: Wed Sep 16 18:02:42 2020 +0000 ima: Fix NULL pointer dereference in ima_file_hash ima_file_hash can be called when there is no iint->ima_hash available even though the inode exists in the integrity cache. It is fairly common for a file to not have a hash. (e.g. an mknodat, prior to the file being closed). Another example where this can happen (suggested by Jann Horn): Process A does: while(1) { unlink("/tmp/imafoo"); fd = open("/tmp/imafoo", O_RDWR|O_CREAT|O_TRUNC, 0700); if (fd == -1) { perror("open"); continue; } write(fd, "A", 1); close(fd); } and Process B does: while (1) { int fd = open("/tmp/imafoo", O_RDONLY); if (fd == -1) continue; char *mapping = mmap(NULL, 0x1000, PROT_READ|PROT_EXEC, MAP_PRIVATE, fd, 0); if (mapping != MAP_FAILED) munmap(mapping, 0x1000); close(fd); } Due to the race to get the iint->mutex between ima_file_hash and process_measurement iint->ima_hash could still be NULL. Fixes: 6beea7afcc72 ("ima: add the ability to query the cached hash of a given file") Signed-off-by: KP Singh Reviewed-by: Florent Revest Signed-off-by: Mimi Zohar commit 76fc8e854e3b0b4641acf596d4a59f36d9939083 Author: Rajat Jain Date: Tue Jul 7 15:46:04 2020 -0700 PCI/ACS: Enable Translation Blocking for external devices Translation Blocking is a required feature for Downstream Ports (Root Ports or Switch Downstream Ports) that implement ACS. When enabled, the Port checks the Address Type (AT) of each upstream Memory Request it receives. The default AT (00b) means "untranslated" and the IOMMU can decide whether to treat the address as I/O virtual or physical. If AT is not the default, i.e., if the Memory Request contains an already-translated (physical) address, the Port blocks the request and reports an ACS error. When enabling ACS, enable Translation Blocking for external-facing ports and untrusted (external) devices. This is to help prevent attacks from external devices that initiate DMA with physical addresses that bypass the IOMMU. [bhelgaas: commit log, simplify setting bit and drop warning; TB is required for Downstream Ports with ACS, so we should never see the warning] Link: https://lore.kernel.org/r/20200707224604.3737893-4-rajatja@google.com Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas commit 9f9f4101fc98db56714e71676d5a1e2d27e01f7e Author: Chris Wilson Date: Wed Sep 16 11:50:22 2020 +0100 drm/i915/selftests: Push the fake iommu device from the stack to data Since we store a pointer to the fake iommu device that is allocated on the stack, as soon as we leave the function it goes out of scope and any future dereference is undefined behaviour. Just in case we may need to look at the fake iommu device after initialiation, move the allocation from the stack into the data. Fixes: 01b9d4e21148 ("iommu/vt-d: Use dev_iommu_priv_get/set()") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200916105022.28316-2-chris@chris-wilson.co.uk commit b79ffa914ede785a721f42d8ee3ce7b8eeede2bb Author: Chris Wilson Date: Wed Sep 16 11:50:21 2020 +0100 drm/i915: Initialise outparam for error return from wait_for_register Just in case the caller passes in 0 for both slow&fast timeouts, make sure we initialise the stack value returned. Add an assert so that we don't make the mistake of passing 0 timeouts for the wait. drivers/gpu/drm/i915/intel_uncore.c:2011 __intel_wait_for_register_fw() error: uninitialized symbol 'reg_value'. References: 3f649ab728cd ("treewide: Remove uninitialized_var() usage") Signed-off-by: Chris Wilson Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200916105022.28316-1-chris@chris-wilson.co.uk commit 9f35cf8bd7e3347b0679c3f9b5e0bc5493925a1f Author: Stephen Kitt Date: Fri Sep 11 21:01:52 2020 +0200 docs: rewrite admin-guide/sysctl/abi.rst Following the structure used in sysctl/kernel.rst, this updates abi.rst to use ReStructured Text more fully and updates the entries to match current kernels: * the list of files is now the table of contents; * links are used to point to other documentation and other sections; * all the existing entries are no longer present, so this removes them; * document vsyscall32. Mentions of the kernel version are dropped. Since the document is entirely rewritten, I've replaced the copyright statement. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200911190152.29730-1-steve@sk2.org Signed-off-by: Jonathan Corbet commit a070991fe9d1b6d97eb3cf24a2a6ed5f8e7c0169 Author: Jonathan Cameron Date: Thu Sep 10 19:54:15 2020 +0100 kernel-doc: add support for ____cacheline_aligned attribute Subroutine dump_struct uses type attributes to check if the struct syntax is valid. Then, it removes all attributes before using it for output. `____cacheline_aligned` is an attribute that is not included in both steps. Add it, since it is used by kernel structs. Based on previous patch to add ____cacheline_aligned_in_smp. Motivated by patches to reorder this attribute to before the variable name. Whilst we could do that in all cases, that would be a massive change and it is more common in the kernel to place this particular attribute after the variable name. A quick grep suggests approximately 400 instances of which 341 have this attribute just before a semicolon and hence after the variable name. Signed-off-by: Jonathan Cameron Cc: Lee Jones Link: https://lore.kernel.org/r/20200910185415.653139-1-jic23@kernel.org Signed-off-by: Jonathan Corbet commit 5b280ed427cce6015f4d9a6f6b9334525e4c2f3c Author: Tian Tao Date: Thu Sep 10 20:19:46 2020 +0800 Documentation: arm64 also supports disable hugeiomap arm64 also supports disable hugeiomap,updated documentation. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1599740386-47210-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Jonathan Corbet commit f7ebd9ed7767e01db75fe313b78cd3882ab655e3 Author: Ralph Campbell Date: Wed Sep 9 14:29:56 2020 -0700 mm/doc: add usage description for migrate_vma_*() The migrate_vma_setup(), migrate_vma_pages(), and migrate_vma_finalize() API usage by device drivers is not well documented. Add a description for how device drivers are expected to use it. Signed-off-by: Ralph Campbell Reviewed-by: Alistair Popple Link: https://lore.kernel.org/r/20200909212956.20104-1-rcampbell@nvidia.com Signed-off-by: Jonathan Corbet commit b854e831014b498eeb7dd9aed15d6a7916edae24 Author: Stephen Boyd Date: Tue Sep 8 23:37:52 2020 -0700 docs: stable-ABI: Document /sys/kernel/notes Document the notes file in sysfs as the running vmlinux's .note section in binary format. Hopefully this helps someone like me realize the kernel exposes the note section in sysfs in the future. Take the date from when the file was introduced. It's been a while so presumably this is stable and not testing material. Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200909063752.931283-1-swboyd@chromium.org Signed-off-by: Jonathan Corbet commit 14b15f3f9c92c34342af508ef9c83df29bb28029 Author: Martin Blumenstingl Date: Tue Sep 15 21:26:21 2020 +0200 iio: adc: meson-saradc: Make the of_device_id array style consistent Use only one line for the closing bracket of the last entry and the opening bracket for the next one to keep the style across the whole array consistent. Also add a "sentinel" comment to the last entry and remove the comma to ensure that there won't be any entry after it. No functional changes. Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20200915192621.13202-1-martin.blumenstingl@googlemail.com Signed-off-by: Jonathan Cameron commit 13ca1a1be50180ccd700cff00a342156b1cdae8e Author: Alexandru Ardelean Date: Wed Sep 16 11:22:21 2020 +0300 iio: adc: ad9467: return ENODEV vs EINVAL in ad9467_setup() The proper error code should be ENODEV (vs EINVAL) in case the chip ID isn't recognized. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200916082221.72851-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 6026af6a53dffb50db87ef264294dff57ed3a845 Author: Alexandru Ardelean Date: Wed Sep 16 11:31:28 2020 +0300 iio: adc: ad9467: refine mismatch vs unknown chip-id messages We should probably print what the expected chip-ID is. We already have that information available, based on the device specified via device-tree. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200916083128.73729-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 7b9dc60ebd963d639b6931d59810497935db14e5 Author: Jonathan Cameron Date: Sat Sep 5 18:47:21 2020 +0100 staging:iio:documentation: Drop most generic docs These docs are both suffering from being out of date, and from being superceeded by the documentation in Documentation/driver-api/iio Note the inkern.txt drop is left for now as this is an area not well covered by the more recent documentation outside staging. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200905174721.216452-5-jic23@kernel.org commit d4ca7f94cee5e260051af50b4e7dec4f9c170cbd Author: Jonathan Cameron Date: Sat Sep 5 18:47:20 2020 +0100 staging:iio:light: drop stale ABI docs There are no remaining light drivers in staging/iio. The content of this file are either included in the non staging ABI docs, or don't seem to be used in any current driver. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200905174721.216452-4-jic23@kernel.org commit 5999439859b3c3f81c61d98b03b788ea5246021a Author: Jonathan Cameron Date: Sat Sep 5 18:47:19 2020 +0100 staging:iio:light: Move tsl2x7x ABI docs to correct location. These seem to be up to date but never moved out of staging when the driver did. Hence let us move them out now. Signed-off-by: Jonathan Cameron Reviewed-by: Brian Masney Cc: Brian Masney Link: https://lore.kernel.org/r/20200905174721.216452-3-jic23@kernel.org commit a2de31bda7e16d7262e472c8e56164e15d2ffb9d Author: Jonathan Cameron Date: Sat Sep 5 18:47:18 2020 +0100 staging:iio:dac:max517 remove documentation Whilst there is some useful info in here, it can be easily obtained from datasheets. Some of the info should perhaps be incorporated into a device tree bindings doc. As this didn't move out of staging with the driver, I'm suggesting we just drop it. We don't generally carry per driver documentation with the exception of non standard ABI which is not the case here. Signed-off-by: Jonathan Cameron Cc: Roland Stigge Link: https://lore.kernel.org/r/20200905174721.216452-2-jic23@kernel.org commit d4a4b78a0c0411820f131bcca4a14552089b7cbc Author: Liu Shixin Date: Mon Sep 14 14:54:01 2020 +0800 iio: adc: palmas_gpadc: use module_platform_driver to simplify the code module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20200914065401.3726354-1-liushixin2@huawei.com Signed-off-by: Jonathan Cameron commit d8f0cd76684e679d4a8ec4929fcdf6c3a030a007 Author: Nuno Sá Date: Tue Sep 15 14:02:58 2020 +0200 iio: adis: Drop non Managed device functions Drop `adis_setup_buffer_and_trigger()`. All users were updated to use the devm version of this function. This avoids having almost the same code repeated. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20200915120258.161587-11-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 9da328667316867b8604534bf9c0c38b6daa107e Author: Nuno Sá Date: Tue Sep 15 14:02:57 2020 +0200 staging: iio: adis16240: Use Managed device functions Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20200915120258.161587-10-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 460c7b4c1ab3699ad63720e2f19341568a7f1edc Author: Nuno Sá Date: Tue Sep 15 14:02:56 2020 +0200 staging: iio: adis16203: Use Managed device functions Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20200915120258.161587-9-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 514f641b3b2af794df90d61f4346e5858177665d Author: Nuno Sá Date: Tue Sep 15 14:02:55 2020 +0200 iio: adis16480: Use Managed device functions Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20200915120258.161587-8-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit fa623cddc040930207b57fa0c4767bbb8f7ac8a1 Author: Nuno Sá Date: Tue Sep 15 14:02:54 2020 +0200 iio: adis16460: Use Managed device functions Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20200915120258.161587-7-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit f13aa06442258275093addec9cb9ec907d82b2b5 Author: Nuno Sá Date: Tue Sep 15 14:02:53 2020 +0200 iio: adis16400: Use Managed device functions Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20200915120258.161587-6-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 5a9b7ca638461a0a5f91fd1cab8db2d496a2399b Author: Nuno Sá Date: Tue Sep 15 14:02:52 2020 +0200 iio: adis16260: Use Managed device functions Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20200915120258.161587-5-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 77802e097f1c07a0440a027bffdf9b177994451e Author: Nuno Sá Date: Tue Sep 15 14:02:51 2020 +0200 iio: adis16136: Use Managed device functions Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20200915120258.161587-4-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 17ff204ca827d09499f1cb42879edace49bd6b05 Author: Nuno Sá Date: Tue Sep 15 14:02:50 2020 +0200 iio: adis16209: Use Managed device functions Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20200915120258.161587-3-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit b79a22ee37ee44f5b63a28955000e7ae7240d9ab Author: Nuno Sá Date: Tue Sep 15 14:02:49 2020 +0200 iio: adis16201: Use Managed device functions Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20200915120258.161587-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 3c6fe911996fe1bcd3e667314b3ccb03efb46562 Author: Krzysztof Kozlowski Date: Thu Sep 10 18:19:33 2020 +0200 dt-bindings: iio: adc: exynos-adc: do not require syscon on S5Pv210 The ADC in S5Pv210 does not have ADC phy registers in separate block for which syscon would be needed. Remove this requirement to fix dtbs_check warnings like: arch/arm/boot/dts/s5pv210-fascinate4g.dt.yaml: adc@e1700000: 'samsung,syscon-phandle' is a required property Signed-off-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200910161933.9156-2-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 3b17dd220432379dcacd89ab8836a0efc42c5b9a Author: Krzysztof Kozlowski Date: Thu Sep 10 18:19:32 2020 +0200 dt-bindings: iio: adc: exynos-adc: require second interrupt with touch screen The ADC in S3C/S5P/Exynos SoCs can be used also for handling touch screen. In such case the second interrupt is required. This second interrupt can be anyway provided, even without touch screens. This fixes dtbs_check warnings like: arch/arm/boot/dts/s5pv210-aquila.dt.yaml: adc@e1700000: interrupts: [[23], [24]] is too long Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200910161933.9156-1-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 1bf0347a3ca189ebf05ed1d4b270d781488e407e Author: Jonathan Cameron Date: Sun Aug 30 17:11:54 2020 +0100 dt-bindings: iio: adc: ti,ads7950 binding conversion Conversion from txt to yaml. The binding documents that as not all boards will make use of the ADC channels via a consumer driver. It does no harm however, so we will leave it as required. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Reviewed-by: David Lechner Cc: David Lechner Link: https://lore.kernel.org/r/20200830161154.3201-3-jic23@kernel.org commit 9c53adbac03a0eaa6e1db9c6142325e055bd5610 Author: Jonathan Cameron Date: Sun Aug 30 17:11:53 2020 +0100 dt-bindings: iio: adc: ti,adc12138 yaml conversion. Simple binding conversion from txt to yaml. Only addition was #io-channel-cells to allow for potential consumers of the channels on this device. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Akinobu Mita Link: https://lore.kernel.org/r/20200830161154.3201-2-jic23@kernel.org commit f0e64305cf741c6f6f5fff2545dcb0d23218b2e7 Author: Sergiu Cuciurean Date: Wed Sep 16 12:27:31 2020 +0300 iio: frequency: adf4350: Replace indio_dev->mlock with own device lock As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock. The lock protect the state of the device from potential concurrent writes. The device is configured via a sequence of SPI writes, and this lock is meant to prevent the start of another sequence before another one has finished. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200916092731.77220-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 20be66c193be1a758c507fe28e8f77ad407d5039 Author: Sergiu Cuciurean Date: Wed Sep 16 12:25:35 2020 +0300 iio: dac: ti-dac7612: Replace indio_dev->mlock with own device lock As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock on the device's state from potential concurrent write accesses from userspace. The write operation requires an SPI write, then toggling of a GPIO, so the lock aims to protect the sanity of the entire sequence of operation. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200916092535.76527-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 2544ea7bd075948dcb0bdebfae739eb235c69728 Author: Sergiu Cuciurean Date: Wed Sep 16 12:23:49 2020 +0300 iio: stm32-dac: Replace indio_dev->mlock with own device lock As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock. The lock protects against potential races when reading the CR reg and then updating, so that the state of pm_runtime is consistent between the two operations. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean Signed-off-by: Alexandru Ardelean Reviewed-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20200916092349.75647-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 0df3c29f6883facf56ba422dbb060a1ad787f865 Author: Krzysztof Kozlowski Date: Fri Sep 11 16:33:43 2020 +0200 ARM: s3c64xx: bring back notes from removed debug-macro.S Documentation references notes from a removed debug-macro.S file so bring the contents here. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200911143343.498-3-krzk@kernel.org commit cafb3abea6136e59ea534004e5773361e196bb94 Author: Krzysztof Kozlowski Date: Tue Sep 15 17:56:40 2020 -0700 Input: sun4i-ps2 - fix handling of platform_get_irq() error platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: e443631d20f5 ("Input: serio - add support for Alwinner A10/A20 PS/2 controller") Signed-off-by: Krzysztof Kozlowski Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200828145744.3636-4-krzk@kernel.org Signed-off-by: Dmitry Torokhov commit c277e1f0dc3c7d7b5b028e20dd414df241642036 Author: Krzysztof Kozlowski Date: Tue Sep 15 17:56:19 2020 -0700 Input: twl4030_keypad - fix handling of platform_get_irq() error platform_get_irq() returns -ERRNO on error. In such case casting to unsigned and comparing to 0 would pass the check. Fixes: 7abf38d6d13c ("Input: twl4030-keypad - add device tree support") Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200828145744.3636-3-krzk@kernel.org Signed-off-by: Dmitry Torokhov commit 4738dd1992fa13acfbbd71800c71c612f466fa44 Author: Krzysztof Kozlowski Date: Tue Sep 15 17:52:15 2020 -0700 Input: omap4-keypad - fix handling of platform_get_irq() error platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: f3a1ba60dbdb ("Input: omap4-keypad - use platform device helpers") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200828145744.3636-2-krzk@kernel.org Signed-off-by: Dmitry Torokhov commit 7d50f6656dacf085a00beeedbc48b19a37d17881 Author: Krzysztof Kozlowski Date: Tue Sep 15 17:51:05 2020 -0700 Input: ep93xx_keypad - fix handling of platform_get_irq() error platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: 60214f058f44 ("Input: ep93xx_keypad - update driver to new core support") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200828145744.3636-1-krzk@kernel.org Signed-off-by: Dmitry Torokhov commit 26cb1d2fffb73ed66ba6eb958b070861465e29aa Author: Krzysztof Kozlowski Date: Fri Sep 11 16:32:51 2020 +0200 memory: omap-gpmc: Fix compile test on SPARC SPARC comes without CONFIG_OF_ADDRESS thus compile testing fails on linking: /usr/bin/sparc64-linux-gnu-ld: drivers/memory/omap-gpmc.o: in function `gpmc_probe_generic_child': omap-gpmc.c:(.text.unlikely+0x14ec): undefined reference to `of_platform_device_create' Fixes: ea0c0ad6b6eb ("memory: Enable compile testing for most of the drivers") Signed-off-by: Krzysztof Kozlowski Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20200911143251.399-1-krzk@kernel.org commit d04afe14b23651e7a8bc89727a759e982a8458e4 Author: YueHaibing Date: Wed Sep 16 10:26:09 2020 -0700 Input: stmfts - fix a & vs && typo In stmfts_sysfs_hover_enable_write(), we should check value and sdata->hover_enabled is all true. Fixes: 78bcac7b2ae1 ("Input: add support for the STMicroelectronics FingerTip touchscreen") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200916141941.16684-1-yuehaibing@huawei.com Signed-off-by: Dmitry Torokhov commit 925145f9e9eee8ac3b7d9eb53e0a9585ca671e1e Author: Dmitry Torokhov Date: Mon Sep 14 10:31:07 2020 -0700 Input: imx6ul_tsc - unify open/close and PM paths Open/close and resume/suspend paths are very similar, let's factor out common parts. Signed-off-by: Dmitry Torokhov commit 30df23c5ecdfb8da5b0bc17ceef67eff9e1b0957 Author: Dan Carpenter Date: Mon Sep 14 10:17:01 2020 -0700 Input: imx6ul_tsc - clean up some errors in imx6ul_tsc_resume() If imx6ul_tsc_init() fails then we need to clean up the clocks. I reversed the "if (input_dev->users) {" condition to make the code a bit simpler. Fixes: 6cc527b05847 ("Input: imx6ul_tsc - propagate the errors") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200905124942.GC183976@mwanda Signed-off-by: Dmitry Torokhov commit 93f634069707cfe562c38739f5062feccbe9a834 Author: Johnny Chuang Date: Wed Sep 16 10:26:57 2020 -0700 Input: elants_i2c - fix typo for an attribute to show calibration count Fixed typo for command from 0xE0 to 0xD0. Fixes: cf520c643012 ("Input: elants_i2c - provide an attribute to show calibration count") Signed-off-by: Johnny Chuang Link: https://lore.kernel.org/r/1600238783-32303-1-git-send-email-johnny.chuang.emc@gmail.com Signed-off-by: Dmitry Torokhov commit 6995a4c46331e39646e1bbe4418acf5cf00ef536 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:39 2020 +0200 ARM: dts: s5pv210: replace deprecated "gpios" i2c-gpio property in Goni "gpios" property is deprecated. Update the Goni DTS to fix dtbs_checks warnings like: i2c-pmic: 'sda-gpios' is a required property i2c-pmic: 'scl-gpios' is a required property Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-24-krzk@kernel.org commit ddeb5e7d3da885246d1f27e6ed03e4d38eacdb51 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:38 2020 +0200 ARM: dts: s5pv210: replace deprecated "gpios" i2c-gpio property in Aquila "gpios" property is deprecated. Update the Aquila DTS to fix dtbs_checks warnings like: i2c-pmic: 'sda-gpios' is a required property i2c-pmic: 'scl-gpios' is a required property Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-23-krzk@kernel.org commit 8fbc73dc57e13e5733b4a555b0c7d9dbb1a1fcd7 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:37 2020 +0200 ARM: dts: s5pv210: move fixed regulators under root node in Goni The fixed regulators are kept under dedicated "regulators" node but this causes multiple dtschema warnings: regulators: $nodename:0: 'regulators' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' regulators: #size-cells:0:0: 0 is not one of [1, 2] regulators: fixed-regulator@0:reg:0: [0] is too short regulators: fixed-regulator@1:reg:0: [1] is too short regulators: fixed-regulator@2:reg:0: [2] is too short regulators: fixed-regulator@3:reg:0: [3] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-22-krzk@kernel.org commit bb4e9860686b23e86427d1adbeec8703a19e0c04 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:36 2020 +0200 ARM: dts: s5pv210: move fixed regulators under root node in Aquila The fixed regulators are kept under dedicated "regulators" node but this causes multiple dtschema warnings: regulators: $nodename:0: 'regulators' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' regulators: #size-cells:0:0: 0 is not one of [1, 2] regulators: fixed-regulator@0:reg:0: [0] is too short regulators: fixed-regulator@1:reg:0: [1] is too short regulators: fixed-regulator@2:reg:0: [2] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-21-krzk@kernel.org commit fceeb3f69e5d04353758b03d94da4bec99ffaff9 Author: Krzysztof Kozlowski Date: Thu Sep 3 21:14:38 2020 +0200 arm64: dts: exynos: Align OPP table name with dt-schema Device tree nodes should have hyphens instead of underscores. This is also expected by the bindings. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903191438.12781-6-krzk@kernel.org commit 3a3a5a59ee622e7062a9b05ebed83b4dfc46f406 Author: Krzysztof Kozlowski Date: Thu Sep 3 21:14:37 2020 +0200 ARM: dts: exynos: Align OPP table name with dt-schema Device tree nodes should have hyphens instead of underscores. This is also expected by the bindings. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903191438.12781-5-krzk@kernel.org commit a0663189acf2861c2de4d5dc647b2111310ad0b2 Author: Krzysztof Kozlowski Date: Thu Sep 10 17:41:50 2020 +0200 ARM: s3c24xx: fix Wunused-variable warning on !MMU If S3C24xx machine code is build without CONFIG_MMU, the iotable() macros do nothing so annotate structures to get rid of warnings: arch/arm/mach-s3c24xx/common.c:140:24: warning: ‘s3c_iodesc’ defined but not used [-Wunused-variable] arch/arm/mach-s3c24xx/s3c2410.c:49:24: warning: ‘s3c2410_iodesc’ defined but not used [-Wunused-variable] arch/arm/mach-s3c24xx/s3c2412.c:60:24: warning: ‘s3c2412_iodesc’ defined but not used [-Wunused-variable] arch/arm/mach-s3c24xx/s3c2416.c:54:24: warning: ‘s3c2416_iodesc’ defined but not used [-Wunused-variable] arch/arm/mach-s3c24xx/s3c2443.c:45:24: warning: ‘s3c2443_iodesc’ defined but not used [-Wunused-variable] arch/arm/mach-s3c24xx/s3c244x.c:44:24: warning: ‘s3c244x_iodesc’ defined but not used [-Wunused-variable] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200910154150.3318-2-krzk@kernel.org commit c170f2eb9648bbc1cd46eac99bbcda7ce1b5a98f Author: Nícolas F. R. A. Prado Date: Fri Sep 11 13:34:46 2020 +0000 docs: Document cross-referencing between documentation pages The syntax to cross-reference between documentation pages wasn't documented anywhere. Document the cross-referencing using the new automarkup for Documentation/... and also Sphinx's doc directive for using relative paths. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20200911133339.327721-4-nfraprado@protonmail.com Signed-off-by: Jonathan Corbet commit d18b01789ae5abba2ce8dd23c984926eca3925a9 Author: Nícolas F. R. A. Prado Date: Fri Sep 11 13:34:39 2020 +0000 docs: Add automatic cross-reference for documentation pages Cross-referencing to other documentation pages is possible using the :doc:`doc-file` directive from Sphinx. Add automatic markup for references to other documentation pages in the format Documentation/subfolder/doc-file.rst (the extension being optional). This requires that the path be passed all the way from the Documentation folder, which can be longer than passing a relative path through the :doc: directive, but avoids the markup, making the text cleaner when read in plain text. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20200911133339.327721-3-nfraprado@protonmail.com Signed-off-by: Jonathan Corbet commit 1ac4cfb2ce03e1a7382c64fe73c9e16c0acc20db Author: Nícolas F. R. A. Prado Date: Fri Sep 11 13:34:33 2020 +0000 docs: Allow multiple automarkup functions The automarkup script previously matched expressions and substituted them with markup to enable automatic cross-reference all in the same function. Split the expression matching iteration and the markup substitution into different functions to make it easier to add new regular expressions and functions to treat each of them. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20200911133339.327721-2-nfraprado@protonmail.com Signed-off-by: Jonathan Corbet commit 7be0d19c751b02db778ca95e3274d5ea7f31891c Author: Krzysztof Kozlowski Date: Thu Sep 10 17:41:49 2020 +0200 ARM: samsung: fix PM debug build with DEBUG_LL but !MMU Selecting CONFIG_SAMSUNG_PM_DEBUG (depending on CONFIG_DEBUG_LL) but without CONFIG_MMU leads to build errors: arch/arm/plat-samsung/pm-debug.c: In function ‘s3c_pm_uart_base’: arch/arm/plat-samsung/pm-debug.c:57:2: error: implicit declaration of function ‘debug_ll_addr’ [-Werror=implicit-function-declaration] Fixes: 99b2fc2b8b40 ("ARM: SAMSUNG: Use debug_ll_addr() to get UART base address") Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Cc: Link: https://lore.kernel.org/r/20200910154150.3318-1-krzk@kernel.org commit 8caa6ed90b5895241fc178a3de566eab5aab97f4 Author: Lukas Bulwahn Date: Mon Sep 14 08:13:53 2020 +0200 MAINTAINERS: mark linux-samsung-soc list non-moderated In fifteen entries mentioning linux-samsung-soc@vger.kernel.org in MAINTAINERS, seven entries mention the list being moderated for non-subscribers and eight entries do not. Clearly only one can be right, though. Joe Perches suggested that all vger.kernel.org are not moderated for non-subscribers. Remove all the remarks from the entries following Joe's suggestion. Suggested-by: Joe Perches Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/lkml/da6f30896a8fd78635b3ca454d77a5292a9aa76d.camel@perches.com/ Link: https://lore.kernel.org/r/20200914061353.17535-1-lukas.bulwahn@gmail.com Signed-off-by: Krzysztof Kozlowski commit 3cc30e8dfcb625ba4bd62a75aba475581c967639 Author: Liu Shixin Date: Wed Sep 16 10:50:22 2020 +0800 RDMA/ipoib: Convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Link: https://lore.kernel.org/r/20200916025022.3992627-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 1d7c995820277944b7aafca1d05ce0c32775145c Author: Parav Pandit Date: Mon Sep 14 15:35:28 2020 +0300 RDMA/i40iw: Avoid typecast from void to pci_dev hw_context stores a pci_device pointer. Use the correct type instead of void * and avoid typecasts. Link: https://lore.kernel.org/r/20200914123528.270382-1-parav@mellanox.com Signed-off-by: Parav Pandit Acked-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 762cd288fc4a24a372f36408e69b1885967f94bb Author: Ard Biesheuvel Date: Wed Sep 9 17:11:50 2020 +0300 efi/libstub: arm32: Use low allocation for the uncompressed kernel Before commit d0f9ca9be11f25ef ("ARM: decompressor: run decompressor in place if loaded via UEFI") we were rather limited in the choice of base address for the uncompressed kernel, as we were relying on the logic in the decompressor that blindly rounds down the decompressor execution address to the next multiple of 128 MiB, and decompresses the kernel there. For this reason, we have a lot of complicated memory region handling code, to ensure that this memory window is available, even though it could be occupied by reserved regions or other allocations that may or may not collide with the uncompressed image. Today, we simply pass the target address for the decompressed image to the decompressor directly, and so we can choose a suitable window just by finding a 16 MiB aligned region, while taking TEXT_OFFSET and the region for the swapper page tables into account. So let's get rid of the complicated logic, and instead, use the existing bottom up allocation routine to allocate a suitable window as low as possible, and carve out a memory region that has the right properties. Note that this removes any dependencies on the 'dram_base' argument to handle_kernel_image(), and so this is removed as well. Given that this was the only remaining use of dram_base, the code that produces it is removed entirely as well. Reviewed-by: Maxim Uvarov Tested-by: Maxim Uvarov Signed-off-by: Ard Biesheuvel commit 1a895dbf4b66456bfb7da646cc9b1be3e24f4a1d Author: Ard Biesheuvel Date: Wed Sep 9 16:16:20 2020 +0300 efi/libstub: Export efi_low_alloc_above() to other units Permit arm32-stub.c to access efi_low_alloc_above() in a subsequent patch by giving it external linkage and declaring it in efistub.h. Reviewed-by: Maxim Uvarov Tested-by: Maxim Uvarov Signed-off-by: Ard Biesheuvel commit c1df5e0c5796f775e60d1aec0b52f6d03d66ccd4 Author: Arvind Sankar Date: Mon Sep 14 17:35:34 2020 -0400 efi/libstub: Add efi_warn and *_once logging helpers Add an efi_warn logging helper for warnings, and implement an analog of printk_once for once-only logging. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20200914213535.933454-1-nivedita@alum.mit.edu Signed-off-by: Ard Biesheuvel commit 6208857b8f7ebdfe84e1be7573be4552a5896a0d Author: Ard Biesheuvel Date: Thu Sep 10 17:09:45 2020 +0300 efi/libstub: arm32: Base FDT and initrd placement on image address The way we use the base of DRAM in the EFI stub is problematic as it is ill defined what the base of DRAM actually means. There are some restrictions on the placement of FDT and initrd which are defined in terms of dram_base, but given that the placement of the kernel in memory is what defines these boundaries (as on ARM, this is where the linear region starts), it is better to use the image address in these cases, and disregard dram_base altogether. Reviewed-by: Maxim Uvarov Tested-by: Maxim Uvarov Signed-off-by: Ard Biesheuvel commit 726bd8965a5f112d9601f7ce68effa1e46e02bf2 Author: Lenny Szubowicz Date: Fri Sep 4 21:31:07 2020 -0400 integrity: Load certs from the EFI MOK config table Because of system-specific EFI firmware limitations, EFI volatile variables may not be capable of holding the required contents of the Machine Owner Key (MOK) certificate store when the certificate list grows above some size. Therefore, an EFI boot loader may pass the MOK certs via a EFI configuration table created specifically for this purpose to avoid this firmware limitation. An EFI configuration table is a much more primitive mechanism compared to EFI variables and is well suited for one-way passage of static information from a pre-OS environment to the kernel. This patch adds the support to load certs from the MokListRT entry in the MOK variable configuration table, if it's present. The pre-existing support to load certs from the MokListRT EFI variable remains and is used if the EFI MOK configuration table isn't present or can't be successfully used. Signed-off-by: Lenny Szubowicz Link: https://lore.kernel.org/r/20200905013107.10457-4-lszubowi@redhat.com Signed-off-by: Ard Biesheuvel commit 38a1f03aa24094b4a8de846700cb6cb21cc06468 Author: Lenny Szubowicz Date: Fri Sep 4 21:31:06 2020 -0400 integrity: Move import of MokListRT certs to a separate routine Move the loading of certs from the UEFI MokListRT into a separate routine to facilitate additional MokList functionality. There is no visible functional change as a result of this patch. Although the UEFI dbx certs are now loaded before the MokList certs, they are loaded onto different key rings. So the order of the keys on their respective key rings is the same. Signed-off-by: Lenny Szubowicz Reviewed-by: Mimi Zohar Link: https://lore.kernel.org/r/20200905013107.10457-3-lszubowi@redhat.com Signed-off-by: Ard Biesheuvel commit 58c909022a5a56cd1d9e89c8c5461fd1f6a27bb5 Author: Lenny Szubowicz Date: Fri Sep 4 21:31:05 2020 -0400 efi: Support for MOK variable config table Because of system-specific EFI firmware limitations, EFI volatile variables may not be capable of holding the required contents of the Machine Owner Key (MOK) certificate store when the certificate list grows above some size. Therefore, an EFI boot loader may pass the MOK certs via a EFI configuration table created specifically for this purpose to avoid this firmware limitation. An EFI configuration table is a much more primitive mechanism compared to EFI variables and is well suited for one-way passage of static information from a pre-OS environment to the kernel. This patch adds initial kernel support to recognize, parse, and validate the EFI MOK configuration table, where named entries contain the same data that would otherwise be provided in similarly named EFI variables. Additionally, this patch creates a sysfs binary file for each EFI MOK configuration table entry found. These files are read-only to root and are provided for use by user space utilities such as mokutil. A subsequent patch will load MOK certs into the trusted platform key ring using this infrastructure. Signed-off-by: Lenny Szubowicz Link: https://lore.kernel.org/r/20200905013107.10457-2-lszubowi@redhat.com Signed-off-by: Ard Biesheuvel commit 5c4c30f40ca246f83b6663984dcdcbfeb0f8b66f Author: Tian Tao Date: Wed Sep 9 14:44:32 2020 +0800 efi/printf: remove unneeded semicolon Fix the warning below. efi/libstub/vsprintf.c:135:2-3: Unneeded semicolon Signed-off-by: Tian Tao Acked-by: Arvind Sankar Link: https://lore.kernel.org/r/1599633872-36784-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ard Biesheuvel commit 7c33e3c4c79ac5def79e7c773e38a7113eb14204 Author: Ricky Wu Date: Mon Sep 7 18:07:31 2020 +0800 misc: rtsx: Add power saving functions and fix driving parameter v4: split power down flow and power saving function to two patch v5: fix up modified change under the --- line Add rts522a L1 sub-state support Save more power on rts5227 rts5249 rts525a rts5260 Fix rts5260 driving parameter Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20200907100731.7722-1-ricky_wu@realtek.com Signed-off-by: Greg Kroah-Hartman commit 6010d9befc8df899b61378adfd153f0b53075092 Author: Jonathan Marek Date: Tue Sep 8 09:10:11 2020 -0400 misc: fastrpc: add ioctl for attaching to sensors pd Initializing sensors requires attaching to pd 2. Add an ioctl for that. This corresponds to FASTRPC_INIT_ATTACH_SENSORS in the downstream driver. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200908131013.19630-4-jonathan@marek.ca Signed-off-by: Greg Kroah-Hartman commit 84195d206e1fbd6309ee172ddfbe1673c1254488 Author: Jonathan Marek Date: Tue Sep 8 09:10:10 2020 -0400 misc: fastrpc: define names for protection domain ids Define SENSORS_PD for the next patch, to void using magic values for these. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200908131013.19630-3-jonathan@marek.ca Signed-off-by: Greg Kroah-Hartman commit 7c920da30e04c2dd78d988e0cefb8e5bd2e48b26 Author: Jonathan Marek Date: Tue Sep 8 09:10:09 2020 -0400 misc: fastrpc: fix indentation error in uapi header Use tabs instead of spaces. Fixes: 2419e55e532d ("misc: fastrpc: add mmap/unmap support") Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200908131013.19630-2-jonathan@marek.ca Signed-off-by: Greg Kroah-Hartman commit 0268eed10f12f785a618880920d90ee306fb2a50 Author: Ricky Wu Date: Mon Sep 7 18:07:18 2020 +0800 misc: rtsx: Fix power down flow Fix and sort out rtsx driver power down flow Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20200907100718.7672-1-ricky_wu@realtek.com Signed-off-by: Greg Kroah-Hartman commit bc28369c6189009b66d9619dd9f09bd8c684bb98 Author: Keita Suzuki Date: Wed Sep 9 07:18:51 2020 +0000 misc: rtsx: Fix memory leak in rtsx_pci_probe When mfd_add_devices() fail, pcr->slots should also be freed. However, the current implementation does not free the member, leading to a memory leak. Fix this by adding a new goto label that frees pcr->slots. Signed-off-by: Keita Suzuki Link: https://lore.kernel.org/r/20200909071853.4053-1-keitasuzuki.park@sslab.ics.keio.ac.jp Signed-off-by: Greg Kroah-Hartman commit 7369fa47c442a6d4268989b64fbc28af48f9126e Author: Colin Ian King Date: Thu Sep 10 16:12:21 2020 +0100 binder: remove redundant assignment to pointer n The pointer n 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. Acked-by: Todd Kjos Acked-by: Christian Brauner Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200910151221.751464-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit bc95fd0d7c4273034b9486aaf369777eaaa00cb7 Author: Thomas Gleixner Date: Wed Aug 26 13:17:06 2020 +0200 iommu/amd: Remove domain search for PCI/MSI Now that the domain can be retrieved through device::msi_domain the domain search for PCI_MSI[X] is not longer required. Remove it. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112334.400700807@linutronix.de commit 9f0ffb4bb3008e56fcd7ad5ff24467a8b7f1f2e7 Author: Thomas Gleixner Date: Wed Aug 26 13:17:05 2020 +0200 iommu/vt-d: Remove domain search for PCI/MSI[X] Now that the domain can be retrieved through device::msi_domain the domain search for PCI_MSI[X] is not longer required. Remove it. Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20200826112334.305699301@linutronix.de commit 874a2013a07dd8ec48413db5d06d27d02f7765b5 Author: Thomas Gleixner Date: Wed Aug 26 13:17:04 2020 +0200 x86/irq: Make most MSI ops XEN private Nothing except XEN uses the setup/teardown ops. Hide them there. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112334.198633344@linutronix.de commit 7ca435cf857dd63d29d5e0b785807f6988788d2f Author: Thomas Gleixner Date: Wed Aug 26 13:17:03 2020 +0200 x86/irq: Cleanup the arch_*_msi_irqs() leftovers Get rid of all the gunk and remove the 'select PCI_MSI_ARCH_FALLBACK' from the x86 Kconfig so the weak functions in the PCI core are replaced by stubs which emit a warning, which ensures that any fail to set the irq domain pointer results in a warning when the device is used. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112334.086003720@linutronix.de commit 077ee78e392869e46ae6bdc6ba2a3c4249d0b5e1 Author: Thomas Gleixner Date: Wed Aug 26 13:17:02 2020 +0200 PCI/MSI: Make arch_.*_msi_irq[s] fallbacks selectable The arch_.*_msi_irq[s] fallbacks are compiled in whether an architecture requires them or not. Architectures which are fully utilizing hierarchical irq domains should never call into that code. It's not only architectures which depend on that by implementing one or more of the weak functions, there is also a bunch of drivers which relies on the weak functions which invoke msi_controller::setup_irq[s] and msi_controller::teardown_irq. Make the architectures and drivers which rely on them select them in Kconfig and if not selected replace them by stub functions which emit a warning and fail the PCI/MSI interrupt allocation. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112333.992429909@linutronix.de commit 2c681e6b37674dc3941869cb262e26c8a6b34047 Author: Thomas Gleixner Date: Wed Aug 26 13:17:01 2020 +0200 x86/pci: Set default irq domain in pcibios_add_device() Now that interrupt remapping sets the irqdomain pointer when a PCI device is added it's possible to store the default irq domain in the device struct in pcibios_add_device(). If the bus to which a device is connected has an irq domain associated then this domain is used otherwise the default domain (PCI/MSI native or XEN PCI/MSI) is used. Using the bus domain ensures that special MSI bus domains like VMD work. This makes XEN and the non-remapped native case work solely based on the irq domain pointer in struct device for PCI/MSI and allows to remove the arch fallback and make most of the x86_msi ops private to XEN in the next steps. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112333.900423047@linutronix.de commit 2b2c6aa63824c69c112bbe4f937f034c5e606a6c Author: Thomas Gleixner Date: Wed Aug 26 13:17:00 2020 +0200 iommm/amd: Store irq domain in struct device As the next step to make X86 utilize the direct MSI irq domain operations store the irq domain pointer in the device struct when a device is probed. It only overrides the irqdomain of devices which are handled by a regular PCI/MSI irq domain which protects PCI devices behind special busses like VMD which have their own irq domain. No functional change. It just avoids the redirection through arch_*_msi_irqs() and allows the PCI/MSI core to directly invoke the irq domain alloc/free functions instead of having to look up the irq domain for every single MSI interupt. Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20200826112333.806328762@linutronix.de commit 85a8dfc57a0b96785881735e09a61a0fde911ca4 Author: Thomas Gleixner Date: Wed Aug 26 13:16:59 2020 +0200 iommm/vt-d: Store irq domain in struct device As a first step to make X86 utilize the direct MSI irq domain operations store the irq domain pointer in the device struct when a device is probed. This is done from dmar_pci_bus_add_dev() because it has to work even when DMA remapping is disabled. It only overrides the irqdomain of devices which are handled by a regular PCI/MSI irq domain which protects PCI devices behind special busses like VMD which have their own irq domain. No functional change. It just avoids the redirection through arch_*_msi_irqs() and allows the PCI/MSI core to directly invoke the irq domain alloc/free functions instead of having to look up the irq domain for every single MSI interupt. Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20200826112333.714566121@linutronix.de commit 2e4386eba0c0830becc5c88848b765950970533d Author: Thomas Gleixner Date: Wed Aug 26 13:16:58 2020 +0200 x86/xen: Wrap XEN MSI management into irqdomain To allow utilizing the irq domain pointer in struct device it is necessary to make XEN/MSI irq domain compatible. While the right solution would be to truly convert XEN to irq domains, this is an exercise which is not possible for mere mortals with limited XENology. Provide a plain irqdomain wrapper around XEN. While this is blatant violation of the irqdomain design, it's the only solution for a XEN igorant person to make progress on the issue which triggered this change. Signed-off-by: Thomas Gleixner Acked-by: Juergen Gross Link: https://lore.kernel.org/r/20200826112333.622352798@linutronix.de commit 43e9e705dd57c466c4bfe32ab8c17db537b89297 Author: Thomas Gleixner Date: Wed Aug 26 13:16:57 2020 +0200 irqdomain/msi: Allow to override msi_domain_alloc/free_irqs() To support MSI irq domains which do not fit at all into the regular MSI irqdomain scheme, like the XEN MSI interrupt management for PV/HVM/DOM0, it's necessary to allow to override the alloc/free implementation. This is a preperatory step to switch X86 away from arch_*_msi_irqs() and store the irq domain pointer right in struct device. No functional change for existing MSI irq domain users. Aside of the evil XEN wrapper this is also useful for special MSI domains which need to do extra alloc/free work before/after calling the generic core function. Work like allocating/freeing MSI descriptors, MSI storage space etc. Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20200826112333.526797548@linutronix.de commit 70b59379efc3c818f48b8037e574654fb29f907c Author: Thomas Gleixner Date: Wed Aug 26 13:16:56 2020 +0200 x86/xen: Consolidate XEN-MSI init X86 cannot store the irq domain pointer in struct device without breaking XEN because the irq domain pointer takes precedence over arch_*_msi_irqs() fallbacks. To achieve this XEN MSI interrupt management needs to be wrapped into an irq domain. Move the x86_msi ops setup into a single function to prepare for this. Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20200826112333.420224092@linutronix.de commit 7d4d892de6e74194fcfd4ff69f21ba3da97ae282 Author: Thomas Gleixner Date: Wed Aug 26 13:16:55 2020 +0200 x86/xen: Rework MSI teardown X86 cannot store the irq domain pointer in struct device without breaking XEN because the irq domain pointer takes precedence over arch_*_msi_irqs() fallbacks. XENs MSI teardown relies on default_teardown_msi_irqs() which invokes arch_teardown_msi_irq(). default_teardown_msi_irqs() is a trivial iterator over the msi entries associated to a device. Implement this loop in xen_teardown_msi_irqs() to prepare for removal of the fallbacks for X86. This is a preparatory step to wrap XEN MSI alloc/free into a irq domain which in turn allows to store the irq domain pointer in struct device and to use the irq domain functions directly. Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20200826112333.326841410@linutronix.de commit 2905c50b7d3eabd0fe718247aac86eeff3924ff8 Author: Thomas Gleixner Date: Wed Aug 26 13:16:54 2020 +0200 x86/xen: Make xen_msi_init() static and rename it to xen_hvm_msi_init() The only user is in the same file and the name is too generic because this function is only ever used for HVM domains. Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20200826112333.234097629@linutronix.de commit 2fd602669ee6d749a7dc47b84b87cef1a5075999 Author: Thomas Gleixner Date: Wed Aug 26 13:16:53 2020 +0200 PCI/MSI: Provide pci_dev_has_special_msi_domain() helper Provide a helper function to check whether a PCI device is handled by a non-standard PCI/MSI domain. This will be used to exclude such devices which hang of a special bus, e.g. VMD, to be excluded from the irq domain override in irq remapping. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20200826112333.139387358@linutronix.de commit d7f954e54079b4bf6088956d59f43768ec71269a Author: Thomas Gleixner Date: Wed Aug 26 13:16:52 2020 +0200 PCI_vmd_Mark_VMD_irqdomain_with_DOMAIN_BUS_VMD_MSI Devices on the VMD bus use their own MSI irq domain, but it is not distinguishable from regular PCI/MSI irq domains. This is required to exclude VMD devices from getting the irq domain pointer set by interrupt remapping. Override the default bus token. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20200826112333.047315047@linutronix.de commit c6c9e2838c5f0b94773511586123bcb125757f2a Author: Thomas Gleixner Date: Wed Aug 26 13:16:51 2020 +0200 irqdomain/msi: Provide DOMAIN_BUS_VMD_MSI PCI devices behind a VMD bus are not subject to interrupt remapping, but the irq domain for VMD MSI cannot be distinguished from a regular PCI/MSI irq domain. Add a new domain bus token and allow it in the bus token check in msi_check_reservation_mode() to keep the functionality the same once VMD uses this token. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Acked-by: Jon Derrick Link: https://lore.kernel.org/r/20200826112332.954409970@linutronix.de commit 6b15ffa07dc325f4e4dd98c877bfa970202c378b Author: Thomas Gleixner Date: Wed Aug 26 13:16:50 2020 +0200 x86/irq: Initialize PCI/MSI domain at PCI init time No point in initializing the default PCI/MSI interrupt domain early and no point to create it when XEN PV/HVM/DOM0 are active. Move the initialization to pci_arch_init() and convert it to init ops so that XEN can override it as XEN has it's own PCI/MSI management. The XEN override comes in a later step. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112332.859209894@linutronix.de commit 445d3595ab290ba16ca5f202c7a67d71460cb39f Author: Thomas Gleixner Date: Wed Aug 26 13:16:49 2020 +0200 x86/pci: Reducde #ifdeffery in PCI init code Adding a function call before the first #ifdef in arch_pci_init() triggers a 'mixed declarations and code' warning if PCI_DIRECT is enabled. Use stub functions and move the #ifdeffery to the header file where it is not in the way. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112332.767707340@linutronix.de commit bb733e4336988e40072c759fb27057b5fe82c7d4 Author: Thomas Gleixner Date: Wed Aug 26 13:16:48 2020 +0200 x86/irq: Move apic_post_init() invocation to one place No point to call it from both 32bit and 64bit implementations of default_setup_apic_routing(). Move it to the caller. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112332.658496557@linutronix.de commit 9006c133a422f474d7d8e10a8baae179f70c22f5 Author: Thomas Gleixner Date: Wed Aug 26 13:16:47 2020 +0200 x86/msi: Use generic MSI domain ops pci_msi_get_hwirq() and pci_msi_set_desc are not longer special. Enable the generic MSI domain ops in the core and PCI MSI code unconditionally and get rid of the x86 specific implementations in the X86 MSI code and in the hyperv PCI driver. Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20200826112332.564274859@linutronix.de commit 3b9c1d377d67072d1d8a2373b4969103cca00dab Author: Thomas Gleixner Date: Wed Aug 26 13:16:46 2020 +0200 x86/msi: Consolidate MSI allocation Convert the interrupt remap drivers to retrieve the pci device from the msi descriptor and use info::hwirq. This is the first step to prepare x86 for using the generic MSI domain ops. Signed-off-by: Thomas Gleixner Acked-by: Wei Liu Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20200826112332.466405395@linutronix.de commit dfb9eb7cf6cd0c0b0f2a1111fcc47b0a297b097d Author: Thomas Gleixner Date: Wed Aug 26 13:16:45 2020 +0200 PCI/MSI: Rework pci_msi_domain_calc_hwirq() Retrieve the PCI device from the msi descriptor instead of doing so at the call sites. Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20200826112332.352583299@linutronix.de commit 0f5cbdaf203e201f151c2e44a49f6165a7d2c2f9 Author: Thomas Gleixner Date: Wed Aug 26 13:16:44 2020 +0200 x86/irq: Consolidate UV domain allocation Move the UV specific fields into their own struct for readability sake. Get rid of the #ifdeffery as it does not matter at all whether the alloc info is a couple of bytes longer or not. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112332.255792469@linutronix.de commit 55e039157281f9d8ee7d595c2529a3fd4e790b52 Author: Thomas Gleixner Date: Wed Aug 26 13:16:43 2020 +0200 x86/irq: Consolidate DMAR irq allocation None of the DMAR specific fields are required. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112332.163462706@linutronix.de commit 33a65ba470c2b7031e513f7b165e68f51cfc55eb Author: Thomas Gleixner Date: Wed Aug 26 13:16:42 2020 +0200 x86_ioapic_Consolidate_IOAPIC_allocation Move the IOAPIC specific fields into their own struct and reuse the common devid. Get rid of the #ifdeffery as it does not matter at all whether the alloc info is a couple of bytes longer or not. Signed-off-by: Thomas Gleixner Acked-by: Wei Liu Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20200826112332.054367732@linutronix.de commit 2bf1e7bcedb8802cb4fc65757b229edfe112a4bb Author: Thomas Gleixner Date: Wed Aug 26 13:16:41 2020 +0200 x86/msi: Consolidate HPET allocation None of the magic HPET fields are required in any way. Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20200826112331.943993771@linutronix.de commit 874d9b3a958897e914982962fa25b3bb9dc07988 Author: Thomas Gleixner Date: Wed Aug 26 13:16:40 2020 +0200 x86/irq: Prepare consolidation of irq_alloc_info struct irq_alloc_info is a horrible zoo of unnamed structs in a union. Many of the struct fields can be generic and don't have to be type specific like hpet_id, ioapic_id... Provide a generic set of members to prepare for the consolidation. The goal is to make irq_alloc_info have the same basic member as the generic msi_alloc_info so generic MSI domain ops can be reused and yet more mess can be avoided when (non-PCI) device MSI support comes along. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112331.849577844@linutronix.de commit 6b6256e616f7e10c4434cfcd32371fc33ca94e48 Author: Thomas Gleixner Date: Wed Aug 26 13:16:39 2020 +0200 iommu/irq_remapping: Consolidate irq domain lookup Now that the iommu implementations handle the X86_*_GET_PARENT_DOMAIN types, consolidate the two getter functions. Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20200826112331.741909337@linutronix.de commit 192a99f4bd9d1d546ca276e058761a79af575744 Author: Thomas Gleixner Date: Wed Aug 26 13:16:38 2020 +0200 iommu/amd: Consolidate irq domain getter The irq domain request mode is now indicated in irq_alloc_info::type. Consolidate the two getter functions into one. Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20200826112331.634777249@linutronix.de commit 60e5a9397c0c4b7cecf05fec1aef8fe2ae5c9f3c Author: Thomas Gleixner Date: Wed Aug 26 13:16:37 2020 +0200 iommu/vt-d: Consolidate irq domain getter The irq domain request mode is now indicated in irq_alloc_info::type. Consolidate the two getter functions into one. Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20200826112331.530546013@linutronix.de commit b4c364da32cf3b85297648ff5563de2c47d9e32f Author: Thomas Gleixner Date: Wed Aug 26 13:16:36 2020 +0200 x86/irq: Add allocation type for parent domain retrieval irq_remapping_ir_irq_domain() is used to retrieve the remapping parent domain for an allocation type. irq_remapping_irq_domain() is for retrieving the actual device domain for allocating interrupts for a device. The two functions are similar and can be unified by using explicit modes for parent irq domain retrieval. Add X86_IRQ_ALLOC_TYPE_IOAPIC/HPET_GET_PARENT and use it in the iommu implementations. Drop the parent domain retrieval for PCI_MSI/X as that is unused. Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20200826112331.436350257@linutronix.de commit 801b5e4c4eec7b6c7f968d4bbce43da7cacffae4 Author: Thomas Gleixner Date: Wed Aug 26 13:16:35 2020 +0200 x86_irq_Rename_X86_IRQ_ALLOC_TYPE_MSI_to_reflect_PCI_dependency No functional change. Signed-off-by: Thomas Gleixner Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20200826112331.343103175@linutronix.de commit 9d55f02ad4e8bc67439ff6f8508e2275c3c5d41c Author: Thomas Gleixner Date: Wed Aug 26 13:16:34 2020 +0200 x86/msi: Remove pointless vcpu_affinity callback Setting the irq_set_vcpu_affinity() callback to irq_chip_set_vcpu_affinity_parent() is a pointless exercise because the function which utilizes it searchs the domain hierarchy to find a parent domain which has such a callback. Remove the useless indirection. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112331.250130127@linutronix.de commit b0a19555efd098183db0ee3ad52a3cd3bfbd1ba2 Author: Thomas Gleixner Date: Wed Aug 26 13:16:33 2020 +0200 x86/msi: Move compose message callback where it belongs Composing the MSI message at the MSI chip level is wrong because the underlying parent domain is the one which knows how the message should be composed for the direct vector delivery or the interrupt remapping table entry. The interrupt remapping aware PCI/MSI chip does that already. Make the direct delivery chip do the same and move the composition of the direct delivery MSI message to the vector domain irq chip. This prepares for the upcoming device MSI support to avoid having architecture specific knowledge in the device MSI domain irq chips. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112331.157603198@linutronix.de commit 13b90cadfc294718dd5a89e1fcf103477b01eb50 Author: Thomas Gleixner Date: Wed Aug 26 13:16:32 2020 +0200 genirq/chip: Use the first chip in irq_chip_compose_msi_msg() The documentation of irq_chip_compose_msi_msg() claims that with hierarchical irq domains the first chip in the hierarchy which has an irq_compose_msi_msg() callback is chosen. But the code just keeps iterating after it finds a chip with a compose callback. The x86 HPET MSI implementation relies on that behaviour, but that does not make it more correct. The message should always be composed at the domain which manages the underlying resource (e.g. APIC or remap table) because that domain knows about the required layout of the message. On X86 the following hierarchies exist: 1) vector -------- PCI/MSI 2) vector -- IR -- PCI/MSI The vector domain has a different message format than the IR (remapping) domain. So obviously the PCI/MSI domain can't compose the message without having knowledge about the parent domain, which is exactly the opposite of what hierarchical domains want to achieve. X86 actually has two different PCI/MSI chips where #1 has a compose callback and #2 does not. #2 delegates the composition to the remap domain where it belongs, but #1 does it at the PCI/MSI level. For the upcoming device MSI support it's necessary to change this and just let the first domain which can compose the message take care of it. That way the top level chip does not have to worry about it and the device MSI code does not need special knowledge about topologies. It just sets the compose callback to NULL and lets the hierarchy pick the first chip which has one. Due to that the attempt to move the compose callback from the direct delivery PCI/MSI domain to the vector domain made the system fail to boot with interrupt remapping enabled because in the remapping case irq_chip_compose_msi_msg() keeps iterating and choses the compose callback of the vector domain which obviously creates the wrong format for the remap table. Break out of the loop when the first irq chip with a compose callback is found and fixup the HPET code temporarily. That workaround will be removed once the direct delivery compose callback is moved to the place where it belongs in the vector domain. Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20200826112331.047917603@linutronix.de commit 585dfe8abc4460810c07114b64aca10a74fa2718 Author: Thomas Gleixner Date: Wed Aug 26 13:16:31 2020 +0200 PCI: vmd: Dont abuse vector irqomain as parent VMD has it's own PCI/MSI interrupt domain which is not in any way depending on the x86 vector domain. PCI devices behind VMD share the VMD MSIX vector entries via a VMD specific message translation to the actual VMD MSIX vector. The VMD device interrupt handler for the VMD MSIX vectors invokes all interrupt handlers of the devices which share a vector. Making the x86 vector domain the actual parent of the VMD irq domain is pointless and actually counterproductive. When a device interrupt is requested then it will activate the interrupt which traverses down the hierarchy and consumes an interrupt vector in the vector domain which is never used. The domain is self contained and has no parent dependencies, so just hand in NULL for the parent and be done with it. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112330.928952181@linutronix.de commit ccbecea1460201f87b92cc97bc4707e2c89ed654 Author: Thomas Gleixner Date: Wed Aug 26 13:16:30 2020 +0200 x86/init: Remove unused init ops Some past platform removal forgot to get rid of this unused ballast. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200826112330.806095671@linutronix.de commit 23357b61f8062a8a8c9c84c0252056cd6d849ec8 Author: Thomas Gleixner Date: Wed Aug 26 13:16:29 2020 +0200 iommu/amd: Prevent NULL pointer dereference Dereferencing irq_data before checking it for NULL is suboptimal. Signed-off-by: Thomas Gleixner Reviewed-by: Joerg Roedel commit 91bccf883e3cc4f3ab38db61538b68348a3ee9ee Author: Tom Rix Date: Sat Sep 12 07:47:19 2020 -0700 staging: wfx: simplify virt_addr_valid call Reviewing sram_write_dma_safe(), there are two identical calls to virt_addr_valid(). The second call can be simplified by a comparison of variables set from the first call. Reviewed-by: Jérôme Pouiller Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20200912144719.13929-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 267580db047ef428a70bef8287ca62c5a450c139 Author: peterz@infradead.org Date: Tue Sep 15 16:30:28 2020 +0200 seqlock: Unbreak lockdep seqcount_LOCKNAME_init() needs to be a macro due to the lockdep annotation in seqcount_init(). Since a macro cannot define another macro, we need to effectively revert commit: e4e9ab3f9f91 ("seqlock: Fold seqcount_LOCKNAME_init() definition"). Fixes: e4e9ab3f9f91 ("seqlock: Fold seqcount_LOCKNAME_init() definition") Reported-by: Qian Cai Debugged-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Tested-by: Qian Cai Link: https://lkml.kernel.org/r/20200915143028.GB2674@hirez.programming.kicks-ass.net commit 42d8a346c5c06689f4f25aecfa287a5aca501a55 Author: Xianting Tian Date: Wed Sep 16 14:21:29 2020 +0800 ipmi: add retry in try_get_dev_id() Use a retry machanism to give the BMC more opportunities to correctly respond when we receive specific completion codes. This is similar to what is done in __get_device_id(). Signed-off-by: Xianting Tian Message-Id: <20200916062129.26129-1-tian.xianting@h3c.com> [Moved GET_DEVICE_ID_MAX_RETRY to include/linux/ipmi.h, reworded some text.] Signed-off-by: Corey Minyard commit cdabce2e3dff7e4bcef73473987618569d178af3 Author: Jiafei Pan Date: Fri Aug 14 12:55:22 2020 +0800 softirq: Add debug check to __raise_softirq_irqoff() __raise_softirq_irqoff() must be called with interrupts disabled to protect the per CPU softirq pending state update against an interrupt and soft interrupt handling on return from interrupt. Add a lockdep assertion to validate the calling convention. [ tglx: Massaged changelog ] Signed-off-by: Jiafei Pan Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200814045522.45719-1-Jiafei.Pan@nxp.com commit 23f87274f0ad4a9167de23a330ed88966634fdf6 Author: Tetsuo Handa Date: Tue Sep 15 09:00:18 2020 +0900 sticon: remove no-op sticon_set_origin() We don't need to call vc->vc_sw->con_set_origin() from set_origin() if it is no-op. Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/20200915000019.3422-2-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman commit 1b24f46925d061b7fab70c828bac6774faf37f93 Author: Tetsuo Handa Date: Tue Sep 15 09:00:17 2020 +0900 newport_con: remove no-op newport_set_origin() We don't need to call vc->vc_sw->con_set_origin() from set_origin() if it is no-op. Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/20200915000019.3422-1-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman commit 5ec4f0ce42210095e633081172a483cc39bac914 Author: Lukas Bulwahn Date: Wed Sep 16 10:58:24 2020 +0200 net/mlx5: IPsec: make spdxcheck.py happy Commit 2d64663cd559 ("net/mlx5: IPsec: Add HW crypto offload support") provided a proper SPDX license expression, but slipped in a typo. Fortunately, ./scripts/spdxcheck.py warns: drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec_offload.c: 1:39 \ Invalid License ID: Linux-OpenIBt Remove the typo and make spdxcheck.py happy. Signed-off-by: Lukas Bulwahn Signed-off-by: Greg Kroah-Hartman commit 6bb951f193efc057c3242a878d70eb8c56efe505 Author: Mikhail Zaslonko Date: Wed Apr 1 23:13:16 2020 +0200 LICENSES/deprecated: add Zlib license text The new files contributed to zlib have Zlib SPDX license identifier. Since there was no Zlib license text in LICENSES, scripts/spdxcheck.py reported the following errors: lib/zlib_dfltcc/dfltcc.c: 1:28 Invalid License ID: Zlib lib/zlib_dfltcc/dfltcc.h: 1:28 Invalid License ID: Zlib lib/zlib_dfltcc/dfltcc_deflate.c: 1:28 Invalid License ID: Zlib lib/zlib_dfltcc/dfltcc_inflate.c: 1:28 Invalid License ID: Zlib lib/zlib_dfltcc/dfltcc_util.h: 1:28 Invalid License ID: Zlib The patch adds Zlib SPDX license to LICENSES/deprecated, thus resolving the issues reported by spdxcheck. Suggested-by: Lukas Bulwahn Reviewed-by: Lukas Bulwahn Signed-off-by: Mikhail Zaslonko Signed-off-by: Greg Kroah-Hartman commit 509edd95ede8e8e331f617c083d43f2927442fa9 Author: Mauro Carvalho Chehab Date: Wed Sep 9 07:14:32 2020 +0200 LICENSE: add GFDL deprecated licenses There are some files under Documentation which uses deprecated versions of GNU Free Documentation License, on both versions 1.1 and 1.2. On all cases, the license is with no Invariant Sections, Front-Cover Texts or Back-Cover Texts. Add the text file for them, as we'll start using SPDX for those. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman commit 951f3e9f208603f582f20007f16098dbbb0ab76c Author: Thomas Gleixner Date: Tue Sep 8 14:34:51 2020 +0200 net/qla3xxx: Convert to SPDX license identifiers All files related to this driver contain the following notice: See LICENSE.qla3xxx for copyright and licensing details. LICENSE.qla3xxx can be found in Documentation/networking/device_drivers/qlogic/. The file contains: - A copyright notice This copyright notice is redundant as all files contain the same copyright notice already - A license notice You may modify and redistribute the device driver code under the GNU General Public License (a copy of which is attached hereto as Exhibit A) published by the Free Software Foundation (version 2 or a later version). This can be replaced with the corresponding SPDX license identifier (GPL-2.0-or-later) in the source files which reference this license file. - A license for the device firmware This license is pointless in the context of the kernel as the firmware is not distributed as part of the kernel. LICENSE.qla2xxx contained exactly the same firmware license which was removed with commit bc3f957c069f ("[SCSI] qla2xxx: Update LICENSE.qla2xxx."). The firmware license is there due to the fact that the out of tree driver tarball which was available from the qlogic website contained the firmware binary. The firmware license in the qla3xxx license file got probably forgotten when the other qlogic license files were updated. Remove the notices and add the SPDX license identifier GPL-2.0-or-later to the source files. Finally remove the now redundant LICENSE.qla3xxx file. Reviewed-by: Richard Fontana Reviewed-by: Alexios Zavras Signed-off-by: Thomas Gleixner Signed-off-by: Lukas Bulwahn Signed-off-by: Greg Kroah-Hartman commit 936303f8eace3d0a3f7f61ff00c0cd0b6f328ac1 Author: Thomas Gleixner Date: Tue Sep 8 14:34:50 2020 +0200 net/qlge: Convert to SPDX license identifiers All files related to this driver contain the following notice: See LICENSE.qlge for copyright and licensing details. LICENSE.qlge can be found in Documentation/networking/device_drivers/qlogic/. The file contains: - A copyright notice This copyright notice is redundant as all files contain the same copyright notice already - A license notice You may modify and redistribute the device driver code under the GNU General Public License (a copy of which is attached hereto as Exhibit A) published by the Free Software Foundation (version 2). This can be replaced with the corresponding SPDX license identifier (GPL-2.0-only) in the source files which reference this license file. - The full GPLv2 license text A redundant copy of LICENSES/preferred/GPL-2.0 Remove the notices and add the SPDX license identifier GPL-2.0-only to the source files. Finally remove the now redundant LICENSE.qlge file. Reviewed-by: Richard Fontana Reviewed-by: Jilayne Lovejoy Reviewed-by: Alexios Zavras Signed-off-by: Thomas Gleixner Signed-off-by: Lukas Bulwahn Signed-off-by: Greg Kroah-Hartman commit 004b26b8e1d85e750e9700b7dbf19f03f73565b1 Author: Thomas Gleixner Date: Tue Sep 8 14:34:49 2020 +0200 net/qlcnic: Convert to SPDX license identifiers All files in this driver directory contain the following notice: See LICENSE.qlcnic for copyright and licensing details. LICENSE.qlacnic can be found in Documentation/networking/device_drivers/qlogic/. The file contains: - A copyright notice This copyright notice is redundant as all files contain the same copyright notice already - A license notice You may modify and redistribute the device driver code under the GNU General Public License (a copy of which is attached hereto as Exhibit A) published by the Free Software Foundation (version 2). This can be replaced with the corresponding SPDX license identifier (GPL-2.0-only) in the source files which reference this license file. - The full GPLv2 license text A redundant copy of LICENSES/preferred/GPL-2.0 Remove the notices and add the SPDX license identifier GPL-2.0-only to the source files. Finally remove the now redundant LICENSE.qlcnic file. Reviewed-by: Richard Fontana Reviewed-by: Jilayne Lovejoy Reviewed-by: Alexios Zavras Acked-by: Igor Russkikh Signed-off-by: Thomas Gleixner Signed-off-by: Lukas Bulwahn Signed-off-by: Greg Kroah-Hartman commit 77adf3f01bf7a48eb27a466ac4d14f410b80afc1 Author: Thomas Gleixner Date: Tue Sep 8 14:34:48 2020 +0200 scsi/qla2xxx: Convert to SPDX license identifiers All files in this driver directory contain the following notice: See LICENSE.qla2xxx for copyright and licensing details. LICENSE.qla2xxx can be found in Documentation/scsi/. The file contains: - A copyright notice This copyright notice is redundant as all files contain the same copyright notice already - A license notice You may modify and redistribute the device driver code under the GNU General Public License (a copy of which is attached hereto as Exhibit A) published by the Free Software Foundation (version 2). This can be replaced with the corresponding SPDX license identifier (GPL-2.0-only) in the source files which reference this license file. - The full GPLv2 license text A redundant copy of LICENSES/preferred/GPL-2.0 Remove the notices and add the SPDX license identifier GPL-2.0-only to the source files. Finally remove the now redundant LICENSE.qla2xxx file. Reviewed-by: Richard Fontana Reviewed-by: Jilayne Lovejoy Reviewed-by: Alexios Zavras Acked-by: Igor Russkikh Signed-off-by: Thomas Gleixner Signed-off-by: Lukas Bulwahn Acked-by: Nilesh Javali Signed-off-by: Greg Kroah-Hartman commit e3976af5a475b7c189d1fabec557a6e0aefa7fcd Author: Thomas Gleixner Date: Tue Sep 8 14:34:47 2020 +0200 scsi/qla4xxx: Convert to SPDX license identifiers All files in this driver directory contain the following notice: See LICENSE.qla4xxx for copyright and licensing details. LICENSE.qla4xxx can be found in Documentation/scsi/. The file contains: - A copyright notice This copyright notice is redundant as all files contain the same copyright notice already - A license notice You may modify and redistribute the device driver code under the GNU General Public License (a copy of which is attached hereto as Exhibit A) published by the Free Software Foundation (version 2). - The full GPLv2 license text This can be replaced with the corresponding SPDX license identifier (GPL-2.0-only) in the source files which reference this license file. - The full GPLv2 license text A redundant copy of LICENSES/preferred/GPL-2.0 Remove the notices and add the SPDX license identifier GPL-2.0-only to the source files. Finally remove the now redundant LICENSE.qla4xxx file. Reviewed-by: Richard Fontana Reviewed-by: Jilayne Lovejoy Reviewed-by: Alexios Zavras Signed-off-by: Thomas Gleixner Signed-off-by: Lukas Bulwahn Acked-by: Nilesh Javali Signed-off-by: Greg Kroah-Hartman commit a4ced376fed0f90e5da56aad1612fc37ed5cfdac Author: satya priya Date: Thu Sep 10 18:23:58 2020 +0530 tty: serial: qcom_geni_serial: Fix the UART wakeup issue As a part of system suspend uart_port_suspend is called from the Serial driver, which calls set_mctrl passing mctrl as 0. This makes RFR high(NOT_READY) during suspend. Due to this BT SoC is not able to send wakeup bytes to UART during suspend. Include if check for non-suspend case to keep RFR low during suspend. Signed-off-by: satya priya Reviewed-by: Akash Asthana Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/1599742438-16811-5-git-send-email-skakit@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit b5c8a2934eecbba3d688a911b98e92f8670ff462 Merge: e75130f20b1f4 fa35e868f9ddc Author: Michael Ellerman Date: Wed Sep 16 22:21:05 2020 +1000 Merge coregroup support into next From Srikar's cover letter, with some reformatting: Cleanup of existing powerpc topologies and add coregroup support on powerpc. Coregroup is a group of (subset of) cores of a DIE that share a resource. Summary of some of the testing done with coregroup patchset. It includes ebizzy, schbench, perf bench sched pipe and topology verification. On the left side are results from powerpc/next tree and on the right are the results with the patchset applied. Topological verification clearly shows that there is no change in topology with and without the patches on all the 3 class of systems that were tested. Power 9 PowerNV (2 Node/ 160 Cpu System) ---------------------------------------- Baseline Baseline + Coregroup Support N Min Max Median Avg Stddev N Min Max Median Avg Stddev 100 993884 1276090 1173476 1165914 54867.201 100 910470 1279820 1171095 1162091 67363.28 ^ ebizzy (Throughput of 100 iterations of 30 seconds higher throughput is better) schbench (latency hence lower is better) Latency percentiles (usec) Latency percentiles (usec) 50.0th: 455 50.0th: 454 75.0th: 533 75.0th: 543 90.0th: 683 90.0th: 701 95.0th: 743 95.0th: 737 *99.0th: 815 *99.0th: 805 99.5th: 839 99.5th: 835 99.9th: 913 99.9th: 893 min=0, max=1011 min=0, max=2833 perf bench sched pipe (lesser time and higher ops/sec is better) Running 'sched/pipe' benchmark: Running 'sched/pipe' benchmark: Executed 1000000 pipe operations between two processes Executed 1000000 pipe operations between two processes Total time: 6.083 [sec] Total time: 6.303 [sec] 6.083576 usecs/op 6.303318 usecs/op 164377 ops/sec 158646 ops/sec Power 9 LPAR (2 Node/ 128 Cpu System) ------------------------------------- Baseline Baseline + Coregroup Support N Min Max Median Avg Stddev N Min Max Median Avg Stddev 100 1058029 1295393 1200414 1188306.7 56786.538 100 943264 1287619 1180522 1168473.2 64469.955 ^ ebizzy (Throughput of 100 iterations of 30 seconds higher throughput is better) schbench (latency hence lower is better) Latency percentiles (usec) Latency percentiles (usec) 50.0000th: 34 50.0000th: 39 75.0000th: 46 75.0000th: 52 90.0000th: 53 90.0000th: 68 95.0000th: 56 95.0000th: 77 *99.0000th: 61 *99.0000th: 89 99.5000th: 63 99.5000th: 94 99.9000th: 81 99.9000th: 169 min=0, max=8405 min=0, max=23674 perf bench sched pipe (lesser time and higher ops/sec is better) Running 'sched/pipe' benchmark: Running 'sched/pipe' benchmark: Executed 1000000 pipe operations between two processes Executed 1000000 pipe operations between two processes Total time: 8.768 [sec] Total time: 5.217 [sec] 8.768400 usecs/op 5.217625 usecs/op 114045 ops/sec 191658 ops/sec Power 8 LPAR (8 Node/ 256 Cpu System) ------------------------------------- Baseline Baseline + Coregroup Support N Min Max Median Avg Stddev N Min Max Median Avg Stddev 100 1267615 1965234 1707423 1689137.6 144363.29 100 1175357 1924262 1691104 1664792.1 145876.4 ^ ebizzy (Throughput of 100 iterations of 30 seconds higher throughput is better) schbench (latency hence lower is better) Latency percentiles (usec) Latency percentiles (usec) 50.0th: 37 50.0th: 36 75.0th: 51 75.0th: 48 90.0th: 59 90.0th: 55 95.0th: 63 95.0th: 59 *99.0th: 71 *99.0th: 67 99.5th: 75 99.5th: 72 99.9th: 105 99.9th: 170 min=0, max=18560 min=0, max=27031 perf bench sched pipe (lesser time and higher ops/sec is better) Running 'sched/pipe' benchmark: Running 'sched/pipe' benchmark: Executed 1000000 pipe operations between two processes Executed 1000000 pipe operations between two processes Total time: 6.013 [sec] Total time: 5.930 [sec] 6.013963 usecs/op 5.930724 usecs/op 166279 ops/sec 168613 ops/sec Topology verification on Power9 Power9 / powernv / SMT4 $ tail /proc/cpuinfo cpu : POWER9, altivec supported clock : 3600.000000MHz revision : 2.2 (pvr 004e 1202) timebase : 512000000 platform : PowerNV model : 9006-22P machine : PowerNV 9006-22P firmware : OPAL MMU : Radix Baseline Baseline + Coregroup Support lscpu lscpu ------ ------ Architecture: ppc64le Architecture: ppc64le Byte Order: Little Endian Byte Order: Little Endian CPU(s): 160 CPU(s): 160 On-line CPU(s) list: 0-159 On-line CPU(s) list: 0-159 Thread(s) per core: 4 Thread(s) per core: 4 Core(s) per socket: 20 Core(s) per socket: 20 Socket(s): 2 Socket(s): 2 NUMA node(s): 2 NUMA node(s): 2 Model: 2.2 (pvr 004e 1202) Model: 2.2 (pvr 004e 1202) Model name: POWER9, altivec supported Model name: POWER9, altivec supported CPU max MHz: 3800.0000 CPU max MHz: 3800.0000 CPU min MHz: 2166.0000 CPU min MHz: 2166.0000 L1d cache: 32K L1d cache: 32K L1i cache: 32K L1i cache: 32K L2 cache: 512K L2 cache: 512K L3 cache: 10240K L3 cache: 10240K NUMA node0 CPU(s): 0-79 NUMA node0 CPU(s): 0-79 NUMA node8 CPU(s): 80-159 NUMA node8 CPU(s): 80-159 grep . /proc/sys/kernel/sched_domain/cpu0/domain*/name grep . /proc/sys/kernel/sched_domain/cpu0/domain*/name ----------------------------------------------------- ----------------------------------------------------- /proc/sys/kernel/sched_domain/cpu0/domain0/name:SMT /proc/sys/kernel/sched_domain/cpu0/domain0/name:SMT /proc/sys/kernel/sched_domain/cpu0/domain1/name:CACHE /proc/sys/kernel/sched_domain/cpu0/domain1/name:CACHE /proc/sys/kernel/sched_domain/cpu0/domain2/name:DIE /proc/sys/kernel/sched_domain/cpu0/domain2/name:DIE /proc/sys/kernel/sched_domain/cpu0/domain3/name:NUMA /proc/sys/kernel/sched_domain/cpu0/domain3/name:NUMA grep . /proc/sys/kernel/sched_domain/cpu0/domain*/flags grep . /proc/sys/kernel/sched_domain/cpu0/domain*/flags ------------------------------------------------------ ------------------------------------------------------ /proc/sys/kernel/sched_domain/cpu0/domain0/flags:2391 /proc/sys/kernel/sched_domain/cpu0/domain0/flags:2391 /proc/sys/kernel/sched_domain/cpu0/domain1/flags:2327 /proc/sys/kernel/sched_domain/cpu0/domain1/flags:2327 /proc/sys/kernel/sched_domain/cpu0/domain2/flags:2071 /proc/sys/kernel/sched_domain/cpu0/domain2/flags:2071 /proc/sys/kernel/sched_domain/cpu0/domain3/flags:12801 /proc/sys/kernel/sched_domain/cpu0/domain3/flags:12801 Baseline head /proc/schedstat -------------------- version 15 timestamp 4295043536 cpu0 0 0 0 0 0 0 9597119314 2408913694 11897 domain0 00000000,00000000,00000000,00000000,0000000f 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00000000,00000000,00000000,00000000,000000ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain2 00000000,00000000,0000ffff,ffffffff,ffffffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain3 ffffffff,ffffffff,ffffffff,ffffffff,ffffffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cpu1 0 0 0 0 0 0 4941435230 11106132 1583 domain0 00000000,00000000,00000000,00000000,0000000f 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00000000,00000000,00000000,00000000,000000ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Baseline + Coregroup Support head /proc/schedstat -------------------- version 15 timestamp 4296311826 cpu0 0 0 0 0 0 0 3353674045024 3781680865826 297483 domain0 00000000,00000000,00000000,00000000,0000000f 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00000000,00000000,00000000,00000000,000000ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain2 00000000,00000000,0000ffff,ffffffff,ffffffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain3 ffffffff,ffffffff,ffffffff,ffffffff,ffffffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cpu1 0 0 0 0 0 0 3337873293332 4231590033856 229090 domain0 00000000,00000000,00000000,00000000,0000000f 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00000000,00000000,00000000,00000000,000000ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Post sudo ppc64_cpu --smt=1 Post sudo ppc64_cpu --smt=1 --------------------- --------------------- grep . /proc/sys/kernel/sched_domain/cpu0/domain*/name grep . /proc/sys/kernel/sched_domain/cpu0/domain*/name ----------------------------------------------------- ----------------------------------------------------- /proc/sys/kernel/sched_domain/cpu0/domain0/name:CACHE /proc/sys/kernel/sched_domain/cpu0/domain0/name:CACHE /proc/sys/kernel/sched_domain/cpu0/domain1/name:DIE /proc/sys/kernel/sched_domain/cpu0/domain1/name:DIE /proc/sys/kernel/sched_domain/cpu0/domain2/name:NUMA /proc/sys/kernel/sched_domain/cpu0/domain2/name:NUMA grep . /proc/sys/kernel/sched_domain/cpu0/domain*/flags grep . /proc/sys/kernel/sched_domain/cpu0/domain*/flags ------------------------------------------------------ ------------------------------------------------------ /proc/sys/kernel/sched_domain/cpu0/domain0/flags:2327 /proc/sys/kernel/sched_domain/cpu0/domain0/flags:2327 /proc/sys/kernel/sched_domain/cpu0/domain1/flags:2071 /proc/sys/kernel/sched_domain/cpu0/domain1/flags:2071 /proc/sys/kernel/sched_domain/cpu0/domain2/flags:12801 /proc/sys/kernel/sched_domain/cpu0/domain2/flags:12801 Baseline: head /proc/schedstat -------------------- version 15 timestamp 4295046242 cpu0 0 0 0 0 0 0 10978610020 2658997390 13068 domain0 00000000,00000000,00000000,00000000,00000011 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00000000,00000000,00001111,11111111,11111111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain2 91111111,11111111,11111111,11111111,11111111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cpu4 0 0 0 0 0 0 5408663896 95701034 7697 domain0 00000000,00000000,00000000,00000000,00000011 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00000000,00000000,00001111,11111111,11111111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain2 91111111,11111111,11111111,11111111,11111111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Baseline + Coregroup Support head /proc/schedstat -------------------- version 15 timestamp 4296314905 cpu0 0 0 0 0 0 0 3355392013536 3781975150576 298723 domain0 00000000,00000000,00000000,00000000,00000011 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00000000,00000000,00001111,11111111,11111111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain2 91111111,11111111,11111111,11111111,11111111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cpu4 0 0 0 0 0 0 3351637920996 4427329763050 256776 domain0 00000000,00000000,00000000,00000000,00000011 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00000000,00000000,00001111,11111111,11111111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain2 91111111,11111111,11111111,11111111,11111111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Similar verification was done on Power 8 (8 Node 256 CPU LPAR) and Power 9 (2 node 128 Cpu LPAR) and they showed the topology before and after the patch to be identical. If Interested, I could provide the same. On Power 9 (with device-tree enablement to show coregroups): $ tail /proc/cpuinfo processor : 127 cpu : POWER9 (architected), altivec supported clock : 3000.000000MHz revision : 2.2 (pvr 004e 0202) timebase : 512000000 platform : pSeries model : IBM,9008-22L machine : CHRP IBM,9008-22L MMU : Hash Before patchset: $ cat /proc/sys/kernel/sched_domain/cpu0/domain*/name SMT CACHE DIE NUMA $ head /proc/schedstat version 15 timestamp 4318242208 cpu0 0 0 0 0 0 0 28077107004 4773387362 78205 domain0 00000000,00000000,00000000,00000055 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00000000,00000000,00000000,000000ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain2 00000000,00000000,ffffffff,ffffffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain3 ffffffff,ffffffff,ffffffff,ffffffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cpu1 0 0 0 0 0 0 24177439200 413887604 75393 domain0 00000000,00000000,00000000,000000aa 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00000000,00000000,00000000,000000ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 After patchset: $ cat /proc/sys/kernel/sched_domain/cpu0/domain*/name SMT CACHE MC DIE NUMA $ head /proc/schedstat version 15 timestamp 4318242208 cpu0 0 0 0 0 0 0 28077107004 4773387362 78205 domain0 00000000,00000000,00000000,00000055 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain1 00000000,00000000,00000000,000000ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain2 00000000,00000000,00000000,ffffffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain3 00000000,00000000,ffffffff,ffffffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 domain4 ffffffff,ffffffff,ffffffff,ffffffff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cpu1 0 0 0 0 0 0 24177439200 413887604 75393 domain0 00000000,00000000,00000000,000000aa 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 commit 885c4f4d6cf448f6e64f407c48d8cfbecef3fb14 Author: Wan Ahmad Zainie Date: Mon Sep 14 07:55:22 2020 +0800 phy: intel: Add Keem Bay eMMC PHY support Add support for eMMC PHY on Intel Keem Bay SoC. Signed-off-by: Wan Ahmad Zainie Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200913235522.4316-4-wan.ahmad.zainie.wan.mohamad@intel.com Signed-off-by: Vinod Koul commit 9580b22aca2c6996d4d2126cda0a610eb43165b9 Author: Wan Ahmad Zainie Date: Mon Sep 14 07:55:21 2020 +0800 dt-bindings: phy: intel: Add Keem Bay eMMC PHY bindings Binding description for Intel Keem Bay eMMC PHY. Signed-off-by: Wan Ahmad Zainie Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200913235522.4316-3-wan.ahmad.zainie.wan.mohamad@intel.com Signed-off-by: Vinod Koul commit fa687038ba7f71ab2e5ae8701eaf95c72102cd01 Author: Wan Ahmad Zainie Date: Mon Sep 14 07:55:20 2020 +0800 phy: intel: Rename phy-intel to phy-intel-lgm Rename phy-intel-{combo,emmc}.c to phy-intel-lgm-{combo,emmc}.c to make drivers/phy/intel directory more generic for future use. Signed-off-by: Wan Ahmad Zainie Reviewed-by: Ramuthevar Vadivel Murugan Link: https://lore.kernel.org/r/20200913235522.4316-2-wan.ahmad.zainie.wan.mohamad@intel.com Signed-off-by: Vinod Koul commit fa35e868f9ddcbb7984fd5ab7f91aef924fa8543 Author: Srikar Dronamraju Date: Mon Aug 10 12:48:34 2020 +0530 powerpc/smp: Implement cpu_to_coregroup_id Lookup the coregroup id from the associativity array. If unable to detect the coregroup id, fallback on the core id. This way, ensure sched_domain degenerates and an extra sched domain is not created. Ideally this function should have been implemented in arch/powerpc/kernel/smp.c. However if its implemented in mm/numa.c, we don't need to find the primary domain again. If the device-tree mentions more than one coregroup, then kernel implements only the last or the smallest coregroup, which currently corresponds to the penultimate domain in the device-tree. Signed-off-by: Srikar Dronamraju Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200810071834.92514-11-srikar@linux.vnet.ibm.com commit 72730bfc2a2b91a525f38dfc830f598bdb95f216 Author: Srikar Dronamraju Date: Mon Aug 10 12:48:33 2020 +0530 powerpc/smp: Create coregroup domain Add percpu coregroup maps and masks to create coregroup domain. If a coregroup doesn't exist, the coregroup domain will be degenerated in favour of SMT/CACHE domain. Do note this patch is only creating stubs for cpu_to_coregroup_id. The actual cpu_to_coregroup_id implementation would be in a subsequent patch. Signed-off-by: Srikar Dronamraju Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200810071834.92514-10-srikar@linux.vnet.ibm.com commit 6e086302816b2ced602bc99641eb0189c05f018a Author: Srikar Dronamraju Date: Mon Aug 10 12:48:32 2020 +0530 powerpc/smp: Allocate cpumask only after searching thread group If allocated earlier and the search fails, then cpu_l1_cache_map cpumask is unnecessarily cleared. However cpu_l1_cache_map can be allocated / cleared after we search thread group. Please note CONFIG_CPUMASK_OFFSTACK is not set on Powerpc. Hence cpumask allocated by zalloc_cpumask_var_node is never freed. Signed-off-by: Srikar Dronamraju Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200810071834.92514-9-srikar@linux.vnet.ibm.com commit 57d39c7697ed52e51805dc97135c9b49469ce2ff Author: Rikard Falkeborn Date: Sat Sep 12 22:46:39 2020 +0200 phy: cadence: torrent: Constify regmap_config structs The regmap_config structs are never modified and can be made const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200912204639.501669-4-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit f9f130ff2ec93c5949576bbfb168cc9530c23649 Author: Srikar Dronamraju Date: Mon Aug 10 12:48:31 2020 +0530 powerpc/numa: Detect support for coregroup Add support for grouping cores based on the device-tree classification. - The last domain in the associativity domains always refers to the core. - If primary reference domain happens to be the penultimate domain in the associativity domains device-tree property, then there are no coregroups. However if its not a penultimate domain, then there are coregroups. There can be more than one coregroup. For now we would be interested in the last or the smallest coregroups, i.e one sub-group per DIE. Currently there are no firmwares that are exposing this grouping. Hence allow the basis for grouping to be abstract. Once the firmware starts using this grouping, code would be added to detect the type of grouping and adjust the sd domain flags accordingly. Signed-off-by: Srikar Dronamraju Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200810071834.92514-8-srikar@linux.vnet.ibm.com commit 2f4a3d8b7c046e01dcc289971799b4818b11c70a Author: Rikard Falkeborn Date: Sat Sep 12 22:46:38 2020 +0200 phy: cadence: salvo: Constify cdns_nxp_sequence_pair cdns_nxp_sequence_pair[] are never modified and can be made const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20200912204639.501669-3-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit caa8e29da59926bef099b46ab6280333d583e944 Author: Srikar Dronamraju Date: Mon Aug 10 12:48:30 2020 +0530 powerpc/smp: Optimize start_secondary In start_secondary, even if shared_cache was already set, system does a redundant match for cpumask. This redundant check can be removed by checking if shared_cache is already set. While here, localize the sibling_mask variable to within the if condition. Signed-off-by: Srikar Dronamraju Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200810071834.92514-7-srikar@linux.vnet.ibm.com commit 3cfb0e8e41621677eaa68becf9d86a8febe3b3fe Author: Rikard Falkeborn Date: Sat Sep 12 22:46:37 2020 +0200 phy: cadence: Sierra: Constify static structs The static cdns_reg_pairs and regmap_config structs are not modified and can be made const. This allows the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200912204639.501669-2-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit f6606cfdfbcda00ce8a6e63c8fc13c93e73ac059 Author: Srikar Dronamraju Date: Sun Sep 13 22:40:38 2020 +0530 powerpc/smp: Dont assume l2-cache to be superset of sibling Current code assumes that cpumask of cpus sharing a l2-cache mask will always be a superset of cpu_sibling_mask. Lets stop that assumption. cpu_l2_cache_mask is a superset of cpu_sibling_mask if and only if shared_caches is set. Reviewed-by: Gautham R. Shenoy Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200913171038.GB11808@linux.vnet.ibm.com commit 3c6032a8fe99547d31b2b57715e303a67d1b0c66 Author: Srikar Dronamraju Date: Mon Aug 10 12:48:28 2020 +0530 powerpc/smp: Move topology fixups into a new function Move topology fixup based on the platform attributes into its own function which is called just before set_sched_topology. Signed-off-by: Srikar Dronamraju Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200810071834.92514-5-srikar@linux.vnet.ibm.com commit 5e93f16ae48b728775496429c6db53d0bf8cdd9b Author: Srikar Dronamraju Date: Mon Aug 10 12:48:27 2020 +0530 powerpc/smp: Move powerpc_topology above Just moving the powerpc_topology description above. This will help in using functions in this file and avoid declarations. No other functional changes Signed-off-by: Srikar Dronamraju Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200810071834.92514-4-srikar@linux.vnet.ibm.com commit 2ef0ca54d97f40f7621d595ac5479bd7fa076bfa Author: Srikar Dronamraju Date: Mon Aug 10 12:48:26 2020 +0530 powerpc/smp: Merge Power9 topology with Power topology A new sched_domain_topology_level was added just for Power9. However the same can be achieved by merging powerpc_topology with power9_topology and makes the code more simpler especially when adding a new sched domain. Signed-off-by: Srikar Dronamraju Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200810071834.92514-3-srikar@linux.vnet.ibm.com commit d0fd24bbd27619d7b8d4da26a19a2027931ae9fc Author: Srikar Dronamraju Date: Mon Aug 10 12:48:25 2020 +0530 powerpc/smp: Fix a warning under !NEED_MULTIPLE_NODES Fix a build warning in a non CONFIG_NEED_MULTIPLE_NODES "error: _numa_cpu_lookup_table_ undeclared" Signed-off-by: Srikar Dronamraju Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200810071834.92514-2-srikar@linux.vnet.ibm.com commit c360c9a238d1754b1ee8f1c3368ef36794e1daab Author: Vasily Gorbik Date: Fri Sep 11 11:44:47 2020 +0200 s390/kasan: support protvirt with 4-level paging Currently the kernel crashes in Kasan instrumentation code if CONFIG_KASAN_S390_4_LEVEL_PAGING is used on protected virtualization capable machine where the ultravisor imposes addressing limitations on the host and those limitations are lower then KASAN_SHADOW_OFFSET. The problem is that Kasan has to know in advance where vmalloc/modules areas would be. With protected virtualization enabled vmalloc/modules areas are moved down to the ultravisor secure storage limit while kasan still expects them at the very end of 4-level paging address space. To fix that make Kasan recognize when protected virtualization is enabled and predefine vmalloc/modules areas position which are compliant with ultravisor secure storage limit. Kasan shadow itself stays in place and might reside above that ultravisor secure storage limit. One slight difference compaired to a kernel without Kasan enabled is that vmalloc/modules areas position is not reverted to default if ultravisor initialization fails. It would still be below the ultravisor secure storage limit. Kernel layout with kasan, 4-level paging and protected virtualization enabled (ultravisor secure storage limit is at 0x0000800000000000): ---[ vmemmap Area Start ]--- 0x0000400000000000-0x0000400080000000 ---[ vmemmap Area End ]--- ---[ vmalloc Area Start ]--- 0x00007fe000000000-0x00007fff80000000 ---[ vmalloc Area End ]--- ---[ Modules Area Start ]--- 0x00007fff80000000-0x0000800000000000 ---[ Modules Area End ]--- ---[ Kasan Shadow Start ]--- 0x0018000000000000-0x001c000000000000 ---[ Kasan Shadow End ]--- 0x001c000000000000-0x0020000000000000 1P PGD I Kernel layout with kasan, 4-level paging and protected virtualization disabled/unsupported: ---[ vmemmap Area Start ]--- 0x0000400000000000-0x0000400060000000 ---[ vmemmap Area End ]--- ---[ Kasan Shadow Start ]--- 0x0018000000000000-0x001c000000000000 ---[ Kasan Shadow End ]--- ---[ vmalloc Area Start ]--- 0x001fffe000000000-0x001fffff80000000 ---[ vmalloc Area End ]--- ---[ Modules Area Start ]--- 0x001fffff80000000-0x0020000000000000 ---[ Modules Area End ]--- Signed-off-by: Vasily Gorbik commit c2314cb2dd4140cb14b79a8139be34459777f421 Author: Vasily Gorbik Date: Fri Sep 11 11:40:21 2020 +0200 s390/protvirt: support ultravisor without secure storage limit Avoid potential crash due to lack of secure storage limit. Check that max_sec_stor_addr is not 0 before adjusting vmalloc position. Signed-off-by: Vasily Gorbik commit 1d6671ae46e52e383bc6eea8d33bdd32ae61b323 Author: Vasily Gorbik Date: Fri Sep 11 11:38:21 2020 +0200 s390/protvirt: parse prot_virt option in the decompressor To make early kernel address space layout definition possible parse prot_virt option in the decompressor and pass it to the uncompressed kernel. This enables kasan to take ultravisor secure storage limit into consideration and pre-define vmalloc position correctly. Signed-off-by: Vasily Gorbik commit 8f78657c291f9e5ec26a2a9187938b374629d176 Author: Vasily Gorbik Date: Thu Sep 10 22:54:58 2020 +0200 s390/kasan: avoid unnecessary moving of vmemmap Currently vmemmap area is unconditionally moved beyond Kasan shadow memory. When Kasan is not enabled vmemmap area position is calculated in setup_memory_end() and depends on limiting factors like ultravisor secure storage limit. Try to follow the same logic with Kasan enabled as well and avoid unnecessary vmemmap area position changes unless it really intersects with Kasan shadow. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit ee4b2ce6d1e3baa412148a7b0889f6643749c665 Author: Vasily Gorbik Date: Thu Sep 10 22:51:17 2020 +0200 s390/mm,ptdump: sort markers Kasan configuration options and size of physical memory present could affect kernel memory layout. In particular vmemmap, vmalloc and modules might come before kasan shadow or after it. To make ptdump correctly output markers in the right order markers have to be sorted. To preserve the original order of markers with the same start address avoid using sort() from lib/sort.c (which is not stable sorting algorithm) and sort markers in place. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 4904e1941ee334bf1f90e4017a37f7c8a52b685c Author: Niklas Schnelle Date: Tue Sep 15 10:42:41 2020 +0200 s390/pci: add missing pci_iov.h include this fixes a missing prototype compiler warning spotted by the kernel test robot. Fixes: abb95b7550f8 ("s390/pci: consolidate SR-IOV specific code") Reported-by: kernel test robot Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit 48111b4838480d1357783f4231c351bb2ba2d27d Author: Heiko Carstens Date: Tue Sep 15 12:52:36 2020 +0200 s390/mm,ptdump: add proper ifdefs Use ifdefs instead of IS_ENABLED() to avoid compile error for !PTDUMP_DEBUGFS: arch/s390/mm/dump_pagetables.c: In function ‘pt_dump_init’: arch/s390/mm/dump_pagetables.c:248:64: error: ‘ptdump_fops’ undeclared (first use in this function); did you mean ‘pidfd_fops’? debugfs_create_file("kernel_page_tables", 0400, NULL, NULL, &ptdump_fops); Reported-by: Julian Wiedmann Fixes: 08c8e685c7c9 ("s390: add ARCH_HAS_DEBUG_WX support") Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 980d5f9ab36b6cfe473a8371a7e11bd168c9e630 Author: Alexander Egorenkov Date: Wed Sep 2 16:52:06 2020 +0200 s390/boot: enable .bss section for compressed kernel - Support static uninitialized variables in compressed kernel. - Remove chkbss script - Get rid of workarounds for not having .bss section Signed-off-by: Alexander Egorenkov Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik commit 5408b220436497d4e6d48010ee7a9735e77791ab Merge: 1cce8f73a561c 0ffcc3787e34d Author: Vinod Koul Date: Wed Sep 16 17:38:33 2020 +0530 Merge branch 'topic/phy_attrs' into next commit 0ffcc3787e34d39997343dd52c465bc906ed119b Author: Swapnil Jakhade Date: Fri Sep 11 08:18:34 2020 +0200 phy: cadence-torrent: Set Torrent PHY attributes Set Torrent PHY attributes bus_width, max_link_rate and mode for DisplayPort. Signed-off-by: Swapnil Jakhade Reviewed-by: Laurent Pinchart Acked-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/1599805114-22063-3-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit a25536e8d57dd6fdd70b07219fc2c38e3b8c6503 Author: Swapnil Jakhade Date: Fri Sep 11 08:18:33 2020 +0200 phy: Add new PHY attribute max_link_rate Add new PHY attribute max_link_rate to struct phy_attrs. This indicates maximum link rate supported by PHY (in Mbps). Signed-off-by: Yuti Amonkar Signed-off-by: Swapnil Jakhade Reviewed-by: Laurent Pinchart Acked-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/1599805114-22063-2-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit e75130f20b1f48e04ccc806aea01f0a361f9cb6b Author: Srikar Dronamraju Date: Tue Aug 18 13:41:04 2020 +0530 powerpc/numa: Offline memoryless cpuless node 0 Currently Linux kernel with CONFIG_NUMA on a system with multiple possible nodes, marks node 0 as online at boot. However in practice, there are systems which have node 0 as memoryless and cpuless. This can cause numa_balancing to be enabled on systems with only one node with memory and CPUs. The existence of this dummy node which is cpuless and memoryless node can confuse users/scripts looking at output of lscpu / numactl. By marking, node 0 as offline, lets stop assuming that node 0 is always online. If node 0 has CPU or memory that are online, node 0 will again be set as online. v5.8 available: 2 nodes (0,2) node 0 cpus: node 0 size: 0 MB node 0 free: 0 MB node 2 cpus: 0 1 2 3 4 5 6 7 node 2 size: 32625 MB node 2 free: 31490 MB node distances: node 0 2 0: 10 20 2: 20 10 proc and sys files ------------------ /sys/devices/system/node/online: 0,2 /proc/sys/kernel/numa_balancing: 1 /sys/devices/system/node/has_cpu: 2 /sys/devices/system/node/has_memory: 2 /sys/devices/system/node/has_normal_memory: 2 /sys/devices/system/node/possible: 0-31 v5.8 + patch ------------------ available: 1 nodes (2) node 2 cpus: 0 1 2 3 4 5 6 7 node 2 size: 32625 MB node 2 free: 31487 MB node distances: node 2 2: 10 proc and sys files ------------------ /sys/devices/system/node/online: 2 /proc/sys/kernel/numa_balancing: 0 /sys/devices/system/node/has_cpu: 2 /sys/devices/system/node/has_memory: 2 /sys/devices/system/node/has_normal_memory: 2 /sys/devices/system/node/possible: 0-31 Example of a node with online CPUs/memory on node 0. (Same o/p with and without patch) numactl -H available: 4 nodes (0-3) node 0 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 node 0 size: 32482 MB node 0 free: 22994 MB node 1 cpus: 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 node 1 size: 0 MB node 1 free: 0 MB node 2 cpus: 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 node 2 size: 0 MB node 2 free: 0 MB node 3 cpus: 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 node 3 size: 0 MB node 3 free: 0 MB node distances: node 0 1 2 3 0: 10 20 40 40 1: 20 10 40 40 2: 40 40 10 20 3: 40 40 20 10 Note: On Powerpc, cpu_to_node of possible but not present cpus would previously return 0. Hence this commit depends on commit ("powerpc/numa: Set numa_node for all possible cpus") and commit ("powerpc/numa: Prefer node id queried from vphn"). Without the 2 commits, Powerpc system might crash. 1. User space applications like Numactl, lscpu, that parse the sysfs tend to believe there is an extra online node. This tends to confuse users and applications. Other user space applications start believing that system was not able to use all the resources (i.e missing resources) or the system was not setup correctly. 2. Also existence of dummy node also leads to inconsistent information. The number of online nodes is inconsistent with the information in the device-tree and resource-dump 3. When the dummy node is present, single node non-Numa systems end up showing up as NUMA systems and numa_balancing gets enabled. This will mean we take the hit from the unnecessary numa hinting faults. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200818081104.57888-4-srikar@linux.vnet.ibm.com commit 6398eaa268168b528dd1d3d0e70e61e9c13bea23 Author: Srikar Dronamraju Date: Tue Aug 18 13:41:03 2020 +0530 powerpc/numa: Prefer node id queried from vphn Node id queried from the static device tree may not be correct. For example: it may always show 0 on a shared processor. Hence prefer the node id queried from vphn and fallback on the device tree based node id if vphn query fails. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200818081104.57888-3-srikar@linux.vnet.ibm.com commit a874f1005ef5dfe53dfd8cda59a6600e89986ecd Author: Srikar Dronamraju Date: Tue Aug 18 13:41:02 2020 +0530 powerpc/numa: Set numa_node for all possible cpus A Powerpc system with multiple possible nodes and with CONFIG_NUMA enabled always used to have a node 0, even if node 0 does not any cpus or memory attached to it. As per PAPR, node affinity of a cpu is only available once its present / online. For all cpus that are possible but not present, cpu_to_node() would point to node 0. To ensure a cpuless, memoryless dummy node is not online, powerpc need to make sure all possible but not present cpu_to_node are set to a proper node. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200818081104.57888-2-srikar@linux.vnet.ibm.com commit 67df77845c181166d4bc324cbb0382f7e81c7631 Author: Srikar Dronamraju Date: Mon Aug 17 11:22:57 2020 +0530 powerpc/numa: Restrict possible nodes based on platform As per draft LoPAPR (Revision 2.9_pre7), section B.5.3 "Run Time Abstraction Services (RTAS) Node" available at: https://openpowerfoundation.org/wp-content/uploads/2020/07/LoPAR-20200611.pdf ... there are 2 device tree properties: "ibm,max-associativity-domains" which defines the maximum number of domains that the firmware i.e PowerVM can support. and: "ibm,current-associativity-domains" which defines the maximum number of domains that the current platform can support. The value of "ibm,max-associativity-domains" is always greater than or equal to "ibm,current-associativity-domains" property. If the latter property is not available, use "ibm,max-associativity-domain" as a fallback. In this yet to be released LoPAPR, "ibm,current-associativity-domains" is mentioned in page 833 / B.5.3 which is covered under under "Appendix B. System Binding" section Currently powerpc uses the "ibm,max-associativity-domains" property while setting the possible number of nodes. This is currently set at 32. However the possible number of nodes for a platform may be significantly less. Hence set the possible number of nodes based on "ibm,current-associativity-domains" property. Nathan Lynch had raised a valid concern that post LPM (Live Partition Migration), a user could DLPAR add processors and memory after LPM with "new" associativity properties: https://lore.kernel.org/linuxppc-dev/871rljfet9.fsf@linux.ibm.com/t/#u He also pointed out that "ibm,max-associativity-domains" has the same contents on all currently available PowerVM systems, unlike "ibm,current-associativity-domains" and hence may be better able to handle the new NUMA associativity properties. However with the recent commit dbce45628085 ("powerpc/numa: Limit possible nodes to within num_possible_nodes"), all new NUMA associativity properties are capped to initially set nr_node_ids. Hence this commit should be safe with any new DLPAR add post LPM. $ lsprop /proc/device-tree/rtas/ibm,*associ*-domains /proc/device-tree/rtas/ibm,current-associativity-domains 00000005 00000001 00000002 00000002 00000002 00000010 /proc/device-tree/rtas/ibm,max-associativity-domains 00000005 00000001 00000008 00000020 00000020 00000100 $ cat /sys/devices/system/node/possible ##Before patch 0-31 $ cat /sys/devices/system/node/possible ##After patch 0-1 Note the maximum nodes this platform can support is only 2 but the possible nodes is set to 32. This is important because lot of kernel and user space code allocate structures for all possible nodes leading to a lot of memory that is allocated but not used. I ran a simple experiment to create and destroy 100 memory cgroups on boot on a 8 node machine (Power8 Alpine). Before patch: free -k at boot total used free shared buff/cache available Mem: 523498176 4106816 518820608 22272 570752 516606720 Swap: 4194240 0 4194240 free -k after creating 100 memory cgroups total used free shared buff/cache available Mem: 523498176 4628416 518246464 22336 623296 516058688 Swap: 4194240 0 4194240 free -k after destroying 100 memory cgroups total used free shared buff/cache available Mem: 523498176 4697408 518173760 22400 627008 515987904 Swap: 4194240 0 4194240 After patch: free -k at boot total used free shared buff/cache available Mem: 523498176 3969472 518933888 22272 594816 516731776 Swap: 4194240 0 4194240 free -k after creating 100 memory cgroups total used free shared buff/cache available Mem: 523498176 4181888 518676096 22208 640192 516496448 Swap: 4194240 0 4194240 free -k after destroying 100 memory cgroups total used free shared buff/cache available Mem: 523498176 4232320 518619904 22272 645952 516443264 Swap: 4194240 0 4194240 Observations: Fixed kernel takes 137344 kb (4106816-3969472) less to boot. Fixed kernel takes 309184 kb (4628416-4181888-137344) less to create 100 memcgs. Signed-off-by: Srikar Dronamraju [mpe: Reformat change log a bit for readability] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200817055257.110873-1-srikar@linux.vnet.ibm.com commit f3232321db58480804f80d59aeb651a5c859a200 Author: Srikar Dronamraju Date: Fri Aug 7 13:15:17 2020 +0530 powerpc/topology: Override cpu_smt_mask On Power9, a pair of SMT4 cores can be presented by the firmware as a SMT8 core for backward compatibility reasons, with the fusion of two SMT4 cores. Powerpc allows LPARs to be live migrated from Power8 to Power9. Existing software developed/configured for Power8, expects to see a SMT8 core. In order to maintain userspace backward compatibility (with Power8 chips in case of Power9) in enterprise Linux systems, the topology_sibling_cpumask has to be set to SMT8 core. cpu_smt_mask() should generally point to the cpu mask of the SMT4 core. Hence override the default cpu_smt_mask() to be powerpc specific allowing for better scheduling behaviour on Power. schbench (latency measured in usecs, so lesser is better) Without patch With patch Latency percentiles (usec) Latency percentiles (usec) 50.0000th: 34 50.0000th: 38 75.0000th: 47 75.0000th: 52 90.0000th: 54 90.0000th: 60 95.0000th: 57 95.0000th: 64 *99.0000th: 62 *99.0000th: 72 99.5000th: 65 99.5000th: 75 99.9000th: 76 99.9000th: 3452 min=0, max=9205 min=0, max=9344 schbench (With Cede disabled) Without patch With patch Latency percentiles (usec) Latency percentiles (usec) 50.0000th: 20 50.0000th: 21 75.0000th: 28 75.0000th: 29 90.0000th: 33 90.0000th: 34 95.0000th: 35 95.0000th: 37 *99.0000th: 40 *99.0000th: 40 99.5000th: 48 99.5000th: 42 99.9000th: 94 99.9000th: 79 min=0, max=791 min=0, max=791 perf bench sched pipe usec/ops : lesser is better Without patch N Min Max Median Avg Stddev 101 5.095113 5.595269 5.204842 5.2298776 0.10762713 5.10 - 5.15 : ################################################## 23% (24) 5.15 - 5.20 : ############################################# 21% (22) 5.20 - 5.25 : ################################################## 23% (24) 5.25 - 5.30 : ######################### 11% (12) 5.30 - 5.35 : ########## 4% (5) 5.35 - 5.40 : ######## 3% (4) 5.40 - 5.45 : ######## 3% (4) 5.45 - 5.50 : #### 1% (2) 5.50 - 5.55 : ## 0% (1) 5.55 - 5.60 : #### 1% (2) With patch N Min Max Median Avg Stddev 101 5.134675 8.524719 5.207658 5.2780985 0.34911969 5.1 - 5.5 : ################################################## 94% (95) 5.5 - 5.8 : ## 3% (4) 5.8 - 6.2 : 0% (1) 6.2 - 6.5 : 6.5 - 6.8 : 6.8 - 7.2 : 7.2 - 7.5 : 7.5 - 7.8 : 7.8 - 8.2 : 8.2 - 8.5 : perf bench sched pipe (cede disabled) usec/ops : lesser is better Without patch N Min Max Median Avg Stddev 101 7.884227 12.576538 7.956474 8.0170722 0.46159054 7.9 - 8.4 : ################################################## 99% (100) 8.4 - 8.8 : 8.8 - 9.3 : 9.3 - 9.8 : 9.8 - 10.2 : 10.2 - 10.7 : 10.7 - 11.2 : 11.2 - 11.6 : 11.6 - 12.1 : 12.1 - 12.6 : With patch N Min Max Median Avg Stddev 101 7.956021 8.217284 8.015615 8.0283866 0.049844967 7.96 - 7.98 : ###################### 12% (13) 7.98 - 8.01 : ################################################## 28% (29) 8.01 - 8.03 : #################################### 20% (21) 8.03 - 8.06 : ######################### 14% (15) 8.06 - 8.09 : ###################### 12% (13) 8.09 - 8.11 : ###### 3% (4) 8.11 - 8.14 : ### 1% (2) 8.14 - 8.17 : ### 1% (2) 8.17 - 8.19 : 8.19 - 8.22 : # 0% (1) Observations: With the patch, the initial run/iteration takes a slight longer time. This can be attributed to the fact that now we pick a CPU from a idle core which could be sleep mode. Once we remove the cede, state the numbers improve in favour of the patch. ebizzy: transactions per second (higher is better) without patch N Min Max Median Avg Stddev 100 1018433 1304470 1193208 1182315.7 60018.733 1018433 - 1047037 : ###### 3% (3) 1047037 - 1075640 : ######## 4% (4) 1075640 - 1104244 : ######## 4% (4) 1104244 - 1132848 : ############### 7% (7) 1132848 - 1161452 : #################################### 17% (17) 1161452 - 1190055 : ########################## 12% (12) 1190055 - 1218659 : ############################################# 21% (21) 1218659 - 1247263 : ################################################## 23% (23) 1247263 - 1275866 : ######## 4% (4) 1275866 - 1304470 : ######## 4% (4) with patch N Min Max Median Avg Stddev 100 967014 1292938 1208819 1185281.8 69815.851 967014 - 999606 : ## 1% (1) 999606 - 1032199 : ## 1% (1) 1032199 - 1064791 : ############ 6% (6) 1064791 - 1097384 : ########## 5% (5) 1097384 - 1129976 : ################## 9% (9) 1129976 - 1162568 : #################### 10% (10) 1162568 - 1195161 : ########################## 13% (13) 1195161 - 1227753 : ############################################ 22% (22) 1227753 - 1260346 : ################################################## 25% (25) 1260346 - 1292938 : ############## 7% (7) Observations: Not much changes, ebizzy is not much impacted. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200807074517.27957-2-srikar@linux.vnet.ibm.com commit 3babbe447d76ac2919ec4d0eb3b0adfb22f5b03c Author: Srikar Dronamraju Date: Fri Aug 7 13:15:16 2020 +0530 sched/topology: Allow archs to override cpu_smt_mask cpu_smt_mask tracks topology_sibling_cpumask. This would be good for most architectures. One of the users of cpu_smt_mask(), would be to identify idle-cores. On Power9, a pair of SMT4 cores can be presented by the firmware as a SMT8 core for backward compatibility reasons. powerpc allows LPARs to be live migrated from Power8 to Power9. Do note Power8 had only SMT8 cores. Existing software which has been developed/configured for Power8 would expect to see SMT8 core. Maintaining the illusion of SMT8 core is a requirement to make that work. In order to maintain above userspace backward compatibility with previous versions of processor, Power9 onwards there is option to the firmware to advertise a pair of SMT4 cores as a fused cores aka SMT8 core. On Power9 this pair shares the L2 cache as well. However, from the scheduler's point of view, a core should be determined by SMT4, since its a completely independent unit of compute. Hence allow powerpc architecture to override the default cpu_smt_mask() to point to the SMT4 cores in a SMT8 mode. This will ensure the scheduler is always given the right information. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200807074517.27957-1-srikar@linux.vnet.ibm.com commit 3db8715ec9dc1d32ecafc67af9fb96508c98efe5 Author: Wang Wensheng Date: Mon Sep 14 12:26:15 2020 +0000 drivers/macintosh/smu.c: Fix undeclared symbol warning Make kernel with `C=2`: drivers/macintosh/smu.c:1018:30: warning: symbol '__smu_get_sdb_partition' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Wang Wensheng Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200914122615.65669-1-wangwensheng4@huawei.com commit ca78ef2f08ccfa29b711d644964cdf9d7ace15e5 Author: Vaibhav Jain Date: Sat Sep 12 13:44:51 2020 +0530 powerpc/papr_scm: Fix warning triggered by perf_stats_show() A warning is reported by the kernel in case perf_stats_show() returns an error code. The warning is of the form below: papr_scm ibm,persistent-memory:ibm,pmemory@44100001: Failed to query performance stats, Err:-10 dev_attr_show: perf_stats_show+0x0/0x1c0 [papr_scm] returned bad count fill_read_buffer: dev_attr_show+0x0/0xb0 returned bad count On investigation it looks like that the compiler is silently truncating the return value of drc_pmem_query_stats() from 'long' to 'int', since the variable used to store the return code 'rc' is an 'int'. This truncated value is then returned back as a 'ssize_t' back from perf_stats_show() to 'dev_attr_show()' which thinks of it as a large unsigned number and triggers this warning.. To fix this we update the type of variable 'rc' from 'int' to 'ssize_t' that prevents the compiler from truncating the return value of drc_pmem_query_stats() and returning correct signed value back from perf_stats_show(). Fixes: 2d02bf835e57 ("powerpc/papr_scm: Fetch nvdimm performance stats from PHYP") Signed-off-by: Vaibhav Jain Reviewed-by: Ira Weiny Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200912081451.66225-1-vaibhav@linux.ibm.com commit 810278da901c15fba475394edb7f1271c3806658 Author: Mika Westerberg Date: Wed Aug 26 08:58:29 2020 +0300 thunderbolt: Capitalize comment on top of QUIRK_FORCE_POWER_LINK_CONTROLLER To keep it consistent with the other single line comments in the driver. Signed-off-by: Mika Westerberg commit 9c8cac6adfc83cdf2a93db5f2e73928c3100dc4f Author: Mika Westerberg Date: Wed Aug 26 08:57:00 2020 +0300 thunderbolt: Correct tb_check_quirks() kernel-doc Remove extra white space and make the sentence end with a period. Signed-off-by: Mika Westerberg commit 22255bec2b9222ecbe99b7f281ab0e0b2c6c6cb3 Author: Mika Westerberg Date: Fri Nov 29 15:49:28 2019 +0300 thunderbolt: Log correct zeroX entries in decode_error() There was copy & paste error so it always printed value of pkg->zero1. Also use tb_ctl_warn() here, no need to print backtrace. Signed-off-by: Mika Westerberg commit 80e7c5dd1ee0e79e8690c13066d866a455193892 Author: Mika Westerberg Date: Thu Sep 19 15:22:20 2019 +0300 thunderbolt: Handle ERR_LOCK notification If the USB4 router downstream port is locked, sending configuration packet to a router below it causes ERR_LOCK to be sent. Instead of warn splat about unknown error we log the error (just warning level) and return -EACCESS instead. The idea is that we may want to do something when such error code is received, like perform unlock. Signed-off-by: Mika Westerberg commit 8eabfca523337e62e393f2c336d93534058b7311 Author: Mika Westerberg Date: Mon Aug 24 13:55:52 2020 +0300 thunderbolt: Use "if USB4" instead of "depends on" in Kconfig This groups the USB4 options more nicely, and also does not require that every config option lists explicit depends on USB4. Signed-off-by: Mika Westerberg commit 2c6ea4e2cefe2e86af782a5b8e1070f4d434f2f2 Author: Mika Westerberg Date: Mon Aug 24 12:46:52 2020 +0300 thunderbolt: Allow KUnit tests to be built also when CONFIG_USB4=m This adds a bit more build coverage for the tests even though these are not expected to be enabled by normal users and distros. In order to make this working we need to open-code kunit_test_suite() and call the relevant functions directly in the driver init/exit hook. Signed-off-by: Mika Westerberg commit 884e4d576fdf6780a896bc9f7a2fe73fce5aa66a Author: Mika Westerberg Date: Mon Aug 31 13:05:14 2020 +0300 thunderbolt: Only stop control channel when entering freeze According to the kernel power management documentation freeze phase should only quiesce the device, no need to configure wakes or put it to low power state. For this reason we simply stop the control channel and in case of Software Connection Manager also mark the hotplug disabled. This should align the driver better with the PM framework expectations. Signed-off-by: Mika Westerberg commit 06e8d1df46ed52eca6915a2a76341ca65cc428b9 Author: Yuval Basson Date: Wed Jul 22 13:23:39 2020 +0300 RDMA/qedr: Add support for user mode XRC-SRQ's Implement the XRC specific verbs. The additional QP type introduced new logic to the rest of the verbs that now require distinguishing whether a QP has an "RQ" or an "SQ" or both. Link: https://lore.kernel.org/r/20200722102339.30104-1-ybason@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Yuval Basson Signed-off-by: Jason Gunthorpe commit 2ec812a04ff4ef8d4cba4005b7526691333a2973 Author: Douglas Anderson Date: Fri Sep 11 08:00:57 2020 -0700 tty: serial: qcom_geni_serial: 115.2 is a better console default than 9600 Commit c5cbc78acf69 ("tty: serial: qcom_geni_serial: Initialize baud in qcom_geni_console_setup") fixed a bug by initting a variable that was used in some cases without initialization. However, the "default" baud rate picked by that CL was probably not the best choice. The chances that anyone out there is trying to run a system with kernel messages piped out over a 9600 baud serial port is just about nil. Console messages are printed in a blocking manner. At 9600 baud we print about 1 character per millisecond which means that printing a 40-byte message to the console will take ~40 ms. While it would probably work, it's going to make boot _very_ slow and probably cause the occasional timeout here and there in drivers (heck, even at 115200 console delays can wreck havoc). This has already bit at least two people that I'm aware of that tried to enable serial console by just adding "console=ttyMSM0" (instead of "console=ttyMSM0,115200n8") to the command line, so it seems like it'd be nice to fix. Let's switch the default to 115200. Reviewed-by: Nathan Chancellor Reviewed-by: Akash Asthana Reviewed-by: Bjorn Andersson Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200911080054.1.I4c00b921c2f17b6988688046fa7be0f729f8d591@changeid Signed-off-by: Greg Kroah-Hartman commit cb91e7519d5d81ebbe66f559d13949b1da4537c9 Author: Qinglang Miao Date: Wed Sep 16 14:21:38 2020 +0800 serial: pmac_zilog: use for_each_child_of_node() macro Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20200916062138.191188-1-miaoqinglang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 05e63c6a7eb136e410087440c4c0330202249ddc Merge: 2f0ddd89fe32f 38e895487afc2 Author: Maxime Ripard Date: Wed Sep 16 10:56:29 2020 +0200 Merge branch 'virtio-shm' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse into drm-misc-next Topic pull request for core virtio changes that will be required by the DRM driver. Signed-off-by: Maxime Ripard From: Gurchetan Singh Link: https://patchwork.freedesktop.org/patch/msgid/CAAfnVBn2BzXWFY3hhjDxd5q0P2_JWn-HdkVxgS94x9keAUZiow@mail.gmail.com commit ea4de367e57d53b37ecb32cea3b5c753162b070a Author: Hsin-Yi Wang Date: Tue Sep 15 13:48:27 2020 +0800 tty: serial: 8250_mtk: set regshift for mmio32 To use mmio32, we also need to set regshift. Signed-off-by: Hsin-Yi Wang Acked-by: Eddie Huang Link: https://lore.kernel.org/r/20200915054825.3289105-2-hsinyi@chromium.org Signed-off-by: Greg Kroah-Hartman commit f28295cc8ce14b7a78bc3900eaba2e6c34111595 Author: Hsin-Yi Wang Date: Tue Sep 15 13:48:25 2020 +0800 tty: serial: print earlycon info after match->setup 8250 devices may modify iotype in their own earlycon setup. For example: 8250_mtk and 8250_uniphier force iotype to be MMIO32. Print earlycon info after match->setup to reflect actual earlycon info. Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20200915054825.3289105-1-hsinyi@chromium.org Signed-off-by: Greg Kroah-Hartman commit 4be002f1dec8418d88bbc556a0dfbaa9adc38ab0 Author: Jason Yan Date: Sat Sep 12 11:38:34 2020 +0800 serial: ucc_uart: make qe_uart_set_mctrl() static This eliminates the following sparse warning: drivers/tty/serial/ucc_uart.c:286:6: warning: symbol 'qe_uart_set_mctrl' was not declared. Should it be static? Reported-by: Hulk Robot Acked-by: Jiri Slaby Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20200912033834.143166-1-yanaijie@huawei.com Signed-off-by: Greg Kroah-Hartman commit 57cee071311800c59bb8735f24d83c95701dc04f Author: YueHaibing Date: Wed Sep 9 21:51:03 2020 +0800 serial: 8250_pci: Remove unused function get_pci_irq() It is not used since commit 8428413b1d14 ("serial: 8250_pci: Implement MSI(-X) support") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200909135103.17768-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit e0a739f48ea33ae939009f2db28091e66024dbf9 Author: Allen Pais Date: Wed Sep 16 11:45:19 2020 +0530 staging: wlan-ng: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200916061519.57602-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman commit 780664b64025807b7e74efd6f6c6bc6185ac9fcb Author: Allen Pais Date: Wed Sep 16 11:46:30 2020 +0530 staging: rtl8723bs: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200916061630.57717-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1062aa9e99e6d9190327c86d8685140d621fc439 Author: Allen Pais Date: Wed Sep 16 11:48:31 2020 +0530 staging: rtl8712: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200916061831.57848-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman commit 02c4260713d62eff0875ca4a47019cd56371ffa7 Author: Necip Fazil Yildiran Date: Tue Sep 15 12:42:10 2020 +0300 staging: rtl8192e: fix kconfig dependency warning for RTLLIB_CRYPTO_WEP When RTLLIB_CRYPTO_WEP is enabled and CRYPTO is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for CRYPTO_ARC4 Depends on [n]: CRYPTO [=n] Selected by [m]: - RTLLIB_CRYPTO_WEP [=m] && STAGING [=y] && RTLLIB [=m] The reason is that RTLLIB_CRYPTO_WEP selects CRYPTO_ARC4 without depending on or selecting CRYPTO while CRYPTO_ARC4 is subordinate to CRYPTO. Honor the kconfig menu hierarchy to remove kconfig dependency warnings. Fixes: e0e3daddad36 ("staging: r8192e: Fix possible error in configuration") Signed-off-by: Necip Fazil Yildiran Link: https://lore.kernel.org/r/20200915094209.22664-1-fazilyildiran@gmail.com Signed-off-by: Greg Kroah-Hartman commit 243d040a6e4ae95408e133269dd72be2ba03dd48 Author: Necip Fazil Yildiran Date: Tue Sep 15 12:30:34 2020 +0300 staging: rtl8192e: fix kconfig dependency warning for RTLLIB_CRYPTO_TKIP When RTLLIB_CRYPTO_TKIP is enabled and CRYPTO is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for CRYPTO_ARC4 Depends on [n]: CRYPTO [=n] Selected by [m]: - RTLLIB_CRYPTO_TKIP [=m] && STAGING [=y] && RTLLIB [=m] WARNING: unmet direct dependencies detected for CRYPTO_MICHAEL_MIC Depends on [n]: CRYPTO [=n] Selected by [m]: - RTLLIB_CRYPTO_TKIP [=m] && STAGING [=y] && RTLLIB [=m] The reason is that RTLLIB_CRYPTO_TKIP selects CRYPTO_ARC4 and CRYPTO_MICHAEL_MIC without depending on or selecting CRYPTO while both CRYPTO_ARC4 and CRYPTO_MICHAEL_MIC are subordinate to CRYPTO. Honor the kconfig menu hierarchy to remove kconfig dependency warnings. Fixes: e0e3daddad36 ("staging: r8192e: Fix possible error in configuration") Signed-off-by: Necip Fazil Yildiran Link: https://lore.kernel.org/r/20200915093033.20130-1-fazilyildiran@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5f08dede60a6f86893c70e8a519551bed0c9a8c8 Author: Necip Fazil Yildiran Date: Tue Sep 15 12:54:09 2020 +0300 staging: rtl8192e: fix kconfig dependency warning for RTLLIB_CRYPTO_CCMP When RTLLIB_CRYPTO_CCMP is enabled and CRYPTO is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for CRYPTO_CCM Depends on [n]: CRYPTO [=n] Selected by [m]: - RTLLIB_CRYPTO_CCMP [=m] && STAGING [=y] && RTLLIB [=m] WARNING: unmet direct dependencies detected for CRYPTO_AES Depends on [n]: CRYPTO [=n] Selected by [m]: - RTLLIB_CRYPTO_CCMP [=m] && STAGING [=y] && RTLLIB [=m] The reason is that RTLLIB_CRYPTO_CCMP selects CRYPTO_CCM and CRYPTO_AES without depending on or selecting CRYPTO while both CRYPTO_CCM and CRYPTO_ARC4 are subordinate to CRYPTO. Honor the kconfig menu hierarchy to remove kconfig dependency warnings. Fixes: e0e3daddad36 ("staging: r8192e: Fix possible error in configuration") Signed-off-by: Necip Fazil Yildiran Link: https://lore.kernel.org/r/20200915095408.28092-1-fazilyildiran@gmail.com Signed-off-by: Greg Kroah-Hartman commit 49391bf28d98a48013fd31d8f30cb25b0c4cfdd7 Author: Allen Pais Date: Wed Sep 16 11:50:54 2020 +0530 staging: rtl8192e: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200916062054.58084-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman commit e24eca1fff975e5c44d3cc69c63aa1b4442394e4 Author: Allen Pais Date: Wed Sep 16 11:49:39 2020 +0530 staging: rtl8192: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200916061939.57976-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman commit 45607143954eea9b60136e1b4fd6854539b8b0dc Author: Allen Pais Date: Wed Sep 16 11:52:24 2020 +0530 staging: rtl8188eu: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200916062224.58203-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4effb03d1fa72cc886463a3f871692a117b5d9d8 Author: Michael Straube Date: Wed Sep 16 08:42:57 2020 +0200 staging: rtl8188eu: clean up blank line style issues Add missing and remove unnecessary blank lines to clear the following checkpatch issues. WARNING: Missing a blank line after declarations CHECK: Please use a blank line after function/struct/union/enum declarations CHECK: Blank lines aren't necessary before a close brace '}' CHECK: Please don't use multiple blank lines Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200916064257.14902-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 54617b527275d9e4c94d23feeefc71e0eabc012f Author: Allen Pais Date: Wed Sep 16 11:53:41 2020 +0530 staging: ralink-gdma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200916062341.58322-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman commit 08446a45d19448313d403de359ac7153c03fffec Author: Allen Pais Date: Wed Sep 16 11:54:59 2020 +0530 staging: mt7621-dma: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200916062459.58426-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman commit 22f7307991ee34eb87d8503114cd93207025b1d4 Author: Allen Pais Date: Wed Sep 16 11:55:53 2020 +0530 staging: ks7010: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200916062553.58532-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman commit c3b1e4598ada86c19ecc3fdf1170b27ead6835b6 Author: Ross Schmidt Date: Mon Sep 14 19:17:31 2020 -0500 staging: rtl8723bs: os_dep: fixed spacing around operators issue Fixed a coding style issue by adding spaces around operators in sdio_ops_linux.c to fix checkpatch checks. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20200915001731.28986-3-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 47af970239e1b3af4194fc9239d452fb3888e897 Author: Ross Schmidt Date: Mon Sep 14 19:17:30 2020 -0500 staging: rtl8723bs: os_dep: fixed bracing issue Fixed a coding style issue by removing unnecessary braces in sdio_ops_linux.c to fix checkpatch warnings. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20200915001731.28986-2-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 90493f60e411fce0d0c21624af1ce767ee1d107d Author: Ross Schmidt Date: Mon Sep 14 19:17:29 2020 -0500 staging: rtl8723bs: os_dep: fixed trailing statements Fixed a coding style issue by moving trailing statements to new lines in sdio_ops_linux.c to fix checkpatch errors. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20200915001731.28986-1-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 95c89b377eca15585bb9142db46a81f6a273c48c Author: Michael Straube Date: Tue Sep 15 11:50:09 2020 +0200 staging: rtl8188eu: remove extra indentations Remove extra indentations to follow kernel coding style and clear checkpatch warnings. WARNING: suspect code indent for conditional statements Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200915095009.9679-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2f0ddd89fe32f1534a17ca44ebccc939f8a74af4 Author: Thomas Zimmermann Date: Mon Sep 14 09:22:36 2020 +0200 drm/ast: Enable CRTC before planes An active cursor plane requires a valid display mode. Change the commit_tail callback, so that it sets up the CRTC's mode before updating planes. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200914072236.19398-5-tzimmermann@suse.de commit f3901b5fee41e0410ad22133926e3f328174ab20 Author: Thomas Zimmermann Date: Mon Sep 14 09:22:35 2020 +0200 drm/ast: Program display mode in CRTC's atomic_enable() This change simplifies ast's modesetting code. The display mode is now programmed from within the CRTC's atomic_enable(), which only runs if we actually want to program the mode. Corresponding code in atomic_flush() is being removed. Also removed is atomic_begin(), which serves no purpose at all. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200914072236.19398-4-tzimmermann@suse.de commit 39edb28780e8bf623565fbd2fd0ea091f315ceb3 Author: Thomas Zimmermann Date: Mon Sep 14 09:22:34 2020 +0200 drm/ast: Disable planes while switching display modes The ast HW cursor requires the primary plane and CRTC to display at a valid mode and format. This is not the case while switching display modes, which can lead to the screen turing permanently dark. As a workaround, the ast driver now disables active planes while the mode or format switch takes place. It also synchronizes with the vertical refresh to give CRTC and planes some time to catch up on each other. The active planes planes (primary or cursor) will be re-enabled by each plane's atomic_update() function. v3: * move the logic into the CRTC's atomic_disable function v2: * move the logic into the commit-tail function Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200914072236.19398-3-tzimmermann@suse.de commit 5638c82cdabd95c8e82672760a9799c2f2848ba9 Author: Thomas Zimmermann Date: Mon Sep 14 09:22:33 2020 +0200 drm/ast: Set format registers in primary plane's update The atomic modesetting code tried to distinguish format changes from full modesetting operations. But the implementation was buggy and the format registers were often updated even for simple pageflips. Fix this problem by handling format changes in the primary plane's update function. v3: * program format in primary plane's update function Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200914072236.19398-2-tzimmermann@suse.de commit 871e6496207c6aa94134448779c77631a11bfa2e Author: Marc Zyngier Date: Mon Sep 14 14:06:34 2020 +0100 usb: dwc2: Always disable regulators on driver teardown If the dwc2 driver fails to probe after having enabled the regulators, it ends up being unregistered with regulators enabled, something the core regulator code is legitimately upset about: dwc2 ff400000.usb: supply vusb_d not found, using dummy regulator dwc2 ff400000.usb: supply vusb_a not found, using dummy regulator dwc2 ff400000.usb: dwc2_core_reset: HANG! AHB Idle timeout GRSTCTL GRSTCTL_AHBIDLE WARNING: CPU: 2 PID: 112 at drivers/regulator/core.c:2074 _regulator_put.part.0+0x16c/0x174 Modules linked in: dwc2(E+) dwc3(E) udc_core(E) rtc_hym8563(E) dwmac_generic(E) ulpi(E) usbcore(E) dwc3_meson_g12a(E) roles(E) meson_gx_mmc(E+) i2c_meson(E) mdio_mux_meson_g12a(E) mdio_mux(E) dwmac_meson8b(E) stmmac_platform(E) stmmac(E) mdio_xpcs(E) phylink(E) of_mdio(E) fixed_phy(E) libphy(E) pwm_regulator(E) fixed(E) CPU: 2 PID: 112 Comm: systemd-udevd Tainted: G E 5.9.0-rc4-00102-g423583bc8cf9 #1840 Hardware name: amlogic w400/w400, BIOS 2020.04 05/22/2020 pstate: 80400009 (Nzcv daif +PAN -UAO BTYPE=--) pc : _regulator_put.part.0+0x16c/0x174 lr : regulator_bulk_free+0x6c/0x9c sp : ffffffc012353820 x29: ffffffc012353820 x28: ffffff805a4b7000 x27: ffffff8059c2eac0 x26: ffffff8059c2e810 x25: ffffff805a4b7d00 x24: ffffffc008cf3028 x23: ffffffc011729ef8 x22: ffffff807e2761d8 x21: ffffffc01171df78 x20: ffffff805a4b7700 x19: ffffff805a4b7700 x18: 0000000000000030 x17: 0000000000000000 x16: 0000000000000000 x15: ffffff807ea8d178 x14: 3935312820435455 x13: 2038323a36313a37 x12: ffffffffffffffff x11: 0000000000000040 x10: 0000000000000007 x9 : ffffffc0106f77d0 x8 : ffffffffffffffe0 x7 : ffffffffffffffff x6 : 0000000000017702 x5 : ffffff805a4b7400 x4 : 0000000000000000 x3 : ffffffc01171df78 x2 : ffffff807ea8cc40 x1 : 0000000000000000 x0 : 0000000000000001 Call trace: _regulator_put.part.0+0x16c/0x174 regulator_bulk_free+0x6c/0x9c devm_regulator_bulk_release+0x28/0x3c release_nodes+0x1c8/0x2c0 devres_release_all+0x44/0x6c really_probe+0x1ec/0x504 driver_probe_device+0x100/0x170 device_driver_attach+0xcc/0xd4 __driver_attach+0xb0/0x17c bus_for_each_dev+0x7c/0xd4 driver_attach+0x30/0x3c bus_add_driver+0x154/0x250 driver_register+0x84/0x140 __platform_driver_register+0x54/0x60 dwc2_platform_driver_init+0x2c/0x1000 [dwc2] do_one_initcall+0x54/0x2d0 do_init_module+0x68/0x29c In order to fix this, tie the regulator disabling to the teardown process by registering a devm action callback. This makes sure that the regulators are disabled at the right time (just before they are released). Cc: Minas Harutyunyan Cc: Greg Kroah-Hartman Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200914130634.2424496-1-maz@kernel.org Signed-off-by: Greg Kroah-Hartman commit 57ce64668f5d6f30bdf4344f3c94e79b7de8eb58 Author: Badhri Jagan Sridharan Date: Mon Aug 31 19:59:16 2020 -0700 usb: typec: tcpci: update ROLE_CONTROL for DRP ROLE_CONTROL register would not have the actual CC terminations unless the port does not set ROLE_CONTROL.DRP. For DRP ports, CC_STATUS.cc1/cc2 indicates the final terminations applied when TCPC enters potential_connect_as_source/_sink. For DRP ports, infer port role from CC_STATUS and set corresponding CC terminations before setting the orientation. Reviewed-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20200901025927.3596190-4-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 19b65476839ed9e292237888f74551aee4600c7f Author: Badhri Jagan Sridharan Date: Mon Aug 31 19:59:15 2020 -0700 usb: typec: tcpci: Add support when hidden tx registers are inaccessible TCPCI spec forbids direct access of TX_BUF_BYTE_x register. The existing version of tcpci driver assumes that those registers are directly addressible. Add support for tcpci chips which do not support direct access to TX_BUF_BYTE_x registers. TX_BUF_BYTE_x can only be accessed by I2C_WRITE_BYTE_COUNT. Reviewed-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20200901025927.3596190-3-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 492c1dc9d0a1c61f26f1804c73633ae96a9f1605 Author: Badhri Jagan Sridharan Date: Mon Aug 31 19:59:14 2020 -0700 usb: typec: tcpci: Add register definitions to tcpci Add register definitions to trap extended alerts. Reviewed-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20200901025927.3596190-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 2e96af20c618a5112a19cfc64ec0eb522084df38 Author: Thomas Zimmermann Date: Tue Sep 15 09:17:08 2020 +0200 MAINTAINERS: Add Thomas as reviewer for ast, mgag200 and udl I'm adding myself as reviewer for ast, mgag200 and udl. I've already been keeping these drivers in shape for a while. While at it I'm also setting the list and tree for ast and mgag200, and update each driver's status to Supported. Working on these drivers is part of my job. Signed-off-by: Thomas Zimmermann Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200915071708.4743-1-tzimmermann@suse.de commit 8859bf2b1278d064a139e3031451524a49a56bd0 Author: Eric Biggers Date: Sun Jun 28 00:00:57 2020 -0700 reiserfs: only call unlock_new_inode() if I_NEW unlock_new_inode() is only meant to be called after a new inode has already been inserted into the hash table. But reiserfs_new_inode() can call it even before it has inserted the inode, triggering the WARNING in unlock_new_inode(). Fix this by only calling unlock_new_inode() if the inode has the I_NEW flag set, indicating that it's in the table. This addresses the syzbot report "WARNING in unlock_new_inode" (https://syzkaller.appspot.com/bug?extid=187510916eb6a14598f7). Link: https://lore.kernel.org/r/20200628070057.820213-1-ebiggers@kernel.org Reported-by: syzbot+187510916eb6a14598f7@syzkaller.appspotmail.com Signed-off-by: Eric Biggers Signed-off-by: Jan Kara commit 8036a7e7da69efbf687344313c027b63b8b1b31c Author: Oliver Neukum Date: Wed Sep 16 11:40:26 2020 +0200 USB: UAS: use macro for reporting results The SCSI layer has introduced a new macro for recording the result of a command. Use it. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200916094026.30085-3-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit eb2a86ae8c544be0ab04aa8169390c0669bc7148 Author: Oliver Neukum Date: Wed Sep 16 11:40:25 2020 +0200 USB: UAS: fix disconnect by unplugging a hub The SCSI layer can go into an ugly loop if you ignore that a device is gone. You need to report an error in the command rather than in the return value of the queue method. We need to specifically check for ENODEV. The issue goes back to the introduction of the driver. Fixes: 115bb1ffa54c3 ("USB: Add UAS driver") Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200916094026.30085-2-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 8dba20101aaf67462934e40cb5e6c3641f87d460 Author: Azhar Shaikh Date: Wed Sep 16 12:11:01 2020 +0300 usb: typec: intel_pmc_mux: Pass correct USB Type-C port number to SoC The SoC expects the USB Type-C ports numbers to be starting with 0. If the port number is passed as it is, the IOM status will not be updated. The IOM port status check fails which will eventually lead to PMC IPC communication failure. Fixes: 43d596e32276 ("usb: typec: intel_pmc_mux: Check the port status before connect") Suggested-by: Utkarsh Patel Signed-off-by: Azhar Shaikh Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200916091102.27118-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit fca3d66982f08c436bff8f037142ad664ef376a8 Author: Heikki Krogerus Date: Wed Sep 16 12:11:00 2020 +0300 usb: typec: intel_pmc_mux: Add dependency on ACPI Since the driver now needs to find the IOM ACPI node, the driver depends on ACPI. Without the dependency set, the driver will only fail to compile when ACPI is not enabled. Fixes: 43d596e32276 ("usb: typec: intel_pmc_mux: Check the port status before connect") Reported-by: Randy Dunlap Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200916091102.27118-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit be171e48f94c0810520cc56a262fc8eac99df1f2 Author: Oliver Neukum Date: Wed Sep 16 12:03:02 2020 +0200 USB: microtek: use set_host_byte() The SCSI layer is providing a new macro. Let's use it. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200916100302.30855-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 81867b75dbfde82fda5476c7c219a777aa36fbaf Merge: ae8bd85ca8a4a a071261d93184 Author: Marc Zyngier Date: Wed Sep 16 10:59:17 2020 +0100 Merge branch 'kvm-arm64/nvhe-hyp-context' into kvmarm-master/next Signed-off-by: Marc Zyngier commit bc9b9c5ab9d8d16157737db539929d57562926e9 Author: Matthias Kaehlcke Date: Tue Sep 15 10:10:54 2020 -0700 cpufreq: qcom: Don't add frequencies without an OPP The driver currently adds all frequencies from the hardware LUT to the cpufreq table, regardless of whether the corresponding OPP exists. This prevents devices from disabling certain OPPs through the device tree and can result in CPU frequencies for which the interconnect bandwidth can't be adjusted. Only add frequencies with an OPP entry. Fixes: 55538fbc79e9 ("cpufreq: qcom: Read voltage LUT and populate OPP") Signed-off-by: Matthias Kaehlcke Signed-off-by: Viresh Kumar commit 5df50128050d01d300f28d9bca4dd89d6d24de3d Author: Lars Povlsen Date: Mon Aug 24 22:30:10 2020 +0200 arm64: dts: sparx5: Add spi-nand devices This patch add spi-nand DT nodes to the applicable Sparx5 boards. Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20200824203010.2033-7-lars.povlsen@microchip.com commit ba4d1c074fd7e5f5d1a5b025b510fd542fc04da5 Author: Lars Povlsen Date: Mon Aug 24 22:30:09 2020 +0200 arm64: dts: sparx5: Add spi-nor support This add spi-nor device nodes to the Sparx5 reference boards. Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20200824203010.2033-6-lars.povlsen@microchip.com commit acb52897cc842fae917c4441e0fefbc18133a08c Author: Yicong Yang Date: Thu Sep 3 13:34:56 2020 +0100 PCI: hip: Add handling of HiSilicon HIP PCIe controller errors The HiSilicon HIP PCIe controller is capable of handling errors on root port and performing port reset separately at each root port. Add error handling driver for HIP PCIe controller to log and report recoverable errors. Perform root port reset and restore link status after the recovery. Following are some of the PCIe controller's recoverable errors 1. completion transmission timeout error. 2. CRS retry counter over the threshold error. 3. ECC 2 bit errors 4. AXI bresponse/rresponse errors etc. The driver placed in the drivers/pci/controller/ because the HIP PCIe controller does not use DWC IP. Link: https://lore.kernel.org/r/20200903123456.1823-3-shiju.jose@huawei.com Signed-off-by: Yicong Yang Signed-off-by: Shiju Jose Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit 9aa9cf3ee9451d08adafc03cef8e44c7ea3898e7 Author: Shiju Jose Date: Thu Sep 3 13:34:55 2020 +0100 ACPI / APEI: Add a notifier chain for unknown (vendor) CPER records CPER records describing a firmware-first error are identified by GUID. The ghes driver currently logs, but ignores any unknown CPER records. This prevents describing errors that can't be represented by a standard entry, that would otherwise allow a driver to recover from an error. The UEFI spec calls these 'Non-standard Section Body' (N.2.3 of version 2.8). Add a notifier chain for these non-standard/vendor-records. Callers must identify their type of records by GUID. Record data is copied to memory from the ghes_estatus_pool to allow us to keep it until after the notifier has run. Co-developed-by: James Morse Link: https://lore.kernel.org/r/20200903123456.1823-2-shiju.jose@huawei.com Signed-off-by: James Morse Signed-off-by: Shiju Jose Signed-off-by: Lorenzo Pieralisi Acked-by: "Rafael J. Wysocki" commit d5a0c816900419105a12e7471bf074319dfa34be Author: Stefan Agner Date: Tue Sep 8 16:16:54 2020 +0200 drm: mxsfb: check framebuffer pitch The lcdif IP does not support a framebuffer pitch (stride) other than framebuffer width. Check for equality and reject the framebuffer otherwise. This prevents a distorted picture when using 640x800 and running the Mesa graphics stack. Mesa tries to use a cache aligned stride, which leads at that particular resolution to width != stride. Currently Mesa has no fallback behavior, but rejecting this configuration allows userspace to handle the issue correctly. Fixes: 45d59d704080 ("drm: Add new driver for MXSFB controller") Signed-off-by: Stefan Agner Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20200908141654.266836-1-stefan@agner.ch commit 4f6d57e4306868e4cb5fdf32f2e10f33dad1614f Author: Greg Kroah-Hartman Date: Mon Sep 14 17:37:56 2020 +0200 ALSA: remove calls to usb_pipe_type_check for control endpoints A USB device will always haev a bi-directional endpoint 0, that's just how the devices work, so no need to check for that in a few quirk tests as it will always pass. Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Alexander Tsoy Reported-by: Alan Stern Link: https://lore.kernel.org/r/20200914153756.3412156-12-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit e9b20f0fe17ab06c3b55153046209987749daa48 Author: Greg Kroah-Hartman Date: Mon Sep 14 17:37:55 2020 +0200 Bluetooth: ath3k: use usb_control_msg_send() and usb_control_msg_recv() The usb_control_msg_send() and usb_control_msg_recv() calls can return an error if a "short" write/read happens, and they can handle data off of the stack, so move the driver over to using those calls instead, saving some logic when dynamically allocating memory. Cc: Marcel Holtmann Cc: Johan Hedberg Link: https://lore.kernel.org/r/20200914153756.3412156-11-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 119ae38a5cdfbefdf926b34fbf65cd60dc82c95e Author: Greg Kroah-Hartman Date: Mon Sep 14 17:37:54 2020 +0200 sound: hiface: move to use usb_control_msg_send() The usb_control_msg_send() call can return an error if a "short" write happens, so move the driver over to using that call instead. Cc: Jaroslav Kysela Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200914153756.3412156-10-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit f7ef7614f89e943d7511ee121b0b849f27b60cb2 Author: Greg Kroah-Hartman Date: Mon Sep 14 17:37:53 2020 +0200 sound: line6: move to use usb_control_msg_send() and usb_control_msg_recv() The usb_control_msg_send() and usb_control_msg_recv() calls can return an error if a "short" write/read happens, and they can handle data off of the stack, so move the driver over to using those calls instead, saving some logic when dynamically allocating memory. Cc: Jaroslav Kysela Cc: Vasily Khoruzhick Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200914153756.3412156-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit aea67cc1418252d07b9b56688f1b5fa70fcae813 Author: Greg Kroah-Hartman Date: Mon Sep 14 17:37:52 2020 +0200 sound: 6fire: move to use usb_control_msg_send() and usb_control_msg_recv() The usb_control_msg_send() and usb_control_msg_recv() calls can return an error if a "short" write/read happens, so move the driver over to using those calls instead, saving some logic in the wrapper functions that were being used in this driver. This also resolves a long-staging bug where data on the stack was being sent in a USB control message, which was not allowed. Cc: Jaroslav Kysela Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200914153756.3412156-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit ec8eeceb06b7a6efb6d924fd2f4ba4ec79ddc7bf Author: Greg Kroah-Hartman Date: Mon Sep 14 17:37:51 2020 +0200 sound: usx2y: move to use usb_control_msg_send() The usb_control_msg_send() call can handle data on the stack, as well as returning an error if a "short" write happens, so move the driver over to using that call instead. This ends up removing a helper function that is no longer needed. Cc: Jaroslav Kysela Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200914153756.3412156-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit be40c366416bf6ff74b25fd02e38cb6eaba497d1 Author: Greg Kroah-Hartman Date: Mon Sep 14 17:37:50 2020 +0200 USB: legousbtower: use usb_control_msg_recv() The usb_control_msg_recv() function can handle data on the stack, as well as properly detecting short reads, so move to use that function instead of the older usb_control_msg() call. This ends up removing a lot of extra lines in the driver. Cc: Juergen Stuber Link: https://lore.kernel.org/r/20200914153756.3412156-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit d6a499249543356002a1efbb26254c7272e62f4c Author: Greg Kroah-Hartman Date: Mon Sep 14 17:37:49 2020 +0200 USB: core: hub.c: use usb_control_msg_send() in a few places There are a few calls to usb_control_msg() that can be converted to use usb_control_msg_send() instead, so do that in order to make the error checking a bit simpler and the code smaller. Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20200914153756.3412156-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 297e84c04d76b9fdbac463e6378f5db7e9283ecd Author: Greg Kroah-Hartman Date: Mon Sep 14 17:37:48 2020 +0200 USB: core: message.c: use usb_control_msg_send() in a few places There are a few calls to usb_control_msg() that can be converted to use usb_control_msg_send() instead, so do that in order to make the error checking a bit simpler. Cc: Alan Stern Cc: "Rafael J. Wysocki" Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200914153756.3412156-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 719b8f2850d3d9b863cc5e4f08e9ef0206e45b26 Author: Greg Kroah-Hartman Date: Mon Sep 14 17:37:47 2020 +0200 USB: add usb_control_msg_send() and usb_control_msg_recv() New core functions to make sending/receiving USB control messages easier and saner. In discussions, it turns out that the large majority of users of usb_control_msg() do so in potentially incorrect ways. The most common issue is where a "short" message is received, yet never detected properly due to "incorrect" error handling. Handle all of this in the USB core with two new functions to try to make working with USB control messages simpler. No more need for dynamic data, messages can be on the stack, and only "complete" send/receive will work without causing an error. Link: https://lore.kernel.org/r/20200914153756.3412156-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit fcc2cc1f35613c016e1de25bb001bfdd9eaa25f9 Author: Greg Kroah-Hartman Date: Mon Sep 14 17:37:46 2020 +0200 USB: move snd_usb_pipe_sanity_check into the USB core snd_usb_pipe_sanity_check() is a great function, so let's move it into the USB core so that other parts of the kernel, including the USB core, can call it. Name it usb_pipe_type_check() to match the existing usb_urb_ep_type_check() call, which now uses this function. Cc: Jaroslav Kysela Cc: "Gustavo A. R. Silva" Cc: Eli Billauer Cc: Emiliano Ingrassia Cc: Alan Stern Cc: Alexander Tsoy Cc: "Geoffrey D. Bennett" Cc: Jussi Laako Cc: Nick Kossifidis Cc: Dmitry Panchenko Cc: Chris Wulff Cc: Jesus Ramos Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200914153756.3412156-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a4e6451d3214e160107a17304fb90fb11bd6513b Author: Liu Shixin Date: Tue Sep 15 11:26:31 2020 +0800 usbip: simplify the return expression of usbip_core_init() Simplify the return expression. Acked-by: Shuah Khan Signed-off-by: Liu Shixin Link: https://lore.kernel.org/r/20200915032631.1772673-1-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman commit dd425545a8cc57ae99515e771e87a4465e2f43dc Author: Tian Tao Date: Fri Sep 11 16:09:37 2020 +0800 drm/vc4: Handing the return value of drm_universal_plane_init Handing the return value of drm_universal_plane_init to fix the following W=1 kernel build warning(s): vc4_plane.c: In function ‘vc4_plane_init’: vc4_plane.c:1340:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1599811777-34093-1-git-send-email-tiantao6@hisilicon.com commit 61ce6e2aa667539ab63d59203474d9d4cd976546 Author: ChiYuan Huang Date: Tue Sep 1 10:40:42 2020 +0800 usb typec: mt6360: Add MT6360 Type-C DT binding documentation Add a devicetree binding documentation for the MT6360 Type-C driver. Reviewed-by: Rob Herring Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1598928042-22115-2-git-send-email-u0084500@gmail.com Signed-off-by: Greg Kroah-Hartman commit e1aefcdd394fdd2d14165303787fd20f624c1db5 Author: ChiYuan Huang Date: Tue Sep 1 10:40:41 2020 +0800 usb typec: mt6360: Add support for mt6360 Type-C driver Mediatek MT6360 is a multi-functional IC that includes USB Type-C. It works with Type-C Port Controller Manager to provide USB PD and USB Type-C functionalities. Reviewed-by: Heikki Krogerus Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1598928042-22115-1-git-send-email-u0084500@gmail.com Signed-off-by: Greg Kroah-Hartman commit 860b6d803f3d5feab4b67d500b060168a77f9a04 Author: Alexandre Belloni Date: Mon Aug 31 19:11:29 2020 +0200 ARM: dts: at91: sama5d2: add missing flexcom spi node properties SPI nodes require #address-cells and #size-cells add those properties in the flexcom spi nodes. Signed-off-by: Alexandre Belloni Reviewed-by: Nicolas Ferre Link: https://lore.kernel.org/r/20200831171129.3886857-8-alexandre.belloni@bootlin.com commit 996710a8956e43227399d140ef54c72da6532443 Author: Alexandre Belloni Date: Mon Aug 31 19:11:28 2020 +0200 ARM: dts: at91: add unit-address to memory node The memory node requires a unit-address, add it. Signed-off-by: Alexandre Belloni Reviewed-by: Nicolas Ferre Link: https://lore.kernel.org/r/20200831171129.3886857-7-alexandre.belloni@bootlin.com commit b0d0c3bba90b913ec7762187b64607d43cb855fb Author: Alexandre Belloni Date: Mon Aug 31 19:11:26 2020 +0200 ARM: dts: at91: move mmc pinctrl-names property to board dts Having the pinctrl-names property in the dtsi leads to dtbs_check warnings when the board dts doesn't define pinctrl-0. Instead, move the property to the board dts actually using the mmc node. Signed-off-by: Alexandre Belloni Reviewed-by: Nicolas Ferre Link: https://lore.kernel.org/r/20200831171129.3886857-5-alexandre.belloni@bootlin.com commit 49b59f4c358cf71cb4e413749cd855478547c2ca Author: Manivannan Sadhasivam Date: Tue Sep 15 12:54:23 2020 +0530 cpufreq: qcom-hw: Add cpufreq support for SM8250 SoC SM8250 SoC uses EPSS block for carrying out the cpufreq duties. Hence, add support for it in the driver with relevant dev data. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Amit Kucheria Reviewed-by: Bjorn Andersson Signed-off-by: Viresh Kumar commit dcd1fd724c19fe964e6415cb161ca58ef99f86ef Author: Manivannan Sadhasivam Date: Tue Sep 15 12:54:22 2020 +0530 cpufreq: qcom-hw: Use of_device_get_match_data for offsets and row size For preparing the driver to handle further SoC revisions, let's use the of_device_get_match_data() API for getting the device specific offsets and row size instead of defining them globally. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Bjorn Andersson Signed-off-by: Viresh Kumar commit f17b3e44320b4079e69135c63d1e416b0703a21e Author: Manivannan Sadhasivam Date: Tue Sep 15 12:54:21 2020 +0530 cpufreq: qcom-hw: Use devm_platform_ioremap_resource() to simplify code devm_platform_ioremap_resource() is the combination of platform_get_resource() and devm_ioremap_resource(). Hence, use it to simplify the code a bit. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Amit Kucheria Reviewed-by: Bjorn Andersson Signed-off-by: Viresh Kumar commit 75319b4600e7b7adfec80ea0a3ccc07f22290c89 Author: Manivannan Sadhasivam Date: Tue Sep 15 12:54:19 2020 +0530 dt-bindings: cpufreq: cpufreq-qcom-hw: Document Qcom EPSS compatible The hardware block which carries out CPUFreq operations on SM8250 SoC is called EPSS. Hence, document the compatible. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Amit Kucheria Reviewed-by: Bjorn Andersson Acked-by: Rob Herring Signed-off-by: Viresh Kumar commit bd74e286b354134863ce633747fa4bfe541e440a Author: Manivannan Sadhasivam Date: Tue Sep 8 13:27:12 2020 +0530 cpufreq: qcom-hw: Make use of cpufreq driver_data for passing pdev Get rid of global_pdev pointer and make use of cpufreq driver_data for passing the reference of pdev. This aligns with what other cpufreq drivers are doing. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Viresh Kumar commit c942d1542f1bc5001216fabce9cb8ffbe515777e Author: Pali Rohár Date: Mon Sep 7 15:27:16 2020 +0200 cpufreq: armada-37xx: Add missing MODULE_DEVICE_TABLE CONFIG_ARM_ARMADA_37XX_CPUFREQ is tristate option and therefore this cpufreq driver can be compiled as a module. This patch adds missing MODULE_DEVICE_TABLE which generates correct modalias for automatic loading of this cpufreq driver when is compiled as an external module. Reviewed-by: Andrew Lunn Signed-off-by: Pali Rohár Fixes: 92ce45fb875d7 ("cpufreq: Add DVFS support for Armada 37xx") [ Viresh: Added __maybe_unused ] Signed-off-by: Viresh Kumar commit a0d698d8c21aaa71b2a2fc6c938d658797e31911 Author: Alain Volmat Date: Mon Aug 31 08:10:13 2020 +0200 cpufreq: arm: Kconfig: add CPUFREQ_DT depend for STI CPUFREQ The sti cpufreq driver is relying on the CPUFREQ_DT driver hence add the depends within the Kconfig.arm Signed-off-by: Alain Volmat Signed-off-by: Viresh Kumar commit 305accf3b53ae679c1333022c33f95a7e337a471 Author: Alain Volmat Date: Mon Aug 31 08:10:12 2020 +0200 cpufreq: dt-platdev: Blacklist st,stih418 SoC Add st,stih418 SoC in the blacklist since the cpufreq driver for this platform is already registering the driver. Signed-off-by: Alain Volmat Signed-off-by: Viresh Kumar commit 01a163c52039e9426c7d3d3ab16ca261ad622597 Author: Alain Volmat Date: Mon Aug 31 08:10:11 2020 +0200 cpufreq: sti-cpufreq: add stih418 support The STiH418 can be controlled the same way as STiH407 & STiH410 regarding cpufreq. Signed-off-by: Alain Volmat Signed-off-by: Viresh Kumar commit 77c6d5cd93f52e6692fbe570594d4e14ec0b63e8 Author: Krzysztof Kozlowski Date: Wed Aug 26 18:00:16 2020 +0200 cpufreq: s5pv210: Use dev_err instead of pr_err in probe dev_err() allows easily to identify the device printing the message so no need for __func__. Signed-off-by: Krzysztof Kozlowski [ Viresh: Don't remove update to result variable ] Signed-off-by: Viresh Kumar commit 629238068eb905297d5edc710c41076456ae8338 Author: Krzysztof Kozlowski Date: Wed Aug 26 18:00:15 2020 +0200 cpufreq: s5pv210: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Viresh Kumar commit b89c01c960511dcffe3666d89645c95445d00902 Author: Jon Hunter Date: Mon Aug 24 15:59:07 2020 +0100 cpufreq: tegra186: Fix initial frequency Commit 6cc3d0e9a097 ("cpufreq: tegra186: add CPUFREQ_NEED_INITIAL_FREQ_CHECK flag") fixed CPUFREQ support for Tegra186 but as a consequence the following warnings are now seen on boot ... cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 0 KHz cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 2035200 KHz cpufreq: cpufreq_online: CPU1: Running at unlisted freq: 0 KHz cpufreq: cpufreq_online: CPU1: Unlisted initial frequency changed to: 2035200 KHz cpufreq: cpufreq_online: CPU2: Running at unlisted freq: 0 KHz cpufreq: cpufreq_online: CPU2: Unlisted initial frequency changed to: 2035200 KHz cpufreq: cpufreq_online: CPU3: Running at unlisted freq: 0 KHz cpufreq: cpufreq_online: CPU3: Unlisted initial frequency changed to: 2035200 KHz cpufreq: cpufreq_online: CPU4: Running at unlisted freq: 0 KHz cpufreq: cpufreq_online: CPU4: Unlisted initial frequency changed to: 2035200 KHz cpufreq: cpufreq_online: CPU5: Running at unlisted freq: 0 KHz cpufreq: cpufreq_online: CPU5: Unlisted initial frequency changed to: 2035200 KHz Fix this by adding a 'get' callback for the Tegra186 CPUFREQ driver to retrieve the current operating frequency for a given CPU. The 'get' callback uses the current 'ndiv' value that is programmed to determine that current operating frequency. Signed-off-by: Jon Hunter [ Viresh: Return 0 on error ] Signed-off-by: Viresh Kumar commit b1593e53f2e1066fce09c69b0a4f6bc5b3c0f23b Merge: dc279ac6e5b4e ded10c47f39e0 Author: Viresh Kumar Date: Wed Sep 16 14:12:12 2020 +0530 Merge commit 'ded10c47f39e' into HEAD commit 08ee16e95492f41d69df3b7fbd942d35dfece6a9 Author: Lars Povlsen Date: Mon Aug 24 22:30:07 2020 +0200 arm64: dts: sparx5: Add SPI controller and associated mmio-mux This adds a SPI controller to the Microchip Sparx5 SoC, as well as the mmio-mux that is required to select the right SPI interface for a given SPI device. Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20200824203010.2033-4-lars.povlsen@microchip.com commit a5663c9b1e31c00e0bdfaf4d92eb51358fc3950f Author: Viresh Kumar Date: Fri Sep 11 14:56:18 2020 +0530 opp: Allow opp-level to be set to 0 The DT bindings don't put such a constraint, nor should the kernel. It is perfectly fine for opp-level to be set to 0, if we need to put the performance state votes for a domain for a particular OPP. Reported-by: Stephan Gerhold Tested-by: Stephan Gerhold Signed-off-by: Viresh Kumar commit cb60e9602cce1593eb1e9cdc8ee562815078a354 Author: Viresh Kumar Date: Mon Aug 31 11:22:37 2020 +0530 opp: Prevent memory leak in dev_pm_opp_attach_genpd() If dev_pm_opp_attach_genpd() is called multiple times (once for each CPU sharing the table), then it would result in unwanted behavior like memory leak, attaching the domain multiple times, etc. Handle that by checking and returning earlier if the domains are already attached. Now that dev_pm_opp_detach_genpd() can get called multiple times as well, we need to protect that too. Note that the virtual device pointers aren't returned in this case, as they may become unavailable to some callers during the middle of the operation. Reported-by: Stephan Gerhold Signed-off-by: Viresh Kumar commit 7162fc2e4edae990e04ea7b0ad7f0106d97c9b41 Author: Viresh Kumar Date: Wed Aug 26 17:14:08 2020 +0530 ARM: tegra: Pass multiple versions in opp-supported-hw property We can now pass multiple versions in "opp-supported-hw" property, lets do that and simplify the tables a bit. Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 0ff25c99042a56cd1580b381dd747a56286489cd Author: Viresh Kumar Date: Wed Aug 26 16:32:27 2020 +0530 opp: Allow opp-supported-hw to contain multiple versions The bindings allow multiple versions to be passed to "opp-supported-hw" property, either of which can result in enabling of the OPP. Update code to allow that. Tested-by: Stephan Gerhold Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 4461269572e6fc216b63e2254c83035d1bc21eb7 Author: Viresh Kumar Date: Wed Aug 26 15:09:16 2020 +0530 dt-bindings: opp: Allow opp-supported-hw to contain multiple versions A single list of versions for a hierarchy of hardware levels is not sufficient in some cases. For example, if the hardware version has two levels, i.e. X.Y and we want an OPP to support only version 2.1 and 1.2, we will set the property as: opp-supported-hw = <0x00000003 0x00000003>; What this also does is enable hardware versions 2.2 and 1.1, which we don't want. Extend the property to accept multiple versions, so we can define the property as: opp-supported-hw = <0x00000002 0x00000001>, <0x00000001 0x00000002>; While at it, also reword the property description. Reported-by: Stephan Gerhold Signed-off-by: Viresh Kumar commit 2c59138c22f17c1da027d3c90dbcdd6995c77414 Author: Stephan Gerhold Date: Thu Jul 30 10:01:45 2020 +0200 opp: Set required OPPs in reverse order when scaling down The OPP core already has well-defined semantics to ensure required OPPs/regulators are set before/after the frequency change, depending on if we scale up or down. Similar requirements might exist for the order of required OPPs when multiple power domains need to be scaled for a frequency change. For example, on Qualcomm platforms using CPR (Core Power Reduction), we need to scale the VDDMX and CPR power domain. When scaling up, MX should be scaled up before CPR. When scaling down, CPR should be scaled down before MX. In general, if there are multiple "required-opps" in the device tree I would expect that the order is either irrelevant, or there is some dependency between the power domains. In that case, the power domains should be scaled down in reverse order. This commit updates _set_required_opps() to set required OPPs in reverse order when scaling down. Signed-off-by: Stephan Gerhold [ Viresh: Fix rebase conflict and minor rearrangement of the code ] Signed-off-by: Viresh Kumar commit 60cdeae0d627eca4ae616e3097a1f00ac9f3d704 Author: Stephan Gerhold Date: Thu Jul 30 10:01:44 2020 +0200 opp: Reduce code duplication in _set_required_opps() Move call to dev_pm_genpd_set_performance_state() to a separate function so we can avoid duplicating the code for the single and multiple genpd case. Signed-off-by: Stephan Gerhold [ Viresh: Validate virtual device before use ] Signed-off-by: Viresh Kumar commit 475ac8ead803e8c3a8f492e3129b1a19d7e2efd7 Author: Viresh Kumar Date: Thu Aug 27 15:06:43 2020 +0530 opp: Drop unnecessary check from dev_pm_opp_attach_genpd() Since commit c0ab9e0812da ("opp: Allocate genpd_virt_devs from dev_pm_opp_attach_genpd()"), the allocation of the virtual devices is moved to dev_pm_opp_attach_genpd() and this check isn't required anymore as it will always fail. Drop it. Signed-off-by: Viresh Kumar commit 3a5578784d1eb4b89f5f112f67caad4a76ae19c3 Merge: 8aaf6264fc7fd 90d46d71cce27 Author: Viresh Kumar Date: Wed Sep 16 14:02:23 2020 +0530 Merge branch 'opp/defer-probe' into HEAD commit dc279ac6e5b4e06ec9c15b82e30e8bf2576b14f9 Author: Stephan Gerhold Date: Mon Jul 27 11:30:47 2020 +0200 cpufreq: dt: Refactor initialization to handle probe deferral properly cpufreq-dt is currently unable to handle -EPROBE_DEFER properly because the error code is not propagated for the cpufreq_driver->init() callback. Instead, it attempts to avoid the situation by temporarily requesting all resources within resources_available() and releasing them again immediately after. This has several disadvantages: - Whenever we add something like interconnect handling to the OPP core we need to patch cpufreq-dt to request these resources early. - resources_available() is only run for CPU0, but other clusters may eventually depend on other resources that are not available yet. (See FIXME comment removed by this commit...) - All resources need to be looked up several times. Now that the OPP core can propagate -EPROBE_DEFER during initialization, it would be nice to avoid all that trouble and just propagate its error code when necessary. This commit refactors the cpufreq-dt driver to initialize private_data before registering the cpufreq driver. We do this by iterating over all possible CPUs and ensure that all resources are initialized: 1. dev_pm_opp_get_opp_table() ensures the OPP table is allocated and initialized with clock and interconnects. 2. dev_pm_opp_set_regulators() requests the regulators and assigns them to the OPP table. 3. We call dev_pm_opp_of_get_sharing_cpus() early so that we only initialize the OPP table once for each shared policy. With these changes, we actually end up saving a few lines of code, the resources are no longer looked up multiple times and everything should be much more robust. Signed-off-by: Stephan Gerhold [ Viresh: Use list_head structure for maintaining the list and minor changes ] Signed-off-by: Viresh Kumar commit 90d46d71cce279d878793a0ed4b326b4027aca6c Author: Viresh Kumar Date: Tue Sep 1 15:07:09 2020 +0530 opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1() Until now for V1 OPP bindings we used to call dev_pm_opp_of_cpumask_add_table() first and then dev_pm_opp_set_sharing_cpus() in the cpufreq-dt driver. A later patch will though update the cpufreq-dt driver to optimize the code a bit and we will call dev_pm_opp_set_sharing_cpus() first followed by dev_pm_opp_of_cpumask_add_table(), which doesn't work well today as it tries to re parse the OPP entries. This should work nevertheless for V1 bindings as the same works for V2 bindings. Adapt the same approach from V2 bindings and fix this. Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Viresh Kumar commit b17400c9dec40d5f263cfe692452e70ec978066a Author: Lars Povlsen Date: Mon Sep 14 10:27:04 2020 +0200 MAINTAINERS: Add git tree for Sparx5 This adds a git tree for maintaining the Sparx5 SoC from. Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20200914083257.11080-1-lars.povlsen@microchip.com commit d14f6a1ae07f034921741c631ba83ceb97fe6734 Author: Lars Povlsen Date: Tue Apr 28 16:50:42 2020 +0200 arm64: dts: sparx5: Add hwmon temperature sensor This adds a hwmon temperature node sensor to the Sparx5 SoC. Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20200618135951.25441-3-lars.povlsen@microchip.com commit 45145406f30c693564904335d216c3b18c0e1e8b Author: Lars Povlsen Date: Tue Apr 28 14:40:23 2020 +0200 arm64: dts: sparx5: Add Sparx5 eMMC support This adds eMMC support to the applicable Sparx5 board configuration files. Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20200825081357.32354-4-lars.povlsen@microchip.com commit 1b4298f000064cc20540a565d249914c60597550 Author: Yoshihiro Shimoda Date: Fri Sep 11 16:43:52 2020 +0900 soc: renesas: r8a779a0-sysc: Add r8a779a0 support Add support for R-Car V3U (R8A779A0) SoC power areas and register access, because register specification differs from R-Car Gen2/3. Inspired by patches in the BSP by Tho Vu. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599810232-29035-5-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit f26506f06bf8940d2e6076348b47b59df81c75f6 Author: Zheng Bin Date: Thu Sep 10 22:16:42 2020 +0800 rtlwifi: rtl8723ae: fix comparison pointer to bool warning in phy.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:191:5-13: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:205:5-13: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:211:5-13: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:625:5-30: WARNING: Comparison to bool Signed-off-by: Zheng Bin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910141642.127006-4-zhengbin13@huawei.com commit 9d886ac4397e5f56d37d31a6062e39f5dffcebcd Author: Zheng Bin Date: Thu Sep 10 22:16:41 2020 +0800 rtlwifi: rtl8723ae: fix comparison pointer to bool warning in trx.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c:592:5-9: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c:633:5-9: WARNING: Comparison to bool Signed-off-by: Zheng Bin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910141642.127006-3-zhengbin13@huawei.com commit 4eef91a8dbcea1d699cd1de7d528520d6165b56c Author: Zheng Bin Date: Thu Sep 10 22:16:40 2020 +0800 rtlwifi: rtl8723ae: fix comparison pointer to bool warning in rf.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8723ae/rf.c:52:5-22: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8723ae/rf.c:482:6-14: WARNING: Comparison to bool Signed-off-by: Zheng Bin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910141642.127006-2-zhengbin13@huawei.com commit 916c3b969d219962ca1fdc61d41058e0c467a31a Author: Zheng Bin Date: Thu Sep 10 21:59:17 2020 +0800 rtlwifi: rtl8188ee: fix comparison pointer to bool warning in hw.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c:777:14-20: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c:782:13-19: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c:787:14-20: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c:792:13-19: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c:871:6-33: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c:1070:5-13: WARNING: Comparison to bool Signed-off-by: Zheng Bin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910135917.143723-4-zhengbin13@huawei.com commit f40adfd07418b27fca78b19765bcf7563be83f24 Author: Zheng Bin Date: Thu Sep 10 21:59:16 2020 +0800 rtlwifi: rtl8188ee: fix comparison pointer to bool warning in trx.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c:735:5-9: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c:776:5-9: WARNING: Comparison to bool Signed-off-by: Zheng Bin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910135917.143723-3-zhengbin13@huawei.com commit 6996e70f1fe4708d3d6cc87b16ef93d12464ce7d Author: Zheng Bin Date: Thu Sep 10 21:59:15 2020 +0800 rtlwifi: rtl8188ee: fix comparison pointer to bool warning in phy.c Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c:1584:14-18: WARNING: Comparison to bool Signed-off-by: Zheng Bin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910135917.143723-2-zhengbin13@huawei.com commit edadae4778b0f6d8919934bc43a21ef9b7018337 Author: YueHaibing Date: Wed Sep 9 21:59:51 2020 +0800 qtnfmac: Remove unused macro QTNF_DMP_MAX_LEN There is no caller in tree, so remove it. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200909135951.4028-1-yuehaibing@huawei.com commit d10f6af58ef4dfb01cf07ef10f4f82f8e9dddc14 Author: Ivan Safonov Date: Sun Sep 13 19:59:59 2020 +0300 rtw88: rtw8822c: eliminate code duplication, use native swap() function swap_u32() duplicate native swap(), so replace swap_u32() with swap(). Signed-off-by: Ivan Safonov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200913165958.419744-1-insafonov@gmail.com commit d06e2f8b41b67bf6b58d9a636ecec901fd3fb47d Author: YueHaibing Date: Wed Sep 9 21:59:05 2020 +0800 wlcore: Remove unused macro WL1271_SUSPEND_SLEEP commit 45aa7f071b06 ("wlcore: Use generic runtime pm calls for wowlan elp configuration") left behind this, remove it. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200909135905.35728-1-yuehaibing@huawei.com commit b09a2b3265187dc2929ccee77ec4bd5305733717 Author: Jason Yan Date: Thu Sep 10 22:04:46 2020 +0800 brcmsmac: main: Eliminate empty brcms_c_down_del_timer() This function does nothing so remove it. This addresses the following coccicheck warning: drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:5103:6-15: Unneeded variable: "callbacks". Return "0" on line 5105 Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910140446.1168049-1-yanaijie@huawei.com Link: https://lore.kernel.org/r/20200910140455.1168174-1-yanaijie@huawei.com commit e3433882168be9f6b108edb6c96366ff9880bc16 Author: Lee Jones Date: Thu Sep 10 07:54:31 2020 +0100 brcmsmac: phy_lcn: Remove unused variable 'lcnphy_rx_iqcomp_table_rev0' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:361:25: warning: unused variable 'lcnphy_rx_iqcomp_table_rev0' [-Wunused-const-variable] struct lcnphy_rx_iqcomp lcnphy_rx_iqcomp_table_rev0[] = { ^ Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-30-lee.jones@linaro.org Link: https://lore.kernel.org/r/20200910140505.1168317-1-yanaijie@huawei.com Link: https://lore.kernel.org/r/20200910035600.21736-1-yuehaibing@huawei.com commit f75738a09f5918b3cbfed844ff501cc1d2cc0c01 Author: Lee Jones Date: Thu Sep 10 07:54:30 2020 +0100 brcmsmac: phytbl_lcn: Remove unused array 'dot11lcn_gain_tbl_rev1' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_lcn.c:108:18: warning: unused variable 'dot11lcn_gain_tbl_rev1' [-Wunused-const-variable] static const u32 dot11lcn_gain_tbl_rev1[] = { Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200910065431.657636-29-lee.jones@linaro.org commit ac4c323cbb916b335c5b78dc1614526cafaa88bf Author: Christophe JAILLET Date: Mon Sep 7 22:19:42 2020 +0200 airo: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'mpi_map_card()' GFP_KERNEL can be used because this function is called from a probe or a module_init() function and no spinlock is taken in the between. The call chains are: airo_init_module module_init function in 'airo.c' or airo_probe .probe function in 'airo_cs.c' --> airo_config followed in both cases by: --> init_airo_card --> _init_airo_card --> mpi_map_card @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200907201942.321568-1-christophe.jaillet@wanadoo.fr commit d5f59c964e15e9e2cffaf8b0e9034616568717f9 Author: Chung-Hsien Hsu Date: Mon Aug 17 02:33:16 2020 -0500 brcmfmac: support SAE authentication offload in AP mode Firmware may have SAE authenticator code built-in. This is detected by the driver and indicated in the wiphy features flags. User space can use this flag to determine whether or not to provide the password material in the nl80211 start AP command to offload the SAE authentication in AP mode. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817073316.33402-5-stanley.hsu@cypress.com commit 787fb926f8ccb95f43f0870cebb1d9af21c7f194 Author: Chung-Hsien Hsu Date: Mon Aug 17 02:33:14 2020 -0500 brcmfmac: support 4-way handshake offloading for WPA/WPA2-PSK in AP mode Firmware may have authenticator code built-in. This is detected by the driver and indicated in the wiphy features flags. User space can use this flag to determine whether or not to provide the pre-shared key material in the nl80211 start AP command to offload the 4-way handshake in AP mode. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817073316.33402-3-stanley.hsu@cypress.com commit b96cb835e37c2ca03aaceef9555ec9047a422d91 Author: Darrick J. Wong Date: Thu Sep 10 10:57:17 2020 -0700 xfs: deprecate the V4 format The V4 filesystem format contains known weaknesses in the on-disk format that make metadata verification diffiult. In addition, the format does not support dates past 2038 and will not be upgraded to do so. We should start the process of retiring the old format to close off attack surfaces and to encourage users to migrate onto V5. Therefore, make XFS V4 support a configurable option. For the first period it will be default Y in case some distributors want to withdraw support early; for the second period it will be default N so that anyone who wishes to continue support can do so; and after that, support will be removed from the kernel. Dates for these events have been added to the upstream kernel. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Eric Sandeen commit d4f2c14cc9793be78f4655b6e136484d7fdbdd72 Author: Darrick J. Wong Date: Sun Sep 13 10:16:41 2020 -0700 xfs: don't propagate RTINHERIT -> REALTIME when there is no rtdev While running generic/042 with -drtinherit=1 set in MKFS_OPTIONS, I observed that the kernel will gladly set the realtime flag on any file created on the loopback filesystem even though that filesystem doesn't actually have a realtime device attached. This leads to verifier failures and doesn't make any sense, so be smarter about this. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit fe341eb151ec0ba80fb74edd6201fc78e5232b6b Author: Darrick J. Wong Date: Wed Sep 9 14:21:06 2020 -0700 xfs: ensure that fpunch, fcollapse, and finsert operations are aligned to rt extent size Make sure that any fallocate operation that requires the range to be block-aligned also checks that the range is aligned to the realtime extent size. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 8a569d717ed01df77830fdde173dbb832d6bfba5 Author: Darrick J. Wong Date: Sun Sep 13 10:16:40 2020 -0700 xfs: refactor inode flags propagation code Hoist the code that propagates di_flags and di_flags2 from a parent to a new child into separate functions. No functional changes. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 2a6ca4baed620303d414934aa1b7b0a8e7bab05f Author: Darrick J. Wong Date: Wed Sep 9 14:21:06 2020 -0700 xfs: make sure the rt allocator doesn't run off the end There's an overflow bug in the realtime allocator. If the rt volume is large enough to handle a single allocation request that is larger than the maximum bmap extent length and the rt bitmap ends exactly on a bitmap block boundary, it's possible that the near allocator will try to check the freeness of a range that extends past the end of the bitmap. This fails with a corruption error and shuts down the fs. Therefore, constrain maxlen so that the range scan cannot run off the end of the rt bitmap. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 0f4ec0f157468fdb6512ccd9cd8cbb8b645fb4a0 Author: Zheng Bin Date: Wed Sep 9 09:29:16 2020 -0700 xfs: Remove unneeded semicolon Fixes coccicheck warning: fs/xfs/xfs_icache.c:1214:2-3: Unneeded semicolon Signed-off-by: Zheng Bin Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5ffce3cc22a0e89813ed0c7162a68b639aef9ab6 Author: Darrick J. Wong Date: Fri Sep 4 10:20:16 2020 -0700 xfs: force the log after remapping a synchronous-writes file Commit 5833112df7e9 tried to make it so that a remap operation would force the log out to disk if the filesystem is mounted with mandatory synchronous writes. Unfortunately, that commit failed to handle the case where the inode or the file descriptor require mandatory synchronous writes. Refactor the check into into a helper that will look for all three conditions, and now we can treat reflink just like any other synchronous write. Fixes: 5833112df7e9 ("xfs: reflink should force the log out if mounted with wsync") Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig commit e01b7eed5d0a9b101da53701e92136c3985998af Author: Carlos Maiolino Date: Mon Sep 7 08:08:50 2020 -0700 xfs: Convert xfs_attr_sf macros to inline functions xfs_attr_sf_totsize() requires access to xfs_inode structure, so, once xfs_attr_shortform_addname() is its only user, move it to xfs_attr.c instead of playing with more #includes. Reviewed-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Carlos Maiolino Signed-off-by: Darrick J. Wong commit c418dbc9805dbd215586454f0c5729333219aa63 Author: Carlos Maiolino Date: Fri Sep 4 09:51:39 2020 -0700 xfs: Use variable-size array for nameval in xfs_attr_sf_entry nameval is a variable-size array, so, define it as it, and remove all the -1 magic number subtractions Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 47e6cc100054c8c6b809e25c286a2fd82e82bcb7 Author: Carlos Maiolino Date: Fri Sep 4 09:51:31 2020 -0700 xfs: Remove typedef xfs_attr_shortform_t Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Signed-off-by: Darrick J. Wong commit 6337c84466c250d5da797bc5d6941c501d500e48 Author: Carlos Maiolino Date: Fri Sep 4 09:51:30 2020 -0700 xfs: remove typedef xfs_attr_sf_entry_t Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Signed-off-by: Darrick J. Wong commit 8ca79df85b7f98be4dcd3f66de07d4973206dbc9 Author: Carlos Maiolino Date: Tue Sep 1 11:47:12 2020 -0700 xfs: Remove kmem_zalloc_large() This patch aims to replace kmem_zalloc_large() with global kernel memory API. So, all its callers are now using kvzalloc() directly, so kmalloc() fallsback to vmalloc() automatically. Signed-off-by: Carlos Maiolino Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 29887a22713192509cfc6068ea3b200cdb8856da Author: Darrick J. Wong Date: Mon Aug 17 10:00:01 2020 -0700 xfs: enable big timestamps Enable the big timestamp feature. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Reviewed-by: Allison Collins Reviewed-by: Christoph Hellwig Reviewed-by: Gao Xiang Reviewed-by: Dave Chinner commit 06dbf82b044cbc268612958af0bc6c3529385ca0 Author: Darrick J. Wong Date: Mon Aug 24 11:58:01 2020 -0700 xfs: trace timestamp limits Add a couple of tracepoints so that we can check the timestamp limits being set on inodes and quotas. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins Reviewed-by: Gao Xiang Reviewed-by: Dave Chinner commit 4ea1ff3b49681af45a4a8c14baf7f0b3d11aa74a Author: Darrick J. Wong Date: Mon Aug 17 09:59:51 2020 -0700 xfs: widen ondisk quota expiration timestamps to handle y2038+ Enable the bigtime feature for quota timers. We decrease the accuracy of the timers to ~4s in exchange for being able to set timers up to the bigtime maximum. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins Reviewed-by: Dave Chinner commit f93e5436f0ee5a85eaa3a86d2614d215873fb18b Author: Darrick J. Wong Date: Mon Aug 17 09:59:07 2020 -0700 xfs: widen ondisk inode timestamps to deal with y2038+ Redesign the ondisk inode timestamps to be a simple unsigned 64-bit counter of nanoseconds since 14 Dec 1901 (i.e. the minimum time in the 32-bit unix time epoch). This enables us to handle dates up to 2486, which solves the y2038 problem. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Gao Xiang Reviewed-by: Dave Chinner commit 30e05599219f3c15bd5f24190af0e33cdb4a00e5 Author: Darrick J. Wong Date: Mon Aug 24 16:01:34 2020 -0700 xfs: redefine xfs_ictimestamp_t Redefine xfs_ictimestamp_t as a uint64_t typedef in preparation for the bigtime functionality. Preserve the legacy structure format so that we can let the compiler take care of the masking and shifting. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Gao Xiang Reviewed-by: Dave Chinner commit 5a0bb066f60fa02f453d7721844eae59f505c06e Author: Darrick J. Wong Date: Mon Aug 24 15:15:46 2020 -0700 xfs: redefine xfs_timestamp_t Redefine xfs_timestamp_t as a __be64 typedef in preparation for the bigtime functionality. Preserve the legacy structure format so that we can let the compiler take care of masking and shifting. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Gao Xiang Reviewed-by: Dave Chinner commit 88947ea0ba713c9b74b212755b3b58242f0e7a56 Author: Darrick J. Wong Date: Mon Aug 17 09:58:43 2020 -0700 xfs: move xfs_log_dinode_to_disk to the log recovery code Move this function to xfs_inode_item_recover.c since there's only one caller of it. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins Reviewed-by: Gao Xiang Reviewed-by: Dave Chinner commit 9f99c8fe551a056c0929dff13cbce62b6b150156 Author: Darrick J. Wong Date: Mon Aug 17 14:08:23 2020 -0700 xfs: refactor quota timestamp coding Refactor quota timestamp encoding and decoding into helper functions so that we can add extra behavior in the next patch. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins Reviewed-by: Dave Chinner commit ccc8e771aa7a80eb047fc263780816ca76dd02a6 Author: Darrick J. Wong Date: Mon Aug 17 09:58:42 2020 -0700 xfs: refactor default quota grace period setting code Refactor the code that sets the default quota grace period into a helper function so that we can override the ondisk behavior later. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins Reviewed-by: Dave Chinner commit 11d8a9190275855f79d62093d789e962cc7228fb Author: Darrick J. Wong Date: Mon Aug 17 09:58:36 2020 -0700 xfs: refactor quota expiration timer modification Define explicit limits on the range of quota grace period expiration timeouts and refactor the code that modifies the timeouts into helpers that clamp the values appropriately. Note that we'll refactor the default grace period timer separately. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins Reviewed-by: Dave Chinner commit 876fdc7c4f366a709ac272ef3336ae7dce58f2af Author: Darrick J. Wong Date: Mon Aug 17 09:58:02 2020 -0700 xfs: explicitly define inode timestamp range Formally define the inode timestamp ranges that existing filesystems support, and switch the vfs timetamp ranges to use it. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins Reviewed-by: Gao Xiang Reviewed-by: Dave Chinner commit b896a39faa5a2f97dadfb347928466afb12cc63a Author: Darrick J. Wong Date: Mon Aug 17 09:58:01 2020 -0700 xfs: enable new inode btree counters feature Enable the new inode btree counters feature. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 11f744234f052922db4ed77dad35862b3d3164cf Author: Darrick J. Wong Date: Wed Aug 26 10:48:50 2020 -0700 xfs: support inode btree blockcounts in online repair Add the necessary bits to the online repair code to support logging the inode btree counters when rebuilding the btrees, and to support fixing the counters when rebuilding the AGI. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 1dbbff029f9387603b8cc8cb5741058ce2f837e1 Author: Darrick J. Wong Date: Wed Aug 26 10:48:50 2020 -0700 xfs: support inode btree blockcounts in online scrub Add the necessary bits to the online scrub code to check the inode btree counters when enabled. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 1ac35f061af011442eeb731632f6daae991ecf7c Author: Darrick J. Wong Date: Wed Aug 26 10:54:27 2020 -0700 xfs: use the finobt block counts to speed up mount times Now that we have reliable finobt block counts, use them to speed up the per-AG block reservation calculations at mount time. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 2a39946c984464e4aac82c556ba9915589be7323 Author: Darrick J. Wong Date: Mon Aug 17 09:58:01 2020 -0700 xfs: store inode btree block counts in AGI header Add a btree block usage counters for both inode btrees to the AGI header so that we don't have to walk the entire finobt at mount time to create the per-AG reservations. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 26e328759b9bc18329752a75762c059e74a23146 Author: Christoph Hellwig Date: Tue Sep 1 10:55:47 2020 -0700 xfs: reuse _xfs_buf_read for re-reading the superblock Instead of poking deeply into buffer cache internals when re-reading the superblock during log recovery just generalize _xfs_buf_read and use it there. Note that we don't have to explicitly set up the ops as they must be set from the initial read. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b3f8e08ca815ef372a572d9d94f1c96941c4d93b Author: Christoph Hellwig Date: Tue Sep 1 10:55:47 2020 -0700 xfs: remove xfs_getsb Merge xfs_getsb into its only caller, and clean that one up a little bit as well. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit cead0b10f557a2331e0e131ce52aaf7ed7f5355f Author: Christoph Hellwig Date: Tue Sep 1 10:55:47 2020 -0700 xfs: simplify xfs_trans_getsb Remove the mp argument as this function is only called in transaction context, and open code xfs_getsb given that the function already accesses the buffer pointer in the mount point directly. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 22c10589a10baea8e4695fcf38437b89a41e70a1 Author: Christoph Hellwig Date: Tue Sep 1 10:55:46 2020 -0700 xfs: remove xlog_recover_iodone The log recovery I/O completion handler does not substancially differ from the normal one except for the fact that it: a) never retries failed writes b) can have log items that aren't on the AIL c) never has inode/dquot log items attached and thus don't need to handle them Add conditionals for (a) and (b) to the ioend code, while (c) doesn't need special handling anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 55b7d7115fcd903a3901b2999a2e15e2c9c4f6e0 Author: Christoph Hellwig Date: Tue Sep 1 10:55:46 2020 -0700 xfs: clear the read/write flags later in xfs_buf_ioend Clear the flags at the end of xfs_buf_ioend so that they can be used during the completion. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b840e2ada8afc53583e578d2d56df7339604c1a3 Author: Christoph Hellwig Date: Tue Sep 1 10:55:46 2020 -0700 xfs: use xfs_buf_item_relse in xfs_buf_item_done Reuse xfs_buf_item_relse instead of duplicating it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 70796c6b74c2aa49a1b341b7646c1498bd27ea81 Author: Christoph Hellwig Date: Tue Sep 1 10:55:45 2020 -0700 xfs: simplify the xfs_buf_ioend_disposition calling convention Now that all the actual error handling is in a single place, xfs_buf_ioend_disposition just needs to return true if took ownership of the buffer, or false if not instead of the tristate. Also move the error check back in the caller to optimize for the fast path, and give the function a better fitting name. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 844c9358dfda7e6c0d1c1a524c704d992c34f64e Author: Christoph Hellwig Date: Tue Sep 1 10:55:45 2020 -0700 xfs: lift the XBF_IOEND_FAIL handling into xfs_buf_ioend_disposition Keep all the error handling code together. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3cc498845a0c6cad88346a56838db42c637ac89c Author: Christoph Hellwig Date: Tue Sep 1 10:55:45 2020 -0700 xfs: remove xfs_buf_ioerror_retry Merge xfs_buf_ioerror_retry into its only caller to make the resubmission flow a little easier to follow. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f58d0ea956113f537e43517eccfa33878a30cc4e Author: Christoph Hellwig Date: Tue Sep 1 10:55:44 2020 -0700 xfs: refactor xfs_buf_ioerror_fail_without_retry xfs_buf_ioerror_fail_without_retry is a somewhat weird function in that it has two trivial checks that decide the return value, while the rest implements a ratelimited warning. Just lift the two checks into the caller, and give the remainder a suitable name. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 6a7584b1d82b7b9fcce02ee7aeddc58f9cebbccc Author: Christoph Hellwig Date: Tue Sep 1 10:55:44 2020 -0700 xfs: fold xfs_buf_ioend_finish into xfs_ioend No need to keep a separate helper for this logic. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 664ffb8a429a800c51964b94c15c6a92c8d8334c Author: Christoph Hellwig Date: Tue Sep 1 10:55:29 2020 -0700 xfs: move the buffer retry logic to xfs_buf.c Move the buffer retry state machine logic to xfs_buf.c and call it once from xfs_ioend instead of duplicating it three times for the three kinds of buffers. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 23fb5a93c21f7b2393c216b40afff8027164d8d4 Author: Christoph Hellwig Date: Tue Sep 1 10:55:20 2020 -0700 xfs: refactor xfs_buf_ioend Move the log recovery I/O completion handling entirely into the log recovery code, and re-arrange the normal I/O completion handler flow to prepare to lifting more logic into common code in the next commits. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 76b2d323461122f1c00d346166e7180a20cd6dba Author: Christoph Hellwig Date: Tue Sep 1 10:55:20 2020 -0700 xfs: mark xfs_buf_ioend static Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 12e164aa1f9d82e8dc3b09ff211cfae8d6a8bfb3 Author: Christoph Hellwig Date: Tue Sep 1 10:55:20 2020 -0700 xfs: refactor the buf ioend disposition code Handle the no-error case in xfs_buf_iodone_error as well, and to clarify the code rename the function, use the actual enum type as return value and then switch on it in the callers. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a665eec0a22e11cdde708c1c256a465ebe768047 Author: Nicholas Piggin Date: Mon Sep 14 14:52:19 2020 +1000 powerpc/64s/radix: Fix mm_cpumask trimming race vs kthread_use_mm Commit 0cef77c7798a7 ("powerpc/64s/radix: flush remote CPUs out of single-threaded mm_cpumask") added a mechanism to trim the mm_cpumask of a process under certain conditions. One of the assumptions is that mm_users would not be incremented via a reference outside the process context with mmget_not_zero() then go on to kthread_use_mm() via that reference. That invariant was broken by io_uring code (see previous sparc64 fix), but I'll point Fixes: to the original powerpc commit because we are changing that assumption going forward, so this will make backports match up. Fix this by no longer relying on that assumption, but by having each CPU check the mm is not being used, and clearing their own bit from the mask only if it hasn't been switched-to by the time the IPI is processed. This relies on commit 38cf307c1f20 ("mm: fix kthread_use_mm() vs TLB invalidate") and ARCH_WANT_IRQS_OFF_ACTIVATE_MM to disable irqs over mm switch sequences. Fixes: 0cef77c7798a7 ("powerpc/64s/radix: flush remote CPUs out of single-threaded mm_cpumask") Signed-off-by: Nicholas Piggin Reviewed-by: Michael Ellerman Depends-on: 38cf307c1f20 ("mm: fix kthread_use_mm() vs TLB invalidate") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200914045219.3736466-5-npiggin@gmail.com commit bafb056ce27940c9994ea905336aa8f27b4f7275 Author: Nicholas Piggin Date: Mon Sep 14 14:52:18 2020 +1000 sparc64: remove mm_cpumask clearing to fix kthread_use_mm race The de facto (and apparently uncommented) standard for using an mm had, thanks to this code in sparc if nothing else, been that you must have a reference on mm_users *and that reference must have been obtained with mmget()*, i.e., from a thread with a reference to mm_users that had used the mm. The introduction of mmget_not_zero() in commit d2005e3f41d4 ("userfaultfd: don't pin the user memory in userfaultfd_file_create()") allowed mm_count holders to aoperate on user mappings asynchronously from the actual threads using the mm, but they were not to load those mappings into their TLB (i.e., walking vmas and page tables is okay, kthread_use_mm() is not). io_uring 2b188cc1bb857 ("Add io_uring IO interface") added code which does a kthread_use_mm() from a mmget_not_zero() refcount. The problem with this is code which previously assumed mm == current->mm and mm->mm_users == 1 implies the mm will remain single-threaded at least until this thread creates another mm_users reference, has now broken. arch/sparc/kernel/smp_64.c: if (atomic_read(&mm->mm_users) == 1) { cpumask_copy(mm_cpumask(mm), cpumask_of(cpu)); goto local_flush_and_out; } vs fs/io_uring.c if (unlikely(!(ctx->flags & IORING_SETUP_SQPOLL) || !mmget_not_zero(ctx->sqo_mm))) return -EFAULT; kthread_use_mm(ctx->sqo_mm); mmget_not_zero() could come in right after the mm_users == 1 test, then kthread_use_mm() which sets its CPU in the mm_cpumask. That update could be lost if cpumask_copy() occurs afterward. I propose we fix this by allowing mmget_not_zero() to be a first-class reference, and not have this obscure undocumented and unchecked restriction. The basic fix for sparc64 is to remove its mm_cpumask clearing code. The optimisation could be effectively restored by sending IPIs to mm_cpumask members and having them remove themselves from mm_cpumask. This is more tricky so I leave it as an exercise for someone with a sparc64 SMP. powerpc has a (currently similarly broken) example. Signed-off-by: Nicholas Piggin Acked-by: David S. Miller Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200914045219.3736466-4-npiggin@gmail.com commit 66acd46080bd9e5ad2be4b0eb1d498d5145d058e Author: Nicholas Piggin Date: Mon Sep 14 14:52:17 2020 +1000 powerpc: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM powerpc uses IPIs in some situations to switch a kernel thread away from a lazy tlb mm, which is subject to the TLB flushing race described in the changelog introducing ARCH_WANT_IRQS_OFF_ACTIVATE_MM. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200914045219.3736466-3-npiggin@gmail.com commit d53c3dfb23c45f7d4f910c3a3ca84bf0a99c6143 Author: Nicholas Piggin Date: Mon Sep 14 14:52:16 2020 +1000 mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race Reading and modifying current->mm and current->active_mm and switching mm should be done with irqs off, to prevent races seeing an intermediate state. This is similar to commit 38cf307c1f20 ("mm: fix kthread_use_mm() vs TLB invalidate"). At exec-time when the new mm is activated, the old one should usually be single-threaded and no longer used, unless something else is holding an mm_users reference (which may be possible). Absent other mm_users, there is also a race with preemption and lazy tlb switching. Consider the kernel_execve case where the current thread is using a lazy tlb active mm: call_usermodehelper() kernel_execve() old_mm = current->mm; active_mm = current->active_mm; *** preempt *** --------------------> schedule() prev->active_mm = NULL; mmdrop(prev active_mm); ... <-------------------- schedule() current->mm = mm; current->active_mm = mm; if (!old_mm) mmdrop(active_mm); If we switch back to the kernel thread from a different mm, there is a double free of the old active_mm, and a missing free of the new one. Closing this race only requires interrupts to be disabled while ->mm and ->active_mm are being switched, but the TLB problem requires also holding interrupts off over activate_mm. Unfortunately not all archs can do that yet, e.g., arm defers the switch if irqs are disabled and expects finish_arch_post_lock_switch() to be called to complete the flush; um takes a blocking lock in activate_mm(). So as a first step, disable interrupts across the mm/active_mm updates to close the lazy tlb preempt race, and provide an arch option to extend that to activate_mm which allows architectures doing IPI based TLB shootdowns to close the second race. This is a bit ugly, but in the interest of fixing the bug and backporting before all architectures are converted this is a compromise. Signed-off-by: Nicholas Piggin Acked-by: Peter Zijlstra (Intel) Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200914045219.3736466-2-npiggin@gmail.com commit ed5dd6a67d5eac5fb8873697b55dc1699752a9f3 Author: Ming Lei Date: Thu Sep 10 15:50:56 2020 +0800 scsi: core: Only re-run queue in scsi_end_request() if device queue is busy The request queue is currently run unconditionally in scsi_end_request() if both target queue and host queue are ready. Recently Long Li reported that cost of a queue run can be very heavy in case of high queue depth. Improve this situation by only running the request queue when this LUN is busy. Link: https://lore.kernel.org/r/20200910075056.36509-1-ming.lei@redhat.com Reported-by: Long Li Tested-by: Long Li Tested-by: Kashyap Desai Reviewed-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Ewan D. Milne Reviewed-by: John Garry Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit f97e6e1eabbfed0ec3ccce7562df26a5b21d0d99 Author: Alex Dewar Date: Wed Sep 9 19:58:55 2020 +0100 scsi: aic7xxx: Use kmemdup() in two places kmemdup() can be used instead of kmalloc()+memcpy(). Replace two occurrences of this pattern. Issue identified with Coccinelle. Link: https://lore.kernel.org/r/20200909185855.151964-1-alex.dewar90@gmail.com Signed-off-by: Alex Dewar Signed-off-by: Martin K. Petersen commit beef6fd02b906880c871ebdf6add166ebe54f632 Author: Matej Genci Date: Fri Aug 28 12:21:35 2020 +0000 scsi: virtio_scsi: Rescan the entire target on transport reset when LUN is 0 VirtIO 1.0 spec says: The removed and rescan events ... when sent for LUN 0, they MAY apply to the entire target so the driver can ask the initiator to rescan the target to detect this. This change introduces the behaviour described above by scanning the entire SCSI target when LUN is set to 0. This is both a functional and a performance fix. It aligns the driver with the spec and allows control planes to hotplug targets with large numbers of LUNs without having to request a RESCAN for each one of them. Link: https://lore.kernel.org/r/CY4PR02MB33354370E0A81E75DD9DFE74FB520@CY4PR02MB3335.namprd02.prod.outlook.com Suggested-by: Felipe Franciosi Acked-by: Paolo Bonzini Signed-off-by: Matej Genci Signed-off-by: Martin K. Petersen commit 54701a0d12e2e2c9f0814572b42bdd3067ffcf15 Author: Tian Tao Date: Mon Sep 14 08:52:02 2020 +0800 RISC-V: Fix duplicate included thread_info.h asm/thread_info.h is included more than once, Remove the one that isn't necessary. Signed-off-by: Tian Tao Signed-off-by: Palmer Dabbelt commit a960c1323749383e62b67f5d49cdfbdcccde0ef6 Author: Pekka Enberg Date: Sat Sep 5 09:07:26 2020 +0300 riscv/mm/fault: Set FAULT_FLAG_INSTRUCTION flag in do_page_fault() If the page fault "cause" is EXC_INST_PAGE_FAULT, set the FAULT_FLAG_INSTRUCTION flag to let handle_mm_fault() and friends know about it. This has no functional changes because RISC-V uses the default arch_vma_access_permitted() implementation, which always returns true. However, dax_pmd_fault(), for example, has a tracepoint that uses FAULT_FLAG_INSTRUCTION, so we might as well set it. Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit 2baa6d9506f24d52f53317f60ccbcdbb2c4f4c40 Author: Pekka Enberg Date: Sat Sep 5 08:52:52 2020 +0300 riscv/mm/fault: Fix inline placement in vmalloc_fault() declaration The "inline" keyword is in the wrong place in vmalloc_fault() declaration: >> arch/riscv/mm/fault.c:56:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] 56 | static void inline vmalloc_fault(struct pt_regs *regs, int code, unsigned long addr) | ^~~~~~ Fix that up. Reported-by: kernel test robot Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit 38f5bd23deae24c8fa67a2c574b6d43df27a8aa8 Author: Zong Li Date: Mon Aug 31 15:33:50 2020 +0800 riscv: Add cache information in AUX vector There are no standard CSR registers to provide cache information, the way for RISC-V is to get this information from DT. Currently, AT_L1I_X, AT_L1D_X and AT_L2_X are present in glibc header, and sysconf syscall could use them to get information of cache through AUX vector. The result of 'getconf -a' as follows: LEVEL1_ICACHE_SIZE 32768 LEVEL1_ICACHE_ASSOC 8 LEVEL1_ICACHE_LINESIZE 64 LEVEL1_DCACHE_SIZE 32768 LEVEL1_DCACHE_ASSOC 8 LEVEL1_DCACHE_LINESIZE 64 LEVEL2_CACHE_SIZE 2097152 LEVEL2_CACHE_ASSOC 32 LEVEL2_CACHE_LINESIZE 64 Signed-off-by: Zong Li Reviewed-by: Palmer Dabbelt Reviewed-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit b5fca7c55f9fbab5ad732c3bce00f31af6ba5cfa Author: Zong Li Date: Mon Aug 31 15:33:49 2020 +0800 riscv: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO AT_VECTOR_SIZE_ARCH should be defined with the maximum number of NEW_AUX_ENT entries that ARCH_DLINFO can contain, but it wasn't defined for RISC-V at all even though ARCH_DLINFO will contain one NEW_AUX_ENT for the VDSO address. Signed-off-by: Zong Li Reviewed-by: Palmer Dabbelt Reviewed-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit baf7cbd94b5688f167443a2cc3dcea3300132099 Author: Zong Li Date: Mon Aug 31 15:33:48 2020 +0800 riscv: Set more data to cacheinfo Set cacheinfo.{size,sets,line_size} for each cache node, then we can get these information from userland through auxiliary vector. Signed-off-by: Zong Li Reviewed-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit afb8c6fee8ce9b54b9c810eea0597ef6a876abb7 Author: Pekka Enberg Date: Tue Aug 25 19:41:17 2020 +0300 riscv/mm/fault: Move access error check to function Move the access error check into a access_error() function to simplify the control flow in do_page_fault(). Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit 6747430197ed414be37e843064a7f365f4d1fd57 Author: Pekka Enberg Date: Tue Aug 25 19:42:54 2020 +0300 riscv/mm/fault: Move FAULT_FLAG_WRITE handling in do_page_fault() Let's handle the translation of EXC_STORE_PAGE_FAULT to FAULT_FLAG_WRITE once before looking up the VMA. This makes it easier to extract access error logic in the next patch. Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit 7a75f3d47a0b1be6eeb67d14e4003b2b91f8aa59 Author: Pekka Enberg Date: Tue Aug 25 19:05:44 2020 +0300 riscv/mm/fault: Simplify mm_fault_error() Simplify the mm_fault_error() handling function by eliminating the unnecessary gotos. Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit 6c11ffbfd849830e8cede5fb0699828e74a7d26b Author: Pekka Enberg Date: Tue Aug 25 19:04:09 2020 +0300 riscv/mm/fault: Move fault error handling to mm_fault_error() This patch moves the fault error handling to mm_fault_error() function and converts gotos to calls to the new function. Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit bda281d5bfb70f895880ebfb94a7f20d0604437f Author: Pekka Enberg Date: Tue Aug 25 19:01:43 2020 +0300 riscv/mm/fault: Simplify fault error handling Move fault error handling after retry logic. This simplifies the code flow and makes it easier to move fault error handling to its own function. Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit ac416a724f113207407848ef58a0270cd03d94d1 Author: Pekka Enberg Date: Tue Aug 25 18:54:26 2020 +0300 riscv/mm/fault: Move vmalloc fault handling to vmalloc_fault() This patch moves the vmalloc fault handling in do_page_fault() to vmalloc_fault() function and converts gotos to calls to the new function. Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit a51271d99cdd04910227060936d0598ba49fb1cc Author: Pekka Enberg Date: Tue Aug 25 18:48:01 2020 +0300 riscv/mm/fault: Move bad area handling to bad_area() This patch moves the bad area handling in do_page_fault() to bad_area() function and converts gotos to calls to the new function. Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit cac4d1dc85be2996ea19aea4f6ac6525f4c97171 Author: Pekka Enberg Date: Tue Aug 25 18:38:58 2020 +0300 riscv/mm/fault: Move no context handling to no_context() This patch moves the no context handling in do_page_fault() to no_context() function and converts gotos to calls to the new function. Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit 4363287178a85e41cd59f9f1d423fbe1f9048ec8 Author: Pekka Enberg Date: Wed Aug 19 17:10:11 2020 +0300 riscv/mm: Simplify retry logic in do_page_fault() Let's combine the two retry logic if statements in do_page_fault() to simplify the code. Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit c64779e24e88a9915b2f35fbb9851ef2c5462cc2 Author: Andrii Nakryiko Date: Tue Sep 15 17:48:19 2020 -0700 selftests/bpf: Merge most of test_btf into test_progs Merge 183 tests from test_btf into test_progs framework to be exercised regularly. All the test_btf tests that were moved are modeled as proper sub-tests in test_progs framework for ease of debugging and reporting. No functional or behavioral changes were intended, I tried to preserve original behavior as much as possible. E.g., `test_progs -v` will activate "always_log" flag to emit BTF validation log. The only difference is in reducing the max_entries limit for pretty-printing tests from (128 * 1024) to just 128 to reduce tests running time without reducing the coverage. Example test run: $ sudo ./test_progs -n 8 ... #8 btf:OK Summary: 1/183 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200916004819.3767489-1-andriin@fb.com commit 9d8a5510281c380cec54fafba124ae38f5c7585e Author: Jason Yan Date: Tue Sep 15 16:40:18 2020 +0800 scsi: myrb: Make some symblos static This addresses the following sparse warning: drivers/scsi/myrb.c:2229:27: warning: symbol 'myrb_template' was not declared. Should it be static? drivers/scsi/myrb.c:2318:31: warning: symbol 'myrb_raid_functions' was not declared. Should it be static? drivers/scsi/myrb.c:2492:6: warning: symbol 'myrb_err_status' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200915084018.2826922-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit ebe41b991d37d2adcadf9e36c0537e2ca1ff4476 Author: Jason Yan Date: Tue Sep 15 16:40:08 2020 +0800 scsi: myrs: Make some symbols static This addresses the following sparse warning: drivers/scsi/myrs.c:1532:5: warning: symbol 'myrs_host_reset' was not declared. Should it be static? drivers/scsi/myrs.c:1922:27: warning: symbol 'myrs_template' was not declared. Should it be static? drivers/scsi/myrs.c:2036:31: warning: symbol 'myrs_raid_functions' was not declared. Should it be static? drivers/scsi/myrs.c:2046:6: warning: symbol 'myrs_flush_cache' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200915084008.2826835-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 2494ebe1b3f73c01b92b7bf623de261e7bd8677f Author: Jason Yan Date: Tue Sep 15 16:40:00 2020 +0800 scsi: isci: Make scu_link_layer_set_txcomsas_timeout() static This addresses the following sparse warning: drivers/scsi/isci/phy.c:672:6: warning: symbol 'scu_link_layer_set_txcomsas_timeout' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200915084000.2826741-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 5c2ef01448e9f136f8344c991bb1296e6edc44f4 Author: Jason Yan Date: Sat Sep 12 11:37:58 2020 +0800 scsi: bnx2fc: Make a bunch of symbols static in bnx2fc_fcoe.c This eliminates the following sparse warning: drivers/scsi/bnx2fc/bnx2fc_fcoe.c:53:1: warning: symbol 'bnx2fc_global_lock' was not declared. Should it be static? drivers/scsi/bnx2fc/bnx2fc_fcoe.c:111:6: warning: symbol 'bnx2fc_devloss_tmo' was not declared. Should it be static? drivers/scsi/bnx2fc/bnx2fc_fcoe.c:116:6: warning: symbol 'bnx2fc_max_luns' was not declared. Should it be static? drivers/scsi/bnx2fc/bnx2fc_fcoe.c:121:6: warning: symbol 'bnx2fc_queue_depth' was not declared. Should it be static? drivers/scsi/bnx2fc/bnx2fc_fcoe.c:126:6: warning: symbol 'bnx2fc_log_fka' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200912033758.142601-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit ffa915f46193b6be780483c8d31cc53f093f6d9a Merge: d317b0a8acfc4 d42d1cc44d702 Author: Alexei Starovoitov Date: Tue Sep 15 18:28:27 2020 -0700 Merge branch 'bpf_metadata' Stanislav Fomichev says: ==================== Currently, if a user wants to store arbitrary metadata for an eBPF program, for example, the program build commit hash or version, they could store it in a map, and conveniently libbpf uses .data section to populate an internal map. However, if the program does not actually reference the map, then the map would be de-refcounted and freed. This patch set introduces a new syscall BPF_PROG_BIND_MAP to add a map to a program's used_maps, even if the program instructions does not reference the map. libbpf is extended to always BPF_PROG_BIND_MAP .rodata section so the metadata is kept in place. bpftool is also extended to print metadata in the 'bpftool prog' list. The variable is considered metadata if it starts with the magic 'bpf_metadata_' prefix; everything after the prefix is the metadata name. An example use of this would be BPF C file declaring: volatile const char bpf_metadata_commit_hash[] SEC(".rodata") = "abcdef123456"; and bpftool would emit: $ bpftool prog [...] metadata: commit_hash = "abcdef123456" v6 changes: * libbpf: drop FEAT_GLOBAL_DATA from probe_prog_bind_map (Andrii Nakryiko) * bpftool: combine find_metadata_map_id & find_metadata; drops extra bpf_map_get_fd_by_id and bpf_map_get_fd_by_id (Andrii Nakryiko) * bpftool: use strncmp instead of strstr (Andrii Nakryiko) * bpftool: memset(map_info) and extra empty line (Andrii Nakryiko) v5 changes: * selftest: verify that prog holds rodata (Andrii Nakryiko) * selftest: use volatile for metadata (Andrii Nakryiko) * bpftool: use sizeof in BPF_METADATA_PREFIX_LEN (Andrii Nakryiko) * bpftool: new find_metadata that does map lookup (Andrii Nakryiko) * libbpf: don't generalize probe_create_global_data (Andrii Nakryiko) * libbpf: use OPTS_VALID in bpf_prog_bind_map (Andrii Nakryiko) * libbpf: keep LIBBPF_0.2.0 sorted (Andrii Nakryiko) v4 changes: * Don't return EEXIST from syscall if already bound (Andrii Nakryiko) * Removed --metadata argument (Andrii Nakryiko) * Removed custom .metadata section (Alexei Starovoitov) * Addressed Andrii's suggestions about btf helpers and vsi (Andrii Nakryiko) * Moved bpf_prog_find_metadata into bpftool (Alexei Starovoitov) v3 changes: * API changes for bpf_prog_find_metadata (Toke Høiland-Jørgensen) v2 changes: * Made struct bpf_prog_bind_opts in libbpf so flags is optional. * Deduped probe_kern_global_data and probe_prog_bind_map into a common helper. * Added comment regarding why EEXIST is ignored in libbpf bind map. * Froze all LIBBPF_MAP_METADATA internal maps. * Moved bpf_prog_bind_map into new LIBBPF_0.1.1 in libbpf.map. * Added p_err() calls on error cases in bpftool show_prog_metadata. * Reverse christmas tree coding style in bpftool show_prog_metadata. * Made bpftool gen skeleton recognize .metadata as an internal map and generate datasec definition in skeleton. * Added C test using skeleton to see asset that the metadata is what we expect and rebinding causes EEXIST. v1 changes: * Fixed a few missing unlocks, and missing close while iterating map fds. * Move mutex initialization to right after prog aux allocation, and mutex destroy to right after prog aux free. * s/ADD_MAP/BIND_MAP/ * Use mutex only instead of RCU to protect the used_map array & count. Cc: YiFei Zhu ==================== Acked-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit 7867c549d5741437b771a91e2a1d5e77e48bc3d0 Author: Jason Yan Date: Sat Sep 12 11:37:41 2020 +0800 scsi: isci: Make isci_host_attrs static This eliminates the following sparse warning: drivers/scsi/isci/init.c:145:25: warning: symbol 'isci_host_attrs' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200912033741.142415-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit d42d1cc44d702123d6ff12ce54a0e854036d29cb Author: YiFei Zhu Date: Tue Sep 15 16:45:43 2020 -0700 selftests/bpf: Test load and dump metadata with btftool and skel This is a simple test to check that loading and dumping metadata in btftool works, whether or not metadata contents are used by the program. A C test is also added to make sure the skeleton code can read the metadata values. Signed-off-by: YiFei Zhu Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Cc: YiFei Zhu Link: https://lore.kernel.org/bpf/20200915234543.3220146-6-sdf@google.com commit aff52e685eb39984f3a613e8a5c570d97e5d2414 Author: YiFei Zhu Date: Tue Sep 15 16:45:42 2020 -0700 bpftool: Support dumping metadata Dump metadata in the 'bpftool prog' list if it's present. For some formatting some BTF code is put directly in the metadata dumping. Sanity checks on the map and the kind of the btf_type to make sure we are actually dumping what we are expecting. A helper jsonw_reset is added to json writer so we can reuse the same json writer without having extraneous commas. Sample output: $ bpftool prog 6: cgroup_skb name prog tag bcf7977d3b93787c gpl [...] btf_id 4 metadata: a = "foo" b = 1 $ bpftool prog --json --pretty [{ "id": 6, [...] "btf_id": 4, "metadata": { "a": "foo", "b": 1 } } ] Signed-off-by: YiFei Zhu Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Cc: YiFei Zhu Link: https://lore.kernel.org/bpf/20200915234543.3220146-5-sdf@google.com commit 5d23328dccd93c47e2719cb9d2ae303c235d277d Author: YiFei Zhu Date: Tue Sep 15 16:45:41 2020 -0700 libbpf: Add BPF_PROG_BIND_MAP syscall and use it on .rodata section The patch adds a simple wrapper bpf_prog_bind_map around the syscall. When the libbpf tries to load a program, it will probe the kernel for the support of this syscall and unconditionally bind .rodata section to the program. Signed-off-by: YiFei Zhu Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Cc: YiFei Zhu Link: https://lore.kernel.org/bpf/20200915234543.3220146-4-sdf@google.com commit ef15314aa5de955c6afd87d512e8b00f5ac08d06 Author: YiFei Zhu Date: Tue Sep 15 16:45:40 2020 -0700 bpf: Add BPF_PROG_BIND_MAP syscall This syscall binds a map to a program. Returns success if the map is already bound to the program. Signed-off-by: YiFei Zhu Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Cc: YiFei Zhu Link: https://lore.kernel.org/bpf/20200915234543.3220146-3-sdf@google.com commit 984fe94f94756dacb3c8cc52904a23adf9e04da1 Author: YiFei Zhu Date: Tue Sep 15 16:45:39 2020 -0700 bpf: Mutex protect used_maps array and count To support modifying the used_maps array, we use a mutex to protect the use of the counter and the array. The mutex is initialized right after the prog aux is allocated, and destroyed right before prog aux is freed. This way we guarantee it's initialized for both cBPF and eBPF. Signed-off-by: YiFei Zhu Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Cc: YiFei Zhu Link: https://lore.kernel.org/bpf/20200915234543.3220146-2-sdf@google.com commit 571e1568862822cf27ff1f7b7cacf98a7e435307 Author: Jason Yan Date: Sat Sep 12 11:37:49 2020 +0800 scsi: aacraid: Make some symbols static in aachba.c This eliminates the following sparse warning: drivers/scsi/aacraid/aachba.c:245:5: warning: symbol 'aac_convert_sgl' was not declared. Should it be static? drivers/scsi/aacraid/aachba.c:293:5: warning: symbol 'acbsize' was not declared. Should it be static? drivers/scsi/aacraid/aachba.c:324:5: warning: symbol 'aac_wwn' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200912033749.142488-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit bb1932dbb83abb2036ab3b487c1bb2a758855964 Author: Ye Bin Date: Wed Sep 2 14:16:46 2020 +0800 scsi: sym53c8xx_2: Delete unnecessary else-if in sym_xerr_cam_status() If (x_status & XE_PARITY_ERR) is true we set cam_status = DID_PARITY, othervise cam_status always ends up being DID_ERROR. Delete superfluous else-if statements. Link: https://lore.kernel.org/r/20200902061646.576966-1-yebin10@huawei.com Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit 4b29cb6197d92bf3264fdd5c5df0f41b464bb05c Author: Brian King Date: Fri Sep 11 16:28:26 2020 -0500 scsi: ibmvfc: Avoid link down on FS9100 canister reboot When a canister on a FS9100, or similar storage, running in NPIV mode, is rebooted, its WWPNs will fail over to another canister. When this occurs, we see a WWPN going away from the fabric at one N-Port ID, and, a short time later, the same WWPN appears at a different N-Port ID. When the canister is fully operational again, the WWPNs fail back to the original canister. If there is any I/O outstanding to the target when this occurs, it will result in the implicit logout the ibmvfc driver issues before removing the rport to fail. When the WWPN then shows up at a different N-Port ID, and we issue a PLOGI to it, the VIOS will see that it still has a login for this WWPN at the old N-Port ID, which results in the VIOS simulating a link down / link up sequence to the client, in order to get the VIOS and client LPAR in sync. The patch below improves the way we handle this scenario so as to avoid the link bounce, which affects all targets under the virtual host adapter. The change is to utilize the Move Login MAD, which will work even when I/O is outstanding to the target. The change only alters the target state machine for the case where the implicit logout fails prior to deleting the rport. If this implicit logout fails, we defer deleting the ibmvfc_target object after calling fc_remote_port_delete. This enables us to later retry the implicit logout after terminate_rport_io occurs, or to issue the Move Login request if a WWPN shows up at a new N-Port ID prior to this occurring. This has been tested by IBM's storage interoperability team on a FS9100, forcing the failover to occur. With debug tracing enabled in the ibmvfc driver, we confirmed the move login was sent in this scenario and confirmed the link bounce no longer occurred. [mkp: fix checkpatch warnings] Link: https://lore.kernel.org/r/1599859706-8505-1-git-send-email-brking@linux.vnet.ibm.com Signed-off-by: Brian King Signed-off-by: Martin K. Petersen commit 46c9d608f989997913740f20c9be2c3afa79c370 Author: Damien Le Moal Date: Thu Sep 10 16:48:42 2020 +0900 scsi: core: Update additional sense codes list Add missing Additional Sense Codes listed in http://www.t10.org/lists/asc-num.txt. Link: https://lore.kernel.org/r/20200910074843.217661-3-damien.lemoal@wdc.com Reviewed-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 342c81eeaaf06ae59e043427bd9d71da42eda163 Author: Damien Le Moal Date: Thu Sep 10 16:48:41 2020 +0900 scsi: core: Clean up scsi_noretry_cmd() No need for else after return. Link: https://lore.kernel.org/r/20200910074843.217661-2-damien.lemoal@wdc.com Reviewed-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 6d70cb343484e626266b82451facad30e28b5e9f Author: Xiongfeng Wang Date: Thu Sep 3 19:29:33 2020 +0800 scsi: target: tcmu: Add missing newline when printing parameters The tcmu 'global_max_data_area_mb' parameter in sysfs is missing a newline. Add it. Link: https://lore.kernel.org/r/1599132573-33818-1-git-send-email-wangxiongfeng2@huawei.com Signed-off-by: Xiongfeng Wang Signed-off-by: Martin K. Petersen commit 782e2efb749f617209363b1ec1dd5cfc41a427e9 Author: Daejun Park Date: Wed Sep 2 11:58:52 2020 +0900 scsi: ufs: Fix NOP OUT timeout value Boot occasionally fails with some Samsung low-power UFS devices. The reason is that these devices have a little bit higher latency for NOP OUT responses. This causes boot to fail because the NOP OUT command is issued during initialization to check whether the device transport protocol is ready or not. Increase NOP_OUT_TIMEOUT value from 30 to 50ms. Link: https://lore.kernel.org/r/231786897.01599016081767.JavaMail.epsvc@epcpadp2 Acked-by: Avri Altman Signed-off-by: Daejun Park Signed-off-by: Martin K. Petersen commit c8c61c09e38b894e68e1d9c6c3c1bfcae3cbf8cf Author: Georgi Djakov Date: Wed Sep 16 00:45:11 2020 +0300 arm64: dts: qcom: sdm845: Add interconnects property for display Add the interconnect paths that are used by the display (MDSS). This will allow the driver to request the needed bandwidth and prevent display flickering. Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20200915214511.786-1-georgi.djakov@linaro.org Signed-off-by: Bjorn Andersson commit 79a595bb92ea4b6bc33a704ad4db584c07c949ff Author: Sibi Sankar Date: Sat Aug 1 18:00:49 2020 +0530 arm64: dts: qcom: sm8250: Add EPSS L3 interconnect provider Add Epoch Subsystem (EPSS) L3 interconnect provider node on SM8250 SoCs. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200801123049.32398-8-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit a6d435c1a6aec3d86b2857204473176ac6eced1f Author: Sibi Sankar Date: Sat Aug 1 18:00:48 2020 +0530 arm64: dts: qcom: sm8150: Add OSM L3 interconnect provider Add Operation State Manager (OSM) L3 interconnect provider node on SM8150 SoCs. Acked-by: Georgi Djakov Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200801123049.32398-7-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit e7e41a207a3e37fe29a799fc0940b3a540237a49 Author: Jonathan Marek Date: Mon Jul 27 22:38:06 2020 -0400 arm64: dts: qcom: sm8250: add interconnect nodes Add the interconnect dts nodes for sm8250. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200728023811.5607-8-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 71a2fc6e7b30a0234d3895fa0d91be754dc06905 Author: Jonathan Marek Date: Mon Jul 27 22:38:05 2020 -0400 arm64: dts: qcom: sm8150: add interconnect nodes Add the interconnect dts nodes for sm8150. Reviewed-by: Sibi Sankar Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200728023811.5607-7-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 3312be8f6fc8a8dc7cef01986dbd436eab7af0f7 Author: Dave Airlie Date: Tue Sep 15 11:47:19 2020 +1000 drm/ttm: move populated state into page flags Just use the top bit of page flags to store the populated state. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-8-airlied@gmail.com commit 3a4ab168a5df5c9532763ac26cde5c2ad06ca1e5 Author: Dave Airlie Date: Tue Sep 15 11:42:30 2020 +1000 drm/ttm: split bound/populated flags. Move bound up into the bo object, and keep populated with the tt object. The ghost object handling needs to follow the flags at the bo level now instead of it being part of the ttm tt object. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-7-airlied@gmail.com commit 9e9a153bdf2555a931fd37678a8e44d170a5d943 Author: Dave Airlie Date: Tue Sep 15 11:34:51 2020 +1000 drm/ttm: move ttm binding/unbinding out of ttm_tt paths. Move these up to the bo level, moving ttm_tt to just being backing store. Next step is to move the bound flag out. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-6-airlied@gmail.com commit 2040ec970e94dde0b94e200ae9bb8f21a61c928f Author: Dave Airlie Date: Tue Sep 15 11:16:53 2020 +1000 drm/ttm: split populate out from binding. Drivers have to call populate themselves now before binding. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-5-airlied@gmail.com commit 395a73f8ba6f00f0e188ac6daa43659520d75498 Author: Dave Airlie Date: Tue Sep 15 11:04:08 2020 +1000 drm/ttm: tt destroy move null check to outer function. This just makes things easier later. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-4-airlied@gmail.com commit 2ff6e69c0449846197c52d7c591b983e23e3e3c9 Author: Dave Airlie Date: Tue Sep 15 11:02:12 2020 +1000 drm/ttm: wrap tt destroy. (v2) All places this was called was using bo->ttm either direct or indirectly. v2: move to ttm_bo Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-3-airlied@gmail.com commit 7eec915138279d7a83ff8f219846bf7c8ae637c1 Author: Dave Airlie Date: Tue Sep 15 10:21:15 2020 +1000 drm/ttm/tt: add wrappers to set tt state. This adds 2 getters and 4 setters, however unbound and populated are currently the same thing, this will change, it also drops a BUG_ON that seems not that useful. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200915024007.67163-2-airlied@gmail.com commit 897dccb8db0d01209c44439ba59d86d3ccbd55ef Merge: e859536dac30a 7a5e9d84f9e43 Author: David S. Miller Date: Tue Sep 15 16:31:44 2020 -0700 Merge branch 'nexthop-Small-changes' Ido Schimmel says: ==================== nexthop: Small changes This patch set contains a few small changes that I split out of the RFC I sent last week [1]. Main change is the conversion of the nexthop notification chain to a blocking chain so that it could be reused by device drivers for nexthop objects programming in the future. Tested with fib_nexthops.sh: Tests passed: 164 Tests failed: 0 [1] https://lore.kernel.org/netdev/20200908091037.2709823-1-idosch@idosch.org/ ==================== Signed-off-by: David S. Miller commit 7a5e9d84f9e436035f44310511efdddb6e497996 Author: Ido Schimmel Date: Tue Sep 15 14:41:03 2020 +0300 selftests: fib_nexthops: Test cleanup of FDB entries following nexthop deletion Commit c7cdbe2efc40 ("vxlan: support for nexthop notifiers") registered a listener in the VXLAN driver to the nexthop notification chain. Its purpose is to cleanup FDB entries that use a nexthop that is being deleted. Test that such FDB entries are removed when the nexthop group that they use is deleted. Test that entries are not deleted when a single nexthop in the group is deleted. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 0695564bb4a24440b38b46bf52465a93a0ca1974 Author: Ido Schimmel Date: Tue Sep 15 14:41:02 2020 +0300 nexthop: Only emit a notification when nexthop is actually deleted Currently, the in-kernel delete notification is emitted from the error path of nexthop_add() and replace_nexthop(), which can be confusing to in-kernel listeners as they are not familiar with the nexthop. Instead, only emit the notification when the nexthop is actually deleted. The following sub-cases are covered: 1. User space deletes the nexthop 2. The nexthop is deleted by the kernel due to a netdev event (e.g., nexthop device going down) 3. A group is deleted because its last nexthop is being deleted 4. The network namespace of the nexthop device is deleted Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 80690ec6b595807db9a52ec5b225a2d88033ddb5 Author: Ido Schimmel Date: Tue Sep 15 14:41:01 2020 +0300 nexthop: Convert to blocking notification chain Currently, the only listener of the nexthop notification chain is the VXLAN driver. Subsequent patches will add more listeners (e.g., device drivers such as netdevsim) that need to be able to block when processing notifications. Therefore, convert the notification chain to a blocking one. This is safe as notifications are always emitted from process context. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 52f7232a790a36da30eb64c6de6067a9e4ad194c Author: Ido Schimmel Date: Tue Sep 15 14:41:00 2020 +0300 nexthop: Remove NEXTHOP_EVENT_ADD Not used anywhere. Signed-off-by: Ido Schimmel Suggested-by: David Ahern Signed-off-by: David S. Miller commit 7d61588f690def55ba2885f7f4b03d13ff45b163 Author: Ido Schimmel Date: Tue Sep 15 14:40:59 2020 +0300 nexthop: Remove unused function declaration from header file Not used or implemented anywhere. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit e859536dac30aa891a01462eef6e12168c6e8f29 Author: Geert Uytterhoeven Date: Tue Sep 15 11:35:51 2020 +0200 chelsio/chtls: Re-add dependencies on CHELSIO_T4 to fix modular CHELSIO_T4 As CHELSIO_INLINE_CRYPTO is bool, and CHELSIO_T4 is tristate, the dependency of CHELSIO_INLINE_CRYPTO on CHELSIO_T4 is not sufficient to protect CRYPTO_DEV_CHELSIO_TLS and CHELSIO_IPSEC_INLINE. The latter two are also tristate, hence if CHELSIO_T4=n, they cannot be builtin, as that would lead to link failures like: drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c:259: undefined reference to `cxgb4_port_viid' and drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.c:752: undefined reference to `cxgb4_reclaim_completed_tx' Fix this by re-adding dependencies on CHELSIO_T4 to tristate symbols. The dependency of CHELSIO_INLINE_CRYPTO on CHELSIO_T4 is kept to avoid asking the user. Fixes: 6bd860ac1c2a0ec2 ("chelsio/chtls: CHELSIO_INLINE_CRYPTO should depend on CHELSIO_T4") Reported-by: kernel test robot Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller commit 400d4953f1f434d50640524707106eb889be8a11 Author: Anusha Srivatsa Date: Fri Aug 28 14:10:56 2020 -0700 drm/i915/pll: Centralize PLL_ENABLE register lookup We currenty check for platform at multiple parts in the driver to grab the correct PLL. Let us begin to centralize it through a helper function. v2: s/intel_get_pll_enable_reg()/intel_combo_pll_enable_reg() (Ville) v3: Clean up combo_pll_disable() (Rodrigo) v4: s/dev_priv/i915 (Jani) Move static and return type to the same line( Ville, Jani) Suggested-by: Matt Roper Cc: Ville Syrjälä Cc: Matt Roper Signed-off-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20200914175703.15024-1-anusha.srivatsa@intel.com Reviewed-by: Rodrigo Vivi commit b18af883dce6c1a1f87ca2b3b64985160157391b Merge: ef8e692d69a06 7d83ee1110081 Author: David S. Miller Date: Tue Sep 15 15:57:16 2020 -0700 Merge branch 'mlxsw-Introduce-fw_fatal-health-reporter-and-test-cmd-to -trigger-test-event' Ido Schimmel says: ==================== mlxsw: Introduce fw_fatal health reporter and test cmd to trigger test event Jiri says: This patch set introduces a health reporter for mlxsw that reports FW fatal events. Alongside that, it introduces a test command that is used to trigger a dummy FW fatal event by user: $ sudo devlink health test pci/0000:03:00.0 reporter fw_fatal $ devlink health pci/0000:03:00.0: reporter fw_fatal state error error 1 recover 0 last_dump_date 2020-07-27 last_dump_time 16:33:27 auto_dump true $ sudo devlink health dump show pci/0000:03:00.0 reporter fw_fatal -j -p { "irisc_id": 0, "event": [ "id": 3 ], "method": "query", "long_process": false, "command_type": "mad", "reg_attr_id": 0 } As a dependency, the FW validation and flashing is moved to core.c. ==================== Signed-off-by: David S. Miller commit 7d83ee11100812138a9cc642d5341d7770cf6584 Author: Jiri Pirko Date: Tue Sep 15 11:40:58 2020 +0300 mlxsw: core: Introduce fw_fatal health reporter Introduce devlink health reporter to report FW fatal events. Implement the event listener using MFDE trap and enable the events to be propagated using MFGD register configuration. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit e2ce94dc1d89e0f76ddd202cea72e0f505083d0a Author: Jiri Pirko Date: Tue Sep 15 11:40:57 2020 +0300 devlink: introduce the health reporter test command Introduce a test command for health reporters. User might use this command to trigger test event on a reporter if the reporter supports it. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 191c0c22b5c7acbe9670442293951229952fe677 Author: Jiri Pirko Date: Tue Sep 15 11:40:56 2020 +0300 mlxsw: reg: Add Monitoring FW General Debug Register Introduce MFGD register that is used to configure firmware debugging. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 6ddac9dcb14dd31e8cef977ad73b7d07f9f665c8 Author: Jiri Pirko Date: Tue Sep 15 11:40:55 2020 +0300 mlxsw: reg: Add Monitoring FW Debug Register Introduce MFDE register that is passed through MFDE trap in case of fatal FW event. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 703db0ceb8057e42d653f2dead55f31aff173c28 Author: Jiri Pirko Date: Tue Sep 15 11:40:54 2020 +0300 mlxsw: Move fw_load_policy devlink param into core.c As the fw flashing code was moved to core.c, move the param which is related to it there as well. Remove unnecessary parentheses on the way. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 1fb0a49562743ae6d9715d8497c33325007a19c8 Author: Jiri Pirko Date: Tue Sep 15 11:40:53 2020 +0300 mlxsw: core: Push code doing params register/unregister into separate helpers Extract the code calling params register/unregister driver ops into separate functions. Call publish/unpublish unconditionally. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit b79cb787ac70adcbef0f3680365a588380eedb6f Author: Jiri Pirko Date: Tue Sep 15 11:40:52 2020 +0300 mlxsw: Move fw flashing code into core.c As the firmware flashing is not specific to Spectrum, move the code to core.c and avoid one op call and 2 exported symbols. Also, this allows to do flash before call of driver->init function and possibly do other core calls in between. Do some small renaming here and there on the way to be consistent with the rest of core.c code. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit eab1924a2d3a5bf0d45d06d630e3b47c2d81ce2d Author: Jiri Pirko Date: Tue Sep 15 11:40:51 2020 +0300 mlxsw: Bump firmware version to XX.2008.1310 Among other changes, this version supports FW monitoring. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 73f76a41c4ed7def5dc2ec7c33c7e9f94e601a20 Author: Krzysztof Kozlowski Date: Thu Sep 10 20:47:06 2020 +0200 dt-bindings: example: Extend based on practice Extend the example schema with common rules which seems to be not that obvious: 1. Expecting arrays of phandles to be always ordered, regardless if "xxx-names" is provided (e.g. clocks), 2. Add example of altering a property based on presence of other property, 3. Document usage of unevaluatedProperties. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200910184706.9677-1-krzk@kernel.org Signed-off-by: Rob Herring commit ef8e692d69a0649600942950457b3749f3a659b5 Merge: 945c5704887e3 9f19306d16668 Author: David S. Miller Date: Tue Sep 15 15:40:04 2020 -0700 Merge branch 'net-stmmac-Add-ethtool-support-for-get-set-channels' Wong Vee Khee says: ==================== net: stmmac: Add ethtool support for get|set channels This patch set is to add support for user to get or set Tx/Rx channel via ethtool. There are two patches that fixes bug introduced on upstream in order to have the feature work. Tested on Intel Tigerlake Platform. ==================== Signed-off-by: David S. Miller commit 9f19306d166688a73356aa636c62e698bf2063cc Author: Ong Boon Leong Date: Tue Sep 15 09:28:40 2020 +0800 net: stmmac: use netif_tx_start|stop_all_queues() function The current implementation of stmmac_stop_all_queues() and stmmac_start_all_queues() will not work correctly when the value of tx_queues_to_use is changed through ethtool -L DEVNAME rx N tx M command. Also, netif_tx_start|stop_all_queues() are only needed in driver open() and close() only. Fixes: c22a3f48 net: stmmac: adding multiple napi mechanism Signed-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng Signed-off-by: David S. Miller commit 686cff3d7022ddf35d7e38bc80191eb92de5989a Author: Aashish Verma Date: Tue Sep 15 09:28:39 2020 +0800 net: stmmac: Fix incorrect location to set real_num_rx|tx_queues netif_set_real_num_tx_queues() & netif_set_real_num_rx_queues() should be used to inform network stack about the real Tx & Rx queue (active) number in both stmmac_open() and stmmac_resume(), therefore, we move the code from stmmac_dvr_probe() to stmmac_hw_setup(). Fixes: c02b7a914551 net: stmmac: use netif_set_real_num_{rx,tx}_queues Signed-off-by: Aashish Verma Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 0366f7e06a6bee7eace3946a6b67fb88b828bc5c Author: Ong Boon Leong Date: Tue Sep 15 09:28:38 2020 +0800 net: stmmac: add ethtool support for get/set channels Restructure NAPI add and delete process so that we can call them accordingly in open() and ethtool_set_channels() accordingly. Introduced stmmac_reinit_queues() to handle the transition needed for changing Rx & Tx channels accordingly. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 3d49f7426e6c4e9c41d0aa88f0a76616912a383e Author: Tomas Henzl Date: Fri Sep 11 20:00:57 2020 +0200 scsi: mpt3sas: A small correction in _base_process_reply_queue There is no need to compute modulo. A simple comparison is good enough. Link: https://lore.kernel.org/r/20200911180057.14633-1-thenzl@redhat.com Acked-by: sreekanth reddy Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit 45181eab8ba79ed7a41b549f00500c0093828521 Author: Tomas Henzl Date: Thu Sep 10 16:21:26 2020 +0200 scsi: mpt3sas: Fix sync irqs _base_process_reply_queue() called from _base_interrupt() may schedule a new irq poll. Fix this by calling synchronize_irq() first. Also ensure that enable_irq() is called only when necessary to avoid "Unbalanced enable for IRQ..." errors. Link: https://lore.kernel.org/r/20200910142126.8147-1-thenzl@redhat.com Fixes: 320e77acb327 ("scsi: mpt3sas: Irq poll to avoid CPU hard lockups") Acked-by: Sreekanth Reddy Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit e23b1220a24600c7b165f4da4eff3519c2eb8167 Author: Sibi Sankar Date: Thu Sep 3 16:31:34 2020 +0300 arm64: dts: qcom: sc7180: Increase the number of interconnect cells Increase the number of interconnect-cells, as now we can include the tag information. The consumers can specify the path tag as an additional argument to the endpoints. Signed-off-by: Sibi Sankar Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20200903133134.17201-8-georgi.djakov@linaro.org Signed-off-by: Bjorn Andersson commit 7901c2bc3ffc70764bf00f7862edeacb083ecd5c Author: Georgi Djakov Date: Thu Sep 3 16:31:32 2020 +0300 arm64: dts: qcom: sdm845: Increase the number of interconnect cells Increase the number of interconnect-cells, as now we can include the tag information. The consumers can specify the path tag as an additional argument to the endpoints. Tested-by: Sibi Sankar Reviewed-by: Sibi Sankar Reviewed-by: Matthias Kaehlcke Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20200903133134.17201-6-georgi.djakov@linaro.org Signed-off-by: Bjorn Andersson commit f38c43a0e9007e1f21a47a199643a16666902928 Author: Sreekanth Reddy Date: Fri Aug 14 13:04:26 2020 +0000 scsi: mpt3sas: Detect tampered Aero and Sea adapters The driver will throw an error message when a tampered type controller is detected. The intent 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. [mkp: switched back to dev_err] Link: https://lore.kernel.org/r/20200814130426.2741171-1-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 62aa501dc9dd844b311133b90ddea6d3729fceec Author: Jason Yan Date: Tue Sep 15 16:39:48 2020 +0800 scsi: megaraid: Make smp_affinity_enable static This addresses the following sparse warning: drivers/scsi/megaraid/megaraid_sas_base.c:80:5: warning: symbol 'smp_affinity_enable' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200915083948.2826598-1-yanaijie@huawei.com Reported-by: Hulk Robot Reviewed-by: Damien Le Moal Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 1c370903d12d6787db7c7509994e7b5d33daa2c1 Author: Jing Xiangfeng Date: Mon Sep 14 10:32:07 2020 +0800 scsi: target: Remove redundant assignment to variable 'ret' The variable ret has been initialized with a value '0'. The assignment in switch-case is redundant. Remove it. Link: https://lore.kernel.org/r/20200914023207.113792-1-jingxiangfeng@huawei.com Reviewed-by: Maurizio Lombardi Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit d251193d17321d44f96b78d9bb4c8b8ea6786e72 Author: Julian Wiedmann Date: Thu Sep 10 21:49:16 2020 +0200 scsi: zfcp: Clarify access to erp_action in zfcp_fsf_req_complete() While reviewing commit 936e6b85da04 ("scsi: zfcp: Fix panic on ERP timeout for previously dismissed ERP action"), I stumbled over zfcp_fsf_req_complete() and wondered whether it has similar issues wrt concurrent modification of req->erp_action by zfcp_erp_strategy_check_fsfreq(). But a closer look shows that both its two callers [zfcp_fsf_reqid_check(), zfcp_fsf_req_dismiss_all()] remove the request from the adapter's req_list under the req_list's lock. Hence we can trust that if zfcp_erp_strategy_check_fsfreq() concurrently looks up the corresponding req_id, it won't find this request and is thus unable to modify it while it's being processed by zfcp_fsf_req_complete(). Add a code comment that hopefully makes this easier for future readers, and condense the two accesses to ->erp_action that made me trip over this code path in the first place. Link: https://lore.kernel.org/r/c500eac301fcbba5af942bbd200f2d6b14e46994.1599765652.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit addf1372961523cc8cb7ab4ee26d5e1373bf64a0 Author: Julian Wiedmann Date: Thu Sep 10 21:49:15 2020 +0200 scsi: zfcp: Use list_first_entry_or_null() in zfcp_erp_thread() Use the right helper to avoid poking around in the list's internals. Link: https://lore.kernel.org/r/ed669555c73aab95b29444c10066f492c0c43391.1599765652.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 3f4fee002b009ce862067cf22e7f530deaa0b0a7 Author: YueHaibing Date: Wed Sep 9 21:57:11 2020 +0800 scsi: aic94xx: Remove unused inline function There is no caller in tree. Remove it. Link: https://lore.kernel.org/r/20200909135711.35728-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit b836a274b797e90ff0b3bccf0a1e6f8557f590bb Author: Michel Dänzer Date: Fri Sep 4 12:43:04 2020 +0200 drm/amdgpu/dc: Require primary plane to be enabled whenever the CRTC is Don't check drm_crtc_state::active for this either, per its documentation in include/drm/drm_crtc.h: * Hence drivers must not consult @active in their various * &drm_mode_config_funcs.atomic_check callback to reject an atomic * commit. atomic_remove_fb disables the CRTC as needed for disabling the primary plane. This prevents at least the following problems if the primary plane gets disabled (e.g. due to destroying the FB assigned to the primary plane, as happens e.g. with mutter in Wayland mode): * The legacy cursor ioctl returned EINVAL for a non-0 cursor FB ID (which enables the cursor plane). * If the cursor plane was enabled, changing the legacy DPMS property value from off to on returned EINVAL. v2: * Minor changes to code comment and commit log, per review feedback. GitLab: https://gitlab.gnome.org/GNOME/mutter/-/issues/1108 GitLab: https://gitlab.gnome.org/GNOME/mutter/-/issues/1165 GitLab: https://gitlab.gnome.org/GNOME/mutter/-/issues/1344 Suggested-by: Daniel Vetter Acked-by: Daniel Vetter Reviewed-by: Nicholas Kazlauskas Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit f4075be88246eeb9b6cf50339fd6ebf9201f2091 Author: Alex Deucher Date: Mon Sep 14 11:36:21 2020 -0400 drm/amdgpu/gmc9: remove mmhub client duplicated case Copy paste typo. Reported-by: kernel test robot Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ea68573d408fdf8df31dc93e826c35a1f6218f36 Author: Alex Deucher Date: Sun Sep 6 12:05:12 2020 -0400 drm/amdgpu: Fail to load on RAVEN if SME is active Due to hardware bugs, scatter/gather display on raven requires a 1:1 IOMMU mapping, however, SME (System Memory Encryption) requires an indirect IOMMU mapping because the encryption bit is beyond the DMA mask of the chip. As such, the two are incompatible. Acked-by: Joerg Roedel Reviewed-by: Christian König Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit 04a238e9c51118962203f2e332aa464eb563278d Author: YueHaibing Date: Thu Sep 10 11:13:52 2020 +0800 drm/amd/display: Create trigger_hotplug entry Add trigger_hotplug debugfs entry. Fixes: 6f77b2ac6280 ("drm/amd/display: Add connector HPD trigger debugfs entry") Reviewed-by: Harry Wentland Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit d75fa679b056375494501ad47ea98fca5d712ff0 Author: YueHaibing Date: Thu Sep 10 11:26:36 2020 +0800 drm/amd/display: Fix possible memleak in dp_trigger_hotplug() If parse_write_buffer_into_params() fails, we should free wr_buf before return. Fixes: 6f77b2ac6280 ("drm/amd/display: Add connector HPD trigger debugfs entry") Reviewed-by: Harry Wentland Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit d56b83f7c1a42c27fe499be2fb5c75a038459c04 Author: Bernard Zhao Date: Wed Sep 9 19:05:04 2020 -0700 drm/amd/display: optimize code runtime a bit In fnction is_cr_done & is_ch_eq_done, when done = false happened once, no need to circle left ln_count. This change is to make the code run a bit fast. Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit 724dc53b922c98aced93d42d90ffd66a628069af Author: Zheng Bin Date: Wed Sep 9 21:07:20 2020 +0800 drm/amd/amdgpu: fix comparison pointer to bool warning in sdma_v4_0.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1003:4-9: WARNING: Comparison to bool drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1083:5-11: WARNING: Comparison to bool Acked-by: Christian König Signed-off-by: Zheng Bin Signed-off-by: Alex Deucher commit 8f00d1fc9d305add493e6bd379a4b05c284b11e9 Author: Zheng Bin Date: Wed Sep 9 21:07:19 2020 +0800 drm/amd/amdgpu: fix comparison pointer to bool warning in amdgpu_atpx_handler.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c:619:15-49: WARNING: Comparison to bool drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c:629:15-49: WARNING: Comparison to bool Acked-by: Christian König Signed-off-by: Zheng Bin Signed-off-by: Alex Deucher commit 3d0c75afdc2963a8ea62598160397d0f69058231 Author: Zheng Bin Date: Wed Sep 9 21:07:18 2020 +0800 drm/amd/amdgpu: fix comparison pointer to bool warning in uvd_v6_0.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c:1243:14-25: WARNING: Comparison to bool Acked-by: Christian König Signed-off-by: Zheng Bin Signed-off-by: Alex Deucher commit e66cdf250e7cba9fa7308b179fceeb2fdcbed3ba Author: Zheng Bin Date: Wed Sep 9 21:07:17 2020 +0800 drm/amd/amdgpu: fix comparison pointer to bool warning in si.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/si.c:1342:5-10: WARNING: Comparison to bool Acked-by: Christian König Signed-off-by: Zheng Bin Signed-off-by: Alex Deucher commit 4bbbe77c15c633fae464ce7f7106762a1fe7c7a9 Author: Zheng Bin Date: Wed Sep 9 21:07:16 2020 +0800 drm/amd/amdgpu: fix comparison pointer to bool warning in sdma_v5_2.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:562:5-11: WARNING: Comparison to bool Acked-by: Christian König Signed-off-by: Zheng Bin Signed-off-by: Alex Deucher commit 960a06ff9151ab8f27108939ff803538f0612b34 Author: Zheng Bin Date: Wed Sep 9 21:07:15 2020 +0800 drm/amd/amdgpu: fix comparison pointer to bool warning in sdma_v5_0.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:619:5-11: WARNING: Comparison to bool Acked-by: Christian König Signed-off-by: Zheng Bin Signed-off-by: Alex Deucher commit 89cf8b06378ff930fece568d0f18dd2f719694f9 Author: Zheng Bin Date: Wed Sep 9 21:07:14 2020 +0800 drm/amd/amdgpu: fix comparison pointer to bool warning in gfx_v10_0.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:3563:5-31: WARNING: Comparison to bool Acked-by: Christian König Signed-off-by: Zheng Bin Signed-off-by: Alex Deucher commit 7b3fa67d6e0aabb7eb0394608d481eb2aa65f22c Author: Zheng Bin Date: Wed Sep 9 21:07:13 2020 +0800 drm/amd/amdgpu: fix comparison pointer to bool warning in gfx_v9_0.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:2805:5-11: WARNING: Comparison to bool Acked-by: Christian König Signed-off-by: Zheng Bin Signed-off-by: Alex Deucher commit 052813d9fa22d52857b10356c2a7d9c53c285c72 Author: Sandeep Raghuraman Date: Wed Sep 9 16:34:33 2020 +0530 drm/radeon: Add sclk frequency as hwmon sensor This patch adds support for reporting sclk values for Radeon GPUs, where supported. Signed-off-by: Sandeep Raghuraman Signed-off-by: Alex Deucher commit 05f59762bcbfb3b943da3416fa2bc5ea7fdb662b Author: Tian Tao Date: Wed Sep 9 15:57:05 2020 +0800 drm/scheduler: fix sched_fence.c kernel-doc warnings Fix kernel-doc warnings. drivers/gpu/drm/scheduler/sched_fence.c:110: warning: Function parameter or member 'f' not described in 'drm_sched_fence_release_scheduled' drivers/gpu/drm/scheduler/sched_fence.c:110: warning: Excess function parameter 'fence' description in 'drm_sched_fence_release_scheduled' Reviewed-by: Christian König Signed-off-by: Tian Tao Signed-off-by: Alex Deucher commit 2634682fdffd9ba6e74b76be8aa91cf8b2e05c41 Author: Randy Dunlap Date: Tue Sep 8 16:56:09 2020 -0700 drm: amd/display: fix spelling of "function" Fix spellos of "function" in drivers/gpu/drm/amd/display/. Signed-off-by: Randy Dunlap Cc: Harry Wentland Cc: Leo Li Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Alex Deucher commit cce63598976a9834e31c783d395533fc83f95b51 Author: Chen Zhou Date: Tue Sep 8 21:35:52 2020 +0800 drm/amd/display: Remove duplicate include Remove duplicate header which is included twice. Signed-off-by: Chen Zhou Signed-off-by: Alex Deucher commit 7c679ef6678c7718d6c7284e6f9dd8dd4c27d4e4 Author: Jonathan Kim Date: Tue Aug 4 16:26:20 2020 -0400 drm/amdgpu: stop resetting xgmi perfmons on disable Disabling perf events does not specify reset in ABI so stop doing it in hardware. Signed-off-by: Jonathan Kim Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 0f3cd13d846105795de271ac64bb807df38513b7 Author: Christian König Date: Wed Sep 9 13:12:46 2020 +0200 drm/radeon: revert "Prefer lower feedback dividers" Turns out this breaks a lot of different hardware. This reverts commit fc8c70526bd30733ea8667adb8b8ffebea30a8ed. Signed-off-by: Christian König Acked-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 719a6513fb4985305ca36a5dc468a531568e697b Author: Oak Zeng Date: Wed Sep 9 12:51:45 2020 -0500 drm/amdgpu: More accurate description of a function param Add more accurate description of the pe parameter of function amdgpu_vm_sdma_udpate and amdgpu_vm_cpu_update Signed-off-by: Oak Zeng Reviewed-by: Christian Konig Signed-off-by: Alex Deucher commit 91b5900507871c735a99842ebfe959dd33a66690 Author: Oak Zeng Date: Wed Aug 5 10:53:09 2020 -0500 drm/amdgpu: Add comment to function amdgpu_ttm_alloc_gart Add comments to refect what function does Signed-off-by: Oak Zeng Reviewed-by: Christian Konig Signed-off-by: Alex Deucher commit ce87c98db428e779bf19c9cedc850fda22d58576 Author: Andrey Grodzovsky Date: Thu Sep 10 13:59:33 2020 -0400 drm/amdgpu: Include sienna_cichlid in USBC PD FW support. Create sysfs interface also for sienna_cichlid. Reviewed-by: Alex Deucher Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 598c13b21e25542c804dd19b193ca86ca3f5b8c1 Author: Lewis Huang Date: Thu Sep 3 14:04:58 2020 +0800 drm/amd/display: update clock when non-seamless boot stream exist [Why] Seamless boot skip porgram clock when set path mode. It cause driverprogram clock after unblank stream. [How] update clock when non-seamless boot stream exist Signed-off-by: Lewis Huang Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit f833d625b5626f428be99309ebb5fbe682373ec6 Author: Dmytro Laktyushkin Date: Wed Sep 2 16:23:46 2020 -0400 drm/amd/display: update dcn30_optc header with missing declarations Signed-off-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 93669c8e480dca87235d8dcd364f47406b6129b3 Author: Jun Lei Date: Wed Feb 12 11:29:06 2020 -0500 drm/amd/display: get socBB from VBIOS [why] Some SOC BB paramters may vary per SKU, and it does not make sense for driver to hardcode these values [how] Parse the values from VBIOS if available, and use them if valid Signed-off-by: Jun Lei Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit e9462a32792c46d5ce25cb2eb37dd8f8241c8c08 Author: Fangzhi Zuo Date: Wed Sep 2 16:04:53 2020 -0400 drm/amd/display: Further fix of psr eDP p-state warning [Why] psr doesn't get fully disabled before hitting hubbub1_wm_change_req_wa. [How] Pass TRUE to "wait" parameter to get psr fully disabled. Follow-Up fix to: dc: PSR eDP p-state warning occurs intermittently after unplug DP Signed-off-by: Fangzhi Zuo Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit a354b942b46326ff156d7f85e07ce2a632f04165 Author: Jun Lei Date: Thu Sep 3 16:17:46 2020 -0400 drm/amd/display: update nv1x stutter latencies [why] Recent characterization shows increased stutter latencies on some SKUs, leading to underflow. [how] Update SOC params to account for this worst case latency. Signed-off-by: Jun Lei Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit de32a50be7ab2da22002678926242d69e90933cc Author: Roman Li Date: Mon Aug 31 21:30:26 2020 -0400 drm/amd/display: fix compile warning in dml [Why] gcc version 5.4.0 fails compilation with: ‘PixelPTEReqHeightPTEs’ may be used uninitialized in this function [-Werror=maybe-uninitialized] [How] Initialized variable explicitly with 0 Signed-off-by: Roman Li Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit ece11e7b4a9ca8f967d11db1afd3b2ac8c945ecb Author: Josip Pavic Date: Tue Sep 1 17:25:38 2020 -0400 drm/amd/display: remove dc context from transfer function [Why] The ctx field of dc_transfer_func is not always populated and therefore isn't reliable. [How] Remove dc context from dc_transfer_func Signed-off-by: Josip Pavic Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit c44a22b3128d143a66421004b728eed688c21ee6 Author: Eryk Brol Date: Thu Aug 27 17:13:57 2020 -0400 drm/amd/display: Add connector to the state if DSC debugfs is set [why] We want to trigger atomic check on connector, which DSC debugfs properties have changed. [how] Add a helper function that iterates through all active connectors and add them to the state if DSC debugfs parameters have changed. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 28b2f656d3ae27e85a3ac312876d1f3114a2463d Author: Eryk Brol Date: Thu Aug 27 16:57:14 2020 -0400 drm/amd/display: Calculate DSC number of slices in debugfs when forced [why] When comparing current DSC timing settings with enforced through debugfs we have to calculate number of both vertical and horisontal slices. So instead of doing that every time we should just use number of slices rather than setting its dimensions. [how] In connector's dsc preferred settings structure change slice height and slice width parameters to number of slices vertical and horisontal. Also calculate number of slices in debugfs rather in create_stream_for_sink. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 918698d5c2b50433714d2042f55b55b090faa167 Author: Eryk Brol Date: Thu Aug 27 16:48:38 2020 -0400 drm/amd/display: Return the number of bytes parsed than allocated [why & how] Previously we were returning the number of bytes allocated for a write buffer from debugfs and when manually used it wouldn't rise any errors, but it wouldn't match the size of the parameters passed from userspace. In successful case return the size passed by usermode otherwise the error code is returned. That simplifies the parser helper and removes a potential error of returning mismatched input size. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 4b675aad9695070c728c386b8f15ff8f27cd3e34 Author: Joshua Aberback Date: Mon Aug 31 01:58:03 2020 -0400 drm/amd/display: Update idle optimization handling [How] - use dc interface instead of hwss interface in cursor functions, to keep dc->idle_optimizations_allowed updated - add dc interface to check if idle optimizations might apply to a plane Signed-off-by: Joshua Aberback Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 0825d9658b5e6b9ec6220ac5d2500f683c9601e7 Author: Eric Yang Date: Fri Aug 21 17:15:36 2020 -0400 drm/amd/display: implement notify stream mask [Why] Send stream active state info to DMUB [How] Implement GPINT to notify stream mask Signed-off-by: Eric Yang Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit a4832640e29a118256bad7ed50bccde600e4f052 Author: Aric Cyr Date: Mon Aug 31 11:09:18 2020 -0400 drm/amd/display: 3.2.102 Signed-off-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 8b3f6b9857dd07f6023694f33b346a6b35939aa5 Author: Anthony Koo Date: Mon Aug 31 09:39:52 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.32 | [Header Changes] | - Add debug flag to log line numbers for PSR debug Signed-off-by: Anthony Koo Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 6b85151f6bcdb796dfdb4d2e07dbeb4340b6b173 Author: Martin Leung Date: Fri Aug 28 10:48:41 2020 -0400 drm/amd/display: adding pathway to retrieve stutter period why: some functions may need be dependent on stutter period in the future how: Extract from stutter calculations and place into perf_params structure Signed-off-by: Martin Leung Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 6b29bb37373bfdcc851b2c907f6a9049427b1661 Author: Eryk Brol Date: Thu Aug 27 15:45:06 2020 -0400 drm/amd/display: Add trigger connector unplug [why] We need a virtual tool that would emulate a physical connector unplug to usermode, while connector is still physically plugged in. [how] Added a new option to debugfs entry "trigger_hotplug". It emulates hotplug irq handling scenario by clearing DC and DM connector states. It can be triggered with the following command: echo 0 > /sys/kernel/debug/dri/0/DP-X/trigger_hotplug Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 0749ddeb7d6c87e04446c068c03b097d4aa19173 Author: Eryk Brol Date: Fri Aug 14 14:50:19 2020 -0400 drm/amd/display: Add DSC force disable to dsc_clock_en debugfs entry [why] For debug purposes we want not to enable DSC on certain connectors even if algorithm deesires to do so, instead it should enable DSC on other capable connectors or fail the atomic check. [how] Adding the third option to connector's debugfs entry dsc_clock_en. Accepted inputs: 0x0 - connector is using default DSC enablement policy 0x1 - force enable DSC on the connector, if it supports DSC 0x2 - force disable DSC on the connector, if DSC is supported Ex. # echo 0x2 > /sys/kernel/debug/dri/0/DP-1/dsc_clock_en Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 20cc44c9e82a9131c64d0a95d32b18e28d9728f4 Author: Dmytro Laktyushkin Date: Thu Aug 27 15:21:03 2020 -0400 drm/amd/display: make dcn20 stream_gating use a pointer for dsc_pg_control This allows us to reuse these on different asics. Signed-off-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit e4863f118a7d58e080c16dc0cd354736691c2f66 Author: Aric Cyr Date: Sun Aug 23 22:32:14 2020 -0400 drm/amd/display: Multi display cause system lag on mode change [Why] DCValidator is created/destroyed repeatedly for cofunctional validation which causes a lot of memory thrashing, particularly when Driver Verifer is enabled. [How] Implement a basic caching algorithm that will cache DCValidator with a matching topology. When a match is found, the DCValidator can be reused. If there is no match, a new one will be created and inserted into the cache if there is space or an unreference entry can be evicted. Signed-off-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 48e48e5984782171ac8d2ec09b7e688e141d7c86 Author: Zhan Liu Date: Fri Aug 28 14:18:56 2020 -0400 drm/amd/display: Disable idle optimization when PSR is enabled [Why] Idle optimization and PSR conflict each other. If both enabled at the same time, display flickering will be observed. [How] Disable idle optimization when PSR is enabled. Signed-off-by: Zhan Liu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit bd80d584cd8e2502b6be48544a14970016c86aa4 Author: Bhawanpreet Lakha Date: Fri Aug 28 11:09:38 2020 -0400 drm/amd/display: Don't use DRM_ERROR() for DTM add topology [Why] Previously we were only calling add_topology when hdcp was being enabled. Now we call add_topology by default so the ERROR messages are printed if the firmware is not loaded. This error message is not relevant for normal display functionality so no need to print a ERROR message. [How] Change DRM_ERROR to DRM_INFO Signed-off-by: Bhawanpreet Lakha Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 6cd792372489a56686c7b38e80ddad62cb3d0fec Author: Alvin Lee Date: Fri Aug 28 10:09:05 2020 -0400 drm/amd/display: Compare plane when looking for pipe split being lost [Why] There are situations where we go from 2 pipe to 1 pipe in MPO, but this isn't a pipe split being lost -- it's a plane disappearing in (i.e. video overlay goes away) so we lose one pipe. In these situations we don't want to disable the pipe in a separate operation from the rest of the pipe programming sequence. We only want to disable a pipe in a separate operation when we're actually disabling pipe split. [How] Make sure the pipe being lost has the same stream AND plane as the old top pipe to ensure. Signed-off-by: Alvin Lee Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 5fd35f1291316a3a9dc2fb7f976446d20b65106a Author: Zhan Liu Date: Sun Aug 23 20:48:44 2020 -0400 drm/amd/display: Enabling PSR on DCN30 on driver side [Why] PSR needs to be enabled on DCN30. This is the driver part of PSR enablement. Also disabled retired DMCU on driver side, since DMCU is not supported on DCN30 anymore. [How] Add necessary changes to enable PSR on DCN30. Signed-off-by: Zhan Liu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit f9663cbd46815c214b1841f4eef5c5e9e6350ff9 Author: Roman Li Date: Thu Aug 27 17:54:57 2020 -0400 drm/amd/display: remove early return from dm_late_init [Why] ABM feature initialization was not executed due to early return. dm_late_init() had an early return in case if DMCU is not used. With the implementation of ABM on DMUB, DMCU can be disabled but ABM still needs to be initialized. [How] Remove verification for DMCU from the top of the function. The existing logic will handle the case when DMCU is not used. Signed-off-by: Roman Li Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 6c95320d01dcac321e9e89903a26a840838a0ef6 Author: George Shen Date: Tue Aug 18 18:42:55 2020 -0400 drm/amd/display: Rename set_mst_bandwidth to align with DP spec [Why] The function set_mst_bandwidth is poorly name since it isn't clear what it does, and it also does not reflect any part of the allocation sequence described in the DP spec. [How] Rename the function set_mst_bandwidth to set_throttled_vcp_size. Signed-off-by: George Shen Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit e8cb7a4dd9dffff72172d94dcea4577219426106 Author: Aric Cyr Date: Fri Aug 21 11:26:51 2020 -0400 drm/amd/display: Flip pending check timeout due to disabled hubp [Why] When pipe locks are being taken we wait for flip pending to clear first. In some cases the pipe mapping is changed and the pending we're checking for will never clear. [How] Don't check disabled pipes for flip pending. Signed-off-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 123ecf6836904bc38bd24402f583e464e6c51fc9 Author: Aidan Gratton Date: Mon Aug 17 14:50:12 2020 -0600 drm/amd/display: Increase Max EDID Size Constant [HOW & WHY] Change max EDID size constant to 1280 to support 10-block EDIDs. Signed-off-by: Aidan Gratton Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 172c9b77816549c660aaa79e5df5c1be479f266b Author: Ashley Thomas Date: Thu Aug 6 19:18:37 2020 -0700 drm/amd/display: Power eDP panel back ON before link training retry [why] When link training failures occur for eDP, dp_disable_link_phy is called which powers OFF eDP panel. After link training retry delay, the next retry begins by calling dp_enable_link_phy which does not issue a correspnding eDP panel power ON, leaving panel powered OFF which leads to display OFF/dark. [how] Power ON eDP before next link training retry. Signed-off-by: Ashley Thomas Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 5cd04c4846a3f910fc8a7150cae81542a0ab32d3 Author: Harmanprit Tatla Date: Thu Aug 20 15:52:18 2020 -0400 drm/amd/display: Fix CP_IRQ clear bit and logic [Why] Currently clearing the wrong bit for CP_IRQ, and logic on when to clear needs to be fixed. [How] Corrected bit to clear and improved logic for decision to clear. Signed-off-by: Harmanprit Tatla Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 05e3d830fac89af58b9b6a78e5a498f2984cd2cf Author: Wesley Chalmers Date: Tue Aug 25 10:57:24 2020 -0400 drm/amd/display: Only use offset for first ODM pipe [WHY] Only the first pipe in ODM combine group should have nonzero recout offset. All other pipes should have recout offset 0; otherwise there will be gaps in the image. [HOW] Set recout.x to 0 if the pipe is not the leftmost ODM pipe. When computing viewports, calculate the horizontal offset of a pipe's src based on the current pipe's position in the ODM group, plus whatever offset the leftmost ODM pipe has; otherwise there will be discontinuity in the image. Since ODM combine can only combine pipes horizontally, nothing needs to be done for recout.y. Signed-off-by: Wesley Chalmers Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 3fb068c3ec862b63b002e7818896cebea925e109 Author: Wenjing Liu Date: Tue Aug 11 18:27:48 2020 -0400 drm/amd/display: always use 100us for cr aux rd interval [why] The cr training aux rd interval is modified without following specs requirements. According to the commit message the change was not intended to modify the value. Therefore it looks like it is caused by a typo in the change. Signed-off-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 64fbb86d6b6f72c420dfcf23f82811a44d1c4670 Author: Aric Cyr Date: Mon Aug 24 10:25:33 2020 -0400 drm/amd/display: 3.2.101 Signed-off-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 81ac89cab037c5ebe0f27638dbb2cf45ef7e26df Author: Anthony Koo Date: Sun Aug 23 20:18:11 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.31 Signed-off-by: Anthony Koo Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 4b4f21ff7f5d11bb77e169b306dcbc5b216f5db5 Author: Rodrigo Siqueira Date: Thu Aug 20 14:26:07 2020 -0400 drm/amd/display: Check clock table return During the load processes for Renoir, our display code needs to retrieve the SMU clock and voltage table, however, this operation can fail which means that we have to check this scenario. Currently, we are not handling this case properly and as a result, we have seen the following dmesg log during the boot: RIP: 0010:rn_clk_mgr_construct+0x129/0x3d0 [amdgpu] ... Call Trace: dc_clk_mgr_create+0x16a/0x1b0 [amdgpu] dc_create+0x231/0x760 [amdgpu] This commit fixes this issue by checking the return status retrieved from the clock table before try to populate any bandwidth. Signed-off-by: Rodrigo Siqueira Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 091018a51c16ec28db3603dcf85832ec57ccf5fe Author: Aric Cyr Date: Fri Aug 21 11:33:22 2020 -0400 drm/amd/display: Triplebuffering should not be used by default Disable triplebuffering by default. Signed-off-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit ce17ce17af328a3a1fd0c5e00f6b04af94b0be01 Author: Wenjing Liu Date: Fri Aug 7 19:08:25 2020 -0400 drm/amd/display: add option to override cr training pattern Signed-off-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 0b02e1fda5422a144a8bfca9be22547b4d291f20 Author: Joshua Aberback Date: Thu Aug 20 00:57:22 2020 -0400 drm/amd/display: Compare mpcc_inst to mpcc_count instead of a constant [Why] This assert triggers a false negative because there are more than 4 MPCCs on many asics. [How] - change assert comparisson - remove unused variable Signed-off-by: Joshua Aberback Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 958000cb24cc2db5f3ce1c70b9ad2b3e20b73581 Author: Harmanprit Tatla Date: Wed Aug 19 17:39:45 2020 -0400 drm/amd/display: Add CP_IRQ clear capability [Why] Currently we do not clear the CP_IRQ bit upon receiving it. [How] Added a function to clear CP_IRQ bit. Signed-off-by: Harmanprit Tatla Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 498563cf9ca00dc4ee389cf2729dae81417a144f Author: JinZe.Xu Date: Thu Aug 13 16:59:24 2020 +0800 drm/amd/display: Detect plane change when detect pipe change. [Why] If plane has changed, dcn20_detect_pipe_changes doesn't update dc_plane_state->update_flags, and the following dcn20_program_pipe can't reprogram hubp correctly. [How] Add a new flags bit "plane_changed" in pipe_ctx->update_flags.If old plane isn’t identical to new plane, this bit will be set and guide “dcn20_program_pipe” to programing HUBP correctly. Signed-off-by: JinZe.Xu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit a861736dae644a0d7abbca0c638ae6aad28feeb8 Author: Naveed Ashfaq Date: Fri Aug 14 13:48:13 2020 -0400 drm/amd/display: Fixed Intermittent blue screen on OLED panel [why] Changing to smaller modes on OLED panel caused a blue screen crash as driver reported dram change during vactive when it shouldn't [how] Added an extra condition to prevent incorrect dram change timing Signed-off-by: Naveed Ashfaq Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 14ae69026f840bf3a1ff861ccd43d4e96d6b08cf Author: Aric Cyr Date: Mon Aug 17 12:16:28 2020 -0400 drm/amd/display: 3.2.100 Signed-off-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 8e8e9463a8fdcdd74cd727864bb84bc509caf48e Author: Anthony Koo Date: Mon Aug 17 09:59:57 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.30 Signed-off-by: Anthony Koo Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 39767222bf311e6aa6465315f8eb4acc022db48d Author: Jiansong Chen Date: Mon Sep 14 14:42:51 2020 +0800 drm/amd/pm: support runtime pptable update for sienna_cichlid etc. This avoids smu issue when enabling runtime pptable update for sienna_cichlid and so on. Runtime pptable udpate is needed for test and debug purpose. Signed-off-by: Jiansong Chen Reviewed-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 26652cd8deae0b039b00e07e77706d29415b5bce Author: Flora Cui Date: Tue Sep 8 15:26:43 2020 +0800 drm/amdgpu: drop BOOLEAN define in display part use bool directly Signed-off-by: Flora Cui Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 62f6b1162e91a4d31c17ed13ff7c2dcc86eda501 Author: Mukul Joshi Date: Fri Sep 11 17:24:14 2020 -0400 drm/amdgpu: Enable SDMA utilization for Arcturus SDMA utilization calculations are enabled/disabled by writing to SDMAx_PUB_DUMMY_REG2 register. Currently, enable this only for Arcturus. Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 6d90a208cfff94c519caaecbc5da3af3929bf374 Author: Aurabindo Pillai Date: Fri Sep 11 15:10:11 2020 -0400 drm/amd/display: Move disable interrupt into commit tail [Why&How] Since there is no need for accessing crtc state in the interrupt handler, interrupts need not be disabled well in advance, and can be moved to commit_tail where it should be. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 585d450c76d1d5807a50cb6c22487ae5aed0906b Author: Aurabindo Pillai Date: Wed Aug 12 18:56:14 2020 -0400 drm/amd/display: Refactor to prevent crtc state access in DM IRQ handler [Why&How] Currently commit_tail holds global locks and wait for dependencies which is against the DRM API contracts. Inorder to fix this, IRQ handler should be able to run without having to access crtc state. Required parameters are copied over so that they can be directly accessed from the interrupt handler Reviewed-by: Nicholas Kazlauskas Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 5d1c59c47997e9955be3a52e261c08e8b40b3902 Author: Aurabindo Pillai Date: Wed Aug 12 12:40:34 2020 -0400 drm/amdgpu: Move existing pflip fields into separate struct [Why&How] To refactor DM IRQ management, all fields used by IRQ is best moved to a separate struct so that main amdgpu_crtc struct need not be changed Location of the new struct shall be in DM Reviewed-by: Nicholas Kazlauskas Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 9c7e2ceb1db064da10d8386590ce23afdc7dc6f0 Author: John Clements Date: Fri Sep 11 14:26:13 2020 +0800 drm/amdgpu: Update RAS init handling Output RAS init status If RAS init fails, teardown RAS context Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 2b3bbf23549f186520005cecc6795327eeb29a35 Author: YueHaibing Date: Thu Sep 10 15:50:06 2020 +0800 drm/amdkfd: Fix -Wunused-const-variable warning If KFD_SUPPORT_IOMMU_V2 is not set, gcc warns: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device.c:121:37: warning: ‘raven_device_info’ defined but not used [-Wunused-const-variable=] static const struct kfd_device_info raven_device_info = { ^~~~~~~~~~~~~~~~~ As Huang Rui suggested, Raven already has the fallback path, so it should be out of IOMMU v2 flag. Suggested-by: Huang Rui Signed-off-by: YueHaibing Acked-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit f399d4de2d6a2e329ef3bceaa0e6a74c9d36c3cd Author: Changfeng Date: Tue Sep 8 16:12:42 2020 +0800 drm/amdgpu: add ta DTM/HDCP print in amdgpu_firmware_info for apu It needs to add ta DTM/HDCP print to get HDCP/DTM version info when cat amdgpu_firmware_info Signed-off-by: Changfeng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 9c1615be19490ebf589696224cfedc0abddc9234 Author: Jiansong Chen Date: Thu Sep 10 17:08:47 2020 +0800 drm/amd/pm: update driver if version for navy_flounder It's in accordance with pmfw 65.8.0 for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 0e4b291bb76efbda9f542e514d16f9f3956fce5b Author: Likun Gao Date: Thu Sep 10 16:03:08 2020 +0800 drm/amd/pm: update driver if file for sienna cichlid Update drive if file for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit a9e81c2922bfc4cfe04e33fcbc49ef21e367d7de Author: YueHaibing Date: Wed Sep 9 21:54:32 2020 +0800 scsi: libfc: Fix passing zero to 'PTR_ERR' warning drivers/scsi/libfc/fc_disc.c:304 fc_disc_error() warn: passing zero to 'PTR_ERR' fp may be NULL in fc_disc_error(), use PTR_ERR_OR_ZERO to handle this. Link: https://lore.kernel.org/r/20200909135432.36772-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit bff8b14b097433c46f142ea8cd8deb910a66d8fc Author: Jason Yan Date: Fri Sep 11 17:10:57 2020 +0800 scsi: fnic: Remove unneeded semicolon This addresses the following coccinelle warning: drivers/scsi/fnic/fnic_main.c:446:2-3: Unneeded semicolon Link: https://lore.kernel.org/r/20200911091057.2938685-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 94e476520e1e4e540236021c9e32a5420cabf3c3 Author: Jason Yan Date: Fri Sep 11 17:10:49 2020 +0800 scsi: nsp32: Remove unneeded semicolon This addresses the following coccinelle warning: drivers/scsi/nsp32.c:1250:4-5: Unneeded semicolon drivers/scsi/nsp32.c:1842:2-3: Unneeded semicolon Link: https://lore.kernel.org/r/20200911091049.2938158-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 8d4089cdc313f3ff96ed5ae800f0a1a5d7f3a47e Author: Jason Yan Date: Fri Sep 11 17:10:31 2020 +0800 scsi: sym53c8xx_2: Remove unneeded semicolon This addresses the following coccinelle warning: drivers/scsi/sym53c8xx_2/sym_fw.c:372:3-4: Unneeded semicolon drivers/scsi/sym53c8xx_2/sym_fw.c:480:3-4: Unneeded semicolon drivers/scsi/sym53c8xx_2/sym_fw.c:536:2-3: Unneeded semicolon Link: https://lore.kernel.org/r/20200911091031.2937834-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 34eb5ccf35daea082b6bc3857f82f23155fb266f Author: Jason Yan Date: Fri Sep 11 17:10:21 2020 +0800 scsi: qla2xxx: Remove unneeded variable 'rval' This addresses the following coccinelle warning: drivers/scsi/qla2xxx/qla_init.c:7112:5-9: Unneeded variable: "rval". Return "QLA_SUCCESS" on line 7115 Link: https://lore.kernel.org/r/20200911091021.2937708-1-yanaijie@huawei.com Reported-by: Hulk Robot Reviewed-by: Himanshu Madhani Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 7cbbc745dc11a75e11df532ca1566949709d6695 Author: Andrey Grodzovsky Date: Mon Aug 31 11:34:33 2020 -0400 drm/amdgpu: Minor checkpatch fix Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 6894305c97ceb56c0caa6f701516546a732af95f Author: Andrey Grodzovsky Date: Mon Aug 24 14:41:56 2020 -0400 drm/amdgpu: Disable DPC for XGMI for now. XGMI support is more complicated than single device support as questions of synchronization between the device recovering from PCI error and other members of the hive are required. Leaving this for next round. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7ac71382e90aba1f58e304e386acdd02af963027 Author: Andrey Grodzovsky Date: Mon Aug 24 14:27:40 2020 -0400 drm/amdgpu: Trim amdgpu_pci_slot_reset by reusing code. Reuse exsisting functions from GPU recovery to avoid code duplications. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c1dd4aa624076cb6d4724fad2d9e9e71e46bbc9f Author: Andrey Grodzovsky Date: Mon Aug 24 12:30:47 2020 -0400 drm/amdgpu: Fix consecutive DPC recovery failures. Cache the PCI state on boot and before each case where we might loose it. v2: Add pci_restore_state while caching the PCI state to avoid breaking PCI core logic for stuff like suspend/resume. v3: Extract pci_restore_state from amdgpu_device_cache_pci_state to avoid superflous restores during GPU resets and suspend/resumes. v4: Style fixes. Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 362c7b91c1b00e31ebd219af1e493e7ef50ccfb4 Author: Andrey Grodzovsky Date: Mon Aug 24 11:02:18 2020 -0400 drm/amdgpu: Fix SMU error failure Wait for HW/PSP initiated ASIC reset to complete before starting the recovery operations. v2: Remove typo Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit acd89fca672dd2a7c3a83038cce7601498f21105 Author: Andrey Grodzovsky Date: Wed Jul 29 14:14:36 2020 -0400 drm/amdgpu: Block all job scheduling activity during DPC recovery DPC recovery involves ASIC reset just as normal GPU recovery so block SW GPU schedulers and wait on all concurrent GPU resets. Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit bf36b52e781d7412c3fce826f74ba6a73b9be4d0 Author: Andrey Grodzovsky Date: Wed Jul 29 13:10:29 2020 -0400 drm/amdgpu: Avoid accessing HW when suspending SW state At this point the ASIC is already post reset by the HW/PSP so the HW not in proper state to be configured for suspension, some blocks might be even gated and so best is to avoid touching it. v2: Rename in_dpc to more meaningful name Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c9a6b82f45e261d247b980a7949aaa6a9bfffe01 Author: Andrey Grodzovsky Date: Wed Jul 29 12:59:45 2020 -0400 drm/amdgpu: Implement DPC recovery Add PCI Downstream Port Containment (DPC) with basic recovery functionality v2: remove pci_save_state to avoid breaking suspend/resume v3: Fix style comments v4: Improve description. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2a9787dcf537d0e4f1fa41cbd883abe9d70b9fcb Author: Liu ChengZhe Date: Wed Sep 9 16:00:12 2020 +0800 drm/amdgpu: Do gpu recovery when no job is running In function flr_work, we should do gpu recovery when no job is running. Fix the logic by inverting it. v2: modify the description Reviewed-by: Christian König Signed-off-by: Liu ChengZhe Signed-off-by: Alex Deucher commit edb084f487a3b7c86efce81bfa1a7aa666dd4047 Author: Dennis Li Date: Wed Sep 2 17:11:09 2020 +0800 drm/amdkfd: fix a memory leak issue In the resume stage of GPU recovery, start_cpsch will call pm_init which set pm->allocated as false, cause the next pm_release_ib has no chance to release ib memory. Add pm_release_ib in stop_cpsch which will be called in the suspend stage of GPU recovery. Reviewed-by: Felix Kuehling Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit a9a83a92d0da38a78c0afda096c0a4a5f39f9480 Author: Dennis Li Date: Wed Sep 2 12:57:59 2020 +0800 drm/kfd: fix a system crash issue during GPU recovery The crash log as the below: [Thu Aug 20 23:18:14 2020] general protection fault: 0000 [#1] SMP NOPTI [Thu Aug 20 23:18:14 2020] CPU: 152 PID: 1837 Comm: kworker/152:1 Tainted: G OE 5.4.0-42-generic #46~18.04.1-Ubuntu [Thu Aug 20 23:18:14 2020] Hardware name: GIGABYTE G482-Z53-YF/MZ52-G40-00, BIOS R12 05/13/2020 [Thu Aug 20 23:18:14 2020] Workqueue: events amdgpu_ras_do_recovery [amdgpu] [Thu Aug 20 23:18:14 2020] RIP: 0010:evict_process_queues_cpsch+0xc9/0x130 [amdgpu] [Thu Aug 20 23:18:14 2020] Code: 49 8d 4d 10 48 39 c8 75 21 eb 44 83 fa 03 74 36 80 78 72 00 74 0c 83 ab 68 01 00 00 01 41 c6 45 41 00 48 8b 00 48 39 c8 74 25 <80> 78 70 00 c6 40 6d 01 74 ee 8b 50 28 c6 40 70 00 83 ab 60 01 00 [Thu Aug 20 23:18:14 2020] RSP: 0018:ffffb29b52f6fc90 EFLAGS: 00010213 [Thu Aug 20 23:18:14 2020] RAX: 1c884edb0a118914 RBX: ffff8a0d45ff3c00 RCX: ffff8a2d83e41038 [Thu Aug 20 23:18:14 2020] RDX: 0000000000000000 RSI: 0000000000000082 RDI: ffff8a0e2e4178c0 [Thu Aug 20 23:18:14 2020] RBP: ffffb29b52f6fcb0 R08: 0000000000001b64 R09: 0000000000000004 [Thu Aug 20 23:18:14 2020] R10: ffffb29b52f6fb78 R11: 0000000000000001 R12: ffff8a0d45ff3d28 [Thu Aug 20 23:18:14 2020] R13: ffff8a2d83e41028 R14: 0000000000000000 R15: 0000000000000000 [Thu Aug 20 23:18:14 2020] FS: 0000000000000000(0000) GS:ffff8a0e2e400000(0000) knlGS:0000000000000000 [Thu Aug 20 23:18:14 2020] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [Thu Aug 20 23:18:14 2020] CR2: 000055c783c0e6a8 CR3: 00000034a1284000 CR4: 0000000000340ee0 [Thu Aug 20 23:18:14 2020] Call Trace: [Thu Aug 20 23:18:14 2020] kfd_process_evict_queues+0x43/0xd0 [amdgpu] [Thu Aug 20 23:18:14 2020] kfd_suspend_all_processes+0x60/0xf0 [amdgpu] [Thu Aug 20 23:18:14 2020] kgd2kfd_suspend.part.7+0x43/0x50 [amdgpu] [Thu Aug 20 23:18:14 2020] kgd2kfd_pre_reset+0x46/0x60 [amdgpu] [Thu Aug 20 23:18:14 2020] amdgpu_amdkfd_pre_reset+0x1a/0x20 [amdgpu] [Thu Aug 20 23:18:14 2020] amdgpu_device_gpu_recover+0x377/0xf90 [amdgpu] [Thu Aug 20 23:18:14 2020] ? amdgpu_ras_error_query+0x1b8/0x2a0 [amdgpu] [Thu Aug 20 23:18:14 2020] amdgpu_ras_do_recovery+0x159/0x190 [amdgpu] [Thu Aug 20 23:18:14 2020] process_one_work+0x20f/0x400 [Thu Aug 20 23:18:14 2020] worker_thread+0x34/0x410 When GPU hang, user process will fail to create a compute queue whose struct object will be freed later, but driver wrongly add this queue to queue list of the proccess. And then kfd_process_evict_queues will access a freed memory, which cause a system crash. v2: The failure to execute_queues should probably not be reported to the caller of create_queue, because the queue was already created. Therefore change to ignore the return value from execute_queues. Reviewed-by: Felix Kuehling Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit 945c5704887e35bb4aee841c17aca9dd277c5e55 Merge: 0f9ad4e759441 12d342fea121f Author: David S. Miller Date: Tue Sep 15 13:26:29 2020 -0700 Merge branch 'ethtool-add-pause-frame-stats' Jakub Kicinski says: ==================== ethtool: add pause frame stats This is the first (small) series which exposes some stats via the corresponding ethtool interface. Here (thanks to the excitability of netlink) we expose pause frame stats via the same interfaces as ethtool -a / -A. In particular the following stats from the standard: - 30.3.4.2 aPAUSEMACCtrlFramesTransmitted - 30.3.4.3 aPAUSEMACCtrlFramesReceived 4 real drivers are converted, I believe we got confirmation from maintainers that all exposed stats match the standard. v3: - fix mlx5 build - adjust the init logic in patch 1 v2: - netdevsim: add missing static - bnxt: fix sparse warning - mlx5: address Saeed's comments ==================== Signed-off-by: David S. Miller commit 12d342fea121f04e4ccb6febf41f59ebb74bbe64 Author: Jakub Kicinski Date: Mon Sep 14 17:11:59 2020 -0700 mlx4: add pause frame stats Check if the pause stats are reported by HW by checking the bitmap. Calculation is based on the order of strings in main_strings from ethtool -S. Hopefully the semantics of these stats match the standard.. Signed-off-by: Jakub Kicinski Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit 098d9ed9efb3e6edfbe6f1b3cdfd5b2ad3228bf2 Author: Jakub Kicinski Date: Mon Sep 14 17:11:58 2020 -0700 mlx5: add pause frame stats Plumb through all the indirection and copy some code from ethtool -S. The names of the group indicate that these are the stats we are after (and Saeed confirms it). v3: - fix build in mlx5_rep v2: - drop the ethool helper and call stats directly - don't pass 0 as initialized to in buffer - use local buffer Signed-off-by: Jakub Kicinski Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit eabbe2bb688b0dfb41f0d62a77c6371da6d371ed Author: Jakub Kicinski Date: Mon Sep 14 17:11:57 2020 -0700 ixgbe: add pause frame stats Report standard pause frame stats. They are already aggregated in struct ixgbe_hw_stats. The combination of the registers is suggested as equivalent to PAUSEMACCtrlFramesTransmitted / PAUSEMACCtrlFramesReceived by the Intel 82576EB datasheet, I could not find any information in the HW actually supported by ixgbe. Signed-off-by: Jakub Kicinski Reviewed-by: Alexander Duyck Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit 423cffcf6c70031cb2265d0476087450ed89db59 Author: Jakub Kicinski Date: Mon Sep 14 17:11:56 2020 -0700 bnxt: add pause frame stats These stats are already reported in ethtool -S. Michael confirms they are equivalent to standard stats. v2: - fix sparse warning about endian by using the macro - use u64 for pointer type Signed-off-by: Jakub Kicinski Reviewed-by: Saeed Mahameed Reviewed-by: Michael Chan Signed-off-by: David S. Miller commit 242aaf03dc9be30027d3159a13b935856dab3ba0 Author: Jakub Kicinski Date: Mon Sep 14 17:11:55 2020 -0700 selftests: add a test for ethtool pause stats Make sure the empty nest is reported even without stats. Make sure reporting only selected stats works fine. Signed-off-by: Jakub Kicinski Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit ff1f7c17fb20183a4ab5ce92bdb3f3675fb4f751 Author: Jakub Kicinski Date: Mon Sep 14 17:11:54 2020 -0700 netdevsim: add pause frame stats Add minimal ethtool interface for testing ethtool pause stats. v2: add missing static on nsim_ethtool_ops Signed-off-by: Jakub Kicinski Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit 8c00bd936f335461158dd50225ca8f2ea05a3717 Author: Jakub Kicinski Date: Mon Sep 14 17:11:53 2020 -0700 docs: net: include the new ethtool pause stats in the stats doc Tell people that there now is an interface for querying pause frames. A little bit of restructuring is needed given this is a first source of such statistics. Signed-off-by: Jakub Kicinski Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit 9a27a33027f22a716ce362be48d70ae0eb012ab7 Author: Jakub Kicinski Date: Mon Sep 14 17:11:52 2020 -0700 ethtool: add standard pause stats Currently drivers have to report their pause frames statistics via ethtool -S, and there is a wide variety of names used for these statistics. Add the two statistics defined in IEEE 802.3x to the standard API. Create a new ethtool request header flag for including statistics in the response to GET commands. Always create the ETHTOOL_A_PAUSE_STATS nest in replies when flag is set. Testing if driver declares the op is not a reliable way of checking if any stats will actually be included and therefore we don't want to give the impression that presence of ETHTOOL_A_PAUSE_STATS indicates driver support. Note that this patch does not include PFC counters, which may fit better in dcbnl? But mostly I don't need them/have a setup to test them so I haven't looked deeply into exposing them :) v3: - add a helper for "uninitializing" stats, rather than a cryptic memset() (Andrew) Signed-off-by: Jakub Kicinski Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit 5f40bb39ad555066589bfdcbfaaab1fad56ce1b0 Author: Heinrich Schuchardt Date: Thu Sep 10 18:20:20 2020 +0200 of: properties of reserved-memory nodes The reusable and the no-map property are mutually exclusive. Clarify this in the documentation. Acked-by: Grant Likely Signed-off-by: Heinrich Schuchardt Link: https://lore.kernel.org/r/20200910162020.3927-1-xypron.glpk@gmx.de Signed-off-by: Rob Herring commit 0f9ad4e7594419e906427bceba8e52467412895b Merge: afb83012cc723 521c65b649160 Author: David S. Miller Date: Tue Sep 15 13:21:47 2020 -0700 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2020-09-10 subject to positive review by the bridge maintainers on patch 5, please apply the following patch series to netdev's net-next tree. Alexandra adds BR_LEARNING_SYNC support to qeth. In addition to the main qeth changes (controlling the feature, and raising switchdev events), this also needs - Patch 1 and 2 for some s390/cio infrastructure improvements (acked by Heiko to go in via net-next), and - Patch 5 to introduce a new switchdev_notifier_type, so that a driver can clear all previously learned entries from the bridge FDB in case things go out-of-sync later on. ==================== Signed-off-by: David S. Miller commit 521c65b6491602622562d12e219dc6a53fcab9e2 Author: Alexandra Winter Date: Thu Sep 10 19:23:51 2020 +0200 s390/qeth: implement ndo_bridge_setlink for learning_sync Documentation/networking/switchdev.txt and 'man bridge' indicate that the learning_sync bridge attribute is used to control whether a given device will sync MAC addresses learned on its device port to a master bridge FDB, where they will show up as 'extern_learn offload'. So we map qeth_l2_dev2br_an_set() to the learning_sync bridge link attribute. Turning off learning_sync will flush all extern_learn entries from the bridge fdb and all pending events from the card's work queue. When the hardware interface goes offline with learning_sync on (e.g. for HW recovery), all extern_learn entries will be flushed from the bridge fdb and all pending events from the card's work queue. When the interface goes online again, it will send new notifications for all then valid MACs. learning_sync attribute can not be modified while interface is offline. See 'commit e6e771b3d897 ("s390/qeth: detach netdevice while card is offline")' An alternative implementation would be to always offload the 'learning' attribute of a software bridge to the hardware interface attached to it and thus implicitly enable fdb notification. This was not chosen for 2 reasons: 1) In our case the software bridge is NOT a representation of a hardware switch. It is just connected to a smart NIC that is able to inform about the addresses attached to it. It is not necessarily using source MAC learning for this and other bridgeports can be attached to other NICs with different properties. 2) We want a means to enable this notification explicitly. There may be cases where a bridgeport is set to 'learning', but we do not want to enable the notification. Signed-off-by: Alexandra Winter Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 780b6e7db25ed97248b7f747e98d2f7e7971156a Author: Alexandra Winter Date: Thu Sep 10 19:23:50 2020 +0200 s390/qeth: implement ndo_bridge_getlink for learning_sync Documentation/networking/switchdev.txt and 'man bridge' indicate that the learning_sync bridge attribute is used to indicate whether a given device will sync MAC addresses learned on its device port to a master bridge FDB. learning_sync attribute can not be read while interface is offline (down). See 'commit e6e771b3d897 ("s390/qeth: detach netdevice while card is offline")' We return EOPNOTSUPP and not EONODEV in this case, because EONOTSUPP is the only rc that is tolerated by 'bridge -d link show'. Signed-off-by: Alexandra Winter Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 817741a8eaa21cc46baf6c4852e4ff83204b8181 Author: Alexandra Winter Date: Thu Sep 10 19:23:49 2020 +0200 s390/qeth: Reset address notification in case of buffer overflow In case hardware sends more device-to-bridge-address-change notfications than the qeth-l2 driver can handle, the hardware will send an overflow event and then stop sending any events. It expects software to flush its FDB and start over again. Re-enabling address-change-notification will report all current addresses. In order to re-enable address-change-notification this patch defines the functions qeth_l2_dev2br_an_set() and qeth_l2_dev2br_an_set_cb to enable or disable dev-to-bridge-address-notification. A following patch will use the learning_sync bridgeport flag to trigger enabling or disabling of address-change-notification, so we define priv->brport_features to store the current setting. BRIDGE_INFO and ADDR_INFO functionality are mutually exclusive, whereas ADDR_INFO and qeth_l2_vnicc* can be used together. Alternative implementations to handle buffer overflow: Just re-enabling notification and adding all newly reported addresses would cover any lost 'add' events, but not the lost 'delete' events. Then these invalid addresses would stay in the bridge FDB as long as the device exists. Setting the net device down and up, would be an alternative, but is a bit drastic. If the net device has many secondary addresses this will create many delete/add events at its peers which could de-stabilize the network segment. Signed-off-by: Alexandra Winter Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit d05e8e68b07cef9d52bbf53e75fa5faea81e1da6 Author: Alexandra Winter Date: Thu Sep 10 19:23:48 2020 +0200 bridge: Add SWITCHDEV_FDB_FLUSH_TO_BRIDGE notifier so the switchdev can notifiy the bridge to flush non-permanent fdb entries for this port. This is useful whenever the hardware fdb of the switchdev is reset, but the netdev and the bridgeport are not deleted. Note that this has the same effect as the IFLA_BRPORT_FLUSH attribute. CC: Jiri Pirko CC: Ivan Vecera CC: Roopa Prabhu CC: Nikolay Aleksandrov Signed-off-by: Alexandra Winter Signed-off-by: Julian Wiedmann Acked-by: Nikolay Aleksandrov Acked-by: Ivan Vecera Signed-off-by: David S. Miller commit 10a6cfc0fc8208eff3d1dd8dce1487754213e337 Author: Alexandra Winter Date: Thu Sep 10 19:23:47 2020 +0200 s390/qeth: Translate address events into switchdev notifiers A qeth-l2 HiperSockets card can show switch-ish behaviour in the sense, that it can report all MACs that are reachable via this interface. Just like a switch device, it can notify the software bridge about changes to its fdb. This patch exploits this device-to-bridge-notification and extracts the relevant information from the hardware events to generate notifications to an attached software bridge. There are 2 sources for this information: 1) The reply message of Perform-Network-Subchannel-Operations (PNSO) (operation code ADDR_INFO) reports all addresses that are currently reachable (implemented in a later patch). 2) As long as device-to-bridge-notification is enabled, hardware will generate address change notification events, whenever the content of the hardware fdb changes (this patch). The bridge_hostnotify feature (PNSO operation code BRIDGE_INFO) uses the same address change notification events. We need to distinguish between qeth_pnso_mode QETH_PNSO_BRIDGEPORT and QETH_PNSO_ADDR_INFO and call a different handler. In both cases deadlocks must be prevented, if the workqueue is drained under lock and QETH_PNSO_NONE, when notification is disabled. bridge_hostnotify generates udev events, there is no intend to do the same for dev2br. Instead this patch will generate SWITCHDEV_FDB_ADD_TO_BRIDGE and SWITCHDEV_FDB_DEL_TO_BRIDGE notifications, that will cause the software bridge to add (or delete) entries to its fdb as 'extern_learn offload'. Documentation/networking/switchdev.txt proposes to add "depends NET_SWITCHDEV" to driver's Kconfig. This is not done here, so even in absence of the NET_SWITCHDEV module, the QETH_L2 module will still be built, but then the switchdev notifiers will have no effect. No VLAN filtering is done on the entries and VLAN information is not passed on to the bridge fdb entries. This could be added later. For now VLAN interfaces can be defined on the upper bridge interface. Multicast entries are not passed on to the bridge fdb. This could be added later. For now mcast flooding can be used in the bridge. The card reports all MACs that are in its FDB, but we must not pass on MACs that are registered for this interface. Signed-off-by: Alexandra Winter Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit fa115adff2c16b02b2baaf9ed1869c0115cd3ca4 Author: Alexandra Winter Date: Thu Sep 10 19:23:46 2020 +0200 s390/qeth: Detect PNSO OC3 capability This patch detects whether device-to-bridge-notification, provided by the Perform Network Subchannel Operation (PNSO) operation code ADDR_INFO (OC3), is supported by this card. A following patch will map this to the learning_sync bridgeport flag, so we store it in priv->brport_hw_features in bridgeport flag format. Only IQD cards provide PNSO. There is a feature bit to indicate whether the machine provides OC3, unfortunately it is not set on old machines. So PNSO is called to find out. As this will disable notification and is exclusive with bridgeport_notification, this must be done during card initialisation before previous settings are restored. PNSO functionality requires some configuration values that are added to the qeth_card.info structure. Some helper functions are defined to fill them out when the card is brought online and some other places are adapted, that can also benefit from these fields. Signed-off-by: Alexandra Winter Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit b983aa1f7d19a83906fb7d38d337a87fe8d7745a Author: Alexandra Winter Date: Thu Sep 10 19:23:45 2020 +0200 s390/cio: Helper functions to read CSSID, IID, and CHID Add helper functions to expose Channel Subsystem ID (CSSID), MIF Image Id (IID), Channel ID (CHID) and Channel Path ID (CHPID). These values are required by the qeth driver's exploitation of network- address-change-notifications to determine which entries belong to this interface. Store the Partition identifier in System log, as this may be used to map a Linux view to a Hardware view for debugging purpose. Signed-off-by: Alexandra Winter Reviewed-by: Vineeth Vijayan Signed-off-by: Julian Wiedmann Acked-by: Heiko Carstens Signed-off-by: David S. Miller commit 4fea49a79ece30f27ce3bb8fa9dd2a19e354e750 Author: Alexandra Winter Date: Thu Sep 10 19:23:44 2020 +0200 s390/cio: Add new Operation Code OC3 to PNSO Add support for operation code 3 (OC3) of the Perform-Network-Subchannel-Operations (PNSO) function of the Channel-Subsystem-Call (CHSC) instruction. PNSO provides 2 operation codes: OC0 - BRIDGE_INFO OC3 - ADDR_INFO (new) Extend the function calls to *pnso* to pass the OC and add new response code 0108. Support for OC3 is indicated by a flag in the css_general_characteristics. Signed-off-by: Alexandra Winter Reviewed-by: Julian Wiedmann Reviewed-by: Peter Oberparleiter Reviewed-by: Vineeth Vijayan Signed-off-by: Julian Wiedmann Acked-by: Heiko Carstens Signed-off-by: David S. Miller commit 247f994459383a15486b6a78b669b6fc088c7543 Author: Adrian Hunter Date: Thu Aug 27 10:20:30 2020 +0300 scsi: ufs-pci: Add LTR support for Intel controllers Intel host controllers support the setting of latency tolerance. Accordingly, implement the PM QoS ->set_latency_tolerance() callback. The raw register values are also exposed via debugfs. Link: https://lore.kernel.org/r/20200827072030.24655-1-adrian.hunter@intel.com Fixes: 8c09d7527697 ("scsi: ufshdc-pci: Add Intel PCI IDs for EHL") Fixes: 1ab27c9cf8b6 ("ufs: Add support for clock gating") Reviewed-by: Avri Altman Acked-by: Stanley Chu Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit b7cf0806e8783e38f881cae3c56f0869e70b8da2 Author: Ofer Levi Date: Sun May 17 10:16:49 2020 +0300 net/mlx5e: Add CQE compression support for multi-strides packets Add CQE compression support for completions of packets that span multiple strides in a Striding RQ, per the HW capability. In our memory model, we use small strides (256B as of today) for the non-linear SKB mode. This feature allows CQE compression to work also for multiple strides packets. In this case decompressing the mini CQE array will use stride index provided by HW as part of the mini CQE. Before this feature, compression was possible only for single-strided packets, i.e. for packets of size up to 256 bytes when in non-linear mode, and the index was maintained by SW. This feature is supported for ConnectX-5 and above. Feature performance test: This was whitebox-tested, we reduced the PCI speed from 125Gb/s to 62.5Gb/s to overload pci and manipulated mlx5 driver to drop incoming packets before building the SKB to achieve low cpu utilization. Outcome is low cpu utilization and bottleneck on pci only. Test setup: Server: Intel(R) Xeon(R) Silver 4108 CPU @ 1.80GHz server, 32 cores NIC: ConnectX-6 DX. Sender side generates 300 byte packets at full pci bandwidth. Receiver side configuration: Single channel, one cpu processing with one ring allocated. Cpu utilization is ~20% while pci bandwidth is fully utilized. For the generated traffic and interface MTU of 4500B (to activate the non-linear SKB mode), packet rate improvement is about 19% from ~17.6Mpps to ~21Mpps. Without this feature, counters show no CQE compression blocks for this setup, while with the feature, counters show ~20.7Mpps compressed CQEs in ~500K compression blocks. Signed-off-by: Ofer Levi Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 748cde9a3802e1ababedabbf759b3eedbaeaba52 Author: Maor Dickman Date: Thu Sep 3 11:02:10 2020 +0300 net/mlx5e: Add IPv6 traffic class (DSCP) header rewrite support Add support for rewriting of IPV6 DSCP part of traffic class field. Next commands, for example, can be used to offload rewrite action: OVS: $ ovs-ofctl add-flow ovs-sriov "tcpv6, in_port=REP, \ actions=mod_nw_tos:68, output:NIC" iproute2: $ tc filter add dev REP ingress protocol ipv6 prio 1 flower skip_sw \ ip_proto tcp \ action pedit ex munge ip6 traffic_class set 68 retain 0xfc pipe \ action mirred egress redirect dev NIC Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit f02882102b1d82e1863c1afb92ca6adf3cfd2ccc Author: Eli Cohen Date: Sun Aug 23 15:54:43 2020 +0300 net/mlx5e: Add support for tc trap Support tc trap such that packets can explicitly be forwarded to slow path if they match a specific rule. In the example below, we want packets with src IP equals 7.7.7.8 to be forwarded to software, in which case it will get to the appropriate representor net device. $ tc filter add dev eth1 protocol ip prio 1 root flower skip_sw \ src_ip 7.7.7.8 action trap Signed-off-by: Eli Cohen Reviewed-by: Roi Dayan Reviewed-by: Ariel Levkovich Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit cd1ef966214c9f83af24e65593eb34186b31bea3 Author: Vu Pham Date: Mon May 18 15:02:45 2020 -0700 net/mlx5: E-Switch, Use vport metadata matching by default Multiple features use metadata matching such as bond vport in live migration, multi-port RoCE mode, stacked devices; hence, enable vport metadata matching by default. Fixes: 1e62e222db2e ("net/mlx5: E-Switch, Use vport metadata matching only when mandatory") Signed-off-by: Vu Pham Reviewed-by: Bodong Wang Reviewed-by: Roi Dayan Reviewed-by: Parav Pandit Reviewed-by: Mark Bloch Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit fc99c3d6371c14343b1822cc8846ed3a54dbafe3 Author: Vu Pham Date: Fri May 22 11:48:38 2020 -0700 net/mlx5: E-Switch, Setup all vports' metadata to support peer miss rule In merged eswitch configuration, peer miss rule is setup for all vports. If metadata is enabled, peer miss rule with metadata matching will be configured instead of source port matching; however, some vports that have not yet been enabled don't have default_metadata setup and their default_metadata will be zero. Hence, setup/cleanup default metadata for all vports when eswitch moves in/out of offloads mode. Fixes: 133dcfc577ea ("net/mlx5: E-Switch, Alloc and free unique metadata for match") Signed-off-by: Vu Pham Reviewed-by: Bodong Wang Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 406493a52f48a20b36b34701d541081cae00b900 Author: Vu Pham Date: Tue Jun 23 11:53:34 2020 -0700 net/mlx5: E-Switch, Dedicated metadata for uplink vport Uplink vport must have a dedicated metadata with vhca_id being part of the metadata. Fixes: 133dcfc577ea ("net/mlx5: E-Switch, Alloc and free unique metadata for match") Signed-off-by: Vu Pham Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 4e9a9ef7d8a977596e8de8d917bac973d34a9171 Author: Vu Pham Date: Tue Jun 23 12:32:31 2020 -0700 net/mlx5: E-Switch, Check and enable metadata support flag before using Check E-Switch capabilities and enable metadata support flag before using it to setup other features that need metadata. Signed-off-by: Vu Pham Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 9b412cc35f0025536a1f1e951a7f4cead0ed15dc Author: Jianbo Liu Date: Fri Apr 17 08:53:16 2020 +0000 net/mlx5e: Add LAG warning if bond slave is not lag master LAG offload can't be enabled if the enslaved PF is not lag master, which is indicated by HCA capabilities bit. It is cleared if more than 64 VFs are configured for this PF. Previously, a data structure is created to store lag info, including PFs to be enslaved, then a handler is registered for netdev notifier. However, this initialization is skipped if PF is not lag master. So PF can't handle CHANGEUPPER event from upper bond device. Even worse, PF is enslaved silently, and LAG offload is not activated. Fix this by registering netdev notifier for PFs which are not lag masters. When CHANGEUPPER event is received, and both physical ports (and only them) on the same NIC are about to be enslaved, a warning is returned for user to know it. Signed-off-by: Jianbo Liu Reviewed-by: Raed Salem Reviewed-by: Roi Dayan Reviewed-by: Jiri Pirko Reviewed-by: Raed Salem Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 1a3c91148339dd334e8e15ca9397c92d32c5cb0f Author: Jianbo Liu Date: Fri Apr 17 02:55:46 2020 +0000 net/mlx5e: Add LAG warning for unsupported tx type If bond tx type is not active-backup or hash, LAG offload can't be enabled. When CHANGEUPPER event is received, and both PFs (and only them) under the same lag master are about to be enslaved, a warning is returned for user to know the offload failure, otherwise PFs are enslaved silently without LAG offload activated. Signed-off-by: Jianbo Liu Reviewed-by: Raed Salem Reviewed-by: Roi Dayan Reviewed-by: Jiri Pirko Reviewed-by: Raed Salem Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit f552be54e0d601c7d797ad03f91c539c69f88a32 Author: Jianbo Liu Date: Thu Apr 30 01:59:20 2020 +0000 net/mlx5e: Return a valid errno if can't get lag device index Change the return value to -ENOENT, to make it more meaningful. Signed-off-by: Jianbo Liu Reviewed-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit 0d2ffdc8d4002a62de31ff7aa3bef28c843c3cbe Author: Eran Ben Elisha Date: Tue Jun 16 12:07:10 2020 +0300 net/mlx5: Don't call timecounter cyc2time directly from 1PPS flow Before calling timecounter_cyc2time(), clock->lock must be taken. Use mlx5_timecounter_cyc2time instead which guarantees a safe access. Fixes: afc98a0b46d8 ("net/mlx5: Update ptp_clock_event foreach PPS event") Signed-off-by: Eran Ben Elisha commit 87f3495cbe8d1d34ce430b11b1ea34e69e6f4126 Author: Eran Ben Elisha Date: Tue May 19 12:00:57 2020 +0300 net/mlx5: Release clock lock before scheduling a PPS work Holding the clock lock is not required when scheduling a PPS work. Signed-off-by: Eran Ben Elisha Reviewed-by: Moshe Shemesh commit aac2df7f022eccb5d117f07b1e231410db1a863a Author: Eran Ben Elisha Date: Tue Jun 9 10:58:31 2020 +0300 net/mlx5: Rename ptp clock info Fix a typo in ptp_clock_info naming: mlx5_p2p -> mlx5_ptp. Signed-off-by: Eran Ben Elisha commit fb609b5112bd74b4ba93c86d7af4089ffd9432c2 Author: Eran Ben Elisha Date: Wed May 13 11:06:47 2020 +0300 net/mlx5: Always use container_of to find mdev pointer from clock struct Clock struct is part of struct mlx5_core_dev. Code was inconsistent, on some cases used container_of and on another used clock->mdev. Align code to use container_of amd remove clock->mdev pointer. While here, fix reverse xmas tree coding style. Signed-off-by: Eran Ben Elisha Reviewed-by: Moshe Shemesh commit ec529b44abfe06a948115e48da02bc59d871242c Author: Dan Carpenter Date: Mon Aug 3 17:34:48 2020 +0300 net/mlx5: remove erroneous fallthrough This isn't a fall through because it was after a return statement. The fall through annotation leads to a Smatch warning: drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:246 mlx5e_ethtool_get_sset_count() warn: ignoring unreachable code. Signed-off-by: Dan Carpenter Reviewed-by: Gustavo A. R. Silva commit 19f5b63bc9932d51292d72c9dc3ec95e5dfa2289 Author: Moshe Tal Date: Thu Jul 16 14:59:30 2020 +0300 net/mlx5: Fix uninitialized variable warning Add variable initialization to eliminate the warning "variable may be used uninitialized". Fixes: 5f29458b77d5 ("net/mlx5e: Support dump callback in TX reporter") Signed-off-by: Moshe Tal Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed commit 8861d0af642c646c8e148ce34c294bdef6f32f6a Author: Lakshmi Ramasubramanian Date: Mon Sep 14 10:31:57 2020 -0700 selinux: Add helper functions to get and set checkreqprot checkreqprot data member in selinux_state struct is accessed directly by SELinux functions to get and set. This could cause unexpected read or write access to this data member due to compiler optimizations and/or compiler's reordering of access to this field. Add helper functions to get and set checkreqprot data member in selinux_state struct. These helper functions use READ_ONCE and WRITE_ONCE macros to ensure atomic read or write of memory for this data member. Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Stephen Smalley Suggested-by: Paul Moore Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 3fa98ed530a4bd80e4936635831fa77666eea82e Author: Lad Prabhakar Date: Fri Aug 7 18:49:51 2020 +0100 drm: rcar-du: lvds: Add r8a7742 support The LVDS encoders on RZ/G1H SoC is identical to the R-Car Gen2 family. Add support for RZ/G1H (R8A7742) SoC to the LVDS encoder driver. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 109bf47277a0b94670743b0648d76e61b982696b Author: Lad Prabhakar Date: Fri Aug 7 18:49:50 2020 +0100 dt-bindings: display: renesas,lvds: Document r8a7742 bindings Document the RZ/G1H (R8A7742) LVDS bindings. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Laurent Pinchart [Port to the YAML binding document] Acked-by: Rob Herring Signed-off-by: Laurent Pinchart commit 9edf73fece3d27e6fb5a764b732eca94c941838e Author: Lad Prabhakar Date: Fri Aug 7 18:49:49 2020 +0100 drm: rcar-du: Add r8a7742 support Add direct support for the r8a7742 (RZ/G1H). The RZ/G1H shares a common, compatible configuration with the r8a7790 (R-Car H2) so that device info structure is reused, the only difference being TCON is unsupported on RZ/G1H (Currently unsupported by the driver). Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit c3415d91832cf47bf54973ef5415caeaba5249c6 Author: Lad Prabhakar Date: Fri Aug 7 18:49:48 2020 +0100 dt-bindings: display: renesas,du: Document the r8a7742 bindings Document the RZ/G1H (R8A7742) SoC in the R-Car DU bindings. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Laurent Pinchart Acked-by: Rob Herring Signed-off-by: Laurent Pinchart commit 484a8737c755071ae456adf3561f6749dd250881 Author: Qian Cai Date: Sun Jun 7 22:53:40 2020 -0400 drm: rcar-du: Make DRM_RCAR_WRITEBACK depends on DRM_RCAR_DU There is no need to select DRM_RCAR_WRITEBACK if DRM_RCAR_DU=n which just make the generated .config a bit ugly. # ARM devices # # end of ARM devices CONFIG_DRM_RCAR_WRITEBACK=y # # Frame buffer Devices Let DRM_RCAR_WRITEBACK depend on DRM_RCAR_DU instead. Signed-off-by: Qian Cai Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart commit 937f941ca06f2f3ab64baebf31be2c16d57ae7b8 Author: Stephen Boyd Date: Wed Sep 9 17:49:02 2020 -0700 drm/msm/dp: Use qmp phy for DP PLL and PHY Make the necessary changes to the DP driver to use the qmp phy from the common phy framework instead of rolling our own in the drm subsystem. This also removes the PLL code and adds proper includes so things build. Cc: Jeykumar Sankaran Cc: Chandan Uddaraju Cc: Vara Reddy Cc: Tanmay Shah Cc: Bjorn Andersson Cc: Manu Gautam Cc: Sandeep Maheswaram Cc: Douglas Anderson Cc: Sean Paul Cc: Jonathan Marek Cc: Dmitry Baryshkov Cc: Rob Clark Signed-off-by: Stephen Boyd Signed-off-by: Rob Clark commit ab205927592be25ddef5db10344925b389fd4344 Author: Abhinav Kumar Date: Sat Sep 12 14:08:15 2020 -0700 drm/msm/dp: remove mode hard-coding in case of DP CTS No need to fix the number of resolutions to one during the video pattern CTS test. The userspace test client will handle both the hotplug as well as picking the right resolution for the test. Changes in v2: rebase on top of latest patchset of dependency Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit de3ee25473ba49f2e785e43b5db5e05cb35aad24 Author: Abhinav Kumar Date: Sat Sep 12 14:08:14 2020 -0700 drm/msm/dp: add debugfs nodes for video pattern tests Add the debugfs nodes needed for the video pattern compliance tests to MSM DP driver. Changes in v2: rebase on top of latest patchset of dependency Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit f913454aae8edaa84264d717e20f175bf616755f Author: Abhinav Kumar Date: Sat Sep 12 14:08:13 2020 -0700 drm/msm/dp: move debugfs node to /sys/kernel/debug/dri/*/ Move the MSM DP debugfs node from /sys/kernel/debug/drm_dp to /sys/kernel/debug/dri/*/ as required for video pattern compliance test suite. Changes in v2: rebase on top of latest patchset of dependency Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit d11a93690df7e9a7e07c0784ecad019a627b1449 Author: Abhinav Kumar Date: Sat Sep 12 14:08:12 2020 -0700 drm/msm/dp: add debugfs support to DP driver To prepare the MSM DP driver for running video pattern compliance tests introduce debugfs module for it. Changes in v2: rebase on top of latest patchset of dependency Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit 158b9aa74479c9979b7b4806cefdbf0c9a72ba49 Author: Abhinav Kumar Date: Sat Sep 12 13:49:32 2020 -0700 drm/msm/dp: wait for audio notification before disabling clocks In the current implementation, there is a very small window for the audio side to safely signal the hdmi_code_shutdown() before the clocks are disabled. Add some synchronization between the DP display and DP audio module to safely disable the clocks to avoid unclocked access from audio side. In addition, audio side can open the sound card even if DP monitor is not connected. Avoid programming hardware registers in this case and bail out early. Changes in v4: - removed some leftover prints Changes in v5: - fix crash when user tries to play audio in suspended state Changes in v6: - rebased on top of latest patchset of dependency Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit bf4a1b3127d34b0b6ee0565b31ff699b3dc9c48e Author: Abhinav Kumar Date: Sat Sep 12 13:49:31 2020 -0700 drm/msm/dp: signal the hotplug disconnect in the event handler Signal the hotplug disconnect event to the audio side in the event handler so that they are notified earlier and have more time to process the disconnect event. Changes in v2: none Changes in v3: none Changes in v4: rebase on top of latest patchset of dependency Changes in v5: rebase on top of latest patchset of dependency Changes in v6: none Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit a1f5bda99b7bee46b01f6a9f256671c8efef0ec9 Author: Abhinav Kumar Date: Sat Sep 12 13:49:30 2020 -0700 drm/msm/dp: add hook_plugged_cb hdmi-codec op for MSM DP driver Add the hook_plugged_cb op for the MSM DP driver to signal connect and disconnect events to the hdmi-codec driver which in-turn shall notify the audio subsystem to start a new or teardown an existing session. Changes in v2: none Changes in v3: none Changes in v4: rebase on top of latest patchset of dependency Changes in v5: rebase on top of latest patchset of dependency Changes in v6: none Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit d13e36d7d2227e6fe91bc063d473f97d43f9442f Author: Abhinav Kumar Date: Sat Sep 12 13:49:29 2020 -0700 drm/msm/dp: add audio support for Display Port on MSM Introduce audio support for Display Port on MSM chipsets. This change integrates DP audio sub-module with the main Display Port platform driver. In addition, this change leverages hdmi_codec_ops to expose the operations to the audio driver. Changes in v2: fix up a compilation issue on drm-next branch Changes in v3: none Changes in v4: none Changes in v5: none Changes in v6: rebase on top of latest patchset of dependency Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit 061eb621fc2780aa252b7dad332ac241feb1e7c7 Author: Abhinav Kumar Date: Sat Sep 12 13:49:28 2020 -0700 drm/msm/dp: store dp_display in the driver data Store the dp_display in the platform driver data instead of the dp_display_private. This is required to allow other sub-modules to reuse the platform driver data. Changes in v3: none Changes in v4: none Changes in v5: none Changes in v6: rebase on top of latest patchset of dependency Signed-off-by: Abhinav Kumar Signed-off-by: Rob Clark commit 8ede2ecc3e5ee327923f6e3cfe52761ce73607d1 Author: Kuogee Hsieh Date: Fri Sep 11 20:36:42 2020 +0000 drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets add event thread to execute events serially from event queue. Also timeout mode is supported which allow an event be deferred to be executed at later time. Both link and phy compliant tests had been done successfully. Changes in v2: -- Fix potential deadlock by removing redundant connect_mutex -- Check and enable link clock during modeset -- Drop unused code and fix function prototypes. -- set sink power to normal operation state (D0) before DPCD read Changes in v3: -- push idle pattern at main link before timing generator off -- add timeout handles for both connect and disconnect Changes in v4: -- add ST_SUSPEND_PENDING to handles suspend/modeset test operations -- clear dp phy aux interrupt status when ERR_DPPHY_AUX error -- send segment addr during edid read -- clear bpp depth before MISC register write Changes in v5: -- add ST_SUSPENDED to fix crash at resume Changes in v6: -- at msm_dp_display_enable() do not return until resume_done to avoid kms commit timeout Signed-off-by: Kuogee Hsieh Signed-off-by: Rob Clark commit 220b856a3d3742a22831cb6cd94e48133a58d30e Author: Tanmay Shah Date: Thu Aug 27 14:16:58 2020 -0700 drm/msm/dp: Add Display Port HPD feature Configure HPD registers in DP controller and enable HPD interrupt. Add interrupt to handle HPD connect and disconnect events. Changes in v8: None Signed-off-by: Tanmay Shah Signed-off-by: Rob Clark commit a10476e45026fefe782c444a39c6fc5d4999a6ac Author: Jeykumar Sankaran Date: Thu Aug 27 14:16:57 2020 -0700 drm/msm/dpu: add display port support in DPU Add display port support in DPU by creating hooks for DP encoder enumeration and encoder mode initialization. changes in v2: - rebase on [2] (Sean Paul) - remove unwanted error checks and switch cases (Jordan Crouse) [1] https://lwn.net/Articles/768265/ [2] https://lkml.org/lkml/2018/11/17/87 changes in V3: -- Moved this change as part of the DP driver changes. -- Addressed compilation issues on the latest code base. Changes in v6: -- Fix checkpatch.pl warning Changes in v7: Remove depends-on tag from commit message. Changes in v8: None Changes in v9: None Signed-off-by: Jeykumar Sankaran Signed-off-by: Chandan Uddaraju Signed-off-by: Vara Reddy Signed-off-by: Tanmay Shah Signed-off-by: Rob Clark commit 14975cff5b1d076d067ccebf1046be7d2e4fcfbc Author: Chandan Uddaraju Date: Thu Aug 27 14:16:56 2020 -0700 drm/msm/dp: add support for DP PLL driver Add the needed DP PLL specific files to support display port interface on msm targets. The DP driver calls the DP PLL driver registration. The DP driver sets the link and pixel clock sources. Changes in v2: -- Update copyright markings on all relevant files. -- Use DRM_DEBUG_DP for debug msgs. Changes in v4: -- Update the DP link clock provider names Changes in V5: -- Addressed comments from Stephen Boyd, Rob clark. Changes in V6: -- Remove PLL as separate driver and include PLL as DP module -- Remove redundant clock parsing from PLL module and make DP as clock provider -- Map USB3 DPCOM and PHY IO using hardcoded register address and move mapping form parser to PLL module -- Access DP PHY modules from same base address using offsets instead of deriving base address of individual module from device tree. -- Remove dp_pll_10nm_util.c and include its functionality in dp_pll_10nm.c -- Introduce new data structures private to PLL module Changes in v7: -- Remove DRM_MSM_DP_PLL config from Makefile and Kconfig -- Remove set_parent from determin_rate API -- Remove phy_pll_vco_div_clk from parent list -- Remove flag CLK_DIVIDER_ONE_BASED -- Remove redundant cell-index property parsing Changes in v8: -- Unregister hardware clocks during driver cleanup Changes in v9: -- Remove redundant Kconfig option DRM_MSM_DP_10NM_PLL Changes in v10: -- Limit 10nm PLL function scope Signed-off-by: Chandan Uddaraju Signed-off-by: Vara Reddy Signed-off-by: Tanmay Shah Signed-off-by: Rob Clark commit c943b4948b5848fc0e07f875edbd35a973879e22 Author: Chandan Uddaraju Date: Thu Aug 27 14:16:55 2020 -0700 drm/msm/dp: add displayPort driver support Add the needed displayPort files to enable DP driver on msm target. "dp_display" module is the main module that calls into other sub-modules. "dp_drm" file represents the interface between DRM framework and DP driver. Changes in v12: -- Add support of pm ops in display port driver -- Clear bpp depth bits before writing to MISC register -- Fix edid read Previous Change log: https://lkml.kernel.org/lkml/20200818051137.21478-3-tanmay@codeaurora.org/ Signed-off-by: Chandan Uddaraju Signed-off-by: Vara Reddy Signed-off-by: Tanmay Shah Co-developed-by: Abhinav Kumar Signed-off-by: Abhinav Kumar Co-developed-by: Kuogee Hsieh Signed-off-by: Kuogee Hsieh Co-developed-by: Guenter Roeck Signed-off-by: Guenter Roeck Co-developed-by: Stephen Boyd Signed-off-by: Stephen Boyd Signed-off-by: Rob Clark commit b22960b8f274382ff165db50faebbde5f8a16c32 Author: Chandan Uddaraju Date: Thu Aug 27 14:16:54 2020 -0700 drm: add constant N value in helper file The constant N value (0x8000) is used by i915 DP driver. Define this value in dp helper header file to use in multiple Display Port drivers. Change i915 driver accordingly. Change in v6: Change commit message Signed-off-by: Chandan Uddaraju Signed-off-by: Vara Reddy Signed-off-by: Tanmay Shah Reviewed-by: Stephen Boyd Acked-by: Jani Nikula Signed-off-by: Rob Clark commit 2fb7487aaf71071e02986ccd9c981ba1a790880e Author: Jordan Crouse Date: Mon Sep 14 16:40:23 2020 -0600 drm/msm: Get rid of the REG_ADRENO offsets As newer GPU families are added it makes less sense to maintain a "generic" version functions for older families. Move adreno_submit() and get_rptr() into the target specific code for a2xx, a3xx and a4xx. Add a parameter to adreno_flush to pass the target specific WPTR register instead of relying on the generic register. All of this gets rid of the last of the REG_ADRENO offsets so remove all all the register definitions and infrastructure. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit d3a569fccfa087ac685b17fc378547846891e7b4 Author: Jordan Crouse Date: Mon Sep 14 16:40:22 2020 -0600 drm/msm: a6xx: Use WHERE_AM_I for eligible targets Support the WHERE_AM_I opcode for the A618, A630 and A640 GPUs if the microcode supports it. The WHERE_AM_I opcode allows the RPTR shadow to be updated in priviliged memory which protects the shadow from being read or written from user submissions. A650 already supports extended APRIV have built in hardware support for to access privilged memory from the CP and can go back to using the hardware RPTR shadow feature. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 8907afb476ac6754a4d1ba8d2dd16dbb0fd4d428 Author: Jordan Crouse Date: Mon Sep 14 16:40:21 2020 -0600 drm/msm: Allow a5xx to mark the RPTR shadow as privileged Newer microcode versions have support for the CP_WHERE_AM_I opcode which allows the RPTR shadow memory to be marked as privileged to protect it from corruption. Move the RPTR shadow into its own buffer and protect it it if the current microcode version supports the new feature. We can also re-enable preemption for those targets that support CP_WHERE_AM_I. Start out by preemptively assuming that we can enable preemption and disable it in a5xx_hw_init if the microcode version comes back as too old. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 455b6c9112eff8d249e32ba165742085678a80a4 Author: Roberto Sassu Date: Fri Sep 4 11:23:30 2020 +0200 evm: Check size of security.evm before using it This patch checks the size for the EVM_IMA_XATTR_DIGSIG and EVM_XATTR_PORTABLE_DIGSIG types to ensure that the algorithm is read from the buffer returned by vfs_getxattr_alloc(). Cc: stable@vger.kernel.org # 4.19.x Fixes: 5feeb61183dde ("evm: Allow non-SHA1 digital signatures") Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 4be92db3b5667f3a5c874a04635b037dc5e3f373 Author: Roberto Sassu Date: Fri Sep 4 11:23:29 2020 +0200 ima: Remove semicolon at the end of ima_get_binary_runtime_size() This patch removes the unnecessary semicolon at the end of ima_get_binary_runtime_size(). Cc: stable@vger.kernel.org Fixes: d158847ae89a2 ("ima: maintain memory size needed for serializing the measurement list") Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 60386b854008adc951c470067f90a2d85b5d520f Author: Roberto Sassu Date: Fri Sep 4 11:23:28 2020 +0200 ima: Don't ignore errors from crypto_shash_update() Errors returned by crypto_shash_update() are not checked in ima_calc_boot_aggregate_tfm() and thus can be overwritten at the next iteration of the loop. This patch adds a check after calling crypto_shash_update() and returns immediately if the result is not zero. Cc: stable@vger.kernel.org Fixes: 3323eec921efd ("integrity: IMA as an integrity service provider") Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar commit e410c43b66d52dde6a4b8554dc85a9dc06e57937 Author: Andy Shevchenko Date: Fri Aug 14 16:27:26 2020 +0300 ACPI / PMIC: Move TPS68470 OpRegion driver to drivers/acpi/pmic/ It is revealed now that TPS68470 OpRegion driver has been added in slightly different scope. Let's move it to the drivers/acpi/pmic/ folder for sake of the unification. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit fa870509d9ecd408714d8888568ccc9f2c52af2a Author: Andy Shevchenko Date: Fri Aug 14 16:27:25 2020 +0300 ACPI / PMIC: Split out Kconfig and Makefile specific for ACPI PMIC It's a bit better to maintain and allows to avoid mistakes in the future with PMIC OpRegion drivers, if we split out Kconfig and Makefile for ACPI PMIC to its own folder. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit a071261d93184f43b7dede7516b6c449c4ed5770 Author: Andrew Scull Date: Tue Sep 15 11:46:43 2020 +0100 KVM: arm64: nVHE: Fix pointers during SMCCC convertion The host need not concern itself with the pointer differences for the hyp interfaces that are shared between VHE and nVHE so leave it to the hyp to handle. As the SMCCC function IDs are converted into function calls, it is a suitable place to also convert any pointer arguments into hyp pointers. This, additionally, eases the reuse of the handlers in different contexts. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-20-ascull@google.com commit 04e4caa8d355d19fd7d26734bd2b9e3b563bb22a Author: Andrew Scull Date: Tue Sep 15 11:46:42 2020 +0100 KVM: arm64: nVHE: Migrate hyp-init to SMCCC To complete the transition to SMCCC, the hyp initialization is given a function ID. This looks neater than comparing the hyp stub function IDs to the page table physical address. Some care is taken to only clobber x0-3 before the host context is saved as only those registers can be clobbered accoring to SMCCC. Fortunately, only a few acrobatics are needed. The possible new tpidr_el2 is moved to the argument in x2 so that it can be stashed in tpidr_el2 early to free up a scratch register. The page table configuration then makes use of x0-2. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-19-ascull@google.com commit 054698316d87a13e4c0dc8f5ecdd77b12e5eb676 Author: Andrew Scull Date: Tue Sep 15 11:46:41 2020 +0100 KVM: arm64: nVHE: Migrate hyp interface to SMCCC Rather than passing arbitrary function pointers to run at hyp, define and equivalent set of SMCCC functions. Since the SMCCC functions are strongly tied to the original function prototypes, it is not expected for the host to ever call an invalid ID but a warning is raised if this does ever occur. As __kvm_vcpu_run is used for every switch between the host and a guest, it is explicitly singled out to be identified before the other function IDs to improve the performance of the hot path. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-18-ascull@google.com commit 0794a974d74dc777a212a3c58dd236f507360348 Author: Andrew Scull Date: Tue Sep 15 11:46:40 2020 +0100 smccc: Use separate variables for args and results Using the same register-bound variable for both arguments and results means these values share a type. That type must allow the arguments to be assigned to it and must also be assignable to the unsigned long fields of struct arm_smccc_res. This restriction on types causes compiler warnings when the argument cannot be implicitly assigned to an unsigned long, for example the pointers that are used in the KVM hyp interface. By separating the arguments and results into their own variables, the type constraint is lifted allowing the arguments to avoid the need for any type conversion. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Cc: Sudeep Holla Link: https://lore.kernel.org/r/20200915104643.2543892-17-ascull@google.com commit cf6501689012ef346cc835a38cbebb1e398d0834 Author: Andrew Scull Date: Tue Sep 15 11:46:39 2020 +0100 smccc: Define vendor hyp owned service call region Vendor specific hypervisor services have their own region of function identifiers reserved by SMCCC. Extend the list of owners to include this case. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Cc: Sudeep Holla Link: https://lore.kernel.org/r/20200915104643.2543892-16-ascull@google.com commit 5dc33bd199ca3b9f53c28144fa9a20b43c908972 Author: Andrew Scull Date: Tue Sep 15 11:46:38 2020 +0100 KVM: arm64: nVHE: Pass pointers consistently to hyp-init Rather than some being kernel pointer and others being hyp pointers, standardize on all pointers being hyp pointers. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-15-ascull@google.com commit a2e102e20fd69ce26ea9fe7bd0df26d25dafff59 Author: Andrew Scull Date: Tue Sep 15 11:46:37 2020 +0100 KVM: arm64: nVHE: Handle hyp panics Restore the host context when panicking from hyp to give the best chance of the panic being clean. The host requires that registers be preserved such as x18 for the shadow callstack. If the panic is caused by an exception from EL1, the host context is still valid so the panic can return straight back to the host. If the panic comes from EL2 then it's most likely that the hyp context is active and the host context needs to be restored. There are windows before and after the host context is saved and restored that restoration is attempted incorrectly and the panic won't be clean. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-14-ascull@google.com commit 4e3393a969a0bdaae83263918b6824b2d08c3996 Author: Andrew Scull Date: Tue Sep 15 11:46:36 2020 +0100 KVM: arm64: nVHE: Switch to hyp context for EL2 Save and restore the host context when switching to and from hyp. This gives hyp its own context that the host will not see as a step towards a full trust boundary between the two. SP_EL0 and pointer authentication keys are currently shared between the host and hyp so don't need to be switched yet. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-13-ascull@google.com commit 603d2bdaa57e48a33d57eeb88971b88fbe5875d6 Author: Andrew Scull Date: Tue Sep 15 11:46:35 2020 +0100 KVM: arm64: Share context save and restore macros To avoid duplicating the context save and restore macros, move them into a shareable header. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-12-ascull@google.com commit 7db21530479f071ee0e0a4d5fcf5e6bc6c0352ba Author: Andrew Scull Date: Tue Sep 15 11:46:34 2020 +0100 KVM: arm64: Restore hyp when panicking in guest context If the guest context is loaded when a panic is triggered, restore the hyp context so e.g. the shadow call stack works when hyp_panic() is called and SP_EL0 is valid when the host's panic() is called. Use the hyp context's __hyp_running_vcpu field to track when hyp transitions to and from the guest vcpu so the exception handlers know whether the context needs to be restored. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-11-ascull@google.com commit 7c2e76d87f9ce7af47a07ca803343fd5f4aa4ab5 Author: Andrew Scull Date: Tue Sep 15 11:46:33 2020 +0100 KVM: arm64: Update context references from host to hyp Hyp now has its own nominal context for saving and restoring its state when switching to and from a guest. Update the related comments and utilities to match the new name. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-10-ascull@google.com commit b619d9aa8b385bdab747df596961d8fdddde4d52 Author: Andrew Scull Date: Tue Sep 15 11:46:32 2020 +0100 KVM: arm64: Introduce hyp context During __guest_enter, save and restore from a new hyp context rather than the host context. This is preparation for separation of the hyp and host context in nVHE. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-9-ascull@google.com commit 472fc011ccd30f05e0b39d71064777d39dd11cac Author: Andrew Scull Date: Tue Sep 15 11:46:31 2020 +0100 KVM: arm64: nVHE: Don't consume host SErrors with ESB The ESB at the start of the host vector may cause SErrors to be consumed to DISR_EL1. However, this is not checked for the host so the SError could go unhandled. Remove the ESB so that SErrors are not consumed but are instead left pending for the host to consume. __guest_enter already defers entry into a guest if there are any SErrors pending. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Cc: James Morse Link: https://lore.kernel.org/r/20200915104643.2543892-8-ascull@google.com commit 6e3bfbb22c51bd1f121ca5c4bce6b51dc6cdceae Author: Andrew Scull Date: Tue Sep 15 11:46:30 2020 +0100 KVM: arm64: nVHE: Use separate vector for the host The host is treated differently from the guests when an exception is taken so introduce a separate vector that is specialized for the host. This also allows the nVHE specific code to move out of hyp-entry.S and into nvhe/host.S. The host is only expected to make HVC calls and anything else is considered invalid and results in a panic. Hyp initialization is now passed the vector that is used for the host and it is swapped for the guest vector during the context switch. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-7-ascull@google.com commit a0e479523e3fb4fa52c351cc4906f38097de789a Author: Andrew Scull Date: Tue Sep 15 11:46:29 2020 +0100 KVM: arm64: Save chosen hyp vector to a percpu variable Introduce a percpu variable to hold the address of the selected hyp vector that will be used with guests. This avoids the selection process each time a guest is being entered and can be used by nVHE when a separate vector is introduced for the host. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-6-ascull@google.com commit ceee2fe4ba1f0b9dd388fd1030bea0162ca66a40 Author: Andrew Scull Date: Tue Sep 15 11:46:28 2020 +0100 KVM: arm64: Choose hyp symbol based on context Make CHOOSE_HYP_SYM select the symbol of the active hypervisor for the host, the nVHE symbol for nVHE and the VHE symbol for VHE. The nVHE and VHE hypervisors see their own symbols without prefixes and trigger a link error when trying to use a symbol of the other hypervisor. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Cc: David Brazdil Link: https://lore.kernel.org/r/20200915104643.2543892-5-ascull@google.com commit d7ca1079d8ea897a8c45c9f78693972e28859056 Author: Andrew Scull Date: Tue Sep 15 11:46:27 2020 +0100 KVM: arm64: Remove kvm_host_data_t typedef The kvm_host_data_t typedef is used inconsistently and goes against the kernel's coding style. Remove it in favour of the full struct specifier. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-4-ascull@google.com commit 6a0259ed29bba83653a36fabcdf6b06aecd78596 Author: Andrew Scull Date: Tue Sep 15 11:46:26 2020 +0100 KVM: arm64: Remove hyp_panic arguments hyp_panic is able to find all the context it needs from within itself so remove the argument. The __hyp_panic wrapper becomes redundant so is also removed. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-3-ascull@google.com commit 501a67a25dd459a7d16b35ecdbe8a1ca5463e2bd Author: Andrew Scull Date: Tue Sep 15 11:46:25 2020 +0100 KVM: arm64: Remove __activate_vm wrapper The __activate_vm wrapper serves no useful function and has a misleading name as it simply calls __load_guest_stage2 and does not touch HCR_EL2.VM so remove it. Also rename __deactivate_vm to __load_host_stage2 to match naming pattern. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200915104643.2543892-2-ascull@google.com commit 5f155515d37351f90dbb1c8a5a5cae13190c8564 Author: Wang Qing Date: Thu Aug 13 10:49:10 2020 +0800 ACPI: NFIT: Use kobj_to_dev() instead Use kobj_to_dev() instead of container_of() Signed-off-by: Wang Qing Acked-by: Vishal Verma [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit 73d3e43f9813edee4d7d9b95bd56ed89f7d807cf Author: Andre Przywara Date: Wed Sep 9 11:50:46 2020 +0100 dt-bindings: watchdog: sp-805: Convert to Json-schema Convert the ARM SP-805 watchdog IP DT binding over to Json-schema. A straight-forward conversion, but the requirement for providing two clocks got strengthened from "should" to "must". Acked-by: Viresh Kumar Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20200909105046.160991-1-andre.przywara@arm.com Signed-off-by: Rob Herring commit 488e5947d975e161ff51407538248d42ef0011d1 Author: Krzysztof Kozlowski Date: Tue Sep 8 16:59:22 2020 +0200 dt-bindings: power: Correct interrupt flags in examples GPIO_ACTIVE_x flags are not correct in the context of interrupt flags. These are simple defines so they could be used in DTS but they will not have the same meaning: 1. GPIO_ACTIVE_HIGH = 0 = IRQ_TYPE_NONE 2. GPIO_ACTIVE_LOW = 1 = IRQ_TYPE_EDGE_RISING Correct the interrupt flags, assuming the author of the code wanted some logical behavior behind the name "ACTIVE_xxx", this is: ACTIVE_LOW => IRQ_TYPE_LEVEL_LOW Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200908145922.4502-1-krzk@kernel.org Signed-off-by: Rob Herring commit ba34f977c333f96c8acd37ec30e232220399f5a5 Author: Sibi Sankar Date: Tue Sep 15 21:12:32 2020 +0530 soc: qcom: apr: Fixup the error displayed on lookup failure APR client incorrectly prints out "ret" variable on pdr_add_lookup failure, it should be printing the error value returned by the lookup instead. Fixes: 8347356626028 ("soc: qcom: apr: Add avs/audio tracking functionality") Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200915154232.27523-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit d24e124577cdb47824c6665af16250807c2daa89 Author: Jeremy Linton Date: Tue Sep 8 16:03:59 2020 -0500 PCI/ACPI: Tone down missing MCFG message MCFG is an optional ACPI table. Given there are machines without PCI (or it is hidden) we have been receiving queries/complaints about what this message means given it's being presented as an error. Reduce the message severity. The ACPI table list printed at boot will continue to provide another way to detect when the table is missing. Link: https://lore.kernel.org/r/20200908210359.569294-1-jeremy.linton@arm.com Signed-off-by: Jeremy Linton Signed-off-by: Bjorn Helgaas Reviewed-by: Hanjun Guo commit a9118250462529ffee0f758b2e55da0658cd1f22 Author: Stephan Gerhold Date: Tue Sep 15 09:12:21 2020 +0200 arm64: dts: qcom: Makefile: Sort lines The Makefile is in a bit of a weird order at the moment. It's almost sorted alphabetically, but not entirely. Also, one element uses a space before the += instead of a tab. Fix this up and sort the lines alphabetically so we have a consistent order in the Makefile. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-15-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 09a587a06724164ff6e11651feb5f98ead24ac4c Author: Stephan Gerhold Date: Tue Sep 15 09:12:20 2020 +0200 arm64: dts: qcom: pm8916: Sort nodes Sort nodes by unit address so we have a consistent order in pm8916.dtsi. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-14-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 327c0f5f25100fbd04181b0196b89fff785bf1c9 Author: Stephan Gerhold Date: Tue Sep 15 09:12:19 2020 +0200 arm64: dts: qcom: msm8916: Sort nodes Just like in commit 50aa72ccb30b ("arm64: dts: qcom: msm8996: Sort all nodes in msm8996.dtsi"), sort all the nodes by unit address, then alphabetically by their name. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-13-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 2e04aa29ac8782143779e16dac33a691d2f7df67 Author: Stephan Gerhold Date: Tue Sep 15 09:12:18 2020 +0200 arm64: dts: qcom: msm8916: Pad addresses Just like in commit 86f6d6225e5e ("arm64: dts: qcom: msm8996: Pad addresses"), pad all addresses to 8 digits to make it easier to see the correct order of the nodes. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-12-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit cdbb391676fa07606994243cc670dd496a9d37db Author: Stephan Gerhold Date: Tue Sep 15 09:12:17 2020 +0200 arm64: dts: qcom: msm8916: Rename "x-smp2p" to "smp2p-x" This allows grouping them together when sorting nodes alphabetically. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-11-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 6300095b0bc7d70d5d2133769355442688c44c6f Author: Stephan Gerhold Date: Tue Sep 15 09:12:16 2020 +0200 arm64: dts: qcom: msm8916: Use more generic node names Now that all MSM8916 boards are referencing nodes by label instead of name, we can easily make some more nodes use more generic names (as recommended in the device tree specification or the binding documentation). Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-10-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 60a05ed059a0993cd5501e9e7e07aacb135a35e4 Author: Stephan Gerhold Date: Tue Sep 15 09:12:15 2020 +0200 arm64: dts: qcom: msm8916: Add MSM8916-specific compatibles to SCM/MSS Over the time, the SCM and MSS driver were refactored to use SoC-specific compatibles. While the generic compatibles still work correctly, add the MSM8916-specific compatibles so they are actually used somewhere. For SCM this will ensure that we actually manage to obtain all three of the specified clocks, since those are required on MSM8916. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-9-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 1b1bd497000ef58c83b9430f8e46758febb5416f Author: Stephan Gerhold Date: Tue Sep 15 09:12:14 2020 +0200 arm64: dts: qcom: msm8916: Minor style fixes Fix usages of spaces for indentation, break a long line and remove duplicate new lines. Add some spaces where appropriate. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-8-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 02f7415054d7054955fd3c43902ad79437b09fbc Merge: 2de7649cff445 244359c99fd90 Author: Martin K. Petersen Date: Tue Sep 15 11:24:32 2020 -0400 Merge branch '5.9/scsi-fixes' into 5.10/scsi-ufs Resolve UFS discrepancies between fixes and queue. Signed-off-by: Martin K. Petersen commit 5342f1df8f50df3cec6e015beefc4eca79eb858d Author: Stephan Gerhold Date: Tue Sep 15 09:12:13 2020 +0200 arm64: dts: qcom: msm8916: Drop qcom,tcsr-mutex syscon The hwlock device node does not (directly) use memory resources of the SoC, so we should move it outside the "soc" node. However, as of commit 7a1e6fb1c606 ("hwspinlock: qcom: Allow mmio usage in addition to syscon") we can now assign the memory region directly to the hwlock device node. This works because the register space used by it is actually separate and not used by any other components. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-7-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit dd5f6c73240756abb0dd457d7c885564167e9f0a Author: Stephan Gerhold Date: Tue Sep 15 09:12:12 2020 +0200 arm64: dts: qcom: msm8916: Use IRQ defines, add IRQ types dt-bindings/interrupt-controller/arm-gic.h has a GIC_SPI define that allows specifying interrupts more clearly, but right now only some device nodes in msm8916.dtsi make use of it. Convert all others to use it. The same applies to the IRQ_TYPE_* defines in dt-bindings/interrupt-controller/irq.h. Some interrupts were defined with raw numbers, or even with IRQ_TYPE_NONE (0). Convert all these to use appropriate IRQ types. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-6-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 027cca9eb5b450c3f6bb916ba999144c2ec23cb7 Author: Stephan Gerhold Date: Tue Sep 15 09:12:11 2020 +0200 arm64: dts: qcom: msm8916: Fix MDP/DSI interrupts The mdss node sets #interrupt-cells = <1>, so its interrupts should be referenced using a single cell (in this case: only the interrupt number). However, right now the mdp/dsi node both have two interrupt cells set, e.g. interrupts = <4 0>. The 0 is probably meant to say IRQ_TYPE_NONE (= 0), but with #interrupt-cells = <1> this is actually interpreted as a second interrupt line. Remove the IRQ flags from both interrupts to fix this. Fixes: 305410ffd1b2 ("arm64: dts: msm8916: Add display support") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-5-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit c2f0cbb57dbac6da3d38b47b5b96de0fe4e23884 Author: Stephan Gerhold Date: Tue Sep 15 09:12:10 2020 +0200 arm64: dts: qcom: pm8916: Remove invalid reg size from wcd_codec Tha parent node of "wcd_codec" specifies #address-cells = <1> and #size-cells = <0>, which means that each resource should be described by one cell for the address and size omitted. However, wcd_codec currently lists 0x200 as second cell (probably the size of the resource). When parsing this would be treated like another memory resource - which is entirely wrong. To quote the device tree specification [1]: "If the parent node specifies a value of 0 for #size-cells, the length field in the value of reg shall be omitted." [1]: https://www.devicetree.org/specifications/ Fixes: 5582fcb3829f ("arm64: dts: apq8016-sbc: add analog audio support with multicodec") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-4-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit e6859ae8603c5946b8f3ecbd9b4f02b72955b9d0 Author: Stephan Gerhold Date: Tue Sep 15 09:12:09 2020 +0200 arm64: dts: qcom: msm8916: Remove one more thermal trip point unit name Commit fe2aff0c574d2 ("arm64: dts: qcom: msm8916: remove unit name for thermal trip points") removed the unit names for most of the thermal trip points defined in msm8916.dtsi, but missed to update the one for cpu0_1-thermal. So why wasn't this spotted by "make dtbs_check"? Apparently, the name of the thermal zone is already invalid: thermal-zones.yaml specifies a regex of ^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$, so it is not allowed to contain underscores. Therefore the thermal zone was never verified using the DTB schema. After replacing the underscore in the thermal zone name, the warning shows up: apq8016-sbc.dt.yaml: thermal-zones: cpu0-1-thermal:trips: 'trip-point@0' does not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$', 'pinctrl-[0-9]+' Fix up the thermal zone names and remove the unit name for the trip point. Cc: Amit Kucheria Fixes: fe2aff0c574d2 ("arm64: dts: qcom: msm8916: remove unit name for thermal trip points") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-3-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit b2106c670e8644335eb528b5f5e298e5be8d28a1 Author: Stephan Gerhold Date: Tue Sep 15 09:12:08 2020 +0200 arm64: dts: qcom: msm8916: Configure DSI port with labels &dsi0 -> ports -> port@1 -> endpoint already has the "dsi0_out" label, so we can use it for configuring instead of replicating the entire node hierarchy. Looks like I missed that when converting the boards. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200915071221.72895-2-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 8119f4b91d54104884ceeed7d97a4eb4cf003c69 Merge: bd2fad8cd302b 66d90f6ecee75 Author: Olof Johansson Date: Tue Sep 15 08:10:40 2020 -0700 Merge tag 'scmi-updates-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers ARM SCMI updates for v5.10 Couple of main additions: SCMI system protocol support and ability to build SCMI driver as a single module which is needed by some transports like virtio as they may not be ready early during the boot. This also includes constification of scmi ops and related function pointers. * tag 'scmi-updates-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Enable building as a single module firmware: arm_scmi: Move scmi protocols registration into the driver firmware: arm_scmi: Move scmi bus init and exit calls into the driver firmware: smccc: Export both smccc functions firmware: arm_scmi: Fix NULL pointer dereference in mailbox_chan_free firmware: arm_scmi: Add SCMI device for system power protocol firmware: arm_scmi: Add system power protocol support firmware: arm_scmi: Constify static scmi-ops firmware: arm_scmi: Constify ops pointers in scmi_handle cpufreq: arm_scmi: Constify scmi_perf_ops pointers Link: https://lore.kernel.org/r/20200914075018.2rvytvghxyutcbk4@bogus Signed-off-by: Olof Johansson commit 01e869cc0db9ab0d87818cb926ee97629e2a3f98 Author: Dmitry Baryshkov Date: Tue Sep 15 15:02:03 2020 +0300 arm64: dts: sm8250: Add OPP table for all qup devices qup has a requirement to vote on the performance state of the CX domain in sm8250 devices. Add OPP tables for these and also add power-domains property for all qup instances for uart and spi. i2c does not support scaling and uses a fixed clock. Acked-by: Manivannan Sadhasivam Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200915120203.290295-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 43bb8074000c9c597e13bbd35c56db7e25579f6f Author: Robert Foss Date: Tue Sep 15 16:23:16 2020 +0200 arm64: dts: qcom: msm8996: Add VFE1_GDSC power domain to camss node As the MSM8996 has two VFE IP-blocks, and each has a power domain, both of them have to be enabled. Previously only the power domain of VFE0 was enabled, but not the domain for VFE1. This patch adds the VFE1_GDSC power domain to the camss device tree node of the MSM8996 soc. Signed-off-by: Robert Foss Link: https://lore.kernel.org/r/20200915142316.147208-1-robert.foss@linaro.org Signed-off-by: Bjorn Andersson commit e198eea948a0f12630cf7a8d12fe30d257c9339d Author: Ville Syrjälä Date: Wed Jul 1 00:56:01 2020 +0300 drm/i915: Nuke pointless variable No point in assigning the function return value to a local variable if we're just going to use it the one time. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-13-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 6d3144eb367063df630248e0564b75701f63423b Author: Ville Syrjälä Date: Wed Jul 1 00:56:00 2020 +0300 drm/i915: Introduce intel_hpd_hotplug_irqs() Introduce intel_hpd_hotplug_irqs() as a partner to intel_hpd_enabled_irqs(). There's no need to care about the encoders which we're not exposing, so we can avoid hardcoding the masks in various places. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-12-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit a190db945bccdb8c51a02fc26a9f79b860dc586e Author: Corey Minyard Date: Tue Sep 15 08:48:56 2020 -0500 ipmi: Clean up some printks Convert to dev_xxx() and fix some verbage. Signed-off-by: Corey Minyard commit f8910ffa81b085030dc54814c85d338c26a3157e Author: Xianting Tian Date: Tue Sep 15 15:18:17 2020 +0800 ipmi:msghandler: retry to get device id on an error We fail to get the BMCS's device id with low probability when loading the ipmi driver and it causes BMC device registration failed. When this issue occurs we got below kernel prints: [Wed Sep 9 19:52:03 2020] ipmi_si IPI0001:00: IPMI message handler: device id demangle failed: -22 [Wed Sep 9 19:52:03 2020] IPMI BT: using default values [Wed Sep 9 19:52:03 2020] IPMI BT: req2rsp=5 secs retries=2 [Wed Sep 9 19:52:03 2020] ipmi_si IPI0001:00: Unable to get the device id: -5 [Wed Sep 9 19:52:04 2020] ipmi_si IPI0001:00: Unable to register device: error -5 When this issue happens, we want to manually unload the driver and try to load it again, but it can't be unloaded by 'rmmod' as it is already 'in use'. We add a print in handle_one_recv_msg(), when this issue happens, the msg we received is "Recv: 1c 01 d5", which means the data_len is 1, data[0] is 0xd5 (completion code), which means "bmc cannot execute command. Command, or request parameter(s), not supported in present state". Debug code: static int handle_one_recv_msg(struct ipmi_smi *intf, struct ipmi_smi_msg *msg) { printk("Recv: %*ph\n", msg->rsp_size, msg->rsp); ... ... } Then in ipmi_demangle_device_id(), it returned '-EINVAL' as 'data_len < 7' and 'data[0] != 0'. We created this patch to retry the get device id when this error happens. We reproduced this issue again and the retry succeed on the first retry, we finally got the correct msg and then all is ok: Recv: 1c 01 00 01 81 05 84 02 af db 07 00 01 00 b9 00 10 00 So use a retry machanism in this patch to give bmc more opportunity to correctly response kernel when we received specific completion codes. Signed-off-by: Xianting Tian Message-Id: <20200915071817.4484-1-tian.xianting@h3c.com> [Cleaned up the verbage a bit in the header and prints.] Signed-off-by: Corey Minyard commit da51e4bafdfafc627ba57de8add05a968d2e6f81 Author: Ville Syrjälä Date: Wed Jul 1 00:55:59 2020 +0300 drm/i915: Introduce HPD_PORT_TC Make a clean split between hpd pins for DDI vs. TC. This matches how the actual hardware is split. And with this we move the DDI/PHY->HPD pin mapping into the encoder init instead of having to remap yet again in the interrupt code. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-11-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 2b694fc92a34e8c8b774a17266656d72b8cd4429 Author: Tuan Phan Date: Mon Sep 14 11:04:16 2020 -0700 perf: arm_dsu: Support DSU ACPI devices Add support for probing device from ACPI node. Each DSU ACPI node and its associated cpus are inside a cluster node. Signed-off-by: Tuan Phan Reviewed-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1600106656-9542-1-git-send-email-tuanphan@os.amperecomputing.com Signed-off-by: Will Deacon commit 03c7e4f1190e1dc338c7a8f104d2ba1dd233f2d3 Author: Ville Syrjälä Date: Wed Jul 1 00:55:58 2020 +0300 drm/i915: Move hpd_pin setup to encoder init Currently DP/HDMI/DDI encoders init their hpd_pin from the connector init. Let's move it to the encoder init so that we don't need to add platform specific junk to the connector init (which is shared by all g4x+ platforms). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-10-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 815f4ef21f4ae9fdd182400560ac6025f420a21e Author: Ville Syrjälä Date: Wed Jul 1 00:55:57 2020 +0300 drm/i915: Split icp_hpd_detection_setup() into ddi vs. tc parts No reason to stuff both DDI and TC port handling into the same function. Split it into two. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-9-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 1db9f992d67b9edefed65b829767bb01fb23c63e Author: Ville Syrjälä Date: Wed Jul 1 00:55:56 2020 +0300 drm/i915: Configure GEN11_{TBT,TC}_HOTPLUG_CTL for ports TC5/6 gen11_hpd_detection_setup() is missing ports TC5/6. Add them. TODO: Might be nice to only enable the hpd detection logic for ports we actually have. Should be rolled out for all platforms if/when done... Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-8-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit a52bfcdd806f054156a72e9dc88d2d53d565e475 Author: Ville Syrjälä Date: Wed Jul 1 00:55:55 2020 +0300 drm/i915: Nuke the redundant TC/TBT HPD bit defines We have nice parametrized GEN11_{TC,TBT}_HOTPLUG() so nuke the overlapping defines. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-7-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 5bf22ee41003729e28e082a9574cef0ed31a434b Author: Ville Syrjälä Date: Wed Jul 1 00:55:54 2020 +0300 drm/i915: Add VBT AUX CH H and I As with everything else VBT can now specify AUX CH H or I. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-6-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 176430cc13470e0c7191459af832abc8d41c3c66 Author: Ville Syrjälä Date: Wed Jul 1 00:55:53 2020 +0300 drm/i915: Add VBT DVO ports H and I VBT has ports H and I since version 217. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-5-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 244f2e9ce3e3f38c0cd46db1fcbe21aa04d9ba94 Author: Ville Syrjälä Date: Wed Jul 1 00:55:52 2020 +0300 drm/i915: Add AUX_CH_{H,I} power domain handling AUX CH H/I need their power domains too. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-4-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 07c9b088d780fbef51dc6d194a45c6b0bf3df10f Author: Ville Syrjälä Date: Wed Jul 1 00:55:51 2020 +0300 drm/i915: Add PORT_{H,I} to intel_port_to_power_domain() We need to go up to PORT_I (aka. TC6) these days. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-3-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 5526fa0bfd248051ef92d62df9f1b78c72fd2046 Author: Ville Syrjälä Date: Wed Jul 1 00:55:50 2020 +0300 drm/i915: Add more AUX CHs to the enum We need to go up to AUX_CH_I (aka. AUX CH USBC6) these days. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200630215601.28557-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit c2b1e76d8c91166ca5f7aa8df02d67b619e24dc3 Author: Xianting Tian Date: Tue Sep 15 15:44:41 2020 +0800 ipmi:sm: Print current state when the state is invalid Print current state before returning IPMI_NOT_IN_MY_STATE_ERR so we can know where this issue is coming from and possibly fix the state machine. Signed-off-by: Xianting Tian Message-Id: <20200915074441.4090-1-tian.xianting@h3c.com> [Converted printk() to pr_xxx().] Signed-off-by: Corey Minyard commit f5f022e53b874f978dda23847173cbf2589b07f5 Author: John Ogness Date: Mon Sep 14 14:39:54 2020 +0206 printk: reimplement log_cont using record extension Use the record extending feature of the ringbuffer to implement continuous messages. This preserves the existing continuous message behavior. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200914123354.832-7-john.ogness@linutronix.de commit 4cfc7258f876a7feba673ac6d050f525b39cc84c Author: John Ogness Date: Mon Sep 14 14:39:53 2020 +0206 printk: ringbuffer: add finalization/extension support Add support for extending the newest data block. For this, introduce a new finalization state (desc_finalized) denoting a committed descriptor that cannot be extended. Until a record is finalized, a writer can reopen that record to append new data. Reopening a record means transitioning from the desc_committed state back to the desc_reserved state. A writer can explicitly finalize a record if there is no intention of extending it. Also, records are automatically finalized when a new record is reserved. This relieves writers of needing to explicitly finalize while also making such records available to readers sooner. (Readers can only traverse finalized records.) Four new memory barrier pairs are introduced. Two of them are insignificant additions (data_realloc:A/desc_read:D and data_realloc:A/data_push_tail:B) because they are alternate path memory barriers that exactly match the purpose, pairing, and context of the two existing memory barrier pairs they provide an alternate path for. The other two new memory barrier pairs are significant additions: desc_reopen_last:A / _prb_commit:B - When reopening a descriptor, ensure the state transitions back to desc_reserved before fully trusting the descriptor data. _prb_commit:B / desc_reserve:D - When committing a descriptor, ensure the state transitions to desc_committed before checking the head ID to see if the descriptor needs to be finalized. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200914123354.832-6-john.ogness@linutronix.de commit 9c3006a4cc1b165652a07727caf7926054f9aa9f Author: Christian König Date: Fri Sep 11 16:01:21 2020 +0200 drm/ttm: remove available_caching Instead of letting TTM make an educated guess based on some mask all drivers should just specify what caching they want for their CPU mappings. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/390207/ commit 5839172f09806f828319bdb2af97ca3c6cfcb432 Author: Christian König Date: Fri Sep 11 15:36:30 2020 +0200 drm/nouveau: explicitly specify caching to use Instead of letting TTM masking the caching bits specify directly what the driver needs. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/390206 commit 0fe438cec9e1d263a831e62a0499e14ee228fb30 Author: Christian König Date: Fri Sep 11 15:06:53 2020 +0200 drm/ttm: remove default caching As far as I can tell this was never used either and we just always fallback to the order cached > wc > uncached anyway. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/390142/ commit f60c826d031817772b634c0cda37794ce6d7946a Author: Alex Dewar Date: Wed Sep 9 20:09:06 2020 +0100 ima: Use kmemdup rather than kmalloc+memcpy Issue identified with Coccinelle. Signed-off-by: Alex Dewar Signed-off-by: Mimi Zohar commit 10dcb06d40411a73e1ae111717e9a987bb760313 Author: John Ogness Date: Mon Sep 14 14:39:52 2020 +0206 printk: ringbuffer: change representation of states Rather than deriving the state by evaluating bits within the flags area of the state variable, assign the states explicit values and set those values in the flags area. Introduce macros to make it simple to read and write state values for the state variable. Although the functionality is preserved, the binary representation for the states is changed. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200914123354.832-5-john.ogness@linutronix.de commit 81e7571ea35e2b8b74b777ac8484818c8a984ea9 Author: Markus Boehme Date: Mon Sep 7 18:25:35 2020 +0200 ipmi: Reset response handler when failing to send the command When failing to send a command we don't expect a response. Clear the `null_user_handler` like is done in the success path. Signed-off-by: Markus Boehme Message-Id: <1599495937-10654-1-git-send-email-markubo@amazon.com> Signed-off-by: Corey Minyard commit cc5c7041c6e1fe8c02fe9e16f28a5e52f7a6957c Author: John Ogness Date: Mon Sep 14 14:39:51 2020 +0206 printk: ringbuffer: clear initial reserved fields prb_reserve() will set some meta data values and leave others uninitialized (or rather, containing the values of the previous wrap). Simplify the API by always clearing out all the fields. Only the sequence number is filled in. The caller is now responsible for filling in the rest of the meta data fields. In particular, for correctly filling in text and dict lengths. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200914123354.832-4-john.ogness@linutronix.de commit e3bc0401c1de2feb15601685b85b4dea45130386 Author: John Ogness Date: Mon Sep 14 14:39:50 2020 +0206 printk: ringbuffer: add BLK_DATALESS() macro Rather than continually needing to explicitly check @begin and @next to identify a dataless block, introduce and use a BLK_DATALESS() macro. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200914123354.832-3-john.ogness@linutronix.de commit 2a7f87ed05b9035ef818d0f46fe6aef5640224e3 Author: John Ogness Date: Mon Sep 14 14:39:49 2020 +0206 printk: ringbuffer: relocate get_data() Move the internal get_data() function as-is above prb_reserve() so that a later change can make use of the static function. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200914123354.832-2-john.ogness@linutronix.de commit adc5f7029376049873289be305d507022281b8dd Author: Russell King Date: Thu Aug 6 10:32:33 2020 +0100 ARM: add malloc size to decompressor kexec size structure Add the required malloc size to the decompressor kexec size structure. Signed-off-by: Russell King commit 83dfeedb6663ea8cdf93f41191ef313de5b7a2ba Author: Russell King Date: Tue Apr 3 12:02:28 2018 +0100 ARM: add TEXT_OFFSET to decompressor kexec image structure Add the TEXT_OFFSET to the decompressor's kexec image structure to kexec knows what offset to use. Signed-off-by: Russell King commit 8e007b367a59bcdf484c81f6df9bd5a4cc179ca6 Author: Guillaume Tucker Date: Tue Sep 1 16:58:06 2020 +0100 ARM: 9007/1: l2c: fix prefetch bits init in L2X0_AUX_CTRL using DT values The L310_PREFETCH_CTRL register bits 28 and 29 to enable data and instruction prefetch respectively can also be accessed via the L2X0_AUX_CTRL register. They appear to be actually wired together in hardware between the registers. Changing them in the prefetch register only will get undone when restoring the aux control register later on. For this reason, set these bits in both registers during initialisation according to the devicetree property values. Link: https://lore.kernel.org/lkml/76f2f3ad5e77e356e0a5b99ceee1e774a2842c25.1597061474.git.guillaume.tucker@collabora.com/ Fixes: ec3bd0e68a67 ("ARM: 8391/1: l2c: add options to overwrite prefetching behavior") Signed-off-by: Guillaume Tucker Signed-off-by: Russell King commit c03e41470e90112328e5a3dcc6961a07e87b8141 Author: Linus Walleij Date: Fri Sep 4 09:08:26 2020 +0100 ARM: 9010/1: uncompress: Print the location of appended DTB When using the kernel with an appended DTB it is useful to know where this will end up in the physical memory at the time the kernel boots. We add a debug print macro that will help out with this. Here is a sample debug print after passing -DDEBUG to head.S during compilation: DTB:0x40CEBA70 (0x000051B5) C:0x402080C0-0x40CF0CE0->0x41801D00-0x422EA920 DTB:0x422E56B0 (0x00005262) This means that the appended DTB is first found after the compressed kernel at 0x40CEBA70 of size 0x51B5 and then after the compressed kernel is moved to 0x41801D00 it is found again at 0x422E56B0 and is there size 0x5262. The growth in size of the FDT is due to the call to atags_to_fdt() that augments the DTB with ATAG information. Signed-off-by: Linus Walleij Signed-off-by: Russell King commit 2596a72d338481b49a678ab880338fd5a661e663 Author: Linus Walleij Date: Fri Sep 4 09:07:41 2020 +0100 ARM: 9009/1: uncompress: Enable debug in head.S The assembly file head.S includes some debug code that does not get enabled when we select CONFIG_DEBUG_UNCOMPRESS. The debug in head.S relies on the user tagging on -DDEBUG on the compilation command line. To simplify debugging, tag on -DDEBUG so that we also get these debug messages when selecting CONFIG_DEBUG_UNCOMPRESS. Signed-off-by: Linus Walleij Signed-off-by: Russell King commit 30d9a34dd374987db84c0b80ff5b7dc1eaf9d847 Author: Linus Walleij Date: Fri Sep 4 09:06:49 2020 +0100 ARM: 9008/1: uncompress: Drop excess whitespace print This drops some whitespace from the debug message about where we move the compressed kernel: r after the message is completely surplus since the putc routine will anyway add r after n, and the initial linefeed just assumes that this will always be the first message on the console, which is not certain to be true. Signed-off-by: Linus Walleij Signed-off-by: Russell King commit 0b0c1dbd500dfe3e43ccfa1c186f44e25ea6b23f Author: Linus Walleij Date: Thu Aug 27 23:29:34 2020 +0100 ARM: 9006/1: uncompress: Wait for ready and busy in debug prints For some platforms such as Qualcomm we need to wait for the UART to be ready before writing characters to the UART in the same manner as the macro in debug.S used with the main "Uncompressing Linux ..." text. Pass an extra temporary variable to writeb and make it call waituarttxrdy and busyuart just like the other decomression messages. Optionally it will also call waituartcts if and only if CONFIG_DEBUG_UART_FLOW_CONTROL is selected. After this the decompression debug messages work fine on Qualcomm platforms if you compile head.S with -DDEBUG. Cc: Nicolas Pitre Cc: Fabrizio Castro Cc: Ard Biesheuvel Signed-off-by: Linus Walleij Signed-off-by: Russell King commit 4df24fef09615d8f7dd2120f5072486addfd3eb9 Author: Linus Walleij Date: Thu Aug 27 23:28:56 2020 +0100 ARM: 9005/1: debug: Select flow control for all debug UARTs Instead of a flow control selection mechanism specifically for 8250, make this available for all debug UARTs. If the debug UART supports waiting for CTS to be asserted, then this code can be activated for terminals that need it. We keep the defaults for EBSA110, Footbridge, Gemini and RPC so that this still works as expected for these older platforms: they assume that flow control shall be enabled for debug prints. I switch the location of the check for ifdef CONFIG_DEBUG_UART_FLOW_CONTROL from the actual debug UART drivers: the code would get compiled-out for 8250 and Tegra unless their custom config (or passing -DFLOW_CONTROL in the Tegra case) was not set. Instead this is conditional at the three places where we print debug messages. The idea is that debug UARTs can be implemented without this ifdef boilerplate so they look cleaner, alas the ifdef has to be somewhere. Signed-off-by: Linus Walleij Signed-off-by: Russell King commit 2c50a570e9dc649c182268e779dffe0712e98a6a Author: Linus Walleij Date: Thu Aug 27 23:25:37 2020 +0100 ARM: 9004/1: debug: Split waituart to CTS and TXRDY This patch was triggered by a remark from Russell that introducing a call to the waituart (needed to fix debug prints on the Qualcomm platforms) was dangerous because in some cases this will involve waiting for a modem CTS (clear to send) signal, and debug messages would maybe not work on platforms with no modem connected to the UART port: they will just hang waiting for the modem to assert CTS and this might never happen. Looking through all UART debug drivers implementing the waituart macro I discovered that all users except two actually use this macro to check if the UART is ready for TX, let's call this TXRDY. Only two debug UART drivers actually check for CTS: - arch/arm/include/debug/8250.S - arch/arm/include/debug/tegra.S The former is very significant since the 8250 is possibly the most common UART on the planet. We have the following problem: the semantics of waituart are ambiguous making it dangerous to introduce the macro to debug code fixing debug prints for Qualcomm. To start to pry this problem apart, this patch does the following: - Convert all debug UART drivers to define two macros: - waituartcts with the clear semantic to wait for CTS to be asserted - waituarttxrdy with the clear semantic to wait for the TX capability of the UART to be ready - When doing this take care to assign the right function to each drivers macro, so they now do exactly the above. - Update the three sites in the kernel invoking the waituart macro to call waituartcts/waituarttxrdy in sequence, so that the functional impact on the kernel should be zero. After this we can start to change the code sites using this code to do the right thing. Signed-off-by: Linus Walleij Signed-off-by: Russell King commit 6428ea2788310302d6e75a2fae7e5c490b4d5113 Author: Linus Walleij Date: Fri Aug 21 09:16:06 2020 +0100 ARM: 9003/1: uncompress: Delete unused debug macros The debug macros debug_reloc_start and debug_reloc_end were rendered unused in commit 6d7d0ae51574943bf571d269da3243257a2d15db "ARM: 6750/1: improvements to compressed/head.S". Later on a different debug macro named dbgkc was introduced in commit f3c899927e19d1be39818145efc39ea27b8efc69 "ARM: 8786/1: Debug kernel copy by printing". Delete the dead debug code. Cc: Nicolas Pitre Cc: Fabrizio Castro Cc: Ard Biesheuvel Signed-off-by: Linus Walleij Signed-off-by: Russell King commit 22c9e58299e5f18274788ce54c03d4fb761e3c5d Author: Douglas Anderson Date: Thu Aug 6 23:24:35 2020 +0100 ARM: 8997/2: hw_breakpoint: Handle inexact watchpoint addresses This is commit fdfeff0f9e3d ("arm64: hw_breakpoint: Handle inexact watchpoint addresses") but ported to arm32, which has the same problem. This problem was found by Android CTS tests, notably the "watchpoint_imprecise" test [1]. I tested locally against a copycat (simplified) version of the test though. [1] https://android.googlesource.com/platform/bionic/+/master/tests/sys_ptrace_test.cpp Link: https://lkml.kernel.org/r/20191019111216.1.I82eae759ca6dc28a245b043f485ca490e3015321@changeid Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Acked-by: Will Deacon Signed-off-by: Russell King commit 46f206304db0311b0920479f42accaa7cb472fdc Author: Enric Balletbo i Serra Date: Thu Aug 27 10:59:11 2020 +0200 drm/bridge: ps8640: Rework power state handling The get_edid() callback can be triggered anytime by an ioctl, i.e drm_mode_getconnector (ioctl) -> drm_helper_probe_single_connector_modes -> drm_bridge_connector_get_modes -> ps8640_bridge_get_edid Actually if the bridge pre_enable() function was not called before get_edid(), the driver will not be able to get the EDID properly and display will not work until a second get_edid() call is issued and if pre_enable() is called before. The side effect of this, for example, is that you see anything when `Frecon` starts, neither the splash screen, until the graphical session manager starts. To fix this we need to make sure that all we need is enabled before reading the EDID. This means the following: 1. If get_edid() is called before having the device powered we need to power on the device. In such case, the driver will power off again the device. 2. If get_edid() is called after having the device powered, all should just work. We added a powered flag in order to avoid recurrent calls to ps8640_bridge_poweron() and unneeded delays. 3. This seems to be specific for this device, but we need to make sure the panel is powered on before do a power on cycle on this device. Otherwise the device fails to retrieve the EDID. Signed-off-by: Enric Balletbo i Serra Tested-by: Bilal Wasim Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200827085911.944899-2-enric.balletbo@collabora.com commit e7c1fe21046a024a5a9ef46e3752521afc1ada7b Author: John Ogness Date: Mon Sep 14 11:54:03 2020 +0206 printk: ringbuffer: avoid memcpy() on state_var @state_var is copied as part of the descriptor copying via memcpy(). This is not allowed because @state_var is an atomic type, which in some implementations may contain a spinlock. Avoid using memcpy() with @state_var by explicitly copying the other fields of the descriptor. @state_var is set using atomic set operator before returning. Fixes: b6cf8b3f3312 ("printk: add lockless ringbuffer") Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200914094803.27365-2-john.ogness@linutronix.de commit b81dddb909b4fa4498d96b2bf7748ae1e86e5e67 Author: Ville Syrjälä Date: Thu Sep 10 19:42:56 2020 +0300 drm/i915: Reduce INTEL_DISPLAY_ENABLED to just treat outputs as disconnected Since the display hardware is all there even when INTEL_DISPLAY_ENABLED return false we have to be capable of shutting it down cleanly so as to not anger the hw. To that end let's reduce the effect of !INTEL_DISPLAY_ENABLE to just treating all outputs as disconnected. Should prevent anyone from automagically enabling any of them, while still allowing us to cleanly shut them down. v2: Put the check into the right place for CRT Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200910164256.25983-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit ce003d67ad521d950687bce7e42e5361022c7d3d Author: John Ogness Date: Mon Sep 14 11:54:02 2020 +0206 printk: ringbuffer: fix setting state in desc_read() It is expected that desc_read() will always set at least the @state_var field. However, if the descriptor is in an inconsistent state, no fields are set. Also, the second load of @state_var is not stored in @desc_out and so might not match the state value that is returned. Always set the last loaded @state_var into @desc_out, regardless of the descriptor consistency. Fixes: b6cf8b3f3312 ("printk: add lockless ringbuffer") Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200914094803.27365-1-john.ogness@linutronix.de commit 8f7e57e8e29c4fc788811dd4db96126272b8df91 Author: Qinglang Miao Date: Mon Sep 14 14:14:11 2020 +0800 macintosh: windfarm: use for_each_child_of_node() macro Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200914061411.3356-1-miaoqinglang@huawei.com commit 3a3181e16fbde752007759f8759d25e0ff1fc425 Author: Cédric Le Goater Date: Fri Aug 7 12:18:54 2020 +0200 powerpc/pci: unmap legacy INTx interrupts when a PHB is removed When a passthrough IO adapter is removed from a pseries machine using hash MMU and the XIVE interrupt mode, the POWER hypervisor expects the guest OS to clear all page table entries related to the adapter. If some are still present, the RTAS call which isolates the PCI slot returns error 9001 "valid outstanding translations" and the removal of the IO adapter fails. This is because when the PHBs are scanned, Linux maps automatically the INTx interrupts in the Linux interrupt number space but these are never removed. To solve this problem, we introduce a PPC platform specific pcibios_remove_bus() routine which clears all interrupt mappings when the bus is removed. This also clears the associated page table entries of the ESB pages when using XIVE. For this purpose, we record the logical interrupt numbers of the mapped interrupt under the PHB structure and let pcibios_remove_bus() do the clean up. Since some PCI adapters, like GPUs, use the "interrupt-map" property to describe interrupt mappings other than the legacy INTx interrupts, we can not restrict the size of the mapping array to PCI_NUM_INTX. The number of interrupt mappings is computed from the "interrupt-map" property and the mapping array is allocated accordingly. Signed-off-by: Cédric Le Goater Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200807101854.844619-1-clg@kaod.org commit ffd2961bb41f797eb00b58e019b707555197275e Author: Nicholas Piggin Date: Wed Aug 19 19:47:00 2020 +1000 powerpc/powernv/idle: add a basic stop 0-3 driver for POWER10 This driver does not restore stop > 3 state, so it limits itself to states which do not lose full state or TB. The POWER10 SPRs are sufficiently different from P9 that it seems easier to split out the P10 code. The POWER10 deep sleep code (e.g., the BHRB restore) has been taken out, but it can be re-added when stop > 3 support is added. Signed-off-by: Nicholas Piggin Tested-by: Pratik Rajesh Sampat Tested-by: Vaidyanathan Srinivasan Reviewed-by: Pratik Rajesh Sampat Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819094700.493399-1-npiggin@gmail.com commit 79b123cdf9cf0d4a1620baa8c611962626323a08 Author: Aneesh Kumar K.V Date: Mon Sep 7 12:55:39 2020 +0530 powerepc/book3s64/hash: Align start/end address correctly with bolt mapping This ensures we don't do a partial mapping of memory. With nvdimm, when creating namespaces with size not aligned to 16MB, the kernel ends up partially mapping the pages. This can result in kernel adding multiple hash page table entries for the same range. A new namespace will result in create_section_mapping() with start and end overlapping an already existing bolted hash page table entry. commit: 6acd7d5ef264 ("libnvdimm/namespace: Enforce memremap_compat_align()") made sure that we always create namespaces aligned to 16MB. But we can do better by avoiding mapping pages that are not aligned. This helps to catch access to these partially mapped pages early. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200907072539.67310-1-aneesh.kumar@linux.ibm.com commit bbc4f40b5322b3e0b8678619f1c613dadc811669 Author: Jason Yan Date: Fri Sep 11 10:01:21 2020 +0800 powerpc/ps3: make two symbols static This addresses the following sparse warning: arch/powerpc/platforms/ps3/spu.c:451:33: warning: symbol 'spu_management_ps3_ops' was not declared. Should it be static? arch/powerpc/platforms/ps3/spu.c:592:28: warning: symbol 'spu_priv1_ps3_ops' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200911020121.1464585-1-yanaijie@huawei.com commit 4c42dc5c69a8f24c467a6c997909d2f1d4efdc7f Author: Christophe Leroy Date: Fri Sep 11 05:05:38 2020 +0000 powerpc/kasan: Fix CONFIG_KASAN_VMALLOC for 8xx Before the commit identified below, pages tables allocation was performed after the allocation of final shadow area for linear memory. But that commit switched the order, leading to page tables being already allocated at the time 8xx kasan_init_shadow_8M() is called. Due to this, kasan_init_shadow_8M() doesn't map the needed shadow entries because there are already page tables. kasan_init_shadow_8M() installs huge PMD entries instead of page tables. We could at that time free the page tables, but there is no point in creating page tables that get freed before being used. Only book3s/32 hash needs early allocation of page tables. For other variants, we can keep the initial order and create remaining page tables after the allocation of final shadow memory for linear mem. Move back the allocation of shadow page tables for CONFIG_KASAN_VMALLOC into kasan_init() after the loop which creates final shadow memory for linear mem. Fixes: 41ea93cf7ba4 ("powerpc/kasan: Fix shadow pages allocation failure") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8ae4554357da4882612644a74387ae05525b2aaa.1599800716.git.christophe.leroy@csgroup.eu commit 2c637d2df4ee4830e9d3eb2bd5412250522ce96e Author: Christophe Leroy Date: Fri Sep 11 10:29:15 2020 +0000 powerpc/powermac: Fix low_sleep_handler with KUAP and KUEP low_sleep_handler() has an hardcoded restore of segment registers that doesn't take KUAP and KUEP into account. Use head_32's load_segment_registers() routine instead. Fixes: a68c31fc01ef ("powerpc/32s: Implement Kernel Userspace Access Protection") Fixes: 31ed2b13c48d ("powerpc/32s: Implement Kernel Userspace Execution Prevention.") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/21b05f7298c1b18f73e6e5b4cd5005aafa24b6da.1599820109.git.christophe.leroy@csgroup.eu commit c83c192a6fbb1d4db4144c40296ed059f5eca384 Author: Christophe Leroy Date: Mon Aug 17 05:47:58 2020 +0000 powerpc/process: Remove useless #ifdef CONFIG_PPC_FPU Add a stub for __giveup_fpu() when CONFIG_PPC_FPU is not selected, as done for CONFIG_SPE and CONFIG_ALTIVEC. This allows to remove some #ifdef CONFIG_PPC_FPU. Also change one to IS_ENABLED(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/69c8b7954ceeccc6b849e52e1fa41b3a0f10f6c1.1597643221.git.christophe.leroy@csgroup.eu commit 532ed1900d37a47c821718a0d8d28eb05b2c4d28 Author: Christophe Leroy Date: Mon Aug 17 05:47:57 2020 +0000 powerpc/process: Remove useless #ifdef CONFIG_SPE cpu_has_feature(CPU_FTR_SPE) returns false when CONFIG_SPE is not set. There is no need to enclose the test in an #ifdef CONFIG_SPE. Remove it. CPU_FTR_SPE only exists on 32 bits. Define it as 0 on 64 bits. We have a couple of places like: #ifdef CONFIG_SPE if (cpu_has_feature(CPU_FTR_SPE)) { do_something_that_requires_CONFIG_SPE } else { return -EINVAL; } #else return -EINVAL; #endif Replace them by a cleaner version: if (cpu_has_feature(CPU_FTR_SPE)) { #ifdef CONFIG_SPE do_something_that_requires_CONFIG_SPE #endif } else { return -EINVAL; } When CONFIG_SPE is not set, this resolves to an unconditional return of -EINVAL Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/698df8387555765b70ea42e4a7fa48141c309c1f.1597643221.git.christophe.leroy@csgroup.eu commit e3667ee427e224f9951eb3940a97477285548134 Author: Christophe Leroy Date: Mon Aug 17 05:47:56 2020 +0000 powerpc/process: Remove useless #ifdef CONFIG_ALTIVEC cpu_has_feature(CPU_FTR_ALTIVEC) returns false when CONFIG_ALTIVEC is not set. There is no need to enclose the test in an #ifdef CONFIG_ALTIVEC. Remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/03ba6b52344ca7c336df2bc6e3d31d736c804ae2.1597643221.git.christophe.leroy@csgroup.eu commit 80739c2bd29133715d6828e333649a55095f4747 Author: Christophe Leroy Date: Mon Aug 17 05:47:55 2020 +0000 powerpc/process: Remove useless #ifdef CONFIG_VSX cpu_has_feature(CPU_FTR_VSX) returns false when CONFIG_VSX is not set. There is no need to enclose the test in an #ifdef CONFIG_VSX. Remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0eb61cf0dc66d781d47deb2228498cd61d03a754.1597643221.git.christophe.leroy@csgroup.eu commit 60d62bfd24efce1a595d259100b8a4e7a489e834 Author: Christophe Leroy Date: Mon Aug 17 05:46:45 2020 +0000 powerpc/process: Tag an #endif to help locate the matching #ifdef. That #endif is more than 100 lines after the matching #ifdef, and there are several #ifdef/#else/#endif inbetween. Tag it as /* CONFIG_PPC_BOOK3S_64 */ to help locate the matching #ifdef. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3612a8f8aaca16de3fc414a7e66293319d6e213c.1597643147.git.christophe.leroy@csgroup.eu commit 8f020c7ca300fd60374f0347814c92ea513c24da Author: Christophe Leroy Date: Mon Aug 17 05:46:44 2020 +0000 powerpc/process: Replace #ifdef CONFIG_KALLSYMS by IS_ENABLED() The #ifdef CONFIG_KALLSYMS encloses some printk which can compile in all cases. Replace by IS_ENABLED(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2d89732a9062b2cf2651728804e4b8f6c9b9358e.1597643164.git.christophe.leroy@csgroup.eu commit 2ec42996f5b12826466300a755413577b6913206 Author: Christophe Leroy Date: Mon Aug 17 05:46:43 2020 +0000 powerpc/process: Replace an #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) by IS_ENABLED() The #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) encloses some printk which can be compiled in all cases. Replace by IS_ENABLED(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a1b6ef3d657c8f249193442f56868fc358ea5b6c.1597643160.git.christophe.leroy@csgroup.eu commit bfac2799301c19d81122af04a8a3ad5ecae3737e Author: Christophe Leroy Date: Mon Aug 17 05:46:42 2020 +0000 powerpc/process: Replace an #ifdef CONFIG_PPC_BOOK3S_64 by IS_ENABLED() This #ifdef CONFIG_PPC_BOOK3S_64 calls preload_new_slb_context() when radix is not enabled. radix_enabled() is always defined, and the prototype for preload_new_slb_context() is always present, so the #ifdef is unneeded. Replace it by IS_ENABLED(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d31506ca9bac9def68cf7424eded63fdc4fb6660.1597643167.git.christophe.leroy@csgroup.eu commit 04d476bfbb06426fef2985c8e53578bb04596a6f Author: Christophe Leroy Date: Mon Aug 17 05:46:41 2020 +0000 powerpc/process: Replace an #ifdef CONFIG_PPC_47x by IS_ENABLED() isync() is always defined, no need for an #ifdef. Replace it by IS_ENABLED(CONFIG_PPC_47x). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ac8da0e3baa91dda805e1e492fd65aecd90c1fb5.1597643156.git.christophe.leroy@csgroup.eu commit da7bb43ab9da39bcfed0d146ce94e1f0cbae4ca0 Author: Christophe Leroy Date: Mon Sep 7 13:42:10 2020 +0000 powerpc/32: Fix vmap stack - Properly set r1 before activating MMU We need r1 to be properly set before activating MMU, otherwise any new exception taken while saving registers into the stack in exception prologs will use the user stack, which is wrong and will even lockup or crash when KUAP is selected. Do that by switching the meaning of r11 and r1 until we have saved r1 to the stack: copy r1 into r11 and setup the new stack pointer in r1. To avoid complicating and impacting all generic and specific prolog code (and more), copy back r1 into r11 once r11 is save onto the stack. We could get rid of copying r1 back and forth at the cost of rewriting everything to use r1 instead of r11 all the way when CONFIG_VMAP_STACK is set, but the effort is probably not worth it. Fixes: 028474876f47 ("powerpc/32: prepare for CONFIG_VMAP_STACK") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8f85e8752ac5af602db7237ef53d634f4f3d3892.1599486108.git.christophe.leroy@csgroup.eu commit c118c7303ad528be8ff2aea8cd1ee15452c763f0 Author: Christophe Leroy Date: Mon Sep 7 13:42:09 2020 +0000 powerpc/32: Fix vmap stack - Do not activate MMU before reading task struct We need r1 to be properly set before activating MMU, so reading task_struct->stack must be done with MMU off. This means we need an additional register to play with MSR bits while r11 now points to the stack. For that, move r10 back to CR (As is already done for hash MMU) and use r10. We still don't have r1 correct yet when we activate MMU. It is done in following patch. Fixes: 028474876f47 ("powerpc/32: prepare for CONFIG_VMAP_STACK") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a027d447022a006c9c4958ac734128e577a3c5c1.1599486108.git.christophe.leroy@csgroup.eu commit 7fdf966bed155b214f4f1f9b67825a40b2e9b998 Author: Christophe Leroy Date: Fri Sep 4 11:01:32 2020 +0000 powerpc/uaccess: Remove __put_user_asm() and __put_user_asm2() __put_user_asm() and __put_user_asm2() are not used anymore. Remove them. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d66c4a372738d2fbd81f433ca86e4295871ace6a.1599216721.git.christophe.leroy@csgroup.eu commit e64ac41ab0c510b3f85199a585eb886cad92fb19 Author: Christophe Leroy Date: Fri Sep 4 11:01:31 2020 +0000 powerpc/uaccess: Switch __patch_instruction() to __put_user_asm_goto() __patch_instruction() is the only user of __put_user_asm() outside of asm/uaccess.h Switch to the new __put_user_asm_goto() to enable retirement of __put_user_asm() in a later patch. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b9745b122f4a9ae72cef445c61320022ab8b77b7.1599216721.git.christophe.leroy@csgroup.eu commit ee0a49a6870ea75e25b4d4984c1bb6b3b7c65f2b Author: Christophe Leroy Date: Fri Sep 4 11:01:30 2020 +0000 powerpc/uaccess: Switch __put_user_size_allowed() to __put_user_asm_goto() __put_user_asm_goto() provides more flexibility to GCC and avoids using a local variable to tell if the write succeeded or not. GCC can then avoid implementing a cmp in the fast path. See the difference for a small function like the PPC64 version of save_general_regs() in arch/powerpc/kernel/signal_32.c: Before the patch (unreachable nop removed): 0000000000000c10 <.save_general_regs>: c10: 39 20 00 2c li r9,44 c14: 39 40 00 00 li r10,0 c18: 7d 29 03 a6 mtctr r9 c1c: 38 c0 00 00 li r6,0 c20: 48 00 00 14 b c34 <.save_general_regs+0x24> c30: 42 40 00 40 bdz c70 <.save_general_regs+0x60> c34: 28 2a 00 27 cmpldi r10,39 c38: 7c c8 33 78 mr r8,r6 c3c: 79 47 1f 24 rldicr r7,r10,3,60 c40: 39 20 00 01 li r9,1 c44: 41 82 00 0c beq c50 <.save_general_regs+0x40> c48: 7d 23 38 2a ldx r9,r3,r7 c4c: 79 29 00 20 clrldi r9,r9,32 c50: 91 24 00 00 stw r9,0(r4) c54: 2c 28 00 00 cmpdi r8,0 c58: 39 4a 00 01 addi r10,r10,1 c5c: 38 84 00 04 addi r4,r4,4 c60: 41 82 ff d0 beq c30 <.save_general_regs+0x20> c64: 38 60 ff f2 li r3,-14 c68: 4e 80 00 20 blr c70: 38 60 00 00 li r3,0 c74: 4e 80 00 20 blr 0000000000000000 <.fixup>: cc: 39 00 ff f2 li r8,-14 d0: 48 00 00 00 b d0 <.fixup+0xd0> d0: R_PPC64_REL24 .text+0xc54 After the patch: 0000000000001490 <.save_general_regs>: 1490: 39 20 00 2c li r9,44 1494: 39 40 00 00 li r10,0 1498: 7d 29 03 a6 mtctr r9 149c: 60 00 00 00 nop 14a0: 28 2a 00 27 cmpldi r10,39 14a4: 79 48 1f 24 rldicr r8,r10,3,60 14a8: 39 20 00 01 li r9,1 14ac: 41 82 00 0c beq 14b8 <.save_general_regs+0x28> 14b0: 7d 23 40 2a ldx r9,r3,r8 14b4: 79 29 00 20 clrldi r9,r9,32 14b8: 91 24 00 00 stw r9,0(r4) 14bc: 39 4a 00 01 addi r10,r10,1 14c0: 38 84 00 04 addi r4,r4,4 14c4: 42 00 ff dc bdnz 14a0 <.save_general_regs+0x10> 14c8: 38 60 00 00 li r3,0 14cc: 4e 80 00 20 blr 14d0: 38 60 ff f2 li r3,-14 14d4: 4e 80 00 20 blr Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/94ba5a5138f99522e1562dbcdb38d31aa790dc89.1599216721.git.christophe.leroy@csgroup.eu commit fcf1f26895a4f14618b0dc04e0801b123c55e4a3 Author: Christophe Leroy Date: Fri Sep 4 10:46:47 2020 +0000 powerpc/uaccess: Add pre-update addressing to __put_user_asm_goto() Enable pre-update addressing mode in __put_user_asm_goto() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/346f65d677adb11865f7762c25a1ca3c64404ba5.1599216023.git.christophe.leroy@csgroup.eu commit e47168f3d1b14af5281cf50c59561d59d28201f9 Author: Christophe Leroy Date: Mon Aug 31 08:30:44 2020 +0000 powerpc/8xx: Support 16k hugepages with 4k pages The 8xx has 4 page sizes: 4k, 16k, 512k and 8M 4k and 16k can be selected at build time as standard page sizes, and 512k and 8M are hugepages. When 4k standard pages are selected, 16k pages are not available. Allow 16k pages as hugepages when 4k pages are used. To allow that, implement arch_make_huge_pte() which receives the necessary arguments to allow setting the PTE in accordance with the page size: - 512 k pages must have _PAGE_HUGE and _PAGE_SPS. They are set by pte_mkhuge(). arch_make_huge_pte() does nothing. - 16 k pages must have only _PAGE_SPS. arch_make_huge_pte() clears _PAGE_HUGE. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a518abc29266a708dfbccc8fce9ae6694fe4c2c6.1598862623.git.christophe.leroy@csgroup.eu commit 175a99991511fed16108dcb823f0af8e72325a1f Author: Christophe Leroy Date: Mon Aug 31 08:30:43 2020 +0000 powerpc/8xx: Refactor calculation of number of entries per PTE in page tables On 8xx, the number of entries occupied by a PTE in the page tables depends on the size of the page. At the time being, this calculation is done in two places: in pte_update() and in set_huge_pte_at() Refactor this calculation into a helper called number_of_cells_per_pte(). For the time being, the val param is unused. It will be used by following patch. Instead of opencoding is_hugepd(), use hugepd_ok() with a forward declaration. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f6ea2483c2c389567b007945948f704d18cfaeea.1598862623.git.christophe.leroy@csgroup.eu commit 542db12a9c42d1ce70c45091765e02f74c129f43 Author: Christophe Leroy Date: Mon Aug 31 07:58:19 2020 +0000 powerpc: Fix random segfault when freeing hugetlb range The following random segfault is observed from time to time with map_hugetlb selftest: root@localhost:~# ./map_hugetlb 1 19 524288 kB hugepages Mapping 1 Mbytes Segmentation fault [ 31.219972] map_hugetlb[365]: segfault (11) at 117 nip 77974f8c lr 779a6834 code 1 in ld-2.23.so[77966000+21000] [ 31.220192] map_hugetlb[365]: code: 9421ffc0 480318d1 93410028 90010044 9361002c 93810030 93a10034 93c10038 [ 31.220307] map_hugetlb[365]: code: 93e1003c 93210024 8123007c 81430038 <80e90004> 814a0004 7f443a14 813a0004 [ 31.221911] BUG: Bad rss-counter state mm:(ptrval) type:MM_FILEPAGES val:33 [ 31.229362] BUG: Bad rss-counter state mm:(ptrval) type:MM_ANONPAGES val:5 This fault is due to hugetlb_free_pgd_range() freeing page tables that are also used by regular pages. As explain in the comment at the beginning of hugetlb_free_pgd_range(), the verification done in free_pgd_range() on floor and ceiling is not done here, which means hugetlb_free_pte_range() can free outside the expected range. As the verification cannot be done in hugetlb_free_pgd_range(), it must be done in hugetlb_free_pte_range(). Fixes: b250c8c08c79 ("powerpc/8xx: Manage 512k huge pages as standard pages.") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f0cb2a5477cd87d1eaadb128042e20aeb2bc2859.1598860677.git.christophe.leroy@csgroup.eu commit e63d6fb5637e92725cf143559672a34b706bca4f Author: Finn Thain Date: Sat Sep 5 09:02:20 2020 +1000 powerpc/tau: Disable TAU between measurements Enabling CONFIG_TAU_INT causes random crashes: Unrecoverable exception 1700 at c0009414 (msr=1000) Oops: Unrecoverable exception, sig: 6 [#1] BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.7.0-pmac-00043-gd5f545e1a8593 #5 NIP: c0009414 LR: c0009414 CTR: c00116fc REGS: c0799eb8 TRAP: 1700 Not tainted (5.7.0-pmac-00043-gd5f545e1a8593) MSR: 00001000 CR: 22000228 XER: 00000100 GPR00: 00000000 c0799f70 c076e300 00800000 0291c0ac 00e00000 c076e300 00049032 GPR08: 00000001 c00116fc 00000000 dfbd3200 ffffffff 007f80a8 00000000 00000000 GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 c075ce04 GPR24: c075ce04 dfff8880 c07b0000 c075ce04 00080000 00000001 c079ef98 c079ef5c NIP [c0009414] arch_cpu_idle+0x24/0x6c LR [c0009414] arch_cpu_idle+0x24/0x6c Call Trace: [c0799f70] [00000001] 0x1 (unreliable) [c0799f80] [c0060990] do_idle+0xd8/0x17c [c0799fa0] [c0060ba4] cpu_startup_entry+0x20/0x28 [c0799fb0] [c072d220] start_kernel+0x434/0x44c [c0799ff0] [00003860] 0x3860 Instruction dump: XXXXXXXX XXXXXXXX XXXXXXXX 3d20c07b XXXXXXXX XXXXXXXX XXXXXXXX 7c0802a6 XXXXXXXX XXXXXXXX XXXXXXXX 4e800421 XXXXXXXX XXXXXXXX XXXXXXXX 7d2000a6 ---[ end trace 3a0c9b5cb216db6b ]--- Resolve this problem by disabling each THRMn comparator when handling the associated THRMn interrupt and by disabling the TAU entirely when updating THRMn thresholds. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5a0ba3dc5612c7aac596727331284a3676c08472.1599260540.git.fthain@telegraphics.com.au commit 5e3119e15fed5b9a9a7e528665ff098a4a8dbdbc Author: Finn Thain Date: Sat Sep 5 09:02:20 2020 +1000 powerpc/tau: Check processor type before enabling TAU interrupt According to Freescale's documentation, MPC74XX processors have an erratum that prevents the TAU interrupt from working, so don't try to use it when running on those processors. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c281611544768e758bd58fe812cf702a5bd2d042.1599260540.git.fthain@telegraphics.com.au commit 420ab2bc7544d978a5d0762ee736412fe9c796ab Author: Finn Thain Date: Sat Sep 5 09:02:20 2020 +1000 powerpc/tau: Remove duplicated set_thresholds() call The commentary at the call site seems to disagree with the code. The conditional prevents calling set_thresholds() via the exception handler, which appears to crash. Perhaps that's because it immediately triggers another TAU exception. Anyway, calling set_thresholds() from TAUupdate() is redundant because tau_timeout() does so. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d7c7ee33232cf72a6a6bbb6ef05838b2e2b113c0.1599260540.git.fthain@telegraphics.com.au commit b1c6a0a10bfaf36ec82fde6f621da72407fa60a1 Author: Finn Thain Date: Sat Sep 5 09:02:20 2020 +1000 powerpc/tau: Convert from timer to workqueue Since commit 19dbdcb8039cf ("smp: Warn on function calls from softirq context") the Thermal Assist Unit driver causes a warning like the following when CONFIG_SMP is enabled. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at kernel/smp.c:428 smp_call_function_many_cond+0xf4/0x38c Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.7.0-pmac #3 NIP: c00b37a8 LR: c00b3abc CTR: c001218c REGS: c0799c60 TRAP: 0700 Not tainted (5.7.0-pmac) MSR: 00029032 CR: 42000224 XER: 00000000 GPR00: c00b3abc c0799d18 c076e300 c079ef5c c0011fec 00000000 00000000 00000000 GPR08: 00000100 00000100 00008000 ffffffff 42000224 00000000 c079d040 c079d044 GPR16: 00000001 00000000 00000004 c0799da0 c079f054 c07a0000 c07a0000 00000000 GPR24: c0011fec 00000000 c079ef5c c079ef5c 00000000 00000000 00000000 00000000 NIP [c00b37a8] smp_call_function_many_cond+0xf4/0x38c LR [c00b3abc] on_each_cpu+0x38/0x68 Call Trace: [c0799d18] [ffffffff] 0xffffffff (unreliable) [c0799d68] [c00b3abc] on_each_cpu+0x38/0x68 [c0799d88] [c0096704] call_timer_fn.isra.26+0x20/0x7c [c0799d98] [c0096b40] run_timer_softirq+0x1d4/0x3fc [c0799df8] [c05b4368] __do_softirq+0x118/0x240 [c0799e58] [c0039c44] irq_exit+0xc4/0xcc [c0799e68] [c000ade8] timer_interrupt+0x1b0/0x230 [c0799ea8] [c0013520] ret_from_except+0x0/0x14 --- interrupt: 901 at arch_cpu_idle+0x24/0x6c LR = arch_cpu_idle+0x24/0x6c [c0799f70] [00000001] 0x1 (unreliable) [c0799f80] [c0060990] do_idle+0xd8/0x17c [c0799fa0] [c0060ba8] cpu_startup_entry+0x24/0x28 [c0799fb0] [c072d220] start_kernel+0x434/0x44c [c0799ff0] [00003860] 0x3860 Instruction dump: 8129f204 2f890000 40beff98 3d20c07a 8929eec4 2f890000 40beff88 0fe00000 81220000 552805de 550802ef 4182ff84 <0fe00000> 3860ffff 7f65db78 7f44d378 ---[ end trace 34a886e47819c2eb ]--- Don't call on_each_cpu() from a timer callback, call it from a worker thread instead. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bb61650bea4f4c91fb8e24b9a6f130a1438651a7.1599260540.git.fthain@telegraphics.com.au commit 66943005cc41f48e4d05614e8f76c0ca1812f0fd Author: Finn Thain Date: Sat Sep 5 09:02:20 2020 +1000 powerpc/tau: Use appropriate temperature sample interval According to the MPC750 Users Manual, the SITV value in Thermal Management Register 3 is 13 bits long. The present code calculates the SITV value as 60 * 500 cycles. This would overflow to give 10 us on a 500 MHz CPU rather than the intended 60 us. (But according to the Microprocessor Datasheet, there is also a factor of 266 that has to be applied to this value on certain parts i.e. speed sort above 266 MHz.) Always use the maximum cycle count, as recommended by the Datasheet. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/896f542e5f0f1d6cf8218524c2b67d79f3d69b3c.1599260540.git.fthain@telegraphics.com.au commit b32d5d7e920a364287f6206af2d20179978a617d Author: Aneesh Kumar K.V Date: Mon Jun 8 12:39:04 2020 +0530 powerpc/mm/book3s: Split radix and hash MAX_PHYSMEM limit MAX_PHYSMEM #define is used along with sparsemem to determine the SECTION_SHIFT value. Powerpc also uses the same value to limit the max memory enabled on the system. With 4K PAGE_SIZE and hash translation mode, we want to limit the max memory enabled to 64TB due to page table size restrictions. However, with radix translation, we don't have these restrictions. Hence split the radix and hash MA_PHYSMEM limit and use different limit for each of them. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200608070904.387440-4-aneesh.kumar@linux.ibm.com commit 7746406baa3bc9e23fdd7b7da2f04d86e25ab837 Author: Aneesh Kumar K.V Date: Mon Jun 8 12:39:03 2020 +0530 powerpc/book3s64/hash/4k: Support large linear mapping range with 4K With commit: 0034d395f89d ("powerpc/mm/hash64: Map all the kernel regions in the same 0xc range"), we now split the 64TB address range into 4 contexts each of 16TB. That implies we can do only 16TB linear mapping. On some systems, eg. Power9, memory attached to nodes > 0 will appear above 16TB in the linear mapping. This resulted in kernel crash when we boot such systems in hash translation mode with 4K PAGE_SIZE. This patch updates the kernel mapping such that we now start supporting upto 61TB of memory with 4K. The kernel mapping now looks like below 4K PAGE_SIZE and hash translation. vmalloc start = 0xc0003d0000000000 IO start = 0xc0003e0000000000 vmemmap start = 0xc0003f0000000000 Our MAX_PHYSMEM_BITS for 4K is still 64TB even though we can only map 61TB. We prevent bolt mapping anything outside 61TB range by checking against H_VMALLOC_START. Fixes: 0034d395f89d ("powerpc/mm/hash64: Map all the kernel regions in the same 0xc range") Reported-by: Cameron Berkenpas Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200608070904.387440-3-aneesh.kumar@linux.ibm.com commit eb553f16973ade990d05946af9ae191394712c8a Author: Aneesh Kumar K.V Date: Mon Jun 8 12:39:02 2020 +0530 powerpc/64/mm: implement page mapping percpu first chunk allocator Implement page mapping percpu first chunk allocator as a fallback to the embedding allocator. With 4K hash translation we limit our page table range to 64TB and commit: 0034d395f89d ("powerpc/mm/hash64: Map all the kernel regions in the same 0xc range") moved all kernel mapping to that 64TB range. In-order to support sparse memory layout we need to increase our linear mapping space and reduce other mappings. With such a layout percpu embedded first chunk allocator will fail because of small vmalloc range. Add a fallback to page mapping percpu first chunk allocator for such failures. The below dmesg output can be observed in such case. percpu: max_distance=0x1ffffef00000 too large for vmalloc space 0x10000000000 PERCPU: auto allocator failed (-22), falling back to page size percpu: 40 4K pages/cpu s148816 r0 d15024 Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200608070904.387440-2-aneesh.kumar@linux.ibm.com commit 2a32abac8860aa1c3a1fc99973ce67179575b36c Author: Aneesh Kumar K.V Date: Mon Jun 8 12:39:01 2020 +0530 powerpc/percpu: Update percpu bootmem allocator This update the ppc64 version to be closer to x86/sparc. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200608070904.387440-1-aneesh.kumar@linux.ibm.com commit ac234524056da4e0c081f682da3ea25cdaab737a Author: Ravi Bangoria Date: Wed Sep 2 09:59:45 2020 +0530 selftests/powerpc: Tests for kernel accessing user memory Introduce tests to cover simple scenarios where user is watching memory which can be accessed by kernel as well. We also support _MODE_EXACT with _SETHWDEBUG interface. Move those testcases outside of _BP_RANGE condition. This will help to test _MODE_EXACT scenarios when CONFIG_HAVE_HW_BREAKPOINT is not set, eg: $ ./ptrace-hwbreak ... PTRACE_SET_DEBUGREG, Kernel Access Userspace, len: 8: Ok PPC_PTRACE_SETHWDEBUG, MODE_EXACT, WO, len: 1: Ok PPC_PTRACE_SETHWDEBUG, MODE_EXACT, RO, len: 1: Ok PPC_PTRACE_SETHWDEBUG, MODE_EXACT, RW, len: 1: Ok PPC_PTRACE_SETHWDEBUG, MODE_EXACT, Kernel Access Userspace, len: 1: Ok success: ptrace-hwbreak Suggested-by: Pedro Miraglia Franco de Carvalho Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200902042945.129369-9-ravi.bangoria@linux.ibm.com commit fa725cc53d353110f39a9e5b9f60d6acb2c7ff49 Author: Ravi Bangoria Date: Wed Sep 2 09:59:44 2020 +0530 powerpc/watchpoint/ptrace: Introduce PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 can be used to determine whether we are running on an ISA 3.1 compliant machine. Which is needed to determine DAR behaviour, 512 byte boundary limit etc. This was requested by Pedro Miraglia Franco de Carvalho for extending watchpoint features in gdb. Note that availability of 2nd DAWR is independent of this flag and should be checked using ppc_debug_info->num_data_bps. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200902042945.129369-8-ravi.bangoria@linux.ibm.com commit 58da5984d2ea6d95f3f9d9e8dd9f7e1b0dddfb3c Author: Ravi Bangoria Date: Wed Sep 2 09:59:43 2020 +0530 powerpc/watchpoint: Add hw_len wherever missing There are couple of places where we set len but not hw_len. For ptrace/perf watchpoints, when CONFIG_HAVE_HW_BREAKPOINT=Y, hw_len will be calculated and set internally while parsing watchpoint. But when CONFIG_HAVE_HW_BREAKPOINT=N, we need to manually set 'hw_len'. Similarly for xmon as well, hw_len needs to be set directly. Fixes: b57aeab811db ("powerpc/watchpoint: Fix length calculation for unaligned target") Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200902042945.129369-7-ravi.bangoria@linux.ibm.com commit 5b905d77987de065bdd3a2906816b5f143df087b Author: Ravi Bangoria Date: Wed Sep 2 09:59:42 2020 +0530 powerpc/watchpoint: Fix exception handling for CONFIG_HAVE_HW_BREAKPOINT=N On powerpc, ptrace watchpoint works in one-shot mode. i.e. kernel disables event every time it fires and user has to re-enable it. Also, in case of ptrace watchpoint, kernel notifies ptrace user before executing instruction. With CONFIG_HAVE_HW_BREAKPOINT=N, kernel is missing to disable ptrace event and thus it's causing infinite loop of exceptions. This is especially harmful when user watches on a data which is also read/written by kernel, eg syscall parameters. In such case, infinite exceptions happens in kernel mode which causes soft-lockup. Fixes: 9422de3e953d ("powerpc: Hardware breakpoints rewrite to handle non DABR breakpoint registers") Reported-by: Pedro Miraglia Franco de Carvalho Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200902042945.129369-6-ravi.bangoria@linux.ibm.com commit edc8dd99b29e4d705c45e2a3a6c01b096ee056db Author: Ravi Bangoria Date: Wed Sep 2 09:59:41 2020 +0530 powerpc/watchpoint: Move DAWR detection logic outside of hw_breakpoint.c Power10 hw has multiple DAWRs but hw doesn't tell which DAWR caused the exception. So we have a sw logic to detect that in hw_breakpoint.c. But hw_breakpoint.c gets compiled only with CONFIG_HAVE_HW_BREAKPOINT=Y. Move DAWR detection logic outside of hw_breakpoint.c so that it can be reused when CONFIG_HAVE_HW_BREAKPOINT is not set. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200902042945.129369-5-ravi.bangoria@linux.ibm.com commit 9b6b7c680cc20971444d9f836e49fc98848bcd0a Author: Ravi Bangoria Date: Wed Sep 2 09:59:40 2020 +0530 powerpc/watchpoint/ptrace: Fix SETHWDEBUG when CONFIG_HAVE_HW_BREAKPOINT=N When kernel is compiled with CONFIG_HAVE_HW_BREAKPOINT=N, user can still create watchpoint using PPC_PTRACE_SETHWDEBUG, with limited functionalities. But, such watchpoints are never firing because of the missing privilege settings. Fix that. It's safe to set HW_BRK_TYPE_PRIV_ALL because we don't really leak any kernel address in signal info. Setting HW_BRK_TYPE_PRIV_ALL will also help to find scenarios when kernel accesses user memory. Reported-by: Pedro Miraglia Franco de Carvalho Suggested-by: Pedro Miraglia Franco de Carvalho Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200902042945.129369-4-ravi.bangoria@linux.ibm.com commit 4441eb02333a9b46a0d919aa7a6d3b137b5f2562 Author: Ravi Bangoria Date: Wed Sep 2 09:59:39 2020 +0530 powerpc/watchpoint: Fix handling of vector instructions Vector load/store instructions are special because they are always aligned. Thus unaligned EA needs to be aligned down before comparing it with watch ranges. Otherwise we might consider valid event as invalid. Fixes: 74c6881019b7 ("powerpc/watchpoint: Prepare handler to handle more than one watchpoint") Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200902042945.129369-3-ravi.bangoria@linux.ibm.com commit 4759c11ed20454b7b36db4ec15f7d5aa1519af4a Author: Ravi Bangoria Date: Wed Sep 2 09:59:38 2020 +0530 powerpc/watchpoint: Fix quadword instruction handling on p10 predecessors On p10 predecessors, watchpoint with quadword access is compared at quadword length. If the watch range is doubleword or less than that in a first half of quadword aligned 16 bytes, and if there is any unaligned quadword access which will access only the 2nd half, the handler should consider it as extraneous and emulate/single-step it before continuing. Fixes: 74c6881019b7 ("powerpc/watchpoint: Prepare handler to handle more than one watchpoint") Reported-by: Pedro Miraglia Franco de Carvalho Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200902042945.129369-2-ravi.bangoria@linux.ibm.com commit da27bd41d0ebcc21bff308236bbf5595ce85b67a Author: Ville Syrjälä Date: Thu Sep 10 00:38:23 2020 +0300 drm/i915: Reduce INTEL_DISPLAY_ENABLED to just removing the outputs Having a mode where the display hardware is present but we try to pretend it isn't just leads to massive headaches when trying to reason what the fallout might be from skipping some random bits of programming. Let's just neuter INTEL_DISPLAY_ENABLED so that we treat the hardware as fully present, except we just don't register any outputs. That's still rather sketchy if the outputs are already enabled when the driver is loaded. I think the simplest solution would be to probe everything as normal and just return disconnected" from all .detect() hooks. That would avoid anything automagically enabling those outputs, but the driver could then shut things down using the normal codepaths. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200909213824.12390-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 36d818f610f218e9e8711bf498b62a27778dae3f Author: Andy Shevchenko Date: Fri Sep 11 20:02:02 2020 +0300 kernel.h: Move oops_in_progress to printk.h The oops_in_progress is defined in printk.c, so it's logical to move oops_in_progress to printk.h. Signed-off-by: Andy Shevchenko Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200911170202.8565-1-andriy.shevchenko@linux.intel.com commit 9fe6bda9823ea90c22ad47436293413d5fd58991 Author: Gerd Hoffmann Date: Tue Sep 8 09:07:23 2020 +0200 drm/virtio: add virtio_gpu_cmd_unref_resource error handling Usually we wait for the host to complete the unref request, then cleanup the guest-side state of the object in the completion callback. When submitting the unref command failed the completion callback will not be called though, so cleanup right away. Fixes a WARN on stale mm entries on driver shutdown. Signed-off-by: Gerd Hoffmann Reviewed-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20200908070723.6394-4-kraxel@redhat.com commit b7170f9457f282783b6f3843e2b30d619449837c Author: Gerd Hoffmann Date: Tue Sep 8 09:07:22 2020 +0200 drm/virtio: return virtio_gpu_queue errors In case queuing virtio commands fails (can happen when the device got unplugged) pass up the error. Signed-off-by: Gerd Hoffmann Reviewed-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20200908070723.6394-3-kraxel@redhat.com commit 35425bafc772ee189e3c3790d7c672b80ba65909 Author: Biwen Li Date: Tue Sep 15 15:32:09 2020 +0800 rtc: pcf2127: fix a bug when not specify interrupts property Fix a bug when not specify interrupts property in dts as follows, rtc-pcf2127-i2c 1-0051: failed to request alarm irq rtc-pcf2127-i2c: probe of 1-0051 failed with error -22 Signed-off-by: Biwen Li Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200915073213.12779-1-biwen.li@oss.nxp.com commit 48bfd5c6fac10e10b7066bf4aeb919ed9a4e87d3 Author: Johannes Thumshirn Date: Fri Sep 11 17:56:51 2020 +0900 zonefs: document the explicit-open mount option Document the newly introduced explicit-open mount option. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Signed-off-by: Damien Le Moal commit b5c00e975779c3d9e6d530c5481309257d5e4220 Author: Johannes Thumshirn Date: Fri Sep 11 17:56:50 2020 +0900 zonefs: open/close zone on file open/close NVMe Zoned Namespace introduced the concept of active zones, which are zones in the implicit open, explicit open or closed condition. Drives may have a limit on the number of zones that can be simultaneously active. This potential limitation translate into a risk for applications to see write IO errors due to this limit if the zone of a file being written to is not already active when a write request is issued. To avoid these potential errors, the zone of a file can explicitly be made active using an open zone command when the file is open for the first time. If the zone open command succeeds, the application is then guaranteed that write requests can be processed. This indirect management of active zones relies on the maximum number of open zones of a drive, which is always lower or equal to the maximum number of active zones. On the first open of a sequential zone file, send a REQ_OP_ZONE_OPEN command to the block device. Conversely, on the last release of a zone file and send a REQ_OP_ZONE_CLOSE to the device if the zone is not full or empty. As truncating a zone file to 0 or max can deactivate a zone as well, we need to serialize against truncates and also be careful not to close a zone as the file may still be open for writing, e.g. the user called ftruncate(). If the zone file is not open and a process does a truncate(), then no close operation is needed. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Signed-off-by: Damien Le Moal commit 48d546a8dad4c09745d464e12b95f21c773bff39 Author: Johannes Thumshirn Date: Fri Sep 11 17:56:49 2020 +0900 zonefs: provide no-lock zonefs_io_error variant Subsequent patches need to call zonefs_io_error() with the i_truncate_mutex already held, so factor out the body of zonefs_io_error() into __zonefs_io_error() which can be called from with the i_truncate_mutex held. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Signed-off-by: Damien Le Moal commit 5498d5f93210ab4c55cd191473c8f4a59cc68e8e Author: Johannes Thumshirn Date: Fri Sep 11 17:56:48 2020 +0900 zonefs: introduce helper for zone management Introduce a helper function for sending zone management commands to the block device. As zone management commands can change a zone write pointer position reflected in the size of the zone file, this function expects the truncate mutex to be held. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Signed-off-by: Damien Le Moal commit 9f8010e71f091b0609452742cfed4650ee633c44 Author: Thomas Bogendoerfer Date: Thu Sep 10 10:41:24 2020 +0200 rtc: ds1685: Fix bank switching to avoid endless loop ds1685_rtc_begin_data_access() tried to access an extended register before enabling access to it by switching to bank 1. Depending on content in NVRAM this could lead to an endless loop. While at it fix also switch back to bank 0 in ds1685_rtc_end_data_access(). Signed-off-by: Thomas Bogendoerfer Signed-off-by: Alexandre Belloni Acked-by: Joshua Kinard Link: https://lore.kernel.org/r/20200910084124.138560-1-tsbogend@alpha.franken.de commit d0a3b65052f041852c855ea1135659770ba0bc09 Author: Rikard Falkeborn Date: Sun Sep 13 14:26:44 2020 +0200 rtc: st-lpc: Constify st_rtc_ops The only usage of st_rtc_ops is to assign its address to the ops field in the rtc_device struct. which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200913122644.35515-1-rikard.falkeborn@gmail.com commit 2fc1af3095af5cbcd8fc406610dc196b62e3ed21 Author: Bartosz Golaszewski Date: Mon Sep 14 17:46:01 2020 +0200 rtc: rx8010: use range checking provided by core RTC code We don't need to check the time range manually in set_time(), we can use range_min and range_max exposed by struct rtc_device. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-15-brgl@bgdev.pl commit 9868bc1ce272dc0387488e779c585e7a12cf7a1b Author: Bartosz Golaszewski Date: Mon Sep 14 17:46:00 2020 +0200 rtc: rx8010: convert to using regmap This driver requires SMBUS to work. We can relax this requirement if we switch to using i2c regmap and let the regmap sub-system figure out how to talk to the bus. This also has the advantage of shrinking the code for register updates. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-14-brgl@bgdev.pl commit cee015d90d96495d8376871af0f1a33027303d5e Author: Bartosz Golaszewski Date: Mon Sep 14 17:45:59 2020 +0200 rtc: rx8010: switch to using the preferred i2c API We should generally use probe_new instead of probe when registering i2c drivers. Convert rx8010 to using it. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-13-brgl@bgdev.pl commit 0ce627785afa730d8f6568eb8738d1700cbc4569 Author: Bartosz Golaszewski Date: Mon Sep 14 17:45:58 2020 +0200 rtc: rx8010: switch to using the preferred RTC API Use devm_rtc_allocate_device() + rtc_register_device() instead of the deprecated devm_rtc_device_register(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-12-brgl@bgdev.pl commit 666f21413b881e159efaf862f119d4d058fa2c4a Author: Bartosz Golaszewski Date: Mon Sep 14 17:45:57 2020 +0200 rtc: rx8010: prefer sizeof(*val) over sizeof(struct type_of_val) Using the size of the variable is preferred over using the size of its type when allocating memory. Convert the call to devm_kzalloc() in probe(). Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-11-brgl@bgdev.pl commit 955a123c14906e3adc43d43281f8fde91f631f7f Author: Bartosz Golaszewski Date: Mon Sep 14 17:45:56 2020 +0200 rtc: rx8010: use a helper variable for client->dev in probe() Simple 'dev' looks better then repeated &client->dev and has the added benefit of avoiding unnecessary line breaks. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-10-brgl@bgdev.pl commit b3ff7fd68d925de2159a5312f28dcd178d0d3715 Author: Bartosz Golaszewski Date: Mon Sep 14 17:45:55 2020 +0200 rtc: rx8010: drop unnecessary initialization The 'err' local variable in rx8010_init_client() doesn't need to be initialized. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-9-brgl@bgdev.pl commit f702699c67d315e4a232c64801b2de9af87fd9f4 Author: Bartosz Golaszewski Date: Mon Sep 14 17:45:54 2020 +0200 rtc: rx8010: don't use magic values for time buffer length The time buffer len is used directly in this driver. For readability it's better to define it as the difference between the date register offsets and use sizeof() whenever referencing it. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-8-brgl@bgdev.pl commit 13952c9e35384fd7f63a5ce8261108695491bb56 Author: Bartosz Golaszewski Date: Mon Sep 14 17:45:53 2020 +0200 rtc: rx8010: rename ret to err in rx8010_set_time() All other functions in this driver use 'err' for integer return values. Do the same in rx8010_set_time() for consistency. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-7-brgl@bgdev.pl commit e9e4c2dae4313b88c62ee9df9d177a71c23121b2 Author: Bartosz Golaszewski Date: Mon Sep 14 17:45:52 2020 +0200 rtc: rx8010: use tabs instead of spaces for code formatting The define values in this driver are close to their names and they are separated by spaces. Use tabs instead and align all defines. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-6-brgl@bgdev.pl commit 75677971991940581e76bcd5176ea40d0baf8fcd Author: Bartosz Golaszewski Date: Mon Sep 14 17:45:51 2020 +0200 rtc: rx8010: consolidate local variables of the same type Move local variables of the same type into a single line for better readability. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-5-brgl@bgdev.pl commit 28c86f30c979f9d4460dd7680610c3470b4d009b Author: Bartosz Golaszewski Date: Mon Sep 14 17:45:50 2020 +0200 rtc: rx8010: remove unnecessary brackets Remove brackets wherever they guard a single line. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-4-brgl@bgdev.pl commit 2e0ce569102ccb1ca9bacc499c8411fb8fa53069 Author: Bartosz Golaszewski Date: Mon Sep 14 17:45:49 2020 +0200 rtc: rx8010: remove a stray newline Remove an unnecessary newline after requesting the interrupt. Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200914154601.32245-3-brgl@bgdev.pl commit d3b14296da69adb7825022f3224ac6137eb30abf Author: Bartosz Golaszewski Date: Mon Sep 14 17:45:48 2020 +0200 rtc: rx8010: don't modify the global rtc ops The way the driver is implemented is buggy for the (admittedly unlikely) use case where there are two RTCs with one having an interrupt configured and the second not. This is caused by the fact that we use a global rtc_class_ops struct which we modify depending on whether the irq number is present or not. Fix it by using two const ops structs with and without alarm operations. While at it: not being able to request a configured interrupt is an error so don't ignore it and bail out of probe(). Fixes: ed13d89b08e3 ("rtc: Add Epson RX8010SJ RTC driver") Signed-off-by: Bartosz Golaszewski Signed-off-by: Alexandre Belloni Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200914154601.32245-2-brgl@bgdev.pl commit c52d270c68a02f94c5c081b7fc57119058e4670a Author: Krzysztof Kozlowski Date: Sun Aug 30 10:09:37 2020 +0200 rtc: s3c: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200830080937.14367-1-krzk@kernel.org commit 670c898cee31abb40bf31ca678a92aef3a8e685a Author: Qinglang Miao Date: Mon Sep 14 14:13:24 2020 +0800 mtd: spear_smi: use for_each_child_of_node() macro Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200914061324.3230-1-miaoqinglang@huawei.com commit dc0592b73715c8e84ad8ebbc50c6057d5e203aac Author: Smita Koralahalli Date: Thu Sep 3 18:45:31 2020 -0500 x86/mce/dev-mcelog: Do not update kflags on AMD systems The mcelog utility is not commonly used on AMD systems. Therefore, errors logged only by the dev_mce_log() notifier will be missed. This may occur if the EDAC modules are not loaded, in which case it's preferable to print the error record by the default notifier. However, the mce->kflags set by dev_mce_log() notifier makes the default notifier skip over the errors assuming they are processed by dev_mce_log(). Do not update kflags in the dev_mce_log() notifier on AMD systems. Signed-off-by: Smita Koralahalli Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200903234531.162484-3-Smita.KoralahalliChannabasappa@amd.com commit 540d9757cea8274a44d69cbadcff5b8c381bae8d Author: Geert Uytterhoeven Date: Wed Sep 9 15:15:34 2020 +0200 pinctrl: renesas: Reintroduce SH_PFC for common sh-pfc code Most, but not all, Renesas pin control drivers use the "sh-pfc" pin control framework. As of commit 8449bfa9e6a9f7ec ("pinctrl: sh-pfc: Collect Renesas related CONFIGs in one place"), the code for this framework is always built when Renesas SoC pin control support is enabled, regardless of whether the enabled pin control drivers need it or not. Fix this by reintroducing the CONFIG_SH_PFC symbol to control inclusion of the "sh-pfc" framework and its dependencies, and selecting it when needed. This reduces kernel size of a typical RZ/A1 or RZ/A2 kernel by more than 6 resp. 11 KiB. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200909131534.12897-4-geert+renesas@glider.be commit 077365a941166f3a7f5894017f9d26d17cdec00e Author: Geert Uytterhoeven Date: Wed Sep 9 15:15:33 2020 +0200 pinctrl: Rename sh-pfc to renesas The drivers/pinctrl/sh-pfc subdirectory was originally created to group pin control drivers for various Renesas SuperH and SH-Mobile platforms. However, the name "sh-pfc" no longer reflects its contents, as the directory now contains pin control drivers for Renesas SuperH, ARM32, and ARM64 SoCs. Hence rename the subdirectory from drivers/pinctrl/sh-pfc to drivers/pinctrl/renesas, and the related Kconfig symbol from PINCTRL_SH_PFC to PINCTRL_RENESAS. Rename the git branch in MAINTAINERS, too, for consistency. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200909131534.12897-3-geert+renesas@glider.be commit 1308fb4e4eae14e6189dece3b7cf5b5f453c5d02 Author: Geert Uytterhoeven Date: Wed Sep 9 15:15:32 2020 +0200 pinctrl: rzn1: Do not select GENERIC_PIN{CTRL_GROUPS,MUX_FUNCTIONS} The RZ/N1 pin control driver does not use pin groups or pin functions, so there is no need to select GENERIC_PINCTRL_GROUPS or GENERIC_PINMUX_FUNCTIONS. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200909131534.12897-2-geert+renesas@glider.be commit 1ada85b6201dfaf0c5b40ceaa31789d8605b086f Author: Fabrizio Castro Date: Fri Sep 11 13:12:59 2020 +0100 arm64: dts: renesas: r8a77990: Add DRIF support Add the DRIF controller nodes for the r8a77990 (a.k.a. R-Car E3). Please note that R-Car E3 has register BITCTR located at offset 0x80 (this register is not available on the r8a77960 and r8a77951, whose support has already been upstreamed), and even though it is not dealt with just yet within the driver, we have to keep that into account with our device tree nodes. Also, please note that while testing it has emerged that the HW User Manual has the wrong DMA details for DRIF2 and DRIF3 on E3, as they are only allowed SYS-DMAC0 rather than SYS-DMAC1 and SYS-DMAC2. An errata addressing this issue will be available soon. Signed-off-by: Fabrizio Castro Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200911121259.5669-1-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven commit 9d8827b27b758ecb4fda3da812c77c316b3a5548 Author: Lad Prabhakar Date: Fri Sep 11 09:36:15 2020 +0100 ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add can0 support to camera DB This patch enables CAN0 interface exposed through connector J4 on the camera DB. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200911083615.17377-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a937909702e00d98eac5b91b31a7f2ae112f47bf Author: Lad Prabhakar Date: Fri Sep 11 09:09:29 2020 +0100 ARM: dts: r8a7742: Add VSP support Add VSP support to R8A7742 (RZ/G1H) SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200911080929.15058-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c3d91c82c21f7443c828248819593866a6b8becc Author: Geert Uytterhoeven Date: Wed Aug 19 14:39:10 2020 +0200 arm64: dts: renesas: Drop superfluous pin configuration containers As the pin configuration child nodes for EtherAVB on the Draak and Ebisu boards contain only a single configuration, there is no need to wrap them in additional grandchild containers. Hence remove the superfluous level. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819123910.19606-1-geert+renesas@glider.be commit d6005d3dde75f7e4f21822c12446553dd7a69bb2 Author: Gerd Hoffmann Date: Tue Sep 8 09:07:21 2020 +0200 drm/virtio: use drmm_mode_config_init Use managed init call to simplify cleanup. Signed-off-by: Gerd Hoffmann Reviewed-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20200908070723.6394-2-kraxel@redhat.com commit 5f76771a4a4514277f4618ba2fe20cb1d9ed5afd Author: Geert Uytterhoeven Date: Fri Aug 21 13:20:59 2020 +0200 dt-bindings: pinctrl: rzn1: Convert to json-schema Convert the Renesas RZ/N1 Pin controller Device Tree binding documentation to json-schema. Use "pinctrl" generic node name. Drop generic and consumer examples, as they do not belong here. Signed-off-by: Geert Uytterhoeven Tested-by: Gareth Williams Reviewed-by: Gareth Williams Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200821112059.5133-1-geert+renesas@glider.be commit 5398b2fa464722a3bb3cf4c264a19ac765974d98 Author: Geert Uytterhoeven Date: Fri Aug 21 13:19:56 2020 +0200 dt-bindings: pinctrl: rza1: Convert to json-schema Convert the Renesas RZ/A1 combined Pin and GPIO controller Device Tree binding documentation to json-schema. Rename "rza1-pinctrl" to "rza1-ports", to match the compatible value scheme. Use "pinctrl" generic node name. Drop generic and consumer examples, as they do not belong here. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200821111956.4989-1-geert+renesas@glider.be commit d4691b7f6231a022f20028ea27b6c49466b2acd6 Author: Geert Uytterhoeven Date: Fri Aug 21 13:11:27 2020 +0200 dt-bindings: pinctrl: renesas,rza2-pinctrl: Fix pin controller node name According to Devicetree Specification v0.2 and later, Section "Generic Names Recommendation", the node name for a pin controller device node should be "pinctrl". Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200821111127.3771-1-geert+renesas@glider.be commit a4eb6afa7c2c3795ec693cd806fd69593c9ecca7 Author: Geert Uytterhoeven Date: Fri Aug 21 13:14:01 2020 +0200 pinctrl: rza1: Switch to using "output-enable" For pins requiring software driven IO output operations, the RZ/A1 Pin Controller uses either the "output-high" or "output-low" DT property to enable the corresponding output buffer. The actual line value doesn't matter, as it is ignored. Commit 425562429d4f3b13 ("pinctrl: generic: Add output-enable property") introduced a new DT property for this specific use case. Update the RZ/A1 Pin Controller DT bindings and driver to use this new property instead. Preserve backwards compatibility with old DTBs in the driver, as this comes at a very small cost. Notes: - The DT binding examples already used the new property, - There are no upstream users of the old properties. Signed-off-by: Geert Uytterhoeven Reviewed-by: Chris Brandt Acked-by: Jacopo Mondi Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200821111401.4021-1-geert+renesas@glider.be commit d89a08f52b0dd30d8e13c91886788cd42333dba7 Author: Kuninori Morimoto Date: Mon Aug 24 14:49:56 2020 +0900 pinctrl: sh-pfc: Tidy up driver description title Sort each driver by description title in alphabetical order. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h7ssy4qy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 16261dcd7cd17409b3f1235b0b89a805338eac28 Author: Kuninori Morimoto Date: Mon Aug 24 14:49:52 2020 +0900 pinctrl: sh-pfc: Align driver description title Now, Renesas Pin Control drivers are under menu, but current descriptions are not aligned. This patch aligns them. - RZ/A2 gpio and pinctrl driver - RZ/N1 pinctrl driver - Emma Mobile EV2 pin control support - R-Mobile APE6 pin control support - R-Mobile A1 pin control support - RZ/G1H pin control support - RZ/G1M pin control support + pin control support for RZ/A2 + pin control support for RZ/N1 + pin control support for Emma Mobile EV2 + pin control support for R-Mobile APE6 + pin control support for R-Mobile A1 + pin control support for RZ/G1H + pin control support for RZ/G1M Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87imd8y4r2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit af028ecd546a71b4d3937b63e1b39707ef9c3b17 Author: Kuninori Morimoto Date: Mon Aug 24 14:49:48 2020 +0900 pinctrl: sh-pfc: Collect Renesas related CONFIGs in one place Renesas related pinctrl CONFIGs are located in many places, which is confusing. This patch collects them into the same place, grouped in a new "Renesas pinctrl drivers" menu. This patch also moves pinctrl-rz{a1,a2,n1}.c into the sh-pfc folder. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0xoy4r7.wl-kuninori.morimoto.gx@renesas.com [geert: Update path in MAINTAINERS] Signed-off-by: Geert Uytterhoeven commit aa5b0f7e0f7e8a05c5bd9bfab33d98699735762f Author: Kuninori Morimoto Date: Mon Aug 24 14:49:40 2020 +0900 pinctrl: sh-pfc: Tidy up Emma Mobile EV2 It is "Emma Mobile EV2" not "AV2". This patch tidies it up. Reported-by: Geert Uytterhoeven Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lfi4y4re.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 7b9ec811752c17c4c6e70d296ef8aa205a7acacd Author: Geert Uytterhoeven Date: Fri Aug 21 13:22:08 2020 +0200 dt-bindings: pinctrl: sh-pfc: Convert to json-schema Convert the Renesas Pin Function Controller (PFC) Device Tree binding documentation to json-schema. Document missing properties. Drop deprecated and obsolete #gpio-range-cells property. Update the example to match reality. Drop consumer examples, as they do not belong here. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20200821112208.5295-1-geert+renesas@glider.be commit b1a367bb1cbba607d6c5d7dcf828b049241ee9a6 Author: Stephen Boyd Date: Tue Sep 15 09:10:21 2020 +0300 interconnect: qcom: osm-l3: Mark more structures const These structures aren't modified at runtime. Mark them const so they get moved to read-only memory. We have to cast away const in one place when we store into the data member of struct icc_node. This is paired with a re-const of the data member when it is extracted in qcom_icc_set(). Signed-off-by: Stephen Boyd Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20200914182112.513981-1-swboyd@chromium.org Signed-off-by: Georgi Djakov commit bfd5d21abcd5c7941ad79b594f5f42e27496eb28 Author: Stephan Gerhold Date: Mon Jul 20 10:54:06 2020 +0200 arm64: dts: qcom: msm8916: Move common USB properties to msm8916.dtsi Right now we define "hnp-disable", "srp-disable", "adp-disable" separately for every MSM8916 board that has USB working. They are needed for USB to work properly if CONFIG_USB_OTG_FSM is enabled. This is because the chipidea OTG FSM code waits for interrupts regarding the VBUS state (AVVIS). Those never happen on MSM8916 because VBUS is always connected to the PMIC instead of the USB controller. There was a patch [1] to work around this but ultimately it was decided that it's easier to disable the OTG FSM altogether using these properties. This works fine for most use cases, because the OTG FSM isn't needed for simple dual role host/gadget operation. Given that these properties are needed for every MSM8916 device, move them to msm8916.dtsi so we can avoid some more duplication. [1]: https://lore.kernel.org/lkml/20160707222114.1673-10-stephen.boyd@linaro.org/ Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200720085406.6716-11-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit b0d330c29ef3c55a712da5d0eb37de2b107b324b Author: Stephan Gerhold Date: Mon Jul 20 10:54:05 2020 +0200 arm64: dts: qcom: msm8916: Set default pinctrl for blsp1_uart1/2 Right now some device nodes set default pinctrl within msm8916.dtsi (e.g. I2C, SPI), but for others it needs to be explicitly set in the board-specific device tree (e.g. UART). While it is theoretically possible that some super special board needs different pinctrl for these, in practice pretty much every board ends up using the common pinctrl definitions. Make this consistent by also defining the common pinctrl properties for blsp1_uart1 and blsp1_uart2 so we don't need to copy this for every board. If there is really such a super special board it could just override these properties with custom pinctrl or make minor modifications to the common pinctrl configurations provided by msm8916-pins.dtsi. Also move #address-cells/#size-cells for &dsi0 to msm8916.dtsi since this is specific to the DSI node, not the board. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200720085406.6716-10-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit cc99dd61b7f8e05cbccad4b231f347bd363d8985 Author: Stephan Gerhold Date: Mon Jul 20 10:54:04 2020 +0200 arm64: dts: qcom: msm8916: Move more supplies to msm8916-pm8916.dtsi So far we had some supplies defined for all boards in msm8916.dtsi, while others were duplicated into every board-specific device tree. Now that we have msm8916-pm8916.dtsi as a common include for all standard MSM8916 devices using PM8916, move the remaining common supplies to msm8916-pm8916.dtsi to reduce duplication a bit. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200720085406.6716-9-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit bfe9d754257cdf026ecf7ccac7180e79b5714303 Author: Stephan Gerhold Date: Mon Jul 20 10:54:03 2020 +0200 arm64: dts: qcom: msm8916: Move PM8916-specific parts to msm8916-pm8916.dtsi Device trees for newer SoCs avoid defining the regulator nodes directly in the SoC device tree (here: msm8916.dtsi). The reason for this is that theoretically it is possible to combine the SoC with a different PMIC, or to use all the regulators in a board-specific way. Therefore let's remove those from the SoC include (msm8916.dtsi). In practice, pretty much all MSM8916 boards were combined with PM8916, and use the regulators in similar ways. After looking at many different MSM8916 boards (mostly smartphones and tablets), I haven't seen a single device that isn't using the same regulators for components integrated into the SoC. If all boards end up defining all regulators and supplies in the same way then it is useful to have an include for that, so we can avoid duplicating it everywhere. If there is really a super special board that does it differently it could just override some properties or avoid using the include altogether. This patch moves the regulator and common supply definitions to a new include called "msm8916-pm8916.dtsi". This is also going to be useful when introducing CPR (Core Power Reduction) later because we can configure the CPU regulator (pm8916_spmi_s2) for all devices in this common include. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200720085406.6716-8-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 4eb7b63d4fbb4efa3d033ac3f3f7bef29c596f1b Author: Stephan Gerhold Date: Mon Jul 20 10:54:02 2020 +0200 arm64: dts: qcom: pm8916: Add resin node Right now we define the entire pm8916 resin node separately in the board-specific device tree part, including the interrupt that belongs to PM8916. As a feature of the PMIC it should be declared in pm8916.dtsi, disabled by default. Like all other optional components it can then by enabled and configured in the board-specific device tree part. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200720085406.6716-7-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit e2f6482aff1a362f2246091f8227e8b7d9485005 Author: Stephan Gerhold Date: Mon Jul 20 10:54:01 2020 +0200 arm64: dts: qcom: msm8916: Use labels in board device trees Device trees for newer SoCs avoid replicating the entire device hierarchy in the board-specific device tree part. Instead, they set additional properties only by referencing labels, sorted alphabetically. Now that we have labels for all relevant nodes, convert the MSM8916 board device trees to use the same style and remove the "soc" node entirely. Note: There is a large block of coresight nodes in apq8016-sbc.dtsi, which are enabled by setting status = "okay". I kept them grouped together (not alphabetically sorted with everything else), since that would be just unnecessarily verbose and hard to see. This commit only moves all existing properties to nodes that reference the respective label. The resulting binary DTBs are exactly the same. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200720085406.6716-6-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 2329e5fb54d76fc28a952678e426eb7d3888631c Author: Stephan Gerhold Date: Mon Jul 20 10:54:00 2020 +0200 arm64: dts: qcom: msm8916: Add more labels Add a few more labels to device nodes declared in msm8916.dtsi so that we can set all needed properties using labels in the board-specific device tree part. Also rename the "otg" label to "usb" to allow grouping it with the USB PHY (usb_hs_phy) node when ordering referenced labels alphabetically. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200720085406.6716-5-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 48faf07941a5099fab7b37ee3cf0e54c6cf4a1de Author: Stephan Gerhold Date: Mon Jul 20 10:53:59 2020 +0200 arm64: dts: qcom: apq8016-sbc: Define leds outside of soc node The leds node does not use any memory regions of the SoC and should therefore be declared outside the "soc" node. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200720085406.6716-4-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 974dc2f3959dba54663f0972a8683e28a2f39e24 Author: Stephan Gerhold Date: Mon Jul 20 10:53:58 2020 +0200 arm64: dts: qcom: msm8916: Declare sound node in msm8916.dtsi The "sound" node in apq8016-sbc.dtsi references memory regions provided by the SoC and should be therefore declared in msm8916.dtsi. Additionally, the machine driver used for the "qcom,apq8016-sbc-sndcard" compatible also works on other MSM8916 devices (provided that audio routing is set up properly). It is not really specific to apq8016-sbc. Simplify setting up sound on other boards by moving the common part to msm8916.dtsi. This also allows referencing the node by the label, so that we can eventually drop the "soc" node entirely from the board-specific device tree part and use labels exclusively. Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200720085406.6716-3-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 4134b8ef08329f5994797f7aaa20d54d69016adb Author: Stephan Gerhold Date: Mon Jul 20 10:53:57 2020 +0200 arm64: dts: qcom: apq8016-sbc: Remove properties that are already default apq8016-sbc.dtsi overrides several properties that are already the default in msm8916.dtsi. Remove these to simplify the device tree a bit. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200720085406.6716-2-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 08a9ae2d255eca73a9ae7ebf2d24f1e206eb3b14 Author: Dmitry Baryshkov Date: Wed Sep 9 13:32:37 2020 +0300 arch64: dts: qcom: sm8250: add uart nodes Currently sm8250.dtsi only defines default debug uart. Port rest uart nodes from the downstream dtsi file. Acked-by: Manivannan Sadhasivam Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200909103238.149761-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 4e3dda0bc603c1ca84680a56bfc49e8fe2519c89 Author: Chris Lew Date: Wed Jun 24 22:15:21 2020 +0530 rpmsg: glink: Expose rpmsg name attr for glink Expose the name field as an attr so clients listening to uevents for rpmsg can identify the edge the events correspond to. Signed-off-by: Chris Lew Signed-off-by: Arun Kumar Neelakantam Signed-off-by: Deepak Kumar Singh Link: https://lore.kernel.org/r/1593017121-7953-5-git-send-email-deesin@codeaurora.org Signed-off-by: Bjorn Andersson commit 0f579e52472198cec2d3d794a26e277c84e9dbd2 Author: Deepak Kumar Singh Date: Wed Jun 24 22:15:20 2020 +0530 rpmsg: glink: Add support for rpmsg glink chrdev RPMSG provides a char device interface to userspace. Probe the rpmsg chrdev channel to enable the rpmsg_ctrl device creation on glink transports. Signed-off-by: Chris Lew Signed-off-by: Arun Kumar Neelakantam Signed-off-by: Deepak Kumar Singh Link: https://lore.kernel.org/r/1593017121-7953-4-git-send-email-deesin@codeaurora.org Signed-off-by: Bjorn Andersson commit d5158cda9e7b66fd412815df32e58943b7383f0c Author: Chris Lew Date: Wed Jun 24 22:15:19 2020 +0530 rpmsg: Guard against null endpoint ops in destroy In RPMSG GLINK the chrdev device will allocate an ept as part of the rpdev creation. This device will not register endpoint ops even though it has an allocated ept. Protect against the case where the device is being destroyed. Signed-off-by: Chris Lew Signed-off-by: Arun Kumar Neelakantam Signed-off-by: Deepak Kumar Singh Link: https://lore.kernel.org/r/1593017121-7953-3-git-send-email-deesin@codeaurora.org Signed-off-by: Bjorn Andersson commit 4fcdaf6e28d11e2f3820d54dd23cd12a47ddd44e Author: Chris Lew Date: Wed Jun 24 22:15:18 2020 +0530 rpmsg: glink: Use complete_all for open states The open_req and open_ack completion variables are the state variables to represet a remote channel as open. Use complete_all so there are no races with waiters and using completion_done. Signed-off-by: Chris Lew Signed-off-by: Arun Kumar Neelakantam Signed-off-by: Deepak Kumar Singh Link: https://lore.kernel.org/r/1593017121-7953-2-git-send-email-deesin@codeaurora.org Signed-off-by: Bjorn Andersson commit 6c09ea0b0aefda20d49e8d771f77a3e92f46b7d2 Author: Arnaud Pouliquen Date: Fri Jul 31 09:48:50 2020 +0200 rpmsg: virtio: fix compilation warning for virtio_rpmsg_channel description Complete the virtio_rpmsg_channel structure description to fix a compilation warning with W=1 option: drivers/rpmsg/virtio_rpmsg_bus.c:95: warning: Cannot understand * @vrp: the remote processor this channel belongs to Reviewed-by: Mathieu Poirier Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200731074850.3262-1-arnaud.pouliquen@st.com Signed-off-by: Bjorn Andersson commit cb2d8d5b196c2e96e29343383c8c8d8db68b934e Author: Mathieu Poirier Date: Mon Aug 31 15:37:58 2020 -0600 remoteproc: stm32: Fix pointer assignement Fix the assignment of the @state pointer - it is obviously wrong. Acked-by: Arnaud Pouliquen Fixes: 376ffdc04456 ("remoteproc: stm32: Properly set co-processor state when attaching") Reported-by: kernel test robot Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200831213758.206690-1-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 231331b2dbd71487159a0400d9ffd967eb0d0e08 Author: Nicolas Boichat Date: Thu Sep 3 08:05:58 2020 +0800 rpmsg: Avoid double-free in mtk_rpmsg_register_device If rpmsg_register_device fails, it will call mtk_rpmsg_release_device which already frees mdev. Fixes: 7017996951fd ("rpmsg: add rpmsg support for mt8183 SCP.") Signed-off-by: Nicolas Boichat Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200903080547.v3.1.I56cf27cd59f4013bd074dc622c8b8248b034a4cc@changeid Signed-off-by: Bjorn Andersson commit e69ee0cf655e8e0c4a80f4319e36019b74f17639 Author: Dan Carpenter Date: Tue Sep 8 10:18:41 2020 +0300 rpmsg: smd: Fix a kobj leak in in qcom_smd_parse_edge() We need to call of_node_put(node) on the error paths for this function. Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200908071841.GA294938@mwanda Signed-off-by: Bjorn Andersson commit 9a4e66802e417d23f5e4a3397bab8b9284972d1d Author: Alexandre Courbot Date: Tue Sep 15 10:29:11 2020 +0900 remoteproc: scp: add COMPILE_TEST dependency This will improve this driver's build coverage. Reported-by: Ezequiel Garcia Signed-off-by: Alexandre Courbot Link: https://lore.kernel.org/r/20200915012911.489820-1-acourbot@chromium.org Signed-off-by: Bjorn Andersson commit d317b0a8acfc4b126858e4cdadb03338d22f8ce0 Author: Yonghong Song Date: Mon Sep 14 15:32:10 2020 -0700 libbpf: Fix a compilation error with xsk.c for ubuntu 16.04 When syncing latest libbpf repo to bcc, ubuntu 16.04 (4.4.0 LTS kernel) failed compilation for xsk.c: In file included from /tmp/debuild.0jkauG/bcc/src/cc/libbpf/src/xsk.c:23:0: /tmp/debuild.0jkauG/bcc/src/cc/libbpf/src/xsk.c: In function ‘xsk_get_ctx’: /tmp/debuild.0jkauG/bcc/src/cc/libbpf/include/linux/list.h:81:9: warning: implicit declaration of function ‘container_of’ [-Wimplicit-function-declaration] container_of(ptr, type, member) ^ /tmp/debuild.0jkauG/bcc/src/cc/libbpf/include/linux/list.h:83:9: note: in expansion of macro ‘list_entry’ list_entry((ptr)->next, type, member) ... src/cc/CMakeFiles/bpf-static.dir/build.make:209: recipe for target 'src/cc/CMakeFiles/bpf-static.dir/libbpf/src/xsk.c.o' failed Commit 2f6324a3937f ("libbpf: Support shared umems between queues and devices") added include file , which uses macro "container_of". xsk.c file also includes before . In a more recent distro kernel, includes which contains the macro definition for "container_of". So compilation is all fine. But in ubuntu 16.04 kernel, does not contain which caused the above compilation error. Let explicitly add in xsk.c to avoid compilation error in old distro's. Fixes: 2f6324a3937f ("libbpf: Support shared umems between queues and devices") Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200914223210.1831262-1-yhs@fb.com commit 63bea244fee23f31a4379769ef09e30365bb74b7 Author: Yonghong Song Date: Mon Sep 14 11:31:10 2020 -0700 bpftool: Fix build failure When building bpf selftests like make -C tools/testing/selftests/bpf -j20 I hit the following errors: ... GEN /net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-gen.8 :75: (WARNING/2) Block quote ends without a blank line; unexpected unindent. :71: (WARNING/2) Literal block ends without a blank line; unexpected unindent. :85: (WARNING/2) Literal block ends without a blank line; unexpected unindent. :57: (WARNING/2) Block quote ends without a blank line; unexpected unindent. :66: (WARNING/2) Literal block ends without a blank line; unexpected unindent. :109: (WARNING/2) Literal block ends without a blank line; unexpected unindent. :175: (WARNING/2) Literal block ends without a blank line; unexpected unindent. :273: (WARNING/2) Literal block ends without a blank line; unexpected unindent. make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-perf.8] Error 12 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-iter.8] Error 12 make[1]: *** [/net-next/tools/testing/selftests/bpf/tools/build/bpftool/Documentation/bpftool-struct_ops.8] Error 12 ... I am using: -bash-4.4$ rst2man --version rst2man (Docutils 0.11 [repository], Python 2.7.5, on linux2) -bash-4.4$ The Makefile generated final .rst file (e.g., bpftool-cgroup.rst) looks like ... ID AttachType AttachFlags Name \n SEE ALSO\n========\n\t**bpf**\ (2),\n\t**bpf-helpers**\ (7),\n\t**bpftool**\ (8),\n\t**bpftool-btf**\ (8),\n\t**bpftool-feature**\ (8),\n\t**bpftool-gen**\ (8),\n\t**bpftool-iter**\ (8),\n\t**bpftool-link**\ (8),\n\t**bpftool-map**\ (8),\n\t**bpftool-net**\ (8),\n\t**bpftool-perf**\ (8),\n\t**bpftool-prog**\ (8),\n\t**bpftool-struct_ops**\ (8)\n The rst2man generated .8 file looks like Literal block ends without a blank line; unexpected unindent. .sp n SEEALSOn========nt**bpf**(2),nt**bpf\-helpers**(7),nt**bpftool**(8),nt**bpftool\-btf**(8),nt** bpftool\-feature**(8),nt**bpftool\-gen**(8),nt**bpftool\-iter**(8),nt**bpftool\-link**(8),nt** bpftool\-map**(8),nt**bpftool\-net**(8),nt**bpftool\-perf**(8),nt**bpftool\-prog**(8),nt** bpftool\-struct_ops**(8)n Looks like that particular version of rst2man prefers to have actual new line instead of \n. Since `echo -e` may not be available in some environment, let us use `printf`. Format string "%b" is used for `printf` to ensure all escape characters are interpretted properly. Fixes: 18841da98100 ("tools: bpftool: Automate generation for "SEE ALSO" sections in man pages") Suggested-by: Andrii Nakryiko Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: Andrii Nakryiko Cc: Quentin Monnet Link: https://lore.kernel.org/bpf/20200914183110.999906-1-yhs@fb.com commit bf74a370eb4086d3aee77c73e95303ee24779ee8 Author: Magnus Karlsson Date: Mon Sep 14 16:50:36 2020 +0200 xsk: Fix refcount warning in xp_dma_map Fix a potential refcount warning that a zero value is increased to one in xp_dma_map, by initializing the refcount to one to start with, instead of zero plus a refcount_inc(). Fixes: 921b68692abb ("xsk: Enable sharing of dma mappings") Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/1600095036-23868-1-git-send-email-magnus.karlsson@gmail.com commit 74e00676d7f1f3c0676fdfffcf404a09a037bfe3 Author: Magnus Karlsson Date: Thu Sep 10 10:31:06 2020 +0200 samples/bpf: Add quiet option to xdpsock Add a quiet option (-Q) that disables the statistics print outs of xdpsock. This is good to have when measuring 0% loss rate performance as it will be quite terrible if the application uses printfs. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1599726666-8431-4-git-send-email-magnus.karlsson@gmail.com commit 5a2a0dd88f0f267ac5953acd81050ae43a82201f Author: Magnus Karlsson Date: Thu Sep 10 10:31:05 2020 +0200 samples/bpf: Fix possible deadlock in xdpsock Fix a possible deadlock in the l2fwd application in xdpsock that can occur when there is no space in the Tx ring. There are two ways to get the kernel to consume entries in the Tx ring: calling sendto() to make it send packets and freeing entries from the completion ring, as the kernel will not send a packet if there is no space for it to add a completion entry in the completion ring. The Tx loop in l2fwd only used to call sendto(). This patches adds cleaning the completion ring in that loop. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1599726666-8431-3-git-send-email-magnus.karlsson@gmail.com commit 3131cf66d3033aa40db5b5d72a2673315b61c862 Author: Magnus Karlsson Date: Thu Sep 10 10:31:04 2020 +0200 samples/bpf: Fix one packet sending in xdpsock Fix the sending of a single packet (or small burst) in xdpsock when executing in copy mode. Currently, the l2fwd application in xdpsock only transmits the packets after a batch of them has been received, which might be confusing if you only send one packet and expect that it is returned pronto. Fix this by calling sendto() more often and add a comment in the code that states that this can be optimized if needed. Reported-by: Tirthendu Sarkar Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1599726666-8431-2-git-send-email-magnus.karlsson@gmail.com commit 87fbeb8813bd8d48cb4b5c884793cc6b5126f6b8 Author: Baolin Wang Date: Mon Sep 7 16:10:17 2020 +0800 blk-throttle: Avoid checking bps/iops limitation if bps or iops is unlimited Do not need check the bps or iops limitation if bps or iops is unlimited. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 4599ea49d4b00a6fbaab2977e7f8359cfc7e8916 Author: Baolin Wang Date: Mon Sep 7 16:10:16 2020 +0800 blk-throttle: Avoid calculating bps/iops limitation repeatedly The tg_may_dispatch() will call tg_with_in_bps_limit() and tg_with_in_iops_limit() to check if we can dispatch a bio or not, which will calculate bps/iops limitation multiple times. But tg_may_dispatch() is always called under queue lock, which means the bps/iops limitation will not change in tg_may_dispatch(). So we can calculate the bps/iops limitation only once, and pass them to tg_with_in_bps_limit() and tg_with_in_iops_limit() to avoid calculating bps/iops limitation repeatedly. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit e675df2adc2f0b8cbc0c64111d55b69f7253cbed Author: Baolin Wang Date: Mon Sep 7 16:10:15 2020 +0800 blk-throttle: Define readable macros instead of static variables The 'throtl_grp_quantum' and 'throtl_quantum' are both read-only variables, thus better to use readable macros instead of static variables, which can also save some spaces for .bss area. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit ff8b22c0f258c936460b436f6d78ed49a3b2a4cf Author: Baolin Wang Date: Mon Sep 7 16:10:14 2020 +0800 blk-throttle: Use readable READ/WRITE macros Use readable READ/WRITE macros instead of magic numbers. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit b53b072c4bb579a57c14f8e1d4ce2f4942814000 Author: Baolin Wang Date: Mon Sep 7 16:10:13 2020 +0800 blk-throttle: Fix some comments' typos Fix some comments' typos. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit d72714c1da138e6755d3bd14662dc5b7f17fae7f Author: Ilya Leoshkevich Date: Thu Sep 10 01:21:41 2020 +0200 s390/bpf: Fix multiple tail calls In order to branch around tail calls (due to out-of-bounds index, exceeding tail call count or missing tail call target), JIT uses label[0] field, which contains the address of the instruction following the tail call. When there are multiple tail calls, label[0] value comes from handling of a previous tail call, which is incorrect. Fix by getting rid of label array and resolving the label address locally: for all 3 branches that jump to it, emit 0 offsets at the beginning, and then backpatch them with the correct value. Also, do not use the long jump infrastructure: the tail call sequence is known to be short, so make all 3 jumps short. Fixes: 6651ee070b31 ("s390/bpf: implement bpf_tail_call() helper") Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200909232141.3099367-1-iii@linux.ibm.com commit 4e0a3e04e46865357008c1b60395d4f07d236d4f Author: satya priya Date: Mon Sep 14 19:28:36 2020 +0530 arm64: dts: qcom: sc7180-trogdor: Add wakeup support for BT UART Add the necessary pinctrl, interrupt property and a suitable sleep config to support Bluetooth wakeup feature. GPIO mode is configured in sleep state to drive the RTS/RFR line low. If QUP function is selected in sleep state, UART RTS/RFR is pulled high during suspend and BT SoC not able to send wakeup bytes. Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: satya priya Link: https://lore.kernel.org/r/1600091917-7464-4-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit 9a36c6fd09952e1018cca734871ff43d850dd971 Author: satya priya Date: Mon Sep 14 19:28:35 2020 +0530 arm64: dts: qcom: sc7180: Add wakeup support for BT UART on sc7180-idp Add the necessary pinctrl, interrupt property and a suitable sleep config to support Bluetooth wakeup feature. GPIO mode is configured in sleep state to drive the RTS/RFR line low. If QUP function is selected in sleep state, UART RTS/RFR is pulled high during suspend and BT SoC not able to send wakeup bytes. Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: satya priya Link: https://lore.kernel.org/r/1600091917-7464-3-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit ff11a79878a8b43394b296c06557033efd17b1ee Author: satya priya Date: Mon Sep 14 19:28:34 2020 +0530 arm64: dts: qcom: sc7180: Improve the uart3 pin config for sc7180-idp Remove output-high from CTS and TX as this is not really required. During bringup to fix transfer failures this was added to match with console uart settings. Probably some boot loader config was missing then. As it is working fine now, remove it. Signed-off-by: satya priya Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/1600091917-7464-2-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit afb83012cc7236c8f5cefbd0fd4ba628ec34ce02 Author: Soheil Hassas Yeganeh Date: Mon Sep 14 17:52:10 2020 -0400 tcp: schedule EPOLLOUT after a partial sendmsg For EPOLLET, applications must call sendmsg until they get EAGAIN. Otherwise, there is no guarantee that EPOLLOUT is sent if there was a failure upon memory allocation. As a result on high-speed NICs, userspace observes multiple small sendmsgs after a partial sendmsg until EAGAIN, since TCP can send 1-2 TSOs in between two sendmsg syscalls: // One large partial send due to memory allocation failure. sendmsg(20MB) = 2MB // Many small sends until EAGAIN. sendmsg(18MB) = 64KB sendmsg(17.9MB) = 128KB sendmsg(17.8MB) = 64KB ... sendmsg(...) = EAGAIN // At this point, userspace can assume an EPOLLOUT. To fix this, set the SOCK_NOSPACE on all partial sendmsg scenarios to guarantee that we send EPOLLOUT after partial sendmsg. After this commit userspace can assume that it will receive an EPOLLOUT after the first partial sendmsg. This EPOLLOUT will benefit from sk_stream_write_space() logic delaying the EPOLLOUT until significant space is available in write queue. Signed-off-by: Eric Dumazet Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 8ba3c9d1c6d75d1e6af2087278b30e17f68e1fff Author: Soheil Hassas Yeganeh Date: Mon Sep 14 17:52:09 2020 -0400 tcp: return EPOLLOUT from tcp_poll only when notsent_bytes is half the limit If there was any event available on the TCP socket, tcp_poll() will be called to retrieve all the events. In tcp_poll(), we call sk_stream_is_writeable() which returns true as long as we are at least one byte below notsent_lowat. This will result in quite a few spurious EPLLOUT and frequent tiny sendmsg() calls as a result. Similar to sk_stream_write_space(), use __sk_stream_is_writeable with a wake value of 1, so that we set EPOLLOUT only if half the space is available for write. Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit ed6d9b0228132fee03314b276d946fc3f0cc9e4f Author: Shannon Nelson Date: Sun Sep 13 12:16:54 2020 -0700 ionic: fix up debugfs after queue swap Clean and rebuild the debugfs info for the queues being swapped. Fixes: a34e25ab977c ("ionic: change the descriptor ring length without full reset") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 7a366707bb6a93baeb1a9ef46c4b9c875e0132d6 Author: Sibi Sankar Date: Mon Sep 14 20:28:07 2020 +0530 soc: qcom: pdr: Fixup array type of get_domain_list_resp message The array type of get_domain_list_resp is incorrectly marked as NO_ARRAY. Due to which the following error was observed when using pdr helpers with the downstream proprietary pd-mapper. Fix this up by marking it as VAR_LEN_ARRAY instead. Err logs: qmi_decode_struct_elem: Fault in decoding: dl(2), db(27), tl(160), i(1), el(1) failed to decode incoming message PDR: tms/servreg get domain list txn wait failed: -14 PDR: service lookup for tms/servreg failed: -14 Tested-by: Rishabh Bhatnagar Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Reported-by: Rishabh Bhatnagar Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200914145807.1224-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 7c6d828e90082bdbf00cbb816d4cd1b30c4109e0 Author: Stephen Boyd Date: Mon Sep 14 16:22:18 2020 -0700 arm64: dts: qcom: trogdor: Add labels for type-c ports Some trogdor board variants only have one USB port, so add a couple labels to these ports so we can modify them later. Reviewed-by: Douglas Anderson Cc: Douglas Anderson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200914232218.658664-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit b14a9fc45202c37a8540e1afb26b4783666a60c1 Author: Vladimir Oltean Date: Sat Sep 12 02:26:07 2020 +0300 __netif_receive_skb_core: don't untag vlan from skb on DSA master A DSA master interface has upper network devices, each representing an Ethernet switch port attached to it. Demultiplexing the source ports and setting skb->dev accordingly is done through the catch-all ETH_P_XDSA packet_type handler. Catch-all because DSA vendors have various header implementations, which can be placed anywhere in the frame: before the DMAC, before the EtherType, before the FCS, etc. So, the ETH_P_XDSA handler acts like an rx_handler more than anything. It is unlikely for the DSA master interface to have any other upper than the DSA switch interfaces themselves. Only maybe a bridge upper*, but it is very likely that the DSA master will have no 8021q upper. So __netif_receive_skb_core() will try to untag the VLAN, despite the fact that the DSA switch interface might have an 8021q upper. So the skb will never reach that. So far, this hasn't been a problem because most of the possible placements of the DSA switch header mentioned in the first paragraph will displace the VLAN header when the DSA master receives the frame, so __netif_receive_skb_core() will not actually execute any VLAN-specific code for it. This only becomes a problem when the DSA switch header does not displace the VLAN header (for example with a tail tag). What the patch does is it bypasses the untagging of the skb when there is a DSA switch attached to this net device. So, DSA is the only packet_type handler which requires seeing the VLAN header. Once skb->dev will be changed, __netif_receive_skb_core() will be invoked again and untagging, or delivery to an 8021q upper, will happen in the RX of the DSA switch interface itself. *see commit 9eb8eff0cf2f ("net: bridge: allow enslaving some DSA master network devices". This is actually the reason why I prefer keeping DSA as a packet_type handler of ETH_P_XDSA rather than converting to an rx_handler. Currently the rx_handler code doesn't support chaining, and this is a problem because a DSA master might be bridged. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 37054fc81443cc6a8c3a38395f384412b8373d82 Author: Paul Cercueil Date: Sat Sep 12 21:56:39 2020 +0200 gpu/drm: ingenic: Add option to mmap GEM buffers cached Ingenic SoCs are most notably used in cheap chinese handheld gaming consoles. There, the games and applications generally render in software directly into GEM buffers. Traditionally, GEM buffers are mapped write-combine. Writes to the buffer are accelerated, and reads are slow. Application doing lots of alpha-blending paint inside shadow buffers, which is then memcpy'd into the final GEM buffer. On recent Ingenic SoCs however, it is much faster to have a fully cached GEM buffer, in which applications paint directly, and whose data is invalidated before scanout, than having a write-combine GEM buffer, even when alpha blending is not used. Add an optional 'cached_gem_buffers' parameter to the ingenic-drm driver to allow GEM buffers to be mapped fully-cached, in order to speed up software rendering. v2: Use standard noncoherent DMA APIs v3: Use damage clips instead of invalidating full frames v4: Avoid dma_pgprot() which is not exported. Using vm_get_page_prot() is enough in this case. v5: - Avoid calling drm_gem_cma_prime_mmap(). It has the side effect that an extra object reference is obtained, which causes our dumb buffers to never be freed. It should have been drm_gem_cma_mmap_obj(). However, our custom mmap function only differs with one flag, so we can cleanly handle both modes in ingenic_drm_gem_mmap(). - Call drm_gem_vm_close() if drm_mmap_attrs() failed, just like in drm_gem_cma_mmap_obj(). Signed-off-by: Paul Cercueil Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200912195639.176001-1-paul@crapouillou.net commit 22f5adc75a8d60080e489b0f90f0a55104488464 Author: Łukasz Patron Date: Sat Jul 25 10:24:17 2020 +0200 arm64: dts: qcom: pm660: Fix missing pound sign in interrupt-cells Also add a space after '=' while at it. Tested-by: Konrad Dybcio Signed-off-by: Łukasz Patron Link: https://lore.kernel.org/r/20200725082417.8507-1-priv.luk@gmail.com Signed-off-by: Bjorn Andersson commit e884fb6cc89dce1debeae33704edd7735a3d6d9c Author: Konrad Dybcio Date: Fri Aug 14 17:47:49 2020 +0200 arm64: dts: qcom: kitakami: Temporarily disable SDHCI1 There is an issue with Kitakami eMMCs dying when a quirk isn't addressed. Until that happens, disable it. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200814154749.257837-1-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 326407d2c576995464fda64e92b5e37f3589e5ee Author: Konrad Dybcio Date: Tue Jun 30 00:26:10 2020 +0200 arm64: dts: sdm630: Temporarily disable SMMUs by default There happens to be an issue between how kernel handles qcom-smmuv2 and how the hypervisor would like it to be handled. That results in the platform hanging completely after the SMMUs are probed. Hence, disable the SMMU nodes temporarily, until the issue is rectified. This has been overlooked by me in the initial porting stage, as my defconfig has SMMU disabled. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200629222610.168511-1-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 0ca6d8b7d6dcead6cf9c603b9af9c065feb1422f Merge: 4b46838535071 79a675e6b1ced Author: David S. Miller Date: Mon Sep 14 16:30:39 2020 -0700 Merge branch 'net-next-dsa-mt7530-add-support-for-MT7531' Landen Chao says: ==================== net-next: dsa: mt7530: add support for MT7531 This patch series adds support for MT7531. MT7531 is the next generation of MT7530 which could be found on Mediatek router platforms such as MT7622 or MT7629. It is also a 7-ports switch with 5 giga embedded phys, 2 cpu ports, and the same MAC logic of MT7530. Cpu port 6 only supports SGMII interface. Cpu port 5 supports either RGMII or SGMII in different HW SKU, but cannot be muxed to PHY of port 0/4 like mt7530. Due to support for SGMII interface, pll, and pad setting are different from MT7530. MT7531 SGMII interface can be configured in following mode: - 'SGMII AN mode' with in-band negotiation capability which is compatible with PHY_INTERFACE_MODE_SGMII. - 'SGMII force mode' without in-band negotiation which is compatible with 10B/8B encoding of PHY_INTERFACE_MODE_1000BASEX with fixed full-duplex and fixed pause. - 2.5 times faster clocked 'SGMII force mode' without in-band negotiation which is compatible with 10B/8B encoding of PHY_INTERFACE_MODE_2500BASEX with fixed full-duplex and fixed pause. v4 -> v5 - Add fixed-link node to dsa cpu port in dts file by suggestion of Vladimir Oltean. v3 -> v4 - Adjust the coding style by suggestion of Jakub Kicinski. Remove unnecessary jumping label, merge continuous numeric 'switch cases' into one line, and keep the variables longest to shortest (reverse xmas tree). v2 -> v3 - Keep the same setup logic of mt7530/mt7621 because these series of patches is for adding mt7531 hardware. - Do not adjust rgmii delay when vendor phy driver presents in order to prevent double adjustment by suggestion of Andrew Lunn. - Remove redundant 'Example 4' from dt-bindings by suggestion of Rob Herring. - Fix typo. v1 -> v2 - change phylink_validate callback function to support full-duplex gigabit only to match hardware capability. - add description of SGMII interface. - configure mt7531 cpu port in fastest speed by default. - parse SGMII control word for in-band negotiation mode. - configure RGMII delay based on phy.rst. - Rename the definition in the header file to avoid potential conflicts. - Add wrapper function for mdio read/write to support both C22 and C45. - correct fixed-link speed of 2500base-x in dts. - add MT7531 port mirror setting. ==================== Signed-off-by: David S. Miller commit 79a675e6b1ced529a0a4b1daa8f7e92112764ec6 Author: Landen Chao Date: Fri Sep 11 21:48:56 2020 +0800 arm64: dts: mt7622: add mt7531 dsa to bananapi-bpi-r64 board Add mt7531 dsa to bananapi-bpi-r64 board for 5 giga Ethernet ports support. Signed-off-by: Landen Chao Tested-By: Frank Wunderlich Signed-off-by: David S. Miller commit 6af064486b09f38c6d5fb27f92b23e47ed1334ef Author: Landen Chao Date: Fri Sep 11 21:48:55 2020 +0800 arm64: dts: mt7622: add mt7531 dsa to mt7622-rfb1 board Add mt7531 dsa to mt7622-rfb1 board for 5 giga Ethernet ports support. mt7622 only supports 1 sgmii interface, so either gmac0 or gmac1 can be configured as sgmii interface. In this patch, change to connect mt7622 gmac0 and mt7531 port6 through sgmii interface. Signed-off-by: Landen Chao Signed-off-by: David S. Miller commit c288575f7810a51fb0517b9ba8fef2f6e5d551c4 Author: Landen Chao Date: Fri Sep 11 21:48:54 2020 +0800 net: dsa: mt7530: Add the support of MT7531 switch Add new support for MT7531: MT7531 is the next generation of MT7530. It is also a 7-ports switch with 5 giga embedded phys, 2 cpu ports, and the same MAC logic of MT7530. Cpu port 6 only supports SGMII interface. Cpu port 5 supports either RGMII or SGMII in different HW sku, but cannot be muxed to PHY of port 0/4 like mt7530. Due to SGMII interface support, pll, and pad setting are different from MT7530. This patch adds different initial setting, and SGMII phylink handlers of MT7531. MT7531 SGMII interface can be configured in following mode: - 'SGMII AN mode' with in-band negotiation capability which is compatible with PHY_INTERFACE_MODE_SGMII. - 'SGMII force mode' without in-band negotiation which is compatible with 10B/8B encoding of PHY_INTERFACE_MODE_1000BASEX with fixed full-duplex and fixed pause. - 2.5 times faster clocked 'SGMII force mode' without in-band negotiation which is compatible with 10B/8B encoding of PHY_INTERFACE_MODE_2500BASEX with fixed full-duplex and fixed pause. Signed-off-by: Landen Chao Signed-off-by: Sean Wang Signed-off-by: David S. Miller commit 27834b02230d8666a7eee78a58284588aaedd082 Author: Landen Chao Date: Fri Sep 11 21:48:53 2020 +0800 dt-bindings: net: dsa: add new MT7531 binding to support MT7531 Add devicetree binding to support the compatible mt7531 switch as used in the MediaTek MT7531 switch. Signed-off-by: Sean Wang Signed-off-by: Landen Chao Signed-off-by: David S. Miller commit 88bdef8be9f649ce4adf0d775a9a1cba7d5cc524 Author: Landen Chao Date: Fri Sep 11 21:48:52 2020 +0800 net: dsa: mt7530: Extend device data ready for adding a new hardware Add a structure holding required operations for each device such as device initialization, PHY port read or write, a checker whether PHY interface is supported on a certain port, MAC port setup for either bus pad or a specific PHY interface. The patch is done for ready adding a new hardware MT7531, and keep the same setup logic of existing hardware. Signed-off-by: Landen Chao Signed-off-by: Sean Wang Signed-off-by: David S. Miller commit dc8ef938c94e327276d8240250e64de19cd5443c Author: Landen Chao Date: Fri Sep 11 21:48:51 2020 +0800 net: dsa: mt7530: Refine message in Kconfig Refine message in Kconfig with fixing typo and an explicit MT7621 support. Signed-off-by: Landen Chao Signed-off-by: Sean Wang Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a32a43e00e6888c45ad93d989b225494bf21495d Author: Konrad Dybcio Date: Tue Jun 2 22:12:29 2020 +0200 soc: qcom: socinfo: Add msm8992/4 and apq8094 SoC IDs Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200602201229.322578-1-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit e0b760a5f6c9e54db8bd22b1d6b19223e6b92264 Author: Rajendra Nayak Date: Wed Aug 12 15:52:10 2020 +0530 arm64: dts: sdm845: Fixup OPP table for all qup devices This OPP table was based on the clock VDD-FMAX tables seen in downstream code, however it turns out the downstream clock driver does update these tables based on later/production rev of the chip and whats seen in the tables belongs to an early engineering rev of the SoC. Fix up the OPP tables such that it now matches with the production rev of sdm845 SoC. Tested-by: Amit Pundir Tested-by: John Stultz Tested-by: Steev Klimaszewski Fixes: 13cadb34e593 ("arm64: dts: sdm845: Add OPP table for all qup devices") Reported-by: John Stultz Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1597227730-16477-1-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit aa67db24b6761277d731cc3434420283479927ca Author: Tejun Heo Date: Mon Sep 14 11:05:13 2020 -0400 iocost: fix infinite loop bug in adjust_inuse_and_calc_cost() adjust_inuse_and_calc_cost() is responsible for reducing the amount of donated weights dynamically in period as the budget runs low. Because we don't want to do full donation calculation in period, we keep latching up inuse by INUSE_ADJ_STEP_PCT of the active weight of the cgroup until the resulting hweight_inuse is satisfactory. Unfortunately, the adj_step calculation was reading the active weight before acquiring ioc->lock. Because the current thread could have lost race to activate the iocg to another thread before entering this function, it may read the active weight as zero before acquiring ioc->lock. When this happens, the adj_step is calculated as zero and the incremental adjustment loop becomes an infinite one. Fix it by fetching the active weight after acquiring ioc->lock. Fixes: b0853ab4a238 ("blk-iocost: revamp in-period donation snapbacks") Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 2c226230705164e29e95226c1d148921375bc01d Author: Krzysztof Kozlowski Date: Fri Sep 4 17:24:04 2020 +0200 dt-bindings: clock: imx8m: Integrate duplicated i.MX 8M schemas The clock controller schemas for i.MX 8M Mini, 8M Nano, 8M Plus and 8M Quad are basically the same. The only minor difference appears on 8M Quad which needs one more clock. There is no point to have four schemas for almost the same binding. Any fixes or changes would have to be duplicated four times. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit b781592c909a3145113a2655f3b200a8e26030c9 Author: Krzysztof Kozlowski Date: Fri Sep 4 17:24:01 2020 +0200 dt-bindings: mtd: gpmi-nand: Add i.MX 8M compatibles DTSes with new i.MX 8M SoCs introduce their own compatibles so add them to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: nand-controller@33002000: compatible:0: 'fsl,imx8mm-gpmi-nand' is not one of ['fsl,imx23-gpmi-nand', 'fsl,imx28-gpmi-nand', 'fsl,imx6q-gpmi-nand', 'fsl,imx6sx-gpmi-nand', 'fsl,imx7d-gpmi-nand'] From schema: Documentation/devicetree/bindings/mtd/gpmi-nand.yaml arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: nand-controller@33002000: compatible: ['fsl,imx8mm-gpmi-nand', 'fsl,imx7d-gpmi-nand'] is too long arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: nand-controller@33002000: compatible: Additional items are not allowed ('fsl,imx7d-gpmi-nand' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit 2b5ee687ad86ec0f7fda92f29f5d4313e381c37a Author: Krzysztof Kozlowski Date: Fri Sep 4 17:24:00 2020 +0200 dt-bindings: interrupt-controller: fsl,irqsteer: Fix compatible matching The i.MX 8M DTSes use two compatibles so update the binding to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mq-thor96.dt.yaml: interrupt-controller@32e2d000: compatible: ['fsl,imx8m-irqsteer', 'fsl,imx-irqsteer'] is too long From schema: Domentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.yaml arch/arm64/boot/dts/freescale/imx8mq-thor96.dt.yaml: interrupt-controller@32e2d000: compatible: Additional items are not allowed ('fsl,imx-irqsteer' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit ce214b10c643080f7309b2701815e18a7ab8c6bd Author: Krzysztof Kozlowski Date: Fri Sep 4 17:23:59 2020 +0200 dt-bindings: mfd: rohm,bd71847-pmic: Correct clock properties requirements The input clock and number of clock provider cells are not required for the PMIC to operate. They are needed only for the optional bd718x7 clock driver. Add also clock-output-names as driver takes use of it. This fixes dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dt.yaml: pmic@4b: 'clocks' is a required property arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dt.yaml: pmic@4b: '#clock-cells' is a required property Signed-off-by: Krzysztof Kozlowski Acked-by: Matti Vaittinen Signed-off-by: Rob Herring commit df3682987d1933a4bad3229d27f26bef2557a0de Author: Krzysztof Kozlowski Date: Fri Sep 4 17:23:58 2020 +0200 dt-bindings: nvmem: imx-ocotp: Update i.MX 8M compatibles DTSes with new i.MX 8M SoCs use two compatibles so update the binding to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: efuse@30350000: compatible:1: 'syscon' was expected From schema: Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: efuse@30350000: compatible: ['fsl,imx8mn-ocotp', 'fsl,imx8mm-ocotp', 'syscon'] is too long arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: efuse@30350000: compatible: Additional items are not allowed ('syscon' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit c0310e49d315978a5b019c99957ff442ecf9f05a Author: Krzysztof Kozlowski Date: Fri Sep 4 17:23:57 2020 +0200 dt-bindings: thermal: imx8mm-thermal: Add i.MX 8M Nano compatible DTSes with new i.MX 8M SoCs introduce their own compatibles so add them to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: tmu@30260000: compatible:0: 'fsl,imx8mn-tmu' is not one of ['fsl,imx8mm-tmu', 'fsl,imx8mp-tmu'] From schema: Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: tmu@30260000: compatible: ['fsl,imx8mn-tmu', 'fsl,imx8mm-tmu'] is too long arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: tmu@30260000: compatible: Additional items are not allowed ('fsl,imx8mm-tmu' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit e446eba1533a1284226f5ec4708fb62e6b38156a Author: Krzysztof Kozlowski Date: Fri Sep 4 17:23:56 2020 +0200 dt-bindings: reset: fsl,imx7-src: Add i.MX 8M compatibles DTSes with new i.MX 8M SoCs introduce their own compatibles so add them to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: reset-controller@30390000: compatible:0: 'fsl,imx8mm-src' is not one of ['fsl,imx7d-src', 'fsl,imx8mq-src', 'fsl,imx8mp-src'] From schema: Documentation/devicetree/bindings/reset/fsl,imx7-src.yaml arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: reset-controller@30390000: compatible:1: 'syscon' was expected arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: reset-controller@30390000: compatible: ['fsl,imx8mm-src', 'fsl,imx8mq-src', 'syscon'] is too long Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit 10f77331f997960328f0cb910a63c2935fcef14d Author: Krzysztof Kozlowski Date: Fri Sep 4 17:23:55 2020 +0200 dt-bindings: watchdog: fsl-imx-wdt: Add i.MX 8M compatibles DTSes with new i.MX 8M SoCs introduce their own compatibles so add them to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mm-var-som-symphony.dt.yaml: watchdog@30280000: compatible:0: 'fsl,imx8mm-wdt' is not one of ['fsl,imx21-wdt'] From schema: Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.yaml arch/arm64/boot/dts/freescale/imx8mm-var-som-symphony.dt.yaml: watchdog@30280000: compatible: ['fsl,imx8mm-wdt', 'fsl,imx21-wdt'] is too long arch/arm64/boot/dts/freescale/imx8mm-var-som-symphony.dt.yaml: watchdog@30280000: compatible: Additional items are not allowed ('fsl,imx21-wdt' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Signed-off-by: Rob Herring commit cc4521cf8877a47a0ea4c452ecd93f3c3c7a5b74 Author: Krzysztof Kozlowski Date: Fri Sep 4 17:23:54 2020 +0200 dt-bindings: serial: fsl-lpuart: Fix compatible matching The i.MX 8QXP DTSes use two compatibles so update the binding to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: serial@5a060000: compatible: ['fsl,imx8qxp-lpuart', 'fsl,imx7ulp-lpuart'] is too long From schema: Documentation/devicetree/bindings/serial/fsl-lpuart.yaml arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: serial@5a060000: compatible: Additional items are not allowed ('fsl,imx7ulp-lpuart' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit 669e8aa347e6bdd367bafd564fb160d5d701ddd1 Author: Krzysztof Kozlowski Date: Fri Sep 4 17:23:53 2020 +0200 dt-bindings: serial: fsl-imx-uart: Add i.MX 8M compatibles DTSes with new i.MX 8M SoCs introduce their own compatibles so add them to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: pwm@30660000: compatible:0: 'fsl,imx8mm-pwm' is not one of ['fsl,imx1-pwm', 'fsl,imx27-pwm'] From schema: Documentation/devicetree/bindings/pwm/imx-pwm.yaml arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: pwm@30660000: compatible: ['fsl,imx8mm-pwm', 'fsl,imx27-pwm'] is too long arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: pwm@30660000: compatible: Additional items are not allowed ('fsl,imx27-pwm' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit d058717bdff46328cbcf8796785fa7f4157bb86c Author: Krzysztof Kozlowski Date: Fri Sep 4 17:23:52 2020 +0200 dt-bindings: pwm: imx-pwm: Add i.MX 8M compatibles DTSes with new i.MX 8M SoCs introduce their own compatibles so add them to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: pwm@30660000: compatible:0: 'fsl,imx8mm-pwm' is not one of ['fsl,imx1-pwm', 'fsl,imx27-pwm'] From schema: Documentation/devicetree/bindings/pwm/imx-pwm.yaml arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: pwm@30660000: compatible: ['fsl,imx8mm-pwm', 'fsl,imx27-pwm'] is too long arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: pwm@30660000: compatible: Additional items are not allowed ('fsl,imx27-pwm' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit 7f1f43f436cb80ee64baf9dacda0e61d135f2ac2 Author: Krzysztof Kozlowski Date: Fri Sep 4 17:23:51 2020 +0200 dt-bindings: perf: fsl-imx-ddr: Add i.MX 8M compatibles DTSes with new i.MX 8M SoCs introduce their own compatibles so add them to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: ddr-pmu@3d800000: compatible:0: 'fsl,imx8mm-ddr-pmu' is not one of ['fsl,imx8-ddr-pmu', 'fsl,imx8m-ddr-pmu', 'fsl,imx8mp-ddr-pmu'] From schema: Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: ddr-pmu@3d800000: compatible: ['fsl,imx8mm-ddr-pmu', 'fsl,imx8m-ddr-pmu'] is too long arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: ddr-pmu@3d800000: compatible: Additional items are not allowed ('fsl,imx8m-ddr-pmu' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Rob Herring commit 2745f888db7b62075c4ca9fd5fbc2f0a0c5565cf Author: Krzysztof Kozlowski Date: Fri Sep 4 16:53:04 2020 +0200 dt-bindings: gpu: vivante,gc: Remove trailing whitespace Remove whitespace at the end of line. Reviewed-by: Lucas Stach Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200904145312.10960-6-krzk@kernel.org Signed-off-by: Rob Herring commit feb39c74f2965ba3270239777a22b6a7e59332b2 Author: Krzysztof Kozlowski Date: Fri Sep 4 16:53:03 2020 +0200 dt-bindings: gpu: vivante,gc: Add common properties Add common properties appearing in DTSes (cooling-cells, assigned-clocks and others) to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mq-evk.dt.yaml: gpu@38000000: '#cooling-cells', 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+' Reviewed-by: Lucas Stach Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200904145312.10960-5-krzk@kernel.org Signed-off-by: Rob Herring commit 33f9e5070ccb95c17875bc4496de18c1db7a3891 Author: Krzysztof Kozlowski Date: Fri Sep 4 16:53:01 2020 +0200 dt-bindings: display: bridge: nwl-dsi: Add common properties Add common properties appearing in DTSes (assigned-clocks and others) to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mq-evk.dt.yaml: mipi-dsi@30a00000: 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: '^panel@[0-9]+$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200904145312.10960-3-krzk@kernel.org Signed-off-by: Rob Herring commit 0309c683dd7e5e263bb16a2c4199df933ff2222c Author: Krzysztof Kozlowski Date: Fri Sep 4 16:53:00 2020 +0200 dt-bindings: power: fsl,imx-gpcv2: Document interrupt controller properties The i.MX General Power Controller v2 is also an interrupt controller so document additional properties to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mq-evk.dt.yaml: gpc@303a0000: '#interrupt-cells', 'interrupt-controller' do not match any of the regexes: 'pinctrl-[0-9]+' Reviewed-by: Lucas Stach Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200904145312.10960-2-krzk@kernel.org Signed-off-by: Rob Herring commit 4b4683853507128ed78e255aa0b1ef2b1bccba41 Author: Xie He Date: Fri Sep 11 19:18:07 2020 -0700 drivers/net/wan/x25_asy: Remove an unnecessary x25_type_trans call x25_type_trans only needs to be called before we call netif_rx to pass the skb to upper layers. It does not need to be called before lapb_data_received. The LAPB module does not need the fields that are set by calling it. In the other two X.25 drivers - lapbether and hdlc_x25. x25_type_trans is only called before netif_rx and not before lapb_data_received. Cc: Martin Schiller Signed-off-by: Xie He Acked-by: Martin Schiller Signed-off-by: David S. Miller commit 2de79ee27fdb52626ac4ac48ec6d8d52ba6f9047 Author: Paolo Abeni Date: Thu Sep 10 23:33:18 2020 +0200 net: try to avoid unneeded backlog flush flush_all_backlogs() may cause deadlock on systems running processes with FIFO scheduling policy. The above is critical in -RT scenarios, where user-space specifically ensure no network activity is scheduled on the CPU running the mentioned FIFO process, but still get stuck. This commit tries to address the problem checking the backlog status on the remote CPUs before scheduling the flush operation. If the backlog is empty, we can skip it. v1 -> v2: - explicitly clear flushed cpu mask - Eric Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 7b2d1b8d9d3e4e4d30217012357989ee498e789c Merge: 7952d7edf30be 532b49e41e645 Author: David S. Miller Date: Mon Sep 14 14:37:30 2020 -0700 Merge branch 'mlxsw-Derive-SBIB-from-maximum-port-speed-and-MTU' Ido Schimmel says: ==================== mlxsw: Derive SBIB from maximum port speed & MTU Petr says: Internal buffer is a part of port headroom used for packets that are mirrored due to triggers that the Spectrum ASIC considers "egress". Besides ACL mirroring on port egresss this includes also packets mirrored due to ECN marking. This patchset changes the way the internal mirroring buffer is reserved. Currently the buffer reflects port MTU and speed accurately. In the future, mlxsw should support dcbnl_setbuffer hook to allow the users to set buffer sizes by hand. In that case, there might not be enough space for growth of the internal mirroring buffer due to MTU and speed changes. While vetoing MTU changes would be merely confusing, port speed changes cannot be vetoed, and such change would simply lead to issues in packet mirroring. For these reasons, with these patches the internal mirroring buffer is derived from maximum MTU and maximum speed achievable on the port. Patches #1 and #2 introduce a new callback to determine the maximum speed a given port can achieve. With patches #3 and #4, the information about, respectively, maximum MTU and maximum port speed, is kept in struct mlxsw_sp_port. In patch #5, maximum MTU and maximum speed are used to determine the size of the internal buffer. MTU update and speed update hooks are dropped, because they are no longer necessary. ==================== Signed-off-by: David S. Miller commit 532b49e41e6450f0f7eec2ac9cffb59b689bac25 Author: Petr Machata Date: Sun Sep 13 18:46:09 2020 +0300 mlxsw: spectrum_span: Derive SBIB from maximum port speed & MTU The SBIB register configures the size of an internal buffer that the Spectrum ASICs use when mirroring traffic on egress. This size should be taken into account when validating that the port headroom buffers are not larger than the chip can handle. Up until now this was not done, which is incidentally not a problem, because the priority group buffers that mlxsw auto-configures are small enough that the boundary condition could not be violated. However when dcbnl_setbuffer is implemented, the user has control over sizes of PG buffers, and they might overshoot the headroom capacity. However the size of the SBIB buffer depends on port speed, and that cannot be vetoed. Therefore SBIB size should be deduced from maximum port speed. Additionally, once the buffers are configured by hand, the user could get into an uncomfortable situation where their MTU change requests get vetoed, because the SBIB does not fit anymore. Therefore derive SBIB size from maximum permissible MTU as well. Remove all the code that adjusted the SBIB size whenever speed or MTU changed. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 3232e8c66e72585073fb01fefc92f9d5b0e71e0c Author: Petr Machata Date: Sun Sep 13 18:46:08 2020 +0300 mlxsw: spectrum: Keep maximum speed around The maximum port speed depends on link modes supported by the port, and for Ethernet ports is constant. The maximum speed will be handy when setting SBIB, the internal buffer used for traffic mirroring. Therefore, keep it in struct mlxsw_sp_port for easy access. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 2ecf87ae6cce1fe718b663a034ee9de0b028b7e2 Author: Petr Machata Date: Sun Sep 13 18:46:07 2020 +0300 mlxsw: spectrum: Keep maximum MTU around The maximum port MTU depends on port type. On Spectrum, mlxsw configures all ports as Ethernet ports, and the maximum MTU therefore never changes. Besides checking MTU configuration, maximum MTU will also be handy when setting SBIB, the internal buffer used for traffic mirroring. Therefore, keep it in struct mlxsw_sp_port for easy access. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 60fbc52184ee85d0556142d1a97a56f451be5966 Author: Petr Machata Date: Sun Sep 13 18:46:06 2020 +0300 mlxsw: spectrum_ethtool: Introduce ptys_max_speed callback The SBIB register configures the size of an internal buffer that the Spectrum ASICs use when mirroring traffic on egress. This size should be taken into account when validating that the port headroom buffers are not larger than the chip can handle. Up until now this was not done, which is incidentally not a problem, because the priority group buffers that mlxsw auto-configures are small enough that the boundary condition could not be violated. When dcbnl_setbuffer is implemented, the user gets control over sizes of PG buffers, and they might overshoot the headroom capacity. However the size of the SBIB buffer depends on port speed, which cannot be vetoed. There is obviously no way to retroactively push back on requests for overlarge PG buffers, or reject an overlarge MTU, or cancel losslessness of a certain PG. Therefore, instead of taking into account the current speed when calculating SBIB buffer size, take into account the maximum speed that a port with given Ethernet protocol capabilities can have. To that end, add a new ethtool callback, ptys_max_speed, which determines this maximum speed. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d24ca6c0a76b52de0d675ef107fef721b6b27b0c Author: Petr Machata Date: Sun Sep 13 18:46:05 2020 +0300 mlxsw: spectrum_ethtool: Extract a helper to get Ethernet attributes In order to allow reusing the logic, extract from mlxsw_sp_port_get_link_ksettings() the code to obtain Ethernet protocol attributes, mlxsw_sp_port_ptys_query(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5ed5807364a59f3adef2b21f718864d601d167ca Author: Mauro Carvalho Chehab Date: Fri Sep 4 09:58:34 2020 +0200 dt-bindings: phy: convert phy-hi3660-usb3.txt to yaml Convert Hisilicon Kirin 960 USB3 PHY bindings to DT schema format using json-schema. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/edfeafe6b5a60a84d08095fb380f32e61af46d40.1599206213.git.mchehab+huawei@kernel.org Signed-off-by: Rob Herring commit 7952d7edf30beedbfa67414c31eab18584710fba Merge: e0d9ae699e3ab 8cbf741499033 Author: David S. Miller Date: Mon Sep 14 14:07:58 2020 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Tony Nguyen says: ==================== 40GbE Intel Wired LAN Driver Updates 2020-09-14 This series contains updates to i40e driver only. Li RongQing removes binding affinity mask to a fixed CPU and sets prefetch of Rx buffer page to occur conditionally. Björn provides AF_XDP performance improvements by not prefetching HW descriptors, using 16 byte descriptors, and moving buffer allocation out of Rx processing loop. v2: Define prefetch_page_address in a common header for patch 2. Dropped, previous, patch 5 as it is being reworked to be more generalized. ==================== Signed-off-by: David S. Miller commit e0d9ae699e3ab5b907b9bc826ea37dba50d29dbd Merge: 33acd755f4063 f1b449748760e Author: David S. Miller Date: Mon Sep 14 14:03:38 2020 -0700 Merge tag 'rxrpc-next-20200914' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fixes for the connection manager rewrite Here are some fixes for the connection manager rewrite: (1) Fix a goto to the wrong place in error handling. (2) Fix a missing NULL pointer check. (3) The stored allocation error needs to be stored signed. (4) Fix a leak of connection bundle when clearing connections due to net namespace exit. (5) Fix an overget of the bundle when setting up a new client conn. ==================== Signed-off-by: David S. Miller commit 33acd755f406358c10b39c444492c8cc8a56411f Author: Luo bin Date: Mon Sep 14 21:48:23 2020 +0800 hinic: add vxlan segmentation and cs offload support Add NETIF_F_GSO_UDP_TUNNEL and NETIF_F_GSO_UDP_TUNNEL_CSUM features to support vxlan segmentation and checksum offload. Ipip and ipv6 tunnel packets are regarded as non-tunnel pkt for hw and as for other type of tunnel pkts, checksum offload is disabled. Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 5823417c942c5916c36f13c6878672d2ac560382 Author: Krzysztof Kozlowski Date: Thu Sep 3 21:53:23 2020 +0200 dt-bindings: mailbox: fsl,mu: Fix i.MX 8QXP compatible matching The Mailbox on i.MX 8QXP (fsl,imx8qxp-mu) can also be compatible with fsl,imx8-mu-scu (for fast IPC) so adjust the compatibles to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: mailbox@5d1f0000: compatible: ['fsl,imx8-mu-scu', 'fsl,imx8qxp-mu', 'fsl,imx6sx-mu'] is not valid under any of the given schemas (Possible causes of the failure): arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: mailbox@5d1f0000: compatible: ['fsl,imx8-mu-scu', 'fsl,imx8qxp-mu', 'fsl,imx6sx-mu'] is too long Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903195325.5394-1-krzk@kernel.org Signed-off-by: Rob Herring commit 2c1fb9f408b2a3536118dff09e9e94a04bc81ec2 Author: Krzysztof Kozlowski Date: Thu Sep 3 21:14:35 2020 +0200 dt-bindings: gpu: arm,mali-utgard: Correct Maxime's email Update the address of Maxime Ripard as one in @free-electrons.com does not work. Cc: Maxime Ripard Acked-by: Maxime Ripard Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903191438.12781-3-krzk@kernel.org Signed-off-by: Rob Herring commit 714872891415f53f5a55da5f37082125e2905c8b Author: Krzysztof Kozlowski Date: Thu Sep 3 21:14:34 2020 +0200 dt-bindings: gpu: arm,mali-utgard: Add missing properties Add common properties appearing in DTSes (opp-table) to fix dtbs_check warnings like: arch/arm/boot/dts/exynos4210-i9100.dt.yaml: gpu@13000000: 'opp-table' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903191438.12781-2-krzk@kernel.org Signed-off-by: Rob Herring commit 95da350eeff325b534ad20996ac2874b24953e1a Author: Krzysztof Kozlowski Date: Thu Sep 3 21:14:33 2020 +0200 dt-bindings: gpu: arm,mali-midgard: Add missing properties Add common properties appearing in DTSes (opp-table) to fix dtbs_check warnings like: arch/arm64/boot/dts/exynos/exynos5433-tm2.dt.yaml: gpu@14ac0000: 'opp-table' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903191438.12781-1-krzk@kernel.org Signed-off-by: Rob Herring commit 5d7fb8b80f5eb92e14d5bf28f5272d6d2e33ba09 Author: Krzysztof Kozlowski Date: Thu Sep 3 21:14:07 2020 +0200 dt-bindings: mfd: google,cros-ec: Add missing properties Add common properties appearing in DTSes (controller-data, wakeup-source) to partially fix dtbs_check warnings like: arch/arm/boot/dts/exynos5250-snow.dt.yaml: embedded-controller@1e: 'keyboard-controller', 'wakeup-source' do not match any of the regexes: 'pinctrl-[0-9]+' arch/arm/boot/dts/exynos5800-peach-pi.dt.yaml: cros-ec@0: 'controller-data', 'i2c-tunnel', 'keyboard-controller' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903191407.12686-1-krzk@kernel.org Signed-off-by: Rob Herring commit 6a1aa95508fc178ac855b3f68185417654489460 Author: Krzysztof Kozlowski Date: Thu Sep 3 21:13:11 2020 +0200 dt-bindings: timer: exynos4210-mct: Add missing clocks The Exynos Multi Core Timer driver requires two clocks. This was never documented in the binding. Add it to fix dtschema warnings like: arch/arm64/boot/dts/exynos/exynos5433-tm2.dt.yaml: timer@101c0000: 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903191311.12293-2-krzk@kernel.org Signed-off-by: Rob Herring commit 1c6d7e4b1fcea6781b59af42cb03306c39cfc4f1 Author: Krzysztof Kozlowski Date: Thu Sep 3 21:13:10 2020 +0200 dt-bindings: arm: samsung: pmu: Add missing properties Add common properties appearing in DTSes (assigned-clock-parents, assigned-clocks) to fix dtbs_check warnings like: arch/arm64/boot/dts/exynos/exynos5433-tm2.dt.yaml: system-controller@105c0000: 'assigned-clock-parents', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903191311.12293-1-krzk@kernel.org Signed-off-by: Rob Herring commit f3694707adb21c54c9ab3467029a0e294e0fd4fb Author: Zhang Changzhong Date: Mon Sep 14 21:24:39 2020 +0800 net: qlcnic: remove unused variable 'val' in qlcnic_83xx_cam_unlock() Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:661:6: warning: variable 'val' set but not used [-Wunused-but-set-variable] 661 | u32 val; | ^~~ After commit 7f9664525f9c ("qlcnic: 83xx memory map and HW access routines"), variable 'val' is never used in qlcnic_83xx_cam_unlock(), so removing it to avoid build warning. Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Signed-off-by: David S. Miller commit f7ab0f04a0f816e1329b559de91da1971c515d50 Author: Zhang Changzhong Date: Mon Sep 14 21:19:12 2020 +0800 net: pxa168_eth: remove unused variable 'retval' int pxa168_eth_change_mtu() Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/marvell/pxa168_eth.c:1190:6: warning: variable 'retval' set but not used [-Wunused-but-set-variable] 1190 | int retval; | ^~~~~~ Function pxa168_eth_change_mtu() always return zero, so variable 'retval' is redundant, just remove it. Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Signed-off-by: David S. Miller commit 992bae7e429ccb847491c36f6d0e78446b55efa7 Author: Zhang Changzhong Date: Mon Sep 14 21:14:24 2020 +0800 net: fec: ptp: remove unused variable 'ns' in fec_time_keep() Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/freescale/fec_ptp.c:523:6: warning: variable 'ns' set but not used [-Wunused-but-set-variable] 523 | u64 ns; | ^~ After commit 6605b730c061 ("FEC: Add time stamping code and a PTP hardware clock"), variable 'ns' is never used in fec_time_keep(), so removing it to avoid build warning. Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Acked-by: Fugang Duan Signed-off-by: David S. Miller commit 85743cead5ab2716f3b81ada5191aad68feb8678 Author: Zhang Changzhong Date: Mon Sep 14 21:08:37 2020 +0800 net: dnet: remove unused variable 'tx_status 'in dnet_start_xmit() Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/dnet.c:510:6: warning: variable 'tx_status' set but not used [-Wunused-but-set-variable] u32 tx_status, irq_enable; ^~~~~~~~~ After commit 4796417417a6 ("dnet: Dave DNET ethernet controller driver (updated)"), variable 'tx_status' is never used in dnet_start_xmit(), so removing it to avoid build warning. Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Signed-off-by: David S. Miller commit 0cbe6a8f089e5912a577537c97833546d558c357 Author: Eric Dumazet Date: Mon Sep 14 03:20:27 2020 -0700 tcp: remove SOCK_QUEUE_SHRUNK SOCK_QUEUE_SHRUNK is currently used by TCP as a temporary state that remembers if some room has been made in the rtx queue by an incoming ACK packet. This is later used from tcp_check_space() before considering to send EPOLLOUT. Problem is: If we receive SACK packets, and no packet is removed from RTX queue, we can send fresh packets, thus moving them from write queue to rtx queue and eventually empty the write queue. This stall can happen if TCP_NOTSENT_LOWAT is used. With this fix, we no longer risk stalling sends while holes are repaired, and we can fully use socket sndbuf. This also removes a cache line dirtying for typical RPC workloads. Fixes: c9bee3b7fdec ("tcp: TCP_NOTSENT_LOWAT socket option") Signed-off-by: Eric Dumazet Cc: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit b4c5881446b3a5888b6815eaf9cbb5eda0f68363 Author: Xie He Date: Mon Sep 14 00:41:54 2020 -0700 net/packet: Fix a comment about hard_header_len and headroom allocation This comment is outdated and no longer reflects the actual implementation of af_packet.c. Reasons for the new comment: 1. In af_packet.c, the function packet_snd first reserves a headroom of length (dev->hard_header_len + dev->needed_headroom). Then if the socket is a SOCK_DGRAM socket, it calls dev_hard_header, which calls dev->header_ops->create, to create the link layer header. If the socket is a SOCK_RAW socket, it "un-reserves" a headroom of length (dev->hard_header_len), and checks if the user has provided a header sized between (dev->min_header_len) and (dev->hard_header_len) (in dev_validate_header). This shows the developers of af_packet.c expect hard_header_len to be consistent with header_ops. 2. In af_packet.c, the function packet_sendmsg_spkt has a FIXME comment. That comment states that prepending an LL header internally in a driver is considered a bug. I believe this bug can be fixed by setting hard_header_len to 0, making the internal header completely invisible to af_packet.c (and requesting the headroom in needed_headroom instead). 3. There is a commit for a WiFi driver: commit 9454f7a895b8 ("mwifiex: set needed_headroom, not hard_header_len") According to the discussion about it at: https://patchwork.kernel.org/patch/11407493/ The author tried to set the WiFi driver's hard_header_len to the Ethernet header length, and request additional header space internally needed by setting needed_headroom. This means this usage is already adopted by driver developers. Cc: Willem de Bruijn Cc: Eric Dumazet Cc: Brian Norris Cc: Cong Wang Signed-off-by: Xie He Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 6b80c3d664a76d723096923de6fa879db6ff0576 Author: Krzysztof Kozlowski Date: Thu Sep 3 20:03:58 2020 +0200 dt-bindings: crypto: slimsss: Correct a typo in compatible Correct a typo in the compatible - missing trailing 's'. Reviewed-by: Kamil Konieczny Acked-by: Kamil Konieczny Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903180400.2865-1-krzk@kernel.org Signed-off-by: Rob Herring commit b91c06c5df511dfed3995c4e1a44729756ef0025 Merge: 26cdb8f72a952 1a418cb8e888c Author: David S. Miller Date: Mon Sep 14 13:28:03 2020 -0700 Merge branch 'mptcp-introduce-support-for-real-multipath-xmit' Paolo Abeni says: ==================== mptcp: introduce support for real multipath xmit This series enable MPTCP socket to transmit data on multiple subflows concurrently in a load balancing scenario. First the receive code path is refactored to better deal with out-of-order data (patches 1-7). An RB-tree is introduced to queue MPTCP-level out-of-order data, closely resembling the TCP level OoO handling. When data is sent on multiple subflows, the peer can easily see OoO - "future" data at the MPTCP level, especially if speeds, delay, or jitter are not symmetric. The other major change regards the netlink PM, which is extended to allow creating non backup subflows in patches 9-11. There are a few smaller additions, like the introduction of OoO related mibs, send buffer autotuning and better ack handling. Finally a bunch of new self-tests is introduced. The new feature is tested ensuring that the B/W used by an MPTCP socket using multiple subflows matches the link aggregated B/W - we use low B/W virtual links, to ensure the tests are not CPU bounded. v1 -> v2: - fix 32 bit build breakage - fix a bunch of checkpatch issues ==================== Signed-off-by: David S. Miller commit 1a418cb8e888ccee29d5aca305cfdbae6cff2139 Author: Paolo Abeni Date: Mon Sep 14 10:01:19 2020 +0200 mptcp: simult flow self-tests Add a bunch of test-cases for multiple subflow xmit: create multiple subflows simulating different links condition via netem and verify that the msk is able to use completely the aggregated bandwidth. Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit c76c6956566f974bac2470bd72fc22fb923e04a1 Author: Paolo Abeni Date: Mon Sep 14 10:01:18 2020 +0200 mptcp: call tcp_cleanup_rbuf on subflows That is needed to let the subflows announce promptly when new space is available in the receive buffer. tcp_cleanup_rbuf() is currently a static function, drop the scope modifier and add a declaration in the TCP header. Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit d5f49190def61c47b2faff170ba8fbc48bac4371 Author: Paolo Abeni Date: Mon Sep 14 10:01:17 2020 +0200 mptcp: allow picking different xmit subflows Update the scheduler to less trivial heuristic: cache the last used subflow, and try to send on it a reasonably long burst of data. When the burst or the subflow send space is exhausted, pick the subflow with the lower ratio between write space and send buffer - that is, the subflow with the greater relative amount of free space. v1 -> v2: - fix 32 bit build breakage due to 64bits div - fix checkpath issues (uint64_t -> u64) Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 4596a2c1b7f55b8dac9ef4d8724cbef6e11eb74c Author: Paolo Abeni Date: Mon Sep 14 10:01:16 2020 +0200 mptcp: allow creating non-backup subflows Currently the 'backup' attribute of local endpoint is ignored. Let's use it for the MP_JOIN handshake Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit ef0da3b8a2f18f59ea310ce27696c431eeb57eab Author: Paolo Abeni Date: Mon Sep 14 10:01:15 2020 +0200 mptcp: move address attribute into mptcp_addr_info So that can be accessed easily from the subflow creation helper. No functional change intended. Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 06242e44b9fbd59be0bd4a4ed82b38f8f2c3f4b2 Author: Paolo Abeni Date: Mon Sep 14 10:01:14 2020 +0200 mptcp: add OoO related mibs Add a bunch of MPTCP mibs related to MPTCP OoO data processing. Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 04e4cd4f7ca4600409a898fe0abc318372c4c1ab Author: Paolo Abeni Date: Mon Sep 14 10:01:13 2020 +0200 mptcp: cleanup mptcp_subflow_discard_data() There is no need to use the tcp_read_sock(), we can simply drop the skb. Additionally try to look at the next buffer for in order data. This both simplifies the code and avoid unneeded indirect calls. Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit ab174ad8ef76276cadfdae98731d31797d265927 Author: Paolo Abeni Date: Mon Sep 14 10:01:12 2020 +0200 mptcp: move ooo skbs into msk out of order queue. Add an RB-tree to cope with OoO (at MPTCP level) data. __mptcp_move_skb() insert into the RB tree "future" data, eventually coalescing skb as allowed by the MPTCP DSN. To simplify sequence accounting, move the DSN inside the cb. After successfully enqueuing in sequence data, check if we can use any data from the RB tree. Additionally move the data_fin check after spooling data from the OoO tree, otherwise we could miss shutdown events. The RB tree code is copied as verbatim as possible from tcp_data_queue_ofo(), with a few simplifications due to the fact that MPTCP doesn't need to cope with sacks. All bugs here are added by me. Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 8268ed4c9d197fc6448b6262c62aad62ef9aa4d5 Author: Paolo Abeni Date: Mon Sep 14 10:01:11 2020 +0200 mptcp: introduce and use mptcp_try_coalesce() Factor-out existing code, will be re-used by the next patch. Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit da51aef5fe5b9ef389055f693472d4fb5a3f58f9 Author: Paolo Abeni Date: Mon Sep 14 10:01:10 2020 +0200 mptcp: basic sndbuf autotuning Let the msk sendbuf track the size of the larger subflow's send window, so that we ensure mptcp_sendmsg() does not exceed MPTCP-level send window. The update is performed just before try to send any data. Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 6719331c2f736fba881f2ce85c8b0e37fe054c46 Author: Paolo Abeni Date: Mon Sep 14 10:01:09 2020 +0200 mptcp: trigger msk processing even for OoO data This is a prerequisite to allow receiving data from multiple subflows without re-injection. Instead of dropping the OoO - "future" data in subflow_check_data_avail(), call into __mptcp_move_skbs() and let the msk drop that. To avoid code duplication factor out the mptcp_subflow_discard_data() helper. Note that __mptcp_move_skbs() can now find multiple subflows with data avail (comprising to-be-discarded data), so must update the byte counter incrementally. v1 -> v2: - fix checkpatch issues (unsigned -> unsigned int) Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 47bebdf365ade17534f6616dc228d347085f4501 Author: Paolo Abeni Date: Mon Sep 14 10:01:08 2020 +0200 mptcp: set data_ready status bit in subflow_check_data_avail() This simplify mptcp_subflow_data_available() and will made follow-up patches simpler. Additionally remove the unneeded checks on subflow copied_seq: we always whole skbs out of subflows. Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 63561a403c7c89d59205401db14fb444c6535cef Author: Paolo Abeni Date: Mon Sep 14 10:01:07 2020 +0200 mptcp: rethink 'is writable' conditional Currently, when checking for the 'msk is writable' condition, we look at the individual subflows write space. That works well while we send data via a single subflow, but will not as soon as we will enable concurrent xmit on multiple subflows. With this change msk becomes writable when the following conditions hold: - the socket has some free write space - there is at least a subflow with write free space Additionally we need to set the NOSPACE bit on all subflows before blocking. Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 26cdb8f72a952ef247dfb1d507eadfe0ec8277ae Merge: e059c6f340f6f 7961fb1089f82 Author: David S. Miller Date: Mon Sep 14 13:02:38 2020 -0700 Merge branch 'ethernet-convert-tasklets-to-use-new-tasklet_setup-API' Allen Pais says: ==================== ethernet: convert tasklets to use new tasklet_setup API Commit 12cc923f1ccc ("tasklet: Introduce new initialization API")' introduced a new tasklet initialization API. This series converts all the crypto modules to use the new tasklet_setup() API This series is based on v5.9-rc5 v3: fix subject prefix use backpointer instead of fragile priv to netdev. v2: fix kdoc reported by Jakub Kicinski. ==================== Signed-off-by: David S. Miller commit 7961fb1089f826758b30bbe2f5a121e25a4ef396 Author: Allen Pais Date: Mon Sep 14 12:59:39 2020 +0530 net: smc91x: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit 271f278dfe8f16e40fb8148b736d41755ed21d48 Author: Allen Pais Date: Mon Sep 14 12:59:38 2020 +0530 net: silan: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit b5f0a3bfc11f04b2991355a71943fd0c4534869a Author: Allen Pais Date: Mon Sep 14 12:59:37 2020 +0530 qed: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit f246d129fe8cec16f088c12185a4e986ef682c02 Author: Allen Pais Date: Mon Sep 14 12:59:36 2020 +0530 net: nixge: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit 436b7d950e2fe839d10cae6243744c3efaba6451 Author: Allen Pais Date: Mon Sep 14 12:59:35 2020 +0530 nfp: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit 54e977f01384d45519fdfe4f523ea195bcac8ed8 Author: Allen Pais Date: Mon Sep 14 12:59:34 2020 +0530 net: natsemi: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit 9ad5a250a949e50c434885d08892187e0f0cbced Author: Allen Pais Date: Mon Sep 14 12:59:33 2020 +0530 net: micrel: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit a1be161a3c23f9de16de42832059954f265afb7c Author: Allen Pais Date: Mon Sep 14 12:59:32 2020 +0530 net: mlx: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit cd002b54c2e68a1af8c45f9eaca9fc9f9feaaf37 Author: Allen Pais Date: Mon Sep 14 12:59:31 2020 +0530 net: skge: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit 4d07f7e24042828c71fa3bc9932ebb32c9a6ada5 Author: Allen Pais Date: Mon Sep 14 12:59:30 2020 +0530 net: jme: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit aa7c3fee42acc3b65fe8ba1b5bc88ed067bb9358 Author: Allen Pais Date: Mon Sep 14 12:59:29 2020 +0530 ibmvnic: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit 9da7cfc3dd14d70470c85a5649ca44559a1d0618 Author: Allen Pais Date: Mon Sep 14 12:59:28 2020 +0530 net: ehea: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit 220167ad8ae9366f9f9b6dc2e04d64fda4ccab1f Author: Allen Pais Date: Mon Sep 14 12:59:27 2020 +0530 net: hinic: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit bc48a1f58c0dd8c39fd1d9ee06a5b8f7e992a5d7 Author: Allen Pais Date: Mon Sep 14 12:59:26 2020 +0530 net: sundance: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit 6660de07aaf4d1f2d90f6cf2e58cad02d6871253 Author: Allen Pais Date: Mon Sep 14 12:59:25 2020 +0530 chelsio: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit dfe4e612983f7cd1f72a3304b551b595ee95f3e3 Author: Allen Pais Date: Mon Sep 14 12:59:24 2020 +0530 liquidio: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit e7412b83d85d60bfadd36900ae208c73fb20f04c Author: Allen Pais Date: Mon Sep 14 12:59:23 2020 +0530 net: macb: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit d8d36de9d0a818691b2e0d454e3c99b8456315b3 Author: Allen Pais Date: Mon Sep 14 12:59:22 2020 +0530 cnic: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit 4c58700ad8d66dd80e5354685090ea09694699f2 Author: Allen Pais Date: Mon Sep 14 12:59:21 2020 +0530 net: amd-xgbe: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit 9c59cc79d675fad8b1b4e5f8e75eeaaab78b11ef Author: Allen Pais Date: Mon Sep 14 12:59:20 2020 +0530 net: alteon: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: David S. Miller commit 79628c543e152502b0ee9c9fe5f6b56879e49c6a Author: Ville Syrjälä Date: Mon Sep 7 15:00:26 2020 +0300 drm/i915: Drop the drm_atomic_helper_calc_timestamping_constants() call We update the timestamping constants per-crtc explicitly in intel_crtc_update_active_timings(). Furtermore the helper will use uapi.adjusted_mode whereas we want hw.adjusted_mode. Thus let's drop the helper call an rely on what we already have in intel_crtc_update_active_timings(). We can now also drop the hw.adjusted_mode -> uapi.adjusted_mode copy hack that was added to keep the helper from deriving the timestamping constants from the wrong thing. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200907120026.6360-3-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter commit 441959ebc9056326d80af2d06adf4b80e0288a2a Author: Ville Syrjälä Date: Mon Sep 7 15:00:25 2020 +0300 drm/atomic-helper: Remove the timestamping constant update from drm_atomic_helper_update_legacy_modeset_state() The timestamping constants have nothing to do with any legacy state so should not be updated from drm_atomic_helper_update_legacy_modeset_state(). Let's make everyone call drm_atomic_helper_calc_timestamping_constants() directly instead of relying on drm_atomic_helper_update_legacy_modeset_state() to call it. @@ expression S; @@ - drm_atomic_helper_calc_timestamping_constants(S); @@ expression D, S; @@ drm_atomic_helper_update_legacy_modeset_state(D, S); + drm_atomic_helper_calc_timestamping_constants(S); v2: Update drm_crtc_vblank_helper_get_vblank_timestamp{,_internal}() docs (Daniel) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200907120026.6360-2-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter commit 4b31a9c77bf87f9d9e957f7a42f84c57a407e1f8 Author: Ville Syrjälä Date: Mon Sep 7 15:00:24 2020 +0300 drm/atomic-helper: Extract drm_atomic_helper_calc_timestamping_constants() Put the vblank timestamping constants update loop into its own function. It has no business living inside drm_atomic_helper_update_legacy_modeset_state() so we'll be wanting to move it out entirely. As a first step we'll still call it from drm_atomic_helper_update_legacy_modeset_state(). v2: Drop comment about 'legacy state' in the new function Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200907120026.6360-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter commit ac03de1f5e8380a8f16728407619d9e5a4a351b0 Author: Rodrigo Vivi Date: Mon Sep 14 15:34:23 2020 -0400 drm/i915: Update DRIVER_DATE to 20200914 Signed-off-by: Rodrigo Vivi commit 5c8d1244c03e1e57bad56907d42b5afe79054318 Author: Rodrigo Vivi Date: Mon Sep 14 15:03:18 2020 -0400 drm/i915: Update DRIVER_DATE to 20200914 Signed-off-by: Rodrigo Vivi commit 301ed833974fafa8886bd5050dff0d8d5f7ada4d Merge: 4de962300b883 df398e33b8fd3 Author: Rodrigo Vivi Date: Mon Sep 14 14:34:19 2020 -0400 Merge tag 'gvt-next-2020-09-10' of https://github.com/intel/gvt-linux into drm-intel-next-queued gvt-next-2020-09-10 - Cleanup command access flag (Yan) - New workaround cmd access fix (Colin) - MIA reset state fix (Colin) Signed-off-by: Rodrigo Vivi From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20200910053720.GK28614@zhen-hp.sh.intel.com commit 81ebea5352e5738f50e23a3897428951fe1f8448 Author: Kiran K Date: Mon Sep 14 18:55:06 2020 +0530 Bluetooth: btintel: Functions to send firmware header / payload New generation controllers supports ECDSA secure boot engine. This patch adds, 1) function to send ECDSA header 2) function to download complete firmware for new generation Intel controllers Signed-off-by: Kiran K Signed-off-by: Amit K Bag Signed-off-by: Raghuram Hegde Reviewed-by: Chethan T N Reviewed-by: Srivatsa Ravishankar Signed-off-by: Marcel Holtmann commit 57375beef71af9f245e88357fa71d9600650cb7d Author: Kiran K Date: Mon Sep 14 18:55:05 2020 +0530 Bluetooth: btintel: Add infrastructure to read controller information New generation Intel controllers returns version information in TLV format. This patch adds, 1) Enums, structures for TLV 2) function to read controller information, parse TLV data and populate intel_version_tlv structure 3) function to print version information Signed-off-by: Kiran K Signed-off-by: Amit K Bag Signed-off-by: Raghuram Hegde Reviewed-by: Chethan T N Reviewed-by: Srivatsa Ravishankar Signed-off-by: Marcel Holtmann commit 53274477acf23a7995428e981924e56379778874 Author: Daniel Winkler Date: Tue Sep 15 14:14:27 2020 -0700 Bluetooth: pause/resume advertising around suspend Currently, the controller will continue advertising when the system enters suspend. This patch makes sure that all advertising instances are paused when entering suspend, and resumed when suspend exits. The Advertising and Suspend/Resume test suites were both run on this change on 4.19 kernel with both hardware offloaded multi-advertising and software rotated multi-advertising. In addition, a new test was added that performs the following steps: * Register 3 advertisements via bluez RegisterAdvertisement * Verify reception of all advertisements by remote peer * Enter suspend on DUT * Verify failure to receive all advertisements by remote peer * Exit suspend on DUT * Verify reception of all advertisements by remote peer Signed-off-by: Daniel Winkler Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit af312c87774c96f271d277e9d97f38fb2a72b2d5 Author: Krzysztof Kozlowski Date: Sat Aug 29 19:25:29 2020 +0200 dt-bindings: display: samsung,amoled-mipi-dsi: Do not require enable-gpios on samsung,s6e63j0x03 The samsung,s6e63j0x03 does not have enable GPIO, so do not require it. This fixes dtbs_check warning: arch/arm/boot/dts/exynos3250-rinato.dt.yaml: panel@0: 'enable-gpios' is a required property Acked-by: Sam Ravnborg Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200829172532.29358-1-krzk@kernel.org Signed-off-by: Rob Herring commit c8eb702484ed5badb2b654f2c9d086e43a00b954 Author: Chao Yu Date: Mon Sep 14 16:47:00 2020 +0800 f2fs: clean up kvfree After commit 0b6d4ca04a86 ("f2fs: don't return vmalloc() memory from f2fs_kmalloc()"), f2fs_k{m,z}alloc() will not return vmalloc()'ed memory, so clean up to use kfree() instead of kvfree() to free vmalloc()'ed memory. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7c5798ab1fc537582a27e6f3a4319341859504ce Author: Krzysztof Kozlowski Date: Sat Aug 29 16:24:56 2020 +0200 dt-bindings: connector: Convert Samsung 11-pin USB bindings to dtschema Add Samsung 11-pin USB-C connector into standard dtschema bindings file. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200829142501.31478-5-krzk@kernel.org Signed-off-by: Rob Herring commit 80c2145fa5e7ced8c95f17a1a60866951627f43c Author: Jerome Brunet Date: Fri Aug 28 17:44:35 2020 +0200 arm64: dts: meson: vim3l: remove sound card definition The sound card definition should have been removed when the common definition was added to the vim3 dtsi but this slips through. Remove it now. Fixes: 7c9c06246cea ("arm64: dts: meson: vim3: make sound card common to all variants") Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200828154435.419561-1-jbrunet@baylibre.com commit 13c877f4b48b943105ad9e13ba2c7a093fb694e8 Author: Tony Luck Date: Tue Sep 8 10:55:12 2020 -0700 x86/mce: Stop mce_reign() from re-computing severity for every CPU Back in commit: 20d51a426fe9 ("x86/mce: Reuse one of the u16 padding fields in 'struct mce'") a field was added to "struct mce" to save the computed error severity. Make use of this in mce_reign() to avoid re-computing the severity for every CPU. In the case where the machine panics, one call to mce_severity() is still needed in order to provide the correct message giving the reason for the panic. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200908175519.14223-2-tony.luck@intel.com commit 8cbf74149903382cf422c653d4ee8fb2f44e3ec8 Author: Björn Töpel Date: Tue Aug 25 13:35:56 2020 +0200 i40e, xsk: move buffer allocation out of the Rx processing loop Instead of checking in each iteration of the Rx packet processing loop, move the allocation out of the loop and do it once for each napi activation. For AF_XDP the rx_drop benchmark was improved by 6%. Signed-off-by: Björn Töpel Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit f0064bfd969bea0d65ef20d191bea8b7494b4ec8 Author: Björn Töpel Date: Tue Aug 25 13:35:55 2020 +0200 i40e: use 16B HW descriptors instead of 32B The i40e NIC supports two flavors of HW descriptors, 16 and 32 byte. The latter has, obviously, room for more offloading information. However, the only fields of the 32B HW descriptor that is being used by the driver, is also available in the 16B descriptor. In other words; Reading and writing 32 bytes instead of 16 byte is a waste of bus bandwidth. This commit starts using 16 byte descriptors instead of 32 byte descriptors. For AF_XDP the rx_drop benchmark was improved by 2%. Signed-off-by: Björn Töpel Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit f78bd13027d9d43a6f5f3469377cd6bfd4218a14 Author: Björn Töpel Date: Tue Aug 25 13:35:54 2020 +0200 i40e, xsk: remove HW descriptor prefetch in AF_XDP path The software prefetching of HW descriptors has a negative impact on the performance. Therefore, it is now removed. Performance for the rx_drop benchmark increased with 2%. Signed-off-by: Björn Töpel Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 1fa5cef283420b3dad93cd6ab04d7125bc1562de Author: Li RongQing Date: Tue Aug 18 15:07:57 2020 +0800 i40e: optimise prefetch page refcount refcount of rx_buffer page will be added here originally, so prefetchw is needed, but after commit 1793668c3b8c ("i40e/i40evf: Update code to better handle incrementing page count"), and refcount is not added every time, so change prefetchw as prefetch. Now it mainly services page_address(), but which accesses struct page only when WANT_PAGE_VIRTUAL or HASHED_PAGE_VIRTUAL is defined otherwise it returns address based on offset, so we prefetch it conditionally. Jakub suggested to define prefetch_page_address in a common header. Reported-by: kernel test robot Suggested-by: Jakub Kicinski Signed-off-by: Li RongQing Reviewed-by: Jesse Brandeburg Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit f49be6dcd74bfb99b6f9deba4a976f74aad1e844 Author: Li RongQing Date: Wed Jul 1 16:54:53 2020 +0800 i40e: not compute affinity_mask for IRQ After commit 759dc4a7e605 ("i40e: initialize our affinity_mask based on cpu_possible_mask"), NAPI IRQ affinity_mask is bind to all possible CPUs, not a fixed CPU Signed-off-by: Li RongQing Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 00af6729b52ede86a08173c8d5f2c8cd9fa3390d Merge: da62cb7230f08 818280d5adf1d Author: Maxime Ripard Date: Mon Sep 14 18:11:40 2020 +0200 Merge drm/drm-next into drm-misc-next Paul Cercueil needs some patches in -rc5 to apply new patches for ingenic properly. Signed-off-by: Maxime Ripard commit 4aca9e65c61d3245f878aa7ef06a8ddcb7579c2d Author: Michael Straube Date: Sun Sep 13 18:22:06 2020 +0200 staging: rtl8723bs: remove 5 GHz code Acoording to the TODO code valid only for 5 GHz should be removed. - find and remove remaining code valid only for 5 GHz. Most of the obvious ones have been removed, but things like channel > 14 still exist. Remove code path only valid for channels > 14. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200913162206.19477-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7d955952625e5ea026b4dd2ce787eb24ebb2aed4 Author: Michael Straube Date: Sun Sep 13 18:22:05 2020 +0200 staging: rtl8723bs: remove cckrates{only}_included() In rtw_ieee80211.c there are rtw_is_cckrates_included() and rtw_is_cckratesonly_included() which have the same functionality as cckrates_included() and cckrates_only_included() defined in rtw_wlan_util.c. Remove the functions from rtw_wlan_util.c and use those from rtw_ieee80211.c. Remove the now unused variable ratelen. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200913162206.19477-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 818280d5adf1d80e78f95821815148abe9407e14 Merge: 166774a2c2c6b 856deb866d16e Author: Daniel Vetter Date: Mon Sep 14 17:19:11 2020 +0200 Merge v5.9-rc5 into drm-next Paul needs 1a21e5b930e8 ("drm/ingenic: Fix leak of device_node pointer") and 3b5b005ef7d9 ("drm/ingenic: Fix driver not probing when IPU port is missing") from -fixes to be able to merge further ingenic patches into -next. Signed-off-by: Daniel Vetter commit f1b449748760e333a6aeef2455f3875be07c9b5a Author: David Howells Date: Mon Sep 14 15:58:14 2020 +0100 rxrpc: Fix an overget of the conn bundle when setting up a client conn When setting up a client connection, a second ref is accidentally obtained on the connection bundle (we get one when allocating the conn and a second one when adding the conn to the bundle). Fix it to only use the ref obtained by rxrpc_alloc_client_connection() and not to add a second when adding the candidate conn to the bundle. Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager") Signed-off-by: David Howells commit 546a42410bf76075e157dbdd94c097b3bc44b25a Author: David Howells Date: Mon Sep 14 13:26:47 2020 +0100 rxrpc: Fix conn bundle leak in net-namespace exit When the network namespace exits, rxrpc_clean_up_local_conns() needs to unbundle each client connection it evicts. Fix it to do this. kernel BUG at net/rxrpc/conn_object.c:481! RIP: 0010:rxrpc_destroy_all_connections.cold+0x11/0x13 net/rxrpc/conn_object.c:481 Call Trace: rxrpc_exit_net+0x1a4/0x2e0 net/rxrpc/net_ns.c:119 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:186 cleanup_net+0x4ea/0xa00 net/core/net_namespace.c:603 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager") Reported-by: syzbot+52071f826a617b9c76ed@syzkaller.appspotmail.com Signed-off-by: David Howells commit 8806245a3e7ad6aafc5bd8c58b0f0dea82a8e4c5 Author: David Howells Date: Mon Sep 14 13:10:00 2020 +0100 rxrpc: Fix rxrpc_bundle::alloc_error to be signed The alloc_error field in the rxrpc_bundle struct should be signed as it has negative error codes assigned to it. Checks directly on it may then fail, and may produce a warning like this: net/rxrpc/conn_client.c:662 rxrpc_wait_for_channel() warn: 'bundle->alloc_error' is unsigned Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager") Reported-by Dan Carpenter Signed-off-by: David Howells commit 96a9c425e234aac193afb9da6ca11fafc679c7e2 Author: David Howells Date: Mon Sep 14 13:02:58 2020 +0100 rxrpc: Fix a missing NULL-pointer check in a trace Fix the rxrpc_client tracepoint to not dereference conn to get the cid if conn is NULL, as it does for other fields. RIP: 0010:trace_event_raw_event_rxrpc_client+0x7e/0xe0 [rxrpc] Call Trace: rxrpc_activate_channels+0x62/0xb0 [rxrpc] rxrpc_connect_call+0x481/0x650 [rxrpc] ? wake_up_q+0xa0/0xa0 ? rxrpc_kernel_begin_call+0x12a/0x1b0 [rxrpc] rxrpc_new_client_call+0x2a5/0x5e0 [rxrpc] Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager") Reported-by: Marc Dionne Signed-off-by: David Howells Tested-by: Marc Dionne commit 09e872d558ba6a7f4468c4e8cdf0cd5a99bfc175 Author: chunhui dai Date: Fri Sep 4 12:59:59 2020 +0200 drm/mediatek: Disable tmds on mt2701 Without that patch if you use specific resolutions like 1280x1024, I can see distortion in the output. It seems as if the frequency for updating the pixel of the image is out of sync. For initialization tmds needs to be active, but can be disabled after init to fix blurry display Signed-off-by: chunhui dai Signed-off-by: Frank Wunderlich Tested-by: Frank Wunderlich Signed-off-by: Chun-Kuang Hu commit f5f875b5618e4aa2ef5fce003fc5fc6d80f4bc54 Author: Randy Dunlap Date: Tue Sep 8 17:57:19 2020 -0700 usb: phy: phy-ab8500-usb: fix spello of "function" Fix typo/spello of "function". Cc: Felipe Balbi Cc: Jiri Kosina Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/1be7e71f-6b79-290a-f38e-b51ccaf85e8e@infradead.org Signed-off-by: Greg Kroah-Hartman commit ac9ae510d5d725dc7834028e840e8aa6324a1590 Author: YueHaibing Date: Wed Sep 9 21:44:05 2020 +0800 usb: host: ehci-sched: Remove ununsed function tt_start_uframe() commit b35c5009bbf6 ("USB: EHCI: create per-TT bandwidth tables") left behind this, remove it. Acked-by: Alan Stern Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200909134405.34036-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 9d99e55833dddf76dd6470e7ce97201abb612c03 Author: Krzysztof Kozlowski Date: Thu Sep 10 18:07:06 2020 +0200 spi: sprd: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Acked-by: Chunyan Zhang Link: https://lore.kernel.org/r/20200910160706.5883-1-krzk@kernel.org Signed-off-by: Mark Brown commit 6d66507d9b5507e26c5350d5a014b82c704124b8 Author: Douglas Anderson Date: Sat Sep 12 11:17:25 2020 -0700 spi: spi-geni-qcom: Don't wait to start 1st transfer if transmitting If we're sending bytes over SPI, we know the FIFO is empty at the start of the transfer. There's no reason to wait for the interrupt telling us to start--we can just start right away. Then if we transmit everything in one swell foop we don't even need to bother listening for TX interrupts. In a test of "flashrom -p ec -r /tmp/foo.bin" interrupts were reduced from ~30560 to ~29730, about a 3% savings. This patch looks bigger than it is because I moved a few functions rather than adding a forward declaration. The only actual change to geni_spi_handle_tx() was to make it return a bool indicating if there is more to tx. Signed-off-by: Douglas Anderson Reviewed-by: Akash Asthana Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200912111716.1.Ied5e843fad0d6b733a1fb8bcfb364dd2fa889eb3@changeid Signed-off-by: Mark Brown commit cbd632ea8ee4ae07d12e85ed07aa5d667a1f47d8 Author: Jason Yan Date: Sat Sep 12 15:22:11 2020 +0800 spi: bcm2835: Make polling_limit_us static This eliminates the following sparse warning: drivers/spi/spi-bcm2835.c:78:14: warning: symbol 'polling_limit_us' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20200912072211.602735-1-yanaijie@huawei.com Signed-off-by: Mark Brown commit 6ce898593705f540606a0f61db17c7fa198bd8f7 Author: Vladimir Oltean Date: Thu Sep 10 15:15:32 2020 +0300 spi: spi-fsl-dspi: use XSPI mode instead of DMA for DPAA2 SoCs The arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi device tree lacks DMA channels for DSPI, so naturally, the driver fails to probe: [ 2.945302] fsl-dspi 2100000.spi: rx dma channel not available [ 2.951134] fsl-dspi 2100000.spi: can't get dma channels In retrospect, this should have been obvious, because LS2080A, LS2085A LS2088A and LX2160A don't appear to have an eDMA module at all. Looking again at their datasheets, the CTARE register (which is specific to XSPI functionality) seems to be documented, so switch them to XSPI mode instead. Fixes: 0feaf8f5afe0 ("spi: spi-fsl-dspi: Convert the instantiations that support it to DMA") Reported-by: Qiang Zhao Tested-by: Qiang Zhao Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20200910121532.1138596-1-olteanv@gmail.com Signed-off-by: Mark Brown commit 14ac4e049dc1183440960f177b60b54357e54d90 Author: Douglas Anderson Date: Sat Sep 12 14:08:00 2020 -0700 spi: spi-geni-qcom: Don't program CS_TOGGLE again and again We always toggle the chip select manually in spi-geni-qcom so that we can properly implement the Linux API. There's no reason to program this to the hardware on every transfer. Program it once at init and be done with it. This saves some part of a microsecond of overhead on each transfer. While not really noticeable on any real world benchmarks, we might as well save the time. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200912140730.2.I33e571179986850b4ec17042e813d0b08fb1b9c1@changeid Signed-off-by: Mark Brown commit fc129a43aa2705770dc45b2e9c506d2617fd5863 Author: Douglas Anderson Date: Sat Sep 12 14:07:59 2020 -0700 spi: spi-geni-qcom: Use the FIFO even more In commit 902481a78ee4 ("spi: spi-geni-qcom: Actually use our FIFO") I explained that the maximum size we could program the FIFO was "mas->tx_fifo_depth - 3" but that I chose "mas->tx_fifo_depth()" because I was worried about decreased bandwidth. Since that time: * All the interconnect patches have landed, making things run at the proper speed. * I've done more measurements. This lets me confirm that there's really no downside of using the FIFO more. Specifically I did "flashrom -p ec -r /tmp/foo.bin" on a Chromebook and averaged over several runs. Before: It took 6.66 seconds and 59669 interrupts fired. After: It took 6.66 seconds and 47992 interrupts fired. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200912140730.1.Ie67fa32009b94702d56232c064f1d89065ee8836@changeid Signed-off-by: Mark Brown commit bfc430cab8234273c23885211818f704b2bd1da9 Author: Barry Song Date: Thu Sep 10 22:02:46 2020 +1200 spi: spi-qcom-qspi: replace spin_lock_irqsave by spin_lock in hard IRQ It is redundant to do irqsave and irqrestore in hardIRQ context. Cc: Andy Gross Cc: Bjorn Andersson Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20200910100246.32696-1-song.bao.hua@hisilicon.com Signed-off-by: Mark Brown commit d9f0cf9f1176d36d3824459d5b061f4719fcbb8a Author: Ray Jui Date: Thu Sep 10 08:25:36 2020 -0700 spi: Add compatible string for brcmstb SoCs Add compatible string for brcmstb 7445 SoCs. Signed-off-by: Ray Jui Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20200910152539.45584-1-ray.jui@broadcom.com Signed-off-by: Mark Brown commit 3cf5d198785a6b454e6a97246795b0043aff9ac1 Author: Ray Jui Date: Thu Sep 10 08:25:39 2020 -0700 spi: bcm-qspi: Clean up 7425, 7429, and 7435 settings The Broadcom QSPI driver now falls back to no MSPI_DEV support as the default setting in the generic compatible string, explicit settings for STB chips 7425, 7429, and 7435 can be removed. Signed-off-by: Ray Jui Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20200910152539.45584-4-ray.jui@broadcom.com Signed-off-by: Mark Brown commit 9a852d44b26f8e60e2ae13df563824c0f8489135 Author: Ray Jui Date: Thu Sep 10 08:25:38 2020 -0700 spi: bcm-qspi: Fix probe regression on iProc platforms iProc chips have QSPI controller that does not have the MSPI_REV offset. Reading from that offset will cause a bus error. Fix it by having MSPI_REV query disabled in the generic compatible string. Fixes: 3a01f04d74ef ("spi: bcm-qspi: Handle lack of MSPI_REV offset") Link: https://lore.kernel.org/linux-arm-kernel/20200909211857.4144718-1-f.fainelli@gmail.com/T/#u Signed-off-by: Ray Jui Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20200910152539.45584-3-ray.jui@broadcom.com Signed-off-by: Mark Brown commit e0eeb76b818ad93718f9640b0bdad909b453a3b8 Author: Ray Jui Date: Thu Sep 10 08:25:37 2020 -0700 spi: bcm-qspi: Add compatible string for BRCMSTB 7445 SoCs Add compatible string for BRCMSTB 7445 SoCs and indicate it has MSPI rev support. Signed-off-by: Ray Jui Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20200910152539.45584-2-ray.jui@broadcom.com Signed-off-by: Mark Brown commit 4a6c7d6f940107d6383291e2cb450039790b752d Author: Colin Ian King Date: Thu Sep 10 16:04:10 2020 +0100 spi: qup: 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/20200910150410.750959-1-colin.king@canonical.com Signed-off-by: Mark Brown commit c4005a8f65edc55fb1700dfc5c1c3dc58be80209 Author: Hamish Martin Date: Fri Sep 11 09:25:12 2020 +1200 usb: ohci: Make distrust_firmware param default to false The 'distrust_firmware' module parameter dates from 2004 and the USB subsystem is a lot more mature and reliable now than it was then. Alter the default to false now. Suggested-by: Alan Stern Acked-by: Alan Stern Signed-off-by: Hamish Martin Link: https://lore.kernel.org/r/20200910212512.16670-2-hamish.martin@alliedtelesis.co.nz Signed-off-by: Greg Kroah-Hartman commit b77d2a0a223bc139ee8904991b2922d215d02636 Author: Hamish Martin Date: Fri Sep 11 09:25:11 2020 +1200 usb: ohci: Default to per-port over-current protection Some integrated OHCI controller hubs do not expose all ports of the hub to pins on the SoC. In some cases the unconnected ports generate spurious over-current events. For example the Broadcom 56060/Ranger 2 SoC contains a nominally 3 port hub but only the first port is wired. Default behaviour for ohci-platform driver is to use global over-current protection mode (AKA "ganged"). This leads to the spurious over-current events affecting all ports in the hub. We now alter the default to use per-port over-current protection. This patch results in the following configuration changes depending on quirks: - For quirk OHCI_QUIRK_SUPERIO no changes. These systems remain set up for ganged power switching and no over-current protection. - For quirk OHCI_QUIRK_AMD756 or OHCI_QUIRK_HUB_POWER power switching remains at none, while over-current protection is now guaranteed to be set to per-port rather than the previous behaviour where it was either none or global over-current protection depending on the value at function entry. Suggested-by: Alan Stern Acked-by: Alan Stern Signed-off-by: Hamish Martin Link: https://lore.kernel.org/r/20200910212512.16670-1-hamish.martin@alliedtelesis.co.nz Signed-off-by: Greg Kroah-Hartman commit e03b9dfb675a61eca2f8d7f88b408bdcdf2953b5 Author: Lukas Bulwahn Date: Sat Sep 12 14:13:46 2020 +0200 MAINTAINERS: make linux-usb list remarks consistent Commit f24f27b85ead ("MAINTAINERS: add entry for mediatek usb3 DRD IP driver") claims linux-usb@vger.kernel.org is moderated for non-subscribers, but all other 46 entries for linux-usb@vger.kernel.org do not mention that. Adjust this entry to be consistent with all others. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20200912121346.2796-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 78ec034966b5b1879782903945fd5560c9d3b264 Author: Colin Ian King Date: Mon Sep 14 14:56:46 2020 +0100 misc: hisi_hikey_usb: fix return of uninitialized ret status variable Currently the return value from ret is uninitialized so the function hisi_hikey_usb_parse_kirin970 is returning a garbage value when succeeding. Since ret is not used anywhere else in the function, remove it and just return 0 success at the end of the function. Fixes: d210a0023590 ("misc: hisi_hikey_usb: add support for Hikey 970") Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200914135646.99334-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit dfee57a8a6655f3b87fc34c3c07a8b05fd2aae29 Author: Chris Packham Date: Mon Sep 14 09:59:26 2020 +1200 usb: host: ehci-platform: Add workaround for brcm, xgs-iproc-ehci The ehci controller found in some Broadcom switches with integrated SoCs has an issue which causes a soft lockup with large transfers like you see when running ext4 on USB3 flash drive. Port the fix from the Broadcom XLDK to increase the OUT_THRESHOLD to avoid the problem. Acked-by: Alan Stern Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20200913215926.29880-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Greg Kroah-Hartman commit 741043b02c2e00c8fea1a0f6f8ce43c6326cd9e8 Author: Mauro Carvalho Chehab Date: Mon Sep 14 15:55:35 2020 +0200 media: vidtv: don't initialize cnr2qual var As reported by gcc: drivers/media/test-drivers/vidtv/vidtv_demod.c: In function 'vidtv_demod_set_frontend': drivers/media/test-drivers/vidtv/vidtv_demod.c:265:42: warning: variable 'cnr2qual' set but not used [-Wunused-but-set-variable] 265 | const struct vidtv_demod_cnr_to_qual_s *cnr2qual = NULL; | ^~~~~~~~ It turns that the var is not needed at all. So, just drop it. Signed-off-by: Mauro Carvalho Chehab commit d859a712a378a4f81c387f2afdee437a6a0a6b54 Author: Mauro Carvalho Chehab Date: Mon Sep 14 15:17:18 2020 +0200 media: vidtv: adjust signal strength range On real devices, signal strength is always a negative number when represented in dBm. A more interesting range is to use dBmV (which is what Kaffeine does, for example). The conversion from the two units are simple: dBmV = dBm - 108 Usually, signal strength ranges up to 100dBmV. Adjust the maximum value to be around 74 dBmV, when there's no frequency shift, which represents a good signal. With that, Kaffeine displays it a lot better. Signed-off-by: Mauro Carvalho Chehab commit 9cf8572d6b6ffc42755f897c1623eb026cdf8c79 Author: Mauro Carvalho Chehab Date: Mon Sep 14 08:34:26 2020 +0200 media: vidtv: increment byte and block counters Add support for incrementing DVBv5 stats for block counters and post/pre BER byte counts. For now, the errors won't be incremented yet. Signed-off-by: Mauro Carvalho Chehab commit f58cac01ab4e0221b3886261ec2a8386cd3d8896 Author: Mauro Carvalho Chehab Date: Sun Sep 13 14:03:50 2020 +0200 media: vidtv: get rid of the work queue The dvb_frontend will already call status periodically, when a channel is tuned. So, no need to have a work queue for such purpose. Signed-off-by: Mauro Carvalho Chehab commit 3e51a4965b9b9ab4fc6a7ecacc85816c7ebeeccb Author: Mauro Carvalho Chehab Date: Sun Sep 13 11:01:23 2020 +0200 media: vidtv: add basic support for DVBv5 stats The current stats code is broken on so many ways. It ends reporting 0 for signal strengh, and the work queue doesn't run. If it would run, the code would crash. Fix such issues and add the minimum stuff for DVBv5 stats. Right now, only strength and cnr and UCB are implemented. pre/post BER stats will always return zero. Signed-off-by: Mauro Carvalho Chehab commit 96230dc134f9c390c86e9df99809e9c88fb44c24 Author: Mauro Carvalho Chehab Date: Sun Sep 13 13:08:05 2020 +0200 media: vidtv: properly initialize the internal state struct Right now, the config data passed from the bridge driver is just ignored. Also, let's initialize the delayed work at probing time. Signed-off-by: Mauro Carvalho Chehab commit a6abe2f392163286deba863f56906c3b031a926a Author: Mauro Carvalho Chehab Date: Sun Sep 13 07:31:08 2020 +0200 media: vidtv: remove a wrong endiannes check from s302m generator The code there is already doing the right thing, as it uses value & 0xff, value & 0xff00, which already ensures the expected endiannes. So, it doesn't make any sense to touch the order depending on the CPU endiannes. Yet, as pointed by Daniel at the mailing list: https://lore.kernel.org/linux-media/e614351c-215c-c048-52af-7c200b164f41@xs4all.nl/T/#m8d221684a151833966359c2ed8bdce0f0ee4e5fd The reverse code is needed by the decoder. So, keep it no matter the endiannes. Signed-off-by: Mauro Carvalho Chehab commit 4de962300b883cc4aaafd7b625cbd497a299e6e1 Author: Ville Syrjälä Date: Thu Feb 6 22:12:04 2020 +0200 drm/i915: Use fb->format->is_yuv for the g4x+ sprite RGB vs. YUV check g4x+ sprites have an extra cdclk limitation listed for RGB formats. For some random reason I chose to use cpp>=4 as the check for that. While that does actually work let's deobfuscate it by checking for !is_yuv instead. I suspect is_yuv didn't exist way back when I originally write the code. Also drop the duplicate comment. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200206201204.31704-2-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 1cb23db97ac024a707d34ab321234145807d9f58 Author: Mauro Carvalho Chehab Date: Sat Sep 12 20:47:25 2020 +0200 media: vidtv: add an initial channel frequency Use 474 MHz frequency for DVB-T/DVB-C, as this is the at the channel range that it is valid on most places for DVB-T. In the case of DVB-S, let's add Astra 19.2E initial frequency at the scan files as the default, e. g. 12.5515 GHz. Signed-off-by: Mauro Carvalho Chehab commit 23d3e3799fb031f5eff5855c3df8e58e3a40001b Author: Ville Syrjälä Date: Thu Feb 6 22:12:03 2020 +0200 drm/i915: Fix g4x+ sprite dotclock limit for upscaling Even if we're not doing downscaling we should account for some of the extra dotclock limitations for g4x+ sprites. In particular we must never exceed the 90% rule, and with RGB that limits actually drops to 80%. So instead of bailing out when upscaling let's clamp the scaling factor appropriately and go through the rest of calculation normally. By luck we already did the full calculations for the 1:1 case. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200206201204.31704-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit f3ea9da24bc98cbeff84a3bf54ed4072a0f3774e Author: Mauro Carvalho Chehab Date: Sat Sep 12 20:50:34 2020 +0200 media: vidtv: fix frequency tuning logic Right now, there are some issues at the tuning logic: 1) the config struct is not copied at the tuner driver. so, it won't use any frequency table at all; 2) the code that checks for frequency shifts is called at set_params. So, lock_status will never be zeroed; 3) the signal strength will also report a strong signal, even if not tuned; 4) the logic is not excluding non-set frequencies. Fix those issues. Signed-off-by: Mauro Carvalho Chehab commit 870e350d4e3927d9425d27ba37a4344e99a105c2 Author: Mauro Carvalho Chehab Date: Mon Sep 14 11:28:18 2020 +0200 media: vidtv: get rid of ENDIAN_BITFIELD nonsense The two places where ENDIAN_BITFIELD is used is for a single 8-bits integer. No need to correct endiannes on such cases. Signed-off-by: Mauro Carvalho Chehab commit 044e27ae78869c87c53805069480c5c9b2beb15e Author: Mauro Carvalho Chehab Date: Sun Sep 13 07:29:15 2020 +0200 media: vidtv: get rid of some endiannes nonsense Genmask is always highest order to low order. It doesn't make any sense to make it depends on endiannes. Signed-off-by: Mauro Carvalho Chehab commit 2e2fa2c51c683297f7df1c83a3cf65494aa00eed Author: Mauro Carvalho Chehab Date: Sat Sep 12 11:21:19 2020 +0200 media: vidtv: fix 32-bit warnings There are several warnings produced when the driver is built for 32-bit archs. Solve them. Reported-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9cfb4d36c27cc6986503ea41faa90b3175f31d99 Author: Mauro Carvalho Chehab Date: Sat Sep 12 10:58:55 2020 +0200 media: vidtv: prefer using dev_foo() instead of pr_foo() It is better to use the higher level dev_foo() than pr_foo() for printks. Change them at vidtv at the more trivial places. Signed-off-by: Mauro Carvalho Chehab commit c9f968fac9cfa5af1251d30be9bbac38dd1973a6 Author: Mauro Carvalho Chehab Date: Sat Sep 12 10:14:17 2020 +0200 media: vidtv: add modaliases for the bridge driver As this virtual driver is probed manually, add modaliases for this driver. Signed-off-by: Mauro Carvalho Chehab commit 530ad31760ef07012ca73c6dff2a807b10dd9ac5 Author: Stanimir Varbanov Date: Mon Aug 17 10:27:23 2020 +0200 media: venus: firmware: Set virtual address ranges In order to boot some of the new Venus firmware versions TZ call to set virtual address ranges is needed. Add virtual address ranges for CP and CP_NONPIX in resource structure and use them when loading and booting the firmware on remote processor. Signed-off-by: Stanimir Varbanov Reviewed-by: Bjorn Andersson Signed-off-by: Mauro Carvalho Chehab commit 6d885330fa3daede6bf24b7422da9d6d9a577eb8 Author: Stanimir Varbanov Date: Mon Aug 17 10:27:22 2020 +0200 media: firmware: qcom_scm: Add memory protect virtual address ranges This adds a new SCM memprotect command to set virtual address ranges. Signed-off-by: Stanimir Varbanov Reviewed-by: Elliot Berman Acked-by: Bjorn Andersson Signed-off-by: Mauro Carvalho Chehab commit 435c53c3698f41484a53fa980e4d7c5eaba45258 Author: Stanimir Varbanov Date: Tue Sep 8 14:19:14 2020 +0200 media: venus: venc: Use helper to set profile and level We have a new helper to set profile and level use it instead. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 5a86626efa51407feabeaae94f112ac2636edf39 Author: Stanimir Varbanov Date: Tue Sep 8 14:12:10 2020 +0200 media: venus: vdec: Use helper to get profile and level Currently the returned profile and level is not aligned with v4l2 ctrl id. Correct that by use the helpers which translate the v4l2 <-> hfi mapping internally. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 3cd136713bf99911070d7203383748497581672c Author: Stanimir Varbanov Date: Mon Aug 31 14:01:38 2020 +0200 media: venus: vdec: Set/Get VP9 profile/level Get and set VP9 codec profile and levels. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 2c2dc2fdc1949545ed269ae6a6412b5185c5d5b9 Author: Stanimir Varbanov Date: Tue Sep 8 10:50:21 2020 +0200 media: venus: helpers: Add a helper to map v4l2 ids to HFI ids Introduce a helper to set and get profile and levels which includes the translation between v4l2 ctrl ids and HFI ids. The input arguments are always in v4l2 ids space. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit cbaa3117ea9a8d97836caee0e080de8add7aeb2e Author: Stanimir Varbanov Date: Tue Sep 8 14:03:28 2020 +0200 media: venus: hfi_helper: Add VP9 profile and levels Add HFI defines for VP9 codec profile and levels. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 5823833c9adab5a9ce5500e7f1ce7deeff00ee73 Author: Stanimir Varbanov Date: Sat Jul 11 14:52:36 2020 +0200 media: v4l2-ctrl: Add VP9 codec levels Add menu control for VP9 codec levels. A total of 14 levels are defined for Profile 0 (8bit) and Profile 2 (10bit). Each level is a set of constrained bitstreams coded with targeted resolutions, frame rates, and bitrates. The definitions have been taken from webm project [1]. [1] https://www.webmproject.org/vp9/levels/ Signed-off-by: Stanimir Varbanov Reviewed-by: Nicolas Dufresne Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0df720e59d9543a5021653350c4feebc3d3f71c5 Author: Robin Murphy Date: Thu Sep 3 23:14:26 2020 +0200 media: venus: core: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Also the DMA segment size is simply a size, not a bitmask. Signed-off-by: Robin Murphy Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 2b37a18b58ed12b711591ec54c2b2a0e2068cf6e Author: Rikard Falkeborn Date: Sun Sep 13 10:41:14 2020 +0200 regulator: ti-abb: Constify ti_abb_reg_ops The only usage of ti_abb_reg_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200913084114.8851-6-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 72f2746c52e3fa6c0f6740df2d4fb70419533084 Author: Rikard Falkeborn Date: Sun Sep 13 10:41:13 2020 +0200 regulator: pca9450: Constify static regulator_ops The only usages of these is to assign their address to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200913084114.8851-5-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 9032693e218e69a9527fd5d08c4ce5cdbe90820f Author: Rikard Falkeborn Date: Sun Sep 13 10:41:12 2020 +0200 regulator: stw481x-vmmc: Constify static structs The only usage of stw481x_vmmc_ops is to assign its address to the ops field in the regulator_desc struct which is a const pointer. The only usage of vmmc_regulator is to pass its address to of_get_regulator_init_data() and devm_regulator_register(), both which take const pointers. Make both of them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200913084114.8851-4-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 96ee75ffd4f63a3d5f9d6a3ea592b2c0ee97acb0 Author: Rikard Falkeborn Date: Sun Sep 13 10:41:11 2020 +0200 regulator: fixed: Constify static regulator_ops The only usage of fixed_voltage_ops and fixed_voltage_clkenabled_ops is to assign their address the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200913084114.8851-3-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 087c09c2d273823bac906d590280f7e8052f7eff Author: Rikard Falkeborn Date: Sun Sep 13 10:41:10 2020 +0200 regulator: dummy: Constify dummy_initdata and dummy_ops The only usage of dummy_initdata is to assign its address to the init_data field of the regulator_config struct and the only usage dummy_ops is to assign its address to the ops field in the regulator_desc struct, both which are const pointers. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200913084114.8851-2-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 8dec2fc11b8cdad7d2b5679ebf0b742d511eacae Author: Ville Syrjälä Date: Tue Sep 8 17:02:10 2020 +0300 drm/i915: Nuke CACHE_MODE_0 save/restore The CACHE_MODE_0 save/restore was added without explanation in commit 1f84e550a870 ("drm/i915 more registers for S3 (DSPCLK_GATE_D, CACHE_MODE_0, MI_ARB_STATE)"). If there are any bits we care about those should be set explicitly during some appropriate init function. Let's assume it's all good and just nuke this magic save/restore. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200908140210.31048-4-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit b41e58ffe49172eb260e95c217d3e1f0f7432ba6 Author: Ville Syrjälä Date: Tue Sep 8 17:02:09 2020 +0300 drm/i915: Nuke MI_ARB_STATE save/restore Originally added in commit 1f84e550a870 ("drm/i915 more registers for S3 (DSPCLK_GATE_D, CACHE_MODE_0, MI_ARB_STATE)") to fix some underruns. I suspect that was due to the trickle feed settings getting clobbered during suspend. We've been disabling trickle feed explicitly since commit 20f949670f51 ("drm/i915: Disable trickle feed via MI_ARB_STATE for the gen4") so this magic save/restore should no longer be needed. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200908140210.31048-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e8fac46c783a444dd0d140bb84eae3247dfebb59 Author: Ville Syrjälä Date: Tue Sep 8 17:02:08 2020 +0300 drm/i915: Nuke the magic FBC_CONTROL save/restore The FBC_CONTROL save restore is there just to preserve the compression interval setting. Since commit a68ce21ba0c4 ("drm/i915/fbc: Store the fbc1 compression interval in the params") we've been explicitly setting the interval to a specific value, so the sace/restore is now entirely pointless. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200908140210.31048-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit eae9eec476d13fad9af6da1f44a054ee02b7b161 Author: Thiago Jung Bauermann Date: Tue Aug 18 19:11:26 2020 -0300 powerpc/pseries/svm: Allocate SWIOTLB buffer anywhere in memory POWER secure guests (i.e., guests which use the Protected Execution Facility) need to use SWIOTLB to be able to do I/O with the hypervisor, but they don't need the SWIOTLB memory to be in low addresses since the hypervisor doesn't have any addressing limitation. This solves a SWIOTLB initialization problem we are seeing in secure guests with 128 GB of RAM: they are configured with 4 GB of crashkernel reserved memory, which leaves no space for SWIOTLB in low addresses. To do this, we use mostly the same code as swiotlb_init(), but allocate the buffer using memblock_alloc() instead of memblock_alloc_low(). Fixes: 2efbc58f157a ("powerpc/pseries/svm: Force SWIOTLB for secure guests") Signed-off-by: Thiago Jung Bauermann Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200818221126.391073-1-bauerman@linux.ibm.com commit 231b232df8f67e7d37af01259c21f2a131c3911e Author: Michael Ellerman Date: Thu Aug 27 23:17:13 2020 +1000 powerpc/64: Make VDSO32 track COMPAT on 64-bit When we added the VDSO32 kconfig symbol, which controls building of the 32-bit VDSO, we made it depend on CPU_BIG_ENDIAN (for 64-bit). That was because back then COMPAT was always enabled for 64-bit, so depending on it would have left the 32-bit VDSO always enabled, which we didn't want. But since then we have made COMPAT selectable, and off by default for ppc64le, so VDSO32 should really depend on that. For most people this makes no difference, none of the defconfigs change, it's only if someone is building ppc64le with COMPAT=y, they will now also get VDSO32. If they've enabled COMPAT in order to run 32-bit binaries they presumably also want the 32-bit VDSO. Signed-off-by: Michael Ellerman Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20200908125850.407939-1-mpe@ellerman.id.au commit 960e3708135ac8b03ef3d1fa773e369cfacc76b9 Merge: dc462267d2d7a 0460534b532e5 Author: Michael Ellerman Date: Mon Sep 14 22:57:18 2020 +1000 Merge branch 'fixes' into next Bring in our fixes branch for this cycle which avoids some small conflicts with upcoming commits. commit 8d9a14fc7371a18d54226bf2542f77b11e5a7101 Author: derek.fang Date: Mon Sep 14 16:57:19 2020 +0800 ASoC: rt1015: Fix the failure to flush DAC data before playback Fix the failure to flush DAC data before playback. Signed-off-by: derek.fang Link: https://lore.kernel.org/r/1600073839-6762-2-git-send-email-derek.fang@realtek.com Signed-off-by: Mark Brown commit da145172b236b1ac322fa81f6250aa59074eba68 Author: derek.fang Date: Mon Sep 14 16:57:18 2020 +0800 ASoC: rt1015: Fix DC calibration on bypass boost mode Fix the DC calibration unsuccessful issue on rt1015 bypass boost mode. Signed-off-by: derek.fang Link: https://lore.kernel.org/r/1600073839-6762-1-git-send-email-derek.fang@realtek.com Signed-off-by: Mark Brown commit 0f7071c2d468b703dcc9e99cc403eb7dd4ec32ed Author: Ville Syrjälä Date: Tue Sep 8 17:02:07 2020 +0300 drm/i915: Kill unused savePCH_PORT_HOTPLUG We don't save/restore PCH_PORT_HOTPLUG so no point in reseving space for the value. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200908140210.31048-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit da62cb7230f0871c30dc9789071f63229158d261 Author: Jia Yang Date: Tue Jul 14 10:32:36 2020 +0200 drm: fix double free for gbo in drm_gem_vram_init and drm_gem_vram_create I got a use-after-free report when doing some fuzz test: If ttm_bo_init() fails, the "gbo" and "gbo->bo.base" will be freed by ttm_buffer_object_destroy() in ttm_bo_init(). But then drm_gem_vram_create() and drm_gem_vram_init() will free "gbo" and "gbo->bo.base" again. BUG: KMSAN: use-after-free in drm_vma_offset_remove+0xb3/0x150 CPU: 0 PID: 24282 Comm: syz-executor.1 Tainted: G B W 5.7.0-rc4-msan #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 Call Trace: __dump_stack dump_stack+0x1c9/0x220 kmsan_report+0xf7/0x1e0 __msan_warning+0x58/0xa0 drm_vma_offset_remove+0xb3/0x150 drm_gem_free_mmap_offset drm_gem_object_release+0x159/0x180 drm_gem_vram_init drm_gem_vram_create+0x7c5/0x990 drm_gem_vram_fill_create_dumb drm_gem_vram_driver_dumb_create+0x238/0x590 drm_mode_create_dumb drm_mode_create_dumb_ioctl+0x41d/0x450 drm_ioctl_kernel+0x5a4/0x710 drm_ioctl+0xc6f/0x1240 vfs_ioctl ksys_ioctl __do_sys_ioctl __se_sys_ioctl+0x2e9/0x410 __x64_sys_ioctl+0x4a/0x70 do_syscall_64+0xb8/0x160 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x4689b9 Code: fd e0 fa 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 e0 fa ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f368fa4dc98 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000076bf00 RCX: 00000000004689b9 RDX: 0000000020000240 RSI: 00000000c02064b2 RDI: 0000000000000003 RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00000000004d17e0 R14: 00007f368fa4e6d4 R15: 000000000076bf0c Uninit was created at: kmsan_save_stack_with_flags kmsan_internal_poison_shadow+0x66/0xd0 kmsan_slab_free+0x6e/0xb0 slab_free_freelist_hook slab_free kfree+0x571/0x30a0 drm_gem_vram_destroy ttm_buffer_object_destroy+0xc8/0x130 ttm_bo_release kref_put ttm_bo_put+0x117d/0x23e0 ttm_bo_init_reserved+0x11c0/0x11d0 ttm_bo_init+0x289/0x3f0 drm_gem_vram_init drm_gem_vram_create+0x775/0x990 drm_gem_vram_fill_create_dumb drm_gem_vram_driver_dumb_create+0x238/0x590 drm_mode_create_dumb drm_mode_create_dumb_ioctl+0x41d/0x450 drm_ioctl_kernel+0x5a4/0x710 drm_ioctl+0xc6f/0x1240 vfs_ioctl ksys_ioctl __do_sys_ioctl __se_sys_ioctl+0x2e9/0x410 __x64_sys_ioctl+0x4a/0x70 do_syscall_64+0xb8/0x160 entry_SYSCALL_64_after_hwframe+0x44/0xa9 If ttm_bo_init() fails, the "gbo" will be freed by ttm_buffer_object_destroy() in ttm_bo_init(). But then drm_gem_vram_create() and drm_gem_vram_init() will free "gbo" again. Reported-by: Hulk Robot Reported-by: butt3rflyh4ck Signed-off-by: Jia Yang Signed-off-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200714083238.28479-2-tzimmermann@suse.de commit 118bb62f271a2b3e2f6ab058b6f43d2601f85480 Author: Tian Tao Date: Mon Sep 14 15:28:42 2020 +0800 arm64: hibernate: Remove unused including Remove including that don't need it. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1600068522-54499-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Will Deacon commit 2cf660eb81e93f58ae31215af67fee8499901dd9 Author: Gavin Shan Date: Mon Sep 14 09:47:30 2020 +1000 arm64/mm: Refactor {pgd, pud, pmd, pte}_ERROR() The function __{pgd, pud, pmd, pte}_error() are introduced so that they can be called by {pgd, pud, pmd, pte}_ERROR(). However, some of the functions could never be called when the corresponding page table level isn't enabled. For example, __{pud, pmd}_error() are unused when PUD and PMD are folded to PGD. This removes __{pgd, pud, pmd, pte}_error() and call pr_err() from {pgd, pud, pmd, pte}_ERROR() directly, similar to what x86/powerpc are doing. With this, the code looks a bit simplified either. Signed-off-by: Gavin Shan Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20200913234730.23145-1-gshan@redhat.com Signed-off-by: Will Deacon commit 456b2f2dc7e585e1a031214c5698f1b00e02448b Author: David Howells Date: Mon Sep 14 12:57:13 2020 +0100 rxrpc: Fix an error goto in rxrpc_connect_call() Fix an error-handling goto in rxrpc_connect_call() whereby it will jump to free the bundle it failed to allocate. Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: David Howells commit 878dbe426a564b164e6d25d21d4bc29a02e7fc2c Author: Wolfram Sang Date: Mon Sep 14 13:28:45 2020 +0200 mmc: core: clear 'doing_init_tune' also after failures Reorganize the code, so that the flag is always cleared independently of a good or bad case. Fixes: 97a7d87e96b0 ("mmc: core: add a 'doing_init_tune' flag and a 'mmc_doing_tune' helper") Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200914112845.21855-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 03c9c8fad6cb5e8fdfb40287fa1cdf8ee2db0b67 Author: Amit Daniel Kachhap Date: Mon Sep 14 14:06:56 2020 +0530 arm64: kprobe: clarify the comment of steppable hint instructions The existing comment about steppable hint instruction is not complete and only describes NOP instructions as steppable. As the function aarch64_insn_is_steppable_hint allows all white-listed instruction to be probed so the comment is updated to reflect this. Signed-off-by: Amit Daniel Kachhap Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20200914083656.21428-7-amit.kachhap@arm.com Signed-off-by: Will Deacon commit 6560edca515e53bb2e7c637ab324313680a133f4 Author: Amit Daniel Kachhap Date: Mon Sep 14 14:06:55 2020 +0530 arm64: kprobe: disable probe of fault prone ptrauth instruction With the addition of ARMv8.3-FPAC feature, the probe of authenticate ptrauth instructions (AUT*) may cause ptrauth fault exception in case of authenticate failure so they cannot be safely single stepped. Hence the probe of authenticate instructions is disallowed but the corresponding pac ptrauth instruction (PAC*) is not affected and they can still be probed. Also AUTH* instructions do not make sense at function entry points so most realistic probes would be unaffected by this change. Signed-off-by: Amit Daniel Kachhap Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20200914083656.21428-6-amit.kachhap@arm.com Signed-off-by: Will Deacon commit ba9d1d3e3e7c34826b62498f7d6563b73c22ac13 Author: Amit Daniel Kachhap Date: Mon Sep 14 14:06:54 2020 +0530 arm64: cpufeature: Modify address authentication cpufeature to exact The current address authentication cpufeature levels are set as LOWER_SAFE which is not compatible with the different configurations added for Armv8.3 ptrauth enhancements as the different levels have different behaviour and there is no tunable to enable the lower safe versions. This is rectified by setting those cpufeature type as EXACT. The current cpufeature framework also does not interfere in the booting of non-exact secondary cpus but rather marks them as tainted. As a workaround this is fixed by replacing the generic match handler with a new handler specific to ptrauth. After this change, if there is any variation in ptrauth configurations in secondary cpus from boot cpu then those mismatched cpus are parked in an infinite loop. Following ptrauth crash log is observed in Arm fastmodel with simulated mismatched cpus without this fix, CPU features: SANITY CHECK: Unexpected variation in SYS_ID_AA64ISAR1_EL1. Boot CPU: 0x11111110211402, CPU4: 0x11111110211102 CPU features: Unsupported CPU feature variation detected. GICv3: CPU4: found redistributor 100 region 0:0x000000002f180000 CPU4: Booted secondary processor 0x0000000100 [0x410fd0f0] Unable to handle kernel paging request at virtual address bfff800010dadf3c Mem abort info: ESR = 0x86000004 EC = 0x21: IABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 [bfff800010dadf3c] address between user and kernel address ranges Internal error: Oops: 86000004 [#1] PREEMPT SMP Modules linked in: CPU: 4 PID: 29 Comm: migration/4 Tainted: G S 5.8.0-rc4-00005-ge658591d66d1-dirty #158 Hardware name: Foundation-v8A (DT) pstate: 60000089 (nZCv daIf -PAN -UAO BTYPE=--) pc : 0xbfff800010dadf3c lr : __schedule+0x2b4/0x5a8 sp : ffff800012043d70 x29: ffff800012043d70 x28: 0080000000000000 x27: ffff800011cbe000 x26: ffff00087ad37580 x25: ffff00087ad37000 x24: ffff800010de7d50 x23: ffff800011674018 x22: 0784800010dae2a8 x21: ffff00087ad37000 x20: ffff00087acb8000 x19: ffff00087f742100 x18: 0000000000000030 x17: 0000000000000000 x16: 0000000000000000 x15: ffff800011ac1000 x14: 00000000000001bd x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 71519a147ddfeb82 x9 : 825d5ec0fb246314 x8 : ffff00087ad37dd8 x7 : 0000000000000000 x6 : 00000000fffedb0e x5 : 00000000ffffffff x4 : 0000000000000000 x3 : 0000000000000028 x2 : ffff80086e11e000 x1 : ffff00087ad37000 x0 : ffff00087acdc600 Call trace: 0xbfff800010dadf3c schedule+0x78/0x110 schedule_preempt_disabled+0x24/0x40 __kthread_parkme+0x68/0xd0 kthread+0x138/0x160 ret_from_fork+0x10/0x34 Code: bad PC value After this fix, the mismatched CPU4 is parked as, CPU features: CPU4: Detected conflict for capability 39 (Address authentication (IMP DEF algorithm)), System: 1, CPU: 0 CPU4: will not boot CPU4: failed to come online CPU4: died during early boot [Suzuki: Introduce new matching function for address authentication] Suggested-by: Suzuki K Poulose Signed-off-by: Amit Daniel Kachhap Reviewed-by: Suzuki K Poulose Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20200914083656.21428-5-amit.kachhap@arm.com Signed-off-by: Will Deacon commit e16aeb072682d3dcdbdad452c974baa0d2b0c6db Author: Amit Daniel Kachhap Date: Mon Sep 14 14:06:53 2020 +0530 arm64: ptrauth: Introduce Armv8.3 pointer authentication enhancements Some Armv8.3 Pointer Authentication enhancements have been introduced which are mandatory for Armv8.6 and optional for Armv8.3. These features are, * ARMv8.3-PAuth2 - An enhanced PAC generation logic is added which hardens finding the correct PAC value of the authenticated pointer. * ARMv8.3-FPAC - Fault is generated now when the ptrauth authentication instruction fails in authenticating the PAC present in the address. This is different from earlier case when such failures just adds an error code in the top byte and waits for subsequent load/store to abort. The ptrauth instructions which may cause this fault are autiasp, retaa etc. The above features are now represented by additional configurations for the Address Authentication cpufeature and a new ESR exception class. The userspace fault received in the kernel due to ARMv8.3-FPAC is treated as Illegal instruction and hence signal SIGILL is injected with ILL_ILLOPN as the signal code. Note that this is different from earlier ARMv8.3 ptrauth where signal SIGSEGV is issued due to Pointer authentication failures. The in-kernel PAC fault causes kernel to crash. Signed-off-by: Amit Daniel Kachhap Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20200914083656.21428-4-amit.kachhap@arm.com Signed-off-by: Will Deacon commit 4ef333b2d10680b5d966a733ed7171f72164fcd5 Author: Amit Daniel Kachhap Date: Mon Sep 14 14:06:52 2020 +0530 arm64: traps: Allow force_signal_inject to pass esr error code Some error signal need to pass proper ARM esr error code to userspace to better identify the cause of the signal. So the function force_signal_inject is extended to pass this as a parameter. The existing code is not affected by this change. Signed-off-by: Amit Daniel Kachhap Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20200914083656.21428-3-amit.kachhap@arm.com Signed-off-by: Will Deacon commit 93396936ed0ce2c6f44140bd14728611d0bb065e Author: Amit Daniel Kachhap Date: Mon Sep 14 14:06:51 2020 +0530 arm64: kprobe: add checks for ARMv8.3-PAuth combined instructions Currently the ARMv8.3-PAuth combined branch instructions (braa, retaa etc.) are not simulated for out-of-line execution with a handler. Hence the uprobe of such instructions leads to kernel warnings in a loop as they are not explicitly checked and fall into INSN_GOOD categories. Other combined instructions like LDRAA and LDRBB can be probed. The issue of the combined branch instructions is fixed by adding group definitions of all such instructions and rejecting their probes. The instruction groups added are br_auth(braa, brab, braaz and brabz), blr_auth(blraa, blrab, blraaz and blrabz), ret_auth(retaa and retab) and eret_auth(eretaa and eretab). Warning log: WARNING: CPU: 0 PID: 156 at arch/arm64/kernel/probes/uprobes.c:182 uprobe_single_step_handler+0x34/0x50 Modules linked in: CPU: 0 PID: 156 Comm: func Not tainted 5.9.0-rc3 #188 Hardware name: Foundation-v8A (DT) pstate: 804003c9 (Nzcv DAIF +PAN -UAO BTYPE=--) pc : uprobe_single_step_handler+0x34/0x50 lr : single_step_handler+0x70/0xf8 sp : ffff800012af3e30 x29: ffff800012af3e30 x28: ffff000878723b00 x27: 0000000000000000 x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000 x23: 0000000060001000 x22: 00000000cb000022 x21: ffff800012065ce8 x20: ffff800012af3ec0 x19: ffff800012068d50 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : ffff800010085c90 x8 : 0000000000000000 x7 : 0000000000000000 x6 : ffff80001205a9c8 x5 : ffff80001205a000 x4 : ffff80001233db80 x3 : ffff8000100a7a60 x2 : 0020000000000003 x1 : 0000fffffffff008 x0 : ffff800012af3ec0 Call trace: uprobe_single_step_handler+0x34/0x50 single_step_handler+0x70/0xf8 do_debug_exception+0xb8/0x130 el0_sync_handler+0x138/0x1b8 el0_sync+0x158/0x180 Fixes: 74afda4016a7 ("arm64: compile the kernel with ptrauth return address signing") Fixes: 04ca3204fa09 ("arm64: enable pointer authentication") Signed-off-by: Amit Daniel Kachhap Reviewed-by: Dave Martin Link: https://lore.kernel.org/r/20200914083656.21428-2-amit.kachhap@arm.com Signed-off-by: Will Deacon commit a49e391c49c2ef3e8590030c522f195294532bad Merge: 91ca244bdcb6a 14801c624066a Author: Ulf Hansson Date: Mon Sep 14 11:46:47 2020 +0200 Merge branch 'fixes' into next commit 1a80b54d1ce1556bba6a8d8cd9384d6a9dcb641a Author: Janosch Frank Date: Mon Sep 7 08:46:59 2020 -0400 s390/uv: add destroy page call We don't need to export pages if we destroy the VM configuration afterwards anyway. Instead we can destroy the page which will zero it and then make it accessible to the host. Destroying is about twice as fast as the export. Signed-off-by: Janosch Frank Reviewed-by: Claudio Imbrenda Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Link: https://lore.kernel.org/kvm/20200907124700.10374-2-frankja@linux.ibm.com/ Signed-off-by: Janosch Frank Signed-off-by: Vasily Gorbik commit e670e64af1d46571be3d9b1177024d9c8520087c Author: Vasily Gorbik Date: Fri Sep 11 12:51:59 2020 +0200 s390/mm,ptdump: add couple of additional markers Signed-off-by: Vasily Gorbik [hca@linux.ibm.com: add more markers, rename some markers] Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d411e3c6744925f08a2c8682559ce77090144fa2 Author: Vasily Gorbik Date: Thu Sep 10 22:25:13 2020 +0200 s390/kasan: make shadow memory noexec ARCH_HAS_DEBUG_WX feature support brought attention to the fact that currently initial kasan shadow memory mapped without noexec flag. So fix that. Temporary initial identity mapping is still created without noexec, but it is replaced by properly set up paging later. Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 08c8e685c7c9223f9c4ad6365e02bebd3f106480 Author: Heiko Carstens Date: Wed Sep 9 17:10:29 2020 +0200 s390: add ARCH_HAS_DEBUG_WX support Checks the whole kernel address space for W+X mappings. Note that currently the first lowcore page unfortunately has to be mapped W+X. Therefore this not reported as an insecure mapping. For the very same reason the wording is also different to other architectures if the test passes: On s390 it is "no unexpected W+X pages found" instead of "no W+X pages found". Tested-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 6bf9a639e76e1da8eb1ed29e037e900106e1dff4 Author: Heiko Carstens Date: Wed Sep 9 11:14:52 2020 +0200 s390/mm,ptdump: make page table dumping seq_file optional s390 version of ae5d1cf358a5 ("arm64: dump: Make the page table dumping seq_file optional"). Tested-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 6c6687a444cfa62548e080a52e6c2d5d41577a73 Author: Heiko Carstens Date: Thu Sep 10 16:48:35 2020 +0200 s390/kprobes: make insn pages read-only Make sure that kprobe insn pages are not writable anymore. Tested-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit c3b2c9064e76fa3952c99982f11a98e0327f3dbe Author: Niklas Schnelle Date: Fri Aug 21 11:16:48 2020 +0200 s390/pci: remove clp_rescan_pci_devices_simple() clp_rescan_pci_devices_simple() is neither simpler than clp_scan_pci_devices() nor does it really scan PCI devices, in particular it will neither add newly discovered devices nor remove those which disappeared. Instead it only refreshes PCI function handles and also has just a single callsite in the same translation unit left which in fact only refreshes one specific function handle identified by a FID. Clarify this by renaming the function and its helper to clp_refresh_fh() respectvely __clp_refresh_fh() and make it take a fid directly which saves us dealing with the NULL case which updated all function handles but is not used anymore. Furthermore since the only callsite is in the same translation unit make it static. Reviewed-by: Matthew Rosato Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit 809fcfaf9238052f03e8002f6dad156a7fb6cd5e Author: Niklas Schnelle Date: Fri Aug 21 11:01:54 2020 +0200 s390/pci: remove clp_rescan_pci_devices() there is only one call site of clp_rescan_pci_devices() and all the function does is call zpci_remove_reserved_devices() followed by a duplicating clp_scan_pci_devices(). So inline the single call as a call to zpci_remove_reserved_devices() and clp_scan_pci_devices() and remove the function. Reviewed-by: Matthew Rosato Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit 2bce60b5032fe3ca225a36b80f6df90938f0ead6 Author: Niklas Schnelle Date: Fri Aug 21 10:26:40 2020 +0200 s390/pci: remove unused function zpci_rescan() the only caller of this was removed as part of the suspend/resume removal so no need to keep this function around. Reviewed-by: Matthew Rosato Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit abb95b7550f88bfb77081601f80662a259f2d143 Author: Niklas Schnelle Date: Mon Aug 17 10:29:23 2020 +0200 s390/pci: consolidate SR-IOV specific code currently we have multiple #ifdef CONFIG_PCI_IOV blocks spread over different compliation units and headers, all dealing with SR-IOV specific behavior. This violates the style guide which discourages conditionally compiled code blocks and hinders maintainability by speading SR-IOV functionality over many files. Let's move all of this into a conditionally compiled pci_iov.c file and local header and prefix SR-IOV specific functions with zpci_iov_*. Reviewed-by: Matthew Rosato Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit da1694ad9e8d13484c8b4ecaabde0bd7b958442a Author: Heiko Carstens Date: Mon Sep 7 17:20:05 2020 +0200 s390/mm,ptdump: hold cpa mutex while walking for kernel page table dump This is currently only preventing that outdated information is provided to user space. A concurrent split of huge/large pages does modify the kernel page tables, however either the huge/large mapping is reported or the split area is being walked. This "fixes" also only a potential future bug, since split pages could also be merged again if page permissions are the same for larger memory areas. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 36c2733c439caa424fe2b7dded870913dcb868ac Author: Heiko Carstens Date: Mon Sep 7 17:11:36 2020 +0200 s390/mm,ptdump: hold memory hotplug lock while walking for kernel page table dump This is the s390 variant of commit bf2b59f60ee1 ("arm64/mm: Hold memory hotplug lock while walking for kernel page table dump"). Right now this doesn't fix any real bug, however as soon as kvm patches get merged which make use of memory remove we might end up dereferencing/accessing freed page tables. Therefore fix this potential bug already now. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 9d719d39aab41d3b8b6f259574dc29a27f60e66c Author: Heiko Carstens Date: Fri Sep 4 17:41:27 2020 +0200 s390/mm,ptdump: convert to generic page table dumper Make use of generic ptdump infrastructure. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 0d574ad33e5b70383b4cee81024fcb8763aac591 Author: Harald Freudenberger Date: Wed Sep 9 12:02:46 2020 +0200 s390/zcrypt: simplify cca_findcard2 loop code Instead of two times go through the list of available AP devices (which may be up to 256 * 256 entries) this patch reworks the code do only run through once. The price is instead of reporting all possible devices to the caller only the first 256 devices are collected. However, having to choose from 256 AP devices is plenty of resources and should fulfill the caller's requirements. On the other side the loop code is much simplier and more easy to maintain. Signed-off-by: Harald Freudenberger Reviewed-by: Ingo Franzki Signed-off-by: Vasily Gorbik commit bcb53209be5cb32d485507452edda19b78f31d84 Author: Masami Hiramatsu Date: Tue Sep 1 00:12:07 2020 +0900 kprobes: Fix to check probe enabled before disarm_kprobe_ftrace() Commit: 0cb2f1372baa ("kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler") fixed one bug but the underlying bugs are not completely fixed yet. If we run a kprobe_module.tc of ftracetest, a warning triggers: # ./ftracetest test.d/kprobe/kprobe_module.tc === Ftrace unit tests === [1] Kprobe dynamic event - probing module ... ------------[ cut here ]------------ Failed to disarm kprobe-ftrace at trace_printk_irq_work+0x0/0x7e [trace_printk] (-2) WARNING: CPU: 7 PID: 200 at kernel/kprobes.c:1091 __disarm_kprobe_ftrace.isra.0+0x7e/0xa0 This is because the kill_kprobe() calls disarm_kprobe_ftrace() even if the given probe is not enabled. In that case, ftrace_set_filter_ip() fails because the given probe point is not registered to ftrace. Fix to check the given (going) probe is enabled before invoking disarm_kprobe_ftrace(). Fixes: 0cb2f1372baa ("kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler") Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/159888672694.1411785.5987998076694782591.stgit@devnote2 commit 32fc5aa2df12c7a95dbd1c2c9ee3eb8d7f920d9e Author: Bartosz Golaszewski Date: Wed Sep 9 10:54:26 2020 +0200 gpiolib: unexport devprop_gpiochip_set_names() Now that devprop_gpiochip_set_names() is only used in a single place inside drivers/gpio/gpiolib.c, there's no need anymore for it to be exported or to even live in its own source file. Pull this function into the core source file for gpiolib. Signed-off-by: Bartosz Golaszewski Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko commit 7cba1a4d5e1628e099728d849918de50dab2e24e Author: Bartosz Golaszewski Date: Wed Sep 9 10:54:25 2020 +0200 gpiolib: generalize devprop_gpiochip_set_names() for device properties devprop_gpiochip_set_names() is overly complicated with taking the fwnode argument (which requires using dev_fwnode() & of_fwnode_handle() in ACPI and OF GPIO code respectively). Let's just switch to using the generic device properties. This allows us to pull the code setting line names directly into gpiochip_add_data_with_key() instead of handling it separately for ACPI and OF. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Mika Westerberg commit 6b6ff4acb310a0351005474673f1e09a90020efd Author: Bartosz Golaszewski Date: Wed Sep 9 10:54:24 2020 +0200 device: property: add helpers to count items in string arrays Instead of doing the following: count = device_property_read_string_array(dev, propname, NULL, 0); Let's provide inline helpers with hardcoded arguments for counting strings in property arrays. Suggested-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko commit 8d4a85b6abd3cd91234d1760c0dda780767d3b84 Author: Bartosz Golaszewski Date: Tue Sep 8 15:12:25 2020 +0200 gpiolib: switch to simpler IDA interface We don't need to specify any ranges when allocating IDs so we can switch to ida_alloc() and ida_free() instead of the ida_simple_ counterparts. ida_simple_get(ida, 0, 0, gfp) is equivalent to ida_alloc_range(ida, 0, UINT_MAX, gfp) which is equivalent to ida_alloc(ida, gfp). Note: IDR will never actually allocate an ID larger than INT_MAX. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit c53ec7bcc780fde4916e7a563d68b90b20b0b6bc Author: Wang Hai Date: Fri Sep 11 19:40:36 2020 +0800 ext2: Fix some kernel-doc warnings in balloc.c Fixes the following W=1 kernel build warning(s): fs/ext2/balloc.c:203: warning: Excess function parameter 'rb_root' description in '__rsv_window_dump' fs/ext2/balloc.c:294: warning: Excess function parameter 'rb_root' description in 'search_reserve_window' fs/ext2/balloc.c:878: warning: Excess function parameter 'rsv' description in 'alloc_new_reservation' Link: https://lore.kernel.org/r/20200911114036.60616-1-wanghai38@huawei.com Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Jan Kara commit 3328c656663f59382879992419859d73f359ac59 Author: Andre Przywara Date: Mon Sep 7 13:18:31 2020 +0100 ARM: dts: hisilicon: Fix SP805 clocks The SP805 DT binding requires two clocks to be specified, but Hisilicon platform DTs currently only specify one clock. In practice, Linux would pick a clock named "apb_pclk" for the bus clock, and the Linux and U-Boot SP805 driver would use the first clock to derive the actual watchdog counter frequency. Since currently both are the very same clock, we can just double the clock reference, and add the correct clock-names, to match the binding. Signed-off-by: Andre Przywara Signed-off-by: Wei Xu commit 180a4c42e541cabe478c3f6e6c986a6b61744407 Author: Julian Wiedmann Date: Mon Aug 24 17:32:52 2020 +0300 s390/qdio: always use dev_name() for device name in QIB Passing a custom name from the device driver is nice - but in practice it's only zfcp who has been using this. So we might as well hard-code a naming scheme in the qdio layer, so that qeth also benefits from it. Signed-off-by: Julian Wiedmann Reviewed-by: Steffen Maier Signed-off-by: Vasily Gorbik commit b02002cc4c0f8a2340d07690f58cae0c04ba2325 Author: Niklas Schnelle Date: Mon Jul 13 14:12:49 2020 +0200 s390/pci: Implement ioremap_wc/prot() with MIO With our current support for the new MIO PCI instructions, write combining/write back MMIO memory can be obtained via the pci_iomap_wc() and pci_iomap_wc_range() functions. This is achieved by using the write back address for a specific bar as provided in clp_store_query_pci_fn() These functions are however not widely used and instead drivers often rely on ioremap_wc() and ioremap_prot(), which on other platforms enable write combining using a PTE flag set through the pgrprot value. While we do not have a write combining flag in the low order flag bits of the PTE like x86_64 does, with MIO support, there is a write back bit in the physical address (bit 1 on z15) and thus also the PTE. Which bit is used to toggle write back and whether it is available at all, is however not fixed in the architecture. Instead we get this information from the CLP Store Logical Processor Characteristics for PCI command. When the write back bit is not provided we fall back to the existing behavior. Signed-off-by: Niklas Schnelle Reviewed-by: Pierre Morel Reviewed-by: Gerald Schaefer Signed-off-by: Vasily Gorbik commit 4d4a3caaf36246520d61c17a9fd86ce3893f6595 Author: Julian Wiedmann Date: Wed Feb 19 11:15:30 2020 +0100 s390/qdio: clean up QDR setup __qdio_allocate_fill_qdr() is meant to set up one specific queue descriptor in the QDR. But for this simple task, it gets passed a bunch of global structs and offsets - and then navigates through the structs to find its actual operands. Clean up all the complicated pointer chasing & index calculation, and just pass a descriptor and its associated queue struct. While at it also add some virt_to_phys() translations, to clarify that addresses in the QDR are meant to be absolute. Signed-off-by: Julian Wiedmann Signed-off-by: Vasily Gorbik commit 309f98dbc66cb183a84781e2b19595f044a2d6e4 Author: Julian Wiedmann Date: Thu Feb 6 17:52:03 2020 +0100 s390/qdio: make qdio_handle_aobs() more robust When processing a PENDING buffer with no attached aob, the current code would get stuck on this buffer (as the 'continue' causes us to not advance the buffer index) and process it repeatedly until the loop terminates eventually. Luckily this should never happen - the HW must not use the PENDING state when no aob was provided. But we can still make this code path less fragile and protect against buggy devices. Signed-off-by: Julian Wiedmann Signed-off-by: Vasily Gorbik commit 4bf3ec384edf0bf893ec7bd62ccebb635b02efd9 Author: Sven Schnelle Date: Mon Sep 7 17:45:37 2020 +0200 s390: disable branch profiling for vdso When branch profiling is enabled, if () gets annotated with code to instrument the hit/miss ratio. This doesn't work for VDSO as we can't access kernel code. Add -DDISABLE_BRANCH_PROFILING to fix this. Reported-by: Thomas Richter Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit bbc11b34fa3dc3d9dc7b547141cdd765025567c3 Merge: 05fa34dcdb34d 9ba3a0aa09fe5 Author: Greg Kroah-Hartman Date: Mon Sep 14 10:24:48 2020 +0200 Merge tag 'fpga-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga into char-misc-next Moritz writes: Here is the first set of changes for the 5.10-rc1 merge window. Xilinx: - Luca's changes clean up the xilinx-spi driver and add better diagnostics on errors. Core: - I cleaned up a stray comment. - Richard's change marks FPGA manager tasks un-interruptible. - Tom has agreed to help out as Reviewer in the FPGA Manager subsystem. DFL: - Xu's changes add a new bus that is the first part of a series to support adding devices via DFL (the other parts are still under review) All patches have been reviewed on the mailing list, and have been in the last few linux-next releases (as part of my for-next branch) without issues. Signed-off-by: Moritz Fischer * tag 'fpga-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga: fpga: dfl: create a dfl bus type to support DFL devices fpga: fpga-region: Cleanup an outdated comment fpga: dfl: map feature mmio resources in their own feature drivers fpga manager: xilinx-spi: provide better diagnostics on programming failure fpga manager: xilinx-spi: add error checking after gpiod_get_value() fpga manager: xilinx-spi: fix write_complete timeout handling fpga manager: xilinx-spi: remove final dot from dev_err() strings fpga manager: xilinx-spi: remove stray comment fpga: dfl: change data type of feature id to u16 MAINTAINERS: Add Tom Rix as fpga reviewer fpga: stratix10-soc: make FPGA task un-interruptible commit c26979a7acf20ab093513d8c09e371b212e02ded Author: Andre Przywara Date: Mon Sep 7 13:18:26 2020 +0100 ARM: dts: hisilicon: Fix SP804 users The SP804 binding only specifies one or three clocks, but does not allow just two clocks. The HiSi 3620 .dtsi specified two clocks for the two timers, plus gave one "apb_pclk" clock-name to appease the primecell bus driver. Extend the clocks by duplicating the first clock to the end of the clock list, and add two dummy clock-names to make the primecell driver happy. I don't know what the real APB clock for the IP is, but with the current DT the first timer clock was used for that, so this change keeps the current status. Signed-off-by: Andre Przywara Signed-off-by: Wei Xu commit fccee0baced04636952cd580ddee4bb8cbb9544c Merge: a5a6d2753e7ec 856deb866d16e Author: Greg Kroah-Hartman Date: Mon Sep 14 10:10:55 2020 +0200 Merge 5.9-rc5 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 9ef8638bd8c7e06bee087a04af7950cbc6123828 Merge: 0de7511695680 856deb866d16e Author: Greg Kroah-Hartman Date: Mon Sep 14 10:08:57 2020 +0200 Merge 5.9-rc5 into driver-core-next We need the driver core changes in here as well. Signed-off-by: Greg Kroah-Hartman commit 05fa34dcdb34d2a496ef89d8f361ca697643edec Merge: f7dbcd1770315 856deb866d16e Author: Greg Kroah-Hartman Date: Mon Sep 14 10:07:08 2020 +0200 Merge 5.9-rc5 into char-misc-next We want the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit a665b2c1d28403e385054447cc319095527bedde Author: Andre Przywara Date: Mon Sep 7 13:18:29 2020 +0100 arm64: dts: hisilicon: Fix SP805 clocks The SP805 DT binding requires two clocks to be specified, but Hisilicon platform DTs currently only specify one clock. In practice, Linux would pick a clock named "apb_pclk" for the bus clock, and the Linux and U-Boot SP805 driver would use the first clock to derive the actual watchdog counter frequency. Since currently both are the very same clock, we can just double the clock reference, and add the correct clock-names, to match the binding. Signed-off-by: Andre Przywara Signed-off-by: Wei Xu commit d88656f475d9eba9b23fa71ab59b225459776d6f Author: Thomas Zimmermann Date: Fri Sep 11 09:59:22 2020 +0200 drm/vboxvideo: Use drm_gem_vram_vmap() interfaces VRAM helpers support ref counting for pin and vmap operations, no need to avoid these operations by employing the internal kmap interface. Just use drm_gem_vram_vmap() and let it handle the details. Also unexport the kmap interfaces from VRAM helpers. Vboxvideo was the last user of these internal functions. v2: * fixed a comma in commit description Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Tested-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200911075922.19317-1-tzimmermann@suse.de commit cc3a392d69b62e21d016f0d45be688af133f9122 Author: Parshuram Thombare Date: Tue Aug 25 08:31:49 2020 +0200 i3c: master: fix for SETDASA and DAA process This patch fix following issue. Controller slots blocked for devices with static_addr but no init_dyn_addr may limit the number of I3C devices on the bus which gets dynamic address in DAA. So instead of attaching all the devices with static_addr, now we only attach the devices which successfully complete SETDASA. For remaining devices with init_dyn_addr, i3c_master_add_i3c_dev_locked() will try to set requested dynamic address after DAA. Signed-off-by: Parshuram Thombare Signed-off-by: Boris Brezillon Link: https://lore.kernel.org/linux-i3c/1598337109-14770-1-git-send-email-pthombar@cadence.com commit 4238e52cc351e893ebd05e8d7ea97edb3f81d978 Author: Johnny Chuang Date: Sun Sep 13 23:35:27 2020 -0700 Input: elants_i2c - report resolution of ABS_MT_TOUCH_MAJOR by FW information. This patch adds a new behavior to report touch major resolution based on information provided by firmware. In initial process, driver acquires touch information from touch ic. It contains one byte about the resolution value of ABS_MT_TOUCH_MAJOR. Touch driver will report touch major resolution by this information. Signed-off-by: Johnny Chuang Reviewed-by: Harry Cutts Link: https://lore.kernel.org/r/1598581195-9874-1-git-send-email-johnny.chuang.emc@gmail.com Signed-off-by: Dmitry Torokhov commit f492ffe414a7cddc4fd7351563300bc8711ca187 Author: Furquan Shaikh Date: Tue Sep 8 17:32:16 2020 -0700 Input: raydium_i2c_ts - use single i2c_transfer transaction when using RM_CMD_BANK_SWITCH On an AMD chromebook, where the same I2C bus is shared by both Raydium touchscreen and a trackpad device, it is observed that interleaving of I2C messages when `raydium_i2c_read_message()` is called leads to the Raydium touch IC reporting incorrect information. This is the sequence that was observed to result in the above issue: * I2C write to Raydium device for RM_CMD_BANK_SWITCH * I2C write to trackpad device * I2C read from trackpad device * I2C write to Raydium device for setting address * I2C read from Raydium device >>>> This provides incorrect information This change adds a new helper function `raydium_i2c_xfer()` that performs I2C transactions to the Raydium device. It uses the register address to decide if RM_CMD_BANK_SWITCH header needs to be sent to the device (i.e. if register address is greater than 255, then bank switch header is sent before the rest of the transaction). Additionally, it ensures that all the I2C operations performed as part of `raydium_i2c_xfer()` are done as a single i2c_transfer. This guarantees that no other transactions are initiated to any other device on the same bus in between. Additionally, `raydium_i2c_{send|read}*` functions are refactored to use this new helper function. Verified with the patch across multiple reboots (>100) that the information reported by the Raydium touchscreen device during probe is correct. Signed-off-by: Furquan Shaikh Link: https://lore.kernel.org/r/20200821024006.3399663-1-furquan@google.com Signed-off-by: Dmitry Torokhov commit 66d90f6ecee755e9c19a119c9255e80091165498 Author: Sudeep Holla Date: Mon Sep 7 12:09:23 2020 +0100 firmware: arm_scmi: Enable building as a single module Now, with all the plumbing in place to enable building scmi as a module instead of built-in modules, let us enable the same. Link: https://lore.kernel.org/r/20200907195046.56615-5-sudeep.holla@arm.com Tested-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 1eaf18e35a783a007ef03e09f1dfc3de81eace7c Author: Sudeep Holla Date: Mon Sep 7 12:06:01 2020 +0100 firmware: arm_scmi: Move scmi protocols registration into the driver In preparation to enable building SCMI as a single module, let us move the SCMI protocol registration call into the driver. This enables us to also add unregistration of the SCMI protocols. The main reason for this is to keep it simple instead of maintaining it as separate modules and dealing with all possible initcall races and deferred probe handling. We can move it as separate modules if needed in future. Link: https://lore.kernel.org/r/20200907195046.56615-4-sudeep.holla@arm.com Tested-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 5a2f0a0bdf201e2183904b6217f9c74774c961a8 Author: Sudeep Holla Date: Mon Sep 7 12:00:04 2020 +0100 firmware: arm_scmi: Move scmi bus init and exit calls into the driver In preparation to enable building scmi as a single module, let us move the scmi bus {de-,}initialisation call into the driver. The main reason for this is to keep it simple instead of maintaining it as separate modules and dealing with all possible initcall races and deferred probe handling. We can move it as separate modules if needed in future. Link: https://lore.kernel.org/r/20200907195046.56615-3-sudeep.holla@arm.com Tested-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 6825f17c950ca5691a057fa71bb1b649b7434014 Author: Sudeep Holla Date: Tue Jun 23 15:33:57 2020 +0100 firmware: smccc: Export both smccc functions We need to export both arm_smccc_1_1_get_conduit and arm_smccc_get_version to allow several modules make use of them. Arm FFA, Arm SCMI and PTP drivers are few drivers that are planning to use these functions. Let us export them in preparation to add support for SCMI as module. Link: https://lore.kernel.org/r/20200907195046.56615-2-sudeep.holla@arm.com Signed-off-by: Sudeep Holla commit 78a5b53e9fb4d9a4437b6262b79278d2cd4669c9 Author: Hans de Goede Date: Sun Sep 13 23:07:27 2020 -0700 Input: soc_button_array - work around DSDTs which modify the irqflags Some 2-in-1s which use the soc_button_array driver have this ugly issue in their DSDT where the _LID method modifies the irq-type settings of the GPIOs used for the power and home buttons. The intend of this AML code is to disable these buttons when the lid is closed. The AML does this by directly poking the GPIO controllers registers. This is problematic because when re-enabling the irq, which happens whenever _LID gets called with the lid open (e.g. on boot and on resume), it sets the irq-type to IRQ_TYPE_LEVEL_LOW. Where as the gpio-keys driver programs the type to, and expects it to be, IRQ_TYPE_EDGE_BOTH. This commit adds a workaround for this which (on affected devices) does not set gpio_keys_button.gpio on these 2-in-1s, instead it gets the irq for the GPIO, configures it as IRQ_TYPE_LEVEL_LOW (to match how the _LID AML code configures it) and passes the irq in gpio_keys_button.irq. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200906122016.4628-2-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 4e5d9c198349233b2ba9eb41597a8fc9a662d608 Author: Hans de Goede Date: Sun Sep 13 23:05:19 2020 -0700 Input: soc_button_array - add support for INT33D3 tablet-mode switch devices According to the Microsoft documentation for Windows 8 convertible devices, these devices should implement a PNP0C60 "laptop/slate mode state indicator" ACPI device. This device can work in 2 ways, if there is a GPIO which directly indicates the device is in tablet-mode or not then the direct-gpio mode should be used. If there is no such GPIO, but instead the events are coming from e.g. the embedded-controller, then there should still be a PNP0C60 ACPI device and event-injection should be used to send the events. The drivers/platform/x86/intel-vbtn.c code is an example from a standardized manner of doing the latter. On various 2-in-1s with either a detachable keyboard, or with 360° hinges, the direct GPIO mode is indicated by an ACPI device with a HID of INT33D3, which contains a single GpioInt in its ACPI resource table, which directly indicates if the device is in tablet-mode or not. This commit adds support for this to the soc_button_array code, as well as for the alternative ID9001 HID which some devices use instead of the INT33D3 HID. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200826150601.12137-3-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 838fc8083b6241c50b0be105b47006b3ae9c9ed8 Author: Hans de Goede Date: Sun Sep 13 23:04:28 2020 -0700 Input: soc_button_array - add active_low setting to soc_button_info This is a preparation patch for adding support for Intel INT33D3 ACPI devices. These INT33D3 devices follow yet another Intel defined (but not documented) ACPI GPIO button standard. Unlike the ACPI GPIO button devices supported so far, the GPIO used in the INT33D3 devices is active-high, rather then active-low. This commit makes setting the gpio_keys_button.active_low flag configurable through the soc_button_info struct and enables it for all currently supported devices. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200826150601.12137-2-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 64ea21e0173778c5dde08394418cfd5e8cf54641 Author: Adrian Schmutzler Date: Sun Aug 30 22:05:51 2020 +0200 arm64: dts: hisilicon: replace status value "ok" by "okay" While the DT parser recognizes "ok" as a valid value for the "status" property, it is actually mentioned nowhere. Use the proper value "okay" instead, as done in the majority of files already. Signed-off-by: Adrian Schmutzler Signed-off-by: Wei Xu commit 3338ca533b95bc3b39931847792104f8a1fe4676 Author: Vinod Koul Date: Mon Sep 14 11:04:09 2020 +0530 dmaengine: sf-pdma: remove unused 'desc' 'desc' variable is now defined but not used in sf_pdma_donebh_tasklet(), causing this warning: drivers/dma/sf-pdma/sf-pdma.c: In function 'sf_pdma_donebh_tasklet': drivers/dma/sf-pdma/sf-pdma.c:287:23: warning: unused variable 'desc' [-Wunused-variable] Remove this unused variable Reported-by: Stephen Rothwell Signed-off-by: Vinod Koul commit 1622d35453132a1acd6d650175f9f45e4bcf553e Merge: 978620cc4f557 856deb866d16e Author: Greg Kroah-Hartman Date: Mon Sep 14 06:57:52 2020 +0200 Merge 5.9-rc5 into staging-next We want the staging/iio changes in here as well. Signed-off-by: Greg Kroah-Hartman commit b1c0da47cc1797fce8e426f697139ab84170aee7 Author: Łukasz Patron Date: Sat Jul 25 10:24:17 2020 +0200 arm64: dts: qcom: pm660: Fix missing pound sign in interrupt-cells Also add a space after '=' while at it. Tested-by: Konrad Dybcio Signed-off-by: Łukasz Patron Link: https://lore.kernel.org/r/20200725082417.8507-1-priv.luk@gmail.com Signed-off-by: Bjorn Andersson commit 51e9874d382e089f664b3ce12773bbbaece5f369 Author: Stephen Boyd Date: Tue Aug 11 12:25:03 2020 -0700 arm64: dts: qcom: sc7180: Drop flags on mdss irqs The number of interrupt cells for the mdss interrupt controller is 1, meaning there should only be one cell for the interrupt number, not two where the second cell is the irq flags. Drop the second cell to match the binding. Cc: Kalyan Thota Cc: Harigovindan P Link: https://lore.kernel.org/r/20200811192503.1811462-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 5f854f096f1979865816a4f51d84e2a0f1095a0f Author: Gokul Sriram Palanisamy Date: Thu Aug 6 15:02:10 2020 +0530 dt-bindings: qcom: Add ipq8074 bindings Document the new device-tree bindings for boards HK10-C1 and HK10-C2 based on ipq8074 SoC. Acked-by: Rob Herring Signed-off-by: Gokul Sriram Palanisamy Link: https://lore.kernel.org/r/1596706332-12957-2-git-send-email-gokulsri@codeaurora.org Signed-off-by: Bjorn Andersson commit 292b18741eb2a24a2c92fae1e9fde05a6b212ea6 Author: Kathiravan T Date: Mon Aug 17 10:58:36 2020 +0530 arm64: dts: ipq8074: Use the A53 PMU compatible IPQ8074 has A53 cores, so lets use the corresponding PMU compatible. Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1597642116-15902-1-git-send-email-kathirav@codeaurora.org Signed-off-by: Bjorn Andersson commit 36f91e63160856344a25f8b814a65765756a2141 Author: Kathiravan T Date: Mon Aug 17 12:48:40 2020 +0530 arm64: dts: ipq6018: enable DVFS support Add A53 PLL, APCS clock, RPM Glink, RPM message RAM, cpu-opp-table, SMPA2 regulator to enable the cpu frequency on IPQ6018. Co-developed-by: Sivaprakash Murugesan Signed-off-by: Sivaprakash Murugesan Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1597648720-13649-3-git-send-email-kathirav@codeaurora.org Signed-off-by: Bjorn Andersson commit 5a8c1669f3de2181745b5e9bb9c6758dae301a04 Author: Kathiravan T Date: Mon Aug 17 12:48:39 2020 +0530 dt-bindings: mailbox: add compatible for the IPQ6018 SoC Add the mailbox compatible for the IPQ6018 SoC. Acked-by: Rob Herring Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1597648720-13649-2-git-send-email-kathirav@codeaurora.org Signed-off-by: Bjorn Andersson commit 7a1dcc9d022f180ef95cc966dfbbfc22dc6efa1c Author: Adrian Schmutzler Date: Sun Aug 30 22:08:45 2020 +0200 arm64: dts: qcom: replace status value "ok" by "okay" While the DT parser recognizes "ok" as a valid value for the "status" property, it is actually mentioned nowhere. Use the proper value "okay" instead, as done in the majority of files already. Signed-off-by: Adrian Schmutzler Link: https://lore.kernel.org/r/20200830200845.1771-1-freifunk@adrianschmutzler.de Signed-off-by: Bjorn Andersson commit 949766e0a32aa9671e4a9a2d4bc1491a42f9743a Author: Kathiravan T Date: Mon Aug 31 13:57:08 2020 +0530 arm64: dts: ipq8074: enable watchdog support Enable watchdog support for the IPQ8074 SoCs. Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1598862428-13996-1-git-send-email-kathirav@codeaurora.org Signed-off-by: Bjorn Andersson commit 9ff8b0591fcfdb455ae3797c2b592fa20a57726b Author: Jonathan Marek Date: Thu Sep 3 17:59:23 2020 -0400 arm64: dts: qcom: sm8250: use the right clock-freqency for sleep-clk Downstream has this clock as 32000 rate, but testing shows it is close to 32768. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200903215923.14314-1-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit bcd86d327a65b5aa7dc4e42f4c65810b1b071263 Author: Douglas Anderson Date: Tue Sep 8 13:31:17 2020 -0700 arm64: dts: qcom: Add sc7180-lazor sku2 Add a new SKU variant. This is a pick from the downstream tree that is the current source of truth for this platform. Link: https://crrev.com/c/2386997 Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200908133037.1.Ia98a6b938453254e360c4a9fa253d2d6807dff3f@changeid Signed-off-by: Bjorn Andersson commit 135db20655ca73ca328b9379fd181e5c87ab6429 Author: Venkata Lakshmi Narayana Gubba Date: Thu Sep 10 16:19:40 2020 +0530 arm64: dts: qcom: sc7180: Remove clock for bluetooth on SC7180 IDP board Removed voting for RPMH_RF_CLK2 which is not required as it is getting managed by BT SoC through SW_CTRL line. Signed-off-by: Venkata Lakshmi Narayana Gubba Link: https://lore.kernel.org/r/1599734980-22580-1-git-send-email-gubbaven@codeaurora.org Signed-off-by: Bjorn Andersson commit c0011172f9417b414f51c4ff351519dc8244c925 Author: Dmitry Baryshkov Date: Mon Sep 14 01:47:38 2020 +0300 arm64: dts: qcom: sm8250-mtp: add i2c device tree nodes Add device tree nodes describing used i2c busses according to the dts found in msm-4.19 tree. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200913224738.30046-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 76bd127e6ca51e4fc257f3d82813c92a322e13d2 Author: Dmitry Baryshkov Date: Mon Sep 14 01:51:35 2020 +0300 arm64: dts: qcom: sm8250: add bi_tcxo_ao to gcc clocks Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200913225135.30366-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit e059c6f340f6fccadd3db9993f06d4cc51305804 Author: Christophe JAILLET Date: Sun Sep 13 14:55:46 2020 +0200 tulip: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'tulip_init_one()' GFP_KERNEL can be used because it is a probe function and no lock is taken in the between. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 7a1fe380f662bf6bea715248261a5cff96168a34 Author: Christophe JAILLET Date: Sun Sep 13 14:44:53 2020 +0200 tulip: de2104x: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'de_alloc_rings()' GFP_KERNEL can be used because it is only called from 'de_open()' which is a '.ndo_open' function. Such functions are synchronized using the rtnl_lock() semaphore and no lock is taken in the between. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Acked-by: Moritz Fischer Signed-off-by: David S. Miller commit af114c42a39f7d9aa0c63081cabda9564a99a585 Author: Christophe JAILLET Date: Sun Sep 13 14:38:34 2020 +0200 tulip: dmfe: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'dmfe_init_one()' GFP_KERNEL can be used because it is a probe function and no lock is taken in the between. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit b5a3922a611c73846485f352c0696502cfb2bece Author: Christophe JAILLET Date: Sun Sep 13 14:30:42 2020 +0200 tulip: uli526x: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'uli526x_init_one()' GFP_KERNEL can be used because it is a probe function and no lock is taken in the between. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 068b62148255c796516bdd2bb2435c49ac33aa18 Author: Russell King Date: Sun Sep 13 08:05:52 2020 +0100 net: mvpp2: set SKBTX_IN_PROGRESS Richard Cochran points out that SKBTX_IN_PROGRESS should be set when the skbuff is queued for timestamping. Add this. Signed-off-by: Russell King Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 5eb2cd07c902a2efc3ed7fe94861d604c7f09d98 Author: Christophe JAILLET Date: Sun Sep 13 09:01:07 2020 +0200 tulip: windbond-840: Fix a debug message 'w89c840_open()' is incorrectly reported in a debug message. Use __func__ instead. While at it, fix some style issue in the same function. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 5911419f277b6898176e75c4f18e60b01d0bf036 Author: Christophe JAILLET Date: Sun Sep 13 08:57:11 2020 +0200 tulip: windbond-840: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'alloc_ringdesc()' GFP_KERNEL can be used because it is only called from 'netdev_open()' which is a '.ndo_open' function. Such functions are synchronized using the rtnl_lock() semaphore and no lock is taken in the between. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit b49db89e9697ddfa7fbe7387e176072ee2feb2db Author: Christophe JAILLET Date: Sun Sep 13 08:14:17 2020 +0200 net: dl2k: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'rio_probe1()' GFP_KERNEL can be used because it is a probe function and no lock is taken in the between. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit fd9e4d6fec15d9a6599c5079f3c65155821af033 Author: Christophe JAILLET Date: Sun Sep 13 07:46:28 2020 +0200 natsemi: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'alloc_ring()' (natsemi.c) GFP_KERNEL can be used because it is only called from 'netdev_open()', which is a '.ndo_open' function. Such function are synchronized with the rtnl_lock() semaphore. When memory is allocated in 'ns83820_init_one()' (ns83820.c) GFP_KERNEL can be used because it is a probe function and no lock is taken in the between. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit a19d1358345e040af9164ee7dd0f39ea0a99d565 Author: Sumera Priyadarsini Date: Sun Sep 13 17:35:48 2020 +0530 scripts: coccicheck: Improve error feedback when coccicheck fails Currently, coccicheck fails with only the message "coccicheck failed" and the error code for the failure. To obtain the error logs, one needs to specify a debug file using the DEBUG_FILE option. Modify coccicheck to display error logs when it crashes unless DEBUG_FILE is set, in which case, the error logs are stored in the specified debug file. Signed-off-by: Sumera Priyadarsini Signed-off-by: Julia Lawall commit bd2fad8cd302ba88b9ae32ac4bfcbddfae443858 Merge: bac9bd958aec5 fb8a0b80c4bb4 Author: Olof Johansson Date: Sun Sep 13 11:40:17 2020 -0700 Merge tag 'arm-soc/for-5.10/drivers' of https://github.com/Broadcom/stblinux into arm/drivers This pull request contains Broadcom SoCs drivers changes for 5.10, please pull the following: - Alvaro adds support for the BCM63xx (DSL) SoCs power domain controller and adds support for the 6318, 6328, 6362, 63268. - Florian adds support for tuning the Bus Interface Unit on 72164 and 72165, enables the Brahma-B53 and Cortex-A72 read-ahead cache for the 64-bit capable ARCH_BRCMSTB platforms, and finally updates the GISB driver to support breakpoint notifications. * tag 'arm-soc/for-5.10/drivers' of https://github.com/Broadcom/stblinux: bus: brcmstb_gisb: Add support for breakpoint interrupts dt-bindings: bus: Document breakpoint interrupt for gisb-arb soc: bcm: brcmstb: biuctrl: Change RAC data line prefetching after 4 consecutive lines soc: bcm: brcmstb: biuctrl: Change RAC prefetch distance from +/-1 to +/- 2 soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72165 soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72164 MIPS: BMIPS: dts: add BCM63268 power domain support MIPS: BMIPS: dts: add BCM6362 power domain support MIPS: BMIPS: dts: add BCM6328 power domain support soc: bcm: add BCM63xx power domain driver MIPS: BMIPS: add BCM6318 power domain definitions MIPS: BMIPS: add BCM63268 power domain definitions MIPS: BMIPS: add BCM6362 power domain definitions MIPS: BMIPS: add BCM6328 power domain definitions dt-bindings: soc: brcm: add BCM63xx power domain binding soc: bcm: brcmstb: biuctrl: Enable Read-ahead cache bus: brcmstb_gisb: Shorten prints Link: https://lore.kernel.org/r/20200912032153.1216354-3-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 632db90624b150aa9a33692437d3469d9272b0d5 Merge: 0a29f7e408ab7 4e5cafa8b3ea4 Author: Olof Johansson Date: Sun Sep 13 11:38:15 2020 -0700 Merge tag 'arm-soc/for-5.10/soc' of https://github.com/Broadcom/stblinux into arm/soc This pull request contains Broadcom ARM-based SoCs changes for 5.10, please pull the following: - Florian adds debug UART entries for the 72164 and 72165 SoCs and updates ARCH_BRCMSTB to select CONFIG_BCM7038_L1_IRQ which is an interrupt controller used with the 7211 chip family * tag 'arm-soc/for-5.10/soc' of https://github.com/Broadcom/stblinux: ARM: brcmstb: Add debug UART entry for 72615 ARM: bcm: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB ARM: brcmstb: Add debug UART entry for 72614 Link: https://lore.kernel.org/r/20200912032153.1216354-5-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 0a29f7e408ab73354f6fc378f3a0e6b2a4ba3aad Merge: 989286ffe8320 487047b87a6c3 Author: Olof Johansson Date: Sun Sep 13 11:37:46 2020 -0700 Merge tag 'arm-soc/for-5.10/maintainers' of https://github.com/Broadcom/stblinux into arm/soc This pull request contains Broadcom SoCs changes to the MAINTAINERS file for 5.10, please pull the following: - Christian updates the BCM5301x (Northstar) section to cover additional files added for the Cisco Meraki MR32 * tag 'arm-soc/for-5.10/maintainers' of https://github.com/Broadcom/stblinux: MAINTAINERS: extend BCM5301X ARM ARCHITECTURE files Link: https://lore.kernel.org/r/20200912032153.1216354-4-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 5f37a0d90360b97d5c01f8570a177ef36428f6f4 Merge: ba601120cfbdc 6534dfbbfab3d Author: Olof Johansson Date: Sun Sep 13 11:36:10 2020 -0700 Merge tag 'arm-soc/for-5.10/devicetree-arm64' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM64-based SoCs changes for 5.10, please pull the following: - Adrian changes the status properties from "ok" to "okay" - Andre fixes the SP805 watchdog nodes to have the correct clock names and binding for the Northstar 2 platform * tag 'arm-soc/for-5.10/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: broadcom: Fix SP805 clock-names arm64: dts: broadcom: replace status value "ok" by "okay" Link: https://lore.kernel.org/r/20200912032153.1216354-2-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit ba601120cfbdcd0dd9c6795f9e2c551f11e38326 Merge: 439a95a044223 1a4a752ee876b Author: Olof Johansson Date: Sun Sep 13 11:34:24 2020 -0700 Merge tag 'arm-soc/for-5.10/devicetree' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM-based SoCs changes for 5.10, please pull the following: - Christian adds support for the Cisco Meraki MR32 which is based on the BCM53016 SoC, this requires specifying the PWM, second UART and third PCIe controller in Device Tree before finally adding support for the board. - Adrian updates the status properties from "ok" to "okay". - Andre fixes the SP805 watchdog nodes to have the correct clock names and binding for both the Cygnus and Northstar Plus (NSP). He does the same thing with the SP804 timer node which was missing an "arm,primecell" compatible string. - Maxime enables the BCM2711 (Raspberry Pi 4) display pipeline since all DRM changes are ready. * tag 'arm-soc/for-5.10/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: broadcom: Fix SP804 node ARM: dts: NSP: Fix SP805 clock-names ARM: dts: Cygnus: Fix SP805 clocks ARM: dts: NSP: replace status value "ok" by "okay" ARM: BCM5301X: Add DT for Meraki MR32 ARM: dts: bcm2711: Enable the display pipeline ARM: dts: BCM5301X: Specify pcie2 in the DT ARM: dts: BCM5301X: Specify uart2 in the DT ARM: dts: BCM5301X: Specify PWM in the DT dt-bindings: ARM: add bindings for the Meraki MR32 Link: https://lore.kernel.org/r/20200912032153.1216354-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 439a95a044223972a9128d32df7f78f56c99ef51 Merge: b5ac61e4483f8 48d5732cdf57b Author: Olof Johansson Date: Sun Sep 13 11:33:41 2020 -0700 Merge tag 'dt-schema-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Various minor cleanups for ARM DTS Cleanup ARM DTS to remove dtschema validation errors. * tag 'dt-schema-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: alpine: Align GIC nodename with dtschema ARM: dts: zx: Align L2 cache-controller nodename with dtschema ARM: dts: tango: Align L2 cache-controller nodename with dtschema ARM: dts: spear: Align L2 cache-controller nodename with dtschema ARM: dts: qcom: Align L2 cache-controller nodename with dtschema ARM: dts: prima: Align L2 cache-controller nodename with dtschema Link: https://lore.kernel.org/r/20200911155509.1495-2-krzk@kernel.org Signed-off-by: Olof Johansson commit b5ac61e4483f8291f921ccd6e3389cbfee8052c4 Merge: 679bc801175a7 5024f03c09e44 Author: Olof Johansson Date: Sun Sep 13 11:32:36 2020 -0700 Merge tag 'dt64-schema-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Various minor cleanups for arm64 Amazon DTS Cleanup arm64 DTS to remove dtschema validation errors. * tag 'dt64-schema-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: alpine: Fix GIC unit address arm64: dts: alpine: Align GIC nodename with dtschema Link: https://lore.kernel.org/r/20200911155509.1495-1-krzk@kernel.org Signed-off-by: Olof Johansson commit ce726b672b1131e75a51643031f73a72e4f6122b Merge: 714b348cdc0ec 74976e861309e Author: Olof Johansson Date: Sun Sep 13 11:31:53 2020 -0700 Merge tag 'aspeed-5.10-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/defconfig ASPEED defconfig updates for 5.10 - Fix an issue with unwanted media drivers being enabled - New driver: IBM OP Panel, used on ast2600 systems. This requires enabling I2C slave mode - Enable I2C MUX GPIO driver * tag 'aspeed-5.10-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: config: aspeed_g5: Enable IBM OP Panel driver ARM: config: aspeed-g5: Enable I2C GPIO mux driver ARM: config: aspeed: Fix selection of media drivers Link: https://lore.kernel.org/r/CACPK8XdFE2K1_cyrg=uaD6CaOm_p0RCRmjAsu6uyFKD4rnDggQ@mail.gmail.com Signed-off-by: Olof Johansson commit 679bc801175a7b70bffaaeb922d6c06ff54f55bc Merge: 34cfebc0d88a6 e89570584d2bc Author: Olof Johansson Date: Sun Sep 13 11:31:24 2020 -0700 Merge tag 'aspeed-5.10-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/dt ASPEED device tree updates for 5.10 - New machines * Wistron Mowgli, an AST2500 BMC for a Power9 OpenPower server * Facebook Wedge400, an AST2500 BMC system which we can assume is 4 times better than the existing Wedge100 top of rack network switch - Add a new device, the IBM Operation Panel - Fixes for Facebook's collection of BMCs - eMMC and vuart fixes * tag 'aspeed-5.10-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: dts: aspeed: Add Mowgli BMC platform ARM: dts: rainier: Disable internal pull-downs on eMMC pins ARM: aspeed: g5: Do not set sirq polarity ARM: dts: aspeed: rainier: Add IBM Operation Panel I2C device ARM: dts: aspeed: tacoma: Add IBM Operation Panel I2C device ARM: dts: aspeed: rainier: Enable XDMA engine ARM: dts: aspeed: wedge40: Update UART4 pin settings ARM: dts: aspeed: wedge40: Update FMC flash0 label ARM: dts: aspeed: Add Facebook Wedge400 BMC ARM: dts: aspeed: minipack: Update 64MB FMC flash layout ARM: dts: aspeed: yamp: Set 32MB FMC flash layout ARM: dts: aspeed: cmm: Set 32MB FMC flash layout ARM: dts: aspeed: Remove flash layout from Facebook AST2500 Common dtsi Link: https://lore.kernel.org/r/CACPK8XcDNBYAHzW6NYB4LFm3YbN63AprgW75ZqS+6uXn2b3kug@mail.gmail.com Signed-off-by: Olof Johansson commit 34cfebc0d88a621f293bff8abb1c6cec3bd76a01 Merge: 0630fe41e9eb6 b83ded8a31e31 Author: Olof Johansson Date: Sun Sep 13 11:27:04 2020 -0700 Merge tag 'juno-updates-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/dt ARMv8 Juno/Vexpress/Fast Models updates for v5.10 A few device tree source fixes to make them fully SP804 timer and SP805 watchdog binding compliant. * tag 'juno-updates-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: arm: Fix SP805 clock-names ARM: dts: arm: Fix SP805 clocks ARM: dts: arm: Fix SP804 users Link: https://lore.kernel.org/r/20200908135028.GA10106@bogus Signed-off-by: Olof Johansson commit bac9bd958aec59080e31e9f511016ab75f3d1dab Merge: 21a8fa6b6ddbe dd85345abca60 Author: Olof Johansson Date: Sun Sep 13 11:26:36 2020 -0700 Merge tag 'memory-controller-drv-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.10 1. Fixes in several drivers for GCC warnings, including kerneldoc fixes and issues discovered while compile testing. 2. Enable compile testing of most of the drivers. 3. Use dev_err_probe() to simplify the code. 4. omap-gpmc: fix off by one errors, code cleanups and improvements. 5. tegra: remove the GPU from DRM IOMMU group so it would use its own; few minor fixes. 6. brcmstb_dpfe: fix memory leak and array index out of bounds. * tag 'memory-controller-drv-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: (26 commits) memory: fsl-corenet-cf: Fix handling of platform_get_irq() error memory: omap-gpmc: Fix -Wunused-function warnings memory: tegra: Remove GPU from DRM IOMMU group memory: tegra186-emc: Simplify with dev_err_probe() memory: brcmstb_dpfe: Simplify with dev_err_probe() memory: samsung: exynos5422-dmc: add missing and fix kerneldoc memory: samsung: exynos5422-dmc: remove unused exynos5_dmc members memory: samsung: exynos5422-dmc: rename timing register fields variables memory: emif: Remove bogus debugfs error handling memory: omap-gpmc: Fix build error without CONFIG_OF memory: omap-gpmc: Fix a couple off by ones memory: brcmstb_dpfe: fix array index out of bounds memory: brcmstb_dpfe: Fix memory leak memory: tegra: Correct shift value of apew memory: Enable compile testing for most of the drivers memory: brcmstb_dpfe: add separate entry for compile test memory: tegra: tegra210-emc: fix indentation memory: renesas-rpc-if: simplify with PTR_ERR_OR_ZERO memory: omap-gpmc: consistently use !res for NULL checks memory: omap-gpmc: use WARN() instead of BUG() on wrong free ... Link: https://lore.kernel.org/r/20200907150611.11267-1-krzk@kernel.org Signed-off-by: Olof Johansson commit 0630fe41e9eb664f7bb0cb275a11555441d3a9e0 Merge: 8bc946b1a1c2a 7e98d540f21fd Author: Olof Johansson Date: Sun Sep 13 11:22:56 2020 -0700 Merge tag 'samsung-dt64-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v5.10 Cleanup of Exynos DTS to fix as many dtschema warnings as possible. This includes adding missing compatibles and using non-deprecated properties. Changes should not have a visible impact. * tag 'samsung-dt64-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Add compatibles to sysreg nodes arm64: dts: exynos: Replace deprecated "gpios" i2c-gpio property in Exynos5433 Link: https://lore.kernel.org/r/20200907150425.11077-2-krzk@kernel.org Signed-off-by: Olof Johansson commit 8bc946b1a1c2a23b0ee15b84da89da24d1b27cba Merge: 8e299e6193336 d3604c91566a8 Author: Olof Johansson Date: Sun Sep 13 11:22:36 2020 -0700 Merge tag 'samsung-dt-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.10 1. Add sound support to Galaxy S3/Midas family (Exynos4412). 2. Add sound support to Galaxy S/Aries family (S5Pv210). 3. Configure L2C-310 cache controller via DTS on Exynos4. 4. Big cleanup of Exynos DTS to fix as many dtschema warnings as possible. This includes adding missing properties (thus e.g. enabling S3C RTC clock), correcting existing nodes, renaming of nodes and using non-deprecated properties or compatibles. Except mentioned bring up of S3C RTC, this should not have visible effect. * tag 'samsung-dt-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (49 commits) ARM: dts: exynos: Silence SATA PHY warning in Exynos5250 ARM: dts: exynos: Remove I2C9 samsung, i2c-slave-addr from Exynos5250 boards ARM: dts: samsung: odroid-xu3: Move assigned-clock* properties to i2s0 node ARM: dts: exynos: Use S2MPS11 clock in S3C RTC in SMDK5420 ARM: dts: exynos: Silence DP HPD pinctrl dtschema warning in Exynos5250 Spring ARM: dts: exynos: Use S5M8767 clock in S3C RTC in Exynos5250 Spring ARM: dts: exynos: Add max77686 clocks for S3C RTC in SMDK5250 ARM: dts: exynos: Override thermal by label in Exynos5250 ARM: dts: exynos: Correct whitespace and indentation issues in Exynos5 ARM: dts: exynos: Silence i2c-gpio dtschema warning in Exynos5250 Arndale ARM: dts: exynos: Correct S3C RTC bindings in SMDK5410 ARM: dts: exynos: Remove unneeded address/size cells in Exynos5260 GIC ARM: dts: exynos: Correct compatible for Exynos5260 GIC ARM: dts: exynos: Correct compatible for Exynos5 GIC ARM: dts: s5pv210: Enable audio on Aries boards ARM: dts: exynos: Correct whitespace and indentation issues ARM: dts: exynos: Correct S3C RTC bindings in Tiny4412 ARM: dts: exynos: Correct S3C RTC bindings in SMDK4412 ARM: dts: exynos: Add CPU cooling in Tiny4412 ARM: dts: exynos: Add CPU cooling in SMDK4412 ... Link: https://lore.kernel.org/r/20200907150425.11077-1-krzk@kernel.org Signed-off-by: Olof Johansson commit 21a8fa6b6ddbe79935e078b2752c8643215edd6a Merge: 0bd1937ad8445 464d9b349be63 Author: Olof Johansson Date: Sun Sep 13 11:22:09 2020 -0700 Merge tag 'renesas-drivers-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers Renesas driver updates for v5.10 - Improve visual Kconfig structure. * tag 'renesas-drivers-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: Align driver description titles soc: renesas: Use menu for Renesas SoC Link: https://lore.kernel.org/r/20200904114819.30254-4-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 8e299e619333641fde98afb607452b1d2a0fcb86 Merge: 20789171a9dad e9f0fb53ac88c Author: Olof Johansson Date: Sun Sep 13 11:21:22 2020 -0700 Merge tag 'renesas-arm-dt-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.10 - Increase support for the RZ/G2H SoC on the HopeRun HiHope RZ/G2H board, and its display panel expansion board, - Increase support for the RZ/G1H SoC on the iWave RainboW SoM (G21M) and Qseven board (G21D), - SATA support for the HopeRun HiHope RZ/G2N board, - PCIe endpoint support for the RZ/G2M, RZ/G2E, and RZ/G2H SoCs, - Audio support for the R-Car M3-W+ SoC. - Minor fixes and improvements. * tag 'renesas-arm-dt-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (39 commits) arm64: dts: renesas: Add HiHope RZ/G2H board with idk-1110wr display arm64: dts: renesas: r8a774e1: Add cpuidle support for CA5x cores arm64: dts: renesas: r8a774e1: Add FDP1 device nodes ARM: dts: r8a7742-iwg21d-q7: Enable PCIe Controller ARM: dts: r8a7742: Add IPMMU DT nodes arm64: dts: renesas: r8a77961: Enable Sound / Audio-DMAC arm64: dts: renesas: r8a774e1: Add PWM device nodes ARM: dts: r8a7742-iwg21m: Add SPI NOR support arm64: dts: renesas: r8a774e1-hihope-rzg2h: Enable HS400 mode ARM: dts: r8a7742-iwg21m: Add RTC support ARM: dts: r8a7742-iwg21m: Sort the nodes alphabetically ARM: dts: r8a7742: Add CAN support arm64: dts: renesas: r8a774c0: Add PCIe EP node arm64: dts: renesas: r8a774b1: Add PCIe EP nodes arm64: dts: renesas: r8a774a1: Add PCIe EP nodes ARM: dts: r8a7742: Add QSPI support arm64: dts: renesas: r8a774e1-hihope-rzg2h: Setup DU clocks arm64: dts: renesas: r8a774e1: Add LVDS device node arm64: dts: renesas: r8a774e1: Populate HDMI encoder node arm64: dts: renesas: r8a774e1: Populate DU device node ... Link: https://lore.kernel.org/r/20200904114819.30254-3-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 714b348cdc0ec5f8f40410c955b78ab1009250f6 Merge: 41bcfa4cd47bf 5a87251dac0db Author: Olof Johansson Date: Sun Sep 13 11:20:58 2020 -0700 Merge tag 'renesas-arm-defconfig-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas ARM defconfig updates for v5.10 - Enable touchscreen support on the iWave RZ/G1E platform, - Update for PCIE_RCAR => CONFIG_PCIE_RCAR_{HOST,EP} split, including enabling the latter, - Enable FLASH support on various R-Car Gen3 boards, - Refresh shmobile_defconfig for v5.9-rc1. * tag 'renesas-arm-defconfig-for-v5.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: defconfig: Enable CONFIG_PCIE_RCAR_HOST ARM: multi_v7_defconfig: Enable CONFIG_PCIE_RCAR_HOST arm64: defconfig: Enable RPC-IF support ARM: shmobile: defconfig: Refresh for v5.9-rc1 arm64: defconfig: Enable R-Car PCIe endpoint driver ARM: shmobile: defconfig: Enable TOUCHSCREEN_STMPE Link: https://lore.kernel.org/r/20200904114819.30254-2-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 20789171a9dad1c2e6080c95d9e4f9219f667baf Merge: f75aef392f869 513f8297f6b14 Author: Olof Johansson Date: Sun Sep 13 11:18:37 2020 -0700 Merge tag 'omap-for-v5.10/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Devicetree changes for omaps for v5.10 - Use a known good SGX clockrate for 4430, this is not needed as a fix as the closed source SGX driver is out of tree - Prepare DSI panels for upcoming changes to use generic driver code - Add common support for MOXA UC-8100 series - Add ocp label for l3 interconnect for board specific dts files to reference - Configure CPU thermal properties for omap3 * tag 'omap-for-v5.10/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap3: Add cpu trips and cooling map for omap34/36 families ARM: dts: am33xx: add ocp label ARM: dts: am335x: add common dtsi for MOXA UC-8100 series ARM: dts: omap4-droid4: add panel orientation ARM: dts: omap4-droid4: add panel compatible ARM: dts: omap: add channel to DSI panels ARM: dts: omap4: Fix sgx clock rate for 4430 ARM: dts: omap5: Fix DSI base address and clocks ARM: dts: logicpd-som-lv-baseboard: Fix missing video ARM: dts: logicpd-som-lv-baseboard: Fix broken audio ARM: dts: logicpd-torpedo-baseboard: Fix broken audio ARM: OMAP2+: Fix an IS_ERR() vs NULL check in _get_pwrdm() Link: https://lore.kernel.org/r/pull-1599132307-761202@atomide.com-3 Signed-off-by: Olof Johansson commit 989286ffe8320164c7ec70bd16481ac2256d58b7 Merge: 63e850f1cd154 0d7ce5c5c4e64 Author: Olof Johansson Date: Sun Sep 13 11:17:41 2020 -0700 Merge tag 'omap-for-v5.10/ti-sysc-drop-pdata-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc Add initial genpd support for omaps to drop more platform data We now drop legacy platform data for RTC on am3, am4 and dra7. And we add initial genpd support for PRM (Power and Reset Manager) and use it to drop legacy platform data for am3 sgx and omap4/5 l4_abe interconnect instance. * tag 'omap-for-v5.10/ti-sysc-drop-pdata-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Drop legacy platform data for dra7 rtcss ARM: OMAP2+: Drop legacy platform data for am3 and am4 rtc soc: ti: pm33xx: Simplify RTC usage to prepare to drop platform data ARM: dts: Configure omap4 and 5 l4_abe for genpd and drop platform data ARM: dts: Configure am3 and am4 sgx for genpd and drop platform data soc: ti: omap-prm: Configure omap4 and 5 l4_abe power domain soc: ti: omap-prm: Configure sgx power domain for am3 and am4 soc: ti: omap-prm: Add basic power domain support dt-bindings: omap: Update PRM binding for genpd Link: https://lore.kernel.org/r/pull-1599132307-761202@atomide.com-2 Signed-off-by: Olof Johansson commit 63e850f1cd1547563b78830a8a2ed6c9010ef600 Merge: c9c7ddd0d7ad2 501e69b028a47 Author: Olof Johansson Date: Sun Sep 13 11:16:59 2020 -0700 Merge tag 'omap-for-v5.10/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc SoC changes for omaps for v5.10 Few changes to replace HTTP links with HTTPS, and a change to delete a duplicate word for omap1 mux.h comments. * tag 'omap-for-v5.10/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: arm: mach-omap1: mux.h: delete duplicate word ARM: OMAP2+: Replace HTTP links with HTTPS ones ARM: OMAP2+: pm33xx-core: Replace HTTP links with HTTPS ones ARM: OMAP2+: hwmod: Replace HTTP links with HTTPS ones ARM: OMAP2+: Replace HTTP links with HTTPS ones ARM: OMAP2+: PRM: Replace HTTP links with HTTPS ones Link: https://lore.kernel.org/r/pull-1599132307-761202@atomide.com Signed-off-by: Olof Johansson commit 0bd1937ad844597442a967fdced04c4ce40570b6 Merge: aa10e3cfdb428 539f8fc253ece Author: Olof Johansson Date: Sun Sep 13 11:16:39 2020 -0700 Merge tag 'optee-i2c-fix-for-v5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee into arm/drivers Make sure I2C functions used in OP-TEE are reachable with IS_REACHABLE() * tag 'optee-i2c-fix-for-v5.10' of git://git.linaro.org:/people/jens.wiklander/linux-tee: drivers: optee: fix i2c build issue Link: https://lore.kernel.org/r/20200901101806.GA3286324@jade Signed-off-by: Olof Johansson commit c9c7ddd0d7ad29fc229c51aff297718222c88ab5 Merge: 465c335bb5fd2 5d007a09f3c8b Author: Olof Johansson Date: Sun Sep 13 11:16:07 2020 -0700 Merge tag 'versatile-soc-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into arm/soc Versatile SoC updates for the v5.10 kernel cycle: - Drop a static qualifier in integrator_soc_init() - Remove Integrator and Versatile from PHYS_OFFSET * tag 'versatile-soc-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: versatile: Remove Integrator and Realview from PHYS_OFFSET soc: integrator: Drop pointless static qualifier in integrator_soc_init() Link: https://lore.kernel.org/r/CACRpkdYYDSg8FAjJAqew5yEu7H1Y3E1rPN9TL25K31T=QWATuA@mail.gmail.com Signed-off-by: Olof Johansson commit 41bcfa4cd47bf9ff3049ee4654597ef1f3f1d18c Author: Linus Walleij Date: Tue Sep 1 10:25:58 2020 +0200 ARM: configs: Update Realview defconfig Update the Integrator defconfig to the changes from the recent kernel cycles and especially the v5.9-rc1 changes. - Move options around as a result of Kconfig changes. - Drop the ZBOOT_ROM* stuff that doesn't exist anymore. - Add the syscon LEDs as used on the board for heartbeat and MMC traffic indication. - Add fixed voltage regulator support, this is used by the MMC controller for card voltage. - Select CONFIG_DRM_DISPLAY_CONNECTOR=y, the CONFIG_DRM_SIMPLE_BRIDGE was renamed when renaming the driver, but the simple bridge requires another bridge, the display connector bridge, in order to work, so this is required to have graphics working properly in kernel v5.9-rc1+ Link: https://lore.kernel.org/r/20200901082558.80388-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson commit e42fd7681b58f38da95e3566fc589e014ff978d6 Author: Linus Walleij Date: Tue Sep 1 09:39:30 2020 +0200 ARM: configs: Update Versatile defconfig Update the Integrator defconfig to the changes from the recent kernel cycles and especially the v5.9-rc1 changes. - Move options around as a result of Kconfig changes. - Drop the ZBOOT_ROM* stuff that doesn't exist anymore. - Select CONFIG_DRM_DISPLAY_CONNECTOR=y, the CONFIG_DRM_SIMPLE_BRIDGE was renamed when renaming the driver, but the simple bridge requires another bridge, the display connector bridge, in order to work, so this is required to have graphics working properly in kernel v5.9-rc1+ Link: https://lore.kernel.org/r/20200901073930.31548-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson commit 465c335bb5fd25f1f433481b7423a982e23a4c58 Merge: f75aef392f869 a1342f6a9ff88 Author: Olof Johansson Date: Sun Sep 13 11:14:59 2020 -0700 Merge tag 'samsung-soc-s3c-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung S3C24xx and S3C64xx machine code cleanup for v5.10 Big cleanup for the Samsung S3C24xx and S3C64xx platforms, although it also touches files shared with S5Pv210 and Exynos. This is mostly Arnd Bergmann work which Krzysztof Kozlowski took over, rebased and polished. The goal is to cleanup, merge and finally make the Samsung S3C24xx and S3C64xx architectures multiplatform. The multiplatform did not happen yet here - just cleaning up and merging into one arch/arm/mach-s3c directory. However this is step forward for multiplatform or at least to keep this code still maintainable. This pulls also branch with changes for Samsung SoC sound drivers from broonie/sound because the cleanups there were part of this series and all further patches depend on them. * tag 'samsung-soc-s3c-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (62 commits) ARM: s3c: Avoid naming clash of S3C24xx and S3C64xx timer setup ARM: s3c: Cleanup from old plat-samsung include ARM: s3c: make headers local if possible ARM: s3c: move into a common directory ARM: s3c24xx: stop including mach/hardware.h from mach/io.h cpufreq: s3c24xx: move low-level clk reg access into platform code cpufreq: s3c2412: use global s3c2412_cpufreq_setrefresh ARM: s3c: remove cpufreq header dependencies cpufreq: s3c24xx: split out registers fbdev: s3c2410fb: remove mach header dependency ARM: s3c24xx: bast: avoid irq_desc array usage ARM: s3c24xx: spi: avoid hardcoding fiq number in driver ARM: s3c24xx: include mach/irqs.h where needed ARM: s3c24xx: move s3cmci pinctrl handling into board files ARM: s3c24xx: move iis pinctrl config into boards ARM: s3c24xx: move spi fiq handler into platform ARM: s3c: adc: move header to linux/soc/samsung ARM: s3c24xx: move irqchip driver back into platform ARM: s3c24xx: move regs-spi.h into spi driver ARM: s3c64xx: remove mach/hardware.h ... Link: https://lore.kernel.org/r/20200831154751.7551-1-krzk@kernel.org Signed-off-by: Olof Johansson commit 72d44c0cbc4369cc028429b85f4697957226282c Author: Lad Prabhakar Date: Fri Sep 11 11:04:39 2020 +0100 irqchip: Kconfig: Update description for RENESAS_IRQC config irq-renesas-irqc driver is also used on Renesas RZ/G{1,2} SoC's, update the same to reflect the description for RENESAS_IRQC config. Signed-off-by: Lad Prabhakar Signed-off-by: Marc Zyngier Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200911100439.19878-1-prabhakar.mahadev-lad.rj@bp.renesas.com commit 336780590990efa69596884114cad3f517b6333b Author: Alexandru Elisei Date: Sat Sep 12 16:37:07 2020 +0100 irqchip/gic-v3: Support pseudo-NMIs when SCR_EL3.FIQ == 0 The GIC's internal view of the priority mask register and the assigned interrupt priorities are based on whether GIC security is enabled and whether firmware routes Group 0 interrupts to EL3. At the moment, we support priority masking when ICC_PMR_EL1 and interrupt priorities are either both modified by the GIC, or both left unchanged. Trusted Firmware-A's default interrupt routing model allows Group 0 interrupts to be delivered to the non-secure world (SCR_EL3.FIQ == 0). Unfortunately, this is precisely the case that the GIC driver doesn't support: ICC_PMR_EL1 remains unchanged, but the GIC's view of interrupt priorities is different from the software programmed values. Support pseudo-NMIs when SCR_EL3.FIQ == 0 by using a different value to mask regular interrupts. All the other values remain the same. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200912153707.667731-3-alexandru.elisei@arm.com commit 4e594ad1068ea1db359d6161f580f03edecf6cb0 Author: Alexandru Elisei Date: Sat Sep 12 16:37:06 2020 +0100 irqchip/gic-v3: Spell out when pseudo-NMIs are enabled When NMIs cannot be enabled, the driver prints a message stating that unambiguously. When they are enabled, the only feedback we get is a message regarding the use of synchronization for ICC_PMR_EL1 writes, which is not as useful for a user who is not intimately familiar with how NMIs are implemented. Let's make it obvious that pseudo-NMIs are enabled. Keep the message about using a barrier for ICC_PMR_EL1 writes, because it has a non-negligible impact on performance. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200912153707.667731-2-alexandru.elisei@arm.com commit e0c45b107fc94c5a7a230b25cdbecab004ab1ed5 Author: Anson Huang Date: Tue Aug 11 14:16:16 2020 +0800 irqchip/imx-irqsteer: Use dev_err_probe() to simplify error handling dev_err_probe() can reduce code size, uniform error handling and record the defer probe reason etc., use it to simplify the code. Signed-off-by: Anson Huang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1597126576-18383-2-git-send-email-Anson.Huang@nxp.com commit c201f4325588a3b0109ba552a20bd4d4b1b5c6c8 Author: Anson Huang Date: Tue Aug 11 14:16:15 2020 +0800 irqchip/imx-intmux: Use dev_err_probe() to simplify error handling dev_err_probe() can reduce code size, uniform error handling and record the defer probe reason etc., use it to simplify the code. Signed-off-by: Anson Huang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1597126576-18383-1-git-send-email-Anson.Huang@nxp.com commit ea6c25e6057c0b7c18337696be84b8f9751f19ec Author: Krzysztof Kozlowski Date: Wed Sep 2 19:46:14 2020 +0200 irqchip/ti-sci: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. There is also no need to assign NULL to 'intr->sci' as it is part of devm-allocated memory. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200902174615.24695-1-krzk@kernel.org commit 70a29c32cf7909e96a469ae71d88b2c0fbcbd767 Author: Marc Zyngier Date: Sat Apr 25 15:11:20 2020 +0100 irqchip/gic-v3: Describe the SGI range As we are about to start making use of SGIs in a more conventional way, let's describe it is the GICv3 list of interrupt types. Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier commit 56afcd3dbd1995c526bfbd920cebde6158b22c4a Author: Marc Zyngier Date: Tue Jun 23 20:38:41 2020 +0100 ARM: Allow IPIs to be handled as normal interrupts In order to deal with IPIs as normal interrupts, let's add a new way to register them with the architecture code. set_smp_ipi_range() takes a range of interrupts, and allows the arch code to request them as if the were normal interrupts. A standard handler is then called by the core IRQ code to deal with the IPI. This means that we don't need to call irq_enter/irq_exit, and that we don't need to deal with set_irq_regs either. So let's move the dispatcher into its own function, and leave handle_IPI() as a compatibility function. On the sending side, let's make use of ipi_send_mask, which already exists for this purpose. One of the major difference is that we end up, in some cases (such as when performing IRQ time accounting on the scheduler IPI), end up with nested irq_enter()/irq_exit() pairs. Other than the (relatively small) overhead, there should be no consequences to it (these pairs are designed to nest correctly, and the accounting shouldn't be off). Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier commit d3afc7f12987581eb0d1215b518d719fb9d762da Author: Marc Zyngier Date: Sat Apr 25 15:03:47 2020 +0100 arm64: Allow IPIs to be handled as normal interrupts In order to deal with IPIs as normal interrupts, let's add a new way to register them with the architecture code. set_smp_ipi_range() takes a range of interrupts, and allows the arch code to request them as if the were normal interrupts. A standard handler is then called by the core IRQ code to deal with the IPI. This means that we don't need to call irq_enter/irq_exit, and that we don't need to deal with set_irq_regs either. So let's move the dispatcher into its own function, and leave handle_IPI() as a compatibility function. On the sending side, let's make use of ipi_send_mask, which already exists for this purpose. One of the major difference is that we end up, in some cases (such as when performing IRQ time accounting on the scheduler IPI), end up with nested irq_enter()/irq_exit() pairs. Other than the (relatively small) overhead, there should be no consequences to it (these pairs are designed to nest correctly, and the accounting shouldn't be off). Reviewed-by: Valentin Schneider Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier commit 83cfac95c01817819c2a51f0931d798d851f8a08 Author: Marc Zyngier Date: Tue May 19 14:58:13 2020 +0100 genirq: Allow interrupts to be excluded from /proc/interrupts A number of architectures implement IPI statistics directly, duplicating the core kstat_irqs accounting. As we move IPIs to being actual IRQs, we would end-up with a confusing display in /proc/interrupts (where the IPIs would appear twice). In order to solve this, allow interrupts to be flagged as "hidden", which excludes them from /proc/interrupts. Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier commit c5e5ec033c4ab25c53f1fd217849e75deb0bf7bf Author: Marc Zyngier Date: Tue May 19 10:41:00 2020 +0100 genirq: Add fasteoi IPI flow For irqchips using the fasteoi flow, IPIs are a bit special. They need to be EOI'd early (before calling the handler), as funny things may happen in the handler (they do not necessarily behave like a normal interrupt). Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier commit 1d1e5630de78f7253ac24b92cee6427c3ff04d56 Author: Huacai Chen Date: Fri Sep 11 18:26:18 2020 +0800 irqchip/loongson-htvec: Fix initial interrupt clearing In htvec_reset() only the first group of initial interrupts is cleared. This sometimes causes spurious interrupts, so let's clear all groups. While at it, fix the nearby comment that to match the reality of what the driver does. Fixes: 818e915fbac518e8c78e1877 ("irqchip: Add Loongson HyperTransport Vector support") Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1599819978-13999-2-git-send-email-chenhc@lemote.com commit 8ddf1905a904ca86d71ca1c435e4b0b2a0b70df8 Author: YueHaibing Date: Wed Aug 26 11:53:21 2020 +0800 irqchip/ti-sci-intr: Fix unsigned comparison to zero ti_sci_intr_xlate_irq() return -ENOENT on fail, p_hwirq should be int type. Fixes: a5b659bd4bc7 ("irqchip/ti-sci-intr: Add support for INTR being a parent to INTR") Signed-off-by: YueHaibing Signed-off-by: Marc Zyngier Acked-by: Lokesh Vutla Link: https://lore.kernel.org/r/20200826035321.18620-1-yuehaibing@huawei.com commit 4c9b1bfaa5039fee650f4de514a8e70ae976fc2f Author: YueHaibing Date: Wed Aug 26 11:54:30 2020 +0800 irqchip/ti-sci-inta: Fix unsigned comparison to zero ti_sci_inta_xlate_irq() return -ENOENT on fail, p_hwirq should be int type. Fixes: 5c4b585d2910 ("irqchip/ti-sci-inta: Add support for INTA directly connecting to GIC") Signed-off-by: YueHaibing Signed-off-by: Marc Zyngier Acked-by: Lokesh Vutla Link: https://lore.kernel.org/r/20200826035430.21060-1-yuehaibing@huawei.com commit d3e0e14d65178d73ee0f991934c5fa89737e3922 Author: Nishant Malpani Date: Thu Sep 10 23:34:50 2020 +0530 iio: gyro: adxrs290: Add debugfs register access support Extend support to read/write byte data from/to the device using debugfs iio interface. Signed-off-by: Nishant Malpani Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200910180450.29696-4-nish.malpani25@gmail.com Signed-off-by: Jonathan Cameron commit 85434c2ab315978185ff60b6c9f5af6e6022ba84 Author: Nishant Malpani Date: Thu Sep 10 23:34:49 2020 +0530 dt-bindings: iio: gyro: adxrs290: Add interrupts support Include 'interrupts' property and provide a suitable example for using a GPIO interrupt line. Signed-off-by: Nishant Malpani Link: https://lore.kernel.org/r/20200910180450.29696-3-nish.malpani25@gmail.com Signed-off-by: Jonathan Cameron commit 672555807f6f62c1604f866743eaedadaa557b23 Author: Nishant Malpani Date: Thu Sep 10 23:34:48 2020 +0530 iio: gyro: adxrs290: Add triggered buffer support Provide a way for continuous data capture by setting up buffer support. The data ready signal exposed at the SYNC pin of the ADXRS290 is exploited as a hardware interrupt which triggers to fill the buffer. Triggered buffer setup was tested with both hardware trigger (DATA_RDY) and software triggers (sysfs-trig & hrtimer). Signed-off-by: Nishant Malpani Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200910180450.29696-2-nish.malpani25@gmail.com Signed-off-by: Jonathan Cameron commit 5ac65da27ea8631d2032d47c0b9ef06c79d3446a Author: Nishant Malpani Date: Thu Sep 10 17:57:11 2020 +0530 iio: gyro: adxrs290: use hook for devm resource unwinding Make use of devm_add_action_or_reset() hook to switch device into STANDBY mode during standard resource unwinding. The patch includes a helper function, in the form of adxrs290_set_mode(), to realise driving the device into STANDBY mode. Signed-off-by: Nishant Malpani Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200910122711.16670-1-nish.malpani25@gmail.com Signed-off-by: Jonathan Cameron commit a5c69204dafc77cde34317e34f2f4fc93afd36df Author: Krzysztof Kozlowski Date: Thu Sep 10 10:52:07 2020 +0200 iio: adc: stm32: Fix missing return in booster error path Conversion of error paths to dev_err_probe() dropped one return statement. The driver will continue to probe if getting booster regulator fails. Fixes: ce30eeb613cb ("iio: adc: stm32: Simplify with dev_err_probe()") Reported-by: Stephen Rothwell Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1599727927-7776-1-git-send-email-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 23e0618ca0255d12798acd3ae37fd98d0def7070 Author: Christian Eggers Date: Wed Sep 9 17:44:39 2020 +0200 iio: light: as73211: Increase measurement timeout We found some sensors which are much slower (20% at room temperature) than nominal. According to the data sheet, up to 27% is possible. Now I add 33% to the nominal time out, hopefully this is enough. Signed-off-by: Christian Eggers Link: https://lore.kernel.org/r/20200909154439.10308-1-ceggers@arri.de Fixes: 403e5586b52e ("iio: light: as73211: New driver") Signed-off-by: Jonathan Cameron commit dde8ceec9e29fe2abf4fabee7d5a0445d0b75b66 Author: Crt Mori Date: Sun Sep 6 23:02:31 2020 +0200 iio: temperature: mlx90632: Interface to change object ambient temperature Since object temperature might be different than the sensor temperature the infrared sensors should provide an interface to inject ambient temperature. This was in past done via write to ambient temperature interface (in_temp_ambient_raw), but I think most people did not know about it. This solution introduces a new iio type of the CALIBAMBIENT which is hopefully more descriptive and more explicit about the purpose and capabilities of the sensors. Signed-off-by: Crt Mori Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200906210231.383976-1-cmo@melexis.com Signed-off-by: Jonathan Cameron commit e91172151a40d16d978a76159a07ec5c7be5de32 Author: Kiran K Date: Fri Sep 11 17:14:17 2020 +0530 Bluetooth: btintel: Refactor firmware download function Split firmware download code into two functions - one to download header and other to download payload. This patch enhances readability and reusabiltiy of code Signed-off-by: Kiran K Reviewed-by: Chethan T N Reviewed-by: Sathish Narasimman Reviewed-by: Srivatsa Ravishankar Signed-off-by: Marcel Holtmann commit 2f20216c1d6fe17c1a224f658be0dc6fab2269c7 Author: Abhishek Pandit-Subedi Date: Fri Sep 11 14:07:13 2020 -0700 Bluetooth: Emit controller suspend and resume events Emit controller suspend and resume events when we are ready for suspend and we've resumed from suspend. The controller suspend event will report whatever suspend state was successfully entered. The controller resume event will check the first HCI event that was received after we finished preparing for suspend and, if it was a connection event, store the address of the peer that caused the event. If it was not a connection event, we mark the wake reason as an unexpected event. Here is a sample btmon trace with these events: @ MGMT Event: Controller Suspended (0x002d) plen 1 Suspend state: Page scanning and/or passive scanning (2) @ MGMT Event: Controller Resumed (0x002e) plen 8 Wake reason: Remote wake due to peer device connection (2) LE Address: CD:F3:CD:13:C5:9A (OUI CD-F3-CD) Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou Signed-off-by: Marcel Holtmann commit f0cfc486f796dc3b67a4017357a6a8e76a8141c5 Author: Abhishek Pandit-Subedi Date: Fri Sep 11 14:07:12 2020 -0700 Bluetooth: Add suspend reason for device disconnect Update device disconnect event with reason 0x5 to indicate that device disconnected because the controller is suspending. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou Reviewed-by: Sonny Sasaka Signed-off-by: Marcel Holtmann commit 346ce5b7d624e8cc2ec5a6abd0ea00f0e06ea8ac Author: Abhishek Pandit-Subedi Date: Fri Sep 11 14:07:11 2020 -0700 Bluetooth: Add mgmt suspend and resume events Add the controller suspend and resume events, which will signal when Bluetooth has completed preparing for suspend and when it's ready for resume. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou Reviewed-by: Sonny Sasaka Signed-off-by: Marcel Holtmann commit 6baf8a6afc1e5bc30179112bf8c685e448372f43 Author: Abhishek Pandit-Subedi Date: Fri Sep 11 15:32:20 2020 -0700 Bluetooth: Set ext scan response only when it exists Only set extended scan response only when it exists. Otherwise, clear the scan response data. Per the core spec v5.2, Vol 4, Part E, 7.8.55 If the advertising set is non-scannable and the Host uses this command other than to discard existing data, the Controller shall return the error code Invalid HCI Command Parameters (0x12). On WCN3991, the controller correctly responds with Invalid Parameters when this is sent. That error causes __hci_req_hci_power_on to fail with -EINVAL and LE devices can't connect because background scanning isn't configured. Here is an hci trace of where this issue occurs during power on: < HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen 25 Handle: 0x00 Properties: 0x0010 Use legacy advertising PDUs: ADV_NONCONN_IND Min advertising interval: 181.250 msec (0x0122) Max advertising interval: 181.250 msec (0x0122) Channel map: 37, 38, 39 (0x07) Own address type: Random (0x01) Peer address type: Public (0x00) Peer address: 00:00:00:00:00:00 (OUI 00-00-00) Filter policy: Allow Scan Request from Any, Allow Connect... TX power: 127 dbm (0x7f) Primary PHY: LE 1M (0x01) Secondary max skip: 0x00 Secondary PHY: LE 1M (0x01) SID: 0x00 Scan request notifications: Disabled (0x00) > HCI Event: Command Complete (0x0e) plen 5 LE Set Extended Advertising Parameters (0x08|0x0036) ncmd 1 Status: Success (0x00) TX power (selected): 9 dbm (0x09) < HCI Command: LE Set Advertising Set Random Address (0x08|0x0035) plen 7 Advertising handle: 0x00 Advertising random address: 08:FD:55:ED:22:28 (OUI 08-FD-55) > HCI Event: Command Complete (0x0e) plen 4 LE Set Advertising Set Random Address (0x08|0x0035) ncmd Status: Success (0x00) < HCI Command: LE Set Extended Scan Response Data (0x08|0x0038) plen 35 Handle: 0x00 Operation: Complete scan response data (0x03) Fragment preference: Minimize fragmentation (0x01) Data length: 0x0d Name (short): Chromebook > HCI Event: Command Complete (0x0e) plen 4 LE Set Extended Scan Response Data (0x08|0x0038) ncmd 1 Status: Invalid HCI Command Parameters (0x12) Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Daniel Winkler Signed-off-by: Marcel Holtmann commit 20ae4089d0afeb24e9ceb026b996bfa55c983cc2 Author: Abhishek Pandit-Subedi Date: Fri Sep 11 15:33:18 2020 -0700 Bluetooth: Only mark socket zapped after unlocking Since l2cap_sock_teardown_cb doesn't acquire the channel lock before setting the socket as zapped, it could potentially race with l2cap_sock_release which frees the socket. Thus, wait until the cleanup is complete before marking the socket as zapped. This race was reproduced on a JBL GO speaker after the remote device rejected L2CAP connection due to resource unavailability. Here is a dmesg log with debug logs from a repro of this bug: [ 3465.424086] Bluetooth: hci_core.c:hci_acldata_packet() hci0 len 16 handle 0x0003 flags 0x0002 [ 3465.424090] Bluetooth: hci_conn.c:hci_conn_enter_active_mode() hcon 00000000cfedd07d mode 0 [ 3465.424094] Bluetooth: l2cap_core.c:l2cap_recv_acldata() conn 000000007eae8952 len 16 flags 0x2 [ 3465.424098] Bluetooth: l2cap_core.c:l2cap_recv_frame() len 12, cid 0x0001 [ 3465.424102] Bluetooth: l2cap_core.c:l2cap_raw_recv() conn 000000007eae8952 [ 3465.424175] Bluetooth: l2cap_core.c:l2cap_sig_channel() code 0x03 len 8 id 0x0c [ 3465.424180] Bluetooth: l2cap_core.c:l2cap_connect_create_rsp() dcid 0x0045 scid 0x0000 result 0x02 status 0x00 [ 3465.424189] Bluetooth: l2cap_core.c:l2cap_chan_put() chan 000000006acf9bff orig refcnt 4 [ 3465.424196] Bluetooth: l2cap_core.c:l2cap_chan_del() chan 000000006acf9bff, conn 000000007eae8952, err 111, state BT_CONNECT [ 3465.424203] Bluetooth: l2cap_sock.c:l2cap_sock_teardown_cb() chan 000000006acf9bff state BT_CONNECT [ 3465.424221] Bluetooth: l2cap_core.c:l2cap_chan_put() chan 000000006acf9bff orig refcnt 3 [ 3465.424226] Bluetooth: hci_core.h:hci_conn_drop() hcon 00000000cfedd07d orig refcnt 6 [ 3465.424234] BUG: spinlock bad magic on CPU#2, kworker/u17:0/159 [ 3465.425626] Bluetooth: hci_sock.c:hci_sock_sendmsg() sock 000000002bb0cb64 sk 00000000a7964053 [ 3465.430330] lock: 0xffffff804410aac0, .magic: 00000000, .owner: /-1, .owner_cpu: 0 [ 3465.430332] Causing a watchdog bite! Signed-off-by: Abhishek Pandit-Subedi Reported-by: Balakrishna Godavarthi Reviewed-by: Manish Mandlik Signed-off-by: Marcel Holtmann commit 978620cc4f5577c5139da9d8377849aeac46687a Author: YueHaibing Date: Thu Sep 10 14:17:56 2020 +0800 staging: regulator: hi6421v600-regulator: Remove unused including Remove including that don't need it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20200910061756.40864-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit b40c98b1cc770bbbd2453e1e0361092ec0fc5133 Author: Abheek Dhawan Date: Sat Sep 12 01:45:42 2020 -0500 staging: mt7621-pci: Update driver TODO file Removed extra whitespace Signed-off-by: Abheek Dhawan Link: https://lore.kernel.org/r/20200912064542.412487-1-adawesomeguy222@gmail.com Signed-off-by: Greg Kroah-Hartman commit 618e29ef7ed8249495ff8e916893d34caf10fd55 Author: Jérôme Pouiller Date: Mon Sep 7 12:15:21 2020 +0200 staging: wfx: update TODO list The driver is now close to leave the staging directory. Update the TODO list to reflect the work done. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-32-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 3768c74b3a969b62894667e4b79dd50f58a91ecb Author: Jérôme Pouiller Date: Mon Sep 7 12:15:20 2020 +0200 staging: wfx: drop async field from struct hif_cmd The parameter "async" in wfx_cmd_send() allows to send command without waiting for the reply. In this case, the mutex hif_cmd.lock is released asynchronously in the context of the receiver workqueue. However, "kbuild test robot" complains about this architecture[1] since it is not able to follow the lock duration of hif_cmd.lock (and indeed, the state of the driver if the hardware wouldn't reply is not well defined). Besides, this feature is not really necessary. It is only used by hif_shutdown(). This function hijack the 'async' flag to run a command that won't answer. So, this patch removes the 'async' flag and introduces a 'no_reply' flag. Thus, the mutex hif_cmd.lock is only acquired/released from hif_cmd_send(). Therefore: - hif_shutdown() does not have to touch the private data of the struct hif_cmd - Kbuild test robot should be happy - the resulting code is simpler [1] https://lore.kernel.org/driverdev-devel/alpine.DEB.2.21.1910041317381.2992@hadrien/ Reported-by: kbuild test robot Reported-by: Julia Lawall Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-31-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c8fb880910bdb2cf118a8a5d0122090ee07b6ce5 Author: Jérôme Pouiller Date: Mon Sep 7 12:15:19 2020 +0200 staging: wfx: uniformize naming rules in hif_tx_mib.c hif_tx_mib.c contains functions that format data to be sent to the hardware. In this file, sometime the struct to be sent is named 'arg', sometime 'val'. In some other function 'val' is used for the argument of the function. This patch uniformize the things and choose to call all the data in destination to the hardware 'arg' (note this choice is only dictated by the number of lines to change in the code) Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-30-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit f68ef6d8c920d0f528305ceec2263fc677bc4321 Author: Jérôme Pouiller Date: Mon Sep 7 12:15:18 2020 +0200 staging: wfx: fix spaces There is no reason to place two spaces between the field tx_conf_payload and its type. In the same vein, remove duplicate empty lines between declarations. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-29-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 7b43b07a1364fe5a3c923458dab7a1c0f6297f8a Author: Jérôme Pouiller Date: Mon Sep 7 12:15:17 2020 +0200 staging: wfx: fix naming of hif_tx_rate_retry_policy In the wfx driver, the prefix 'hif_mib_' is normally used for structures that represent a hardware message. hif_mib_tx_rate_retry_policy does not fall in this category. So, rename it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-28-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 61f759a98c569773033751457e9d30dbb1e47f35 Author: Jérôme Pouiller Date: Mon Sep 7 12:15:16 2020 +0200 staging: wfx: drop macro API_SSID_SIZE The maximum length of a SSID is defined by 802.11 specification. It is already defined in mac80211: IEEE80211_MAX_SSID_LEN. Therefore, use this generic definition. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-27-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit a1a97225900c8b20b8821f49ed9127b18f1e4888 Author: Jérôme Pouiller Date: Mon Sep 7 12:15:15 2020 +0200 staging: wfx: drop struct hif_ie_tlv This struct hif_ie_tlv is definitively an Information Element (IE). This struct is defined by 802.11 specification and already exists in mac80211. Reuse this definition instead of struct hif_ie_tlv. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-26-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit cef9d0ab87d539a796d9f71cebe334404f73709d Author: Jérôme Pouiller Date: Mon Sep 7 12:15:14 2020 +0200 staging: wfx: drop useless union hif_indication_data The union hif_indication_data is never used in the driver. So, it is not necessary to declare it separately from hif_ind_generic. In add, drop prefix 'indication_' from the names 'indication_type' and 'indication_data' since it is redundant with the name of the struct. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-25-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 79836c2eb95aae5e4562eee3b16bd611fc712de3 Author: Jérôme Pouiller Date: Mon Sep 7 12:15:13 2020 +0200 staging: wfx: drop useless union hif_event_data The union hif_event_data is never used in the driver. So, it is not necessary to declare it separately from hif_ind_event. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-24-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 0104020f18a5ada98e0f3685871685eee0c9abfb Author: Jérôme Pouiller Date: Mon Sep 7 12:15:12 2020 +0200 staging: wfx: drop useless union hif_privacy_key_data The union hif_privacy_key_data is never used in the driver. So, it is not necessary to declare it separately from hif_req_add_key. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-23-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit a1fe137d1cfc8750a17a2f074eadc27071a7a6de Author: Jérôme Pouiller Date: Mon Sep 7 12:15:11 2020 +0200 staging: wfx: drop useless structs only used in hif_ind_startup The structs hif_capabilities, hif_otp_regul_sel_mode_info and hif_otp_phy_info have no real reasons to exist. Drop them and simplify access to fields of struct hif_ind_startup. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-22-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 0bb4728cd54398c437366ee2532534896ce5993e Author: Jérôme Pouiller Date: Mon Sep 7 12:15:10 2020 +0200 staging: wfx: drop useless stricts only used in hif_req_start_scan_alt The structs hif_scan_type, hif_scan_flags and hif_auto_scan_param have no real reasons to exist (apart maybe defining namespaces). Moreover, the names of the fields within these structs are not all meaningful. Drop the structs and rename the fields. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-21-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit f27659f412196df324f1e59cacda629eb86f952c Author: Jérôme Pouiller Date: Mon Sep 7 12:15:09 2020 +0200 staging: wfx: drop useless structs only used in hif_req_tx The structs hif_queue, hif_data_flags, hif_tx_flags and hif_ht_tx_parameters have no real reasons to exist. Drop them and simplify access to fields of struct hif_req_tx. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-20-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 7df30b85d8dadaa7931c9b1b0140f9181b277f5d Author: Jérôme Pouiller Date: Mon Sep 7 12:15:08 2020 +0200 staging: wfx: drop useless struct hif_tx_result_flags Struct hif_tx_result_flags has no reason to exist. Drop it and simplify access to struct hif_cnf_tx. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-19-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c57d834f226f27fb185955c963c14a881aca3d5b Author: Jérôme Pouiller Date: Mon Sep 7 12:15:07 2020 +0200 staging: wfx: drop useless struct hif_rx_flags Struct hif_rx_flags has no reason to exist. Drop it and simplify access to struct hif_ind_rx. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-18-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1d8652c14ffd197284bf92468ebec5dbd13df993 Author: Jérôme Pouiller Date: Mon Sep 7 12:15:06 2020 +0200 staging: wfx: drop useless struct hif_pm_mode Struct hif_pm_mode has no reason to exist. Drop it and simplify access to struct hif_req_set_pm_mode. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-17-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 954756f5a79515b35b4046652980ccdc90ca0bc2 Author: Jérôme Pouiller Date: Mon Sep 7 12:15:05 2020 +0200 staging: wfx: drop useless struct hif_suspend_resume_flags Struct hif_suspend_resume_flags has no reason to exist. Drop it and simplify access to struct hif_ind_suspend_resume_tx. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-16-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 8d1f501ddde4d945a11132ffa05c2ac6bb9d5068 Author: Jérôme Pouiller Date: Mon Sep 7 12:15:04 2020 +0200 staging: wfx: drop useless struct hif_map_link_flags Struct hif_map_link_flags has no reason to exist. Drop it and simplify access to struct hif_req_map_link. Also rename the field 'map_direction' in 'unmap'. It is more meaningful and allows to drop enum hif_sta_map_direction. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-15-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit de79de4ed7c33559c1b49b2226a3713288d6e85f Author: Jérôme Pouiller Date: Mon Sep 7 12:15:03 2020 +0200 staging: wfx: drop useless struct hif_bss_flags Struct hif_bss_flags has no reason to exist. In add, it is never used. Drop it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-14-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 239c6e9af12da7f112540341f0765a20cb653559 Author: Jérôme Pouiller Date: Mon Sep 7 12:15:02 2020 +0200 staging: wfx: drop useless struct hif_join_flags Struct hif_join_flags has no reason to exist. Drop it and simplify access to struct hif_req_join. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-13-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit dcbbbc111d5f7ccd0daf6ae5ec0cb58c5feb4881 Author: Jérôme Pouiller Date: Mon Sep 7 12:15:01 2020 +0200 staging: wfx: drop useless struct hif_ie_flags Struct hif_ie_flags has no reason to exist. Drop it and simplify access to struct hif_req_update_ie. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-12-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 3d5c42c9d01b0c8832adefe0a9a105219ef2971f Author: Jérôme Pouiller Date: Mon Sep 7 12:15:00 2020 +0200 staging: wfx: drop useless struct hif_reset_flags Struct hif_reset_flags has no reason to exist. Drop it and simplify access to struct hif_req_reset. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-11-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 85da25771be2a11e7296dd535f186c9879fc7802 Author: Jérôme Pouiller Date: Mon Sep 7 12:14:59 2020 +0200 staging: wfx: drop useless union hif_commands_ids Union hif_commands_ids is unused. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-10-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit f751e356858f979b1a8c269242bf1a81443374dc Author: Jérôme Pouiller Date: Mon Sep 7 12:14:58 2020 +0200 staging: wfx: drop useless enum hif_beacon Enum hif_beacon is not used. Moreover, it is just another definition of a boolean. Absolutely useless. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 135baf19e56d3df560052036f642863858059112 Author: Jérôme Pouiller Date: Mon Sep 7 12:14:57 2020 +0200 staging: wfx: drop useless function Since the code for multicast filtering has been dropped, the function hif_set_data_filtering() is only called to disable multicast filtering. In fact, the multicast filtering is already disabled by default. So, this function is useless and can be dropped. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-8-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 99cd05d6a09a91b90d0845299f3cb765dbb9ae91 Author: Jérôme Pouiller Date: Mon Sep 7 12:14:56 2020 +0200 staging: wfx: drop multicast filtering The device allows to filter multicast frames. The driver has the necessary code to take advantage of this feature. However, some bugs has been reported on this feature. So, it was temporary disabled. Finally, the things work well as-is for more than one year now. So there is no plan to enable this feature in near future. Since we dislike to maintain dead code, drop it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit e8d607ce0c81851f830674aa81d6d127dbf14cfb Author: Jérôme Pouiller Date: Mon Sep 7 12:14:55 2020 +0200 staging: wfx: drop 'secure link' feature The Secure Link (slk) feature allows to encrypt (and authenticate) the traffic between the host and the device. The official implementation of this feature relies on mbedTLS. For that reason, this implementation is not included in the current driver. To be included, the implementation has to rely on kernel crypto API instead of mbedTLS. So, for now, the driver contained stub functions waiting for the new implementation based on kernel crypto API. This new implementation represent a bunch of work and it is unlikely to be done in near future. Moreover, we strongly dislike to maintain useless code. So, drop all the code related to secure link. Whoever wants to implement secure link should revert this patch before starting to work on it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 3e2311fa1e600dd782730d26940663c24c50c52e Author: Jérôme Pouiller Date: Mon Sep 7 12:14:54 2020 +0200 staging: wfx: keep API error list up-to-date A new kind of error has appeared in API 3.4. The Linux driver is not concerned by this new error, but let's keep the API in sync with the firmware. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 2a8f72648975c158b4bb55079e569752352ab19e Author: Jérôme Pouiller Date: Mon Sep 7 12:14:53 2020 +0200 staging: wfx: simplify hif_set_association_mode() The file hif_tx_mib.c expects to contain functions that format messages for the hardware. It is unexpected to find function that manipulate RCU and structures from mac80211. Keep hif_set_association_mode() with the code necessary for message formatting and relocate the smart part in wfx_join_finalize(). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 178b8943d3e61a6e8a6d795fca5c98cb3fd13278 Author: Jérôme Pouiller Date: Mon Sep 7 12:14:52 2020 +0200 staging: wfx: relocate wfx_join() beside wfx_join_finalize() wfx_join() and wfx_join_finalize() are the two halves of the association process. Group them. In addition, for better uniformity of the code, rename wfx_do_join() in wfx_join(). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 468f3386f71dde13a3421aaf6f89886f19f7f927 Author: Jérôme Pouiller Date: Mon Sep 7 12:14:51 2020 +0200 staging: wfx: improve readability of association processing The statements in wfx_bss_info_changed() has no particular order. For better readability, group and sort the statements relative to the association processing. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200907101521.66082-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 414b804a71e9ff59094c037c67c8a2511c00e914 Author: Naveen Panwar Date: Tue Sep 8 08:32:39 2020 +0530 drivers: staging: octeon-usb: fixed codestyle check warning Fixed line cannot end with '(' check. Signed-off-by: Naveen Panwar Link: https://lore.kernel.org/r/20200908030239.10131-1-naveen.panwar27@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7b4d0da7e7dcb89b6e1c8164200588fa5f23fb44 Author: Ross Schmidt Date: Mon Sep 7 22:07:57 2020 -0500 staging: qlge: fix quoted string split across lines Fixed a coding style issue by merging split quoted strings in qlge_main.c to fix checkpatch warnings. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20200908030757.101278-1-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 14850f8ffb4699bffd529ac2f513fb0496a69a7a Author: Mikhail Gusarov Date: Fri Sep 11 23:33:51 2020 +0200 staging: emxx_udc: Remove misplaced debugging aid emxx_udc.h contained a #if 0 block with debugging macros. These should be supplied via command line or Kconfig. Fixes checkstyle's WARNING: Consider removing the code enclosed by this #if 0 and its #endif Signed-off-by: Mikhail Gusarov Link: https://lore.kernel.org/r/20200911213350.15914-1-dottedmag@dottedmag.net Signed-off-by: Greg Kroah-Hartman commit 9a9c1827e720fe25ee9cfbca6e10b7f78fcd39f7 Author: Sebastian Fuentes Date: Fri Sep 11 22:23:57 2020 -0700 staging: vt6655: Add spaces around arithmetic operators This addresses the checkpatch.pl warning "spaces preferred around that '+/-/*'" Signed-off-by: Sebastian Fuentes Link: https://lore.kernel.org/r/20200912052357.GA4707@ubuntu Signed-off-by: Greg Kroah-Hartman commit efd5a33258d9d7e86727839906045fb4dafe6782 Author: Sebastian Fuentes Date: Fri Sep 11 23:07:41 2020 -0700 staging: rts5208: rtsx_transport.c: Fix lines ending with parentheses Addresses checkpatch.pl check "Lines should not end with '('" Signed-off-by: Sebastian Fuentes Link: https://lore.kernel.org/r/20200912060741.GA6274@ubuntu Signed-off-by: Greg Kroah-Hartman commit 567d351e40cc574f1c082ad8e9075bde8fe4e68e Author: Abheek Dhawan Date: Sat Sep 12 01:41:23 2020 -0500 staging: fwserial: Remove repeated word and Remove unnecessary repeated word and Signed-off-by: Abheek Dhawan Link: https://lore.kernel.org/r/20200912064123.411656-1-adawesomeguy222@gmail.com Signed-off-by: Greg Kroah-Hartman commit f92c710f464465f7ff21c2ad30aa04a94aab0577 Author: Fabio Estevam Date: Fri Sep 11 09:40:34 2020 -0300 ARM: imx: Remove remnant board file support pieces Since i.MX board files are gone, remove some remnant pieces of board file support. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit 8485adf17a15faacc6403dce0b711ec8a1cbf403 Author: Fabio Estevam Date: Fri Sep 11 09:40:33 2020 -0300 ARM: imx: Remove imx device directory arch/arm/mach-imx/devices/ contains utilities for registering devices in board file. Now that board files are gone, get rid of the devices directory. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit e8d992fb529ee96d920ee9a9223dd02679d05c62 Author: Fabio Estevam Date: Fri Sep 11 09:40:32 2020 -0300 ARM: imx: Remove iomux-v3 board code IMX_HAVE_IOMUX_V3 was only used by i.MX25/35 board files. Since the board files users are gone, it is safe to remove iomux-v3 related code. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit 6c5f05a6cd88c77fd67833e18ac131ad53f86c24 Author: Fabio Estevam Date: Fri Sep 11 09:40:31 2020 -0300 ARM: imx3: Remove imx3 soc_init() imx31_soc_init() and imx35_soc_init() were only used by i.MX31/35 board files. Since the board files users are gone, it is safe to remove imx3 soc_init() functions. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit a542fc18168cccf6e3091fd52a4543e2ef107a84 Author: Fabio Estevam Date: Fri Sep 11 09:40:30 2020 -0300 ARM: imx31: Remove remaining i.MX31 board code i.MX31 is a devicetree only platform. Remove remaining i.MX31 board code. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit fc673fbf8cc16f496b9a2d2ae65aab15beb5e3b8 Author: Fabio Estevam Date: Fri Sep 11 09:40:29 2020 -0300 ARM: imx27: Retrieve AVIC base address from devicetree Now that imx27 has been converted to a devicetree-only platform, retrieve the AVIC base address from devicetree. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit 86fa07075cf3f9bd15ac7aa0a18915f26a442ce8 Author: Fabio Estevam Date: Fri Sep 11 09:40:28 2020 -0300 ARM: imx27: Get rid of mm-imx27.c Get rid of mm-imx27.c and move its code to the mach-imx27.c file. This aligns with other i.MX SoC code. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit eeae56887bc69bd96025be8117cccacd5cec0f6c Author: Fabio Estevam Date: Fri Sep 11 09:40:27 2020 -0300 ARM: imx27: Remove iomux-v1 board code IMX_HAVE_IOMUX_V1 was only used by i.MX27 board files. Since the board files users are gone, it is safe to remove iomux-v1 related code. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit 24e0729703babd424b63c0fd6d722687a3e8c079 Author: Fabio Estevam Date: Fri Sep 11 09:40:26 2020 -0300 ARM: imx27: Remove imx27_soc_init() imx27_soc_init() was only used by i.MX27 board files. Since the board files users are gone, it is safe to remove imx27_soc_init() too. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo commit cf4ff9618d2363362e89d52a595918d565b13bf3 Author: Peng Fan Date: Fri Sep 11 11:31:44 2020 +0800 ARM: imx7ulp: enable cpufreq Enable cpufreq for i.MX7ULP when imx cpufreq dt driver enabled. Signed-off-by: Peng Fan Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit 955c69f75eba1fcb0bcc78cf49533c9a3bb381ef Author: Krzysztof Kozlowski Date: Tue Sep 8 17:02:41 2020 +0200 arm64: dts: imx8mm-var-som-symphony: Drop unused gpioledgrp The gpioledgrp in iomux is not used, so it can be dropped. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit e2314cf5af30d5e87cbf89fdef1a0fe4efee4552 Author: Peng Fan Date: Tue Sep 8 18:07:01 2020 +0800 firmware: imx: scu-pd: ignore power domain not owned Should not register power domain that not owned by current partition. Alought power domains will not be registered when power on failure, we have to let CPU waste more cycles. Whether power on or owned check, both need communicate with SCU, but with owned check, we no need to run more code path to save CPU cycles. Signed-off-by: Peng Fan Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo commit 888bb3d2ccfbdc33dc947623e4a37841f6d8c0d4 Author: Matthias Schiffer Date: Mon Sep 7 10:04:29 2020 +0200 ARM: dts: imx6qdl-tqma6: fix LM75 compatible string Specify the National LM75 sensor including its vendor name, as mandated by the binding docs. Fixes: cac849e9bbc8 ("ARM: dts: imx6qdl: add TQMa6{S,Q,QP} SoM") Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit 1b61fa93179a88caeb7ed77ff66468f48805bed7 Author: Matthias Schiffer Date: Mon Sep 7 10:04:28 2020 +0200 ARM: dts: imx6qdl-tqma6: remove obsolete fsl,spi-num-chipselects This property is unneeded and not supported by the spi-imx driver. Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit afe617cb5fce7c37d9721008cf0ea89a587d3749 Author: Matthias Schiffer Date: Mon Sep 7 10:04:27 2020 +0200 ARM: dts: imx6qdl-tqma6: fix indentation The PMIC configuration is indented one level too deep. Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit 3f4bc34c9dbe3f1c0069b6be8181628a94429801 Author: Christophe JAILLET Date: Sat Sep 12 16:12:32 2020 +0200 net: tehuti: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'bdx_fifo_init()' GFP_ATOMIC must be used because it can be called from a '.ndo_set_rx_mode' function. Such functions hold the 'netif_addr_lock' spinlock. .ndo_set_rx_mode (see struct net_device_ops) --> bdx_change_mtu --> bdx_open --> bdx_rx_init --> bdx_tx_init --> bdx_fifo_init @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit c68d0ceb3cf896c952754e91ebfa8105cda95e01 Author: Christophe JAILLET Date: Sat Sep 12 13:44:18 2020 +0200 rocker: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'rocker_dma_ring_create()' GFP_KERNEL can be used because it is already used in the same function just a few lines above. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 3be4e289de63c9536dbc9cc38a8534f813ba5f22 Author: Christophe JAILLET Date: Sat Sep 12 13:28:58 2020 +0200 sc92031: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'sc92031_open()' GFP_KERNEL can be used because it is a '.ndo_open' function and no lock is taken in the between. '.ndo_open' functions are synchronized with the rtnl_lock() semaphore. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 9720bae378aea40e186493c895ecb217d4257728 Author: Christophe JAILLET Date: Sat Sep 12 12:25:18 2020 +0200 tlan: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'tlan_init()' GFP_KERNEL can be used because it is only called from a probe function or a module_init function and no lock is taken in the between. The call chain is: tlan_probe (module_init function) --> tlan_eisa_probe or tlan_init_one (probe function) then in both cases: --> tlan_probe1 --> tlan_init @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit e5e252ba21d243689a8e8bf2af5bf5579dabfea7 Author: Luo Jiaxing Date: Sat Sep 12 16:08:15 2020 +0800 net: ethernet: mlx4: Avoid assigning a value to ring_cons but not used it anymore in mlx4_en_xmit() We found a set but not used variable 'ring_cons' in mlx4_en_xmit(), it will cause a warning when build the kernel. And after checking the commit record of this function, we found that it was introduced by a previous patch. So, We delete this redundant assignment code. Fixes: 488a9b48e398 ("net/mlx4_en: Wake TX queues only when there's enough room") Signed-off-by: Luo Jiaxing Signed-off-by: David S. Miller commit b0772b4d95b1341d1f0f273894b999aa6b0916ba Author: Jonathan Neuschäfer Date: Sat Sep 5 17:10:16 2020 +0200 clk: imx: gate2: Fix a few typos A few words were misspelled in this comment. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo commit f89c696e7f635487481eee0d196ab49730ce8664 Author: Enric Balletbo i Serra Date: Wed Aug 26 10:53:17 2020 +0200 drm/mediatek: mtk_dpi: Convert to bridge driver Convert mtk_dpi to a bridge driver with built-in encoder support for compatibility with existing component drivers. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Chun-Kuang Hu commit dd429a462128cb12dc4b55f6812fcab46b3c0395 Author: Krzysztof Kozlowski Date: Fri Sep 4 16:53:12 2020 +0200 arm64: dts: imx8mq-librem5: Add interrupt-names to ti,tps6598x The ti,tps6598x binding requires interrupt-names property. The driver does not really use it but the hardware could have more interrupt lines connected. This fixes dtbs_check warning: arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dt.yaml: usb-pd@3f: 'interrupt-names' is a required property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 67daa514553b6bd315f8c23138e1486668939fb0 Author: Krzysztof Kozlowski Date: Fri Sep 4 16:53:11 2020 +0200 arm64: dts: imx8mq-librem5: Drop interrupt-names in PMIC The 'interrupt-names' property is not described in dtschema, not used by the driver and does not really make sense as its value is simple 'irq'. Drop it to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dt.yaml: pmic@4b: 'interrupt-names' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 0188e9947c82c0e409420d389c9b103b33f50520 Author: Krzysztof Kozlowski Date: Fri Sep 4 16:53:10 2020 +0200 arm64: dts: imx8mq-librem5: Align regulator names with schema Device tree schema expects regulator names to be lowercase. This fixes dtbs_check warnings like: pmic@4b: regulators:LDO1:regulator-name:0: 'LDO1' does not match '^ldo[1-7]$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 791619f66843a213784efb2f171be98933bad991 Author: Krzysztof Kozlowski Date: Fri Sep 4 16:53:09 2020 +0200 arm64: dts: imx8mq: Add missing interrupts to GPC The i.MX General Power Controller v2 device node was missing interrupts property necessary to route its interrupt to GIC. This also fixes the dbts_check warnings like: arch/arm64/boot/dts/freescale/imx8mq-evk.dt.yaml: gpc@303a0000: {'compatible': ... '$nodename': ['gpc@303a0000']} is not valid under any of the given schemas arch/arm64/boot/dts/freescale/imx8mq-evk.dt.yaml: gpc@303a0000: 'interrupts' is a required property Fixes: fdbcc04da246 ("arm64: dts: imx8mq: add GPC power domains") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo commit 7124b34fab911c53563f0a8f0c8f7d87222f4e5e Author: Krzysztof Kozlowski Date: Fri Sep 4 16:53:08 2020 +0200 arm64: dts: imx8mp-evk: Align pin configuration group names with schema Device tree schema expects pin configuration groups to end with 'grp' suffix, otherwise dtbs_check complain with a warning like: ... 'usdhc3grp-100mhz', 'usdhc3grp-200mhz' do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo commit 0f4c40f10242463400950ef8b3ecd45c95bbefca Author: Krzysztof Kozlowski Date: Fri Sep 4 16:53:07 2020 +0200 arm64: dts: imx8mm-var-som-symphony: Use newer interrupts property The int-gpios was deprecated in favor of generic interrupts property. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 8b465f01eed14df18ecd3ef99e896e8d158227c5 Author: Enric Balletbo i Serra Date: Wed Aug 26 10:53:16 2020 +0200 drm/mediatek: mtk_dpi: Rename bridge to next_bridge This is really a cosmetic change just to make a bit more readable the code after convert the driver to drm_bridge. The bridge variable name will be used by the encoder drm_bridge, and the chained bridge will be named next_bridge. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Chun-Kuang Hu commit 77809cf74a8c8ab21b02cc16f2bdc0dc1ed36421 Author: Amit Pundir Date: Fri Sep 11 21:45:40 2020 +0530 arm64: dts: qcom: Add support for Xiaomi Poco F1 (Beryllium) Add initial dts support for Xiaomi Poco F1 (Beryllium). This initial support is based on upstream Dragonboard 845c (sdm845) device. With this dts, Beryllium boots AOSP up to ADB shell over USB-C. Supported functionality includes UFS, USB-C (peripheral), microSD card and Vol+/Vol-/power keys. Bluetooth should work too but couldn't be verified from adb command line, it is verified when enabled from UI with few WIP display patches. Just like initial db845c support, initializing the SMMU is clearing the mapping used for the splash screen framebuffer, which causes the device to hang during boot and recovery needs a hard power reset. This can be worked around using: fastboot oem select-display-panel none To switch ON the display back run: fastboot oem select-display-panel But this only works on Beryllium devices running bootloader version BOOT.XF.2.0-00369-SDM845LZB-1 that shipped with Android-9 based release. Newer bootloader version do not support switching OFF the display panel at all. Reviewed-by: Konrad Dybcio Signed-off-by: Amit Pundir Link: https://lore.kernel.org/r/1599840940-18144-1-git-send-email-amit.pundir@linaro.org Signed-off-by: Bjorn Andersson commit 25faf2f2e06565d5cd0b97f77364fbe38f14ef71 Author: Rob Clark Date: Mon Aug 17 15:01:45 2020 -0700 drm/msm: Show process names in gem_describe In $debugfs/gem we already show any vma(s) associated with an object. Also show process names if the vma's address space is a per-process address space. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson commit 84c31ee16f903b481e7d4b94e2fc931d373494a0 Author: Jordan Crouse Date: Mon Aug 17 15:01:41 2020 -0700 drm/msm/a6xx: Add support for per-instance pagetables Add support for using per-instance pagetables if all the dependencies are available. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Akhil P Oommen commit 933415e24bd0dcb29f837040df20e677626054f8 Author: Jordan Crouse Date: Mon Aug 17 15:01:40 2020 -0700 drm/msm: Add support for private address space instances Add support for allocating private address space instances. Targets that support per-context pagetables should implement their own function to allocate private address spaces. The default will return a pointer to the global address space. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson commit b145c6e65eb05e123097d726aa9d4f5b8f11c401 Author: Jordan Crouse Date: Mon Aug 17 15:01:39 2020 -0700 drm/msm: Add support to create a local pagetable Add support to create a io-pgtable for use by targets that support per-instance pagetables. In order to support per-instance pagetables the GPU SMMU device needs to have the qcom,adreno-smmu compatible string and split pagetables enabled. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson commit e3c64c7221f6d85a3ba4db39a220432933d99a64 Author: Jordan Crouse Date: Mon Aug 17 15:01:38 2020 -0700 drm/msm: Set the global virtual address range from the IOMMU domain Use the aperture settings from the IOMMU domain to set up the virtual address range for the GPU. This allows us to transparently deal with IOMMU side features (like split pagetables). Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson commit 15eb9ad073c035499b4abd7456822c8696ac1941 Author: Jordan Crouse Date: Mon Aug 17 15:01:37 2020 -0700 drm/msm: Drop context arg to gpu->submit() Now that we can get the ctx from the submitqueue, the extra arg is redundant. Signed-off-by: Jordan Crouse [split out of previous patch to reduce churny noise] Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson commit cf655d615931b905bbb40f7b5387eb0efd1742e0 Author: Jordan Crouse Date: Mon Aug 17 15:01:36 2020 -0700 drm/msm: Add a context pointer to the submitqueue Each submitqueue is attached to a context. Add a pointer to the context to the submitqueue at create time and refcount it so that it stays around through the life of the queue. Co-developed-by: Rob Clark Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson commit 9cba4056a112785bf25e582fc6e7baa8346fe684 Author: Rob Clark Date: Mon Aug 17 15:01:32 2020 -0700 drm/msm: Set adreno_smmu as gpu's drvdata This will be populated by adreno-smmu, to provide a way for coordinating enabling/disabling TTBR0 translation. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson commit 69a9313b6617745bd841e1357e894abc85b9573d Author: Rob Clark Date: Mon Aug 17 15:01:31 2020 -0700 drm/msm/gpu: Add dev_to_gpu() helper In a later patch, the drvdata will not directly be 'struct msm_gpu *', so add a helper to reduce the churn. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson commit 2fc7b1561fbe502f7a08f3df7e0d0cecee985966 Author: Rob Clark Date: Mon Aug 17 15:01:30 2020 -0700 drm/msm: Add private interface for adreno-smmu This interface will be used for drm/msm to coordinate with the qcom_adreno_smmu_impl to enable/disable TTBR0 translation. Once TTBR0 translation is enabled, the GPU's CP (Command Processor) will directly switch TTBR0 pgtables (and do the necessary TLB inv) synchronized to the GPU's operation. But help from the SMMU driver is needed to initially bootstrap TTBR0 translation, which cannot be done from the GPU. Since this is a very special case, a private interface is used to avoid adding highly driver specific things to the public iommu interface. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson commit a3367f5ffe9a49d1184815be7b841c9d11ec7bce Author: Rob Clark Date: Mon Aug 17 15:01:26 2020 -0700 drm/msm: Remove dangling submitqueue references Currently it doesn't matter, since we free the ctx immediately. But when we start refcnt'ing the ctx, we don't want old dangling list entries to hang around. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson commit 08d3ab4b46339bc6f97e83b54a3fb4f8bf8f4cd9 Author: Zhenzhong Duan Date: Sat Sep 12 18:25:58 2020 +0800 drm/msm/a6xx: fix a potential overflow issue It's allocating an array of a6xx_gpu_state_obj structure rathor than its pointers. This patch fix it. Signed-off-by: Zhenzhong Duan Signed-off-by: Rob Clark commit 0a48db562c6264da2ae8013491efd6e8dc780520 Author: Luca Weiss Date: Fri Sep 11 18:08:53 2020 +0200 drm/msm/adreno: fix probe without iommu The function iommu_domain_alloc returns NULL on platforms without IOMMU such as msm8974. This resulted in PTR_ERR(-ENODEV) being assigned to gpu->aspace so the correct code path wasn't taken. Fixes: ccac7ce373c1 ("drm/msm: Refactor address space initialization") Signed-off-by: Luca Weiss Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit ec1cb6e4408abe5fb723872d265fefa939f1a2ba Author: Rob Clark Date: Tue Sep 1 08:41:56 2020 -0700 drm/msm/gpu: Add suspend/resume tracepoints Signed-off-by: Rob Clark commit 1ef7c99d145c2759308e53bf19f2cc971677680c Author: Jonathan Marek Date: Fri Sep 11 11:09:39 2020 -0400 drm/msm/dsi: add support for 7nm DSI PHY/PLL This adds support for the 7nm ("V4") DSI PHY/PLL for sm8150 and sm8250. Implementation is based on 10nm driver, but updated based on the downstream 7nm driver. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov (SM8250) Signed-off-by: Rob Clark commit 11550636040dddadcb2ffec18c37fb2c5105a04a Author: Jonathan Marek Date: Fri Sep 11 11:09:38 2020 -0400 drm/msm/dsi: add DSI config for sm8150 and sm8250 This allows DSI driver to work with sm8150 and sm8250. The sdm845 config is re-used as the config is the same. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov (SM8250) Signed-off-by: Rob Clark commit 763aecddcd32a3f0d695e1f550ac834dbc881c5e Author: Jonathan Marek Date: Fri Sep 11 11:09:37 2020 -0400 drm/msm/dsi: remove unused clk_pre/clk_post in msm_dsi_dphy_timing The clk_pre/clk_post values in shared_timings are used instead, and these are unused. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov (SM8250) Signed-off-by: Rob Clark commit d5653a994a665c66f26a92b57a1d4dcb3639c9ea Author: Robin Murphy Date: Thu Sep 3 22:04:03 2020 +0100 drm/msm: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Also the DMA segment size is simply a size, not a bitmask. Signed-off-by: Robin Murphy Signed-off-by: Rob Clark commit 84f28fc38d2ff99e2ac623325ba37809da611b8e Author: Thierry Reding Date: Tue Aug 25 16:33:48 2020 +0200 pinctrl: devicetree: Keep deferring even on timeout driver_deferred_probe_check_state() may return -ETIMEDOUT instead of -EPROBE_DEFER after all built-in drivers have been probed. This can cause issues for built-in drivers that depend on resources provided by loadable modules. One such case happens on Tegra where I2C controllers are used during early boot to set up the system PMIC, so the I2C driver needs to be a built-in driver. At the same time, some instances of the I2C controller depend on the DPAUX hardware for pinmuxing. Since the DPAUX is handled by the display driver, which is usually not built-in, the pin control states will not become available until after the root filesystem has been mounted and the display driver loaded from it. Fixes: bec6c0ecb243 ("pinctrl: Remove use of driver_deferred_probe_check_state_continue()") Suggested-by: John Stultz Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20200825143348.1358679-1-thierry.reding@gmail.com Signed-off-by: Linus Walleij commit 6d8e04f9d38345770572a39125a47da37bb8ce9e Author: Martin DEVERA Date: Wed Aug 5 11:28:11 2020 +0200 pinctrl: sx150x: Fix pinctrl enablement order bug I encountered bug in SX1502 expander driver in 5.7.7. Here is relevant DTS part: compatible = "semtech,sx1502q"; gpio4_cfg_pins: gpio2-cfg {                         pins = "gpio5";                         output-high;     }; And part of OOPS: [    0.673996] [] (gpiochip_get_data) from [] (sx150x_gpio_direction_output+0xd) [    0.683259] [] (sx150x_gpio_direction_output) from [] (sx150x_pinconf_set+0x) [    0.692796] [] (sx150x_pinconf_set) from [] (pinconf_apply_setting+0x39/0x7e) [    0.701635] [] (pinconf_apply_setting) from [] (pinctrl_commit_state+0xa5/0x) [    0.710648] [] (pinctrl_commit_state) from [] (pinctrl_enable+0xff/0x1d4) [    0.719139] [] (pinctrl_enable) from [] (sx150x_probe+0x1a3/0x358) [    0.727027] [] (sx150x_probe) from [] (i2c_device_probe+0x1bb/0x1dc) The problem is that sx150x_pinconf_set uses sx150x_gpio_direction_output but gpio is not setup yet. Patch below fixes it but I'm not sure whether is it correct. Link: https://lore.kernel.org/r/f32130bf-cfd4-b1bf-538c-dbc9ee2d947a@eaxlabs.cz Signed-off-by: Martin DEVERA Signed-off-by: Linus Walleij commit 6519a5ab1a9ffe5cf8056f688a69960bf126e723 Author: Denis Efremov Date: Tue Aug 11 10:49:53 2020 +0300 coccinelle: api: update kzfree script to kfree_sensitive Commit 453431a54934 ("mm, treewide: rename kzfree() to kfree_sensitive()") renames kzfree to kfree_sensitive and uses memzero_explicit(...) instead of memset(..., 0, ...) internally. Update cocci script to reflect these changes. Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 0662e4a190cfdb50df7a00bbc9aebe3ed3f09474 Author: Heiko Stuebner Date: Sat Sep 5 23:49:55 2020 +0200 pinctrl: rockchip: depend on OF The Rockchip pinctrl driver needs to handle information from Devicetree so only makes sense getting compiled on systems with CONFIG_OF enabled. This also fixes a problem found by the "kernel-test-robot" when compiling the driver on test-builds that do not have CONFIG_OF enabled: drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_pinctrl_parse_groups': >> drivers/pinctrl/pinctrl-rockchip.c:2881:9: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration] 2881 | ret = pinconf_generic_parse_dt_config(np_config, NULL, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | pinconf_generic_dump_config drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_gpiolib_register': >> drivers/pinctrl/pinctrl-rockchip.c:3473:5: error: 'struct gpio_chip' has no member named 'of_node' 3473 | gc->of_node = bank->of_node; Reported-by: kernel test robot Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20200905214955.907950-1-heiko@sntech.de Signed-off-by: Linus Walleij commit 473436e7647d63dc8bc144edd4b970fd210509d7 Author: Yangtao Li Date: Fri Jul 24 15:05:49 2020 +0800 pinctrl: sunxi: add support for the Allwinner A100 pin controller This commit introduces support for the pin controller on A100. Signed-off-by: Yangtao Li Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/4e331a2ed4a30c883df6157bc5c52bb686aa8e0d.1595572867.git.frank@allwinnertech.com Signed-off-by: Linus Walleij commit 5e842dc23cd3a99051f615161bb0972b8dc10d66 Author: Yangtao Li Date: Fri Jul 24 15:02:42 2020 +0800 dt-bindings: pinctrl: sunxi: Add A100 pinctrl bindings Add device tree binding Documentation details for A100 pinctrl driver, which has a r pin controller and a pin controller with more irq lines. Signed-off-by: Yangtao Li Reviewed-by: Rob Herring Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/a5773d677bcc89af3810cdd187fae54eced82f27.1595572867.git.frank@allwinnertech.com Signed-off-by: Linus Walleij commit 96bef667ddbb82e891ed15b7087d1ae0a7081115 Author: Yangtao Li Date: Fri Jul 24 15:00:31 2020 +0800 dt-bindings: pinctrl: sunxi: Get rid of continual nesting Rather than a continual nesting of 'else' clauses, just make each 'if' a new entry under 'allOf' and get rid of the else. Signed-off-by: Yangtao Li Reviewed-by: Rob Herring Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/229e4870dab1b34797304c384e68c7d04196423b.1595572867.git.frank@allwinnertech.com Signed-off-by: Linus Walleij commit a68a7844264e4fb91dcc1c6525cdb275223ce79c Author: Nobuhiro Iwamatsu Date: Thu Sep 10 05:43:30 2020 +0900 pinctrl: visconti: Add Toshiba Visconti SoCs pinctrl support Add pinctrl support to Toshiba Visconti SoCs. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Punit Agrawal Link: https://lore.kernel.org/r/20200909204336.2558-3-nobuhiro1.iwamatsu@toshiba.co.jp Signed-off-by: Linus Walleij commit 1825c1fe0057e1904f772574e16d9cbbcaf30f85 Author: Nobuhiro Iwamatsu Date: Thu Sep 10 05:43:29 2020 +0900 pinctrl: Add DT bindings for Toshiba Visconti TMPV7700 SoC Add pinctrl bindings for Toshiba Visconti TMPV7700 SoC series. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Punit Agrawal Link: https://lore.kernel.org/r/20200909204336.2558-2-nobuhiro1.iwamatsu@toshiba.co.jp Signed-off-by: Linus Walleij commit 8a643cc8d56d12e56cdd08139566a28b6150b231 Author: Rikard Falkeborn Date: Mon Aug 31 00:43:11 2020 +0200 pinctrl: actions: pinctrl-s900: Constify s900_padinfo[] The only usage of s900_padinfo[] is to assign it to the padinfo field in the owl_pinctrl_soc_data struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200830224311.36994-4-rikard.falkeborn@gmail.com Signed-off-by: Linus Walleij commit d01afb7115b190a594441d152a5dd364b9e0d602 Author: Rikard Falkeborn Date: Mon Aug 31 00:43:10 2020 +0200 pinctrl: actions: pinctrl-s700: Constify s700_padinfo[] The only usage of s700_padinfo[] is to assign it to the padinfo field in the owl_pinctrl_soc_data struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200830224311.36994-3-rikard.falkeborn@gmail.com Signed-off-by: Linus Walleij commit 8e2f830acaa4a05087bc637fff4434de50057c11 Author: Rikard Falkeborn Date: Mon Aug 31 00:43:09 2020 +0200 pinctrl: actions: pinctrl-owl: Constify owl_pinctrl_ops and owl_pinmux_ops The only usage of owl_pinctrl_ops and owl_pinmux_ops is to assign their addresses to the pctlops and the pmxops fields in the pinctrl_desc struct, which are const pointers. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200830224311.36994-2-rikard.falkeborn@gmail.com Signed-off-by: Linus Walleij commit 0a2d411b56b7c661e753bbea568f6b04c4a961c5 Merge: feeaefd378cae 8c0aa567146b1 Author: Linus Walleij Date: Sat Sep 12 11:36:59 2020 +0200 Merge tag 'imx-gpio-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into devel NXP i.MX GPIO bindings for v5.10 Few NXP i.MX GPIO controller bindings cleanup. commit b9b7fb29433b906635231d0a111224efa009198c Author: Thomas Preston Date: Fri Aug 28 22:32:26 2020 +0100 pinctrl: mcp23s08: Fix mcp23x17 precious range On page 23 of the datasheet [0] it says "The register remains unchanged until the interrupt is cleared via a read of INTCAP or GPIO." Include INTCAPA and INTCAPB registers in precious range, so that they aren't accidentally cleared when we read via debugfs. [0] https://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf Fixes: 8f38910ba4f6 ("pinctrl: mcp23s08: switch to regmap caching") Signed-off-by: Thomas Preston Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200828213226.1734264-3-thomas.preston@codethink.co.uk Signed-off-by: Linus Walleij commit b445f6237744df5e8d4f56f8733b2108c611220a Author: Thomas Preston Date: Fri Aug 28 22:32:25 2020 +0100 pinctrl: mcp23s08: Fix mcp23x17_regmap initialiser The mcp23x17_regmap is initialised with structs named "mcp23x16". However, the mcp23s08 driver doesn't support the MCP23016 device yet, so this appears to be a typo. Fixes: 8f38910ba4f6 ("pinctrl: mcp23s08: switch to regmap caching") Signed-off-by: Thomas Preston Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200828213226.1734264-2-thomas.preston@codethink.co.uk Signed-off-by: Linus Walleij commit c4176e12a755d0c761736c14bd2656ffc733eb95 Author: Hans Verkuil Date: Sat Sep 12 09:59:27 2020 +0200 media: media/test-drivers/Kconfig: fix broken Kconfig menuconfig DVB_TEST_DRIVERS should be added after the V4L_TEST_DRIVERS, otherwise there are no drivers listed in these two menus. Signed-off-by: Hans Verkuil Fixes: 24fb190e92e0 ("media: vidtv: implement a tuner driver") Signed-off-by: Mauro Carvalho Chehab commit 63101b75689331c5392c9330291f57b9fd2ef94c Author: Mauro Carvalho Chehab Date: Fri Sep 11 13:14:36 2020 +0200 media: vidtv: fix driver unbind/remove The current remove logic is broken and causes an OOPS. Fix it. Signed-off-by: Mauro Carvalho Chehab commit 1f9a704601f02710f1456858f77e338b05c82f17 Author: Daniel W. S. Almeida Date: Fri Aug 21 14:58:48 2020 +0200 media: Documentation: vidtv: Add ReST documentation for vidtv Add documentation for the Virtual Digital TV driver (vidtv) in the Restructured Text (ReST) format. This discusses: - What is vidtv - Why vidtv is needed - How to build and run vidtv - How vidtv is structured - How to test vidtv - How to improve vidtv [mchehab: fixed bad whitespaces] Signed-off-by: Daniel W. S. Almeida Signed-off-by: Mauro Carvalho Chehab commit f90cf6079bf67988f8b1ad1ade70fc89d0080905 Author: Daniel W. S. Almeida Date: Fri Aug 21 14:58:47 2020 +0200 media: vidtv: add a bridge driver Digital TV devices consist of several independent hardware components which are controlled by different drivers. Each media device is controlled by a group of cooperating drivers with the bridge driver as the main driver. This patch adds a bridge driver for the Virtual Digital TV driver [vidtv]. The bridge driver binds to the other drivers, that is, vidtv_tuner and vidtv_demod and implements the digital demux logic, providing userspace with a MPEG Transport Stream. The MPEG related code is split in the following way: - vidtv_ts: code to work with MPEG TS packets, such as TS headers, adaptation fields, PCR packets and NULL packets. - vidtv_psi: this is the PSI generator. PSI packets contain general information about a MPEG Transport Stream. A PSI generator is needed so userspace apps can retrieve information about the Transport Stream and eventually tune into a (dummy) channel. Because the generator is implemented in a separate file, it can be reused elsewhere in the media subsystem. Currently vidtv supports working with 3 PSI tables: PAT, PMT and SDT. - vidtv_pes: implements the PES logic to convert encoder data into MPEG TS packets. These can then be fed into a TS multiplexer and eventually into userspace. - vidtv_s302m: implements a S302M encoder to make it possible to insert PCM audio data in the generated MPEG Transport Stream. This shall enable passing an audio signal into userspace so it can be decoded and played by media software. - vidtv_channels: Implements a 'channel' abstraction When vidtv boots, it will create some hardcoded channels: Their services will be concatenated to populate the SDT. Their programs will be concatenated to populate the PAT For each program in the PAT, a PMT section will be created The PMT section for a channel will be assigned its streams. Every stream will have its corresponding encoder polled to produce TS packets These packets may be interleaved by the mux and then delivered to the bridge - vidtv_mux - Implements a MPEG TS mux, loosely based on the ffmpeg implementation The multiplexer is responsible for polling encoders, interleaving packets, padding the resulting stream with NULL packets if necessary and then delivering the resulting TS packets to the bridge driver so it can feed the demux. Signed-off-by: Daniel W. S. Almeida Signed-off-by: Mauro Carvalho Chehab commit f5ffc3b6edf122966b31acf7ce65ebdad42d1417 Author: Daniel W. S. Almeida Date: Fri Aug 21 14:58:46 2020 +0200 media: vidtv: implement a demodulator driver Implement a I2C demodulator driver, simulating support for DVB-T, DVB-C and DVB-S. This demodulator will periodically check the signal quality against a table and drop the TS lock if it drops below a threshold value, regaining it in the event that the signal improves. Signed-off-by: Daniel W. S. Almeida Signed-off-by: Mauro Carvalho Chehab commit 24fb190e92e09c819f432cdf366a1540cf52f1f2 Author: Daniel W. S. Almeida Date: Fri Aug 21 14:58:45 2020 +0200 media: vidtv: implement a tuner driver The virtual DVB test driver serves as a reference DVB driver and helps validate the existing APIs in the media subsystem. It can also aid developers working on userspace applications. This dummy tuner should support common TV standards such as DVB-T/T2/S/S2, ISDB-T and ATSC when completed. Signed-off-by: Daniel W. S. Almeida Signed-off-by: Mauro Carvalho Chehab commit 5e8db34966222c34d7e98767a2d54b6bb3aa248d Author: Mauro Carvalho Chehab Date: Fri Sep 11 09:27:35 2020 +0200 media: av7110: don't do float point math It sounds that earlier versions of GCC have troubles when doing const math at compile time, if no typecast is used: on i386: ERROR: modpost: "__floatunsidf" [drivers/media/pci/ttpci/dvb-ttpci.ko] undefined! ERROR: modpost: "__ltdf2" [drivers/media/pci/ttpci/dvb-ttpci.ko] undefined! The warning was generated on gcc (SUSE Linux) 7.5.0. Gcc 9.2 compiles it fine. As an added bonus, it also fixes this objtool warning: drivers/media/pci/ttpci/av7110_v4l.c:163:11: error: SSE register return with SSE disabled Reported-by: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Mauro Carvalho Chehab commit 6259c8441c4de3f1727a0db61465a8dc8f340c05 Author: Peter Ujfalusi Date: Fri Sep 11 21:47:39 2020 -0700 dmaengine: ti: k3-udma-glue: Fix parameters for rx ring pair request The original commit mixed up the forward and completion ring IDs for the rx flow configuration. Acked-by: Vinod Koul Reviewed-by: Grygorii Strashko Fixes: 4927b1ab2047 ("dmaengine: ti: k3-udma: Switch to k3_ringacc_request_rings_pair") Signed-off-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar commit 4f02044123b23660cee9d9dbea74383a58eb46b5 Author: Peter Ujfalusi Date: Fri Sep 11 21:47:39 2020 -0700 soc: ti: k3-socinfo: Add entry for J7200 Update K3 chipinfo driver to support new TI J7200 SoC. It's JTAG PARTNO is 0xBB6D. Reviewed-by: Lokesh Vutla Reviewed-by: Grygorii Strashko Signed-off-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar commit ba59c9b43c86b2c2396acac94e41d946cbaec9fe Author: Grzegorz Jaszczyk Date: Fri Sep 11 21:47:10 2020 -0700 soc: ti: pruss: support CORECLK_MUX and IEPCLK_MUX The IEPCLK_MUX is present on all SoCs whereas the CORECLK_MUX is present only on AM65x SoCs and J721E. Add support for both these CLK muxes. This allows the clock rates and clock parents for these to be controlled through DT leveraging the clk infrastructure for configuring the default parents and rates. Signed-off-by: Roger Quadros Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Santosh Shilimkar commit 25bafac9408f67873f03909401deecfb16974d84 Author: Grzegorz Jaszczyk Date: Fri Sep 11 21:47:09 2020 -0700 dt-bindings: soc: ti: Update TI PRUSS bindings regarding clock-muxes ICSS/ICSSG modules have an IEP clock mux that allow selection of internal IEP clock from 2 clock sources. ICSSG module has a CORE clock mux that allows selection of internal CORE clock from 2 clock sources. Add binding information for these 2 clock muxes. Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Santosh Shilimkar commit 71b610825f4b2130901c7b6fbf4063f03350bcb9 Author: Tero Kristo Date: Fri Sep 11 21:47:08 2020 -0700 firmware: ti_sci: allow frequency change for disabled clocks by default If a clock is disabled, its frequency should be allowed to change as it is no longer in use. Add a flag towards this to the firmware clock API handler routines. Acked-by: Nishanth Menon Tested-by: Tomi Valkeinen Signed-off-by: Tero Kristo Signed-off-by: Santosh Shilimkar commit efa5c01cd7ee20421a92ffe9b4aae7dfed385eeb Author: Tero Kristo Date: Fri Sep 11 21:47:08 2020 -0700 soc: ti: ti_sci_pm_domains: switch to use multiple genpds instead of one Current implementation of the genpd support over TI SCI uses a single genpd across the whole SoC, and attaches multiple devices to this. This solution has its drawbacks, like it is currently impossible to attach more than one power domain to a device; the core genpd implementation requires one genpd per power-domain entry in DT for a single device. Also, some devices like USB apparently require their own genpd during probe time, the current shared approach in use does not work at all. Switch the implementation over to use a single genpd per power domain entry in DT. The domains are registered with the onecell approach, but we also add our own xlate service due to recent introduction of the extended flag for TI SCI PM domains; genpd core xlate service requires a single cell per powerdomain, but we are using two cells. Signed-off-by: Tero Kristo Signed-off-by: Santosh Shilimkar commit 557003a98fb89e4841a8d9522c023ada145056d2 Author: Suman Anna Date: Fri Sep 11 21:43:37 2020 -0700 soc: ti: pruss: Enable support for ICSSG subsystems on K3 J721E SoCs The K3 J721E family of SoCs have a revised version of the PRU-ICSS (ICSSG) processor subsystem present on K3 AM65x SoCs. These SoCs contain typically two ICSSG instances named ICSSG0 and ICSSG1. The two ICSSGs are identical to each other for the most part with minor SoC integration differences and capabilities. The ICSSG1 supports slightly enhanced features like SGMII mode Ethernet, while the ICSSG0 instance is limited to MII mode only. There is no change in the Interrupt Controller w.r.t AM65x. All other integration aspects are very similar to the ICSSGs on AM65x SoCs. The existing pruss platform driver has been updated to support these new ICSSG instances through new J721E specific compatibles. Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Santosh Shilimkar commit 6530cd9b201db9a2f78c53a76b2dff4a5bf072fa Author: Suman Anna Date: Fri Sep 11 21:43:36 2020 -0700 soc: ti: pruss: Enable support for ICSSG subsystems on K3 AM65x SoCs The K3 AM65x family of SoCs have the next generation of the PRU-ICSS processor subsystem capable of supporting Gigabit Ethernet, and is commonly referred to as ICSSG. These SoCs contain typically three ICSSG instances named ICSSG0, ICSSG1 and ICSSG2. The three ICSSGs are identical to each other for the most part with minor SoC integration differences and capabilities. The ICSSG2 supports slightly enhanced features like SGMII mode Ethernet, while the ICSS0 and ICSSG1 instances are limited to MII mode only. The ICSSGs on K3 AM65x SoCs are in general super-sets of the PRUSS on the AM57xx/66AK2G SoCs. They include two additional auxiliary PRU cores called RTUs and few other additional sub-modules. The interrupt integration is also different on the K3 AM65x SoCs and are propagated through various SoC-level Interrupt Router and Interrupt Aggregator blocks. Other IP level differences include different constant tables, differences in system event interrupt input sources etc. They also do not have a programmable module reset line like those present on AM33xx/AM43xx SoCs. The modules are reset just like any other IP with the SoC's global cold/warm resets. The existing pruss platform driver has been updated to support these new ICSSG instances through new AM65x specific compatibles. A build dependency with ARCH_K3 is added to enable building all the existing PRUSS platform drivers for this ARMv8 platform. Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Santosh Shilimkar commit 3227c8daac3c34bcb7cef374c57c83844851c31e Author: Suman Anna Date: Fri Sep 11 21:43:36 2020 -0700 soc: ti: pruss: Add support for PRU-ICSS subsystems on 66AK2G SoC The 66AK2G SoC supports two PRU-ICSS instances, named PRUSS0 and PRUSS1, each of which has two PRU processor cores. The two PRU-ICSS instances are identical to each other with few minor SoC integration differences, and are very similar to the PRU-ICSS1 of AM57xx/AM43xx. The Shared Data RAM size is larger and the number of interrupts coming into MPU INTC is like the instances on AM437x. There are also few other differences attributing to integration in Keystone architecture (like no SYSCFG register or PRCM handshake protocols). Other IP level differences include different constant table, differences in system event interrupt input sources etc. They also do not have a programmable module reset line like those present on AM33xx/AM43xx SoCs. The modules are reset just like any other IP with the SoC's global cold/warm resets. The existing PRUSS platform driver has been enhanced to support these 66AK2G PRU-ICSS instances through new 66AK2G specific compatible for properly probing and booting all the different PRU cores in each PRU-ICSS processor subsystem. A build dependency with ARCH_KEYSTONE is added to enable the driver to be built in K2G-only configuration. Signed-off-by: Andrew F. Davis Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Santosh Shilimkar commit ae19b8a145252d35d4d31d53799f823fe3e2ccbf Author: Suman Anna Date: Fri Sep 11 21:43:35 2020 -0700 soc: ti: pruss: Add support for PRU-ICSS subsystems on AM57xx SoCs The AM57xx family of SoCs supports two PRU-ICSS instances, each of which has two PRU processor cores. The two PRU-ICSS instances are identical to each other, and are very similar to the PRU-ICSS1 of AM33xx/AM43xx except for a few minor differences like the RAM sizes and the number of interrupts coming into the MPU INTC. They do not have a programmable module reset line unlike those present on AM33xx/AM43xx SoCs. The modules are reset just like any other IP with the SoC's global cold/warm resets. Each PRU-ICSS's INTC is also preceded by a Crossbar that enables multiple external events to be routed to a specific number of input interrupt events. Any interrupt event directed towards PRUSS needs this crossbar to be setup properly on the firmware side. The existing PRUSS platform driver has been enhanced to support these AM57xx PRU-ICSS instances through new AM57xx specific compatible for properly probing and booting all the different PRU cores in each PRU-ICSS processor subsystem. A build dependency with SOC_DRA7XX is also added to enable the driver to be built in AM57xx-only configuration (there is no separate Kconfig option for AM57xx vs DRA7xx). Signed-off-by: Suman Anna Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Santosh Shilimkar commit 78251639d376a4ea1a795a4f3dcd985fcdf9aed3 Author: Suman Anna Date: Fri Sep 11 21:43:35 2020 -0700 soc: ti: pruss: Add support for PRU-ICSSs on AM437x SoCs The AM437x SoCs have two different PRU-ICSS subsystems: PRU-ICSS1 and a smaller PRU-ICSS0. Enhance the PRUSS platform driver to support both the PRU-ICSS sub-systems on these SoCs. The PRU-ICSS1 on AM437x is very similar to the PRU-ICSS on AM33xx except for few minor differences - increased Instruction RAM, increased Shared Data RAM2, and 1 less interrupt (PRUSS host interrupt 7 which is redirected to the other PRUSS) towards the MPU INTC. The PRU-ICSS0 is a cut-down version of the IP, with less DRAM per PRU, no Shared DRAM etc. It also does not have direct access to L3 bus regions, there is a single interface to L3 for both PRUSS0 and PRUSS1, and it would have to go through the PRUSS1's interface. The PRUSS_SYSCFG register is reserved on PRUSS0, so any external access requires the programming the corresponding PRUSS_SYSCFG register in PRUSS1. It does have its own dedicated I/O lines though. Note that this instance does not support any PRU Ethernet related use cases. The adaptation uses SoC-specific compatibles in the driver and uses a newly introduced pruss_match_private_data structure and the pruss_get_private_data() function to retrieve a PRUSS instance specific data using a device-name based lookup logic. The reset and the L3 external access are managed by the parent interconnect ti-sysc bus driver so that PRUSS1 and PRUSS0 can be independently supported. Signed-off-by: Suman Anna Signed-off-by: Andrew F. Davis Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Santosh Shilimkar commit dc1129564a0147feb459159fd220ae22357e2eb6 Author: Suman Anna Date: Fri Sep 11 21:43:34 2020 -0700 soc: ti: pruss: Add a platform driver for PRUSS in TI SoCs The Programmable Real-Time Unit - Industrial Communication Subsystem (PRU-ICSS) is present on various TI SoCs such as AM335x or AM437x or the Keystone 66AK2G. Each SoC can have one or more PRUSS instances that may or may not be identical. For example, AM335x SoCs have a single PRUSS, while AM437x has two PRUSS instances PRUSS1 and PRUSS0, with the PRUSS0 being a cut-down version of the PRUSS1. The PRUSS consists of dual 32-bit RISC cores called the Programmable Real-Time Units (PRUs), some shared, data and instruction memories, some internal peripheral modules, and an interrupt controller. The programmable nature of the PRUs provide flexibility to implement custom peripheral interfaces, fast real-time responses, or specialized data handling. The PRU-ICSS functionality is achieved through three different platform drivers addressing a specific portion of the PRUSS. Some sub-modules of the PRU-ICSS IP reuse some of the existing drivers (like davinci mdio driver or the generic syscon driver). This design provides flexibility in representing the different modules of PRUSS accordingly, and at the same time allowing the PRUSS driver to add some instance specific configuration within an SoC. The PRUSS platform driver deals with the overall PRUSS and is used for managing the subsystem level resources like various memories and the CFG module. It is responsible for the creation and deletion of the platform devices for the child PRU devices and other child devices (like Interrupt Controller, MDIO node and some syscon nodes) so that they can be managed by specific platform drivers. The PRUSS interrupt controller is managed by an irqchip driver, while the individual PRU RISC cores are managed by a PRU remoteproc driver. The driver currently supports the AM335x SoC, and support for other TI SoCs will be added in subsequent patches. Signed-off-by: Suman Anna Signed-off-by: Andrew F. Davis Signed-off-by: Tero Kristo Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Santosh Shilimkar commit bd691ce0ba9d610018072723307f5983f94f5322 Author: Grzegorz Jaszczyk Date: Fri Sep 11 21:41:17 2020 -0700 dt-bindings: soc: ti: Add TI PRUSS bindings This patch adds the bindings for the Programmable Real-Time Unit and Industrial Communication Subsystem (PRU-ICSS) present on various TI SoCs. The IP is present on multiple TI SoC architecture families including the OMAP architecture SoCs such as AM33xx, AM437x and AM57xx; and on a Keystone 2 architecture based 66AK2G SoC. It is also present on the Davinci based OMAPL138 SoCs and K3 architecture based AM65x and J721E SoCs as well. The IP has a number of sub-modules some of which are represented as their own devices. This binding covers only the top-level sub-system devices, and some sub-modules like MDIO, MII_RT (Ethernet MII_RT module with MII ports) and IEP (Industrial Ethernet Peripheral). The remaining sub-modules bindings shall be defined in the respective driver subsystem bindings folders. Couple of full examples have also been added demonstrating the devices on AM335x and AM437x SoCs. Reviewed-by: Rob Herring Signed-off-by: Suman Anna Signed-off-by: Roger Quadros Signed-off-by: Grzegorz Jaszczyk Signed-off-by: Santosh Shilimkar commit aee123f48f387ea62002cddb46c7cb04c96628df Author: Grygorii Strashko Date: Fri Sep 11 21:30:23 2020 -0700 bindings: soc: ti: soc: ringacc: remove ti,dma-ring-reset-quirk Remove "ti,dma-ring-reset-quirk" DT property as proper w/a handling is implemented now in Ringacc driver using SoC info. Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit 95e7be062aea6d2e09116cd4d28957d310c04781 Author: Grygorii Strashko Date: Fri Sep 11 21:29:56 2020 -0700 soc: ti: k3: ringacc: add am65x sr2.0 support The AM65x SR2.0 Ringacc has fixed errata i2023 "RINGACC, UDMA: RINGACC and UDMA Ring State Interoperability Issue after Channel Teardown". This errata also fixed for J271E SoC. Use SOC bus data for K3 SoC identification and enable i2023 errate w/a only for the AM65x SR1.0. This also makes obsolete "ti,dma-ring-reset-quirk" DT property. Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit 1623ad8ec04c771a54975fb84b22bc21c2dbcac1 Author: Divya Koppera Date: Fri Sep 11 18:48:44 2020 +0530 net: phy: mchp: Add support for LAN8814 QUAD PHY LAN8814 is a low-power, quad-port triple-speed (10BASE-T/100BASETX/1000BASE-T) Ethernet physical layer transceiver (PHY). It supports transmission and reception of data on standard CAT-5, as well as CAT-5e and CAT-6, unshielded twisted pair (UTP) cables. LAN8814 supports industry-standard QSGMII (Quad Serial Gigabit Media Independent Interface) and Q-USGMII (Quad Universal Serial Gigabit Media Independent Interface) providing chip-to-chip connection to four Gigabit Ethernet MACs using a single serialized link (differential pair) in each direction. The LAN8814 SKU supports high-accuracy timestamping functions to support IEEE-1588 solutions using Microchip Ethernet switches, as well as customer solutions based on SoCs and FPGAs. The LAN8804 SKU has same features as that of LAN8814 SKU except that it does not support 1588, SyncE, or Q-USGMII with PCH/MCH. This adds support for 10BASE-T, 100BASE-TX, and 1000BASE-T, QSGMII link with the MAC. Signed-off-by: Divya Koppera Signed-off-by: David S. Miller commit 5a6bd84f815485800699f55c78f690b2ed35f0c5 Author: Barry Song Date: Fri Sep 11 13:55:10 2020 +1200 net: hns: use IRQ_NOAUTOEN to avoid irq is enabled due to request_irq Rather than doing request_irq and then disabling the irq immediately, it should be safer to use IRQ_NOAUTOEN flag for the irq. It removes any gap between request_irq() and disable_irq(). Cc: Salil Mehta Reviewed-by: Yunsheng Lin Signed-off-by: Barry Song Signed-off-by: David S. Miller commit 1cf814a0dce9a9fd5d06e754a886a79ab91bf4f1 Merge: c4f3341700c51 06c5c91268319 Author: David S. Miller Date: Fri Sep 11 17:34:40 2020 -0700 Merge branch 'net-ethernet-ti-ale-add-static-configuration' Grygorii Strashko says: ==================== net: ethernet: ti: ale: add static configuration As existing, as newly introduced CPSW ALE versions have differences in supported features and ALE table formats. Especially it's actual for the recent AM65x/J721E/J7200 and future AM64x SoCs, which supports more features like: auto-aging, classifiers, Link aggregation, additional HW filtering, etc. The existing ALE configuration interface is not practical in terms of adding new features and requires consumers to program a lot static parameters. And any attempt to add new features will case endless adding and maintaining different combination of flags and options. Because CPSW ALE configuration is static and fixed for SoC (or set of SoC), It is reasonable to add support for static ALE configurations inside ALE module. This series introduces static ALE configuration table for different ALE variants and provides option for consumers to select required ALE configuration by providing ALE const char *dev_id identifier (Patch 2). And all existing driver have been switched to use new approach (Patches 3-6). After this ALE HW auto-ageing feature can be enabled for AM65x CPSW ALE variant (Patch 7). Finally, Patches 8-9 introduces tables to describe the ALE VLAN entries fields as the ALE VLAN entries are too much differ between different TI CPSW ALE versions. So, handling them using flags, defines and get/set functions are became over-complicated. Patch 1 - is preparation patch Changes in v3: - fixed comment for Patch 2 Changes in v2: - fixed sparse warnings v2: https://lore.kernel.org/patchwork/cover/1301684/ v1: https://lore.kernel.org/patchwork/cover/1301048/ ==================== Signed-off-by: David S. Miller commit 06c5c91268319efee19e2938db1a7e55a8e76c14 Author: Grygorii Strashko Date: Thu Sep 10 23:28:07 2020 +0300 net: ethernet: ti: ale: add support for multi port k3 cpsw versions The TI J721E (CPSW9g) ALE version is similar, in general, to Sitara AM3/4/5 CPSW ALE, but has more extended functions and different ALE VLAN entry format. This patch adds support for for multi port TI J721E (CPSW9g) ALE variant. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit aa61296c3095bf43baeef6cbd024796164154a69 Author: Grygorii Strashko Date: Thu Sep 10 23:28:06 2020 +0300 net: ethernet: ti: ale: switch to use tables for vlan entry description The ALE VLAN entries are too much differ between different TI CPSW ALE versions. So, handling them using flags, defines and get/set functions became over-complicated. This patch introduces tables to describe the ALE VLAN entries fields, which are different between TI CPSW ALE versions, and new get/set access functions. It also allows to detect incorrect access to not available ALL entry fields. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 23015ff1a0f33a296572df0fc23baf97c1f7f86f Author: Grygorii Strashko Date: Thu Sep 10 23:28:05 2020 +0300 net: ethernet: ti: am65-cpsw: enable hw auto ageing The AM65x ALE supports HW auto-ageing which can be enabled by programming ageing interval in ALE_AGING_TIMER register. For this CPSW fck_clk frequency has to be know by ALE. This patch extends cpsw_ale_params with bus_freq field and enables ALE HW auto ageing for AM65x CPSW2G ALE version. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 186f5c99b09de8adb8945a19755ce2622b91baf6 Author: Grygorii Strashko Date: Thu Sep 10 23:28:04 2020 +0300 net: ethernet: ti: ale: make usage of ale dev_id mandatory Hence all existing driver updated to use ALE dev_id the usage of ale dev_id can be made mandatory and cpsw_ale_create() can be updated to use "features" property from ALE static configuration. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 720116ad243d68bbb201b5852a79b1a817461314 Author: Grygorii Strashko Date: Thu Sep 10 23:28:03 2020 +0300 net: ethernet: ti: am65-cpsw: use dev_id for ale configuration The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI TI AM65x/J721E CPSW NUSS driver to use dev_id. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 6dcbd0d9b8eab82379e2a8d6a39cc740ced7cc55 Author: Grygorii Strashko Date: Thu Sep 10 23:28:02 2020 +0300 net: netcp: ethss: use dev_id for ale configuration The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI Keystone 2 NETCP driver to use dev_id and perform clean up by removing "ale_entries" configuration code. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 64922d37a99ecae07df40a262643a0d24df4cd48 Author: Grygorii Strashko Date: Thu Sep 10 23:28:01 2020 +0300 net: ethernet: ti: cpsw: use dev_id for ale configuration The previous patch has introduced possibility to select CPSW ALE by using ALE dev_id identifier. Switch TI cpsw driver to use dev_id="cpsw" and perform clean up by removing "ale_entries" configuration code. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 6a68df930c6310d18ca7aab4344520b859bf7e11 Author: Grygorii Strashko Date: Thu Sep 10 23:28:00 2020 +0300 net: ethernet: ti: ale: add static configuration As existing, as newly introduced CPSW ALE versions have differences in supported features and ALE table formats. Especially it's actual for the recent AM65x/J721E/J7200 SoC and feature AM64x, which supports features like: auto-aging, classifiers, Link aggregation, additional hw filtering, etc. Existing ALE configuration interface is not practical in terms of adding new features and requires consumers to program a lot static parameters. Any attempt to add new options will case endless adding and maintaining different combination of flags and options. Hence CPSW ALE configuration is static and fixed for SoC (or set of SoC) It is reasonable to add support for static ALE configurations inside ALE module. This patch adds static ALE configuration table for different ALE versions and provides option for consumers to select required ALE configuration by providing ALE const char *dev_id identifier. This feature is not enabled by default until existing CPSW drivers will be modified by follow up patches. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit b574bf0c6a8da461dcbe1c266ddd7e5ee10584a1 Author: Grygorii Strashko Date: Thu Sep 10 23:27:59 2020 +0300 net: ethernet: ti: ale: add cpsw_ale_get_num_entries api Add cpsw_ale_get_num_entries() API to return number of ALE table entries and update existing drivers to use it. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit c4f3341700c51948cbfb2a37e7ff6d9b43eb1ce2 Merge: a8c16e8ed624f 88236591ec3bc Author: David S. Miller Date: Fri Sep 11 17:30:43 2020 -0700 Merge branch 'DSA-tag_8021q-cleanup' Vladimir Oltean says: ==================== DSA tag_8021q cleanup This small series tries to consolidate the VLAN handling in DSA a little bit. It reworks tag_8021q to be minimally invasive to the dsa_switch_ops structure. This makes the rest of the code a bit easier to follow. ==================== Signed-off-by: David S. Miller commit 88236591ec3bc6fbf4393b435ea8f567e06faede Author: Vladimir Oltean Date: Thu Sep 10 19:48:57 2020 +0300 Revert "net: dsa: Add more convenient functions for installing port VLANs" This reverts commit 314f76d7a68bab0516aa52877944e6aacfa0fc3f. Citing that commit message, the call graph was: dsa_slave_vlan_rx_add_vid dsa_port_setup_8021q_tagging | | | | | +-------------+ | | v v dsa_port_vid_add dsa_slave_port_obj_add | | +-------+ +-------+ | | v v dsa_port_vlan_add Now that tag_8021q has its own ops structure, it no longer relies on dsa_port_vid_add, and therefore on the dsa_switch_ops to install its VLANs. So dsa_port_vid_add now only has one single caller. So we can simplify the call graph to what it was before, aka: dsa_slave_vlan_rx_add_vid dsa_slave_port_obj_add | | +-------+ +-------+ | | v v dsa_port_vlan_add Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5899ee367ab3fec885aa04d9a2b573bf2e464e7f Author: Vladimir Oltean Date: Thu Sep 10 19:48:56 2020 +0300 net: dsa: tag_8021q: add a context structure While working on another tag_8021q driver implementation, some things became apparent: - It is not mandatory for a DSA driver to offload the tag_8021q VLANs by using the VLAN table per se. For example, it can add custom TCAM rules that simply encapsulate RX traffic, and redirect & decapsulate rules for TX traffic. For such a driver, it makes no sense to receive the tag_8021q configuration through the same callback as it receives the VLAN configuration from the bridge and the 8021q modules. - Currently, sja1105 (the only tag_8021q user) sets a priv->expect_dsa_8021q variable to distinguish between the bridge calling, and tag_8021q calling. That can be improved, to say the least. - The crosschip bridging operations are, in fact, stateful already. The list of crosschip_links must be kept by the caller and passed to the relevant tag_8021q functions. So it would be nice if the tag_8021q configuration was more self-contained. This patch attempts to do that. Create a struct dsa_8021q_context which encapsulates a struct dsa_switch, and has 2 function pointers for adding and deleting a VLAN. These will replace the previous channel to the driver, which was through the .port_vlan_add and .port_vlan_del callbacks of dsa_switch_ops. Also put the list of crosschip_links into this dsa_8021q_context. Drivers that don't support cross-chip bridging can simply omit to initialize this list, as long as they dont call any cross-chip function. The sja1105_vlan_add and sja1105_vlan_del functions are refactored into a smaller sja1105_vlan_add_one, which now has 2 entry points: - sja1105_vlan_add, from struct dsa_switch_ops - sja1105_dsa_8021q_vlan_add, from the tag_8021q ops But even this change is fairly trivial. It just reflects the fact that for sja1105, the VLANs from these 2 channels end up in the same hardware table. However that is not necessarily true in the general sense (and that's the reason for making this change). The rest of the patch is mostly plain refactoring of "ds" -> "ctx". The dsa_8021q_context structure needs to be propagated because adding a VLAN is now done through the ops function pointers inside of it. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 7e092af2f3b33694b9117ffd978d42b04ec4f260 Author: Vladimir Oltean Date: Thu Sep 10 19:48:55 2020 +0300 net: dsa: tag_8021q: setup tagging via a single function call There is no point in calling dsa_port_setup_8021q_tagging for each individual port. Additionally, it will become more difficult to do that when we'll have a context structure to tag_8021q (next patch). So refactor this now. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 568a36a69bad4f2efcfa4f94c83aa150a463735c Author: Vladimir Oltean Date: Thu Sep 10 19:48:54 2020 +0300 net: dsa: tag_8021q: include missing refcount.h The previous assumption was that the caller would already have this header file included. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a8c16e8ed624f24b2b082fb9a193e0132a5fd108 Author: Rohit Maheshwari Date: Thu Sep 10 19:51:47 2020 +0530 crypto/chcr: move nic TLS functionality to drivers/net This patch moves complete nic tls offload (kTLS) code from crypto directory to drivers/net/ethernet/chelsio/inline_crypto/ch_ktls directory. nic TLS is made a separate ULD of cxgb4. Signed-off-by: Rohit Maheshwari Signed-off-by: David S. Miller commit 5684daa71383324bcd048bc5bc15428c5556ae5e Author: Jason Yan Date: Thu Sep 10 22:06:30 2020 +0800 drm: xlnx: remove defined but not used 'scaling_factors_666' This addresses the following gcc warning with "make W=1": drivers/gpu/drm/xlnx/zynqmp_disp.c:245:18: warning: ‘scaling_factors_666’ defined but not used [-Wunused-const-variable=] 245 | static const u32 scaling_factors_666[] = { | ^~~~~~~~~~~~~~~~~~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Hyun Kwon Link: https://patchwork.freedesktop.org/patch/msgid/20200910140630.1191782-1-yanaijie@huawei.com commit 6b5525c86c9263e2b04e6d2d42a860212e0cf881 Merge: 4a681bf3456fe 24b2c3751aa30 Author: David S. Miller Date: Fri Sep 11 17:15:22 2020 -0700 Merge branch 'sfc-encap-offloads-on-EF10' Edward Cree says: ==================== sfc: encap offloads on EF10 EF10 NICs from the 8000 series onwards support TX offloads (checksumming, TSO) on VXLAN- and NVGRE-encapsulated packets. This series adds driver support for these offloads. Changes from v1: * Fix 'no TXQ of type' error handling in patch #1 (and clear up the misleading comment that inspired the wrong version) * Add comment in patch #5 explaining what the deal with TSOv3 is ==================== Signed-off-by: David S. Miller commit 24b2c3751aa30c1fc0536289616c2dde35eed0ee Author: Edward Cree Date: Fri Sep 11 23:40:41 2020 +0100 sfc: advertise encapsulated offloads on EF10 Necessitates an .ndo_features_check, as the EF10 datapath has several limitations on what it can handle. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 0ce8df6614568cfb390756cac35ac690105181f5 Author: Edward Cree Date: Fri Sep 11 23:40:14 2020 +0100 sfc: implement encapsulated TSO on EF10 >From the 8000 series onwards, EF10 NICs with suitable firmware are able to perform TSO within VXLAN or NVGRE encapsulation. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 1679c72cf48552e75a624b9c9230e2c7c18cfffc Author: Edward Cree Date: Fri Sep 11 23:40:03 2020 +0100 sfc: de-indirect TSO handling Remove the tx_queue->handle_tso function pointer, and just use tx_queue->tso_version to decide which function to call, thus removing an indirect call from the fast path. Instead of passing a tso_v2 flag to efx_mcdi_tx_init(), set the desired tx_queue->tso_version before calling it. In efx_mcdi_tx_init(), report back failure to obtain a TSOv2 context by setting tx_queue->tso_version to 0, which will cause the TX path to use the GSO-based fallback. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit fe0c4060c1b90fabfcab387dc374edde420a98d6 Author: Edward Cree Date: Fri Sep 11 23:39:39 2020 +0100 sfc: select inner-csum-offload TX queues for skbs that need it Won't actually be exercised until we start advertising the corresponding offload features. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 85d43fdb57919b044e5f4a0ee0c92ff419cf21d5 Author: Edward Cree Date: Fri Sep 11 23:39:28 2020 +0100 sfc: create inner-csum queues on EF10 if supported If the MC reports the VXLAN_NVGRE datapath capability, then these queues can be used for checksum offload of encapsulated packets. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 044588b9637277b0b15f295a814bdc282113f3c4 Author: Edward Cree Date: Fri Sep 11 23:39:14 2020 +0100 sfc: define inner/outer csum offload TXQ types Nothing yet creates inner csum TXQs; just change all references to EFX_TXQ_TYPE_OFFLOAD to the new EFX_TXQ_TYPE_OUTER_CSUM. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 12804793b17c0e19115a90d98f2f3df0cb79e233 Author: Edward Cree Date: Fri Sep 11 23:39:02 2020 +0100 sfc: decouple TXQ type from label Make it possible to have an arbitrary mapping from types to labels, because when we add inner-csum-offload TXQs there will no longer be a convenient nesting hierarchy of NIC types (EF10 will have inner-csum TXQs, while Siena will have HIGHPRI). Correct a misleading comment on efx_hard_start_xmit(). Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 4a681bf3456fe0c53851646ffe2229145f2b6159 Author: Rikard Falkeborn Date: Sat Sep 12 00:00:15 2020 +0200 octeontx2-af: Constify npc_kpu_profile_{action,cam} These are never modified, so constify them to allow the compiler to place them in read-only memory. This moves about 25kB to read-only memory as seen by the output of the size command. Before: text data bss dec hex filename 296203 65464 1248 362915 589a3 drivers/net/ethernet/marvell/octeontx2/af/octeontx2_af.ko After: text data bss dec hex filename 321003 40664 1248 362915 589a3 drivers/net/ethernet/marvell/octeontx2/af/octeontx2_af.ko Signed-off-by: Rikard Falkeborn Signed-off-by: David S. Miller commit 0ea8a56de21be24cb79abb03dee79aabcd60a316 Merge: 0560c2173e3f1 166774a2c2c6b Author: Rodrigo Vivi Date: Fri Sep 11 20:00:20 2020 -0400 Merge drm/drm-next into drm-intel-next-queued Sync drm-intel-gt-next here so we can have an unified fixes flow. Signed-off-by: Rodrigo Vivi commit 769b628de0b9a7ab0b81e6eecca5ee7bf66e978d Author: Tejun Heo Date: Fri Sep 11 18:40:49 2020 -0400 blk-iocost: fix divide-by-zero in transfer_surpluses() Conceptually, root_iocg->hweight_donating must be less than WEIGHT_ONE but all hweight calculations round up and thus it may end up >= WEIGHT_ONE triggering divide-by-zero and other issues. Bound the value to avoid surprises. Fixes: e08d02aa5fc9 ("blk-iocost: implement Andy's method for donation weight updates") Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 0806e60f31ec10822cd230d12603169d1bb7840e Author: Song Liu Date: Mon Aug 31 15:27:25 2020 -0700 bcache: use part_[begin|end]_io_acct instead of disk_[begin|end]_io_acct This enables proper statistics in /proc/diskstats for bcache partitions. Signed-off-by: Song Liu Reviewed-by: Coly Li Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 00fe60eae94efa5629bb6caf3839045cb22017e0 Author: Song Liu Date: Mon Aug 31 15:27:24 2020 -0700 md: use part_[begin|end]_io_acct instead of disk_[begin|end]_io_acct This enables proper statistics in /proc/diskstats for md partitions. Signed-off-by: Song Liu Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 7b26410b05f8c262688de8a689ba8e5d0c3cff01 Author: Song Liu Date: Mon Aug 31 15:27:23 2020 -0700 block: introduce part_[begin|end]_io_acct These functions can be used to enable iostat for partitions on devices like md, bcache. Signed-off-by: Song Liu Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 322dd63c7f98315b5794653bc582d109841219ae Author: Casey Schaufler Date: Tue Aug 11 17:39:43 2020 -0700 Smack: Use the netlabel cache Utilize the Netlabel cache mechanism for incoming packet matching. Refactor the initialization of secattr structures, as it was being done in two places. Signed-off-by: Casey Schaufler commit a2af031885071604452f03cd4e0eafdbd8014767 Author: Casey Schaufler Date: Tue Aug 11 17:39:42 2020 -0700 Smack: Set socket labels only once Refactor the IP send checks so that the netlabel value is set only when necessary, not on every send. Some functions get renamed as the changes made the old name misleading. Signed-off-by: Casey Schaufler commit 36be81293dbe35aca487917c2d76941bf734d2ad Author: Casey Schaufler Date: Tue Aug 11 17:39:41 2020 -0700 Smack: Consolidate uses of secmark into a function Add a function smack_from_skb() that returns the Smack label identified by a network secmark. Replace the explicit uses of the secmark with this function. Signed-off-by: Casey Schaufler commit cac7663cdce74eb6ee678f6dd0dc7ee4a251fa91 Merge: 12913f7459348 4da24fa64ddbc Author: David S. Miller Date: Fri Sep 11 14:55:14 2020 -0700 Merge branch 'sfc-misc-cleanups' Edward Cree says: ==================== sfc: misc cleanups Clean up a few nits I noticed while working on TXQ stuff. ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4da24fa64ddbce65de1403efb0af0332c14df67a Author: Edward Cree Date: Fri Sep 11 19:45:14 2020 +0100 sfc: cleanups around efx_alloc_channel The old_channel argument is never used, so remove it. The function is only called from elsewhere in efx_channels.c, so make it static and remove the declaration from the header file. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 3d6aef65dfaa0e9d6632fb15aebc01aae163c392 Author: Edward Cree Date: Fri Sep 11 19:44:56 2020 +0100 sfc: remove spurious unreachable return statement The statement above it already returns, so there is no way to get here. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit c0941025e2089bc65021ede7d46311ba1c88b150 Author: Edward Cree Date: Fri Sep 11 19:44:44 2020 +0100 sfc: remove duplicate call to efx_init_channels from EF100 probe efx_init_struct already calls this, we don't need to do it again. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 12913f7459348323e2c22dbd48be0c9e6213d892 Author: Ido Schimmel Date: Fri Sep 11 16:24:47 2020 +0300 bridge: mcast: Fix incomplete MDB dump Each MDB entry is encoded in a nested netlink attribute called 'MDBA_MDB_ENTRY'. In turn, this attribute contains another nested attributed called 'MDBA_MDB_ENTRY_INFO', which encodes a single port group entry within the MDB entry. The cited commit added the ability to restart a dump from a specific port group entry. However, on failure to add a port group entry to the dump the entire MDB entry (stored in 'nest2') is removed, resulting in missing port group entries. Fix this by finalizing the MDB entry with the partial list of already encoded port group entries. Fixes: 5205e919c9f0 ("net: bridge: mcast: add support for src list and filter mode dumping") Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 2291267e48c848a6effaaae882e08319db805a63 Author: Colin Ian King Date: Fri Sep 11 11:35:09 2020 +0100 ipv6: 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. Also re-order variable declarations in reverse Christmas tree ordering. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 4ba3819077254a10626e938acbb6c4e38883ab72 Merge: d324fa8021692 2fb7357d50efa Author: David S. Miller Date: Fri Sep 11 14:45:55 2020 -0700 Merge branch 'ag71xx-add-ethtool-and-flow-control-support' Oleksij Rempel says: ==================== ag71xx: add ethtool and flow control support The main target of this patches is to provide flow control support for ag71xx driver. To be able to validate this functionality, I also added ethtool support with HW counters. So, this patches was validated with iperf3 and counters showing Pause frames send or received by this NIC. ==================== Signed-off-by: David S. Miller commit 2fb7357d50efaffc43409cd2cfe30d6ceebff315 Author: Oleksij Rempel Date: Fri Sep 11 10:25:28 2020 +0200 net: ag71xx: add flow control support Add flow control support. The functionality was tested on AR9331 SoC and confirmed by iperf3 results and HW counters exported over ethtool. Following test configurations was used: iMX6S receiver <--- TL-SG1005D switch <---- AR9331 sender The switch is supporting symmytric flow control: Settings for eth0: Supported ports: [ MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: Symmetric Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full --->> Link partner advertised pause frame use: Symmetric Link partner advertised auto-negotiation: Yes Link partner advertised FEC modes: Not reported Speed: 100Mb/s Duplex: Full Auto-negotiation: on Port: MII PHYAD: 4 Transceiver: external Link detected: yes The iMX6S system was configured to 10Mbit, to let the switch use flow control: - ethtool -s eth0 speed 10 With flow control disabled on AR9331: - ethtool -A eth0 rx off tx off - iperf3 -u -c 172.17.0.1 -b100M -l1472 -t10 [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 66.2 MBytes 55.5 Mbits/sec 0.000 ms 0/47155 (0%) sender [ 5] 0.00-10.04 sec 11.5 MBytes 9.57 Mbits/sec 1.309 ms 38986/47146 (83%) receiver With flow control enabled on AR9331: - ethtool -A eth0 rx on tx on - iperf3 -u -c 172.17.0.1 -b100M -l1472 -t10 [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 15.1 MBytes 12.6 Mbits/sec 0.000 ms 0/10727 (0%) sender [ 5] 0.00-10.05 sec 11.5 MBytes 9.57 Mbits/sec 1.371 ms 2525/10689 (24%) receiver Similar results are get in opposite direction by introducing extra CPU load on AR9331: - chrt 40 dd if=/dev/zero of=/dev/null & Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit 3558698b9fdff6d9097c48e5b9eab81a35d6afdf Author: Oleksij Rempel Date: Fri Sep 11 10:25:27 2020 +0200 net: ag71xx: add ethtool support Add basic ethtool support. The functionality was tested on AR9331 SoC. Signed-off-by: Oleksij Rempel Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit d324fa8021692c54bb9c527e374e1a3cb831cc81 Author: Xie He Date: Thu Sep 10 23:35:03 2020 -0700 drivers/net/wan/x25_asy: Remove an unused flag "SLF_OUTWAIT" The "SLF_OUTWAIT" flag defined in x25_asy.h is not actually used. It is only cleared at one place in x25_asy.c but is never read or set. So we can remove it. Signed-off-by: Xie He Signed-off-by: David S. Miller commit 31f2760e41d3315e01895c4a9f9d365a5549ebfa Author: Luo Jiaxing Date: Fri Sep 11 11:55:58 2020 +0800 net: stmmac: set get_rx_header_len() as void for it didn't have any error code to return We found the following warning when using W=1 to build kernel: drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3634:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret, coe = priv->hw->rx_csum; When digging stmmac_get_rx_header_len(), dwmac4_get_rx_header_len() and dwxgmac2_get_rx_header_len() return 0 only, without any error code to report. Therefore, it's better to define get_rx_header_len() as void. Signed-off-by: Luo Jiaxing Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 5bc461fd565a487c53bac230af090c104535f43f Merge: e7a08121e0f49 7e074d5a76caf Author: David S. Miller Date: Fri Sep 11 14:31:54 2020 -0700 Merge branch 'Add-GVE-Features' David Awogbemila says: ==================== Add GVE Features. Note: Patch 4 in v3 was dropped. Patch 4 (patch 5 in v3): Start/stop timer only when report stats is enabled/disabled. Patch 7 (patch 8 in v3): Use netdev_info, not dev_info, to log device link status. ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7e074d5a76caffac4da8acdd65e0d1144a347e45 Author: David Awogbemila Date: Fri Sep 11 10:38:51 2020 -0700 gve: Enable Link Speed Reporting in the driver. This change allows the driver to report the device link speed when the ethtool command: ethtool is run. Getting the link speed is done via a new admin queue command: ReportLinkSpeed. Reviewed-by: Yangchun Fu Signed-off-by: David Awogbemila Signed-off-by: David S. Miller commit 3b7cc73628ff7a545c3ae0762706d2039a1a6446 Author: Patricio Noyola Date: Fri Sep 11 10:38:50 2020 -0700 gve: Use link status register to report link status This makes the driver better aware of the connectivity status of the device. Based on the device's status register, the driver can call netif_carrier_{on,off}. Reviewed-by: Yangchun Fu Signed-off-by: Patricio Noyola Signed-off-by: David Awogbemila Signed-off-by: David S. Miller commit 5cdad90de62c27c6af53edb1b4b91712622b892b Author: Sagi Shahar Date: Fri Sep 11 10:38:49 2020 -0700 gve: Batch AQ commands for creating and destroying queues. Adds support for batching AQ commands and uses it for creating and destroying queues. Reviewed-by: Yangchun Fu Signed-off-by: Sagi Shahar Signed-off-by: David Awogbemila Signed-off-by: David S. Miller commit 2f523dc34ac8c355609e9b847852bf25bbdb30bf Author: David Awogbemila Date: Fri Sep 11 10:38:48 2020 -0700 gve: NIC stats for report-stats and for ethtool This adds per queue NIC stats to ethtool stats and to report-stats. These stats are always exposed to guest whether or not the report-stats flag is turned on. Signed-off-by: David Awogbemila Signed-off-by: David S. Miller commit 24aeb56f2d38edf1b324bdb4f8bc6faf9f0f540c Author: Kuo Zhao Date: Fri Sep 11 10:38:47 2020 -0700 gve: Add Gvnic stats AQ command and ethtool show/set-priv-flags. This adds functionality to report driver stats to Hypervisor. (Users may want to turn this feature off as a matter of privacy so a "report-stats" flag is added as an ethtool priv option. It is also disabled by default.) The hypervisor would trigger a stats report in case "too many" packets dropped; the stats would be useful in debugging stuck queues. A "stats_report_trigger_cnt" stat is added to count the number of times the hypervisor attempts to trigger stats report. A timer is also added so that when report-stats is enabled, stat are updated once every 20 seconds. Reviewed-by: Yangchun Fu Signed-off-by: Kuo Zhao Signed-off-by: David Awogbemila Signed-off-by: David S. Miller commit 0d5775d34dcc99141d995c480790a4cd1cd0cfb8 Author: Catherine Sullivan Date: Fri Sep 11 10:38:46 2020 -0700 gve: Use dev_info/err instead of netif_info/err. Update the driver to use dev_info/err instead of netif_info/err. Reviewed-by: Yangchun Fu Signed-off-by: Catherine Sullivan Signed-off-by: David Awogbemila Signed-off-by: David S. Miller commit 433e274b8f7b0360169694b00eab05bbfa0921f5 Author: Kuo Zhao Date: Fri Sep 11 10:38:45 2020 -0700 gve: Add stats for gve. Sample output of "ethtool -S " with 1 RX queue and 1 TX queue: NIC statistics: rx_packets: 1039 tx_packets: 37 rx_bytes: 822071 tx_bytes: 4100 rx_dropped: 0 tx_dropped: 0 tx_timeouts: 0 rx_skb_alloc_fail: 0 rx_buf_alloc_fail: 0 rx_desc_err_dropped_pkt: 0 interface_up_cnt: 1 interface_down_cnt: 0 reset_cnt: 0 page_alloc_fail: 0 dma_mapping_error: 0 rx_posted_desc[0]: 1365 rx_completed_desc[0]: 341 rx_bytes[0]: 215094 rx_dropped_pkt[0]: 0 rx_copybreak_pkt[0]: 3 rx_copied_pkt[0]: 3 tx_posted_desc[0]: 6 tx_completed_desc[0]: 6 tx_bytes[0]: 420 tx_wake[0]: 0 tx_stop[0]: 0 tx_event_counter[0]: 6 adminq_prod_cnt: 34 adminq_cmd_fail: 0 adminq_timeouts: 0 adminq_describe_device_cnt: 1 adminq_cfg_device_resources_cnt: 1 adminq_register_page_list_cnt: 16 adminq_unregister_page_list_cnt: 0 adminq_create_tx_queue_cnt: 8 adminq_create_rx_queue_cnt: 8 adminq_destroy_tx_queue_cnt: 0 adminq_destroy_rx_queue_cnt: 0 adminq_dcfg_device_resources_cnt: 0 adminq_set_driver_parameter_cnt: 0 Reviewed-by: Yangchun Fu Signed-off-by: Kuo Zhao Signed-off-by: David Awogbemila Signed-off-by: David S. Miller commit d5f7543c86e0a889403abd42e27e911cc33144c3 Author: Kuo Zhao Date: Fri Sep 11 10:38:44 2020 -0700 gve: Get and set Rx copybreak via ethtool This adds support for getting and setting the RX copybreak value via ethtool. Reviewed-by: Yangchun Fu Signed-off-by: Kuo Zhao Signed-off-by: David Awogbemila Signed-off-by: David S. Miller commit e7a08121e0f4954101605b30c2cf725ccdef7ec7 Merge: 9984c0bb22dca 5941d003f0a60 Author: David S. Miller Date: Fri Sep 11 13:32:31 2020 -0700 Merge tag 'wireless-drivers-next-2020-09-11' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.10 First set of patches for v5.10. Most noteworthy here is ath11k getting initial support for QCA6390 and IPQ6018 devices. But most of the patches are cleanup: W=1 warning fixes, fallthrough keywords, DMA API changes and tasklet API changes. Major changes: ath10k * support SDIO firmware codedumps * support station specific TID configurations ath11k * add support for IPQ6018 * add support for QCA6390 PCI devices ath9k * add support for NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 to improve PTK0 rekeying wcn36xx * add support for TX ack ==================== Signed-off-by: David S. Miller commit 3a1793066fdfbbd657d9591cc03d6e1b6634a587 Author: Pingfan Liu Date: Fri Aug 28 21:39:58 2020 +0800 Documentation/kvm/arm: improve description of HVC_SOFT_RESTART Besides disabling MMU, HVC_SOFT_RESTART also clears I+D bits. These behaviors are what kexec-reboot expects, so describe it more precisely. Signed-off-by: Pingfan Liu Cc: James Morse Cc: Marc Zyngier Cc: Geoff Levand Cc: Catalin Marinas Cc: Will Deacon Cc: Julien Thierry Cc: Suzuki K Poulose Cc: linux-doc@vger.kernel.org Cc: kvmarm@lists.cs.columbia.edu Link: https://lore.kernel.org/r/1598621998-20563-2-git-send-email-kernelfans@gmail.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Will Deacon commit 6fcaebac66673926aca27c4cd99dff28c067c130 Author: Daeho Jeong Date: Wed Aug 12 14:17:11 2020 +0900 f2fs: change virtual mapping way for compression pages By profiling f2fs compression works, I've found vmap() callings have unexpected hikes in the execution time in our test environment and those are bottlenecks of f2fs decompression path. Changing these with vm_map_ram(), we can enhance f2fs decompression speed pretty much. [Verification] Android Pixel 3(ARM64, 6GB RAM, 128GB UFS) Turned on only 0-3 little cores(at 1.785GHz) dd if=/dev/zero of=dummy bs=1m count=1000 echo 3 > /proc/sys/vm/drop_caches dd if=dummy of=/dev/zero bs=512k - w/o compression - 1048576000 bytes (0.9 G) copied, 2.082554 s, 480 M/s 1048576000 bytes (0.9 G) copied, 2.081634 s, 480 M/s 1048576000 bytes (0.9 G) copied, 2.090861 s, 478 M/s - before patch - 1048576000 bytes (0.9 G) copied, 7.407527 s, 135 M/s 1048576000 bytes (0.9 G) copied, 7.283734 s, 137 M/s 1048576000 bytes (0.9 G) copied, 7.291508 s, 137 M/s - after patch - 1048576000 bytes (0.9 G) copied, 1.998959 s, 500 M/s 1048576000 bytes (0.9 G) copied, 1.987554 s, 503 M/s 1048576000 bytes (0.9 G) copied, 1.986380 s, 503 M/s Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 78134d03511e789f3cba1260eb9fb9c55cd5eb7d Author: Daeho Jeong Date: Tue Sep 8 11:44:11 2020 +0900 f2fs: change return value of f2fs_disable_compressed_file to bool The returned integer is not required anywhere. So we need to change the return value to bool type. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c2759ebaf7e8f5510d0a77bd5003a20375ea6ed5 Author: Daeho Jeong Date: Tue Sep 8 11:44:10 2020 +0900 f2fs: change i_compr_blocks of inode to atomic value writepages() can be concurrently invoked for the same file by different threads such as a thread fsyncing the file and a kworker kernel thread. So, changing i_compr_blocks without protection is racy and we need to protect it by changing it with atomic type value. Plus, we don't need a 64bit value for i_compr_blocks, so just we will use a atomic value, not atomic64. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 32c0fec1aa85f1a9aebfd9445208f4223bcd96e8 Author: Chao Yu Date: Thu Sep 3 10:15:15 2020 +0800 f2fs: trace: fix typo Fixes a typo from 'compreesed' to 'compressed'. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 69c0dd29f75292cf90f032365e0f9d96b7ded5ca Author: Chao Yu Date: Thu Sep 3 10:14:41 2020 +0800 f2fs: ignore compress mount option on image w/o compression feature to keep consistent with behavior when passing compress mount option to kernel w/o compression feature, so that mount may not fail on such condition. Reported-by: Kyungmin Park Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ca313c82d15130ccfde861105cd288be47d05e34 Author: Randy Dunlap Date: Wed Sep 2 17:08:31 2020 -0700 f2fs: Documentation edits/fixes Correct grammar and spelling. Drop duplicate section for resize.f2fs. Change one occurrence of F2fs to F2FS for consistency. Signed-off-by: Randy Dunlap Cc: Jaegeuk Kim Cc: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0e2b7385cb59e566520cfd0a04b4b53bc9461e98 Author: Chao Yu Date: Wed Sep 2 15:01:52 2020 +0800 f2fs: allocate proper size memory for zstd decompress As 5kft <5kft@5kft.org> reported: kworker/u9:3: page allocation failure: order:9, mode:0x40c40(GFP_NOFS|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0 CPU: 3 PID: 8168 Comm: kworker/u9:3 Tainted: G C 5.8.3-sunxi #trunk Hardware name: Allwinner sun8i Family Workqueue: f2fs_post_read_wq f2fs_post_read_work [] (unwind_backtrace) from [] (show_stack+0x11/0x14) [] (show_stack) from [] (dump_stack+0x75/0x84) [] (dump_stack) from [] (warn_alloc+0xa3/0x104) [] (warn_alloc) from [] (__alloc_pages_nodemask+0xb87/0xc40) [] (__alloc_pages_nodemask) from [] (kmalloc_order+0x19/0x38) [] (kmalloc_order) from [] (kmalloc_order_trace+0x19/0x90) [] (kmalloc_order_trace) from [] (zstd_init_decompress_ctx+0x21/0x88) [] (zstd_init_decompress_ctx) from [] (f2fs_decompress_pages+0x97/0x228) [] (f2fs_decompress_pages) from [] (__read_end_io+0xfb/0x130) [] (__read_end_io) from [] (f2fs_post_read_work+0x61/0x84) [] (f2fs_post_read_work) from [] (process_one_work+0x15f/0x3b0) [] (process_one_work) from [] (worker_thread+0xfb/0x3e0) [] (worker_thread) from [] (kthread+0xeb/0x10c) [] (kthread) from [] zstd may allocate large size memory for {,de}compression, it may cause file copy failure on low-end device which has very few memory. For decompression, let's just allocate proper size memory based on current file's cluster size instead of max cluster size. Reported-by: 5kft <5kft@5kft.org> Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ae999bb9a3399527bbe2c352191a0d49faa9c441 Author: Daeho Jeong Date: Mon Aug 31 11:09:49 2020 +0900 f2fs: change compr_blocks of superblock info to 64bit Current compr_blocks of superblock info is not 64bit value. We are accumulating each i_compr_blocks count of inodes to this value and those are 64bit values. So, need to change this to 64bit value. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4eda1682cd0bf4a300d0b4e3ce2187dd8fccafde Author: Daeho Jeong Date: Mon Aug 31 09:24:01 2020 +0900 f2fs: add block address limit check to compressed file Need to add block address range check to compressed file case and avoid calling get_data_block_bmap() for compressed file. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit aad1383cbf08c87f29f5dba1622e122717fbc32a Author: Dan Robertson Date: Sun Aug 30 21:45:23 2020 +0000 f2fs: check position in move range ioctl When the move range ioctl is used, check the input and output position and ensure that it is a non-negative value. Without this check f2fs_get_dnode_of_data may hit a memmory bug. Signed-off-by: Dan Robertson Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 335cac8b25fd4601160080d2c012154c2f3b8676 Author: Jack Qiu Date: Mon Aug 31 09:58:02 2020 +0800 f2fs: correct statistic of APP_DIRECT_IO/APP_DIRECT_READ_IO Miss to update APP_DIRECT_IO/APP_DIRECT_READ_IO when receiving async DIO. For example: fio -filename=/data/test.0 -bs=1m -ioengine=libaio -direct=1 -name=fill -size=10m -numjobs=1 -iodepth=32 -rw=write Signed-off-by: Jack Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4cb03fecd3ff9adfaeb68267aac760eaaac0d7e1 Author: Matthew Wilcox (Oracle) Date: Mon Aug 24 22:48:41 2020 +0100 f2fs: Simplify SEEK_DATA implementation Instead of finding the first dirty page and then seeing if it matches the index of a block that is NEW_ADDR, delay the lookup of the dirty bit until we've actually found a block that's NEW_ADDR. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 093749e296e29a4b0162eb925a6701a01e8c9a98 Author: Chao Yu Date: Tue Aug 4 21:14:49 2020 +0800 f2fs: support age threshold based garbage collection There are several issues in current background GC algorithm: - valid blocks is one of key factors during cost overhead calculation, so if segment has less valid block, however even its age is young or it locates hot segment, CB algorithm will still choose the segment as victim, it's not appropriate. - GCed data/node will go to existing logs, no matter in-there datas' update frequency is the same or not, it may mix hot and cold data again. - GC alloctor mainly use LFS type segment, it will cost free segment more quickly. This patch introduces a new algorithm named age threshold based garbage collection to solve above issues, there are three steps mainly: 1. select a source victim: - set an age threshold, and select candidates beased threshold: e.g. 0 means youngest, 100 means oldest, if we set age threshold to 80 then select dirty segments which has age in range of [80, 100] as candiddates; - set candidate_ratio threshold, and select candidates based the ratio, so that we can shrink candidates to those oldest segments; - select target segment with fewest valid blocks in order to migrate blocks with minimum cost; 2. select a target victim: - select candidates beased age threshold; - set candidate_radius threshold, search candidates whose age is around source victims, searching radius should less than the radius threshold. - select target segment with most valid blocks in order to avoid migrating current target segment. 3. merge valid blocks from source victim into target victim with SSR alloctor. Test steps: - create 160 dirty segments: * half of them have 128 valid blocks per segment * left of them have 384 valid blocks per segment - run background GC Benefit: GC count and block movement count both decrease obviously: - Before: - Valid: 86 - Dirty: 1 - Prefree: 11 - Free: 6001 (6001) GC calls: 162 (BG: 220) - data segments : 160 (160) - node segments : 2 (2) Try to move 41454 blocks (BG: 41454) - data blocks : 40960 (40960) - node blocks : 494 (494) IPU: 0 blocks SSR: 0 blocks in 0 segments LFS: 41364 blocks in 81 segments - After: - Valid: 87 - Dirty: 0 - Prefree: 4 - Free: 6008 (6008) GC calls: 75 (BG: 76) - data segments : 74 (74) - node segments : 1 (1) Try to move 12813 blocks (BG: 12813) - data blocks : 12544 (12544) - node blocks : 269 (269) IPU: 0 blocks SSR: 12032 blocks in 77 segments LFS: 855 blocks in 2 segments Signed-off-by: Chao Yu [Jaegeuk Kim: fix a bug along with pinfile in-mem segment & clean up] Signed-off-by: Jaegeuk Kim commit 72789a4a6a914601912a8992b0d43bd5abc05128 Author: Pingfan Liu Date: Fri Aug 28 21:39:57 2020 +0800 arm64/relocate_kernel: remove redundant code Kernel startup entry point requires disabling MMU and D-cache. As for kexec-reboot, taking a close look at "msr sctlr_el1, x12" in __cpu_soft_restart as the following: -1. booted at EL1 The instruction is enough to disable MMU and I/D cache for EL1 regime. -2. booted at EL2, using VHE Access to SCTLR_EL1 is redirected to SCTLR_EL2 in EL2. So the instruction is enough to disable MMU and clear I+C bits for EL2 regime. -3. booted at EL2, not using VHE The instruction itself can not affect EL2 regime. But The hyp-stub doesn't enable the MMU and I/D cache for EL2 regime. And KVM also disable them for EL2 regime when its unloaded, or execute a HVC_SOFT_RESTART call. So when kexec-reboot, the code in KVM has prepare the requirement. As a conclusion, disabling MMU and clearing I+C bits in SYM_CODE_START(arm64_relocate_new_kernel) is redundant, and can be removed Signed-off-by: Pingfan Liu Cc: James Morse Cc: Geoff Levand Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Cc: Mark Brown Cc: Kees Cook Cc: Remi Denis-Courmont Cc: Ard Biesheuvel Cc: kvmarm@lists.cs.columbia.edu Link: https://lore.kernel.org/r/1598621998-20563-1-git-send-email-kernelfans@gmail.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Will Deacon commit 1840ff8d426122a06e849b805b5c5095ff4a59ee Author: Colin Ian King Date: Thu Sep 10 16:44:51 2020 +0100 mtd: mtdconcat: map: remove redundant assignment to variable 'size' Variable 'size' is being assigned the value zero that will never be read. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200910154451.752569-1-colin.king@canonical.com commit c331649e637152788b0ca1c857d0c2eaf34fcbc3 Author: Christoph Hellwig Date: Fri Sep 11 11:49:36 2020 +0200 ia64: Use libata instead of the legacy ide driver in defconfigs Switch the ia64 defconfigs to use the modern libata driver instead of the soon to be removed legacy ide driver. Signed-off-by: Christoph Hellwig Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20200911094936.1175688-1-hch@lst.de commit ecf5b72d5f66af843f189dfe9ce31598c3e48ad7 Author: Christoph Hellwig Date: Fri Sep 11 11:49:19 2020 +0200 ia64: Remove perfmon perfmon has been marked broken and thus been disabled for all builds for more than two years. Remove it entirely. Cc: Anant Thazhemadam Signed-off-by: Christoph Hellwig Enthusiastically-ACKed-by: Al Viro Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20200911094920.1173631-1-hch@lst.de commit 2a493132146152c21587414d96ba9026e43acc3d Author: Tian Tao Date: Wed Sep 9 17:28:02 2020 +0800 arm64: Remove the unused include statements linux/arm-smccc.h is included more than once, Remove the one that isn't necessary. Signed-off-by: Tian Tao Reviewed-by: Steven Price Link: https://lore.kernel.org/r/1599643682-10404-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Will Deacon commit 2b3d2987d800cc6dd8f6459971bc332354bd6a31 Author: Takashi Iwai Date: Wed Sep 9 18:36:59 2020 +0200 ALSA: firewire: Replace tasklet with work The tasklet is an old API that should be deprecated, usually can be converted to another decent API. In FireWire driver, a tasklet is still used for offloading the AMDTP PCM stream handling. It can be achieved gracefully with a work queued, too. This patch replaces the tasklet usage in firewire-lib driver with a simple work. The conversion is fairly straightforward but for the in_interrupt() checks that are replaced with the check using the current_work(). Note that in_interrupt() in amdtp_packet tracepoint is still kept as is. This is the place that is probed by both softirq of 1394 OHCI and a user task of a PCM application, and the work handling is already filtered in amdtp_domain_stream_pcm_pointer(). Tested-by: Takashi Sakamoto Acked-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200909163659.21708-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 48d5732cdf57b82ff32d198f7e696386979f8b08 Author: Krzysztof Kozlowski Date: Mon Jun 29 08:56:29 2020 +0200 ARM: dts: alpine: Align GIC nodename with dtschema Fix dtschema validator warnings like: gic@fb001000: $nodename:0: 'gic@fb001000' does not match '^interrupt-controller(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski commit 14ed3139e10b5f3648988d844a47ae7e9650408e Author: Krzysztof Kozlowski Date: Fri Jun 26 09:56:10 2020 +0200 ARM: dts: zx: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache-controller@c00000: $nodename:0: 'l2-cache-controller@c00000' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jun Nie commit 55d3db1103c47d8b66377b5180f0c27b3d97d5b5 Author: Krzysztof Kozlowski Date: Fri Jun 26 09:54:52 2020 +0200 ARM: dts: tango: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache-controller@20100000: $nodename:0: 'l2-cache-controller@20100000' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Acked-by: Mans Rullgard commit 1fbd0475a59f10da047fce3a7c504bc01bb80a45 Author: Krzysztof Kozlowski Date: Fri Jun 26 09:53:57 2020 +0200 ARM: dts: spear: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache: $nodename:0: 'l2-cache' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Acked-by: Viresh Kumar commit dcc339affb95ae9f2762164ada3a2f417a854491 Author: Krzysztof Kozlowski Date: Fri Jun 26 09:52:58 2020 +0200 ARM: dts: qcom: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache@2040000: $nodename:0: 'l2-cache@2040000' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski commit 53486d937cb5090eb6cabb4caf2b0e052136134d Author: Krzysztof Kozlowski Date: Fri Jun 26 09:52:31 2020 +0200 ARM: dts: prima: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache-controller@80040000: $nodename:0: 'l2-cache-controller@80040000' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Acked-by: Barry Song commit 5024f03c09e4410db880a900f46fac413cd39855 Author: Krzysztof Kozlowski Date: Mon Jun 29 09:24:12 2020 +0200 arm64: dts: alpine: Fix GIC unit address Node unit address should be the same as first address appearing in "reg" property. Fixes DTC warning: arch/arm64/boot/dts/al/alpine-v2.dtsi:116.38-126.5: Warning (simple_bus_reg): /soc/interrupt-controller@f0100000: simple-bus unit address format error, expected "f0200000" Signed-off-by: Krzysztof Kozlowski commit b2b72b00795a397730e606b6c168458e8068682c Author: Krzysztof Kozlowski Date: Mon Jun 29 09:02:23 2020 +0200 arm64: dts: alpine: Align GIC nodename with dtschema Fix dtschema validator warnings like: gic@f0100000: $nodename:0: 'gic@f0100000' does not match '^interrupt-controller(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski commit 78ff97ebd4e9d02a99ca894b643c78c8fda7df5d Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:57 2020 +0200 iio: iio.h: fix a warning at the kernel-doc markup There's a warning at iio.h kernel-doc markup: ./include/linux/iio/iio.h:644: WARNING: Unknown target name: "devm". Because it is using {devm_}foo notation. Well, this is not a valid kernel-doc notation. Also, it prevents creating hyperlinks to other documentation functions. So, replace it to a better notation. Signed-off-by: Mauro Carvalho Chehab Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/d8f2275c438c459ede4e6fba03ce719cc6ad898b.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 425c5b3e1714dce47064a1be4e00d783e89bc318 Author: Andy Shevchenko Date: Thu Sep 10 13:19:35 2020 +0300 gpiolib: convert to use DEFINE_SEQ_ATTRIBUTE macro Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit e676594115f0bcc12d4791f9ee919e20d8d750ee Author: Gavin Shan Date: Thu Sep 10 19:59:36 2020 +1000 arm64/mm: Unify CONT_PMD_SHIFT Similar to how CONT_PTE_SHIFT is determined, this introduces a new kernel option (CONFIG_CONT_PMD_SHIFT) to determine CONT_PMD_SHIFT. Signed-off-by: Gavin Shan Reviewed-by: Anshuman Khandual Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20200910095936.20307-3-gshan@redhat.com Signed-off-by: Will Deacon commit c0d6de327f18d39ef759aa883bffc3c32bc69015 Author: Gavin Shan Date: Thu Sep 10 19:59:35 2020 +1000 arm64/mm: Unify CONT_PTE_SHIFT CONT_PTE_SHIFT actually depends on CONFIG_ARM64_CONT_SHIFT. It's reasonable to reflect the dependency: * This renames CONFIG_ARM64_CONT_SHIFT to CONFIG_ARM64_CONT_PTE_SHIFT, so that we can introduce CONFIG_ARM64_CONT_PMD_SHIFT later. * CONT_{SHIFT, SIZE, MASK}, defined in page-def.h are removed as they are not used by anyone. * CONT_PTE_SHIFT is determined by CONFIG_ARM64_CONT_PTE_SHIFT. Signed-off-by: Gavin Shan Reviewed-by: Anshuman Khandual Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20200910095936.20307-2-gshan@redhat.com Signed-off-by: Will Deacon commit 11e339d53a739e4cf885c1e2a843a4004204d271 Author: Gavin Shan Date: Thu Sep 10 19:59:34 2020 +1000 arm64/mm: Remove CONT_RANGE_OFFSET The macro was introduced by commit ("arm64: PTE/PMD contiguous bit definition") at the beginning. It's only used by commit <348a65cdcbbf> ("arm64: Mark kernel page ranges contiguous"), which was reverted later by commit <667c27597ca8>. This makes the macro unused. This removes the unused macro (CONT_RANGE_OFFSET). Signed-off-by: Gavin Shan Reviewed-by: Anshuman Khandual Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20200910095936.20307-1-gshan@redhat.com Signed-off-by: Will Deacon commit 4e56de82d4ec9d98ffdc9e0387d8fdecbf496226 Author: Anshuman Khandual Date: Wed Sep 9 11:18:55 2020 +0530 arm64/cpuinfo: Define HWCAP name arrays per their actual bit definitions HWCAP name arrays (hwcap_str, compat_hwcap_str, compat_hwcap2_str) that are scanned for /proc/cpuinfo are detached from their bit definitions making it vulnerable and difficult to correlate. It is also bit problematic because during /proc/cpuinfo dump these arrays get traversed sequentially assuming they reflect and match actual HWCAP bit sequence, to test various features for a given CPU. This redefines name arrays per their HWCAP bit definitions . It also warns after detecting any feature which is not expected on arm64. Signed-off-by: Anshuman Khandual Acked-by: Catalin Marinas Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Brown Cc: Dave Martin Cc: Ard Biesheuvel Cc: Mark Rutland Cc: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1599630535-29337-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit 5941d003f0a60877a956cc3cae6e3850b46fad0a Merge: 0dc0b5c29be24 42a08ff79ff52 Author: Kalle Valo Date: Fri Sep 11 18:03:00 2020 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.10. Major changes: ath10k * support SDIO firmware codedumps * support station specific TID configurations ath11k * add support for IPQ6018 commit 1893a2d5264e2004722afecfcea1859f38b3ed82 Author: Jason Yan Date: Thu Sep 10 22:05:46 2020 +0800 soc: sunxi: sram: remove unneeded semicolon Eliminate the following coccicheck warning: drivers/soc/sunxi/sunxi_sram.c:197:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200910140546.1191280-1-yanaijie@huawei.com commit e16c33e290792c9b71b952dc915e5f7dfc9d4409 Author: Youling Tang Date: Fri Aug 7 17:44:40 2020 +0800 kernel/debug: Fix spelling mistake in debug_core.c Fix typo: "notifiter" --> "notifier" "overriden" --> "overridden" Signed-off-by: Youling Tang Link: https://lore.kernel.org/r/1596793480-22559-1-git-send-email-tangyouling@loongson.cn Signed-off-by: Daniel Thompson commit ae8bd85ca8a4a812721388ab85b3d67077951f52 Merge: 7b75cd5128421 c9b69a0cf0b43 Author: Marc Zyngier Date: Fri Sep 11 15:54:30 2020 +0100 Merge branch 'kvm-arm64/pt-new' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 4afb06afd76855932a2d19c983c013105f1cfb9a Author: Krzysztof Kozlowski Date: Sun Sep 6 16:21:46 2020 +0200 ARM: dts: exynos: move assigned-clock* properties to i2s0 node in Odroid XU4 The purpose of those assigned-clock-* properties is to configure clock for the I2S device so move them to respective node. This silences the dtschema warnings like: 'clocks' is a dependency of 'assigned-clocks' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200906142146.21266-3-krzk@kernel.org commit eaf2d2f6895d676dda6c95a652b58594f2887720 Author: Krzysztof Kozlowski Date: Sun Sep 6 16:21:45 2020 +0200 ARM: dts: exynos: add input clock to CMU in Exynos4412 Odroid Commit 68605101460e ("ARM: dts: exynos: Add support for audio over HDMI for Odroid X/X2/U3") added assigned clocks under Clock Management Unit. However the dtschema expects "clocks" property if "assigned-clocks" are used. Add reference to input clock to silence the dtschema warnings: arch/arm/boot/dts/exynos4412-odroidu3.dt.yaml: clock-controller@10030000: 'clocks' is a dependency of 'assigned-clocks' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200906142146.21266-2-krzk@kernel.org commit d70a4412e264cd8ff7a034505184c0b54876532a Merge: 2b7d52a9ba55c 52e4d0ae62554 Author: Mark Brown Date: Fri Sep 11 15:52:24 2020 +0100 Merge series "ASoC: SOF: DSP core management fixes for 5.10" from Kai Vehmanen : This series contains some improvements to how DSP core management is done in SOF, and adds a distinction between cores managed by the host versus cores managed by the DSP. Pierre-Louis Bossart (1): ASoC: SOF: Intel: hda-loader: s/master/primary Ranjani Sridharan (3): ASoC: SOF: rename cores_mask to host_managed_cores_mask ASoC: SOF: Intel: hda: modify core_power_up/down op ASoC: SOF: Intel: remove the HDA_DSP_CORE_MASK() macro sound/soc/sof/intel/apl.c | 2 +- sound/soc/sof/intel/bdw.c | 2 +- sound/soc/sof/intel/byt.c | 6 +++--- sound/soc/sof/intel/cnl.c | 15 ++++----------- sound/soc/sof/intel/hda-dsp.c | 20 +++++++++++++++++--- sound/soc/sof/intel/hda-loader.c | 11 +++++------ sound/soc/sof/intel/hda.c | 2 +- sound/soc/sof/intel/hda.h | 3 --- sound/soc/sof/intel/shim.h | 2 +- sound/soc/sof/intel/tgl.c | 2 +- 10 files changed, 34 insertions(+), 31 deletions(-) -- 2.27.0 commit f9e8785da5a6fb1da11e7233d8720254ef1995a5 Author: Krzysztof Kozlowski Date: Sun Sep 6 16:21:44 2020 +0200 ARM: dts: exynos: add input clock to CMU in Exynos3250 Commit 52005dece527 ("ARM: dts: Add assigned clock parents to CMU node for exynos3250") added assigned clocks under Clock Management Unit to fix hangs when accessing ISP registers. However the dtschema expects "clocks" property if "assigned-clocks" are used. Add reference to input clock to silence the dtschema warnings: arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml: clock-controller@10030000: 'clocks' is a dependency of 'assigned-clocks' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200906142146.21266-1-krzk@kernel.org commit 2b7d52a9ba55c984851dba37800d6006bdc3ec4b Merge: 6ea8a79bf65a9 7e5bfdddd8772 Author: Mark Brown Date: Fri Sep 11 15:52:23 2020 +0100 Merge series "ASoC: mediatek: mt8183-da7219: support machine driver for rt1015p" from Tzung-Bi Shih : The series reuses mt8183-da7219-max98357.c for supporting machine driver with rt1015p speaker amplifier. The 1st patch adds document for the new proposed compatible string. The 2nd patch changes the machine driver to support "RT1015P" codec. Tzung-Bi Shih (2): ASoC: dt-bindings: mt8183-da7219: add compatible string for using rt1015p ASoC: mediatek: mt8183-da7219: support machine driver with rt1015p .../bindings/sound/mt8183-da7219-max98357.txt | 1 + sound/soc/mediatek/Kconfig | 1 + .../mediatek/mt8183/mt8183-da7219-max98357.c | 40 +++++++++++++++++++ 3 files changed, 42 insertions(+) -- 2.28.0.526.ge36021eeef-goog commit 6ea8a79bf65a94d29abfe472e9438db8dc497e6d Merge: 4e723e7565c40 18c140f4a2de8 Author: Mark Brown Date: Fri Sep 11 15:52:22 2020 +0100 Merge series "ASoC: ti: j721e-evm: Support for j7200 variant" from Peter Ujfalusi : Hi, Changes since v1: - Suffix the 2359296000 constant with 'u' to silence C90 warning When j7200 SOM is connected to the CPB, the audio setup is a bit different: Only 48KHz family have clock path, 44.1KHz is not supported. Update the binding documentation and add support for the j7200 version of CPB to the driver. Regards, Peter --- Peter Ujfalusi (2): ASoC: dt-bindings: ti,j721e-cpb-audio: Document support for j7200-cpb ASoC: ti: j721e-evm: Add support for j7200-cpb audio .../bindings/sound/ti,j721e-cpb-audio.yaml | 92 ++++++++++++++----- sound/soc/ti/j721e-evm.c | 11 +++ 2 files changed, 81 insertions(+), 22 deletions(-) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki commit 4e723e7565c4031568fb9db18253cfbf6442831d Author: Olivier Moysan Date: Fri Sep 11 10:15:07 2020 +0200 ASoC: stm32: sai: add pm_runtime support Enable support of pm_runtime on STM32 SAI driver to allow SAI power state monitoring. pm_runtime_put_autosuspend() is called from ASoC framework on pcm device close. The pmdown_time delay is available in runtime context, and may be set in SAI driver to take into account shutdown delay on playback. However, this shutdown delay is already handled in the DAPMs of the audio codec linked to SAI CPU DAI. So, the choice is made, not to support this delay on CPU DAI side. Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20200911081507.7276-1-olivier.moysan@st.com Signed-off-by: Mark Brown commit 375e2c352582442783178e6a33c279d6bc9354a2 Author: Tuo Li Date: Mon Sep 7 21:09:37 2020 +0800 ALSA: rockchip_i2s: fix a possible divide-by-zero bug in rockchip_i2s_hw_params() The variable bclk_rate is checked in: if (bclk_rate && mclk_rate % bclk_rate) This indicates that bclk_rate can be zero. If so, a divide-by-zero bug will occur: div_bclk = mclk_rate / bclk_rate; To fix this possible bug, the function returns -EINVAL when bclk_rate is zero. Signed-off-by: Tuo Li Link: https://lore.kernel.org/r/TY2PR04MB4029799E60A5BCAAD5B7B5BBB8280@TY2PR04MB4029.apcprd04.prod.outlook.com Signed-off-by: Mark Brown commit 2a4b91a26403fa3e7b07271700c3ca7103664bba Author: Sathyanarayana Nujella Date: Thu Sep 10 19:27:05 2020 +0300 ASoC: SOF: Intel: Use DMI oem string search for tgl_max98373_rt5682 DMI product name is used to support system variants based out of tgl_max98373_rt5682 in current implementation. Replace this DMI search with DMI_OEM_STRING. Coreboot(BIOS used in these systems) is setting the needed DMI_OEM_STRING field to uniquely identify these systems. Signed-off-by: Sathyanarayana Nujella Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200910162705.2026036-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit c9b69a0cf0b4336fe7d2e35c46273debc68910fd Author: Will Deacon Date: Fri Sep 11 14:25:29 2020 +0100 KVM: arm64: Don't constrain maximum IPA size based on host configuration Now that the guest stage-2 page-tables are managed independently from the host stage-1 page-tables, we can avoid constraining the IPA size based on the host and instead limit it only based on the PARange field of the ID_AA64MMFR0 register. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-22-will@kernel.org commit 74cfa7ea66a7e54a5ea1d8ad1fb74a5e832ed867 Author: Will Deacon Date: Fri Sep 11 14:25:28 2020 +0100 KVM: arm64: Remove unused 'pgd' field from 'struct kvm_s2_mmu' The stage-2 page-tables are entirely encapsulated by the 'pgt' field of 'struct kvm_s2_mmu', so remove the unused 'pgd' field. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-21-will@kernel.org commit 3f26ab58e3272ceada11279c2e90894d4995cf79 Author: Will Deacon Date: Fri Sep 11 14:25:27 2020 +0100 KVM: arm64: Remove unused page-table code Now that KVM is using the generic page-table code to manage the guest stage-2 page-tables, we can remove a bunch of unused macros, #defines and static inline functions from the old implementation. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-20-will@kernel.org commit 063deeb1f2c234ca5e9d156c7a86825fc5377477 Author: Will Deacon Date: Fri Sep 11 14:25:26 2020 +0100 KVM: arm64: Check the pgt instead of the pgd when modifying page-table In preparation for removing the 'pgd' field of 'struct kvm_s2_mmu', update the few remaining users to check the 'pgt' field instead. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-19-will@kernel.org commit 6f745f1bb5bf2914be2344b0dd7781d0528b3e42 Author: Will Deacon Date: Fri Sep 11 14:25:25 2020 +0100 KVM: arm64: Convert user_mem_abort() to generic page-table API Convert user_mem_abort() to call kvm_pgtable_stage2_relax_perms() when handling a stage-2 permission fault and kvm_pgtable_stage2_map() when handling a stage-2 translation fault, rather than walking the page-table manually. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Reviewed-by: Alexandru Elisei Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-18-will@kernel.org commit adcd4e23291e67575be0c8b08eed04fbe7fd9e77 Author: Will Deacon Date: Fri Sep 11 14:25:24 2020 +0100 KVM: arm64: Add support for relaxing stage-2 perms in generic page-table code Add support for relaxing the permissions of a stage-2 mapping (i.e. adding additional permissions) to the generic page-table code. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-17-will@kernel.org commit 8d5207bef6913b5fac91cb58e509711e406c160d Author: Quentin Perret Date: Fri Sep 11 14:25:23 2020 +0100 KVM: arm64: Convert memslot cache-flushing code to generic page-table API Convert stage2_flush_memslot() to call the kvm_pgtable_stage2_flush() function of the generic page-table code instead of walking the page-table directly. Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Link: https://lore.kernel.org/r/20200911132529.19844-16-will@kernel.org commit 93c66b40d728178722706a306df15ce92c819cd6 Author: Quentin Perret Date: Fri Sep 11 14:25:22 2020 +0100 KVM: arm64: Add support for stage-2 cache flushing in generic page-table Add support for cache flushing a range of the stage-2 address space to the generic page-table code. Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Link: https://lore.kernel.org/r/20200911132529.19844-15-will@kernel.org commit cc38d61cace392a5f064f2981ce6009bb158de21 Author: Quentin Perret Date: Fri Sep 11 14:25:21 2020 +0100 KVM: arm64: Convert write-protect operation to generic page-table API Convert stage2_wp_range() to call the kvm_pgtable_stage2_wrprotect() function of the generic page-table code instead of walking the page-table directly. Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Link: https://lore.kernel.org/r/20200911132529.19844-14-will@kernel.org commit 73d49df2c3e7cad5bf64c92ec03ce9e3823898b9 Author: Quentin Perret Date: Fri Sep 11 14:25:20 2020 +0100 KVM: arm64: Add support for stage-2 write-protect in generic page-table Add a stage-2 wrprotect() operation to the generic page-table code. Signed-off-by: Quentin Perret Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Link: https://lore.kernel.org/r/20200911132529.19844-13-will@kernel.org commit ee8efad7994ce204806260bc0261c7e103f704c1 Author: Will Deacon Date: Fri Sep 11 14:25:19 2020 +0100 KVM: arm64: Convert page-aging and access faults to generic page-table API Convert the page-aging functions and access fault handler to use the generic page-table code instead of walking the page-table directly. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Reviewed-by: Alexandru Elisei Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-12-will@kernel.org commit e0e5a07f3f5adca259ffa8ad3f4153ab448a4115 Author: Will Deacon Date: Fri Sep 11 14:25:18 2020 +0100 KVM: arm64: Add support for stage-2 page-aging in generic page-table Add stage-2 mkyoung(), mkold() and is_young() operations to the generic page-table code. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-11-will@kernel.org commit 52bae936f0e7be4b4c088505aecb8f04121f1dee Author: Will Deacon Date: Fri Sep 11 14:25:17 2020 +0100 KVM: arm64: Convert unmap_stage2_range() to generic page-table API Convert unmap_stage2_range() to use kvm_pgtable_stage2_unmap() instead of walking the page-table directly. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-10-will@kernel.org commit e9edb17ae0a2634bfa5dac529229c06f97f2b669 Author: Will Deacon Date: Fri Sep 11 14:25:16 2020 +0100 KVM: arm64: Convert kvm_set_spte_hva() to generic page-table API Convert kvm_set_spte_hva() to use kvm_pgtable_stage2_map() instead of stage2_set_pte(). Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-9-will@kernel.org commit 02bbd374ce4a8aad36c022fd1203cb9f11b52ee3 Author: Will Deacon Date: Fri Sep 11 14:25:15 2020 +0100 KVM: arm64: Convert kvm_phys_addr_ioremap() to generic page-table API Convert kvm_phys_addr_ioremap() to use kvm_pgtable_stage2_map() instead of stage2_set_pte(). Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-8-will@kernel.org commit 6d9d2115c48027132a69477c98d812be669f5b9b Author: Will Deacon Date: Fri Sep 11 14:25:14 2020 +0100 KVM: arm64: Add support for stage-2 map()/unmap() in generic page-table Add stage-2 map() and unmap() operations to the generic page-table code. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-7-will@kernel.org commit 71233d05f4b5e3560f0d3d5607d01e9beff8dcbd Author: Will Deacon Date: Fri Sep 11 14:25:13 2020 +0100 KVM: arm64: Add support for creating kernel-agnostic stage-2 page tables Introduce alloc() and free() functions to the generic page-table code for guest stage-2 page-tables and plumb these into the existing KVM page-table allocator. Subsequent patches will convert other operations within the KVM allocator over to the generic code. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-6-will@kernel.org commit 0f9d09b8e29bc8166f6584279aedc4a7a4038f68 Author: Will Deacon Date: Fri Sep 11 14:25:12 2020 +0100 KVM: arm64: Use generic allocator for hyp stage-1 page-tables Now that we have a shiny new page-table allocator, replace the hyp page-table code with calls into the new API. This also allows us to remove the extended idmap code, as we can now simply ensure that the VA size is large enough to map everything we need. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-5-will@kernel.org commit bb0e92cbbcd1f91411d0a7241f8febe2c8c5b078 Author: Will Deacon Date: Fri Sep 11 14:25:11 2020 +0100 KVM: arm64: Add support for creating kernel-agnostic stage-1 page tables The generic page-table walker is pretty useless as it stands, because it doesn't understand enough to allocate anything. Teach it about stage-1 page-tables, and hook up an API for allocating these for the hypervisor at EL2. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-4-will@kernel.org commit b1e57de62cfb4d05f45ab848bb893fbcff9557d3 Author: Will Deacon Date: Fri Sep 11 14:25:10 2020 +0100 KVM: arm64: Add stand-alone page-table walker infrastructure The KVM page-table code is intricately tied into the kernel page-table code and re-uses the pte/pmd/pud/p4d/pgd macros directly in an attempt to reduce code duplication. Unfortunately, the reality is that there is an awful lot of code required to make this work, and at the end of the day you're limited to creating page-tables with the same configuration as the host kernel. Furthermore, lifting the page-table code to run directly at EL2 on a non-VHE system (as we plan to to do in future patches) is practically impossible due to the number of dependencies it has on the core kernel. Introduce a framework for walking Armv8 page-tables configured independently from the host kernel. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-3-will@kernel.org commit 9af3e08baa7c20ee69b7fc18e720e08a091493b9 Author: Will Deacon Date: Fri Sep 11 14:25:09 2020 +0100 KVM: arm64: Remove kvm_mmu_free_memory_caches() kvm_mmu_free_memory_caches() is only called by kvm_arch_vcpu_destroy(), so inline the implementation and get rid of the extra function. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200911132529.19844-2-will@kernel.org commit edbf3cbe2a173ee7d68854666acf5b05225a75cf Author: Krzysztof Kozlowski Date: Thu Sep 3 22:32:49 2020 +0200 arm64: dts: exynos: Remove undocumented i2s properties in Exynos5433 Few I2S device node properties were not documented and not used by any of the drivers. Remove them to fix dtbs_check warning: arch/arm64/boot/dts/exynos/exynos5433-tm2.dt.yaml: i2s@14d60000: Additional properties are not allowed ('samsung,supports-rstclr', 'samsung,supports-tdm', 'samsung,supports-6ch', 'samsung,supports-low-rfs' were unexpected) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903203250.19830-3-krzk@kernel.org commit 85f94020033f931a5918ab26281b2afbe4d68b73 Author: Rafael J. Wysocki Date: Fri Sep 11 14:59:42 2020 +0200 ACPI: OSL: Make ACPICA use logical addresses of GPE blocks Define ACPI_GPE_USE_LOGICAL_ADDRESSES in aclinux.h and modify acpi_os_initialize() to store the logical addresses of the FADT GPE blocks 0 and 1 in acpi_gbl_xgpe0_block_logical_address and acpi_gbl_xgpe1_block_logical_address, respectively, so as to allow ACPICA to use them for accessing GPE registers in system memory, instead of using their physical addresses and looking up the corresponding logical addresses on every access attempt, which is inefficient. Signed-off-by: Rafael J. Wysocki commit 6915564dc5a8ab831a016e0cd0a8a3c68230287b Author: Rafael J. Wysocki Date: Fri Sep 11 14:59:35 2020 +0200 ACPI: OSL: Change the type of acpi_os_map_generic_address() return value Modify acpi_os_map_generic_address() to return the pointer returned by acpi_os_map_iomem() which represents the logical address corresponding to the struct acpi_generic_address argument passed to it or NULL if that address cannot be obtained (for example, the argument does not represent an address in system memory or it could not be mapped by the OS). Among other things, that will allow the ACPI OS layer to pass the logical addresses of the FADT GPE blocks 0 and 1 to ACPICA going forward. Signed-off-by: Rafael J. Wysocki commit 7a8379eb41a47d37e93d34f09ca1c3b7d10de073 Author: Rafael J. Wysocki Date: Fri Sep 11 16:44:45 2020 +0200 ACPICA: Add support for using logical addresses of GPE blocks The logical address of every GPE block in system memory must be known before passing it to acpi_ev_initialize_gpe_block(), because memory cannot be mapped on the fly from an interrupt handler. Accordingly, the host OS must map every GPE block in system memory upfront and it can store the logical addresses of GPE blocks for future use. If these logical addresses were known to ACPICA, it could use them instead of the corresponding physical addresses of GPE block for GPE register accesses and the memory mapping lookups carried out by acpi_os_read_memory() and acpi_os_write_memory() on every attempt to access a GPE register would not be necessary any more. To allow that to happen, introduce the ACPI_GPE_USE_LOGICAL_ADDRESSES symbol to indicate whether or not the host OS wants ACPICA to use the logical addresses of GPE registers in system memory directly (which is the case if this symbol is defined). Moreover, conditional on whether ACPI_GPE_USE_LOGICAL_ADDRESSES is defined, introduce two new global variables for storing the logical addresses of the FADT GPE blocks 0 and 1, respectively, acpi_gbl_xgpe0_block_logical_address and acpi_gbl_xgpe1_block_logical_address, make acpi_ev_gpe_initialize() pass their values instead of the physical addresses of the GPE blocks in question to acpi_ev_create_gpe_block() and modify acpi_hw_gpe_read() and acpi_hw_gpe_write() to access memory directly via the addresses stored in the struct acpi_gpe_address objects, which are expected to be the logical addresses of GPE registers if ACPI_GPE_USE_LOGICAL_ADDRESSES is defined. With the above changes in place, a host OS wanting ACPICA to access GPE registers directly through their logical addresses needs to define the ACPI_GPE_USE_LOGICAL_ADDRESSES symbol and make sure that the logical addresses of the FADT GPE blocks 0 and 1 are stored in acpi_gbl_xgpe0_block_logical_address and acpi_gbl_xgpe1_block_logical_address, respectively, prior to calling acpi_ev_gpe_initialize(). [If such a host OS also uses acpi_install_gpe_block() to add non-FADT GPE register blocks located in system memory, it must pass their logical addresses instead of their physical addresses to this function.] Signed-off-by: Rafael J. Wysocki commit 30b904632eae15c9685552e1e2e2cbe04e6318e9 Author: Krzysztof Kozlowski Date: Mon Sep 7 20:33:13 2020 +0200 ARM: dts: s3c24xx: move fixed clocks under root node in SMDK2416 The fixed clocks are kept under dedicated 'clocks' node but this causes multiple dtschema warnings: clocks: $nodename:0: 'clocks' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' clocks: #size-cells:0:0: 0 is not one of [1, 2] clocks: xti@0:reg:0: [0] is too short clocks: 'ranges' is a required property xti@0: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907183313.29234-12-krzk@kernel.org commit 2436a7e38f9caa8cc93856015d2c132b44c1c0e8 Author: Krzysztof Kozlowski Date: Mon Sep 7 20:33:12 2020 +0200 ARM: dts: s3c24xx: add address to CPU node The CPU nodes should be described as children of "cpus" bus node with appropriate "reg" properties: cpus: '#address-cells' is a required property cpus: '#size-cells' is a required property cpu: 'device_type' is a required property cpu: 'reg' is a required property Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907183313.29234-11-krzk@kernel.org commit 17281a3c7f5c4e43ec61efe62c24ff593eb57cf5 Author: Krzysztof Kozlowski Date: Mon Sep 7 20:33:11 2020 +0200 ARM: dts: s3c24xx: align PWM/timer node name with dtschema Although PWM is used on S3C24xx as clocksource/timer, the dtschema expects the node to be named in certain format: timer@51000000: $nodename:0: 'timer@51000000' does not match '^pwm(@.*|-[0-9a-f])*$' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907183313.29234-10-krzk@kernel.org commit 9166c9f8aa12f9a939f97ef8dd0e489b8888273a Author: Krzysztof Kozlowski Date: Mon Sep 7 20:33:10 2020 +0200 ARM: dts: s3c24xx: override nodes by label Using full paths to extend or override a device tree node is error prone. If there was a typo error, a new node will be created instead of extending the existing node. This will lead to run-time errors that could be hard to detect. A mistyped label on the other hand, will cause a dtc compile error (during build time). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907183313.29234-9-krzk@kernel.org commit 83c968058d5da609f7e584d1262c6e177b9b5fd2 Author: Krzysztof Kozlowski Date: Mon Sep 7 20:33:09 2020 +0200 ARM: dts: s3c24xx: fix number of PWM cells The PWM has only three cells, not four, as pointed out by dtschema: timer@51000000: #pwm-cells:0:0: 3 was expected Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907183313.29234-8-krzk@kernel.org commit a904023f7ad404269234387f7a1fab92680ea207 Author: Krzysztof Kozlowski Date: Mon Sep 7 20:33:08 2020 +0200 ARM: dts: s3c6410: remove additional CPU compatible Only the specific compatible (arm,arm1176jzf-s) is allowed by dtschema: cpu@0: compatible: ['arm,arm1176jzf-s', 'arm,arm1176'] is too long cpu@0: compatible: Additional items are not allowed ('arm,arm1176' was unexpected) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907183313.29234-7-krzk@kernel.org commit e9da51094a3a8ced023c8b6293319c58ce7c82f9 Author: Krzysztof Kozlowski Date: Mon Sep 7 20:33:07 2020 +0200 ARM: dts: s3c6410: align node SROM bus node name with dtschema in SMDK6410 The SROM controller is modeled with a bus so align the device node name with dtschema to fix warning: srom-cs1@18000000: $nodename:0: 'srom-cs1@18000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907183313.29234-6-krzk@kernel.org commit 5911622eff5134c4bf1e16e4e1e2fd18c4f24889 Author: Krzysztof Kozlowski Date: Mon Sep 7 20:33:06 2020 +0200 ARM: dts: s3c6410: align node SROM bus node name with dtschema in Mini6410 The SROM controller is modeled with a bus so align the device node name with dtschema to fix warning: srom-cs1@18000000: $nodename:0: 'srom-cs1@18000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907183313.29234-5-krzk@kernel.org commit c298c89ace615e023c05905b6ec8bfc161488b16 Author: Krzysztof Kozlowski Date: Mon Sep 7 20:33:05 2020 +0200 ARM: dts: s3c6410: move fixed clocks under root node in SMDK6410 The fixed clocks are kept under dedicated 'clocks' node but this causes multiple dtschema warnings: clocks: $nodename:0: 'clocks' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' clocks: #size-cells:0:0: 0 is not one of [1, 2] clocks: oscillator@0:reg:0: [0] is too short clocks: oscillator@1:reg:0: [1] is too short clocks: 'ranges' is a required property oscillator@0: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907183313.29234-4-krzk@kernel.org commit 8b81a8decea77bf2ca3c718732184d4aaf949096 Author: Krzysztof Kozlowski Date: Mon Sep 7 20:33:04 2020 +0200 ARM: dts: s3c6410: move fixed clocks under root node in Mini6410 The fixed clocks are kept under dedicated 'clocks' node but this causes multiple dtschema warnings: clocks: $nodename:0: 'clocks' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' clocks: #size-cells:0:0: 0 is not one of [1, 2] clocks: oscillator@0:reg:0: [0] is too short clocks: oscillator@1:reg:0: [1] is too short clocks: 'ranges' is a required property oscillator@0: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907183313.29234-3-krzk@kernel.org commit 28ab4caccd17d7b84fd8aa36b13af5e735870bad Author: Krzysztof Kozlowski Date: Mon Sep 7 20:33:03 2020 +0200 ARM: dts: s5pv210: correct ethernet unit address in SMDKV210 The SROM bank 5 is at address 0xa8000000, just like the one put in "reg" property of ethernet node. Fix the unit address of ethernet node. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907183313.29234-2-krzk@kernel.org commit 52e4d0ae6255446efaaaa2a7a1da7cc1640f78b5 Author: Pierre-Louis Bossart Date: Thu Sep 10 19:41:25 2020 +0300 ASoC: SOF: Intel: hda-loader: s/master/primary Use inclusive language for DSP cores. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Jaska Uimonen Reviewed-by: Seppo Ingalsuo Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200910164125.2033062-5-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit fde106552845b7c369c2385b27062b1c2130a4dd Author: Ranjani Sridharan Date: Thu Sep 10 19:41:24 2020 +0300 ASoC: SOF: Intel: remove the HDA_DSP_CORE_MASK() macro Remove the HDA_DSP_CORE_MASK() macro and use BIT() and GENMASK() macros directly for more clarity. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Keyon Jie Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200910164125.2033062-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 914fab3b43633d03eb40e3216cc2857864589c60 Author: Ranjani Sridharan Date: Thu Sep 10 19:41:23 2020 +0300 ASoC: SOF: Intel: hda: modify core_power_up/down op Modify the core_power_up/down ops for HDA platforms to restrict the core_mask to the ones allowed by chip->cores_mask. This is needed because on some HDA platforms not all cores can be powered up/down by the host and this must be handled internally in the FW. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Keyon Jie Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200910164125.2033062-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 64b969177c744a76142f45823dd9d94c38f79cd0 Author: Ranjani Sridharan Date: Thu Sep 10 19:41:22 2020 +0300 ASoC: SOF: rename cores_mask to host_managed_cores_mask Rename the cores_mask in struct sof_intel_dsp_desc to host_managed_cores_mask to be more indicative of the fact that only these cores can be powered up/down by the host. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Keyon Jie Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200910164125.2033062-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit e8ba53d0023a76ba0f50e6ee3e6288c5442f9d33 Author: Stephen Smalley Date: Thu Sep 10 10:28:05 2020 -0400 selinux: access policycaps with READ_ONCE/WRITE_ONCE Use READ_ONCE/WRITE_ONCE for all accesses to the selinux_state.policycaps booleans to prevent compiler mischief. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit 18c140f4a2de8fa674d52fe522a47133bc124f81 Author: Peter Ujfalusi Date: Thu Sep 10 15:41:10 2020 +0300 ASoC: ti: j721e-evm: Add support for j7200-cpb audio When j7200 SOM is attached to the CPB we only have parent clock for 48KHz family and the rate of the parent clock is 2359296000Hz. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200910124110.19361-3-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 18790b1b514a202bae2863a4206b731d95302c85 Author: Peter Ujfalusi Date: Thu Sep 10 15:41:09 2020 +0300 ASoC: dt-bindings: ti, j721e-cpb-audio: Document support for j7200-cpb j721e or j7200 SOM can be attached to the same Common Processor Board (CPB) With the j7200 SOM only the 48KHz family parent clock is available and McASP0 is used for the audio. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200910124110.19361-2-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 0560c2173e3f12bc39ef5d61b26d43307cab8694 Author: Ville Syrjälä Date: Mon Sep 7 19:27:09 2020 +0300 drm/i915: Nuke dpio_phy_iosf_port[] There's no real reason to stash away the DPIO PHY IOSF sideband port numbers for VLV/CHV. Just compute them at runtime in the sideband code. Gets rid of the oddball intel_init_dpio() function from the high level init flow. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200907162709.29579-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 53fa117bb33c9ebc4c0746b3830e273f5e9b97b7 Author: Anshuman Khandual Date: Wed Sep 9 10:23:03 2020 +0530 arm64/mm: Enable THP migration In certain page migration situations, a THP page can be migrated without being split into it's constituent subpages. This saves time required to split a THP and put it back together when required. But it also saves an wider address range translation covered by a single TLB entry, reducing future page fault costs. A previous patch changed platform THP helpers per generic memory semantics, clearing the path for THP migration support. This adds two more THP helpers required to create PMD migration swap entries. Now enable THP migration via ARCH_ENABLE_THP_MIGRATION. Signed-off-by: Anshuman Khandual Reviewed-by: Catalin Marinas Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Cc: Suzuki Poulose Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1599627183-14453-3-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit b65399f6111b03df870d8daa75b8d140c0de93f4 Author: Anshuman Khandual Date: Wed Sep 9 10:23:02 2020 +0530 arm64/mm: Change THP helpers to comply with generic MM semantics pmd_present() and pmd_trans_huge() are expected to behave in the following manner during various phases of a given PMD. It is derived from a previous detailed discussion on this topic [1] and present THP documentation [2]. pmd_present(pmd): - Returns true if pmd refers to system RAM with a valid pmd_page(pmd) - Returns false if pmd refers to a migration or swap entry pmd_trans_huge(pmd): - Returns true if pmd refers to system RAM and is a trans huge mapping ------------------------------------------------------------------------- | PMD states | pmd_present | pmd_trans_huge | ------------------------------------------------------------------------- | Mapped | Yes | Yes | ------------------------------------------------------------------------- | Splitting | Yes | Yes | ------------------------------------------------------------------------- | Migration/Swap | No | No | ------------------------------------------------------------------------- The problem: PMD is first invalidated with pmdp_invalidate() before it's splitting. This invalidation clears PMD_SECT_VALID as below. PMD Split -> pmdp_invalidate() -> pmd_mkinvalid -> Clears PMD_SECT_VALID Once PMD_SECT_VALID gets cleared, it results in pmd_present() return false on the PMD entry. It will need another bit apart from PMD_SECT_VALID to re- affirm pmd_present() as true during the THP split process. To comply with above mentioned semantics, pmd_trans_huge() should also check pmd_present() first before testing presence of an actual transparent huge mapping. The solution: Ideally PMD_TYPE_SECT should have been used here instead. But it shares the bit position with PMD_SECT_VALID which is used for THP invalidation. Hence it will not be there for pmd_present() check after pmdp_invalidate(). A new software defined PMD_PRESENT_INVALID (bit 59) can be set on the PMD entry during invalidation which can help pmd_present() return true and in recognizing the fact that it still points to memory. This bit is transient. During the split process it will be overridden by a page table page representing normal pages in place of erstwhile huge page. Other pmdp_invalidate() callers always write a fresh PMD value on the entry overriding this transient PMD_PRESENT_INVALID bit, which makes it safe. [1]: https://lkml.org/lkml/2018/10/17/231 [2]: https://www.kernel.org/doc/Documentation/vm/transhuge.txt Signed-off-by: Anshuman Khandual Reviewed-by: Catalin Marinas Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Cc: Suzuki Poulose Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1599627183-14453-2-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit 7e5bfdddd8772011a2d38cf6be821d616db6cf8c Author: Tzung-Bi Shih Date: Fri Sep 11 10:48:33 2020 +0800 ASoC: mediatek: mt8183-da7219: support machine driver with rt1015p Supports machine driver with rt1015p ("mt8183_da7219_rt1015p"). Embeds in the existing mt8183-da7219-max98357.c because they share most of the code. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200911024833.1673961-3-tzungbi@google.com Signed-off-by: Mark Brown commit 5d1e0557520862c3a73b8b6a809807be1b522c3f Author: Tzung-Bi Shih Date: Fri Sep 11 10:48:32 2020 +0800 ASoC: dt-bindings: mt8183-da7219: add compatible string for using rt1015p Machines with rt1015p should use the compatible string "mediatek,mt8183_da7219_rt1015p". Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200911024833.1673961-2-tzungbi@google.com Signed-off-by: Mark Brown commit 9e054b13b2f747868c28539b3eb28256e237755f Author: Michal Kalderon Date: Wed Sep 2 19:57:41 2020 +0300 RDMA/qedr: Fix function prototype parameters alignment Alignment of parameters was off by one Link: https://lore.kernel.org/r/20200902165741.8355-9-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit fbf58026b2256e9cd5f241a4801d79d3b2b7b89d Author: Michal Kalderon Date: Wed Sep 2 19:57:40 2020 +0300 RDMA/qedr: Fix inline size returned for iWARP commit 59e8970b3798 ("RDMA/qedr: Return max inline data in QP query result") changed query_qp max_inline size to return the max roce inline size. When iwarp was introduced, this should have been modified to return the max inline size based on protocol. This size is cached in the device attributes Fixes: 69ad0e7fe845 ("RDMA/qedr: Add support for iWARP in user space") Link: https://lore.kernel.org/r/20200902165741.8355-8-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit cc293f5420e5726bdf2bb0fcb165c73e007e426e Author: Michal Kalderon Date: Wed Sep 2 19:57:39 2020 +0300 RDMA/qedr: Fix iWARP active mtu display Currently iWARP does not support mtu-change. Notify user when MTU changes that reload of qedr is required for mtu to change. Display the correct active mtu. Fixes: f5b1b1775be6 ("RDMA/qedr: Add iWARP support in existing verbs") Link: https://lore.kernel.org/r/20200902165741.8355-7-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 97fb3e33474897c35b7cfe6ff0e16a3e172d9249 Author: Michal Kalderon Date: Wed Sep 2 19:57:38 2020 +0300 qede: Notify qedr when mtu has changed MTU change on ethtool is currently not supported for iWARP. Notify qedr driver so that appropriate logging can take place. Link: https://lore.kernel.org/r/20200902165741.8355-6-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 8a5a10a1a74465065c75d9de1aa6685e1f1aa117 Author: Michal Kalderon Date: Wed Sep 2 19:57:37 2020 +0300 RDMA/qedr: Fix return code if accept is called on a destroyed qp In iWARP, accept could be called after a QP is already destroyed. In this case an error should be returned and not success. Fixes: 82af6d19d8d9 ("RDMA/qedr: Fix synchronization methods and memory leaks in qedr") Link: https://lore.kernel.org/r/20200902165741.8355-5-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit a379ad54e55a12618cae7f6333fd1b3071de9606 Author: Michal Kalderon Date: Wed Sep 2 19:57:36 2020 +0300 RDMA/qedr: Fix use of uninitialized field dev->attr.page_size_caps was used uninitialized when setting device attributes Fixes: ec72fce401c6 ("qedr: Add support for RoCE HW init") Link: https://lore.kernel.org/r/20200902165741.8355-4-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 0b1eddc1964351cd5ce57aff46853ed4ce9ebbff Author: Michal Kalderon Date: Wed Sep 2 19:57:35 2020 +0300 RDMA/qedr: Fix doorbell setting Change the doorbell setting so that the maximum value between the last and current value is set. This is to avoid doorbells being lost. Fixes: a7efd7773e31 ("qedr: Add support for PD,PKEY and CQ verbs") Link: https://lore.kernel.org/r/20200902165741.8355-3-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 098e345a1a8faaad6e4e54d138773466cecc45d4 Author: Michal Kalderon Date: Wed Sep 2 19:57:34 2020 +0300 RDMA/qedr: Fix qp structure memory leak The qedr_qp structure wasn't freed when the protocol was RoCE. kmemleak output when running basic RoCE scenario. unreferenced object 0xffff927ad7e22c00 (size 1024): comm "ib_send_bw", pid 7082, jiffies 4384133693 (age 274.698s) hex dump (first 32 bytes): 00 b0 cd a2 79 92 ff ff 00 3f a1 a2 79 92 ff ff ....y....?..y... 00 ee 5c dd 80 92 ff ff 00 f6 5c dd 80 92 ff ff ..\.......\..... backtrace: [<00000000b2ba0f35>] qedr_create_qp+0xb3/0x6c0 [qedr] [<00000000e85a43dd>] ib_uverbs_handler_UVERBS_METHOD_QP_CREATE+0x555/0xad0 [ib_uverbs] [<00000000fee4d029>] ib_uverbs_cmd_verbs+0xa5a/0xb80 [ib_uverbs] [<000000005d622660>] ib_uverbs_ioctl+0xa4/0x110 [ib_uverbs] [<00000000eb4cdc71>] ksys_ioctl+0x87/0xc0 [<00000000abe6b23a>] __x64_sys_ioctl+0x16/0x20 [<0000000046e7cef4>] do_syscall_64+0x4d/0x90 [<00000000c6948f76>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 1212767e23bb ("qedr: Add wrapping generic structure for qpidr and adjust idr routines.") Link: https://lore.kernel.org/r/20200902165741.8355-2-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit b60b9c0274007fe68439cd9cefdabbd7fb8a2ce6 Author: Bob Pearson Date: Thu Sep 3 17:40:34 2020 -0500 RDMA/core: Added missing WR and WC opcodes Add work completion opcodes to a new ib_uverbs_wc_opcode enum in ib_user_verbs.h. This plays the same role as ib_uverbs_wr_opcode documenting the opcodes in the user space API. Assigned the IB_WC_XXX opcodes in ib_verbs.h to the IB_UVERBS_WC_XXX where they are defined. This follows the same pattern as the IB_WR_XXX opcodes. This fixes an incorrect value for LSO that had crept in but is not currently being used. Added a missing IB_WR_BIND_MW opcode in ib_verbs.h. Link: https://lore.kernel.org/r/20200903224039.437391-2-rpearson@hpe.com Signed-off-by: Bob Pearson Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 1d4299ed774205cfe4218a351834a137853fa9c2 Author: Jason Gunthorpe Date: Fri Sep 4 19:41:58 2020 -0300 RDMA/ocrdma: Remove fbo from MR This is always the same value as IOVA masked by the page size, just use that clearer calculation directly. It is unclear of ocrdma hardware can actually support a true fbo, if so it could use a different algorithm to compute the best page size. Link: https://lore.kernel.org/r/17-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit b3003a74456f0c1f614a46c07e16abe33bfdd087 Author: Jason Gunthorpe Date: Fri Sep 4 19:41:57 2020 -0300 RDMA/qedr: Remove fbo and zbva from the MR zbva is always false, so fbo is never read. A 'zero-based-virtual-address' is simply IOVA == 0, and the driver already supports this. Link: https://lore.kernel.org/r/16-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Acked-by: Michal Kalderon  Signed-off-by: Jason Gunthorpe commit 81655d3c4a95f05495f3213acbbc5423fc4dbdfb Author: Jason Gunthorpe Date: Fri Sep 4 19:41:56 2020 -0300 RDMA/mlx4: Use ib_umem_num_dma_blocks() For the calls linked to mlx4_ib_umem_calc_optimal_mtt_size() use ib_umem_num_dma_blocks() inside the function, it is just some weird static default. All other places are just using it with PAGE_SIZE, switch to ib_umem_num_dma_blocks(). As this is the last call site, remove ib_umem_num_count(). Link: https://lore.kernel.org/r/15-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 87aebd3f8c7490b845f5ec3ce9c8658f17e0f96d Author: Jason Gunthorpe Date: Fri Sep 4 19:41:55 2020 -0300 RDMA/pvrdma: Use ib_umem_num_dma_blocks() instead of ib_umem_page_count() This driver always uses PAGE_SIZE. Link: https://lore.kernel.org/r/14-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit b8387f8189bbd75d588b165395f92ee1af52765f Author: Jason Gunthorpe Date: Fri Sep 4 19:41:54 2020 -0300 RDMA/ocrdma: Use ib_umem_num_dma_blocks() instead of ib_umem_page_count() This driver always uses a DMA array made up of PAGE_SIZE elements, so just use ib_umem_num_dma_blocks(). Since rdma_for_each_dma_block() always iterates exactly ib_umem_num_dma_blocks() there is no need for the early exit check in build_user_pbes(), delete it. Link: https://lore.kernel.org/r/13-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit cf9ce3c8ab803bb76504e53b0b23b542ab96ed02 Author: Jason Gunthorpe Date: Fri Sep 4 19:41:53 2020 -0300 RDMA/hns: Use ib_umem_num_dma_blocks() instead of opencoding mtr_umem_page_count() does the same thing, replace it with the core code. Also, ib_umem_find_best_pgsz() should always be called to check that the umem meets the page_size requirement. If there is a limited set of page_sizes that work it the pgsz_bitmap should be set to that set. 0 is a failure and the umem cannot be used. Lightly tidy the control flow to implement this flow properly. Link: https://lore.kernel.org/r/12-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Acked-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 84e71b4d9bd8bb5dfde6a298875d32e8ddf7f06e Author: Jason Gunthorpe Date: Fri Sep 4 19:41:52 2020 -0300 RDMA/bnxt: Do not use ib_umem_page_count() or ib_umem_num_pages() ib_umem_page_count() returns the number of 4k entries required for a DMA map, but bnxt_re already computes a variable page size. The correct API to determine the size of the page table array is ib_umem_num_dma_blocks(). Fix the overallocation of the page array in fill_umem_pbl_tbl() when working with larger page sizes by using the right function. Lightly re-organize this function to make it clearer. Replace the other calls to ib_umem_num_pages(). Fixes: d85582517e91 ("RDMA/bnxt_re: Use core helpers to get aligned DMA address") Link: https://lore.kernel.org/r/11-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Acked-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 901bca71cd5bb940c7a57042c4c1cc15bc847ffe Author: Jason Gunthorpe Date: Fri Sep 4 19:41:51 2020 -0300 RDMA/qedr: Use ib_umem_num_dma_blocks() instead of ib_umem_page_count() The length of the list populated by qedr_populate_pbls() should be calculated using ib_umem_num_dma_blocks() with the same size/shift passed to qedr_populate_pbls(). Link: https://lore.kernel.org/r/10-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Acked-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 68363052ff5addd3817a104cc453f4e2045704c9 Author: Jason Gunthorpe Date: Fri Sep 4 19:41:50 2020 -0300 RDMA/qedr: Use rdma_umem_for_each_dma_block() instead of open-coding This loop is splitting the DMA SGL into pg_shift sized pages, use the core code for this directly. Link: https://lore.kernel.org/r/9-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Acked-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 22123a0e4974fe03d1d8446b132a6c455f95a516 Author: Jason Gunthorpe Date: Fri Sep 4 19:41:49 2020 -0300 RDMA/i40iw: Use ib_umem_num_dma_pages() If ib_umem_find_best_pgsz() returns > PAGE_SIZE then the equation here is not correct. 'start' should be 'virt'. Change it to use the core code for page_num and the canonical calculation of page_shift. Fixes: eb52c0333f06 ("RDMA/i40iw: Use core helpers to get aligned DMA address within a supported page size") Link: https://lore.kernel.org/r/8-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 1f9b6827c85f9d9786f31a1434a16c917aae23b2 Author: Jason Gunthorpe Date: Fri Sep 4 19:41:48 2020 -0300 RDMA/efa: Use ib_umem_num_dma_pages() If ib_umem_find_best_pgsz() returns > PAGE_SIZE then the equation here is not correct. 'start' should be 'virt'. Change it to use the core code for page_num and the canonical calculation of page_shift. Fixes: 40ddb3f02083 ("RDMA/efa: Use API to get contiguous memory blocks aligned to device supported page size") Link: https://lore.kernel.org/r/7-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Tested-by: Gal Pressman Acked-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit a665aca89a411115e35ea937c2d3fb2ee4f5a701 Author: Jason Gunthorpe Date: Fri Sep 4 19:41:47 2020 -0300 RDMA/umem: Split ib_umem_num_pages() into ib_umem_num_dma_blocks() ib_umem_num_pages() should only be used by things working with the SGL in CPU pages directly. Drivers building DMA lists should use the new ib_num_dma_blocks() which returns the number of blocks rdma_umem_for_each_block() will return. To make this general for DMA drivers requires a different implementation. Computing DMA block count based on umem->address only works if the requested page size is < PAGE_SIZE and/or the IOVA == umem->address. Instead the number of DMA pages should be computed in the IOVA address space, not umem->address. Thus the IOVA has to be stored inside the umem so it can be used for these calculations. For now set it to umem->address by default and fix it up if ib_umem_find_best_pgsz() was called. This allows drivers to be converted to ib_umem_num_dma_blocks() safely. Link: https://lore.kernel.org/r/6-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit a328ca7e4af347e47742f36933df0fdac1c24ea5 Author: Neil Armstrong Date: Fri Sep 4 14:55:31 2020 +0200 drm/bridge: dw-mipi-dsi: permit configuring the escape clock rate The Amlogic D-PHY in the Amlogic AXG SoC Family does support a frequency higher than 10MHz for the TX Escape Clock, thus make the target rate configurable. Signed-off-by: Neil Armstrong Reviewed-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20200904125531.15248-1-narmstrong@baylibre.com commit 33f290811d4c1a09c4e92f5bf0458525835dbcba Author: Alex Dewar Date: Wed Sep 9 20:02:08 2020 +0100 drm/bridge: dw-mipi-dsi: Use kmemdup cf. kmalloc+memcpy kmemdup can be used instead of kmalloc+memcpy. Replace an occurrence of this pattern. Issue identified with Coccinelle. Signed-off-by: Alex Dewar Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200909190213.156302-1-alex.dewar90@gmail.com commit f7dbcd17703157c0063c619714a765e3116caa83 Merge: d210a0023590d 4a851d714eade Author: Greg Kroah-Hartman Date: Fri Sep 11 14:22:32 2020 +0200 Merge tag 'fsi-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi into char-misc-next Joel writes: FSI changes for 5.10 - Misc code cleanups. Thanks to Colin, Xu and Rikard - Features for the ASPEED FSI master * Detect connection type and routing for Tacoma * Run at full speed (200MHz) by default * Set bus speed with a parameter * CFAM reset GPIO * 23 bit addressing - Core features * Disable unused links * Set LBUS ownership * tag 'fsi-for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi: fsi: aspeed: Support CFAM reset GPIO fsi: aspeed: Add module param for bus divisor fsi: aspeed: Run the bus at maximum speed fsi: aspeed: Support cabled FSI dt-bindings: fsi: Document gpios fsi: scom: Constify scom_ids fsi: sbefifo: Constify sbefifo_ids fsi: master: Constify hub_master_ids fsi: master: Remove link enable read-back fsi: core: Set slave local bus ownership during init fsi: core: Disable link when slave init fails fsi: master: Add boolean parameter to link_enable function fsi: fsi-occ: fix return value check in occ_probe() fsi: aspeed: Enable 23-bit addressing fsi: master-ast-cf: fix spelling mistake "firwmare" -> "firmware" commit e3a52158a68220d28e1bcf4797c3762d06813c66 Author: Lad Prabhakar Date: Fri Sep 11 10:57:34 2020 +0100 dmaengine: Kconfig: Update description for RCAR_DMAC config rcar-dmac driver is used on Renesas R-Car Gen{2,3} and Renesas RZ/G{1,2} SoC's, update the same to reflect the description for RCAR_DMAC config. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200911095734.19348-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit f9b0366f5e991150f47a6cb42264c64ef94d1be2 Author: Peter Ujfalusi Date: Thu Sep 10 15:43:29 2020 +0300 dmaengine: ti: k3-udma: Use soc_device_match() for SoC dependent parameters Use separate data for SoC dependent parameters. These parameters depends on the DMA integration (either in HW or in SYSFW), the DMA controller itself remains compatible with either the am654 or j721e variant. j7200 have the same DMA as j721e with different number of channels, which can be queried from HW, but SYSFW defines different rchan_oes_offset number for j7200 (0x80) compared to j721e (0x400). Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200910124329.21206-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 4c80e9323967125ab8aa7c271ccc7624abc08832 Merge: ef759e4a28c88 f4d51dffc6c01 Author: Vinod Koul Date: Fri Sep 11 17:45:36 2020 +0530 Merge tag 'v5.9-rc4' into next Linux 5.9-rc4 commit ef759e4a28c88965972c815af6023f41bd733316 Author: Andy Shevchenko Date: Mon Sep 7 13:13:06 2020 +0300 dmaengine: dmatest: Print error codes as signed value When we got an error from DMA mapping API we convert a negative value to unsigned long type and hence make user confused: result #1: 'src mapping error' with src_off=0x19a72 dst_off=0xea len=0xccf4 (18446744073709551604) Change this to print error codes as signed values. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200907101306.61824-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 2fc3cad287c62c6477ab674e4430662b470c3a22 Author: Robin Murphy Date: Thu Sep 3 21:25:53 2020 +0100 dmaengine: pl330: Drop local dma_parms Since commit f458488425f1 ("amba: Initialize dma_parms for amba devices"), struct amba_device already provides a dma_parms structure, so we can save allocating another one. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/c9e58882e33f22f9b0a6d65a5507e24004512148.1599164692.git.robin.murphy@arm.com Signed-off-by: Vinod Koul commit 4e06de43a9e6d2ae5fa7525db9b83f19a73c57d3 Author: Robin Murphy Date: Thu Sep 3 21:25:52 2020 +0100 dmaengine: qcom: bam_dma: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/60ac2ef17e242dbf631db29ebde9d64d6df67030.1599164692.git.robin.murphy@arm.com Signed-off-by: Vinod Koul commit 1ecb12781cf75dc73eaa7fb84025496e6b196ac3 Author: Robin Murphy Date: Thu Sep 3 21:25:51 2020 +0100 dmaengine: ste_dma40: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/011a956183b92a258bf0922385d145ea966dcbea.1599164692.git.robin.murphy@arm.com Signed-off-by: Vinod Koul commit 93f868818216b3a1f15f0927195d3b0fa7227677 Author: Robin Murphy Date: Thu Sep 3 21:25:50 2020 +0100 dmaengine: rcar-dmac: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/23d40e15af10aad4724a2770ec18b4b28c1b8a71.1599164692.git.robin.murphy@arm.com Signed-off-by: Vinod Koul commit 6c609220c3a167c8a45d890d4fa95b02c02b8af5 Author: Robin Murphy Date: Thu Sep 3 21:25:49 2020 +0100 dmaengine: mxs: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/dc0fb6963067b9c799873d761661ed6dce1426ec.1599164692.git.robin.murphy@arm.com Signed-off-by: Vinod Koul commit b7fccfee1b9048f0fa6a96c8d482935147c92c93 Author: Robin Murphy Date: Thu Sep 3 21:25:48 2020 +0100 dmaengine: imx-sdma: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/d9b551dcf712a91860af3c5dd01a31b9b97ac1c5.1599164692.git.robin.murphy@arm.com Signed-off-by: Vinod Koul commit 18851192be7a1809b15bf4b0f7d629eb9d096a30 Author: Robin Murphy Date: Thu Sep 3 21:25:47 2020 +0100 dmaengine: imx-dma: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/7fad3c60cac2bf4f8dab791f8b6eafae90abc960.1599164692.git.robin.murphy@arm.com Signed-off-by: Vinod Koul commit 2f02b23ce9380723a2c1d016d96e5e9f29d3dda9 Author: Robin Murphy Date: Thu Sep 3 21:25:46 2020 +0100 dmaengine: bcm2835: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/116927330a4a66aac579ad38ddbc3b538cd9524c.1599164692.git.robin.murphy@arm.com Signed-off-by: Vinod Koul commit a4b1e659c0fec8e718cf63fb0c59cbae9251141c Author: Robin Murphy Date: Thu Sep 3 21:25:45 2020 +0100 dmaengine: axi-dmac: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/9b759e4c9eb37c90a3616d31abe13af6a6dafcd2.1599164692.git.robin.murphy@arm.com Signed-off-by: Vinod Koul commit 8f6b6d0606023c8403ac04ba42177ecbb55769f6 Author: Brad Kim Date: Thu Sep 3 20:17:26 2020 +0900 dmaengine: sf-pdma: Fix an error that calls callback twice Because a callback is called twice when DMA transfer complete the second callback may be possible to access a freed memory if the first callback routines perform the dma_release_channel function. So this patch serialized the callback functions Signed-off-by: Brad Kim Tested-and-reviewed-by: Green Wan Signed-off-by: Brad Kim Link: https://lore.kernel.org/r/20200903111726.3413-1-brad.kim@sifive.com Signed-off-by: Vinod Koul commit 1cce8f73a561c944ba69419044222a6797b547d2 Author: Ramuthevar Vadivel Murugan Date: Fri Aug 28 10:23:12 2020 +0800 phy: Add USB3 PHY support for Intel LGM SoC Add support for USB PHY on Intel LGM SoC. Signed-off-by: Ramuthevar Vadivel Murugan Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20200828022312.52724-3-vadivel.muruganx.ramuthevar@linux.intel.com Signed-off-by: Vinod Koul commit 8a676e1be4e0a41067808a2dba02127aee6fc277 Author: Ramuthevar Vadivel Murugan Date: Fri Aug 28 10:23:11 2020 +0800 dt-bindings: phy: Add USB PHY support for Intel LGM SoC Add the dt-schema to support USB PHY on Intel LGM SoC Signed-off-by: Ramuthevar Vadivel Murugan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200828022312.52724-2-vadivel.muruganx.ramuthevar@linux.intel.com Signed-off-by: Vinod Koul commit 48e07c23cbeba2a2cda7ca73be0015e727818536 Author: Christian König Date: Thu Sep 10 13:39:41 2020 +0200 drm/ttm: nuke memory type flags It's not supported to specify more than one of those flags. So it never made sense to make this a flag in the first place. Nuke the flags and specify directly which memory type to use. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/389826/?series=81551&rev=1 commit e03d342c621b985b68b3062cdbc3cdd6c6d7860b Author: Christian König Date: Tue Sep 8 16:55:55 2020 +0200 drm/vmwgfx: stop setting multiple domain flags Setting more than one placement flag is illegal. Fix this by using the current flags. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/389824/?series=81551&rev=1 commit 81b615798e9459ded773cad7a280a796012f2759 Author: Christian König Date: Tue Sep 8 14:39:36 2020 +0200 drm/nouveau: stop using TTM placement flags Those are going to be removed, stop using them here. Instead use the GEM flags from the UAPI. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/389825/?series=81551&rev=1 commit 7053e0eab473119503f6565b4e398f9a73122481 Author: Christian König Date: Mon Sep 7 16:14:52 2020 +0200 drm/vram-helper: stop using TTM placement flags Those are going to be removed, stop using them here. Instead define separate flags for the helper. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/389823/?series=81551&rev=1 commit 285008501c65a3fcee05d2c2c26cbf629ceff2f0 Author: Ming Lei Date: Fri Sep 11 18:41:14 2020 +0800 blk-mq: always allow reserved allocation in hctx_may_queue NVMe shares tagset between fabric queue and admin queue or between connect_q and NS queue, so hctx_may_queue() can be called to allocate request for these queues. Tags can be reserved in these tagset. Before error recovery, there is often lots of in-flight requests which can't be completed, and new reserved request may be needed in error recovery path. However, hctx_may_queue() can always return false because there is too many in-flight requests which can't be completed during error handling. Finally, nothing can proceed. Fix this issue by always allowing reserved tag allocation in hctx_may_queue(). This is reasonable because reserved tags are supposed to always be available. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: David Milburn Cc: Ewan D. Milne Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 84ed2573c5427de47c71a69d8b0a18020d5f6dd5 Author: Tian Tao Date: Fri Sep 11 18:58:52 2020 +0800 block: remove duplicate include statement in scsi_ioctl.c scsi/sg.h is included more than once, Remove the one that isn't necessary. Signed-off-by: Tian Tao Signed-off-by: Jens Axboe commit 4a1a4a442736b5f6b71a0fcce292c351e889b808 Author: Jani Nikula Date: Thu Sep 10 12:52:27 2020 +0300 drm/i915: move gmbus restore to i915_restore_display Logically part of the display restore. Note: This has been in place since the introduction of gmbus support. The gmbus code also does the resets before transfers. Is this really needed, or a historical accident? Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200910095227.9466-3-jani.nikula@intel.com commit 59c0df3cd27c330f1282722004369d173c9c2a3d Author: Jani Nikula Date: Thu Sep 10 12:52:26 2020 +0300 drm/i915: move gen4 GCDGMBUS save/restore to display save/restore Logically part of the display save/restore. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200910095227.9466-2-jani.nikula@intel.com commit 5e0e390d02257b9176095dd65a8b107d93499a25 Author: Jani Nikula Date: Thu Sep 10 12:52:25 2020 +0300 drm/i915: disable all display features when no display Disable all display feature flags when there are no pipes i.e. there is no display. This should help with not having to additionally check for HAS_DISPLAY() when a feature flag check would suffice. Also disable modeset and atomic driver features. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200910095227.9466-1-jani.nikula@intel.com commit 42a08ff79ff522bb92f92114bbdca45aed28d20c Author: YueHaibing Date: Wed Sep 9 21:58:34 2020 +0800 ath10k: Remove unused macro ATH10K_ROC_TIMEOUT_HZ There is no caller in tree, so can remove it. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200909135834.38448-1-yuehaibing@huawei.com commit 9bc260653a1d3ae69002422237388aa222629321 Author: YueHaibing Date: Wed Sep 9 21:45:33 2020 +0800 ath11k: Remove unused inline function htt_htt_stats_debug_dump() There is no caller in tree, so can remove it. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200909134533.19604-1-yuehaibing@huawei.com commit 5c0ec012ca7f7771f4a2dc9e41333411dd2693bc Author: Kalle Valo Date: Thu Sep 10 07:20:59 2020 +0000 ath11k: fix link error when CONFIG_REMOTEPROC is disabled If CONFIG_REMOTEPROC was disabled the linking failed with: ERROR: modpost: "rproc_get_by_phandle" [drivers/net/wireless/ath/ath11k/ath11k.ko] undefined! Compile tested only. Reported-by: Randy Dunlap Fixes: 1ff8ed786d5d ("ath11k: use remoteproc only with AHB devices") Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/0101017476e38f40-c4168ac4-c00a-4220-a032-fe17e4a157cb-000000@us-west-2.amazonses.com commit a9d9e03858ad418c6dc91658b3e9ba936668dffe Author: Anilkumar Kolli Date: Tue Sep 8 10:01:59 2020 +0000 ath11k: remove calling ath11k_init_hw_params() second time During probe ath11k_init_hw_params() is called from ath11k_core_pre_init() and is not needed agian in ath11k_core_init(). Tested on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00009-QCAHKSWPL_SILICONZ-1 Fixes: 1ff8ed786d5d (ath11k: use remoteproc only with AHB devices) Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/010101746d2a40d3-25cd7dbe-c0dd-4fdf-8735-366d7fb40207-000000@us-west-2.amazonses.com commit aa2092a9bab3f87c42f9d531b5b2889c6b823658 Author: Venkateswara Naralasetty Date: Tue Sep 8 06:32:21 2020 +0000 ath11k: add raw mode and software crypto support Adding raw mode tx/rx support. Also, adding support for software crypto which depends on raw mode. To enable raw mode tx/rx: insmod ath11k.ko frame_mode=0 To enable software crypto: insmod ath11k.ko crypto_mode=1 These modes could be helpful in debugging crypto related issues. Tested-on: IPQ8074 WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1 Signed-off-by: Manikanta Pubbisetty Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/010101746c6a52d9-18302a2c-0d6d-4057-aa4b-95960c809646-000000@us-west-2.amazonses.com commit b129699a0c7b1ae33585ef327c416b8c5145c93a Author: Anilkumar Kolli Date: Tue Sep 8 07:55:36 2020 +0000 ath11k: add ipq6018 support IPQ6018 has one 5G and one 2G radio with 2x2, shares ipq8074 configurations. Tested on: IPQ6018 hw1.0 AHB WLAN.HK.2.2-02134-QCAHKSWPL_SILICONZ-1 Tested on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00009-QCAHKSWPL_SILICONZ-1 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/010101746cb68b63-c2bc31ec-a31e-442e-a572-26f4c045c06b-000000@us-west-2.amazonses.com commit 967c1d1131fa09961de48e75878294a5769bbc63 Author: Anilkumar Kolli Date: Tue Sep 8 07:55:35 2020 +0000 ath11k: move target ce configs to hw_params Move target CE config and target CE service config to hw_params. No functional changes. Tested on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00009-QCAHKSWPL_SILICONZ-1 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/010101746cb685d9-6bedeccb-29a1-4d32-8664-fcfe7d105f4a-000000@us-west-2.amazonses.com commit 7b5bd15d23c5690bf93a06dd2d4a2d0d137ef1f5 Author: Anilkumar Kolli Date: Tue Sep 8 07:55:31 2020 +0000 dt: bindings: net: update compatible for ath11k Add IPQ6018 wireless driver support, its based on ath11k driver. Signed-off-by: Anilkumar Kolli Reviewed-by: Rob Herring Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/010101746cb6751a-ca300933-1174-4534-a01b-b1dbf1c1f305-000000@us-west-2.amazonses.com commit 91ca244bdcb6a0b6ad12c8325e5e9228b9472374 Author: Viresh Kumar Date: Wed Sep 9 19:41:53 2020 +0530 mmc: sdhci-msm: Unconditionally call dev_pm_opp_of_remove_table() dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Signed-off-by: Viresh Kumar Link: https://lore.kernel.org/r/890ae5601594fca5de104695a682f4b6efbc631b.1599660554.git.viresh.kumar@linaro.org Signed-off-by: Ulf Hansson commit 4494346392204ab4387d08eb5e089be8e7e1b74e Author: Nathan Chancellor Date: Thu Sep 10 10:18:32 2020 -0700 drm/vc4: Fix bitwise OR versus ternary operator in vc4_plane_mode_set Clang warns: drivers/gpu/drm/vc4/vc4_plane.c:901:27: warning: operator '?:' has lower precedence than '|'; '|' will be evaluated first [-Wbitwise-conditional-parentheses] fb->format->has_alpha ? ~~~~~~~~~~~~~~~~~~~~~ ^ drivers/gpu/drm/vc4/vc4_plane.c:901:27: note: place parentheses around the '|' expression to silence this warning fb->format->has_alpha ? ~~~~~~~~~~~~~~~~~~~~~ ^ drivers/gpu/drm/vc4/vc4_plane.c:901:27: note: place parentheses around the '?:' expression to evaluate it first fb->format->has_alpha ? ~~~~~~~~~~~~~~~~~~~~~~^ 1 warning generated. Add the parentheses as that was clearly intended, otherwise SCALER5_CTL2_ALPHA_PREMULT won't be added to the list. Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5") Signed-off-by: Nathan Chancellor Link: https://github.com/ClangBuiltLinux/linux/issues/1150 Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200910171831.4112580-1-natechancellor@gmail.com commit 910e1ca6f36f48b7911e72dc8b6667d652031d97 Author: Nathan Chancellor Date: Thu Sep 10 10:04:02 2020 -0700 drm/vc4: Update type of reg parameter in vc4_hdmi_{read,write} Clang warns 100+ times in the vc4 driver along the lines of: drivers/gpu/drm/vc4/vc4_hdmi_phy.c:518:13: warning: implicit conversion from enumeration type 'enum vc4_hdmi_field' to different enumeration type 'enum vc4_hdmi_regs' [-Wenum-conversion] HDMI_WRITE(HDMI_TX_PHY_POWERDOWN_CTL, ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ The HDMI_READ and HDMI_WRITE macros pass in enumerators of type vc4_hdmi_field but vc4_hdmi_write and vc4_hdmi_read expect a enumerator of type vc4_hdmi_regs, causing a warning for every instance of this. Update the parameter type so there is no more mismatch. Fixes: 311e305fdb4e ("drm/vc4: hdmi: Implement a register layout abstraction") Signed-off-by: Nathan Chancellor Link: https://github.com/ClangBuiltLinux/linux/issues/1149 Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200910170401.3857250-1-natechancellor@gmail.com commit 268d0a92600e50820916a5aeda0242a7153a2fd7 Author: Jason Yan Date: Thu Sep 10 22:06:10 2020 +0800 drm/i810: make i810_flush_queue() return void This function always return '0' and no callers use the return value. So make it a void function. This eliminates the following coccicheck warning: drivers/gpu/drm/i810/i810_dma.c:860:8-11: Unneeded variable: "ret". Return "0" on line 885 Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200910140610.1191578-1-yanaijie@huawei.com commit 33b4711df4c1b3aec7c267c60fc24abccfadd40c Author: Tony W Wang-oc Date: Tue Sep 8 18:57:46 2020 +0800 x86/cpu/centaur: Add Centaur family >=7 CPUs initialization support Add Centaur family >=7 CPUs specific initialization support. Signed-off-by: Tony W Wang-oc Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1599562666-31351-3-git-send-email-TonyWWang-oc@zhaoxin.com commit 8687bdc04128b2bd16faaae11db10128ad0da7b8 Author: Tony W Wang-oc Date: Tue Sep 8 18:57:45 2020 +0800 x86/cpu/centaur: Replace two-condition switch-case with an if statement Use a normal if statements instead of a two-condition switch-case. [ bp: Massage commit message. ] Signed-off-by: Tony W Wang-oc Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1599562666-31351-2-git-send-email-TonyWWang-oc@zhaoxin.com commit 075342ea3d93044d68f821cf91c1a1a7d2fa569e Author: Daniel Vetter Date: Mon Sep 7 10:22:25 2020 +0200 drm/xlnx: Use devm_drm_dev_alloc Gets rid of drmm_add_final_kfree, which I want to unexport so that it stops confusion people about this transitional state of rolling drm managed memory out. This also fixes the missing drm_dev_put in the error path of the probe code. v2: Drop the misplaced drm_dev_put from zynqmp_dpsub_drm_init (all other paths leaked on error, this should have been in zynqmp_dpsub_probe), now that subsumed by the auto-cleanup of devm_drm_dev_alloc. Reviewed-by: Hyun Kwon Signed-off-by: Daniel Vetter Cc: Hyun Kwon Cc: Laurent Pinchart Cc: Michal Simek Cc: linux-arm-kernel@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20200907082225.150837-1-daniel.vetter@ffwll.ch commit 53d77aaa3f76d203db8b681d2eb80b6b2fd6195a Author: Daniel Vetter Date: Wed Sep 9 11:18:33 2020 +0200 drm/vkms: Use devm_drm_dev_alloc This means we also need to slightly restructure the exit code, so that final cleanup of the drm_device is triggered by unregistering the platform device. Note that devres is both clean up when the driver is unbound (not the case for vkms, we don't bind), and also when unregistering the device (very much the case for vkms). Therefore we can rely on devres even though vkms isn't a proper platform device driver. This also somewhat untangles the load code, since the drm and platform device setup are no longer interleaved, but two distinct steps. v2: use devres_open/release_group so we can use devm without real hacks in the driver core or having to create an entire fake bus for testing drivers. Might want to extract this into helpers eventually, maybe as a mock_drm_dev_alloc or test_drm_dev_alloc. v3: Only deref vkms_device after checking it (Melissa) Reviewed-by: Melissa Wen Cc: Melissa Wen Signed-off-by: Daniel Vetter Cc: Rodrigo Siqueira Cc: Haneen Mohammed Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200909091833.440548-1-daniel.vetter@ffwll.ch commit bcc0ef7f57e51e5a5607eafb2a8ab63c6c1f21ff Author: Daniel Vetter Date: Wed Sep 9 14:07:45 2020 +0200 drm/vgem: Use devm_drm_dev_alloc This means we also need to slightly restructure the exit code, so that final cleanup of the drm_device is triggered by unregistering the platform device. Note that devres is both clean up when the driver is unbound (not the case for vgem, we don't bind), and also when unregistering the device (very much the case for vgem). Therefore we can rely on devres even though vgem isn't a proper platform device driver. This also somewhat untangles the load code, since the drm and platform device setup are no longer interleaved, but two distinct steps. v2: use devres_open/release_group so we can use devm without real hacks in the driver core or having to create an entire fake bus for testing drivers. Might want to extract this into helpers eventually, maybe as a mock_drm_dev_alloc or test_drm_dev_alloc. v3: Fix error code handling (Melissa) Cc: Melissa Wen Reviewed-by: Melissa Wen Signed-off-by: Daniel Vetter Cc: Daniel Vetter Cc: Emil Velikov Cc: Sean Paul Cc: Chris Wilson Cc: Sam Ravnborg Cc: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/20200909120745.716178-1-daniel.vetter@ffwll.ch commit c2c25c1cf96927a0b6ddb6aaa063f1fdcc90d749 Author: Daniel Vetter Date: Fri Sep 4 16:39:20 2020 +0200 drm/aspeed: Use managed drmm_mode_config_cleanup Since aspeed doesn't use devm_kzalloc anymore we can use the managed mode config cleanup. v2: Keep call order as suggested by Sam. Acked-by: Sam Ravnborg Signed-off-by: Daniel Vetter Cc: Joel Stanley Cc: Andrew Jeffery Cc: linux-aspeed@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20200904143941.110665-4-daniel.vetter@ffwll.ch commit dad75a5208ec88779d9ccd2c95ef5de659209208 Author: Daniel Vetter Date: Fri Sep 4 16:39:19 2020 +0200 drm/armada: Don't use drm_device->dev_private Upcasting using a container_of macro is more typesafe, faster and easier for the compiler to optimize. Signed-off-by: Daniel Vetter Reviewed-by: Dave Airlie Cc: Russell King Link: https://patchwork.freedesktop.org/patch/msgid/20200904143941.110665-3-daniel.vetter@ffwll.ch commit 90ad200b4cbc92e160c3f3331bb999f87cc0fbfd Author: Daniel Vetter Date: Fri Sep 4 16:39:18 2020 +0200 drm/armada: Use devm_drm_dev_alloc Also remove the now no longer needed build bug on since that's already not needed anymore with drmm_add_final_kfree. Conversion to managed drm_device cleanup is easy, the final drm_dev_put() is already the last thing in both the bind unbind as in the unbind flow. Also, this relies on component.c correctly wrapping bind&unbind in separate devres groups, which it does. Signed-off-by: Daniel Vetter Reviewed-by: Dave Airlie Cc: Russell King Link: https://patchwork.freedesktop.org/patch/msgid/20200904143941.110665-2-daniel.vetter@ffwll.ch commit 468588c8806e9f5b9cb744210f8f315210b1ed61 Merge: 8e9529f5cde7c fa2d185f75184 Author: Geert Uytterhoeven Date: Fri Sep 11 10:39:39 2020 +0200 Merge tag 'renesas-r8a779a0-dt-binding-defs-tag' into renesas-drivers-for-v5.10 Renesas R-Car V3U DT Binding Definitions Clock and Power Domain definitions for the Renesas R-Car V3U (R8A779A0) SoC, shared by driver and DT source files. commit 3137852c13c01abd442b021e6e6af057387988d0 Author: Kuninori Morimoto Date: Tue Sep 8 09:35:25 2020 +0900 arm64: dts: renesas: r8a77961: salvator-xs: Add HDMI Sound support This patch enables HDMI Sound on R-Car M3-W+ Salvator-XS board. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a6y1rtun.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 58b1b1ddfcc13900a1bead0e487bbb001ca520ee Author: Kuninori Morimoto Date: Tue Sep 8 09:35:20 2020 +0900 arm64: dts: renesas: r8a77961: salvator-xs: Add HDMI Display support This patch enables HDMI Display on R-Car M3-W+ Salvator-XS board. Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/87blihrtus.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 0ecbe08bb43df56591ca88d5becd1eab361bdb62 Author: Kuninori Morimoto Date: Tue Sep 8 09:35:15 2020 +0900 arm64: dts: renesas: r8a77961: Add HDMI device nodes This patch adds HDMI device nodes for R-Car M3-W+ (r8a77961) SoC. This patch was tested on R-Car M3-W+ Salvator-XS board. Signed-off-by: Kuninori Morimoto Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/87d02xrtux.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit d56896a40247ae47799e56f8651ce653535909bc Author: Kuninori Morimoto Date: Tue Sep 8 09:35:10 2020 +0900 arm64: dts: renesas: r8a77961: Add DU device nodes This patch adds DU device nodes for R-Car M3-W+ (r8a77961) SoC. This patch was tested on R-Car M3-W+ Salvator-XS board. Signed-off-by: Kuninori Morimoto Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/87eendrtv1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 298b0c8b2a5fb98bab2dc7846adf0f5e3e3f3d8a Author: Kuninori Morimoto Date: Tue Sep 8 09:34:59 2020 +0900 arm64: dts: renesas: r8a77961: Add VSP device nodes This patch adds VSP device nodes for R-Car M3-W+ (r8a77961) SoC. This patch was tested on R-Car M3-W+ Salvator-XS board. Signed-off-by: Kuninori Morimoto Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/87lfhm70s6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 9ab847043f24f6e83eb905230d050a754e790759 Author: Kuninori Morimoto Date: Tue Sep 8 09:34:50 2020 +0900 arm64: dts: renesas: r8a77961: Add FCP device nodes This patch adds FCP device nodes for R-Car M3-W+ (r8a77961) SoC. This patch was tested on R-Car M3-W+ Salvator-XS board. Signed-off-by: Kuninori Morimoto Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/87h7s9rtvl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit a2053990f3275e715d69c208d8c0040cac0df593 Author: Geert Uytterhoeven Date: Fri Aug 21 13:24:33 2020 +0200 arm64: dts: renesas: Fix pin controller node names According to Devicetree Specification v0.2 and later, Section "Generic Names Recommendation", the node name for a pin controller device node should be "pinctrl". Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200821112433.5652-1-geert+renesas@glider.be commit d9fd7ff595a89f7c975c96f78a0cedfe6d0828fb Author: Geert Uytterhoeven Date: Fri Aug 21 13:23:51 2020 +0200 ARM: dts: renesas: Fix pin controller node names According to Devicetree Specification v0.2 and later, Section "Generic Names Recommendation", the node name for a pin controller device node should be "pinctrl". Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200821112351.5518-1-geert+renesas@glider.be commit a92df4f62fda02e6b141e2b0bb52ccc486264b1c Author: Christoph Hellwig Date: Tue Aug 18 19:32:42 2020 +0200 dma-mapping: move the dma_declare_coherent_memory documentation dma_declare_coherent_memory should not be in a DMA API guide aimed at driver writers (that is consumers of the API). Move it to a comment near the function instead. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit d5ea32da878d4572761ca4580631748e398542de Author: Daniel Winkler Date: Tue Aug 25 16:31:51 2020 -0700 Bluetooth: Add MGMT capability flags for tx power and ext advertising For new advertising features, it will be important for userspace to know the capabilities of the controller and kernel. If the controller and kernel support extended advertising, we include flags indicating hardware offloading support and support for setting tx power of adv instances. In the future, vendor-specific commands may allow the setting of tx power in advertising instances, but for now this feature is only marked available if extended advertising is supported. This change is manually verified in userspace by ensuring the advertising manager's supported_flags field is updated with new flags on hatch chromebook (ext advertising supported). Signed-off-by: Daniel Winkler Signed-off-by: Marcel Holtmann commit 87597482c68e1ea5408b25f756eb9c668b304311 Author: Daniel Winkler Date: Tue Aug 25 16:31:50 2020 -0700 Bluetooth: Report num supported adv instances for hw offloading Here we make sure we properly report the number of supported advertising slots when we are using hardware offloading. If no hardware offloading is available, we default this value to HCI_MAX_ADV_INSTANCES for use in software rotation as before. This change has been tested on kukui (no ext adv) and hatch (ext adv) chromebooks by verifying "SupportedInstances" shows 5 (the default) and 6 (slots supported by controller), respectively. Signed-off-by: Daniel Winkler Signed-off-by: Marcel Holtmann commit 545d29272f38ba4791cca2a5a86fe6766f462f18 Author: Christoph Hellwig Date: Tue Aug 18 09:30:44 2020 +0200 dma-mapping: move dma_common_{mmap,get_sgtable} out of mapping.c Add a new file that contains helpers for misc DMA ops, which is only built when CONFIG_DMA_OPS is set. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 5ceda74093a5c1c3f42a02b894df031f3bbc9af1 Author: Christoph Hellwig Date: Mon Aug 17 17:34:03 2020 +0200 dma-direct: rename and cleanup __phys_to_dma The __phys_to_dma vs phys_to_dma distinction isn't exactly obvious. Try to improve the situation by renaming __phys_to_dma to phys_to_dma_unencryped, and not forcing architectures that want to override phys_to_dma to actually provide __phys_to_dma. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 7bc5c428a660d4d1bc95ba54bf4cb6bccf8c3029 Author: Christoph Hellwig Date: Tue Sep 8 17:56:22 2020 +0200 dma-direct: remove __dma_to_phys There is no harm in just always clearing the SME encryption bit, while significantly simplifying the interface. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 96eb89caf753fd0c26d239d8483d92632fb5be15 Author: Christoph Hellwig Date: Mon Aug 17 17:20:52 2020 +0200 dma-direct: use phys_to_dma_direct in dma_direct_alloc Replace the currently open code copy. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 3773dfe6ea4d220dcccb03827fca94ec3d39bc17 Author: Christoph Hellwig Date: Mon Aug 17 17:14:28 2020 +0200 dma-direct: lift gfp_t manipulation out of__dma_direct_alloc_pages Move the detailed gfp_t setup from __dma_direct_alloc_pages into the caller to clean things up a little. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 2f5388a29be82a62529d146499e70987e856f6f7 Author: Christoph Hellwig Date: Mon Aug 17 17:06:40 2020 +0200 dma-direct: remove dma_direct_{alloc,free}_pages Just merge these helpers into the main dma_direct_{alloc,free} routines, as the additional checks are always false for the two callers. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit abdaf11ac18925ce8cc229e62e35b342d548ece2 Author: Christoph Hellwig Date: Mon Aug 17 16:41:50 2020 +0200 dma-mapping: add (back) arch_dma_mark_clean for ia64 Add back a hook to optimize dcache flushing after reading executable code using DMA. This gets ia64 out of the business of pretending to be dma incoherent just for this optimization. Signed-off-by: Christoph Hellwig commit 054ec5e94a46b0941c1a79356bc4497c738129a2 Author: Venkata Lakshmi Narayana Gubba Date: Thu Sep 10 16:00:43 2020 +0530 Bluetooth: hci_qca: Remove duplicate power off in proto close During serdev unregister, hdev->shutdown is called before proto close. Removing duplicates power OFF call. Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Marcel Holtmann commit de8892df72be76828a1040799d47a34a1c58a563 Author: Venkata Lakshmi Narayana Gubba Date: Thu Sep 10 16:00:42 2020 +0530 Bluetooth: hci_serdev: Close UART port if NON_PERSISTENT_SETUP is set When HCI_QUIRK_NON_PERSISTENT_SETUP is set by drivers, it indicates that BT SoC will be completely powered OFF during BT OFF. On next BT ON firmware must be downloaded again. Holding UART port open during BT OFF is draining the battery. Now during BT OFF, UART port is closed if qurik HCI_QUIRK_NON_PERSISTENT_SETUP is set by clearing HCI_UART_PROTO_READY proto flag. On next BT ON, UART port is opened if HCI_UART_PROTO_READY proto flag is cleared. Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Marcel Holtmann commit ef1a85b6ca093abb00fbc38ea55fd9ae08ab05ef Author: Christoph Hellwig Date: Sat Aug 29 10:40:28 2020 +0200 dma-mapping: fix DMA_OPS dependencies Driver that select DMA_OPS need to depend on HAS_DMA support to work. The vop driver was missing that dependency, so add it, and also add a another depends in DMA_OPS itself. That won't fix the issue due to how the Kconfig dependencies work, but at least produce a warning about unmet dependencies. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 0fc1a726f897acfa774b17eeb62b38480d1c9ea0 Author: Joseph Hwang Date: Thu Sep 10 14:04:02 2020 +0800 Bluetooth: sco: new getsockopt options BT_SNDMTU/BT_RCVMTU This patch defines new getsockopt options BT_SNDMTU/BT_RCVMTU for SCO socket to be compatible with other bluetooth sockets. These new options return the same value as option SCO_OPTIONS which is already present on existing kernels. Signed-off-by: Joseph Hwang Reviewed-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Pali Rohár Signed-off-by: Marcel Holtmann commit 3eec158d5eca7dd455118d9e00568aad2371219f Author: Abhishek Pandit-Subedi Date: Wed Sep 9 16:53:59 2020 -0700 Bluetooth: Re-order clearing suspend tasks Unregister_pm_notifier is a blocking call so suspend tasks should be cleared beforehand. Otherwise, the notifier will wait for completion before returning (and we encounter a 2s timeout on resume). Fixes: 0e9952804ec9c8 (Bluetooth: Clear suspend tasks on unregister) Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit c6db014381bd85038ed3dfdea7d1367bfd4584a8 Author: Andy Shevchenko Date: Thu Sep 3 21:48:47 2020 +0300 Bluetooth: hci_intel: enable on new platform On new Intel platform the device is provided with INT33E3 ID. Append it to the list. This will require ACPI_GPIO_QUIRK_ONLY_GPIOIO to be enabled because the relevant ASL looks like: UartSerialBusV2 ( ... ) GpioInt ( ... ) { ... } GpioIo ( ... ) { ... } which means that first GPIO resource is an interrupt, while we are expecting it to be reset one (output). Do the same for host-wake because in case of GpioInt() the platform_get_irq() will do the job and should return correct Linux IRQ number. That said, host-wake GPIO can only be GpioIo() resource. While here, drop commas in terminator lines. Signed-off-by: Andy Shevchenko Signed-off-by: Marcel Holtmann commit cafd472a10ff3bccd8afd25a69f20a491cd8d7b8 Author: Peilin Ye Date: Wed Sep 9 03:25:51 2020 -0400 Bluetooth: Fix memory leak in read_adv_mon_features() read_adv_mon_features() is leaking memory. Free `rp` before returning. Fixes: e5e1e7fd470c ("Bluetooth: Add handler of MGMT_OP_READ_ADV_MONITOR_FEATURES") Reported-and-tested-by: syzbot+f7f6e564f4202d8601c6@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=f7f6e564f4202d8601c6 Signed-off-by: Peilin Ye Signed-off-by: Marcel Holtmann commit 2041a3f5009745d2b7d37208e7e7e8ccdb3d4c9c Author: YueHaibing Date: Sat Sep 5 20:15:49 2020 +0800 Bluetooth: btmtksdio: use NULL instead of zero Fix sparse warnings: drivers/bluetooth/btmtksdio.c:499:57: warning: Using plain integer as NULL pointer drivers/bluetooth/btmtksdio.c:533:57: warning: Using plain integer as NULL pointer Signed-off-by: YueHaibing Signed-off-by: Marcel Holtmann commit 7dbbd692641c6d8f44a7dbc1a168df55bb1f7eaf Author: Andy Shevchenko Date: Thu Sep 3 21:48:49 2020 +0300 Bluetooth: hci_intel: switch to list_for_each_entry() There is no need to have list_for_each() followed by list_entry() when we simply may use list_for_each_entry() directly. Signed-off-by: Andy Shevchenko Signed-off-by: Marcel Holtmann commit 0cc62caf4c8f376f8a846271083379667cf74739 Author: Andy Shevchenko Date: Thu Sep 3 21:48:48 2020 +0300 Bluetooth: hci_intel: drop strange le16_to_cpu() against u8 values Sparse rightfully complains: hci_intel.c:696:26: warning: cast to restricted __le16 hci_intel.c:701:26: warning: cast to restricted __le16 hci_intel.c:702:26: warning: cast to restricted __le16 hci_intel.c:703:26: warning: cast to restricted __le16 hci_intel.c:725:26: warning: cast to restricted __le16 hci_intel.c:730:26: warning: cast to restricted __le16 hci_intel.c:731:26: warning: cast to restricted __le16 hci_intel.c:732:26: warning: cast to restricted __le16 because we access non-restricted types with le16_to_cpu(). More confusion is added by using above against u8. On big-endian architecture we will get all zeroes. I bet it's not what should be in such case. Signed-off-by: Andy Shevchenko Signed-off-by: Marcel Holtmann commit 65a24d4c2712182a3ca450cf9f019ee5ab332533 Author: Xu Wang Date: Thu Sep 3 08:27:19 2020 +0000 Bluetooth: hci_qca: remove redundant null check Because clk_disable_unprepare already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang Signed-off-by: Marcel Holtmann commit f30f242fb1319e616fbcf94a43195a1c57db99b8 Author: Atish Patra Date: Wed Aug 19 15:24:23 2020 -0700 efi: Rename arm-init to efi-init common for all arch arm-init is responsible for setting up efi runtime and doesn't actually do any ARM specific stuff. RISC-V can use the same source code as it is. Rename it to efi-init so that RISC-V can use it. Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20200819222425.30721-8-atish.patra@wdc.com Signed-off-by: Ard Biesheuvel commit 6d0fd536183034953bf84826fecb37e47779d24b Author: Atish Patra Date: Fri Aug 28 10:20:31 2020 -0700 include: pe.h: Add RISC-V related PE definition Define RISC-V related machine types. Signed-off-by: Atish Patra Reviewed-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20200415195422.19866-3-atish.patra@wdc.com Signed-off-by: Ard Biesheuvel commit e2def7d49d0812ea40a224161b2001b2e815dce2 Author: Borislav Petkov Date: Sun Sep 6 23:02:52 2020 +0200 x86/mce: Make mce_rdmsrl() panic on an inaccessible MSR If an exception needs to be handled while reading an MSR - which is in most of the cases caused by a #GP on a non-existent MSR - then this is most likely the incarnation of a BIOS or a hardware bug. Such bug violates the architectural guarantee that MCA banks are present with all MSRs belonging to them. The proper fix belongs in the hardware/firmware - not in the kernel. Handling an #MC exception which is raised while an NMI is being handled would cause the nasty NMI nesting issue because of the shortcoming of IRET of reenabling NMIs when executed. And the machine is in an #MC context already so be at its side. Tracing MSR accesses while in #MC is another no-no due to tracing being inherently a bad idea in atomic context: vmlinux.o: warning: objtool: do_machine_check()+0x4a: call to mce_rdmsrl() leaves .noinstr.text section so remove all that "additional" functionality from mce_rdmsrl() and provide it with a special exception handler which panics the machine when that MSR is not accessible. The exception handler prints a human-readable message explaining what the panic reason is but, what is more, it panics while in the #GP handler and latter won't have executed an IRET, thus opening the NMI nesting issue in the case when the #MC has happened while handling an NMI. (#MC itself won't be reenabled until MCG_STATUS hasn't been cleared). Suggested-by: Andy Lutomirski Suggested-by: Peter Zijlstra [ Add missing prototypes for ex_handler_* ] Reported-by: kernel test robot Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20200906212130.GA28456@zn.tnic commit 170780be324da2c32ec0f7e9de2ebd0c4370ade5 Author: Christoph Hellwig Date: Mon Aug 17 16:51:47 2020 +0200 MIPS/jazzdma: decouple from dma-direct The jazzdma ops implement support for a very basic IOMMU. Thus we really should not use the dma-direct code that takes physical address limits into account. This survived through the great MIPS DMA ops cleanup mostly because I was lazy, but now it is time to fully split the implementations. Signed-off-by: Christoph Hellwig Acked-by: Thomas Bogendoerfer commit a4877c44a48e25f98f767a0fd54acacac55d1aac Author: Christoph Hellwig Date: Mon Aug 17 19:31:25 2020 +0200 MIPS/jazzdma: remove the unused vdma_remap function Signed-off-by: Christoph Hellwig Acked-by: Thomas Bogendoerfer commit cbf1449ba5aec9cf4c68b69f899391a8d42e9b8f Author: Christoph Hellwig Date: Tue Aug 18 15:18:23 2020 +0200 MIPS: make dma_sync_*_for_cpu a little less overzealous When transferring DMA ownership back to the CPU there should never be any writeback from the cache, as the buffer was owned by the device until now. Instead it should just be invalidated for the mapping directions where the device could have written data. Note that the changes rely on the fact that kmap_atomic is stubbed out for the !HIGHMEM case to simplify the code a bit. Signed-off-by: Christoph Hellwig Acked-by: Thomas Bogendoerfer commit ec91ccb27408abd842faf6137b3a0df8d6ebbdbb Author: Christoph Hellwig Date: Tue Sep 8 18:35:24 2020 +0200 dma-debug: remove most exports Now that the main dma mapping entry points are out of line most of the symbols in dma-debug.c can only be called from built-in code. Remove the unused exports. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 3d842b51a04808fc1494006b97e0d33402d28507 Author: Christoph Hellwig Date: Tue Sep 8 18:34:27 2020 +0200 dma-mapping: remove the dma_dummy_ops export dma_dummy_ops is only used by the ACPI code, which can't be modular. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit 74976e861309e4bf7f3e7e93f56ca3a6e0e1eca9 Author: Joel Stanley Date: Thu Sep 10 09:54:16 2020 +0930 ARM: config: aspeed_g5: Enable IBM OP Panel driver The IBM op-panel driver requires i2c slave mode. Signed-off-by: Joel Stanley commit 00355d82ef4ef44716b2745de806407e3a45d766 Author: Joel Stanley Date: Fri Jul 24 16:31:15 2020 +0930 ARM: config: aspeed-g5: Enable I2C GPIO mux driver Used by rainier and q71l. Signed-off-by: Joel Stanley commit 98c3f0a1b3ef83f6be6b212c970bee795e1a0467 Author: Joel Stanley Date: Wed Aug 26 16:49:16 2020 +0930 ARM: config: aspeed: Fix selection of media drivers In the 5.7 merge window the media kconfig was restructued. For most platforms these changes set CONFIG_MEDIA_SUPPORT_FILTER=y which keeps unwanted drivers disabled. The exception is if a config sets EMBEDDED or EXPERT (see b0cd4fb27665). In that case the filter is set to =n, causing a bunch of DVB tuner drivers (MEDIA_TUNER_*) to be accidentally enabled. This was noticed as it blew out the build time for the Aspeed defconfigs. Enabling the filter means the Aspeed config also needs to set CONFIG_MEDIA_PLATFORM_SUPPORT=y in order to have the CONFIG_VIDEO_ASPEED driver enabled. Fixes: 06b93644f4d1 ("media: Kconfig: add an option to filter in/out platform drivers") Fixes: b0cd4fb27665 ("media: Kconfig: on !EMBEDDED && !EXPERT, enable driver filtering") Signed-off-by: Joel Stanley Cc: stable@vger.kernel.org CC: Mauro Carvalho Chehab commit e89570584d2bcf188af4baaebacfb6998e6326dc Author: Ben Pai Date: Wed Sep 9 17:08:18 2020 +0800 ARM: dts: aspeed: Add Mowgli BMC platform The Mowgli BMC is an ASPEED ast2500 based BMC that is part of an OpenPower Power9 server. Signed-off-by: Ben Pai Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20200909090818.24021-1-ben_pai@wistron.com Signed-off-by: Joel Stanley commit 8db1824f5a38aa696311ac441ac778c4f51e8d0d Author: Herbert Xu Date: Fri Sep 4 18:27:05 2020 +1000 crypto: ux500 - Fix sparse endianness warnings This patch fixes a couple of sparse endianness warnings in the ux500 driver. Signed-off-by: Herbert Xu commit 4eb3f795bda0a3f79f4270528b73c6022a5487ec Author: Giovanni Cabiddu Date: Fri Sep 4 09:04:15 2020 +0100 crypto: qat - include domain in top level debugfs path Use pci_name() when creating debugfs entries in order to include PCI domain in the path. Signed-off-by: Giovanni Cabiddu Reviewed-by: Andy Shevchenko Signed-off-by: Herbert Xu commit b7da560ea251fce2771a0ca099c5a402147115c5 Author: Krzysztof Kozlowski Date: Thu Sep 3 20:04:00 2020 +0200 crypto: s5p-sss - Pass error from clk_get and reduce verbosity on deferral Pass the error directly from devm_clk_get() to describe the real reason, instead of fixed ENOENT. Do not print error messages on deferred probe. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Kamil Konieczny Acked-by: Kamil Konieczny Signed-off-by: Herbert Xu commit 98a6bc102b2cbab904cc57b4b4141d00b4722f09 Author: Krzysztof Kozlowski Date: Thu Sep 3 20:03:59 2020 +0200 crypto: s5p-sss - Add and fix kerneldoc Add missing and fix existing kerneldoc to silence W=1 warnings: drivers/crypto/s5p-sss.c:333: warning: Function parameter or member 'pclk' not described in 's5p_aes_dev' drivers/crypto/s5p-sss.c:373: warning: Function parameter or member 'sgl' not described in 's5p_hash_reqctx' drivers/crypto/s5p-sss.c:373: warning: Function parameter or member 'buffer' not described in 's5p_hash_reqctx' drivers/crypto/s5p-sss.c:1143: warning: Function parameter or member 'new_len' not described in 's5p_hash_prepare_sgs' drivers/crypto/s5p-sss.c:1143: warning: Excess function parameter 'nbytes' description in 's5p_hash_prepare_sgs' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Kamil Konieczny Acked-by: Kamil Konieczny Signed-off-by: Herbert Xu commit 7fe99da102c39213e4a4fd8f7bb0914120f2ae3a Author: Xu Wang Date: Thu Sep 3 08:37:38 2020 +0000 crypto: s5p-sss - remove redundant null check Because clk_disable_unprepare already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang Reviewed-by: Krzysztof Kozlowski Acked-by: Kamil Konieczny Signed-off-by: Herbert Xu commit cb435fa642ebbb348d336aa46669c0881dd435bc Author: Atte Tommiska Date: Wed Sep 2 13:28:17 2020 +0300 hwrng: xiphera-trng: add support for XIP8001B hwrng Xiphera XIP8001B is an FPGA-based True Random Number Generator Intellectual Property (IP) Core which can be instantiated in multiple FPGA families. This driver adds Linux support for it through the hwrng interface. Signed-off-by: Atte Tommiska Signed-off-by: Herbert Xu commit 5c8c36e70dc9c93c78c0b867e0b7ad823212c1f3 Author: Atte Tommiska Date: Wed Sep 2 13:28:16 2020 +0300 dt-bindings: rng: add bindings for Xiphera XIP8001B hwrng Document the device tree bindings of Xiphera's XIP8001B-trng IP. Signed-off-by: Atte Tommiska Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit 5edaaef3eaf9c5a7acc2a16d303986edc0a46e55 Author: Atte Tommiska Date: Wed Sep 2 13:28:15 2020 +0300 dt-bindings: vendor-prefixes: Add Xiphera vendor prefix Xiphera is an FPGA-based cryptographic solutions provider based in Finland. Website of the company: https://xiphera.com/ Signed-off-by: Atte Tommiska Acked-by: Rob Herring Signed-off-by: Herbert Xu commit 5f254dd440fbad0c00632f9ac7645f07d8df9229 Author: Herbert Xu Date: Tue Sep 1 21:49:11 2020 +1000 crypto: cbc - Remove cbc.h Now that crypto/cbc.h is only used by the generic cbc template, we can merge it back into the CBC code. Signed-off-by: Herbert Xu commit 00b99ad2bac256e3e4f10214c77fce6603afca26 Author: Herbert Xu Date: Tue Sep 1 21:48:40 2020 +1000 crypto: arm/aes-neonbs - Use generic cbc encryption path Since commit b56f5cbc7e08ec7d31c42fc41e5247677f20b143 ("crypto: arm/aes-neonbs - resolve fallback cipher at runtime") the CBC encryption path in aes-neonbs is now identical to that obtained through the cbc template. This means that it can simply call the generic cbc template instead of doing its own thing. This patch removes the custom encryption path and simply invokes the generic cbc template. Signed-off-by: Herbert Xu commit 9ace6771831017ce75a2bdf03c284b686dd39dba Author: Ard Biesheuvel Date: Mon Aug 31 18:16:49 2020 +0300 crypto: arc4 - mark ecb(arc4) skcipher as obsolete Cryptographic algorithms may have a lifespan that is significantly shorter than Linux's, and so we need to start phasing out algorithms that are known to be broken, and are no longer fit for general use. RC4 (or arc4) is a good example here: there are a few areas where its use is still somewhat acceptable, e.g., for interoperability with legacy wifi hardware that can only use WEP or TKIP data encryption, but that should not imply that, for instance, use of RC4 based EAP-TLS by the WPA supplicant for negotiating TKIP keys is equally acceptable, or that RC4 should remain available as a general purpose cryptographic transform for all in-kernel and user space clients. Now that all in-kernel users that need to retain support have moved to the arc4 library interface, and the known users of ecb(arc4) via the socket API (iwd [0] and libell [1][2]) have been updated to switch to a local implementation, we can take the next step, and mark the ecb(arc4) skcipher as obsolete, and only provide it if the socket API is enabled in the first place, as well as provide the option to disable all algorithms that have been marked as obsolete. [0] https://git.kernel.org/pub/scm/network/wireless/iwd.git/commit/?id=1db8a85a60c64523 [1] https://git.kernel.org/pub/scm/libs/ell/ell.git/commit/?id=53482ce421b727c2 [2] https://git.kernel.org/pub/scm/libs/ell/ell.git/commit/?id=7f6a137809d42f6b Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 274290ed98c55a9c5691497567e24463a7a91da4 Author: Ard Biesheuvel Date: Mon Aug 31 18:16:48 2020 +0300 net: wireless: drop bogus CRYPTO_xxx Kconfig selects Drop some bogus Kconfig selects that are not entirely accurate, and unnecessary to begin with, since the same Kconfig options also select LIB80211 features that already imply the selected functionality (AES for CCMP, ARC4 and ECB for TKIP) Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 1dbab6b1628d9039c5369b891c6706eb92274601 Author: Ard Biesheuvel Date: Mon Aug 31 18:16:47 2020 +0300 crypto: bcm-iproc - remove ecb(arc4) support Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b2ba0476847381f6f60bcfbb77d6ebc5448a88f3 Author: Ard Biesheuvel Date: Mon Aug 31 18:16:46 2020 +0300 crypto: n2 - remove ecb(arc4) support Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit e33d2a7b3041d7f8cd1f0a2a4ca42a5bc112b14e Author: Ard Biesheuvel Date: Mon Aug 31 18:16:45 2020 +0300 SUNRPC: remove RC4-HMAC-MD5 support from KerberosV The RC4-HMAC-MD5 KerberosV algorithm is based on RFC 4757 [0], which was specifically issued for interoperability with Windows 2000, but was never intended to receive the same level of support. The RFC says The IETF Kerberos community supports publishing this specification as an informational document in order to describe this widely implemented technology. However, while these encryption types provide the operations necessary to implement the base Kerberos specification [RFC4120], they do not provide all the required operations in the Kerberos cryptography framework [RFC3961]. As a result, it is not generally possible to implement potential extensions to Kerberos using these encryption types. The Kerberos encryption type negotiation mechanism [RFC4537] provides one approach for using such extensions even when a Kerberos infrastructure uses long-term RC4 keys. Because this specification does not implement operations required by RFC 3961 and because of security concerns with the use of RC4 and MD4 discussed in Section 8, this specification is not appropriate for publication on the standards track. The RC4-HMAC encryption types are used to ease upgrade of existing Windows NT environments, provide strong cryptography (128-bit key lengths), and provide exportable (meet United States government export restriction requirements) encryption. This document describes the implementation of those encryption types. Furthermore, this RFC was re-classified as 'historic' by RFC 8429 [1] in 2018, stating that 'none of the encryption types it specifies should be used' Note that other outdated algorithms are left in place (some of which are guarded by CONFIG_SUNRPC_DISABLE_INSECURE_ENCTYPES), so this should only adversely affect interoperability with Windows NT/2000 systems that have not received any updates since 2008 (but are connected to a network nonetheless) [0] https://tools.ietf.org/html/rfc4757 [1] https://tools.ietf.org/html/rfc8429 Signed-off-by: Ard Biesheuvel Acked-by: J. Bruce Fields Signed-off-by: Herbert Xu commit c59607784894c14110f1b69d601285d9d18bb6de Author: Ard Biesheuvel Date: Mon Aug 31 18:16:44 2020 +0300 staging/rtl8192u: switch to RC4 library interface Switch to the ARC4 library interface, to remove the pointless dependency on the skcipher API, from which we will hopefully be able to drop ecb(arc4) skcipher support. Signed-off-by: Ard Biesheuvel Acked-by: Greg Kroah-Hartman Signed-off-by: Herbert Xu commit 054694a46d64b59317fda59eae2509681fb3a1d4 Author: Ard Biesheuvel Date: Mon Aug 31 18:16:43 2020 +0300 staging/rtl8192e: switch to RC4 library interface Switch to the ARC4 library interface, to remove the pointless dependency on the skcipher API, from which we will hopefully be able to drop ecb(arc4) skcipher support. Signed-off-by: Ard Biesheuvel Acked-by: Greg Kroah-Hartman Signed-off-by: Herbert Xu commit 9769635423af703b131d7635e0de83767fe0006d Author: Marco Felsch Date: Mon Aug 31 16:00:42 2020 +0200 hwrng: imx-rngc - add quality to use it as kernel entropy pool The RNGB can generate 2^20 words (1 word == 4 byte) of 'random' data after the seed pool was initialized. The pool needs to be reseeded if more words are required. The reseeding is done automatically since commit 3acd9ea9331c ("hwrng: imx-rngc - use automatic seeding"). We can't retrieve the TRNG values directly so we need a other way to get the quality level. We know that the PRNG uses 20.000 entropy samples from the TRNG to generate 2^20 words (1MiB) and the quality level is defined as (in bits of entropy per 1024 bits of input). So the quality level can be calculated by: 20.000 * 1024 ------------- = ~ 19.5 2^20 Signed-off-by: Marco Felsch Signed-off-by: Herbert Xu commit 45cb6653b0c355fc1445a8069ba78a4ce8720511 Author: Dominik Przychodni Date: Mon Aug 31 11:59:59 2020 +0100 crypto: qat - check cipher length for aead AES-CBC-HMAC-SHA Return -EINVAL for authenc(hmac(sha1),cbc(aes)), authenc(hmac(sha256),cbc(aes)) and authenc(hmac(sha512),cbc(aes)) if the cipher length is not multiple of the AES block. This is to prevent an undefined device behaviour. Fixes: d370cec32194 ("crypto: qat - Intel(R) QAT crypto interface") Cc: Signed-off-by: Dominik Przychodni [giovanni.cabiddu@intel.com: reworded commit message] Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 3ec25b43faa76e00ef2b42184e21c91c101939e6 Author: Andy Shevchenko Date: Mon Aug 31 10:58:32 2020 +0300 crypto: caam - use traditional error check pattern Use traditional error check pattern ret = ...; if (ret) return ret; ... instead of checking error code to be 0. Signed-off-by: Andy Shevchenko Reviewed-by: Iuliana Prodan Signed-off-by: Herbert Xu commit 7dfd1e01b3dfc13431b1b25720cf2692a7e111ef Author: Uros Bizjak Date: Thu Aug 27 19:38:31 2020 +0200 crypto: poly1305-x86_64 - Use XORL r32,32 x86_64 zero extends 32bit operations, so for 64bit operands, XORL r32,r32 is functionally equal to XORQ r64,r64, but avoids a REX prefix byte when legacy registers are used. Signed-off-by: Uros Bizjak Cc: Herbert Xu Cc: "David S. Miller" Acked-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit db719539fd3889836900bf912755aa30a5985e9a Author: Uros Bizjak Date: Thu Aug 27 19:30:58 2020 +0200 crypto: curve25519-x86_64 - Use XORL r32,32 x86_64 zero extends 32bit operations, so for 64bit operands, XORL r32,r32 is functionally equal to XORL r64,r64, but avoids a REX prefix byte when legacy registers are used. Signed-off-by: Uros Bizjak Cc: Herbert Xu Cc: "David S. Miller" Acked-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit 17bce37e1b5eca95f9da783a07930b6d608c1389 Author: Tero Kristo Date: Tue Aug 25 16:31:06 2020 +0300 crypto: sa2ul - fix compiler warning produced by clang Clang detects a warning for an assignment that doesn't really do anything. Fix this by removing the offending piece of code. Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver") Reported-by: Nathan Chancellor Signed-off-by: Tero Kristo Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor # build Signed-off-by: Herbert Xu commit 2bab48c5bef00d103085da71a01da27ec7200c08 Merge: 18841da98100c 5050bef8736fa Author: Alexei Starovoitov Date: Thu Sep 10 20:53:01 2020 -0700 Merge branch 'improve-bpf-tcp-cc-init' Neal Cardwell says: ==================== This patch series reorganizes TCP congestion control initialization so that if EBPF code called by tcp_init_transfer() sets the congestion control algorithm by calling setsockopt(TCP_CONGESTION) then the TCP stack initializes the congestion control module immediately, instead of having tcp_init_transfer() later initialize the congestion control module. This increases flexibility for the EBPF code that runs at connection establishment time, and simplifies the code. This has the following benefits: (1) This allows CC module customizations made by the EBPF called in tcp_init_transfer() to persist, and not be wiped out by a later call to tcp_init_congestion_control() in tcp_init_transfer(). (2) Does not flip the order of EBPF and CC init, to avoid causing bugs for existing code upstream that depends on the current order. (3) Does not cause 2 initializations for for CC in the case where the EBPF called in tcp_init_transfer() wants to set the CC to a new CC algorithm. (4) Allows follow-on simplifications to the code in net/core/filter.c and net/ipv4/tcp_cong.c, which currently both have some complexity to special-case CC initialization to avoid double CC initialization if EBPF sets the CC. changes in v2: o rebase onto bpf-next o add another follow-on simplification suggested by Martin KaFai Lau: "tcp: simplify tcp_set_congestion_control() load=false case" changes in v3: o no change in commits o resent patch series from @gmail.com, since mail from ncardwell@google.com stopped being accepted at netdev@vger.kernel.org mid-way through processing the v2 patch series (between patches 2 and 3), confusing patchwork about which patches belonged to the v2 patch series ==================== Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 5050bef8736facac341fb7e2c0eda5002619acf8 Author: Neal Cardwell Date: Thu Sep 10 15:35:36 2020 -0400 tcp: Simplify tcp_set_congestion_control() load=false case Simplify tcp_set_congestion_control() by removing the initialization code path for the !load case. There are only two call sites for tcp_set_congestion_control(). The EBPF call site is the only one that passes load=false; it also passes cap_net_admin=true. Because of that, the exact same behavior can be achieved by removing the special if (!load) branch of the logic. Both before and after this commit, the EBPF case will call bpf_try_module_get(), and if that succeeds then call tcp_reinit_congestion_control() or if that fails then return EBUSY. Note that this returns the logic to a structure very similar to the structure before: commit 91b5b21c7c16 ("bpf: Add support for changing congestion control") except that the CAP_NET_ADMIN status is passed in as a function argument. This clean-up was suggested by Martin KaFai Lau. Suggested-by: Martin KaFai Lau Signed-off-by: Neal Cardwell Signed-off-by: Alexei Starovoitov Cc: Lawrence Brakmo Cc: Eric Dumazet Cc: Yuchung Cheng Cc: Kevin Yang commit 5cdc744caab7cb0d0a3ed479246cbab3dbc59c0e Author: Neal Cardwell Date: Thu Sep 10 15:35:35 2020 -0400 tcp: simplify _bpf_setsockopt(): Remove flags argument Now that the previous patches have removed the code that uses the flags argument to _bpf_setsockopt(), we can remove that argument. Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: Alexei Starovoitov Acked-by: Yuchung Cheng Acked-by: Kevin Yang Cc: Lawrence Brakmo commit 29a949325c6c90f1431db9af64592275c83d9b2a Author: Neal Cardwell Date: Thu Sep 10 15:35:34 2020 -0400 tcp: simplify tcp_set_congestion_control(): Always reinitialize Now that the previous patches ensure that all call sites for tcp_set_congestion_control() want to initialize congestion control, we can simplify tcp_set_congestion_control() by removing the reinit argument and the code to support it. Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: Alexei Starovoitov Acked-by: Yuchung Cheng Acked-by: Kevin Yang Cc: Lawrence Brakmo commit e7b10a4dd1b13c8fb8ee1686da7d01437c5da1d2 Author: Neal Cardwell Date: Thu Sep 10 15:35:33 2020 -0400 tcp: Simplify EBPF TCP_CONGESTION to always init CC Now that the previous patch ensures we don't initialize the congestion control twice, when EBPF sets the congestion control algorithm at connection establishment we can simplify the code by simply initializing the congestion control module at that time. Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: Alexei Starovoitov Acked-by: Yuchung Cheng Acked-by: Kevin Yang Cc: Lawrence Brakmo commit 8919a9b31eb4fb4c0a93e5fb350a626924302aa6 Author: Neal Cardwell Date: Thu Sep 10 15:35:32 2020 -0400 tcp: Only init congestion control if not initialized already Change tcp_init_transfer() to only initialize congestion control if it has not been initialized already. With this new approach, we can arrange things so that if the EBPF code sets the congestion control by calling setsockopt(TCP_CONGESTION) then tcp_init_transfer() will not re-initialize the CC module. This is an approach that has the following beneficial properties: (1) This allows CC module customizations made by the EBPF called in tcp_init_transfer() to persist, and not be wiped out by a later call to tcp_init_congestion_control() in tcp_init_transfer(). (2) Does not flip the order of EBPF and CC init, to avoid causing bugs for existing code upstream that depends on the current order. (3) Does not cause 2 initializations for for CC in the case where the EBPF called in tcp_init_transfer() wants to set the CC to a new CC algorithm. (4) Allows follow-on simplifications to the code in net/core/filter.c and net/ipv4/tcp_cong.c, which currently both have some complexity to special-case CC initialization to avoid double CC initialization if EBPF sets the CC. Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: Alexei Starovoitov Acked-by: Yuchung Cheng Acked-by: Kevin Yang Cc: Lawrence Brakmo commit 18841da98100c936990ac9013d55bf6b40e1f609 Author: Quentin Monnet Date: Thu Sep 10 21:39:35 2020 +0100 tools: bpftool: Automate generation for "SEE ALSO" sections in man pages The "SEE ALSO" sections of bpftool's manual pages refer to bpf(2), bpf-helpers(7), then all existing bpftool man pages (save the current one). This leads to nearly-identical lists being duplicated in all manual pages. Ideally, when a new page is created, all lists should be updated accordingly, but this has led to omissions and inconsistencies multiple times in the past. Let's take it out of the RST files and generate the "SEE ALSO" sections automatically in the Makefile when generating the man pages. The lists are not really useful in the RST anyway because all other pages are available in the same directory. v3: - Fix conflict with a previous patchset that introduced RST2MAN_OPTS variable passed to rst2man. v2: - Use "echo -n" instead of "printf" in Makefile, to avoid any risk of passing a format string directly to the command. Signed-off-by: Quentin Monnet Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200910203935.25304-1-quentin@isovalent.com commit 1aef5b4391f0c75c0a1523706a7b0311846ee12f Author: Song Liu Date: Thu Sep 10 13:33:14 2020 -0700 bpf: Fix comment for helper bpf_current_task_under_cgroup() This should be "current" not "skb". Fixes: c6b5fb8690fa ("bpf: add documentation for eBPF helpers (42-50)") Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Cc: Link: https://lore.kernel.org/bpf/20200910203314.70018-1-songliubraving@fb.com commit 6e057fc15a2da4ee03eb1fa6889cf687e690106e Author: Yonghong Song Date: Thu Sep 10 13:27:18 2020 -0700 selftests/bpf: Define string const as global for test_sysctl_prog.c When tweaking llvm optimizations, I found that selftest build failed with the following error: libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1 libbpf: prog 'sysctl_tcp_mem': bad map relo against '.L__const.is_tcp_mem.tcp_mem_name' in section '.rodata.str1.1' Error: failed to open BPF object file: Relocation failed make: *** [/work/net-next/tools/testing/selftests/bpf/test_sysctl_prog.skel.h] Error 255 make: *** Deleting file `/work/net-next/tools/testing/selftests/bpf/test_sysctl_prog.skel.h' The local string constant "tcp_mem_name" is put into '.rodata.str1.1' section which libbpf cannot handle. Using untweaked upstream llvm, "tcp_mem_name" is completely inlined after loop unrolling. Commit 7fb5eefd7639 ("selftests/bpf: Fix test_sysctl_loop{1, 2} failure due to clang change") solved a similar problem by defining the string const as a global. Let us do the same here for test_sysctl_prog.c so it can weather future potential llvm changes. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200910202718.956042-1-yhs@fb.com commit 90a1deda75c6b749fb89310e4744554a4c36ea33 Author: Ilya Leoshkevich Date: Thu Sep 10 19:13:36 2020 +0200 selftests/bpf: Fix test_ksyms on non-SMP kernels On non-SMP kernels __per_cpu_start is not 0, so look it up in kallsyms. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200910171336.3161995-1-iii@linux.ibm.com commit 9984c0bb22dcae688ef8588e2621133850ff49bc Author: Luo Jiaxing Date: Thu Sep 10 21:12:16 2020 +0800 net: smc91x: Remove set but not used variable 'status' in smc_phy_configure() Fixes the following warning when using W=1 to build kernel: drivers/net/ethernet/smsc/smc91x.c: In function ‘smc_phy_configure’: drivers/net/ethernet/smsc/smc91x.c:1039:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] int status; Signed-off-by: Luo Jiaxing Signed-off-by: David S. Miller commit d66423fbe11e141206f117b232916aa899d44959 Author: Lorenz Bauer Date: Thu Sep 10 12:02:48 2020 +0100 bpf: Plug hole in struct bpf_sk_lookup_kern As Alexei points out, struct bpf_sk_lookup_kern has two 4-byte holes. This leads to suboptimal instructions being generated (IPv4, x86): 1372 struct bpf_sk_lookup_kern ctx = { 0xffffffff81b87f30 <+624>: xor %eax,%eax 0xffffffff81b87f32 <+626>: mov $0x6,%ecx 0xffffffff81b87f37 <+631>: lea 0x90(%rsp),%rdi 0xffffffff81b87f3f <+639>: movl $0x110002,0x88(%rsp) 0xffffffff81b87f4a <+650>: rep stos %rax,%es:(%rdi) 0xffffffff81b87f4d <+653>: mov 0x8(%rsp),%eax 0xffffffff81b87f51 <+657>: mov %r13d,0x90(%rsp) 0xffffffff81b87f59 <+665>: incl %gs:0x7e4970a0(%rip) 0xffffffff81b87f60 <+672>: mov %eax,0x8c(%rsp) 0xffffffff81b87f67 <+679>: movzwl 0x10(%rsp),%eax 0xffffffff81b87f6c <+684>: mov %ax,0xa8(%rsp) 0xffffffff81b87f74 <+692>: movzwl 0x38(%rsp),%eax 0xffffffff81b87f79 <+697>: mov %ax,0xaa(%rsp) Fix this by moving around sport and dport. pahole confirms there are no more holes: struct bpf_sk_lookup_kern { u16 family; /* 0 2 */ u16 protocol; /* 2 2 */ __be16 sport; /* 4 2 */ u16 dport; /* 6 2 */ struct { __be32 saddr; /* 8 4 */ __be32 daddr; /* 12 4 */ } v4; /* 8 8 */ struct { const struct in6_addr * saddr; /* 16 8 */ const struct in6_addr * daddr; /* 24 8 */ } v6; /* 16 16 */ struct sock * selected_sk; /* 32 8 */ bool no_reuseport; /* 40 1 */ /* size: 48, cachelines: 1, members: 8 */ /* padding: 7 */ /* last cacheline: 48 bytes */ }; The assembly also doesn't contain the pesky rep stos anymore: 1372 struct bpf_sk_lookup_kern ctx = { 0xffffffff81b87f60 <+624>: movzwl 0x10(%rsp),%eax 0xffffffff81b87f65 <+629>: movq $0x0,0xa8(%rsp) 0xffffffff81b87f71 <+641>: movq $0x0,0xb0(%rsp) 0xffffffff81b87f7d <+653>: mov %ax,0x9c(%rsp) 0xffffffff81b87f85 <+661>: movzwl 0x38(%rsp),%eax 0xffffffff81b87f8a <+666>: movq $0x0,0xb8(%rsp) 0xffffffff81b87f96 <+678>: mov %ax,0x9e(%rsp) 0xffffffff81b87f9e <+686>: mov 0x8(%rsp),%eax 0xffffffff81b87fa2 <+690>: movq $0x0,0xc0(%rsp) 0xffffffff81b87fae <+702>: movl $0x110002,0x98(%rsp) 0xffffffff81b87fb9 <+713>: mov %eax,0xa0(%rsp) 0xffffffff81b87fc0 <+720>: mov %r13d,0xa4(%rsp) 1: https://lore.kernel.org/bpf/CAADnVQKE6y9h2fwX6OS837v-Uf+aBXnT_JXiN_bbo2gitZQ3tA@mail.gmail.com/ Fixes: e9ddbb7707ff ("bpf: Introduce SK_LOOKUP program type with a dedicated attach point") Suggested-by: Alexei Starovoitov Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/20200910110248.198326-1-lmb@cloudflare.com commit e3b9626f09d429788d929c9b9000a069fcfc056e Author: Quentin Monnet Date: Thu Sep 10 11:26:52 2020 +0100 tools: bpftool: Add "inner_map" to "bpftool map create" outer maps There is no support for creating maps of types array-of-map or hash-of-map in bpftool. This is because the kernel needs an inner_map_fd to collect metadata on the inner maps to be supported by the new map, but bpftool does not provide a way to pass this file descriptor. Add a new optional "inner_map" keyword that can be used to pass a reference to a map, retrieve a fd to that map, and pass it as the inner_map_fd. Add related documentation and bash completion. Note that we can reference the inner map by its name, meaning we can have several times the keyword "name" with different meanings (mandatory outer map name, and possibly a name to use to find the inner_map_fd). The bash completion will offer it just once, and will not suggest "name" on the following command: # bpftool map create /sys/fs/bpf/my_outer_map type hash_of_maps \ inner_map name my_inner_map [TAB] Fixing that specific case seems too convoluted. Completion will work as expected, however, if the outer map name comes first and the "inner_map name ..." is passed second. Signed-off-by: Quentin Monnet Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200910102652.10509-4-quentin@isovalent.com commit 86233ce35e4b886dc5998c72ec6158ed72150782 Author: Quentin Monnet Date: Thu Sep 10 11:26:51 2020 +0100 tools: bpftool: Keep errors for map-of-map dumps if distinct from ENOENT When dumping outer maps or prog_array maps, and on lookup failure, bpftool simply skips the entry with no error message. This is because the kernel returns non-zero when no value is found for the provided key, which frequently happen for those maps if they have not been filled. When such a case occurs, errno is set to ENOENT. It seems unlikely we could receive other error codes at this stage (we successfully retrieved map info just before), but to be on the safe side, let's skip the entry only if errno was ENOENT, and not for the other errors. v3: New patch Signed-off-by: Quentin Monnet Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200910102652.10509-3-quentin@isovalent.com commit a20693b6e72e59fb9b896193df0f8007693447d0 Author: Quentin Monnet Date: Thu Sep 10 11:26:50 2020 +0100 tools: bpftool: Clean up function to dump map entry The function used to dump a map entry in bpftool is a bit difficult to follow, as a consequence to earlier refactorings. There is a variable ("num_elems") which does not appear to be necessary, and the error handling would look cleaner if moved to its own function. Let's clean it up. No functional change. v2: - v1 was erroneously removing the check on fd maps in an attempt to get support for outer map dumps. This is already working. Instead, v2 focuses on cleaning up the dump_map_elem() function, to avoid similar confusion in the future. Signed-off-by: Quentin Monnet Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200910102652.10509-2-quentin@isovalent.com commit 0a4fd091cf11203c3f0415be85c70daf8db0bd4f Author: Krishna Manikandan Date: Thu Jul 16 17:05:33 2020 +0530 arm64: dts: sc7180: add bus clock to mdp node for sc7180 target Move the bus clock to mdp device node,in order to facilitate bus band width scaling on sc7180 target. The parent device MDSS will not vote for bus bw, instead the vote will be triggered by mdp device node. Since a minimum vote is required to turn on bus clock, move the clock node to mdp device from where the votes are requested. This patch has dependency on the below series https://patchwork.kernel.org/patch/11468783/ Reviewed-by: Rob Clark Signed-off-by: Krishna Manikandan Link: https://lore.kernel.org/r/1594899334-19772-2-git-send-email-kalyan_t@codeaurora.org Signed-off-by: Bjorn Andersson commit fa8da06628626531cda3a008223d99109cbd1f02 Author: Pradeep P V K Date: Mon Aug 17 12:11:04 2020 +0530 arm64: dts: qcom: sc7180: Add bandwidth votes for eMMC and SDcard Add the bandwidth domain supporting performance state and the corresponding OPP tables for the sdhc device on sc7180. Signed-off-by: Pradeep P V K Signed-off-by: Shaik Sajida Bhanu Link: https://lore.kernel.org/r/1597646464-1863-1-git-send-email-sbhanu@codeaurora.org Signed-off-by: Bjorn Andersson commit 25ed57b86fb9f7770f396469b023c0e6a45b66a8 Merge: b55353e2cc141 22ef473dbd66a Author: David S. Miller Date: Thu Sep 10 15:24:27 2020 -0700 Merge branch 'smc-next' Karsten Graul says: ==================== net/smc: updates 2020-09-10 Please apply the following patch series for smc to netdev's net-next tree. This patch series is a mix of various improvements and cleanups. The patches 1 and 10 improve the handling of large parallel workloads. Patch 8 corrects a kernel config default for config CCWGROUP on s390. Patch 9 allows userspace tools to retrieve socket information for more sockets. ==================== Signed-off-by: David S. Miller commit 22ef473dbd66a5241b6cedc186abca5a3a4eb922 Author: Karsten Graul Date: Thu Sep 10 18:48:29 2020 +0200 net/smc: use separate work queues for different worker types There are 6 types of workers which exist per smc connection. 3 of them are used for listen and handshake processing, another 2 are used for close and abort processing and 1 is the tx worker that moves calls to sleeping functions into a worker. To prevent flooding of the system work queue when many connections are opened or closed at the same time (some pattern uperf implements), move those workers to one of 3 smc-specific work queues. Two work queues are module-global and used for handshake and close workers. The third work queue is defined per link group and used by the tx workers that may sleep waiting for resources of this link group. And in smc_llc_enqueue() queue the llc_event_work work to the system prio work queue because its critical that this work is started fast. Reviewed-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 8418cb4065e3d6d214f7d5535c99deba6e813bf7 Author: Guvenc Gulce Date: Thu Sep 10 18:48:28 2020 +0200 net/smc: use the retry mechanism for netlink messages When the netlink messages to be sent to the userspace are too big for a single netlink message, send them in chunks using the netlink_dump infrastructure. Modify the smc diag dump code so that it can signal to the netlink_dump infrastructure that it needs to send more data. Signed-off-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 219d9aef6d838626c7143da790776b2ffd2949a1 Author: Guvenc Gulce Date: Thu Sep 10 18:48:27 2020 +0200 s390/net: add SMC config as one of the defaults of CCWGROUP arch/s390/net/pnet.c uses ccwgroup function dev_is_ccwgroup() in pnetid_by_dev_port(). For s390 the net/smc code makes use of function pnetid_by_dev_port(). Make sure ccwgroup is built into the kernel, if smc is to be built into the kernel. Signed-off-by: Guvenc Gulce Reviewed-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit f9aab6f2ce5761374daa7a65b006bebe04b5591f Author: Ursula Braun Date: Thu Sep 10 18:48:26 2020 +0200 net/smc: immediate freeing in smc_lgr_cleanup_early() smc_lgr_cleanup_early() schedules the free worker with delay. DMB unregistering occurs in this delayed worker increasing the risk to reach the SMCD SBA limit without need. Terminate the linkgroup immediately, since termination means early DMB unregistering. For SMCD the global smc_server_lgr_pending lock is given up early. A linkgroup to be given up with smc_lgr_cleanup_early() may already contain more than one connection. Using __smc_lgr_terminate() in smc_lgr_cleanup_early() covers this. And consolidate smc_ism_put_vlan() and smc_put_device() into smc_lgr_free() only. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 0c881ada3d1e7f5fd3d9099efca941ef0c6da363 Author: Ursula Braun Date: Thu Sep 10 18:48:25 2020 +0200 net/smc: reduce smc_listen_decline() calls smc_listen_work() contains already an smc_listen_decline() exit. Use this exit for smc_listen_rdma_finish() problems as well. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 7b2977d0830493452f1afaa8d8e1b4f8248df9d1 Author: Ursula Braun Date: Thu Sep 10 18:48:24 2020 +0200 net/smc: improve server ISM device determination Move check whether peer can be reached into smc_pnet_find_ism_by_pnetid(). Thus searching continues for another ism device, if check fails. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 3d9725a6a1330bed78f452ba3b171b24d9b83ac7 Author: Ursula Braun Date: Thu Sep 10 18:48:23 2020 +0200 net/smc: common routine for CLC accept and confirm smc_clc_send_accept() and smc_clc_send_confirm() are quite similar. Move common code into a separate function smc_clc_send_confirm_accept(). And introduce separate SMCD and SMCR struct definitions for CLC accept resp. confirm. No functional change. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 6bb14e48ee8d8ec23d191fd91de33f09da1ecce4 Author: Ursula Braun Date: Thu Sep 10 18:48:22 2020 +0200 net/smc: dynamic allocation of CLC proposal buffer Reduce stack size for smc_listen_work() and smc_clc_send_proposal() by dynamic allocation of the CLC buffer to be received or sent. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 5ac54d8768da973d761fef8aa1be9f00001107c0 Author: Ursula Braun Date: Thu Sep 10 18:48:21 2020 +0200 net/smc: introduce better field names Field names "srv_first_contact" and "cln_first_contact" are misleading, since they apply to both, server and client. Rename them to "first_contact_peer" and "first_contact_local". Rename "ism_gid" by the more precise name "ism_peer_gid". Rename version constant "SMC_CLC_V1" into "SMC_V1". No functional change. Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit a60a2b1e0af1a7517ba41689b39e9df90ef09041 Author: Ursula Braun Date: Thu Sep 10 18:48:20 2020 +0200 net/smc: reduce active tcp_listen workers SMC starts a separate tcp_listen worker for every SMC socket in state SMC_LISTEN, and can accept an incoming connection request only, if this worker is really running and waiting in kernel_accept(). But the number of running workers is limited. This patch reworks the listening SMC code and starts a tcp_listen worker after the SYN-ACK handshake on the internal clc-socket only. Suggested-by: Karsten Graul Signed-off-by: Ursula Braun Reviewed-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit b55353e2cc1415c1ece3ae34a856309b40bb0b4b Merge: 3fe6ab12fed5d 0760aad038b5a Author: David S. Miller Date: Thu Sep 10 15:22:17 2020 -0700 Merge branch 'nfc-s3fwrn5-Few-cleanups' Krzysztof Kozlowski says: ==================== nfc: s3fwrn5: Few cleanups Changes since v2: 1. Fix dtschema ID after rename (patch 1/8). 2. Apply patch 9/9 (defconfig change). Changes since v1: 1. Rename dtschema file and add additionalProperties:false, as Rob suggested, 2. Add Marek's tested-by, 3. New patches: #4, #5, #6, #7 and #9. ==================== Signed-off-by: David S. Miller commit 0760aad038b5a032c31ea124feed63d88627d2f1 Author: Krzysztof Kozlowski Date: Thu Sep 10 18:12:19 2020 +0200 arm64: dts: exynos: Use newer S3FWRN5 GPIO properties in Exynos5433 TM2 Since "s3fwrn5" is not a valid vendor prefix, use new GPIO properties instead of the deprecated. Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Signed-off-by: David S. Miller commit 46c9efa47fe004e461f7e2dd1f9fae4596254a69 Author: Krzysztof Kozlowski Date: Thu Sep 10 18:12:18 2020 +0200 MAINTAINERS: Add Krzysztof Kozlowski to Samsung S3FWRN5 and remove Robert Robert Bałdyga's email does not work (bounces) since 2016 so remove it. Additionally there are no review/ack/tested tags from Krzysztof Opasiak so it looks like the driver is not supported. As a maintainer of Samsung ARM/ARM64 SoC, I can take care about this driver and provide some review. However clearly driver is not in supported mode as I do not work in Samsung anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 171a7000fa94c7ed30720357bc0b9e8d277d15e5 Author: Krzysztof Kozlowski Date: Thu Sep 10 18:12:17 2020 +0200 nfc: s3fwrn5: Constify s3fwrn5_fw_info when not modified Two functions accept pointer to struct s3fwrn5_fw_info but do not modify the contents. Make them const so the code is a little bit safer. Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 4aa62c62d4c41d71b2bda5ed01b78961829ee93c Author: Krzysztof Kozlowski Date: Thu Sep 10 18:12:16 2020 +0200 nfc: s3fwrn5: Add missing CRYPTO_HASH dependency The driver uses crypto hash functions so it needs to select CRYPTO_HASH. This fixes build errors: arc-linux-ld: drivers/nfc/s3fwrn5/firmware.o: in function `s3fwrn5_fw_download': firmware.c:(.text+0x152): undefined reference to `crypto_alloc_shash' Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit e52e4130ffefaab11c7a09ab83de7022400d5d60 Author: Krzysztof Kozlowski Date: Thu Sep 10 18:12:15 2020 +0200 nfc: s3fwrn5: Remove unneeded 'ret' variable The local variable 'ret' can be removed: drivers/nfc/s3fwrn5/i2c.c:167:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 1995c4cc3ae4070717b07d972e0ee66989375304 Author: Krzysztof Kozlowski Date: Thu Sep 10 18:12:14 2020 +0200 nfc: s3fwrn5: Remove wrong vendor prefix from GPIOs The device tree property prefix describes the vendor, which in case of S3FWRN5 chip is Samsung. Therefore the "s3fwrn5" prefix for "en-gpios" and "fw-gpios" is not correct and should be deprecated. Introduce properly named properties for these GPIOs but still support deprecated ones. Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Signed-off-by: David S. Miller commit 3a9f89aaee2b42c1ad1bfef69dddf791f781812a Author: Krzysztof Kozlowski Date: Thu Sep 10 18:12:13 2020 +0200 dt-bindings: net: nfc: s3fwrn5: Remove wrong vendor prefix from GPIOs The device tree property prefix describes the vendor, which in case of S3FWRN5 chip is Samsung. Therefore the "s3fwrn5" prefix for "en-gpios" and "fw-gpios" is not correct and should be deprecated. Introduce properly named properties for these GPIOs and rename the fw-gpios" to "wake-gpios" to better describe its purpose. Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 07d20a643084f5cc96370c2490a07a517877dc0a Author: Krzysztof Kozlowski Date: Thu Sep 10 18:12:12 2020 +0200 dt-bindings: net: nfc: s3fwrn5: Convert to dtschema Convert the Samsung S3FWRN5 NCI NFC controller bindings to dtschema. This is conversion only so it includes properties with invalid prefixes (s3fwrn5,en-gpios) which should be addressed later. Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 3fe6ab12fed5d4d84e52f2c348fc093684a4dd15 Merge: cdd0a379a6a3f 07a5747aa5089 Author: David S. Miller Date: Thu Sep 10 15:18:19 2020 -0700 Merge branch 'hns-kdoc' Wang Hai says: ==================== Fix some kernel-doc warnings for hns. ==================== Signed-off-by: David S. Miller commit 07a5747aa5089120e05cbd5eddb3b51e0a161569 Author: Wang Hai Date: Thu Sep 10 22:56:20 2020 +0800 net: hns: Fix a kernel-doc warning in hinic_hw_eqs.c Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c:115: warning: Excess function parameter 'hw_handler' description in 'hinic_aeq_register_hw_cb' Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit f3e9a7cf25d61ec3225e4323dfb59d788383db7e Author: Wang Hai Date: Thu Sep 10 22:56:19 2020 +0800 net: hns: Fix a kernel-doc warning in hinic_hw_api_cmd.c Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/huawei/hinic/hinic_hw_api_cmd.c:382: warning: Excess function parameter 'size' description in 'api_cmd' Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 43ec0f0784dc16d5fa1ffd2416b549f61ace5a30 Author: Wang Hai Date: Thu Sep 10 22:56:18 2020 +0800 net: hns: Fix some kernel-doc warnings in hns_enet.c Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/hisilicon/hns/hns_enet.c:1841: warning: Excess function parameter 'netdev' description in 'hns_set_multicast_list' drivers/net/ethernet/hisilicon/hns/hns_enet.c:1841: warning: Excess function parameter 'p' description in 'hns_set_multicast_list' Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 64dfc4f68d660bdb73ba117a7a1307901e9eb782 Author: Wang Hai Date: Thu Sep 10 22:56:17 2020 +0800 net: hns: Fix some kernel-doc warnings in hns_dsaf_xgmac.c Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c:137: warning: Excess function parameter 'drv' description in 'hns_xgmac_enable' drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c:497: warning: Excess function parameter 'cmd' description in 'hns_xgmac_get_regs' Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit ce455af31b66875fb69fe1fc6cb2b5ae296a3bc3 Author: Wang Hai Date: Thu Sep 10 22:56:16 2020 +0800 net: hns: fix 'cdev' kernel-doc warning in hnae_ae_unregister() Rename cdev to hdev. Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/hisilicon/hns/hnae.c:444: warning: Excess function parameter 'cdev' description in 'hnae_ae_unregister' Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit abbabe475fb7a6a13a89691ca3cc7a273667face Author: Wang Hai Date: Thu Sep 10 22:56:15 2020 +0800 hinic: Fix some kernel-doc warnings in hinic_hw_io.c Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/huawei/hinic/hinic_hw_io.c:373: warning: Excess function parameter 'sq_msix_entry' description in 'hinic_io_create_qps' drivers/net/ethernet/huawei/hinic/hinic_hw_io.c:373: warning: Excess function parameter 'rq_msix_entry' description in 'hinic_io_create_qps' Rename these wrong names. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit cdd0a379a6a3f7583ba6eedeef7c522aa4b2c5b3 Author: Alex Dewar Date: Thu Sep 10 14:49:10 2020 +0100 net: mvpp2: ptp: Fix unused variables In the functions mvpp2_isr_handle_xlg() and mvpp2_isr_handle_gmac_internal(), the bool variable link is assigned a true value in the case that a given bit of val is set. However, if the bit is unset, no value is assigned to link and it is then passed to mvpp2_isr_handle_link() without being initialised. Fix by assigning to link the value of the bit test. Build-tested on x86. Fixes: 36cfd3a6e52b ("net: mvpp2: restructure "link status" interrupt handling") Signed-off-by: Alex Dewar Signed-off-by: David S. Miller commit 45677bc6dcccd45fd1e3b7079b031e9a3ede483b Author: Wang Hai Date: Thu Sep 10 21:36:16 2020 +0800 net: cxgb3: Fix some kernel-doc warnings Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/chelsio/cxgb3/t3_hw.c:2209: warning: Excess function parameter 'adapter' description in 'clear_sge_ctxt' drivers/net/ethernet/chelsio/cxgb3/t3_hw.c:2975: warning: Excess function parameter 'adapter' description in 't3_set_proto_sram' Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 3c9e154de8b32a2d2f595b85b5649ef6e2053fbd Merge: e54846581891b 4cd28b214d561 Author: David S. Miller Date: Thu Sep 10 15:12:27 2020 -0700 Merge branch 'Enhance-current-features-in-ena-driver' Sameeh Jubran says: ==================== Enhance current features in ena driver This series adds the following: * Exposes new device stats using ethtool. * Adds and exposes the stats of xdp TX queues through ethtool. ==================== Signed-off-by: David S. Miller commit 4cd28b214d561e9882923919bfd4a73afb980ec9 Author: Sameeh Jubran Date: Thu Sep 10 13:07:13 2020 +0000 net: ena: xdp: add queue counters for xdp actions When using XDP every ingress packet is passed to an eBPF (xdp) program which returns an action for this packet. This patch adds counters for the number of times each such action was received. It also counts all the invalid actions received from the eBPF program. Signed-off-by: Shay Agroskin Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 0201bda10679267f98b776b4af73e081d55cb73e Author: Sameeh Jubran Date: Thu Sep 10 13:07:12 2020 +0000 net: ena: ethtool: add stats printing to XDP queues Added statistics for TX queues that are used for XDP TX. The statistics are the same as the ones printed for regular non-XDP TX queues. The XDP queue statistics can be queried using `ethtool -S ` Signed-off-by: Shay Agroskin Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 713865da3c623034a46b382b5d544048edcce827 Author: Sameeh Jubran Date: Thu Sep 10 13:07:11 2020 +0000 net: ena: ethtool: Add new device statistics The new metrics provide granular visibility along multiple network dimensions and enable troubleshooting and remediation of issues caused by instances exceeding network performance allowances. The new statistics can be queried using ethtool command. Signed-off-by: Guy Tzalik Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit f1852d64ba0af0e6916e81f16349dbf75f5dd9b0 Author: Sameeh Jubran Date: Thu Sep 10 13:07:10 2020 +0000 net: ena: ethtool: convert stat_offset to 64 bit resolution The type of all stat fields is u64, therefore when iterating over stat fields in a stats struct, it makes sense to use an offset in 64 bit resolution. Doing so allows us to drop some of the casting that is currently used when referencing stats. Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 5a4d9f3e18f5e2281f50e7f644e1f9a1589d900b Author: Matthias Kaehlcke Date: Thu Aug 13 11:30:33 2020 -0700 arm64: dts: qcom: sc7180: Add 'sustainable_power' for CPU thermal zones The 'sustainable_power' attribute provides an estimate of the sustained power that can be dissipated at the desired control temperature. One could argue that this value is not necessarily the same for all devices with the same SoC, which may have different form factors or thermal designs. However there are reasons to specify a (default) value at SoC level for SC7180: most importantly, if no value is specified at all the power_allocator thermal governor (aka 'IPA') estimates a value, using the minimum power of all cooling devices of the zone, which can result in overly aggressive thermal throttling. For most devices an approximate conservative value should be more useful than the minimum guesstimate of power_allocator. Devices that need a different value can overwrite it in their .dts. Also the thermal zones for SC7180 have a high level of granularity (essentially one for each function block), which makes it more likely that the default value just works for many devices. The values correspond to 1901 MHz for the big cores, and 1804 MHz for the small cores. The values were determined by limiting the CPU frequencies to different max values and launching a bunch of processes that cause high CPU load ('while true; do true; done &' is simple and does a good job). A frequency is deemed sustainable if the CPU temperatures don't rise (consistently) above the second trip point ('control temperature', 95 degC in this case). Once the highest sustainable frequency is found, the sustainable power can be calculated by multiplying the energy consumption per core at this frequency (which can be found in /sys/kernel/debug/energy_model/) with the number of cores that are specified as cooling devices. The sustainable frequencies were determined at room temperature on a device without heat sink or other passive cooling elements. Reviewed-by: Douglas Anderson Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20200813113030.1.I89c33c4119eaffb986b1e8c1bc6f0e30267089cd@changeid Signed-off-by: Bjorn Andersson commit ef8e58f837e6f5659ca8dc2c49dfe3eaf17a02e1 Author: Rajendra Nayak Date: Tue Sep 1 19:50:26 2020 +0530 arm64: dts: qcom: sc7180: Add OPP tables and power-domains for venus Add the OPP tables in order to be able to vote on the performance state of a power-domain Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1598970026-7199-6-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 137154871cf469af0e8def123511c37096583919 Author: Rajendra Nayak Date: Tue Sep 1 19:50:25 2020 +0530 arm64: dts: qcom: sdm845: Add OPP tables and power-domains for venus Add the OPP tables in order to be able to vote on the performance state of a power-domain. Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1598970026-7199-5-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 81921a37145e0c6581ab913129c3c2a604704eee Author: Krishna Manikandan Date: Thu Jul 16 17:05:32 2020 +0530 arm64: dts: qcom: sc7180: add interconnect bindings for display This change adds the interconnect bindings to the MDSS node. This will establish Display to DDR path for bus bandwidth voting. Reviewed-by: Rob Clark Signed-off-by: Krishna Manikandan Link: https://lore.kernel.org/r/1594899334-19772-1-git-send-email-kalyan_t@codeaurora.org Signed-off-by: Bjorn Andersson commit 568d2a1e37b2fd5a16f7d5c19d9ef0267c47e9af Author: Jaegeuk Kim Date: Mon Aug 31 10:22:17 2020 -0700 f2fs: point man pages for some f2fs utils This patch adds some missing contexts related to f2fs-tools in f2fs documentation. Signed-off-by: Jaegeuk Kim commit eca4873ee1b63ee051e0eed91099fa42c97b2438 Author: Daniel Rosenberg Date: Wed Jul 8 02:12:36 2020 -0700 f2fs: Use generic casefolding support This switches f2fs over to the generic support provided in the previous patch. Since casefolded dentries behave the same in ext4 and f2fs, we decrease the maintenance burden by unifying them, and any optimizations will immediately apply to both. Signed-off-by: Daniel Rosenberg Reviewed-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit c843843e714c8f17280d7db009412b1b1baf448b Author: Daniel Rosenberg Date: Wed Jul 8 02:12:35 2020 -0700 fs: Add standard casefolding support This adds general supporting functions for filesystems that use utf8 casefolding. It provides standard dentry_operations and adds the necessary structures in struct super_block to allow this standardization. The new dentry operations are functionally equivalent to the existing operations in ext4 and f2fs, apart from the use of utf8_casefold_hash to avoid an allocation. By providing a common implementation, all users can benefit from any optimizations without needing to port over improvements. Signed-off-by: Daniel Rosenberg Reviewed-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit 3d7bfea8b8378277a25b42b28fe5a2a5ca76a7cf Author: Daniel Rosenberg Date: Wed Jul 8 02:12:34 2020 -0700 unicode: Add utf8_casefold_hash This adds a case insensitive hash function to allow taking the hash without needing to allocate a casefolded copy of the string. The existing d_hash implementations for casefolding allocate memory within rcu-walk, by avoiding it we can be more efficient and avoid worrying about a failed allocation. Signed-off-by: Daniel Rosenberg Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit e6c3948de2f8213010e584009d47e9bc0934b32c Author: Chao Yu Date: Mon Aug 10 18:39:30 2020 +0800 f2fs: compress: use more readable atomic_t type for {cic,dic}.ref refcount_t type variable should never be less than one, so it's a little bit hard to understand when we use it to indicate pending compressed page count, let's change to use atomic_t for better readability. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 17d7648d9ce0c7d7e732252f0d976756c84d46aa Author: Chao Yu Date: Mon Aug 10 18:38:45 2020 +0800 f2fs: fix compile warning This patch fixes below compile warning reported by LKP (kernel test robot) cppcheck warnings: (new ones prefixed by >>) >> fs/f2fs/file.c:761:9: warning: Identical condition 'err', second condition is always false [identicalConditionAfterEarlyExit] return err; ^ fs/f2fs/file.c:753:6: note: first condition if (err) ^ fs/f2fs/file.c:761:9: note: second condition return err; Reported-by: kernel test robot Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2e9b2bb250d5d1493eaf36215fbfe2cd76ce4f7c Author: Chao Yu Date: Tue Aug 4 21:14:48 2020 +0800 f2fs: support 64-bits key in f2fs rb-tree node entry then, we can add specified entry into rb-tree with 64-bits segment time as key. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c5d02785c59dd8ee20031d742003daff8df73e2d Author: Chao Yu Date: Tue Aug 4 21:14:47 2020 +0800 f2fs: inherit mtime of original block during GC Don't let f2fs inner GC ruins original aging degree of segment. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6f3a01ae9b72d5b7c57632632b8c8088db11e7ab Author: Chao Yu Date: Tue Aug 4 21:14:46 2020 +0800 f2fs: record average update time of segment Previously, once we update one block in segment, we will update mtime of segment to last time, making aged segment becoming freshest, result in that GC with cost benefit algorithm missing such segment, So this patch changes to record mtime as average block updating time instead of last updating time. It's not needed to reset mtime for prefree segment, as se->valid_blocks is zero, then old se->mtime won't take any weight with below calculation: se->mtime = div_u64(se->mtime * se->valid_blocks + mtime, se->valid_blocks + 1); Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d0b9e42ab6155dc05fc83f00af9f45d4dd02264d Author: Chao Yu Date: Tue Aug 4 21:14:45 2020 +0800 f2fs: introduce inmem curseg Previous implementation of aligned pinfile allocation will: - allocate new segment on cold data log no matter whether last used segment is partially used or not, it makes IOs more random; - force concurrent cold data/GCed IO going into warm data area, it can make a bad effect on hot/cold data separation; In this patch, we introduce a new type of log named 'inmem curseg', the differents from normal curseg is: - it reuses existed segment type (CURSEG_XXX_NODE/DATA); - it only exists in memory, its segno, blkofs, summary will not b persisted into checkpoint area; With this new feature, we can enhance scalability of log, special allocators can be created for purposes: - pure lfs allocator for aligned pinfile allocation or file defragmentation - pure ssr allocator for later feature So that, let's update aligned pinfile allocation to use this new inmem curseg fwk. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 376207af4bf809a48bea79fc1970a17e048c734e Author: Chao Yu Date: Fri Aug 7 09:23:10 2020 +0800 f2fs: compress: remove unneeded code - f2fs_write_multi_pages - f2fs_compress_pages - init_compress_ctx - compress_pages - destroy_compress_ctx --- 1 - f2fs_write_compressed_pages - destroy_compress_ctx --- 2 destroy_compress_ctx() in f2fs_write_multi_pages() is redundant, remove it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e90027d23aecfce5c3a63b14a676377602d4bdac Author: Xiaojun Wang Date: Tue Aug 4 21:46:04 2020 +0800 f2fs: remove duplicated type casting Since DUMMY_WRITTEN_PAGE and ATOMIC_WRITTEN_PAGE have already been converted as unsigned long type, we don't need do type casting again. Signed-off-by: Xiaojun Wang Reported-by: Jack Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit de881df97768d07b342cbd1f8359b832afccace9 Author: Aravind Ramesh Date: Thu Jul 16 18:26:56 2020 +0530 f2fs: support zone capacity less than zone size NVMe Zoned Namespace devices can have zone-capacity less than zone-size. Zone-capacity indicates the maximum number of sectors that are usable in a zone beginning from the first sector of the zone. This makes the sectors sectors after the zone-capacity till zone-size to be unusable. This patch set tracks zone-size and zone-capacity in zoned devices and calculate the usable blocks per segment and usable segments per section. If zone-capacity is less than zone-size mark only those segments which start before zone-capacity as free segments. All segments at and beyond zone-capacity are treated as permanently used segments. In cases where zone-capacity does not align with segment size the last segment will start before zone-capacity and end beyond the zone-capacity of the zone. For such spanning segments only sectors within the zone-capacity are used. During writes and GC manage the usable segments in a section and usable blocks per segment. Segments which are beyond zone-capacity are never allocated, and do not need to be garbage collected, only the segments which are before zone-capacity needs to garbage collected. For spanning segments based on the number of usable blocks in that segment, write to blocks only up to zone-capacity. Zone-capacity is device specific and cannot be configured by the user. Since NVMe ZNS device zones are sequentially write only, a block device with conventional zones or any normal block device is needed along with the ZNS device for the metadata operations of F2fs. A typical nvme-cli output of a zoned device shows zone start and capacity and write pointer as below: SLBA: 0x0 WP: 0x0 Cap: 0x18800 State: EMPTY Type: SEQWRITE_REQ SLBA: 0x20000 WP: 0x20000 Cap: 0x18800 State: EMPTY Type: SEQWRITE_REQ SLBA: 0x40000 WP: 0x40000 Cap: 0x18800 State: EMPTY Type: SEQWRITE_REQ Here zone size is 64MB, capacity is 49MB, WP is at zone start as the zones are in EMPTY state. For each zone, only zone start + 49MB is usable area, any lba/sector after 49MB cannot be read or written to, the drive will fail any attempts to read/write. So, the second zone starts at 64MB and is usable till 113MB (64 + 49) and the range between 113 and 128MB is again unusable. The next zone starts at 128MB, and so on. Signed-off-by: Aravind Ramesh Signed-off-by: Damien Le Moal Signed-off-by: Niklas Cassel Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1a4a752ee876b7c7d775d73c51decdbf852ba4d5 Merge: be7e6bd01cdac 4564363351e26 Author: Florian Fainelli Date: Thu Sep 10 13:35:55 2020 -0700 Merge tag 'tags/bcm2835-dt-next-2020-09-08' into devicetree/next Maxime Ripard enables vc4 on BCM2711 (RPi4), which among other things adds HDMI functionality (no 4K yet). Signed-off-by: Florian Fainelli commit be7e6bd01cdacbf0fcaa281756963f77b619d8d2 Author: Andre Przywara Date: Wed Aug 26 19:38:01 2020 +0100 ARM: dts: broadcom: Fix SP804 node The DT binding for SP804 requires to have an "arm,primecell" compatible string. Add this string so that the Linux primecell bus driver picks the device up and activates the clock. Signed-off-by: Andre Przywara Tested-by: Florian Fainelli [florian: added compatible to ccbtimer1] Signed-off-by: Florian Fainelli commit f5146e5da4333cc1c8660877001e88b1a05a1dd5 Author: Andre Przywara Date: Fri Aug 28 14:06:01 2020 +0100 ARM: dts: NSP: Fix SP805 clock-names The SP805 binding sets the name for the actual watchdog clock to "wdog_clk" (with an underscore). Change the name in the DTs for the Broadcom NSP platform to match that. The Linux and U-Boot driver use the *first* clock for this purpose anyway, so it does not break anything. Signed-off-by: Andre Przywara Reviewed-by: Ray Jui Acked-by: Florian Fainelli Signed-off-by: Florian Fainelli commit 9d6693369fc782b33168255fe3cd760796dba59c Author: Andre Przywara Date: Fri Aug 28 14:06:00 2020 +0100 ARM: dts: Cygnus: Fix SP805 clocks The SP805 DT binding requires two clocks to be specified, but the Broadcom Cygnus DT currently only specifies one clock. In practice, Linux would pick a clock named "apb_pclk" for the bus clock, and the Linux and U-Boot SP805 driver would use the first clock to derive the actual watchdog counter frequency. Since currently both are the very same clock, we can just double the clock reference, and add the correct clock-names, to match the binding. Signed-off-by: Andre Przywara Reviewed-by: Ray Jui Acked-by: Florian Fainelli Signed-off-by: Florian Fainelli commit 5d00306e3aae170658e27413b6d7bf211547ea0f Author: Adrian Schmutzler Date: Sun Aug 30 21:54:41 2020 +0200 ARM: dts: NSP: replace status value "ok" by "okay" While the DT parser recognizes "ok" as a valid value for the "status" property, it is actually mentioned nowhere. Use the proper value "okay" instead, as done in the majority of files already. Signed-off-by: Adrian Schmutzler Signed-off-by: Florian Fainelli commit ec88a9c344d9fd8c3b11bff1f99a0b6248ae256d Author: Christian Lamparter Date: Sat Aug 22 18:19:23 2020 +0200 ARM: BCM5301X: Add DT for Meraki MR32 add support for the Cisco Meraki MR32. This is a dual-band enterprise class 802.11ac access point. The unit was donated by Chris Blake. Thank you! SoC: Broadcom BCM53016A1 (1 GHz, 2 cores) RAM: 128 MiB NAND: 128 MiB Spansion S34ML01G2 (~114 MiB useable) ETH: 1GBit Ethernet Port - PoE WIFI1: Broadcom BCM43520 an+ac (2x2:2 - id: 0x4352) WIFI2: Broadcom BCM43520 bgn (2x2:2 - id: 0x4352) WIFI3: Broadcom BCM43428 abgn (1x1:1 - id: 43428) BLE: Broadcom BCM20732 (ttyS1) LEDS: 1 x Programmable RGB Status LED (driven by a PWM) 1 x White LED (GPIO) 1 x Orange LED Fault Indicator (GPIO) 2 x LAN Activity / Speed LEDs (On the RJ45 Port) BUTTON: one Reset button MISC: AT24C64 8KiB EEPROM (i2c - stores Ethernet MAC) ina219 hardware monitor (i2c) Kensington Lock SERIAL: WARNING: The serial port needs a TTL/RS-232 3V3 level converter! The Serial setting is 115200-8-N-1. The board has a populated right angle 1x4 0.1" pinheader. The pinout is: VCC, RX, TX, GND. Odd stuff: - uart0 clock frequency is 62.5 MHz. - The LEDs are labeled as SYS-LED1 through SYS-LED3 because of the silkscreen on the PCB. - the original u-boot has been compiled with most functions and commands disabled. The u-boot env isn't setup properly either and as a result, the bcm47xxpart probing is not working. Hence, the nand partitions are specified through a "fixed-partition" binding. - The "WICED SMART(TM)" Bluetooth LE 4.0 BCM20732 chip is connected to uart2 of the SoC. The BCM20732 does not provide a HCI. So the linux' bluetooth stack is useless. The mock-up node with the compatible binding and enable-gpios property is provided solely as documentation. Signed-off-by: Christian Lamparter Signed-off-by: Florian Fainelli commit e54846581891b8cf1c8c903a4feae65a5aa27ed5 Author: Christoph Paasch Date: Wed Sep 9 22:07:36 2020 -0700 selftests/mptcp: Better delay & reordering configuration The delay was intended to be configured to "simulate" a high(er) BDP link. As such, it needs to be set as part of the loss-configuration and not as part of the netem reordering configuration. The reordering-config also requires a delay but that delay is the reordering-extend. So, a good approach is to set the reordering-extend as a function of the configured latency. E.g., 25% of the overall latency. To speed up the selftests, we limit the delay to 50ms maximum to avoid having the selftests run for too long. Finally, the intention of tc_reorder was that when it is unset, the test picks a random configuration. However, currently it is always initialized and thus the random config won't be picked up. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/6 Reported-and-reviewed-by: Matthieu Baerts Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit d095c46206be74a96dac2daf21506ab06c3ddfb1 Merge: 3a8c4ad161d48 ac8f1710c12bb Author: David S. Miller Date: Thu Sep 10 13:15:40 2020 -0700 Merge branch 'tcp-add-tos-reflection-feature' Wei Wang says: ==================== tcp: add tos reflection feature This patch series adds a new tcp feature to reflect TOS value received in SYN, and send it out in SYN-ACK, and eventually set the TOS value of the established socket with this reflected TOS value. This provides a way to set the traffic class/QoS level for all traffic in the same connection to be the same as the incoming SYN. It could be useful for datacenters to provide equivalent QoS according to the incoming request. This feature is guarded by /proc/sys/net/ipv4/tcp_reflect_tos, and is by default turned off. ==================== Signed-off-by: David S. Miller commit ac8f1710c12bb4c3626280ce03f05459ba8feef6 Author: Wei Wang Date: Wed Sep 9 17:50:48 2020 -0700 tcp: reflect tos value received in SYN to the socket This commit adds a new TCP feature to reflect the tos value received in SYN, and send it out on the SYN-ACK, and eventually set the tos value of the established socket with this reflected tos value. This provides a way to set the traffic class/QoS level for all traffic in the same connection to be the same as the incoming SYN request. It could be useful in data centers to provide equivalent QoS according to the incoming request. This feature is guarded by /proc/sys/net/ipv4/tcp_reflect_tos, and is by default turned off. Signed-off-by: Wei Wang Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit de033b7d1568a8f1252055c96cdd99954d5450c4 Author: Wei Wang Date: Wed Sep 9 17:50:47 2020 -0700 ip: pass tos into ip_build_and_send_pkt() This commit adds tos as a new passed in parameter to ip_build_and_send_pkt() which will be used in the later commit. This is a pure restructure and does not have any functional change. Signed-off-by: Wei Wang Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit e9b12edc133b54e15ecd105620d51fb8e8fa8bde Author: Wei Wang Date: Wed Sep 9 17:50:46 2020 -0700 tcp: record received TOS value in the request socket A new field is added to the request sock to record the TOS value received on the listening socket during 3WHS: When not under syn flood, it is recording the TOS value sent in SYN. When under syn flood, it is recording the TOS value sent in the ACK. This is a preparation patch in order to do TOS reflection in the later commit. Signed-off-by: Wei Wang Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 3a8c4ad161d48d9674a340f2dea916ae560c3e9d Author: Lorenzo Bianconi Date: Wed Sep 9 23:05:23 2020 +0200 net: mventa: drop mvneta_stats from mvneta_swbm_rx_frame signature Remove mvneta_stats from mvneta_swbm_rx_frame signature since now stats are accounted in mvneta_run_xdp routine Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 6198f4469089846c6017d2a6bc80ea7a37b469c5 Merge: 8b40f21b699df 5251ef8299325 Author: David S. Miller Date: Thu Sep 10 13:08:47 2020 -0700 Merge branch 'netpoll-make-sure-napi_list-is-safe-for-RCU-traversal' Jakub Kicinski says: ==================== netpoll: make sure napi_list is safe for RCU traversal This series is a follow-up to the fix in commit 96e97bc07e90 ("net: disable netpoll on fresh napis"). To avoid any latent race conditions convert dev->napi_list to a proper RCU list. We need minor restructuring because it looks like netif_napi_del() used to be idempotent, and it may be quite hard to track down everyone who depends on that. ==================== Signed-off-by: David S. Miller commit 5251ef82993252da0f63616676905da38b40778a Author: Jakub Kicinski Date: Wed Sep 9 10:37:53 2020 -0700 net: make sure napi_list is safe for RCU traversal netpoll needs to traverse dev->napi_list under RCU, make sure it uses the right iterator and that removal from this list is handled safely. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4d092dd2041a5f328410ad16d63b8606c24e8604 Author: Jakub Kicinski Date: Wed Sep 9 10:37:52 2020 -0700 net: manage napi add/del idempotence explicitly To RCUify napi->dev_list we need to replace list_del_init() with list_del_rcu(). There is no _init() version for RCU for obvious reasons. Up until now netif_napi_del() was idempotent so to make sure it remains such add a bit which is set when NAPI is listed, and cleared when it removed. Since we don't expect multiple calls to netif_napi_add() to be correct, add a warning on that side. Now that napi_hash_add / napi_hash_del are only called by napi_add / del we can actually steal its bit. We just need to make sure hash node is initialized correctly. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 5198d545dba8ad893f5e5a029ca8d43ee7bcf011 Author: Jakub Kicinski Date: Wed Sep 9 10:37:51 2020 -0700 net: remove napi_hash_del() from driver-facing API We allow drivers to call napi_hash_del() before calling netif_napi_del() to batch RCU grace periods. This makes the API asymmetric and leaks internal implementation details. Soon we will want the grace period to protect more than just the NAPI hash table. Restructure the API and have drivers call a new function - __netif_napi_del() if they want to take care of RCU waits. Note that only core was checking the return status from napi_hash_del() so the new helper does not report if the NAPI was actually deleted. Some notes on driver oddness: - veth observed the grace period before calling netif_napi_del() but that should not matter - myri10ge observed normal RCU flavor - bnx2x and enic did not actually observe the grace period (unless they did so implicitly) - virtio_net and enic only unhashed Rx NAPIs The last two points seem to indicate that the calls to napi_hash_del() were a left over rather than an optimization. Regardless, it's easy enough to correct them. This patch may introduce extra synchronize_net() calls for interfaces which set NAPI_STATE_NO_BUSY_POLL and depend on free_netdev() to call netif_napi_del(). This seems inevitable since we want to use RCU for netpoll dev->napi_list traversal, and almost no drivers set IFF_DISABLE_NETPOLL. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit f5ed777586e08e09c4b6f1e87161a145ee1431cf Author: Martin Radev Date: Mon Sep 7 15:16:13 2020 +0200 x86/sev-es: Check required CPU features for SEV-ES Make sure the machine supports RDRAND, otherwise there is no trusted source of randomness in the system. To also check this in the pre-decompression stage, make has_cpuflag() not depend on CONFIG_RANDOMIZE_BASE anymore. Signed-off-by: Martin Radev Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-73-joro@8bytes.org commit 8b40f21b699df25dcc8b98d0de7774a1e45fca4f Merge: 6eb8b7fbe3915 0313c7c2e45c4 Author: David S. Miller Date: Thu Sep 10 12:49:00 2020 -0700 Merge branch 'mlx4-avoid-devlink-port-type-not-set-warnings' Jakub Kicinski says: ==================== mlx4: avoid devlink port type not set warnings This small set addresses the issue of mlx4 potentially not setting devlink port type when Ethernet or IB driver is not built, but port has that type. v2: - add patch 1 ==================== Signed-off-by: David S. Miller commit 0313c7c2e45c40c8f2e4156672125a9756e6d8a1 Author: Jakub Kicinski Date: Tue Sep 8 15:21:14 2020 -0700 mlx4: make sure to always set the port type Even tho mlx4_core registers the devlink ports, it's mlx4_en and mlx4_ib which set their type. In situations where one of the two is not built yet the machine has ports of given type we see the devlink warning from devlink_port_type_warn() trigger. Having ports of a type not supported by the kernel may seem surprising, but it does occur in practice - when the unsupported port is not plugged in to a switch anyway users are more than happy not to see it (and potentially allocate any resources to it). Set the type in mlx4_core if type-specific driver is not built. Signed-off-by: Jakub Kicinski Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit 3ea87ca772a95ca645d2f4b3e71c2747ceb251e0 Author: Jakub Kicinski Date: Tue Sep 8 15:21:13 2020 -0700 devlink: don't crash if netdev is NULL Following change will add support for a corner case where we may not have a netdev to pass to devlink_port_type_eth_set() but we still want to set port type. This is definitely a corner case, and drivers should not normally pass NULL netdev - print a warning message when this happens. Sadly for other port types (ib) switches don't have a device reference, the way we always do for Ethernet, so we can't put the warning in __devlink_port_type_set(). Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 39336f4ffb2478ad384075cf4ba7ef2e5db2bbd7 Author: Tom Lendacky Date: Mon Sep 7 15:16:12 2020 +0200 x86/efi: Add GHCB mappings when SEV-ES is active Calling down to EFI runtime services can result in the firmware performing VMGEXIT calls. The firmware is likely to use the GHCB of the OS (e.g., for setting EFI variables), so each GHCB in the system needs to be identity-mapped in the EFI page tables, as unencrypted, to avoid page faults. Signed-off-by: Tom Lendacky [ jroedel@suse.de: Moved GHCB mapping loop to sev-es.c ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Acked-by: Ard Biesheuvel Link: https://lkml.kernel.org/r/20200907131613.12703-72-joro@8bytes.org commit 6eb8b7fbe3915921738b2cac211ff65b75750a04 Author: Lorenzo Bianconi Date: Tue Sep 8 20:23:31 2020 +0200 net: mvneta: rely on MVNETA_MAX_RX_BUF_SIZE for pkt split in mvneta_swbm_rx_frame() In order to easily change the rx buffer size, rely on MVNETA_MAX_RX_BUF_SIZE instead of PAGE_SIZE in mvneta_swbm_rx_frame routine for rx buffer split. Currently this is not an issue since we set MVNETA_MAX_RX_BUF_SIZE to PAGE_SIZE - MVNETA_SKB_PAD but it is a good to have to configure a different rx buffer size. Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 2f7de9865ba3cbfcf8b504f07154fdb6124176a4 Author: Lorenz Bauer Date: Wed Sep 9 17:27:12 2020 +0100 selftests: bpf: Test iterating a sockmap Add a test that exercises a basic sockmap / sockhash iteration. For now we simply count the number of elements seen. Once sockmap update from iterators works we can extend this to perform a full copy. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200909162712.221874-4-lmb@cloudflare.com commit 0365351524d7560d8ed7a42801a15252c6c56f41 Author: Lorenz Bauer Date: Wed Sep 9 17:27:11 2020 +0100 net: Allow iterating sockmap and sockhash Add bpf_iter support for sockmap / sockhash, based on the bpf_sk_storage and hashtable implementation. sockmap and sockhash share the same iteration context: a pointer to an arbitrary key and a pointer to a socket. Both pointers may be NULL, and so BPF has to perform a NULL check before accessing them. Technically it's not possible for sockhash iteration to yield a NULL socket, but we ignore this to be able to use a single iteration point. Iteration will visit all keys that remain unmodified during the lifetime of the iterator. It may or may not visit newly added ones. Switch from using rcu_dereference_raw to plain rcu_dereference, so we gain another guard rail if CONFIG_PROVE_RCU is enabled. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200909162712.221874-3-lmb@cloudflare.com commit 654785a1afe1b1428106c322c7ea650e3f8d29e9 Author: Lorenz Bauer Date: Wed Sep 9 17:27:10 2020 +0100 net: sockmap: Remove unnecessary sk_fullsock checks The lookup paths for sockmap and sockhash currently include a check that returns NULL if the socket we just found is not a full socket. However, this check is not necessary. On insertion we ensure that we have a full socket (caveat around sock_ops), so request sockets are not a problem. Time-wait sockets are allocated separate from the original socket and then fed into the hashdance. They don't affect the sockets already stored in the sockmap. Suggested-by: Jakub Sitnicki Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200909162712.221874-2-lmb@cloudflare.com commit 8c5c49a6a0518d704a084106a1ab3edcc80a1fb7 Merge: 4f6a5caf187ff bb82067c574a3 Author: David S. Miller Date: Thu Sep 10 12:25:51 2020 -0700 Merge branch 'Allow-more-than-255-IPv4-multicast-interfaces' Paul Davey says: ==================== Allow more than 255 IPv4 multicast interfaces Currently it is not possible to use more than 255 multicast interfaces for IPv4 due to the format of the igmpmsg header which only has 8 bits available for the VIF ID. There is space available in the igmpmsg header to store the full VIF ID in the form of an unused byte following the VIF ID field. There is also enough space for the full VIF ID in the Netlink cache notifications, however the value is currently taken directly from the igmpmsg header and has thus already been truncated. Adding the high byte of the VIF ID into the unused3 byte of igmpmsg allows use of more than 255 IPv4 multicast interfaces. The full VIF ID is also available in the Netlink notification by assembling it from both bytes from the igmpmsg. Additionally this reveals a deficiency in the Netlink cache report notifications, they lack any means for differentiating cache reports relating to different multicast routing tables. This is easily resolved by adding the multicast route table ID to the cache reports. changes in v2: - Added high byte of VIF ID to igmpmsg struct replacing unused3 member. - Assemble VIF ID in Netlink notification from both bytes in igmpmsg header. ==================== Signed-off-by: David S. Miller commit bb82067c574a36c7e1d6d552557cf5b112ed9751 Author: Paul Davey Date: Tue Sep 8 10:04:08 2020 +1200 ipmr: Use full VIF ID in netlink cache reports Insert the full 16 bit VIF ID into ipmr Netlink cache reports. The VIF_ID attribute has 32 bits of space so can store the full VIF ID extracted from the high and low byte fields in the igmpmsg. Signed-off-by: Paul Davey Signed-off-by: David S. Miller commit c8715a8e9f38906e73d6d78764216742db13ba0e Author: Paul Davey Date: Tue Sep 8 10:04:07 2020 +1200 ipmr: Add high byte of VIF ID to igmpmsg Use the unused3 byte in struct igmpmsg to hold the high 8 bits of the VIF ID. If using more than 255 IPv4 multicast interfaces it is necessary to have access to a VIF ID for cache reports that is wider than 8 bits, the VIF ID present in the igmpmsg reports sent to mroute_sk was only 8 bits wide in the igmpmsg header. Adding the high 8 bits of the 16 bit VIF ID in the unused byte allows use of more than 255 IPv4 multicast interfaces. Signed-off-by: Paul Davey Signed-off-by: David S. Miller commit 501cb008906631a019f3ab2104a17ef8b2651ed0 Author: Paul Davey Date: Tue Sep 8 10:04:06 2020 +1200 ipmr: Add route table ID to netlink cache reports Insert the multicast route table ID as a Netlink attribute to Netlink cache report notifications. When multiple route tables are in use it is necessary to have a way to determine which route table a given cache report belongs to when receiving the cache report. Signed-off-by: Paul Davey Signed-off-by: David S. Miller commit f28ef96d7b04a76575a020a9da4f92358abe68c6 Author: Quentin Monnet Date: Wed Sep 9 17:24:59 2020 +0100 tools: bpftool: Include common options from separate file Nearly all man pages for bpftool have the same common set of option flags (--help, --version, --json, --pretty, --debug). The description is duplicated across all the pages, which is more difficult to maintain if the description of an option changes. It may also be confusing to sort out what options are not "common" and should not be copied when creating new manual pages. Let's move the description for those common options to a separate file, which is included with a RST directive when generating the man pages. Signed-off-by: Quentin Monnet Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200909162500.17010-3-quentin@isovalent.com commit 82b8cf0acc7bfe7b247e5ddc4417f6146d74c0b8 Author: Quentin Monnet Date: Wed Sep 9 17:24:58 2020 +0100 tools: bpftool: Print optional built-in features along with version Bpftool has a number of features that can be included or left aside during compilation. This includes: - Support for libbfd, providing the disassembler for JIT-compiled programs. - Support for BPF skeletons, used for profiling programs or iterating on the PIDs of processes associated with BPF objects. In order to make it easy for users to understand what features were compiled for a given bpftool binary, print the status of the two features above when showing the version number for bpftool ("bpftool -V" or "bpftool version"). Document this in the main manual page. Example invocations: $ bpftool version ./bpftool v5.9.0-rc1 features: libbfd, skeletons $ bpftool -p version { "version": "5.9.0-rc1", "features": { "libbfd": true, "skeletons": true } } Some other parameters are optional at compilation ("DISASM_FOUR_ARGS_SIGNATURE", LIBCAP support) but they do not impact significantly bpftool's behaviour from a user's point of view, so their status is not reported. Available commands and supported program types depend on the version number, and are therefore not reported either. Note that they are already available, albeit without JSON, via bpftool's help messages. v3: - Use a simple list instead of boolean values for plain output. v2: - Fix JSON (object instead or array for the features). Signed-off-by: Quentin Monnet Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200909162500.17010-2-quentin@isovalent.com commit 41d5c37b74084b44ccc688dbab508acb5fdddc48 Author: Quentin Monnet Date: Wed Sep 9 17:22:51 2020 +0100 selftests, bpftool: Add bpftool (and eBPF helpers) documentation build eBPF selftests include a script to check that bpftool builds correctly with different command lines. Let's add one build for bpftool's documentation so as to detect errors or warning reported by rst2man when compiling the man pages. Also add a build to the selftests Makefile to make sure we build bpftool documentation along with bpftool when building the selftests. This also builds and checks warnings for the man page for eBPF helpers, which is built along bpftool's documentation. This change adds rst2man as a dependency for selftests (it comes with Python's "docutils"). v2: - Use "--exit-status=1" option for rst2man instead of counting lines from stderr. - Also build bpftool as part as the selftests build (and not only when the tests are actually run). Signed-off-by: Quentin Monnet Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200909162251.15498-3-quentin@isovalent.com commit 16f3ddfbad52fddd7dafdf4b540ca6c506c9d815 Author: Quentin Monnet Date: Wed Sep 9 17:22:50 2020 +0100 tools: bpftool: Log info-level messages when building bpftool man pages To build man pages for bpftool (and for eBPF helper functions), rst2man can log different levels of information. Let's make it log all levels to keep the RST files clean. Doing so, rst2man complains about double colons, used for literal blocks, that look like underlines for section titles. Let's add the necessary blank lines. v2: - Use "--verbose" instead of "-r 1" (same behaviour but more readable). - Pass it through a RST2MAN_OPTS variable so we can easily pass other options too. Signed-off-by: Quentin Monnet Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200909162251.15498-2-quentin@isovalent.com commit e9091bb77f6e130e42f2edd2e6bb4e5a2b2f9d77 Author: Chen Zhou Date: Tue Sep 8 21:22:01 2020 +0800 bpf: Remove duplicate headers Remove duplicate headers which are included twice. Signed-off-by: Chen Zhou Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200908132201.184005-1-chenzhou10@huawei.com commit 63070d7c2270e8de8abef8f6f20e192bcc1d50de Author: Yoshihiro Shimoda Date: Thu Sep 10 21:02:52 2020 +0900 arm64: dts: renesas: Add Renesas Falcon boards support Initial support for the Renesas Falcon CPU and BreakOut boards support. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599739372-30669-5-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 834c310f541839b6f4e0d9ca527a64f71b0d141b Author: Yoshihiro Shimoda Date: Thu Sep 10 21:02:51 2020 +0900 arm64: dts: renesas: Add Renesas R8A779A0 SoC support Add initial support for the Renesas R8A77990 (R-Car V3U) support. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599739372-30669-4-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 52c91f0ca8e43f6ec7d32afd99a68d74914583bf Merge: 8feb348406115 fa2d185f75184 Author: Geert Uytterhoeven Date: Thu Sep 10 19:05:04 2020 +0200 Merge tag 'renesas-r8a779a0-dt-binding-defs-tag' into renesas-arm-dt-for-v5.10 Renesas R-Car V3U DT Binding Definitions Clock and Power Domain definitions for the Renesas R-Car V3U (R8A779A0) SoC, shared by driver and DT source files. commit 919c385dde9cdd4775688205e29fc53131a6b3ff Author: Geert Uytterhoeven Date: Tue Sep 8 09:44:03 2020 +0200 ARM: shmobile: rcar-gen2: Make rcar_gen2_{timer_init, reserve}() static As of commit 1e90fea35b80cfe1 ("ARM: shmobile: r8a7791: Use common R-Car Gen2 machine definition"), there are no more users of rcar_gen2_timer_init() and rcar_gen2_reserve() outside arch/arm/mach-shmobile/setup-rcar-gen2.c. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200908074403.4379-1-geert+renesas@glider.be commit 8feb348406115e2cc5508efd6f94173a112b8c7c Author: Lad Prabhakar Date: Mon Sep 7 16:55:41 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Enable SD2 LED indication Add support for LED trigger on SD2 interface. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200907155541.2011-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 68ee7720a01cf20e1de20a2e770b6568db18c253 Author: Lad Prabhakar Date: Mon Sep 7 16:55:40 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Add can1 support to carrier board This patch enables CAN1 interface exposed through connector J20 on the carrier board. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200907155541.2011-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8368ca1540f0ff5bf4cfe92b1ea7fc8045f61d50 Author: Lad Prabhakar Date: Mon Sep 7 16:55:39 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Add SPI NOR support Add support for the SPI NOR device which is connected to MSIOF0 interface on the iWave RainboW-G21d-q7 board. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200907155541.2011-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4c32a2b34e62d1ab3325902f2a3b065f266cc4f3 Author: Lad Prabhakar Date: Mon Sep 7 15:45:09 2020 +0100 ARM: dts: r8a7742: Add VIN DT nodes Add VIN[0123] instances found in the r8a7742 SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20200907144509.8861-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 7345e5c1853d7173bf06923c29f93c0308ac89e5 Author: Lad Prabhakar Date: Mon Sep 7 08:32:14 2020 +0100 arm64: dts: renesas: r8a774e1-hihope-rzg2h-ex: Enable sata Enable sata interface on HiHope RZ/G2H board. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20200907073214.13929-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f05f2c21187a58753e3754c27cf48f72610b37db Author: Taniya Das Date: Sat Aug 1 23:43:35 2020 +0530 arm64: dts: qcom: sc7180: Add LPASS clock controller nodes Update the clock controller nodes for Low power audio subsystem functionality. Reviewed-by: Douglas Anderson Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1596305615-5894-2-git-send-email-tdas@codeaurora.org Signed-off-by: Bjorn Andersson commit d210a0023590dbebb2f547d1ca3fc845b223430a Author: Mauro Carvalho Chehab Date: Thu Sep 10 08:00:13 2020 +0200 misc: hisi_hikey_usb: add support for Hikey 970 The HiKey 970 board is similar to Hikey 960 with regards to its USB configutation: it also relies on a USB HUB that is used when DWC3 is at host mode. However, it requires a few extra DT settings, as it uses a voltage regulator and GPIO reset pin. Add support for them. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/62843df9927b4d8dac5dc7c4a189567fa52ab2bb.1599717402.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7a6ff4c4cbc3570a1ae483a833b3fb12b1a56a9d Author: Yu Chen Date: Thu Sep 10 08:00:12 2020 +0200 misc: hisi_hikey_usb: Driver to support onboard USB gpio hub on Hikey960 The HiKey960 has a fairly complex USB configuration due to it needing to support a USB-C port for host/device mode and multiple USB-A ports in host mode, all using a single USB controller. See schematics here: https://github.com/96boards/documentation/raw/master/consumer/hikey/hikey960/hardware-docs/HiKey960_Schematics.pdf This driver acts as a usb-role-switch intermediary, intercepting the role switch notifications from the tcpm code, and passing them on to the dwc3 core. In doing so, it also controls the onboard hub and power gpios in order to properly route the data lines between the USB-C port and the onboard hub to the USB-A ports. Signed-off-by: Yu Chen [jstultz: Major rework to make the driver a usb-role-switch intermediary] Signed-off-by: John Stultz Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/c263f72e1d803c18c45a69ce2c333e79a7ed89ff.1599717402.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2bc20f3c8487bd5bc4dd9ad2c06d2ba05fd4e838 Author: Stephen Boyd Date: Fri Jul 24 14:17:11 2020 -0700 soc: qcom: rpmh-rsc: Sleep waiting for tcs slots to be free The busy loop in rpmh_rsc_send_data() is written with the assumption that the udelay will be preempted by the tcs_tx_done() irq handler when the TCS slots are all full. This doesn't hold true when the calling thread is an irqthread and the tcs_tx_done() irq is also an irqthread. That's because kernel irqthreads are SCHED_FIFO and thus need to voluntarily give up priority by calling into the scheduler so that other threads can run. I see RCU stalls when I boot with irqthreads on the kernel commandline because the modem remoteproc driver is trying to send an rpmh async message from an irqthread that needs to give up the CPU for the rpmh irqthread to run and clear out tcs slots. rcu: INFO: rcu_preempt self-detected stall on CPU rcu: 0-....: (1 GPs behind) idle=402/1/0x4000000000000002 softirq=2108/2109 fqs=4920 (t=21016 jiffies g=2933 q=590) Task dump for CPU 0: irq/11-smp2p R running task 0 148 2 0x00000028 Call trace: dump_backtrace+0x0/0x154 show_stack+0x20/0x2c sched_show_task+0xfc/0x108 dump_cpu_task+0x44/0x50 rcu_dump_cpu_stacks+0xa4/0xf8 rcu_sched_clock_irq+0x7dc/0xaa8 update_process_times+0x30/0x54 tick_sched_handle+0x50/0x64 tick_sched_timer+0x4c/0x8c __hrtimer_run_queues+0x21c/0x36c hrtimer_interrupt+0xf0/0x22c arch_timer_handler_phys+0x40/0x50 handle_percpu_devid_irq+0x114/0x25c __handle_domain_irq+0x84/0xc4 gic_handle_irq+0xd0/0x178 el1_irq+0xbc/0x180 save_return_addr+0x18/0x28 return_address+0x54/0x88 preempt_count_sub+0x40/0x88 _raw_spin_unlock_irqrestore+0x4c/0x6c ___ratelimit+0xd0/0x128 rpmh_rsc_send_data+0x24c/0x378 __rpmh_write+0x1b0/0x208 rpmh_write_async+0x90/0xbc rpmhpd_send_corner+0x60/0x8c rpmhpd_aggregate_corner+0x8c/0x124 rpmhpd_set_performance_state+0x8c/0xbc _genpd_set_performance_state+0xdc/0x1b8 dev_pm_genpd_set_performance_state+0xb8/0xf8 q6v5_pds_disable+0x34/0x60 [qcom_q6v5_mss] qcom_msa_handover+0x38/0x44 [qcom_q6v5_mss] q6v5_handover_interrupt+0x24/0x3c [qcom_q6v5] handle_nested_irq+0xd0/0x138 qcom_smp2p_intr+0x188/0x200 irq_thread_fn+0x2c/0x70 irq_thread+0xfc/0x14c kthread+0x11c/0x12c ret_from_fork+0x10/0x18 This busy loop naturally lends itself to using a wait queue so that each thread that tries to send a message will sleep waiting on the waitqueue and only be woken up when a free slot is available. This should make things more predictable too because the scheduler will be able to sleep tasks that are waiting on a free tcs instead of the busy loop we currently have today. Reviewed-by: Maulik Shah Reviewed-by: Douglas Anderson Tested-by: Stanimir Varbanov Cc: Douglas Anderson Cc: Maulik Shah Cc: Lina Iyer Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200724211711.810009-1-sboyd@kernel.org Signed-off-by: Bjorn Andersson commit b08892556b3f19d95d356b33692247de8303fe05 Author: Yoshihiro Shimoda Date: Thu Sep 10 21:02:49 2020 +0900 dt-bindings: arm: renesas: Document Renesas Falcon boards Add device tree bindings documentation for Renesas R-Car V3U Falcon CPU and BreakOut boards. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599739372-30669-2-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 461cb5952e35255265df64020344ceaf3d888263 Author: Yoshihiro Shimoda Date: Mon Sep 7 18:19:41 2020 +0900 dt-bindings: reset: renesas,rst: Document r8a779a0 reset module Document bindings for the R-Car V3U (R8A779A0) reset module. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599470390-29719-6-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 2e95492de6d9a289a7c246d8c2f66fc2b53b2b00 Author: Yoshihiro Shimoda Date: Mon Sep 7 18:19:39 2020 +0900 dt-bindings: power: renesas,rcar-sysc: Document r8a779a0 SYSC bindings Document bindings for the R-Car V3U (aka R8A779A0) SYSC block. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599470390-29719-4-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit d00451c8118f8f7ab8e057bc6ee2f8b7d70b6a1c Author: Kees Cook Date: Wed Sep 9 14:17:00 2020 -0700 selftests/lkdtm: Use "comm" instead of "diff" for dmesg Instead of full GNU diff (which smaller boot environments may not have), use "comm" which is more available. Reported-by: Naresh Kamboju Cc: linux-kselftest@vger.kernel.org Fixes: f131d9edc29d ("selftests/lkdtm: Don't clear dmesg when running tests") Signed-off-by: Kees Cook Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20200909211700.2399399-1-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 0feea33d79825d05b5ede30947db4df34722b463 Author: Douglas Anderson Date: Wed Jul 22 15:01:20 2020 -0700 soc: qcom-geni-se: Don't use relaxed writes when writing commands Writing the command is the final step in kicking off a transfer. Let's use writel() to ensure that any other memory accesses are done before the command kicks off. It's expected that this is mostly relevant if we're in DMA mode but since it doesn't appear to regress performance in a measurable way [1] even in PIO mode and it's easier to reason about then let's just always use it. NOTE: this patch came about due to code inspection. No actual problems were observed that this patch fixes. [1] Tested by timing "flashrom -p ec" on a Chromebook which stresses GENI SPI a lot. Reviewed-by: Mukesh Kumar Savaliya Reviewed-by: Akash Asthana Reviewed-by: Stephen Boyd Suggested-by: Stephen Boyd Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200722150113.1.Ia50ab5cb8a6d3a73d302e6bdc25542d48ffd27f4@changeid Signed-off-by: Bjorn Andersson commit cb8aed7b92f3cf74007a07c17bb08e6488661ae9 Author: Douglas Anderson Date: Thu Aug 13 08:03:52 2020 -0700 soc: qcom: socinfo: add SC7180 entry to soc_id array Add an entry for SC7180 SoC. Reviewed-by: Sai Prakash Ranjan Reviewed-by: Stephen Boyd Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200813080345.1.I85bb28f9ea3fa3bf797ecaf0a5218ced4cfaa6e2@changeid Signed-off-by: Bjorn Andersson commit 3cc006b395e267b03d42758d6c7c1d03ed7c78d0 Author: Yoshihiro Shimoda Date: Mon Sep 7 18:19:37 2020 +0900 dt-bindings: arm: renesas: Document R-Car V3U SoC DT bindings Add device tree bindings documentation for Renesas R-Car V3U (r8a779a0). Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599470390-29719-2-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 7303fbd2f07e529becfe6c22bd95978009f7bda3 Author: Kathiravan T Date: Mon Aug 17 12:00:30 2020 +0530 soc: qcom: socinfo: add soc id for IPQ6018 Add the SoC ID for IPQ6018 variant. Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1597645830-30409-1-git-send-email-kathirav@codeaurora.org Signed-off-by: Bjorn Andersson commit 5ff4aa70bf347e13ec87697b1c732ce86060c47d Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:54 2020 +0200 docs: submitting-patches: use :doc: for references There are two broken references at submitting-patches.rst: Documentation/process/submitting-patches.rst:240: WARNING: undefined label: security-bugs (if the link has no caption the label must precede a section header) Documentation/process/submitting-patches.rst:336: WARNING: undefined label: documentation/process/email-clients.rst (if the link has no caption the label must precede a section header) Those are due to some recent renames and file moves. It turns that maintaining :ref: is currently harder than using :doc:, as we now have a script to help checking such references. So, replace :ref: to :doc: there, making them to point to the current file name. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/3ba405f579cf35ef2b39dd210d8ad46adc79f0ad.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit b899353d221f9f542977dc66fdd4eba269abd26a Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:51 2020 +0200 docs: dma-buf: fix some warnings Fix those warnings: Documentation/driver-api/dma-buf.rst:182: WARNING: Title underline too short. Indefinite DMA Fences ~~~~~~~~~~~~~~~~~~~~ Documentation/driver-api/dma-buf.rst:88: WARNING: Unknown target name: "fence poll support". The first one is due to a shorter markup. The second one is because the chapter name was wrong. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/b2bc0bc88eb913635cfece13cc9f6eff7668d333.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 001e92922cbe6eb5c11fc94542a8e71c2fb56a42 Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:50 2020 +0200 docs: soundwire: fix some identation at stream.rst Currently, sphinx emits one warning on this file: Documentation/driver-api/soundwire/stream.rst:522: WARNING: Block quote ends without a blank line; unexpected unindent. That's due to some extra spaces before the title of a chapter. Yet, the list afterwards is missing identation. So, address both issues. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/eddde9f8d121e27d7968b3d747064e16de8bec4f.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 3c97f03e888ac7aa368c9d88e0356dcc57bacfcb Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:48 2020 +0200 docs: kvm: api.rst: add missing spaces There are some warnings: Documentation/virt/kvm/api.rst:4354: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/virt/kvm/api.rst:4358: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/virt/kvm/api.rst:4363: WARNING: Definition list ends without a blank line; unexpected unindent. Produced by the lack of identation on a single line. That caused the literal block to end prematurely. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/b6b3679b6c2329dc9b16d397c289b5ade0184c63.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 50f32634f85355ddc3ab1028a93bf6ccbb3a25bd Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:47 2020 +0200 docs: watch_queue: fix some warnings Fix those warnings: Documentation/watch_queue.rst:108: WARNING: Inline literal start-string without end-string. Documentation/watch_queue.rst:108: WARNING: Inline emphasis start-string without end-string. Documentation/watch_queue.rst:108: WARNING: Inline emphasis start-string without end-string. Documentation/watch_queue.rst:108: WARNING: Inline emphasis start-string without end-string. Documentation/watch_queue.rst:185: WARNING: Inline literal start-string without end-string. Documentation/watch_queue.rst:185: WARNING: Inline emphasis start-string without end-string. Documentation/watch_queue.rst:184: WARNING: Inline emphasis start-string without end-string. The problem here is that the ``notation`` doesn't accept multi lines. So, replace it to a code block using: :: notation Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/42706310c09a6b4588a1a41078207246ad1238fa.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 4d05e3a0f53ae66d596441961b68ab1aa5ab4640 Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:45 2020 +0200 docs: add some new files to their respective index.rst files There were some new file additions for Kernel 5.7 and 5.8 that weren't added at the corresponding index file. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9fd4d04f0d122ff38b5342a0098d99cc2f546652.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit c9a6bef24e6d70a8293d0d84165a634ae5bf3982 Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:43 2020 +0200 scripts: device_attr_show.cocci: update location of sysfs doc sysfs.txt was converted and renamed to sysfs.rst. Update device_attr_show.cocci script accordingly. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/048ed24b09aefa0051d76396d6250e35e6ba035c.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 51652804d018afd73a1168f6fa91d3d1aba76838 Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:38 2020 +0200 MAINTAINERS: fix location of qlogic/LICENSE.qla3xxx ethernet/qlogic/LICENSE.qla3xxx -> qlogic/LICENSE.qla3xxx Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4260c56b52dd269716f78c5f4369a14994014480.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 7f9a2357c400c2ccf83bb6c9eea9ad3d35410a62 Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:37 2020 +0200 docs: trace: fix the location of kprobes.rst This patch was moved out of staging. Fixes: 2165b82fde82 ("docs: Move kprobes.rst from staging/ to trace/") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/a6d4c62e19ab1510789418a3a5ad42980cd7ae3a.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit e4e29e78c0cd2df32e56f22182d9346f59fff8dd Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:36 2020 +0200 docs: scheduler: fix the directory name on two files The name of the directory where the schedule docs are stored are wrong on those files. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/a32c2bba17aa69dc18670b7de1a3a35bfa1e1f88.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 5eb6b4b3e21612be735fe0305c27bfe2e7ab3224 Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:33 2020 +0200 kernel-doc: include line numbers for function prototypes This should solve bad error reports like this one: ./include/linux/iio/iio.h:0: WARNING: Unknown target name: "devm". Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/56eed0ba50cd726236acd12b11b55ce54854c5ea.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit f6236efced85b95752d2aec655d4a687dcabc04a Author: Mauro Carvalho Chehab Date: Wed Sep 9 16:10:32 2020 +0200 .gitignore: docs: ignore sphinx_*/ directories The default way of building documentation is to use Sphinx toolchain installed via pip, inside the Kernel tree main directory. That's what's recommended by: scripts/sphinx-pre-install As it usually provides a better version of this package than the one installed, specially on LTS distros. So, add the directories created by running the commands suggested by the script. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/ac4e23d556c7d95cb11d6d5c605f43e425b2c3c7.1599660067.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 70ff10d5e38fc1a3e57332ebe055a53425245482 Author: Manivannan Sadhasivam Date: Fri Sep 4 12:06:37 2020 +0530 arm64: dts: qcom: qrb5165-rb5: Add gpio-line-names for PM8150(B&L) Add gpio-line-names for the GPIO pins exposed by PM8150, PM8150B and PM8150L PMIC nodes. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200904063637.28632-7-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 6c6a6d81f586e0b953c76e9ebcef5c4d3b33c653 Author: Manivannan Sadhasivam Date: Fri Sep 4 12:06:36 2020 +0530 arm64: dts: qcom: qrb5165-rb5: Add gpio-line-names for TLMM block Add gpio-line-names property for QRB5165 RB5 board for naming all GPIOs exposed by TLMM block. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200904063637.28632-6-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit b5cbd84e499a714eec05da4722dc2c1aceca4daf Author: Manivannan Sadhasivam Date: Fri Sep 4 12:06:35 2020 +0530 arm64: dts: qcom: qrb5165-rb5: Add onboard LED support Only User4, WLAN and BT LEDs are added for now. These GPIOs are coming from PM8150. Rest are coming from LPG block which is not supported yet! Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200904063637.28632-5-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit b1d2674e612119639842c91b70d25cd17480511f Author: Manivannan Sadhasivam Date: Fri Sep 4 12:06:34 2020 +0530 arm64: dts: qcom: Add basic devicetree support for QRB5165 RB5 Add basic devicetree support for Qualcomm Technologies, Inc. Robotics RB5 platform. This board is one of the 96Boards CE platform targeted for Robotics usecases from Qualcomm. This basic devicetree support includes regulators, onboard debug UART, I2C, SPI, and UFS support. Co-developed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200904063637.28632-4-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit bb1dfb4da1d031380cd631dd0d6884d4e79a8d51 Author: Manivannan Sadhasivam Date: Fri Sep 4 12:06:33 2020 +0530 arm64: dts: qcom: sm8250: Rename UART2 node to UART12 The UART12 node has been mistakenly mentioned as UART2. Let's fix that for both SM8250 SoC and MTP board and also add pinctrl definition for it. Fixes: 60378f1a171e ("arm64: dts: qcom: sm8250: Add sm8250 dts file") Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200904063637.28632-3-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 77e4907fa620af102f4571d4edb0dcc95b4fa083 Author: Dan Carpenter Date: Thu Sep 10 13:08:05 2020 +0300 thunderbolt: debugfs: Fix uninitialized return in counters_write() If the first line is in an invalid format then the "ret" value is uninitialized. We should return -EINVAL instead. Fixes: 54e418106c76 ("thunderbolt: Add debugfs interface") Signed-off-by: Dan Carpenter Signed-off-by: Mika Westerberg commit 152a1b4c3e7c16fe8ea9a3171fcb29c5ce030ebb Author: Manivannan Sadhasivam Date: Fri Sep 4 12:06:32 2020 +0530 dt-bindings: arm: qcom: Document SM8250 SoC and boards Document the SM8250 SoC binding and also the boards using it. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200904063637.28632-2-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 0de7511695680425aa1e6e1e1c7a7c24e6250491 Author: Bartosz Golaszewski Date: Wed Sep 9 20:02:48 2020 +0200 platform_device: switch to simpler IDA interface We don't need to specify any ranges when allocating IDs so we can switch to ida_alloc() and ida_free() instead of the ida_simple_ counterparts. ida_simple_get(ida, 0, 0, gfp) is equivalent to ida_alloc_range(ida, 0, UINT_MAX, gfp) which is equivalent to ida_alloc(ida, gfp). Note: IDR will never actually allocate an ID larger than INT_MAX. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200909180248.10093-1-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 0a4bb5e5507a585532cc413125b921c8546fc39f Author: Arvind Sankar Date: Mon Sep 7 17:39:19 2020 -0400 x86/fpu: Allow multiple bits in clearcpuid= parameter Commit 0c2a3913d6f5 ("x86/fpu: Parse clearcpuid= as early XSAVE argument") changed clearcpuid parsing from __setup() to cmdline_find_option(). While the __setup() function would have been called for each clearcpuid= parameter on the command line, cmdline_find_option() will only return the last one, so the change effectively made it impossible to disable more than one bit. Allow a comma-separated list of bit numbers as the argument for clearcpuid to allow multiple bits to be disabled again. Log the bits being disabled for informational purposes. Also fix the check on the return value of cmdline_find_option(). It returns -1 when the option is not found, so testing as a boolean is incorrect. Fixes: 0c2a3913d6f5 ("x86/fpu: Parse clearcpuid= as early XSAVE argument") Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907213919.2423441-1-nivedita@alum.mit.edu commit 0c7a6b91d2276b09ade6e09766600f809f5a529a Author: Stephen Boyd Date: Wed Sep 9 23:04:40 2020 -0700 driver core: platform: Document return type of more functions I can't always remember the return values of these functions, and so I usually jump to the function to read the kernel-doc and see that it doesn't tell me. Then I have to spend more time reading the code to jump to the function that actually tells me the return values. Let's document it here so that we don't all have to spend time digging through the code to understand the return values. Cc: Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200910060440.2302925-1-swboyd@chromium.org Signed-off-by: Greg Kroah-Hartman commit 4c42831b307838f8218f4f3ef0cf5a4349721ca9 Author: Krzysztof Kozlowski Date: Sun Sep 6 17:36:54 2020 +0200 arm64: defconfig: Enable Samsung S3FWRN5 NFC driver Enable the Samsung S3FWRN5 NFC driver present in Exynos5433-based TM2/TM2E boards. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200906153654.2925-10-krzk@kernel.org commit 192f1c6bc2d2dc59de6c39dc229156910fdf6fe8 Author: Xianting Tian Date: Thu Sep 10 14:15:06 2020 +0800 blkcg: add plugging support for punt bio The test and the explaination of the patch as bellow. Before test we added more debug code in blkg_async_bio_workfn(): int count = 0 if (bios.head && bios.head->bi_next) { need_plug = true; blk_start_plug(&plug); } while ((bio = bio_list_pop(&bios))) { /*io_punt is a sysctl user interface to control the print*/ if(io_punt) { printk("[%s:%d] bio start,size:%llu,%d count=%d plug?%d\n", current->comm, current->pid, bio->bi_iter.bi_sector, (bio->bi_iter.bi_size)>>9, count++, need_plug); } submit_bio(bio); } if (need_plug) blk_finish_plug(&plug); Steps that need to be set to trigger *PUNT* io before testing: mount -t btrfs -o compress=lzo /dev/sda6 /btrfs mount -t cgroup2 nodev /cgroup2 mkdir /cgroup2/cg3 echo "+io" > /cgroup2/cgroup.subtree_control echo "8:0 wbps=1048576000" > /cgroup2/cg3/io.max #1000M/s echo $$ > /cgroup2/cg3/cgroup.procs Then use dd command to test btrfs PUNT io in current shell: dd if=/dev/zero of=/btrfs/file bs=64K count=100000 Test hardware environment as below: [root@localhost btrfs]# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 32 On-line CPU(s) list: 0-31 Thread(s) per core: 2 Core(s) per socket: 8 Socket(s): 2 NUMA node(s): 2 Vendor ID: GenuineIntel With above debug code, test command and test environment, I did the tests under 3 different system loads, which are triggered by stress: 1, Run 64 threads by command "stress -c 64 &" [53615.975974] [kworker/u66:18:1490] bio start,size:45583056,8 count=0 plug?1 [53615.975980] [kworker/u66:18:1490] bio start,size:45583064,8 count=1 plug?1 [53615.975984] [kworker/u66:18:1490] bio start,size:45583072,8 count=2 plug?1 [53615.975987] [kworker/u66:18:1490] bio start,size:45583080,8 count=3 plug?1 [53615.975990] [kworker/u66:18:1490] bio start,size:45583088,8 count=4 plug?1 [53615.975993] [kworker/u66:18:1490] bio start,size:45583096,8 count=5 plug?1 ... ... [53615.977041] [kworker/u66:18:1490] bio start,size:45585480,8 count=303 plug?1 [53615.977044] [kworker/u66:18:1490] bio start,size:45585488,8 count=304 plug?1 [53615.977047] [kworker/u66:18:1490] bio start,size:45585496,8 count=305 plug?1 [53615.977050] [kworker/u66:18:1490] bio start,size:45585504,8 count=306 plug?1 [53615.977053] [kworker/u66:18:1490] bio start,size:45585512,8 count=307 plug?1 [53615.977056] [kworker/u66:18:1490] bio start,size:45585520,8 count=308 plug?1 [53615.977058] [kworker/u66:18:1490] bio start,size:45585528,8 count=309 plug?1 2, Run 32 threads by command "stress -c 32 &" [50586.290521] [kworker/u66:6:32351] bio start,size:45806496,8 count=0 plug?1 [50586.290526] [kworker/u66:6:32351] bio start,size:45806504,8 count=1 plug?1 [50586.290529] [kworker/u66:6:32351] bio start,size:45806512,8 count=2 plug?1 [50586.290531] [kworker/u66:6:32351] bio start,size:45806520,8 count=3 plug?1 [50586.290533] [kworker/u66:6:32351] bio start,size:45806528,8 count=4 plug?1 [50586.290535] [kworker/u66:6:32351] bio start,size:45806536,8 count=5 plug?1 ... ... [50586.299640] [kworker/u66:5:32350] bio start,size:45808576,8 count=252 plug?1 [50586.299643] [kworker/u66:5:32350] bio start,size:45808584,8 count=253 plug?1 [50586.299646] [kworker/u66:5:32350] bio start,size:45808592,8 count=254 plug?1 [50586.299649] [kworker/u66:5:32350] bio start,size:45808600,8 count=255 plug?1 [50586.299652] [kworker/u66:5:32350] bio start,size:45808608,8 count=256 plug?1 [50586.299663] [kworker/u66:5:32350] bio start,size:45808616,8 count=257 plug?1 [50586.299665] [kworker/u66:5:32350] bio start,size:45808624,8 count=258 plug?1 [50586.299668] [kworker/u66:5:32350] bio start,size:45808632,8 count=259 plug?1 3, Don't run thread by stress [50861.355246] [kworker/u66:19:32376] bio start,size:13544504,8 count=0 plug?0 [50861.355288] [kworker/u66:19:32376] bio start,size:13544512,8 count=0 plug?0 [50861.355322] [kworker/u66:19:32376] bio start,size:13544520,8 count=0 plug?0 [50861.355353] [kworker/u66:19:32376] bio start,size:13544528,8 count=0 plug?0 [50861.355392] [kworker/u66:19:32376] bio start,size:13544536,8 count=0 plug?0 [50861.355431] [kworker/u66:19:32376] bio start,size:13544544,8 count=0 plug?0 [50861.355468] [kworker/u66:19:32376] bio start,size:13544552,8 count=0 plug?0 [50861.355499] [kworker/u66:19:32376] bio start,size:13544560,8 count=0 plug?0 [50861.355532] [kworker/u66:19:32376] bio start,size:13544568,8 count=0 plug?0 [50861.355575] [kworker/u66:19:32376] bio start,size:13544576,8 count=0 plug?0 [50861.355618] [kworker/u66:19:32376] bio start,size:13544584,8 count=0 plug?0 [50861.355659] [kworker/u66:19:32376] bio start,size:13544592,8 count=0 plug?0 [50861.355740] [kworker/u66:0:32346] bio start,size:13544600,8 count=0 plug?1 [50861.355748] [kworker/u66:0:32346] bio start,size:13544608,8 count=1 plug?1 [50861.355962] [kworker/u66:2:32347] bio start,size:13544616,8 count=0 plug?0 [50861.356272] [kworker/u66:7:31962] bio start,size:13544624,8 count=0 plug?0 [50861.356446] [kworker/u66:7:31962] bio start,size:13544632,8 count=0 plug?0 [50861.356567] [kworker/u66:7:31962] bio start,size:13544640,8 count=0 plug?0 [50861.356707] [kworker/u66:19:32376] bio start,size:13544648,8 count=0 plug?0 [50861.356748] [kworker/u66:15:32355] bio start,size:13544656,8 count=0 plug?0 [50861.356825] [kworker/u66:17:31970] bio start,size:13544664,8 count=0 plug?0 Analysis of above 3 test results with different system load: >From above test, we can see more and more continuous bios can be plugged with system load increasing. When run "stress -c 64 &", 310 continuous bios are plugged; When run "stress -c 32 &", 260 continuous bios are plugged; When don't run stress, at most only 2 continuous bios are plugged, in most cases, bio_list only contains one single bio. How to explain above phenomenon: We know, in submit_bio(), if the bio is a REQ_CGROUP_PUNT io, it will queue a work to workqueue blkcg_punt_bio_wq. But when the workqueue is scheduled, it depends on the system load. When system load is low, the workqueue will be quickly scheduled, and the bio in bio_list will be quickly processed in blkg_async_bio_workfn(), so there is less chance that the same io submit thread can add multiple continuous bios to bio_list before workqueue is scheduled to run. The analysis aligned with above test "3". When system load is high, there is some delay before the workqueue can be scheduled to run, the higher the system load the greater the delay. So there is more chance that the same io submit thread can add multiple continuous bios to bio_list. Then when the workqueue is scheduled to run, there are more continuous bios in bio_list, which will be processed in blkg_async_bio_workfn(). The analysis aligned with above test "1" and "2". According to test, we can get io performance improved with the patch, especially when system load is higher. Another optimazition is to use the plug only when bio_list contains at least 2 bios. Signed-off-by: Xianting Tian Signed-off-by: Jens Axboe commit fdd056ff7af4111eb8cee1da0b2912c0d4b24fac Author: Rob Herring Date: Thu Aug 20 21:54:20 2020 -0600 PCI: dwc: Use DBI accessors Convert the remaining cases of register accesses using dbi_base rather than dw_pcie_(read|write)[bwl]_dbi accessors. Link: https://lore.kernel.org/r/20200821035420.380495-41-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Pratyush Anand Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org commit aeaa0bfe896547d3fb52533909a6ddef5c1191ba Author: Rob Herring Date: Thu Aug 20 21:54:19 2020 -0600 PCI: dwc: Move N_FTS setup to common setup The Designware controller has common registers to set number of fast training sequence ordered sets. The Artpec6, Intel, and Tegra driver initialize these register fields. Let's move the initialization to the common setup code and drivers just have to provide the value. There's a slight change in that the common clock mode N_FTS field is now initialized. Previously only the Intel driver set this. It's not clear from the code if common clock mode is used in the Artpec6 or Tegra driver. It depends on the DWC configuration. Given the field is not initialized while the others are, it seems unlikely common clock mode is used. Link: https://lore.kernel.org/r/20200821035420.380495-40-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jesper Nilsson Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org commit d439e7edd1343ead0150851ca78055858ee8b94e Author: Rob Herring Date: Thu Aug 20 21:54:18 2020 -0600 PCI: dwc/intel-gw: Drop unused max_width 'max_width' is read, but never used, so let's remove it. Link: https://lore.kernel.org/r/20200821035420.380495-39-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Dilip Kota Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit cf854be2d9a34665cbbd40d58409fc868ed476fc Author: Rob Herring Date: Thu Aug 20 21:54:17 2020 -0600 PCI: dwc/intel-gw: Move getting PCI_CAP_ID_EXP offset to intel_pcie_link_setup() The PCI_CAP_ID_EXP offset is only needed by intel_pcie_link_setup(), so let's retrieve it there and avoid storing the offset. Link: https://lore.kernel.org/r/20200821035420.380495-38-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Dilip Kota Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit b02b06a74b01a5e9d3fcbd76a5b748376d9e9ced Author: Rob Herring Date: Thu Aug 20 21:54:16 2020 -0600 PCI: dwc/intel-gw: Drop unnecessary checking of DT 'device_type' property A driver doesn't need to check for DT 'device_type' property, so let's remove the check. Link: https://lore.kernel.org/r/20200821035420.380495-37-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Dilip Kota Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 441e48fdf0b403218805b320d93de5caeafdcb1d Author: Rob Herring Date: Thu Aug 20 21:54:15 2020 -0600 PCI: dwc: Set PORT_LINK_DLL_LINK_EN in common setup code The Intel driver is the only one to set PORT_LINK_DLL_LINK_EN. The default value is set and it seems pretty certain that enabling link initialization is always required. Maybe it could just be dropped from the Intel driver, but lets move setting it into the common code to be sure. Link: https://lore.kernel.org/r/20200821035420.380495-36-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Dilip Kota Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 39bc5006501cc31987f4fc249c5ce07286b84768 Author: Rob Herring Date: Thu Aug 20 21:54:14 2020 -0600 PCI: dwc: Centralize link gen setting keystone would force gen2 if no DT property. Now it relies on the PCI_EXP_LNKCAP value. Link: https://lore.kernel.org/r/20200821035420.380495-35-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Richard Zhu Cc: Lucas Stach Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Murali Karicheri Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Stanimir Varbanov Cc: Andy Gross Cc: Bjorn Andersson Cc: Pratyush Anand Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Cc: linux-tegra@vger.kernel.org commit edea9e6bcbeaa41718b022a8b99ffddef2330bbc Author: Julien Thierry Date: Fri Sep 4 16:30:28 2020 +0100 objtool: Decode unwind hint register depending on architecture The set of registers that can be included in an unwind hint and their encoding will depend on the architecture. Have arch specific code to decode that register. Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit ee819aedf34a8f35cd54ee3967c7beb4d1d4a635 Author: Julien Thierry Date: Fri Sep 4 16:30:27 2020 +0100 objtool: Make unwind hint definitions available to other architectures Unwind hints are useful to provide objtool with information about stack states in non-standard functions/code. While the type of information being provided might be very arch specific, the mechanism to provide the information can be useful for other architectures. Move the relevant unwint hint definitions for all architectures to see. [ jpoimboe: REGS_IRET -> REGS_PARTIAL ] Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit 5567c6c39f3404e4492c18c0c1abff5556684f6e Author: Julien Thierry Date: Fri Sep 4 16:30:26 2020 +0100 objtool: Only include valid definitions depending on source file type Header include/linux/objtool.h contains both C and assembly definition that are visible regardless of the file including them. Place definition under conditional __ASSEMBLY__. Reviewed-by: Miroslav Benes Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit 00089c048eb4a8250325efb32a2724fd0da68cce Author: Julien Thierry Date: Fri Sep 4 16:30:25 2020 +0100 objtool: Rename frame.h -> objtool.h Header frame.h is getting more code annotations to help objtool analyze object files. Rename the file to objtool.h. [ jpoimboe: add objtool.h to MAINTAINERS ] Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit d871f7b5a6a2a30f4eba577fd56941fa3657e394 Author: Raphael Gault Date: Fri Sep 4 16:30:24 2020 +0100 objtool: Refactor jump table code to support other architectures The way to identify jump tables and retrieve all the data necessary to handle the different execution branches is not the same on all architectures. In order to be able to add other architecture support, define an arch-dependent function to process jump-tables. Reviewed-by: Miroslav Benes Signed-off-by: Raphael Gault [J.T.: Move arm64 bits out of this patch, Have only one function to find the start of the jump table, for now assume that the jump table format will be the same as x86] Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit 45245f51f9a4b9a883a8c94468473c1de9b88153 Author: Julien Thierry Date: Fri Sep 4 16:30:23 2020 +0100 objtool: Make relocation in alternative handling arch dependent As pointed out by the comment in handle_group_alt(), support of relocation for instructions in an alternative group depends on whether arch specific kernel code handles it. So, let objtool arch specific code decide whether a relocation for the alternative section should be accepted. Reviewed-by: Miroslav Benes Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit eda3dc905834dc9c99132f987f77b68cf53a8682 Author: Julien Thierry Date: Fri Sep 4 16:30:22 2020 +0100 objtool: Abstract alternative special case handling Some alternatives associated with a specific feature need to be treated in a special way. Since the features and how to treat them vary from one architecture to another, move the special case handling to arch specific code. Reviewed-by: Miroslav Benes Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit c8ea0d672521ef663f0f9a77faa94d0d47102d77 Author: Julien Thierry Date: Fri Sep 4 16:30:21 2020 +0100 objtool: Move macros describing structures to arch-dependent code Some macros are defined to describe the size and layout of structures exception_table_entry, jump_entry and alt_instr. These values can vary from one architecture to another. Have the values be defined by arch specific code. Suggested-by: Raphael Gault Reviewed-by: Miroslav Benes Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit bb090fdb70ecc51c91e1d86345adae064caa06c8 Author: Julien Thierry Date: Fri Sep 4 16:30:20 2020 +0100 objtool: Make sync-check consider the target architecture Do not take into account outdated headers unrelated to the build of the current architecture. [ jpoimboe: use $SRCARCH directly ] Reviewed-by: Miroslav Benes Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit 3890b8d92710af75baedf291832cf40193b33454 Author: Julien Thierry Date: Fri Sep 4 16:30:19 2020 +0100 objtool: Group headers to check in a single list In order to support multiple architectures and potentially different sets of headers to compare against their kernel equivalent, it is simpler to have all headers to check in a single list. Reviewed-by: Miroslav Benes Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit b92b53079aedbfb56bbb9ea360e5119fb563a2a1 Author: Christoph Hellwig Date: Tue Sep 8 16:53:47 2020 +0200 block: remove check_disk_change Remove the now unused check_disk_change helper. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 38a2b557e23874dd5ed3c767d57d28b2d10b7683 Author: Christoph Hellwig Date: Tue Sep 8 16:53:46 2020 +0200 sr: simplify sr_block_revalidate_disk Both callers have a valid CD struture available, so rely on that instead of getting another reference. Also move the function to avoid a forward declaration. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit afd35c4f573d7eb1df9dbb7e0af0f4d93bd01f31 Author: Christoph Hellwig Date: Tue Sep 8 16:53:45 2020 +0200 sr: use bdev_check_media_change Switch to use bdev_check_media_change instead of check_disk_change and call sr_block_revalidate_disk manually. Also add an explicit call to sr_block_revalidate_disk just before disk_add() to ensure we always read check for a ready unit and read the TOC and then stop wiring up ->revalidate_disk. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 471bd0af544bcd80450d61659a1ffabdd1820d7d Author: Christoph Hellwig Date: Tue Sep 8 16:53:44 2020 +0200 sd: use bdev_check_media_change Switch to use bdev_check_media_change instead of check_disk_change and call sd_revalidate_disk manually. As sd also calls sd_revalidate_disk manually during probe and open, the extra call into ->revalidate_disk from bdev_disk_changed is not required either, so stop wiring up the method. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 818077d6e0125b4a7b728457b60b5d89e02a0ce1 Author: Christoph Hellwig Date: Tue Sep 8 16:53:43 2020 +0200 md: use bdev_check_media_change The md driver does not have a ->revalidate_disk method, so it can just use bdev_check_media_change without any additional changes. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Acked-by: Song Liu Signed-off-by: Jens Axboe commit fec2cf607ba9305770436b1e5c485963a9f0a7bd Author: Christoph Hellwig Date: Tue Sep 8 16:53:42 2020 +0200 ide-gd: stop using the disk events mechanism ide-gd is only using the disk events mechanism to be able to force an invalidation and partition scan on opening removable media. Just open code the logic without invoving the block layer. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit a367e440e15c19f5694186dda9dd8a0f9eeb0c9f Author: Christoph Hellwig Date: Tue Sep 8 16:53:41 2020 +0200 ide-cd: remove idecd_revalidate_disk Just merge the trivial function into its only caller. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit a22be69d5354c63d379cf7ecdbf3eef257f14512 Author: Christoph Hellwig Date: Tue Sep 8 16:53:40 2020 +0200 ide-cd: use bdev_check_media_changed Switch to use bdev_check_media_changed instead of check_disk_change and call idecd_revalidate_disk manually. Given that idecd_revalidate_disk only re-reads the TOC, and we already do the same at probe time, the extra call into ->revalidate_disk from bdev_disk_changed is not required either, so stop wiring up the method. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit faf041388c28e93be9644985d2da63f82b6f7233 Author: Christoph Hellwig Date: Tue Sep 8 16:53:39 2020 +0200 gdrom: use bdev_check_media_change The Sega GD-ROM driver does not have a ->revalidate_disk method, so it can just use bdev_check_media_change without any additional changes. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 1570d14f6713d07716861dea1bb4739df37056d5 Author: Christoph Hellwig Date: Tue Sep 8 16:53:38 2020 +0200 paride/pcd: use bdev_check_media_change The pcd driver does not have a ->revalidate_disk method, so it can just use bdev_check_media_change without any additional changes. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 77f93bfd0cc2e659d7135b4afcd5d0a070515bbf Author: Christoph Hellwig Date: Tue Sep 8 16:53:37 2020 +0200 xsysace: simplify media change handling Pass a struct ace_device to ace_revalidate_disk, move the media changed check into the one caller that needs it, and give the routine a better name. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit f094225bfcd6fc5c093e128ec0adb7a522b38b69 Author: Christoph Hellwig Date: Tue Sep 8 16:53:36 2020 +0200 xsysace: use bdev_check_media_change Switch to use bdev_check_media_change instead of check_disk_change and call ace_revalidate_disk manually. Given that ace_revalidate_disk only deals with media change events, the extra call into ->revalidate_disk from bdev_disk_changed is not required either, so stop wiring up the method. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 3dcbad297b9976394190ee40913b53e50e9c83f2 Author: Christoph Hellwig Date: Tue Sep 8 16:53:35 2020 +0200 swim3: use bdev_check_media_changed Switch to use bdev_check_media_changed instead of check_disk_change and call floppy_revalidate manually. Given that floppy_revalidate only deals with media change events, the extra call into ->revalidate_disk from bdev_disk_changed is not required either, so stop wiring up the method. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 433d21ce313e93200cd0938aa717639c8098d45f Author: Christoph Hellwig Date: Tue Sep 8 16:53:34 2020 +0200 swim: simplify media change handling floppy_revalidate mostly duplicates work already done in floppy_open despite only beeing called from floppy_open. Remove the function and just clear the ->ejected flag directly under the right condition. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 7fe76fc04bd1b551b8c712249c921facfd98a11b Author: Christoph Hellwig Date: Tue Sep 8 16:53:33 2020 +0200 swim: use bdev_check_media_change Switch to use bdev_check_media_change instead of check_disk_change and call floppy_revalidate manually. Given that floppy_revalidate only deals with media change events, the extra call into ->revalidate_disk from bdev_disk_changed is not required either, so stop wiring up the method. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 4a6f3d480edc3570a8059f3a0fb388641b6ec73f Author: Christoph Hellwig Date: Tue Sep 8 16:53:32 2020 +0200 floppy: use bdev_check_media_change Switch to use bdev_check_media_change instead of check_disk_change and call floppy_revalidate manually. Given that floppy_revalidate only deals with media change events, the extra call into ->revalidate_disk from bdev_disk_changed is not required either, so stop wiring up the method. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 22f97164ef233fe68948b1c99dc8e6077c39c2af Author: Christoph Hellwig Date: Tue Sep 8 16:53:31 2020 +0200 ataflop: use bdev_check_media_change Switch to use bdev_check_media_change instead of check_disk_change and call floppy_revalidate manually. Given that floppy_revalidate only deals with media change events, the extra call into ->revalidate_disk from bdev_disk_changed is not required either, so stop wiring up the method. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit acdfd443b32036e9040d7413fd9c64d8da267868 Author: Christoph Hellwig Date: Tue Sep 8 16:53:30 2020 +0200 amiflop: use bdev_check_media_change The Amiga floppy driver does not have a ->revalidate_disk method, so it can just use bdev_check_media_change without any additional changes. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 95f6f3a46fc4ee1a2b216a6b46bdf2b450f1877f Author: Christoph Hellwig Date: Tue Sep 8 16:53:29 2020 +0200 block: add a bdev_check_media_change helper Like check_disk_changed, except that it does not call ->revalidate_disk but leaves that to the caller. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 14284fedf59f1647264f4603d64418cf1fcd3eb0 Author: Matthew Wilcox (Oracle) Date: Thu Sep 10 08:26:18 2020 -0700 iomap: Mark read blocks uptodate in write_begin When bringing (portions of) a page uptodate, we were marking blocks that were zeroed as being uptodate, but not blocks that were read from storage. Like the previous commit, this problem was found with generic/127 and a kernel which failed readahead I/Os. This bug causes writes to be silently lost when working with flaky storage. Fixes: 9dc55f1389f9 ("iomap: add support for sub-pagesize buffered I/O without buffer heads") Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e6e7ca92623a43156100306861272e04d46385fc Author: Matthew Wilcox (Oracle) Date: Thu Sep 10 08:26:17 2020 -0700 iomap: Clear page error before beginning a write If we find a page in write_begin which is !Uptodate, we need to clear any error on the page before starting to read data into it. This matches how filemap_fault(), do_read_cache_page() and generic_file_buffered_read() handle PageError on !Uptodate pages. When calling iomap_set_range_uptodate() in __iomap_write_begin(), blocks were not being marked as uptodate. This was found with generic/127 and a specially modified kernel which would fail (some) readahead I/Os. The test read some bytes in a prior page which caused readahead to extend into page 0x34. There was a subsequent write to page 0x34, followed by a read to page 0x34. Because the blocks were still marked as !Uptodate, the read caused all blocks to be re-read, overwriting the write. With this change, and the next one, the bytes which were written are marked as being Uptodate, so even though the page is still marked as !Uptodate, the blocks containing the written data are not re-read from storage. Fixes: 9dc55f1389f9 ("iomap: add support for sub-pagesize buffered I/O without buffer heads") Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit c114bbc6c423a449a00780d2d6633432c0a0505f Author: Andreas Gruenbacher Date: Thu Sep 10 08:26:16 2020 -0700 iomap: Fix direct I/O write consistency check When a direct I/O write falls back to buffered I/O entirely, dio->size will be 0 in iomap_dio_complete. Function invalidate_inode_pages2_range will try to invalidate the rest of the address space. If there are any dirty pages in that range, the write will fail and a "Page cache invalidation failure on direct I/O" error will be logged. On gfs2, this can be reproduced as follows: xfs_io \ -c "open -ft foo" -c "pwrite 4k 4k" -c "close" \ -c "open -d foo" -c "pwrite 0 4k" Fix this by recognizing 0-length writes. Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a805c111650cdba6ee880f528abdd03c1af82089 Author: Qian Cai Date: Thu Sep 10 08:26:15 2020 -0700 iomap: fix WARN_ON_ONCE() from unprivileged users It is trivial to trigger a WARN_ON_ONCE(1) in iomap_dio_actor() by unprivileged users which would taint the kernel, or worse - panic if panic_on_warn or panic_on_taint is set. Hence, just convert it to pr_warn_ratelimited() to let users know their workloads are racing. Thank Dave Chinner for the initial analysis of the racing reproducers. Signed-off-by: Qian Cai Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8e9529f5cde7c99a0c528d96c600b5affad71908 Author: Yoshihiro Shimoda Date: Mon Sep 7 18:19:47 2020 +0900 soc: renesas: rcar-rst: Add support for R-Car V3U Add support for R-Car V3U (R8A779A0) to the R-Car RST driver. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599470390-29719-12-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 090e87e7fbe3b13f14f0fd648aceac9c28d42c18 Author: Yoshihiro Shimoda Date: Mon Sep 7 18:19:45 2020 +0900 soc: renesas: Identify R-Car V3U Add support for identifying the R-Car V3U (R8A779A0) SoC. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599470390-29719-10-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 6d5aded8d57fc0323ee61fec7a3318d8222e85ed Author: Kuninori Morimoto Date: Mon Sep 7 08:51:15 2020 +0900 soc: renesas: Sort driver description title This patch sorts each driver by description title in alphabetical order. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a6y2v54o.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 8fae675850900e2032075b67f498cfe586fa23ad Author: Kuninori Morimoto Date: Mon Sep 7 08:51:10 2020 +0900 soc: renesas: Use ARM32/ARM64 for menu description For easy understanding of architecture and alphabetical merging, this patch uses ARM32/ARM64 for description. This prepares for sorting the menu. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87bliiv54u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit fa2d185f7518423ffcdba617ad09ff77ac51f198 Author: Yoshihiro Shimoda Date: Wed Sep 9 22:13:28 2020 +0900 dt-bindings: clock: Add r8a779a0 CPG Core Clock Definitions Add all Clock Pulse Generator Core Clock Outputs for the Renesas R-Car V3U (R8A779A0) SoC. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599657211-17504-2-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit c2ff0810934a925c9e6d96d7c400dee9bef8808e Author: Yoshihiro Shimoda Date: Mon Sep 7 18:19:40 2020 +0900 dt-bindings: power: Add r8a779a0 SYSC power domain definitions Add power domain indices for R-Car V3U (r8a779a0). Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1599470390-29719-5-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 8366f0d268c20929d82d4b1407bd4c6f9232bdec Author: Jiri Olsa Date: Thu Aug 27 21:32:01 2020 +0200 perf tests: Call test_attr__open() directly There's no longer need to call test_attr__open() from sys_perf_event_open(), because both 'perf record' and 'perf stat' call evsel__open_cpu(), so we can call it directly from there and not polute the perf-sys.h header. Committer testing: Before and after: # perf test attr 17: Setup struct perf_event_attr : Ok 49: Synthesize attr update : Ok # perf test -v attr 17: Setup struct perf_event_attr : --- start --- test child forked, pid 2170868 running '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-any_ret' unsupp '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-any_ret' running '/home/acme/libexec/perf-core/tests/attr/test-record-C0' running '/home/acme/libexec/perf-core/tests/attr/test-record-graph-fp' running '/home/acme/libexec/perf-core/tests/attr/test-record-period' running '/home/acme/libexec/perf-core/tests/attr/test-record-group-sampling' running '/home/acme/libexec/perf-core/tests/attr/test-record-freq' running '/home/acme/libexec/perf-core/tests/attr/test-stat-detailed-3' running '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-k' unsupp '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-k' running '/home/acme/libexec/perf-core/tests/attr/test-stat-group1' running '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-u' unsupp '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-u' running '/home/acme/libexec/perf-core/tests/attr/test-stat-basic' running '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-any_call' unsupp '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-any_call' running '/home/acme/libexec/perf-core/tests/attr/test-stat-default' running '/home/acme/libexec/perf-core/tests/attr/test-record-graph-dwarf' running '/home/acme/libexec/perf-core/tests/attr/test-record-no-buffering' running '/home/acme/libexec/perf-core/tests/attr/test-record-raw' running '/home/acme/libexec/perf-core/tests/attr/test-stat-detailed-2' running '/home/acme/libexec/perf-core/tests/attr/test-record-count' running '/home/acme/libexec/perf-core/tests/attr/test-record-data' running '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-any' unsupp '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-any' running '/home/acme/libexec/perf-core/tests/attr/test-stat-group' running '/home/acme/libexec/perf-core/tests/attr/test-record-branch-any' unsupp '/home/acme/libexec/perf-core/tests/attr/test-record-branch-any' running '/home/acme/libexec/perf-core/tests/attr/test-record-graph-default' running '/home/acme/libexec/perf-core/tests/attr/test-record-no-samples' running '/home/acme/libexec/perf-core/tests/attr/test-stat-C0' running '/home/acme/libexec/perf-core/tests/attr/test-record-no-inherit' running '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-ind_call' unsupp '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-ind_call' running '/home/acme/libexec/perf-core/tests/attr/test-record-basic' running '/home/acme/libexec/perf-core/tests/attr/test-record-group1' running '/home/acme/libexec/perf-core/tests/attr/test-record-pfm-period' unsupp '/home/acme/libexec/perf-core/tests/attr/test-record-pfm-period' running '/home/acme/libexec/perf-core/tests/attr/test-stat-detailed-1' running '/home/acme/libexec/perf-core/tests/attr/test-stat-no-inherit' running '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-hv' unsupp '/home/acme/libexec/perf-core/tests/attr/test-record-branch-filter-hv' running '/home/acme/libexec/perf-core/tests/attr/test-record-group' test child finished with 0 ---- end ---- Setup struct perf_event_attr: Ok 49: Synthesize attr update : --- start --- test child forked, pid 2171004 test child finished with 0 ---- end ---- Synthesize attr update: Ok # Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200827193201.GB127372@krava Signed-off-by: Arnaldo Carvalho de Melo commit b51e627158cb0f67569aa46b5a08b568d20a81a4 Author: Andy Shevchenko Date: Wed Sep 2 20:31:05 2020 +0300 swiotlb: Mark max_segment with static keyword Sparse is not happy about max_segment declaration: CHECK kernel/dma/swiotlb.c kernel/dma/swiotlb.c:96:14: warning: symbol 'max_segment' was not declared. Should it be static? Mark it static as suggested. Signed-off-by: Andy Shevchenko Signed-off-by: Konrad Rzeszutek Wilk commit 61b82bbf693ecd307550ee64a8af192e8e33c46c Author: Andy Shevchenko Date: Wed Sep 2 20:31:04 2020 +0300 swiotlb: Declare swiotlb_late_init_with_default_size() in header Compiler is not happy about one function prototype: CC kernel/dma/swiotlb.o kernel/dma/swiotlb.c:275:1: warning: no previous prototype for ‘swiotlb_late_init_with_default_size’ [-Wmissing-prototypes] 275 | swiotlb_late_init_with_default_size(size_t default_size) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Since it's used outside of the module, move its declaration to the header from the user. Signed-off-by: Andy Shevchenko Signed-off-by: Konrad Rzeszutek Wilk commit 4db7b6aacc573b89227a1b5960af9d2a17f17762 Author: Andy Shevchenko Date: Wed Sep 2 10:31:03 2020 -0700 swiotlb: Use %pa to print phys_addr_t variables There is an extension to a %p to print phys_addr_t type of variables. Use it here. Signed-off-by: Andy Shevchenko Reviewed-by: Fabio Estevam Signed-off-by: Konrad Rzeszutek Wilk commit 166774a2c2c6b82da5d984f587567071ff00c1f3 Author: Maarten Lankhorst Date: Thu Sep 10 13:12:25 2020 +0200 drm/i915: Fix slightly botched merge in __reloc_entry_gpu This function should be an int, not a bool. Presumably because we had the same 2 reverts in a slightly different way, git got confused. Thanks to Dan for reporting. :) The conflict is between the 3 reverts in drm-fixes: 4993a8a37808 ("Revert "drm/i915: Remove i915_gem_object_get_dirty_page()"") ad5d95e4d538 ("Revert "drm/i915/gem: Async GPU relocations only"") 20561da3a2e1 ("Revert "drm/i915/gem: Delete unused code"") And the slightly different combined revert in drm-intel-gt-next, but with the same goal: 102a0a9051f4 ("Revert "drm/i915/gem: Async GPU relocations only"") In the merge commit 1f4b2aca794f ("Merge tag 'drm-intel-gt-next-2020-09-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-next") things went wrong, but the merge commit view now doesn't show any conflict anymore (as git tends to do when the resolution picks one or the other branch). The need to handle other than just true/false error codes in __reloc_entry_gpu was added in the dma_resv locking changes in c43ce12328df ("drm/i915: Use per object locking in execbuf, v12.") Signed-off-by: Maarten Lankhorst Reported-by: Dan Carpenter Cc: Dave Airlie [danvet: Explain this entire saga a lot better, adding tons of commit references. Also note that this was merged before full intel-gfx-CI results, only after BAT, since the breakage at the BAT run is already severe enough to block all pre-merge testing.] Fixes: 1f4b2aca794f ("Merge tag 'drm-intel-gt-next-2020-09-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-next") Acked-by: Joonas Lahtinen Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200910111225.2184193-1-maarten.lankhorst@linux.intel.com commit 8c3c818c23a5bbce6ff180dd2ee04415241df77c Author: Steven Price Date: Wed Sep 9 13:29:57 2020 +0100 drm/panfrost: Ensure GPU quirks are always initialised The GPU 'CONFIG' registers used to work around hardware issues are cleared on reset so need to be programmed every time the GPU is reset. However panfrost_device_reset() failed to do this. To avoid this in future instead move the call to panfrost_gpu_init_quirks() to panfrost_gpu_power_on() so that the regsiters are always programmed just before the cores are powered. Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") Signed-off-by: Steven Price Reviewed-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20200909122957.51667-1-steven.price@arm.com commit ac5037afefd33fea9a9c1a4a5ac46ece396e7465 Author: Robin Murphy Date: Thu Sep 3 14:59:23 2020 +0100 drm/panfrost: Set DMA max segment size Since all we do with scatterlists is map them in the MMU, we don't have any hardware constraints on how they're laid out. Let the DMA layer know so it won't warn when DMA API debugging is enabled. Signed-off-by: Robin Murphy Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/04371bc36512076b7feee07f854e56b80675d953.1599141563.git.robin.murphy@arm.com commit fd24adf887e490fd10a9a6bb9d76854e87c235f8 Author: Jisheng Zhang Date: Thu Aug 27 15:06:40 2020 +0800 dt-bindings: regulator: Convert mp886x to json-schema Convert the mp886x binding to DT schema format using json-schema. Signed-off-by: Jisheng Zhang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200827150640.267f6edc@xhacker.debian Signed-off-by: Mark Brown commit 02f8eaab0cb644478c170237f354db32b718e5ff Author: YueHaibing Date: Thu Sep 10 11:42:40 2020 +0800 regulator: bd718x7: Make some variable static Fix sparse warnings: drivers/regulator/bd718x7-regulator.c:576:28: warning: symbol 'bd71847_swcontrol_ops' was not declared. Should it be static? drivers/regulator/bd718x7-regulator.c:585:28: warning: symbol 'bd71847_hwcontrol_ops' was not declared. Should it be static? drivers/regulator/bd718x7-regulator.c:902:28: warning: symbol 'bd71837_swcontrol_ops' was not declared. Should it be static? drivers/regulator/bd718x7-regulator.c:913:28: warning: symbol 'bd71837_hwcontrol_ops' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-By: Matti Vaittinen Link: https://lore.kernel.org/r/20200910034240.37268-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 93c16fabdb74a9c1a427402fc1fe588a45130c5b Author: Robert Foss Date: Wed Sep 2 16:10:37 2020 +0200 media: ov8856: Add support for 3264x2448 mode OV8856 supports 3264x2448 @ 30 FPS, which is added in this commit. Signed-off-by: Robert Foss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a0822e3eeaab3c8d99569bd4af1b5b0aab9b7ce3 Merge: 36760d44be7eb 1fdbcfa9fdee6 Author: Mark Brown Date: Thu Sep 10 13:29:30 2020 +0100 Merge series "ASoC: q6dsp: Add support to Codec Ports." from Srinivas Kandagatla : LPASS IP on SoCs like SM8250 has Digital Codec part integrated into it. This ports are exposed in Q6DSP as Codec ports. This patchset adds support to those q6afe ports along with q6routing and q6afe-dai. This patchset has been tested along with other patches on Qualcomm Robotics RB5 Platform with Soundwire and WSA8815 Codec. Thanks, srini Srinivas Kandagatla (8): ASoC: q6dsp: q6afe: add support to Codec DMA ports ASoC: q6dsp: q6routing: add support to Codec DMA ports ASoC: q6dsp: q6afe: prepare afe_apr_send_pkt to take response opcode ASoC: q6dsp: q6afe: add global q6afe waitqueue ASoC: q6dsp: q6afe: add lpass hw voting support ASoC: q6dsp: q6afe: update q6afe_set_param to support global clocks ASoC: q6dsp: q6afe: add codec lpass clocks ASoC: q6dsp: q6afe-dai: add support to Codec DMA ports include/dt-bindings/sound/qcom,q6afe.h | 22 ++ sound/soc/qcom/qdsp6/q6afe-dai.c | 229 ++++++++++++++++++ sound/soc/qcom/qdsp6/q6afe.c | 308 +++++++++++++++++++++++-- sound/soc/qcom/qdsp6/q6afe.h | 33 ++- sound/soc/qcom/qdsp6/q6routing.c | 121 +++++++++- 5 files changed, 689 insertions(+), 24 deletions(-) -- 2.21.0 commit 1fdbcfa9fdee6f9cc00129f0f5ed0ff29cfef646 Author: Srinivas Kandagatla Date: Thu Sep 10 11:17:32 2020 +0100 ASoC: q6dsp: q6afe-dai: add support to Codec DMA ports Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200910101732.23484-9-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 0c3e35fc1ebe22a5254ba3bff2599a2c49b00abe Author: Srinivas Kandagatla Date: Thu Sep 10 11:17:31 2020 +0100 ASoC: q6dsp: q6afe: add codec lpass clocks LPASS now has integrated codec control whose clocks are controlled by Q6DSP. This patch adds support to those clocks. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200910101732.23484-8-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 84ab3b9f19f6ff0bb5df6c6deea75ab4c1d2aff8 Author: Srinivas Kandagatla Date: Thu Sep 10 11:17:30 2020 +0100 ASoC: q6dsp: q6afe: update q6afe_set_param to support global clocks Previously there was no case where we need to set clock or send commands that are not associated with q6afe ports, now we have cases like clock voting and clock consumers like codecs that needed these clocks. update q6afe_set_param() to support such cases, including token passing. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200910101732.23484-7-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 55e07531d922540c656c7fc2e21d76e1b751f279 Author: Srinivas Kandagatla Date: Thu Sep 10 11:17:29 2020 +0100 ASoC: q6dsp: q6afe: add lpass hw voting support Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200910101732.23484-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 181202d021f51d4c0442e71adc34e9629a35a6d8 Author: Srinivas Kandagatla Date: Thu Sep 10 11:17:28 2020 +0100 ASoC: q6dsp: q6afe: add global q6afe waitqueue In some cases like clocks q6afe would have to process commands without an associated q6afe port, in such cases waitqueue is required at global level to wait for the command to finish. This patch also adds the command result to go with this waitqueue. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200910101732.23484-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 342a4f8ca12b1cac812151b05f8a837eebc6885c Author: Srinivas Kandagatla Date: Thu Sep 10 11:17:27 2020 +0100 ASoC: q6dsp: q6afe: prepare afe_apr_send_pkt to take response opcode Update afe_apr_send_pkt() to take response opcode that it should wait for. This is helpful in cases where we expect response other than the actual command opcode. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200910101732.23484-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 825492cb518bcf654e9205b3c723585191314d1a Author: Srinivas Kandagatla Date: Thu Sep 10 11:17:26 2020 +0100 ASoC: q6dsp: q6routing: add support to Codec DMA ports Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200910101732.23484-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 150b2e86c54ad09c26e60f32925aeaf1fca1a5d3 Author: Srinivas Kandagatla Date: Thu Sep 10 11:17:25 2020 +0100 ASoC: q6dsp: q6afe: add support to Codec DMA ports New LPASS supports various codec macros, DSP firmware already has support to those ports. Add corresponding configuration support to those ports in adsp drivers. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200910101732.23484-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit e5a30635600a346fbec58e13c46c656dd0eb86b3 Author: Robert Foss Date: Wed Sep 2 16:10:36 2020 +0200 media: ov8856: Add support for 1632x1224 mode OV8856 supports 1632x1224 @ 60 FPS, which is added in this commit. Signed-off-by: Robert Foss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit da5c791cfcdf11d6c2be276896cf0cb8181da1fd Author: Sakari Ailus Date: Tue Sep 8 10:23:29 2020 +0200 media: v4l2-fwnode: Document new usage patterns of v4l2_fwnode_endpoint_parse Document that it is possible to provide defaults for multiple bus types to v4l2_fwnode_endpoint_parse and v4l2_fwnode_endpoint_alloc_parse. Also underline the fact that detecting the bus type without bus-type property is only for the old drivers. Also correct capitalisation of BT.656. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit bb4bba9232fc90f173a2215035334ceec0457f2f Author: Sakari Ailus Date: Tue Sep 8 10:20:28 2020 +0200 media: v4l2-fwnode: Make bus configuration a struct The bus specific parameters were a union. This made providing bus specific defaults impossible as the memory used to store the defaults for multiple different busses was the same. Make it struct instead. It's not large so the size isn't really an issue. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 2e654432a260d968cd505898e1c056ce6ab63c31 Author: Sakari Ailus Date: Tue Sep 8 10:16:57 2020 +0200 media: v4l2-fwnode: Make number of data lanes a character The maximum is currently four (4). No short is needed. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 86d37bf31af647760f1f17e7c1afa1bdba075198 Author: Laurent Pinchart Date: Tue Aug 11 22:59:39 2020 +0200 media: i2c: max9286: Allocate v4l2_async_subdev dynamically v4l2_async_notifier_add_subdev() requires the asd to be allocated dynamically, but the max9286 driver embeds it in the max9286_source structure. This causes memory corruption when the notifier is destroyed at remove time with v4l2_async_notifier_cleanup(). Fix this issue by registering the asd with v4l2_async_notifier_add_fwnode_subdev(), which allocates it dynamically internally. A new max9286_asd structure is introduced, to store a pointer to the corresonding max9286_source that needs to be accessed from bound and unbind callbacks. There's no need to take an extra explicit reference to the fwnode anymore as v4l2_async_notifier_add_fwnode_subdev() does so internally. While at it, use %u instead of %d to print the unsigned index in the error message from the v4l2_async_notifier_add_fwnode_subdev() error path. Fixes: 66d8c9d2422d ("media: i2c: Add MAX9286 driver") Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2cac7cbfb4099980e78244359ab9c6f056d6a7ec Author: Laurent Pinchart Date: Tue Aug 11 22:59:38 2020 +0200 media: rcar-csi2: Allocate v4l2_async_subdev dynamically v4l2_async_notifier_add_subdev() requires the asd to be allocated dynamically, but the rcar-csi2 driver embeds it in the rcar_csi2 structure. This causes memory corruption when the notifier is destroyed at remove time with v4l2_async_notifier_cleanup(). Fix this issue by registering the asd with v4l2_async_notifier_add_fwnode_subdev(), which allocates it dynamically internally. Fixes: 769afd212b16 ("media: rcar-csi2: add Renesas R-Car MIPI CSI-2 receiver driver") Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 468e986dac0e94194334ca6d0abf3af8c250792e Author: Laurent Pinchart Date: Tue Aug 11 22:59:37 2020 +0200 media: rcar_drif: Allocate v4l2_async_subdev dynamically v4l2_async_notifier_add_subdev() requires the asd to be allocated dynamically, but the rcar-drif driver embeds it in the rcar_drif_graph_ep structure. This causes memory corruption when the notifier is destroyed at remove time with v4l2_async_notifier_cleanup(). Fix this issue by registering the asd with v4l2_async_notifier_add_fwnode_subdev(), which allocates it dynamically internally. Fixes: d079f94c9046 ("media: platform: Switch to v4l2_async_notifier_add_subdev") Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cdd4f7824994c9254acc6e415750529ea2d2cfe0 Author: Laurent Pinchart Date: Tue Aug 11 22:59:36 2020 +0200 media: rcar_drif: Fix fwnode reference leak when parsing DT The fwnode reference corresponding to the endpoint is leaked in an error path of the rcar_drif_parse_subdevs() function. Fix it, and reorganize fwnode reference handling in the function to release references early, simplifying error paths. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6c11631480e9a0554ae5ee89dc12acaa1f1a93a0 Author: Laurent Pinchart Date: Tue Aug 11 22:59:35 2020 +0200 media: v4l2-async: Document asd allocation requirements The v4l2_async_notifier_add_subdev() function requires the asd pointer it receives to be allocated dynamically, but doesn't explicitly say so. Only one driver out of 13 get its right (atmel-sama5d2-isc.c, but with memory leaks in the error paths), clearly showing we have an issue. Update the v4l2_async_notifier_add_subdev() documentation to clearly state the allocation requirement. Whether this will be enough to avoid new offending code isn't certain, but it's a good first step nonetheless. Fixes: 9ca465312132 ("media: v4l: fwnode: Support generic parsing of graph endpoints in a device") Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2c61e48d0a19eff9c404e1911ec6c63c555eb0c4 Author: Lad Prabhakar Date: Fri Sep 4 22:18:35 2020 +0200 media: i2c: ov5640: Fail probe on unsupported bus_type Fail probe if unsupported bus_type is detected. Signed-off-by: Lad Prabhakar Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4039b03720f70aacfd351ecacdd085c3d9fc6ded Author: Lad Prabhakar Date: Fri Sep 4 22:18:34 2020 +0200 media: i2c: ov5640: Add support for BT656 mode Enable support for BT656 mode. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 311a6408f8d46d47e35d3bf598dced39af4ce087 Author: Lad Prabhakar Date: Fri Sep 4 22:18:33 2020 +0200 media: i2c: ov5640: Configure HVP lines in s_power callback Configure HVP lines in s_power callback instead of configuring everytime in ov5640_set_stream_dvp(). Alongside also disable MIPI in DVP mode. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Tested-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 576f5d4ba8f672953513280510abf9a736b015cc Author: Lad Prabhakar Date: Fri Sep 4 22:18:32 2020 +0200 media: i2c: ov5640: Enable data pins on poweron for DVP mode During testing this sensor on iW-RainboW-G21D-Qseven platform in 8-bit DVP mode with rcar-vin bridge noticed the capture worked fine for the first run (with yavta), but for subsequent runs the bridge driver waited for the frame to be captured. Debugging further noticed the data lines were enabled/disabled in stream on/off callback and dumping the register contents 0x3017/0x3018 in ov5640_set_stream_dvp() reported the correct values, but yet frame capturing failed. To get around this issue data lines are enabled in s_power callback. (Also the sensor remains in power down mode if not streaming so power consumption shouldn't be affected) Fixes: f22996db44e2d ("media: ov5640: add support of DVP parallel interface") Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Tested-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b1751ae652fb95919c08df5bdd739ccf9886158a Author: Lad Prabhakar Date: Fri Sep 4 22:18:31 2020 +0200 media: i2c: ov5640: Separate out mipi configuration from s_power In preparation for adding DVP configuration in s_power callback move mipi configuration into separate function Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Tested-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3b987d70e903962eb8c5961ba166c345a49d1a0b Author: Lad Prabhakar Date: Fri Sep 4 22:18:30 2020 +0200 media: i2c: ov5640: Remain in power down for DVP mode unless streaming Keep the sensor in software power down mode and wake up only in ov5640_set_stream_dvp() callback. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Tested-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 32b6e400c34df3574ba05100ebcf9d9e8d722a49 Author: Sakari Ailus Date: Wed Sep 2 14:04:12 2020 +0200 media: v4l2-fwnode: Use debug level for printing link frequencies pr_info() was accidentally used to print the link frequencies whereas the rest of the information is printed on debug level. Fix that by using pr_debug() also for link frequencies. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2f248f7f346b4e2254b051131835713a56f9afe0 Author: Sakari Ailus Date: Wed Sep 2 08:23:57 2020 +0200 media: i2c: Remove Alan Chiang's e-mail address Alan Chiang's e-mail address no longer works. Remove it. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 30f573a85c30fa03041958ade07aac0f73aa869a Author: Andy Shevchenko Date: Mon Aug 17 18:07:33 2020 +0200 media: ipu3-cio2: Update Copyright year and fix indentation issues Update Copyright year to cover the previous changes and at the same time address indentation issues. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b1f815c479c1c7422f4b6552c967be9d39a9f127 Author: Kajol Jain Date: Mon Sep 7 12:11:33 2020 +0530 perf vendor events power9: Add hv_24x7 core level metric events This patch adds hv_24x7 core level events in nest_metric.json file and also add PerChip/PerCore field in metric events. Result: power9 platform: command:# ./perf stat --metric-only -M PowerBUS_Frequency -C 0 -I 1000 1.000070601 1.9 2.0 2.000253881 2.0 1.9 3.000364810 2.0 2.0 Signed-off-by: Kajol Jain Acked-by: Ian Rogers Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: John Garry Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lore.kernel.org/lkml/20200907064133.75090-6-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 39fec547f1112727789d4234f29731596739ef68 Author: Andy Shevchenko Date: Mon Aug 17 18:07:32 2020 +0200 media: ipu3-cio2: Drop useless assignments There are assignments inside the functions which are useless. Drop them for good. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c12841388e161843ec38f4a460226f66c40f04ae Author: Andy Shevchenko Date: Mon Aug 17 18:07:31 2020 +0200 media: ipu3-cio2: Drop bogus check and error message pcim_iomap_table() won't fail if previous pcim_iomap_regions() hasn't. Since we check pcim_iomap_regions() for failure the check close to pcim_iomap_table() is bogus and not needed. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 34a07e65bae27abb620a78b6728777678365a6fb Author: Andy Shevchenko Date: Mon Aug 17 18:07:30 2020 +0200 media: ipu3-cio2: Get rid of pci_set_master() duplication It's unclear why driver repeats the code from PCI core. Drop it for good. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f5a489dc8189bd6a6a418e408bada1ed5b9d02b1 Author: Kajol Jain Date: Mon Sep 7 12:11:32 2020 +0530 perf metricgroup: Pass pmu_event structure as a parameter for arch_get_runtimeparam() This patch adds passing of pmu_event as a parameter in function 'arch_get_runtimeparam' which can be used to get details like if the event is percore/perchip. Signed-off-by: Kajol Jain Acked-by: Ian Rogers Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: John Garry Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lore.kernel.org/lkml/20200907064133.75090-5-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 44677b03caa3363da6f2810a83da367e55f026d9 Author: Andy Shevchenko Date: Mon Aug 17 18:07:29 2020 +0200 media: ipu3-cio2: Use readl_poll_timeout() helper We may use special helper macro to poll IO till condition or timeout occurs. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 560ccbc4a52c567096023e0c6a9b920048e59017 Author: Kajol Jain Date: Mon Sep 7 12:11:31 2020 +0530 perf jevents: Add support for parsing perchip/percore events Initially, every time we want to add new terms like chip, core thread etc, we need to create corrsponding fields in pmu_events and event struct. This patch adds an enum called 'aggr_mode_class' which store all these aggregation like perchip/percore. It also adds new field 'aggr_mode' to capture these terms. Now, if user wants to add any new term, they just need to add it in the enum defined. Signed-off-by: Kajol Jain Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jin Yao Cc: John Garry Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lore.kernel.org/lkml/20200907064133.75090-4-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 71a374bb1847824b60a3bfdd3af8a13b6ec3a22d Author: Kajol Jain Date: Mon Sep 7 12:11:30 2020 +0530 perf jevents: Add new structure to pass json fields. This patch adds new structure called 'json_event' inside jevents.c file to improve the callback prototype inside jevent files. Initially, whenever user want to add new field, they need to update in all function callback which make it more and more complex with increased number of parmeters. With this change, we just need to add it in new structure 'json_event'. Signed-off-by: Kajol Jain Reviewed-by: Andi Kleen Reviewed-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jin Yao Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lore.kernel.org/lkml/20200907064133.75090-3-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 0d52b7889be17076e0c9c535d74db9c4c8b506ce Author: Kajol Jain Date: Mon Sep 7 12:11:29 2020 +0530 perf jevents: Make json_events() static and ditch jevents.h file This patch removes jevents.h and makes json_events function static. Signed-off-by: Kajol Jain Reviewed-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jin Yao Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lore.kernel.org/lkml/20200907064133.75090-2-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit a553c9013619c2d936bc7b1c3d283ebcccbf62c3 Author: Andy Shevchenko Date: Mon Aug 17 18:07:28 2020 +0200 media: ipu3-cio2: Replace infinite loop by one with clear exit condition Refactor cio2_buffer_done() to get rid of infinite loop by replacing it by one with clear exit condition. This change also allows to check for an error ahead. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9a262c7a7fd3543ba1bd2537e58c83dfb3d7d3aa Author: Andy Shevchenko Date: Mon Aug 17 18:07:27 2020 +0200 media: ipu3-cio2: Use macros from pfn.h There are few nice macros in pfn.h, some of which we may use here. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e186f932472f302a67a92ea2cc6edc59702c1e82 Author: Andy Shevchenko Date: Mon Aug 17 18:07:26 2020 +0200 media: ipu2-cio2: Replace custom definition with PAGE_SIZE It's quite unlikely that another page size will be supported, but in any case there is still an inconsistency between custom page size definition and generic macros used in the driver. Switch over to the generic PAGE_SIZE for sake of the consistency. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7b285f41f7376dc37e7fad1e803995fd39f42848 Author: Andy Shevchenko Date: Mon Aug 17 18:07:25 2020 +0200 media: ipu3-cio2: Introduce CIO2_LOP_ENTRIES constant This constant is used in several places in the code, define it for better maintenance. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit bbacb2740343ed6041c4e20fdc1996cc2c4917fb Author: Andy Shevchenko Date: Mon Aug 17 18:07:24 2020 +0200 media: ipu3-cio2: Simplify cleanup code The code looks more nicer if we use: while (i--) instead: for (i = i - 1; i >= 0; i--) This would also allow making 'i' unsigned again. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d8fc21c17099635e8ebd986d042be65a6c6b5bd0 Author: Dinghao Liu Date: Mon Aug 24 08:53:52 2020 +0200 media: omap3isp: Fix memleak in isp_probe When devm_ioremap_resource() fails, isp should be freed just like other error paths in isp_probe. Fixes: 8644cdf972dd6 ("[media] omap3isp: Replace many MMIO regions by two") Signed-off-by: Dinghao Liu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 08913a8e458e03f886a1a1154a6501fcb9344c39 Author: Christophe JAILLET Date: Sat Aug 22 15:11:24 2020 +0200 media: staging/intel-ipu3: css: Correctly reset some memory The intent here is to reset the whole 'scaler_coeffs_luma' array, not just the first element. Fixes: e11110a5b744 ("media: staging/intel-ipu3: css: Compute and program ccs") Signed-off-by: Christophe JAILLET Reviewed-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit fe0aed19b266fdcbb5dd7abc9ac9b4a64ae82f91 Author: Leo Yan Date: Mon Sep 7 21:01:54 2020 +0800 perf test: Introduce script for Arm CoreSight testing We need a simple method to test Perf with ARM CoreSight drivers, this could be used for smoke testing when new patch is coming for perf or CoreSight drivers, and we also can use the test to confirm if the CoreSight has been enabled successfully on new platforms. This patch introduces the shell script test_arm_coresight.sh which is under the 'pert test' framework. This script provides three testing scenarios: Test scenario 1: traverse all possible paths between source and sink For traversing possible paths, simply to say, the testing rationale is source oriented testing, it traverses every source (now only refers to ETM device) and test its all possible sinks. To search the complete paths from one specific source to its sinks, this patch relies on the sysfs '/sys/bus/coresight/devices/devX/out:Y' for depth-first search (DFS) for iteration connected device nodes, if the output device is detected as a sink device (the script will exclude TPIU device which can not be supported for perf PMU), then it will test trace data recording and decoding for it. The script runs three output testings for every trace data: - Test branch samples dumping with 'perf script' command; - Test branch samples reporting with 'perf report' command; - Use option '--itrace=i1000i' to insert synthesized instructions events and the script will check if perf can output the percentage value successfully based on the instruction samples. Test scenario 2: system-wide test For system-wide testing, it passes option '-a' to perf tool to enable tracing on all CPUs, so it's hard to say which program will be traced. But perf tool itself contributes much overload in this case, so it will parse trace data and check if process 'perf' can be detected or not. Test scenario 3: snapshot mode test. For snapshot mode testing, it uses 'dd' command to launch a long running program, so this can give chance to send signal -USR2; it will check the captured trace data contains 'dd' related thread info or not. If any test fails, it will report failure and directly exit with error. This test will be only applied on a platform with PMU event 'cs_etm//', otherwise will skip the testing. Below is detailed usage for it: # cd $linux/tools/perf -> This is important so can use shell script # perf test list [...] 70: probe libc's inet_pton & backtrace it with ping 71: Check Arm CoreSight trace data recording and synthesized samples 72: Check open filename arg using perf trace + vfs_getname 73: Zstd perf.data compression/decompression 74: Add vfs_getname probe to get syscall args filenames 75: Use vfs_getname probe to get syscall args filenames # perf test 71 71: Check Arm CoreSight trace data recording and branch samples: Ok Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Reviewed-by: Suzuki Poulouse Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200907130154.9601-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit ec2c23f628802317f73fab5255cc62a776bc7930 Author: Adam Goode Date: Wed Sep 2 22:06:17 2020 +0200 media: uvcvideo: Convey full colorspace information to V4L2 The Color Matching Descriptor has been present in USB cameras since the original version of UVC, but it has never been fully exposed in Linux. This change informs V4L2 of all of the UVC colorspace parameters: color primaries, transfer characteristics, and YCbCr encoding. videodev2.h doesn't have values for all the possible UVC color settings, so it is mapped as closely as possible. Signed-off-by: Adam Goode Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 8a652a17e3c005dcdae31b6c8fdf14382a29cbbe Author: Adam Goode Date: Sun Aug 23 03:21:33 2020 +0200 media: uvcvideo: Ensure all probed info is returned to v4l2 bFrameIndex and bFormatIndex can be negotiated by the camera during probing, resulting in the camera choosing a different format than expected. v4l2 can already accommodate such changes, but the code was not updating the proper fields. Without such a change, v4l2 would potentially interpret the payload incorrectly, causing corrupted output. This was happening on the Elgato HD60 S+, which currently always renegotiates to format 1. As an aside, the Elgato firmware is buggy and should not be renegotating, but it is still a valid thing for the camera to do. Both macOS and Windows will properly probe and read uncorrupted images from this camera. With this change, both qv4l2 and chromium can now read uncorrupted video from the Elgato HD60 S+. [Add blank lines, remove periods at the of messages] Signed-off-by: Adam Goode Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 171994e498a0426cbe17f874c5c6af3c0af45200 Author: Laurent Pinchart Date: Wed Aug 19 01:56:49 2020 +0200 media: uvcvideo: Silence shift-out-of-bounds warning UBSAN reports a shift-out-of-bounds warning in uvc_get_le_value(). The report is correct, but the issue should be harmless as the computed value isn't used when the shift is negative. This may however cause incorrect behaviour if a negative shift could generate adverse side effects (such as a trap on some architectures for instance). Regardless of whether that may happen or not, silence the warning as a full WARN backtrace isn't nice. Reported-by: Bart Van Assche Fixes: c0efd232929c ("V4L/DVB (8145a): USB Video Class driver") Signed-off-by: Laurent Pinchart Reviewed-by: Bart Van Assche Tested-by: Bart Van Assche Signed-off-by: Mauro Carvalho Chehab commit f875bcc375c738bf2f599ff2e1c5b918dbd07c45 Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:30 2020 +0200 media: uvcvideo: Fix dereference of out-of-bound list iterator Fixes the following coccinelle report: drivers/media/usb/uvc/uvc_ctrl.c:1860:5-11: ERROR: invalid reference to the index variable of the iterator on line 1854 by adding a boolean variable to check if the loop has found the Found using - Coccinelle (http://coccinelle.lip6.fr) [Replace cursor variable with bool found] Signed-off-by: Daniel W. S. Almeida Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit f5a3048a840ddf94f651a2694d10aefd6b5f757d Author: Alexander A. Klimov Date: Mon Jul 13 18:22:46 2020 +0200 media: uvcvideo: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit bed888de658afe1c383f27f73b3afa8d89a4ff9a Author: Hans de Goede Date: Tue Jul 28 13:22:09 2020 +0200 media: uvcvideo: Cleanup uvc_ctrl_add_info() error handling There is only 1 error exit in uvc_ctrl_add_info(), so using goto style error handling is not necessary. Also the kfree(ctrl->uvc_data) on error is not necessary, because the only error exit is for the kzalloc() of ctrl->uvc_data failing. Remove all the error handling cruft and simply do "return -ENOMEM" on kzalloc() failure. Signed-off-by: Hans de Goede Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 93df48d37c3f03886d84831992926333e7810640 Author: Hans de Goede Date: Tue Jul 28 13:22:08 2020 +0200 media: uvcvideo: Fix uvc_ctrl_fixup_xu_info() not having any effect uvc_ctrl_add_info() calls uvc_ctrl_get_flags() which will override the fixed-up flags set by uvc_ctrl_fixup_xu_info(). uvc_ctrl_init_xu_ctrl() already calls uvc_ctrl_get_flags() before calling uvc_ctrl_add_info(), so the uvc_ctrl_get_flags() call in uvc_ctrl_add_info() is not necessary for xu ctrls. This commit moves the uvc_ctrl_get_flags() call for normal controls from uvc_ctrl_add_info() to uvc_ctrl_init_ctrl(), so that we no longer call uvc_ctrl_get_flags() twice for xu controls and so that we no longer override the fixed-up flags set by uvc_ctrl_fixup_xu_info(). This fixes the xu motor controls not working properly on a Logitech 046d:08cc, and presumably also on the other Logitech models which have a quirk for this in the uvc_ctrl_fixup_xu_info() function. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit d6834b4b58d110814aaf3469e7fd87d34ae5ae81 Author: Laurent Pinchart Date: Sun Jun 7 04:05:49 2020 +0200 media: uvcvideo: Set media controller entity functions The media controller core prints a warning when an entity is registered without a function being set. This affects the uvcvideo driver, as the warning was added without first addressing the issue in existing drivers. The problem is harmless, but unnecessarily worries users. Fix it by mapping UVC entity types to MC entity functions as accurately as possible using the existing functions. Fixes: b50bde4e476d ("[media] v4l2-subdev: use MEDIA_ENT_T_UNKNOWN for new subdevs") Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab commit 40b222b56ea81aa636a4aa7a84939786369e726b Author: Dmitry Buzdyk Date: Fri May 29 03:05:47 2020 +0200 media: uvcvideo: Add mapping for HEVC payloads Add HEVC GUID and assotiate with HEVC pixel format so that frame based format descriptors recognized by the UVC video driver. Signed-off-by: Dmitry Buzdyk Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit fc8678783c72cedd61e5de24978bcc6e147f4d77 Author: Jun Chen Date: Wed Dec 25 03:34:17 2019 +0100 media: uvcvideo: Fix annotation for uvc_video_clock_update() The formula (2) is to convert from SOF to host clock, it should be fix as "TS = ((TS2 - TS1) * SOF + TS1 * SOF2 - TS2 * SOF1) / (SOF2 - SOF1)" Signed-off-by: Jun Chen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit a73a342a6b3cbc6a3f9f4f546bd7f796f216297a Author: Robin Murphy Date: Thu Sep 3 23:12:27 2020 +0200 media: rcar-fcp: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Also the DMA segment size is simply a size, not a bitmask. Signed-off-by: Robin Murphy Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 50044aa715177b336acca01d711bf8edc19162c7 Author: Hans Verkuil Date: Tue Sep 1 08:22:47 2020 +0200 media: usbvision: remove deprecated driver To quote the TODO of this driver: -------------------------------------------------------------- The driver is deprecated and scheduled for removal by the end of 2020. In order to prevent removal the following actions would have to be taken: - clean up the code - convert to the vb2 framework - fix the disconnect and free-on-last-user handling (i.e., add a release callback for struct v4l2_device and rework the code to use that correctly). -------------------------------------------------------------- Nobody picked this up, so it's time to retire this driver. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 36760d44be7eb2b65e302ee038ded89654abc0ca Author: Tzung-Bi Shih Date: Thu Sep 10 12:29:49 2020 +0800 ASoC: dt-bindings: rt1015p: add document Adds DT binding document for rt1015p. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200910042949.3795682-3-tzungbi@google.com Signed-off-by: Mark Brown commit c07152d46b3b056ff182a0b5beb323fc2e6788fe Author: Tzung-Bi Shih Date: Thu Sep 10 12:29:48 2020 +0800 ASoC: rt1015p: add codec driver Adds rt1015p codec driver. Rt1015p is a rt1015 variant. - It doesn't support I2C. - It only supports S24, 48kHz, 64FS. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200910042949.3795682-2-tzungbi@google.com Signed-off-by: Mark Brown commit 9e34c1c87e56dc4a53e95fa2a68191c75e10b46d Author: Ian Rogers Date: Wed Sep 9 20:26:31 2020 -0700 perf metricgroup: Fix typo in comment. Add missing character. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jin Yao Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Richter Link: http://lore.kernel.org/lkml/20200910032632.511566-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 7a16183316ddb9b55b12c2341a4947790a119556 Author: Ian Rogers Date: Wed Sep 9 20:26:30 2020 -0700 perf stat: Remove dead code: no need to set os.evsel twice No need to set os.evsel twice. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jin Yao Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Richter Link: http://lore.kernel.org/lkml/20200910032632.511566-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ded10c47f39e0f850d53f5a2b418fbafdef53347 Author: Viresh Kumar Date: Thu Aug 20 15:46:20 2020 +0530 cpufreq: imx6q: Unconditionally call dev_pm_opp_of_remove_table() dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. Signed-off-by: Viresh Kumar commit 1652dbf7363a6c3e9a3ea96da550f6003fa8e01f Author: Eddie Huang Date: Tue Nov 12 19:03:27 2019 +0800 arm64: dts: mt8183: add scp node Add scp node to mt8183 and mt8183-evb Signed-off-by: Erin Lo Signed-off-by: Pi-Hsun Shih Signed-off-by: Eddie Huang Link: https://lore.kernel.org/r/20191112110330.179649-5-pihsun@chromium.org Link: https://lore.kernel.org/r/20200909081422.2412795-1-pihsun@chromium.org [mb: squashed both patches] Signed-off-by: Matthias Brugger commit 14929c5ae8b6dc4ad89d4888cfc0bd7678eee04c Author: Dan Carpenter Date: Thu Sep 10 13:08:25 2020 +0300 drm/vc4: hdmi: Fix NULL vs IS_ERR() checks in vc5_hdmi_init_resources() The devm_ioremap() function never returns error pointers, it returns NULL. Fixes: 8323989140f3 ("drm/vc4: hdmi: Support the BCM2711 HDMI controllers") Signed-off-by: Dan Carpenter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200910100825.GC79916@mwanda commit 130cdec4e12836cb2d5346216902c49800a07c33 Author: Dan Carpenter Date: Thu Sep 10 13:07:48 2020 +0300 drm/vc4: hdmi: Fix off by ones in vc4_hdmi_read/write() The variant->registers[] has ->num_registers elements so the > comparison needs to be changes to >= to prevent an out of bounds access. Fixes: 311e305fdb4e ("drm/vc4: hdmi: Implement a register layout abstraction") Signed-off-by: Dan Carpenter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200910100748.GA79916@mwanda commit 74623757b98239b1eb43304e1f5d15a29b40fb84 Author: Grygorii Strashko Date: Sun Aug 30 20:34:01 2020 +0300 ARM: omap2plus_defconfig: enable generic net options Enable set of generic, widely used, networking options: - basic QoS, filter and actions - VLAN support - Bridge support Use "M" build option where possible. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 8aa6361f72515d02753dae1c0843384274fea90f Author: Andreas Kemnade Date: Wed Aug 19 21:15:24 2020 +0200 ARM: omap2plus_defconfig: enable twl4030_madc as a loadable module The ADC is used by twl4030_charger to read voltages. If a dtb contains the ADC but the module is not build, probing twl4030_charger will be endlessly deferred, so just enable CONFIG_TWL4030_MADC in the config. Signed-off-by: Andreas Kemnade Signed-off-by: Tony Lindgren commit 6a8a58acfe82a49e91a3c3e1c1c07865024b4ff4 Author: Laurentiu Palcu Date: Thu Sep 10 12:52:50 2020 +0300 drm/imx/dcss: fix compilation issue on 32bit When compiling for 32bit platforms, the compilation fails with: ERROR: modpost: "__aeabi_ldivmod" [drivers/gpu/drm/imx/dcss/imx-dcss.ko] undefined! ERROR: modpost: "__aeabi_uldivmod" [drivers/gpu/drm/imx/dcss/imx-dcss.ko] undefined! This patch adds a dependency on ARM64 since no 32bit SoCs have DCSS, so far. Signed-off-by: Laurentiu Palcu Reported-by: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/20200910095250.7663-1-laurentiu.palcu@oss.nxp.com commit ec9bc5bedb2000902c3fcf3a844964d099231881 Author: Grygorii Strashko Date: Mon Sep 7 23:21:25 2020 +0300 ARM: dts: dra7: drop legacy cpsw dt node All dra7/am57 boards converted to use new driver, so drop legacy cpsw dt node. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit fa46e7e7dc6dc4aba2620c79f1c8ac59bc5a1dd3 Author: Grygorii Strashko Date: Mon Sep 7 23:21:24 2020 +0300 ARM: dts: am57xx-cl-som-am57x: switch to new cpsw switch drv Switch CompuLab CL-SOM-AM57x board to use new cpsw switch driver. Those board configured in dual_mac mode by default. Hence, dual_mac mode has been preserved the same way between legacy and new driver it's safe to switch drivers. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 56d6c721f2dc618b0aa19f457c3e19547390e4a7 Author: Grygorii Strashko Date: Mon Sep 7 23:21:23 2020 +0300 ARM: dts: dra7x-evm: switch to new cpsw switch drv Switch all TI DRA7x boards to use new cpsw switch driver. Those boards configured in dual_mac mode by default. Hence, dual_mac mode has been preserved the same way between legacy and new driver it's safe to switch drivers. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit ea952beb292b5a66b3e636c5936b979a3af77cc0 Author: Grygorii Strashko Date: Mon Sep 7 23:21:22 2020 +0300 ARM: dts: beagle-x15: switch to new cpsw switch drv Switch all TI AM5728 BeagleBoard-X15 boards to use new cpsw switch driver. Those boards have 2 Ext. port wired and configured in dual_mac mode by default. Hence, dual_mac mode has been preserved the same way between legacy and new driver it's safe to switch drivers. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit d56fe359e6b60a1075c61319e18b3315fbf9a960 Author: Grygorii Strashko Date: Mon Sep 7 23:21:21 2020 +0300 ARM: dts: am57xx-idk: switch to new cpsw switch drv Switch all am571/2/4-idk boards to use new cpsw switch driver. Those boards have 2 Ext. port wired and configured in dual_mac mode by default. Hence, dual_mac mode has been preserved the same way between legacy and new driver it's safe to switch drivers. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 67e97cc60d8a366216d33a9284d9f704dfb331f7 Author: Grygorii Strashko Date: Mon Sep 7 23:21:20 2020 +0300 ARM: dts: am5729: beagleboneai: switch to new cpsw switch drv Switch BeagleBone AI to use new cpsw switch driver. It has one Ext. port only and fits dual_mac mode with no issues. Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit 7b5c5720a3689c2c16968ee276b7c47edb64ce0f Author: Jerome Brunet Date: Fri Aug 28 17:47:35 2020 +0200 clk: meson: make shipped controller configurable Add the necessary bits so unnecessary amlogic clock controllers can be compiled out. This allows to save a few kB when necessary. Signed-off-by: Jerome Brunet Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200828154735.435374-1-jbrunet@baylibre.com commit ca6bfe9721b28b34bb4566f15ad6e7f6b878c8fe Author: Adrian Schmutzler Date: Sun Aug 30 21:50:09 2020 +0200 ARM: dts: am43xx: replace status value "ok" by "okay" While the DT parser recognizes "ok" as a valid value for the "status" property, it is actually mentioned nowhere. Use the proper value "okay" instead, as done in the majority of files already. Signed-off-by: Adrian Schmutzler Signed-off-by: Tony Lindgren commit 0893a701a281633b69d3d1376da2b0e0cab4859c Author: Adrian Schmutzler Date: Sun Aug 30 21:48:41 2020 +0200 ARM: dts: dra7xx: replace status value "ok" by "okay" While the DT parser recognizes "ok" as a valid value for the "status" property, it is actually mentioned nowhere. Use the proper value "okay" instead, as done in the majority of files already. Signed-off-by: Adrian Schmutzler Signed-off-by: Tony Lindgren commit fe93b72551ee59afddbd0a8ae23dc152f9e61759 Author: Adrian Schmutzler Date: Sun Aug 30 21:38:59 2020 +0200 ARM: dts: omap: replace status value "ok" by "okay" While the DT parser recognizes "ok" as a valid value for the "status" property, it is actually mentioned nowhere. Use the proper value "okay" instead, as done in the majority of files already. Signed-off-by: Adrian Schmutzler Signed-off-by: Tony Lindgren commit 3b4a0564553804ed7783b8931a39b0e3a255f801 Author: Sakari Ailus Date: Fri Sep 4 09:58:11 2020 +0300 ARM: dts: n9, n950: Remove nokia,nvm-size property Remove nokia,nvm-size property as it is no longer needed. The driver can nowadays figure out the size so do not specify it in DT. Signed-off-by: Sakari Ailus Signed-off-by: Tony Lindgren commit 9a752d18c85ae5da28e4a07d52adfd95eacb2495 Author: Vivek Goyal Date: Wed Aug 19 18:19:56 2020 -0400 virtiofs: add logic to free up a memory range Add logic to free up a busy memory range. Freed memory range will be returned to free pool. Add a worker which can be started to select and free some busy memory ranges. Process can also steal one of its busy dax ranges if free range is not available. I will refer it to as direct reclaim. If free range is not available and nothing can't be stolen from same inode, caller waits on a waitq for free range to become available. For reclaiming a range, as of now we need to hold following locks in specified order. down_write(&fi->i_mmap_sem); down_write(&fi->dax->sem); We look for a free range in following order. A. Try to get a free range. B. If not, try direct reclaim. C. If not, wait for a memory range to become free Signed-off-by: Vivek Goyal Signed-off-by: Liu Bo Signed-off-by: Miklos Szeredi commit d0cfb9dcbca6ebd21ec78ea719b451ea4c22cecf Author: Vivek Goyal Date: Wed Aug 19 18:19:55 2020 -0400 virtiofs: maintain a list of busy elements This list will be used selecting fuse_dax_mapping to free when number of free mappings drops below a threshold. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 6ae330cad6ef22ab8347ea9e0707dc56a7c7363f Author: Vivek Goyal Date: Wed Aug 19 18:19:54 2020 -0400 virtiofs: serialize truncate/punch_hole and dax fault path Currently in fuse we don't seem have any lock which can serialize fault path with truncate/punch_hole path. With dax support I need one for following reasons. 1. Dax requirement DAX fault code relies on inode size being stable for the duration of fault and want to serialize with truncate/punch_hole and they explicitly mention it. static vm_fault_t dax_iomap_pmd_fault(struct vm_fault *vmf, pfn_t *pfnp, const struct iomap_ops *ops) /* * Check whether offset isn't beyond end of file now. Caller is * supposed to hold locks serializing us with truncate / punch hole so * this is a reliable test. */ max_pgoff = DIV_ROUND_UP(i_size_read(inode), PAGE_SIZE); 2. Make sure there are no users of pages being truncated/punch_hole get_user_pages() might take references to page and then do some DMA to said pages. Filesystem might truncate those pages without knowing that a DMA is in progress or some I/O is in progress. So use dax_layout_busy_page() to make sure there are no such references and I/O is not in progress on said pages before moving ahead with truncation. 3. Limitation of kvm page fault error reporting If we are truncating file on host first and then removing mappings in guest lateter (truncate page cache etc), then this could lead to a problem with KVM. Say a mapping is in place in guest and truncation happens on host. Now if guest accesses that mapping, then host will take a fault and kvm will either exit to qemu or spin infinitely. IOW, before we do truncation on host, we need to make sure that guest inode does not have any mapping in that region or whole file. 4. virtiofs memory range reclaim Soon I will introduce the notion of being able to reclaim dax memory ranges from a fuse dax inode. There also I need to make sure that no I/O or fault is going on in the reclaimed range and nobody is using it so that range can be reclaimed without issues. Currently if we take inode lock, that serializes read/write. But it does not do anything for faults. So I add another semaphore fuse_inode->i_mmap_sem for this purpose. It can be used to serialize with faults. As of now, I am adding taking this semaphore only in dax fault path and not regular fault path because existing code does not have one. May be existing code can benefit from it as well to take care of some races, but that we can fix later if need be. For now, I am just focussing only on DAX path which is new path. Also added logic to take fuse_inode->i_mmap_sem in truncate/punch_hole/open(O_TRUNC) path to make sure file truncation and fuse dax fault are mutually exlusive and avoid all the above problems. Signed-off-by: Vivek Goyal Cc: Dave Chinner Signed-off-by: Miklos Szeredi commit 9483e7d5809ab41890298a6a1f5d23c4e10a2cfd Author: Vivek Goyal Date: Wed Aug 19 18:19:53 2020 -0400 virtiofs: define dax address space operations This is done along the lines of ext4 and xfs. I primarily wanted ->writepages hook at this time so that I could call into dax_writeback_mapping_range(). This in turn will decide which pfns need to be written back. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 2a9a609a0c4a3b0a6892fbe360b8c419839e6da7 Author: Stefan Hajnoczi Date: Wed Aug 19 18:19:52 2020 -0400 virtiofs: add DAX mmap support Add DAX mmap() support. Signed-off-by: Stefan Hajnoczi Signed-off-by: Miklos Szeredi commit c2d0ad00d948de73c78f05d2b3e5bdfa605035cc Author: Vivek Goyal Date: Wed Aug 19 18:19:51 2020 -0400 virtiofs: implement dax read/write operations This patch implements basic DAX support. mmap() is not implemented yet and will come in later patches. This patch looks into implemeting read/write. We make use of interval tree to keep track of per inode dax mappings. Do not use dax for file extending writes, instead just send WRITE message to daemon (like we do for direct I/O path). This will keep write and i_size change atomic w.r.t crash. Signed-off-by: Stefan Hajnoczi Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal Signed-off-by: Liu Bo Signed-off-by: Peng Tao Cc: Dave Chinner Signed-off-by: Miklos Szeredi commit ceec02d4354a317cacce4b053a580ea3c7fc6cdc Author: Vivek Goyal Date: Wed Aug 19 18:19:50 2020 -0400 virtiofs: introduce setupmapping/removemapping commands Introduce two new fuse commands to setup/remove memory mappings. This will be used to setup/tear down file mapping in dax window. Signed-off-by: Vivek Goyal Signed-off-by: Peng Tao Signed-off-by: Miklos Szeredi commit fd1a1dc6f5aa7361e3562790336e116935f8fcfa Author: Stefan Hajnoczi Date: Wed Aug 19 18:19:49 2020 -0400 virtiofs: implement FUSE_INIT map_alignment field The device communicates FUSE_SETUPMAPPING/FUSE_REMOVMAPPING alignment constraints via the FUST_INIT map_alignment field. Parse this field and ensure our DAX mappings meet the alignment constraints. We don't actually align anything differently since our mappings are already 2MB aligned. Just check the value when the connection is established. If it becomes necessary to honor arbitrary alignments in the future we'll have to adjust how mappings are sized. The upshot of this commit is that we can be confident that mappings will work even when emulating x86 on Power and similar combinations where the host page sizes are different. Signed-off-by: Stefan Hajnoczi Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 45f2348eceb6a2a5b248ef44ea7dc2c4ede88b30 Author: Vivek Goyal Date: Wed Aug 19 18:19:48 2020 -0400 virtiofs: keep a list of free dax memory ranges Divide the dax memory range into fixed size ranges (2MB for now) and put them in a list. This will track free ranges. Once an inode requires a free range, we will take one from here and put it in interval-tree of ranges assigned to inode. Signed-off-by: Vivek Goyal Signed-off-by: Peng Tao Signed-off-by: Miklos Szeredi commit 1dd539577c42b67da796e2e758e04171bb889779 Author: Vivek Goyal Date: Wed Aug 19 18:19:47 2020 -0400 virtiofs: add a mount option to enable dax Add a mount option to allow using dax with virtio_fs. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 22f3787e9d95e72d1f09795f294fb010e2998f43 Author: Stefan Hajnoczi Date: Wed Aug 19 18:19:46 2020 -0400 virtiofs: set up virtio_fs dax_device Setup a dax device. Use the shm capability to find the cache entry and map it. The DAX window is accessed by the fs/dax.c infrastructure and must have struct pages (at least on x86). Use devm_memremap_pages() to map the DAX window PCI BAR and allocate struct page. Signed-off-by: Stefan Hajnoczi Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal Signed-off-by: Sebastien Boeuf Signed-off-by: Liu Bo Signed-off-by: Miklos Szeredi commit f4fd4ae354ba23c948afb0ee3386182acb96d481 Author: Vivek Goyal Date: Wed Aug 19 18:19:45 2020 -0400 virtiofs: get rid of no_mount_options This option was introduced so that for virtio_fs we don't show any mounts options fuse_show_options(). Because we don't offer any of these options to be controlled by mounter. Very soon we are planning to introduce option "dax" which mounter should be able to specify. And no_mount_options does not work anymore. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit b43b7e81eb2b188fab1d8bc334b4b725f6d2ae10 Author: Vivek Goyal Date: Wed Aug 19 18:19:44 2020 -0400 virtiofs: provide a helper function for virtqueue initialization This reduces code duplication and make it little easier to read code. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 6bbdd563ee9a6078725727571586c66c8613db64 Author: Vivek Goyal Date: Tue Mar 3 14:58:21 2020 -0500 dax: Create a range version of dax_layout_busy_page() virtiofs device has a range of memory which is mapped into file inodes using dax. This memory is mapped in qemu on host and maps different sections of real file on host. Size of this memory is limited (determined by administrator) and depending on filesystem size, we will soon reach a situation where all the memory is in use and we need to reclaim some. As part of reclaim process, we will need to make sure that there are no active references to pages (taken by get_user_pages()) on the memory range we are trying to reclaim. I am planning to use dax_layout_busy_page() for this. But in current form this is per inode and scans through all the pages of the inode. We want to reclaim only a portion of memory (say 2MB page). So we want to make sure that only that 2MB range of pages do not have any references (and don't want to unmap all the pages of inode). Hence, create a range version of this function named dax_layout_busy_page_range() which can be used to pass a range which needs to be unmapped. Cc: Dan Williams Cc: linux-nvdimm@lists.01.org Cc: Jan Kara Cc: Vishal L Verma Cc: "Weiny, Ira" Signed-off-by: Vivek Goyal Reviewed-by: Jan Kara Signed-off-by: Miklos Szeredi commit 1a9d5d405962d134acb8efb4ccb4bc17805134c7 Author: Vivek Goyal Date: Wed Aug 19 18:19:39 2020 -0400 dax: Modify bdev_dax_pgoff() to handle NULL bdev virtiofs does not have a block device but it has dax device. Modify bdev_dax_pgoff() to be able to handle that. If there is no bdev, that means dax offset is 0. (It can't be a partition block device starting at an offset in dax device). This is little hackish. There have been discussions about getting rid of dax not supporting partitions. https://lore.kernel.org/linux-fsdevel/20200107125159.GA15745@infradead.org/ IMHO, this path can easily break exisitng users. For example ioctl(BLKPG_ADD_PARTITION) will start breaking on block devices supporting DAX. Also, I personally find it very useful to be able to partition dax devices and still be able to use DAX. Alternatively, I tried to store offset into dax device information in iomap interface, but that got NACKed. https://lore.kernel.org/linux-fsdevel/20200217133117.GB20444@infradead.org/ I can't think of a good path to solve this issue properly. So to make progress, it seems this patch is least bad option for now and I hope we can take it. Signed-off-by: Stefan Hajnoczi Signed-off-by: Vivek Goyal Reviewed-by: Jan Kara Cc: Christoph Hellwig Cc: Dan Williams Cc: Jan Kara Cc: Vishal L Verma Cc: "Weiny, Ira" Cc: linux-nvdimm@lists.01.org Signed-off-by: Miklos Szeredi commit 27bd6129a4c5b1269540c925bfda1c280cbb9f1d Merge: c1b0c62715102 38e895487afc2 Author: Miklos Szeredi Date: Thu Sep 10 11:34:14 2020 +0200 Merge branch 'virtio-shm' into for-next Pull virtio shared memory region patches for virtiofs shared memory (DAX) support. commit 221bfce5ebbdf72ff08b3bf2510ae81058ee568b Author: Kim Phillips Date: Tue Sep 8 16:47:36 2020 -0500 arch/x86/amd/ibs: Fix re-arming IBS Fetch Stephane Eranian found a bug in that IBS' current Fetch counter was not being reset when the driver would write the new value to clear it along with the enable bit set, and found that adding an MSR write that would first disable IBS Fetch would make IBS Fetch reset its current count. Indeed, the PPR for AMD Family 17h Model 31h B0 55803 Rev 0.54 - Sep 12, 2019 states "The periodic fetch counter is set to IbsFetchCnt [...] when IbsFetchEn is changed from 0 to 1." Explicitly set IbsFetchEn to 0 and then to 1 when re-enabling IBS Fetch, so the driver properly resets the internal counter to 0 and IBS Fetch starts counting again. A family 15h machine tested does not have this problem, and the extra wrmsr is also not needed on Family 19h, so only do the extra wrmsr on families 16h through 18h. Reported-by: Stephane Eranian Signed-off-by: Kim Phillips [peterz: optimized] Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 commit a77259bdcb62a2c345914df659a1fbc421269a8b Author: Kim Phillips Date: Tue Sep 8 16:47:40 2020 -0500 perf/x86/rapl: Add AMD Fam19h RAPL support Family 19h RAPL support did not change from Family 17h; extend the existing Fam17h support to work on Family 19h too. Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200908214740.18097-8-kim.phillips@amd.com commit 8b0bed7d410f48499d72af2e2bcd890daad94e0d Author: Kim Phillips Date: Tue Sep 8 16:47:39 2020 -0500 perf/x86/amd/ibs: Support 27-bit extended Op/cycle counter IBS hardware with the OpCntExt feature gets a 7-bit wider internal counter. Both the maximum and current count bitfields in the IBS_OP_CTL register are extended to support reading and writing it. No changes are necessary to the driver for handling the extra contiguous current count bits (IbsOpCurCnt), as the driver already passes through 32 bits of that field. However, the driver has to do some extra bit manipulation when converting from a period to the non-contiguous (although conveniently aligned) extra bits in the IbsOpMaxCnt bitfield. This decreases IBS Op interrupt overhead when the period is over 1,048,560 (0xffff0), which would previously activate the driver's software counter. That threshold is now 134,217,712 (0x7fffff0). Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200908214740.18097-7-kim.phillips@amd.com commit 36e1be8ada994d509538b3b1d0af8b63c351e729 Author: Kim Phillips Date: Tue Sep 8 16:47:38 2020 -0500 perf/x86/amd/ibs: Fix raw sample data accumulation Neither IbsBrTarget nor OPDATA4 are populated in IBS Fetch mode. Don't accumulate them into raw sample user data in that case. Also, in Fetch mode, add saving the IBS Fetch Control Extended MSR. Technically, there is an ABI change here with respect to the IBS raw sample data format, but I don't see any perf driver version information being included in perf.data file headers, but, existing users can detect whether the size of the sample record has reduced by 8 bytes to determine whether the IBS driver has this fix. Fixes: 904cb3677f3a ("perf/x86/amd/ibs: Update IBS MSRs and feature definitions") Reported-by: Stephane Eranian Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20200908214740.18097-6-kim.phillips@amd.com commit 680d69635005ba0e58fe3f4c52fc162b8fc743b0 Author: Kim Phillips Date: Tue Sep 8 16:47:37 2020 -0500 perf/x86/amd/ibs: Don't include randomized bits in get_ibs_op_count() get_ibs_op_count() adds hardware's current count (IbsOpCurCnt) bits to its count regardless of hardware's valid status. According to the PPR for AMD Family 17h Model 31h B0 55803 Rev 0.54, if the counter rolls over, valid status is set, and the lower 7 bits of IbsOpCurCnt are randomized by hardware. Don't include those bits in the driver's event count. Fixes: 8b1e13638d46 ("perf/x86-ibs: Fix usage of IBS op current count") Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 commit 26e52558ead4b39c0e0fe7bf08f82f5a9777a412 Author: Kim Phillips Date: Tue Sep 8 16:47:35 2020 -0500 perf/x86/amd: Fix sampling Large Increment per Cycle events Commit 5738891229a2 ("perf/x86/amd: Add support for Large Increment per Cycle Events") mistakenly zeroes the upper 16 bits of the count in set_period(). That's fine for counting with perf stat, but not sampling with perf record when only Large Increment events are being sampled. To enable sampling, we sign extend the upper 16 bits of the merged counter pair as described in the Family 17h PPRs: "Software wanting to preload a value to a merged counter pair writes the high-order 16-bit value to the low-order 16 bits of the odd counter and then writes the low-order 48-bit value to the even counter. Reading the even counter of the merged counter pair returns the full 64-bit value." Fixes: 5738891229a2 ("perf/x86/amd: Add support for Large Increment per Cycle Events") Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 commit c8fe99d0701fec9fb849ec880a86bc5592530496 Author: Kim Phillips Date: Tue Sep 8 16:47:34 2020 -0500 perf/amd/uncore: Set all slices and threads to restore perf stat -a behaviour Commit 2f217d58a8a0 ("perf/x86/amd/uncore: Set the thread mask for F17h L3 PMCs") inadvertently changed the uncore driver's behaviour wrt perf tool invocations with or without a CPU list, specified with -C / --cpu=. Change the behaviour of the driver to assume the former all-cpu (-a) case, which is the more commonly desired default. This fixes '-a -A' invocations without explicit cpu lists (-C) to not count L3 events only on behalf of the first thread of the first core in the L3 domain. BEFORE: Activity performed by the first thread of the last core (CPU#43) in CPU#40's L3 domain is not reported by CPU#40: sudo perf stat -a -A -e l3_request_g1.caching_l3_cache_accesses taskset -c 43 perf bench mem memcpy -s 32mb -l 100 -f default ... CPU36 21,835 l3_request_g1.caching_l3_cache_accesses CPU40 87,066 l3_request_g1.caching_l3_cache_accesses CPU44 17,360 l3_request_g1.caching_l3_cache_accesses ... AFTER: The L3 domain activity is now reported by CPU#40: sudo perf stat -a -A -e l3_request_g1.caching_l3_cache_accesses taskset -c 43 perf bench mem memcpy -s 32mb -l 100 -f default ... CPU36 354,891 l3_request_g1.caching_l3_cache_accesses CPU40 1,780,870 l3_request_g1.caching_l3_cache_accesses CPU44 315,062 l3_request_g1.caching_l3_cache_accesses ... Fixes: 2f217d58a8a0 ("perf/x86/amd/uncore: Set the thread mask for F17h L3 PMCs") Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20200908214740.18097-2-kim.phillips@amd.com commit 44fae179ce73a26733d9e2d346da4e1a1cb94647 Author: Kan Liang Date: Fri Aug 21 12:57:53 2020 -0700 perf/core: Pull pmu::sched_task() into perf_event_context_sched_out() The pmu::sched_task() is a context switch callback. It passes the cpuctx->task_ctx as a parameter to the lower code. To find the cpuctx->task_ctx, the current code iterates a cpuctx list. The same context will iterated in perf_event_context_sched_out() soon. Share the cpuctx->task_ctx can avoid the unnecessary iteration of the cpuctx list. The pmu::sched_task() is also required for the optimization case for equivalent contexts. The task_ctx_sched_out() will eventually disable and reenable the PMU when schedule out events. Add perf_pmu_disable() and perf_pmu_enable() around task_ctx_sched_out() don't break anything. Drop the cpuctx->ctx.lock for the pmu::sched_task(). The lock is for per-CPU context, which is not necessary for the per-task context schedule. No one uses sched_cb_entry, perf_sched_cb_usages, sched_cb_list, and perf_pmu_sched_task() any more. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200821195754.20159-2-kan.liang@linux.intel.com commit 556cccad389717d6eb4f5a24b45ff41cad3aaabf Author: Kan Liang Date: Fri Aug 21 12:57:52 2020 -0700 perf/core: Pull pmu::sched_task() into perf_event_context_sched_in() The pmu::sched_task() is a context switch callback. It passes the cpuctx->task_ctx as a parameter to the lower code. To find the cpuctx->task_ctx, the current code iterates a cpuctx list. The same context was just iterated in perf_event_context_sched_in(), which is invoked right before the pmu::sched_task(). Reuse the cpuctx->task_ctx from perf_event_context_sched_in() can avoid the unnecessary iteration of the cpuctx list. Both pmu::sched_task and perf_event_context_sched_in() have to disable PMU. Pull the pmu::sched_task into perf_event_context_sched_in() can also save the overhead from the PMU disable and reenable. The new and old tasks may have equivalent contexts. The current code optimize this case by swapping the context, which avoids the scheduling. For this case, pmu::sched_task() is still required, e.g., restore the LBR content. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200821195754.20159-1-kan.liang@linux.intel.com commit 35d1ce6bec133679ff16325d335217f108b84871 Author: Kan Liang Date: Wed Sep 2 14:06:49 2020 -0700 perf/x86/intel/ds: Fix x86_pmu_stop warning for large PEBS A warning as below may be triggered when sampling with large PEBS. [ 410.411250] perf: interrupt took too long (72145 > 71975), lowering kernel.perf_event_max_sample_rate to 2000 [ 410.724923] ------------[ cut here ]------------ [ 410.729822] WARNING: CPU: 0 PID: 16397 at arch/x86/events/core.c:1422 x86_pmu_stop+0x95/0xa0 [ 410.933811] x86_pmu_del+0x50/0x150 [ 410.937304] event_sched_out.isra.0+0xbc/0x210 [ 410.941751] group_sched_out.part.0+0x53/0xd0 [ 410.946111] ctx_sched_out+0x193/0x270 [ 410.949862] __perf_event_task_sched_out+0x32c/0x890 [ 410.954827] ? set_next_entity+0x98/0x2d0 [ 410.958841] __schedule+0x592/0x9c0 [ 410.962332] schedule+0x5f/0xd0 [ 410.965477] exit_to_usermode_loop+0x73/0x120 [ 410.969837] prepare_exit_to_usermode+0xcd/0xf0 [ 410.974369] ret_from_intr+0x2a/0x3a [ 410.977946] RIP: 0033:0x40123c [ 411.079661] ---[ end trace bc83adaea7bb664a ]--- In the non-overflow context, e.g., context switch, with large PEBS, perf may stop an event twice. An example is below. //max_samples_per_tick is adjusted to 2 //NMI is triggered intel_pmu_handle_irq() handle_pmi_common() drain_pebs() __intel_pmu_pebs_event() perf_event_overflow() __perf_event_account_interrupt() hwc->interrupts = 1 return 0 //A context switch happens right after the NMI. //In the same tick, the perf_throttled_seq is not changed. perf_event_task_sched_out() perf_pmu_sched_task() intel_pmu_drain_pebs_buffer() __intel_pmu_pebs_event() perf_event_overflow() __perf_event_account_interrupt() ++hwc->interrupts >= max_samples_per_tick return 1 x86_pmu_stop(); # First stop perf_event_context_sched_out() task_ctx_sched_out() ctx_sched_out() event_sched_out() x86_pmu_del() x86_pmu_stop(); # Second stop and trigger the warning Perf should only invoke the perf_event_overflow() in the overflow context. Current drain_pebs() is called from: - handle_pmi_common() -- overflow context - intel_pmu_pebs_sched_task() -- non-overflow context - intel_pmu_pebs_disable() -- non-overflow context - intel_pmu_auto_reload_read() -- possible overflow context With PERF_SAMPLE_READ + PERF_FORMAT_GROUP, the function may be invoked in the NMI handler. But, before calling the function, the PEBS buffer has already been drained. The __intel_pmu_pebs_event() will not be called in the possible overflow context. To fix the issue, an indicator is required to distinguish between the overflow context aka handle_pmi_common() and other cases. The dummy regs pointer can be used as the indicator. In the non-overflow context, perf should treat the last record the same as other PEBS records, and doesn't invoke the generic overflow handler. Fixes: 21509084f999 ("perf/x86/intel: Handle multiple records in the PEBS buffer") Reported-by: Like Xu Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Like Xu Link: https://lkml.kernel.org/r/20200902210649.2743-1-kan.liang@linux.intel.com commit 1909760f5fc3f123e47b4e24e0ccdc0fc8f3f106 Author: Ahmed S. Darwish Date: Fri Sep 4 17:32:31 2020 +0200 seqlock: PREEMPT_RT: Do not starve seqlock_t writers On PREEMPT_RT, seqlock_t is transformed to a sleeping lock that do not disable preemption. A seqlock_t reader can thus preempt its write side section and spin for the enter scheduler tick. If that reader belongs to a real-time scheduling class, it can spin forever and the kernel will livelock. To break this livelock possibility on PREEMPT_RT, implement seqlock_t in terms of "seqcount_spinlock_t" instead of plain "seqcount_t". Beside its pure annotational value, this will leverage the existing seqcount_LOCKNAME_T PREEMPT_RT anti-livelock mechanisms, without adding any extra code. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200904153231.11994-6-a.darwish@linutronix.de commit 8117ab508f9c476e0a10b9db7f4818f784cf3176 Author: Ahmed S. Darwish Date: Fri Sep 4 17:32:30 2020 +0200 seqlock: seqcount_LOCKNAME_t: Introduce PREEMPT_RT support Preemption must be disabled before entering a sequence counter write side critical section. Otherwise the read side section can preempt the write side section and spin for the entire scheduler tick. If that reader belongs to a real-time scheduling class, it can spin forever and the kernel will livelock. Disabling preemption cannot be done for PREEMPT_RT though: it can lead to higher latencies, and the write side sections will not be able to acquire locks which become sleeping locks (e.g. spinlock_t). To remain preemptible, while avoiding a possible livelock caused by the reader preempting the writer, use a different technique: let the reader detect if a seqcount_LOCKNAME_t writer is in progress. If that's the case, acquire then release the associated LOCKNAME writer serialization lock. This will allow any possibly-preempted writer to make progress until the end of its writer serialization lock critical section. Implement this lock-unlock technique for all seqcount_LOCKNAME_t with an associated (PREEMPT_RT) sleeping lock. References: 55f3560df975 ("seqlock: Extend seqcount API with associated locks") Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200519214547.352050-1-a.darwish@linutronix.de commit 52ac39e5db5148f70392edb654ad882ac8da88a8 Author: Ahmed S. Darwish Date: Fri Sep 4 17:32:29 2020 +0200 seqlock: seqcount_t: Implement all read APIs as statement expressions The sequence counters read APIs are implemented as CPP macros, so they can take either seqcount_t or any of the seqcount_LOCKNAME_t variants. Such macros then get *directly* transformed to internal C functions that only take plain seqcount_t. Further commits need access to seqcount_LOCKNAME_t inside of the actual read APIs code. Thus transform all of the seqcount read APIs to pure GCC statement expressions instead. This will not break type-safety: all of the transformed APIs resolve to a _Generic() selection that does not have a "default" case. This will also not affect the transformed APIs readability: previously added kernel-doc above all of seqlock.h functions makes the expectations quite clear for call-site developers. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200904153231.11994-4-a.darwish@linutronix.de commit 5cdd25572a29e46f932d3e6eedbd07429de66431 Author: Ahmed S. Darwish Date: Fri Sep 4 17:32:28 2020 +0200 seqlock: Use unique prefix for seqcount_t property accessors At seqlock.h, the following set of functions: - __seqcount_ptr() - __seqcount_preemptible() - __seqcount_assert() act as plain seqcount_t "property" accessors. Meanwhile, the following group: - __seqcount_ptr() - __seqcount_lock_preemptible() - __seqcount_assert_lock_held() act as the equivalent set, but in the generic form, taking either seqcount_t or any of the seqcount_LOCKNAME_t variants. This is quite confusing, especially the first member where it is called exactly the same in both groups. Differentiate the first group by using "__seqprop" as prefix, and also use that same prefix for all of seqcount_LOCKNAME_t property accessors. While at it, constify the property accessors first parameter when appropriate. References: 55f3560df975 ("seqlock: Extend seqcount API with associated locks") Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200904153231.11994-3-a.darwish@linutronix.de commit 6dd699b13d53f26a7603702d8bada3482312df74 Author: Ahmed S. Darwish Date: Fri Sep 4 17:32:27 2020 +0200 seqlock: seqcount_LOCKNAME_t: Standardize naming convention At seqlock.h, sequence counters with associated locks are either called seqcount_LOCKNAME_t, seqcount_LOCKTYPE_t, or seqcount_locktype_t. Standardize on seqcount_LOCKNAME_t for all instances in comments, kernel-doc, and SEQCOUNT_LOCKNAME() generative macro paramters. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200904153231.11994-2-a.darwish@linutronix.de commit 0c9794c8b6781eb7dad8e19b78c5d4557790597a Author: Ahmed S. Darwish Date: Thu Aug 27 13:40:44 2020 +0200 seqlock: seqcount latch APIs: Only allow seqcount_latch_t All latch sequence counter call-sites have now been converted from plain seqcount_t to the new seqcount_latch_t data type. Enforce type-safety by modifying seqlock.h latch APIs to only accept seqcount_latch_t. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200827114044.11173-9-a.darwish@linutronix.de commit 24bf401cebfd630cc9e2c3746e43945e836626f9 Author: Ahmed S. Darwish Date: Thu Aug 27 13:40:43 2020 +0200 rbtree_latch: Use seqcount_latch_t Latch sequence counters have unique read and write APIs, and thus seqcount_latch_t was recently introduced at seqlock.h. Use that new data type instead of plain seqcount_t. This adds the necessary type-safety and ensures that only latching-safe seqcount APIs are to be used. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200827114044.11173-8-a.darwish@linutronix.de commit a1f1066133d85d5f42217cc72a2490bb7aa889c5 Author: Ahmed S. Darwish Date: Thu Aug 27 13:40:42 2020 +0200 x86/tsc: Use seqcount_latch_t Latch sequence counters have unique read and write APIs, and thus seqcount_latch_t was recently introduced at seqlock.h. Use that new data type instead of plain seqcount_t. This adds the necessary type-safety and ensures that only latching-safe seqcount APIs are to be used. Signed-off-by: Ahmed S. Darwish [peterz: unwreck cyc2ns_read_begin()] Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200827114044.11173-7-a.darwish@linutronix.de commit 249d053835320cb3e7c00066cf085a6ba9b1f126 Author: Ahmed S. Darwish Date: Thu Aug 27 13:40:41 2020 +0200 timekeeping: Use seqcount_latch_t Latch sequence counters are a multiversion concurrency control mechanism where the seqcount_t counter even/odd value is used to switch between two data storage copies. This allows the seqcount_t read path to safely interrupt its write side critical section (e.g. from NMIs). Initially, latch sequence counters were implemented as a single write function, raw_write_seqcount_latch(), above plain seqcount_t. The read path was expected to use plain seqcount_t raw_read_seqcount(). A specialized read function was later added, raw_read_seqcount_latch(), and became the standardized way for latch read paths. Having unique read and write APIs meant that latch sequence counters are basically a data type of their own -- just inappropriately overloading plain seqcount_t. The seqcount_latch_t data type was thus introduced at seqlock.h. Use that new data type instead of seqcount_raw_spinlock_t. This ensures that only latch-safe APIs are to be used with the sequence counter. Note that the use of seqcount_raw_spinlock_t was not very useful in the first place. Only the "raw_" subset of seqcount_t APIs were used at timekeeping.c. This subset was created for contexts where lockdep cannot be used. seqcount_LOCKTYPE_t's raison d'être -- verifying that the seqcount_t writer serialization lock is held -- cannot thus be done. References: 0c3351d451ae ("seqlock: Use raw_ prefix instead of _no_lockdep") References: 55f3560df975 ("seqlock: Extend seqcount API with associated locks") Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200827114044.11173-6-a.darwish@linutronix.de commit a690ed07353ec45f056b0a6f87c23a12a59c030d Author: Ahmed S. Darwish Date: Thu Aug 27 13:40:40 2020 +0200 time/sched_clock: Use seqcount_latch_t Latch sequence counters have unique read and write APIs, and thus seqcount_latch_t was recently introduced at seqlock.h. Use that new data type instead of plain seqcount_t. This adds the necessary type-safety and ensures only latching-safe seqcount APIs are to be used. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200827114044.11173-5-a.darwish@linutronix.de commit 80793c3471d90d4dc2b48deadb6413bdfe39500f Author: Ahmed S. Darwish Date: Thu Aug 27 13:40:39 2020 +0200 seqlock: Introduce seqcount_latch_t Latch sequence counters are a multiversion concurrency control mechanism where the seqcount_t counter even/odd value is used to switch between two copies of protected data. This allows the seqcount_t read path to safely interrupt its write side critical section (e.g. from NMIs). Initially, latch sequence counters were implemented as a single write function above plain seqcount_t: raw_write_seqcount_latch(). The read side was expected to use plain seqcount_t raw_read_seqcount(). A specialized latch read function, raw_read_seqcount_latch(), was later added. It became the standardized way for latch read paths. Due to the dependent load, it has one read memory barrier less than the plain seqcount_t raw_read_seqcount() API. Only raw_write_seqcount_latch() and raw_read_seqcount_latch() should be used with latch sequence counters. Having *unique* read and write path APIs means that latch sequence counters are actually a data type of their own -- just inappropriately overloading plain seqcount_t. Introduce seqcount_latch_t. This adds type-safety and ensures that only the correct latch-safe APIs are to be used. Not to break bisection, let the latch APIs also accept plain seqcount_t or seqcount_raw_spinlock_t. After converting all call sites to seqcount_latch_t, only that new data type will be allowed. References: 9b0fd802e8c0 ("seqcount: Add raw_write_seqcount_latch()") References: 7fc26327b756 ("seqlock: Introduce raw_read_seqcount_latch()") References: aadd6e5caaac ("time/sched_clock: Use raw_read_seqcount_latch()") Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200827114044.11173-4-a.darwish@linutronix.de commit 6446a5131e24a834606c15a965fa920041581c2c Author: Ahmed S. Darwish Date: Thu Aug 27 13:40:38 2020 +0200 mm/swap: Do not abuse the seqcount_t latching API Commit eef1a429f234 ("mm/swap.c: piggyback lru_add_drain_all() calls") implemented an optimization mechanism to exit the to-be-started LRU drain operation (name it A) if another drain operation *started and finished* while (A) was blocked on the LRU draining mutex. This was done through a seqcount_t latch, which is an abuse of its semantics: 1. seqcount_t latching should be used for the purpose of switching between two storage places with sequence protection to allow interruptible, preemptible, writer sections. The referenced optimization mechanism has absolutely nothing to do with that. 2. The used raw_write_seqcount_latch() has two SMP write memory barriers to insure one consistent storage place out of the two storage places available. A full memory barrier is required instead: to guarantee that the pagevec counter stores visible by local CPU are visible to other CPUs -- before loading the current drain generation. Beside the seqcount_t API abuse, the semantics of a latch sequence counter was force-fitted into the referenced optimization. What was meant is to track "generations" of LRU draining operations, where "global lru draining generation = x" implies that all generations 0 < n <= x are already *scheduled* for draining -- thus nothing needs to be done if the current generation number n <= x. Remove the conceptually-inappropriate seqcount_t latch usage. Manually implement the referenced optimization using a counter and SMP memory barriers. Note, while at it, use the non-atomic variant of cpumask_set_cpu(), __cpumask_set_cpu(), due to the already existing mutex protection. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/87y2pg9erj.fsf@vostro.fn.ogness.net commit 58faf20a086bd34f91983609e26eac3d5fe76be3 Author: Ahmed S. Darwish Date: Thu Aug 27 13:40:37 2020 +0200 time/sched_clock: Use raw_read_seqcount_latch() during suspend sched_clock uses seqcount_t latching to switch between two storage places protected by the sequence counter. This allows it to have interruptible, NMI-safe, seqcount_t write side critical sections. Since 7fc26327b756 ("seqlock: Introduce raw_read_seqcount_latch()"), raw_read_seqcount_latch() became the standardized way for seqcount_t latch read paths. Due to the dependent load, it has one read memory barrier less than the currently used raw_read_seqcount() API. Use raw_read_seqcount_latch() for the suspend path. Commit aadd6e5caaac ("time/sched_clock: Use raw_read_seqcount_latch()") missed changing that instance of raw_read_seqcount(). References: 1809bfa44e10 ("timers, sched/clock: Avoid deadlock during read from NMI") Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200715092345.GA231464@debian-buster-darwi.lab.linutronix.de commit 38e895487afc2ed42c11045853cbb3fa20b52b6e Author: Sebastien Boeuf Date: Wed Aug 19 18:19:43 2020 -0400 virtio: Implement get_shm_region for MMIO transport On MMIO a new set of registers is defined for finding SHM regions. Add their definitions and use them to find the region. Signed-off-by: Sebastien Boeuf Cc: kvm@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: "Michael S. Tsirkin" Signed-off-by: Miklos Szeredi commit 0dd4ff93f4c8dba016ad79384007da4938cd54a1 Author: Sebastien Boeuf Date: Wed Aug 19 18:19:42 2020 -0400 virtio: Implement get_shm_region for PCI transport On PCI the shm regions are found using capability entries; find a region by searching for the capability. Signed-off-by: Sebastien Boeuf Signed-off-by: Dr. David Alan Gilbert Signed-off-by: kbuild test robot Acked-by: Michael S. Tsirkin Cc: kvm@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: "Michael S. Tsirkin" Signed-off-by: Miklos Szeredi commit 5bfe37ca8ac8e9176bfd923d0a83802b7305d2f5 Author: Sebastien Boeuf Date: Wed Aug 19 18:19:41 2020 -0400 virtio: Add get_shm_region method Virtio defines 'shared memory regions' that provide a continuously shared region between the host and guest. Provide a method to find a particular region on a device. Signed-off-by: Sebastien Boeuf Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Cc: kvm@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: "Michael S. Tsirkin" Signed-off-by: Miklos Szeredi commit d1c10767837c4181f2e054865a58166fc117783b Author: Jan Kara Date: Wed Sep 9 15:54:46 2020 +0200 quota: Expand comment describing d_itimer Expand comment describing d_itimer in struct fs_disk_quota. Reported-by: Matthew Wilcox Signed-off-by: Jan Kara commit ad47ff330b26a9fefa882032be2122700e1625ab Author: Darrick J. Wong Date: Wed Sep 9 09:34:13 2020 -0700 quota: widen timestamps for the fs_disk_quota structure Soon, XFS will support quota grace period expiration timestamps beyond the year 2038, widen the timestamp fields to handle the extra time bits. Internally, XFS now stores unsigned 34-bit quantities, so the extra 8 bits here should work fine. (Note that XFS is the only user of this structure.) Link: https://lore.kernel.org/r/20200909163413.GJ7955@magnolia Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit 13138ab2dacd0076a93f74b49ea8fe806e49c3f5 Author: YueHaibing Date: Wed Sep 9 21:41:37 2020 +0800 drm/panel: s6e63m0: Add missing MODULE_LICENSE Kbuild warns when this file is built as a loadable module: WARNING: modpost: missing MODULE_LICENSE() in drivers/gpu/drm/panel/panel-samsung-s6e63m0.o Add the missing license/author/description tags. Fixes: b7b23e447687 ("drm/panel: s6e63m0: Break out SPI transport") Signed-off-by: YueHaibing Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200909134137.32284-1-yuehaibing@huawei.com commit c00579943c576e02154c9b2bf29b3164a06756c6 Author: Zheng Bin Date: Wed Sep 9 20:19:00 2020 +0800 drm/bridge/tc358775: Remove unneeded semicolon Fixes coccicheck warning: drivers/gpu/drm/bridge/tc358775.c:488:2-3: Unneeded semicolon Signed-off-by: Zheng Bin Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200909121900.103712-1-zhengbin13@huawei.com commit be0704beb229431f206fee3ddd65fa2c5eebdce3 Author: Marek Szyprowski Date: Thu Apr 30 13:57:22 2020 +0200 samples: vfio-mdev/mbochs: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. While touching this code, also add missing call to dma_unmap_sgtable. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy commit 62296b395a512930686666089ad285b1f78fd2f0 Author: Marek Szyprowski Date: Mon Apr 6 16:41:45 2020 +0200 dmabuf: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Acked-by: Gerd Hoffmann commit 34e8548168758f1adf50984f40ce190e5c19c621 Author: Marek Szyprowski Date: Fri May 8 16:10:16 2020 +0200 drm: rcar-du: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. dma_map_sgtable() function returns zero or an error code, so adjust the return value check for the vsp1_du_map_sg() function. Signed-off-by: Marek Szyprowski Reviewed-by: Laurent Pinchart commit 67ed9f9d95189d0f99c38f34b8bb1a8fa135c877 Author: Marek Szyprowski Date: Tue Apr 28 13:11:16 2020 +0200 drm: host1x: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy commit d1749eb1ab85e04e58c29e58900e3abebbdd6e82 Author: Marek Szyprowski Date: Fri May 8 16:07:13 2020 +0200 xen: gntdev: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Acked-by: Juergen Gross commit 5e0ff16b9edf3379e5a0e1545b0d9831a7353cca Author: Marek Szyprowski Date: Tue Apr 28 13:10:45 2020 +0200 drm: xen: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. Fix the code to refer to proper nents or orig_nents entries. This driver reports the number of the pages in the imported scatterlist, so it should refer to sg_table->orig_nents entry. Signed-off-by: Marek Szyprowski Acked-by: Oleksandr Andrushchenko commit c915c2cbaf5eb256d26f40cfce1c5defbfcadab9 Author: Marek Szyprowski Date: Tue Apr 28 13:10:36 2020 +0200 drm: vmwgfx: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Acked-by: Roland Scheidegger commit 75ef337bdba418e7b8117765aa03a8d261b8f32d Author: Marek Szyprowski Date: Tue Apr 28 13:10:19 2020 +0200 drm: virtio: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Acked-by: Gerd Hoffmann commit e96418da0a2b9f52538c4a84f6f565708d7ed32e Author: Marek Szyprowski Date: Fri May 8 08:26:50 2020 +0200 drm: v3d: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Reviewed-by: Eric Anholt commit d4fea3e61b47a22e57a58d7afd6f0209051208bd Author: Marek Szyprowski Date: Tue Apr 28 13:10:10 2020 +0200 drm: tegra: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy commit 82c245b592da791c63316e7a82d9b9d01552c0c5 Author: Marek Szyprowski Date: Tue Apr 28 13:10:01 2020 +0200 drm: rockchip: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy commit 6a8f15c62cd9235a3a4eb1c96e79131061310d57 Author: Marek Szyprowski Date: Thu Apr 30 14:02:47 2020 +0200 drm: rockchip: use common helper for a scatterlist contiguity check Use common helper for checking the contiguity of the imported dma-buf. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy commit 34a4e66faf8b22c8409cbd46839ba5e488b1e6a9 Author: Marek Szyprowski Date: Tue Apr 28 13:09:35 2020 +0200 drm: panfrost: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Reviewed-by: Steven Price Reviewed-by: Rob Herring commit 537606558c08e1dcb2d35b67aab9d80253dbc6c4 Author: Marek Szyprowski Date: Fri May 8 11:02:26 2020 +0200 drm: omapdrm: use common helper for extracting pages array Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy commit 7690a33f22abab03274d9f5337e22c340664bc45 Author: Marek Szyprowski Date: Fri May 8 09:56:57 2020 +0200 drm: msm: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Acked-by: Rob Clark commit 90dcf4449008cfae24ffd920c0998c09ada46aad Author: Marek Szyprowski Date: Fri May 8 11:02:47 2020 +0200 drm: mediatek: use common helper for extracting pages array Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy Acked-by: Chun-Kuang Hu commit 960db7fcbd67abbea52ab08baa8290fbd027fe3c Author: Marek Szyprowski Date: Fri May 8 08:25:52 2020 +0200 drm: mediatek: use common helper for a scatterlist contiguity check Use common helper for checking the contiguity of the imported dma-buf and do this check before allocating resources, so the error path is simpler. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy Acked-by: Chun-Kuang Hu commit c3d9c17f486d5c54940487dc31a54ebfdeeb371a Author: Marek Szyprowski Date: Tue Apr 28 13:09:11 2020 +0200 drm: lima: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Reviewed-by: Qiang Yu commit b827e3ac4185a6091b90263b6516b54a766c109e Author: Marek Szyprowski Date: Mon May 4 13:12:07 2020 +0200 drm: i915: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. This driver creatively uses sg_table->orig_nents to store the size of the allocated scatterlist and ignores the number of the entries returned by dma_map_sg function. The sg_table->orig_nents is (mis)used to properly free the (over)allocated scatterlist. This patch only introduces the common DMA-mapping wrappers operating directly on the struct sg_table objects to the dmabuf related functions, so the other drivers, which might share buffers with i915 could rely on the properly set nents and orig_nents values. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy Reviewed-by: Michael J. Ruhl commit 84404614167b829f7b58189cd24b6c0c74897171 Author: Marek Szyprowski Date: Tue Apr 28 13:08:41 2020 +0200 drm: exynos: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Acked-by : Inki Dae commit 10740255d8beb78c6d3fd7a332f1a0e3e7dff878 Author: Marek Szyprowski Date: Thu Apr 30 14:02:25 2020 +0200 drm: exynos: use common helper for a scatterlist contiguity check Use common helper for checking the contiguity of the imported dma-buf. Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Acked-by : Inki Dae commit 182354a526a0540c9197e03d9fce8a949ffd36ca Author: Marek Szyprowski Date: Tue Apr 28 13:08:23 2020 +0200 drm: etnaviv: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Reviewed-by: Robin Murphy Acked-by: Lucas Stach commit efcb3730ef4b2911bbe98a686468a5173c786150 Author: Marek Szyprowski Date: Tue Apr 28 13:08:07 2020 +0200 drm: armada: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski commit 6c6fa39ca958d5313ff90d3e6c3064e0043c1da3 Author: Marek Szyprowski Date: Mon May 11 12:27:54 2020 +0200 drm: core: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Reviewed-by: Robin Murphy commit 0552daac2d18fc92c71c94492476b8eb521227e9 Author: Marek Szyprowski Date: Fri May 8 16:05:14 2020 +0200 drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays() Replace the current hand-crafted code for extracting pages and DMA addresses from the given scatterlist by the much more robust code based on the generic scatterlist iterators and recently introduced sg_table-based wrappers. The resulting code is simple and easy to understand, so the comment describing the old code is no longer needed. Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Reviewed-by: Robin Murphy commit d46e7ae24b81533d21edfa90914d27efa0c5f85d Author: Marek Szyprowski Date: Fri May 8 16:04:44 2020 +0200 drm: prime: add common helper to check scatterlist contiguity It is a common operation done by DRM drivers to check the contiguity of the DMA-mapped buffer described by a scatterlist in the sg_table object. Let's add a common helper for this operation. Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Reviewed-by: Robin Murphy commit 32d2a8935bf8faf201ff1a859eeb43ef6e5e438d Author: Pierre-Louis Bossart Date: Tue Sep 8 21:45:21 2020 +0800 soundwire: cadence: add parity error injection through debugfs The Cadence IP can inject errors, let's make use of this capability to test Slave parity error checks. See e.g. example log where both the master and slave detect the parity error injected on a dummy read command. cd /sys/kernel/debug/soundwire/master-1/intel-sdw/ echo 1 > cdns-parity-error-injection [ 44.756249] intel-master sdw-master-1: Parity error [ 44.756313] intel-master sdw-master-1: Msg NACK received [ 44.756366] intel-master sdw-master-1: Msg NACKed for Slave 15 [ 44.756375] intel-master sdw-master-1: trf on Slave 15 failed:-5 [ 44.756382] intel-master sdw-master-1: parity error injection, read: -5 [ 44.756649] rt1308 sdw:1:25d:1308:0: Parity error detected The code makes sure the Master device is resumed, hence the clock restarted, before sending a parity error. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200908134521.6781-8-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit a350aff45b4d33355cdc59b7b76950e39639e32f Author: Pierre-Louis Bossart Date: Tue Sep 8 21:45:20 2020 +0800 soundwire: bus: export broadcast read/write capability for tests Provide prototype and export symbol to enable tests. The bus lock is handled externally to avoid conflicts e.g. between kernel-generated traffic and test traffic. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200908134521.6781-7-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 38edbfae6c7f4ad402dd0464c1887eaf068468b8 Author: Pierre-Louis Bossart Date: Tue Sep 8 21:45:19 2020 +0800 ASoC: codecs: realtek-soundwire: ignore initial PARITY errors The parity calculation is not reset on a Severe Reset, which leads to misleading/harmless errors reported on startup. The addition of a quirk helps filter out such errors while leaving the error checks on in steady-state. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200908134521.6781-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 4724f12c1315efa79a0cbf74dfb0c9b98b1a4bff Author: Pierre-Louis Bossart Date: Tue Sep 8 21:45:18 2020 +0800 soundwire: bus: use quirk to filter out invalid parity errors If a Slave device reports with a quirk that its initial parity check may be incorrect, filter it but keep the parity checks active in steady state. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200908134521.6781-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit c2819e196b3cc1901a4612f72e66da4821966a5e Author: Pierre-Louis Bossart Date: Tue Sep 8 21:45:17 2020 +0800 soundwire: slave: add first_interrupt_done status Some Slaves report incorrect information in their interrupt status registers after a master/bus reset, track the initial interrupt handling so that quirks can be introduced to filter out incorrect information while keeping interrupts enabled in steady state. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200908134521.6781-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 310f6dc6dc5d7372e878e3e401ae087b63d545de Author: Pierre-Louis Bossart Date: Tue Sep 8 21:45:16 2020 +0800 soundwire: bus: filter-out unwanted interrupt reports Unlike the traditional usage, in the SoundWire specification the interrupt masks only gate the propagation of an interrupt condition to the PING frame status. They do not gate the changes of the INT_STAT registers, which will happen regardless of the mask settings. See Figure 116 of the SoundWire 1.2 specification for an in-depth description of the interrupt model. When the bus driver reads the SCP_INT1_STAT register, it will retrieve all the interrupt status, including for the mask fields that were not explicitly set. For example, even if the PARITY mask is not set, the PARITY error status will be reported if an implementation-defined interrupt for jack detection is enabled and occurs. Filtering undesired interrupt reports and handling has to be implemented in software. This patch enables this filtering for the INT1_IMPL_DEF, PARITY and BUS_CLASH interrupt sources. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200908134521.6781-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 2acd30b9f6032c6cbefc5e255c17ebbb0718e56a Author: Pierre-Louis Bossart Date: Tue Sep 8 21:45:15 2020 +0800 ASoC/soundwire: bus: use property to set interrupt masks Add a slave-level property and program the SCP_INT1_MASK as desired by the codec driver. Since there is no DisCo property this has to be an implementation-specific firmware property or hard-coded in the driver. The only functionality change is that implementation-defined interrupts are no longer set for amplifiers - those interrupts are typically for jack detection or acoustic event detection/hotwording. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Tested-by: Srinivas Kandagatla Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200908134521.6781-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit df398e33b8fd3ac28b3c7166de555e38d26e7391 Author: Colin Xu Date: Wed Aug 19 09:09:00 2020 +0800 drm/i915/gvt: Init vreg GUC_STATUS to GS_MIA_IN_RESET Although GVT doesn't support guest GuC, MIA core is still expected to be GS_MIA_IN_RESET after uc HW reset. Reviewed-by: Zhenyu Wang Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200819010900.54598-1-colin.xu@intel.com commit d0a011094a0c1ba93dbf12a80b69d788b9a5437b Author: Colin Xu Date: Wed Aug 19 09:08:01 2020 +0800 drm/i915/gvt: Add F_CMD_ACCESS for some GEN9 SKU WA MMIO access Without F_CMD_ACCESS, guest LRI cmd will fail due to "access to non-render register" when init below WAs: WaDisableDynamicCreditSharing: GAMT_CHKN_BIT_REG WaCompressedResourceSamplerPbeMediaNewHashMode: MMCD_MISC_CTRL So add F_CMD_ACCESS to the two MMIO. Reviewed-by: Zhenyu Wang Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200819010801.53411-1-colin.xu@intel.com commit b2feabc6ebd39976b0085afd8205734dc3a9793b Author: Yan Zhao Date: Tue Aug 11 15:27:20 2020 +0800 drm/i915/gvt: remove F_CMD_ACCESS flag for some registers some registers cannot be cmd accessible. remove them from the list Reviewed-by: Zhenyu Wang Signed-off-by: Wang Zhi Signed-off-by: Yan Zhao Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200811072720.3525-1-yan.y.zhao@intel.com commit 7e93a0806f5a8b42c0a845a02816b6f80d406f79 Author: Yan Zhao Date: Tue Aug 11 15:02:33 2020 +0800 drm/i915/gvt: add/modify interfaces for flag F_CMD_ACCESS flag F_CMD_ACCESS represents whether an MMIO is able to be accessed by GPU commands. In this patch, 1. add interface to set this flag 2. rename intel_gvt_mmio_is_cmd_access() to intel_gvt_mmio_is_cmd_accessible() and update its description message. Reviewed-by: Zhenyu Wang Signed-off-by: Yan Zhao Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200811070233.3387-1-yan.y.zhao@intel.com commit a6c5817a38cfaddb3b5b4b3f2bc4b3750f264c57 Author: Yan Zhao Date: Tue Aug 11 14:37:44 2020 +0800 drm/i915/gvt: remove flag F_CMD_ACCESSED Flag F_CMD_ACCESSED is not used. just remove it. Reviewed-by: Zhenyu Wang Signed-off-by: Yan Zhao Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200811063744.3272-1-yan.y.zhao@intel.com commit 56d44649a7c207752be8907b801dd698b3451cad Author: Yan Zhao Date: Tue Aug 11 14:09:44 2020 +0800 drm/i915/gvt: rename F_IN_CTX flag to F_SR_IN_CTX F_IN_CTX is an inaccurate flag name, because people may wrongly think all MMIOs in context image are with this flag. But actually, this flag is only for MMIOs both in GVT's save-restore list and in hardare logical context's image. Reviewed-by: Zhenyu Wang Signed-off-by: Yan Zhao Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200811060944.3039-1-yan.y.zhao@intel.com commit 9ba3a0aa09fe505540a3bdd11f0da3b8e9d73055 Author: Xu Yilun Date: Mon Sep 7 22:23:13 2020 +0800 fpga: dfl: create a dfl bus type to support DFL devices A new bus type "dfl" is introduced for private features which are not initialized by DFL feature drivers (dfl-fme & dfl-afu drivers). So these private features could be handled by separate driver modules. DFL feature drivers (dfl-fme, dfl-port) will create DFL devices on enumeration. DFL drivers could be registered on this bus to match these DFL devices. They are matched by dfl type & feature_id. [mdf@kernel.org: Add missing Documentation part to MAINTAINERS file] Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Signed-off-by: Matthew Gerlach Signed-off-by: Russ Weight Reviewed-by: Tom Rix Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit adfe14797e17b2538d78eb2cb1eef5fd2fb74125 Author: Andrew Jeffery Date: Thu Sep 10 12:41:43 2020 +0930 ARM: dts: rainier: Disable internal pull-downs on eMMC pins There's a veritable tug-of-war going on in the design, so disable one of the warring parties. Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20200910031143.2997298-1-andrew@aj.id.au Signed-off-by: Joel Stanley commit 4a851d714eadeabd65c7e321a2e7830f77d945c4 Author: Joel Stanley Date: Tue Jul 28 12:25:27 2020 +0930 fsi: aspeed: Support CFAM reset GPIO Systems have a line for restting the remote CFAM. This is not part of the FSI master, but is associated with it, so it makes sense to include it in the master driver. This exposes a sysfs interface to reset the cfam, abstracting away the direction and polarity of the GPIO, as well as the timing of the reset pulse. Userspace will be blocked until the reset pulse is finished. The reset is hard coded to be in the range of (900, 1000) us. It was observed with a scope to regularly be just over 1ms. If the device tree property is not preset the driver will silently continue. Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20200728025527.174503-6-joel@jms.id.au Signed-off-by: Joel Stanley commit add6895188e49aa6b730d647ca896559370aa2be Author: Joel Stanley Date: Tue Jul 28 12:25:26 2020 +0930 fsi: aspeed: Add module param for bus divisor For testing and hardware debugging a user may wish to override the divisor at runtime. By setting fsi_master_aspeed.bus_div=N, the divisor will be set to N, if 0 < N <= 0x3ff. This is a module parameter and not a device tree option as it will only need to be set when testing or debugging. Reviewed-by: Eddie James Link: https://lore.kernel.org/r/20200728025527.174503-5-joel@jms.id.au Signed-off-by: Joel Stanley commit 4a80c2017bd9136a139773ba980341ea7e71dafd Author: Joel Stanley Date: Tue Jul 28 12:25:25 2020 +0930 fsi: aspeed: Run the bus at maximum speed Testing of Tacoma has shown that the ASPEED master can be run at maximum speed. The exception is when wired externally with a cable, in which case we use a divisor of two to ensure reliable operation. Reviewed-by: Eddie James Link: https://lore.kernel.org/r/20200728025527.174503-4-joel@jms.id.au Signed-off-by: Joel Stanley commit f369a29bdde9f14040e9f0cc4ac610cdb216e93c Author: Joel Stanley Date: Tue Jul 28 12:25:24 2020 +0930 fsi: aspeed: Support cabled FSI Some FSI capable systems have internal FSI signals, and some have external cabled FSI. Software can detect which machine this is by reading a jumper GPIO, and also control which pins the signals are routed to through a mux GPIO. This attempts to find the GPIOs at probe time. If they are not present in the device tree the driver will not error and continue as before. The mux GPIO is owned by the FSI driver to ensure it is not modified at runtime. The routing jumper obtained as non-exclusive to allow other software to inspect it's state. Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20200728025527.174503-3-joel@jms.id.au Signed-off-by: Joel Stanley commit 4d4905f6cc5b6534e9a3b6a3c75bcee840a27751 Author: Joel Stanley Date: Tue Jul 28 12:25:23 2020 +0930 dt-bindings: fsi: Document gpios The FSI master has some associated GPIOs that may be present on some hardware configurations. Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20200728025527.174503-2-joel@jms.id.au Signed-off-by: Joel Stanley commit 59165631b7e9deca0b93b029a1112f4f8f3df736 Author: Rikard Falkeborn Date: Thu Aug 6 01:26:24 2020 +0200 fsi: scom: Constify scom_ids The only usage of scom_ids is to assign its address to the id_table field in the fsi_driver struct, which is a const pointer, so make it const to allow the compiler to put it in read-only memory Signed-off-by: Rikard Falkeborn Signed-off-by: Joel Stanley commit f458c38f40fa7f03135b25e33884abc5fd028714 Author: Rikard Falkeborn Date: Thu Aug 6 01:26:23 2020 +0200 fsi: sbefifo: Constify sbefifo_ids The only usage of sbefifo_ids is to assign its address to the id_table field in the fsi_driver struct, which is a const pointer, so make it const to allow the compiler to put it in read-only memory Signed-off-by: Rikard Falkeborn Signed-off-by: Joel Stanley commit 31901bb74f5618929ce94880691c8448765415ac Author: Rikard Falkeborn Date: Thu Aug 6 01:26:22 2020 +0200 fsi: master: Constify hub_master_ids The only usage of hub_master_ids is to assign its address to the id_table field in the fsi_driver struct, which is a const pointer, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Joel Stanley commit a1d5ce111aa2f8b9d5d4db3ed85b11e53251d676 Author: Eddie James Date: Mon Apr 6 14:19:36 2020 -0500 fsi: master: Remove link enable read-back Both the Aspeed and hub masters read back the link enable register after enabling the link, but this is unnecessary, so remove it. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit 196964a31cf8c4175fab28942071215e34f0a684 Author: Eddie James Date: Wed May 20 13:17:07 2020 -0500 fsi: core: Set slave local bus ownership during init The driver ought to claim local bus ownership of the slave it's communicating with. This is for multi-master setups. The slave (in theory) will deny access to masters who try to access the CFAM address space but who don't "own" the bus. As driver doesn't seem to perform any other teardown there is no need to "un-claim" ownership at teardown. Also I'm not aware of any multi-master setup using this driver so it shouldn't actually matter. Also, the hardware doesn't seem to enforce this despite being required in the specification... Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit b36875a453ef8cb429f5e1064a7329b751fd0dda Author: Eddie James Date: Tue Jun 9 16:39:28 2020 -0500 fsi: core: Disable link when slave init fails In the case that links don't have slaves or fail to be accessed, the master should disable the link during the scan since it won't be using the slave. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit 04635a30dd53890fac4e926f91c4ec8619c9227b Author: Eddie James Date: Tue Jun 9 16:39:27 2020 -0500 fsi: master: Add boolean parameter to link_enable function Add the ability to disable a link with a boolean parameter to the link_enable function. This is necessary so that the master can disable links that it isn't using; for example, links to slaves that fail initialization. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit 3c3c484850bcb4b28f2377e3d641a32c42af949c Author: Xu Wang Date: Mon Jul 13 03:33:13 2020 +0000 fsi: fsi-occ: fix return value check in occ_probe() In case of error, the function platform_device_register_full() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Xu Wang Reviewed-by: Guenter Roeck Signed-off-by: Joel Stanley commit 6e0ef7d2cee1abf8a8ff4862f528067c58b3bcc1 Author: Eddie James Date: Thu Jul 9 14:17:43 2020 -0500 fsi: aspeed: Enable 23-bit addressing In order to access more than the second hub link, 23-bit addressing is required. The core provides the highest two bits of address as the slave ID to the master. Signed-off-by: Eddie James Acked-by: Jeremy Kerr Signed-off-by: Joel Stanley commit 8a1939829f9cf4ec2354afeaf592735b6eb77ab9 Author: Colin Ian King Date: Wed Jun 3 13:05:26 2020 +0100 fsi: master-ast-cf: fix spelling mistake "firwmare" -> "firmware" There is a spelling mistake in a dev_err error message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 2de7649cff445ec35a6c5ee1a8e19be186d890fc Author: Ye Bin Date: Wed Sep 9 16:27:16 2020 +0800 scsi: lpfc: Remove set but not used 'qp' This addresses the following gcc warning with "make W=1": not used [-Wunused-but-set-variable] struct lpfc_sli4_hdw_queue *qp; ^ Link: https://lore.kernel.org/r/20200909082716.37787-1-yebin10@huawei.com Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.c: In function ‘lpfc_debugfs_hdwqstat_data’: drivers/scsi/lpfc/lpfc_debugfs.c:1699:30: warning: variable ‘qp’ set but commit 8b02fc756af69d6edbcc34b63ae4cec4503dfaa0 Author: Ye Bin Date: Wed Sep 9 16:26:26 2020 +0800 scsi: gdth: Remove set but used 'cmd_index' This addresses the following gcc warning with "make W=1": drivers/scsi/gdth.c: In function ‘gdth_async_event’: drivers/scsi/gdth.c:3010:9: warning: variable ‘cmd_index’ set but not used [-Wunused-but-set-variable] int cmd_index; Link: https://lore.kernel.org/r/20200909082627.101984-1-yebin10@huawei.com Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit 27216a9d85a0be1cf6e58b64c1cb626a6170c8f3 Author: Ye Bin Date: Wed Sep 9 16:26:27 2020 +0800 scsi: pmcraid: Remove set but not used 'res' This addresses the following gcc warning with "make W=1": drivers/scsi/pmcraid.c: In function ‘pmcraid_abort_cmd’: drivers/scsi/pmcraid.c:2863:33: warning: variable ‘res’ set but not used [-Wunused-but-set-variable] struct pmcraid_resource_entry *res; ^ Link: https://lore.kernel.org/r/20200909082627.101984-2-yebin10@huawei.com Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit c8d67fbb60859d28d02ae431c5dd5641e3553f49 Author: Jason Yan Date: Mon Sep 7 15:45:18 2020 +0800 scsi: qla1280: Remove set but not used variable in qla1280_status_entry() This addresses the following gcc warning with "make W=1": drivers/scsi/qla1280.c: In function ‘qla1280_status_entry’: drivers/scsi/qla1280.c:3607:28: warning: variable ‘lun’ set but not used [-Wunused-but-set-variable] 3607 | unsigned int bus, target, lun; | ^~~ drivers/scsi/qla1280.c:3607:20: warning: variable ‘target’ set but not used [-Wunused-but-set-variable] 3607 | unsigned int bus, target, lun; | ^~~~~~ drivers/scsi/qla1280.c:3607:15: warning: variable ‘bus’ set but not used [-Wunused-but-set-variable] 3607 | unsigned int bus, target, lun; | ^~~ Link: https://lore.kernel.org/r/20200907074518.2326360-5-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit bf70bf28bf874c65001951bb955292a37c930e49 Author: Jason Yan Date: Mon Sep 7 15:45:17 2020 +0800 scsi: qla1280: Remove set but not used variable in qla1280_mailbox_command() This addresses the following gcc warning with "make W=1": drivers/scsi/qla1280.c: In function ‘qla1280_mailbox_command’: drivers/scsi/qla1280.c:2430:11: warning: variable ‘data’ set but not used [-Wunused-but-set-variable] 2430 | uint16_t data; | ^~~~ Link: https://lore.kernel.org/r/20200907074518.2326360-4-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 9b0f9e59bc81298f03f3582c40b07fe61d283303 Author: Jason Yan Date: Mon Sep 7 15:45:16 2020 +0800 scsi: qla1280: Remove set but not used variable in qla1280_nvram_config() This addresses the following gcc warning with "make W=1": drivers/scsi/qla1280.c: In function ‘qla1280_nvram_config’: drivers/scsi/qla1280.c:2188:36: warning: variable ‘ddma_conf’ set but not used [-Wunused-but-set-variable] 2188 | uint16_t hwrev, cfg1, cdma_conf, ddma_conf; | ^~~~~~~~~ Link: https://lore.kernel.org/r/20200907074518.2326360-3-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 3eedb4202d4c26c3323c91559f977013afaecf85 Author: Jason Yan Date: Mon Sep 7 15:45:15 2020 +0800 scsi: qla1280: Remove set but not used variable in qla1280_done() This addresses the following gcc warning with "make W=1": drivers/scsi/qla1280.c: In function ‘qla1280_done’: drivers/scsi/qla1280.c:1244:19: warning: variable ‘lun’ set but not used [-Wunused-but-set-variable] 1244 | int bus, target, lun; | ^~~ Link: https://lore.kernel.org/r/20200907074518.2326360-2-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 09fd5f0ddf327ce2b7764ecf3264f3f9230207f1 Author: Alim Akhtar Date: Tue Jul 21 22:50:21 2020 +0530 scsi: ufs: Fix 'unmet direct dependencies' config warning With !CONFIG_OF and SCSI_UFS_EXYNOS selected, the below warning is given: WARNING: unmet direct dependencies detected for PHY_SAMSUNG_UFS Depends on [n]: OF [=n] && (ARCH_EXYNOS || COMPILE_TEST [=y]) Selected by [y]: - SCSI_UFS_EXYNOS [=y] && SCSI_LOWLEVEL [=y] && SCSI [=y] && SCSI_UFSHCD_PLATFORM [=y] && (ARCH_EXYNOS || COMPILE_TEST [=y]) Fix it by removing PHY_SAMSUNG_UFS dependency. Link: https://lore.kernel.org/r/20200721172021.28922-1-alim.akhtar@samsung.com Reported-by: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit 5e48a084f4e824e1b624d3fd7ddcf53d2ba69e53 Author: Jing Xiangfeng Date: Mon Sep 7 16:39:49 2020 +0800 scsi: ibmvfc: Fix error return in ibmvfc_probe() Fix to return error code PTR_ERR() from the error handling case instead of 0. Link: https://lore.kernel.org/r/20200907083949.154251-1-jingxiangfeng@huawei.com Acked-by: Tyrel Datwyler Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit 71957b6112cdb0b3357fbfe6d0de5de02d544a55 Author: Stanley Chu Date: Thu Sep 10 09:37:56 2020 +0800 scsi: ufs: ufs-mediatek: Fix build warnings with make W=1 Fix build warnings with make W=1 as below, 1. >> drivers/scsi/ufs/ufs-mediatek.c:116:22: warning: format '%d' expects >> argument of type 'int', but argument 4 has type 'long int' 2. CC [M] drivers/scsi/ufs/ufs-mediatek.o ../drivers/scsi/ufs/ufs-mediatek.c:749: error: Cannot parse struct or union! /** is used specifically with kernel-doc tool. As a quick fix by removing dubious /** in the comment block of struct ufs_hba_variant_ops ufs_hba_mtk_vops. Link: https://lore.kernel.org/r/20200910013756.11385-1-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 31a3271ff11badc50d6dc0efb4da393e4c3bf388 Author: Daniel Wagner Date: Tue Sep 8 10:15:16 2020 +0200 scsi: qla2xxx: Handle incorrect entry_type entries It was observed on an ISP8324 16Gb HBA with fw=8.08.203 (d0d5) in a PowerPC64 machine that pkt->entry_type was MBX_IOCB_TYPE/0x39 with an sp->type SRB_SCSI_CMD which is invalid and should not be possible. Reading the entry_type from the crash dump shows the expected value of STATUS_TYPE/0x03 but the call trace shows that qla24xx_mbx_iocb_entry() is used. Add a check to verify for consistency and reset the HBA if an invalid state is reached. Obviously, this is only a workaround until the real problem is solved. Link: https://lore.kernel.org/r/20200908081516.8561-5-dwagner@suse.de Reviewed-by: Arun Easi Signed-off-by: Daniel Wagner Signed-off-by: Martin K. Petersen commit 7d88d5dff95f929e94b9d6425f699eba22e47444 Author: Daniel Wagner Date: Tue Sep 8 10:15:15 2020 +0200 scsi: qla2xxx: Log calling function name in qla2x00_get_sp_from_handle() Commit 7c3df1320e5e ("[SCSI] qla2xxx: Code changes to support new dynamic logging infrastructure.") removed the use of the func argument. Let's add it back. Link: https://lore.kernel.org/r/20200908081516.8561-4-dwagner@suse.de Reviewed-by: Arun Easi Signed-off-by: Daniel Wagner Signed-off-by: Martin K. Petersen commit 622299f16f33852baddf94b32bc80e2c1e24c39a Author: Daniel Wagner Date: Tue Sep 8 10:15:14 2020 +0200 scsi: qla2xxx: Simplify return value logic in qla2x00_get_sp_from_handle() Refactor qla2x00_get_sp_from_handle() to avoid the unnecessary goto if early returns are used. With this we can also avoid preinitialzing the sp pointer. Link: https://lore.kernel.org/r/20200908081516.8561-3-dwagner@suse.de Reviewed-by: Martin Wilck Reviewed-by: Arun Easi Signed-off-by: Daniel Wagner Signed-off-by: Martin K. Petersen commit c0014f94218ea3a312f6235febea0d626c5f2154 Author: Daniel Wagner Date: Tue Sep 8 10:15:13 2020 +0200 scsi: qla2xxx: Warn if done() or free() are called on an already freed srb Emit a warning when ->done or ->free are called on an already freed srb. There is a hidden use-after-free bug in the driver which corrupts the srb memory pool which originates from the cleanup callbacks. An extensive search didn't bring any lights on the real problem. The initial fix was to set both pointers to NULL and try to catch invalid accesses. But instead the memory corruption was gone and the driver didn't crash. Since not all calling places check for NULL pointer, add explicitly default handlers. With this we workaround the memory corruption and add a debug help. Link: https://lore.kernel.org/r/20200908081516.8561-2-dwagner@suse.de Reviewed-by: Martin Wilck Reviewed-by: Arun Easi Signed-off-by: Daniel Wagner Signed-off-by: Martin K. Petersen commit 8c2f516c99f0b7e59c53158f4d7a7fe229c5aea8 Author: Bruno Meneguele Date: Fri Sep 4 16:41:00 2020 -0300 integrity: include keyring name for unknown key request Depending on the IMA policy rule a key may be searched for in multiple keyrings (e.g. .ima and .platform) and possibly not found. This patch improves feedback by including the keyring "description" (name) in the error message. Signed-off-by: Bruno Meneguele [zohar@linux.ibm.com: updated commit message] Signed-off-by: Mimi Zohar commit e4d7e2df3a0903601bf12eb6ef1f0c8fa1042204 Author: Bruno Meneguele Date: Fri Sep 4 22:20:20 2020 -0300 ima: limit secure boot feedback scope for appraise Only emit an unknown/invalid message when setting the IMA appraise mode to anything other than "enforce", when secureboot is enabled. Signed-off-by: Bruno Meneguele [zohar@linux.ibm.com: updated commit message] Signed-off-by: Mimi Zohar commit fdf38426cda6b5b3232f1fa470b5fa86734d7872 Author: Rob Clark Date: Tue Sep 1 08:41:55 2020 -0700 drm/msm: Convert shrinker msgs to tracepoints This reduces the spam in dmesg when we start hitting the shrinker, and replaces it with something we can put on a timeline while profiling or debugging system issues. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Kristian H. Kristensen commit 74c0a69cc5bee0eb1f1cf740f7480095c4a94fe7 Author: Rob Clark Date: Tue Sep 1 08:41:54 2020 -0700 drm/msm/gpu: Add GPU freq_change traces Technically the GMU specific one is a bit redundant, but it was useful to track down a bug. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse commit 38c2fa7ae2f25a561a33ac1d0680a92e293c65a5 Author: Stephen Boyd Date: Tue Sep 1 14:59:42 2020 -0700 drm/msm: Drop debug print in _dpu_crtc_setup_lm_bounds() This function is called quite often if you have a blinking cursor on the screen, hello page flip. Let's drop this debug print here because it means enabling the print via the module parameter starts to spam the debug console. Cc: Abhinav Kumar Cc: Jeykumar Sankaran Cc: Jordan Crouse Cc: Sean Paul Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Stephen Boyd Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 22f760941844dbcee6ee446e1896532f6dff01ef Author: Stephen Boyd Date: Tue Sep 1 14:59:41 2020 -0700 drm/msm: Avoid div-by-zero in dpu_crtc_atomic_check() The cstate->num_mixers member is only set to a non-zero value once dpu_encoder_virt_mode_set() is called, but the atomic check function can be called by userspace before that. Let's avoid the div-by-zero here and inside _dpu_crtc_setup_lm_bounds() by skipping this part of the atomic check if dpu_encoder_virt_mode_set() hasn't been called yet. This fixes an UBSAN warning: UBSAN: Undefined behaviour in drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c:860:31 division by zero CPU: 7 PID: 409 Comm: frecon Tainted: G S 5.4.31 #128 Hardware name: Google Trogdor (rev0) (DT) Call trace: dump_backtrace+0x0/0x14c show_stack+0x20/0x2c dump_stack+0xa0/0xd8 __ubsan_handle_divrem_overflow+0xec/0x110 dpu_crtc_atomic_check+0x97c/0x9d4 drm_atomic_helper_check_planes+0x160/0x1c8 drm_atomic_helper_check+0x54/0xbc drm_atomic_check_only+0x6a8/0x880 drm_atomic_commit+0x20/0x5c drm_atomic_helper_set_config+0x98/0xa0 drm_mode_setcrtc+0x308/0x5dc drm_ioctl_kernel+0x9c/0x114 drm_ioctl+0x2ac/0x4b0 drm_compat_ioctl+0xe8/0x13c __arm64_compat_sys_ioctl+0x184/0x324 el0_svc_common+0xa4/0x154 el0_svc_compat_handler+0x Cc: Abhinav Kumar Cc: Jeykumar Sankaran Cc: Jordan Crouse Cc: Sean Paul Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Stephen Boyd Reviewed-by: Abhinav Kumar Tested-by: Sai Prakash Ranjan Signed-off-by: Rob Clark commit e12e5263bf1d8dae2f1fd0a3163f88349404c277 Author: Rob Clark Date: Mon Sep 7 09:43:26 2020 -0700 drm/msm/dpu: clean up some impossibilities Signed-off-by: Rob Clark Reviewed-by: Abhinav Kumar commit fd630ae9e27cfc2f6e3184b82288ba9ff9ff8bee Author: Rob Clark Date: Mon Sep 7 09:41:41 2020 -0700 drm/msm/dpu: move vblank events to complete_commit() We could get a vblank event racing with the current atomic commit, resulting in sending the pageflip event to userspace early, causing tearing. On the other hand, complete_commit() ensures that the pending flush is complete. Signed-off-by: Rob Clark Reviewed-by: Abhinav Kumar commit 4f6a5caf187ff5807cd5b4ea5678982c249bd964 Author: Florian Fainelli Date: Wed Sep 9 10:49:31 2020 -0700 net: dsa: b53: Report VLAN table occupancy via devlink We already maintain an array of VLANs used by the switch so we can simply iterate over it to report the occupancy via devlink. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4a056990e16e20f20f305daa53250bd01aaf9ad6 Merge: b599a5b9e1669 f5015a594c50c Author: David S. Miller Date: Wed Sep 9 14:22:42 2020 -0700 Merge branch 'Marvell-PP2-2-PTP-support' Russell King says: ==================== Marvell PP2.2 PTP support This series adds PTP support for PP2.2 hardware to the mvpp2 driver. Tested on the Macchiatobin eth1 port. Note that on the Macchiatobin, eth0 uses a separate TAI block from eth1, and there is no hardware synchronisation between the two. ==================== Signed-off-by: David S. Miller commit f5015a594c50c29155a029f6470ce2afd3e65c57 Author: Russell King Date: Wed Sep 9 17:26:00 2020 +0100 net: mvpp2: ptp: add support for transmit timestamping Add support for timestamping transmit packets. We allocate SYNC messages to queue 1, every other message to queue 0. Signed-off-by: Russell King Signed-off-by: David S. Miller commit ce3497e2072e2c6120cea80cb49a5fee9d1245d3 Author: Russell King Date: Wed Sep 9 17:25:55 2020 +0100 net: mvpp2: ptp: add support for receive timestamping Add support for receive timestamping. When enabled, the hardware adds a timestamp into the receive queue descriptor for all received packets with no filtering. Hence, we can only support NONE or ALL receive filter modes. The timestamp in the receive queue contains two bit sof seconds and the full nanosecond timestamp. This has to be merged with the remainder of the seconds from the TAI clock to arrive at a full timestamp before we can convert it to a ktime for the skb hardware timestamp field. Signed-off-by: Russell King Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 91dd71950bd714163e338fe6b8b60be5b76e8e2a Author: Russell King Date: Wed Sep 9 17:25:50 2020 +0100 net: mvpp2: ptp: add TAI support Add support for the TAI block in the mvpp2.2 hardware. Acked-by: Richard Cochran Signed-off-by: Russell King Signed-off-by: David S. Miller commit b4b17714c3775bd4d5d0d3852b32d862eea0e1e9 Author: Russell King Date: Wed Sep 9 17:25:45 2020 +0100 net: mvpp2: check first level interrupt status registers Check the first level interrupt status registers to determine how to further process the port interrupt. We will need this to know whether to invoke the link status processing and/or the PTP processing for both XLG and GMAC. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit 8914197269fd185752aaa4c7f3e3279f7ce42c88 Author: Russell King Date: Wed Sep 9 17:25:40 2020 +0100 net: mvpp2: rename mis-named "link status" interrupt The link interrupt is used for way more than just the link status; it comes from a collection of units to do with the port. The Marvell documentation describes the interrupt as "GOP port X interrupt". Since we are adding PTP support, and the PTP interrupt uses this, rename it to be more inline with the documentation. This interrupt is also mis-named in the DT binding, but we leave that alone. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit 36cfd3a6e52bd65d42b1d04fbff30ac427f80cbd Author: Russell King Date: Wed Sep 9 17:25:35 2020 +0100 net: mvpp2: restructure "link status" interrupt handling The "link status" interrupt is used for more than just link status. Restructure mvpp2_link_status_isr() so we can add additional handling. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit b599a5b9e16698424bced2429e935bee056dcf88 Merge: 6b5472d4f1588 66b17082d10a3 Author: David S. Miller Date: Wed Sep 9 14:19:56 2020 -0700 Merge branch 'devlink-show-controller-number' Parav Pandit says: ==================== devlink show controller number Currently a devlink instance that supports an eswitch handles eswitch ports of two type of controllers. (1) controller discovered on same system where eswitch resides. This is the case where PCI PF/VF of a controller and devlink eswitch instance both are located on a single system. (2) controller located on external system. This is the case where a controller is plugged in one system and its devlink eswitch ports are located in a different system. In this case devlink instance of the eswitch only have access to ports of the controller. However, there is no way to describe that a eswitch devlink port belongs to which controller (mainly which external host controller). This problem is more prevalent when port attribute such as PF and VF numbers are overlapping between multiple controllers of same eswitch. Due to this, for a specific switch_id, unique phys_port_name cannot be constructed for such devlink ports. This short series overcomes this limitation by defining two new attributes. (a) external: Indicates if port belongs to external controller (b) controller number: Indicates a controller number of the port Based on this a unique phys_port_name is prepared using controller number. phys_port_name construction using unique controller number is only applicable to external controller ports. This ensures that for non smartnic usecases where there is no external controller, phys_port_name stays same as before. Patch summary: Patch-1 Added mlx5 driver to read controller number Patch-2 Adds the missing comment for the port attributes Patch-3 Move structure comments away from structure fields Patch-4 external attribute added for PCI port flavours Patch-5 Add controller number Patch-6 Use controller number to build phys_port_name --- Changelog: v2->v3: - Updated diagram to get rid of controller 'A' and 'B' - Kept ports of single controller together in diagram - Updated diagram for pf1's VF and SF and its ports v1->v2: - Added text diagram of multiple controllers - Updated example for a VF - Addressed comments from Jiri and Jakub - Moved controller number attribute to PCI port flavours This enables to better, hirerchical view with controller and its PF, VF numbers - Split 'external' and 'controller number' attributes as two different attributes - Merged mlx5_core driver to avoid compiliation break ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 66b17082d10a3b806eec3da8fdebe8a9cd2c6612 Author: Parav Pandit Date: Wed Sep 9 07:50:38 2020 +0300 devlink: Use controller while building phys_port_name Now that controller number attribute is available, use it when building phsy_port_name for external controller ports. An example devlink port and representor netdev name consist of controller annotation for external controller with controller number = 1, for a VF 1 of PF 0: $ devlink port show pci/0000:06:00.0/2 pci/0000:06:00.0/2: type eth netdev ens2f0c1pf0vf1 flavour pcivf controller 1 pfnum 0 vfnum 1 external true splittable false function: hw_addr 00:00:00:00:00:00 $ devlink port show pci/0000:06:00.0/2 -jp { "port": { "pci/0000:06:00.0/2": { "type": "eth", "netdev": "ens2f0c1pf0vf1", "flavour": "pcivf", "controller": 1, "pfnum": 0, "vfnum": 1, "external": true, "splittable": false, "function": { "hw_addr": "00:00:00:00:00:00" } } } } Controller number annotation is skipped for non external controllers to maintain backward compatibility. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 3a2d9588c4f79adae6a0e986b64ebdd5b38085c6 Author: Parav Pandit Date: Wed Sep 9 07:50:37 2020 +0300 devlink: Introduce controller number A devlink port may be for a controller consist of PCI device. A devlink instance holds ports of two types of controllers. (1) controller discovered on same system where eswitch resides This is the case where PCI PF/VF of a controller and devlink eswitch instance both are located on a single system. (2) controller located on external host system. This is the case where a controller is located in one system and its devlink eswitch ports are located in a different system. When a devlink eswitch instance serves the devlink ports of both controllers together, PCI PF/VF numbers may overlap. Due to this a unique phys_port_name cannot be constructed. For example in below such system controller-0 and controller-1, each has PCI PF pf0 whose eswitch ports can be present in controller-0. These results in phys_port_name as "pf0" for both. Similar problem exists for VFs and upcoming Sub functions. An example view of two controller systems: --------------------------------------------------------- | | | --------- --------- ------- ------- | ----------- | | vf(s) | | sf(s) | |vf(s)| |sf(s)| | | server | | ------- ----/---- ---/----- ------- ---/--- ---/--- | | pci rc |=== | pf0 |______/________/ | pf1 |___/_______/ | | connect | | ------- ------- | ----------- | | controller_num=1 (no eswitch) | ------|-------------------------------------------------- (internal wire) | --------------------------------------------------------- | devlink eswitch ports and reps | | ----------------------------------------------------- | | |ctrl-0 | ctrl-0 | ctrl-0 | ctrl-0 | ctrl-0 |ctrl-0 | | | |pf0 | pf0vfN | pf0sfN | pf1 | pf1vfN |pf1sfN | | | ----------------------------------------------------- | | |ctrl-1 | ctrl-1 | ctrl-1 | ctrl-1 | ctrl-1 |ctrl-1 | | | |pf1 | pf1vfN | pf1sfN | pf1 | pf1vfN |pf0sfN | | | ----------------------------------------------------- | | | | | | --------- --------- ------- ------- | | | vf(s) | | sf(s) | |vf(s)| |sf(s)| | | ------- ----/---- ---/----- ------- ---/--- ---/--- | | | pf0 |______/________/ | pf1 |___/_______/ | | ------- ------- | | | | local controller_num=0 (eswitch) | --------------------------------------------------------- An example devlink port for external controller with controller number = 1 for a VF 1 of PF 0: $ devlink port show pci/0000:06:00.0/2 pci/0000:06:00.0/2: type eth netdev ens2f0pf0vf1 flavour pcivf controller 1 pfnum 0 vfnum 1 external true splittable false function: hw_addr 00:00:00:00:00:00 $ devlink port show pci/0000:06:00.0/2 -jp { "port": { "pci/0000:06:00.0/2": { "type": "eth", "netdev": "ens2f0pf0vf1", "flavour": "pcivf", "controller": 1, "pfnum": 0, "vfnum": 1, "external": true, "splittable": false, "function": { "hw_addr": "00:00:00:00:00:00" } } } } Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 05b595e9c44acaca94192c6db430a489c1b212a7 Author: Parav Pandit Date: Wed Sep 9 07:50:36 2020 +0300 devlink: Introduce external controller flag A devlink eswitch port may represent PCI PF/VF ports of a controller. A controller either located on same system or it can be an external controller located in host where such NIC is plugged in. Add the ability for driver to specify if a port is for external controller. Use such flag in the mlx5_core driver. An example of an external controller having VF1 of PF0 belong to controller 1. $ devlink port show pci/0000:06:00.0/2 pci/0000:06:00.0/2: type eth netdev ens2f0pf0vf1 flavour pcivf pfnum 0 vfnum 1 external true splittable false function: hw_addr 00:00:00:00:00:00 $ devlink port show pci/0000:06:00.0/2 -jp { "port": { "pci/0000:06:00.0/2": { "type": "eth", "netdev": "ens2f0pf0vf1", "flavour": "pcivf", "pfnum": 0, "vfnum": 1, "external": true, "splittable": false, "function": { "hw_addr": "00:00:00:00:00:00" } } } } Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit ff03e63ad1673eb75cce214556013fc2e52a1b77 Author: Parav Pandit Date: Wed Sep 9 07:50:35 2020 +0300 devlink: Move structure comments outside of structure To add more fields to the PCI PF and VF port attributes, follow standard structure comment format. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 2efbe6aebea00269425ac7de622d47c2a397a871 Author: Parav Pandit Date: Wed Sep 9 07:50:34 2020 +0300 devlink: Add comment block for missing port attributes Add comment block for physical, PF and VF port attributes. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Reviewed-by: Roi Dayan Signed-off-by: David S. Miller commit a53cf9497a1683ae49f870d066b693ceea5e517f Author: Parav Pandit Date: Wed Sep 9 07:50:33 2020 +0300 net/mlx5: E-switch, Read controller number from device ECPF supports one external host controller. Read controller number from the device. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: David S. Miller commit 6b5472d4f1588e3eea0c3270ec53766739ae4c2e Author: Zhang Changzhong Date: Wed Sep 9 22:09:00 2020 +0800 net: stmmac: dwmac-intel-plat: remove redundant null check before clk_disable_unprepare() Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Signed-off-by: David S. Miller commit a0d48518cdc855ed188be385abb4df1752a4003c Author: Zhang Changzhong Date: Wed Sep 9 22:06:37 2020 +0800 net: pxa168_eth: remove redundant null check before clk_disable_unprepare() Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Signed-off-by: David S. Miller commit 34e435438cbc81109c8a9b541a4581842a5dd352 Merge: 74c654a852fe9 d65af21842f8a Author: David S. Miller Date: Wed Sep 9 14:15:02 2020 -0700 Merge branch 'SMSC-Cleanups-and-clock-setup' Marco Felsch says: ==================== SMSC: Cleanups and clock setup this small series cleans the smsc-phy code a bit and adds the support to specify the phy clock source. Adding the phy clock source support is also the main purpose of this series. Each file has its own changelog. Thanks a lot to Florian and Andrew for reviewing it. ==================== Signed-off-by: David S. Miller commit d65af21842f8a7821fc3b28dc043c2f92b2b312c Author: Marco Felsch Date: Wed Sep 9 15:45:01 2020 +0200 net: phy: smsc: LAN8710/20: remove PHY_RST_AFTER_CLK_EN flag Don't reset the phy without respect to the PHY library state machine because this breaks the phy IRQ mode. The same behaviour can be archived now by specifying the refclk. Signed-off-by: Marco Felsch Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit bedd8d78aba300860cec3f85d6ff549b3b7f2679 Author: Marco Felsch Date: Wed Sep 9 15:45:00 2020 +0200 net: phy: smsc: LAN8710/20: add phy refclk in support Add support to specify the clock provider for the PHY refclk and don't rely on 'magic' host clock setup. [1] tried to address this by introducing a flag and fixing the corresponding host. But this commit breaks the IRQ support since the irq setup during .config_intr() is thrown away because the reset comes from the side without respecting the current PHY state within the PHY library state machine. Furthermore the commit fixed the problem only for FEC based hosts other hosts acting like the FEC are not covered. This commit goes the other way around to address the bug fixed by [1]. Instead of resetting the device from the side every time the refclk gets (re-)enabled it requests and enables the clock till the device gets removed. Now the PHY library is the only place where the PHY gets reset to respect the PHY library state machine. [1] commit 7f64e5b18ebb ("net: phy: smsc: LAN8710/20: add PHY_RST_AFTER_CLK_EN flag") Signed-off-by: Marco Felsch Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 84475a9e048fc9937e2fd19bb2db873a76d17d19 Author: Marco Felsch Date: Wed Sep 9 15:44:59 2020 +0200 dt-bindings: net: phy: smsc: document reference clock Add support to specify the reference clock for the phy. Signed-off-by: Marco Felsch Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 436e380064ea27924f65b9af47876032c4162cf2 Author: Marco Felsch Date: Wed Sep 9 15:44:58 2020 +0200 net: phy: smsc: simplify config_init callback Exit the driver specific config_init hook early if energy detection is disabled. We can do this because we don't need to clear the interrupt status here. Clearing the status should be removed anyway since this is handled by the phy_enable_interrupts(). Signed-off-by: Marco Felsch Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 7365494550f6e96b8e444201bf5fdaec40e7e007 Author: Marco Felsch Date: Wed Sep 9 15:44:57 2020 +0200 net: phy: smsc: skip ENERGYON interrupt if disabled Don't enable the interrupt if the platform disable the energy detection by "smsc,disable-energy-detect". Signed-off-by: Marco Felsch Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 74c654a852fe94f7d5ea5ebc49f2ce6fd1a551e6 Author: Wang Hai Date: Wed Sep 9 21:21:09 2020 +0800 net: cavium: Fix a bunch of kerneldoc parameter issues Rename ptp to ptp_info. Fix W=1 compile warnings (invalid kerneldoc): drivers/net/ethernet/cavium/common/cavium_ptp.c:94: warning: Excess function parameter 'ptp' description in 'cavium_ptp_adjfine' drivers/net/ethernet/cavium/common/cavium_ptp.c:141: warning: Excess function parameter 'ptp' description in 'cavium_ptp_adjtime' drivers/net/ethernet/cavium/common/cavium_ptp.c:163: warning: Excess function parameter 'ptp' description in 'cavium_ptp_gettime' drivers/net/ethernet/cavium/common/cavium_ptp.c:185: warning: Excess function parameter 'ptp' description in 'cavium_ptp_settime' drivers/net/ethernet/cavium/common/cavium_ptp.c:208: warning: Excess function parameter 'ptp' description in 'cavium_ptp_enable' Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit d8db9dc348712bbe972e1edd952b67279e774ecc Author: Suman Anna Date: Thu Aug 27 23:14:47 2020 -0500 dt-bindings: hwlock: omap: Convert binding to YAML Convert the current OMAP hwspinlock binding from text format to YAML format/DT schema, and delete the legacy text binding file. The new YAML binding conversion is a slightly updated version compared to the original. The legacy "ti,hwmods" property is now obsolete and is dropped altogether, and the K3 example is updated to showcase the actual dts node usage. Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20200828041447.5900-1-s-anna@ti.com Signed-off-by: Rob Herring commit 1ed7f6d0bab2f1794f1eb4ed032e90575552fd21 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:40 2020 +0200 ARM: dts: s5pv210: align SPI GPIO node name with dtschema in Aries The device tree schema expects SPI controller to be named "spi", otherwise dtbs_check complain with a warning like: spi-gpio-0: $nodename:0: 'spi-gpio-0' does not match '^spi(@.*|-[0-9a-f])*$' Signed-off-by: Krzysztof Kozlowski Tested-by: Jonathan Bakker Link: https://lore.kernel.org/r/20200907161141.31034-25-krzk@kernel.org commit b5c528ba9759294b658b050c8a0f2a0f22aaa4d3 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:35 2020 +0200 ARM: dts: s5pv210: use defines for IRQ flags in Goni Replace hard-coded flags with defines for readability. No functional change. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-20-krzk@kernel.org commit c272f1cc9492d61dac362d2064ec41ca97fcb1e2 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:34 2020 +0200 ARM: dts: s5pv210: use defines for IRQ flags in SMDKV210 Replace hard-coded flags with defines for readability. No functional change. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-19-krzk@kernel.org commit 0f2e43cf3d638312bbaca0f23b96f1d5ced249f1 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:33 2020 +0200 ARM: dts: s5pv210: use defines for GPIO flags in Goni Replace hard-coded flags with defines for readability. No functional change. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-18-krzk@kernel.org commit 0e2774e180817bd2925f508a48e1e2a28aea5265 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:32 2020 +0200 ARM: dts: s5pv210: use defines for GPIO flags in Aquila Replace hard-coded flags with defines for readability. No functional change. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-17-krzk@kernel.org commit fd595722c1048c021a4c0427afbb807d4a5dbe0b Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:31 2020 +0200 ARM: dts: s5pv210: add RTC 32 KHz clock in Torbreck The S3C RTC requires 32768 Hz clock as input which is provided by PMIC. However the PMIC is not described in DTS at all so at least add a workaround to model its clock with a fixed-clock. This fixes dtbs_check warnings: rtc@e2800000: clocks: [[2, 145]] is too short rtc@e2800000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-16-krzk@kernel.org commit 7260b363457a22b8723d5cbc43fee67397896d07 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:30 2020 +0200 ARM: dts: s5pv210: add RTC 32 KHz clock in SMDKV210 The S3C RTC requires 32768 Hz clock as input which is provided by PMIC. However the PMIC is not described in DTS at all so at least add a workaround to model its clock with a fixed-clock. This fixes dtbs_check warnings: rtc@e2800000: clocks: [[2, 145]] is too short rtc@e2800000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-15-krzk@kernel.org commit 37dea4fa9888e72bc7239c1c495be92901cd3e7f Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:29 2020 +0200 ARM: dts: s5pv210: add RTC 32 KHz clock in SMDKC110 The S3C RTC requires 32768 Hz clock as input which is provided by PMIC. However the PMIC is not described in DTS at all so at least add a workaround to model its clock with a fixed-clock. This fixes dtbs_check warnings: rtc@e2800000: clocks: [[2, 145]] is too short rtc@e2800000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-14-krzk@kernel.org commit ebb105b59c7566a249cf0ee1cfc86386f04cd442 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:28 2020 +0200 ARM: dts: s5pv210: add RTC 32 KHz clock in Goni The S3C RTC requires 32768 Hz clock as input which is provided by PMIC. However there is no such clock provider but rather a regulator driver which registers the clock as a regulator. This is an old driver which will not be updated so add a workaround - a fixed-clock to fill missing clock phandle reference in S3C RTC. This fixes dtbs_check warnings: rtc@e2800000: clocks: [[2, 145]] is too short rtc@e2800000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-13-krzk@kernel.org commit 086c4498b0cc87fdb09188f3da7056e898814948 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:27 2020 +0200 ARM: dts: s5pv210: add RTC 32 KHz clock in Aries family The S3C RTC requires 32768 Hz clock as input which is provided by PMIC. However there is no such clock provider but rather a regulator driver which registers the clock as a regulator. This is an old driver which will not be updated so add a workaround - a fixed-clock to fill missing clock phandle reference in S3C RTC. This fixes dtbs_check warnings: rtc@e2800000: clocks: [[2, 145]] is too short rtc@e2800000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Tested-by: Jonathan Bakker Link: https://lore.kernel.org/r/20200907161141.31034-12-krzk@kernel.org commit e59cb2fb3b33605cc75fab9fb0dd8cf2eee3019e Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:26 2020 +0200 ARM: dts: s5pv210: add RTC 32 KHz clock in Aquilla The S3C RTC requires 32768 Hz clock as input which is provided by PMIC. However there is no such clock provider but rather a regulator driver which registers the clock as a regulator. This is an old driver which will not be updated so add a workaround - a fixed-clock to fill missing clock phandle reference in S3C RTC. This fixes dtbs_check warnings: rtc@e2800000: clocks: [[2, 145]] is too short rtc@e2800000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-11-krzk@kernel.org commit 6c17a2974abf68a58517f75741b15c4aba42b4b8 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:24 2020 +0200 ARM: dts: s5pv210: remove dedicated 'audio-subsystem' node The 'audio-subsystem' node is an artificial creation, not representing real hardware. The hardware is described by its nodes - AUDSS clock controller and I2S0. Remove the 'audio-subsystem' node along with its undocumented compatible to fix dtbs_check warnings like: audio-subsystem: $nodename:0: 'audio-subsystem' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' Signed-off-by: Krzysztof Kozlowski Tested-by: Jonathan Bakker Link: https://lore.kernel.org/r/20200907161141.31034-9-krzk@kernel.org commit bb98fff84ad1ea321823759edaba573a16fa02bd Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:23 2020 +0200 ARM: dts: s5pv210: move PMU node out of clock controller The Power Management Unit (PMU) is a separate device which has little common with clock controller. Moving it to one level up (from clock controller child to SoC) allows to remove fake simple-bus compatible and dtbs_check warnings like: clock-controller@e0100000: $nodename:0: 'clock-controller@e0100000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' Signed-off-by: Krzysztof Kozlowski Tested-by: Jonathan Bakker Link: https://lore.kernel.org/r/20200907161141.31034-8-krzk@kernel.org commit d38cae370e5f2094cbc38db3082b8e9509ae52ce Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:22 2020 +0200 ARM: dts: s5pv210: move fixed clocks under root node The fixed clocks are kept under dedicated 'external-clocks' node, thus a fake 'reg' was added. This is not correct with dtschema as fixed-clock binding does not have a 'reg' property. Moving fixed clocks out of 'soc' to root node fixes multiple dtbs_check warnings: external-clocks: $nodename:0: 'external-clocks' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' external-clocks: #size-cells:0:0: 0 is not one of [1, 2] external-clocks: oscillator@0:reg:0: [0] is too short external-clocks: oscillator@1:reg:0: [1] is too short external-clocks: 'ranges' is a required property oscillator@0: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Tested-by: Jonathan Bakker Link: https://lore.kernel.org/r/20200907161141.31034-7-krzk@kernel.org commit ea4e792f3c8931fffec4d700cf6197d84e9f35a6 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:21 2020 +0200 ARM: dts: s5pv210: remove DMA controller bus node name to fix dtschema warnings There is no need to keep DMA controller nodes under AMBA bus node. Remove the "amba" node to fix dtschema warnings like: amba: $nodename:0: 'amba' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' Signed-off-by: Krzysztof Kozlowski Tested-by: Jonathan Bakker Link: https://lore.kernel.org/r/20200907161141.31034-6-krzk@kernel.org commit 2c6658c607a3af2ed7bd41dc57a3dd31537d023e Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:20 2020 +0200 ARM: dts: s5pv210: fix pinctrl property of "vibrator-en" regulator in Aries Fix typo in pinctrl property of "vibrator-en" fixed regulator in Aries family of boards. The error caused lack of pin configuration for the GPIO used in vibrator. Fixes: 04568cb58a43 ("ARM: dts: s5pv210: Disable pull for vibrator enable GPIO on Aries boards") Signed-off-by: Krzysztof Kozlowski Cc: Link: https://lore.kernel.org/r/20200907161141.31034-5-krzk@kernel.org commit ad1edcdf477d4e7228d87018ed27d8f7012f6a84 Author: Krzysztof Kozlowski Date: Mon Sep 7 18:11:17 2020 +0200 dt-bindings: samsung: pmu: document S5Pv210 Add compatible for the Samsung S5Pv210 SoC PMU. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907161141.31034-2-krzk@kernel.org commit a8529f3b1cd89b8c650b5bfa1903f18460b57faf Author: Fabien Parent Date: Sun Sep 6 20:09:38 2020 +0200 memory: mtk-smi: add support for MT8167 Add support for the SMI IP on MT8167 Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20200906180938.1117526-2-fparent@baylibre.com Signed-off-by: Krzysztof Kozlowski commit 83ab016dfac377d1edc3698fb5179196f4f71f02 Author: Fabien Parent Date: Sun Sep 6 20:09:37 2020 +0200 dt-bindings: memory: mediatek: Add binding for MT8167 SMI Add device tree bindings documentation for MT8167 SMI. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20200906180938.1117526-1-fparent@baylibre.com Signed-off-by: Krzysztof Kozlowski commit 89603f7e7e5a6b719f1a163a05bd8a9231b58318 Author: Jason Gunthorpe Date: Fri Sep 4 19:41:46 2020 -0300 RDMA/umem: Replace for_each_sg_dma_page with rdma_umem_for_each_dma_block Generally drivers should be using this core helper to split up the umem into DMA pages. These drivers are all probably wrong in some way to pass PAGE_SIZE in as the HW page size. Either the driver doesn't support other page sizes and it should use 4096, or the driver does support other page sizes and should use ib_umem_find_best_pgsz() to select the best HW pages size of the HW supported set. The only case it could be correct is if the HW has a global setting for PAGE_SIZE set at driver initialization time. Link: https://lore.kernel.org/r/5-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit ebc24096c4c40017d9f9b0fddc5d69b94ad10369 Author: Jason Gunthorpe Date: Fri Sep 4 19:41:45 2020 -0300 RDMA/umem: Add rdma_umem_for_each_dma_block() This helper does the same as rdma_for_each_block(), except it works on a umem. This simplifies most of the call sites. Link: https://lore.kernel.org/r/4-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Acked-by: Miguel Ojeda Acked-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 3361c29e9279e682c0e9a7d7461b4e3bbc77830b Author: Jason Gunthorpe Date: Fri Sep 4 19:41:44 2020 -0300 RDMA/umem: Use simpler logic for ib_umem_find_best_pgsz() The calculation in rdma_find_pg_bit() is fairly complicated, and the function is never called anywhere else. Inline a simpler version into ib_umem_find_best_pgsz() Link: https://lore.kernel.org/r/3-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit 10c75ccb54e4fe548cb16d7ed426d7d709e6ae76 Author: Jason Gunthorpe Date: Fri Sep 4 19:41:43 2020 -0300 RDMA/umem: Prevent small pages from being returned by ib_umem_find_best_pgsz() rdma_for_each_block() makes assumptions about how the SGL is constructed that don't work if the block size is below the page size used to to build the SGL. The rules for umem SGL construction require that the SG's all be PAGE_SIZE aligned and we don't encode the actual byte offset of the VA range inside the SGL using offset and length. So rdma_for_each_block() has no idea where the actual starting/ending point is to compute the first/last block boundary if the starting address should be within a SGL. Fixing the SGL construction turns out to be really hard, and will be the subject of other patches. For now block smaller pages. Fixes: 4a35339958f1 ("RDMA/umem: Add API to find best driver supported page size in an MR") Link: https://lore.kernel.org/r/2-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Reviewed-by: Leon Romanovsky Reviewed-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit a40c20dabdf9045270767c75918feb67f0727c89 Author: Jason Gunthorpe Date: Fri Sep 4 19:41:42 2020 -0300 RDMA/umem: Fix ib_umem_find_best_pgsz() for mappings that cross a page boundary It is possible for a single SGL to span an aligned boundary, eg if the SGL is 61440 -> 90112 Then the length is 28672, which currently limits the block size to 32k. With a 32k page size the two covering blocks will be: 32768->65536 and 65536->98304 However, the correct answer is a 128K block size which will span the whole 28672 bytes in a single block. Instead of limiting based on length figure out which high IOVA bits don't change between the start and end addresses. That is the highest useful page size. Fixes: 4a35339958f1 ("RDMA/umem: Add API to find best driver supported page size in an MR") Link: https://lore.kernel.org/r/1-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com Reviewed-by: Leon Romanovsky Reviewed-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 76f919ebffe2f666e317ef7cf4a2968590243336 Author: Ayush Sawal Date: Wed Sep 9 16:06:20 2020 +0530 cxgb4/ch_ipsec: Registering xfrmdev_ops with cxgb4 As ch_ipsec was removed without clearing xfrmdev_ops and netdev feature(esp-hw-offload). When a recalculation of netdev feature is triggered by changing tls feature(tls-hw-tx-offload) from user request, it causes a page fault due to absence of valid xfrmdev_ops. Fixes: 6dad4e8ab3ec ("chcr: Add support for Inline IPSec") Signed-off-by: Ayush Sawal Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 8081ede1f73139687a75147d529cebcc5e4149c5 Author: Andrii Nakryiko Date: Tue Sep 8 11:01:27 2020 -0700 perf: Stop using deprecated bpf_program__title() Switch from deprecated bpf_program__title() API to bpf_program__section_name(). Also drop unnecessary error checks because neither bpf_program__title() nor bpf_program__section_name() can fail or return NULL. Fixes: 521095842027 ("libbpf: Deprecate notion of BPF program "title" in favor of "section name"") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Tobias Klauser Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20200908180127.1249-1-andriin@fb.com commit 8794ebfe9a5c567fcfcaeac1d99c753c696d9cdf Merge: d85427e3c8dd3 5b797980908ac Author: David S. Miller Date: Wed Sep 9 11:26:32 2020 -0700 Merge branch 'ksz9477-dsa-switch-driver-improvements' Paul Barker says: ==================== ksz9477 dsa switch driver improvements These changes were made while debugging the ksz9477 driver for use on a custom board which uses the ksz9893 switch supported by this driver. The patches have been runtime tested on top of Linux 5.8.4, I couldn't runtime test them on top of 5.9-rc3 due to unrelated issues. They have been build tested on top of net-next. These changes can also be pulled from: https://gitlab.com/pbarker.dev/staging/linux.git tag: for-net-next/ksz-v3_2020-09-09 Changes from v2: * Fixed incorrect type in assignment error. Reported-by: kernel test robot Changes from v1: * Rebased onto net-next. * Dropped unnecessary `#include `. * Instead of printing the phy mode in `ksz9477_port_setup()`, modify the existing print in `ksz9477_config_cpu_port()` to always produce output and to be more clear. ==================== Signed-off-by: David S. Miller commit 5b797980908ac83a55a3d1ec578382ff60a33551 Author: Paul Barker Date: Wed Sep 9 11:04:17 2020 +0100 net: dsa: microchip: Implement recommended reset timing The datasheet for the ksz9893 and ksz9477 switches recommend waiting at least 100us after the de-assertion of reset before trying to program the device through any interface. Also switch the existing msleep() call to usleep_range() as recommended in Documentation/timers/timers-howto.rst. The 2ms range used here is somewhat arbitrary, as long as the reset is asserted for at least 10ms we should be ok. Signed-off-by: Paul Barker Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ade64eb5be9768e40c90ecb01295416abb2ddbac Author: Paul Barker Date: Wed Sep 9 11:04:16 2020 +0100 net: dsa: microchip: Disable RGMII in-band status on KSZ9893 We can't assume that the link partner supports the in-band status reporting which is enabled by default on the KSZ9893 when using RGMII for the upstream port. Signed-off-by: Paul Barker Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 805a7e6f53886f47b3f9cee57a580cb8f20b9252 Author: Paul Barker Date: Wed Sep 9 11:04:15 2020 +0100 net: dsa: microchip: Improve phy mode message Always print the selected phy mode for the CPU port when using the ksz9477 driver. If the phy mode was changed, also print the previous mode to aid in debugging. To make the message more clear, prefix it with the port number which it applies to and improve the language a little. Signed-off-by: Paul Barker Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 3c85f775151d8efb0fc83fd577a861c2356458e8 Author: Paul Barker Date: Wed Sep 9 11:04:14 2020 +0100 net: dsa: microchip: Make switch detection more informative To make switch detection more informative print the result of the ksz9477/ksz9893 compatibility check. With debug output enabled also print the contents of the Chip ID registers as a 40-bit hex string. As this detection is the first communication with the switch performed by the driver, making it easy to see any errors here will help identify issues with SPI data corruption or reset sequencing. Signed-off-by: Paul Barker Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 7fb5eefd76394cfefb380724a87ca40b47d44405 Author: Yonghong Song Date: Wed Sep 9 10:15:42 2020 -0700 selftests/bpf: Fix test_sysctl_loop{1, 2} failure due to clang change Andrii reported that with latest clang, when building selftests, we have error likes: error: progs/test_sysctl_loop1.c:23:16: in function sysctl_tcp_mem i32 (%struct.bpf_sysctl*): Looks like the BPF stack limit of 512 bytes is exceeded. Please move large on stack variables into BPF per-cpu array map. The error is triggered by the following LLVM patch: https://reviews.llvm.org/D87134 For example, the following code is from test_sysctl_loop1.c: static __always_inline int is_tcp_mem(struct bpf_sysctl *ctx) { volatile char tcp_mem_name[] = "net/ipv4/tcp_mem/very_very_very_very_long_pointless_string"; ... } Without the above LLVM patch, the compiler did optimization to load the string (59 bytes long) with 7 64bit loads, 1 8bit load and 1 16bit load, occupying 64 byte stack size. With the above LLVM patch, the compiler only uses 8bit loads, but subregister is 32bit. So stack requirements become 4 * 59 = 236 bytes. Together with other stuff on the stack, total stack size exceeds 512 bytes, hence compiler complains and quits. To fix the issue, removing "volatile" key word or changing "volatile" to "const"/"static const" does not work, the string is put in .rodata.str1.1 section, which libbpf did not process it and errors out with libbpf: elf: skipping unrecognized data section(6) .rodata.str1.1 libbpf: prog 'sysctl_tcp_mem': bad map relo against '.L__const.is_tcp_mem.tcp_mem_name' in section '.rodata.str1.1' Defining the string const as global variable can fix the issue as it puts the string constant in '.rodata' section which is recognized by libbpf. In the future, when libbpf can process '.rodata.str*.*' properly, the global definition can be changed back to local definition. Defining tcp_mem_name as a global, however, triggered a verifier failure. ./test_progs -n 7/21 libbpf: load bpf program failed: Permission denied libbpf: -- BEGIN DUMP LOG --- libbpf: invalid stack off=0 size=1 verification time 6975 usec stack depth 160+64 processed 889 insns (limit 1000000) max_states_per_insn 4 total_states 14 peak_states 14 mark_read 10 libbpf: -- END LOG -- libbpf: failed to load program 'sysctl_tcp_mem' libbpf: failed to load object 'test_sysctl_loop2.o' test_bpf_verif_scale:FAIL:114 #7/21 test_sysctl_loop2.o:FAIL This actually exposed a bpf program bug. In test_sysctl_loop{1,2}, we have code like const char tcp_mem_name[] = "<...long string...>"; ... char name[64]; ... for (i = 0; i < sizeof(tcp_mem_name); ++i) if (name[i] != tcp_mem_name[i]) return 0; In the above code, if sizeof(tcp_mem_name) > 64, name[i] access may be out of bound. The sizeof(tcp_mem_name) is 59 for test_sysctl_loop1.c and 79 for test_sysctl_loop2.c. Without promotion-to-global change, old compiler generates code where the overflowed stack access is actually filled with valid value, so hiding the bpf program bug. With promotion-to-global change, the code is different, more specifically, the previous loading constants to stack is gone, and "name" occupies stack[-64:0] and overflow access triggers a verifier error. To fix the issue, adjust "name" buffer size properly. Reported-by: Andrii Nakryiko Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200909171542.3673449-1-yhs@fb.com commit d85427e3c8dd36ab5a1202cc2c003b307c49bc07 Merge: ac99a822c67b9 b131c96496b36 Author: David S. Miller Date: Wed Sep 9 11:21:19 2020 -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 patchset contains Netfilter updates for net-next: 1) Rewrite inner header IPv6 in ICMPv6 messages in ip6t_NPT, from Michael Zhou. 2) do_ip_vs_set_ctl() dereferences uninitialized value, from Peilin Ye. 3) Support for userdata in tables, from Jose M. Guisado. 4) Do not increment ct error and invalid stats at the same time, from Florian Westphal. 5) Remove ct ignore stats, also from Florian. 6) Add ct stats for clash resolution, from Florian Westphal. 7) Bump reference counter bump on ct clash resolution only, this is safe because bucket lock is held, again from Florian. 8) Use ip_is_fragment() in xt_HMARK, from YueHaibing. 9) Add wildcard support for nft_socket, from Balazs Scheidler. 10) Remove superfluous IPVS dependency on iptables, from Yaroslav Bolyukin. 11) Remove unused definition in ebt_stp, from Wang Hai. 12) Replace CONFIG_NFT_CHAIN_NAT_{IPV4,IPV6} by CONFIG_NFT_NAT in selftests/net, from Fabian Frederick. 13) Add userdata support for nft_object, from Jose M. Guisado. ==================== Signed-off-by: David S. Miller commit 7eec675669fbdef376198d3b04349301de3270f4 Author: Jonathan Neuschäfer Date: Sat Sep 5 22:43:26 2020 +0200 docs: ubifs-authentication: Add a top-level heading This prevents the chapter headings from showing up in the table of contents in filesystems/index.html. Note that I didn't pick "UBIFS Authentication" as the document title, because there is a chapter of the same name, and Sphinx complains about multiple headings with the same name: /.../Documentation/filesystems/ubifs-authentication.rst:207: WARNING: duplicate label filesystems/ubifs-authentication:ubifs authentication, other instance in /.../Documentation/filesystems/ubifs-authentication.rst Remove the :orphan: tag, as the document has been included into the toctree. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20200905204326.1378339-3-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet commit fdcc9e07618921e6f6279a86a3d107bae32cb86f Author: Jonathan Neuschäfer Date: Sat Sep 5 22:43:25 2020 +0200 MAINTAINERS: Add ubifs-authentication.rst to UBIFS Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20200905204326.1378339-2-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet commit 319f5fa089f24085083e35a68ae0264956fb657a Author: Barry Song Date: Fri Sep 4 22:19:02 2020 +1200 Documentation: core-api/cpu_hotplug: fix a typo fourV CPUs should be four CPUs. Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20200904101902.29560-1-song.bao.hua@hisilicon.com Signed-off-by: Jonathan Corbet commit 2e915ea0bfda467d7ddf5579dafc95360f79479c Author: Lars Poeschel Date: Fri Sep 4 11:19:11 2020 +0200 Documentation: iio: fix a typo Rename function name to the actual name referenced in struct iio_sw_trigger_ops. Signed-off-by: Lars Poeschel Link: https://lore.kernel.org/r/20200904091911.269715-1-poeschel@lemonage.de Signed-off-by: Jonathan Corbet commit 50aab9b14291faa212e8a26145c244d4a62c75c3 Author: Ralph Campbell Date: Wed Sep 2 15:52:47 2020 -0700 mm/doc: editorial pass on page migration Add Sphinx reference links to HMM and CPUSETS, and numerous small editorial changes to make the page_migration.rst document more readable. Signed-off-by: Ralph Campbell Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20200902225247.15213-1-rcampbell@nvidia.com Signed-off-by: Jonathan Corbet commit 17dca0502314fa4855fae269dc86a1ce840a4d1a Author: Gustavo A. R. Silva Date: Mon Aug 31 20:09:49 2020 -0500 docs: deprecated.rst: Update zero-length/one-element arrays section Update information in the zero-length and one-element arrays section and illustrate how to make use of the new flex_array_size() helper, together with struct_size() and a flexible-array member. Signed-off-by: Gustavo A. R. Silva Acked-by: Kees Cook Link: https://lore.kernel.org/r/20200901010949.GA21398@embeddedor Signed-off-by: Jonathan Corbet commit 9334e34fe1d5dec2bcfd41a4a1317d284ab1d61f Author: Randy Dunlap Date: Sun Aug 30 17:43:54 2020 -0700 Documentation: submit-checklist: add clean builds for new Documentation Add to Documentation/process/submit-checklist.rst that patch submitters should run "make htmldocs" and verify that any Documentation/ changes (patches) are clean (no new warnings/errors). Signed-off-by: Randy Dunlap Reviewed-by: Mike Rapoport Link: https://lore.kernel.org/r/cf5bbdf5-03ff-0606-a6d4-ca196d90aee9@infradead.org Signed-off-by: Jonathan Corbet commit e046de3d79d7f2257b86a142a00e4e3a2fdb41b7 Author: Denis Efremov Date: Sun Aug 30 17:41:35 2020 +0300 docs: filesystems: replace to_dev() with kobj_to_dev() Commit a4232963757e ("driver-core: Move kobj_to_dev from genhd.h to device.h") introduced kobj_to_dev() function. Signed-off-by: Denis Efremov Link: https://lore.kernel.org/r/20200830144135.6956-1-efremov@linux.com Signed-off-by: Jonathan Corbet commit cf92ec602ac504cdc896314eb0105c69f28c7ab8 Author: Denis Efremov Date: Sun Aug 30 17:25:09 2020 +0300 Documentation: remove current_security() reference Commit 15322a0d90b6 ("lsm: remove current_security()") removed current_security() from the sources. Signed-off-by: Denis Efremov Link: https://lore.kernel.org/r/20200830142509.5738-1-efremov@linux.com Signed-off-by: Jonathan Corbet commit 27c8700bd1ab3f540ca2dd180ebc18881a92a083 Author: Coly Li Date: Fri Aug 21 23:13:54 2020 +0800 bcache: doc: update Documentation/admin-guide/bcache.rst bcache.rst is from the original bcache.txt which was merged in mainline kernel v3.10. There are a few things changed in the past 7 years. This patch updates bache.rst documents in following content, - Update bcache-tools git repo to, https://git.kernel.org/pub/scm/linux/kernel/git/colyli/bcache-tools.git/ - Update bcache kernel tree to mainline kernel tree, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ - make-bcache util is replaced by the unified bcache util, `make-bcache` now can be performed by `bcache make` Signed-off-by: Coly Li Cc: Jonathan Corbet Cc: Kent Overstreet Link: https://lore.kernel.org/r/20200821151354.16727-1-colyli@suse.de Signed-off-by: Jonathan Corbet commit bb84bc51d206a828893c11c489dfc44571e48b1c Author: Coly Li Date: Fri Aug 21 21:53:56 2020 +0800 docs: trusted-encrypted.rst: update parameters for command examples The parameters in command examples for tpm2_createprimary and tpm2_evictcontrol are outdated, people (like me) are not able to create trusted key by these command examples. This patch updates the parameters of command example tpm2_createprimary and tpm2_evictcontrol in trusted-encrypted.rst. With Linux kernel v5.8 and tpm2-tools-4.1, people can create a trusted key by following the examples in this document. Signed-off-by: Coly Li Reviewed-by: Jarkko Sakkinen Reviewed-by: Stefan Berger Cc: Dan Williams Cc: James Bottomley Cc: Jason Gunthorpe Cc: Mimi Zohar Cc: Peter Huewe Link: https://lore.kernel.org/r/20200821135356.15737-1-colyli@suse.de Signed-off-by: Jonathan Corbet commit 46ca9ee5b833659dd3af56b7e4253d8994a87962 Author: Connor Kuehl Date: Wed Aug 19 16:19:52 2020 -0500 docs: kvm: fix referenced ioctl symbol The actual symbol that is exported and usable is 'KVM_MEMORY_ENCRYPT_OP', not 'KVM_MEM_ENCRYPT_OP' $ git grep -l KVM_MEM_ENCRYPT_OP Documentation/virt/kvm/amd-memory-encryption.rst $ git grep -l KVM_MEMORY_ENCRYPT_OP Documentation/virt/kvm/api.rst arch/x86/kvm/x86.c include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h While we're in there, update the KVM API category for KVM_MEMORY_ENCRYPT_OP. It is called on a VM file descriptor. Signed-off-by: Connor Kuehl Link: https://lore.kernel.org/r/20200819211952.251984-1-ckuehl@redhat.com Signed-off-by: Jonathan Corbet commit 71ff3f6268644783d556fab10066f1027030135f Author: Leon Romanovsky Date: Mon Sep 7 15:09:21 2020 +0300 RDMA: Make counters destroy symmetrical Change counters to return failure like any other verbs destroy, however this flow shouldn't return error at all. Link: https://lore.kernel.org/r/20200907120921.476363-10-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit add53535fb3033c249d9327ae3e7c36d3382bbd1 Author: Leon Romanovsky Date: Mon Sep 7 15:09:20 2020 +0300 RDMA: Restore ability to return error for destroy WQ Make this interface symmetrical to other destroy paths. Fixes: a49b1dc7ae44 ("RDMA: Convert destroy_wq to be void") Link: https://lore.kernel.org/r/20200907120921.476363-9-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d0c45c8556e57342d44c9548763609ffcc4e3866 Author: Leon Romanovsky Date: Mon Sep 7 15:09:19 2020 +0300 RDMA: Change XRCD destroy return value Update XRCD destroy flow to allow command failure. Fixes: 28ad5f65c314 ("RDMA: Move XRCD to be under ib_core responsibility") Link: https://lore.kernel.org/r/20200907120921.476363-8-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 43d781b9fa562f0c6e50f62c870fbfeb9dc85213 Author: Leon Romanovsky Date: Mon Sep 7 15:09:18 2020 +0300 RDMA: Allow fail of destroy CQ Like any other verbs objects, CQ shouldn't fail during destroy, but mlx5_ib didn't follow this contract with mixed IB verbs objects with DEVX. Such mix causes to the situation where FW and kernel are fully interdependent on the reference counting of each side. Kernel verbs and drivers that don't have DEVX flows shouldn't fail. Fixes: e39afe3d6dbd ("RDMA: Convert CQ allocations to be under core responsibility") Link: https://lore.kernel.org/r/20200907120921.476363-7-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7e3c66c9a989d5b53387ceebc88b9e4a9b1d6434 Author: Leon Romanovsky Date: Mon Sep 7 15:09:17 2020 +0300 RDMA/core: Delete function indirection for alloc/free kernel CQ The ib_alloc_cq*() and ib_free_cq*() are solely kernel verbs to manage CQs and doesn't need extra indirection just to call same functions with constant parameter NULL as udata. Link: https://lore.kernel.org/r/20200907120921.476363-6-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 119181d1d4327d3259ab25aa0ea3d3bc364afcdc Author: Leon Romanovsky Date: Mon Sep 7 15:09:16 2020 +0300 RDMA: Restore ability to fail on SRQ destroy In similar way to other IB objects, restore the ability to return error on SRQ destroy. Strictly speaking, this change is not necessary, and provided here to ensure a symmetrical interface like other destroy functions. Fixes: 68e326dea1db ("RDMA: Handle SRQ allocations by IB/core") Link: https://lore.kernel.org/r/20200907120921.476363-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit fd89099d635e67f22c3eda263bef1f27f9d5dcb5 Author: Leon Romanovsky Date: Mon Sep 7 15:09:15 2020 +0300 RDMA/mlx5: Issue FW command to destroy SRQ on reentry The HW release can fail and leave the system in limbo state, where SRQ is removed from the table, but can't be destroyed later. In every reentry, the initial xa_erase_irq() check will fail. Rewrite the erase logic to keep index, but don't store the entry itself. By doing it, we can safely reinsert entry back in the case of destroy failure. Link: https://lore.kernel.org/r/20200907120921.476363-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 9a9ebf8cd72b809405ad571fb2f635ffc9df2420 Author: Leon Romanovsky Date: Mon Sep 7 15:09:14 2020 +0300 RDMA: Restore ability to fail on AH destroy Like any other IB verbs objects, AH are refcounted by ib_core. The release of those objects are controlled by ib_core with promise that AH destroy can't fail. Being SW object for now, this change makes dealloc_ah() to behave like any other destroy IB flows. Fixes: d345691471b4 ("RDMA: Handle AH allocations by IB/core") Link: https://lore.kernel.org/r/20200907120921.476363-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 91a7c58fce065506fd98954d27694e5d83c96638 Author: Leon Romanovsky Date: Mon Sep 7 15:09:13 2020 +0300 RDMA: Restore ability to fail on PD deallocate The IB verbs objects are counted by the kernel and ib_core ensures that deallocate PD will success so it will be called once all other objects that depends on PD will be released. This is achieved by managing various reference counters on such objects. The mlx5 driver didn't follow this standard flow when allowed DEVX objects that are not managed by ib_core to be interleaved with the ones under ib_core responsibility. In such interleaved scenarios deallocate command can fail and ib_core will leave uobject in internal DB and attempt to clean it later to free resources anyway. This change partially restores returned value from dealloc_pd() for all drivers, but keeping in mind that non-DEVX devices and kernel verbs paths shouldn't fail. Fixes: 21a428a019c9 ("RDMA: Handle PD allocations by IB/core") Link: https://lore.kernel.org/r/20200907120921.476363-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5554743d88483934cabff45943913be0830e66bc Author: YueHaibing Date: Wed Sep 9 21:57:44 2020 +0800 ALSA: pcm: Remove unused inline function snd_mask_sizeof There is no caller in tree, so can remove it. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200909135744.33464-1-yuehaibing@huawei.com Signed-off-by: Takashi Iwai commit 175860c50a800fb46f5f3cb44ed3db0344c0fcc5 Author: YueHaibing Date: Wed Sep 9 21:49:27 2020 +0800 ALSA: pci/asihpi: Remove unused function hpi_stream_group_get_map() There is no caller in tree, so can remove it. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200909134927.33964-1-yuehaibing@huawei.com Signed-off-by: Takashi Iwai commit f2a852d36711bd7c7c717abc66c07751f3e1d482 Author: Takashi Iwai Date: Thu Sep 3 12:41:31 2020 +0200 ALSA: mixart: Correct comment wrt obsoleted tasklet usage The miXart driver has been already converted to use the threaded IRQ instead of tasklet while there is a remaining comment still mentioning a tasklet. Update the comment appropriately. Fixes: 8d3a8b5cb57d ("ALSA: mixart: Use nonatomic PCM ops") Link: https://lore.kernel.org/r/20200903104131.21097-12-tiwai@suse.de Signed-off-by: Takashi Iwai commit ce4f25759372bbf6c37b92712b00c1b1b9b4b48e Author: Takashi Iwai Date: Thu Sep 3 12:41:29 2020 +0200 ALSA: asihpi: Replace tasklet with threaded irq The tasklet is an old API that should be deprecated, usually can be converted to another decent API. In ASIHPI driver, a tasklet is still used for offloading the PCM IRQ handling. It can be achieved gracefully with a threaded IRQ, too. This patch replaces the tasklet usage in asihpi driver with a threaded IRQ. It also simplified some call patterns. Link: https://lore.kernel.org/r/20200903104131.21097-10-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2ac55daffee5af04b13f96e6acef63a8e4bfff85 Author: Takashi Iwai Date: Thu Sep 3 12:41:28 2020 +0200 ALSA: riptide: Replace tasklet with threaded irq The tasklet is an old API that should be deprecated, usually can be converted to another decent API. In Riptide driver, a tasklet is still used for offloading the PCM IRQ handling. It can be achieved gracefully with a threaded IRQ, too. This patch replaces the tasklet usage in riptide driver with a threaded IRQ. Link: https://lore.kernel.org/r/20200903104131.21097-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit a2e527c5a3ebcf248b51705ef44f6700403fd8e3 Author: Takashi Iwai Date: Thu Sep 3 12:41:27 2020 +0200 ALSA: hdspm: Replace tasklet with work The tasklet is an old API that should be deprecated, usually can be converted to another decent API. In HDSP-MADI driver, a tasklet is still used for offloading the MIDI I/O handling (optional via mixer switch). It can be achieved gracefully with a work queued, too. This patch replaces the tasklet usage in HDSP-MADI driver with a simple work. The conversion is fairly straightforward. The only significant difference is that the work initialization is moved to the right place in snd_hdspm_create() and cancel_work_sync() is always called in snd_hdspm_free() to assure killing the pending works. Link: https://lore.kernel.org/r/20200903104131.21097-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4adab848ae752cc92c4de1403144002f369b079f Author: Takashi Iwai Date: Thu Sep 3 12:41:26 2020 +0200 ALSA: hdsp: Replace tasklet with work The tasklet is an old API that should be deprecated, usually can be converted to another decent API. In HDSP driver, a tasklet is still used for offloading the MIDI I/O handling (optional via mixer switch). It can be achieved gracefully with a work queued, too. This patch replaces the tasklet usage in HDSP driver with a simple work. The conversion is fairly straightforward. The only significant difference is that a superfluous tasklet_kill() call is removed from snd_hdap_midi_input_trigger(). Link: https://lore.kernel.org/r/20200903104131.21097-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6053a712472461c3800d4406bea0c8d5ce98df1a Author: Takashi Iwai Date: Thu Sep 3 12:41:25 2020 +0200 ALSA: aloop: Replace tasklet with work The tasklet is an old API that should be deprecated, usually can be converted to another decent API. In aloop driver, a tasklet is still used for offloading the timer event task. It can be achieved gracefully with a work queued, too. This patch replaces the tasklet usage in aloop driver with a simple work. Link: https://lore.kernel.org/r/20200903104131.21097-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit 45e4d67f8a53e713833292cc5fef3603294a5914 Author: Takashi Iwai Date: Thu Sep 3 12:41:24 2020 +0200 ALSA: ua101: Replace tasklet with work The tasklet is an old API that should be deprecated, usually can be converted to another decent API. In UA101 driver, a tasklet is still used for handling the output URBs. It can be achieved gracefully with a work queued in the high-prio system workqueue, too. This patch replaces the tasklet usage in UA101 driver with a simple work. Link: https://lore.kernel.org/r/20200903104131.21097-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit c7d9efdff68e00350e611227ad191ce347b88ea5 Author: Takashi Iwai Date: Thu Sep 3 12:41:23 2020 +0200 ALSA: usb-audio: Replace tasklet with work The tasklet is an old API that should be deprecated, usually can be converted to another decent API. In USB-audio driver, a tasklet is still used in MIDI interface code for handling the output byte stream. It can be achieved gracefully with a work queued in the high-prio system workqueue. This patch replaces the tasklet usage in USB-audio driver with a simple work. Link: https://lore.kernel.org/r/20200903104131.21097-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit bf0835957f553aeddec896f3de386562536feee4 Author: Takashi Iwai Date: Thu Sep 3 12:41:22 2020 +0200 ALSA: timer: Replace tasklet with work The tasklet is an old API that should be deprecated, usually can be converted to another decent API. In ALSA core timer API, the callbacks can be offlined to a tasklet when a flag is set in the timer backend. It can be achieved gracefully with a work queued in the high-prio system workqueue. This patch replaces the usage of tasklet in ALSA timer API with a simple work. Currently the tasklet feature is used only in the system timer and hrtimer backends, so both are patched to use the new flag name SNDRV_TIMER_HW_WORK, too. Link: https://lore.kernel.org/r/20200903104131.21097-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 68f86a905e2c1d7a6d5d0bcc57f4e44ae204c171 Author: Takashi Iwai Date: Thu Sep 3 12:41:21 2020 +0200 ALSA: pcsp: Replace tasklet with work The tasklet is an old API that should be deprecated, usually can be converted to another decent API. This patch replaces the usage of tasklet in pcsp driver with a simple work. In pcsp driver, a global tasklet is used for offloading the period-elapse handling in the hrtimer callback (introduced in commit 96c7d478efad "ALSA: pcsp - Fix locking messes in snd-pcsp"). It can be achieved gracefully with a work queued in the high-prio system workqueue. This also changes tasklet_kill() with cancel_work_sync() in the sync_stop callback, which is anyway better to assure canceling the pending tasks. Link: https://lore.kernel.org/r/20200903104131.21097-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 558d52b2976b1db3098139aa83ceb9af9066a0e7 Author: Md Haris Iqbal Date: Mon Sep 7 16:01:06 2020 +0530 RDMA/rtrs-srv: Incorporate ib_register_client into rtrs server init The rnbd_server module's communication manager (cm) initialization depends on the registration of the "network namespace subsystem" of the RDMA CM agent module. As such, when the kernel is configured to load the rnbd_server and the RDMA cma module during initialization; and if the rnbd_server module is initialized before RDMA cma module, a null ptr dereference occurs during the RDMA bind operation. Call trace: Call Trace: ? xas_load+0xd/0x80 xa_load+0x47/0x80 cma_ps_find+0x44/0x70 rdma_bind_addr+0x782/0x8b0 ? get_random_bytes+0x35/0x40 rtrs_srv_cm_init+0x50/0x80 rtrs_srv_open+0x102/0x180 ? rnbd_client_init+0x6e/0x6e rnbd_srv_init_module+0x34/0x84 ? rnbd_client_init+0x6e/0x6e do_one_initcall+0x4a/0x200 kernel_init_freeable+0x1f1/0x26e ? rest_init+0xb0/0xb0 kernel_init+0xe/0x100 ret_from_fork+0x22/0x30 Modules linked in: CR2: 0000000000000015 All this happens cause the cm init is in the call chain of the module init, which is not a preferred practice. So remove the call to rdma_create_id() from the module init call chain. Instead register rtrs-srv as an ib client, which makes sure that the rdma_create_id() is called only when an ib device is added. Fixes: 9cb837480424 ("RDMA/rtrs: server: main functionality") Link: https://lore.kernel.org/r/20200907103106.104530-1-haris.iqbal@cloud.ionos.com Reported-by: kernel test robot Signed-off-by: Md Haris Iqbal Reviewed-by: Jack Wang Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 9ddb236f13594b34a12dacf69a5adca7a1aef35e Merge: b248b9dd5975c fc19d559b0d31 Author: Takashi Iwai Date: Wed Sep 9 18:26:07 2020 +0200 Merge branch 'for-linus' into for-next Back-merge to apply the tasklet conversion patches that are based on the already applied tasklet API changes on 5.9-rc4. Signed-off-by: Takashi Iwai commit a2f3d4479fe9641672665d495ebec883ac9917b5 Author: Lijun Ou Date: Tue Sep 8 14:52:24 2020 +0800 RDMA/hns: Avoid unncessary initialization Some variables have been initialized when used. As a result, here removes some unncessary initial assignment. Link: https://lore.kernel.org/r/1599547944-30671-1-git-send-email-oulijun@huawei.com Signed-off-by: Lijun Ou Signed-off-by: Jason Gunthorpe commit f553246f7f794675da1794ae7ee07d1f35e561ae Author: Jason Gunthorpe Date: Wed Sep 2 11:17:08 2020 +0300 RDMA/core: Change how failing destroy is handled during uobj abort Currently it triggers a WARN_ON and then goes ahead and destroys the uobject anyhow, leaking any driver memory. The only place that leaks driver memory should be during FD close() in uverbs_destroy_ufile_hw(). Drivers are only allowed to fail destroy uobjects if they guarantee destroy will eventually succeed. uverbs_destroy_ufile_hw() provides the loop to give the driver that chance. Link: https://lore.kernel.org/r/20200902081708.746631-1-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7a8cca56f75ec9fe94550f846e66d62bc3a2778c Author: Codrin Ciubotariu Date: Wed Sep 9 17:53:47 2020 +0300 ASoC: add DT bindings for Microchip S/PDIF TX Controller This patch adds DT bindings for the new Microchip S/PDIF TX Controller embedded inside sama7g5 SoCs. Signed-off-by: Codrin Ciubotariu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200909145348.367033-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 06ca24e98e6bcc17c32ebe4b2fc579e5bf9ff5b2 Author: Codrin Ciubotariu Date: Wed Sep 9 17:53:48 2020 +0300 ASoC: mchp-spdiftx: add driver for S/PDIF TX Controller The new SPDIF TX controller is a serial port compliant with the IEC- 60958 standard. It also supports programmable User Data and Channel Status fields. This IP is embedded in Microchip's sama7g5 SoC. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20200909145348.367033-2-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 4ca68e023b11e4d5908bf9ee326fab01111d77d5 Author: Joerg Roedel Date: Mon Sep 7 15:16:11 2020 +0200 x86/sev-es: Handle NMI State When running under SEV-ES, the kernel has to tell the hypervisor when to open the NMI window again after an NMI was injected. This is done with an NMI-complete message to the hypervisor. Add code to the kernel's NMI handler to send this message right at the beginning of do_nmi(). This always allows nesting NMIs. [ bp: Mark __sev_es_nmi_complete() noinstr: vmlinux.o: warning: objtool: exc_nmi()+0x17: call to __sev_es_nmi_complete() leaves .noinstr.text section While at it, use __pa_nodebug() for the same reason due to CONFIG_DEBUG_VIRTUAL=y: vmlinux.o: warning: objtool: __sev_es_nmi_complete()+0xd9: call to __phys_addr() leaves .noinstr.text section ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-71-joro@8bytes.org commit 6c557d24fa2622bca5b950dae791d3f0d18ff2d3 Merge: 4ebf8816e35d6 062cf7fc927d2 Author: Mark Brown Date: Wed Sep 9 16:27:47 2020 +0100 Merge series "opp: Unconditionally call dev_pm_opp_of_remove_table()" from Viresh Kumar : Hello, This cleans up some of the user code around calls to dev_pm_opp_of_remove_table(). All the patches can be picked by respective maintainers directly except for the last patch, which needs the previous two to get merged first. These are based for 5.9-rc1. Rajendra, Since most of these changes are related to qcom stuff, it would be great if you can give them a try. I wasn't able to test them due to lack of hardware. Ulf, I had to revise the sdhci patch, sorry about that. Please pick this one. Diff between V1 and V2 is mentioned in each of the patches separately. Viresh Kumar (8): cpufreq: imx6q: Unconditionally call dev_pm_opp_of_remove_table() drm/lima: Unconditionally call dev_pm_opp_of_remove_table() drm/msm: Unconditionally call dev_pm_opp_of_remove_table() mmc: sdhci-msm: Unconditionally call dev_pm_opp_of_remove_table() spi: spi-geni-qcom: Unconditionally call dev_pm_opp_of_remove_table() spi: spi-qcom-qspi: Unconditionally call dev_pm_opp_of_remove_table() tty: serial: qcom_geni_serial: Unconditionally call dev_pm_opp_of_remove_table() qcom-geni-se: remove has_opp_table drivers/cpufreq/imx6q-cpufreq.c | 10 ++-------- drivers/gpu/drm/lima/lima_devfreq.c | 6 +----- drivers/gpu/drm/lima/lima_devfreq.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 14 +++++--------- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 - drivers/gpu/drm/msm/dsi/dsi_host.c | 8 ++------ drivers/mmc/host/sdhci-msm.c | 14 +++++--------- drivers/spi/spi-geni-qcom.c | 13 +++++-------- drivers/spi/spi-qcom-qspi.c | 15 ++++++--------- drivers/tty/serial/qcom_geni_serial.c | 13 +++++-------- include/linux/qcom-geni-se.h | 2 -- 11 files changed, 31 insertions(+), 66 deletions(-) base-commit: f4d51dffc6c01a9e94650d95ce0104964f8ae822 -- 2.25.0.rc1.19.g042ed3e048af commit 4ebf8816e35d63db723d95f8e49d8455be926c36 Author: Jay Fang Date: Wed Sep 9 14:08:24 2020 +0800 spi: spidev: Remove redundant initialization of variable status In spidev_read() and spidev_write(), the variable status 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. Signed-off-by: Jay Fang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1599631704-53232-1-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 062cf7fc927d2546b58ed128383e5c52f26a00a5 Author: Viresh Kumar Date: Fri Aug 28 11:37:51 2020 +0530 spi: spi-qcom-qspi: Unconditionally call dev_pm_opp_of_remove_table() dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. While at it, create a new label and put clkname on errors. Signed-off-by: Viresh Kumar Link: https://lore.kernel.org/r/b77aa0bbe82a580508e321a34da488b4b27966d0.1598594714.git.viresh.kumar@linaro.org Signed-off-by: Mark Brown commit 7d568edff5cb7968cc5f29e85da15f941b8070b8 Author: Viresh Kumar Date: Fri Aug 28 11:37:50 2020 +0530 spi: spi-geni-qcom: Unconditionally call dev_pm_opp_of_remove_table() dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. While at it, create a new label and put clkname on errors. Signed-off-by: Viresh Kumar Link: https://lore.kernel.org/r/ea0864d41277e61fa31d304fbd4cf9af6b314269.1598594714.git.viresh.kumar@linaro.org Signed-off-by: Mark Brown commit dd8c0c0b37f1692a1202ea2c6f9d43aa0485faac Author: Takashi Iwai Date: Thu Sep 3 12:47:49 2020 +0200 ASoC: txx9: Replace tasklet with work The tasklet is an old API that should be deprecated, usually can be converted to another decent API. In ASoC TXx9 ACLC driver, a tasklet is still used for offloading the hardware reset function. It can be achieved gracefully with a work queued, too. This patch replaces the tasklet usage in TXx9 ACLC driver with a simple work. The conversion is fairly straightforward. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200903104749.21435-4-tiwai@suse.de Signed-off-by: Mark Brown commit d668e640d50a981e35ccf0c87d2742b0ad26fe0c Author: Takashi Iwai Date: Thu Sep 3 12:47:48 2020 +0200 ASoC: sh: Replace tasklet with work The tasklet is an old API that should be deprecated, usually can be converted to another decent API. In ASoC SH SIU driver, a tasklet is still used for offloading the hardware reset function. It can be achieved gracefully with a work queued, too. This patch replaces the tasklet usage in SH SIU driver with a simple work. The conversion is fairly straightforward. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200903104749.21435-3-tiwai@suse.de Signed-off-by: Mark Brown commit a3d1f931ea4af3a9cae0098a957ce55293ce9ab6 Author: Takashi Iwai Date: Thu Sep 3 12:47:47 2020 +0200 ASoC: fsl: Replace tasklet with work The tasklet is an old API that should be deprecated, usually can be converted to another decent API. In ASoC FSL ESAI CPU DAI driver, a tasklet is still used for offloading the hardware reset function. It can be achieved gracefully with a work queued, too. This patch replaces the tasklet usage in fsl esai driver with a simple work. The conversion is fairly straightforward. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200903104749.21435-2-tiwai@suse.de Signed-off-by: Mark Brown commit 708ba1111525d84c7acc538c04bf190e3cda29b6 Author: Laurentiu Palcu Date: Fri Jul 31 11:18:33 2020 +0300 dt-bindings: display: imx: add bindings for DCSS Add bindings for iMX8MQ Display Controller Subsystem. Signed-off-by: Laurentiu Palcu Reviewed-by: Guido Günther Reviewed-by: Rob Herring Signed-off-by: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/20200731081836.3048-6-laurentiu.palcu@oss.nxp.com commit f61249dddecc6418285317bf5bc24b7cec84717e Author: Laurentiu Palcu Date: Fri Jul 31 11:18:32 2020 +0300 MAINTAINERS: Add entry for i.MX 8MQ DCSS driver The driver is part of DRM subsystem and is located in drivers/gpu/drm/imx/dcss. Signed-off-by: Laurentiu Palcu Reviewed-by: Guido Günther Signed-off-by: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/20200731081836.3048-5-laurentiu.palcu@oss.nxp.com commit e7033bdfd43b85281b63d281b4dad3b9119f4427 Author: Laurentiu Palcu Date: Fri Jul 31 11:18:31 2020 +0300 drm/imx/dcss: use drm_bridge_connector API Make use of drm_bridge_connector API to have the connector initialized by the display controller. Signed-off-by: Laurentiu Palcu Signed-off-by: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/20200731081836.3048-4-laurentiu.palcu@oss.nxp.com commit 9021c317b77024fb2642af7e84ad944769ae0949 Author: Laurentiu Palcu Date: Fri Jul 31 11:18:30 2020 +0300 drm/imx: Add initial support for DCSS on iMX8MQ This adds initial support for iMX8MQ's Display Controller Subsystem (DCSS). Some of its capabilities include: * 4K@60fps; * HDR10; * one graphics and 2 video pipelines; * on-the-fly decompression of compressed video and graphics; The reference manual can be found here: https://www.nxp.com/webapp/Download?colCode=IMX8MDQLQRM The current patch adds only basic functionality: one primary plane for graphics, linear, tiled and super-tiled buffers support (no graphics decompression yet), no HDR10 and no video planes. Video planes support and HDR10 will be added in subsequent patches once per-plane de-gamma/CSC/gamma support is in. Signed-off-by: Laurentiu Palcu Reviewed-by: Lucas Stach Acked-by: Guido Günther Signed-off-by: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/20200731081836.3048-3-laurentiu.palcu@oss.nxp.com commit ce625f45670c90241e06d406cd1b0dbd19ed1044 Author: Laurentiu Palcu Date: Fri Jul 31 11:18:29 2020 +0300 drm/imx: compile imx directory by default Currently the drm/imx/ directory is compiled only if DRM_IMX is set. Adding a new IMX related IP in the same directory would need DRM_IMX to be set, which would bring in also IPUv3 core driver... The current patch would allow adding new IPs in the imx/ directory without needing to set DRM_IMX. Signed-off-by: Laurentiu Palcu Reviewed-by: Lucas Stach Reviewed-by: Guido Günther Signed-off-by: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/20200731081836.3048-2-laurentiu.palcu@oss.nxp.com commit 05680cc0e584de91b5bd6a705d2115227c5b53ae Merge: bc442e472ca61 07da90b0e5fc2 Author: Mark Brown Date: Wed Sep 9 15:20:17 2020 +0100 Merge branch 'topic/tasklet-convert' of https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-5.10 commit fac49a3bc4030524c155d9d59f3d7d14e771fe6f Author: Namhyung Kim Date: Wed Sep 9 14:58:48 2020 +0900 perf list: Do not print 'Metric Groups:' unnecessarily It was printed unconditionally even if nothing is printed. Check if the output list empty when filter is given. Before: $ ./perf list duration List of pre-defined events (to be used in -e): duration_time [Tool event] Metric Groups: After: $ ./perf list duration List of pre-defined events (to be used in -e): duration_time [Tool event] Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200909055849.469612-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9f86d641ba2052f78a90016f000e691357d17947 Author: Namhyung Kim Date: Wed Sep 9 14:58:47 2020 +0900 perf list: Remove dead code in argument check The sep is already checked being not NULL. The code seems to be a leftover from some refactoring. Signed-off-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200909055849.469612-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 20719c82f4f80d712a47bedc2e9aa2a7305076db Author: Arnaldo Carvalho de Melo Date: Fri Sep 4 17:32:01 2020 -0300 perf tools: Add build test with GTK+ So that when we use: make -C tools/perf build-test One of the entries will ask for building with GTK+ 2. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 6c014694b1d2702cdc736d17b60746e7b95ba664 Author: Arnaldo Carvalho de Melo Date: Fri Sep 4 17:20:02 2020 -0300 tools feature: Add missing -lzstd to the fast path feature detection We were failing that due to GTK2+ and then for the ZSTD test, which made test-all.c, the fast path feature detection file to fail and thus trigger building all of the feature tests, slowing down the test. Eventually the ZSTD test would be built and would succeed, since it had the needed -lzstd, avoiding: $ cat /tmp/build/perf/feature/test-all.make.output /usr/bin/ld: /tmp/ccRRJQ4u.o: in function `main_test_libzstd': /home/acme/git/perf/tools/build/feature/test-libzstd.c:8: undefined reference to `ZSTD_createCStream' /usr/bin/ld: /home/acme/git/perf/tools/build/feature/test-libzstd.c:9: undefined reference to `ZSTD_freeCStream' collect2: error: ld returned 1 exit status $ Fix it by adding -lzstd to the test-all target. Now I need an entry to 'perf test' to make sure that /tmp/build/perf/feature/test-all.make.output is empty... Fixes: 3b1c5d9659718263 ("tools build: Implement libzstd feature check, LIBZSTD_DIR and NO_LIBZSTD defines") Reviewed-by: Alexei Budankov Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200904202611.GJ3753976@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8cf333f8367af98b395ee4c32d26eba2f3487127 Author: Alex Ryabchenko Date: Fri Sep 4 13:00:02 2020 +0200 arm: dts: mt7623: add lima related regulator GPU needs additional regulator, add it to devicetree of bpi-r2 Signed-off-by: Alex Ryabchenko Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20200904110002.88966-5-linux@fw-web.de Signed-off-by: Matthias Brugger commit 2c78f4bd2b67225ca396f0b37249cad271301142 Author: Ryder Lee Date: Fri Sep 4 13:00:01 2020 +0200 arm: dts: mt7623: add display subsystem related device nodes Add display subsystem related device nodes for MT7623. Signed-off-by: chunhui dai Signed-off-by: Bibby Hsieh Signed-off-by: Ryder Lee Signed-off-by: Frank Wunderlich Tested-by: Frank Wunderlich Cc: Chun-Kuang Hu Link: https://lore.kernel.org/r/20200904110002.88966-4-linux@fw-web.de Signed-off-by: Matthias Brugger commit c0d66c560ea23615c6d049547154c1a0f7f633c2 Author: Frank Wunderlich Date: Fri Sep 4 13:00:00 2020 +0200 arm: dts: mt7623: move display nodes to separate mt7623n.dtsi mt7623a has no graphics support so move nodes from generic mt7623.dtsi to mt7623n.dtsi Fixes: 1f6ed2245946 ("arm: dts: mt7623: add Mali-450 device node") Suggested-by: David Woodhouse Signed-off-by: Frank Wunderlich Link: https://lore.kernel.org/r/20200904110002.88966-3-linux@fw-web.de Signed-off-by: Matthias Brugger commit ce6f92c2801e90650106b00666aa37560978e324 Author: Wolfram Sang Date: Wed Sep 2 10:18:12 2020 +0200 mmc: renesas_sdhi: support manual calibration Some R-Car Gen3 SoCs need some manual correction of timing parameters after the automatic tuning has finished but before next CMD13 is completed. This patch implements that by this state machine: - introducing a per-SoC correction table if needed - iff such a table exists, the 'fixup_request' callback is populated during probe - iff such a table exists, a runtime flag ('needs_adjust_hs400') is set when HS400 tuning was completed - the callback will check the runtime flag and enable the corrected manual mode if the flag is set and CMD13 is encountered - at the end of the enablement the runtime flag is cleared - iff the configuration flag is set, the manual mode will be disabled when HS400 gets downgraded There also some helper functions added to access the TMPPORT registers. The actual correction table is SoC and instance(!) specific and is added to the quirks struct. Signed-off-by: Takeshi Saito Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20200902081812.1591-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 354f47b699ae209606dcd0b05200cd7f17059e38 Author: Wolfram Sang Date: Wed Sep 2 10:18:11 2020 +0200 mmc: tmio: add generic hook to fixup after a completed request Sadly, due to HW bugs, we need a callback to work around issues just before completing the request. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20200902081812.1591-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 9d955478a89b4a1ff4e7442216f2822dee8fde73 Author: Dafna Hirschfeld Date: Thu Sep 3 16:28:19 2020 +0200 arm64: dts: mt8173-elm: fix supported values for regulator-allowed-modes of da9211 According to the datasheet the allowed modes for the da9211 regulator are sync and auto mode. This should be changed in the devicetree. This also fix an error message 'BUCKA: invalid regulator-allowed-modes element 0' since value 0 is invalid. Fixes: 689b937beddeb ("arm64: dts: mediatek: add mt8173 elm and hana board") Signed-off-by: Dafna Hirschfeld Tested-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20200903142819.24487-1-dafna.hirschfeld@collabora.com Signed-off-by: Matthias Brugger commit bbd9caa02c70e4719f82f205d38c916f53ae8408 Author: Bernard Zhao Date: Mon Sep 7 05:31:29 2020 -0700 gpu/drm: cleanup coding style a bit Remove first assignment to info which is meaningless. Put the width and higth check first. This change is to make the code a bit readable. Signed-off-by: Bernard Zhao Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200907123129.27905-1-bernard@vivo.com commit 094794f59720d7e877a1eeb372ecedeed6b441ab Author: Joerg Roedel Date: Mon Sep 7 15:16:10 2020 +0200 x86/sev-es: Support CPU offline/online Add a play_dead handler when running under SEV-ES. This is needed because the hypervisor can't deliver an SIPI request to restart the AP. Instead, the kernel has to issue a VMGEXIT to halt the VCPU until the hypervisor wakes it up again. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-70-joro@8bytes.org commit 3ecacdbd23956a549d93023f86adc87b4a9d6520 Author: Joerg Roedel Date: Mon Sep 7 15:16:09 2020 +0200 x86/head/64: Don't call verify_cpu() on starting APs The APs are not ready to handle exceptions when verify_cpu() is called in secondary_startup_64(). Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-69-joro@8bytes.org commit 520d030852b4c9babfce9a79d8b5320b6b5545e6 Author: Joerg Roedel Date: Mon Sep 7 15:16:08 2020 +0200 x86/smpboot: Load TSS and getcpu GDT entry before loading IDT The IDT on 64-bit contains vectors which use paranoid_entry() and/or IST stacks. To make these vectors work, the TSS and the getcpu GDT entry need to be set up before the IDT is loaded. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-68-joro@8bytes.org commit 8940ac9ced8bc1c48c4e28b0784e3234c9d14469 Author: Tom Lendacky Date: Mon Sep 7 15:16:07 2020 +0200 x86/realmode: Setup AP jump table As part of the GHCB specification, the booting of APs under SEV-ES requires an AP jump table when transitioning from one layer of code to another (e.g. when going from UEFI to the OS). As a result, each layer that parks an AP must provide the physical address of an AP jump table to the next layer via the hypervisor. Upon booting of the kernel, read the AP jump table address from the hypervisor. Under SEV-ES, APs are started using the INIT-SIPI-SIPI sequence. Before issuing the first SIPI request for an AP, the start CS and IP is programmed into the AP jump table. Upon issuing the SIPI request, the AP will awaken and jump to that start CS:IP address. Signed-off-by: Tom Lendacky [ jroedel@suse.de: - Adapted to different code base - Moved AP table setup from SIPI sending path to real-mode setup code - Fix sparse warnings ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-67-joro@8bytes.org commit bf5ff276448f64f1f9ef9ffc9e231026e3887d3d Author: Joerg Roedel Date: Mon Sep 7 15:16:06 2020 +0200 x86/realmode: Add SEV-ES specific trampoline entry point The code at the trampoline entry point is executed in real-mode. In real-mode, #VC exceptions can't be handled so anything that might cause such an exception must be avoided. In the standard trampoline entry code this is the WBINVD instruction and the call to verify_cpu(), which are both not needed anyway when running as an SEV-ES guest. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-66-joro@8bytes.org commit 1a222de8dcfb903d039810b0823570ee0be4e6c6 Author: Doug Covelli Date: Mon Sep 7 15:16:05 2020 +0200 x86/vmware: Add VMware-specific handling for VMMCALL under SEV-ES Add VMware-specific handling for #VC faults caused by VMMCALL instructions. Signed-off-by: Doug Covelli Signed-off-by: Tom Lendacky [ jroedel@suse.de: - Adapt to different paravirt interface ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-65-joro@8bytes.org commit 99419b251e5427b89dbfae103d8a2f469efaa4b2 Author: Tom Lendacky Date: Mon Sep 7 15:16:04 2020 +0200 x86/kvm: Add KVM-specific VMMCALL handling under SEV-ES Implement the callbacks to copy the processor state required by KVM to the GHCB. Signed-off-by: Tom Lendacky [ jroedel@suse.de: - Split out of a larger patch - Adapt to different callback functions ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-64-joro@8bytes.org commit f6a9f8a45810d2914ea422ff39bfe2e0251c50f2 Author: Joerg Roedel Date: Mon Sep 7 15:16:03 2020 +0200 x86/paravirt: Allow hypervisor-specific VMMCALL handling under SEV-ES Add two new paravirt callbacks to provide hypervisor-specific processor state in the GHCB and to copy state from the hypervisor back to the processor. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-63-joro@8bytes.org commit cb1ad3ecea959593400dfac4f027dbc005e62c39 Author: Joerg Roedel Date: Mon Sep 7 15:16:02 2020 +0200 x86/sev-es: Handle #DB Events Handle #VC exceptions caused by #DB exceptions in the guest. Those must be handled outside of instrumentation_begin()/end() so that the handler will not be raised recursively. Handle them by calling the kernel's debug exception handler. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-62-joro@8bytes.org commit a2d0171a9cf59637411281a929900fde80e6c1cb Author: Joerg Roedel Date: Mon Sep 7 15:16:01 2020 +0200 x86/sev-es: Handle #AC Events Implement a handler for #VC exceptions caused by #AC exceptions. The #AC exception is just forwarded to do_alignment_check() and not pushed down to the hypervisor, as requested by the SEV-ES GHCB Standardization Specification. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-61-joro@8bytes.org commit 2eb7dcf0ccc40ad3f39b000becf16661abf98102 Author: Tom Lendacky Date: Mon Sep 7 15:16:00 2020 +0200 x86/sev-es: Handle VMMCALL Events Implement a handler for #VC exceptions caused by VMMCALL instructions. This is only a starting point, VMMCALL emulation under SEV-ES needs further hypervisor-specific changes to provide additional state. [ bp: Drop "this patch". ] Signed-off-by: Tom Lendacky [ jroedel@suse.de: Adapt to #VC handling infrastructure ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-60-joro@8bytes.org commit ded476bbe203e59cb571d6c576f680efe4a0ddff Author: Tom Lendacky Date: Mon Sep 7 15:15:59 2020 +0200 x86/sev-es: Handle MWAIT/MWAITX Events Implement a handler for #VC exceptions caused by MWAIT and MWAITX instructions. Signed-off-by: Tom Lendacky [ jroedel@suse.de: Adapt to #VC handling infrastructure ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-59-joro@8bytes.org commit 0c2fd2ef64ef1a91d81c2f61309735ac438b68a4 Author: Tom Lendacky Date: Mon Sep 7 15:15:58 2020 +0200 x86/sev-es: Handle MONITOR/MONITORX Events Implement a handler for #VC exceptions caused by MONITOR and MONITORX instructions. Signed-off-by: Tom Lendacky [ jroedel@suse.de: Adapt to #VC handling infrastructure ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-58-joro@8bytes.org commit 8b4ce83707cb2cff5f6d175ea38f751ac4456096 Author: Tom Lendacky Date: Mon Sep 7 15:15:57 2020 +0200 x86/sev-es: Handle INVD Events Implement a handler for #VC exceptions caused by INVD instructions. Since Linux should never use INVD, just mark it as unsupported. Signed-off-by: Tom Lendacky [ jroedel@suse.de: Adapt to #VC handling infrastructure ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-57-joro@8bytes.org commit 5d55cf78a8785a7496919462f3d1a4689f62fb1d Author: Tom Lendacky Date: Mon Sep 7 15:15:56 2020 +0200 x86/sev-es: Handle RDPMC Events Implement a handler for #VC exceptions caused by RDPMC instructions. Signed-off-by: Tom Lendacky [ jroedel@suse.de: Adapt to #VC handling infrastructure ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-56-joro@8bytes.org commit 4711e7acaa125d8cc242f06e1f4d6c74e177454b Author: Tom Lendacky Date: Mon Sep 7 15:15:55 2020 +0200 x86/sev-es: Handle RDTSC(P) Events Implement a handler for #VC exceptions caused by RDTSC and RDTSCP instructions. Also make it available in the pre-decompression stage because the KASLR code uses RDTSC/RDTSCP to gather entropy and some hypervisors intercept these instructions. Signed-off-by: Tom Lendacky [ jroedel@suse.de: - Adapt to #VC handling infrastructure - Make it available early ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-55-joro@8bytes.org commit a14a92fc4b420ae6713800a8ae8c3686c1a1fa20 Author: Tom Lendacky Date: Mon Sep 7 15:15:54 2020 +0200 x86/sev-es: Handle WBINVD Events Implement a handler for #VC exceptions caused by WBINVD instructions. Signed-off-by: Tom Lendacky [ jroedel@suse.de: Adapt to #VC handling framework ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-54-joro@8bytes.org commit 479a7bf5c1f7f14eb37c6d6aeb401562efc1fcad Author: Tom Lendacky Date: Mon Sep 7 15:15:53 2020 +0200 x86/sev-es: Handle DR7 read/write events Add code to handle #VC exceptions on DR7 register reads and writes. This is needed early because show_regs() reads DR7 to print it out. Under SEV-ES, there is currently no support for saving/restoring the DRx registers but software expects to be able to write to the DR7 register. For now, cache the value written to DR7 and return it on read attempts, but do not touch the real hardware DR7. Signed-off-by: Tom Lendacky [ jroedel@suse.de: - Adapt to #VC handling framework - Support early usage ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-53-joro@8bytes.org commit a4afa6081c88701635e1e20090f953a25f9444e0 Author: Tom Lendacky Date: Mon Sep 7 15:15:52 2020 +0200 x86/sev-es: Handle MSR events Implement a handler for #VC exceptions caused by RDMSR/WRMSR instructions. Signed-off-by: Tom Lendacky [ jroedel@suse.de: Adapt to #VC handling infrastructure. ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-52-joro@8bytes.org commit 0118b604c2c94c6e34982015cfa7891af4764786 Author: Joerg Roedel Date: Mon Sep 7 15:15:51 2020 +0200 x86/sev-es: Handle MMIO String Instructions Add handling for emulation of the MOVS instruction on MMIO regions, as done by the memcpy_toio() and memcpy_fromio() functions. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-51-joro@8bytes.org commit 51ee7d6e3d2b70a3f232cceffab5084a2abd6719 Author: Tom Lendacky Date: Mon Sep 7 15:15:50 2020 +0200 x86/sev-es: Handle MMIO events Add a handler for #VC exceptions caused by MMIO intercepts. These intercepts come along as nested page faults on pages with reserved bits set. Signed-off-by: Tom Lendacky [ jroedel@suse.de: Adapt to VC handling framework ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-50-joro@8bytes.org commit 5e3427a7bc432ed2e5de394ac30f160cc6c37a1f Author: Joerg Roedel Date: Mon Sep 7 15:15:49 2020 +0200 x86/sev-es: Handle instruction fetches from user-space When a #VC exception is triggered by user-space, the instruction decoder needs to read the instruction bytes from user addresses. Enhance vc_decode_insn() to safely fetch kernel and user instructions. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-49-joro@8bytes.org commit d3529bb73f76d0ec8aafaca505226fa0971c1dc9 Author: Joerg Roedel Date: Mon Sep 7 15:15:48 2020 +0200 x86/sev-es: Wire up existing #VC exit-code handlers Re-use the handlers for CPUID- and IOIO-caused #VC exceptions in the early boot handler. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-48-joro@8bytes.org commit 0786138c78e79343c7b015d77507cbf9d5f15d00 Author: Tom Lendacky Date: Mon Sep 7 15:15:47 2020 +0200 x86/sev-es: Add a Runtime #VC Exception Handler Add the handlers for #VC exceptions invoked at runtime. Signed-off-by: Tom Lendacky Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-47-joro@8bytes.org commit a13644f3a53de4e95a7bce6459f834e832ea44c5 Author: Joerg Roedel Date: Mon Sep 7 15:15:46 2020 +0200 x86/entry/64: Add entry code for #VC handler The #VC handler needs special entry code because: 1. It runs on an IST stack 2. It needs to be able to handle nested #VC exceptions To make this work, the entry code is implemented to pretend it doesn't use an IST stack. When entered from user-mode or early SYSCALL entry path it switches to the task stack. If entered from kernel-mode it tries to switch back to the previous stack in the IRET frame. The stack found in the IRET frame is validated first, and if it is not safe to use it for the #VC handler, the code will switch to a fall-back stack (the #VC2 IST stack). From there, it can cause nested exceptions again. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-46-joro@8bytes.org commit 6b27edd74a5e9669120f7bd0ae1f475d124c1042 Author: Joerg Roedel Date: Mon Sep 7 15:15:45 2020 +0200 x86/dumpstack/64: Add noinstr version of get_stack_info() The get_stack_info() functionality is needed in the entry code for the #VC exception handler. Provide a version of it in the .text.noinstr section which can be called safely from there. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-45-joro@8bytes.org commit 315562c9af3d583502b35c4b223a08d95ce69864 Author: Joerg Roedel Date: Mon Sep 7 15:15:44 2020 +0200 x86/sev-es: Adjust #VC IST Stack on entering NMI handler When an NMI hits in the #VC handler entry code before it has switched to another stack, any subsequent #VC exception in the NMI code-path will overwrite the interrupted #VC handler's stack. Make sure this doesn't happen by explicitly adjusting the #VC IST entry in the NMI handler for the time it can cause #VC exceptions. [ bp: Touchups, spelling fixes. ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-44-joro@8bytes.org commit 02772fb9b68e6a72a5e17f994048df832fe2b15e Author: Joerg Roedel Date: Mon Sep 7 15:15:43 2020 +0200 x86/sev-es: Allocate and map an IST stack for #VC handler Allocate and map an IST stack and an additional fall-back stack for the #VC handler. The memory for the stacks is allocated only when SEV-ES is active. The #VC handler needs to use an IST stack because a #VC exception can be raised from kernel space with unsafe stack, e.g. in the SYSCALL entry path. Since the #VC exception can be nested, the #VC handler switches back to the interrupted stack when entered from kernel space. If switching back is not possible, the fall-back stack is used. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-43-joro@8bytes.org commit 885689e47dfa1499b756a07237eb645234d93cf9 Author: Tom Lendacky Date: Mon Sep 7 15:15:42 2020 +0200 x86/sev-es: Setup per-CPU GHCBs for the runtime handler The runtime handler needs one GHCB per-CPU. Set them up and map them unencrypted. [ bp: Touchups and simplification. ] Signed-off-by: Tom Lendacky Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-42-joro@8bytes.org commit d284c16f84c9f8facdde25c9c077cfdcb66163d5 Author: dillon min Date: Thu Sep 3 15:30:22 2020 +0800 gpio: tc35894: Disable Direct KBD interrupts to enable gpio irq On tc35894, have to disable direct keypad interrupts to make it as general purpose interrupts functionality work. if not, after chip reset, IRQST(0x91) will always 0x20, IRQN always low level, can't be clear. Configure DIRECTx to enable general purpose gpio mode, else read GPIOMISx register always zero in irq routine. verified on tc35894, need more test on other tc3589x. Signed-off-by: dillon min Acked-by: Lee Jones Signed-off-by: Bartosz Golaszewski commit 1aa9aa8ee517e0443b06e816a4fd2d15f2113615 Author: Joerg Roedel Date: Tue Sep 8 14:38:16 2020 +0200 x86/sev-es: Setup GHCB-based boot #VC handler Add the infrastructure to handle #VC exceptions when the kernel runs on virtual addresses and has mapped a GHCB. This handler will be used until the runtime #VC handler takes over. Since the handler runs very early, disable instrumentation for sev-es.c. [ bp: Make vc_ghcb_invalidate() __always_inline so that it can be inlined in noinstr functions like __sev_es_nmi_complete(). ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200908123816.GB3764@8bytes.org commit 03eb2ca44a95105d1482d5e7471016cf8b383f97 Author: Krzysztof Kozlowski Date: Wed Aug 26 16:50:13 2020 +0200 leds: tlc591xx: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Pavel Machek commit 4582e783a2f481a813aa61178d77b2a5cb8f1d9e Author: Krzysztof Kozlowski Date: Wed Aug 26 16:50:12 2020 +0200 leds: sgm3140: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Pavel Machek commit 7e8da60596b26c40483375f75297f45bd81d4096 Author: Krzysztof Kozlowski Date: Wed Aug 26 16:50:11 2020 +0200 leds: pwm: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Pavel Machek commit 47eaa8ba12cc77895e2591ec57091bed7b3d9817 Author: Krzysztof Kozlowski Date: Wed Aug 26 16:50:10 2020 +0200 leds: lm3692x: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Pavel Machek commit 23bdfe00424c297051cea73cbdb7ef7398f3cb6e Author: Grant Feng Date: Tue Aug 25 16:22:06 2020 +0800 DT: leds: Add an optional property named 'shutdown-gpios' The chip enters hardware shutdown when the SDB pin is pulled low. The chip releases hardware shutdown when the SDB pin is pulled high. Signed-off-by: Grant Feng Acked-by: Rob Herring Signed-off-by: Pavel Machek commit dddb4e38c6ba3f7ff5202d556982a0c82fa9a240 Author: Grant Feng Date: Tue Aug 25 16:22:05 2020 +0800 leds: is31fl319x: Add shutdown pin and generate a 5ms low pulse when startup generate a 5ms low pulse on shutdown pin when startup, then the chip becomes more stable in the complex EM environment. Signed-off-by: Grant Feng Signed-off-by: Pavel Machek commit 3d93edc77515c6f51fa9bbbe2185e2ec32bad024 Author: Dan Murphy Date: Wed Aug 12 14:32:48 2020 -0500 dt: bindings: lp55xx: Updte yaml examples with new color ID Update the binding examples for the color ID to LED_COLOR_ID_RGB Signed-off-by: Dan Murphy Acked-by: Rob Herring Signed-off-by: Pavel Machek commit 6ed6c558234f0b6c22e47a3c2feddce3d02324dd Author: Sudeep Holla Date: Tue Sep 8 12:26:11 2020 +0100 firmware: arm_scmi: Fix NULL pointer dereference in mailbox_chan_free scmi_mailbox is obtained from cinfo->transport_info and the first call to mailbox_chan_free frees the channel and sets cinfo->transport_info to NULL. Care is taken to check for non NULL smbox->chan but smbox can itself be NULL. Fix it by checking for it without which, kernel crashes with below NULL pointer dereference and eventually kernel panic. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000038 Modules linked in: scmi_module(-) Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Sep 2 2020 pstate: 80000005 (Nzcv daif -PAN -UAO BTYPE=--) pc : mailbox_chan_free+0x2c/0x70 [scmi_module] lr : idr_for_each+0x6c/0xf8 Call trace: mailbox_chan_free+0x2c/0x70 [scmi_module] idr_for_each+0x6c/0xf8 scmi_remove+0xa8/0xf0 [scmi_module] platform_drv_remove+0x34/0x58 device_release_driver_internal+0x118/0x1f0 driver_detach+0x58/0xe8 bus_remove_driver+0x64/0xe0 driver_unregister+0x38/0x68 platform_driver_unregister+0x1c/0x28 scmi_driver_exit+0x38/0x44 [scmi_module] ---[ end trace 17bde19f50436de9 ]--- Kernel panic - not syncing: Fatal exception SMP: stopping secondary CPUs Kernel Offset: 0x1d0000 from 0xffff800010000000 PHYS_OFFSET: 0x80000000 CPU features: 0x0240022,25806004 Memory Limit: none ---[ end Kernel panic - not syncing: Fatal exception ]--- Link: https://lore.kernel.org/r/20200908112611.31515-1-sudeep.holla@arm.com Fixes: 5c8a47a5a91d ("firmware: arm_scmi: Make scmi core independent of the transport type") Cc: Cristian Marussi Cc: Viresh Kumar Tested-by: Cristian Marussi Reviewed-by: Cristian Marussi Reviewed-by: Viresh Kumar Signed-off-by: Sudeep Holla commit 74d8d9d531b4cc945a9f75aa2fc21d99ca5a9fe3 Author: Joerg Roedel Date: Tue Sep 8 14:35:17 2020 +0200 x86/sev-es: Setup an early #VC handler Setup an early handler for #VC exceptions. There is no GHCB mapped yet, so just re-use the vc_no_ghcb_handler(). It can only handle CPUID exit-codes, but that should be enough to get the kernel through verify_cpu() and __startup_64() until it runs on virtual addresses. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov [ boot failure Error: kernel_ident_mapping_init() failed. ] Reported-by: kernel test robot Link: https://lkml.kernel.org/r/20200908123517.GA3764@8bytes.org commit f980f9c31a923e9040dee0bc679a5f5b09e61f40 Author: Joerg Roedel Date: Mon Sep 7 15:15:39 2020 +0200 x86/sev-es: Compile early handler code into kernel image Setup sev-es.c and include the code from the pre-decompression stage to also build it into the image of the running kernel. Temporarily add __maybe_unused annotations to avoid build warnings until the functions get used. [ bp: Use the non-tracing rd/wrmsr variants because: vmlinux.o: warning: objtool: __sev_es_nmi_complete()+0x11f: \ call to do_trace_write_msr() leaves .noinstr.text section as __sev_es_nmi_complete() is noinstr due to being called from the NMI handler exc_nmi(). ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-39-joro@8bytes.org commit 2a71593da34d473461f2f5c3dbb53b883596188a Author: Alain Volmat Date: Mon Aug 3 07:17:55 2020 +0200 i2c: smbus: add core function handling SMBus host-notify SMBus Host-Notify protocol, from the adapter point of view consist of receiving a message from a client, including the client address and some other data. It can be simply handled by creating a new slave device and registering a callback performing the parsing of the message received from the client. This commit introduces two new core functions * i2c_new_slave_host_notify_device * i2c_free_slave_host_notify_device that take care of registration of the new slave device and callback and will call i2c_handle_smbus_host_notify once a Host-Notify event is received. Signed-off-by: Alain Volmat Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit e6277308ac214af04516564c516a0ff5f753d009 Author: Wolfram Sang Date: Wed Jul 1 23:48:30 2020 +0200 i2c: add binding to mark a bus as SMBus SMBus is largely compatible with I2C but there are some specifics. In case we need them on a bus, we can now use this new binding. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 60a9f851f6bb9ea180b09e14cd461a14448f0b56 Author: Anson Huang Date: Wed Aug 12 11:45:54 2020 +0800 i2c: imx: Use dev_err_probe() to simplify error handling dev_err_probe() can reduce code size, uniform error handling and record the defer probe reason etc., use it to simplify the code. Signed-off-by: Anson Huang Acked-by: Oleksij Rempel Signed-off-by: Wolfram Sang commit 62df579a86741436efae3d1bae29d0281078a7d3 Author: Jeffrey Lin Date: Wed Sep 2 00:51:37 2020 -0400 i2c: i801: Register lis3lv02d I2C device on Dell Latitude 5480 Value of /sys/devices/platform/lis3lv02d/position when Horizontal: (36,-108,-1152) Left elevated: (-432,-126,-1062) Front elevated: (36,594,-936) Upside down: (-126,-252,1098) Signed-off-by: Jeffrey Lin Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 848785df48835eefebe0c4eb5da7690690b0a8b7 Author: Valentin Schneider Date: Tue Sep 8 19:49:56 2020 +0100 sched/topology: Move sd_flag_debug out of #ifdef CONFIG_SYSCTL The last sd_flag_debug shuffle inadvertently moved its definition within an #ifdef CONFIG_SYSCTL region. While CONFIG_SYSCTL is indeed required to produce the sched domain ctl interface (which uses sd_flag_debug to output flag names), it isn't required to run any assertion on the sched_domain hierarchy itself. Move the definition of sd_flag_debug to a CONFIG_SCHED_DEBUG region of topology.c. Now at long last we have: - sd_flag_debug declared in include/linux/sched/topology.h iff CONFIG_SCHED_DEBUG=y - sd_flag_debug defined in kernel/sched/topology.c, conditioned by: - CONFIG_SCHED_DEBUG, with an explicit #ifdef block - CONFIG_SMP, as a requirement to compile topology.c With this change, all symbols pertaining to SD flag metadata (with the exception of __SD_FLAG_CNT) are now defined exclusively within topology.c Fixes: 8fca9494d4b4 ("sched/topology: Move sd_flag_debug out of linux/sched/topology.h") Reported-by: Randy Dunlap Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200908184956.23369-1-valentin.schneider@arm.com commit 09309093d5e8f8774e4a3a0d42b73cf47e9421cf Author: Jonathan Marek Date: Tue Sep 8 10:08:17 2020 -0400 soundwire: qcom: fix SLIBMUS/SLIMBUS typo Fix slimbus case being broken thanks to a typo. Fixes: 5bd773242f75 ("soundwire: qcom: avoid dependency on CONFIG_SLIMBUS") Signed-off-by: Jonathan Marek Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200908140818.28373-1-jonathan@marek.ca Signed-off-by: Vinod Koul commit d2068da5c85697b5880483dd7beaba98e0b62e02 Author: Pierre-Louis Bossart Date: Tue Aug 18 06:23:40 2020 +0800 soundwire: cadence: fix race condition between suspend and Slave device alerts In system suspend stress cases, the SOF CI reports timeouts. The root cause is that an alert is generated while the system suspends. The interrupt handling generates transactions on the bus that will never be handled because the interrupts are disabled in parallel. As a result, the transaction never completes and times out on resume. This error doesn't seem too problematic since it happens in a work queue, and the system recovers without issues. Nevertheless, this race condition should not happen. When doing a system suspend, or when disabling interrupts, we should make sure the current transaction can complete, and prevent new work from being queued. BugLink: https://github.com/thesofproject/linux/issues/2344 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Signed-off-by: Bard Liao Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20200817222340.18042-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit f601e8f37c2c1c52f2923fffc48204a7f7dc023d Author: Greg Kroah-Hartman Date: Wed Sep 9 09:37:40 2020 +0200 Revert "driver core: Annotate dev_err_probe() with __must_check" This reverts commit e1f82a0dcf388d98bcc7ad195c03bd812405e6b2 as it's already starting to cause build warnings in linux-next for things that are "obviously correct". It's up to driver authors do "do the right thing" here with this function, and if they don't want to call it as the last line of a function, that's up to them, otherwise code that looks like: ret = dev_err_probe(..., ret, ...); does look really "odd". Reported-by: Stephen Rothwell Reported-by: Krzysztof Kozlowski Fixes: e1f82a0dcf38 ("driver core: Annotate dev_err_probe() with __must_check") Cc: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman commit 0dc0b5c29be240e4d0b6e1cb31be39116cd237b2 Author: Christophe JAILLET Date: Mon Sep 7 21:38:28 2020 +0200 rtlwifi: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. The only file where some GFP_ flags are updated is 'pci.c'. When memory is allocated in '_rtl_pci_init_tx_ring()' and '_rtl_pci_init_rx_ring()' GFP_KERNEL can be used because both functions are called from a probe function and no spinlock is taken. The call chain is: rtl_pci_probe --> rtl_pci_init --> _rtl_pci_init_trx_ring --> _rtl_pci_init_rx_ring --> _rtl_pci_init_tx_ring @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200907193828.318233-1-christophe.jaillet@wanadoo.fr commit f4443293d741d1776b86ed1dd8c4e4285d0775fc Author: Keita Suzuki Date: Tue Sep 8 12:17:41 2020 +0000 brcmsmac: fix memory leak in wlc_phy_attach_lcnphy When wlc_phy_txpwr_srom_read_lcnphy fails in wlc_phy_attach_lcnphy, the allocated pi->u.pi_lcnphy is leaked, since struct brcms_phy will be freed in the caller function. Fix this by calling wlc_phy_detach_lcnphy in the error handler of wlc_phy_txpwr_srom_read_lcnphy before returning. Signed-off-by: Keita Suzuki Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200908121743.23108-1-keitasuzuki.park@sslab.ics.keio.ac.jp commit eb2c6ca2db8c9cf112f0b604c1edfe21b5725f17 Author: Tom Rix Date: Sun Sep 6 13:05:48 2020 -0700 mwifiex: remove function pointer check clang static analyzer reports this problem init.c:739:8: warning: Called function pointer is null (null dereference) ret = adapter->if_ops.check_fw_status( ... ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In mwifiex_dnld_fw, there is an earlier check for check_fw_status(), The check was introduced for usb support at the same time this check in _mwifiex_fw_dpc() was made if (adapter->if_ops.dnld_fw) { ret = adapter->if_ops.dnld_fw(adapter, &fw); } else { ret = mwifiex_dnld_fw(adapter, &fw); } And a dnld_fw function initialized as part the usb's mwifiex_if_ops. The other instances of mwifiex_if_ops for pci and sdio both set check_fw_status. So the first check is not needed and can be removed. Fixes: 4daffe354366 ("mwifiex: add support for Marvell USB8797 chipset") Signed-off-by: Tom Rix Reviewed-by: Nathan Chancellor Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200906200548.18053-1-trix@redhat.com commit 86279456a4d47782398d3cb8193f78f672e36cac Author: Chris Chiu Date: Sun Sep 6 12:04:24 2020 +0800 rtl8xxxu: prevent potential memory leak Free the skb if usb_submit_urb fails on rx_urb. And free the urb no matter usb_submit_urb succeeds or not in rtl8xxxu_submit_int_urb. Signed-off-by: Chris Chiu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200906040424.22022-1-chiu@endlessm.com commit 587231ee81d63f31560220d3d01162037c0eb7f1 Author: Dan Carpenter Date: Sat Sep 5 15:47:58 2020 +0300 rtlwifi: rtl8723ae: Delete a stray tab This line is indented too far. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200905124758.GB183976@mwanda commit 7c69898b86b45842e1c2799df845e203c71a667e Author: Greg Kroah-Hartman Date: Wed Sep 9 09:25:33 2020 +0200 Revert "test_firmware: Test platform fw loading on non-EFI systems" This reverts commit 18efb2f9e897ac65e7a1b2892f4a53e404534eba as it is reported to break the build: https://lore.kernel.org/r/20200909154709.619fe9bb@canb.auug.org.au Reported-by: Stephen Rothwell Fixes: 18efb2f9e897 ("test_firmware: Test platform fw loading on non-EFI systems") Cc: stable@vger.kernel.org Cc: Luis Chamberlain Cc: Scott Branden Cc: Kees Cook Link: https://lore.kernel.org/r/20200909154709.619fe9bb@canb.auug.org.au Signed-off-by: Greg Kroah-Hartman commit c82bf6e133d30e0f9172a20807814fa28aef0f67 Author: Joel Stanley Date: Wed Aug 12 20:54:00 2020 +0930 ARM: aspeed: g5: Do not set sirq polarity A feature was added to the aspeed vuart driver to configure the vuart interrupt (sirq) polarity according to the LPC/eSPI strapping register. Systems that depend on a active low behaviour (sirq_polarity set to 0) such as OpenPower boxes also use LPC, so this relationship does not hold. Jeremy confirms that the s2600st which is strapped for eSPI also does not have this relationship. The property was added for a Tyan S7106 system which is not supported in the kernel tree. Should this or other systems wish to use this feature of the driver they should add it to the machine specific device tree. Fixes: c791fc76bc72 ("arm: dts: aspeed: Add vuart aspeed,sirq-polarity-sense...") Signed-off-by: Joel Stanley Tested-by: Jeremy Kerr Reviewed-by: Jeremy Kerr Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200812112400.2406734-1-joel@jms.id.au Signed-off-by: Joel Stanley commit 8014c4781b4661370ec8bbd345c3a32565a80bba Author: Ye Bin Date: Thu Sep 3 10:15:42 2020 +0800 memory: tegra: Delete duplicated argument to '|' in function tegra210_emc_r21021_periodic_compensation In function tegra210_emc_r21021_periodic_compensation when calculate emc_cfg EMC_CFG_DRAM_CLKSTOP_PD is duplicated. Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20200903021542.315195-1-yebin10@huawei.com Signed-off-by: Krzysztof Kozlowski commit d270bb09f4b1f8ccce8a9492faac1f7f74752e05 Author: Eddie James Date: Tue Sep 8 15:01:01 2020 -0500 ARM: dts: aspeed: rainier: Add IBM Operation Panel I2C device Set I2C bus 7 to multi-master mode and add the panel device that will register as a slave. Signed-off-by: Eddie James Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20200908200101.64974-6-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 7505340245ff6dfcb184ab7ef64270cc8d4f69a8 Author: Eddie James Date: Tue Sep 8 15:01:00 2020 -0500 ARM: dts: aspeed: tacoma: Add IBM Operation Panel I2C device Set I2C bus 0 to multi-master mode and add the panel device that will register as a slave. Signed-off-by: Eddie James Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20200908200101.64974-5-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit deb2464e4c6dca2c933a53e2cb8c78a75ad5131c Author: Gurchetan Singh Date: Wed Sep 2 14:08:27 2020 -0700 drm/virtio: report uuid in debugfs In keeping with other features, report this in the debugfs. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20200902210847.2689-4-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 1fb97413a3f754f28e24a136a49107e81e12f3fd Author: Gurchetan Singh Date: Wed Sep 2 14:08:26 2020 -0700 drm/virtio: fix uninitialized variable smatch reported this with the blob series: drivers/gpu/drm/virtio/virtgpu_kms.c:227 virtio_gpu_init() error: uninitialized symbol 'ret'. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20200902210847.2689-3-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit e219688fc5c3d0d9136f8d29d7e0498388f01440 Author: Doug Horn Date: Wed Sep 2 14:08:25 2020 -0700 Fix use after free in get_capset_info callback. If a response to virtio_gpu_cmd_get_capset_info takes longer than five seconds to return, the callback will access freed kernel memory in vg->capsets. Signed-off-by: Doug Horn Link: http://patchwork.freedesktop.org/patch/msgid/20200902210847.2689-2-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit af6d39db1b046a01e3406ed4976e5495e7ca7a10 Author: Tamizh Chelvam Date: Tue Sep 8 09:22:04 2020 +0300 ath11k: Add peer max mpdu parameter in peer assoc command Add peer max mpdu length configuration support in peer_assoc_he parameters. Noticed low throughput for the STA which supports HE, HT and not VHT in MU-MIMO case without this configuration Signed-off-by: Tamizh Chelvam Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1588611900-21185-2-git-send-email-tamizhr@codeaurora.org commit c7187acc3cd08a17e7b506b2b5277f42d1504d29 Author: Dan Carpenter Date: Tue Sep 8 09:22:03 2020 +0300 ath11k: fix uninitialized return in ath11k_spectral_process_data() There is a success path where "ret" isn't initialized where we never have a ATH11K_SPECTRAL_TAG_SCAN_SEARCH and then ret isn't initialized. Fixes: 9d11b7bff950 ("ath11k: add support for spectral scan") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200619142922.GA267142@mwanda commit c27e08820bc6cb7d483a8d87589bdbbbf10f2306 Author: Laurent Gauthier Date: Wed Sep 9 00:11:49 2020 +0200 HID: hid-debug: fix nonblocking read semantics wrt EIO/ERESTARTSYS When the file has been open in non-blocking mode, EIO or ERESTARTSYS would never be returned even if they should (for example when device has been unplugged, you want EIO and not EAGAIN to be returned). Move the O_NONBLOCK check after other checks have been performed. Based on similar to patches hidraw and hiddev by Founder Fang and Jiri Kosina . Signed-off-by: Laurent Gauthier Signed-off-by: Jiri Kosina commit eafb2203626aedb599cc80aadcba533c917b53b0 Author: Douglas Anderson Date: Wed Sep 2 21:43:02 2020 -0700 HID: i2c-hid: Prefer asynchronous probe Adding printouts to the i2c_hid_probe() function shows that it takes quite some time. It used to take about 70 ms, but after commit eef4016243e9 ("HID: i2c-hid: Always sleep 60ms after I2C_HID_PWR_ON commands") it takes about 190 ms. This is not tons of time but it's not trivial. Because we haven't yet specified that we'd prefer asynchronous probe for this driver then, if the driver is builtin to the kernel, we'll wait for this driver to finish before we start probes for more drivers. Let's set the flag to enable asynchronous for this driver so that other drivers aren't blocked from probing until we finish. Since this driver can be configured as a module and modules are always asynchronously probed this is quite a safe change and will benefit anyone who has a reason to build this driver into the kernel instead of using it as a module. [jkosina@suse.cz: drop spurious whitespace addition] Signed-off-by: Douglas Anderson Signed-off-by: Jiri Kosina commit 5bf2f2f331ad812c9b7eea6e14a3ea328acbffc0 Author: Hans de Goede Date: Tue Sep 1 09:56:42 2020 +0200 HID: ite: Add USB id match for Acer One S1003 keyboard dock The Acer One S1003 2-in-1 keyboard dock uses a Synaptics S910xx touchpad which is connected to an ITE 8910 USB keyboard controller chip. This keyboard has the same quirk for its rfkill / airplane mode hotkey as other keyboards with ITE keyboard chips, it only sends a single release event when pressed and released, it never sends a press event. This commit adds this keyboards USB id to the hid-ite id-table, fixing the rfkill key not working on this keyboard. Note that like for the Acer Aspire Switch 10 (SW5-012) the id-table entry matches on the HID_GROUP_GENERIC generic group so that hid-ite only binds to the keyboard interface and the mouse/touchpad interface is left untouched so that hid-multitouch can bind to it. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit d4f98dbfe717490e771b6e701904bfcf4b4557f0 Author: Dan Carpenter Date: Mon Aug 24 11:57:35 2020 +0300 HID: roccat: add bounds checking in kone_sysfs_write_settings() This code doesn't check if "settings->startup_profile" is within bounds and that could result in an out of bounds array access. What the code does do is it checks if the settings can be written to the firmware, so it's possible that the firmware has a bounds check? It's safer and easier to verify when the bounds checking is done in the kernel. Fixes: 14bf62cde794 ("HID: add driver for Roccat Kone gaming mouse") Signed-off-by: Dan Carpenter Signed-off-by: Jiri Kosina commit 707d561f77b5e2a6f90c9786bee44ee7a8dedc7e Author: Gerd Hoffmann Date: Mon Sep 7 13:24:25 2020 +0200 drm: allow limiting the scatter list size. Add drm_device argument to drm_prime_pages_to_sg(), so we can call dma_max_mapping_size() to figure the segment size limit and call into __sg_alloc_table_from_pages() with the correct limit. This fixes virtio-gpu with sev. Possibly it'll fix other bugs too given that drm seems to totaly ignore segment size limits so far ... v2: place max_segment in drm driver not gem object. v3: move max_segment next to the other gem fields. v4: just use dma_max_mapping_size(). Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20200907112425.15610-2-kraxel@redhat.com commit ac99a822c67b960c17e165a01c00c6813e496f1c Author: Randy Dunlap Date: Tue Sep 8 17:14:44 2020 -0700 net: ethernet/neterion/vxge: fix spelling of "functionality" Fix typo/spello of "functionality". Signed-off-by: Randy Dunlap Cc: Jon Mason Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: Jiri Kosina Signed-off-by: David S. Miller commit f5499c67477eb640e794428da0502c5e4c723119 Author: Randy Dunlap Date: Tue Sep 8 17:13:25 2020 -0700 nfc: pn533/usb.c: fix spelling of "functions" Fix typo/spello of "functions". Signed-off-by: Randy Dunlap Cc: linux-nfc@lists.01.org Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: Jiri Kosina Signed-off-by: David S. Miller commit e92dd77e6fe0a33d356cab4f362dbfbb3b873c96 Author: Wei Wang Date: Tue Sep 8 14:29:02 2020 -0700 ipv6: add tos reflection in TCP reset and ack Currently, ipv6 stack does not do any TOS reflection. To make the behavior consistent with v4 stack, this commit adds TOS reflection in tcp_v6_reqsk_send_ack() and tcp_v6_send_reset(). We clear the lower 2-bit ECN value of the received TOS in compliance with RFC 3168 6.1.5 robustness principles. Signed-off-by: Wei Wang Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 56bbc22d833bf2fa88e7ccd714b4120dff77ae26 Merge: cdd84a93dad8e 288827d53e8ed Author: David S. Miller Date: Tue Sep 8 20:18:17 2020 -0700 Merge tag 'rxrpc-next-20200908' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Allow more calls to same peer Here are some development patches for AF_RXRPC that allow more simultaneous calls to be made to the same peer with the same security parameters. The current code allows a maximum of 4 simultaneous calls, which limits the afs filesystem to that many simultaneous threads. This increases the limit to 16. To make this work, the way client connections are limited has to be changed (incoming call/connection limits are unaffected) as the current code depends on queuing calls on a connection and then pushing the connection through a queue. The limit is on the number of available connections. This is changed such that there's a limit[*] on the total number of calls systemwide across all namespaces, but the limit on the number of client connections is removed. Once a call is allowed to proceed, it finds a bundle of connections and tries to grab a call slot. If there's a spare call slot, fine, otherwise it will wait. If there's already a waiter, it will try to create another connection in the bundle, unless the limit of 4 is reached (4 calls per connection, giving 16). A number of things throttle someone trying to set up endless connections: - Calls that fail immediately have their conns deleted immediately, - Calls that don't fail immediately have to wait for a timeout, - Connections normally get automatically reaped if they haven't been used for 2m, but this is sped up to 2s if the number of connections rises over 900. This number is tunable by sysctl. [*] Technically two limits - kernel sockets and userspace rxrpc sockets are accounted separately. ==================== Signed-off-by: David S. Miller commit cdd84a93dad8edfbb9a5ce36117cb37c2614b18f Author: Christophe JAILLET Date: Tue Sep 8 22:27:47 2020 +0200 net: tc35815: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'tc35815_init_queues()' GFP_ATOMIC must be used because it can be called from 'tc35815_restart()' where some spinlock are taken. The call chain is: tc35815_restart --> tc35815_clear_queues --> tc35815_init_queues @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit f33a7251c825b718ffd79b3b7b74e55e0c5b790a Author: Christophe JAILLET Date: Tue Sep 8 22:08:39 2020 +0200 hippi: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'rr_init_one()' GFP_KERNEL can be used because it is a probe function and no spinlock is taken in the between. When memory is allocated in 'rr_open()' GFP_KERNEL can be used because it is a '.ndo_open' function (see struct net_device_ops) and no spinlock is taken in the between. '.ndo_open' functions are synchronized using the rtnl_lock() semaphore. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 161c4e88b720c0ef2e3bc2cd524fc9ea3615ec22 Author: Edward Cree Date: Tue Sep 8 20:22:19 2020 +0100 sfc: coding style cleanups in mcdi_port_common.c The code recently moved into this file contained a number of coding style issues, about which checkpatch and xmastree complained. Fix them. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 988100a7de0f07c27063d1376ebc4eab983e228b Author: Saurav Kashyap Date: Mon Sep 7 05:14:42 2020 -0700 scsi: qedf: Retry qed->probe during recovery During recovery due to FCoE fn ramrod failure we wait for 2 sec and then call qed->probe. If probe fails then retry max 10 times. Link: https://lore.kernel.org/r/20200907121443.5150-8-jhasan@marvell.com Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 55e049910e08caff21c8535c6d6672dc4665f36d Author: Saurav Kashyap Date: Mon Sep 7 05:14:41 2020 -0700 scsi: qedf: Add schedule_hw_err_handler callback for fan failure On fan failure, disable the PCI function and initiate recovery for ramrod failure. Link: https://lore.kernel.org/r/20200907121443.5150-7-jhasan@marvell.com Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 10aff62fab263ad7661780816551420cea956ebb Author: Saurav Kashyap Date: Mon Sep 7 05:14:40 2020 -0700 scsi: qedf: Return SUCCESS if stale rport is encountered If SUCCESS is not returned, error handling will escalate. Return SUCCESS similar to other conditions in this function. Link: https://lore.kernel.org/r/20200907121443.5150-6-jhasan@marvell.com Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 41715c6292b6273beffc699300ffc931749233c8 Author: Javed Hasan Date: Mon Sep 7 05:14:39 2020 -0700 scsi: qedf: FDMI attributes correction Correction in the FDMI attributes required for RHBA and RPA registration. Link: https://lore.kernel.org/r/20200907121443.5150-5-jhasan@marvell.com Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit f78f8126264bdb688f4408b88e3ca35f60865ae4 Author: Javed Hasan Date: Mon Sep 7 05:14:38 2020 -0700 scsi: qedf: Fix for the session’s E_D_TOV value Firmware expects E_D_TOV field in connection offload parameters as “msec”. Earlier incorrect value (100ms), was leading to abort from driver in the case when data frames for read take more than 100ms from target side, resulting in firmware reporting E_D_TOV expiration. Link: https://lore.kernel.org/r/20200907121443.5150-4-jhasan@marvell.com Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 31fc82d7fbd8ed73c63baec608797f8219e72c3e Author: Saurav Kashyap Date: Mon Sep 7 05:14:37 2020 -0700 scsi: qedf: Correct the comment in qedf_initiate_els Correct the misleading comment in qedf_initiate_els(). Link: https://lore.kernel.org/r/20200907121443.5150-3-jhasan@marvell.com Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 066664645d9aa33cde7a075d9ddd83033900d6f1 Author: Javed Hasan Date: Mon Sep 7 05:14:36 2020 -0700 scsi: qedf: Change the debug parameter permission to read & write Change the debug parameter permission to read & write. Gives flexibility to change the debug verbosity dynamically. Link: https://lore.kernel.org/r/20200907121443.5150-2-jhasan@marvell.com Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 071445c6051f71e98d0fa9bbbb0ae575c677cb20 Author: Nikolay Aleksandrov Date: Tue Sep 8 10:17:13 2020 +0300 net: bridge: mcast: fix unused br var when lockdep isn't defined Stephen reported the following warning: net/bridge/br_multicast.c: In function 'br_multicast_find_port': net/bridge/br_multicast.c:1818:21: warning: unused variable 'br' [-Wunused-variable] 1818 | struct net_bridge *br = mp->br; | ^~ It happens due to bridge's mlock_dereference() when lockdep isn't defined. Silence the warning by annotating the variable as __maybe_unused. Fixes: 0436862e417e ("net: bridge: mcast: support for IGMPv3/MLDv2 ALLOW_NEW_SOURCES report") Reported-by: Stephen Rothwell Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 8c70b2681766ebc0fa4ffa6eb47bd9c858adfef1 Author: Wang Hai Date: Tue Sep 8 22:05:43 2020 +0800 netlabel: Fix some kernel-doc warnings Fixes the following W=1 kernel build warning(s): net/netlabel/netlabel_calipso.c:438: warning: Excess function parameter 'audit_secid' description in 'calipso_doi_remove' net/netlabel/netlabel_calipso.c:605: warning: Excess function parameter 'reg' description in 'calipso_req_delattr' Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Paul Moore Signed-off-by: David S. Miller commit 4ff62d82be328d01be931e672473dac276e6088e Author: Wang Hai Date: Tue Sep 8 22:03:33 2020 +0800 net: wimax: i2400m: fix 'msg_skb' kernel-doc warning in i2400m_msg_to_dev() Fixes the following W=1 kernel build warning(s): drivers/net/wimax/i2400m/control.c:709: warning: Excess function parameter 'msg_skb' description in 'i2400m_msg_to_dev' This parameter is not in use. Remove it. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 525090b5092d271425af0bfb1f16fdfa15b064f1 Author: Wang Hai Date: Tue Sep 8 22:01:58 2020 +0800 bnx2x: Fix some kernel-doc warnings Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:4238: warning: Excess function parameter 'netdev' description in 'bnx2x_setup_tc' drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:4238: warning: Excess function parameter 'tc' description in 'bnx2x_setup_tc' Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 7edce63666cd24cfffba031e7a32d1aa3848ffe7 Author: Wang Hai Date: Tue Sep 8 21:59:15 2020 +0800 cipso: fix 'audit_secid' kernel-doc warning in cipso_ipv4.c Fixes the following W=1 kernel build warning(s): net/ipv4/cipso_ipv4.c:510: warning: Excess function parameter 'audit_secid' description in 'cipso_v4_doi_remove' Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Paul Moore Signed-off-by: David S. Miller commit 652b4987ba1aaa25bd7d76a563e957eddf8ae1c0 Author: Wei Xu Date: Tue Sep 8 11:49:25 2020 +0800 net: smsc911x: Remove unused variables Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/smsc/smsc911x.c: In function ‘smsc911x_rx_fastforward’: drivers/net/ethernet/smsc/smsc911x.c:1199:16: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable] drivers/net/ethernet/smsc/smsc911x.c: In function ‘smsc911x_eeprom_write_location’: drivers/net/ethernet/smsc/smsc911x.c:2058:6: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable] Signed-off-by: Wei Xu Signed-off-by: David S. Miller commit 360ea6fca88027dbfad30ef2cd3b8bccb1bea67f Merge: c1f1f16c4de40 2c7bcc1de1530 Author: David S. Miller Date: Tue Sep 8 19:51:41 2020 -0700 Merge branch 'net-hns3-misc-updates' Huazhong Tan says: ==================== net: hns3: misc updates There are some misc updates for the HNS3 ethernet driver. ==================== Reviewed-by: Jakub Kicinski commit 2c7bcc1de15306dea4d6a842950bd0f9b720df35 Author: Guojia Liao Date: Tue Sep 8 10:59:54 2020 +0800 net: hns3: remove some unused function hns3_update_promisc_mode() hns3_update_promisc_mode is defined, but not be used, so remove it. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 3d93fda0bf799fd06fe6f105fdf2d73fbdd40476 Author: Huazhong Tan Date: Tue Sep 8 10:59:53 2020 +0800 net: hns3: remove some unused macros related to queue There are several macros related queue defined, but never used, so remove them. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 50626bcdbe4386b59e75458600df10783287cacc Author: Huazhong Tan Date: Tue Sep 8 10:59:52 2020 +0800 net: hns3: remove unused field 'tc_num_last_time' in struct hclge_dev 'tc_num_last_time' is defined, but never used, so remove it. Reported-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit b7ae986f698026f47069fbc7604abd02585b09c8 Author: Huazhong Tan Date: Tue Sep 8 10:59:51 2020 +0800 net: hns3: remove unused field 'io_base' in struct hns3_enet_ring 'io_base' has been defined and initialized, but never used, so remove it. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit a3a0ff0150c9ea761e41849152074391dd51e8da Author: Guangbin Huang Date: Tue Sep 8 10:59:50 2020 +0800 net: hns3: fix a typo in struct hclge_mac The member link of struct hclge_mac stores the link status of MAC and PHY if PHY exists, but its annotation uses word "exit", so fix it. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit e639436339318799a45a87bcefffd66d122f4893 Author: Guangbin Huang Date: Tue Sep 8 10:59:49 2020 +0800 net: hns3: skip periodic service task if reset failed When reset fails, if there are some pending jobs for the periodic service task, it does not do anything except print error each time the task is scheduled. So skip the periodic service task if reset failed. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d41884eecdbdd99a97018a0dbbd310a651ad197b Author: Huazhong Tan Date: Tue Sep 8 10:59:48 2020 +0800 net: hns3: narrow two local variable range in hclgevf_reset_prepare_wait() Since variable send_msg and ret only used in if branch, so move their definition into the if branch. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit e0f9f862623cd82e8cfe740e3de579a78fb852ca Author: Stanley Chu Date: Tue Sep 8 14:45:07 2020 +0800 scsi: ufs: ufs-mediatek: Add host reset mechanism Add host reset mechanism to try to recover host-side errors during recovery flow. Link: https://lore.kernel.org/r/20200908064507.30774-5-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 9a9ddb8a3a6d247321dfd4b07a04e3f2e92e576f Author: Stanley Chu Date: Tue Sep 8 14:45:06 2020 +0800 scsi: ufs: ufs-mediatek: Fix flag of unipro low-power mode Forcibly leave UniPro low-power mode if UIC commands failed. This makes hba_enable_delay_us as correct (default) value for re-enabling the host. At the same time, change type of parameter "lpm" in function ufs_mtk_unipro_set_pm() to "bool". Link: https://lore.kernel.org/r/20200908064507.30774-4-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit a3e40b80dc951057033dce86f0e675b2b822b513 Author: Stanley Chu Date: Tue Sep 8 14:45:05 2020 +0800 scsi: ufs: ufs-mediatek: Fix HOST_PA_TACTIVATE quirk Simply add HOST_PA_TACTIVATE quirk back since it was incorrectly removed before. Link: https://lore.kernel.org/r/20200908064507.30774-3-stanley.chu@mediatek.com Fixes: 47d054580a75 ("scsi: ufs-mediatek: fix HOST_PA_TACTIVATE quirk for Samsung UFS Devices") Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 30a90782c105fe498df74161392aa143796b6886 Author: Stanley Chu Date: Tue Sep 8 14:45:04 2020 +0800 scsi: ufs: ufs-mediatek: Eliminate error message for unbound mphy Some MediaTek platforms does not have to bind MPHY so users shall not see any unnecessary logs. Simply remove logs for this case. Link: https://lore.kernel.org/r/20200908064507.30774-2-stanley.chu@mediatek.com Fixes: fc4983018fea ("scsi: ufs-mediatek: Allow unbound mphy") Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 96a766a789eb49d85c9a15eac9456fbddadb1158 Author: Manish Rangankar Date: Tue Sep 8 02:56:57 2020 -0700 scsi: qedi: Add support for handling PCIe errors The error recovery is handled by management firmware (MFW) with the help of qed/qedi drivers. Upon detecting errors, driver informs MFW about this event which in turn starts a recovery process. MFW sends ERROR_RECOVERY notification to the driver which performs the required cleanup/recovery from the driver side. Link: https://lore.kernel.org/r/20200908095657.26821-9-mrangankar@marvell.com Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit f4ba4e55db6db7e85e847f1a5891efa792580809 Author: Manish Rangankar Date: Tue Sep 8 02:56:56 2020 -0700 scsi: qedi: Add firmware error recovery invocation support Add support to initiate MFW process recovery for all the devices if storage function receives the event first. Also added fix for kernel test robot warning, >> drivers/scsi/qedi/qedi_main.c:1119:6: warning: no previous prototype >> for 'qedi_schedule_hw_err_handler' [-Wmissing-prototypes] Link: https://lore.kernel.org/r/20200908095657.26821-8-mrangankar@marvell.com Reported-by: kernel test robot Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit 4118879be3755b38171063dfd4a57611d4b20a83 Author: Nilesh Javali Date: Tue Sep 8 02:56:55 2020 -0700 scsi: qedi: Mark all connections for recovery on link down event For short time cable pulls, the in-flight I/O to the firmware is never cleaned up, resulting in the behaviour of stale I/O completion causing list_del corruption and soft lockup of the system. On link down event, mark all the connections for recovery, causing cleanup of all the in-flight I/O immediately. Link: https://lore.kernel.org/r/20200908095657.26821-7-mrangankar@marvell.com Signed-off-by: Nilesh Javali Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit 5a2e69af16cecb30395964e117ba7f0e155a586d Author: Manish Rangankar Date: Tue Sep 8 02:56:54 2020 -0700 scsi: qedi: Use snprintf instead of sprintf Use snprintf to limit max number of bytes to the buffer. Link: https://lore.kernel.org/r/20200908095657.26821-6-mrangankar@marvell.com Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit c0650e28448d606c84f76c34333dba30f61de993 Author: Nilesh Javali Date: Tue Sep 8 02:56:53 2020 -0700 scsi: qedi: Protect active command list to avoid list corruption Protect active command list for non-I/O commands like login response, logout response, text response, and recovery cleanup of active list to avoid list corruption. Link: https://lore.kernel.org/r/20200908095657.26821-5-mrangankar@marvell.com Signed-off-by: Nilesh Javali Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit 28b35d17f9f8573d4646dd8df08917a4076a6b63 Author: Nilesh Javali Date: Tue Sep 8 02:56:52 2020 -0700 scsi: qedi: Fix list_del corruption while removing active I/O While aborting the I/O, the firmware cleanup task timed out and driver deleted the I/O from active command list. Some time later the firmware sent the cleanup task response and driver again deleted the I/O from active command list causing firmware to send completion for non-existent I/O and list_del corruption of active command list. Add fix to check if I/O is present before deleting it from the active command list to ensure firmware sends valid I/O completion and protect against list_del corruption. Link: https://lore.kernel.org/r/20200908095657.26821-4-mrangankar@marvell.com Signed-off-by: Nilesh Javali Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit 5c35e46465665e2864b2f76675306bf06e0b8703 Author: Manish Rangankar Date: Tue Sep 8 02:56:51 2020 -0700 scsi: qedi: Skip firmware connection termination for PCI shutdown handler In boot from SAN scenario when qedi PCI shutdown handler is called with active iSCSI sessions, sometimes target takes too long time to respond to firmware connection termination request. Instead skip sending termination ramrod and progress with unload path. Link: https://lore.kernel.org/r/20200908095657.26821-3-mrangankar@marvell.com Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit 3f8ad0072bf73f3555cd04b7ee7ac09034d9ee18 Author: Manish Rangankar Date: Tue Sep 8 02:56:50 2020 -0700 scsi: qedi: Use qed count from set_fp_int in msix allocation To avoid unnecessary vector allocation when the number of fast-path queues is less then available msix vectors, use return count from module qed->set_fp_int. Link: https://lore.kernel.org/r/20200908095657.26821-2-mrangankar@marvell.com Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen commit c1f1f16c4de407fa1924e3aa4ddbc567c0a86095 Author: Tom Rix Date: Mon Sep 7 11:04:38 2020 -0700 net: sched: skip an unnecessay check Reviewing the error handling in tcf_action_init_1() most of the early handling uses err_out: if (cookie) { kfree(cookie->data); kfree(cookie); } before cookie could ever be set. So skip the unnecessay check. Signed-off-by: Tom Rix Signed-off-by: David S. Miller commit 877d8c074302c20ac0759d1a4f689c14aada420d Merge: 1f4b2aca794f7 79416e97dda01 Author: Dave Airlie Date: Wed Sep 9 12:27:12 2020 +1000 Merge tag 'topic/nouveau-i915-dp-helpers-and-cleanup-2020-08-31-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next UAPI Changes: None Cross-subsystem Changes: * Moves a bunch of miscellaneous DP code from the i915 driver into a set of shared DRM DP helpers Core Changes: * New DRM DP helpers (see above) Driver Changes: * Implements usage of the aforementioned DP helpers in the nouveau driver, along with some other various HPD related cleanup for nouveau Signed-off-by: Dave Airlie From: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/11e59ebdea7ee4f46803a21fe9b21443d2b9c401.camel@redhat.com commit 5ae4998b5d6fc703a16c9fa935fb7d335843bf22 Author: Christoph Hellwig Date: Thu Sep 3 16:22:42 2020 +0200 powerpc: remove address space overrides using set_fs() Stop providing the possibility to override the address space using set_fs() now that there is no need for that any more. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit c33165253492b91337f88c84b11733a4a2d55b60 Author: Christoph Hellwig Date: Thu Sep 3 16:22:41 2020 +0200 powerpc: use non-set_fs based maccess routines Provide __get_kernel_nofault and __put_kernel_nofault routines to implement the maccess routines without messing with set_fs and without opening up access to user space. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 47058bb54b57962b3958a936ddbc59355e4c5504 Author: Christoph Hellwig Date: Thu Sep 3 16:22:40 2020 +0200 x86: remove address space overrides using set_fs() Stop providing the possibility to override the address space using set_fs() now that there is no need for that any more. To properly handle the TASK_SIZE_MAX checking for 4 vs 5-level page tables on x86 a new alternative is introduced, which just like the one in entry_64.S has to use the hardcoded virtual address bits to escape the fact that TASK_SIZE_MAX isn't actually a constant when 5-level page tables are enabled. Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook Signed-off-by: Al Viro commit a1d826d475aafe63775b910e86ccd1bcf1e5a6e1 Author: Christoph Hellwig Date: Thu Sep 3 16:22:39 2020 +0200 x86: make TASK_SIZE_MAX usable from assembly code For 64-bit the only thing missing was a strategic _AC, and for 32-bit we need to use __PAGE_OFFSET instead of PAGE_OFFSET in the TASK_SIZE definition to escape the explicit unsigned long cast. This just works because __PAGE_OFFSET is defined using _AC itself and thus never needs the cast anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook Signed-off-by: Al Viro commit 999c83e8ffd90caa00ee6caf054e037cf8a27d0e Author: Christoph Hellwig Date: Thu Sep 3 16:22:38 2020 +0200 x86: move PAGE_OFFSET, TASK_SIZE & friends to page_{32,64}_types.h At least for 64-bit this moves them closer to some of the defines they are based on, and it prepares for using the TASK_SIZE_MAX definition from assembly. Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook Signed-off-by: Al Viro commit c6f7c753f71cccb21d1a7f0c1127ce7804374c5e Author: Christoph Hellwig Date: Thu Sep 3 16:22:37 2020 +0200 lkdtm: remove set_fs-based tests Once we can't manipulate the address limit, we also can't test what happens when the manipulation is abused. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 81b1e242b8bdc1f5094b8d172cdc0c032fc761c1 Author: Christoph Hellwig Date: Thu Sep 3 16:22:36 2020 +0200 test_bitmap: remove user bitmap tests We can't run the tests for userspace bitmap parsing if set_fs() doesn't exist, and it is about to go away for x86, powerpc with other major architectures to follow. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 5e6e9852d6f76e01b2e6803c74258afa5b432bc5 Author: Christoph Hellwig Date: Thu Sep 3 16:22:35 2020 +0200 uaccess: add infrastructure for kernel builds with set_fs() Add a CONFIG_SET_FS option that is selected by architecturess that implement set_fs, which is all of them initially. If the option is not set stubs for routines related to overriding the address space are provided so that architectures can start to opt out of providing set_fs. Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook Signed-off-by: Al Viro commit 36e2c7421f02a22f71c9283e55fdb672a9eb58e7 Author: Christoph Hellwig Date: Thu Sep 3 16:22:34 2020 +0200 fs: don't allow splice read/write without explicit ops default_file_splice_write is the last piece of generic code that uses set_fs to make the uaccess routines operate on kernel pointers. It implements a "fallback loop" for splicing from files that do not actually provide a proper splice_read method. The usual file systems and other high bandwidth instances all provide a ->splice_read, so this just removes support for various device drivers and procfs/debugfs files. If splice support for any of those turns out to be important it can be added back by switching them to the iter ops and using generic_file_splice_read. Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook Signed-off-by: Al Viro commit 4d03e3cc59828c82ee89ea6e27a2f3cdf95aaadf Author: Christoph Hellwig Date: Thu Sep 3 16:22:33 2020 +0200 fs: don't allow kernel reads and writes without iter ops Don't allow calling ->read or ->write with set_fs as a preparation for killing off set_fs. All the instances that we use kernel_read/write on are using the iter ops already. If a file has both the regular ->read/->write methods and the iter variants those could have different semantics for messed up enough drivers. Also fails the kernel access to them in that case. Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook Signed-off-by: Al Viro commit 4bd6a7353ee14697fea645e941354976d2c4a452 Author: Matthew Wilcox (Oracle) Date: Thu Sep 3 16:22:32 2020 +0200 sysctl: Convert to iter interfaces Using the read_iter/write_iter interfaces allows for in-kernel users to set sysctls without using set_fs(). Also, the buffer is a string, so give it the real type of 'char *', not void *. [AV: Christoph's fixup folded in] Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 7fe2bb7e7e5cf91d03ff9c35b7b997d088916cbc Author: Bruno Meneguele Date: Fri Sep 4 16:40:58 2020 -0300 integrity: invalid kernel parameters feedback Don't silently ignore unknown or invalid ima_{policy,appraise,hash} and evm kernel boot command line options. Signed-off-by: Bruno Meneguele Signed-off-by: Mimi Zohar commit 4afb28ab03d5d811b369af4472f3941557928569 Author: Bruno Meneguele Date: Fri Sep 4 16:40:57 2020 -0300 ima: add check for enforced appraise option The "enforce" string is allowed as an option for ima_appraise= kernel paramenter per kernel-paramenters.txt and should be considered on the parameter setup checking as a matter of completeness. Also it allows futher checking on the options being passed by the user. Signed-off-by: Bruno Meneguele Signed-off-by: Mimi Zohar commit 5476b7f5ae7bb1bc0d7c58a4a530f079950b9e1f Author: Nícolas F. R. A. Prado Date: Sat Sep 5 21:03:00 2020 +0000 scsi: docs: Remove obsolete scsi typedef text from scsi_mid_low_api Commit 91ebc1facd77 ("scsi: core: remove Scsi_Cmnd typedef") removed the Scsi_cmnd typedef but it was still mentioned in a paragraph in the "SCSI mid_level - lower_level driver interface" documentation page. Remove this obsolete paragraph. Link: https://lore.kernel.org/r/20200905210211.2286172-1-nfraprado@protonmail.com Suggested-by: Randy Dunlap Suggested-by: Jonathan Corbet Acked-by: Randy Dunlap Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Martin K. Petersen commit df4d7329b2558008c64e573adb79d3fa3d5fc5c4 Author: Tyrel Datwyler Date: Fri Sep 4 18:29:36 2020 -0500 scsi: ibmvfc: Interface updates for future FPIN and MQ support VIOS partitions with SLI-4 enabled Emulex adapters will be capable of driving I/O in parallel through mulitple work queues or channels, and with new hypervisor firmware that supports multiple interrupt sources an ibmvfc NPIV single initiator can be modified to exploit end-to-end channelization in a PowerVM environment. VIOS hosts will also be able to expose fabric perfromance impact notifications (FPIN) via a new asynchronous event to ibmvfc clients that advertise support via IBMVFC_CAN_HANDLE_FPIN in their capabilities flag during NPIV_LOGIN. This patch introduces three new Management Datagrams (MADs) for channelization support negotiation as well as the FPIN asynchronous event and FPIN status flags. Follow up work is required to plumb the ibmvfc client driver to use these new interfaces. Link: https://lore.kernel.org/r/20200904232936.840193-2-tyreld@linux.ibm.com Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit 802c60e3684e05633158055b862a99e0590f6327 Author: Tyrel Datwyler Date: Fri Sep 4 18:29:35 2020 -0500 scsi: ibmvfc: Use compiler attribute defines instead of __attribute__() Update ibmvfc.h structs to use the preferred __packed and __aligned() attribute macros defined in include/linux/compiler_attributes.h in place of __attribute__(). Link: https://lore.kernel.org/r/20200904232936.840193-1-tyreld@linux.ibm.com Signed-off-by: Tyrel Datwyler Signed-off-by: Martin K. Petersen commit 499f7a9660926c9176563bf8da22abf585b65e65 Author: Bao D. Nguyen Date: Fri Aug 28 18:05:13 2020 -0700 scsi: ufshcd: Allow specifying an Auto-Hibernate Timer value of zero Setting the Auto-Hibernate Timer to zero is a valid setting which indicates the Auto-Hibernate feature being disabled. Correctly support this setting. In addition, when the timer value is queried from sysfs, read from the host controller's register and return that value instead of using the RAM value. Link: https://lore.kernel.org/r/b141cfcd7998b8933635828b56fbb64f8ad4d175.1598661071.git.nguyenb@codeaurora.org Acked-by: Stanley Chu Signed-off-by: Bao D. Nguyen Signed-off-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit e6054fc1f865ac46936a6b5517ae2d36554c94f8 Author: Yonghong Song Date: Tue Sep 8 10:57:03 2020 -0700 selftests/bpf: Add test for map_ptr arithmetic Change selftest map_ptr_kern.c with disabling inlining for one of subtests, which will fail the test without previous verifier change. Also added to verifier test for both "map_ptr += scalar" and "scalar += map_ptr" arithmetic. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200908175703.2463721-1-yhs@fb.com commit 7c6967326267bd5c0dded0a99541357d70dd11ac Author: Yonghong Song Date: Tue Sep 8 10:57:02 2020 -0700 bpf: Permit map_ptr arithmetic with opcode add and offset 0 Commit 41c48f3a98231 ("bpf: Support access to bpf map fields") added support to access map fields with CORE support. For example, struct bpf_map { __u32 max_entries; } __attribute__((preserve_access_index)); struct bpf_array { struct bpf_map map; __u32 elem_size; } __attribute__((preserve_access_index)); struct { __uint(type, BPF_MAP_TYPE_ARRAY); __uint(max_entries, 4); __type(key, __u32); __type(value, __u32); } m_array SEC(".maps"); SEC("cgroup_skb/egress") int cg_skb(void *ctx) { struct bpf_array *array = (struct bpf_array *)&m_array; /* .. array->map.max_entries .. */ } In kernel, bpf_htab has similar structure, struct bpf_htab { struct bpf_map map; ... } In the above cg_skb(), to access array->map.max_entries, with CORE, the clang will generate two builtin's. base = &m_array; /* access array.map */ map_addr = __builtin_preserve_struct_access_info(base, 0, 0); /* access array.map.max_entries */ max_entries_addr = __builtin_preserve_struct_access_info(map_addr, 0, 0); max_entries = *max_entries_addr; In the current llvm, if two builtin's are in the same function or in the same function after inlining, the compiler is smart enough to chain them together and generates like below: base = &m_array; max_entries = *(base + reloc_offset); /* reloc_offset = 0 in this case */ and we are fine. But if we force no inlining for one of functions in test_map_ptr() selftest, e.g., check_default(), the above two __builtin_preserve_* will be in two different functions. In this case, we will have code like: func check_hash(): reloc_offset_map = 0; base = &m_array; map_base = base + reloc_offset_map; check_default(map_base, ...) func check_default(map_base, ...): max_entries = *(map_base + reloc_offset_max_entries); In kernel, map_ptr (CONST_PTR_TO_MAP) does not allow any arithmetic. The above "map_base = base + reloc_offset_map" will trigger a verifier failure. ; VERIFY(check_default(&hash->map, map)); 0: (18) r7 = 0xffffb4fe8018a004 2: (b4) w1 = 110 3: (63) *(u32 *)(r7 +0) = r1 R1_w=invP110 R7_w=map_value(id=0,off=4,ks=4,vs=8,imm=0) R10=fp0 ; VERIFY_TYPE(BPF_MAP_TYPE_HASH, check_hash); 4: (18) r1 = 0xffffb4fe8018a000 6: (b4) w2 = 1 7: (63) *(u32 *)(r1 +0) = r2 R1_w=map_value(id=0,off=0,ks=4,vs=8,imm=0) R2_w=invP1 R7_w=map_value(id=0,off=4,ks=4,vs=8,imm=0) R10=fp0 8: (b7) r2 = 0 9: (18) r8 = 0xffff90bcb500c000 11: (18) r1 = 0xffff90bcb500c000 13: (0f) r1 += r2 R1 pointer arithmetic on map_ptr prohibited To fix the issue, let us permit map_ptr + 0 arithmetic which will result in exactly the same map_ptr. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200908175702.2463625-1-yhs@fb.com commit e2c8c4ec48b5cbd4b61edc24d884dfd5ec35ef9d Author: Hans de Goede Date: Tue Sep 8 12:21:50 2020 -0700 platform/x86: thinkpad_acpi: Map Clipping tool hotkey to KEY_SELECTIVE_SCREENSHOT Commit 696c6523ec8f ("platform/x86: thinkpad_acpi: add mapping for new hotkeys") added support for a bunch of new hotkeys, but the clipping/snipping tool hotkey got ignored because there was no good key-code to map it to. Recently a new KEY_SELECTIVE_SCREENSHOT keycode was added by commit 3b059da9835c ("Input: allocate keycode for "Selective Screenshot" key") quoting from the commit message: "New Chrome OS keyboards have a "snip" key that is basically a selective screenshot (allows a user to select an area of screen to be copied). Allocate a keycode for it." Support for this "snip" key seems like it is also a good match for the clipping/snipping tool hotkey, so map this hotkey to the new KEY_SELECTIVE_SCREENSHOT key-code. Reviewed-by: Bastien Nocera Acked-by: Henrique de Moraes Holschuh Acked-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200908135147.4044-5-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 7ed7748d2c9cb8c26f5fcbfe4f4fa87655bb9a21 Author: Hans de Goede Date: Tue Sep 8 12:21:11 2020 -0700 platform/x86: thinkpad_acpi: Add support for new hotkeys found on X1C8 / T14 New Lenovo Thinkpad models, e.g. the X1 Carbon 8th gen and the new T14 gen1 models have 3 new symbols / shortcuts on their F9-F11 keys (and the thinkpad_acpi driver receives 3 new hkey events for these): F9: Has a symbol resembling a rectangular speech balloon, the manual says the hotkey functions shows or hides the notification center F10: Has a symbol of a telephone horn which has been picked up from the receiver, the manual says: "Answer incoming calls" F11: Has a symbol of a telephone horn which is resting on the receiver, the manual says: "Decline incoming calls" And these Thinkpad models also send a new 0x1316 hkey events when the Fn + right Shift key-combo is pressed. This commit adds support for these 4 new hkey events. Acked-by: Henrique de Moraes Holschuh Acked-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200908135147.4044-4-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit bba013e1ca5e7150b42a1a1a1e852010d772edad Author: Hans de Goede Date: Tue Sep 8 09:58:09 2020 -0700 Input: allocate keycode for Fn + right shift The last 2 generations of Lenovo Thinkpads send an acpi_thinkpad event when Fn + right shift is pressed. This is intended for use with "Lenovo Quick Clean" software, which disables the touchpad + kbd for 2 minutes on this key-combo so that healthcare workes can disinfect it. But there is no silkscreen print on the right-keyboard to indicate this, so add a KEY_FN_RIGHT_SHIFT keycode define to use for this key-combo. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200908135147.4044-3-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit cd80ec795156346236e9b1cd9f5cbff5a9bbd212 Author: Hans de Goede Date: Tue Sep 8 09:33:56 2020 -0700 Input: allocate keycodes for notification-center, pickup-phone and hangup-phone New Lenovo Thinkpad models, e.g. the X1 Carbon 8th gen and the new T14 gen1 models have 3 new symbols / shortcuts on their F9-F11 keys (and the thinkpad_acpi driver receives 3 new "scancodes" for these): F9: Has a symbol resembling a rectangular speech balloon, the manual says the hotkey functions shows or hides the notification center F10: Has a symbol of a telephone horn which has been picked up from the receiver, the manual says: "Answer incoming calls" F11: Has a symbol of a telephone horn which is resting on the receiver, the manual says: "Decline incoming calls" We have no existing keycodes which are a good match for these, so add 3 new keycodes for these. I noticed that we have a hole in our keycodes between 0x1ba and 0x1c0 which does not seem to be reserved for any specific purpose, so these new 3 codes use 0x1bc - 0x1be, instead of starting at 0x27b. Acked-by: Henrique de Moraes Holschuh Acked-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Dmitry Torokhov commit a23042882ff29ae2df04f46ac0d4c50f66e7e497 Author: Zou Wei Date: Wed Apr 15 12:15:01 2020 +0800 selftests/seccomp: Use bitwise instead of arithmetic operator for flags This silences the following coccinelle warning: "WARNING: sum of probable bitmasks, consider |" tools/testing/selftests/seccomp/seccomp_bpf.c:3131:17-18: WARNING: sum of probable bitmasks, consider | tools/testing/selftests/seccomp/seccomp_bpf.c:3133:18-19: WARNING: sum of probable bitmasks, consider | tools/testing/selftests/seccomp/seccomp_bpf.c:3134:18-19: WARNING: sum of probable bitmasks, consider | tools/testing/selftests/seccomp/seccomp_bpf.c:3135:18-19: WARNING: sum of probable bitmasks, consider | Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1586924101-65940-1-git-send-email-zou_wei@huawei.com Signed-off-by: Kees Cook commit 2d9ca267a944c2b6ed5b4d750b1cf0407b6262b4 Author: Denis Efremov Date: Mon Aug 24 15:59:21 2020 +0300 seccomp: Use current_pt_regs() instead of task_pt_regs(current) As described in commit a3460a59747c ("new helper: current_pt_regs()"): - arch versions are "optimized versions". - some architectures have task_pt_regs() working only for traced tasks blocked on signal delivery. current_pt_regs() needs to work for *all* processes. In preparation for adding a coccinelle rule for using current_*(), instead of raw accesses to current members, modify seccomp_do_user_notification(), __seccomp_filter(), __secure_computing() to use current_pt_regs(). Signed-off-by: Denis Efremov Link: https://lore.kernel.org/r/20200824125921.488311-1-efremov@linux.com [kees: Reworded commit log, add comment to populate_seccomp_data()] Signed-off-by: Kees Cook commit 3932fcecd96221e18100055d623b736d0ff873a4 Author: Kees Cook Date: Tue Sep 8 12:28:27 2020 -0700 selftests/seccomp: Add test for unknown SECCOMP_RET kill behavior While we were testing for the behavior of unknown seccomp filter return values, there was no test for how it acted in a thread group. Add a test in the thread group tests for this. Reviewed-by: Shuah Khan Acked-by: Christian Brauner Signed-off-by: Kees Cook commit f710b49e3c45ee2eae949f7cead736ba25c6ccf1 Author: Mauro Carvalho Chehab Date: Wed Aug 26 06:36:49 2020 +0200 dt-bindings: convert spmi.txt to spmi.yaml Convert the SPMI bus documentation to JSON/yaml. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/ee4c4ca9f29a39f6af772b3a526a996176499da3.1598415179.git.mchehab+huawei@kernel.org [robh: Correct maintainer, unit-address should be hex] Signed-off-by: Rob Herring commit af4ed018849be4e17c259103599563b2df2a3484 Author: Christian Lamparter Date: Sat Aug 22 17:40:45 2020 +0200 dt-bindings: vendor-prefixes: Add Cisco Meraki vendor prefix Meraki was founded in 2006. The start-up quickly rose to prominence by being based in part on the MIT Roofnet Project. In December 2012, Cisco Systems, Inc. bought Meraki. The "Meraki" branding is still around to this day. Web site of the company: https://meraki.cisco.com/ Signed-off-by: Christian Lamparter Link: https://lore.kernel.org/r/20200822154045.16036-1-chunkeey@gmail.com Signed-off-by: Rob Herring commit 04e89ff364dec3dc261243c2f0780635448bc466 Author: Dave Airlie Date: Tue Sep 8 06:46:30 2020 +1000 drm/ttm: drop the tt backend function paths. These are now driver side. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-14-airlied@gmail.com commit 48efa57e4f1b5c9ecb240f58f790d9872533f953 Author: Dave Airlie Date: Tue Sep 8 06:46:29 2020 +1000 drm/ttm/agp: remove bdev from agp helpers Since the agp bind/unbind/destroy are now getting called from drivers rather than via the func table, drop the bdev parameter. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-13-airlied@gmail.com commit 434825546e458325d8bdd3be08390d8cc214c64f Author: Dave Airlie Date: Tue Sep 8 06:46:28 2020 +1000 drm/ttm: get rid of agp specific populate/unpopulate paths. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-12-airlied@gmail.com commit 0e59e772e3bdc422d4e888db006778b20af74ae8 Author: Dave Airlie Date: Tue Sep 8 06:46:27 2020 +1000 drm/ttm/agp: drop back end bindings from agp These aren't used anymore. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-11-airlied@gmail.com commit 84693830aade229cfec88a8bd0a4374ae1103afd Author: Dave Airlie Date: Tue Sep 8 06:46:26 2020 +1000 drm/gem_vram/ttm: move to driver backend destroy function. Acked-by: Thomas Zimmermann Acked-by: Christian König Acked-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-10-airlied@gmail.com commit 5d26eba988296a786442824297c7fc66a4f03ff9 Author: Dave Airlie Date: Tue Sep 8 06:46:25 2020 +1000 drm/amdgpu/ttm: move to driver backend binding funcs Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-9-airlied@gmail.com commit debf8ab9f8a17f86d99f03f0886f38adcacfc209 Author: Dave Airlie Date: Tue Sep 8 06:46:24 2020 +1000 drm/vmwgfx: move to driver binding functions Acked-by: Christian König Acked-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-8-airlied@gmail.com commit 8635784a8733e307d18ad3422c897432db93ead0 Author: Dave Airlie Date: Tue Sep 8 06:46:23 2020 +1000 drm/nouveau/ttm: use driver bind/unbind/destroy functions. Acked-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-7-airlied@gmail.com commit a68bb1938b518c53ba3733be6be767305ae2f2c9 Author: Dave Airlie Date: Tue Sep 8 06:46:22 2020 +1000 drm/radeon/ttm: move to driver binding/destroy functions. (v2) Do agp decision in the driver, instead of special binding funcs v2: use container_of, drop some {}. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-6-airlied@gmail.com commit 738edc0adb388f75aec67011f6e8f225b9f29783 Author: Dave Airlie Date: Tue Sep 8 06:46:21 2020 +1000 drm/ttm/agp: export bind/unbind/destroy for drivers to use. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-5-airlied@gmail.com commit dc2caa305a6fc5db2b9c1b24ecef8038cd957d07 Author: Dave Airlie Date: Tue Sep 8 06:46:20 2020 +1000 drm/qxl: move bind/unbind/destroy to the driver function table. Acked-by: Christian König Acked-by: Ben Skeggs Reviewed-by: Gerd Hoffmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-4-airlied@gmail.com commit 86008a7553e6c57268e4a4f71e3a43e73b1b3ef1 Author: Dave Airlie Date: Tue Sep 8 06:46:19 2020 +1000 drm/ttm: add optional bind/unbind via driver. I want to remove the backend funcs Reviewed-by: Christian König Signed-off-by: Dave Airlie Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-3-airlied@gmail.com commit ecfe6953fa00115414a6fefe49023a1ebc187a98 Author: Dave Airlie Date: Tue Sep 8 06:46:18 2020 +1000 drm/ttm: introduce ttm_bo_move_null This pattern is cut-n-pasted across 4 drivers, switch it to a WARN_ON instead, as BUG_ON is considered a bad idea usually. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200907204630.1406528-2-airlied@gmail.com commit fbd4ab780284aeb66374223fa3ac0cd47611aebe Author: Tom Rix Date: Mon Sep 7 08:32:25 2020 -0700 EDAC, sb_edac: Simplify switch statement clang static analyzer reports this problem sb_edac.c:959:2: warning: Undefined or garbage value returned to caller return type; ^~~~~~~~~~~ This is a false positive. However by initializing the type to DEV_UNKNOWN the 3 case can be removed from the switch, saving a comparison and jump. Signed-off-by: Tom Rix Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20200907153225.7294-1-trix@redhat.com commit 1f4b2aca794f7aeb918ed5f0d7221d68a81d6b43 Merge: 61d98185b41c5 e0ee152fce25d Author: Dave Airlie Date: Wed Sep 9 07:53:59 2020 +1000 Merge tag 'drm-intel-gt-next-2020-09-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-next (Same content as drm-intel-gt-next-2020-09-04-3, S-o-b's added) UAPI Changes: (- Potential implicit changes from WW locking refactoring) Cross-subsystem Changes: (- WW locking changes should align the i915 locking more with others) Driver Changes: - MAJOR: Apply WW locking across the driver (Maarten) - Reverts for 5 commits to make applying WW locking faster (Maarten) - Disable preparser around invalidations on Tigerlake for non-RCS engines (Chris) - Add missing dma_fence_put() for error case of syncobj timeline (Chris) - Parse command buffer earlier in eb_relocate(slow) to facilitate backoff (Maarten) - Pin engine before pinning all objects (Maarten) - Rework intel_context pinning to do everything outside of pin_mutex (Maarten) - Avoid tracking GEM context until registered (Cc: stable, Chris) - Provide a fastpath for waiting on vma bindings (Chris) - Fixes to preempt-to-busy mechanism (Chris) - Distinguish the virtual breadcrumbs from the irq breadcrumbs (Chris) - Switch to object allocations for page directories (Chris) - Hold context/request reference while breadcrumbs are active (Chris) - Make sure execbuffer always passes ww state to i915_vma_pin (Maarten) - Code refactoring to facilitate use of WW locking (Maarten) - Locking refactoring to use more granular locking (Maarten, Chris) - Support for multiple pinned timelines per engine (Chris) - Move complication of I915_GEM_THROTTLE to the ioctl from general code (Chris) - Make active tracking/vma page-directory stash work preallocated (Chris) - Avoid flushing submission tasklet too often (Chris) - Reduce context termination list iteration guard to RCU (Chris) - Reductions to locking contention (Chris) - Fixes for issues found by CI (Chris) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20200907130039.GA27766@jlahtine-mobl.ger.corp.intel.com commit 61d98185b41c5ddc442fcfef7dd5a7b289ef69f5 Merge: 0c8d22fcae2f9 6f6a73c8b715d Author: Dave Airlie Date: Wed Sep 9 07:46:32 2020 +1000 Backmerge drm-fixes merge into drm-next Commit '6f6a73c8b715d595977774d48450a734297ab21f' from Linus' tree The fixes reverts cause a bit of a conflict pain with intel next, start fixing it up here. Signed-off-by: Dave Airlie commit eb7eacaa5b9e4f665bd08d416c8f88e63d2f123c Author: Mark Tomlinson Date: Mon Aug 3 15:52:40 2020 +1200 PCI: iproc: Set affinity mask on MSI interrupts The core interrupt code expects the irq_set_affinity call to update the effective affinity for the interrupt. This was not being done, so update iproc_msi_irq_set_affinity() to do so. Link: https://lore.kernel.org/r/20200803035241.7737-1-mark.tomlinson@alliedtelesis.co.nz Fixes: 3bc2b2348835 ("PCI: iproc: Add iProc PCIe MSI support") Signed-off-by: Mark Tomlinson Signed-off-by: Lorenzo Pieralisi Reviewed-by: Ray Jui commit d5071f086bac56288646556bbf760e13c2febffe Author: Lorenzo Pieralisi Date: Fri Sep 4 15:21:32 2020 +0100 PCI: mvebu: Remove useless msi_controller pointer allocation The mvebu host controller driver allocates an msi_controller structure pointer without allocating the structure and initializing its methods, which makes the pointer useless. This means that the PCI IRQ MSI layer ignores it and that after all it should not really be needed. Remove it. Link: https://lore.kernel.org/r/20200904142132.6054-1-lorenzo.pieralisi@arm.com Signed-off-by: Lorenzo Pieralisi Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Cc: Rob Herring Cc: Thomas Petazzoni commit 288827d53e8edcca94caf6a507105fcbd20f419d Author: David Howells Date: Fri Jul 3 00:39:47 2020 +0100 rxrpc: Allow multiple client connections to the same peer Allow the number of parallel connections to a machine to be expanded from a single connection to a maximum of four. This allows up to 16 calls to be in progress at the same time to any particular peer instead of 4. Signed-off-by: David Howells commit 245500d853e9f20036cec7df4f6984ece4c6bf26 Author: David Howells Date: Wed Jul 1 11:15:32 2020 +0100 rxrpc: Rewrite the client connection manager Rewrite the rxrpc client connection manager so that it can support multiple connections for a given security key to a peer. The following changes are made: (1) For each open socket, the code currently maintains an rbtree with the connections placed into it, keyed by communications parameters. This is tricky to maintain as connections can be culled from the tree or replaced within it. Connections can require replacement for a number of reasons, e.g. their IDs span too great a range for the IDR data type to represent efficiently, the call ID numbers on that conn would overflow or the conn got aborted. This is changed so that there's now a connection bundle object placed in the tree, keyed on the same parameters. The bundle, however, does not need to be replaced. (2) An rxrpc_bundle object can now manage the available channels for a set of parallel connections. The lock that manages this is moved there from the rxrpc_connection struct (channel_lock). (3) There'a a dummy bundle for all incoming connections to share so that they have a channel_lock too. It might be better to give each incoming connection its own bundle. This bundle is not needed to manage which channels incoming calls are made on because that's the solely at whim of the client. (4) The restrictions on how many client connections are around are removed. Instead, a previous patch limits the number of client calls that can be allocated. Ordinarily, client connections are reaped after 2 minutes on the idle queue, but when more than a certain number of connections are in existence, the reaper starts reaping them after 2s of idleness instead to get the numbers back down. It could also be made such that new call allocations are forced to wait until the number of outstanding connections subsides. Signed-off-by: David Howells commit b7a7d67408032843c14071711d6259aada9392f0 Author: David Howells Date: Thu Jul 2 14:59:46 2020 +0100 rxrpc: Impose a maximum number of client calls Impose a maximum on the number of client rxrpc calls that are allowed simultaneously. This will be in lieu of a maximum number of client connections as this is easier to administed as, unlike connections, calls aren't reusable (to be changed in a subsequent patch).. This doesn't affect the limits on service calls and connections. Signed-off-by: David Howells commit 884e5cc1dd119d1761f6ea19e904a1492a81f9ee Author: Melissa Wen Date: Fri Sep 4 10:06:05 2020 -0300 MAINTAINERS: add entry for VKMS Add myself as maintainer of VKMS driver Signed-off-by: Melissa Wen Acked-by: Daniel Vetter Acked-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20200904130605.vs5tnfhgnemnz6pt@smtp.gmail.com commit 4d671d922d51907bc41f1f7f2dc737c928ae78fd Author: Rich Felker Date: Fri Aug 28 21:56:13 2020 -0400 seccomp: kill process instead of thread for unknown actions Asynchronous termination of a thread outside of the userspace thread library's knowledge is an unsafe operation that leaves the process in an inconsistent, corrupt, and possibly unrecoverable state. In order to make new actions that may be added in the future safe on kernels not aware of them, change the default action from SECCOMP_RET_KILL_THREAD to SECCOMP_RET_KILL_PROCESS. Signed-off-by: Rich Felker Link: https://lore.kernel.org/r/20200829015609.GA32566@brightrain.aerifal.cx [kees: Fixed up coredump selection logic to match] Signed-off-by: Kees Cook commit a85a4aa32ab9568751b7aff8bd33e1b44b1cd3a1 Author: Andre Przywara Date: Fri Aug 28 15:20:13 2020 +0100 dt-bindings: timers: sp-804: Convert to json-schema This converts the DT binding documentation for the ARM SP-804 timer IP over to json-schema. Most properties are just carried over, the clocks property requirement (either one or three clocks) is now formalised and enforced. As the former binding didn't specify clock-names, and there is no common name used by the existing DTs, I refrained from adding them in detail (just allowing the property). The requirement for the APB clock is enforced by the primecell binding already. Signed-off-by: Andre Przywara Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20200828142018.43298-2-andre.przywara@arm.com [robh: drop primecell.yaml] Signed-off-by: Rob Herring commit b0b71a6f5d655f2ffe79f12425779733e83e20f2 Merge: a59b2c7c56bf7 5ce78f4456a9b Author: Mark Brown Date: Tue Sep 8 18:19:33 2020 +0100 Merge series "spi: Adding support for Microchip Sparx5 SoC" from Lars Povlsen : The series add support for the Sparx5 SoC SPI controller in the spi-dw-mmio.c spi driver. v5 changes: - rx-sample-delay-ns documentation changes from Rob Herring: - Drop superfluous type $ref - Add default value = 0 v4 changes: - Changed snps,rx-sample-delay-ns to snps,rx-sample-delay-ns suggested by Rob Herring (rockchip also has this property). - Added support for controller-level rx-sample-delay-ns value as well as per SPI slave value (rockchip has controller-level property). - Dropped internal mux in favor of suggested spi-mux to control bus inteface selection. v3 changes: - Added mux support for controlling SPI bus interface. This is new mux driver, bindings and added to sparx5 base DT. - Removed "microchip,spi-interface2" property in favour of "mux-controls" property in SPI controller (sparx5 only). - Changed dw_spi_sparx5_set_cs() to use the mux control instead of directly acessing "mux" register. Associated code/defines moved to mux driver. - Changed dw_spi_sparx5_set_cs() to match other similar functions in signature and avoid explicit CS toggling. - Spun off duplicated NAND device DT chunks into separate DT file. v2 changes: - Moved all RX sample delay into spi-dw-core.c, using the "snps,rx-sample-delay-ns" device property. - Integrated Sparx5 support directly in spi-dw-mmio.c - Changed SPI2 configuration to per-slave "microchip,spi-interface2" property. - Added bindings to existing snps,dw-apb-ssi.yaml file - Dropped patches for polled mode and SPI memory operations. Lars Povlsen (6): spi: dw: Add support for RX sample delay register spi: dw: Add Microchip Sparx5 support arm64: dts: sparx5: Add SPI controller and associated mmio-mux dt-bindings: snps,dw-apb-ssi: Add sparx5 support, plus rx-sample-delay-ns property arm64: dts: sparx5: Add spi-nor support arm64: dts: sparx5: Add spi-nand devices .../bindings/spi/snps,dw-apb-ssi.yaml | 21 ++++++ arch/arm64/boot/dts/microchip/sparx5.dtsi | 47 ++++++++++++- .../arm64/boot/dts/microchip/sparx5_nand.dtsi | 31 ++++++++ .../boot/dts/microchip/sparx5_pcb125.dts | 30 ++++++++ .../boot/dts/microchip/sparx5_pcb134.dts | 1 + .../dts/microchip/sparx5_pcb134_board.dtsi | 16 +++++ .../boot/dts/microchip/sparx5_pcb135.dts | 1 + .../dts/microchip/sparx5_pcb135_board.dtsi | 16 +++++ drivers/spi/spi-dw-core.c | 26 +++++++ drivers/spi/spi-dw-mmio.c | 70 ++++++++++++++++++- drivers/spi/spi-dw.h | 3 + 11 files changed, 260 insertions(+), 2 deletions(-) create mode 100644 arch/arm64/boot/dts/microchip/sparx5_nand.dtsi -- 2.27.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit a59b2c7c56bf795cc13139d2634e86a3da7a0314 Author: Ikjoon Jang Date: Wed Aug 26 17:18:52 2020 +0800 spi: spi-mtk-nor: support standard spi properties Use default supports_op() to support spi-[rt]x-bus-width properties. And check dummy op's byte length instead of its bus width for output. Signed-off-by: Ikjoon Jang Link: https://lore.kernel.org/r/20200826091852.519138-1-ikjn@chromium.org Signed-off-by: Mark Brown commit 7708aff1e2ebc8fdccdd61cf9ab8576a66989166 Author: Krzysztof Kozlowski Date: Tue Sep 1 17:27:13 2020 +0200 spi: tegra20: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901152713.18629-11-krzk@kernel.org Signed-off-by: Mark Brown commit 68fffc191ed19ea5618285b128e6048d1536e680 Author: Krzysztof Kozlowski Date: Tue Sep 1 17:27:12 2020 +0200 spi: tegra114: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901152713.18629-10-krzk@kernel.org Signed-off-by: Mark Brown commit 74ee6dc1257edf5fcfba67fd8075b766d11c42a0 Author: Krzysztof Kozlowski Date: Tue Sep 1 17:27:11 2020 +0200 spi: synquacer: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901152713.18629-9-krzk@kernel.org Signed-off-by: Mark Brown commit a05cec2dc2df1e5d25addb7aba398f3eb451e163 Author: Krzysztof Kozlowski Date: Tue Sep 1 17:27:10 2020 +0200 spi: stm32: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901152713.18629-8-krzk@kernel.org Signed-off-by: Mark Brown commit 034532681c56cfffaea169a59155fe11e9172d9c Author: Krzysztof Kozlowski Date: Tue Sep 1 17:27:09 2020 +0200 spi: qcom-qspi: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901152713.18629-7-krzk@kernel.org Signed-off-by: Mark Brown commit 2d9bdf645584d15ed1d4aae6204cb6ea8b673d48 Author: Krzysztof Kozlowski Date: Tue Sep 1 17:27:08 2020 +0200 spi: spi-mux: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901152713.18629-6-krzk@kernel.org Signed-off-by: Mark Brown commit 436a5c208037a71f64f35312969e27a05d6d7c53 Author: Krzysztof Kozlowski Date: Tue Sep 1 17:27:07 2020 +0200 spi: cadence-quadspi: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901152713.18629-5-krzk@kernel.org Signed-off-by: Mark Brown commit 65acd82c4eb7f08747922ed3afb2d099a1b25d3f Author: Krzysztof Kozlowski Date: Tue Sep 1 17:27:06 2020 +0200 spi: bcm2835: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20200901152713.18629-4-krzk@kernel.org Signed-off-by: Mark Brown commit 96189475820835d7176171492640a58c600aca42 Author: Krzysztof Kozlowski Date: Tue Sep 1 17:27:05 2020 +0200 spi: atmel: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200901152713.18629-3-krzk@kernel.org Signed-off-by: Mark Brown commit 687a2e76186dcfa42f22c14b655c3fb159839e79 Author: Krzysztof Kozlowski Date: Tue Sep 1 17:27:03 2020 +0200 spi: sprd: Release DMA channel also on probe deferral If dma_request_chan() for TX channel fails with EPROBE_DEFER, the RX channel would not be released and on next re-probe it would be requested second time. Fixes: 386119bc7be9 ("spi: sprd: spi: sprd: Add DMA mode support") Cc: Signed-off-by: Krzysztof Kozlowski Acked-by: Chunyan Zhang Link: https://lore.kernel.org/r/20200901152713.18629-1-krzk@kernel.org Signed-off-by: Mark Brown commit 4564363351e2680e55edc23c7953aebd2acb4ab7 Author: Maxime Ripard Date: Thu Sep 3 10:01:52 2020 +0200 ARM: dts: bcm2711: Enable the display pipeline Now that all the drivers have been adjusted for it, let's bring in the necessary device tree changes. The VEC and PV3 are left out for now, since it will require a more specific clock setup. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard Reviewed-by: Hoegeun Kwon Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/cfce2276d172d3d9c4d34d966b58fd47f77c4e46.1599120059.git-series.maxime@cerno.tech commit b04a6b9d395d4bf540a1b7534e0ed16bea084c15 Author: Rob Herring Date: Thu Aug 20 21:54:13 2020 -0600 PCI: dwc: Make ATU accessors private The ATU registers are only accessed in pcie-designware.c and can be private to it. Link: https://lore.kernel.org/r/20200821035420.380495-34-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 903d69f83c6bf3bb42f98f41d9943f27880ddb67 Author: Rob Herring Date: Thu Aug 20 21:54:12 2020 -0600 PCI: dwc: Remove read_dbi2 code The DBI2 appears to be write-only and there's no read accesses in the code anyways, so let's remove all the read_dbi2 related code. Link: https://lore.kernel.org/r/20200821035420.380495-33-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Murali Karicheri Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Jingoo Han Cc: Gustavo Pimentel commit 84667a416d42c8516468f4ef7a577296fbfd167d Author: Rob Herring Date: Thu Aug 20 21:54:11 2020 -0600 PCI: dwc/tegra: Use common Designware port logic register definitions The Tegra driver has its own defines for common Designware Port Logic registers. Convert it to use the standard register definitions. Link: https://lore.kernel.org/r/20200821035420.380495-32-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org commit fb7652327101cdcaceae472c3b87fc5c8de28abe Author: Rob Herring Date: Thu Aug 20 21:54:10 2020 -0600 PCI: dwc: Remove hardcoded PCI_CAP_ID_EXP offset While the Designware controller appears to hard code the PCI_CAP_ID_EXP capability register at 0x70, there's no need to hard code this in the driver as it is discoverable. Link: https://lore.kernel.org/r/20200821035420.380495-31-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Murali Karicheri Cc: Pratyush Anand Cc: linux-omap@vger.kernel.org commit 7b87ddc04b364b94142d3b1295d92f1fe1145781 Author: Rob Herring Date: Thu Aug 20 21:54:09 2020 -0600 PCI: dwc/qcom: Use common PCI register definitions The QCom driver has its own defines for common PCI config space registers. It also hard codes the capability register offsets which are discoverable. Convert it to use the standard register definitions. Link: https://lore.kernel.org/r/20200821035420.380495-30-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Stanimir Varbanov Cc: Andy Gross Cc: Bjorn Andersson Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: linux-arm-msm@vger.kernel.org commit 201a8df899525bfad0b7493b97280e8127ac790b Author: Rob Herring Date: Thu Aug 20 21:54:08 2020 -0600 PCI: dwc/imx6: Use common PCI register definitions The i.MX6 driver has its own defines for common PCI config space registers. It also hard codes the capability register offsets which are discoverable. Convert it to use the standard register definitions. Link: https://lore.kernel.org/r/20200821035420.380495-29-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Richard Zhu Cc: Lucas Stach Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team commit 2f2cea1ea70ac25096bd63039b38bb8ec6a887b6 Author: Rob Herring Date: Thu Aug 20 21:54:07 2020 -0600 PCI: dwc/meson: Rework PCI config and DW port logic register accesses The meson 'elbi' registers are just the Designware 'dbi' space and all the registers accessed are either standard PCI config space or DWC port logic registers. Convert the accesses to use the common defines and register accessors. Link: https://lore.kernel.org/r/20200821035420.380495-28-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Yue Wang Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Kevin Hilman Cc: Jingoo Han Cc: Gustavo Pimentel Cc: linux-amlogic@lists.infradead.org commit 15efab2b8934f9950eff083c23c7f03c382a5f86 Author: Rob Herring Date: Thu Aug 20 21:54:06 2020 -0600 PCI: dwc/meson: Drop unnecessary RC config space initialization The common Designware init already initializes the RC PCI_COMMAND, BAR0 and BAR1 registers. The only difference here is the common code sets SERR. If clearing SERR is what's desired, then the Meson driver should do that instead. Link: https://lore.kernel.org/r/20200821035420.380495-27-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Yue Wang Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Kevin Hilman Cc: linux-amlogic@lists.infradead.org commit 244c40cc28b116b6530a6d9b24ac290e0f89607c Author: Rob Herring Date: Thu Aug 20 21:54:05 2020 -0600 PCI: dwc/meson: Drop the duplicate number of lanes setup The meson lanes initialization is the same DWC port logic registers as in dw_pcie_setup(). We just need to initialize 'num_lanes' to 1 to do the same init. dw_pcie_setup_rc() sets the PORT_LOGIC_SPEED_CHANGE bit, so setting it can be dropped. Link: https://lore.kernel.org/r/20200821035420.380495-26-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Yue Wang Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org commit cff9244432e833710a14ed597d33615d77934a9d Author: Rob Herring Date: Thu Aug 20 21:54:04 2020 -0600 PCI: dwc: Ensure FAST_LINK_MODE is cleared "Fast Link Mode" is a simulation environment speed up setting which should never be set and the default is not set. However some Amlogic platforms have it set (by firmware presumably). See commit 87dccf09323f ("PCI: amlogic: meson: Don't use FAST_LINK_MODE to set up link") for more information. Let's clear it in core DWC code so we can drop some vendor specific code. Link: https://lore.kernel.org/r/20200821035420.380495-25-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 6ffc02d236315783bf3639bf5aff4da047ee14bb Author: Rob Herring Date: Thu Aug 20 21:54:03 2020 -0600 PCI: dwc: Add a 'num_lanes' field to struct dw_pcie Add a 'num_lanes' field to allow drivers to provide a the number of lanes if not in DT or using a custom DT property. A driver can provide a non-zero value which is used if the DT doesn't have a 'num-lanes' property. Link: https://lore.kernel.org/r/20200821035420.380495-24-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 574523dcfc63a5071c15f851e1cb4277e957580d Author: Rob Herring Date: Thu Aug 20 21:54:02 2020 -0600 PCI: dwc/imx6: Remove duplicate define PCIE_LINK_WIDTH_SPEED_CONTROL PCIE_LINK_WIDTH_SPEED_CONTROL is already defined in pcie-designware.h, so remove it from the i.MX6 driver. Link: https://lore.kernel.org/r/20200821035420.380495-23-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Richard Zhu Cc: Lucas Stach Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team commit cf627713e3c08920cfc3ad401354109b5273409e Author: Rob Herring Date: Thu Aug 20 21:54:01 2020 -0600 PCI: dwc: Check CONFIG_PCI_MSI inside dw_pcie_msi_init() Move the IS_ENABLED(CONFIG_PCI_MSI) check into dw_pcie_msi_init() instead of duplicating it in all the drivers. Link: https://lore.kernel.org/r/20200821035420.380495-22-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Richard Zhu Cc: Lucas Stach Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Yue Wang Cc: Kevin Hilman Cc: Jesper Nilsson Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Xiaowei Song Cc: Binghui Wang Cc: Stanimir Varbanov Cc: Andy Gross Cc: Bjorn Andersson Cc: Kunihiko Hayashi Cc: Masahiro Yamada Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@axis.com Cc: linux-arm-msm@vger.kernel.org commit 421063efaf1e8f2ac6248cca0064e5877e375f87 Author: Rob Herring Date: Thu Aug 20 21:54:00 2020 -0600 PCI: dwc/keystone: Drop duplicated 'num-viewport' The DWC core driver already parses and stores the 'num-viewport' DT property, so there is no need for the Keystone driver to store it. Link: https://lore.kernel.org/r/20200821035420.380495-21-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Murali Karicheri Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 2ef6b06a0475f69a6e396af9e1977e118a34d8ce Author: Rob Herring Date: Thu Aug 20 21:53:59 2020 -0600 PCI: dwc: Simplify config space handling The config space is divided in half for type 0 and type 1 accesses, but this is pointless as there's only one iATU window which is reconfigured on each access. The only platform doing something custom is TI Keystone (surprise!). It does its own mapping of the config space to avoid spliting the config space and never actually uses va_cfg1_base as it has its own config space accessors. With the splitting removed, Keystone can use the default mapping of config space. Link: https://lore.kernel.org/r/20200821035420.380495-20-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Murali Karicheri Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Jingoo Han Cc: Gustavo Pimentel commit 0f71c60ffd26943fa9646aa73ad7889ace116ce2 Author: Rob Herring Date: Thu Aug 20 21:53:58 2020 -0600 PCI: dwc: Remove storing of PCI resources The PCI bridge resources are stored in pci_host_bridge.windows, so there's no need to store them in a DWC specific struct. There's also no need to parse the resources and store them a 2nd time as they are mainly used for one time setup of iATU windows. Link: https://lore.kernel.org/r/20200821035420.380495-19-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Murali Karicheri Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Jonathan Chocron Cc: Jingoo Han Cc: Gustavo Pimentel commit 5808d43e7c91b285032cfeb2a5317ea6890b657f Author: Rob Herring Date: Thu Aug 20 21:53:57 2020 -0600 PCI: dwc: Remove root_bus pointer The pci_host_bridge struct already has a pointer to its pci_bus, so let's convert the one user to use the bridge struct and remove the private 'root_bus' pointer. Link: https://lore.kernel.org/r/20200821035420.380495-18-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org commit 1df793054859eaa69d878f7daffc9f1cf9253a5d Author: Rob Herring Date: Thu Aug 20 21:53:56 2020 -0600 PCI: dwc: Convert to use pci_host_probe() Now that there are no more .scan_bus() callbacks, we can remove it and just use pci_host_probe(). Link: https://lore.kernel.org/r/20200821035420.380495-17-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 6ab15b5e7057c5d0de7316f2264c92fb7a28b340 Author: Rob Herring Date: Thu Aug 20 21:53:55 2020 -0600 PCI: dwc: keystone: Convert .scan_bus() callback to use add_bus TI keystone is the only Designware driver using .scan_bus(). This function pointer is the only thing preventing the Designware driver from using pci_host_probe(). Let's use the pci_ops.add_bus hook instead. Link: https://lore.kernel.org/r/20200821035420.380495-16-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Murali Karicheri Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 6e8e104d21962177b26149643e66a8af0099734c Author: Rob Herring Date: Thu Aug 20 21:53:54 2020 -0600 PCI: Also call .add_bus() callback for root bus Similar to pcibios_add_bus(), call pci_ops.add_bus() when the root bus is added. This allows host bridge drivers to do any setup requiring a bus pointer. There are currently no .add_bus() callbacks, so this is safe to do. Link: https://lore.kernel.org/r/20200821035420.380495-15-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Bjorn Helgaas commit c2b0c098fbd15da06f5c6c70ecc9b156fdc0eedd Author: Rob Herring Date: Thu Aug 20 21:53:53 2020 -0600 PCI: dwc: Use generic config accessors Now that all the platforms with custom config access handling define their own pci_ops, let's split the default config accessors to use different pci_ops for root and child buses. With this, we can use the generic config accessors. The child bus accesses mainly require a .map_bus() hook to reconfigure the iATU on each config space access. Link: https://lore.kernel.org/r/20200821035420.380495-14-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 7975c8cc8ed8442973c6264b2192135748c4245b Author: Rob Herring Date: Thu Aug 20 21:53:52 2020 -0600 PCI: dwc: Remove dwc specific config accessor ops Now that all the drivers needing custom config accessors have been converted to define their own pci_ops, we can remove the DWC specific function callbacks {rd,wr}_{own,other}_conf. Link: https://lore.kernel.org/r/20200821035420.380495-13-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit c4a42ee9acfb682c713f610efc57766d833931ba Author: Rob Herring Date: Thu Aug 20 21:53:51 2020 -0600 PCI: dwc: histb: Use pci_ops for root config space accessors Now that DWC drivers can setup their own pci_ops for the root and child buses, convert the HiSilicon histb driver to use the standard pci_ops for root bus config accesses. Link: https://lore.kernel.org/r/20200821035420.380495-12-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Shawn Guo Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 08d2209e798aedde0e0be7e39ed0165a6c77c178 Author: Rob Herring Date: Thu Aug 20 21:53:50 2020 -0600 PCI: dwc: exynos: Use pci_ops for root config space accessors Now that DWC drivers can setup their own pci_ops for the root and child buses, convert the Samsung Exynos driver to use the standard pci_ops for root bus config accesses. Link: https://lore.kernel.org/r/20200821035420.380495-11-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: linux-samsung-soc@vger.kernel.org commit 6408e6a7f9eec6fbd3f75680ad3983c79ccd446d Author: Rob Herring Date: Thu Aug 20 21:53:49 2020 -0600 PCI: dwc: kirin: Use pci_ops for root config space accessors Now that DWC drivers can setup their own pci_ops for the root and child buses, convert the HiSilicon Kirin driver to use the standard pci_ops for root bus config accesses. Link: https://lore.kernel.org/r/20200821035420.380495-10-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Xiaowei Song Cc: Binghui Wang Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit e0ceb8f90b80f88ab6f7bad058e584b305e930d0 Author: Rob Herring Date: Thu Aug 20 21:53:48 2020 -0600 PCI: dwc: meson: Use pci_ops for root config space accessors Now that DWC drivers can setup their own pci_ops for the root and child buses, convert the Amlogic meson driver to use the standard pci_ops for root bus config accesses. Link: https://lore.kernel.org/r/20200821035420.380495-9-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Yue Wang Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Kevin Hilman Cc: linux-amlogic@lists.infradead.org commit 692ccce7f0c57464f1ada8b7ea4a2346b5319bc6 Author: Rob Herring Date: Thu Aug 20 21:53:47 2020 -0600 PCI: dwc: tegra: Use pci_ops for root config space accessors Now that DWC drivers can setup their own pci_ops for the root and child buses, convert the Tegra driver to use the standard pci_ops for root bus config accesses. Link: https://lore.kernel.org/r/20200821035420.380495-8-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org commit 10a797c6e54a5eb9f840e293ee3c2dbf28595bff Author: Rob Herring Date: Thu Aug 20 21:53:46 2020 -0600 PCI: dwc: keystone: Use pci_ops for config space accessors Now that DWC drivers can setup their own pci_ops for the root and child buses, convert the TI Keystone driver to use the standard pci_ops for config accesses. Link: https://lore.kernel.org/r/20200821035420.380495-7-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Murali Karicheri Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit fffbb0ba8e7504291678b5d991416f2d7adc0372 Author: Rob Herring Date: Thu Aug 20 21:53:45 2020 -0600 PCI: dwc: al: Use pci_ops for child config space accessors Now that DWC drivers can setup their own pci_ops for the root and child buses, convert the Amazon driver to use the standard pci_ops for child bus config accesses. Link: https://lore.kernel.org/r/20200821035420.380495-6-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jonathan Chocron Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 27e7ed018113e7b96f13100787ba8c0553a63b81 Author: Rob Herring Date: Thu Aug 20 21:53:44 2020 -0600 PCI: dwc: Add a default pci_ops.map_bus for root port The Designware root port config space is memory mapped accesses via the DBI space by default. Add a common implementation dw_pcie_own_conf_map_bus() for platforms to use. Link: https://lore.kernel.org/r/20200821035420.380495-5-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 5ce78f4456a9b2cb103f5bad9e62636e8d086152 Author: Lars Povlsen Date: Mon Aug 24 22:30:08 2020 +0200 dt-bindings: snps, dw-apb-ssi: Add sparx5 support, plus rx-sample-delay-ns property This has the following changes for the snps,dw-apb-ss DT bindings: - Add "microchip,sparx5-spi" as the compatible for the Sparx5 SoC controller - Add the property "rx-sample-delay-ns" Signed-off-by: Lars Povlsen Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200824203010.2033-5-lars.povlsen@microchip.com Signed-off-by: Mark Brown commit 53a09635ce56e3041fb3cbc7ceef8f5de28259a5 Author: Lars Povlsen Date: Mon Aug 24 22:30:06 2020 +0200 spi: dw: Add Microchip Sparx5 support This adds SPI support for the Sparx5 SoC, which is using the MMIO Designware SPI controller. The Sparx5 differs from the Ocelot version in these areas: * The CS override is controlled by a new set of registers for this purpose. * The Sparx5 SPI controller has the RX sample delay register, and it must be configured for the (SPI NAND) device on SPI2. * The Sparx5 SPI controller has 2 different SPI bus interfaces on the same controller (don't ask...). The "spi-mux" driver should be used in conjunction with the SPI driver to select the appropriate bus. Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20200824203010.2033-3-lars.povlsen@microchip.com Signed-off-by: Mark Brown commit bac70b54ecb53b3d5af862dd4fcbaaad8f34ed23 Author: Lars Povlsen Date: Mon Aug 24 22:30:05 2020 +0200 spi: dw: Add support for RX sample delay register This add support for the RX_SAMPLE_DLY register. If enabled in the Designware IP, it allows tuning of the rx data signal by means of an internal rx sample fifo. The register is controlled by the rx-sample-delay-ns DT property, which is defined per SPI slave as well on controller level. The controller level rx-sample-delay-ns will apply to all slaves without the property explicitly defined. The register is located at offset 0xf0, and if the option is not enabled in the IP, changing the register will have no effect. The register will only be written if any slave defines a nonzero value (after scaling by the clock period). Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20200824203010.2033-2-lars.povlsen@microchip.com Signed-off-by: Mark Brown commit 481f6ccf399b4e3c8ff6d2cc2b7b1a384d86b2ad Author: Cristian Marussi Date: Mon Sep 7 18:46:56 2020 +0100 firmware: arm_scmi: Add SCMI device for system power protocol Add SCMI device for system power protocol by just adding the name "syspower" to the list of supported core protocol devices. Link: https://lore.kernel.org/r/20200907174657.32466-3-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit fc93fe145316dad6186d8eb4b4f49f68b1cba0c3 Author: Christoph Hellwig Date: Thu Sep 3 08:07:01 2020 +0200 block: make QUEUE_SYSFS_BIT_FNS more useful Switch to the naming used by the other entries so that we can use the QUEUE_RW_ENTRY helper. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 3562614705c6f2324f79a959a2cf1ae24d142578 Author: Christoph Hellwig Date: Thu Sep 3 08:07:00 2020 +0200 block: add helper macros for queue sysfs entries Add two helpers macros to avoid boilerplate code for the queue sysfs entries. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit a8803055127afb87640974adedac60435592b86d Author: Cristian Marussi Date: Mon Sep 7 18:46:55 2020 +0100 firmware: arm_scmi: Add system power protocol support Add bare protocol support for SCMI system power protocol as needed by an OSPM agent: basic initialization and SYSTEM_POWER_STATE_NOTIFIER core notification support. No event-handling logic is attached to such notification.. Link: https://lore.kernel.org/r/20200907174657.32466-2-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit bc442e472ca6120e8a763f4e0392fa41786e2883 Merge: e525db7e4b44c 1b839d3e15fd4 Author: Mark Brown Date: Tue Sep 8 15:50:13 2020 +0100 Merge series "ASoC: qcom: common: Parse auxiliary devices from device tree" from Stephan Gerhold : In some cases we need to probe additional audio components that do not appear as part of the DAI links specified in the device tree. Examples for this are auxiliary devices such as analog amplifiers or codecs. The ASoC core provides a way to probe these components by adding them to snd_soc_card->aux_dev. This patch set allows specifying them in the device tree through a new "aux-devs" property. v1: https://lore.kernel.org/linux-arm-msm/20200819091533.2334-1-stephan@gerhold.net/ Changes in v2: - Fix value type in device tree bindings: aux-devs should be array of phandles without any arguments, so change -> Stephan Gerhold (2): ASoC: dt-bindings: qcom: Document "aux-devs" property ASoC: qcom: common: Parse auxiliary devices from device tree .../devicetree/bindings/sound/qcom,apq8016-sbc.txt | 7 +++++++ Documentation/devicetree/bindings/sound/qcom,apq8096.txt | 8 ++++++++ Documentation/devicetree/bindings/sound/qcom,sdm845.txt | 8 ++++++++ sound/soc/qcom/common.c | 4 ++++ 4 files changed, 27 insertions(+) -- 2.28.0 commit e525db7e4b44c5b2b5aac0dad24e23cb58c54d22 Author: Yu Kuai Date: Tue Aug 25 21:02:24 2020 +0800 ASoC: fsl: imx-es8328: add missing put_device() call in imx_es8328_probe() if of_find_device_by_node() succeed, imx_es8328_probe() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 7e7292dba215 ("ASoC: fsl: add imx-es8328 machine driver") Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20200825130224.1488694-1-yukuai3@huawei.com Signed-off-by: Mark Brown commit 1b839d3e15fd48e4278c83190725467713a5b3c6 Author: Stephan Gerhold Date: Wed Aug 26 11:51:41 2020 +0200 ASoC: qcom: common: Parse auxiliary devices from device tree In some cases we need to probe additional audio components that do not appear as part of the DAI links specified in the device tree. Examples for this are auxiliary devices such as analog amplifiers or codecs. The ASoC core provides a way to probe these components by adding them to snd_soc_card->aux_dev. We can use the snd_soc_of_parse_aux_devs() function to parse them from the device tree. As an example for this, some MSM8916 smartphones have an analog speaker amplifier connected to the HPHR output. With the new property this can be modelled as follows: speaker-amp: audio-amplifier { compatible = "simple-audio-amplifier"; enable-gpios = <&msmgpio 114 GPIO_ACTIVE_HIGH>; sound-name-prefix = "Speaker Amp"; }; &sound { aux-devs = <&speaker_amp>; audio-routing = "Speaker Amp IN", "HPHR"; }; Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200826095141.94017-3-stephan@gerhold.net Signed-off-by: Mark Brown commit cdd3b8daf26e5eb2e97b6a37dfdb83597bcbdc52 Author: Stephan Gerhold Date: Wed Aug 26 11:51:40 2020 +0200 ASoC: dt-bindings: qcom: Document "aux-devs" property In some cases we need to probe additional audio components that do not appear as part of the DAI links specified in the device tree. Examples for this are auxiliary devices such as analog amplifiers or codecs. To make them work they need to be added as part of "aux-devs" and connected to some other audio component using the audio routes configurable using "(qcom,)audio-routing". Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200826095141.94017-2-stephan@gerhold.net Signed-off-by: Mark Brown commit b131c96496b369c7b14125e7c50e89ac7cec8051 Author: Jose M. Guisado Gomez Date: Tue Sep 8 13:01:41 2020 +0200 netfilter: nf_tables: add userdata support for nft_object Enables storing userdata for nft_object. Initially this will store an optional comment but can be extended in the future as needed. Adds new attribute NFTA_OBJ_USERDATA to nft_object. Signed-off-by: Jose M. Guisado Gomez Signed-off-by: Pablo Neira Ayuso commit 461aea72af0e3aefff0c428f73c75e6b9ce9fcb5 Author: Ulf Hansson Date: Tue Sep 8 16:02:42 2020 +0200 mmc: Drop COMPILE_TEST Kconfig option for MMC_S3C MMC_S3C isn't ready yet to be built with COMPILE_TEST, hence drop it. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20200908140242.743234-1-ulf.hansson@linaro.org Reviewed-by: Krzysztof Kozlowski commit ece4ceaf2eba1c0da9d6b62bc59a43be6b456548 Author: Davidlohr Bueso Date: Mon Sep 7 13:32:06 2020 -0700 kdb: Use newer api for tasklist scanning This kills using the do_each_thread/while_each_thread combo to iterate all threads and uses for_each_process_thread() instead, maintaining semantics. while_each_thread() is ultimately racy and deprecated; although in this particular case there is no concurrency so it doesn't matter. Still lets trivially get rid of two more users. Acked-by: Oleg Nesterov Signed-off-by: Davidlohr Bueso Link: https://lore.kernel.org/r/20200907203206.21293-1-dave@stgolabs.net Signed-off-by: Daniel Thompson commit b18b099e04f450cdc77bec72acefcde7042bd1f3 Author: Douglas Anderson Date: Tue Jun 30 15:14:38 2020 -0700 kgdb: Make "kgdbcon" work properly with "kgdb_earlycon" On my system the kernel processes the "kgdb_earlycon" parameter before the "kgdbcon" parameter. When we setup "kgdb_earlycon" we'll end up in kgdb_register_callbacks() and "kgdb_use_con" won't have been set yet so we'll never get around to starting "kgdbcon". Let's remedy this by detecting that the IO module was already registered when setting "kgdb_use_con" and registering the console then. As part of this, to avoid pre-declaring things, move the handling of the "kgdbcon" further down in the file. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200630151422.1.I4aa062751ff5e281f5116655c976dff545c09a46@changeid Signed-off-by: Daniel Thompson commit fcdb84cc5b31c2f4e333051f467264f5821bc61a Author: Cengiz Can Date: Tue Jun 30 11:29:23 2020 +0300 kdb: remove unnecessary null check of dbg_io_ops `kdb_msg_write` operates on a global `struct kgdb_io *` called `dbg_io_ops`. It's initialized in `debug_core.c` and checked throughout the debug flow. There's a null check in `kdb_msg_write` which triggers static analyzers and gives the (almost entirely wrong) impression that it can be null. Coverity scanner caught this as CID 1465042. I have removed the unnecessary null check and eliminated false-positive forward null dereference warning. Signed-off-by: Cengiz Can Link: https://lore.kernel.org/r/20200630082922.28672-1-cengiz@kernel.wtf Reviewed-by: Sumit Garg Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Daniel Thompson commit d7e19be60b28a468385db3906b735e080352b7b2 Author: Sibi Sankar Date: Tue Sep 8 16:29:01 2020 +0300 interconnect: qcom: Add EPSS L3 support on SM8250 Add Epoch Subsystem (EPSS) L3 interconnect provider support on SM8250 SoCs. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200801123049.32398-6-sibis@codeaurora.org Signed-off-by: Georgi Djakov commit c4877059e0a4b88b59bc208f2608dc489553cf29 Author: Sibi Sankar Date: Tue Sep 8 16:29:01 2020 +0300 dt-bindings: interconnect: Add EPSS L3 DT binding on SM8250 Add Epoch Subsystem (EPSS) L3 interconnect provider binding on SM8250 SoCs. Signed-off-by: Sibi Sankar Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200801123049.32398-5-sibis@codeaurora.org Signed-off-by: Georgi Djakov commit 2bf706ea930edd2d6c286dcb13dd4afc0f0abd65 Author: Sibi Sankar Date: Tue Sep 8 16:29:01 2020 +0300 interconnect: qcom: Lay the groundwork for adding EPSS support Lay the groundwork for adding Epoch Subsystem (EPSS) L3 support on SM8250. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200801123049.32398-4-sibis@codeaurora.org Signed-off-by: Georgi Djakov commit f995194545ab9010cfbcfd6a5e6d0eaf0164562b Author: Sibi Sankar Date: Sat Aug 1 18:00:44 2020 +0530 interconnect: qcom: Add OSM L3 support on SM8150 Add Operation State Manager (OSM) L3 interconnect provider support on SM8150 SoCs. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200801123049.32398-3-sibis@codeaurora.org Signed-off-by: Georgi Djakov commit 768220bb4169844ccd67964ee57ca76efa3edf3a Author: Sibi Sankar Date: Sat Aug 1 18:00:43 2020 +0530 dt-bindings: interconnect: Add OSM L3 DT binding on SM8150 Add Operation State Manager (OSM) L3 interconnect provider binding on SM8150 SoCs. Signed-off-by: Sibi Sankar Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200801123049.32398-2-sibis@codeaurora.org Signed-off-by: Georgi Djakov commit 5c3aff6d673a131e7f0a6986d802edefa1c7d3c3 Author: Sibi Sankar Date: Thu Sep 3 16:31:33 2020 +0300 interconnect: qcom: sc7180: Replace xlate with xlate_extended Use the qcom_icc_xlate_extended() in order to parse tags, that are specified as an additional arguments to the path endpoints in DT. Signed-off-by: Sibi Sankar Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20200903133134.17201-7-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 6478e0d4d12e271741bf6a271a65d8d08948b112 Author: Georgi Djakov Date: Thu Sep 3 16:31:31 2020 +0300 interconnect: qcom: sdm845: Replace xlate with xlate_extended Use the qcom_icc_xlate_extended() in order to parse tags, that are specified as an additional arguments to the path endpoints in DT. Tested-by: Sibi Sankar Reviewed-by: Sibi Sankar Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20200903133134.17201-5-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 6caa3070fd5955d0e647e8cf3b7a33c73a27e32f Author: Georgi Djakov Date: Thu Sep 3 16:31:30 2020 +0300 interconnect: qcom: Implement xlate_extended() to parse tags Implement a function to parse the arguments of the "interconnects" DT property and populate the interconnect path tags if this information is available. Tested-by: Sibi Sankar Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20200903133134.17201-4-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 9a34e7ad2e123b4ed02a1c579939aadf148683c5 Author: Georgi Djakov Date: Thu Sep 3 16:31:29 2020 +0300 dt-bindings: interconnect: Document the support of optional path tag Let's document that we now support specifying path tag information in the arg cells of the 'interconnects' DT property. This information would be populated when the xlate_extended() callback is used. Specifying the tag in DT will allow the interconnect framework to do the aggregation based on the tag automatically. The users can still use the icc_set_tag() API if/when needed. Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200903133134.17201-3-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 1521e22bfa12db6225002ba3b040572a78dff996 Author: Georgi Djakov Date: Thu Sep 3 16:31:28 2020 +0300 interconnect: Introduce xlate_extended() callback Currently there is the xlate() callback, which is used by providers for mapping the nodes from phandle arguments. That's fine for simple mappings, but the phandle arguments could contain an additional data, such as tag information. Let's create another callback xlate_extended() for the cases where providers want also populate the path tag data. Tested-by: Sibi Sankar Reviewed-by: Sibi Sankar Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20200903133134.17201-2-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit cb30e0292db258a681f3e2334ebfb337c8863482 Author: Mike Tipton Date: Thu Sep 3 12:21:49 2020 -0700 interconnect: qcom: Add support for per-BCM scaling factors Currently, bcm-voter always assumes requests are made in KBps and that BCM HW always wants them in Bps, so it always scales the requests by 1000. However, certain use cases and BCMs may use different units. Thus, add support for BCM-specific scaling factors. Signed-off-by: Mike Tipton Link: https://lore.kernel.org/r/20200903192149.30385-7-mdtipton@codeaurora.org Signed-off-by: Georgi Djakov commit db474be2b6b8fa1b3e2c8eb388f8d1b5cfeae674 Author: Mike Tipton Date: Thu Sep 3 12:21:48 2020 -0700 interconnect: qcom: Only wait for completion in AMC/WAKE by default Change the default TCS wait behavior to only wait for completion in AMC and WAKE. Waiting isn't necessary in the SLEEP TCS, since votes are only being removed in this case. Resources can be safely disabled asynchronously in parallel with the rest of the power collapse sequence. This reduces the sleep entry latency. Signed-off-by: Mike Tipton Link: https://lore.kernel.org/r/20200903192149.30385-6-mdtipton@codeaurora.org Signed-off-by: Georgi Djakov commit b92902fddf42003d4c8e3816e3fbf8caea540440 Author: Mike Tipton Date: Thu Sep 3 12:21:47 2020 -0700 interconnect: qcom: Support bcm-voter-specific TCS wait behavior Currently, all bcm-voters set tcs_cmd::wait=true for the last VCD command in each TCS (AMC, WAKE, and SLEEP). However, some bcm-voters don't need the completion and instead need to optimize for latency. For instance, disabling wait-for-completion in the WAKE set can decrease resume latency and allow for certain operations to occur in parallel with the WAKE TCS triggering. This is only safe in very specific situations. Keep the default behavior of always waiting, but allow it to be overridden in devicetree. Signed-off-by: Mike Tipton Link: https://lore.kernel.org/r/20200903192149.30385-5-mdtipton@codeaurora.org Signed-off-by: Georgi Djakov commit ad4bedfc060c2ef7f9e701bd3292f8de19bc1ea0 Author: Mike Tipton Date: Thu Sep 3 12:21:46 2020 -0700 dt-bindings: interconnect: Add property to set BCM TCS wait behavior Add "qcom,tcs-wait" property to set which TCS should wait for completion when triggering. Signed-off-by: Mike Tipton Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200903192149.30385-4-mdtipton@codeaurora.org Signed-off-by: Georgi Djakov commit 65e0e4d67983dca775fc9ea39f092bc76caa495f Author: Mike Tipton Date: Thu Sep 3 12:21:45 2020 -0700 dt-bindings: interconnect: Add generic qcom bindings Add generic qcom interconnect bindings that are common across platforms. In particular, these include QCOM_ICC_TAG_* macros that clients can use when calling icc_set_tag(). Signed-off-by: Mike Tipton Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200903192149.30385-3-mdtipton@codeaurora.org Signed-off-by: Georgi Djakov commit 6df5b349491ef269147df8127883d9acffde835e Author: Jonathan Marek Date: Mon Jul 27 22:38:04 2020 -0400 interconnect: qcom: Add SM8250 interconnect provider driver Add driver for the Qualcomm interconnect buses found in SM8250 based platforms. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs. Based on SC7180 driver and generated from downstream dts. Signed-off-by: Jonathan Marek Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20200728023811.5607-6-jonathan@marek.ca Signed-off-by: Georgi Djakov commit a09b817c8bad406cd0e301bb8a8dbd5ab1150030 Author: Jonathan Marek Date: Mon Jul 27 22:38:03 2020 -0400 interconnect: qcom: Add SM8150 interconnect provider driver Add driver for the Qualcomm interconnect buses found in SM8150 based platforms. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs. Based on SC7180 driver and generated from downstream dts. Signed-off-by: Jonathan Marek Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20200728023811.5607-5-jonathan@marek.ca Signed-off-by: Georgi Djakov commit cb6ffd717c9ea48f2a4f577bb128a51b3ed33fc3 Author: Jonathan Marek Date: Mon Jul 27 22:38:02 2020 -0400 dt-bindings: interconnect: Add Qualcomm SM8250 DT bindings The Qualcomm SM8250 platform has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand. Signed-off-by: Jonathan Marek Reviewed-by: Rob Herring Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20200728023811.5607-4-jonathan@marek.ca Signed-off-by: Georgi Djakov commit 3fe3578c8a3e18d809ad4541ff708918509e89dd Author: Jonathan Marek Date: Mon Jul 27 22:38:01 2020 -0400 dt-bindings: interconnect: Add Qualcomm SM8150 DT bindings The Qualcomm SM8150 platform has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand. Signed-off-by: Jonathan Marek Reviewed-by: Rob Herring Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20200728023811.5607-3-jonathan@marek.ca Signed-off-by: Georgi Djakov commit 3c733a75fd6c0956273f384c4769680a5c8fb467 Author: Jonathan Marek Date: Mon Jul 27 22:38:00 2020 -0400 dt-bindings: interconnect: single yaml file for RPMh interconnect drivers These two bindings are almost identical, so combine them into one. This will make it easier to add the sm8150 and sm8250 interconnect bindings. Signed-off-by: Jonathan Marek Reviewed-by: Sibi Sankar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200728023811.5607-2-jonathan@marek.ca Signed-off-by: Georgi Djakov commit b41b0ce5982693e27307cfe0aaf49bc8e3a20900 Author: Georgi Djakov Date: Wed Jul 29 15:34:39 2020 +0300 interconnect: Add bulk API helpers There are drivers which just need to get multiple interconnect paths, request some predefined amounts of bandwidth and then just toggle the paths between enabled/disabled state. The aim of this patch is simplify the above and to allow drivers to put all the path names and bandwidth data into a single static icc_bulk_data table and call the icc_bulk_* functions on that table in order to scale all the interconnect paths in parallel. Suggested-by: Evan Green Suggested-by: Bjorn Andersson Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200729123439.9961-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit dc462267d2d7aacffc3c1d99b02d7a7c59db7c66 Author: Nicholas Piggin Date: Tue Aug 25 17:55:35 2020 +1000 powerpc/64s: handle ISA v3.1 local copy-paste context switches The ISA v3.1 the copy-paste facility has a new memory move functionality which allows the copy buffer to be pasted to domestic memory (RAM) as opposed to foreign memory (accelerator). This means the POWER9 trick of avoiding the cp_abort on context switch if the process had not mapped foreign memory does not work on POWER10. Do the cp_abort unconditionally there. KVM must also cp_abort on guest exit to prevent copy buffer state leaking between contexts. Signed-off-by: Nicholas Piggin Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200825075535.224536-1-npiggin@gmail.com commit a02f6d42357acf6e5de6ffc728e6e77faf3ad217 Author: Joel Stanley Date: Wed Sep 2 09:30:11 2020 +0930 powerpc: Warn about use of smt_snooze_delay It's not done anything for a long time. Save the percpu variable, and emit a warning to remind users to not expect it to do anything. This uses pr_warn_once instead of pr_warn_ratelimit as testing 'ppc64_cpu --smt=off' on a 24 core / 4 SMT system showed the warning to be noisy, as the online/offline loop is slow. Fixes: 3fa8cad82b94 ("powerpc/pseries/cpuidle: smt-snooze-delay cleanup.") Cc: stable@vger.kernel.org # v3.14 Signed-off-by: Joel Stanley Acked-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200902000012.3440389-1-joel@jms.id.au commit 8f55984f530d7275531e17f36ea29229c2c410dd Author: Joel Stanley Date: Thu Aug 1 14:46:30 2019 +0930 powerpc/powernv: Print helpful message when cores guarded Often the firmware will guard out cores after a crash. This often undesirable, and is not immediately noticeable. This adds an informative message when a CPU device tree nodes are marked bad in the device tree. Signed-off-by: Joel Stanley [mpe: Use an eye-catcher that's less likely to get us in trouble] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190801051630.5804-1-joel@jms.id.au commit 8c0d51592f6f0123953633d1ecf21e843fce0bfd Author: Leonardo Bras Date: Wed Aug 5 00:04:55 2020 -0300 powerpc/pseries/iommu: Allow bigger 64bit window by removing default DMA window On LoPAR "DMA Window Manipulation Calls", it's recommended to remove the default DMA window for the device, before attempting to configure a DDW, in order to make the maximum resources available for the next DDW to be created. This is a requirement for using DDW on devices in which hypervisor allows only one DMA window. If setting up a new DDW fails anywhere after the removal of this default DMA window, it's needed to restore the default DMA window. For this, an implementation of ibm,reset-pe-dma-windows rtas call is needed: Platforms supporting the DDW option starting with LoPAR level 2.7 implement ibm,ddw-extensions. The first extension available (index 2) carries the token for ibm,reset-pe-dma-windows rtas call, which is used to restore the default DMA window for a device, if it has been deleted. It does so by resetting the TCE table allocation for the PE to it's boot time value, available in "ibm,dma-window" device tree node. Signed-off-by: Leonardo Bras Tested-by: David Dai Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200805030455.123024-5-leobras.c@gmail.com commit 74d0b3994e147a2b503170b5e02f1d07dc086586 Author: Leonardo Bras Date: Wed Aug 5 00:04:54 2020 -0300 powerpc/pseries/iommu: Move window-removing part of remove_ddw into remove_dma_window Move the window-removing part of remove_ddw into a new function (remove_dma_window), so it can be used to remove other DMA windows. It's useful for removing DMA windows that don't create DIRECT64_PROPNAME property, like the default DMA window from the device, which uses "ibm,dma-window". Signed-off-by: Leonardo Bras Tested-by: David Dai Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200805030455.123024-4-leobras.c@gmail.com commit 80f0251231131d164eddab78d2b6c1b8e37d0093 Author: Leonardo Bras Date: Wed Aug 5 00:04:53 2020 -0300 powerpc/pseries/iommu: Update call to ibm, query-pe-dma-windows >From LoPAR level 2.8, "ibm,ddw-extensions" index 3 can make the number of outputs from "ibm,query-pe-dma-windows" go from 5 to 6. This change of output size is meant to expand the address size of largest_available_block PE TCE from 32-bit to 64-bit, which ends up shifting page_size and migration_capable. This ends up requiring the update of ddw_query_response->largest_available_block from u32 to u64, and manually assigning the values from the buffer into this struct, according to output size. Also, a routine was created for helping reading the ddw extensions as suggested by LoPAR: First reading the size of the extension array from index 0, checking if the property exists, and then returning it's value. Signed-off-by: Leonardo Bras Tested-by: David Dai Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200805030455.123024-3-leobras.c@gmail.com commit cac3e629086f1b2e31c87a6c9b0130d29843ae86 Author: Leonardo Bras Date: Wed Aug 5 00:04:52 2020 -0300 powerpc/pseries/iommu: Create defines for operations in ibm, ddw-applicable Create defines to help handling ibm,ddw-applicable values, avoiding confusion about the index of given operations. Signed-off-by: Leonardo Bras Tested-by: David Dai Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200805030455.123024-2-leobras.c@gmail.com commit 51a1588154cb1ddc4fe8fa786324dca398f1a458 Author: Jordan Niethe Date: Thu Aug 27 14:05:56 2020 +1000 powerpc: Update documentation of ISA versions for Power10 Update the CPU to ISA Version Mapping document to include Power10 and ISA v3.1. Signed-off-by: Jordan Niethe [mpe: Make sure ISA reference is unique] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200827040556.1783-1-jniethe5@gmail.com commit 0fb4871bcc8997acbb8edf14b301fc150101d6c0 Author: Russell Currey Date: Fri Aug 28 12:05:42 2020 +1000 powerpc/tools: Remove 90 line limit in checkpatch script As of commit bdc48fa11e46, scripts/checkpatch.pl now has a default line length warning of 100 characters. The powerpc wrapper script was using a length of 90 instead of 80 in order to make checkpatch less restrictive, but now it's making it more restrictive instead. I think it makes sense to just use the default value now. Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200828020542.393022-1-ruscur@russell.cc commit 6835302853169441069e11bc4642300c22009c2e Author: Tzung-Bi Shih Date: Tue Sep 8 15:00:44 2020 +0800 ASoC: mt6359: fix failed to parse DT properties Mt6359 platform device is instantiated by mfd_add_devices(). In the case, dev->of_node is NULL so that mt6359_parse_dt() always fails to parse the desired DT properties. Gets the DT properties via dev->parent->of_node. Fixes: 8061734ab654 ("ASoC: mediatek: mt6359: add codec driver") Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200908070044.1142644-1-tzungbi@google.com Signed-off-by: Mark Brown commit 783560d02dd61aee20d1d00c1c061bcafea30264 Author: Dharageswari R Date: Tue Sep 8 12:28:25 2020 +0300 ASoC: SOF: Implement snd_sof_bytes_ext_volatile_get kcontrol IO This patch implements the snd_sof_bytes_ext_volatile_get() to read the actual parameters from DSP by sending the SOF_IPC_COMP_GET_DATA IPC for the kcontrol of type SOF_TPLG_KCTL_BYTES_VOLATILE_RO. Signed-off-by: Dharageswari R Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200908092825.1813847-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 819b9f6002391925b53817ed96638bd40bd1d34f Author: Dharageswari R Date: Tue Sep 8 12:28:24 2020 +0300 ASoC: topology: Add support for WO and RO TLV byte kcontrols This patch adds support for write-only and read-only TLV byte kcontrols by checking for appropriate get/put IO handlers. Signed-off-by: Dharageswari R Reviewed-by: Guennadi Liakhovetski Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200908092825.1813847-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 34ce41003bcbff8b20a30eb0938478b156e57a2d Author: Peter Ujfalusi Date: Tue Sep 8 14:32:04 2020 +0300 ASoC: ti: Kconfig: Allow the j721e machine driver to be used on K3 platform The initial machine driver supports only j721e-cpb and the ivi addon, but other EVMs for different K3 SoC can have similar audio setup which can be supported by the driver with small or no modification. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200908113204.12012-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit db96221a683342fd4775fd820a4d5376cd2f2ed0 Author: Jordan Niethe Date: Mon Aug 24 23:12:31 2020 +1000 selftests/powerpc: Fix prefixes in alignment_handler signal handler The signal handler in the alignment handler self test has the ability to jump over the instruction that triggered the signal. It does this by incrementing the PT_NIP in the user context by 4. If it were a prefixed instruction this will mean that the suffix is then executed which is incorrect. Instead check if the major opcode indicates a prefixed instruction (e.g. it is 1) and if so increment PT_NIP by 8. If ISA v3.1 is not available treat it as a word instruction even if the major opcode is 1. Fixes: 620a6473df36 ("selftests/powerpc: Add prefixed loads/stores to alignment_handler test") Signed-off-by: Jordan Niethe [mpe: Fix 32-bit build, rename haveprefixes to prefixes_enabled] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200824131231.14008-1-jniethe5@gmail.com commit 364b236a0b6e86439b9025d961da8602db23d5bf Author: Jordan Niethe Date: Tue Aug 25 13:51:47 2020 +1000 powerpc/boot: Update Makefile comment for 64bit wrapper As of commit 147c05168fc8 ("powerpc/boot: Add support for 64bit little endian wrapper") the comment in the Makefile is misleading. The wrapper packaging 64bit kernel may built as a 32 or 64 bit elf. Update the comment to reflect this. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200825035147.3239-1-jniethe5@gmail.com commit 529d2bd56ada4b8a4904909042792879868208cd Author: Michael Ellerman Date: Wed Aug 19 11:57:04 2020 +1000 powerpc/64: Remove unused generic_secondary_thread_init() The last caller was removed in 2014 in commit fb5a515704d7 ("powerpc: Remove platforms/wsp and associated pieces"). As Jordan noticed even though there are no callers, the code above in fsl_secondary_thread_init() falls through into generic_secondary_thread_init(). So we can remove the _GLOBAL but not the body of the function. However because fsl_secondary_thread_init() is inside #ifdef CONFIG_PPC_BOOK3E, we can never reach the body of generic_secondary_thread_init() unless CONFIG_PPC_BOOK3E is enabled, so we can wrap the whole thing in a single #ifdef. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015704.1976364-1-mpe@ellerman.id.au commit 003d6f5fd2cc3b529f3e6c529bc4bb0792930212 Author: Michael Ellerman Date: Wed Aug 19 11:57:27 2020 +1000 selftests/powerpc: Properly handle failure in switch_endian_test On older CPUs the switch_endian() syscall doesn't work. Currently that causes the switch_endian_test to just crash. Instead detect the failure and properly exit with a failure message. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015727.1977134-9-mpe@ellerman.id.au commit 09275d717d1b2d7d5ed91f2140bb34246514a1b4 Author: Michael Ellerman Date: Wed Aug 19 11:57:26 2020 +1000 selftests/powerpc: Don't touch VMX/VSX on older CPUs If we're running on a CPU without VMX/VSX then don't touch them. This is fragile, the compiler could spill a VMX/VSX register and break the test anyway. But in practice it seems to work, ie. the test runs to completion on a system without VSX with this change. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015727.1977134-8-mpe@ellerman.id.au commit 4871a10b7b5f6b0632bff229884dad1cb1e8dc37 Author: Michael Ellerman Date: Wed Aug 19 11:57:25 2020 +1000 selftests/powerpc: Skip L3 bank test on older CPUs This is a test of specific piece of logic in isa207-common.c, which is only used on Power8 or later. So skip it on older CPUs. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015727.1977134-7-mpe@ellerman.id.au commit 3a31518a242dcb262b008d3bb5d4b1cf50cf4026 Author: Michael Ellerman Date: Wed Aug 19 11:57:24 2020 +1000 selftests/powerpc: Skip security tests on older CPUs Both these tests use PMU events that only work on newer CPUs, so skip them on older CPUs. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015727.1977134-6-mpe@ellerman.id.au commit 4c3c3c502575556c4bc1b401235e641863b1bce6 Author: Michael Ellerman Date: Wed Aug 19 11:57:23 2020 +1000 selftests/powerpc: Don't run DSCR tests on old systems The DSCR tests fail on systems that don't have DSCR, so check for the DSCR in hwcap and skip if it's not present. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015727.1977134-5-mpe@ellerman.id.au commit 178282a054dced1a08a9683d41ac08cbace2b2fe Author: Michael Ellerman Date: Wed Aug 19 11:57:22 2020 +1000 selftests/powerpc: Include asm/cputable.h from utils.h utils.h provides have_hwcap() and have_hwcap2() which check for a feature bit. Those bits are defined in asm/cputable.h, so include it in utils.h so users of utils.h don't have to do it manually. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015727.1977134-4-mpe@ellerman.id.au commit d89002397cfb2b65267d6688fe671ee1cf7c5f0d Author: Michael Ellerman Date: Wed Aug 19 11:57:21 2020 +1000 selftests/powerpc: Move set_dscr() into rfi_flush.c This version of set_dscr() was added for the RFI flush test, and is fairly specific to it. It also clashes with the version of set_dscr() in dscr/dscr.h. So move it into the RFI flush test where it's used. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015727.1977134-3-mpe@ellerman.id.au commit 17c98a541dc9bb1162877af41cddbdca043f9a59 Author: Michael Ellerman Date: Wed Aug 19 11:57:20 2020 +1000 selftests/powerpc: Give the bad_accesses test longer to run On older systems this test takes longer to run (duh), give it five minutes which is long enough on a G5 970FX @ 1.6GHz. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015727.1977134-2-mpe@ellerman.id.au commit 34c103342be3f9397e656da7c5cc86e97b91f514 Author: Michael Ellerman Date: Wed Aug 19 11:57:19 2020 +1000 selftests/powerpc: Make using_hash_mmu() work on Cell & PowerMac These platforms don't show the MMU in /proc/cpuinfo, but they always use hash, so teach using_hash_mmu() that. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819015727.1977134-1-mpe@ellerman.id.au commit b5a646a681f5d67ea5190a71d6e84a91efe63b7a Author: Michael Ellerman Date: Thu Aug 13 11:34:45 2020 +1000 selftests/powerpc: Run tm-tmspr test for longer This test creates some threads, which write to TM SPRs, and then makes sure the registers maintain the correct values across context switches and contention with other threads. But currently the test finishes almost instantaneously, which reduces the chance of it hitting an interesting condition. So increase the number of loops, so it runs a bit longer, though still less than 2s on a Power8. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200813013445.686464-3-mpe@ellerman.id.au commit 769628710c33b18ede837bb488e1d24084b35592 Author: Michael Ellerman Date: Thu Aug 13 11:34:44 2020 +1000 selftests/powerpc: Don't use setaffinity in tm-tmspr This test tries to set affinity to CPUs that don't exist, especially if the set of online CPUs doesn't start at 0. But there's no real reason for it to use setaffinity in the first place, it's just trying to create lots of threads to cause contention. So drop the setaffinity entirely. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200813013445.686464-2-mpe@ellerman.id.au commit c0176429b7b07893a5c1fd38baff055c919ba9e3 Author: Michael Ellerman Date: Thu Aug 13 11:34:43 2020 +1000 selftests/powerpc: Fix TM tests when CPU 0 is offline Several of the TM tests fail spuriously if CPU 0 is offline, because they blindly try to affinitise to CPU 0. Fix them by picking any online CPU and using that instead. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200813013445.686464-1-mpe@ellerman.id.au commit 10bf59d923c2766ec8d6f0243481c865c7db9979 Author: Oliver O'Halloran Date: Tue Aug 18 14:45:57 2020 +1000 powerpc/pseries/eeh: Fix dumb linebreaks These annoy me every time I see them. Why are they here? They're not even needed for 80cols compliance. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200818044557.135497-1-oohall@gmail.com commit 353bce211e00d183344f464ba1ee0e1ffb0e2a6c Author: Christophe Leroy Date: Mon Aug 17 05:46:39 2020 +0000 powerpc/process: Remove unnecessary #ifdef CONFIG_FUNCTION_GRAPH_TRACER ftrace_graph_ret_addr() is always defined and returns 'ip' when CONFIG_FUNCTION GRAPH_TRACER is not set. So the #ifdef is not needed, remove it. Signed-off-by: Christophe Leroy Acked-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9d11143d4e27ba8274369a926968756917584868.1597643153.git.christophe.leroy@csgroup.eu commit 2f279eeb68b8eda43a95255db701b4faaeedbe0f Author: Christophe Leroy Date: Wed Aug 12 12:25:17 2020 +0000 powerpc/uaccess: Add pre-update addressing to __get_user_asm() and __put_user_asm() Enable pre-update addressing mode in __get_user_asm() and __put_user_asm() Signed-off-by: Christophe Leroy Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/13041c7df39e89ddf574ea0cdc6dedfdd9734140.1597235091.git.christophe.leroy@csgroup.eu commit de394e7568ce2cdb4643ed230169f484f25f9442 Author: peterz@infradead.org Date: Tue Sep 8 12:57:43 2020 +0200 tracepoint: Fix overly long tracepoint names Stephen Rothwell reported: > Exported symbols need to be <= (64 - sizeof(Elf_Addr)) long. This is > presumably 56 on 64 bit arches and the above symbol (including the '.') > is 56 characters long. Shorten the tracepoint symbol name. Fixes: d25e37d89dd2 ("tracepoint: Optimize using static_call()") Reported-by: Stephen Rothwell Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200908105743.GW2674@hirez.programming.kicks-ass.net commit 8e0bd31dad0665d8b942cb05495abb5ec931fde0 Author: Vaibhav Gupta Date: Mon Sep 7 12:32:21 2020 +0530 fbdev: radeonfb: use generic power management Drivers using legacy PCI power management .suspend()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions, as through the generic framework PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Benjamin Herrenschmidt Cc: Thierry Reding Cc: Thierry Reding Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200907070221.29938-3-vaibhavgupta40@gmail.com commit 8c2bb49f38c94063a739da1758364645e5cd53e1 Author: Vaibhav Gupta Date: Mon Sep 7 12:32:20 2020 +0530 video: fbdev: aty: radeon_pm: remove redundant CONFIG_PM container Fixes commit 42ddb453a0cd ("radeon: Conditionally compile PM code") Before the above mentioned patch, codes between the line number 547 and 2803 were already inside "#ifdef CONFIG_PM" container. Thus, addition of "#if defined(CONFIG_PM)" was not required in the patch. It also affected the "#ifdef CONFIG_PPC_OF" container (line 1943-2510). From the current snapshot of radeon_pm.c, remove: 1434 | #if defined(CONFIG_PM) and, 2213 | #endif This removes the redundant CONFIG_PM directive as well as fixes the CONFIG_PPC (earlier CONFIG_PPC_OF) container. Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Benjamin Herrenschmidt Cc: Thierry Reding Cc: Thierry Reding Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200907070221.29938-2-vaibhavgupta40@gmail.com commit 5c15291223949763c13f8c79279dc9700069a2bc Author: Mike Rapoport Date: Sun Aug 30 14:55:24 2020 +0300 fbdev: remove mbx framebuffer driver The only in-tree user for mbx driver for Intel 2700G graphics chip was cm-x270 platform. Since this platform was removed by the commit 9d3239147d6d ("ARM: pxa: remove Compulab pxa2xx boards") there is no point to keep the obsolete framebuffer driver. Signed-off-by: Mike Rapoport Cc: Jonathan Corbet Cc: Arnd Bergmann Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200830115524.431278-1-rppt@kernel.org commit 28657c307160234f37f3182c6f3ddd7e22ebf1fc Author: Jason Yan Date: Thu Aug 27 21:00:28 2020 +0800 video: fbdev: kyro: remove set but not used 'ulCoreClock' This addresses the following gcc warning with "make W=1": drivers/video/fbdev/kyro/STG4000InitDevice.c: In function ‘SetCoreClockPLL’: drivers/video/fbdev/kyro/STG4000InitDevice.c:247:6: warning: variable ‘ulCoreClock’ set but not used [-Wunused-but-set-variable] // yanaijie fixed 247 | u32 ulCoreClock; | ^~~~~~~~~~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan [b.zolnierkie: minor patch summary fixup] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200827130028.428893-1-yanaijie@huawei.com commit 1c46f4e44af937c8dd8cd068ed1241553b47778b Author: Jason Yan Date: Thu Aug 27 21:00:08 2020 +0800 video: fbdev: kyro: remove set but not used 'ulBestVCO' This addresses the following gcc warning with "make W=1": drivers/video/fbdev/kyro/STG4000InitDevice.c: In function ‘ProgramClock’: drivers/video/fbdev/kyro/STG4000InitDevice.c:123:6: warning: variable ‘ulBestVCO’ set but not used [-Wunused-but-set-variable] 123 | u32 ulBestVCO = 0, ulBestClk = 0, ulBestScore = 0; | ^~~~~~~~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan [b.zolnierkie: minor patch summary fixup] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200827130008.428706-1-yanaijie@huawei.com commit 6bfea83eec8e266ffe0da90037c17bca5e698eb4 Author: kernel test robot Date: Wed Aug 26 22:54:05 2020 +0200 video: fbdev: udlfb: fix kobj_to_dev.cocci warnings Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci Cc: Denis Efremov Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Cc: Bernie Thompson [b.zolnierkie: minor patch summary fixup] [b.zolnierkie: removed "Fixes:" tag (not in upstream tree)] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/alpine.DEB.2.22.394.2008262252270.2522@hadrien commit fe6c6a4af2be8c15bac77f7ea160f947c04840d1 Author: Dinghao Liu Date: Tue Aug 25 14:29:00 2020 +0800 video: fbdev: radeon: Fix memleak in radeonfb_pci_register When radeon_kick_out_firmware_fb() fails, info should be freed just like the subsequent error paths. Fixes: 069ee21a82344 ("fbdev: Fix loading of module radeonfb on PowerMac") Signed-off-by: Dinghao Liu Reviewed-by: Mathieu Malaterre Cc: Kangjie Lu Cc: Benjamin Herrenschmidt Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200825062900.11210-1-dinghao.liu@zju.edu.cn commit 925896486522e5f3f9cac1ea5c3a659247cca223 Author: Joe Perches Date: Mon Aug 24 21:56:19 2020 -0700 video: fbdev: tgafb: Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Cc: Jiri Kosina [b.zolnierkie: minor patch summary fixup] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/ <3e56046e67e583ac93030297ff6d58c08ca54086.1598331149.git.joe@perches.com commit 3f614236406f4642306b59a5659760ebf0ce9087 Author: Alex Dewar Date: Mon Aug 24 18:44:03 2020 +0100 video: fbdev: sstfb: replace spurious snprintf() with sprintf() par->vgapass is a u8, so if we are assuming that buf is at least PAGE_SIZE then the extra checking is pointless. Signed-off-by: Alex Dewar Cc: Daniel Vetter Cc: Jani Nikula Cc: Arnd Bergmann [b.zolnierkie: minor patch summary fixup] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200824174407.429817-1-alex.dewar90@gmail.com commit 3f9dfc2a0ea9f8f34229d43e3a171c8aaf1dcaf4 Author: Bilal Wasim Date: Mon Aug 24 19:51:55 2020 +0500 docs: fb: Correcting the location of FRAMEBUFFER_CONSOLE option. fbcon doc mentions FRAMEBUFFER_CONSOLE option to be under Device Drivers->Graphics Support->Frame buffer Devices-> Console display driver support->Framebuffer Console Support, while its under Device Drivers->Graphics Support-> Console display driver support->Framebuffer Console Support. Correcting it in the docs. Signed-off-by: Bilal Wasim Cc: Jonathan Corbet Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200824145155.42502-1-bilalwasim676@gmail.com commit e2028c8e6bf9a12dfe83fc12ce6d5d9ab1628b0b Author: Sven Schneider Date: Thu Aug 20 10:21:37 2020 +0200 lib/fonts: add font 6x8 for OLED display This font is derived from lib/fonts/font_6x10.c and is useful for small OLED displays Signed-off-by: Sven Schneider Signed-off-by: Sascha Hauer Reviewed-by: Greg Kroah-Hartman Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200820082137.5907-1-s.hauer@pengutronix.de commit a91df118990083a47ab644f8ef63f17eeae4b1ad Author: Vaibhav Gupta Date: Thu Aug 20 00:26:54 2020 +0530 fbdev: arkfb: use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. The ark_pci_suspend() is not designed to function in the case of Freeze. Thus, the code checked for "if (state.event == PM_EVENT_FREEZE....)". This is because, in the legacy framework, this callback was invoked even in the event of Freeze. Hence, added the load of unnecessary function-call. The goal can be achieved by binding the callback with only ".suspend" and ".poweroff" in the "ark_pci_pm_ops" const variable. This also avoids the step of checking "state.event == PM_EVENT_FREEZE" every time the callback is invoked. Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-13-vaibhavgupta40@gmail.com commit fb6e2db899e7483a5fb47a94cf03bd6d03e8bbe6 Author: Vaibhav Gupta Date: Thu Aug 20 00:26:53 2020 +0530 fbdev: s3fb: use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. The s3_pci_suspend() is not designed to function in the case of Freeze. Thus, the code checked for "if (state.event == PM_EVENT_FREEZE....)". This is because, in the legacy framework, this callback was invoked even in the event of Freeze. Hence, added the load of unnecessary function-call. The goal can be achieved by binding the callback with only ".suspend" and ".poweroff" in the "s3_pci_pm_ops" const variable. This also avoids the step of checking "state.event == PM_EVENT_FREEZE" every time the callback is invoked. Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-12-vaibhavgupta40@gmail.com commit 59d026b10a3dcd2edb5f77b6f74a119b72615270 Author: Vaibhav Gupta Date: Thu Aug 20 00:26:52 2020 +0530 fbdev: vt8623fb: use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. The vt8623_pci_suspend() is not designed to function in the case of Freeze. Thus, the code checked for "if (state.event == PM_EVENT_FREEZE....)". This is because, in the legacy framework, this callback was invoked even in the event of Freeze. Hence, added the load of unnecessary function-call. The goal can be achieved by binding the callback with only ".suspend" and ".poweroff" in the "vt8623_pci_pm_ops" const variable. This also avoids the step of checking "state.event == PM_EVENT_FREEZE" every time the callback is invoked. Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-11-vaibhavgupta40@gmail.com commit 805a5c45ff2d51c36e90c675cd751c17632bd502 Author: Vaibhav Gupta Date: Thu Aug 20 00:26:51 2020 +0530 fbdev: i740fb: use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. The i740fb_suspend() is not designed to function in the case of Freeze. Thus, the code checked for "if (state.event == PM_EVENT_FREEZE....)". This is because, in the legacy framework, this callback was invoked even in the event of Freeze. Hence, added the load of unnecessary function-call. The goal can be achieved by binding the callback with only ".suspend" and ".poweroff" in the "i740fb_pm_ops" const variable. This also avoids the step of checking "if (state.event == PM_EVENT_FREEZE....)" every time the callback is invoked. Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-10-vaibhavgupta40@gmail.com commit c62c0f575230ae1494852b0c17740520b3327464 Author: Vaibhav Gupta Date: Thu Aug 20 00:26:50 2020 +0530 fbdev: cyber2000fb: use generic power management Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. This way we can remove the legacy .suspend & .resume bindings from "lxfb_driver". Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-9-vaibhavgupta40@gmail.com commit a4ba7df57e56496349ed84f00310468ae97aea7b Author: Vaibhav Gupta Date: Thu Aug 20 00:26:49 2020 +0530 fbdev: savagefb: use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Now, - savagefb_suspend() had a "pm_message_t" type parameter as per legacy PCI PM framework that got deprecated in generic. - Rename the callback as savagefb_suspend_late() and preserve the parameter. - Define 3 new callbacks as: * savagefb_suspend() * savagefb_freeze() * savagefb_hibernate() which in turn call savagefb_suspend_late() by passing appropriate value for "pm_message_t" type parameter. - Bind the callbacks in "struct dev_pm_ops" type variable "savagefb_pm_ops". Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-8-vaibhavgupta40@gmail.com commit 6d111187588cddc4d0fd84007756f396cdb2de85 Author: Vaibhav Gupta Date: Thu Aug 20 00:26:48 2020 +0530 fbdev: nvidia: use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Now, - nvidiafb_suspend() had a "pm_message_t" type parameter as per legacy PCI PM framework that got deprecated in generic. - Rename the callback as nvidiafb_suspend_late() and preserve the parameter. - Define 3 new callbacks as: * nvidiafb_suspend() * nvidiafb_freeze() * nvidiafb_hibernate() which in turn call nvidiafb_suspend_late() by passing appropriate value for "pm_message_t" type parameter. - Bind the callbacks in "struct dev_pm_ops" type variable "nvidiafb_pm_ops". Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-7-vaibhavgupta40@gmail.com commit c1a477767137bc7023b95eb6caf0d9eb25072ea3 Author: Vaibhav Gupta Date: Thu Aug 20 00:26:47 2020 +0530 fbdev: aty128fb: use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Now, - aty128_pci_suspend() had a "pm_message_t" type parameter as per legacy PCI PM framework that got deprecated in generic. - Rename the callback as aty128_pci_suspend_late() and preserve the parameter. - Define 3 new callbacks as: * aty128_pci_suspend() * aty128_pci_freeze() * aty128_pci_hibernate() which in turn call aty128_pci_suspend_late() by passing appropriate value for "pm_message_t" type parameter. - Bind the callbacks in "struct dev_pm_ops" type variable "aty128_pci_pm_ops". Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-6-vaibhavgupta40@gmail.com commit 348b2956d5e6d9876b567226184de598d00c9bd1 Author: Vaibhav Gupta Date: Thu Aug 20 00:26:46 2020 +0530 fbdev: aty: use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Now, - atyfb_pci_suspend() had a "pm_message_t" type parameter as per legacy PCI PM framework, that got deprecated in generic. - Rename the callback as atyfb_pci_suspend_late() and preserve the parameter. - Define 3 new callbacks as: * atyfb_pci_suspend() * atyfb_pci_freeze() * atyfb_pci_hibernate() which in turn call atyfb_pci_suspend_late() by passing appropriate value for "pm_message_t" type parameter. - Bind the callbacks in "struct dev_pm_ops" type variable "atyfb_pci_pm_ops". Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-5-vaibhavgupta40@gmail.com commit ab5fe88aef4b4837bc2f92fc9f6f9c9b75ef633b Author: Vaibhav Gupta Date: Thu Aug 20 00:26:45 2020 +0530 fbdev: via-core: use generic power management Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. The via_suspend() is designed to function only in the case of Suspend. Thus, the code checked for "if (state.event != PM_EVENT_SUSPEND)". This is because, in the legacy framework, this callback was invoked even in the event of Freeze and Hibernate. Hence, added the load of unnecessary function-calls. The goal can be achieved by binding the callback with only "via_pm_ops.suspend" in the new framework. This also avoids the step of checking "if (state.event != PM_EVENT_SUSPEND)" every time the callback is invoked. Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-4-vaibhavgupta40@gmail.com commit df7a9ec3bc12c6464491d3bee0e7983f48bc04e4 Author: Vaibhav Gupta Date: Thu Aug 20 00:26:44 2020 +0530 fbdev: lxfb: use generic power management Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. This way we can remove the legacy .suspend & .resume bindings from "lxfb_driver". The lxfb_suspend() is designed to function only in the case of Suspend. Thus, the code was kept inside "if (state.event == PM_EVENT_SUSPEND)" container. This is because, in the legacy framework, this callback was invoked even in the event of Freeze and Hibernate. Hence, added the load of unnecessary function-calls. The goal can be achieved by binding the callback with only "lxfb_pm_ops.suspend" in the new framework. This also avoids the step of checking "if (state.event == PM_EVENT_SUSPEND)" every time the callback is invoked. Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-3-vaibhavgupta40@gmail.com commit fa41f2877429646ce062a034a6d5bfc4f8f04b8c Author: Vaibhav Gupta Date: Thu Aug 20 00:26:43 2020 +0530 fbdev: gxfb: use generic power management Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. This way we can remove the legacy .suspend & .resume bindings from "gxfb_driver". The gxfb_suspend() is designed to function only in the case of Suspend. Thus, the code was kept inside "if (state.event == PM_EVENT_SUSPEND)" container. This is because, in the legacy framework, this callback was invoked even in the event of Freeze and Hibernate. Hence, added the load of unnecessary function-calls. The goal can be achieved by binding the callback with only "gxfb_pm_ops.suspend" in the new framework. This also avoids the step of checking "if (state.event == PM_EVENT_SUSPEND)" every time the callback is invoked. Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-2-vaibhavgupta40@gmail.com commit ad6f93e9cd56f0b10e9b22e3e137d17a1a035242 Author: Tom Rix Date: Wed Aug 5 07:52:08 2020 -0700 video: fbdev: sis: fix null ptr dereference Clang static analysis reports this representative error init.c:2501:18: warning: Array access (from variable 'queuedata') results in a null pointer dereference templ |= ((queuedata[i] & 0xc0) << 3); This is the problem block of code if(ModeNo > 0x13) { ... if(SiS_Pr->ChipType == SIS_730) { queuedata = &FQBQData730[0]; } else { queuedata = &FQBQData[0]; } } else { } queuedata is not set in the else block Reviewing the old code, the arrays FQBQData730 and FQBQData were used directly. So hoist the setting of queuedata out of the if-else block. Fixes: 544393fe584d ("[PATCH] sisfb update") Signed-off-by: Tom Rix Cc: Thomas Winischhofer Cc: Andrew Morton Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200805145208.17727-1-trix@redhat.com commit fe2ab107536d808ad0c8ddce3e35b048dc5acb0f Author: Colin Ian King Date: Wed Aug 5 11:28:05 2020 +0100 omapfb: fix spelling mistake "propert" -> "property" There is a spelling mistake in a pr_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200805102805.15353-1-colin.king@canonical.com commit 9ec2832e9cdd7b3ad58e39217775e5b10290e62f Author: Rodrigo Alencar <455.rodrigo.alencar@gmail.com> Date: Fri Jul 24 17:22:18 2020 -0300 video: fbdev: ssd1307fb: Added support to Column offset This patch provides support for displays like VGM128064B0W10, which requires a column offset of 2, i.e., its segments starts in SEG2 and ends in SEG129. Signed-off-by: Rodrigo Alencar <455.rodrigo.alencar@gmail.com> Acked-by: Rob Herring Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/1595622138-3965-1-git-send-email-455.rodrigo.alencar@gmail.com commit c72fab81ceaa54408b827a2f0486d9a0f4be34cf Author: Colin Ian King Date: Thu Jul 23 18:02:27 2020 +0100 video: fbdev: vga16fb: fix setting of pixclock because a pass-by-value error The pixclock is being set locally because it is being passed as a pass-by-value argument rather than pass-by-reference, so the computed pixclock is never being set in var->pixclock. Fix this by passing by reference. [This dates back to 2002, I found the offending commit from the git history git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git ] Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Cc: Daniel Vetter Cc: Jani Nikula [b.zolnierkie: minor patch summary fixup] [b.zolnierkie: removed "Fixes:" tag (not in upstream tree)] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200723170227.996229-1-colin.king@canonical.com commit bcee1609ba9623f35597f06a2ad118ac4ade2974 Author: Evgeny Novikov Date: Mon Jul 13 11:05:32 2020 +0300 fbdev: sm712fb: handle ioremap() errors in probe smtcfb_pci_probe() does not handle ioremap() errors for case 0x720. The patch fixes that exactly like for case 0x710/2. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Cc: Sudip Mukherjee Cc: Teddy Wang Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200713080532.15504-1-novikov@ispras.ru commit a49145acfb975d921464b84fe00279f99827d816 Author: George Kennedy Date: Tue Jul 7 15:26:03 2020 -0400 fbmem: add margin check to fb_check_caps() A fb_ioctl() FBIOPUT_VSCREENINFO call with invalid xres setting or yres setting in struct fb_var_screeninfo will result in a KASAN: vmalloc-out-of-bounds failure in bitfill_aligned() as the margins are being cleared. The margins are cleared in chunks and if the xres setting or yres setting is a value of zero upto the chunk size, the failure will occur. Add a margin check to validate xres and yres settings. Signed-off-by: George Kennedy Reported-by: syzbot+e5fd3e65515b48c02a30@syzkaller.appspotmail.com Reviewed-by: Dan Carpenter Cc: Dhaval Giani Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/1594149963-13801-1-git-send-email-george.kennedy@oracle.com commit 750628c79bb10ada3d404f576d476c3cef2da6fb Author: Bartosz Golaszewski Date: Mon Aug 24 19:38:59 2020 +0200 iio: adc: xilinx-xadc: use devm_krealloc() Use the managed variant of krealloc() and shrink the code a bit. Signed-off-by: Bartosz Golaszewski Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20200824173859.4910-4-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit bb19133fc89b31eb6b490b25cb92626a10700c82 Author: Bartosz Golaszewski Date: Mon Aug 24 19:38:58 2020 +0200 hwmon: pmbus: use more devres helpers Shrink pmbus code by using devm_hwmon_device_register_with_groups() and devm_krealloc() instead of their non-managed variants. Signed-off-by: Bartosz Golaszewski Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20200824173859.4910-3-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit f82485722e5de5ebb08d3a1dd7302203346dbff9 Author: Bartosz Golaszewski Date: Mon Aug 24 19:38:57 2020 +0200 devres: provide devm_krealloc() Implement the managed variant of krealloc(). This function works with all memory allocated by devm_kmalloc() (or devres functions using it implicitly like devm_kmemdup(), devm_kstrdup() etc.). Managed realloc'ed chunks can be manually released with devm_kfree(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200824173859.4910-2-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 81b142245b6f0249896325c7e8451cb5347d4d31 Author: Stephen Boyd Date: Thu Aug 6 14:46:33 2020 -0700 syscore: Use pm_pr_dbg() for syscore_{suspend,resume}() The debug messages about what syscore suspend/resume hooks are called are only present if you have initcall debugging enabled. Let's move these messages to pm_pr_dbg() so that the syscore PM messages are included along with all the other PM debugging info that can be seen during suspend/resume debugging. Cc: "Rafael J. Wysocki" Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200806214633.204472-1-swboyd@chromium.org Signed-off-by: Greg Kroah-Hartman commit e3aa745ff9f6326e495c3f9c6095120b7c417a21 Author: Zenghui Yu Date: Mon Aug 3 11:33:43 2020 +0800 driver core: Use the ktime_us_delta() helper Use the ktime_us_delta() helper to measure the driver probe time. Given the helpers already returns an s64 value, let's drop the unnecessary casting to s64 as well. There is no functional change. Signed-off-by: Zenghui Yu Link: https://lore.kernel.org/r/20200803033343.1178-1-yuzenghui@huawei.com Signed-off-by: Greg Kroah-Hartman commit 18efb2f9e897ac65e7a1b2892f4a53e404534eba Author: Kees Cook Date: Wed Jul 29 10:58:29 2020 -0700 test_firmware: Test platform fw loading on non-EFI systems On non-EFI systems, it wasn't possible to test the platform firmware loader because it will have never set "checked_fw" during __init. Instead, allow the test code to override this check. Additionally split the declarations into a private header file so it there is greater enforcement of the symbol visibility. Fixes: 548193cba2a7 ("test_firmware: add support for firmware_request_platform") Cc: stable@vger.kernel.org Reviewed-by: Luis Chamberlain Acked-by: Scott Branden Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20200729175845.1745471-2-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit f118dbf4e7f974493baa74f36ef8b8f1f5622e29 Author: Jonathan Neuschäfer Date: Sat Sep 5 20:41:30 2020 +0200 docs: driver-api: firmware: fallback-mechanisms: Fix rendering of bullet point Without this patch, the "Firmware is not accessible [...]" line is rendered in bold, which does not seem intentional. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20200905184131.1280337-1-j.neuschaefer@gmx.net Signed-off-by: Greg Kroah-Hartman commit 291dace3daad416f80fe25d8f838e0a1d0edc762 Author: Heikki Krogerus Date: Mon Sep 7 15:05:32 2020 +0300 Documentation: Remove device connection documentation The API that allowed device connection descriptions to be added is now removed, so removing also the documentation for it. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200907120532.37611-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d7cf5590393132993f2e6d2618fd23a20a6342ca Author: Heikki Krogerus Date: Mon Sep 7 15:05:31 2020 +0300 device property: Move fwnode_connection_find_match() under drivers/base/property.c The function is now only a helper that searches the connection from device graph and then by checking if the supplied connection identifier matches a property that contains reference. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200907120532.37611-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 97ecfda1a8ffc5ffc9681d0dfa65fd5b39839dfe Author: Linus Walleij Date: Wed Aug 26 09:05:40 2020 +0200 backlight: tosa_bl: Include the right header The Tosa backlight driver was converted to use GPIO descriptors in 0b0cb52bd80eda76c4b9921f5cf9c1b709d44e83 ("video: backlight: tosa: Use GPIO lookup table") but still includes rather than . Fix it. Cc: Arnd Bergmann Cc: Robert Jarzmik Signed-off-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit a47a2b98f341679807e6c64b520391f3630e8804 Author: Linus Walleij Date: Wed Aug 26 09:09:17 2020 +0200 backlight: tosa_lcd: Include the right header The Tosa backlight LCDE driver was converted to use GPIO descriptors in 0b0cb52bd80eda76c4b9921f5cf9c1b709d44e83 ("video: backlight: tosa: Use GPIO lookup table") but still includes rather than . Fix it. Cc: Arnd Bergmann Cc: Robert Jarzmik Signed-off-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 0c5edd77a21dc863aa7639ea07c9d7a5b15f62f9 Author: Fabian Frederick Date: Mon Sep 7 18:14:28 2020 +0200 selftests/net: replace obsolete NFT_CHAIN configuration Replace old parameters with global NFT_NAT from commit db8ab38880e0 ("netfilter: nf_tables: merge ipv4 and ipv6 nat chain types") Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit 36c3be8a2c8ae61b2c5ba451b48937c3c494965d Author: Wang Hai Date: Fri Sep 4 20:56:53 2020 +0800 netfilter: ebt_stp: Remove unused macro BPDU_TYPE_TCN BPDU_TYPE_TCN is never used after it was introduced. So better to remove it. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Pablo Neira Ayuso commit ee626660ddbd2723853d0681c903d0baa221b0ce Author: Roger Quadros Date: Mon Aug 31 17:21:30 2020 +0300 dt-binding: phy: convert ti,omap-usb2 to YAML Move ti,omap-usb2 to its own YAML schema. Signed-off-by: Roger Quadros Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200831142130.21836-1-rogerq@ti.com Signed-off-by: Vinod Koul commit 7f78322cdd67c7b01b0f0723b140a04ad8fcec7b Author: Grygorii Strashko Date: Fri Aug 28 23:19:43 2020 +0300 phy: ti: gmii-sel: retrieve ports number and base offset from dt On K3 AM654x/J721E platforms the Port MII mode selection register(s) have similar format and placed in the System Control Module (SCM) module sequentially as one register per port, but, depending SOC and CPSW instance, the base offset and number of ports can be different. Hence, add possibility to retrieve number of ports and base registers offset from DT and support for max possible number of ports supported by K3 SoCs like J721E. Signed-off-by: Grygorii Strashko Link: https://lore.kernel.org/r/20200828201943.29155-4-grygorii.strashko@ti.com Signed-off-by: Vinod Koul commit d3fa20b97c779e1dfd341e65a3b84eb1ad650ae7 Author: Grygorii Strashko Date: Fri Aug 28 23:19:42 2020 +0300 phy: ti: gmii-sel: use features mask during init Use features mask during PHYs initialization to simplify code. Signed-off-by: Grygorii Strashko Link: https://lore.kernel.org/r/20200828201943.29155-3-grygorii.strashko@ti.com Signed-off-by: Vinod Koul commit 15819a6c9a914c39112df4cc10ac1ab5bdbd72a9 Author: Grygorii Strashko Date: Fri Aug 28 23:19:41 2020 +0300 phy: ti: gmii-sel: move phy init in separate function Move phy initialization in separate function to improve code readability and simplify future changes. Signed-off-by: Grygorii Strashko Link: https://lore.kernel.org/r/20200828201943.29155-2-grygorii.strashko@ti.com Signed-off-by: Vinod Koul commit d034731bb4b4f2bf5f378231a6d99e59c2cb59f6 Author: Hans Verkuil Date: Tue Sep 8 11:03:04 2020 +0200 media: vivid: fix compile warning/error Fix this warning: vivid-core.c: In function 'vivid_create_devnodes': vivid-core.c:1318:11: warning: unused variable 'i' [-Wunused-variable] 1318 | int ret, i; | ^ and this error: vivid-core.c: In function 'vivid_create_instance': vivid-core.c:1885:47: error: 'cec_tx_bus_cnt' undeclared (first use in this function) 1885 | ret = vivid_create_devnodes(pdev, dev, inst, cec_tx_bus_cnt, | ^~~~~~~~~~~~~~ vivid-core.c:1885:47: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 319f0ce284fff8e4f95167cb144acc905d0584c7 Author: Masami Hiramatsu Date: Sat Aug 29 22:03:02 2020 +0900 kprobes: Make local functions static Since we unified the kretprobe trampoline handler from arch/* code, some functions and objects do not need to be exported anymore. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870618256.1229682.8692046612635810882.stgit@devnote2 commit b338817807538c893540e393856b79cbbdf777ea Author: Masami Hiramatsu Date: Sat Aug 29 22:02:47 2020 +0900 kprobes: Free kretprobe_instance with RCU callback Free kretprobe_instance with RCU callback instead of directly freeing the object in the kretprobe handler context. This will make kretprobe run safer in NMI context. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870616685.1229682.11978742048709542226.stgit@devnote2 commit e03b4a084ea6b0a18b0e874baec439e69090c168 Author: Masami Hiramatsu Date: Sat Aug 29 22:02:36 2020 +0900 kprobes: Remove NMI context check The in_nmi() check in pre_handler_kretprobe() is meant to avoid recursion, and blindly assumes that anything NMI is recursive. However, since commit: 9b38cc704e84 ("kretprobe: Prevent triggering kretprobe from within kprobe_flush_task") there is a better way to detect and avoid actual recursion. By setting a dummy kprobe, any actual exceptions will terminate early (by trying to handle the dummy kprobe), and recursion will not happen. Employ this to avoid the kretprobe_table_lock() recursion, replacing the over-eager in_nmi() check. Signed-off-by: Masami Hiramatsu Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/159870615628.1229682.6087311596892125907.stgit@devnote2 commit 5e96ce8ae5b1428e6f4953be5fb1daf0a6d18426 Author: Masami Hiramatsu Date: Sat Aug 29 22:02:25 2020 +0900 sparc: kprobes: Use generic kretprobe trampoline handler Use the generic kretprobe trampoline handler. Don't use framepointer verification. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870614572.1229682.2273450776108579676.stgit@devnote2 commit 0cf0e2fe91fade050bfda2a7240550ba6106b760 Author: Masami Hiramatsu Date: Sat Aug 29 22:02:15 2020 +0900 sh: kprobes: Use generic kretprobe trampoline handler Use the generic kretprobe trampoline handler. Don't use framepointer verification. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870613547.1229682.15519965962108261812.stgit@devnote2 commit 26a24a6b43d51c6fc70bef9b9016d81e4cf75e6e Author: Masami Hiramatsu Date: Sat Aug 29 22:02:04 2020 +0900 s390: kprobes: Use generic kretprobe trampoline handler Use the generic kretprobe trampoline handler. Don't use framepointer verification. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870612453.1229682.15950927742606892302.stgit@devnote2 commit b6c5a58dd89e683e66b52a57a6f022fda79a0aab Author: Masami Hiramatsu Date: Sat Aug 29 22:01:48 2020 +0900 powerpc: kprobes: Use generic kretprobe trampoline handler Use the generic kretprobe trampoline handler. Don't use framepointer verification. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870610825.1229682.2090635992093223399.stgit@devnote2 commit 16ff6f7ac92e506a05d3720e4d9fa0647bb0b5c4 Author: Masami Hiramatsu Date: Sat Aug 29 22:01:37 2020 +0900 parisc: kprobes: Use generic kretprobe trampoline handler Use the generic kretprobe trampoline handler. Don't use framepointer verification. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870609708.1229682.1861714117180719169.stgit@devnote2 commit 2ef12450856121f092621d4305885ec20283260e Author: Masami Hiramatsu Date: Sat Aug 29 22:01:19 2020 +0900 mips: kprobes: Use generic kretprobe trampoline handler Use the generic kretprobe trampoline handler. Don't use framepointer verification. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870607968.1229682.12100697467108845587.stgit@devnote2 commit e792ff804f49720ce003b3e4c618b5d996256a18 Author: Masami Hiramatsu Date: Sat Aug 29 22:01:09 2020 +0900 ia64: kprobes: Use generic kretprobe trampoline handler Use the generic kretprobe trampoline handler. Don't use framepointer verification. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870606883.1229682.12331813108378725668.stgit@devnote2 commit 03c8a4a447008c1a755cd32bc89af24119bd08f1 Author: Masami Hiramatsu Date: Sat Aug 29 22:00:58 2020 +0900 csky: kprobes: Use generic kretprobe trampoline handler Use the generic kretprobe trampoline handler. Don't use framepointer verification. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Acked-by: Guo Ren Link: https://lore.kernel.org/r/159870605775.1229682.2627276871589951304.stgit@devnote2 commit f75dd136b65cccfaf3869be5380f401538fa9f72 Author: Masami Hiramatsu Date: Sat Aug 29 22:00:46 2020 +0900 arc: kprobes: Use generic kretprobe trampoline handler Use the generic kretprobe trampoline handler. Don't use framepointer verification. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870604671.1229682.13639386820521358456.stgit@devnote2 commit 95a4b7a24f55efd4fbc77c020fe0aab3e1f37f8a Author: Masami Hiramatsu Date: Sat Aug 29 22:00:35 2020 +0900 arm64: kprobes: Use generic kretprobe trampoline handler Use the generic kretprobe trampoline handler, and use kernel_stack_pointer(regs) for framepointer verification. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870603544.1229682.10309733593594205725.stgit@devnote2 commit 94509582d1d173c4777b8832ecbac6dff2ccbfa7 Author: Masami Hiramatsu Date: Sat Aug 29 22:00:24 2020 +0900 arm: kprobes: Use generic kretprobe trampoline handler Use the generic kretprobe trampoline handler. Use regs->ARM_fp for framepointer verification. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870602406.1229682.10496730247473708592.stgit@devnote2 commit d7641289dad95df3531f573112778c548331ab83 Author: Masami Hiramatsu Date: Sat Aug 29 22:00:12 2020 +0900 x86/kprobes: Use generic kretprobe trampoline handler Use the generic kretprobe trampoline handler. Use regs->sp for framepointer verification. [ mingo: Minor edits. ] Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870601250.1229682.14598707734683575237.stgit@devnote2 commit 66ada2ccae4ed4dd07ba91df3b5fdb4c11335bd1 Author: Masami Hiramatsu Date: Sat Aug 29 22:00:01 2020 +0900 kprobes: Add generic kretprobe trampoline handler Add a generic kretprobe trampoline handler for unifying the all cloned /arch/* kretprobe trampoline handlers. The generic kretprobe trampoline handler is based on the x86 implementation, because it is the latest implementation. It has frame pointer checking, kprobe_busy_begin/end and return address fixup for user handlers. [ mingo: Minor edits. ] Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/159870600138.1229682.3424065380448088833.stgit@devnote2 commit 54d04ea8cdbd143496e4f5cc9c0a9f86c0e55a2e Author: Christian König Date: Mon Sep 7 13:44:36 2020 +0200 drm/ttm: merge offset and base in ttm_bus_placement This is used by TTM to communicate the physical address which should be used with ioremap(), ioremap_wc(). We don't need to separate the base and offset in any way here. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/389457/ commit 1ff67ce49875f289d63e426b63c6561aa63fa888 Author: Christian König Date: Mon Sep 7 10:45:52 2020 +0200 drm/qxl: don't touch mem.bus.offset This is internal to TTM and should not be used by drivers directly. Drop the call to qxl_ttm_io_mem_reserve() and use mem->start instead. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/389456/ commit 25c4bcf9858e3e8752985fa0cda64a212ea328b7 Author: Neil Armstrong Date: Mon Sep 7 12:27:11 2020 +0200 drm/bridge: dw-mipi-dsi: fix dw_mipi_dsi_debugfs_show/write warnings This fixes the following warnings while building in W=1 : dw-mipi-dsi.c:1002:5: warning: no previous prototype for 'dw_mipi_dsi_debugfs_write' [-Wmissing-prototypes] dw-mipi-dsi.c:1027:5: warning: no previous prototype for 'dw_mipi_dsi_debugfs_show' [-Wmissing-prototypes] Fixes: e2435d69204c ("drm/bridge: dw-mipi-dsi.c: Add VPG runtime config through debugfs") Reported-by: kernel test robot Signed-off-by: Neil Armstrong Reviewed-by: Daniel Vetter Cc: Angelo Ribeiro Cc: Maxime Ripard Cc: Maarten Lankhorst Cc: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200907102711.23748-1-narmstrong@baylibre.com commit e60768311af854734ce2bbfc50f24cff67b54a91 Author: John Ogness Date: Fri Aug 14 23:31:25 2020 +0206 scripts/gdb: update for lockless printk ringbuffer With the introduction of the lockless printk ringbuffer, the data structure for the kernel log buffer was changed. Update the gdb scripts to be able to parse/print the new log buffer structure. Fixes: 896fbe20b4e2333fb55 ("printk: use the lockless ringbuffer") Signed-off-by: John Ogness Reported-by: Nick Desaulniers Tested-by: Nick Desaulniers Tested-by: Petr Mladek [akpm@linux-foundation.org: A typo fix.] Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200814212525.6118-3-john.ogness@linutronix.de commit 3e0d075cb0ab3b1fbddc14855985215407f8a48b Author: John Ogness Date: Fri Aug 14 23:31:24 2020 +0206 scripts/gdb: add utils.read_ulong() Add a function for reading unsigned long values, which vary in size depending on the architecture. Signed-off-by: John Ogness Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Tested-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200814212525.6118-2-john.ogness@linutronix.de commit f8ff195ef1b9b84111f1872d70919fbfb38f2a5f Author: John Ogness Date: Fri Aug 14 23:39:16 2020 +0206 docs: vmcoreinfo: add lockless printk ringbuffer vmcoreinfo With the introduction of the lockless printk ringbuffer, the VMCOREINFO relating to the kernel log buffer was changed. Update the documentation to match those changes. Fixes: 896fbe20b4e2333fb55 ("printk: use the lockless ringbuffer") Reported-by: Nick Desaulniers Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200814213316.6394-1-john.ogness@linutronix.de commit 550c10d28d21bd82a8bb48debbb27e6ed53262f6 Author: John Ogness Date: Wed Aug 12 09:37:22 2020 +0206 printk: reduce LOG_BUF_SHIFT range for H8300 The .bss section for the h8300 is relatively small. A value of CONFIG_LOG_BUF_SHIFT that is larger than 19 will create a static printk ringbuffer that is too large. Limit the range appropriately for the H8300. Reported-by: kernel test robot Signed-off-by: John Ogness Reviewed-by: Sergey Senozhatsky Acked-by: Steven Rostedt (VMware) Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200812073122.25412-1-john.ogness@linutronix.de commit d397820f36ffe4701343b6ee12687d60db0ed8db Author: John Ogness Date: Tue Jul 21 15:31:28 2020 +0206 printk: ringbuffer: support dataless records With commit 896fbe20b4e2333fb55 ("printk: use the lockless ringbuffer"), printk() started silently dropping messages without text because such records are not supported by the new printk ringbuffer. Add support for such records. Currently dataless records are denoted by INVALID_LPOS in order to recognize failed prb_reserve() calls. Change the ringbuffer to instead use two different identifiers (FAILED_LPOS and NO_LPOS) to distinguish between failed prb_reserve() records and successful dataless records, respectively. Fixes: 896fbe20b4e2333fb55 ("printk: use the lockless ringbuffer") Fixes: https://lkml.kernel.org/r/20200718121053.GA691245@elver.google.com Reported-by: Marco Elver Signed-off-by: John Ogness Cc: Petr Mladek Cc: Steven Rostedt Cc: Marco Elver Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200721132528.9661-1-john.ogness@linutronix.de commit 0c8d22fcae2f9590a07b000e1724f665820b77f7 Merge: ce5c207c6b8dd 11bc98bd71fe2 Author: Dave Airlie Date: Tue Sep 8 16:40:13 2020 +1000 Merge tag 'amd-drm-next-5.10-2020-09-03' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-next-5.10-2020-09-03: amdgpu: - RAS fixes - Sienna Cichlid updates - Navy Flounder updates - DCE6 (SI) support in DC - Enable plane rotation - Rework pre-OS vram reservation handling during driver init - Add standard interface to dump GPU metrics table from SMU - Rework tiling and tmz state handling in atomic commits - Pstate fixes - Add voltage and power hwmon interfaces for renoir - SW CTF fixes - S/G display fix for Raven - Print client strings for vmfaults for vega and newer - Manual fan control fixes - Display updates - Reorg power management directory structure - Misc bug fixes - Misc code cleanups amdkfd: - Topology fixes - Add SMI events for thermal throttling and GPU resets radeon: - switch from pci_* to dma_* for dma allocations - PLL fix Scheduler: - Clean up priority levels UAPI: - amdgpu INFO IOCTL query update for TMZ state https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6049 - amdkfd SMI event interface updates https://github.com/RadeonOpenCompute/rocm_smi_lib/tree/therm_thrott From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200903222921.4152-1-alexander.deucher@amd.com commit 7e8453e35e406981d7c529ff8f804285bc894ba3 Author: Tom Rix Date: Sun Sep 6 14:26:25 2020 -0700 ath11k: fix a double free and a memory leak clang static analyzer reports this problem mac.c:6204:2: warning: Attempt to free released memory kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The channels pointer is allocated in ath11k_mac_setup_channels_rates() When it fails midway, it cleans up the memory it has already allocated. So the error handling needs to skip freeing the memory. There is a second problem. ath11k_mac_setup_channels_rates(), allocates 3 channels. err_free misses releasing ar->mac.sbands[NL80211_BAND_6GHZ].channels Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Tom Rix Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200906212625.17059-1-trix@redhat.com commit 9e69fe31ca9ae18a06e1a468d9179505066a85fe Author: Rakesh Pillai Date: Fri Jun 26 23:31:42 2020 +0530 ath10k: Add support for chain1 regulator supply voting Add support to vote for chain-1 voltage regulator in WCN3990. Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai Reviewed-by: Douglas Anderson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1593194502-13164-3-git-send-email-pillair@codeaurora.org commit 8f1553694551f36441e6c4e66e4ccc24ae891994 Author: Rakesh Pillai Date: Fri Jun 26 23:31:41 2020 +0530 dt: bindings: Add new regulator as optional property for WCN3990 Add an additional regulator supply as an optional property for WCN3990. Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai Reviewed-by: Douglas Anderson Acked-by: Rob Herring Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1593194502-13164-2-git-send-email-pillair@codeaurora.org commit ce5c207c6b8dd9cdeaeeb2345b8a69335c0d98bf Merge: 3393649977f9a f4d51dffc6c01 Author: Dave Airlie Date: Tue Sep 8 14:41:40 2020 +1000 Merge tag 'v5.9-rc4' into drm-next Backmerge 5.9-rc4 as there is a nasty qxl conflict that needs to be resolved. Signed-off-by: Dave Airlie commit dce9d8129e1073919710f2af23562e13db9de042 Author: Chunfeng Yun Date: Tue Aug 25 10:03:07 2020 +0800 phy: phy-pxa-28nm-usb2: convert to readl_poll_timeout() Use readl_poll_timeout() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1598320987-25518-6-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit f63602b1c64c15ec6154e453cd69cda045a8f8e6 Author: Chunfeng Yun Date: Tue Aug 25 10:03:06 2020 +0800 phy: phy-pxa-28nm-hsic: convert to readl_poll_timeout() Use readl_poll_timeout() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1598320987-25518-5-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 38af68cb04cf776196099bb0dd079bbcfe57b771 Author: Chunfeng Yun Date: Tue Aug 25 10:03:05 2020 +0800 phy: phy-qcom-apq8064-sata: convert to readl_relaxed_poll_timeout() Use readl_relaxed_poll_timeout() to simplify code, rename local function read_poll_timeout() as poll_timeout() to avoid repeated definition Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1598320987-25518-4-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 6f2a721850c4b0291c118bc9acf18199fbf7b9cd Author: Chunfeng Yun Date: Tue Aug 25 10:03:04 2020 +0800 phy: phy-bcm-sr-usb: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1598320987-25518-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 01a45633009743ce120be83f6de66830f114b92f Author: Chunfeng Yun Date: Tue Aug 25 10:03:03 2020 +0800 phy: phy-bcm-ns2-usbdrd: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1598320987-25518-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 47da6aa776eb3ccefaa5108d30bfe9957ddde510 Author: Chunfeng Yun Date: Tue Aug 25 10:03:02 2020 +0800 phy: phy-bcm-ns-usb3: convert to readl_poll_timeout_atomic() Use readl_poll_timeout_atomic() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1598320987-25518-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 4349abdb409b04a5ed4ca4d2c1df7ef0cc16f6bd Author: Vladimir Oltean Date: Tue Sep 8 02:25:56 2020 +0300 net: dsa: don't print non-fatal MTU error if not supported Commit 72579e14a1d3 ("net: dsa: don't fail to probe if we couldn't set the MTU") changed, for some reason, the "err && err != -EOPNOTSUPP" check into a simple "err". This causes the MTU warning to be printed even for drivers that don't have the MTU operations implemented. Fix that. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit c9ebf126f127780a5a125449e4efe6df37b8daa4 Author: Vladimir Oltean Date: Tue Sep 8 02:06:56 2020 +0300 net: dsa: change PHY error message again slave_dev->name is only populated at this stage if it was specified through a label in the device tree. However that is not mandatory. When it isn't, the error message looks like this: [ 5.037057] fsl_enetc 0000:00:00.2 eth2: error -19 setting up slave PHY for eth%d [ 5.044672] fsl_enetc 0000:00:00.2 eth2: error -19 setting up slave PHY for eth%d [ 5.052275] fsl_enetc 0000:00:00.2 eth2: error -19 setting up slave PHY for eth%d [ 5.059877] fsl_enetc 0000:00:00.2 eth2: error -19 setting up slave PHY for eth%d which is especially confusing since the error gets printed on behalf of the DSA master (fsl_enetc in this case). Printing an error message that contains a valid reference to the DSA port's name is difficult at this point in the initialization stage, so at least we should print some info that is more reliable, even if less user-friendly. That may be the driver name and the hardware port index. After this change, the error is printed as: [ 6.051587] mscc_felix 0000:00:00.5: error -19 setting up PHY for tree 0, switch 0, port 0 [ 6.061192] mscc_felix 0000:00:00.5: error -19 setting up PHY for tree 0, switch 0, port 1 [ 6.070765] mscc_felix 0000:00:00.5: error -19 setting up PHY for tree 0, switch 0, port 2 [ 6.080324] mscc_felix 0000:00:00.5: error -19 setting up PHY for tree 0, switch 0, port 3 Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit e75ad2cc41832bae3218e3d6f38b3f03ae0a41df Author: Wang Hai Date: Mon Sep 7 22:06:52 2020 +0800 blktrace: make function blk_trace_bio_get_cgid() static The sparse tool complains as follows: kernel/trace/blktrace.c:796:5: warning: symbol 'blk_trace_bio_get_cgid' was not declared. Should it be static? This function is not used outside of blktrace.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Jens Axboe commit ddfb8b0beda1c371a44897c0359adccf030f7c58 Author: Baolin Wang Date: Mon Sep 7 16:36:17 2020 +0800 block: Remove unused blk_mq_sched_free_hctx_data() Now we usually free the hctx->sched_data by e->type->ops.exit_hctx(), and no users will use blk_mq_sched_free_hctx_data() function. Remove it. Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 384d87ef2c954fc58e6c5fd8253e4a1984f5fe02 Author: Jan Kara Date: Fri Sep 4 10:58:52 2020 +0200 block: Do not discard buffers under a mounted filesystem Discarding blocks and buffers under a mounted filesystem is hardly anything admin wants to do. Usually it will confuse the filesystem and sometimes the loss of buffer_head state (including b_private field) can even cause crashes like: BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 PGD 0 P4D 0 Oops: 0002 [#1] SMP PTI CPU: 4 PID: 203778 Comm: jbd2/dm-3-8 Kdump: loaded Tainted: G O --------- - - 4.18.0-147.5.0.5.h126.eulerosv2r9.x86_64 #1 Hardware name: Huawei RH2288H V3/BC11HGSA0, BIOS 1.57 08/11/2015 RIP: 0010:jbd2_journal_grab_journal_head+0x1b/0x40 [jbd2] ... Call Trace: __jbd2_journal_insert_checkpoint+0x23/0x70 [jbd2] jbd2_journal_commit_transaction+0x155f/0x1b60 [jbd2] kjournald2+0xbd/0x270 [jbd2] So if we don't have block device open with O_EXCL already, claim the block device while we truncate buffer cache. This makes sure any exclusive block device user (such as filesystem) cannot operate on the device while we are discarding buffer cache. Reported-by: Ye Bin Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig [axboe: fix !CONFIG_BLOCK error in truncate_bdev_range()] Signed-off-by: Jens Axboe commit c685eb0c12b4d4816d22ee734e91f4005b152fcd Author: Joerg Roedel Date: Mon Sep 7 15:15:38 2020 +0200 x86/sev-es: Print SEV-ES info into the kernel log Refactor the message printed to the kernel log which indicates whether SEV or SME, etc is active. This will scale better in the future when more memory encryption features might be added. Also add SEV-ES to the list of features. [ bp: Massage. ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-38-joro@8bytes.org commit 5e895bd4d5233cb054447d0491d4e63c8496d419 Author: Eric Biggers Date: Mon Aug 24 13:38:41 2020 -0700 fscrypt: restrict IV_INO_LBLK_32 to ino_bits <= 32 When an encryption policy has the IV_INO_LBLK_32 flag set, the IV generation method involves hashing the inode number. This is different from fscrypt's other IV generation methods, where the inode number is either not used at all or is included directly in the IVs. Therefore, in principle IV_INO_LBLK_32 can work with any length inode number. However, currently fscrypt gets the inode number from inode::i_ino, which is 'unsigned long'. So currently the implementation limit is actually 32 bits (like IV_INO_LBLK_64), since longer inode numbers will have been truncated by the VFS on 32-bit platforms. Fix fscrypt_supported_v2_policy() to enforce the correct limit. This doesn't actually matter currently, since only ext4 and f2fs support IV_INO_LBLK_32, and they both only support 32-bit inode numbers. But we might as well fix it in case it matters in the future. Ideally inode::i_ino would instead be made 64-bit, but for now it's not needed. (Note, this limit does *not* prevent filesystems with 64-bit inode numbers from adding fscrypt support, since IV_INO_LBLK_* support is optional and is useful only on certain hardware.) Fixes: e3b1078bedd3 ("fscrypt: add support for IV_INO_LBLK_32 policies") Reported-by: Jeff Layton Link: https://lore.kernel.org/r/20200824203841.1707847-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 8b10fe68985278de4926daa56ad6af701839e40a Author: Jeff Layton Date: Mon Aug 10 10:21:39 2020 -0400 fscrypt: drop unused inode argument from fscrypt_fname_alloc_buffer Signed-off-by: Jeff Layton Link: https://lore.kernel.org/r/20200810142139.487631-1-jlayton@kernel.org Signed-off-by: Eric Biggers commit 0db0c34cfbc9838c1a14cb04dd880602abd699a7 Author: Jakub Kicinski Date: Thu Sep 3 16:14:31 2020 -0700 net: tighten the definition of interface statistics This patch is born out of an investigation into which IEEE statistics correspond to which struct rtnl_link_stats64 members. Turns out that there seems to be reasonable consensus on the matter, among many drivers. To save others the time (and it took more time than I'm comfortable admitting) I'm adding comments referring to IEEE attributes to struct rtnl_link_stats64. Up until now we had two forms of documentation for stats - in Documentation/ABI/testing/sysfs-class-net-statistics and the comments on struct rtnl_link_stats64 itself. While the former is very cautious in defining the expected behavior, the latter feel quite dated and may not be easy to understand for modern day driver author (e.g. rx_over_errors). At the same time modern systems are far more complex and once obvious definitions lost their clarity. For example - does rx_packet count at the MAC layer (aFramesReceivedOK)? packets processed correctly by hardware? received by the driver? or maybe received by the stack? I tried to clarify the expectations, further clarifications from others are very welcome. The part hardest to untangle is rx_over_errors vs rx_fifo_errors vs rx_missed_errors. After much deliberation I concluded that for modern HW only two of the counters will make sense. The distinction between internal FIFO overflow and packets dropped due to back-pressure from the host is likely too implementation (driver and device) specific to expose in the standard stats. Now - which two of those counters we select to use is anyone's pick: sysfs documentation suggests rx_over_errors counts packets which did not fit into buffers due to MTU being too small, which I reused. There don't seem to be many modern drivers using it (well, CAN drivers seem to love this statistic). Of the remaining two I picked rx_missed_errors to report device drops. bnxt reports it and it's folded into "drop"s in procfs (while rx_fifo_errors is an error, and modern devices usually receive the frame OK, they just can't admit it into the pipeline). Of the drivers I looked at only AMD Lance-like and NS8390-like use all three of these counters. rx_missed_errors counts missed frames, rx_over_errors counts overflow events, and rx_fifo_errors counts frames which were truncated because they didn't fit into buffers. This suggests that rx_fifo_errors may be the correct stat for truncated packets, but I'd think a FIFO stat counting truncated packets would be very confusing to a modern reader. v2: - add driver developer notes about ethtool stat count and reset - replace Ethernet with IEEE 802.3 to better indicate source of attrs - mention byte counters don't count FCS - clarify RX counter is from device to host - drop "sightly" from sysfs paragraph - add examples of ethtool stats - s/incoming/received/ s/incoming/transmitted/ Signed-off-by: Jakub Kicinski commit 81365af13a5630673c49bfad9b24cf415e9576f6 Author: Wang Hai Date: Fri Sep 4 21:08:37 2020 +0800 rxrpc: Remove unused macro rxrpc_min_rtt_wlen rxrpc_min_rtt_wlen is never used after it was introduced. So better to remove it. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Jakub Kicinski commit 14e9e262119e5517d4815b9b92860172aba6a969 Merge: 30ebaf8e63870 08bdbcae290ba Author: Jakub Kicinski Date: Mon Sep 7 14:49:14 2020 -0700 Merge branch 'sfc-ethtool-for-EF100-and-related-improvements' Edward Cree says: ==================== sfc: ethtool for EF100 and related improvements This series adds the ethtool support to the EF100 driver that was held back from the original submission as the lack of phy_ops caused issues. Patch #2, removing the phy_op indirection, deals with this. There are a lot of checkpatch warnings / xmastree violations but they're all in pure code movement so I've left the code as it is. While patch #1 is technically a fix and possibly could go to 'net', I've put it in this series since it only becomes triggerable with the added 'ethtool --reset' support. ==================== Signed-off-by: Jakub Kicinski commit 08bdbcae290ba89fe451b3a186d7c1409397838d Author: Edward Cree Date: Mon Sep 7 17:15:48 2020 +0100 sfc: simplify DMA mask setting Christoph says[1] that dma_set_mask_and_coherent() is smart enough to truncate the mask itself if it's too long. So we can get rid of our "lop off one bit and retry" loop in efx_init_io(). [1]: https://www.spinics.net/lists/netdev/msg677266.html Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 60bd2a2d1f601a7c0efbf8a956f6c920bbee9ad9 Author: Edward Cree Date: Mon Sep 7 17:15:18 2020 +0100 sfc: remove EFX_DRIVER_VERSION Per-module versions for in-tree drivers are deprecated. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 400d64cf2d1ddedd798c9ff3c1cc03564e67ca5a Author: Edward Cree Date: Mon Sep 7 17:15:08 2020 +0100 sfc: handle limited FEC support If the reported PHY capabilities do not include a given FEC mode, don't attempt to select that FEC mode anyway. If the user tries to set a mode through ethtool that is not supported, return an error. The _REQUESTED bits don't appear in the supported caps, but are implied by the corresponding FEC bits. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 4404c0898dc116b0d173620ed546609fab83007a Author: Edward Cree Date: Mon Sep 7 17:14:52 2020 +0100 sfc: add ethtool ops and miscellaneous ndos to EF100 Mostly just calls to existing common functions. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit c77289b4332eb4f51eef3091142b927ffe5a2a14 Author: Edward Cree Date: Mon Sep 7 17:14:34 2020 +0100 sfc: remove phy_op indirection Originally there were several implementations of PHY operations for the several different PHYs used on Falcon boards. But Falcon is now in a separate driver, and all sfc NICs since then have had MCDI-managed PHYs. Thus, there is no need to indirect through function pointers in efx->phy_op; we can simply call the efx_mcdi_phy_* functions directly. This also hooks up these functions for EF100, which was previously using the dummy_phy_ops. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 7dcc9d8a40f85cbd76acdebcc45ccdfe4a84337f Author: Edward Cree Date: Mon Sep 7 17:14:20 2020 +0100 sfc: don't double-down() filters in ef100_reset() dev_close(), by way of ef100_net_stop(), already brings down the filter table, so there's no need to do it again (which just causes lots of WARN_ONs). Similarly, don't bring it up ourselves, as dev_open() -> ef100_net_open() will do it, and will fail if it's already been brought up. Fixes: a9dc3d5612ce ("sfc_ef100: RX filter table management and related gubbins") Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 3102bc0e6ac752cc5df896acb557d779af4d82a1 Author: Valentin Schneider Date: Sat Aug 29 14:00:16 2020 +0100 arm64: topology: Stop using MPIDR for topology information In the absence of ACPI or DT topology data, we fallback to haphazardly decoding *something* out of MPIDR. Sadly, the contents of that register are mostly unusable due to the implementation leniancy and things like Aff0 having to be capped to 15 (despite being encoded on 8 bits). Consider a simple system with a single package of 32 cores, all under the same LLC. We ought to be shoving them in the same core_sibling mask, but MPIDR is going to look like: | CPU | 0 | ... | 15 | 16 | ... | 31 | |------+---+-----+----+----+-----+----+ | Aff0 | 0 | ... | 15 | 0 | ... | 15 | | Aff1 | 0 | ... | 0 | 1 | ... | 1 | | Aff2 | 0 | ... | 0 | 0 | ... | 0 | Which will eventually yield core_sibling(0-15) == 0-15 core_sibling(16-31) == 16-31 NUMA woes ========= If we try to play games with this and set up NUMA boundaries within those groups of 16 cores via e.g. QEMU: # Node0: 0-9; Node1: 10-19 $ qemu-system-aarch64 \ -smp 20 -numa node,cpus=0-9,nodeid=0 -numa node,cpus=10-19,nodeid=1 The scheduler's MC domain (all CPUs with same LLC) is going to be built via arch_topology.c::cpu_coregroup_mask() In there we try to figure out a sensible mask out of the topology information we have. In short, here we'll pick the smallest of NUMA or core sibling mask. node_mask(CPU9) == 0-9 core_sibling(CPU9) == 0-15 MC mask for CPU9 will thus be 0-9, not a problem. node_mask(CPU10) == 10-19 core_sibling(CPU10) == 0-15 MC mask for CPU10 will thus be 10-19, not a problem. node_mask(CPU16) == 10-19 core_sibling(CPU16) == 16-19 MC mask for CPU16 will thus be 16-19... Uh oh. CPUs 16-19 are in two different unique MC spans, and the scheduler has no idea what to make of that. That triggers the WARN_ON() added by commit ccf74128d66c ("sched/topology: Assert non-NUMA topology masks don't (partially) overlap") Fixing MPIDR-derived topology ============================= We could try to come up with some cleverer scheme to figure out which of the available masks to pick, but really if one of those masks resulted from MPIDR then it should be discarded because it's bound to be bogus. I was hoping to give MPIDR a chance for SMT, to figure out which threads are in the same core using Aff1-3 as core ID, but Sudeep and Robin pointed out to me that there are systems out there where *all* cores have non-zero values in their higher affinity fields (e.g. RK3288 has "5" in all of its cores' MPIDR.Aff1), which would expose a bogus core ID to userspace. Stop using MPIDR for topology information. When no other source of topology information is available, mark each CPU as its own core and its NUMA node as its LLC domain. Signed-off-by: Valentin Schneider Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20200829130016.26106-1-valentin.schneider@arm.com Signed-off-by: Will Deacon commit c048ddf86cdd066db283ce838a0049d2bbefb9e5 Author: Anshuman Khandual Date: Fri Sep 4 14:00:59 2020 +0530 arm64/mm/ptdump: Add address markers for BPF regions Kernel virtual region [BPF_JIT_REGION_START..BPF_JIT_REGION_END] is missing from address_markers[], hence relevant page table entries are not displayed with /sys/kernel/debug/kernel_page_tables. This adds those missing markers. While here, also rename arch/arm64/mm/dump.c which sounds bit ambiguous, as arch/arm64/mm/ptdump.c instead. Signed-off-by: Anshuman Khandual Reviewed-by: Steven Price Cc: Catalin Marinas Cc: Will Deacon Cc: Ard Biesheuvel Cc: Steven Price Cc: Andrew Morton Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1599208259-11191-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit dbd9d80c1b2e033d5ec2d00add89a4f18f6899eb Author: Rodrigo Siqueira Date: Sun Aug 30 10:20:00 2020 -0400 drm/vkms: Add support for writeback This patch implements the necessary functions to add writeback support for vkms. This feature is useful for testing compositors if you don't have hardware with writeback support. Change in V4 (Emil and Melissa): - Move signal completion above drm_crtc_add_crc_entry() - Make writeback always available - Use appropriate namespace - Drop fb check in vkms_wb_atomic_commit - Make vkms_set_composer visible for writeback code - Enable composer operation on prepare_job and disable it on cleanup_job - Drop extra space at the end of the file - Rebase Change in V3 (Daniel): - If writeback is enabled, compose everything into the writeback buffer instead of CRC private buffer - Guarantees that the CRC will match exactly what we have in the writeback buffer. Change in V2: - Rework signal completion (Brian) - Integrates writeback with active_planes (Daniel) - Compose cursor (Daniel) Signed-off-by: Rodrigo Siqueira Reviewed-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200830142000.146706-4-rodrigosiqueiramelo@gmail.com commit 60cc20214cedaa5128005a6ccf38c4f37242cf5b Author: Rodrigo Siqueira Date: Sun Aug 30 10:19:59 2020 -0400 drm/vkms: Compute CRC without change input data This commit decouples pixel manipulation from compute_crc() for avoiding any pixel change during the CRC calculation. This commits represents a preparation work for making VKMS able to support the writeback feature. Change in V5 (Melissa): - Rebase and drop bitmap for alpha Change in V4 (Emil): - Move bitmap_clear operation and comments to get_pixel function Signed-off-by: Rodrigo Siqueira Reviewed-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20200830142000.146706-3-rodrigosiqueiramelo@gmail.com commit 953025763d1421605939479b2e9c070f03e428c1 Author: Rodrigo Siqueira Date: Sun Aug 30 10:19:58 2020 -0400 drm/vkms: Decouple crc operations from composer In the vkms_composer.c, some of the functions related to CRC and compose have interdependence between each other. This patch reworks some functions inside vkms_composer to make crc and composer computation decoupled. This patch is preparation work for making vkms able to support new features. Tested-by: Melissa Wen Signed-off-by: Rodrigo Siqueira Reviewed-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20200830142000.146706-2-rodrigosiqueiramelo@gmail.com commit b57de6cd16395be1ebdaa9b489ffbf462bb585c4 Author: Joerg Roedel Date: Mon Sep 7 15:15:37 2020 +0200 x86/sev-es: Add SEV-ES Feature Detection Add a sev_es_active() function for checking whether SEV-ES is enabled. Also cache the value of MSR_AMD64_SEV at boot to speed up the feature checking in the running code. [ bp: Remove "!!" in sev_active() too. ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-37-joro@8bytes.org commit 30ebaf8e638701bebbc2703159f4d86982ea0430 Author: Wang Hai Date: Mon Sep 7 22:12:07 2020 +0800 net: ethernet: dnet: Remove set but unused variable 'len' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/dnet.c: In function dnet_start_xmit drivers/net/ethernet/dnet.c:511:15: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] commit 4796417417a6 ("dnet: Dave DNET ethernet controller driver (updated)") involved this unused variable, remove it. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Jakub Kicinski commit 4b47cdbda6f1ad73b08dc7d497bac12b8f26ae0d Author: Joerg Roedel Date: Mon Sep 7 15:15:36 2020 +0200 x86/head/64: Move early exception dispatch to C code Move the assembly coded dispatch between page-faults and all other exceptions to C code to make it easier to maintain and extend. Also change the return-type of early_make_pgtable() to bool and make it static. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-36-joro@8bytes.org commit 097ee5b778b8970e1c2ed3ca1631b297d90acd61 Author: Joerg Roedel Date: Mon Sep 7 15:15:35 2020 +0200 x86/idt: Make IDT init functions static inlines Move these two functions from kernel/idt.c to include/asm/desc.h: * init_idt_data() * idt_init_desc() These functions are needed to setup IDT entries very early and need to be called from head64.c. To be usable this early, these functions need to be compiled without instrumentation and the stack-protector feature. These features need to be kept enabled for kernel/idt.c, so head64.c must use its own versions. [ bp: Take Kees' suggested patch title and add his Rev-by. ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-35-joro@8bytes.org commit 0a667b500703db80eb30759bb67df671641dbc5b Author: Dave Airlie Date: Tue Aug 25 09:46:00 2020 +1000 drm/ttm: remove bdev from ttm_tt I want to split this structure up and use it differently, step one remove bdev pointer from it and pass it explicitly. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200826014428.828392-4-airlied@gmail.com commit f3b11449a46a8c7844eb3c2b337206a692d897e0 Author: Zhang Changzhong Date: Mon Sep 7 20:46:54 2020 +0800 net: ethernet: dwmac: remove redundant null check before clk_disable_unprepare() Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Signed-off-by: Jakub Kicinski commit 05891200706117895b7faac7e53b14118b6a8114 Author: Zhang Changzhong Date: Mon Sep 7 20:49:44 2020 +0800 net: ethernet: fec: remove redundant null check before clk_disable_unprepare() Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Acked-by: Fugang Duan Signed-off-by: Jakub Kicinski commit 1c35cc9cf6a0e2c4ade22385a89d07d1d9006620 Author: Zhang Changzhong Date: Mon Sep 7 20:57:24 2020 +0800 net: stmmac: remove redundant null check before clk_disable_unprepare() Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Signed-off-by: Jakub Kicinski commit e50fd9b5794d68c6814114b3c575069bcdbcb409 Author: Zhang Changzhong Date: Mon Sep 7 21:02:03 2020 +0800 net: xilinx: remove redundant null check before clk_disable_unprepare() Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Reviewed-by: Radhey Shyam Pandey Signed-off-by: Jakub Kicinski commit 601637e42df045ca2d1a9324d56765f044d46866 Author: Thomas Bogendoerfer Date: Mon Aug 24 18:32:54 2020 +0200 MIPS: Remove mach-*/war.h After conversion of all WAR defines we can now remove all mach-*/war.h files. Signed-off-by: Thomas Bogendoerfer commit 8e7291d603a3fa8f0d16feb825629c669f36c49e Author: Thomas Bogendoerfer Date: Mon Aug 24 18:32:53 2020 +0200 MIPS: Get rid of CAVIUM_OCTEON_DCACHE_PREFETCH_WAR CAVIUM_OCTEON_DCACHE_PREFETCH_WAR is a check for Octeon model CN6XXXX. By using the version check we can remove the define. Signed-off-by: Thomas Bogendoerfer commit ab5743079b8e3d3d4309664903f6b1f579168a56 Author: Thomas Bogendoerfer Date: Mon Aug 24 18:32:52 2020 +0200 MIPS: Get rid of BCM1250_M3_WAR BCM1250_M3_WAR is depending on CONFIG_CONFIG_SB1_PASS_2_WORKAROUNDS. So using this option directly lets and remove define. Signed-off-by: Thomas Bogendoerfer commit 43df4eb2fc9511e09c66252c3fec4f8933a77c73 Author: Thomas Bogendoerfer Date: Mon Aug 24 18:32:51 2020 +0200 MIPS: Replace SIBYTE_1956_WAR by CONFIG_SB1_PASS_2_WORKAROUNDS SB1250 uart bug is related to PASS 2 workarounds. Use config CONFIG_SB1_PASS_2_WORKAROUNDS directly and get rid of SIBYTE_1956_WAR. Signed-off-by: Thomas Bogendoerfer commit a7fbed988f31d3bf92415226fdf2ffd54606ad93 Author: Thomas Bogendoerfer Date: Mon Aug 24 18:32:50 2020 +0200 MIPS: Convert MIPS34K_MISSED_ITLB_WAR into a config option Use a new config option to enable MIPS 34K ITLB workaround and remove define from different war.h files. Signed-off-by: Thomas Bogendoerfer commit 256ec489f1c7726f0db9ffee88ba7cdc317806cd Author: Thomas Bogendoerfer Date: Mon Aug 24 18:32:49 2020 +0200 MIPS: Convert R10000_LLSC_WAR info a config option Use a new config option to enabel R1000_LLSC workaound and remove define from different war.h files. Signed-off-by: Thomas Bogendoerfer commit 886ee1363a3ad2b890959f07cffe8d91d995b93a Author: Thomas Bogendoerfer Date: Mon Aug 24 18:32:48 2020 +0200 MIPS: Convert ICACHE_REFILLS_WORKAROUND_WAR into a config option Use a new config option to enable I-cache refill workaround and remove define from different war.h files. Signed-off-by: Thomas Bogendoerfer commit 24a1c023f3ff3082fee9c019c17e6a34e2ddfe6b Author: Thomas Bogendoerfer Date: Mon Aug 24 18:32:47 2020 +0200 MIPS: Convert TX49XX_ICACHE_INDEX_INV into a config option Use a new config option to enable TX49XX I-cache index invalidate workaround and remove define from different war.h files. Signed-off-by: Thomas Bogendoerfer commit 142439b0520a239bc10cf6c87d7773644c5dfe04 Author: Thomas Bogendoerfer Date: Mon Aug 24 18:32:46 2020 +0200 MIPS: Remove MIPS4K_ICACHE_REFILL_WAR and MIPS_CACHE_SYNC_WAR Neither MIPS4K_ICACHE_REFILL_WAR nor MIPS_CACHE_SYNC_WAR are implemented, so removing defines for it won't change anything. Signed-off-by: Thomas Bogendoerfer commit 44def3426e4ac5a2dbdb5c8304397f4daa38eb2f Author: Thomas Bogendoerfer Date: Mon Aug 24 18:32:45 2020 +0200 MIPS: Convert R4600_V2_HIT_CACHEOP into a config option Use a new config option to enable R4600 V2 cacheop hit workaround and remove define from different war.h files. Signed-off-by: Thomas Bogendoerfer commit 5e5b6527128cea50f12a7064bf61b130b3a2739a Author: Thomas Bogendoerfer Date: Mon Aug 24 18:32:44 2020 +0200 MIPS: Convert R4600_V1_HIT_CACHEOP into a config option Use a new config option to enable R4600 V1 cacheop hit workaround and remove define from the different war.h files. Signed-off-by: Thomas Bogendoerfer commit 802b83627f54d63d3d95d0285ec9a5d80be434c0 Author: Thomas Bogendoerfer Date: Mon Aug 24 18:32:43 2020 +0200 MIPS: Convert R4600_V1_INDEX_ICACHEOP into a config option Use a new config option to enable R4600 V1 index I-cacheop workaround and remove define from different war.h files. Signed-off-by: Thomas Bogendoerfer commit f5963ba7a45fc6ff298a34976064354be437e1d8 Author: Joerg Roedel Date: Mon Sep 7 15:15:34 2020 +0200 x86/head/64: Install a CPU bringup IDT Add a separate bringup IDT for the CPU bringup code that will be used until the kernel switches to the idt_table. There are two reasons for a separate IDT: 1) When the idt_table is set up and the secondary CPUs are booted, it contains entries (e.g. IST entries) which require certain CPU state to be set up. This includes a working TSS (for IST), MSR_GS_BASE (for stack protector) or CR4.FSGSBASE (for paranoid_entry) path. By using a dedicated IDT for early boot this state need not to be set up early. 2) The idt_table is static to idt.c, so any function using/modifying must be in idt.c too. That means that all compiler driven instrumentation like tracing or KASAN is also active in this code. But during early CPU bringup the environment is not set up for this instrumentation to work correctly. To avoid all of these hassles and make early exception handling robust, use a dedicated bringup IDT. The IDT is loaded two times, first on the boot CPU while the kernel is still running on direct mapped addresses, and again later after the switch to kernel addresses has happened. The second IDT load happens on the boot and secondary CPUs. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-34-joro@8bytes.org commit 8c2ede45edbea7e970ea6bd171fc6afbec0761b3 Author: Paul Cercueil Date: Fri Sep 4 14:36:47 2020 +0200 MIPS: dts/ingenic: Cleanup qi_lb60.dts Cleanup a bit the Device Tree file: 1. Respect the number of cells in GPIO descriptors and keyboard matrix; 2. Use 'ecc-engine' instead of deprecated 'ingenic,bch-controller' property; 3. The NAND's rb-gpios is actually active high; 3. The FRE/FWE pins must be configured in the proper mode for the NAND to work if it was not already done by the bootloader. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 6af52ae2ed14a6bc756d5606b29097dfd76740b8 Merge: bb1416adb8a08 e12cec65b5546 Author: Jakub Kicinski Date: Mon Sep 7 13:16:48 2020 -0700 Merge branch 'net-bridge-mcast-initial-IGMPv3-MLDv2-support-part-1' Nikolay Aleksandrov says: ==================== net: bridge: mcast: initial IGMPv3/MLDv2 support (part 1) This patch-set implements the control plane for initial IGMPv3/MLDv2 support which takes care of include/exclude sets and state transitions based on the different report types. Patch 01 arranges the structure better by moving the frequently used fields together, patch 02 factors out the port group deletion code which is used in a few places. Patches 03 and 04 add support for source lists and group modes per port group which are dumped. Patch 05 adds support for group-and-source specific queries required for IGMPv3/MLDv2. Then patch 06 adds support for group and group-and-source query retransmissions via a new rexmit timer. Patches 07 and 08 make use of the already present mdb fill functions when sending notifications so we can have the full mdb entries' state filled in (with sources, mode etc). Patch 09 takes care of port group expiration, it switches the group mode to include and deletes it if there are no sources with active timers. Patches 10-13 are the core changes which add support for IGMPv3/MLDv2 reports and handle the source list set operations as per RFCs 3376 and 3810, all IGMPv3/MLDv2 report types with their transitions should be supported after these patches. I've used RFCs 3376, 3810 and FRR as a reference implementation. The source lists are capped at 32 entries, we can remove that limitation at a later point which would require a better data structure to hold them. IGMPv3 processing is hidden behind the bridge's multicast_igmp_version option which must be set to 3 in order to enable it. MLDv2 processing is hidden behind the bridge's multicast_mld_version which must be set to 2 in order to enable it. Patch 14 improves other querier processing a bit (more about this below). And finally patch 15 transforms the src gc so it can be used with all mcast objects since now we have multiple timers that can be running and we need to make sure they have all finished before freeing the objects. This is part 1, it only adds control plane support and doesn't change the fast path. A following patch-set will take care of that. Here're the sets that will come next (in order): - Fast path patch-set which adds support for (S, G) mdb entries needed for IGMPv3/MLDv2 forwarding, entry add source (kernel, user-space etc) needed for IGMPv3/MLDv2 entry management, entry block mode needed for IGMPv3/MLDv2 exclude mode. This set will also add iproute2 support for manipulating and showing all the new state. - Selftests patches which will verify all state transitions and forwarding - Explicit host tracking patch-set, needed for proper fast leave and with it fast leave will be enabled for IGMPv3/MLDv2 Not implemented yet: - Host IGMPv3/MLDv2 filter support (currently we handle only join/leave as before) - Proper other querier source timer and value updates - IGMPv3/v2 MLDv2/v1 compat (I have a few rough patches for this one) v4: move old patch 05 to 02 (group del patch), before src lists patch 02: set pg's fast leave flag when deleting due to fast leave patch 03: now can use the new port del function add igmpv2/mldv1 bool which are set when the entry is added in those modes (later will be passed as update_timer) patch 10: rename update_timer to igmpv2_mldv1 and use the passed value from br_multicast_add_group's callers v3: add IPv6/MLDv2 support, most patches are changed v2: patches 03-04: make src lists RCU friendly so they can be traversed when dumping, reduce limit to a more conservative 32 src group entries for a start patches 11-13: remove helper and directly do bitops patch 15: force mcast gc on bridge port del to make sure port group timers have finished before freeing the port ==================== Signed-off-by: Jakub Kicinski commit 263cdc37c18c976f05c3f5b90be515c72bf3d754 Author: Jinyang He Date: Fri Sep 4 18:29:51 2020 +0800 MIPS: Loongson64: Remove unused loongson_reboot. Commit 1bdb7b76705a ("MIPS: Loongson64: Cleanup unused code") left the loongson_reboot unused, delete it. Signed-off-by: Jinyang He Signed-off-by: Thomas Bogendoerfer commit e12cec65b5546f19217e26aafb8add6e2fadca18 Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:19 2020 +0300 net: bridge: mcast: destroy all entries via gc Since each entry type has timers that can be running simultaneously we need to make sure that entries are not freed before their timers have finished. In order to do that generalize the src gc work to mcast gc work and use a callback to free the entries (mdb, port group or src). v3: add IPv6 support v2: force mcast gc on port del to make sure all port group timers have finished before freeing the bridge port Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 23550b8313331dca297ffea07c2250e95ccca121 Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:18 2020 +0300 net: bridge: mcast: improve IGMPv3/MLDv2 query processing When an IGMPv3/MLDv2 query is received and we're operating in such mode then we need to avoid updating group timers if the suppress flag is set. Also we should update only timers for groups in exclude mode. v3: add IPv6/MLDv2 support Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 109865fe12f98509224e29f7c19a11cd9a44110e Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:17 2020 +0300 net: bridge: mcast: support for IGMPV3/MLDv2 BLOCK_OLD_SOURCES report We already have all necessary helpers, so process IGMPV3/MLDv2 BLOCK_OLD_SOURCES as per the RFCs. v3: add IPv6/MLDv2 support v2: directly do flag bit operations Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 5bf1e00b68497244350fba4847e465735f64ae5d Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:16 2020 +0300 net: bridge: mcast: support for IGMPV3/MLDv2 CHANGE_TO_INCLUDE/EXCLUDE report In order to process IGMPV3/MLDv2 CHANGE_TO_INCLUDE/EXCLUDE report types we need new helpers which allow us to mark entries based on their timer state and to query only marked entries. v3: add IPv6/MLDv2 support, fix other_query checks v2: directly do flag bit operations Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit e6231bca6a27dcc718e258b71bad42977ca3344e Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:15 2020 +0300 net: bridge: mcast: support for IGMPV3/MLDv2 MODE_IS_INCLUDE/EXCLUDE report In order to process IGMPV3/MLDv2_MODE_IS_INCLUDE/EXCLUDE report types we need some new helpers which allow us to set/clear flags for all current entries and later delete marked entries after the report sources have been processed. v3: add IPv6/MLDv2 support v2: drop flag helpers and directly do flag bit operations Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 0436862e417e8c68e7b85ebf66ffca9d54c43e9a Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:14 2020 +0300 net: bridge: mcast: support for IGMPv3/MLDv2 ALLOW_NEW_SOURCES report This patch adds handling for the ALLOW_NEW_SOURCES IGMPv3/MLDv2 report types and limits them only when multicast_igmp_version == 3 or multicast_mld_version == 2 respectively. Now that IGMPv3/MLDv2 handling functions will be managing timers we need to delay their activation, thus a new argument is added which controls if the timer should be updated. We also disable host IGMPv3/MLDv2 handling as it's not yet implemented and could cause inconsistent group state, the host can only join a group as EXCLUDE {} or leave it. v4: rename update_timer to igmpv2_mldv1 and use the passed value from br_multicast_add_group's callers v3: Add IPv6/MLDv2 support Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit d6c33d67a8385f2b74b3e464a2790a4f1b1028a3 Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:13 2020 +0300 net: bridge: mcast: delete expired port groups without srcs If an expired port group is in EXCLUDE mode, then we have to turn it into INCLUDE mode, remove all srcs with zero timer and finally remove the group itself if there are no more srcs with an active timer. For IGMPv2 use there would be no sources, so this will reduce to just removing the group as before. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 81f1983852fd1f956c0a1d465cfc6116e99e2adc Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:12 2020 +0300 net: bridge: mdb: use mdb and port entries in notifications We have to use mdb and port entries when sending mdb notifications in order to fill in all group attributes properly. Before this change we would've used a fake br_mdb_entry struct to fill in only partial information about the mdb. Now we can also reuse the mdb dump fill function and thus have only a single central place which fills the mdb attributes. v3: add IPv6 support Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 79abc87505d84ade6c624b5bb707766a8a6791a6 Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:11 2020 +0300 net: bridge: mdb: push notifications in __br_mdb_add/del This change is in preparation for using the mdb port group entries when sending a notification, so their full state and additional attributes can be filled in. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 42c11ccfe844c1df91599428d87101e07e389901 Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:10 2020 +0300 net: bridge: mcast: add support for group query retransmit We need to be able to retransmit group-specific and group-and-source specific queries. The new timer takes care of those. v3: add IPv6 support Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 438ef2d027eb325e6c9c11a72534b90699c96ae9 Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:09 2020 +0300 net: bridge: mcast: add support for group-and-source specific queries Allows br_multicast_alloc_query to build queries with the port group's source lists and sends a query for sources over and under lmqt when necessary as per RFCs 3376 and 3810 with the suppress flag set appropriately. v3: add IPv6 support Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 5205e919c9f0c5b48678f2c787871c96f665ca1b Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:08 2020 +0300 net: bridge: mcast: add support for src list and filter mode dumping Support per port group src list (address and timer) and filter mode dumping. Protected by either multicast_lock or rcu. v3: add IPv6 support v2: require RCU or multicast_lock to traverse src groups Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 8b671779b7e2db78664cf05a03ced49bcaa37874 Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:07 2020 +0300 net: bridge: mcast: add support for group source list Initial functions for group source lists which are needed for IGMPv3 and MLDv2 include/exclude lists. Both IPv4 and IPv6 sources are supported. User-added mdb entries are created with exclude filter mode, we can extend that later to allow user-supplied mode. When group src entries are deleted, they're freed from a workqueue to make sure their timers are not still running. Source entries are protected by the multicast_lock and rcu. The number of src groups per port group is limited to 32. v4: use the new port group del function directly add igmpv2/mldv1 bool to denote if the entry was added in those modes, it will later replace the old update_timer bool v3: add IPv6 support v2: allow src groups to be traversed under rcu Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 681590bd4cdc74f17dfbdfa792f027772e149e1d Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:06 2020 +0300 net: bridge: mcast: factor out port group del In order to avoid future errors and reduce code duplication we should factor out the port group del sequence. This allows us to have one function which takes care of all details when removing a port group. v4: set pg's fast leave flag when deleting due to fast leave move the patch before adding source lists Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 6ec0d0ee66473469ea85a2da204eefc14c465c5e Author: Nikolay Aleksandrov Date: Mon Sep 7 12:56:05 2020 +0300 net: bridge: mdb: arrange internal structs so fast-path fields are close Before this patch we'd need 2 cache lines for fast-path, now all used fields are in the first cache line. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 3add38cb96a1ae7d152db69ab4329e809c2af2d4 Author: Joerg Roedel Date: Mon Sep 7 15:15:33 2020 +0200 x86/head/64: Switch to initial stack earlier Make sure there is a stack once the kernel runs from virtual addresses. At this stage any secondary CPU which boots will have lost its stack because the kernel switched to a new page-table which does not map the real-mode stack anymore. This is needed for handling early #VC exceptions caused by instructions like CPUID. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-33-joro@8bytes.org commit 7b99819dfb60268cc1c75f83c949bc4a09221bea Author: Joerg Roedel Date: Mon Sep 7 15:15:32 2020 +0200 x86/head/64: Load segment registers earlier Make sure segments are properly set up before setting up an IDT and doing anything that might cause a #VC exception. This is later needed for early exception handling. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-32-joro@8bytes.org commit bb1416adb8a084f2979ac9536dca3e4c44d45821 Author: Linus Walleij Date: Sun Sep 6 23:24:15 2020 +0200 net: dsa: rtl8366rb: Switch to phylink This switches the RTL8366RB over to using phylink callbacks instead of .adjust_link(). This is a pretty template switchover. All we adjust is the CPU port so that is why the code only inspects this port. We enhance by adding proper error messages, also disabling the CPU port on the way down and moving dev_info() to dev_dbg(). Signed-off-by: Linus Walleij Signed-off-by: Jakub Kicinski commit e04b88336360e101329add0c05e5cb1cebae64fd Author: Joerg Roedel Date: Mon Sep 7 15:15:31 2020 +0200 x86/head/64: Load GDT after switch to virtual addresses Load the GDT right after switching to virtual addresses to make sure there is a defined GDT for exception handling. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-31-joro@8bytes.org commit 866b556efa1295934ed0bc20c2f208c93a873fb0 Author: Joerg Roedel Date: Mon Sep 7 15:15:30 2020 +0200 x86/head/64: Install startup GDT Handling exceptions during boot requires a working GDT. The kernel GDT can't be used on the direct mapping, so load a startup GDT and setup segments. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-30-joro@8bytes.org commit 4bed2266cc6f9c3f6cd91378ea4fc76edde674cf Author: Joerg Roedel Date: Mon Sep 7 15:15:29 2020 +0200 x86/idt: Split idt_data setup out of set_intr_gate() The code to setup idt_data is needed for early exception handling, but set_intr_gate() can't be used that early because it has pv-ops in its code path which don't work that early. Split out the idt_data initialization part from set_intr_gate() so that it can be used separately. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-29-joro@8bytes.org commit d966ddcc38217a6110a6a0ff37ad2dee7d42e23e Author: Hoang Huu Le Date: Mon Sep 7 13:17:25 2020 +0700 tipc: fix a deadlock when flushing scheduled work In the commit fdeba99b1e58 ("tipc: fix use-after-free in tipc_bcast_get_mode"), we're trying to make sure the tipc_net_finalize_work work item finished if it enqueued. But calling flush_scheduled_work() is not just affecting above work item but either any scheduled work. This has turned out to be overkill and caused to deadlock as syzbot reported: ====================================================== WARNING: possible circular locking dependency detected 5.9.0-rc2-next-20200828-syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:6/349 is trying to acquire lock: ffff8880aa063d38 ((wq_completion)events){+.+.}-{0:0}, at: flush_workqueue+0xe1/0x13e0 kernel/workqueue.c:2777 but task is already holding lock: ffffffff8a879430 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0x9b/0xb10 net/core/net_namespace.c:565 [...] Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(pernet_ops_rwsem); lock(&sb->s_type->i_mutex_key#13); lock(pernet_ops_rwsem); lock((wq_completion)events); *** DEADLOCK *** [...] v1: To fix the original issue, we replace above calling by introducing a bit flag. When a namespace cleaned-up, bit flag is set to zero and: - tipc_net_finalize functionial just does return immediately. - tipc_net_finalize_work does not enqueue into the scheduled work queue. v2: Use cancel_work_sync() helper to make sure ONLY the tipc_net_finalize_work() stopped before releasing bcbase object. Reported-by: syzbot+d5aa7e0385f6a5d0f4fd@syzkaller.appspotmail.com Fixes: fdeba99b1e58 ("tipc: fix use-after-free in tipc_bcast_get_mode") Acked-by: Jon Maloy Signed-off-by: Hoang Huu Le Signed-off-by: Jakub Kicinski commit a7de15d489d956217b47671705ac2218ca50eaae Author: Tom Lendacky Date: Mon Sep 7 15:15:28 2020 +0200 x86/sev-es: Add CPUID handling to #VC handler Handle #VC exceptions caused by CPUID instructions. These happen in early boot code when the KASLR code checks for RDTSC. Signed-off-by: Tom Lendacky [ jroedel@suse.de: Adapt to #VC handling framework ] Co-developed-by: Joerg Roedel Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-28-joro@8bytes.org commit 2abaad678575acd54e9939e1174becd82ecc884b Author: Alex Dewar Date: Fri Sep 4 17:37:10 2020 +0100 spi: qup: Allow for compile-testing on !ARM There seems no reason to restrict testing to ARM, so remove this constraint to improve test coverage. Build-tested with allyesconfig on x86. Signed-off-by: Alex Dewar Link: https://lore.kernel.org/r/20200904163709.110975-1-alex.dewar90@gmail.com Signed-off-by: Mark Brown commit 1b4fb8545f2b00f2844c4b7619d64d98440a477c Author: Joerg Roedel Date: Mon Sep 7 15:15:27 2020 +0200 x86/fpu: Move xgetbv()/xsetbv() into a separate header The xgetbv() function is needed in the pre-decompression boot code, but asm/fpu/internal.h can't be included there directly. Doing so opens the door to include-hell due to various include-magic in boot/compressed/misc.h. Avoid that by moving xgetbv()/xsetbv() to a separate header file and include it instead. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-27-joro@8bytes.org commit 567444fbddf5674895e1b69eabfc34ea31725bbe Merge: 6dc9674d95b8a e9c142b0d2c08 Author: Mark Brown Date: Mon Sep 7 18:49:14 2020 +0100 Merge series "regulator: unexport regulator_lock/unlock()" from Michał Mirosław : This removes regulator_lock/unlock() calls around regulator_notifier_call_chain() as they are redundant - drivers already have to guarantee regulator_dev's existence during the call. This should make reasoing about the lock easier, as this was the only use outside regulator core code. The only client that needed recursive locking from the notifier chain was drivers/usb/host/ohci-da8xx.c, which responds to over-current notification by calling regulator_disable(). Michał Mirosław (3): regulator: don't require mutex for regulator_notifier_call_chain() regulator: remove locking around regulator_notifier_call_chain() regulator: unexport regulator_lock/unlock() drivers/regulator/core.c | 11 +++-------- drivers/regulator/da9055-regulator.c | 2 -- drivers/regulator/da9062-regulator.c | 2 -- drivers/regulator/da9063-regulator.c | 2 -- drivers/regulator/da9210-regulator.c | 4 ---- drivers/regulator/da9211-regulator.c | 4 ---- drivers/regulator/lp8755.c | 6 ------ drivers/regulator/ltc3589.c | 10 ++-------- drivers/regulator/ltc3676.c | 10 ++-------- drivers/regulator/pv88060-regulator.c | 10 ++-------- drivers/regulator/pv88080-regulator.c | 10 ++-------- drivers/regulator/pv88090-regulator.c | 10 ++-------- drivers/regulator/slg51000-regulator.c | 4 ---- drivers/regulator/stpmic1_regulator.c | 4 ---- drivers/regulator/wm831x-dcdc.c | 4 ---- drivers/regulator/wm831x-isink.c | 2 -- drivers/regulator/wm831x-ldo.c | 2 -- drivers/regulator/wm8350-regulator.c | 2 -- include/linux/regulator/driver.h | 3 --- 19 files changed, 13 insertions(+), 89 deletions(-) -- 2.20.1 commit 6dc9674d95b8a8a81b85a4bed77f86d1b039be10 Author: Charles Keepax Date: Fri Sep 4 13:25:06 2020 +0100 regulator: lochnagar: Add additional VDDCORE range In the case of an unrecognised mini-card the Lochnagar will not initialise the VDDCORE voltage register leading to a value outside of the current range. Add an additional range to cover these values, initially this wasn't done since they are duplicates of the existing minimum value. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200904122506.28017-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 25189d08e5168c098c307a0eaae5b30c13a331ef Author: Tom Lendacky Date: Mon Sep 7 15:15:26 2020 +0200 x86/sev-es: Add support for handling IOIO exceptions Add support for decoding and handling #VC exceptions for IOIO events. [ jroedel@suse.de: Adapted code to #VC handling framework ] Co-developed-by: Joerg Roedel Signed-off-by: Tom Lendacky Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-26-joro@8bytes.org commit 69add17a7c1992593a7cf775a66e0256ad4b3ef8 Author: Joerg Roedel Date: Mon Sep 7 15:15:25 2020 +0200 x86/boot/compressed/64: Unmap GHCB page before booting the kernel Force a page-fault on any further accesses to the GHCB page when they shouldn't happen anymore. This will catch any bugs where a #VC exception is raised even though none is expected anymore. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-25-joro@8bytes.org commit 597cfe48212a3f110ab0f918bf59791f453e65b7 Author: Joerg Roedel Date: Mon Sep 7 15:15:24 2020 +0200 x86/boot/compressed/64: Setup a GHCB-based VC Exception handler Install an exception handler for #VC exception that uses a GHCB. Also add the infrastructure for handling different exit-codes by decoding the instruction that caused the exception and error handling. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-24-joro@8bytes.org commit c81d60029a1393183d2125fcb4b64831629b8864 Author: Joerg Roedel Date: Mon Sep 7 15:15:23 2020 +0200 x86/boot/compressed/64: Add set_page_en/decrypted() helpers The functions are needed to map the GHCB for SEV-ES guests. The GHCB is used for communication with the hypervisor, so its content must not be encrypted. After the GHCB is not needed anymore it must be mapped encrypted again so that the running kernel image can safely re-use the memory. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-23-joro@8bytes.org commit 4b3fdca64a7e8ad90c87cad1fbc6991471f48dc7 Author: Joerg Roedel Date: Mon Sep 7 15:15:22 2020 +0200 x86/boot/compressed/64: Check return value of kernel_ident_mapping_init() The function can fail to create an identity mapping, check for that and bail out if it happens. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-22-joro@8bytes.org commit c2a0304a286f386e45cea3f4b0617f0813de67fd Author: Joerg Roedel Date: Mon Sep 7 15:15:21 2020 +0200 x86/boot/compressed/64: Call set_sev_encryption_mask() earlier Call set_sev_encryption_mask() while still on the stage 1 #VC-handler because the stage 2 handler needs the kernel's own page tables to be set up, to which calling set_sev_encryption_mask() is a prerequisite. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-21-joro@8bytes.org commit 29dcc60f6a19fb0aaee97bd1ae2ed8a7dc6f0cfe Author: Joerg Roedel Date: Mon Sep 7 15:15:20 2020 +0200 x86/boot/compressed/64: Add stage1 #VC handler Add the first handler for #VC exceptions. At stage 1 there is no GHCB yet because the kernel might still be running on the EFI page table. The stage 1 handler is limited to the MSR-based protocol to talk to the hypervisor and can only support CPUID exit-codes, but that is enough to get to stage 2. [ bp: Zap superfluous newlines after rd/wrmsr instruction mnemonics. ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-20-joro@8bytes.org commit 21cf2372618ef167d8c4ae04880fb873b55b2daa Author: Joerg Roedel Date: Mon Sep 7 15:15:19 2020 +0200 x86/boot/compressed/64: Change add_identity_map() to take start and end Changing the function to take start and end as parameters instead of start and size simplifies the callers which don't need to calculate the size if they already have start and end. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-19-joro@8bytes.org commit 8570978ea030757839747aa9944ea576708be3d4 Author: Joerg Roedel Date: Mon Sep 7 15:15:18 2020 +0200 x86/boot/compressed/64: Don't pre-map memory in KASLR code With the page-fault handler in place, he identity mapping can be built on-demand. So remove the code which manually creates the mappings and unexport/remove the functions used for it. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-18-joro@8bytes.org commit ca0e22d4f011a56e974fa3a712d76e86a791559d Author: Joerg Roedel Date: Mon Sep 7 15:15:17 2020 +0200 x86/boot/compressed/64: Always switch to own page table When booted through startup_64(), the kernel keeps running on the EFI page table until the KASLR code sets up its own page table. Without KASLR, the pre-decompression boot code never switches off the EFI page table. Change that by unconditionally switching to a kernel-controlled page table after relocation. This makes sure the kernel can make changes to the mapping when necessary, for example map pages unencrypted in SEV and SEV-ES guests. Also, remove the debug_putstr() calls in initialize_identity_maps() because the function now runs before console_init() is called. [ bp: Massage commit message. ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-17-joro@8bytes.org commit 8b0d3b3b41ab6f14f1ce6d4a6b1c5f60b825123f Author: Joerg Roedel Date: Mon Sep 7 15:15:16 2020 +0200 x86/boot/compressed/64: Add page-fault handler Install a page-fault handler to add an identity mapping to addresses not yet mapped. Also do some checking whether the error code is sane. This makes non SEV-ES machines use the exception handling infrastructure in the pre-decompressions boot code too, making it less likely to break in the future. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-16-joro@8bytes.org commit 5f2bb01682b7b067783207994c7b8a3dbeb1cd83 Author: Joerg Roedel Date: Mon Sep 7 15:15:15 2020 +0200 x86/boot/compressed/64: Rename kaslr_64.c to ident_map_64.c The file contains only code related to identity-mapped page tables. Rename the file and compile it always in. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-15-joro@8bytes.org commit 64e682638eb51070ba6044535b250aad43c5564e Author: Joerg Roedel Date: Mon Sep 7 15:15:14 2020 +0200 x86/boot/compressed/64: Add IDT Infrastructure Add code needed to setup an IDT in the early pre-decompression boot-code. The IDT is loaded first in startup_64, which is after EfiExitBootServices() has been called, and later reloaded when the kernel image has been relocated to the end of the decompression area. This allows to setup different IDT handlers before and after the relocation. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-14-joro@8bytes.org commit 6ba0efa46047936afa81460489cfd24bc95dd863 Author: Joerg Roedel Date: Mon Sep 7 15:15:13 2020 +0200 x86/boot/compressed/64: Disable red-zone usage The x86-64 ABI defines a red-zone on the stack: The 128-byte area beyond the location pointed to by %rsp is considered to be reserved and shall not be modified by signal or interrupt handlers. Therefore, functions may use this area for temporary data that is not needed across function calls. In particular, leaf functions may use this area for their entire stack frame, rather than adjusting the stack pointer in the prologue and epilogue. This area is known as the red zone. This is not compatible with exception handling, because the IRET frame written by the hardware at the stack pointer and the functions to handle the exception will overwrite the temporary variables of the interrupted function, causing undefined behavior. So disable red-zones for the pre-decompression boot code. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200907131613.12703-13-joro@8bytes.org commit 5901781a11175a5e5ee91746ec8627f18d47eebd Author: Joerg Roedel Date: Mon Sep 7 15:15:12 2020 +0200 x86/insn: Add insn_has_rep_prefix() helper Add a function to check whether an instruction has a REP prefix. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Reviewed-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20200907131613.12703-12-joro@8bytes.org commit 976bc5e2aceedef13e0ba1f0e6e372a22164aa0c Author: Borislav Petkov Date: Mon Sep 7 15:15:05 2020 +0200 KVM: SVM: Use __packed shorthand Use the shorthand to make it more readable. No functional changes. Signed-off-by: Borislav Petkov Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-5-joro@8bytes.org commit 7af1bd822dd45a669fc178a35cc8183922333d56 Author: Joerg Roedel Date: Mon Sep 7 15:15:11 2020 +0200 x86/insn: Add insn_get_modrm_reg_off() Add a function to the instruction decoder which returns the pt_regs offset of the register specified in the reg field of the modrm byte. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Acked-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20200907131613.12703-11-joro@8bytes.org commit 3702c2f4eed2188440f65ecdfc89165106fe565d Author: Joerg Roedel Date: Mon Sep 7 15:15:04 2020 +0200 KVM: SVM: Add GHCB Accessor functions Building a correct GHCB for the hypervisor requires setting valid bits in the GHCB. Simplify that process by providing accessor functions to set values and to update the valid bitmap and to check the valid bitmap in KVM. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-4-joro@8bytes.org commit 172639d79977ca7b5ce6f84f6606262f4081718f Author: Joerg Roedel Date: Mon Sep 7 15:15:10 2020 +0200 x86/umip: Factor out instruction decoding Factor out the code used to decode an instruction with the correct address and operand sizes to a helper function. No functional changes. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-10-joro@8bytes.org commit d07f46f9f51afc7fc9f021eae19eba3c2e7870ac Author: Tom Lendacky Date: Mon Sep 7 15:15:03 2020 +0200 KVM: SVM: Add GHCB definitions Extend the vmcb_safe_area with SEV-ES fields and add a new 'struct ghcb' which will be used for guest-hypervisor communication. Signed-off-by: Tom Lendacky Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-3-joro@8bytes.org commit 172b75e56b08846e6fb07a88e5685ce4e24f4620 Author: Joerg Roedel Date: Mon Sep 7 15:15:09 2020 +0200 x86/umip: Factor out instruction fetch Factor out the code to fetch the instruction from user-space to a helper function. No functional changes. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-9-joro@8bytes.org commit 6ccbd29ade0d159ee1be398dc9defaae567c253d Author: Joerg Roedel Date: Mon Sep 7 15:15:02 2020 +0200 KVM: SVM: nested: Don't allocate VMCB structures on stack Do not allocate a vmcb_control_area and a vmcb_save_area on the stack, as these structures will become larger with future extenstions of SVM and thus the svm_set_nested_state() function will become a too large stack frame. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-2-joro@8bytes.org commit 05a2ae7c033ee30f25fbed3ceed549a5cac398a9 Author: Joerg Roedel Date: Mon Sep 7 15:15:08 2020 +0200 x86/insn: Make inat-tables.c suitable for pre-decompression code The inat-tables.c file has some arrays in it that contain pointers to other arrays. These pointers need to be relocated when the kernel image is moved to a different location. The pre-decompression boot-code has no support for applying ELF relocations, so initialize these arrays at runtime in the pre-decompression code to make sure all pointers are correctly initialized. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Acked-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20200907131613.12703-8-joro@8bytes.org commit 05a2fdf3230306daee1def019b8f52cd06bd2e48 Author: Joerg Roedel Date: Mon Sep 7 15:15:07 2020 +0200 x86/traps: Move pf error codes to Move the definition of the x86 page-fault error code bits to a new header file asm/trap_pf.h. This makes it easier to include them into pre-decompression boot code. No functional changes. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-7-joro@8bytes.org commit 360e7c5c4ca4fd8e627781ed42f95d58bc3bb732 Author: Tom Lendacky Date: Mon Sep 7 15:15:06 2020 +0200 x86/cpufeatures: Add SEV-ES CPU feature Add CPU feature detection for Secure Encrypted Virtualization with Encrypted State. This feature enhances SEV by also encrypting the guest register state, making it in-accessible to the hypervisor. Signed-off-by: Tom Lendacky Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200907131613.12703-6-joro@8bytes.org commit c48f46ac7bf3946032cbaf70238c277382eedd1b Merge: 28b590f418dd0 61aa9a0a5eae2 Author: Borislav Petkov Date: Mon Sep 7 19:43:43 2020 +0200 Merge 'x86/cpu' to pick up dependent bits Pick up work happening in parallel to avoid nasty merge conflicts later. Signed-off-by: Borislav Petkov commit 44fdf4ed2693eb05dbfa83beaa6fe5fbd0c2f6d0 Author: Qi Liu Date: Fri Sep 4 17:57:38 2020 +0800 arm64: perf: Remove unnecessary event_idx check event_idx is obtained from armv8pmu_get_event_idx(), and this idx must be between ARMV8_IDX_CYCLE_COUNTER and cpu_pmu->num_events. So it's unnecessary to do this check. Let's remove it. Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1599213458-28394-1-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit e9c142b0d2c08178a9e146d47d8fe397373bda3e Author: Michał Mirosław Date: Mon Aug 10 06:33:32 2020 +0200 regulator: remove locking around regulator_notifier_call_chain() regulator_notifier_call_chain() doesn't need rdev lock and rdev's existence is assumed in the code anyway. Remove the locks from drivers. Signed-off-by: Michał Mirosław Acked-by: Adam Thomson Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/42393f66dcc4d80dcd9797be45216b4035aa96cb.1597032945.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 3bca239d6184df61a619d78764e0481242d844b4 Author: Michał Mirosław Date: Mon Aug 10 06:33:32 2020 +0200 regulator: don't require mutex for regulator_notifier_call_chain() Since 3801b86aa482 ("regulator: Refactor supply implementation to work as regular consumers") we no longer cascade notifications and so notifier head's built-in rwsem is enough to protect the notifier chain. Remove the requirement to fix one case where rdev->mutex might be forced to be taken recursively. Signed-off-by: Michał Mirosław Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/5a0da9017c69a4dbc3f9b50f44476fce80a73387.1597032945.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b Author: Jan Kara Date: Fri Sep 4 10:58:51 2020 +0200 fs: Don't invalidate page buffers in block_write_full_page() If block_write_full_page() is called for a page that is beyond current inode size, it will truncate page buffers for the page and return 0. This logic has been added in 2.5.62 in commit 81eb69062588 ("fix ext3 BUG due to race with truncate") in history.git tree to fix a problem with ext3 in data=ordered mode. This particular problem doesn't exist anymore because ext3 is long gone and ext4 handles ordered data differently. Also normally buffers are invalidated by truncate code and there's no need to specially handle this in ->writepage() code. This invalidation of page buffers in block_write_full_page() is causing issues to filesystems (e.g. ext4 or ocfs2) when block device is shrunk under filesystem's hands and metadata buffers get discarded while being tracked by the journalling layer. Although it is obviously "not supported" it can cause kernel crashes like: [ 7986.689400] BUG: unable to handle kernel NULL pointer dereference at +0000000000000008 [ 7986.697197] PGD 0 P4D 0 [ 7986.699724] Oops: 0002 [#1] SMP PTI [ 7986.703200] CPU: 4 PID: 203778 Comm: jbd2/dm-3-8 Kdump: loaded Tainted: G +O --------- - - 4.18.0-147.5.0.5.h126.eulerosv2r9.x86_64 #1 [ 7986.716438] Hardware name: Huawei RH2288H V3/BC11HGSA0, BIOS 1.57 08/11/2015 [ 7986.723462] RIP: 0010:jbd2_journal_grab_journal_head+0x1b/0x40 [jbd2] ... [ 7986.810150] Call Trace: [ 7986.812595] __jbd2_journal_insert_checkpoint+0x23/0x70 [jbd2] [ 7986.818408] jbd2_journal_commit_transaction+0x155f/0x1b60 [jbd2] [ 7986.836467] kjournald2+0xbd/0x270 [jbd2] which is not great. The crash happens because bh->b_private is suddently NULL although BH_JBD flag is still set (this is because block_invalidatepage() cleared BH_Mapped flag and subsequent bh lookup found buffer without BH_Mapped set, called init_page_buffers() which has rewritten bh->b_private). So just remove the invalidation in block_write_full_page(). Note that the buffer cache invalidation when block device changes size is already careful to avoid similar problems by using invalidate_mapping_pages() which skips busy buffers so it was only this odd block_write_full_page() behavior that could tear down bdev buffers under filesystem's hands. Reported-by: Ye Bin Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig CC: stable@vger.kernel.org Signed-off-by: Jens Axboe commit f437bc1ec731d3c8e45daecec7d89fc82bb76d12 Author: Maxime Ripard Date: Thu Sep 3 10:01:51 2020 +0200 drm/vc4: drv: Support BCM2711 The BCM2711 has a reworked display pipeline, and the load tracker needs some adjustment to operate properly. Let's add a compatible for BCM2711 and disable the load tracker until properly supported. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/beac4f9ef0261bca731a0402c8354e9af740519c.1599120059.git-series.maxime@cerno.tech commit b5d1443aa3264f6d035a5b6fc46d6ea232a0dfc7 Author: Maxime Ripard Date: Thu Sep 3 10:01:50 2020 +0200 dt-bindings: display: vc4: Document BCM2711 VC5 The BCM2711 comes with a new VideoCore. Add a compatible for it. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Rob Herring Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1075091c50b378505a9a89f760af11f0e1e26e5b.1599120059.git-series.maxime@cerno.tech commit 2e3725b05b785e73482a194b99bff3d5a1c85140 Author: Maxime Ripard Date: Thu Sep 3 10:01:49 2020 +0200 dt-bindings: display: vc4: hdmi: Add BCM2711 HDMI controllers bindings The HDMI controllers found in the BCM2711 SoC need some adjustments to the bindings, especially since the registers have been shuffled around in more register ranges. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Rob Herring Reviewed-by: Hoegeun Kwon Link: https://patchwork.freedesktop.org/patch/msgid/ecd686e9b2335275bfb1ccfe1878305367b34bf3.1599120059.git-series.maxime@cerno.tech commit 8323989140f3e58e3e1da03a3b66ce5c8d65798a Author: Maxime Ripard Date: Thu Sep 3 10:01:48 2020 +0200 drm/vc4: hdmi: Support the BCM2711 HDMI controllers Now that the driver is ready for it, let's bring in the HDMI controllers variants for the BCM2711. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/b540c7a9ebb7ad51da39271a8388b69c7e27e582.1599120059.git-series.maxime@cerno.tech commit 373874298cac99dc5b32f831f9aff5e64f75de85 Author: Hoegeun Kwon Date: Thu Sep 3 10:01:47 2020 +0200 drm/vc4: hdmi: Add pixel BVB clock control The BCM2711 has another clock that needs to be ramped up depending on the pixel rate: the pixel BVB clock. Add the code to adjust that clock when changing the mode. [Maxime: Changed the commit log, used clk_set_min_rate] Signed-off-by: Hoegeun Kwon Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://lore.kernel.org/r/20200901040759.29992-3-hoegeun.kwon@samsung.com Link: https://patchwork.freedesktop.org/patch/msgid/d757ddd6549da140f178563e5fd2bf1d129913fd.1599120059.git-series.maxime@cerno.tech commit 81d830137bdb462ca0bef91ba1f187d7be5d0081 Author: Maxime Ripard Date: Thu Sep 3 10:01:46 2020 +0200 drm/vc4: hdmi: Switch to blank pixels when disabled In order to avoid pixels getting stuck in an unflushable FIFO, we need when we disable the HDMI controller to switch away from getting our pixels from the pixelvalve and instead use blank pixels, and switch back to the pixelvalve when we enable the HDMI controller. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/fde3efb1ad79f4476a73d310cbba3ec07dc6dabe.1599120059.git-series.maxime@cerno.tech commit 8b3f90e98e17644ee4899da953816d124fb1ac9f Author: Maxime Ripard Date: Thu Sep 3 10:01:45 2020 +0200 drm/vc4: hdmi: Do the VID_CTL configuration at once The VID_CTL setup is done in several places in the driver even though it's not really required. Let's simplify it a bit to do the configuration in one go. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/08e7ebb605a560fcc149b69b4af52753a7870b2f.1599120059.git-series.maxime@cerno.tech commit 09c438139b8f5b832823db2e2a8a29f990647fc5 Author: Maxime Ripard Date: Thu Sep 3 10:01:44 2020 +0200 drm/vc4: hdmi: Implement finer-grained hooks In order to prevent some pixels getting stuck in an unflushable FIFO on bcm2711, we need to enable the HVS, the pixelvalve (the CRTC) and the HDMI controller (the encoder) in an intertwined way, and with tight delays. However, the atomic callbacks don't really provide a way to work with either constraints, so we need to roll our own callbacks so that we can provide those guarantees. Since those callbacks have been implemented and called in the CRTC code, we can just implement them in the HDMI driver now. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/2e9226d971117065f3b97e597f04f7fe2f0c134c.1599120059.git-series.maxime@cerno.tech commit 691456f622a96b4e90e7798a671c7753d924375f Author: Maxime Ripard Date: Thu Sep 3 10:01:43 2020 +0200 drm/vc4: hdmi: Always recenter the HDMI FIFO In order to avoid a pixel getting stuck in an unflushable FIFO, we need to recenter the FIFO every time we're doing a modeset and not only if we're connected to an HDMI monitor. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/b3faaf05ac6c4d3c364d28fa441571eb85903269.1599120059.git-series.maxime@cerno.tech commit 1bb0522e92ec8047037513a4ea9bdf76c42bce96 Author: Maxime Ripard Date: Thu Sep 3 10:01:42 2020 +0200 drm/vc4: hdmi: Remove register dumps in enable The current code has some logic, disabled by default, to dump the register setup in the HDMI controller. However, since we're going to split those functions in multiple, shorter, functions that only make sense where they are called in sequence, keeping the register dump makes little sense. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/c8c8d388f2d32fc3536336be36d003a862487eb7.1599120059.git-series.maxime@cerno.tech commit 9be43a5a6de5e89bbb7fa137a2348735e48d85f0 Author: Maxime Ripard Date: Thu Sep 3 10:01:41 2020 +0200 drm/vc4: hdmi: Deal with multiple ALSA cards The HDMI driver was registering a single ALSA card so far with the name vc4-hdmi. Obviously, this is not going to work anymore when we will have multiple HDMI controllers since we will end up trying to register two files with the same name. Let's use the variant to avoid that name conflict. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/e60a37444e848a384a45707a21d6df8883115f86.1599120059.git-series.maxime@cerno.tech commit 632ee3aa8786e41c3adfc1eb13223f1bbd20f46d Author: Dave Stevenson Date: Thu Sep 3 10:01:40 2020 +0200 drm/vc4: hdmi: Add audio-related callbacks The audio configuration has changed for the BCM2711, with notably a different parent clock and a different channel configuration. Make that modular to be able to support the BCM2711. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Link: https://patchwork.freedesktop.org/patch/msgid/85a8ca721c2d800be758c55870cea98536749680.1599120059.git-series.maxime@cerno.tech commit b9b8bac60ab3917fb37de0eb8bd5ddfefa2d89f4 Author: Dave Stevenson Date: Thu Sep 3 10:01:39 2020 +0200 drm/vc4: hdmi: Set the b-frame marker to the match ALSA's default. ALSA's iec958 plugin by default sets the block start preamble to 8, whilst this driver was programming the hardware to expect 0xF. Amend the hardware config to match ALSA. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Link: https://patchwork.freedesktop.org/patch/msgid/d0b126deb228baf1244c91e02ac0a8f7c9c60dc5.1599120059.git-series.maxime@cerno.tech commit 6ac1c7532217509379a8de5da9a4cc3a79aa99aa Author: Dave Stevenson Date: Thu Sep 3 10:01:38 2020 +0200 drm/vc4: hdmi: Reset audio infoframe on encoder_enable if previously streaming If the encoder is disabled and re-enabled (eg mode change) all infoframes are reset, whilst the audio subsystem know nothing about this change. The driver therefore needs to reinstate the audio infoframe for itself. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Link: https://patchwork.freedesktop.org/patch/msgid/cd579ccc2c9b9d2fce0ebaf32f847cedb0e4a7a2.1599120059.git-series.maxime@cerno.tech commit 094864bd0054ea831b573f733cf2a5a0741f7cb5 Author: Dave Stevenson Date: Thu Sep 3 10:01:37 2020 +0200 drm/vc4: hdmi: Use reg-names to retrieve the HDMI audio registers The register range used for audio setup in the previous generations of SoC were always the second range in the device tree. However, now that the BCM2711 has way more register ranges, it makes sense to retrieve it by names for it, while preserving the id-based lookup as a fallback. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Link: https://patchwork.freedesktop.org/patch/msgid/a1ba5605fe1006a1ead5262ef3d66ea5d0750381.1599120059.git-series.maxime@cerno.tech commit d5d5ce885c00af156325bf463657651284e61d40 Author: Maxime Ripard Date: Thu Sep 3 10:01:36 2020 +0200 drm/vc4: hdmi: Use clk_set_min_rate instead The HSM clock needs to be running at 101% the pixel clock of the HDMI controller, however it's shared between the two HDMI controllers, which means that if the resolutions are different between the two HDMI controllers, and the lowest resolution is on the second (in enable order) controller, the first HDMI controller will end up with a smaller than expected clock rate. Since we don't really need an exact frequency there, we can simply change the minimum rate we expect instead. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/821992209cc0d7a83254bf26fe2bf507ef0994d2.1599120059.git-series.maxime@cerno.tech commit cd4cb49dc5bb5f8595ed7828e41329e9380fd0b1 Author: Maxime Ripard Date: Thu Sep 3 10:01:35 2020 +0200 drm/vc4: hdmi: Adjust HSM clock rate depending on pixel rate The HSM clock needs to be setup at around 101% of the pixel rate. This was done previously by setting the clock rate to 163.7MHz at probe time and only check in mode_valid whether the mode pixel clock was under the pixel clock +1% or not. However, with 4k we need to change that frequency to a higher frequency than 163.7MHz, and yet want to have the lowest clock as possible to have a decent power saving. Let's change that logic a bit by setting the clock rate of the HSM clock to the pixel rate at encoder_enable time. This would work for the BCM2711 that support 4k resolutions and has a clock that can provide it, but we still have to take care of a 4k panel plugged on a BCM283x SoCs that wouldn't be able to use those modes, so let's define the limit in the variant. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/7e692ddc231d33dd671e70ea04dd1dcf56c1ecb3.1599120059.git-series.maxime@cerno.tech commit 11a1731eb6eac76a446d837dba115e67d24a6ee1 Author: Maxime Ripard Date: Thu Sep 3 10:01:34 2020 +0200 drm/vc4: hdmi: Rename drm_encoder pointer in mode_valid The mode_valid hook on the encoder uses a pointer to a drm_encoder called crtc, which is pretty confusing. Let's rename it to encoder to make it clear what it is. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/7fbabab03992efe4a3a3640ac5ee2bb49b1c7338.1599120059.git-series.maxime@cerno.tech commit 4c55c2c40dc9a2914e668cd9152200653b99ff4a Author: Maxime Ripard Date: Thu Sep 3 10:01:33 2020 +0200 drm/vc4: hdmi: Remove unused CEC_CLOCK_DIV define The CEC_CLOCK_DIV define is not used anywhere in the driver, let's remove it. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/53805cc47e99a137e5f08c92fb781cc2e2134299.1599120059.git-series.maxime@cerno.tech commit 234f4212ecec4f7f5db7a8698392569770b395b2 Author: Maxime Ripard Date: Thu Sep 3 10:01:32 2020 +0200 drm/vc4: hdmi: Add CEC support flag Similarly to the audio support, CEC support is not there yet for the BCM2711, so let's skip entirely the CEC initialization through a variant flag. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/bd0c4afa83b4e121692352cdc2dd1886162c7552.1599120059.git-series.maxime@cerno.tech commit c0791e08380117c2d52e63f0e03d73610ce07858 Author: Maxime Ripard Date: Thu Sep 3 10:01:31 2020 +0200 drm/vc4: hdmi: Move CEC init to its own function The CEC init code was put directly into the bind function, which was quite inconsistent with how the audio support was done, and would prevent us from further changes to skip that initialisation entirely. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/21f4717e076291522d0784a7fd3774d8e97eaf01.1599120059.git-series.maxime@cerno.tech commit b2405c98260ad5ce08c1b33b82198812ba3e004e Author: Maxime Ripard Date: Thu Sep 3 10:01:30 2020 +0200 drm/vc4: hdmi: Deal with multiple debugfs files The HDMI driver was registering a single debugfs file so far with the name hdmi_regs. Obviously, this is not going to work anymore when will have multiple HDMI controllers since we will end up trying to register two files with the same name. Let's use the variant to avoid that name conflict. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/9505c1eb40b3ef3709277bf9e8af77917b249c32.1599120059.git-series.maxime@cerno.tech commit 7d73299dad3edd3e3caf7b9d2817c3db931a26d3 Author: Maxime Ripard Date: Thu Sep 3 10:01:29 2020 +0200 drm/vc4: hdmi: Store the encoder type in the variant structure The vc4 CRTC will use the encoder type to control its output clock muxing. However, this will be different from HDMI0 to HDMI1, so let's store our type in the variant structure so that we can support multiple controllers later on. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/2736a86b498551ba9dbc5803c5bb910627a2550c.1599120059.git-series.maxime@cerno.tech commit 904f668adcdeb71aa7bcf6a1aad731bb7b363b13 Author: Maxime Ripard Date: Thu Sep 3 10:01:28 2020 +0200 drm/vc4: hdmi: Add a set_timings callback Similarly to the previous patches, the timings setup in the HDMI controller of the BCM2711 is slightly different, mostly because it supports higher resolutions and thus needed more spaces for the various timings, resulting in the register layout changing. Let's add a callback for that as well. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/0cfcbb379212f90b4abc76c0ccf3b90d1d7c0268.1599120059.git-series.maxime@cerno.tech commit 89f31a23fd1302eb8e717605ee87e39e222600d7 Author: Maxime Ripard Date: Thu Sep 3 10:01:27 2020 +0200 drm/vc4: hdmi: Add a CSC setup callback Similarly to the previous patches, the CSC setup is slightly different in the BCM2711 than in the previous generations. Let's add a callback for it. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/5c19bbf10153cb42ca0fb67e08606c8295c17236.1599120059.git-series.maxime@cerno.tech commit 28b590f418dd09c3dabbe386c10ef3fa58cd092e Merge: f4d51dffc6c01 76167e5c5457a Author: Borislav Petkov Date: Mon Sep 7 18:09:43 2020 +0200 Merge 'x86/kaslr' to pick up dependent bits Signed-off-by: Borislav Petkov commit 647b9655061b9e260c296de0e23745ac04d7c96d Author: Maxime Ripard Date: Thu Sep 3 10:01:26 2020 +0200 drm/vc4: hdmi: Add PHY RNG enable / disable function Let's continue the implementation of hooks for the parts that change in the BCM2711 SoC with the PHY RNG setup. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/216155f1c0b83e622ac60a2f7d00eb707de3acba.1599120059.git-series.maxime@cerno.tech commit c457b8aededd6c0b5a4ee6ba408f378791c9ebf8 Author: Maxime Ripard Date: Thu Sep 3 10:01:25 2020 +0200 drm/vc4: hdmi: Add PHY init and disable function The HDMI PHY in the BCM2711 HDMI controller is significantly more complicated to setup than in the older BCM283x SoCs. Let's add hooks to enable and disable the PHY. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/7216826284dbc60a58bdacd662805d20699e5c80.1599120059.git-series.maxime@cerno.tech commit 9045e91a476b7504b8bfb207466b7b12dd135381 Author: Maxime Ripard Date: Thu Sep 3 10:01:24 2020 +0200 drm/vc4: hdmi: Add reset callback The BCM2711 and BCM283x HDMI controllers use a slightly different reset sequence, so let's add a callback to reset the controller. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/a34bcb493da07eae58ed704f65e72ce0748e8952.1599120059.git-series.maxime@cerno.tech commit 311e305fdb4e82c190cc44566dc01cc9fd9cb75c Author: Maxime Ripard Date: Thu Sep 3 10:01:23 2020 +0200 drm/vc4: hdmi: Implement a register layout abstraction The HDMI controllers found in the BCM2711 have most of the registers reorganized in multiple registers areas and at different offsets than previously found. The logic however remains pretty much the same, so it doesn't really make sense to create a whole new driver and we should share the code as much as possible. Let's implement some indirection to wrap around a register and depending on the variant will lookup the associated register on that particular variant. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/3070236daff920e7edd11c5a72ac31fd0f6a656b.1599120059.git-series.maxime@cerno.tech commit 33c773eb62eaa1b4be3598eb91e7cd01b4ab4053 Author: Maxime Ripard Date: Thu Sep 3 10:01:22 2020 +0200 drm/vc4: hdmi: Introduce resource init and variant The HDMI controllers found in the BCM2711 has a pretty different clock and registers areas than found in the older BCM283x SoCs. Let's create a variant structure to store the various adjustments we'll need later on, and a function to get the resources needed for one particular version. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/71cfa3ce3d865bbab52a0e5651bc052dc4893f11.1599120059.git-series.maxime@cerno.tech commit 0532e5e5e03996aa1eaa8e5a0bc5b93a6c3f1648 Author: Maxime Ripard Date: Thu Sep 3 10:01:21 2020 +0200 drm/vc4: hdmi: Remove vc4_hdmi_connector The vc4_hdmi_connector was only used to switch between drm_connector to drm_encoder. However, we can now use vc4_hdmi to do the switch, so that structure is redundant. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/aee5120728db350b19c074de4290eafaf01e6671.1599120059.git-series.maxime@cerno.tech commit 283d347d6e3e25829663cc629e80eccea96c25de Author: Maxime Ripard Date: Thu Sep 3 10:01:20 2020 +0200 drm/vc4: hdmi: Remove vc4_dev hdmi pointer Now that we don't have any users anymore, we can kill that pointer. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/d7ebf50319bbd902e4b7b7c39ae1612c3b38e6b2.1599120059.git-series.maxime@cerno.tech commit 47c167b757638e747717ab7e5d7e8803c446d943 Author: Maxime Ripard Date: Thu Sep 3 10:01:19 2020 +0200 drm/vc4: hdmi: Retrieve the vc4_hdmi at unbind using our device The unbind function needs to retrieve a vc4_hdmi structure pointer through the struct device that we're given since we want to support multiple HDMI controllers. However, our optional ASoC support doesn't make that trivial since it will overwrite the device drvdata if we use it, but obviously won't if we don't use it. Let's make sure the fields are at the proper offset to be able to cast between the snd_soc_card structure and the vc4_hdmi structure transparently so we can support both cases. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/717082cba06b5c06280f26c56c08aee512365ed3.1599120059.git-series.maxime@cerno.tech commit 66bf1c30e0e5bcc9d6965157a8581f36577c45a4 Author: Maxime Ripard Date: Thu Sep 3 10:01:18 2020 +0200 drm/vc4: hdmi: Pass vc4_hdmi to CEC code Our CEC code also retrieves the associated vc4_hdmi by setting the vc4_dev pointer as its private data, and then dereferences its vc4_hdmi pointer. In order to eventually get rid of that pointer, we can simply pass the vc4_hdmi pointer directly. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/cb575cb9e13018bce131b8535e5b572dc1027877.1599120059.git-series.maxime@cerno.tech commit 5dfbcae63f1098eae39d833f42b7879be5fd4ce2 Author: Maxime Ripard Date: Thu Sep 3 10:01:17 2020 +0200 drm/vc4: hdmi: Add container_of macros for encoders and connectors Whenever the code needs to access the vc4_hdmi structure from a DRM connector or encoder, it first accesses the drm_device associated to the connector, then retrieve the drm_dev private data which gives it a pointer to our vc4_dev, and will finally follow the vc4_hdmi pointer in that structure. That will also give us some trouble when having multiple controllers, but now that we have our encoder and connector structures that are part of vc4_hdmi, we can simply call container_of on the DRM connector or encoder and retrieve the vc4_hdmi structure directly. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/536ecce5898ea75839fa3788b876009d69a5ccae.1599120059.git-series.maxime@cerno.tech commit b10db9a4242bd5c89f0029e92ff13f2d7e9c53c8 Author: Maxime Ripard Date: Thu Sep 3 10:01:16 2020 +0200 drm/vc4: hdmi: Use local vc4_hdmi directly The function vc4_hdmi_connector_detect access its vc4_hdmi struct by dereferencing the pointer in the structure vc4_dev. This will cause some issues when we will have multiple HDMI controllers, so let's just use the local variable for now instead of dereferencing that pointer all the time, and we'll fix the local variable later. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/ef92c5582d3b2894128b2272a8ada7cbc20be3d9.1599120059.git-series.maxime@cerno.tech commit 13311457bebf5c1e66f2f7a53a4d30b0dddf158a Author: Maxime Ripard Date: Thu Sep 3 10:01:15 2020 +0200 drm/vc4: hdmi: Move accessors to vc4_hdmi The current driver only supports a single HDMI controller, and part of the issue is that the main vc4_dev structure holds a pointer to its (only) HDMI controller, and the HDMI registers accessors will use it to retrieve the mapped addresses. Let's modify those accessors to use directly the vc4_hdmi structure so that we can eventually get rid of that single global pointer. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/886b955586264ce078d7d35e9b8ef9ae51675c27.1599120059.git-series.maxime@cerno.tech commit 3408cc23c9311f45ca363112fa62e23846ffc499 Author: Maxime Ripard Date: Thu Sep 3 10:01:14 2020 +0200 drm/vc4: hdmi: Rename hdmi to vc4_hdmi The driver isn't consistent with the name given to the vc4_hdmi structure pointer in its functions. Make sure to use a consistent name. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/696be840dc427245afe94b43e0b829c728d948a7.1599120059.git-series.maxime@cerno.tech commit b052e70dd21c2a0eb0629c3300bf5596dc9abf2a Author: Maxime Ripard Date: Thu Sep 3 10:01:13 2020 +0200 drm/vc4: hdmi: Remove DDC argument to connector_init Now that we are passing the vc4_hdmi structure to the connector init function, we can simply use the pointer in that structure instead of having the pointer as an argument. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/4fe1b45fe45e4ba57d40154da010807d4e5db86c.1599120059.git-series.maxime@cerno.tech commit c98c85bb316cd5f4d85458f0aebb41073c8bad83 Author: Maxime Ripard Date: Thu Sep 3 10:01:12 2020 +0200 drm/vc4: hdmi: rework connectors and encoders the vc4_hdmi driver has some custom structures to hold the data it needs to associate with the drm_encoder and drm_connector structures. However, it allocates them separately from the vc4_hdmi structure which makes it more complicated than it needs to be. Move those structures to be contained by vc4_hdmi and update the code accordingly. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/93b418d63c876355af2b3d3afebe31a256268623.1599120059.git-series.maxime@cerno.tech commit f73100cce9ab0528808aaf818e2302ec4851de79 Author: Maxime Ripard Date: Thu Sep 3 10:01:11 2020 +0200 drm/vc4: hdmi: Move structure to header We will need to share the vc4_hdmi and related structures with multiple files, so let's create a header for it. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/db3ff2babc914e38e86f794c4e49128697aed887.1599120059.git-series.maxime@cerno.tech commit 3eda598241420d3469161010a157682162d83c52 Author: Maxime Ripard Date: Thu Sep 3 10:01:10 2020 +0200 drm/vc4: hdmi: Use debugfs private field We're calling vc4_debugfs_add_file with our struct vc4_hdmi pointer set in the private field, but we don't use that field and go through the main struct vc4_dev to get it. Let's use the private field directly, that will save us some trouble later on. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/24028dc06c379dbc71f98e027cce2839fdd446ce.1599120059.git-series.maxime@cerno.tech commit 658a731c50e5be8870f05902ca820cbad4ad1322 Author: Maxime Ripard Date: Thu Sep 3 10:01:09 2020 +0200 drm/vc4: crtc: Add BCM2711 pixelvalves The BCM2711 has 5 pixelvalves, so now that our driver is ready, let's add support for them. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/2553ec9ece0d8a0e5299ff74ed932a38703c5db9.1599120059.git-series.maxime@cerno.tech commit 2ed1989727f3109bb1b594c6a57c0418d5e3c7ed Author: Maxime Ripard Date: Thu Sep 3 10:01:08 2020 +0200 dt-bindings: display: vc4: pv: Add BCM2711 pixel valves The BCM2711 comes with other pixelvalves that have different requirements and capabilities. Let's document their compatible. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Rob Herring Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/3a21824460d96245984d730e446863a4853f2ae5.1599120059.git-series.maxime@cerno.tech commit 875a4d5368424d6cf57d4b7250b470f1a8ad2c14 Author: Maxime Ripard Date: Thu Sep 3 10:01:07 2020 +0200 drm/vc4: drv: Disable the CRTC at boot time In order to prevent issues during the firmware to KMS transition, we need to make sure the pixelvalve are disabled at boot time so that the DRM state matches the hardware state. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/ad57f1bdeae7a99631713b0fc193c86f223de042.1599120059.git-series.maxime@cerno.tech commit 2d14ffe2737cd224101405641cbd48973fa5991a Author: Maxime Ripard Date: Thu Sep 3 10:01:06 2020 +0200 drm/vc4: crtc: Move the CRTC disable out We'll need to reuse the part that disables the HVS and PixelValve during boot too, so let's create a separate function. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/5288fb72ed2da643085dce1bc7f6d6f656bf176e.1599120059.git-series.maxime@cerno.tech commit 29bbb93080a964db806e18acde3540278581f68d Author: Maxime Ripard Date: Thu Sep 3 10:01:05 2020 +0200 drm/vc4: hvs: Introduce a function to get the assigned FIFO At boot time, if we detect that a pixelvalve has been enabled, we need to be able to retrieve the HVS channel it has been assigned to so that we can disable that channel too. Let's create that function that returns the FIFO or an error from a given output. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/178192d90874559b8386139f2226e773347729fc.1599120059.git-series.maxime@cerno.tech commit 50e9d6cb5dbfec87b39f7d6f270841328f9ba555 Author: Maxime Ripard Date: Thu Sep 3 10:01:04 2020 +0200 drm/vc4: hvs: Make the stop_channel function public During the transition from the firmware to the KMS driver, we need to pay particular attention to how we deal with the pixelvalves that have already been enabled, otherwise either timeouts or stuck pixels can occur. We'll thus need to call the function to stop an HVS channel at boot. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/a9d5f0891c3bc1deb6b16d56ca6994ed912ec7c7.1599120059.git-series.maxime@cerno.tech commit 9e30cfd0764e1018897b8f4830d1cffd59a3fe40 Author: Maxime Ripard Date: Thu Sep 3 10:01:03 2020 +0200 drm/vc4: crtc: Clear the PixelValve FIFO during configuration Even though it's not really clear why we need to flush the PV FIFO during the configuration even though we started by flushing it, experience shows that without it we get a stale pixel stuck in the FIFO between the HVS and the PV. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/ccd6269ba37b2f849ba6e62471c99bd93a4548a0.1599120059.git-series.maxime@cerno.tech commit 0d2b96af53c973942c8c5a2c6629915774bae187 Author: Maxime Ripard Date: Thu Sep 3 10:01:02 2020 +0200 drm/vc4: crtc: Clear the PixelValve FIFO on disable In order to avoid a stale pixel getting stuck on mode change or a disable / enable cycle, we need to make sure to flush the PV FIFO on disable. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/26fe48b09d77088679ed0c8cb8cf0db2f108195e.1599120059.git-series.maxime@cerno.tech commit b7cb67a6b4fbb99a297bb0a57d906f56d81b29c9 Author: Maxime Ripard Date: Thu Sep 3 10:01:01 2020 +0200 drm/vc4: crtc: Add a delay after disabling the PixelValve output In order to avoid pixels getting stuck in the (unflushable) FIFO between the HVS and the PV, we need to add some delay after disabling the PV output and before disabling the HDMI controller. 20ms seems to be good enough so let's use that. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/15cf215bd2ceebd203c4010c09c21a4019c650ed.1599120059.git-series.maxime@cerno.tech commit 792c3132bc1b0990db8e3dbef2e9a49bdf80cd62 Author: Maxime Ripard Date: Thu Sep 3 10:01:00 2020 +0200 drm/vc4: encoder: Add finer-grained encoder callbacks In the BCM2711, the setup of the HVS, pixelvalve and HDMI controller requires very precise ordering and timing that the regular atomic callbacks don't provide. Let's add new callbacks on top of the regular ones to be able to split the configuration as needed. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/1dd78efe8f29add73c97d0148cfd4ec8e34aaf22.1599120059.git-series.maxime@cerno.tech commit 4b72b10a64ba70ce0b7d840ffc34d5841a660a5b Author: Maxime Ripard Date: Thu Sep 3 10:00:59 2020 +0200 drm/vc4: crtc: Move HVS channel init before the PV initialisation In order to avoid stale pixels getting stuck in an intermediate FIFO between the HVS and the pixelvalve on BCM2711, we need to configure the HVS channel before the pixelvalve is reset and configured. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/9d7c5a03bc1a1e6d50f7b617cc2d8a46a4bbb7bc.1599120059.git-series.maxime@cerno.tech commit 6370be84d81ec717b0353cb29441db3bc19811a0 Author: Maxime Ripard Date: Thu Sep 3 10:00:58 2020 +0200 drm/vc4: crtc: Remove redundant pixelvalve reset Since we moved the pixelvalve configuration to atomic_enable, we're now first calling the function that resets the pixelvalve and then the one that configures it. However, the first thing the latter is doing is calling the reset function, meaning that we reset twice our pixelvalve. Let's remove the first call. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/a0a31af0d4a7a070de979f0e5b618d9e2c730e7f.1599120059.git-series.maxime@cerno.tech commit a4d89568735b1bbce01ef282e49a590c5cb09597 Author: Maxime Ripard Date: Thu Sep 3 10:00:57 2020 +0200 drm/vc4: crtc: Remove mode_set_nofb On BCM2711 to avoid stale pixels getting stuck in intermediate FIFOs, the pixelvalve needs to be setup each time there's a mode change or enable / disable sequence. Therefore, we can't really use mode_set_nofb anymore to configure it, but we need to move it to atomic_enable. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/f86c7a6946f98262f1cf59a461596a796d4bcc5f.1599120059.git-series.maxime@cerno.tech commit f8b13d9bcc674efa3af2d75414fa612936a5a2ea Author: Maxime Ripard Date: Thu Sep 3 10:00:56 2020 +0200 drm/vc4: hvs: Make sure our channel is reset In order to clear our intermediate FIFOs that might end up with a stale pixel, let's make sure our FIFO channel is reset every time our channel is setup. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/b34c562b36177c758dd2e9d84bceb07689bfbe05.1599120059.git-series.maxime@cerno.tech commit d2f06525f67d1c224589087feca70c9a214237b2 Author: Maxime Ripard Date: Thu Sep 3 10:00:55 2020 +0200 drm/vc4: crtc: Move the HVS gamma LUT setup to our init function Since most of the HVS channel is setup in the init function, let's move the gamma setup there too. As this makes the HVS mode_set function empty, let's remove it in the process. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/d439da8f1592a450a6ad35ab1f9e77def17c7965.1599120059.git-series.maxime@cerno.tech commit 6d01a106b4c88f0c9ff5240c54d26d3d08e5943e Author: Maxime Ripard Date: Thu Sep 3 10:00:54 2020 +0200 drm/vc4: crtc: Move HVS init and close to a function In order to make further refactoring easier, let's move the HVS channel setup / teardown to their own function. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/fb1b5299d1636ddce8340b51a80d51641839f83b.1599120059.git-series.maxime@cerno.tech commit be26296a259dcce9c89b517ee95e5924334086dc Author: Maxime Ripard Date: Thu Sep 3 10:00:53 2020 +0200 drm/vc4: crtc: Move PV dump to config_pv Now that we only configure the PixelValve in vc4_crtc_config_pv, it doesn't really make much sense to dump its register content in its caller. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/c195af7d9e140a2a6db32992ee7e54071c6f94ba.1599120059.git-series.maxime@cerno.tech commit 5ffabf5001b9cdcb0a73da6cbf316833077aa4b8 Author: Maxime Ripard Date: Thu Sep 3 10:00:52 2020 +0200 drm/vc4: crtc: Turn pixelvalve reset into a function The driver resets the pixelvalve FIFO in a number of occurences without always using the same sequence. Since this will be critical for BCM2711, let's move that sequence to a function so that we are consistent. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/fb31003a9eee02c4b949556299ff41f0a113499a.1599120059.git-series.maxime@cerno.tech commit eb92bc72cdab2550fa1c5b05b866bf209df9fd08 Author: Maxime Ripard Date: Thu Sep 3 10:00:51 2020 +0200 drm/vc4: crtc: Disable color management for HVS5 The HVS5 uses different color matrices. Disable color management support for now. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/e528e2edf0a1be3930196d437e548114dd9fcf59.1599120059.git-series.maxime@cerno.tech commit aa2fd1ca7f16e9fdb5658977e3d24912f54bdcfd Author: Maxime Ripard Date: Thu Sep 3 10:00:50 2020 +0200 drm/vc4: crtc: Add HDMI1 encoder type The BCM2711 sports a second HDMI controller, so let's add that second HDMI encoder type. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/6ba56d2421a4ad59ce72178e8f37eacfbd72cb33.1599120059.git-series.maxime@cerno.tech commit ed024b229dfdcff0402f16f5bc11e05ef07cd188 Author: Maxime Ripard Date: Thu Sep 3 10:00:49 2020 +0200 drm/vc4: crtc: Rename HDMI encoder type to HDMI0 The previous generations were only supporting a single HDMI controller, but that's about to change, so put an index as well to differentiate between the two controllers. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/84e11e4793aaa30d6e5c56e305d22404ac5a932d.1599120059.git-series.maxime@cerno.tech commit 62c5d55e25cb5ce87b7add4a9a3ec0acd8d125b3 Author: Maxime Ripard Date: Thu Sep 3 10:00:48 2020 +0200 drm/vc4: crtc: Add function to compute FIFO level bits The longer FIFOs in vc5 pixelvalves means that the FIFO full level doesn't fit in the original register field and that we also have a secondary field. In order to prepare for this, let's move the registers fill part to a helper function. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/e46a3823128af50c1c833de8fa9b95e9b86c2f66.1599120059.git-series.maxime@cerno.tech commit 649abf2f5d328a5a19824f712987f0a1de095332 Author: Maxime Ripard Date: Thu Sep 3 10:00:47 2020 +0200 drm/vc4: crtc: Add FIFO depth to vc4_crtc_data Not all pixelvalve FIFOs in vc5 have the same depth, so we need to add that to our vc4_crtc_data structure to be able to compute the fill level properly later on. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/7df3549c1bea9b0a27c784dc416bb9a831e4e18f.1599120059.git-series.maxime@cerno.tech commit 87ebcd42fb7b8d1d3269007a621e41ae96a0077e Author: Maxime Ripard Date: Thu Sep 3 10:00:46 2020 +0200 drm/vc4: crtc: Assign output to channel automatically The HVS found in the BCM2711 has 6 outputs and 3 FIFOs, with each output being connected to a pixelvalve, and some muxing between the FIFOs and outputs. Any output cannot feed from any FIFO though, and they all have a bunch of constraints. In order to support this, let's store the possible FIFOs each output can be assigned to in the vc4_crtc_data, and use that information at atomic_check time to iterate over all the CRTCs enabled and assign them FIFOs. The channel assigned is then set in the vc4_crtc_state so that the rest of the driver can use it. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/f9aba3814ef37156ff36f310118cdd3954dd3dc5.1599120059.git-series.maxime@cerno.tech commit 596356678fb429cc181c30971b5cb6c4244b58ad Author: Maxime Ripard Date: Thu Sep 3 10:00:45 2020 +0200 drm/vc4: kms: Convert to for_each_new_crtc_state The vc4 atomic commit loop has an handrolled loop that is basically identical to for_each_new_crtc_state, let's convert it to that helper. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/a712d2b70aaee20379cfc52c2141aa2f6e2a9d5b.1599120059.git-series.maxime@cerno.tech commit a5c4b75f1ea00f18e2b47c46df705dab22137a3e Author: Maxime Ripard Date: Thu Sep 3 10:00:44 2020 +0200 drm/vc4: crtc: Enable and disable the PV in atomic_enable / disable The VIDEN bit in the pixelvalve currently being used to enable or disable the pixelvalve seems to not be enough in some situations, which whill end up with the pixelvalve stalling. In such a case, even re-enabling VIDEN doesn't bring it back and we need to clear the FIFO. This can only be done if the pixelvalve is disabled though. In order to overcome this, we can configure the pixelvalve during mode_set_no_fb by calling vc4_crtc_config_pv, but only enable it in atomic_enable and flush the FIFO there, and in atomic_disable disable the pixelvalve again. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/e97596f62f4df83424d994a23465463ac60f986e.1599120059.git-series.maxime@cerno.tech commit 32a851c217b72217ccb8c03a1fc230d34f98e223 Author: Maxime Ripard Date: Thu Sep 3 10:00:43 2020 +0200 drm/vc4: crtc: Use local chan variable The vc4_crtc_handle_page_flip already has a local variable holding the value of vc4_crtc->channel, so let's use it instead. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/439c589baec72ddb89159857a2d078fdd77b02a2.1599120059.git-series.maxime@cerno.tech commit 8ebb2cf0f6f42be258795a87fbe31d77440be20d Author: Maxime Ripard Date: Thu Sep 3 10:00:42 2020 +0200 drm/vc4: crtc: Rename HVS channel to output In vc5, the HVS has 6 outputs and 3 FIFOs (or channels), with pixelvalves each being assigned to a given output, but each output can then be muxed to feed from multiple FIFOs. Since vc4 had that entirely static, both were probably equivalent, but since that changes, let's rename hvs_channel to hvs_output in the vc4_crtc_data, since a pixelvalve is really connected to an output, and not to a FIFO. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/b7618bb17b1c435c5d6ce50bcde2fe9243281d02.1599120059.git-series.maxime@cerno.tech commit 78cbcc38b9043a736ca97577bd47a2d291c67981 Author: Maxime Ripard Date: Thu Sep 3 10:00:41 2020 +0200 drm/vc4: crtc: Move the cob allocation outside of bind The COB allocation depends on the HVS channel used for a given pixelvalve. While the channel allocation was entirely static in vc4, vc5 changes that and at bind time, a pixelvalve can be assigned to multiple HVS channels. Let's prepare that rework by allocating the COB when it's actually needed. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/484cbd4b00cfeee425295df438222258cc39a3dd.1599120059.git-series.maxime@cerno.tech commit a1962d6e326965558119fe6b8497aebe55fa03db Author: Maxime Ripard Date: Thu Sep 3 10:00:40 2020 +0200 drm/vc4: crtc: Use a shared interrupt Some pixelvalves in vc5 use the same interrupt line so let's register our interrupt handler as a shared one. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/5a915d374357f41083ac71779fa9b2c35a339c2f.1599120059.git-series.maxime@cerno.tech commit 644df22fe305d7f2a07302b03327641f91b3ab67 Author: Maxime Ripard Date: Thu Sep 3 10:00:39 2020 +0200 drm/vc4: crtc: Deal with different number of pixel per clock Some of the HDMI pixelvalves in vc5 output two pixels per clock cycle. Let's put the number of pixel output per clock cycle in the CRTC data and update the various calculations to reflect that. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/18a3bb079981ba820132b37e736a4bb371234d2e.1599120059.git-series.maxime@cerno.tech commit 0ddd59c56e6b18919dc3f62ebaa615d4ec7daabd Author: Maxime Ripard Date: Thu Sep 3 10:00:38 2020 +0200 drm/vc4: plane: Create more planes Let's now create more planes that can be affected to all the CRTCs. vc4 has 3 CRTCs, 1 primary and 1 cursor each, and was having 24 (8 planes per CRTC) overlays. However, vc5 has 5 CRTCs, so keeping the same logic would put us at 50 planes which is well above the 32 planes limit imposed by DRM. Using 16 seems like a good tradeoff between staying under 32 and yet providing enough planes. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/b41003001541fc2bb23668c699c0369ff7983be8.1599120059.git-series.maxime@cerno.tech commit 5630b27ec577953bde59f0e6414c382f0745387a Author: Dave Stevenson Date: Thu Sep 3 10:00:37 2020 +0200 drm/vc4: plane: Optimize the LBM allocation size The current code is using the maximum of the source line size and the destination line size to compute the size of the LBM to allocate. While this is simpler, it starts to be an issue with modes such as 4k with a quite long that will consume all the available memory, so we no longer have that luxury. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Link: https://patchwork.freedesktop.org/patch/msgid/b9e091883a4f7395c5b6a4f7c6070225934293db.1599120059.git-series.maxime@cerno.tech commit 31e0ecb39b592cc836470d3f76a61c7df4b24084 Author: Dave Stevenson Date: Thu Sep 3 10:00:36 2020 +0200 drm/vc4: plane: Change LBM alignment constraint on LBM The HVS5 needs an alignment of 64bytes for its LBM memory, so let's reflect it. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Link: https://patchwork.freedesktop.org/patch/msgid/6f9c4fe1eb9258a3f1d0f21af6a99c42472ac531.1599120059.git-series.maxime@cerno.tech commit d7d96c00e585ceef29783c6b94e6497c6bb2f452 Author: Maxime Ripard Date: Thu Sep 3 10:00:35 2020 +0200 drm/vc4: hvs: Boost the core clock during modeset In order to prevent timeouts and stalls in the pipeline, the core clock needs to be maxed at 500MHz during a modeset on the BCM2711. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/37ed9e0124c5cce005ddc8dafe821d8b0da036ff.1599120059.git-series.maxime@cerno.tech commit c54619b0bfb35c4153b3fb34916a6fa50dcf2dc1 Author: Dave Stevenson Date: Thu Sep 3 10:00:34 2020 +0200 drm/vc4: Add support for the BCM2711 HVS5 The HVS found in the BCM2711 is slightly different from the previous generations. Most notably, the display list layout changes a bit, the LBM doesn't have the same size and the formats ordering for some formats is swapped. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1d02fab3b916d639c2dc05608c117bbd8230ebe8.1599120059.git-series.maxime@cerno.tech commit 3ac929e722c4899d26516bec49f947b4c49b3f76 Author: Maxime Ripard Date: Thu Sep 3 10:00:33 2020 +0200 dt-bindings: display: Add support for the BCM2711 HVS The HVS found in the BCM2711 is slightly different from the previous generations, let's add a compatible for it. Signed-off-by: Maxime Ripard Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/a6b4c9ee03bc8f950adc6c493db70cd540c2f902.1599120059.git-series.maxime@cerno.tech commit c7e592a6a5413c780f846d9b053fb132fedb63b8 Author: Flavio Suligoi Date: Tue Jun 23 09:48:51 2020 +0200 PCI: cadence-ep: Remove obsolete path from comment This comment still refers to the old driver pathname, when all PCI drivers were located directly under the drivers/pci directory. Anyway the function name itself is enough, so we can remove the overabundant path reference. Link: https://lore.kernel.org/r/20200623074851.7832-1-f.suligoi@asem.it Signed-off-by: Flavio Suligoi Signed-off-by: Lorenzo Pieralisi commit a5a6d2753e7ec18a34bd21190b50ee7f085f4daf Author: Heikki Krogerus Date: Mon Sep 7 17:24:28 2020 +0300 usb: typec: intel_pmc_mux: Support for device role (UFP) This adds support for device data role, and data role swapping. The driver no longer relies on the cached role, as it may not be valid (for example after bootup). Instead, the role is always checked by readding the port status from IOM. Note. After this, the orientation is always only cached, so the driver does not support scenario where the role is set before orientation. It means the typec drivers must always set the orientation first before role. Signed-off-by: Heikki Krogerus Reviewed-by: Rajmohan Mani Reviewed-by: Utkarsh Patel Tested-by: Utkarsh Patel Link: https://lore.kernel.org/r/20200907142428.35838-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 43d596e3227655b40272474a76e1bca878cb56b6 Author: Heikki Krogerus Date: Mon Sep 7 17:24:27 2020 +0300 usb: typec: intel_pmc_mux: Check the port status before connect The PMC microcontroller that we use for configuration, does not supply any status information back. For port status we need to talk to another controller on the board called IOM (I/O manager). By checking the port status before configuring the muxes, we can make sure that we do not reconfigure the port after bootup when the system firmware (for example BIOS) has already configured it. Using the status information also to check if DisplayPort HPD is still asserted when the cable plug is disconnected, and clearing it if it is. Signed-off-by: Heikki Krogerus Reviewed-by: Rajmohan Mani Reviewed-by: Utkarsh Patel Tested-by: Utkarsh Patel Link: https://lore.kernel.org/r/20200907142428.35838-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d16d538ff49145b153976bd8e124116d369db266 Author: Lad Prabhakar Date: Mon Aug 10 18:41:55 2020 +0100 dt-bindings: PCI: rcar: Add device tree support for r8a7742 Add support for r8a7742. The Renesas RZ/G1H (R8A7742) PCIe controller is identical to the R-Car Gen2 family. Link: https://lore.kernel.org/r/20200810174156.30880-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Lad Prabhakar Signed-off-by: Lorenzo Pieralisi Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Acked-by: Rob Herring commit 61660dbf08e11e9f32f74fc76bd3f50f1319a15c Author: Anson Huang Date: Tue Aug 11 09:29:24 2020 +0800 PCI: imx6: Do not output error message when devm_clk_get() failed with -EPROBE_DEFER When devm_clk_get() returns -EPROBE_DEFER, i.MX6 PCI driver should NOT print error message, use dev_err_probe() to handle it. Link: https://lore.kernel.org/r/1597109364-4739-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Anson Huang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Lucas Stach commit bc0b5a03079bd78fb3d5cba1ccabf0a7efb1d99f Author: Quentin Monnet Date: Fri Sep 4 17:14:54 2020 +0100 tools, bpf: Synchronise BPF UAPI header with tools Synchronise the bpf.h header under tools, to report the fixes recently brought to the documentation for the BPF helpers. Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200904161454.31135-4-quentin@isovalent.com commit 938c3efd9e650ca343d04e70d11a17c64119e17c Author: Quentin Monnet Date: Fri Sep 4 17:14:53 2020 +0100 bpf: Fix formatting in documentation for BPF helpers Fix a formatting error in the description of bpf_load_hdr_opt() (rst2man complains about a wrong indentation, but what is missing is actually a blank line before the bullet list). Fix and harmonise the formatting for other helpers. Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200904161454.31135-3-quentin@isovalent.com commit 1a7581b174e99e18d459856bb26ab01258c027c3 Author: Quentin Monnet Date: Fri Sep 4 17:14:52 2020 +0100 tools: bpftool: Fix formatting in bpftool-link documentation Fix a formatting error in the documentation for bpftool-link, so that the man page can build correctly. Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200904161454.31135-2-quentin@isovalent.com commit 8b2f57d6c900c501617cb2ac7d09a8883795cba1 Merge: daa90764600ed 6b3bb3c82b945 Author: Mark Brown Date: Mon Sep 7 15:29:00 2020 +0100 Merge series "ASoC: sun8i-codec driver cleanup" from Samuel Holland : Now that the fixes series is merged, here is a series of small cleanups to the sun8i-codec driver. These help shorten the patch stack for the next series, which will add support for the other two DAIs in this codec: AIF2 and AIF3. Samuel Holland (9): ASoC: sun8i-codec: Remove extraneous widgets ASoC: sun8i-codec: Fix AIF1 MODCLK widget name ASoC: sun8i-codec: Fix AIF1_ADCDAT_CTRL field names ASoC: sun8i-codec: Fix AIF1_MXR_SRC field names ASoC: sun8i-codec: Fix ADC_DIG_CTRL field name ASoC: sun8i-codec: Fix field bit number indentation ASoC: sun8i-codec: Sort masks in a consistent order ASoC: sun8i-codec: Attach the bus clock to the regmap ASoC: sun8i-codec: Manage module clock via DAPM sound/soc/sunxi/sun8i-codec.c | 104 ++++++++++++---------------------- 1 file changed, 37 insertions(+), 67 deletions(-) -- 2.26.2 commit daa90764600ed5a7bd38ea8bbff1228310b7f5ea Merge: a252632df817f 988d941882336 Author: Mark Brown Date: Mon Sep 7 15:28:59 2020 +0100 Merge series "ASoC: SOF: component UUID support for 5.10" from Kai Vehmanen : This series adds support for UUID based component identification in SOF. UUIDs provide a more scalable alternative to the old component type based approach to identify which DSP components should be loaded. More detailed description of UUID usage in SOF is available in: https://thesofproject.github.io/latest/developer_guides/uuid/ UUID support is an incremental update to the SOF IPC interface. Driver remains compatible with pre-UUID (ABI <3.17) firmware versions. Keyon Jie (16): ASoC: SOF: tokens: add token for component UUID ASoC: SOF: add comp_ext to struct snd_sof_widget ASoC: SOF: topology: create component extended tokens ASoC: SOF: topology: parse comp_ext_tokens for all widgets ASoC: SOF: use the sof_ipc_comp reserved bytes for extended data ASoC: SOF: topology: add helper for setting up IPC component ASoC: SOF: append extended data to sof_ipc_comp_dai ASoC: SOF: append extended data to sof_ipc_comp_mixer ASoC: SOF: append extended data to sof_ipc_comp_volume ASoC: SOF: append extended data to sof_ipc_comp_host ASoC: SOF: append extended data to sof_ipc_comp_src ASoC: SOF: append extended data to sof_ipc_comp_asrc ASoC: SOF: append extended data to sof_ipc_comp_tone ASoC: SOF: append extended data to sof_ipc_comp_process ASoC: SOF: append extended data to sof_ipc_comp_mux ASoC: SOF: topology: make process type optional include/sound/sof/topology.h | 12 +- include/uapi/sound/sof/tokens.h | 1 + sound/soc/sof/sof-audio.c | 23 +++- sound/soc/sof/sof-audio.h | 3 + sound/soc/sof/topology.c | 208 ++++++++++++++++++++------------ 5 files changed, 161 insertions(+), 86 deletions(-) -- 2.27.0 commit a252632df817f77bb6b31faf5bbba7350297aab6 Merge: b40f708deb951 06998d49bcac8 Author: Mark Brown Date: Mon Sep 7 15:28:58 2020 +0100 Merge series "ASoC: Add sdw stream operations to dailink ops." from Bard Liao : Sdw stream operation APIs can be called once per stream. Move these operations to dailink ops. The linked series is "soundwire: Remove sdw stream operations from Intel soundwire dai". Reviewed-by: Vinod Koul Changes in v3: - s/ASOC/ASoC Pierre-Louis Bossart (3): ASoC: soc-dai: clarify return value for get_sdw_stream() ASoC: Intel: sof_sdw: add dailink .trigger callback ASoC: Intel: sof_sdw: add dailink .prepare and .hw_free callback include/sound/soc-dai.h | 3 +- sound/soc/intel/boards/sof_sdw.c | 81 ++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 1 deletion(-) -- 2.17.1 commit b40f708deb951c3d46857fe5aed9cea1a506585b Author: Michael Sit Wei Hong Date: Fri Sep 4 10:09:04 2020 +0800 ASoC: Intel: KeemBay: Fix warning potential ! vs ~ typo To set platform in slave mode setting the MASTER_MODE bit is not needed. Removing !MASTER_MODE conditional to avoid potential errors and warning. Signed-off-by: Michael Sit Wei Hong Reported-by: Dan Carpenter Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200904020904.19577-1-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown commit 73abd0bf89d27599a2a79a52c1e611ab892930fb Author: Gustavo A. R. Silva Date: Tue Jul 21 22:19:03 2020 -0500 PCI: imx6: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Link: https://lore.kernel.org/r/20200722031903.GA3711@embeddedor Signed-off-by: Gustavo A. R. Silva Signed-off-by: Lorenzo Pieralisi commit 44c9b4cc34672e615e3b609dadff24a99957283f Author: Gustavo A. R. Silva Date: Tue Jul 21 22:28:51 2020 -0500 PCI: rcar-gen2: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Link: https://lore.kernel.org/r/20200722032851.GA4251@embeddedor Signed-off-by: Gustavo A. R. Silva Signed-off-by: Lorenzo Pieralisi Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda commit 8564551eec8afdc7aaf68853fbcae559426c9fe7 Author: Jonathan Marek Date: Sat Sep 5 13:39:05 2020 -0400 soundwire: qcom: add v1.5.1 compatible Add a compatible string for HW version v1.5.1 on sm8250 SoCs. Signed-off-by: Jonathan Marek Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200905173905.16541-5-jonathan@marek.ca Signed-off-by: Vinod Koul commit 82f5c70c26511ba9521418a94811eb4b8d96f0bd Author: Jonathan Marek Date: Sat Sep 5 13:39:04 2020 -0400 soundwire: qcom: add support for mmio soundwire master devices Adds support for qcom soundwire devices with memory mapped IO registers. Signed-off-by: Jonathan Marek Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200905173905.16541-4-jonathan@marek.ca Signed-off-by: Vinod Koul commit 5bd773242f75da3b25750a2ccee88d97599aa757 Author: Jonathan Marek Date: Sat Sep 5 13:39:03 2020 -0400 soundwire: qcom: avoid dependency on CONFIG_SLIMBUS The driver may be used without slimbus, so don't depend on slimbus. Signed-off-by: Jonathan Marek Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200905173905.16541-3-jonathan@marek.ca Signed-off-by: Vinod Koul commit d1df23fe688b58e0577cf9a7df793a9559b53baa Author: Jonathan Marek Date: Sat Sep 5 13:39:02 2020 -0400 soundwire: qcom: fix abh/ahb typo The function name qcom_swrm_abh_reg_read should say ahb, fix that. Signed-off-by: Jonathan Marek Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200905173905.16541-2-jonathan@marek.ca Signed-off-by: Vinod Koul commit 988d941882336b860d5fae1ee6f487eb110fe6d6 Author: Keyon Jie Date: Fri Sep 4 16:27:44 2020 +0300 ASoC: SOF: topology: make process type optional As components can be now identified with a UUID based mechanism, the process type is no longer required. For new DSP components, process and its component type can be set to SOF_PROCESS_NONE and SOF_COMP_NONE. Allow this combination in topology load, modify the load time check for process type to reflect this. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Reviewed-by: Curtis Malainey Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-17-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit d2306f4ed181e3bfe91a96a360f9674613c036a6 Author: Keyon Jie Date: Fri Sep 4 16:27:43 2020 +0300 ASoC: SOF: append extended data to sof_ipc_comp_mux Append the extended data to the end of the struct sof_ipc_comp_mux, construct the ipc for COMP_NEW during the topology load stage. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-16-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 783898ce68de5261faa4697622f38df8b08251a7 Author: Keyon Jie Date: Fri Sep 4 16:27:42 2020 +0300 ASoC: SOF: append extended data to sof_ipc_comp_process Append the extended data to the end of the struct sof_ipc_comp_process, construct the ipc for COMP_NEW during the topology load stage. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-15-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 3584ba4c78f719a081ba140db0662aacdd00190f Author: Keyon Jie Date: Fri Sep 4 16:27:41 2020 +0300 ASoC: SOF: append extended data to sof_ipc_comp_tone Append the extended data to the end of the struct sof_ipc_comp_tone, construct the ipc for COMP_NEW during the topology load stage. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-14-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit c7ded588468ada986f1f96645f7e84781e46fc87 Author: Keyon Jie Date: Fri Sep 4 16:27:40 2020 +0300 ASoC: SOF: append extended data to sof_ipc_comp_asrc Append the extended data to the end of the struct sof_ipc_comp_asrc, construct the ipc for COMP_NEW during the topology load stage. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-13-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit b64ce2c62ca3d751dc9407e61eef1ba66f6e18c8 Author: Keyon Jie Date: Fri Sep 4 16:27:39 2020 +0300 ASoC: SOF: append extended data to sof_ipc_comp_src Append the extended data to the end of the struct sof_ipc_comp_src, construct the ipc for COMP_NEW during the topology load stage. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-12-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit bbc1364cdd323e6188371744f91d55152e79c14f Author: Keyon Jie Date: Fri Sep 4 16:27:38 2020 +0300 ASoC: SOF: append extended data to sof_ipc_comp_host Append the extended data to the end of the struct sof_ipc_comp_host, construct the ipc for COMP_NEW during the topology load stage. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-11-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 9fed9d91c00e60cab61844efdb521f4ea5255da0 Author: Keyon Jie Date: Fri Sep 4 16:27:37 2020 +0300 ASoC: SOF: append extended data to sof_ipc_comp_volume Append the extended data to the end of the struct sof_ipc_comp_volume, construct the ipc for COMP_NEW during the topology load stage. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-10-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit f375bb336df3152360fbcdc4b7c49998d43abd0c Author: Keyon Jie Date: Fri Sep 4 16:27:36 2020 +0300 ASoC: SOF: append extended data to sof_ipc_comp_mixer Append the extended data to the end of the struct sof_ipc_comp_mixer, construct the ipc for COMP_NEW during the topology load stage. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-9-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit f8ee6c9f5258ce0f7e342d7ecc63d81e45a607fe Author: Keyon Jie Date: Fri Sep 4 16:27:35 2020 +0300 ASoC: SOF: append extended data to sof_ipc_comp_dai Append the extended data to the end of the struct sof_ipc_comp_dai, and update the ext_data_offset, to construct the IPC for the topology load and runtime restore. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-8-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit a905bb0193e7d637bc6b6c86e87f7f9976363d07 Author: Keyon Jie Date: Fri Sep 4 16:27:34 2020 +0300 ASoC: SOF: topology: add helper for setting up IPC component Add helper to allocate buffer for IPC component, configure the basic settings, and set up the extended data for the subsequent IPC sending. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-7-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 50b55fd463ce565b768d8bc214dd0280bee8b10d Author: Keyon Jie Date: Fri Sep 4 16:27:33 2020 +0300 ASoC: SOF: use the sof_ipc_comp reserved bytes for extended data Use the 32bit reserved member of the struct sof_ipc_comp as the extended data length, this will help to minimize the ABI change for adding new extended data to the struct sof_ipc_comp, usually only minor ABI version bump needed for every update with this new solution. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-6-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 929e427a9c4e59d744fb5d3771b87a741ea3078a Author: Keyon Jie Date: Fri Sep 4 16:27:32 2020 +0300 ASoC: SOF: topology: parse comp_ext_tokens for all widgets Parse comp_ext_tokens in the common sof_widget_ready(), and the swidget->comp_ext will be used to construct the COMP_NEW ipc in the subsequent commits. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-5-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 92f500cfc329ee3082f20b2f1364788b759ab588 Author: Keyon Jie Date: Fri Sep 4 16:27:31 2020 +0300 ASoC: SOF: topology: create component extended tokens Add comp_ext_tokens which will be used to parse all extended tokens, these tokens will be stored it to struct snd_sof_widget. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit f970a77f1d064eeddc32a9ed0fd7db3a66d82fdd Author: Keyon Jie Date: Fri Sep 4 16:27:30 2020 +0300 ASoC: SOF: add comp_ext to struct snd_sof_widget Add member comp_ext to struct snd_sof_widget, which will be used for topology extended tokens parsing. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 43fbb0860c682859780907d00bdb4abbb1b6359e Author: Keyon Jie Date: Fri Sep 4 16:27:29 2020 +0300 ASoC: SOF: tokens: add token for component UUID Add the definition SOF_TKN_COMP_UUID for the component UUID token, this shall be used for all types of component in the future. Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200904132744.1699575-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit d13ee586e026e8166231e03e5345718ebf625c02 Merge: 72a9ff3bf7fbd f4d51dffc6c01 Author: Mauro Carvalho Chehab Date: Mon Sep 7 16:13:06 2020 +0200 Merge tag 'v5.9-rc4' into patchwork Linux 5.9-rc4 * tag 'v5.9-rc4': (1001 commits) Linux 5.9-rc4 io_uring: fix linked deferred ->files cancellation io_uring: fix cancel of deferred reqs with ->files include/linux/log2.h: add missing () around n in roundup_pow_of_two() mm/khugepaged.c: fix khugepaged's request size in collapse_file mm/hugetlb: fix a race between hugetlb sysctl handlers mm/hugetlb: try preferred node first when alloc gigantic page from cma mm/migrate: preserve soft dirty in remove_migration_pte() mm/migrate: remove unnecessary is_zone_device_page() check mm/rmap: fixup copying of soft dirty and uffd ptes mm/migrate: fixup setting UFFD_WP flag mm: madvise: fix vma user-after-free checkpatch: fix the usage of capture group ( ... ) fork: adjust sysctl_max_threads definition to match prototype ipc: adjust proc_ipc_sem_dointvec definition to match prototype mm: track page table modifications in __apply_to_page_range() MAINTAINERS: IA64: mark Status as Odd Fixes only MAINTAINERS: add LLVM maintainers MAINTAINERS: update Cavium/Marvell entries mm: slub: fix conversion of freelist_corrupted() ... commit 72a9ff3bf7fbd7e887d4e6bbc1c04817da2b9887 Author: Mauro Carvalho Chehab Date: Thu Sep 3 13:56:30 2020 +0200 media: atomisp: get rid of -Wsuggest-attribute=format warnings There are some warnings reported by gcc: drivers/staging/media/atomisp//pci/atomisp_compat_css20.c:164:2: warning: function ‘atomisp_css2_dbg_print’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] drivers/staging/media/atomisp//pci/atomisp_compat_css20.c:170:2: warning: function ‘atomisp_css2_dbg_ftrace_print’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] drivers/staging/media/atomisp//pci/atomisp_compat_css20.c:170:2: warning: function ‘atomisp_css2_dbg_ftrace_print’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] drivers/staging/media/atomisp//pci/atomisp_compat_css20.c:176:2: warning: function ‘atomisp_css2_err_print’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] drivers/staging/media/atomisp/pci/sh_css.c:1685:16: warning: assignment left-hand side might be a candidate for a format attribute [-Wsuggest-attribute=format] That are due to the usage of printf-like messages without enabling the error checking logic. Add the proper attributes in order to shut up such warnings. Signed-off-by: Mauro Carvalho Chehab commit b38f7aaef852c88b90caa115f1f64434bc347222 Author: Mauro Carvalho Chehab Date: Thu Sep 3 15:35:19 2020 +0200 media: atomisp: move a static constant out of a header file Gcc reports that input_formatter_alignment is not used: In file included from ./drivers/staging/media/atomisp//pci/hive_isp_css_include/input_formatter.h:34, from drivers/staging/media/atomisp//pci/runtime/debug/src/ia_css_debug.c:55: ./drivers/staging/media/atomisp//pci/hive_isp_css_common/host/input_formatter_local.h:118:27: warning: ‘input_formatter_alignment’ defined but not used [-Wunused-const-variable=] However, it is, but only inside input_formatter.c. So, move it out of the header file. Signed-off-by: Mauro Carvalho Chehab commit 852a53a02cf04b17f5e1677991d439cadc77ea29 Author: Mauro Carvalho Chehab Date: Thu Sep 3 13:04:20 2020 +0200 media: atomisp: get rid of unused vars There are several vars declared and set but unused: drivers/staging/media/atomisp//pci/sh_css_param_shading.c:239:4: warning: variable ‘padded_width’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:1366:24: warning: variable ‘stream’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:2702:22: warning: variable ‘capture_pipe’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:2831:7: warning: variable ‘continuous’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:3534:15: warning: variable ‘num_output_pins’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:3937:55: warning: variable ‘vf_pp_binary’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:3937:38: warning: variable ‘preview_binary’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:3937:24: warning: variable ‘copy_binary’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:3936:26: warning: variable ‘me’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:5749:24: warning: variable ‘copy_binary’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:6013:7: warning: variable ‘continuous’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:6012:7: warning: variable ‘memory’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:7329:24: warning: variable ‘copy_binary’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:7459:26: warning: variable ‘num_vf_pp_stage’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css.c:10420:22: warning: variable ‘pipe_id’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css_params.c:1099:36: warning: variable ‘row_padding’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/sh_css_mipi.c:410:27: warning: variable ‘mipi_intermediate_info’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/atomisp_cmd.c:2814:31: warning: variable ‘stream_config’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/atomisp_cmd.c:2893:31: warning: variable ‘stream_config’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c:237:31: warning: variable ‘isp_data_ptr’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c:119:28: warning: variable ‘ver_num_isp’ set but not used [-Wunused-but-set-variable] drivers/staging/media/atomisp//pci/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c:119:15: warning: variable ‘hor_num_isp’ set but not used [-Wunused-but-set-variable] Signed-off-by: Mauro Carvalho Chehab commit 5eae59cc876c8c1043d3eb55a2e965bb36e90bba Author: Ian Abbott Date: Fri Sep 4 14:21:43 2020 +0100 HID: wiimote: narrow spinlock range in wiimote_hid_event() In `wiimote_hid_event()`, the `wdata->state.lock` spinlock does not need to be held while searching `handlers[]` for a suitable handler function. Change it so the spinlock is only held during the call to the handler function itself. Signed-off-by: Ian Abbott Reviewed-by: David Rheinsberg Signed-off-by: Jiri Kosina commit aeeba45a9df34a00113f96f9f52c45e250ff7b7d Author: Ian Abbott Date: Fri Sep 4 14:21:42 2020 +0100 HID: wiimote: make handlers[] const The `handlers[]` array contents are never modified, so use the `const` qualifier. Signed-off-by: Ian Abbott Reviewed-by: David Rheinsberg Signed-off-by: Jiri Kosina commit 8fae9dd6a1e385adc041fae236e62aaeb3ae38ca Author: Mauro Carvalho Chehab Date: Thu Sep 3 15:10:38 2020 +0200 media: atomisp: print a warning if error while setting downscaler As warned by gcc: drivers/staging/media/atomisp//pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c:237:31: warning: variable ‘isp_data_ptr’ set but not used [-Wunused-but-set-variable] ia_css_vf_configure() logic has an error var that detects troubles when setting the kernel for downscaling. The driver just ignores it, without producing any warning. Add at least a warning message on such cases. Signed-off-by: Mauro Carvalho Chehab commit a80abc94dff78952c7989d42ea2b71825718957f Author: Mauro Carvalho Chehab Date: Thu Sep 3 13:10:36 2020 +0200 media: atomisp: get rid of some cleanup leftovers The code that used to check for ISP2400/2401 version were using the revision number in order to decide wheather version should be used. With the new version, the code doesn't need to check anymore for ISP version. Fixes: ca133c395f2f ("media: atomisp: improve device detection code") Signed-off-by: Mauro Carvalho Chehab commit 49a3d74b46cb9cc2266c334844b353f65b367732 Author: Mauro Carvalho Chehab Date: Wed Sep 2 08:54:01 2020 +0200 media: vivid: fix error path If something fails after calling v4l2_device_register(), it should call v4l2_device_put(). Signed-off-by: Mauro Carvalho Chehab commit 62c6b4c9e3c8e30ba4ad6c85732f00a26c5e4394 Author: Mauro Carvalho Chehab Date: Tue Sep 1 15:43:45 2020 +0200 media: vivid: move the devnode creation logic to a separate function In order to reduce even further the size of the big vivid_create_instance() function, let's place the part of the logic which creates the device nodes into a separate function. With this and the past patches, those warnings finally vanishes: drivers/media/test-drivers/vivid/vivid-core.c: drivers/media/test-drivers/vivid/vivid-core.c:1189 vivid_create_instance() parse error: turning off implications after 60 seconds drivers/media/test-drivers/vivid/vivid-core.c: drivers/media/test-drivers/vivid/vivid-core.c:1257 vivid_create_instance() parse error: __split_smt: function too hairy. Giving up after 303 seconds The init code also seems more organized after breaking the long function into a smaller set. Signed-off-by: Mauro Carvalho Chehab commit faf21f2867a51866599fa75a9be66dd12bc8db13 Author: Mauro Carvalho Chehab Date: Tue Sep 1 15:31:01 2020 +0200 media: vivid: move the create queues to a separate function Instead of placing everything inside vivid_create_instance(), we can move the part which creates per-type video queues into a separate function. Signed-off-by: Mauro Carvalho Chehab commit d92c8e31451cb025c2ec53f7a5e11298fba6c481 Author: Mauro Carvalho Chehab Date: Tue Sep 1 15:22:21 2020 +0200 media: vivid: place dt timings init code on a separate function Move those out of the big vivid_create_instance() function. Signed-off-by: Mauro Carvalho Chehab commit 120dc60d0bdbadcad7460222f74c9ed15cdeb73e Author: Ard Biesheuvel Date: Tue Aug 25 15:54:40 2020 +0200 arm64: get rid of TEXT_OFFSET TEXT_OFFSET serves no purpose, and for this reason, it was redefined as 0x0 in the v5.8 timeframe. Since this does not appear to have caused any issues that require us to revisit that decision, let's get rid of the macro entirely, along with any references to it. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20200825135440.11288-1-ardb@kernel.org Signed-off-by: Will Deacon commit 4306c5379dc6307c5100beacda6d2188eed40952 Author: Mauro Carvalho Chehab Date: Tue Sep 1 15:12:06 2020 +0200 media: vivid: move set_capabilities logic to a separate function Move such logic from vivid_create_instance(), as otherwise smatch takes forever. The vivid_create_instance() is still a too big for my taste. So, further cleanups are still needed. Signed-off-by: Mauro Carvalho Chehab commit fcaeb01929d7c4bfcaa2b374119d6a9a823d0dfe Author: Mauro Carvalho Chehab Date: Tue Sep 1 15:07:12 2020 +0200 media: vivid: place the logic which disables ioctl on a separate function Move this code out of the long vivid_create_instance() function. Signed-off-by: Mauro Carvalho Chehab commit 31b97d358d92cb7d8e82f08dc9411bc873020c2c Author: Mauro Carvalho Chehab Date: Tue Sep 1 14:56:19 2020 +0200 media: vivid: move the detection part out of vivid_create_instance The vivid_create_instance() function is too harry. Smatch can't process it, because it takes too long. The detection part is an important piece of it. As such, there are even comments before and after such block. So, it makes sense to just move it to a separate function. Signed-off-by: Mauro Carvalho Chehab commit d0c6a3475b033960e85ae2bf176b14cab0a627d2 Author: Pali Rohár Date: Mon Sep 7 13:10:38 2020 +0200 PCI: aardvark: Move PCIe reset card code to advk_pcie_train_link() Move code which belongs to link training (delays and resets) into advk_pcie_train_link() function, so everything related to link training, including timings is at one place. After experiments it can be observed that link training in aardvark hardware is very sensitive to timings and delays, so it is a good idea to have this code at the same place as link training calls. This patch does not change behavior of aardvark initialization. Link: https://lore.kernel.org/r/20200907111038.5811-6-pali@kernel.org Tested-by: Marek Behún Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi commit 526a76991b7b791aa00037c27a653536e5f01c26 Author: Pali Rohár Date: Mon Sep 7 13:10:37 2020 +0200 PCI: aardvark: Implement driver 'remove' function and allow to build it as module Providing driver's 'remove' function allows kernel to bind and unbind devices from aardvark driver. It also allows to build aardvark driver as a module. Compiling aardvark as a module simplifies development and debugging of this driver as it can be reloaded at runtime without the need to reboot to new kernel. Link: https://lore.kernel.org/r/20200907111038.5811-5-pali@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi Reviewed-by: Marek Behún commit d39ff8ee9f27a767b409b84d698e07ccac53dd8f Author: Pali Rohár Date: Mon Sep 7 13:10:36 2020 +0200 PCI: pci-bridge-emul: Export API functions It allows kernel modules which are not compiled into kernel image to use pci-bridge-emul API functions. Link: https://lore.kernel.org/r/20200907111038.5811-4-pali@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi Reviewed-by: Marek Behún commit 7862a6134456c8b4f8c39e8c94aa97e5c2f7f2b7 Author: Pali Rohár Date: Mon Sep 7 13:10:35 2020 +0200 PCI: aardvark: Check for errors from pci_bridge_emul_init() call Function pci_bridge_emul_init() may fail so correctly check for errors. Link: https://lore.kernel.org/r/20200907111038.5811-3-pali@kernel.org Fixes: 8a3ebd8de328 ("PCI: aardvark: Implement emulated root PCI bridge config space") Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi Reviewed-by: Marek Behún commit b32c012e4b98f0126aa327be2d1f409963057643 Author: Pali Rohár Date: Mon Sep 7 13:10:34 2020 +0200 PCI: aardvark: Fix compilation on s390 Include linux/gpio/consumer.h instead of linux/gpio.h, as is said in the latter file. This was reported by kernel test bot when compiling for s390. drivers/pci/controller/pci-aardvark.c:350:2: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror,-Wimplicit-function-declaration] drivers/pci/controller/pci-aardvark.c:1074:21: error: implicit declaration of function 'devm_gpiod_get_from_of_node' [-Werror,-Wimplicit-function-declaration] drivers/pci/controller/pci-aardvark.c:1076:14: error: use of undeclared identifier 'GPIOD_OUT_LOW' Link: https://lore.kernel.org/r/202006211118.LxtENQfl%25lkp@intel.com Link: https://lore.kernel.org/r/20200907111038.5811-2-pali@kernel.org Fixes: 5169a9851daa ("PCI: aardvark: Issue PERST via GPIO") Reported-by: kernel test robot Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi Reviewed-by: Marek Behún commit c2bea7a1a1c0c4c5c970696ff556a73f55f998eb Author: Zenghui Yu Date: Tue Aug 18 14:36:25 2020 +0800 ACPI/IORT: Remove the unused inline functions Since commit 8212688600ed ("ACPI/IORT: Fix build error when IOMMU_SUPPORT is disabled"), iort_fwspec_iommu_ops() and iort_add_device_replay() are not needed anymore when CONFIG_IOMMU_API is not selected. Let's remove them. Signed-off-by: Zenghui Yu Acked-by: Lorenzo Pieralisi Acked-by: Hanjun Guo Link: https://lore.kernel.org/r/20200818063625.980-3-yuzenghui@huawei.com Signed-off-by: Will Deacon commit 1ab64cf81489e871bcb94fb2dea35c7fac561fff Author: Zenghui Yu Date: Tue Aug 18 14:36:24 2020 +0800 ACPI/IORT: Drop the unused @ops of iort_add_device_replay() Since commit d2e1a003af56 ("ACPI/IORT: Don't call iommu_ops->add_device directly"), we use the IOMMU core API to replace a direct invoke of the specified callback. The parameter @ops has therefore became unused. Let's drop it. Signed-off-by: Zenghui Yu Acked-by: Lorenzo Pieralisi Acked-by: Hanjun Guo Link: https://lore.kernel.org/r/20200818063625.980-2-yuzenghui@huawei.com Signed-off-by: Will Deacon commit 9a747c91e8d69d7283c850031d2462f4d27bf25b Author: Yanfei Xu Date: Tue Sep 1 17:11:54 2020 +0800 arm64/numa: Fix a typo in comment of arm64_numa_init Fix a typo in comment of arm64_numa_init. 'encomapssing' should be 'encompassing'. Signed-off-by: Yanfei Xu Link: https://lore.kernel.org/r/20200901091154.10112-1-yanfei.xu@windriver.com Signed-off-by: Will Deacon commit ad14c19242b5a5f87aa86c4c930e668121de2809 Author: Xiaoming Ni Date: Fri Aug 28 11:18:22 2020 +0800 arm64: fix some spelling mistakes in the comments by codespell arch/arm64/include/asm/cpu_ops.h:24: necesary ==> necessary arch/arm64/include/asm/kvm_arm.h:69: maintainance ==> maintenance arch/arm64/include/asm/cpufeature.h:361: capabilties ==> capabilities arch/arm64/kernel/perf_regs.c:19: compatability ==> compatibility arch/arm64/kernel/smp_spin_table.c:86: endianess ==> endianness arch/arm64/kernel/smp_spin_table.c:88: endianess ==> endianness arch/arm64/kvm/vgic/vgic-mmio-v3.c:1004: targetting ==> targeting arch/arm64/kvm/vgic/vgic-mmio-v3.c:1005: targetting ==> targeting Signed-off-by: Xiaoming Ni Link: https://lore.kernel.org/r/20200828031822.35928-1-nixiaoming@huawei.com Signed-off-by: Will Deacon commit bd07a20a38b6598dc09f5543eb03710e807cb429 Author: Barry Song Date: Thu Aug 27 21:29:57 2020 +1200 iommu/arm-smmu-v3: permit users to disable msi polling Polling by MSI isn't necessarily faster than polling by SEV. Tests on hi1620 show hns3 100G NIC network throughput can improve from 25G to 27G if we disable MSI polling while running 16 netperf threads sending UDP packets in size 32KB. TX throughput can improve from 7G to 7.7G for single thread. The reason for the throughput improvement is that the latency to poll the completion of CMD_SYNC becomes smaller. After sending a CMD_SYNC in an empty cmd queue, typically we need to wait for 280ns using MSI polling. But we only need around 190ns after disabling MSI polling. This patch provides a command line option so that users can decide to use MSI polling or not based on their tests. Signed-off-by: Barry Song Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20200827092957.22500-4-song.bao.hua@hisilicon.com Signed-off-by: Will Deacon commit 9305d02adcc14adc0f4e7d5ad0c370174923e6dc Author: Barry Song Date: Thu Aug 27 21:29:56 2020 +1200 iommu/arm-smmu-v3: replace module_param_named by module_param for disable_bypass Just use module_param() - going out of the way to specify a "different" name that's identical to the variable name is silly. Signed-off-by: Barry Song Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20200827092957.22500-3-song.bao.hua@hisilicon.com Signed-off-by: Will Deacon commit fea9ae18cf77a79cb32046d7785d000a00a226cd Author: Barry Song Date: Thu Aug 27 21:29:55 2020 +1200 iommu/arm-smmu-v3: replace symbolic permissions by octal permissions for module parameter This fixed the below checkpatch issue: WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. 417: FILE: drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:417: module_param_named(disable_bypass, disable_bypass, bool, S_IRUGO); Signed-off-by: Barry Song Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20200827092957.22500-2-song.bao.hua@hisilicon.com Signed-off-by: Will Deacon commit ceea93444808c7d1fd07a01927937d20237d849e Author: Christian Gromm Date: Thu Aug 20 13:23:15 2020 +0200 drivers: most: add character device interface driver This patch adds the character device (cdev) driver source file most_cdev.c and modifies the Makefiles and Kconfigs accordingly. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1597922595-27493-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit dc898eb84b25c39ea46f28c48a169bdbd0e2c7e0 Author: Zenghui Yu Date: Wed Aug 26 22:17:58 2020 +0800 iommu/arm-smmu-v3: Fix l1 stream table size in the error message The actual size of level-1 stream table is l1size. This looks like an oversight on commit d2e88e7c081ef ("iommu/arm-smmu: Fix LOG2SIZE setting for 2-level stream tables") which forgot to update the @size in error message as well. As memory allocation failure is already bad enough, nothing worse would happen. But let's be careful. Signed-off-by: Zenghui Yu Link: https://lore.kernel.org/r/20200826141758.341-1-yuzenghui@huawei.com Signed-off-by: Will Deacon commit d51eb416fa111c1129c46ea3320faab36bf4c99c Author: Shaokun Zhang Date: Fri Sep 4 10:21:37 2020 +0800 drivers/perf: hisi: Add missing include of linux/module.h MODULE_*** is used in HiSilicon uncore PMU drivers and is provided by linux/module.h, but the header file is not directly included. Add the missing include. Signed-off-by: Shaokun Zhang Cc: Will Deacon Cc: Mark Rutland Link: https://lore.kernel.org/r/1599186097-18599-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit 6b3bb3c82b94521d6d61c1bf7c766c8c3bddacf5 Author: Samuel Holland Date: Sun Aug 30 22:48:52 2020 -0500 ASoC: sun8i-codec: Manage module clock via DAPM By representing the module clock as a DAPM widget, we ensure that the clock is only enabled when the module is actually in use, without additional code in runtime PM hooks. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200831034852.18841-10-samuel@sholland.org Signed-off-by: Mark Brown commit efb736fb9eceac6ce335bbaa3d788a05649160b5 Author: Samuel Holland Date: Sun Aug 30 22:48:51 2020 -0500 ASoC: sun8i-codec: Attach the bus clock to the regmap When attached to the regmap, the bus clock is automatically enabled as needed to access device registers. This avoids needing code to manage it separately in the driver. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200831034852.18841-9-samuel@sholland.org Signed-off-by: Mark Brown commit f30ef55c332935c1d7c5f4ae3d084bec8d05712e Author: Samuel Holland Date: Sun Aug 30 22:48:50 2020 -0500 ASoC: sun8i-codec: Sort masks in a consistent order All other definitions are sorted from largest to smallest bit number. This makes the AIF1CLK_CTRL mask constants consistent with them. Acked-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200831034852.18841-8-samuel@sholland.org Signed-off-by: Mark Brown commit fcb7b39ee3d877e4eb79fb2abf15644d1b36285c Author: Samuel Holland Date: Sun Aug 30 22:48:49 2020 -0500 ASoC: sun8i-codec: Fix field bit number indentation Several fields have inconsistent indentation, presumably because the patch "looked correct" due to the additional "+" character at the beginning of the line. Acked-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200831034852.18841-7-samuel@sholland.org Signed-off-by: Mark Brown commit 30aff91ec7840fb72daef7ce389a9414e5db4075 Author: Samuel Holland Date: Sun Aug 30 22:48:48 2020 -0500 ASoC: sun8i-codec: Fix ADC_DIG_CTRL field name This is the enable bit for the "AD"C, not the "DA"C. Acked-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200831034852.18841-6-samuel@sholland.org Signed-off-by: Mark Brown commit 0ba95493023de45744962af41ef5ad90bad7d8bb Author: Samuel Holland Date: Sun Aug 30 22:48:47 2020 -0500 ASoC: sun8i-codec: Fix AIF1_MXR_SRC field names Even though they are for the left channel mixer, they are documented as "MXR_SRC". This matches the naming scheme used for the main DAC. The "R" is part of the abbreviation for "mixer", not a reference to the channel. Acked-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200831034852.18841-5-samuel@sholland.org Signed-off-by: Mark Brown commit fa5c0ca1f90aaadb6539ec6c407221f2ab7b7608 Author: Samuel Holland Date: Sun Aug 30 22:48:46 2020 -0500 ASoC: sun8i-codec: Fix AIF1_ADCDAT_CTRL field names They are controlling "AD0" (AIF1 slot 0 ADC), not "DA0". Acked-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200831034852.18841-4-samuel@sholland.org Signed-off-by: Mark Brown commit 2455e37adef39bf7fd12df963b86fa7f313f1ad4 Author: Samuel Holland Date: Sun Aug 30 22:48:45 2020 -0500 ASoC: sun8i-codec: Fix AIF1 MODCLK widget name The name should reference "AIF1", not "AFI1". Acked-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200831034852.18841-3-samuel@sholland.org Signed-off-by: Mark Brown commit b8cbb1cab70342756725c1beded6b81031a95762 Author: Samuel Holland Date: Sun Aug 30 22:48:44 2020 -0500 ASoC: sun8i-codec: Remove extraneous widgets This driver is for the digital part of the codec only. The analog part, including the microphone inputs, is managed by a separate driver. These widgets look like they were copied from sun4i-codec. Since they do not perform any function in this driver, remove them. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200831034852.18841-2-samuel@sholland.org Signed-off-by: Mark Brown commit 7f360bec37857bfd5a48cef21d86f58a09a3df63 Author: Souptick Joarder Date: Wed Sep 2 02:51:11 2020 +0530 drivers/virt/fsl_hypervisor: Fix error handling path First, when memory allocation for sg_list_unaligned failed, there is a bug of calling put_pages() as we haven't pinned any pages. Second, if get_user_pages_fast() failed we should unpin num_pinned pages. This will address both. As part of these changes, minor update in documentation. Fixes: 6db7199407ca ("drivers/virt: introduce Freescale hypervisor management driver") Signed-off-by: Souptick Joarder Reviewed-by: Dan Carpenter Reviewed-by: John Hubbard Link: https://lore.kernel.org/r/1598995271-6755-1-git-send-email-jrdr.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 887af6d7c99e963c6f92af8e985f9aa6f4f9eac2 Author: Masahiro Yamada Date: Tue Sep 1 03:22:39 2020 +0900 arch: vdso: add vdso linker script to 'targets' instead of extra-y The vdso linker script is preprocessed on demand. Adding it to 'targets' is enough to include the .cmd file. Signed-off-by: Masahiro Yamada Acked-by: Catalin Marinas Acked-by: Greentime Hu commit 9f30eb29c514589e16f2999ea070598583d1f6ec Author: Michal Suchanek Date: Mon Aug 31 18:58:50 2020 +0200 char: virtio: Select VIRTIO from VIRTIO_CONSOLE. Make it possible to have virtio console built-in when other virtio drivers are modular. Signed-off-by: Michal Suchanek Reviewed-by: Amit Shah Link: https://lore.kernel.org/r/20200831165850.26163-1-msuchanek@suse.de Signed-off-by: Greg Kroah-Hartman commit a4c3d756530606a3041928f702635df281ff3e75 Author: Tian Tao Date: Thu Aug 20 10:16:32 2020 +0800 uacce: Use kobj_to_dev() instead of container_of() Use kobj_to_dev() instead of container_of() Signed-off-by: Tian Tao Reviewed-by: Zhou Wang Acked-by: Zhangfei Gao Link: https://lore.kernel.org/r/1597889792-53139-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit 31ae403513be3aa464c28a5544ecb2beb20f32c6 Author: Douglas Anderson Date: Thu Sep 3 16:24:41 2020 -0700 mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that are newer than 5.4 This is like commit 3d3451124f3d ("mmc: sdhci-msm: Prefer asynchronous probe") but applied to a whole pile of drivers. This batch converts the drivers that appeared to have been added after kernel 5.4. Signed-off-by: Douglas Anderson Acked-by: Lars Povlsen Acked-by: Angelo Dureghello Acked-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200903162412.6.Ib121debfb18e5f923a3cd38fe9c36aa086c650c5@changeid Signed-off-by: Ulf Hansson commit d86472ae8b20805449c42467417cfc1ff579a76b Author: Douglas Anderson Date: Thu Sep 3 16:24:40 2020 -0700 mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v5.4 This is like commit 3d3451124f3d ("mmc: sdhci-msm: Prefer asynchronous probe") but applied to a whole pile of drivers. This batch converts the drivers that appeared to be around in the v5.4 timeframe. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200903162412.5.I2b630c4d40ff4ea61d5b30b8ccfe95890e257100@changeid Signed-off-by: Ulf Hansson commit a1a489197a07ec1dbf3f6033b84755a74efc65dc Author: Douglas Anderson Date: Thu Sep 3 16:24:39 2020 -0700 mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.19 This is like commit 3d3451124f3d ("mmc: sdhci-msm: Prefer asynchronous probe") but applied to a whole pile of drivers. This batch converts the drivers that appeared to be around in the v4.19 timeframe. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200903162412.4.I84eb3e0a738635d524c90d1a688087bc295f7c32@changeid Signed-off-by: Ulf Hansson commit 7320915c88618050a2f65a193f0e25cccb2007b6 Author: Douglas Anderson Date: Thu Sep 3 16:24:38 2020 -0700 mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.14 This is like commit 3d3451124f3d ("mmc: sdhci-msm: Prefer asynchronous probe") but applied to a whole pile of drivers. This batch converts the drivers that appeared to be around in the v4.14 timeframe. Signed-off-by: Douglas Anderson Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang # SDHI drivers Link: https://lore.kernel.org/r/20200903162412.3.Id1ff21470f08f427aedd0a6535dcd83ccc56b278@changeid Signed-off-by: Ulf Hansson commit 2a99f3fa85eaa79c332945a256ff63aad1fd0b9c Author: Douglas Anderson Date: Thu Sep 3 16:24:37 2020 -0700 mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.9 This is like commit 3d3451124f3d ("mmc: sdhci-msm: Prefer asynchronous probe") but applied to a whole pile of drivers. This batch converts the drivers that appeared to be around in the v4.9 timeframe. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200903162412.2.I226782b43191ce367fa3bc1c907c29f571890412@changeid Signed-off-by: Ulf Hansson commit c1cf1d57d1492235309111ea6a900940213a9166 Author: Mark Tomlinson Date: Thu Sep 3 15:42:17 2020 +1200 mtd: mtdoops: Don't write panic data twice If calling mtdoops_write, don't also schedule work to be done later. Although this appears to not be causing an issue, possibly because the scheduled work will never get done, it is confusing. Fixes: 016c1291ce70 ("mtd: mtdoops: do not use mtd->panic_write directly") Signed-off-by: Mark Tomlinson Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200903034217.23079-1-mark.tomlinson@alliedtelesis.co.nz commit 21b2cec61c04bd175f0860d9411a472d5a0e7ba1 Author: Douglas Anderson Date: Thu Sep 3 16:24:36 2020 -0700 mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4 This is like commit 3d3451124f3d ("mmc: sdhci-msm: Prefer asynchronous probe") but applied to a whole pile of drivers. This batch converts the drivers that appeared to be around in the v4.4 timeframe. Signed-off-by: Douglas Anderson Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang # SH_MMCIF Tested-by: Thierry Reding Link: https://lore.kernel.org/r/20200903162412.1.Id501e96fa63224f77bb86b2135a5e8324ffb9c43@changeid Signed-off-by: Ulf Hansson commit 06998d49bcac8a9df3341db99c5f81ae4ef51c84 Author: Pierre-Louis Bossart Date: Sat Sep 5 02:28:54 2020 +0800 ASoC: Intel: sof_sdw: add dailink .prepare and .hw_free callback Add .prepare and .hw_free callback to dailink. The companion patch for this patch is the removal of stream operations in the .prepare and .hw_free callbacks at the DAI level in drivers/soundwire/intel.c Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200904182854.3944-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit ae3a3918edf57bde7651964be04d0807cccae8f2 Author: Pierre-Louis Bossart Date: Sat Sep 5 02:28:53 2020 +0800 ASoC: Intel: sof_sdw: add dailink .trigger callback Add trigger functionality to dailink, so far only .startup() and .shutdown() were implemented at the machine driver level. The companion patch for this patch is the removal of the trigger callback at the DAI level in drivers/soundwire/intel.c Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200904182854.3944-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit d20e834e13ce349c9b901b9dd8b7013e255083e8 Author: Pierre-Louis Bossart Date: Sat Sep 5 02:28:52 2020 +0800 ASoC: soc-dai: clarify return value for get_sdw_stream() Previous changes move to use ERR_PTR(-ENOTSUPP), but it's not clear what implementations can return in case of errors. Explicitly document that NULL is not a possible return value, only ERR_PTR with a negative error code is valid. Fixes: 308811a327c38 ('ASoC: soc-dai: return proper error for get_sdw_stream()') Cc: Srinivas Kandagatla Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200904182854.3944-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 54d8454436a205682bd89d66d8d9eedbc8452d15 Author: Krzysztof Kozlowski Date: Mon Sep 7 12:52:54 2020 +0200 mmc: host: Enable compile testing of multiple drivers Multiple MMC host controller driver can be compile tested as they do not depend on architecture specific headers. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200907105254.31097-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit e0ee152fce25dc9269c7ea5280c98aa4b3682759 Author: Thomas Hellström Date: Thu Sep 3 15:07:17 2020 +0200 drm/i915: Unlock the shared hwsp_gtt object after pinning The hwsp_gtt object is used for sub-allocation and could therefore be shared by many contexts causing unnecessary contention during concurrent context pinning. However since we're currently locking it only for pinning, it remains resident until we unpin it, and therefore it's safe to drop the lock early, allowing for concurrent thread access. Signed-off-by: Thomas Hellström Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen commit f4b3c395540aa3d4f5a6275c5bdd83ab89034806 Author: Chris Wilson Date: Tue Jul 28 16:21:44 2020 +0100 drm/i915: Filter wake_flags passed to default_wake_function (NOTE: This is the minimal backportable fix, a full fix is being developed at https://patchwork.freedesktop.org/patch/388048/) The flags passed to the wait_entry.func are passed onwards to try_to_wake_up(), which has a very particular interpretation for its wake_flags. In particular, beyond the published WF_SYNC, it has a few internal flags as well. Since we passed the fence->error down the chain via the flags argument, these ended up in the default_wake_function confusing the kernel/sched. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2110 Fixes: ef4688497512 ("drm/i915: Propagate fence errors") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: # v5.4+ Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200728152144.1100-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi [Joonas: Rebased and reordered into drm-intel-gt-next branch] [Joonas: Added a note and link about more complete fix] Signed-off-by: Joonas Lahtinen commit 2e4c6c1a9db5e12556a12ea722df71096247e178 Author: Chris Wilson Date: Thu Jul 16 15:22:07 2020 +0100 drm/i915: Remove i915_request.lock requirement for execution callbacks To implement preempt-to-busy (and so efficient timeslicing and best utilization of the hardware submission ports) we let the GPU run asynchronously in respect to the ELSP submission queue. This created challenges in keeping and accessing the driver state mirroring the asynchronous GPU execution. Previous fix 1d9221e9d395 ("drm/i915: Skip signaling a signaled request") however did not correctly serialize request retirement with the execution callbacks. We were using the i915_request.lock to serialise adding an execution callback with __i915_request_submit. However, if we use an atomic llist_add to serialise multiple waiters and then check to see if the request is already executing, we can remove the irq-spinlock and fix serialization between retirement and execution callbacks in one go. v2: Avoid using the irq_work when outside of the irq-spinlocks, where we can execute the callbacks immediately. v3: Pay close attention to the order of setting ACTIVE on retirement, we need to ensure the request is signaled and breadcrumbs detached before we finish removing the request from the engine. v4: Expanded commit message. Fixes: 1d9221e9d395 ("drm/i915: Skip signaling a signaled request") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200716142207.13003-2-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi [Joonas: Rebased and reordered into drm-intel-gt-next branch] [Joonas: Added expanded commit message from Tvrtko and Chris] Signed-off-by: Joonas Lahtinen commit b4d9145b0154f8c71dafc2db5fd445f1f3db9426 Author: Chris Wilson Date: Thu Jul 16 15:22:06 2020 +0100 drm/i915: Be wary of data races when reading the active execlists To implement preempt-to-busy (and so efficient timeslicing and best utilization of the hardware submission ports) we let the GPU run asynchronously in respect to the ELSP submission queue. This created challenges in keeping and accessing the driver state mirroring the asynchronous GPU execution. The latest occurence of this was spotted by KCSAN: [ 1413.563200] BUG: KCSAN: data-race in __await_execution+0x217/0x370 [i915] [ 1413.563221] [ 1413.563236] race at unknown origin, with read to 0xffff88885bb6c478 of 8 bytes by task 9654 on cpu 1: [ 1413.563548] __await_execution+0x217/0x370 [i915] [ 1413.563891] i915_request_await_dma_fence+0x4eb/0x6a0 [i915] [ 1413.564235] i915_request_await_object+0x421/0x490 [i915] [ 1413.564577] i915_gem_do_execbuffer+0x29b7/0x3c40 [i915] [ 1413.564967] i915_gem_execbuffer2_ioctl+0x22f/0x5c0 [i915] [ 1413.564998] drm_ioctl_kernel+0x156/0x1b0 [ 1413.565022] drm_ioctl+0x2ff/0x480 [ 1413.565046] __x64_sys_ioctl+0x87/0xd0 [ 1413.565069] do_syscall_64+0x4d/0x80 [ 1413.565094] entry_SYSCALL_64_after_hwframe+0x44/0xa9 To complicate matters, we have to both avoid the read tearing of *active and avoid any write tearing as perform the pending[] -> inflight[] promotion of the execlists. This is because we cannot rely on the memcpy doing u64 aligned copies on all kernels/platforms and so we opt to open-code it with explicit WRITE_ONCE annotations to satisfy KCSAN. v2: When in doubt, write the same comment again. v3: Expanded commit message. Fixes: b55230e5e800 ("drm/i915: Check for awaits on still currently executing requests") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200716142207.13003-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi [Joonas: Rebased and reordered into drm-intel-gt-next branch] [Joonas: Added expanded commit message from Tvrtko and Chris] Signed-off-by: Joonas Lahtinen commit 78efa6a766eb38282351208031e29289afe9f570 Author: Dan Murphy Date: Wed Aug 12 14:50:20 2020 -0500 ARM: dts: ste-href: Add reg property to the LP5521 channel nodes Add the reg property to each channel node. This update is to accommodate the multicolor framework. In addition to the accommodation this allows the LEDs to be placed on any channel and allow designs to skip channels as opposed to requiring sequential order. Signed-off-by: Dan Murphy Acked-by: Pavel Machek Acked-by: Linus Walleij CC: Linus Walleij Link: https://lore.kernel.org/r/20200812195020.13568-7-dmurphy@ti.com Signed-off-by: Linus Walleij commit e5c956c4f36cdd59e775f2285af9a1683374c5a5 Author: Nishanth Menon Date: Thu Sep 3 08:00:15 2020 -0500 arm64: dts: ti: k3-*: Fix up node_name_chars_strict warnings Building with W=2 throws up a bunch of easy to fixup warnings.. node_name_chars_strict is one of them.. Knock those out. Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Reviewed-by: Suman Anna Link: https://lore.kernel.org/r/20200903130015.21361-9-nm@ti.com commit 9a8ecd414322ceb377cecb4795e3f3d7d7020952 Author: Nishanth Menon Date: Thu Sep 3 08:00:14 2020 -0500 arm64: dts: ti: k3-am65-wakeup: Use generic temperature-sensor for node name Use temperature-sensor@ naming for nodes following standard conventions of device tree (section 2.2.2 Generic Names recommendation in [1]). [1] https://github.com/devicetree-org/devicetree-specification/tree/v0.3 Suggested-by: Suman Anna Suggested-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Reviewed-by: Suman Anna Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200903130015.21361-8-nm@ti.com commit 4c19fb9ce266561ab122880a02e873ee8c3668e4 Author: Nishanth Menon Date: Thu Sep 3 08:00:13 2020 -0500 arm64: dts: ti: k3-am65-base-board Use generic camera for node name instead of ov5640 Use camera@ naming for nodes following standard conventions of device tree (section 2.2.2 Generic Names recommendation in [1]). [1] https://github.com/devicetree-org/devicetree-specification/tree/v0.3 Suggested-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Acked-by: Suman Anna Link: https://lore.kernel.org/r/20200903130015.21361-7-nm@ti.com commit dcccf77067e4274953e8944d9730bb7ae2964c28 Author: Nishanth Menon Date: Thu Sep 3 08:00:12 2020 -0500 arm64: dts: ti: k3-*: Use generic pinctrl for node names Use pinctrl@ naming for nodes following standard conventions of device tree (section 2.2.2 Generic Names recommendation in [1]). [1] https://github.com/devicetree-org/devicetree-specification/tree/v0.3 Suggested-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Acked-by: Suman Anna Link: https://lore.kernel.org/r/20200903130015.21361-6-nm@ti.com commit 86e67b591e6d993d98567143451883a5618c196e Author: Nishanth Menon Date: Thu Sep 3 08:00:11 2020 -0500 arm64: dts: ti: k3-am65*: Use generic clock for syscon clock names serdes and ehrpwm_tbclk nodes should be using clock@ naming for nodes following standard conventions of device tree (section 2.2.2 Generic Names recommendation in [1]). [1] https://github.com/devicetree-org/devicetree-specification/tree/v0.3 Suggested-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Acked-by: Suman Anna Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200903130015.21361-5-nm@ti.com commit 91e5f404e42bc189bb0e447d30041de737ad24bf Author: Nishanth Menon Date: Thu Sep 3 08:00:10 2020 -0500 arm64: dts: ti: k3-am65*: Use generic gpio for node names Use gpio@ naming for nodes following standard conventions of device tree (section 2.2.2 Generic Names recommendation in [1]). [1] https://github.com/devicetree-org/devicetree-specification/tree/v0.3 Suggested-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Acked-by: Suman Anna Link: https://lore.kernel.org/r/20200903130015.21361-4-nm@ti.com commit 05e393c596c4495d79f0cbeacb0f0a0e0b6f89d5 Author: Nishanth Menon Date: Thu Sep 3 08:00:09 2020 -0500 arm64: dts: ti: k3-am65-main: Use lower case hexadecimal Device tree convention uses lower case a-f for hexadecimals. Fix the same. Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Acked-by: Suman Anna Link: https://lore.kernel.org/r/20200903130015.21361-3-nm@ti.com commit 1aedefe13ba263d0d7d1cfbb38aadebbd5bab34e Author: Nishanth Menon Date: Thu Sep 3 08:00:08 2020 -0500 arm64: dts: ti: k3-j721e: Use lower case hexadecimal Device tree convention uses lower case a-f for hexadecimals. Fix the same. Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Acked-by: Suman Anna Link: https://lore.kernel.org/r/20200903130015.21361-2-nm@ti.com commit 3de7b83017bd93d521dc29f475f4c8fc5d61e518 Author: Rikard Falkeborn Date: Mon Sep 7 01:04:52 2020 +0200 firmware: arm_scmi: Constify static scmi-ops These are never modified, so make them const to allow the compiler to put them in read-only memory. Link: https://lore.kernel.org/r/20200906230452.33410-4-rikard.falkeborn@gmail.com Signed-off-by: Rikard Falkeborn Signed-off-by: Sudeep Holla commit 82894c1d397f16c2208a35dbb1310559f31980bb Author: Rikard Falkeborn Date: Mon Sep 7 01:04:51 2020 +0200 firmware: arm_scmi: Constify ops pointers in scmi_handle These are never modified, so make them const to allow drivers to make them const. Link: https://lore.kernel.org/r/20200906230452.33410-3-rikard.falkeborn@gmail.com Signed-off-by: Rikard Falkeborn Signed-off-by: Sudeep Holla commit 69ecb3230b007384726d36499f4bdea98109d3d7 Author: Rikard Falkeborn Date: Mon Sep 7 01:04:50 2020 +0200 cpufreq: arm_scmi: Constify scmi_perf_ops pointers The perf_ops are not modified through this pointer. Make them const to indicate that. This is in preparation to make the scmi-ops pointers in scmi_handle const. Link: https://lore.kernel.org/r/20200906230452.33410-2-rikard.falkeborn@gmail.com Acked-by: Viresh Kumar Signed-off-by: Rikard Falkeborn Signed-off-by: Sudeep Holla commit c1793ba86a41f420a3497d08c5755210783656bc Author: Maarten Lankhorst Date: Wed Aug 19 16:09:03 2020 +0200 drm/i915: Add ww locking to pin_to_display_plane, v2. Use ww locking for pin_to_display_plane for all the pinning and locking. With the locking removed from set_cache_level, we need to fix i915_gem_set_caching_ioctl to take the object reservation lock. As this is a single lock, we don't need to use the ww dance. Changes since v1: - Do not use ww locking in i915_gem_set_caching_ioctl (Thomas). Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-24-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 3c0ffa277ef6fb3a26ff0be730564b1bd81ca139 Author: Maarten Lankhorst Date: Wed Aug 19 16:09:02 2020 +0200 drm/i915: Add ww locking to vm_fault_gtt We want to start requiring the reservation_lock instead of obj->mm.lock for pinning objects, take the ww lock inside vm_fault_gtt as a first step towards the legacy lock removal. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-23-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 15b6c92498704975b741a87c5c85d7b7f2489790 Author: Maarten Lankhorst Date: Wed Aug 19 16:09:01 2020 +0200 drm/i915: Move i915_vma_lock in the selftests to avoid lock inversion, v3. Make sure vma_lock is not used as inner lock when kernel context is used, and add ww handling where appropriate. Ensure that execbuf selftests keep passing by using ww handling. Changes since v2: - Fix i915_gem_context finally. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-22-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 8a929c9eb1c298e7f12ce9062e57bd00d2c40bc3 Author: Maarten Lankhorst Date: Wed Aug 19 16:09:00 2020 +0200 drm/i915: Use ww pinning for intel_context_create_request() We want to get rid of intel_context_pin(), convert intel_context_create_request() first. :) Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-21-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 052e04f170561b38665fd227365c523347bdba03 Author: Maarten Lankhorst Date: Wed Aug 19 16:08:59 2020 +0200 drm/i915/selftests: Fix locking inversion in lrc selftest. This function does not use intel_context_create_request, so it has to use the same locking order as normal code. This is required to shut up lockdep in selftests. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-20-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit dd878c0cec75530ca3ffdb6c759f798eb91cc1df Author: Maarten Lankhorst Date: Wed Aug 19 16:08:58 2020 +0200 drm/i915: Dirty hack to fix selftests locking inversion Some i915 selftests still use i915_vma_lock() as inner lock, and intel_context_create_request() intel_timeline->mutex as outer lock. Fortunately for selftests this is not an issue, they should be fixed but we can move ahead and cleanify lockdep now. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-19-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit f00ecc2ef55861c3cbc3dde93c082b612114efdc Author: Maarten Lankhorst Date: Wed Aug 19 16:08:57 2020 +0200 drm/i915: Convert i915_perf to ww locking as well We have the ordering of timeline->mutex vs resv_lock wrong, convert the i915_pin_vma and intel_context_pin as well to future-proof this. We may need to do future changes to do this more transaction-like, and only get down to a single i915_gem_ww_ctx, but for now this should work. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-18-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit c8d225946a7803230ae48fead6652b6b5943233f Author: Maarten Lankhorst Date: Wed Aug 19 16:08:56 2020 +0200 drm/i915: Kill last user of intel_context_create_request outside of selftests Instead of using intel_context_create_request(), use intel_context_pin() and i915_create_request directly. Now all those calls are gone outside of selftests. :) Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-17-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 6b05030496f773f35f24299b1bd49dc8aa10a580 Author: Maarten Lankhorst Date: Wed Aug 19 16:08:55 2020 +0200 drm/i915: Convert i915_gem_object/client_blt.c to use ww locking as well, v2. This is the last part outside of selftests that still don't use the correct lock ordering of timeline->mutex vs resv_lock. With gem fixed, there are a few places that still get locking wrong: - gvt/scheduler.c - i915_perf.c - Most if not all selftests. Changes since v1: - Add intel_engine_pm_get/put() calls to fix use-after-free when using intel_engine_get_pool(). Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-16-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 47b086934f429561b3828a6b248e3406b5121939 Author: Maarten Lankhorst Date: Wed Aug 19 16:08:54 2020 +0200 drm/i915: Make sure execbuffer always passes ww state to i915_vma_pin. As a preparation step for full object locking and wait/wound handling during pin and object mapping, ensure that we always pass the ww context in i915_gem_execbuffer.c to i915_vma_pin, use lockdep to ensure this happens. This also requires changing the order of eb_parse slightly, to ensure we pass ww at a point where we could still handle -EDEADLK safely. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-15-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 3999a7087989af0bfb9406b77d3d8444031aab7d Author: Maarten Lankhorst Date: Wed Aug 19 16:08:53 2020 +0200 drm/i915: Rework intel_context pinning to do everything outside of pin_mutex Instead of doing everything inside of pin_mutex, we move all pinning outside. Because i915_active has its own reference counting and pinning is also having the same issues vs mutexes, we make sure everything is pinned first, so the pinning in i915_active only needs to bump refcounts. This allows us to take pin refcounts correctly all the time. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-14-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 2bf541ff6d06f4169e198adaa6c4133e178caaa5 Author: Maarten Lankhorst Date: Wed Aug 19 16:08:52 2020 +0200 drm/i915: Pin engine before pinning all objects, v5. We want to lock all gem objects, including the engine context objects, rework the throttling to ensure that we can do this. Now we only throttle once, but can take eb_pin_engine while acquiring objects. This means we will have to drop the lock to wait. If we don't have to throttle we can still take the fastpath, if not we will take the slowpath and wait for the throttle request while unlocked. The engine has to be pinned as first step, otherwise gpu relocations won't work. Changes since v1: - Only need to get a throttled request in the fastpath, no need for a global flag any more. - Always free the waited request correctly. Changes since v2: - Use intel_engine_pm_get()/put() to keeep engine pool alive during EDEADLK handling. Changes since v3: - Fix small rq leak. Changes since v4: - Use a single reloc_context, for intel_context_pin_ww(). Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-13-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit b49a7d51c32e73b0e971247903e7e2a168c4482e Author: Maarten Lankhorst Date: Wed Aug 19 16:08:51 2020 +0200 drm/i915: Nuke arguments to eb_pin_engine Those arguments are already set as eb.file and eb.args, so kill off the extra arguments. This will allow us to move eb_pin_engine() to after we reserved all BO's. Signed-off-by: Maarten Lankhorst Reviewed-by: Tvrtko Ursulin Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-12-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 99f08d674e2d96f24d39452bd162b20e7d6bed12 Author: Maarten Lankhorst Date: Wed Aug 19 16:08:50 2020 +0200 drm/i915: Add ww context handling to context_barrier_task This is required if we want to pass a ww context in intel_context_pin and gen6_ppgtt_pin(). Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-11-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit bfdf8b1d38680dd40f43b95710b2b4e6c6f7f57f Author: Maarten Lankhorst Date: Wed Aug 19 16:08:49 2020 +0200 drm/i915: Use ww locking in intel_renderstate. We want to start using ww locking in intel_context_pin, for this we need to lock multiple objects, and the single i915_gem_object_lock is not enough. Convert to using ww-waiting, and make sure we always pin intel_context_state, even if we don't have a renderstate object. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-10-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit c43ce12328df0770ce899feabdf9c430c54c766a Author: Maarten Lankhorst Date: Wed Aug 19 16:08:48 2020 +0200 drm/i915: Use per object locking in execbuf, v12. Now that we changed execbuf submission slightly to allow us to do all pinning in one place, we can now simply add ww versions on top of struct_mutex. All we have to do is a separate path for -EDEADLK handling, which needs to unpin all gem bo's before dropping the lock, then starting over. This finally allows us to do parallel submission, but because not all of the pinning code uses the ww ctx yet, we cannot completely drop struct_mutex yet. Changes since v1: - Keep struct_mutex for now. :( Changes since v2: - Make sure we always lock the ww context in slowpath. Changes since v3: - Don't call __eb_unreserve_vma in eb_move_to_gpu now; this can be done on normal unlock path. - Unconditionally release vmas and context. Changes since v4: - Rebased on top of struct_mutex reduction. Changes since v5: - Remove training wheels. Changes since v6: - Fix accidentally broken -ENOSPC handling. Changes since v7: - Handle gt buffer pool better. Changes since v8: - Properly clear variables, to make -EDEADLK handling not BUG. Change since v9: - Fix unpinning fence on pnv and below. Changes since v10: - Make relocation gpu chaining working again. Changes since v11: - Remove relocation chaining, pain to make it work. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-9-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 8e4ba491b0ba6fef69270d3c4e48fc517096ef41 Author: Maarten Lankhorst Date: Wed Aug 19 16:08:47 2020 +0200 drm/i915: Parse command buffer earlier in eb_relocate(slow) We want to introduce backoff logic, but we need to lock the pool object as well for command parsing. Because of this, we will need backoff logic for the engine pool obj, move the batch validation up slightly to eb_lookup_vmas, and the actual command parsing in a separate function which can get called from execbuf relocation fast and slowpath. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-8-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 1af343cdc1971ff953f08f9dcf0efad464cf057f Author: Maarten Lankhorst Date: Wed Aug 19 16:08:46 2020 +0200 drm/i915: Remove locking from i915_gem_object_prepare_read/write Execbuffer submission will perform its own WW locking, and we cannot rely on the implicit lock there. This also makes it clear that the GVT code will get a lockdep splat when multiple batchbuffer shadows need to be performed in the same instance, fix that up. Signed-off-by: Maarten Lankhorst Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-7-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 80f0b679d6f0683f23cf98a511af3e44dd509472 Author: Maarten Lankhorst Date: Wed Aug 19 16:08:45 2020 +0200 drm/i915: Add an implementation for i915_gem_ww_ctx locking, v2. i915_gem_ww_ctx is used to lock all gem bo's for pinning and memory eviction. We don't use it yet, but lets start adding the definition first. To use it, we have to pass a non-NULL ww to gem_object_lock, and don't unlock directly. It is done in i915_gem_ww_ctx_fini. Changes since v1: - Change ww_ctx and obj order in locking functions (Jonas Lahtinen) Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-6-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 8ae275c288d3629cd7a2d0191c09f9c9edcec4c0 Author: Maarten Lankhorst Date: Wed Aug 19 16:08:44 2020 +0200 Revert "drm/i915/gem: Split eb_vma into its own allocation" This reverts commit 0f1dd02295f3 ("drm/i915/gem: Split eb_vma into its own allocation") and also moves all unreserving to a single place at the end, which is a minor simplification. With the WW locking, we will drop all references only at the end when unlocking, so refcounting can now be removed. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-5-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit fd1500fcd4420eee06e2c7f3aa6067b78ac05871 Author: Maarten Lankhorst Date: Wed Aug 19 16:08:43 2020 +0200 Revert "drm/i915/gem: Drop relocation slowpath". This reverts commit 7dc8f1143778 ("drm/i915/gem: Drop relocation slowpath"). We need the slowpath relocation for taking ww-mutex inside the page fault handler, and we will take this mutex when pinning all objects. We also functionally revert ef398881d27d ("drm/i915/gem: Limit struct_mutex to eb_reserve"), as we need the struct_mutex in the slowpath as well, and a tiny part of 003d8b9143a6 ("drm/i915/gem: Only call eb_lookup_vma once during execbuf ioctl"). Specifically, we make the -EAGAIN handling part of fallback to slowpath again. With this, we have a proper working slowpath again, which will allow us to do fault handling with WW locks held. [mlankhorst: Adjusted for reloc_gpu_flush() changes] Cc: Chris Wilson Cc: Matthew Auld Signed-off-by: Maarten Lankhorst [mlankhorst: Removed extra reloc_gpu_flush()] Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-4-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 50ae6c61a17ce12c81fb1aa8b1bd21c284b81768 Author: Maarten Lankhorst Date: Wed Aug 19 16:08:42 2020 +0200 drm/i915: Revert relocation chaining commits. This reverts commit 964a9b0f611ee ("drm/i915/gem: Use chained reloc batches") and commit 0e97fbb080553 ("drm/i915/gem: Use a single chained reloc batches for a single execbuf"). When adding ww locking to execbuf, it's hard enough to deal with a single BO that is part of relocation execution. Chaining is hard to get right, and with GPU relocation deprecated, it's best to drop this altogether, instead of trying to fix something we will remove. This is not a completely 1:1 revert, we reset rq_size to 0 in reloc_cache_init, this was from e3d291301f99 ("drm/i915/gem: Implement legacy MI_STORE_DATA_IMM"), because we don't want to break the selftests. (Daniel) Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-3-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit 102a0a9051f4bb61c105bd2c68b82456325c7c2a Author: Maarten Lankhorst Date: Wed Aug 19 16:08:41 2020 +0200 Revert "drm/i915/gem: Async GPU relocations only" This reverts commit 9e0f9464e2ab ("drm/i915/gem: Async GPU relocations only"), and related commit 7ac2d2536dfa7 ("drm/i915/gem: Delete unused code"). Async GPU relocations are not the path forward, we want to remove GPU accelerated relocation support eventually when userspace is fixed to use VM_BIND, and this is the first step towards that. We will keep async gpu relocations around for now, until userspace is fixed. Relocation support will be disabled completely on platforms where there was never any userspace that depends on it, as the hardware doesn't require it from at least gen9+ onward. For older platforms, the plan is to use cpu relocations only. The igt side is fixed in igt commit 39e9aa1032a4e ("tests/i915: Remove subtests that rely on async relocation behavior"). Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200819140904.1708856-2-maarten.lankhorst@linux.intel.com Signed-off-by: Joonas Lahtinen commit da1ea128a6a4d6d52b02ded82933944161c1cb01 Author: Chris Wilson Date: Thu Aug 6 17:10:56 2020 +0100 drm/i915/gem: Free the fence after a fence-chain lookup failure If dma_fence_chain_find_seqno() reports an error, it does so in its preamble before it disposes of the input fence. On handling the error, we need to drop the reference to the fence. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2292 Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Fixes: 13149e8bafc4 ("drm/i915: add syncobj timeline support") Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20200806161056.17593-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 736e785f9b28cd9ef2d16a80960a04fd00e64b22 Author: Chris Wilson Date: Thu Aug 6 11:59:54 2020 +0100 drm/i915/gem: Reduce context termination list iteration guard to RCU As we now protect the timeline list using RCU, we can drop the timeline->mutex for guarding the list iteration during context close, as we are searching for an inflight request. Any new request will see the context is banned and not be submitted. In doing so, pull the checks for a concurrent submission of the request (notably the i915_request_completed()) under the engine spinlock, to fully serialise with __i915_request_submit()). That is in the case of preempt-to-busy where the request may be completed during the __i915_request_submit(), we need to be careful that we sample the request status after serialising so that we don't miss the request the engine is actually submitting. Fixes: 4a3174152147 ("drm/i915/gem: Refine occupancy test in kill_context()") References: d22d2d073ef8 ("drm/i915: Protect i915_request_await_start from early waits") # rcu protection of timeline->requests References: https://gitlab.freedesktop.org/drm/intel/-/issues/1622 References: https://gitlab.freedesktop.org/drm/intel/-/issues/2158 Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200806105954.7766-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit dd5e024956bf3035be380a3f022b77c06166112a Author: Chris Wilson Date: Thu Aug 6 15:57:28 2020 +0100 drm/i915/selftests: Prevent selecting 0 for our random width/align When igt_random_offset() is a given a range of [0, PAGE_SIZE], it is allowed to return 0. However, attempting to use a size of 0 for the igt_lmem_write_cpu() byte poking, leads to call igt_random_offset() with a range of [offset, offset + 0] and ask it to find a length of 4 within it. This triggers the bug on that the requested length should fit within the range! Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200806145728.16495-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit e23005604b2f815720b00c2b36c9597fd43923cf Author: Chris Wilson Date: Sat Aug 1 17:02:25 2020 +0100 drm/i915/gt: Hold context/request reference while breadcrumbs are active Currently we hold no actual reference to the request nor context while they are attached to a breadcrumb. To avoid freeing the request/context too early, we serialise with cancel-breadcrumbs by taking the irq spinlock in i915_request_retire(). The alternative is to take a reference for a new breadcrumb and release it upon signaling; removing the more frequently hit contention point in i915_request_retire(). Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200801160225.6814-2-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi [Joonas: Rebased and reordered into drm-intel-gt-next branch] Signed-off-by: Joonas Lahtinen commit 3f7dc1071665c38a195e24d28d8418b68c441584 Author: Chris Wilson Date: Sat Aug 1 17:02:24 2020 +0100 drm/i915/gt: Move intel_breadcrumbs_arm_irq earlier Move the __intel_breadcrumbs_arm_irq earlier, next to the disarm_irq, so that we can make use of it in the following patch. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200801160225.6814-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 82adf901138cc0564656dc8dc3a47862a546cb2a Author: Chris Wilson Date: Wed Jul 29 17:42:19 2020 +0100 drm/i915/gt: Shrink i915_page_directory's slab bucket kmalloc uses power-of-two slab buckets for small allocations (up to a few pages). Since i915_page_directory is a page of pointers, plus a couple more, this is rounded up to 8K, and we waste nearly 50% of that allocation. Long terms this leads to poor memory utilisation, bloating the kernel footprint, but the problem is exacerbated by our conservative preallocation scheme for binding VMA. As we are required to allocate all levels for each vma just in case we need to insert them upon binding, this leads to a large multiplication factor for a single page vma. By halving the allocation we need for the page directory structure, we halve the impact of that factor, bringing workloads that once fitted into memory, hopefully back to fitting into memory. We maintain the split between i915_page_directory and i915_page_table as we only need half the allocation for the lowest, most populous, level. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200729164219.5737-3-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 89351925a477441ae5fdd0136aec80b49ea1c53c Author: Chris Wilson Date: Wed Jul 29 17:42:18 2020 +0100 drm/i915/gt: Switch to object allocations for page directories The GEM object is grossly overweight for the practicality of tracking large numbers of individual pages, yet it is currently our only abstraction for tracking DMA allocations. Since those allocations need to be reserved upfront before an operation, and that we need to break away from simple system memory, we need to ditch using plain struct page wrappers. In the process, we drop the WC mapping as we ended up clflushing everything anyway due to various issues across a wider range of platforms. Though in a future step, we need to drop the kmap_atomic approach which suggests we need to pre-map all the pages and keep them mapped. v2: Verify our large scratch page is suitably DMA aligned; and manually clear the scratch since we are allocating plain struct pages full of prior content. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200729164219.5737-2-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit cd0452aa2a0d146ff2c695877a4f5d3e4d09b435 Author: Chris Wilson Date: Wed Jul 29 17:42:17 2020 +0100 drm/i915: Preallocate stashes for vma page-directories We need to make the DMA allocations used for page directories to be performed up front so that we can include those allocations in our memory reservation pass. The downside is that we have to assume the worst case, even before we know the final layout, and always allocate enough page directories for this object, even when there will be overlap. This unfortunately can be quite expensive, especially as we have to clear/reset the page directories and DMA pages, but it should only be required during early phases of a workload when new objects are being discovered, or after memory/eviction pressure when we need to rebind. Once we reach steady state, the objects should not be moved and we no longer need to preallocating the pages tables. It should be noted that the lifetime for the page directories DMA is more or less decoupled from individual fences as they will be shared across objects across timelines. v2: Only allocate enough PD space for the PTE we may use, we do not need to allocate PD that will be left as scratch. v3: Store the shift unto the first PD level to encapsulate the different PTE counts for gen6/gen8. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200729164219.5737-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit b3786b29379c0e5d1e4e162ad5464d77aa4bc4db Author: Chris Wilson Date: Fri Jul 31 16:48:34 2020 +0100 drm/i915/gt: Distinguish the virtual breadcrumbs from the irq breadcrumbs On the virtual engines, we only use the intel_breadcrumbs for tracking signaling of stale breadcrumbs from the irq_workers. They do not have any associated interrupt handling, active requests are passed to a physical engine and associated breadcrumb interrupt handler. This causes issues for us as we need to ensure that we do not actually try and enable interrupts and the powermanagement required for them on the virtual engine, as they will never be disabled. Instead, let's specify the physical engine used for interrupt handler on a particular breadcrumb. v2: Drop b->irq_armed = true mocking for no interrupt HW Fixes: 4fe6abb8f513 ("drm/i915/gt: Ignore irq enabling on the virtual engines") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200731154834.8378-4-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 56f581bad4bf25b336593a7f7531b24424b1ecf8 Author: Chris Wilson Date: Fri Jul 31 16:48:33 2020 +0100 drm/i915/gt: Only transfer the virtual context to the new engine if active One more complication of preempt-to-busy with respect to the virtual engine is that we may have retired the last request along the virtual engine at the same time as preparing to submit the completed request to a new engine. That submit will be shortcircuited, but not before we have updated the context with the new register offsets and marked the virtual engine as bound to the new engine (by calling swap on ve->siblings[]). As we may have just retired the completed request, we may also be in the middle of calling virtual_context_exit() to turn off the power management associated with the virtual engine, and that in turn walks the ve->siblings[]. If we happen to call swap() on the array as we walk, we will call intel_engine_pm_put() twice on the same engine. In this patch, we prevent this by only updating the bound engine after a successful submission which weeds out the already completed requests. Alternatively, we could walk a non-volatile array for the pm, such as using the engine->mask. The small advantage to performing the update after the submit is that we then only have to do a swap for active requests. Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy") References: 6d06779e8672 ("drm/i915: Load balancing across a virtual engine" Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: "Nayana, Venkata Ramana" Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200731154834.8378-3-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 2854d866327a390540c71ca3f76ce516ae7af66f Author: Chris Wilson Date: Fri Jul 31 16:48:32 2020 +0100 drm/i915/gt: Replace intel_engine_transfer_stale_breadcrumbs After staring at the breadcrumb enabling/cancellation and coming to the conclusion that the cause of the mysterious stale breadcrumbs must the act of submitting a completed requests, we can then redirect those completed requests onto a dedicated signaled_list at the time of construction and so eliminate intel_engine_transfer_stale_breadcrumbs(). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200731154834.8378-2-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit a63c5f3db07dab2b205ac9a6a6ca96c4f72290de Author: Lad Prabhakar Date: Fri Sep 4 11:38:51 2020 +0100 misc: pci_endpoint_test: Add Device ID for RZ/G2H PCIe controller Add Renesas R8A774E1 in pci_device_id table so that pci-epf-test can be used for testing PCIe EP on RZ/G2H. Link: https://lore.kernel.org/r/20200904103851.3946-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Lad Prabhakar Signed-off-by: Lorenzo Pieralisi Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven commit 5e94083c781445b4b5c00689167558dce694da65 Author: Lad Prabhakar Date: Fri Sep 4 11:38:49 2020 +0100 dt-bindings: pci: rcar-pci-ep: Document r8a774e1 Document the support for R-Car PCIe EP on R8A774E1 SoC device. Link: https://lore.kernel.org/r/20200904103851.3946-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Lad Prabhakar Signed-off-by: Lorenzo Pieralisi Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven commit d3d4d028afb785e52c55024d779089654f8302e7 Author: Ansuel Smith Date: Tue Sep 1 14:49:54 2020 +0200 PCI: qcom: Make sure PCIe is reset before init for rev 2.1.0 Qsdk U-Boot can incorrectly leave the PCIe interface in an undefined state if bootm command is used instead of bootipq. This is caused by the not deinit of PCIe when bootm is called. Reset the PCIe before init anyway to fix this U-Boot bug. Link: https://lore.kernel.org/r/20200901124955.137-1-ansuelsmth@gmail.com Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Reviewed-by: Bjorn Andersson Cc: stable@vger.kernel.org # v4.19+ commit ffdbd3d83553beb0fda00081293d5640cba477a2 Author: Leo Yan Date: Tue Aug 11 13:35:05 2020 +0800 arm64: perf: Add general hardware LLC events for PMUv3 This patch is to add the general hardware last level cache (LLC) events for PMUv3: one event is for LLC access and another is for LLC miss. With this change, perf tool can support last level cache profiling, below is an example to demonstrate the usage on Arm64: $ perf stat -e LLC-load-misses -e LLC-loads -- \ perf bench mem memcpy -s 1024MB -l 100 -f default [...] Performance counter stats for 'perf bench mem memcpy -s 1024MB -l 100 -f default': 35,534,262 LLC-load-misses # 2.16% of all LL-cache hits 1,643,946,443 LLC-loads [...] Signed-off-by: Leo Yan Link: https://lore.kernel.org/r/20200811053505.21223-1-leo.yan@linaro.org Signed-off-by: Will Deacon commit b4c971245925db1a6e0898878ad410f8f17ec59a Author: Yue Hu Date: Tue Aug 4 16:53:47 2020 +0800 arm64: traps: Add str of description to panic() in die() Currently, there are different description strings in die() such as die("Oops",,), die("Oops - BUG",,). And panic() called by die() will always show "Fatal exception" or "Fatal exception in interrupt". Note that panic() will run any panic handler via panic_notifier_list. And the string above will be formatted and placed in static buf[] which will be passed to handler. So panic handler can not distinguish which Oops it is from the buf if we want to do some things like reserve the string in memory or panic statistics. It's not benefit to debug. We need to add more codes to troubleshoot. Let's utilize existing resource to make debug much simpler. Signed-off-by: Yue Hu Link: https://lore.kernel.org/r/20200804085347.10720-1-zbestahu@gmail.com Signed-off-by: Will Deacon commit c18636f76344fd544c5b444d030a2d1d74bb0103 Author: Chris Wilson Date: Fri Jul 31 16:48:31 2020 +0100 drm/i915: Remove requirement for holding i915_request.lock for breadcrumbs Since the breadcrumb enabling/cancelling itself is serialised by the breadcrumbs.irq_lock, with a bit of care we can remove the outer serialisation with i915_request.lock for concurrent dma_fence_enable_signaling(). This has the important side-effect of eliminating the nested i915_request.lock within request submission. The challenge in serialisation is around the unsubmission where we take an active request that wants a breadcrumb on the signaling engine and put it to sleep. We do not want a concurrent dma_fence_enable_signaling() to attach a breadcrumb as we unsubmit, so we must mark the request as no longer active before serialising with the concurrent enable-signaling. On retire, we serialise with the concurrent enable-signaling, but instead of clearing ACTIVE, we mark it as SIGNALED. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200731154834.8378-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi [Joonas: Rebased and reordered into drm-intel-gt-next branch] Signed-off-by: Joonas Lahtinen commit af5c6fcf403288e8656143549881c3eb716cae53 Author: Chris Wilson Date: Fri Jul 31 09:50:15 2020 +0100 drm/i915: Provide a fastpath for waiting on vma bindings Before we can execute a request, we must wait for all of its vma to be bound. This is a frequent operation for which we can optimise away a few atomic operations (notably a cmpxchg) in lieu of the RCU protection. Signed-off-by: Chris Wilson Reviewed-by: Thomas Hellström Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200731085015.32368-7-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 9ff33bbcda259a7d1d4df8c977b32cf431972387 Author: Chris Wilson Date: Fri Jul 31 09:50:14 2020 +0100 drm/i915: Reduce locking around i915_active_acquire_preallocate_barrier() As the conversion between idle-barrier and full i915_active_fence is already serialised by explicit memory barriers, we can reduce the spinlock in i915_active_acquire_preallocate_barrier() for finding an idle-barrier to reuse to an RCU read lock to ensure the fence remains valid, only taking the spinlock for the update of the rbtree itself. Signed-off-by: Chris Wilson Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200731085015.32368-6-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit e28860ae21da258a1f983b52941a3f581281d114 Author: Chris Wilson Date: Fri Jul 31 09:50:13 2020 +0100 drm/i915: Make the stale cached active node available for any timeline Rather than require the next timeline after idling to match the MRU before idling, reset the index on the node and allow it to match the first request. However, this requires cmpxchg(u64) and so is not trivial on 32b, so for compatibility we just fallback to keeping the cached node pointing to the MRU timeline. Signed-off-by: Chris Wilson Reviewed-by: Thomas Hellström Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200731085015.32368-5-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 99a7f4dae7ee6081df04741e0c4ea5e49b139540 Author: Chris Wilson Date: Fri Jul 31 09:50:12 2020 +0100 drm/i915: Keep the most recently used active-fence upon discard Whenever an i915_active idles, we prune its tree of old fence slots to prevent a gradual leak should it be used to track many, many timelines. The downside is that we then have to frequently reallocate the rbtree. A compromise is that we keep the most recently used fence slot, and reuse that for the next active reference as that is the most likely timeline to be reused. Signed-off-by: Chris Wilson Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200731085015.32368-4-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 5d9341370f57c058a8d880490ba9e79e761b2d7a Author: Chris Wilson Date: Fri Jul 31 09:50:11 2020 +0100 drm/i915: Export a preallocate variant of i915_active_acquire() Sometimes we have to be very careful not to allocate underneath a mutex (or spinlock) and yet still want to track activity. Enter i915_active_acquire_for_context(). This raises the activity counter on i915_active prior to use and ensures that the fence-tree contains a slot for the context. v2: Refactor active_lookup() so it can be called again before/after locking to resolve contention. Since we protect the rbtree until we idle, we can do a lockfree lookup, with the caveat that if another thread performs a concurrent insertion, the rotations from the insert may cause us to not find our target. A second pass holding the treelock will find the target if it exists, or the place to perform our insertion. Signed-off-by: Chris Wilson Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200731085015.32368-3-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 04240e30ed06498c02dd43e57dfef9433e5f1ced Author: Chris Wilson Date: Fri Jul 31 09:50:10 2020 +0100 drm/i915: Skip taking acquire mutex for no ref->active callback If no active callback is defined for i915_active, we do not need to serialise its enabling with the mutex. We still do only want to call the debug activate once, and must still serialise with a concurrent retire. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200731085015.32368-2-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit bde246d893fca22cf84f6fb044395ab0a47589b7 Author: Chris Wilson Date: Fri Jul 31 11:22:06 2020 +0100 drm/i915/selftests: Drop stale timeline constructor assert Since we pass around encoded parameters to the kernel context constructor using the ce->timeline pointer, we can no longer assert that it should be zero for mock timeline construction. Fixes: d1bf5dd8f6d5 ("drm/i915/gt: Support multiple pinned timelines") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200731102206.6793-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi [Joonas: Updated Fixes: link after rebasing and reordering into drm-intel-gt-next branch] Signed-off-by: Joonas Lahtinen commit 13106019f79bee105af1d3afdcb38b38771d81b9 Author: Chris Wilson Date: Thu Jul 30 14:40:49 2020 +0100 drm/i915/gt: Pull release of node->age under the spinlock We need to ensure that the list is valid prior to marking the node as retrievable, otherwise we may see two threads compete over the same node in intel_gt_get_buffer_pool(). If the first thread acquires and releases the node in the same jiffie, the second thread may then acquire it (as the jiffie now again matches the expected value) and claim the node before it is put back into the list. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200730134049.8822-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit d1bf5dd8f6d510999b8a12687ee2662e26ab720c Author: Chris Wilson Date: Thu Jul 30 19:39:06 2020 +0100 drm/i915/gt: Support multiple pinned timelines We may need to allocate more than one pinned context/timeline for each engine which can utilise the per-engine HWSP, so we need to give each a different offset within it. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200730183906.25422-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit eb4dedae920a07c485328af3da2202ec5184fb17 Author: Chris Wilson Date: Thu Jul 30 10:28:56 2020 +0100 drm/i915/gem: Delay tracking the GEM context until it is registered Avoid exposing a partially constructed context by deferring the list_add() from the initial construction to the end of registration. Otherwise, if we peek into the list of contexts from inside debugfs, we may see the partially constructed context and chase down some dangling incomplete pointers. Reported-by: CQ Tang Fixes: 3aa9945a528e ("drm/i915: Separate GEM context construction and registration to userspace") References: f6e8aa387171 ("drm/i915: Report the number of closed vma held by each context in debugfs") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: CQ Tang Cc: # v5.2+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200730092856.23615-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit a30e4ec176c823fb1f3fed51483c07e813c4c9c5 Author: Chris Wilson Date: Wed Jul 29 12:07:56 2020 +0100 drm/i915/gt: Fix termination condition for freeing all buffer objects A last minute change, that unfortunately broke CI so badly it declared SUCCESS, was to refactor the debug free all buffer pool code to reuse the normal worker, inverted the termination condition so that it instead of discarding the nodes, they were all declared young enough and eligible for reuse. Fixes: 06b73c2d0b65 ("drm/i915/gt: Delay taking the spinlock for grabbing from the buffer pool") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200729110756.2344-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi [Joonas: Updating Fixes: link after rebasing and reordering into drm-intel-gt-next] Signed-off-by: Joonas Lahtinen commit 62b1522cc3217e75478b607562c678b052d9179a Author: Chris Wilson Date: Tue Jul 28 16:33:25 2020 +0100 drm/i915/selftests: Flush the active barriers before asserting Before we peek at the barrier status for an assert, first serialise with its callbacks so that we see a stable value. Signed-off-by: Chris Wilson Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200728153325.28351-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 06b73c2d0b65f17e698f6a662affd7a08853c86f Author: Chris Wilson Date: Wed Jul 29 09:02:45 2020 +0100 drm/i915/gt: Delay taking the spinlock for grabbing from the buffer pool Some very low hanging fruit, but contention on the pool->lock is noticeable between intel_gt_get_buffer_pool() and pool_retire(), with the majority of the hold time due to the locked list iteration. If we make the node itself RCU protected, we can perform the search for an suitable node just under RCU, reserving taking the lock itself for claiming the node and manipulating the list. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200729080245.8070-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit a817c891c12471ce9fc285c1246372474c39a3f2 Author: Chris Wilson Date: Tue Jul 28 16:21:09 2020 +0100 drm/i915/gt: Disable preparser around xcs invalidations on tgl Unlike rcs where we have conclusive evidence from our selftesting that disabling the preparser before performing the TLB invalidate and relocations does impact upon the GPU execution, the evidence for the same requirement on xcs is much more circumstantial. Let's apply the preparser disable between batches as we invalidate the TLB as a dose of healthy paranoia, just in case. References: https://gitlab.freedesktop.org/drm/intel/-/issues/2169 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200728152110.830-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 27a5dcfe73f4b696b3de8c23a560199bb1c193a4 Author: Chris Wilson Date: Tue Jul 28 16:20:10 2020 +0100 drm/i915/gem: Remove disordered per-file request list for throttling I915_GEM_THROTTLE dates back to the time before contexts where there was just a single engine, and therefore a single timeline and request list globally. That request list was in execution/retirement order, and so walking it to find a particular aged request made sense and could be split per file. That is no more. We now have many timelines with a file, as many as the user wants to construct (essentially per-engine, per-context). Each of those run independently and so make the single list futile. Remove the disordered list, and iterate over all the timelines to find a request to wait on in each to satisfy the criteria that the CPU is no more than 20ms ahead of its oldest request. It should go without saying that the I915_GEM_THROTTLE ioctl is no longer used as the primary means of throttling, so it makes sense to push the complication into the ioctl where it only impacts upon its few irregular users, rather than the execbuf/retire where everybody has to pay the cost. Fortunately, the few users do not create vast amount of contexts, so the loops over contexts/engines should be concise. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200728152010.30701-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 3adee4ac2922e30d2fe0583c0126c1e5fee4cc54 Author: Chris Wilson Date: Wed Jul 15 12:50:51 2020 +0100 drm/i915: Soften the tasklet flush frequency before waits We include a tasklet flush before waiting on a request as a precaution against the HW being lax in event signaling. We now have a precautionary flush in the engine's heartbeat and so do not need to be quite so zealous on every request wait. If we focus on the request, the only tasklet flush that matters is if there is a delay in submitting this request to HW, so if the request is not ready to be executed, no advantage in reducing this wait can be gained by running the tasklet. And there is little point in doing busy work for no result. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200715115147.11866-10-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit e3d0e213960ece147954ea86a340329361d10e5b Author: Chris Wilson Date: Wed Jul 15 16:58:58 2020 +0100 drm/i915/selftests: Mock the status_page.vma for the kernel_context Since we assert that the kernel_context is using the perma-pinned HWSP, make it so. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2179 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200715155858.16410-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit 3f6a6f343c57a773ed146e54de8c626f72dd2be7 Author: Chris Wilson Date: Thu Jul 16 11:07:54 2020 +0100 drm/i915: Reduce i915_request.lock contention for i915_request_wait Currently, we use i915_request_completed() directly in i915_request_wait() and follow up with a manual invocation of dma_fence_signal(). This appears to cause a large number of contentions on i915_request.lock as when the process is woken up after the fence is signaled by an interrupt, we will then try and call dma_fence_signal() ourselves while the signaler is still holding the lock. dma_fence_is_signaled() has the benefit of checking the DMA_FENCE_FLAG_SIGNALED_BIT prior to calling dma_fence_signal() and so avoids most of that contention. Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200716100754.5670-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen commit cfb824ddd1c040a7ac65eea3f900f14268e8f383 Author: Lad Prabhakar Date: Fri Aug 14 18:30:34 2020 +0100 misc: pci_endpoint_test: Add Device ID for RZ/G2M and RZ/G2N PCIe controllers Add Renesas R8A774A1 and R8A774B1 in pci_device_id table so that pci-epf-test can be used for testing PCIe EP on RZ/G2M and RZ/G2N. Link: https://lore.kernel.org/r/20200814173037.17822-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Lad Prabhakar Signed-off-by: Lorenzo Pieralisi Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven commit 2de82ec8667465236e15f8c6af7cecf8da63fc60 Author: Lad Prabhakar Date: Fri Aug 14 18:30:33 2020 +0100 dt-bindings: pci: rcar-pci-ep: Document r8a774a1 and r8a774b1 Document the support for R-Car PCIe EP on R8A774A1 and R8A774B1 SoC devices. Also constify "renesas,rcar-gen3-pcie-ep" so that it can be used as fallback compatible string for R-Car Gen3 and RZ/G2 devices as the PCIe module is identical. Link: https://lore.kernel.org/r/20200814173037.17822-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Lad Prabhakar Signed-off-by: Lorenzo Pieralisi Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Rob Herring commit b83ded8a31e314545727bd5ee852a1f65a6ad1e9 Author: Andre Przywara Date: Fri Aug 28 14:05:54 2020 +0100 arm64: dts: arm: Fix SP805 clock-names The SP805 binding sets the name for the actual watchdog clock to "wdog_clk" (with an underscore). Change the name in the DTs for ARM Ltd. platforms to match that. The Linux and U-Boot driver use the *first* clock for this purpose anyway, so it does not break anything. Link: https://lore.kernel.org/r/20200828130602.42203-3-andre.przywara@arm.com Signed-off-by: Andre Przywara Signed-off-by: Sudeep Holla commit a894c6dd56c99a44d550f65fbe87d00377b9dc3d Author: Andre Przywara Date: Fri Aug 28 14:05:59 2020 +0100 ARM: dts: arm: Fix SP805 clocks The SP805 binding sets the name for the actual watchdog clock to "wdog_clk" (with an underscore). Change the name in the DTs for ARM Ltd. platforms to match that. The Linux and U-Boot driver use the *first* clock for this purpose anyway, so it does not break anything. For MPS2 we only specify one clock so far, but the binding requires two clocks to be named. In practice, Linux would pick a clock named "apb_pclk" for the bus clock, and the Linux and U-Boot SP805 driver would use the first clock to derive the actual watchdog counter frequency. So since currently both are the very same clock, we can just double the clock reference, and add the correct clock-names, to match the binding. Link: https://lore.kernel.org/r/20200828130602.42203-8-andre.przywara@arm.com Reviewed-by: Linus Walleij Signed-off-by: Andre Przywara Signed-off-by: Sudeep Holla commit 7d69b117c31305a36a72f337e80860478a5c8e4a Author: Lorenzo Pieralisi Date: Fri Sep 4 15:27:10 2020 +0100 PCI: xilinx-cpm: Remove leftover bridge initialization Some fields in the host bridge structure are now initialized by default in the PCI/OF core functions therefore their initialization in the host controller driver is superfluous. Remove it. Link: https://lore.kernel.org/r/20200904142710.8018-1-lorenzo.pieralisi@arm.com Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Cc: Rob Herring commit 34a459187180d4049b00fcf12fad6603011d4d7a Author: Andre Przywara Date: Fri Aug 28 15:20:14 2020 +0100 ARM: dts: arm: Fix SP804 users The SP804 DT nodes for Realview, MPS2 and VExpress were not complying with the binding: it requires either one or three clocks, but does not allow exactly two clocks. Simply duplicate the first clock to satisfy the binding requirement. For MPS2, we triple the clock, and add the clock-names property, as this is required by the Linux primecell driver. Try to make the clock-names more consistent on the way. Link: https://lore.kernel.org/r/20200828142018.43298-3-andre.przywara@arm.com Acked-by: Linus Walleij Signed-off-by: Andre Przywara Signed-off-by: Sudeep Holla commit d27b1cdc10e7b2d8611b83e8db92eb7dc13d0cd5 Author: Greg Kroah-Hartman Date: Tue Aug 18 15:37:39 2020 +0200 PCI: 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. Link: https://lore.kernel.org/r/20200818133739.463193-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding Cc: Lorenzo Pieralisi Cc: Rob Herring Cc: Bjorn Helgaas Cc: Thierry Reding Cc: Jonathan Hunter Cc: Vidya Sagar Cc: Andrew Murray Cc: Greg Kroah-Hartman Cc: linux-pci@vger.kernel.org Cc: linux-tegra@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 28d9fdf04573cfed6a205220fb038dd444568fa3 Author: Randy Dunlap Date: Sat Aug 22 21:04:43 2020 -0700 lib: devres: delete duplicated words Drop the repeated word "the". Signed-off-by: Randy Dunlap Cc: Andrew Morton Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200823040443.25900-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit e1f82a0dcf388d98bcc7ad195c03bd812405e6b2 Author: Andy Shevchenko Date: Wed Aug 26 13:44:59 2020 +0300 driver core: Annotate dev_err_probe() with __must_check We have got already new users of this API which interpret it differently and miss the opportunity to optimize their code. In order to avoid similar cases in the future, annotate dev_err_probe() with __must_check. Fixes: a787e5400a1c ("driver core: add device probe log helper") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200826104459.81979-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 444ddca52484e95ae3e4dbd9fcb496419141f669 Author: Rob Herring Date: Thu Aug 20 21:53:43 2020 -0600 PCI: dwc: Allow overriding bridge pci_ops In preparation to allow drivers to set their own root and child pci_ops instead of using the DWC specific config space ops, we need to make the pci_host_bridge pointer available and move setting the bridge->ops and bridge->child_ops pointer to before the .host_init() hook. Link: https://lore.kernel.org/r/20200821035420.380495-4-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit f81c770df72e72183269fc8d7ceb0497957cdf1f Author: Rob Herring Date: Thu Aug 20 21:53:42 2020 -0600 PCI: dwc: Use DBI accessors instead of own config accessors The Designware DBI space contains the root bus bridge config space. Platforms needing custom {rd,wr}_own_conf functions are also the ones needing custom {read,write}_dbi ops functions and the access sequences are the same. Replace all dw_pcie_{rd,wr}_own_conf() calls with the DBI variants in preparation to remove dw_pcie_{rd,wr}_own_conf(). Link: https://lore.kernel.org/r/20200821035420.380495-3-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 07e292950b9368518c659c4d5f1dca4bf55779bd Author: Rob Herring Date: Thu Aug 20 21:53:41 2020 -0600 PCI: Allow root and child buses to have different pci_ops PCI host bridges often have different ways to access the root and child bus config spaces. The host bridge drivers have invented their own abstractions to handle this. Let's support having different root and child bus pci_ops so these per driver abstractions can be removed. Link: https://lore.kernel.org/r/20200821035420.380495-2-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 16270a92355722e387e9ca19627c5a4d7bae1354 Author: Hou Zhiqiang Date: Tue Aug 18 17:27:46 2020 +0800 PCI: designware-ep: Fix the Header Type check The current check will result in the multiple function device fails to initialize. So fix the check by masking out the multiple function bit. Link: https://lore.kernel.org/r/20200818092746.24366-1-Zhiqiang.Hou@nxp.com Fixes: 0b24134f7888 ("PCI: dwc: Add validation that PCIe core is set to correct mode") Signed-off-by: Hou Zhiqiang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit f5514c91e9f72b719bfec64af6acac5ad41df7b5 Author: Heikki Krogerus Date: Fri Sep 4 15:51:22 2020 +0300 device connection: Remove struct device_connection Since the connection descriptors can't be stored into the list anymore, there is no need for the data structure. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200904125123.83725-4-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 87ea5926247f7e15f0b5bc5b36cb210536177d77 Author: Heikki Krogerus Date: Fri Sep 4 15:51:21 2020 +0300 device connection: Remove device_connection_add() All the users of that API have now been converted to use software fwnodes instead. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200904125123.83725-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 180c284ce4d66d2fb386b81bea59f01bc7be150a Author: Heikki Krogerus Date: Fri Sep 4 15:51:20 2020 +0300 device connection: Remove device_connection_find() There are no users for that function. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200904125123.83725-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b7ecb51b2d9bd12c80c24d2fd1cadedd35e7cb7e Author: Lad Prabhakar Date: Fri Sep 4 11:38:50 2020 +0100 arm64: dts: renesas: r8a774e1: Add PCIe EP nodes Add PCIe EP nodes for R8A774E1 Soc dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20200904103851.3946-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a0bf06dc51dbbc5ad182b1bcf4d879db8d297c5e Author: Hans de Goede Date: Fri Sep 4 19:21:41 2020 +0200 pinctrl: cherryview: Preserve CHV_PADCTRL1_INVRXTX_TXDATA flag on GPIOs One some devices the GPIO should output the inverted value from what device-drivers / ACPI code expects. The reason for this is unknown, perhaps these systems use an external buffer chip on the GPIO which inverts the signal. The BIOS makes this work by setting the CHV_PADCTRL1_INVRXTX_TXDATA flag. Before this commit we would unconditionally clear all INVRXTX flags, including the CHV_PADCTRL1_INVRXTX_TXDATA flag when a GPIO is requested by a driver (from chv_gpio_request_enable()). This breaks systems using this setup. Specifically it is causing problems for systems with a goodix touchscreen, where the BIOS sets the INVRXTX_TXDATA flag on the GPIO used for the touchscreen's reset pin. The goodix touchscreen driver by defaults configures this pin as input (relying on the pull-up to keep it high), but the clearing of the INVRXTX_TXDATA flag done by chv_gpio_request_enable() causes it to be driven low for a brief time before the GPIO gets set to input mode. This causes the touchscreen controller to get reset. On most CHT devs with this touchscreen this leads to: [ 31.596534] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -121 The driver retries this though and then everything is fine. But during reset the touchscreen uses its interrupt pin as bootstrap to determine which i2c address to use and on the Acer One S1003 the spurious reset caused by the clearing of the INVRXTX_TXDATA flag causes the controller to come back up again on the wrong i2c address, breaking things. This commit fixes both the -121 errors, as well as the total breakage on the Acer One S1003, by making chv_gpio_clear_triggering() not clear the INVRXTX_TXDATA flag if the pin is already configured as a GPIO. Note that chv_pinmux_set_mux() does still unconditionally clear the flag, so this only affects GPIO usage. Fixes: a7d4b171660c ("Input: goodix - add support for getting IRQ + reset GPIOs on Cherry Trail devices") Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 352e04291115af2a74c271e0cd3643a632af6b7a Author: Alexander A. Klimov Date: Wed Aug 26 20:52:12 2020 +0200 m68k: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200826185212.3139-1-grandmaster@al2klimov.de Signed-off-by: Geert Uytterhoeven commit 7e158826564fbbb7284dabbaf71b6c3227845f51 Author: Geert Uytterhoeven Date: Wed Aug 26 15:04:44 2020 +0200 m68k: mm: Remove superfluous memblock_alloc*() casts The return type of memblock_alloc*() is a void pointer, so there is no need to cast it to "void *" or some other pointer type, before assigning it to a pointer variable. Signed-off-by: Geert Uytterhoeven Reviewed-by: Mike Rapoport Acked-by: Greg Ungerer Link: https://lore.kernel.org/r/20200826130444.25618-1-geert@linux-m68k.org commit 41f1bf37a63ecdb06b7b96646579170ddbe9def1 Author: Geert Uytterhoeven Date: Wed Aug 26 15:01:03 2020 +0200 m68k: mm: Use PAGE_ALIGNED() helper Use the existing PAGE_ALIGNED() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200826130103.25381-1-geert@linux-m68k.org commit dc072012bc94287e3cc43e1429c5d72b2e6f4972 Author: Geert Uytterhoeven Date: Wed Aug 26 14:52:59 2020 +0200 m68k: Sort selects in main Kconfig Sort the list of select statements in the main Kconfig file for the m68k architecture, to avoid conflicts when modifying this list. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200826125259.24069-1-geert@linux-m68k.org commit d473de0f883db0801c78a86b34dd1fddf8ba2ca3 Author: Geert Uytterhoeven Date: Wed Aug 26 14:51:24 2020 +0200 m68k: amiga: Clean up Amiga hardware configuration Move the generic Amiga hardware configuration section out of the switch statement, which allows to replace all ugly jumps by break statements. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200826125124.23863-1-geert@linux-m68k.org commit 62148d98590191f0515e89e7a6eed47bc5c51ae8 Author: Geert Uytterhoeven Date: Wed Aug 26 14:29:23 2020 +0200 m68k: Revive _TIF_* masks While the core m68k code does not use the _TIF_* masks anymore, there exists generic code that relies on their presence. Fortunately none of that code is used on m68k, currently. Re-add the various _TIF_* masks, which were removed in commit cddafa3500fde4a0 ("m68k/m68knommu: merge MMU and non-MMU thread_info.h"), to avoid future nasty surprises. Signed-off-by: Geert Uytterhoeven Acked-by: Greg Ungerer Link: https://lore.kernel.org/r/20200826122923.22821-1-geert@linux-m68k.org commit cc95fa81524a95358a7bc1d29e9e3c314753486c Author: Dmitry Osipenko Date: Sun Aug 30 22:14:39 2020 +0300 brcmfmac: set F2 SDIO block size to 128 bytes for BCM4329 Setting F2 block size to 128 bytes for BCM4329 allows to significantly improve RX throughput on NVIDIA Tegra20. Before this change the throughput was capped to 30 Mbit/s on Tegra, now throughput is at 40 Mbit/s, which is a maximum throughput for the BCM4329 chip. The F2 block size is borrowed from the downstream BCMDHD driver. The comment in the BCMDHD driver says that 128B improves throughput and turns out that it works for the brcmfmac as well. Signed-off-by: Dmitry Osipenko Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200830191439.10017-4-digetx@gmail.com commit 1a867a6230db7f41163b3b49840e5e50c3cc3a74 Author: Dmitry Osipenko Date: Sun Aug 30 22:14:38 2020 +0300 brcmfmac: drop chip id from debug messages The chip ID was already printed out at the time when debug message about the changed F2 watermark is printed, hence let's drop the unnecessary part of the debug messages. This cleans code a tad and also allows to re-use the F2 watermark debug messages by multiple chips. Suggested-by: Arend van Spriel Signed-off-by: Dmitry Osipenko Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200830191439.10017-3-digetx@gmail.com commit 317da69d10b0247c4042354eb90c75b81620ce9d Author: Dmitry Osipenko Date: Sun Aug 30 22:14:37 2020 +0300 brcmfmac: increase F2 watermark for BCM4329 This patch fixes SDHCI CRC errors during of RX throughput testing on BCM4329 chip if SDIO BUS is clocked above 25MHz. In particular the checksum problem is observed on NVIDIA Tegra20 SoCs. The good watermark value is borrowed from downstream BCMDHD driver and it's matching to the value that is already used for the BCM4339 chip, hence let's re-use it for BCM4329. Reviewed-by: Arend van Spriel Signed-off-by: Dmitry Osipenko Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200830191439.10017-2-digetx@gmail.com commit 28c4fb2fc8d0974ef5e2ffe93b4167116052a589 Author: Abheek Dhawan Date: Sat Sep 5 00:34:14 2020 -0500 staging: wlan-ng: Remove repeated word our Removed unnecessary repeater word on line 274 Signed-off-by: Abheek Dhawan Link: https://lore.kernel.org/r/20200905053414.405674-1-adawesomeguy222@gmail.com Signed-off-by: Greg Kroah-Hartman commit 120baa45b558c63c4bb25f65adca26c566638860 Author: Michael Straube Date: Sat Sep 5 13:53:58 2020 +0200 staging: rtl8188eu: clean up whitespace in wpa_set_encryption() Clean up unnecessary whitespace in wpa_set_encryption() by removing extra spaces and replacing tabs with spaces. Clears a checkpatch error. ERROR: space prohibited before that close parenthesis ')' Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200905115358.10278-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9dc0e03de9a5c57f2ac2aa92fe774f2ca6f96984 Author: Ivan Safonov Date: Sun Sep 6 16:32:37 2020 +0300 staging: r8188eu: replace enum rtw_ieee80211_spectrum_mgmt_actioncode with ieee80211_spectrum_mgmt_actioncode Enum rtw_ieee80211_spectrum_mgmt_actioncode is a duplication of ieee80211_spectrum_mgmt_actioncode from include/linux/ieee80211.h. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20200906133236.556427-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit ab04de8ec235ab03573e7ef33b21c357ba248b5f Author: Christoph Hellwig Date: Mon Sep 7 10:27:00 2020 +0200 /dev/zero: fixups for ->read Reported the cleared bytes in case of a partial clear_user instead of -EFAULT, and remove a pointless conditional, as cleared must be non-zero by the time we hit the signal_pending check. Reported-by: Rasmus Villemoes Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20200907082700.2057137-1-hch@lst.de Signed-off-by: Greg Kroah-Hartman commit e2435d69204c1f041e5742cac9af301021afa46f Author: Angelo Ribeiro Date: Mon Apr 6 15:49:03 2020 +0200 drm/bridge: dw-mipi-dsi.c: Add VPG runtime config through debugfs Add support for the video pattern generator (VPG) BER pattern mode and configuration in runtime. This enables using the debugfs interface to manipulate the VPG after the pipeline is set. Also, enables the usage of the VPG BER pattern. Changes in v2: - Added VID_MODE_VPG_MODE - Solved incompatible return type on __get and __set Reported-by: kbuild test robot Reported-by: Adrian Pop Signed-off-by: Angelo Ribeiro Tested-by: Yannick Fertre Tested-by: Adrian Pop Acked-by: Neil Armstrong Cc: Gustavo Pimentel Cc: Joao Pinto Cc: Jose Abreu Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/a809feb7d7153a92e323416f744f1565e995da01.1586180592.git.angelo.ribeiro@synopsys.com commit 992a237025548d4bbd4f30e8baddc2ad2c49915c Author: YueHaibing Date: Wed Sep 2 22:11:55 2020 +0800 mwifiex: sdio: Fix -Wunused-const-variable warnings These variables only used in sdio.c, move them to .c file can silence these warnings: In file included from drivers/net/wireless/marvell/mwifiex//main.h:59:0, from drivers/net/wireless/marvell/mwifiex//cfp.c:24: drivers/net/wireless/marvell/mwifiex//sdio.h:705:41: warning: ‘mwifiex_sdio_sd8801’ defined but not used [-Wunused-const-variable=] static const struct mwifiex_sdio_device mwifiex_sdio_sd8801 = { ^~~~~~~~~~~~~~~~~~~ drivers/net/wireless/marvell/mwifiex//sdio.h:689:41: warning: ‘mwifiex_sdio_sd8987’ defined but not used [-Wunused-const-variable=] static const struct mwifiex_sdio_device mwifiex_sdio_sd8987 = { ^~~~~~~~~~~~~~~~~~~ drivers/net/wireless/marvell/mwifiex//sdio.h:674:41: warning: ‘mwifiex_sdio_sd8887’ defined but not used [-Wunused-const-variable=] static const struct mwifiex_sdio_device mwifiex_sdio_sd8887 = { ^~~~~~~~~~~~~~~~~~~ drivers/net/wireless/marvell/mwifiex//sdio.h:658:41: warning: ‘mwifiex_sdio_sd8997’ defined but not used [-Wunused-const-variable=] static const struct mwifiex_sdio_device mwifiex_sdio_sd8997 = { ^~~~~~~~~~~~~~~~~~~ drivers/net/wireless/marvell/mwifiex//sdio.h:642:41: warning: ‘mwifiex_sdio_sd8977’ defined but not used [-Wunused-const-variable=] static const struct mwifiex_sdio_device mwifiex_sdio_sd8977 = { ^~~~~~~~~~~~~~~~~~~ drivers/net/wireless/marvell/mwifiex//sdio.h:627:41: warning: ‘mwifiex_sdio_sd8897’ defined but not used [-Wunused-const-variable=] static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = { ^~~~~~~~~~~~~~~~~~~ drivers/net/wireless/marvell/mwifiex//sdio.h:612:41: warning: ‘mwifiex_sdio_sd8797’ defined but not used [-Wunused-const-variable=] static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = { ^~~~~~~~~~~~~~~~~~~ drivers/net/wireless/marvell/mwifiex//sdio.h:597:41: warning: ‘mwifiex_sdio_sd8787’ defined but not used [-Wunused-const-variable=] static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = { ^~~~~~~~~~~~~~~~~~~ drivers/net/wireless/marvell/mwifiex//sdio.h:582:41: warning: ‘mwifiex_sdio_sd8786’ defined but not used [-Wunused-const-variable=] static const struct mwifiex_sdio_device mwifiex_sdio_sd8786 = { ^~~~~~~~~~~~~~~~~~~ Signed-off-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200902141155.30144-1-yuehaibing@huawei.com commit d56ee19a148edaa9972ca12f817e395ba436078b Author: YueHaibing Date: Wed Sep 2 22:08:46 2020 +0800 mwifiex: wmm: Fix -Wunused-const-variable warnings In file included from drivers/net/wireless/marvell/mwifiex//cmdevt.c:26:0: drivers/net/wireless/marvell/mwifiex//wmm.h:41:17: warning: ‘tos_to_tid_inv’ defined but not used [-Wunused-const-variable=] static const u8 tos_to_tid_inv[] = { ^~~~~~~~~~~~~~ drivers/net/wireless/marvell/mwifiex//wmm.h:34:18: warning: ‘mwifiex_1d_to_wmm_queue’ defined but not used [-Wunused-const-variable=] static const u16 mwifiex_1d_to_wmm_queue[8] = { 1, 0, 0, 1, 2, 2, 3, 3 }; ^~~~~~~~~~~~~~~~~~~~~~~ move the variables definition to .c file, and leave declarations in the header file to fix these warnings. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200902140846.29024-1-yuehaibing@huawei.com commit 8f8b8aa62e68adae226797eeda3d88c4c65e9f87 Author: Tzu-En Huang Date: Wed Sep 2 13:34:02 2020 +0800 rtw88: fix compile warning: [-Wignored-qualifiers] Remove function return type const in rtw8821c_get_swing_index(). This is unused, and unnecessary to be const. All warnings (new ones prefixed by >>): >> drivers/net/wireless/realtek/rtw88/rtw8821c.c:71:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 71 | static const u8 rtw8821c_get_swing_index(struct rtw_dev *rtwdev) | ^~~~~ Fixes: f745eb9ca5bf ("rtw88: 8821c: Add 8821CE to Kconfig and Makefile") Reported-by: kernel test robot Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200902053402.12839-1-yhchuang@realtek.com commit 1808191dca82e69669a3adff273fe2343d1db46c Author: Gustavo A. R. Silva Date: Tue Sep 1 12:36:03 2020 -0500 mt7601u: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200901173603.GA2701@embeddedor commit 6a953dc4dbd1c7057fb765a24f37a5e953c85fb0 Author: Nathan Chancellor Date: Tue Sep 1 00:08:34 2020 -0700 mwifiex: Remove unnecessary braces from HostCmd_SET_SEQ_NO_BSS_INFO A new warning in clang points out when macro expansion might result in a GNU C statement expression. There is an instance of this in the mwifiex driver: drivers/net/wireless/marvell/mwifiex/cmdevt.c:217:34: warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro] host_cmd->seq_num = cpu_to_le16(HostCmd_SET_SEQ_NO_BSS_INFO ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/marvell/mwifiex/fw.h:519:46: note: expanded from macro 'HostCmd_SET_SEQ_NO_BSS_INFO' (((type) & 0x000f) << 12); } ^ This does not appear to be a real issue. Removing the braces and replacing them with parentheses will fix the warning and not change the meaning of the code. Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") Link: https://github.com/ClangBuiltLinux/linux/issues/1146 Reported-by: Andy Lavr Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200901070834.1015754-1-natechancellor@gmail.com commit c6d94e37bdbb6dfe7e581e937a915ab58399b8a5 Author: Antonio Borneo Date: Wed Jul 1 21:42:34 2020 +0200 drm/bridge/synopsys: dsi: add support for non-continuous HS clock Current code enables the HS clock when video mode is started or to send out a HS command, and disables the HS clock to send out a LP command. This is not what DSI spec specify. Enable HS clock either in command and in video mode. Set automatic HS clock management for panels and devices that support non-continuous HS clock. Signed-off-by: Antonio Borneo Tested-by: Philippe Cornu Reviewed-by: Philippe Cornu Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200701194234.18123-1-yannick.fertre@st.com commit 9e025e80660fe35432c81e67d401109d8e7b0ff4 Author: Antonio Borneo Date: Wed Jul 1 16:31:31 2020 +0200 drm/bridge/synopsys: dsi: allow sending longer LP commands Current code does not properly computes the max length of LP commands that can be send during H or V sync, and rely on static values. Limiting the max LP length to 4 byte during the V-sync is overly conservative. Relax the limit and allows longer LP commands (16 bytes) to be sent during V-sync. Signed-off-by: Antonio Borneo Tested-by: Philippe Cornu Reviewed-by: Philippe Cornu Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200701143131.841-1-yannick.fertre@st.com commit 6188b06e0357b3bc3b91d0b67783681d34ff2b64 Author: Antonio Borneo Date: Wed Jul 8 16:08:36 2020 +0200 drm/bridge/synopsys: dsi: allow LP commands in video mode Current code only sends LP commands in command mode. Allows sending LP commands also in video mode by setting the proper flag in DSI_VID_MODE_CFG. Signed-off-by: Antonio Borneo Tested-by: Philippe Cornu Reviewed-by: Philippe Cornu Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200708140836.32418-1-yannick.fertre@st.com commit f5d373ec2822fa0f3d52cec9a086115140e7d4e7 Author: Krzysztof Kozlowski Date: Fri Sep 4 18:43:14 2020 +0200 mmc: host: Drop unneeded MMC dependency in Kconfig All entries in Kconfig are already part of "if MMC", so there is no need for additional dependency on MMC. Suggested-by: Michał Mirosław Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200904164315.24618-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit 55118e5358343c74b7a607d5b9251df8acc3fca9 Author: Robin Murphy Date: Thu Sep 3 22:18:06 2020 +0100 mmc: renesas_sdhi: Drop local dma_parms Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one. Signed-off-by: Robin Murphy Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Link: https://lore.kernel.org/r/85e1fc97dbec3dea96102785a5e308ccb5e91cfe.1599167798.git.robin.murphy@arm.com Signed-off-by: Ulf Hansson commit 77811ffa6f66ae4051451b0a9ebb22b2b1fdd466 Author: Xu Wang Date: Thu Sep 3 08:48:25 2020 +0000 mmc: omap-hsmmc: remove redundant null check Because clk_disable_unprepare already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20200903084825.85616-1-vulab@iscas.ac.cn Signed-off-by: Ulf Hansson commit 5de1a3e322d54631f6ef918bbb82f01675dd89a2 Merge: 452f553e272cf f0c393e2104e4 Author: Ulf Hansson Date: Mon Sep 7 09:17:07 2020 +0200 Merge branch 'fixes' into next commit 452f553e272cf010ee1ac2d4896b265a6fbf4e29 Author: Wolfram Sang Date: Tue Sep 1 17:02:50 2020 +0200 mmc: core: simplify an expression We already have 'host' as a variable, so use it. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20200901150250.26236-5-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 0f93db6542fa94262b611ff942b9b3ad7ecbea10 Author: Wolfram Sang Date: Tue Sep 1 17:02:49 2020 +0200 mmc: renesas_sdhi: keep SCC clock active when tuning Tuning procedure switches to lower frequencies but that will turn the SCC off and accessing its register then will hang. So, check when we are tuning and keep the current setup of the external clock if we are doing so. Note that we still switch to the lower frequency because of the internal divider. We just make sure to not modify the external clock. This patch depends on a MMC core patch calling the downgrade function earlier. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20200901150250.26236-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 97a7d87e96b02fc5b3944d7735e0f6b8446d07da Author: Wolfram Sang Date: Tue Sep 1 17:02:48 2020 +0200 mmc: core: add a 'doing_init_tune' flag and a 'mmc_doing_tune' helper Our driver needs to know when tuning is in progress. 'doing_retune' only covers re-tuning, not the initial tuning. Add another flag to detect the initial tuning state and add a helper which tells us if any kind of tuning is going on. Only implemented for MMC currently because that's where we need it. SD can be added later if it becomes necessary. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20200901150250.26236-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 24fdcb377892b44dfe9755a62e4b92e9c6a0b359 Author: Wolfram Sang Date: Tue Sep 1 17:02:47 2020 +0200 mmc: core: when downgrading HS400, callback into drivers earlier The driver specific downgrade function makes more sense if we run it before we set the timing to something lower, not after. Otherwise some non-HS400 communication has already happened. No need to convert users. There is only one currently which needs this change in a following patch. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20200901150250.26236-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 8c98644bfc45516c81dadb99ebd0f8461688add3 Author: Douglas Anderson Date: Wed Sep 2 16:43:15 2020 -0700 mmc: sdhci-msm: Prefer asynchronous probe Turning on initcall debug on one system showed this: initcall sdhci_msm_driver_init+0x0/0x28 returned 0 after 34782 usecs The lion's share of this time (~33 ms) was in mmc_power_up(). This shouldn't be terribly surprising since there are a few calls to delay based on "power_delay_ms" and the default delay there is 10 ms. Because we haven't specified that we'd prefer asynchronous probe for this driver then we'll wait for this driver to finish before we start probes for more drivers. While 33 ms doesn't sound like tons, every little bit counts. There should be little problem with turning on asynchronous probe for this driver. It's already possible that previous drivers may have turned on asynchronous probe so we might already have other things (that probed before us) probing at the same time we are anyway. This driver isn't really providing resources (clocks, regulators, etc) that other drivers need to probe and even if it was they should be handling -EPROBE_DEFER. Let's turn this on and get a bit of boot speed back. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200902164303.1.I5e598a25222b4534c0083b61dbfa4e0e76f66171@changeid Signed-off-by: Ulf Hansson commit 4eabf0f20a2aa6e1e099faa816c4b9e9a2155891 Author: Krzysztof Kozlowski Date: Thu Sep 3 07:43:33 2020 +0200 mmc: s3cmci: Drop unused variables in dbg_dumpregs The 'imask' and 'bsize' are not used in dbg_dumpregs: drivers/mmc/host/s3cmci.c:149:36: warning: variable 'imask' set but not used [-Wunused-but-set-variable] drivers/mmc/host/s3cmci.c:148:63: warning: variable 'bsize' set but not used [-Wunused-but-set-variable] Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903054333.18331-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit 6e7fb09e1924927149b68e309d6524de777e54c2 Author: Krzysztof Kozlowski Date: Wed Sep 2 22:48:47 2020 +0200 mmc: s3cmci: Cast driver data through long Since driver data is a pointer, direct casting to integer causes warning when compile testing for 64-bit architecture: drivers/mmc/host/s3cmci.c:1495:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] The actual driver data can be only 0 or 1, so cast it via long and do not care about any loss of value. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902204847.2764-3-krzk@kernel.org Signed-off-by: Ulf Hansson commit da4599992d3eff5e52a2b32f6e4099f19b1dd655 Author: Krzysztof Kozlowski Date: Wed Sep 2 22:48:46 2020 +0200 mmc: s3cmci: Use proper printk format for iomem pointer iomem pointers should be printed with pointer format to hide the actual value and fix warnings when compile testing for 64-bit architecture: drivers/mmc/host/s3cmci.c:1355:46: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902204847.2764-2-krzk@kernel.org Signed-off-by: Ulf Hansson commit 8c7f51effd7387346e2754b545e224a68b9580ec Author: Krzysztof Kozlowski Date: Wed Sep 2 22:48:45 2020 +0200 mmc: davinci: Fix -Wpointer-to-int-cast on compile test Store in interrupt service routine always '1' in end_command, not the value of host->cmd to fix compile test warnings on RISC-V: drivers/mmc/host/davinci_mmc.c:999:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902204847.2764-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit b41123f4f57df6950f3316948989783bbdefa7e2 Author: Krzysztof Kozlowski Date: Wed Sep 2 21:36:53 2020 +0200 mmc: sdhci-brcmstb: Simplify with optional clock and dev_err_probe() Only -ENOENT from devm_clk_get() means that clock is not present in device tree. Other errors have their own meaning and should not be ignored. Simplify getting the clock which is in fact optional and also use dev_err_probe() for handling deferred. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20200902193658.20539-7-krzk@kernel.org Signed-off-by: Ulf Hansson commit b5f9a2c686d91ad5a97ee4a5be9ae1e6da8d4789 Author: Krzysztof Kozlowski Date: Wed Sep 2 21:36:57 2020 +0200 mmc: sdhci-of-sparx5: Use proper printk format for dma_addr_t dma_addr_t size varies between architectures so use dedicated printk format to fix compile testing warning (e.g. on 32-bit MIPS): drivers/mmc/host/sdhci-of-sparx5.c:63:11: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘dma_addr_t {aka unsigned int}’ [-Wformat=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902193658.20539-11-krzk@kernel.org Acked-by: Lars Povlsen Signed-off-by: Ulf Hansson commit 308d2722f6430839f06572af776f37f7af697134 Author: Krzysztof Kozlowski Date: Wed Sep 2 21:36:56 2020 +0200 mmc: dw_mmc: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code, the error value gets printed and real error from dw_mci_parse_dt() is passed further instead of fixed -EINVAL. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902193658.20539-10-krzk@kernel.org Signed-off-by: Ulf Hansson commit 180a46652e09c7882330ab9ace060f0e13ca13f0 Author: Krzysztof Kozlowski Date: Wed Sep 2 21:36:55 2020 +0200 mmc: sdhci-tegra: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902193658.20539-9-krzk@kernel.org Signed-off-by: Ulf Hansson commit 72ea817db5d26e2dab3695a576b5557ada9cd722 Author: Krzysztof Kozlowski Date: Wed Sep 2 21:36:54 2020 +0200 mmc: sdhci-of-arasan: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902193658.20539-8-krzk@kernel.org Signed-off-by: Ulf Hansson commit 89280d0963fdb615f8fdfc96592f9aab27592c14 Author: Krzysztof Kozlowski Date: Wed Sep 2 21:36:52 2020 +0200 mmc: meson: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902193658.20539-6-krzk@kernel.org Signed-off-by: Ulf Hansson commit 295208a6666de8c438054c625d97138a05087655 Author: Krzysztof Kozlowski Date: Wed Sep 2 21:36:51 2020 +0200 mmc: jz4740: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902193658.20539-5-krzk@kernel.org Reviewed-by: Paul Cercueil Signed-off-by: Ulf Hansson commit 380a99a2d084d78d6dd47f63f3a178e24321c681 Author: Krzysztof Kozlowski Date: Wed Sep 2 21:36:50 2020 +0200 mmc: dw_mmc-zx: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902193658.20539-4-krzk@kernel.org Signed-off-by: Ulf Hansson commit 3a35e7e1bd50f794ede9ed1291402bacf2c79480 Author: Krzysztof Kozlowski Date: Wed Sep 2 21:36:49 2020 +0200 mmc: davinci: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902193658.20539-3-krzk@kernel.org Signed-off-by: Ulf Hansson commit aec429e09e2d51e34ecdea5446d6061ec2e4bf74 Author: Krzysztof Kozlowski Date: Wed Sep 2 21:36:48 2020 +0200 mmc: bcm2835: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20200902193658.20539-2-krzk@kernel.org Signed-off-by: Ulf Hansson commit fa2d0aa96941e8dc347e49a04c75468e3002ee20 Author: Matthias Schiffer Date: Tue Sep 1 10:50:04 2020 +0200 mmc: core: Allow setting slot index via device tree alias As with GPIO, UART and others, allow specifying the device index via the aliases node in the device tree. On embedded devices, there is often a combination of removable (e.g. SD card) and non-removable MMC devices (e.g. eMMC). Therefore the index might change depending on * host of removable device * removable card present or not This makes it difficult to hardcode the root device, if it is on the non-removable device. E.g. if SD card is present eMMC will be mmcblk1, if SD card is not present at boot, eMMC will be mmcblk0. Alternative solutions like PARTUUIDs do not cover the case where multiple mmcblk devices contain the same image. This is a common issue on devices that can boot both from eMMC (for regular boot) and SD cards (as a temporary boot medium for development). When a firmware image is installed to eMMC after a test boot via SD card, there will be no reliable way to refer to a specific device using (PART)UUIDs oder LABELs. The demand for this feature has led to multiple attempts to implement it, dating back at least to 2012 (see https://www.spinics.net/lists/linux-mmc/msg26586.html for a previous discussion from 2014). All indices defined in the aliases node will be reserved for use by the respective MMC device, moving the indices of devices that don't have an alias up into the non-reserved range. If the aliases node is not found, the driver will act as before. This is a rebased and cleaned up version of https://www.spinics.net/lists/linux-mmc/msg26588.html . Based-on-patch-by: Sascha Hauer Link: https://lkml.org/lkml/2020/8/5/194 Signed-off-by: Matthias Schiffer Link: https://lore.kernel.org/r/20200901085004.2512-2-matthias.schiffer@ew.tq-group.com Signed-off-by: Ulf Hansson commit 1796164fac7e348f74a0f1f1cae995b22d002315 Author: Matthias Schiffer Date: Tue Sep 1 10:50:03 2020 +0200 dt-bindings: mmc: document alias support As for I2C and SPI, it now is possible to reserve a fixed index for mmc/mmcblk devices. Signed-off-by: Matthias Schiffer Link: https://lore.kernel.org/r/20200901085004.2512-1-matthias.schiffer@ew.tq-group.com Signed-off-by: Ulf Hansson commit e0c29be62cdc32605281024a662b2f8f690a3f77 Author: Wolfram Sang Date: Mon Aug 31 12:23:24 2020 +0200 mmc: meson-gx: use wrapper to avoid accessing internal vars Signed-off-by: Wolfram Sang Reviewed-by: Kevin Hilman Link: https://lore.kernel.org/r/20200831102324.12566-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 9381118fcfd7794dee7e2a8fd1bbbbc3ecb9c240 Author: Krzysztof Kozlowski Date: Mon Aug 31 18:11:47 2020 +0200 dt-bindings: mmc: mmc-pwreq-simple: Accept more than one reset GPIO There might be multiple reset GPIOs but dtschema has trouble parsing it if there are no maxItems: arch/arm/boot/dts/exynos5250-snow.dt.yaml: mmc3_pwrseq: reset-gpios: [[20, 2, 1], [20, 1, 1]] is too long From schema: Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200831161147.13515-2-krzk@kernel.org Signed-off-by: Ulf Hansson commit 80fd350b9590d567196de215391141880cc8ea5a Author: Krzysztof Kozlowski Date: Sat Aug 29 08:25:05 2020 +0200 dt-bindings: mmc: fsl-imx-esdhc: Fix i.MX 8 compatible matching The i.MX 8 DTSes use two compatibles so update the binding to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: mmc@30b40000: compatible: ['fsl,imx8mn-usdhc', 'fsl,imx7d-usdhc'] is too long From schema: Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml arch/arm64/boot/dts/freescale/imx8mn-evk.dt.yaml: mmc@30b40000: compatible: Additional items are not allowed ('fsl,imx7d-usdhc' was unexpected) arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dt.yaml: mmc@30b40000: compatible: ['fsl,imx8mn-usdhc', 'fsl,imx7d-usdhc'] is too long Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200829062505.4642-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit 8d62fa831fd2a3a58726f731726f30fc425d7f55 Author: Stefan Wahren Date: Fri Aug 28 23:47:14 2020 +0200 mmc: sdhci-iproc: Enable eMMC DDR 3.3V support for bcm2711 The emmc2 interface on the bcm2711 supports DDR modes for eMMC devices running at 3.3V. This allows to run eMMC module with 3.3V signaling voltage at DDR52 mode on the Raspberry Pi 4 using a SD adapter: clock: 52000000 Hz actual clock: 50000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 8 (mmc DDR52) signal voltage: 0 (3.30 V) driver type: 0 (driver type B) Link: https://github.com/raspberrypi/linux/issues/3802 Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1598651234-29826-1-git-send-email-stefan.wahren@i2se.com Signed-off-by: Ulf Hansson commit e282f2045a3df69e8303488684bc9f3a23d2677d Author: Chun-Hung Wu Date: Thu Aug 27 17:33:03 2020 +0800 mmc: mediatek: add pre_enable() and post_disable() hook function CQHCI_ENABLE bit in CQHCI_CFG should be disabled after msdc_cqe_disable(), and should be enabled before msdc_ceq_enable() for MTK platform. Add hook functions for cqhci_host_ops->pre_enable() and cqhci_host_ops->post_disable(). Signed-off-by: Chun-Hung Wu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1598520783-25250-3-git-send-email-chun-hung.wu@mediatek.com Signed-off-by: Ulf Hansson commit 887ba410ede62da12e77684072f6c7491c0fa909 Author: Chun-Hung Wu Date: Thu Aug 27 17:33:02 2020 +0800 mmc: cqhci: add new cqhci_host_ops pre_enable() and post_disable() Add pre_enable() and post_disable() for cqhci_host_ops. Add hook functions before cqhci enable and after cqhci disable for platforms need them. Signed-off-by: Chun-Hung Wu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1598520783-25250-2-git-send-email-chun-hung.wu@mediatek.com Signed-off-by: Ulf Hansson commit 4dac686bb3571b65b58316991eb833431a3d19f1 Author: Veerabhadrarao Badiganti Date: Thu Aug 27 20:51:28 2020 +0530 mmc: sdhci-msm: Enable restore_dll_config flag for sc7180 target On sc7180 target, issues are observed with HS400 mode due to a hardware limitation. If sdcc clock is dynamically gated and ungated, the very next command is failing with command CRC/timeout errors. To mitigate this issue, DLL phase has to be restored whenever sdcc clock is gated dynamically. The restore_dll_config ensures this. Enabling this flag with this change. And simply re-using the sdm845 target configuration for this flag. Signed-off-by: Veerabhadrarao Badiganti Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Link: https://lore.kernel.org/r/1598541694-15694-1-git-send-email-vbadigan@codeaurora.org Signed-off-by: Ulf Hansson commit 510bfe58936f7d79d4c377bcc7425244d879b1ff Author: Wolfram Sang Date: Thu Aug 20 15:25:38 2020 +0200 mmc: tmio: remove indirection of 'execute_tuning' callback After all the previous refactorization, we can now populate mmc_ops directly and don't need a layer inbetween. The NULL-pointer check and the error printout are already done by the MMC core. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20200820132538.24758-7-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 5b0739d76227fd5a3f02f014385bfa9c86e0404b Author: Wolfram Sang Date: Thu Aug 20 15:25:37 2020 +0200 mmc: tmio: don't reset whole IP core when tuning fails SDHI needs to reset the SCC only, not the whole IP core. So, if tuning fails, don't handle specifics in the generic TMIO core, but in the specific drivers. For SDHI, we need to move around the reset routine a bit. It is not modified. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20200820132538.24758-6-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 576146ea4ed986f44a4406ec32a5d3363216b3d2 Author: Wolfram Sang Date: Thu Aug 20 15:25:36 2020 +0200 mmc: tmio: factor out common parts of the reset routine Some TMIO variants need specific actions in their reset routine, but they are all based on a generic reset routine. So, the optional 'reset' callback will now only take care of the additional stuff and we will have a generic function around it. Less code, easier to maintain, and much more readable. Code in tmio_mmc.c is untested but in my TC6387XB datasheet the SDIO part is reset independently from the SD part, too. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20200820132538.24758-5-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit a8c83064e73382d6bb069bd51c56074d1e4f4eec Author: Wolfram Sang Date: Thu Aug 20 15:25:35 2020 +0200 mmc: tmio: remove indirection of 'hw_reset' callback After Yamada-san's refactorization introducing 'tmio_mmc_host_alloc', we can populate mmc_ops directly and don't need a layer inbetween. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20200820132538.24758-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 34e3211e5492756d4e59ef54f9ab1750ec7050ec Author: Wolfram Sang Date: Thu Aug 20 15:25:34 2020 +0200 Revert "mmc: tmio: fix reset operation" This reverts commit a87852c6b8827b7fece78ae57d871d56e4348e30. It did fix the issue, but was building on top of already wrong assumptions. The driver missed that 'hw_reset' was only for resetting remote HW (card) and not for the IP core. Since we fixed that in a previous patch, we can now remove this patch to make it clear that 'reset' is for resetting the IP core only. Also, cancelling DMA will only be called when actually needed again. It will also allow for further cleanups and better readability. Note that in addition to the revert, the call in 'tmio_mmc_execute_tuning' will be converted, too, to maintain the current behaviour. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20200820132538.24758-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 6e7d4de10890545b00f7d7c33310f1555963d592 Author: Wolfram Sang Date: Thu Aug 20 15:25:33 2020 +0200 mmc: renesas_sdhi: move wrong 'hw_reset' to 'reset' This driver got the usage of 'hw_reset' wrong and missed that it is used to reset the remote HW (card) only, not the local one (controller). Move everything to the proper 'reset' callback. Also, add the generic reset code from TMIO, so we will ensure the same behaviour (it will get refactored away in a later patch). This also means we need to drop MMC_CAP_HW_RESET because this is currently not supported by our hardware. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20200820132538.24758-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 7ca0f166f5b211f89fde9cf02357403e6f9715bc Author: Faiz Abbas Date: Tue Aug 25 22:30:15 2020 +0530 mmc: sdhci_am654: Add workaround for card detect debounce timer There is a one time delay because of a card detect debounce timer in the controller IP. This timer runs as soon as power is applied to the module regardless of whether a card is present or not and any writes to SDHCI_POWER_ON will return 0 before it expires. This timeout has been measured to be about 1 second in am654x and j721e. Write-and-read-back in a loop on SDHCI_POWER_ON for a maximum of 1.5 seconds to make sure that the controller actually powers on. Signed-off-by: Faiz Abbas Link: https://lore.kernel.org/r/20200825170015.32285-1-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit d425e42d600849ed81bca4e407a09f2555405ec7 Author: Alex Dewar Date: Mon Aug 24 18:18:50 2020 +0100 mmc: sdhci-msm: enable compile-testing on !ARM There seems to be no particular reason to only test for ARM, so allow for build-testing on other platforms to increase coverage. Build-tested on x86 with allyesconfig. Signed-off-by: Alex Dewar Link: https://lore.kernel.org/r/20200824171854.406157-1-alex.dewar90@gmail.com Signed-off-by: Ulf Hansson commit 9e70ff99ee871ec85e17da7c9d05cb5fcc306050 Author: Haibo Chen Date: Mon Aug 24 18:45:14 2020 +0800 mmc: sdhci-esdhc-imx: remove unused code Value assigned to a variable(err) is never used, so remove it. Signed-off-by: Haibo Chen Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1598265914-23606-1-git-send-email-haibo.chen@nxp.com Signed-off-by: Ulf Hansson commit e449d983811211592dad6f5ef8b25d5549be5e8e Author: Tian Tao Date: Mon Aug 24 09:02:36 2020 +0800 mmc: sd: Use kobj_to_dev() instead of container_of() Use kobj_to_dev() instead of container_of() Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1598230956-58523-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Ulf Hansson commit 43611afb6c178d4f07461fd4d4832e0da3762386 Author: Lars Povlsen Date: Tue Aug 25 10:13:56 2020 +0200 mmc: sdhci-of-sparx5: Add Sparx5 SoC eMMC driver This adds the eMMC driver for the Sparx5 SoC. It is based upon the designware IP, but requires some extra initialization and quirks. Signed-off-by: Lars Povlsen Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200825081357.32354-3-lars.povlsen@microchip.com Signed-off-by: Ulf Hansson commit 061e4fbf6a64b6f870d95438932119a22a4b6321 Author: Lars Povlsen Date: Tue Aug 25 10:13:55 2020 +0200 dt-bindings: mmc: Add Sparx5 SDHCI controller bindings The Sparx5 SDHCI controller is based on the Designware controller IP. Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20200825081357.32354-2-lars.povlsen@microchip.com Link: https://lore.kernel.org/r/20200826130106.22889-1-lars.povlsen@microchip.com Signed-off-by: Ulf Hansson commit 87d7ad089b318b4f319bf57f1daa64eb6d1d10ad Author: Madhuparna Bhowmik Date: Sat Aug 22 11:45:28 2020 +0530 mmc: via-sdmmc: Fix data race bug via_save_pcictrlreg() should be called with host->lock held as it writes to pm_pcictrl_reg, otherwise there can be a race condition between via_sd_suspend() and via_sdc_card_detect(). The same pattern is used in the function via_reset_pcictrl() as well, where via_save_pcictrlreg() is called with host->lock held. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Madhuparna Bhowmik Link: https://lore.kernel.org/r/20200822061528.7035-1-madhuparnabhowmik10@gmail.com Signed-off-by: Ulf Hansson commit 6932794192f63c5e105eade19fba26b8ef29ec79 Author: Wolfram Sang Date: Fri Aug 21 08:35:33 2020 +0200 mmc: core: Improve documentation of MMC_CAP_HW_RESET MMC_CAP_HW_RESET means that the controller is capable of resetting the eMMC device via RST_n signal, not a reset of the controller. Two drivers got this wrong, so let's make it more clear. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20200821063533.3771-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 46f4a69ec8ed6ab9f6a6172afe50df792c8bc1b6 Author: Adrian Hunter Date: Tue Aug 18 13:45:08 2020 +0300 mmc: sdhci: Add LTR support for some Intel BYT based controllers Some Intel BYT based host controllers support the setting of latency tolerance. Accordingly, implement the PM QoS ->set_latency_tolerance() callback. The raw register values are also exposed via debugfs. Intel EHL controllers require this support. Signed-off-by: Adrian Hunter Fixes: cb3a7d4a0aec4e ("mmc: sdhci-pci: Add support for Intel EHL") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200818104508.7149-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit c92a6af6860c37dfa411049fdac45d225f0b424c Author: Wolfram Sang Date: Mon Aug 17 13:58:38 2020 +0200 mmc: test: remove ambiguity in test description When reading the test description, I thought a correction of the xfer_size was tested, which is not the case. It is tested that the xfer_size is correct. Use 'proper xfer_size' to remove this ambiguity. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200817115838.2981-1-wsa@kernel.org Signed-off-by: Ulf Hansson commit 81e41be92ad43b268910dcae78c5a72f79f3d467 Author: Tobias Schramm Date: Fri Aug 14 20:50:11 2020 +0200 mmc: mmc_spi: fix timeout calculation Previously the cycle timeout was converted to a microsecond value but then incorrectly treated as a nanosecond timeout. This patch changes the code to convert both the nanosecond timeout and the cycle timeout to a microsecond value and use that directly. Signed-off-by: Tobias Schramm Link: https://lore.kernel.org/r/20200814185011.3252020-1-t.schramm@manjaro.org Signed-off-by: Ulf Hansson commit b698f6abb7b3de2fd04ebbb86527ab1ea95405e0 Author: Pali Rohár Date: Mon Jul 27 15:38:37 2020 +0200 mmc: sdio: Export SDIO revision and info strings to userspace For SDIO functions, SDIO cards and SD COMBO cards are exported revision number and info strings from CISTPL_VERS_1 structure. Revision number should indicate compliance of standard and info strings should contain product information in same format as product information for PCMCIA cards. Product information for PCMCIA cards should contain following strings in this order: Manufacturer, Product Name, Lot number, Programming Conditions. Note that not all SDIO cards export all those info strings in that order as described in PCMCIA Metaformat Specification. Signed-off-by: Pali Rohár Link: https://lore.kernel.org/r/20200727133837.19086-5-pali@kernel.org Signed-off-by: Ulf Hansson commit b91ec1dc5c4afb29f08afe85cdd347306044d318 Author: Pali Rohár Date: Mon Jul 27 15:38:36 2020 +0200 mmc: sdio: Extend sdio_config_attr macro and use it also for modalias This simplify code for generating sdio config attributes and allows easily define new sdio attributes. Signed-off-by: Pali Rohár Link: https://lore.kernel.org/r/20200727133837.19086-4-pali@kernel.org Signed-off-by: Ulf Hansson commit 78366e9cbd7892ac3d321e62c4be7a7fe79a69ed Author: Pali Rohár Date: Mon Jul 27 15:38:35 2020 +0200 mmc: sdio: Parse CISTPL_VERS_1 major and minor revision numbers They should indicate compliance of standard. Signed-off-by: Pali Rohár Link: https://lore.kernel.org/r/20200727133837.19086-3-pali@kernel.org Signed-off-by: Ulf Hansson commit 8ebe2607965d3e2dc02029e8c7dd35fbe508ffd0 Author: Pali Rohár Date: Mon Jul 27 15:38:34 2020 +0200 mmc: sdio: Check for CISTPL_VERS_1 buffer size Before parsing CISTPL_VERS_1 structure check that its size is at least two bytes to prevent buffer overflow. Signed-off-by: Pali Rohár Link: https://lore.kernel.org/r/20200727133837.19086-2-pali@kernel.org Signed-off-by: Ulf Hansson commit 0ac4f496a2d46d5fe320d7034c792df4a5907c46 Author: Haibo Chen Date: Tue Aug 11 16:37:37 2020 +0800 mmc: sdhci-esdhc-imx: Reset before sending tuning command for manual tuning According to IC suggestion, everytime before sending the tuning command, need to reset the usdhc, so to reset the tuning circuit, to let every tuning command work well for the manual tuning method. For standard tuning method, IC already add the reset operation in the hardware logic. Signed-off-by: Haibo Chen Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1597135057-22272-1-git-send-email-haibo.chen@nxp.com Signed-off-by: Ulf Hansson commit 309de450d78e9e83036f8b696596d8e7aa078f0d Author: Colin Ian King Date: Mon Aug 10 09:02:47 2020 +0100 ms_block: fix spelling mistake "doesn'" -> "doesn't" There is a spelling mistake in a debug message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200810080247.47024-1-colin.king@canonical.com Signed-off-by: Ulf Hansson commit 9e1adca2019b8bff3da61baef7b42042e6aa9b01 Author: Lad Prabhakar Date: Sun Aug 9 20:20:01 2020 +0100 dt-bindings: mmc: renesas,sdhi: Add r8a774e1 support Document SDHI controller for RZ/G2H (R8A774E1) SoC, which is compatible with R-Car Gen3 SoC family. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200809192001.19156-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Ulf Hansson commit ce54fb38fa4291af8b39c70b114bdd30aaf0fd59 Author: Guo Ren Date: Sat Aug 8 11:45:02 2020 +0000 mmc: Kconfig: Add RISCV and CSKY for MMC_DW Synopsys DesignWare MMC controller could be used in RISC-V and C-SKY architectures. Signed-off-by: Guo Ren Cc: Ulf Hansson Link: https://lore.kernel.org/r/1596887102-9743-1-git-send-email-guoren@kernel.org Signed-off-by: Ulf Hansson commit bb82d3b57c35eb91918964954e6c8efcc1018ce3 Author: Krzysztof Kozlowski Date: Tue Aug 4 17:13:45 2020 +0200 mmc: s3cmci: remove empty kerneldoc comment Remove empty comment to fix W=1 compile warning: drivers/mmc/host/s3cmci.c:400: warning: Cannot understand * on line 400 - I thought it was a doc line Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200804151345.28005-1-krzk@kernel.org Signed-off-by: Ulf Hansson commit d99654f62362e08fb203bb9f5b6ffbd2c00ad8b6 Author: Faiz Abbas Date: Sun Aug 2 12:31:14 2020 +0530 dt-bindings: mmc: sdhci-am654: Document bindings for the host controllers on TI's J7200 devices Add binding documentation for mmc host controllers present on TI's J7200 SOC Signed-off-by: Faiz Abbas Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200802070114.9624-1-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 9481b45ca9b951e0ad406c9d1f6f90ad6ff56a7d Author: Alexander A. Klimov Date: Sat Jul 18 11:06:14 2020 +0200 mmc: sdhci_am654: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200718090614.88946-1-grandmaster@al2klimov.de Signed-off-by: Ulf Hansson commit d4a197f4047e01d1e0b06e0390d513f253350c62 Author: Kristian H. Kristensen Date: Thu Sep 3 18:16:52 2020 +0000 udmabuf: Add missing compact_ioctl Make sure we can use this on mixed systems. Signed-off-by: Kristian H. Kristensen Link: http://patchwork.freedesktop.org/patch/msgid/20200903181652.432067-1-hoegsberg@google.com Signed-off-by: Gerd Hoffmann commit fb8a0b80c4bb4d474218d515cca0ec9b9028c6b4 Author: Florian Fainelli Date: Fri Apr 17 17:21:32 2020 -0700 bus: brcmstb_gisb: Add support for breakpoint interrupts GISB breakpoint interrupts can be raised when a breakpoint has been enabled to match a specific master and/or GISB register address. Being able to print a message, similar to those done during target abort or timeout greatly helps debug systems. Signed-off-by: Florian Fainelli commit 541b6e6ee7a475538c5d6b0b6ad74752d10e3064 Author: Florian Fainelli Date: Fri Apr 17 17:11:46 2020 -0700 dt-bindings: bus: Document breakpoint interrupt for gisb-arb The GISB arbiter can have a third and optional interrupt to handle GISB breakpoints. Signed-off-by: Florian Fainelli commit cca87e5cbd98897e06322a29a1dcac7a3c0f5ed1 Author: Krzysztof Kozlowski Date: Wed Sep 2 17:02:44 2020 +0200 clk: imx: Fix and update kerneldoc Fix and add missing kerneldoc to fix compile warnings like: drivers/clk/imx/clk-pfd.c:27: warning: Function parameter or member 'hw' not described in 'clk_pfd' drivers/clk/imx/clk-pllv3.c:53: warning: Function parameter or member 'ref_clock' not described in 'clk_pllv3' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 4757d2a3a32126be8bf5acb6eb293d0a1310dc1b Author: Peng Fan Date: Fri Aug 28 15:18:50 2020 +0800 clk: imx: fix i.MX7D peripheral clk mux flags According to RM, Page 574, Chapter 5.2.6.4.3 Peripheral clock slice, "IP clock slices must be stopped to change the clock source.". So we must have CLK_SET_PARENT_GATE flag to avoid glitch. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 936c383673b9e3007432f17140ac62de53d87db9 Author: Peng Fan Date: Wed Aug 26 15:14:07 2020 +0800 clk: imx: fix composite peripheral flags According to RM, for peripheral clock slice, "IP clock slices must be stopped to change the clock source.". So we must have CLK_SET_PARENT_GATE flag to avoid glitch. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 718ecc50359ec7a45c3195305ab998a46db491dc Author: Dave Chinner Date: Mon Aug 17 16:41:01 2020 -0700 xfs: xfs_iflock is no longer a completion With the recent rework of the inode cluster flushing, we no longer ever wait on the the inode flush "lock". It was never a lock in the first place, just a completion to allow callers to wait for inode IO to complete. We now never wait for flush completion as all inode flushing is non-blocking. Hence we can get rid of all the iflock infrastructure and instead just set and check a state flag. Rename the XFS_IFLOCK flag to XFS_IFLUSHING, convert all the xfs_iflock_nowait() test-and-set operations on that flag, and replace all the xfs_ifunlock() calls to clear operations. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 771915c4f68889b8c41092a928c604c9cd279927 Author: Carlos Maiolino Date: Wed Aug 26 14:05:56 2020 -0700 xfs: remove kmem_realloc() Remove kmem_realloc() function and convert its users to use MM API directly (krealloc()) Signed-off-by: Carlos Maiolino Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d2024cdf0f02b9bdad2adb8ce220e30c6424e247 Author: Linus Walleij Date: Sun Sep 6 15:29:03 2020 +0200 drm/panel: s6e63m0: Fix up DRM_DEV* regression Ooops the panel drivers stopped to use DRM_DEV* messages and we predictably create errors by merging code that still use it. Signed-off-by: Linus Walleij Acked-by: Sam Ravnborg Acked-by: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200906132903.5739-1-linus.walleij@linaro.org commit 02a20d4fef3da0278bd2d95c86f48318a9902b76 Author: Christophe JAILLET Date: Sun Sep 6 14:45:41 2020 +0200 enic: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'vnic_dev_classifier()', 'vnic_dev_fw_info()', 'vnic_dev_notify_set()' and 'vnic_dev_stats_dump()' (vnic_dev.c) GFP_ATOMIC must be used because its callers take a spinlock before calling these functions. When memory is allocated in '__enic_set_rsskey()' and 'enic_set_rsscpu()' GFP_ATOMIC must be used because they can be called with a spinlock. The call chain is: enic_reset <-- takes 'enic->enic_api_lock' --> enic_set_rss_nic_cfg --> enic_set_rsskey --> __enic_set_rsskey <-- uses dma_alloc_coherent --> enic_set_rsscpu <-- uses dma_alloc_coherent When memory is allocated in 'vnic_dev_init_prov2()' GFP_ATOMIC must be used because a spinlock is hidden in the ENIC_DEVCMD_PROXY_BY_INDEX macro, when this function is called in 'enic_set_port_profile()'. When memory is allocated in 'vnic_dev_alloc_desc_ring()' GFP_KERNEL can be used because it is only called from 5 functions ('vnic_dev_init_devcmd2()', 'vnic_cq_alloc()', 'vnic_rq_alloc()', 'vnic_wq_alloc()' and 'enic_wq_devcmd2_alloc()'. 'vnic_dev_init_devcmd2()': already uses GFP_KERNEL and no lock is taken in the between. 'enic_wq_devcmd2_alloc()': is called from ' vnic_dev_init_devcmd2()' which already uses GFP_KERNEL and no lock is taken in the between. 'vnic_cq_alloc()', 'vnic_rq_alloc()', 'vnic_wq_alloc()': are called from 'enic_alloc_vnic_resources()' 'enic_alloc_vnic_resources()' has only 2 call chains: 1) enic_probe --> enic_dev_init --> enic_alloc_vnic_resources 'enic_probe()' is a probe function and no lock is taken in the between 2) enic_set_ringparam --> enic_alloc_vnic_resources 'enic_set_ringparam()' is a .set_ringparam function (see struct ethtool_ops). It seems to only take a mutex and no spinlock. So all paths are safe to use GFP_KERNEL. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Jakub Kicinski commit 10e7dd54cdaa00be8deb11a8cdb90faa804bdb19 Author: Florian Fainelli Date: Fri Oct 25 11:34:58 2019 -0700 soc: bcm: brcmstb: biuctrl: Change RAC data line prefetching after 4 consecutive lines Change the RACPREFDATA(x) setting to prefetch the next 256-byte line after 4 consecutive lines have been used, instead of after 2 consecutive lines. This does improve the synthetic memcpy benchmark by an additional +0.5% on top of the previous change for Cortex-A72 CPUs. Signed-off-by: Florian Fainelli commit 3e813d61401a634cc67e7e707e2c7e84b207d099 Author: Linus Walleij Date: Sun Sep 6 21:21:13 2020 +0200 net: gemini: Clean up phy registration It's nice if the phy is online before we register the netdev so try to do that first. Stop trying to do "second tried" to register the phy, it works perfectly fine the first time. Stop remvoving the phy in uninit. Remove it when the driver is remove():d, symmetric to where it is added, in probe(). Suggested-by: Andrew Lunn Reviewed-by: Andrew Lunn Reported-by: David Miller Signed-off-by: Linus Walleij Signed-off-by: Jakub Kicinski commit ee1a4c84a76de7c3d3cc04584b745280f6e22ba9 Author: Jonathan Neuschäfer Date: Sat Sep 5 20:32:18 2020 +0200 net: Add a missing word Signed-off-by: Jonathan Neuschäfer Signed-off-by: Jakub Kicinski commit 5f4a8ef384db1e1e1d6132e3fac9c43fe670a4e8 Author: Linus Walleij Date: Sat Sep 5 23:59:14 2020 +0200 net: dsa: rtl8366rb: Support setting MTU This implements the missing MTU setting for the RTL8366RB switch. Apart from supporting jumboframes, this rids us of annoying boot messages like this: realtek-smi switch: nonfatal error -95 setting MTU on port 0 Signed-off-by: Linus Walleij Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 1b57d91b969cda1d2c3530f2e829ca366a9c7df7 Author: Valentin Schneider Date: Thu Jul 30 18:03:21 2020 +0100 irqchip/gic-v2, v3: Prevent SW resends entirely The GIC irqchips can now use a HW resend when a retrigger is invoked by check_irq_resend(). However, should the HW resend fail, check_irq_resend() will still attempt to trigger a SW resend, which is still a bad idea for the GICs. Prevent this from happening by setting IRQD_HANDLE_ENFORCE_IRQCTX on all GIC IRQs. Technically per-cpu IRQs do not need this, as their flow handlers never set IRQS_PENDING, but this aligns all IRQs wrt context enforcement: this also forces all GIC IRQ handling to happen in IRQ context (as defined by in_irq()). Signed-off-by: Valentin Schneider Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200730170321.31228-3-valentin.schneider@arm.com commit 5f774f5e12512b850a611aa99b4601d7eac50edb Author: Marc Zyngier Date: Fri Jul 31 11:33:13 2020 +0100 irqchip/git-v3-its: Implement irq_retrigger callback for device-triggered LPIs It is pretty easy to provide a retrigger callback for the ITS, as it we already have the required support in terms of irq_set_irqchip_state(). Note that this only works for device-generated LPIs, and not the GICv4 doorbells, which should never have to be retriggered anyway. Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier commit 17f644e949ffb14e9c8870d99bc574066d8b685c Author: Valentin Schneider Date: Thu Jul 30 18:03:20 2020 +0100 irqchip/gic-v2, v3: Implement irq_chip->irq_retrigger() While digging around IRQCHIP_EOI_IF_HANDLED and irq/resend.c, it has come to my attention that the IRQ resend situation seems a bit precarious for the GIC(s). When marking an IRQ with IRQS_PENDING, handle_fasteoi_irq() will bail out and issue an irq_eoi(). Should the IRQ in question be re-enabled, check_irq_resend() will trigger a SW resend, which will go through the flow handler again and issue *another* irq_eoi() on the *same* IRQ activation. This is something the GIC spec clearly describes as a bad idea: any EOI must match a previous ACK. Implement irq_chip.irq_retrigger() for the GIC chips by setting the GIC pending bit of the relevant IRQ. After being called by check_irq_resend(), this will eventually trigger a *new* interrupt which we will handle as usual. Signed-off-by: Valentin Schneider Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200730170321.31228-2-valentin.schneider@arm.com commit cd1752d34ef33d68d82ef9dcc699b4eaa17c07fc Author: Marc Zyngier Date: Wed Aug 26 18:37:50 2020 +0100 genirq: Walk the irq_data hierarchy when resending an interrupt On resending an interrupt, we only check the outermost irqchip for a irq_retrigger callback. However, this callback could be implemented at an inner level. Use irq_chip_retrigger_hierarchy() in this case. Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier commit 383e3f3ee811e464d6622106a13ba865fd1d27de Author: Wang Hai Date: Sat Sep 5 16:50:58 2020 +0800 net/packet: Remove unused macro BLOCK_PRIV BLOCK_PRIV is never used after it was introduced. So better to remove it. Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit d3604c91566a8b06683482e0c7e2fa9473aa8b9a Author: Krzysztof Kozlowski Date: Wed Sep 2 17:57:33 2020 +0200 ARM: dts: exynos: Silence SATA PHY warning in Exynos5250 The SATA PHY in Exynos5250 SoCs has two interfaces and two device nodes: 1. sata-phy@12170000 2. i2c-9/i2c@38 The first node represents the actual SATA PHY device with phy-cells. The second represents an additional I2C interface, needed by the driver to communicate with the SATA PHY device. It is not a PHY-provider in the terms of dtschema so rename it to silence dtbs_check warning: arch/arm/boot/dts/exynos5250-arndale.dt.yaml: sata-phy@38: '#phy-cells' is a required property From schema: lib/python3.6/site-packages/dtschema/schemas/phy/phy-provider.yaml This second device node is also a property of SoC, not a board so move it there. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200902155733.20271-2-krzk@kernel.org commit 975bcbce5b16d4bf7282efda134e12dca122bafb Author: Krzysztof Kozlowski Date: Wed Sep 2 17:57:32 2020 +0200 ARM: dts: exynos: Remove I2C9 samsung, i2c-slave-addr from Exynos5250 boards The property samsung,i2c-slave-addr in I2C9 controller on Exynos5250 Arndale and SMDK5250 boards, is not actually needed. There is only one master on this bus. It's not clear why this property was added at first place. Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200902155733.20271-1-krzk@kernel.org commit 75a4a04e78c624d5ee1bf466a1395725a3f6e04c Author: Sylwester Nawrocki Date: Fri Sep 4 12:20:36 2020 +0200 ARM: dts: samsung: odroid-xu3: Move assigned-clock* properties to i2s0 node The purpose of those assigned-clock-* properties is to configure clock for for the I2S device so move them to respective node. This suppresses the dtbs_check warning: arch/arm/boot/dts/exynos5422-odroidxu3.dt.yaml: sound: 'clocks' is a dependency of 'assigned-clocks' Reported-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit d3333e21f2d76fa384200a0826d766285787493f Author: Krzysztof Kozlowski Date: Thu Sep 3 20:19:26 2020 +0200 MAINTAINERS: Move Hartmut Knaack to Credits Hartmut Knaack was an active reviewer and contributor to the IIO subsystem and drivers. However his last message on LKML is from October 2015. In thanks for Hartmut's effort, move him name to the Credits. Suggested-by: Andy Shevchenko Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Cc: Jonathan Cameron Cc: linux-iio Link: https://lore.kernel.org/r/20200903181926.5606-2-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 50dd953ea094a4c2f2e45beb80a2a772ba16d64e Author: Krzysztof Kozlowski Date: Thu Sep 3 20:19:25 2020 +0200 MAINTAINERS: Consolidate Analog Devices IIO entries and remove Beniamin Bia Emails to Beniamin Bia bounce with no such address so remove him from maintainers. After this removal, many entries for Analog Devices Inc IIO drivers look exactly the same so consolidate them. Suggested-by: Andy Shevchenko Suggested-by: Jonathan Cameron Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Acked-by: Lars-Peter Clausen Cc: Michael Hennerich Cc: Jonathan Cameron Cc: linux-iio Link: https://lore.kernel.org/r/20200903181926.5606-1-krzk@kernel.org Signed-off-by: Jonathan Cameron commit e2664d0870bbbf9df2513ed9870003a70bdb0e8e Merge: 76f50ad9b1503 2f0472a1f80e6 Author: Greg Kroah-Hartman Date: Sun Sep 6 17:47:45 2020 +0200 Merge tag 'iio-for-5.10a-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of new device support, features and cleanup for IIO in 5.10 cycle, take 2 A few changes to how I write this cover letter. * Started to use manufacturer prefixes to group changes better. * Stop list minor formatting etc changes. * Whilst I appreciate those changes, we don't need to call them out here. New device support: * adi,adxrs290 - New driver for this gyroscope with dt bindings. One fix follows. * ams,as73211 - New driver for this colour sensor with dt bindings. Also includes docs for XYZ modifiers as used for the CIE colour space. Sysfs docs. * atlas,atlas-ezo-sensor - Support O_2 sensor, includes new modifier for concentration. - Support humidity sensor. * ti,hdc2010 - New driver support hdc2010 and hdc2080 humidity sensors. Includes dt bindings. Cleanup, minor fixes and features * core - Make the trigger related stub functions static inline, avoiding some build warnings. - buffer-dmaengine. Allow adjusting bytes_used with residue info. * dev_error_probe to replace open coded equivalent in many drivers. * docs and comment fixes - Fix some typos, doubled words, capitalisation and punctuation. * dt binding conversions to yaml - lltc,ltc2497 - lltc,ltc2632 - maxim,max11100 - maxim,max1118 - maxim,max9611 - microchip,mcp3201 - microchip,mcp342x (add to trivial devices) - ti,adc0832 - ti,adc108s102 - ti,adc128s052 - ti,adc161s626 - ti,ads8344 - ti,tlc4541 (includes adding an accidentally dropped original binding doc) * adi,adi-axi-adc - Use kobj_to_dev instead of open coding. * adi,ad5686 - Constify iio_chan_spec * adi,ad8366 - Add HMC1119 to kconfig help text as the driver supports it. * adi,ad9523 - Use devm for reset of probe and drop remove. * adi,adxl372 - Tidy up alignment - Add OF table - Add peak mode support with some docs. * bosch,bma220 (general tidy up) - Fix some return codes. - Use read_avail callback rather than open coding attrs. - Use dev_get_drvdata rather than dance via to_spi_device() - Mark PM functions as __maybe_unused rather than #ifdef fun. - Drop ACPI_PTR protections and ifdefs. - Tidy up header ordering. - BIT and GENMASK * broadcom,bcm_iproc - Drop of_match_ptr protection and switch to mod_devicetable.h Part of general move to get this anti-pattern out of IIO. * melexis,mlx90614 - Simplify some calculations. - Add some kernel_doc - Use regmap poll loop rather than open coding. - Add extended calibration option. * sensortec,sx9310, wide ranging set of fixes and cleanups. - Document dt-binding. - Rename some macros to align better with spec sheet - Fix some issues with irq handling. - Drop of_match_ptr and ACPI_PTR macros to avoid unused warnings etc. - Switch to probe_new - Fix memory alignment for iio_push_to_buffers_with_timestamp() - Use long for bitmaps to allow use of for_each_bit_set() - Use regmap_read_poll instead of opencoding. - Simplify error paths - Enabled regulators at probe. - Use trigger flags from firmware rather than forcing them in the driver. * ti,adc081c - Drop ACPI IDs that are not likely to be official ones and we don't believe anyone is using. * ti,adc108s102 - Drop CONFIG_OF and of_match_ptr protections. * ti,adc128s052 - Drop of_match_ptr protection and include mod_devicetable.h * ti,dac5571 - Support powerdown for mutlichannel usecases. * xpowers,axp20x - Convert from OF to generic fw / device properties. Unlikely anyone will use this with anything other than devicetree, but this is part of a general move across IIO. * tag 'iio-for-5.10a-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (96 commits) drivers/iio/humidity/hdc2010.c:305:2-3: Unneeded semicolon iio: accel: bma220: Remove unneeded blank lines iio: accel: bma220: Use BIT() and GENMASK() macros iio: accel: bma220: Group IIO headers together iio: accel: bma220: Drop ACPI_PTR() and accompanying ifdeffery iio: accel: bma220: Mark PM functions as __maybe_unused iio: accel: bma220: Use dev_get_drvdata() directly iio: accel: bma220: Convert to use ->read_avail() iio: accel: bma220: Fix returned codes from bma220_init(), bma220_deinit() dt-bindings: iio: adc: microchip,mcp3201 yaml conversion. iio: buffer-dmaengine: adjust `bytes_used` with residue info dt-bindings: iio: adc: ti,tlc4541 binding conversion dt-bindings: iio: adc: tlc4541 - recover accidentally dropped binding doc dt-bindings: iio: adc: ti,ads8344 yaml conversion dt-bindings: iio: adc: ti,adc128s052 yaml conversion. dt-bindings: iio: adc: ti,adc0832 yaml conversion. dt-bindings: iio: adc: ti,adc161s626 yaml conversion. dt-bindings: iio: adc: lltc,ltc2497 yaml conversion. dt-bindings: iio: adc: ti,adc108s102 yaml conversion dt-bindings: trivial-devices: Add mcp342x ADCs and drop separate binding doc. ... commit 52f5b683e50a9bf106c07196ffadda58f199678b Author: Douglas Anderson Date: Tue Sep 1 08:19:43 2020 -0700 iio: sx9310: Prefer async probe On one board I found that: probe of 5-0028 returned 1 after 259547 usecs While some of this time is attributable to the pile of i2c transfers that we do at probe time, the lion's share (over 200 ms) is sitting waiting in the polling loop in sx9310_init_compensation() waiting for the hardware to indicate that it's done. There's no reason to block probe of all other devices on our probe. Turn on async probe. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Daniel Campello Link: https://lore.kernel.org/r/20200901081920.v2.1.Id02b2f451b3eed71ddd580f4b8b44b3e33e84970@changeid Signed-off-by: Jonathan Cameron commit aa06b6f4d8e36fa9f183b4f7a44d5c63acac33e2 Author: Alex Dewar Date: Fri Sep 4 18:04:16 2020 +0100 iio: adc: rockchip_saradc: Allow compile-testing with !ARM There seems no reason to allow for compile-testing on ARM only, so remove this restriction. Build-tested with allyesconfig on x86. Signed-off-by: Alex Dewar Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20200904170416.16061-1-alex.dewar90@gmail.com Signed-off-by: Jonathan Cameron commit 2f0472a1f80e6230f126aa0af76e89f85abc37bd Author: kernel test robot Date: Tue Sep 1 19:30:07 2020 +0100 drivers/iio/humidity/hdc2010.c:305:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 0115a63c9993 ("iio: humidity: Add TI HDC20x0 support") CC: Eugene Zaikonnikov Signed-off-by: kernel test robot Signed-off-by: Jonathan Cameron commit f8bd54d2190469e2244ade66cc1551b2a8f4f138 Author: Hans de Goede Date: Thu Sep 3 13:23:37 2020 +0200 drm/i915: panel: Use atomic PWM API for devs with an external PWM controller Now that the PWM drivers which we use have been converted to the atomic PWM API, we can move the i915 panel code over to using the atomic PWM API. The removes a long standing FIXME and this removes a flicker where the backlight brightness would jump to 100% when i915 loads even if using the fastset path. Note that this commit also simplifies pwm_disable_backlight(), by dropping the intel_panel_actually_set_backlight(..., 0) call. This call sets the PWM to 0% duty-cycle. I believe that this call was only present as a workaround for a bug in the pwm-crc.c driver where it failed to clear the PWM_OUTPUT_ENABLE bit. This is fixed by an earlier patch in this series. After the dropping of this workaround, the usleep call, which seems unnecessary to begin with, has no useful effect anymore, so drop that too. Acked-by: Jani Nikula Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-18-hdegoede@redhat.com commit 9a6ae5b354ed09f61cfa3acbb19fecd64f46b097 Author: Hans de Goede Date: Thu Sep 3 13:23:36 2020 +0200 drm/i915: panel: Honor the VBT PWM min setting for devs with an external PWM controller So far for devices using an external PWM controller (devices using pwm_setup_backlight()), we have been hardcoding the minimum allowed PWM level to 0. But several of these devices specify a non 0 minimum setting in their VBT. Change pwm_setup_backlight() to use get_backlight_min_vbt() to get the minimum level. Acked-by: Jani Nikula Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-17-hdegoede@redhat.com commit 6b51e7d23aa8591557d742c96e2f87c09ff54a48 Author: Hans de Goede Date: Thu Sep 3 13:23:35 2020 +0200 drm/i915: panel: Honor the VBT PWM frequency for devs with an external PWM controller So far for devices using an external PWM controller (devices using pwm_setup_backlight()), we have been hardcoding the period-time passed to pwm_config() to 21333 ns. I suspect this was done because many VBTs set the PWM frequency to 200 which corresponds to a period-time of 5000000 ns, which greatly exceeds the PWM_MAX_PERIOD_NS define in the Crystal Cove PMIC PWM driver, which used to be 21333. This PWM_MAX_PERIOD_NS define was actually based on a bug in the PWM driver where its period and duty-cycle times where off by a factor of 256. Due to this bug the hardcoded CRC_PMIC_PWM_PERIOD_NS value of 21333 would result in the PWM driver using its divider of 128, which would result in a PWM output frequency of 6000000 Hz / 256 / 128 = 183 Hz. So actually pretty close to the default VBT value of 200 Hz. Now that this bug in the pwm-crc driver is fixed, we can actually use the VBT defined frequency. This is important because: a) With the pwm-crc driver fixed it will now translate the hardcoded CRC_PMIC_PWM_PERIOD_NS value of 21333 ns / 46 Khz to a PWM output frequency of 23 KHz (the max it can do). b) The pwm-lpss driver used on many models has always honored the 21333 ns / 46 Khz request Some panels do not like such high output frequencies. E.g. on a Terra Pad 1061 tablet, using the LPSS PWM controller, the backlight would go from off to max, when changing the sysfs backlight brightness value from 90-100%, anything under aprox. 90% would turn the backlight fully off. Honoring the VBT specified PWM frequency will also hopefully fix the various bug reports which we have received about users perceiving the backlight to flicker after a suspend/resume cycle. Acked-by: Jani Nikula Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-16-hdegoede@redhat.com commit 27a79cbc17e39b34f2fa9d3829e39ca50418c7f2 Author: Hans de Goede Date: Thu Sep 3 13:23:34 2020 +0200 drm/i915: panel: Add get_vbt_pwm_freq() helper Factor the code which checks and drm_dbg_kms-s the VBT PWM frequency out of get_backlight_max_vbt(). This is a preparation patch for honering the VBT PWM frequency for devices which use an external PWM controller (devices using pwm_setup_backlight()). Acked-by: Jani Nikula Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-15-hdegoede@redhat.com commit c86b155da7d0700032eed00d37ee02310eb8a0b7 Author: Hans de Goede Date: Thu Sep 3 13:23:33 2020 +0200 pwm: crc: Implement get_state() method Implement the pwm_ops.get_state() method to complete the support for the new atomic PWM API. Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-14-hdegoede@redhat.com commit 9fccec821904b5f2a44b0c7b522a058ad0590a2c Author: Hans de Goede Date: Thu Sep 3 13:23:32 2020 +0200 pwm: crc: Implement apply() method to support the new atomic PWM API Replace the enable, disable and config pwm_ops with an apply op, to support the new atomic PWM API. Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-13-hdegoede@redhat.com commit 6fdefe60898ad4506456d8117c7f81cbc5d13468 Author: Hans de Goede Date: Thu Sep 3 13:23:31 2020 +0200 pwm: crc: Enable/disable PWM output on enable/disable The pwm-crc code is using 2 different enable bits: 1. bit 7 of the PWM0_CLK_DIV (PWM_OUTPUT_ENABLE) 2. bit 0 of the BACKLIGHT_EN register So far we've kept the PWM_OUTPUT_ENABLE bit set when disabling the PWM, this commit makes crc_pwm_disable() clear it on disable and makes crc_pwm_enable() set it again on re-enable. Acked-by: Uwe Kleine-König Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-12-hdegoede@redhat.com commit 6158231a84224ed0d826bbf62c992ce9c73101c1 Author: Hans de Goede Date: Thu Sep 3 13:23:30 2020 +0200 pwm: crc: Fix period changes not having any effect The pwm-crc code is using 2 different enable bits: 1. bit 7 of the PWM0_CLK_DIV (PWM_OUTPUT_ENABLE) 2. bit 0 of the BACKLIGHT_EN register The BACKLIGHT_EN register at address 0x51 really controls a separate output-only GPIO which is earmarked to be used as output connected to the backlight-enable pin for LCD panels, this GPO is part of the PMIC's "Display Panel Control Block." . This pin should probably be moved over to a GPIO provider driver (and consumers modified accordingly), but that is something for an(other) patch. Enabling / disabling the actual PWM output is controlled by the PWM_OUTPUT_ENABLE bit of the PWM0_CLK_DIV register. As the comment in the old code already indicates we must disable the PWM before we can change the clock divider. But the crc_pwm_disable() and crc_pwm_enable() calls the old code make for this only change the BACKLIGHT_EN register; and the value of that register does not matter for changing the period / the divider. What does matter is that the PWM_OUTPUT_ENABLE bit must be cleared before a new value can be written. This commit modifies crc_pwm_config() to clear PWM_OUTPUT_ENABLE instead when changing the period, so that period changes actually work. Note this fix will cause a significant behavior change on some devices using the CRC PWM output to drive their backlight. Before the PWM would always run with the output frequency configured by the BIOS at boot, now the period time specified by the i915 driver will actually be honored. Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-11-hdegoede@redhat.com commit a05af71f0dd3a31c4036f34e3e85fbcc56e80050 Author: Hans de Goede Date: Thu Sep 3 13:23:29 2020 +0200 pwm: crc: Fix off-by-one error in the clock-divider calculations The CRC PWM controller has a clock-divider which divides the clock with a value between 1-128. But as can seen from the PWM_DIV_CLK_xxx defines, this range maps to a register value of 0-127. So after calculating the clock-divider we must subtract 1 to get the register value, unless the requested frequency was so high that the calculation has already resulted in a (rounded) divider value of 0. Note that before this fix, setting a period of PWM_MAX_PERIOD_NS which corresponds to the max. divider value of 128 could have resulted in a bug where the code would use 128 as divider-register value which would have resulted in an actual divider value of 0 (and the enable bit being set). A rounding error stopped this bug from actually happen. This same rounding error means that after the subtraction of 1 it is impossible to set the divider to 128. Also bump PWM_MAX_PERIOD_NS by 1 ns to allow setting a divider of 128 (register-value 127). Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-10-hdegoede@redhat.com commit 79e0899275e527ac187693528ba7a39a645e2832 Author: Hans de Goede Date: Thu Sep 3 13:23:28 2020 +0200 pwm: crc: Fix period / duty_cycle times being off by a factor of 256 While looking into adding atomic-pwm support to the pwm-crc driver I noticed something odd, there is a PWM_BASE_CLK define of 6 MHz and there is a clock-divider which divides this with a value between 1-128, and there are 256 duty-cycle steps. The pwm-crc code before this commit assumed that a clock-divider setting of 1 means that the PWM output is running at 6 MHZ, if that is true, where do these 256 duty-cycle steps come from? This would require an internal frequency of 256 * 6 MHz = 1.5 GHz, that seems unlikely for a PMIC which is using a silicon process optimized for power-switching transistors. It is way more likely that there is an 8 bit counter for the duty cycle which acts as an extra fixed divider wrt the PWM output frequency. The main user of the pwm-crc driver is the i915 GPU driver which uses it for backlight control. Lets compare the PWM register values set by the video-BIOS (the GOP), assuming the extra fixed divider is present versus the PWM frequency specified in the Video-BIOS-Tables: Device: PWM Hz set by BIOS PWM Hz specified in VBT Asus T100TA 200 200 Asus T100HA 200 200 Lenovo Miix 2 8 23437 20000 Toshiba WT8-A 23437 20000 So as we can see if we assume the extra division by 256 then the register values set by the GOP are an exact match for the VBT values, where as otherwise the values would be of by a factor of 256. This commit fixes the period / duty_cycle calculations to take the extra division by 256 into account. Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-9-hdegoede@redhat.com commit 547d9e9261d294f0a2597d9e9c55ba48f80716ab Author: Hans de Goede Date: Thu Sep 3 13:23:27 2020 +0200 pwm: lpss: Remove suspend/resume handlers PWM controller drivers should not restore the PWM state on resume. The convention is that PWM consumers do this by calling pwm_apply_state(), so that it can be done at the exact moment when the consumer needs the state to be stored, avoiding e.g. backlight flickering. The only in kernel consumers of the pwm-lpss code, the i915 driver and the pwm-class sysfs interface code both correctly restore the state on resume, so there is no need to do this in the pwm-lpss code. More-over the removed resume handler is buggy, since it blindly restores the ctrl-register contents without setting the update bit, which is necessary to get the controller to actually use/apply the restored base-unit and on-time-div values. Acked-by: Thierry Reding Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-8-hdegoede@redhat.com commit d6d54bacb1dd02a31ed9d8e3db028639da292615 Author: Hans de Goede Date: Thu Sep 3 13:23:26 2020 +0200 pwm: lpss: Make pwm_lpss_apply() not rely on existing hardware state Before this commit pwm_lpss_apply() was assuming 2 pre-conditions were met by the existing hardware state: 1. That the base-unit and on-time-div read back from the control register are those actually in use, so that it can skip setting the update bit if the read-back value matches the desired values. 2. That the controller is enabled when the cached pwm_state.enabled says that the controller is enabled. As the long history of fixes for subtle (often suspend/resume) lpss-pwm issues shows, these assumptions are not necessary always true. 1. Specifically is not true on some (*) Cherry Trail devices with a nasty GFX0._PS3 method which: a. saves the ctrl reg value. b. sets the base-unit to 0 and writes the update bit to apply/commit c. restores the original ctrl value without setting the update bit, so that the 0 base-unit value is still in use. 2. Assumption 2. currently is true, but only because of the code which saves/restores the state on suspend/resume. By convention restoring the PWM state should be done by the PWM consumer and the presence of this code in the pmw-lpss driver is a bug. Therefor the save/restore code will be dropped in the next patch in this series, after which this assumption also is no longer true. This commit changes the pwm_lpss_apply() to not make any assumptions about the state the hardware is in. Instead it makes pwm_lpss_apply() always fully program the PWM controller, making it much less fragile. *) Seen on the Acer One 10 S1003, Lenovo Ideapad Miix 310 and 320 models and various Medion models. Acked-by: Thierry Reding Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-7-hdegoede@redhat.com commit 092d83e3f513a4a7b9f189b34e28b71c9edcedbd Author: Hans de Goede Date: Thu Sep 3 13:23:25 2020 +0200 pwm: lpss: Add pwm_lpss_prepare_enable() helper In the not-enabled -> enabled path pwm_lpss_apply() needs to get a runtime-pm reference; and then on any errors it needs to release it again. This leads to somewhat hard to read code. This commit introduces a new pwm_lpss_prepare_enable() helper and moves all the steps necessary for the not-enabled -> enabled transition there, so that we can error check the entire transition in a single place and only have one pm_runtime_put() on failure call site. While working on this I noticed that the enabled -> enabled (update settings) path was quite similar, so I've added an enable parameter to the new pwm_lpss_prepare_enable() helper, which allows using it in that path too. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-6-hdegoede@redhat.com commit ef9f60daab309558c8bb3e086a9a11ee40bd6061 Author: Hans de Goede Date: Thu Sep 3 13:23:24 2020 +0200 pwm: lpss: Add range limit check for the base_unit register value When the user requests a high enough period ns value, then the calculations in pwm_lpss_prepare() might result in a base_unit value of 0. But according to the data-sheet the way the PWM controller works is that each input clock-cycle the base_unit gets added to a N bit counter and that counter overflowing determines the PWM output frequency. Adding 0 to the counter is a no-op. The data-sheet even explicitly states that writing 0 to the base_unit bits will result in the PWM outputting a continuous 0 signal. When the user requestes a low enough period ns value, then the calculations in pwm_lpss_prepare() might result in a base_unit value which is bigger then base_unit_range - 1. Currently the codes for this deals with this by applying a mask: base_unit &= (base_unit_range - 1); But this means that we let the value overflow the range, we throw away the higher bits and store whatever value is left in the lower bits into the register leading to a random output frequency, rather then clamping the output frequency to the highest frequency which the hardware can do. This commit fixes both issues by clamping the base_unit value to be between 1 and (base_unit_range - 1). Fixes: 684309e5043e ("pwm: lpss: Avoid potential overflow of base_unit") Reviewed-by: Andy Shevchenko Acked-by: Thierry Reding Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-5-hdegoede@redhat.com commit 181f4d2f44463fe09fe4df02e03095cb87151c29 Author: Hans de Goede Date: Thu Sep 3 13:23:23 2020 +0200 pwm: lpss: Fix off by one error in base_unit math in pwm_lpss_prepare() According to the data-sheet the way the PWM controller works is that each input clock-cycle the base_unit gets added to a N bit counter and that counter overflowing determines the PWM output frequency. So assuming e.g. a 16 bit counter this means that if base_unit is set to 1, after 65535 input clock-cycles the counter has been increased from 0 to 65535 and it will overflow on the next cycle, so it will overflow after every 65536 clock cycles and thus the calculations done in pwm_lpss_prepare() should use 65536 and not 65535. This commit fixes this. Note this also aligns the calculations in pwm_lpss_prepare() with those in pwm_lpss_get_state(). Note this effectively reverts commit 684309e5043e ("pwm: lpss: Avoid potential overflow of base_unit"). The next patch in this series really fixes the potential overflow of the base_unit value. Fixes: 684309e5043e ("pwm: lpss: Avoid potential overflow of base_unit") Reviewed-by: Andy Shevchenko Acked-by: Uwe Kleine-König Acked-by: Thierry Reding Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-4-hdegoede@redhat.com commit 15aa5e4c4328c4060cc662105a7b4c107a072ff3 Author: Hans de Goede Date: Thu Sep 3 13:23:22 2020 +0200 ACPI / LPSS: Save Cherry Trail PWM ctx registers only once (at activation) The DSDTs on most Cherry Trail devices have an ugly clutch where the PWM controller gets turned off from the _PS3 method of the graphics-card dev: Method (_PS3, 0, Serialized) // _PS3: Power State 3 { ... PWMB = PWMC /* \_SB_.PCI0.GFX0.PWMC */ PSAT |= 0x03 Local0 = PSAT /* \_SB_.PCI0.GFX0.PSAT */ ... } Where PSAT is the power-status register of the PWM controller. Since the i915 driver will do a pwm_get on the pwm device as it uses it to control the LCD panel backlight, there is a device-link marking the i915 device as a consumer of the pwm device. So that the PWM controller will always be suspended after the i915 driver suspends (which is the right thing to do). This causes the above GFX0 PS3 AML code to run before acpi_lpss.c calls acpi_lpss_save_ctx(). So on these devices the PWM controller will already be off when acpi_lpss_save_ctx() runs. This causes it to read/save all 1-s (0xffffffff) as ctx register values. When these bogus values get restored on resume the PWM controller actually keeps working, since most bits are reserved, but this does set bit 3 of the LPSS General purpose register, which for the PWM controller has the following function: "This bit is re-used to support 32kHz slow mode. Default is 19.2MHz as PWM source clock". This causes the clock of the PWM controller to switch from 19.2MHz to 32KHz, which is a slow-down of a factor 600. Surprisingly enough so far there have been few bug reports about this. This is likely because the i915 driver was hardcoding the PWM frequency to 46 KHz, which divided by 600 would result in a PWM frequency of approx. 78 Hz, which mostly still works fine. There are some bug reports about the LCD backlight flickering after suspend/resume which are likely caused by this issue. But with the upcoming patch-series to finally switch the i915 drivers code for external PWM controllers to use the atomic API and to honor the PWM frequency specified in the video BIOS (VBT), this becomes a much bigger problem. On most cases the VBT specifies either 200 Hz or 20 KHz as PWM frequency, which with the mentioned issue ends up being either 1/3 Hz, where the backlight actually visible blinks on and off every 3s, or in 33 Hz and horrible flickering of the backlight. There are a number of possible solutions to this problem: 1. Make acpi_lpss_save_ctx() run before GFX0._PS3 Pro: Clean solution from pov of not medling with save/restore ctx code Con: As mentioned the current ordering is the right thing to do Con: Requires assymmetry in at what suspend/resume phase we do the save vs restore, requiring more suspend/resume ordering hacks in already convoluted acpi_lpss.c suspend/resume code. 2. Do some sort of save once mode for the LPSS ctx Pro: Reasonably clean Con: Needs a new LPSS flag + code changes to handle the flag 3. Detect we have failed to save the ctx registers and do not restore them Pro: Not PWM specific, might help with issues on other LPSS devices too Con: If we can get away with not restoring the ctx why bother with it at all? 4. Do not save the ctx for CHT PWM controllers Pro: Clean, as simple as dropping a flag? Con: Not so simple as dropping a flag, needs a new flag to ensure that we still do lpss_deassert_reset() on device activation. 5. Make the pwm-lpss code fixup the LPSS-context registers Pro: Keeps acpi_lpss.c code clean Con: Moves knowledge of LPSS-context into the pwm-lpss.c code 1 and 5 both do not seem to be a desirable way forward. 3 and 4 seem ok, but they both assume that restoring the LPSS-context registers is not necessary. I have done a couple of test and those do show that restoring the LPSS-context indeed does not seem to be necessary on devices using s2idle suspend (and successfully reaching S0i3). But I have no hardware to test deep / S3 suspend. So I'm not sure that not restoring the context is safe. That leaves solution 2, which is about as simple / clean as 3 and 4, so this commit fixes the described problem by implementing a new LPSS_SAVE_CTX_ONCE flag and setting that for the CHT PWM controllers. Acked-by: Rafael J. Wysocki Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-3-hdegoede@redhat.com commit 5e31ee84c05239c2eb08250ed9858af117b55fe9 Author: Hans de Goede Date: Thu Sep 3 13:23:21 2020 +0200 ACPI / LPSS: Resume Cherry Trail PWM controller in no-irq phase The DSDTs on most Cherry Trail devices have an ugly clutch where the PWM controller gets poked from the _PS0 method of the graphics-card device: Local0 = PSAT /* \_SB_.PCI0.GFX0.PSAT */ If (((Local0 & 0x03) == 0x03)) { PSAT &= 0xFFFFFFFC Local1 = PSAT /* \_SB_.PCI0.GFX0.PSAT */ RSTA = Zero RSTF = Zero RSTA = One RSTF = One PWMB |= 0xC0000000 PWMC = PWMB /* \_SB_.PCI0.GFX0.PWMB */ } Where PSAT is the power-status register of the PWM controller, so if it is in D3 when the GFX0 device's PS0 method runs then it will turn it on and restore the PWM ctrl register value it saved from its PS3 handler. Note not only does it restore it, it ors it with 0xC0000000 turning it on at a time where we may not want it to get turned on at all. The pwm_get call which the i915 driver does to get a reference to the PWM controller, already adds a device-link making the GFX0 device a consumer of the PWM device. So it should already have been resumed when the above AML runs and the AML should thus not do its undesirable poking of the PWM controller register. But the PCI core powers on PCI devices in the no-irq resume phase and thus calls the troublesome PS0 method in the no-irq resume phase. Where as LPSS devices by default are resumed in the early resume phase. This commit sets the resume_from_noirq flag in the bsw_pwm_dev_desc struct, so that Cherry Trail PWM controllers will be resumed in the no-irq phase. Together with the device-link added by the pwm-get this ensures that the PWM controller will be on when the troublesome PS0 method runs, which stops it from poking the PWM controller. Acked-by: Rafael J. Wysocki Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-2-hdegoede@redhat.com commit 1b0ce63bc08eb65c85b3546c21e7715ccfbd6107 Author: Chun-Kuang Hu Date: Sun Mar 22 22:56:06 2020 +0800 MAINTAINERS: add files for Mediatek DRM drivers Mediatek HDMI phy driver is moved from drivers/gpu/drm/mediatek to drivers/phy/mediatek, so add the new folder to the Mediatek DRM drivers' information. Signed-off-by: Chun-Kuang Hu Reviewed-by: Matthias Brugger Acked-by: Chunfeng Yun commit b28be59a2e2668b35507553e0de135c29ebd71ef Author: CK Hu Date: Mon May 13 10:22:25 2019 +0800 phy: mediatek: Move mtk_hdmi_phy driver into drivers/phy/mediatek folder mtk_hdmi_phy is currently placed inside mediatek drm driver, but it's more suitable to place a phy driver into phy driver folder, so move mtk_hdmi_phy driver into phy driver folder. Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu Acked-by: Chunfeng Yun Tested-by: Frank Wunderlich commit a481bf2f0ca43c6476229d5bc4c3f6b9404de863 Author: CK Hu Date: Fri May 10 16:47:15 2019 +0800 drm/mediatek: Separate mtk_hdmi_phy to an independent module mtk_hdmi_phy is a part of mtk_hdmi module, but phy driver should be an independent module rather than be part of drm module, so separate the phy driver to an independent module. Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu Tested-by: Frank Wunderlich commit 96f51a4d43508e7d916caac02e382123d299c0d7 Author: CK Hu Date: Thu May 9 10:21:37 2019 +0800 drm/mediatek: Move tz_disabled from mtk_hdmi_phy to mtk_hdmi driver tz_disabled is used to control mtk_hdmi output signal, but this variable is stored in mtk_hdmi_phy and mtk_hdmi_phy does not use it. So move tz_disabled to mtk_hdmi where it's used. Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu Tested-by: Frank Wunderlich commit be239c4d5e3e4dce361e516b307ae117ee71e5cb Author: Wang Hai Date: Fri Sep 4 21:01:57 2020 +0800 NFC: digital: Remove two unused macroes DIGITAL_NFC_DEP_REQ_RES_TAILROOM is never used after it was introduced. DIGITAL_NFC_DEP_REQ_RES_HEADROOM is no more used after below commit e8e7f4217564 ("NFC: digital: Remove useless call to skb_reserve()") Remove them. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Jakub Kicinski commit 877c3474025f977208da491d34bf15f0e015d724 Author: Wang Hai Date: Fri Sep 4 20:58:58 2020 +0800 caif: Remove duplicate macro SRVL_CTRL_PKT_SIZE Remove SRVL_CTRL_PKT_SIZE which is defined more than once. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Jakub Kicinski commit e799151814d5ecde28d1ea450bea6543c0363c02 Author: Lukas Bulwahn Date: Sat Sep 5 12:37:00 2020 +0200 MAINTAINERS: repair reference in LYNX PCS MODULE Commit 0da4c3d393e4 ("net: phy: add Lynx PCS module") added the files in ./drivers/net/pcs/, but the new LYNX PCS MODULE section refers to ./drivers/net/phy/. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: drivers/net/phy/pcs-lynx.c Repair the LYNX PCS MODULE section by referring to the right location. Signed-off-by: Lukas Bulwahn Reviewed-by: Andrew Lunn Acked-by: Ioana Ciornei Signed-off-by: Jakub Kicinski commit 35b237a51f4e04a3b07e6047bcf3b491997f0ef5 Merge: 447a851bdb1a3 771089c2a4859 Author: Jakub Kicinski Date: Sat Sep 5 13:09:16 2020 -0700 Merge branch 'net-dsa-bcm_sf2-Ensure-MDIO-diversion-is-used' Florian Fainelli says: ==================== net: dsa: bcm_sf2: Ensure MDIO diversion is used Changes in v2: - export of_update_property() to permit building bcm_sf2 as a module - provided a better explanation of the problem being solved after explaining it to Andrew during the v1 review ==================== Signed-off-by: Jakub Kicinski commit 771089c2a485958e423f305e974303760167b45c Author: Florian Fainelli Date: Fri Sep 4 14:37:30 2020 -0700 net: dsa: bcm_sf2: Ensure that MDIO diversion is used Registering our slave MDIO bus outside of the OF infrastructure is necessary in order to avoid creating double references of the same Device Tree nodes, however it is not sufficient to guarantee that the MDIO bus diversion is used because of_phy_connect() will still resolve to a valid PHY phandle and it will connect to the PHY using its parent MDIO bus which is still the SF2 master MDIO bus. The reason for that is because BCM7445 systems were already shipped with a Device Tree blob looking like this (irrelevant parts omitted for simplicity): ports { #address-cells = <1>; #size-cells = <0>; port@1 { phy-mode = "rgmii-txid"; phy-handle = <&phy0>; reg = <1>; label = "rgmii_1"; }; ... mdio@403c0 { ... phy0: ethernet-phy@0 { broken-turn-around; device_type = "ethernet-phy"; max-speed = <0x3e8>; reg = <0>; compatible = "brcm,bcm53125", "ethernet-phy-ieee802.3-c22"; }; }; There is a hardware issue with chip revisions (Dx) that lead to the development of the following commits: 461cd1b03e32 ("net: dsa: bcm_sf2: Register our slave MDIO bus") 536fab5bf582 ("net: dsa: bcm_sf2: Do not register slave MDIO bus with OF") b8c6cd1d316f ("net: dsa: bcm_sf2: do not use indirect reads and writes for 7445E0") There should have been an internal MDIO bus node created for the chip revision (Dx) that suffers from this problem, but it did not happen back then. Had that happen, that we should have correctly parented phy@0 (bcm53125 below) as child node of the internal MDIO bus, but the production Device Tree blob that was shipped with the firmware targeted the fixed version of the chip, despite both the affected and corrected chips being shipped into production. The problem is that of_phy_connect() for port@1 will happily resolve the 'phy-handle' from the mdio@403c0 node, which bypasses the diversion completely. This results in this double programming that the diversion refers to and aims to avoid. In order to force of_phy_connect() to fail, and have DSA call to dsa_slave_phy_connect(), we must deactivate ethernet-phy@0 from mdio@403c0, and the best way to do that is by removing the phandle property completely. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 0f7c5317b89058e432d3e97efa19467ff4c3b86b Author: Florian Fainelli Date: Fri Sep 4 14:37:29 2020 -0700 of: Export of_remove_property() to modules We will need to remove some OF properties in drivers/net/dsa/bcm_sf2.c with a subsequent commit. Export of_remove_property() to modules so we can keep bcm_sf2 modular and provide an empty stub for when CONFIG_OF is disabled to maintain the ability to compile test. Signed-off-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Jakub Kicinski commit 447a851bdb1a3b329fb01f66c467c2e6888af72b Merge: 44a8c4f33c007 337792a2d6464 Author: Jakub Kicinski Date: Sat Sep 5 12:25:17 2020 -0700 Merge branch 'sfc-TXQ-refactor' Edward Cree says: ==================== sfc: TXQ refactor Refactor and unify partner-TXQ handling in the EF100 and legacy drivers. The main thrust of this series is to remove from the legacy (Siena/EF10) driver the assumption that a netdev TX queue has precisely two hardware TXQs (checksummed and unchecksummed) associated with it, so that in future we can have more (e.g. for handling inner-header checksums) or fewer (e.g. to free up hardware queues for XDP usage). Changes from v1: * better explain patch #1 in the commit message, and rename xmit_more_available to xmit_pending * add new patch #2 applying the same approach to ef100, for consistency ==================== Signed-off-by: Jakub Kicinski commit 337792a2d6464756b2b6a381e2d99cdd54a528a1 Author: Edward Cree Date: Thu Sep 3 22:35:37 2020 +0100 sfc: remove efx_tx_queue_partner All users of this function are now gone. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 8be41842c5303726d55240e16b9340311ad7cacd Author: Edward Cree Date: Thu Sep 3 22:35:29 2020 +0100 sfc: rewrite efx_tx_may_pio Use efx_for_each_channel_tx_queue() rather than efx_tx_queue_partner(). Make some related simplifications of efx_nic_tx_is_empty() to remove entry points that aren't used. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 0d8c122907d96448495700fa2c6229ab519f3252 Author: Edward Cree Date: Thu Sep 3 22:35:13 2020 +0100 sfc: use efx_channel_tx_[old_]fill_level() in Siena/EF10 TX datapath Instead of open-coding the calculation with efx_tx_queue_partner(), use the functions that iterate over numbers of queues other than 2 with efx_for_each_channel_tx_queue(). Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 5374d6024cd47e028f96a382104b2653f010b430 Author: Edward Cree Date: Thu Sep 3 22:34:57 2020 +0100 sfc: use tx_queue->old_read_count in EF100 TX path As in the Siena/EF10 case, it minimises cacheline ping-pong between the TX and completion paths. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 8cb2675634ab8ec7986aa9dfe1a7a934872ef51d Author: Edward Cree Date: Thu Sep 3 22:34:42 2020 +0100 sfc: make ef100 xmit_more handling look more like ef10's This should cause no functional change; merely make there only be one design of xmit_more handling to understand. As with the EF10/Siena version, we set tx_queue->xmit_pending when we queue up a TX, and clear it when we ring the doorbell (in ef100_notify_tx_desc). While we're at it, make ef100_notify_tx_desc static since nothing outside of ef100_tx.c uses it. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 1c0544d24927e4fad04f858216b8ea767a3bd123 Author: Edward Cree Date: Thu Sep 3 22:34:15 2020 +0100 sfc: add and use efx_tx_send_pending in tx.c Instead of using efx_tx_queue_partner(), which relies on the assumption that tx_queues_per_channel is 2, efx_tx_send_pending() iterates over txqs with efx_for_each_channel_tx_queue(). We unconditionally set tx_queue->xmit_pending (renamed from xmit_more_available), then condition on xmit_more for the call to efx_tx_send_pending(), which will clear xmit_pending. Thus, after an xmit_more TX, the doorbell is un-rung and xmit_pending is true. Signed-off-by: Edward Cree Signed-off-by: Jakub Kicinski commit 7c9dc603d55617edcc3190f9a6d7b5cf763feb57 Author: Denis Efremov Date: Tue Sep 1 12:48:12 2020 +0300 coccinelle: misc: add uninitialized_var.cocci script uninitialized_var() macro was removed from the sources [1] and other warning-silencing tricks were deprecated [2]. The purpose of this cocci script is to prevent new occurrences of uninitialized_var() open-coded variants. [1] commit 63a0895d960a ("compiler: Remove uninitialized_var() macro") [2] commit 4b19bec97c88 ("docs: deprecated.rst: Add uninitialized_var()") Cc: Kees Cook Cc: Gustavo A. R. Silva Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 76f50ad9b1503bc5bd2eb80c1e97149cbbf1d3f1 Author: Marek Szyprowski Date: Fri Sep 4 15:17:07 2020 +0200 staging: tegra-vde: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200904131711.12950-27-m.szyprowski@samsung.com Signed-off-by: Greg Kroah-Hartman commit e8a3d7064c34a02b86c0e512644e8c1d790464d6 Author: Krzysztof Kozlowski Date: Fri Sep 4 08:27:43 2020 +0200 ARM: dts: imx28-m28: Align GPMI NAND node name with schema Device tree schema expects NAND controller to be named "nand-controller", otherwise dtbs_check complain with a warning like: arch/arm/boot/dts/imx28-eukrea-mbmx283lc.dt.yaml: gpmi-nand@8000c000: $nodename:0: 'gpmi-nand@8000c000' does not match '^nand-controller(@.*)?' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit f3e7dae323ab9226974d94d6b40f801d9f2091b0 Author: Marco Felsch Date: Mon Aug 31 15:30:18 2020 +0200 ARM: dts: imx6qdl: add enet_out clk support Like the other i-MX devices the i.MX6 family can output the enet tx clock on the pad to feed the connected device. Add the missing clk here to avoid local fixups like: arch/arm/boot/dts/imx6qdl-tx6.dtsi. Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo commit d77a99a8a853ef18334b2777eef4cf931944036e Author: Marco Felsch Date: Mon Aug 31 15:27:49 2020 +0200 ARM: dts: imx6qdl: move iomuxc compatible assignment out of root node The common imx6qdl.dtsi already defines the iomuxc phandle. Make use of it in the imx6dl.dtsi and imx6q.dtsi. Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo commit ed13ffc597e6395b4bf20d04b66035c73a6ee86d Author: Krzysztof Kozlowski Date: Sat Aug 29 11:40:24 2020 +0200 ARM: dts: vf: Fix PCA95xx GPIO expander properties on ZII CFU1 The PCA95xx GPIO expander requires GPIO controller properties to operate properly. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit e3e61bce5f0851592a1ac62efdac78b5aaa4c09c Author: Krzysztof Kozlowski Date: Wed Sep 2 18:32:23 2020 +0200 arm64: dts: imx8mm-var-som: Add 32.768 kHz clock to PMIC The ROHM BD71847 PMIC has a 32.768 kHz clock. Adding necessary parent allows to probe the bd718x7 clock driver fixing boot errors: bd718xx-clk bd71847-clk.1.auto: No parent clk found bd718xx-clk: probe of bd71847-clk.1.auto failed with error -22 Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit b154d8d8ba19ede98c87c6462fdbd033ca51ffa9 Author: Fabio Estevam Date: Wed Sep 2 09:49:52 2020 -0300 ARM: imx: Remove ehci board files Now that the i.MX board files have been removed, there is no need for keeping the ehci related files, so just remove them. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit e1324ece2af442f60f77c42b141db6549fda6afd Author: Fabio Estevam Date: Wed Sep 2 09:49:51 2020 -0300 ARM: imx: Remove i.MX35 board files i.MX35 has basic device tree support. To achieve the goal of converting all i.MX SoCs to a devicetree-only platform, remove imx35 board files. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit c93197b0041d7c48263228bffb4520b7c066e02f Author: Fabio Estevam Date: Wed Sep 2 09:49:50 2020 -0300 ARM: imx: Remove i.MX31 board files i.MX31 has basic device tree support. To achieve the goal of converting all i.MX SoCs to a devicetree-only platform, remove imx31 board files. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 879c0e5e0ac711603b89b711c7b54213c0c17147 Author: Fabio Estevam Date: Wed Sep 2 09:49:49 2020 -0300 ARM: imx: Remove i.MX27 board files i.MX27 has basic device tree support. To achieve the goal of converting all i.MX SoCs to a devicetree-only platform, remove imx27 board files. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 4b563a066611f4b137ea28533b9783a492cb1e12 Author: Fabio Estevam Date: Wed Sep 2 09:49:48 2020 -0300 ARM: imx: Remove imx21 support mx21 has not been converted to device tree yet and there is only one single board that is supported (imx21ads). To achieve the goal of converting all i.MX SoCs to devicetree-only platforms, remove imx21 support. If someone is interested in supporting imx21, patches to add imx21 devicetree support will be welcome. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit a1172ceb52e68470389091b5248377ab95015006 Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:50 2020 +0200 arm64: dts: imx8qxp-colibri: Align pin configuration group names with schema Device tree schema expects pin configuration groups to end with 'grp' suffix, otherwise dtbs_check complain with a warning like: ... do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit f05b12564d11fe5591bbc039847045248be562e5 Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:49 2020 +0200 arm64: dts: imx8mq-hummingboard-pulse: Align pin configuration group names with schema Device tree schema expects pin configuration groups to end with 'grp' suffix, otherwise dtbs_check complain with a warning like: ... do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 32e67c15b6db796938be47145d6052d3ccceb4e3 Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:48 2020 +0200 arm64: dts: imx8mq-sr-som: Align pin configuration group names with schema Device tree schema expects pin configuration groups to end with 'grp' suffix, otherwise dtbs_check complain with a warning like: ... do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 02485f4aa1bd9e85756d17a1b6ba6fcae9de345c Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:47 2020 +0200 arm64: dts: imx8mq-pico-pi: Align pin configuration group names with schema Device tree schema expects pin configuration groups to end with 'grp' suffix, otherwise dtbs_check complain with a warning like: ... do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit cf551b1f44486f7c361c4cf81b7b50a8dbf46d92 Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:46 2020 +0200 arm64: dts: imx8mq-phanbell: Align pin configuration group names with schema Device tree schema expects pin configuration groups to end with 'grp' suffix, otherwise dtbs_check complain with a warning like: ... do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit ae560c43c824ce2c3c0349dff60a2fc210909f24 Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:45 2020 +0200 arm64: dts: imx8mq-librem5-devkit: Align pin configuration group names with schema Device tree schema expects pin configuration groups to end with 'grp' suffix, otherwise dtbs_check complain with a warning like: ... do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit ad5260e07c1aff916e4aec2a2907fab83fe85975 Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:44 2020 +0200 arm64: dts: imx8mq-evk: Align pin configuration group names with schema Device tree schema expects pin configuration groups to end with 'grp' suffix, otherwise dtbs_check complain with a warning like: ... do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit a09854718247e070f5e69670a6ae73e158224503 Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:43 2020 +0200 arm64: dts: imx8mn-evk: Align pin configuration group names with schema Device tree schema expects pin configuration groups to end with 'grp' suffix, otherwise dtbs_check complain with a warning like: ... do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 9cfa2dda4b81c7872cda9a635e16675b70fa2e7f Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:42 2020 +0200 arm64: dts: imx8mn-ddr4-evk: Align regulator names with schema Device tree schema expects regulator names to be lowercase. Changing to lowercase has multiple effects: 1. LDO6 supply is now properly configured, because regulator driver looks for supplies by lowercase name, 2. User-visible names via sysfs or debugfs are now lowercase, 2. dtbs_check warnings are fixed: pmic@4b: regulators:LDO1:regulator-name:0: 'LDO1' does not match '^ldo[1-6]$' Signed-off-by: Krzysztof Kozlowski Acked-By: Matti Vaittinen Signed-off-by: Shawn Guo commit a304ae85b9db6b1ba01b17f3c53b9fd7d091f62f Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:41 2020 +0200 arm64: dts: imx8mm-ddr4-evk: Align pin configuration group names with schema Device tree schema expects pin configuration groups to end with 'grp' suffix, otherwise dtbs_check complain with a warning like: ... do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit fc54664e0bbfea639e720e838b48298fbaf59af4 Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:40 2020 +0200 arm64: dts: imx8mm-evk: Align pin configuration group names with schema Device tree schema expects pin configuration groups to end with 'grp' suffix, otherwise dtbs_check complain with a warning like: ... do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit a6a355ede5747b668da056fbacdb75ac1ea71fc4 Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:39 2020 +0200 arm64: dts: imx8mm-evk: Add 32.768 kHz clock to PMIC The ROHM BD71847 PMIC has a 32.768 kHz clock. Adding necessary parent allows to probe the bd718x7 clock driver fixing boot errors: bd718xx-clk bd71847-clk.1.auto: No parent clk found bd718xx-clk: probe of bd71847-clk.1.auto failed with error -22 Signed-off-by: Krzysztof Kozlowski Acked-By: Matti Vaittinen Signed-off-by: Shawn Guo commit 0a96ec9bddd1622267e42b75994f21615a5d1f85 Author: Krzysztof Kozlowski Date: Fri Aug 28 18:47:37 2020 +0200 arm64: dts: imx8mm-beacon: Align pin configuration group names with schema Device tree schema expects pin configuration groups to end with 'grp' suffix. This fixes dtbs_check warnings like: pinctrl@30330000: 'pcal6414-gpio', 'pmicirq', 'usdhc1grp100mhz', 'usdhc1grp200mhz', 'usdhc1grpgpio', 'usdhc2grp100mhz', 'usdhc2grp200mhz', 'usdhc2grpgpio', 'usdhc3grp100mhz', 'usdhc3grp200mhz' do not match any of the regexes: 'grp$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 612a392fc04eed6b7ed1752f706fb40c6ad0bbb0 Author: Jacky Bai Date: Mon Aug 31 17:14:12 2020 +0800 dt-bindings: arm: fsl: Add imx8mm ddr4 evk board Add entry for i.MX8MM DDR4 EVK board and update the comments for imx8mm-evk as it is populated with LPDDR4. Signed-off-by: Jacky Bai Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 7e767ab5c43d993c88363761333b12e2a9b0a5ec Author: Jacky Bai Date: Mon Aug 31 17:14:14 2020 +0800 arm64: dts: imx8mm: Add imx8mm ddr4 evk board support Add the board dts support for i.MX8MM DDR4 EVK board. Signed-off-by: Jacky Bai Signed-off-by: Shawn Guo commit aa71d0648318eee0ac986eb2700e40cefbfb11d0 Author: Jacky Bai Date: Mon Aug 31 17:14:13 2020 +0800 arm64: dts: imx8mm: Split the imx8mm evk board dts to a common dtsi There are two type of i.MX8MM EVK board, one is populated with LPDDR4(default dts), and one is populated with DDR4. these two boards share most of the board design, but still have some difference. imx8mm-evk has emmc support, imx8mm-ddr4-evk has gpmi nand support. And also, the BT/WIFI module is different. So move the common dts part into imx8mm-evk.dtsi for reuse. Signed-off-by: Jacky Bai Signed-off-by: Shawn Guo commit 44a8c4f33c0073ca614db79f22e023811bdd0f3c Merge: 3ab1270bfa1e8 c70672d8d316e Author: Jakub Kicinski Date: Fri Sep 4 21:18:58 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net We got slightly different patches removing a double word in a comment in net/ipv4/raw.c - picked the version from net. Simple conflict in drivers/net/ethernet/ibm/ibmvnic.c. Use cached values instead of VNIC login response buffer (following what commit 507ebe6444a4 ("ibmvnic: Fix use-after-free of VNIC login response buffer") did). Signed-off-by: Jakub Kicinski commit c71e805083af55e0c8eae33bb0653d0105556625 Author: Moritz Fischer Date: Fri Sep 4 20:24:07 2020 -0700 fpga: fpga-region: Cleanup an outdated comment Clean up an outdated comment claiming FPGA regions implement devicetree support for reprogramming FPGAs. Signed-off-by: Moritz Fischer commit 9c7016f1ca6d5126ae6fb616114f63b3dc4ce830 Author: Andreas Kemnade Date: Wed Aug 26 22:42:51 2020 +0200 ARM: dts: imx: add devicetree for Tolino Shine 2 HD This adds a devicetree for the Tolino Shine 2 HD Ebook reader. It is based on boards marked with "37NB-E60QF0+4A2". It is equipped with an i.MX6SL SoC. Expected to work: - Buttons - Wifi - Touchscreen - LED - uSD - USB - RTC Not working due to missing drivers: - Backlight (requires NTXEC driver) - EPD Not working due to unknown reasons: - deep sleep (echo standby >/sys/power/state works), wakeup fails when imx_gpc_pre_suspend(true) was called. Signed-off-by: Andreas Kemnade Reviewed-by: Jonathan Neuschäfer Signed-off-by: Shawn Guo commit 1bd3fe23ffcab2e271416282fa34a17a7c694c19 Author: Andreas Kemnade Date: Wed Aug 26 22:42:50 2020 +0200 dt-bindings: arm: fsl: add compatible string for Tolino Shine 2 HD This adds a compatible string for the Tolino Shine 2 HD eBook reader. Signed-off-by: Andreas Kemnade Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 0c11bbcf0229cdf3993c01cbd366513437b11f09 Author: Fabio Estevam Date: Tue Aug 25 23:16:21 2020 -0300 ARM: imx: Place "Cortex-A/Cortex-M" comment in the correct location The menu comment "Cortex-A/Cortex-M asymmetric multiprocessing platforms" appears when running: make imx_v4_v5_defconfig make menuconfig System Type ---> [*] Freescale i.MX family ---> This is not correct as imx_v4_v5_defconfig does not select any Cortex-A or Cortex-M platforms. Move the comment under the correct symbol ifdefery to fix this problem. Fixes: 8064887e02fd ("ARM: vf610: enable Cortex-M4 configuration on Vybrid SoC") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit ec219f1ba23777c84e913b08e192413eea22d220 Author: Linus Walleij Date: Mon Aug 17 23:39:06 2020 +0200 drm/panel: s6e63m0: Order enable/disable sequence The upstream S6E63M0 driver has some peculiarities around the prepare/enable disable/unprepare sequence: the screen is taken out of sleep in prepare() as part of s6e63m0_init() the put to on with MIPI_DCS_SET_DISPLAY_ON in enable(). However it is just put into sleep mode directly in disable(). As disable()/enable() can be called without unprepare()/prepare() being called, this is unbalanced, we should take the display out of sleep in enable() then turn it off(). Further MIPI_DCS_SET_DISPLAY_OFF is never called balanced with MIPI_DCS_SET_DISPLAY_ON. The vendor driver for Samsung GT-I8190 (Golden) does all of these things in strict order. Augment the driver to do exit sleep/set display on in enable() and set display off/enter sleep in disable(). Further send an explicit reset pulse in power_on() so we come up in a known state, and issue the MCS_ERROR_CHECK command after setting display on like the vendor driver does. Also use the timings from the vendor driver in the sequence. Doing all of these things makes the display much more stable on the Samsung GT-I8190 when enabling/disabling the display pipeline. Signed-off-by: Linus Walleij Acked-by: Sam Ravnborg Cc: Paweł Chmiel Cc: Stephan Gerhold Link: https://patchwork.freedesktop.org/patch/msgid/20200817213906.88207-1-linus.walleij@linaro.org commit 83ba7a7b3d4a70fe92122f039539566c9526228c Author: Linus Walleij Date: Sun Aug 9 23:51:04 2020 +0200 drm/panel: s6e63m0: Add code to identify panel We add code to identify a few different panels mounted on the s6e63m0 controller. This is necessary to achieve the proper biasing with DSI versions of the panel. Signed-off-by: Linus Walleij Tested-by: Stephan Gerhold Cc: Paweł Chmiel Acked-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20200809215104.1830206-5-linus.walleij@linaro.org commit 91867ac7d6724c31f32c3a63e2bb5db978893eaf Author: Linus Walleij Date: Sun Aug 9 23:51:03 2020 +0200 drm/panel: s6e63m0: Add reading functionality This adds code to send read commands to read a single byte from the display, in order to perform MTP ID look-up of the mounted panel on the s6e63m0 controller. This is needed for proper biasing on the DSI variants. Signed-off-by: Linus Walleij Tested-by: Stephan Gerhold Cc: Paweł Chmiel Acked-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20200809215104.1830206-4-linus.walleij@linaro.org commit 93921baa3f6ff77e57d7e772165aa7bd709b5387 Author: Colin Ian King Date: Mon Aug 10 08:55:08 2020 +0100 x86/resctrl: Fix spelling in user-visible warning messages Fix spelling mistake "Could't" -> "Couldn't" in user-visible warning messages. [ bp: Massage commit message; s/cpu/CPU/g ] Signed-off-by: Colin Ian King Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200810075508.46490-1-colin.king@canonical.com commit 435e06c06cb2e3bd2f650a52641ddb13a95a1624 Author: Linus Walleij Date: Sun Aug 9 23:51:02 2020 +0200 drm/panel: s6e63m0: Add DSI transport This makes it possible to use the s6e63m0 panel with a DSI host, such as in the Samsung GT-I8190 (Golden) mobile phone. Signed-off-by: Linus Walleij Tested-by: Stephan Gerhold Cc: Stephan Gerhold Cc: Paweł Chmiel Acked-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20200809215104.1830206-3-linus.walleij@linaro.org commit b7b23e4476872d80b7d70cd24e158a0505fdad5f Author: Linus Walleij Date: Sun Aug 9 23:51:01 2020 +0200 drm/panel: s6e63m0: Break out SPI transport This panel can be accessed using both SPI and DSI. To make it possible to probe and use the device also from a DSI bus, first break out the SPI support to its own file. Since all the panel driver does is write DCS commands to the panel, we pass a DCS write function to probe() from each subdriver. We make the Kconfig entry for SPI mode default so all current users will continue to work. Signed-off-by: Linus Walleij Tested-by: Stephan Gerhold Cc: Paweł Chmiel Acked-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/384873/ commit 091353c88b3b4358aa5a0ec07bf53a2f2ac77206 Author: Florian Fainelli Date: Fri Oct 25 11:18:06 2019 -0700 soc: bcm: brcmstb: biuctrl: Change RAC prefetch distance from +/-1 to +/- 2 Change the RAC prefetch distance from +/- 1 to +/- 2 for Cortex-A72 CPUs since this provides an average of a 3.8% performance increase for synthetic memcpy benchmarks. Signed-off-by: Florian Fainelli commit 4029f3b419dad519fcb0b7233cc24ae242d33651 Author: Florian Fainelli Date: Fri Feb 28 11:32:26 2020 -0800 soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72165 72165 uses a Brahma-B53 CPU and its Bus Interface Unit, tune it according to the existing values we have. Signed-off-by: Florian Fainelli commit 5dfd145aada85d37638e820775e457a78d70a7e0 Author: Florian Fainelli Date: Tue Feb 18 16:14:11 2020 -0800 soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72164 72164 uses a Brahma-B53 CPU and its Bus Interface Unit, tune it according to the existing values we have. Signed-off-by: Florian Fainelli commit 4e5cafa8b3ea45cb17aa6b538fb439abefc0029e Author: Florian Fainelli Date: Fri Feb 28 11:31:43 2020 -0800 ARM: brcmstb: Add debug UART entry for 72615 72165 has the same memory map as 7278 and the same physical address for the UART, alias the definition accordingly. Signed-off-by: Florian Fainelli commit 4751bddd3f983af2004ec470ca38b42d7a8a53bc Author: Arnaldo Carvalho de Melo Date: Fri Sep 4 17:11:59 2020 -0300 perf tools: Make GTK2 support opt-in This is bitrotting, nobody is stepping up to work on it, and since we treat warnings as errors, feature detection is failing in its main, faster test (tools/build/feature/test-all.c) because of the GTK+2 infobar check. So make this opt-in, at some point ditch this if nobody volunteers to take care of this. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 09b54b30ccdcd3e17cc13079f581b1a389b04939 Author: Kim Phillips Date: Tue Sep 1 17:09:44 2020 -0500 perf vendor events amd: Enable Family 19h users by matching Zen2 events This enables zen3 users by reusing mostly-compatible zen2 events until the official public list of zen3 events is published in a future PPR. Signed-off-by: Kim Phillips Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Borislav Petkov Cc: Jin Yao Cc: Jiri Olsa Cc: John Garry Cc: Jon Grimm Cc: Kan Liang Cc: Mark Rutland Cc: Martin Jambor Cc: Martin Liška Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vijay Thakkar Cc: William Cohen Cc: Yunfeng Ye Link: http://lore.kernel.org/lkml/20200901220944.277505-4-kim.phillips@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 08ed77e414ab234258166f5628d91a7a0e681ff4 Author: Kim Phillips Date: Tue Sep 1 17:09:43 2020 -0500 perf vendor events amd: Add recommended events Add support for events listed in Section 2.1.15.2 "Performance Measurement" of "PPR for AMD Family 17h Model 31h B0 - 55803 Rev 0.54 - Sep 12, 2019". perf now supports these new events (-e): all_dc_accesses all_tlbs_flushed l1_dtlb_misses l2_cache_accesses_from_dc_misses l2_cache_accesses_from_ic_misses l2_cache_hits_from_dc_misses l2_cache_hits_from_ic_misses l2_cache_misses_from_dc_misses l2_cache_misses_from_ic_miss l2_dtlb_misses l2_itlb_misses sse_avx_stalls uops_dispatched uops_retired l3_accesses l3_misses and these metrics (-M): branch_misprediction_ratio all_l2_cache_accesses all_l2_cache_hits all_l2_cache_misses ic_fetch_miss_ratio l2_cache_accesses_from_l2_hwpf l2_cache_hits_from_l2_hwpf l2_cache_misses_from_l2_hwpf l3_read_miss_latency l1_itlb_misses all_remote_links_outbound nps1_die_to_dram The nps1_die_to_dram event may need perf stat's --metric-no-group switch if the number of available data fabric counters is less than the number it uses (8). Committer testing: On a AMD Ryzen 3900x system: Before: # perf list all_dc_accesses all_tlbs_flushed l1_dtlb_misses l2_cache_accesses_from_dc_misses l2_cache_accesses_from_ic_misses l2_cache_hits_from_dc_misses l2_cache_hits_from_ic_misses l2_cache_misses_from_dc_misses l2_cache_misses_from_ic_miss l2_dtlb_misses l2_itlb_misses sse_avx_stalls uops_dispatched uops_retired l3_accesses l3_misses | grep -v "^Metric Groups:$" | grep -v "^$" # After: # perf list all_dc_accesses all_tlbs_flushed l1_dtlb_misses l2_cache_accesses_from_dc_misses l2_cache_accesses_from_ic_misses l2_cache_hits_from_dc_misses l2_cache_hits_from_ic_misses l2_cache_misses_from_dc_misses l2_cache_misses_from_ic_miss l2_dtlb_misses l2_itlb_misses sse_avx_stalls uops_dispatched uops_retired l3_accesses l3_misses | grep -v "^Metric Groups:$" | grep -v "^$" | grep -v "^recommended:$" all_dc_accesses [All L1 Data Cache Accesses] all_tlbs_flushed [All TLBs Flushed] l1_dtlb_misses [L1 DTLB Misses] l2_cache_accesses_from_dc_misses [L2 Cache Accesses from L1 Data Cache Misses (including prefetch)] l2_cache_accesses_from_ic_misses [L2 Cache Accesses from L1 Instruction Cache Misses (including prefetch)] l2_cache_hits_from_dc_misses [L2 Cache Hits from L1 Data Cache Misses] l2_cache_hits_from_ic_misses [L2 Cache Hits from L1 Instruction Cache Misses] l2_cache_misses_from_dc_misses [L2 Cache Misses from L1 Data Cache Misses] l2_cache_misses_from_ic_miss [L2 Cache Misses from L1 Instruction Cache Misses] l2_dtlb_misses [L2 DTLB Misses & Data page walks] l2_itlb_misses [L2 ITLB Misses & Instruction page walks] sse_avx_stalls [Mixed SSE/AVX Stalls] uops_dispatched [Micro-ops Dispatched] uops_retired [Micro-ops Retired] l3_accesses [L3 Accesses. Unit: amd_l3] l3_misses [L3 Misses (includes Chg2X). Unit: amd_l3] # # perf stat -a -e all_dc_accesses,all_tlbs_flushed,l1_dtlb_misses,l2_cache_accesses_from_dc_misses,l2_cache_accesses_from_ic_misses,l2_cache_hits_from_dc_misses,l2_cache_hits_from_ic_misses,l2_cache_misses_from_dc_misses,l2_cache_misses_from_ic_miss,l2_dtlb_misses,l2_itlb_misses,sse_avx_stalls,uops_dispatched,uops_retired,l3_accesses,l3_misses sleep 2 Performance counter stats for 'system wide': 433,439,949 all_dc_accesses (35.66%) 443 all_tlbs_flushed (35.66%) 2,985,885 l1_dtlb_misses (35.66%) 18,318,019 l2_cache_accesses_from_dc_misses (35.68%) 50,114,810 l2_cache_accesses_from_ic_misses (35.72%) 12,423,978 l2_cache_hits_from_dc_misses (35.74%) 40,703,103 l2_cache_hits_from_ic_misses (35.74%) 6,698,673 l2_cache_misses_from_dc_misses (35.74%) 12,090,892 l2_cache_misses_from_ic_miss (35.74%) 614,267 l2_dtlb_misses (35.74%) 216,036 l2_itlb_misses (35.74%) 11,977 sse_avx_stalls (35.74%) 999,276,223 uops_dispatched (35.73%) 1,075,311,620 uops_retired (35.69%) 1,420,763 l3_accesses 540,164 l3_misses 2.002344121 seconds time elapsed # perf stat -a -e all_dc_accesses,all_tlbs_flushed,l1_dtlb_misses,l2_cache_accesses_from_dc_misses,l2_cache_accesses_from_ic_misses sleep 2 Performance counter stats for 'system wide': 175,943,104 all_dc_accesses 310 all_tlbs_flushed 2,280,359 l1_dtlb_misses 11,700,151 l2_cache_accesses_from_dc_misses 25,414,963 l2_cache_accesses_from_ic_misses 2.001957818 seconds time elapsed # Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Kim Phillips Acked-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Borislav Petkov Cc: Jin Yao Cc: Jiri Olsa Cc: John Garry Cc: Jon Grimm Cc: Kan Liang Cc: Mark Rutland Cc: Martin Jambor Cc: Martin Liška Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vijay Thakkar Cc: William Cohen Cc: Yunfeng Ye Link: http://lore.kernel.org/lkml/20200901220944.277505-3-kim.phillips@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit ab22eea35f1f120c4a379aa26e5333e7e41bb303 Author: Kim Phillips Date: Tue Sep 1 17:09:42 2020 -0500 perf vendor events amd: Add ITLB Instruction Fetch Hits event for zen1 The ITLB Instruction Fetch Hits event isn't documented even in later zen1 PPRs, but it seems to count correctly on zen1 hardware. Add it to zen1 group so zen1 users can use the upcoming IC Fetch Miss Ratio Metric. The IF1G, 1IF2M, IF4K (Instruction fetches to a 1 GB, 2 MB, and 4K page) unit masks are not added because unlike zen2 hardware, zen1 hardware counts all its unit masks with a 0 unit mask according to the old convention: zen1$ perf stat -e cpu/event=0x94/,cpu/event=0x94,umask=0xff/ sleep 1 Performance counter stats for 'sleep 1': 211,318 cpu/event=0x94/u 211,318 cpu/event=0x94,umask=0xff/u Rome/zen2: zen2$ perf stat -e cpu/event=0x94/,cpu/event=0x94,umask=0xff/ sleep 1 Performance counter stats for 'sleep 1': 0 cpu/event=0x94/u 190,744 cpu/event=0x94,umask=0xff/u Signed-off-by: Kim Phillips Acked-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo # on Zen2 only (3900x) Cc: Alexander Shishkin Cc: Andi Kleen Cc: Borislav Petkov Cc: Jin Yao Cc: Jiri Olsa Cc: John Garry Cc: Jon Grimm Cc: Kan Liang Cc: Mark Rutland Cc: Martin Jambor Cc: Martin Liška Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Vijay Thakkar Cc: William Cohen Cc: Yunfeng Ye Link: http://lore.kernel.org/lkml/20200901220944.277505-2-kim.phillips@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 60d804521ec4cd01217a96f33cd1bb29e295333d Author: Kim Phillips Date: Tue Sep 1 17:09:41 2020 -0500 perf vendor events amd: Add L2 Prefetch events for zen1 Later revisions of PPRs that post-date the original Family 17h events submission patch add these events. Specifically, they were not in this 2017 revision of the F17h PPR: Processor Programming Reference (PPR) for AMD Family 17h Model 01h, Revision B1 Processors Rev 1.14 - April 15, 2017 But e.g., are included in this 2019 version of the PPR: Processor Programming Reference (PPR) for AMD Family 17h Model 18h, Revision B1 Processors Rev. 3.14 - Sep 26, 2019 Fixes: 98c07a8f74f8 ("perf vendor events amd: perf PMU events for AMD Family 17h") Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Kim Phillips Reviewed-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Borislav Petkov Cc: Jin Yao Cc: Jiri Olsa Cc: John Garry Cc: Jon Grimm Cc: Kan Liang Cc: Mark Rutland Cc: Martin Jambor Cc: Martin Liška Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: stable@vger.kernel.org Cc: Stephane Eranian Cc: Vijay Thakkar Cc: William Cohen Cc: Yunfeng Ye Link: http://lore.kernel.org/lkml/20200901220944.277505-1-kim.phillips@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit d768e5043c056822ef7ed1546e2d7134877ae6d1 Author: Bernard Zhao Date: Fri Aug 14 01:17:44 2020 -0700 drm/msm/adreno: remove return value of function XX_print XX_print like pfp_print/me_print/meq_print/roq_print are just used in file a5xx_debugfs.c. And these function always return 0, this return value is meaningless. This change is to make the code a bit more readable. Signed-off-by: Bernard Zhao Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit e1bf29e022fb48eabe3c3db9ab981ed56307c69b Author: Rob Clark Date: Mon Jul 13 11:16:42 2020 -0700 drm/msm: drop cache sync hack Now that it isn't causing problems to use dma_map/unmap, we can drop the hack of using dma_sync in certain cases. Signed-off-by: Rob Clark commit f032b68101b14a585a49c39c91660cf98ffce68c Author: Sai Prakash Ranjan Date: Tue Aug 4 12:14:43 2020 +0530 drm/msm/mdp5: Remove unused downstream bus scaling apis MSM bus scaling has moved on to use interconnect framework and downstream bus scaling apis are not present anymore. Remove them as they are nop anyways in the current code, no functional change. Signed-off-by: Sai Prakash Ranjan Signed-off-by: Rob Clark commit a046c2c28aa81ff083003c278540dc0b84ddd4b0 Author: Sai Prakash Ranjan Date: Tue Aug 4 12:14:42 2020 +0530 drm/msm/mdp4: Remove unused downstream bus scaling apis MSM bus scaling has moved on to use interconnect framework and downstream bus scaling apis are not present anymore. Remove them as they are nop anyways in the current code, no functional change. Signed-off-by: Sai Prakash Ranjan Signed-off-by: Rob Clark commit c33b7c0389e17da3619434d46be9adf3fa0eba85 Author: Kalyan Thota Date: Thu Jul 16 17:05:34 2020 +0530 drm/msm/dpu: add support for clk and bw scaling for display This change adds support to scale src clk and bandwidth as per composition requirements. Interconnect registration for bw has been moved to mdp device node from mdss to facilitate the scaling. Changes in v1: - Address armv7 compilation issues with the patch (Rob) Signed-off-by: Kalyan Thota Reviewed-by: Rob Clark Signed-off-by: Rob Clark commit 2ae05fe0a9dfe204a6c83bbe6bd1312b3bb3d301 Author: Changbin Du Date: Fri Sep 4 23:23:57 2020 +0800 perf: ftrace: Add filter support for option -F/--funcs Same as 'perf probe -F', this patch adds filter support for the ftrace subcommand option '-F, --funcs <[FILTER]>'. Here is an example that only lists functions which start with 'vfs_': $ sudo perf ftrace -F vfs_* vfs_fadvise vfs_fallocate vfs_truncate vfs_open vfs_setpos vfs_llseek vfs_readf vfs_writef ... Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Changbin Du Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200904152357.6053-1-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit ee7fe31e6e264d748bec5378c4d5417e14019666 Author: Adrian Hunter Date: Thu Sep 3 15:29:37 2020 +0300 perf tools: Consolidate close_control_option()'s into one function Consolidate control option fifo closing into one function. Signed-off-by: Adrian Hunter Suggested-by: Alexey Budankov Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20200903122937.25691-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 9818923634206b751192e8f1554ecb93874d7d9f Author: Adrian Hunter Date: Tue Sep 1 12:37:58 2020 +0300 perf intel-pt: Document snapshot control command The documentation describes snapshot mode. Update it to include the new snapshot control command. Signed-off-by: Adrian Hunter Acked-by: Alexey Budankov Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20200901093758.32293-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 0b157b1000195bc96c3180e8a1d45e1c6c0f2fa1 Author: Arnaldo Carvalho de Melo Date: Fri Sep 4 14:11:18 2020 -0300 perf annotate: Add 'ret' (intel disasm style) as an alias for 'retq' When we use the 'intel' disassembler style we get 'ret' instead of 'retq', so add that as an alias. # perf annotate --disassembler-style=intel --stdio2 acpi_processor_ffh_cstate_enter > before Apply this patch and then: # perf annotate --disassembler-style=intel --stdio2 acpi_processor_ffh_cstate_enter > after # diff -u before after --- before 2020-09-04 14:10:47.768414634 -0300 +++ after 2020-09-04 14:10:59.116681039 -0300 @@ -33,7 +33,7 @@ test al,0x8 ↓ je 97 and DWORD PTR gs:[rip+0x7e548509],0x7fffffff - 97: ret + 97: ← ret mov rax,QWORD PTR gs:0x17bc0 lock or BYTE PTR [rax+0x2],0x20 mov rax,QWORD PTR [rax] # Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Martin Liška Cc: Matt P. Dziubinski Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Thomas Richter Cc: Wang Nan Signed-off-by: Arnaldo Carvalho de Melo commit bbe544682ee25a41f20a59fc7c29f790d502b3ce Author: Arnaldo Carvalho de Melo Date: Fri Sep 4 13:10:43 2020 -0300 perf annotate: Allow configuring the 'disassembler_style' knob via 'perf config' # perf annotate --stdio2 acpi_processor_ffh_cstate_enter > default # perf config annotate.disassembler_style=intel # perf config annotate.disassembler_style annotate.disassembler_style=intel # perf annotate --stdio2 acpi_processor_ffh_cstate_enter > intel # diff -u default intel --- default 2020-09-04 13:09:26.019205732 -0300 +++ intel 2020-09-04 13:09:52.823795081 -0300 @@ -1,42 +1,42 @@ Samples: 1K of event 'cycles', 4000 Hz, Event count (approx.): 990065316, [percent: local period] acpi_processor_ffh_cstate_enter() /lib/modules/5.9.0-rc3/build/vmlinux -Percent → callq __fentry__ - mov cpu_number,%edx - mov %edx,%edx - mov cpu_cstate_entry,%rax - add -0x7dbe9700(,%rdx,8),%rax - movzbl 0x9(%rdi),%edx - mov 0x4(%rax,%rdx,8),%edi - mov (%rax,%rdx,8),%esi - → jmpq 137ccc6 - 2d: → jmpq 137ccd8 +Percent → call __fentry__ + mov edx,DWORD PTR gs:[rip+0x7e541d74] + mov edx,edx + mov rax,QWORD PTR [rip+0x152b8fb] + add rax,QWORD PTR [rdx*8-0x7dbe9700] + movzx edx,BYTE PTR [rdi+0x9] + mov edi,DWORD PTR [rax+rdx*8+0x4] + mov esi,DWORD PTR [rax+rdx*8] + → jmp 137ccc6 + 2d: → jmp 137ccd8 mfence - mov %gs:0x17bc0,%rax - clflush (%rax) + mov rax,QWORD PTR gs:0x17bc0 + clflush BYTE PTR [rax] mfence - xor %edx,%edx - mov %rdx,%rcx - mov %gs:0x17bc0,%rax - 0.00 monitor %rax,%ecx,%edx - mov (%rax),%rax - test $0x8,%al + xor edx,edx + mov rcx,rdx + mov rax,QWORD PTR gs:0x17bc0 + 0.00 monitor + mov rax,QWORD PTR [rax] + test al,0x8 ↓ jne 71 - ↓ jmpq 68 - verw 0x538b08(%rip) # ffffffff82008150 - 68: mov %rsi,%rax - mov %rdi,%rcx -100.00 mwait %eax,%ecx - 71: mov %gs:0x17bc0,%rax - lock andb $0xdf,0x2(%rax) - lock addl $0x0,-0x4(%rsp) - mov (%rax),%rax - test $0x8,%al + ↓ jmp 68 + verw WORD PTR [rip+0x538b08] # ffffffff82008150 + 68: mov rax,rsi + mov rcx,rdi +100.00 mwait + 71: mov rax,QWORD PTR gs:0x17bc0 + lock and BYTE PTR [rax+0x2],0xdf + lock add DWORD PTR [rsp-0x4],0x0 + mov rax,QWORD PTR [rax] + test al,0x8 ↓ je 97 - andl $0x7fffffff,__preempt_count - 97: ← retq - mov %gs:0x17bc0,%rax - lock orb $0x20,0x2(%rax) - mov (%rax),%rax - test $0x8,%al + and DWORD PTR gs:[rip+0x7e548509],0x7fffffff + 97: ret + mov rax,QWORD PTR gs:0x17bc0 + lock or BYTE PTR [rax+0x2],0x20 + mov rax,QWORD PTR [rax] + test al,0x8 ↑ jne 71 - ↑ jmpq 2d + ↑ jmp 2d # Requested-by: Matt P. Dziubinski Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 0ce0c78eff7d22c8a261de6c4305a5abb638c200 Author: Paul E. McKenney Date: Tue Aug 4 11:35:56 2020 -0700 tools/memory-model: Expand the cheatsheet.txt notion of relaxed This commit adds a key entry enumerating the various types of relaxed operations. While in the area, it also renames the relaxed rows. [ paulmck: Apply Boqun Feng feedback. ] Acked-by: Boqun Feng Signed-off-by: Paul E. McKenney commit 6fe208f63a79f4f726f3be2b78ea3dd40487b657 Merge: 7fbe67e46aab1 2b722160f1a79 Author: Paul E. McKenney Date: Fri Sep 4 11:54:52 2020 -0700 Merge branch 'csd.2020.09.04a' into HEAD csd.2020.09.04a: CPU smp_call_function() torture tests. commit 2b722160f1a7929f38dfb648c7bbb45f96e65a5b Author: Wei Yongjun Date: Mon Jul 6 21:49:41 2020 +0800 smp: Make symbol 'csd_bug_count' static The sparse tool complains as follows: kernel/smp.c:107:10: warning: symbol 'csd_bug_count' was not declared. Should it be static? Because variable is not used outside of smp.c, this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior commit 35feb60474bf4f7fa7840e14fc7fd344996b919d Author: Paul E. McKenney Date: Tue Jun 30 13:22:54 2020 -0700 kernel/smp: Provide CSD lock timeout diagnostics This commit causes csd_lock_wait() to emit diagnostics when a CPU fails to respond quickly enough to one of the smp_call_function() family of function calls. These diagnostics are enabled by a new CSD_LOCK_WAIT_DEBUG Kconfig option that depends on DEBUG_KERNEL. This commit was inspired by an earlier patch by Josef Bacik. [ paulmck: Fix for syzbot+0f719294463916a3fc0e@syzkaller.appspotmail.com ] [ paulmck: Fix KASAN use-after-free issue reported by Qian Cai. ] [ paulmck: Fix botched nr_cpu_ids comparison per Dan Carpenter. ] [ paulmck: Apply Peter Zijlstra feedback. ] Link: https://lore.kernel.org/lkml/00000000000042f21905a991ecea@google.com Link: https://lore.kernel.org/lkml/0000000000002ef21705a9933cf3@google.com Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney commit e48c15b796d412ede883bb2ef7779b2a142f7962 Author: Paul E. McKenney Date: Mon Jun 29 17:21:32 2020 -0700 smp: Add source and destination CPUs to __call_single_data This commit adds a destination CPU to __call_single_data, and is inspired by an earlier commit by Peter Zijlstra. This version adds #ifdef to permit use by 32-bit systems and supplying the destination CPU for all smp_call_function*() requests, not just smp_call_function_single(). If need be, 32-bit systems could be accommodated by shrinking the flags field to 16 bits (the atomic_t variant is currently unused) and by providing only eight bits for CPU on such systems. It is not clear that the addition of the fields to __call_single_node are really needed. [ paulmck: Apply Boqun Feng feedback on 32-bit builds. ] Link: https://lore.kernel.org/lkml/20200615164048.GC2531@hirez.programming.kicks-ass.net/ Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior Cc: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit d20aff1512f013fab79b8740427b7574569a9a2e Author: Adrian Hunter Date: Tue Sep 1 12:37:57 2020 +0300 perf record: Add 'snapshot' control command Add 'snapshot' control command to create an AUX area tracing snapshot the same as if sending SIGUSR2. The advantage of the FIFO is that access is governed by access to the FIFO. Example: $ mkfifo perf.control $ mkfifo perf.ack $ cat perf.ack & [1] 15235 $ sudo ~/bin/perf record --control fifo:perf.control,perf.ack -S -e intel_pt//u -- sleep 60 & [2] 15243 $ ps -e | grep perf 15244 pts/1 00:00:00 perf $ kill -USR2 15244 bash: kill: (15244) - Operation not permitted $ echo snapshot > perf.control ack $ Signed-off-by: Adrian Hunter Acked-by: Alexey Budankov Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20200901093758.32293-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a8fcbd269b4340c36dbf99b4453bcbfe128d93fb Author: Adrian Hunter Date: Wed Sep 2 13:57:07 2020 +0300 perf tools: Add FIFO file names as alternative options to --control Enable the --control option to accept file names as an alternative to file descriptors. Example: $ mkfifo perf.control $ mkfifo perf.ack $ cat perf.ack & [1] 6808 $ perf record --control fifo:perf.control,perf.ack -- sleep 300 & [2] 6810 $ echo disable > perf.control $ Events disabled ack $ echo enable > perf.control $ Events enabled ack $ echo disable > perf.control $ Events disabled ack $ kill %2 [ perf record: Woken up 4 times to write data ] $ [ perf record: Captured and wrote 0.018 MB perf.data (7 samples) ] [1]- Done cat perf.ack [2]+ Terminated perf record --control fifo:perf.control,perf.ack -- sleep 300 $ Signed-off-by: Adrian Hunter Acked-by: Alexey Budankov Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20200902105707.11491-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1f4390d825cc04e91a276c78f984dd2d7fe01e62 Author: Adrian Hunter Date: Tue Sep 1 12:37:55 2020 +0300 perf tools: Use AsciiDoc formatting for --control option documentation The --control option does not display well in man pages unless AsciiDoc formatting is used. Signed-off-by: Adrian Hunter Acked-by: Alexey Budankov Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20200901093758.32293-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 40db8ff59e75af108d695597bdbaa4828e129178 Author: Adrian Hunter Date: Tue Sep 1 12:37:54 2020 +0300 perf tools: Handle read errors from ctl_fd Handle read errors from ctl_fd such as EINTR, EAGAIN and EWOULDBLOCK. Signed-off-by: Adrian Hunter Acked-by: Alexey Budankov Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20200901093758.32293-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 9864a66defeb8df0ef1487e6d195278cf3e33666 Author: Adrian Hunter Date: Tue Sep 1 12:37:53 2020 +0300 perf tools: Consolidate --control option parsing into one function Consolidate --control option parsing into one function, in preparation for adding FIFO file name options. Signed-off-by: Adrian Hunter Acked-by: Alexey Budankov Acked-by: Jiri Olsa Cc: Andi Kleen Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20200901093758.32293-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ed21d6d7c48e6e96c2d617e304a7ebfbd17b1807 Author: Remi Bernon Date: Fri Aug 21 18:52:38 2020 +0200 perf tests: Add test for PE binary format support This adds a precompiled file in PE binary format, with split debug file, and tries to read its build_id and .gnu_debuglink sections, as well as looking up the main symbol from the debug file. This should succeed if libbfd is supported. Committer testing: $ perf test "PE file support" 68: PE file support : Ok $ Signed-off-by: Remi Bernon Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Jacek Caban Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200821165238.1340315-3-rbernon@codeweavers.com Signed-off-by: Arnaldo Carvalho de Melo commit eac9a4342e5447cade4d484261a8992e2ec6f138 Author: Remi Bernon Date: Fri Aug 21 18:52:37 2020 +0200 perf symbols: Try reading the symbol table with libbfd Wine generates PE binaries for its code modules and also generates debug files in PE or PDB formats, which perf cannot parse either. Trying to read symbols on non-ELF binaries with libbfd, when supported, makes it possible for perf to report symbols and annotations for Windows applications running under Wine. Because libbfd doesn't provide symbol size (probably because of some backends not supporting it), we compute it by first sorting the symbols by addresses and then considering that they are sequential in a given section. v3: Also include local and weak bfd symbols and mark them as such, only global symbols were previously reported, and that caused a very imprecise address to symbol resolution. Signed-off-by: Remi Bernon Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Jacek Caban Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200821165238.1340315-2-rbernon@codeweavers.com Signed-off-by: Arnaldo Carvalho de Melo commit ba0509dcb7f806403b23234320711c45be9dccec Author: Remi Bernon Date: Fri Aug 21 18:52:36 2020 +0200 perf dso: Use libbfd to read build_id and .gnu_debuglink section Wine generates PE binaries for most of its modules and perf is unable to parse these files to get build_id or .gnu_debuglink section. Using libbfd when available, instead of libelf, makes it possible to resolve debug file location regardless of the dso binary format. Committer notes: Made the filename__read_build_id() variant that uses abfd->build_id depend on the feature test that defines HAVE_LIBBFD_BUILDID_SUPPORT, to get this to continue building with older libbfd/binutils. Signed-off-by: Remi Bernon Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Jacek Caban Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200821165238.1340315-1-rbernon@codeweavers.com Signed-off-by: Arnaldo Carvalho de Melo commit e71e19a9ea70952a53d58a99971820ce6c1794a8 Author: Arnaldo Carvalho de Melo Date: Thu Sep 3 13:44:39 2020 -0300 tools features: Add feature test to check if libbfd has buildid support Which is needed by the PE executable support, for instance. Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jacek Caban Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Remi Bernon Signed-off-by: Arnaldo Carvalho de Melo commit 9da8e9ac171438525e4c1c377609818ef1a6237b Author: Rafael J. Wysocki Date: Fri Sep 4 18:27:52 2020 +0200 ACPICA: Introduce special struct type for GPE register addresses Notice that the bit_width, bit_offset and access_width fields in struct acpi_generic_address are not used during GPE register accesses any more, so introduce a simplified address structure type, struct acpi_gpe_address, to represent addresses of GPE registers and use it instead of struct acpi_generic_address in struct acpi_gpe_register_info. Signed-off-by: Rafael J. Wysocki commit f06011ad6225b0f5e4246b5635c5570fa8d5fcdf Author: Rafael J. Wysocki Date: Fri Sep 4 18:27:43 2020 +0200 ACPICA: Introduce acpi_hw_gpe_read() and acpi_hw_gpe_write() Now that GPE blocks are validated at the initialization time, accesses to GPE registers can be made more straightforward by ommitting all of the redundant checks in acpi_hw_read() and acpi_hw_write() and only invoking the OS-provided helper for the given type of access (read or write) and the address space holding these registers. For this reason, introduce simplified routines for accessing GPE registers, acpi_hw_gpe_read() and acpi_hw_gpe_write(), designed in accordance with the above observation, and modify all of the code accessing GPE registers to use them instead of acpi_hw_read() and acpi_hw_write(), respectively. Signed-off-by: Rafael J. Wysocki commit 84b43284af40742abeb2cdd6998a4084866ba015 Author: Rafael J. Wysocki Date: Fri Sep 4 18:27:27 2020 +0200 ACPICA: Validate GPE blocks at init time Some of the checks done by acpi_hw_read() and acpi_hw_write(), which are used for accessing GPE registers, are redundant in the specific case of GPE registers and the ones that are not redundant can be done upfront at the initialization time so as to fail the initialization if they are not passed instead of failing every access to the affected GPE registers going forward (including accesses from the SCI interrupt handler). Modify the GPE blocks initialization code accordingly. Signed-off-by: Rafael J. Wysocki commit 51fae39bd5018e4f6d3e65a1a1a8ad40b5ee3662 Author: Saravana Kannan Date: Tue Sep 1 15:48:42 2020 -0700 scripts/dev-needs: Add script to list device dependencies This script can be useful for: - Figuring out the list of modules you need to pack in initrd - Figuring out the list of drivers you need to modularize for a device to be fully functional without building in any dependencies. - Figuring out which drivers to enable first, when porting drivers between kernels (say, to upstream). - Plotting graphs of system dependencies, etc. Usage: dev-needs.sh [-c|-d|-m|-f] [filter options] This script needs to be run on the target device once it has booted to a shell. The script takes as input a list of one or more device directories under /sys/devices and then lists the probe dependency chain (suppliers and parents) of these devices. It does a breadth first search of the dependency chain, so the last entry in the output is close to the root of the dependency chain. By default it lists the full path to the devices under /sys/devices. It also takes an optional modifier flag as the first parameter to change what information is listed in the output. If the requested information is not available, the device name is printed. -c lists the compatible string of the dependencies -d lists the driver name of the dependencies that have probed -m lists the module name of the dependencies that have a module -f list the firmware node path of the dependencies -g list the dependencies as edges and nodes for graphviz -t list the dependencies as edges for tsort The filter options provide a way to filter out some dependencies: --allow-no-driver By default dependencies that don't have a driver attached are ignored. This is to avoid following device links to "class" devices that are created when the consumer probes (as in, not a probe dependency). If you want to follow these links anyway, use this flag. --exclude-devlinks Don't follow device links when tracking probe dependencies. --exclude-parents Don't follow parent devices when tracking probe dependencies. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200901224842.1787825-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit afde706afde2fea8a1dff84acaedac4f8dfe84b9 Author: Jonathan Corbet Date: Fri Sep 4 10:13:45 2020 -0600 Make the docs build "work" with Sphinx 3.x The Sphinx 3.x upgrade broke a number of things in our special "cdomain" module that are not easy to fix. For now, just disable that module for the 3.x build and put out a warning that the build will not be perfect. Signed-off-by: Jonathan Corbet commit 71a174b39f10b4b93223d374722aa894b5d8a82e Author: Artem Savkov Date: Wed Sep 2 14:00:45 2020 +0200 pty: do tty_flip_buffer_push without port->lock in pty_write b6da31b2c07c "tty: Fix data race in tty_insert_flip_string_fixed_flag" puts tty_flip_buffer_push under port->lock introducing the following possible circular locking dependency: [30129.876566] ====================================================== [30129.876566] WARNING: possible circular locking dependency detected [30129.876567] 5.9.0-rc2+ #3 Tainted: G S W [30129.876568] ------------------------------------------------------ [30129.876568] sysrq.sh/1222 is trying to acquire lock: [30129.876569] ffffffff92c39480 (console_owner){....}-{0:0}, at: console_unlock+0x3fe/0xa90 [30129.876572] but task is already holding lock: [30129.876572] ffff888107cb9018 (&pool->lock/1){-.-.}-{2:2}, at: show_workqueue_state.cold.55+0x15b/0x6ca [30129.876576] which lock already depends on the new lock. [30129.876577] the existing dependency chain (in reverse order) is: [30129.876578] -> #3 (&pool->lock/1){-.-.}-{2:2}: [30129.876581] _raw_spin_lock+0x30/0x70 [30129.876581] __queue_work+0x1a3/0x10f0 [30129.876582] queue_work_on+0x78/0x80 [30129.876582] pty_write+0x165/0x1e0 [30129.876583] n_tty_write+0x47f/0xf00 [30129.876583] tty_write+0x3d6/0x8d0 [30129.876584] vfs_write+0x1a8/0x650 [30129.876588] -> #2 (&port->lock#2){-.-.}-{2:2}: [30129.876590] _raw_spin_lock_irqsave+0x3b/0x80 [30129.876591] tty_port_tty_get+0x1d/0xb0 [30129.876592] tty_port_default_wakeup+0xb/0x30 [30129.876592] serial8250_tx_chars+0x3d6/0x970 [30129.876593] serial8250_handle_irq.part.12+0x216/0x380 [30129.876593] serial8250_default_handle_irq+0x82/0xe0 [30129.876594] serial8250_interrupt+0xdd/0x1b0 [30129.876595] __handle_irq_event_percpu+0xfc/0x850 [30129.876602] -> #1 (&port->lock){-.-.}-{2:2}: [30129.876605] _raw_spin_lock_irqsave+0x3b/0x80 [30129.876605] serial8250_console_write+0x12d/0x900 [30129.876606] console_unlock+0x679/0xa90 [30129.876606] register_console+0x371/0x6e0 [30129.876607] univ8250_console_init+0x24/0x27 [30129.876607] console_init+0x2f9/0x45e [30129.876609] -> #0 (console_owner){....}-{0:0}: [30129.876611] __lock_acquire+0x2f70/0x4e90 [30129.876612] lock_acquire+0x1ac/0xad0 [30129.876612] console_unlock+0x460/0xa90 [30129.876613] vprintk_emit+0x130/0x420 [30129.876613] printk+0x9f/0xc5 [30129.876614] show_pwq+0x154/0x618 [30129.876615] show_workqueue_state.cold.55+0x193/0x6ca [30129.876615] __handle_sysrq+0x244/0x460 [30129.876616] write_sysrq_trigger+0x48/0x4a [30129.876616] proc_reg_write+0x1a6/0x240 [30129.876617] vfs_write+0x1a8/0x650 [30129.876619] other info that might help us debug this: [30129.876620] Chain exists of: [30129.876621] console_owner --> &port->lock#2 --> &pool->lock/1 [30129.876625] Possible unsafe locking scenario: [30129.876626] CPU0 CPU1 [30129.876626] ---- ---- [30129.876627] lock(&pool->lock/1); [30129.876628] lock(&port->lock#2); [30129.876630] lock(&pool->lock/1); [30129.876631] lock(console_owner); [30129.876633] *** DEADLOCK *** [30129.876634] 5 locks held by sysrq.sh/1222: [30129.876634] #0: ffff8881d3ce0470 (sb_writers#3){.+.+}-{0:0}, at: vfs_write+0x359/0x650 [30129.876637] #1: ffffffff92c612c0 (rcu_read_lock){....}-{1:2}, at: __handle_sysrq+0x4d/0x460 [30129.876640] #2: ffffffff92c612c0 (rcu_read_lock){....}-{1:2}, at: show_workqueue_state+0x5/0xf0 [30129.876642] #3: ffff888107cb9018 (&pool->lock/1){-.-.}-{2:2}, at: show_workqueue_state.cold.55+0x15b/0x6ca [30129.876645] #4: ffffffff92c39980 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x123/0x420 [30129.876648] stack backtrace: [30129.876649] CPU: 3 PID: 1222 Comm: sysrq.sh Tainted: G S W 5.9.0-rc2+ #3 [30129.876649] Hardware name: Intel Corporation 2012 Client Platform/Emerald Lake 2, BIOS ACRVMBY1.86C.0078.P00.1201161002 01/16/2012 [30129.876650] Call Trace: [30129.876650] dump_stack+0x9d/0xe0 [30129.876651] check_noncircular+0x34f/0x410 [30129.876653] __lock_acquire+0x2f70/0x4e90 [30129.876656] lock_acquire+0x1ac/0xad0 [30129.876658] console_unlock+0x460/0xa90 [30129.876660] vprintk_emit+0x130/0x420 [30129.876660] printk+0x9f/0xc5 [30129.876661] show_pwq+0x154/0x618 [30129.876662] show_workqueue_state.cold.55+0x193/0x6ca [30129.876664] __handle_sysrq+0x244/0x460 [30129.876665] write_sysrq_trigger+0x48/0x4a [30129.876665] proc_reg_write+0x1a6/0x240 [30129.876666] vfs_write+0x1a8/0x650 It looks like the commit was aimed to protect tty_insert_flip_string and there is no need for tty_flip_buffer_push to be under this lock. Fixes: b6da31b2c07c ("tty: Fix data race in tty_insert_flip_string_fixed_flag") Signed-off-by: Artem Savkov Acked-by: Jiri Slaby Link: https://lore.kernel.org/r/20200902120045.3693075-1-asavkov@redhat.com Signed-off-by: Greg Kroah-Hartman commit 63ffcbdad738e3d1c857027789a2273df3337624 Author: Tyrel Datwyler Date: Thu Aug 20 18:46:38 2020 -0500 tty: hvcs: Don't NULL tty->driver_data until hvcs_cleanup() The code currently NULLs tty->driver_data in hvcs_close() with the intent of informing the next call to hvcs_open() that device needs to be reconfigured. However, when hvcs_cleanup() is called we copy hvcsd from tty->driver_data which was previoulsy NULLed by hvcs_close() and our call to tty_port_put(&hvcsd->port) doesn't actually do anything since &hvcsd->port ends up translating to NULL by chance. This has the side effect that when hvcs_remove() is called we have one too many port references preventing hvcs_destuct_port() from ever being called. This also prevents us from reusing the /dev/hvcsX node in a future hvcs_probe() and we can eventually run out of /dev/hvcsX devices. Fix this by waiting to NULL tty->driver_data in hvcs_cleanup(). Fixes: 27bf7c43a19c ("TTY: hvcs, add tty install") Signed-off-by: Tyrel Datwyler Link: https://lore.kernel.org/r/20200820234643.70412-1-tyreld@linux.ibm.com Signed-off-by: Greg Kroah-Hartman commit db332356222d9429731ab9395c89cca403828460 Author: Tong Zhang Date: Fri Aug 21 12:19:40 2020 -0400 tty: ipwireless: fix error handling ipwireless_send_packet() can only return 0 on success and -ENOMEM on error, the caller should check non zero for error condition Signed-off-by: Tong Zhang Acked-by: David Sterba Link: https://lore.kernel.org/r/20200821161942.36589-1-ztong0001@gmail.com Signed-off-by: Greg Kroah-Hartman commit 68778cab29bf27a60b67f55d6f4710d9fa906eab Author: Christophe JAILLET Date: Thu Aug 6 07:44:04 2020 +0200 tty: synclink_gt: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'alloc_desc()' and 'alloc_bufs()', GFP_KERNEL can be used because it is only called from a probe function and no lock is acquired. The call chain is: init_one (the probe function) --> device_init --> alloc_dma_bufs --> alloc_desc --> alloc_bufs @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20200806054404.728854-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit c3647f2f30c875830fe972141a96b75a0b8df1a6 Author: Christophe JAILLET Date: Thu Aug 6 08:05:07 2020 +0200 tty: serial: icom: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'get_port_memory()', GFP_KERNEL can be used because it is only called from a probe function and no lock is acquired. The call chain is: icom_probe (the probe function) --> icom_load_ports --> get_port_memory When memory is allocated in 'load_code()', GFP_KERNEL can be used because it is only called from a .startup function. icom_open (the .startup function of struct uart_ops) --> startup --> load_code .startup functions are protected using a semaphore and no spinlock is taken. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20200806060507.730142-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 947bece14b741ed339eda14db42cf3c357183501 Author: Wang Qing Date: Thu Aug 13 11:34:48 2020 +0800 drivers/greybus: Use kobj_to_dev() Use kobj_to_dev() instead of container_of() Signed-off-by: Wang Qing Acked-by: Viresh Kumar Acked-by: Johan Hovold Link: https://lore.kernel.org/r/1597289690-22857-1-git-send-email-wangqing@vivo.com Signed-off-by: Greg Kroah-Hartman commit a0bc32b3cacf194dc479b342f006203fd1e1941a Author: Akshay Gupta Date: Fri Aug 28 19:24:12 2020 +0000 x86/mce: Increase maximum number of banks to 64 ...because future AMD systems will support up to 64 MCA banks per CPU. MAX_NR_BANKS is used to allocate a number of data structures, and it is used as a ceiling for values read from MCG_CAP[Count]. Therefore, this change will have no functional effect on existing systems with 32 or fewer MCA banks per CPU. However, this will increase the size of the following structures: Global bitmaps: - core.c / mce_banks_ce_disabled - core.c / all_banks - core.c / valid_banks - core.c / toclear - Total: 32 new bits * 4 bitmaps = 16 new bytes Per-CPU bitmaps: - core.c / mce_poll_banks - intel.c / mce_banks_owned - Total: 32 new bits * 2 bitmaps = 8 new bytes The bitmaps are arrays of longs. So this change will only affect 32-bit execution, since there will be one additional long used. There will be no additional memory use on 64-bit execution, because the size of long is 64 bits. Global structs: - amd.c / struct smca_bank smca_banks[]: 16 bytes per bank - core.c / struct mce_bank_dev mce_bank_devs[]: 56 bytes per bank - Total: 32 new banks * (16 + 56) bytes = 2304 new bytes Per-CPU structs: - core.c / struct mce_bank mce_banks_array[]: 16 bytes per bank - Total: 32 new banks * 16 bytes = 512 new bytes 32-bit Total global size increase: 2320 bytes Total per-CPU size increase: 520 bytes 64-bit Total global size increase: 2304 bytes Total per-CPU size increase: 512 bytes This additional memory should still fit within the existing .data section of the kernel binary. However, in the case where it doesn't fit, an additional page (4kB) of memory will be added to the binary to accommodate the extra data which will be the maximum size increase of vmlinux. Signed-off-by: Akshay Gupta [ Adjust commit message and code comment. ] Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200828192412.320052-1-Yazen.Ghannam@amd.com commit 11361610b00500c4afe269ff5a4fe06d58f0a3d0 Author: kuldip dwivedi Date: Thu Sep 3 17:04:02 2020 +0530 serial: 8250_fsl: Add ACPI support This adds support for ACPI enumerated FSL 16550 UARTs. For supporting ACPI, I added a wrapper so that this driver can be used if firmware has exposed the HID "NXP0018" in DSDT table. This will be built as object file if config "SERIAL_8250_FSL" is enabled which depends on config "SERIAL_8250_CONSOLE". Signed-off-by: kuldip dwivedi Link: https://lore.kernel.org/r/20200903113402.12371-1-kuldip.dwivedi@puresoftware.com Signed-off-by: Greg Kroah-Hartman commit ad0c2748059fff13e8295ae91f51073d6c0311b7 Author: Marek Vasut Date: Mon Aug 31 19:10:45 2020 +0200 serial: stm32: Add RS485 RTS GPIO control again While the STM32 does support RS485 drive-enable control within the UART IP itself, some systems have the drive-enable line connected to a pin which cannot be pinmuxed as RTS. Add support for toggling the RTS GPIO line using the modem control GPIOs to provide at least some sort of emulation. Fixes: 7df5081cbf5e ("serial: stm32: Add RS485 RTS GPIO control") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Andy Shevchenko Cc: Manivannan Sadhasivam Cc: Fabrice Gasnier Cc: linux-stm32@st-md-mailman.stormreply.com Link: https://lore.kernel.org/r/20200831171045.205691-1-marex@denx.de Signed-off-by: Greg Kroah-Hartman commit 0fb9342d06b0f667b915ba58bfefc030e534a218 Author: Tong Zhang Date: Fri Aug 28 08:39:50 2020 -0400 tty: serial: earlycon dependency parse_options() in drivers/tty/serial/earlycon.c calls uart_parse_earlycon in drivers/tty/serial/serial_core.c therefore selecting SERIAL_EARLYCON should automatically select SERIAL_CORE, otherwise will result in symbol not found error during linking if SERIAL_CORE is not configured as builtin Fixes: 9aac5887595b ("tty/serial: add generic serial earlycon") Signed-off-by: Tong Zhang Link: https://lore.kernel.org/r/20200828123949.2642-1-ztong0001@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5da6b1c079e6804a81e63ab8337224cbd2148c91 Author: Daniel Mack Date: Tue Sep 1 14:03:29 2020 +0200 sc16is7xx: Set iobase to device index Some derivates of sc16is7xx devices expose more than one tty device to userspace. If multiple such devices exist in a system, userspace currently has no clean way to infer which tty maps to which physical line. Set the .iobase value to the relative index within the device to allow infering the order through sysfs. Signed-off-by: Daniel Mack Link: https://lore.kernel.org/r/20200901120329.4176302-1-daniel@zonque.org Signed-off-by: Greg Kroah-Hartman commit 89c65d664832ebaf2cbdcfe83b25c0036780feb7 Author: Krzysztof Kozlowski Date: Tue Sep 1 17:31:00 2020 +0200 serial: core: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Lukas Wunner Link: https://lore.kernel.org/r/20200901153100.18827-2-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit ea43a60b15486bca1c406b59034e3561d543d571 Author: Krzysztof Kozlowski Date: Tue Sep 1 17:30:59 2020 +0200 serial: 8250: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Reviewed-by: Lukas Wunner Link: https://lore.kernel.org/r/20200901153100.18827-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5f0e708c8d74049f524e7407b523cce4330b090f Author: Ye Bin Date: Thu Sep 3 14:24:01 2020 +0800 serial: imx: Delete duplicated argument to '|' in imx_uart_probe When calculate "ucr1" UCR1_TRDYEN is duplicate. Signed-off-by: Ye Bin Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20200903062401.692442-1-yebin10@huawei.com Signed-off-by: Greg Kroah-Hartman commit 8c0aa567146b1df5e74f732cd4c2aee376d8c082 Author: Krzysztof Kozlowski Date: Tue Aug 25 21:35:21 2020 +0200 dt-bindings: gpio: fsl-imx-gpio: Add power-domains Parse also optional power-domains property to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8qxp-ai_ml.dt.yaml: gpio@5d080000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200825193536.7332-5-krzk@kernel.org commit dfb49cc231a483b80ceba73579df5208080ba7d0 Author: Krzysztof Kozlowski Date: Tue Aug 25 21:35:20 2020 +0200 dt-bindings: gpio: fsl-imx-gpio: Add parsing of hogs Allow parsing GPIO controller children nodes with GPIO hogs to fix warning: arch/arm64/boot/dts/freescale/imx8mq-evk.dt.yaml: gpio@30240000: 'wl-reg-on' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200825193536.7332-4-krzk@kernel.org commit 0c77a86a6ede431ce892062b6276bcb2ef3df5f3 Author: Krzysztof Kozlowski Date: Tue Aug 25 21:35:19 2020 +0200 dt-bindings: gpio: fsl-imx-gpio: Add gpio-ranges property The GPIO controller node can have gpio-ranges property. This fixes dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: gpio@30200000: 'gpio-ranges' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200825193536.7332-3-krzk@kernel.org commit bf276877ef090a96deee7a6e08c741b48120b2ef Author: Krzysztof Kozlowski Date: Tue Aug 25 21:35:18 2020 +0200 dt-bindings: gpio: fsl-imx-gpio: Add i.MX 8 compatibles DTSes with new i.MX 8 SoCs introduce their own compatibles so add them to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: gpio@30200000: compatible:0: 'fsl,imx8mm-gpio' is not one of ['fsl,imx1-gpio', 'fsl,imx21-gpio', 'fsl,imx31-gpio', 'fsl,imx35-gpio', 'fsl,imx7d-gpio'] From schema: Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: gpio@30200000: compatible: ['fsl,imx8mm-gpio', 'fsl,imx35-gpio'] is too long arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: gpio@30200000: compatible: Additional items are not allowed ('fsl,imx35-gpio' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200825193536.7332-2-krzk@kernel.org commit 5df7ef7d32fec1d6d1c34dbec019b461a12ce870 Author: Tom Yan Date: Fri Sep 4 02:17:25 2020 +0800 uas: bump hw_max_sectors to 2048 blocks for SS or faster drives There's no reason for uas to use a smaller value of max_sectors than usb-storage. Signed-off-by: Tom Yan Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20200903181725.2931-3-tom.ty89@gmail.com Signed-off-by: Greg Kroah-Hartman commit 558033c2828f832ab3b68c6f8b8710e0de6faef0 Author: Tom Yan Date: Fri Sep 4 02:17:24 2020 +0800 uas: fix sdev->host->dma_dev Use scsi_add_host_with_dma() instead of scsi_add_host(). When the scsi request queue is initialized/allocated, hw_max_sectors is clamped to the dma max mapping size. Therefore, the correct device that should be used for the clamping needs to be set. The same clamping is still needed in uas as hw_max_sectors could be changed there. The original clamping would be invalidated in such cases. Signed-off-by: Tom Yan Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20200903181725.2931-2-tom.ty89@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0154012f8018bba4d9971d1007c12ffd48539ddb Author: Tom Yan Date: Fri Sep 4 02:17:23 2020 +0800 usb-storage: fix sdev->host->dma_dev Use scsi_add_host_with_dma() instead of scsi_add_host(). When the scsi request queue is initialized/allocated, hw_max_sectors is clamped to the dma max mapping size. Therefore, the correct device that should be used for the clamping needs to be set. The same clamping is still needed in usb-storage as hw_max_sectors could be changed there. The original clamping would be invalidated in such cases. Signed-off-by: Tom Yan Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20200903181725.2931-1-tom.ty89@gmail.com Signed-off-by: Greg Kroah-Hartman commit f0dbd25f422f6abb44b6317cbf881b921741e753 Author: Paul Cercueil Date: Thu Sep 3 13:25:37 2020 +0200 usb/host: ehci-npcm7xx: Use pm_ptr() macro Use the newly introduced pm_ptr() macro, and mark the suspend/resume functions __maybe_unused. These functions can then be moved outside the CONFIG_PM_SUSPEND block, and the compiler can then process them and detect build failures independently of the config. If unused, they will simply be discarded by the compiler. Signed-off-by: Paul Cercueil Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200903112554.34263-4-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman commit 1874b630bd853408cd2813e254694fe7a03b5f5e Author: Paul Cercueil Date: Thu Sep 3 13:25:36 2020 +0200 usb/host: ehci-spear: Use pm_ptr() macro Use the newly introduced pm_ptr() macro, and mark the suspend/resume functions __maybe_unused. These functions can then be moved outside the CONFIG_PM_SUSPEND block, and the compiler can then process them and detect build failures independently of the config. If unused, they will simply be discarded by the compiler. Signed-off-by: Paul Cercueil Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200903112554.34263-3-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman commit 7456fe486a31308c79efa891c1be795715bf0070 Author: Paul Cercueil Date: Thu Sep 3 13:25:38 2020 +0200 usb/host: ehci-platform: Use pm_ptr() macro Use the newly introduced pm_ptr() macro, and mark the suspend/resume functions __maybe_unused. These functions can then be moved outside the CONFIG_PM_SUSPEND block, and the compiler can then process them and detect build failures independently of the config. If unused, they will simply be discarded by the compiler. Signed-off-by: Paul Cercueil Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200903112554.34263-5-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman commit 879a4a662873d40e20cd75e8b68539f7befb8e51 Author: Paul Cercueil Date: Thu Sep 3 13:25:41 2020 +0200 usb/misc: usb3503: Use pm_ptr() macro Use the newly introduced pm_ptr() macro, and mark the suspend/resume functions __maybe_unused. These functions can then be moved outside the CONFIG_PM_SUSPEND block, and the compiler can then process them and detect build failures independently of the config. If unused, they will simply be discarded by the compiler. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200903112554.34263-8-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman commit 7aea2a7ddc2eb202e7963bd390d7b069f6e116dd Author: Paul Cercueil Date: Thu Sep 3 13:25:42 2020 +0200 usb/misc: usb4604: Use pm_ptr() macro Use the newly introduced pm_ptr() macro, and mark the suspend/resume functions __maybe_unused. These functions can then be moved outside the CONFIG_PM_SUSPEND block, and the compiler can then process them and detect build failures independently of the config. If unused, they will simply be discarded by the compiler. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200903112554.34263-9-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman commit f2ea828d18fecb89e6669eec747cb88fddedac81 Author: Lad Prabhakar Date: Fri Aug 28 08:50:19 2020 +0100 dt-bindings: usb: renesas,usb-xhci: Document r8a774e1 support Document r8a774e1 xhci support. The driver will use the fallback compatible string "renesas,rcar-gen3-xhci", therefore no driver change is needed. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20200828075019.541-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit bb0634ece928914f5de00ce5aa75bf3bb48f0a4e Author: Sergey Shtylyov Date: Sat Aug 29 20:30:42 2020 +0300 usb: core: driver: fix stray tabs in error messages Commit 8bb54ab573ec ("usbcore: add usb_device_driver definition") added the printk() calls with the error massages spoilt due to the stray tabs in the middle. Remove these tabs and convert printk() calls to pr_err() for consistency with the other code, while at it. Fixes: 8bb54ab573ec ("usbcore: add usb_device_driver definition") Signed-off-by: Sergey Shtylyov Acked-by: Alan Stern Link: https://lore.kernel.org/r/4beb55c4-eb34-7744-155f-033b8f527e23@omprussia.ru Signed-off-by: Greg Kroah-Hartman commit f9bec5d756b30d5b21aa5ff9b7d5d115741517c1 Author: Daniel T. Lee Date: Fri Sep 4 15:34:34 2020 +0900 samples, bpf: Add xsk_fwd test file to .gitignore This commit adds xsk_fwd test file to .gitignore which is newly added to samples/bpf. Signed-off-by: Daniel T. Lee Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200904063434.24963-2-danieltimlee@gmail.com commit 698584dffd4bca834ac4733fc6a659a0a0d213e7 Author: Daniel T. Lee Date: Fri Sep 4 15:34:33 2020 +0900 samples, bpf: Replace bpf_program__title() with bpf_program__section_name() From commit 521095842027 ("libbpf: Deprecate notion of BPF program "title" in favor of "section name""), the term title has been replaced with section name in libbpf. Since the bpf_program__title() has been deprecated, this commit switches this function to bpf_program__section_name(). Due to this commit, the compilation warning issue has also been resolved. Fixes: 521095842027 ("libbpf: Deprecate notion of BPF program "title" in favor of "section name"") Signed-off-by: Daniel T. Lee Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200904063434.24963-1-danieltimlee@gmail.com commit 19bad6999dc14529b12ed81d38c5910837b9ddd7 Author: Bryan Brattlof Date: Wed Sep 2 19:22:05 2020 +0000 staging: pi433: break long lines scripts/checkpatch.pl is warning about some lines exceeding 100 charecters. This will cleanup the warnings. Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/87y2lsrnl8.fsf@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit f03d8d46172f8310bae023d2ac829690b0d9adc9 Author: Ross Schmidt Date: Wed Sep 2 14:20:44 2020 -0500 staging: rtl8723bs: os_dep: added blank line to fix coding style issue Fixed a coding style issue by adding a blank line after declarations in sdio_intf.c to fix a checkpatch warning. Signed-off-by: Ross Schmidt Link: https://lore.kernel.org/r/20200902192044.19143-1-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman commit d53d9bc0cf783e93b374de3895145c7375e570ba Author: Peter Zijlstra Date: Wed Sep 2 15:26:02 2020 +0200 x86/debug: Change thread.debugreg6 to thread.virtual_dr6 Current usage of thread.debugreg6 is convoluted at best. It starts life as a copy of the hardware DR6 value, but then various bits are cleared and set. Replace this with a new variable thread.virtual_dr6 that is initialized to 0 when DR6 is read and only gains bits, at the same time the actual (on stack) dr6 value which is read from the hardware only gets bits cleared. Suggested-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Link: https://lore.kernel.org/r/20200902133201.415372940@infradead.org commit f4956cf83ed12271bdbd5b547f3378add72bbffb Author: Peter Zijlstra Date: Wed Sep 2 15:26:01 2020 +0200 x86/debug: Support negative polarity DR6 bits DR6 has a whole bunch of bits that have negative polarity; they were architecturally reserved and defined to be 1 and are now getting used. Since they're 1 by default, 0 becomes the signal value. Handle this by xor'ing the read DR6 value by the reserved mask, this will flip them around such that 1 is the signal value (positive polarity). Current Linux doesn't yet support any of these bits, but there's two defined: - DR6[11] Bus Lock Debug Exception (ISEr39) - DR6[16] Restricted Transactional Memory (SDM) Update ptrace_{set,get}_debugreg() to provide/consume the value in architectural polarity. Although afaict ptrace_set_debugreg(6) is pointless, the value is not consumed anywhere. Change hw_breakpoint_restore() to alway write the DR6_RESERVED value to DR6, again, no consumer for that write. Suggested-by: Andrew Cooper Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Link: https://lore.kernel.org/r/20200902133201.354220797@infradead.org commit 21d44be7b6ff4c254dc971e2c99d4082dd470afd Author: Peter Zijlstra Date: Wed Sep 2 15:26:00 2020 +0200 x86/debug: Simplify hw_breakpoint_handler() This is called with interrupts disabled, there's no point in using get_cpu() and per_cpu(). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Link: https://lore.kernel.org/r/20200902133201.292906672@infradead.org commit b84d42b6c6ac6a60519286e72b69f2dbf08dfb70 Author: Peter Zijlstra Date: Wed Sep 2 15:25:59 2020 +0200 x86/debug: Remove aout_dump_debugregs() Unused remnants for the bit-bucket. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Link: https://lore.kernel.org/r/20200902133201.233022474@infradead.org commit 389cd0cd8b3790b555c3679da946f4aa4fba3bab Author: Peter Zijlstra Date: Wed Sep 2 15:25:58 2020 +0200 x86/debug: Remove the historical junk Remove the historical junk and replace it with a WARN and a comment. The problem is that even though the kernel only uses TF single-step in kprobes and KGDB, both of which consume the event before this, QEMU/KVM has bugs in this area that can trigger this state so it has to be dealt with. Suggested-by: Brian Gerst Suggested-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Link: https://lore.kernel.org/r/20200902133201.170216274@infradead.org commit f0b67c39c190e19bc1604a13bcc985c4445a4b2f Author: Peter Zijlstra Date: Wed Sep 2 15:25:57 2020 +0200 x86/debug: Move cond_local_irq_enable() block into exc_debug_user() The cond_local_irq_enable() block, dealing with vm86 and sending signals is only relevant for #DB-from-user, move it there. This then reduces handle_debug() to only the notifier call, so rename it to notify_debug(). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Link: https://lore.kernel.org/r/20200902133201.094265982@infradead.org commit 4eb5acc39187a7ba578fbb44f7bb1965057309ae Author: Peter Zijlstra Date: Wed Sep 2 15:25:56 2020 +0200 x86/debug: Move historical SYSENTER junk into exc_debug_kernel() The historical SYSENTER junk is explicitly for from-kernel, so move it to the #DB-from-kernel handler. It is ordered after the notifier, which is important for KGDB which uses TF single-step and needs to consume the event before that point. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Link: https://lore.kernel.org/r/20200902133201.031099736@infradead.org commit 4182e9436916a48f16207f0619562f1d3843a0c8 Author: Peter Zijlstra Date: Wed Sep 2 15:25:55 2020 +0200 x86/debug: Simplify #DB signal code There's no point in calculating si_code if it's not going to be used. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Link: https://lore.kernel.org/r/20200902133200.967434217@infradead.org commit 7043679a989af969e9f20cc7d90195b36f54036f Author: Peter Zijlstra Date: Wed Sep 2 15:25:54 2020 +0200 x86/debug: Remove handle_debug(.user) argument The handle_debug(.user) argument is used to terminate the #DB handler early for the INT1-from-kernel case, since the kernel doesn't use INT1. Remove the argument and handle this explicitly in #DB-from-kernel. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Acked-by: Andy Lutomirski Link: https://lore.kernel.org/r/20200902133200.907020598@infradead.org commit 20a6e35a948284b8ab246ed35eefc56d674ad076 Author: Peter Zijlstra Date: Wed Sep 2 15:25:53 2020 +0200 x86/debug: Move kprobe_debug_handler() into exc_debug_kernel() Kprobes are on kernel text, and thus only matter for #DB-from-kernel. Kprobes are ordered before the generic notifier, preserve that order. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Acked-by: Masami Hiramatsu Acked-by: Andy Lutomirski Link: https://lore.kernel.org/r/20200902133200.847465360@infradead.org commit c182487da1b5281463f2255d2347885dba219c08 Author: Peter Zijlstra Date: Wed Sep 2 15:25:52 2020 +0200 x86/debug: Sync BTF earlier Move the BTF sync near the DR6 load, as this will be the only common code guaranteed to run on every #DB. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Acked-by: Andy Lutomirski Link: https://lore.kernel.org/r/20200902133200.786888252@infradead.org commit 153908ebc8b5721658c4aba92779fc6e3e2d5a61 Author: Daniel Bristot de Oliveira Date: Fri Sep 4 11:26:23 2020 +0200 MAINTAINERS: Add myself as SCHED_DEADLINE reviewer As discussed with Juri and Peter. Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Acked-by: Juri Lelli Link: https://lore.kernel.org/r/4476a6da70949913a59dab9aacfbd12162c1fbd7.1599146667.git.bristot@redhat.com commit 8eb629585d2231e90112148009e2a11b0979ca38 Author: Andrii Nakryiko Date: Thu Sep 3 21:16:11 2020 -0700 libbpf: Fix potential multiplication overflow Detected by LGTM static analyze in Github repo, fix potential multiplication overflow before result is casted to size_t. Fixes: 8505e8709b5e ("libbpf: Implement generalized .BTF.ext func/line info adjustment") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200904041611.1695163-2-andriin@fb.com commit 17e54b096e6a8dc92b92c59c2e3437550383b27a Author: Andrii Nakryiko Date: Thu Sep 3 21:16:10 2020 -0700 libbpf: Fix another __u64 cast in printf Another issue of __u64 needing either %lu or %llu, depending on the architecture. Fix with cast to `unsigned long long`. Fixes: 7e06aad52929 ("libbpf: Add multi-prog section support for struct_ops") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200904041611.1695163-1-andriin@fb.com commit 404d0b308e4f730b1c9b2f33e84a6f7069db94c5 Author: Dmitry Osipenko Date: Tue Sep 1 23:37:30 2020 +0300 iommu/tegra-smmu: Add locking around mapping operations The mapping operations of the Tegra SMMU driver are subjected to a race condition issues because SMMU Address Space isn't allocated and freed atomically, while it should be. This patch makes the mapping operations atomic, it fixes an accidentally released Host1x Address Space problem which happens while running multiple graphics tests in parallel on Tegra30, i.e. by having multiple threads racing with each other in the Host1x's submission and completion code paths, performing IOVA mappings and unmappings in parallel. Signed-off-by: Dmitry Osipenko Tested-by: Thierry Reding Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20200901203730.27865-1-digetx@gmail.com Signed-off-by: Joerg Roedel commit cd89597bbe5a0179b3f0f51604cb36a1ffd4e080 Author: Christian Brauner Date: Wed Sep 2 12:21:30 2020 +0200 tests: add waitid() tests for non-blocking pidfds Verify that the PIDFD_NONBLOCK flag works with pidfd_open() and that waitid() with a non-blocking pidfd returns EAGAIN: TAP version 13 1..3 # Starting 3 tests from 1 test cases. # RUN global.wait_simple ... # OK global.wait_simple ok 1 global.wait_simple # RUN global.wait_states ... # OK global.wait_states ok 2 global.wait_states # RUN global.wait_nonblock ... # OK global.wait_nonblock ok 3 global.wait_nonblock # PASSED: 3 / 3 tests passed. # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Christian Brauner Reviewed-by: Josh Triplett Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Link: https://lore.kernel.org/r/20200902102130.147672-5-christian.brauner@ubuntu.com commit df9d7a22dd21c926e8175ccc6e176cb45fc7cb09 Author: Vincenzo Frascino Date: Fri Sep 6 10:52:39 2019 +0100 arm64: mte: Add Memory Tagging Extension documentation Memory Tagging Extension (part of the ARMv8.5 Extensions) provides a mechanism to detect the sources of memory related errors which may be vulnerable to exploitation, including bounds violations, use-after-free, use-after-return, use-out-of-scope and use before initialization errors. Add Memory Tagging Extension documentation for the arm64 linux kernel support. Signed-off-by: Vincenzo Frascino Co-developed-by: Catalin Marinas Signed-off-by: Catalin Marinas Acked-by: Szabolcs Nagy Cc: Will Deacon commit 89b94df9dfb16fe29f9d2085b0a98116dc34d814 Author: Vincenzo Frascino Date: Fri Sep 6 11:08:29 2019 +0100 arm64: mte: Kconfig entry Add Memory Tagging Extension support to the arm64 kbuild. Signed-off-by: Vincenzo Frascino Co-developed-by: Catalin Marinas Signed-off-by: Catalin Marinas Cc: Will Deacon commit ee11f332af96a3b5d29586bc6d69b41531f62648 Author: Steven Price Date: Wed May 13 16:37:51 2020 +0100 arm64: mte: Save tags when hibernating When hibernating the contents of all pages in the system are written to disk, however the MTE tags are not visible to the generic hibernation code. So just before the hibernation image is created copy the tags out of the physical tag storage into standard memory so they will be included in the hibernation image. After hibernation apply the tags back into the physical tag storage. Signed-off-by: Steven Price Signed-off-by: Catalin Marinas Cc: James Morse Cc: Will Deacon commit 36943aba91860269abfba2e736e9534d48e90cae Author: Steven Price Date: Wed May 13 16:37:50 2020 +0100 arm64: mte: Enable swap of tagged pages When swapping pages out to disk it is necessary to save any tags that have been set, and restore when swapping back in. Make use of the new page flag (PG_ARCH_2, locally named PG_mte_tagged) to identify pages with tags. When swapping out these pages the tags are stored in memory and later restored when the pages are brought back in. Because shmem can swap pages back in without restoring the userspace PTE it is also necessary to add a hook for shmem. Signed-off-by: Steven Price [catalin.marinas@arm.com: move function prototypes to mte.h] [catalin.marinas@arm.com: drop '_tags' from arch_swap_restore_tags()] Signed-off-by: Catalin Marinas Cc: Andrew Morton Cc: Will Deacon commit 8a84802e2a2b1a682761a31c2685506b9f4e1840 Author: Steven Price Date: Wed May 13 16:37:49 2020 +0100 mm: Add arch hooks for saving/restoring tags Arm's Memory Tagging Extension (MTE) adds some metadata (tags) to every physical page, when swapping pages out to disk it is necessary to save these tags, and later restore them when reading the pages back. Add some hooks along with dummy implementations to enable the arch code to handle this. Three new hooks are added to the swap code: * arch_prepare_to_swap() and * arch_swap_invalidate_page() / arch_swap_invalidate_area(). One new hook is added to shmem: * arch_swap_restore() Signed-off-by: Steven Price [catalin.marinas@arm.com: add unlock_page() on the error path] [catalin.marinas@arm.com: dropped the _tags suffix] Signed-off-by: Catalin Marinas Acked-by: Andrew Morton commit d563d678aa0be06e7bff2953c986f5ff0355f79c Author: Catalin Marinas Date: Wed Jul 1 17:46:06 2020 +0100 fs: Handle intra-page faults in copy_mount_options() The copy_mount_options() function takes a user pointer argument but no size and it tries to read up to a PAGE_SIZE. However, copy_from_user() is not guaranteed to return all the accessible bytes if, for example, the access crosses a page boundary and gets a fault on the second page. To work around this, the current copy_mount_options() implementation performs two copy_from_user() passes, first to the end of the current page and the second to what's left in the subsequent page. On arm64 with MTE enabled, access to a user page may trigger a fault after part of the buffer in a page has been copied (when the user pointer tag, bits 56-59, no longer matches the allocation tag stored in memory). Allow copy_mount_options() to handle such intra-page faults by resorting to byte at a time copy in case of copy_from_user() failure. Note that copy_from_user() handles the zeroing of the kernel buffer in case of error. Signed-off-by: Catalin Marinas Cc: Alexander Viro commit 2200aa7154cb7ef76bac93e98326883ba64bfa2e Author: Catalin Marinas Date: Fri Jul 3 15:12:57 2020 +0100 arm64: mte: ptrace: Add NT_ARM_TAGGED_ADDR_CTRL regset This regset allows read/write access to a ptraced process prctl(PR_SET_TAGGED_ADDR_CTRL) setting. Signed-off-by: Catalin Marinas Cc: Will Deacon Cc: Alan Hayward Cc: Luis Machado Cc: Omair Javaid commit 18ddbaa02b7a64f4cf3e7e3d4b78b8b70481a17b Author: Catalin Marinas Date: Mon Mar 30 10:29:38 2020 +0100 arm64: mte: ptrace: Add PTRACE_{PEEK,POKE}MTETAGS support Add support for bulk setting/getting of the MTE tags in a tracee's address space at 'addr' in the ptrace() syscall prototype. 'data' points to a struct iovec in the tracer's address space with iov_base representing the address of a tracer's buffer of length iov_len. The tags to be copied to/from the tracer's buffer are stored as one tag per byte. On successfully copying at least one tag, ptrace() returns 0 and updates the tracer's iov_len with the number of tags copied. In case of error, either -EIO or -EFAULT is returned, trying to follow the ptrace() man page. Note that the tag copying functions are not performance critical, therefore they lack optimisations found in typical memory copy routines. Signed-off-by: Catalin Marinas Cc: Will Deacon Cc: Alan Hayward Cc: Luis Machado Cc: Omair Javaid commit 93f067f6caf5941cc730e99ce72042304e0e6ff5 Author: Catalin Marinas Date: Fri Jul 3 14:25:50 2020 +0100 arm64: mte: Allow {set,get}_tagged_addr_ctrl() on non-current tasks In preparation for ptrace() access to the prctl() value, allow calling these functions on non-current tasks. Signed-off-by: Catalin Marinas Cc: Will Deacon commit 39d08e8318c49c5fd2bda9cadfd2bc54d2d3dfd8 Author: Catalin Marinas Date: Fri Apr 17 18:29:35 2020 +0100 arm64: mte: Restore the GCR_EL1 register after a suspend The CPU resume/suspend routines only take care of the common system registers. Restore GCR_EL1 in addition via the __cpu_suspend_exit() function. Signed-off-by: Catalin Marinas Cc: Will Deacon Reviewed-by: Lorenzo Pieralisi commit af5ce95282dc99d08a27a407a02c763dde1c5558 Author: Catalin Marinas Date: Tue Dec 10 11:19:15 2019 +0000 arm64: mte: Allow user control of the generated random tags via prctl() The IRG, ADDG and SUBG instructions insert a random tag in the resulting address. Certain tags can be excluded via the GCR_EL1.Exclude bitmap when, for example, the user wants a certain colour for freed buffers. Since the GCR_EL1 register is not accessible at EL0, extend the prctl(PR_SET_TAGGED_ADDR_CTRL) interface to include a 16-bit field in the first argument for controlling which tags can be generated by the above instruction (an include rather than exclude mask). Note that by default all non-zero tags are excluded. This setting is per-thread. Signed-off-by: Catalin Marinas Cc: Will Deacon commit 1c101da8b971a36695319dce7a24711dc567a0dd Author: Catalin Marinas Date: Wed Nov 27 10:30:15 2019 +0000 arm64: mte: Allow user control of the tag check mode via prctl() By default, even if PROT_MTE is set on a memory range, there is no tag check fault reporting (SIGSEGV). Introduce a set of option to the exiting prctl(PR_SET_TAGGED_ADDR_CTRL) to allow user control of the tag check fault mode: PR_MTE_TCF_NONE - no reporting (default) PR_MTE_TCF_SYNC - synchronous tag check fault reporting PR_MTE_TCF_ASYNC - asynchronous tag check fault reporting These options translate into the corresponding SCTLR_EL1.TCF0 bitfield, context-switched by the kernel. Note that the kernel accesses to the user address space (e.g. read() system call) are not checked if the user thread tag checking mode is PR_MTE_TCF_NONE or PR_MTE_TCF_ASYNC. If the tag checking mode is PR_MTE_TCF_SYNC, the kernel makes a best effort to check its user address accesses, however it cannot always guarantee it. Signed-off-by: Catalin Marinas Cc: Will Deacon commit 51b0bff2f703f7ecfeb228eaa3d8f6090c18c9c1 Author: Catalin Marinas Date: Fri Nov 29 12:45:08 2019 +0000 mm: Allow arm64 mmap(PROT_MTE) on RAM-based files Since arm64 memory (allocation) tags can only be stored in RAM, mapping files with PROT_MTE is not allowed by default. RAM-based files like those in a tmpfs mount or memfd_create() can support memory tagging, so update the vm_flags accordingly in shmem_mmap(). Signed-off-by: Catalin Marinas Acked-by: Andrew Morton commit 0042090548740921951f31fc0c20dcdb96638cb0 Author: Catalin Marinas Date: Fri Aug 9 15:48:46 2019 +0100 arm64: mte: Validate the PROT_MTE request via arch_validate_flags() Make use of the newly introduced arch_validate_flags() hook to sanity-check the PROT_MTE request passed to mmap() and mprotect(). If the mapping does not support MTE, these syscalls will return -EINVAL. Signed-off-by: Catalin Marinas Cc: Will Deacon commit c462ac288f2c97e0c1d9ff6a65955317e799f958 Author: Catalin Marinas Date: Mon Nov 25 17:27:06 2019 +0000 mm: Introduce arch_validate_flags() Similarly to arch_validate_prot() called from do_mprotect_pkey(), an architecture may need to sanity-check the new vm_flags. Define a dummy function always returning true. In addition to do_mprotect_pkey(), also invoke it from mmap_region() prior to updating vma->vm_page_prot to allow the architecture code to veto potentially inconsistent vm_flags. Signed-off-by: Catalin Marinas Acked-by: Andrew Morton commit 9f3419315f3cdc41a7318e4d50ba18a592b30c8c Author: Catalin Marinas Date: Wed Nov 27 10:00:27 2019 +0000 arm64: mte: Add PROT_MTE support to mmap() and mprotect() To enable tagging on a memory range, the user must explicitly opt in via a new PROT_MTE flag passed to mmap() or mprotect(). Since this is a new memory type in the AttrIndx field of a pte, simplify the or'ing of these bits over the protection_map[] attributes by making MT_NORMAL index 0. There are two conditions for arch_vm_get_page_prot() to return the MT_NORMAL_TAGGED memory type: (1) the user requested it via PROT_MTE, registered as VM_MTE in the vm_flags, and (2) the vma supports MTE, decided during the mmap() call (only) and registered as VM_MTE_ALLOWED. arch_calc_vm_prot_bits() is responsible for registering the user request as VM_MTE. The newly introduced arch_calc_vm_flag_bits() sets VM_MTE_ALLOWED if the mapping is MAP_ANONYMOUS. An MTE-capable filesystem (RAM-based) may be able to set VM_MTE_ALLOWED during its mmap() file ops call. In addition, update VM_DATA_DEFAULT_FLAGS to allow mprotect(PROT_MTE) on stack or brk area. The Linux mmap() syscall currently ignores unknown PROT_* flags. In the presence of MTE, an mmap(PROT_MTE) on a file which does not support MTE will not report an error and the memory will not be mapped as Normal Tagged. For consistency, mprotect(PROT_MTE) will not report an error either if the memory range does not support MTE. Two subsequent patches in the series will propose tightening of this behaviour. Co-developed-by: Vincenzo Frascino Signed-off-by: Vincenzo Frascino Signed-off-by: Catalin Marinas Cc: Will Deacon commit b3fbbea4c00220f62e6f7e2514466e6ee81f7f60 Author: Kevin Brodsky Date: Mon Nov 25 17:27:06 2019 +0000 mm: Introduce arch_calc_vm_flag_bits() Similarly to arch_calc_vm_prot_bits(), introduce a dummy arch_calc_vm_flag_bits() invoked from calc_vm_flag_bits(). This macro can be overridden by architectures to insert specific VM_* flags derived from the mmap() MAP_* flags. Signed-off-by: Kevin Brodsky Signed-off-by: Catalin Marinas Cc: Andrew Morton commit 4d1a8a2dc0f4cdc2d74491a60709e698f85daf55 Author: Catalin Marinas Date: Wed Nov 27 09:53:44 2019 +0000 arm64: mte: Tags-aware aware memcmp_pages() implementation When the Memory Tagging Extension is enabled, two pages are identical only if both their data and tags are identical. Make the generic memcmp_pages() a __weak function and add an arm64-specific implementation which returns non-zero if any of the two pages contain valid MTE tags (PG_mte_tagged set). There isn't much benefit in comparing the tags of two pages since these are normally used for heap allocations and likely to differ anyway. Co-developed-by: Vincenzo Frascino Signed-off-by: Vincenzo Frascino Signed-off-by: Catalin Marinas Cc: Will Deacon commit 738c8780fc1fa11fb996a962a54703d0450cae59 Author: Catalin Marinas Date: Sun Jun 21 11:41:27 2020 +0100 arm64: Avoid unnecessary clear_user_page() indirection Since clear_user_page() calls clear_page() directly, avoid the unnecessary indirection. Signed-off-by: Catalin Marinas Cc: Will Deacon commit 2563776b41c3190849c6b011c72b47bff314963d Author: Vincenzo Frascino Date: Tue Aug 6 11:37:53 2019 +0100 arm64: mte: Tags-aware copy_{user_,}highpage() implementations When the Memory Tagging Extension is enabled, the tags need to be preserved across page copy (e.g. for copy-on-write, page migration). Introduce MTE-aware copy_{user_,}highpage() functions to copy tags to the destination if the source page has the PG_mte_tagged flag set. copy_user_page() does not need to handle tag copying since, with this patch, it is only called by the DAX code where there is no source page structure (and no source tags). Signed-off-by: Vincenzo Frascino Co-developed-by: Catalin Marinas Signed-off-by: Catalin Marinas Cc: Will Deacon commit 34bfeea4a9e9cdae713637541f240c3adfdfede3 Author: Catalin Marinas Date: Mon May 4 14:42:36 2020 +0100 arm64: mte: Clear the tags when a page is mapped in user-space with PROT_MTE Pages allocated by the kernel are not guaranteed to have the tags zeroed, especially as the kernel does not (yet) use MTE itself. To ensure the user can still access such pages when mapped into its address space, clear the tags via set_pte_at(). A new page flag - PG_mte_tagged (PG_arch_2) - is used to track pages with valid allocation tags. Since the zero page is mapped as pte_special(), it won't be covered by the above set_pte_at() mechanism. Clear its tags during early MTE initialisation. Co-developed-by: Steven Price Signed-off-by: Steven Price Signed-off-by: Catalin Marinas Cc: Will Deacon commit 72e6afa08e988744822f9bf18043fc04c4df2178 Author: Catalin Marinas Date: Thu Jul 2 10:19:30 2020 +0100 mm: Preserve the PG_arch_2 flag in __split_huge_page_tail() When a huge page is split into normal pages, part of the head page flags are transferred to the tail pages. However, the PG_arch_* flags are not part of the preserved set. PG_arch_2 is used by the arm64 MTE support to mark pages that have valid tags. The absence of such flag would cause the arm64 set_pte_at() to clear the tags in order to avoid stale tags exposed to user or the swapping out hooks to ignore the tags. Not preserving PG_arch_2 on huge page splitting leads to tag corruption in the tail pages. Preserve the newly added PG_arch_2 flag in __split_huge_page_tail(). Signed-off-by: Catalin Marinas Cc: Andrew Morton commit 4beba9486abd2f86d125271d6946f7c38ed0fe77 Author: Steven Price Date: Wed Apr 22 15:25:27 2020 +0100 mm: Add PG_arch_2 page flag For arm64 MTE support it is necessary to be able to mark pages that contain user space visible tags that will need to be saved/restored e.g. when swapped out. To support this add a new arch specific flag (PG_arch_2). This flag is only available on 64-bit architectures due to the limited number of spare page flags on the 32-bit ones. Signed-off-by: Steven Price [catalin.marinas@arm.com: use CONFIG_64BIT for guarding this new flag] Signed-off-by: Catalin Marinas Cc: Andrew Morton commit 637ec831ea4f09c7529ac4078399ce4e25b46341 Author: Vincenzo Frascino Date: Mon Sep 16 11:51:17 2019 +0100 arm64: mte: Handle synchronous and asynchronous tag check faults The Memory Tagging Extension has two modes of notifying a tag check fault at EL0, configurable through the SCTLR_EL1.TCF0 field: 1. Synchronous raising of a Data Abort exception with DFSC 17. 2. Asynchronous setting of a cumulative bit in TFSRE0_EL1. Add the exception handler for the synchronous exception and handling of the asynchronous TFSRE0_EL1.TF0 bit setting via a new TIF flag in do_notify_resume(). On a tag check failure in user-space, whether synchronous or asynchronous, a SIGSEGV will be raised on the faulting thread. Signed-off-by: Vincenzo Frascino Co-developed-by: Catalin Marinas Signed-off-by: Catalin Marinas Cc: Will Deacon commit 74f1082487feb90bbf880af14beb8e29c3030c9f Author: Vincenzo Frascino Date: Wed Aug 7 12:21:05 2019 +0100 arm64: mte: Add specific SIGSEGV codes Add MTE-specific SIGSEGV codes to siginfo.h and update the x86 BUILD_BUG_ON(NSIGSEGV != 7) compile check. Signed-off-by: Vincenzo Frascino [catalin.marinas@arm.com: renamed precise/imprecise to sync/async] [catalin.marinas@arm.com: dropped #ifdef __aarch64__, renumbered] Signed-off-by: Catalin Marinas Acked-by: "Eric W. Biederman" Cc: Arnd Bergmann Cc: Will Deacon commit 2ac638fc5724f011f8ba1b425667c5592e1571ce Author: Catalin Marinas Date: Wed Aug 26 18:52:59 2020 +0100 arm64: kvm: mte: Hide the MTE CPUID information from the guests KVM does not support MTE in guests yet, so clear the corresponding field in the ID_AA64PFR1_EL1 register. In addition, inject an undefined exception in the guest if it accesses one of the GCR_EL1, RGSR_EL1, TFSR_EL1 or TFSRE0_EL1 registers. While the emulate_sys_reg() function already injects an undefined exception, this patch prevents the unnecessary printk. Signed-off-by: Catalin Marinas Cc: Steven Price Acked-by: Marc Zyngier commit 03c7b78b0b780ac7600641e9a59ae0610679122b Author: Joerg Roedel Date: Fri Sep 4 13:39:06 2020 +0200 iommu/sun50i: Fix set-but-not-used variable warning Fix the following warning the the SUN50I driver: drivers/iommu/sun50i-iommu.c: In function 'sun50i_iommu_irq': drivers/iommu/sun50i-iommu.c:890:14: warning: variable 'iova' set but not used [-Wunused-but-set-variable] 890 | phys_addr_t iova; | ^~~~ Reported-by: kernel test robot Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20200904113906.3906-1-joro@8bytes.org Signed-off-by: Joerg Roedel commit c2c59456e1fcad3f464761c5839399176e3a934a Author: Miles Chen Date: Fri Sep 4 18:40:38 2020 +0800 iommu/mediatek: Check 4GB mode by reading infracfg In previous discussion [1] and [2], we found that it is risky to use max_pfn or totalram_pages to tell if 4GB mode is enabled. Check 4GB mode by reading infracfg register, remove the usage of the un-exported symbol max_pfn. This is a step towards building mtk_iommu as a kernel module. [1] https://lore.kernel.org/lkml/20200603161132.2441-1-miles.chen@mediatek.com/ [2] https://lore.kernel.org/lkml/20200604080120.2628-1-miles.chen@mediatek.com/ [3] https://lore.kernel.org/lkml/20200715205120.GA778876@bogus/ Cc: Mike Rapoport Cc: David Hildenbrand Cc: Yong Wu Cc: Yingjoe Chen Cc: Christoph Hellwig Cc: Rob Herring Cc: Matthias Brugger Cc: Joerg Roedel Reviewed-by: Matthias Brugger Signed-off-by: Miles Chen Link: https://lore.kernel.org/r/20200904104038.4979-1-miles.chen@mediatek.com Signed-off-by: Joerg Roedel commit d6843dda38dfa6dec213786d514051af34c9b84c Author: Jani Nikula Date: Wed Sep 2 17:30:23 2020 +0300 drm/i915: remove the extra modeset init layer Streamline the modeset init by removing the extra init layer. No functional changes, which means the cleanup path looks hideous. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/62c32c35683b843ecdc2eca2bd2d3e62cb705e96.1599056955.git.jani.nikula@intel.com commit 09d1de1a8e7b9fbf08e96e0aecf41f870e4433ee Author: Christian Brauner Date: Wed Sep 2 12:21:29 2020 +0200 tests: port pidfd_wait to kselftest harness All of the new pidfd selftests already use the new kselftest harness infrastructure. It makes for clearer output, makes the code easier to understand, and makes adding new tests way simpler. Signed-off-by: Christian Brauner Reviewed-by: Josh Triplett Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Link: https://lore.kernel.org/r/20200902102130.147672-4-christian.brauner@ubuntu.com commit 6da73d15258a1e5e86d03d4ffba8776d17a8a287 Author: Christian Brauner Date: Wed Sep 2 12:21:27 2020 +0200 pidfd: support PIDFD_NONBLOCK in pidfd_open() Introduce PIDFD_NONBLOCK to support non-blocking pidfd file descriptors. Ever since the introduction of pidfds and more advanced async io various programming languages such as Rust have grown support for async event libraries. These libraries are created to help build epoll-based event loops around file descriptors. A common pattern is to automatically make all file descriptors they manage to O_NONBLOCK. For such libraries the EAGAIN error code is treated specially. When a function is called that returns EAGAIN the function isn't called again until the event loop indicates the the file descriptor is ready. Supporting EAGAIN when waiting on pidfds makes such libraries just work with little effort. In the following patch we will extend waitid() internally to support non-blocking pidfds. This introduces a new flag PIDFD_NONBLOCK that is equivalent to O_NONBLOCK. This follows the same patterns we have for other (anon inode) file descriptors such as EFD_NONBLOCK, IN_NONBLOCK, SFD_NONBLOCK, TFD_NONBLOCK and the same for close-on-exec flags. Suggested-by: Josh Triplett Signed-off-by: Christian Brauner Reviewed-by: Josh Triplett Reviewed-by: Oleg Nesterov Cc: Kees Cook Cc: Sargun Dhillon Cc: Oleg Nesterov Link: https://lore.kernel.org/lkml/20200811181236.GA18763@localhost/ Link: https://github.com/joshtriplett/async-pidfd Link: https://lore.kernel.org/r/20200902102130.147672-2-christian.brauner@ubuntu.com commit ba7d25f3dff6adc03b669fea87e356b8dc04575e Author: Christian Brauner Date: Wed Sep 2 12:21:28 2020 +0200 exit: support non-blocking pidfds Passing a non-blocking pidfd to waitid() currently has no effect, i.e. is not supported. There are users which would like to use waitid() on pidfds that are O_NONBLOCK and mix it with pidfds that are blocking and both pass them to waitid(). The expected behavior is to have waitid() return -EAGAIN for non-blocking pidfds and to block for blocking pidfds without needing to perform any additional checks for flags set on the pidfd before passing it to waitid(). Non-blocking pidfds will return EAGAIN from waitid() when no child process is ready yet. Returning -EAGAIN for non-blocking pidfds makes it easier for event loops that handle EAGAIN specially. It also makes the API more consistent and uniform. In essence, waitid() is treated like a read on a non-blocking pidfd or a recvmsg() on a non-blocking socket. With the addition of support for non-blocking pidfds we support the same functionality that sockets do. For sockets() recvmsg() supports MSG_DONTWAIT for pidfds waitid() supports WNOHANG. Both flags are per-call options. In contrast non-blocking pidfds and non-blocking sockets are a setting on an open file description affecting all threads in the calling process as well as other processes that hold file descriptors referring to the same open file description. Both behaviors, per call and per open file description, have genuine use-cases. The implementation should be straightforward: - If a non-blocking pidfd is passed and WNOHANG is not raised we simply raise the WNOHANG flag internally. When do_wait() returns indicating that there are eligible child processes but none have exited yet we set EAGAIN. If no child process exists we continue returning ECHILD. - If a non-blocking pidfd is passed and WNOHANG is raised waitid() will continue returning 0, i.e. it will not set EAGAIN. This ensure backwards compatibility with applications passing WNOHANG explicitly with pidfds. A concrete use-case that was brought on-list was Josh's async pidfd library. Ever since the introduction of pidfds and more advanced async io various programming languages such as Rust have grown support for async event libraries. These libraries are created to help build epoll-based event loops around file descriptors. A common pattern is to automatically make all file descriptors they manage to O_NONBLOCK. For such libraries the EAGAIN error code is treated specially. When a function is called that returns EAGAIN the function isn't called again until the event loop indicates the the file descriptor is ready. Supporting EAGAIN when waiting on pidfds makes such libraries just work with little effort. Suggested-by: Josh Triplett Signed-off-by: Christian Brauner Reviewed-by: Josh Triplett Reviewed-by: Oleg Nesterov Cc: Kees Cook Cc: Sargun Dhillon Cc: Jann Horn Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Oleg Nesterov Cc: "Peter Zijlstra (Intel)" Link: https://lore.kernel.org/lkml/20200811181236.GA18763@localhost/ Link: https://github.com/joshtriplett/async-pidfd Link: https://lore.kernel.org/r/20200902102130.147672-3-christian.brauner@ubuntu.com commit eb4612d8ce4887f276c5bab67cb9921c399553d4 Author: Jani Nikula Date: Wed Sep 2 17:30:22 2020 +0300 drm/i915: split out intel_modeset_driver_remove_nogem() and simplify Split out a separate display function for driver remove after gem deinitialization. Note that the sequence is not symmetric with init. However use similar naming as that reflects the deinit sequence. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/197fa7e488b412e147ff0fe9440c48811888f1a6.1599056955.git.jani.nikula@intel.com commit 24d98a54b4a17ace71e01eb8862fb5ac1686962a Author: Jani Nikula Date: Wed Sep 2 17:30:21 2020 +0300 drm/i915: move more display related probe to intel_modeset_init_noirq() With the intel_modeset_* probe functions clarified, we can continue with moving more related calls to the right layer: - drm_vblank_init() - intel_bios_init() - intel_vga_register() - intel_csr_ucode_init() Unfortunately, for the time being, we also need to move a call to the *wrong* layer: the power domain init. No functional changes. v2: move probe failure while at it, power domain init Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/da229ffbed64983f002605074533c8b2878d17ee.1599056955.git.jani.nikula@intel.com commit a5f2488f645f1f4db292e0e1088c0af0465d8311 Author: Jani Nikula Date: Wed Sep 2 17:30:20 2020 +0300 drm/i915: split intel_modeset_init() pre/post gem init Turn current intel_modeset_init() to a pre-gem init function, and add a new intel_modeset_init() function and move all post-gem modeset init there, in the correct layer. No functional changes. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/5f4603f2c0216dba980338f00e0bfa791b526231.1599056955.git.jani.nikula@intel.com commit c7eb900f5f45eeab1ea1bed997a2a12d8b5907bc Author: Andy Shevchenko Date: Fri Aug 28 19:12:11 2020 +0300 iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header Static analyzer is not happy about intel_iommu_gfx_mapped declaration: .../drivers/iommu/intel/iommu.c:364:5: warning: symbol 'intel_iommu_gfx_mapped' was not declared. Should it be static? Move its declaration to Intel IOMMU header file. Signed-off-by: Andy Shevchenko Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20200828161212.71294-1-andriy.shevchenko@linux.intel.com Signed-off-by: Joerg Roedel commit ba328f82613260a098de7b4aff58743cd8733507 Author: Yuqi Jin Date: Thu Aug 27 16:43:54 2020 +0800 iommu/iova: Replace cmpxchg with xchg in queue_iova The performance of the atomic_xchg is better than atomic_cmpxchg because no comparison is required. While the value of @fq_timer_on can only be 0 or 1. Let's use atomic_xchg instead of atomic_cmpxchg here because we only need to check that the value changes from 0 to 1 or from 1 to 1. Signed-off-by: Yuqi Jin Signed-off-by: Shaokun Zhang Reviewed-by: Robin Murphy Cc: Joerg Roedel Link: https://lore.kernel.org/r/1598517834-30275-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Joerg Roedel commit 6656d4462c7ac5ca0bc5d5a8a91a8c98f0fd1409 Author: Matti Vaittinen Date: Thu Sep 3 21:38:48 2020 +0300 regulator: bd71847: add property for omitting ON/OFF control The BD718(37/47/50) regulator enable states can be controlled either by SW or by PMIC internal state machine. On some systems mixture of SW and HW state machine controlled regulators is needed. Specifically, some SoCs signal SUSPEND state change to PMIC via STBY_REQ line. Now there are setups that expect certain regulators then to be disabled (by PMIC state machine) while other regulators should stay enabled (regardless of HW state => SW control required). Add a new device-tree property "rohm,no-regulator-enable-control" which can be used to leave regulator(s) under HW state machine control. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/51022c60412297ad9b22501452d60ba2dce38d2e.1599029334.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 4788c692bec76dc33c646a07a4aaf7e2dd60091e Author: Matti Vaittinen Date: Thu Sep 3 21:38:34 2020 +0300 regulator: bd71837: add property for omitting ON/OFF control The BD718(37/47/50) regulator enable states can be controlled either by SW or by PMIC internal state machine. On some systems mixture of SW and HW state machine controlled regulators is needed. Specifically, some SoCs signal SUSPEND state change to PMIC via STBY_REQ line. Now there are setups that expect certain regulators then to be disabled (by PMIC state machine) while other regulators should stay enabled (regardless of HW state => SW control required). Add a new device-tree property "rohm,no-regulator-enable-control" which can be used to leave regulator(s) under HW state machine control. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/9ff1104579093e7977944be769d625b9e33bc663.1599029334.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 1d848d681c4d4e148193b699a6e5f222e8621519 Author: Matti Vaittinen Date: Thu Sep 3 21:39:02 2020 +0300 regulator: bd718x7 fix regulator states at SUSPEND The BD718(37/47/50) regulator enable states can be controlled either by SW or by PMIC internal state machine. The bd718x7 driver has not supported leaving the regulators under HW state machine control (except for cases where this is required to avoid boot-up problems due to critical regulators being turned OFF at reset when SNVS used as reset state). On some systems this is undesirable as there now are setups where mixture of SW and HW state machine controlled regulators is needed. Specifically, some SoCs signal SUSPEND state change to PMIC via STBY_REQ line. Now there are setups that expect certain regulators then to be disabled (by PMIC state machine) while other regulators should stay enabled (regardless of HW state => SW control required). Add support for a new device-tree property "rohm,no-regulator-enable-control" which can be used to leave regulator(s) under HW state machine control. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/6ebba33dd08f2dcc9f1137bbff4d2dc905278a5a.1599029335.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit df9db2541a82ec18c474942a93729420d37fac81 Author: Matti Vaittinen Date: Thu Sep 3 21:38:19 2020 +0300 regulator: bd718x7 initialize regulator config only once The BD718x7 driver initialized common configs for all regulators. Simplify initialization by moving the initialization of common configs out of the loop. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/2d3e68c94d4813410da8c4c7eac3332d167d19a8.1599029334.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 4604393ca0c6e4a73c04798c3f1d9878e70b7251 Author: Robin Murphy Date: Thu Sep 3 12:34:04 2020 +0100 iommu/dma: Remove broken huge page handling The attempt to handle huge page allocations was originally added since the comments around stripping __GFP_COMP in other implementations were nonsensical, and we naively assumed that split_huge_page() could simply be called equivalently to split_page(). It turns out that this doesn't actually work correctly, so just get rid of it - there's little point going to the effort of allocating huge pages if we're only going to split them anyway. Reported-by: Roman Gushchin Signed-off-by: Robin Murphy Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/e287dbe69aa0933abafd97c80631940fd188ddd1.1599132844.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit c1b0c62715102be326e534ea382e8b1ef87ccb9c Author: André Almeida Date: Thu Jul 23 13:43:11 2020 -0300 fuse: update project homepage As stated in https://sourceforge.net/projects/fuse/, "the FUSE project has moved to https://github.com/libfuse/" in 22-Dec-2015. Update URLs to reflect this. Signed-off-by: André Almeida Signed-off-by: Miklos Szeredi commit 1b3c63acb1e52d5af04b99b9b784ff3775c63313 Merge: 0c5f8ca49cff1 8c9ff1219aef6 Author: Mark Brown Date: Fri Sep 4 10:30:43 2020 +0100 Merge series "ASoC: SOF: multi core support for 5.10" from Kai Vehmanen : This series extends the multi-core support in SOF. Capability to specify which core to use, on a per component basis, is added to topology. The topology load functionality in SOF is modified to power up/down host controlled cores based on the topology description. Guennadi Liakhovetski (2): ASoC: SOF: add a "core" parameter to widget loading functions ASoC: SOF: support topology components on secondary cores Ranjani Sridharan (1): ASoC: SOF: topology: fix core enable sequence include/uapi/sound/sof/tokens.h | 1 + sound/soc/sof/pm.c | 1 + sound/soc/sof/sof-audio.c | 25 ++++ sound/soc/sof/sof-audio.h | 5 + sound/soc/sof/sof-priv.h | 3 + sound/soc/sof/topology.c | 210 ++++++++++++++++++++++---------- 6 files changed, 184 insertions(+), 61 deletions(-) -- 2.27.0 commit 0c5f8ca49cff1e2e18300cca4fb0c17ba794dcb0 Author: Krzysztof Kozlowski Date: Thu Sep 3 22:32:48 2020 +0200 ASoC: samsung-i2s: Add missing properties Usage of "unevaluatedProperties: false" is not correct as it suppresses warnings about all undocumented properties. Instead, add all missing properties. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903203250.19830-2-krzk@kernel.org Signed-off-by: Mark Brown commit 6997e462b39b5041e6e4b9d547ebbcacb69052ae Author: Krzysztof Kozlowski Date: Thu Sep 3 22:32:47 2020 +0200 ASoC: odroid: Add missing properties Usage of "unevaluatedProperties: false" is not correct as it suppresses warnings about all undocumented properties. Instead, add all missing properties. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200903203250.19830-1-krzk@kernel.org Signed-off-by: Mark Brown commit 78aa219022f636f2adda9eb12be0a04b6907a4e0 Author: Lad Prabhakar Date: Tue Aug 25 15:18:05 2020 +0100 ARM: dts: r8a7742: Add IPMMU DT nodes Add the five IPMMU instances found in the r8a7742 to DT with a disabled status. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200825141805.27105-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Joerg Roedel commit d88f7e028d5eab908d29197297f5ae2ca460e17a Author: Lad Prabhakar Date: Tue Aug 25 15:18:04 2020 +0100 dt-bindings: iommu: renesas,ipmmu-vmsa: Add r8a7742 support Document RZ/G1H (R8A7742) SoC bindings. No driver change is needed due to the fallback compatible value "renesas,ipmmu-vmsa". Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Reviewed-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200825141805.27105-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Joerg Roedel commit 244eb888f9ab86854fc2c1d726cebfd7efbe780c Author: Pierre-Louis Bossart Date: Fri Sep 4 04:47:39 2020 +0800 soundwire: intel: remove stream handling from .prepare and .hw_free Now that the stream is handled at the dai-link level (in the machine driver), we can remove the stream handling at the dai level. We still need these callbacks to perform dai-level resource handling (i.e. addition/removal of a master). Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200903204739.31206-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit e1c3a7f027546c47dc4e8d2422666eea84d675fb Author: Pierre-Louis Bossart Date: Fri Sep 4 04:47:38 2020 +0800 soundwire: intel: remove .trigger operation Now that the stream trigger is handled at the dai-link level, there is no need for a dai-level trigger any longer. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200903204739.31206-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 06dcb4e443643db93b286f861133785ca46f5a19 Author: Pierre-Louis Bossart Date: Fri Sep 4 04:47:37 2020 +0800 soundwire: intel: fix NULL/ERR_PTR confusion snd_soc_dai_get_sdw_stream() can only return the pointer to stream or an ERR_PTR value, NULL is not a possible value. Fixes: 09553140c8d7b ('soundwire: intel: implement get_sdw_stream() operations') Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200903204739.31206-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 3471d2a192bace106e4da7bcdcdd5ebcca4267d2 Author: Pierre-Louis Bossart Date: Fri Sep 4 04:47:36 2020 +0800 soundwire: stream: fix NULL/IS_ERR confusion snd_soc_dai_get_sdw_stream() can only return -ENOTSUPP or the stream, NULL is not a possible value. Fixes: 4550569bd779f ('soundwire: stream: add helper to startup/shutdown streams') Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200903204739.31206-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 8be2f84acf2317068c93fea291d823ac30d172d6 Author: Vinod Koul Date: Thu Sep 3 17:15:04 2020 +0530 soundwire: remove SDW_REG_SHIFT() soundwire had defined SDW_REG_SHIFT to calculate shift values for bitmasks, but now that we have better things in bitfield.h, remove this. Signed-off-by: Vinod Koul Tested-by: Bard Liao Link: https://lore.kernel.org/r/20200903114504.1202143-10-vkoul@kernel.org Signed-off-by: Vinod Koul commit c30f92984117658d614e405ea476c3e8ebbd10aa Author: Vinod Koul Date: Thu Sep 3 17:15:03 2020 +0530 soundwire: intel_init: use FIELD_{GET|PREP} use FIELD_{GET|PREP} in intel_init driver to get/set field values instead of open coding masks and shift operations. Signed-off-by: Vinod Koul Tested-by: Bard Liao Link: https://lore.kernel.org/r/20200903114504.1202143-9-vkoul@kernel.org Signed-off-by: Vinod Koul commit 3b4979cabd4b49b84f794d8dd1625bbdb1213b05 Author: Vinod Koul Date: Thu Sep 3 17:15:02 2020 +0530 soundwire: intel: use FIELD_{GET|PREP} use FIELD_{GET|PREP} in intel driver to get/set field values instead of open coding masks and shift operations. Signed-off-by: Vinod Koul Tested-by: Bard Liao Link: https://lore.kernel.org/r/20200903114504.1202143-8-vkoul@kernel.org Signed-off-by: Vinod Koul commit 3cf25d63b1b9871188c6838e630b337363287e17 Author: Vinod Koul Date: Thu Sep 3 17:15:01 2020 +0530 soundwire: cadence: use FIELD_{GET|PREP} use FIELD_{GET|PREP} in cadence driver to get/set field values instead of open coding masks and shift operations. Signed-off-by: Vinod Koul Tested-by: Bard Liao Link: https://lore.kernel.org/r/20200903114504.1202143-7-vkoul@kernel.org Signed-off-by: Vinod Koul commit 9972b90ae8fd9bcd6ecbaef33cd5e240b6dbc636 Author: Vinod Koul Date: Thu Sep 3 17:15:00 2020 +0530 soundwire: qcom : use FIELD_{GET|PREP} use FIELD_{GET|PREP} in qcom driver to get/set field values instead of open coding masks and shift operations. Also, remove now unused register shift defines Signed-off-by: Vinod Koul Tested-by: Bard Liao Link: https://lore.kernel.org/r/20200903114504.1202143-6-vkoul@kernel.org Signed-off-by: Vinod Koul commit 41ff91741c25d4987bf0405fa219b9eb339f24ee Author: Vinod Koul Date: Thu Sep 3 17:14:59 2020 +0530 soundwire: stream: use FIELD_{GET|PREP} use FIELD_{GET|PREP} in stream code to get/set field values instead of open coding masks and shift operations. Signed-off-by: Vinod Koul Tested-by: Bard Liao Link: https://lore.kernel.org/r/20200903114504.1202143-5-vkoul@kernel.org Signed-off-by: Vinod Koul commit bd6a024f21ceb37025dfd584f59cfeba850c8e02 Author: Vinod Koul Date: Thu Sep 3 17:14:58 2020 +0530 soundwire: slave: use SDW_DISCO_LINK_ID() use SDW_DISCO_LINK_ID() in slave code to extract field values instead of open coding masks and shift operations to extract link_id Signed-off-by: Vinod Koul Tested-by: Bard Liao Link: https://lore.kernel.org/r/20200903114504.1202143-4-vkoul@kernel.org Signed-off-by: Vinod Koul commit d5826a4bdbc88004279df1f24db61e8e48071f78 Author: Vinod Koul Date: Thu Sep 3 17:14:57 2020 +0530 soundwire: bus: use FIELD_GET() use FIELD_GET() in bus code to extract field values instead of open coding masks and shift operations. Signed-off-by: Vinod Koul Tested-by: Bard Liao Link: https://lore.kernel.org/r/20200903114504.1202143-3-vkoul@kernel.org Signed-off-by: Vinod Koul commit 25e804926da39f1de7ae486920bfe65b099195f1 Author: Vinod Koul Date: Thu Sep 3 17:14:56 2020 +0530 soundwire: define and use addr bit masks Soundwire addr is a 52bit value encoding link, version, unique id, mfg id, part id and class id. Define bit masks for these and use FIELD_GET() to extract these fields. Signed-off-by: Vinod Koul Tested-by: Bard Liao Link: https://lore.kernel.org/r/20200903114504.1202143-2-vkoul@kernel.org Signed-off-by: Vinod Koul commit aae4c8e27bd7567132bb931488e2faf1a57c66e9 Author: Tom Murphy Date: Mon Aug 17 22:00:49 2020 +0100 iommu: Rename iommu_tlb_* functions to iommu_iotlb_* To keep naming consistent we should stick with *iotlb*. This patch renames a few remaining functions. Signed-off-by: Tom Murphy Link: https://lore.kernel.org/r/20200817210051.13546-1-murphyt7@tcd.ie Signed-off-by: Joerg Roedel commit 8c9ff1219aef657954540147522ceaecced71b2b Author: Ranjani Sridharan Date: Wed Sep 2 17:07:56 2020 +0300 ASoC: SOF: topology: fix core enable sequence Core power up involves 2 steps: The first step tries to power up the core by setting the ADSPCS.SPA bit for the host-managed cores. The second step involves sending the IPC to power up other cores that are not host managed. The enabled_cores_mask should be updated only when both these steps are successful. If the IPC to the DSP fails, the host-managed core that was powered in step 1 should be powered off before returning the error. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Keyon Jie Reviewed-by: Pierre-Louis Bossart Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200902140756.1427005-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit d1c6c4a9fd3da5c735386b0cdb44d79667f10a1b Author: Guennadi Liakhovetski Date: Wed Sep 2 17:07:55 2020 +0300 ASoC: SOF: support topology components on secondary cores Currently SOF supports running pipelines on secondary DSP cores in a limited way. This patch represents the next step in SOF multi-core DSP support, it adds checks for core ID to individual topology components. It takes care to power up all the requested cores. More advanced DSP core power management should be added in the future. Signed-off-by: Pan Xiuli Signed-off-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200902140756.1427005-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 0dcdf84289fbf61cd42cbb1e379e2150aa17e31e Author: Guennadi Liakhovetski Date: Wed Sep 2 17:07:54 2020 +0300 ASoC: SOF: add a "core" parameter to widget loading functions We want to be able to explicitly assign cores to individual pipeline components. This patch adds a "core" parameter to widget loading functions to be sent to the DSP for appropriate component scheduling. Signed-off-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200902140756.1427005-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit a6271ec8eede356aad1c44e8417eede03f5a92fe Author: Lad Prabhakar Date: Sun Aug 9 20:35:27 2020 +0100 dt-bindings: iommu: renesas,ipmmu-vmsa: Sort compatible string in increasing number of the SoC Sort the items in the compatible string list in increasing number of SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200809193527.19659-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Joerg Roedel commit 1ea5440e36a792d01aae0b22159e0a13b33589fe Author: Thierry Reding Date: Thu Aug 6 17:54:04 2020 +0200 iommu/tegra-smmu: Prune IOMMU group when it is released In order to share groups between multiple devices we keep track of them in a per-SMMU list. When an IOMMU group is released, a dangling pointer to it stays around in that list. Fix this by implementing an IOMMU data release callback for groups where the dangling pointer can be removed. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20200806155404.3936074-4-thierry.reding@gmail.com Signed-off-by: Joerg Roedel commit 5b30fbfa2aa5c068444d576b1c87b2bd1bddf0ba Author: Thierry Reding Date: Thu Aug 6 17:54:03 2020 +0200 iommu/tegra-smmu: Balance IOMMU group reference count For groups that are shared between multiple devices, care must be taken to acquire a reference for each device, otherwise the IOMMU core ends up dropping the last reference too early, which will cause the group to be released while consumers may still be thinking that they're holding a reference to it. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20200806155404.3936074-3-thierry.reding@gmail.com Signed-off-by: Joerg Roedel commit 002957020e52cfcad538e3dff26969d1cf8a2556 Author: Thierry Reding Date: Thu Aug 6 17:54:02 2020 +0200 iommu/tegra-smmu: Set IOMMU group name Set the name of static IOMMU groups to help with debugging. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20200806155404.3936074-2-thierry.reding@gmail.com Signed-off-by: Joerg Roedel commit eb3621798bcdd34ba480109bac357ba6a784d3e2 Author: Uros Bizjak Date: Thu Aug 27 19:17:35 2020 +0200 x86/entry/64: Do not include inst.h in calling.h inst.h was included in calling.h solely to instantiate the RDPID macro. The usage of RDPID was removed in 6a3ea3e68b8a ("x86/entry/64: Do not use RDPID in paranoid entry to accomodate KVM") so remove the include. Fixes: 6a3ea3e68b8a ("x86/entry/64: Do not use RDPID in paranoid entry to accomodate KVM") Signed-off-by: Uros Bizjak Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200827171735.93825-1-ubizjak@gmail.com commit cd5b0321ed32b79c020abc2b54e8ab129611447c Author: Krzysztof Kozlowski Date: Tue Sep 1 09:54:17 2020 +0200 ARM: dts: exynos: Use S2MPS11 clock in S3C RTC in SMDK5420 Use the 32 kHz clock from S2MPS11 PMIC in the S3C RTC node. Except making the S3C RTC working, this also fixes dtbs_check warnings: arch/arm/boot/dts/exynos5420-smdk5420.dt.yaml: rtc@101e0000: clocks: [[2, 317]] is too short arch/arm/boot/dts/exynos5420-smdk5420.dt.yaml: rtc@101e0000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901075417.22481-14-krzk@kernel.org commit 7aaf0b0e8e9add1688b13588351bb7e8acfeeab4 Author: Krzysztof Kozlowski Date: Tue Jul 28 19:08:59 2020 +0200 iommu/qcom: Drop of_match_ptr to fix -Wunused-const-variable The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF: drivers/iommu/qcom_iommu.c:910:34: warning: 'qcom_iommu_of_match' defined but not used [-Wunused-const-variable=] 910 | static const struct of_device_id qcom_iommu_of_match[] = { Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200728170859.28143-3-krzk@kernel.org Signed-off-by: Joerg Roedel commit 3207fa325ad77f00e83aaaeca5ca79fa234528f1 Author: Krzysztof Kozlowski Date: Tue Jul 28 19:08:58 2020 +0200 iommu/vt-d: Drop kerneldoc marker from regular comment Fix W=1 compile warnings (invalid kerneldoc): drivers/iommu/intel/dmar.c:389: warning: Function parameter or member 'header' not described in 'dmar_parse_one_drhd' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200728170859.28143-2-krzk@kernel.org Signed-off-by: Joerg Roedel commit 06ce8a62ce81f47542043d93b64a4be106e98106 Author: Krzysztof Kozlowski Date: Tue Jul 28 19:08:57 2020 +0200 iommu/amd: Fix kerneldoc comments Fix W=1 compile warnings (invalid kerneldoc): drivers/iommu/amd/init.c:1586: warning: Function parameter or member 'ivrs' not described in 'get_highest_supported_ivhd_type' drivers/iommu/amd/init.c:1938: warning: Function parameter or member 'iommu' not described in 'iommu_update_intcapxt' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200728170859.28143-1-krzk@kernel.org Signed-off-by: Joerg Roedel commit 9bdc2ef69ce2cd244e806c9f3f8f5c0948dc64b7 Author: Krzysztof Kozlowski Date: Mon Jul 27 20:36:31 2020 +0200 iommu/amd: Add missing function prototypes to fix -Wmissing-prototypes Few exported functions from AMD IOMMU driver are missing prototypes. They have declaration in arch/x86/events/amd/iommu.h but this file cannot be included in the driver. Add prototypes to fix W=1 warnings like: drivers/iommu/amd/init.c:3066:19: warning: no previous prototype for 'get_amd_iommu' [-Wmissing-prototypes] 3066 | struct amd_iommu *get_amd_iommu(unsigned int idx) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200727183631.16744-1-krzk@kernel.org Signed-off-by: Joerg Roedel commit f53dd97874e6d916ce7d3a487a1073ef5c10e153 Author: Krzysztof Kozlowski Date: Mon Jul 27 20:18:42 2020 +0200 iommu/mediatek: Drop of_match_ptr to fix -Wunused-const-variable The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF: drivers/iommu/mtk_iommu.c:833:34: warning: 'mtk_iommu_of_ids' defined but not used [-Wunused-const-variable=] 833 | static const struct of_device_id mtk_iommu_of_ids[] = { Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200727181842.8441-1-krzk@kernel.org Signed-off-by: Joerg Roedel commit c68e418c603f011ff0e7f4e1fb0f7edc48a04f7e Author: Herbert Xu Date: Fri Aug 28 17:18:33 2020 +1000 crypto: amlogic - Fix endianness marker The endianness marking on the variable v in meson_cipher is wrong. It is actually in CPU-order, not little-endian. This patch fixes it. Fixes: 3d04158814e7 ("crypto: amlogic - enable working on big...") Signed-off-by: Herbert Xu Acked-by: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Herbert Xu commit 8ea08ce08ff423be8501bc6edfae5b9dde18ae05 Author: Daniel Jordan Date: Thu Aug 27 21:53:28 2020 -0400 padata: add another maintainer and another list At Steffen's request, I'll help maintain padata for the foreseeable future. While at it, let's have patches go to lkml too since the code is now used outside of crypto. Signed-off-by: Daniel Jordan Cc: Herbert Xu Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Steffen Klassert Signed-off-by: Herbert Xu commit f089ee55dee401c1d0b081defe40d89803edf237 Author: Denis Efremov Date: Thu Aug 27 15:16:11 2020 +0300 crypto: sun8i-ss - remove redundant memzero_explicit() Remove redundant memzero_explicit() in sun8i_ss_cipher() before calling kfree_sensitive(). kfree_sensitive() will zero the memory with memzero_explicit(). Fixes: 453431a54934 ("mm, treewide: rename kzfree() to kfree_sensitive()") Signed-off-by: Denis Efremov Signed-off-by: Herbert Xu commit ede13285bb122dd9958eb9a0c128b074b22c8f36 Author: Denis Efremov Date: Thu Aug 27 09:44:02 2020 +0300 crypto: sun8i-ss - use kfree_sensitive() Use kfree_sensitive() instead of open-coding it. Signed-off-by: Denis Efremov Acked-by: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Herbert Xu commit 712d80695762a63e91c4e87c718d7b9ade1abe3b Author: Denis Efremov Date: Thu Aug 27 09:44:01 2020 +0300 crypto: sun8i-ce - use kfree_sensitive() Use kfree_sensitive() instead of open-coding it. Signed-off-by: Denis Efremov Acked-by: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Herbert Xu commit ba42fa77efa1248eb44407bb212793548e2e32ec Author: Denis Efremov Date: Thu Aug 27 09:44:00 2020 +0300 crypto: amlogic - use kfree_sensitive() Use kfree_sensitive() instead of open-coding it. Signed-off-by: Denis Efremov Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit 57059185fb30978fea5c7eaf301d387feeaab3e1 Author: Denis Efremov Date: Thu Aug 27 09:43:59 2020 +0300 crypto: inside-secure - use kfree_sensitive() Use kfree_sensitive() instead of open-coding it. Signed-off-by: Denis Efremov Acked-by: Antoine Tenart Signed-off-by: Herbert Xu commit d83d631b18e56aee51e4b8c89968952703e4de98 Author: Krzysztof Kozlowski Date: Wed Aug 26 18:29:54 2020 +0200 crypto: ccree - Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit 1b5d3a8b3000bf654d4ee92efee1e70f41912d13 Author: Krzysztof Kozlowski Date: Wed Aug 26 18:29:53 2020 +0200 crypto: sa2ul - Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit 4d6aef2f2eaabf4512321341439023e042633aba Author: Krzysztof Kozlowski Date: Wed Aug 26 17:32:33 2020 +0200 hwrng: cctrn - Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Acked-by: Hadar Gat Signed-off-by: Herbert Xu commit d08d387b7377d316bb15d43e025137836cf9bc91 Author: Herbert Xu Date: Tue Aug 25 11:52:02 2020 +1000 crypto: powerpc/crc-vpmsum_test - Fix sparse endianness warning This patch fixes a sparse endianness warning by changing crc32 to __le32 instead of u32: CHECK ../arch/powerpc/crypto/crc-vpmsum_test.c ../arch/powerpc/crypto/crc-vpmsum_test.c:102:39: warning: cast from restricted __le32 Signed-off-by: Herbert Xu commit a4cb40f48fd995ec335e701a3c48c0d06dae7f2a Author: Herbert Xu Date: Tue Aug 25 11:38:01 2020 +1000 crypto: arm64/gcm - Fix endianness warnings This patch changes a couple u128's to be128 which is the correct type to use and fixes a few sparse warnings. Signed-off-by: Herbert Xu Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 0f4128dc4e38273eb4df472d8a8d57f378cc4c35 Author: Herbert Xu Date: Tue Aug 25 11:34:28 2020 +1000 crypto: arm64/sha - Add declarations for assembly variables This patch adds declarations for variables only used by assembly code to silence compiler warnings: CC [M] arch/arm64/crypto/sha1-ce-glue.o AS [M] arch/arm64/crypto/sha1-ce-core.o CC [M] arch/arm64/crypto/sha2-ce-glue.o AS [M] arch/arm64/crypto/sha2-ce-core.o CHECK ../arch/arm64/crypto/sha1-ce-glue.c CHECK ../arch/arm64/crypto/sha2-ce-glue.c ../arch/arm64/crypto/sha1-ce-glue.c:38:11: warning: symbol 'sha1_ce_offsetof_count' was not declared. Should it be static? ../arch/arm64/crypto/sha1-ce-glue.c:39:11: warning: symbol 'sha1_ce_offsetof_finalize' was not declared. Should it be static? ../arch/arm64/crypto/sha2-ce-glue.c:38:11: warning: symbol 'sha256_ce_offsetof_count' was not declared. Should it be static? ../arch/arm64/crypto/sha2-ce-glue.c:40:11: warning: symbol 'sha256_ce_offsetof_finalize' was not declared. Should it be static? Signed-off-by: Herbert Xu Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 51982ea02aef972132eb35c583d3e4c5b83166e5 Author: Herbert Xu Date: Tue Aug 25 11:23:00 2020 +1000 crypto: arm/poly1305 - Add prototype for poly1305_blocks_neon This patch adds a prototype for poly1305_blocks_neon to slience a compiler warning: CC [M] arch/arm/crypto/poly1305-glue.o ../arch/arm/crypto/poly1305-glue.c:25:13: warning: no previous prototype for `poly1305_blocks_neon' [-Wmissing-prototypes] void __weak poly1305_blocks_neon(void *state, const u8 *src, u32 len, u32 hibit) ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Herbert Xu Acked-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit e9f0fb53ac88c1ccf3728b47c687838b6054f481 Author: Lad Prabhakar Date: Thu Aug 27 19:19:18 2020 +0100 arm64: dts: renesas: Add HiHope RZ/G2H board with idk-1110wr display The HiHope RZ/G2H is advertised as compatible with panel idk-1110wr from Advantech, however the panel isn't sold alongside the board. New dts, enabling the lvds node to get the panel to work with HiHope RZ/G2H. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200827181918.30130-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 912d3c5383f7a68b1293aaaa378b9c3373e48a91 Author: Lad Prabhakar Date: Thu Aug 27 15:53:15 2020 +0100 arm64: dts: renesas: r8a774e1: Add cpuidle support for CA5x cores Enable cpuidle (core shutdown) support for RZ/G2H CA5x cores. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200827145315.26261-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ff9e786f0ee0cc33aedabaa56678cb45d3c1ca0b Author: Marian-Cristian Rotariu Date: Thu Aug 27 15:53:14 2020 +0100 arm64: dts: renesas: r8a774e1: Add FDP1 device nodes Add FDP1 device nodes to R8A774E1 (RZ/G2H) SoC dtsi. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200827145315.26261-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a0be3c32b15675e9f9dc0d3dc4e0361c019b93d8 Author: Lad Prabhakar Date: Tue Aug 25 17:27:15 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Enable PCIe Controller Enable PCIe Controller and set PCIe bus clock frequency. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200825162718.5838-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 18f99f24a9704caeca4178d0955c0e9654629346 Author: Lad Prabhakar Date: Tue Aug 25 15:18:05 2020 +0100 ARM: dts: r8a7742: Add IPMMU DT nodes Add the five IPMMU instances found in the r8a7742 to DT with a disabled status. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200825141805.27105-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit e41cb217932969a20cea9c44299c449236058e43 Author: Lad Prabhakar Date: Mon Aug 31 19:37:22 2020 +0100 clk: renesas: rcar-gen2: Rename vsp1-(sy|rt) clocks to vsp(s|r) VSP1 instances VSPS (which stands for "VSP Standard") and VSPR (which stands for "VSP for Resizing") were wrongly named as "vsp1-sy" and "vsp1-rt". The clock section in the SoC datasheets misunderstood the abbreviations as meaning VSP System and VSP Realtime, and named the corresponding clocks VSP1(SY) and VSP1(RT). This mistake has been carried over to the kernel code. This patch fixes this by renaming the clock names to "vsps" and "vspr". Inspired from commit 79ea9934b8df ("ARM: shmobile: r8a7790: Rename VSP1_(SY|RT) clocks to VSP1_(S|R)") Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200831183722.8165-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit e8d8e9a3d0b28c99a0f0f7fc168fd6eff345fcc3 Author: Lad Prabhakar Date: Mon Aug 31 19:03:12 2020 +0100 clk: renesas: r8a7742: Add clk entry for VSPR Add clock entry 130 for VSPR (VSP for Resizing) module, so that this module can be used on R8A7742 (RZ/G1H) SoC. Alongside rename clock entry "vsp1-sy" to "vsps" (VSP Standard), so that VSP1 clock names are in sync. Note: The entry for VSPR clock was accidentally dropped from RZ/G manual when all the information related to RT were removed. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20200831180312.7453-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit dd92f7dfe1ba3bad556c8a529edacce7c6fd0195 Author: Enric Balletbo i Serra Date: Thu Sep 3 16:17:46 2020 +0200 platform/chrome: Kconfig: Remove the transitional MFD_CROS_EC config The MFD_CROS_EC config was a transitional Kconfig option to not break current defconfigs in the kernel. Now, this is not required anymore because all the defconfigs have been removed this option and migrated to enable the CrOS EC parts individually. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Guenter Roeck Tested-by: Gwendal Grignou commit 1e7913ff5f9f1b73146ad8522958bd266f22a510 Author: Gwendal Grignou Date: Sat Aug 29 23:59:37 2020 -0700 platform/chrome: cros_ec_lightbar: Reduce ligthbar get version command By default, the lightbar commands are set to the biggest lightbar command and response. That length is greater than 128 bytes and may not work on all machines. But all EC are probed for lightbar by sending a get version request. Set that request size precisely. Before the command would be: cros_ec_cmd: version: 0, command: EC_CMD_LIGHTBAR_CMD, outsize: 194, insize: 128, result: 0 Afer: cros_ec_cmd: version: 0, command: EC_CMD_LIGHTBAR_CMD, outsize: 1, insize: 8, result: 0 Fixes: a841178445bb7 ("mfd: cros_ec: Use a zero-length array for command data") Signed-off-by: Gwendal Grignou Signed-off-by: Enric Balletbo i Serra commit acb01032e11a52d21e0d97e506dca0897949ee8e Author: Krzysztof Kozlowski Date: Mon Aug 24 18:48:50 2020 +0200 arm64: defconfig: Enable clock driver for ROHM BD718x7 PMIC The ROHM BD718x7 PMIC is present on many designs with i.MX 8M SoCs. Enable the bd718x7 clock driver which provides PMICs 32 kHz clock. Signed-off-by: Krzysztof Kozlowski commit fd5a13f4893c8df2a5a3af8599adecb52d05fe89 Author: Christoph Hellwig Date: Thu Sep 3 16:22:31 2020 +0200 proc: add a read_iter method to proc proc_ops This will allow proc files to implement iter read semantics. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 906146f44922392f00293e52ea9b61168b75ac62 Author: Christoph Hellwig Date: Thu Sep 3 16:22:30 2020 +0200 proc: cleanup the compat vs no compat file ops Instead of providing a special no-compat version provide a special compat version for operations with ->compat_ioctl. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit f6ef7b7bb285c7b63a36f370b40b990891a9aa1f Author: Christoph Hellwig Date: Thu Sep 3 16:22:29 2020 +0200 proc: remove a level of indentation in proc_get_inode Just return early on inode allocation failure. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 95cec14b0308085c028c4d4fb3d09fad3902b4c3 Author: Hao Luo Date: Thu Sep 3 13:05:28 2020 -0700 selftests/bpf: Fix check in global_data_init. The returned value of bpf_object__open_file() should be checked with libbpf_get_error() rather than NULL. This fix prevents test_progs from crash when test_global_data.o is not present. Signed-off-by: Hao Luo Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200903200528.747884-1-haoluo@google.com commit b4ff7ad7784689138ca2d9454833afc28cef6a68 Merge: 83cf5c68d663f ee333df50bff2 Author: Alexei Starovoitov Date: Thu Sep 3 17:14:40 2020 -0700 Merge branch 'libbpf-support-bpf-to-bpf-calls' Andrii Nakryiko says: ==================== Currently, libbpf supports a limited form of BPF-to-BPF subprogram calls. The restriction is that entry-point BPF program should use *all* of defined sub-programs in BPF .o file. If any of the subprograms is not used, such entry-point BPF program will be rejected by verifier as containing unreachable dead code. This is not a big limitation for cases with single entry-point BPF programs, but is quite a heavy restriction for multi-programs that use only partially overlapping set of subprograms. This patch set removes all such restrictions and adds complete support for using BPF sub-program calls on BPF side. This is achieved through libbpf tracking subprograms individually and detecting which subprograms are used by any given entry-point BPF program, and subsequently only appending and relocating code for just those used subprograms. In addition, libbpf now also supports multiple entry-point BPF programs within the same ELF section. This allows to structure code so that there are few variants of BPF programs of the same type and attaching to the same target (e.g., for tracepoints and kprobes) without the need to worry about ELF section name clashes. This patch set opens way for more wider adoption of BPF subprogram calls, especially for real-world production use-cases with complicated net of subprograms. This will allow to further scale BPF verification process through good use of global functions, which can be verified independently. This is also important prerequisite for static linking which allows static BPF libraries to not worry about naming clashes for section names, as well as use static non-inlined functions (subprograms) without worries of verifier rejecting program due to dead code. Patch set is structured as follows: - patched 1-6 contain all the libbpf changes necessary to support multi-prog sections and bpf2bpf subcalls; - patch 7 adds dedicated selftests validating all combinations of possible sub-calls (within and across sections, static vs global functions); - patch 8 deprecated bpf_program__title() in favor of bpf_program__section_name(). The intent was to also deprecate bpf_object__find_program_by_title() as it's now non-sensical with multiple programs per section. But there were too many selftests uses of this and I didn't want to delay this patches further and make it even bigger, so left it for a follow up cleanup; - patches 9-10 remove uses for title-related APIs from bpftool and bpf_program__title() use from selftests; - patch 11 is converting fexit_bpf2bpf to have explicit subtest (it does contain 4 subtests, which are not handled as sub-tests); - patches 12-14 convert few complicated BPF selftests to use __noinline functions to further validate correctness of libbpf's bpf2bpf processing logic. v2->v3: - explained subprog relocation algorithm in more details (Alexei); - pyperf, strobelight and cls_redirect got new subprog variants, leaving other modes intact (Alexei); v1->v2: - rename DEPRECATED to LIBBPF_DEPRECATED to avoid name clashes; - fix test_subprogs build; - convert a bunch of complicated selftests to __noinline (Alexei). ==================== Signed-off-by: Alexei Starovoitov commit ee333df50bff22956ad37f3784cf120028f343a8 Author: Andrii Nakryiko Date: Thu Sep 3 13:35:42 2020 -0700 selftests/bpf: Add __noinline variant of cls_redirect selftest As one of the most complicated and close-to-real-world programs, cls_redirect is a good candidate to exercise libbpf's logic of handling bpf2bpf calls. So add variant with using explicit __noinline for majority of functions except few most basic ones. If those few functions are inlined, verifier starts to complain about program instruction limit of 1mln instructions being exceeded, most probably due to instruction overhead of doing a sub-program call. Convert user-space part of selftest to have to sub-tests: with and without inlining. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Cc: Lorenz Bauer Link: https://lore.kernel.org/bpf/20200903203542.15944-15-andriin@fb.com commit baaf680e089f34468f26e86f76af712105f6019b Author: Andrii Nakryiko Date: Thu Sep 3 13:35:41 2020 -0700 selftests/bpf: Modernize xdp_noinline test w/ skeleton and __noinline Update xdp_noinline to use BPF skeleton and force __noinline on helper sub-programs. Also, split existing logic into v4- and v6-only to complicate sub-program calling patterns (partially overlapped sets of functions for entry-level BPF programs). Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200903203542.15944-14-andriin@fb.com commit fab45be1d26e8c3cee62e09bcc39c149b175f848 Author: Andrii Nakryiko Date: Thu Sep 3 13:35:40 2020 -0700 selftests/bpf: Add subprogs to pyperf, strobemeta, and l4lb_noinline tests Add use of non-inlined subprogs to few bigger selftests to excercise libbpf's bpf2bpf handling logic. Also split l4lb_all selftest into two sub-tests. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200903203542.15944-13-andriin@fb.com commit d86687ae6b759a3ac3e2db63390cef6006144681 Author: Andrii Nakryiko Date: Thu Sep 3 13:35:39 2020 -0700 selftests/bpf: Turn fexit_bpf2bpf into test with subtests There are clearly 4 subtests, so make it official. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200903203542.15944-12-andriin@fb.com commit 52109584202783e90a83c95103307a9a03ba7d9e Author: Andrii Nakryiko Date: Thu Sep 3 13:35:38 2020 -0700 libbpf: Deprecate notion of BPF program "title" in favor of "section name" BPF program title is ambigious and misleading term. It is ELF section name, so let's just call it that and deprecate bpf_program__title() API in favor of bpf_program__section_name(). Additionally, using bpf_object__find_program_by_title() is now inherently dangerous and ambiguous, as multiple BPF program can have the same section name. So deprecate this API as well and recommend to switch to non-ambiguous bpf_object__find_program_by_name(). Internally, clean up usage and mis-usage of BPF program section name for denoting BPF program name. Shorten the field name to prog->sec_name to be consistent with all other prog->sec_* variables. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200903203542.15944-11-andriin@fb.com commit a7659cc30bc9210d885692d175f4bc6f3a9a2175 Author: Andrii Nakryiko Date: Thu Sep 3 13:35:37 2020 -0700 selftests/bpf: Don't use deprecated libbpf APIs Remove all uses of bpf_program__title() and bpf_program__find_program_by_title(). Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200903203542.15944-10-andriin@fb.com commit fd17e272be9c50190f1185a1007d72dc1eedb903 Author: Andrii Nakryiko Date: Thu Sep 3 13:35:36 2020 -0700 tools/bpftool: Replace bpf_program__title() with bpf_program__section_name() bpf_program__title() is deprecated, switch to bpf_program__section_name() and avoid compilation warnings. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200903203542.15944-9-andriin@fb.com commit a08c02f8d4ae50527b9f26a7147686ed55c93782 Author: Andrii Nakryiko Date: Thu Sep 3 13:35:35 2020 -0700 selftests/bpf: Add selftest for multi-prog sections and bpf-to-bpf calls Add a selftest excercising bpf-to-bpf subprogram calls, as well as multiple entry-point BPF programs per section. Also make sure that BPF CO-RE works for such set ups both for sub-programs and for multi-entry sections. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200903203542.15944-8-andriin@fb.com commit 7e06aad52929d17610f28acd40dd10ed62295f85 Author: Andrii Nakryiko Date: Thu Sep 3 13:35:34 2020 -0700 libbpf: Add multi-prog section support for struct_ops Adjust struct_ops handling code to work with multi-program ELF sections properly. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200903203542.15944-7-andriin@fb.com commit 8505e8709b5eedb7c662354e8436a2a164181109 Author: Andrii Nakryiko Date: Thu Sep 3 13:35:33 2020 -0700 libbpf: Implement generalized .BTF.ext func/line info adjustment Complete multi-prog sections and multi sub-prog support in libbpf by properly adjusting .BTF.ext's line and function information. Mark exposed btf_ext__reloc_func_info() and btf_ext__reloc_func_info() APIs as deprecated. These APIs have simplistic assumption that all sub-programs are going to be appended to all main BPF programs, which doesn't hold in real life. It's unlikely there are any users of this API, as it's very libbpf internals-specific. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200903203542.15944-6-andriin@fb.com commit c3c556966de7a0d5f8c908f407c673070fcdbf2b Author: Andrii Nakryiko Date: Thu Sep 3 13:35:32 2020 -0700 libbpf: Make RELO_CALL work for multi-prog sections and sub-program calls This patch implements general and correct logic for bpf-to-bpf sub-program calls. Only sub-programs used (called into) from entry-point (main) BPF program are going to be appended at the end of main BPF program. This ensures that BPF verifier won't encounter any dead code due to copying unreferenced sub-program. This change means that each entry-point (main) BPF program might have a different set of sub-programs appended to it and potentially in different order. This has implications on how sub-program call relocations need to be handled, described below. All relocations are now split into two categores: data references (maps and global variables) and code references (sub-program calls). This distinction is important because data references need to be relocated just once per each BPF program and sub-program. These relocation are agnostic to instruction locations, because they are not code-relative and they are relocating against static targets (maps, variables with fixes offsets, etc). Sub-program RELO_CALL relocations, on the other hand, are highly-dependent on code position, because they are recorded as instruction-relative offset. So BPF sub-programs (those that do calls into other sub-programs) can't be relocated once, they need to be relocated each time such a sub-program is appended at the end of the main entry-point BPF program. As mentioned above, each main BPF program might have different subset and differen order of sub-programs, so call relocations can't be done just once. Splitting data reference and calls relocations as described above allows to do this efficiently and cleanly. bpf_object__find_program_by_name() will now ignore non-entry BPF programs. Previously one could have looked up '.text' fake BPF program, but the existence of such BPF program was always an implementation detail and you can't do much useful with it. Now, though, all non-entry sub-programs get their own BPF program with name corresponding to a function name, so there is no more '.text' name for BPF program. This means there is no regression, effectively, w.r.t. API behavior. But this is important aspect to highlight, because it's going to be critical once libbpf implements static linking of BPF programs. Non-entry static BPF programs will be allowed to have conflicting names, but global and main-entry BPF program names should be unique. Just like with normal user-space linking process. So it's important to restrict this aspect right now, keep static and non-entry functions as internal implementation details, and not have to deal with regressions in behavior later. This patch leaves .BTF.ext adjustment as is until next patch. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200903203542.15944-5-andriin@fb.com commit db2b8b06423c7eb4abcb4310b7234f00b30d7730 Author: Andrii Nakryiko Date: Thu Sep 3 13:35:31 2020 -0700 libbpf: Support CO-RE relocations for multi-prog sections Fix up CO-RE relocation code to handle relocations against ELF sections containing multiple BPF programs. This requires lookup of a BPF program by its section name and instruction index it contains. While it could have been done as a simple loop, it could run into performance issues pretty quickly, as number of CO-RE relocations can be quite large in real-world applications, and each CO-RE relocation incurs BPF program look up now. So instead of simple loop, implement a binary search by section name + insn offset. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200903203542.15944-4-andriin@fb.com commit c112239272c6bacf7fcd0a0dc71999ad8eb1c55c Author: Andrii Nakryiko Date: Thu Sep 3 13:35:30 2020 -0700 libbpf: Parse multi-function sections into multiple BPF programs Teach libbpf how to parse code sections into potentially multiple bpf_program instances, based on ELF FUNC symbols. Each BPF program will keep track of its position within containing ELF section for translating section instruction offsets into program instruction offsets: regardless of BPF program's location in ELF section, it's first instruction is always at local instruction offset 0, so when libbpf is working with relocations (which use section-based instruction offsets) this is critical to make proper translations. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200903203542.15944-3-andriin@fb.com commit 0201c575831171292489f14a8b6f79f98936b4d1 Author: Andrii Nakryiko Date: Thu Sep 3 13:35:29 2020 -0700 libbpf: Ensure ELF symbols table is found before further ELF processing libbpf ELF parsing logic might need symbols available before ELF parsing is completed, so we need to make sure that symbols table section is found in a separate pass before all the subsequent sections are processed. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200903203542.15944-2-andriin@fb.com commit 3ab1270bfa1e8ae7db0d46fee90c5db2935ac91b Author: Christophe JAILLET Date: Thu Sep 3 22:10:55 2020 +0200 smsc9420: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'smsc9420_probe()', GFP_KERNEL can be used because it is a probe function and no lock is acquired. While at it, rewrite the size passed to 'dma_alloc_coherent()' the same way as the one passed to 'dma_free_coherent()'. This form is less verbose: sizeof(struct smsc9420_dma_desc) * RX_RING_SIZE + sizeof(struct smsc9420_dma_desc) * TX_RING_SIZE, vs sizeof(struct smsc9420_dma_desc) * (RX_RING_SIZE + TX_RING_SIZE) @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 63692803899b563f94bf1b4f821b574eb74316ae Author: Christophe JAILLET Date: Thu Sep 3 22:05:09 2020 +0200 epic100: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'epic_init_one()', GFP_KERNEL can be used because it is a probe function and no lock is acquired. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 753c66ef4386d2fa5da429e90f0684f0557568cf Author: Dan Murphy Date: Thu Sep 3 14:51:12 2020 -0500 net: phy: dp83867: Fix various styling and space issues Fix spacing issues reported for misaligned switch..case and extra new lines. Also updated the file header to comply with networking commet style. Reviewed-by: Florian Fainelli Signed-off-by: Dan Murphy Signed-off-by: David S. Miller commit c1077616142907bb6ee987ecd136d6857ffd8787 Author: Wei Wang Date: Tue Sep 1 15:10:08 2020 -0700 ip: expose inet sockopts through inet_diag Expose all exisiting inet sockopt bits through inet_diag for debug purpose. Corresponding changes in iproute2 ss will be submitted to output all these values. Signed-off-by: Wei Wang Signed-off-by: Eric Dumazet Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller commit a33d91ee3817ef00fc7abfe95ab0b8ccef1b26fb Merge: e8f259651f036 2ee3adc4aef58 Author: David S. Miller Date: Thu Sep 3 15:08:03 2020 -0700 Merge branch 'net-dsa-bcm_sf2-Clock-support' Florian Fainelli says: ==================== net: dsa: bcm_sf2: Clock support This patch series adds support for controlling the SF2 switch core and divider clock (where applicable). ==================== Signed-off-by: David S. Miller commit 2ee3adc4aef58087754a03a3774435a7224fd1b4 Author: Florian Fainelli Date: Tue Sep 1 15:59:13 2020 -0700 net: dsa: bcm_sf2: recalculate switch clock rate based on ports Whenever a port gets enabled/disabled, recalcultate the required switch clock rate to make sure it always gets set to the expected rate targeting our switch use case. This is only done for the BCM7445 switch as there is no clocking profile available for BCM7278. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e9ec5c3bd238f2cbe9d9696e994f36d1b249c058 Author: Florian Fainelli Date: Tue Sep 1 15:59:12 2020 -0700 net: dsa: bcm_sf2: request and handle clocks Fetch the corresponding clock resource and enable/disable it during suspend/resume if and only if we have no ports defined for Wake-on-LAN. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e489aea7a6557350a2db0312ed8b89cc26b9744c Author: Florian Fainelli Date: Tue Sep 1 15:59:11 2020 -0700 dt-bindings: net: Document Broadcom SF2 switch clocks Describe the two possible clocks feeding into the Broadcom SF2 integrated Ethernet switch. BCM7445 systems have two clocks, one for the main switch core clock, and another for controlling the switch clock divider whereas BCM7278 systems only have the first kind. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e8f259651f03649b3ecd5cced54c05d7203f69ea Merge: 2adc6edcaec09 6328a126896ea Author: David S. Miller Date: Thu Sep 3 15:06:03 2020 -0700 Merge branch 'net-systemport-Clock-support' Florian Fainelli says: ==================== net: systemport: Clock support This patch series makes the SYSTEMPORT driver request and manage its main and Wake-on-LAN clocks appropriately. ==================== Signed-off-by: David S. Miller commit 6328a126896eadd6559866334d8f16fbfb47ae86 Author: Florian Fainelli Date: Tue Sep 1 14:43:48 2020 -0700 net: systemport: Manage Wake-on-LAN clock It is necessary to manage the Wake-on-LAN clock to turn on the appropriate blocks for MPD or CFP-based packet matching to work otherwise we will not be able to reliably match packets during suspend. Reported-by: Blair Prescott Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 31bc72d97656af11b89ebf108685ffc8ded8c5f4 Author: Florian Fainelli Date: Tue Sep 1 14:43:47 2020 -0700 net: systemport: fetch and use clock resources We disable clocks shortly after probing the device to save as much power as possible in case the interface is never used. When bcm_sysport_open() is invoked, clocks are enabled, and disabled in bcm_sysport_stop(). A similar scheme is applied to the suspend/resume functions. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit af89606924cf8cbf0a81732b63e0ec8768b0fa1b Author: Florian Fainelli Date: Tue Sep 1 14:43:46 2020 -0700 dt-bindings: net: Document Broadcom SYSTEMPORT clocks The Broadcom SYSTEMPORT adapters require the use of two clocks for normal operations and during Wake-on-LAN, document those in the binding document. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 2adc6edcaec09eea9275915e9632ff916fcd0785 Author: Edward Cree Date: Tue Sep 1 18:52:32 2020 +0100 ethtool: fix error handling in ethtool_phys_id If ops->set_phys_id() returned an error, previously we would only break out of the inner loop, which neither stopped the outer loop nor returned the error to the user (since 'rc' would be overwritten on the next pass through the loop). Thus, rewrite it to use a single loop, so that the break does the right thing. Use u64 for 'count' and 'i' to prevent overflow in case of (unreasonably) large values of id.data and n. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 30ae801746ea0e099246318d373691a9e3238d40 Author: Po-Hsu Lin Date: Tue Sep 1 23:09:23 2020 +0800 selftests/net: improve descriptions for XFAIL cases in psock_snd.sh Before changing this it's a bit confusing to read test output: raw csum_off with bad offset (fails) ./psock_snd: write: Invalid argument Change "fails" in the test case description to "expected to fail", so that the test output can be more understandable. Signed-off-by: Po-Hsu Lin Signed-off-by: David S. Miller commit 6bd860ac1c2a0ec2bbe3470bf2b82348ee354dfc Author: Geert Uytterhoeven Date: Tue Sep 1 16:58:41 2020 +0200 chelsio/chtls: CHELSIO_INLINE_CRYPTO should depend on CHELSIO_T4 While CHELSIO_INLINE_CRYPTO is a guard symbol, and just enabling it does not cause any additional code to be compiled in, all configuration options protected by it depend on CONFIG_CHELSIO_T4. Hence it doesn't make much sense to bother the user with the guard symbol question when CONFIG_CHELSIO_T4 is disabled. Fix this by moving the dependency from the individual config options to the guard symbol. Fixes: 44fd1c1fd8219551 ("chelsio/chtls: separate chelsio tls driver from crypto driver") Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller commit cc50bb3d3a0c0b8110a9629f7763067d57583709 Merge: 08aaa0819d5cc c596d2cd1344d Author: David S. Miller Date: Thu Sep 3 14:52:33 2020 -0700 Merge branch 'Convert-mvpp2-to-split-PCS-support' Russell King says: ==================== Convert mvpp2 to split PCS support This series converts the mvpp2 driver to use the split PCS support that has been merged into phylink last time around. I've been running this for some time here and, apart from the recent bug fix sent to net-next, have not seen any issues on DT based systems. I have not tested ACPI setups, although I've tried to preserve the workaround. Patch 1 formalises the ACPI workaround. Patch 2 moves some of mac_config() to the mac_prepare() and mac_finish() callbacks so we can keep the ordering when we split the PCS bits out. Patch 3 ensures that the port is forced down while changing the interface mode - when in in-band mode, doing this in mac_prepare() and mac_finish(). Patch 4 moves the reset handling to mac_prepare() and mac_finish() Patch 5 does a straight conversion to use PCS operations. Patch 6 splits the PCS operations into a GMAC PCS operations and XLG PCS operations, selecting the appropriate set during mac_prepare(). This eliminates a bunch of conditionals from the code. ==================== Signed-off-by: David S. Miller commit c596d2cd1344d40fc3d9493e2dbc5c2796f30786 Author: Russell King Date: Tue Sep 1 14:48:37 2020 +0100 net: mvpp2: split xlg and gmac pcs Split the XLG and GMAC PCS implementations and switch between them during the mac_prepare() method. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 94bfe438bc0a7e6b0f946dae117c3656a511a417 Author: Russell King Date: Tue Sep 1 14:48:32 2020 +0100 net: mvpp2: convert to phylink pcs operations Convert mvpp2 to phylink's new pcs support. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 82b1c8fae8638ef307671954790ef33730416ee9 Author: Russell King Date: Tue Sep 1 14:48:27 2020 +0100 net: mvpp2: move GMAC reset handling into mac_prepare()/mac_finish() Move the GMAC reset handling into mac_prepare() / mac_finish() Signed-off-by: Russell King Signed-off-by: David S. Miller commit fefeae73ac7a35fca27f8f1438885778b9941546 Author: Russell King Date: Tue Sep 1 14:48:22 2020 +0100 net: mvpp2: ensure the port is forced down while changing modes Ensure that the port is forced down while reconfiguring, controlling this via mac_prepare() and mac_finish() so that it is down while we are configuring our (future) PCS. Signed-off-by: Russell King Signed-off-by: David S. Miller commit bfe301ebbc941571f396db8ea3b672b18e43fba4 Author: Russell King Date: Tue Sep 1 14:48:17 2020 +0100 net: mvpp2: convert to use mac_prepare()/mac_finish() Convert mvpp2 to use the mac_prepare() and mac_finish() methods in preparation to converting mvpp2 to split-PCS support. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 87745c7481f92c76da008c1d5ee9d16cae480d11 Author: Russell King Date: Tue Sep 1 14:48:12 2020 +0100 net: mvpp2: tidy up ACPI hack Tidy up the ACPI hack so that we can minimise the function prototypes for this. This avoids adding further prototypes unnecessarily. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 9f364b605f34e1c0b9847943f55db061d5a26bcb Author: Drew DeVault Date: Thu Sep 3 12:05:45 2020 -0400 submitting-patches.rst: presume git will be used Git is fairly ubiquitous these days, and the additional information in this documentation for preparing patches without it is not especially relevant anymore and may serve to confuse new contributors. The git request-pull comments were also removed, given that it is not a tool well-suited to novice contributors, nor do maintainers especially appreciate receiving unexpected request-pulls from new contributors. Signed-off-by: Drew DeVault Link: https://lore.kernel.org/r/20200903160545.83185-5-sir@cmpwn.com Signed-off-by: Jonathan Corbet commit 4ebdf7be21d627cd36026e4fe366a784bdde377a Author: Drew DeVault Date: Thu Sep 3 12:05:44 2020 -0400 Documentation/maintainer: rehome sign-off process The repeated sign-offs necessary when a subsystem maintainer modifies an incoming patch has been moved from submitting-patches.rst to Documentation/maintainer, since the affairs of a subsystem maintainer are not especially relevant to someone reading a guide for how to submit their first patch. Signed-off-by: Drew DeVault Link: https://lore.kernel.org/r/20200903160545.83185-4-sir@cmpwn.com Signed-off-by: Jonathan Corbet commit 7433ff33e8baa5ceafae3d99d639d5ace2458798 Author: Drew DeVault Date: Thu Sep 3 12:05:43 2020 -0400 Documentation/process: expand plain-text advice This adds a link to https://useplaintext.email to email-clients.rst, which is a more exhaustive resource on configuring various mail clients for plain text use. submitting-patches.rst is also updated to direct readers to email-clients.rst to equip new contributors with the requisite knowledge to become a good participant on the mailing lists. Signed-off-by: Drew DeVault Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20200903160545.83185-3-sir@cmpwn.com Signed-off-by: Jonathan Corbet commit ef227c39b6f70d9ad83f6bda1914070211f8795b Author: Drew DeVault Date: Thu Sep 3 12:05:42 2020 -0400 submitting-patches.rst: remove heading numbering This follows similar changes throughout Documentation; these numbers tend to get outdated and are not especially useful. Signed-off-by: Drew DeVault Link: https://lore.kernel.org/r/20200903160545.83185-2-sir@cmpwn.com Signed-off-by: Jonathan Corbet commit b445547ec1bbd3e7bf4b1c142550942f70527d95 Author: Kashyap Desai Date: Wed Aug 19 23:20:28 2020 +0800 blk-mq, elevator: Count requests per hctx to improve performance High CPU utilization on "native_queued_spin_lock_slowpath" due to lock contention is possible for mq-deadline and bfq IO schedulers when nr_hw_queues is more than one. It is because kblockd work queue can submit IO from all online CPUs (through blk_mq_run_hw_queues()) even though only one hctx has pending commands. The elevator callback .has_work for mq-deadline and bfq scheduler considers pending work if there are any IOs on request queue but it does not account hctx context. Add a per-hctx 'elevator_queued' count to the hctx to avoid triggering the elevator even though there are no requests queued. [jpg: Relocated atomic_dec() in dd_dispatch_request(), update commit message per Kashyap] Signed-off-by: Kashyap Desai Signed-off-by: Hannes Reinecke Signed-off-by: John Garry Tested-by: Douglas Gilbert Signed-off-by: Jens Axboe commit f1b49fdc1c64db110aa1315831e5fe0f8599fa56 Author: John Garry Date: Wed Aug 19 23:20:27 2020 +0800 blk-mq: Record active_queues_shared_sbitmap per tag_set for when using shared sbitmap For when using a shared sbitmap, no longer should the number of active request queues per hctx be relied on for when judging how to share the tag bitmap. Instead maintain the number of active request queues per tag_set, and make the judgement based on that. Originally-from: Kashyap Desai Signed-off-by: John Garry Tested-by: Don Brace #SCSI resv cmds patches used Tested-by: Douglas Gilbert Signed-off-by: Jens Axboe commit bccf5e26d99c28980bd6ced474422a1b18402263 Author: John Garry Date: Wed Aug 19 23:20:26 2020 +0800 blk-mq: Record nr_active_requests per queue for when using shared sbitmap The per-hctx nr_active value can no longer be used to fairly assign a share of tag depth per request queue for when using a shared sbitmap, as it does not consider that the tags are shared tags over all hctx's. For this case, record the nr_active_requests per request_queue, and make the judgement based on that value. Co-developed-with: Kashyap Desai Signed-off-by: John Garry Tested-by: Don Brace #SCSI resv cmds patches used Tested-by: Douglas Gilbert Signed-off-by: Jens Axboe commit a0235d230f3245aa4bd70b514d5effb24be61acd Author: John Garry Date: Wed Aug 19 23:20:25 2020 +0800 blk-mq: Relocate hctx_may_queue() blk-mq.h and blk-mq-tag.h include on each other, which is less than ideal. Locate hctx_may_queue() to blk-mq.h, as it is not really tag specific code. In this way, we can drop the blk-mq-tag.h include of blk-mq.h Signed-off-by: John Garry Tested-by: Douglas Gilbert Signed-off-by: Jens Axboe commit 32bc15afed04bd73e29d713d8db47818d6aa89af Author: John Garry Date: Wed Aug 19 23:20:24 2020 +0800 blk-mq: Facilitate a shared sbitmap per tagset Some SCSI HBAs (such as HPSA, megaraid, mpt3sas, hisi_sas_v3 ..) support multiple reply queues with single hostwide tags. In addition, these drivers want to use interrupt assignment in pci_alloc_irq_vectors(PCI_IRQ_AFFINITY). However, as discussed in [0], CPU hotplug may cause in-flight IO completion to not be serviced when an interrupt is shutdown. That problem is solved in commit bf0beec0607d ("blk-mq: drain I/O when all CPUs in a hctx are offline"). However, to take advantage of that blk-mq feature, the HBA HW queuess are required to be mapped to that of the blk-mq hctx's; to do that, the HBA HW queues need to be exposed to the upper layer. In making that transition, the per-SCSI command request tags are no longer unique per Scsi host - they are just unique per hctx. As such, the HBA LLDD would have to generate this tag internally, which has a certain performance overhead. However another problem is that blk-mq assumes the host may accept (Scsi_host.can_queue * #hw queue) commands. In commit 6eb045e092ef ("scsi: core: avoid host-wide host_busy counter for scsi_mq"), the Scsi host busy counter was removed, which would stop the LLDD being sent more than .can_queue commands; however, it should still be ensured that the block layer does not issue more than .can_queue commands to the Scsi host. To solve this problem, introduce a shared sbitmap per blk_mq_tag_set, which may be requested at init time. New flag BLK_MQ_F_TAG_HCTX_SHARED should be set when requesting the tagset to indicate whether the shared sbitmap should be used. Even when BLK_MQ_F_TAG_HCTX_SHARED is set, a full set of tags and requests are still allocated per hctx; the reason for this is that if tags and requests were only allocated for a single hctx - like hctx0 - it may break block drivers which expect a request be associated with a specific hctx, i.e. not always hctx0. This will introduce extra memory usage. This change is based on work originally from Ming Lei in [1] and from Bart's suggestion in [2]. [0] https://lore.kernel.org/linux-block/alpine.DEB.2.21.1904051331270.1802@nanos.tec.linutronix.de/ [1] https://lore.kernel.org/linux-block/20190531022801.10003-1-ming.lei@redhat.com/ [2] https://lore.kernel.org/linux-block/ff77beff-5fd9-9f05-12b6-826922bace1f@huawei.com/T/#m3db0a602f095cbcbff27e9c884d6b4ae826144be Signed-off-by: John Garry Tested-by: Don Brace #SCSI resv cmds patches used Tested-by: Douglas Gilbert Signed-off-by: Jens Axboe commit 222a5ae03cdd12e7643f2f64689a39ed547650cb Author: John Garry Date: Wed Aug 19 23:20:23 2020 +0800 blk-mq: Use pointers for blk_mq_tags bitmap tags Introduce pointers for the blk_mq_tags regular and reserved bitmap tags, with the goal of later being able to use a common shared tag bitmap across all HW contexts in a set. Signed-off-by: John Garry Tested-by: Don Brace #SCSI resv cmds patches used Tested-by: Douglas Gilbert Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 1c0706a70a64eda48477caa880657e07f5196512 Author: John Garry Date: Wed Aug 19 23:20:22 2020 +0800 blk-mq: Pass flags for tag init/free Pass hctx/tagset flags argument down to blk_mq_init_tags() and blk_mq_free_tags() for selective init/free. For now, make it include the alloc policy flag, which can be evaluated when needed (in blk_mq_init_tags()). Signed-off-by: John Garry Tested-by: Douglas Gilbert Signed-off-by: Jens Axboe commit 4d063237b92a4e8d99350ad05492a45009a3c78c Author: Hannes Reinecke Date: Wed Aug 19 23:20:21 2020 +0800 blk-mq: Free tags in blk_mq_init_tags() upon error Since the tags are allocated in blk_mq_init_tags(), it's better practice to free in that same function upon error, rather than a callee which is to init the bitmap tags (blk_mq_init_tags()). [jpg: Split from an earlier patch with a new commit message] Signed-off-by: Hannes Reinecke Signed-off-by: John Garry Tested-by: Douglas Gilbert Signed-off-by: Jens Axboe commit 655ac30094da0d724ce66161f15675d30da89cd8 Author: Hannes Reinecke Date: Wed Aug 19 23:20:20 2020 +0800 blk-mq: Rename blk_mq_update_tag_set_depth() The function does not set the depth, but rather transitions from shared to non-shared queues and vice versa. So rename it to blk_mq_update_tag_set_shared() to better reflect its purpose. [jpg: take out some unrelated changes in blk_mq_init_bitmap_tags()] Signed-off-by: Hannes Reinecke Signed-off-by: John Garry Tested-by: Douglas Gilbert Signed-off-by: Jens Axboe commit 51db1c37ee166159c5753ce8d64d6bacf113e0f0 Author: Ming Lei Date: Wed Aug 19 23:20:19 2020 +0800 blk-mq: Rename BLK_MQ_F_TAG_SHARED as BLK_MQ_F_TAG_QUEUE_SHARED BLK_MQ_F_TAG_SHARED actually means that tags is shared among request queues, all of which should belong to LUNs attached to same HBA. So rename it to make the point explicitly. [jpg: rebase a few times, add rnbd-clt.c change] Suggested-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: John Garry Tested-by: Douglas Gilbert Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 767ec7289e83721fee205a13b459f12fb2cf922f Author: Uros Bizjak Date: Thu Aug 27 20:09:04 2020 +0200 x86/uaccess: Use XORL %0,%0 in __get_user_asm() XORL %0,%0 is equivalent to XORQ %0,%0 as both will zero the entire register. Use XORL %0,%0 for all operand sizes to avoid REX prefix byte when legacy registers are used and to avoid size prefix byte when 16bit registers are used. Zeroing the full register is OK in this use case. As a result, the size of the .fixup section decreases by 20 bytes. [ bp: Massage commit message. ] Signed-off-by: Uros Bizjak Signed-off-by: Borislav Petkov Reviewed-by: H. Peter Anvin (Intel) Link: https://lkml.kernel.org/r/20200827180904.96399-1-ubizjak@gmail.com commit d872e4e98751903f7cb131123aae9399d1a0c1cc Author: Krzysztof Kozlowski Date: Tue Sep 1 09:54:14 2020 +0200 ARM: dts: exynos: Silence DP HPD pinctrl dtschema warning in Exynos5250 Spring The pin configuration of Display Port HPD GPIO emds with '-gpio' which confuses dtschema: arch/arm/boot/dts/exynos5250-spring.dt.yaml: pinctrl@11400000: dp-hpd-gpio: {'samsung,pins': ['gpc3-0'], ... 'samsung,pin-drv': [[0]], 'phandle': [[23]]} is not of type 'array' From schema: lib/python3.6/site-packages/dtschema/schemas/gpio/gpio-consumer.yaml Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901075417.22481-11-krzk@kernel.org commit a2d86d420fa446913df2885a6db8abe559e067eb Author: Krzysztof Kozlowski Date: Tue Sep 1 09:54:13 2020 +0200 ARM: dts: exynos: Use S5M8767 clock in S3C RTC in Exynos5250 Spring Use the 32 kHz clock from S5M8767 PMIC in the S3C RTC node. Except making the S3C RTC working, this also fixes dtbs_check warnings: arch/arm/boot/dts/exynos5250-spring.dt.yaml: rtc@101e0000: clocks: [[2, 337]] is too short arch/arm/boot/dts/exynos5250-spring.dt.yaml: rtc@101e0000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901075417.22481-10-krzk@kernel.org commit ac88a60a276b596ad4ba0b69806502f94f4c2be1 Author: Krzysztof Kozlowski Date: Tue Sep 1 09:54:12 2020 +0200 ARM: dts: exynos: Add max77686 clocks for S3C RTC in SMDK5250 Add clock-cells to max77686 PMIC node so its 32 kHz clocks could be used later in the S3C RTC node. Except making the S3C RTC working, this also fixes dtbs_check warnings: arch/arm/boot/dts/exynos5250-smdk5250.dt.yaml: rtc@101e0000: clocks: [[2, 337]] is too short arch/arm/boot/dts/exynos5250-smdk5250.dt.yaml: rtc@101e0000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901075417.22481-9-krzk@kernel.org commit 7e86ef5cc89609cbad8b9dd2f476789c638dbb92 Author: Krzysztof Kozlowski Date: Tue Sep 1 09:54:11 2020 +0200 ARM: dts: exynos: Override thermal by label in Exynos5250 Using full paths to extend or override a device tree node is error prone since if there was a typo error, a new node will be created instead of extending the node as it was desired. This will lead to run-time errors that could be hard to detect. A mistyped label on the other hand, will cause a dtc compile error (during build time). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901075417.22481-8-krzk@kernel.org commit 9e7fe41778c6644fd8d5e43dc59daad8ad66e9a8 Author: Krzysztof Kozlowski Date: Tue Sep 1 09:54:10 2020 +0200 ARM: dts: exynos: Correct whitespace and indentation issues in Exynos5 Remove double space after '=' and fix indentation in Exynos5250, Exynos5410 and Exynos5420 DTS files. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901075417.22481-7-krzk@kernel.org commit 41af0d2ea1b03282b9f6da8b610ac30768893518 Author: Krzysztof Kozlowski Date: Tue Sep 1 09:54:09 2020 +0200 ARM: dts: exynos: Silence i2c-gpio dtschema warning in Exynos5250 Arndale The name of I2C controller over GPIO lines node ends with '-gpio' which confuses dtschema: arch/arm/boot/dts/exynos5250-arndale.dt.yaml: soc: i2c-gpio: {'pinctrl-names': ['default'], ... 'phandle': [[65]]} is not of type 'array' From schema: lib/python3.6/site-packages/dtschema/schemas/gpio/gpio-consumer.yaml Add a '-10' (there are already 0-9 I2C controllers on the SoC) suffix to silence it. This pattern on naming i2c-gpio is already present in many other dts. No functional change. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901075417.22481-6-krzk@kernel.org commit 8dec8385bee4f77e9d09a897a01cab8643c78a7d Author: Krzysztof Kozlowski Date: Tue Sep 1 09:54:08 2020 +0200 ARM: dts: exynos: Correct S3C RTC bindings in SMDK5410 The S3C RTC requires 32768 Hz clock as input which is provided by PMIC. However the PMIC is not described in DTS at all so at least add a workaround to model its clock with a fixed-clock. This fixes S3C RTC and silences dtbs_check warnings like: arch/arm/boot/dts/exynos5410-smdk5410.dt.yaml: rtc@101e0000: clocks: [[5, 317]] is too short arch/arm/boot/dts/exynos5410-smdk5410.dt.yaml: rtc@101e0000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901075417.22481-5-krzk@kernel.org commit 2495ddd2d17c20573463ac9c90ae6a83b79d7aa9 Author: Krzysztof Kozlowski Date: Tue Sep 1 09:54:07 2020 +0200 ARM: dts: exynos: Remove unneeded address/size cells in Exynos5260 GIC The Exynos5260 GIC node does not have any children so remove the address and size cells as they are not needed by DT bindings. The size-cells of '0' were also incorrect. This fixes dtbs_check warning: arch/arm/boot/dts/exynos5260-xyref5260.dt.yaml: interrupt-controller@10481000: #size-cells:0:0: 1 was expected Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901075417.22481-4-krzk@kernel.org commit 1fa7c1ac2365fd53f891789138932380bdb4488c Author: Krzysztof Kozlowski Date: Tue Sep 1 09:54:06 2020 +0200 ARM: dts: exynos: Correct compatible for Exynos5260 GIC Exynos5260 SoCs have ARM GIC 400. Correct the compatibles to match dtschema and fix the dtbs_check warnings like: arch/arm/boot/dts/exynos5260-xyref5260.dt.yaml: interrupt-controller@10481000: compatible: ['arm,cortex-a15-gic', 'arm,cortex-a9-gic'] is not valid under any of the given schemas Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901075417.22481-3-krzk@kernel.org commit dfe3a98aac4fd179cce67451bc0c3972bd8c6116 Author: Krzysztof Kozlowski Date: Tue Sep 1 09:54:05 2020 +0200 ARM: dts: exynos: Correct compatible for Exynos5 GIC Exynos5250 and Exynso54xx SoCs have ARM GIC 400. Correct the compatibles to match dtschema and fix the dtbs_check warnings like: arch/arm/boot/dts/exynos5420-peach-pit.dt.yaml: interrupt-controller@10481000: compatible: ['arm,gic-400', 'arm,cortex-a15-gic', 'arm,cortex-a9-gic'] is not valid under any of the given schemas Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200901075417.22481-2-krzk@kernel.org commit 7c8b9e3000f82de68373db23819f9585e54186bb Author: Nícolas F. R. A. Prado Date: Thu Sep 3 00:58:26 2020 +0000 kernel-doc: Update "cross-referencing from rST" section to use automarkup Update text and examples in the "Cross-referencing from reStructuredText" section to reflect that no additional syntax is needed anymore. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20200903005747.3900333-3-nfraprado@protonmail.com Signed-off-by: Jonathan Corbet commit d82b1e833e7cf4265b88287f469454a66afe95d8 Author: Nícolas F. R. A. Prado Date: Thu Sep 3 00:58:19 2020 +0000 docs: Add automatic cross-reference for C types In order to cross-reference C types in the documentation, Sphinx requires the syntax :c:type:`type_name`, or even :c:type:`struct type_name ` in order to have the link text different from the target text. Extend automarkup to enable automatic cross-reference of C types by matching any "struct|union|enum|typedef type_name" expression. This makes the documentation's plain text cleaner and adds cross-reference to types without any additional effort by the author. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20200903005747.3900333-2-nfraprado@protonmail.com Signed-off-by: Jonathan Corbet commit 08aaa0819d5cce78a10c2fcea17057d07698691f Merge: ffd923f5f8d55 9d319a8e9309d Author: David S. Miller Date: Thu Sep 3 12:19:04 2020 -0700 Merge branch 'l2tp-miscellaneous-cleanups' Tom Parkin says: ==================== l2tp: miscellaneous cleanups This series of patches makes the following cleanups and improvements to the l2tp code: * various API tweaks to remove unused parameters from function calls * lightly refactor the l2tp transmission path to capture more error conditions in the data plane statistics * repurpose the "magic feather" validation in l2tp to check for sk_user_data (ab)use as opposed to refcount debugging * remove some duplicated code ==================== Reviewed-by: James Chapman Signed-off-by: David S. Miller commit 9d319a8e9309d6c2862e2f6721acb5b421af949e Author: Tom Parkin Date: Thu Sep 3 09:54:52 2020 +0100 l2tp: avoid duplicated code in l2tp_tunnel_closeall l2tp_tunnel_closeall is called as a part of tunnel shutdown in order to close all the sessions held by the tunnel. The code it uses to close a session duplicates what l2tp_session_delete does. Rather than duplicating the code, have l2tp_tunnel_closeall call l2tp_session_delete instead. This involves a very minor change to locking in l2tp_tunnel_closeall. Previously, l2tp_tunnel_closeall checked the session "dead" flag while holding tunnel->hlist_lock. This allowed for the code to step to the next session in the list without releasing the lock if the current session happened to be in the process of closing already. By calling l2tp_session_delete instead, l2tp_tunnel_closeall must now drop and regain the hlist lock for each session in the tunnel list. Given that the likelihood of a session being in the process of closing when the tunnel is closed, it seems worth this very minor potential loss of efficiency to avoid duplication of the session delete code. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 45faeff11b48b9390ee946668119472b8941de90 Author: Tom Parkin Date: Thu Sep 3 09:54:51 2020 +0100 l2tp: make magic feather checks more useful The l2tp tunnel and session structures contain a "magic feather" field which was originally intended to help trace lifetime bugs in the code. Since the introduction of the shared kernel refcount code in refcount.h, and l2tp's porting to those APIs, we are covered by the refcount code's checks and warnings. Duplicating those checks in the l2tp code isn't useful. However, magic feather checks are still useful to help to detect bugs stemming from misuse/trampling of the sk_user_data pointer in struct sock. The l2tp code makes extensive use of sk_user_data to stash pointers to the tunnel and session structures, and if another subsystem overwrites sk_user_data it's important to detect this. As such, rework l2tp's magic feather checks to focus on validating the tunnel and session data structures when they're extracted from sk_user_data. * Add a new accessor function l2tp_sk_to_tunnel which contains a magic feather check, and is used by l2tp_core and l2tp_ip[6] * Comment l2tp_udp_encap_recv which doesn't use this new accessor function because of the specific nature of the codepath it is called in * Drop l2tp_session_queue_purge's check on the session magic feather: it is called from code which is walking the tunnel session list, and hence doesn't need validation * Drop l2tp_session_free's check on the tunnel magic feather: the intention of this check is covered by refcount.h's reference count sanity checking * Add session magic validation in pppol2tp_ioctl. On failure return -EBADF, which mirrors the approach in pppol2tp_[sg]etsockopt. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit de68b039e970c1e55850818fb1bcd49f52dc02e8 Author: Tom Parkin Date: Thu Sep 3 09:54:50 2020 +0100 l2tp: capture more tx errors in data plane stats l2tp_xmit_skb has a number of failure paths which are not reflected in the tunnel and session statistics because the stats are updated by l2tp_xmit_core. Hence any errors occurring before l2tp_xmit_core is called are missed from the statistics. Refactor the transmit path slightly to capture all error paths. l2tp_xmit_skb now leaves all the actual work of transmission to l2tp_xmit_core, and updates the statistics based on l2tp_xmit_core's return code. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit c9ccd4c63c40fa03a9d5850c4a8847192b640524 Author: Tom Parkin Date: Thu Sep 3 09:54:49 2020 +0100 l2tp: drop net argument from l2tp_tunnel_create The argument is unused, so remove it. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 039bca78cb7cce6cc2b8b1a2b0a0d8fa8ba49a84 Author: Tom Parkin Date: Thu Sep 3 09:54:48 2020 +0100 l2tp: drop data_len argument from l2tp_xmit_core The data_len argument passed to l2tp_xmit_core is no longer used, so remove it. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit efe0527882a348b55415720c6e46448d3ca87dd9 Author: Tom Parkin Date: Thu Sep 3 09:54:47 2020 +0100 l2tp: remove header length param from l2tp_xmit_skb All callers pass the session structure's hdr_len field as the header length parameter to l2tp_xmit_skb. Since we're passing a pointer to the session structure to l2tp_xmit_skb anyway, there's not much point breaking the header length out as a separate argument. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit ffd923f5f8d5501f7f123f5c4241eaee3e870a30 Merge: 7544abd90e852 91df5d3a72e33 Author: David S. Miller Date: Thu Sep 3 12:12:05 2020 -0700 Merge branch 'mlxsw-Expose-critical-and-emergency-module-alarms' Ido Schimmel says: ==================== mlxsw: Expose critical and emergency module alarms Amit says: Extend hwmon interface with critical and emergency module alarms. In case that current module temperature is higher than emergency threshold, EMERGENCY alarm will be reported in sensors utility: $ sensors ... front panel 025: +55.0°C (crit = +35.0°C, emerg = +40.0°C) ALARM(EMERGENCY) In case that current module temperature is higher than critical threshold, CRIT alarm will be reported in sensors utility: $ sensors ... front panel 025: +54.0°C (crit = +35.0°C, emerg = +80.0°C) ALARM(CRIT) Patch set overview: Patches #1-#2 make several changes to make the code easier to change. Patch #3 extends the hwmon interface with the new module alarms. ==================== Signed-off-by: David S. Miller commit 91df5d3a72e33446556b49c9b272e89baeec6cd8 Author: Amit Cohen Date: Thu Sep 3 16:41:46 2020 +0300 mlxsw: core_hwmon: Extend hwmon interface with critical and emergency alarms Add new attributes to hwmon object for exposing critical and emergency alarms. In case that current temperature is higher than emergency threshold, EMERGENCY alarm will be reported in sensors utility: $ sensors ... front panel 025: +55.0°C (crit = +35.0°C, emerg = +40.0°C) ALARM(EMERGENCY) In case that current temperature is higher than critical threshold, CRIT alarm will be reported in sensors utility: $ sensors ... front panel 025: +54.0°C (crit = +35.0°C, emerg = +80.0°C) ALARM(CRIT) Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Acked-by: Vadim Pasternak Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 02bed4e8b705284b593948676ebe1c6629dc5895 Author: Amit Cohen Date: Thu Sep 3 16:41:45 2020 +0300 mlxsw: core_hwmon: Calculate MLXSW_HWMON_ATTR_COUNT more accurately Currently the value of MLXSW_HWMON_ATTR_COUNT is calculated not really accurate. Add several defines to make the calculation clearer and easier to change. Calculate the precise high bound of number of attributes that may be needed. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ad38d47b2f9b7f8247ae1527a66a5924a585ab5a Author: Amit Cohen Date: Thu Sep 3 16:41:44 2020 +0300 mlxsw: core_hwmon: Split temperature querying from show functions mlxsw_hwmon_module_temp_show(), mlxsw_hwmon_module_temp_critical_show() and mlxsw_hwmon_module_temp_emergency_show() query the relevant temperature from firmware and fill the value in provided buffers. Split the temperature querying functionality to individual get() functions and call them from the show() functions. The get() functions will be used by subsequent patches in the set. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 7544abd90e852d46eb65d23dfcfb41ed7b7e6008 Merge: 22b330b622e3f 434d2312cd805 Author: David S. Miller Date: Thu Sep 3 12:07:29 2020 -0700 Merge branch 'Minor-improvements-to-b53-dmesg-output' Paul Barker says: ==================== Minor improvements to b53 dmesg output These changes were made while debugging the b53 driver for use on a custom board. They've been runtime tested on a patched 4.14.y kernel which supports this board as well as build tested with 5.9-rc3. The changes are straightforward enough that I think this testing is sufficient but let me know if further testing is required. Unfortunately I don't have a board to hand which boots with a more recent kernel and has a switch supported by the b53 driver. I'd still like to upstream these patches if possible though. ==================== Signed-off-by: David S. Miller commit 434d2312cd8057aa6972f2b39aa0b359d02af9f4 Author: Paul Barker Date: Thu Sep 3 12:26:21 2020 +0100 net: dsa: b53: Print err message on SW_RST timeout This allows us to differentiate between the possible failure modes of b53_switch_reset() by looking at the dmesg output. Signed-off-by: Paul Barker Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 3b33438c52def0de4a5577ad541e50923bcc2596 Author: Paul Barker Date: Thu Sep 3 12:26:20 2020 +0100 net: dsa: b53: Use dev_{err,info} instead of pr_* This change allows us to see which device the err or info messages are referring to if we have multiple b53 compatible devices on a board. As this removes the only pr_*() calls in this file we can drop the definition of pr_fmt(). Signed-off-by: Paul Barker Signed-off-by: David S. Miller commit 11bc98bd71fe2e0cb572988519e51bca9d58a18a Author: Alex Deucher Date: Wed Sep 2 13:38:00 2020 -0400 drm/amdgpu/mmhub2.0: print client id string for mmhub Print the name of the client rather than the number. This makes it easier to debug what block is causing the fault. Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 02f23f5f7c4bad0bea5ed1685d78280df0295478 Author: Alex Deucher Date: Wed Sep 2 13:07:47 2020 -0400 drm/amdgpu/gmc9: print client id string for mmhub Print the name of the client rather than the number. This makes it easier to debug what block is causing the fault. Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 93fabd84c90683199a294b6696559772f3e43e3a Author: Alex Deucher Date: Tue Sep 1 17:49:47 2020 -0400 drm/amdgpu/gmc10: print client id string for gfxhub Print the name of the client rather than the number. This makes it easier to debug what block is causing the fault. Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit be99ecbfff4e3603994ebfcc37072270b0734ab7 Author: Alex Deucher Date: Tue Sep 1 17:48:23 2020 -0400 drm/amdgpu/gmc9: print client id string for gfxhub Print the name of the client rather than the number. This makes it easier to debug what block is causing the fault. Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2d37949dc3bacf3523b97ec84eb16a26574fe5b3 Author: Ye Bin Date: Thu Sep 3 10:17:56 2020 +0800 drm/amdgpu/gfx10: Delete some duplicated argument to '|' 1. gfx_v10_0_soft_reset GRBM_STATUS__SPI_BUSY_MASK 2. gfx_v10_0_update_gfx_clock_gating AMD_CG_SUPPORT_GFX_CGLS Reviewed-by: Huang Rui Signed-off-by: Ye Bin Signed-off-by: Alex Deucher commit 6627d1c1a82ba72d6595a10d7453b6d30e288467 Author: Changfeng Date: Tue Sep 1 16:17:01 2020 +0800 drm/amdgpu: add ta firmware load in psp_v12_0 for renoir It needs to load renoir_ta firmware because hdcp is enabled by default for renoir now. This can avoid error:DTM TA is not initialized Signed-off-by: Changfeng Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit ee354ff1c7c210fb41952ebf0a820fb714eae7b1 Author: Christian König Date: Wed Sep 2 11:07:14 2020 +0200 drm/amdgpu: fix max_entries calculation v4 Calculate the correct value for max_entries or we might run after the page_address array. v2: Xinhui pointed out we don't need the shift v3: use local copy of start and simplify some calculation v4: fix the case that we map less VA range than BO size Signed-off-by: Christian König Fixes: 1e691e244487 drm/amdgpu: stop allocating dummy GTT nodes Reviewed-by: xinhui pan Signed-off-by: Alex Deucher commit 1625951a3a7bdd776d38f2cdd35f72a795e82df0 Author: Luben Tuikov Date: Tue Sep 1 19:10:32 2020 -0400 drm/amdgpu: Remove superfluous NULL check The DRM device is a static member of the amdgpu device structure and as such always exists, so long as the PCI and thus the amdgpu device exist. Signed-off-by: Luben Tuikov Acked-by: Daniel Vetter Acked-by: Christian König Signed-off-by: Alex Deucher commit abb6fccbb4e5bab30ff9b96e27acdd9107426f28 Author: Alex Sierra Date: Tue Sep 1 23:24:56 2020 -0500 drm/amdgpu: enable ih1 ih2 for Arcturus only Enable multi-ring ih1 and ih2 for Arcturus only. For Navi10 family multi-ring has been disabled. Apparently, having multi-ring enabled in Navi was causing continus page fault interrupts. Further investigation is needed to get to the root cause. Related issue link: https://gitlab.freedesktop.org/drm/amd/-/issues/1279 Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1545fbf97eafc1dbdc2923e58b4186b16a834784 Author: xinhui pan Date: Tue Sep 1 15:49:36 2020 +0800 drm/amd/display: Fix a list corruption Remove the private obj from the internal list before we free aconnector. [ 56.925828] BUG: unable to handle page fault for address: ffff8f84a870a560 [ 56.933272] #PF: supervisor read access in kernel mode [ 56.938801] #PF: error_code(0x0000) - not-present page [ 56.944376] PGD 18e605067 P4D 18e605067 PUD 86a614067 PMD 86a4d0067 PTE 800ffff8578f5060 [ 56.953260] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC NOPTI [ 56.958815] CPU: 6 PID: 1407 Comm: bash Tainted: G O 5.9.0-rc2+ #46 [ 56.967092] Hardware name: System manufacturer System Product Name/PRIME Z390-A, BIOS 1401 11/26/2019 [ 56.977162] RIP: 0010:__list_del_entry_valid+0x31/0xa0 [ 56.982768] Code: 00 ad de 55 48 8b 17 4c 8b 47 08 48 89 e5 48 39 c2 74 27 48 b8 22 01 00 00 00 00 ad de 49 39 c0 74 2d 49 8b 30 48 39 fe 75 3d <48> 8b 52 08 48 39 f2 75 4c b8 01 00 00 00 5d c3 48 89 7 [ 57.003327] RSP: 0018:ffffb40c81687c90 EFLAGS: 00010246 [ 57.009048] RAX: dead000000000122 RBX: ffff8f84ea41f4f0 RCX: 0000000000000006 [ 57.016871] RDX: ffff8f84a870a558 RSI: ffff8f84ea41f4f0 RDI: ffff8f84ea41f4f0 [ 57.024672] RBP: ffffb40c81687c90 R08: ffff8f84ea400998 R09: 0000000000000001 [ 57.032490] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000006 [ 57.040287] R13: ffff8f84ea422a90 R14: ffff8f84b4129a20 R15: fffffffffffffff2 [ 57.048105] FS: 00007f550d885740(0000) GS:ffff8f8509600000(0000) knlGS:0000000000000000 [ 57.056979] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 57.063260] CR2: ffff8f84a870a560 CR3: 00000007e5144001 CR4: 00000000003706e0 [ 57.071053] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 57.078849] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 57.086684] Call Trace: [ 57.089381] drm_atomic_private_obj_fini+0x29/0x82 [drm] [ 57.095247] amdgpu_dm_fini+0x83/0x170 [amdgpu] [ 57.100264] dm_hw_fini+0x23/0x30 [amdgpu] [ 57.104814] amdgpu_device_fini+0x1df/0x4fe [amdgpu] [ 57.110271] amdgpu_driver_unload_kms+0x43/0x70 [amdgpu] [ 57.116136] amdgpu_pci_remove+0x3b/0x60 [amdgpu] [ 57.121291] pci_device_remove+0x3e/0xb0 [ 57.125583] device_release_driver_internal+0xff/0x1d0 [ 57.131223] device_release_driver+0x12/0x20 [ 57.135903] pci_stop_bus_device+0x70/0xa0 [ 57.140401] pci_stop_and_remove_bus_device_locked+0x1b/0x30 [ 57.146571] remove_store+0x7b/0x90 [ 57.150429] dev_attr_store+0x17/0x30 [ 57.154441] sysfs_kf_write+0x4b/0x60 [ 57.158479] kernfs_fop_write+0xe8/0x1d0 [ 57.162788] vfs_write+0xf5/0x230 [ 57.166426] ksys_write+0x70/0xf0 [ 57.170087] __x64_sys_write+0x1a/0x20 [ 57.174219] do_syscall_64+0x38/0x90 [ 57.178145] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: xinhui pan Acked-by: Feifei Xu Signed-off-by: Alex Deucher commit 3d7248d7cee40ced0ac27517f1678beac67502f5 Author: xinhui pan Date: Tue Sep 1 15:28:06 2020 +0800 drm/amdgpu: Fix a redundant kfree drm_dev_alloc() alloc *dev* and set managed.final_kfree to dev to free itself. Now from commit 5cdd68498918("drm/amdgpu: Embed drm_device into amdgpu_device (v3)") we alloc *adev* and ddev is just a member of it. So drm_dev_release try to free a wrong pointer then. Also driver's release trys to free adev, but drm_dev_release will access dev after call drvier's release. To fix it, remove driver's release and set managed.final_kfree to adev. [ 36.269348] BUG: unable to handle page fault for address: ffffa0c279940028 [ 36.276841] #PF: supervisor read access in kernel mode [ 36.282434] #PF: error_code(0x0000) - not-present page [ 36.288053] PGD 676601067 P4D 676601067 PUD 86a414067 PMD 86a247067 PTE 800ffff8066bf060 [ 36.296868] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC NOPTI [ 36.302409] CPU: 4 PID: 1375 Comm: bash Tainted: G O 5.9.0-rc2+ #46 [ 36.310670] Hardware name: System manufacturer System Product Name/PRIME Z390-A, BIOS 1401 11/26/2019 [ 36.320725] RIP: 0010:drm_managed_release+0x25/0x110 [drm] [ 36.326741] Code: 80 00 00 00 00 0f 1f 44 00 00 55 48 c7 c2 5a 9f 41 c0 be 00 02 00 00 48 89 e5 41 57 41 56 41 55 41 54 49 89 fc 53 48 83 ec 08 <48> 8b 7f 18 e8 c2 10 ff ff 4d 8b 74 24 20 49 8d 44 24 5 [ 36.347217] RSP: 0018:ffffb9424141fce0 EFLAGS: 00010282 [ 36.352931] RAX: 0000000000000006 RBX: ffffa0c279940010 RCX: 0000000000000006 [ 36.360718] RDX: ffffffffc0419f5a RSI: 0000000000000200 RDI: ffffa0c279940010 [ 36.368503] RBP: ffffb9424141fd10 R08: 0000000000000001 R09: 0000000000000001 [ 36.376304] R10: 0000000000000000 R11: 0000000000000000 R12: ffffa0c279940010 [ 36.384070] R13: ffffffffc0e2a000 R14: ffffa0c26924e220 R15: fffffffffffffff2 [ 36.391845] FS: 00007fc4a277b740(0000) GS:ffffa0c288e00000(0000) knlGS:0000000000000000 [ 36.400669] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 36.406937] CR2: ffffa0c279940028 CR3: 0000000792304006 CR4: 00000000003706e0 [ 36.414732] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 36.422550] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 36.430354] Call Trace: [ 36.433044] drm_dev_put.part.0+0x40/0x60 [drm] [ 36.438017] drm_dev_put+0x13/0x20 [drm] [ 36.442398] amdgpu_pci_remove+0x56/0x60 [amdgpu] [ 36.447528] pci_device_remove+0x3e/0xb0 [ 36.451807] device_release_driver_internal+0xff/0x1d0 [ 36.457416] device_release_driver+0x12/0x20 [ 36.462094] pci_stop_bus_device+0x70/0xa0 [ 36.466588] pci_stop_and_remove_bus_device_locked+0x1b/0x30 [ 36.472786] remove_store+0x7b/0x90 [ 36.476614] dev_attr_store+0x17/0x30 [ 36.480646] sysfs_kf_write+0x4b/0x60 [ 36.484655] kernfs_fop_write+0xe8/0x1d0 [ 36.488952] vfs_write+0xf5/0x230 [ 36.492562] ksys_write+0x70/0xf0 [ 36.496206] __x64_sys_write+0x1a/0x20 [ 36.500292] do_syscall_64+0x38/0x90 [ 36.504219] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: xinhui pan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 81202807ae6096bfbbfa28c2bc83cae1841bba38 Author: Dennis Li Date: Tue Sep 1 09:03:53 2020 +0800 drm/amdgpu: block ring buffer access during GPU recovery When GPU is in reset, its status isn't stable and ring buffer also need be reset when resuming. Therefore driver should protect GPU recovery thread from ring buffer accessed by other threads. Otherwise GPU will randomly hang during recovery. v2: correct indent Reviewed-by: Hawking Zhang Reviewed-by: Christian König Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit f6eb433954bf32ab582208d9b58ec397f7814e5a Author: Alex Deucher Date: Thu Aug 27 00:12:38 2020 -0400 drm/amdgpu/swsmu: handle manual fan readback on SMU11 Need to read back from registers for manual mode rather than using the metrics table. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1164 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 9a7fd01384c3fdb16e303e2b13810d3f72835d2a Author: Alex Deucher Date: Tue Aug 25 14:35:50 2020 -0400 drm/amdgpu/swsmu: add smu11 helper to get manual fan speed (v2) Will be used to fetch the fan speeds when manual fan mode is set. v2: squash in a Coverity fix from Colin Ian King Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 8d6e65adc25e23fabbc5293b6cd320195c708dca Author: Alex Deucher Date: Thu Aug 27 00:04:24 2020 -0400 drm/amdgpu/swsmu: drop set_fan_speed_percent (v2) No longer needed as we can calculate it based on the fan's max rpm. v2: minor code rework Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit eff6474260028d7293ac23234f33b49cde0f85f0 Author: Alex Deucher Date: Wed Aug 26 23:49:37 2020 -0400 drm/amdgpu/swsmu: drop get_fan_speed_percent (v2) No longer needed as we can calculate it based on the fan's max rpm. v2: rework code to avoid possible uninitialized variable use. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 3204ff3e08f2c1bf7f7c93a15bae77d0043587d6 Author: Alex Deucher Date: Wed Aug 26 23:34:57 2020 -0400 drm/amdgpu/swsmu: add get_fan_parameters callbacks for smu11 asics grab the value from the pptable. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 337b57aecb3e11294b0e547aac871a5481fd42ed Author: Alex Deucher Date: Wed Aug 26 23:22:24 2020 -0400 drm/amdgpu/swsmu: add new callback for getting fan parameters To fetch the max rpm from pptable. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit bc21585f3ff050f3fc7faaefc5e5c0541cec7aae Author: Nirmoy Das Date: Sat Aug 29 06:51:41 2020 +0200 drm/amdgpu: disable gpu-sched load balance for uvd On hardware with multiple uvd instances, dependent uvd jobs may get scheduled to different uvd instances. Because uvd_enc jobs retain hw context, dependent jobs should always run on the same uvd instance. This patch disables GPU scheduler's load balancer for a context that binds jobs from the same context to a uvd instance. v2: Squash in uvd_enc fix Signed-off-by: Nirmoy Das Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f530f882463c046f851401fa4380cee3e523e0e3 Author: Andy Shevchenko Date: Mon Aug 31 12:08:13 2020 +0300 iio: accel: bma220: Remove unneeded blank lines There are few blank lines that split structure definitions with their users. Remove them to increase readability. While here, update copyright year. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200831090813.78841-8-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 2b09b41dba04092fc198a5098908345f756db160 Author: Andy Shevchenko Date: Mon Aug 31 12:08:12 2020 +0300 iio: accel: bma220: Use BIT() and GENMASK() macros Code is better to read when numbers of bit are explicitly used. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200831090813.78841-7-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit df9f7d4c330d1ca3e124d73a137a7df32ca3ac33 Author: Andy Shevchenko Date: Mon Aug 31 12:08:11 2020 +0300 iio: accel: bma220: Group IIO headers together Group IIO headers together and follow the common pattern of header inclusion, i.e. more generic first. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200831090813.78841-6-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 846afc1dbcbf878b3c8e685910ad6ce90d79de4b Author: Andy Shevchenko Date: Mon Aug 31 12:08:10 2020 +0300 iio: accel: bma220: Drop ACPI_PTR() and accompanying ifdeffery The driver is quite likely used only on ACPI based platforms and rarely build with CONFIG_ACPI=n. Even though, the few dozens of bytes is better than ugly ifdeffery and inclusion of heavy header. As a result, replace acpi.h with mod_devicetable.h. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200831090813.78841-5-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 4d9a167a3436b960b25900fb9539d953657cf501 Author: Andy Shevchenko Date: Mon Aug 31 12:08:09 2020 +0300 iio: accel: bma220: Mark PM functions as __maybe_unused Instead of using ugly ifdeffery, mark PM functions as __maybe_unused. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200831090813.78841-4-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 700e63dadacdb7eee04650b6e8c66824d585aaf3 Author: Andy Shevchenko Date: Mon Aug 31 12:08:08 2020 +0300 iio: accel: bma220: Use dev_get_drvdata() directly Instead of using to_spi_dev() + spi_get_drvdata(), use dev_get_drvdata() to make code simpler. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200831090813.78841-3-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 938d1b3873fc2ceee4569042852e54d9deeb9ec1 Author: Andy Shevchenko Date: Mon Aug 31 12:08:07 2020 +0300 iio: accel: bma220: Convert to use ->read_avail() Convert to use ->read_avail() instead of open-coded attribute handling. While here, fix the typo in array definition and append comma in case of the future extension. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200831090813.78841-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 5265b267e303ed07d922e0c353feec1fef1805cc Author: Andy Shevchenko Date: Mon Aug 31 12:08:06 2020 +0300 iio: accel: bma220: Fix returned codes from bma220_init(), bma220_deinit() Potentially bma220_init() and bma220_deinit() may return positive codes. Fix the logic to return proper error codes instead. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200831090813.78841-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 8d7eab620713013fab061925775b695a4ff3b258 Author: Jonathan Cameron Date: Sun Aug 9 12:17:41 2020 +0100 dt-bindings: iio: adc: microchip,mcp3201 yaml conversion. Drops the deprecated compatibles without the vendor name. Whilst the driver continues to support these for old dt blobs, any dt bindings that are actuallly verified against this document should be fixed to add the vendor name. Added the #io-channel-cells property to allow for consumers. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Oskar Andero Link: https://lore.kernel.org/r/20200809111753.156236-2-jic23@kernel.org commit 65e02d0b5039f393c1918e992322ebbb5f077490 Author: Alexandru Ardelean Date: Wed Aug 26 07:20:11 2020 +0200 iio: buffer-dmaengine: adjust `bytes_used` with residue info A transfer may fall shorter than the bytes in the block. This information is available in the residue from the DMA engine, so we can compute actual `bytes_used` with that by subtracting the residue. Signed-off-by: Alexandru Ardelean Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20200826052011.13348-1-lars@metafoo.de Signed-off-by: Jonathan Cameron commit e7b61fc4ca5e7c6869f224d56c5c585fea884c94 Author: Jonathan Cameron Date: Sun Aug 9 12:17:53 2020 +0100 dt-bindings: iio: adc: ti,tlc4541 binding conversion Simple binding so easy to convert. Dropped the stated value of maximum spi bus frequency as it does not seem to correspond to the datasheet. The value of 200kHz is the max sampling frequency of the ADC, not the clock frequency of the SPI bus. Added #io-channel-cells to allow use as a provider of channels to other devices via the consumer binding. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Reviewed-By: Phil Reid Cc: Phil Reid Link: https://lore.kernel.org/r/20200809111753.156236-14-jic23@kernel.org commit 9e4e28ac76733af5421ef9113da370c060ac96fa Author: Phil Reid Date: Sun Aug 9 12:17:52 2020 +0100 dt-bindings: iio: adc: tlc4541 - recover accidentally dropped binding doc JC: Seems that I messed up applying the original driver patches, and this file never actually made it into the tree. I have picked up original Ack and Sign-off so as to record the history. Signed-off-by: Phil Reid Signed-off-by: Jonathan Cameron Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200809111753.156236-13-jic23@kernel.org commit 9727ef55d898167a25816d9f75db87a3a6044bcf Author: Jonathan Cameron Date: Sun Aug 9 12:17:51 2020 +0100 dt-bindings: iio: adc: ti,ads8344 yaml conversion Simple binding so easy to convert. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200809111753.156236-12-jic23@kernel.org commit 686b2bd9f41ffbf97cb783aa5377e6bdb32b170a Author: Jonathan Cameron Date: Sun Aug 9 12:17:49 2020 +0100 dt-bindings: iio: adc: ti,adc128s052 yaml conversion. Simple binding. Only addition to txt version is as a provider of channels to other devices using the consumer binding. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Angelo Compagnucci Link: https://lore.kernel.org/r/20200809111753.156236-10-jic23@kernel.org commit e6d2aaa942adcc4be71688d9c4ac737cb6cf1327 Author: Jonathan Cameron Date: Sun Aug 9 12:17:46 2020 +0100 dt-bindings: iio: adc: ti,adc0832 yaml conversion. Simple binding conversion of this SPI ADC binding, with reference voltage. Added the optional property #io-channel-cells to allow for consumers of channels if that makes sense for a given board. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Akinobu Mita Link: https://lore.kernel.org/r/20200809111753.156236-7-jic23@kernel.org commit cee4a59395f9619acc8b944534890901de8ac4f3 Author: Jonathan Cameron Date: Sun Aug 9 12:17:45 2020 +0100 dt-bindings: iio: adc: ti,adc161s626 yaml conversion. Simple conversion for this ADC driver. Note that I haven't put limits on the spi-max-sampling-frequency because the adc161s626 doesn't state one clearly defined value. Added the #io-channel-cells property to allow for consumers. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Acked-by: Matt Ranostay Cc: Matt Ranostay Link: https://lore.kernel.org/r/20200809111753.156236-6-jic23@kernel.org commit b713259c30a3337fa3e6ac88925a1ba84fc276d1 Author: Jonathan Cameron Date: Sun Aug 9 12:17:44 2020 +0100 dt-bindings: iio: adc: lltc,ltc2497 yaml conversion. Very simple binding for this i2c device with a reference supply. Added the #io-channel-cells property to allow for consumers. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Michael Hennerich Link: https://lore.kernel.org/r/20200809111753.156236-5-jic23@kernel.org commit 35edeab4dade40340f74ee7649e9f1c45f673857 Author: Jonathan Cameron Date: Sun Aug 9 12:17:43 2020 +0100 dt-bindings: iio: adc: ti,adc108s102 yaml conversion Very simple conversion of spi device with reference supply. Added the #io-channel-cells property to allow for consumers. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Jan Kiszka Link: https://lore.kernel.org/r/20200809111753.156236-4-jic23@kernel.org commit 71ac24846b7b33906c61ac4fccd74c95c902b546 Author: Jonathan Cameron Date: Sun Aug 9 12:17:42 2020 +0100 dt-bindings: trivial-devices: Add mcp342x ADCs and drop separate binding doc. These i2c devices have simple bindings, well described by trivial-device.yaml so rather than convert the binding doc to yaml, let us just add them to trivial devices and drop the old binding document. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Cc: Angelo Compagnucci Link: https://lore.kernel.org/r/20200809111753.156236-3-jic23@kernel.org commit 02a019ff7db58541cb41f0ceca97c560ae752a5e Author: Alexandru Tachici Date: Mon Aug 10 12:32:57 2020 +0300 iio: accel: adxl372: Add additional trigger ABI docs Document use of additional trigger supplied by driver. Signed-off-by: Alexandru Tachici Link: https://lore.kernel.org/r/20200810093257.65929-3-alexandru.tachici@analog.com Signed-off-by: Jonathan Cameron commit b0fc6783d4ae58f796fb183c40dbc7fa3199d51d Author: Stefan Popa Date: Mon Aug 10 12:32:56 2020 +0300 iio: accel: adxl372: Add support for FIFO peak mode By default, if all three channels (x, y, z) are enabled, sample sets of concurrent 3-axis data is stored in the FIFO. This patch adds the option to configure the FIFO to store peak acceleration (x, y and z) of every over-threshold event. When pushing to iio buffer we push only enabled axis data. Currently the driver configures adxl372 to work in loop mode. The inactivity and activity timings decide how fast the chip will loop through the awake and waiting states and the thresholds on x,y,z axis decide when activity or inactivity will be detected. This patch adds standard events sysfs entries for the inactivity and activity timings: thresh_falling_period/thresh_rising_period and for the in_accel_x_thresh_falling/rising_value. Signed-off-by: Stefan Popa Signed-off-by: Alexandru Tachici Link: https://lore.kernel.org/r/20200810093257.65929-2-alexandru.tachici@analog.com Signed-off-by: Jonathan Cameron commit 50677d2882e1844763f455b314fa2225d9da5e56 Author: Crt Mori Date: Tue Aug 18 23:37:37 2020 +0200 iio:temperature:mlx90632: Some stylefixing leftovers There is some inconsistency and whitespace cleanup performed in this patch. It was done on top of my other patches, but I can rebase to head of the togreg branch if it would go in sooner. Signed-off-by: Crt Mori Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200818213737.140613-6-cmo@melexis.com Signed-off-by: Jonathan Cameron commit e02472f74a8120cd5a0be0e7d48c9d95d4cde6a0 Author: Crt Mori Date: Tue Aug 18 23:37:36 2020 +0200 iio:temperature:mlx90632: Adding extended calibration option For some time the market wants medical grade accuracy in medical range, while still retaining the declared accuracy outside of the medical range within the same sensor. That is why we created extended calibration which is automatically switched to when object temperature is too high. This patch also introduces the object_ambient_temperature variable which is needed for more accurate calculation of the object infra-red footprint as sensor's ambient temperature might be totally different than what the ambient temperature is at object and that is why we can have some more errors which can be eliminated. Currently this temperature is fixed at 25, but the interface to adjust it by user (with external sensor or just IR measurement of the other object which acts as ambient), will be introduced in another commit. Signed-off-by: Crt Mori Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200818213737.140613-5-cmo@melexis.com Signed-off-by: Jonathan Cameron commit 037697dd264dd35a1f0ee13a3e8e3adb23f46075 Author: Crt Mori Date: Tue Aug 18 23:37:35 2020 +0200 iio:temperature:mlx90632: Convert polling while loop to regmap Reduce number of lines and improve readability to convert polling while loops to regmap_read_poll_timeout. Signed-off-by: Crt Mori Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200818213737.140613-4-cmo@melexis.com Signed-off-by: Jonathan Cameron commit 856437dbb85b918c7ed167dea929f1a11aa20cb4 Author: Crt Mori Date: Tue Aug 18 23:37:34 2020 +0200 iio:temperature:mlx90632: Add kerneldoc to the internal struct Document internal/private struct for mlx90632 device. Signed-off-by: Crt Mori Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200818213737.140613-3-cmo@melexis.com Signed-off-by: Jonathan Cameron commit b99095e53a1c01ff8de0928058792711efc00f3c Author: Crt Mori Date: Tue Aug 18 23:37:33 2020 +0200 iio:temperature:mlx90632: Reduce number of equal calulcations TAdut4 was calculated each iteration although it did not change. In light of near future additions of the Extended range DSP calculations, this function refactoring will help reduce unrelated changes in that series as well as reduce the number of new functions needed. Signed-off-by: Crt Mori Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200818213737.140613-2-cmo@melexis.com Signed-off-by: Jonathan Cameron commit 7e604a3d212ca006802f485f7bac9712a5ddd805 Author: Nishant Malpani Date: Tue Aug 25 18:15:52 2020 +0530 iio: gyro: adxrs290: Insert missing mutex initialization call Insert a missing mutex_init() call during the probe that initializes the driver's local lock to unlocked state. Fixes: 2c8920fff145 ("iio: gyro: Add driver support for ADXRS290") Signed-off-by: Nishant Malpani Link: https://lore.kernel.org/r/20200825124552.11155-1-nish.malpani25@gmail.com Signed-off-by: Jonathan Cameron commit 3b0028bd0f03fa60c586cd8c4a6c8265a81dcf9c Author: Gwendal Grignou Date: Fri Aug 28 16:31:55 2020 -0700 docs: abi: iio: Use What: consistently Change "[w|W]hat[:| ]" to What: for consistency. Signed-off-by: Gwendal Grignou Link: https://lore.kernel.org/r/20200828233156.2264689-2-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit c10eb9b22cf2f268f1ac78bf1ded7efaf9583940 Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:26 2020 +0200 iio: multiplexer: iio-mux: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Acked-by: Peter Rosin Link: https://lore.kernel.org/r/20200829064726.26268-18-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 0d81951dad5a0807277d2751ba2b4f98818b049d Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:25 2020 +0200 iio: magnetometer: mag3110: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200829064726.26268-17-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 5d2180ce1485863ef2ace9a06fb57f857575142e Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:24 2020 +0200 iio: magnetometer: ak8974: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20200829064726.26268-16-krzk@kernel.org Signed-off-by: Jonathan Cameron commit eb17f3ed864a29d695e9c5cafd2eea9ee934cdd9 Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:23 2020 +0200 iio: light: tsl2772: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200829064726.26268-15-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 17b7d92324f93066592f52d9b39777a67fa7187b Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:22 2020 +0200 iio: light: isl29018: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200829064726.26268-14-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 75e13a76bf2af7ad890038e9de7235c42a3e5fa6 Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:21 2020 +0200 iio: imu: inv_mpu6050: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Reviewed-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20200829064726.26268-13-krzk@kernel.org Signed-off-by: Jonathan Cameron commit a567abf66ec8346ff5e7ad2ed5192136d6c838e7 Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:20 2020 +0200 iio: dac: dpot-dac: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Acked-by: Peter Rosin Link: https://lore.kernel.org/r/20200829064726.26268-12-krzk@kernel.org Signed-off-by: Jonathan Cameron commit ed1759093cacbe359597fce1ca0f2831ccb96deb Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:19 2020 +0200 iio: chemical: scd30: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Acked-by: Tomasz Duszynski Link: https://lore.kernel.org/r/20200829064726.26268-11-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 8facae29c468bd4ac1cabb440cdbac47ac9ac9e1 Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:18 2020 +0200 iio: amplifiers: hmc425a: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200829064726.26268-10-krzk@kernel.org Signed-off-by: Jonathan Cameron commit bfa96be8a49c1548b7d1311022262676d7fc6f30 Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:17 2020 +0200 iio: afe: iio-rescale: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Acked-by: Peter Rosin Link: https://lore.kernel.org/r/20200829064726.26268-9-krzk@kernel.org Signed-off-by: Jonathan Cameron commit ce30eeb613cbde817ae3c041505a3181cccb9d35 Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:16 2020 +0200 iio: adc: stm32: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200829064726.26268-8-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 6d2710ce2c45122eea4ccdb4cee1fd56e6702cea Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:15 2020 +0200 iio: adc: rcar-gyroadc: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200829064726.26268-7-krzk@kernel.org Signed-off-by: Jonathan Cameron commit a3e584fab675b833e9923a0f5e76031b027525d9 Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:14 2020 +0200 iio: adc: meson_saradc: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20200829064726.26268-6-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 291cb0b37af611503ccacff752ac0fc920b0a21b Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:13 2020 +0200 iio: adc: ltc2497: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200829064726.26268-5-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 1030b5bc68ae572467122bfe7aa48b118e942c52 Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:12 2020 +0200 iio: adc: exynos_adc: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200829064726.26268-4-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 55dc295200e60fd4a334098dd4c036eff9e9ead3 Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:11 2020 +0200 iio: adc: envelope-detector: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Acked-by: Peter Rosin Link: https://lore.kernel.org/r/20200829064726.26268-3-krzk@kernel.org Signed-off-by: Jonathan Cameron commit c8b9a02361d99364faddbf1193b85d476f35cfd3 Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:10 2020 +0200 iio: accel: mma8452: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200829064726.26268-2-krzk@kernel.org Signed-off-by: Jonathan Cameron commit 3bdb1255e6b0a49e83412ad0d15eb2b2f7f63482 Author: Krzysztof Kozlowski Date: Sat Aug 29 08:47:09 2020 +0200 iio: accel: bma180: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200829064726.26268-1-krzk@kernel.org Signed-off-by: Jonathan Cameron commit dc3ebfcaa51ff9ffa417f23e47c4e1aa01bc501d Author: Matt Ranostay Date: Mon Aug 17 03:50:52 2020 +0300 iio: chemical: atlas-ezo-sensor: add humidity sensor support Add support for atlas,hum-ezo / humidity sensor which with scaling provides respective data in millipercent Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron commit d947996687344e19da09ec74c618536e99a0e214 Author: Matt Ranostay Date: Mon Aug 17 03:50:51 2020 +0300 dt-bindings: iio: chemical: add Atlas EZO Humidity module documentation Cc: devicetree@vger.kernel.org Signed-off-by: Matt Ranostay Acked-by: Rob Herring Signed-off-by: Jonathan Cameron commit f6712ed711236159e99ed48221ba41c931721503 Author: Tian Tao Date: Thu Aug 20 11:01:26 2020 +0800 iio: adc: adi-axi-adc: Use kobj_to_dev() instead of container_of() Use kobj_to_dev() instead of container_of() Signed-off-by: Tian Tao Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 59713492b7866e031e0c66e25f4f034c96f1be5a Author: Rikard Falkeborn Date: Tue May 26 23:02:21 2020 +0200 iio: dac: ad5686: Constify static struct iio_chan_spec These are never modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 6642 12608 64 19314 4b72 drivers/iio/dac/ad5686.o After: text data bss dec hex filename 16946 2304 64 19314 4b72 drivers/iio/dac/ad5686.o Signed-off-by: Rikard Falkeborn Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 8dd746d1e3cbac2986757e733baa38f6896dd7e0 Author: Chris Ruehl Date: Mon Aug 10 11:37:52 2020 +0800 iio/dac: convert ltc2632.txt to lltc,ltc2632.yaml Conversion of the ltc2632 to yaml format and name the file to 'lltc,ltc2632.yaml'. Signed-off-by: Chris Ruehl Signed-off-by: Jonathan Cameron commit 3c3006f5fceca0019e7e34f504f9317e2a9eefd0 Author: Christian Eggers Date: Mon Aug 10 07:24:47 2020 +0200 iio: documentation: light: Add as73211 sysfs documentation The driver for the as73211 light sensor provides the following not yet documented sysfs entries: - in_intensity_(x|y|z)_raw - in_intensity_(x|y|z)_scale - in_intensity_sampling_frequency(_available) - in_intensity_hardwaregain(_available) - in_intensity_integration_time Signed-off-by: Christian Eggers Signed-off-by: Jonathan Cameron commit 81f434f01722c8f95c59fc24c5e09f508a07a0ca Author: Jonathan Cameron Date: Sun Aug 9 15:13:05 2020 +0100 iio:adc:axp20x: Convert from OF to generic fw / device properties Whilst fairly unlikely anyone will ever use this driver with anything other than DT, we are trying to move IIO over to the generic interfaces where easy to do so. In this case this involved moving to generic check on presence of fwnode, generic device_get_match_data() and dropping the of_match_ptr protection. Also relevant header changes to have property.h and mod_devicetable.h only. Also drop the casting away of a const in favour of retaining the const throughout. Signed-off-by: Jonathan Cameron Cc: Quentin Schulz Reviewed-by: Andy Shevchenko commit 75caa303d79dd598a300a07f9e5ff7fa23c5cf9b Author: Ahmad Fatoum Date: Thu Aug 13 08:52:20 2020 +0200 Documentation: ABI: iio: fix some spelling mistakes This fixes some typos found while browsing the documentation. Cc: trivial@kernel.org Signed-off-by: Ahmad Fatoum Signed-off-by: Jonathan Cameron commit ea3e611b29b201612a0e9fcb32727f80d66bc053 Author: Matt Ranostay Date: Fri Aug 14 06:49:41 2020 -0700 iio: health: max30102: update author's email Update email to author's current employer Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron commit c458b7ca3fd0c9671caf38630e6f6a006d90e113 Author: Jonathan Cameron Date: Tue Jul 21 18:14:41 2020 +0100 iio:adc:ti-adc081c: Drop ACPI ids that seem very unlikely to be official. We have no known users of these in the wild. it seems very unlikely these are real IDs having the form ADCXXXX as that ID is owned by Achnor Datacomm not TI. Suggested-by: Andy Shevchenko Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko commit 0a4596f5bd5ae3d234803353b14deef26663722e Author: Jonathan Cameron Date: Tue Jul 21 18:14:42 2020 +0100 iio:adc:ti-adc108s102: Drop CONFIG_OF and of_match_ptr protections I'm trying to clean this (now) anti-pattern out of IIO to avoid cut and paste into new drivers. Also add an include of mod_devicetable.h as the driver directly uses struct of_device_id which is defined in there. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Jan Kiszka commit ad5bd081c62be386e8f0fc360e452c6e9e3005a1 Author: Jonathan Cameron Date: Tue Jul 21 18:14:43 2020 +0100 iio:adc:ti-adc128s052: drop of_match_ptr protection There is no real advantage in having these protections and for parts that do not have an explicit ACPI ID, it prevents the use of PRP0001. I'm trying to clear this out of IIO in general to avoid copying in new drivers. Include mod_devicetable.h as we are using of_device_id in here so including that header is best practice. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Angelo Compagnucci commit 245d56d75ea6860c583fbd54382ad82bbd405910 Author: Jonathan Cameron Date: Tue Jul 21 18:14:44 2020 +0100 iio:adc:bcm_iproc: Drop of_match_ptr protection and switch to mod_devicetable.h This driver cannot be instantiated from ACPI due to it's use of syscon_regmap_lookup_by_phandle() but in the interests of clearing this anti pattern out of IIO, let us switch to an explicit check in Kconfig and remove the protections on the of_match_table The switch of header is because we only use of_device_id in here and that is defined in mod_devicetable.h not of.h. Signed-off-by: Jonathan Cameron Cc: Raveendra Padasalagi Reviewed-by: Andy Shevchenko commit 5dfb88af3d5204e581985056ccfb601d47252996 Author: Vincent Whitchurch Date: Tue Aug 4 11:31:38 2020 +0200 iio: dac: dac5571: Support powerdown for multi-channel The driver currently only allows channel 0 to be powered down but the multi-channel variants of the hardware allow each channel to be powered down separately and with separate power down modes. Add support for this. Signed-off-by: Vincent Whitchurch Acked-by: Sean Nyekjaer Signed-off-by: Jonathan Cameron commit abfa391721ce8a4ea59c1bc15968a8b2a9f891cb Author: Eugene Zaikonnikov Date: Fri Aug 7 16:38:53 2020 +0200 dt-bindings: iio: humidity: Add TI HDC20x0 support Add device tree bindings for HDC2010/HDC2080 family of humidity and temperature sensors. Signed-off-by: Eugene Zaikonnikov Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 0115a63c999363b9558376b61c4037813d9063db Author: Eugene Zaikonnikov Date: Fri Aug 7 16:17:55 2020 +0200 iio: humidity: Add TI HDC20x0 support Add driver support for HDC2010/2080 series devices and sysfs documentation for their heater element. HDC2010 is an integrated high-accuracy humidity and temperature sensor with very low power consumption. The device includes a resistive heating element. The temperature range is -40C to 125C with 0.2C accuracy. Humidity measurement is 0 to 100% with 2% RH accuracy. Signed-off-by: Eugene Zaikonnikov Signed-off-by: Jonathan Cameron commit fe184be8c3528f848f66d51340d42afc92209f0a Author: Stephen Boyd Date: Mon Aug 3 17:58:15 2020 -0600 iio: sx9310: Use irq trigger flags from firmware We shouldn't need to set default irq trigger flags here as the firmware should have properly indicated the trigger type, i.e. level low, in the DT or ACPI tables. Signed-off-by: Stephen Boyd Signed-off-by: Daniel Campello Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit f86ff7480c3efc7398b366b6d16158768c878d36 Author: Stephen Boyd Date: Mon Aug 3 17:58:14 2020 -0600 iio: sx9310: Enable vdd and svdd regulators at probe Enable the main power supply (vdd) and digital IO power supply (svdd) during probe so that the i2c communication and device works properly on boards that aggressively power gate these supplies. Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Daniel Campello Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 2756db5e90ac4b881d5926bdeef75e84a128aa8d Author: Stephen Boyd Date: Mon Aug 3 17:58:13 2020 -0600 iio: sx9310: Drop channel_users[] This struct member isn't used. Drop it. Fixes: 72ad02b15d63 ("iio: Add SEMTECH SX9310/9311 sensor driver") Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Daniel Campello Signed-off-by: Daniel Campello Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit de479073fa1eb7031b4f85429102e002521a0a95 Author: Daniel Campello Date: Mon Aug 3 17:58:12 2020 -0600 iio: sx9310: Miscellaneous format fixes Miscellaneous format fixes throughout the whole file. Signed-off-by: Daniel Campello Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Boyd Signed-off-by: Jonathan Cameron commit e943bba88ed58080fe23eecbfc0da3fa2839a390 Author: Daniel Campello Date: Mon Aug 3 17:58:11 2020 -0600 iio: sx9310: Use variable to hold &client->dev Improves readability by storing &client->dev in a local variable. Signed-off-by: Daniel Campello Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Boyd Signed-off-by: Jonathan Cameron commit a917af2ab8573a92b1434f9b45add3438edcbcb2 Author: Daniel Campello Date: Mon Aug 3 17:58:10 2020 -0600 iio: sx9310: Simplify error return handling Checks for non-zero return values to signal error conditions. Signed-off-by: Daniel Campello Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Boyd Signed-off-by: Jonathan Cameron commit 124cbc339cabde29a0a4d2b9c51c5068884145b0 Author: Daniel Campello Date: Mon Aug 3 17:58:09 2020 -0600 iio: sx9310: Update copyright Fixes wrong copyright year. Signed-off-by: Daniel Campello Signed-off-by: Jonathan Cameron commit dc46198f27ff72efce2c2fa8ef4ee52fa80c06ec Author: Daniel Campello Date: Mon Aug 3 17:58:08 2020 -0600 iio: sx9310: Use regmap_read_poll_timeout() for compensation Simplify compensation stage by using regmap_read_poll_timeout(). Signed-off-by: Daniel Campello Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Boyd Signed-off-by: Jonathan Cameron commit 68aa360a77c6d6695cb68ed34a5413e2b2b80fa6 Author: Daniel Campello Date: Mon Aug 3 17:58:07 2020 -0600 iio: sx9310: Use long instead of int for channel bitmaps Uses for_each_set_bit() macro to loop over channel bitmaps. Signed-off-by: Daniel Campello Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Boyd Signed-off-by: Jonathan Cameron commit 01b9cb0dea76c70b3696cdff79c2e8f5772a6356 Author: Daniel Campello Date: Mon Aug 3 17:58:06 2020 -0600 iio: sx9310: Fixes various memory handling Makes use __aligned(8) to ensure that the timestamp is correctly aligned when we call io_push_to_buffers_with_timestamp(). Also makes use of sizeof() for regmap_bulk_read instead of static value. Signed-off-by: Daniel Campello Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 9b2cac94698794c49b993db0646c37c2188dcfae Author: Daniel Campello Date: Mon Aug 3 17:58:05 2020 -0600 iio: sx9310: Change from .probe to .probe_new Uses .probe_new in place of .probe. Also uses device_get_match_data() for whoami matching. Signed-off-by: Daniel Campello Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Boyd Signed-off-by: Jonathan Cameron commit ef5bdbab3511a6df31a0f660a7bc1e2494d72f61 Author: Daniel Campello Date: Mon Aug 3 17:58:04 2020 -0600 iio: sx9310: Remove acpi and of table macros Avoids unused warnings due to acpi/of table macros. Reported-by: kbuild test robot Signed-off-by: Daniel Campello Reviewed-by: Andy Shevchenko Reviewed-by: Stephen Boyd Signed-off-by: Jonathan Cameron commit 364e853ceec92cafe2c0d7fe7cc1d89891903234 Author: Daniel Campello Date: Mon Aug 3 17:58:03 2020 -0600 iio: sx9310: Fix irq handling Fixes enable/disable irq handling at various points. The driver needs to only enable/disable irqs if there is an actual irq handler installed. Signed-off-by: Daniel Campello Reviewed-by: Stephen Boyd Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit d9f753f3e9edc0b4c0acdbe2708746242f7c7a79 Author: Daniel Campello Date: Mon Aug 3 17:58:02 2020 -0600 iio: sx9310: Update macros declarations Follows spec sheet for macro declarations. Signed-off-by: Daniel Campello Reviewed-by: Stephen Boyd Signed-off-by: Jonathan Cameron commit 1d863d13412a505ce23c15f25304a40e4a2fff2b Author: Daniel Campello Date: Mon Aug 3 17:58:01 2020 -0600 dt-bindings: iio: Add bindings for sx9310 sensor Adds device tree bindings for sx9310 sensor. Signed-off-by: Daniel Campello Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Rob Herring Reviewed-by: Douglas Anderson [swboyd@chromium.org: Add both regulators and make them optional] Signed-off-by: Stephen Boyd Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 38a1efc9e7a459d9d5f81dc1dd6f2b10d95a47c6 Author: Jonathan Cameron Date: Sat Aug 1 18:58:50 2020 +0100 dt-bindings: iio: adc: maxim,max1118 yaml conversion Simple device with a simple conversion. Special handling needed for the max1118 which is the only supported part that has an external reference voltage. Cc: Akinobu Mita Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring commit 403e5586b52e466893ce3a7b7f3a3ecdc4c82d3e Author: Christian Eggers Date: Wed Aug 5 07:57:44 2020 +0200 iio: light: as73211: New driver Support for AMS AS73211 JENCOLOR(R) Digital XYZ Sensor. This driver has no built-in trigger. In order for making triggered measurements, an external (software) trigger driver like iio-trig-hrtimer or iio-trig-sysfs is required. The sensor supports single and continuous measurement modes. The latter is not used by design as this would require tight timing synchronization between hardware and driver without much benefit. Datasheet: https://ams.com/documents/20143/36005/AS73211_DS000556_3-01.pdf Signed-off-by: Christian Eggers Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 8a00e56a14a706cdca9b2a575e7a709b641f3ce0 Author: Xiongfeng Wang Date: Thu Sep 3 19:01:13 2020 +0800 ipmi: add a newline when printing parameter 'panic_op' by sysfs When I cat ipmi_msghandler parameter 'panic_op' by sysfs, it displays as follows. It's better to add a newline for easy reading. root@(none):/# cat /sys/module/ipmi_msghandler/parameters/panic_op noneroot@(none):/# Signed-off-by: Xiongfeng Wang Message-Id: <1599130873-2402-1-git-send-email-wangxiongfeng2@huawei.com> Signed-off-by: Corey Minyard commit 282d66289d583dbe53802c1329bb47c767ded7bb Author: Rob Herring Date: Wed Aug 26 12:48:51 2020 -0600 dt-bindings: interrupt-controller: Remove obsolete 'img,meta-intc' The driver and metag arch were removed in 2018. Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Link: https://lore.kernel.org/r/20200826184851.3431531-3-robh@kernel.org Signed-off-by: Rob Herring commit 06f7f8e6f958c0fcbbfdabc6c95bfd19a2aeef55 Author: Rob Herring Date: Wed Aug 26 12:48:50 2020 -0600 dt-bindings: phy: Remove phy-stih41x-usb binding The driver was removed in 2016 in commit fb954c48aea6 ("phy: stih41x-usb: Remove usb phy driver and dt binding documentation.") and somehow the DT binding got dropped despite the subject. Cc: Peter Griffin Cc: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20200826184851.3431531-2-robh@kernel.org Signed-off-by: Rob Herring commit 2dab430a8e712d64124bbe1f45dce8794b3d1003 Author: Rob Herring Date: Wed Aug 26 12:48:49 2020 -0600 dt-bindings: sound: Remove unused 'linux,hdmi-audio' The binding was added in 2013 and has had no driver since 2015. Cc: Liam Girdwood Cc: Mark Brown Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/20200826184851.3431531-1-robh@kernel.org Signed-off-by: Rob Herring commit 4be61e6b769fc3f97b58870aa4258e27968f07e1 Author: Alexander Monakov Date: Sun Aug 23 23:27:02 2020 +0300 tools/power turbostat: Build with _FILE_OFFSET_BITS=64 For compatibility reasons, Glibc off_t is a 32-bit type on 32-bit x86 unless _FILE_OFFSET_BITS=64 is defined. Add this define, as otherwise reading MSRs with index 0x80000000 and above attempts a pread with a negative offset, which fails. Signed-off-by: Alexander Monakov Tested-by: Liwei Song Signed-off-by: Len Brown commit 33eb82251af9be47a625ca1578f44e596a3a0ca9 Author: Kim Phillips Date: Mon Aug 17 17:42:15 2020 -0500 tools/power turbostat: Support AMD Family 19h Family 19h processors have the same RAPL (Running average power limit) hardware register interface as Family 17h processors. Change the family checks to succeed for Family 17h and above to enable core and package energy measurement on Family 19h machines. Also update the TDP to the largest found at the bottom of the page at amd.com->processors->servers->epyc->2nd-gen-epyc, i.e., the EPYC 7H12. Signed-off-by: Kim Phillips Cc: Len Brown Cc: Len Brown Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Len Brown commit 20de0dab238849414d33c81bc96e2db68cc61467 Author: Antti Laakso Date: Mon Aug 17 18:03:48 2020 +0300 tools/power turbostat: Remove empty columns for Jacobsville Jacobsville doesn't have Package C2 and C6. Also Core and DRAM RAPL are not available. Adjust output accordingly. Signed-off-by: Antti Laakso Signed-off-by: Len Brown commit b4b9156953fea108a9540c262e48eafeeff99ab0 Author: Rafael Antognolli Date: Wed Apr 22 15:02:07 2020 -0700 tools/power turbostat: Add a new GFXAMHz column that exposes gt_act_freq_mhz. The column already present called GFXMHz reads from gt_cur_freq_mhz, which represents the GT frequency that was requested, but power management might not be able to do that. So the new column will display what the actual frequency GT is running at. Signed-off-by: Rafael Antognolli Signed-off-by: Len Brown commit 0936cdfbb527a4fa2559292069ebff2e8cf2c843 Author: Ondřej Lysoněk Date: Fri Mar 27 08:27:12 2020 +0100 tools/power x86_energy_perf_policy: Input/output error in a VM I've encountered an issue with x86_energy_perf_policy. If I run it on a machine that I'm told is a qemu-kvm virtual machine running inside a privileged container, I get the following error: x86_energy_perf_policy: /dev/cpu/0/msr offset 0x1ad read failed: Input/output error I get the same error in a Digital Ocean droplet, so that might be a similar environment. I created the following patch which is intended to give a more user-friendly message. It's based on a patch for turbostat from Prarit Bhargava that was posted some time ago. The patch is "[v2] turbostat: Running on virtual machine is not supported" [1]. Given my limited knowledge of the topic, I can't say with confidence that this is the right solution, though (that's why this is not an official patch submission). Also, I'm not sure what the convention with exit codes is in this tool. Also, instead of the error message, perhaps the tool should just not print anything in this case, which is how it behaves in a "regular" VM? [1] https://patchwork.kernel.org/patch/9868587/ Signed-off-by: Ondřej Lysoněk Signed-off-by: Len Brown commit c315a09b1b0f491c27d46e9d05f397023a44fb81 Author: Len Brown Date: Thu Aug 13 19:18:22 2020 -0400 tools/power turbostat: Skip pc8, pc9, pc10 columns, if they are disabled Like we skip PC3 and PC6 columns when the package C-state limit disables them, skip PC8/PC9/CP10 under analogous conditions. Reported-by: Zhang Rui Signed-off-by: Len Brown commit e7af1ed3fa4756e8df8270a8635d852a94266061 Author: Len Brown Date: Thu Aug 13 19:06:03 2020 -0400 tools/power turbostat: Support additional CPU model numbers Initial support for models recently added to intel-family.h. Signed-off-by: Len Brown commit fecb3bc839df64761cc63c9ee9b45c1cad36aee8 Author: David Arcari Date: Mon Aug 10 10:43:30 2020 -0400 tools/power turbostat: Fix output formatting for ACPI CST enumeration turbostat formatting is broken with ACPI CST for enumeration. The problem is that the CX_ACPI% is eight characters long which does not work with tab formatting. One simple solution is to remove the underbar from the state name such that C1_ACPI will be displayed as C1ACPI. Signed-off-by: David Arcari Cc: Len Brown Cc: linux-kernel@vger.kernel.org Signed-off-by: Len Brown commit b88cad57d4d32bb5c53cd8e0ce3a1971062142af Author: Alexander A. Klimov Date: Wed Jul 8 12:55:30 2020 +0200 tools/power turbostat: Replace HTTP links with HTTPS ones: TURBOSTAT UTILITY Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Len Brown commit 8201a0285789fade1c5b031914577e2b27a64f05 Author: Prarit Bhargava Date: Mon Jun 29 15:26:57 2020 -0400 tools/power turbostat: Use sched_getcpu() instead of hardcoded cpu 0 Disabling cpu 0 results in an error turbostat: /sys/devices/system/cpu/cpu0/topology/thread_siblings: open failed: No such file or directory Use sched_getcpu() instead of a hardcoded cpu 0 to get the max cpu number. Signed-off-by: Prarit Bhargava Signed-off-by: Len Brown commit 9972d5d84d76982606806b2ce887f70c2f8ba60a Author: Chen Yu Date: Sat Apr 18 16:32:05 2020 +0800 tools/power turbostat: Enable accumulate RAPL display Enable the accumulated RAPL display by default. Signed-off-by: Chen Yu Signed-off-by: Len Brown commit 87e15da95775a2ffb8c444e84f08ca982b758364 Author: Chen Yu Date: Sat Apr 18 16:31:57 2020 +0800 tools/power turbostat: Introduce functions to accumulate RAPL consumption Since the RAPL Joule Counter is 32 bit, turbostat would only print a *star* instead of printing the actual energy consumed to indicate the overflow due to long duration. This does not meet the requirement from servers as the sampling time of turbostat is usually very long on servers. So maintain a set of MSR buffer, and update them periodically before the 32bit MSR register is wrapped round, so as to avoid the overflow. The idea is similar to the implementation of ktime_get(): Periodical MSR timer: total_rapl_sum += (current_rapl_msr - last_rapl_msr); Using get_msr_sum() to get the accumulated RAPL: return (current_rapl_msr - last_rapl_msr) + total_rapl_sum; The accumulated RAPL mechanism will be turned on in next patch. Originally-by: Aaron Lu Reviewed-by: Doug Smythies Tested-by: Doug Smythies Signed-off-by: Chen Yu Signed-off-by: Len Brown commit 7c2ccc507bd44d17227930181f937b2066565349 Author: Chen Yu Date: Sat Apr 18 16:31:47 2020 +0800 tools/power turbostat: Make the energy variable to be 64 bit Change the energy variable from 32bit to 64bit, so that it can record long time duration. After this conversion, adjust the DELTA_WRAP32() accordingly. Signed-off-by: Chen Yu Signed-off-by: Len Brown commit 9aefc2cda6353f48708415d9adc5dff4deb73412 Author: Doug Smythies Date: Thu Mar 26 13:36:37 2020 -0700 tools/power turbostat: Always print idle in the system configuration header If the --quiet option is not used, turbostat prints a useful system configuration header during startup. But inclusion of idle system configuration information in this header is currently a function of inclusion in the columns chosen to be displayed. Always list this idle system configuration. Signed-off-by: Doug Smythies Signed-off-by: Len Brown commit 99f667352f6c938440d9043d0f66f859d6f3d50d Author: Christoph Hellwig Date: Thu Sep 3 17:59:22 2020 +0200 /dev/zero: also implement ->read Christophe reported a major speedup due to avoiding the iov_iter overhead, so just add this trivial function. Note that /dev/zero already implements both an iter and non-iter writes so this just makes it more symmetric. Tested-by: Christophe Leroy Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20200903155922.1111551-1-hch@lst.de Signed-off-by: Greg Kroah-Hartman commit d76bb7a09bb3b8711077912f3e80cfcf39cd9d0b Author: Len Brown Date: Wed May 27 00:38:38 2020 -0400 tools/power turbostat: Print /dev/cpu_dma_latency Users are puzzled when they use tuned performance and all their C-states vanish. Dump /dev/cpu_dma_latency and state whether the value is default, or constraining, to explain this situation. Signed-off-by: Len Brown commit 0b8c06b75ea143f3c68aa419c36e82d9ab7454f8 Author: Paul E. McKenney Date: Tue Aug 4 10:58:55 2020 -0700 tools/memory-model: Add a simple entry point document Current LKMM documentation assumes that the reader already understands concurrency in the Linux kernel, which won't necessarily always be the case. This commit supplies a simple.txt file that provides a starting point for someone who is new to concurrency in the Linux kernel. That said, this file might also useful as a reminder to experienced developers of simpler approaches to dealing with concurrency. Link: Link: https://lwn.net/Articles/827180/ [ paulmck: Apply feedback from Joel Fernandes. ] Co-developed-by: Dave Chinner Signed-off-by: Dave Chinner Co-developed-by: Paul E. McKenney Signed-off-by: Paul E. McKenney commit 984f272be9d7b2dd8b17e35d437e5da500b502ae Author: Paul E. McKenney Date: Mon Aug 3 17:19:54 2020 -0700 tools/memory-model: Improve litmus-test documentation The current LKMM documentation says very little about litmus tests, and worse yet directs people to the herd7 documentation for more information. Now, the herd7 documentation is quite voluminous and educational, but it is intended for people creating and modifying memory models, not those attempting to use them. This commit therefore updates README and creates a litmus-tests.txt file that gives an overview of litmus-test format and describes ways of modeling various special cases, illustrated with numerous examples. [ paulmck: Add Alan Stern feedback. ] [ paulmck: Apply Dave Chinner feedback. ] [ paulmck: Apply Andrii Nakryiko feedback. ] [ paulmck: Apply Johannes Weiner feedback. ] Link: https://lwn.net/Articles/827180/ Reported-by: Dave Chinner Acked-by: Peter Zijlstra (Intel) Signed-off-by: Paul E. McKenney commit cc9628b45c9fa9b165a50dbb262928bc529bf35d Author: Paul E. McKenney Date: Wed Jul 22 16:08:23 2020 -0700 tools/memory-model: Update recipes.txt prime_numbers.c path The expand_to_next_prime() and next_prime_number() functions have moved from lib/prime_numbers.c to lib/math/prime_numbers.c, so this commit updates recipes.txt to reflect this change. Signed-off-by: Paul E. McKenney commit 1e44e6e82e7b4d2bae70a8a0b68f7d4f213b0e5f Author: Alexander A. Klimov Date: Mon Jul 6 21:03:24 2020 +0200 Replace HTTP links with HTTPS ones: LKMM Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Paul E. McKenney commit 7fbe67e46aab13f99d551ab04a1168a7d58cdae9 Merge: f511ce1424e5f cfeac3977ab4b Author: Paul E. McKenney Date: Thu Sep 3 09:47:42 2020 -0700 Merge branch 'strictgp.2020.08.24a' into HEAD strictgp.2020.08.24a: Strict grace periods for KASAN testing. commit f511ce1424e5f3c32619eb0258afa8abd38fe3cc Merge: cfb2c1070a495 4e88ec4a9eb17 Author: Paul E. McKenney Date: Thu Sep 3 09:47:01 2020 -0700 Merge branch 'scftorture.2020.08.24a' into HEAD scftorture.2020.08.24a: Torture tests for smp_call_function() and friends. commit cfb2c1070a495f4f2a0f842ef8b6ef017b200e6a Merge: 7f45d6f8ae383 70060b8770d34 b67a91703a29b Author: Paul E. McKenney Date: Thu Sep 3 09:42:02 2020 -0700 Merge branches 'doc.2020.08.24a', 'fixes.2020.09.03b' and 'torture.2020.08.24a' into HEAD doc.2020.08.24a: Documentation updates. fixes.2020.09.03b: Miscellaneous fixes. torture.2020.08.24a: Torture-test updates. commit 70060b8770d34f83e9fa4c3526db013dd2773611 Author: Zqiang Date: Fri Aug 14 14:45:57 2020 +0800 rcu: Shrink each possible cpu krcp CPUs can go offline shortly after kfree_call_rcu() has been invoked, which can leave memory stranded until those CPUs come back online. This commit therefore drains the kcrp of each CPU, not just the ones that happen to be online. Acked-by: Joel Fernandes Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney commit 53922270d21de707a1a0ffaf1e07644e77fcb8db Author: Joel Fernandes (Google) Date: Thu Jun 18 16:29:49 2020 -0400 rcu/segcblist: Prevent useless GP start if no CBs to accelerate The rcu_segcblist_accelerate() function returns true iff it is necessary to request another grace period. A tracing session showed that this function unnecessarily requests grace periods. For example, consider the following sequence of events: 1. Callbacks are queued only on the NEXT segment of CPU A's callback list. 2. CPU A runs RCU_SOFTIRQ, accelerating these callbacks from NEXT to WAIT. 3. Thus rcu_segcblist_accelerate() returns true, requesting grace period N. 4. RCU's grace-period kthread wakes up on CPU B and starts grace period N. 4. CPU A notices the new grace period and invokes RCU_SOFTIRQ. 5. CPU A's RCU_SOFTIRQ again invokes rcu_segcblist_accelerate(), but there are no new callbacks. However, rcu_segcblist_accelerate() nevertheless (uselessly) requests a new grace period N+1. This extra grace period results in additional lock contention and also additional wakeups, all for no good reason. This commit therefore adds a check to rcu_segcblist_accelerate() that prevents the return of true when there are no new callbacks. This change reduces the number of grace periods (GPs) and wakeups in each of eleven five-second rcutorture runs as follows: +----+-------------------+-------------------+ | # | Number of GPs | Number of Wakeups | +====+=========+=========+=========+=========+ | 1 | With | Without | With | Without | +----+---------+---------+---------+---------+ | 2 | 75 | 89 | 113 | 119 | +----+---------+---------+---------+---------+ | 3 | 62 | 91 | 105 | 123 | +----+---------+---------+---------+---------+ | 4 | 60 | 79 | 98 | 110 | +----+---------+---------+---------+---------+ | 5 | 63 | 79 | 99 | 112 | +----+---------+---------+---------+---------+ | 6 | 57 | 89 | 96 | 123 | +----+---------+---------+---------+---------+ | 7 | 64 | 85 | 97 | 118 | +----+---------+---------+---------+---------+ | 8 | 58 | 83 | 98 | 113 | +----+---------+---------+---------+---------+ | 9 | 57 | 77 | 89 | 104 | +----+---------+---------+---------+---------+ | 10 | 66 | 82 | 98 | 119 | +----+---------+---------+---------+---------+ | 11 | 52 | 82 | 83 | 117 | +----+---------+---------+---------+---------+ The reduction in the number of wakeups ranges from 5% to 40%. Cc: urezki@gmail.com [ paulmck: Rework commit log and comment. ] Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit f67281a72b30024b376ec3c2780bdfb777395c09 Author: Javier Garcia Date: Tue Sep 1 11:09:49 2020 +0200 Documentation: process: step 2: Link to email list fixed. In the past, these email lists where located at lists.redhat.com. This is not longer the case and they are now at redhat.com/mailman/listinfo Signed-off-by: Javier Garcia Link: https://lore.kernel.org/r/20200901090949.14514-1-javier@beren.dev Signed-off-by: Jonathan Corbet commit 3b714d24ef173f81c78af16f73dcc9b40428c803 Author: Vincenzo Frascino Date: Fri Sep 6 10:58:01 2019 +0100 arm64: mte: CPU feature detection and initial sysreg configuration Add the cpufeature and hwcap entries to detect the presence of MTE. Any secondary CPU not supporting the feature, if detected on the boot CPU, will be parked. Add the minimum SCTLR_EL1 and HCR_EL2 bits for enabling MTE. The Normal Tagged memory type is configured in MAIR_EL1 before the MMU is enabled in order to avoid disrupting other CPUs in the CnP domain. Signed-off-by: Vincenzo Frascino Co-developed-by: Catalin Marinas Signed-off-by: Catalin Marinas Cc: Will Deacon Cc: Suzuki K Poulose commit 0178dc7613684561ff3bb1625cd5504f1e7fbe3d Author: Catalin Marinas Date: Wed Nov 27 09:51:13 2019 +0000 arm64: mte: Use Normal Tagged attributes for the linear map Once user space is given access to tagged memory, the kernel must be able to clear/save/restore tags visible to the user. This is done via the linear mapping, therefore map it as such. The new MT_NORMAL_TAGGED index for MAIR_EL1 is initially mapped as Normal memory and later changed to Normal Tagged via the cpufeature infrastructure. From a mismatched attribute aliases perspective, the Tagged memory is considered a permission and it won't lead to undefined behaviour. Signed-off-by: Catalin Marinas Cc: Will Deacon Cc: Suzuki K Poulose commit c058b1c4a5ea7b88cce4c961c1000acf482ea64b Author: Vincenzo Frascino Date: Fri Sep 6 10:55:29 2019 +0100 arm64: mte: system register definitions Add Memory Tagging Extension system register definitions together with the relevant bitfields. Signed-off-by: Vincenzo Frascino Co-developed-by: Catalin Marinas Signed-off-by: Catalin Marinas Cc: Will Deacon commit 261e7818f06ec51e488e007f787ccd7e77272918 Author: Martijn Coenen Date: Fri Aug 21 14:25:44 2020 +0200 binder: print warnings when detecting oneway spamming. The most common cause of the binder transaction buffer filling up is a client rapidly firing oneway transactions into a process, before it has a chance to handle them. Yet the root cause of this is often hard to debug, because either the system or the app will stop, and by that time binder debug information we dump in bugreports is no longer relevant. This change warns as soon as a process dips below 80% of its oneway space (less than 100kB available in the configuration), when any one process is responsible for either more than 50 transactions, or more than 50% of the oneway space. Signed-off-by: Martijn Coenen Acked-by: Todd Kjos Link: https://lore.kernel.org/r/20200821122544.1277051-1-maco@android.com Signed-off-by: Greg Kroah-Hartman commit 89320020d967e8f7affbc4488b85860b3a64c4c4 Author: Wei Yongjun Date: Tue Aug 18 19:22:45 2020 +0800 binderfs: make symbol 'binderfs_fs_parameters' static The sparse tool complains as follows: drivers/android/binderfs.c:66:32: warning: symbol 'binderfs_fs_parameters' was not declared. Should it be static? This variable is not used outside of binderfs.c, so this commit marks it static. Fixes: 095cf502b31e ("binderfs: port to new mount api") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20200818112245.43891-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 4b463822316e2d765191c99dd591a0018ac473e0 Author: YangHui Date: Tue Aug 18 09:34:04 2020 +0800 binder: Modify comments The function name should is binder_alloc_new_buf() Signed-off-by: YangHui Reviewed-by: Martijn Coenen Link: https://lore.kernel.org/r/1597714444-3614-1-git-send-email-yanghui.def@gmail.com Signed-off-by: Greg Kroah-Hartman commit e8b8ae7ce32e17a5c29f0289e9e2a39c7dcaa1b8 Author: Jann Horn Date: Thu Aug 6 18:53:59 2020 +0200 binder: Remove bogus warning on failed same-process transaction While binder transactions with the same binder_proc as sender and recipient are forbidden, transactions with the same task_struct as sender and recipient are possible (even though currently there is a weird check in binder_transaction() that rejects them in the target==0 case). Therefore, task_struct identities can't be used to distinguish whether the caller is running in the context of the sender or the recipient. Since I see no easy way to make this WARN_ON() useful and correct, let's just remove it. Fixes: 44d8047f1d87 ("binder: use standard functions to allocate fds") Reported-by: syzbot+e113a0b970b7b3f394ba@syzkaller.appspotmail.com Acked-by: Christian Brauner Acked-by: Todd Kjos Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20200806165359.2381483-1-jannh@google.com Signed-off-by: Greg Kroah-Hartman commit 135ba11a7a07b4ce9197d9fa4b196329a57f1e06 Author: Nicolin Chen Date: Tue Sep 1 15:16:46 2020 -0700 dma-mapping: set default segment_boundary_mask to ULONG_MAX The default segment_boundary_mask was set to DMA_BIT_MAKS(32) a decade ago by referencing SCSI/block subsystem, as a 32-bit mask was good enough for most of the devices. Now more and more drivers set dma_masks above DMA_BIT_MAKS(32) while only a handful of them call dma_set_seg_boundary(). This means that most drivers have a 4GB segmention boundary because DMA API returns a 32-bit default value, though they might not really have such a limit. The default segment_boundary_mask should mean "no limit" since the device doesn't explicitly set the mask. But a 32-bit mask certainly limits those devices capable of 32+ bits addressing. So this patch sets default segment_boundary_mask to ULONG_MAX. Signed-off-by: Nicolin Chen Acked-by: Niklas Schnelle Signed-off-by: Christoph Hellwig commit 1e9d90dbed120ec98517428ffff4dacd9797e39d Author: Nicolin Chen Date: Tue Sep 1 15:16:45 2020 -0700 dma-mapping: introduce dma_get_seg_boundary_nr_pages() We found that callers of dma_get_seg_boundary mostly do an ALIGN with page mask and then do a page shift to get number of pages: ALIGN(boundary + 1, 1 << shift) >> shift However, the boundary might be as large as ULONG_MAX, which means that a device has no specific boundary limit. So either "+ 1" or passing it to ALIGN() would potentially overflow. According to kernel defines: #define ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) #define ALIGN(x, a) ALIGN_MASK(x, (typeof(x))(a) - 1) We can simplify the logic here into a helper function doing: ALIGN(boundary + 1, 1 << shift) >> shift = ALIGN_MASK(b + 1, (1 << s) - 1) >> s = {[b + 1 + (1 << s) - 1] & ~[(1 << s) - 1]} >> s = [b + 1 + (1 << s) - 1] >> s = [b + (1 << s)] >> s = (b >> s) + 1 This patch introduces and applies dma_get_seg_boundary_nr_pages() as an overflow-free helper for the dma_get_seg_boundary() callers to get numbers of pages. It also takes care of the NULL dev case for non-DMA API callers. Suggested-by: Christoph Hellwig Signed-off-by: Nicolin Chen Acked-by: Niklas Schnelle Acked-by: Michael Ellerman (powerpc) Signed-off-by: Christoph Hellwig commit 00b3c11879d790f51cac6477abe870936a2323ae Author: Allen Pais Date: Thu Sep 3 11:36:37 2020 +0530 RDMA/rxe: Convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Link: https://lore.kernel.org/r/20200903060637.424458-6-allen.lkml@gmail.com Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Jason Gunthorpe commit a23afb448ba8cec3970727b97ce2c8ed5a289694 Author: Allen Pais Date: Thu Sep 3 11:36:36 2020 +0530 RDMA/qib: Convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Link: https://lore.kernel.org/r/20200903060637.424458-5-allen.lkml@gmail.com Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Jason Gunthorpe commit 4e95f849993bccd8994a898627f34d8e07a6a854 Author: Allen Pais Date: Thu Sep 3 11:36:35 2020 +0530 RDMA/i40iw: Convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Link: https://lore.kernel.org/r/20200903060637.424458-4-allen.lkml@gmail.com Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Jason Gunthorpe commit 55db47d0828c7cba4a9def51e4686da5da7c8a85 Author: Allen Pais Date: Thu Sep 3 11:36:34 2020 +0530 RDMA/hfi1: Convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Link: https://lore.kernel.org/r/20200903060637.424458-3-allen.lkml@gmail.com Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Jason Gunthorpe commit 53c2a706ae78589380d5fa8c2bbaac04136d25f4 Author: Allen Pais Date: Thu Sep 3 11:36:33 2020 +0530 RDMA/bnxt_re: Convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Link: https://lore.kernel.org/r/20200903060637.424458-2-allen.lkml@gmail.com Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Jason Gunthorpe commit 4c8e84b8876dc726a7e5327b3113d75423c46728 Author: Daniel Vetter Date: Wed Sep 2 09:26:27 2020 +0200 drm/managed: Cleanup of unused functions and polishing docs Following functions are only used internally, not by drivers: - devm_drm_dev_init Also, now that we have a very slick and polished way to allocate a drm_device with devm_drm_dev_alloc, update all the docs to reflect the new reality. Mostly this consists of deleting old and misleading hints. Two main ones: - it is no longer required that the drm_device base class is first in the structure. devm_drm_dev_alloc can cope with it being anywhere - obviously embedded now strongly recommends using devm_drm_dev_alloc v2: Fix typos (Noralf) v3: Split out the removal of drm_dev_init, that's blocked on some discussions on how to convert vgem/vkms/i915-selftests. Adjust commit message to reflect that. Cc: Noralf Trønnes Acked-by: Noralf Trønnes (v2) Acked-by: Sam Ravnborg Cc: Luben Tuikov Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200902072627.3617301-1-daniel.vetter@ffwll.ch commit 75992a4418b6c51d4da9c99aac7d92ab29148196 Author: Sean Young Date: Mon Aug 24 21:10:45 2020 +0200 media: rc: rename ir_lirc_* functions to lirc_* Remove pointless ir_ prefix. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 528222d853f9283110f0118dd71d9f0ad686d586 Author: Sean Young Date: Sun Aug 23 19:23:05 2020 +0200 media: rc: harmonize infrared durations to microseconds rc-core kapi uses nanoseconds for infrared durations for receiving, and microseconds for sending. The uapi already uses microseconds for both, so this patch does not change the uapi. Infrared durations do not need nanosecond resolution. IR protocols do not have durations shorter than about 100 microseconds. Some IR hardware offers 250 microseconds resolution, which is sufficient for most protocols. Better hardware has 50 microsecond resolution and is enough for every protocol I am aware off. Unify on microseconds everywhere. This simplifies the code since less conversion between microseconds and nanoseconds needs to be done. This affects: - rx_resolution member of struct rc_dev - timeout member of struct rc_dev - duration member in struct ir_raw_event Cc: "Bruno Prémont" Cc: Hans Verkuil Cc: Maxim Levitsky Cc: Patrick Lerda Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: Sean Wang Cc: Matthias Brugger Cc: Patrice Chotard Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: "David Härdeman" Cc: Benjamin Valentin Cc: Antti Palosaari Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 32c3db3d9873ef822a9544259d68d0cd31c7bc64 Author: Sean Young Date: Sun Aug 23 14:32:41 2020 +0200 media: rc: rename lirc char dev region to "lirc" BaseRemoteCtl is not descriptive. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit f35e5231d3afa1b43faf16ea264f3b4b1a2264b3 Author: Alex Bee Date: Thu Jul 16 23:33:03 2020 +0200 media: dvb_usb_pctv452e: use ISL6423 voltage regulator per default Both TT-connect S2-3600 and Pinnacle PCTV Sat HDTV are using Intersil ISL6423 as LNB voltage regulator. This makes TT-connect S2-3650 CI the only device which uses STM LNBP22 regulator which is currently used for all devices driven by pctv452e driver. This patch fixes this by creating an exception for TT-connect S2-3650 CI to continue to use STM LNBP22 while all others now using correct ISL6423 driver which makes DiSEqC/EN50494 comands which involve voltage changes now working on the other devices (which didn't work before). Signed-off-by: Alex Bee Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 07be6f4cfd989df2fa03b0bb931e2eb909c58ab5 Author: Jason Yan Date: Sun Apr 26 11:43:16 2020 +0200 media: mxl5xx: remove unused including Fix the following versioncheck warning: drivers/media/dvb-frontends/mxl5xx.c:30:1: unused including Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit f4c4b1bb2f5a7f034f039c302b56f82344a6dc8c Author: Shengjiu Wang Date: Thu Sep 3 13:53:47 2020 +0800 ASoC: fsl_sai: Set SAI Channel Mode to Output Mode Transmit data pins will output zero when slots are masked or channels are disabled. In CHMOD TDM mode, transmit data pins are tri-stated when slots are masked or channels are disabled. When data pins are tri-stated, there is noise on some channels when FS clock value is high and data is read while fsclk is transitioning from high to low. Signed-off-by: Cosmin-Gabriel Samoila Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1599112427-22038-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 770f58d7d2c58b8ff31d3694ce14a785c2e75009 Author: Shengjiu Wang Date: Tue Sep 1 19:01:08 2020 +0800 ASoC: fsl_sai: Support multiple data channel enable bits One data channel is one data line. From imx7ulp, the SAI IP is enhanced to support multiple data channels. If there is only two channels input and slots is 2, then enable one data channel is enough for data transfer. So enable the TCE/RCE and transmit/receive mask register according to the input channels and slots configuration. Move the data channel enablement from startup() to hw_params(). Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1598958068-10552-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit cf696856bc54a31f78e6538b84c8f7a006b6108b Author: Kai Vehmanen Date: Tue Sep 1 18:10:36 2020 +0300 drm/i915: fix regression leading to display audio probe failure on GLK In commit 4f0b4352bd26 ("drm/i915: Extract cdclk requirements checking to separate function") the order of force_min_cdclk_changed check and intel_modeset_checks(), was reversed. This broke the mechanism to immediately force a new CDCLK minimum, and lead to driver probe errors for display audio on GLK platform with 5.9-rc1 kernel. Fix the issue by moving intel_modeset_checks() call later. [vsyrjala: It also broke the ability of planes to bump up the cdclk and thus could lead to underruns when eg. flipping from 32bpp to 64bpp framebuffer. To be clear, we still compute the new cdclk correctly but fail to actually program it to the hardware due to intel_set_cdclk_{pre,post}_plane_update() not getting called on account of state->modeset==false.] Fixes: 4f0b4352bd26 ("drm/i915: Extract cdclk requirements checking to separate function") BugLink: https://github.com/thesofproject/linux/issues/2410 Signed-off-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200901151036.1312357-1-kai.vehmanen@linux.intel.com commit 4b916ed9f9e85f705213ca8d69771d3c1cd6ee5a Author: Leon Romanovsky Date: Sun Aug 30 11:40:04 2020 +0300 RDMA/mlx5: Fix potential race between destroy and CQE poll The SRQ can be destroyed right before mlx5_cmd_get_srq is called. In such case the latter will return NULL instead of expected SRQ. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Link: https://lore.kernel.org/r/20200830084010.102381-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5ee74eb280d0aa1f27fbdba5dcbde31e2df369e2 Author: Pierre-Louis Bossart Date: Tue Sep 1 23:05:56 2020 +0800 soundwire: intel: don't manage link power individually Each link has separate power controls, but experimental results show we need to use an all-or-none approach to the link power management. This change has marginal power impacts, the DSP needs to be powered anyways before SoundWire links can be powered, and even when powered a link can be in clock-stopped mode. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200901150556.19432-11-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit de763fa888736f2ac2cb5bf7eac965e017310a7b Author: Pierre-Louis Bossart Date: Tue Sep 1 23:05:55 2020 +0800 soundwire: intel: pass link_mask information to each master While the hardware exposes independent bits to power-up each master, the recommended sequence is to power all links or none. Idle links can still use the clock stop mode while the master is powered. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200901150556.19432-10-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit f748f34ef96848fc576002084d7ef9773011ed6a Author: Pierre-Louis Bossart Date: Tue Sep 1 23:05:54 2020 +0800 soundwire: intel: add error log for clock-stop invalid configs Detect cases where the clock is assumed to be stopped but the IP is not in the relevant state. There is no real way to recover here, but adding an error log can help detect bad programming sequences or race conditions. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200901150556.19432-9-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 063ff4e568cec51e110471836645bd5f94316cac Author: Pierre-Louis Bossart Date: Tue Sep 1 23:05:53 2020 +0800 soundwire: stream: enable hw_sync as needed by hardware Use platform-specific information to decide when to use hw_sync, not only a number of links > 1. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200901150556.19432-8-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 94eed66107ffabdf9c07a922bfcd7e396fe83053 Author: Pierre-Louis Bossart Date: Tue Sep 1 23:05:52 2020 +0800 soundwire: intel: add multi-link hw_synchronization information set the flags as required by hardware implementation Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200901150556.19432-7-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 88d7c71ea5b29b322d9c72103a196234cb5040db Author: Pierre-Louis Bossart Date: Tue Sep 1 23:05:51 2020 +0800 soundwire: bus: update multi-link definition with hw sync details Hardware-based synchronization is typically required when the bus->multi_link flag is set. On Intel platforms, when the Cadence IP is configured in 'Multi Master Mode', the hardware synchronization is required even when a stream only uses a single segment. The existing code only deal with hardware synchronization when a stream uses more than one segment so to remain backwards compatible we add a configuration threshold. For Intel cases this threshold will be set to one, other platforms may be able to use the SSP-based sync in those cases. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200901150556.19432-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit d78071b4e1c3252fdceeb1402eb2541649a97206 Author: Pierre-Louis Bossart Date: Tue Sep 1 23:05:50 2020 +0800 soundwire: intel: add missing support for all clock stop modes Deal with the BUS_RESET case, which is the default. The only change is to add support for the exit sequence using the syncArm/syncGo mode for the exit reset sequence. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200901150556.19432-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 857a7c429e33993df77602ebd682e034e73fe2d2 Author: Pierre-Louis Bossart Date: Tue Sep 1 23:05:49 2020 +0800 soundwire: intel: add multi-link support The multi-link support is enabled with a hardware gsync signal connecting all links. All commands and operations which typically are handled on an SSP boundary will be deferred further and enabled across all links with the 'syncGo' sequence. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200901150556.19432-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 0ef2986e19c922e0e22206e02b3b1e52d11d6f38 Author: Pierre-Louis Bossart Date: Tue Sep 1 23:05:48 2020 +0800 soundwire: intel: ignore software command retries with multiple links synchronized in hardware, retrying commands in software is not recommended. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200901150556.19432-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit e4be9facb969b3cbb76ba7cce7dcd64fef463346 Author: Pierre-Louis Bossart Date: Tue Sep 1 23:05:47 2020 +0800 soundwire: intel: disable shim wake on suspend If we enabled the clock stop mode and suspend, we need to disable the shim wake. We do so only if the parent is pm_runtime active due to power rail dependencies. GitHub issue: https://github.com/thesofproject/linux/issues/1678 Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200901150556.19432-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 6073755886a463a7a7aecdd0abb32a1d38bdb7e6 Author: Pierre-Louis Bossart Date: Mon Aug 31 21:43:18 2020 +0800 soundwire: fix port_ready[] dynamic allocation in mipi_disco The existing code allocates memory for the total number of ports. This only works if the ports are contiguous, but will break if e.g. a Devices uses port0, 1, and 14. The port_ready[] array would contain 3 elements, which would lead to an out-of-bounds access. Conversely in other cases, the wrong port index would be used leading to timeouts on prepare. This can be fixed by allocating for the worst-case of 15 ports (DP0..DP14). In addition since the number is now fixed, we can use an array instead of a dynamic allocation. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200831134318.11443-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 63642595a78da42f841fabcc3f309f4c1362dc40 Author: Pierre-Louis Bossart Date: Mon Aug 31 21:43:17 2020 +0800 soundwire: add definition for maximum number of ports A Device may have at most 15 physical ports (DP0, DP1..DP14). Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200831134318.11443-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit d0bbcb4e836f0ffc6c0aeba6341ce227384805e3 Author: Pierre-Louis Bossart Date: Mon Aug 31 21:43:16 2020 +0800 ASoC: codecs: soundwire: remove port_ready[] usage from codecs. port_ready will be changed to a fixed array in sdw.h and all initialization work will be done at soundwire side in the following patch. So remove them from codec drivers. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200831134318.11443-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 14eddb0f53fab3e25b4b6c1846432b8eaa401248 Author: Mauro Carvalho Chehab Date: Wed Sep 2 17:50:56 2020 +0200 media: atomisp: cleanup isys_irq headers Don't need to declare those functions with extern: drivers/staging/media/atomisp/pci/css_2401_system/host/isys_irq_private.h:51:35: warning: function 'isys_irqc_state_dump' with external linkage has definition drivers/staging/media/atomisp/pci/css_2401_system/host/isys_irq_private.h:68:35: warning: function 'isys_irqc_reg_store' with external linkage has definition drivers/staging/media/atomisp/pci/css_2401_system/host/isys_irq_private.h:85:39: warning: function 'isys_irqc_reg_load' with external linkage has definition drivers/staging/media/atomisp/pci/css_2401_system/host/isys_irq.c:31:35: warning: function 'isys_irqc_status_enable' with external linkage has definition Signed-off-by: Mauro Carvalho Chehab commit c5ea3e4358772b68b0de16bfac7f5b0741acfc68 Author: Mauro Carvalho Chehab Date: Wed Sep 2 14:15:08 2020 +0200 media: atomisp: fix some bad indents As smatch reports, there are several bad indents: drivers/staging/media/atomisp/pci/hmm/hmm.c:271 hmm_alloc() warn: inconsistent indenting drivers/staging/media/atomisp/pci/runtime/bufq/src/bufq.c:390 ia_css_bufq_enqueue_psys_event() warn: inconsistent indenting drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2132 ia_css_debug_dump_isys_state() warn: inconsistent indenting drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c:246 sh_css_binary_get_sc_requirements() warn: inconsistent indenting drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c:565 ia_css_binary_get_shading_info_type_1() warn: inconsistent indenting drivers/staging/media/atomisp/pci/sh_css.c:5109 sh_css_pipes_stop() warn: inconsistent indenting drivers/staging/media/atomisp/pci/sh_css.c:8791 ia_css_pipe_create() warn: inconsistent indenting Some of them are due to ifdefs. Get rid of them by either getting a common code that would work for both ISP2400 and ISP2401 or by creating separate functions, one for each ISP version. Signed-off-by: Mauro Carvalho Chehab commit 5ad658c0038f79014e7d644dd8e16630225bfce2 Author: Mauro Carvalho Chehab Date: Mon Jul 20 12:47:10 2020 +0200 media: atomisp: remove compile-time tests from input_system_global.h Now that there's no duplication between ISP2400 and ISP2401 input system functions, we can include both at the system global. Signed-off-by: Mauro Carvalho Chehab commit 8a8e36facd60014ac1b0155a370eec8d564db63e Author: Mauro Carvalho Chehab Date: Mon Jul 20 12:46:19 2020 +0200 media: atomisp: reorder functions at pixelgen_private.h Reorder functions in order to declare before usage. Signed-off-by: Mauro Carvalho Chehab commit 284be89176e5d95f7e1cec77cdd169adcfd5fa24 Author: Mauro Carvalho Chehab Date: Mon Jul 20 12:20:20 2020 +0200 media: atomisp: de-duplicate names at *_input_system_global.h There are some duplicated names between the ISP2401 and ISP2400 for the input system, with different meanings. In order to avoid ubiquity, let's prepend those with the name of the ISP. Signed-off-by: Mauro Carvalho Chehab commit 39bc26e49a5f94036a6d1cafa70c58eb92cef0fa Author: Mauro Carvalho Chehab Date: Mon Jul 20 12:15:13 2020 +0200 media: atomisp: unify INPUT error return type There is a typedef for INPUT errors. This is different between ISP2401 and ISP2400. Place both at the same struct, at the global header file. Signed-off-by: Mauro Carvalho Chehab commit 9842fa169cac5c62f635737c732ef9a64065af9b Author: Mauro Carvalho Chehab Date: Mon Jul 20 11:41:34 2020 +0200 media: atomisp: don't check for ISP version for includes As there aren't duplicated names anymore, and the end goal is to do runtime checks between ISP2400 and ISP2401, remove the part of the Makefile which changes the include places based on the compile-time version. This shouldn't cause any effect, but it will make easier for further patches meant to remove conditional compiler decisions between ISP versions to be replaced by runtime ones. Signed-off-by: Mauro Carvalho Chehab commit 6543143f0eb78b5cc6a68ada575b10e71896ace8 Author: Mauro Carvalho Chehab Date: Mon Jul 20 11:19:02 2020 +0200 media: atomisp: get rid of ibuf_ctrl abstraction Just move the stuff there to the places where this header is included. Signed-off-by: Mauro Carvalho Chehab commit d71dc239a823fa47832c9181c55ffe6c016d145c Author: Mauro Carvalho Chehab Date: Mon Jul 20 10:44:30 2020 +0200 media: atomisp: get rid of isys_dma.h and isys_dma_local.h There aren't much on this abstraction. Just move the defines to isys_dma_private.h and isys_dma_public.h, cleaning up the includes. Signed-off-by: Mauro Carvalho Chehab commit 641c2292bf19bce136832969c9d46229bcfcdccf Author: Mauro Carvalho Chehab Date: Mon Jul 20 09:04:43 2020 +0200 media: atomisp: get rid of version-dependent globals Replace all occurrences along the atomisp tree for the conditional compilation macros found at system_global.h, replacing them by tests wheather ISP2401 is defined or not. Signed-off-by: Mauro Carvalho Chehab commit bd674b5a413c2bb4fa3892d2106b1eb005886be5 Author: Mauro Carvalho Chehab Date: Mon Jul 20 09:06:18 2020 +0200 media: atomisp: cleanup ifdefs from ia_css_debug.c There are lots of code dependency there. Get rid of most of them. We can't remove everything, as there are some structs that are conditionally built if ISP2401. So, keep ifdefs only on such cases. Signed-off-by: Mauro Carvalho Chehab commit 929e2a61d672befe51cb6162ae9ea97c54fac9cf Author: Mauro Carvalho Chehab Date: Mon Jul 20 08:44:18 2020 +0200 media: atomisp: get rid of some unused code Now that the defines which are common for both ISP2400 and ISP2401 are at system_global.h, we can get rid of the code not used by those versions. Signed-off-by: Mauro Carvalho Chehab commit fe662d846c957c8861ade7170115e88f6e6e5fdd Author: Christian König Date: Mon Sep 30 15:12:54 2019 +0200 drm/ttm: remove io_reserve_lru handling v3 That is not used any more. v2: keep the NULL checks in TTM. v3: remove unused variable Signed-off-by: Christian König Acked-by: Daniel Vetter Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/388646/ commit 141b15e59175aa174ca1f7596188bd15a7ca17ba Author: Christian König Date: Fri Aug 21 16:06:50 2020 +0200 drm/nouveau: move io_reserve_lru handling into the driver v5 While working on TTM cleanups I've found that the io_reserve_lru used by Nouveau is actually not working at all. In general we should remove driver specific handling from the memory management, so this patch moves the io_reserve_lru handling into Nouveau instead. v2: don't call ttm_bo_unmap_virtual in nouveau_ttm_io_mem_reserve v3: rebased and use both base and offset in the check v4: fix small typos and test the patch v5: rebased and keep the mem.bus init in TTM. Signed-off-by: Christian König Acked-by: Daniel Vetter Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/388643/ commit d575ee11317f3327d6a1d899e56295424f53f3e3 Author: Christian König Date: Fri Aug 21 17:29:22 2020 +0200 drm/ttm: make sure that we always zero init mem.bus v2 We are trying to remove the io_lru handling and depend on zero init base, offset and addr here. v2: init addr as well Signed-off-by: Christian König Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/388642/ commit 6db1bd61575fb5869a82cc019a957e73e6e78ddb Author: Mauro Carvalho Chehab Date: Wed Sep 2 16:36:37 2020 +0200 media: atomisp: csi_rx.c: add missing includes Due to that, smatch warns with: drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c:18:11: warning: symbol 'N_SHORT_PACKET_LUT_ENTRIES' was not declared. Should it be static? drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c:24:11: warning: symbol 'N_LONG_PACKET_LUT_ENTRIES' was not declared. Should it be static? drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c:30:11: warning: symbol 'N_CSI_RX_FE_CTRL_DLANES' was not declared. Should it be static? drivers/staging/media/atomisp/pci/css_2401_system/host/csi_rx.c:37:11: warning: symbol 'N_CSI_RX_BE_SID_WIDTH' was not declared. Should it be static? drivers/staging/media/atomisp/pci/css_2401_system/host/ibuf_ctrl.c:19:11: warning: symbol 'N_IBUF_CTRL_PROCS' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab commit 54e418106c765c5f3c378c770b0f8518632830da Author: Gil Fine Date: Mon Jun 29 20:30:52 2020 +0300 thunderbolt: Add debugfs interface This adds debugfs interface that can be used for debugging possible issues in hardware/software. It exposes router and adapter config spaces through files like this: /sys/kernel/debug/thunderbolt//regs /sys/kernel/debug/thunderbolt///regs /sys/kernel/debug/thunderbolt///path /sys/kernel/debug/thunderbolt///counters /sys/kernel/debug/thunderbolt///regs /sys/kernel/debug/thunderbolt///path /sys/kernel/debug/thunderbolt///counters ... The "regs" is either the router or port configuration space register dump. The "path" is the port path configuration space and "counters" is the optional counters configuration space. These files contains one register per line so it should be easy to use normal filtering tools to find the registers of interest if needed. The router and adapter regs file becomes writable when CONFIG_USB4_DEBUGFS_WRITE is enabled (which is not supposed to be done in production systems) and in this case the developer can write "offset value" lines there to modify the hardware directly. For convenience this also supports the long format the read side produces (but ignores the additional fields). The counters file can be written even when CONFIG_USB4_DEBUGFS_WRITE is not enabled and it is only used to clear the counter values. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit fa1653d99cc8296628e4fa949afad6f87889d14b Author: Mika Westerberg Date: Mon Jun 29 20:23:58 2020 +0300 thunderbolt: No need to warn in TB_CFG_ERROR_INVALID_CONFIG_SPACE This may be returned for example when accessing some of the vendor specific capabilities. It is not fatal by any means so instead of WARN() just log it as debug level. The caller gets error back anyway and is expected to handle it accordingly. Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 0637e3df17be8c3b41c1dc9b8d066d9d35044be3 Author: Gil Fine Date: Sat Jul 25 10:44:16 2020 +0300 thunderbolt: Introduce tb_switch_is_tiger_lake() This is needed to differentiate Tiger Lake from other controllers. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 8c3b15a60065369a3895d417d7fabb055209dfd4 Author: Mika Westerberg Date: Fri Aug 21 09:11:50 2020 +0300 thunderbolt: Introduce tb_switch_is_ice_lake() This is needed to differentiate Ice Lake from other controllers. Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 35ee69e94dce3730b5449854698c9407e607faa1 Author: Mika Westerberg Date: Sat Jul 25 10:40:47 2020 +0300 thunderbolt: Check for Intel vendor ID when identifying controller With USB4 there will be other vendors so make sure the current checks for different Intel controllers will not accidentally match those. Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit a3cfebdc1b3ab379646f61f095102f7d2b8f6f31 Author: Mika Westerberg Date: Sat Jul 25 10:32:46 2020 +0300 thunderbolt: Introduce tb_port_is_nhi() This is useful if one needs to check if adapter (port) is the host interface (NHI). Make tb_port_alloc_hopid() take advantage of this. Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 6de057ef915f167dc6518910de3675ab061d2a50 Author: Mika Westerberg Date: Mon Jun 29 20:21:07 2020 +0300 thunderbolt: Introduce tb_switch_next_cap() This is similar to tb_port_next_cap() but instead allows walking capability list of a switch (router). Convert tb_switch_find_cap() and tb_switch_find_vse_cap() to use this as well. Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 3c8b228d4371d0556d3d333d63df90172c2c7355 Author: Mika Westerberg Date: Mon Jun 29 20:15:17 2020 +0300 thunderbolt: Introduce tb_port_next_cap() This function is useful for walking port config space (adapter) capability lists. Convert the tb_port_find_cap() to use this as well. Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 8f8310115e339c5e3d03b6366998d0a11a5e44bd Author: Mika Westerberg Date: Mon Jun 29 20:11:38 2020 +0300 thunderbolt: Move struct tb_cap_any to tb_regs.h This structure will be needed by the debugfs implementation so make it available outside of cap.c. While there add kernel-doc comments to the structure. Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 815ac8567ef9fb56c679da7482bb3266760d69c6 Author: Mauro Carvalho Chehab Date: Wed Sep 2 17:40:52 2020 +0200 media: atomisp: atomisp_gmin_platform: check before use solve this smatch warning: drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c:842 gmin_v1p8_ctrl() warn: variable dereferenced before check 'gs' (see line 832) By moving the check to happen before its usage. Signed-off-by: Mauro Carvalho Chehab commit b2999af93d6202945b92f970951d3fb371247ce9 Author: Mauro Carvalho Chehab Date: Wed Sep 2 09:53:49 2020 +0200 media: atomisp: fix casts at atomisp_compat_ioctl32.c There are several warnings reported by sparse with regards to wrong typecasts: drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:73:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:73:13: expected void *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:73:13: got void [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:247:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:247:13: expected unsigned int [usertype] *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:247:13: got void [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:248:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:248:13: expected unsigned int [usertype] *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:248:13: got void [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:249:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:249:13: expected unsigned int [usertype] *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:249:13: got void [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:250:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:250:13: expected unsigned int [usertype] *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:250:13: got void [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:282:30: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:282:30: expected void const *from drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:282:30: got struct atomisp_3a_statistics [noderef] __user *kp drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:308:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:308:13: expected unsigned int [usertype] *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:308:13: got void [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:327:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:327:13: expected void [noderef] __user *effective_width drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:327:13: got unsigned int [usertype] * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:348:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:348:13: expected void [noderef] __user *effective_width drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:348:13: got unsigned int [usertype] * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:372:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:372:13: expected unsigned int [usertype] *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:372:13: got void [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:433:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:433:13: expected struct v4l2_framebuffer *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:433:13: got void [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:462:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:462:13: expected void [noderef] __user *frame drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:462:13: got struct v4l2_framebuffer * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:496:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:496:13: expected unsigned short *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:496:13: got void [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:511:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:511:13: expected void [noderef] __user *calb_grp_values drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:511:13: got unsigned short * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:630:21: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:630:21: expected unsigned short [usertype] *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:630:21: got void [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:715:27: warning: cast removes address space '__user' of expression drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:715:27: warning: incorrect type in initializer (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:715:27: expected struct [noderef] __user *karg drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:715:27: got void * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:721:39: warning: cast removes address space '__user' of expression drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:725:21: warning: incorrect type in argument 1 (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:725:21: expected void const volatile [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:725:21: got unsigned int [usertype] *src drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:725:43: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:725:43: expected void *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:725:43: got void [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:741:21: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:741:21: expected struct atomisp_shading_table *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:741:21: got struct atomisp_shading_table [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:747:21: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:747:21: expected struct atomisp_morph_table *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:747:21: got struct atomisp_morph_table [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:753:21: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:753:21: expected struct atomisp_dis_coefficients *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:753:21: got struct atomisp_dis_coefficients [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:760:14: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:760:14: expected struct atomisp_dvs_6axis_config *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:760:14: got struct atomisp_dvs_6axis_config [noderef] __user * drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:817:13: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:817:13: expected struct atomisp_sensor_ae_bracketing_lut_entry *__pu_val drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c:817:13: got void [noderef] __user * Use the same strategies used at v4l2-compat32.c, in order to solve them and avoid warnings. Signed-off-by: Mauro Carvalho Chehab commit 15a36aae1ec1c1f17149b6113b92631791830740 Author: Mauro Carvalho Chehab Date: Wed Sep 2 08:37:12 2020 +0200 media: saa7134: avoid a shift overflow As reported by smatch: drivers/media/pci/saa7134//saa7134-tvaudio.c:686 saa_dsp_writel() warn: should 'reg << 2' be a 64 bit type? On a 64-bits Kernel, the shift might be bigger than 32 bits. In real, this should never happen, but let's shut up the warning. Signed-off-by: Mauro Carvalho Chehab commit 883c84aca1e34d80a9b7b337225b0ef2f34b4cd6 Author: Mauro Carvalho Chehab Date: Wed Sep 2 08:11:02 2020 +0200 media: dvb-ttusb-budget: cleanup printk logic Instead of calling printk(), use pr_foo() macros. While here, do some cleanup at the printed messages, as some has __func__, while others have the module name (sometimes spelled as "ttusb_dvb"). Signed-off-by: Mauro Carvalho Chehab commit 36e3cf0cb17b722ac19f58db9780746ec56bf3d6 Author: Mauro Carvalho Chehab Date: Wed Sep 2 07:30:07 2020 +0200 media: dvb-ttusb-budget: don't use stack for USB transfers As reported by smatch: drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:311 ttusb_boot_dsp() error: doing dma on the stack (b) drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:321 ttusb_boot_dsp() error: doing dma on the stack (b) drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:330 ttusb_boot_dsp() error: doing dma on the stack (b) drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:351 ttusb_set_channel() error: doing dma on the stack (b) drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:361 ttusb_del_channel() error: doing dma on the stack (b) drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:412 ttusb_init_controller() error: doing dma on the stack (b0) drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:416 ttusb_init_controller() error: doing dma on the stack (b1) drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:422 ttusb_init_controller() error: doing dma on the stack (b2) drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:425 ttusb_init_controller() error: doing dma on the stack (b3) drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:430 ttusb_init_controller() error: doing dma on the stack (get_version) This driver still uses the USB stack for DMA transfers, which is broken for a long time. I almost dropped this driver, as there's a high chance that nobody is using it with upstream Kernels, as we didn't receive any bug reports. As fixing this won't be hard, I ended opting to fix. While here, I dropped an ugly hack that implemented read via a separate function that was just doing a memcpy(). It should be noticed that, during the init phase, there's a "b4" register that were never initialized, as its buffer were used just to store the results of "b3" initialization. Signed-off-by: Mauro Carvalho Chehab commit c91effc08203bc2b2e9b23046f1831470a140880 Author: Mauro Carvalho Chehab Date: Tue Sep 1 17:08:31 2020 +0200 media: saa7134-alsa.c: number of pages should be unsigned long As reported by smatch: drivers/media/pci/saa7134/saa7134-alsa.c:267 saa7134_alsa_dma_init() warn: should 'nr_pages << 12' be a 64 bit type? the number of patches should be unsigned long. Signed-off-by: Mauro Carvalho Chehab commit b4e0a5f9c0ac47e7368cec1804d1ad22a80661a7 Author: Mauro Carvalho Chehab Date: Tue Sep 1 16:41:15 2020 +0200 media: cx88-alsa: number of pages should be unsigned long As reported by smatch: drivers/media/pci/cx88/cx88-alsa.c:286 cx88_alsa_dma_init() warn: should 'nr_pages << 12' be a 64 bit type? the number of patches should be unsigned long. Signed-off-by: Mauro Carvalho Chehab commit 7463773187a917a8b19961a14d2bf48d8cdfa28e Author: Mauro Carvalho Chehab Date: Tue Sep 1 17:00:33 2020 +0200 media: cx23885-alsa: number of pages should be unsigned long As reported by smatch: drivers/media//pci/cx23885/cx23885-alsa.c:83 cx23885_alsa_dma_init() warn: should 'nr_pages << 12' be a 64 bit type? the number of patches should be unsigned long. Signed-off-by: Mauro Carvalho Chehab commit 99c2ec04e737b743ab1506a1b1d10ea208106484 Author: Mauro Carvalho Chehab Date: Tue Sep 1 14:34:46 2020 +0200 media: cx25821-alsa: number of pages should be unsigned long As reported by smatch: drivers/media/pci/cx25821/cx25821-alsa.c:146 cx25821_alsa_dma_init() warn: should 'nr_pages << 12' be a 64 bit type? the number of patches should be unsigned long. Signed-off-by: Mauro Carvalho Chehab commit 1faa39e0f3bcfe47dc7a61a72c234b24005c3a1a Author: Mauro Carvalho Chehab Date: Tue Sep 1 11:09:26 2020 +0200 media: videobuf-dma-sg: number of pages should be unsigned long As reported by smatch: drivers/media/v4l2-core/videobuf-dma-sg.c:245 videobuf_dma_init_kernel() warn: should 'nr_pages << 12' be a 64 bit type? The printk should not be using %d for the number of pages. After looking better, the real problem here is that the number of pages should be long int. Signed-off-by: Mauro Carvalho Chehab commit 73c016543dbad406443d413f9c25fac32dcf5131 Author: Mauro Carvalho Chehab Date: Tue Sep 1 14:27:42 2020 +0200 media: serial_ir: use the right type for a dma address As warned by smatch: drivers/media/rc/serial_ir.c:550 serial_ir_probe() warn: should '8 << ioshift' be a 64 bit type? the "8" constant should be unsigned long. Signed-off-by: Mauro Carvalho Chehab commit 3f83aa6b4bae3bf16dcb84f5ac74f4b881f4a3ea Author: Mauro Carvalho Chehab Date: Tue Sep 1 13:22:46 2020 +0200 media: tda10021: avoid casts when using symbol_rate The usage of castings and float point when checking for the setup based at the symbol_rate cause those warnings with smatch: drivers/media/dvb-frontends/tda10021.c:153 tda10021_set_symbolrate() warn: unsigned 'symbolrate' is never less than zero. drivers/media/dvb-frontends/tda10021.c:155 tda10021_set_symbolrate() warn: unsigned 'symbolrate' is never less than zero. drivers/media/dvb-frontends/tda10021.c:157 tda10021_set_symbolrate() warn: unsigned 'symbolrate' is never less than zero. drivers/media/dvb-frontends/tda10021.c:159 tda10021_set_symbolrate() warn: unsigned 'symbolrate' is never less than zero. While the code should work with gcc, as it will evaluate the values into a constant before compiling, other compilers could do otherwise. So, get rid of float pointing math on it, avoiding the need of doing typecasts. While here, cleanup some coding style issues at the related code. Signed-off-by: Mauro Carvalho Chehab commit 10f07a6b2a0e2df63e7159554a47d674c4c9fb16 Author: Mauro Carvalho Chehab Date: Tue Sep 1 12:33:20 2020 +0200 media: venus: place extern venus_fw_debug on a header file Sparse warns about this symbol: drivers/media/platform/qcom/venus/hfi_venus.c:133:5: warning: symbol 'venus_fw_debug' was not declared. Should it be static? Because hfi_venus.c doesn't include a header file with the extern. So, move it to core.h, with is included by both hfi_venus.c and dbgfs.c. This way, if something changes with it, warnings or errors will be produced. Signed-off-by: Mauro Carvalho Chehab commit e4969cff95fb85bd242cd74905065a41e3d04ab9 Author: Mauro Carvalho Chehab Date: Tue Sep 1 12:05:57 2020 +0200 media: wl128x: get rid of a potential spectre issue As reported by smatch: drivers/media/radio/wl128x/fmdrv_common.c:736 fm_irq_handle_rdsdata_getcmd_resp() warn: potential spectre issue 'rds_fmt.data.groupdatabuff.buff> Address it by using array_index_nospec(). While here, reorder the linux/ includes. Signed-off-by: Mauro Carvalho Chehab commit 13c129066845dc6b81f5e13ddaf854b053a9490f Author: Mauro Carvalho Chehab Date: Tue Sep 1 11:46:12 2020 +0200 media: av7110_v4l: avoid a typecast While smatch reports an issue there: drivers/media/pci/ttpci/av7110_v4l.c:163 ves1820_set_tv_freq() warn: unsigned 'freq' is never less than zero. drivers/media/pci/ttpci/av7110_v4l.c:165 ves1820_set_tv_freq() warn: unsigned 'freq' is never less than zero. The logic is actually fine. Yet, removing the typecast shuts up smatch and makes the code more readable. Signed-off-by: Mauro Carvalho Chehab commit 7a9b56123a036483d3b26bbd37d0dab4ca4c9eae Author: Mauro Carvalho Chehab Date: Tue Sep 1 11:05:19 2020 +0200 media: qt1010: fix usage of unititialized value As pointed by smatch: drivers/media/tuners/qt1010.c:239 qt1010_init_meas1() error: uninitialized symbol 'val2'. drivers/media/tuners/qt1010.c:273 qt1010_init_meas2() error: uninitialized symbol 'val'. The logic is ok, but it is hard for static analyzers to parse it, as it depends on a value read in the middle of a loop. Also, it takes a while for humans to verify. Re-write the first function to use a more direct way. At the second one, I opted to just initialize the read var, in order to shut up the report. While here, address a few coding style issues at the function code. Signed-off-by: Mauro Carvalho Chehab commit ddc11db26ccbd40ccb42449b747c86c12f2ec636 Author: Mauro Carvalho Chehab Date: Tue Sep 1 08:14:14 2020 +0200 media: tda10086: cleanup symbol_rate setting logic The original logic had an integer to unsigned integer conversion, plus a float-point math. While gcc should be able to do the match at compile time, other compilers might not do the same. Also, those produce the following warnings with static code analyzers: drivers/media/dvb-frontends/tda10086.c:300 tda10086_set_symbol_rate() warn: unsigned 'symbol_rate' is never less than zero. drivers/media/dvb-frontends/tda10086.c:303 tda10086_set_symbol_rate() warn: unsigned 'symbol_rate' is never less than zero. drivers/media/dvb-frontends/tda10086.c:306 tda10086_set_symbol_rate() warn: unsigned 'symbol_rate' is never less than zero. drivers/media/dvb-frontends/tda10086.c:309 tda10086_set_symbol_rate() warn: unsigned 'symbol_rate' is never less than zero. drivers/media/dvb-frontends/tda10086.c:312 tda10086_set_symbol_rate() warn: unsigned 'symbol_rate' is never less than zero. drivers/media/dvb-frontends/tda10086.c:315 tda10086_set_symbol_rate() warn: unsigned 'symbol_rate' is never less than zero. drivers/media/dvb-frontends/tda10086.c:318 tda10086_set_symbol_rate() warn: unsigned 'symbol_rate' is never less than zero. drivers/media/dvb-frontends/tda10086.c:321 tda10086_set_symbol_rate() warn: unsigned 'symbol_rate' is never less than zero. drivers/media/dvb-frontends/tda10086.c:324 tda10086_set_symbol_rate() warn: unsigned 'symbol_rate' is never less than zero. drivers/media/dvb-frontends/tda10086.c:327 tda10086_set_symbol_rate() warn: unsigned 'symbol_rate' is never less than zero. Change the logic to declare the reference constant as unsigned and to not use float point math. Signed-off-by: Mauro Carvalho Chehab commit 6ac6faee5d7d7d1676a3188286438bed2dadd863 Author: Mika Westerberg Date: Fri Jun 5 14:25:02 2020 +0300 thunderbolt: Add runtime PM for Software CM This adds runtime PM support for the Software Connection Manager parts of the driver. This allows to save power when either there is no device attached at all or there is a device attached and all following conditions are true: - Tunneled PCIe root/downstream ports are runtime suspended - Tunneled USB3 ports are runtime suspended - No active DisplayPort stream - No active XDomain connection For the first two we take advantage of device links that were added in previous patch. Difference for the system sleep case is that we also enable wakes when something is geting plugged in/out of the Thunderbolt ports. Signed-off-by: Mika Westerberg commit b2be2b05cf3b1c7b499d3b05decdcc524879fea7 Author: Mika Westerberg Date: Tue Apr 2 15:26:00 2019 +0300 thunderbolt: Create device links from ACPI description The new way to describe relationship between tunneled ports and USB4 NHI (Native Host Interface) is with ACPI _DSD looking like below for a PCIe downstream port: Scope (\_SB.PCI0) { Device (NHI0) { } // Thunderbolt NHI Device (DSB0) // Hotplug downstream port { Name (_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () {"usb4-host-interface", \_SB.PCI0.NHI0}, ... } }) } } This is "documented" in these [1] USB-IF slides and being used on systems that ship with Windows. The _DSD can be added to tunneled USB3 and PCIe ports, and is needed to make sure the USB4 NHI is resumed before any of the tunneled ports so the protocol tunnels get established properly before the actual port itself is resumed. Othwerwise the USB/PCI core find the link may not be established and starts tearing down the device stack. This parses the ACPI description each time NHI is probed and tries to find devices that has the property and it references the NHI in question. For each matching device a device link from that device to the NHI is created. Since USB3 ports themselves do not get runtime suspended with the parent device (hub) we do not add the link from the USB3 port to USB4 NHI but instead we add the link from the xHCI device. This makes the device link usable for runtime PM as well. [1] https://www.usb.org/sites/default/files/D1T2-2%20-%20USB4%20on%20Windows.pdf Signed-off-by: Mika Westerberg Acked-by: Rafael J. Wysocki commit 1c9698f856699c7a36d8c53f146b64c4b915e5ad Author: Mika Westerberg Date: Tue May 19 15:34:21 2020 +0300 ACPI: Export acpi_get_first_physical_node() to modules This function will be needed by the Thunderbolt driver when it parses ACPI description for linking tunneled ports to the Thunderbolt controller device. Signed-off-by: Mika Westerberg Acked-by: Rafael J. Wysocki commit 2b9941e089ac9cb04976c5fe7aa65378d64fc0fe Author: Mika Westerberg Date: Tue May 19 13:55:18 2020 +0300 PCI / thunderbolt: Switch to use device links instead of PCI quirk On older Apple systems there is currently a PCI quirk in place to block resume of tunneled PCIe ports until NHI (Thunderbolt controller) is resumed. This makes sure the PCIe tunnels are re-established before PCI core notices it. With device links the same thing can be done without quirks. The driver core will make sure the supplier (NHI) is resumed before consumers (PCIe downstream ports). For this reason switch the Thunderbolt driver to use device links and remove the PCI quirk. Signed-off-by: Mika Westerberg Acked-by: Bjorn Helgaas commit b2911a593a705e54adde6d06d4657c1ff2f16583 Author: Mika Westerberg Date: Fri Dec 6 18:36:07 2019 +0200 thunderbolt: Enable wakes from system suspend In order for the router and the whole domain to wake up from system suspend states we need to enable wakes for the connected routers. For device routers we enable wakes from PCIe and USB 3.x. This allows devices such as keyboards connected to USB 3.x hub that is tunneled to wake the system up as expected. For all routers we enabled wake on USB4 for each connected ports. This is used to propagate the wake from router to another. Do the same for legacy routers through link controller vendor specific registers as documented in USB4 spec chapter 13. While there correct kernel-doc of usb4_switch_set_sleep() -- it does not enable wakes instead there is a separate function (usb4_switch_set_wake()) that does. Signed-off-by: Mika Westerberg commit 341d45188a7800ae3bc18558d62020787b78397e Author: Mika Westerberg Date: Fri Feb 21 12:11:54 2020 +0200 thunderbolt: Disable lane 1 for XDomain connection USB4 spec mandates that the lane 1 should be disabled if lanes are not bonded. For host-to-host connections (XDomain) we don't support lane bonding so in order to be compatible with the spec, disable lane 1 when another host is connected. Signed-off-by: Mika Westerberg commit 284652a4a49917e121277a6cacbefed9f65b94ca Author: Mika Westerberg Date: Thu Apr 9 14:23:32 2020 +0300 thunderbolt: Configure port for XDomain When the port is connected to another host it should be marked as such in the USB4 port capability. This information is used by the router during sleep and wakeup. Also do the same for legacy switches via link controller vendor specific registers. Signed-off-by: Mika Westerberg commit e28178bf566cf7281b513856aa71a8d41aa81154 Author: Mika Westerberg Date: Thu Apr 2 12:42:44 2020 +0300 thunderbolt: Set port configured for both ends of the link Both ends of the link needs to have this set. Otherwise the link is not re-established properly after sleep. Now since it is possible to have mixed USB4 and Thunderbolt 1, 2 and 3 devices we need to split the link configuration functionality to happen per port so we can pick the correct implementation. Signed-off-by: Mika Westerberg commit de4620391786513a6971029b61663563c4b7b961 Author: Mika Westerberg Date: Thu Apr 2 14:50:52 2020 +0300 thunderbolt: Configure link after lane bonding is enabled During testing it was noticed that the link is not properly restored after the domain exits sleep if the link configured bits are set before lane bonding is enabled. The USB4 spec does not say in which order these need to be set but setting link configured afterwards makes the link restoration work so we do that instead. Signed-off-by: Mika Westerberg commit 5cb6ed31c5d51a4b360ae8aa69fc2457723db27a Author: Mika Westerberg Date: Thu Apr 2 12:24:48 2020 +0300 thunderbolt: Do not change default USB4 router notification timeout Some early stage USB4 devices do not like that any of the enumerating router config space fields (ROUTER_CS_1 - ROUTER_CS_4) are written after the initial enumeration for example when entering sleep states. The default timeout by the USB4 spec is 10 ms which should be fine for the driver to handle. For this reason do not change the notification timeout from the default 10 ms for USB4 routers. Signed-off-by: Mika Westerberg commit 8145c4350e1303108a86991d3792eb51e5fdf195 Author: Mika Westerberg Date: Fri Mar 27 17:20:31 2020 +0200 thunderbolt: Initialize TMU again on resume The TMU will be reset after router exits sleep so in order to re-configure it upon resume make sure the structure is initialized again based on the current hardware state. Signed-off-by: Mika Westerberg commit 81a2e3e49f1f89cfe30d354b3a5fba27e2e59d91 Author: Mika Westerberg Date: Sat May 16 16:20:39 2020 +0300 thunderbolt: Tear down DP tunnels when suspending DP tunnels do not need the same kind of treatment as others because they are created based on hot-plug events on DP adapter ports, and the display stack does not need the tunnels to be enabled when resuming from suspend. Also Tiger Lake Thunderbolt controller sends unplug event on D3 exit so this avoids that as well. Signed-off-by: Mika Westerberg commit 356b6c4ef5d62869f8e9ff9003ef6bd8db793539 Author: Mika Westerberg Date: Thu Sep 19 15:25:30 2019 +0300 thunderbolt: Send reset only to first generation routers First generation routers may need the reset command upon resume but it is not supported by newer generations. Signed-off-by: Mika Westerberg commit 2ca3263a806d11d37387ae4cf79c2474b2a6f2dd Author: Mika Westerberg Date: Thu Apr 2 14:28:18 2020 +0300 thunderbolt: No need to log an error if tb_switch_lane_bonding_enable() fails The function already logs an error if it fails so get rid of the duplication. Signed-off-by: Mika Westerberg commit edfbd68bb51e3747c91dbafb5ed0e45cba202c21 Author: Mika Westerberg Date: Tue Aug 18 17:10:00 2020 +0300 thunderbolt: Do not program NFC buffers for USB4 router protocol adapters USB4 spec says that NFC buffers field is not used for protocol adapters, only for lane adapters so make tb_port_add_nfc_credits() skip non-lane adapters in order to follow the spec. Signed-off-by: Mika Westerberg commit 49f2a7f4cdaccb21ad964f6d8645ea3a0ec79293 Author: Mika Westerberg Date: Wed Jun 17 19:04:09 2020 +0300 thunderbolt: Use bit 31 to check if Firmware CM is running in Tiger Lake In Tiger Lake the Firmware CM is always enabled (so bit 0 is always set) but it may be in "pass through" mode which means it requires Software CM instead. This can be determined by checking bit 31 instead. Signed-off-by: Mika Westerberg commit 59ed8dcad6c87ced975fe55364bd0c7698e2b261 Author: Mika Westerberg Date: Thu Jul 23 16:43:00 2020 +0300 thunderbolt: Software CM only should set force power in Tiger Lake When Software CM is running it should not send any NHI mailbox command during PM flows. Only force power bit needs to be set and cleared so change Tiger Lake (well and Ice Lake) nhi_ops to take this into account. Signed-off-by: Mika Westerberg commit 6651c91de042f8ad601b522cb8d33de84246ddc7 Author: Rajmohan Mani Date: Mon Aug 17 08:55:21 2020 -0700 thunderbolt: Optimize NHI LC mailbox command processing Currently the Ice Lake and Tiger Lake NHI (host controller) LC (link controller) mailbox command processing checks for the completion of command every 100 msecs. These controllers are found to complete this in the order of 1 ms or so. Since this delay is in suspend path, surplus delay is effectively affecting runtime PM suspend flows. Optimize this so that we do the wait for 1 ms after reading the mailbox register. This should make Ice Lake and Tiger Lake runtime suspend take less time to complete. Reported-by: Dana Alkattan Signed-off-by: Rajmohan Mani Signed-off-by: Mika Westerberg commit dc4c4bf122ed58f7fc1870c483e2e1dbe6912b2f Author: Rajmohan Mani Date: Mon Aug 17 08:55:20 2020 -0700 thunderbolt: Optimize Force Power logic Currently the "Force Power" logic uses 10 retries, each with a delay of 250 ms. Thunderbolt controllers in Ice Lake and Tiger Lake platforms are found to complete this in the order of 3 ms or so. Since this delay is in resume path, surplus delay is effectively affecting runtime PM resume flows. Decrease the granularity of the delay to 3 ms and increase the number of retries so we wait maximum of ~1 s which is the recommended timeout. This should make runtime resume a bit faster. Reported-by: Dana Alkattan Signed-off-by: Rajmohan Mani Signed-off-by: Mika Westerberg commit 0d7ce5c5c4e6418c1bb1d7c5ee94de815fdc3041 Merge: 90aa4ed5a43fa 0fd1594b3c339 Author: Tony Lindgren Date: Thu Sep 3 12:06:18 2020 +0300 Merge branch 'omap-for-v5.10/prm-genpd' into omap-for-v5.10/ti-sysc-drop-pdata commit a4f3761771bc45ab433bd38fd437bb2e40617f27 Author: Anant Thazhemadam Date: Wed Aug 26 13:09:15 2020 +0200 media: atomisp: fix "dubious: !x | !y" sparse warning Upon running Sparse, "warning: dubious: !x | !y" is brought to notice for this file. Logical and bitwise OR are basically the same in this context, so it doesn't cause a runtime bug. But let's change it to logical OR to make it a little bit cleaner and silence the Sparse warning. Signed-off-by: Anant Thazhemadam Signed-off-by: Mauro Carvalho Chehab commit 0104949370228417fd417bd42fb3d99a59ff6ed6 Author: Joe Perches Date: Tue Aug 25 06:56:18 2020 +0200 media: atomisp: Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Signed-off-by: Mauro Carvalho Chehab commit c1bca5b5ced0cbd779d56f60cdbc9f5e6f6449fe Author: Dinghao Liu Date: Fri Aug 21 07:49:16 2020 +0200 media: atomisp: fix memleak in ia_css_stream_create When aspect_ratio_crop_init() fails, curr_stream needs to be freed just like what we've done in the following error paths. However, current code is returning directly and ends up leaking memory. Signed-off-by: Dinghao Liu Signed-off-by: Mauro Carvalho Chehab commit 5b4b09788dc156d88f54ba0b5fe26d84c03728d4 Author: Colin Ian King Date: Thu Aug 6 13:57:17 2020 +0200 media: atomisp: fix spelling mistake "unsupport" -> "unsupported" There are spelling mistakes in some dev_err messages. Fix these. Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab commit 9b734bb9e7c689217e3025d0a512bf06e3b6ecd4 Author: Cengiz Can Date: Sun Aug 2 00:01:02 2020 +0200 media: atomisp: move null check to earlier point `find_gmin_subdev()` that returns a pointer to `struct gmin_subdev` can return NULL. In `gmin_v2p8_ctrl()` there's a call to this function but the possibility of a NULL was not checked before its being dereferenced, i.e.: /* Acquired here --------v */ struct gmin_subdev *gs = find_gmin_subdev(subdev); /* v------Dereferenced here */ if (gs->v2p8_gpio >= 0) { ... } With this change we're null checking `find_gmin_subdev()` result and we return an error if that's the case. We also WARN() for the sake of debugging. Signed-off-by: Cengiz Can Reported-by: Coverity Static Analyzer CID 1465536 Suggested-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab commit 8d1fdaa50c0adc131f4165d0da461a8a0d2fa46b Author: Juan Antonio Aldea-Armenteros Date: Mon Jul 27 19:48:12 2020 +0200 media: atomisp: mt9m114: replace fixed function names There are a couple of debug messages using hardcoded function names instead of the preferred __func__ magic constant. Replace them: WARNING: Prefer using '"%s...", __func__' to using 'misensor_rmw_reg', this function's name, in a string 215: FILE: ./media/atomisp/i2c/atomisp-mt9m114.c:215: + v4l2_err(client, "misensor_rmw_reg error exit, read failed\n"); WARNING: Prefer using '"%s...", __func__' to using 'misensor_rmw_reg', this function's name, in a string 236: FILE: ./media/atomisp/i2c/atomisp-mt9m114.c:236: + v4l2_err(client, "misensor_rmw_reg error exit, write failed\n"); Signed-off-by: Juan Antonio Aldea-Armenteros Signed-off-by: Mauro Carvalho Chehab commit 714d85f0ebae521ff6ef4bcf7c58a4a3d0213653 Author: Rohit K Bharadwaj Date: Sun Jul 26 08:25:42 2020 +0200 media: atomisp: fix code style issues Fix warnings and errors generated after running checkpatch.pl on pci/sh_css_firmware.c. Signed-off-by: Rohit K Bharadwaj Signed-off-by: Mauro Carvalho Chehab commit 02900a49a43b7f634cb457b94658b6efbc91b877 Author: Suraj Upadhyay Date: Sun Jul 19 16:26:23 2020 +0200 media: atomisp: Replace deprecated MSI APIs Replace deprecated MSI IRQ enabler and disabler with pci_alloc_irq_vectors and pci_free_irq_vectors respectively. And as a result handle the returned error as appropriate. Compile tested. [mchehab: solved a merge conflict that renamed dev->pdev] Signed-off-by: Suraj Upadhyay Signed-off-by: Mauro Carvalho Chehab commit ed99640d558ac4011c2b4abc26138027203ccfe2 Author: Mauro Carvalho Chehab Date: Mon Jun 15 07:43:03 2020 +0200 media: atomisp: fix identation at I2C Kconfig menu There are several bad whitespacing usage there. Remove them. While here, place all Kconfig options for sensors at the same place. Signed-off-by: Mauro Carvalho Chehab commit d221d209470a5b2e00722e977c02a91ade23f42f Author: Ankit Baluni Date: Wed Jul 29 10:05:16 2020 +0200 media: atomisp: fix a brace coding sytle issue Removed braces in 'if else' condition as it only consists of one line each and according to coding style rules , in this case the braces are not required. Signed-off-by: Ankit Baluni Signed-off-by: Mauro Carvalho Chehab commit 7e023a1cc295d0a08a1e800e3c791e2731dd42ae Author: Aditya Jain Date: Thu Jul 23 18:21:33 2020 +0200 media: atomisp: Fix braces placement coding style errors Fix braces placement errors as reported by checkpatch.pl Signed-off-by: Aditya Jain Signed-off-by: Mauro Carvalho Chehab commit f95cb3ddf2abe3cc2a1c8826f8654a47ee68d627 Author: Ankit Baluni Date: Wed Jul 29 09:49:50 2020 +0200 media: atomisp: fixed a brace coding sytle issue Removed braces for a 'if' condition as it contain only single line & there is no need for braces for such case according to coding style rules. Signed-off-by: Ankit Baluni Reviewed-by: Andy Shevchenko Signed-off-by: Mauro Carvalho Chehab commit 539753884e72538e28bd0fcd7c307168e49ae79e Author: Rahul Gottipati Date: Wed Jul 22 16:58:19 2020 +0200 media: atomisp: coding style: correct multiline comments This fixes some coding style issues of multiline comments to correct a few checkpatch.pl warnings. Signed-off-by: Rahul Gottipati Signed-off-by: Mauro Carvalho Chehab commit 501e69b028a47e20cb0d842e267fc5aa5e5230aa Merge: 83bf6db020248 ef4d0a80c6140 Author: Tony Lindgren Date: Thu Sep 3 11:50:37 2020 +0300 Merge branch 'omap-for-v5.10/omap1' into omap-for-v5.10/soc commit 1b24a57232626c2fcbbb3d8e736a7904a5594a5a Author: Rahul Gottipati Date: Wed Jul 22 16:55:28 2020 +0200 media: atomisp: coding style: remove beginning whitespaces This removes whitespaces at the beginning of a few lines to fix some checkpatch.pl warnings. Signed-off-by: Rahul Gottipati Signed-off-by: Mauro Carvalho Chehab commit 71ac680e6339e744d87647a1ca27b2e87dba2eac Author: Peter Chen Date: Thu Nov 1 14:47:20 2018 +0800 usb: chipidea: ci_hdrc_imx: restore pinctrl The pinctrl setting may lost during the system suspend (eg, imx7ulp), it needs to restore them after system resume. Meanwhile, some platforms may need to set special pinctrl for power comsumption. Signed-off-by: Peter Chen commit 6e0bf0e0e55000742a53c5f3b58f8669e0091a11 Author: Kees Cook Date: Tue Sep 1 19:53:47 2020 -0700 x86/boot/compressed: Warn on orphan section placement We don't want to depend on the linker's orphan section placement heuristics as these can vary between linkers, and may change between versions. All sections need to be explicitly handled in the linker script. Now that all sections are explicitly handled, enable orphan section warnings. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20200902025347.2504702-6-keescook@chromium.org commit 83109d5d5fba7abf362f5a443c9f4c4ea10bbc8d Author: Kees Cook Date: Tue Sep 1 19:53:46 2020 -0700 x86/build: Warn on orphan section placement We don't want to depend on the linker's orphan section placement heuristics as these can vary between linkers, and may change between versions. All sections need to be explicitly handled in the linker script. Now that all sections are explicitly handled, enable orphan section warnings. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20200902025347.2504702-5-keescook@chromium.org commit 4409d2f8dfe7d5088567d4ba00133f876ee586c7 Author: Kees Cook Date: Tue Sep 1 19:53:45 2020 -0700 arm/boot: Warn on orphan section placement We don't want to depend on the linker's orphan section placement heuristics as these can vary between linkers, and may change between versions. All sections need to be explicitly handled in the linker script. With all sections now handled, enable orphan section warning. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20200902025347.2504702-4-keescook@chromium.org commit 5a17850e251a55bba6d65aefbfeacfa9888cd2cd Author: Kees Cook Date: Tue Sep 1 19:53:44 2020 -0700 arm/build: Warn on orphan section placement We don't want to depend on the linker's orphan section placement heuristics as these can vary between linkers, and may change between versions. All sections need to be explicitly handled in the linker script. Specifically, this would have made a recently fixed bug very obvious: ld: warning: orphan section `.fixup' from `arch/arm/lib/copy_from_user.o' being placed in section `.fixup' With all sections handled, enable orphan section warning. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20200902025347.2504702-3-keescook@chromium.org commit b3e5d80d0c48c0cc7bce56473672f4e6e1210910 Author: Kees Cook Date: Tue Sep 1 19:53:43 2020 -0700 arm64/build: Warn on orphan section placement We don't want to depend on the linker's orphan section placement heuristics as these can vary between linkers, and may change between versions. All sections need to be explicitly handled in the linker script. With all sections now handled, enable orphan section warnings. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Acked-by: Will Deacon Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20200902025347.2504702-2-keescook@chromium.org commit 78e7a522693b5f5b1c8b8a7b8bd066e4dddb3d3c Author: Lad Prabhakar Date: Thu Sep 3 08:38:13 2020 +0100 dt-bindings: renesas,rcar-dmac: Document r8a7742 support Renesas RZ/G SoC also have the R-Car gen2/3 compatible DMA controllers. Document RZ/G1H (also known as R8A7742) SoC bindings. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200903073813.4490-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit af07fabdd2869ee67ecf42264b3341ede0f49b63 Author: Jinyang He Date: Fri Aug 28 09:53:03 2020 +0800 MIPS: p5600: Discard UCA config selection Commit 2a5984360b01 ("MIPS: Drop CPU_SUPPORTS_UNCACHED_ACCELERATED") removed UCA config, but left the selection unused, delete it. Signed-off-by: Jinyang He Signed-off-by: Thomas Bogendoerfer commit f0100c7f1aac7f10eb249c494de5016fcf8c0652 Author: Davidlohr Bueso Date: Mon Aug 31 13:14:02 2020 -0700 MIPS: Use rcu to lookup a task in mipsmt_sys_sched_setaffinity() The call simply looks up the corresponding task (without iterating the tasklist), which is safe under rcu instead of the tasklist_lock. In addition, the setaffinity counter part already does this. Signed-off-by: Davidlohr Bueso Signed-off-by: Thomas Bogendoerfer commit a510b616131f85215ba156ed67e5ed1c0701f80f Author: Paul Cercueil Date: Tue Sep 1 16:26:51 2020 +0200 MIPS: Add support for ZSTD-compressed kernels Add support for self-extracting kernels with a ZSTD compression. Tested on a kernel for the GCW-Zero, it allows to reduce the size of the kernel file from 4.1 MiB with gzip to 3.5 MiB with ZSTD, and boots just as fast. Compressed kernels are now also compiled with -D__DISABLE_EXPORTS in order to disable the EXPORT_SYMBOL() macros inside of lib/zstd/decompress.c. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 1c4dd334df3a0627ff57b35612057e2b497e373b Author: Paul Cercueil Date: Tue Sep 1 16:26:50 2020 +0200 lib: decompress_unzstd: Limit output size The zstd decompression code, as it is right now, will most likely fail on 32-bit systems, as the default output buffer size causes the buffer's end address to overflow. Address this issue by setting a sane default to the default output size, with a value that won't overflow the buffer's end address. Signed-off-by: Paul Cercueil Reviewed-by: Nick Terrell Signed-off-by: Thomas Bogendoerfer commit cd6228b782ae16566abb94022660568cbb0be76a Author: Alexandre Belloni Date: Mon Aug 31 19:11:25 2020 +0200 ARM: dts: at91: fix sram nodes The ranges, #address-cells and #size-cells properties are mandatory, add them to the sram nodes. Signed-off-by: Alexandre Belloni Reviewed-by: Nicolas Ferre Link: https://lore.kernel.org/r/20200831171129.3886857-4-alexandre.belloni@bootlin.com commit 58f984941d4524018ac0634c1e101bc6bbd4d257 Author: Alexandre Belloni Date: Mon Aug 31 19:11:23 2020 +0200 ARM: dts: at91: fix cpu node The reg property is mandatory for cpu nodes, also fix the #address-cells of the cpus node that has to be at least 1. Signed-off-by: Alexandre Belloni Reviewed-by: Nicolas Ferre Link: https://lore.kernel.org/r/20200831171129.3886857-2-alexandre.belloni@bootlin.com commit b248b9dd5975c1e16b7918c1dc7eaef7eccfde5f Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:33 2020 -0500 ALSA: vx: vx_pcm: remove redundant assignment Fix cppcheck warning: sound/drivers/vx/vx_pcm.c:63:7: style: Variable 'buf' is assigned a value that is never used. [unreadVariable] buf = (unsigned char *)runtime->dma_area; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit e408ab068aeca958b83bb6e5ca724356f8c7d78e Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:32 2020 -0500 ALSA: vx: vx_pcm: remove redundant assignment Fix cppcheck warning: sound/drivers/vx/vx_pcm.c:539:30: style: Variable 'chip->playback_pipes[audio]' is reassigned a value before the old one has been used. [redundantAssignment] chip->playback_pipes[audio] = pipe; ^ sound/drivers/vx/vx_pcm.c:533:31: note: chip->playback_pipes[audio] is assigned chip->playback_pipes[audio] = pipe; ^ sound/drivers/vx/vx_pcm.c:539:30: note: chip->playback_pipes[audio] is overwritten chip->playback_pipes[audio] = pipe; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit b7dcd6ac0225aa3bc4c78fc5f13610789c9a7f15 Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:31 2020 -0500 ALSA: vx: vx_core: clarify operator precedence Fix cppcheck warning sound/drivers/vx/vx_core.c:600:49: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] chip->chip_status & VX_STAT_XILINX_LOADED ? "Loaded" : "No"); ^ sound/drivers/vx/vx_core.c:602:47: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] chip->chip_status & VX_STAT_DEVICE_INIT ? "Yes" : "No"); ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 93fcef86caafba893f2e13782f4c58b386eab311 Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:30 2020 -0500 ALSA: rawmidi: (cosmetic) align function parameters fix cppcheck: sound/core/rawmidi.c:1711:49: style:inconclusive: Function 'snd_rawmidi_free' argument 1 names different: declaration 'rawmidi' definition 'rmidi'. [funcArgNamesDifferent] Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit a971b42cbf8c0dd553ac0ca7fe82f4b8e9cad088 Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:29 2020 -0500 ALSA: atmel: ac97: clarify operator precedence Fix cppcheck warnings: sound/atmel/ac97c.c:478:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] casr & AC97C_CSR_OVRUN ? " OVRUN" : "", ^ sound/atmel/ac97c.c:479:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] casr & AC97C_CSR_RXRDY ? " RXRDY" : "", ^ sound/atmel/ac97c.c:480:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] casr & AC97C_CSR_UNRUN ? " UNRUN" : "", ^ sound/atmel/ac97c.c:481:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] casr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "", ^ sound/atmel/ac97c.c:482:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] casr & AC97C_CSR_TXRDY ? " TXRDY" : "", ^ sound/atmel/ac97c.c:524:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] cosr & AC97C_CSR_OVRUN ? " OVRUN" : "", ^ sound/atmel/ac97c.c:525:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] cosr & AC97C_CSR_RXRDY ? " RXRDY" : "", ^ sound/atmel/ac97c.c:526:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] cosr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "", ^ sound/atmel/ac97c.c:527:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] cosr & AC97C_CSR_TXRDY ? " TXRDY" : "", ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 2d7a5c6c69029ae7e386cb3a04086a1e0b61cb8f Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:28 2020 -0500 ALSA: ac97: (cosmetic) align argument names Fix cppcheck warning: sound/ac97/bus.c:133:60: style:inconclusive: Function 'snd_ac97_bus_scan_one' argument 1 names different: declaration 'ac97' definition 'adrv'. [funcArgNamesDifferent] Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 04d0b5e3b1ba4aca95534767e47d140be1d6643f Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:27 2020 -0500 ALSA: usb: scarless_gen2: fix endianness issue Fix Sparse warning: sound/usb/mixer_scarlett_gen2.c:1949:24: warning: cast to restricted __le32 Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 74610eaf310ab9b9b00a015adb54afcae038bc06 Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:26 2020 -0500 ALSA: hda: (cosmetic) align function parameters Fix cppcheck warnings and use same names in headers and C code. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit e9bd25885c7f799134534989b9f13c3db5ce6a16 Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:25 2020 -0500 ALSA: hda: auto_parser: remove shadowed variable declaration Fix cppcheck warning: sound/pci/hda/hda_auto_parser.c:353:7: style: Local variable 'i' shadows outer variable [shadowVariable] int i = 0; ^ sound/pci/hda/hda_auto_parser.c:182:6: note: Shadowed declaration int i; ^ sound/pci/hda/hda_auto_parser.c:353:7: note: Shadow variable int i = 0; ^ It's not clear why a new declaration was added, remove and reuse variable declared with larger scope. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 5656a7a06f0d5d90025f05c59424eb03d66e0039 Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:24 2020 -0500 ALSA: aoa: i2sbus: use DECLARE_COMPLETION_ONSTACK() macro Follow recommendation in Documentation/scheduler/completion.rst and use macro to declare local 'struct completion' Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit bec206db9db59cbc14993583288e7489e8ab02b1 Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:23 2020 -0500 ALSA: core: init: use DECLARE_COMPLETION_ONSTACK() macro Follow recommendation in Documentation/scheduler/completion.rst and use macro to declare local 'struct completion' Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 9725ce3949a7b3eebf003cb69fa0d7d821179233 Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:22 2020 -0500 ALSA: compress_offload: remove redundant initialization Fix cppcheck warning: sound/core/compress_offload.c:1044:6: style: Redundant initialization for 'ret'. The initialized value is overwritten before it is read. [redundantInitialization] ret = snd_register_device(SNDRV_DEVICE_TYPE_COMPRESS, ^ sound/core/compress_offload.c:1034:10: note: ret is initialized int ret = -EINVAL; ^ sound/core/compress_offload.c:1044:6: note: ret is overwritten ret = snd_register_device(SNDRV_DEVICE_TYPE_COMPRESS, ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Vinod Koul Link: https://lore.kernel.org/r/20200902212133.30964-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit cd91fd9f0af5453e66bda9984916ca67686689cf Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:21 2020 -0500 ALSA: compress_offload: dereference after checking for NULL pointer Fix cppcheck warning and only dereference once the initial checks are done: sound/core/compress_offload.c:516:38: warning: Either the condition '!stream' is redundant or there is possible null pointer dereference: stream. [nullPointerRedundantCheck] struct snd_compr_runtime *runtime = stream->runtime; ^ sound/core/compress_offload.c:518:17: note: Assuming that condition '!stream' is not redundant if (snd_BUG_ON(!(stream) || !(stream)->runtime)) ^ sound/core/compress_offload.c:516:38: note: Null pointer dereference struct snd_compr_runtime *runtime = stream->runtime; ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Vinod Koul Link: https://lore.kernel.org/r/20200902212133.30964-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 3bcf8eeb7d979402d3db96fb58bed456a3c66668 Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:20 2020 -0500 ALSA: core: timer: clarify operator precedence fix cppcheck warning: sound/core/timer.c:1286:9: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] ? "running" : "stopped"); ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 63632563c0dfe036215dcba222a0f899d35f7be6 Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:19 2020 -0500 ALSA: core: timer: remove redundant assignment Cppcheck complains about a possible NULL pointer dereference but it actually looks like the NULL assignment is not needed (same loop is used in other parts of the file without it). Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit b658cbabf8e3e41816f43820f2b03f498e5556d2 Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:18 2020 -0500 ALSA: core: pcm_memory: dereference pointer after NULL checks Fix cppcheck warnings: sound/core/pcm_memory.c:380:26: warning: Either the condition '!substream' is redundant or there is possible null pointer dereference: substream. [nullPointerRedundantCheck] struct snd_card *card = substream->pcm->card; ^ sound/core/pcm_memory.c:384:6: note: Assuming that condition '!substream' is not redundant if (PCM_RUNTIME_CHECK(substream)) ^ sound/core/pcm_memory.c:380:26: note: Null pointer dereference struct snd_card *card = substream->pcm->card; ^ sound/core/pcm_memory.c:433:26: warning: Either the condition '!substream' is redundant or there is possible null pointer dereference: substream. [nullPointerRedundantCheck] struct snd_card *card = substream->pcm->card; ^ sound/core/pcm_memory.c:436:6: note: Assuming that condition '!substream' is not redundant if (PCM_RUNTIME_CHECK(substream)) ^ sound/core/pcm_memory.c:433:26: note: Null pointer dereference struct snd_card *card = substream->pcm->card; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit b1c14124507b86ab554be75ed5fcb2e50bb33c6c Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:17 2020 -0500 ALSA: core: memalloc: fix fallthrough position Fix cppcheck, the fallthrough only makes sense within the conditional block sound/core/memalloc.c:161:3: style:inconclusive: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] fallthrough; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 931522b90813a6f1c9c673ec9a0eb985b39554dc Author: Pierre-Louis Bossart Date: Wed Sep 2 16:21:16 2020 -0500 ALSA: core: pcm: simplify locking for timers Fix sparse warning: sound/core/pcm.c:999:9: warning: context imbalance in 'snd_pcm_detach_substream' - different lock contexts for basic block There's no real reason to test the same thing twice, and it's simpler have linear sequences. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902212133.30964-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit ff18de55a62f0e8f0dcf11bfa7f69b23e6e951b0 Author: Dave Jiang Date: Fri Aug 28 15:13:55 2020 -0700 dmaengine: idxd: add command status to idxd sysfs attribute Export admin command status to sysfs attribute in order to allow user to retrieve configuration error. Allows user tooling to retrieve the command error and provide more user friendly error messages. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/159865278770.29455.8026892329182750127.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit e7184b159dd37f4be8ff3d070c7c11f76b5bc3fe Author: Dave Jiang Date: Fri Aug 28 15:12:50 2020 -0700 dmaengine: idxd: add support for configurable max wq batch size Add sysfs attribute max_batch_size to wq in order to allow the max batch size configured on a per wq basis. Add support code to configure the valid user input on wq enable. This is a performance tuning parameter. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/159865273617.29141.4383066301730821749.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit d7aad5550eca50370e3a1471b46281d03af0699e Author: Dave Jiang Date: Fri Aug 28 15:12:10 2020 -0700 dmaengine: idxd: add support for configurable max wq xfer size Add sysfs attribute max_xfer_size to wq in order to allow the max xfer size configured on a per wq basis. Add support code to configure the valid user input on wq enable. This is a performance tuning parameter. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/159865265404.29141.3049399618578194052.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit b0ef489e2a9cfcb64e4a20f308023afaea9db8d3 Author: Krzysztof Kozlowski Date: Fri Aug 28 17:26:37 2020 +0200 dmaengine: xilinx: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200828152637.16903-3-krzk@kernel.org Signed-off-by: Vinod Koul commit 1c966e1d948ba1abf646966ff5f0e57634ae70b7 Author: Krzysztof Kozlowski Date: Fri Aug 28 17:26:36 2020 +0200 dmaengine: stm32: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200828152637.16903-2-krzk@kernel.org Signed-off-by: Vinod Koul commit af53bef5636d92e81279f4a16f814f8dccf9bf89 Author: Krzysztof Kozlowski Date: Fri Aug 28 17:26:35 2020 +0200 dmaengine: pl330: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200828152637.16903-1-krzk@kernel.org Signed-off-by: Vinod Koul commit 5d7e816e444569c9fdd901ecf0e3933a6ed9a501 Author: Andy Shevchenko Date: Fri Aug 28 17:45:19 2020 +0300 dmaengine: Save few bytes and increase readability of dma_request_chan() Split IS_ERR_OR_NULL() check followed by additional conditional to two simple conditionals. This increases readability and saves memory: Function old new delta dma_request_chan 700 697 -3 Total: Before=10224, After=10221, chg -0.03% Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200828144519.14483-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 7547dbd3b198f309aaff54e3528898a8a196faff Author: Peter Ujfalusi Date: Fri Aug 28 14:05:07 2020 +0300 dmaengine: Mark dma_request_slave_channel() deprecated New drivers should use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a simple wrapper for dma_request_chan() eating up the error code for channel request failure and makes deferred probing impossible. Move the dma_request_slave_channel() into the header as inline function, mark it as deprecated. Signed-off-by: Peter Ujfalusi Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200828110507.22407-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 7de3f326dd24b5e2d514f9cf99968a20d13cf39f Author: Stephen Kitt Date: Sun Aug 9 19:24:44 2020 +0200 ARM: davinci: use simple i2c probe function The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Acked-by: Wolfram Sang Reviewed-by: Bartosz Golaszewski Reviewed-by: Luca Ceresoli Signed-off-by: Stephen Kitt Signed-off-by: Sekhar Nori commit 5706d14d2a9472aae6d6e3023a9f37b1eee718ea Author: Greg Kurz Date: Mon Aug 10 12:08:05 2020 +0200 KVM: PPC: Book3S HV: XICS: Replace the 'destroy' method by a 'release' method Similarly to what was done with XICS-on-XIVE and XIVE native KVM devices with commit 5422e95103cf ("KVM: PPC: Book3S HV: XIVE: Replace the 'destroy' method by a 'release' method"), convert the historical XICS KVM device to implement the 'release' method. This is needed to run nested guests with an in-kernel IRQ chip. A typical POWER9 guest can select XICS or XIVE during boot, which requires to be able to destroy and to re-create the KVM device. Only the historical XICS KVM device is available under pseries at the current time and it still uses the legacy 'destroy' method. Switching to 'release' means that vCPUs might still be running when the device is destroyed. In order to avoid potential use-after-free, the kvmppc_xics structure is allocated on first usage and kept around until the VM exits. The same pointer is used each time a KVM XICS device is being created, but this is okay since we only have one per VM. Clear the ICP of each vCPU with vcpu->mutex held. This ensures that the next time the vCPU resumes execution, it won't be going into the XICS code anymore. Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater Tested-by: Cédric Le Goater Signed-off-by: Paul Mackerras commit 8c6572356646f700e1679d8f7eb2ab3a4eab678c Author: John Pittman Date: Wed Sep 2 17:14:34 2020 -0400 scsi: scsi_debug: Make sdebug_build_parts() respect virtual_gb If virtual_gb is passed while using num_parts, when creating the partitions, virtual_gb is not respected. Set num_sectors using get_sdebug_capacity() to pull virtual_gb if set. Link: https://lore.kernel.org/r/20200902211434.9979-3-jpittman@redhat.com Acked-by: Douglas Gilbert Signed-off-by: John Pittman Signed-off-by: Martin K. Petersen commit 979e0dc3457cc95e48920ff5ca901a5821ef57d8 Author: John Pittman Date: Wed Sep 2 17:14:33 2020 -0400 scsi: scsi_debug: Adjust num_parts to create equally sized partitions Currently when using the num_parts parameter, partitions are aligned and the end sector is one prior to the next start. This creates different sized partitions. Create instead equally sized partitions by trimming the end of each partition to the size of the smallest partition. This aligns better with what one would expect from automatically created partitions and can be helpful with testing things such as raid which often expect legs of the same size. Minimal space is lost as the initial partition starting size is calculated by dividing num_sectors by sdebug_num_parts. Link: https://lore.kernel.org/r/20200902211434.9979-2-jpittman@redhat.com Acked-by: Douglas Gilbert Signed-off-by: John Pittman Signed-off-by: Martin K. Petersen commit 5d929371b71b05a85d07dbc3333be7d129be6338 Author: Nilesh Javali Date: Wed Sep 2 00:34:30 2020 -0700 scsi: MAINTAINERS: Update Marvell owned driver maintainers Update Marvell owned driver maintainers and add Marvell Upstream email alias to the maintainers list. Link: https://lore.kernel.org/r/20200902073430.11787-1-njavali@marvell.com Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 26f84f9bc3ba04dd415a93e4ca16eda896cf94ea Author: Luo Jiaxing Date: Tue Sep 1 19:13:10 2020 +0800 scsi: hisi_sas: Code style cleanup Remove extra blank lines and add spaces around operators. Link: https://lore.kernel.org/r/1598958790-232272-9-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit b601577df68af896e563ca62ca07d8681912eabc Author: Xiang Chen Date: Tue Sep 1 19:13:09 2020 +0800 scsi: hisi_sas: Add missing newlines Newline is missing from some printk() statements. Add them. Link: https://lore.kernel.org/r/1598958790-232272-8-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 981cc23e741a641ca92c37c7a3df180ced702118 Author: Luo Jiaxing Date: Tue Sep 1 19:13:08 2020 +0800 scsi: hisi_sas: Add BIST support for fixed code pattern Through the new debugfs interface the user can select fixed code patterns. Add two new interfaces fixed_code and fixed_code1. Link: https://lore.kernel.org/r/1598958790-232272-7-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 2c4d582322ff412f83f5c538e33c9440a30db73d Author: Luo Jiaxing Date: Tue Sep 1 19:13:07 2020 +0800 scsi: hisi_sas: Add BIST support for phy FFE Add BIST support for phy FFE (Feed forward equalizer) setting. The user can configure FFE through the new debugfs interface. FFE is a parameter used for link layer control. It will affect the link quality between the SAS controller and the backplane. In the BIST test, the FFE interface is provided to assist board testers in optimizing link parameters. The modification of the FFE parameter will affect the test after BIST or the normal running of the board. The user should save the initial FFE values and restore them after BIST test is complete. Link: https://lore.kernel.org/r/1598958790-232272-6-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit ca06f2cd01d08fe01b155ee774a2c6518b03b275 Author: Luo Jiaxing Date: Tue Sep 1 19:13:06 2020 +0800 scsi: hisi_sas: Make phy index variable name consistent We use "phy_id" to identify phy in the BIST code but the rest of code always uses "phy_no". Change it for consistency. Link: https://lore.kernel.org/r/1598958790-232272-5-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit caeddc0453b9215669a39ea335f1af1f3f91cc99 Author: Luo Jiaxing Date: Tue Sep 1 19:13:05 2020 +0800 scsi: hisi_sas: Do not modify upper fields of PROG_PHY_LINK_RATE reg When updating PROG_PHY_LINK_RATE to set linkrate for a phy we used a hard-coded initial value instead of getting the current value from the register. The assumption was that this register would not be modified, but in fact it was partially modified in a new version of hardware. The hard-coded value we used changed the default value of the register to a an incorrect setting and as a result the SAS controller could not change linkrate for the phy. Delete hard-coded value and always read the latest value of register before updating it. Link: https://lore.kernel.org/r/1598958790-232272-4-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 4b3a1f1feda62b0b15536548b6d31ca549de2e3a Author: Luo Jiaxing Date: Tue Sep 1 19:13:04 2020 +0800 scsi: hisi_sas: Modify macro name for OOB phy linkrate The macro for OOB phy linkrate is named CFG_PROG_PHY_LINK_RATE_* but that is inaccurate. For clarification, include OOB in macro name. Link: https://lore.kernel.org/r/1598958790-232272-3-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 847e8355294597898ed3b6c2a3130ab962d03004 Author: Xiang Chen Date: Tue Sep 1 19:13:03 2020 +0800 scsi: hisi_sas: Avoid accessing to SSP task for SMP I/Os hisi_sas_slot_task_free() attempts to dereference SSP task for non-ATA tasks. If the task is SMP, the code may reference the wrong structure although this may not cause any problems. To avoid this, only access to SSP task when slot->n_elem_dif is not 0 which indicates this is an SSP task. Link: https://lore.kernel.org/r/1598958790-232272-2-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 2a5c98d2d2fe2aeaf95274a48fc9d92b5955dc74 Author: James Smart Date: Mon Aug 31 14:35:18 2020 -0700 scsi: fc: Add 256GBit speed setting to SCSI FC transport Add 256GBit speed setting to the SCSI FC transport. This speed can be reached via FC trunking techniques. Link: https://lore.kernel.org/r/20200831213518.48409-1-james.smart@broadcom.com Reviewed-by: Himanshu Madhani Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 16d7fd9079af2a5104c445fe0e5d5ed8d403e2f2 Author: Jason Yan Date: Mon Aug 31 16:11:26 2020 +0800 scsi: fnic: Remove set but not used 'eth_hdrs_stripped' This addresses the following gcc warning with "make W=1": drivers/scsi/fnic/fnic_fcs.c: In function ‘fnic_rq_cmpl_frame_recv’: drivers/scsi/fnic/fnic_fcs.c:840:15: warning: variable ‘eth_hdrs_stripped’ set but not used [-Wunused-but-set-variable] 840 | unsigned int eth_hdrs_stripped; | ^~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200831081126.3251288-5-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 446034e3d419a069348007bc84364cef017a442a Author: Jason Yan Date: Mon Aug 31 16:11:25 2020 +0800 scsi: fnic: Remove set but not used 'fr_len' This addresses the following gcc warning with "make W=1": drivers/scsi/fnic/fnic_fcs.c: In function ‘fnic_fcoe_send_vlan_req’: drivers/scsi/fnic/fnic_fcs.c:379:6: warning: variable ‘fr_len’ set but not used [-Wunused-but-set-variable] 379 | int fr_len; | ^~~~~~ Link: https://lore.kernel.org/r/20200831081126.3251288-4-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 6c53316d48989f95986d3fa78c38b8ca90905bbb Author: Jason Yan Date: Mon Aug 31 16:11:24 2020 +0800 scsi: fnic: Remove set but not used variable in is_fnic_fip_flogi_reject() This addresses the following gcc warning with "make W=1": drivers/scsi/fnic/fnic_fcs.c: In function ‘is_fnic_fip_flogi_reject’: drivers/scsi/fnic/fnic_fcs.c:317:9: warning: variable ‘els_len’ set but not used [-Wunused-but-set-variable] 317 | size_t els_len = 0; | ^~~~~~~ drivers/scsi/fnic/fnic_fcs.c:312:21: warning: variable ‘els_dtype’ set but not used [-Wunused-but-set-variable] 312 | enum fip_desc_type els_dtype = 0; | ^~~~~~~~~ Link: https://lore.kernel.org/r/20200831081126.3251288-3-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit c65b4f37db46c1b2e213d1c7f4baadf998f50fff Author: Jason Yan Date: Mon Aug 31 16:11:23 2020 +0800 scsi: fnic: Remove set but not used 'old_vlan' This addresses the following gcc warning with "make W=1": drivers/scsi/fnic/fnic_main.c: In function ‘fnic_set_vlan’: drivers/scsi/fnic/fnic_main.c:555:6: warning: variable ‘old_vlan’ set but not used [-Wunused-but-set-variable] 555 | u16 old_vlan; | ^~~~~~~~ Link: https://lore.kernel.org/r/20200831081126.3251288-2-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 255937d7739068e6a6649783ebb7bd9fe284a2b4 Author: Sergey Shtylyov Date: Sat Aug 29 23:19:42 2020 +0300 scsi: fdomain_isa: Merge branches in fdomain_isa_match() The *else* branch of the *if* (base) statement in fdomain_isa_match() is immediately followed by the *if* (!base) statement. Simplify the code by removing the unneeded *if*. Link: https://lore.kernel.org/r/df68e341-5113-4cf2-b64c-dc1ad0b686ac@omprussia.ru Signed-off-by: Sergey Shtylyov Signed-off-by: Martin K. Petersen commit e5f48ac42cc99e339fcb5392b698b4093001b859 Author: Xianting Tian Date: Sat Aug 29 15:57:46 2020 +0800 scsi: qla2xxx: Fix the return value A negative error code should be returned. Link: https://lore.kernel.org/r/20200829075746.19166-1-tian.xianting@h3c.com Acked-by: Nilesh Javali Signed-off-by: Xianting Tian Signed-off-by: Martin K. Petersen commit a08a07326510eca91c414f4cddfcecbbeda50fe0 Author: Joe Perches Date: Mon Aug 24 21:56:17 2020 -0700 scsi: arm: Avoid comma separated statements Use semicolons and braces. Link: https://lore.kernel.org/r/be30bb0f24a5fb4f70ca8ed7027ca7555816a3fb.1598331149.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Martin K. Petersen commit 2355b66ed20ce442603aadc05b150db7282d8acf Author: Can Guo Date: Mon Aug 24 19:07:06 2020 -0700 scsi: ufs: Handle LINERESET indication in err handler PA Layer issues a LINERESET to the PHY at the recovery step in the Power Mode change operation. If it happens during auto or manual hibern8 enter, even if hibern8 enter succeeds, UFS power mode shall be set to PWM-G1 mode and kept in that mode after exit from hibern8, leading to bad performance. Handle the LINERESET in the eh_work by restoring power mode to HS mode after all pending reqs and tasks are cleared from doorbell. Link: https://lore.kernel.org/r/1598321228-21093-3-git-send-email-cang@codeaurora.org Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 307348f6ab144bbb625214f46bc88e810591ae65 Author: Can Guo Date: Mon Aug 24 19:07:05 2020 -0700 scsi: ufs: Abort tasks before clearing them from doorbell To recover non-fatal errors, no full reset is required, err_handler only clears those pending TRs/TMRs so that SCSI layer can re-issue them. In current err_handler, TRs are directly cleared from UFS host's doorbell but not aborted from device side. However, according to the UFSHCI JEDEC spec, the host software shall use UTP Transfer Request List Clear Register to clear a task from UFS host's doorbell only when a UTP Transfer Request is expected to not be completed, e.g. when the host software receives a “FUNCTION COMPLETE” Task Management response which means a Transfer Request was aborted. To follow the UFSHCI JEDEC spec, in err_handler, abort one TR before clearing it from doorbell. Link: https://lore.kernel.org/r/1598321228-21093-2-git-send-email-cang@codeaurora.org Acked-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 2a71268160b43638e9a6a553b71bc9be1ee7d9c1 Author: Don Brace Date: Fri Aug 28 16:09:22 2020 -0500 scsi: smartpqi: Update copyright Update driver copyright. Link: https://lore.kernel.org/r/159864896224.13630.9798419111015060967.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 5f59128c83fc0efaf8b6c766d87edd831f732840 Author: Don Brace Date: Fri Aug 28 16:09:15 2020 -0500 scsi: smartpqi: Update documentation Change Microsemi references to Microchip. Link: https://lore.kernel.org/r/159864895592.13630.18113151805817361168.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 0051a150c32f91614419bb47f5c1fca6d5960e67 Author: Don Brace Date: Fri Aug 28 15:05:08 2020 -0500 scsi: MAINTAINERS: Update smartpqi and hpsa Change M entry e-mail to microchip. Change L entry e-mail for storagedev to microchip. Link: https://lore.kernel.org/r/159864510818.12656.822985017436862534.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 9e21760e4ce442b5f17e98cb9e6182d1d147a9d2 Author: Don Brace Date: Fri Aug 28 14:07:42 2020 -0500 scsi: hpsa: Update copyright Add entry for Microchip. Link: https://lore.kernel.org/r/159864166227.12131.3427629298809272795.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 22b330b622e3f5cda7b8271f2c26db877b532ed9 Merge: d3dfc362e073e 2aaa05a1585f5 Author: David S. Miller Date: Wed Sep 2 15:47:01 2020 -0700 Merge branch 'ionic-struct-cleanups' Shannon Nelson says: ==================== ionic: struct cleanups This patchset has a few changes for better cacheline use, to cleanup a page handling API, and to streamline the Adminq/Notifyq queue handling. Lastly, we also have a couple of fixes pointed out by the friendly kernel test robot. v2: dropped change to irq coalesce default fixed Neel's attributions to Co-developed-by dropped the unnecessary new call to dma_sync_single_for_cpu() added 2 patches from kernel test robot results ==================== Signed-off-by: David S. Miller commit 2aaa05a1585f5a0b7d81f8261824872bd96377cb Author: Shannon Nelson Date: Tue Sep 1 11:20:24 2020 -0700 ionic: clarify boolean precedence Add parenthesis to clarify a boolean usage. Pointed out in https://lore.kernel.org/lkml/202008060413.VgrMuqLJ%25lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 5b1d8e81a2166bec8970a1c4f1bc0761866ba83d Author: Shannon Nelson Date: Tue Sep 1 11:20:23 2020 -0700 ionic: remove unused variable Remove a vestigial variable. Pointed out in https://lore.kernel.org/lkml/20200806143735.GA9232@xsang-OptiPlex-9020/ Reported-by: kernel test robot Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit b4280948aa22abfe175b70bff34071a9ddc0f7f9 Author: Shannon Nelson Date: Tue Sep 1 11:20:22 2020 -0700 ionic: clean adminq service routine The only thing calling ionic_napi any more is the adminq processing, so combine and simplify. Co-developed-by: Neel Patel Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 339dcf7fe33f64c705cde6c5af5e47797274ae40 Author: Shannon Nelson Date: Tue Sep 1 11:20:21 2020 -0700 ionic: clean up desc_info and cq_info structs Remove some unnecessary struct fields and related code. Co-developed-by: Neel Patel Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 0c1d175b72e347cfb44d9ca5171e0e0423306729 Author: Shannon Nelson Date: Tue Sep 1 11:20:20 2020 -0700 ionic: struct reorder for faster access Move a few active struct fields to the front of the struct for a little better cache use and performance. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 63cd9083b171cf78d56a9642c7a04272876123f5 Author: Shannon Nelson Date: Tue Sep 1 11:20:19 2020 -0700 ionic: clean up page handling code The internal page handling can be cleaned up by passing our local page struct rather than dma addresses, and by putting more of the mgmt code into the alloc and free routines. Co-developed-by: Neel Patel Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 83cf5c68d663fc78ce529c41bf24f9f6be88bef4 Author: Magnus Karlsson Date: Wed Sep 2 09:36:04 2020 +0200 xsk: Fix use-after-free in failed shared_umem bind Fix use-after-free when a shared umem bind fails. The code incorrectly tried to free the allocated buffer pool both in the bind code and then later also when the socket was released. Fix this by setting the buffer pool pointer to NULL after the bind code has freed the pool, so that the socket release code will not try to free the pool. This is the same solution as the regular, non-shared umem code path has. This was missing from the shared umem path. Fixes: b5aea28dca13 ("xsk: Add shared umem support between queue ids") Reported-by: syzbot+5334f62e4d22804e646a@syzkaller.appspotmail.com Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1599032164-25684-1-git-send-email-magnus.karlsson@intel.com commit d3dfc362e073e8caf74dafaa5c33135e93d8e617 Merge: c6f4c2b027c47 7e1301ed18814 Author: David S. Miller Date: Wed Sep 2 14:13:35 2020 -0700 Merge branch 'RTL8366-stabilization' Linus Walleij says: ==================== RTL8366 stabilization This stabilizes the RTL8366 driver by checking validity of the passed VLANs and refactoring the member config (MC) code so we do not require strict call order and de-duplicate some code. Changes from v1: incorporate review comments on patch 2. Changes from v2: a oneline bug fix in patch 2. ==================== Signed-off-by: David S. Miller commit 7e1301ed1881447d2a25f9c6423738c33cbca133 Author: Linus Walleij Date: Wed Sep 2 00:09:35 2020 +0200 net: dsa: rtl8366: Refactor VLAN/PVID init The VLANs and PVIDs on the RTL8366 utilizes a "member configuration" (MC) which is largely unexplained in the code. This set-up requires a special ordering: rtl8366_set_pvid() must be called first, followed by rtl8366_set_vlan(), else the MC will not be properly allocated. Relax this by factoring out the code obtaining an MC and reuse the helper in both rtl8366_set_pvid() and rtl8366_set_vlan() so we remove this strict ordering requirement. In the process, add some better comments and debug prints so people who read the code understand what is going on. Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: David S. Miller commit 6641a2c42b0a307b7638d10e5d4b90debc61389d Author: Linus Walleij Date: Wed Sep 2 00:09:34 2020 +0200 net: dsa: rtl8366: Check validity of passed VLANs The rtl8366_set_vlan() and rtl8366_set_pvid() get invalid VLANs tossed at it, especially VLAN0, something the hardware and driver cannot handle. Check validity and bail out like we do in the other callbacks. Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: David S. Miller commit c6f4c2b027c471838f44de03ef8c4100e4986852 Author: Davide Caratti Date: Wed Sep 2 13:44:24 2020 +0200 selftests: mptcp: fix typo in mptcp_connect usage in mptcp_connect, 's' selects IPPROTO_MPTCP / IPPROTO_TCP as the value of 'protocol' in socket(), and 'm' switches between different send / receive modes. Fix die_usage(): swap 'm' and 's' and add missing 'sendfile' mode. Signed-off-by: Davide Caratti Reviewed-by: Matthieu Baerts Signed-off-by: David S. Miller commit cd972fe90008adf49de0790250c1275480ac5cdc Author: Jonathan Bakker Date: Tue Sep 1 17:38:58 2020 -0700 ARM: dts: s5pv210: Enable audio on Aries boards Both the Galaxy S and the Fascinate4G have a WM8994 codec, but they differ slightly in their jack detection and micbias configuration. Signed-off-by: Jonathan Bakker Signed-off-by: Krzysztof Kozlowski commit 4f680cb9f1bb6c2b5cd3574533702334709e50ad Author: Alex Dewar Date: Wed Sep 2 17:24:51 2020 +0100 RDMA/ucma: Fix resource leak on error path In ucma_process_join(), if the call to xa_alloc() fails, the function will return without freeing mc. Fix this by jumping to the correct line. In the process I renamed the jump labels to something more memorable for extra clarity. Link: https://lore.kernel.org/r/20200902162454.332828-1-alex.dewar90@gmail.com Addresses-Coverity-ID: 1496814 ("Resource leak") Fixes: 95fe51096b7a ("RDMA/ucma: Remove mc_list and rely on xarray") Signed-off-by: Alex Dewar Signed-off-by: Jason Gunthorpe commit 21f8e4828c44da39b0670c5d99d5728b739542a1 Author: Dmitry Osipenko Date: Wed Sep 2 17:18:43 2020 +0300 regmap: Add can_sleep configuration option Regmap can't sleep if spinlock is used for the locking protection. This patch fixes regression caused by a previous commit that switched regmap to use fsleep() and this broke Amlogic S922X platform. This patch adds new configuration option for regmap users, allowing to specify whether regmap operations can sleep and assuming that sleep is allowed if mutex is used for the regmap locking protection. Reported-by: Marek Szyprowski Fixes: 2b32d2f7ce0a ("regmap: Use flexible sleep") Signed-off-by: Dmitry Osipenko Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200902141843.6591-1-digetx@gmail.com Signed-off-by: Mark Brown commit 7d11b4787d538295f65dcd002954a0f8ed2c393c Author: Kamal Heib Date: Thu Aug 27 17:16:55 2020 +0300 RDMA/qedr: Fix reported max_pkeys As qedr driver supports both RoCE and iWarp, make sure to set the max_pkeys only when running in RoCE mode. Link: https://lore.kernel.org/r/20200827141655.406185-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Acked-by: Michal Kalderon  Signed-off-by: Jason Gunthorpe commit 1d6fd78a213ee3874f46bdce083b7a41d208886d Author: Gustavo A. R. Silva Date: Wed Sep 2 10:07:50 2020 -0500 xsk: Fix null check on error return path Currently, dma_map is being checked, when the right object identifier to be null-checked is dma_map->dma_pages, instead. Fix this by null-checking dma_map->dma_pages. Fixes: 921b68692abb ("xsk: Enable sharing of dma mappings") Addresses-Coverity-ID: 1496811 ("Logically dead code") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20200902150750.GA7257@embeddedor commit 8cd3dc192cb7f854a4e31a252b3a771b2a7faaf7 Author: Alex Dewar Date: Wed Sep 2 16:46:24 2020 +0100 staging/emxx_udc: Remove pointless variable assignments In a number of places in emxx_udc.c, there are variables which are assigned to without that value ever being used. Remove these pointless assignments. Reported-by: kernel test robot Fixes: 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile USB Gadget driver") Signed-off-by: Alex Dewar Link: https://lore.kernel.org/r/20200902154628.283453-1-alex.dewar90@gmail.com Signed-off-by: Greg Kroah-Hartman commit a6b5a1977c6b42dd1b9830f3f6eddc10409d82a1 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:52:00 2020 +0200 ARM: dts: exynos: Correct whitespace and indentation issues Remove double space after '=' and fix indentation in Exynos3250, Exynos4210 and Exynos4412 boards. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-33-krzk@kernel.org commit 6511f11a49825a3ef0fc6529bee84716d58f3c4d Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:59 2020 +0200 ARM: dts: exynos: Correct S3C RTC bindings in Tiny4412 The S3C RTC requires 32768 Hz clock as input which is provided by PMIC. However the PMIC is not described in DTS at all so at least add a workaround to model its clock with fixed-clock. This fixes S3C RTC and silences dtbs_check warnings like: arch/arm/boot/dts/exynos4412-tiny4412.dt.yaml: rtc@10070000: clocks: [[7, 346]] is too short arch/arm/boot/dts/exynos4412-tiny4412.dt.yaml: rtc@10070000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-32-krzk@kernel.org commit 1716af24998a27f9509791e07d3dcef00538e4c2 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:58 2020 +0200 ARM: dts: exynos: Correct S3C RTC bindings in SMDK4412 The S3C RTC requires 32768 Hz clock as input which is provided by PMIC. However the PMIC is not described in DTS at all so at least add a workaround to model its clock with fixed-clock and silence dtbs_check warnings like: arch/arm/boot/dts/exynos4412-smdk4412.dt.yaml: rtc@10070000: clocks: [[7, 346]] is too short arch/arm/boot/dts/exynos4412-smdk4412.dt.yaml: rtc@10070000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-31-krzk@kernel.org commit 173ab0310fb44b73093b7aed9a9e6c4916bc059d Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:57 2020 +0200 ARM: dts: exynos: Add CPU cooling in Tiny4412 Add missing cooling devices for CPU thermal zones in Exynos4412 Tiny4412 board. This allows to scale down CPU frequency (and voltage) in case of thermal pressure. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-30-krzk@kernel.org commit 4134628c38dad06ef69b79fac33fc3d04b81f78e Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:56 2020 +0200 ARM: dts: exynos: Add CPU cooling in SMDK4412 Add missing cooling devices for CPU thermal zones in Exynos4412 SMDK4412 board. This allows to scale down CPU frequency (and voltage) in case of thermal pressure. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-29-krzk@kernel.org commit ffed15b889a4d8cfb8c324e238bf308757b1995b Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:55 2020 +0200 ARM: dts: exynos: Add CPU cooling in Exynos4412 Origen Add missing cooling devices for CPU thermal zones in Exynos4412 Origen board. This allows to scale down CPU frequency (and voltage) in case of thermal pressure. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-28-krzk@kernel.org commit 1f2448dcb9a28b658de08128dc3f38bd1a2ab980 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:54 2020 +0200 ARM: dts: exynos: Override thermal by label in Exynos4412 Odroids Using full paths to extend or override a device tree node is error prone since if there was a typo error, a new node will be created instead of extending the node as it was desired. This will lead to run-time errors that could be hard to detect. A mistyped label on the other hand, will cause a dtc compile error (during build time). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-27-krzk@kernel.org commit e4cf0a4dba7f0bd579dc96f24d8e6134995005c5 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:53 2020 +0200 ARM: dts: exynos: Override thermal by label in Midas Using full paths to extend or override a device tree node is error prone since if there was a typo error, a new node will be created instead of extending the node as it was desired. This will lead to run-time errors that could be hard to detect. A mistyped label on the other hand, will cause a dtc compile error (during build time). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-26-krzk@kernel.org commit eeb62f3d1d33f8b6ccb889d8cf9376cc72cab7b0 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:52 2020 +0200 ARM: dts: exynos: Add S5M8767 clocks for RTC in Exynos4412 Origen Add node for clock controller of Samsung S5M8767 PMIC. This provides the 32768 Hz clock required by S3C RTC. Except making the S3C RTC working, this also fixes dtbs_check warnings: arch/arm/boot/dts/exynos4412-origen.dt.yaml: rtc@10070000: clocks: [[7, 346]] is too short arch/arm/boot/dts/exynos4412-origen.dt.yaml: rtc@10070000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-25-krzk@kernel.org commit a26fe748716e3055d4ce9be698cf44248819aa85 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:51 2020 +0200 ARM: dts: exynos: Correct compatible of fixed clocks in Midas boards The fixed clocks implemented by Samsung clock drivers use only one compatible so drop the additional "fixed-clock" to fix dtbs_check warnings like: arch/arm/boot/dts/exynos4412-i9300.dt.yaml: xxti: compatible:0: 'fixed-clock' was expected From schema: Documentation/devicetree/bindings/clock/fixed-clock.yaml arch/arm/boot/dts/exynos4412-i9300.dt.yaml: xxti: compatible: ['samsung,clock-xxti', 'fixed-clock'] is too long arch/arm/boot/dts/exynos4412-i9300.dt.yaml: xxti: compatible: Additional items are not allowed ('fixed-clock' was unexpected) arch/arm/boot/dts/exynos4412-i9300.dt.yaml: xxti: '#clock-cells' is a required property Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-24-krzk@kernel.org commit 2b857a10d544c8471dabfef7e862840c52b8bf66 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:49 2020 +0200 ARM: dts: exynos: Align MHL GPIO pin configuration with dtschema on Galaxy I9100 Align the name of mag-mhl-gpio node to avoid dtschema confusion and dtbs_check warning: arch/arm/boot/dts/exynos4210-i9100.dt.yaml: pinctrl@11000000: mag-mhl-gpio: {'samsung,pins': ['gpd0-2'], 'samsung,pin-function': [[3]], 'samsung,pin-pud': [[0]]} is not of type 'array' From schema: dtschema/schemas/gpio/gpio-consumer.yaml Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-22-krzk@kernel.org commit 9102399b7fd63e4bd44e48e89d35784031844bb6 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:48 2020 +0200 ARM: dts: exynos: Add CPU cooling in Universal C210 Add missing cooling devices for CPU thermal zones in Exynos4210 Universal C310 board. This allows to scale down CPU frequency (and voltage) in case of thermal pressure. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-21-krzk@kernel.org commit bd031c725d7499b6c77be554c6b4a7cb79f1b765 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:47 2020 +0200 ARM: dts: exynos: Add CPU cooling in SMDKv310 Add missing cooling devices for CPU thermal zones in Exynos4210 SMDKv310 board. This allows to scale down CPU frequency (and voltage) in case of thermal pressure. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-20-krzk@kernel.org commit 5d2bb6621caa66f6912f91b4565ee945aea20258 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:46 2020 +0200 ARM: dts: exynos: Add CPU cooling in Exynos4210 Origen Add missing cooling devices for CPU thermal zones in Exynos4210 Origen board. This allows to scale down CPU frequency (and voltage) in case of thermal pressure. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-19-krzk@kernel.org commit 03ebf390c4e9b70a0802ebfc8d2cfe24ad43ae7a Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:45 2020 +0200 ARM: dts: exynos: Override thermal by label in Trats Using full paths to extend or override a device tree node is error prone since if there was a typo error, a new node will be created instead of extending the node as it was desired. This will lead to run-time errors that could be hard to detect. A mistyped label on the other hand, will cause a dtc compile error (during build time). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-18-krzk@kernel.org commit ed32017c73449b3f5892d69d5ddbbe425b433660 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:44 2020 +0200 ARM: dts: exynos: Override thermal by label in Galaxy I9000 Using full paths to extend or override a device tree node is error prone since if there was a typo error, a new node will be created instead of extending the node as it was desired. This will lead to run-time errors that could be hard to detect. A mistyped label on the other hand, will cause a dtc compile error (during build time). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-17-krzk@kernel.org commit 1708f56081e239a29ed8646aa7fde6853235d93f Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:43 2020 +0200 ARM: dts: exynos: Override thermal by label in Exynos4210 Using full paths to extend or override a device tree node is error prone since if there was a typo error, a new node will be created instead of extending the node as it was desired. This will lead to run-time errors that could be hard to detect. A mistyped label on the other hand, will cause a dtc compile error (during build time). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-16-krzk@kernel.org commit a51e695cafc74700586f7b6fc9953707d2ff24e4 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:42 2020 +0200 ARM: dts: exynos: Align SPI GPIO node name with dtschema in Galaxy I9100 The device tree schema expects SPI controller to be named "spi", otherwise dtbs_check complain with a warning like: arch/arm/boot/dts/exynos4210-i9100.dt.yaml: spi-lcd: $nodename:0: 'spi-lcd' does not match '^spi(@.*|-[0-9a-f])*$' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-15-krzk@kernel.org commit f11d702242a3c91c9a9b0fa9ad6eb6d0f7218c51 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:41 2020 +0200 ARM: dts: exynos: Replace deprecated GPIO spi-gpio properties in Universal C210 "gpio-sck" and "gpio-mosi" are deprecated so update the DTS to fix dtbs_checks warnings like: arch/arm/boot/dts/exynos4210-universal_c210.dt.yaml: spi-lcd: gpio-sck: False schema does not allow [[85, 1, 0]] Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200830135200.24304-14-krzk@kernel.org commit 64fb61e11fa28b6fd69904d054fcf08be54a0856 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:40 2020 +0200 ARM: dts: exynos: Align SPI GPIO node name with dtschema in Universal C210 The device tree schema expects SPI controller to be named "spi", otherwise dtbs_check complain with a warning like: arch/arm/boot/dts/exynos4210-universal_c210.dt.yaml: spi-lcd: $nodename:0: 'spi-lcd' does not match '^spi(@.*|-[0-9a-f])*$' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-13-krzk@kernel.org commit 8bdca79f584dd7912cf41b7c2497f70ee0ff449f Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:37 2020 +0200 ARM: dts: exynos: Add and enable 32 kHz modem clock in Trats The PMIC has a 32768 Hz clock used by the modem which is implemented by driver as a regulator. Add and enable it to be sure modem get's its signal. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-10-krzk@kernel.org commit b9294408b9a316e60292583fe07271052ac093c0 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:35 2020 +0200 ARM: dts: exynos: Add and enable 32 kHz modem clock in Galaxy I9100 The PMIC has a 32768 Hz clock used by the modem which is implemented by driver as a regulator. Add and enable it to be sure modem get's its signal. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-8-krzk@kernel.org commit eb7e538dceda761baae45e61c10be7d6694b3ce5 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:34 2020 +0200 ARM: dts: exynos: Correct S3C RTC bindings in SMDKv310 The S3C RTC requires 32768 Hz clock as input which is provided by PMIC. However there is no clock provided for the PMIC and the driver registers the clock as regulator. This is an old driver which will not be updated so add a workaround - a fixed-clock to fill missing clock phandle reference in S3C RTC. This allows to enable the S3C RTC and fixes dtbs_check warnings: arch/arm/boot/dts/exynos4210-smdkv310.dt.yaml: rtc@10070000: clocks: [[5, 346]] is too short arch/arm/boot/dts/exynos4210-smdkv310.dt.yaml: rtc@10070000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-7-krzk@kernel.org commit e416f0cabf0bcb329a824767e7a5d255979be961 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:33 2020 +0200 ARM: dts: exynos: Correct S3C RTC bindings and enable it in Universal C210 The S3C RTC requires 32768 Hz clock as input which is provided by PMIC. However there is no clock provided for the PMIC and the driver registers the clock as regulator. This is an old driver which will not be updated so add a workaround - add a fixed-clock to fill missing clock phandle reference in S3C RTC. The "clock" regulator in PMIC is already present and enabled. This allows to enable the S3C RTC and fixes dtbs_check warnings: arch/arm/boot/dts/exynos4210-universal_c210.dt.yaml: rtc@10070000: clocks: [[5, 346]] is too short arch/arm/boot/dts/exynos4210-universal_c210.dt.yaml: rtc@10070000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200830135200.24304-6-krzk@kernel.org commit 9ce975bf6b4b014c928392775c7957a65a81e365 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:32 2020 +0200 ARM: dts: exynos: Correct S3C RTC bindings and enable it in Trats The S3C RTC requires 32768 Hz clock as input which is provided by PMIC (Maxim MAX8997). However there is no clock provided for the PMIC and the driver registers the clock as regulator. This is an old driver which will not be updated so add a workaround: 1. Enable the "clock" regulator in PMIC, 2. Add a fixed-clock to fill missing clock phandle reference in S3C RTC. This allows to enable the S3C RTC and fixes dtbs_check warnings: arch/arm/boot/dts/exynos4210-trats.dt.yaml: rtc@10070000: clocks: [[5, 346]] is too short arch/arm/boot/dts/exynos4210-trats.dt.yaml: rtc@10070000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200830135200.24304-5-krzk@kernel.org commit 83d50121a09ab4c0836a3773a309757f777fef7e Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:31 2020 +0200 ARM: dts: exynos: Correct S3C RTC bindings and enable it in Origen The S3C RTC requires 32768 Hz clock as input which is provided by PMIC (Maxim MAX8997). However there is no clock provided for the PMIC and the driver registers the clock as regulator. This is an old driver which will not be updated so add a workaround: 1. Enable the "clock" regulator in PMIC, 2. Add a fixed-clock to fill missing clock phandle reference in S3C RTC. This allows to enable the S3C RTC and fixes dtbs_check warnings: arch/arm/boot/dts/exynos4210-origen.dt.yaml: rtc@10070000: clocks: [[5, 346]] is too short arch/arm/boot/dts/exynos4210-origen.dt.yaml: rtc@10070000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200830135200.24304-4-krzk@kernel.org commit 10c977cc029b031332501db051eee4965e3bb770 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:30 2020 +0200 ARM: dts: exynos: Correct S3C RTC bindings and enable it in Galaxy I9100 The S3C RTC requires 32768 Hz clock as input which is provided by PMIC (Maxim MAX8997). However there is no clock provided for the PMIC and the driver registers the clock as regulator. This is an old driver which will not be updated so add a workaround: 1. Enable the "clock" regulator in PMIC, 2. Add a fixed-clock to fill missing clock phandle reference in S3C RTC. This allows to enable the S3C RTC and fixes dtbs_check warnings: arch/arm/boot/dts/exynos4210-i9100.dt.yaml: rtc@10070000: clocks: [[5, 346]] is too short arch/arm/boot/dts/exynos4210-i9100.dt.yaml: rtc@10070000: clock-names: ['rtc'] is too short Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-3-krzk@kernel.org commit 57d4449fd443ca3deb6e9d1842c998df36ec8162 Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:29 2020 +0200 ARM: dts: exynos: Correct GPU regulator properties in Galaxy I9100 The regulator property 'regulator-microvolt-offset' should be put next to regulator definition, not consumer. The property 'regulator-microsecs-delay' is not valid at all. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-2-krzk@kernel.org commit df63dce2d60b354ca6755708223d6e3b24c8af6c Author: Krzysztof Kozlowski Date: Sun Aug 30 15:51:28 2020 +0200 ARM: dts: exynos: Silence i2c-gpio dtschema warning in Galaxy I9100 The name of I2C controller over GPIO lines node ends with '-gpio' which confuses dtschema: /arch/arm/boot/dts/exynos4210-i9100.dt.yaml: /: i2c-gpio: {'compatible': ['i2c-gpio'], ... 'maxim,over-volt': [[4500]]}} is not of type 'array' From schema: lib/python3.6/site-packages/dtschema/schemas/gpio/gpio-consumer.yaml Add a '-0' suffix to silence it. This pattern on naming i2c-gpio is already present in many other dts. No functional change. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200830135200.24304-1-krzk@kernel.org commit de653d045636091100efcbe5c83f78ebb5211ff4 Author: Krzysztof Kozlowski Date: Sat Aug 29 19:25:32 2020 +0200 ARM: dts: exynos: Remove snps, dwc2 compatible in Exynos3250 The binding for DesignWare HS OTG USB 2.0 in Samsung SoCs take only one compatible. This fixes dtbs_check warnings like: arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml: hsotg@12480000: compatible: ['samsung,s3c6400-hsotg', 'snps,dwc2'] is not valid under any of the given schemas (Possible causes of the failure): Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200829172532.29358-4-krzk@kernel.org commit dd85345abca60a8916617e8d75c0f9ce334336dd Author: Krzysztof Kozlowski Date: Thu Aug 27 09:33:15 2020 +0200 memory: fsl-corenet-cf: Fix handling of platform_get_irq() error platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: 54afbec0d57f ("memory: Freescale CoreNet Coherency Fabric error reporting driver") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200827073315.29351-1-krzk@kernel.org commit 6cf238d4e21bc21bc18d126358dd617b2c991d66 Author: YueHaibing Date: Tue Sep 1 19:28:32 2020 +0800 memory: omap-gpmc: Fix -Wunused-function warnings If CONFIG_OF is not set, make W=1 warns: drivers/memory/omap-gpmc.c:987:12: warning: ‘gpmc_cs_remap’ defined but not used [-Wunused-function] drivers/memory/omap-gpmc.c:926:20: warning: ‘gpmc_cs_get_name’ defined but not used [-Wunused-function] drivers/memory/omap-gpmc.c:919:13: warning: ‘gpmc_cs_set_name’ defined but not used [-Wunused-function] Move them to #ifdef CONFIG_OF block to fix this. Signed-off-by: YueHaibing Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20200901112832.3084-1-yuehaibing%40huawei.com Signed-off-by: Krzysztof Kozlowski commit ea90f66f2a8629dde07328df0b8314aae5e54a47 Author: Thierry Reding Date: Tue Sep 1 17:32:48 2020 +0200 memory: tegra: Remove GPU from DRM IOMMU group Commit 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU group") added the GPU to the DRM IOMMU group, which doesn't make any sense. This causes problems when Nouveau tries to attach to the SMMU and causes it to fall back to using the DMA API. Remove the GPU from the DRM groups to restore the old behaviour. The GPU should always have its own IOMMU domain to make sure it can map buffers into contiguous chunks (for big page support) without getting in the way of mappings from the DRM group. Cc: Fixes: 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU group") Reported-by: Matias Zuniga Signed-off-by: Thierry Reding Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200901153248.1831263-1-thierry.reding@gmail.com Signed-off-by: Krzysztof Kozlowski commit 25f2f5e5910fa5e805cb1232237291f2ac4e9eb0 Author: Krzysztof Kozlowski Date: Fri Aug 28 17:37:47 2020 +0200 memory: tegra186-emc: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200828153747.22358-2-krzk@kernel.org commit 74ca0d837b99b0ca6e66861a64a6456beaa10298 Author: Krzysztof Kozlowski Date: Fri Aug 28 17:37:46 2020 +0200 memory: brcmstb_dpfe: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Acked-by: Markus Mayer Link: https://lore.kernel.org/r/20200828153747.22358-1-krzk@kernel.org commit 968be23ceaca1f402dfad0a30a8da4649ee32940 Author: Magnus Karlsson Date: Wed Sep 2 11:06:09 2020 +0200 xsk: Fix possible segfault at xskmap entry insertion Fix possible segfault when entry is inserted into xskmap. This can happen if the socket is in a state where the umem has been set up, the Rx ring created but it has yet to be bound to a device. In this case the pool has not yet been created and we cannot reference it for the existence of the fill ring. Fix this by removing the whole xsk_is_setup_for_bpf_map function. Once upon a time, it was used to make sure that the Rx and fill rings where set up before the driver could call xsk_rcv, since there are no tests for the existence of these rings in the data path. But these days, we have a state variable that we test instead. When it is XSK_BOUND, everything has been set up correctly and the socket has been bound. So no reason to have the xsk_is_setup_for_bpf_map function anymore. Fixes: 7361f9c3d719 ("xsk: Move fill and completion rings to buffer pool") Reported-by: syzbot+febe51d44243fbc564ee@syzkaller.appspotmail.com Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1599037569-26690-1-git-send-email-magnus.karlsson@intel.com commit 53ea2076d851ee37e4f3954c5ae569439b138248 Author: Magnus Karlsson Date: Wed Sep 2 10:52:23 2020 +0200 xsk: Fix possible segfault in xsk umem diagnostics Fix possible segfault in the xsk diagnostics code when dumping information about the umem. This can happen when a umem has been created, but the socket has not been bound yet. In this case, the xsk buffer pool does not exist yet and we cannot dump the information that was moved from the umem to the buffer pool. Fix this by testing for the existence of the buffer pool and if not there, do not dump any of that information. Fixes: c2d3d6a47462 ("xsk: Move queue_id, dev and need_wakeup to buffer pool") Fixes: 7361f9c3d719 ("xsk: Move fill and completion rings to buffer pool") Reported-by: syzbot+3f04d36b7336f7868066@syzkaller.appspotmail.com Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1599036743-26454-1-git-send-email-magnus.karlsson@intel.com commit 858e8b2eb4dd6fe6c4640463ad2f2ed3b8249ad4 Author: Yonghong Song Date: Tue Sep 1 19:31:13 2020 -0700 selftests/bpf: Test task_file iterator without visiting pthreads Modified existing bpf_iter_test_file.c program to check whether all accessed files from the main thread or not. Modified existing bpf_iter_test_file program to check whether all accessed files from the main thread or not. $ ./test_progs -n 4 ... #4/7 task_file:OK ... #4 bpf_iter:OK Summary: 1/24 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200902023113.1672863-1-yhs@fb.com commit 203d7b054fc719561fe258e46e280930890dceaf Author: Yonghong Song Date: Tue Sep 1 19:31:12 2020 -0700 bpf: Avoid iterating duplicated files for task_file iterator Currently, task_file iterator iterates all files from all tasks. This may potentially visit a lot of duplicated files if there are many tasks sharing the same files, e.g., typical pthreads where these pthreads and the main thread are sharing the same files. This patch changed task_file iterator to skip a particular task if that task shares the same files as its group_leader (the task having the same tgid and also task->tgid == task->pid). This will preserve the same result, visiting all files from all tasks, and will reduce runtime cost significantl, e.g., if there are a lot of pthreads and the process has a lot of open files. Suggested-by: Andrii Nakryiko Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Reviewed-by: Josef Bacik Link: https://lore.kernel.org/bpf/20200902023112.1672792-1-yhs@fb.com commit de09077c89183cbc627d9393706343662da7f5a3 Author: Christoph Hellwig Date: Tue Sep 1 17:57:48 2020 +0200 block: remove revalidate_disk() Remove the now unused helper. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Acked-by: Song Liu Signed-off-by: Jens Axboe commit 32f61d67570db036dba9e4fb2509b5343e28f627 Author: Christoph Hellwig Date: Tue Sep 1 17:57:47 2020 +0200 nvdimm: simplify revalidate_disk handling The nvdimm block driver abuse revalidate_disk in a strange way, and totally unrelated to what other drivers do. Simplify this by just calling nvdimm_revalidate_disk (which seems rather misnamed) from the probe routines, as the additional bdev size revalidation is pointless at this point, and remove the revalidate_disk methods given that it can only be triggered from add_disk, which is right before the manual calls. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 033a1b98b1f8a823fb0bd985d45290016eee54ce Author: Christoph Hellwig Date: Tue Sep 1 17:57:46 2020 +0200 sd: open code revalidate_disk Instead of calling revalidate_disk just do the work directly by calling sd_revalidate_disk, and revalidate_disk_size where needed. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit b55d3d21a05d5558440515c1a73d87bc4b1fa17c Author: Christoph Hellwig Date: Tue Sep 1 17:57:45 2020 +0200 nvme: opencode revalidate_disk in nvme_validate_ns Keep control in the NVMe driver instead of going through an indirect call back into ->revalidate_disk. Also reorder the function a bit to be easier to follow with the additional code. And now that we have removed all callers of revalidate_disk() in the nvme code, ->revalidate_disk is only called from the open code when first opening the device. Which is of course totally pointless as we have a valid size since the initial scan, and will get an updated view through the asynchronous notifiation everytime the size changes. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit b8086d3f5a0e88b1912d55a158b8a6a43ad6604b Author: Christoph Hellwig Date: Tue Sep 1 17:57:44 2020 +0200 block: use revalidate_disk_size in set_capacity_revalidate_and_notify Only virtio_blk and xen-blkfront set the revalidate argument to true, and both do not implement the ->revalidate_disk method. So switch to the helper that just updates the size instead. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 659e56ba864d37b7ee0a49cd432205b2a5ca815e Author: Christoph Hellwig Date: Tue Sep 1 17:57:43 2020 +0200 block: add a new revalidate_disk_size helper revalidate_disk is a relative awkward helper for driver use, as it first calls an optional driver method and then updates the block device size, while most callers either don't need the method call at all, or want to keep state between the caller and the called method. Add a revalidate_disk_size helper that just performs the update of the block device size from the gendisk one, and switch all drivers that do not implement ->revalidate_disk to use the new helper instead of revalidate_disk() Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Acked-by: Song Liu Signed-off-by: Jens Axboe commit f4ad06f2bb8476548b08f89919ee65abc4e40212 Author: Christoph Hellwig Date: Tue Sep 1 17:57:42 2020 +0200 block: rename bd_invalidated Replace bd_invalidate with a new BDEV_NEED_PART_SCAN flag in a bd_flags variable to better describe the condition. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 6540fbf6b634071950f01ee4e4194e2ea8ca72d1 Author: Christoph Hellwig Date: Tue Sep 1 17:57:41 2020 +0200 block: don't clear bd_invalidated in check_disk_size_change bd_invalidated is set by check_disk_change or in add_disk to initiate a partition scan. Move it from check_disk_size_change which is called from both revalidate_disk() and bdev_disk_changed() to only the latter, as that is what is called from the block device open code (and nbd) to deal with the bd_invalidated event. revalidate_disk() on the other hand is mostly used to propagate a size update from the gendisk to the block device, which is entirely unrelated. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 653cd5341968a4648e75b1b359b3316600d50310 Author: Christoph Hellwig Date: Tue Sep 1 17:57:40 2020 +0200 Documentation/filesystems/locking.rst: remove an incorrect sentence unlock_native_capacity is never called from check_disk_change(), and while revalidate_disk can be called from it, it can also be called from two other places at the moment. Signed-off-by: Christoph Hellwig Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 0f50257f5348751bf5b93d052885de23b2367cd2 Author: Randy Dunlap Date: Sun Aug 30 21:16:55 2020 -0700 dma-buf: fix kernel-doc warning in Fix kernel-doc warning in : ../include/linux/dma-buf.h:330: warning: Function parameter or member 'name_lock' not described in 'dma_buf' Signed-off-by: Randy Dunlap Cc: Sumit Semwal Cc: Gustavo Padovan Cc: Christian König Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/388523/ Signed-off-by: Christian König commit e44cd6bc95a145418442f91045828c8fc49112bd Author: Randy Dunlap Date: Sun Aug 30 21:17:13 2020 -0700 dma-buf: fix kernel-doc warning in dma-fence.c Add @cookie to dma_fence_end_signalling() to prevent kernel-doc warning in drivers/dma-buf/dma-fence.c: ../drivers/dma-buf/dma-fence.c:291: warning: Function parameter or member 'cookie' not described in 'dma_fence_end_signalling' Signed-off-by: Randy Dunlap Cc: Sumit Semwal Cc: Gustavo Padovan Cc: Christian König Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/388527/ Signed-off-by: Christian König commit ff4c371d2bc0b4e5d3fe890b89a61ae049e613bf Author: Sameer Pujar Date: Sun Jul 19 10:31:28 2020 +0530 arm64: defconfig: Build ADMA and ACONNECT driver This commit builds ADMA and ACONNECT drivers which can be used on Tegra210 and later platforms to transfer audio data to/from AHUB (Audio Hub). Signed-off-by: Sameer Pujar Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit b554321dbd6d6a1d93831509546c9424f8e95f9d Author: Sameer Pujar Date: Sun Jul 19 10:31:27 2020 +0530 arm64: defconfig: Build AHUB component drivers This patch helps to build AHUB and its client drivers (I2S, DMIC, DSPK, ADMAIF and AHUB). These register components with ASoC core. Signed-off-by: Sameer Pujar Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 177208f7b06d1669514cc465268c8432f577b7fd Author: Sameer Pujar Date: Sun Jul 19 10:31:30 2020 +0530 arm64: tegra: Add DT binding for AHUB components This patch adds few AHUB modules for Tegra210, Tegra186 and Tegra194. Bindings for following modules are added. * AHUB added as a child node under ACONNECT * AHUB includes many HW accelerators and below components are added as its children. * ADMAIF * I2S * DMIC * DSPK (added for Tegra186 and Tegra194 only, since Tegra210 does not have this module) Signed-off-by: Sameer Pujar Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 547141b56c6cdc34727917d4ddd315321640f6df Author: Sameer Pujar Date: Sun Jul 19 10:31:29 2020 +0530 arm64: tegra: Enable ACONNECT, ADMA and AGIC on Jetson Nano These devices are required for audio sub system and current patch ensures probe path of these devices gets tested. Later sound card support would be added which can use these devices at runtime. Signed-off-by: Sameer Pujar Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 14721add58ef267344bee254bc276c9139b7b665 Author: Qu Wenruo Date: Wed Sep 2 14:46:19 2020 +0800 module: Add more error message for failed kernel module loading When kernel module loading failed, user space only get one of the following error messages: - ENOEXEC This is the most confusing one. From corrupted ELF header to bad WRITE|EXEC flags check introduced by in module_enforce_rwx_sections() all returns this error number. - EPERM This is for blacklisted modules. But mod doesn't do extra explain on this error either. - ENOMEM The only error which needs no explain. This means, if a user got "Exec format error" from modprobe, it provides no meaningful way for the user to debug, and will take extra time communicating to get extra info. So this patch will add extra error messages for -ENOEXEC and -EPERM errors, allowing user to do better debugging and reporting. Reviewed-by: Lucas De Marchi Signed-off-by: Qu Wenruo Signed-off-by: Jessica Yu commit 5e0c074e5b4be02d57d1b60abc3391afe7edd088 Author: Denis Efremov Date: Wed Sep 2 07:40:59 2020 +0300 coccinelle: ifnullfree: add vfree(), kvfree*() functions Extend the list of free functions with kvfree(), kvfree_sensitive(), vfree(). Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 4d342964f31e6626ae00e5df21d28296b44f3467 Author: Larry Finger Date: Mon Aug 31 13:50:46 2020 -0500 rtlwifi: Remove temporary definition of RT_TRACE A definition of this macro was kept until all drivers had been converted. It can now be deleted. This change also renames _rtl_dbg_trace() to _rtl_dbg_out(). Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200831185046.30307-1-Larry.Finger@lwfinger.net commit 98611b00b7acdedd18746abb8fe42e7d8ec75677 Author: Larry Finger Date: Mon Aug 31 13:45:35 2020 -0500 rtlwifi: rtl8821ae: Rename RT_TRACE to rtl_dbg Change the misleading macro name to one that is more descriptive for rtl8821ae. Changes suggested by ckeckpatch.pl have been made. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200831184536.29950-1-Larry.Finger@lwfinger.net commit 8f6ee74c27860d4a4c6e0f8cf772bb2afc184bcb Author: Miklos Szeredi Date: Wed Sep 2 10:58:49 2020 +0200 ovl: rearrange ovl_can_list() ovl_can_list() should return false for overlay private xattrs. Since currently these use the "trusted.overlay." prefix, they will always match the "trusted." prefix as well, hence the test for being non-trusted will not trigger. Prepare for using the "user.overlay." namespace by moving the test for private xattr before the test for non-trusted. This patch doesn't change behavior. Signed-off-by: Miklos Szeredi commit 43d193f8440d67f0dddd93ae973eb94174039e83 Author: Miklos Szeredi Date: Wed Sep 2 10:58:49 2020 +0200 ovl: enumerate private xattrs Instead of passing the xattr name down to the ovl_do_*xattr() accessor functions, pass an enumerated value. The enum can use the same names as the the previous #define for each xattr name. Signed-off-by: Miklos Szeredi commit 610afc0bd40882181718be2ae1e0264466bba2c7 Author: Miklos Szeredi Date: Wed Sep 2 10:58:49 2020 +0200 ovl: pass ovl_fs down to functions accessing private xattrs This paves the way for optionally using the "user.overlay." xattr namespace. Signed-off-by: Miklos Szeredi commit 26150ab5eae16cef151d5e6ad5b5b38544dbf88a Author: Miklos Szeredi Date: Wed Sep 2 10:58:48 2020 +0200 ovl: drop flags argument from ovl_do_setxattr() All callers pass zero flags to ovl_do_setxattr(). So drop this argument. Signed-off-by: Miklos Szeredi commit 7109704705a4d80516de00779bba38b3844bff13 Author: Miklos Szeredi Date: Wed Sep 2 10:58:48 2020 +0200 ovl: adhere to the vfs_ vs. ovl_do_ conventions for xattrs Call ovl_do_*xattr() when accessing an overlay private xattr, vfs_*xattr() otherwise. This has an effect on debug output, which is made more consistent by this patch. Signed-off-by: Miklos Szeredi commit d5dc7486e8c6dd860b81842cd5d999e3782d5795 Author: Miklos Szeredi Date: Wed Sep 2 10:58:48 2020 +0200 ovl: use ovl_do_getxattr() for private xattr Use the convention of calling ovl_do_foo() for operations which are overlay specific. This patch is a no-op, and will have significance for supporting "user.overlay." xattr namespace. Signed-off-by: Miklos Szeredi commit 92f0d6c9cfcf1f1fa54251353a9c4cd63fa30544 Author: Miklos Szeredi Date: Wed Sep 2 10:58:48 2020 +0200 ovl: fold ovl_getxattr() into ovl_get_redirect_xattr() This is a partial revert (with some cleanups) of commit 993a0b2aec52 ("ovl: Do not lose security.capability xattr over metadata file copy-up"), which introduced ovl_getxattr() in the first place. Signed-off-by: Miklos Szeredi commit de7a52c9c60b4763f43f862bb60f657f7fa1cfcc Author: Miklos Szeredi Date: Wed Sep 2 10:58:48 2020 +0200 ovl: clean up ovl_getxattr() in copy_up.c Lose the padding and the failure message (in line with other parts of the copy up process). Return zero for both nonexistent or empty xattr. Signed-off-by: Miklos Szeredi commit fee0f2980a2e89f9929ae0355464064cdc47e8f0 Author: Miklos Szeredi Date: Wed Sep 2 10:58:48 2020 +0200 duplicate ovl_getxattr() ovl_getattr() returns the value of an xattr in a kmalloced buffer. There are two callers: ovl_copy_up_meta_inode_data() (copy_up.c) ovl_get_redirect_xattr() (util.c) This patch just copies ovl_getxattr() to copy_up.c, the following patches will deal with the differences in idividual callers. Signed-off-by: Miklos Szeredi commit c86243b090bc25f81abe33ddfa9fe833e02c4d64 Author: Vivek Goyal Date: Mon Aug 31 14:15:29 2020 -0400 ovl: provide a mount option "volatile" Container folks are complaining that dnf/yum issues too many sync while installing packages and this slows down the image build. Build requirement is such that they don't care if a node goes down while build was still going on. In that case, they will simply throw away unfinished layer and start new build. So they don't care about syncing intermediate state to the disk and hence don't want to pay the price associated with sync. So they are asking for mount options where they can disable sync on overlay mount point. They primarily seem to have two use cases. - For building images, they will mount overlay with nosync and then sync upper layer after unmounting overlay and reuse upper as lower for next layer. - For running containers, they don't seem to care about syncing upper layer because if node goes down, they will simply throw away upper layer and create a fresh one. So this patch provides a mount option "volatile" which disables all forms of sync. Now it is caller's responsibility to throw away upper if system crashes or shuts down and start fresh. With "volatile", I am seeing roughly 20% speed up in my VM where I am just installing emacs in an image. Installation time drops from 31 seconds to 25 seconds when nosync option is used. This is for the case of building on top of an image where all packages are already cached. That way I take out the network operations latency out of the measurement. Giuseppe is also looking to cut down on number of iops done on the disk. He is complaining that often in cloud their VMs are throttled if they cross the limit. This option can help them where they reduce number of iops (by cutting down on frequent sync and writebacks). Signed-off-by: Giuseppe Scrivano Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 235ce9ed96bc624fe929f724883cc04b7a714ac2 Author: Amir Goldstein Date: Sun Aug 30 23:28:03 2020 +0300 ovl: check for incompatible features in work dir An incompatible feature is marked by a non-empty directory nested 2 levels deep under "work" dir, e.g.: workdir/work/incompat/volatile. This commit checks for marked incompat features, warns about them and fails to mount the overlay, for example: overlayfs: overlay with incompat feature 'volatile' cannot be mounted Very old kernels (i.e. v3.18) will fail to remove a non-empty "work" dir and fail the mount. Newer kernels will fail to remove a "work" dir with entries nested 3 levels and fall back to read-only mount. User mounting with old kernel will see a warning like these in dmesg: overlayfs: cleanup of 'incompat/...' failed (-39) overlayfs: cleanup of 'work/incompat' failed (-39) overlayfs: cleanup of 'ovl-work/work' failed (-39) overlayfs: failed to create directory /vdf/ovl-work/work (errno: 17); mounting read-only These warnings should give the hint to the user that: 1. mount failure is caused by backward incompatible features 2. mount failure can be resolved by manually removing the "work" directory There is nothing preventing users on old kernels from manually removing workdir entirely or mounting overlay with a new workdir, so this is in no way a full proof backward compatibility enforcement, but only a best effort. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit dfe92b6206f5e938541c81cb1b42a7c8df4eaa62 Author: Bryan O'Donoghue Date: Sat Aug 29 04:38:46 2020 +0100 wcn36xx: Set feature DOT11AC for wcn3680 In order for the firmware to process extended V1 parameters with the addtional VHT fields added we need to first enable the feature bit DOT11AC. Once done the version number in the HAL message header will be acted upon by the firmware. Extended V1 parameters are a prerequisite for 802.11ac speeds since we cannot communicate VHT parameters to the firmware absent the extended data structures. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200829033846.2167619-11-bryan.odonoghue@linaro.org commit f32248a7a257480ec1c81dd9c9cabd48a5260303 Author: Bryan O'Donoghue Date: Sat Aug 29 04:38:45 2020 +0100 wcn36xx: Use existing pointers in wcn36xx_smd_config_bss_v1 Two pointers are already defined in this function "bss" and "sta" which point to fields within msg_body->bss_params. We can substantially reduce the amount of extraneous text in this function by making use of those pointers. This change makes the code easier to read and modify. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200829033846.2167619-10-bryan.odonoghue@linaro.org commit 8f454b2ffb2577bdf2ba26e0bcd7204615a405a2 Author: Bryan O'Donoghue Date: Sat Aug 29 04:38:44 2020 +0100 wcn36xx: Add Supported rates V1 structure This commit adds the supported rates V1 structure as defined in Prima riva/inc/wlan_hal_msg.h Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200829033846.2167619-9-bryan.odonoghue@linaro.org commit ff11d0c96a6dba075343cc66a6fba5fd89cdfc13 Author: Bryan O'Donoghue Date: Sat Aug 29 04:38:43 2020 +0100 wcn36xx: Add 802.11ac HAL param bitfields This patch enumerates four previously unused bits in wcn36xx_hal_config_sta_params_v1 describing - HT LDPC enable - VHT LDPC enable - VHT TX BF enable - VHT MU Beamformee enable Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200829033846.2167619-8-bryan.odonoghue@linaro.org commit 1af05d43b9bef43ef71387b0d467c6c7aa6641a0 Author: Bryan O'Donoghue Date: Sat Aug 29 04:38:42 2020 +0100 wcn36xx: Specify ieee80211_rx_status.nss Specify the number of spatial streams in ieee80211_rx_status. For non VHT data-rates the wireless core doesn't care about this field, however for VHT data-rates it does. Every version of wcn36xx has one spatial stream, so specify nss for wcn3620, wcn3660 and wcn3680 now. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200829033846.2167619-7-bryan.odonoghue@linaro.org commit 6ea131acea98026f144f64fb2d8ea7dbb95d3049 Author: Loic Poulain Date: Sat Aug 29 04:38:41 2020 +0100 wcn36xx: Fix warning due to bad rate_idx The rate_idx is the index of the bitrate in the supported rate table. However the 5Ghz band has a smaller legacy bitrate table than 2.4Ghz since it does not have the DSSS bitrates (1, 2, 5.5, 11). So in 5Ghz band the index should adjusted accrodingly (-4). Signed-off-by: Loic Poulain [bod: Made sure fix is only applied if the rate_idx > n_bitrates] Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200829033846.2167619-6-bryan.odonoghue@linaro.org commit 10630b150bd6049b3ee56bf7b2200e574b1da7af Author: Bryan O'Donoghue Date: Sat Aug 29 04:38:40 2020 +0100 wcn36xx: Add 802.11ac MCS rates This commit incorporates the 802.11ac table defined in downstream into upstream wcn36xx. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200829033846.2167619-5-bryan.odonoghue@linaro.org commit 8490987bdb9a74904c2b0b0e0310809376d7a034 Author: Bryan O'Donoghue Date: Sat Aug 29 04:38:38 2020 +0100 wcn36xx: Hook and identify RF_IRIS_WCN3680 If DT indicates we are dealing with a WCN3680 mark the rf_id field as RF_IRIS_WCN3680 allowing for further chip-specific logic. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200829033846.2167619-3-bryan.odonoghue@linaro.org commit 034f0befc1ff4115bf59d31a2ac5156f031991fa Author: Bryan O'Donoghue Date: Sat Aug 29 04:38:37 2020 +0100 wcn36xx: Add a chip identifier for WCN3680 The WCN3680 has some specific behaviours that we want to capture to distinguish it from the WCN3620 and WCN3660 respectively. Add an identifier for this purpose. Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200829033846.2167619-2-bryan.odonoghue@linaro.org commit a8c7ffdb5fdde3a57c0b654f66f4d81325abe69f Author: Miquel Raynal Date: Thu Aug 27 10:51:56 2020 +0200 mtd: nand: Introduce the ECC engine framework Create a generic ECC engine framework. This is a base to instantiate ECC engine objects. If we really want to be generic, bindings must evolve, so here is the new logic. The following three properties are mutually exclusive: - The nand-no-ecc-engine boolean property is set and there is no ECC engine to retrieve. - The nand-use-soft-ecc-engine boolean property is set and the core will force using the use of software correction. - There is a nand-ecc-engine property pointing at a node which will act as ECC engine. It the later case, the property may reference: - The NAND chip node itself (for the on-die ECC case). - The parent node if the NAND controller embeds an ECC engine. - Any other node being an external ECC controller as well. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-9-miquel.raynal@bootlin.com commit 3fbe507ebd828bc8ce747181a204ddafbe5cce2f Author: Matt Weber Date: Tue Jun 2 09:34:03 2020 -0500 mtd: mtdconcat: map through panic write handler Allows a mtdconcat's subdevice->_panic_write to be used for capturing a mtdoops dump. Note: The ->_panic_write is mapped through from the first chip that is part of the concat virtual device. Signed-off-by: Matthew Weber [miquel.raynal@bootlin.com: return err, not void] Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200602143403.13465-1-matthew.weber@rockwellcollins.com commit 1174c8a0f33c1e5c442ac40381fe124248c08b3a Author: Gerd Hoffmann Date: Tue Aug 18 09:25:11 2020 +0200 drm/virtio: drop virtio_gpu_output->enabled Not needed, already tracked by drm_crtc_state->active. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20200818072511.6745-3-kraxel@redhat.com commit 1bc371cd0ec907bab870cacb6e898105f9c41dc8 Author: Gerd Hoffmann Date: Tue Aug 18 09:25:10 2020 +0200 drm/virtio: fix unblank When going through a disable/enable cycle without changing the framebuffer the optimization added by commit 3954ff10e06e ("drm/virtio: skip set_scanout if framebuffer didn't change") causes the screen stay blank. Add a bool to force an update to fix that. v2: use drm_atomic_crtc_needs_modeset() (Daniel). Cc: 1882851@bugs.launchpad.net Fixes: 3954ff10e06e ("drm/virtio: skip set_scanout if framebuffer didn't change") Signed-off-by: Gerd Hoffmann Tested-by: Jiri Slaby Tested-by: Diego Viola Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20200818072511.6745-2-kraxel@redhat.com commit bef7afbf3bb64443530170c0712060e11bea27e7 Author: Jason Yan Date: Thu Aug 27 20:59:25 2020 +0800 scsi: mptscsih: Remove set but not used 'timeleft' This addresses the following gcc warning with "make W=1": drivers/message/fusion/mptscsih.c: In function ‘mptscsih_IssueTaskMgmt’: drivers/message/fusion/mptscsih.c:1519:17: warning: variable ‘timeleft’ set but not used [-Wunused-but-set-variable] 1519 | unsigned long timeleft; | ^~~~~~~~ Link: https://lore.kernel.org/r/20200827125925.428357-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 7149e0cb31c5d5db35e71d2c4ce57b6053b5855e Author: Jason Yan Date: Thu Aug 27 20:58:51 2020 +0800 scsi: isci: Remove set but not used 'index' This addresses the following gcc warning with "make W=1": drivers/scsi/isci/host.c: In function ‘sci_controller_complete_io’: drivers/scsi/isci/host.c:2674:6: warning: variable ‘index’ set but not used [-Wunused-but-set-variable] 2674 | u16 index; | ^~~~~ Link: https://lore.kernel.org/r/20200827125851.428071-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit e34ce005a1773ebea09f702e0b4a37283afcf934 Author: Jason Yan Date: Thu Aug 27 20:58:12 2020 +0800 scsi: dpt_i2o: Remove set but not used 'pHba' This addresses the following gcc warning with "make W=1": drivers/scsi/dpt_i2o.c: In function ‘adpt_slave_configure’: drivers/scsi/dpt_i2o.c:411:12: warning: variable ‘pHba’ set but not used [-Wunused-but-set-variable] 411 | adpt_hba* pHba; | ^~~~ Link: https://lore.kernel.org/r/20200827125812.427753-1-yanaijie@huawei.com Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Martin K. Petersen commit 9535f2152acec91df0d293e4b0b8c20b618fc44e Author: Xu Wang Date: Thu Aug 27 09:26:06 2020 +0000 scsi: qedi: Remove redundant NULL check kfree_skb() handles a NULL skb argument so the additional check is unnecessary. Remove it. Link: https://lore.kernel.org/r/20200827092606.32148-1-vulab@iscas.ac.cn Signed-off-by: Xu Wang Signed-off-by: Martin K. Petersen commit cc770ce34aeeff21991f162f0db1a758ea672727 Author: Eric Biggers Date: Tue Aug 25 19:10:40 2020 -0700 scsi: ufs: Make ufshcd_print_trs() consider UFSHCD_QUIRK_PRDT_BYTE_GRAN Fix ufshcd_print_trs() to consider UFSHCD_QUIRK_PRDT_BYTE_GRAN when using utp_transfer_req_desc::prd_table_length, so that it doesn't treat the number of bytes as the number of entries. Originally from Kiwoong Kim (https://lkml.kernel.org/r/20200218233115.8185-1-kwmad.kim@samsung.com). Link: https://lore.kernel.org/r/20200826021040.152148-1-ebiggers@kernel.org Fixes: 26f968d7de82 ("scsi: ufs: Introduce UFSHCD_QUIRK_PRDT_BYTE_GRAN quirk") Cc: Alim Akhtar Cc: Kiwoong Kim Signed-off-by: Eric Biggers Signed-off-by: Martin K. Petersen commit cfd3d2225aa5d72e2ea848a0bb05d11b46a88d49 Author: Dan Carpenter Date: Tue Aug 25 14:20:03 2020 +0300 scsi: aacraid: Remove erroneous fallthrough annotation This fallthrough annotation is unreachable so we can delete it. Link: https://lore.kernel.org/r/20200825112003.GD285523@mwanda Fixes: c4e2fbca374b ("scsi: aacraid: Reworked scsi command submission path") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit ad0c7775e745d282af661483bc53311034d456d0 Author: Douglas Gilbert Date: Fri Aug 21 00:22:49 2020 -0400 scsi: scsi_debug: Implement lun_format Implement 'flat space LUN addressing', which allows us to raise the max_lun limitation to 16384. The maximum number of LUNs prior to this patch was 256. Link: https://lore.kernel.org/r/20200821042249.5097-1-dgilbert@interlog.com Suggested-by: Hannes Reinecke Signed-off-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit 265600b7b6e88f3cc4cef2774afe0eb4abe72d72 Author: Baolin Wang Date: Wed Sep 2 09:45:25 2020 +0800 block: Remove a duplicative condition Remove a duplicative condition to remove below cppcheck warnings: "warning: Redundant condition: sched_allow_merge. '!A || (A && B)' is equivalent to '!A || B' [redundantCondition]" Reported-by: kernel test robot Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 8327cce5ff9376fac9ff713a8d5c99c16ba3fa33 Author: Ritika Srivastava Date: Tue Sep 1 13:17:31 2020 -0700 block: better deal with the delayed not supported case in blk_cloned_rq_check_limits If WRITE_ZERO/WRITE_SAME operation is not supported by the storage, blk_cloned_rq_check_limits() will return IO error which will cause device-mapper to fail the paths. Instead, if the queue limit is set to 0, return BLK_STS_NOTSUPP. BLK_STS_NOTSUPP will be ignored by device-mapper and will not fail the paths. Suggested-by: Martin K. Petersen Signed-off-by: Ritika Srivastava Reviewed-by: Martin K. Petersen Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 143d2600faf1563fd4125686ab84afaab5fb513b Author: Ritika Srivastava Date: Tue Sep 1 13:17:30 2020 -0700 block: Return blk_status_t instead of errno codes Replace returning legacy errno codes with blk_status_t in blk_cloned_rq_check_limits(). Signed-off-by: Ritika Srivastava Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9d3a39a5f1e45827b008fff1ee9cf3cac3409665 Author: Khazhismel Kumykov Date: Mon Aug 24 15:10:34 2020 -0700 block: grant IOPRIO_CLASS_RT to CAP_SYS_NICE CAP_SYS_ADMIN is too broad, and ionice fits into CAP_SYS_NICE's grouping. Retain CAP_SYS_ADMIN permission for backwards compatibility. Signed-off-by: Khazhismel Kumykov Reviewed-by: Bart Van Assche Acked-by: Serge Hallyn Signed-off-by: Jens Axboe commit a7863b3423fd5d1ab82161654ba83973764b570b Author: Tejun Heo Date: Tue Sep 1 14:52:57 2020 -0400 blk-iocost: update iocost_monitor.py iocost went through significant internal changes. Update iocost_monitor.py accordingly. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit f0bf84a5dffa0800c4f8ae52a75c579978086901 Author: Tejun Heo Date: Tue Sep 1 14:52:56 2020 -0400 blk-iocost: add three debug stat - cost.wait, indebt and indelay These are really cheap to collect and can be useful in debugging iocost behavior. Add them as debug stats for now. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 046037551721e8831f6718ac2149887f6bb1f802 Author: Tejun Heo Date: Tue Sep 1 14:52:55 2020 -0400 blk-iocost: restore inuse update tracepoints Update and restore the inuse update tracepoints. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit ac33e91e2daca40fcad66c68712276da7b40f169 Author: Tejun Heo Date: Tue Sep 1 14:52:54 2020 -0400 blk-iocost: implement vtime loss compensation When an iocg accumulates too much vtime or gets deactivated, we throw away some vtime, which lowers the overall device utilization. As the exact amount which is being thrown away is known, we can compensate by accelerating the vrate accordingly so that the extra vtime generated in the current period matches what got lost. This significantly improves work conservation when involving high weight cgroups with intermittent and bursty IO patterns. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit dda1315f18536cb94e293a3ae0ccb5c4df53e5e4 Author: Tejun Heo Date: Tue Sep 1 14:52:53 2020 -0400 blk-iocost: halve debts if device stays idle A low weight iocg can amass a large amount of debt, for example, when anonymous memory gets reclaimed aggressively. If the system has a lot of memory paired with a slow IO device, the debt can span multiple seconds or more. If there are no other subsequent IO issuers, the in-debt iocg may end up blocked paying its debt while the IO device is idle. This patch implements a mechanism to protect against such pathological cases. If the device has been sufficiently idle for a substantial amount of time, the debts are halved. The criteria are on the conservative side as we want to resolve the rare extreme cases without impacting regular operation by forgiving debts too readily. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 5160a5a53c0c4ae3708959d9465ea43ad5d90542 Author: Tejun Heo Date: Tue Sep 1 14:52:52 2020 -0400 blk-iocost: implement delay adjustment hysteresis Curently, iocost syncs the delay duration to the outstanding debt amount, which seemed enough to protect the system from anon memory hogs. However, that was mostly because the delay calcuation was using hweight_inuse which quickly converges towards zero under debt for delay duration calculation, often pusnishing debtors overly harshly for longer than deserved. The previous patch fixed the delay calcuation and now the protection against anonymous memory hogs isn't enough because the effect of delay is indirect and non-linear and a huge amount of future debt can accumulate abruptly while unthrottled. This patch implements delay hysteresis so that delay is decayed exponentially over time instead of getting cleared immediately as debt is paid off. While the overall behavior is similar to the blk-cgroup implementation used by blk-iolatency, a lot of the details are different and due to the empirical nature of the mechanism, it's challenging to adapt the mechanism for one controller without negatively impacting the other. As the delay is gradually decayed now, there's no point in running it from its own hrtimer. Periodic updates are now performed from ioc_timer_fn() and the dedicated hrtimer is removed. Signed-off-by: Tejun Heo Cc: Josef Bacik Signed-off-by: Jens Axboe commit c421a3eb2e27402c14131a14390551ae6cdb15fa Author: Tejun Heo Date: Tue Sep 1 14:52:51 2020 -0400 blk-iocost: revamp debt handling Debt handling had several issues. * How much inuse a debtor carries wasn't clearly defined. inuse would be driven down over time from not issuing IOs but it'd be better to clamp it to minimum immediately once in debt. * How much can be paid off was determined by hweight_inuse. As inuse was driven down, the payment amount would fall together regardless of the debtor's active weight. This means that the debtors were punished harshly. * ioc_rqos_merge() wasn't calling blkcg_schedule_throttle() after iocg_kick_delay(). This patch revamps debt handling so that * Debt handling owns inuse for iocgs in debt and keeps them at zero. * Payment amount is determined by hweight_active. This is more deterministic and safer than hweight_inuse but still far from ideal in that it doesn't factor in possible donations from other iocgs for debt payments. This likely needs further improvements in the future. * iocg_rqos_merge() now calls blkcg_schedule_throttle() as necessary. Signed-off-by: Tejun Heo Cc: Andy Newell Signed-off-by: Jens Axboe commit b0853ab4a238c54b8f97ca7dde1ae156e2bbd5e4 Author: Tejun Heo Date: Tue Sep 1 14:52:50 2020 -0400 blk-iocost: revamp in-period donation snapbacks When the margin drops below the minimum on a donating iocg, donation is immediately canceled in full. There are a couple shortcomings with the current behavior. * It's abrupt. A small temporary budget deficit can lead to a wide swing in weight allocation and a large surplus. * It's open coded in the issue path but not implemented for the merge path. A series of merges at a low inuse can make the iocg incur debts and stall incorrectly. This patch reimplements in-period donation snapbacks so that * inuse adjustment and cost calculations are factored into adjust_inuse_and_calc_cost() which is called from both the issue and merge paths. * Snapbacks are more gradual. It occurs in quarter steps. * A snapback triggers if the margin goes below the low threshold and is lower than the budget at the time of the last adjustment. * For the above, __propagate_weights() stores the margin in iocg->saved_margin. Move iocg->last_inuse storing together into __propagate_weights() for consistency. * Full snapback is guaranteed when there are waiters. * With precise donation and gradual snapbacks, inuse adjustments are now a lot more effective and the value of scaling inuse on weight changes isn't clear. Removed inuse scaling from weight_update(). Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit f1de2439ec43b74764f2a26e3a310b24407e3bde Author: Tejun Heo Date: Tue Sep 1 14:52:49 2020 -0400 blk-iocost: revamp donation amount determination iocost has various safety nets to combat inuse adjustment calculation inaccuracies. With Andy's method implemented in transfer_surpluses(), inuse adjustment calculations are now accurate and we can make donation amount determinations accurate too. * Stop keeping track of past usage history and using the maximum. Act on the immediate usage information. * Remove donation constraints defined by SURPLUS_* constants. Donate whatever isn't used. * Determine the donation amount so that the iocg will end up with MARGIN_TARGET_PCT budget at the end of the coming period assuming the same usage as the previous period. TARGET is set at 50% of period, which is the previous maximum. This provides smooth convergence for most repetitive IO patterns. * Apply donation logic early at 20% budget. There's no risk in doing so as the calculation is based on the delta between the current budget and the target budget at the end of the coming period. * Remove preemptive iocg activation for zero cost IOs. As donation can reach near zero now, the mere activation doesn't provide any protection anymore. In the unlikely case that this becomes a problem, the right solution is assigning appropriate costs for such IOs. This significantly improves the donation determination logic while also simplifying it. Now all donations are immediate, exact and smooth. Signed-off-by: Tejun Heo Cc: Andy Newell Signed-off-by: Jens Axboe commit e08d02aa5fc9978ed42240bd80d3fb5dd28ecac0 Author: Tejun Heo Date: Tue Sep 1 14:52:48 2020 -0400 blk-iocost: implement Andy's method for donation weight updates iocost implements work conservation by reducing iocg->inuse and propagating the adjustment upwards proportionally. However, while I knew the target absolute hierarchical proportion - adjusted hweight_inuse, I couldn't figure out how to determine the iocg->inuse adjustment to achieve that and approximated the adjustment by scaling iocg->inuse using the proportion of the needed hweight_inuse changes. When nested, these scalings aren't accurate even when adjusting a single node as the donating node also receives the benefit of the donated portion. When multiple nodes are donating as they often do, they can be wildly wrong. iocost employed various safety nets to combat the inaccuracies. There are ample buffers in determining how much to donate, the adjustments are conservative and gradual. While it can achieve a reasonable level of work conservation in simple scenarios, the inaccuracies can easily add up leading to significant loss of total work. This in turn makes it difficult to closely cap vrate as vrate adjustment is needed to compensate for the loss of work. The combination of inaccurate donation calculations and vrate adjustments can lead to wide fluctuations and clunky overall behaviors. Andy Newell devised a method to calculate the needed ->inuse updates to achieve the target hweight_inuse's. The method is compatible with the proportional inuse adjustment propagation which allows all hot path operations to be local to each iocg. To roughly summarize, Andy's method divides the tree into donating and non-donating parts, calculates global donation rate which is used to determine the target hweight_inuse for each node, and then derives per-level proportions. There's non-trivial amount of math involved. Please refer to the following pdfs for detailed descriptions. https://drive.google.com/file/d/1PsJwxPFtjUnwOY1QJ5AeICCcsL7BM3bo https://drive.google.com/file/d/1vONz1-fzVO7oY5DXXsLjSxEtYYQbOvsE https://drive.google.com/file/d/1WcrltBOSPN0qXVdBgnKm4mdp9FhuEFQN This patch implements Andy's method in transfer_surpluses(). This makes the donation calculations accurate per cycle and enables further improvements in other parts of the donation logic. Signed-off-by: Tejun Heo Cc: Andy Newell Signed-off-by: Jens Axboe commit 93f7d2db80e4aea2731619d7b907a029e0d14259 Author: Tejun Heo Date: Tue Sep 1 14:52:47 2020 -0400 blk-iocost: restructure surplus donation logic The way the surplus donation logic is structured isn't great. There are two separate paths for starting/increasing donations and decreasing them making the logic harder to follow and is prone to unnecessary behavior differences. In preparation for improved donation handling, this patch restructures the code so that * All donors - new, increasing and decreasing - are funneled through the same code path. * The target donation calculation is factored into hweight_after_donation() which is called once from the same spot for all possible donors. * Actual inuse adjustment is factored into trasnfer_surpluses(). This change introduces a few behavior differences - e.g. donation amount reduction now uses the max usage of the recent three periods just like new and increasing donations, and inuse now gets adjusted upwards the same way it gets downwards. These differences are unlikely to have severely negative implications and the whole logic will be revamped soon. This patch also removes two tracepoints. The existing TPs don't quite fit the new implementation. A later patch will update and reinstate them. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 065655c862fedf4b04e1b28b83ca6f338d81cf0b Author: Tejun Heo Date: Tue Sep 1 14:52:46 2020 -0400 blk-iocost: decouple vrate adjustment from surplus transfers Budget donations are inaccurate and could take multiple periods to converge. To prevent triggering vrate adjustments while surplus transfers were catching up, vrate adjustment was suppressed if donations were increasing, which was indicated by non-zero nr_surpluses. This entangling won't be necessary with the scheduled rewrite of donation mechanism which will make it precise and immediate. Let's decouple the two in preparation. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 8692d2db8e01f1a5718f9b67c219b823a64b2088 Author: Tejun Heo Date: Tue Sep 1 14:52:45 2020 -0400 blk-iocost: replace iocg->has_surplus with ->surplus_list Instead of marking iocgs with surplus with a flag and filtering for them while walking all active iocgs, build a surpluses list. This doesn't make much difference now but will help implementing improved donation logic which will iterate iocgs with surplus multiple times. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 1aa50d020c7148f5f0bde15ca80fe6f91a8c5a4e Author: Tejun Heo Date: Tue Sep 1 14:52:44 2020 -0400 blk-iocost: calculate iocg->usages[] from iocg->local_stat.usage_us Currently, iocg->usages[] which are used to guide inuse adjustments are calculated from vtime deltas. This, however, assumes that the hierarchical inuse weight at the time of calculation held for the entire period, which often isn't true and can lead to significant errors. Now that we have absolute usage information collected, we can derive iocg->usages[] from iocg->local_stat.usage_us so that inuse adjustment decisions are made based on actual absolute usage. The calculated usage is clamped between 1 and WEIGHT_ONE and WEIGHT_ONE is also used to signal saturation regardless of the current hierarchical inuse weight. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 97eb19751f155903489f8d42ea658ace2c59faf7 Author: Tejun Heo Date: Tue Sep 1 14:52:43 2020 -0400 blk-iocost: add absolute usage stat Currently, iocost doesn't collect or expose any statistics punting off all monitoring duties to drgn based iocost_monitor.py. While it works for some scenarios, there are some usability and data availability challenges. For example, accurate per-cgroup usage information can't be tracked by vtime progression at all and the number available in iocg->usages[] are really short-term snapshots used for control heuristics with possibly significant errors. This patch implements per-cgroup absolute usage stat counter and exposes it through io.stat along with the current vrate. Usage stat collection and flushing employ the same method as cgroup rstat on the active iocg's and the only hot path overhead is preemption toggling and adding to a percpu counter. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit da437b95db83106319d337a5859e6dfb464b085a Author: Tejun Heo Date: Tue Sep 1 14:52:42 2020 -0400 blk-iocost: grab ioc->lock for debt handling Currently, debt handling requires only iocg->waitq.lock. In the future, we want to adjust and propagate inuse changes depending on debt status. Let's grab ioc->lock in debt handling paths in preparation. * Because ioc->lock nests outside iocg->waitq.lock, the decision to grab ioc->lock needs to be made before entering the critical sections. * Add and use iocg_[un]lock() which handles the conditional double locking. * Add @pay_debt to iocg_kick_waitq() so that debt payment happens only when the caller grabbed both locks. This patch is prepatory and the comments contain references to future changes. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 7ca5b2e60bfa4aa5b8d52e9c3e2a757c581bec1d Author: Tejun Heo Date: Tue Sep 1 14:52:41 2020 -0400 blk-iocost: streamline vtime margin and timer slack handling The margin handling was pretty inconsistent. * ioc->margin_us and ioc->inuse_margin_vtime were used as vtime margin thresholds. However, the two are in different units with the former requiring conversion to vtime on use. * iocg_kick_waitq() was using a quarter of WAITQ_TIMER_MARGIN_PCT of period_us as the timer slack - ~1.2%. While iocg_kick_delay() was using a quarter of ioc->margin_us - ~12.5%. There aren't strong reasons to use different values for the two. This patch cleans up margin and timer slack handling: * vtime margins are now recorded in ioc->margins.{min, max} on period duration changes and used consistently. * Timer slack is now 1% of period_us and recorded in ioc->timer_slack_ns and used consistently for iocg_kick_waitq() and iocg_kick_delay(). The only functional change is shortening of timer slack. No meaningful visible change is expected. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit ce95570acf741ea306baddcb43aba0b59b920a21 Author: Tejun Heo Date: Tue Sep 1 14:52:40 2020 -0400 blk-iocost: make ioc_now->now and ioc->period_at 64bit They are in microseconds and wrap in around 1.2 hours with u32. While unlikely, confusions from wraparounds are still possible. We aren't saving anything meaningful by keeping these u32. Let's make them u64. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit bd0adb91a68b2fbf384ace5287bb46f135e8d889 Author: Tejun Heo Date: Tue Sep 1 14:52:39 2020 -0400 blk-iocost: use WEIGHT_ONE based fixed point number for weights To improve weight donations, we want to able to scale inuse with a greater accuracy and down below 1. Let's make non-hierarchical weights to use WEIGHT_ONE based fixed point numbers too like hierarchical ones. This doesn't cause any behavior changes yet. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit fe20cdb516377e6ac6300254d5ca0dd7d8621ea8 Author: Tejun Heo Date: Tue Sep 1 14:52:38 2020 -0400 blk-iocost: s/HWEIGHT_WHOLE/WEIGHT_ONE/g We're gonna use HWEIGHT_WHOLE for regular weights too. Let's rename it to WEIGHT_ONE. Pure rename. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 7b84b49e381a8538626f200785dd918a402c62d7 Author: Tejun Heo Date: Tue Sep 1 14:52:37 2020 -0400 blk-iocost: make iocg_kick_waitq() call iocg_kick_delay() after paying debt iocg_kick_waitq() is the function which pays debt and iocg_kick_delay() updates the actual delay status accordingly. If iocg_kick_delay() is not called after iocg_kick_delay() updated debt, unnecessarily large delays can be applied temporarily. Let's make sure such conditions don't occur by making iocg_kick_waitq() always call iocg_kick_delay() after paying debt. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 6ef20f787b0aa337dc901d42efa44854e09c87e1 Author: Tejun Heo Date: Tue Sep 1 14:52:36 2020 -0400 blk-iocost: move iocg_kick_delay() above iocg_kick_waitq() We'll make iocg_kick_waitq() call iocg_kick_delay(). Reorder them in preparation. This is pure code reorganization. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit db84a72af6be422abf2089a5896293590dda5066 Author: Tejun Heo Date: Tue Sep 1 14:52:35 2020 -0400 blk-iocost: clamp inuse and skip noops in __propagate_weights() __propagate_weights() currently expects the callers to clamp inuse within [1, active], which is needlessly fragile. The inuse adjustment logic is going to be revamped, in preparation, let's make __propagate_weights() clamp inuse on entry. Also, make it avoid weight updates altogether if neither active or inuse is changed. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 00410f1b09fe7c9a12bde07f0bb4b978a3367f3a Author: Tejun Heo Date: Tue Sep 1 14:52:34 2020 -0400 blk-iocost: rename propagate_active_weights() to propagate_weights() It already propagates two weights - active and inuse - and there will be another soon. Let's drop the confusing misnomers. Rename [__]propagate_active_weights() to [__]propagate_weights() and commit_active_weights() to commit_weights(). This is pure rename. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 5e124f74325d8181b3275a704e87e44246c484f6 Author: Tejun Heo Date: Tue Sep 1 14:52:33 2020 -0400 blk-iocost: use local[64]_t for percpu stat blk-iocost has been reading percpu stat counters from remote cpus which on some archs can lead to torn reads in really rare occassions. Use local[64]_t for those counters. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe commit 1f06959bd2c96342dbac8e29994dd4f69deb956e Author: Christoph Hellwig Date: Mon Aug 31 20:02:39 2020 +0200 block: remove the unused q argument to part_in_flight and part_in_flight_rw Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 8328eb28369a7dbfab6ff26366dbe8094425acc4 Author: Christoph Hellwig Date: Mon Aug 31 20:02:38 2020 +0200 block: remove the disk argument to delete_partition We can trivially derive the gendisk from the hd_struct. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit c20beffeec3cb6f6f52d9aef27f91a3f453a91f4 Author: Christophe Leroy Date: Wed Aug 12 12:25:16 2020 +0000 powerpc/uaccess: Use flexible addressing with __put_user()/__get_user() At the time being, __put_user()/__get_user() and friends only use D-form addressing, with 0 offset. Ex: lwz reg1, 0(reg2) Give the compiler the opportunity to use other adressing modes whenever possible, to get more optimised code. Hereunder is a small exemple: struct test { u32 item1; u16 item2; u8 item3; u64 item4; }; int set_test_user(struct test __user *from, struct test __user *to) { int err; u32 item1; u16 item2; u8 item3; u64 item4; err = __get_user(item1, &from->item1); err |= __get_user(item2, &from->item2); err |= __get_user(item3, &from->item3); err |= __get_user(item4, &from->item4); err |= __put_user(item1, &to->item1); err |= __put_user(item2, &to->item2); err |= __put_user(item3, &to->item3); err |= __put_user(item4, &to->item4); return err; } Before the patch: 00000df0 : df0: 94 21 ff f0 stwu r1,-16(r1) df4: 39 40 00 00 li r10,0 df8: 93 c1 00 08 stw r30,8(r1) dfc: 93 e1 00 0c stw r31,12(r1) e00: 7d 49 53 78 mr r9,r10 e04: 80 a3 00 00 lwz r5,0(r3) e08: 38 e3 00 04 addi r7,r3,4 e0c: 7d 46 53 78 mr r6,r10 e10: a0 e7 00 00 lhz r7,0(r7) e14: 7d 29 33 78 or r9,r9,r6 e18: 39 03 00 06 addi r8,r3,6 e1c: 7d 46 53 78 mr r6,r10 e20: 89 08 00 00 lbz r8,0(r8) e24: 7d 29 33 78 or r9,r9,r6 e28: 38 63 00 08 addi r3,r3,8 e2c: 7d 46 53 78 mr r6,r10 e30: 83 c3 00 00 lwz r30,0(r3) e34: 83 e3 00 04 lwz r31,4(r3) e38: 7d 29 33 78 or r9,r9,r6 e3c: 7d 43 53 78 mr r3,r10 e40: 90 a4 00 00 stw r5,0(r4) e44: 7d 29 1b 78 or r9,r9,r3 e48: 38 c4 00 04 addi r6,r4,4 e4c: 7d 43 53 78 mr r3,r10 e50: b0 e6 00 00 sth r7,0(r6) e54: 7d 29 1b 78 or r9,r9,r3 e58: 38 e4 00 06 addi r7,r4,6 e5c: 7d 43 53 78 mr r3,r10 e60: 99 07 00 00 stb r8,0(r7) e64: 7d 23 1b 78 or r3,r9,r3 e68: 38 84 00 08 addi r4,r4,8 e6c: 93 c4 00 00 stw r30,0(r4) e70: 93 e4 00 04 stw r31,4(r4) e74: 7c 63 53 78 or r3,r3,r10 e78: 83 c1 00 08 lwz r30,8(r1) e7c: 83 e1 00 0c lwz r31,12(r1) e80: 38 21 00 10 addi r1,r1,16 e84: 4e 80 00 20 blr After the patch: 00000dbc : dbc: 39 40 00 00 li r10,0 dc0: 7d 49 53 78 mr r9,r10 dc4: 80 03 00 00 lwz r0,0(r3) dc8: 7d 48 53 78 mr r8,r10 dcc: a1 63 00 04 lhz r11,4(r3) dd0: 7d 29 43 78 or r9,r9,r8 dd4: 7d 48 53 78 mr r8,r10 dd8: 88 a3 00 06 lbz r5,6(r3) ddc: 7d 29 43 78 or r9,r9,r8 de0: 7d 48 53 78 mr r8,r10 de4: 80 c3 00 08 lwz r6,8(r3) de8: 80 e3 00 0c lwz r7,12(r3) dec: 7d 29 43 78 or r9,r9,r8 df0: 7d 43 53 78 mr r3,r10 df4: 90 04 00 00 stw r0,0(r4) df8: 7d 29 1b 78 or r9,r9,r3 dfc: 7d 43 53 78 mr r3,r10 e00: b1 64 00 04 sth r11,4(r4) e04: 7d 29 1b 78 or r9,r9,r3 e08: 7d 43 53 78 mr r3,r10 e0c: 98 a4 00 06 stb r5,6(r4) e10: 7d 23 1b 78 or r3,r9,r3 e14: 90 c4 00 08 stw r6,8(r4) e18: 90 e4 00 0c stw r7,12(r4) e1c: 7c 63 53 78 or r3,r3,r10 e20: 4e 80 00 20 blr Signed-off-by: Christophe Leroy Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c27bc4e598daf3bbb225de7a1f5c52121cf1e279.1597235091.git.christophe.leroy@csgroup.eu commit 76d46a1e2fe2c35f24c07b7cc8a41afbf98b349e Author: Christophe Leroy Date: Fri Aug 14 05:49:29 2020 +0000 powerpc: Remove flush_instruction_cache() on 8xx flush_instruction_cache() is never used on 8xx, remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/245cabd8f291facac8c8c5fd370e361a69e02860.1597384145.git.christophe.leroy@csgroup.eu commit 6b1992bcdee8b86a74362192d4d8906731918bcc Author: Stephen Rothwell Date: Wed Aug 12 18:10:36 2020 +1000 powerpc: unrel_branch_check.sh: enable the use of llvm-objdump v9, 10 or 11 Currently, using llvm-objtool, this script just silently succeeds without actually do the intended checking. So this updates it to work properly. Firstly, llvm-objdump does not add target symbol names to the end of branches in its asm output, so we have to drop the branch to __start_initialization_multiplatform using its address. Secondly, v9 and 10 specify branch targets as .+, so we convert those to actual addresses. Thirdly, v10 and 11 error out on a vmlinux if given the -R option complaining that it is "not a dynamic object". The -R does not make any difference to the asm output, so remove it. Lastly, v11 produces asm that is very similar to Gnu objtool (at least as far as branches are concerned), so no further changes are necessary to make it work. Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200812081036.7969-3-sfr@canb.auug.org.au commit b71dca9891b330d5c2d3ff5d41704aa6f64f8e32 Author: Stephen Rothwell Date: Wed Aug 12 18:10:35 2020 +1000 powerpc: unrel_branch_check.sh: use nm to find symbol value This is considerably faster then parsing the objdump asm output. It will also make the enabling of llvm-objdump a little easier. Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200812081036.7969-2-sfr@canb.auug.org.au commit af13a2244d59c4d63a25abd8257cbaef9d9ffebc Author: Stephen Rothwell Date: Wed Aug 12 00:04:34 2020 +1000 powerpc: unrel_branch_check.sh: exit silently for early errors If we can't find the address of __end_interrupts, then we still exit successfully as that is the current behaviour. Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200811140435.20957-8-sfr@canb.auug.org.au commit 3745ae63b405b09c86718f95d96c4b2d2827b087 Author: Stephen Rothwell Date: Wed Aug 12 00:04:33 2020 +1000 powerpc: unrel_branch_check.sh: fix up the file header Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200811140435.20957-7-sfr@canb.auug.org.au commit b84eaab6ede6477484edc043456cf7d7cfc7f8b3 Author: Stephen Rothwell Date: Wed Aug 12 00:04:32 2020 +1000 powerpc: unrel_branch_check.sh: simplify and tidy up the final loop Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200811140435.20957-6-sfr@canb.auug.org.au commit 3d97abbc9f6fe90973551f3e3eef47ffef863114 Author: Stephen Rothwell Date: Wed Aug 12 00:04:31 2020 +1000 powerpc: unrel_branch_check.sh: convert grep | sed | awk to just sed Also start using sed -E and make all the separate expressions into a single one with comments. Pull the stripping of condition registers back into the sed command. Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200811140435.20957-5-sfr@canb.auug.org.au commit 4e71106c343c625c0bf72a65b244e35e7d2cd037 Author: Stephen Rothwell Date: Wed Aug 12 00:04:30 2020 +1000 powerpc: unrel_branch_check.sh: simplify objdump's asm output We don't use the raw hex instruction dump, so elide it and adjust the following expressions. Also use \s instead of [[:space:]] everywhere. Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200811140435.20957-4-sfr@canb.auug.org.au commit 20ff8ec182160df86571a8af5773ff1e52837d73 Author: Stephen Rothwell Date: Wed Aug 12 00:04:29 2020 +1000 powerpc: unrel_branch_check.sh: simplify and combine some executions Also some minor style changes. There should still be no change in behaviour. Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200811140435.20957-3-sfr@canb.auug.org.au commit d9de6b0da85c9f51734f7648f6e860b89f94c801 Author: Stephen Rothwell Date: Wed Aug 12 00:04:28 2020 +1000 powerpc: unrel_branch_check.sh: fix shellcheck complaints No functional change Signed-off-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200811140435.20957-2-sfr@canb.auug.org.au commit e5e179aa3a39c818db8fbc2dce8d2cd24adaf657 Author: Scott Cheloha Date: Mon Aug 10 20:51:15 2020 -0500 pseries/drmem: don't cache node id in drmem_lmb struct At memory hot-remove time we can retrieve an LMB's nid from its corresponding memory_block. There is no need to store the nid in multiple locations. Note that lmb_to_memblock() uses find_memory_block() to get the corresponding memory_block. As find_memory_block() runs in sub-linear time this approach is negligibly slower than what we do at present. In exchange for this lookup at hot-remove time we no longer need to call memory_add_physaddr_to_nid() during drmem_init() for each LMB. On powerpc, memory_add_physaddr_to_nid() is a linear search, so this spares us an O(n^2) initialization during boot. On systems with many LMBs that initialization overhead is palpable and disruptive. For example, on a box with 249854 LMBs we're seeing drmem_init() take upwards of 30 seconds to complete: [ 53.721639] drmem: initializing drmem v2 [ 80.604346] watchdog: BUG: soft lockup - CPU#65 stuck for 23s! [swapper/0:1] [ 80.604377] Modules linked in: [ 80.604389] CPU: 65 PID: 1 Comm: swapper/0 Not tainted 5.6.0-rc2+ #4 [ 80.604397] NIP: c0000000000a4980 LR: c0000000000a4940 CTR: 0000000000000000 [ 80.604407] REGS: c0002dbff8493830 TRAP: 0901 Not tainted (5.6.0-rc2+) [ 80.604412] MSR: 8000000002009033 CR: 44000248 XER: 0000000d [ 80.604431] CFAR: c0000000000a4a38 IRQMASK: 0 [ 80.604431] GPR00: c0000000000a4940 c0002dbff8493ac0 c000000001904400 c0003cfffffede30 [ 80.604431] GPR04: 0000000000000000 c000000000f4095a 000000000000002f 0000000010000000 [ 80.604431] GPR08: c0000bf7ecdb7fb8 c0000bf7ecc2d3c8 0000000000000008 c00c0002fdfb2001 [ 80.604431] GPR12: 0000000000000000 c00000001e8ec200 [ 80.604477] NIP [c0000000000a4980] hot_add_scn_to_nid+0xa0/0x3e0 [ 80.604486] LR [c0000000000a4940] hot_add_scn_to_nid+0x60/0x3e0 [ 80.604492] Call Trace: [ 80.604498] [c0002dbff8493ac0] [c0000000000a4940] hot_add_scn_to_nid+0x60/0x3e0 (unreliable) [ 80.604509] [c0002dbff8493b20] [c000000000087c10] memory_add_physaddr_to_nid+0x20/0x60 [ 80.604521] [c0002dbff8493b40] [c0000000010d4880] drmem_init+0x25c/0x2f0 [ 80.604530] [c0002dbff8493c10] [c000000000010154] do_one_initcall+0x64/0x2c0 [ 80.604540] [c0002dbff8493ce0] [c0000000010c4aa0] kernel_init_freeable+0x2d8/0x3a0 [ 80.604550] [c0002dbff8493db0] [c000000000010824] kernel_init+0x2c/0x148 [ 80.604560] [c0002dbff8493e20] [c00000000000b648] ret_from_kernel_thread+0x5c/0x74 [ 80.604567] Instruction dump: [ 80.604574] 392918e8 e9490000 e90a000a e92a0000 80ea000c 1d080018 3908ffe8 7d094214 [ 80.604586] 7fa94040 419d00dc e9490010 714a0088 <2faa0008> 409e00ac e9490000 7fbe5040 [ 89.047390] drmem: 249854 LMB(s) With a patched kernel on the same machine we're no longer seeing the soft lockup. drmem_init() now completes in negligible time, even when the LMB count is large. Fixes: b2d3b5ee66f2 ("powerpc/pseries: Track LMB nid instead of using device tree") Signed-off-by: Scott Cheloha Reviewed-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200811015115.63677-1-cheloha@linux.ibm.com commit 704dfe931df951895dea98bd1d9cacbb601b6451 Author: Christophe Leroy Date: Fri Aug 14 05:56:27 2020 +0000 powerpc: Rewrite FSL_BOOKE flush_cache_instruction() in C Nothing prevents flush_cache_instruction() from being writen in C. Do it to improve readability and maintainability. This function is only use by low level callers, it is not intended to be used by module. Don't export it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f989eff8296800c427622c0985384148404e4f0b.1597384512.git.christophe.leroy@csgroup.eu commit de39b19452e784de5f90ae899851ab29a29bb42c Author: Christophe Leroy Date: Fri Aug 14 05:56:26 2020 +0000 powerpc: Rewrite 4xx flush_cache_instruction() in C Nothing prevents flush_cache_instruction() from being writen in C. Do it to improve readability and maintainability. This function is very small and isn't called from assembly, make it static inline in asm/cacheflush.h Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/93d93fc69b4b3ad3ceba2fc0756333c0c0245bb7.1597384512.git.christophe.leroy@csgroup.eu commit f663f3312051402d32952c44d156a20c0b854753 Author: Christophe Leroy Date: Fri Aug 14 05:56:25 2020 +0000 powerpc: Move flush_instruction_cache() prototype in asm/cacheflush.h flush_instruction_cache() belongs to the cache flushing function family. Move its prototype in asm/cacheflush.h Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/993445b5227e8ca2f0e38bcc9ea3dfea6e865920.1597384512.git.christophe.leroy@csgroup.eu commit e426ab39f41045a4c163031272b2f48d944b69c0 Author: Christophe Leroy Date: Fri Aug 14 05:56:24 2020 +0000 powerpc: Remove flush_instruction_cache for book3s/32 The only callers of flush_instruction_cache() are: arch/powerpc/kernel/swsusp_booke.S: bl flush_instruction_cache arch/powerpc/mm/nohash/40x.c: flush_instruction_cache(); arch/powerpc/mm/nohash/44x.c: flush_instruction_cache(); arch/powerpc/mm/nohash/fsl_booke.c: flush_instruction_cache(); arch/powerpc/platforms/44x/machine_check.c: flush_instruction_cache(); arch/powerpc/platforms/44x/machine_check.c: flush_instruction_cache(); This function is not used by book3s/32, drop it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/50098f49877cea0f46730a9df82dcabf84160e4b.1597384512.git.christophe.leroy@csgroup.eu commit 9d6792ffe140240ae54c881cc4183f9acc24b4df Author: Nathan Lynch Date: Thu Aug 13 10:11:31 2020 -0500 powerpc/pseries: explicitly reschedule during drmem_lmb list traversal The drmem lmb list can have hundreds of thousands of entries, and unfortunately lookups take the form of linear searches. As long as this is the case, traversals have the potential to monopolize the CPU and provoke lockup reports, workqueue stalls, and the like unless they explicitly yield. Rather than placing cond_resched() calls within various for_each_drmem_lmb() loop blocks in the code, put it in the iteration expression of the loop macro itself so users can't omit it. Introduce a drmem_lmb_next() iteration helper function which calls cond_resched() at a regular interval during array traversal. Each iteration of the loop in DLPAR code paths can involve around ten RTAS calls which can each take up to 250us, so this ensures the check is performed at worst every few milliseconds. Fixes: 6c6ea53725b3 ("powerpc/mm: Separate ibm, dynamic-memory data from DT format") Signed-off-by: Nathan Lynch Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200813151131.2070161-1-nathanl@linux.ibm.com commit e53281bc21f061f96c9004f534bc3e807d70cb73 Author: Christophe Leroy Date: Fri Aug 14 06:54:49 2020 +0000 powerpc: Drop _nmask_and_or_msr() _nmask_and_or_msr() is only used at two places to set MSR_IP. The SYNC is unnecessary as the users are not PowerPC 601. Can be easily writen in C. Do it, and drop _nmask_and_or_msr() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c2d2b8dfb8dd677026b26dffc8d31070c38a6b89.1597388079.git.christophe.leroy@csgroup.eu commit 6c9100ea39d209e1625ba0fe06134192d9c4752a Author: Stephen Kitt Date: Fri Aug 7 17:27:13 2020 +0200 powerpc: Use simple i2c probe function The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt Acked-by: Wolfram Sang Reviewed-by: Luca Ceresoli Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200807152713.381588-1-steve@sk2.org commit 5d1bc776428f34941a6237afb9454061b5b5e1e1 Author: Scott Cheloha Date: Mon Jul 27 13:46:05 2020 -0500 powerpc/pseries: new lparcfg key/value pair: partition_affinity_score The H_GetPerformanceCounterInfo (GPCI) PHYP hypercall has a subcall, Affinity_Domain_Info_By_Partition, which returns, among other things, a "partition affinity score" for a given LPAR. This score, a value on [0-100], represents the processor-memory affinity for the LPAR in question. A score of 0 indicates the worst possible affinity while a score of 100 indicates perfect affinity. The score can be used to reason about performance. This patch adds the score for the local LPAR to the lparcfg procfile under a new 'partition_affinity_score' key. Signed-off-by: Scott Cheloha Reviewed-by: Tyrel Datwyler Acked-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200727184605.2945095-2-cheloha@linux.ibm.com commit 59562b5c33d6ff3685509ed58b2ed3c5b5712704 Author: Scott Cheloha Date: Mon Jul 27 13:46:04 2020 -0500 powerpc/perf: consolidate GPCI hcall structs into asm/hvcall.h The H_GetPerformanceCounterInfo (GPCI) hypercall input/output structs are useful to modules outside of perf/, so move them into asm/hvcall.h to live alongside the other powerpc hypercall structs. Leave the perf-specific GPCI stuff in perf/hv-gpci.h. Signed-off-by: Scott Cheloha Acked-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200727184605.2945095-1-cheloha@linux.ibm.com commit 82eb1792426f8a171cdaa6cfccb63c39f55bc9bd Author: Christophe Leroy Date: Thu Aug 6 12:20:35 2020 +0000 powerpc: drop hard_reset_now() and poweroff_now() declaration Those function have never existed. Drop their declaration. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/edcdd72a36495d25213c0256c8022367458e0d19.1596716418.git.christophe.leroy@csgroup.eu commit 63442de4301188129e1fcff144fbfb966ad5eb19 Author: Christophe Leroy Date: Thu Aug 6 12:20:34 2020 +0000 powerpc/fpu: Drop cvt_fd() and cvt_df() Those two functions have been unused since commit identified below. Drop them. Fixes: 31bfdb036f12 ("powerpc: Use instruction emulation infrastructure to handle alignment faults") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d5641ada199b8dd2af16ad00a66084cf974f2704.1596716418.git.christophe.leroy@csgroup.eu commit b134cfc3e3276ccd5d29e39de5c848a45b08e410 Author: Christophe Leroy Date: Thu Aug 6 12:19:46 2020 +0000 powerpc/irq: Drop forward declaration of struct irqaction Since the commit identified below, the forward declaration of struct irqaction is useless. Drop it. Fixes: b709c0832824 ("ppc64: move stack switching up in interrupt processing") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e0bcdabac45fcd26c02d7df273bd4a5827c6033d.1596716375.git.christophe.leroy@csgroup.eu commit 169b9afee572853522901b7cbf34842c0494a887 Author: Christophe Leroy Date: Thu Aug 6 12:19:06 2020 +0000 powerpc/hwirq: Remove stale forward irq_chip declaration Since commit identified below, the forward declaration of struct irq_chip is useless (was struct hw_interrupt_type at that time) Remove it, together with the associated comment. Fixes: c0ad90a32fb6 ("[PATCH] genirq: add ->retrigger() irq op to consolidate hw_irq_resend()") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/fbe58d27cf128d5fe581e4510ded8701858f268e.1596716328.git.christophe.leroy@csgroup.eu commit 7db0a07273e8f581d0b3e8a102d3d9dd99f43528 Author: Colin Ian King Date: Thu Aug 6 11:29:01 2020 +0100 macintosh: windfarm: remove detatch debug containing spelling mistakes There are spelling mistakes in two debug messages. As recommended by Wolfram Sang, these can be removed as there is plenty of debug in the driver core. Signed-off-by: Colin Ian King Reviewed-by: Wolfram Sang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200806102901.44988-1-colin.king@canonical.com commit b51ba4fe2e134b631f9c8f45423707aab71449b5 Author: Christophe Leroy Date: Thu Aug 6 06:01:42 2020 +0000 powerpc/32s: Fix assembler warning about r0 The assembler says: arch/powerpc/kernel/head_32.S:1095: Warning: invalid register expression It's objecting to the use of r0 as the RA argument. That's because when RA = 0 the literal value 0 is used, rather than the content of r0, making the use of r0 in the source potentially confusing. Fix it to use a literal 0, the generated code is identical. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2b69ac8e1cddff6f808fc7415907179eab4aae9e.1596693679.git.christophe.leroy@csgroup.eu commit f93af2a494e1d28377065a2320d11da98110a970 Author: Christoph Hellwig Date: Mon Aug 31 20:02:37 2020 +0200 block: cleanup __alloc_disk_node Use early returns and goto-based unwinding to simplify the flow a bit. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e5c7fb400227df5c7822a3c59b193d23e849d0ac Author: Christoph Hellwig Date: Mon Aug 31 20:02:36 2020 +0200 block: move the devcgroup_inode_permission call to blkdev_get devcgroup_inode_permission is never called for the recusive case, so move it out into blkdev_get. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 46d40cfad13ccbd0739019d754d46d8f93e1d5aa Author: Christoph Hellwig Date: Mon Aug 31 20:02:35 2020 +0200 block: remove an outdated comment on the bd_dev field kdev_t is long gone, so we don't need to comment a field isn't one.. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 7cf34d97ab45203b975396393ded9d3867dfa8bf Author: Christoph Hellwig Date: Mon Aug 31 20:02:34 2020 +0200 block: remove the discard_alignment field from struct hd_struct The alignment offset is only used in slow path callers, so just calculate it on the fly. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 7b8917f5e29c377be1db5680249fe30e038cb3eb Author: Christoph Hellwig Date: Mon Aug 31 20:02:33 2020 +0200 block: remove the alignment_offset field from struct hd_struct The alignment offset is only used in slow path callers, so just calculate it on the fly. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e44a6a2359808e0b97ff894569748ad2593b06f9 Author: Xianting Tian Date: Thu Aug 27 14:34:17 2020 +0800 blk-mq: use BLK_MQ_NO_TAG for no tag Replace various magic -1 constants for tags with BLK_MQ_NO_TAG. Signed-off-by: Xianting Tian Signed-off-by: Jens Axboe commit cdfcef9ee87745d9511ad8825e1d2b8b861884da Author: Baolin Wang Date: Fri Aug 28 10:52:57 2020 +0800 block: Remove blk_mq_attempt_merge() function The small blk_mq_attempt_merge() function is only called by __blk_mq_sched_bio_merge(), just open code it. Reviewed-by: Christoph Hellwig Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 7d7ca7c5269becab86c9f595309c8e90ce268967 Author: Baolin Wang Date: Fri Aug 28 10:52:56 2020 +0800 block: Add a new helper to attempt to merge a bio There are lots of duplicated code when trying to merge a bio from plug list and sw queue, we can introduce a new helper to attempt to merge a bio, which can simplify the blk_bio_list_merge() and blk_attempt_plug_merge(). Reviewed-by: Christoph Hellwig Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit bdc6a287bc98e8f32bf52c9cb2d1bdf75975f5a0 Author: Baolin Wang Date: Fri Aug 28 10:52:55 2020 +0800 block: Move blk_mq_bio_list_merge() into blk-merge.c Move the blk_mq_bio_list_merge() into blk-merge.c and rename it as a generic name. Reviewed-by: Christoph Hellwig Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 8e756373d7c8eb6f8876411bed45e4b1c736eb53 Author: Baolin Wang Date: Fri Aug 28 10:52:54 2020 +0800 block: Move bio merge related functions into blk-merge.c It's better to move bio merge related functions into blk-merge.c, which contains all merge related functions. Reviewed-by: Christoph Hellwig Signed-off-by: Baolin Wang Signed-off-by: Jens Axboe commit 339b5a25c28c1d85afd0ce882f57962ad550bc6a Author: Danny Lin Date: Sat Aug 29 02:13:53 2020 -0700 blk-wbt: Remove obsolete multiqueue I/O scheduling comment This comment was added before the multiqueue I/O scheduler framework was introduced; multiqueue has support for I/O scheduling now, so this obsolete comment can be removed. Signed-off-by: Danny Lin Signed-off-by: Jens Axboe commit 4ce790632803bf2ec47271895a59936c70df7e78 Author: Tian Tao Date: Fri Aug 21 09:19:15 2020 +0800 virtio-blk: Use kobj_to_dev() instead of container_of() Use kobj_to_dev() instead of container_of() Signed-off-by: Tian Tao Reviewed-by: Bart Van Assche Reviewed-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Signed-off-by: Jens Axboe commit c4823983538d5fdf38575b3f3ba3a0d10b7f021a Author: Christoph Hellwig Date: Wed Aug 19 09:35:33 2020 +0200 raw: deprecate the raw driver The raw driver has been replaced by O_DIRECT support on the block device in 2002. Deprecate it to prepare for removal in a few kernel releases. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 3310eebafe6f9a872c1f757b3d822dafae9c0cd8 Author: Christoph Hellwig Date: Thu Aug 27 17:37:48 2020 +0200 block: remove the BIO_USER_MAPPED flag Just check if there is private data, in which case the bio must have originated from bio_copy_user_iov. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 7589ad6729d6a707c6ce97693106d42cbb121b42 Author: Christoph Hellwig Date: Thu Aug 27 17:37:47 2020 +0200 block: remove __blk_rq_map_user_iov Just duplicate a small amount of code in the low-level map into the bio and copy to the bio routines, leading to much easier to follow and maintain code, and better shared error handling. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 7b63c052a580d7d5ed83a6e2a327e85881fa679a Author: Christoph Hellwig Date: Thu Aug 27 17:37:46 2020 +0200 block: remove __blk_rq_unmap_user Open code __blk_rq_unmap_user in the two callers. Both never pass a NULL bio, and one of them can use an existing local variable instead of the bio flag. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f3256075ba49d80835b601bfbff350a2140b2924 Author: Christoph Hellwig Date: Thu Aug 27 17:37:45 2020 +0200 block: remove the BIO_NULL_MAPPED flag We can simply use a boolean flag in the bio_map_data data structure instead. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit c13f0fbc4c191aab5e95b01589ff5bbc6556e4f6 Author: Christoph Hellwig Date: Sun Aug 23 11:10:43 2020 +0200 nvme: don't call revalidate_disk from nvme_set_queue_dying In nvme_set_queue_dying we really just want to ensure the disk and bdev sizes are set to zero. Going through revalidate_disk leads to a somewhat arcance and complex callchain relying on special behavior in a few places. Instead just lift the set_capacity directly to nvme_set_queue_dying, and rename and move the nvme_mpath_update_disk_size helper so that we can use it in nvme_set_queue_dying to propagate the size to the bdev without detours. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit c2b4bb8cb3741c0bacf3683e4c1ecd04c977ada3 Author: Christoph Hellwig Date: Sun Aug 23 11:10:42 2020 +0200 block: fix locking for struct block_device size updates Two different callers use two different mutexes for updating the block device size, which obviously doesn't help to actually protect against concurrent updates from the different callers. In addition one of the locks, bd_mutex is rather prone to deadlocks with other parts of the block stack that use it for high level synchronization. Switch to using a new spinlock protecting just the size updates, as that is all we need, and make sure everyone does the update through the proper helper. This fixes a bug reported with the nvme revalidating disks during a hot removal operation, which can currently deadlock on bd_mutex. Reported-by: Xianting Tian Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 611bee526b4a89d49f1b9914a770bfdc101d5fb5 Author: Christoph Hellwig Date: Sun Aug 23 11:10:41 2020 +0200 block: replace bd_set_size with bd_set_nr_sectors Replace bd_set_size with a version that takes the number of sectors instead, as that fits most of the current and future callers much better. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe commit db04e18dbb0146d3c753dc05f7233350375bbc48 Author: Geert Uytterhoeven Date: Wed Aug 19 14:34:03 2020 +0200 block: Make request_queue.rpm_status an enum request_queue.rpm_status is assigned values of the rpm_status enum only, so reflect that in its type. Note that including is (currently) a no-op, as it is already included through and , but it is better to play it safe. Signed-off-by: Geert Uytterhoeven Acked-by: Rafael J. Wysocki Signed-off-by: Jens Axboe commit a98278ecfb96ad9c6561d3490159b17ee7668bed Merge: f75aef392f869 e11d80a849e01 Author: Jens Axboe Date: Tue Sep 1 16:49:20 2020 -0600 Merge branch 'block-5.9' into for-5.10/block * block-5.9: blk-stat: make q->stats->lock irqsafe blk-iocost: ioc_pd_free() shouldn't assume irq disabled block: fix locking in bdev_del_partition block: release disk reference in hd_struct_free_work block: ensure bdi->io_pages is always initialized nvme-pci: cancel nvme device request before disabling nvme: only use power of two io boundaries nvme: fix controller instance leak nvmet-fc: Fix a missed _irqsave version of spin_lock in 'nvmet_fc_fod_op_done()' nvme: Fix NULL dereference for pci nvme controllers nvme-rdma: fix reset hang if controller died in the middle of a reset nvme-rdma: fix timeout handler nvme-rdma: serialize controller teardown sequences nvme-tcp: fix reset hang if controller died in the middle of a reset nvme-tcp: fix timeout handler nvme-tcp: serialize controller teardown sequences nvme: have nvme_wait_freeze_timeout return if it timed out nvme-fabrics: don't check state NVME_CTRL_NEW for request acceptance nvmet-tcp: Fix NULL dereference when a connect data comes in h2cdata pdu commit dc1a9bf2c8169d9f607502162af1858a73a18cb8 Author: Sunil Goutham Date: Tue Sep 1 15:01:42 2020 +0530 octeontx2-pf: Add UDP segmentation offload support Defines UDP segmentation algorithm in hardware and supports offloading UDP segmentation. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit ceb96fae397a2fafd631d97edb387707481e7c6b Author: Andrew Lunn Date: Tue Sep 1 04:32:57 2020 +0200 net: dsa: mv88e6xxx: Fix W=1 warning with !CONFIG_OF When building on platforms without device tree, e.g. amd64, W=1 gives a warning about mv88e6xxx_mdio_external_match being unused. Replace of_match_node() with of_device_is_compatible() to prevent this warning. Suggested-by: Andy Shevchenko Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 66734e32463bd1346466f92662feeaccef26e94f Author: Julien Thierry Date: Tue Aug 25 13:47:42 2020 +0100 objtool: Define 'struct orc_entry' only when needed Implementation of ORC requires some definitions that are currently provided by the target architecture headers. Do not depend on these definitions when the orc subcommand is not implemented. This avoid requiring arches with no orc implementation to provide dummy orc definitions. Signed-off-by: Julien Thierry Reviewed-by: Miroslav Benes Signed-off-by: Josh Poimboeuf commit 3eaecac88a17f7fdf29561a197dc728f7f697c60 Author: Julien Thierry Date: Tue Aug 25 13:47:41 2020 +0100 objtool: Skip ORC entry creation for non-text sections Orc generation is only done for text sections, but some instructions can be found in non-text sections (e.g. .discard.text sections). Skip setting their orc sections since their whole sections will be skipped for orc generation. Reviewed-by: Miroslav Benes Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit d44becb9decf4438d1e555b1428634964d2e5764 Author: Julien Thierry Date: Tue Aug 25 13:47:40 2020 +0100 objtool: Move ORC logic out of check() Now that the objtool_file can be obtained outside of the check function, orc generation builtin no longer requires check to explicitly call its orc related functions. Signed-off-by: Julien Thierry Reviewed-by: Miroslav Benes Signed-off-by: Josh Poimboeuf commit 6545eb030e6f14cef8793a86312483c788eaee46 Author: Julien Thierry Date: Tue Aug 25 13:47:39 2020 +0100 objtool: Move object file loading out of check() Structure objtool_file can be used by different subcommands. In fact it already is, by check and orc. Provide a function that allows to initialize objtool_file, that builtin can call, without relying on check to do the correct setup for them and explicitly hand the objtool_file to them. Reviewed-by: Miroslav Benes Signed-off-by: Julien Thierry Signed-off-by: Josh Poimboeuf commit 1ad5f100e3ba73fe75615f720fa721f039759ee6 Author: Chuck Lever Date: Mon Aug 31 13:54:24 2020 -0400 locks: Remove extra "0x" in tracepoint format specifier Clean up: %p adds its own 0x already. Signed-off-by: Chuck Lever Signed-off-by: Jeff Layton commit 0697fecf7ecd8abf70d0f46e6a352818e984cc9f Merge: e0afe91443a5f 8d138373c555b Author: David S. Miller Date: Tue Sep 1 13:23:58 2020 -0700 Merge branch 'dpaa2-eth-add-a-dpaa2_eth_-prefix-to-all-functions' Ioana Ciornei says: ==================== dpaa2-eth: add a dpaa2_eth_ prefix to all functions This is just a quick cleanup that aims at adding a dpaa2_eth_ prefix to all functions within the dpaa2-eth driver even if those are static and private to the driver. The main reason for doing this is that looking a perf top, for example, is becoming an inconvenience because one cannot easily determine which entries are dpaa2-eth related or not. ==================== Signed-off-by: David S. Miller commit 8d138373c555b34c17f9d2a2cb49ff1c9612723c Author: Ioana Ciornei Date: Mon Aug 31 21:12:40 2020 +0300 dpaa2-eth: add a dpaa2_eth_ prefix to all functions in dpaa2-eth-dcb.c Some static functions in the dpaa2-eth driver don't have the dpaa2_eth_ prefix and this is becoming an inconvenience when looking at, for example, a perf top output and trying to determine easily which entries are dpaa2-eth related. Ammend this by adding the prefix to all the functions. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 5d8dccf8bad96bdc5bd5594344ff67539cf3a733 Author: Ioana Ciornei Date: Mon Aug 31 21:12:39 2020 +0300 dpaa2-eth: add a dpaa2_eth_ prefix to all functions in dpaa2-eth.c Some static functions in the dpaa2-eth driver don't have the dpaa2_eth_ prefix and this is becoming an inconvenience when looking at, for example, a perf top output and trying to determine easily which entries are dpaa2-eth related. Ammend this by adding the prefix to all the functions. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit e6734cd9dbf5d6c242c75a2a842606efdcd60082 Author: Ioana Ciornei Date: Mon Aug 31 21:12:38 2020 +0300 dpaa2-eth: add a dpaa2_eth_ prefix to all functions in dpaa2-ethtool.c Some static functions in the dpaa2-eth driver don't have the dpaa2_eth_ prefix and this is becoming an inconvenience when looking at, for example, a perf top output and trying to determine easily which entries are dpaa2-eth related. Ammend this by adding the prefix to all the functions. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit e0afe91443a5fddef9213e7f429ab7f12756e769 Author: Eelco Chaudron Date: Mon Aug 31 11:57:57 2020 +0200 net: openvswitch: fixes crash if nf_conncount_init() fails If nf_conncount_init fails currently the dispatched work is not canceled, causing problems when the timer fires. This change fixes this by not scheduling the work until all initialization is successful. Fixes: a65878d6f00b ("net: openvswitch: fixes potential deadlock in dp cleanup code") Reported-by: kernel test robot Signed-off-by: Eelco Chaudron Reviewed-by: Tonghao Zhang Signed-off-by: David S. Miller commit 36a782fdcc2bfe39265ac4640f29404493b52a55 Author: Thomas Falcon Date: Mon Aug 31 11:59:57 2020 -0500 ibmvnic: Harden device Command Response Queue handshake In some cases, the device or firmware may be busy when the driver attempts to perform the CRQ initialization handshake. If the partner is busy, the hypervisor will return the H_CLOSED return code. The aim of this patch is that, if the device is not ready, to query the device a number of times, with a small wait time in between queries. If all initialization requests fail, the driver will remain in a dormant state, awaiting a signal from the device that it is ready for operation. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit 150f29f5e6ea55d8a7d368b162a4e9947a95d2f5 Merge: 8aa639e1483bb ebc4ecd48ca65 Author: David S. Miller Date: Tue Sep 1 13:05:08 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2020-09-01 The following pull-request contains BPF updates for your *net-next* tree. There are two small conflicts when pulling, resolve as follows: 1) Merge conflict in tools/lib/bpf/libbpf.c between 88a82120282b ("libbpf: Factor out common ELF operations and improve logging") in bpf-next and 1e891e513e16 ("libbpf: Fix map index used in error message") in net-next. Resolve by taking the hunk in bpf-next: [...] scn = elf_sec_by_idx(obj, obj->efile.btf_maps_shndx); data = elf_sec_data(obj, scn); if (!scn || !data) { pr_warn("elf: failed to get %s map definitions for %s\n", MAPS_ELF_SEC, obj->path); return -EINVAL; } [...] 2) Merge conflict in drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c between 9647c57b11e5 ("xsk: i40e: ice: ixgbe: mlx5: Test for dma_need_sync earlier for better performance") in bpf-next and e20f0dbf204f ("net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES") in net-next. Resolve the two locations by retaining net_prefetch() and taking xsk_buff_dma_sync_for_cpu() from bpf-next. Should look like: [...] xdp_set_data_meta_invalid(xdp); xsk_buff_dma_sync_for_cpu(xdp, rq->xsk_pool); net_prefetch(xdp->data); [...] We've added 133 non-merge commits during the last 14 day(s) which contain a total of 246 files changed, 13832 insertions(+), 3105 deletions(-). The main changes are: 1) Initial support for sleepable BPF programs along with bpf_copy_from_user() helper for tracing to reliably access user memory, from Alexei Starovoitov. 2) Add BPF infra for writing and parsing TCP header options, from Martin KaFai Lau. 3) bpf_d_path() helper for returning full path for given 'struct path', from Jiri Olsa. 4) AF_XDP support for shared umems between devices and queues, from Magnus Karlsson. 5) Initial prep work for full BPF-to-BPF call support in libbpf, from Andrii Nakryiko. 6) Generalize bpf_sk_storage map & add local storage for inodes, from KP Singh. 7) Implement sockmap/hash updates from BPF context, from Lorenz Bauer. 8) BPF xor verification for scalar types & add BPF link iterator, from Yonghong Song. 9) Use target's prog type for BPF_PROG_TYPE_EXT prog verification, from Udip Pant. 10) Rework BPF tracing samples to use libbpf loader, from Daniel T. Lee. 11) Fix xdpsock sample to really cycle through all buffers, from Weqaar Janjua. 12) Improve type safety for tun/veth XDP frame handling, from Maciej Żenczykowski. 13) Various smaller cleanups and improvements all over the place. ==================== Signed-off-by: David S. Miller commit e7a7499d841bfc9c7a4443f0fd7a04ae49bdbdd3 Author: Krzysztof Wilczyński Date: Mon Aug 24 23:39:16 2020 +0000 PCI: Use scnprintf(), not snprintf(), in sysfs "show" functions Sysfs "show" methods should return the number of bytes printed into the buffer. This is the return value of scnprintf() [1]. snprintf(buf, size, ...) prints at most "size" bytes into "buf", but returns the number of bytes that *would* be printed if "buf" were large enough. Replace use of snprintf() with scnprintf(). No functional change intended. Related: https://patchwork.kernel.org/patch/9946759/#20969333 https://lwn.net/Articles/69419 [1] Documentation/filesystems/sysfs.rst [bhelgaas: squashed, commit log] Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20200824233918.26306-2-kw@linux.com Link: https://lore.kernel.org/r/20200824233918.26306-3-kw@linux.com Link: https://lore.kernel.org/r/20200824233918.26306-4-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 8aa639e1483bbdc0615796801829c773724f6645 Author: YueHaibing Date: Tue Sep 1 22:11:15 2020 +0800 liquidio: Remove unneeded cast from memory allocation Remove unneeded return value cast. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 1bac035c59a26e6f6ebbdb399a3b896a6ef9478f Author: YueHaibing Date: Tue Sep 1 22:10:28 2020 +0800 net: sungem: Remove unneeded cast from memory allocation Remove dma_alloc_coherent return value cast. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit ffa81fa46e2de4563350c89fae0c879ed77330d6 Author: Yutaro Hayakawa Date: Tue Sep 1 22:59:45 2020 +0900 net/tls: Implement getsockopt SOL_TLS TLS_RX Implement the getsockopt SOL_TLS TLS_RX which is currently missing. The primary usecase is to use it in conjunction with TCP_REPAIR to checkpoint/restore the TLS record layer state. TLS connection state usually exists on the user space library. So basically we can easily extract it from there, but when the TLS connections are delegated to the kTLS, it is not the case. We need to have a way to extract the TLS state from the kernel for both of TX and RX side. The new TLS_RX getsockopt copies the crypto_info to user in the same way as TLS_TX does. We have described use cases in our research work in Netdev 0x14 Transport Workshop [1]. Also, there is an TLS implementation called tlse [2] which supports TLS connection migration. They have support of kTLS and their code shows that they are expecting the future support of this option. [1] https://speakerdeck.com/yutarohayakawa/prism-proxies-without-the-pain [2] https://github.com/eduardsui/tlse Signed-off-by: Yutaro Hayakawa Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 66077adb70a2a9e92540155b2ace33ec98299c90 Author: Krzysztof Kozlowski Date: Thu Aug 27 09:07:43 2020 +0200 EDAC/ti: Fix handling of platform_get_irq() error platform_get_irq() returns a negative error number on error. In such a case, comparison to 0 would pass the check therefore check the return value properly, whether it is negative. [ bp: Massage commit message. ] Fixes: 86a18ee21e5e ("EDAC, ti: Add support for TI keystone and DRA7xx EDAC") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Borislav Petkov Reviewed-by: Tero Kristo Link: https://lkml.kernel.org/r/20200827070743.26628-2-krzk@kernel.org commit c70ed3f77ca646c6e57bee54d570d9dab1246589 Merge: 34e1ec319e993 e6896163b20cc Author: David S. Miller Date: Tue Sep 1 11:42:15 2020 -0700 Merge branch 'net-openvswitch-improve-the-codes' Tonghao Zhang says: ==================== net: openvswitch: improve the codes This series patches are not bug fix, just improve codes. ==================== Signed-off-by: David S. Miller commit e6896163b20cc2dc1c169fa5e007243a4f9650a4 Author: Tonghao Zhang Date: Tue Sep 1 20:26:14 2020 +0800 net: openvswitch: remove unused keep_flows keep_flows was introduced by [1], which used as flag to delete flows or not. When rehashing or expanding the table instance, we will not flush the flows. Now don't use it anymore, remove it. [1] - https://github.com/openvswitch/ovs/commit/acd051f1761569205827dc9b037e15568a8d59f8 Cc: Pravin B Shelar Signed-off-by: Tonghao Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit df68d64ee3f54556aca1d50607e57b3129949a42 Author: Tonghao Zhang Date: Tue Sep 1 20:26:13 2020 +0800 net: openvswitch: refactor flow free function Decrease table->count and ufid_count unconditionally, because we only don't use count or ufid_count to count when flushing the flows. To simplify the codes, we remove the "count" argument of table_instance_flow_free. To avoid a bug when deleting flows in the future, add WARN_ON in flush flows function. Cc: Pravin B Shelar Signed-off-by: Tonghao Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit cf3266ad482d1bce2c49b6cd856a3f2d46f65023 Author: Tonghao Zhang Date: Tue Sep 1 20:26:12 2020 +0800 net: openvswitch: improve the coding style Not change the logic, just improve the coding style. Cc: Pravin B Shelar Signed-off-by: Tonghao Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit afce6996943be265fa39240b67025cfcb1bcdfb1 Author: Krzysztof Kozlowski Date: Thu Aug 27 09:07:42 2020 +0200 EDAC/aspeed: Fix handling of platform_get_irq() error platform_get_irq() returns a negative error number on error. In such a case, comparison to 0 would pass the check therefore check the return value properly, whether it is negative. [ bp: Massage commit message. ] Fixes: 9b7e6242ee4e ("EDAC, aspeed: Add an Aspeed AST2500 EDAC driver") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Borislav Petkov Reviewed-by: Stefan Schaeckeler Link: https://lkml.kernel.org/r/20200827070743.26628-1-krzk@kernel.org commit 4c2af5ddf84b45720102cd6348105a288417a214 Author: Krzysztof Kozlowski Date: Sat Aug 22 18:32:18 2020 +0200 memory: samsung: exynos5422-dmc: add missing and fix kerneldoc Add missing kerneldoc to struct exynos5_dmc and correct the existing kerneldoc in other places to fix W=1 warnings like: drivers/memory/samsung/exynos5422-dmc.c:107: warning: Function parameter or member 'freq_hz' not described in 'dmc_opp_table' drivers/memory/samsung/exynos5422-dmc.c:154: warning: Function parameter or member 'dev' not described in 'exynos5_dmc' drivers/memory/samsung/exynos5422-dmc.c:357: warning: Excess function parameter 'param' description in 'exynos5_set_bypass_dram_timings' drivers/memory/samsung/exynos5422-dmc.c:630: warning: Function parameter or member 'flags' not described in 'exynos5_dmc_get_volt_freq' drivers/memory/samsung/exynos5422-dmc.c:962: warning: cannot understand function prototype: 'struct devfreq_dev_profile exynos5_dmc_df_profile = ' drivers/memory/samsung/exynos5422-dmc.c:1011: warning: Function parameter or member 'reg_timing_row' not described in 'create_timings_aligned' drivers/memory/samsung/exynos5422-dmc.c:1011: warning: Excess function parameter 'idx' description in 'create_timings_aligned' drivers/memory/samsung/exynos5422-dmc.c:1345: warning: Excess function parameter 'set' description in 'exynos5_dmc_set_pause_on_switching' Signed-off-by: Krzysztof Kozlowski Acked-by: Lukasz Luba Link: https://lore.kernel.org/r/20200822163218.21857-3-krzk@kernel.org commit 1415fa0dca591b547465bd6bee9cd940920df6e9 Author: Krzysztof Kozlowski Date: Sat Aug 22 18:32:17 2020 +0200 memory: samsung: exynos5422-dmc: remove unused exynos5_dmc members The struct exynos5_dmc members bypass_rate, mx_mspll_ccore_phy, mout_mx_mspll_ccore_phy and opp_bypass are not actually used. Apparently there was a plan to store the OPP for the bypass mode in opp_bypass member, but driver fails to do it and instead always sets target voltage during bypass mode. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200822163218.21857-2-krzk@kernel.org commit bb0ebc7d39647c2e5062fb112d90f41fc2113aae Author: Krzysztof Kozlowski Date: Sat Aug 22 18:32:16 2020 +0200 memory: samsung: exynos5422-dmc: rename timing register fields variables The driver has file-scope arrays defining fields of timing registers (e.g. struct timing_reg timing_row) and actual values for these registers per each OPP in state container (struct exynos5_dmc.timing_row). The meanings of these are different so use different names to avoid confusion. Signed-off-by: Krzysztof Kozlowski Acked-by: Lukasz Luba Link: https://lore.kernel.org/r/20200822163218.21857-1-krzk@kernel.org commit f3d95f5f5136b75d20aa8242f8ebd65f5d773676 Author: Vinod Koul Date: Mon Jul 27 13:31:18 2020 +0530 arm64: defconfig: Enable Lontium LT9611 driver Lontium LT9611 HDMI bridge can be found in Dragon Board RB3 for converting DSI to HDMI. Enable this driver to get display working on RB3 Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20200727080118.1934079-1-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 4c6491a343e91a5a2a699b0b545f8ba1ec1e8c65 Author: YueHaibing Date: Tue Sep 1 11:57:22 2020 +0800 staging: spmi: hisi-spmi-controller: Use proper format in call to dev_err() The correct format string for a size_t argument should be %zu. Signed-off-by: YueHaibing Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20200901035722.9324-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit e670f1d0970789c72aefbc89d57e971b15b4b727 Author: Bjorn Andersson Date: Fri Jul 3 11:53:54 2020 -0700 arm64: defcondfig: Enable USB ACM and FTDI drivers Enable USB serial drivers to provide UART access to various development boards from an ARM64 host. Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200703185354.1814337-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 62d2e63c3ef6622dee42b2ef5f2a4690125af12c Author: YueHaibing Date: Sat Aug 29 20:41:14 2020 +0800 staging: rtl8723bs: os_dep: return errcode in cfg80211_rtw_leave_ibss() We should return error to caller in cfg80211_rtw_leave_ibss(). Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200829124114.5792-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 75069a4e8253e381cfc7e9d4f0d986842fc28e95 Author: Michael Straube Date: Sun Aug 30 09:21:40 2020 +0200 staging: rtl8188eu: use __func__ in os_dep Use __func__ instead of hardcoded function names to clear checkpatch warnings. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200830072140.14178-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 608a911bcd3ddc20579191ebfca498e6dfbedf74 Author: Sebastian Fuentes Date: Sun Aug 30 18:48:59 2020 -0700 staging: qlge: qlge_mpi: Fix several CHECKs involving braces CHECK: Blank lines aren't necessary before a close brace '}' FILE: drivers/staging/qlge/qlge_mpi.c:121: CHECK: Unbalanced braces around else statement FILE: drivers/staging/qlge/qlge_mpi.c:243: CHECK: braces {} should be used on all arms of this statement FILE: drivers/staging/qlge/qlge_mpi.c:350: CHECK: Unbalanced braces around else statement FILE: drivers/staging/qlge/qlge_mpi.c:352: CHECK: Blank lines aren't necessary before a close brace '}' FILE: drivers/staging/qlge/qlge_mpi.c:360: CHECK: Blank lines aren't necessary after an open brace '{' FILE: drivers/staging/qlge/qlge_mpi.c:408: CHECK: braces {} should be used on all arms of this statement FILE: drivers/staging/qlge/qlge_mpi.c:997: CHECK: Unbalanced braces around else statement FILE: drivers/staging/qlge/qlge_mpi.c:1001: Signed-off-by: Sebastian Fuentes Link: https://lore.kernel.org/r/20200831014859.GA29362@ubuntu Signed-off-by: Greg Kroah-Hartman commit 035fff1f7aab43e420e0098f0854470a5286fb83 Author: Randy Dunlap Date: Fri Aug 21 17:10:27 2020 -0700 x86/PCI: Fix intel_mid_pci.c build error when ACPI is not enabled Fix build error when CONFIG_ACPI is not set/enabled by adding the header file which contains a stub for the function in the build error. ../arch/x86/pci/intel_mid_pci.c: In function ‘intel_mid_pci_init’: ../arch/x86/pci/intel_mid_pci.c:303:2: error: implicit declaration of function ‘acpi_noirq_set’; did you mean ‘acpi_irq_get’? [-Werror=implicit-function-declaration] acpi_noirq_set(); Fixes: a912a7584ec3 ("x86/platform/intel-mid: Move PCI initialization to arch_init()") Link: https://lore.kernel.org/r/ea903917-e51b-4cc9-2680-bc1e36efa026@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Reviewed-by: Jesse Barnes Acked-by: Thomas Gleixner Cc: stable@vger.kernel.org # v4.16+ Cc: Jacob Pan Cc: Len Brown Cc: Jesse Barnes Cc: Arjan van de Ven commit 00da4805c3e1dd843de91794662809ec2516784e Author: Gustavo Pimentel Date: Thu Aug 13 15:51:51 2020 +0200 PCI: Remove unnecessary header includes Remove unnecessary includes of: linux/of_pci.h linux/pci-ats.h asm/setup.h CoverityScan CID 16442, 16443, 16444 ("Unnecessary header file (HFA)") Link: https://lore.kernel.org/r/eba4c0f2b35b1442773a722f1cf73f7240f818e3.1597325845.git.gustavo.pimentel@synopsys.com Link: https://lore.kernel.org/r/72ade1f5af35b994a7a8216ea5dc32c27cf134cd.1597325845.git.gustavo.pimentel@synopsys.com Link: https://lore.kernel.org/r/715821dc855add2565505ff8dcb9970e87996c5c.1597325845.git.gustavo.pimentel@synopsys.com [bhelgaas: squash] Signed-off-by: Gustavo Pimentel Signed-off-by: Bjorn Helgaas Cc: Joao Pinto commit 385d41d7edbc37d6b30197672b744021ce3baccf Author: Rikard Falkeborn Date: Sun Aug 30 00:11:04 2020 +0200 regulator: tps65910: Constify static regulator_ops The only usage of these is to assign their address to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200829221104.20870-9-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit e92b8ef87a8a4a95056d6b5852bd4b5288f34540 Author: Rikard Falkeborn Date: Sun Aug 30 00:11:03 2020 +0200 regulator: tps65912: Constify static regulator_ops The only usage of tps65912_ops_dcdc and tps65912_ops_ldo is to assign their address to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200829221104.20870-8-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 25c8044502ca9fb684fe7a0612985069e27e01eb Author: Rikard Falkeborn Date: Sun Aug 30 00:11:02 2020 +0200 regulator: tps6586x: Constify static regulator_ops The only usage of these are to assign their address to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200829221104.20870-7-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 7d844ac3b5a8a97ae4a05d9f545346a4fca77cea Author: Rikard Falkeborn Date: Sun Aug 30 00:11:01 2020 +0200 regulator: tps65090: constify static regulator_ops The only usages of these are to assign their address to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200829221104.20870-6-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 2e6d9db83ac7c65b986d3037620dc735dee7383f Author: Rikard Falkeborn Date: Sun Aug 30 00:11:00 2020 +0200 regulator: tps65086: Constify static regulator_ops The only usage of reg_ops and switch_ops is to assign their addresses to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200829221104.20870-5-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 01167e88e9372f9748e94a7322b0d43ccb980d9f Author: Rikard Falkeborn Date: Sun Aug 30 00:10:59 2020 +0200 regulator: tps62360: Constify tps62360_dcdc_ops The only usage of tps62360_dcdc_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200829221104.20870-4-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 55c81934e7040c1e0c26b72ee752203ccf190b51 Author: Rikard Falkeborn Date: Sun Aug 30 00:10:58 2020 +0200 regulator: tps6105x: Constify tps6105x_regulator_ops The only usage of tps6105x_regulator_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200829221104.20870-3-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit dcb97c10f967c2cfea4c6316f026bc4a4a165f1e Author: Rikard Falkeborn Date: Sun Aug 30 00:10:57 2020 +0200 regulator: tps51632: Constify tps51632_dcdc_ops The only usage of tps51632_dcdc_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200829221104.20870-2-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit d17343b87da422a59d99a3ed130573dbeb96c582 Merge: 50df0eebbd49b 2b32d2f7ce0a5 Author: Mark Brown Date: Tue Sep 1 15:07:01 2020 +0100 Merge series "Introduce Embedded Controller driver for Acer A500" from Dmitry Osipenko : Hello! This series adds support for the Embedded Controller which is found on Acer Iconia Tab A500 (Android tablet device). The Embedded Controller is ENE KB930 and it's running firmware customized for the A500. The firmware interface may be reused by some other sibling Acer tablets, although none of those tablets are supported in upstream yet. Please review and apply, thanks in advance! Changelog: v2: - Factored out KB930 device-tree binding into a separate file, like it was suggested by Lubomir Rintel. - Switched to use regmap API like it was suggested by Lubomir Rintel. - Added patch "regmap: Use flexible sleep" which allows not to hog CPU while LED is switching state. - Corrected MODULE_LICENSE to use "GPL" in all patches. - Corrected MFD driver Kconfig entry like it was suggested by Lubomir Rintel, it now depends on I2C. - Switched to use I2C probe_new() in the MFD driver. - Renamed the global pm_off variable, like it was suggested by Lubomir Rintel and Lee Jones. - Dropped serial number from the battery driver because I realized that it's not a battery serial, but a device serial. - Battery driver now uses dev_err_probe(), like it was suggested by Sebastian Reichel. - Dropped legacy LED_ON usage from the LED driver and renamed the LEDs, like it was suggested by Pavel Machek. I also checked whether LED-name customization via device-tree could be needed by other potentially compatible devices and it shouldn't be needed, anyways it won't be difficult to extend the code even if I'm wrong. Dmitry Osipenko (6): dt-bindings: mfd: Add ENE KB930 Embedded Controller binding regmap: Use flexible sleep mfd: Add driver for Embedded Controller found on Acer Iconia Tab A500 power: supply: Add battery gauge driver for Acer Iconia Tab A500 leds: Add driver for Acer Iconia Tab A500 ARM: tegra: acer-a500: Add Embedded Controller .../devicetree/bindings/mfd/ene-kb930.yaml | 66 ++++ .../boot/dts/tegra20-acer-a500-picasso.dts | 17 + drivers/base/regmap/regmap.c | 4 +- drivers/leds/Kconfig | 7 + drivers/leds/Makefile | 1 + drivers/leds/leds-acer-a500.c | 130 ++++++++ drivers/mfd/Kconfig | 12 + drivers/mfd/Makefile | 1 + drivers/mfd/acer-ec-a500.c | 203 ++++++++++++ drivers/power/supply/Kconfig | 6 + drivers/power/supply/Makefile | 1 + drivers/power/supply/acer_a500_battery.c | 297 ++++++++++++++++++ 12 files changed, 743 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/ene-kb930.yaml create mode 100644 drivers/leds/leds-acer-a500.c create mode 100644 drivers/mfd/acer-ec-a500.c create mode 100644 drivers/power/supply/acer_a500_battery.c -- 2.27.0 base-commit: f75aef392f869018f78cfedf3c320a6b3fcfda6b commit 50df0eebbd49b894df7e5e3945d66cd80c322284 Author: Vinod Koul Date: Sat Aug 29 16:09:39 2020 +0530 regmap: soundwire: remove unused header mod_devicetable.h mod_devicetable.h does not seem to be required for this file, so remove it. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20200829103939.4007097-1-vkoul@kernel.org Signed-off-by: Mark Brown commit 2b32d2f7ce0a54ce74a75f0d939b5ee063a05ec5 Author: Dmitry Osipenko Date: Sun Aug 30 21:53:52 2020 +0300 regmap: Use flexible sleep The multi-reg write function uses udelay(), which is a busy-loop based delaying function that is not suitable for a long delays. Hence let's replace the udelay() with fsleep(), which is flexible sleep function that selects best delay function based on the delay-time. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200830185356.5365-3-digetx@gmail.com Signed-off-by: Mark Brown commit ebc4ecd48ca6552b223047839f66e9a9c09aea4c Author: Björn Töpel Date: Tue Sep 1 10:39:28 2020 +0200 bpf: {cpu,dev}map: Change various functions return type from int to void The functions bq_enqueue(), bq_flush_to_queue(), and bq_xmit_all() in {cpu,dev}map.c always return zero. Changing the return type from int to void makes the code easier to follow. Suggested-by: David Ahern Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20200901083928.6199-1-bjorn.topel@gmail.com commit c08503ec03dbe338c01ee4867b6dea026a78f6d4 Author: Rikard Falkeborn Date: Sun Aug 30 23:17:41 2020 +0200 drm/gma500: Constify static structs The only usage of these is to assign their address to the fbops field in the fb_info struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200830211741.17326-1-rikard.falkeborn@gmail.com commit 2c92790b12033797474b9ba1b2e56a95360f66cd Author: YueHaibing Date: Sat Aug 29 19:59:24 2020 +0800 libertas_tf: Remove unused macro QOS_CONTROL_LEN There is no caller in tree. Signed-off-by: YueHaibing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200829115924.7572-1-yuehaibing@huawei.com commit e1920d6ae6bd37ad15f700e8a1dfdaa5486ded1b Author: Lee Jones Date: Wed Aug 26 10:34:01 2020 +0100 brcmsmac: phytbl_n: Remove a few unused arrays Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_n.c:9218:18: warning: ‘papd_cal_scalars_tbl_core1_rev3’ defined but not used [-Wunused-const-variable=] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_n.c:9151:18: warning: ‘papd_comp_epsilon_tbl_core1_rev3’ defined but not used [-Wunused-const-variable=] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_n.c:9084:18: warning: ‘papd_cal_scalars_tbl_core0_rev3’ defined but not used [-Wunused-const-variable=] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_n.c:9017:18: warning: ‘papd_comp_epsilon_tbl_core0_rev3’ defined but not used [-Wunused-const-variable=] Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-31-lee.jones@linaro.org commit ebcfc66f56a43601eec4a8abab6e82aaeb09dcbf Author: Lee Jones Date: Wed Aug 26 10:34:00 2020 +0100 brcmsmac: phytbl_lcn: Remove unused array 'dot11lcnphytbl_rx_gain_info_rev1' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phytbl_lcn.c:1510:33: warning: ‘dot11lcnphytbl_rx_gain_info_rev1’ defined but not used [-Wunused-const-variable=] Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-30-lee.jones@linaro.org commit a36e4e4a898b2832fe2ed852375c36a2a0b3332d Author: Lee Jones Date: Wed Aug 26 10:33:59 2020 +0100 brcmsmac: phy_n: Remove a bunch of unused variables Fixes the following W=1 kernel build warning(s): In file included from drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:16: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function ‘wlc_phy_spurwar_nphy’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:19036:6: warning: variable ‘tempval’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function ‘wlc_phy_tempsense_nphy’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:21983:28: warning: variable ‘RfctrlMiscReg6_save’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function ‘wlc_phy_rssi_compute_nphy’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:22986:6: warning: variable ‘phyRx0_l’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function ‘wlc_phy_runsamples_nphy’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:23101:6: warning: variable ‘lpf_bw_ctl_miscreg4’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:23100:50: warning: variable ‘lpf_bw_ctl_miscreg3’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function ‘wlc_phy_iqcal_gainparams_nphy’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:23406:6: warning: variable ‘idx’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function ‘wlc_phy_a2_nphy’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:24707:7: warning: variable ‘phy_a6’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c: In function ‘wlc_phy_a3_nphy’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:24999:7: warning: variable ‘phy_a11’ set but not used [-Wunused-but-set-variable] Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: zhong jiang Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-29-lee.jones@linaro.org commit 38c95e0258a067812311e84d2a170fd56f05431d Author: Lee Jones Date: Wed Aug 26 10:33:58 2020 +0100 brcmsmac: phy_lcn: Remove a bunch of unused variables Fixes the following W=1 kernel build warning(s): In file included from drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:11: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c: In function ‘wlc_lcnphy_rx_iq_cal’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:1366:29: warning: variable ‘RFOverride0_old’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c: In function ‘wlc_lcnphy_radio_2064_channel_tune_4313’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:1667:21: warning: variable ‘qFvco’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:1667:14: warning: variable ‘qFref’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:1667:6: warning: variable ‘qFxtal’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c: In function ‘wlc_lcnphy_idle_tssi_est’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:2856:6: warning: variable ‘idleTssi’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c: In function ‘wlc_lcnphy_tx_iqlo_soft_cal_full’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:3861:53: warning: variable ‘locc4’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:3861:46: warning: variable ‘locc3’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:3861:39: warning: variable ‘locc2’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:3861:32: warning: variable ‘iqcc0’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c: In function ‘wlc_lcnphy_periodic_cal’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:4196:6: warning: variable ‘rx_iqcomp_sz’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:4195:33: warning: variable ‘rx_iqcomp’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:4194:16: warning: variable ‘full_cal’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c: In function ‘wlc_phy_txpwr_srom_read_lcnphy’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c:4919:7: warning: variable ‘opo’ set but not used [-Wunused-but-set-variable] Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-28-lee.jones@linaro.org commit 2d4a48d1f92bf7d66c411ff9c5381efecf1c99fb Author: Lee Jones Date: Wed Aug 26 10:33:54 2020 +0100 prism54: isl_ioctl: Remove unused variable 'j' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intersil/prism54/isl_ioctl.c: In function ‘prism54_update_stats’: drivers/net/wireless/intersil/prism54/isl_ioctl.c:166:6: warning: variable ‘j’ set but not used [-Wunused-but-set-variable] Cc: Luis Chamberlain Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Aurelien Alleaume Cc: Valerio Riedel Cc: "Luis R. Rodriguez" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-24-lee.jones@linaro.org commit 73ffcd404a7eb1dbfd11873afebb4158bd2bb419 Author: Lee Jones Date: Wed Aug 26 10:33:53 2020 +0100 rsi: rsi_91x_sdio_ops: File headers are not good kernel-doc candidates Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_sdio_ops.c:24: warning: Incorrect use of kernel-doc format: * rsi_sdio_master_access_msword() - This function sets the AHB master access drivers/net/wireless/rsi/rsi_91x_sdio_ops.c:32: warning: Function parameter or member 'adapter' not described in 'rsi_sdio_master_access_msword' drivers/net/wireless/rsi/rsi_91x_sdio_ops.c:32: warning: Function parameter or member 'ms_word' not described in 'rsi_sdio_master_access_msword' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-23-lee.jones@linaro.org commit 0e25262bc36770379765c8856155f02088a0aad0 Author: Lee Jones Date: Wed Aug 26 10:33:52 2020 +0100 rtw88: debug: Remove unused variables 'val' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtw88/debug.c: In function ‘rtw_debug_get_mac_page’: drivers/net/wireless/realtek/rtw88/debug.c:430:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/realtek/rtw88/debug.c: In function ‘rtw_debug_get_bb_page’: drivers/net/wireless/realtek/rtw88/debug.c:450:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] Cc: Yan-Hsuan Chuang Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-22-lee.jones@linaro.org commit 2307d0bc9d8b60299f255d1771ce0d997162a957 Author: Lee Jones Date: Wed Aug 26 10:33:51 2020 +0100 wl3501_cs: Fix a bunch of formatting issues related to function docs Fixes the following W=1 kernel build warning(s): In file included from drivers/net/wireless/wl3501_cs.c:57: drivers/net/wireless/wl3501_cs.c:143: warning: Function parameter or member 'reg_domain' not described in 'iw_valid_channel' drivers/net/wireless/wl3501_cs.c:143: warning: Function parameter or member 'channel' not described in 'iw_valid_channel' drivers/net/wireless/wl3501_cs.c:162: warning: Function parameter or member 'reg_domain' not described in 'iw_default_channel' drivers/net/wireless/wl3501_cs.c:248: warning: Function parameter or member 'this' not described in 'wl3501_set_to_wla' drivers/net/wireless/wl3501_cs.c:270: warning: Function parameter or member 'this' not described in 'wl3501_get_from_wla' drivers/net/wireless/wl3501_cs.c:467: warning: Function parameter or member 'this' not described in 'wl3501_send_pkt' drivers/net/wireless/wl3501_cs.c:467: warning: Function parameter or member 'data' not described in 'wl3501_send_pkt' drivers/net/wireless/wl3501_cs.c:467: warning: Function parameter or member 'len' not described in 'wl3501_send_pkt' drivers/net/wireless/wl3501_cs.c:729: warning: Function parameter or member 'this' not described in 'wl3501_block_interrupt' drivers/net/wireless/wl3501_cs.c:746: warning: Function parameter or member 'this' not described in 'wl3501_unblock_interrupt' drivers/net/wireless/wl3501_cs.c:1124: warning: Function parameter or member 'irq' not described in 'wl3501_interrupt' drivers/net/wireless/wl3501_cs.c:1124: warning: Function parameter or member 'dev_id' not described in 'wl3501_interrupt' drivers/net/wireless/wl3501_cs.c:1257: warning: Function parameter or member 'dev' not described in 'wl3501_reset' drivers/net/wireless/wl3501_cs.c:1420: warning: Function parameter or member 'link' not described in 'wl3501_detach' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Fox Chen Cc: de Melo Cc: Gustavo Niemeyer Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-21-lee.jones@linaro.org commit 8cea7f1c88135219b4fbadd34fa66b6d7f7db669 Author: Lee Jones Date: Wed Aug 26 10:33:50 2020 +0100 hostap: Remove unused variable 'fc' Fixes the following W=1 kernel build warning(s): In file included from drivers/net/wireless/intersil/hostap/hostap_cs.c:196: drivers/net/wireless/intersil/hostap/hostap_hw.c: In function ‘prism2_tx_80211’: drivers/net/wireless/intersil/hostap/hostap_hw.c:1806:18: warning: variable ‘fc’ set but not used [-Wunused-but-set-variable] 1806 | u16 tx_control, fc; | ^~ In file included from drivers/net/wireless/intersil/hostap/hostap_plx.c:264: drivers/net/wireless/intersil/hostap/hostap_hw.c: In function ‘prism2_tx_80211’: drivers/net/wireless/intersil/hostap/hostap_hw.c:1806:18: warning: variable ‘fc’ set but not used [-Wunused-but-set-variable] 1806 | u16 tx_control, fc; | ^~ In file included from drivers/net/wireless/intersil/hostap/hostap_pci.c:221: drivers/net/wireless/intersil/hostap/hostap_hw.c: In function ‘prism2_tx_80211’: drivers/net/wireless/intersil/hostap/hostap_hw.c:1806:18: warning: variable ‘fc’ set but not used [-Wunused-but-set-variable] 1806 | u16 tx_control, fc; | ^~ Cc: Jouni Malinen Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Cong Wang Cc: Taehee Yoo Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-20-lee.jones@linaro.org commit 64403dc35cb7a7278797ba97cb67d5eec2996716 Author: Lee Jones Date: Wed Aug 26 10:33:47 2020 +0100 rsi: rsi_91x_sdio: Fix a few kernel-doc related issues - File headers do not make for good kernel-doc candidates - Kernel-doc header lines should start with " *" - Fix doc-rot issue Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_sdio.c:25: warning: cannot understand function prototype: 'u16 dev_oper_mode = DEV_OPMODE_STA_BT_DUAL; ' drivers/net/wireless/rsi/rsi_91x_sdio.c:802: warning: bad line: from the device. drivers/net/wireless/rsi/rsi_91x_sdio.c:842: warning: Function parameter or member 'pfunction' not described in 'rsi_init_sdio_interface' drivers/net/wireless/rsi/rsi_91x_sdio.c:842: warning: Excess function parameter 'pkt' description in 'rsi_init_sdio_interface' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-17-lee.jones@linaro.org commit b95451e02e1cacf51d0c6ac9f7c21def0b24d039 Author: Lee Jones Date: Wed Aug 26 10:33:46 2020 +0100 wlcore: debugfs: Remove unused variable 'res' Fixes the following W=1 kernel build warning(s): Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Luciano Coelho Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-16-lee.jones@linaro.org commit e769ab5359cb85e919fa3d79d65f2b83d11d261a Author: Lee Jones Date: Wed Aug 26 10:33:44 2020 +0100 brcmfmac: fwsignal: Finish documenting 'brcmf_fws_mac_descriptor' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c:389: warning: Function parameter or member 'name' not described in 'brcmf_fws_mac_descriptor' drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c:389: warning: Function parameter or member 'requested_packet' not described in 'brcmf_fws_mac_descriptor' drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c:389: warning: Function parameter or member 'suppr_transit_count' not described in 'brcmf_fws_mac_descriptor' drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c:389: warning: Function parameter or member 'send_tim_signal' not described in 'brcmf_fws_mac_descriptor' drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c:389: warning: Function parameter or member 'traffic_pending_bmp' not described in 'brcmf_fws_mac_descriptor' drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c:389: warning: Function parameter or member 'traffic_lastreported_bmp' not described in 'brcmf_fws_mac_descriptor' Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-14-lee.jones@linaro.org commit bb4b2c8ba39da2feafa63e6e0bf9d871ea31231e Author: Lee Jones Date: Wed Aug 26 10:33:42 2020 +0100 zd1211rw: zd_chip: Correct misspelled function argument Fixes the following W=1 kernel build warning(s): drivers/net/wireless/zydas/zd1211rw/zd_chip.c:1385: warning: Function parameter or member 'status' not described in 'zd_rx_rate' drivers/net/wireless/zydas/zd1211rw/zd_chip.c:1385: warning: Excess function parameter 'rx_status' description in 'zd_rx_rate' Cc: Daniel Drake Cc: Ulrich Kunitz Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-12-lee.jones@linaro.org commit f3242a5ba91d05a06012e607f133dde664cf9754 Author: Lee Jones Date: Wed Aug 26 10:33:41 2020 +0100 zd1211rw: zd_mac: Add missing or incorrect function documentation Fixes the following W=1 kernel build warning(s): drivers/net/wireless/zydas/zd1211rw/zd_mac.c:433: warning: Function parameter or member 'hw' not described in 'zd_mac_tx_status' drivers/net/wireless/zydas/zd1211rw/zd_mac.c:433: warning: Function parameter or member 'skb' not described in 'zd_mac_tx_status' drivers/net/wireless/zydas/zd1211rw/zd_mac.c:433: warning: Function parameter or member 'tx_status' not described in 'zd_mac_tx_status' drivers/net/wireless/zydas/zd1211rw/zd_mac.c:433: warning: Excess function parameter 'flags' description in 'zd_mac_tx_status' drivers/net/wireless/zydas/zd1211rw/zd_mac.c:487: warning: Function parameter or member 'urb' not described in 'zd_mac_tx_failed' drivers/net/wireless/zydas/zd1211rw/zd_mac.c:487: warning: Excess function parameter 'dev' description in 'zd_mac_tx_failed' drivers/net/wireless/zydas/zd1211rw/zd_mac.c:927: warning: Function parameter or member 'hw' not described in 'zd_op_tx' drivers/net/wireless/zydas/zd1211rw/zd_mac.c:927: warning: Excess function parameter 'dev' description in 'zd_op_tx' drivers/net/wireless/zydas/zd1211rw/zd_mac.c:963: warning: Function parameter or member 'hw' not described in 'filter_ack' drivers/net/wireless/zydas/zd1211rw/zd_mac.c:963: warning: Excess function parameter 'dev' description in 'filter_ack' Cc: Daniel Drake Cc: Ulrich Kunitz Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Michael Wu Cc: "Luis R. Rodriguez" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-11-lee.jones@linaro.org commit 2fae7bf8e379e8031ee882646be9f4db2067888c Author: Lee Jones Date: Wed Aug 26 10:33:40 2020 +0100 zd1211rw: zd_chip: Fix formatting Kerneldoc expects attributes/parameters to be in '@*.: ' format and gets confused if the variable does not follow the type/attribute definitions. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/zydas/zd1211rw/zd_chip.c:1385: warning: Function parameter or member 'rx_frame' not described in 'zd_rx_rate' drivers/net/wireless/zydas/zd1211rw/zd_chip.c:1385: warning: Function parameter or member 'status' not described in 'zd_rx_rate' Cc: Daniel Drake Cc: Ulrich Kunitz Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-10-lee.jones@linaro.org commit 1d2389b53c85cea62d0b3c68d21ad6b9a420674e Author: Lee Jones Date: Wed Aug 26 10:33:39 2020 +0100 brcmsmac: phy_cmn: Remove a unused variables 'vbat' and 'temp' Fixes the following W=1 kernel build warning(s): In file included from drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c:12: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c: In function ‘wlc_phy_upd_env_txpwr_rate_limits’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c:1516:11: warning: variable ‘vbat’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c:1516:5: warning: variable ‘temp’ set but not used [-Wunused-but-set-variable] Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-9-lee.jones@linaro.org commit ef8308d34a93030e1a736d5cef669ce5fed50abd Author: Lee Jones Date: Wed Aug 26 10:33:38 2020 +0100 orinoco_usb: Downgrade non-conforming kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intersil/orinoco/orinoco_usb.c:434: warning: Function parameter or member 'upriv' not described in 'ezusb_req_queue_run' drivers/net/wireless/intersil/orinoco/orinoco_usb.c:716: warning: Function parameter or member 'req' not described in 'ezusb_fill_req' drivers/net/wireless/intersil/orinoco/orinoco_usb.c:716: warning: Function parameter or member 'length' not described in 'ezusb_fill_req' drivers/net/wireless/intersil/orinoco/orinoco_usb.c:716: warning: Function parameter or member 'rid' not described in 'ezusb_fill_req' drivers/net/wireless/intersil/orinoco/orinoco_usb.c:716: warning: Function parameter or member 'data' not described in 'ezusb_fill_req' drivers/net/wireless/intersil/orinoco/orinoco_usb.c:716: warning: Function parameter or member 'frame_type' not described in 'ezusb_fill_req' drivers/net/wireless/intersil/orinoco/orinoco_usb.c:716: warning: Function parameter or member 'reply_count' not described in 'ezusb_fill_req' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-8-lee.jones@linaro.org commit 78211e026bd0de48206226493d9595fa996ffe74 Author: Lee Jones Date: Wed Aug 26 10:33:37 2020 +0100 brcmfmac: p2p: Fix a couple of function headers Most likely caused by doc-rot. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:977: warning: Function parameter or member 'wdev' not described in 'brcmf_p2p_remain_on_channel' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:2048: warning: Function parameter or member 'cfg' not described in 'brcmf_p2p_ifchange' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:2048: warning: Excess function parameter 'mac' description in 'brcmf_p2p_ifchange' Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-7-lee.jones@linaro.org commit a60e33af4e28e9bcc49f448dc68660203edccf89 Author: Lee Jones Date: Wed Aug 26 10:33:36 2020 +0100 iwlegacy: 3945: Remove all non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlegacy/3945.c:104: warning: Function parameter or member 'il' not described in 'il3945_disable_events' drivers/net/wireless/intel/iwlegacy/3945.c:273: warning: Function parameter or member 'il' not described in 'il3945_tx_queue_reclaim' drivers/net/wireless/intel/iwlegacy/3945.c:273: warning: Function parameter or member 'txq_id' not described in 'il3945_tx_queue_reclaim' drivers/net/wireless/intel/iwlegacy/3945.c:273: warning: Function parameter or member 'idx' not described in 'il3945_tx_queue_reclaim' drivers/net/wireless/intel/iwlegacy/3945.c:299: warning: Function parameter or member 'il' not described in 'il3945_hdl_tx' drivers/net/wireless/intel/iwlegacy/3945.c:299: warning: Function parameter or member 'rxb' not described in 'il3945_hdl_tx' drivers/net/wireless/intel/iwlegacy/3945.c:637: warning: Function parameter or member 'il' not described in 'il3945_hw_txq_free_tfd' drivers/net/wireless/intel/iwlegacy/3945.c:637: warning: Function parameter or member 'txq' not described in 'il3945_hw_txq_free_tfd' drivers/net/wireless/intel/iwlegacy/3945.c:686: warning: Function parameter or member 'il' not described in 'il3945_hw_build_tx_cmd_rate' drivers/net/wireless/intel/iwlegacy/3945.c:686: warning: Function parameter or member 'cmd' not described in 'il3945_hw_build_tx_cmd_rate' drivers/net/wireless/intel/iwlegacy/3945.c:686: warning: Function parameter or member 'info' not described in 'il3945_hw_build_tx_cmd_rate' drivers/net/wireless/intel/iwlegacy/3945.c:686: warning: Function parameter or member 'hdr' not described in 'il3945_hw_build_tx_cmd_rate' drivers/net/wireless/intel/iwlegacy/3945.c:686: warning: Function parameter or member 'sta_id' not described in 'il3945_hw_build_tx_cmd_rate' drivers/net/wireless/intel/iwlegacy/3945.c:838: warning: Function parameter or member 'il' not described in 'il3945_txq_ctx_reset' drivers/net/wireless/intel/iwlegacy/3945.c:1003: warning: Function parameter or member 'il' not described in 'il3945_hw_txq_ctx_free' drivers/net/wireless/intel/iwlegacy/3945.c:1044: warning: Function parameter or member 'new_reading' not described in 'il3945_hw_reg_adjust_power_by_temp' drivers/net/wireless/intel/iwlegacy/3945.c:1044: warning: Function parameter or member 'old_reading' not described in 'il3945_hw_reg_adjust_power_by_temp' drivers/net/wireless/intel/iwlegacy/3945.c:1053: warning: Function parameter or member 'temperature' not described in 'il3945_hw_reg_temp_out_of_range' drivers/net/wireless/intel/iwlegacy/3945.c:1069: warning: Function parameter or member 'il' not described in 'il3945_hw_reg_txpower_get_temperature' drivers/net/wireless/intel/iwlegacy/3945.c:1107: warning: Function parameter or member 'il' not described in 'il3945_is_temp_calib_needed' drivers/net/wireless/intel/iwlegacy/3945.c:1328: warning: Function parameter or member 'il' not described in 'il3945_hw_reg_set_scan_power' drivers/net/wireless/intel/iwlegacy/3945.c:1328: warning: Function parameter or member 'scan_tbl_idx' not described in 'il3945_hw_reg_set_scan_power' drivers/net/wireless/intel/iwlegacy/3945.c:1328: warning: Function parameter or member 'rate_idx' not described in 'il3945_hw_reg_set_scan_power' drivers/net/wireless/intel/iwlegacy/3945.c:1328: warning: Function parameter or member 'clip_pwrs' not described in 'il3945_hw_reg_set_scan_power' drivers/net/wireless/intel/iwlegacy/3945.c:1328: warning: Function parameter or member 'ch_info' not described in 'il3945_hw_reg_set_scan_power' drivers/net/wireless/intel/iwlegacy/3945.c:1328: warning: Function parameter or member 'band_idx' not described in 'il3945_hw_reg_set_scan_power' drivers/net/wireless/intel/iwlegacy/3945.c:1383: warning: Function parameter or member 'il' not described in 'il3945_send_tx_power' drivers/net/wireless/intel/iwlegacy/3945.c:1460: warning: Function parameter or member 'il' not described in 'il3945_hw_reg_set_new_power' drivers/net/wireless/intel/iwlegacy/3945.c:1522: warning: Function parameter or member 'ch_info' not described in 'il3945_hw_reg_get_ch_txpower_limit' drivers/net/wireless/intel/iwlegacy/3945.c:1552: warning: Function parameter or member 'il' not described in 'il3945_hw_reg_comp_txpower_temp' drivers/net/wireless/intel/iwlegacy/3945.c:1712: warning: Function parameter or member 'il' not described in 'il3945_commit_rxon' drivers/net/wireless/intel/iwlegacy/3945.c:1845: warning: Function parameter or member 'il' not described in 'il3945_reg_txpower_periodic' drivers/net/wireless/intel/iwlegacy/3945.c:1889: warning: Function parameter or member 'il' not described in 'il3945_hw_reg_get_ch_grp_idx' drivers/net/wireless/intel/iwlegacy/3945.c:1889: warning: Function parameter or member 'ch_info' not described in 'il3945_hw_reg_get_ch_grp_idx' drivers/net/wireless/intel/iwlegacy/3945.c:1924: warning: Function parameter or member 'il' not described in 'il3945_hw_reg_get_matched_power_idx' drivers/net/wireless/intel/iwlegacy/3945.c:1924: warning: Function parameter or member 'requested_power' not described in 'il3945_hw_reg_get_matched_power_idx' drivers/net/wireless/intel/iwlegacy/3945.c:1924: warning: Function parameter or member 'setting_idx' not described in 'il3945_hw_reg_get_matched_power_idx' drivers/net/wireless/intel/iwlegacy/3945.c:1924: warning: Function parameter or member 'new_idx' not described in 'il3945_hw_reg_get_matched_power_idx' drivers/net/wireless/intel/iwlegacy/3945.c:2055: warning: Function parameter or member 'il' not described in 'il3945_txpower_set_from_eeprom' drivers/net/wireless/intel/iwlegacy/3945.c:2313: warning: Function parameter or member 'il' not described in 'il3945_init_hw_rate_table' Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Linux Wireless Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-6-lee.jones@linaro.org commit 305fd82aee87659fe5f235d79045968b3555f6f4 Author: Lee Jones Date: Wed Aug 26 10:33:35 2020 +0100 iwlegacy: 3945-rs: Remove all non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlegacy/3945-rs.c:136: warning: Function parameter or member 'rs_sta' not described in 'il3945_rate_scale_flush_wins' drivers/net/wireless/intel/iwlegacy/3945-rs.c:243: warning: Function parameter or member 'rs_sta' not described in 'il3945_collect_tx_data' drivers/net/wireless/intel/iwlegacy/3945-rs.c:243: warning: Function parameter or member 'win' not described in 'il3945_collect_tx_data' drivers/net/wireless/intel/iwlegacy/3945-rs.c:243: warning: Function parameter or member 'success' not described in 'il3945_collect_tx_data' drivers/net/wireless/intel/iwlegacy/3945-rs.c:243: warning: Function parameter or member 'retries' not described in 'il3945_collect_tx_data' drivers/net/wireless/intel/iwlegacy/3945-rs.c:243: warning: Function parameter or member 'idx' not described in 'il3945_collect_tx_data' drivers/net/wireless/intel/iwlegacy/3945-rs.c:429: warning: Function parameter or member 'il_rate' not described in 'il3945_rs_tx_status' drivers/net/wireless/intel/iwlegacy/3945-rs.c:429: warning: Function parameter or member 'sband' not described in 'il3945_rs_tx_status' drivers/net/wireless/intel/iwlegacy/3945-rs.c:429: warning: Function parameter or member 'sta' not described in 'il3945_rs_tx_status' drivers/net/wireless/intel/iwlegacy/3945-rs.c:429: warning: Function parameter or member 'il_sta' not described in 'il3945_rs_tx_status' drivers/net/wireless/intel/iwlegacy/3945-rs.c:429: warning: Function parameter or member 'skb' not described in 'il3945_rs_tx_status' drivers/net/wireless/intel/iwlegacy/3945-rs.c:606: warning: Function parameter or member 'il_r' not described in 'il3945_rs_get_rate' drivers/net/wireless/intel/iwlegacy/3945-rs.c:606: warning: Function parameter or member 'sta' not described in 'il3945_rs_get_rate' drivers/net/wireless/intel/iwlegacy/3945-rs.c:606: warning: Function parameter or member 'il_sta' not described in 'il3945_rs_get_rate' drivers/net/wireless/intel/iwlegacy/3945-rs.c:606: warning: Function parameter or member 'txrc' not described in 'il3945_rs_get_rate' Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Linux Wireless Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-5-lee.jones@linaro.org commit dd13d6dcc24d1fa7c3e06086d496bbf45bea51f1 Author: Lee Jones Date: Wed Aug 26 10:33:34 2020 +0100 iwlegacy: 3945-mac: Remove all non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlegacy/3945-mac.c:821: warning: Function parameter or member 'il' not described in 'il3945_setup_handlers' drivers/net/wireless/intel/iwlegacy/3945-mac.c:915: warning: Function parameter or member 'il' not described in 'il3945_dma_addr2rbd_ptr' drivers/net/wireless/intel/iwlegacy/3945-mac.c:915: warning: Function parameter or member 'dma_addr' not described in 'il3945_dma_addr2rbd_ptr' drivers/net/wireless/intel/iwlegacy/3945-mac.c:932: warning: Function parameter or member 'il' not described in 'il3945_rx_queue_restock' drivers/net/wireless/intel/iwlegacy/3945-mac.c:979: warning: Function parameter or member 'il' not described in 'il3945_rx_allocate' drivers/net/wireless/intel/iwlegacy/3945-mac.c:979: warning: Function parameter or member 'priority' not described in 'il3945_rx_allocate' drivers/net/wireless/intel/iwlegacy/3945-mac.c:1179: warning: Function parameter or member 'il' not described in 'il3945_rx_handle' drivers/net/wireless/intel/iwlegacy/3945-mac.c:1663: warning: Function parameter or member 'il' not described in 'il3945_verify_inst_full' drivers/net/wireless/intel/iwlegacy/3945-mac.c:1663: warning: Function parameter or member 'image' not described in 'il3945_verify_inst_full' drivers/net/wireless/intel/iwlegacy/3945-mac.c:1663: warning: Function parameter or member 'len' not described in 'il3945_verify_inst_full' drivers/net/wireless/intel/iwlegacy/3945-mac.c:1703: warning: Function parameter or member 'il' not described in 'il3945_verify_inst_sparse' drivers/net/wireless/intel/iwlegacy/3945-mac.c:1703: warning: Function parameter or member 'image' not described in 'il3945_verify_inst_sparse' drivers/net/wireless/intel/iwlegacy/3945-mac.c:1703: warning: Function parameter or member 'len' not described in 'il3945_verify_inst_sparse' drivers/net/wireless/intel/iwlegacy/3945-mac.c:1739: warning: Function parameter or member 'il' not described in 'il3945_verify_ucode' drivers/net/wireless/intel/iwlegacy/3945-mac.c:1821: warning: Function parameter or member 'il' not described in 'il3945_read_ucode' drivers/net/wireless/intel/iwlegacy/3945-mac.c:2061: warning: Function parameter or member 'il' not described in 'il3945_set_ucode_ptrs' drivers/net/wireless/intel/iwlegacy/3945-mac.c:2093: warning: Function parameter or member 'il' not described in 'il3945_init_alive_start' drivers/net/wireless/intel/iwlegacy/3945-mac.c:2135: warning: Function parameter or member 'il' not described in 'il3945_alive_start' Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Linux Wireless Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-4-lee.jones@linaro.org commit f5c3bf15f34c9b145d30616f5d072927b4bbd15c Author: Lee Jones Date: Wed Aug 26 10:33:33 2020 +0100 brcmsmac: ampdu: Remove a couple set but unused variables Fixes the following W=1 kernel build warning(s): from drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:18: drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c: In function ‘brcms_c_ampdu_dotxstatus_complete’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:850:7: warning: variable ‘update_rate’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c: In function ‘brcms_c_ampdu_dotxstatus’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:1027:20: warning: variable ‘scb_ampdu’ set but not used [-Wunused-but-set-variable] Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Lee Jones Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-3-lee.jones@linaro.org commit 77dacc8fc64cb51eee60c5c26cff78c761492b78 Author: Lee Jones Date: Wed Aug 26 10:33:32 2020 +0100 mwifiex: pcie: Move tables to the only place they're used Saves on 10's of complains about 'defined but not used' variables. Fixes the following W=1 kernel build warning(s): In file included from drivers/net/wireless/marvell/mwifiex/main.h:57, from drivers/net/wireless/marvell/mwifiex/main.c:22: drivers/net/wireless/marvell/mwifiex/pcie.h:310:41: warning: ‘mwifiex_pcie8997’ defined but not used [-Wunused-const-variable=] 310 | static const struct mwifiex_pcie_device mwifiex_pcie8997 = { | ^~~~~~~~~~~~~~~~ drivers/net/wireless/marvell/mwifiex/pcie.h:300:41: warning: ‘mwifiex_pcie8897’ defined but not used [-Wunused-const-variable=] 300 | static const struct mwifiex_pcie_device mwifiex_pcie8897 = { | ^~~~~~~~~~~~~~~~ drivers/net/wireless/marvell/mwifiex/pcie.h:292:41: warning: ‘mwifiex_pcie8766’ defined but not used [-Wunused-const-variable=] 292 | static const struct mwifiex_pcie_device mwifiex_pcie8766 = { | ^~~~~~~~~~~~~~~~ NB: Repeats 10's of times - snipped for brevity. Cc: Amitkumar Karwar Cc: Ganapathi Bhat Cc: Xinming Hu Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-2-lee.jones@linaro.org commit a57307ca6b661e16f9435a25f376ac277c3de697 Author: Krzysztof Kozlowski Date: Sun Aug 30 13:26:33 2020 +0200 ASoC: odroid: Use unevaluatedProperties Additional properties or nodes actually might appear (e.g. assigned-clocks) so use unevaluatedProperties to fix dtbs_check warnings like: arch/arm/boot/dts/exynos5422-odroidxu3.dt.yaml: sound: 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20200830112633.6732-2-krzk@kernel.org Signed-off-by: Mark Brown commit 3e7ba1c0432ef9a792b9c77d36f78037626303b0 Author: Krzysztof Kozlowski Date: Sun Aug 30 13:26:32 2020 +0200 ASoC: midas-audio: Correct parsing sound-dai phandles The "sound-dai" property has cells therefore phandle-array should be used, even if it is just one phandle. This fixes dtbs_check warnings like: arch/arm/boot/dts/exynos4412-trats2.dt.yaml: sound: cpu:sound-dai:0:1: missing phandle tag in 0 arch/arm/boot/dts/exynos4412-trats2.dt.yaml: sound: cpu:sound-dai:0: [158, 0] is too long Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20200830112633.6732-1-krzk@kernel.org Signed-off-by: Mark Brown commit 8187d8300251a99e40e288be80bef6a15b7b22e4 Author: Krzysztof Kozlowski Date: Sat Aug 29 16:24:57 2020 +0200 ASoC: samsung-i2s: Use unevaluatedProperties Additional properties actually might appear (e.g. power-domains) so use unevaluatedProperties to fix dtbs_check warnings like: arch/arm64/boot/dts/exynos/exynos5433-tm2.dt.yaml: i2s@11440000: Additional properties are not allowed ('power-domains', '#address-cells', 'interrupts', '#size-cells' were unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20200829142501.31478-6-krzk@kernel.org Signed-off-by: Mark Brown commit 160c174ff6972bb56bf48ac3335297889839e1f1 Author: Douglas Anderson Date: Fri Aug 28 16:20:27 2020 -0700 ASoC: rt5682: Prefer async probe The probe of rt5682 is pretty slow. A quick measurement shows that it takes ~650 ms on at least one board. There's no reason to block all other drivers waiting for this probe to finish. Set the flag to allow other drivers to probe while we're probing. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200828162005.1.I4f67f494c4f759b0e5c7f487e040dfdcf16e0876@changeid Signed-off-by: Mark Brown commit 2a30aca81a72d71e128eb692cc4755f33e317670 Author: Will Deacon Date: Mon Jun 22 13:37:09 2020 +0100 arm64: vdso: Fix unusual formatting in *setup_additional_pages() There's really no need to put every parameter on a new line when calling a function with a long name, so reformat the *setup_additional_pages() functions in the vDSO setup code to follow the usual conventions. Acked-by: Mark Rutland Reviewed-by: Vincenzo Frascino Reviewed-by: Ard Biesheuvel Signed-off-by: Will Deacon commit 0cbc2659123e6946ba926c5ec3871efe310123e8 Author: Will Deacon Date: Mon Jun 22 13:28:34 2020 +0100 arm64: vdso32: Remove a bunch of #ifdef CONFIG_COMPAT_VDSO guards Most of the compat vDSO code can be built and guarded using IS_ENABLED, so drop the unnecessary #ifdefs. Reviewed-by: Vincenzo Frascino Reviewed-by: Ard Biesheuvel Reviewed-by: Mark Rutland Signed-off-by: Will Deacon commit 2a9b29b289833e42e13fdfb7e082499c1464f25c Author: Randy Dunlap Date: Sat Aug 29 22:57:51 2020 -0700 xtensa: fix Kconfig typo Correct trivial typo (ful -> full). Fixes: 76743c0e0915 ("xtensa: move kernel memory layout to platform options") Signed-off-by: Randy Dunlap Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Acked-by: Max Filippov Signed-off-by: Jiri Kosina commit 4fcadb39c6b298e105d827741e0b7a6b146633e5 Author: Joe Perches Date: Wed Aug 5 11:14:38 2020 -0700 spelling.txt: Remove some duplicate entries Found when Colin King fixed a typo for falied/failed and a git grep showed 2 entries in this file. Signed-off-by: Joe Perches Acked-by: Colin Ian King Signed-off-by: Jiri Kosina commit 552a028f6d3a7f2755048dd30dd7b15fcda2b958 Author: Pavel Machek Date: Fri Jul 24 10:38:25 2020 +0200 mtd: rawnand: oxnas: cleanup/simplify code Simplify oxnas_nand_probe. Signed-off-by: Pavel Machek (CIP) Acked-by: Neil Armstrong Signed-off-by: Jiri Kosina commit cae1d5a2c5a491141faa747e9944ba40ab4ab786 Author: Anatoly Pugachev Date: Tue Jun 16 15:26:18 2020 +0300 selftests: vm: add fragment CONFIG_GUP_BENCHMARK When running gup_benchmark test the following output states that the config options is missing. $ sudo ./gup_benchmark open: No such file or directory $ sudo strace -e trace=file ./gup_benchmark 2>&1 | tail -3 openat(AT_FDCWD, "/sys/kernel/debug/gup_benchmark", O_RDWR) = -1 ENOENT (No such file or directory) open: No such file or directory +++ exited with 1 +++ Fix it by adding config option fragment. Fixes: 64c349f4ae78 ("mm: add infrastructure for get_user_pages_fast() benchmarking") Signed-off-by: Anatoly Pugachev CC: Jiri Kosina CC: Shuah Khan Signed-off-by: Jiri Kosina commit b784a88e523a7c1912fc75486ce8c029ee6fe523 Author: Fam Zheng Date: Wed Jun 3 13:32:34 2020 +0100 perf: Fix opt help text for --no-bpf-event The opt name was once inverted but the help text didn't reflect the change. Fixes: 71184c6ab7e6 ("perf record: Replace option --bpf-event with --no-bpf-event") Signed-off-by: Fam Zheng Signed-off-by: Jiri Kosina commit 53ed4cf6519def01ea49af7609ee585a7b2d38c3 Author: Chris Packham Date: Tue May 26 11:02:01 2020 +1200 HID: logitech-dj: Fix spelling in comment Change 'unhandeled' to 'unhandled'. Signed-off-by: Chris Packham Signed-off-by: Jiri Kosina commit 36c6aa26e9ca393b31af166965cf51536176703b Author: Shaokun Zhang Date: Sat May 9 16:33:55 2020 +0800 bootconfig: Fix kernel message mentioning CONFIG_BOOT_CONFIG Fix up one typo: CONFIG_BOOTCONFIG -> CONFIG_BOOT_CONFIG Cc: Steven Rostedt Cc: Masami Hiramatsu Signed-off-by: Shaokun Zhang Acked-by: Masami Hiramatsu Signed-off-by: Jiri Kosina commit 2f078a0fe08d2f8a4fd030367663f808b6e21b34 Author: Lukas Bulwahn Date: Wed May 6 07:34:31 2020 +0200 MAINTAINERS: rectify MMP SUPPORT after moving cputype.h Commit 32adcaa010fa ("ARM: mmp: move cputype.h to include/linux/soc/") added a file entry that does not point to the intended file location. Since then, ./scripts/get_maintainer.pl --self-test complains: warning: no file matches F: linux/soc/mmp/ Rectify the MAINTAINERS entry now. Fixes: 32adcaa010fa ("ARM: mmp: move cputype.h to include/linux/soc/") Signed-off-by: Lukas Bulwahn Signed-off-by: Jiri Kosina commit ead5d1f4d877e92c051e1a1ade623d0d30e71619 Merge: f53fa968a7344 b51594df17d0c Author: Jiri Kosina Date: Tue Sep 1 14:19:48 2020 +0200 Merge branch 'master' into for-next Sync with Linus' branch in order to be able to apply fixups of more recent patches. commit f53fa968a7344970b8f8a5707c39cdcf17a6f367 Author: Geert Uytterhoeven Date: Tue May 5 15:42:35 2020 +0200 scif: Fix spelling of EACCES As per POSIX, 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: Jiri Kosina commit cfe9e707c5640c28ab168cabe91aea5d0b3f9195 Author: Mauro Carvalho Chehab Date: Fri Aug 25 16:56:42 2017 +0200 media: open.rst: document mc-centric and video-node-centric When we added support for omap3, back in 2010, we added a new type of V4L2 devices that aren't fully controlled via the V4L2 device node. Yet, we have never clearly documented in the V4L2 specification the differences between the two types. Let's document them based on the the current implementation. Signed-off-by: Mauro Carvalho Chehab commit 127a2bedac6685af5fe73842dfc05265d418ca4a Author: Mauro Carvalho Chehab Date: Fri Aug 25 16:49:32 2017 +0200 media: docs: add glossary.rst with common terms used at V4L2 spec Add a glossary of terms used within the media userspace API documentation, as several concepts are complex enough to cause misunderstandings. Signed-off-by: Mauro Carvalho Chehab commit 3c5f9362c4cdb1b234f4bc8cc157ee487ff5a426 Author: Mauro Carvalho Chehab Date: Fri Aug 25 16:54:20 2017 +0200 media: open.rst: remove the minor number range minor numbers use to range between 0 to 255, but that was changed a long time ago. While it still applies when CONFIG_VIDEO_FIXED_MINOR_RANGES, when the minor number is dynamically allocated, this may not be true. In any case, this is not relevant, as udev will take care of it. So, remove this useless misinformation. Acked-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 374d1432ca892229f5cdb1398c38009ecad91ab3 Author: Mauro Carvalho Chehab Date: Fri Aug 25 16:51:53 2017 +0200 media: open.rst: better document device node naming Right now, only kAPI documentation describes the device naming. However, such description is needed at the uAPI too. Add it, and describe how to get an unique identifier for a given device. Acked-by: Hans Verkuil Reviewed-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b0053104d5a9d5b5ac86b77520a4ebefd70d1609 Author: Mauro Carvalho Chehab Date: Wed Aug 26 09:16:41 2020 +0200 media: docs: use SPDX GPL-2.0 OR GFDL-1.1 instead of text on *.svg files There are some files that are dual licensed GPL and GFDL. As SPDX v3.10 gained support for GFDL-1.1 with no invariant sections: https://spdx.org/licenses/GFDL-1.1-no-invariants-or-later.html Let's remove the dual license text, replacing them by: SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later Signed-off-by: Mauro Carvalho Chehab commit 84d333417d5e5945318f62113b8fffc0eb92138c Author: Mauro Carvalho Chehab Date: Wed Aug 26 09:12:13 2020 +0200 media: docs: use SPDX GPL-2.0 OR GFDL-1.1 instead of text on *.rst files There are some files that are dual licensed GPL and GFDL. As SPDX v3.10 gained support for GFDL-1.1 with no invariant sections: https://spdx.org/licenses/GFDL-1.1-no-invariants-or-later.html Let's remove the dual license text, replacing them by: SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later Signed-off-by: Mauro Carvalho Chehab commit cc9539e7884c4b6f05c4cac0b6ab5fb8a3d728a4 Author: Mauro Carvalho Chehab Date: Wed Aug 26 09:09:10 2020 +0200 media: docs: use the new SPDX header for GFDL-1.1 on *.svg files SPDX v3.10 gained support for GFDL-1.1 with no invariant sections: https://spdx.org/licenses/GFDL-1.1-no-invariants-or-later.html So, remove the license text, replacing them by this new SPDX license. Signed-off-by: Mauro Carvalho Chehab commit 059b1c5b15579b09c3787c3a3f843574233ab976 Author: Mauro Carvalho Chehab Date: Wed Aug 26 09:03:09 2020 +0200 media: docs: use the new SPDX header for GFDL-1.1 on *.rst files SPDX v3.10 gained support for GFDL-1.1 with no invariant sections: https://spdx.org/licenses/GFDL-1.1-no-invariants-or-later.html So, remove the license text, replacing them by this new SPDX license. Signed-off-by: Mauro Carvalho Chehab commit 8c91dc085b4406d7561496db51273b4d1ea01eba Author: Stanimir Varbanov Date: Tue Jul 7 19:48:54 2020 +0200 media: venus: Make debug infrastructure more flexible Here we introduce debug prefixes for dev_dbg groups by level of importance - Venus{Low,Med,High,FW} Enabling the particular level will be done by dynamic debug. For example to enable debug messages with low level: echo 'format "VenusLow" +p' > debugfs/dynamic_debug/control If you want to enable all levels: echo 'format "Venus" +p' > debugfs/dynamic_debug/control All the features which dynamic debugging provide are preserved. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit f08abe6a1e07fdf1ec95ec431b65a876de431231 Author: Stanimir Varbanov Date: Thu May 21 13:35:16 2020 +0200 media: venus: Add debugfs interface to set firmware log level This will be useful when debugging specific issues related to firmware HFI interface. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 8b6a1010afb80bb78750a85aae822375028d8363 Author: Stanimir Varbanov Date: Sun Jul 5 02:58:27 2020 +0200 media: docs: Deprecate mfc frame skip control Deprecate mfc private frame skip mode control for new clients and use the standard one instead. Signed-off-by: Stanimir Varbanov Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ef56b3ee4f5488bf7a59391f5d3fbc0471a3935e Author: Stanimir Varbanov Date: Sun Jul 5 02:11:26 2020 +0200 media: s5p-mfc: Use standard frame skip mode control Use the standard menu control for frame skip mode in the MFC driver. The legacy private menu control is kept for backward compatibility. Signed-off-by: Stanimir Varbanov Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 94dfb1689c25ed26b3debe395fb66b09f8d5d10d Author: Stanimir Varbanov Date: Sun Jul 5 01:46:23 2020 +0200 media: venus: venc: Add support for frame-skip mode v4l2 control This adds support for frame-skip-mode standard v4l2 control in encoder driver. The control is implemented based on the combination of client selected bitrate-mode and frame-skip-mode. Once The client selected bitrate-mode (constant or variable) and the frame-skip-mode is not disabled we set variable framerate for rate controller. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 44f5b2fffc3213c919f53adddadb1a05519bdc0e Author: Stanimir Varbanov Date: Sun Jul 5 01:41:00 2020 +0200 media: v4l2-ctrl: Add frame-skip std encoder control Adds encoders standard v4l2 control for frame-skip. The control is a copy of a custom encoder control so that other v4l2 encoder drivers can use it. Signed-off-by: Stanimir Varbanov Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 69ff4b2caa95e1051f07d94de583ae15753ae081 Author: Stanimir Varbanov Date: Tue Jun 16 14:14:22 2020 +0200 media: venus: venc: Add support for constant quality control Adds implementation of V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY v4l control when the bitrate mode is CQ. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 4ad1b0d410c88c7c8e8fd1298c9d2293b651e35c Author: Maheshwar Ajja Date: Sat May 23 03:05:26 2020 +0200 media: v4l2-ctrls: Add encoder constant quality control When V4L2_CID_MPEG_VIDEO_BITRATE_MODE value is V4L2_MPEG_VIDEO_BITRATE_MODE_CQ, encoder will produce constant quality output indicated by V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY control value. Encoder will choose appropriate quantization parameter and bitrate to produce requested frame quality level. Signed-off-by: Maheshwar Ajja Reviewed-by: Hans Verkuil Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 73d513e45ac7e5219388bee98d36aae820d2876c Author: Stanimir Varbanov Date: Thu Jul 30 13:46:32 2020 +0200 media: venus: Add new interface queues reinit Presently the recovery mechanism is using two hfi functions to destroy and create interface queues. For the purpose of recovery we don't need to free and allocate the memory used for interface message queues, that's why we introduce new function which just reinit the queues. Also this will give to the recovery procedure one less reason to fail (if for some reason we couldn't allocate memory). Signed-off-by: Stanimir Varbanov Reviewed-by: Fritz Koenig Signed-off-by: Mauro Carvalho Chehab commit 43e221e485e5f9707b5c6f15484f7174f82da2e4 Author: Stanimir Varbanov Date: Thu Jul 30 13:46:31 2020 +0200 media: venus: Rework recovery mechanism After power domains and clock restructuring the recovery for sdm845 and v4 did not work properly. Fix that by reworking the recovery function and the sequence. Signed-off-by: Stanimir Varbanov Reviewed-by: Fritz Koenig Signed-off-by: Mauro Carvalho Chehab commit 10865c98986b6d7fcf98580fe12f075cba238730 Author: Stanimir Varbanov Date: Thu Jul 30 13:46:30 2020 +0200 media: venus: parser: Prepare parser for multiple invocations Presently the hfi_parser has been called only once during driver probe. To prepare the parser function to be called multiple times from recovery we need to initialize few variables which are used during parsing time. Signed-off-by: Stanimir Varbanov Reviewed-by: Fritz Koenig Signed-off-by: Mauro Carvalho Chehab commit 58084b3f6c543ace4af2bd9dcee2d1b1a4b4340a Author: Loic Poulain Date: Tue Aug 4 14:21:57 2020 +0200 media: venus: Fix reported frame intervals On dragonboard-410c (apq8016) with HFI_VERSION_1XX, the reported framerate is in unit of 1/65535 fps (for fine grained control). So the current reported supported frame intervals is wrong (max is 1/65535 fps), leading to encoding issues or format negotiation failures with gstreamer. Fix that by setting the framerate denominator to coherent value based on the the framerate factor. The factor is not always the same, e.g. with db820c (apq8096) HFI reports framerate in fps unit. So only apply that for HFI_VERSION_1XX. Signed-off-by: Loic Poulain Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit e1c69c4eef61ffe295b747992c6fd849e6cd747d Author: Vikash Garodia Date: Tue Aug 4 13:48:45 2020 +0200 media: venus: fixes for list corruption There are few list handling issues while adding and deleting node in the registered buf list in the driver. 1. list addition - buffer added into the list during buf_init while not deleted during cleanup. 2. list deletion - In capture streamoff, the list was reinitialized. As a result, if any node was present in the list, it would lead to issue while cleaning up that node during buf_cleanup. Corresponding call traces below: [ 165.751014] Call trace: [ 165.753541] __list_add_valid+0x58/0x88 [ 165.757532] venus_helper_vb2_buf_init+0x74/0xa8 [venus_core] [ 165.763450] vdec_buf_init+0x34/0xb4 [venus_dec] [ 165.768271] __buf_prepare+0x598/0x8a0 [videobuf2_common] [ 165.773820] vb2_core_qbuf+0xb4/0x334 [videobuf2_common] [ 165.779298] vb2_qbuf+0x78/0xb8 [videobuf2_v4l2] [ 165.784053] v4l2_m2m_qbuf+0x80/0xf8 [v4l2_mem2mem] [ 165.789067] v4l2_m2m_ioctl_qbuf+0x2c/0x38 [v4l2_mem2mem] [ 165.794624] v4l_qbuf+0x48/0x58 [ 1797.556001] Call trace: [ 1797.558516] __list_del_entry_valid+0x88/0x9c [ 1797.562989] vdec_buf_cleanup+0x54/0x228 [venus_dec] [ 1797.568088] __buf_prepare+0x270/0x8a0 [videobuf2_common] [ 1797.573625] vb2_core_qbuf+0xb4/0x338 [videobuf2_common] [ 1797.579082] vb2_qbuf+0x78/0xb8 [videobuf2_v4l2] [ 1797.583830] v4l2_m2m_qbuf+0x80/0xf8 [v4l2_mem2mem] [ 1797.588843] v4l2_m2m_ioctl_qbuf+0x2c/0x38 [v4l2_mem2mem] [ 1797.594389] v4l_qbuf+0x48/0x58 Signed-off-by: Vikash Garodia Reviewed-by: Fritz Koenig Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit b3a23db0e2f89b309c40e32421c423875b5c1e65 Author: Ezequiel Garcia Date: Tue Aug 25 05:52:45 2020 +0200 media: cedrus: Use H264_SCALING_MATRIX only when required Baseline, Main and Extended profiles are specified to not support a scaling matrix. Also, High profiles can optionally specify a scaling matrix, using SPS and PPS NAL units. To meet this expectation, applications are required to set the V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX control and set the V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT flag only when a scaling matrix is specified for a picture. Implement this on cedrus, which has hardware support for this case. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e6de6b3fac5f70cbf37eaa671d1bfeb2478469d9 Author: Ezequiel Garcia Date: Tue Aug 25 05:52:44 2020 +0200 media: hantro: Use H264_SCALING_MATRIX only when required Baseline, Main and Extended profiles are specified to not support a scaling matrix. Also, High profiles can optionally specify a scaling matrix, using SPS and PPS NAL units. To meet this expectation, applications are required to set the V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX control and set the V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT flag only when a scaling matrix is specified for a picture. Implement this on hantro, which has hardware support for this case. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fd902918e3e6c70e771e14e611950f361a78cfc5 Author: Ezequiel Garcia Date: Tue Aug 25 05:52:43 2020 +0200 media: rkvdec: Use H264_SCALING_MATRIX only when required Baseline, Main and Extended profiles are specified to not support a scaling matrix. Also, High profiles can optionally specify a scaling matrix, using SPS and PPS NAL units. To meet this expectation, applications are required to set the V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX control and set the V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT flag only when a scaling matrix is specified for a picture. Implement this on rkvdec, which has hardware support for this case. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d3951cfc9bee5b1d4282c2f6b9458b4a94929eee Author: Ezequiel Garcia Date: Tue Aug 25 05:52:42 2020 +0200 media: rkvdec: Drop unneeded per_request driver-specific control flag Currently, the drivers makes no distinction between per_request and mandatory, as both are used in the same request validate check. The driver only cares to know if a given control is required to be part of a request, so only one flag is needed. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 46e8893e72b43d10f5cad92355b36a7babe83724 Author: Jernej Skrabec Date: Tue Aug 25 05:52:41 2020 +0200 media: cedrus: h264: Fix frame list construction Current frame list construction algorithm assumes that decoded image will be output into its own buffer. That is true for progressive content but not for interlaced where each field is decoded separately into same buffer. Fix that by checking if capture buffer is listed in DPB. If it is, reuse it. Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cfc8c3ed533e650270152f293a3536f3ca0e7053 Author: Jernej Skrabec Date: Tue Aug 25 05:52:40 2020 +0200 media: cedrus: h264: Properly configure reference field When interlaced H264 content is being decoded, references must indicate which field is being referenced. Currently this was done by checking capture buffer flags. However, that is not correct because capture buffer may hold both fields. Fix this by checking newly introduced flags in reference lists. Signed-off-by: Jernej Skrabec Reviewed-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a52b29e8d21d6c6463ff40e862107da0717a0840 Author: Ezequiel Garcia Date: Tue Aug 25 05:52:39 2020 +0200 media: rkvdec: Don't require unneeded H264_SLICE_PARAMS Now that slice invariant parameters have been moved, the driver no longer needs this control, so drop it. Signed-off-by: Ezequiel Garcia Reviewed-by: Jonas Karlman Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 057c4452894a38e4cc256858425b2c756003a92f Author: Ezequiel Garcia Date: Tue Aug 25 05:52:38 2020 +0200 media: hantro: Don't require unneeded H264_SLICE_PARAMS Now that slice invariant parameters have been moved, the driver no longer needs this control, so drop it. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 54889c51b833d236228f983be16212fbe806bb89 Author: Ezequiel Garcia Date: Tue Aug 25 05:52:37 2020 +0200 media: uapi: h264: Rename and clarify PPS_FLAG_SCALING_MATRIX_PRESENT Applications are expected to fill V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX if a non-flat scaling matrix applies to the picture. This is the case if SPS scaling_matrix_present_flag or PPS pic_scaling_matrix_present_flag are set, and should be handled by applications. On one hand, the PPS bitstream syntax element signals the presence of a Picture scaling matrix modifying the Sequence (SPS) scaling matrix. On the other hand, our flag should indicate if the scaling matrix V4L2 control is applicable to this request. Rename the flag from PPS_FLAG_PIC_SCALING_MATRIX_PRESENT to PPS_FLAG_SCALING_MATRIX_PRESENT, to avoid mixing this flag with bitstream syntax element pic_scaling_matrix_present_flag, and clarify the meaning of our flag. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d9358563179a7f01f9020ebbe201c7e54ba3af48 Author: Ezequiel Garcia Date: Tue Aug 25 05:52:36 2020 +0200 media: uapi: h264: Clean slice invariants syntax elements The H.264 specification requires in section 7.4.3 "Slice header semantics", that the following values shall be the same in all slice headers: pic_parameter_set_id frame_num field_pic_flag bottom_field_flag idr_pic_id pic_order_cnt_lsb delta_pic_order_cnt_bottom delta_pic_order_cnt[ 0 ] delta_pic_order_cnt[ 1 ] sp_for_switch_flag slice_group_change_cycle These bitstream fields are part of the slice header, and therefore passed redundantly on each slice. The purpose of the redundancy is to make the codec fault-tolerant in network scenarios. This is of course not needed to be reflected in the V4L2 controls, given the bitstream has already been parsed by applications. Therefore, move the redundant fields to the per-frame decode parameters control (DECODE_PARAMS). Field 'pic_parameter_set_id' is simply removed in this case, because the PPS control must currently contain the active PPS. Syntax elements dec_ref_pic_marking() and those related to pic order count, remain invariant as well, and therefore, the fields dec_ref_pic_marking_bit_size and pic_order_cnt_bit_size are also common to all slices. Signed-off-by: Ezequiel Garcia Reviewed-by: Nicolas Dufresne Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2287c5e65cbcc99633c412dbfe1d39bd9f7bf1ce Author: Ezequiel Garcia Date: Tue Aug 25 05:52:35 2020 +0200 media: uapi: h264: Clarify SLICE_BASED mode Currently, the SLICE_BASED and FRAME_BASED modes documentation is misleading and not matching the intended use-cases. Drop non-required fields SLICE_PARAMS 'start_byte_offset' and DECODE_PARAMS 'num_slices' and clarify the decoding modes in the documentation. On SLICE_BASED mode, a single slice is expected per OUTPUT buffer, and therefore 'start_byte_offset' is not needed (since the offset to the slice is the start of the buffer). This mode requires the use of CAPTURE buffer holding, and so the number of slices shall not be required. On FRAME_BASED mode, the devices are expected to take care of slice parsing. Neither SLICE_PARAMS are required (and shouldn't be exposed by frame-based drivers), nor the number of slices. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f6f0d58edfa77d18c41777740958f467de615728 Author: Ezequiel Garcia Date: Tue Aug 25 05:52:34 2020 +0200 media: uapi: h264: Drop SLICE_PARAMS 'size' field The SLICE_PARAMS control is intended for slice-based devices. In this mode, the OUTPUT buffer contains a single slice, and so the buffer's plane payload size can be used to query the slice size. To reduce the API surface drop the size from the SLICE_PARAMS control. A follow-up change will remove other members in SLICE_PARAMS so we don't need to add padding fields here. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f9879eb378295e8a912d2d10c872c45f3e19421b Author: Ezequiel Garcia Date: Tue Aug 25 05:52:33 2020 +0200 media: uapi: h264: Increase size of DPB entry pic_num DPB entry PicNum maximum value is 2*MaxFrameNum for interlaced content (field_pic_flag=1). As specified, MaxFrameNum is 2^(log2_max_frame_num_minus4 + 4) and log2_max_frame_num_minus4 is in the range of 0 to 12, which means pic_num should be a 32-bit field. The v4l2_h264_dpb_entry struct needs to be padded to avoid a hole, which might be also useful to allow future uAPI extensions. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c02ff21952a6a19ca375b9dc4f9a5609616a82b8 Author: Ezequiel Garcia Date: Tue Aug 25 05:52:32 2020 +0200 media: uapi: h264: Clean DPB entry interface As discussed recently, the current interface for the Decoded Picture Buffer is not enough to properly support field coding. This commit introduces enough semantics to support frame and field coding, and to signal how DPB entries are "used for reference". Reserved fields will be added by a follow-up commit. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4245232fa6ca58f79710732bd16cefe78b8b8bc4 Author: Ezequiel Garcia Date: Tue Aug 25 05:52:31 2020 +0200 media: uapi: h264: Increase size of 'first_mb_in_slice' field Slice header syntax element 'first_mb_in_slice' can point to the last macroblock, currently the field can only reference 65536 macroblocks which is insufficient for 8K videos. Although unlikely, a 8192x4320 video (where macroblocks are 16x16), would contain 138240 macroblocks on a frame. As per the H264 specification, 'first_mb_in_slice' can be up to PicSizeInMbs - 1, so increase the size of the field to 32-bits. Note that v4l2_ctrl_h264_slice_params struct will be modified in a follow-up commit, and so we defer its 64-bit padding. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fb92c56312d4e3a5c30de963e459a040a4761665 Author: Philipp Zabel Date: Tue Aug 25 05:52:30 2020 +0200 media: uapi: h264: Clarify pic_order_cnt_bit_size field Since pic_order_cnt_bit_size is not a syntax element itself, explicitly state that it is the total size in bits of the pic_order_cnt_lsb, delta_pic_order_cnt_bottom, delta_pic_order_cnt[0], and delta_pic_order_cnt[1] syntax elements contained in the slice. [Ezequiel: rebase] Signed-off-by: Philipp Zabel Signed-off-by: Ezequiel Garcia Reviewed-by: Nicolas Dufresne Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eb44c6c9c236b1568985816254faf520fde21776 Author: Ezequiel Garcia Date: Tue Aug 25 05:52:29 2020 +0200 media: uapi: h264: Split prediction weight parameters The prediction weight parameters are only required under certain conditions, which depend on slice header parameters. As specified in section 7.3.3 Slice header syntax, the prediction weight table is present if: ((weighted_pred_flag && (slice_type == P || slice_type == SP)) || \ (weighted_bipred_idc == 1 && slice_type == B)) Given its size, it makes sense to move this table to its control, so applications can avoid passing it if the slice doesn't specify it. Before this change struct v4l2_ctrl_h264_slice_params was 960 bytes. With this change, it's 188 bytes and struct v4l2_ctrl_h264_pred_weight is 772 bytes. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cefdf805844b551e08858971e1f64e3af378d697 Author: Ezequiel Garcia Date: Tue Aug 25 05:52:28 2020 +0200 media: uapi: h264: Further clarify scaling lists order Commit 0b0393d59eb4a ("media: uapi: h264: clarify expected scaling_list_4x4/8x8 order") improved the documentation on H264 scaling lists order. This commit improves the documentation by clarifying that the lists themselves are expected in raster scan order. Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e000e1fa4bdbd783149e7f97cf3be61e1c0bab8c Author: Jernej Skrabec Date: Tue Aug 25 05:52:27 2020 +0200 media: uapi: h264: Update reference lists When dealing with interlaced frames, reference lists must tell if each particular reference is meant for top or bottom field. This info is currently not provided at all in the H264 related controls. Change reference lists to hold a structure, which specifies an index into the DPB array and the field/frame specification for the picture. Currently the only user of these lists is Cedrus which is just compile fixed here. Actual usage of will come in a following commit. Signed-off-by: Jernej Skrabec Signed-off-by: Ezequiel Garcia Tested-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ab3d4b41b4ea638be72a48a4b135dc2f9509bf51 Author: Bingbu Cao Date: Fri Aug 21 09:59:50 2020 +0200 media: ov5675: correct the maximum exposure value The unit of exposure value is different from other OmniVision sensors, driver will divide by 2 before set register, the exposure range exposed by v4l2 ctrl to user should be same as others, so the calculation for the maximum exposure value in current driver need be fixed. Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e4cf8c58af757f8bcc95ec123936a21804541719 Author: Sakari Ailus Date: Wed May 6 15:28:20 2020 +0200 media: Documentation: media: Document how to write camera sensor drivers While we have had some example drivers, there has been up to date no formal documentation on how camera sensor drivers should be written; what are the practices, why, and where they apply. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit fd210e31d7b4b14aefc92a975e3cf9d5fc2f1848 Author: Raag Jadav Date: Thu Aug 6 17:48:27 2020 +0200 media: ov7740: use SCCB regmap Make use of SCCB APIs for regmap operations. Remove i2c_check_functionality as devm_regmap_init_sccb does it for us. Signed-off-by: Raag Jadav Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 49b20d981d723fae5a93843c617af2b2c23611ec Author: Hans Verkuil Date: Fri Jul 3 11:20:32 2020 +0200 media: imx274: fix frame interval handling 1) the numerator and/or denominator might be 0, in that case fall back to the default frame interval. This is per the spec and this caused a v4l2-compliance failure. 2) the updated frame interval wasn't returned in the s_frame_interval subdev op. Signed-off-by: Hans Verkuil Reviewed-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 52438c4463ac904d14bf3496765e67750766f3a6 Author: Tom Rix Date: Sun Jul 19 17:34:47 2020 +0200 media: m5mols: Check function pointer in m5mols_sensor_power clang static analysis reports this error m5mols_core.c:767:4: warning: Called function pointer is null (null dereference) [core.CallAndMessage] info->set_power(&client->dev, 0); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In other places, the set_power ptr is checked. So add a check. Fixes: bc125106f8af ("[media] Add support for M-5MOLS 8 Mega Pixel camera ISP") Signed-off-by: Tom Rix Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e5b95c8febd504659b60a7601fd43c0ae8e4f3c0 Author: Colin Ian King Date: Mon Jul 20 18:13:35 2020 +0200 media: i2c: fix error check on max9286_read call Currently the error return from the call to max9286_read is masked with 0xf0 so the following check for a negative error return is never true. Fix this by checking for an error first, then masking the return value for subsequent conflink_mask checking. Addresses-Coverity: ("Logically dead code") Fixes: 66d8c9d2422d ("media: i2c: Add MAX9286 driver") Signed-off-by: Colin Ian King Reviewed-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4eb5928dbfff2f252d8bca7ec4c4ca0890da0927 Author: Alexander A. Klimov Date: Sun Jul 19 13:21:33 2020 +0200 media: omap: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4c85f628f6639e3e3e0a7788416154f28dfcae4f Author: Paul Kocialkowski Date: Mon Aug 3 11:06:58 2020 +0200 media: ov5640: Correct Bit Div register in clock tree diagram Although the code is correct and doing the right thing, the clock diagram showed the wrong register for the bit divider, which had me doubting the understanding of the tree. Fix this to avoid doubts in the future. Signed-off-by: Paul Kocialkowski Fixes: aa2882481cada ("media: ov5640: Adjust the clock based on the expected rate") Acked-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9eb88a819f43feed0743411317e569e836f6e4f1 Author: Jordan Hand Date: Fri Jul 24 19:37:38 2020 +0200 media: ipu3.rst: Format media-ctl and yavta commands as code blocks Fix improper line breaks and format all example yavta and media-ctl commands as code blocks to improve readability. Signed-off-by: Jordan Hand Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2110d00b4966706924df2a33cefb6e272d7544d5 Author: Jacopo Mondi Date: Mon Aug 10 23:55:43 2020 +0200 media: MAINTAINERS: ov5647: Replace maintainer Since the current maintainer email address bounces back, replace the entry and make myself and Dave Stevenson maintainers of the driver. Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Acked-by: Dave Stevenson Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 09e00460363dd3fc028f921d7bd60354de6e3d8b Author: Jacopo Mondi Date: Mon Aug 10 23:55:42 2020 +0200 media: dt-bindings: media: ov5647: Document clock-noncontinuous Document the optional clock-noncontinuous endpoint property that allows enabling MIPI CSI-2 non-continuous clock operations. Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a5412988779321dbd8c4c3b12bbc42fe0f609ce2 Author: Jacopo Mondi Date: Mon Aug 10 23:55:41 2020 +0200 media: dt-bindings: media: ov5647: Document pwdn-gpios Document in dt-schema bindings for the ov5647 sensor the optional 'pwdn-gpios' property. Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 93d087f8e6ba23460c2d7a4fc28d45d097bcdebd Author: Jacopo Mondi Date: Mon Aug 10 23:55:40 2020 +0200 media: dt-bindings: media: ov5647: Convert to json-schema Convert the ov5647 image sensor bindings to DT schema and add the file entry to MAINTAINERS. Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit da6264baf933c09a87034585dff3b80111bfd68b Author: Rahul Gottipati Date: Wed Jul 22 10:20:48 2020 +0200 media: intel-ipu3: Fix code style issue This fixes a multiline comment style warning as found by checkpatch.pl. Signed-off-by: Rahul Gottipati Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6b7324fb4d486f348c7affad13ed2d5554d9e03c Author: Bingbu Cao Date: Tue Jul 28 04:01:05 2020 +0200 media: MAINTAINERS: Fix email typo and correct name of Tianshu Fix the typo in email address of Tianshu Qiu and correct the name. Reported-by: Bjorn Helgaas Signed-off-by: Tianshu Qiu Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3cb14256d8876490a028c766f1be3a3f7bdd8c95 Author: Bingbu Cao Date: Fri Jul 24 05:45:38 2020 +0200 media: i2c: ov2740: get OTP data ready before nvmem registration The OTP data was not ready after registered as nvmem device, it is risky as the nvmem read may happen once the device exists, this patch get the OTP data ready before registering the nvmem device. OTP data missing should not break the normal camera sensor probe, so use a warning instead of an error message. Signed-off-by: Bingbu Cao Signed-off-by: Qingwu Zhang Suggested-by: Sergey Senozhatsky Reviewed-by: Sergey Senozhatsky Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1d8f95c497053839be326bd97eb3128e3b3312cb Author: Greg Kroah-Hartman Date: Tue Aug 18 15:36:07 2020 +0200 media: radio: si476x: 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8c23f411296e544ec54f212d28c8ef4b52d818c6 Author: Greg Kroah-Hartman Date: Tue Aug 18 15:36:06 2020 +0200 media: 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. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 87a9672c1d248b6dde214ce8ceaedfdc440c9496 Author: Greg Kroah-Hartman Date: Tue Aug 18 15:36:05 2020 +0200 media: mtk-vpu: 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cb562dae04b8fda867e0466cbdf65adcb557d733 Author: Greg Kroah-Hartman Date: Tue Aug 18 15:36:04 2020 +0200 media: exynos4-is: 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6d7a1b60c010aab570ff1a599f1b41eb1176078c Author: Greg Kroah-Hartman Date: Tue Aug 18 15:36:03 2020 +0200 media: coda: 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: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5d0d7b9009feb3b411814b9c1b7dddabbb10a5fb Author: Greg Kroah-Hartman Date: Tue Aug 18 15:36:02 2020 +0200 media: cec: 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 31163906f19b0c6e23c89e6852bfdaa242e8467c Author: Jonathan Bakker Date: Fri Jul 31 01:01:14 2020 +0200 media: dt-bindings: media: Correct samsung-fimc parallel port numbering The parallel port nodes should be numbered 1 and 2, not 0 and 1 for A and B respectively. The driver has always implemented 1 and 2 and the in-tree Goni DTS uses 1 as port A as well. Update the documentation to match this behaviour. Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e571f75b6b907dccc285c0e03f02fa261e79d981 Author: Jonathan Bakker Date: Fri Jul 31 01:01:13 2020 +0200 media: exynos4-is: Handle duplicate calls to vidioc_streamoff vidioc_streamoff can be called multiple times from userspace, but we should only call media_pipeline_stop when we're actually setup. This became more noticeable after commit 2a2599c66368 ("[media] media: entity: Catch unbalanced media_pipeline_stop calls") was merged as it added a WARN for unbalanced calls to media_pipeline_stop. Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4e3991c1be32496fba045619cf7dd1b0fd2c9053 Author: Jonathan Bakker Date: Fri Jul 31 01:01:12 2020 +0200 media: exynos4-is: Remove unused struct member input_index This is no longer used since the conversion to DT Signed-off-by: Jonathan Bakker Reviewed-by: Tomasz Figa Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 24939f92788f6d7cad1f23a5f78845897505feda Author: Jonathan Bakker Date: Fri Jul 31 01:01:11 2020 +0200 media: exynos4-is: Remove inh_sensor_ctrls This is a no-op as it is never set and is a remnant from non-DT days that can be safely removed. Signed-off-by: Jonathan Bakker Reviewed-by: Tomasz Figa Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 18174117ba18c505cf86a501dfa9e47b663e3310 Author: Jonathan Bakker Date: Fri Jul 31 01:01:10 2020 +0200 media: exynos4-is: Add support for multiple sensors on one port On some devices, there may be multiple camera sensors attached to the same port. Make sure we probe all of them, not just the first one. Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 401b463dac275a9159c80ce7061f8fe20ef892e5 Author: Jonathan Bakker Date: Fri Jul 31 01:01:09 2020 +0200 media: exynos4-is: Use global num_sensors rather than local index Instead of keeping a local copy of how many sensors we've probed (which may not even properly represent the number of sensors probed if we have a port without a sensor), use the global num_sensors counter that has the actual number used. This will also make it easier to add support for multiple sensors being connected to the same port. Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1068fe3aaf0ed96c7c141a07eca8f507d791fc78 Author: Jonathan Bakker Date: Fri Jul 31 01:01:08 2020 +0200 media: exynos4-is: Properly set JPEG options for parallel ports Commit ee7160e57c98 ("[media] s5p-fimc: Add support for JPEG capture") added support for JPEG capture, but missed setting a register when the parallel port was used rather than the CSIS device. Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b127f8db753aadab3fb5883713ffb2ee2e8bf16c Author: Jonathan Bakker Date: Fri Jul 31 01:01:07 2020 +0200 media: exynos4-is: Correct missing entity function initialization Commit bae4500399c4 ("[media] exynos4-is: Add missing entity function initialization") tried to suppress the warnings such as s5p-fimc-md camera: Entity type for entity FIMC.0 was not initialized! However, this missed setting for the subdev. Set it now to avoid the ugly warnings on boot. Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a1f51d37324260f16561429d77abdc1502135cfd Author: Jonathan Bakker Date: Fri Jul 31 01:01:06 2020 +0200 media: exynos4-is: Fix nullptr when no CSIS device present Not all devices use the CSIS device, some may use the FIMC directly in which case the CSIS device isn't registered. This leads to a nullptr exception when starting the stream as the CSIS device is always referenced. Instead, if getting the CSIS device fails, try getting the FIMC directly to check if we are using the subdev API Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 55400d7745ca88d3770e37b695785e18ebe23703 Author: Tomasz Figa Date: Fri Jul 31 01:01:05 2020 +0200 media: exynos4-is: Request syscon only if ISP writeback is present On FIMC variants which don't have writeback channel, there is no need to access system registers. This patch makes the driver request sysreg regmap conditionally depending on whether writeback is supported. Signed-off-by: Tomasz Figa Signed-off-by: Jonathan Bakker Reviewed-by: Tomasz Figa Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 40df2adca689eaf138d20e3e3692c17488316ed2 Author: Jonathan Bakker Date: Fri Jul 31 01:01:04 2020 +0200 media: exynos4-is: Remove static driver data for S5PV210 FIMC variants The S5PV210 platform only supports device tree based booting where the FIMC variant data is parsed directly from the device tree, hence the now unused static data can be removed. Signed-off-by: Jonathan Bakker Reviewed-by: Tomasz Figa Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 669ccf19ed2059b9d517664a2dbbf6bde87e1414 Author: Ezequiel Garcia Date: Mon Jul 27 19:05:38 2020 +0200 media: hantro: postproc: Fix motion vector space allocation When the post-processor is enabled, the driver allocates "shadow buffers" which are used for the decoder core, and exposes the post-processed buffers to userspace. For this reason, extra motion vector space has to be allocated on the shadow buffers, which the driver wasn't doing. Fix it. This fix should address artifacts on high profile bitstreams. Fixes: 8c2d66b036c77 ("media: hantro: Support color conversion via post-processing") Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6d9e8cd0553bb03e8ab9d4d2d7d17f3fb639bd86 Author: Ezequiel Garcia Date: Mon Jul 27 19:05:37 2020 +0200 media: hantro: h264: Get the correct fallback reference buffer If the bitstream and the application are incorrectly configuring the reference pictures, the hardware will need to fallback to using some other reference picture. When the post-processor is enabled, the fallback buffer should be a shadow buffer (postproc.dec_q), and not a CAPTURE queue buffer, since the latter is post-processed and not really the output of the decoder core. Fixes: 8c2d66b036c77 ("media: hantro: Support color conversion via post-processing") Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3c9c3902e325b03e1c3b5f95f7274086487498bd Author: Julia Lawall Date: Sun Jul 26 12:58:31 2020 +0200 tm6000: drop unnecessary list_empty list_for_each_entry is able to handle an empty list. The only effect of avoiding the loop is not initializing the index variable. Drop list_empty tests in cases where these variables are not used. Note that list_for_each_entry is defined in terms of list_first_entry, which indicates that it should not be used on an empty list. But in list_for_each_entry, the element obtained by list_first_entry is not really accessed, only the address of its list_head field is compared to the address of the list head, so the list_first_entry is safe. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ expression x,e; iterator name list_for_each_entry; statement S; identifier i; @@ -if (!(list_empty(x))) { list_for_each_entry(i,x,...) S - } ... when != i ? i = e Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7f86551665121931ecd6d327e019e7a69782bfcd Author: Douglas Anderson Date: Mon Aug 31 18:28:47 2020 +0300 ath10k: Get rid of "per_ce_irq" hw param As of the patch ("ath10k: Keep track of which interrupts fired, don't poll them") we now have no users of this hardware parameter. Remove it. Suggested-by: Brian Norris Signed-off-by: Douglas Anderson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200709082024.v2.2.I083faa4e62e69f863311c89ae5eb28ec5a229b70@changeid commit d66d24ac300cf41c6b88367fc9b4b6348679273d Author: Douglas Anderson Date: Mon Aug 31 18:28:47 2020 +0300 ath10k: Keep track of which interrupts fired, don't poll them If we have a per CE (Copy Engine) IRQ then we have no summary register. Right now the code generates a summary register by iterating over all copy engines and seeing if they have an interrupt pending. This has a problem. Specifically if _none_ if the Copy Engines have an interrupt pending then they might go into low power mode and reading from their address space will cause a full system crash. This was seen to happen when two interrupts went off at nearly the same time. Both were handled by a single call of ath10k_snoc_napi_poll() but, because there were two interrupts handled and thus two calls to napi_schedule() there was still a second call to ath10k_snoc_napi_poll() which ran with no interrupts pending. Instead of iterating over all the copy engines, let's just keep track of the IRQs that fire. Then we can effectively generate our own summary without ever needing to read the Copy Engines. Tested-on: WCN3990 SNOC WLAN.HL.3.2.2-00490-QCAHLSWMTPL-1 Signed-off-by: Douglas Anderson Reviewed-by: Rakesh Pillai Reviewed-by: Brian Norris Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200709082024.v2.1.I4d2f85ffa06f38532631e864a3125691ef5ffe06@changeid commit b92aba35d39d10d8a6bdf2495172fd490c598b4a Author: Rakesh Pillai Date: Mon Aug 31 18:28:47 2020 +0300 ath10k: Add interrupt summary based CE processing Currently the NAPI processing loops through all the copy engines and processes a particular copy engine is the copy completion is set for that copy engine. The host driver is not supposed to access any copy engine register after clearing the interrupt status register. This might result in kernel crash like the one below [ 1159.220143] Call trace: [ 1159.220170] ath10k_snoc_read32+0x20/0x40 [ath10k_snoc] [ 1159.220193] ath10k_ce_per_engine_service_any+0x78/0x130 [ath10k_core] [ 1159.220203] ath10k_snoc_napi_poll+0x38/0x8c [ath10k_snoc] [ 1159.220270] net_rx_action+0x100/0x3b0 [ 1159.220312] __do_softirq+0x164/0x30c [ 1159.220345] run_ksoftirqd+0x2c/0x64 [ 1159.220380] smpboot_thread_fn+0x1b0/0x288 [ 1159.220405] kthread+0x11c/0x12c [ 1159.220423] ret_from_fork+0x10/0x18 To avoid such a scenario, we generate an interrupt summary by reading the copy completion for all the copy engine before actually processing any of them. This will avoid reading the interrupt status register for any CE after the interrupt status is cleared. Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1593193967-29897-1-git-send-email-pillair@codeaurora.org commit 5a87251dac0db8704d4d18b6dc7c23e30804585b Author: Lad Prabhakar Date: Wed Aug 26 10:32:20 2020 +0100 ARM: shmobile: defconfig: Enable CONFIG_PCIE_RCAR_HOST config option PCIE_RCAR internally selects PCIE_RCAR_HOST which builds the same driver. So this patch renames CONFIG_PCIE_RCAR to CONFIG_PCIE_RCAR_HOST so that PCIE_RCAR can be safely dropped from Kconfig file. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200826093220.10266-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 9b801a1449b158ee23b1a6ab0c5f67fc735eb98f Author: Lad Prabhakar Date: Wed Aug 26 10:32:19 2020 +0100 ARM: multi_v7_defconfig: Enable CONFIG_PCIE_RCAR_HOST config option PCIE_RCAR internally selects PCIE_RCAR_HOST which builds the same driver. So this patch renames CONFIG_PCIE_RCAR to CONFIG_PCIE_RCAR_HOST so that PCIE_RCAR can be safely dropped from Kconfig file. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200826093220.10266-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a357a7840702d24a7d55d0f950af35b1be1ee005 Author: Julia Lawall Date: Sun Jul 26 12:58:30 2020 +0200 saa7134: drop unnecessary list_empty list_for_each_safe is able to handle an empty list. The only effect of avoiding the loop is not initializing the index variable. Drop list_empty tests in cases where these variables are not used. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ expression x,e; iterator name list_for_each_safe; statement S; identifier i,j; @@ -if (!(list_empty(x))) { list_for_each_safe(i,j,x) S - } ... when != i when != j ( i = e; | ? j = e; ) Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a50732124bd922949a1224ee7ca620d91fd182f6 Author: Julia Lawall Date: Sun Jul 26 12:58:28 2020 +0200 media: cx231xx: drop unnecessary list_empty list_for_each_entry is able to handle an empty list. The only effect of avoiding the loop is not initializing the index variable. Drop list_empty tests in cases where these variables are not used. Note that list_for_each_entry is defined in terms of list_first_entry, which indicates that it should not be used on an empty list. But in list_for_each_entry, the element obtained by list_first_entry is not really accessed, only the address of its list_head field is compared to the address of the list head, so the list_first_entry is safe. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ expression x,e; iterator name list_for_each_entry; statement S; identifier i; @@ -if (!(list_empty(x))) { list_for_each_entry(i,x,...) S - } ... when != i ? i = e Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0e9952804ec9c8ba60f131225eab80634339f042 Author: Abhishek Pandit-Subedi Date: Mon Aug 31 09:51:27 2020 -0700 Bluetooth: Clear suspend tasks on unregister While unregistering, make sure to clear the suspend tasks before cancelling the work. If the unregister is called during resume from suspend, this will unnecessarily add 2s to the resume time otherwise. Fixes: 4e8c36c3b0d73d (Bluetooth: Fix suspend notifier race) Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 8445e2c54c257e92084a451a0f20d6a7f3f9fa34 Author: Ville Syrjälä Date: Tue Apr 28 20:19:40 2020 +0300 drm: Replace mode->export_head with a boolean In order to shrink drm_display_mode below the magic two cacheline mark in 64bit we need to shrink it by another 8 bytes. The easiest thing to eliminate is the 'export_head' list head which is only used during the getconnector ioctl to temporarly track which modes on the connector's mode list are to be exposed and which are to remain hidden. We can simply replace the list head with a boolean which we use to tag the modes that are to be exposed. If we make sure to clear the tags after we're done with them we don't even need an extra loop over the modes to reset the tags at the start of the getconnector ioctl. Conveniently we already have a hole for the boolean left behind by the removal of mode->private_flags. The final size of the struct is now 112 bytes on 32bit and 120 bytes on 64bit. Another alternative would be a temp bitmask so we wouldn't have to have anything in the mode struct itself. The main issue is how large of a bitmask do we need? I guess we could allocate it dynamically but that means an extra kcalloc() and an extra loop through the modes to count them first (or grow the bitmask with krealloc() as needed). CC: Sam Ravnborg Cc: Daniel Vetter Cc: Emil Velikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-17-ville.syrjala@linux.intel.com Reviewed-by: Emil Velikov commit 68f4babbc63772ab4d7f99e97f3c93f9547703de Author: Krzysztof Kozlowski Date: Sat Aug 29 19:25:30 2020 +0200 ARM: dts: exynos: Move fixed clocks under root node in Exynos3250 The fixed clocks are kept under dedicated node fixed-rate-clocks, thus a fake "reg" was added. This is not correct with dtschema as fixed-clock binding does not have a "reg" property: arch/arm/boot/dts/exynos3250-artik5-eval.dt.yaml: clock@0: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200829172532.29358-2-krzk@kernel.org commit 7e98d540f21fde5768b4d28f8b3016ac080735b0 Author: Krzysztof Kozlowski Date: Sat Aug 29 16:24:59 2020 +0200 arm64: dts: exynos: Add compatibles to sysreg nodes System register nodes, implementing syscon binding, should use appropriate compatible. This fixes dtbs_check warnings: arch/arm64/boot/dts/exynos/exynos5433-tm2.dt.yaml: syscon@13b80000: compatible: ['syscon'] is not valid under any of the given schemas Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20200829142501.31478-8-krzk@kernel.org commit 1e1129b65ef3f72dbccf24de56b700a181b45227 Author: Krzysztof Kozlowski Date: Sat Aug 29 16:24:58 2020 +0200 arm64: dts: exynos: Replace deprecated "gpios" i2c-gpio property in Exynos5433 "gpios" property is deprecated. Update the Exynos5433 DTS to fix dtbs_checks warnings like: arch/arm64/boot/dts/exynos/exynos5433-tm2.dt.yaml: i2c-gpio-0: 'sda-gpios' is a required property arch/arm64/boot/dts/exynos/exynos5433-tm2.dt.yaml: i2c-gpio-0: 'scl-gpios' is a required property Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20200829142501.31478-7-krzk@kernel.org commit 857a3139bd8be4f702c030c8ca06f3fd69c1741a Author: Dinghao Liu Date: Wed Aug 26 20:14:37 2020 +0800 EDAC/i5100: Fix error handling order in i5100_init_one() When pci_get_device_func() fails, the driver doesn't need to execute pci_dev_put(). mci should still be freed, though, to prevent a memory leak. When pci_enable_device() fails, the error injection PCI device "einj" doesn't need to be disabled either. [ bp: Massage commit message, rename label to "bail_mc_free". ] Fixes: 52608ba205461 ("i5100_edac: probe for device 19 function 0") Signed-off-by: Dinghao Liu Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200826121437.31606-1-dinghao.liu@zju.edu.cn commit 0e09c4fa72f9837ea8d78cb40ab0b52ff3252ea2 Author: Ville Syrjälä Date: Tue Apr 28 20:19:39 2020 +0300 drm: Nuke mode->private_flags The last two uses of mode->private_flags (in i915 and gma500) are now gone. So let's remove mode->private_flags entirely. v2: Drop the earlier int->u8 conversion CC: Sam Ravnborg Cc: Daniel Vetter Cc: Emil Velikov Reviewed-by: Sam Ravnborg Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-16-ville.syrjala@linux.intel.com Reviewed-by: Emil Velikov commit 539f8fc253ece5501fdea1a6aa227d0618374111 Author: Jorge Ramirez-Ortiz Date: Mon Aug 31 18:11:02 2020 +0200 drivers: optee: fix i2c build issue When the optee driver is compiled into the kernel while the i2c core is configured as a module, the i2c symbols are not available. This commit addresses the situation by disabling the i2c support for this use case while allowing it in all other scenarios: i2c=y, optee=y i2c=m, optee=m i2c=y, optee=m i2c=m, optee=y (not supported) Fixes: c05210ab9757 ("drivers: optee: allow op-tee to access devices on the i2c bus") Reported-by: kernel test robot Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Jens Wiklander commit 4a17e8513376bb23f814d3e340a5692a12c69369 Author: Randy Dunlap Date: Mon Aug 31 09:38:58 2020 -0700 microblaze: fix kbuild redundant file warning Fix build warning since this file is already listed in include/asm-generic/Kbuild. ../scripts/Makefile.asm-generic:25: redundant generic-y found in arch/microblaze/include/asm/Kbuild: hw_irq.h Fixes: 630f289b7114 ("asm-generic: make more kernel-space headers mandatory") Signed-off-by: Randy Dunlap Cc: Michal Simek Cc: Michal Simek Cc: Masahiro Yamada Reviewed-by: Masahiro Yamada Link: https://lore.kernel.org/r/4d992aee-8a69-1769-e622-8d6d6e316346@infradead.org Signed-off-by: Michal Simek commit 765be4459d92382068fe3ac7620a72b649f8e21f Author: Gustavo A. R. Silva Date: Fri Aug 21 01:18:07 2020 -0500 rtlwifi: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821061807.GA8412@embeddedor commit f4ce4bf6687fc5631c8fb93b2b46d494d80de06b Author: Christophe JAILLET Date: Wed Aug 19 23:08:52 2020 +0200 rtl818x_pci: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'rtl8180_init_rx_ring()' and 'rtl8180_init_tx_ring()' GFP_KERNEL can be used because both functions are called from 'rtl8180_start()', which is a .start function (see struct ieee80211_ops) .start function can sleep, as explicitly stated in include/net/mac80211.h. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819210852.120826-1-christophe.jaillet@wanadoo.fr commit 478762855b5ae9f68fa6ead1edf7abada70fcd5f Author: Jia-Ju Bai Date: Sun Aug 2 21:29:49 2020 +0800 p54: avoid accessing the data mapped to streaming DMA In p54p_tx(), skb->data is mapped to streaming DMA on line 337: mapping = pci_map_single(..., skb->data, ...); Then skb->data is accessed on line 349: desc->device_addr = ((struct p54_hdr *)skb->data)->req_id; This access may cause data inconsistency between CPU cache and hardware. To fix this problem, ((struct p54_hdr *)skb->data)->req_id is stored in a local variable before DMA mapping, and then the driver accesses this local variable instead of skb->data. Cc: Signed-off-by: Jia-Ju Bai Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200802132949.26788-1-baijiaju@tsinghua.edu.cn commit e9cf68ff4eff35c1724f0f43309fa1d919292592 Author: Lee Jones Date: Fri Aug 21 08:16:41 2020 +0100 rtlwifi: rtl8192c: phy_common: Remove unused variable 'bbvalue' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c: In function ‘_rtl92c_phy_iq_calibrate’: drivers/net/wireless/realtek/rtlwifi/rtl8192c/phy_common.c:1223:6: warning: variable ‘bbvalue’ set but not used [-Wunused-but-set-variable] Cc: Ping-Ke Shih Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: zhengbin Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-30-lee.jones@linaro.org commit a940977aaf2aef0c1a60148c44ad86ab70b3e518 Author: Lee Jones Date: Fri Aug 21 08:16:36 2020 +0100 brcmfmac: fwsignal: Remove unused variable 'brcmf_fws_prio2fifo' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c:504:18: warning: ‘brcmf_fws_prio2fifo’ defined but not used [-Wunused-const-variable=] Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-25-lee.jones@linaro.org commit fa5768d59c53fc4a17bfc29bd2d459536f6a5828 Author: Lee Jones Date: Fri Aug 21 08:16:35 2020 +0100 iwlegacy: 4965-calib: Demote seemingly accidental kernel-doc header No parameters were documented and it's the only one in the file. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlegacy/4965-calib.c:608: warning: Function parameter or member 'il' not described in 'il4965_find_disconn_antenna' drivers/net/wireless/intel/iwlegacy/4965-calib.c:608: warning: Function parameter or member 'average_sig' not described in 'il4965_find_disconn_antenna' drivers/net/wireless/intel/iwlegacy/4965-calib.c:608: warning: Function parameter or member 'data' not described in 'il4965_find_disconn_antenna' Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Linux Wireless Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-24-lee.jones@linaro.org commit 3ecf6a3d6f622c1979a0c45c29986117a912d9f2 Author: Lee Jones Date: Fri Aug 21 08:16:34 2020 +0100 iwlegacy: 4965-rs: Demote non kernel-doc headers to standard comment blocks Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlegacy/4965-rs.c:156: warning: cannot understand function prototype: 's32 expected_tpt_legacy[RATE_COUNT] = ' drivers/net/wireless/intel/iwlegacy/4965-rs.c:406: warning: Function parameter or member 'tbl' not described in 'il4965_rs_collect_tx_data' drivers/net/wireless/intel/iwlegacy/4965-rs.c:406: warning: Function parameter or member 'scale_idx' not described in 'il4965_rs_collect_tx_data' drivers/net/wireless/intel/iwlegacy/4965-rs.c:406: warning: Function parameter or member 'attempts' not described in 'il4965_rs_collect_tx_data' drivers/net/wireless/intel/iwlegacy/4965-rs.c:406: warning: Function parameter or member 'successes' not described in 'il4965_rs_collect_tx_data' drivers/net/wireless/intel/iwlegacy/4965-rs.c:629: warning: Function parameter or member 'il' not described in 'il4965_rs_use_green' drivers/net/wireless/intel/iwlegacy/4965-rs.c:629: warning: Function parameter or member 'sta' not described in 'il4965_rs_use_green' drivers/net/wireless/intel/iwlegacy/4965-rs.c:645: warning: Function parameter or member 'lq_sta' not described in 'il4965_rs_get_supported_rates' drivers/net/wireless/intel/iwlegacy/4965-rs.c:645: warning: Function parameter or member 'hdr' not described in 'il4965_rs_get_supported_rates' drivers/net/wireless/intel/iwlegacy/4965-rs.c:645: warning: Function parameter or member 'rate_type' not described in 'il4965_rs_get_supported_rates' drivers/net/wireless/intel/iwlegacy/4965-rs.c:2130: warning: duplicate section name 'NOTE' drivers/net/wireless/intel/iwlegacy/4965-rs.c:2134: warning: Function parameter or member 'il' not described in 'il4965_rs_initialize_lq' drivers/net/wireless/intel/iwlegacy/4965-rs.c:2134: warning: Function parameter or member 'conf' not described in 'il4965_rs_initialize_lq' drivers/net/wireless/intel/iwlegacy/4965-rs.c:2134: warning: Function parameter or member 'sta' not described in 'il4965_rs_initialize_lq' drivers/net/wireless/intel/iwlegacy/4965-rs.c:2134: warning: Function parameter or member 'lq_sta' not described in 'il4965_rs_initialize_lq' Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Linux Wireless Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-23-lee.jones@linaro.org commit 5316050efdde0affa9e9f2bb108d4416844d2ff5 Author: Lee Jones Date: Fri Aug 21 08:16:32 2020 +0100 rsi: Source file headers are not suitable for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_debugfs.c:21: warning: Incorrect use of kernel-doc format: * rsi_sdio_stats_read() - This function returns the sdio status of the driver. drivers/net/wireless/rsi/rsi_91x_debugfs.c:28: warning: Function parameter or member 'seq' not described in 'rsi_sdio_stats_read' drivers/net/wireless/rsi/rsi_91x_debugfs.c:28: warning: Function parameter or member 'data' not described in 'rsi_sdio_stats_read' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-21-lee.jones@linaro.org commit 03a7c2ea609b7f7fbc4d60db2979982ac796c362 Author: Lee Jones Date: Fri Aug 21 08:16:29 2020 +0100 b43: phy_ht: Remove 9 year old TODO Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/b43/phy_ht.c: In function ‘b43_phy_ht_op_init’: drivers/net/wireless/broadcom/b43/phy_ht.c:904:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: "Alexander A. Klimov" Cc: linux-wireless@vger.kernel.org Cc: b43-dev@lists.infradead.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-18-lee.jones@linaro.org commit 9d16c385901210f7578bdafc27d9a8c643275663 Author: Lee Jones Date: Fri Aug 21 08:16:28 2020 +0100 brcmfmac: btcoex: Update 'brcmf_btcoex_state' and demote others The function headers are either very weakly documented or not at all. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:94: warning: Function parameter or member 'reg50' not described in 'brcmf_btcoex_info' drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:94: warning: Function parameter or member 'saved_regs_part2' not described in 'brcmf_btcoex_info' drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:233: warning: Function parameter or member 'btci' not described in 'btcmf_btcoex_save_part1' drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:253: warning: Function parameter or member 'btci' not described in 'brcmf_btcoex_restore_part1' drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:273: warning: Function parameter or member 't' not described in 'brcmf_btcoex_timerfunc' drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:453: warning: Function parameter or member 'vif' not described in 'brcmf_btcoex_set_mode' drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:453: warning: Function parameter or member 'duration' not described in 'brcmf_btcoex_set_mode' drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:453: warning: Excess function parameter 'cfg' description in 'brcmf_btcoex_set_mode' Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-17-lee.jones@linaro.org commit 35b7fbfc51d61f9ba23e9d7bad715babdf3a570f Author: Lee Jones Date: Fri Aug 21 08:16:27 2020 +0100 iwlegacy: 4965-mac: Convert function headers to standard comment blocks These are clearly not suitable for kernel-doc. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlegacy/4965-mac.c:234: warning: Function parameter or member 'il' not described in 'il4965_dma_addr2rbd_ptr' drivers/net/wireless/intel/iwlegacy/4965-mac.c:234: warning: Function parameter or member 'dma_addr' not described in 'il4965_dma_addr2rbd_ptr' drivers/net/wireless/intel/iwlegacy/4965-mac.c:251: warning: Function parameter or member 'il' not described in 'il4965_rx_queue_restock' drivers/net/wireless/intel/iwlegacy/4965-mac.c:301: warning: Function parameter or member 'il' not described in 'il4965_rx_allocate' drivers/net/wireless/intel/iwlegacy/4965-mac.c:301: warning: Function parameter or member 'priority' not described in 'il4965_rx_allocate' drivers/net/wireless/intel/iwlegacy/4965-mac.c:1138: warning: Function parameter or member 'il' not described in 'il4965_set_rxon_chain' drivers/net/wireless/intel/iwlegacy/4965-mac.c:1943: warning: Function parameter or member 'il' not described in 'il4965_hw_txq_ctx_free' drivers/net/wireless/intel/iwlegacy/4965-mac.c:1971: warning: Function parameter or member 'il' not described in 'il4965_txq_ctx_alloc' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2068: warning: Function parameter or member 'il' not described in 'il4965_txq_ctx_stop' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2109: warning: Function parameter or member 'il' not described in 'il4965_tx_queue_stop_scheduler' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2109: warning: Function parameter or member 'txq_id' not described in 'il4965_tx_queue_stop_scheduler' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2122: warning: Function parameter or member 'il' not described in 'il4965_tx_queue_set_q2ratid' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2122: warning: Function parameter or member 'ra_tid' not described in 'il4965_tx_queue_set_q2ratid' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2122: warning: Function parameter or member 'txq_id' not described in 'il4965_tx_queue_set_q2ratid' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2153: warning: Function parameter or member 'il' not described in 'il4965_txq_agg_enable' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2153: warning: Function parameter or member 'txq_id' not described in 'il4965_txq_agg_enable' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2153: warning: Function parameter or member 'tx_fifo' not described in 'il4965_txq_agg_enable' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2153: warning: Function parameter or member 'sta_id' not described in 'il4965_txq_agg_enable' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2153: warning: Function parameter or member 'tid' not described in 'il4965_txq_agg_enable' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2153: warning: Function parameter or member 'ssn_idx' not described in 'il4965_txq_agg_enable' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2285: warning: Function parameter or member 'il' not described in 'il4965_txq_agg_disable' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2285: warning: Function parameter or member 'txq_id' not described in 'il4965_txq_agg_disable' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2285: warning: Function parameter or member 'ssn_idx' not described in 'il4965_txq_agg_disable' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2285: warning: Function parameter or member 'tx_fifo' not described in 'il4965_txq_agg_disable' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2500: warning: Function parameter or member 'il' not described in 'il4965_tx_status_reply_compressed_ba' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2500: warning: Function parameter or member 'agg' not described in 'il4965_tx_status_reply_compressed_ba' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2500: warning: Function parameter or member 'ba_resp' not described in 'il4965_tx_status_reply_compressed_ba' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2651: warning: Function parameter or member 'il' not described in 'il4965_tx_status_reply_tx' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2651: warning: Function parameter or member 'agg' not described in 'il4965_tx_status_reply_tx' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2651: warning: Function parameter or member 'tx_resp' not described in 'il4965_tx_status_reply_tx' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2651: warning: Function parameter or member 'txq_id' not described in 'il4965_tx_status_reply_tx' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2651: warning: Function parameter or member 'start_idx' not described in 'il4965_tx_status_reply_tx' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2761: warning: Function parameter or member 'il' not described in 'il4965_hdl_tx' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2761: warning: Function parameter or member 'rxb' not described in 'il4965_hdl_tx' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2882: warning: Function parameter or member 'il' not described in 'il4965_hwrate_to_tx_control' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2882: warning: Function parameter or member 'rate_n_flags' not described in 'il4965_hwrate_to_tx_control' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2882: warning: Function parameter or member 'info' not described in 'il4965_hwrate_to_tx_control' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2908: warning: Function parameter or member 'il' not described in 'il4965_hdl_compressed_ba' drivers/net/wireless/intel/iwlegacy/4965-mac.c:2908: warning: Function parameter or member 'rxb' not described in 'il4965_hdl_compressed_ba' drivers/net/wireless/intel/iwlegacy/4965-mac.c:3514: warning: Function parameter or member 'il' not described in 'il4965_alloc_bcast_station' drivers/net/wireless/intel/iwlegacy/4965-mac.c:3554: warning: Function parameter or member 'il' not described in 'il4965_update_bcast_station' drivers/net/wireless/intel/iwlegacy/4965-mac.c:3587: warning: Function parameter or member 'il' not described in 'il4965_sta_tx_modify_enable_tid' drivers/net/wireless/intel/iwlegacy/4965-mac.c:3587: warning: Function parameter or member 'sta_id' not described in 'il4965_sta_tx_modify_enable_tid' drivers/net/wireless/intel/iwlegacy/4965-mac.c:3587: warning: Function parameter or member 'tid' not described in 'il4965_sta_tx_modify_enable_tid' drivers/net/wireless/intel/iwlegacy/4965-mac.c:3916: warning: Function parameter or member 'il' not described in 'il4965_hw_txq_free_tfd' drivers/net/wireless/intel/iwlegacy/4965-mac.c:3916: warning: Function parameter or member 'txq' not described in 'il4965_hw_txq_free_tfd' drivers/net/wireless/intel/iwlegacy/4965-mac.c:4059: warning: Function parameter or member 't' not described in 'il4965_bg_stats_periodic' drivers/net/wireless/intel/iwlegacy/4965-mac.c:4169: warning: Function parameter or member 'il' not described in 'il4965_setup_handlers' drivers/net/wireless/intel/iwlegacy/4965-mac.c:4211: warning: Function parameter or member 'il' not described in 'il4965_rx_handle' drivers/net/wireless/intel/iwlegacy/4965-mac.c:4767: warning: Function parameter or member 'ucode_raw' not described in 'il4965_ucode_callback' drivers/net/wireless/intel/iwlegacy/4965-mac.c:4767: warning: Function parameter or member 'context' not described in 'il4965_ucode_callback' drivers/net/wireless/intel/iwlegacy/4965-mac.c:5269: warning: Function parameter or member 'il' not described in 'il4965_alive_start' Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Linux Wireless Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-16-lee.jones@linaro.org commit 7a03124c1df503d612895ebcbb1fb8f6465399c9 Author: Lee Jones Date: Fri Aug 21 08:16:26 2020 +0100 rsi: File headers are not suitable for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_coex.c:24: warning: Function parameter or member 'coex_cb' not described in 'rsi_coex_determine_coex_q' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-15-lee.jones@linaro.org commit 866cf939f252872ecd0b775880e3da9a60069a2d Author: Lee Jones Date: Fri Aug 21 08:16:24 2020 +0100 brcmfmac: firmware: Demote seemingly unintentional kernel-doc header The function parameter is not documented and either are any of the other functions in this source file. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:69: warning: Function parameter or member 'c' not described in 'is_nvram_char' Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-13-lee.jones@linaro.org commit 246fe9f1503609ea282b457846fccd5c4194eb82 Author: Lee Jones Date: Fri Aug 21 08:16:22 2020 +0100 rsi: Source file headers do not make good kernel-doc candidates Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_ps.c:26: warning: Function parameter or member 'state' not described in 'str_psstate' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-11-lee.jones@linaro.org commit dceb807b2f2875659ea9958fff5ed1fbff152180 Author: Lee Jones Date: Fri Aug 21 08:16:21 2020 +0100 brcmsmac: main: Remove a bunch of unused variables Fixes the following W=1 kernel build warning(s): from drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:27: drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c: In function ‘brcms_c_dotxstatus’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:845:6: warning: variable ‘mcl’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c: In function ‘brcms_b_phy_reset’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:1779:7: warning: variable ‘phy_in_reset’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c: In function ‘brcms_ucode_download’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:2273:23: warning: variable ‘wlc’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c: In function ‘brcms_b_coreinit’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:3176:6: warning: variable ‘sflags’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c: In function ‘brcms_c_set_chanspec’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:3902:7: warning: variable ‘switchband’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c: In function ‘brcms_c_down’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:5182:7: warning: variable ‘dev_gone’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c: In function ‘brcms_c_ofdm_rateset_war’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:5393:5: warning: variable ‘r’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c: In function ‘mac80211_wlc_set_nrate’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:5876:6: warning: variable ‘bcmerror’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c: In function ‘brcms_c_d11hdrs_mac80211’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:6213:7: warning: variable ‘short_preamble’ set but not used [-Wunused-but-set-variable] Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Hauke Mehrtens Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-10-lee.jones@linaro.org commit a451ff855218a22d802f4785f8b5aad448f58d75 Author: Lee Jones Date: Fri Aug 21 08:16:18 2020 +0100 rsi: Add descriptions for rsi_set_vap_capabilities()'s parameters Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_mgmt.c:713: warning: Function parameter or member 'mac_addr' not described in 'rsi_set_vap_capabilities' drivers/net/wireless/rsi/rsi_91x_mgmt.c:713: warning: Function parameter or member 'vap_id' not described in 'rsi_set_vap_capabilities' drivers/net/wireless/rsi/rsi_91x_mgmt.c:713: warning: Function parameter or member 'vap_status' not described in 'rsi_set_vap_capabilities' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-7-lee.jones@linaro.org commit 5763605890fe38f24e84d96ce947eb642a839d75 Author: Lee Jones Date: Fri Aug 21 08:16:17 2020 +0100 brcmfmac: p2p: Fix a bunch of function docs Some formatting issues, some missing and some extra descriptions. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:162: warning: Function parameter or member 'oui' not described in 'brcmf_p2p_pub_act_frame' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:162: warning: Function parameter or member 'elts' not described in 'brcmf_p2p_pub_act_frame' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:181: warning: Function parameter or member 'oui' not described in 'brcmf_p2p_action_frame' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:181: warning: Function parameter or member 'elts' not described in 'brcmf_p2p_action_frame' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:196: warning: Function parameter or member 'query_data' not described in 'brcmf_p2psd_gas_pub_act_frame' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:210: warning: Function parameter or member 'extra_listen' not described in 'brcmf_config_af_params' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:776: warning: Function parameter or member 'ifp' not described in 'brcmf_p2p_run_escan' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:776: warning: Excess function parameter 'ndev' description in 'brcmf_p2p_run_escan' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:776: warning: Excess function parameter 'action' description in 'brcmf_p2p_run_escan' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:977: warning: Function parameter or member 'wdev' not described in 'brcmf_p2p_remain_on_channel' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:977: warning: Function parameter or member 'cookie' not described in 'brcmf_p2p_remain_on_channel' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1063: warning: Function parameter or member 'channel' not described in 'brcmf_p2p_act_frm_search' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1337: warning: Function parameter or member 'mac' not described in 'brcmf_p2p_gon_req_collision' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:2046: warning: Function parameter or member 'cfg' not described in 'brcmf_p2p_ifchange' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:2046: warning: Function parameter or member 'if_type' not described in 'brcmf_p2p_ifchange' drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:2046: warning: Excess function parameter 'mac' description in 'brcmf_p2p_ifchange' Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-6-lee.jones@linaro.org commit d7f95d9204ca1a73183fde8c5a017f2060763d05 Author: Lee Jones Date: Fri Aug 21 08:16:16 2020 +0100 brcmsmac: ampdu: Remove a bunch of unused variables Fixes the following W=1 kernel build warning(s): from drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:18: drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c: In function ‘brcms_c_ampdu_finalize’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:648:25: warning: variable ‘sgi’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c: In function ‘brcms_c_ampdu_dotxstatus_complete’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:856:18: warning: variable ‘rr_retry_limit’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:855:5: warning: variable ‘antselid’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:853:41: warning: variable ‘tx_error’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:853:7: warning: variable ‘update_rate’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c: In function ‘brcms_c_ampdu_dotxstatus’: drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:1037:28: warning: variable ‘tx_info’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:1035:28: warning: variable ‘ini’ set but not used [-Wunused-but-set-variable] Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-5-lee.jones@linaro.org commit 501c0980b7529838e4f860b29ae7900298c3e570 Author: Lee Jones Date: Fri Aug 21 08:16:14 2020 +0100 rsi: Add description for function param 'sta' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_mac80211.c:1021: warning: Function parameter or member 'sta' not described in 'rsi_mac80211_set_key' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821071644.109970-3-lee.jones@linaro.org commit adb48b26985686f93f20ca71c16c067d790e7af3 Author: Sam McNally Date: Mon Jul 27 16:03:37 2020 +1000 drm/dp_mst: Support remote i2c writes For DP MST outputs, the i2c device currently only supports transfers that can be implemented using remote i2c reads. Such transfers must consist of zero or more write transactions followed by one read transaction. DDC/CI commands require standalone write transactions and hence aren't supported. Since each remote i2c write is handled as a separate transfer, remote i2c writes can support transfers consisting of write transactions, where all but the last have I2C_M_STOP set. According to the DDC/CI 1.1 standard, DDC/CI commands only require a single write or read transaction in a transfer, so this is sufficient. For i2c transfers meeting the above criteria, generate and send a remote i2c write message for each transaction. Add the trivial remote i2c write reply parsing support so remote i2c write acks bubble up correctly. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/37 Signed-off-by: Sam McNally Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200727160225.1.I4e95a534de051551cd143e6cb83d4c5a9b0ad1cd@changeid commit ea4e3bef4c94d5b5d8e790f37b48b7641172bcf5 Author: Kyung Min Park Date: Mon Aug 31 11:35:00 2020 -0700 Documentation/x86: Add documentation for /proc/cpuinfo feature flags /proc/cpuinfo shows features which the kernel supports. Some of these flags are derived from CPUID, and others are derived from other sources, including some that are entirely software-based. Currently, there is not any documentation in the kernel about how /proc/cpuinfo flags are generated and what it means when they are missing. Add documentation for /proc/cpuinfo feature flags enumeration. Document how and when x86 feature flags are used. Also discuss what their presence or absence mean for the kernel and users. Suggested-by: Dave Hansen Co-developed-by: Ricardo Neri Signed-off-by: Ricardo Neri Signed-off-by: Kyung Min Park Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20200831183500.15481-1-kyung.min.park@intel.com commit ec511969097faefdb6f2c4dd027d4622fde26feb Author: Lee Jones Date: Wed Aug 19 08:24:02 2020 +0100 hostap: Remove set but unused variable 'hostscan' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intersil/hostap/hostap_ioctl.c: In function ‘prism2_translate_scan’: drivers/net/wireless/intersil/hostap/hostap_ioctl.c:1958:13: warning: variable ‘hostscan’ set but not used [-Wunused-but-set-variable] Cc: Jouni Malinen Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-29-lee.jones@linaro.org commit f030ed4079d01abe73fdbba206e5472eed17ea5b Author: Lee Jones Date: Wed Aug 19 08:24:01 2020 +0100 libertas_tf: Fix function documentation formatting errors Kerneldoc expects attributes/parameters to be in '@*.: ' format and gets confused if the variable does not follow the type/attribute definitions. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/marvell/libertas_tf/if_usb.c:56: warning: Function parameter or member 'urb' not described in 'if_usb_write_bulk_callback' drivers/net/wireless/marvell/libertas_tf/if_usb.c:73: warning: Function parameter or member 'cardp' not described in 'if_usb_free' drivers/net/wireless/marvell/libertas_tf/if_usb.c:146: warning: Function parameter or member 'intf' not described in 'if_usb_probe' drivers/net/wireless/marvell/libertas_tf/if_usb.c:146: warning: Function parameter or member 'id' not described in 'if_usb_probe' drivers/net/wireless/marvell/libertas_tf/if_usb.c:244: warning: Function parameter or member 'intf' not described in 'if_usb_disconnect' drivers/net/wireless/marvell/libertas_tf/if_usb.c:272: warning: Function parameter or member 'cardp' not described in 'if_usb_send_fw_pkt' drivers/net/wireless/marvell/libertas_tf/if_usb.c:372: warning: Function parameter or member 'cardp' not described in 'usb_tx_block' drivers/net/wireless/marvell/libertas_tf/if_usb.c:372: warning: Function parameter or member 'payload' not described in 'usb_tx_block' drivers/net/wireless/marvell/libertas_tf/if_usb.c:372: warning: Function parameter or member 'nb' not described in 'usb_tx_block' drivers/net/wireless/marvell/libertas_tf/if_usb.c:372: warning: Function parameter or member 'data' not described in 'usb_tx_block' drivers/net/wireless/marvell/libertas_tf/if_usb.c:625: warning: Function parameter or member 'urb' not described in 'if_usb_receive' drivers/net/wireless/marvell/libertas_tf/if_usb.c:714: warning: Function parameter or member 'priv' not described in 'if_usb_host_to_card' drivers/net/wireless/marvell/libertas_tf/if_usb.c:714: warning: Function parameter or member 'type' not described in 'if_usb_host_to_card' drivers/net/wireless/marvell/libertas_tf/if_usb.c:714: warning: Function parameter or member 'payload' not described in 'if_usb_host_to_card' drivers/net/wireless/marvell/libertas_tf/if_usb.c:714: warning: Function parameter or member 'nb' not described in 'if_usb_host_to_card' drivers/net/wireless/marvell/libertas_tf/if_usb.c:742: warning: Function parameter or member 'cardp' not described in 'if_usb_issue_boot_command' drivers/net/wireless/marvell/libertas_tf/if_usb.c:742: warning: Function parameter or member 'ivalue' not described in 'if_usb_issue_boot_command' drivers/net/wireless/marvell/libertas_tf/if_usb.c:766: warning: Function parameter or member 'data' not described in 'check_fwfile_format' drivers/net/wireless/marvell/libertas_tf/if_usb.c:766: warning: Function parameter or member 'totlen' not described in 'check_fwfile_format' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Colin Ian King Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-28-lee.jones@linaro.org commit 457023556e948c7c21ce4c2342d498c24a714f38 Author: Lee Jones Date: Wed Aug 19 08:24:00 2020 +0100 libertas: Fix misnaming for function param 'device' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/marvell/libertas/firmware.c:134: warning: Function parameter or member 'device' not described in 'lbs_get_firmware_async' drivers/net/wireless/marvell/libertas/firmware.c:134: warning: Excess function parameter 'dev' description in 'lbs_get_firmware_async' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: libertas-dev@lists.infradead.org Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-27-lee.jones@linaro.org commit 2de64ca7c9fadd32b261530592db4a6adbfcb53f Author: Lee Jones Date: Wed Aug 19 08:23:59 2020 +0100 brcmfmac: p2p: Deal with set but unused variables 'vif' is a function parameter which is oddly overwritten within the function, but never read back. 'timeout' is set, but never checked. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c: In function ‘brcmf_p2p_scan_prep’: drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:894:31: warning: parameter ‘vif’ set but not used [-Wunused-but-set-parameter] drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c: In function ‘brcmf_p2p_tx_action_frame’: drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1549:6: warning: variable ‘timeout’ set but not used [-Wunused-but-set-variable] Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-26-lee.jones@linaro.org commit 7951a3bfa2b13b85d309c84f20a67d7d9a0f5565 Author: Lee Jones Date: Wed Aug 19 08:23:58 2020 +0100 iwlegacy: 4965: Demote a bunch of nonconformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlegacy/4965.c:35: warning: Function parameter or member 'il' not described in 'il4965_verify_inst_sparse' drivers/net/wireless/intel/iwlegacy/4965.c:35: warning: Function parameter or member 'image' not described in 'il4965_verify_inst_sparse' drivers/net/wireless/intel/iwlegacy/4965.c:35: warning: Function parameter or member 'len' not described in 'il4965_verify_inst_sparse' drivers/net/wireless/intel/iwlegacy/4965.c:66: warning: Function parameter or member 'il' not described in 'il4965_verify_inst_full' drivers/net/wireless/intel/iwlegacy/4965.c:66: warning: Function parameter or member 'image' not described in 'il4965_verify_inst_full' drivers/net/wireless/intel/iwlegacy/4965.c:66: warning: Function parameter or member 'len' not described in 'il4965_verify_inst_full' drivers/net/wireless/intel/iwlegacy/4965.c:105: warning: Function parameter or member 'il' not described in 'il4965_verify_ucode' drivers/net/wireless/intel/iwlegacy/4965.c:329: warning: Function parameter or member 'il' not described in 'il4965_load_bsm' drivers/net/wireless/intel/iwlegacy/4965.c:416: warning: Function parameter or member 'il' not described in 'il4965_set_ucode_ptrs' drivers/net/wireless/intel/iwlegacy/4965.c:451: warning: Function parameter or member 'il' not described in 'il4965_init_alive_start' drivers/net/wireless/intel/iwlegacy/4965.c:583: warning: Function parameter or member 'eeprom_voltage' not described in 'il4965_get_voltage_compensation' drivers/net/wireless/intel/iwlegacy/4965.c:583: warning: Function parameter or member 'current_voltage' not described in 'il4965_get_voltage_compensation' drivers/net/wireless/intel/iwlegacy/4965.c:668: warning: Function parameter or member 'il' not described in 'il4965_interpolate_chan' drivers/net/wireless/intel/iwlegacy/4965.c:668: warning: Function parameter or member 'channel' not described in 'il4965_interpolate_chan' drivers/net/wireless/intel/iwlegacy/4965.c:668: warning: Function parameter or member 'chan_info' not described in 'il4965_interpolate_chan' drivers/net/wireless/intel/iwlegacy/4965.c:1242: warning: Function parameter or member 'il' not described in 'il4965_send_tx_power' drivers/net/wireless/intel/iwlegacy/4965.c:1537: warning: Function parameter or member 'il' not described in 'il4965_txq_update_byte_cnt_tbl' drivers/net/wireless/intel/iwlegacy/4965.c:1537: warning: Function parameter or member 'txq' not described in 'il4965_txq_update_byte_cnt_tbl' drivers/net/wireless/intel/iwlegacy/4965.c:1537: warning: Function parameter or member 'byte_cnt' not described in 'il4965_txq_update_byte_cnt_tbl' drivers/net/wireless/intel/iwlegacy/4965.c:1564: warning: Function parameter or member 'il' not described in 'il4965_hw_get_temperature' drivers/net/wireless/intel/iwlegacy/4965.c:1564: warning: Excess function parameter 'stats' description in 'il4965_hw_get_temperature' drivers/net/wireless/intel/iwlegacy/4965.c:1633: warning: Function parameter or member 'il' not described in 'il4965_is_temp_calib_needed' Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Linux Wireless Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-25-lee.jones@linaro.org commit 9463fd554bb87b0b05a831d3d47ec1a08ea4a2f9 Author: Lee Jones Date: Wed Aug 19 08:23:57 2020 +0100 rsi: File header comments should not be kernel-doc Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_hal.c:25: warning: cannot understand function prototype: 'struct ta_metadata metadata_flash_content[] = ' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-24-lee.jones@linaro.org commit 311175173c8ae63d6dcaac48f5d429161c712b13 Author: Lee Jones Date: Wed Aug 19 08:23:54 2020 +0100 rsi: Fix a myriad of documentation issues Too many, not enough, misnamed and formatting problems, all resolved. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_mgmt.c:24: warning: cannot understand function prototype: 'struct bootup_params boot_params_20 = ' drivers/net/wireless/rsi/rsi_91x_mgmt.c:487: warning: Excess function parameter 'type' description in 'rsi_mgmt_pkt_to_core' drivers/net/wireless/rsi/rsi_91x_mgmt.c:538: warning: Function parameter or member 'sta_id' not described in 'rsi_hal_send_sta_notify_frame' drivers/net/wireless/rsi/rsi_91x_mgmt.c:538: warning: Function parameter or member 'vif' not described in 'rsi_hal_send_sta_notify_frame' drivers/net/wireless/rsi/rsi_91x_mgmt.c:615: warning: Function parameter or member 'sta_id' not described in 'rsi_send_aggregation_params_frame' drivers/net/wireless/rsi/rsi_91x_mgmt.c:711: warning: Function parameter or member 'mode' not described in 'rsi_set_vap_capabilities' drivers/net/wireless/rsi/rsi_91x_mgmt.c:711: warning: Function parameter or member 'mac_addr' not described in 'rsi_set_vap_capabilities' drivers/net/wireless/rsi/rsi_91x_mgmt.c:711: warning: Function parameter or member 'vap_id' not described in 'rsi_set_vap_capabilities' drivers/net/wireless/rsi/rsi_91x_mgmt.c:711: warning: Function parameter or member 'vap_status' not described in 'rsi_set_vap_capabilities' drivers/net/wireless/rsi/rsi_91x_mgmt.c:711: warning: Excess function parameter 'opmode' description in 'rsi_set_vap_capabilities' drivers/net/wireless/rsi/rsi_91x_mgmt.c:794: warning: Function parameter or member 'sta_id' not described in 'rsi_hal_load_key' drivers/net/wireless/rsi/rsi_91x_mgmt.c:794: warning: Function parameter or member 'vif' not described in 'rsi_hal_load_key' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1053: warning: Function parameter or member 'curchan' not described in 'rsi_band_check' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1173: warning: Excess function parameter 'channel' description in 'rsi_send_radio_params_update' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1299: warning: Function parameter or member 'sta' not described in 'rsi_send_auto_rate_request' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1299: warning: Function parameter or member 'sta_id' not described in 'rsi_send_auto_rate_request' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1299: warning: Function parameter or member 'vif' not described in 'rsi_send_auto_rate_request' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Function parameter or member 'opmode' not described in 'rsi_inform_bss_status' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Function parameter or member 'addr' not described in 'rsi_inform_bss_status' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Function parameter or member 'sta' not described in 'rsi_inform_bss_status' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Function parameter or member 'sta_id' not described in 'rsi_inform_bss_status' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Function parameter or member 'assoc_cap' not described in 'rsi_inform_bss_status' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Function parameter or member 'vif' not described in 'rsi_inform_bss_status' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Excess function parameter 'bssid' description in 'rsi_inform_bss_status' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1543: warning: Function parameter or member 'common' not described in 'rsi_send_block_unblock_frame' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1543: warning: Function parameter or member 'block_event' not described in 'rsi_send_block_unblock_frame' drivers/net/wireless/rsi/rsi_91x_mgmt.c:1587: warning: Excess function parameter 'Return' description in 'rsi_send_rx_filter_frame' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-21-lee.jones@linaro.org commit 5dfcdc7a520ef9fbb4b24363c0fb9ccb840b6725 Author: Lee Jones Date: Wed Aug 19 08:23:52 2020 +0100 rsi: Fix a few kerneldoc misdemeanours - File headers should not be kernel-doc - Misnaming issues - Missing function parameter documentation Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_mac80211.c:24: warning: cannot understand function prototype: 'const struct ieee80211_channel rsi_2ghz_channels[] = ' drivers/net/wireless/rsi/rsi_91x_mac80211.c:739: warning: Function parameter or member 'vif' not described in 'rsi_get_connected_channel' drivers/net/wireless/rsi/rsi_91x_mac80211.c:739: warning: Excess function parameter 'adapter' description in 'rsi_get_connected_channel' drivers/net/wireless/rsi/rsi_91x_mac80211.c:868: warning: Function parameter or member 'changed_flags' not described in 'rsi_mac80211_conf_filter' drivers/net/wireless/rsi/rsi_91x_mac80211.c:868: warning: Excess function parameter 'changed' description in 'rsi_mac80211_conf_filter' drivers/net/wireless/rsi/rsi_91x_mac80211.c:946: warning: Function parameter or member 'sta' not described in 'rsi_hal_key_config' drivers/net/wireless/rsi/rsi_91x_mac80211.c:1245: warning: Function parameter or member 'vif' not described in 'rsi_perform_cqm' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-19-lee.jones@linaro.org commit a8433a92521b175562f12d895268d269397d6d1d Author: Lee Jones Date: Wed Aug 19 08:23:51 2020 +0100 rsi: Fix misnamed function parameter 'rx_pkt' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_main.c:157: warning: Function parameter or member 'rx_pkt' not described in 'rsi_read_pkt' drivers/net/wireless/rsi/rsi_91x_main.c:157: warning: Excess function parameter 'rcv_pkt' description in 'rsi_read_pkt' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-18-lee.jones@linaro.org commit e6cf87bfe869e0cbe99978b422a43ddd5bccd655 Author: Lee Jones Date: Wed Aug 19 08:23:49 2020 +0100 mt7601u: phy: Fix misnaming when documented function parameter 'dac' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/mediatek/mt7601u/phy.c:1216: warning: Function parameter or member 'dac' not described in 'mt7601u_set_tx_dac' drivers/net/wireless/mediatek/mt7601u/phy.c:1216: warning: Excess function parameter 'path' description in 'mt7601u_set_tx_dac' Cc: Jakub Kicinski Cc: Kalle Valo Cc: "David S. Miller" Cc: Matthias Brugger Cc: Felix Fietkau Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-16-lee.jones@linaro.org commit fff15f23b8e74c2f969a5d25f29d0565e76e7137 Author: Tian Tao Date: Tue Sep 1 16:27:17 2020 +0800 thunderbolt: Use kobj_to_dev() instead of container_of() Doesn't really matter for an individual driver, but it may get coppied to lots more. I consider it's a little tidy up. Signed-off-by: Tian Tao Signed-off-by: Mika Westerberg commit f696d724358c47cd077bde17ecf611810ee4277d Author: Lee Jones Date: Wed Aug 19 08:23:48 2020 +0100 libertas: Fix 'timer_list' stored private data related dot-rot Fixes the following W=1 kernel build warning(s): drivers/net/wireless/marvell/libertas/main.c:727: warning: Function parameter or member 't' not described in 'lbs_cmd_timeout_handler' drivers/net/wireless/marvell/libertas/main.c:727: warning: Excess function parameter 'data' description in 'lbs_cmd_timeout_handler' drivers/net/wireless/marvell/libertas/main.c:761: warning: Function parameter or member 't' not described in 'lbs_tx_lockup_handler' drivers/net/wireless/marvell/libertas/main.c:761: warning: Excess function parameter 'data' description in 'lbs_tx_lockup_handler' drivers/net/wireless/marvell/libertas/main.c:784: warning: Function parameter or member 't' not described in 'auto_deepsleep_timer_fn' drivers/net/wireless/marvell/libertas/main.c:784: warning: Excess function parameter 'data' description in 'auto_deepsleep_timer_fn' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: libertas-dev@lists.infradead.org Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-15-lee.jones@linaro.org commit e2eb189e766008ec69eb5229647448c911f9f92b Author: Lee Jones Date: Wed Aug 19 08:23:47 2020 +0100 cw1200: wsm: Remove 'dummy' variables They're never read, so there is no reason for them to exist. They just cause the compiler to complain. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/st/cw1200/wsm.c: In function ‘wsm_ba_timeout_indication’: drivers/net/wireless/st/cw1200/wsm.c:1033:5: warning: variable ‘dummy2’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/st/cw1200/wsm.c:1031:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] Cc: Solomon Peachy Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Dmitry Tarnyagin Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-14-lee.jones@linaro.org commit debdbb0c1b20c8517f384fcd0d9622b9eb574f8c Author: Lee Jones Date: Wed Aug 19 08:23:45 2020 +0100 hostap: hostap_ap: Mark 'txt' as __always_unused Keeping this around to act as documentation, since its use is currently #if'ed out at the end of the function. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intersil/hostap/hostap_ap.c: In function ‘handle_assoc’: drivers/net/wireless/intersil/hostap/hostap_ap.c:1507:8: warning: variable ‘txt’ set but not used [-Wunused-but-set-variable] Cc: Jouni Malinen Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-12-lee.jones@linaro.org commit 6182abd858f74f7701ae19bf6b89eb33a73a61e1 Author: Lee Jones Date: Wed Aug 19 08:23:43 2020 +0100 iwlegacy: debug: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the sourcefile and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlegacy/debug.c:1373: warning: Function parameter or member 'il' not described in 'il_dbgfs_unregister' Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Linux Wireless Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-10-lee.jones@linaro.org commit 9554663b8c57553af2899f9e28d2d685ca8864db Author: Lee Jones Date: Wed Aug 19 08:23:41 2020 +0100 libertas_tf: Fix a bunch of function doc formatting issues Kerneldoc expects attributes/parameters to be in '@*.: ' format and gets confused if the variable does not follow the type/attribute definitions. Also demote one stray non-kernel-doc header. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/marvell/libertas_tf/cmd.c:44: warning: Function parameter or member 'priv' not described in 'lbtf_cmd_copyback' drivers/net/wireless/marvell/libertas_tf/cmd.c:44: warning: Function parameter or member 'extra' not described in 'lbtf_cmd_copyback' drivers/net/wireless/marvell/libertas_tf/cmd.c:44: warning: Function parameter or member 'resp' not described in 'lbtf_cmd_copyback' drivers/net/wireless/marvell/libertas_tf/cmd.c:80: warning: Function parameter or member 'priv' not described in 'lbtf_update_hw_spec' drivers/net/wireless/marvell/libertas_tf/cmd.c:150: warning: Function parameter or member 'priv' not described in 'lbtf_set_channel' drivers/net/wireless/marvell/libertas_tf/cmd.c:150: warning: Function parameter or member 'channel' not described in 'lbtf_set_channel' drivers/net/wireless/marvell/libertas_tf/cmd.c:277: warning: Function parameter or member 'priv' not described in '__lbtf_cleanup_and_insert_cmd' drivers/net/wireless/marvell/libertas_tf/cmd.c:277: warning: Function parameter or member 'cmdnode' not described in '__lbtf_cleanup_and_insert_cmd' drivers/net/wireless/marvell/libertas_tf/cmd.c:442: warning: Function parameter or member 'priv' not described in 'lbtf_allocate_cmd_buffer' drivers/net/wireless/marvell/libertas_tf/cmd.c:490: warning: Function parameter or member 'priv' not described in 'lbtf_free_cmd_buffer' drivers/net/wireless/marvell/libertas_tf/cmd.c:527: warning: Function parameter or member 'priv' not described in 'lbtf_get_cmd_ctrl_node' drivers/net/wireless/marvell/libertas_tf/cmd.c:561: warning: Function parameter or member 'priv' not described in 'lbtf_execute_next_command' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-8-lee.jones@linaro.org commit 25ced81e288d2def9f6e6f10e1c88870be8d3121 Author: Lee Jones Date: Wed Aug 19 08:23:40 2020 +0100 wlcore: cmd: Fix some parameter description disparities Firstly a rename, then a split (there are 2 'len's that need documenting). Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ti/wlcore/cmd.c:832: warning: Function parameter or member 'buf_len' not described in 'wl1271_cmd_test' drivers/net/wireless/ti/wlcore/cmd.c:832: warning: Excess function parameter 'len' description in 'wl1271_cmd_test' drivers/net/wireless/ti/wlcore/cmd.c:862: warning: Function parameter or member 'cmd_len' not described in 'wl1271_cmd_interrogate' drivers/net/wireless/ti/wlcore/cmd.c:862: warning: Function parameter or member 'res_len' not described in 'wl1271_cmd_interrogate' drivers/net/wireless/ti/wlcore/cmd.c:862: warning: Excess function parameter 'len' description in 'wl1271_cmd_interrogate' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Hari Nagalla Cc: Guy Mishol Cc: Maital Hahn Cc: Luciano Coelho Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-7-lee.jones@linaro.org commit 9833f50345971f0f9ffdd3d66147499d89ab941f Author: Lee Jones Date: Wed Aug 19 08:23:38 2020 +0100 libertas_tf: Demote non-conformant kernel-doc headers There are only 2 kernel-doc headers in this file and both are incorrect. The first one does not attempt to document the function at all and the second one is suffering from severe doc-rot; the format is wrong and only 1 out of 3 parameters are being documented. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/marvell/libertas_tf/main.c:129: warning: Function parameter or member 't' not described in 'command_timer_fn' drivers/net/wireless/marvell/libertas_tf/main.c:554: warning: Function parameter or member 'card' not described in 'lbtf_add_card' drivers/net/wireless/marvell/libertas_tf/main.c:554: warning: Function parameter or member 'dmdev' not described in 'lbtf_add_card' drivers/net/wireless/marvell/libertas_tf/main.c:554: warning: Function parameter or member 'ops' not described in 'lbtf_add_card' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-5-lee.jones@linaro.org commit 2fc4c9ff160695b963f4aae1a0435a8256207cd8 Author: Lee Jones Date: Wed Aug 19 08:23:37 2020 +0100 rsi: File header should not be kernel-doc Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_core.c:23: warning: Incorrect use of kernel-doc format: * rsi_determine_min_weight_queue() - This function determines the queue with drivers/net/wireless/rsi/rsi_91x_core.c:30: warning: Function parameter or member 'common' not described in 'rsi_determine_min_weight_queue' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-4-lee.jones@linaro.org commit 470d48c1c4c63360b710b1a9ab289f97152012c4 Author: Lee Jones Date: Wed Aug 19 08:23:36 2020 +0100 rsi: Fix some kernel-doc issues The file header should not be kernel-doc. Add missing 'rec_pkt' description. Update 'rsi_91x_init()'s parameter description. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/rsi/rsi_91x_main.c:17: warning: Function parameter or member 'fmt' not described in 'pr_fmt' drivers/net/wireless/rsi/rsi_91x_main.c:156: warning: Function parameter or member 'rx_pkt' not described in 'rsi_read_pkt' drivers/net/wireless/rsi/rsi_91x_main.c:287: warning: Function parameter or member 'oper_mode' not described in 'rsi_91x_init' drivers/net/wireless/rsi/rsi_91x_main.c:287: warning: Excess function parameter 'void' description in 'rsi_91x_init' Cc: Amitkumar Karwar Cc: Siva Rebbagondla Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-3-lee.jones@linaro.org commit 34537d4924ba2a4e20d24b1d7e14530e6f741279 Author: Lee Jones Date: Wed Aug 19 08:23:35 2020 +0100 hostap: Mark 'freq_list' as __maybe_unused 'freq_list' is used in some source files which include hostap.h, but not all. The compiler complains about the times it's not used. Mark it as __maybe_used to tell the compiler that this is not only okay, it's expected. Fixes the following W=1 kernel build warning(s): In file included from drivers/net/wireless/intersil/hostap/hostap_80211_tx.c:9: drivers/net/wireless/intersil/hostap/hostap.h:11:19: warning: ‘freq_list’ defined but not used [-Wunused-const-variable=] In file included from drivers/net/wireless/intersil/hostap/hostap_main.c:31: drivers/net/wireless/intersil/hostap/hostap.h:11:19: warning: ‘freq_list’ defined but not used [-Wunused-const-variable=] In file included from drivers/net/wireless/intersil/hostap/hostap_proc.c:10: drivers/net/wireless/intersil/hostap/hostap.h:11:19: warning: ‘freq_list’ defined but not used [-Wunused-const-variable=] In file included from drivers/net/wireless/intersil/hostap/hostap_hw.c:50, from drivers/net/wireless/intersil/hostap/hostap_cs.c:196: At top level: drivers/net/wireless/intersil/hostap/hostap.h:11:19: warning: ‘freq_list’ defined but not used [-Wunused-const-variable=] In file included from drivers/net/wireless/intersil/hostap/hostap_hw.c:50, from drivers/net/wireless/intersil/hostap/hostap_pci.c:221: At top level: drivers/net/wireless/intersil/hostap/hostap.h:11:19: warning: ‘freq_list’ defined but not used [-Wunused-const-variable=] In file included from drivers/net/wireless/intersil/hostap/hostap_hw.c:50, from drivers/net/wireless/intersil/hostap/hostap_plx.c:264: At top level: drivers/net/wireless/intersil/hostap/hostap.h:11:19: warning: ‘freq_list’ defined but not used [-Wunused-const-variable=] Cc: Jouni Malinen Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-2-lee.jones@linaro.org commit 6b8c7574a5f889c8e1fb6ec54b09d8d9d8a9fb37 Author: Allen Pais Date: Mon Aug 31 10:06:59 2020 +0530 rtlwifi: fix build warning Tasklet conversion patch introduced a build warning in _rtl_usb_init_rx, this patch fixes the warning. Reported-by: kernel test robot Fixes: d3ccc14dfe95 ("rtlwifi/rtw88: convert tasklets to use new tasklet_setup() API") Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200831043659.281712-1-allen.lkml@gmail.com commit 5d4650ae8ba66695ab8cdc32ca7e8d0d9c8f2099 Author: Allen Pais Date: Mon Aug 31 10:04:25 2020 +0530 zd1211rw: fix build warning Tasklet conversion patches intoruced a build warning in init_usb_rx(), this patch fixes the same. Reported-by: kernel test robot Fixes: 26721b02466e ("zd1211rw: convert tasklets to use new tasklet_setup() API") Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200831043425.281538-1-allen.lkml@gmail.com commit 464d9b349be634bd12978f2554b2b0198e56399d Author: Kuninori Morimoto Date: Mon Aug 24 11:22:06 2020 +0900 soc: renesas: Align driver description titles Now, Renesas SoC drivers are under menu, but current descriptions are not aligned. This patch aligns them. - Emma Mobile EV2 - RZ/A1H (R7S72100) ... - R-Car H2 (R8A77900) ... - Renesas R-Car H3 ES1.x SoC Platform ... - R-Car H2 System Controller support - R-Car M2-W/N System Controller support - R-Car V2H System Controller support - R-Car E2 System Controller support - R-Car H3 System Controller support - R-Car M3-W System Controller support - R-Car M3-W+ System Controller support - R-Car M3-N System Controller support + SoC Platform support for Emma Mobile EV2 + SoC Platform support for RZ/A1H+ ... + SoC Platform support for R-Car H2 ... + SoC Platform support for R-Car H3 ES1.x ... + System Controller support for R-Car H2 + System Controller support for R-Car M2-W/N + System Controller support for R-Car V2H + System Controller support for R-Car E2 + System Controller support for R-Car H3 + System Controller support for R-Car M3-W + System Controller support for R-Car M3-W+ + System Controller support for R-Car M3-N Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zh6kyedc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 414d2ff5e5f21049b6b242271a6a8579f9dffc1b Author: Kees Cook Date: Fri Aug 21 12:43:09 2020 -0700 x86/boot/compressed: Add missing debugging sections to output Include the missing DWARF and STABS sections in the compressed image, when they are present. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200821194310.3089815-29-keescook@chromium.org commit d1c0272bc1c068f8c2cb3d1b395173602b0df6e7 Author: Kees Cook Date: Fri Aug 21 12:43:08 2020 -0700 x86/boot/compressed: Remove, discard, or assert for unwanted sections In preparation for warning on orphan sections, stop the linker from generating the .eh_frame* sections, discard unwanted non-zero-sized generated sections, and enforce other expected-to-be-zero-sized sections (since discarding them might hide problems with them suddenly gaining unexpected entries). Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200821194310.3089815-28-keescook@chromium.org commit 7cf891a40057f851af74e68bacb01b90bd775b5d Author: Kees Cook Date: Fri Aug 21 12:43:07 2020 -0700 x86/boot/compressed: Reorganize zero-size section asserts For readability, move the zero-sized sections to the end after DISCARDS. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200821194310.3089815-27-keescook@chromium.org commit 5354e84598f264793265cc99b4be2a2295826c86 Author: Kees Cook Date: Fri Aug 21 12:43:05 2020 -0700 x86/build: Add asserts for unwanted sections In preparation for warning on orphan sections, enforce other expected-to-be-zero-sized sections (since discarding them might hide problems with them suddenly gaining unexpected entries). Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200821194310.3089815-25-keescook@chromium.org commit 815d680771ae09080d2da83dac2647c08cdf99ce Author: Kees Cook Date: Fri Aug 21 12:43:04 2020 -0700 x86/build: Enforce an empty .got.plt section The .got.plt section should always be zero (or filled only with the linker-generated lazy dispatch entry). Enforce this with an assert and mark the section as INFO. This is more sensitive than just blindly discarding the section. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200821194310.3089815-24-keescook@chromium.org commit a850958c072404f75dd41782cb4ff34b8625b47d Author: Kees Cook Date: Fri Aug 21 12:43:03 2020 -0700 x86/asm: Avoid generating unused kprobe sections When !CONFIG_KPROBES, do not generate kprobe sections. This makes sure there are no unexpected sections encountered by the linker scripts. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200821194310.3089815-23-keescook@chromium.org commit 7e8c4ed2638d08a1604c87b60ed7161bf92e6f86 Author: Kees Cook Date: Fri Aug 21 12:43:01 2020 -0700 arm/boot: Handle all sections explicitly In preparation for warning on orphan sections, use common macros for debug sections, discards, and text stubs. Add discards for unwanted .note, and .rel sections. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Cc: Russell King Link: https://lore.kernel.org/r/20200821194310.3089815-21-keescook@chromium.org commit 0c918e753f8c03b0308a635c0721a8c24d738d4a Author: Kees Cook Date: Fri Aug 21 12:42:59 2020 -0700 arm/build: Assert for unwanted sections In preparation for warning on orphan sections, enforce expected-to-be-zero-sized sections (since discarding them might hide problems with them suddenly gaining unexpected entries). Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Cc: Russell King Link: https://lore.kernel.org/r/20200821194310.3089815-19-keescook@chromium.org commit 512dd2eebe5585893412e0c8bec8dbfe2dead6c8 Author: Kees Cook Date: Fri Aug 21 12:42:58 2020 -0700 arm/build: Add missing sections Add missing text stub sections .vfp11_veneer and .v4_bx, as well as missing DWARF sections, when present in the build. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Reviewed-by: Nick Desaulniers Cc: Russell King Link: https://lore.kernel.org/r/20200821194310.3089815-18-keescook@chromium.org commit 3b14aefb84320ac430cecbdc87b680317916b2bd Author: Kees Cook Date: Fri Aug 21 12:42:57 2020 -0700 arm/build: Explicitly keep .ARM.attributes sections In preparation for adding --orphan-handling=warn, explicitly keep the .ARM.attributes section (at address 0[1]) by expanding the existing ELF_DETAILS macro into ARM_DETAILS. [1] https://reviews.llvm.org/D85867 Suggested-by: Nick Desaulniers Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Reviewed-by: Fangrui Song Cc: Russell King Link: https://lore.kernel.org/lkml/CAKwvOdk-racgq5pxsoGS6Vtifbtrk5fmkmnoLxrQMaOvV0nPWw@mail.gmail.com/ Link: https://lore.kernel.org/r/20200821194310.3089815-17-keescook@chromium.org commit d7e3b065dc98e95f2dae6d2da031dd4c243bd7be Author: Kees Cook Date: Fri Aug 21 12:42:56 2020 -0700 arm/build: Refactor linker script headers In preparation for adding --orphan-handling=warn, refactor the linker script header includes, and extract common macros. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Cc: Russell King Link: https://lore.kernel.org/r/20200821194310.3089815-16-keescook@chromium.org commit 7c9903c9bf716d89b34f96cc2ed64e28dabf570b Author: Peter Zijlstra Date: Tue Aug 18 15:57:53 2020 +0200 x86/perf, static_call: Optimize x86_pmu methods Replace many of the indirect calls with static_call(). The average PMI time, as measured by perf_sample_event_took()*: PRE: 3283.03 [ns] POST: 3145.12 [ns] Which is a ~138 [ns] win per PMI, or a ~4.2% decrease. [*] on an IVB-EP, using: 'perf record -a -e cycles -- make O=defconfig-build/ -j80' Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/20200818135805.338001015@infradead.org commit d25e37d89dd2f41d7acae0429039d2f0ae8b4a07 Author: Steven Rostedt (VMware) Date: Tue Aug 18 15:57:52 2020 +0200 tracepoint: Optimize using static_call() Currently the tracepoint site will iterate a vector and issue indirect calls to however many handlers are registered (ie. the vector is long). Using static_call() it is possible to optimize this for the common case of only having a single handler registered. In this case the static_call() can directly call this handler. Otherwise, if the vector is longer than 1, call a function that iterates the whole vector like the current code. [peterz: updated to new interface] Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/20200818135805.279421092@infradead.org commit a945c8345ec0decb2f1a7f19a8c5e60bcb1dd1eb Author: Peter Zijlstra Date: Tue Aug 18 15:57:51 2020 +0200 static_call: Allow early init In order to use static_call() to wire up x86_pmu, we need to initialize earlier, specifically before memory allocation works; copy some of the tricks from jump_label to enable this. Primarily we overload key->next to store a sites pointer when there are no modules, this avoids having to use kmalloc() to initialize the sites and allows us to run much earlier. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20200818135805.220737930@infradead.org commit 6c3fce794e9d2a5ce3a948962d0808a459c40a84 Author: Peter Zijlstra Date: Tue Aug 18 15:57:50 2020 +0200 static_call: Add some validation Verify the text we're about to change is as we expect it to be. Requested-by: Steven Rostedt Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200818135805.161974981@infradead.org commit 5b06fd3bb9cdce4f3e731c48eb5b74c4acc47997 Author: Peter Zijlstra Date: Tue Aug 18 15:57:49 2020 +0200 static_call: Handle tail-calls GCC can turn our static_call(name)(args...) into a tail call, in which case we get a JMP.d32 into the trampoline (which then does a further tail-call). Teach objtool to recognise and mark these in .static_call_sites and adjust the code patching to deal with this. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/20200818135805.101186767@infradead.org commit 452cddbff74b6a15b9354505671011700fe03710 Author: Peter Zijlstra Date: Tue Aug 18 15:57:48 2020 +0200 static_call: Add static_call_cond() Extend the static_call infrastructure to optimize the following common pattern: if (func_ptr) func_ptr(args...) For the trampoline (which is in effect a tail-call), we patch the JMP.d32 into a RET, which then directly consumes the trampoline call. For the in-line sites we replace the CALL with a NOP5. NOTE: this is 'obviously' limited to functions with a 'void' return type. NOTE: DEFINE_STATIC_COND_CALL() only requires a typename, as opposed to a full function. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/20200818135805.042977182@infradead.org commit c43a43e439e00ad2a4d98716895d961ade6bbbfc Author: Peter Zijlstra Date: Tue Aug 18 15:57:47 2020 +0200 x86/alternatives: Teach text_poke_bp() to emulate RET Future patches will need to poke a RET instruction, provide the infrastructure required for this. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Steven Rostedt (VMware) Cc: Masami Hiramatsu Link: https://lore.kernel.org/r/20200818135804.982214828@infradead.org commit f03c412915f5f69f2d17bcd20ecdd69320bcbf7b Author: Peter Zijlstra Date: Tue Aug 18 15:57:46 2020 +0200 static_call: Add simple self-test for static calls Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200818135804.922581202@infradead.org commit 1e7e47883830aae5e8246a22ca2fc6883c61acdf Author: Josh Poimboeuf Date: Tue Aug 18 15:57:45 2020 +0200 x86/static_call: Add inline static call implementation for x86-64 Add the inline static call implementation for x86-64. The generated code is identical to the out-of-line case, except we move the trampoline into it's own section. Objtool uses the trampoline naming convention to detect all the call sites. It then annotates those call sites in the .static_call_sites section. During boot (and module init), the call sites are patched to call directly into the destination function. The temporary trampoline is then no longer used. [peterz: merged trampolines, put trampoline in section] Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/20200818135804.864271425@infradead.org commit e6d6c071f22de29e4993784fc00cd2202b7ba149 Author: Josh Poimboeuf Date: Tue Aug 18 15:57:44 2020 +0200 x86/static_call: Add out-of-line static call implementation Add the x86 out-of-line static call implementation. For each key, a permanent trampoline is created which is the destination for all static calls for the given key. The trampoline has a direct jump which gets patched by static_call_update() when the destination function changes. [peterz: fixed trampoline, rewrote patching code] Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/20200818135804.804315175@infradead.org commit 6333e8f73b834f54e395a056e6002403f0862c51 Author: Peter Zijlstra Date: Tue Aug 18 15:57:43 2020 +0200 static_call: Avoid kprobes on inline static_call()s Similar to how we disallow kprobes on any other dynamic text (ftrace/jump_label) also disallow kprobes on inline static_call()s. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200818135804.744920586@infradead.org commit 9183c3f9ed710a8edf1a61e8a96d497258d26e08 Author: Josh Poimboeuf Date: Tue Aug 18 15:57:42 2020 +0200 static_call: Add inline static call infrastructure Add infrastructure for an arch-specific CONFIG_HAVE_STATIC_CALL_INLINE option, which is a faster version of CONFIG_HAVE_STATIC_CALL. At runtime, the static call sites are patched directly, rather than using the out-of-line trampolines. Compared to out-of-line static calls, the performance benefits are more modest, but still measurable. Steven Rostedt did some tracepoint measurements: https://lkml.kernel.org/r/20181126155405.72b4f718@gandalf.local.home This code is heavily inspired by the jump label code (aka "static jumps"), as some of the concepts are very similar. For more details, see the comments in include/linux/static_call.h. [peterz: simplified interface; merged trampolines] Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Steven Rostedt (VMware) Cc: Linus Torvalds Link: https://lore.kernel.org/r/20200818135804.684334440@infradead.org commit 115284d89a436e9b66da0c6c4f6efded806874b2 Author: Josh Poimboeuf Date: Tue Aug 18 15:57:41 2020 +0200 static_call: Add basic static call infrastructure Static calls are a replacement for global function pointers. They use code patching to allow direct calls to be used instead of indirect calls. They give the flexibility of function pointers, but with improved performance. This is especially important for cases where retpolines would otherwise be used, as retpolines can significantly impact performance. The concept and code are an extension of previous work done by Ard Biesheuvel and Steven Rostedt: https://lkml.kernel.org/r/20181005081333.15018-1-ard.biesheuvel@linaro.org https://lkml.kernel.org/r/20181006015110.653946300@goodmis.org There are two implementations, depending on arch support: 1) out-of-line: patched trampolines (CONFIG_HAVE_STATIC_CALL) 2) basic function pointers For more details, see the comments in include/linux/static_call.h. [peterz: simplified interface] Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Steven Rostedt (VMware) Cc: Linus Torvalds Link: https://lore.kernel.org/r/20200818135804.623259796@infradead.org commit 563a02b0c9704f69c0364befedd451f57fe88092 Author: Josh Poimboeuf Date: Tue Aug 18 15:57:40 2020 +0200 compiler.h: Make __ADDRESSABLE() symbol truly unique The __ADDRESSABLE() macro uses the __LINE__ macro to create a temporary symbol which has a unique name. However, if the macro is used multiple times from within another macro, the line number will always be the same, resulting in duplicate symbols. Make the temporary symbols truly unique by using __UNIQUE_ID instead of __LINE__. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20200818135804.564436253@infradead.org commit 0db6e3734b130207026df1e78455fa98ca1d6f50 Author: Peter Zijlstra Date: Tue Aug 18 15:57:39 2020 +0200 jump_label,module: Fix module lifetime for __jump_label_mod_text_reserved() Nothing ensures the module exists while we're iterating mod->jump_entries in __jump_label_mod_text_reserved(), take a module reference to ensure the module sticks around. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20200818135804.504501338@infradead.org commit 59cc8e0a906ea23190922e5e0252e5b5a60d70c2 Author: Peter Zijlstra Date: Tue Aug 18 15:57:38 2020 +0200 module: Properly propagate MODULE_STATE_COMING failure Now that notifiers got unbroken; use the proper interface to handle notifier errors and propagate them. There were already MODULE_STATE_COMING notifiers that failed; notably: - jump_label_module_notifier() - tracepoint_module_notify() - bpf_event_notify() By propagating this error, we fix those users. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Acked-by: Jessica Yu Acked-by: Josh Poimboeuf Link: https://lore.kernel.org/r/20200818135804.444372853@infradead.org commit 0340a6b7fb767f7f296b9bacc9a215920519a644 Author: Peter Zijlstra Date: Tue Aug 18 15:57:37 2020 +0200 module: Fix up module_notifier return values While auditing all module notifiers I noticed a whole bunch of fail wrt the return value. Notifiers have a 'special' return semantics. As is; NOTIFY_DONE vs NOTIFY_OK is a bit vague; but notifier_from_errno(0) results in NOTIFY_OK and NOTIFY_DONE has a comment that says "Don't care". From this I've used NOTIFY_DONE when the function completely ignores the callback and notifier_to_error() isn't used. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Mathieu Desnoyers Reviewed-by: Joel Fernandes (Google) Reviewed-by: Robert Richter Acked-by: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20200818135804.385360407@infradead.org commit 70d932985757fbe978024db313001218e9f8fe5c Author: Peter Zijlstra Date: Tue Aug 18 15:57:36 2020 +0200 notifier: Fix broken error handling pattern The current notifiers have the following error handling pattern all over the place: int err, nr; err = __foo_notifier_call_chain(&chain, val_up, v, -1, &nr); if (err & NOTIFIER_STOP_MASK) __foo_notifier_call_chain(&chain, val_down, v, nr-1, NULL) And aside from the endless repetition thereof, it is broken. Consider blocking notifiers; both calls take and drop the rwsem, this means that the notifier list can change in between the two calls, making @nr meaningless. Fix this by replacing all the __foo_notifier_call_chain() functions with foo_notifier_call_chain_robust() that embeds the above pattern, but ensures it is inside a single lock region. Note: I switched atomic_notifier_call_chain_robust() to use the spinlock, since RCU cannot provide the guarantee required for the recovery. Note: software_resume() error handling was broken afaict. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20200818135804.325626653@infradead.org commit be2881824ae9eb92a35b094f734f9ca7339ddf6d Author: Kees Cook Date: Fri Aug 21 12:42:54 2020 -0700 arm64/build: Assert for unwanted sections In preparation for warning on orphan sections, discard unwanted non-zero-sized generated sections, and enforce other expected-to-be-zero-sized sections (since discarding them might hide problems with them suddenly gaining unexpected entries). Suggested-by: Ard Biesheuvel Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20200821194310.3089815-14-keescook@chromium.org commit 578d7f0fd6a5ec8a369a4537c664eb2c8374c134 Author: Kees Cook Date: Fri Aug 21 12:42:53 2020 -0700 arm64/build: Add missing DWARF sections Explicitly include DWARF sections when they're present in the build. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20200821194310.3089815-13-keescook@chromium.org commit 2883352bf801d093a04f269800b48bb8aa2515fb Author: Kees Cook Date: Fri Aug 21 12:42:52 2020 -0700 arm64/build: Use common DISCARDS in linker script Use the common DISCARDS rule for the linker script in an effort to regularize the linker script to prepare for warning on orphaned sections. Additionally clean up left-over no-op macros. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200821194310.3089815-12-keescook@chromium.org commit 6e0a66d10c5b629369afa47b753d0ec46fa812dd Author: Kees Cook Date: Fri Aug 21 12:42:51 2020 -0700 arm64/build: Remove .eh_frame* sections due to unwind tables Avoid .eh_frame* section generation by making sure both CFLAGS and AFLAGS contain -fno-asychronous-unwind-tables and -fno-unwind-tables. With all sources of .eh_frame now removed from the build, drop this DISCARD so we can be alerted in the future if it returns unexpectedly once orphan section warnings have been enabled. Suggested-by: Ard Biesheuvel Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200821194310.3089815-11-keescook@chromium.org commit 34b4a5c54c429d12bcc783a27650752237c49a36 Author: Kees Cook Date: Fri Aug 21 12:42:50 2020 -0700 arm64/kernel: Remove needless Call Frame Information annotations Remove last instance of an .eh_frame section by removing the needless Call Frame Information annotations which were likely leftovers from 32-bit ARM. Suggested-by: Ard Biesheuvel Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200821194310.3089815-10-keescook@chromium.org commit b4ca91027d8226ae423ce498f03f5b348cf84e36 Author: Kees Cook Date: Fri Aug 21 12:42:49 2020 -0700 arm64/mm: Remove needless section quotes Fix a case of needless quotes in __section(), which Clang doesn't like. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Reviewed-by: Nick Desaulniers Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200821194310.3089815-9-keescook@chromium.org commit e2179a09ab089d3423751bd2b0c884ddb3eabe84 Author: Kees Cook Date: Fri Aug 21 12:42:48 2020 -0700 efi/libstub: Disable -mbranch-protection In preparation for adding --orphan-handling=warn to more architectures, disable -mbranch-protection, as EFI does not yet support it[1]. This was noticed due to it producing unwanted .note.gnu.property sections (prefixed with .init due to the objcopy build step). However, we must also work around a bug in Clang where the section is still emitted for code-less object files[2], so also remove the section during the objcopy. [1] https://lore.kernel.org/lkml/CAMj1kXHck12juGi=E=P4hWP_8vQhQ+-x3vBMc3TGeRWdQ-XkxQ@mail.gmail.com [2] https://bugs.llvm.org/show_bug.cgi?id=46480 Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Reviewed-by: Nick Desaulniers Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20200821194310.3089815-8-keescook@chromium.org commit eff8728fe69880d3f7983bec3fb6cea4c306261f Author: Nick Desaulniers Date: Fri Aug 21 12:42:47 2020 -0700 vmlinux.lds.h: Add PGO and AutoFDO input sections Basically, consider .text.{hot|unlikely|unknown}.* part of .text, too. When compiling with profiling information (collected via PGO instrumentations or AutoFDO sampling), Clang will separate code into .text.hot, .text.unlikely, or .text.unknown sections based on profiling information. After D79600 (clang-11), these sections will have a trailing `.` suffix, ie. .text.hot., .text.unlikely., .text.unknown.. When using -ffunction-sections together with profiling infomation, either explicitly (FGKASLR) or implicitly (LTO), code may be placed in sections following the convention: .text.hot., .text.unlikely., .text.unknown. where , , and are functions. (This produces one section per function; we generally try to merge these all back via linker script so that we don't have 50k sections). For the above cases, we need to teach our linker scripts that such sections might exist and that we'd explicitly like them grouped together, otherwise we can wind up with code outside of the _stext/_etext boundaries that might not be mapped properly for some architectures, resulting in boot failures. If the linker script is not told about possible input sections, then where the section is placed as output is a heuristic-laiden mess that's non-portable between linkers (ie. BFD and LLD), and has resulted in many hard to debug bugs. Kees Cook is working on cleaning this up by adding --orphan-handling=warn linker flag used in ARCH=powerpc to additional architectures. In the case of linker scripts, borrowing from the Zen of Python: explicit is better than implicit. Also, ld.bfd's internal linker script considers .text.hot AND .text.hot.* to be part of .text, as well as .text.unlikely and .text.unlikely.*. I didn't see support for .text.unknown.*, and didn't see Clang producing such code in our kernel builds, but I see code in LLVM that can produce such section names if profiling information is missing. That may point to a larger issue with generating or collecting profiles, but I would much rather be safe and explicit than have to debug yet another issue related to orphan section placement. Reported-by: Jian Cai Suggested-by: Fāng-ruì Sòng Signed-off-by: Nick Desaulniers Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Tested-by: Luis Lozano Tested-by: Manoj Gupta Acked-by: Kees Cook Cc: linux-arch@vger.kernel.org Cc: stable@vger.kernel.org Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=add44f8d5c5c05e08b11e033127a744d61c26aee Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=1de778ed23ce7492c523d5850c6c6dbb34152655 Link: https://reviews.llvm.org/D79600 Link: https://bugs.chromium.org/p/chromium/issues/detail?id=1084760 Link: https://lore.kernel.org/r/20200821194310.3089815-7-keescook@chromium.org Debugged-by: Luis Lozano commit a840c4de569f610bc5ee043b613c35b779d23186 Author: Kees Cook Date: Fri Aug 21 12:42:46 2020 -0700 vmlinux.lds.h: Add .symtab, .strtab, and .shstrtab to ELF_DETAILS When linking vmlinux with LLD, the synthetic sections .symtab, .strtab, and .shstrtab are listed as orphaned. Add them to the ELF_DETAILS section so there will be no warnings when --orphan-handling=warn is used more widely. (They are added above comment as it is the more common order[1].) ld.lld: warning: :(.symtab) is being placed in '.symtab' ld.lld: warning: :(.shstrtab) is being placed in '.shstrtab' ld.lld: warning: :(.strtab) is being placed in '.strtab' [1] https://lore.kernel.org/lkml/20200622224928.o2a7jkq33guxfci4@google.com/ Reported-by: Fangrui Song Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Cc: linux-arch@vger.kernel.org Link: https://lore.kernel.org/r/20200821194310.3089815-6-keescook@chromium.org commit c604abc3f6e3030f3a3022b184ed7d3780c34d30 Author: Kees Cook Date: Fri Aug 21 12:42:45 2020 -0700 vmlinux.lds.h: Split ELF_DETAILS from STABS_DEBUG The .comment section doesn't belong in STABS_DEBUG. Split it out into a new macro named ELF_DETAILS. This will gain other non-debug sections that need to be accounted for when linking with --orphan-handling=warn. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Cc: linux-arch@vger.kernel.org Link: https://lore.kernel.org/r/20200821194310.3089815-5-keescook@chromium.org commit d812db78288d76d1e8c6df3a840c41a8875f6468 Author: Kees Cook Date: Fri Aug 21 12:42:44 2020 -0700 vmlinux.lds.h: Avoid KASAN and KCSAN's unwanted sections KASAN (-fsanitize=kernel-address) and KCSAN (-fsanitize=thread) produce unwanted[1] .eh_frame and .init_array.* sections. Add them to COMMON_DISCARDS, except with CONFIG_CONSTRUCTORS, which wants to keep .init_array.* sections. [1] https://bugs.llvm.org/show_bug.cgi?id=46478 Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Tested-by: Marco Elver Cc: linux-arch@vger.kernel.org Link: https://lore.kernel.org/r/20200821194310.3089815-4-keescook@chromium.org commit dfbe69689b4dee19021d8c315a5137b4790b5634 Author: Kees Cook Date: Fri Aug 21 12:42:43 2020 -0700 vmlinux.lds.h: Add .gnu.version* to COMMON_DISCARDS For vmlinux linking, no architecture uses the .gnu.version* sections, so remove it via the COMMON_DISCARDS macro in preparation for adding --orphan-handling=warn more widely. This is a work-around for what appears to be a bug[1] in ld.bfd which warns for this synthetic section even when none is found in input objects, and even when no section is emitted for an output object[2]. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=26153 [2] https://lore.kernel.org/lkml/202006221524.CEB86E036B@keescook/ Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Reviewed-by: Fangrui Song Cc: linux-arch@vger.kernel.org Link: https://lore.kernel.org/r/20200821194310.3089815-3-keescook@chromium.org commit 03c2b85cb7f13e9bd82cbe4201ede52177d433f5 Author: Kees Cook Date: Fri Aug 21 12:42:42 2020 -0700 vmlinux.lds.h: Create COMMON_DISCARDS Collect the common DISCARD sections for architectures that need more specialized discard control than what the standard DISCARDS section provides. Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Cc: linux-arch@vger.kernel.org Link: https://lore.kernel.org/r/20200821194310.3089815-2-keescook@chromium.org commit f7ec68b341dbd5da13d4c65ce444dcd605f1c42e Author: Dinghao Liu Date: Wed Aug 19 16:22:28 2020 +0800 drm/crc-debugfs: Fix memleak in crc_control_write When verify_crc_source() fails, source needs to be freed. However, current code is returning directly and ends up leaking memory. Fixes: d5cc15a0c66e ("drm: crc: Introduce verify_crc_source callback") Signed-off-by: Dinghao Liu Reviewed-by: Laurent Pinchart [danvet: change Fixes: tag per Laurent's review] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200819082228.26847-1-dinghao.liu@zju.edu.cn commit 1fa0140956e72a47781af74ef704413b31411e95 Author: Sean Paul Date: Tue Aug 18 11:39:05 2020 -0400 drm/i915: Add HDCP 1.4 support for MST connectors Now that all the groundwork has been laid, we can turn on HDCP 1.4 over MST. Everything except for toggling the HDCP signalling and HDCP 2.2 support is the same as the DP case, so we'll re-use those callbacks Cc: Juston Li Reviewed-by: Anshuman Gupta Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191203173638.94919-12-sean@poorly.run #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20191212190230.188505-13-sean@poorly.run #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20200117193103.156821-13-sean@poorly.run #v3 Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-15-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-17-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-17-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-18-sean@poorly.run #v7 Changes in v2: -Toggle HDCP from encoder disable/enable -Don't disable HDCP on MST connector destroy, leave that for encoder disable, just ensure the check_work routine isn't running any longer Changes in v3: -Place the shim in the new intel_dp_hdcp.c file (Ville) Changes in v4: -Actually use the mst shim for mst connections (Juston) -Use QUERY_STREAM_ENC_STATUS MST message to verify channel is encrypted Changes in v5: -Add sleep on disable signalling to match hdmi delay Changes in v6: -Disable HDCP over MST on GEN12+ since I'm unsure how it should work and I don't have hardware to test it Changes in v7: -Remove hdcp2 shims for MST in favor of skipping hdcp2 init (Ramalingam) Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-18-sean@poorly.run commit da44edbb8429aa5227430609268e3f378f4fe1f7 Author: Sean Paul Date: Tue Aug 18 11:39:04 2020 -0400 drm/i915: Print HDCP version info for all connectors De-duplicate the HDCP version code for each connector and print it for all connectors. Cc: Juston Li Cc: Ramalingam C Reviewed-by: Juston Li Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200227185714.171466-1-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-16-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-16-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-17-sean@poorly.run #v7 Changes in v4: - Added to the set Changes in v5: -Print "No connector support" for hdcp sink capability as well (Ram) Changes in v6: -None Changes in v7: -None Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-17-sean@poorly.run commit e38c298fcd19149d337f91640f037a9265bd8c3f Author: Sean Paul Date: Wed Aug 19 10:31:24 2020 -0400 drm/mst: Add support for QUERY_STREAM_ENCRYPTION_STATUS MST sideband message Used to query whether an MST stream is encrypted or not. Cc: Lyude Paul Reviewed-by: Anshuman Gupta Reviewed-by: Lyude Paul Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-14-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-15-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-15-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-16-sean@poorly.run #v7 Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-16-sean@poorly.run #v8 Changes in v4: -Added to the set Changes in v5: -None Changes in v6: -Use FIELD_PREP to generate request buffer bitfields (Lyude) -Add mst selftest and dump/decode_sideband_req for QSES (Lyude) Changes in v7: -None Changes in v8: -Reverse the parsing on the hdcp_*x_device_present bits and leave breadcrumb in case this is incorrect (Anshuman) Changes in v8.5: -s/DRM_DEBUG_KMS/drm_dbg_kms/ (Lyude) Signed-off-by: Ramalingam C Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200819143133.46232-1-sean@poorly.run commit 038bac8970ac1c9815eba2914c4cff2b7807ab09 Author: Sean Paul Date: Tue Aug 18 11:39:02 2020 -0400 drm/i915: Add connector to hdcp_shim->check_link() Currently we derive the connector from digital port in check_link(). For MST, this isn't sufficient since the digital port passed into the function can have multiple connectors downstream. This patch adds connector to the check_link() arguments so we have it when we need it. Reviewed-by: Anshuman Gupta Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-13-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-14-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-14-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-15-sean@poorly.run #v7 Changes in v4: -Added to the set Changes in v5: -None Changes in v6: -None Changes in v7: -None Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-15-sean@poorly.run commit bf3657dad00b77fef993ea4fc985de3951f5abc0 Author: Sean Paul Date: Tue Aug 18 11:39:01 2020 -0400 drm/i915: Plumb port through hdcp init This patch plumbs port through hdcp init instead of relying on intel_attached_encoder() to return a non-NULL encoder which won't work for MST connectors. Cc: Ville Syrjälä Reviewed-by: Anshuman Gupta Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-13-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-13-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-14-sean@poorly.run #v7 Changes in v5: -Added to the set Changes in v6: -None Changes in v7: -None Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-14-sean@poorly.run commit d079b7e4b6389e36c50730985100bb528f0d3883 Author: Sean Paul Date: Tue Aug 18 11:39:00 2020 -0400 drm/i915: Factor out HDCP shim functions from dp for use by dp_mst These functions are all the same for dp and dp_mst, so move them into a dedicated file for both sst and mst to use. Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191203173638.94919-11-sean@poorly.run #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20191212190230.188505-12-sean@poorly.run #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20200117193103.156821-12-sean@poorly.run #v3 Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-12-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-12-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-12-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-13-sean@poorly.run #v7 Changes in v2: -None Changes in v3: -Created intel_dp_hdcp.c for the shared functions to live (Ville) Changes in v4: -Rebased on new drm logging change Changes in v5: -None Changes in v6: -None Changes in v7: -Rebased patch Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-13-sean@poorly.run commit f1c7a36b05edd99d9899c8b2adc0e53f93c7c3d7 Author: Sean Paul Date: Tue Aug 18 11:38:59 2020 -0400 drm/i915: Use ddi_update_pipe in intel_dp_mst In order to act upon content_protection property changes, we'll need to implement the .update_pipe() hook. We can re-use intel_ddi_update_pipe for this Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191203173638.94919-10-sean@poorly.run #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20191212190230.188505-11-sean@poorly.run #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20200117193103.156821-11-sean@poorly.run #v3 Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-11-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-11-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-11-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-12-sean@poorly.run #v7 Changes in v2: -None Changes in v3: -None Changes in v4: -None Changes in v5: -None Changes in v6: -None Changes in v7: -None Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-12-sean@poorly.run commit 515d5755ee5ac6d8dce86ddb9d097ab9fe4ca16b Author: Sean Paul Date: Tue Aug 18 11:38:58 2020 -0400 drm/i915: Support DP MST in enc_to_dig_port() function Although DP_MST fake encoders are not subclassed from digital ports, they are associated with them. Support these encoders. Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191203173638.94919-9-sean@poorly.run #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20191212190230.188505-10-sean@poorly.run #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20200117193103.156821-10-sean@poorly.run #v3 Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-10-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-10-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-10-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-11-sean@poorly.run #v7 Changes in v2: -None Changes in v3: -None Changes in v4: -None Changes in v5: -None Changes in v6: -None Changes in v7: -None Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-11-sean@poorly.run commit 36e5e7042b202025f8643538c2d591cab1f24b72 Author: Sean Paul Date: Tue Aug 18 11:38:57 2020 -0400 drm/i915: Don't fully disable HDCP on a port if multiple pipes are using it This patch is required for HDCP over MST. If a port is being used for multiple HDCP streams, we don't want to fully disable HDCP on a port if one of them is disabled. Instead, we just disable the HDCP signalling on that particular pipe and exit early. The last pipe to disable HDCP will also bring down HDCP on the port. In order to achieve this, we need to keep a refcount in intel_digital_port and protect it using a new hdcp_mutex. Cc: Ramalingam C Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191203173638.94919-8-sean@poorly.run #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20191212190230.188505-9-sean@poorly.run #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20200117193103.156821-9-sean@poorly.run #v3 Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-9-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-9-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-9-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-10-sean@poorly.run #v7 Changes in v2: -Move the toggle_signalling call into _intel_hdcp_disable so it's called from check_work Changes in v3: -None Changes in v4: -None Changes in v5: -Change WARN_ON to drm_WARN_ON Changes in v6: -None Changes in v7: -Split minor intel_hdcp_disable refactor into separate patch (Ramalingam) Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-10-sean@poorly.run commit a1de8685d65c25a48cf24f508e8b39c5cc25c42d Author: Sean Paul Date: Tue Aug 18 11:38:56 2020 -0400 drm/i915: Clean up intel_hdcp_disable Add an out label and un-indent hdcp disable in preparation for hdcp_mutex. No functional changes Reviewed-by: Anshuman Gupta Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-9-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-9-sean@poorly.run #v7 Changes in v7: -Split into separate patch (Ramalingam) Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-9-sean@poorly.run commit a6597faa2d59b0c76633b034a1cceff9a7201d34 Author: Sean Paul Date: Tue Aug 18 11:38:55 2020 -0400 drm/i915: Protect workers against disappearing connectors This patch adds some protection against connectors being destroyed before the HDCP workers are finished. For check_work, we do a synchronous cancel after the connector is unregistered which will ensure that it is finished before destruction. In the case of prop_work, we can't do a synchronous wait since it needs to take connection_mutex which could cause deadlock. Instead, we'll take a reference on the connector when scheduling prop_work and give it up once we're done. Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191212190230.188505-8-sean@poorly.run #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20200117193103.156821-8-sean@poorly.run #v3 Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-8-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-8-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-8-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-8-sean@poorly.run #v7 Changes in v2: -Added to the set Changes in v3: -Change the WARN_ON condition in intel_hdcp_cleanup to allow for initializing connectors as well Changes in v4: -None Changes in v5: -Change WARN_ON to drm_WARN_ON Changes in v6: -None Changes in v7: -None Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-8-sean@poorly.run commit a72394e4de6d500cc8af104ff50c941dc969fbea Author: Sean Paul Date: Tue Aug 18 11:38:54 2020 -0400 drm/i915: Factor out hdcp->value assignments This is a bit of housecleaning for a future patch. Instead of sprinkling hdcp->value assignments and prop_work scheduling everywhere, introduce a function to do it for us. Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191203173638.94919-7-sean@poorly.run #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20191212190230.188505-7-sean@poorly.run #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20200117193103.156821-7-sean@poorly.run #v3 Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-7-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-7-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-7-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-7-sean@poorly.run #v7 Changes in v2: -None Changes in v3: -None Changes in v4: -Rebased on top of drm_* logging changes Changes in v5: -Change WARN_ON to drm_WARN_ON Changes in v6: -None Changes in v7: -None Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-7-sean@poorly.run commit 0b9c9290d1d182c1659610df92f4aa7a397728d7 Author: Sean Paul Date: Tue Aug 18 11:38:53 2020 -0400 drm/i915: Use the cpu_transcoder in intel_hdcp to toggle HDCP signalling Instead of using intel_dig_port's encoder pipe to determine which transcoder to toggle signalling on, use the cpu_transcoder field already stored in intel_hdmi. This is particularly important for MST. Suggested-by: Ville Syrjälä Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191212190230.188505-6-sean@poorly.run #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20200117193103.156821-6-sean@poorly.run #v3 Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-6-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-6-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-6-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-6-sean@poorly.run #v7 Changes in v2: -Added to the set Changes in v3: -s/hdcp/hdmi/ in commit msg (Ram) Changes in v4: -Rebased on intel_de_(read|write) change Changes in v5: -Update hdcp->cpu_transcoder in intel_hdcp_enable so it works with pipe != 0 Changes in v6: -None Changes in v7: -None Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-6-sean@poorly.run commit 58418f0c0f7099afe8f656fe022dbc38c9645e3a Author: Sean Paul Date: Tue Aug 18 11:38:52 2020 -0400 drm/i915: Intercept Aksv writes in the aux hooks Instead of hand rolling the transfer ourselves in the hdcp hook, inspect aux messages and add the aksv flag in the aux transfer hook. IIRC, this was the original implementation and folks wanted this hack to be isolated to the hdcp code, which makes sense. However in testing an LG monitor on my desk, I noticed it was passing back a DEFER reply. This wasn't handled in our hand-rolled code and HDCP auth was failing as a result. Instead of copy/pasting all of the retry logic and delays from drm dp helpers, let's just use the helpers and hide the aksv select as best as we can. Reviewed-by: Ville Syrjälä Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191203173638.94919-3-sean@poorly.run #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20191212190230.188505-5-sean@poorly.run #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20200117193103.156821-5-sean@poorly.run #v3 Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-5-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-5-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-5-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-5-sean@poorly.run #v7 Changes in v2: -Remove 'generate' in intel_dp_aux_generate_xfer_flags, make arg const (Ville) -Bundle Aksv if statement together (Ville) -Rename 'txbuf' to 'aksv' (Ville) Changes in v3: -None Changes in v4: -None Changes in v5: -None Changes in v6: -None Changes in v7: -None Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-5-sean@poorly.run commit 1cfcdbf3be31f78080effcbb1050a254c3132a08 Author: Sean Paul Date: Tue Aug 18 11:38:51 2020 -0400 drm/i915: WARN if HDCP signalling is enabled upon disable HDCP signalling should not be left on, WARN if it is Cc: Ville Syrjälä Cc: Daniel Vetter Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191212190230.188505-4-sean@poorly.run #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20200117193103.156821-4-sean@poorly.run #v3 Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-4-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-4-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-4-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-4-sean@poorly.run #v7 Changes in v2: -Added to the set in lieu of just clearing the bit Changes in v3: -None Changes in v4: -None Changes in v5: -Change WARN_ON to drm_WARN_ON Changes in v6: -None Changes in v7: -Rebased, variable name changed from 'ctl' to 'val' Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-4-sean@poorly.run commit 2cc0c7b520bf8ea20ec42285d4e3d37b467eb7f9 Author: Sean Paul Date: Tue Aug 18 11:38:50 2020 -0400 drm/i915: Clear the repeater bit on HDCP disable On HDCP disable, clear the repeater bit. This ensures if we connect a non-repeater sink after a repeater, the bit is in the state we expect. Fixes: ee5e5e7a5e0f ("drm/i915: Add HDCP framework + base implementation") Cc: Chris Wilson Cc: Ramalingam C Cc: Daniel Vetter Cc: Sean Paul Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Cc: # v4.17+ Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191212190230.188505-3-sean@poorly.run #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20200117193103.156821-3-sean@poorly.run #v3 Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-3-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-3-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-3-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-3-sean@poorly.run #v7 Changes in v2: -Added to the set Changes in v3: -None I had previously agreed that clearing the rep_ctl bits on enable would also be a good idea. However when I committed that idea to code, it didn't look right. So let's rely on enables and disables being paired and everything outside of that will be considered a bug Changes in v4: -s/I915_(READ|WRITE)/intel_de_(read|write)/ Changes in v5: -None Changes in v6: -None Changes in v7: -None Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-3-sean@poorly.run commit 1f0882214fd0037b74f245d9be75c31516fed040 Author: Sean Paul Date: Tue Aug 18 11:38:49 2020 -0400 drm/i915: Fix sha_text population code This patch fixes a few bugs: 1- We weren't taking into account sha_leftovers when adding multiple ksvs to sha_text. As such, we were or'ing the end of ksv[j - 1] with the beginning of ksv[j] 2- In the sha_leftovers == 2 and sha_leftovers == 3 case, bstatus was being placed on the wrong half of sha_text, overlapping the leftover ksv value 3- In the sha_leftovers == 2 case, we need to manually terminate the byte stream with 0x80 since the hardware doesn't have enough room to add it after writing M0 The upside is that all of the HDCP supported HDMI repeaters I could find on Amazon just strip HDCP anyways, so it turns out to be _really_ hard to hit any of these cases without an MST hub, which is not (yet) supported. Oh, and the sha_leftovers == 1 case works perfectly! Fixes: ee5e5e7a5e0f ("drm/i915: Add HDCP framework + base implementation") Cc: Chris Wilson Cc: Ramalingam C Cc: Daniel Vetter Cc: Sean Paul Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Cc: # v4.17+ Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191203173638.94919-2-sean@poorly.run #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20191212190230.188505-2-sean@poorly.run #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20200117193103.156821-2-sean@poorly.run #v3 Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-2-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-2-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-2-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-2-sean@poorly.run #v7 Changes in v2: -None Changes in v3: -None Changes in v4: -Rebased on intel_de_write changes Changes in v5: -None Changes in v6: -None Changes in v7: -None Changes in v8: -None Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-2-sean@poorly.run commit 2281f797f5524abb8fff66bf8540b4f4687332a2 Author: Barry Song Date: Mon Aug 24 11:03:09 2020 +1200 mm: cma: use CMA_MAX_NAME to define the length of cma name array CMA_MAX_NAME should be visible to CMA's users as they might need it to set the name of CMA areas and avoid hardcoding the size locally. So this patch moves CMA_MAX_NAME from local header file to include/linux header file and removes the hardcode in both hugetlb.c and contiguous.c. Signed-off-by: Barry Song Signed-off-by: Christoph Hellwig commit c6303ab9b91e7ca20a49ff494338309259ed7c65 Author: Barry Song Date: Mon Aug 24 11:03:08 2020 +1200 arm64: mm: reserve per-numa CMA to localize coherent dma buffers Right now, smmu is using dma_alloc_coherent() to get memory to save queues and tables. Typically, on ARM64 server, there is a default CMA located at node0, which could be far away from node2, node3 etc. with this patch, smmu will get memory from local numa node to save command queues and page tables. that means dma_unmap latency will be shrunk much. Meanwhile, when iommu.passthrough is on, device drivers which call dma_ alloc_coherent() will also get local memory and avoid the travel between numa nodes. Acked-by: Will Deacon Signed-off-by: Barry Song Signed-off-by: Christoph Hellwig commit b7176c261cdbced87bed9562577333150ed05b01 Author: Barry Song Date: Mon Aug 24 11:03:07 2020 +1200 dma-contiguous: provide the ability to reserve per-numa CMA Right now, drivers like ARM SMMU are using dma_alloc_coherent() to get coherent DMA buffers to save their command queues and page tables. As there is only one default CMA in the whole system, SMMUs on nodes other than node0 will get remote memory. This leads to significant latency. This patch provides per-numa CMA so that drivers like SMMU can get local memory. Tests show localizing CMA can decrease dma_unmap latency much. For instance, before this patch, SMMU on node2 has to wait for more than 560ns for the completion of CMD_SYNC in an empty command queue; with this patch, it needs 240ns only. A positive side effect of this patch would be improving performance even further for those users who are worried about performance more than DMA security and use iommu.passthrough=1 to skip IOMMU. With local CMA, all drivers can get local coherent DMA buffers. Also, this patch changes the default CONFIG_CMA_AREAS to 19 in NUMA. As 1+CONFIG_CMA_AREAS should be quite enough for most servers on the market even they enable both hugetlb_cma and pernuma_cma. 2 numa nodes: 2(hugetlb) + 2(pernuma) + 1(default global cma) = 5 4 numa nodes: 4(hugetlb) + 4(pernuma) + 1(default global cma) = 9 8 numa nodes: 8(hugetlb) + 8(pernuma) + 1(default global cma) = 17 Signed-off-by: Barry Song Signed-off-by: Christoph Hellwig commit 7973b8ac669e64a2c4c40b55e0eac8f96d20f1fd Author: Kiwoong Kim Date: Tue Aug 25 10:43:16 2020 +0900 scsi: ufs: exynos: Enable UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL For Exynos, flush during hibern8 is sufficient. Manual flush will cause an increase in power usage. Link: https://lore.kernel.org/r/ef94af8f273316d50d7f50a0cac9c7be9b9316a1.1598319701.git.kwmad.kim@samsung.com Reviewed-by: Avri Altman Signed-off-by: Kiwoong Kim Signed-off-by: Martin K. Petersen commit 5df6f2def50c70700555c77fbbaec03d78617064 Author: Kiwoong Kim Date: Tue Aug 25 10:43:15 2020 +0900 scsi: ufs: Introduce skipping manual flush for Write Booster We have two knobs to control flush for write booster, fWriteBoosterBufferFlushDuringHibernate and fWriteBoosterBufferFlushEn. Some vendors use only fWriteBoosterBufferFlushDuringHibernate because this can reportedly cover most scenarios. Also, there have been some reports that flush by fWriteBoosterBufferFlushEn could lead to increased power consumption thanks to unexpected internal operations. Consequently, we need a way to enable or disable fWriteBoosterEn operations. Add quirk to bypass manual flush. Link: https://lore.kernel.org/r/ffdb0eda30515809f0ad9ee936b26917ee9b4593.1598319701.git.kwmad.kim@samsung.com Reviewed-by: Avri Altman Signed-off-by: Kiwoong Kim Signed-off-by: Martin K. Petersen commit 79416e97dda0118b137302575a70a14259a27d7d Author: Lyude Paul Date: Wed Aug 26 14:24:56 2020 -0400 drm/nouveau/kms: Start using drm_dp_read_dpcd_caps() Now that we've extracted i915's code for reading both the normal DPCD caps and extended DPCD caps into a shared helper, let's start using this in nouveau to enable us to start checking extended DPCD caps for free. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-21-lyude@redhat.com commit b9936121d95b0127d34fa6c25678994582d1b17c Author: Lyude Paul Date: Wed Aug 26 14:24:55 2020 -0400 drm/i915/dp: Extract drm_dp_read_dpcd_caps() Since DP 1.3, it's been possible for DP receivers to specify an additional set of DPCD capabilities, which can take precedence over the capabilities reported at DP_DPCD_REV. Basically any device supporting DP is going to need to read these in an identical manner, in particular nouveau, so let's go ahead and just move this code out of i915 into a shared DRM DP helper that we can use in other drivers. v2: * Remove redundant dpcd[DP_DPCD_REV] == 0 check * Fix drm_dp_dpcd_read() ret checks Signed-off-by: Lyude Paul Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-20-lyude@redhat.com commit f28e32d3906eac2e1cb3291b448f0d528ec93996 Author: Lyude Paul Date: Wed Aug 26 14:24:54 2020 -0400 drm/nouveau/kms: Don't change EDID when it hasn't actually changed Currently in nouveau_connector_ddc_detect() and nouveau_connector_detect_lvds(), we start the connector probing process by releasing the previous EDID and informing DRM of the change. However, since commit 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector") drm_connector_update_edid_property() actually checks whether the new EDID we've specified is different from the previous one, and updates the connector's epoch accordingly if it is. But, because we always set the EDID to NULL first in nouveau_connector_ddc_detect() and nouveau_connector_detect_lvds() we end up making DRM think that the EDID changes every single time we do a connector probe - which isn't needed. So, let's fix this by not clearing the EDID at the start of the connector probing process, and instead simply changing or removing it once near the end of the probing process. This will help prevent us from sending unneeded hotplug events to userspace when nothing has actually changed. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-19-lyude@redhat.com commit a4efad354cf1b9d5275adc85f67fcaaa1c2912d8 Author: Lyude Paul Date: Wed Aug 26 14:24:53 2020 -0400 drm/nouveau/kms/nv50-: Add support for DP_SINK_COUNT This is another bit that we never implemented for nouveau: dongle detection. When a "dongle", e.g. an active display adaptor, is hooked up to the system and causes an HPD to be fired, we don't actually know whether or not there's anything plugged into the dongle without checking the sink count. As a result, plugging in a dongle without anything plugged into it currently results in a bogus EDID retrieval error in the kernel log. Additionally, most dongles won't send another long HPD signal if the user suddenly plugs something in, they'll only send a short HPD IRQ with the expectation that the source will check the sink count and reprobe the connector if it's changed - something we don't actually do. As a result, nothing will happen if the user plugs the dongle in before plugging something into the dongle. So, let's fix this by checking the sink count in both nouveau_dp_probe_dpcd() and nouveau_dp_irq(), and reprobing the connector if things change. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-18-lyude@redhat.com commit 4778ff052812029bc076f5e78eff3ba1851cbea7 Author: Lyude Paul Date: Wed Aug 26 14:24:52 2020 -0400 drm/i915/dp: Extract drm_dp_read_sink_count() And of course, we'll also need to read the sink count from other drivers as well if we're checking whether or not it's supported. So, let's extract the code for this into another helper. v2: * Fix drm_dp_dpcd_readb() ret check * Add back comment and move back sink_count assignment in intel_dp_get_dpcd() v5: * Change name from drm_dp_get_sink_count() to drm_dp_read_sink_count() * Also, add "See also:" section to kdocs Signed-off-by: Lyude Paul Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-17-lyude@redhat.com commit 693c3ec5976eb4b66cbd4f3f1c701a6f0ae1c9b9 Author: Lyude Paul Date: Wed Aug 26 14:24:51 2020 -0400 drm/i915/dp: Extract drm_dp_read_sink_count_cap() Since other drivers are also going to need to be aware of the sink count in order to do proper dongle detection, we might as well steal i915's DP_SINK_COUNT helpers and move them into DRM helpers so that other dirvers can use them as well. Note that this also starts using intel_dp_has_sink_count() in intel_dp_detect_dpcd(), which is a functional change. v5: * Change name from drm_dp_has_sink_count() to drm_dp_read_sink_count_cap() Signed-off-by: Lyude Paul Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-16-lyude@redhat.com commit 409d38139b42f2c3d3e6012a060c498fbb5067fc Author: Lyude Paul Date: Wed Aug 26 14:24:50 2020 -0400 drm/nouveau/kms/nv50-: Use downstream DP clock limits for mode validation This adds support for querying the maximum clock rate of a downstream port on a DisplayPort connection. Generally, downstream ports refer to active dongles which can have their own pixel clock limits. Note as well, we also start marking the connector as disconnected if we can't read the DPCD, since we wouldn't be able to do anything without DPCD access anyway. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-15-lyude@redhat.com commit 3d3721ccb18a3dcec874c44120e2df7ec1c1db99 Author: Lyude Paul Date: Wed Aug 26 14:24:49 2020 -0400 drm/i915/dp: Extract drm_dp_read_downstream_info() We're going to be doing the same probing process in nouveau for determining downstream DP port capabilities, so let's deduplicate the work by moving i915's code for handling this into a shared helper: drm_dp_read_downstream_info(). Note that when we do this, we also do make some functional changes while we're at it: * We always clear the downstream port info before trying to read it, just to make things easier for the caller * We skip reading downstream port info if the DPCD indicates that we don't support downstream port info * We only read as many bytes as needed for the reported number of downstream ports, no sense in reading the whole thing every time v2: * Fixup logic for calculating the downstream port length to account for the fact that downstream port caps can be either 1 byte or 4 bytes long. We can actually skip fixing the max_clock/max_bpc helpers here since they all check for DP_DETAILED_CAP_INFO_AVAILABLE anyway. * Fix ret code check for drm_dp_dpcd_read v5: * Change name from drm_dp_downstream_read_info() to drm_dp_read_downstream_info() * Also, add "See Also" sections for the various downstream info functions (drm_dp_read_downstream_info(), drm_dp_downstream_max_clock(), drm_dp_downstream_max_bpc()) Reviewed-by: Sean Paul Signed-off-by: Lyude Paul Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-14-lyude@redhat.com commit d297ce4b5d490eab60bede36bfd5da6fbcd416cf Author: Lyude Paul Date: Wed Aug 26 14:24:48 2020 -0400 drm/nouveau/kms: Only use hpd_work for reprobing in HPD paths Currently we perform both short IRQ handling for DP, and connector reprobing in the HPD IRQ handler. However since we need to grab connection_mutex in order to reprobe a connector, in theory we could accidentally block ourselves from handling any short IRQs until after a modeset completes if a connector hotplug happens to occur in parallel with a modeset. I haven't seen this actually happen yet, but since we're cleaning up nouveau's hotplug handling code anyway and we already have a hpd worker, we can simply fix this by only relying on the HPD worker to actually reprobe connectors when we receive a HPD IRQ. We also add a mask to nouveau_drm to keep track of which connectors are waiting to be reprobed in response to an HPD IRQ. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-13-lyude@redhat.com commit 02bb7fe2d3eacb5ca1cec597ad16eff93ae8d769 Author: Lyude Paul Date: Wed Aug 26 14:24:47 2020 -0400 drm/nouveau/kms: Move drm_dp_cec_unset_edid() into nouveau_connector_detect() For whatever reason we currently unset the EDID for DP CEC support when responding to the connector being unplugged, instead of just doing it in nouveau_connector_detect() where we set the CEC EDID. This isn't really needed and could even potentially cause us to forget to unset the EDID if the connector is removed without a corresponding hpd event, so let's fix that. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-12-lyude@redhat.com commit 8b75e83e9c94dbf619cf2499ec85656eed9d0320 Author: Lyude Paul Date: Wed Aug 26 14:24:46 2020 -0400 drm/nouveau/kms: Use new drm_dp_read_mst_cap() helper for checking MST caps Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-11-lyude@redhat.com commit 4b4659128e634ce65dc02acf297d623f5bc97497 Author: Lyude Paul Date: Wed Aug 26 14:24:45 2020 -0400 drm/i915/dp: Extract drm_dp_read_mst_cap() Just a tiny drive-by cleanup, we can consolidate i915's code for checking for MST support into a helper to be shared across drivers. v5: * Drop !!() * Move drm_dp_has_mst() out of header * Change name from drm_dp_has_mst() to drm_dp_read_mst_cap() Signed-off-by: Lyude Paul Reviewed-by: Sean Paul Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-10-lyude@redhat.com commit a0922278f83eae085fdf73d06f71bbdfb9d6789e Author: Lyude Paul Date: Wed Aug 26 14:24:44 2020 -0400 drm/nouveau/kms/nv50-: Refactor and cleanup DP HPD handling First some backstory here: Currently, we keep track of whether or not we've enabled MST or not by trying to piggy-back off the MST helpers. This means that in order to check whether MST is enabled or not, we actually need to grab drm_dp_mst_topology_mgr.lock. Back when I originally wrote this, I did this piggy-backing with the intention that I'd eventually be teaching our MST helpers how to recover when an MST device has stopped responding, which in turn would require the MST helpers having a way of disabling MST independently of the driver. Note that this was before I reworked locking in the MST helpers, so at the time we were sticking random things under &mgr->lock - which grabbing this lock was meant to protect against. This never came to fruition because doing such a reset safely turned out to be a lot more painful and impossible then it sounds, and also just risks us working around issues with our MST handlers that should be properly fixed instead. Even if it did though, simply calling drm_dp_mst_topology_mgr_set_mst() from the MST helpers (with the exception of when we're tearing down our MST managers, that's always OK) wouldn't have been a bad idea, since drivers like nouveau and i915 need to do their own book keeping immediately after disabling MST. So-implementing that would likely require adding a hook for helper-triggered MST disables anyway. So, fast forward to now - we want to start adding support for all of the miscellaneous bits of the DP protocol (for both SST and MST) we're missing before moving on to supporting more complicated features like supporting different BPP values on MST, DSC, etc. Since many of these features only exist on SST and make use of DP HPD IRQs, we want to be able to atomically check whether we're servicing an MST IRQ or SST IRQ in nouveau_connector_hotplug(). Currently we literally don't do this at all, and just handle any kind of possible DP IRQ we could get including ESIs - even if MST isn't actually enabled. This would be very complicated and difficult to fix if we need to hold &mgr->lock while handling SST IRQs to ensure that the MST topology state doesn't change under us. What we really want here is to do our own tracking of whether MST is enabled or not, similar to drivers like i915, and define our own locking order to decomplicate things and avoid hitting locking issues in the future. So, let's do this by refactoring our MST probing/enabling code to use our own MST bookkeeping, along with adding a lock for protecting DP state that needs to be checked outside of our connector probing functions. While we're at it, we also remove a bunch of unneeded steps we perform when probing/enabling MST: * Enabling bits in MSTM_CTRL before calling drm_dp_mst_topology_mgr_set_mst(). I don't think these ever actually did anything, since the nvif methods for enabling MST don't actually do anything DPCD related and merely indicate to nvkm that we've turned on MST. * Checking the MSTM_CTRL bit is intact when checking the state of an enabled MST topology in nv50_mstm_detect(). I just added this to be safe originally, but now that we try reading the DPCD when probing DP connectors it shouldn't be needed as that will abort our hotplug probing if the device was removed well before we start checking for MST.. * All of the duplicate DPCD version checks. This leaves us with much nicer looking code, a much more sensible locking scheme, and an easy way of checking whether MST is enabled or not for handling DP HPD IRQs. v2: * Get rid of accidental newlines v4: * Fix uninitialized usage of mstm in nv50_mstm_detect() - thanks kernel bot! Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-9-lyude@redhat.com commit 4944245cebb9daaf740d388fb61e2a824befbdb5 Author: Lyude Paul Date: Wed Aug 26 14:24:43 2020 -0400 drm/nouveau/kms/nv50-: Use drm_dp_dpcd_(readb|writeb)() in nv50_sor_disable() Just use drm_dp_dpcd_(readb|writeb)() so we get automatic DPCD logging Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-8-lyude@redhat.com commit 09838c4efe9afb6fefa889d92c3571d49029af26 Author: Lyude Paul Date: Wed Aug 26 14:24:42 2020 -0400 drm/nouveau/kms: Search for encoders' connectors properly While the way we find the associated connector for an encoder is just fine for legacy modesetting, it's not correct for nv50+ since that uses atomic modesetting. For reference, see the drm_encoder kdocs. Fix this by removing nouveau_encoder_connector_get(), and replacing it with nv04_encoder_get_connector(), nv50_outp_get_old_connector(), and nv50_outp_get_new_connector(). v2: * Don't line-wrap for_each_(old|new)_connector_in_state in nv50_outp_get_(old|new)_connector() - sravn v3: * Fix potential uninitialized usage of nv_connector (needs to be initialized to NULL at the start). Thanks kernel test robot! v4: * Actually fix uninitialized nv_connector usage in nv50_audio_component_get_eld(). The previous fix wouldn't have worked since we would have started out with nv_connector == NULL, but wouldn't clear it after a single drm_for_each_encoder() iteration. Thanks again Kernel bot! Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-7-lyude@redhat.com commit 254e7e3bfcfcae829e120e53e21050e2fe5ce1d7 Author: Lyude Paul Date: Wed Aug 26 14:24:41 2020 -0400 drm/nouveau/kms: Don't clear DP_MST_CTRL DPCD in nv50_mstm_new() Since commit fa3cdf8d0b09 ("drm/nouveau: Reset MST branching unit before enabling") we've been clearing DP_MST_CTRL before we start enabling MST. Since then clearing DP_MST_CTRL in nv50_mstm_new() has been unnecessary and redundant, so let's remove it. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-6-lyude@redhat.com commit 57940402b58b0efe70fd276a7a0fbc394bdb587c Author: Lyude Paul Date: Wed Aug 26 14:24:40 2020 -0400 drm/nouveau/kms/nv50-: Use macros for DP registers in nouveau_dp.c No functional changes. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-5-lyude@redhat.com commit 73596dbfde6c827756bd696599989d200f04bf69 Author: Lyude Paul Date: Wed Aug 26 14:24:39 2020 -0400 drm/nouveau/kms/nv50-: Just use drm_dp_dpcd_read() in nouveau_dp.c Since this actually logs accesses, we should probably always be using this imho… Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-4-lyude@redhat.com commit 6ba1193255ebf7eadf60f79c1555e507d0879ac3 Author: Lyude Paul Date: Wed Aug 26 14:24:38 2020 -0400 drm/nouveau/kms/nv50-: Remove open-coded drm_dp_read_desc() Noticed this while going through our DP code - we use an open-coded version of drm_dp_read_desc() instead of just using the helper, so change that. This will also let us use quirks in the future if we end up needing them. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-3-lyude@redhat.com commit bbcd521e1495056e939a37d0ac996d963a5ac32d Author: Lyude Paul Date: Wed Aug 26 14:24:37 2020 -0400 drm/nouveau/kms: Fix some indenting in nouveau_dp_detect() Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-2-lyude@redhat.com commit 755a2f180c91836ab001ae785d71ebb24250acdf Author: Dave Hansen Date: Fri Aug 14 07:56:25 2020 -0700 Documentation: clarify driver licensing rules Greg has challenged some recent driver submitters on their license choices. He was correct to do so, as the choices in these instances did not always advance the aims of the submitters. But, this left submitters (and the folks who help them pick licenses) a bit confused. They have read things like Documentation/process/license-rules.rst which says: individual source files can have a different license which is required to be compatible with the GPL-2.0 and Documentation/process/submitting-drivers.rst: We don't insist on any kind of exclusive GPL licensing, and if you wish ... you may well wish to release under multiple licenses. As written, these appear a _bit_ more laissez faire than we've been in practice lately. It sounds like we at least expect submitters to make a well-reasoned license choice and to explain their rationale. It does not appear that we blindly accept anything that is simply GPLv2-compatible. Drivers appear to be the most acute source of misunderstanding, so fix the driver documentation first. Update it to clarify expectations. Signed-off-by: Dave Hansen Cc: Dan Williams Cc: H. Peter Anvin Cc: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200814145625.8B708079@viggo.jf.intel.com Signed-off-by: Jonathan Corbet commit 3942ea7a10c93a379cf33710ece8fe0775950368 Author: Joe Perches Date: Wed Aug 26 20:12:01 2020 -0700 deprecated.rst: Remove now removed uninitialized_var It's now gone from the kernel so remove it from the deprecated API text. Signed-off-by: Joe Perches Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/5e10c1645dd8f735215cf54a74db0f8dd3f6cbd5.camel@perches.com Signed-off-by: Jonathan Corbet commit 3519c4d6e08ea695658b961829d4a603acf8e28a Author: Nick Desaulniers Date: Wed Aug 26 12:15:55 2020 -0700 Documentation: add minimum clang/llvm version Based on a vote at the LLVM BoF at Plumbers 2020, we decided to start small, supporting just one formal upstream release of LLVM for now. We can probably widen the support window of supported versions over time. Also, note that LLVM's release process is different than GCC's. GCC tends to have 1 major release per year while releasing minor updates to the past 3 major versions. LLVM tends to support one major release and one minor release every six months. Signed-off-by: Nick Desaulniers Tested-by: Gustavo A. R. Silva Tested-by: Nathan Chancellor Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor Reviewed-by: Masahiro Yamada Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200826191555.3350406-1-ndesaulniers@google.com Signed-off-by: Jonathan Corbet commit eb45fb2fb16df0050b9ae28f06095d72278959d9 Author: Krzysztof Kozlowski Date: Thu Aug 27 12:53:18 2020 +0200 docs: process: Add cross-link to security-bugs The submitting patches mentions criteria for a fix to be called "security fix". Add a link to document explaining the entire process of handling security bugs. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Greg Kroah-Hartman Reviewed-by: Felipe Balbi Cc: Linus Torvalds Cc: Kees Cook Link: https://lore.kernel.org/r/20200827105319.9734-1-krzk@kernel.org Signed-off-by: Jonathan Corbet commit 4680af672bc0ac4c751ea36cef22322c49ca7172 Author: Andrew Cooper Date: Thu Aug 27 18:54:05 2020 +0100 docs/ia64: Drop obsolete Xen documentation While the xensource.com URLs referenced still exist, neither the Xen or Linux 2.6.18 fork have been touched since 2009, 11 years ago. Other URLs are dead. IA64 support was removed in Xen 4.2, in 2012. Relegate this piece of documentation to source history. Signed-off-by: Andrew Cooper Link: https://lore.kernel.org/r/20200827175405.24344-1-andrew.cooper3@citrix.com Signed-off-by: Jonathan Corbet commit 33afda77a783b91950f82fddcb04e0aabf83a402 Author: SeongJae Park Date: Sat Aug 29 10:40:27 2020 +0200 docs/memory-barriers.txt/kokr: Allow architecture to override the flush barrier Translate this commit to Korean: 3e79f082ebfc ("libnvdimm/nvdimm/flush: Allow architecture to override the flush barrier") Signed-off-by: SeongJae Park Reviewed-by: Yunjae Lee Link: https://lore.kernel.org/r/20200829084027.4591-1-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit 20aa600aee63c95cde2203dabc82faeab7594019 Author: SeongJae Park Date: Sat Aug 29 10:26:06 2020 +0200 docs/memory-barriers.txt/kokr: Remove remaining references to mmiowb() Translate this commit to Korean: a897b13d1b77 ("docs/memory-barriers.txt: Remove remaining references to mmiowb()") Signed-off-by: SeongJae Park Reviewed-by: Yunjae Lee Link: https://lore.kernel.org/r/20200829082607.3146-3-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit 537f3a7cf48e9c33734273eada3b23c6b21e5687 Author: SeongJae Park Date: Sat Aug 29 10:26:05 2020 +0200 docs/memory-barriers.txt: Fix references for DMA*.txt files Commit 985098a05eee ("docs: fix references for DMA*.txt files") missed fixing memory-barriers.txt file. This commit applies the change to the file. Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20200829082607.3146-2-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit b21b8da456c8df180277e67a88e977f9c46c707b Author: SeongJae Park Date: Sat Aug 29 10:23:43 2020 +0200 Documentation/kokr/howto: Wordsmith The sentence regarding version numbers of '-stable' kernels is quite ambiguous. This commit makes the sentence more clear and fix inconsistent uses of the terms for 'version'. Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20200829082343.2979-3-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit 4350937f730de6ea213be3bf1764df6d26e5d8b7 Author: SeongJae Park Date: Sat Aug 29 10:23:42 2020 +0200 Documentation/kokr: bring process docs up to date Translate this commit to Korean: fb0e0ffe7fc8 ("Documentation: bring process docs up to date") Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20200829082343.2979-2-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit e44f128768bf28c17a5c0a35b5942bd04a8a64b0 Author: Denis Efremov Date: Mon Aug 24 15:54:35 2020 +0300 integrity: Use current_uid() in integrity_audit_message() Modify integrity_audit_message() to use current_uid(). Signed-off-by: Denis Efremov Signed-off-by: Mimi Zohar commit 48ce1ddce16b0d1e3ff948da40a0d5125a4ee1a0 Author: Tyler Hicks Date: Tue Aug 11 14:26:21 2020 -0500 ima: Fail rule parsing when asymmetric key measurement isn't supportable Measuring keys is currently only supported for asymmetric keys. In the future, this might change. For now, the "func=KEY_CHECK" and "keyrings=" options are only appropriate when CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS is enabled. Make this clear at policy load so that IMA policy authors don't assume that these policy language constructs are supported. Fixes: 2b60c0ecedf8 ("IMA: Read keyrings= option from the IMA policy") Fixes: 5808611cccb2 ("IMA: Add KEY_CHECK func to measure keys") Suggested-by: Nayna Jain Signed-off-by: Tyler Hicks Reviewed-by: Lakshmi Ramasubramanian Reviewed-by: Nayna Jain Signed-off-by: Mimi Zohar commit 176377d97d6a3fae971ecb1f47d9b9cb7dab05ef Author: Tyler Hicks Date: Tue Aug 11 14:26:20 2020 -0500 ima: Pre-parse the list of keyrings in a KEY_CHECK rule The ima_keyrings buffer was used as a work buffer for strsep()-based parsing of the "keyrings=" option of an IMA policy rule. This parsing was re-performed each time an asymmetric key was added to a kernel keyring for each loaded policy rule that contained a "keyrings=" option. An example rule specifying this option is: measure func=KEY_CHECK keyrings=a|b|c The rule says to measure asymmetric keys added to any of the kernel keyrings named "a", "b", or "c". The size of the buffer size was equal to the size of the largest "keyrings=" value seen in a previously loaded rule (5 + 1 for the NUL-terminator in the previous example) and the buffer was pre-allocated at the time of policy load. The pre-allocated buffer approach suffered from a couple bugs: 1) There was no locking around the use of the buffer so concurrent key add operations, to two different keyrings, would result in the strsep() loop of ima_match_keyring() to modify the buffer at the same time. This resulted in unexpected results from ima_match_keyring() and, therefore, could cause unintended keys to be measured or keys to not be measured when IMA policy intended for them to be measured. 2) If the kstrdup() that initialized entry->keyrings in ima_parse_rule() failed, the ima_keyrings buffer was freed and set to NULL even when a valid KEY_CHECK rule was previously loaded. The next KEY_CHECK event would trigger a call to strcpy() with a NULL destination pointer and crash the kernel. Remove the need for a pre-allocated global buffer by parsing the list of keyrings in a KEY_CHECK rule at the time of policy load. The ima_rule_entry will contain an array of string pointers which point to the name of each keyring specified in the rule. No string processing needs to happen at the time of asymmetric key add so iterating through the list and doing a string comparison is all that's required at the time of policy check. In the process of changing how the "keyrings=" policy option is handled, a couple additional bugs were fixed: 1) The rule parser accepted rules containing invalid "keyrings=" values such as "a|b||c", "a|b|", or simply "|". 2) The /sys/kernel/security/ima/policy file did not display the entire "keyrings=" value if the list of keyrings was longer than what could fit in the fixed size tbuf buffer in ima_policy_show(). Fixes: 5c7bac9fb2c5 ("IMA: pre-allocate buffer to hold keyrings string") Fixes: 2b60c0ecedf8 ("IMA: Read keyrings= option from the IMA policy") Signed-off-by: Tyler Hicks Reviewed-by: Lakshmi Ramasubramanian Reviewed-by: Nayna Jain Signed-off-by: Mimi Zohar commit 21a6d1780d5bbfca0ce9b8104ca6233502fcbf86 Author: Heidi Fahim Date: Tue Aug 11 14:27:56 2020 -0700 kunit: tool: allow generating test results in JSON Add a --json flag, which when specified generates JSON formatted test results conforming to the KernelCI API test_group spec[1]. The user can use the new flag to specify a filename to print the json formatted results to. Link[1]: https://api.kernelci.org/schema-test-group.html#post Signed-off-by: Heidi Fahim Signed-off-by: Brendan Higgins Signed-off-by: Shuah Khan commit 5578d008d9e06bb531fb3e62dd17096d9fd9c853 Author: Brendan Higgins Date: Tue Aug 11 14:27:55 2020 -0700 kunit: tool: fix running kunit_tool from outside kernel tree Currently kunit_tool does not work correctly when executed from a path outside of the kernel tree, so make sure that the current working directory is correct and the kunit_dir is properly initialized before running. Signed-off-by: Brendan Higgins Signed-off-by: Shuah Khan commit f69237e1e954b469175de4af8487c303d36c5467 Author: Greg Thelen Date: Tue Jul 28 00:32:41 2020 -0700 selftests: more general make nesting support selftests can be built from the toplevel kernel makefile (e.g. make kselftest-all) or directly (make -C tools/testing/selftests all). The toplevel kernel makefile explicitly disables implicit rules with "MAKEFLAGS += -rR", which is passed to tools/testing/selftests. Some selftest makefiles require implicit make rules, which is why commit 67d8712dcc70 ("selftests: Fix build failures when invoked from kselftest target") reenables implicit rules by clearing MAKEFLAGS if MAKELEVEL=1. So far so good. However, if the toplevel makefile is called from an outer makefile then MAKELEVEL will be elevated, which breaks the MAKELEVEL equality test. Example wrapped makefile error: $ cat ~/Makefile all: $(MAKE) defconfig $(MAKE) kselftest-all $ make -sf ~/Makefile futex_wait_timeout.c /src/tools/testing/selftests/kselftest_harness.h /src/tools/testing/selftests/kselftest.h ../include/futextest.h ../include/atomic.h ../include/logging.h -lpthread -lrt -o /src/tools/testing/selftests/futex/functional/futex_wait_timeout make[4]: futex_wait_timeout.c: Command not found Rather than checking $(MAKELEVEL), check for $(LINK.c), which is a more direct side effect of "make -R". This enables arbitrary makefile nesting. Signed-off-by: Greg Thelen Signed-off-by: Shuah Khan commit 144b0a0e608690d46e9a77819249bdd8d23bdcb6 Author: Yaroslav Bolyukin Date: Sat Aug 29 18:59:53 2020 +0500 ipvs: remove dependency on ip6_tables This dependency was added because ipv6_find_hdr was in iptables specific code but is no longer required Fixes: f8f626754ebe ("ipv6: Move ipv6_find_hdr() out of Netfilter code.") Fixes: 63dca2c0b0e7 ("ipvs: Fix faulty IPv6 extension header handling in IPVS") Signed-off-by: Yaroslav Bolyukin Acked-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso commit f56407fa6e69499a06bf1e0543fa93be6922acba Author: Alexei Starovoitov Date: Mon Aug 31 13:16:51 2020 -0700 bpf: Remove bpf_lsm_file_mprotect from sleepable list. Technically the bpf programs can sleep while attached to bpf_lsm_file_mprotect, but such programs need to access user memory. So they're in might_fault() category. Which means they cannot be called from file_mprotect lsm hook that takes write lock on mm->mmap_lock. Adjust the test accordingly. Also add might_fault() to __bpf_prog_enter_sleepable() to catch such deadlocks early. Fixes: 1e6c62a88215 ("bpf: Introduce sleepable BPF programs") Fixes: e68a144547fc ("selftests/bpf: Add sleepable tests") Reported-by: Yonghong Song Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200831201651.82447-1-alexei.starovoitov@gmail.com commit b69e56cf765155dcac0037d7d0f162a2afab76c2 Author: Weqaar Janjua Date: Sat Aug 29 00:17:17 2020 +0800 samples/bpf: Fix to xdpsock to avoid recycling frames The txpush program in the xdpsock sample application is supposed to send out all packets in the umem in a round-robin fashion. The problem is that it only cycled through the first BATCH_SIZE worth of packets. Fixed this so that it cycles through all buffers in the umem as intended. Fixes: 248c7f9c0e21 ("samples/bpf: convert xdpsock to use libbpf for AF_XDP access") Signed-off-by: Weqaar Janjua Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20200828161717.42705-1-weqaar.a.janjua@intel.com commit 75fa677260be6acf326afc5c466c211b07aee92f Author: Denys Vlasenko Date: Mon Aug 17 17:09:46 2020 +0200 selftests: use "$(MAKE)" instead of "make" for headers_install If top make invocation uses -j4 or larger, this patch reduces "make headers_install" subtask run time from 30 to 7 seconds. CC: Shuah Khan CC: Shuah Khan CC: linux-kselftest@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Denys Vlasenko Signed-off-by: Shuah Khan commit c8a039a47ffe06077929f29c9d4c7cba01a2104b Author: Magnus Karlsson Date: Fri Aug 28 14:51:05 2020 +0200 samples/bpf: Optimize l2fwd performance in xdpsock Optimize the throughput performance of the l2fwd sub-app in the xdpsock sample application by removing a duplicate syscall and increasing the size of the fill ring. The latter needs some further explanation. We recommend that you set the fill ring size >= HW RX ring size + AF_XDP RX ring size. Make sure you fill up the fill ring with buffers at regular intervals, and you will with this setting avoid allocation failures in the driver. These are usually quite expensive since drivers have not been written to assume that allocation failures are common. For regular sockets, kernel allocated memory is used that only runs out in OOM situations that should be rare. These two performance optimizations together lead to a 6% percent improvement for the l2fwd app on my machine. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1598619065-1944-1-git-send-email-magnus.karlsson@intel.com commit 34e1ec319e99322bfed02767d51f4998a961d205 Author: Miaohe Lin Date: Mon Aug 31 02:26:34 2020 -0400 net: ipv4: remove unused arg exact_dif in compute_score The arg exact_dif is not used anymore, remove it. inet_exact_dif_match() is no longer needed after the above is removed, so remove it too. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 3f7d820bad6cace3ecb859bf3fa5bc56fe8bb1c6 Author: Miaohe Lin Date: Mon Aug 31 02:26:10 2020 -0400 net: ipv6: remove unused arg exact_dif in compute_score The arg exact_dif is not used anymore, remove it. inet6_exact_dif_match() is no longer needed after the above is removed, remove it too. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 10eb4667946068e34f0cde1485f030aa68c89275 Merge: d60432994ea2e 588d05504d2d3 Author: David S. Miller Date: Mon Aug 31 12:52:33 2020 -0700 Merge branch 'net-phy-add-Lynx-PCS-MDIO-module' Ioana Ciornei says: ==================== net: phy: add Lynx PCS MDIO module Add support for the Lynx PCS as a separate module in drivers/net/phy/. The advantage of this structure is that multiple ethernet or switch drivers used on NXP hardware (ENETC, Seville, Felix DSA switch etc) can share the same implementation of PCS configuration and runtime management. The module implements phylink_pcs_ops and exports a phylink_pcs (incorporated into a lynx_pcs) which can be directly passed to phylink through phylink_pcs_set. The first 3 patches add some missing pieces in phylink and the locked mdiobus write accessor. Next, the Lynx PCS MDIO module is added as a standalone module. The majority of the code is extracted from the Felix DSA driver. The last patch makes the necessary changes in the Felix and Seville drivers in order to use the new common PCS implementation. At the moment, USXGMII (only with in-band AN), SGMII, QSGMII (with and without in-band AN) and 2500Base-X (only w/o in-band AN) are supported by the Lynx PCS MDIO module since these were also supported by Felix and no functional change is intended at this time. Changes in v2: * got rid of the mdio_lynx_pcs structure and directly exported the functions without the need of an indirection * made the necessary adjustments for this in the Felix DSA driver * solved the broken allmodconfig build test by making the module tristate instead of bool * fixed a memory leakage in the Felix driver (the pcs structure was allocated twice) Changes in v3: * added support for PHYLINK PCS ops in DSA (patch 5/9) * cleanup in Felix PHYLINK operations and migrate to phylink_mac_link_up() being the callback of choice for applying MAC configuration (patches 6-8) Changes in v4: * use the newly introduced phylink PCS mechanism * install the phylink_pcs in the phylink_mac_config DSA ops * remove the direct implementations of the PCS ops * do no use the SGMII_ prefix when referring to the IF_MORE register * add a phylink helper to decode the USXGMII code word * remove cleanup patches for Felix (these have been already accepted) * Seville (recently introduced) now has PCS support through the same Lynx PCS module Changes in v5: - move the pcs-lynx driver to drivers/net/pcs - reword the commit message a bit in 4/5 - add error checking and error propagation in 4/5 - s/IF_MODE_DUPLEX/IF_MODE_HALF_DUPLEX in 4/5 ==================== Signed-off-by: David S. Miller commit 588d05504d2d3b419733356af5fb8970aa551c20 Author: Ioana Ciornei Date: Sun Aug 30 11:34:02 2020 +0300 net: dsa: ocelot: use the Lynx PCS helpers in Felix and Seville Use the helper functions introduced by the newly added Lynx PCS MDIO module in the Felix VSC9959 and Seville VSC9953. Instead of representing the PCS as a phy_device, a mdio_device structure will be passed to the Lynx module which is now actually implementing all the PCS configuration and status reporting. All code previously used for PCS monitoring and runtime configuration is removed and replaced will calls to the Lynx PCS operations. Tested on the following SERDES protocols of LS1028A: 0x7777 (2500Base-X), 0x85bb (QSGMII), 0x9999 (SGMII) and 0x13bb (USXGMII). Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 0da4c3d393e40e41e3c6b9f1cebaa498512c2abb Author: Ioana Ciornei Date: Sun Aug 30 11:34:01 2020 +0300 net: phy: add Lynx PCS module Add a Lynx PCS module which exposes the necessary operations to drive the PCS using phylink. The majority of the code is extracted from the Felix DSA driver, which will be also modified in a later patch, and exposed as a separate module for code reusability purposes. As such, this aims at feature and bug parity with the existing Felix DSA driver, and thus USXGMII, SGMII, QSGMII and 2500Base-X (only w/o in-band AN) are supported by the Lynx PCS module since these were also supported by Felix. The module can only be enabled by the drivers in need and not user selectable. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 2dab432c5ae4f9c8eab3132ac0e9facf498ead92 Author: Ioana Ciornei Date: Sun Aug 30 11:34:00 2020 +0300 net: mdiobus: add clause 45 mdiobus write accessor Add the locked variant of the clause 45 mdiobus write accessor - mdiobus_c45_write(). Signed-off-by: Ioana Ciornei Reviewed-by: Russell King Signed-off-by: David S. Miller commit 29f02ee47764f6f62642ecf583266bb3538495c8 Author: Ioana Ciornei Date: Sun Aug 30 11:33:59 2020 +0300 net: phylink: consider QSGMII interface mode in phylink_mii_c22_pcs_get_state The same link partner advertisement word is used for both QSGMII and SGMII, thus treat both interface modes using the same phylink_decode_sgmii_word() function. Signed-off-by: Ioana Ciornei Reviewed-by: Russell King Signed-off-by: David S. Miller commit afd6220999d4932616322f8a893371f8d0567a2a Author: Ioana Ciornei Date: Sun Aug 30 11:33:58 2020 +0300 net: phylink: add helper function to decode USXGMII word With the new addition of the USXGMII link partner ability constants we can now introduce a phylink helper that decodes the USXGMII word and populates the appropriate fields in the phylink_link_state structure based on them. Signed-off-by: Ioana Ciornei Reviewed-by: Russell King Signed-off-by: David S. Miller commit d60432994ea2ec559f60951260f381be9e460b64 Author: YueHaibing Date: Sat Aug 29 19:58:23 2020 +0800 net/wan/fsl_ucc_hdlc: Add MODULE_DESCRIPTION Add missing MODULE_DESCRIPTION. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 26613a9559b46aabccb8bd7469340be705cb54bd Author: YueHaibing Date: Sat Aug 29 19:57:37 2020 +0800 net: hns: Remove unused macro AE_NAME_PORT_ID_IDX There is no caller in tree. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 52db4bcafc2695f15709f668d1216f030a7eaac1 Author: YueHaibing Date: Sat Aug 29 19:56:23 2020 +0800 net: dl2k: Remove unused macro DRV_NAME There is no caller in tree any more. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit d32575aa628425b07afd763e3a70fcd897b4700a Author: YueHaibing Date: Sat Aug 29 19:55:49 2020 +0800 net: wan: slic_ds26522: Remove unused macro DRV_NAME There is no caller in tree any more. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 622a63f6f3240ab716dc3018baa2cbbb75b2bc2a Author: YueHaibing Date: Sat Aug 29 19:52:14 2020 +0800 tipc: Remove unused macro TIPC_NACK_INTV There is no caller in tree any more. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit ff007a9ba2a6ce5bcc42733239283befbdde1bb7 Author: YueHaibing Date: Sat Aug 29 19:50:26 2020 +0800 tipc: Remove unused macro TIPC_FWD_MSG There is no caller in tree any more. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit b1fd4470cdf80e974bdc5ddd83a40bc0a7d38527 Author: YueHaibing Date: Sat Aug 29 19:42:26 2020 +0800 mptcp: Remove unused macro MPTCP_SAME_STATE There is no caller in tree any more. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 5af68891dc16e1c8216705034a5e0144fd47779a Author: Miaohe Lin Date: Sat Aug 29 05:21:30 2020 -0400 net: clean up codestyle This is a pure codestyle cleanup patch. No functional change intended. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit cbc08a33126f8f721d30cf9034c4d444b55de60a Author: Miaohe Lin Date: Sat Aug 29 05:09:18 2020 -0400 net: Use helper macro IP_MAX_MTU in __ip_append_data() What 0xFFFF means here is actually the max mtu of a ip packet. Use help macro IP_MAX_MTU here. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 4d4dce31ef1adab72e6a22f0cac179d28c499aad Author: Grygorii Strashko Date: Fri Aug 28 23:33:25 2020 +0300 net: ethernet: ti: am65-cpts: fix i2083 genf (and estf) Reconfiguration Issue The new bit TX_GENF_CLR_EN has been added in AM65x SR2.0 to fix i2083 errata, which can be just set unconditionally for all SoCs. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 31b143e5b7df50a7f2d3a9b0027aaa6a5722e05d Merge: bd10d459056fa f2ed621fad087 Author: David S. Miller Date: Mon Aug 31 12:28:50 2020 -0700 Merge branch 'sfc-clean-up-some-W-1-build-warnings' Edward Cree says: ==================== sfc: clean up some W=1 build warnings A collection of minor fixes to issues flagged up by W=1. After this series, the only remaining warnings in the sfc driver are some 'member missing in kerneldoc' warnings from ptp.c. Tested by building on x86_64 and running 'ethtool -p' on an EF10 NIC; there was no error, but I couldn't observe the actual LED as I'm working remotely. [ Incidentally, ethtool_phys_id()'s behaviour on an error return looks strange — if I'm reading it right, it will break out of the inner loop but not the outer one, and eventually return the rc from the last run of the inner loop. Is this intended? ] ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit f2ed621fad08773a825994e479a5743b89c0530d Author: Edward Cree Date: Fri Aug 28 18:51:04 2020 +0100 sfc: return errors from efx_mcdi_set_id_led, and de-indirect W=1 warnings indicated that 'rc' was unused in efx_mcdi_set_id_led(); change the function to return int instead of void and plumb the rc through the caller efx_ethtool_phys_id(). Since (post-Falcon) all sfc NICs use MCDI for this, there's no point in indirecting through a nic_type method, so remove that and just call efx_mcdi_set_id_led() directly. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit b1d11fdbe5b3cad457603d27aa30a29c0d119dc1 Author: Edward Cree Date: Fri Aug 28 18:50:39 2020 +0100 sfc: fix kernel-doc on struct efx_loopback_state Missing 'struct' keyword caused "cannot understand function prototype" warnings. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit b6d96931cade2f3f9b12aec2b5493f099905b116 Author: Edward Cree Date: Fri Aug 28 18:50:24 2020 +0100 sfc: fix unused-but-set-variable warning in efx_farch_filter_remove_safe Thanks to some past refactor, 'spec' is not actually used in this function; the code using it moved to the callee efx_farch_filter_remove. Remove the variable to fix a W=1 warning. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 35ff765f8d508e56d09ef470395324298550c415 Author: Edward Cree Date: Fri Aug 28 18:50:02 2020 +0100 sfc: fix W=1 warnings in efx_farch_handle_rx_not_ok Some of these RX-event flags aren't used at all, so remove them. Others are used only #ifdef DEBUG to log a message; suppress the unused-var warnings #ifndef DEBUG with a void cast. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit bd10d459056fa396273739ca38bdfee4e46680ae Merge: 353ff8ccadbeb a7c978c6c958a Author: David S. Miller Date: Mon Aug 31 12:26:39 2020 -0700 Merge branch 'Add-ip6_fragment-in-ipv6_stub' wenxu says: ==================== Add ip6_fragment in ipv6_stub Add ip6_fragment in ipv6_stub and use it in openvswitch This version add default function eafnosupport_ipv6_fragment ==================== Signed-off-by: David S. Miller commit a7c978c6c958a6b3051f17897c5f57abf71e2342 Author: wenxu Date: Fri Aug 28 23:14:32 2020 +0800 openvswitch: using ip6_fragment in ipv6_stub Using ipv6_stub->ipv6_fragment to avoid the netfilter dependency Signed-off-by: wenxu Signed-off-by: David S. Miller commit 1d97898b36bab91e8ffb38a660cc40eaba613f88 Author: wenxu Date: Fri Aug 28 23:14:31 2020 +0800 ipv6: add ipv6_fragment hook in ipv6_stub Add ipv6_fragment to ipv6_stub to avoid calling netfilter when access ip6_fragment. Signed-off-by: wenxu Signed-off-by: David S. Miller commit 353ff8ccadbeb42937c7a181e3851333ef46a0ee Merge: e859a60add1dd 151ea46f3de13 Author: David S. Miller Date: Mon Aug 31 12:24:35 2020 -0700 Merge branch 'gtp-minor-enhancements' Nicolas Dichtel says: ==================== gtp: minor enhancements The first patch removes a useless rcu lock and the second relax alloc constraints when a PDP context is added. ==================== Signed-off-by: David S. Miller commit 151ea46f3de136f350c69562ce377e6d0200ece0 Author: Nicolas Dichtel Date: Fri Aug 28 15:30:56 2020 +0200 gtp: relax alloc constraint when adding a pdp When a PDP context is added, the rtnl lock is held, thus no need to force a GFP_ATOMIC. Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller commit e2d1baca2b3396371db0a6e1643e487519122069 Author: Nicolas Dichtel Date: Fri Aug 28 15:30:55 2020 +0200 gtp: remove useless rcu_read_lock() The rtnl lock is taken just the line above, no need to take the rcu also. Fixes: 1788b8569f5d ("gtp: fix use-after-free in gtp_encap_destroy()") Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller commit e859a60add1dd3f844c94c7a782c1a16610bd192 Author: Russell King Date: Fri Aug 28 11:53:53 2020 +0100 net: phylink: avoid oops during initialisation If we intend to use PCS operations, mac_pcs_get_state() will not be implemented, so will be NULL. If we also intend to register the PCS operations in mac_prepare() or mac_config(), then this leads to an attempt to call NULL function pointer during phylink_start(). Avoid this, but we must report the link is down. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 3b44c793603c78037357a1eee5fe16aad0ac6d72 Merge: c30a3c957c885 5215e16244ee5 Author: David S. Miller Date: Mon Aug 31 12:21:27 2020 -0700 Merge branch 'hinic-add-debugfs-support' Luo bin says: ==================== hinic: add debugfs support add debugfs node for querying sq/rq info and function table ==================== Signed-off-by: David S. Miller commit 5215e16244ee5889cc6135381acdbf4cbcb7905a Author: Luo bin Date: Fri Aug 28 11:37:48 2020 +0800 hinic: add support to query function table add debugfs node for querying function table, for example: cat /sys/kernel/debug/hinic/0000:15:00.0/func_table/valid Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 626f06031143d7192705f887ff5f19ac71b58440 Author: Luo bin Date: Fri Aug 28 11:37:47 2020 +0800 hinic: add support to query rq info add debugfs node for querying rq info, for example: cat /sys/kernel/debug/hinic/0000:15:00.0/RQs/0x0/rq_hw_pi Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 253ac3a97921b89171069e8f12fd89b6bf1e66c5 Author: Luo bin Date: Fri Aug 28 11:37:46 2020 +0800 hinic: add support to query sq info add debugfs node for querying sq info, for example: cat /sys/kernel/debug/hinic/0000:15:00.0/SQs/0x0/sq_pi Signed-off-by: Luo bin Signed-off-by: David S. Miller commit acabf32805f79df6a8433f1392ed6ed8371722e5 Author: Magnus Karlsson Date: Fri Aug 28 10:26:29 2020 +0200 xsk: Documentation for XDP_SHARED_UMEM between queues and netdevs Add documentation for the XDP_SHARED_UMEM feature when a UMEM is shared between different queues and/or netdevs. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-16-git-send-email-magnus.karlsson@intel.com commit 35149b2c048e43562a598fd8ff91467d429bc666 Author: Cristian Dumitrescu Date: Fri Aug 28 10:26:28 2020 +0200 samples/bpf: Add new sample xsk_fwd.c This sample code illustrates the packet forwarding between multiple AF_XDP sockets in multi-threading environment. All the threads and sockets are sharing a common buffer pool, with each socket having its own private buffer cache. The sockets are created with the xsk_socket__create_shared() function, which allows multiple AF_XDP sockets to share the same UMEM object. Example 1: Single thread handling two sockets. Packets received from socket A (on top of interface IFA, queue QA) are forwarded to socket B (on top of interface IFB, queue QB) and vice-versa. The thread is affinitized to CPU core C: ./xsk_fwd -i IFA -q QA -i IFB -q QB -c C Example 2: Two threads, each handling two sockets. Packets from socket A are sent to socket B (by thread X), packets from socket B are sent to socket A (by thread X); packets from socket C are sent to socket D (by thread Y), packets from socket D are sent to socket C (by thread Y). The two threads are bound to CPU cores CX and CY: ./xdp_fwd -i IFA -q QA -i IFB -q QB -i IFC -q QC -i IFD -q QD -c CX -c CY Signed-off-by: Cristian Dumitrescu Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-15-git-send-email-magnus.karlsson@intel.com commit 2f6324a3937f8517967d94daef2ba0bdceceece1 Author: Magnus Karlsson Date: Fri Aug 28 10:26:27 2020 +0200 libbpf: Support shared umems between queues and devices Add support for shared umems between hardware queues and devices to the AF_XDP part of libbpf. This so that zero-copy can be achieved in applications that want to send and receive packets between HW queues on one device or between different devices/netdevs. In order to create sockets that share a umem between hardware queues and devices, a new function has been added called xsk_socket__create_shared(). It takes the same arguments as xsk_socket_create() plus references to a fill ring and a completion ring. So for every socket that share a umem, you need to have one more set of fill and completion rings. This in order to maintain the single-producer single-consumer semantics of the rings. You can create all the sockets via the new xsk_socket__create_shared() call, or create the first one with xsk_socket__create() and the rest with xsk_socket__create_shared(). Both methods work. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-14-git-send-email-magnus.karlsson@intel.com commit a1132430c2c55af62d13e9fca752d46f14d548b3 Author: Magnus Karlsson Date: Fri Aug 28 10:26:26 2020 +0200 xsk: Add shared umem support between devices Add support to share a umem between different devices. This mode can be invoked with the XDP_SHARED_UMEM bind flag. Previously, sharing was only supported within the same device. Note that when sharing a umem between devices, just as in the case of sharing a umem between queue ids, you need to create a fill ring and a completion ring and tie them to the socket (with two setsockopts, one for each ring) before you do the bind with the XDP_SHARED_UMEM flag. This so that the single-producer single-consumer semantics of the rings can be upheld. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-13-git-send-email-magnus.karlsson@intel.com commit b5aea28dca13456c1a08b9b2ef8a8b92598ac426 Author: Magnus Karlsson Date: Fri Aug 28 10:26:25 2020 +0200 xsk: Add shared umem support between queue ids Add support to share a umem between queue ids on the same device. This mode can be invoked with the XDP_SHARED_UMEM bind flag. Previously, sharing was only supported within the same queue id and device, and you shared one set of fill and completion rings. However, note that when sharing a umem between queue ids, you need to create a fill ring and a completion ring and tie them to the socket before you do the bind with the XDP_SHARED_UMEM flag. This so that the single-producer single-consumer semantics can be upheld. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-12-git-send-email-magnus.karlsson@intel.com commit 9647c57b11e563f5b33a49ef72b347753917c21c Author: Magnus Karlsson Date: Fri Aug 28 10:26:24 2020 +0200 xsk: i40e: ice: ixgbe: mlx5: Test for dma_need_sync earlier for better performance Test for dma_need_sync earlier to increase performance. xsk_buff_dma_sync_for_cpu() takes an xdp_buff as parameter and from that the xsk_buff_pool reference is dug out. Perf shows that this dereference causes a lot of cache misses. But as the buffer pool is now sent down to the driver at zero-copy initialization time, we might as well use this pointer directly, instead of going via the xsk_buff and we can do so already in xsk_buff_dma_sync_for_cpu() instead of in xp_dma_sync_for_cpu. This gets rid of these cache misses. Throughput increases with 3% for the xdpsock l2fwd sample application on my machine. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-11-git-send-email-magnus.karlsson@intel.com commit 8ef4e27eb3f03edfbfbe5657b8061f2a47757037 Author: Magnus Karlsson Date: Fri Aug 28 10:26:23 2020 +0200 xsk: Rearrange internal structs for better performance Rearrange the xdp_sock, xdp_umem and xsk_buff_pool structures so that they get smaller and align better to the cache lines. In the previous commits of this patch set, these structs have been reordered with the focus on functionality and simplicity, not performance. This patch improves throughput performance by around 3%. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-10-git-send-email-magnus.karlsson@intel.com commit 921b68692abb4fd02237b6875b2056bc59435116 Author: Magnus Karlsson Date: Fri Aug 28 10:26:22 2020 +0200 xsk: Enable sharing of dma mappings Enable the sharing of dma mappings by moving them out from the buffer pool. Instead we put each dma mapped umem region in a list in the umem structure. If dma has already been mapped for this umem and device, it is not mapped again and the existing dma mappings are reused. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-9-git-send-email-magnus.karlsson@intel.com commit 7f7ffa4e9c38f01d380ed9df6adb238fd5e6eea5 Author: Magnus Karlsson Date: Fri Aug 28 10:26:21 2020 +0200 xsk: Move addrs from buffer pool to umem Replicate the addrs pointer in the buffer pool to the umem. This mapping will be the same for all buffer pools sharing the same umem. In the buffer pool we leave the addrs pointer for performance reasons. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-8-git-send-email-magnus.karlsson@intel.com commit a5aa8e529e3667eb377ec132d4b4926dee065a45 Author: Magnus Karlsson Date: Fri Aug 28 10:26:20 2020 +0200 xsk: Move xsk_tx_list and its lock to buffer pool Move the xsk_tx_list and the xsk_tx_list_lock from the umem to the buffer pool. This so that we in a later commit can share the umem between multiple HW queues. There is one xsk_tx_list per device and queue id, so it should be located in the buffer pool. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-7-git-send-email-magnus.karlsson@intel.com commit c2d3d6a474629e30428b1622af3d551f560cd1d8 Author: Magnus Karlsson Date: Fri Aug 28 10:26:19 2020 +0200 xsk: Move queue_id, dev and need_wakeup to buffer pool Move queue_id, dev, and need_wakeup from the umem to the buffer pool. This so that we in a later commit can share the umem between multiple HW queues. There is one buffer pool per dev and queue id, so these variables should belong to the buffer pool, not the umem. Need_wakeup is also something that is set on a per napi level, so there is usually one per device and queue id. So move this to the buffer pool too. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-6-git-send-email-magnus.karlsson@intel.com commit 7361f9c3d71955c624fdad5676c99fc88a8249e9 Author: Magnus Karlsson Date: Fri Aug 28 10:26:18 2020 +0200 xsk: Move fill and completion rings to buffer pool Move the fill and completion rings from the umem to the buffer pool. This so that we in a later commit can share the umem between multiple HW queue ids. In this case, we need one fill and completion ring per queue id. As the buffer pool is per queue id and napi id this is a natural place for it and one umem struture can be shared between these buffer pools. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-5-git-send-email-magnus.karlsson@intel.com commit 1c1efc2af158869795d3334a12fed2afd9c51539 Author: Magnus Karlsson Date: Fri Aug 28 10:26:17 2020 +0200 xsk: Create and free buffer pool independently from umem Create and free the buffer pool independently from the umem. Move these operations that are performed on the buffer pool from the umem create and destroy functions to new create and destroy functions just for the buffer pool. This so that in later commits we can instantiate multiple buffer pools per umem when sharing a umem between HW queues and/or devices. We also erradicate the back pointer from the umem to the buffer pool as this will not work when we introduce the possibility to have multiple buffer pools per umem. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-4-git-send-email-magnus.karlsson@intel.com commit c4655761d3cf62bf5f86650e79349c1bfa5c6285 Author: Magnus Karlsson Date: Fri Aug 28 10:26:16 2020 +0200 xsk: i40e: ice: ixgbe: mlx5: Rename xsk zero-copy driver interfaces Rename the AF_XDP zero-copy driver interface functions to better reflect what they do after the replacement of umems with buffer pools in the previous commit. Mostly it is about replacing the umem name from the function names with xsk_buff and also have them take the a buffer pool pointer instead of a umem. The various ring functions have also been renamed in the process so that they have the same naming convention as the internal functions in xsk_queue.h. This so that it will be clearer what they do and also for consistency. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-3-git-send-email-magnus.karlsson@intel.com commit 1742b3d528690ae7773cf7bf2f01a90ee1de2fe0 Author: Magnus Karlsson Date: Fri Aug 28 10:26:15 2020 +0200 xsk: i40e: ice: ixgbe: mlx5: Pass buffer pool to driver instead of umem Replace the explicit umem reference passed to the driver in AF_XDP zero-copy mode with the buffer pool instead. This in preparation for extending the functionality of the zero-copy mode so that umems can be shared between queues on the same netdev and also between netdevs. In this commit, only an umem reference has been added to the buffer pool struct. But later commits will add other entities to it. These are going to be entities that are different between different queue ids and netdevs even though the umem is shared between them. Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1598603189-32145-2-git-send-email-magnus.karlsson@intel.com commit c30a3c957c885e618ddffc065f888be4f8d5a9bd Author: Johannes Berg Date: Mon Aug 31 20:28:05 2020 +0200 netlink: policy: correct validation type check In the policy export for binary attributes I erroneously used a != NLA_VALIDATE_NONE comparison instead of checking for the two possible values, which meant that if a validation function pointer ended up aliasing the min/max as negatives, we'd hit a warning in nla_get_range_unsigned(). Fix this to correctly check for only the two types that should be handled here, i.e. range with or without warn-too-long. Reported-by: syzbot+353df1490da781637624@syzkaller.appspotmail.com Fixes: 8aa26c575fb3 ("netlink: make NLA_BINARY validation more flexible") Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 29523c5e6716521f6e2fb59d7785e2bc0b1a993a Author: Alexei Starovoitov Date: Mon Aug 31 09:31:32 2020 -0700 bpf: Fix build without BPF_LSM. resolve_btfids doesn't like empty set. Add unused ID when BPF_LSM is off. Fixes: 1e6c62a88215 ("bpf: Introduce sleepable BPF programs") Reported-by: Björn Töpel Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Tested-by: Song Liu Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20200831163132.66521-1-alexei.starovoitov@gmail.com commit 9667305c6374df8672be46bc496f52f040999531 Author: Alexei Starovoitov Date: Mon Aug 31 08:51:55 2020 -0700 bpf: Fix build without BPF_SYSCALL, but with BPF_JIT. When CONFIG_BPF_SYSCALL is not set, but CONFIG_BPF_JIT=y the kernel build fails: In file included from ../kernel/bpf/trampoline.c:11: ../kernel/bpf/trampoline.c: In function ‘bpf_trampoline_update’: ../kernel/bpf/trampoline.c:220:39: error: ‘call_rcu_tasks_trace’ undeclared ../kernel/bpf/trampoline.c: In function ‘__bpf_prog_enter_sleepable’: ../kernel/bpf/trampoline.c:411:2: error: implicit declaration of function ‘rcu_read_lock_trace’ ../kernel/bpf/trampoline.c: In function ‘__bpf_prog_exit_sleepable’: ../kernel/bpf/trampoline.c:416:2: error: implicit declaration of function ‘rcu_read_unlock_trace’ This is due to: obj-$(CONFIG_BPF_JIT) += trampoline.o obj-$(CONFIG_BPF_JIT) += dispatcher.o There is a number of functions that arch/x86/net/bpf_jit_comp.c is using from these two files, but none of them will be used when only cBPF is on (which is the case for BPF_SYSCALL=n BPF_JIT=y). Add rcu_trace functions to rcupdate_trace.h. The JITed code won't execute them and BPF trampoline logic won't be used without BPF_SYSCALL. Fixes: 1e6c62a88215 ("bpf: Introduce sleepable BPF programs") Reported-by: kernel test robot Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Paul E. McKenney Link: https://lore.kernel.org/bpf/20200831155155.62754-1-alexei.starovoitov@gmail.com commit 5dc1a0bcb758c343b873e8330ee986417f5a1727 Author: Mukul Joshi Date: Fri Aug 28 19:53:08 2020 -0400 include/uapi/linux: Fix indentation in kfd_smi_event enum Replace spaces with Tabs to fix indentation in kfd_smi_event enum. Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 55977744f9d862512a524fea93fc5226b09e76a9 Author: Mukul Joshi Date: Fri Aug 28 18:50:42 2020 -0400 drm/amdkfd: Add GPU reset SMI event Add support for reporting GPU reset events through SMI. KFD would report both pre and post GPU reset events. Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 7ec3e67307f8611b5db7f76048505df9393563ea Author: Rob Clark Date: Fri Aug 28 13:40:50 2020 -0700 arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt This is essentialy a squash of a bunch of history of trogdor and lazor dt updates from the chromium kernel tree. I don't claim any credit other than wanting to more easily boot upstream kernel on these devices. I've tried to add cc tags for all the original authors. Cc: Stephen Boyd Cc: Douglas Anderson Cc: Matthias Kaehlcke Cc: Atul Dhudase Cc: Venkata Lakshmi Narayana Gubba Cc: Evan Green Cc: Cheng-Yi Chiang Cc: Ajit Pandey Cc: Alexandru Stan Cc: Sujit Kautkar Signed-off-by: Rob Clark Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200828204052.2085508-1-robdclark@gmail.com Signed-off-by: Bjorn Andersson commit 6e043c658e7917200e6251d1fa67b64c332f0531 Author: Dinh Nguyen Date: Mon Aug 31 12:56:55 2020 -0500 arm64: dts: stratix10/agilex: add the ptp_ref clock Add the ptp_ref clock for the GMACs. Signed-off-by: Dinh Nguyen commit 524d8ffd07f0ca10b24011487339f836ed859b32 Author: Alex Dewar Date: Tue Aug 25 18:12:44 2020 +0100 RDMA/qib: Tidy up process_cc() This function has a lot of gotos which could be replaced by simple returns, making the function tidier and less bug prone. Link: https://lore.kernel.org/r/20200825171242.448447-2-alex.dewar90@gmail.com Signed-off-by: Alex Dewar Signed-off-by: Jason Gunthorpe commit d2598bb809d13a47e48a39a96ae8599ee8468025 Author: Alex Dewar Date: Tue Aug 25 18:12:42 2020 +0100 RDMA/qib: Remove superfluous fallthrough statements Commit 36a8f01cd24b ("IB/qib: Add congestion control agent implementation") erroneously marked a couple of switch cases as /* FALLTHROUGH */, which were later converted to fallthrough statements by commit df561f6688fe ("treewide: Use fallthrough pseudo-keyword"). This triggered a Coverity warning about unreachable code. Remove the fallthrough statements. Link: https://lore.kernel.org/r/20200825171242.448447-1-alex.dewar90@gmail.com Addresses-Coverity: ("Unreachable code") Fixes: 36a8f01cd24b ("IB/qib: Add congestion control agent implementation") Signed-off-by: Alex Dewar Reviewed-by: Gustavo A. R. Silva Signed-off-by: Jason Gunthorpe commit d33fe77bdf75806d785dabf90d21d962122e5296 Author: Dinghao Liu Date: Sun Aug 23 15:44:21 2020 +0800 Bluetooth: btusb: Fix memleak in btusb_mtk_submit_wmt_recv_urb When kmalloc() on buf fails, urb should be freed just like when kmalloc() on dr fails. Signed-off-by: Dinghao Liu Signed-off-by: Marcel Holtmann commit dc45d375cfa5676ca40b67c40e568cdfb9fa915c Author: Kiran K Date: Wed Aug 26 15:24:32 2020 +0530 Bluetooth: btusb: Update boot parameter specific to SKU boot parameter gets updated during firmware download process. Use the updated boot parameter while doing soft reset of controller. This patch fixes updating of boot parameter. Signed-off-by: Kiran K Reviewed-by: Chethan T N Signed-off-by: Marcel Holtmann commit 6989aa62d342d79d447a9af12477b907d211bebe Merge: 7672dac30435b f75aef392f869 Author: Jason Gunthorpe Date: Mon Aug 31 12:28:12 2020 -0300 Merge tag 'v5.9-rc3' into rdma.git for-next Required due to dependencies in following patches. Signed-off-by: Jason Gunthorpe commit b58c18c88c20194cb090028480d1e666acc965cd Author: Larry Finger Date: Thu Jul 23 15:42:42 2020 -0500 rtlwifi: rtl8723-common: Rename RT_TRACE to rtl_dbg Change the misleading macro name to one that is more descriptive for rtl8723-common. Changes suggested by ckeckpatch.pl have been made. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-14-Larry.Finger@lwfinger.net commit e6dd230a4d8e4fab5d2b07f1419229acf349fd3a Author: Larry Finger Date: Thu Jul 23 15:42:41 2020 -0500 rtlwifi: rtl8723be Rename RT_TRACE to rtl_dbg Change the misleading macro name to one that is more descriptive for rtl8723be. Changes suggested by ckeckpatch.pl have been made. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-13-Larry.Finger@lwfinger.net commit 8f11dad4145cbfa28425a50daada2869bd64330b Author: Larry Finger Date: Thu Jul 23 15:42:40 2020 -0500 rtlwifi: rtl8723ae Rename RT_TRACE to rtl_dbg Change the misleading macro name to one that is more descriptive for rtl8723ae. Changes suggested by ckeckpatch.pl have been made. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-12-Larry.Finger@lwfinger.net commit fca8218d33f3f425aed1ca5d3e796ceb9cdfd0ee Author: Larry Finger Date: Thu Jul 23 15:42:39 2020 -0500 rtlwifi: rtl8192se Rename RT_TRACE to rtl_dbg Change the misleading macro name to one that is more descriptive for rtl8192se. Changes suggested by ckeckpatch.pl have been made. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-11-Larry.Finger@lwfinger.net commit e24a2a8795fb7632a4e35e3db1374dfe60f23b2c Author: Larry Finger Date: Thu Jul 23 15:42:38 2020 -0500 rtlwifi: rtl8192ee: Rename RT_TRACE to rtl_dbg Change the misleading macro name to one that is more descriptive for rtl8192ee. Changes suggested by ckeckpatch.pl have been made. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-10-Larry.Finger@lwfinger.net commit 6bf8bc19297b56183384871141f80357d777a422 Author: Larry Finger Date: Thu Jul 23 15:42:37 2020 -0500 rtlwifi: rtl8192de: Rename RT_TRACE to rtl_dbg Change the misleading macro name to one that is more descriptive for rtl8192de. Changes suggested by ckeckpatch.pl have been made. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-9-Larry.Finger@lwfinger.net commit 34d7f007171d39e290a50bf3db29392a062c9728 Author: Larry Finger Date: Thu Jul 23 15:42:36 2020 -0500 rtlwifi: rtl8192cu: Rename RT_TRACE to rtl_dbg Change the misleading macro name to one that is more descriptive for rtl8192cu. Changes suggested by ckeckpatch.pl have been made. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-8-Larry.Finger@lwfinger.net commit de0c8a968809541e05f1ee9d4e0a1fdf2235306e Author: Larry Finger Date: Thu Jul 23 15:42:35 2020 -0500 rtlwifi: rtl8192ce: Rename RT_TRACE to rtl_dbg Change the misleading macro name to one that is more descriptive for rtl8192ce. Changes suggested by ckeckpatch.pl have been made. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-7-Larry.Finger@lwfinger.net commit 5b4e998b8ae7326922b9f0aeea84976331a28139 Author: Larry Finger Date: Thu Jul 23 15:42:34 2020 -0500 rtlwifi: rtl8192-common: Rename RT_TRACE to rtl_dbg Change the misleading macro name to one that is more descriptive for rtl8192-common. Changes suggested by ckeckpatch.pl have been made. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-6-Larry.Finger@lwfinger.net commit 57b0b743e402690706b865a64e7a07b81e3ac8c0 Author: Larry Finger Date: Thu Jul 23 15:42:33 2020 -0500 rtlwifi: rtl8188ee: Rename RT_TRACE to rtl_dbg Change the misleading macro name to one that is more descriptive for rtl8188ee. Changes suggested by ckeckpatch.pl have been made. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-5-Larry.Finger@lwfinger.net commit c8159c3ff8db610dfe6999152a9aabb9e4e9f6bf Author: Larry Finger Date: Thu Jul 23 15:42:32 2020 -0500 rtlwifi: btcoexist: Replace RT_TRACE with rtl_dbg Change the misleading macro name to one that is more descriptive for btcoexist. This change exposed some conditions reported by checkpatch.pl. These are also fixed. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-4-Larry.Finger@lwfinger.net commit f108a420e50a62e0bc5cdcd7d4a2440986b526e3 Author: Larry Finger Date: Thu Jul 23 15:42:31 2020 -0500 rtlwifi: Replace RT_TRACE with rtl_dbg The macro name RT_TRACE makes it seem that it is used for tracing, when is actually used for debugging. Change the name to rtl_dbg. Any Sparse errors exposed by this change were also fixed. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-3-Larry.Finger@lwfinger.net commit 78a7245d84300cd616dbce26e6fc42a039a62279 Author: Larry Finger Date: Thu Jul 23 15:42:30 2020 -0500 rtlwifi: Start changing RT_TRACE into rtl_dbg The macro name RT_TRACE makes it seem that it is used for tracing, when is actually used for debugging. Change the name to RT_DEBUG. This step creates the new macro while keeping the old RT_TRACE to allow building. It will be removed at the end of the patch series. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723204244.24457-2-Larry.Finger@lwfinger.net commit 7672dac30435b6e28aebaea189ffcb233e61760d Author: Bob Pearson Date: Thu Aug 27 11:35:36 2020 -0500 RDMA/rxe: Address an issue with hardened user copy Change rxe pools to use kzalloc instead of kmem_cache to allocate memory for rxe objects. The pools are not really necessary and they trigger hardened user copy warnings as the ioctl framework copies the QP number directly to userspace. Also the general project to move object alloation to the core code will eventually clean these out anyhow. Link: https://lore.kernel.org/r/20200827163535.2632-1-rpearson@hpe.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 63fa15dbd488457117e779f8a6b4917ba83f4b77 Author: Bob Pearson Date: Thu Aug 27 09:54:40 2020 -0500 RDMA/rxe: Add SPDX hdrs to rxe source files Add SPDX headers to all rxe .c and .h files. Link: https://lore.kernel.org/r/20200827145439.2273-1-rpearson@hpe.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit e96eecdb290af89e3aca05df835d6123c8947bee Author: Gustavo A. R. Silva Date: Tue Jun 16 17:51:32 2020 -0500 ath10k: wmi: Use struct_size() helper in ath10k_wmi_alloc_skb() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, remove unnecessary variable _len_. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200616225132.GA19873@embeddedor commit 859228a3ae82e587843e16f4e3bae27f94ac1978 Author: Lee Jones Date: Thu Aug 27 10:33:51 2020 +0100 carl9170: Convert 'ar9170_qmap' to inline function 'ar9170_qmap' is used in some source files which include carl9170.h, but not all of them. A 'defined but not used' warning is thrown when compiling the ones which do not use it. Fixes the following W=1 kernel build warning(s) from drivers/net/wireless/ath/carl9170/carl9170.h:57, In file included from drivers/net/wireless/ath/carl9170/carl9170.h:57, drivers/net/wireless/ath/carl9170/carl9170.h:71:17: warning: ‘ar9170_qmap’ defined but not used [-Wunused-const-variable=] NB: Snipped - lots of these repeat Cc: Christian Lamparter Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Johannes Berg Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Suggested-by: Rasmus Villemoes Signed-off-by: Lee Jones Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200827093351.GA1627017@dell commit ea2e3df7c4f27821bbf8722820b7237ee73b8864 Author: Lee Jones Date: Thu Aug 27 08:38:32 2020 +0100 wil6210: wil_platform: Demote kernel-doc header to standard comment block There has been no attempt to document any of the function parameters here. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/wil6210/wil_platform.c:27: warning: Function parameter or member 'dev' not described in 'wil_platform_init' drivers/net/wireless/ath/wil6210/wil_platform.c:27: warning: Function parameter or member 'ops' not described in 'wil_platform_init' drivers/net/wireless/ath/wil6210/wil_platform.c:27: warning: Function parameter or member 'rops' not described in 'wil_platform_init' drivers/net/wireless/ath/wil6210/wil_platform.c:27: warning: Function parameter or member 'wil_handle' not described in 'wil_platform_init' Cc: Maya Erez Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: wil6210@qti.qualcomm.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200827073832.GW3248864@dell commit c7b1a9b358e167f18da5e6171f985a586df319b6 Author: Lee Jones Date: Thu Aug 27 08:37:18 2020 +0100 wil6210: pmc: Demote a few nonconformant kernel-doc function headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/wil6210/pmc.c:43: warning: Function parameter or member 'wil' not described in 'wil_pmc_alloc' drivers/net/wireless/ath/wil6210/pmc.c:43: warning: Function parameter or member 'num_descriptors' not described in 'wil_pmc_alloc' drivers/net/wireless/ath/wil6210/pmc.c:43: warning: Function parameter or member 'descriptor_size' not described in 'wil_pmc_alloc' drivers/net/wireless/ath/wil6210/pmc.c:229: warning: Function parameter or member 'wil' not described in 'wil_pmc_free' drivers/net/wireless/ath/wil6210/pmc.c:229: warning: Function parameter or member 'send_pmc_cmd' not described in 'wil_pmc_free' drivers/net/wireless/ath/wil6210/pmc.c:307: warning: Function parameter or member 'wil' not described in 'wil_pmc_last_cmd_status' drivers/net/wireless/ath/wil6210/pmc.c:320: warning: Function parameter or member 'filp' not described in 'wil_pmc_read' drivers/net/wireless/ath/wil6210/pmc.c:320: warning: Function parameter or member 'buf' not described in 'wil_pmc_read' drivers/net/wireless/ath/wil6210/pmc.c:320: warning: Function parameter or member 'count' not described in 'wil_pmc_read' drivers/net/wireless/ath/wil6210/pmc.c:320: warning: Function parameter or member 'f_pos' not described in 'wil_pmc_read' Cc: Maya Erez Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: wil6210@qti.qualcomm.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200827073718.GV3248864@dell commit e2d651b993794fe5c1419508628b5099e7654da1 Author: Lee Jones Date: Thu Aug 27 08:35:45 2020 +0100 wil6210: txrx_edma: Demote comments which are clearly not kernel-doc Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/wil6210/txrx_edma.c:155: warning: Function parameter or member 'wil' not described in 'wil_ring_alloc_skb_edma' drivers/net/wireless/ath/wil6210/txrx_edma.c:155: warning: Function parameter or member 'ring' not described in 'wil_ring_alloc_skb_edma' drivers/net/wireless/ath/wil6210/txrx_edma.c:155: warning: Function parameter or member 'i' not described in 'wil_ring_alloc_skb_edma' drivers/net/wireless/ath/wil6210/txrx_edma.c:1161: warning: Function parameter or member 'wil' not described in 'wil_tx_sring_handler' drivers/net/wireless/ath/wil6210/txrx_edma.c:1161: warning: Function parameter or member 'sring' not described in 'wil_tx_sring_handler' drivers/net/wireless/ath/wil6210/txrx_edma.c:1328: warning: Function parameter or member 'd' not described in 'wil_tx_desc_offload_setup_tso_edma' drivers/net/wireless/ath/wil6210/txrx_edma.c:1328: warning: Function parameter or member 'tso_desc_type' not described in 'wil_tx_desc_offload_setup_tso_edma' drivers/net/wireless/ath/wil6210/txrx_edma.c:1328: warning: Function parameter or member 'is_ipv4' not described in 'wil_tx_desc_offload_setup_tso_edma' drivers/net/wireless/ath/wil6210/txrx_edma.c:1328: warning: Function parameter or member 'tcp_hdr_len' not described in 'wil_tx_desc_offload_setup_tso_edma' drivers/net/wireless/ath/wil6210/txrx_edma.c:1328: warning: Function parameter or member 'skb_net_hdr_len' not described in 'wil_tx_desc_offload_setup_tso_edma' drivers/net/wireless/ath/wil6210/txrx_edma.c:1328: warning: Function parameter or member 'mss' not described in 'wil_tx_desc_offload_setup_tso_edma' Cc: Maya Erez Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: wil6210@qti.qualcomm.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200827073545.GU3248864@dell commit e6636d649474fcec615fc7115661af16b4d664ba Author: Lee Jones Date: Thu Aug 27 08:34:42 2020 +0100 wil6210: txrx: Demote obvious abuse of kernel-doc None of these headers provide any parameter documentation. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/wil6210/txrx.c:259: warning: Function parameter or member 'wil' not described in 'wil_vring_alloc_skb' drivers/net/wireless/ath/wil6210/txrx.c:259: warning: Function parameter or member 'vring' not described in 'wil_vring_alloc_skb' drivers/net/wireless/ath/wil6210/txrx.c:259: warning: Function parameter or member 'i' not described in 'wil_vring_alloc_skb' drivers/net/wireless/ath/wil6210/txrx.c:259: warning: Function parameter or member 'headroom' not described in 'wil_vring_alloc_skb' drivers/net/wireless/ath/wil6210/txrx.c:309: warning: Function parameter or member 'wil' not described in 'wil_rx_add_radiotap_header' drivers/net/wireless/ath/wil6210/txrx.c:309: warning: Function parameter or member 'skb' not described in 'wil_rx_add_radiotap_header' drivers/net/wireless/ath/wil6210/txrx.c:444: warning: Function parameter or member 'wil' not described in 'wil_vring_reap_rx' drivers/net/wireless/ath/wil6210/txrx.c:444: warning: Function parameter or member 'vring' not described in 'wil_vring_reap_rx' drivers/net/wireless/ath/wil6210/txrx.c:610: warning: Function parameter or member 'wil' not described in 'wil_rx_refill' drivers/net/wireless/ath/wil6210/txrx.c:610: warning: Function parameter or member 'count' not described in 'wil_rx_refill' drivers/net/wireless/ath/wil6210/txrx.c:1011: warning: Function parameter or member 'wil' not described in 'wil_rx_handle' drivers/net/wireless/ath/wil6210/txrx.c:1011: warning: Function parameter or member 'quota' not described in 'wil_rx_handle' drivers/net/wireless/ath/wil6210/txrx.c:1643: warning: Function parameter or member 'd' not described in 'wil_tx_desc_offload_setup_tso' drivers/net/wireless/ath/wil6210/txrx.c:1643: warning: Function parameter or member 'skb' not described in 'wil_tx_desc_offload_setup_tso' drivers/net/wireless/ath/wil6210/txrx.c:1643: warning: Function parameter or member 'tso_desc_type' not described in 'wil_tx_desc_offload_setup_tso' drivers/net/wireless/ath/wil6210/txrx.c:1643: warning: Function parameter or member 'is_ipv4' not described in 'wil_tx_desc_offload_setup_tso' drivers/net/wireless/ath/wil6210/txrx.c:1643: warning: Function parameter or member 'tcp_hdr_len' not described in 'wil_tx_desc_offload_setup_tso' drivers/net/wireless/ath/wil6210/txrx.c:1643: warning: Function parameter or member 'skb_net_hdr_len' not described in 'wil_tx_desc_offload_setup_tso' drivers/net/wireless/ath/wil6210/txrx.c:1674: warning: Function parameter or member 'd' not described in 'wil_tx_desc_offload_setup' drivers/net/wireless/ath/wil6210/txrx.c:1674: warning: Function parameter or member 'skb' not described in 'wil_tx_desc_offload_setup' drivers/net/wireless/ath/wil6210/txrx.c:2240: warning: Function parameter or member 'wil' not described in '__wil_update_net_queues' drivers/net/wireless/ath/wil6210/txrx.c:2240: warning: Function parameter or member 'vif' not described in '__wil_update_net_queues' drivers/net/wireless/ath/wil6210/txrx.c:2240: warning: Function parameter or member 'ring' not described in '__wil_update_net_queues' drivers/net/wireless/ath/wil6210/txrx.c:2240: warning: Function parameter or member 'check_stop' not described in '__wil_update_net_queues' drivers/net/wireless/ath/wil6210/txrx.c:2430: warning: Function parameter or member 'vif' not described in 'wil_tx_complete' drivers/net/wireless/ath/wil6210/txrx.c:2430: warning: Function parameter or member 'ringid' not described in 'wil_tx_complete' Cc: Maya Erez Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: wil6210@qti.qualcomm.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200827073442.GT3248864@dell commit 299ff6c6baa212c3d114c78d02bbd5395ccc40ae Author: Lee Jones Date: Thu Aug 27 08:33:38 2020 +0100 wil6210: interrupt: Demote comment header which is clearly not kernel-doc Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/wil6210/interrupt.c:652: warning: Function parameter or member 'irq' not described in 'wil6210_thread_irq' drivers/net/wireless/ath/wil6210/interrupt.c:652: warning: Function parameter or member 'cookie' not described in 'wil6210_thread_irq' Cc: Maya Erez Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: wil6210@qti.qualcomm.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200827073338.GS3248864@dell commit 6b9739c8b8b8dc622f42a76cc42ea96fee14b37b Author: Lee Jones Date: Thu Aug 27 08:32:01 2020 +0100 wil6210: wmi: Fix formatting and demote non-conforming function headers Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/wil6210/wmi.c:52: warning: Incorrect use of kernel-doc format: * Addressing - theory of operations drivers/net/wireless/ath/wil6210/wmi.c:70: warning: Incorrect use of kernel-doc format: * @sparrow_fw_mapping provides memory remapping table for sparrow drivers/net/wireless/ath/wil6210/wmi.c:80: warning: cannot understand function prototype: 'const struct fw_map sparrow_fw_mapping[] = ' drivers/net/wireless/ath/wil6210/wmi.c:107: warning: Cannot understand * @sparrow_d0_mac_rgf_ext - mac_rgf_ext section for Sparrow D0 drivers/net/wireless/ath/wil6210/wmi.c:115: warning: Cannot understand * @talyn_fw_mapping provides memory remapping table for Talyn drivers/net/wireless/ath/wil6210/wmi.c:158: warning: Cannot understand * @talyn_mb_fw_mapping provides memory remapping table for Talyn-MB drivers/net/wireless/ath/wil6210/wmi.c:236: warning: Function parameter or member 'x' not described in 'wmi_addr_remap' drivers/net/wireless/ath/wil6210/wmi.c:255: warning: Function parameter or member 'section' not described in 'wil_find_fw_mapping' drivers/net/wireless/ath/wil6210/wmi.c:278: warning: Function parameter or member 'wil' not described in 'wmi_buffer_block' drivers/net/wireless/ath/wil6210/wmi.c:278: warning: Function parameter or member 'ptr_' not described in 'wmi_buffer_block' drivers/net/wireless/ath/wil6210/wmi.c:278: warning: Function parameter or member 'size' not described in 'wmi_buffer_block' drivers/net/wireless/ath/wil6210/wmi.c:307: warning: Function parameter or member 'wil' not described in 'wmi_addr' drivers/net/wireless/ath/wil6210/wmi.c:307: warning: Function parameter or member 'ptr' not described in 'wmi_addr' drivers/net/wireless/ath/wil6210/wmi.c:1589: warning: Function parameter or member 'wil' not described in 'wil_find_cid_ringid_sta' drivers/net/wireless/ath/wil6210/wmi.c:1589: warning: Function parameter or member 'vif' not described in 'wil_find_cid_ringid_sta' drivers/net/wireless/ath/wil6210/wmi.c:1589: warning: Function parameter or member 'cid' not described in 'wil_find_cid_ringid_sta' drivers/net/wireless/ath/wil6210/wmi.c:1589: warning: Function parameter or member 'ringid' not described in 'wil_find_cid_ringid_sta' drivers/net/wireless/ath/wil6210/wmi.c:1876: warning: Function parameter or member 'vif' not described in 'wmi_evt_ignore' drivers/net/wireless/ath/wil6210/wmi.c:1876: warning: Function parameter or member 'id' not described in 'wmi_evt_ignore' drivers/net/wireless/ath/wil6210/wmi.c:1876: warning: Function parameter or member 'd' not described in 'wmi_evt_ignore' drivers/net/wireless/ath/wil6210/wmi.c:1876: warning: Function parameter or member 'len' not described in 'wmi_evt_ignore' drivers/net/wireless/ath/wil6210/wmi.c:2588: warning: Function parameter or member 'wil' not described in 'wmi_rxon' Cc: Maya Erez Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: wil6210@qti.qualcomm.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200827073201.GR3248864@dell commit b2c094582e38d667444a13404271752e5fafb2e2 Author: Colin Ian King Date: Wed Aug 19 12:14:52 2020 +0100 ath11k: fix missing error check on call to ath11k_pci_get_user_msi_assignment The return error check on the call to ath11k_pci_get_user_msi_assignment is missing. If an error does occur, num_vectors is still set to zero and later on a division by zero can occur when variable vector is being calculated. Fix this by adding an error check after the call. Addresses-Coverity: ("Division or modulo by zero") Fixes: d4ecb90b3857 ("ath11k: enable DP interrupt setup for QCA6390") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819111452.52419-1-colin.king@canonical.com commit bd5dd7aaa4c0834be98a532b16bc11335e1b26c1 Author: Colin Ian King Date: Wed Aug 19 08:47:29 2020 +0100 ath11k: fix spelling mistake "moniter" -> "monitor" There is a spelling mistake in an ath11k_warn warning message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819074729.48591-1-colin.king@canonical.com commit 61690d01db32eb1f94adc9ac2b8bb741d34e4671 Author: Jason Gunthorpe Date: Tue Aug 25 15:17:08 2020 -0300 RDMA/umem: Fix signature of stub ib_umem_find_best_pgsz() The original function returns unsigned long and 0 on failure. Fixes: 4a35339958f1 ("RDMA/umem: Add API to find best driver supported page size in an MR") Link: https://lore.kernel.org/r/0-v1-982a13cc5c6d+501ae-fix_best_pgsz_stub_jgg@nvidia.com Reviewed-by: Gal Pressman Acked-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit c08279a931914f71d1b012cb2ec8c5b2f01b7ccd Author: Allen Pais Date: Mon Aug 17 14:36:25 2020 +0530 ath11k: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-5-allen.cryptic@gmail.com commit 5d985d724bfa3ab7acf9edc2b3042f66fca9da99 Author: Jason Gunthorpe Date: Tue Aug 25 13:35:38 2020 -0300 RDMA/core: Trigger a WARN_ON if the driver causes uobjects to become leaked Drivers that fail destroy can cause uverbs to leak uobjects. Drivers are required to always eventually destroy their ubojects, so trigger a WARN_ON to detect this driver bug. Link: https://lore.kernel.org/r/0-v1-b1e0ed400ba9+f7-warn_destroy_ufile_hw_jgg@nvidia.com Reviewed-by: Leon Romanovsky Reviewed-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 074bf2c2c7a1f5722eabccee7d919fe20ada0cda Author: Weihang Li Date: Fri Aug 21 17:31:29 2020 +0800 RDMA/hns: Get udp sport num dynamically instead of using a fixed value The UDP source port number in RoCE v2 is used to create entropy for network routers (ECMP), load balancers and 802.3ad link aggregation switching that are not aware of RoCE IB headers. Considering that the IB core has achieved a new interface to get a hashed value of it, the fixed value of it in QPC and UD WQE in hns driver could be fixed and the port number is to be set dynamically now. For QPC of RC, the value could be hashed from flow_lable if the user pass it in or from remote qpn and local qpn. For WQE of UD, it is set according to fl or as a random value. Link: https://lore.kernel.org/r/1598002289-8611-1-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit d452bd091e168f75ec2807c30eec1f7be918c737 Author: Lionel Landwerlin Date: Fri Aug 28 16:31:25 2020 +0300 drm/i915: break TGL pci-ids in GT 1 & 2 I'll need this in IGT to identify the different kind of GTs and apply the right performance query configuration. Signed-off-by: Lionel Landwerlin Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20200828133125.157171-1-lionel.g.landwerlin@intel.com commit 66ccd2560affc6e653ef7372ea36fb825743d186 Author: Ondrej Mosnacek Date: Thu Aug 27 18:27:53 2020 +0200 selinux: simplify away security_policydb_len() Remove the security_policydb_len() calls from sel_open_policy() and instead update the inode size from the size returned from security_read_policy(). Since after this change security_policydb_len() is only called from security_load_policy(), remove it entirely and just open-code it there. Also, since security_load_policy() is always called with policy_mutex held, make it dereference the policy pointer directly and drop the unnecessary RCU locking. Signed-off-by: Ondrej Mosnacek Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 37abc181bbac235633ae23f94d81138c20a4c147 Author: Ezequiel Garcia Date: Tue Aug 25 19:07:10 2020 -0300 phy: Move phy-rockchip-dphy-rx0 out of staging There is no need for this driver to be in staging. Let's promote it! Signed-off-by: Ezequiel Garcia Link: https://lore.kernel.org/r/20200825220710.634106-1-ezequiel@collabora.com Signed-off-by: Vinod Koul commit a1bf1c60b55537382e6857bae8aa89d0dd584747 Author: Kunihiko Hayashi Date: Tue Aug 25 19:41:11 2020 +0900 phy: socionext: Add UniPhier AHCI PHY driver support Add a driver for PHY interface built into ahci controller implemented in UniPhier SoCs. This supports PXs2 and PXs3 SoCs. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/1598352071-26675-3-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Vinod Koul commit 728776d751e167e1ceb1f340b06ab6f7c5a342e6 Author: Kunihiko Hayashi Date: Tue Aug 25 19:41:10 2020 +0900 dt-bindings: phy: Add UniPhier AHCI PHY description Add DT bindings for PHY interface built into ahci controller implemented in UniPhier SoCs. Signed-off-by: Kunihiko Hayashi Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1598352071-26675-2-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Vinod Koul commit 269a5641b1ed0ac00e9d75b43985407b34540d77 Author: Sekhar Nori Date: Sun Aug 2 22:23:56 2020 +0530 arm64: dts: ti: k3-am65: restrict PCIe to Gen2 speed Per errata i2104 documented in AM65x device errata document (TI document number SPRZ452E, revised June 2019), Gen3 operation is not supported for both PCIe Root Complex and Endpoint modes of operation. See: https://www.ti.com/lit/er/sprz452e/sprz452e.pdf Restrict speed to Gen2 to address the errata. Signed-off-by: Sekhar Nori Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20200802165356.10285-1-nsekhar@ti.com commit 67cfbb62132e4210b4c4785b0ca1fbe4cafb7c4d Author: Suman Anna Date: Tue Aug 25 12:21:45 2020 -0500 arm64: dts: ti: k3-j721e-som-p0: Reserve memory for IPC between RTOS cores Add a reserved memory node to reserve a portion of the DDR memory to be used for performing inter-processor communication between all the remote processors running RTOS on the TI J721E EVM boards. 28 MB of memory is reserved for this purpose, and this accounts for all the vrings and vring buffers between all the possible pairs of remote processors. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20200825172145.13186-9-s-anna@ti.com commit 1939d37f94937cf5082ee2612b76106cb3d90978 Author: Suman Anna Date: Tue Aug 25 12:21:44 2020 -0500 arm64: dts: ti: k3-j721e-som-p0: Add DDR carveout memory nodes for C71x DSP Two carveout reserved memory nodes have been added for the lone C71x DSP remote processor device present within the MAIN voltage domain for the TI J721E EVM boards. These nodes are assigned to the respective rproc device node as well. The first region will be used as the DMA pool for the rproc device, and the second region will furnish the static carveout regions for the firmware memory. The current carveout addresses and sizes are defined statically for each device. The C71x DSP processor does support a MMU called CMMU, but is not currently supported and as such requires the exact memory used by the firmware to be set-aside. The firmware images currently do not need any RSC_CARVEOUT entries either in their resource tables to allocate the memory for firmware memory segments. The reserved memory nodes can be disabled later on if there is no use-case defined to use the C71x DSP remoteproc processor. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20200825172145.13186-8-s-anna@ti.com commit cf53928fa0d9120d9c5336504e1c836e453f446a Author: Suman Anna Date: Tue Aug 25 12:21:43 2020 -0500 arm64: dts: ti: k3-j721e-som-p0: Add mailboxes to C71x DSP Add the required 'mboxes' property to the C71x DSP processor for the TI J721E common processor board. The mailboxes and some shared memory are required for running the Remote Processor Messaging (RPMsg) stack between the host processor and each of the DSPs. The nodes are therefore added in the common k3-j721e-som-p0.dtsi file so that all of these can be co-located. The chosen sub-mailboxes match the values used in the current firmware images. This can be changed, if needed, as per the system integration needs after making appropriate changes on the firmware side as well. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20200825172145.13186-7-s-anna@ti.com commit 804a4cc7fe3cc7207b25c63f21ea82f1b77d19ae Author: Suman Anna Date: Tue Aug 25 12:21:42 2020 -0500 arm64: dts: ti: k3-j721e-main: Add C71x DSP node The J721E SoCs have a single TMS320C71x DSP Subsystem in the MAIN voltage domain containing the next-generation C711 CPU core. The subsystem has 32 KB of L1D configurable SRAM/Cache and 512 KB of L2 configurable SRAM/Cache. This subsystem has a CMMU but is not used currently. The inter-processor communication between the main A72 cores and the C711 processor is achieved through shared memory and a Mailbox. Add the DT node for this DSP processor sub-system in the common k3-j721e-main.dtsi file. The following firmware name is used by default for the C71x core, and can be overridden in a board dts file if desired: C71x_0 DSP: j7-c71_0-fw Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20200825172145.13186-6-s-anna@ti.com commit e379ba840a7e2c8fb275722226154339077b8f37 Author: Suman Anna Date: Tue Aug 25 12:21:41 2020 -0500 arm64: dts: ti: k3-j721e-som-p0: Add DDR carveout memory nodes for C66 DSPs Two carveout reserved memory nodes each have been added for each of the C66x DSP remote processor devices present within the MAIN voltage domain for the TI J721E EVM boards. These nodes are assigned to the respective rproc device nodes as well. The first region will be used as the DMA pool for the rproc devices, and the second region will furnish the static carveout regions for the firmware memory. The minimum granularity on the Cache settings on C66x DSP cores is 16 MB, so the DMA memory regions are chosen such that they are in separate 16 MB regions for each DSP, while reserving a total of 16 MB for each DSP and not changing the overall DSP remoteproc carveouts. The current carveout addresses and sizes are defined statically for each device. The C66x DSP processors do not have an MMU, and as such require the exact memory used by the firmwares to be set-aside. The firmware images do not require any RSC_CARVEOUT entries in their resource tables to allocate the memory for firmware memory segments. The reserved memory nodes can be disabled later on if there is no use-case defined to use the corresponding remote processor. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20200825172145.13186-5-s-anna@ti.com commit a55babbf00d71f285bbd52433a859862cc3223fb Author: Suman Anna Date: Tue Aug 25 12:21:40 2020 -0500 arm64: dts: ti: k3-j721e-som-p0: Add mailboxes to C66x DSPs Add the required 'mboxes' property to both the C66x DSP processors for the TI J721E common processor board. The mailboxes and some shared memory are required for running the Remote Processor Messaging (RPMsg) stack between the host processor and each of the DSPs. The nodes are therefore added in the common k3-j721e-som-p0.dtsi file so that all of these can be co-located. The chosen sub-mailboxes match the values used in the current firmware images. This can be changed, if needed, as per the system integration needs after making appropriate changes on the firmware side as well. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20200825172145.13186-4-s-anna@ti.com commit eb9a2a637ae5b23d7881f28fb83d11c88a371229 Author: Suman Anna Date: Tue Aug 25 12:21:39 2020 -0500 arm64: dts: ti: k3-j721e-main: Add C66x DSP nodes The J721E SoCs have two TMS320C66x DSP Core Subsystems (C66x CorePacs) in the MAIN voltage domain, each with a C66x Fixed/Floating-Point DSP Core, and 32 KB of L1P & L1D configurable SRAMs/Cache and an additional 288 KB of L2 configurable SRAM/Cache. These subsystems do not have an MMU but contain a Region Address Translator (RAT) sub-module for translating 32-bit processor addresses into larger bus addresses. The inter-processor communication between the main A72 cores and these processors is achieved through shared memory and Mailboxes. Add the DT nodes for these DSP processor sub-systems in the common k3-j721e-main.dtsi file. The following firmware names are used by default for these cores, and can be overridden in a board dts file if desired: C66x_0 DSP: j7-c66_0-fw C66x_1 DSP: j7-c66_1-fw Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20200825172145.13186-3-s-anna@ti.com commit 74b5742b59b19f4ae9c53ae719161928d9768879 Author: Suman Anna Date: Tue Aug 25 12:21:38 2020 -0500 arm64: dts: ti: k3-j721e-som-p0: Move mailbox nodes from board dts file The commit eb9f9173d01f ("arm64: dts: ti: k3-j721e-common-proc-board: Add IPC sub-mailbox nodes") has added the sub-mailbox nodes used by various remote processors and disabled the unused mailbox clusters directly in the k3-j721e-common-proc-board dts file. Move all of these nodes into the k3-j721e-som-p0.dtsi file instead to co-locate all the mailboxes and the soon to be added DDR reserved-memory carveout nodes used by remoteprocs within the same dtsi file. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20200825172145.13186-2-s-anna@ti.com commit 8ebcaaae8017466f62cf36e1d0023faa1d5f924c Author: Keerthy Date: Wed Aug 26 11:29:21 2020 +0300 arm64: dts: ti: k3-j721e-main: Add crypto accelerator node Add crypto accelarator node for supporting hardware crypto algorithms, including SHA1, SHA256, SHA512, AES, 3DES, and AEAD suites. [t-kristo@ti.com: Modifications based on introduction of yaml binding] Signed-off-by: Keerthy Signed-off-by: Tero Kristo Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20200826082921.19143-3-t-kristo@ti.com commit b366b2409c97e476cda7d83819d9b4851d2f57b1 Author: Keerthy Date: Wed Aug 26 11:29:20 2020 +0300 arm64: dts: ti: k3-am6: Add crypto accelarator node Add crypto accelarator node for supporting hardware crypto algorithms, including SHA1, SHA256, SHA512, AES, 3DES, and AEAD suites. [t-kristo@ti.com: Modifications based on introduction of yaml binding] Signed-off-by: Keerthy Signed-off-by: Tero Kristo Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20200826082921.19143-2-t-kristo@ti.com commit 995504b6fa47005d20104f20922e65e4ad8d3e50 Author: Suman Anna Date: Thu Jul 23 16:11:37 2020 -0500 arm64: dts: ti: k3-j721e: Fix interconnect node names The various CBASS interconnect nodes on K3 J721E SoCs are defined using the node name "interconnect". This is not a valid node name as per the dt-schema. Fix these node names to use the standard name used for SoC interconnects, "bus". Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20200723211137.26641-3-s-anna@ti.com commit 93b72bfa6e2499df18ef2cef2c88e6656f6d94d9 Author: Suman Anna Date: Thu Jul 23 16:11:36 2020 -0500 arm64: dts: ti: k3-am65: Fix interconnect node names The various CBASS interconnect nodes on K3 AM65x SoCs are defined using the node name "interconnect". This is not a valid node name as per the dt-schema. Fix these node names to use the standard name used for SoC interconnects, "bus". Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20200723211137.26641-2-s-anna@ti.com commit 8143182426874a509f65481c7b740115df22f7f3 Author: Gwendal Grignou Date: Fri Aug 14 20:39:08 2020 -0700 platform/chrome: cros_ec_trace: Add fields to command traces In ftrace, add more fields to the cros_ec command event: - Add size of commands to check if they are properly set. - Add offset (in case an EC is cascaded being another EC), to allow proper command output With: echo 1 > events/cros_ec/cros_ec_cmd/enable We now have (on samus) Invalid command for the sensor stack: ectool-6942 [002] .... 3082.783116: cros_ec_request_done: version: 3, offset: 0, command: EC_CMD_MOTION_SENSE_CMD, outsize: 2, insize: 19, ec result: EC_RES_INVALID_PARAM, retval: 0 Powerd accessing PD EC being the main EC: powerd-1272 [002] .... 40.644026: cros_ec_request_done: version: 0, offset: 1, command: EC_CMD_USB_PD_POWER_INFO, outsize: 1, insize: 16, ec result: EC_RES_SUCCESS, retval: 16 Signed-off-by: Gwendal Grignou Acked-by: Raul E Rangel Signed-off-by: Enric Balletbo i Serra commit 23bea1be4eea435af42d9971aef8205b71cf7cd3 Author: Rikard Falkeborn Date: Mon Aug 24 00:00:25 2020 +0200 phy: qcom-ipq4019-usb: Constify static phy_ops structs Their only usages is to assign the address to the data field in the of_device_id struct, which is a const void pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200823220025.17588-9-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit f9781f7f97c0c15193f55af7b022e32eb62c4724 Author: Rikard Falkeborn Date: Mon Aug 24 00:00:24 2020 +0200 phy: samsung-ufs: Constify samsung_ufs_phy_ops The only usage is to pass its address to devm_phy_create() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200823220025.17588-8-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit d6541a86ec4baefd2d8760f591cad204fdd84abd Author: Rikard Falkeborn Date: Mon Aug 24 00:00:23 2020 +0200 phy: ralink-usb: Constify ralink_usb_phy_ops The only usage is to pass its address to devm_phy_create() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200823220025.17588-7-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit b3c824bb64efb6abd08f6e6b97088fa5f31ddf95 Author: Rikard Falkeborn Date: Mon Aug 24 00:00:22 2020 +0200 phy: lantiq: vrx200-pcie: Constify ltq_vrx200_pcie_phy_ops The only usage is to pass its address to devm_phy_create() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20200823220025.17588-6-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit b285d2ae9115aef3bfb3d73e8a6234e421cfea1b Author: Rikard Falkeborn Date: Mon Aug 24 00:00:21 2020 +0200 phy: lantiq: rcu-usb2: Constify ltq_rcu_usb2_phy_ops The only usage is to pass its address to devm_phy_create() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200823220025.17588-5-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit fdde71d351eb4b0a4ba4b824393d219d4223cd54 Author: Rikard Falkeborn Date: Mon Aug 24 00:00:20 2020 +0200 phy: hisilicon; Constify hi3660_phy_ops The only usage is to pass its address to devm_phy_create() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200823220025.17588-4-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit 2bf314d66f64dde2dae6eb97193481222c014bff Author: Rikard Falkeborn Date: Mon Aug 24 00:00:19 2020 +0200 phy: fsl-imx8mq-usb: Constify imx8mq_usb_phy_ops The only usage is to pass its address to devm_phy_create() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200823220025.17588-3-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit e947ef4d961cafecbbceaec91051f7221d7136c3 Author: Rikard Falkeborn Date: Mon Aug 24 00:00:18 2020 +0200 phy: cadence: salvo: Constify cdns_salvo_phy_ops The only usage is to pass its address to devm_phy_create() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200823220025.17588-2-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit 4708ee37826eaa31125ced4a1a573fcc6aa42ab3 Author: Li Jun Date: Mon Aug 24 21:33:34 2020 +0800 phy: freescale: imx8mq-usb: add support for imx8mp usb phy Add initial support for imx8mp usb phy support, imx8mp usb has a silimar phy as imx8mq, which has some different customizations on clock and low power design when SoC integration. Signed-off-by: Li Jun Link: https://lore.kernel.org/r/1598276014-2377-2-git-send-email-jun.li@nxp.com Signed-off-by: Vinod Koul commit e8bd1cd92296ad975e98e0191ff9c33f9d055fe9 Author: Li Jun Date: Mon Aug 24 21:33:33 2020 +0800 dt-bindings: phy-imx8mq-usb: add compatible string for imx8mp usb phy Add "fsl,imx8mp-usb-phy" compatible string for imx8mp usb phy, which is similar with imx8mq usb phy but with some different customizations. Acked-by: Rob Herring Signed-off-by: Li Jun Link: https://lore.kernel.org/r/1598276014-2377-1-git-send-email-jun.li@nxp.com Signed-off-by: Vinod Koul commit 8836e29bad3498f9c39de4036fa139e3804008c0 Author: Roger Quadros Date: Mon Aug 24 10:51:27 2020 +0300 phy: omap-usb2-phy: fix coding style issues Fix checkpatch warnings and sort the include files alphabetically. Signed-off-by: Roger Quadros Link: https://lore.kernel.org/r/20200824075127.14902-3-rogerq@ti.com Signed-off-by: Vinod Koul commit b6cc6cef1cbeb77751f086f777fe7de86ba35136 Merge: c42dcb195b2f9 ad7a7acaedcf4 Author: Vinod Koul Date: Mon Aug 31 14:31:23 2020 +0530 Merge branch 'fixes' into next commit bce8ac223e760a603a555d592bbdb589b6625537 Author: Kuninori Morimoto Date: Thu Aug 27 14:49:57 2020 +0900 arm64: dts: renesas: r8a77961: Enable Sound / Audio-DMAC This patch enables Sound and Audio-DMAC for R-Car M3-W+ (R8A77961). It is tested on R-Car M3-W+ Salvator-XS board. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h7sovdvt.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 557e64084abae2a31f494ac51e4cec549a3bf5ae Author: Marian-Cristian Rotariu Date: Tue Aug 25 11:44:55 2020 +0100 arm64: dts: renesas: r8a774e1: Add PWM device nodes This patch adds PWM[0123456] device nodes to the RZ/G2H (a.k.a R8A774E1) device tree. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200825104455.18000-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit fc7f54fb13b807c556770a69468188947981a400 Author: Lad Prabhakar Date: Tue Aug 25 09:54:35 2020 +0100 ARM: dts: r8a7742-iwg21m: Add SPI NOR support Add support for the SPI NOR device used to boot up the system to the System on Module DT. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200825085435.8744-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit bbf369d4e59a248ed715041267951f5cd051b317 Author: Lad Prabhakar Date: Tue Aug 25 10:54:48 2020 +0100 pinctrl: sh-pfc: r8a7790: Add CAN pins, groups and functions Add pins, groups and functions for the CAN{0,1} interface. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200825095448.13093-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit bfacb84993eb173c0ab53ca4dd6180f76f4dc176 Author: Randy Dunlap Date: Fri Aug 28 07:05:57 2020 -0700 drm: virtio: fix kconfig dependency warning Fix kconfig dependency warning by using a different Kconfig symbol. WARNING: unmet direct dependencies detected for VIRTIO_DMA_SHARED_BUFFER Depends on [n]: VIRTIO_MENU [=n] && DMA_SHARED_BUFFER [=y] Selected by [y]: - DRM_VIRTIO_GPU [=y] && HAS_IOMEM [=y] && DRM [=y] && VIRTIO [=y] && MMU [=y] Signed-off-by: Randy Dunlap Link: http://patchwork.freedesktop.org/patch/msgid/7481fb88-6b04-3726-57e0-0f513245c657@infradead.org Cc: David Airlie Cc: Gerd Hoffmann Cc: dri-devel@lists.freedesktop.org Cc: virtualization@lists.linux-foundation.org Signed-off-by: Gerd Hoffmann commit a4a3550e0db8b31ffafe223427cce9fa6cee0eff Author: Krzysztof Kozlowski Date: Fri Aug 28 21:22:28 2020 +0200 arm64: dts: imx8mq-librem5-devkit: Add missing clock-cells to PMIC The PMIC node can be a clock provider (for its 32 kHz clock) and authors of imx8mq-librem5-devkit.dts apparently wanted this because they added input clock and clock-output-names. Add necessary clock-cells to the PMIC node. Signed-off-by: Krzysztof Kozlowski Reviewed-and-tested-by: Martin Kepplinger Signed-off-by: Shawn Guo commit f2dc2359b75e1fd345fd710862f73db20dc55864 Author: Andre Przywara Date: Fri Aug 28 14:05:56 2020 +0100 arm64: dts: freescale: Fix SP805 clock-names The SP805 binding sets the order of the clock-names to be: "wdog_clk", "apb_pclk" (in exactly that order). Change the order in the DTs for Freescale platforms to match that. The two clocks given in all nodes are actually the same, so that does not change any behaviour. Signed-off-by: Andre Przywara Signed-off-by: Shawn Guo commit 355d7d0124fd0990ba6da74f959fbfe0ccf09c25 Author: Chris Healy Date: Mon Aug 24 20:04:06 2020 -0700 dt-bindings: nvmem: Add syscon to Vybrid OCOTP driver Add syscon compatibility with Vybrid OCOTP driver binding. This is required to access the UID. Fixes: 623069946952 ("nvmem: Add DT binding documentation for Vybrid OCOTP driver") Signed-off-by: Chris Healy Reviewed-by: Stefan Agner Reviewed-by: Fabio Estevam Acked-by: Rob Herring Signed-off-by: Shawn Guo commit d65faff66128df72329481df7abd580e6f51d710 Author: Krzysztof Kozlowski Date: Mon Aug 24 21:18:19 2020 +0200 arm64: dts: imx8mm-var-som-symphony: Add Variscite Symphony board with VAR-SOM-MX8MM Add a DTS for Variscite Symphony evaluation kit with VAR-SOM-MX8MM System on Module. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit bf6b832f5ebe9097257e55aff3273d06a559861d Author: Krzysztof Kozlowski Date: Mon Aug 24 21:18:18 2020 +0200 arm64: dts: imx8mm-var-som: Add Variscite VAR-SOM-MX8MM System on Module Add DTSI of Variscite VAR-SOM-MX8MM System on Module in a basic version, delivered with Variscite Symphony Evaluation kit. This version comes with: - 2 GB of RAM, - 16 GB eMMC, - Gigabit Ethernet PHY, - 802.11 ac/a/b/g/n WiFi with 4.2 Bluetooth (Cypress CYW43353), - CAN bus, - Audio codec (not yet configured in DTSI). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 97e875b701cf48f4b4398aa58b328f7d892c9b17 Author: Krzysztof Kozlowski Date: Mon Aug 24 21:18:17 2020 +0200 dt-bindings: arm: fsl: Add binding for Variscite Symphony board with VAR-SOM-MX8MM Add a binding for the Variscite Symphony evaluation kit board with VAR-SOM-MX8MM System on Module. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 334b6b6638a27e6993b1d9c267b453fb2246b77d Author: Krzysztof Kozlowski Date: Mon Aug 24 21:18:16 2020 +0200 dt-bindings: arm: fsl: Add binding for Variscite VAR-SOM-MX8MM module Add a binding for the Variscite VAR-SOM-MX8MM System on Module. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 8f49a2fe8e6bccbd47555048def9cd08da220c74 Merge: 04b6ff5f25dec f75aef392f869 Author: Greg Kroah-Hartman Date: Mon Aug 31 07:19:25 2020 +0200 Merge 5.9-rc3 into tty-next We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit dd5597245d35cfbb0890b8a868028aa1d2018701 Merge: 551b6729578a8 f75aef392f869 Author: Greg Kroah-Hartman Date: Mon Aug 31 07:17:17 2020 +0200 Merge 5.9-rc3 into char-misc-next We need the fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 5fedf0d295d3ef69fd85fdee4cb68fd3756b54c2 Merge: 3ed8e1c2ac991 f75aef392f869 Author: Greg Kroah-Hartman Date: Mon Aug 31 07:11:45 2020 +0200 Merge 5.9-rc3 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit cd290ec24633f51029dab0d25505fae7da0e1eda Author: Marco Elver Date: Fri Aug 21 14:31:26 2020 +0200 kcsan: Use tracing-safe version of prandom In the core runtime, we must minimize any calls to external library functions to avoid any kind of recursion. This can happen even though instrumentation is disabled for called functions, but tracing is enabled. Most recently, prandom_u32() added a tracepoint, which can cause problems for KCSAN even if the rcuidle variant is used. For example: kcsan -> prandom_u32() -> trace_prandom_u32_rcuidle -> srcu_read_lock_notrace -> __srcu_read_lock -> kcsan ... While we could disable KCSAN in kcsan_setup_watchpoint(), this does not solve other unexpected behaviour we may get due recursing into functions that may not be tolerant to such recursion: __srcu_read_lock -> kcsan -> ... -> __srcu_read_lock Therefore, switch to using prandom_u32_state(), which is uninstrumented, and does not have a tracepoint. Link: https://lkml.kernel.org/r/20200821063043.1949509-1-elver@google.com Link: https://lkml.kernel.org/r/20200820172046.GA177701@elver.google.com Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 6534dfbbfab3dee8eb903df9b68556405ab3fa36 Author: Andre Przywara Date: Fri Aug 28 14:05:55 2020 +0100 arm64: dts: broadcom: Fix SP805 clock-names The SP805 binding sets the name for the actual watchdog clock to "wdog_clk" (with an underscore). Change the name in the DTs for Broadcom platforms to match that. The Linux and U-Boot driver use the *first* clock for this purpose anyway, so it does not break anything. Signed-off-by: Andre Przywara Reviewed-by: Ray Jui Acked-by: Florian Fainelli Signed-off-by: Florian Fainelli commit ed23822eb24b6df608aedb007e569c2cc99f5c2c Author: Adrian Schmutzler Date: Sun Aug 30 22:03:33 2020 +0200 arm64: dts: broadcom: replace status value "ok" by "okay" While the DT parser recognizes "ok" as a valid value for the "status" property, it is actually mentioned nowhere. Use the proper value "okay" instead, as done in the majority of files already. Signed-off-by: Adrian Schmutzler Signed-off-by: Florian Fainelli commit 86d3eedddfd8d1ce96b1437b193ba665b6ce4c50 Author: Krzysztof Kozlowski Date: Tue Aug 25 21:35:36 2020 +0200 arm64: dts: imx8mq-zii-ultra: Add hog suffixes to GPIO hogs According to device tree specification, device node names should be somewhat generic and reflecting the function of the device so add the "hog" suffixes to all GPIO hog nodes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 878cc5a2ca17223cb1064cf6f58f35d347e9ec62 Author: Krzysztof Kozlowski Date: Tue Aug 25 21:35:35 2020 +0200 arm64: dts: imx8mq-evk: Add hog suffix to wl-reg-on According to device tree specification, device node names should be somewhat generic and reflecting the function of the device so add the "hog" suffix to wl-reg-on GPIO hog. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 3db8904fa9764041aab7cdef8a935ee857a2bee7 Author: Krzysztof Kozlowski Date: Tue Aug 25 21:35:32 2020 +0200 dt-bindings: arm: fsl: Add ZII Ultra boards binding Document the binding for Zodiac Inflight Innovations Ultra Boards. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 663effe570d1a798b7a5ae5cc614de615b55714a Author: Krzysztof Kozlowski Date: Tue Aug 25 21:35:31 2020 +0200 dt-bindings: arm: fsl: Fix Toradex Colibri i.MX 8 binding The Toradex Colibri i.MX 8 Evaluation board has two Toradex compatibles so it needs separate entry. This fixes dtbs_check warning: arch/arm64/boot/dts/freescale/imx8qxp-colibri-eval-v3.dt.yaml: /: compatible: ['toradex,colibri-imx8x-eval-v3', 'toradex,colibri-imx8x', 'fsl,imx8qxp'] is not valid under any of the given schemas (Possible causes of the failure): arch/arm64/boot/dts/freescale/imx8qxp-colibri-eval-v3.dt.yaml: /: compatible: ['toradex,colibri-imx8x-eval-v3', 'toradex,colibri-imx8x', 'fsl,imx8qxp'] is too long Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit 2eedac079ae45bbd377def090dd0b509b5568c32 Author: Krzysztof Kozlowski Date: Mon Aug 24 09:15:46 2020 +0200 arm64: dts: imx8mm-beacon-baseboard: Correct LED default state There is no LED default state "none". leds-gpio driver maps it to "off", so correct them to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mm-beacon-kit.dt.yaml: leds: led0:default-state:0: 'none' is not one of ['on', 'off', 'keep'] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 8e6c0a2fe75d371cbaa1aea71eac636b07f32533 Author: Dave Airlie Date: Tue Aug 25 09:08:11 2020 +1000 drm/radeon/ttm: don't store driver copy of device pointer. This can be gotten back from bdev. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200826014428.828392-3-airlied@gmail.com commit 05010c1e2f6b08d623d225305936255d53e34b62 Author: Dave Airlie Date: Tue Aug 25 16:49:13 2020 +1000 drm/amdgpu/ttm: remove unused parameter to move blit Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200826014428.828392-2-airlied@gmail.com commit 82455594c001348c3dbb118ecd8fb8cbbc96b826 Author: Fabio Estevam Date: Mon Aug 24 09:29:39 2020 -0300 ARM: dts: imx6qdl-gw553x: Remove unneeded #address-cells/#size-cells The following dtc warning is seen when building with W=1: arch/arm/boot/dts/imx6qdl-gw553x.dtsi:65.12-110.4: Warning (avoid_unnecessary_addr_size): /gpio-keys: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Remove the unneeded #address-cells/#size-cells properties to fix the issue. Fixes: 64bf0a0af18d ("ARM: dts: imx6qdl-gw: add Gateworks System Controller support") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 5f50799dd4d1bd2b1faeb7ab4f235a239cc200a1 Author: Shengjiu Wang Date: Mon Aug 24 15:50:39 2020 +0800 ARM: dts: imx6sll-evk: Add audio sound card node Add audio sound card node, which depends on codec node, SSI node, audmux node. Signed-off-by: Shengjiu Wang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit b2b8d526d7f5393cd1a76232dd6b04b9fe209291 Author: Shengjiu Wang Date: Mon Aug 24 15:50:38 2020 +0800 ARM: dts: imx6sl-evk: Add headphone detection for sound card Headphone detection is triggered by GPIO, then driver can switch between speaker and headphone. Signed-off-by: Shengjiu Wang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 7d076e1fc9a659102e69ae678dc2191c53135c1a Author: Shengjiu Wang Date: Mon Aug 24 15:50:37 2020 +0800 ARM: dts: imx6sx-sdb: Add headphone detection for sound card Headphone detection is triggered by GPIO, then driver can switch between speaker and headphone. Signed-off-by: Shengjiu Wang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit f1859198509e4ddc93a24049f814fa0fcee0bfd8 Author: Jacky Bai Date: Mon Aug 24 15:37:02 2020 +0800 clk: imx: Correct the memrepair clock on imx8mp The root clock slice at offset 0xbf80 should be memrepair clock, so correct it. And this clock should be always on to make sure the memory repair function can works well. Signed-off-by: Jacky Bai Signed-off-by: Shawn Guo commit afff77ce882dbd1a5fe0047df49b68a96cfe6d9b Author: Jacky Bai Date: Mon Aug 24 15:37:01 2020 +0800 clk: imx: Correct the root clk of media ldb on imx8mp The root clock slice at 0xbf00 is media_ldb clock, not csi_phy2_ref, so correct it. Signed-off-by: Jacky Bai Signed-off-by: Shawn Guo commit acad3fe650a55c11c305741ce87b7852f0edbb04 Author: Tian Tao Date: Wed Aug 26 15:55:28 2020 +0800 drm/hisilicon: Removed the dependency on the mmu hibmc can only be used in ARM64 architectures, and mmu defaults to y in arch/arm64/Kconfig, so there is no need to add a dependency on mmu in hibmc's kconfig. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1598428528-49046-1-git-send-email-tiantao6@hisilicon.com commit 89eb35e810a87d69c878d66e89c7f19f34539036 Author: Xu Yilun Date: Wed Aug 19 15:45:19 2020 +0800 fpga: dfl: map feature mmio resources in their own feature drivers This patch makes preparation for modularization of DFL sub feature drivers. DFL based FPGA devices may contain some IP blocks which are already supported by kernel, most of them are supported by platform device drivers. We could create platform devices for these IP blocks and get them supported by these drivers. An important issue is that platform device drivers usually requests mmio resources on probe. But now DFL mmio is mapped in DFL bus driver (e.g. dfl-pci) as a whole region. Then platform device drivers for sub features can't request their own mmio resources again. This is what the patch trying to resolve. This patch changes the DFL enumeration. DFL bus driver will unmap mmio resources after first step enumeration and pass enumeration info to DFL framework. Then DFL framework will map the mmio resources again, do 2nd step enumeration, and also unmap the mmio resources. In this way, sub feature drivers could then request their own mmio resources as needed. An exception is that mmio resource of FIU headers are still mapped in DFL bus driver. The FIU headers have some fundamental functions (sriov set, port enable/disable) needed for DFL bus devices and other sub features. They should not be unmapped as long as DFL bus device is alive. Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Signed-off-by: Matthew Gerlach Signed-off-by: Russ Weight Reviewed-by: Tom Rix Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit 4e772ab86b3ee24a936b10a291ce31c1f0c2bbb4 Author: Luca Ceresoli Date: Sun Aug 30 18:38:50 2020 +0200 fpga manager: xilinx-spi: provide better diagnostics on programming failure When the DONE pin does not go high after programming to confirm programming success, the INIT_B pin provides some info on the reason. Use it if available to provide a more explanatory error message. Reviewed-by: Tom Rix Signed-off-by: Luca Ceresoli Signed-off-by: Moritz Fischer commit eefe64fba9f2f2328c27ed9d9d02107083a62659 Author: Luca Ceresoli Date: Sun Aug 30 18:38:49 2020 +0200 fpga manager: xilinx-spi: add error checking after gpiod_get_value() Current code calls gpiod_get_value() without error checking. Should the GPIO controller fail, execution would continue without any error message. Fix by checking for negative error values. Reported-by: Tom Rix Reviewed-by: Tom Rix Signed-off-by: Luca Ceresoli Signed-off-by: Moritz Fischer commit 16b7856d94807abeb62f615a8580fd7ae8a27515 Author: Luca Ceresoli Date: Sun Aug 30 18:38:48 2020 +0200 fpga manager: xilinx-spi: fix write_complete timeout handling If this routine sleeps because it was scheduled out, it might miss DONE going asserted and consider it a timeout. This would potentially make the code return an error even when programming succeeded. Rewrite the loop to always check DONE after checking if timeout expired so this cannot happen anymore. While there, also add error checking for gpiod_get_value(). Also avoid checking the DONE GPIO in two places, which would make the error-checking code duplicated and more annoying. The new loop it written to still guarantee that we apply 8 extra CCLK cycles after DONE has gone asserted, which is required by the hardware. Reported-by: Tom Rix Reviewed-by: Tom Rix Signed-off-by: Luca Ceresoli Signed-off-by: Moritz Fischer commit a44ecdc9c97e75e229ec454ba774327769c5b81c Author: Luca Ceresoli Date: Sun Aug 30 18:38:47 2020 +0200 fpga manager: xilinx-spi: remove final dot from dev_err() strings Most dev_err messages in this file have no final dot. Remove the only two exceptions to make them consistent. Reviewed-by: Tom Rix Signed-off-by: Luca Ceresoli Signed-off-by: Moritz Fischer commit 9caff35d7eba8e15c996c694a282fd38b2ea345e Author: Adrian Schmutzler Date: Sun Aug 30 22:11:12 2020 +0200 arm64: dts: rockchip: replace status value "ok" by "okay" While the DT parser recognizes "ok" as a valid value for the "status" property, it is actually mentioned nowhere. Use the proper value "okay" instead, as done in the majority of files already. Signed-off-by: Adrian Schmutzler Link: https://lore.kernel.org/r/20200830201112.1934-1-freifunk@adrianschmutzler.de Signed-off-by: Heiko Stuebner commit 0cf10e6f94335495f90fc62fb75d9569f6a603fb Author: Adrian Schmutzler Date: Sun Aug 30 21:08:20 2020 +0200 ARM: dts: rockchip: replace status value "ok" by "okay" While the DT parser recognizes "ok" as a valid value for the "status" property, it is actually mentioned nowhere. Use the proper value "okay" instead, as done in the majority of files already. Signed-off-by: Adrian Schmutzler Link: https://lore.kernel.org/r/20200830190820.20583-1-freifunk@adrianschmutzler.de Signed-off-by: Heiko Stuebner commit 20e464c0f12a9b1930adb0365326037d5b060cee Author: Johan Jonker Date: Thu Aug 13 19:24:51 2020 +0200 ARM: dts: rockchip: update cpu supplies on rk3066a The use of cpu0-supply for cpu0 alone is deprecated, so add cpu-supply to each cpu separately and update all existing rk3066a boards. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200813172451.13754-2-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 9ab4a7312bf31611f3a9c95470f15b3f2bcd83e3 Author: Johan Jonker Date: Thu Aug 13 19:24:50 2020 +0200 ARM: dts: rockchip: rk3066a: add label to cpu@1 Add label to cpu@1 for later use. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200813172451.13754-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit b282ae0511cdb6f17cb5052de20288245a8ecd00 Author: Johan Jonker Date: Thu Aug 13 20:02:41 2020 +0200 ARM: dts: rockchip: update cpu supplies on rk3288 The use of cpu0-supply for cpu0 alone is deprecated, so add cpu-supply to each cpu separately and update all existing rk3288 boards that use this property. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200813180241.14660-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 61aa9a0a5eae2100c171698bffabde8d5e9f694d Author: Cathy Zhang Date: Tue Aug 25 08:47:58 2020 +0800 x86/kvm: Expose TSX Suspend Load Tracking feature TSX suspend load tracking instruction is supported by the Intel uarch Sapphire Rapids. It aims to give a way to choose which memory accesses do not need to be tracked in the TSX read set. It's availability is indicated as CPUID.(EAX=7,ECX=0):EDX[bit 16]. Expose TSX Suspend Load Address Tracking feature in KVM CPUID, so KVM could pass this information to guests and they can make use of this feature accordingly. Signed-off-by: Cathy Zhang Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/1598316478-23337-3-git-send-email-cathy.zhang@intel.com commit 4be8df7b3bcd46a75f7e297ef310234975a437d8 Author: Johan Jonker Date: Thu Aug 13 20:17:11 2020 +0200 arm64: dts: rockchip: fix cpu-supply for rk3328-evb The property cpu-supply should be added to each cpu separately, so fix that for rk3328-evb. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200813181711.15906-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 964ed0807b5f7b42b8a6ad48531ae9312e19599d Author: Johan Jonker Date: Sat Aug 8 18:06:18 2020 +0200 arm64: dts: rockchip: add rk3318 A95X Z2 board The rk3318 A95X Z2 boards are sold as TV box. No further documentation is given, but from the dts files extracted it seems that the rk3318 processor is simulair to the rk3328. This dts file contains only the basic nodes that have support in the mainline kernel. Features: CPU: RK3318 Quad-Core Cortex-A53 GPU: Mali-450 RAM: 2/4GB DDR3 ROM: EMMC 16/32/64GB HDMI: HDMI 2.0a for 4k@60Hz Ethernet: 10/100M standard RJ-45 WiFi: 2.4G+5G WIFI, 802.11 b/g/n Bluetooth: 4.0 1 x USB 3.0 1 x USB 2.0 1 x Micro SD card slot 1 x SPDIF 1 x AV 1 x DC IN Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200808160618.15445-4-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 0dc8c62c92d4df35a001b613ebe10f95e4ebf776 Author: Johan Jonker Date: Sat Aug 8 18:06:17 2020 +0200 dt-bindings: arm: rockchip: add Zkmagic A95X Z2 description Add Zkmagic A95X Z2 description for a board with rk3318 processor. Signed-off-by: Johan Jonker Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200808160618.15445-3-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit cb1cc137a2c148cbe60e5065afa1a09e176e0269 Author: Johan Jonker Date: Sat Aug 8 18:06:16 2020 +0200 dt-bindings: Add vendor prefix for Shenzhen Zkmagic Technology Co., Ltd. Add vendor prefix for Shenzhen Zkmagic Technology Co., Ltd. Signed-off-by: Johan Jonker Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200808160618.15445-2-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 93e0e8ce5fdf549f1715dad00bfbb21b2f69ba8e Author: Jagan Teki Date: Fri Aug 7 15:18:26 2020 +0530 arm64: dts: rockchip: Add Radxa ROCK Pi 4C support Rock PI 4C has AP6256 Wifi/BT, PoE, miniDP, USB Host enabled GPIO pin change compared to 4B, 4C. So, add or enable difference nodes/properties in 4C dts by including common dtsi. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20200807094826.12019-4-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit c1075b7fcca81f58ebc5d723f07b23f84ae93daa Author: Jagan Teki Date: Fri Aug 7 15:18:25 2020 +0530 arm64: dts: rockchip: Add Radxa ROCK Pi 4B support RockPI 4B has AP6256 Wifi/BT, so enable them in 4B dts instead of enable in common dtsi. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20200807094826.12019-3-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit b5edb04673700125bfd1d13e6c14747b1ecba522 Author: Jagan Teki Date: Fri Aug 7 15:18:24 2020 +0530 arm64: dts: rockchip: Mark rock-pi-4 as rock-pi-4a dts ROCKPi 4 has 3 variants of hardware platforms called RockPI 4A, 4B, and 4C. - ROCKPi 4A has no Wif/BT. - ROCKPi 4B has AP6256 Wifi/BT, PoE. - ROCKPi 4C has AP6256 Wifi/BT, PoE, miniDP, USB Host enabled GPIO pin change compared to 4B, 4C So move common nodes, properties into dtsi file and include on respective variant dts files. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20200807094826.12019-2-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 75a0a65a301f557bf0306d7983f8cf31ac91de56 Author: Jagan Teki Date: Fri Aug 7 15:18:23 2020 +0530 dt-bindings: arm: rockchip: Update ROCKPi 4 binding ROCKPi 4 has 3 variants of hardware platforms called ROCKPi 4A, 4B, and 4C. - ROCKPi 4A has no Wif/BT. - ROCKPi 4B has AP6256 Wifi/BT, PoE. - ROCKPi 4C has AP6256 Wifi/BT, PoE, miniDP, USB Host enabled GPIO pin change compared to 4B, 4C So, update the existing ROCKPi 4 binding to support ROCKPi 4A/B/C hardware platforms. Signed-off-by: Jagan Teki Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200807094826.12019-1-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit bc1f9bff0629a15e3de1ef106ac03cba930227dd Author: Johan Jonker Date: Tue Aug 18 16:37:27 2020 +0200 arm64: dts: rockchip: change spdif fallback compatible on rk3308 A test with the command below shows that the compatible string "rockchip,rk3308-spdif", "rockchip,rk3328-spdif" is already in use, but is not added to a document. The current fallback string "rockchip,rk3328-spdif" points to a data set enum RK_SPDIF_RK3366 in rockchip_spdif.c that is not used both in the mainline as in the manufacturer kernel. (Of the enum only RK_SPDIF_RK3288 is used.) So if the properties don't change we might as well use the first SoC in line as fallback string and add the description for rk3308 as: "rockchip,rk3308-spdif", "rockchip,rk3066-spdif" make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/sound/rockchip-spdif.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200818143727.5882-2-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit bd77d0ad7a698f5e04edf02328d11e808a71d87c Author: Jagan Teki Date: Wed Aug 19 00:15:05 2020 +0530 arm64: dts: rockchip: Fix power routing to support POE on rk3399-roc-pc When POE used, the current power routing is failing to power-up the PMIC regulators which cause Linux boot hangs. This patch is trying to update the power routing in order to support Type C0 and POE powering methods. As per the schematics, sys_12v is a common output power regulator when type c and POE power being used. sys_12v is supplied by dc_12v which is supplied from MP8859 in type c0 power routing and sys_12v is supplied by MP8009 PoE PD in POE power supply routing. Signed-off-by: Jagan Teki Tested-by: Suniel Mahesh Link: https://lore.kernel.org/r/20200818184505.30064-1-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit efe788361f72914017515223414d3f20abe4b403 Author: Sai Prakash Ranjan Date: Tue Aug 18 20:25:14 2020 +0530 arm64: dts: qcom: sc7180: Fix the LLCC base register size There is one LLCC logical bank(LLCC0) on SC7180 SoC and the size of the LLCC0 base is 0x50000(320KB) not 2MB, so correct the size and fix copy paste mistake carried over from SDM845. Reviewed-by: Douglas Anderson Fixes: 7cee5c742899 ("arm64: dts: qcom: sc7180: Fix node order") Fixes: c831fa299996 ("arm64: dts: qcom: sc7180: Add Last level cache controller node") Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/20200818145514.16262-1-saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 0e6aa9db44e7bbba7efeff3b4fc1fa61bab318c2 Author: Jonathan Marek Date: Tue Aug 18 12:04:45 2020 -0400 arm64: dts: qcom: use sm8250 gpucc dt-bindings Constants were used to allow merging separately from the dt-bindings, switch to symbolic names now that dt-bindings have landed. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200818160445.14008-3-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit f126991607edd11d0b0e9f9007f556146083921a Author: Jonathan Marek Date: Tue Aug 18 12:04:44 2020 -0400 arm64: dts: qcom: use sm8150 gpucc dt-bindings Constants were used to allow merging separately from the dt-bindings, switch to symbolic names now that dt-bindings have landed. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200818160445.14008-2-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 79493db5bb573017767b4f48b0fc69bfd01b82d2 Author: Jonathan Marek Date: Tue Aug 18 12:04:43 2020 -0400 arm64: dts: qcom: sm8150: fix up primary USB nodes The compatible for hsphy has out of place indentation, and the assigned clock rate for GCC_USB30_PRIM_MASTER_CLK is incorrect, the clock doesn't support a rate of 150000000. Use a rate of 200000000 to match downstream. Fixes: b33d2868e8d3 ("arm64: dts: qcom: sm8150: Add USB and PHY device nodes") Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200818160445.14008-1-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 681a607ad21a4db5877e6287f666ba3622ca84cf Author: Tanmay Shah Date: Mon Aug 17 20:36:57 2020 -0700 arm64: dts: qcom: sc7180: Add DisplayPort HPD pin dt node This node defines alternate DP HPD functionality of GPIO. Reviewed-by: Stephen Boyd Signed-off-by: Tanmay Shah Link: https://lore.kernel.org/r/20200818033657.16074-1-tanmay@codeaurora.org Signed-off-by: Bjorn Andersson commit bca4339bda0989e49189c164795b120eb261970c Author: Vinod Koul Date: Fri Aug 28 13:13:47 2020 +0530 arm64: dts: qcom: sdm845-db845c: Fix hdmi nodes As per binding documentation, we should have dsi as node 0 and hdmi audio as node 1, so fix it Reported-by: Dmitry Baryshkov Fixes: aef9a119dfb9 ("arm64: dts: qcom: sdm845-db845c: Add hdmi bridge nodes") Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20200828074347.3788518-1-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit aa551bd7a04159cf2ca8806abe5da8012b59d058 Author: Krzysztof Kozlowski Date: Sat Aug 29 13:12:09 2020 +0200 arm64: dts: qcom: msm8992: Fix UART interrupt property "interrupt" is not a valid property. Fixes: 7f8bcc0c4cfe ("arm64: dts: qcom: msm8992: Add BLSP2_UART2 and I2C nodes") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200829111209.32685-1-krzk@kernel.org Signed-off-by: Bjorn Andersson commit 18ec63faefb3fd311822556cd9b949f66b1eecee Author: Kyung Min Park Date: Tue Aug 25 08:47:57 2020 +0800 x86/cpufeatures: Enumerate TSX suspend load address tracking instructions Intel TSX suspend load tracking instructions aim to give a way to choose which memory accesses do not need to be tracked in the TSX read set. Add TSX suspend load tracking CPUID feature flag TSXLDTRK for enumeration. A processor supports Intel TSX suspend load address tracking if CPUID.0x07.0x0:EDX[16] is present. Two instructions XSUSLDTRK, XRESLDTRK are available when this feature is present. The CPU feature flag is shown as "tsxldtrk" in /proc/cpuinfo. Signed-off-by: Kyung Min Park Signed-off-by: Cathy Zhang Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/1598316478-23337-2-git-send-email-cathy.zhang@intel.com commit 05ca530268a9d0ab3547e7b288635e35990a77c4 Author: Sidong Yang Date: Fri Aug 28 12:45:53 2020 +0000 drm/vkms: avoid warning in vkms_get_vblank_timestamp This patch avoid the warning in vkms_get_vblank_timestamp when vblanks aren't enabled. When running igt test kms_cursor_crc just after vkms module, the warning raised like below. Initial value of vblank time is zero and hrtimer.node.expires is also zero if vblank aren't enabled before. vkms module isn't real hardware but just virtual hardware module. so vkms can't generate a resonable timestamp when hrtimer is off. it's best to grab the current time. [106444.464503] [IGT] kms_cursor_crc: starting subtest pipe-A-cursor-size-change [106444.471475] WARNING: CPU: 0 PID: 10109 at vkms_get_vblank_timestamp+0x42/0x50 [vkms] [106444.471511] CPU: 0 PID: 10109 Comm: kms_cursor_crc Tainted: G W OE 5.9.0-rc1+ #6 [106444.471514] RIP: 0010:vkms_get_vblank_timestamp+0x42/0x50 [vkms] [106444.471528] Call Trace: [106444.471551] drm_get_last_vbltimestamp+0xb9/0xd0 [drm] [106444.471566] drm_reset_vblank_timestamp+0x63/0xe0 [drm] [106444.471579] drm_crtc_vblank_on+0x85/0x150 [drm] [106444.471582] vkms_crtc_atomic_enable+0xe/0x10 [vkms] [106444.471592] drm_atomic_helper_commit_modeset_enables+0x1db/0x230 [drm_kms_helper] [106444.471594] vkms_atomic_commit_tail+0x38/0xc0 [vkms] [106444.471601] commit_tail+0x97/0x130 [drm_kms_helper] [106444.471608] drm_atomic_helper_commit+0x117/0x140 [drm_kms_helper] [106444.471622] drm_atomic_commit+0x4a/0x50 [drm] [106444.471629] drm_atomic_helper_set_config+0x63/0xb0 [drm_kms_helper] [106444.471642] drm_mode_setcrtc+0x1d9/0x7b0 [drm] [106444.471654] ? drm_mode_getcrtc+0x1a0/0x1a0 [drm] [106444.471666] drm_ioctl_kernel+0xb6/0x100 [drm] [106444.471677] drm_ioctl+0x3ad/0x470 [drm] [106444.471688] ? drm_mode_getcrtc+0x1a0/0x1a0 [drm] [106444.471692] ? tomoyo_file_ioctl+0x19/0x20 [106444.471694] __x64_sys_ioctl+0x96/0xd0 [106444.471697] do_syscall_64+0x37/0x80 [106444.471699] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Cc: Daniel Vetter Cc: Rodrigo Siqueira Cc: Haneen Mohammed Cc: Melissa Wen Signed-off-by: Sidong Yang Reviewed-by: Melissa Wen Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20200828124553.2178-1-realwakka@gmail.com commit 39cba5cf8c2c23c9c1fe3e0a8612d4f2d932d79b Author: Melissa Wen Date: Tue Aug 25 08:45:32 2020 -0300 drm/vkms: add alpha-premultiplied color blending The VKMS blend function was ignoring the alpha channel and just overwriting vaddr_src with vaddr_dst. This XRGB approach triggers a warning when running the kms_cursor_crc/cursor-alpha-transparent test case. In IGT, cairo_format_argb32 uses premultiplied alpha (according to documentation). Also current DRM assumption is that alpha is premultiplied. Therefore, this patch considers premultiplied alpha blending eq to compose vaddr_src with vaddr_dst. This change removes the following cursor-alpha-transparent warning: "Suspicious CRC: All values are 0." V2: - static for local functions - const for the read-only variable argb_src - replaces variable names - drops unnecessary comment Cc: Daniel Vetter Cc: Rodrigo Siqueira Cc: Haneen Mohammed Signed-off-by: Melissa Wen Reviewed-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20200825114532.abzdooluny2ekzvm@smtp.gmail.com commit 674b05798f407f5ad6a12a5858a7b135d9e7c748 Author: Krzysztof Kozlowski Date: Sun Aug 23 19:20:19 2020 +0200 arm64: dts: imx8mm-evk: Align regulator names with schema Device tree schema expects regulator names to be lowercase. This fixes dtbs_check warnings like: pmic@4b: regulators:LDO1:regulator-name:0: 'LDO1' does not match '^ldo[1-6]$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 31c78242b4c6d9a619b4441dfffebeb07dd9ce29 Author: Krzysztof Kozlowski Date: Sun Aug 23 19:20:18 2020 +0200 arm64: dts: imx8mm-beacon-som: Fix atmel,24c64 EEPROM compatible Correct the EEPROM node compatible to match device tree schema (invalid space, unknown ID) to fix dtbs_check warnings: arch/arm64/boot/dts/freescale/imx8mm-beacon-kit.dt.yaml: eeprom@50: compatible: ['microchip, at24c64d', 'atmel,24c64'] is not valid under any of the given schemas arch/arm64/boot/dts/freescale/imx8mm-beacon-kit.dt.yaml: eeprom@50: compatible:0: 'microchip, at24c64d' does not match '^[a-zA-Z][a-zA-Z0-9,+\\-._]+$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit a265046dd85c9cb8bc2b1281a9745a4675797ff4 Author: Krzysztof Kozlowski Date: Sun Aug 23 19:20:17 2020 +0200 arm64: dts: imx8mm-beacon-som: Align regulator names with schema Device tree schema expects regulator names to be lowercase. This fixes dtbs_check warnings like: pmic@4b: regulators:LDO1:regulator-name:0: 'LDO1' does not match '^ldo[1-6]$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 072edea3cf985b2354c415195e7b9ef930ce68be Author: Krzysztof Kozlowski Date: Sun Aug 23 13:15:08 2020 +0200 arm64: dts: imx8mq-thor96: Replace deprecated phy reset properties Use preferred properties of phy node instead of deprecated phy-reset-gpios (and others). This avoids copying deprecated code into future DTSes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 6ea2d1ef4e1f2d7fd3a4c1cb07f8816206b6691b Author: Krzysztof Kozlowski Date: Sun Aug 23 13:15:07 2020 +0200 arm64: dts: imx8mq-sr-som: Replace deprecated phy reset properties Use preferred properties of phy node instead of deprecated phy-reset-gpios (and others). This avoids copying deprecated code into future DTSes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 348eb3e4782e0dcdfbbb88de398cfe3128e3caa7 Author: Krzysztof Kozlowski Date: Sun Aug 23 13:15:06 2020 +0200 arm64: dts: imx8mq-phanbell: Replace deprecated phy reset properties Use preferred properties of phy node instead of deprecated phy-reset-gpios (and others). This avoids copying deprecated code into future DTSes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit b73af7fca916e9b5e0d11f01bf49f1807fae91b6 Author: Krzysztof Kozlowski Date: Sun Aug 23 13:15:05 2020 +0200 arm64: dts: imx8mq-evk: Replace deprecated phy reset properties Use preferred properties of phy node instead of deprecated phy-reset-gpios (and others). This avoids copying deprecated code into future DTSes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 0e825b32c033e1998d0ebaf247f5dab3c340e3bf Author: Krzysztof Kozlowski Date: Sun Aug 23 13:15:04 2020 +0200 arm64: dts: imx8mm-evk: Replace deprecated phy reset properties Use preferred properties of phy node instead of deprecated phy-reset-gpios (and others). This avoids copying deprecated code into future DTSes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 1197989df7209aff7db232085842c814855de138 Author: Krzysztof Kozlowski Date: Sun Aug 23 11:05:05 2020 +0200 arm64: dts: imx8mp-evk: remove orphaned pinctrl-names property The "pinctrl-names" property in iomux node does not make sense on its own (without "pinctrl-X"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit e9d594e8d49753df6d2db80c3224b8b141e41672 Author: Krzysztof Kozlowski Date: Sun Aug 23 11:05:04 2020 +0200 arm64: dts: imx8mn-evk: remove orphaned pinctrl-names property The "pinctrl-names" property in iomux node does not make sense on its own (without "pinctrl-X"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 6a62bc369dcf73444af0c1e1effd36f24da7b843 Author: Krzysztof Kozlowski Date: Sun Aug 23 11:05:03 2020 +0200 arm64: dts: imx8mm-evk: remove orphaned pinctrl-names property The "pinctrl-names" property in iomux node does not make sense on its own (without "pinctrl-X"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit fa1652340af8ddb04b6f789f9edf318d7ef5ef75 Author: Fabio Estevam Date: Fri Aug 21 09:59:38 2020 -0300 arm64: dts: imx8mm-evk: Add flexspi support imx8mm-evk has a quad SPI-NOR flash on the flexspi bus. Add support for it. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 843b993c2d0b5e9aa22965234b914625ed3d3713 Author: Fabio Estevam Date: Wed Aug 19 19:02:19 2020 -0300 arm64: dts: imx8m: Fix the SPI chipselect polarity The conversion of the spi-imx driver to use GPIO descriptors in commit 8cdcd8aeee28 ("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd for example: [ 4.854337] m25p80@0 enforce active low on chipselect handle Prior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low. The reason for such mismatch is clearly explained in the comments inside drivers/gpio/gpiolib-of.c: * SPI children have active low chip selects * by default. This can be specified negatively * by just omitting "spi-cs-high" in the * device node, or actively by tagging on * GPIO_ACTIVE_LOW as flag in the device * tree. If the line is simultaneously * tagged as active low in the device tree * and has the "spi-cs-high" set, we get a * conflict and the "spi-cs-high" flag will * take precedence. To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent. Signed-off-by: Fabio Estevam Reviewed-by: Linus Walleij Signed-off-by: Shawn Guo commit bcf7206fe9c35e048e1dc90cf62216b0f5eaf091 Author: Anson Huang Date: Fri Aug 14 17:27:19 2020 +0800 arm64: dts: imx8mp: Update pinfunc header file Update some pins' name and adjust pin options to i.MX8MP pinfunc header file according to latest reference manual. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 7f6d6e484b9341fd13ec8da42982ca8d2ca54cde Author: Linus Walleij Date: Sat Aug 29 00:30:34 2020 +0200 ARM: dts: ux500-skomer: Add KTD253 backlight This enables the KTD253 backlight found on the Samsung GT-S7710 "Skomer". Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200828223034.40983-1-linus.walleij@linaro.org commit c883db9a9306dea5d907287b74b926258ea7422d Author: Krzysztof Kozlowski Date: Sun Aug 23 19:20:15 2020 +0200 dt-bindings: arm: fsl: Add Beacon i.MX8M Mini Development Kit binding Document the binding for Beacon EmbeddedWorks i.MX8M Mini Development Kit board. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit fe92538086a86d91c7ce91ff0994de9db321ed29 Author: Krzysztof Kozlowski Date: Sun Aug 23 10:49:20 2020 +0200 ARM: dts: imx6q-kontron-samx6i: Remove old fsl,spi-num-chipselects The property "fsl,spi-num-chipselects" is gone since commit 790739c4417c ("dt-bindings: spi: Convert imx cspi to json-schema"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 2bfdd113d0ee1ea40fbb49f181fea352a7e5e1a7 Author: Fabio Estevam Date: Wed Aug 19 18:04:24 2020 -0300 ARM: dts: imx: Fix the SPI chipselect polarity The conversion of the spi-imx driver to use GPIO descriptors in commit 8cdcd8aeee28 ("spi: imx/fsl-lpspi: Convert to GPIO descriptors") helped to detect the following SPI chipselect polarity mismatch on an imx6q-sabresd: [ 4.854337] m25p80@0 enforce active low on chipselect handle Prior to the above commit, the chipselect polarity passed via cs-gpios property was ignored and considered active-low. The reason for such mismatch is clearly explained in the comments inside drivers/gpio/gpiolib-of.c: * SPI children have active low chip selects * by default. This can be specified negatively * by just omitting "spi-cs-high" in the * device node, or actively by tagging on * GPIO_ACTIVE_LOW as flag in the device * tree. If the line is simultaneously * tagged as active low in the device tree * and has the "spi-cs-high" set, we get a * conflict and the "spi-cs-high" flag will * take precedence. To properly represent the SPI chipselect polarity, change it to active-low when the "spi-cs-high" property is absent. Signed-off-by: Fabio Estevam Reviewed-by: Linus Walleij Signed-off-by: Shawn Guo commit 3b8095169982ff4ec2a1b4be61b7224bbef23b48 Author: Laurent Pinchart Date: Mon Aug 24 03:32:54 2020 +0300 drm: panel: Fix bpc for OrtusTech COM43H4M85ULC panel The OrtusTech COM43H4M85ULC panel is a 18-bit RGB panel. Commit f098f168e91c ("drm: panel: Fix bus format for OrtusTech COM43H4M85ULC panel") has fixed the bus formats, but forgot to address the bpc value. Set it to 6. Fixes: f098f168e91c ("drm: panel: Fix bus format for OrtusTech COM43H4M85ULC panel") Signed-off-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200824003254.21904-1-laurent.pinchart@ideasonboard.com commit 85a51673660d43a3f4543f4623f747dc9a51d35b Author: Vinod Koul Date: Fri Aug 28 13:12:50 2020 +0530 drm/bridge: Fix the dsi remote end-points DSI end-points are supposed to be at node 0 and node 1 as per binding. So fix this and use node 0 and node 1 for dsi. Reported-by: Dmitry Baryshkov Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge") Signed-off-by: Vinod Koul Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200828074251.3788165-1-vkoul@kernel.org commit 3b634b479abeeae58e08c03db4293f47078ff87d Author: Robert Chiras Date: Fri Aug 28 17:58:33 2020 +0300 drm/panel: rm67191: Remove CLOCK_NON_CONTINUOUS flag The flag MIPI_DSI_CLOCK_NON_CONTINUOUS was wrong used in the DSI driver, so it was added to this panel, but not necessary. So, remove this flag since it is not needed. Signed-off-by: Robert Chiras Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1598626713-5595-1-git-send-email-robert.chiras@oss.nxp.com commit bca684e69c4ced7cd141ee3ad0486446eef628a2 Author: Jagan Teki Date: Sat Aug 29 22:03:28 2020 +0530 drm/panel: simple: Add AM-1280800N3TZQW-T00H Add Ampire, AM-1280800N3TZQW-T00H 10.1" TFT LCD panel timings. Signed-off-by: Jagan Teki Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200829163328.249211-2-jagan@amarulasolutions.com commit a8f94c4a87885c33c034e8548d4ff623eb8a9366 Author: Jagan Teki Date: Sat Aug 29 22:03:27 2020 +0530 dt-bindings: display: simple: Add AM-1280800N3TZQW-T00H Add dt-bindings for 10.1" TFT LCD module from Ampire Co. Ltd. as part of panel-simple. Signed-off-by: Jagan Teki Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200829163328.249211-1-jagan@amarulasolutions.com commit 2c4e80e06790cb49ad2603855d30c5aac2209c47 Author: Stefan Agner Date: Fri Aug 28 17:52:05 2020 +0200 clk: meson: g12a: mark fclk_div2 as critical On Amlogic Meson G12b platform, similar to fclk_div3, the fclk_div2 seems to be necessary for the system to operate correctly as well. Typically, the clock also gets chosen by the eMMC peripheral. This probably masked the problem so far. However, when booting from a SD card the clock seems to get disabled which leads to a system freeze. Let's mark this clock as critical, fixing boot from SD card on G12b platforms. Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller") Signed-off-by: Stefan Agner Signed-off-by: Jerome Brunet Tested-by: Anand Moon Cc: Marek Szyprowski Link: https://lore.kernel.org/r/577e0129e8ee93972d92f13187ff4e4286182f67.1598629915.git.stefan@agner.ch commit 67407a406db337acdaabecd3747d160d89a929e4 Author: Balazs Scheidler Date: Sat Aug 29 08:19:15 2020 +0200 netfilter: nft_socket: add wildcard support Add NFT_SOCKET_WILDCARD to match to wildcard socket listener. Signed-off-by: Balazs Scheidler Signed-off-by: Pablo Neira Ayuso commit 1771e9fb67e2d6df29acb0ee8349c3833a212754 Author: Gustavo A. R. Silva Date: Sat Jul 25 00:10:14 2020 +0200 media: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d7a81a5b073135358a9b98ad0be263b5f327ebcb Author: Helen Koike Date: Fri Jul 24 18:25:55 2020 +0200 media: staging: rkisp1: uapi: remove __packed The driver access struct's fields one by one, they are not blindly copied to/from the hardware, so we can remove __packed from the structs. Tested on Scarlet Chromebook with ChromeOS stack and verified images with the Camera app. Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 581214d3de99e3c0d7fef628dcdc455cbdc93a1d Author: Dafna Hirschfeld Date: Sat Aug 15 12:37:24 2020 +0200 media: staging: rkisp1: params: don't release lock in isr before buffer is done In the irq handler 'rkisp1_params_isr', the lock 'config_lock' should be held as long as the current buffer is used. Otherwise the stop_streaming calback might remove it from the list and pass it to userspace while it is referenced in the irq handler. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fb4ca983adafd6bba385386d24ba21295dbafe42 Author: Dafna Hirschfeld Date: Sat Aug 15 12:37:22 2020 +0200 media: staging: rkisp1: params: use rkisp1_param_set_bits to set reg in isr replace a read and write of RKISP1_CIF_ISP_CTRL register in the isr with the 'rkisp1_param_set_bits' function that does that. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c85d0eec3f85da9b84dcfee6fea5fa2e75a226c5 Author: Dafna Hirschfeld Date: Sat Aug 15 12:37:21 2020 +0200 media: staging: rkisp1: call params isr only upon frame out Currently the params isr is called and then returned when isp-frame interrupt is not set. This condition is already tested in the isp's isr so move the call under the condition in the isp's isr. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 56947d2c62676e3456d78513bd8fb3e0ec881a89 Author: Dafna Hirschfeld Date: Thu Jun 25 20:50:17 2020 +0200 media: staging: rkisp1: change type of fields in 'rkisp1_cif_isp_lsc_config' from u32 to u16 The fields in struct 'rkisp1_cif_isp_lsc_config' need to hold values of 12 bits, therefore it is enough to declare them as u16. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a699a4c117eadb39a9041a85240cd7464ffbe8b4 Author: Dafna Hirschfeld Date: Thu Jun 25 20:50:16 2020 +0200 media: staging: rkisp1: replace two identical macros with one The two macros RKISP1_CIF_ISP_LSC_{GRAD/SIZE}_TBL_SIZE have the same value which is the number of sectors in the grads and size parameters. Therefore there is no need for two different macros. Replace them with one macro RKISP1_CIF_ISP_LSC_SECTORS_TBL_SIZE. Also use the macro when iterating the arrays instead of hardcoded '4'. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f718f6c8b7fb0290e97419d4647fba5cde5dff33 Author: Dafna Hirschfeld Date: Thu Jun 25 20:50:15 2020 +0200 media: staging: rkisp1: set "*_data_tbl" fields in rkisp1_cif_isp_lsc_config as 2D arrays Currently the fields '*_data_tbl' in the struct 'rkisp1_cif_isp_lsc_config' are one dimensional arrays of size 290. The entries are accessed in a nested loop by summing two indexes for the rows and columns. Therefore it fits better to define the arrays as two dimensional arrays of size 17x17. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 47ad02d12e2f317987d651a794b11e732cacff02 Author: Dafna Hirschfeld Date: Tue Aug 18 10:18:01 2020 +0200 media: Documentation: v4l: move table of v4l2_pix_format(_mplane) flags to pixfmt-v4l2.rst The table of the flags of the structs v4l2_pix_format(_mplane) is currently in pixfmt-reserved.rst which is wrong, it should be in pixfmt-v4l2.rst Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3b7e44843f75ecf42866c953dac4c41ac9a1a9b9 Author: Dafna Hirschfeld Date: Thu Aug 6 12:34:17 2020 +0200 media: staging: rkisp1: improve documentation of rkisp1-common.h Add more detailed documentation of the structs and functions in rkisp1-common.h Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 047a8bd88cbab12ccf2ae3804a8cc33158a1f97c Author: Dafna Hirschfeld Date: Thu Aug 6 12:34:16 2020 +0200 media: staging: rkisp1: group declaration of similar functions together In file rkisp1-common.h, group declaration of register/unregister functions together and group other functions together to make the code easier to read. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8fcd8b35b15cf16fd014ac1e6f9a7ec5ddc85f77 Author: Dafna Hirschfeld Date: Thu Aug 6 12:34:15 2020 +0200 media: staging: rkisp1: remove declaration of unimplemented function 'rkisp1_params_isr_handler' The file rkisp1-common.h has a function declarion 'rkisp1_params_isr_handler' that is not implemented. Remove it. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1e76ae8e4db0aa8af47a47c00e1ccaa51eddd9ac Author: Dafna Hirschfeld Date: Thu Aug 6 12:34:14 2020 +0200 media: staging: rkisp1: unify (un)register functions to have the same parameters The different register/unregister functions receive different parameters. This patch unify them so they all receive just 'struct *rkisp1_device' as parameter. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f690abdc51add26de4bcaed01b72761496b41d96 Author: Dafna Hirschfeld Date: Thu Aug 6 12:34:13 2020 +0200 media: staging: rkisp1: don't define vaddr field in rkisp1_buffer as an array The field vaddr in rkisp1_buffer struct is used only by the rkisp1-stats and rkisp1-params entities and they both use only vaddr[0] so there is no need to define this field as an array. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a096ddb4772d8b5fd84eda6bc0fe72afffb923ec Author: Dafna Hirschfeld Date: Thu Aug 6 13:50:33 2020 +0200 media: staging: rkisp1: improve documentation in file rkisp1-config.h There is some missing documentation of structs and fields in rkisp1-config.h. This patch improves the documentation. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c0665297553272beba9342bb49e4687a5a2445d7 Author: Dafna Hirschfeld Date: Thu Aug 6 13:50:32 2020 +0200 media: staging: rkisp1: rename RKISP1_CIF_ISP_STAT_AFM_FIN to RKISP1_CIF_ISP_STAT_AFM The flag RKISP1_CIF_ISP_STAT_AFM_FIN indicates userspace that auto-focus measurements were collected. Therefore the suffix _FIN in the flag's name does not fit. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 14ba397f22f849936ef59690ff8b005f8f7f72e6 Author: Dafna Hirschfeld Date: Thu Aug 6 13:50:31 2020 +0200 media: staging: rkisp1: replace 3 fields 'ct_offset_*' with one array The struct rkisp1_cif_isp_ctk_config contains 3 fields ct_offset_{rgb}. Replace them with one array field 'ct_offset[3]. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a45a423a043e9b603f7fdc1faa775123fe1dc070 Author: Dafna Hirschfeld Date: Thu Aug 6 13:50:30 2020 +0200 media: staging: rkisp1: replace 9 coeff* fields with a 3x3 array The struct rkisp1_cif_isp_ctk_config has 9 fields 'coeff*' for the 3x3 color correction matrix. Replace these fields with one 3x3 array coeff[3][3] and document the field. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 084dd48166dda39b77828473a31a72b9fa28f468 Author: Sylwester Nawrocki Date: Mon Aug 10 17:32:40 2020 +0200 media: exynos4-is: Simplify the pinctrl code There is no need to request the "idle" pinctrl state in the driver as that is implemented in the driver core and the pinctrl_pm_* API can be used for switching between the default and the idle state. Simplify the pinctrl code to only request and check for the mandatory "default" pinctrl state. Switching between the default/idle pinctrl state is not yet implemented in the driver and this patch doesn't change that. Signed-off-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 00d21f325d58567d81d9172096692d0a9ea7f725 Author: Sylwester Nawrocki Date: Mon Aug 10 17:32:39 2020 +0200 media: Revert "media: exynos4-is: Add missed check for pinctrl_lookup_state()" The "idle" pinctrl state is optional as documented in the DT binding. The change introduced by the commit being reverted makes that pinctrl state mandatory and breaks initialization of the whole media driver, since the "idle" state is not specified in any mainline dts. This reverts commit 18ffec750578 ("media: exynos4-is: Add missed check for pinctrl_lookup_state()") to fix the regression. Fixes: 18ffec750578 ("media: exynos4-is: Add missed check for pinctrl_lookup_state()") Signed-off-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit daf2298bba554f6995a2113416858ff7a64b8a49 Author: Andrey Konovalov Date: Fri Aug 14 22:54:03 2020 +0200 media: camss: __video_try_fmt(): don't use hardcoded constants Use the definitions introduced by commit "media: camss: add support for vidioc_enum_framesizes ioctl" instead of the hardcoded values. Signed-off-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 35493d653a2d02e44d07757a2e86b5e63d8a87a8 Author: Andrey Konovalov Date: Fri Aug 14 22:54:02 2020 +0200 media: camss: add support for vidioc_enum_framesizes ioctl VIDIOC_ENUM_FRAMESIZES support in the video capture driver is required by libcamera. Without this change libcamera errors out with: "ERROR V4L2 v4l2_videodevice.cpp:1059 /dev/video0[cap]: Unable to enumerate frame sizes: Inappropriate ioctl for device" Signed-off-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c90f1178dcac30dee5ddd29ec0513e7589aa866e Author: Andrey Konovalov Date: Fri Aug 14 22:54:01 2020 +0200 media: camss: Make use of V4L2_CAP_IO_MC Implement mbus_code filtering for format enumeration. Without this patch libcamera errors out with: "ERROR V4L2 v4l2_videodevice.cpp:982 /dev/video0[cap]: Media bus code filtering not supported by the device" Signed-off-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f287e3ecb617b66f60b4e4641ee10054fffd00be Author: Niklas Söderlund Date: Thu Aug 13 23:06:02 2020 +0200 media: rcar-vin: Register media device when all sub-devices bound The media device is not usable by userspace before all devices involved in capture are present in the system. Move registering of the media device to the async complete callback. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f18d6a4cb0561c322e284ed404f2ec97b1092396 Author: Niklas Söderlund Date: Thu Aug 13 23:06:01 2020 +0200 media: rcar-vin: Unconditionally unregister notifier on remove If the VIN device is part of a group of VIN devices (all Gen3 boards) there is no reason to only unregister the group notifier if the VIN that registers the notifier is removed. The VIN that registers the notifier is always the last VIN device to be bound, so keeping the notifier around after any VIN is unbound creates an unbalanced state where no VIN in the group is operational. Fix this by unconditionally unregistering the notifier when any VIN device is unbound. Unregistering the notifier will lead to unbound() being called and all video devices exposed by any VIN instance to be removed. The lock was only needed to protect the check which VIN registers the notifier and is no longer needed. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 780d815dcc9b34d93ae69385a8465c38d423ff0f Author: Tom Rix Date: Mon Aug 10 21:25:18 2020 +0200 media: tw5864: check status of tw5864_frameinterval_get clang static analysis reports this problem tw5864-video.c:773:32: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage fintv->stepwise.max.numerator *= std_max_fps; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ stepwise.max is set with frameinterval, which comes from ret = tw5864_frameinterval_get(input, &frameinterval); fintv->stepwise.step = frameinterval; fintv->stepwise.min = frameinterval; fintv->stepwise.max = frameinterval; fintv->stepwise.max.numerator *= std_max_fps; When tw5864_frameinterval_get() fails, frameinterval is not set. So check the status and fix another similar problem. Signed-off-by: Tom Rix Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fe2b582429b76c3fc73596c58a4631c41c61697d Author: Ismael Luceno Date: Mon Aug 10 21:17:55 2020 +0200 media: MAINTAINERS: Remove broken bluecherry.net email Remove broken bluecherry.net email Signed-off-by: Ismael Luceno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c478c7f4cb940b63eb675d236588c6fda7adea08 Author: Frederic Chen Date: Thu Aug 6 17:58:22 2020 +0200 media: mc-device.c: change media_device_request_alloc to match media_ioctl_info We modified the type of media_device_request_alloc()'s second parameter from int* to void* so that it can match the interface defined in struct media_ioctl_info. [hverkuil: move #ifdef before variable to avoid compile warning] Signed-off-by: Frederic Chen Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 78d95c35f2a4ceaf207e82f66e4d678c1682ae6b Author: YueHaibing Date: Tue Aug 4 03:41:37 2020 +0200 media: staging: tegra-vde: Mark tegra_vde_runtime_suspend/resume as __maybe_unused If CONFIG_PM is not set, gcc warns: drivers/staging/media/tegra-vde/vde.c:916:12: warning: 'tegra_vde_runtime_suspend' defined but not used [-Wunused-function] Make it __maybe_unused to fix this. Signed-off-by: YueHaibing Reviewed-by: Dmitry Osipenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f3b60b066a5b9a478ac9d6d3e68b684f54a13d3f Author: Allen Pais Date: Mon Aug 17 10:31:53 2020 +0200 media: ttusb-dec: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b28f1bf82df2ee542bca8cb1aacf08d1378b843b Author: Allen Pais Date: Mon Aug 17 10:31:52 2020 +0200 media: media/radio: wl128x: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9db2f6a480021dd2b723efb542dd8a9aa037eb6c Author: Allen Pais Date: Mon Aug 17 10:31:51 2020 +0200 media: sti: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 32579c0cb363b9a0a2a225960425acc0357a3f9b Author: Allen Pais Date: Mon Aug 17 10:31:50 2020 +0200 media: pxa_camera: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 069e4cdb2f5f491bb92b50bd52651ee31189d216 Author: Allen Pais Date: Mon Aug 17 10:31:49 2020 +0200 media: marvell-ccic: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 30fc5a801e1dfc3b3ed8601a1cad0de00ee0ac6a Author: Allen Pais Date: Mon Aug 17 10:31:48 2020 +0200 media: tw5864: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 32e36ef692a2e2f07ce30c7dac0bd01c408cc17b Author: Allen Pais Date: Mon Aug 17 10:31:47 2020 +0200 media: ttpci: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0852d052e86890622de7ee5863a281c4b27674bf Author: Allen Pais Date: Mon Aug 17 10:31:46 2020 +0200 media: smipcie: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6027ff6ba111f376f9ecfa88f5c081f2e28e1a2f Author: Allen Pais Date: Mon Aug 17 10:31:45 2020 +0200 media: ngene: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4cf709c9aba062dd83909672e1c9a2c3b639ec80 Author: Allen Pais Date: Mon Aug 17 10:31:44 2020 +0200 media: mantis: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 143ca1d0553369bbadfc65083c9079516389f364 Author: Allen Pais Date: Mon Aug 17 10:31:43 2020 +0200 media: bt8xx: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 55cd34524aa37601a20cdb0f40c2047c57aa657b Author: Lubomir Rintel Date: Tue Aug 18 00:08:50 2020 +0200 media: marvell-ccic: add support for runtime PM On MMP3, the camera block lives on a separate power island. We want to turn it off if the CCIC is not in use to conserve power. Signed-off-by: Lubomir Rintel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9ac7400f49213ec107cc759bad5ab8a6f64684d6 Author: Lubomir Rintel Date: Tue Aug 18 00:08:49 2020 +0200 media: marvell-ccic: mmp: use generic dev_pm_ops This simplifies things a bit and makes adding runtime PM a bit more straightforward. Signed-off-by: Lubomir Rintel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9a8a45f81d3433fa9feeff5983e71a06b0fdc506 Author: Lubomir Rintel Date: Tue Aug 18 00:08:48 2020 +0200 media: marvell-ccic: mmp: get rid of mmpcam_devices list The sole reason for this was so that it would be possible to get a mmp_camera from a platform_device in suspend/resume/remove hooks, because drvdata used to be used by the v4l core. Since commit 95db3a60e065 ("[media] v4l: Add a media_device pointer to the v4l2_device structure") it is no longer case and thus we can make things a great deal simpler. Signed-off-by: Lubomir Rintel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 953e41153a16620f675eda6e7022fd5b3eb58fce Author: Lubomir Rintel Date: Tue Aug 18 00:08:47 2020 +0200 media: cafe-driver: use drvdata instead of back-casting from v4l2_device Since commit 95db3a60e065 ("[media] v4l: Add a media_device pointer to the v4l2_device structure") the v4l core doesn't insist on using drvdata itself. Therefore we can use it ourselves, making things somewhat simpler. Signed-off-by: Lubomir Rintel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 17621758e53f0e6bf1ac469cca2a59fa6457d205 Author: Fabio Estevam Date: Mon Aug 17 22:23:56 2020 +0200 media: fsl-viu: Do not redefine out_be32()/in_be32() for CONFIG_M68K The following W=1 build warning is seen on a m68k: drivers/media/platform/fsl-viu.c: At top level: drivers/media/platform/fsl-viu.c:36: warning: "out_be32" redefined 36 | #define out_be32(v, a) iowrite32be(a, (void __iomem *)v) | In file included from ./arch/m68k/include/asm/io_mm.h:25, from ./arch/m68k/include/asm/io.h:8, from ./include/linux/io.h:13, from ./include/linux/irq.h:20, from ./include/asm-generic/hardirq.h:13, from ./arch/m68k/include/generated/asm/hardirq.h:1, from ./include/linux/hardirq.h:9, from ./include/linux/interrupt.h:11, from drivers/media/platform/fsl-viu.c:17: ./arch/m68k/include/asm/raw_io.h:32: note: this is the location of the previous definition 32 | #define out_be32(addr,l) (void)((*(__force volatile u32 *) (addr)) = (l)) Avoid the out_be32() and in_be32() redefinitions when building for CONFIG_M68K in the same way we currently do for CONFIG_PPC and CONFIG_MICROBLAZE. Reported-by: kernel test robot Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fd1a97a23f9a4583120a603637d16f98503ec282 Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:47 2020 +0200 media: mtk-vcodec: vdec_vp9_if.c: fix comparison to bool Fix the following coccinelle report: drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c:963:6-31: WARNING: Comparison to bool Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7f988187045f05df508471578039c3bb8840d10f Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:45 2020 +0200 media: pci: cobalt-i2c.c: fix comparison of 0/1 to bool variable Fix the following coccinelle reports: drivers/media/pci/cobalt/cobalt-i2c.c:176:16-21: WARNING: Comparison of 0/1 to bool variable drivers/media/pci/cobalt/cobalt-i2c.c:180:29-33: WARNING: Comparison of 0/1 to bool variable drivers/media/pci/cobalt/cobalt-i2c.c:121:16-21: WARNING: Comparison of 0/1 to bool variable drivers/media/pci/cobalt/cobalt-i2c.c:125:29-33: WARNING: Comparison of 0/1 to bool variable Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 08091fc1780e2f785caf905d1029cea707513037 Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:44 2020 +0200 media: i2c: tda1997x.c: Fix assignment of 0/1 to bool variable Fix the following coccinelle reports: drivers/media/i2c/tda1997x.c:911:6-21: WARNING: Assignment of 0/1 to bool variable drivers/media/i2c/tda1997x.c:939:2-17: WARNING: Assignment of 0/1 to bool variable drivers/media/i2c/tda1997x.c:947:4-19: WARNING: Assignment of 0/1 to bool variable Replace assignment to 1 with true and assignment to 0 with false. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c90b4d70b1746f5a46fb7bad988731e604a44d4e Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:43 2020 +0200 media: i2c: imx219.c: fix assignment of 0/1 to bool variable Fix the following coccinelle report: drivers/media/i2c/imx219.c:1191:1-18: WARNING: Assignment of 0/1 to bool variable Replace the assignment to 0 with false instead. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 77efe8aeafeaca4d4c5dc3c0e3c88e3e2ae50274 Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:42 2020 +0200 media: pci: cx23855-video.c: remove duplicate argument in 'or' Fix the following coccinelle report: drivers/media/pci/cx23885/cx23885-video.c:639:24-44: duplicated argument to & or | V4L2_CAP_VBI_CAPTURE appears twice, remove it. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ef4349ebab1d68815805ce883f62ab833b5202d9 Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:40 2020 +0200 media: dvb-frontends: mb86a16.c: remove useless if/else Fix the following coccinelle report: drivers/media/dvb-frontends/mb86a16.c:1455:6-8: WARNING: possible condition with no effect (if == else) Both branches are the same, so remove the if/else altogether. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e1f8807a5debe0a32ce7042839182caa92c1ec65 Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:39 2020 +0200 media: usb: dib0700_devices.c: remove useless if/else Fix the following coccinelle report: drivers/media/usb/dvb-usb/dib0700_devices.c:1741:1-3: WARNING: possible condition with no effect (if == else) Both branches are the same, so remove the if/else altogether. Found using - Coccinelle (http://coccinelle.lip6.fr) [hverkuil: fix checkpatch warnings] Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 56149c8cd820308c0e2391bcf23203059658cc2c Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:38 2020 +0200 media: pci: saa7164-core.c: replace if (cond) BUG() with BUG_ON() Fix the following coccinelle reports: drivers/media/pci/saa7164/saa7164-core.c:579:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. drivers/media/pci/saa7164/saa7164-core.c:592:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG. drivers/media/pci/saa7164/saa7164-core.c:898:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d8018ec175106fd10458255b0c6244b9a6b7103b Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:37 2020 +0200 media: pci: saa7164-vbi.c: replace if (cond) BUG() with BUG_ON() Fix the following coccinelle reports: drivers/media/pci/saa7164/saa7164-vbi.c:707:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. drivers/media/pci/saa7164/saa7164-vbi.c:760:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a1bb5cca58f480667100b1008ebdea971f1aaef8 Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:36 2020 +0200 media: pci: saa7164-dvb.c: replace if(cond) BUG() with BUG_ON() Fix the following coccinelle reports: drivers/media/pci/saa7164/saa7164-dvb.c:341:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG drivers/media/pci/saa7164/saa7164-dvb.c:483:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2ad5e2e463e738d2cd5d78547e0f31694e9de932 Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:35 2020 +0200 media: pci: saa7164.c: Replace if(cond) BUG with BUG_ON Fix the following coccinelle reports: drivers/media/pci/saa7164/saa7164-buffer.c:254:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG. drivers/media/pci/saa7164/saa7164-buffer.c:261:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 333b90fb42f0debe613c48f2f8d307f1c805e43b Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:34 2020 +0200 media: vicodec: vicodec-core.c: fix assignment of 0/1 to bool variable Fix the following coccinelle reports: drivers/media/test-drivers/vicodec/vicodec-core.c:1674:2-21: WARNING: Assignment of 0/1 to bool variable drivers/media/test-drivers/vicodec/vicodec-core.c:1675:2-26: WARNING: Assignment of 0/1 to bool variable By replacing the assignment to 0 with 'false' instead. Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 10e639041e003eadd2309bd332c03f83cbcdf0ca Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:33 2020 +0200 media: mtk-vcodec: mtk_vcodec_dec.c: fix comparison to bool Fix the following coccinelle reports: drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:197:14-35: WARNING: Comparison to bool drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:198:7-29: WARNING: Comparison to bool drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:451:12-19: WARNING: Comparison to bool drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:1159:6-15: WARNING: Comparison to bool By replacing (cond == true) with (cond) and (cond == false) with (!cond) Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 52cdded09b861182bb5033bf9d308cb6fcd4d49f Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:32 2020 +0200 media: cobalt: cobalt-omnitek.c: fix comparison to bool Fix the following coccinelle report: drivers/media/pci/cobalt/cobalt-omnitek.c:119:5-19: WARNING: Comparison to bool By using "!cond" instead of "cond == false" Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 97c6a99bd5c26a8cbae1c68f26af62991380ede3 Author: Daniel W. S. Almeida Date: Fri Aug 7 10:35:28 2020 +0200 media: sunxi: sun8i-rotate.c: remove useless error message This fixes the following coccinelle report: drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c:751:2-9: line 751 is redundant because platform_get_irq() already prints an error By removing the useless call to dev_err() Found using - Coccinelle (http://coccinelle.lip6.fr) Signed-off-by: Daniel W. S. Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2034c2129bc4a91d471815d4dc7a2a69eaa5338d Author: Nathan Chancellor Date: Fri Aug 28 13:28:30 2020 -0700 drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state Clang warns: drivers/gpu/drm/i915/display/intel_combo_phy.c:268:3: warning: variable 'ret' is uninitialized when used here [-Wuninitialized] ret &= check_phy_reg(dev_priv, phy, ICL_PORT_TX_DW8_LN0(phy), ^~~ drivers/gpu/drm/i915/display/intel_combo_phy.c:261:10: note: initialize the variable 'ret' to silence this warning bool ret; ^ = 0 1 warning generated. In practice, the bug this warning appears to be concerned with would not actually matter because ret gets initialized to the return value of cnl_verify_procmon_ref_values. However, that does appear to be a bug since it means the first hunk of the patch this fixes won't actually do anything (since the values of check_phy_reg won't factor into the final ret value). Initialize ret to true then make all of the assignments a bitwise AND with itself so that the function always does what it should do. Fixes: 239bef676d8e ("drm/i915/display: Implement new combo phy initialization step") Link: https://github.com/ClangBuiltLinux/linux/issues/1094 Signed-off-by: Nathan Chancellor Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200828202830.7165-1-jose.souza@intel.com Signed-off-by: José Roberto de Souza commit 10496f261ed30592c6a7f8315f6b5ec055db624a Merge: d557ea39a5f89 e68a144547fc7 Author: Daniel Borkmann Date: Fri Aug 28 21:20:33 2020 +0200 Merge branch 'bpf-sleepable' Alexei Starovoitov says: ==================== v2->v3: - switched to minimal allowlist approach. Essentially that means that syscall entry, few btrfs allow_error_inject functions, should_fail_bio(), and two LSM hooks: file_mprotect and bprm_committed_creds are the only hooks that allow attaching of sleepable BPF programs. When comprehensive analysis of LSM hooks will be done this allowlist will be extended. - added patch 1 that fixes prototypes of two mm functions to reliably work with error injection. It's also necessary for resolve_btfids tool to recognize these two funcs, but that's secondary. v1->v2: - split fmod_ret fix into separate patch - added denylist v1: This patch set introduces the minimal viable support for sleepable bpf programs. In this patch only fentry/fexit/fmod_ret and lsm progs can be sleepable. Only array and pre-allocated hash and lru maps allowed. Here is 'perf report' difference of sleepable vs non-sleepable: 3.86% bench [k] __srcu_read_unlock 3.22% bench [k] __srcu_read_lock 0.92% bench [k] bpf_prog_740d4210cdcd99a3_bench_trigger_fentry_sleep 0.50% bench [k] bpf_trampoline_10297 0.26% bench [k] __bpf_prog_exit_sleepable 0.21% bench [k] __bpf_prog_enter_sleepable vs 0.88% bench [k] bpf_prog_740d4210cdcd99a3_bench_trigger_fentry 0.84% bench [k] bpf_trampoline_10297 0.13% bench [k] __bpf_prog_enter 0.12% bench [k] __bpf_prog_exit vs 0.79% bench [k] bpf_prog_740d4210cdcd99a3_bench_trigger_fentry_sleep 0.72% bench [k] bpf_trampoline_10381 0.31% bench [k] __bpf_prog_exit_sleepable 0.29% bench [k] __bpf_prog_enter_sleepable Sleepable vs non-sleepable program invocation overhead is only marginally higher due to rcu_trace. srcu approach is much slower. ==================== Signed-off-by: Daniel Borkmann commit e68a144547fc7a956952260539cb7b8bb9afbcc0 Author: Alexei Starovoitov Date: Thu Aug 27 15:01:14 2020 -0700 selftests/bpf: Add sleepable tests Modify few tests to sanity test sleepable bpf functionality. Running 'bench trig-fentry-sleep' vs 'bench trig-fentry' and 'perf report': sleepable with SRCU: 3.86% bench [k] __srcu_read_unlock 3.22% bench [k] __srcu_read_lock 0.92% bench [k] bpf_prog_740d4210cdcd99a3_bench_trigger_fentry_sleep 0.50% bench [k] bpf_trampoline_10297 0.26% bench [k] __bpf_prog_exit_sleepable 0.21% bench [k] __bpf_prog_enter_sleepable sleepable with RCU_TRACE: 0.79% bench [k] bpf_prog_740d4210cdcd99a3_bench_trigger_fentry_sleep 0.72% bench [k] bpf_trampoline_10381 0.31% bench [k] __bpf_prog_exit_sleepable 0.29% bench [k] __bpf_prog_enter_sleepable non-sleepable with RCU: 0.88% bench [k] bpf_prog_740d4210cdcd99a3_bench_trigger_fentry 0.84% bench [k] bpf_trampoline_10297 0.13% bench [k] __bpf_prog_enter 0.12% bench [k] __bpf_prog_exit Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20200827220114.69225-6-alexei.starovoitov@gmail.com commit 2b288740a1072235166b2706e139f2725b5ea26f Author: Alexei Starovoitov Date: Thu Aug 27 15:01:13 2020 -0700 libbpf: Support sleepable progs Pass request to load program as sleepable via ".s" suffix in the section name. If it happens in the future that all map types and helpers are allowed with BPF_F_SLEEPABLE flag "fmod_ret/" and "lsm/" can be aliased to "fmod_ret.s/" and "lsm.s/" to make all lsm and fmod_ret programs sleepable by default. The fentry and fexit programs would always need to have sleepable vs non-sleepable distinction, since not all fentry/fexit progs will be attached to sleepable kernel functions. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: KP Singh Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200827220114.69225-5-alexei.starovoitov@gmail.com commit 07be4c4a3e7a0db148e44b16c5190e753d1c8569 Author: Alexei Starovoitov Date: Thu Aug 27 15:01:12 2020 -0700 bpf: Add bpf_copy_from_user() helper. Sleepable BPF programs can now use copy_from_user() to access user memory. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20200827220114.69225-4-alexei.starovoitov@gmail.com commit 1e6c62a8821557720a9b2ea9617359b264f2f67c Author: Alexei Starovoitov Date: Thu Aug 27 15:01:11 2020 -0700 bpf: Introduce sleepable BPF programs Introduce sleepable BPF programs that can request such property for themselves via BPF_F_SLEEPABLE flag at program load time. In such case they will be able to use helpers like bpf_copy_from_user() that might sleep. At present only fentry/fexit/fmod_ret and lsm programs can request to be sleepable and only when they are attached to kernel functions that are known to allow sleeping. The non-sleepable programs are relying on implicit rcu_read_lock() and migrate_disable() to protect life time of programs, maps that they use and per-cpu kernel structures used to pass info between bpf programs and the kernel. The sleepable programs cannot be enclosed into rcu_read_lock(). migrate_disable() maps to preempt_disable() in non-RT kernels, so the progs should not be enclosed in migrate_disable() as well. Therefore rcu_read_lock_trace is used to protect the life time of sleepable progs. There are many networking and tracing program types. In many cases the 'struct bpf_prog *' pointer itself is rcu protected within some other kernel data structure and the kernel code is using rcu_dereference() to load that program pointer and call BPF_PROG_RUN() on it. All these cases are not touched. Instead sleepable bpf programs are allowed with bpf trampoline only. The program pointers are hard-coded into generated assembly of bpf trampoline and synchronize_rcu_tasks_trace() is used to protect the life time of the program. The same trampoline can hold both sleepable and non-sleepable progs. When rcu_read_lock_trace is held it means that some sleepable bpf program is running from bpf trampoline. Those programs can use bpf arrays and preallocated hash/lru maps. These map types are waiting on programs to complete via synchronize_rcu_tasks_trace(); Updates to trampoline now has to do synchronize_rcu_tasks_trace() and synchronize_rcu_tasks() to wait for sleepable progs to finish and for trampoline assembly to finish. This is the first step of introducing sleepable progs. Eventually dynamically allocated hash maps can be allowed and networking program types can become sleepable too. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Reviewed-by: Josef Bacik Acked-by: Andrii Nakryiko Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20200827220114.69225-3-alexei.starovoitov@gmail.com commit 76cd61739fd107a7f7ec4c24a045e98d8ee150f0 Author: Alexei Starovoitov Date: Thu Aug 27 15:01:10 2020 -0700 mm/error_inject: Fix allow_error_inject function signatures. 'static' and 'static noinline' function attributes make no guarantees that gcc/clang won't optimize them. The compiler may decide to inline 'static' function and in such case ALLOW_ERROR_INJECT becomes meaningless. The compiler could have inlined __add_to_page_cache_locked() in one callsite and didn't inline in another. In such case injecting errors into it would cause unpredictable behavior. It's worse with 'static noinline' which won't be inlined, but it still can be optimized. Like the compiler may decide to remove one argument or constant propagate the value depending on the callsite. To avoid such issues make sure that these functions are global noinline. Fixes: af3b854492f3 ("mm/page_alloc.c: allow error injection") Fixes: cfcbfb1382db ("mm/filemap.c: enable error injection at add_to_page_cache()") Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Reviewed-by: Josef Bacik Link: https://lore.kernel.org/bpf/20200827220114.69225-2-alexei.starovoitov@gmail.com commit 805a6ef8ac28579a6fb2d8e6505c100bc9bf5395 Author: Krzysztof Kozlowski Date: Thu Aug 27 22:08:27 2020 +0200 gpio: zynq: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Michal Simek Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 308a028d079caf6e805f28cfc385334e6ce90ea5 Author: Krzysztof Kozlowski Date: Thu Aug 27 22:08:26 2020 +0200 gpio: pisosr: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit ca6a77eb34e5c8cb7f2f232196301e6581d599df Author: Krzysztof Kozlowski Date: Thu Aug 27 22:08:25 2020 +0200 gpio: pca953x: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 4e7ed69685a5aec9974ce37c9eff260a9f945861 Author: Krzysztof Kozlowski Date: Thu Aug 27 22:08:24 2020 +0200 gpio: omap: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Acked-by: Grygorii Strashko Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 33b78b5f14be088f7dd33e10311a932f1b009c14 Author: Krzysztof Kozlowski Date: Thu Aug 27 22:08:23 2020 +0200 gpio: davinci: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit cff9d73f3d6a9f7ac41351c93b2969b7d3695821 Author: Krzysztof Kozlowski Date: Thu Aug 27 22:08:22 2020 +0200 gpio: bcm-kona: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Acked-by: Florian Fainelli Signed-off-by: Bartosz Golaszewski commit e230ac11182b3d9f8448498e925e479bcd1e79f7 Author: Nirmoy Das Date: Thu Aug 27 17:50:36 2020 +0200 drm/amdgpu: fix compiler warnings Fixes below compiler warnings: CC [M] drivers/gpu/drm/amd/amdgpu/amdgpu_device.o drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:381:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] 381 | void static inline amdgpu_mm_wreg_mmio(struct amdgpu_device *adev, uint32_t reg, uint32_t v, uint32_t acc_flags) | ^~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:381:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration] drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function ‘amdgpu_device_fini’: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3381:6: warning: variable ‘r’ set but not used [-Wunused-but-set-variable] 3381 | int r; | ^ Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f5143e10a2e41f70ed6b1f3bbd8119ede5240c80 Author: YueHaibing Date: Thu Aug 27 22:08:13 2020 +0800 netfilter: xt_HMARK: Use ip_is_fragment() helper Use ip_is_fragment() to simpify code. Signed-off-by: YueHaibing Signed-off-by: Pablo Neira Ayuso commit ff73e7479b8eea594a985ca29f4b45d604dbcb2c Author: Florian Westphal Date: Wed Aug 26 00:52:45 2020 +0200 netfilter: conntrack: remove unneeded nf_ct_put We can delay refcount increment until we reassign the existing entry to the current skb. A 0 refcount can't happen while the nf_conn object is still in the hash table and parallel mutations are impossible because we hold the bucket lock. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit bc92470413f3af152db0d8f90ef3eb13f8cc417a Author: Florian Westphal Date: Wed Aug 26 00:52:44 2020 +0200 netfilter: conntrack: add clash resolution stat counter There is a misconception about what "insert_failed" means. We increment this even when a clash got resolved, so it might not indicate a problem. Add a dedicated counter for clash resolution and only increment insert_failed if a clash cannot be resolved. For the old /proc interface, export this in place of an older stat that got removed a while back. For ctnetlink, export this with a new attribute. Also correct an outdated comment that implies we add a duplicate tuple -- we only add the (unique) reply direction. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 4afc41dfa5a716e9e7a90c22972583f337c0bcbf Author: Florian Westphal Date: Wed Aug 26 00:52:43 2020 +0200 netfilter: conntrack: remove ignore stats This counter increments when nf_conntrack_in sees a packet that already has a conntrack attached or when the packet is marked as UNTRACKED. Neither is an error. The former is normal for loopback traffic. The second happens for certain ICMPv6 packets or when nftables/ip(6)tables rules are in place. In case someone needs to count UNTRACKED packets, or packets that are marked as untracked before conntrack_in this can be done with both nftables and ip(6)tables rules. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit b1328e54ac5e5998b9f7d5735029f7e64e61b488 Author: Florian Westphal Date: Wed Aug 26 00:52:42 2020 +0200 netfilter: conntrack: do not increment two error counters at same time The /proc interface for nf_conntrack displays the "error" counter as "icmp_error". It makes sense to not increment "invalid" when failing to handle an icmp packet since those are special. For example, its possible for conntrack to see partial and/or fragmented packets inside icmp errors. This should be a separate event and not get mixed with the "invalid" counter. Likewise, remove the "error" increment for errors from get_l4proto(). After this, the error counter will only increment for errors coming from icmp(v6) packet handling. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 3baea2697b6817d53ece9682f50916db891dfc2c Author: José Roberto de Souza Date: Wed Aug 26 13:15:49 2020 -0700 drm/i915/ehl: Update voltage swing table Update with latest tuning in the table. v3: Fix values of to last columns. BSpec: 21257 Cc: Matt Roper Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200826201549.83658-3-jose.souza@intel.com commit 2a498ab49256eafd2bba1f19b7fe22ce5d880a44 Author: José Roberto de Souza Date: Wed Aug 26 13:15:48 2020 -0700 drm/i915/display/ehl: Use EHL DP tables for eDP ports without low power support Reusing icl_get_combo_buf_trans() for eDP was causing the wrong table being used when the eDP port don't support low power voltage swing table. v2: Only use icl_combo_phy_ddi_translations_edp_hbr3 if low_vswing is set as EHL combo phy supports HBR3 (Matt R) Reviewed-by: Matt Roper Cc: Lee Shawn C Cc: Khaled Almahallawy Cc: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200826201549.83658-2-jose.souza@intel.com commit a8c90bc11990168b76ecd0546821a90fa353098a Author: José Roberto de Souza Date: Wed Aug 26 13:15:47 2020 -0700 drm/i915/display/tgl: Use TGL DP tables for eDP ports without low power support Reusing icl_get_combo_buf_trans() for eDP was causing the wrong table being used when the eDP port don't support low power voltage swing table. Reviewed-by: Matt Roper Cc: Lee Shawn C Cc: Khaled Almahallawy Cc: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200826201549.83658-1-jose.souza@intel.com commit c33298cb34f555592a030ab828c78c1c3046aa3c Author: José Roberto de Souza Date: Thu Aug 27 16:39:43 2020 -0700 drm/i915/tgl: Fix stepping WA matching TGL made stepping a litte mess, workarounds refer to the stepping of the IP(GT or Display) not of the GPU stepping so it would already require the same solution as used in commit 96c5a15f9f39 ("drm/i915/kbl: Fix revision ID checks"). But to make things even more messy it have a different IP stepping mapping between SKUs and the same stepping revision of GT do not match the same HW between TGL U/Y and regular TGL. So it was required to have 2 different macros to check GT WAs while for Display we are able to use just one macro that uses the right revids table. All TGL workarounds checked and updated accordingly. v2: - removed TODO to check if WA 14010919138 applies to regular TGL. - fixed display stepping in regular TGL (Anusha) BSpec: 52890 BSpec: 55378 BSpec: 44455 Reviewed-by: Anusha Srivatsa Cc: Anusha Srivatsa Cc: Penne Lee Cc: Guangyao Bai Cc: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200827233943.400946-1-jose.souza@intel.com commit d8483f31487c8c8f87fec59c5ee106dd213b177a Author: Jonathan Bakker Date: Thu May 14 16:04:35 2020 -0700 dt-bindings: power: supply: Cleanup charger-manager bindings The bindings for charger-manager were very unclear and didn't specify allowable values in many cases. Clean these up to show what each value does and make sure all properties are documented here rather than using wildcards. Signed-off-by: Jonathan Bakker Acked-by: Rob Herring Signed-off-by: Sebastian Reichel commit 683aa86eb16ab8cf91075654d08ef7409f160e35 Author: Jonathan Bakker Date: Thu May 14 16:04:34 2020 -0700 power: supply: charger-manager: Count cm-chargers property directly Rather than having a cm-chargers and a separate cm-num-chargers property, simply count the entries in cm-chargers. Signed-off-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit c1f73028f75df43689feda4bc70573b7d18a618e Author: Jonathan Bakker Date: Thu May 14 16:04:33 2020 -0700 power: supply: charger-manager: Update extcon functions In commit 830ae442202e ("extcon: Remove the deprecated extcon functions") the function extcon_register_interest became a no-op returning an error, leading to non-functional behaviour in charger-manager. Additionally, a translation table is needed between the text representation of the extcon cable names and their IDs is needed. In order to retain DT compatibility, TA and CHARGE-DOWNSTREAM are added as they were present up until commit 11eecf910bd8 ("extcon: Modify the id and name of external connector") Signed-off-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit 9434e4530d4690d3c5c869b4528364d7636108b3 Author: Jonghwa Lee Date: Thu May 14 16:04:32 2020 -0700 power: supply: charger-manager: Don't start charging in cable nofitication Prevents direct charging control in cable notification and only set the input current limit according to cable type. Leave the enabling of charing to cm_monitor() where charging management proceeds. We may lose a few ms to enable charging compared to before, but it's more important that charging is enabled always in safe context. Signed-off-by: Jonghwa Lee Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit e132fc6bb89bd307cfcdb8ba24afcd1985261485 Author: Jonghwa Lee Date: Thu May 14 16:04:31 2020 -0700 power: supply: charger-manager: Make decisions focussed on battery status cm_monitor(), where charging management starts, checks various charging condition sequentially to decide next charging operation. However, as it follows sequential process, cascaded if statements, it does some jobs which have already done in the previous stage. This results in a delay in decision making. Moreover, starting point of charging is spread all around which makes maintain code and debugging difficult. Both of the problems mentioned above become clean if it manages battery charging focusing on battery status not following sequential condition checking. Now, cm_monitor() moves battery state diagram and does the optimal operation for current state. As a result, it reduces whole monitoring time almost in half. Signed-off-by: Jonghwa Lee Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit dfc63825aa15daa1d335e2291741949fd001b782 Author: Jonghwa Lee Date: Thu May 14 16:04:30 2020 -0700 power: supply: charger-manager: Collect all power_supply_changed() calls Current charger-manager calls power_supply_changed() whenever charging status is changed. Remove the separated power_supply_changed() calls and let it be called at end of try_charger_enable() function which is called to set charging/discharging. Signed-off-by: Jonghwa Lee Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit 7a81575b806e5dab214025e6757362c62d946405 Author: Jose M. Guisado Gomez Date: Thu Aug 20 10:19:01 2020 +0200 netfilter: nf_tables: add userdata attributes to nft_table Enables storing userdata for nft_table. Field udata points to user data and udlen store its length. Adds new attribute flag NFTA_TABLE_USERDATA Signed-off-by: Jose M. Guisado Gomez Signed-off-by: Pablo Neira Ayuso commit c5a8a8498eed1c164afc94f50a939c1a10abf8ad Author: Peilin Ye Date: Tue Aug 11 03:46:40 2020 -0400 ipvs: Fix uninit-value in do_ip_vs_set_ctl() do_ip_vs_set_ctl() is referencing uninitialized stack value when `len` is zero. Fix it. Reported-by: syzbot+23b5f9e7caf61d9a3898@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=46ebfb92a8a812621a001ef04d90dfa459520fe2 Suggested-by: Julian Anastasov Signed-off-by: Peilin Ye Acked-by: Julian Anastasov Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit d5608a0578a07766a97c00904d85f6a7221ddb37 Author: Michael Zhou Date: Fri Aug 7 01:15:25 2020 +1000 netfilter: ip6t_NPT: rewrite addresses in ICMPv6 original packet Detect and rewrite a prefix embedded in an ICMPv6 original packet that was rewritten by a corresponding DNPT/SNPT rule so it will be recognised by the host that sent the original packet. Example Rules in effect on the 1:2:3:4::/64 + 5:6:7:8::/64 side router: * SNPT src-pfx 1:2:3:4::/64 dst-pfx 5:6:7:8::/64 * DNPT src-pfx 5:6:7:8::/64 dst-pfx 1:2:3:4::/64 No rules on the 9:a:b:c::/64 side. 1. 1:2:3:4::1 sends UDP packet to 9:a:b:c::1 2. Router applies SNPT changing src to 5:6:7:8::ffef::1 3. 9:a:b:c::1 receives packet with (src 5:6:7:8::ffef::1 dst 9:a:b:c::1) and replies with ICMPv6 port unreachable to 5:6:7:8::ffef::1, including original packet (src 5:6:7:8::ffef::1 dst 9:a:b:c::1) 4. Router forwards ICMPv6 packet with (src 9:a:b:c::1 dst 5:6:7:8::ffef::1) including original packet (src 5:6:7:8::ffef::1 dst 9:a:b:c::1) and applies DNPT changing dst to 1:2:3:4::1 5. 1:2:3:4::1 receives ICMPv6 packet with (src 9:a:b:c::1 dst 1:2:3:4::1) including original packet (src 5:6:7:8::ffef::1 dst 9:a:b:c::1). It doesn't recognise the original packet as the src doesn't match anything it originally sent With this change, at step 4, DNPT will also rewrite the original packet src to 1:2:3:4::1, so at step 5, 1:2:3:4::1 will recognise the ICMPv6 error and provide feedback to the application properly. Conversely, SNPT will help when ICMPv6 errors are sent from the translated network. 1. 9:a:b:c::1 sends UDP packet to 5:6:7:8::ffef::1 2. Router applies DNPT changing dst to 1:2:3:4::1 3. 1:2:3:4::1 receives packet with (src 9:a:b:c::1 dst 1:2:3:4::1) and replies with ICMPv6 port unreachable to 9:a:b:c::1 including original packet (src 9:a:b:c::1 dst 1:2:3:4::1) 4. Router forwards ICMPv6 packet with (src 1:2:3:4::1 dst 9:a:b:c::1) including original packet (src 9:a:b:c::1 dst 1:2:3:4::1) and applies SNPT changing src to 5:6:7:8::ffef::1 5. 9:a:b:c::1 receives ICMPv6 packet with (src 5:6:7:8::ffef::1 dst 9:a:b:c::1) including original packet (src 9:a:b:c::1 dst 1:2:3:4::1). It doesn't recognise the original packet as the dst doesn't match anything it already sent The change to SNPT means the ICMPv6 original packet dst will be rewritten to 5:6:7:8::ffef::1 in step 4, allowing the error to be properly recognised in step 5. Signed-off-by: Michael Zhou Signed-off-by: Pablo Neira Ayuso commit 0a9e0f94bfcfbaf0bd124fa7af7b281bbda3bcca Author: Jonghwa Lee Date: Thu May 14 16:04:29 2020 -0700 power: supply: charger-manager: Correct usage of CHARGE_NOW/FULL The POWER_SUPPLY_CHARGE_NOW/FULL property reflects battery's charges in uAh unit, but charger-manager has been used it wrongly as a status field. Signed-off-by: Jonghwa Lee Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit cdaeb15157cd3be32fcf05c668a70c8f7e009d5e Author: Jonathan Bakker Date: Thu May 14 16:04:28 2020 -0700 power: supply: charger-manager: Always use POWER_SUPPLY_PROP_TEMP We were using POWER_SUPPLY_PROP_TEMP if the temperature was coming via the fuel gauge and POWER_SUPPLY_PROP_TEMP_AMBIENT if it was coming via the thermal framework. Since they're mutually exclusive in the driver and we don't know if the thermal framework is ambient or not, unify them both to use POWER_SUPPLY_PROP_TEMP. Signed-off-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit 9584051f3cf3af181e577960956bb7c085879b67 Author: Jonghwa Lee Date: Thu May 14 16:04:27 2020 -0700 power: supply: charger-manager: Remove cm_notify_event function cm_notify_event() was introduced to get an event associated with the battery status externally (ie in board files), but no one ever used it. Moreover it makes charger manager driver more complicated. Drop the function and all data related to it to simplify the driver. Signed-off-by: Jonghwa Lee Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit 033dea165c8aa4a64217b050bb7cdd551aa286fc Author: Jonghwa Lee Date: Thu May 14 16:04:26 2020 -0700 power: supply: charger-manager: Swap private uevent for power_supply_changed Whenever the battery status is changed, charger manager triggers a uevent through a private interface. Modify it to use power_supply_changed() since it belongs to the power supply subsystem. Signed-off-by: Jonghwa Lee Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit ddbc9712f3ac5613225fd888d96a44d62f24463b Author: Lad Prabhakar Date: Fri Aug 28 08:30:24 2020 +0100 dt-bindings: gpio: renesas, rcar-gpio: Add r8a774e1 support Document Renesas RZ/G2H (R8A774E1) GPIO blocks compatibility within the relevant dt-bindings. R8A774E1 GPIO module is identical to R-Car Gen3 family. No driver change is needed due to the fallback compatible value "renesas,rcar-gen3-gpio". Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit 0f091e43310f5c292b7094f9f115e651358e8053 Author: Alex Dewar Date: Fri Aug 28 14:55:23 2020 +0100 netlabel: remove unused param from audit_log_format() Commit d3b990b7f327 ("netlabel: fix problems with mapping removal") added a check to return an error if ret_val != 0, before ret_val is later used in a log message. Now it will unconditionally print "... res=1". So just drop the check. Addresses-Coverity: ("Dead code") Fixes: d3b990b7f327 ("netlabel: fix problems with mapping removal") Signed-off-by: Alex Dewar Acked-by: Paul Moore Signed-off-by: David S. Miller commit 1426dffad0dd64af9b1fee810171feb485f9c2b2 Author: Andreas Kemnade Date: Fri Aug 28 13:49:06 2020 +0200 power: supply: Add support for RN5T618/RC5T619 charger and fuel gauge Both chips have charger and a fuel gauge. This adds basic support for displaying the state of the battery and the input power, settings are not modified. There are some defaults set via OTP. Charging also starts after plugging USB. Known issues of the fuel gauge: There are drivers in the wild which disable the fuel gauge at shutdown. If a kernel is booted without fuel gauge support, after such a driver has been used, the fuel gauge will stay off and decalibrate. If this driver is used after that, it might display wrong values for charge level. Signed-off-by: Andreas Kemnade Signed-off-by: Sebastian Reichel commit 395a7251dc2bf5eed2aab6960720a270b364871e Author: Ikjoon Jang Date: Fri Aug 28 12:36:26 2020 +0800 power: supply: sbs-battery: don't assume i2c errors as battery disconnect Current sbs-battery considers all smbus errors as disconnection events when battery-detect pin isn't supplied, and restored to present state back when any successful transaction is made. This can lead to unwanted state changes between present and !present when there's one i2c error and other following commands were successful. This patch provides a unified way of checking presence by calling sbs_get_battery_presence_and_health() when detect pin is not used. Signed-off-by: Ikjoon Jang Signed-off-by: Sebastian Reichel commit e9d4709fcc26353df12070566970f080e651f0c9 Author: Jan Kara Date: Wed Mar 4 14:01:44 2020 +0100 reiserfs: Fix memory leak in reiserfs_parse_options() When a usrjquota or grpjquota mount option is used multiple times, we will leak memory allocated for the file name. Make sure the last setting is used and all the previous ones are properly freed. Reported-by: syzbot+c9e294bbe0333a6b7640@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit f3fb15b93aa992fdda5cf5351aaefc4a58342a2c Merge: 161e31066757a 6f7d6f0fd7a36 Author: David S. Miller Date: Fri Aug 28 08:01:30 2020 -0700 Merge branch 'ionic-memory-usage-rework' Shannon Nelson says: ==================== ionic memory usage rework Previous review comments have suggested [1],[2] that this driver needs to rework how queue resources are managed and reconfigured so that we don't do a full driver reset and to better handle potential allocation failures. This patchset is intended to address those comments. The first few patches clean some general issues and simplify some of the memory structures. The last 4 patches specifically address queue parameter changes without a full ionic_stop()/ionic_open(). [1] https://lore.kernel.org/netdev/20200706103305.182bd727@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/ [2] https://lore.kernel.org/netdev/20200724.194417.2151242753657227232.davem@davemloft.net/ v3: use PTR_ALIGN without typecast fix up Neel's attribution v2: use PTR_ALIGN recovery if netif_set_real_num_tx/rx_queues fails less racy queue bring up after reconfig common-ize the reconfig queue stop and start ==================== Signed-off-by: David S. Miller commit 6f7d6f0fd7a36911d3a6c5857c03a022377563f0 Author: Shannon Nelson Date: Thu Aug 27 16:00:30 2020 -0700 ionic: pull reset_queues into tx_timeout handler Convert tx_timeout handler to not do the full reset. As this was the last user of ionic_reset_queues(), we can drop it. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 101b40a0171facc0349b6304f33392c01b96d8fd Author: Shannon Nelson Date: Thu Aug 27 16:00:29 2020 -0700 ionic: change queue count with no reset Add to our new ionic_reconfigure_queues() to also be able to change the number of queues in use, and to change the queue interrupt layout between split and combined. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit a34e25ab977ced1c3366fc69c0595bb3fde63fad Author: Shannon Nelson Date: Thu Aug 27 16:00:28 2020 -0700 ionic: change the descriptor ring length without full reset The original way of changing ring length was to completely tear down the lif's queue structure and then rebuild it, while running the risk of allocations that might fail in the middle and leave us with a broken driver. Instead, we can set up all the new queue and descriptor allocations first, then swap them out and delete the old allocations. If the new allocations fail, we report the error, stay with the old setup and continue running. This gives us a safer path, and a smaller window of time where we're not processing traffic. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit f053e1f8709819fdc3cdc03803ad137bade9a7d6 Author: Shannon Nelson Date: Thu Aug 27 16:00:27 2020 -0700 ionic: change mtu without full queue rebuild We really don't need to tear down and rebuild the whole queue structure when changing the MTU; we can simply stop the queues, clean and refill, then restart the queues. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit f1d2e894f1b77decfdae72fa41c24ddd2ecd33bc Author: Shannon Nelson Date: Thu Aug 27 16:00:26 2020 -0700 ionic: use index not pointer for queue tracking Use index counters rather than pointers for tracking head and tail in the queues to save a little memory and to perhaps slightly faster queue processing. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit ea5a8b09dc3a6ce14cd3ea1a7f8ea8aea6fc92ec Author: Shannon Nelson Date: Thu Aug 27 16:00:25 2020 -0700 ionic: reduce contiguous memory allocation requirement Split out the queue descriptor blocks into separate dma allocations to make for smaller blocks. Co-developed-by: Neel Patel Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit d4881430f50d61a0656b54707e42cc3d6c08c2c8 Author: Shannon Nelson Date: Thu Aug 27 16:00:24 2020 -0700 ionic: clean up unnecessary non-static functions ionic_open() and ionic_stop() are not referenced outside of their defining file, so make them static. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 34dec947b9ceff8a822ece467aac49b0ac992b8e Author: Shannon Nelson Date: Thu Aug 27 16:00:23 2020 -0700 ionic: rework and simplify handling of the queue stats block Use a block of stats structs attached to the lif instead of little ones attached to each qcq. This simplifies our memory management and gets rid of a lot of unnecessary indirection. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 30b87ab4c0b30e0f681cb7dfaab6c642dd17e454 Author: Shannon Nelson Date: Thu Aug 27 16:00:22 2020 -0700 ionic: remove lif list concept As we aren't yet supporting multiple lifs, we can remove complexity by removing the list concept and related code, to be re-engineered later when actually needed. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit ee205626afa3960fb6353fd6c7a51522c5ce7686 Author: Shannon Nelson Date: Thu Aug 27 16:00:21 2020 -0700 ionic: use kcalloc for new arrays Use kcalloc for allocating arrays of structures. Following along after commit e71642009cbdA ("ionic_lif: Use devm_kcalloc() in ionic_qcq_alloc()") there are a couple more array allocations that can be converted to using devm_kcalloc(). Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 9aa1c152eb44c28a7306bbb2597b32d8e1d65a49 Author: Shannon Nelson Date: Thu Aug 27 16:00:20 2020 -0700 ionic: fix up a couple of debug strings Fix the queue name displayed. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit eba8760948ba04a0909e9c40d552d7fbc6bfb7d3 Author: Shannon Nelson Date: Thu Aug 27 16:00:19 2020 -0700 ionic: set MTU floor at ETH_MIN_MTU The NIC might tell us its minimum MTU, but let's be sure not to use something smaller than ETH_MIN_MTU. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit ece2a74c5913d244e13c42c61ca2e162932fa3b4 Author: Dan Murphy Date: Fri Aug 28 06:28:55 2020 -0500 ASoC: tlv320adcx140: Add digital mic channel enable routing Add the audio routing map to enable the digital mic paths when the analog mic paths are not enabled. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200828112855.10112-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 45dd9943fce08f1b38352ff9453682253bdf19b7 Author: Dmitry Baryshkov Date: Thu Aug 27 23:51:00 2020 +0300 ASoC: core: remove artificial component and DAI name constraint Current fmt_single_name code limits maximum name of a DAI or component to 32 bytes. On some systems corresponding device names might be longer than that (e.g. 17300000.remoteproc:glink-edge:apr:apr-service@8:routing). This will result in duplicate DAI/component names. Rewrite fmt_single_name() to remove such length limitations. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200827205100.1479331-1-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown commit ebc2599144b610a7e6e967ee89a769d908a3eeef Author: Andy Shevchenko Date: Fri Aug 28 13:32:35 2020 +0300 pinctrl: mcp23s08: Improve error messaging in ->probe() Print particular message in each of error case in the ->probe(). While here, use dev_err_probe() for that. Signed-off-by: Andy Shevchenko Cc: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200828103235.78380-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit a1342f6a9ff88ad88ff7a981c53ae0869c94d243 Author: Krzysztof Kozlowski Date: Thu Aug 20 22:42:03 2020 +0200 ARM: s3c: Avoid naming clash of S3C24xx and S3C64xx timer setup PWM timer initialization has two independent implementations - one for S3C24xx and one for S3C64xx. The naming however was always the same and before also the declaration was shared. This is confusing, error prone and might cause issues when trying to build multiplatform kernel. Suggested-by: Tomasz Figa Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200820204203.22328-1-krzk@kernel.org commit 161e31066757a70076aea4016b167d352915b32a Merge: 316cdaa1158af 5dc39fd5ef35b Author: David S. Miller Date: Fri Aug 28 06:57:58 2020 -0700 Merge branch 'Enable-Fiber-on-DP83822-PHY' Dan Murphy says: ==================== Enable Fiber on DP83822 PHY The DP83822 Ethernet PHY has the ability to connect via a Fiber port. The derivative PHYs DP83825 and DP83826 do not have this ability. In fiber mode the DP83822 disables auto negotiation and has a fixed 100Mbps speed with support for full or half duplex modes. A devicetree binding was added to set the signal polarity for the fiber connection. This property is only applicable if the FX_EN strap is set in hardware other wise the signal loss detection is disabled on the PHY. If the FX_EN is not strapped the device can be configured to run in fiber mode via the device tree. All be it the PHY will not perform signal loss detection. v2 review from a long time ago can be found here - https://lore.kernel.org/patchwork/patch/1270958/ ==================== Signed-off-by: David S. Miller commit 5dc39fd5ef35bc6919759fa99246581b1adc6b82 Author: Dan Murphy Date: Thu Aug 27 08:45:09 2020 -0500 net: phy: DP83822: Add ability to advertise Fiber connection The DP83822 can be configured to use a Fiber connection. The strap register is read to determine if the device has been configured to use a fiber connection. With the fiber connection the PHY can be configured to detect whether the fiber connection is active by either a high signal or a low signal. Fiber mode is only applicable to the DP83822 so rework the PHY match table so that non-fiber PHYs can still use the same driver but not call or use any of the fiber features. Signed-off-by: Dan Murphy Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 7a63d769a8849bbb98dd041c607c1c299f52be71 Author: Dan Murphy Date: Thu Aug 27 08:45:08 2020 -0500 dt-bindings: net: dp83822: Add TI dp83822 phy Add a dt binding for the TI dp83822 ethernet phy device. Reviewed-by: Rob Herring Signed-off-by: Dan Murphy Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 316cdaa1158af17250397054f92bb339fbd8e282 Author: Mahesh Bandewar Date: Wed Aug 26 09:05:35 2020 -0700 net: add option to not create fall-back tunnels in root-ns as well The sysctl that was added earlier by commit 79134e6ce2c ("net: do not create fallback tunnels for non-default namespaces") to create fall-back only in root-ns. This patch enhances that behavior to provide option not to create fallback tunnels in root-ns as well. Since modules that create fallback tunnels could be built-in and setting the sysctl value after booting is pointless, so added a kernel cmdline options to change this default. The default setting is preseved for backward compatibility. The kernel command line option of fb_tunnels=initns will set the sysctl value to 1 and will create fallback tunnels only in initns while kernel cmdline fb_tunnels=none will set the sysctl value to 2 and fallback tunnels are skipped in every netns. Signed-off-by: Mahesh Bandewar Cc: Eric Dumazet Cc: Maciej Zenczykowski Cc: Jian Yang Cc: Randy Dunlap Signed-off-by: David S. Miller commit 0baf01942d3dc52ea7f52c34cb88c6be39de6129 Merge: ae9a138f062eb 05b35e7eb9a11 Author: David S. Miller Date: Fri Aug 28 06:48:44 2020 -0700 Merge branch 'Add-phylib-support-to-smsc95xx' Andre Edich says: ==================== Add phylib support to smsc95xx To allow to probe external PHY drivers, this patch series adds use of phylib to the smsc95xx driver. Changes in v5: - Removed all phy_read calls from the smsc95xx driver. Changes in v4: - Removed useless inline type qualifier. Changes in v3: - Moved all MDI-X functionality to the corresponding phy driver; - Removed field internal_phy from a struct smsc95xx_priv; - Initialized field is_internal of a struct phy_device; - Kconfig: Added selection of PHYLIB and SMSC_PHY for USB_NET_SMSC95XX. Changes in v2: - Moved 'net' patches from here to the separate patch series; - Removed redundant call of the phy_start_aneg after phy_start; - Removed netif_dbg tracing "speed, duplex, lcladv, and rmtadv"; - mdiobus: added dependency from the usbnet device; - Moved making of the MII address from 'phy_id' and 'idx' into the function mii_address; - Moved direct MDIO accesses under condition 'if (pdata->internal_phy)', as they only need for the internal PHY; - To be sure, that this set of patches is git-bisectable, tested each sub-set of patches to be functional for both, internal and external PHYs, including suspend/resume test for the 'devices' (5.7.8-1-ARCH, Raspberry Pi 3 Model B). ==================== Signed-off-by: David S. Miller commit 05b35e7eb9a11bbe8102836965e634c04e712c88 Author: Andre Edich Date: Wed Aug 26 13:17:17 2020 +0200 smsc95xx: add phylib support Generally, each PHY has their own configuration and it can be done through an external PHY driver. The smsc95xx driver uses only the hard-coded internal PHY configuration. This patch adds phylib support to probe external PHY drivers for configuring external PHYs. The MDI-X configuration for the internal PHYs moves from drivers/net/usb/smsc95xx.c to drivers/net/phy/smsc.c. Signed-off-by: Andre Edich Signed-off-by: David S. Miller commit ad90a73f0236c41f7a2dedc2e75c7b5a364eb93e Author: Andre Edich Date: Wed Aug 26 13:17:16 2020 +0200 smsc95xx: use usbnet->driver_priv Using `void *driver_priv` instead of `unsigned long data[]` is more straightforward way to recover the `struct smsc95xx_priv *` from the `struct net_device *`. Signed-off-by: Andre Edich Signed-off-by: David S. Miller commit 368be1ca28f66deba16627e2a02e78adedd023a6 Author: Andre Edich Date: Wed Aug 26 13:17:15 2020 +0200 smsc95xx: remove redundant function arguments This patch removes arguments netdev and phy_id from the functions smsc95xx_mdio_read_nopm and smsc95xx_mdio_write_nopm. Both removed arguments are recovered from a new argument `struct usbnet *dev`. Signed-off-by: Andre Edich Signed-off-by: David S. Miller commit d557ea39a5f894630c403b78703ac92b08b7dd62 Author: Martin KaFai Lau Date: Thu Aug 27 18:18:19 2020 -0700 bpf: selftests: Add test for different inner map size This patch tests the inner map size can be different for reuseport_sockarray but has to be the same for arraymap. A new subtest "diff_size" is added for this. The existing test is moved to a subtest "lookup_update". Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200828011819.1970825-1-kafai@fb.com commit 134fede4eecfcbe7900e789f625fa6f9c3a8cd0e Author: Martin KaFai Lau Date: Thu Aug 27 18:18:13 2020 -0700 bpf: Relax max_entries check for most of the inner map types Most of the maps do not use max_entries during verification time. Thus, those map_meta_equal() do not need to enforce max_entries when it is inserted as an inner map during runtime. The max_entries check is removed from the default implementation bpf_map_meta_equal(). The prog_array_map and xsk_map are exception. Its map_gen_lookup uses max_entries to generate inline lookup code. Thus, they will implement its own map_meta_equal() to enforce max_entries. Since there are only two cases now, the max_entries check is not refactored and stays in its own .c file. Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200828011813.1970516-1-kafai@fb.com commit f4d05259213ff1e91f767c91dcab455f68308fac Author: Martin KaFai Lau Date: Thu Aug 27 18:18:06 2020 -0700 bpf: Add map_meta_equal map ops Some properties of the inner map is used in the verification time. When an inner map is inserted to an outer map at runtime, bpf_map_meta_equal() is currently used to ensure those properties of the inserting inner map stays the same as the verification time. In particular, the current bpf_map_meta_equal() checks max_entries which turns out to be too restrictive for most of the maps which do not use max_entries during the verification time. It limits the use case that wants to replace a smaller inner map with a larger inner map. There are some maps do use max_entries during verification though. For example, the map_gen_lookup in array_map_ops uses the max_entries to generate the inline lookup code. To accommodate differences between maps, the map_meta_equal is added to bpf_map_ops. Each map-type can decide what to check when its map is used as an inner map during runtime. Also, some map types cannot be used as an inner map and they are currently black listed in bpf_map_meta_alloc() in map_in_map.c. It is not unusual that the new map types may not aware that such blacklist exists. This patch enforces an explicit opt-in and only allows a map to be used as an inner map if it has implemented the map_meta_equal ops. It is based on the discussion in [1]. All maps that support inner map has its map_meta_equal points to bpf_map_meta_equal in this patch. A later patch will relax the max_entries check for most maps. bpf_types.h counts 28 map types. This patch adds 23 ".map_meta_equal" by using coccinelle. -5 for BPF_MAP_TYPE_PROG_ARRAY BPF_MAP_TYPE_(PERCPU)_CGROUP_STORAGE BPF_MAP_TYPE_STRUCT_OPS BPF_MAP_TYPE_ARRAY_OF_MAPS BPF_MAP_TYPE_HASH_OF_MAPS The "if (inner_map->inner_map_meta)" check in bpf_map_meta_alloc() is moved such that the same error is returned. [1]: https://lore.kernel.org/bpf/20200522022342.899756-1-kafai@fb.com/ Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200828011806.1970400-1-kafai@fb.com commit 45f13a57d8134459f02fbee0b1711eddc3260af7 Author: Xia Jiang Date: Fri Aug 14 09:12:02 2020 +0200 media: platform: Add jpeg enc feature Add mtk jpeg encode v4l2 driver based on jpeg decode, because that jpeg decode and encode have great similarities with function operation. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b4a82f5d15102ade6134c8cc4bbc8ccef1f4a7dc Author: Xia Jiang Date: Fri Aug 14 09:12:01 2020 +0200 media: platform: Using the variant structure to contain the varability between dec and enc Add varability which would be used between jpeg dec and enc to a match data structure, it will make the code linear. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2ac8015f156b55c53e85b4542e221282acb350c4 Author: Xia Jiang Date: Fri Aug 14 09:12:00 2020 +0200 media: platform: Rename existing functions/defines/variables Rename existing functions/defines/variables with a _dec prefix and without dec_ prefix to prepare for the addition of the jpeg encoder feature. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 030a7b5c168d996e590cdd09fffd8ebaa8a5d571 Author: Xia Jiang Date: Fri Aug 14 09:11:59 2020 +0200 media: platform: Rename jpeg dec file name Rename the files which are for decode feature. This is preparing path since the jpeg enc patch will be added later. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3e66e1d8e384fc641906ae1f1b15536953827e4d Author: Xia Jiang Date: Fri Aug 14 09:11:57 2020 +0200 media: dt-bindings: Add jpeg enc device tree node document Add jpeg enc device tree node document. Reviewed-by: Rob Herring Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 648372a87ceef7df2b7287d0f8226dd9737b272b Author: Xia Jiang Date: Fri Aug 14 09:11:56 2020 +0200 media: platform: Change the call functions of getting/enable/disable the jpeg's clock Use the generic clk_bulk_* helpers to enable and disable clocks. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bd627ff5d58507358759e76f1e8148ef3fdcda02 Author: Xia Jiang Date: Fri Aug 14 09:11:55 2020 +0200 media: platform: Refactor mtk_jpeg_set_default_params() Call mtk_jpeg_try_fmt_mplane() to replace the original computation of sizeimage and bytesperline, because that mtk_jpeg_try_fmt_mplane() already did it. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f385e2fcc596f0c4428d3c519e524f3709654f3b Author: Sebastian Reichel Date: Wed Aug 26 16:41:59 2020 +0200 power: supply: smb347-charger: Use generic property framework Simplify the driver and remove the DT specific code by using the generic device property framework. Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Sebastian Reichel commit 0b90056a39ed23284f27672497333e5a9d957d62 Author: Xia Jiang Date: Fri Aug 14 09:11:54 2020 +0200 media: platform: Change the colorspace of jpeg to the fixed value Jpeg doesn't support colorspace conversion, so it shouldn't accept any other colorspace in S_FMT. Change the colorspace of jpeg to the fixed value. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 84bb4d04eb7ba6825708455df6bb8a71d4fe3411 Author: Xia Jiang Date: Fri Aug 14 09:11:53 2020 +0200 media: platform: Redefinition of mtk_jpeg_q_data structure The standard v4l2_pix_format_mplane structure contains width/height/ sizeimage/bytesperline, so use v4l2_pix_format_mplane to replace them. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ac5a59c8bdf2b3b7bf799c6b0926e32b6796bf1c Author: Xia Jiang Date: Fri Aug 14 09:11:52 2020 +0200 media: platform: Refactor mtk_jpeg_find_format() Delete the unused ctx parameter. Using mtk_jpeg_formats and num_formats parameters is more generic, because that jpeg enc will also use it. Delete the macro definition of MTK_JPEG_FMT_TYPE_OUTPUT and MTK_JPEG_FMT_TYPE_CAPTURE, because that MTK_JPEG_FMT_FLAG_DEC_OUTPUT and MTK_JPEG_FMT_FLAG_DEC_CAPTURE are enough. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b6f3e21b928a8ae7959a0d79203b80bd70120768 Author: Sebastian Reichel Date: Wed Aug 26 16:41:58 2020 +0200 power: supply: smb347-charger: Drop pdata support There are no platforms using the pdata support, so let's drop it to simplify the driver. Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Sebastian Reichel commit 690345fc7a6238b36052e9593c3315e7a4923000 Author: Xia Jiang Date: Fri Aug 14 09:11:51 2020 +0200 media: platform: Refactor mtk_jpeg_try_fmt_mplane() The function of mtk_jpeg_adjust_fmt_mplane() equals mtk_jpeg_g_fmt_vid_mplane(), so use mtk_jpeg_g_fmt_vid_mplane() to replace it . Delete the unused ctx parameter. Using fourcc to distinguish between different formats is more generic, because that jpeg enc will also use it. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 79aa1e6859af35f693bf13ac7eb94b5b6fd250e9 Author: Xia Jiang Date: Fri Aug 14 09:11:50 2020 +0200 media: platform: Change the maximum width and height supported by JPEG dec The maximum width and height supported by JPEG dec is 65535, so change them from 8192 to 65535. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 57d1be707b59a5ce6bdd70d236823809c9abcbac Author: Xia Jiang Date: Fri Aug 14 09:11:49 2020 +0200 media: platform: Delete vidioc_s_selection ioctl of jpeg dec JPEG dec does't support setting a compose rectangle, so remove mtk_jpeg_dec_s_selection(). Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4b39c8f453b21718e589d849d49c5edf6713235d Author: Xia Jiang Date: Fri Aug 14 09:11:48 2020 +0200 media: platform: Delete redundant code and add annotation for an enum Delete unused member variables annotation. Delete unused variable definition. Delete redundant log print, because V4L2 debug logs already print it. Add annotation for enum mtk_jpeg_ctx_state. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d43c93f2db82501af759499345d2a332183a0065 Author: Xia Jiang Date: Fri Aug 14 09:11:47 2020 +0200 media: platform: Change MTK_JPEG_COMP_MAX macro definition location Move MTK_JPEG_COMP_MAX definition to mtk_jpeg_core.h file, because it is used by mtk_jpeg_core.c file. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e0ec6043c1999269a0a1afa2854e30d66415094e Author: Xia Jiang Date: Fri Aug 14 09:11:46 2020 +0200 media: platform: Use generic rounding helpers Use clamp() to replace mtk_jpeg_bound_align_image() and round() to replace mtk_jpeg_align(). Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e6d516706b6b81e186b5172792138c652e3c3252 Author: Xia Jiang Date: Fri Aug 14 09:11:45 2020 +0200 media: platform: Stylistic changes for improving code quality Change register offset hex numerals from uppercase to lowercase. Change data type of max/min width/height from integer to unsigned integer. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2860d2048ba33aea0407c6b3023702f3f9cee1c7 Author: Xia Jiang Date: Fri Aug 14 09:11:44 2020 +0200 media: platform: Delete zeroing the reserved fields Delete zeroing the reserved fields because that the core already does it. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 63ca740d5178da1b28235c7f657ef154781dcafe Author: Xia Jiang Date: Fri Aug 14 09:11:43 2020 +0200 media: platform: Cancel the last frame handling flow There is no need to queue an empty buffer for signaling a last frame, because all frames are separate from each other in JPEG. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0058ff2befe37368f27cc9d7e21f752117722b7c Author: Xia Jiang Date: Fri Aug 14 09:11:42 2020 +0200 media: platform: Add mechanism to handle jpeg hardware's locking up There is a delayed work scheduled before starting the hardware and canceled in the interrupt handler. If the delayed work is executed, it resets the hardware and reports the failure to V4L2, so that the execution can continue from next frames. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f9f964519c54543476adcb792414ed7ef91963eb Author: Xia Jiang Date: Fri Aug 14 09:11:41 2020 +0200 media: platform: Improve the implementation of the system PM ops Add v4l2_m2m_suspend() function call in mtk_jpeg_suspend() to make sure that the current frame is processed completely before suspend. Add v4l2_m2m_resume() function call in mtk_jpeg_resume() to unblock the driver from scheduling next frame. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 911ea8ec42dea0e28083a6e92b1b4a5a0ad5acca Author: Pi-Hsun Shih Date: Fri Aug 14 09:11:40 2020 +0200 media: v4l2-mem2mem: add v4l2_m2m_suspend, v4l2_m2m_resume Add two functions that can be used to stop new jobs from being queued / continue running queued job. This can be used while a driver using m2m helper is going to suspend / wake up from resume, and can ensure that there's no job running in suspend process. Signed-off-by: Pi-Hsun Shih Signed-off-by: Jerry-ch Chen Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1847f68e39d6d562f339b500f0beb3217282490a Author: Xia Jiang Date: Fri Aug 14 09:11:39 2020 +0200 media: platform: Delete the resetting hardware flow in the system PM ops Delete the resetting hardware flow in suspend and resume function because that resetting operation will be done in device_run(). Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5827e4b14ee7882acc6d618c12ddf4966bbd780f Author: Xia Jiang Date: Fri Aug 14 09:11:38 2020 +0200 media: platform: Improve power on and power off flow Call pm_runtime_get_sync() before starting a frame and then pm_runtime_put() after completing it. This can save power for the time between processing two frames. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cc5fd1668f5fdddce4f367ec10514674a01fe09c Author: Xia Jiang Date: Fri Aug 14 09:11:37 2020 +0200 media: platform: Change the fixed device node number to unfixed value The driver can be instantiated multiple times, e.g. for a decoder and an encoder. Moreover, other drivers could coexist on the same system. This makes the static video node number assignment pointless, so switch to automatic assignment instead. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6869a2de456a588a3c6b7bf123306faa3d490417 Author: Xia Jiang Date: Fri Aug 14 09:11:36 2020 +0200 media: platform: Improve getting and requesting irq flow for bug fixing Delete platform_get_resource operation for irq. Return actual value rather than EINVAL when fail to get and request irq. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5095a6413a0cf896ab468009b6142cb0fe617e66 Author: Xia Jiang Date: Fri Aug 14 09:11:35 2020 +0200 media: platform: Improve queue set up flow for bug fixing Add checking created buffer size follow in mtk_jpeg_queue_setup(). Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ae9a138f062ebd6b4d74a0c70d467d1785f837af Merge: 50aba46c234ea 2831a631022ee Author: David S. Miller Date: Fri Aug 28 06:17:40 2020 -0700 Merge tag 'mac80211-next-for-davem-2020-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== This time we have: * some code to support SAE (WPA3) offload in AP mode * many documentation (wording) fixes/updates * netlink policy updates, including the use of NLA_RANGE with binary attributes * regulatory improvements for adjacent frequency bands * and a few other small additions/refactorings/cleanups ==================== Signed-off-by: David S. Miller commit 8ea373774ac6d4f08df09b62c700c15dafb25458 Author: Xia Jiang Date: Fri Aug 14 09:11:34 2020 +0200 media: platform: Improve subscribe event flow for bug fixing Let v4l2_ctrl_subscribe_event() do the job for other types except V4L2_EVENT_SOURCE_CHANGE. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cc9d3fa2d599675a940be5fdbf46f01d6d236a24 Author: Sowjanya Komatineni Date: Wed Aug 12 02:27:21 2020 +0200 media: tegra-video: Compute settle times based on the clock rate Settle time determines the number of cil clock cyles to wait after LP00 when moving from LP to HS. This patch computes T-CLK-SETTLE and T-HS-SETTLE times based on cil clock rate and pixel rate from the sensor and programs them during streaming. T-CLK-SETTLE time is the interval during which receiver will ignore any HS transitions on clock lane starting from the beginning of T-CLK-PREPARE. T-HS-SETTLE time is the interval during which recevier will ignore any HS transitions on data lane starting from the beginning of T-HS-PREPARE. Signed-off-by: Sowjanya Komatineni Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 523c857e34ce025b993e4f85864644f579a08aac Author: Sowjanya Komatineni Date: Wed Aug 12 02:27:20 2020 +0200 media: tegra-video: Add CSI MIPI pads calibration CSI MIPI pads need to be enabled and calibrated for capturing from the external sensor or transmitter. MIPI CAL unit calibrates MIPI pads pull-up, pull-down and termination impedances. Calibration is done by co-work of MIPI BIAS pad and MIPI CAL control unit. Triggering calibration start can happen any time after MIPI pads are enabled but calibration results will be latched and applied to MIPI pads by MIPI CAL unit only when the link is in LP11 state and then calibration status register gets updated. This patch enables CSI MIPI pads and calibrates them during streaming. Tegra CSI receiver is able to catch the very first clock transition. So, CSI receiver is always enabled prior to sensor streaming and trigger of calibration start is done during CSI subdev streaming and status of calibration is verified after sensor stream on. Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cf5153e4338c4cca655a4a4eff6d54c6a0adcdb7 Author: Sowjanya Komatineni Date: Wed Aug 12 02:27:19 2020 +0200 media: gpu: host1x: mipi: Keep MIPI clock enabled and mutex locked till calibration done With the split of MIPI calibration into tegra_mipi_calibrate() and tegra_mipi_wait(), MIPI clock is not kept enabled and mutex is not locked till the calibration is done. So, this patch keeps MIPI clock enabled and mutex locked after triggering start of calibration till its done. To let calibration process go through its finite sequence codes before calibration logic waiting for pads idle state added wait time of 75usec to make sure it sees idle state to apply the results. This patch renames tegra_mipi_calibrate() as tegra_mipi_start_calibration() and tegra_mipi_wait() as tegra_mipi_finish_calibration() to be inline with their usage. Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bdcad5ce6dde6e4f0767aef7b63c164b9435bd8c Author: Sowjanya Komatineni Date: Wed Aug 12 02:27:18 2020 +0200 media: tegra-video: Add support for selection ioctl ops This patch adds selection v4l2 ioctl operations to allow configuring a selection rectangle in the sensor through the Tegra video device node. Some sensor drivers supporting crop uses try_crop rectangle from v4l2_subdev_pad_config during try format for computing binning. So with selection ops support, this patch also updates try format to use try crop rectangle either from subdev frame size enumeration or from subdev crop boundary. Signed-off-by: Sowjanya Komatineni Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1ebaeb09830f36c1111b72a95420814225bd761c Author: Sowjanya Komatineni Date: Wed Aug 12 02:27:17 2020 +0200 media: tegra-video: Add support for external sensor capture This patch adds support to capture from the external sensor based on device graph in the device tree. Driver walks through the device graph to create media links between the entities and registers and unregisters video devices when the corresponding sub-devices are bound and unbound. Channel formats are enumerated based on available formats from the sensor and the corresponding matched formats from the Tegra supported video formats list. Each Tegra CSI instance can be configured as 4-lane or 2-lane based on supported lane configuration from the sensor through the device tree. Currently this driver supports V4L2 video node centric only. [hverkuil: changed video_unregister_device to vb2_video_unregister_device] Signed-off-by: Sowjanya Komatineni Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 654c433beb2e30e6f2a211fc781599d75c356a5e Author: Sowjanya Komatineni Date: Wed Aug 12 02:27:16 2020 +0200 media: tegra-video: Separate CSI stream enable and disable implementations This patch separates implementation of CSI stream enable and disable into separate functions for readability. Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b73be499422471031dec8f269668a235f57b0c92 Author: Sowjanya Komatineni Date: Wed Aug 12 02:27:15 2020 +0200 media: dt-bindings: tegra: Update VI and CSI bindings with port info Update VI and CSI bindings to add port and endpoint nodes as per media video-interfaces DT binding document. Acked-by: Rob Herring Signed-off-by: Sowjanya Komatineni Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8c393b34a4f94c39baf2af8d1f836962300fc919 Author: Sowjanya Komatineni Date: Wed Aug 12 02:27:14 2020 +0200 media: tegra-video: Update format lookup to offset based Tegra VI supported video formats are more for non TPG and there can be multiple pixel formats for the same media bus format. This patch updates the helper function for format lookup based on mbus code from pre-defined Tegra supported format list to look from the specified list index offset. Offset based look up is used with sensor device graph (non TPG) where format enumeration can list all supported formats for the specific sensor mbus codes. Signed-off-by: Sowjanya Komatineni Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 341187bf237cf3a67099781461636260dc645a17 Author: Sowjanya Komatineni Date: Wed Aug 12 02:27:13 2020 +0200 media: tegra-video: Enable TPG based on kernel config Tegra internal TPG mode is only for Tegra vi and csi testing without a real sensor and driver should default support real sensor. So, This patch adds CONFIG_VIDEO_TEGRA_TPG and enables Tegra internal TPG mode only when this config is selected. Signed-off-by: Sowjanya Komatineni Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d6b6851164d3deaef4fabe2bd7aecb81d0cfcdec Author: Sowjanya Komatineni Date: Wed Aug 12 02:27:12 2020 +0200 media: tegra-video: Fix channel format alignment Pixel format width is mistakenly aligned to surface align bytes and altering width to aligned value may force sensor mode change other than the requested one and also cause mismatch in width programmed between sensor and vi which can lead to capture errors. This patch removes width alignment and clamps width as per Tegra minimum and maximum limits. Signed-off-by: Sowjanya Komatineni Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2dc73489ae84f784448422a31f51501e520b073a Author: Hans Verkuil Date: Mon Jul 13 13:30:48 2020 +0200 media: staging/media: drop vb2_queue_release() This is only needed for drivers that do not use vb2_fop_release(). Note that vb2_queue_release() is *not* the counterpart of vb2_queue_init() as some drivers here seem to think. Also use vb2_video_unregister_device() to automatically stop streaming at unregister time for those drivers that set vdev->queue. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bda24f433013d698467dea589e0fe37544c44fe0 Author: Hans Verkuil Date: Mon Jul 13 13:30:47 2020 +0200 media: media/test-drivers: use vb2_video_unregister_device() Use vb2_video_unregister_device() to automatically stop streaming at unregister time. This avoids the use of vb2_queue_release() which should not be called by drivers that set vdev->queue. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 24b5836dbd45b9b4bef6c3b87d512dade8e1f6e1 Author: Hans Verkuil Date: Mon Jul 13 13:30:46 2020 +0200 media: media/usb: use vb2_video_unregister_device() Use vb2_video_unregister_device() to automatically stop streaming at unregister time. This avoids the use of vb2_queue_release() which should not be called by drivers that set vdev->queue. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f4ab5d0bf9d64437d9fca17338901d3408039719 Author: Hans Verkuil Date: Mon Jul 13 13:30:45 2020 +0200 media: media/platform: drop vb2_queue_release() This is only needed for drivers that do not use vb2_fop_release(). Note that vb2_queue_release() is *not* the counterpart of vb2_queue_init() as some drivers here seem to think. Also use vb2_video_unregister_device() to automatically stop streaming at unregister time for those drivers that set vdev->queue. Note that sun4i-csi didn't unregister the video device at all. That's now fixed. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 11788d9b7e916f6e7ef5200cfe67158e67afd4d7 Author: Hans Verkuil Date: Mon Jul 13 13:30:44 2020 +0200 media: media/pci: use vb2_video_unregister_device() Use vb2_video_unregister_device() to automatically stop streaming at unregister time. This avoids the use of vb2_queue_release() which should not be called by drivers that set vdev->queue. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 492abcd7e0fb2b5f04d1f50bf932af79e8b35803 Author: Hans Verkuil Date: Mon Jul 13 13:30:43 2020 +0200 media: qcom/camss: use vb2_video_unregister_device() Use vb2_video_unregister_device() to automatically stop streaming at unregister time. This avoids the use of vb2_queue_release() which should not be called by drivers that set vdev->queue. Signed-off-by: Hans Verkuil Tested-by: Andrey Konovalov Signed-off-by: Mauro Carvalho Chehab commit f729ef5796d82a95758d9edc7eea5879a3a12b25 Author: Hans Verkuil Date: Mon Jul 13 13:30:42 2020 +0200 media: videobuf2-v4l2.c: add vb2_video_unregister_device helper function If a driver calls (_)vb2_fop_release(), then such a driver should also call vb2_video_unregister_device() instead of video_unregister_device(). This helper will call vb2_queue_release() if a filehandle is marked as owner of the queue. This ensures that at unregister time any streaming is cancelled and all buffers are returned to userspace. This is very useful for complex drivers since this stops all streaming in all subdevs in the pipeline controlled by this video device. Otherwise this would be delayed until the owner filehandle is closed, which can be quite some time later. Bonus points for ordering the includes :-) Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b0c9eb37817943840a1a82dbc998c491609a0afd Author: Yonghong Song Date: Thu Aug 27 22:19:22 2020 -0700 bpf: Make bpf_link_info.iter similar to bpf_iter_link_info bpf_link_info.iter is used by link_query to return bpf_iter_link_info to user space. Fields may be different, e.g., map_fd vs. map_id, so we cannot reuse the exact structure. But make them similar, e.g., struct bpf_link_info { /* common fields */ union { struct { ... } raw_tracepoint; struct { ... } tracing; ... struct { /* common fields for iter */ union { struct { __u32 map_id; } map; /* other structs for other targets */ }; }; }; }; so the structure is extensible the same way as bpf_iter_link_info. Fixes: 6b0a249a301e ("bpf: Implement link_query for bpf iterators") Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200828051922.758950-1-yhs@fb.com commit 661b37cd437ef49cd28444f79b9b0c71ea76e8c8 Author: Jesper Dangaard Brouer Date: Thu Aug 27 10:53:36 2020 +0200 tools, bpf/build: Cleanup feature files on make clean The system for "Auto-detecting system features" located under tools/build/ are (currently) used by perf, libbpf and bpftool. It can contain stalled feature detection files, which are not cleaned up by libbpf and bpftool on make clean (side-note: perf tool is correct). Fix this by making the users invoke the make clean target. Some details about the changes. The libbpf Makefile already had a clean-config target (which seems to be copy-pasted from perf), but this target was not "connected" (a make dependency) to clean target. Choose not to rename target as someone might be using it. Did change the output from "CLEAN config" to "CLEAN feature-detect", to make it more clear what happens. This is related to the complaint and troubleshooting in the following link: https://lore.kernel.org/lkml/20200818122007.2d1cfe2d@carbon/ Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/lkml/20200818122007.2d1cfe2d@carbon/ Link: https://lore.kernel.org/bpf/159851841661.1072907.13770213104521805592.stgit@firesoul commit 0832e07eee668020e8ec123e7da31b54a377db3d Author: Kieran Bingham Date: Thu Jul 16 12:25:52 2020 +0200 media: MAINTAINERS: Fix sort order for RDACM20 The files maintained as part of the RDACM20 were incorrectly sorted while they were added. Correct the sort-order. Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver") Signed-off-by: Kieran Bingham Acked-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit 5317f37e48b953be94bfdbb6474542363467c37e Author: Linus Walleij Date: Wed Aug 19 22:51:50 2020 +0200 backlight: Add Kinetic KTD253 backlight driver The Kinetic KTD253 backlight driver is controlled with a single GPIO line, but still supports a range of brightness settings by sending fast pulses on the line. This is based off the source code release for the Samsung GT-S7710 mobile phone. Cc: Sam Ravnborg Reviewed-by: Daniel Thompson Signed-off-by: Linus Walleij Signed-off-by: Lee Jones commit 299beae588e0e339458e623c01b64405f76f033c Author: Linus Walleij Date: Wed Aug 19 22:51:49 2020 +0200 dt-bindings: backlight: Add Kinetic KTD253 bindings This adds device tree bindings for the Kinetic KTD253 white LED backlight driver. Cc: devicetree@vger.kernel.org Cc: Sam Ravnborg Signed-off-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit ae1f74da7c5a6bed3b9573a44e66f8ebbadefbbd Author: Linus Walleij Date: Wed Aug 19 22:51:48 2020 +0200 dt-bindings: backlight: Add some common backlight properties Let's use a common.yaml include for the backlight like we do with the LEDs. The LEDs are inherently incompatible so their bindings cannot be reused for backlight. Cc: devicetree@vger.kernel.org Suggested-by: Sam Ravnborg Signed-off-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 551b6729578a8981c46af964c10bf7d5d9ddca83 Author: Ricky Wu Date: Mon Aug 24 11:00:06 2020 +0800 misc: rtsx: do not setting OC_POWER_DOWN reg in rtsx_pci_init_ocp() this power saving action in rtsx_pci_init_ocp() cause INTEL-NUC6 platform missing card reader Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20200824030006.30033-1-ricky_wu@realtek.com Signed-off-by: Greg Kroah-Hartman commit 31b4b3bff2c217c61bb99db76f24c4886e74a1a5 Author: Sebastian Fricke Date: Mon Aug 3 07:43:45 2020 +0200 include/linux/miscdevice.h - Fix typo/grammar Improve the clarity and grammar of descriptive comment on top of the minor number assignments. Fix a typo within 2 comments for macros. s/This helps in eleminating of boilerplate code. /This helps to eliminate boilerplate code./ Signed-off-by: Sebastian Fricke Link: https://lore.kernel.org/r/20200803054346.4285-1-sebastian.fricke.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c2fef5f845bef784f06d6dc2ee6a3fd013eaeee8 Author: Joe Perches Date: Mon Aug 24 21:56:04 2020 -0700 lp: Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/850c60ea44927e8cb7604d178c613ff8fc667984.1598331148.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman commit 145fbd1e82e6654398ace321432e3a803b8a2be4 Author: Peter Ujfalusi Date: Fri Aug 28 11:41:41 2020 +0300 dmaengine: Remove unused define for dma_request_slave_channel_reason() No users left in the kernel, it can be removed. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200828084141.14902-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 90ca6333fd65f318c47bff425e1ea36c0a5539f6 Author: Alex Dewar Date: Tue Aug 25 17:45:18 2020 +0100 VMCI: check return value of get_user_pages_fast() for errors In a couple of places in qp_host_get_user_memory(), get_user_pages_fast() is called without properly checking for errors. If e.g. -EFAULT is returned, this negative value will then be passed on to qp_release_pages(), which expects a u64 as input. Fix this by only calling qp_release_pages() when we have a positive number returned. Fixes: 06164d2b72aa ("VMCI: queue pairs implementation.") Signed-off-by: Alex Dewar Link: https://lore.kernel.org/r/20200825164522.412392-1-alex.dewar90@gmail.com Signed-off-by: Greg Kroah-Hartman commit 256ccb9baeaba2b1a4ed5324c02b8d723497ca5a Author: Denis Efremov Date: Fri Aug 28 01:16:52 2020 +0300 udf: Use kvzalloc() in udf_sb_alloc_bitmap() Use kvzalloc() in udf_sb_alloc_bitmap() instead of open-coding it. Size computation wrapped in struct_size() macro to prevent potential integer overflows. Link: https://lore.kernel.org/r/20200827221652.64660-1-efremov@linux.com Signed-off-by: Denis Efremov Reviewed-by: Gustavo A. R. Silva Signed-off-by: Jan Kara commit 25094ede57d4c5b7ad6474b0b4490f12d21b3702 Author: Wang Hai Date: Wed Aug 19 10:54:34 2020 +0800 ext2: remove duplicate include Remove linux/fiemap.h which is included more than once Link: https://lore.kernel.org/r/20200819025434.65763-1-wanghai38@huawei.com Reported-by: Hulk Robot Reviewed-by: Ritesh Harjani Signed-off-by: Wang Hai Signed-off-by: Jan Kara commit da0d6b3a536bc800cb46b35cc75327fd546b6272 Author: Denis Efremov Date: Mon Aug 24 15:53:30 2020 +0300 virt: vbox: Use current_uid() in vbg_misc_device_requestor() Modify vbg_misc_device_requestor() to use current_uid() wrapper. Signed-off-by: Denis Efremov Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20200824125330.487083-1-efremov@linux.com Signed-off-by: Greg Kroah-Hartman commit cc34073c6248e9cec801bf690d1455f264d12357 Author: Alex Dewar Date: Tue Aug 25 10:19:28 2020 +0100 staging: emxx_udc: Fix passing of NULL to dma_alloc_coherent() In nbu2ss_eq_queue() memory is allocated with dma_alloc_coherent(), though, strangely, NULL is passed as the struct device* argument. Pass the UDC's device instead. Fix up the corresponding call to dma_free_coherent() in the same way. Build-tested on x86 only. Fixes: 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile USB Gadget driver") Reported-by: Dan Carpenter Signed-off-by: Alex Dewar Link: https://lore.kernel.org/r/20200825091928.55794-1-alex.dewar90@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9289cdf399922a1bd801a8cd946a79581c00a380 Author: Linus Walleij Date: Thu Aug 27 10:14:45 2020 +0200 staging: media: atomisp: Convert to GPIO descriptors Convert the atomisp LM3554 driver to use GPIO descriptors fully. It was already retrieveing the GPIO lines as descriptors but for some reason converting them back into global GPIO numbers. There is no reason to do this, just deal with the descriptors as-is. Cc: Mauro Carvalho Chehab Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200827081445.186882-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit d8eb176d97d3dcb810e19fb067f21bf6b115251a Author: Dinghao Liu Date: Wed Aug 19 19:54:26 2020 +0800 staging: wilc1000: Fix memleak in wilc_bus_probe When devm_clk_get() returns -EPROBE_DEFER, spi_priv should be freed just like when wilc_cfg80211_init() fails. Fixes: 854d66df74aed ("staging: wilc1000: look for rtc_clk clock in spi mode") Signed-off-by: Dinghao Liu Link: https://lore.kernel.org/r/20200819115426.29852-1-dinghao.liu@zju.edu.cn Signed-off-by: Greg Kroah-Hartman commit 39b366682126988233feb36e9da44be210701629 Author: Jérôme Pouiller Date: Tue Aug 25 10:58:28 2020 +0200 staging: wfx: add workaround for 'timeout while wake up chip' The host and the device can be connected with a called Wake-Up GPIO. When the host fall down this GPIO, it allows the device to enter in deep sleep and no communication with the device is no more possible (the device wakes up automatically on DTIM and fetch data if necessary). So, before to communicate with the device, the driver have to raise the Wake-up GPIO and then wait for an IRQ from the device. Unfortunately, old firmwares have a race in sleep/wake-up process and the device may never wake up. In this case, the IRQ is not sent and driver complains with "timeout while wake up chip". Then, the driver tries anyway to access the bus and an other error is raised by the bus. Fortunately, when the bug occurs, it is possible to fall down the IRQ and the device will eventually finish the sleep process. Then the driver can wake it up normally. The patch implements that workaround and add a retry limit in case something goes very wrong. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200825085828.399505-12-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 3b5583a98acb17006735544454aa4a9a355faa3c Author: Jérôme Pouiller Date: Tue Aug 25 10:58:27 2020 +0200 staging: wfx: remove useless extra jiffy The initial developer has feared msecs_to_jiffies() could round down the result. However, the documentation of msecs_to_jiffies() says that the result is rounded upward. So the increment of the result of msecs_to_jiffies() is not necessary. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200825085828.399505-11-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 869f18bd71ee3a2430c3bcdd6bbd1c8f9ed8a467 Author: Jérôme Pouiller Date: Tue Aug 25 10:58:26 2020 +0200 staging: wfx: enable powersave on probe In the old days, ieee80211 powersave has some impact on the Rx speed. These problems are solved for a long time now. There is no more reason to not enabling it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200825085828.399505-10-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit bfdbd5c8613593b66d2103f0c83a3b1fad47349d Author: Jérôme Pouiller Date: Tue Aug 25 10:58:25 2020 +0200 staging: wfx: scan while AP is supported The device is able to scan while running an Access Point. Just declare it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200825085828.399505-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit ce3653a8d3db096aa163fc80239d8ec1305c81fa Author: Jérôme Pouiller Date: Tue Aug 25 10:58:24 2020 +0200 staging: wfx: fix potential use before init The trace below can appear: [83613.832200] INFO: trying to register non-static key. [83613.837248] the code is fine but needs lockdep annotation. [83613.842808] turning off the locking correctness validator. [83613.848375] CPU: 3 PID: 141 Comm: kworker/3:2H Tainted: G O 5.6.13-silabs15 #2 [83613.857019] Hardware name: BCM2835 [83613.860605] Workqueue: events_highpri bh_work [wfx] [83613.865552] Backtrace: [83613.868041] [] (dump_backtrace) from [] (show_stack+0x20/0x24) [83613.881463] [] (show_stack) from [] (dump_stack+0xe8/0x114) [83613.888882] [] (dump_stack) from [] (register_lock_class+0x748/0x768) [83613.905035] [] (register_lock_class) from [] (__lock_acquire+0x88/0x13dc) [83613.924192] [] (__lock_acquire) from [] (lock_acquire+0xe8/0x274) [83613.942644] [] (lock_acquire) from [] (_raw_spin_lock_irqsave+0x58/0x6c) [83613.961714] [] (_raw_spin_lock_irqsave) from [] (skb_dequeue+0x24/0x78) [83613.974967] [] (skb_dequeue) from [] (wfx_tx_queues_get+0x96c/0x1294 [wfx]) [83613.989728] [] (wfx_tx_queues_get [wfx]) from [] (bh_work+0x454/0x26d8 [wfx]) [83614.009337] [] (bh_work [wfx]) from [] (process_one_work+0x23c/0x7ec) [83614.028141] [] (process_one_work) from [] (worker_thread+0x4c/0x55c) [83614.046861] [] (worker_thread) from [] (kthread+0x138/0x168) [83614.064876] [] (kthread) from [] (ret_from_fork+0x14/0x20) [83614.072200] Exception stack(0xecad3fb0 to 0xecad3ff8) [83614.077323] 3fa0: 00000000 00000000 00000000 00000000 [83614.085620] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [83614.093914] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 Indeed, the code of wfx_add_interface() shows that the interface is enabled to early. So, the spinlock associated with some skb_queue may not yet initialized when wfx_tx_queues_get() is called. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200825085828.399505-8-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 7373f31c4b5e382e5117b71a6792e8005c45aa50 Author: Jérôme Pouiller Date: Tue Aug 25 10:58:23 2020 +0200 staging: wfx: fix frame reordering When mac80211 debug is enabled, the trace below appears: [60744.340037] wlan0: Rx A-MPDU request on aa:bb:cc:97:60:24 tid 0 result -524 This imply that ___ieee80211_start_rx_ba_session will prematurely exit and frame reordering won't be enabled. Fixes: e5da5fbd77411 ("staging: wfx: fix CCMP/TKIP replay protection") Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200825085828.399505-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 049fde130419c93fa667d4b41e29e6e7854d4939 Author: Jérôme Pouiller Date: Tue Aug 25 10:58:22 2020 +0200 staging: wfx: drop useless field from struct wfx_tx_priv The device need to receive a skb with necessary space for the ICV. So, the driver adds this space before to send the frame. Currently, once the frame is sent, the driver restore the original content of the skb. However, this step is useless. Mac80211 don't do it when software encryption is enabled. Once we have removed this step, it appears that it is no more necessary to keep hw_key in tx_priv. Then, it is possible to simplify a bunch of code in the Tx path. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200825085828.399505-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 0a3279d39c92a231a6b73003eaa2032a521683c5 Author: Jérôme Pouiller Date: Tue Aug 25 10:58:21 2020 +0200 staging: wfx: fix support for cipher AES_CMAC (multicast PMF) When MFP is enabled, the multicast management frames are not protected, in fact. Instead, but they should include an IE containing the MMIC of the frames (i.e. a cryptographic signature). Until now, the driver didn't correctly detect this kind of frames (they are not marked protected but they are associated to a key) and didn't ask to the device to encrypt them. In add, the device is not able to generate the IE itself. Mac80211 has to generate the IE and let the device compute the MMIC. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200825085828.399505-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 152df50609a694a559a25a34ae035c31106459f8 Author: Jérôme Pouiller Date: Tue Aug 25 10:58:20 2020 +0200 staging: wfx: fix spaces around binary operators A binary operator should be followed by exactly one space. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200825085828.399505-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit d1e0de312ba9a6939a34ba7f89fe2968e1bc6227 Author: Jérôme Pouiller Date: Tue Aug 25 10:58:19 2020 +0200 staging: wfx: fix BA when MFP is disabled but BSS is MFP capable The protection of the management frames is mainly done by mac80211. However, frames for the management of the BlockAck sessions are directly sent by the device. These frames have to be protected if MFP is in use. So the driver has to pass the MFP configuration to the device. Until now, the driver directly read the RSN IE of the BSS. However, it didn't work when the BSS was MFP capable (ieee80211w=1) and the local device has disabled MFP (ieee80211w=0). This patch read the MFP information directly from the struct ieee80211_sta. This information take into account the MFP negotiated during the association. In addition, the code is far simpler. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200825085828.399505-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c566f1c79e981861a7552d7775bf9bcdb8812824 Author: Jérôme Pouiller Date: Tue Aug 25 10:58:18 2020 +0200 staging: wfx: improve usage of hif_map_link() Until now, hif_map_link() get as argument the raw value for map_link_flags when map_link_flags is defined as a bitfield. It was error prone. Now hif_map_link() takes explicit value for every flags of the struct map_link_flags. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200825085828.399505-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 268bceec1684932e194ae87877dcc73f534d921c Author: Jérôme Pouiller Date: Tue Aug 25 10:58:17 2020 +0200 staging: wfx: fix BA when device is AP and MFP is enabled The protection of the management frames is mainly done by mac80211. However, frames for the management of the BlockAck sessions are directly sent by the device. These frames have to be protected if MFP is in use. So the driver has to pass the MFP configuration to the device. Until now, the BlockAck management frames were completely unprotected whatever the status of the MFP negotiation. So, some devices dropped these frames. The device has two knobs to control the MFP. One global and one per station. Normally, the driver should always enable global MFP. Then it should enable MFP on every station with which MFP was successfully negotiated. Unfortunately, the older firmwares only provide the global control. So, this patch enable global MFP as it is exposed in the beacon. Then it marks every station with which the MFP is effective. Thus, the support for the old firmwares is not so bad. It may only encounter some difficulties to negotiate BA sessions when the local device (the AP) is MFP capable (ieee80211w=1) but the station is not. The only solution for this case is to upgrade the firmware. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200825085828.399505-1-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1eb76a003169ee31760aa11e52625cc74702820b Author: Steff Richards Date: Mon Aug 24 18:53:56 2020 +0200 staging: wlan-ng: fix alignment to match open parentheses Indent a number of arguments so that they align with the opening parentheses of the function calls. Issues found by checkpatch. Signed-off-by: Steff Richards Link: https://lore.kernel.org/r/20200824165356.GA5204@steffpad Signed-off-by: Greg Kroah-Hartman commit f6a1a425cbb74f4836f2e21e0110330c65e33ad2 Author: Ethan Edwards Date: Mon Aug 24 20:29:55 2020 -0400 drivers: staging: comedi: fixed duplicate words from checkpatch Fixed various different checkpatch duplicate word warnings, the TODO file said to fix checkpatch warnings. Signed-off-by: Ethan Edwards Link: https://lore.kernel.org/r/20200825002955.e3wvtwsoqqbc2cvl@archlaptop.localdomain Signed-off-by: Greg Kroah-Hartman commit dbd8c649474db174bbac0c4a6996cec5656ace50 Author: Timo A. Aranjo Date: Tue Aug 25 20:21:01 2020 -0500 Staging: sm750fb: Fix basic coding style issues The word "enought" was changed to read as "enough". In addition to this, there was a missing new-line after varaible declarations within a function. Signed-off-by: Timo A. Aranjo Link: https://lore.kernel.org/r/20200826012101.12162-1-timo.aranjo@aol.com Signed-off-by: Greg Kroah-Hartman commit e6627a5e82f9d00b95a619aa0a3cbc5809ef1aac Author: Mauro Carvalho Chehab Date: Wed Aug 26 11:32:12 2020 +0200 staging: hikey9xx: update references inside the yaml files The references inside those files were not assuming that they would end at the staging tree. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/809bce085b0a9a9ede74d619d160e1e04723709d.1598434228.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit e4cebcae751874f46a1cb55eb5e2c1b367de3669 Author: Colin Ian King Date: Thu Aug 20 08:51:36 2020 +0100 staging: spmi: hisi-spmi-controller: fix spelling mistake "controlller" -> "controller" There is a spelling mistake in the MODULE_ALIAS, fix it. Signed-off-by: Colin Ian King Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20200820075136.186199-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 280ec2626d747acf2790f9659edfe5385094eddb Author: Colin Ian King Date: Tue Aug 18 17:46:54 2020 +0100 staging: kpc2000: kpc_dma: fix spelling mistake "for for" -> "for" There are a couple of duplicated "for" spelling mistakes in dev_err error messages. Fix these. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200818164654.381588-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 7cd7edb89437457ec36ffdbb970cc314d00c4aba Author: Marek Szyprowski Date: Wed Aug 26 08:33:12 2020 +0200 misc: fastrpc: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200826063316.23486-29-m.szyprowski@samsung.com Signed-off-by: Greg Kroah-Hartman commit fe69795e84a553b838504e0acdb4a57c3fbdd200 Author: Denis Efremov Date: Fri Aug 28 00:34:21 2020 +0300 char: mspec: Use kvzalloc() in mspec_mmap() Use kvzalloc() in mspec_mmap() instead of open-coding it. Signed-off-by: Denis Efremov Link: https://lore.kernel.org/r/20200827213421.50429-1-efremov@linux.com Signed-off-by: Greg Kroah-Hartman commit 284f52ac1c6cfa1b2e5c11b84653dd90e4e91de7 Author: Christian Eggers Date: Tue Jul 28 11:29:59 2020 +0200 eeprom: at25: set minimum read/write access stride to 1 SPI eeproms are addressed by byte. Signed-off-by: Christian Eggers Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200728092959.24600-1-ceggers@arri.de Signed-off-by: Greg Kroah-Hartman commit d3cd0071a89a085a2d578b6a9e31db10469501c6 Author: Christian Eggers Date: Mon Jul 27 13:12:18 2020 +0200 eeprom: at25: allow page sizes greater than 16 bit Storage technologies like FRAM have no "write pages", the whole chip can be written within one SPI transfer. For these chips, the page size can be set equal to the device size. Currently available devices are already bigger than 64 kiB. Signed-off-by: Christian Eggers Link: https://lore.kernel.org/r/20200727111218.26926-1-ceggers@arri.de Signed-off-by: Greg Kroah-Hartman commit b7a4f80bc316a56d6ec8750e93e66f42431ed960 Author: dinghao.liu@zju.edu.cn Date: Thu Aug 20 14:38:17 2020 +0800 backlight: sky81452-backlight: Fix refcount imbalance on error When of_property_read_u32_array() returns an error code, a pairing refcount decrement is needed to keep np's refcount balanced. Fixes: f705806c9f355 ("backlight: Add support Skyworks SKY81452 backlight driver") Signed-off-by: Dinghao Liu Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit b6e5aac243b9d178b3c944fa69ffbd248ab150c0 Author: Linus Walleij Date: Sat Aug 15 12:26:27 2020 +0200 ARM: dts: ux500-golden: Add S6E63M0 DSI display Add the Samsung S6E63M0 video mode DSI display to the Samsung GT-S8190/Golden mobile phone. Signed-off-by: Linus Walleij Cc: Stephan Gerhold Link: https://lore.kernel.org/r/20200815102627.3532646-1-linus.walleij@linaro.org commit 04b6ff5f25dece9b0ee244aa768b251cfe855c85 Author: Du Huanpeng Date: Sat Aug 22 09:47:28 2020 +0800 serial: 8250_pci: Add WCH384_8S 8 port serial device Add PCI id for WCH384_8S 8 port PCI-E serial card. because this card has so many ports, you may have to check these two options before use it: CONFIG_SERIAL_8250_RUNTIME_UARTS CONFIG_SERIAL_8250_NR_UARTS Signed-off-by: Du Huanpeng Link: https://lore.kernel.org/r/1598060848-27807-1-git-send-email-u74147@gmail.com Signed-off-by: Greg Kroah-Hartman commit c7ac46dac744455047438de7acc63e1236536a83 Author: Viresh Kumar Date: Fri Aug 28 11:37:52 2020 +0530 tty: serial: qcom_geni_serial: Unconditionally call dev_pm_opp_of_remove_table() dev_pm_opp_of_remove_table() doesn't report any errors when it fails to find the OPP table with error -ENODEV (i.e. OPP table not present for the device). And we can call dev_pm_opp_of_remove_table() unconditionally here. While at it, create a new label to put clkname on errors. Signed-off-by: Viresh Kumar Link: https://lore.kernel.org/r/583003f385a103b4c089ce8144a215c58cfb117a.1598594714.git.viresh.kumar@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9cfbf7a6416b5fa2b88ac337d092be82778a0469 Author: Alex Dewar Date: Mon Aug 24 23:39:33 2020 +0100 serial: core: don't use snprintf() for formatting sysfs attrs As per the documentation (Documentation/filesystems/sysfs.rst), snprintf() should not be used for formatting values returned by sysfs. For all of the instances in serial_core.c, we know that the string will be Link: https://lore.kernel.org/r/20200824223932.27709-1-alex.dewar90@gmail.com Signed-off-by: Greg Kroah-Hartman commit c9fe14ac8bd6c329d84e1f88c1b89cb1d5fb982a Author: Fabio Estevam Date: Tue Aug 18 19:44:57 2020 -0300 serial: fsl_lpuart: Fix typo in "transfer" Fix two occurrences where "transfer" is spelled incorrectly. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20200818224457.16507-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3ed8e1c2ac9914a2fcb08ec13476b85319536cea Author: Badhri Jagan Sridharan Date: Tue Aug 18 12:27:58 2020 -0700 usb: typec: tcpm: Migrate workqueue to RT priority for processing events "tReceiverResponse 15 ms Section 6.6.2 The receiver of a Message requiring a response Shall respond within tReceiverResponse in order to ensure that the sender’s SenderResponseTimer does not expire." When the cpu complex is busy running other lower priority work items, TCPM's work queue sometimes does not get scheduled on time to meet the above requirement from the spec. Moving to kthread_work apis to run with real time priority. Further, as observed in 1ff688209e2e, moving to hrtimers to overcome scheduling latency while scheduling the delayed work. TCPM has three work streams: 1. tcpm_state_machine 2. vdm_state_machine 3. event_work tcpm_state_machine and vdm_state_machine both schedule work in future i.e. delayed. Hence each of them have a corresponding hrtimer, tcpm_state_machine_timer & vdm_state_machine_timer. When work is queued right away kthread_queue_work is used. Else, the relevant timer is programmed and made to queue the kthread_work upon timer expiry. kthread_create_worker only creates one kthread worker thread, hence single threadedness of workqueue is retained. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200818192758.2562908-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit aefc66afe42bcae01743c0b3c5addd089263801b Author: Badhri Jagan Sridharan Date: Mon Aug 17 11:38:28 2020 -0700 usb: typec: pd: Fix formatting in pd.h header Replacing spaces with tabs for PD_T_* constants. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200817183828.1895015-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 6bbe2a90a0bb4af8dd99c3565e907fe9b5e7fd88 Author: Badhri Jagan Sridharan Date: Mon Aug 17 11:38:27 2020 -0700 usb: typec: tcpm: During PR_SWAP, source caps should be sent only after tSwapSourceStart The patch addresses the compliance test failures while running TD.PD.CP.E3, TD.PD.CP.E4, TD.PD.CP.E5 of the "Deterministic PD Compliance MOI" test plan published in https://www.usb.org/usbc. For a product to be Type-C compliant, it's expected that these tests are run on usb.org certified Type-C compliance tester as mentioned in https://www.usb.org/usbc. The purpose of the tests TD.PD.CP.E3, TD.PD.CP.E4, TD.PD.CP.E5 is to verify the PR_SWAP response of the device. While doing so, the test asserts that Source Capabilities message is NOT received from the test device within tSwapSourceStart min (20 ms) from the time the last bit of GoodCRC corresponding to the RS_RDY message sent by the UUT was sent. If it does then the test fails. This is in line with the requirements from the USB Power Delivery Specification Revision 3.0, Version 1.2: "6.6.8.1 SwapSourceStartTimer The SwapSourceStartTimer Shall be used by the new Source, after a Power Role Swap or Fast Role Swap, to ensure that it does not send Source_Capabilities Message before the new Sink is ready to receive the Source_Capabilities Message. The new Source Shall Not send the Source_Capabilities Message earlier than tSwapSourceStart after the last bit of the EOP of GoodCRC Message sent in response to the PS_RDY Message sent by the new Source indicating that its power supply is ready." The patch makes sure that TCPM does not send the Source_Capabilities Message within tSwapSourceStart(20ms) by transitioning into SRC_STARTUP only after tSwapSourceStart(20ms). Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200817183828.1895015-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit e199d946913a5b06677c2b2543e99a298d723452 Author: Jing Xiangfeng Date: Wed Aug 19 09:23:16 2020 +0800 USB: usblcd: Remove the superfluous break Remove the superfuous break, as there is a 'return' before it. Signed-off-by: Jing Xiangfeng Link: https://lore.kernel.org/r/20200819012316.170388-1-jingxiangfeng@huawei.com Signed-off-by: Greg Kroah-Hartman commit 5b9bacf28a973a6b16510493416baeefa2c06289 Author: Dirk Behme Date: Thu Aug 27 11:23:30 2020 +0200 i2c: rcar: Auto select RESET_CONTROLLER The i2c-rcar driver utilizes the Generic Reset Controller kernel feature, so select the RESET_CONTROLLER option when the I2C_RCAR option is selected with a Gen3 SoC. Fixes: 2b16fd63059ab9 ("i2c: rcar: handle RXDMA HW behaviour on Gen3") Signed-off-by: Dirk Behme Signed-off-by: Andy Lowe [erosca: Add "if ARCH_RCAR_GEN3" per Wolfram's request] Signed-off-by: Eugeniu Rosca Signed-off-by: Wolfram Sang commit 9e3b184b3b4fff3451b4a4089a727988ca14bee3 Author: Jaakko Laine Date: Thu Aug 27 17:48:48 2020 +0300 i2c: xiic: Support forcing single-master in DT I2C master operating in multimaster mode can get stuck indefinitely if I2C start is detected on bus, but no master has a transaction going. This is a weakness in I2C standard, which defines no way to recover, since all masters are indefinitely disallowed from interrupting the currently operating master. A start condition can be created for example by an electromagnetic discharge applied near physical I2C lines. Or a already operating master could get reset immediately after sending a start. If it is known during device tree creation that only a single I2C master will be present on the bus, this deadlock of the I2C bus could be avoided in the driver by ignoring the bus_is_busy register of the xiic, since bus can never be reserved by any other master. This patch adds this support for detecting single-master flag in device tree and when provided, improves I2C reliability by ignoring the therefore unnecessary xiic bus_is_busy register. Error can be reproduced by pulling I2C SDA -line temporarily low by shorting it to ground, while linux I2C master is operating on it using the xiic driver. The application using the bus will start receiving linux error code 16: "Device or resource busy" indefinitely: kernel: pca953x 0-0020: failed writing register app: Error writing file, error: 16 With multi-master disabled device will instead receive error code 5: "I/O error" while SDA is grounded, but recover normal operation once short is removed. kernel: pca953x 0-0020: failed reading register app: Error reading file, error: 5 Signed-off-by: Jaakko Laine Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit 9106e45ceaafd3c3a7264c68dc5dc08874f6c8ce Author: Jaakko Laine Date: Thu Aug 27 17:48:47 2020 +0300 i2c: xiic: Improve struct memory alignment xiic_i2c struct alignment causes the struct to take more space in memory than strictly required. Move state -member to end of struct to get less padding. Signed-off-by: Jaakko Laine Suggested-by: Michal Simek Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit 0a9336ee133deb39f962e16b5eca2a48fec4eb52 Author: Jaakko Laine Date: Thu Aug 27 17:48:46 2020 +0300 i2c: xiic: Change code alignment to 1 space only Alignment removed and replaced with 1 space only to reduce need for future alignment changes affecting multiple lines, when new variables are added. Signed-off-by: Jaakko Laine Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit bbb2832620ac4e136416aa97af7310636422dea9 Author: Herbert Xu Date: Fri Aug 21 23:59:12 2020 +1000 crypto: stm32 - Fix sparse warnings This patch fixes most of the sparse endianness warnings in stm32. The patch itself doesn't change anything apart from markings, but there is some questionable code in stm32_cryp_check_ctr_counter. That function operates on the counters as if they're in CPU order, however, they're then written out as big-endian. This looks like a genuine bug. Therefore I've left that warning alone until someone can confirm that this really does work as intended on little-endian. Signed-off-by: Herbert Xu commit b7b57a5643c2ae45afe6aa5e73363b553cacd14b Author: dinghao.liu@zju.edu.cn Date: Fri Aug 21 16:15:13 2020 +0800 crypto: ccree - fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. However, users of cc_pm_get(), a direct wrapper of pm_runtime_get_sync(), assume that PM usage counter will not change on error. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Fixes: 8c7849a30255c ("crypto: ccree - simplify Runtime PM handling") Signed-off-by: Dinghao Liu Signed-off-by: Herbert Xu commit 39340cf97fef32667e8714d0fcc247f02d8e2b97 Author: Herbert Xu Date: Fri Aug 21 17:52:04 2020 +1000 crypto: mediatek - Fix endianness bugs and sparse warnings This patch squashes all the sparse warnings in mediatek, some of which appear to be genuine bugs. In particular, previously on BE the keys and IVs all get 32-bit swabbed which can't be right because they don't get swabbed on LE. I presume LE is the one that actually works. Another funky thing is that the GHASH key gets swabbed on LE. This makes no sense but I'm presuming someone actually tested this on LE so I'm preserving the swabbing. Someone needs to test this though as it is entirely possible that GCM is the only thing that worked on BE but not LE. Signed-off-by: Herbert Xu commit 9fae1f05b849221d109ce669b054d03b3257f5c4 Author: Herbert Xu Date: Fri Aug 21 14:55:47 2020 +1000 crypto: hifn_795x - Remove 64-bit build-time check As we're already using Kconfig to disable 64-bit builds for this driver, there is no point in doing it again in the source code. Signed-off-by: Herbert Xu commit 9fcddaf2e28d779cb946d23838ba6d50f299aa80 Author: George Acosta Date: Thu Aug 20 22:12:08 2020 -0500 crypto: cavium/nitrox - add an error message to explain the failure of pci_request_mem_regions Provide an error message for users when pci_request_mem_regions failed. Signed-off-by: George Acosta Signed-off-by: Herbert Xu commit ea066b7a3ddf1e4e5ae749495f0adf12766188b4 Author: YueHaibing Date: Tue Aug 18 22:00:01 2020 +0800 crypto: sa2ul - Fix pointer-to-int-cast warning drivers/crypto/sa2ul.c: In function ‘sa_sha_init’: drivers/crypto/sa2ul.c:1486:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] crypto_ahash_digestsize(tfm), (u64)rctx); ^ ./include/linux/dev_printk.h:123:47: note: in definition of macro ‘dev_dbg’ dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ ^~~~~~~~~~~ Use %p to print rctx pointer. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit f858ddef5a57fb0597bb23f69edda3477d47e30a Author: Herbert Xu Date: Tue Aug 18 18:25:38 2020 +1000 crypto: ahash - Remove AHASH_REQUEST_ON_STACK This patch removes AHASH_REQUEST_ON_STACK which is unused. Signed-off-by: Herbert Xu Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit b00ba76a03a02c23494644d2ccd389fdc411f9e9 Author: Herbert Xu Date: Tue Aug 18 18:25:36 2020 +1000 crypto: ahash - Add ahash_alg_instance This patch adds the helper ahash_alg_instance which is used to convert a crypto_ahash object into its corresponding ahash_instance. Signed-off-by: Herbert Xu commit e73d340db6448013ac219d105654d2b9868a8dd2 Author: Herbert Xu Date: Tue Aug 18 18:25:34 2020 +1000 crypto: ahash - Add init_tfm/exit_tfm This patch adds the type-safe init_tfm/exit_tfm functions to the ahash interface. This is meant to replace the unsafe cra_init and cra_exit interface. Signed-off-by: Herbert Xu commit 3393649977f9a8847c659e282ea290d4b703295c Merge: cbc2e82932ae0 ced026e959bec Author: Dave Airlie Date: Fri Aug 28 13:51:30 2020 +1000 Merge tag 'drm-intel-next-2020-08-24-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next UAPI Changes: - Introduce a mechanism to extend execbuf2 (Lionel) - Add syncobj timeline support (Lionel) Driver Changes: - Limit stolen mem usage on the compressed frame buffer (Ville) - Some clean-up around display's cdclk (Ville) - Some DDI changes for better DP link training according to spec (Imre) - Provide the perf pmu.module (Chris) - Remove dobious Valleyview PCI IDs (Alexei) - Add new display power saving feature for gen12+ called HOBL (Jose) - Move SKL's clock gating w/a to skl_init_clock_gating() (Ville) - Rocket Lake display additions (Matt) - Selftest: temporarily downgrade on severity of frequency scaling tests (Chris) - Introduce a new display workaround for fixing FLR related issues on new PCH. (Jose) - Temporarily disable FBC on TGL. It was the culprit of random underruns. (Uma). - Copy default modparams to mock i915_device (Chris) - Add compiler paranoia for checking HWSP values (Chris) - Remove useless gen check before calling intel_rps_boost (Chris) - Fix a null pointer dereference (Chris) - Add a couple of missing i915_active_fini() (Chris) - Update TGL display power's bw_buddy table according to update spec (Matt) - Fix couple wrong return values (Tianjia) - Selftest: Avoid passing random 0 into ilog2 (George) - Many Tiger Lake display fixes and improvements for Type-C and DP compliance (Imre, Jose) - Start the addition of PSR2 selective fetch (Jose) - Update a few DMC and HuC firmware versions (Jose) - Add gen11+ w/a to fix underuns (Matt) - Fix cmd parser desc matching with mask (Mika) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20200826232733.GA129053@intel.com commit cbc2e82932ae01d3e8e81dd17b9e8ef8564c606e Merge: d012a7190fc1f cd6da0b113512 Author: Dave Airlie Date: Fri Aug 28 12:37:46 2020 +1000 Merge tag 'drm-misc-next-2020-08-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.10: UAPI Changes: Cross-subsystem Changes: Core Changes: - ttm: various cleanups and reworks of the API Driver Changes: - ast: various cleanups - gma500: A few fixes, conversion to GPIOd API - hisilicon: Change of maintainer, various reworks - ingenic: Clock handling and formats support improvements - mcde: improvements to the DSI support - mgag200: Support G200 desktop cards - mxsfb: Support the i.MX7 and i.MX8M and the alpha plane - panfrost: support devfreq - ps8640: Retrieve the EDID from eDP control, misc improvements - tidss: Add a workaround for AM65xx YUV formats handling - virtio: a few cleanups, support for virtio-gpu exported resources - bridges: Support the chained bridges on more drivers, new bridges: Toshiba TC358762, Toshiba TC358775, Lontium LT9611 - panels: Convert to dev_ based logging, read orientation from the DT, various fixes, new panels: Mantix MLAF057WE51-X, Chefree CH101OLHLWH-002, Powertip PH800480T013, KingDisplay KD116N21-30NV-A010 Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200827155517.do6emeacetpturli@gilmour.lan commit 5aa8e76476766c48a4820f57015935429a50b928 Author: Stu Hsieh Date: Wed Aug 19 10:17:49 2020 +0200 drm/mediatek: dpi/dsi: Change the getting possible_crtc way For current mediatek dsi encoder, its possible crtc is fixed in crtc 0, and mediatek dpi encoder's possible crtc is fixed in crtc 1. In some SoC the possible crtc is not fixed in this case, so search pipeline information to find out the correct possible crtc. Signed-off-by: Stu Hsieh Signed-off-by: Jitao Shi Signed-off-by: Frank Wunderlich Signed-off-by: Chun-Kuang Hu commit 5d007a09f3c8b9b1421bf267d16d79fd9a11930b Author: Linus Walleij Date: Fri Aug 14 17:45:29 2020 +0200 ARM: versatile: Remove Integrator and Realview from PHYS_OFFSET Both Integrator and Realview exclusively use ARM_PATCH_PHYS_VIRT these days so drop them from the PHYS_OFFSET Kconfig option. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200814154529.3487163-1-linus.walleij@linaro.org commit 44ff56c022c03e69c0eae1d25cf4107be3875630 Author: Dan Murphy Date: Thu Jul 30 09:31:21 2020 -0500 power: bq27xxx: Update to SPDX licensing Update the license to the SPDX licensing format. Signed-off-by: Dan Murphy Signed-off-by: Sebastian Reichel commit c24b9a741b5f292112f2f75091f06a561b665770 Author: Colin Ian King Date: Wed Aug 5 11:38:57 2020 +0100 power: supply: pm2301_charger: fix spelling mistake "chargind" -> "charging" There is a spelling mistake in a dev_dbg message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel commit 2c4bf6983402660569241991b86b6ca72af41701 Author: Ikjoon Jang Date: Thu Aug 13 13:10:07 2020 +0800 power: supply: sbs-battery: combine get_presence_and_health This patch enables calling sbs_get_battery_presence_and_health() without checking its chip type. No functional changes. Signed-off-by: Ikjoon Jang Signed-off-by: Sebastian Reichel commit 52bef41f606b036541f71f529819e5889ab1bbeb Author: Ikjoon Jang Date: Tue Aug 11 12:41:41 2020 +0800 power: supply: sbs-battery: remove unused enable_detection flags Remove unused enable_detection flag which is always true after the device is proved. Signed-off-by: Ikjoon Jang Signed-off-by: Sebastian Reichel commit 7ae0451e2e6c29ff9fc17754b1129d9491177634 Author: Alexander Aring Date: Thu Aug 27 15:02:54 2020 -0400 fs: dlm: use free_con to free connection This patch use free_con() functionality to free the listen connection if listen fails. It also fixes an issue that a freed resource is still part of the connection_hash as hlist_del() is not called in this case. The only difference is that free_con() handles othercon as well, but this is never been set for the listen connection. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 948c47e9bcb6a42229cb1da1cc350c887a33ebb8 Author: Alexander Aring Date: Thu Aug 27 15:02:53 2020 -0400 fs: dlm: handle possible othercon writequeues This patch adds free of possible other writequeue entries in othercon member of struct connection. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 0de984323ac56aa420e6f28d7ce205a293fdb649 Author: Alexander Aring Date: Thu Aug 27 15:02:52 2020 -0400 fs: dlm: move free writequeue into con free This patch just move the free of struct connection member writequeue into the functionality when struct connection will be freed instead of doing two iterations. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 3d2825c8c6105b0f36f3ff72760799fa2e71420e Author: Alexander Aring Date: Thu Aug 27 15:02:51 2020 -0400 fs: dlm: fix configfs memory leak This patch fixes the following memory detected by kmemleak and umount gfs2 filesystem which removed the last lockspace: unreferenced object 0xffff9264f482f600 (size 192): comm "dlm_controld", pid 325, jiffies 4294690276 (age 48.136s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 6e 6f 64 65 73 00 00 00 ........nodes... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000060481d7>] make_space+0x41/0x130 [<000000008d905d46>] configfs_mkdir+0x1a2/0x5f0 [<00000000729502cf>] vfs_mkdir+0x155/0x210 [<000000000369bcf1>] do_mkdirat+0x6d/0x110 [<00000000cc478a33>] do_syscall_64+0x33/0x40 [<00000000ce9ccf01>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 The patch just remembers the "nodes" entry pointer in space as I think it's created as subdirectory when parent "spaces" is created. In function drop_space() we will lost the pointer reference to nds because configfs_remove_default_groups(). However as this subdirectory is always available when "spaces" exists it will just be freed when "spaces" will be freed. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 043697f030c5c7889682c82f08e05adeb613939a Author: Alexander Aring Date: Thu Aug 27 15:02:50 2020 -0400 fs: dlm: fix dlm_local_addr memory leak This patch fixes the following memory detected by kmemleak and umount gfs2 filesystem which removed the last lockspace: unreferenced object 0xffff9264f4f48f00 (size 128): comm "mount", pid 425, jiffies 4294690253 (age 48.159s) hex dump (first 32 bytes): 02 00 52 48 c0 a8 7a fb 00 00 00 00 00 00 00 00 ..RH..z......... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000067a34940>] kmemdup+0x18/0x40 [<00000000c935f9ab>] init_local+0x4c/0xa0 [<00000000bbd286ef>] dlm_lowcomms_start+0x28/0x160 [<00000000a86625cb>] dlm_new_lockspace+0x7e/0xb80 [<000000008df6cd63>] gdlm_mount+0x1cc/0x5de [<00000000b67df8c7>] gfs2_lm_mount.constprop.0+0x1a3/0x1d3 [<000000006642ac5e>] gfs2_fill_super+0x717/0xba9 [<00000000d3ab7118>] get_tree_bdev+0x17f/0x280 [<000000001975926e>] gfs2_get_tree+0x21/0x90 [<00000000561ce1c4>] vfs_get_tree+0x28/0xc0 [<000000007fecaf63>] path_mount+0x434/0xc00 [<00000000636b9594>] __x64_sys_mount+0xe3/0x120 [<00000000cc478a33>] do_syscall_64+0x33/0x40 [<00000000ce9ccf01>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit a47666eb763cc1b8b48bd88185ca56676f40ca89 Author: Alexander Aring Date: Thu Aug 27 15:02:49 2020 -0400 fs: dlm: make connection hash lockless There are some problems with the connections_lock. During my experiements I saw sometimes circular dependencies with sock_lock. The reason here might be code parts which runs nodeid2con() before or after sock_lock is acquired. Another issue are missing locks in for_conn() iteration. Maybe this works fine because for_conn() is running in a context where connection_hash cannot be manipulated by others anymore. However this patch changes the connection_hash to be protected by sleepable rcu. The hotpath function __find_con() is implemented lockless as it is only a reader of connection_hash and this hopefully fixes the circular locking dependencies. The iteration for_conn() will still call some sleepable functionality, that's why we use sleepable rcu in this case. This patch removes the kmemcache functionality as I think I need to make some free() functionality via call_rcu(). However allocation time isn't here an issue. The dlm_allow_con will not be protected by a lock anymore as I think it's enough to just set and flush workqueues afterwards. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit aa7ab1e20882b04fc3e45da77a9dad5cbbefba99 Author: Alexander Aring Date: Thu Aug 27 15:02:48 2020 -0400 fs: dlm: synchronize dlm before shutdown This patch moves the dlm workqueue dlm synchronization before shutdown handling. The patch just flushes all pending work before starting to shutdown the connection. At least for the send_workqeue we should flush the workqueue to make sure there is no new connection handling going on as dlm_allow_conn switch is turned to false before. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 8ec90bfd1aeb39f44c3e704aaa9ca88c52e6866a Author: Ross Zwisler Date: Thu Aug 27 11:09:47 2020 -0600 selftests: mount: add nosymfollow tests Add tests for the new 'nosymfollow' mount option. We test to make sure that symlink traversal fails with ELOOP when 'nosymfollow' is set, but that readlink(2) and realpath(3) still work as expected. We also verify that statfs(2) correctly returns ST_NOSYMFOLLOW when we are mounted with the 'nosymfollow' option. Signed-off-by: Ross Zwisler Signed-off-by: Al Viro commit dab741e0e02bd3c4f5e2e97be74b39df2523fc6e Author: Mattias Nissler Date: Thu Aug 27 11:09:46 2020 -0600 Add a "nosymfollow" mount option. For mounts that have the new "nosymfollow" option, don't follow symlinks when resolving paths. The new option is similar in spirit to the existing "nodev", "noexec", and "nosuid" options, as well as to the LOOKUP_NO_SYMLINKS resolve flag in the openat2(2) syscall. Various BSD variants have been supporting the "nosymfollow" mount option for a long time with equivalent implementations. Note that symlinks may still be created on file systems mounted with the "nosymfollow" option present. readlink() remains functional, so user space code that is aware of symlinks can still choose to follow them explicitly. Setting the "nosymfollow" mount option helps prevent privileged writers from modifying files unintentionally in case there is an unexpected link along the accessed path. The "nosymfollow" option is thus useful as a defensive measure for systems that need to deal with untrusted file systems in privileged contexts. More information on the history and motivation for this patch can be found here: https://sites.google.com/a/chromium.org/dev/chromium-os/chromiumos-design-docs/hardening-against-malicious-stateful-data#TOC-Restricting-symlink-traversal Signed-off-by: Mattias Nissler Signed-off-by: Ross Zwisler Reviewed-by: Aleksa Sarai Signed-off-by: Al Viro commit fd22781648080cc400772b3c68aa6b059d2d5420 Author: Dan Carpenter Date: Wed Aug 26 14:37:59 2020 +0300 memory: emif: Remove bogus debugfs error handling Callers are generally not supposed to check the return values from debugfs functions. Debugfs functions never return NULL so this error handling will never trigger. (Historically debugfs functions used to return a mix of NULL and error pointers but it was eventually deemed too complicated for something which wasn't intended to be used in normal situations). Delete all the error handling. Signed-off-by: Dan Carpenter Acked-by: Santosh Shilimkar Link: https://lore.kernel.org/r/20200826113759.GF393664@mwanda Signed-off-by: Krzysztof Kozlowski commit 13d029ee51da365aa9c859db0c7395129252bde8 Author: YueHaibing Date: Thu Aug 27 20:53:16 2020 +0800 memory: omap-gpmc: Fix build error without CONFIG_OF If CONFIG_OF is n, gcc fails: drivers/memory/omap-gpmc.o: In function `gpmc_omap_onenand_set_timings': omap-gpmc.c:(.text+0x2a88): undefined reference to `gpmc_read_settings_dt' Add gpmc_read_settings_dt() helper function, which zero the gpmc_settings so the caller doesn't proceed with random/invalid settings. Fixes: a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT") Signed-off-by: YueHaibing Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20200827125316.20780-1-yuehaibing@huawei.com Signed-off-by: Krzysztof Kozlowski commit be2919d8355e4651386ad2fb61ddb6efe4533b1b Author: Sebastian Reichel Date: Sat Jun 6 00:44:00 2020 +0200 power: supply: gpio-charger: add charge-current-limit feature Add new charge-current-limit feature to gpio-charger. Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel commit caab25dc9e36e83d3ff870cabd80b811ed02242d Author: José Roberto de Souza Date: Tue Aug 25 10:13:31 2020 -0700 drm/i915/display: Fix DRRS debugfs Supported and enabled are different things so printing both. v3: using drrs->type instead of vbt.drrs_type Cc: Anshuman Gupta Cc: Srinivas K Cc: Hariom Pandey Reviewed-by: Anshuman Gupta Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200825171331.17971-3-jose.souza@intel.com commit 8040fefa387c5aea14d2f5753d7fbdd3344f2b7f Author: José Roberto de Souza Date: Tue Aug 25 10:13:30 2020 -0700 drm/i915/display: Disable DRRS when needed in fastsets Changes in the configuration could cause PSR to be compatible and enabled so driver must also be able to disable DRRS when doing fastsets. v2: Fixed name of DRRS compute function (Anshuman) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/209 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/173 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/209 Cc: Srinivas K Cc: Hariom Pandey Cc: Anshuman Gupta Signed-off-by: José Roberto de Souza Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20200825171331.17971-2-jose.souza@intel.com commit be2dd718ed4ad302708464d6f60a228a7eb7e344 Author: José Roberto de Souza Date: Tue Aug 25 10:13:29 2020 -0700 drm/i915/display: Compute has_drrs after compute has_psr DRRS and PSR can't be enable together, so giving preference to PSR as it allows more power-savings by complete shutting down display, so to guarantee this, it should compute DRRS state after compute PSR. Cc: Srinivas K Cc: Hariom Pandey Reviewed-by: Anshuman Gupta Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200825171331.17971-1-jose.souza@intel.com commit 3bc46a083fa9f475dd2e0ab8717d9839b070b8d9 Author: Maxime Ripard Date: Sat Jul 4 15:38:03 2020 +0200 drm/sun4i: lvds: Invert the LVDS polarity The LVDS controller can invert the polarity / lanes of the LVDS output. The default polarity causes some issues on some panels. However, U-Boot has always used the opposite polarity without any reported issue, and the only currently supported LVDS panel in-tree (the TBS A711) seems to be able to work with both settings. Let's just use the same polarity than U-Boot to be more consistent and hopefully support all the panels. Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Cc: Ondrej Jirman Link: https://patchwork.freedesktop.org/patch/msgid/20200704133803.37330-1-maxime@cerno.tech commit 818ae79a50da560c645e022170bed8401eea452e Author: Thierry Reding Date: Tue Jul 21 17:10:55 2020 +0200 arm64: tegra: Properly size register regions for GPU on Tegra194 Memory I/O regions for the GV11B found on Tegra194 are 16 MiB rather than 256 MiB. Reported-by: Terje Bergström Signed-off-by: Thierry Reding Reviewed-By: Terje Bergström Signed-off-by: Thierry Reding commit 562da8b494c4e2f72d0789a03e6ccd9dc14d3f25 Author: Thierry Reding Date: Thu Aug 6 17:42:45 2020 +0200 arm64: tegra: Use valid PWM period for VDD_GPU on Tegra210 The PWM on Tegra210 can run at a maximum frequency of 48 MHz and cannot reach the minimum period is 5334 ns. The currently configured period of 4880 ns is not within the valid range, so set it to 8000 ns. This value was taken from the downstream DTS files and seems to work fine. Signed-off-by: Thierry Reding commit 0cc6ba3ce87c2845689599a87ee993d1aec9ca89 Author: Thierry Reding Date: Thu Aug 6 17:41:11 2020 +0200 arm64: tegra: Describe display controller outputs for Tegra210 Both display controllers can drive both DSI and both SOR outputs on Tegra210. Describe this in device tree so that the operating system doesn't have to guess. Signed-off-by: Thierry Reding commit da415b71cd4fe0f02dbe7c044392e74c6d091e26 Author: Thierry Reding Date: Thu Aug 6 17:41:10 2020 +0200 arm64: tegra: Disable SD card write-protection on Jetson Nano There is no GPIO hooked up to the write-protection pin of the SD slot. Make sure to describe this properly in device tree to avoid errors or warnings being emitted by the operating system. Signed-off-by: Thierry Reding commit 78bc57ffa809222ff56c05181afe38fea1068ad8 Author: Thierry Reding Date: Thu Aug 6 17:41:09 2020 +0200 arm64: tegra: Add VBUS supply for micro USB port on Jetson Nano The VBUS supply for the micro USB port on Jetson Nano is derived from the main system supply and always on. Describe in nevertheless to fix warnings during boot. Signed-off-by: Thierry Reding commit a41315610bab6f152280975500f33e3b069e10ff Author: Thierry Reding Date: Thu Aug 6 17:41:08 2020 +0200 arm64: tegra: Wire up pinctrl states for all DPAUX controllers All four DPAUX controllers on Tegra194 control the pin configuration of their companion I2C controllers. Wire up all the pinctrl states for the I2C controllers so that their pins can be correctly muxed when needed. Signed-off-by: Thierry Reding commit 39e95bbbac67aea2462acc74253e1f163dd39682 Merge: e03e3601fb9fc 17529bcf0ae20 Author: Sebastian Reichel Date: Thu Aug 27 17:34:01 2020 +0200 Merge tag 'psy-arm-gpio-charger-immutable-for-5.10-signed' into psy-next Immutable branch between arm and power-supply for gpio-charger for 5.10 This immutable branch drops legacy gpio API from gpio-charger and updates the remaining users to the new gpiod API instead. Signed-off-by: Sebastian Reichel commit 228f1e6ab55f60f8cb3208dffc118afa6514b6af Author: Thierry Reding Date: Mon Aug 3 17:44:30 2020 +0200 arm64: tegra: Add ID EEPROMs on Jetson AGX Xavier The P2888 processor module contains an EEPROM that provides means of identifying the module. The P2822 carrier board contains the same EEPROM with information identifying the carrier board. Both of them ar accessed via the GEN_I2C1 bus. Signed-off-by: Thierry Reding commit 3566b0869179779d3abc4b605dcc9d2121d67672 Author: Jernej Skrabec Date: Tue Aug 25 19:35:20 2020 +0200 ARM: dts: sun8i: r40: Add node for system controller Allwinner R40 has system controller and SRAM C1 region similar to that in A10. Add nodes for them. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200825173523.1289379-3-jernej.skrabec@siol.net commit 73225f0b4cd1056baedf73e5aff74108e5e5a4ab Author: Jernej Skrabec Date: Tue Aug 25 19:35:19 2020 +0200 dt-bindings: sram: allwinner, sun4i-a10-system-control: Add R40 compatibles Allwinner R40 has system controller similar to that in A10. Add compatibles for system controller and sram c1 region. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200825173523.1289379-2-jernej.skrabec@siol.net commit 44406428f5764d7a71be3bafd642c8e02cdd5468 Author: Jernej Skrabec Date: Tue Aug 25 19:13:58 2020 +0200 ARM: dts: sun8i: r40: bananapi-m2-ultra: Enable IR BananaPi M2 Ultra has IR receiver connected to IR0. Enable it. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200825171358.1286902-4-jernej.skrabec@siol.net commit 166405e1f89acf7b24d95b90dbd1f78ec1ab3ec6 Author: Jernej Skrabec Date: Tue Aug 25 19:13:57 2020 +0200 ARM: dts: sun8i: r40: Add IR nodes Allwinner R40 has two IR cores, add nodes for them. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200825171358.1286902-3-jernej.skrabec@siol.net commit ee30214a4a79f1cea0b71d5412ba366a4b498937 Author: Jernej Skrabec Date: Tue Aug 25 19:13:56 2020 +0200 dt-bindings: media: allwinner, sun4i-a10-ir: Add R40 compatible Allwinner R40 has very similar IR core to that found in A31. Add compatible for R40 and while at it, sort compatibles by family. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200825171358.1286902-2-jernej.skrabec@siol.net commit 50aba46c234ea6ab3134cebb5ab27885f33a3e5d Author: Nicolas Dichtel Date: Thu Aug 27 14:19:23 2020 +0200 gtp: add notification mechanism Like all other network functions, let's notify gtp context on creation and deletion. Signed-off-by: Nicolas Dichtel Tested-by: Gabriel Ganne Acked-by: Harald Welte Signed-off-by: David S. Miller commit 17529bcf0ae20f1ac6d7846762bf0c6ad91dbb7f Author: Linus Walleij Date: Thu Aug 27 10:48:28 2020 +0200 power: supply: gpio-charger: Convert to GPIO descriptors This converts the GPIO charger to use exclusively GPIO descriptors, moving the two remaining platforms passing global GPIO numbers over to using a GPIO descriptor table. Signed-off-by: Linus Walleij Cc: Robert Jarzmik Cc: Dmitry Eremin-Solenikov Signed-off-by: Sebastian Reichel commit 44771ea57441902499e68572298d68e7731c81d4 Merge: fdeba99b1e58e 9d6a569a4cbab Author: David S. Miller Date: Thu Aug 27 07:42:04 2020 -0700 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2020-08-27 please apply the following patch series for qeth to netdev's net-next tree. Patch 8 makes some improvements to how we handle HW address events, avoiding some uncertainty around processing stale events after we switched off the feature. Except for that it's all straight-forward cleanups. ==================== Signed-off-by: David S. Miller commit 9d6a569a4cbab5a8b4c959d4e312daeecb7c9f09 Author: Julian Wiedmann Date: Thu Aug 27 10:17:05 2020 +0200 s390/qeth: strictly order bridge address events The current code for bridge address events has two shortcomings in its control sequence: 1. after disabling address events via PNSO, we don't flush the remaining events from the event_wq. So if the feature is re-enabled fast enough, stale events could leak over. 2. PNSO and the events' arrival via the READ ccw device are unordered. So even if we flushed the workqueue, it's difficult to say whether the READ device might produce more events onto the workqueue afterwards. Fix this by 1. explicitly fencing off the events when we no longer care, in the READ device's event handler. This ensures that once we flush the workqueue, it doesn't get additional address events. 2. Flush the workqueue after disabling the events & fencing them off. As the code that triggers the flush will typically hold the sbp_lock, we need to rework the worker code to avoid a deadlock here in case of a 'notifications-stopped' event. In case of lock contention, requeue such an event with a delay. We'll eventually aquire the lock, or spot that the feature has been disabled and the event can thus be discarded. This leaves the theoretical race that a stale event could arrive _after_ we re-enabled ourselves to receive events again. Such an event would be impossible to distinguish from a 'good' event, nothing we can do about it. Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit 65b0494ed5b567ca78a2bf1ffc1b4054fcbfe141 Author: Julian Wiedmann Date: Thu Aug 27 10:17:04 2020 +0200 s390/qeth: unify structs for bridge port state The data returned from IPA_SBP_QUERY_BRIDGE_PORTS and IPA_SBP_BRIDGE_PORT_STATE_CHANGE has the same format. Use a single struct definition for it. Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit 61c6f217067fcc8db7d66bddfad65b51801bc836 Author: Julian Wiedmann Date: Thu Aug 27 10:17:03 2020 +0200 s390/qeth: copy less data from bridge state events Current code copies _all_ entries from the event into a worker, when we later only need specific data from the first entry. Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit a04f0ecacdb0639d416614619225a39de3927e22 Author: Julian Wiedmann Date: Thu Aug 27 10:17:02 2020 +0200 s390/qeth: don't let HW override the configured port role The only time that our Bridgeport role should change is when we change the configuration ourselves. In which case we also adjust our internal state tracking, no need to do it again when we receive the corresponding event. Removing the locked section helps a subsequent patch that needs to flush the workqueue while under sbp_lock. It would be nice to raise a warning here in case HW does weird things after all, but this could end up generating false-positives when we change the configuration ourselves. Suggested-by: Alexandra Winter Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit 16379503de2e8530a9e01d78b782e34b15e708aa Author: Julian Wiedmann Date: Thu Aug 27 10:17:01 2020 +0200 s390/qeth: don't disable address events during initialization A newly initialized device is disabled for address events, there's no need to explicitly disable them. Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit a16684742f9421b61cee8d3f64db677a151ac027 Author: Julian Wiedmann Date: Thu Aug 27 10:17:00 2020 +0200 s390/qeth: make queue lock a proper spinlock queue->state is a ternary spinlock in disguise, used by OSA's TX completion path to lock the Output Queue and flush any pending packets on it to the device. If the Queue is already locked by our TX code, setting the lock word to QETH_OUT_Q_LOCKED_FLUSH lets the TX completion code move on - the TX path will later take care of things when it unlocks the Queue. This sort of DIY locking is a non-starter of course, just let the TX completion path block on the spinlock when necessary. If that ends up causing additional latency due to lock contention, then converting the OSA path to use xmit_more is the right way to go forward. Also slightly expand the locked section and capture all of qeth_do_send_packet(), so that the update for the 'bufs_pack' statistics is done race-free. While reworking the TX completion path's code, remove a barrier() that doesn't make any sense. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit beaadcc6470319ef3006bbc2d075e021987b8487 Author: Julian Wiedmann Date: Thu Aug 27 10:16:59 2020 +0200 s390/qeth: use to_delayed_work() Avoid poking around in the delayed_work struct's internals. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit b14912eb4b897683d25b8473caebb014b5d36359 Author: Julian Wiedmann Date: Thu Aug 27 10:16:58 2020 +0200 s390/qeth: clean up qeth_l3_send_setdelmc()'s declaration Clarify that the 'ipacmd' parameter is an enum, and thus compatible to what qeth_ipa_alloc_cmd() expects as input. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 5150dd85bdfa08143cacf1b4249121651bed3c35 Author: Kai-Heng Feng Date: Wed Aug 26 01:33:48 2020 +0800 drm/radeon: Prefer lower feedback dividers Commit 2e26ccb119bd ("drm/radeon: prefer lower reference dividers") fixed screen flicker for HP Compaq nx9420 but breaks other laptops like Asus X50SL. Turns out we also need to favor lower feedback dividers. Users confirmed this change fixes the regression and doesn't regress the original fix. Fixes: 2e26ccb119bd ("drm/radeon: prefer lower reference dividers") BugLink: https://bugs.launchpad.net/bugs/1791312 BugLink: https://bugs.launchpad.net/bugs/1861554 Reviewed-by: Christian König Signed-off-by: Kai-Heng Feng Signed-off-by: Alex Deucher commit 3425740adf97b2258966ee3f0d871fd5cc314028 Author: Sandeep Raghuraman Date: Thu Aug 27 18:43:37 2020 +0530 drm/amdgpu: Fix bug in reporting voltage for CIK On my R9 390, the voltage was reported as a constant 1000 mV. This was due to a bug in smu7_hwmgr.c, in the smu7_read_sensor() function, where some magic constants were used in a condition, to determine whether the voltage should be read from PLANE2_VID or PLANE1_VID. The VDDC mask was incorrectly used, instead of the VDDGFX mask. This patch changes the code to use the correct defined constants (and apply the correct bitshift), thus resulting in correct voltage reporting. Signed-off-by: Sandeep Raghuraman Signed-off-by: Alex Deucher commit 177e38a48168f9e70faaec34df053d2f8134ede6 Author: Sandeep Raghuraman Date: Thu Aug 27 17:07:33 2020 +0530 drm/amdgpu: Specify get_argument function for ci_smu_funcs Starting in Linux 5.8, the graphics and memory clock frequency were not being reported for CIK cards. This is a regression, since they were reported correctly in Linux 5.7. After investigation, I discovered that the smum_send_msg_to_smc() function, attempts to call the corresponding get_argument() function of ci_smu_funcs. However, the get_argument() function is not defined in ci_smu_funcs. This patch fixes the bug by specifying the correct get_argument() function. Fixes: a0ec225633d9f6 ("drm/amd/powerplay: unified interfaces for message issuing and response checking") Signed-off-by: Sandeep Raghuraman Signed-off-by: Alex Deucher commit ce7e5a6e130d4fe76e09bd082e98b65f630aa474 Author: Jiansong Chen Date: Thu Aug 27 14:31:20 2020 +0800 drm/amd/pm: enable MP0 DPM for sienna_cichlid Enable MP0 clock DPM for sienna_cichlid. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 4cd2a96d3a0ac6b07c443e904f5b8a52f2471571 Author: Jiawei Date: Thu Aug 27 10:07:52 2020 +0800 drm/amdgpu: simplify hw status clear/set logic Optimize code to iterate less loops in amdgpu_device_ip_reinit_early_sriov() Signed-off-by: Jiawei Reviewed-by: Emily.Deng Signed-off-by: Alex Deucher commit 6c4d1f43ed0edeee7f38069619cc8c43459a6171 Author: Evan Quan Date: Wed Aug 26 11:28:19 2020 +0800 drm/amd/pm: suppress static checker warning Suppress the warning below: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/hardwaremanager.c:274 phm_check_smc_update_required_for_display_configuration() warn: signedness bug returning '(-22)' Reported-by: Dan Carpenter Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e1b08ae52b25f7d77a030bbaff745d4818344598 Author: Evan Quan Date: Tue Aug 25 13:51:29 2020 +0800 drm/amd/pm: avoid false alarm due to confusing softwareshutdowntemp setting Normally softwareshutdowntemp should be greater than Thotspotlimit. However, on some VEGA10 ASIC, the softwareshutdowntemp is 91C while Thotspotlimit is 105C. This seems not right and may trigger some false alarms. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3d14a79b5134173ced9364411800ea60029e785e Author: Kevin Wang Date: Mon Aug 24 16:50:12 2020 +0800 drm/amd/pm: fix is_dpm_running() run error on 32bit system v1: the C type "unsigned long" size is 32bit on 32bit system, it will cause code logic error, so replace it with "uint64_t". v2: remove duplicate cast operation. Signed-off-by: Kevin Suggest-by: Jiansong Chen Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit fdeba99b1e58ecd18c2940c453e19e4ef20ff591 Author: Hoang Huu Le Date: Thu Aug 27 09:56:51 2020 +0700 tipc: fix use-after-free in tipc_bcast_get_mode Syzbot has reported those issues as: ================================================================== BUG: KASAN: use-after-free in tipc_bcast_get_mode+0x3ab/0x400 net/tipc/bcast.c:759 Read of size 1 at addr ffff88805e6b3571 by task kworker/0:6/3850 CPU: 0 PID: 3850 Comm: kworker/0:6 Not tainted 5.8.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events tipc_net_finalize_work Thread 1's call trace: [...] kfree+0x103/0x2c0 mm/slab.c:3757 <- bcbase releasing tipc_bcast_stop+0x1b0/0x2f0 net/tipc/bcast.c:721 tipc_exit_net+0x24/0x270 net/tipc/core.c:112 [...] Thread 2's call trace: [...] tipc_bcast_get_mode+0x3ab/0x400 net/tipc/bcast.c:759 <- bcbase has already been freed by Thread 1 tipc_node_broadcast+0x9e/0xcc0 net/tipc/node.c:1744 tipc_nametbl_publish+0x60b/0x970 net/tipc/name_table.c:752 tipc_net_finalize net/tipc/net.c:141 [inline] tipc_net_finalize+0x1fa/0x310 net/tipc/net.c:131 tipc_net_finalize_work+0x55/0x80 net/tipc/net.c:150 [...] ================================================================== BUG: KASAN: use-after-free in tipc_named_reinit+0xef/0x290 net/tipc/name_distr.c:344 Read of size 8 at addr ffff888052ab2000 by task kworker/0:13/30628 CPU: 0 PID: 30628 Comm: kworker/0:13 Not tainted 5.8.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events tipc_net_finalize_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1f0/0x31e lib/dump_stack.c:118 print_address_description+0x66/0x5a0 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report+0x132/0x1d0 mm/kasan/report.c:530 tipc_named_reinit+0xef/0x290 net/tipc/name_distr.c:344 tipc_net_finalize+0x85/0xe0 net/tipc/net.c:138 tipc_net_finalize_work+0x50/0x70 net/tipc/net.c:150 process_one_work+0x789/0xfc0 kernel/workqueue.c:2269 worker_thread+0xaa4/0x1460 kernel/workqueue.c:2415 kthread+0x37e/0x3a0 drivers/block/aoe/aoecmd.c:1234 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 [...] Freed by task 14058: save_stack mm/kasan/common.c:48 [inline] set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0x114/0x170 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x220 mm/slab.c:3757 tipc_exit_net+0x29/0x50 net/tipc/core.c:113 ops_exit_list net/core/net_namespace.c:186 [inline] cleanup_net+0x708/0xba0 net/core/net_namespace.c:603 process_one_work+0x789/0xfc0 kernel/workqueue.c:2269 worker_thread+0xaa4/0x1460 kernel/workqueue.c:2415 kthread+0x37e/0x3a0 drivers/block/aoe/aoecmd.c:1234 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 Fix it by calling flush_scheduled_work() to make sure the tipc_net_finalize_work() stopped before releasing bcbase object. Reported-by: syzbot+6ea1f7a8df64596ef4d7@syzkaller.appspotmail.com Reported-by: syzbot+e9cc557752ab126c1b99@syzkaller.appspotmail.com Acked-by: Jon Maloy Signed-off-by: Hoang Huu Le Signed-off-by: David S. Miller commit ef73476376444c7f891045ac5b1be3602355098c Merge: f09665811b142 0457eb26861f6 Author: David S. Miller Date: Thu Aug 27 06:55:51 2020 -0700 Merge branch 'Move-MDIO-drivers-into-their-own-directory' Andrew Lunn says: ==================== Move MDIO drivers into their own directory The phy subdirectory is getting cluttered. It has both PHY drivers and MDIO drivers, plus a stray switch driver. Soon more PCS drivers are likely to appear. Move MDIO and PCS drivers into new directories. This requires fixing up the xgene driver which uses a relative include path. v2: Move the subdirs to drivers/net, rather than drivers/net/phy. v3: Add subdirectories under include/linux for mdio and pcs v4: there->their include path fix No new kconfig prompts ==================== Signed-off-by: David S. Miller commit 0457eb26861f608f2ebb6f4b177d56a793340f26 Author: Andrew Lunn Date: Thu Aug 27 04:00:32 2020 +0200 net: phy: Sort Kconfig and Makefile Sort the Kconfig based on the text shown in make menuconfig and sort the Makefile by CONFIG symbol. Acked-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit a9770eac511ad82390b9f4a3c1728e078c387ac7 Author: Andrew Lunn Date: Thu Aug 27 04:00:31 2020 +0200 net: mdio: Move MDIO drivers into a new subdirectory Move all the MDIO drivers and multiplexers into drivers/net/mdio. The mdio core is however left in the phy directory, due to mutual dependencies between the MDIO core and the PHY core. Take this opportunity to sort the Kconfig based on the menuconfig strings, and move the multiplexers to the end with a separating comment. v2: Fix typo in commit message Acked-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 232e15e1d7ddb191c28248cb681f4544c0ff1c54 Author: Andrew Lunn Date: Thu Aug 27 04:00:30 2020 +0200 net: xgene: Move shared header file into include/linux This header file is currently included into the ethernet driver via a relative path into the PHY subsystem. This is bad practice, and causes issues for the upcoming move of the MDIO driver. Move the header file into include/linux to clean this up. v2: Move header to include/linux/mdio Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit fcba68bd75bb1d42b3aec7f471d382a9e639a672 Author: Andrew Lunn Date: Thu Aug 27 04:00:29 2020 +0200 net/phy/mdio-i2c: Move header file to include/linux/mdio In preparation for moving all MDIO drivers into drivers/net/mdio, move the mdio-i2c header file into include/linux/mdio so it can be used by both the MDIO driver and the SFP code which instantiates I2C MDIO busses. v2: Add include/linux/mdio Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 2fa4e4b799e191530edbae4b96b85d4486e55053 Author: Andrew Lunn Date: Thu Aug 27 04:00:28 2020 +0200 net: pcs: Move XPCS into new PCS subdirectory Create drivers/net/pcs and move the Synopsys DesignWare XPCS into the new directory. Move the header file into a subdirectory include/linux/pcs Start a naming convention of all PCS files use the prefix pcs-, and rename the XPCS files to fit. v2: Add include/linux/pcs v4: Fix include path in stmmac. Remove PCS_DEVICES to avoid new prompts Cc: Jose Abreu Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 18ccf8b9f8645e82c65c8c9c9095f456a4eb56a3 Author: Piyush Goyal Date: Thu Aug 27 19:04:19 2020 +0530 regulator: mt6360: fix spelling mistake: "regulaotr" -> "regulator" There are some spelling mistakes in two dev_err messages. Fix these. Signed-off-by: Piyush Goyal Link: https://lore.kernel.org/r/20200827133419.36151-1-piyushgoyaliit@gmail.com Signed-off-by: Mark Brown commit 9ff9abc4c6be27ff27b6df625501a46711730520 Author: Stephen Smalley Date: Wed Aug 26 13:28:53 2020 -0400 selinux: move policy mutex to selinux_state, use in lockdep checks Move the mutex used to synchronize policy changes (reloads and setting of booleans) from selinux_fs_info to selinux_state and use it in lockdep checks for rcu_dereference_protected() calls in the security server functions. This makes the dependency on the mutex explicit in the code rather than relying on comments. Signed-off-by: Stephen Smalley Reviewed-by: Ondrej Mosnacek Signed-off-by: Paul Moore commit 4b15c49719452311cfc52921948324b5453508bf Merge: c1c277b2c425f 01d42d5a0a70b Author: Mark Brown Date: Thu Aug 27 14:43:26 2020 +0100 Merge series "SOF fixes and updates for FW boot" from Ranjani Sridharan : This series includes fixes and updates for the FW boot sequence for Intel platforms. Ranjani Sridharan (7): ALSA: hda: fix VS_LTRC register name ASoC: SOF: Intel: hda: Add helper function to program ICCMAX stream ASoC: SOF: Intel: hda: modify the signature of get_stream_with_tag() ASoC: SOF: Intel: hda: define macro for code loader stream format ASoC: SOF: Intel: hda: Define FW boot sequence with ICCMAX ASoC: SOF: Intel: hda: Add sof_tgl_ops for TGL platforms ASoC: SOF: Intel: hda: Simplify error handling during FW boot Yong Zhi (1): ASoC: SOF: Intel: hda: Remove unused parameters in cl_dsp_init() include/sound/hda_register.h | 2 +- sound/soc/sof/intel/Makefile | 2 +- sound/soc/sof/intel/cnl.c | 23 +---- sound/soc/sof/intel/hda-ipc.h | 4 + sound/soc/sof/intel/hda-loader.c | 145 ++++++++++++++++++------------- sound/soc/sof/intel/hda-stream.c | 69 +++++++++++++++ sound/soc/sof/intel/hda.h | 6 ++ sound/soc/sof/intel/tgl.c | 137 +++++++++++++++++++++++++++++ sound/soc/sof/sof-pci-dev.c | 2 +- 9 files changed, 306 insertions(+), 84 deletions(-) create mode 100644 sound/soc/sof/intel/tgl.c -- 2.25.1 commit c1c277b2c425f69b9b4f4258d9db18562d9be041 Author: Kuninori Morimoto Date: Thu Aug 27 08:55:39 2020 +0900 ASoC: soc-core: add snd_soc_find_dai_with_mutex() commit 25612477d20b52 ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper") added snd_soc_dai_link_set_capabilities(). But it is using snd_soc_find_dai() (A) which is required client_mutex (B). And client_mutex is soc-core.c local. struct snd_soc_dai *snd_soc_find_dai(xxx) { ... (B) lockdep_assert_held(&client_mutex); ... } void snd_soc_dai_link_set_capabilities(xxx) { ... for_each_pcm_streams(direction) { ... for_each_link_cpus(dai_link, i, cpu) { (A) dai = snd_soc_find_dai(cpu); ... } ... for_each_link_codecs(dai_link, i, codec) { (A) dai = snd_soc_find_dai(codec); ... } } ... } Because of these background, we will get WARNING if .config has CONFIG_LOCKDEP. WARNING: CPU: 2 PID: 53 at sound/soc/soc-core.c:814 snd_soc_find_dai+0xf8/0x100 CPU: 2 PID: 53 Comm: kworker/2:1 Not tainted 5.7.0-rc1+ #328 Hardware name: Renesas H3ULCB Kingfisher board based on r8a77951 (DT) Workqueue: events deferred_probe_work_func pstate: 60000005 (nZCv daif -PAN -UAO) pc : snd_soc_find_dai+0xf8/0x100 lr : snd_soc_find_dai+0xf4/0x100 ... Call trace: snd_soc_find_dai+0xf8/0x100 snd_soc_dai_link_set_capabilities+0xa0/0x16c graph_dai_link_of_dpcm+0x390/0x3c0 graph_for_each_link+0x134/0x200 graph_probe+0x144/0x230 platform_drv_probe+0x5c/0xb0 really_probe+0xe4/0x430 driver_probe_device+0x60/0xf4 snd_soc_find_dai() will be used from (X) CPU/Codec/Platform driver with mutex lock, and (Y) Card driver without mutex lock. This snd_soc_dai_link_set_capabilities() is for Card driver, this means called without mutex. This patch adds snd_soc_find_dai_with_mutex() to solve it. Fixes: 25612477d20b52 ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87blixvuab.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a11ffbbac9cc7fdd73b01a0d8227ef8a1d2b95da Author: Pavel Dobias Date: Thu Aug 27 12:25:28 2020 +0200 ASoC: max9867: shutdown codec when changing filter type Changing filter type without disabling codec results in filter malfunction. Disable codec when changing filter type. Signed-off-by: Pavel Dobias Link: https://lore.kernel.org/r/20200827102528.29677-1-dobias@2n.cz Signed-off-by: Mark Brown commit f7660445c8e7fda91e8b944128554249d886b1d4 Author: Akshu Agrawal Date: Thu Aug 27 00:24:20 2020 +0530 ASoC: AMD: Clean kernel log from deferred probe error messages While the driver waits for DAIs to be probed and retries probing, have the error messages at debug level instead of error. Signed-off-by: Akshu Agrawal Link: https://lore.kernel.org/r/20200826185454.5545-1-akshu.agrawal@amd.com Signed-off-by: Mark Brown commit 97e48c1d60a7237f0e7fb0a33d2a8bc53a23db93 Author: Colin Ian King Date: Mon Aug 10 10:59:52 2020 +0100 drm/i915/vlv_dsi_pll: fix spelling mistake "Cant" -> "Can't" There is a spelling mistake in a drm_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200810095952.60968-1-colin.king@canonical.com commit 884ee754f5aedbe54406a4d308a6cc57335747ce Author: Miroslav Benes Date: Thu Aug 27 13:07:09 2020 +0200 selftests/livepatch: Do not check order when using "comm" for dmesg checking check_result() uses "comm" to check expected results of selftests output in dmesg. Everything works fine if timestamps in dmesg are unique. If not, like in this example [ 86.844422] test_klp_callbacks_demo: pre_unpatch_callback: test_klp_callbacks_mod -> [MODULE_STATE_LIVE] Normal state [ 86.844422] livepatch: 'test_klp_callbacks_demo': starting unpatching transition , "comm" fails with "comm: file 2 is not in sorted order". Suppress the order checking with --nocheck-order option. Fixes: 2f3f651f3756 ("selftests/livepatch: Use "comm" instead of "diff" for dmesg") Signed-off-by: Miroslav Benes Acked-by: Joe Lawrence Signed-off-by: Jiri Kosina commit 01d42d5a0a70bdcece7228232590f177e7114368 Author: Ranjani Sridharan Date: Wed Aug 26 11:45:32 2020 -0700 ASoC: SOF: Intel: hda: Simplify error handling during FW boot Modify cl_stream_prepare() to return a pointer to the prepared stream if successful or ERR_PTR() otherwise. This would simplify the error paths in hda_dsp_cl_boot_firmware() and hda_dsp_cl_boot_firmware_iccmax() to perform the stream cleanup after FW boot. This change also renders the function get_stream_with_tag() redundant. Reviewed-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200826184532.1612070-9-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 8b98491a6b8c41a7e4334fb94a58c268d831458e Author: Ranjani Sridharan Date: Wed Aug 26 11:45:31 2020 -0700 ASoC: SOF: Intel: hda: Add sof_tgl_ops for TGL platforms Separate the dsp ops for TGL ops to specify the use of ICCMAX FW boot sequence in the run op. All other ops are identical. Also separate the TGL descriptors into a separate file to make it easier to follow. Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200826184532.1612070-8-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit acf705a425f0e9cd5cab06231479c0a239e5a671 Author: Ranjani Sridharan Date: Wed Aug 26 11:45:30 2020 -0700 ASoC: SOF: Intel: hda: Define FW boot sequence with ICCMAX Define the FW boot sequence for platforms that are recommended to use ICCMAX. This function uses the existing prepare and cleanup functions for creating a specially crafted capture stream before powering up the DSP cores. Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200826184532.1612070-7-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit d43e381390d0aa1992ce204bb6a9af791edf3d45 Author: Ranjani Sridharan Date: Wed Aug 26 11:45:29 2020 -0700 ASoC: SOF: Intel: hda: define macro for code loader stream format This will be used for the ICCMAX stream as well. Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200826184532.1612070-6-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit c07fa3fcbd28b6d8383a05f0570d472894c6e38f Author: Ranjani Sridharan Date: Wed Aug 26 11:45:28 2020 -0700 ASoC: SOF: Intel: hda: modify the signature of get_stream_with_tag() Modify the signature of get_stream_with_tag() to add the direction as an argument to extend it for using with capture streams. Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200826184532.1612070-5-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit aca961f196e5da10d99f4b19e5c27e5a5d7731a3 Author: Ranjani Sridharan Date: Wed Aug 26 11:45:27 2020 -0700 ASoC: SOF: Intel: hda: Add helper function to program ICCMAX stream For some platforms, the recommended HW sequence for FW boot involves starting a specially crafted capture stream before powering on the DSP cores. Add a helper function to define the minimal recommended stream programming sequence for this stream. Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200826184532.1612070-4-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 0ff06df0be60db920f3d7218fa2bded9fd8de3f6 Author: Yong Zhi Date: Wed Aug 26 11:45:26 2020 -0700 ASoC: SOF: Intel: hda: Remove unused parameters in cl_dsp_init() cl_dsp_init() doesn't use the fwdata and fwsize parameters. Remove it, and update caller accordingly. Signed-off-by: Yong Zhi Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200826184532.1612070-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit c242766f286aa5a54cc3d987e71b8c952059132d Author: Ranjani Sridharan Date: Wed Aug 26 11:45:25 2020 -0700 ALSA: hda: fix VS_LTRC register name It should be called VS_LTRP instead. Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200826184532.1612070-2-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 26721b02466e396efaca6807b52916478c4f9197 Author: Allen Pais Date: Mon Aug 17 14:36:37 2020 +0530 zd1211rw: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly and remove .data fieldd Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-17-allen.cryptic@gmail.com commit d3ccc14dfe9595d5ecd247db27bd66a1343f315a Author: Allen Pais Date: Mon Aug 17 14:36:36 2020 +0530 rtlwifi/rtw88: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly and remove .data field. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-16-allen.cryptic@gmail.com commit a0d6ea9b6e1cc4aef606bd8f3f098f7da4eb34d5 Author: Allen Pais Date: Mon Aug 17 14:36:35 2020 +0530 rt2x00: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-15-allen.cryptic@gmail.com commit aff8e8d02ec26c2896c05744843bfa8ba1f78285 Author: Allen Pais Date: Mon Aug 17 14:36:34 2020 +0530 qtnfmac: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-14-allen.cryptic@gmail.com commit 51c41aa93ef5c2b6cd7351c9ec82178439b13f14 Author: Allen Pais Date: Mon Aug 17 14:36:32 2020 +0530 mwl8k: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-12-allen.cryptic@gmail.com commit 7433c9690318f495a0f741502fd370d0af428178 Author: Allen Pais Date: Mon Aug 17 14:36:31 2020 +0530 intersil: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly and remove .data field. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-11-allen.cryptic@gmail.com commit b81b9d372ac888533521e2b1f9b38671c75cbca9 Author: Allen Pais Date: Mon Aug 17 14:36:30 2020 +0530 iwlegacy: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-10-allen.cryptic@gmail.com commit ae6cf59f80f7c002f8ed8035a822a0ea519a3297 Author: Allen Pais Date: Mon Aug 17 14:36:29 2020 +0530 ipw2x00: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-9-allen.cryptic@gmail.com commit 427a06beb072be455c7b741667b1e8b326574ef0 Author: Allen Pais Date: Mon Aug 17 14:36:28 2020 +0530 brcmsmac: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-8-allen.cryptic@gmail.com commit fc672230142882409470bd9b795addec3eb8f0ef Author: Allen Pais Date: Mon Aug 17 14:36:27 2020 +0530 b43legacy: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-7-allen.cryptic@gmail.com commit a36f50e5b93776d3f72cc5d78c85a0f3e5f2181c Author: Allen Pais Date: Mon Aug 17 14:36:26 2020 +0530 atmel: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly and remove .data field. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-6-allen.cryptic@gmail.com commit 2831a631022eed6e3f800f08892132c6edde652c Author: Chung-Hsien Hsu Date: Mon Aug 17 02:33:15 2020 -0500 nl80211: support SAE authentication offload in AP mode Let drivers advertise support for AP-mode SAE authentication offload with a new NL80211_EXT_FEATURE_SAE_OFFLOAD_AP flag. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Link: https://lore.kernel.org/r/20200817073316.33402-4-stanley.hsu@cypress.com Signed-off-by: Johannes Berg commit 9ccac12996ec8b7a8dc05573d6dad8cc32b70b04 Author: Gustavo A. R. Silva Date: Fri Aug 21 01:53:55 2020 -0500 atmel: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821065355.GA25808@embeddedor commit ce3b6845fc4d9635324682a982cd04e31f81a872 Author: Gustavo A. R. Silva Date: Fri Aug 21 01:44:12 2020 -0500 b43legacy: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821064412.GA20612@embeddedor commit 7b54281cb68575ca1c9d7e6d750b141d5c9ca98d Author: Gustavo A. R. Silva Date: Fri Aug 21 01:42:18 2020 -0500 b43: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821064218.GA19502@embeddedor commit 3f95e92c8a8516b745594049dfccc8c5f8895eea Author: Gustavo A. R. Silva Date: Fri Aug 21 01:39:34 2020 -0500 iwlegacy: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821063934.GA17838@embeddedor commit 0bde10dc553d27274cf644cb34acb6f16b2d9b27 Author: Gustavo A. R. Silva Date: Fri Aug 21 01:37:58 2020 -0500 brcmfmac: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821063758.GA17783@embeddedor commit 07a297a9e619e4af578a74b3dada30025021b5df Author: Gustavo A. R. Silva Date: Fri Aug 21 01:34:02 2020 -0500 orinoco: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821063402.GA12500@embeddedor commit f7bba4d94d539f96bfe5e9a27d4608da4d3c402f Author: Gustavo A. R. Silva Date: Fri Aug 21 01:29:47 2020 -0500 prism54: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821062947.GA10202@embeddedor commit 74aad39490a7a63f634750744a7ff49c9eaddb0e Author: Gustavo A. R. Silva Date: Fri Aug 21 01:20:52 2020 -0500 rt2x00: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821062052.GA8618@embeddedor commit 5f9e2822d12fe5050da5db0e65924d5ddc86bf29 Author: Bob Pearson Date: Thu Aug 20 17:46:23 2020 -0500 RDMA/rxe: Fix style warnings Fixed several minor checkpatch warnings in existing rxe source. Link: https://lore.kernel.org/r/20200820224638.3212-3-rpearson@hpe.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit e0ef0f68c4c0d85b1eb63f38d5d10324361280e8 Author: Lang Cheng Date: Tue Aug 25 19:07:54 2020 +0800 RDMA/hns: Add a check for current state before modifying QP It should be considered an illegal operation if the ULP attempts to modify a QP from another state to the current hardware state. Otherwise, the ULP can modify some fields of QPC at any time. For example, for a QP in state of RTS, modify it from RTR to RTS can change the PSN, which is always not as expected. Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver") Link: https://lore.kernel.org/r/1598353674-24270-1-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 3e1b6469f8324bee5927b063e2aca30d3e56b907 Author: Arnd Bergmann Date: Tue May 5 16:01:16 2020 +0200 mtd: lpddr: fix excessive stack usage with clang Building lpddr2_nvm with clang can result in a giant stack usage in one function: drivers/mtd/lpddr/lpddr2_nvm.c:399:12: error: stack frame size of 1144 bytes in function 'lpddr2_nvm_probe' [-Werror,-Wframe-larger-than=] The problem is that clang decides to build a copy of the mtd_info structure on the stack and then do a memcpy() into the actual version. It shouldn't really do it that way, but it's not strictly a bug either. As a workaround, use a static const version of the structure to assign most of the members upfront and then only set the few members that require runtime knowledge at probe time. Fixes: 96ba9dd65788 ("mtd: lpddr: add driver for LPDDR2-NVM PCM memories") Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Acked-by: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200505140136.263461-1-arnd@arndb.de commit 1d0e5ebf0caaaadbc93470850d17786f94c776c2 Author: Joe Perches Date: Mon Aug 24 21:56:12 2020 -0700 mtd: Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/ae92f4c0507c470d9461886410dc7030192f9014.1598331149.git.joe@perches.com commit 9b2108429ce7405e14d26c37eccd627fc35c605a Author: Chris Packham Date: Mon Aug 24 14:57:44 2020 +1200 mtd: maps: physmap: Retain mtd-name property from dts In physmap_flash_of_init() the maps[].name can be populated based on the optional 'linux,mtd-name' property in the dts. Make sure this is retained when filling in the rest of the map[] data. Signed-off-by: Chris Packham Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200824025744.25992-1-chris.packham@alliedtelesis.co.nz commit 5ae6c8a696cdaebde69e088c3e893b1539eaeee9 Author: Lee Jones Date: Fri Aug 14 12:39:33 2020 +0100 b43: phy_n: Add empty braces around empty statements Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/b43/phy_n.c: In function ‘b43_nphy_workarounds_rev3plus’: drivers/net/wireless/broadcom/b43/phy_n.c:3346:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] drivers/net/wireless/broadcom/b43/phy_n.c: In function ‘b43_nphy_spur_workaround’: drivers/net/wireless/broadcom/b43/phy_n.c:4608:4: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] drivers/net/wireless/broadcom/b43/phy_n.c:4641:4: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] drivers/net/wireless/broadcom/b43/phy_n.c: In function ‘b43_phy_initn’: drivers/net/wireless/broadcom/b43/phy_n.c:6170:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] drivers/net/wireless/broadcom/b43/phy_n.c:6215:5: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: "Alexander A. Klimov" Cc: Michael Buesch Cc: linux-wireless@vger.kernel.org Cc: b43-dev@lists.infradead.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-31-lee.jones@linaro.org commit c171304b42f9d6e21191ca9204a86cc32023a2fe Author: Lee Jones Date: Fri Aug 14 12:39:29 2020 +0100 b43: phy_common: Demote non-conformant kerneldoc header Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/b43/phy_common.c:467: warning: Function parameter or member 'work' not described in 'b43_phy_txpower_adjust_work' Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: "Alexander A. Klimov" Cc: Martin Langer Cc: Stefano Brivio Cc: Michael Buesch Cc: van Dyk Cc: Andreas Jaggi Cc: linux-wireless@vger.kernel.org Cc: b43-dev@lists.infradead.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-27-lee.jones@linaro.org commit 5f442fe435e1f8eacb11b882fe6b522b5d500eb8 Author: Lee Jones Date: Fri Aug 14 12:39:28 2020 +0100 ipw2200: Demote lots of nonconformant kerneldoc comments Lots of these are either completely wrong or do not even attempt to document any of the parameters. Others use an incorrect/dated format which is not recognised by the kernel (... and are also wrong and suffering from docrot). Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/ipw2x00/ipw2200.c:3011: warning: Function parameter or member 'priv' not described in 'ipw_alive' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3693: warning: Incorrect use of kernel-doc format: * Driver allocates buffers of this size for Rx drivers/net/wireless/intel/ipw2x00/ipw2200.c:3697: warning: Incorrect use of kernel-doc format: * ipw_rx_queue_space - Return number of free slots available in queue. drivers/net/wireless/intel/ipw2x00/ipw2200.c:3700: warning: Function parameter or member 'q' not described in 'ipw_rx_queue_space' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3743: warning: Function parameter or member 'priv' not described in 'ipw_queue_init' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3743: warning: Function parameter or member 'q' not described in 'ipw_queue_init' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3743: warning: Function parameter or member 'count' not described in 'ipw_queue_init' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3743: warning: Function parameter or member 'read' not described in 'ipw_queue_init' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3743: warning: Function parameter or member 'write' not described in 'ipw_queue_init' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3743: warning: Function parameter or member 'base' not described in 'ipw_queue_init' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3743: warning: Function parameter or member 'size' not described in 'ipw_queue_init' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3800: warning: Function parameter or member 'priv' not described in 'ipw_queue_tx_free_tfd' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3800: warning: Function parameter or member 'txq' not described in 'ipw_queue_tx_free_tfd' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3841: warning: Function parameter or member 'priv' not described in 'ipw_queue_tx_free' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3841: warning: Function parameter or member 'txq' not described in 'ipw_queue_tx_free' drivers/net/wireless/intel/ipw2x00/ipw2200.c:3869: warning: Function parameter or member 'priv' not described in 'ipw_tx_queue_free' drivers/net/wireless/intel/ipw2x00/ipw2200.c:4474: warning: Function parameter or member 'priv' not described in 'ipw_rx_notification' drivers/net/wireless/intel/ipw2x00/ipw2200.c:4474: warning: Function parameter or member 'notif' not described in 'ipw_rx_notification' drivers/net/wireless/intel/ipw2x00/ipw2200.c:4935: warning: Function parameter or member 'priv' not described in 'ipw_queue_reset' drivers/net/wireless/intel/ipw2x00/ipw2200.c:5008: warning: Function parameter or member 'priv' not described in 'ipw_queue_tx_reclaim' drivers/net/wireless/intel/ipw2x00/ipw2200.c:5008: warning: Function parameter or member 'txq' not described in 'ipw_queue_tx_reclaim' drivers/net/wireless/intel/ipw2x00/ipw2200.c:5008: warning: Function parameter or member 'qindex' not described in 'ipw_queue_tx_reclaim' drivers/net/wireless/intel/ipw2x00/ipw2200.c:8456: warning: Function parameter or member 'priv' not described in 'ipw_sw_reset' Cc: Stanislav Yakovlev Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Gerald Combs Cc: Linux Wireless Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-26-lee.jones@linaro.org commit 7eae8c73297749eec27b58eafea81b5f5afc3f2a Author: Lee Jones Date: Fri Aug 14 12:39:27 2020 +0100 brcmsmac: mac80211_if: Demote a few non-conformant kerneldoc headers Fixes the following W=1 kernel build warning(s): In file included from drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c:30: drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c:288: warning: Function parameter or member 'wl' not described in 'brcms_free' drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c:1127: warning: Function parameter or member 'pdev' not described in 'brcms_attach' drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c:1222: warning: Function parameter or member 'pdev' not described in 'brcms_bcma_probe' drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c:1301: warning: Function parameter or member 'work' not described in 'brcms_driver_init' Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Johannes Berg Cc: Hauke Mehrtens Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-25-lee.jones@linaro.org commit 4e124e1fee6df85b0c3e282695693d5c5493be6b Author: Lee Jones Date: Fri Aug 14 12:39:26 2020 +0100 brcmfmac: fweh: Fix docrot related function documentation issues Also demote a commit block header which is clearly not suitable for kerneldoc. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c: In function ‘brcmf_fweh_handle_if_event’: drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:131:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:36: warning: Function parameter or member 'datalen' not described in 'brcmf_fweh_queue_item' drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:44: warning: Function parameter or member 'code' not described in 'brcmf_fweh_event_name' drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:44: warning: Function parameter or member 'name' not described in 'brcmf_fweh_event_name' drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:127: warning: Function parameter or member 'emsg' not described in 'brcmf_fweh_handle_if_event' drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:127: warning: Function parameter or member 'data' not described in 'brcmf_fweh_handle_if_event' drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:127: warning: Excess function parameter 'item' description in 'brcmf_fweh_handle_if_event' drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:127: warning: Excess function parameter 'ifpp' description in 'brcmf_fweh_handle_if_event' drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:391: warning: Function parameter or member 'packet_len' not described in 'brcmf_fweh_process_event' Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Lee Jones Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-24-lee.jones@linaro.org commit 10c3ba7dbe6e26133625cb6b25ab3e56e09f13df Author: Lee Jones Date: Fri Aug 14 12:39:25 2020 +0100 brcmfmac: fweh: Remove set but unused variable 'err' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c: In function ‘brcmf_fweh_handle_if_event’: drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:131:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-Hsien Lin Cc: Wright Feng Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: "Gustavo A. R. Silva" Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-23-lee.jones@linaro.org commit 6214ef8a532f266dde65fed5176be1a10003ebf8 Author: Lee Jones Date: Fri Aug 14 12:39:20 2020 +0100 b43legacy: main: Provide braces around empty 'if' body Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/b43legacy/main.c: In function ‘b43legacy_interrupt_tasklet’: drivers/net/wireless/broadcom/b43legacy/main.c:1344:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Cc: Larry Finger Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Martin Langer Cc: Stefano Brivio Cc: Michael Buesch Cc: van Dyk Cc: Andreas Jaggi Cc: linux-wireless@vger.kernel.org Cc: b43-dev@lists.infradead.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-18-lee.jones@linaro.org commit b2e732081f191e46c0d1bf259efb921284efbede Author: Lee Jones Date: Fri Aug 14 12:39:19 2020 +0100 ipw2200: Remove set but unused variables 'rc' and 'w' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/ipw2x00/ipw2200.c: In function ‘ipw_irq_tasklet’: drivers/net/wireless/intel/ipw2x00/ipw2200.c:1953:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/intel/ipw2x00/ipw2200.c: In function ‘ipw_rx’: drivers/net/wireless/intel/ipw2x00/ipw2200.c:8251:9: warning: variable ‘w’ set but not used [-Wunused-but-set-variable] Cc: Stanislav Yakovlev Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Gerald Combs Cc: Linux Wireless Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-17-lee.jones@linaro.org commit 9bafe8b82306570b74e1a95bb3c4eb10652b89ac Author: Lee Jones Date: Fri Aug 14 12:39:18 2020 +0100 iwlegacy: common: Demote kerneldoc headers to standard comment blocks Almost all of the headers in this file fail to reach the standards required by kernel-doc and no "kernel-doc::" references are made to it from the kernel's Documentation. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlegacy/common.c: In function ‘il_enqueue_hcmd’: drivers/net/wireless/intel/iwlegacy/common.c:3126:6: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/intel/iwlegacy/common.c:697: warning: Function parameter or member 'il' not described in 'il_eeprom_init' drivers/net/wireless/intel/iwlegacy/common.c:848: warning: Function parameter or member 'il' not described in 'il_mod_ht40_chan_info' drivers/net/wireless/intel/iwlegacy/common.c:848: warning: Function parameter or member 'band' not described in 'il_mod_ht40_chan_info' drivers/net/wireless/intel/iwlegacy/common.c:848: warning: Function parameter or member 'channel' not described in 'il_mod_ht40_chan_info' drivers/net/wireless/intel/iwlegacy/common.c:848: warning: Function parameter or member 'eeprom_ch' not described in 'il_mod_ht40_chan_info' drivers/net/wireless/intel/iwlegacy/common.c:848: warning: Function parameter or member 'clear_ht40_extension_channel' not described in 'il_mod_ht40_chan_info' drivers/net/wireless/intel/iwlegacy/common.c:885: warning: Function parameter or member 'il' not described in 'il_init_channel_map' drivers/net/wireless/intel/iwlegacy/common.c:1035: warning: Function parameter or member 'il' not described in 'il_get_channel_info' drivers/net/wireless/intel/iwlegacy/common.c:1035: warning: Function parameter or member 'band' not described in 'il_get_channel_info' drivers/net/wireless/intel/iwlegacy/common.c:1035: warning: Function parameter or member 'channel' not described in 'il_get_channel_info' drivers/net/wireless/intel/iwlegacy/common.c:1351: warning: Function parameter or member 'il' not described in 'il_scan_cancel' drivers/net/wireless/intel/iwlegacy/common.c:1365: warning: Function parameter or member 'il' not described in 'il_scan_cancel_timeout' drivers/net/wireless/intel/iwlegacy/common.c:1617: warning: Function parameter or member 'il' not described in 'il_fill_probe_req' drivers/net/wireless/intel/iwlegacy/common.c:1617: warning: Function parameter or member 'frame' not described in 'il_fill_probe_req' drivers/net/wireless/intel/iwlegacy/common.c:1617: warning: Function parameter or member 'ta' not described in 'il_fill_probe_req' drivers/net/wireless/intel/iwlegacy/common.c:1617: warning: Function parameter or member 'ies' not described in 'il_fill_probe_req' drivers/net/wireless/intel/iwlegacy/common.c:1617: warning: Function parameter or member 'ie_len' not described in 'il_fill_probe_req' drivers/net/wireless/intel/iwlegacy/common.c:1617: warning: Function parameter or member 'left' not described in 'il_fill_probe_req' drivers/net/wireless/intel/iwlegacy/common.c:1924: warning: Function parameter or member 'il' not described in 'il_prep_station' drivers/net/wireless/intel/iwlegacy/common.c:1924: warning: Function parameter or member 'addr' not described in 'il_prep_station' drivers/net/wireless/intel/iwlegacy/common.c:1924: warning: Function parameter or member 'is_ap' not described in 'il_prep_station' drivers/net/wireless/intel/iwlegacy/common.c:1924: warning: Function parameter or member 'sta' not described in 'il_prep_station' drivers/net/wireless/intel/iwlegacy/common.c:2009: warning: Function parameter or member 'il' not described in 'il_add_station_common' drivers/net/wireless/intel/iwlegacy/common.c:2009: warning: Function parameter or member 'addr' not described in 'il_add_station_common' drivers/net/wireless/intel/iwlegacy/common.c:2009: warning: Function parameter or member 'is_ap' not described in 'il_add_station_common' drivers/net/wireless/intel/iwlegacy/common.c:2009: warning: Function parameter or member 'sta' not described in 'il_add_station_common' drivers/net/wireless/intel/iwlegacy/common.c:2009: warning: Function parameter or member 'sta_id_r' not described in 'il_add_station_common' drivers/net/wireless/intel/iwlegacy/common.c:2070: warning: Function parameter or member 'il' not described in 'il_sta_ucode_deactivate' drivers/net/wireless/intel/iwlegacy/common.c:2070: warning: Function parameter or member 'sta_id' not described in 'il_sta_ucode_deactivate' drivers/net/wireless/intel/iwlegacy/common.c:2144: warning: Function parameter or member 'il' not described in 'il_remove_station' drivers/net/wireless/intel/iwlegacy/common.c:2144: warning: Function parameter or member 'sta_id' not described in 'il_remove_station' drivers/net/wireless/intel/iwlegacy/common.c:2144: warning: Function parameter or member 'addr' not described in 'il_remove_station' drivers/net/wireless/intel/iwlegacy/common.c:2205: warning: Function parameter or member 'il' not described in 'il_clear_ucode_stations' drivers/net/wireless/intel/iwlegacy/common.c:2237: warning: Function parameter or member 'il' not described in 'il_restore_stations' drivers/net/wireless/intel/iwlegacy/common.c:2372: warning: Function parameter or member 'il' not described in 'il_is_lq_table_valid' drivers/net/wireless/intel/iwlegacy/common.c:2372: warning: Function parameter or member 'lq' not described in 'il_is_lq_table_valid' drivers/net/wireless/intel/iwlegacy/common.c:2401: warning: Function parameter or member 'il' not described in 'il_send_lq_cmd' drivers/net/wireless/intel/iwlegacy/common.c:2401: warning: Function parameter or member 'lq' not described in 'il_send_lq_cmd' drivers/net/wireless/intel/iwlegacy/common.c:2401: warning: Function parameter or member 'flags' not described in 'il_send_lq_cmd' drivers/net/wireless/intel/iwlegacy/common.c:2539: warning: Function parameter or member 'q' not described in 'il_rx_queue_space' drivers/net/wireless/intel/iwlegacy/common.c:2556: warning: Function parameter or member 'il' not described in 'il_rx_queue_update_write_ptr' drivers/net/wireless/intel/iwlegacy/common.c:2556: warning: Function parameter or member 'q' not described in 'il_rx_queue_update_write_ptr' drivers/net/wireless/intel/iwlegacy/common.c:2711: warning: Function parameter or member 'il' not described in 'il_txq_update_write_ptr' drivers/net/wireless/intel/iwlegacy/common.c:2711: warning: Function parameter or member 'txq' not described in 'il_txq_update_write_ptr' drivers/net/wireless/intel/iwlegacy/common.c:2751: warning: Function parameter or member 'il' not described in 'il_tx_queue_unmap' drivers/net/wireless/intel/iwlegacy/common.c:2751: warning: Function parameter or member 'txq_id' not described in 'il_tx_queue_unmap' drivers/net/wireless/intel/iwlegacy/common.c:2775: warning: Function parameter or member 'il' not described in 'il_tx_queue_free' drivers/net/wireless/intel/iwlegacy/common.c:2775: warning: Function parameter or member 'txq_id' not described in 'il_tx_queue_free' drivers/net/wireless/intel/iwlegacy/common.c:2775: warning: Excess function parameter 'txq' description in 'il_tx_queue_free' drivers/net/wireless/intel/iwlegacy/common.c:2813: warning: Function parameter or member 'il' not described in 'il_cmd_queue_unmap' drivers/net/wireless/intel/iwlegacy/common.c:2856: warning: Function parameter or member 'il' not described in 'il_cmd_queue_free' drivers/net/wireless/intel/iwlegacy/common.c:2856: warning: Excess function parameter 'txq' description in 'il_cmd_queue_free' drivers/net/wireless/intel/iwlegacy/common.c:2932: warning: Function parameter or member 'il' not described in 'il_queue_init' drivers/net/wireless/intel/iwlegacy/common.c:2932: warning: Function parameter or member 'q' not described in 'il_queue_init' drivers/net/wireless/intel/iwlegacy/common.c:2932: warning: Function parameter or member 'slots' not described in 'il_queue_init' drivers/net/wireless/intel/iwlegacy/common.c:2932: warning: Function parameter or member 'id' not described in 'il_queue_init' drivers/net/wireless/intel/iwlegacy/common.c:2966: warning: Function parameter or member 'il' not described in 'il_tx_queue_alloc' drivers/net/wireless/intel/iwlegacy/common.c:2966: warning: Function parameter or member 'txq' not described in 'il_tx_queue_alloc' drivers/net/wireless/intel/iwlegacy/common.c:2966: warning: Function parameter or member 'id' not described in 'il_tx_queue_alloc' drivers/net/wireless/intel/iwlegacy/common.c:3006: warning: Function parameter or member 'il' not described in 'il_tx_queue_init' drivers/net/wireless/intel/iwlegacy/common.c:3006: warning: Function parameter or member 'txq_id' not described in 'il_tx_queue_init' drivers/net/wireless/intel/iwlegacy/common.c:3245: warning: Function parameter or member 'il' not described in 'il_hcmd_queue_reclaim' drivers/net/wireless/intel/iwlegacy/common.c:3245: warning: Function parameter or member 'txq_id' not described in 'il_hcmd_queue_reclaim' drivers/net/wireless/intel/iwlegacy/common.c:3245: warning: Function parameter or member 'idx' not described in 'il_hcmd_queue_reclaim' drivers/net/wireless/intel/iwlegacy/common.c:3245: warning: Function parameter or member 'cmd_idx' not described in 'il_hcmd_queue_reclaim' drivers/net/wireless/intel/iwlegacy/common.c:3279: warning: Function parameter or member 'il' not described in 'il_tx_cmd_complete' drivers/net/wireless/intel/iwlegacy/common.c:3425: warning: Function parameter or member 'il' not described in 'il_init_geos' drivers/net/wireless/intel/iwlegacy/common.c:3949: warning: bad line: drivers/net/wireless/intel/iwlegacy/common.c:3955: warning: Function parameter or member 'il' not described in 'il_set_rxon_channel' drivers/net/wireless/intel/iwlegacy/common.c:4154: warning: Function parameter or member 'il' not described in 'il_irq_handle_error' drivers/net/wireless/intel/iwlegacy/common.c:5019: warning: Function parameter or member 'hw' not described in 'il_mac_config' drivers/net/wireless/intel/iwlegacy/common.c:5019: warning: Function parameter or member 'changed' not described in 'il_mac_config' Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Linux Wireless Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-16-lee.jones@linaro.org commit 0171c6185c8f44ddead9fc8804ab4a90338fe8c0 Author: Lee Jones Date: Fri Aug 14 12:39:17 2020 +0100 iwlegacy: common: Remove set but not used variable 'len' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intel/iwlegacy/common.c: In function ‘il_enqueue_hcmd’: drivers/net/wireless/intel/iwlegacy/common.c:3126:6: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] Cc: Stanislaw Gruszka Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Linux Wireless Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-15-lee.jones@linaro.org commit ba4d65132922276ed8ecd92f5329491db6014132 Author: Lee Jones Date: Fri Aug 14 12:39:15 2020 +0100 airo: Fix a myriad of coding style issues - Ensure spaces appear after {for, if, while, etc} - Ensure spaces to not appear after '(' - Ensure spaces to not appear before ')' - Ensure spaces appear between ')' and '{' - Ensure spaces appear after ',' - Ensure spaces do not appear before ',' - Ensure spaces appear either side of '=' - Ensure '{'s which open functions are on a new line - Remove trailing whitespace There are still a whole host of issues with this file, but this patch certainly breaks the back of them. Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Benjamin Reed Cc: Javier Achirica Cc: Jean Tourrilhes Cc: Fabrice Bellet Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-13-lee.jones@linaro.org commit 0b6a4247dea738bca1c236ed0b0ace53006a3333 Author: Lee Jones Date: Fri Aug 14 12:39:14 2020 +0100 airo: Place brackets around empty statement Fixes the following W=1 kernel build warning(s): drivers/net/wireless/cisco/airo.c: In function ‘airo_init_module’: drivers/net/wireless/cisco/airo.c:5663:21: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Benjamin Reed Cc: Javier Achirica Cc: Jean Tourrilhes Cc: Fabrice Bellet Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-12-lee.jones@linaro.org commit 64847777d05aa4a42feade9f4955fcdcdf7ec44a Author: Lee Jones Date: Fri Aug 14 12:39:10 2020 +0100 b43: main: Add braces around empty statements Fixes the following W=1 kernel build warning(s): drivers/net/wireless/broadcom/b43/main.c: In function ‘b43_dummy_transmission’: drivers/net/wireless/broadcom/b43/main.c:785:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] drivers/net/wireless/broadcom/b43/main.c: In function ‘b43_do_interrupt_thread’: drivers/net/wireless/broadcom/b43/main.c:2017:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Martin Langer Cc: Stefano Brivio Cc: Michael Buesch Cc: van Dyk Cc: Andreas Jaggi Cc: Albert Herranz Cc: linux-wireless@vger.kernel.org Cc: b43-dev@lists.infradead.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-8-lee.jones@linaro.org commit 68fd3030ad67f57d4b421ef9fd2a48cf24ba3b35 Author: Lee Jones Date: Fri Aug 14 12:39:08 2020 +0100 atmel: Demote non-kerneldoc header to standard comment block Fixes the following W=1 kernel build warning(s): drivers/net/wireless/atmel/atmel.c:4232: warning: Cannot understand This file is part of net.russotto.AtmelMACFW, hereto referred to Cc: Simon Kelley Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-6-lee.jones@linaro.org commit 1a64026eda1642c81425e48550fd4bd3f73d0ab5 Author: Gustavo A. R. Silva Date: Mon Apr 27 14:56:08 2020 -0500 mtd: lpddr: Move function print_drs_error to lpddr_cmds.c Function print_drs_error is only used in drivers/mtd/lpddr/lpddr_cmds.c so, better to move it there. Also, notice that there's no need for inline as the function is used once. Lastly, fix the following checkpatch warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' +static void print_drs_error(unsigned dsr) Suggested-by: Joe Perches Signed-off-by: Gustavo A. R. Silva Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/e0063cbd65f3b47be1db34efc494ea3047634d88.1588016644.git.gustavo@embeddedor.com commit 518693abe6e3f57606ec18892e9135abbc04b361 Author: Gustavo A. R. Silva Date: Mon Apr 27 14:54:13 2020 -0500 mtd: lpddr: Replace printk with pr_notice pr_notice is preferred over printk. Also, coalesce formats as coalescing is part of coding-style: "never break user-visible strings such as printk messages" Suggested-by: Joe Perches Signed-off-by: Gustavo A. R. Silva Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/ff48ce07ef208ba65b858f09279a3b36031d64d2.1588016644.git.gustavo@embeddedor.com commit 1c9c02bb22684f6949d2e7ddc0a3ff364fd5a6fc Author: Gustavo A. R. Silva Date: Mon Apr 27 14:50:37 2020 -0500 mtd: lpddr: Fix bad logic in print_drs_error Update logic for broken test. Use a more common logging style. It appears the logic in this function is broken for the consecutive tests of if (prog_status & 0x3) ... else if (prog_status & 0x2) ... else (prog_status & 0x1) ... Likely the first test should be if ((prog_status & 0x3) == 0x3) Found by inspection of include files using printk. Fixes: eb3db27507f7 ("[MTD] LPDDR PFOW definition") Cc: stable@vger.kernel.org Reported-by: Joe Perches Signed-off-by: Gustavo A. R. Silva Acked-by: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/3fb0e29f5b601db8be2938a01d974b00c8788501.1588016644.git.gustavo@embeddedor.com commit 8552a434b6a05cc38006733afe6a239ad4d600a2 Author: John Crispin Date: Tue Aug 11 10:01:04 2020 +0200 mac80211: rename csa counters to countdown counters We want to reuse the functions and structs for other counters such as BSS color change. Rename them to more generic names. Signed-off-by: John Crispin Link: https://lore.kernel.org/r/20200811080107.3615705-2-john@phrozen.org Signed-off-by: Johannes Berg commit 00c207edfb2bff9cf03a8f21e57c9c752a1d9f16 Author: John Crispin Date: Tue Aug 11 10:01:03 2020 +0200 nl80211: rename csa counter attributes countdown counters We want to reuse the attributes for other counters such as BSS color change. Rename them to more generic names. Signed-off-by: John Crispin Link: https://lore.kernel.org/r/20200811080107.3615705-1-john@phrozen.org Signed-off-by: Johannes Berg commit eb89a6a6b7a1af2d9c8d83ee44fa67700d6337e7 Author: Miles Hu Date: Tue Aug 4 10:16:29 2020 +0200 nl80211: add support for setting fixed HE rate/gi/ltf This patch adds the nl80211 structs, definitions, policies and parsing code required to pass fixed HE rate, GI and LTF settings. Signed-off-by: Miles Hu Signed-off-by: John Crispin Link: https://lore.kernel.org/r/20200804081630.2013619-1-john@phrozen.org [fix comment] Signed-off-by: Johannes Berg commit 5610d1f45d7c02d35b3861988361df89dc7c901d Author: Yongqiang Liu Date: Thu Jul 16 17:02:20 2020 +0800 mtd: mtdcore: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yongqiang Liu Signed-off-by: Miquel Raynal commit b9caebb290d298a114ed6426e644db9a09560055 Author: Kamal Heib Date: Thu Aug 20 15:53:46 2020 +0300 RDMA/usnic: Remove the query_pkey callback Now that the query_pkey() isn't mandatory by the RDMA core, this callback can be removed from the usnic provider. The libfabric userspace never touches the pkey. Link: https://lore.kernel.org/r/20200820125346.111902-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 657360d6c74148f8ade5a39430407d64aa157c38 Author: Jason Gunthorpe Date: Tue Aug 18 15:05:26 2020 +0300 RDMA/ucma: Remove closing and the close_wq Use cancel_work_sync() to ensure that the wq is not running and simply assign NULL to ctx->cm_id to indicate if the work ran or not. Delete the close_wq since flush_workqueue() is no longer needed. Link: https://lore.kernel.org/r/20200818120526.702120-15-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a1d33b70dbbc2c331c788ae12d5d54ac36c6744d Author: Jason Gunthorpe Date: Tue Aug 18 15:05:25 2020 +0300 RDMA/ucma: Rework how new connections are passed through event delivery When a new connection is established the RDMA CM creates a new cm_id and passes it through to the event handler. However inside the UCMA the new ID is not assigned a ucma_context until the user retrieves the event from a syscall. This creates a weird edge condition where a cm_id's context can continue to point at the listening_id that created it, and a number of additional edge conditions on event list clean up related to destroying half created IDs. There is also a race condition in ucma_get_events() where the cm_id->context is being assigned without holding the handler_mutex. Simplify all of this by creating the ucma_context inside the event handler itself and eliminating the edge case of a half created cm_id. All cm_id's can be uniformly destroyed via __destroy_id() or via the close_work. Link: https://lore.kernel.org/r/20200818120526.702120-14-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 310ca1a7dcd1fd430f0d72e774d480cc200b4fdc Author: Jason Gunthorpe Date: Tue Aug 18 15:05:24 2020 +0300 RDMA/ucma: Narrow file->mut in ucma_event_handler() Since the backlog is now an atomic the file->mut is now only protecting the event_list and ctx_list. Narrow its scope to make it clear Link: https://lore.kernel.org/r/20200818120526.702120-13-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 26c15dec490c3a65f4eba6704c6648c299adb7a6 Author: Jason Gunthorpe Date: Tue Aug 18 15:05:23 2020 +0300 RDMA/ucma: Change backlog into an atomic There is no reason to grab the file->mut just to do this inc/dec work. Use an atomic. Link: https://lore.kernel.org/r/20200818120526.702120-12-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 38e03d092699891c3237b5aee9e8029d4ede0956 Author: Jason Gunthorpe Date: Tue Aug 18 15:05:22 2020 +0300 RDMA/ucma: Add missing locking around rdma_leave_multicast() All entry points to the rdma_cm from a ULP must be single threaded, even this error unwinds. Add the missing locking. Fixes: 7c11910783a1 ("RDMA/ucma: Put a lock around every call to the rdma_cm layer") Link: https://lore.kernel.org/r/20200818120526.702120-11-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 98837c6c3d7285f6eca86480b6f7fac6880e27a8 Author: Jason Gunthorpe Date: Tue Aug 18 15:05:21 2020 +0300 RDMA/ucma: Fix locking for ctx->events_reported This value is locked under the file->mut, ensure it is held whenever touching it. The case in ucma_migrate_id() is a race, while in ucma_free_uctx() it is already not possible for the write side to run, the movement is just for clarity. Fixes: 88314e4dda1e ("RDMA/cma: add support for rdma_migrate_id()") Link: https://lore.kernel.org/r/20200818120526.702120-10-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 09e328e47a695b0d346598f5d6593ee598e64885 Author: Jason Gunthorpe Date: Tue Aug 18 15:05:20 2020 +0300 RDMA/ucma: Fix the locking of ctx->file ctx->file is changed under the file->mut lock by ucma_migrate_id(), which is impossible to lock correctly. Instead change ctx->file under the handler_lock and ctx_table lock and revise all places touching ctx->file to use this locking when reading ctx->file. Link: https://lore.kernel.org/r/20200818120526.702120-9-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 308571debccd7004acf02ea1b7163a96ad772292 Author: Jason Gunthorpe Date: Tue Aug 18 15:05:19 2020 +0300 RDMA/ucma: Do not use file->mut to lock destroying The only reader of destroying is inside a handler under the handler_mutex, so directly use the handler_mutex when setting it instead of the larger file->mut. As the refcount could be zero here, and the cm_id already freed, and additional refcount grab around the locking is required to touch the cm_id. Link: https://lore.kernel.org/r/20200818120526.702120-8-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d114c6feedfe0600c19b9f9479a4026354d1f7fd Author: Jason Gunthorpe Date: Tue Aug 18 15:05:18 2020 +0300 RDMA/cma: Add missing locking to rdma_accept() In almost all cases rdma_accept() is called under the handler_mutex by ULPs from their handler callbacks. The one exception was ucma which did not get the handler_mutex. To improve the understand-ability of the locking scheme obtain the mutex for ucma as well. This improves how ucma works by allowing it to directly use handler_mutex for some of its internal locking against the handler callbacks intead of the global file->mut lock. There does not seem to be a serious bug here, other than a DISCONNECT event can be delivered concurrently with accept succeeding. Link: https://lore.kernel.org/r/20200818120526.702120-7-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 95fe51096b7adf1d1e7315c49c75e2f75f162584 Author: Jason Gunthorpe Date: Tue Aug 18 15:05:17 2020 +0300 RDMA/ucma: Remove mc_list and rely on xarray It is not really necessary to keep a linked list of mcs associated with each context when we can just scan the xarray to find the right things. The removes another overloading of file->mut by relying on the xarray locking for mc instead. Link: https://lore.kernel.org/r/20200818120526.702120-6-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 620db1a1183d69cc49981ee59c9207e53befeae4 Author: Jason Gunthorpe Date: Tue Aug 18 15:05:16 2020 +0300 RDMA/ucma: Fix error cases around ucma_alloc_ctx() The store to ctx->cm_id was based on the idea that _ucma_find_context() would not return the ctx until it was fully setup. Without locking this doesn't work properly. Split things so that the xarray is allocated with NULL to reserve the ID and once everything is final set the cm_id and store. Along the way this shows that the error unwind in ucma_get_event() if a new ctx is created is wrong, fix it up. Link: https://lore.kernel.org/r/20200818120526.702120-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c07e12d8e9b4b6e532f52ecc89e52d10f3f8e8f5 Author: Jason Gunthorpe Date: Tue Aug 18 15:05:15 2020 +0300 RDMA/ucma: Consolidate the two destroy flows ucma_close() is open coding the tail end of ucma_destroy_id(), consolidate this duplicated code into a function. Link: https://lore.kernel.org/r/20200818120526.702120-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 07e266a7753d952978f317aa2b206b4da4769567 Author: Jason Gunthorpe Date: Tue Aug 18 15:05:14 2020 +0300 RDMA/ucma: Remove unnecessary locking of file->ctx_list in close During the file_operations release function it is already not possible that write() can be running concurrently, remove the extra locking around the ctx_list. Link: https://lore.kernel.org/r/20200818120526.702120-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ca2968c1efcbeb547906cf6211874ec881beafec Author: Jason Gunthorpe Date: Tue Aug 18 15:05:13 2020 +0300 RDMA/ucma: Fix refcount 0 incr in ucma_get_ctx() Both ucma_destroy_id() and ucma_close_id() (triggered from an event via a wq) can drive the refcount to zero. ucma_get_ctx() was wrongly assuming that the refcount can only go to zero from ucma_destroy_id() which also removes it from the xarray. Use refcount_inc_not_zero() instead. Link: https://lore.kernel.org/r/20200818120526.702120-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7c4b1ab9f16732fb921b3f11cd127fa65f26ad5c Author: Mark Zhang Date: Tue Aug 18 14:52:45 2020 +0300 IB/mlx5: Add DCT RoCE LAG support When DCT QPs work in RoCE LAG mode: 1. DCT creation is allowed only when it is supported 2. The "port" of a DCT QP is assigned in a round-robin way Link: https://lore.kernel.org/r/20200818115245.700581-3-leon@kernel.org Signed-off-by: Mark Zhang Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 8f3243a0479e3c817262eacb31157a3f95fc272e Author: Mark Zhang Date: Tue Aug 18 14:52:44 2020 +0300 IB/mlx5: Add tx_affinity support for DCI QP DCI QP supports tx_affinity as well. Link: https://lore.kernel.org/r/20200818115245.700581-2-leon@kernel.org Signed-off-by: Mark Zhang Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit de7dbc2dbef71aba9331f707e5339874981c2a7f Author: Allen Pais Date: Mon Aug 17 14:36:24 2020 +0530 carl9170: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-4-allen.cryptic@gmail.com commit 48e12d00443761672fbaa2d1d2d036d9e84c77a1 Author: Lee Jones Date: Wed Aug 19 08:23:55 2020 +0100 wil6210: debugfs: Fix a couple of formatting issues in 'wil6210_debugfs_init' Kerneldoc expects attributes/parameters to be in '@*.: ' format and gets confused if the variable does not follow the type/attribute definitions. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/wil6210/debugfs.c:456: warning: Function parameter or member 'wil' not described in 'wil6210_debugfs_init_offset' drivers/net/wireless/ath/wil6210/debugfs.c:456: warning: Function parameter or member 'dbg' not described in 'wil6210_debugfs_init_offset' drivers/net/wireless/ath/wil6210/debugfs.c:456: warning: Function parameter or member 'base' not described in 'wil6210_debugfs_init_offset' drivers/net/wireless/ath/wil6210/debugfs.c:456: warning: Function parameter or member 'tbl' not described in 'wil6210_debugfs_init_offset' Cc: Maya Erez Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: wil6210@qti.qualcomm.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Reviewed-by: Maya Erez Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819072402.3085022-22-lee.jones@linaro.org commit 6df74f61e9a261883eccfa3b974e74fa18bc9dd9 Author: Gustavo A. R. Silva Date: Fri Aug 21 01:52:04 2020 -0500 carl9170: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821065204.GA24827@embeddedor commit fd0a0909723346911c2fb9832b63581457f00e8e Author: Dan Carpenter Date: Wed Aug 26 14:34:17 2020 +0300 ath11k: return -ENOMEM on allocation failure Returning PTR_ERR(NULL) means success, but we should return -ENOMEM. Fixes: 1399fb87ea3e ("ath11k: register MHI controller device for QCA6390") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826113417.GE393664@mwanda commit 342b6194a75b33443bec7ed598e5f08f52f66efd Author: Alex Dewar Date: Tue Aug 25 15:30:39 2020 +0100 ath11k: return error if firmware request fails In ath11k_qmi_prepare_bdf_download(), ath11k_core_firmware_request() is called, but the returned pointer is not checked for errors. Rather the variable ret (which will always be zero) is checked by mistake. Fix this and replace the various gotos with simple returns for clarity. While we are at it, move the call to memset, as variable bd is not used on all code paths. Fixes: 7b57b2ddec21 ("ath11k: create a common function to request all firmware files") Signed-off-by: Alex Dewar Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200825143040.233619-1-alex.dewar90@gmail.com commit 72cdab808714b1ec24b0c7bdebed163ce791f01f Author: Krzysztof Kozlowski Date: Thu Aug 20 21:40:49 2020 +0200 ath9k: Do not select MAC80211_LEDS by default The ath9k driver hides all LEDs related code behind CONFIG_MAC80211_LEDS ifdefs so it does not really require the MAC80211_LEDS. The code builds fine. Convert the "select" into "imply" to allow disabling LED trigger when not needed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200820194049.28055-1-krzk@kernel.org commit b016d0a5b817da3a44a17c62f59cc9331faf511a Author: Lee Jones Date: Wed Aug 26 10:33:57 2020 +0100 ath9k: ar5008_initvals: Move ar5416Bank{0,1,2,3,7} to where they are used Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath9k/ar5008_initvals.h:627:18: warning: ‘ar5416Bank7’ defined but not used [-Wunused-const-variable=] 627 | static const u32 ar5416Bank7[][2] = { | ^~~~~~~~~~~ drivers/net/wireless/ath/ath9k/ar5008_initvals.h:548:18: warning: ‘ar5416Bank3’ defined but not used [-Wunused-const-variable=] 548 | static const u32 ar5416Bank3[][3] = { | ^~~~~~~~~~~ drivers/net/wireless/ath/ath9k/ar5008_initvals.h:542:18: warning: ‘ar5416Bank2’ defined but not used [-Wunused-const-variable=] 542 | static const u32 ar5416Bank2[][2] = { | ^~~~~~~~~~~ drivers/net/wireless/ath/ath9k/ar5008_initvals.h:536:18: warning: ‘ar5416Bank1’ defined but not used [-Wunused-const-variable=] 536 | static const u32 ar5416Bank1[][2] = { | ^~~~~~~~~~~ drivers/net/wireless/ath/ath9k/ar5008_initvals.h:462:18: warning: ‘ar5416Bank0’ defined but not used [-Wunused-const-variable=] 462 | static const u32 ar5416Bank0[][2] = { | ^~~~~~~~~~~ Cc: QCA ath9k Development Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-27-lee.jones@linaro.org commit 694815e74ba3d33a947051865174fa099659777c Author: Lee Jones Date: Wed Aug 26 10:33:56 2020 +0100 ath9k: ar5008_initvals: Remove unused table entirely Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath9k/ar5008_initvals.h:553:18: warning: ‘ar5416Bank6’ defined but not used [-Wunused-const-variable=] Cc: QCA ath9k Development Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-26-lee.jones@linaro.org commit 2a0b6a97d01e2ac7ee6969680effc1b8642c8c3a Author: Lee Jones Date: Wed Aug 26 10:33:49 2020 +0100 ath9k: ar9001_initvals: Remove unused array 'ar5416Bank6_9100' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath9k/ar9001_initvals.h:462:18: warning: ‘ar5416Bank6_9100’ defined but not used [-Wunused-const-variable=] Cc: QCA ath9k Development Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-19-lee.jones@linaro.org commit 660f101eaac209dbe441f9df5ad6a219fe1c13c2 Author: Lee Jones Date: Wed Aug 26 10:33:48 2020 +0100 ath9k: ar9002_initvals: Remove unused array 'ar9280PciePhy_clkreq_off_L1_9280' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath9k/ar9002_initvals.h:900:18: warning: ‘ar9280PciePhy_clkreq_off_L1_9280’ defined but not used [-Wunused-const-variable=] Cc: QCA ath9k Development Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-18-lee.jones@linaro.org commit 197f466e93f54f640cab42918a348f2c9b881ce4 Author: Krzysztof Kozlowski Date: Thu Aug 20 14:04:44 2020 +0200 ath9k_htc: Do not select MAC80211_LEDS by default The ath9k_htc driver hides all LEDs related code behind CONFIG_MAC80211_LEDS ifdefs so it does not really require the MAC80211_LEDS. The code builds and works just fine. Convert the "select" into "imply" to allow disabling LED trigger when not needed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200820120444.8809-1-krzk@kernel.org commit f91a35b46af04f5a1fbbe559613df3bd68ca45d8 Author: Allen Pais Date: Mon Aug 17 14:36:23 2020 +0530 ath9k: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-3-allen.cryptic@gmail.com commit e58518499dedda7978fba92b107650cfe6ee10ca Author: Lee Jones Date: Wed Aug 26 10:33:45 2020 +0100 ath6kl: wmi: Remove unused variable 'rate' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath6kl/wmi.c: In function ‘ath6kl_wmi_bitrate_reply_rx’: drivers/net/wireless/ath/ath6kl/wmi.c:1204:6: warning: variable ‘rate’ set but not used [-Wunused-but-set-variable] Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200826093401.1458456-15-lee.jones@linaro.org commit c068a9ec3c94ff65f5b9e67934384ba82f731ed0 Author: Allen Pais Date: Mon Aug 17 14:36:22 2020 +0530 ath5k: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200817090637.26887-2-allen.cryptic@gmail.com commit c6522a5076e1a65877c51cfee313a74ef61cabf8 Author: Loic Poulain Date: Tue Aug 25 15:45:27 2020 +0200 wcn36xx: Disable bmps when encryption is disabled For whatever reason, when connected to an open/no-security BSS, the wcn36xx controller in bmps mode does not forward 'wake-up' beacons despite AP sends DTIM with station AID. Meaning that AP is not able to wakeup the station and needs to wait for the station to wakeup by its own (TX data, keep alive pkt...), causing serious latency issues and unexpected deauth. When connected to AP with encryption enabled, this issue does not occur. So a simple workaround is to only enable bmps support in that case. Ideally, it should be propertly fixed to allow bmps support with open BSS, whatever the issue is at driver or firmware level. Tested on wcn3620 and wcn3680. Signed-off-by: Loic Poulain Tested-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1598363127-26066-1-git-send-email-loic.poulain@linaro.org commit 1fcdb567df1b850b751887caf1dc5ab6106e1104 Author: Loic Poulain Date: Tue Aug 25 10:49:01 2020 +0200 wcn36xx: Setup starting bitrate to MCS-5 By default, after associated to an AP, the wcn36xx bitrate adjustment algorithm starts sending data at 1Mbps, and increases the rate slowly (1Mbps, 2Mbps, 6Mbps...) over the further TX packets. Starting at 1Mbps usually causes the initial throughput to be really low and the maximum possible bitrate to be reached after about hundreed of TX packets. That can be improved by setting a different initial bitrate for data packets via the ENABLE_DYNAMIC_RA_START_RATE configuration value, this value can be a legacy or MCS rate. This patch sets the starting bitrate value to MCS-5, which seems to be a good compromise given it can be quickly adjusted low or up if necessary. (and based on what I observed in the wild with some mobile devices) Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1598345341-4505-1-git-send-email-loic.poulain@linaro.org commit 5973a2947430a297e3442c28114822a90dff362c Author: Loic Poulain Date: Mon Aug 24 18:53:55 2020 +0200 wcn36xx: Fix software-driven scan For software-driven scan, rely on mac80211 software scan instead of internal driver implementation. The internal implementation cause connection trouble since it keep the antenna busy during the entire scan duration, moreover it's only a passive scanning (no probe request). Therefore, let mac80211 manages sw scan. Note: we fallback to software scan if firmware does not report scan offload support or if we need to scan the 5Ghz band (currently not supported by the offload scan...). Signed-off-by: Loic Poulain Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1598288035-19790-1-git-send-email-loic.poulain@linaro.org commit 96f9806fc87fdbff863fc49b738d9fbd64daca85 Author: Zong-Zhe Yang Date: Mon Aug 24 16:44:53 2020 +0800 rtw88: 8822c: update tx power limit tables to RF v20.1 update tx power limits of channels 12, 13 for FCC Signed-off-by: Zong-Zhe Yang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200824084453.29953-1-yhchuang@realtek.com commit 86fbf26491941352799822c8c324f5c9d8101e62 Author: Brian Norris Date: Fri Aug 21 16:57:33 2020 -0700 rtw88: use read_poll_timeout_atomic() for poll loop This gives the added bonus of not wasting an extra udelay() if we're timing out -- we double-check the register state one last time before returning. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821235733.1785009-1-briannorris@chromium.org commit 22b726cbdd09d9891ede8aa122a950d2d0ae5e09 Author: Brian Norris Date: Fri Aug 21 14:17:16 2020 -0700 rtw88: don't treat NULL pointer as an array I'm not a standards expert, but this really looks to be undefined behavior, when chip->dig_cck may be NULL. (And, we're trying to do a NULL check a few lines down, because some chip variants will use NULL.) Fixes: fc637a860a82 ("rtw88: 8723d: Set IG register for CCK rate") Signed-off-by: Brian Norris Acked-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821211716.1631556-1-briannorris@chromium.org commit 5466aff85aacf1aad6d0e056c136ea7798076b2b Author: Gustavo A. R. Silva Date: Fri Aug 21 01:49:59 2020 -0500 rtw88: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821064959.GA23693@embeddedor commit 9a19a939abfa7d949f584a7ad872e683473fdc14 Author: Dinghao Liu Date: Thu Aug 20 13:52:56 2020 +0800 wilc1000: Fix memleak in wilc_bus_probe When devm_clk_get() returns -EPROBE_DEFER, spi_priv should be freed just like when wilc_cfg80211_init() fails. Fixes: 854d66df74aed ("staging: wilc1000: look for rtc_clk clock in spi mode") Signed-off-by: Dinghao Liu Acked-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200820055256.24333-1-dinghao.liu@zju.edu.cn commit 24712ea996d80238d9bd683fb60d35cf472c4294 Author: Christophe JAILLET Date: Thu Aug 20 17:06:43 2020 +0200 rtw88: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'rtw_pci_init_tx_ring()' and 'rtw_pci_init_rx_ring()' GFP_KERNEL can be used because both functions are called from a probe function and no spinlock is taken. The call chain is: rtw_pci_probe --> rtw_pci_setup_resource --> rtw_pci_init --> rtw_pci_init_trx_ring --> rtw_pci_init_tx_ring --> rtw_pci_init_rx_ring @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200820150643.148219-1-christophe.jaillet@wanadoo.fr commit 8d95ab34b21ee0f870a9185b6457e8f6eb54914c Author: Dinghao Liu Date: Thu Aug 20 13:48:19 2020 +0800 wilc1000: Fix memleak in wilc_sdio_probe When devm_clk_get() returns -EPROBE_DEFER, sdio_priv should be freed just like when wilc_cfg80211_init() fails. Fixes: 8692b047e86cf ("staging: wilc1000: look for rtc_clk clock") Signed-off-by: Dinghao Liu Acked-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200820054819.23365-1-dinghao.liu@zju.edu.cn commit e33ab2064836600603289ad2ed0ca3424f395fa8 Author: Wang Hai Date: Wed Aug 19 19:29:10 2020 +0800 x86/mpparse: Remove duplicate io_apic.h include Remove asm/io_apic.h which is included more than once. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Borislav Petkov Reviewed-by: Pekka Enberg Link: https://lkml.kernel.org/r/20200819112910.7629-1-wanghai38@huawei.com commit 621a3a8b1c0ecf16e1e5667ea5756a76a082b738 Author: Tetsuo Handa Date: Fri Aug 21 17:27:19 2020 +0900 mwifiex: don't call del_timer_sync() on uninitialized timer syzbot is reporting that del_timer_sync() is called from mwifiex_usb_cleanup_tx_aggr() from mwifiex_unregister_dev() without checking timer_setup() from mwifiex_usb_tx_init() was called [1]. Ganapathi Bhat proposed a possibly cleaner fix, but it seems that that fix was forgotten [2]. "grep -FrB1 'del_timer' drivers/ | grep -FA1 '.function)'" says that currently there are 28 locations which call del_timer[_sync]() only if that timer's function field was initialized (because timer_setup() sets that timer's function field). Therefore, let's use same approach here. [1] https://syzkaller.appspot.com/bug?id=26525f643f454dd7be0078423e3cdb0d57744959 [2] https://lkml.kernel.org/r/CA+ASDXMHt2gq9Hy+iP_BYkWXsSreWdp3_bAfMkNcuqJ3K+-jbQ@mail.gmail.com Reported-by: syzbot Cc: Ganapathi Bhat Cc: Brian Norris Signed-off-by: Tetsuo Handa Reviewed-by: Brian Norris Acked-by: Ganapathi Bhat Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821082720.7716-1-penguin-kernel@I-love.SAKURA.ne.jp commit 32f447304da1f342c01651406e3064aa550eb513 Author: Gustavo A. R. Silva Date: Fri Aug 21 01:47:20 2020 -0500 mwifiex: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200821064720.GA22182@embeddedor commit 5f8a3ed38bec0e1bfefcec6b06ba378811bb9952 Author: Christophe JAILLET Date: Wed Aug 19 09:18:53 2020 +0200 mwifiex: Clean up some err and dbg messages The error message if 'pci_set_consistent_dma_mask()' fails is misleading. The function call uses 32 bits, but the error message reports 64. Moreover, according to the comment above 'dma_set_mask_and_coherent()' definition, such an error can never happen. So, simplify code, axe the misleading message and use 'dma_set_mask_and_coherent()' instead of 'dma_set_mask()' + 'dma_set_coherent_mask()' While at it, make some clean-up: - add # when reporting allocated length to be consistent between functions - s/consistent/coherent/ - s/unsigned int/u32/ to be consistent between functions - align some code Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819071853.113185-1-christophe.jaillet@wanadoo.fr commit 4cf975f640fefdfdf6168a79e882558478ce057a Author: Christophe JAILLET Date: Wed Aug 19 09:01:52 2020 +0200 mwifiex: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'mwifiex_pcie_alloc_buffers()' (see details in the call chain below) GFP_KERNEL can be used because both 'mwifiex_register()' and 'mwifiex_reinit_sw()' already use GFP_KERNEL. (for 'mwifiex_reinit_sw()', it is hidden in a call to 'alloc_workqueue()') The call chain is: mwifiex_register --> mwifiex_init_pcie (.init_if function, see mwifiex_if_ops) [ or ] mwifiex_reinit_sw -->mwifiex_pcie_up_dev (.up_dev function, see mwifiex_if_ops) [ then in both case ] -->mwifiex_pcie_alloc_buffers --> mwifiex_pcie_create_txbd_ring --> mwifiex_pcie_create_rxbd_ring --> mwifiex_pcie_create_evtbd_ring --> mwifiex_pcie_alloc_sleep_cookie_buf @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200819070152.111522-1-christophe.jaillet@wanadoo.fr commit 493a0ebd804c986e6bd207603c5e1ca748470d3d Author: James Prestwood Date: Mon Apr 13 09:20:53 2020 -0700 nl80211: fix PORT_AUTHORIZED wording to reflect behavior The CMD_PORT_AUTHORIZED event was described as an event which indicated a successfully completed 4-way handshake. But the behavior was not as advertized. The only driver which uses this is brcmfmac, and this driver only sends the event after a successful 802.1X-FT roam. This prevents userspace applications from knowing if the 4-way completed on: 1. Normal 802.1X connects 2. Normal PSK connections 3. FT-PSK roams wpa_supplicant handles this incorrect behavior by just completing the connection after association, before the 4-way has completed. If the 4-way ends up failing it disconnects at that point. Since this behavior appears to be expected (wpa_s handles it this way) I have changed the wording in the API description to reflect the actual behavior. Signed-off-by: James Prestwood Link: https://lore.kernel.org/r/20200413162053.3711-1-prestwoj@gmail.com [fix spelling of 802.1X throughout ...] Signed-off-by: Johannes Berg commit 12adee3c467dd3dff9f0cd98a33f26dad61187cc Author: Markus Theil Date: Mon Aug 3 16:43:53 2020 +0200 cfg80211: add helper fn for adjacent rule channels Some usable channels are located in the union of adjacent regulatory rules, for example channel 144 in Germany. Enable them, by also checking if a channel spans two adjacent regulatory rules/frequency ranges. All flags involved are disabling things, therefore we can build the maximum by or-ing them together. Furthermore, take the maximum of DFS CAC time values and the minimum of allowed power of both adjacent channels in order to comply with both regulatory rules at the same time. Signed-off-by: Markus Theil Link: https://lore.kernel.org/r/20200803144353.305538-2-markus.theil@tu-ilmenau.de [remove unrelated comment changes] Signed-off-by: Johannes Berg commit 7c9ff7e232ec45da35d40f33d17b708e36016b58 Author: Markus Theil Date: Mon Aug 3 16:43:52 2020 +0200 cfg80211: add helper fn for single rule channels As a preparation to handle adjacent rule channels, factor out handling channels located in a single regulatory rule. Signed-off-by: Markus Theil Link: https://lore.kernel.org/r/20200803144353.305538-1-markus.theil@tu-ilmenau.de Signed-off-by: Johannes Berg commit c8b828023088148e33a44e025f7d4b2abb96ea36 Author: Johannes Berg Date: Wed Aug 19 08:56:43 2020 +0200 nl80211: use NLA_POLICY_RANGE(NLA_BINARY, ...) for a few attributes We have a few attributes with minimum and maximum lengths that are not the same, use the new feature of being able to specify both in the policy to validate them, removing code and allowing this to be advertised to userspace in the policy export. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200819085642.8f12ffa14f33.I9d948d59870e521febcd79bb4a986b1de1dca47b@changeid Signed-off-by: Johannes Berg commit cb9abd48d99db5690f688e1ed5c49ee66a741c0b Author: Johannes Berg Date: Wed Aug 5 15:47:16 2020 +0200 nl80211: clean up code/policy a bit Use the policy to validate minimum and exact lengths in some attributes that weren't previously covered in the right ways, and remove associated validation code. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200805154714.3ba1e233cfa0.I5dc8109b7ab5c3f4ae925f903a30cc9b35753262@changeid Signed-off-by: Johannes Berg commit 7b506ff6f6903518af65fc35ae2fcd8305d8ff2b Author: Miaohe Lin Date: Sat Aug 22 04:23:23 2020 -0400 net: wireless: Convert to use the preferred fallthrough macro Convert the uses of fallthrough comments to fallthrough macro. Signed-off-by: Miaohe Lin Link: https://lore.kernel.org/r/20200822082323.45495-1-linmiaohe@huawei.com Signed-off-by: Johannes Berg commit eee79f8094e703e30ed117a373b4a4edb885af3a Author: Randy Dunlap Date: Sat Aug 22 16:19:53 2020 -0700 net: wireless: wext_compat.c: delete duplicated word Drop the repeated word "be". Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Link: https://lore.kernel.org/r/20200822231953.465-8-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 54f65de004046ad457f9625f704868a680af4721 Author: Randy Dunlap Date: Sat Aug 22 16:19:52 2020 -0700 net: wireless: sme.c: delete duplicated word Drop the repeated word "is". Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Link: https://lore.kernel.org/r/20200822231953.465-7-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 8cf5c86d55ad45d632985b7192e44590b9e184cc Author: Randy Dunlap Date: Sat Aug 22 16:19:51 2020 -0700 net: wireless: scan.c: delete or fix duplicated words Drop repeated word "stored". Change "is is" to "it is". Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Link: https://lore.kernel.org/r/20200822231953.465-6-rdunlap@infradead.org Signed-off-by: Johannes Berg commit cc5a639b03fd6190388df78e0f681ede02b541e7 Author: Randy Dunlap Date: Sat Aug 22 16:19:50 2020 -0700 net: wireless: reg.c: delete duplicated words + fix punctuation Drop duplicated words "was" and "does". Fix "let's" apostrophe. Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Link: https://lore.kernel.org/r/20200822231953.465-5-rdunlap@infradead.org Signed-off-by: Johannes Berg commit b42c8edfdb5757d4cf5cb6e7db8b01ca08a54430 Author: Randy Dunlap Date: Sat Aug 22 16:19:49 2020 -0700 net: wireless: delete duplicated word + fix grammar Drop the repeated word "Return" + fix verb. Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Link: https://lore.kernel.org/r/20200822231953.465-4-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 13880a3b559904b6d0761fcff8bd255e255b0ba8 Author: Randy Dunlap Date: Sat Aug 22 16:19:48 2020 -0700 net: mac80211: mesh.h: delete duplicated word Drop the repeated word "address". Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Link: https://lore.kernel.org/r/20200822231953.465-3-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 39f774e78d089cf470e796aedd543199298bac1b Author: Randy Dunlap Date: Sat Aug 22 16:19:47 2020 -0700 net: mac80211: agg-rx.c: fix duplicated words Change "If if" to "If it". Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Link: https://lore.kernel.org/r/20200822231953.465-2-rdunlap@infradead.org Signed-off-by: Johannes Berg commit cd6da0b113512b15a4d35f355f9ecd8858297369 Author: Colin Ian King Date: Wed Aug 26 09:47:27 2020 +0100 drm/mgag200: fix spelling mistake "expeced" -> "expected" There is a spelling mistake in a drm_warn message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200826084727.42703-1-colin.king@canonical.com commit aa10e3cfdb4289d8924a1a0f6859e1e710b2cb76 Merge: d4ee2d35009ad 4300cd6374a51 Author: Olof Johansson Date: Thu Aug 27 02:04:31 2020 -0700 Merge tag 'tee-pin-user-pages-for-5.10' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers Converts tee subsystem to use pin_user_pages() instead of get_user_pages() * tag 'tee-pin-user-pages-for-5.10' of git://git.linaro.org/people/jens.wiklander/linux-tee: tee: convert get_user_pages() --> pin_user_pages() Link: https://lore.kernel.org/r/20200825090715.GA2370775@jade Signed-off-by: Olof Johansson commit b440915af2e41daff7ee33e1d0ec29af5c37a1bf Author: Miquel Raynal Date: Thu Aug 27 10:51:55 2020 +0200 dt-bindings: mtd: Document boolean NAND ECC properties Document nand-use-soft-ecc-engine and nand-no-ecc-engine properties. The former is here to force software correction, the latter prevents any correction to happen. These properties (along with nand-ecc-engine) are supposed to be more accurate than the current nand-ecc-modes wich is very misleading and very often people think it is mandatory while the core should be relied upon to decide which correction to handle. nand-ecc-mode was already inacurate, but it becomes totally problematic with setups where there are several hardware engines. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-8-miquel.raynal@bootlin.com commit 457700644f58ae4bf97ad35cbdce21710959a7e7 Author: Miquel Raynal Date: Thu Aug 27 10:51:54 2020 +0200 dt-bindings: mtd: Document nand-ecc-engine This property is needed to precisely point to the hardware ECC engine to use when there are several of them available. Here, hardware also refers to the on-die possibility. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-7-miquel.raynal@bootlin.com commit 2d76f470224617fadfb35853d7d782b5caa56f9a Author: Miquel Raynal Date: Thu Aug 27 10:51:53 2020 +0200 dt-bindings: mtd: Document nand-ecc-placement This optional property defines where the ECC bytes are expected to be stored. No value defaults to an unknown location, while these locations can be explicitly set to OOB or interleaved depending if the ECC bytes are entirely stored in the OOB area or mixed with regular data in the main area (also sometimes referred as "syndrome"). Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Acked-by: Rob Herring Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-6-miquel.raynal@bootlin.com commit 701981cab01696584a12e5f0e7c2ad931a326059 Author: Miquel Raynal Date: Thu Aug 27 10:51:52 2020 +0200 mtd: nand: Add a NAND page I/O request type Use an enum to differentiate the type of I/O (reading or writing a page). Also update the request iterator. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-5-miquel.raynal@bootlin.com commit f2f64c1e924131878179da64794d9cb18ee5c827 Author: Miquel Raynal Date: Thu Aug 27 10:51:51 2020 +0200 mtd: rawnand: Move the nand_ecc_algo enum to the generic NAND layer This enumeration is generic and will be reused NAND-wide. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-4-miquel.raynal@bootlin.com commit e0a564ae0a4bc1bcf156d468955b27d3606e8253 Author: Miquel Raynal Date: Thu Aug 27 10:51:50 2020 +0200 mtd: rawnand: Rename the ECC algorithm enumeration items NAND_ECC_ is not a meaningful prefix, use NAND_ECC_ALGO_ instead. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-3-miquel.raynal@bootlin.com commit 2da45b8f069644604e8e05ccb03b2b66ada611d5 Author: Miquel Raynal Date: Thu Aug 27 10:51:49 2020 +0200 mtd: rawnand: Add a kernel doc to the ECC algorithm enumeration Before moving it to the generic raw NAND core, ensure the enumeration is properly described. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200827085208.16276-2-miquel.raynal@bootlin.com commit d32f38f2a8fc498de8e160ab1f1acb42b64c73b9 Author: Zhiyong Tao Date: Mon Aug 17 08:17:02 2020 +0800 pinctrl: mediatek: Add pinctrl driver for mt8192 This commit includes pinctrl driver for mt8192. Signed-off-by: Zhiyong Tao Acked-by: Sean Wang Link: https://lore.kernel.org/r/20200817001702.1646-4-zhiyong.tao@mediatek.com Signed-off-by: Linus Walleij commit d2f2f1321c194479c32ac13843a9299568da9304 Author: Zhiyong Tao Date: Mon Aug 17 08:17:01 2020 +0800 dt-bindings: pinctrl: mt8192: add binding document The commit adds mt8192 compatible node in binding document. Signed-off-by: Zhiyong Tao Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200817001702.1646-3-zhiyong.tao@mediatek.com Signed-off-by: Linus Walleij commit 7c81b7199b79e053db7b909e667f2a88e6c437b0 Author: Zhiyong Tao Date: Mon Aug 17 08:17:00 2020 +0800 dt-bindings: pinctrl: mt8192: add pinctrl file This patch adds pinctrl file for mt8192. Signed-off-by: Zhiyong Tao Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200817001702.1646-2-zhiyong.tao@mediatek.com Signed-off-by: Linus Walleij commit e1c17431855936e25f1077efa8e331122321ddd7 Author: Cristian Ciocaltea Date: Mon Aug 3 17:20:56 2020 +0300 MAINTAINERS: Set pinctrl binding entry for all Actions Semi Owl SoCs Update the pinctrl binding entry to match all members of Actions Semi Owl SoCs. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/1a9eb2b12c151d4d765d2aa74dc9cd58b3c117dc.1596461275.git.cristian.ciocaltea@gmail.com Signed-off-by: Linus Walleij commit 45de28e31a6e250cd9e17c8b9f9db5a439fb39b2 Author: Cristian Ciocaltea Date: Mon Aug 3 17:20:55 2020 +0300 pinctrl: actions: Add Actions S500 pinctrl driver Add pinctrl and gpio driver for Actions Semi S500 SoC. The driver supports pinctrl, pinmux, pinconf, gpio and interrupt functions using a set of registers shared between gpio and pinctrl. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/ce11c15f2f72798a8d740f8a7d5cbf1e6d70974a.1596461275.git.cristian.ciocaltea@gmail.com Signed-off-by: Linus Walleij commit aebebcf910c4d7b6b98bc7b3b573ec24543861a6 Author: Cristian Ciocaltea Date: Mon Aug 3 17:20:54 2020 +0300 dt-bindings: pinctrl: Add bindings for Actions S500 SoC Add pinctrl and gpio bindings for Actions Semi S500 SoC. Signed-off-by: Cristian Ciocaltea Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/7abf618c446b7b648f512afe72e46704156e9912.1596461275.git.cristian.ciocaltea@gmail.com Signed-off-by: Linus Walleij commit feeaefd378cae2f6840f879d6123ef265f8aee79 Author: Serge Semin Date: Thu Jul 30 18:28:07 2020 +0300 gpio: dwapb: Use resource managed GPIO-chip add data method Since the resource managed version of gpiochip_add_data() will handle the GPIO-chip data automated cleanup we can freely remove the DW APB GPIO driver code responsible for that. After doing so the DW APB GPIO driver removal callback can be also fully discarded since there is nothing left to be done for it. All the cleanups are now performed by means of the device managed framework. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200730152808.2955-11-Sergey.Semin@baikalelectronics.ru Signed-off-by: Linus Walleij commit daa3f58d180c075abc11e076fa70142682e24272 Author: Serge Semin Date: Thu Jul 30 18:28:06 2020 +0300 gpio: dwapb: Get clocks by means of resource managed interface The kernel clock framework provides the resource managed version of the clk_bulk_get() method. The only thing which needs to be also automated is the clocks disable/unprepare procedure executed on the device removal. It can be implemented by means of the custom action definition. After that the clocks acquisition and release will be purely managed by the device resources interface. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200730152808.2955-10-Sergey.Semin@baikalelectronics.ru Signed-off-by: Linus Walleij commit 4731d80f5ea9b8d754e2a5708b645a9eeef0c9e4 Author: Serge Semin Date: Thu Jul 30 18:28:05 2020 +0300 gpio: dwapb: Get reset control by means of resource managed interface The reset control interface provides the resource managed version of the reset_control_get() method. The only thing which needs to be also automated is the reset lane assertion on the device removal. It can be implemented by means of the custom action definition. After that the reset control will be purely managed by the device resources interface. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200730152808.2955-9-Sergey.Semin@baikalelectronics.ru Signed-off-by: Linus Walleij commit 69a6f5d9b66f895fa96a2cf893ccf66ad27c08c1 Author: Serge Semin Date: Thu Jul 30 18:28:04 2020 +0300 gpio: dwapb: Discard ACPI GPIO-chip IRQs request Since GPIOlib-based IRQ-chip interface is now utilized there is no need in calling the methods acpi_gpiochip_{request,free}_interrupts() here. They will be called from gpiochip_add_irqchip()/gpiochip_irqchip_remove() anyway. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200730152808.2955-8-Sergey.Semin@baikalelectronics.ru Signed-off-by: Linus Walleij commit ca4cf5ea04d2e126177d487b874aa19267277e4a Author: Serge Semin Date: Thu Jul 30 18:28:03 2020 +0300 gpio: dwapb: Discard GPIO-to-IRQ mapping function Since GPIOlib-based IRQ-chip interface is now utilized there is no need in setting up a custom GPIO-to-IRQ mapping method. GPIO-lib defines the standard mapping method - gpiochip_to_irq(), which will be used anyway no matter whether the custom to_irq callback is specified or not. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200730152808.2955-7-Sergey.Semin@baikalelectronics.ru Signed-off-by: Linus Walleij commit 0ea683931adb27d588fa74c30ac242ed2414e438 Author: Serge Semin Date: Thu Jul 30 18:28:02 2020 +0300 gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip GPIO-lib provides a ready-to-use interface to initialize an IRQ-chip on top of a GPIO chip. It's better from maintainability and readability point of view to use one instead of supporting a hand-written Generic IRQ-chip-based implementation. Moreover the new implementation won't cause much functional overhead but will provide a cleaner driver code. All of that makes the DW APB GPIO driver conversion pretty much justified especially seeing a tendency of the other GPIO drivers getting converted too. Here is what we do in the framework of this commit to convert the driver to using the GPIO-lib-based IRQ-chip interface: 1) IRQ ack, mask and unmask callbacks are locally defined instead of using the Generic IRQ-chip ones. 2) An irq_chip structure instance is embedded into the dwapb_gpio private data. Note we can't have a static instance of that structure since GPIO-lib will add some hooks into it by calling gpiochip_set_irq_hooks(). A warning about that would have been printed by the GPIO-lib code if we used a single irq_chip structure instance for multiple DW APB GPIO controllers. 3) Initialize the gpio_irq_chip structure embedded into the gpio_chip descriptor. By default there is no IRQ enabled so any event raised will be handled by the handle_bad_irq() IRQ flow handler. If DW APB GPIO IP-core is synthesized to have non-shared reference IRQ-lines, then as before the hierarchical and cascaded cases are distinguished by checking how many parental IRQs are defined. (Note irq_set_chained_handler_and_data() won't initialize IRQs, which descriptors couldn't be found.) If DW APB GPIO IP is used on a platform with shared IRQ line, then we simply won't let the GPIO-lib to initialize the parental IRQs, but will handle them locally in the driver. 4) Discard linear IRQ-domain and Generic IRQ-chip initialization, since GPIO-lib IRQ-chip interface will create a new domain and accept a standard IRQ-chip structure pointer based on the setting we provided in the gpio_irq_chip structure. 5) Manually select a proper IRQ flow handler directly in the irq_set_type() callback by calling irq_set_handler_locked() method, since an ordinary (not Generic) irq_chip descriptor is now utilized. Note this shalln't give any regression 6) Alter CONFIG_GPIO_DWAPB kernel config to select CONFIG_GPIOLIB_IRQCHIP instead of CONFIG_GENERIC_IRQ_CHIP. Note neither 4) nor 5) shall cause a regression of commit 6a2f4b7dadd5 ("gpio: dwapb: use a second irq chip"), since the later isn't properly used here anyway. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200730152808.2955-6-Sergey.Semin@baikalelectronics.ru Signed-off-by: Linus Walleij commit f9f890ba2b13ea9ccfffd0e7354c7b64d9109790 Author: Serge Semin Date: Thu Jul 30 18:28:01 2020 +0300 gpio: dwapb: Add max GPIOs macro Add a new macro DWAPB_MAX_GPIOS which defines the maximum possible number of GPIO lines corresponding to the maximum DW APB GPIO controller port width. Use the new macro instead of number literal 32 where it's applicable. Suggested-by: Andy Shevchenko Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200730152808.2955-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Linus Walleij commit 75c1236a4d7c4c0ec5f7e9115f541ab08edbfc43 Author: Serge Semin Date: Thu Jul 30 18:28:00 2020 +0300 gpio: dwapb: Move MFD-specific IRQ handler For better readability let's group all the IRQ handlers in a single place of the driver instead of having them scatter around all over the file. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200730152808.2955-4-Sergey.Semin@baikalelectronics.ru Signed-off-by: Linus Walleij commit 7569486d79ae8ec4ba9d20a629fa745a1afe04fd Author: Serge Semin Date: Thu Jul 30 18:27:59 2020 +0300 gpio: dwapb: Add ngpios DT-property support Indeed generic GPIO DT-schema implies that number of GPIOs should be described by the "ngpios" property located under a GPIO-provider DT node. In that case it's redundant to have a vendor-specific "snps,nr-gpios" property describing the same setting. Moreover it might be errors prone. Since commit 93d2e4322aa7 ("of: platform: Batch fwnode parsing when adding all top level devices") the fwnode parsing is resumed after the vast majority of the platform devices are added. Implicitly that commit activates re-parsing of the whole device tree GPIOs-phandle properties detected having "-gpio/-gpios" suffixes. Since the vendor-specific number of GPIOs property is defined with "-gpios" suffix, then of_link_property() will consider it as a suffix-property with "#gpio-cells" structure, which obviously it doesn't have. As a result for two DW APB GPIO controllers we'll have the next errors printed. OF: /bus@1f059000/gpio@1f044000/gpio-port@0: could not find phandle OF: /bus@1f059000/gpio@1f045000/gpio-port@0: could not get #gpio-cells for /opp-table OF: /bus@1f059000/gpio@1f044000/gpio-port@0: could not find phandle OF: /bus@1f059000/gpio@1f045000/gpio-port@0: could not get #gpio-cells for /opp-table See, the kernel fwnode parsing procedure even tried to resolve the phandle ID, which it thought was the opp-table DT-node, while in fact it was just a number "32". What would happen if that magic number actually referred to a GPIO DT-node with "#gpio-cells" property defined?.. In order to fix the problem let's mark the "snps,nr-gpios" property as deprecated and add the generic "ngpios" property support with the same purpose as the deprecated one. That and the errors log above shall motivate the platform developer to convert the DW APB GPIO DT-nodes to using the standard number of GPIOs property. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200730152808.2955-3-Sergey.Semin@baikalelectronics.ru Signed-off-by: Linus Walleij commit ef42a8da3cf3c5984ccb88c83d0f3eca0d93d1ea Author: Serge Semin Date: Thu Jul 30 18:27:58 2020 +0300 dt-bindings: gpio: dwapb: Add ngpios property support It's redundant to have a vendor-specific property describing a number of GPIOS while there is a generic one. Let's mark the former one as deprecated and define the "ngpios" property supported with constraints of being within [1; 32] range. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200730152808.2955-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Linus Walleij commit db436a7198a78d8d02178dc992ad5ae2de57cd2e Author: Bartosz Dudziak Date: Thu Jul 16 22:55:29 2020 +0200 pinctrl: qcom: Add msm8226 pinctrl driver. Add initial Qualcomm msm8226 pinctrl driver to support pin configuration with pinctrl framework for msm8226 SoC. - Initial formatting and style was taken from the msm8x74 pinctrl driver added by Björn Andersson Signed-off-by: Bartosz Dudziak Link: https://lore.kernel.org/r/20200716205530.22910-3-bartosz.dudziak@snejp.pl Signed-off-by: Linus Walleij commit 441717c46fc71e349cf8373392a2afd61332dd4e Author: Bartosz Dudziak Date: Thu Jul 16 22:55:28 2020 +0200 dt-bindings: pinctrl: qcom: Add msm8226 pinctrl bindings Add device tree binding Documentation details for Qualcomm msm8226 pinctrl driver. - Bindings documentation was based on qcom,ipq6018-pinctrl.yaml added by Sricharan R and then modified for msm8226 content Signed-off-by: Bartosz Dudziak Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200716205530.22910-2-bartosz.dudziak@snejp.pl Signed-off-by: Linus Walleij commit 0c0a41fb17484c9046faf65739dc77853ca32a0c Author: Pali Rohár Date: Fri Jul 24 15:24:57 2020 +0200 pinctrl: armada-37xx: Add comment for pcie1_reset pin group Group name 'pcie1' is misleading as it controls only PCIe reset pin. Like other PCIe groups it should have been called 'pcie1_reset'. But due to backward compatibility it is not possible to change existing group name. So just add comment describing this PCIe reset functionality. Signed-off-by: Pali Rohár Link: https://lore.kernel.org/r/20200724132457.7094-1-pali@kernel.org Signed-off-by: Linus Walleij commit fe9c36442769e07aaaf0dce1fb7f083faad4b1e9 Author: Andrew Halaney Date: Thu Aug 6 10:53:25 2020 -0500 pinctrl: nomadik: Fix pull direction debug info The nomadik pinctrl hardware doesn't have any way to determine if the active pull is up or down. Reading the bit currently used to report if the pull is up/down indicates if the gpio input is reading high or low, it doesn't reflect the pull state. For this reason change the output from "pull up"/"pull down" to "pull enabled". This avoids confusing developers who were using the output to determine what the pull state is. Signed-off-by: Andrew Halaney Link: https://lore.kernel.org/r/20200806155322.GA25523@ola-jn9phv2.ad.garmin.com Signed-off-by: Linus Walleij commit 2e80be60c465a4f8559327340eaf40845dd7797a Author: Andrii Nakryiko Date: Wed Aug 26 21:11:09 2020 -0700 libbpf: Fix compilation warnings for 64-bit printf args Fix compilation warnings due to __u64 defined differently as `unsigned long` or `unsigned long long` on different architectures (e.g., ppc64le differs from x86-64). Also cast one argument to size_t to fix printf warning of similar nature. Fixes: eacaaed784e2 ("libbpf: Implement enum value-based CO-RE relocations") Fixes: 50e09460d9f8 ("libbpf: Skip well-known ELF sections when iterating ELF") Reported-by: Naresh Kamboju Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200827041109.3613090-1-andriin@fb.com commit f5493c514cdbcd8c3f9f3ffca4f68b97f122e60a Author: Yonghong Song Date: Mon Aug 24 23:46:09 2020 -0700 selftests/bpf: Add verifier tests for xor operation Added some test_verifier bounds check test cases for xor operations. $ ./test_verifier ... #78/u bounds check for reg = 0, reg xor 1 OK #78/p bounds check for reg = 0, reg xor 1 OK #79/u bounds check for reg32 = 0, reg32 xor 1 OK #79/p bounds check for reg32 = 0, reg32 xor 1 OK #80/u bounds check for reg = 2, reg xor 3 OK #80/p bounds check for reg = 2, reg xor 3 OK #81/u bounds check for reg = any, reg xor 3 OK #81/p bounds check for reg = any, reg xor 3 OK #82/u bounds check for reg32 = any, reg32 xor 3 OK #82/p bounds check for reg32 = any, reg32 xor 3 OK #83/u bounds check for reg > 0, reg xor 3 OK #83/p bounds check for reg > 0, reg xor 3 OK #84/u bounds check for reg32 > 0, reg32 xor 3 OK #84/p bounds check for reg32 > 0, reg32 xor 3 OK ... Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Cc: John Fastabend Link: https://lore.kernel.org/bpf/20200825064609.2018077-1-yhs@fb.com commit 2921c90d471889242c24cff529043afb378937fa Author: Yonghong Song Date: Mon Aug 24 23:46:08 2020 -0700 bpf: Fix a verifier failure with xor bpf selftest test_progs/test_sk_assign failed with llvm 11 and llvm 12. Compared to llvm 10, llvm 11 and 12 generates xor instruction which is not handled properly in verifier. The following illustrates the problem: 16: (b4) w5 = 0 17: ... R5_w=inv0 ... ... 132: (a4) w5 ^= 1 133: ... R5_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) ... ... 37: (bc) w8 = w5 38: ... R5=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R8_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) ... ... 41: (bc) w3 = w8 42: ... R3_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) ... 45: (56) if w3 != 0x0 goto pc+1 ... R3_w=inv0 ... 46: (b7) r1 = 34 47: R1_w=inv34 R7=pkt(id=0,off=26,r=38,imm=0) 47: (0f) r7 += r1 48: R1_w=invP34 R3_w=inv0 R7_w=pkt(id=0,off=60,r=38,imm=0) 48: (b4) w9 = 0 49: R1_w=invP34 R3_w=inv0 R7_w=pkt(id=0,off=60,r=38,imm=0) 49: (69) r1 = *(u16 *)(r7 +0) invalid access to packet, off=60 size=2, R7(id=0,off=60,r=38) R7 offset is outside of the packet At above insn 132, w5 = 0, but after w5 ^= 1, we give a really conservative value of w5. At insn 45, in reality the condition should be always false. But due to conservative value for w3, the verifier evaluates it could be true and this later leads to verifier failure complaining potential packet out-of-bound access. This patch implemented proper XOR support in verifier. In the above example, we have: 132: R5=invP0 132: (a4) w5 ^= 1 133: R5_w=invP1 ... 37: (bc) w8 = w5 ... 41: (bc) w3 = w8 42: R3_w=invP1 ... 45: (56) if w3 != 0x0 goto pc+1 47: R3_w=invP1 ... processed 353 insns ... and the verifier can verify the program successfully. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200825064608.2017937-1-yhs@fb.com commit 487047b87a6c3b49ce9d694ae765633dd43225a8 Author: Christian Lamparter Date: Sat Aug 22 18:19:22 2020 +0200 MAINTAINERS: extend BCM5301X ARM ARCHITECTURE files This patch extends the existing entry for the "BROADCOM BCM5301X ARM ARCHITECTURE" to include files belonging to the BCM5301X. Signed-off-by: Christian Lamparter Acked-by: Scott Branden Signed-off-by: Florian Fainelli commit c4cd6fcae46fd14aed8665b7cf66d0954765a873 Author: Christian Lamparter Date: Sat Aug 22 18:19:21 2020 +0200 ARM: dts: BCM5301X: Specify pcie2 in the DT The SoC supports three pcie ports. Currently, only pcie0 and pcie1 are enabled. This patch adds the pcie2 port as well. Signed-off-by: Christian Lamparter Reviewed-by: Scott Branden Signed-off-by: Florian Fainelli commit 5e396bb05b89e23e98e6d75749b77502e68210a4 Author: Christian Lamparter Date: Sat Aug 22 18:19:20 2020 +0200 ARM: dts: BCM5301X: Specify uart2 in the DT The BCM53016 in the Meraki MR32 utilizes the third "uart2" to connect to a on-board Bluetooth-LE 4.0 BCM20732 chip. Signed-off-by: Christian Lamparter Reviewed-by: Scott Branden Signed-off-by: Florian Fainelli commit 0ea4b29d149586667d96767f1fc8e57ee942c1b0 Author: Christian Lamparter Date: Sat Aug 22 18:19:19 2020 +0200 ARM: dts: BCM5301X: Specify PWM in the DT The BCM53016 in the Meraki MR32 uses the on-chip PWM controller to drive a tri-color RGB LED. Since I plan to use the PWM, I made a label for the pwm's pinmux node. This way, it can be easily referenced.... And Also included a label for the i2c since I'm going to need it in the future too. Signed-off-by: Christian Lamparter Acked-by: Scott Branden Signed-off-by: Florian Fainelli commit a2e385f5374d09c76d3e081a847f30e0b91045a6 Author: Christian Lamparter Date: Sat Aug 22 18:19:18 2020 +0200 dt-bindings: ARM: add bindings for the Meraki MR32 mark the Meraki MR32 and its SoC (BCM53016) as supported in the bindings documentation file. A quick look on Broadcom BCM5301x series umbrella website reveals: "BCM53012 and BCM53016 with dual-core Cortex-A9 CPU at 1 GHz, 256KB L2 cache, 16-bit DDR2 interface, USB3 integrated switch, GPHYs and packet accelerator". As far as I can tell, Broadcom considers the SoC to be a version of the BCM53012. Signed-off-by: Christian Lamparter Acked-by: Scott Branden Signed-off-by: Florian Fainelli commit f09665811b142cbf1eb36641ca42cee42c463b3f Merge: d6fc1923d6839 31ffcb1077e6c Author: David S. Miller Date: Wed Aug 26 16:21:17 2020 -0700 Merge branch 'drivers-net-constify-static-ops-variables' Rikard Falkeborn says: ==================== drivers/net: constify static ops-variables This series constifies a number of static ops variables, to allow the compiler to put them in read-only memory. Compile-tested only. ==================== Signed-off-by: David S. Miller commit 31ffcb1077e6c4d36a67c40bccfb6f2bf0132f87 Author: Rikard Falkeborn Date: Thu Aug 27 00:56:08 2020 +0200 net: ath11k: constify ath11k_thermal_ops The only usage of ath11k_thermal_ops is to pass its address to thermal_cooling_device_register() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: David S. Miller commit 73a9df4c10292ff4b5a937cac38313568acb05dc Author: Rikard Falkeborn Date: Thu Aug 27 00:56:07 2020 +0200 net: phy: mscc: macsec: constify vsc8584_macsec_ops The only usage of vsc8584_macsec_ops is to assign its address to the macsec_ops field in the phydev struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: David S. Miller commit 3faaf53920dbb5bc3177f208ccbc75580a7ed8a0 Author: Rikard Falkeborn Date: Thu Aug 27 00:56:06 2020 +0200 net: phy: at803x: constify static regulator_ops The only usage of vddio_regulator_ops and vddh_regulator_ops is to assign their address to the ops field in the regulator_desc struct, which is a const pointer. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: David S. Miller commit b968a44f7b9470c9df0d1fe5290710969108bfbf Author: Rikard Falkeborn Date: Thu Aug 27 00:56:05 2020 +0200 net: renesas: sh_eth: constify bb_ops The only usage of bb_ops is to assign its address to the ops field in the mdiobb_ctrl struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: David S. Miller commit 3ab4519aecb424df8abb1beca8e27d71ac242ab6 Author: Rikard Falkeborn Date: Thu Aug 27 00:56:04 2020 +0200 net: ethernet: ravb: constify bb_ops The only usage of bb_ops is to assign its address to the ops field in the mdiobb_ctrl struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: David S. Miller commit 715d08712e9a3fa008ed15cacd39830709962181 Author: Rikard Falkeborn Date: Thu Aug 27 00:56:03 2020 +0200 net: ethernet: qualcomm: constify qca_serdev_ops The only usage of qca_serdev_ops is to pass its address to serdev_device_set_client_ops() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: David S. Miller commit d6fc1923d6839a564861e7da06016377a795f6a9 Author: Wang Hai Date: Wed Aug 19 10:46:45 2020 +0800 net: ipa: remove duplicate include Remove linux/notifier.h which is included more than once Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 8396fb8d916427462e037627cadb829a66a7a463 Merge: bf82d565bc460 635e442f4a486 Author: David S. Miller Date: Wed Aug 26 16:11:39 2020 -0700 Merge branch 'refactoring-of-ibmvnic-code' Lijun Pan says: ==================== refactoring of ibmvnic code This patch series refactor reset_init and init functions, and make some other cosmetic changes to make the code easier to read and debug. v2 removes __func__ and v1's 1/5. ==================== Signed-off-by: David S. Miller commit 635e442f4a48620d3d57e3b837e30375ddc35040 Author: Lijun Pan Date: Wed Aug 19 17:52:26 2020 -0500 ibmvnic: merge ibmvnic_reset_init and ibmvnic_init These two functions share the majority of the code, hence merge them together. In the meanwhile, add a reset pass-in parameter to differentiate them. Thus, the code is easier to read and to tell the difference between reset_init and regular init. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 550f4d46aff6fe57c9b1c6719c3c9de2237d7ac2 Author: Lijun Pan Date: Wed Aug 19 17:52:25 2020 -0500 ibmvnic: remove never executed if statement At the beginning of the function, from_passive_init is set false by "adapter->from_passive_init = false;", hence the if statement will never run. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit fa68bfab1e716ee15a08d0e1ec284d6340736451 Author: Lijun Pan Date: Wed Aug 19 17:52:24 2020 -0500 ibmvnic: improve ibmvnic_init and ibmvnic_reset_init When H_SEND_CRQ command returns with H_CLOSED, it means the server's CRQ is not ready yet. Instead of resetting immediately, we wait for the server to launch passive init. ibmvnic_init() and ibmvnic_reset_init() should also return the error code from ibmvnic_send_crq_init() call. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 4c5f6af051ccf1d9b8bccb0f887170594f6cb0cb Author: Lijun Pan Date: Wed Aug 19 17:52:23 2020 -0500 ibmvnic: compare adapter->init_done_rc with more readable ibmvnic_rc_codes Instead of comparing (adapter->init_done_rc == 1), let it be (adapter->init_done_rc == PARTIALSUCCESS). Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 7bde3c0c172858423dc54b6f2c6aabd1e2dda569 Author: Frank Wunderlich Date: Wed Aug 19 10:17:47 2020 +0200 drm/mediatek: Add ddp routing for mt7623 on BPi-R2/mt7623 main-path have to be routed to DPI0 (hdmi) instead of DSI0 using compatible "mt7623-mmsys" already defined in dts Signed-off-by: Frank Wunderlich Signed-off-by: Chun-Kuang Hu commit ea6e3c31548ebd9be3d2405c680cac1706e7c7b2 Author: Frank Wunderlich Date: Wed Aug 19 10:17:46 2020 +0200 dt-bindings: mediatek: add mt7623 display-nodes mt7623 uses mt2701/mt8173 for drm, but have own compatibles Signed-off-by: Frank Wunderlich Acked-by: Rob Herring Signed-off-by: Chun-Kuang Hu commit bf82d565bc4603c0e1135809512fe9f6f87a1c47 Merge: 751e42515efbe 041bc0dce524a Author: David S. Miller Date: Wed Aug 26 16:00:51 2020 -0700 Merge branch 'ipv4-nexthop-Various-improvements' Ido Schimmel says: ==================== ipv4: nexthop: Various improvements This patch set contains various improvements that I made to the nexthop object code while studying it towards my upcoming changes. While patches #4 and #6 fix bugs, they are not regressions (never worked). They also do not occur to me as critical issues, which is why I am targeting them at net-next. Tested with fib_nexthops.sh: Tests passed: 134 Tests failed: 0 ==================== Signed-off-by: David S. Miller commit 041bc0dce524aa8435d1c088d718090095d1f27c Author: Ido Schimmel Date: Wed Aug 26 19:48:57 2020 +0300 selftests: fib_nexthops: Test IPv6 route with group after replacing IPv4 nexthops Test that an IPv6 route can not use a nexthop group with mixed IPv4 and IPv6 nexthops, but can use it after replacing the IPv4 nexthops with IPv6 nexthops. Output without previous patch: # ./fib_nexthops.sh -t ipv6_fcnal_runtime IPv6 functional runtime ----------------------- TEST: Route add [ OK ] TEST: Route delete [ OK ] TEST: Ping with nexthop [ OK ] TEST: Ping - multipath [ OK ] TEST: Ping - blackhole [ OK ] TEST: Ping - blackhole replaced with gateway [ OK ] TEST: Ping - gateway replaced by blackhole [ OK ] TEST: Ping - group with blackhole [ OK ] TEST: Ping - group blackhole replaced with gateways [ OK ] TEST: IPv6 route with device only nexthop [ OK ] TEST: IPv6 multipath route with nexthop mix - dev only + gw [ OK ] TEST: IPv6 route can not have a v4 gateway [ OK ] TEST: Nexthop replace - v6 route, v4 nexthop [ OK ] TEST: Nexthop replace of group entry - v6 route, v4 nexthop [ OK ] TEST: IPv6 route can not have a group with v4 and v6 gateways [ OK ] TEST: IPv6 route can not have a group with v4 and v6 gateways [ OK ] TEST: IPv6 route using a group after removing v4 gateways [ OK ] TEST: IPv6 route can not have a group with v4 and v6 gateways [ OK ] TEST: IPv6 route can not have a group with v4 and v6 gateways [ OK ] TEST: IPv6 route using a group after replacing v4 gateways [FAIL] TEST: Nexthop with default route and rpfilter [ OK ] TEST: Nexthop with multipath default route and rpfilter [ OK ] Tests passed: 21 Tests failed: 1 Output with previous patch: # ./fib_nexthops.sh -t ipv6_fcnal_runtime IPv6 functional runtime ----------------------- TEST: Route add [ OK ] TEST: Route delete [ OK ] TEST: Ping with nexthop [ OK ] TEST: Ping - multipath [ OK ] TEST: Ping - blackhole [ OK ] TEST: Ping - blackhole replaced with gateway [ OK ] TEST: Ping - gateway replaced by blackhole [ OK ] TEST: Ping - group with blackhole [ OK ] TEST: Ping - group blackhole replaced with gateways [ OK ] TEST: IPv6 route with device only nexthop [ OK ] TEST: IPv6 multipath route with nexthop mix - dev only + gw [ OK ] TEST: IPv6 route can not have a v4 gateway [ OK ] TEST: Nexthop replace - v6 route, v4 nexthop [ OK ] TEST: Nexthop replace of group entry - v6 route, v4 nexthop [ OK ] TEST: IPv6 route can not have a group with v4 and v6 gateways [ OK ] TEST: IPv6 route can not have a group with v4 and v6 gateways [ OK ] TEST: IPv6 route using a group after removing v4 gateways [ OK ] TEST: IPv6 route can not have a group with v4 and v6 gateways [ OK ] TEST: IPv6 route can not have a group with v4 and v6 gateways [ OK ] TEST: IPv6 route using a group after replacing v4 gateways [ OK ] TEST: Nexthop with default route and rpfilter [ OK ] TEST: Nexthop with multipath default route and rpfilter [ OK ] Tests passed: 22 Tests failed: 0 Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 885a3b15791d8255a642cc157decac31f767ddd6 Author: Ido Schimmel Date: Wed Aug 26 19:48:56 2020 +0300 ipv4: nexthop: Correctly update nexthop group when replacing a nexthop Each nexthop group contains an indication if it has IPv4 nexthops ('has_v4'). Its purpose is to prevent IPv6 routes from using groups with IPv4 nexthops. However, the indication is not updated when a nexthop is replaced. This results in the kernel wrongly rejecting IPv6 routes from pointing to groups that only contain IPv6 nexthops. Example: # ip nexthop replace id 1 via 192.0.2.2 dev dummy10 # ip nexthop replace id 10 group 1 # ip nexthop replace id 1 via 2001:db8:1::2 dev dummy10 # ip route replace 2001:db8:10::/64 nhid 10 Error: IPv6 routes can not use an IPv4 nexthop. Solve this by iterating over all the nexthop groups that the replaced nexthop is a member of and potentially update their IPv4 indication according to the new set of member nexthops. Avoid wasting cycles by only performing the update in case an IPv4 nexthop is replaced by an IPv6 nexthop. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 05290a2773e798351cdc69d5373a431b4acdd184 Author: Ido Schimmel Date: Wed Aug 26 19:48:55 2020 +0300 selftests: fib_nexthops: Test IPv6 route with group after removing IPv4 nexthops Test that an IPv6 route can not use a nexthop group with mixed IPv4 and IPv6 nexthops, but can use it after deleting the IPv4 nexthops. Output without previous patch: # ./fib_nexthops.sh -t ipv6_fcnal_runtime IPv6 functional runtime ----------------------- TEST: Route add [ OK ] TEST: Route delete [ OK ] TEST: Ping with nexthop [ OK ] TEST: Ping - multipath [ OK ] TEST: Ping - blackhole [ OK ] TEST: Ping - blackhole replaced with gateway [ OK ] TEST: Ping - gateway replaced by blackhole [ OK ] TEST: Ping - group with blackhole [ OK ] TEST: Ping - group blackhole replaced with gateways [ OK ] TEST: IPv6 route with device only nexthop [ OK ] TEST: IPv6 multipath route with nexthop mix - dev only + gw [ OK ] TEST: IPv6 route can not have a v4 gateway [ OK ] TEST: Nexthop replace - v6 route, v4 nexthop [ OK ] TEST: Nexthop replace of group entry - v6 route, v4 nexthop [ OK ] TEST: IPv6 route can not have a group with v4 and v6 gateways [ OK ] TEST: IPv6 route can not have a group with v4 and v6 gateways [ OK ] TEST: IPv6 route using a group after deleting v4 gateways [FAIL] TEST: Nexthop with default route and rpfilter [ OK ] TEST: Nexthop with multipath default route and rpfilter [ OK ] Tests passed: 18 Tests failed: 1 Output with previous patch: bash-5.0# ./fib_nexthops.sh -t ipv6_fcnal_runtime IPv6 functional runtime ----------------------- TEST: Route add [ OK ] TEST: Route delete [ OK ] TEST: Ping with nexthop [ OK ] TEST: Ping - multipath [ OK ] TEST: Ping - blackhole [ OK ] TEST: Ping - blackhole replaced with gateway [ OK ] TEST: Ping - gateway replaced by blackhole [ OK ] TEST: Ping - group with blackhole [ OK ] TEST: Ping - group blackhole replaced with gateways [ OK ] TEST: IPv6 route with device only nexthop [ OK ] TEST: IPv6 multipath route with nexthop mix - dev only + gw [ OK ] TEST: IPv6 route can not have a v4 gateway [ OK ] TEST: Nexthop replace - v6 route, v4 nexthop [ OK ] TEST: Nexthop replace of group entry - v6 route, v4 nexthop [ OK ] TEST: IPv6 route can not have a group with v4 and v6 gateways [ OK ] TEST: IPv6 route can not have a group with v4 and v6 gateways [ OK ] TEST: IPv6 route using a group after deleting v4 gateways [ OK ] TEST: Nexthop with default route and rpfilter [ OK ] TEST: Nexthop with multipath default route and rpfilter [ OK ] Tests passed: 19 Tests failed: 0 Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 863b25581ce9e6f27dd9acc210356ca35ffe30a2 Author: Ido Schimmel Date: Wed Aug 26 19:48:54 2020 +0300 ipv4: nexthop: Correctly update nexthop group when removing a nexthop Each nexthop group contains an indication if it has IPv4 nexthops ('has_v4'). Its purpose is to prevent IPv6 routes from using groups with IPv4 nexthops. However, the indication is not updated when a nexthop is removed. This results in the kernel wrongly rejecting IPv6 routes from pointing to groups that only contain IPv6 nexthops. Example: # ip nexthop replace id 1 via 192.0.2.2 dev dummy10 # ip nexthop replace id 2 via 2001:db8:1::2 dev dummy10 # ip nexthop replace id 10 group 1/2 # ip nexthop del id 1 # ip route replace 2001:db8:10::/64 nhid 10 Error: IPv6 routes can not use an IPv4 nexthop. Solve this by updating the indication according to the new set of member nexthops. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 233c63785cd92e12d61b283d0eaeafc867fc45f5 Author: Ido Schimmel Date: Wed Aug 26 19:48:53 2020 +0300 ipv4: nexthop: Remove unnecessary rtnl_dereference() The pointer is not RCU protected, so remove the unnecessary rtnl_dereference(). This suppresses the following warning: net/ipv4/nexthop.c:1101:24: error: incompatible types in comparison expression (different address spaces): net/ipv4/nexthop.c:1101:24: struct rb_node [noderef] __rcu * net/ipv4/nexthop.c:1101:24: struct rb_node * Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 33d80996b85283f90474d531920e40ccc2aab918 Author: Ido Schimmel Date: Wed Aug 26 19:48:52 2020 +0300 ipv4: nexthop: Use nla_put_be32() for NHA_GATEWAY The code correctly uses nla_get_be32() to get the payload of the attribute, but incorrectly uses nla_put_u32() to add the attribute to the payload. This results in the following warning: net/ipv4/nexthop.c:279:59: warning: incorrect type in argument 3 (different base types) net/ipv4/nexthop.c:279:59: expected unsigned int [usertype] value net/ipv4/nexthop.c:279:59: got restricted __be32 [usertype] ipv4 Suppress the warning by using nla_put_be32(). Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit d7d49dc77c8db113393a31aced3f0562f4afd439 Author: Ido Schimmel Date: Wed Aug 26 19:48:51 2020 +0300 ipv4: nexthop: Reduce allocation size of 'struct nh_group' The struct looks as follows: struct nh_group { struct nh_group *spare; /* spare group for removals */ u16 num_nh; bool mpath; bool fdb_nh; bool has_v4; struct nh_grp_entry nh_entries[]; }; But its offset within 'struct nexthop' is also taken into account to determine the allocation size. Instead, use struct_size() to allocate only the required number of bytes. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 751e42515efbe00cf8fe8c8bb160a207364dbb2b Merge: 04e006b483c8b aed4d4c663384 Author: David S. Miller Date: Wed Aug 26 15:55:54 2020 -0700 Merge branch 'net_prefetch-API' Tariq Toukan says: ==================== net_prefetch API This patchset adds a common net API for L1 cacheline size-aware prefetch. Patch 1 introduces the common API in net and aligns the drivers to use it. Patches 2 and 3 add usage in mlx4 and mlx5 Eth drivers. Series generated against net-next commit: 079f921e9f4d Merge tag 'batadv-next-for-davem-20200824' of git://git.open-mesh.org/linux-merge ==================== Signed-off-by: David S. Miller commit aed4d4c663384aa8443ce56988fa4858a5c606dc Author: Tariq Toukan Date: Wed Aug 26 15:54:18 2020 +0300 net/mlx4_en: RX, Add a prefetch command for small L1_CACHE_BYTES A single cacheline might not contain the packet header for small L1_CACHE_BYTES values. Use net_prefetch() as it issues an additional prefetch in this case. Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit e20f0dbf204fe2a518ad289f2b39644c69dff531 Author: Tariq Toukan Date: Wed Aug 26 15:54:17 2020 +0300 net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES A single cacheline might not contain the packet header for small L1_CACHE_BYTES values. Use net_prefetch() as it issues an additional prefetch in this case. Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit f468f21b7af0fa472ff8ff70f10b9b4995ef7eb3 Author: Tariq Toukan Date: Wed Aug 26 15:54:16 2020 +0300 net: Take common prefetch code structure into a function Many device drivers use the same prefetch code structure to deal with small L1 cacheline size. Take this code into a function and call it from the drivers. Suggested-by: Jakub Kicinski Signed-off-by: Tariq Toukan Reviewed-by: Saeed Mahameed Signed-off-by: David S. Miller commit 04e006b483c8bcab9033c9610cff9cef5e730758 Merge: 24da79902efc4 9efc9b2b04c74 Author: David S. Miller Date: Wed Aug 26 15:52:30 2020 -0700 Merge branch 'Add-Ethernet-support-for-Intel-Keem-Bay-SoC' Vineetha G. Jaya Kumaran says: ==================== Add Ethernet support for Intel Keem Bay SoC This patch set enables support for Ethernet on the Intel Keem Bay SoC. The first patch contains the required Device Tree bindings documentation, while the second patch adds the Intel platform glue layer for the stmmac device driver. This driver was tested on the Keem Bay evaluation module board. Changes since v2: -Add a select in DT documentation to avoid matching with all nodes containing 'snps,dwmac' -Rebased to 5.9-rc1 Changes since v1: -Removed clocks maxItems property from DT bindings documentation -Removed phy compatible strings from DT bindings documentation ==================== Signed-off-by: David S. Miller commit 9efc9b2b04c74e459eb63ad64251239268ff0837 Author: Rusaimi Amira Ruslan Date: Wed Aug 26 12:33:42 2020 +0800 net: stmmac: Add dwmac-intel-plat for GBE driver Add dwmac-intel-plat to enable the stmmac driver in Intel Keem Bay. Also add fix_mac_speed and tx_clk in order to change link speeds. This is required as mac_speed_o is not connected in the Intel Keem Bay SoC. Signed-off-by: Rusaimi Amira Ruslan Signed-off-by: Vineetha G. Jaya Kumaran Signed-off-by: David S. Miller commit 8d3c875c9d02dc78e25ad4b1a6cc02ef5df28777 Author: Vineetha G. Jaya Kumaran Date: Wed Aug 26 12:33:41 2020 +0800 dt-bindings: net: Add bindings for Intel Keem Bay Add Device Tree bindings documentation for the ethernet controller on Intel Keem Bay. Signed-off-by: Vineetha G. Jaya Kumaran Signed-off-by: David S. Miller commit ef05afa66c59c2031a3798916ef3ff3778232129 Author: Alex Gartrell Date: Wed Aug 26 00:55:49 2020 -0700 libbpf: Fix unintentional success return code in bpf_object__load There are code paths where EINVAL is returned directly without setting errno. In that case, errno could be 0, which would mask the failure. For example, if a careless programmer set log_level to 10000 out of laziness, they would have to spend a long time trying to figure out why. Fixes: 4f33ddb4e3e2 ("libbpf: Propagate EPERM to caller on program load") Signed-off-by: Alex Gartrell Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200826075549.1858580-1-alexgartrell@gmail.com commit 0bbb5462d30cb1a99d442a7d4b4bc5302fe24821 Author: Guchun Chen Date: Wed Aug 26 15:43:42 2020 +0800 drm/amdgpu: correct SE number for arcturus gfx ras When resetting EDC related register, all CUs needs to be visited, otherwise, garbage data from EDC register of missed SEs would present. Signed-off-by: Guchun Chen Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 08572451b4b1783fdff787b0188c4d50fdf96b81 Author: Dinghao Liu Date: Wed Aug 26 21:24:58 2020 +0800 drm/amd/display: Fix memleak in amdgpu_dm_mode_config_init When amdgpu_display_modeset_create_props() fails, state and state->context should be freed to prevent memleak. It's the same when amdgpu_dm_audio_init() fails. Signed-off-by: Dinghao Liu Signed-off-by: Alex Deucher commit faeefe4e54d65c06dd23e5486e5423c564c4a12a Author: Jiansong Chen Date: Wed Aug 26 14:11:52 2020 +0800 drm/amdgpu: disable runtime pm for navy_flounder Disable runtime pm for navy_flounder temporarily. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit ec314c4612653aaf6e8d6a7c23fed9b3f7a0039f Author: Wayne Lin Date: Tue Aug 18 11:19:42 2020 +0800 drm/amd/display: Retry AUX write when fail occurs [Why] In dm_dp_aux_transfer() now, we forget to handle AUX_WR fail cases. We suppose every write wil get done successfully and hence some AUX commands might not sent out indeed. [How] Check if AUX_WR success. If not, retry it. Signed-off-by: Wayne Lin Reviewed-by: Hersen Wu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit cf851f3ff891ff8cb204e7118682d55429c6fb96 Author: Alex Deucher Date: Tue Aug 25 11:43:45 2020 -0400 drm/amdgpu: Fix buffer overflow in INFO ioctl The values for "se_num" and "sh_num" come from the user in the ioctl. They can be in the 0-255 range but if they're more than AMDGPU_GFX_MAX_SE (4) or AMDGPU_GFX_MAX_SH_PER_SE (2) then it results in an out of bounds read. Reported-by: Dan Carpenter Acked-by: Dan Carpenter Signed-off-by: Alex Deucher commit c997e8e26c001c1a92200f44027f6c915c8f5487 Author: Alex Deucher Date: Mon Aug 24 20:17:30 2020 -0400 drm/amdgpu: report DC not supported if virtual display is enabled (v2) Virtual display is non-atomic so report false to avoid checking atomic state and other atomic things at runtime. v2: squash into the sr-iov check Acked-by: Nirmoy Das Acked-by: Guchun Chen Signed-off-by: Alex Deucher commit 6178aed011a31b7d242b80ed3e83fcc9b67444e1 Author: Nicholas Kazlauskas Date: Fri Aug 14 11:49:13 2020 -0400 drm/amd/powerplay: Fix hardmins not being sent to SMU for RV [Why] DC uses these to raise the voltage as needed for higher dispclk/dppclk and to ensure that we have enough bandwidth to drive the displays. There's a bug preventing these from actuially sending messages since it's checking the actual clock (which is 0) instead of the incoming clock (which shouldn't be 0) when deciding to send the hardmin. [How] Check the clocks != 0 instead of the actual clocks. Fixes: 9ed9203c3ee7 ("drm/amd/powerplay: rv dal-pplib interface refactor powerplay part") Signed-off-by: Nicholas Kazlauskas Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 22dd44f47cf74c2891c359976f308941a3736605 Author: Jiansong Chen Date: Tue Aug 25 15:39:57 2020 +0800 drm/amdgpu: use MODE1 reset for navy_flounder by default Switch default gpu reset method to MODE1 for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 5436ab94cd946006271f4e80de90b9a2276e93e3 Author: Stanley.Yang Date: Mon Aug 17 15:48:21 2020 +0800 drm/amdkfd: fix set kfd node ras properties value The ctx->features are new RAS implementation which is only available for Vega20 and onwards, it is not available for vega10, vega10 should follow legacy ECC implementation. Changed from V1: wrap function to initialize kfd node properties Changed from V2: remove wrap function and SDMA SRAM ECC check Signed-off-by: Stanley.Yang Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 1887544d4ddd89fab8a76d150b46c329e7925da1 Author: Evan Quan Date: Tue Aug 25 10:35:11 2020 +0800 drm/amd/pm: correct the thermal alert temperature limit settings Do the maths in celsius degree. This can fix the issues caused by the changes below: drm/amd/pm: correct Vega20 swctf limit setting drm/amd/pm: correct Vega12 swctf limit setting drm/amd/pm: correct Vega10 swctf limit setting Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit c56c90f41343c0ec9606d7d297110ecc84c7f891 Author: Tao Zhou Date: Tue Jul 28 12:44:59 2020 +0800 drm/amdgpu: add asd fw check before loading asd asd is not ready for some ASICs in early stage, and psp->asd_fw is more generic than ASIC name in the check. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 9ddcbf1f4c2d8dadd577c7ee5ae3a5168ebfae96 Author: Alex Dewar Date: Mon Aug 24 22:15:25 2020 +0100 drm/amd/pm: use kmemdup() rather than kmalloc+memcpy Issue identified with Coccinelle. Signed-off-by: Alex Dewar Signed-off-by: Alex Deucher commit 4d2997ab2182fc58e93d33819ea2e2a0a87e6bb9 Author: Alex Deucher Date: Mon Aug 24 12:34:10 2020 -0400 drm/amdgpu: add a wrapper for atom asic_init This allows us to add asic specific workarounds for atom asic init while keeping the adev specifics out of the atombios parser code. Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit a71737313e57a1885c5cba7e006be24cce0f27c2 Author: Alex Deucher Date: Wed Aug 19 17:04:47 2020 -0400 drm/amdgpu: add pre_asic_init callback for navi Nothing to do for this family. Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit b0a2db9b482f16a91b2d67bac6b4977dc471fcab Author: Alex Deucher Date: Wed Aug 19 16:48:17 2020 -0400 drm/amdgpu: add pre_asic_init callback for SOC15 We need to restore some registers prior to running asic init to work around a firmware bug. Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit cff6c7f91a340788dde3b95f471885f7bf36c6c4 Author: Alex Deucher Date: Wed Aug 19 17:04:31 2020 -0400 drm/amdgpu: add pre_asic_init callback for VI Nothing to do for this family. Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 819515c7f30555a970559bedf1aece461dd463a6 Author: Alex Deucher Date: Wed Aug 19 17:03:39 2020 -0400 drm/amdgpu: add pre_asic_init callback for CIK Nothing to do for this family. Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 632d9f9492a9e62a85447ba3203f8f4ca6a5de0e Author: Alex Deucher Date: Wed Aug 19 17:02:41 2020 -0400 drm/amdgpu: add pre_asic_init callback for SI Nothing to do for this family. Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 9737a923c91b70779f770e7a9ab69231ea8e946a Author: Alex Deucher Date: Wed Aug 19 13:40:56 2020 -0400 drm/amdgpu: add an asic callback for pre asic init This callback can be used by asics that need to do something special prior to calling atom asic init. Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit f8646661f713fb7d33ebe404d418bd3fa55c383e Author: Alex Deucher Date: Tue Aug 18 19:24:03 2020 -0400 drm/amdgpu: fix up DCHUBBUB_SDPIF_MMIO_CNTRL_0 handling Properly define this register using a relative offset rather than an absolute offset and use the proper SOC15 macros to access it. It's also DCN, not DCE, so remove it from the DCE12 header. No functional change. Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit b04e48bcac08ae900b5ea77a86f90356f51cf26c Author: Bhawanpreet Lakha Date: Fri Aug 21 11:57:15 2020 -0400 drm/amd/display: Add DPCS regs for dcn3 link encoder dpcs reg are missing for dcn3 link encoder regs list, so add them. Also remove DPCSTX_DEBUG_CONFIG and RDPCSTX_DEBUG_CONFIG as they are unused and cause compile errors for dcn3 Signed-off-by: Bhawanpreet Lakha Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 332f6e1e9880c75b0c7287b8af2547ad28f389cd Author: Felix Kuehling Date: Mon Aug 24 10:18:37 2020 -0400 drm/amdkfd: call amdgpu_amdkfd_get_hive_id directly No need to use a function pointer because the implementation is not ASIC-specific. Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 817154c1a2035fdecead78873245f5b528da451e Author: Felix Kuehling Date: Mon Aug 24 09:55:16 2020 -0400 drm/amdkfd: call amdgpu_amdkfd_get_unique_id directly No need to use a function pointer because the implementation is not ASIC-specific. This fixes missing support due to a missing function pointer on Arcturus. Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 778879b9466b3d2538b56f7972046dbb80b882f3 Author: Randy Dunlap Date: Sun Aug 23 15:35:36 2020 -0700 amdgpu: fix Documentation builds for pm/ file movement Fix Documentation errors for amdgpu.rst due to file rename (moved to another subdirectory). Error: Cannot open file ../drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno -function hwmon ../drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c' failed with return code 1 Fixes: e098bc9612c2 ("drm/amd/pm: optimize the power related source code layout") Signed-off-by: Randy Dunlap Cc: Evan Quan Cc: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit a590a83d74fd4804e95f1e485d552ed7feda9ae1 Author: Youling Tang Date: Sat Aug 22 16:27:23 2020 +0800 gpu: amd: Remove duplicate semicolons at the end of line Remove duplicate semicolons at the end of line. Signed-off-by: Youling Tang Signed-off-by: Alex Deucher commit f0372d4f3f8d27599ee78fb036ca5404b954b944 Author: Brandon Syu Date: Wed Jun 10 16:44:33 2020 +0800 drm/amd/display: Keep current gain when ABM disable immediately [Why] When system enters s3/s0i3, backlight PWM would set user level. [How] ABM disable function add keep current gain to avoid it. Signed-off-by: Brandon Syu Reviewed-by: Josip Pavic Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 5019d8f1034324f284bd3fdb26aee6e7f34b83f9 Author: Samson Tam Date: Thu Aug 13 10:50:21 2020 -0400 drm/amd/display: Fix passive dongle mistaken as active dongle in EDID emulation [Why] dongle_type is set during dongle connection but for passive dongles, dongle_type is not set. If user starts with an active dongle and then switches to a passive dongle, it will still report as an active dongle. Trying to emulate the wrong connecter type results in display not lighting up. [How] Set dpcd_caps.dongle_type for passive dongles in detect_dp(). Signed-off-by: Samson Tam Reviewed-by: Joshua Aberback Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 6f77b2ac628073f647041a92b36c824ae3aef16e Author: Eryk Brol Date: Mon Aug 10 14:08:11 2020 -0400 drm/amd/display: Add connector HPD trigger debugfs entry [why] Need a tool to retrigger a virtual hotplug for testing purposes with force redetection in both DC and DM. [how] Emulate handle_hpd_irq for connector as if usermode would trigger a hotplug. Perform DC link discovery, DM connector update, and DM force atomic commit. In order to trigger HPD on the connector user needs to echo 1 into "trigger_hotplug" debugfs entry on its respective connector. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Mikita Lipski Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 237070fd12967aa3a778aa46fe8eadffa7c5ab68 Author: Eryk Brol Date: Mon Aug 10 14:02:55 2020 -0400 drm/amd/display: Add debugfs for connector's FEC & DSC capabilities [why & how] Useful entry to understand if link has DSC or FEC capabilities, implemented to read DPCD caps stored on the link. Better than manually reading the registers with aux dpcd helper. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Mikita Lipski Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 2d6870d31484a24e864b1649b6d28b2c9b25bf0f Author: Jaehyun Chung Date: Mon Aug 10 16:02:47 2020 -0400 drm/amd/display: Revert HDCP disable sequence change [Why] Revert HDCP disable sequence change that blanks stream before disabling HDCP. PSP and HW teams are currently investigating the root cause of why HDCP cannot be disabled before stream blank, which is expected to work without issues. Signed-off-by: Jaehyun Chung Reviewed-by: Wenjing Liu Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 75f77aafe281c5d971ca876a025093ee62c8a2a8 Author: Wayne Lin Date: Wed Jul 15 16:45:09 2020 +0800 drm/amd/display: Send H14b-VSIF specified in HDMI [Why] Current function excludes the logic to generate H14b-VSIF. Now it constructs HF-VSIF only and causes HDMI compliace test fail. [How] According to HDMI spec, source devices shall utilize the H14b-VSIF whenever the signaling capabilities of the H14b-VSIF allow this. Here keep the logic for HF-VSIF and add H14b-VSIF construction part. Signed-off-by: Wayne Lin Reviewed-by: Roman Li Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 8e1f47e6bb44d148ca53cfd557f5aa1430fe6a47 Author: Chris Park Date: Mon Aug 10 14:20:16 2020 -0400 drm/amd/display: Call DMUB for eDP power control [Why] If DMUB is used, LVTMA VBIOS call can be used to control eDP instead of tranditional transmitter control. Interface is agreed with VBIOS for eDP to use this new path to program LVTMA registers. [How] Expose DAL interface to send DMUB command for LVTMA control that VBIOS currently uses. Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit f8c000a59fd7ec86e20d17cbc22bb90e00ca1f23 Author: Aric Cyr Date: Mon Aug 10 10:19:04 2020 -0400 drm/amd/display: 3.2.99 Signed-off-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 387f3a30cc895abcdad0791fa6c6f3c1f1a69c83 Author: Sung Lee Date: Tue Aug 11 17:23:20 2020 -0400 drm/amd/display: Send DISPLAY_OFF after power down on boot [WHY] update_clocks might not be called on headless adapters. This means DISPLAY_OFF may not be sent in headless cases. [HOW] If hardware is powered down on boot because it is headless (mode set does not happen on that adapter) also send DISPLAY_OFF notification. Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit d3bbba79eb83e8356cd3ac7b250fdd0cc4f85c01 Author: Jiansong Chen Date: Mon Aug 24 18:44:09 2020 +0800 drm/amdgpu/gfx10: refine mgcg setting 1. enable ENABLE_CGTS_LEGACY to fix specviewperf11 random hang. 2. remove obsolete RLC_CGTT_SCLK_OVERRIDE workaround. Signed-off-by: Jiansong Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6127896f4a272578a62d1b439e86e64721296d65 Author: Huang Rui Date: Tue Aug 18 14:54:23 2020 +0800 drm/amdkfd: implement the dGPU fallback path for apu (v6) We still have a few iommu issues which need to address, so force raven as "dgpu" path for the moment. This is to add the fallback path to bypass IOMMU if IOMMU v2 is disabled or ACPI CRAT table not correct. v2: Use ignore_crat parameter to decide whether it will go with IOMMUv2. v3: Align with existed thunk, don't change the way of raven, only renoir will use "dgpu" path by default. v4: don't update global ignore_crat in the driver, and revise fallback function if CRAT is broken. v5: refine acpi crat good but no iommu support case, and rename the title. v6: fix the issue of dGPU initialized firstly, just modify the report value in the node_show(). Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit bfcc0c162a6ad3c8025fea0e966b2a09add80b8e Author: Evan Quan Date: Fri Aug 21 12:21:30 2020 +0800 drm/amd/pm: correct Vega20 swctf limit setting Correct the Vega20 thermal swctf limit. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b23f9f60424732ce517cc6f02d7c34cf2f25ac50 Author: Evan Quan Date: Fri Aug 21 12:18:58 2020 +0800 drm/amd/pm: correct Vega12 swctf limit setting Correct the Vega12 thermal swctf limit. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7323923260cd6f72c3b38c4da3fcc7909df48ac0 Author: Evan Quan Date: Fri Aug 21 12:05:03 2020 +0800 drm/amd/pm: correct Vega10 swctf limit setting Correct the Vega10 thermal swctf limit. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1267 Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8aba21b75136c39c4bf63345d699d97dc477ce0e Author: Luben Tuikov Date: Fri Aug 14 20:41:55 2020 -0400 drm/amdgpu: Embed drm_device into amdgpu_device (v3) a) Embed struct drm_device into struct amdgpu_device. b) Modify the inline-f drm_to_adev() accordingly. c) Modify the inline-f adev_to_drm() accordingly. d) Eliminate the use of drm_device.dev_private, in amdgpu. e) Switch from using drm_dev_alloc() to drm_dev_init(). f) Add a DRM driver release function, which frees the container amdgpu_device after all krefs on the contained drm_device have been released. v2: Split out adding adev_to_drm() into its own patch (previous commit), making this patch more succinct and clear. More detailed commit description. v3: squash in fix to call drmm_add_final_kfree() to avoid a warning. Signed-off-by: Luben Tuikov Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1fc0e18b6e06cbc174a814d8fe69d37212287d1f Merge: 7100ff7c62682 1410620cf20e7 Author: Alexei Starovoitov Date: Wed Aug 26 12:47:57 2020 -0700 Merge branch 'resolve_prog_type' Udip Pant says: ==================== This patch series adds changes in verifier to make decisions such as granting of read / write access or enforcement of return code status based on the program type of the target program while using dynamic program extension (of type BPF_PROG_TYPE_EXT). The BPF_PROG_TYPE_EXT type can be used to extend types such as XDP, SKB and others. Since the BPF_PROG_TYPE_EXT program type on itself is just a placeholder for those, we need this extended check for those extended programs to actually work with proper access, while using this option. Patch #1 includes changes in the verifier. Patch #2 adds selftests to verify write access on a packet for a valid extension program type Patch #3 adds selftests to verify proper check for the return code Patch #4 adds selftests to ensure access permissions and restrictions for some map types such sockmap. Changelogs: v2 -> v3: * more comprehensive resolution of the program type in the verifier based on the target program (and not just for the packet access) * selftests for checking return code and map access * Also moved this patch to 'bpf-next' from 'bpf' tree v1 -> v2: * extraction of the logic to resolve prog type into a separate method * selftests to check for packet access for a valid freplace prog ==================== Acked-by: Yonghong Song Acked-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov commit 1410620cf20e7e23cce17983e9a81af659b28583 Author: Udip Pant Date: Tue Aug 25 16:20:03 2020 -0700 selftests/bpf: Test for map update access from within EXT programs This adds further tests to ensure access permissions and restrictions are applied properly for some map types such as sock-map. It also adds another negative tests to assert static functions cannot be replaced. In the 'unreliable' mode it still fails with error 'tracing progs cannot use bpf_spin_lock yet' with the change in the verifier Signed-off-by: Udip Pant Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200825232003.2877030-5-udippant@fb.com commit 50d19736aff497a4c25ec7e36375195bfd8570cd Author: Udip Pant Date: Tue Aug 25 16:20:02 2020 -0700 selftests/bpf: Test for checking return code for the extended prog This adds test to enforce same check for the return code for the extended prog as it is enforced for the target program. It asserts failure for a return code, which is permitted without the patch in this series, while it is restricted after the application of this patch. Signed-off-by: Udip Pant Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200825232003.2877030-4-udippant@fb.com commit 6dc03dc71387e1dc65cf14efb49e5cf7062a2d46 Author: Udip Pant Date: Tue Aug 25 16:20:01 2020 -0700 selftests/bpf: Add test for freplace program with write access This adds a selftest that tests the behavior when a freplace target program attempts to make a write access on a packet. The expectation is that the read or write access is granted based on the program type of the linked program and not itself (which is of type, for e.g., BPF_PROG_TYPE_EXT). This test fails without the associated patch on the verifier. Signed-off-by: Udip Pant Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200825232003.2877030-3-udippant@fb.com commit 7e40781cc8b767dd6530910ae12d75978d7d68e1 Author: Udip Pant Date: Tue Aug 25 16:20:00 2020 -0700 bpf: verifier: Use target program's type for access verifications This patch adds changes in verifier to make decisions such as granting of read / write access or enforcement of return code status based on the program type of the target program while using dynamic program extension (of type BPF_PROG_TYPE_EXT). The BPF_PROG_TYPE_EXT type can be used to extend types such as XDP, SKB and others. Since the BPF_PROG_TYPE_EXT program type on itself is just a placeholder for those, we need this extended check for those extended programs to actually work with proper access, while using this option. Specifically, it introduces following changes: - may_access_direct_pkt_data: allow access to packet data based on the target prog - check_return_code: enforce return code based on the target prog (currently, this check is skipped for EXT program) - check_ld_abs: check for 'may_access_skb' based on the target prog - check_map_prog_compatibility: enforce the map compatibility check based on the target prog - may_update_sockmap: allow sockmap update based on the target prog Some other occurrences of prog->type is left as it without replacing with the 'resolved' type: - do_check_common() and check_attach_btf_id(): already have specific logic to handle the EXT prog type - jit_subprogs() and bpf_check(): Not changed for jit compilation or while inferring env->ops Next few patches in this series include selftests for some of these cases. Signed-off-by: Udip Pant Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200825232003.2877030-2-udippant@fb.com commit 043ebcf3204ca1a0ce0d03cb7dc6e0d63d2cf512 Author: Ikjoon Jang Date: Wed Aug 26 16:54:50 2020 +0800 dt-bindings: spi: Convert spi-mtk-nor to json-schema Convert Mediatek ARM SOC's serial NOR flash controller binding to json-schema format. Signed-off-by: Ikjoon Jang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200826085450.508556-1-ikjn@chromium.org Signed-off-by: Mark Brown commit 3a2fd4011a1ecec361498301a27d79d5fef255de Author: Andy Shevchenko Date: Wed Aug 26 18:14:55 2020 +0300 spi: pxa2xx: Drop useless comment in the pxa2xx_ssp.h No need to have file name inside file. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200826151455.55970-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 410f4cf79f64b1831e207b89f3c7ab08e36aa646 Author: Andy Shevchenko Date: Wed Aug 26 18:14:54 2020 +0300 spi: pxa2xx: Switch to use BIT() and GENMASK() in pxa2xx_ssp.h Switch pxa2xx_ssp.h header to use BIT() and GENMASK(). It's better to read and understand. While here, correct ordering of some definitions. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200826151455.55970-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit e7aaf8748897d88fd1d17bfa461df84cf233d5a9 Author: Andy Shevchenko Date: Wed Aug 26 18:14:53 2020 +0300 spi: pxa2xx: Update header block in pxa2xx_ssp.h We have direct users of some headers that are missed and have header included when forward declarations are enough. Update header block in pxa2xx_ssp.h to align with actual usage. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200826151455.55970-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 1b9abd1755ad947d7c9913e92e7837b533124c90 Author: Andy Lutomirski Date: Wed Aug 26 10:00:46 2020 -0700 selftests/x86/fsgsbase: Test PTRACE_PEEKUSER for GSBASE with invalid LDT GS This tests commit: 8ab49526b53d ("x86/fsgsbase/64: Fix NULL deref in 86_fsgsbase_read_task") Unpatched kernels will OOPS. Signed-off-by: Andy Lutomirski Signed-off-by: Ingo Molnar Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/c618ae86d1f757e01b1a8e79869f553cb88acf9a.1598461151.git.luto@kernel.org commit ab2dd173330a3f07142e68cd65682205036cd00f Author: Andy Lutomirski Date: Wed Aug 26 10:00:45 2020 -0700 selftests/x86/fsgsbase: Reap a forgotten child The ptrace() test forgot to reap its child. Reap it. Signed-off-by: Andy Lutomirski Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/e7700a503f30e79ab35a63103938a19893dbeff2.1598461151.git.luto@kernel.org commit 7f9fb67358a2bcaacbdfeee12e0f19e98c8bdf55 Author: Xu Yilun Date: Wed Aug 19 15:34:56 2020 +0800 regmap: add Intel SPI Slave to AVMM Bus Bridge support This patch add support for regmap APIs that are intended to be used by the drivers of some SPI slave chips which integrate the "SPI slave to Avalon Master Bridge" (spi-avmm) IP. The spi-avmm IP acts as a bridge to convert encoded streams of bytes from the host to the chip's internal register read/write on Avalon bus. The driver implements the register read/write operations for a generic SPI master to access the sub devices behind spi-avmm bridge. Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Signed-off-by: Matthew Gerlach Signed-off-by: Russ Weight Reviewed-by: Tom Rix Reviewed-by: Luis Claudio R. Goncalves Link: https://lore.kernel.org/r/1597822497-25107-2-git-send-email-yilun.xu@intel.com Signed-off-by: Mark Brown commit 4c54228ac8fd55044195825873c50a524131fa53 Author: Dan Carpenter Date: Tue Aug 25 13:47:07 2020 +0300 memory: omap-gpmc: Fix a couple off by ones These comparisons should be >= instead of > to prevent reading one element beyond the end of the gpmc_cs[] array. Fixes: cdd6928c589a ("ARM: OMAP2+: Add device-tree support for NOR flash") Fixes: f37e4580c409 ("ARM: OMAP2: Dynamic allocator for GPMC memory space") Signed-off-by: Dan Carpenter Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20200825104707.GB278587@mwanda Signed-off-by: Krzysztof Kozlowski commit a91da66861084df3521e7e001aa4c49d5ff51879 Author: Clint Taylor Date: Tue Aug 25 19:57:24 2020 -0700 drm/i915/gt: Implement WA_1406941453 Enable HW Default flip for small PL. bspec: 52890 bspec: 53508 bspec: 53273 v2: rebase to drm-tip v3: move from ctx to gt workarounds. Remove whitelist. v4: move to rcs WA init Cc: Matt Atwood Cc: Matt Roper Cc: José Roberto de Souza Signed-off-by: Clint Taylor Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200826025724.20944-1-clinton.a.taylor@intel.com commit 94d4c13233c21234f6cdccf8cf2593a6772b85f3 Author: Enric Balletbo i Serra Date: Wed Aug 26 10:15:25 2020 +0200 drm/bridge: ps8640: Print an error if VDO control fails Print an error message inside ps8640_bridge_vdo_control() function when it fails so we can simplify a bit the callers, they will only need to check the error code. Reviewed-by: Sam Ravnborg Signed-off-by: Enric Balletbo i Serra Reviewed-by: Bilal Wasim Tested-by: Bilal Wasim Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200826081526.674866-5-enric.balletbo@collabora.com commit 812a65ba9411c5b3a68e92da061ec91a328774d2 Author: Enric Balletbo i Serra Date: Wed Aug 26 10:15:24 2020 +0200 drm/bridge: ps8640: Return an error for incorrect attach flags Bridge drivers that implement the new model only shall return an error from their attach() handler when the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag is not set. So make sure we return an error because only the new drm_bridge model is supported. Reviewed-by: Sam Ravnborg Signed-off-by: Enric Balletbo i Serra Reviewed-by: Bilal Wasim Tested-by: Bilal Wasim Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200826081526.674866-4-enric.balletbo@collabora.com commit d82c12ab16b8477a6a79452f820f395c3899efa4 Author: Enric Balletbo i Serra Date: Wed Aug 26 10:15:23 2020 +0200 drm/bridge: ps8640: Get the EDID from eDP control The PS8640 DSI-to-eDP bridge can retrieve the EDID, so implement the .get_edid callback and set the flag to indicate the core to use it. Reviewed-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Enric Balletbo i Serra Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200826081526.674866-3-enric.balletbo@collabora.com commit c5589b39549d1875bb506da473bf4580c959db8c Author: Enric Balletbo i Serra Date: Wed Aug 26 10:15:22 2020 +0200 drm/bridge_connector: Set default status connected for eDP connectors In an eDP application, HPD is not required and on most bridge chips useless. If HPD is not used, we need to set initial status as connected, otherwise the connector created by the drm_bridge_connector API remains in an unknown state. Reviewed-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Enric Balletbo i Serra Reviewed-by: Bilal Wasim Tested-by: Bilal Wasim Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200826081526.674866-2-enric.balletbo@collabora.com commit d84eca28c807dbcdb40a2b8e2697118b99fdb2fd Author: Helen Koike Date: Tue Aug 25 15:22:09 2020 +0200 media: MAINTAINERS: add Dafna Hirschfeld for rkisp1 Add Dafna Hirschfeld to rkisp1 maintainers list Signed-off-by: Helen Koike Acked-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1fae3d964880a6419c581b5cdb1efb70a0f3a8a2 Author: Christopher Snowhill Date: Tue Aug 25 05:51:08 2020 +0200 media: Implements support for the MyGica iGrabber This small change adds the device identifier for the MyGica iGrabber, which features an Empia EM2860, a Philips SAA7113, Empia EMP202, and no tuner. Verified that both the composite and S-Video inputs work with NTSC source. It does not appear to need any port twiddling on pre-init. Signed-off-by: Christopher Snowhill Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 505bfc2a142f12ce7bc7a878b44abc3496f2e747 Author: Tom Rix Date: Sat Aug 22 23:15:47 2020 +0200 media: tuner-simple: fix regression in simple_set_radio_freq clang static analysis reports this problem tuner-simple.c:714:13: warning: Assigned value is garbage or undefined buffer[1] = buffer[3]; ^ ~~~~~~~~~ In simple_set_radio_freq buffer[3] used to be done in-function with a switch of tuner type, now done by a call to simple_radio_bandswitch which has this case case TUNER_TENA_9533_DI: case TUNER_YMEC_TVF_5533MF: tuner_dbg("This tuner doesn't ... return 0; which does not set buffer[3]. In the old logic, this case would have returned 0 from simple_set_radio_freq. Recover this old behavior by returning an error for this codition. Since the old simple_set_radio_freq behavior returned a 0, do the same. Fixes: c7a9f3aa1e1b ("V4L/DVB (7129): tuner-simple: move device-specific code into three separate functions") Signed-off-by: Tom Rix Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 45c2044ccbedd48bc2a8cddde9ce7e82f03d588c Author: Peilin Ye Date: Fri Aug 21 17:13:43 2020 +0200 media: v4l2-tpg: Clamp hue in tpg_s_hue() Setting `hue` by calling tpg_s_hue() directly is risky, since it does not perform range check. Clamp `hue` to the valid range in tpg_s_hue(). Suggested-by: Hans Verkuil Signed-off-by: Peilin Ye Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e3158a5e7e661786b3ab650c7e4d21024e8eff0f Author: Peilin Ye Date: Fri Aug 21 14:46:45 2020 +0200 media: vivid: Fix global-out-of-bounds read in precalculate_color() vivid_meta_out_process() is setting `brightness`, `contrast`, `saturation` and `hue` using tpg_s_*(). This is wrong, since tpg_s_*() do not provide range checks. Using tpg_s_*() here also makes the control framework out-of-sync with the actual values. Use v4l2_ctrl_s_ctrl() instead. This issue has been reported by syzbot as an out-of-bounds read bug in precalculate_color(). Reported-and-tested-by: syzbot+02d9172bf4c43104cd70@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=02d9172bf4c43104cd70 Fixes: 746facd39370 ("media: vivid: Add metadata output support") Suggested-by: Hans Verkuil Signed-off-by: Peilin Ye Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 209d926b2a2ea6cde9f3cd8cdfab408c4eedb4f3 Author: Alexandre Courbot Date: Fri Aug 21 12:43:05 2020 +0200 media: mtk-vcodec: fix Kconfig help text The Kconfig help text for VIDEO_MEDIATEK_VCODEC was referring to a single module named mtk-vcodec, while this driver produces two modules named mtk-vcodec-dec and mtk-vcodec-enc. Fix that. Reported-by: Ezequiel Garcia Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 13483fc2f20f0e2db7ba9c39b095ac7ea46f8de8 Author: Hsin-Yi Wang Date: Fri Aug 21 06:14:14 2020 +0200 media: mtk-vcodec: set dma max segment size Set dma max segment size for encoder and decoder driver. Fix following warning with CONFIG_DMA_API_DEBUG_SG=y [ 75.147825] ------------[ cut here ]------------ [ 75.147844] mtk-vcodec-enc 19002000.vcodec: DMA-API: mapping sg segment longer than device claims to support [len=983040] [max=65536] [ 75.147876] WARNING: CPU: 2 PID: 4069 at kernel/dma/debug.c:1302 debug_dma_map_sg+0x1a8/0x2c4 ... [ 75.148139] Call trace: [ 75.148149] debug_dma_map_sg+0x1a8/0x2c4 [ 75.148165] vb2_dc_get_userptr+0x228/0x364 [videobuf2_dma_contig] [ 75.148178] __buf_prepare+0x3ac/0x8c0 [videobuf2_common] [ 75.148188] vb2_core_qbuf+0xa4/0x58c [videobuf2_common] [ 75.148199] vb2_qbuf+0x88/0xe4 [videobuf2_v4l2] [ 75.148211] v4l2_m2m_qbuf+0x80/0xf8 [v4l2_mem2mem] [ 75.148221] vidioc_venc_qbuf+0x3c/0x70 [mtk_vcodec_enc] [ 75.148234] v4l_qbuf+0x48/0x58 [ 75.148242] __video_do_ioctl+0x200/0x37c [ 75.148250] video_usercopy+0x360/0x834 [ 75.148259] video_ioctl2+0x38/0x48 [ 75.148267] v4l2_ioctl+0x6c/0x80 [ 75.148276] do_video_ioctl+0xefc/0x4b70 [ 75.148284] v4l2_compat_ioctl32+0x5c/0xcc [ 75.148294] __arm64_compat_sys_ioctl+0xf4/0x240 [ 75.148304] el0_svc_common+0xac/0x198 [ 75.148312] el0_svc_compat_handler+0x2c/0x40 [ 75.148321] el0_svc_compat+0x8/0x18 [ 75.148328] irq event stamp: 0 [ 75.148337] hardirqs last enabled at (0): [<0000000000000000>] (null) [ 75.148347] hardirqs last disabled at (0): [] copy_process+0x380/0x115c [ 75.148356] softirqs last enabled at (0): [] copy_process+0x398/0x115c [ 75.148364] softirqs last disabled at (0): [<0000000000000000>] (null) [ 75.148372] ---[ end trace 588bf529451e3531 ]--- Reported-by: Anand K Mistry Signed-off-by: Hsin-Yi Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ab0e9fa1579d5e372822038e9d2a6d21c164ede6 Author: Tong Zhang Date: Thu Aug 20 18:52:40 2020 +0200 media: pvrusb2: fix parsing error pvr2_std_str_to_id() returns 0 on failure and 1 on success, however the caller is checking failure case using <0 Acked-by: Mike Isely Co-developed-by: Hans Verkuil Signed-off-by: Hans Verkuil Signed-off-by: Tong Zhang Signed-off-by: Mauro Carvalho Chehab commit 4bff8cb5450287e246d365b719148b2d9364c292 Author: Sven Schnelle Date: Tue Apr 28 09:52:23 2020 +0200 s390: convert to GENERIC_VDSO Convert s390 to generic vDSO. There are a few special things on s390: - vDSO can be called without a stack frame - glibc did this in the past. So we need to allocate a stackframe on our own. - The former assembly code used stcke to get the TOD clock and applied time steering to it. We need to do the same in the new code. This is done in the architecture specific __arch_get_hw_counter function. The steering information is stored in an architecure specific area in the vDSO data. - CPUCLOCK_VIRT is now handled with a syscall fallback, which might be slower/less accurate than the old implementation. The getcpu() function stays as an assembly function because there is no generic implementation and the code is just a few lines. Performance number from my system do 100 mio gettimeofday() calls: Plain syscall: 8.6s Generic VDSO: 1.3s old ASM VDSO: 1s So it's a bit slower but still much faster than syscalls. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 98ad45fb58c14ebef6da27f91905e5b8fcff8686 Author: Heiko Carstens Date: Tue Aug 11 16:41:27 2020 +0200 s390/checksum: coding style changes Add some coding style changes which hopefully make the code look a bit less odd. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 612ad0785dd5161dc311b10bd26038553a378386 Author: Heiko Carstens Date: Tue Aug 11 16:37:33 2020 +0200 s390/checksum: have consistent calculations Use "|" instead of "+" within csum_fold() for consistency reasons, like in the rest of the file. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 614b4f5d0fa3f622cfcc899491d8a3e6af3d4dc5 Author: Heiko Carstens Date: Tue Aug 11 16:36:26 2020 +0200 s390/checksum: make ip_fast_csum() faster Convert ip_fast_csum() so it doesn't call csum_partial(), but instead open code the checksum calculation. The problem with csum_partial() is that it makes use of the cksm instruction, which has high startup costs and therefore is only very fast if used on larger memory regions. IPv4 headers however are small in size (5-16 32-bit words). The open coded variant calculates the checksum in ~30% of the time compared to the old variant (z14, march=z196). Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit bb4644b14accb05663847277002e3efa9fa3cd3b Author: Heiko Carstens Date: Tue Aug 11 15:30:30 2020 +0200 s390/checksum: rewrite csum_tcpudp_nofold() Rewrite csum_tcpudp_nofold() so that the generated code will not contain branches. The old implementation was also optimized for machines which came with "add logical with carry" instructions, however the compiler doesn't generate them anymore. This is most likely because those instructions are slower. However with the old code the compiler generates a lot of branches, which isn't too helpful usually. Therefore rewrite the code. In a tight loop this doesn't make any difference since the branch prediction unit does its job. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b064904c509decf9e038f29f903a2304851a913b Author: Heiko Carstens Date: Tue Aug 11 11:16:51 2020 +0200 s390/checksum: provide csum_ipv6_magic() This implementation needs only ~30% of the time to calculate the checksum compared to the generic variant. In addition the compiler also generates only ~30% of the instructions compared to the generic variant (on z14, compiled with march=z196). Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 1e36d9c6886849c6f3d3c836370563e6bc1a6ddd Author: Tony Luck Date: Mon Aug 24 15:12:37 2020 -0700 x86/mce: Delay clearing IA32_MCG_STATUS to the end of do_machine_check() A long time ago, Linux cleared IA32_MCG_STATUS at the very end of machine check processing. Then, some fancy recovery and IST manipulation was added in: d4812e169de4 ("x86, mce: Get rid of TIF_MCE_NOTIFY and associated mce tricks") and clearing IA32_MCG_STATUS was pulled earlier in the function. Next change moved the actual recovery out of do_machine_check() and just used task_work_add() to schedule it later (before returning to the user): 5567d11c21a1 ("x86/mce: Send #MC singal from task work") Most recently the fancy IST footwork was removed as no longer needed: b052df3da821 ("x86/entry: Get rid of ist_begin/end_non_atomic()") At this point there is no reason remaining to clear IA32_MCG_STATUS early. It can move back to the very end of the function. Also move sync_core(). The comments for this function say that it should only be called when instructions have been changed/re-mapped. Recovery for an instruction fetch may change the physical address. But that doesn't happen until the scheduled work runs (which could be on another CPU). [ bp: Massage commit message. ] Reported-by: Gabriele Paoloni Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200824221237.5397-1-tony.luck@intel.com commit 7100ff7c62682c2332300ffde8706578e1098e13 Author: Colin Ian King Date: Wed Aug 26 09:59:07 2020 +0100 selftests/bpf: Fix spelling mistake "scoket" -> "socket" There is a spelling mistake in a check error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200826085907.43095-1-colin.king@canonical.com commit 29b6bd41ee24f69a85666b9f68d500b382d408fd Author: Fenghua Yu Date: Mon Aug 24 12:11:21 2020 -0700 x86/resctrl: Enable user to view thread or core throttling mode Early Intel hardware implementations of Memory Bandwidth Allocation (MBA) could only control bandwidth at the processor core level. This meant that when two processes with different bandwidth allocations ran simultaneously on the same core the hardware had to resolve this difference. It did so by applying the higher throttling value (lower bandwidth) to both processes. Newer implementations can apply different throttling values to each thread on a core. Introduce a new resctrl file, "thread_throttle_mode", on Intel systems that shows to the user how throttling values are allocated, per-core or per-thread. On systems that support per-core throttling, the file will display "max". On newer systems that support per-thread throttling, the file will display "per-thread". AMD confirmed in [1] that AMD bandwidth allocation is already at thread level but that the AMD implementation does not use a memory delay throttle mode. So to avoid confusion the thread throttling mode would be UNDEFINED on AMD systems and the "thread_throttle_mode" file will not be visible. Originally-by: Reinette Chatre Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/1598296281-127595-3-git-send-email-fenghua.yu@intel.com Link: [1] https://lore.kernel.org/lkml/18d277fd-6523-319c-d560-66b63ff606b8@amd.com commit e48cb1a3fb9165009fe318e1db2fde10d303c1d3 Author: Fenghua Yu Date: Mon Aug 24 12:11:20 2020 -0700 x86/resctrl: Enumerate per-thread MBA controls Some systems support per-thread Memory Bandwidth Allocation (MBA) which applies a throttling delay value to each hardware thread instead of to a core. Per-thread MBA is enumerated by CPUID. No feature flag is shown in /proc/cpuinfo. User applications need to check a resctrl throttling mode info file to know if the feature is supported. Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov Reviewed-by: Babu Moger Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/1598296281-127595-2-git-send-email-fenghua.yu@intel.com commit 6ad7cbc01527223f3f92baac9b122f15651cf76b Author: Nathan Huckleberry Date: Sat Aug 22 23:56:18 2020 +0900 Makefile: Add clang-tidy and static analyzer support to makefile This patch adds clang-tidy and the clang static-analyzer as make targets. The goal of this patch is to make static analysis tools usable and extendable by any developer or researcher who is familiar with basic c++. The current static analysis tools require intimate knowledge of the internal workings of the static analysis. Clang-tidy and the clang static analyzers expose an easy to use api and allow users unfamiliar with clang to write new checks with relative ease. ===Clang-tidy=== Clang-tidy is an easily extendable 'linter' that runs on the AST. Clang-tidy checks are easy to write and understand. A check consists of two parts, a matcher and a checker. The matcher is created using a domain specific language that acts on the AST (https://clang.llvm.org/docs/LibASTMatchersReference.html). When AST nodes are found by the matcher a callback is made to the checker. The checker can then execute additional checks and issue warnings. Here is an example clang-tidy check to report functions that have calls to local_irq_disable without calls to local_irq_enable and vice-versa. Functions flagged with __attribute((annotation("ignore_irq_balancing"))) are ignored for analysis. (https://reviews.llvm.org/D65828) ===Clang static analyzer=== The clang static analyzer is a more powerful static analysis tool that uses symbolic execution to find bugs. Currently there is a check that looks for potential security bugs from invalid uses of kmalloc and kfree. There are several more general purpose checks that are useful for the kernel. The clang static analyzer is well documented and designed to be extensible. (https://clang-analyzer.llvm.org/checker_dev_manual.html) (https://github.com/haoNoQ/clang-analyzer-guide/releases/download/v0.1/clang-analyzer-guide-v0.1.pdf) The main draw of the clang tools is how accessible they are. The clang documentation is very nice and these tools are built specifically to be easily extendable by any developer. They provide an accessible method of bug-finding and research to people who are not overly familiar with the kernel codebase. Signed-off-by: Nathan Huckleberry Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Tested-by: Lukas Bulwahn Signed-off-by: Masahiro Yamada commit 8b61f748e2a022f9028c612e44b68ad61caec474 Author: Masahiro Yamada Date: Sat Aug 22 23:56:17 2020 +0900 gen_compile_commands: remove the warning about too few .cmd files This warning was useful when users previously needed to manually build the kernel and run this script. Now you can simply do 'make compile_commands.json', which updates all the necessary build artifacts and automatically creates the compilation database. There is no more worry for a mistake like "Oh, I forgot to build the kernel". Now, this warning is rather annoying. You can create compile_commands.json for an external module: $ make M=/path/to/your/external/module compile_commands.json Then, this warning is displayed since there are usually less than 300 files in a single module. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit 3d32285fa99598f1885ac7022785b9c343407e62 Author: Masahiro Yamada Date: Sat Aug 22 23:56:16 2020 +0900 kbuild: wire up the build rule of compile_commands.json to Makefile Currently, you need to manually run scripts/gen_compile_commands.py to create compile_commands.json. It parses all the .*.cmd files found under the specified directory. If you rebuild the kernel over again without 'make clean', .*.cmd files from older builds will create stale entries in compile_commands.json. This commit wires up the compile_commands.json rule to Makefile, and makes it parse only the .*.cmd files involved in the current build. Pass $(KBUILD_VMLINUX_OBJS), $(KBUILD_VMLINUX_LIBS), and modules.order to the script. The objects or archives linked to vmlinux are listed in $(KBUILD_VMLINUX_OBJS) or $(KBUILD_VMLINUX_LIBS). All the modules are listed in modules.order. You can create compile_commands.json from Make: $ make -j$(nproc) CC=clang compile_commands.json You can also build vmlinux, modules, and compile_commands.json all together in a single command: $ make -j$(nproc) CC=clang all compile_commands.json It works for M= builds as well. In this case, compile_commands.json is created in the top directory of the external module. This is convenient, but it has a drawback; the coverage of the compile_commands.json is reduced because only the objects linked to vmlinux or modules are handled. For example, the following C files are not included in the compile_commands.json: - Decompressor source files (arch/*/boot/) - VDSO source files - C files used to generate intermediates (e.g. kernel/bounds.c) - Standalone host programs I think it is fine for most developers because our main interest is the kernel-space code. If you want to cover all the compiled C files, please build the kernel, then run the script manually as you did before: $ make clean # if you want to remove stale .cmd files [optional] $ make -j$(nproc) CC=clang $ scripts/gen_compile_commands.py Here is a note for out-of-tree builds. 'make compile_commands.json' works with O= option, but please notice compile_commands.json is created in the object tree instead of the source tree. Some people may want to have compile_commands.json in the source tree because Clang Tools searches for it through all parent paths of the first input source file. However, you cannot do this for O= builds. Kbuild should never generate any build artifact in the source tree when O= is given because the source tree might be read-only. Any write attempt to the source tree is monitored and the violation may be reported. See the commit log of 8ef14c2c41d9. So, the only possible way is to create compile_commands.json in the object tree, then specify '-p ' when you use clang-check, clang-tidy, etc. Signed-off-by: Masahiro Yamada Acked-by: Nick Desaulniers commit ecca4fea1ede446e9ce3afa0b68b07fd1550f4f5 Author: Masahiro Yamada Date: Sat Aug 22 23:56:15 2020 +0900 gen_compile_commands: support *.o, *.a, modules.order in positional argument This script currently searches the specified directory for .cmd files. One drawback is it may contain stale .cmd files after you rebuild the kernel several times without 'make clean'. This commit supports *.o, *.a, and modules.order as positional parameters. If such files are given, they are parsed to collect associated .cmd files. I added a generator helper for each of them. This feature is useful to get the list of active .cmd files from the last build, and will be used by the next commit to wire up the compile_commands.json rule to the Makefile. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit fc2cb22ec61c1a537337cd0eba458863564a0e1f Author: Masahiro Yamada Date: Sat Aug 22 23:56:14 2020 +0900 gen_compile_commands: move directory walk to a generator function Currently, this script walks under the specified directory (default to the current directory), then parses all .cmd files found. Split it into a separate helper function because the next commit will add more helpers to pick up .cmd files associated with given file(s). There is no point to build and return a huge list at once. I used a generator so it works in the for-loop with less memory. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit 6fca36f1d82ad5bc385187f0aed93bbaefaa2172 Author: Masahiro Yamada Date: Sat Aug 22 23:56:13 2020 +0900 gen_compile_commands: make -o option independent of -d option Change the -o option independent of the -d option, which is I think clearer behavior. Some people may like to use -d to specify a separate output directory, but still output the compile_commands.py in the source directory (unless the source tree is read-only) because it is the default location Clang Tools search for the compilation database. Also, move the default parameter to the default= argument of the .add_argument(). Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit 0a7d376d04a3c84b503f1efecde8f9d9a7430269 Author: Masahiro Yamada Date: Sat Aug 22 23:56:12 2020 +0900 gen_compile_commands: reword the help message of -d option I think the help message of the -d option is somewhat misleading. Path to the kernel source directory to search (defaults to the working directory) The part "kernel source directory" is the source of the confusion. Some people misunderstand as if this script did not support separate output directories. Actually, this script also works for out-of-tree builds. You can use the -d option to point to the object output directory, not to the source directory. It should match to the O= option used in the previous kernel build, and then appears in the "directory" field of compile_commands.json. Reword the help message. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit 6ca4c6d25949117dc5b4845612e290b6d89e70a8 Author: Masahiro Yamada Date: Sat Aug 22 23:56:11 2020 +0900 gen_compile_commands: do not support .cmd files under tools/ directory The tools/ directory uses a different build system, and the format of .cmd files is different because the tools builds run in a different work directory. Supporting two formats compilicates the script. The only loss by this change is objtool. Also, rename the confusing variable 'relative_path' because it is not necessarily a relative path. When the output directory is not the direct child of the source tree (e.g. O=foo/bar), it is an absolute path. Rename it to 'file_path'. os.path.join(root_directory, file_path) works whether the file_path is relative or not. If file_path is already absolute, it returns it as-is. I used os.path.abspath() to normalize file paths. If you run this script against the kernel built with O=foo option, the file_path contains '../' patterns. os.path.abspath() fixes up 'foo/bar/../baz' into 'foo/baz', and produces a cleaner commands_database.json. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit ea6cedc5b8a4e666da41f1173ea19970fa60683f Author: Masahiro Yamada Date: Sat Aug 22 23:56:10 2020 +0900 gen_compile_commands: use choices for --log_levels option Use 'choices' to check if the given parameter is valid. I also simplified the help message because, with 'choices', --help shows the list of valid parameters: --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL} I started the help message with a lower case, "the level of log ..." in order to be consistent with the -h option: -h, --help show this help message and exit The message "show this help ..." comes from the ArgumentParser library code, and I do not know how to change it. So, I changed our code. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit 8a685db32f2b3495c91efab6e9462c2fd934778f Author: Masahiro Yamada Date: Sat Aug 22 23:56:09 2020 +0900 gen_compile_commands: parse only the first line of .*.cmd files After the allmodconfig build, this script takes about 5 sec on my machine. Most of the run-time is consumed for needless regex matching. We know the format of .*.cmd file; the first line is the build command. There is no need to parse the rest. With this optimization, now it runs 4 times faster. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers commit 23cd88c91343349a0d67a227f9effdde0cbe09af Author: Masahiro Yamada Date: Fri Aug 21 11:43:58 2020 +0900 kbuild: hide commands to run Kconfig, and show short log for syncconfig Some targets (localyesconfig, localmodconfig, defconfig) hide the command running, but the others do not. Users know which Kconfig flavor they are running, so it is OK to hide the command. Add $(Q) to all commands consistently. If you want to see the full command running, pass V=1 from the command line. syncconfig is the exceptional case, which occurs without explicit command invocation by the user. Display the Kbuild-style log for it. The ugly bare log will go away. [Before] scripts/kconfig/conf --syncconfig Kconfig [After] SYNC include/config/auto.conf Signed-off-by: Masahiro Yamada commit 695afd3d7d58ec3044d25c9d2fe384ab8627fd20 Author: Sedat Dilek Date: Sun Aug 16 14:32:44 2020 +0200 kbuild: Simplify DEBUG_INFO Kconfig handling While playing with [1] I saw that the handling of CONFIG_DEBUG_INFO can be simplified. [1] https://patchwork.kernel.org/patch/11716107/ Signed-off-by: Sedat Dilek Signed-off-by: Masahiro Yamada commit e03e3601fb9fc2aa5dc8b483944006c01ffa6aa5 Author: Krzysztof Kozlowski Date: Wed Aug 26 16:48:58 2020 +0200 power: supply: lego_ev3: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Reviewed-by: David Lechner Signed-off-by: Sebastian Reichel commit 31873dc23c3fa19b86fb543935f284ebbddf486e Author: Krzysztof Kozlowski Date: Wed Aug 26 16:48:57 2020 +0200 power: supply: ingenic: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 52a023a14ea90da4356395f175cf055d6ad8afee Author: Krzysztof Kozlowski Date: Wed Aug 26 16:48:56 2020 +0200 power: supply: gpio-charger: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit ec744270c92785772b111ba21a6bb23a8cc2cb4d Author: Krzysztof Kozlowski Date: Wed Aug 26 16:48:55 2020 +0200 power: supply: cpcap: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 4024810c5aad6b63a7e4de26850ea0c8ea870850 Author: Krzysztof Kozlowski Date: Wed Aug 26 16:48:54 2020 +0200 power: supply: bq27xxx: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 5ca937fb5d6870735341d8fdacdd2b49618c35dc Author: Subbaraman Narayanamurthy Date: Thu Aug 13 11:34:08 2020 -0700 power: supply: add wireless type Currently, power_supply framework supports only Battery, UPS, Mains and USB power_supply_type. Add wireless power_supply_type so that the drivers which supports wireless can register a power supply class device with POWER_SUPPLY_TYPE_WIRELESS. Signed-off-by: Subbaraman Narayanamurthy Signed-off-by: Guru Das Srinagesh Signed-off-by: Sebastian Reichel commit 2ca6a1dd83e15d4aa99fbcc0046a33249f5239d4 Author: Tamizh Chelvam Date: Wed Aug 19 20:55:38 2020 +0300 ath10k: Add new api to support reset TID config Add ops for reset_tid_config to support reset TID configuration. This send default configuration to the target for the TIDs and stores default value in the host. Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021 Signed-off-by: Tamizh Chelvam Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1593875614-5683-5-git-send-email-tamizhr@codeaurora.org commit 7b2531d93bac6bea67e9c7f49901e9e8796d6d57 Author: Tamizh Chelvam Date: Wed Aug 19 20:55:38 2020 +0300 ath10k: Add new api to support TID specific configuration This patch add ops for set_tid_config to support TID specific configuration. Station specific TID configuration will have more priority than vif specific TID configuration. WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT service flag introduced to notify host for TID config support. And RTS_CTS extended tid configuration support advertised through the service flag WMI_10_4_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT. TID specific noack configuration requires aggregation should be disabled and rate for the data TID packets should be basic rates. So, if the TID already configured with noack policy then driver will ignore the aggregation or TX rate related configuration for the same data TID. In TX rate configuration should be applied with highest preamble configuration(HT rates should not be applied for the station which supports vht rates). Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021 Signed-off-by: Tamizh Chelvam Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1593875614-5683-4-git-send-email-tamizhr@codeaurora.org commit 1c0b3fbd6eb4fef0bc5e8a0b48e32075fd79fa8c Author: Tamizh Chelvam Date: Wed Aug 19 20:55:38 2020 +0300 ath10k: Move rate mask validation function up in the file This patch does not have any functional changes. Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021 Signed-off-by: Tamizh Chelvam Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1593875614-5683-3-git-send-email-tamizhr@codeaurora.org commit 5d582be0bc66dc055760b41eb68c156223032cc5 Author: Tamizh Chelvam Date: Wed Aug 19 20:55:37 2020 +0300 ath10k: Add wmi command support for station specific TID config This patch adds WMI interface to configure station specific TID configuration . Host needs to send station's MAC address along with TID number and its configuration to target through WMI_10_4_PER_PEER_PER_TID_CONFIG_CMDID. WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT flag is added to advertise this support. Tested-on: QCA9984 hw1.0 PCI 10.4-3.9.0.2-00021 Signed-off-by: Tamizh Chelvam Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1593875614-5683-2-git-send-email-tamizhr@codeaurora.org commit 92345d1b47c2da02fadef2162a90fbc8dd8f9204 Author: Tomasz Figa Date: Thu Aug 20 14:58:25 2020 +0200 media: MAINTAINERS: Remove Pawel from the maintainers list of videobuf2 According to [1], there has been no email related to videobuf2 posted from him to the linux-media mailing list since Apr 2015. Note: The linked archive seems to lack messages newer than the middle of 2019, but it is the only archive that offers search by name. A manual look through the messages after that time confirms the observation. [1] https://www.mail-archive.com/search?a=1&l=linux-media%40vger.kernel.org&haswords=&x=0&y=0&from=Pawel+Osciak&subject=&datewithin=1d&date=¬words=&o=newest Signed-off-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bde41ec62850138dde99576a059d3868d387d62d Author: Tomasz Figa Date: Thu Aug 20 14:58:24 2020 +0200 media: MAINTAINERS: Remove Kyungmin from the maintainers list of videobuf2 According to [1], there has been no email posted from him to the linux-media mailing list since Feb 2013. Note: The linked archive seems to lack messages newer than the middle of 2019, but it is the only archive that offers search by name. A manual look through the messages after that time confirms the observation. [1] https://www.mail-archive.com/search?a=1&l=linux-media%40vger.kernel.org&haswords=&x=7&y=20&from=Kyungmin+Park&subject=&datewithin=1d&date=¬words=&o=newest Signed-off-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 258c618b6992859d561f81ce2eb2d8459541675d Author: Tomasz Figa Date: Thu Aug 20 14:58:23 2020 +0200 media: MAINTAINERS: Make Tomasz the main maintainer of videobuf2 Tomasz is the most active member from the people listed currently in the MAINTAINERS file, but is currently listed as a reviewer. Change the entry into a maintainer and move to the top of the list. Signed-off-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b305dfe2e93434b12d438434461b709641f62af4 Author: Hans Verkuil Date: Thu Aug 20 12:47:16 2020 +0200 media: videodev2.h: RGB BT2020 and HSV are always full range The default RGB quantization range for BT.2020 is full range (just as for all the other RGB pixel encodings), not limited range. Update the V4L2_MAP_QUANTIZATION_DEFAULT macro and documentation accordingly. Also mention that HSV is always full range and cannot be limited range. When RGB BT2020 was introduced in V4L2 it was not clear whether it should be limited or full range, but full range is the right (and consistent) choice. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1c5a9be98ea937f9d34dd2236f5d87c51c226cb5 Author: Hans Verkuil Date: Tue Aug 18 15:19:20 2020 +0200 media: dev-sliced-vbi.rst: fix wrong type The documentation reported service_set as a __u32, but according to videodev2.h it is a __u16. Correct the documentation. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 24da79902efc4a8443fae09e6c8e25b515bd8db2 Author: Eric Dumazet Date: Wed Aug 26 06:50:16 2020 -0700 inet: remove inet_sk_copy_descendant() This is no longer used, SCTP now uses a private helper. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit d83971761fa278dcffa855110f024bf043ce6e6e Author: Jiri Olsa Date: Wed Aug 26 12:18:45 2020 +0200 selftests/bpf: Fix open call in trigger_fstat_events Alexei reported compile breakage on newer systems with following error: In file included from /usr/include/fcntl.h:290:0, 4814 from ./test_progs.h:29, 4815 from .../bpf-next/tools/testing/selftests/bpf/prog_tests/d_path.c:3: 4816In function ‘open’, 4817 inlined from ‘trigger_fstat_events’ at .../bpf-next/tools/testing/selftests/bpf/prog_tests/d_path.c:50:10, 4818 inlined from ‘test_d_path’ at .../bpf-next/tools/testing/selftests/bpf/prog_tests/d_path.c:119:6: 4819/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments 4820 __open_missing_mode (); 4821 ^~~~~~~~~~~~~~~~~~~~~~ We're missing permission bits as 3rd argument for open call with O_CREAT flag specified. Fixes: e4d1af4b16f8 ("selftests/bpf: Add test for d_path helper") Reported-by: Alexei Starovoitov Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200826101845.747617-1-jolsa@kernel.org commit 0256b0aa8019d937a0bdce3584c6b8b47f618202 Author: Dan Carpenter Date: Wed Aug 26 10:14:19 2020 -0400 selinux: fix error handling bugs in security_load_policy() There are a few bugs in the error handling for security_load_policy(). 1) If the newpolicy->sidtab allocation fails then it leads to a NULL dereference. Also the error code was not set to -ENOMEM on that path. 2) If policydb_read() failed then we call policydb_destroy() twice which meands we call kvfree(p->sym_val_to_name[i]) twice. 3) If policydb_load_isids() failed then we call sidtab_destroy() twice and that results in a double free in the sidtab_destroy_tree() function because entry.ptr_inner and entry.ptr_leaf are not set to NULL. One thing that makes this code nice to deal with is that none of the functions return partially allocated data. In other words, the policydb_read() either allocates everything successfully or it frees all the data it allocates. It never returns a mix of allocated and not allocated data. I re-wrote this to only free the successfully allocated data which avoids the double frees. I also re-ordered selinux_policy_free() so it's in the reverse order of the allocation function. Fixes: c7c556f1e81b ("selinux: refactor changing booleans") Acked-by: Stephen Smalley Signed-off-by: Dan Carpenter [PM: partially merged by hand due to merge fuzz] Signed-off-by: Paul Moore commit ea416e277f09c4285f60a7ea741ca62719191a90 Author: Xu Wang Date: Wed Aug 26 03:12:51 2020 +0000 ptp: ptp_ines: Remove redundant null check Because kfree_skb already checked NULL skb parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang Signed-off-by: David S. Miller commit c07203516439b9cd9f7b3cbed82a77164de5af40 Author: Xu Wang Date: Wed Aug 26 04:00:22 2020 +0000 audit: Remove redundant null check Because kfree_skb already checked NULL skb parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang Signed-off-by: Paul Moore commit a2bee00cccf4f2a80412d38328b92f448fd66935 Author: Cezary Rojewski Date: Tue Aug 25 22:17:43 2020 +0200 spi: pxa2xx: Add SSC2 and SSPSP2 SSP registers Update list of SSP registers with SSC2 and SSPSP2. These registers are utilized by LPT/WPT AudioDSP architecture. While SSC2 shares the same offset (0x40) as SSACDD, description of this register for SSP device present on mentioned AudioDSP is different so define separate constant to avoid any ambiguity. Cc: Andy Shevchenko Signed-off-by: Cezary Rojewski Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200825201743.4926-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 99298de5df92699b1f709dc35c8636d15be21e2e Author: Dmitry Osipenko Date: Fri Aug 14 00:34:07 2020 +0300 power: supply: smb347-charger: Replace mutex with IRQ disable/enable Let's simply disable/enable IRQ rather than use a mutex that protects from racing with the interrupt handler. The result of this patch is that it's a bit easier now to follow the driver's code. Tested-by: David Heidelberg Signed-off-by: Dmitry Osipenko Signed-off-by: Sebastian Reichel commit 9b1d3422e16ffcd4dad7729459717b216490540d Author: Gene Chen Date: Wed Aug 26 18:49:18 2020 +0800 dt-bindings: regulator: mt6360: Add DT binding documentation Add a devicetree binding documentation for the mt6360 regulator driver. Signed-off-by: Gene Chen Link: https://lore.kernel.org/r/1598438958-26802-3-git-send-email-gene.chen.richtek@gmail.com Signed-off-by: Mark Brown commit d321571d5e4c2d5511b75e6cf1a910e0a0c2a2e9 Author: Gene Chen Date: Wed Aug 26 18:49:17 2020 +0800 regulator: mt6360: Add support for MT6360 regulator Add MT6360 regulator driver that contains two BUCKs and six LDOs Signed-off-by: Gene Chen Link: https://lore.kernel.org/r/1598438958-26802-2-git-send-email-gene.chen.richtek@gmail.com Signed-off-by: Mark Brown commit db14d3b45b4da39a02746237d6006fddc3bf241b Author: David Heidelberg Date: Fri Aug 14 00:34:06 2020 +0300 power: supply: smb347-charger: Remove virtual smb347-battery SMB347 is a charger and not a battery driver. Secondly, power-supply core now supports monitored-battery. So the 'fake' battery doesn't do anything useful for us, and thus, it should be removed. Transfer smb347-battery functionality into smb347-mains and smb347-usb. Reviewed-by: Dmitry Osipenko Signed-off-by: David Heidelberg Signed-off-by: Sebastian Reichel commit cd0f9228c778316c4169d1e03413a2ea4b62e46f Merge: e17b7389dcc42 5a1fa00ad74bd Author: Mark Brown Date: Wed Aug 26 13:19:18 2020 +0100 Merge series "SOF fixes and updates" from Ranjani Sridharan : This series includes fixes for error reporting, topology parsing and runtime PM issues along with updates for DMIC support and IMX platforms. Iulian Olaru (2): ASoC: SOF: imx: Replace sdev->private with sdev->pdata->hw_pdata ASoC: SOF: sof-of-dev: Add .arch_ops field Jaska Uimonen (1): ASoC: SOF: intel: hda: support also devices with 1 and 3 dmics Keyon Jie (1): ASoC: SOF: topology: fix the ipc_size calculation for process component Rander Wang (1): ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work Ranjani Sridharan (2): ASoC: SOF: Intel: hda: report error only for the last ROM init iteration ASoC: SOF: Intel: hda: add extended rom status dump to error log sound/soc/sof/imx/Kconfig | 2 ++ sound/soc/sof/imx/imx8.c | 17 +++++++++---- sound/soc/sof/imx/imx8m.c | 10 +++++--- sound/soc/sof/intel/hda-codec.c | 4 +-- sound/soc/sof/intel/hda-loader.c | 42 +++++++++++++++++++------------- sound/soc/sof/intel/hda.c | 26 +++++++++++++++++++- sound/soc/sof/topology.c | 4 +-- 7 files changed, 74 insertions(+), 31 deletions(-) -- 2.25.1 commit 5a1fa00ad74bd5e77feab84a6d64c06f267df415 Author: Iulian Olaru Date: Tue Aug 25 16:50:40 2020 -0700 ASoC: SOF: sof-of-dev: Add .arch_ops field Add .arch_ops field in the sof_imx8x_ops structure. The inclusion of this field will allow the usage of functions from sof/core.c in order to print debug information such as the registers and a stack dump in case of a firmware ops. The SND_SOC_SOF_XTENSA is added in the imx/Kconfig file so the compilation is successful. Signed-off-by: Iulian Olaru Reviewed-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200825235040.1586478-8-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 17b3f99a360d76fed46e7ec1e12d6670bd7ca884 Author: Iulian Olaru Date: Tue Aug 25 16:50:39 2020 -0700 ASoC: SOF: imx: Replace sdev->private with sdev->pdata->hw_pdata The correct way to save private data is to use sdev->pdata->hw_pdata. Removed superfluous type-casts. Signed-off-by: Iulian Olaru Reviewed-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200825235040.1586478-7-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 29c8e4398f02adacd429c7847dacc8aea5a0c2f1 Author: Ranjani Sridharan Date: Tue Aug 25 16:50:38 2020 -0700 ASoC: SOF: Intel: hda: add extended rom status dump to error log Dump the extended ROM status information to the error logs to aid with remote support. The analysis of these logs requires access to non-public technical information. Reviewed-by: Kai Vehmanen Reviewed-by: Jaska Uimonen Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200825235040.1586478-6-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 878694dcbe51794c7a68195b92a3707ed4ff5826 Author: Keyon Jie Date: Tue Aug 25 16:50:37 2020 -0700 ASoC: SOF: topology: fix the ipc_size calculation for process component The topology private struct is used for token parsing and its size should not be included to the ipc_size, fix it here though it didn't cause any real issue as the Firmware won't use this wrong-added data. Signed-off-by: Keyon Jie Reviewed-by: Guennadi Liakhovetski Reviewed-by: Jaska Uimonen Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200825235040.1586478-5-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 3dca35e35b42b3405ddad7ee95c02a2d8cf28592 Author: Jaska Uimonen Date: Tue Aug 25 16:50:36 2020 -0700 ASoC: SOF: intel: hda: support also devices with 1 and 3 dmics Currently the dmic check code supports only devices with 2 or 4 dmics. With other dmic counts the function will return 0. Lately we've seen devices with only 1 dmic thus enable also configurations with 1, and possibly 3, dmics. Add also topology postfix -1ch and -3ch for new dmic configuration. Signed-off-by: Jaska Uimonen Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200825235040.1586478-4-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 6c63c954e1c52f1262f986f36d95f557c6f8fa94 Author: Rander Wang Date: Tue Aug 25 16:50:35 2020 -0700 ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work When hda_codec_probe() doesn't initialize audio component, we disable the codec and keep going. However,the resources are not released. The child_count of SOF device is increased in snd_hdac_ext_bus_device_init but is not decrease in error case, so SOF can't get suspended. snd_hdac_ext_bus_device_exit will be invoked in HDA framework if it gets a error. Now copy this behavior to release resources and decrease SOF device child_count to release SOF device. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200825235040.1586478-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 53ec753137f2a407c949cef3158e89ece7688637 Author: Ranjani Sridharan Date: Tue Aug 25 16:50:34 2020 -0700 ASoC: SOF: Intel: hda: report error only for the last ROM init iteration The FW boot sequence includes multiple attempts for ROM init. When it does take more than one attempt, we should not log the errors encountered during the failed attempts and only log them during the final iteration. Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200825235040.1586478-2-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit e17b7389dcc4239b806cd8789a812ee1b8b7b134 Author: Iulian Olaru Date: Tue Aug 25 16:58:54 2020 -0700 ASoC: SOF: loader: Add debug box region This patch adds an IPC initiated debug box region in the snd_sof_dev structure, defined in soc/sof/sof-priv.h. It is initialized at loading, in the sof_get_windows function from soc/sof/loader.c, in a similar manner with the stream box and host box. This region is useful because the firmware will put an error message here so the kernel can read it in case of a dsp oops. Signed-off-by: Iulian Olaru Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200825235854.1588034-5-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 60b7c1ba289b8ebe4f275b0b381f711e5b60184b Author: Karol Trzcinski Date: Tue Aug 25 16:58:53 2020 -0700 ASoC: SOF: ext_manifest: Parse debug ABI version The debug ABI can be extracted from the extended manifest content. This information known at build time does not need to be provided in a mailbox. Signed-off-by: Karol Trzcinski Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200825235854.1588034-4-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit e9157a449aa3f72fdbded9ce780c666bf0951cf3 Author: Pierre-Louis Bossart Date: Tue Aug 25 16:58:52 2020 -0700 ASoC: SOF: loader: fix memory leak in get_ext_windows sdev->info_window is allocated with kmemdup and never freed, use devm_ version since this is only used for first boot. Fixes: 8d809c15acf23 ('ASoC: SOF: ext_manifest: parse windows') Cc: Karol Trzcinski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Kai Vehmanen Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200825235854.1588034-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 76ab546cd8f0c64d4603b2faad4558c5b670561e Author: Karol Trzcinski Date: Tue Aug 25 16:58:51 2020 -0700 ASoC: SOF: IPC: make sof_ipc_window monosized This step is needed to add possibility to pack sof_ipc_window inside another one in used FW build tools - for example in extended manifest. Structure reusability leads to easy parsing function reuse, so source code is shorter and easier to maintain. Using structures with constant size is less tricky and properly supported by each toolchain by contrast to variable size elements. This is minor ABI change - backward compatibility is kept. Signed-off-by: Karol Trzcinski Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200825235854.1588034-2-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 5661bccb70ef134502b9d2e80a19465ad943b022 Author: Finn Thain Date: Thu Jul 23 09:25:51 2020 +1000 m68k: Correct some typos in comments Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/f54e99e9bd1e25ad70a6a1d7a7ec9ab2b4e50d68.1595460351.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit c75e59e401b66971d166780c9fad5f741db2c54e Author: Christoph Hellwig Date: Mon Jul 20 13:43:14 2020 +0200 m68k: Use get_kernel_nofault() in show_registers() Use the proper get_kernel_nofault() helper to access an unsafe kernel pointer without faulting instead of playing with set_fs() and get_user(). Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20200720114314.196686-1-hch@lst.de Signed-off-by: Geert Uytterhoeven commit ea2abe2fd59a73b26c01e9a3bb83efc46e44face Author: Geert Uytterhoeven Date: Mon Jul 13 09:24:29 2020 +0200 zorro: Fix address space collision message with RAM expansion boards When booting Linux on an Amiga with BigRAMPlus Zorro expansion board: zorro: Address space collision on device Zorro device 12128600 (Individual Computers) [??? 0x50000000-] This happens because the address space occupied by the BigRAMPlus Zorro device is already in use, as it is part of system RAM. Hence the message is harmless. Zorro memory expansion boards have the ERTF_MEMLIST flag set, which tells AmigaOS to link the board's RAM into the free memory list. While we could skip registering the board resource if this flag is set, that may cause issues with Zorro II RAM excluded in a memfile. Hence fix the issue by just ignoring the error if ERTF_MEMLIST is set. Reported-by: John Paul Adrian Glaubitz Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200713072429.6182-1-geert@linux-m68k.org commit 3b0950af21e02a8c902ce1143ac5563fadcdfb3e Author: Geert Uytterhoeven Date: Sun Jan 12 18:17:05 2020 +0100 m68k: amiga: Fix Denise detection on OCS The "default" statement for detecting an original Denise chip seems to be misplaced, causing original Denise chips not being detected. Fix this by moving it from the outer to the inner "switch" statement. Fortunately no code relies on this, but the detected version is printed during boot, and available through /proc/hardware. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200112171705.22600-1-geert@linux-m68k.org commit 4fcee7be650c7f7c0581034b9cc4336190226abf Author: Anshuman Gupta Date: Wed Aug 5 17:15:21 2020 +0530 drm/i915/hdcp: No direct access to power_well desc HDCP code doesn't require to access power_well internal stuff, instead it should use the intel_display_power_well_is_enabled() to get the status of desired power_well. No functional change. v2: - used with_intel_runtime_pm instead of get/put. [Jani] v3: - rebased. Cc: Jani Nikula Signed-off-by: Anshuman Gupta Reviewed-by: Ramalingam C Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200805114521.867-3-anshuman.gupta@intel.com commit dbda95809457875ded5d596acf929fc9de4d36c2 Author: Anshuman Gupta Date: Wed Aug 5 17:15:20 2020 +0530 drm/i915/hdcp: Add update_pipe early return Currently intel_hdcp_update_pipe() is also getting called for non-hdcp connectors and get through its conditional code flow, which is completely unnecessary for non-hdcp connectors, therefore it make sense to have an early return. No functional change. v2: - rebased. Reviewed-by: Uma Shankar Signed-off-by: Anshuman Gupta Reviewed-by: Ramalingam C Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200805114521.867-2-anshuman.gupta@intel.com commit 96a16f45aed89cf024606a11679b0609d09552c7 Author: Boqun Feng Date: Fri Aug 7 15:42:38 2020 +0800 lockdep/selftest: Introduce recursion3 Add a test case shows that USED_IN_*_READ and ENABLE_*_READ can cause deadlock too. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-20-boqun.feng@gmail.com commit ad56450db86413ff911eb527b5a49e04a4345e61 Author: Boqun Feng Date: Fri Aug 7 15:42:37 2020 +0800 locking/selftest: Add test cases for queued_read_lock() Add two self test cases for the following case: P0: P1: P2: spin_lock_irq(&slock) read_lock(&rwlock) write_lock_irq(&rwlock) read_lock(&rwlock) spin_lock(&slock) , which is a deadlock, as the read_lock() on P0 cannot get the lock because of the fairness. P0: P1: P2: spin_lock(&slock) read_lock(&rwlock) write_lock(&rwlock) read_lock(&rwlock) spin_lock_irq(&slock) , which is not a deadlock, as the read_lock() on P0 can get the lock because it could use the unfair fastpass. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-19-boqun.feng@gmail.com commit 108dc42ed3507fe06214d51ab15fca7771df8bbd Author: Boqun Feng Date: Fri Aug 7 15:42:36 2020 +0800 Revert "locking/lockdep/selftests: Fix mixed read-write ABBA tests" This reverts commit d82fed75294229abc9d757f08a4817febae6c4f4. Since we now could handle mixed read-write deadlock detection well, the self tests could be detected as expected, no need to use this work-around. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-18-boqun.feng@gmail.com commit 8ef7ca75120a39167def40f41daefee013c4b5af Author: Boqun Feng Date: Fri Aug 7 15:42:35 2020 +0800 lockdep/selftest: Add more recursive read related test cases Add those four test cases: 1. X --(ER)--> Y --(ER)--> Z --(ER)--> X is deadlock. 2. X --(EN)--> Y --(SR)--> Z --(ER)--> X is deadlock. 3. X --(EN)--> Y --(SR)--> Z --(SN)--> X is not deadlock. 4. X --(ER)--> Y --(SR)--> Z --(EN)--> X is not deadlock. Those self testcases are valuable for the development of supporting recursive read related deadlock detection. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-17-boqun.feng@gmail.com commit 31e0d747708272356bee9b6a1b90c1e6525b0f6d Author: Boqun Feng Date: Fri Aug 7 15:42:34 2020 +0800 lockdep/selftest: Unleash irq_read_recursion2 and add more Now since we can handle recursive read related irq inversion deadlocks correctly, uncomment the irq_read_recursion2 and add more testcases. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-16-boqun.feng@gmail.com commit f611e8cf98ec908b9c2c0da6064a660fc6022487 Author: Boqun Feng Date: Fri Aug 7 15:42:33 2020 +0800 lockdep: Take read/write status in consideration when generate chainkey Currently, the chainkey of a lock chain is a hash sum of the class_idx of all the held locks, the read/write status are not taken in to consideration while generating the chainkey. This could result into a problem, if we have: P1() { read_lock(B); lock(A); } P2() { lock(A); read_lock(B); } P3() { lock(A); write_lock(B); } , and P1(), P2(), P3() run one by one. And when running P2(), lockdep detects such a lock chain A -> B is not a deadlock, then it's added in the chain cache, and then when running P3(), even if it's a deadlock, we could miss it because of the hit of chain cache. This could be confirmed by self testcase "chain cached mixed R-L/L-W ". To resolve this, we use concept "hlock_id" to generate the chainkey, the hlock_id is a tuple (hlock->class_idx, hlock->read), which fits in a u16 type. With this, the chainkeys are different is the lock sequences have the same locks but different read/write status. Besides, since we use "hlock_id" to generate chainkeys, the chain_hlocks array now store the "hlock_id"s rather than lock_class indexes. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-15-boqun.feng@gmail.com commit d4f200e579e96051f1f081f795820787826eb234 Author: Boqun Feng Date: Fri Aug 7 15:42:32 2020 +0800 lockdep/selftest: Add a R-L/L-W test case specific to chain cache behavior As our chain cache doesn't differ read/write locks, so even we can detect a read-lock/lock-write deadlock in check_noncircular(), we can still be fooled if a read-lock/lock-read case(which is not a deadlock) comes first. So introduce this test case to test specific to the chain cache behavior on detecting recursive read lock related deadlocks. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-14-boqun.feng@gmail.com commit 621c9dac0eea7607cb9a57cc9ba47fbcd4e644c9 Author: Boqun Feng Date: Fri Aug 7 15:42:31 2020 +0800 lockdep: Add recursive read locks into dependency graph Since we have all the fundamental to handle recursive read locks, we now add them into the dependency graph. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-13-boqun.feng@gmail.com commit f08e3888574d490b31481eef6d84c61bedba7a47 Author: Boqun Feng Date: Fri Aug 7 15:42:30 2020 +0800 lockdep: Fix recursive read lock related safe->unsafe detection Currently, in safe->unsafe detection, lockdep misses the fact that a LOCK_ENABLED_IRQ_*_READ usage and a LOCK_USED_IN_IRQ_*_READ usage may cause deadlock too, for example: P1 P2 write_lock(l1); read_lock(l2); write_lock(l2); read_lock(l1); Actually, all of the following cases may cause deadlocks: LOCK_USED_IN_IRQ_* -> LOCK_ENABLED_IRQ_* LOCK_USED_IN_IRQ_*_READ -> LOCK_ENABLED_IRQ_* LOCK_USED_IN_IRQ_* -> LOCK_ENABLED_IRQ_*_READ LOCK_USED_IN_IRQ_*_READ -> LOCK_ENABLED_IRQ_*_READ To fix this, we need to 1) change the calculation of exclusive_mask() so that READ bits are not dropped and 2) always call usage() in mark_lock_irq() to check usage deadlocks, even when the new usage of the lock is READ. Besides, adjust usage_match() and usage_acculumate() to recursive read lock changes. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-12-boqun.feng@gmail.com commit 68e305678583f13a67e2ce22088c2520bd4f97b4 Author: Boqun Feng Date: Fri Aug 7 15:42:29 2020 +0800 lockdep: Adjust check_redundant() for recursive read change check_redundant() will report redundancy if it finds a path could replace the about-to-add dependency in the BFS search. With recursive read lock changes, we certainly need to change the match function for the check_redundant(), because the path needs to match not only the lock class but also the dependency kinds. For example, if the about-to-add dependency @prev -> @next is A -(SN)-> B, and we find a path A -(S*)-> .. -(*R)->B in the dependency graph with __bfs() (for simplicity, we can also say we find an -(SR)-> path from A to B), we can not replace the dependency with that path in the BFS search. Because the -(SN)-> dependency can make a strong path with a following -(S*)-> dependency, however an -(SR)-> path cannot. Further, we can replace an -(SN)-> dependency with a -(EN)-> path, that means if we find a path which is stronger than or equal to the about-to-add dependency, we can report the redundancy. By "stronger", it means both the start and the end of the path are not weaker than the start and the end of the dependency (E is "stronger" than S and N is "stronger" than R), so that we can replace the dependency with that path. To make sure we find a path whose start point is not weaker than the about-to-add dependency, we use a trick: the ->only_xr of the root (start point) of __bfs() is initialized as @prev-> == 0, therefore if @prev is E, __bfs() will pick only -(E*)-> for the first dependency, otherwise, __bfs() can pick -(E*)-> or -(S*)-> for the first dependency. To make sure we find a path whose end point is not weaker than the about-to-add dependency, we replace the match function for __bfs() check_redundant(), we check for the case that either @next is R (anything is not weaker than it) or the end point of the path is N (which is not weaker than anything). Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-11-boqun.feng@gmail.com commit 9de0c9bbcedf752e762c67f105bff342e30f9105 Author: Boqun Feng Date: Fri Aug 7 15:42:28 2020 +0800 lockdep: Support deadlock detection for recursive read locks in check_noncircular() Currently, lockdep only has limit support for deadlock detection for recursive read locks. This patch support deadlock detection for recursive read locks. The basic idea is: We are about to add dependency B -> A in to the dependency graph, we use check_noncircular() to find whether we have a strong dependency path A -> .. -> B so that we have a strong dependency circle (a closed strong dependency path): A -> .. -> B -> A , which doesn't have two adjacent dependencies as -(*R)-> L -(S*)->. Since A -> .. -> B is already a strong dependency path, so if either B -> A is -(E*)-> or A -> .. -> B is -(*N)->, the circle A -> .. -> B -> A is strong, otherwise not. So we introduce a new match function hlock_conflict() to replace the class_equal() for the deadlock check in check_noncircular(). Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-10-boqun.feng@gmail.com commit 61775ed243433ff0556c4f76905929fe01e92922 Author: Boqun Feng Date: Fri Aug 7 15:42:27 2020 +0800 lockdep: Make __bfs(.match) return bool The "match" parameter of __bfs() is used for checking whether we hit a match in the search, therefore it should return a boolean value rather than an integer for better readability. This patch then changes the return type of the function parameter and the match functions to bool. Suggested-by: Peter Zijlstra Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-9-boqun.feng@gmail.com commit 6971c0f345620aae5e6172207a57b7524603a34e Author: Boqun Feng Date: Fri Aug 7 15:42:26 2020 +0800 lockdep: Extend __bfs() to work with multiple types of dependencies Now we have four types of dependencies in the dependency graph, and not all the pathes carry real dependencies (the dependencies that may cause a deadlock), for example: Given lock A and B, if we have: CPU1 CPU2 ============= ============== write_lock(A); read_lock(B); read_lock(B); write_lock(A); (assuming read_lock(B) is a recursive reader) then we have dependencies A -(ER)-> B, and B -(SN)-> A, and a dependency path A -(ER)-> B -(SN)-> A. In lockdep w/o recursive locks, a dependency path from A to A means a deadlock. However, the above case is obviously not a deadlock, because no one holds B exclusively, therefore no one waits for the other to release B, so who get A first in CPU1 and CPU2 will run non-blockingly. As a result, dependency path A -(ER)-> B -(SN)-> A is not a real/strong dependency that could cause a deadlock. From the observation above, we know that for a dependency path to be real/strong, no two adjacent dependencies can be as -(*R)-> -(S*)->. Now our mission is to make __bfs() traverse only the strong dependency paths, which is simple: we record whether we only have -(*R)-> for the previous lock_list of the path in lock_list::only_xr, and when we pick a dependency in the traverse, we 1) filter out -(S*)-> dependency if the previous lock_list only has -(*R)-> dependency (i.e. ->only_xr is true) and 2) set the next lock_list::only_xr to true if we only have -(*R)-> left after we filter out dependencies based on 1), otherwise, set it to false. With this extension for __bfs(), we now need to initialize the root of __bfs() properly (with a correct ->only_xr), to do so, we introduce some helper functions, which also cleans up a little bit for the __bfs() root initialization code. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-8-boqun.feng@gmail.com commit 3454a36d6a39186de508dd43df590a6363364176 Author: Boqun Feng Date: Fri Aug 7 15:42:25 2020 +0800 lockdep: Introduce lock_list::dep To add recursive read locks into the dependency graph, we need to store the types of dependencies for the BFS later. There are four types of dependencies: * Exclusive -> Non-recursive dependencies: EN e.g. write_lock(prev) held and try to acquire write_lock(next) or non-recursive read_lock(next), which can be represented as "prev -(EN)-> next" * Shared -> Non-recursive dependencies: SN e.g. read_lock(prev) held and try to acquire write_lock(next) or non-recursive read_lock(next), which can be represented as "prev -(SN)-> next" * Exclusive -> Recursive dependencies: ER e.g. write_lock(prev) held and try to acquire recursive read_lock(next), which can be represented as "prev -(ER)-> next" * Shared -> Recursive dependencies: SR e.g. read_lock(prev) held and try to acquire recursive read_lock(next), which can be represented as "prev -(SR)-> next" So we use 4 bits for the presence of each type in lock_list::dep. Helper functions and macros are also introduced to convert a pair of locks into lock_list::dep bit and maintain the addition of different types of dependencies. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-7-boqun.feng@gmail.com commit bd76eca10de2eb9998d5125b08e8997cbf5508d5 Author: Boqun Feng Date: Fri Aug 7 15:42:24 2020 +0800 lockdep: Reduce the size of lock_list::distance lock_list::distance is always not greater than MAX_LOCK_DEPTH (which is 48 right now), so a u16 will fit. This patch reduces the size of lock_list::distance to save space, so that we can introduce other fields to help detect recursive read lock deadlocks without increasing the size of lock_list structure. Suggested-by: Peter Zijlstra Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-6-boqun.feng@gmail.com commit d563bc6ead9e79be37067d58509a605b67378184 Author: Boqun Feng Date: Fri Aug 7 15:42:23 2020 +0800 lockdep: Make __bfs() visit every dependency until a match Currently, __bfs() will do a breadth-first search in the dependency graph and visit each lock class in the graph exactly once, so for example, in the following graph: A ---------> B | ^ | | +----------> C a __bfs() call starts at A, will visit B through dependency A -> B and visit C through dependency A -> C and that's it, IOW, __bfs() will not visit dependency C -> B. This is OK for now, as we only have strong dependencies in the dependency graph, so whenever there is a traverse path from A to B in __bfs(), it means A has strong dependencies to B (IOW, B depends on A strongly). So no need to visit all dependencies in the graph. However, as we are going to add recursive-read lock into the dependency graph, as a result, not all the paths mean strong dependencies, in the same example above, dependency A -> B may be a weak dependency and traverse A -> C -> B may be a strong dependency path. And with the old way of __bfs() (i.e. visiting every lock class exactly once), we will miss the strong dependency path, which will result into failing to find a deadlock. To cure this for the future, we need to find a way for __bfs() to visit each dependency, rather than each class, exactly once in the search until we find a match. The solution is simple: We used to mark lock_class::lockdep_dependency_gen_id to indicate a class has been visited in __bfs(), now we change the semantics a little bit: we now mark lock_class::lockdep_dependency_gen_id to indicate _all the dependencies_ in its lock_{after,before} have been visited in the __bfs() (note we only take one direction in a __bfs() search). In this way, every dependency is guaranteed to be visited until we find a match. Note: the checks in mark_lock_accessed() and lock_accessed() are removed, because after this modification, we may call these two functions on @source_entry of __bfs(), which may not be the entry in "list_entries" Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-5-boqun.feng@gmail.com commit b11be024de164213f6338973d76ab9ab139120cd Author: Boqun Feng Date: Fri Aug 7 15:42:22 2020 +0800 lockdep: Demagic the return value of BFS __bfs() could return four magic numbers: 1: search succeeds, but none match. 0: search succeeds, find one match. -1: search fails because of the cq is full. -2: search fails because a invalid node is found. This patch cleans things up by using a enum type for the return value of __bfs() and its friends, this improves the code readability of the code, and further, could help if we want to extend the BFS. Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-4-boqun.feng@gmail.com commit 224ec489d3cdb0af6794e257eeee39d98dc9c5b2 Author: Boqun Feng Date: Fri Aug 7 15:42:21 2020 +0800 lockdep/Documention: Recursive read lock detection reasoning This patch add the documentation piece for the reasoning of deadlock detection related to recursive read lock. The following sections are added: * Explain what is a recursive read lock, and what deadlock cases they could introduce. * Introduce the notations for different types of dependencies, and the definition of strong paths. * Proof for a closed strong path is both sufficient and necessary for deadlock detections with recursive read locks involved. The proof could also explain why we call the path "strong" Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-3-boqun.feng@gmail.com commit e918188611f073063415f40fae568fa4d86d9044 Author: Boqun Feng Date: Fri Aug 7 15:42:20 2020 +0800 locking: More accurate annotations for read_lock() On the archs using QUEUED_RWLOCKS, read_lock() is not always a recursive read lock, actually it's only recursive if in_interrupt() is true. So change the annotation accordingly to catch more deadlocks. Note we used to treat read_lock() as pure recursive read locks in lib/locking-seftest.c, and this is useful, especially for the lockdep development selftest, so we keep this via a variable to force switching lock annotation for read_lock(). Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200807074238.1632519-2-boqun.feng@gmail.com commit 92b4e9f11a636d1723cc0866bf8b9111b1e24339 Author: Marta Rybczynska Date: Sun Jul 26 20:54:40 2020 +0200 Documentation/locking/locktypes: Fix local_locks documentation Fix issues with local_locks documentation: - fix function names, local_lock.h has local_unlock_irqrestore(), not local_lock_irqrestore() - fix mapping table, local_unlock_irqrestore() maps to local_irq_restore(), not _save() Signed-off-by: Marta Rybczynska Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Link: https://lkml.kernel.org/r/CAApg2=SKxQ3Sqwj6TZnV-0x0cKLXFKDaPvXT4N15MPDMKq724g@mail.gmail.com commit a28e884b966e713da29caefbb347efea77367d22 Author: Randy Dunlap Date: Sun Aug 16 17:02:00 2020 -0700 seqlock: Fix multiple kernel-doc warnings Fix kernel-doc warnings in . ../include/linux/seqlock.h:152: warning: Incorrect use of kernel-doc format: * seqcount_LOCKNAME_init() - runtime initializer for seqcount_LOCKNAME_t ../include/linux/seqlock.h:164: warning: Incorrect use of kernel-doc format: * SEQCOUNT_LOCKTYPE() - Instantiate seqcount_LOCKNAME_t and helpers ../include/linux/seqlock.h:229: warning: Function parameter or member 'seq_name' not described in 'SEQCOUNT_LOCKTYPE_ZERO' ../include/linux/seqlock.h:229: warning: Function parameter or member 'assoc_lock' not described in 'SEQCOUNT_LOCKTYPE_ZERO' ../include/linux/seqlock.h:229: warning: Excess function parameter 'name' description in 'SEQCOUNT_LOCKTYPE_ZERO' ../include/linux/seqlock.h:229: warning: Excess function parameter 'lock' description in 'SEQCOUNT_LOCKTYPE_ZERO' ../include/linux/seqlock.h:695: warning: duplicate section name 'NOTE' Demote kernel-doc notation for the macros "seqcount_LOCKNAME_init()" and "SEQCOUNT_LOCKTYPE()"; scripts/kernel-doc does not handle them correctly. Rename function parameters in SEQCNT_LOCKNAME_ZERO() documentation to match the macro's argument names. Change the macro name in the documentation to SEQCOUNT_LOCKTYPE_ZERO() to match the macro's name. For raw_write_seqcount_latch(), rename the second NOTE: to NOTE2: to prevent a kernel-doc warning. However, the generated output is not quite as nice as it could be for this. Fix a typo: s/LOCKTYPR/LOCKTYPE/ Fixes: 0efc94c5d15c ("seqcount: Compress SEQCNT_LOCKNAME_ZERO()") Fixes: e4e9ab3f9f91 ("seqlock: Fold seqcount_LOCKNAME_init() definition") Fixes: a8772dccb2ec ("seqlock: Fold seqcount_LOCKNAME_t definition") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200817000200.20993-1-rdunlap@infradead.org commit a435b9a14356587cf512ea6473368a579373c74c Author: Peter Zijlstra Date: Wed Jul 29 13:00:57 2020 +0200 locking/refcount: Provide __refcount API to obtain the old value David requested means to obtain the old/previous value from the refcount API for tracing purposes. Duplicate (most of) the API as __refcount*() with an additional 'int *' argument into which, if !NULL, the old value will be stored. Requested-by: David Howells Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200729111120.GA2638@hirez.programming.kicks-ass.net commit 6eb6d05958f3208b3dd2b5311f1a6e68abdbe5d5 Author: Peter Zijlstra Date: Wed Jul 29 20:12:32 2020 +0200 seqlock,tags: Add support for SEQCOUNT_LOCKTYPE() Such that we might easily find seqcount_LOCKTYPE_t and seqcount_LOCKTYPE_init(). Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200729161938.GB2678@hirez.programming.kicks-ass.net commit 4fc472f1214ef75e5450f207e23ff13af6eecad4 Author: Valentin Schneider Date: Tue Aug 25 14:32:16 2020 +0100 sched/topology: Move SD_DEGENERATE_GROUPS_MASK out of linux/sched/topology.h SD_DEGENERATE_GROUPS_MASK is only useful for sched/topology.c, but still gets defined for anyone who imports topology.h, leading to a flurry of unused variable warnings. Move it out of the header and place it next to the SD degeneration functions in sched/topology.c. Fixes: 4ee4ea443a5d ("sched/topology: Introduce SD metaflag for flags needing > 1 groups") Reported-by: Andy Shevchenko Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200825133216.9163-2-valentin.schneider@arm.com commit 8fca9494d4b4d6b57b1398cd473feb308df656db Author: Valentin Schneider Date: Tue Aug 25 14:32:15 2020 +0100 sched/topology: Move sd_flag_debug out of linux/sched/topology.h Defining an array in a header imported all over the place clearly is a daft idea, that still didn't stop me from doing it. Leave a declaration of sd_flag_debug in topology.h and move its definition to sched/debug.c. Fixes: b6e862f38672 ("sched/topology: Define and assign sched_domain flag metadata") Reported-by: Andy Shevchenko Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200825133216.9163-1-valentin.schneider@arm.com commit c1cecf884ad748f63f9139d5a18ee265ee2f70fb Author: Sebastian Andrzej Siewior Date: Wed Aug 19 22:00:25 2020 +0200 sched: Cache task_struct::flags in sched_submit_work() sched_submit_work() is considered to be a hot path. The preempt_disable() instruction is a compiler barrier and forces the compiler to load task_struct::flags for the second comparison. By using a local variable, the compiler can load the value once and keep it in a register for the second comparison. Verified on x86-64 with gcc-10. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200819200025.lqvmyefqnbok5i4f@linutronix.de commit 01ccf592362a984534371b3596d4c953da6a7bb2 Author: Sebastian Andrzej Siewior Date: Wed Aug 19 21:55:05 2020 +0200 sched: Bring the PF_IO_WORKER and PF_WQ_WORKER bits closer together The bits PF_IO_WORKER and PF_WQ_WORKER are tested together in sched_submit_work() which is considered to be a hot path. If the two bits cross the 8 or 16 bit boundary then most architecture require multiple load instructions in order to create the constant value. Also, such a value can not be encoded within the compare opcode. By moving the bit definition within the same block, the compiler can create/use one immediate value. For some reason gcc-10 on ARM64 requires both bits to be next to each other in order to issue "tst reg, val; bne label". Otherwise the result is "mov reg1, val; tst reg, reg1; bne label". Move PF_VCPU out of the way so that PF_IO_WORKER can be next to PF_WQ_WORKER. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200819195505.y3fxk72sotnrkczi@linutronix.de commit 1724b95b92979a8ea8e55a4817d05b3bb7750958 Author: Jiang Biao Date: Tue Aug 11 19:32:09 2020 +0800 sched/fair: Simplify the work when reweighting entity The code in reweight_entity() can be simplified. For a sched entity on the rq, the entity accounting can be replaced by cfs_rq instantaneous load updates currently called from within the entity accounting. Even though an entity on the rq can't represent a task in reweight_entity() (a task is always dequeued before calling this function) and so the numa task accounting and the rq->cfs_tasks list management of the entity accounting are never called, the redundant cfs_rq->nr_running decrement/increment will be avoided. Signed-off-by: Jiang Biao Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20200811113209.34057-1-benbjiang@tencent.com commit da0777d35f47892f359c3f73ea155870bb595700 Author: Lukasz Luba Date: Mon Aug 10 09:30:04 2020 +0100 sched/fair: Fix wrong negative conversion in find_energy_efficient_cpu() In find_energy_efficient_cpu() 'cpu_cap' could be less that 'util'. It might be because of RT, DL (so higher sched class than CFS), irq or thermal pressure signal, which reduce the capacity value. In such situation the result of 'cpu_cap - util' might be negative but stored in the unsigned long. Then it might be compared with other unsigned long when uclamp_rq_util_with() reduced the 'util' such that is passes the fits_capacity() check. Prevent this situation and make the arithmetic more safe. Fixes: 1d42509e475cd ("sched/fair: Make EAS wakeup placement consider uclamp restrictions") Signed-off-by: Lukasz Luba Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20200810083004.26420-1-lukasz.luba@arm.com commit ec73240b1627cddfd7cef018c7fa1c32e64a721e Author: Josh Don Date: Tue Aug 4 12:34:13 2020 -0700 sched/fair: Ignore cache hotness for SMT migration SMT siblings share caches, so cache hotness should be irrelevant for cross-sibling migration. Signed-off-by: Josh Don Proposed-by: Venkatesh Pallipadi Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200804193413.510651-1-joshdon@google.com commit aa9c45db018fadd8d15611ba403d4a8e7c6521a9 Author: Thomas Bogendoerfer Date: Tue Aug 25 11:09:07 2020 +0200 MIPS: SGI-IP32: No need to include mc14818*.h Nothing needs the includes in ip32-setup.c. Signed-off-by: Thomas Bogendoerfer commit 518c0afb55ee3642b044a5238c66354c7b935974 Author: Thomas Bogendoerfer Date: Tue Aug 25 11:09:06 2020 +0200 MIPS: Remove unused header file m48t37.h No users -> remove it. Signed-off-by: Thomas Bogendoerfer commit 942b14fb3e58fd994cf23cb67da0e5998e995b61 Author: Thomas Bogendoerfer Date: Tue Aug 25 11:09:05 2020 +0200 MIPS: Loongson2ef: Remove specific mc146818rtc.h Loonson2ef's mc146818rtc.h is the same as the generic one -> remove it. Signed-off-by: Thomas Bogendoerfer Acked-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 5bdd89ad341959750df3955b7fa28410a7abcebe Author: Thomas Bogendoerfer Date: Tue Aug 25 11:09:04 2020 +0200 MIPS: SGI-IP27: No need for kmalloc.h SGI-IP27 is always cache coherent so we can use generic kmalloc.h and remove the ip27 specific one. Signed-off-by: Thomas Bogendoerfer commit f046b2334083c6e2bab96a8d7eba76684cf4b03e Author: Bard Liao Date: Mon Aug 24 21:32:34 2020 +0800 soundwire: intel: fix intel_suspend/resume defined but not used warning When CONFIG_PM_SLEEP is not defined, GCC throws compilation warnings: drivers/soundwire/intel.c:1799:12: warning: ‘intel_resume’ defined but not used [-Wunused-function] static int intel_resume(struct device *dev) ^~~~~~~~~~~~ drivers/soundwire/intel.c:1683:12: warning: ‘intel_suspend’ defined but not used [-Wunused-function] static int intel_suspend(struct device *dev) ^~~~~~~~~~~~~ Fix by using __maybe_unused macro. Suggested-by: Vinod Koul Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200824133234.28115-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 685a04a53747d07d22f5139c04ae35745200a91d Author: Connor McAdams Date: Tue Aug 25 16:10:39 2020 -0400 ALSA: hda/ca0132 - Add AE-7 exit commands. Add exit commands for the AE-7. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-21-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 24a28eaeb23b2ff7791350bb44875ca4dc3bef3f Author: Connor McAdams Date: Tue Aug 25 16:10:38 2020 -0400 ALSA: hda/ca0132 - Add AE-7 custom controls. Add headphone gain and DAC filter controls, which use the same commands as the AE-5. Also, change input source enumerated control item count to exclude front microphone. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-20-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit ed93f9750c6c2ed371347d0aac3dcd31cb9cf256 Author: Connor McAdams Date: Tue Aug 25 16:10:37 2020 -0400 ALSA: hda/ca0132 - Add AE-7 microphone selection commands. Add AE-7 quirk data for setting of microphone. The AE-7 has no front panel connector, so only rear-mic/line-in have new commands. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-19-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 91b94a933f28b0b819224bc638866b0844317776 Author: Connor McAdams Date: Tue Aug 25 16:10:36 2020 -0400 ALSA: hda/ca0132 - Add output selection for SoundBlaster AE-7. Add output selection quirk table information for SoundBlaster AE-7, and slightly modify the AE-5's ca0113 command table to accommodate the AE-7. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-18-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit e5b21888882bb340bf0fbcbcea909b09eef2933f Author: Connor McAdams Date: Tue Aug 25 16:10:35 2020 -0400 ALSA: hda/ca0132 - Add DSP setup functions for AE-7. Add DSP setup functions for the Sound Blaster AE-7 post DSP download. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-17-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit cfa736e2f02d768dad1b611abdb85fe6c10d8000 Author: Connor McAdams Date: Tue Aug 25 16:10:34 2020 -0400 ALSA: hda/ca0132 - Add init data for SoundBlaster AE-7. Add initialization data for the SoundBlaster AE-7 card. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-16-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 77bdbae90445771f76510e8c6a4ac0b722a19472 Author: Connor McAdams Date: Tue Aug 25 16:10:33 2020 -0400 ALSA: hda/ca0132 - Add pre-init function for SoundBlaster AE-7. Add pre DSP initialization function for the AE-7. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-15-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 4e356d56df9dbd4631ce2e40a5fb491829f4e8ce Author: Connor McAdams Date: Tue Aug 25 16:10:32 2020 -0400 ALSA: hda/ca0132 - Add ca0132_mmio_init data for SoundBlaster AE-7. Modify the AE-5 ca0132_mmio_init function to add AE-7 specific writes. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-14-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 76d257d67f4104bd3089be1a486047e3f3b40c24 Author: Connor McAdams Date: Tue Aug 25 16:10:31 2020 -0400 ALSA: hda/ca0132 - Set AE-7 bools and select mixer. Set the boolean values used for desktop cards, and select the desktop mixer. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-13-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit a35e37a3a2c5fc9a6dcf1e0445e8472cffac37c1 Author: Connor McAdams Date: Tue Aug 25 16:10:30 2020 -0400 ALSA: hda/ca0132 - Add SoundBlaster AE-7 pincfg. Add AE-7 pincfg, based on the values set within Windows. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-12-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 620f08eea6d6961b789af3fa3ea86725c8c93ece Author: Connor McAdams Date: Tue Aug 25 16:10:29 2020 -0400 ALSA: hda/ca0132 - Add new quirk ID for SoundBlaster AE-7. Add a new PCI subsystem ID for the SoundBlaster AE-7 card. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-11-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit b7a8b9e8e797236a62716118c513e13a2670fd07 Author: Connor McAdams Date: Tue Aug 25 16:10:28 2020 -0400 ALSA: hda/ca0132 - Fix Recon3D Center/LFE output. Properly set the GPIO pin to un-mute the Center/LFE channel on the Recon3D. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-10-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit def3f0a5c7007c899a9a4d4034130e9d175d952d Author: Connor McAdams Date: Tue Aug 25 16:10:27 2020 -0400 ALSA: hda/ca0132 - Add quirk output selection structures. Add structures containing the changes that need to happen on output selection for each quirk. This should streamline the addition of new quirks. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-9-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 8e00dc7cedb37c43a2eeb2147d67409ae2e8abf5 Author: Connor McAdams Date: Tue Aug 25 16:10:26 2020 -0400 ALSA: hda/ca0132 - Clean up ca0132_alt_out_select. Remove the output structures that were in use before and instead set the DSP commands line by line. Now that the commands use is known, it makes the functionality more clear this way. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-8-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit ed8156c86f958744ba2088d57b1959b86fb32344 Author: Connor McAdams Date: Tue Aug 25 16:10:25 2020 -0400 ALSA: hda/ca0132 - Remove surround output selection. Remove the surround output selection and merge it with the speaker output selection. Now that the extra commands that were being run on surround output setting are known, there's no need to have it be separate. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-7-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit f49b3063ad0d8638da2e7eb994549863f2c74923 Author: Connor McAdams Date: Tue Aug 25 16:10:24 2020 -0400 ALSA: hda/ca0132 - Add bass redirection controls. Add bass redirection controls for surround outputs. This uses the DSP to redirect audio below the bass redirection crossover frequency to the LFE channel from the front/rear L/R speakers. This only goes into effect if the speakers aren't set as full range, and only if the surround configuration has an LFE channel. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-6-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 670c5f484a4403e5c218442d5a0e337a2224741f Author: Connor McAdams Date: Tue Aug 25 16:10:23 2020 -0400 ALSA: hda/ca0132 - Add full-range speaker selection controls. Add functions for setting full-range speakers and controls to enable/disable the setting. Setting a speaker to full-range means that the channels won't have their bass redirected to the LFE channel. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-5-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 01464a566eed527dbf977e2430afa249c257c008 Author: Connor McAdams Date: Tue Aug 25 16:10:22 2020 -0400 ALSA: hda/ca0132 - Add surround channel config control. Add a surround channel configuration enumeration control. Setting up different channel configurations allows the DSP to upmix stereo audio into multi-channel audio, and allows for redirection of bass to a subwoofer. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-4-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 896e361e82423aed4490f485dc25de1958c724ed Author: Connor McAdams Date: Tue Aug 25 16:10:21 2020 -0400 ALSA: hda/ca0132 - Add speaker tuning initialization commands. Add speaker tuning initialization DSP commands, and also define previously unknown DSP command values. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-3-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit bf2aa9ccc8e598d788132ded9c7e94c6af3a9d1e Author: Connor McAdams Date: Tue Aug 25 16:10:20 2020 -0400 ALSA: hda/ca0132 - Cleanup ca0132_mmio_init function. Cleanup the ca0132_mmio_init function, separating into two separate functions, one for Sound Blaster Z/ZxR/Recon3D, and another for the AE-5. Signed-off-by: Connor McAdams Link: https://lore.kernel.org/r/20200825201040.30339-2-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 389be5006317371eba354969886affdf714f57c6 Author: Tian Tao Date: Wed Aug 19 17:23:34 2020 +0800 drm/hisilicon: Use drm_err instead of DRM_ERROR in hibmc_drm_drv Use drm_err instead of DRM_ERROR in hibmc_drm_drv Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1597829014-39942-5-git-send-email-tiantao6@hisilicon.com commit e7187bab295a5aead366c9f4a132db7c890afc9e Author: Tian Tao Date: Wed Aug 19 17:23:33 2020 +0800 drm/hisilicon: Use drm_err instead of DRM_ERROR in hibmc_drm_de Use drm_err instead of DRM_ERROR in hibmc_drm_de Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1597829014-39942-4-git-send-email-tiantao6@hisilicon.com commit ae34c15be62f679991826fc7531820d881f21a5d Author: Tian Tao Date: Wed Aug 19 17:23:32 2020 +0800 drm/hisilicon: Use drm_err instead of DRM_ERROR in hibmc_drm_vdac Use drm_err instead of DRM_ERROR in hibmc_drm_vdac Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1597829014-39942-3-git-send-email-tiantao6@hisilicon.com commit 274d77648eaa7a88787bb5c2e53e1f8c709ce7ac Author: Tian Tao Date: Wed Aug 19 17:23:31 2020 +0800 drm/hisilicon: Use drm_err instead of DRM_ERROR in hibmc_ttm Use drm_err instead of DRM_ERROR in hibmc_ttm. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1597829014-39942-2-git-send-email-tiantao6@hisilicon.com commit cd04b04de119a222c83936f7e9dbd46a650cb688 Author: Jiri Olsa Date: Tue Aug 25 21:21:24 2020 +0200 selftests/bpf: Add set test to resolve_btfids Adding test to for sets resolve_btfids. We're checking that testing set gets properly resolved and sorted. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-15-jolsa@kernel.org commit e4d1af4b16f80a90d9cf3a09bee2012dcde45638 Author: Jiri Olsa Date: Tue Aug 25 21:21:23 2020 +0200 selftests/bpf: Add test for d_path helper Adding test for d_path helper which is pretty much copied from Wenbo Zhang's test for bpf_get_fd_path, which never made it in. The test is doing fstat/close on several fd types, and verifies we got the d_path helper working on kernel probes for vfs_getattr/filp_close functions. Original-patch-by: Wenbo Zhang Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-14-jolsa@kernel.org commit 762f85156835258c85a32bf81b283300b6c6bd17 Author: Jiri Olsa Date: Tue Aug 25 21:21:22 2020 +0200 selftests/bpf: Add verifier test for d_path helper Adding verifier test for attaching tracing program and calling d_path helper from within and testing that it's allowed for dentry_open function and denied for 'd_path' function with appropriate error. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-13-jolsa@kernel.org commit 68a26bc7922ebf8bbf418f8e9d69364d965433e9 Author: Jiri Olsa Date: Tue Aug 25 21:21:21 2020 +0200 bpf: Update .BTF_ids section in btf.rst with sets info Updating btf.rst doc with info about BTF_SET_START/END macros. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-12-jolsa@kernel.org commit 6e22ab9da79343532cd3cde39df25e5a5478c692 Author: Jiri Olsa Date: Tue Aug 25 21:21:20 2020 +0200 bpf: Add d_path helper Adding d_path helper function that returns full path for given 'struct path' object, which needs to be the kernel BTF 'path' object. The path is returned in buffer provided 'buf' of size 'sz' and is zero terminated. bpf_d_path(&file->f_path, buf, size); The helper calls directly d_path function, so there's only limited set of function it can be called from. Adding just very modest set for the start. Updating also bpf.h tools uapi header and adding 'path' to bpf_helpers_doc.py script. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20200825192124.710397-11-jolsa@kernel.org commit eae2e83e62633a2659e3bc690facba1c2fc9c45b Author: Jiri Olsa Date: Tue Aug 25 21:21:19 2020 +0200 bpf: Add BTF_SET_START/END macros Adding support to define sorted set of BTF ID values. Following defines sorted set of BTF ID values: BTF_SET_START(btf_allowlist_d_path) BTF_ID(func, vfs_truncate) BTF_ID(func, vfs_fallocate) BTF_ID(func, dentry_open) BTF_ID(func, vfs_getattr) BTF_ID(func, filp_close) BTF_SET_END(btf_allowlist_d_path) It defines following 'struct btf_id_set' variable to access values and count: struct btf_id_set btf_allowlist_d_path; Adding 'allowed' callback to struct bpf_func_proto, to allow verifier the check on allowed callers. Adding btf_id_set_contains function, which will be used by allowed callbacks to verify the caller's BTF ID value is within allowed set. Also removing extra '\' in __BTF_ID_LIST macro. Added BTF_SET_START_GLOBAL macro for global sets. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-10-jolsa@kernel.org commit faaf4a790d93794b46d67e2fd69b8e5c8cae2d41 Author: Jiri Olsa Date: Tue Aug 25 21:21:18 2020 +0200 bpf: Add btf_struct_ids_match function Adding btf_struct_ids_match function to check if given address provided by BTF object + offset is also address of another nested BTF object. This allows to pass an argument to helper, which is defined via parent BTF object + offset, like for bpf_d_path (added in following changes): SEC("fentry/filp_close") int BPF_PROG(prog_close, struct file *file, void *id) { ... ret = bpf_d_path(&file->f_path, ... The first bpf_d_path argument is hold by verifier as BTF file object plus offset of f_path member. The btf_struct_ids_match function will walk the struct file object and check if there's nested struct path object on the given offset. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-9-jolsa@kernel.org commit 1c6d28a6ac56de5b0af9239a1b02aea4c3011ea3 Author: Jiri Olsa Date: Tue Aug 25 21:21:17 2020 +0200 bpf: Factor btf_struct_access function Adding btf_struct_walk function that walks through the struct type + given offset and returns following values: enum bpf_struct_walk_result { /* < 0 error */ WALK_SCALAR = 0, WALK_PTR, WALK_STRUCT, }; WALK_SCALAR - when SCALAR_VALUE is found WALK_PTR - when pointer value is found, its ID is stored in 'next_btf_id' output param WALK_STRUCT - when nested struct object is found, its ID is stored in 'next_btf_id' output param It will be used in following patches to get all nested struct objects for given type and offset. The btf_struct_access now calls btf_struct_walk function, as long as it gets nested structs as return value. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-8-jolsa@kernel.org commit dafe58fc1917a96c657a0f56a12f262e5d9fb324 Author: Jiri Olsa Date: Tue Aug 25 21:21:16 2020 +0200 bpf: Remove recursion call in btf_struct_access Andrii suggested we can simply jump to again label instead of making recursion call. Suggested-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-7-jolsa@kernel.org commit 887c31a39c49e261581a3d108607c9dea55b12d9 Author: Jiri Olsa Date: Tue Aug 25 21:21:15 2020 +0200 bpf: Add type_id pointer as argument to __btf_resolve_size Adding type_id pointer as argument to __btf_resolve_size to return also BTF ID of the resolved type. It will be used in following changes. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-6-jolsa@kernel.org commit 69ff304792709dcdc5c8918b236cf06fe7db448f Author: Jiri Olsa Date: Tue Aug 25 21:21:14 2020 +0200 bpf: Add elem_id pointer as argument to __btf_resolve_size If the resolved type is array, make btf_resolve_size return also ID of the elem type. It will be needed in following changes. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-5-jolsa@kernel.org commit 6298399bfc101f8e8cf35a916f26aa32bdf04278 Author: Jiri Olsa Date: Tue Aug 25 21:21:13 2020 +0200 bpf: Move btf_resolve_size into __btf_resolve_size Moving btf_resolve_size into __btf_resolve_size and keeping btf_resolve_size public with just first 3 arguments, because the rest of the arguments are not used by outside callers. Following changes are adding more arguments, which are not useful to outside callers. They will be added to the __btf_resolve_size function. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-4-jolsa@kernel.org commit a5f53b1d59c2fd35ebb55bbe47b05d596c0d466c Author: Jiri Olsa Date: Tue Aug 25 21:21:12 2020 +0200 tools resolve_btfids: Add support for set symbols The set symbol does not have the unique number suffix, so we need to give it a special parsing function. This was omitted in the first batch, because there was no set support yet, so it slipped in the testing. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-3-jolsa@kernel.org commit 193a983c5bc4c62f66d62a9a6f9084cf3f2a0db2 Author: Jiri Olsa Date: Tue Aug 25 21:21:11 2020 +0200 tools resolve_btfids: Add size check to get_id function To make sure we don't crash on malformed symbols. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825192124.710397-2-jolsa@kernel.org commit 2532f849b5134c4c62a20e5aaca33d9fb08af528 Author: Alexei Starovoitov Date: Tue Aug 25 15:23:46 2020 -0700 bpf: Disallow BPF_PRELOAD in allmodconfig builds The CC_CAN_LINK checks that the host compiler can link, but bpf_preload relies on libbpf which in turn needs libelf to be present during linking. allmodconfig runs in odd setups with cross compilers and missing host libraries like libelf. Instead of extending kconfig with every possible library that bpf_preload might need disallow building BPF_PRELOAD in such build-only configurations. Signed-off-by: Alexei Starovoitov commit cd324d7abb3d850ae083bda1239f800abe21fe25 Author: KP Singh Date: Tue Aug 25 20:29:19 2020 +0200 bpf: Add selftests for local_storage inode_local_storage: * Hook to the file_open and inode_unlink LSM hooks. * Create and unlink a temporary file. * Store some information in the inode's bpf_local_storage during file_open. * Verify that this information exists when the file is unlinked. sk_local_storage: * Hook to the socket_post_create and socket_bind LSM hooks. * Open and bind a socket and set the sk_storage in the socket_post_create hook using the start_server helper. * Verify if the information is set in the socket_bind hook. Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200825182919.1118197-8-kpsingh@chromium.org commit 30897832d8b97e93833fb52c0a02951db3692ed2 Author: KP Singh Date: Tue Aug 25 20:29:18 2020 +0200 bpf: Allow local storage to be used from LSM programs Adds support for both bpf_{sk, inode}_storage_{get, delete} to be used in LSM programs. These helpers are not used for tracing programs (currently) as their usage is tied to the life-cycle of the object and should only be used where the owning object won't be freed (when the owning object is passed as an argument to the LSM hook). Thus, they are safer to use in LSM hooks than tracing. Usage of local storage in tracing programs will probably follow a per function based whitelist approach. Since the UAPI helper signature for bpf_sk_storage expect a bpf_sock, it, leads to a compilation warning for LSM programs, it's also updated to accept a void * pointer instead. Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200825182919.1118197-7-kpsingh@chromium.org commit 8ea636848aca35b9f97c5b5dee30225cf2dd0fe6 Author: KP Singh Date: Tue Aug 25 20:29:17 2020 +0200 bpf: Implement bpf_local_storage for inodes Similar to bpf_local_storage for sockets, add local storage for inodes. The life-cycle of storage is managed with the life-cycle of the inode. i.e. the storage is destroyed along with the owning inode. The BPF LSM allocates an __rcu pointer to the bpf_local_storage in the security blob which are now stackable and can co-exist with other LSMs. Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200825182919.1118197-6-kpsingh@chromium.org commit 450af8d0f6be2e7dd2a528a3fb054bb726bf1747 Author: KP Singh Date: Tue Aug 25 20:29:16 2020 +0200 bpf: Split bpf_local_storage to bpf_sk_storage A purely mechanical change: bpf_sk_storage.c = bpf_sk_storage.c + bpf_local_storage.c bpf_sk_storage.h = bpf_sk_storage.h + bpf_local_storage.h Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200825182919.1118197-5-kpsingh@chromium.org commit f836a56e84ffc9f1a1cd73f77e10404ca46a4616 Author: KP Singh Date: Tue Aug 25 20:29:15 2020 +0200 bpf: Generalize bpf_sk_storage Refactor the functionality in bpf_sk_storage.c so that concept of storage linked to kernel objects can be extended to other objects like inode, task_struct etc. Each new local storage will still be a separate map and provide its own set of helpers. This allows for future object specific extensions and still share a lot of the underlying implementation. This includes the changes suggested by Martin in: https://lore.kernel.org/bpf/20200725013047.4006241-1-kafai@fb.com/ adding new map operations to support bpf_local_storage maps: * storages for different kernel objects to optionally have different memory charging strategy (map_local_storage_charge, map_local_storage_uncharge) * Functionality to extract the storage pointer from a pointer to the owning object (map_owner_storage_ptr) Co-developed-by: Martin KaFai Lau Signed-off-by: Martin KaFai Lau Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200825182919.1118197-4-kpsingh@chromium.org commit 4cc9ce4e739961a7b9e6b2f3b27a72124d356373 Author: KP Singh Date: Tue Aug 25 20:29:14 2020 +0200 bpf: Generalize caching for sk_storage. Provide the a ability to define local storage caches on a per-object type basis. The caches and caching indices for different objects should not be inter-mixed as suggested in: https://lore.kernel.org/bpf/20200630193441.kdwnkestulg5erii@kafai-mbp.dhcp.thefacebook.com/ "Caching a sk-storage at idx=0 of a sk should not stop an inode-storage to be cached at the same idx of a inode." Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200825182919.1118197-3-kpsingh@chromium.org commit 1f00d375af84fbcdb6dd6c79fd7c3d02d2390338 Author: KP Singh Date: Tue Aug 25 20:29:13 2020 +0200 bpf: Renames in preparation for bpf_local_storage A purely mechanical change to split the renaming from the actual generalization. Flags/consts: SK_STORAGE_CREATE_FLAG_MASK BPF_LOCAL_STORAGE_CREATE_FLAG_MASK BPF_SK_STORAGE_CACHE_SIZE BPF_LOCAL_STORAGE_CACHE_SIZE MAX_VALUE_SIZE BPF_LOCAL_STORAGE_MAX_VALUE_SIZE Structs: bucket bpf_local_storage_map_bucket bpf_sk_storage_map bpf_local_storage_map bpf_sk_storage_data bpf_local_storage_data bpf_sk_storage_elem bpf_local_storage_elem bpf_sk_storage bpf_local_storage The "sk" member in bpf_local_storage is also updated to "owner" in preparation for changing the type to void * in a subsequent patch. Functions: selem_linked_to_sk selem_linked_to_storage selem_alloc bpf_selem_alloc __selem_unlink_sk bpf_selem_unlink_storage_nolock __selem_link_sk bpf_selem_link_storage_nolock selem_unlink_sk __bpf_selem_unlink_storage sk_storage_update bpf_local_storage_update __sk_storage_lookup bpf_local_storage_lookup bpf_sk_storage_map_free bpf_local_storage_map_free bpf_sk_storage_map_alloc bpf_local_storage_map_alloc bpf_sk_storage_map_alloc_check bpf_local_storage_map_alloc_check bpf_sk_storage_map_check_btf bpf_local_storage_map_check_btf Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200825182919.1118197-2-kpsingh@chromium.org commit b0e37c51573323e9513386eb4b8734113377aecd Author: Chris Packham Date: Tue Aug 25 17:08:56 2020 +1200 spi: spi-fsl-espi: Remove use of %p The register offset is already included in the device name so even prior %p values being hashed printing the base was redundant. Remove the %p from the dev_info() output. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20200825050856.29616-1-chris.packham@alliedtelesis.co.nz Reviewed-by: Fabio Estevam Signed-off-by: Mark Brown commit ab6019d7fe81ecd28eff8ea87bb2388e56212200 Author: Mark Brown Date: Tue Aug 25 11:12:50 2020 +0100 regulator: rt4801: Specify additionalProperties: false Reported-by: Rob Herring Signed-off-by: Mark Brown Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200825101250.9485-1-broonie@kernel.org Signed-off-by: Mark Brown commit 9db6f4329cd2c16499d1c165311092f1b5c45a51 Merge: 672072976bf0d 135ab457e776d Author: Mark Brown Date: Tue Aug 25 20:53:30 2020 +0100 Merge series "ASoC: SOF: trivial code/log/comment improvements" from Pierre-Louis Bossart : Remove useless variable initialization and allocation, adjust log levels to make support easier, and fix comments. No functional changes. Guennadi Liakhovetski (2): ASoC: SOF: topology: (cosmetic) remove redundant variable initialisations ASoC: SOF: (cosmetic) use the "bool" type where it makes sense Pierre-Louis Bossart (4): ASoC: SOF: IPC: reduce verbosity of IPC pointer updates ASoC: SOF: acpi: add dev_dbg() log for probe completion ASoC: SOF: Intel: add dev_dbg log when driver is not selected ASoC: Intel: use consistent HDAudio spelling in comments/docs Ranjani Sridharan (2): ASoC: SOF: topology: remove unnecessary memory alloc for sdev->private ASoC: SOF: topology: reduce the log level for unhandled widgets include/sound/soc-acpi.h | 2 +- sound/soc/intel/Kconfig | 2 +- sound/soc/intel/skylake/skl.c | 6 +++--- sound/soc/sof/Kconfig | 2 +- sound/soc/sof/intel/Kconfig | 2 +- sound/soc/sof/ipc.c | 16 +++++++++++----- sound/soc/sof/pcm.c | 8 ++++---- sound/soc/sof/sof-acpi-dev.c | 2 ++ sound/soc/sof/sof-pci-dev.c | 6 +++--- sound/soc/sof/sof-priv.h | 10 +++++----- sound/soc/sof/topology.c | 20 ++++---------------- 11 files changed, 36 insertions(+), 40 deletions(-) base-commit: aafdeba5cbc14cecee3797e669473b70a2b3e81e -- 2.25.1 commit 672072976bf0db6e0aca5382bcf03bc90f439923 Author: Dan Carpenter Date: Tue Aug 25 13:46:23 2020 +0300 ASoC: hdac_hdmi: tidy up a memset() The ARRAY_SIZE() is the number of the elements but we want to use the number of bytes. Fortunately, in this case the value is the same so it doesn't affect runtime. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200825104623.GA278587@mwanda Signed-off-by: Mark Brown commit 135ab457e776d042c481d70d8954f6775ce35958 Author: Pierre-Louis Bossart Date: Mon Aug 24 15:09:12 2020 -0500 ASoC: Intel: use consistent HDAudio spelling in comments/docs We use HDaudio and HDAudio, pick one to make searches easier. No functionality change Reported-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200824200912.46852-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d5d023592e29b20aa17ba001495ebbab75b220f2 Author: Pierre-Louis Bossart Date: Mon Aug 24 15:09:11 2020 -0500 ASoC: SOF: Intel: add dev_dbg log when driver is not selected Mirror change suggested in legacy HDaudio driver. On SKL+ Intel platforms, the driver selection is handled by the snd_intel_dspcfg, and when the HDaudio legacy driver is not selected, be it with the auto-selection or user preferences with a kernel parameter, the probe aborts with no logs, only a -ENODEV return value. Having no dmesg trace, even with dynamic debug enabled, makes support more complicated than it needs to be, and even experienced users can be fooled. A simple dev_dbg() trace solves this problem. BugLink: https://github.com/thesofproject/linux/issues/2330 Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200824200912.46852-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 71d551f5aaed0ae3566bfc1c6c8b31e74cb5cd06 Author: Pierre-Louis Bossart Date: Mon Aug 24 15:09:10 2020 -0500 ASoC: SOF: acpi: add dev_dbg() log for probe completion When the probe relies on a workqueue, the completion is not signaled by a return value. Mirror the log already present for PCI probe, so that CI checks can test if the probe actually worked by filtering the console logs. Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200824200912.46852-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 277ff2364b3e2a8351ac2a605bfdaba058ac7586 Author: Pierre-Louis Bossart Date: Mon Aug 24 15:09:09 2020 -0500 ASoC: SOF: IPC: reduce verbosity of IPC pointer updates When using dynamic debug, the console is swamped with verbose position pointer logs, which really don't add much information. Move then to vdbg to keep traces usable and allow for easier end-user support. Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200824200912.46852-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f46ff50660e88235bd3dc993565c6440544a8e06 Author: Ranjani Sridharan Date: Mon Aug 24 15:09:08 2020 -0500 ASoC: SOF: topology: reduce the log level for unhandled widgets Virtual widgets are added to topology to be compatible with legacy machine drivers. Reduce the log level for messages printed when such widgets are ignored by the SOF driver. Reviewed-by: Guennadi Liakhovetski Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200824200912.46852-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f3e9ed5e90603db73a699bed18311f15cba71531 Author: Ranjani Sridharan Date: Mon Aug 24 15:09:07 2020 -0500 ASoC: SOF: topology: remove unnecessary memory alloc for sdev->private Looks like it was left over from the previous implementation of DMIC PDM token parsing. It is not used anymore. Reviewed-by: Bard Liao Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200824200912.46852-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f738d8156d05b0331543ec097dd5d3c83465d68f Author: Guennadi Liakhovetski Date: Mon Aug 24 15:09:06 2020 -0500 ASoC: SOF: (cosmetic) use the "bool" type where it makes sense Several fields in struct snd_sof_dev are used as boolean flags, use the "bool" type for them. Reviewed-by: Kai Vehmanen Signed-off-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200824200912.46852-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c81a4ef725362dbce890a24d62e745f57172718a Author: Guennadi Liakhovetski Date: Mon Aug 24 15:09:05 2020 -0500 ASoC: SOF: topology: (cosmetic) remove redundant variable initialisations Remove two cases of redundant variable initialisation. Reviewed-by: Kai Vehmanen Signed-off-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200824200912.46852-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit de76fd29a7dc4f6b96f7777bc5c0d92ed561ff5b Author: David Heidelberg Date: Fri Aug 14 00:34:05 2020 +0300 power: supply: smb347-charger: Support SMB345 and SMB358 SMB345 tested on Nexus 7 2013. Based on: - https://patchwork.kernel.org/patch/4922431/ - https://patchwork.ozlabs.org/patch/666877/ Signed-off-by: David Heidelberg Signed-off-by: Sebastian Reichel commit 364bec7557ecff4ef959c536abd19d00d94a854d Author: David Heidelberg Date: Fri Aug 14 00:34:04 2020 +0300 power: supply: smb347-charger: Implement device-tree support This patch adds device-tree support to the SMB347 charger driver. All legacy platform data now can be parsed from DT. Because of that and since SMB347 is an I2C client driver, the IRQ number can be passed automatically through client's IRQ variable if it's defined in DT. There is no need to map GPIO to IRQ manually in the case of DT. This patch is based on the original work made by: Jonghwa Lee Link: https://patchwork.kernel.org/patch/4284731/ Signed-off-by: Dmitry Osipenko Signed-off-by: David Heidelberg Signed-off-by: Sebastian Reichel commit 9b5fbad1dcee0607300d08f888c71c8ef97a06a0 Author: Joe Perches Date: Tue Aug 25 10:06:59 2020 -0700 Input: MT - avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/02cb394f8c305473c1a783a5ea8425de79fe0ec1.1598331149.git.joe@perches.com Signed-off-by: Dmitry Torokhov commit 00cda13e339c9f4956a6f036675df2ca5b5a552e Author: Dmitry Osipenko Date: Fri Aug 14 00:34:02 2020 +0300 power: supply: Support battery temperature device-tree properties The generic battery temperature properties are already supported by the power-supply core. Let's support parsing of the common battery temperature properties from a device-tree. Signed-off-by: Dmitry Osipenko Signed-off-by: Sebastian Reichel commit c1f90759b3d536f9b1b047484d08dfd04af3c4b1 Author: David Heidelberg Date: Fri Aug 14 00:34:01 2020 +0300 dt-bindings: power: supply: Add device-tree binding for Summit SMB3xx Summit SMB3xx series is a Programmable Switching Li+ Battery Charger. This patch adds device-tree binding for Summit SMB345, SMB347 and SMB358 chargers. Signed-off-by: David Heidelberg Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 873e63267bde605f253b9fee676af918be24e3d7 Author: Dmitry Osipenko Date: Fri Aug 14 00:34:00 2020 +0300 dt-bindings: battery: Add temperature properties Document generic battery temperature properties. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit cb06b385d5361217764543a1dec746955a094d0b Author: Alex Dewar Date: Mon Aug 24 23:23:20 2020 +0100 usb: atm: don't use snprintf() for sysfs attrs kernel/cpu.c: don't use snprintf() for sysfs attrs As per the documentation (Documentation/filesystems/sysfs.rst), snprintf() should not be used for formatting values returned by sysfs. In all of these cases, sprintf() suffices as we know that the formatted strings will be less than PAGE_SIZE in length. Issue identified by Coccinelle. Signed-off-by: Alex Dewar Link: https://lore.kernel.org/r/20200824222322.22962-1-alex.dewar90@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2d52f7102b1db9494dc104cacf2d964dfb996857 Author: David Heidelberg Date: Fri Aug 14 00:34:03 2020 +0300 power: supply: smb347-charger: Use resource-managed API Simplify code, more convenient to use with Device Tree. Reviewed-by: Dmitry Osipenko Signed-off-by: David Heidelberg Signed-off-by: Sebastian Reichel commit ef805f217709715b9013d8b247947af404718b9c Author: Elliot Berman Date: Tue Aug 18 11:54:13 2020 -0700 dt-bindings: power: reset: Convert reboot-mode to YAML Convert reboot-mode bindings to YAML. Signed-off-by: Elliot Berman Signed-off-by: Sebastian Reichel commit 93d660de3f3103d7a337bdb6fc912f1d88cb23b4 Author: Rikard Falkeborn Date: Tue Aug 25 01:22:28 2020 +0200 power: supply: bq2515x: Constify static variables Constify a number of static variables that are not modified to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Sebastian Reichel commit 25ffa0dde53c14cd6ddc938e39f70db4f8837591 Author: Reto Schneider Date: Sat Aug 22 17:10:21 2020 +0200 ARM: at91: Add GARDENA smart Gateway (Art. 19000) support This patch adds support for the GARDENA smart Gateway, which is based on the Atmel AT91SAM9G25. It is equipped with 128 MiB of DDR2 RAM and 256 MiB NAND storage. Please note that this gateway is not actually based on a AT91SAM9x5 EK board, but is close enough to allow its DT to be used. Co-developed-by: Stefan Roese Co-developed-by: Michael Zimmermann Signed-off-by: Stefan Roese Signed-off-by: Michael Zimmermann Signed-off-by: Reto Schneider Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200822151023.31629-2-code@reto-schneider.ch commit c05a4bff5c509afda0ee60009d62b5abc0e08311 Author: Reto Schneider Date: Sat Aug 22 17:10:20 2020 +0200 dt-bindings: arm: at91: Add GARDENA smart Gateway (Art. 19000) board Document devicetree's bindings for the GARDENA smart Gateway with article number 19000, based on the SAM9G25 Atmel SoC. Signed-off-by: Reto Schneider Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200822151023.31629-1-code@reto-schneider.ch commit 99363d1c26c825055f8a879d9d5c2b78168cf655 Author: Jean Delvare Date: Tue Aug 25 09:20:37 2020 +0200 eeprom: at24: Tidy at24_read() The elegant code in at24_read() has the drawback that we now need to make a copy of all parameters to pass them to the post-processing callback function if there is one. Rewrite the loop in such a way that the parameters are not modified, so saving them is no longer needed. Signed-off-by: Jean Delvare Cc: Bartosz Golaszewski Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Bartosz Golaszewski commit 78a2f92e4c4a3b775add7f99d04f8acf2fcb48d7 Author: Alexandru Ardelean Date: Tue Aug 25 18:19:50 2020 +0300 dmaengine: axi-dmac: add support for reading bus attributes from registers Starting with core version 4.3.a the DMA bus attributes can (and should) be read from the INTERFACE_DESCRIPTION (0x10) register. For older core versions, this will still need to be provided from the device-tree. The bus-type values are identical to the ones stored in the device-trees, so we just need to read them. Bus-width values are stored in log2 values, so we just need to use them as shift values to make them equivalent to the current format. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200825151950.57605-7-alexandru.ardelean@analog.com Signed-off-by: Vinod Koul commit 3061a65c1b3dbcad0d6c03e4edc606698cfa05d2 Author: Alexandru Ardelean Date: Tue Aug 25 18:19:49 2020 +0300 dmaengine: axi-dmac: wrap channel parameter adjust into function The channel parameters (which are read from the device-tree) are adjusted for the DMAEngine framework in the axi_dmac_parse_chan_dt() function, after they are read from the device-tree. When we want to read these from registers, we will need to use the same logic, so this change splits the logic into a separate function. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200825151950.57605-6-alexandru.ardelean@analog.com Signed-off-by: Vinod Koul commit 06b6e88c7ecf48e666bdd88615fa46155c8cb8f1 Author: Alexandru Ardelean Date: Tue Aug 25 18:19:48 2020 +0300 dmaengine: axi-dmac: wrap entire dt parse in a function All these attributes will be read from registers in newer core versions, so just wrap the logic into a function. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200825151950.57605-5-alexandru.ardelean@analog.com Signed-off-by: Vinod Koul commit 08b36dba23e5b26a3f5dbeb5b0d8d7462ab38c12 Author: Alexandru Ardelean Date: Tue Aug 25 18:19:47 2020 +0300 dmaengine: axi-dmac: move clock enable earlier The clock may also be required to read registers from the IP core (if it is provided and the driver needs to control it). So, move it earlier in the probe. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200825151950.57605-4-alexandru.ardelean@analog.com Signed-off-by: Vinod Koul commit a88fdece44d40cd577454f0610ca7d2e37ca74df Author: Alexandru Ardelean Date: Tue Aug 25 18:19:46 2020 +0300 dmaengine: axi-dmac: move active_descs list init after device-tree init We want to enable the clock right after it is obtained. Then later we'll want to read the core version via register-access (which requires the clock to be enabled). The initialization of the active_descs list can be postponed after reading from registers (or reading the device-tree). Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200825151950.57605-3-alexandru.ardelean@analog.com Signed-off-by: Vinod Koul commit b377e670bac558a570f83a63c9ffb7cc79887d9b Author: Alexandru Ardelean Date: Tue Aug 25 18:19:45 2020 +0300 dmaengine: axi-dmac: move version read in probe The 'version' of the IP core will be needed to adapt the driver to a new feature (i.e. reading some DMA parameters from registers). To do that, the version will be checked, so this is being moved out of the axi_dmac_detect_caps() function. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200825151950.57605-2-alexandru.ardelean@analog.com Signed-off-by: Vinod Koul commit 5822bfed6472340f882b43d5c2f2629091191c9d Author: Jernej Skrabec Date: Tue Aug 25 12:00:30 2020 +0200 ARM: dts: sun8i: r40: Add DMA node Allwinner R40 SoC has DMA with 16 channels and 31 request sources. Add a node for it. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200825100030.1145356-3-jernej.skrabec@siol.net commit 4c508a44d400c9e5be7e18733ae0e7377b2fdec6 Author: Jernej Skrabec Date: Tue Aug 25 12:00:29 2020 +0200 dt-bindings: dma: allwinner,sun50i-a64-dma: Add R40 compatible R40 has DMA engine which is basically the same as that in A64, with only known difference being number of request sources and number of channels. Add compatible for it. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200825100030.1145356-2-jernej.skrabec@siol.net commit ca65a280fb4bc06baa6ea33f42631e489e462604 Author: Joe Perches Date: Mon Aug 24 21:56:25 2020 -0700 sunrpc: Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Signed-off-by: David S. Miller commit dee847793fac2fcb05add1ab46cb6e5f77340fa9 Author: Joe Perches Date: Mon Aug 24 21:56:24 2020 -0700 ipv6: fib6: Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Signed-off-by: David S. Miller commit ac937e1f7d7a7a986b39432f7a9e8a09a0c5a8c7 Author: Joe Perches Date: Mon Aug 24 21:56:15 2020 -0700 wan: sbni: Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Signed-off-by: David S. Miller commit 2d59079ff74972409f35973793e109e14090a4ac Author: Joe Perches Date: Mon Aug 24 21:56:14 2020 -0700 fs_enet: Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Signed-off-by: David S. Miller commit e7fee115bf2cc418cc607a01bb62678eb8c720e9 Author: Joe Perches Date: Mon Aug 24 21:56:13 2020 -0700 8390: Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Signed-off-by: David S. Miller commit a3ba99a24b36bc4eee5413a820e2c4f3d81593fa Author: Jernej Skrabec Date: Tue Aug 25 15:10:49 2020 +0200 clk: sunxi-ng: sun8i: r40: Use sigma delta modulation for audio PLL Audio cores need specific clock rates which can't be simply obtained by adjusting integer multipliers and dividers. HW for such cases supports delta-sigma modulation which enables fractional multipliers. Port H3 delta-sigma table to R40. They have identical audio PLLs. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200825131049.1277596-1-jernej.skrabec@siol.net commit 8fada2d4c213e7625124a24784c460cefc17c700 Author: Alex Dewar Date: Sun Aug 9 19:54:44 2020 +0100 power: supply: Add dependency to lego-ev3-battery Kconfig options This battery appears only to be used by a single board (DA850), so it makes sense to add this to the Kconfig file so that users don't build the module unnecessarily. It currently seems to be built for the x86 Arch Linux kernel where it's probably not doing much good. Signed-off-by: Alex Dewar Acked-by: David Lechner Signed-off-by: Sebastian Reichel commit 343d8c6014db5b3397b3eedcb845fdd361c7e665 Author: Miaohe Lin Date: Tue Aug 25 08:32:11 2020 -0400 net: clean up codestyle for net/ipv4 This is a pure codestyle cleanup patch. Also add a blank line after declarations as warned by checkpatch.pl. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit fdf1923bf9f7d4d5574187722a247707344eded9 Author: Miaohe Lin Date: Tue Aug 25 08:10:37 2020 -0400 net: Remove duplicated midx check against 0 Check midx against 0 is always equal to check midx against sk_bound_dev_if when sk_bound_dev_if is known not equal to 0 in these case. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 0ce779a9f50108c26541b54c12a0808ba1be103a Author: Miaohe Lin Date: Tue Aug 25 07:40:48 2020 -0400 net: Avoid unnecessary inet_addr_type() call when addr is INADDR_ANY We can avoid unnecessary inet_addr_type() call by check addr against INADDR_ANY first. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 0316a211168dd94c4d3b81c91e76fac4f2714544 Author: Miaohe Lin Date: Tue Aug 25 07:33:22 2020 -0400 net: Set ping saddr after we successfully get the ping port We can defer set ping saddr until we successfully get the ping port. So we can avoid clear saddr when failed. Since ping_clear_saddr() is not used anymore now, remove it. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit cca852831c0672e1b2da590c23764b5ad149cbb7 Author: Raju Rangoju Date: Tue Aug 25 09:25:46 2020 +0530 cxgb4: add error handlers to LE intr_handler cxgb4 does not look for HASHTBLMEMCRCERR and CMDTIDERR bits in LE_DB_INT_CAUSE register, but these are enabled in LE_DB_INT_ENABLE. So, add error handlers to LE interrupt handler to emit a warning or alert message for hash table mem crc and cmd tid errors Signed-off-by: Raju Rangoju Signed-off-by: David S. Miller commit 4718a471f1a7fc5cc943377c09300bb35138daf9 Author: Miaohe Lin Date: Mon Aug 24 23:25:17 2020 -0400 netlink: remove duplicated nla_need_padding_for_64bit() check The need for padding 64bit is implicitly checked by nla_align_64bit(), so remove this explicit one. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 8b4510d76cde3c6934d4caed2fe897bd831cdb82 Author: Miaohe Lin Date: Mon Aug 24 23:20:28 2020 -0400 net: gain ipv4 mtu when mtu is not locked When mtu is locked, we should not obtain ipv4 mtu as we return immediately in this case and leave acquired ipv4 mtu unused. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 1b8b31a2e6120b7b2bc99137c0ba1ae3e45dbd7d Author: Stephen Smalley Date: Wed Aug 19 15:45:16 2020 -0400 selinux: convert policy read-write lock to RCU Convert the policy read-write lock to RCU. This is significantly simplified by the earlier work to encapsulate the policy data structures and refactor the policy load and boolean setting logic. Move the latest_granting sequence number into the selinux_policy structure so that it can be updated atomically with the policy. Since removing the policy rwlock and moving latest_granting reduces the selinux_ss structure to nothing more than a wrapper around the selinux_policy pointer, get rid of the extra layer of indirection. At present this change merely passes a hardcoded 1 to rcu_dereference_check() in the cases where we know we do not need to take rcu_read_lock(), with the preceding comment explaining why. Alternatively we could pass fsi->mutex down from selinuxfs and apply a lockdep check on it instead. Based in part on earlier attempts to convert the policy rwlock to RCU by Kaigai Kohei [1] and by Peter Enderborg [2]. [1] https://lore.kernel.org/selinux/6e2f9128-e191-ebb3-0e87-74bfccb0767f@tycho.nsa.gov/ [2] https://lore.kernel.org/selinux/20180530141104.28569-1-peter.enderborg@sony.com/ Signed-off-by: Stephen Smalley Reviewed-by: Ondrej Mosnacek Signed-off-by: Paul Moore commit 112ec61b212200d378963cbafdd736a62e9ddaec Author: Łukasz Stelmach Date: Thu Aug 13 22:41:23 2020 +0200 dmaengine: pl330: fix instruction dump formatting Instruction dump uses two printk() in a row to print one instruction. Use KERN_CONT to prevent breaking the output in the middle. Signed-off-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20200813204123.19044-1-l.stelmach@samsung.com Signed-off-by: Vinod Koul commit 6139521db7d4a01ac780340a9eb8892d6bf3a953 Author: Gustavo Pimentel Date: Thu Aug 13 16:14:14 2020 +0200 dmaengine: dw-edma: Fix typo in comments offset Fix typo in comments offset related to padding bytes. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/d7c7e56a83a13a62438a6c1a23863015a3760581.1597327654.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit ec02821c1d35f93b821bc9fdfa83a5f3e9d7275d Author: Xu Wang Date: Tue Aug 18 06:26:51 2020 +0000 alarmtimer: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Xu Wang Signed-off-by: Thomas Gleixner Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200818062651.21680-1-vulab@iscas.ac.cn commit 8f757317b8645f2f602f4fcefd5b1f31f774e63b Author: Peter Ujfalusi Date: Mon Aug 24 15:01:20 2020 +0300 dmaengine: ti: k3-udma: Remove redundant is_slave_direction() checks The direction has been already validated in the main callback and there is no need to check it again in the TR mode handlers for slave_sg and cyclic. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200824120120.9270-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit fb535aa017059499c913c3b90e453c119ecfb30e Merge: 20c05a0550636 d012a7190fc1f Author: Mark Brown Date: Tue Aug 25 11:02:09 2020 +0100 Merge tag 'v5.9-rc2' into spi-5.10 Linux 5.9-rc2 commit 3485e56cb8e618d9cb7e74db3606c00d818d1a0d Merge: c8b2c8949c45b d012a7190fc1f Author: Mark Brown Date: Tue Aug 25 11:01:58 2020 +0100 Merge tag 'v5.9-rc2' into regulator-5.10 Linux 5.9-rc2 commit afa86a047edef28004fb3d2a47d3d90309a830a5 Merge: aafdeba5cbc14 d012a7190fc1f Author: Mark Brown Date: Tue Aug 25 11:01:24 2020 +0100 Merge tag 'v5.9-rc2' into asoc-5.10 Linux 5.9-rc2 commit 928bfbc6c76ca7bad7cf8d52b4b0b1802325f2b3 Author: Kuninori Morimoto Date: Mon Aug 17 13:50:55 2020 +0900 soc: renesas: Use menu for Renesas SoC Renesas related SoC settings are located on TOP level menu, thus it is very verbose. This patch groups Renesas related settings into "Renesas SoC driver support" menu. And it aligns config menu names. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0xxho7t.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 7da4d2a8c6bc927870aa81d52af68a9bb944be33 Author: Biju Das Date: Wed Aug 19 09:08:41 2020 +0100 arm64: dts: renesas: r8a774e1-hihope-rzg2h: Enable HS400 mode This patch enables HS400 mode on HiHope RZ/G2H board. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200819080841.3475-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c0ed2ee793f1f5c15d88c0dd458504b7b2aa9d6a Author: Lad Prabhakar Date: Sun Aug 16 20:33:15 2020 +0100 ARM: dts: r8a7742-iwg21m: Add RTC support Enable BQ32000 RTC which is connected to I2C0 on the iWave RainboW-G21M-q7 SOM. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200816193316.7641-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit be571bec2cfdb7aaa096d547aa8a1559a0c0cc90 Author: Lad Prabhakar Date: Sun Aug 16 20:33:14 2020 +0100 ARM: dts: r8a7742-iwg21m: Sort the nodes alphabetically Sort the DT nodes alphabetically so that its easier to maintain. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200816193316.7641-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 5a81ade1dd284a25c25b7582e94e33e5690c3da5 Author: Lad Prabhakar Date: Sun Aug 16 20:07:32 2020 +0100 ARM: dts: r8a7742: Add CAN support Add the definitions for can0 and can1 to the r8a7742 SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200816190732.6905-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 0c77ecdcfcd35e97c677e49a8516a0b10c1e8fb7 Author: Lad Prabhakar Date: Fri Aug 14 18:30:37 2020 +0100 arm64: dts: renesas: r8a774c0: Add PCIe EP node Add PCIe EP node to R8A774C0 (RZ/G2E) SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20200814173037.17822-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d12d16205f7993da195002eea24b7467deb9ac8c Author: Lad Prabhakar Date: Fri Aug 14 18:30:36 2020 +0100 arm64: dts: renesas: r8a774b1: Add PCIe EP nodes Add PCIe EP nodes to R8A774B1 (RZ/G2N) SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20200814173037.17822-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 578450883bb1ff878ac8e3d38060802b222adcbe Author: Lad Prabhakar Date: Fri Aug 14 18:30:35 2020 +0100 arm64: dts: renesas: r8a774a1: Add PCIe EP nodes Add PCIe EP nodes to R8A774A1 (RZ/G2M) SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20200814173037.17822-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ddc0e61a2e3e2cb3c8cf428ead1ddbfdc443b4e2 Author: Geert Uytterhoeven Date: Wed Aug 19 12:12:40 2020 +0200 arm64: defconfig: Enable RPC-IF support Enable moduler support for the Renesas SPI Multi I/O Bus Controller (RPC-IF), which is used on the Condor, Eagle, V3HSK, and V3MSK boards. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819101240.12260-1-geert+renesas@glider.be commit 72e7ef46f1447b310278412bb51f681d8df45439 Author: Geert Uytterhoeven Date: Wed Aug 19 12:11:25 2020 +0200 ARM: shmobile: defconfig: Refresh for v5.9-rc1 Refresh the defconfig for Renesas ARM systems: - Drop CONFIG_BACKLIGHT_GENERIC=n (removed in commit 7ecdea4a0226f6c5 ("backlight: generic_bl: Remove this driver as it is unused")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819101125.12113-1-geert+renesas@glider.be commit 4300cd6374a5192a2c8122a4a48ed647bdcb0214 Author: John Hubbard Date: Mon Aug 24 14:11:25 2020 -0700 tee: convert get_user_pages() --> pin_user_pages() This code was using get_user_pages*(), in a "Case 2" scenario (DMA/RDMA), using the categorization from [1]. That means that it's time to convert the get_user_pages*() + put_page() calls to pin_user_pages*() + unpin_user_pages() calls. Factor out a new, small release_registered_pages() function, in order to consolidate the logic for discerning between TEE_SHM_USER_MAPPED and TEE_SHM_KERNEL_MAPPED pages. This also absorbs the kfree() call that is also required there. There is some helpful background in [2]: basically, this is a small part of fixing a long-standing disconnect between pinning pages, and file systems' use of those pages. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Cc: Jens Wiklander Cc: Sumit Semwal Cc: tee-dev@lists.linaro.org Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: John Hubbard Signed-off-by: Jens Wiklander commit fb038ce4db55cf2c911b6b221d10f06afe5f25af Author: Yangtao Li Date: Fri Jul 24 14:58:43 2020 +0800 clk: sunxi-ng: add support for the Allwinner A100 CCU Add support for a100 in the sunxi-ng CCU framework. Signed-off-by: Yangtao Li Signed-off-by: Maxime Ripard Acked-by: Rob Herring Link: https://lore.kernel.org/r/1eb41bf6c966a0e54820200650d27a5d4f2ac160.1595572867.git.frank@allwinnertech.com commit 2f704c29699dc3809d80095da8cf2cd5d19b28c4 Author: Yangtao Li Date: Fri Jul 24 14:56:08 2020 +0800 dt-bindings: clk: sunxi-ccu: add compatible string for A100 CCU and R-CCU This patch adds binding to a100's ccu clock and r-ccu clock. Signed-off-by: Yangtao Li Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/5791b0a39e7ca2f1c11d3bade9ebeb7fece31230.1595572867.git.frank@allwinnertech.com commit 95c83906380e77f5081b231bba625bdebc57d592 Author: Yangtao Li Date: Fri Jul 24 15:21:05 2020 +0800 arm64: allwinner: A100: add support for Allwinner Perf1 board A100 perf1 is an Allwinner A100-based SBC, with the following features: - 1GiB DDR3 DRAM - AXP803 PMIC - 2 USB 2.0 ports - MicroSD slot and on-board eMMC module - on-board Nand flash - ··· Adds initial support for it, including UART and PMU. Signed-off-by: Yangtao Li Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/30f4a3fc6ac84d05094e2c3b89d1dddc8ff6b7fc.1595572867.git.frank@allwinnertech.com commit 1c09280f0b214dfdb7b78336ff5c871108e5f3a9 Author: Yangtao Li Date: Fri Jul 24 15:20:12 2020 +0800 dt-bindings: arm: sunxi: Add Allwinner A100 Perf1 Board bindings Document board compatible names for Allwinner A100 Perf1 Board. Signed-off-by: Yangtao Li Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/0368996b732f300d0b5719e51dbd4322fa09053d.1595572867.git.frank@allwinnertech.com commit 0dea1794f3b4bca45affd8ae7eb0ac33fa1c0599 Author: Yangtao Li Date: Fri Jul 24 15:18:24 2020 +0800 arm64: allwinner: A100: add the basical Allwinner A100 DTSI file Allwinner A100 is a new SoC with Cortex-A53 cores, this commit adds the basical DTSI file of it, including the clock, i2c, pins, sid, ths, nmi, and UART support. Signed-off-by: Yangtao Li Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/815a458de74b79eb649972de786e647be3846424.1595572867.git.frank@allwinnertech.com commit 5805c747f4db9ca679391559519c25aac734436b Author: Yangtao Li Date: Fri Jul 24 15:15:53 2020 +0800 dt-bindings: irq: sun7i-nmi: Add binding for A100's NMI controller Add a binding for A100's nmi controller. Signed-off-by: Yangtao Li Signed-off-by: Maxime Ripard Acked-by: Rob Herring Link: https://lore.kernel.org/r/953b76413563551b82dd11cadbc99c695f74f721.1595572867.git.frank@allwinnertech.com commit 0552942ffded1e30ca561b89d7e615292f4ed5b7 Author: Yangtao Li Date: Fri Jul 24 15:14:48 2020 +0800 dt-bindings: irq: sun7i-nmi: fix dt-binding for a80 nmi There is no one use "allwinner,sun9i-a80-sc-nmi". The A80 uses "allwinner,sun9i-a80-nmi". Let's fix it. Signed-off-by: Yangtao Li Signed-off-by: Maxime Ripard Acked-by: Rob Herring Link: https://lore.kernel.org/r/fb081585c4fedcb9b8b95e5f16879dff482c9717.1595572867.git.frank@allwinnertech.com commit 2933bf3528007f834fb7f5eab033f9c5b0683f91 Author: Qiang Yu Date: Sat Aug 22 14:27:55 2020 +0800 arm64: dts: allwinner: h5: remove Mali GPU PMU module H5's Mali GPU PMU is not present or working corretly although H5 datasheet record its interrupt vector. Adding this module will miss lead lima driver try to shutdown it and get waiting timeout. This problem is not exposed before lima runtime PM support is added. Fixes: bb39ed07e55b ("arm64: dts: allwinner: h5: Add device node for Mali-450 GPU") Signed-off-by: Qiang Yu Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200822062755.534761-1-yuq825@gmail.com commit 64faa1053197bd69204bdebe815aeb2447991481 Author: Stefan Monnier Date: Fri Aug 21 13:18:33 2020 -0400 ARM: dts: sun4i: Enable HDMI support on the Mele A1000 Enable the display pipeline and HDMI output. Signed-off-by: Stefan Monnier Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200821171833.28177-1-monnier@iro.umontreal.ca commit 12bb1887be9dc8ca88fccd4da4d8d9eaae561239 Author: Jernej Skrabec Date: Mon Aug 24 17:04:34 2020 +0200 ARM: dts: sun8i: r40: Add Mali node R40 has Mali400 GP2 GPU. Add a node for it. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200824150434.951693-3-jernej.skrabec@siol.net commit 4a6c1be2f9d951d61239ec440c17a5c517c730ba Author: Jernej Skrabec Date: Mon Aug 24 17:04:33 2020 +0200 dt-bindings: gpu: mali-utgard: Add Allwinner R40 compatible Allwinner R40 SoC contains Mali400, so add its specific compatible to bindings. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200824150434.951693-2-jernej.skrabec@siol.net commit 3658a2b7f3e16c7053eb8d70657b94bb62c5a0f4 Author: Jernej Skrabec Date: Mon Aug 24 21:36:49 2020 +0200 ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix dcdc1 regulator DCDC1 regulator powers many different subsystems. While some of them can work at 3.0 V, some of them can not. For example, VCC-HDMI can only work between 3.24 V and 3.36 V. According to OS images provided by the board manufacturer this regulator should be set to 3.3 V. Set DCDC1 and DCDC1SW to 3.3 V in order to fix this. Fixes: da7ac948fa93 ("ARM: dts: sun8i: Add board dts file for Banana Pi M2 Ultra") Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200824193649.978197-1-jernej.skrabec@siol.net commit ab70935d37bbd2637125bea489308b896b2756de Author: Jarkko Nikula Date: Thu Aug 20 11:05:25 2020 +0300 i2c: Remove 'default n' from busses/Kconfig The default value for a config option defaults to 'n' so it doesn't need to be set here. Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare [jdelvare: found another one] Signed-off-by: Wolfram Sang commit dd461cd9183fe80bee84fd6cab2a29bfc8f55a76 Author: Stephan Gerhold Date: Mon Jul 27 11:30:46 2020 +0200 opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER The OPP core manages various resources, e.g. clocks or interconnect paths. These resources are looked up when the OPP table is allocated once dev_pm_opp_get_opp_table() is called the first time (either directly or indirectly through one of the many helper functions). At this point, the resources may not be available yet, i.e. looking them up will result in -EPROBE_DEFER. Unfortunately, dev_pm_opp_get_opp_table() is currently unable to propagate this error code since it only returns the allocated OPP table or NULL. This means that all consumers of the OPP core are required to make sure that all necessary resources are available. Usually this happens by requesting them, checking the result and releasing them immediately after. For example, we have added "dev_pm_opp_of_find_icc_paths(dev, NULL)" to several drivers now just to make sure the interconnect providers are ready before the OPP table is allocated. If this call is missing, the OPP core will only warn about this and then attempt to continue without interconnect. This will eventually fail horribly, e.g.: cpu cpu0: _allocate_opp_table: Error finding interconnect paths: -517 ... later ... of: _read_bw: Mismatch between opp-peak-kBps and paths (1 0) cpu cpu0: _opp_add_static_v2: opp key field not found cpu cpu0: _of_add_opp_table_v2: Failed to add OPP, -22 This example happens when trying to use interconnects for a CPU OPP table together with qcom-cpufreq-nvmem.c. qcom-cpufreq-nvmem calls dev_pm_opp_set_supported_hw(), which ends up allocating the OPP table early. To fix the problem with the current approach we would need to add yet another call to dev_pm_opp_of_find_icc_paths(dev, NULL). But actually qcom-cpufreq-nvmem.c has nothing to do with interconnects... This commit attempts to make this more robust by allowing dev_pm_opp_get_opp_table() to return an error pointer. Fixing all the usages is trivial because the function is usually used indirectly through another helper (e.g. dev_pm_opp_set_supported_hw() above). These other helpers already return an error pointer. The example above then works correctly because set_supported_hw() will return -EPROBE_DEFER, and qcom-cpufreq-nvmem.c already propagates that error. It should also be possible to remove the remaining usages of "dev_pm_opp_of_find_icc_paths(dev, NULL)" from other drivers as well. Note that this commit currently only handles -EPROBE_DEFER for the clock/interconnects within _allocate_opp_table(). Other errors are just ignored as before. Eventually those should be propagated as well. Signed-off-by: Stephan Gerhold Acked-by: Krzysztof Kozlowski Reviewed-by: Ulf Hansson [ Viresh: skip checking return value of dev_pm_opp_get_opp_table() for EPROBE_DEFER in domain.c, fix NULL return value and reorder code a bit in core.c, and update exynos-asv.c ] Signed-off-by: Viresh Kumar commit edb1a2e256473e4b5ab953e099096645d4508a4e Author: Eddie James Date: Mon Aug 17 12:53:06 2020 -0500 ARM: dts: aspeed: rainier: Enable XDMA engine Fix the VGA reserved memory node, and add the XDMA engine node, enable it, and point it's memory region to the VGA memory. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit 7c32a9d95c9af768cf6d192f0b2f72f22d8c2cde Author: Tao Ren Date: Mon Aug 24 11:29:55 2020 -0700 ARM: dts: aspeed: wedge40: Update UART4 pin settings Enable UART4's NRTS4 (A19) pin because the pin is used for RS485 software emulation. Signed-off-by: Tao Ren Link: https://lore.kernel.org/r/20200824182955.7988-3-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit fe84b8fd24d0fca26ce7a5f95beb66037decf7bf Author: Tao Ren Date: Mon Aug 24 11:29:54 2020 -0700 ARM: dts: aspeed: wedge40: Update FMC flash0 label Update FMC flash0's label to "spi0.0" so it's consistent with all the other Facebook OpenBMC platforms. Signed-off-by: Tao Ren Link: https://lore.kernel.org/r/20200824182955.7988-2-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit bc8d756d5ba03f2a7b5365ae76c8925fbc1f4b70 Author: Tao Ren Date: Mon Aug 24 14:19:48 2020 -0700 ARM: dts: aspeed: Add Facebook Wedge400 BMC Add initial version of device tree for Facebook Wedge400 (AST2500) BMC. Signed-off-by: Tao Ren Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20200824211948.12852-6-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit ac6cec4c3acfb5fc64533d6b2b79c4c8020d2974 Author: Tao Ren Date: Mon Aug 24 14:19:47 2020 -0700 ARM: dts: aspeed: minipack: Update 64MB FMC flash layout Set 64Mb FMC flash layout in Minipack device tree explicitly because the flash layout was removed from "ast2500-facebook-netbmc-common.dtsi". Please note "data0" partition' size is updated to 4MB to be consistent with other Facebook OpenBMC platforms. Signed-off-by: Tao Ren Link: https://lore.kernel.org/r/20200824211948.12852-5-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit 11c4124d5343b86e828c7c120cb8d1ece720dd0c Author: Tao Ren Date: Mon Aug 24 14:19:46 2020 -0700 ARM: dts: aspeed: yamp: Set 32MB FMC flash layout Set 32MB FMC flash layout in Yamp device tree explicitly because flash layout settings were removed from "ast2500-facebook-netbmc-common.dtsi". Signed-off-by: Tao Ren Link: https://lore.kernel.org/r/20200824211948.12852-4-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit f883a606097d0017079b0e40125aac47ab221616 Author: Tao Ren Date: Mon Aug 24 14:19:45 2020 -0700 ARM: dts: aspeed: cmm: Set 32MB FMC flash layout Set 32MB FMC flash layout in CMM device tree explicitly because the flash layout settings were removed from "ast2500-facebook-netbmc-common.dtsi". Signed-off-by: Tao Ren Link: https://lore.kernel.org/r/20200824211948.12852-3-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit c3b1d561869a03e2f10465309be35f939d4dd8e8 Author: Tao Ren Date: Mon Aug 24 14:19:44 2020 -0700 ARM: dts: aspeed: Remove flash layout from Facebook AST2500 Common dtsi Remove FMC flash layout from ast2500-facebook-netbmc-common.dtsi because flash size and layout varies across different Facebook AST2500 OpenBMC platforms. Signed-off-by: Tao Ren Link: https://lore.kernel.org/r/20200824211948.12852-2-rentao.bupt@gmail.com Signed-off-by: Joel Stanley commit 0fcdfffe80346d015b920228203d0269284d8b13 Author: Yonghong Song Date: Mon Aug 24 15:28:07 2020 -0700 selftests/bpf: Enable tc verbose mode for test_sk_assign Currently test_sk_assign failed verifier with llvm11/llvm12. During debugging, I found the default verifier output is truncated like below Verifier analysis: Skipped 2200 bytes, use 'verb' option for the full verbose log. [...] off=23,r=34,imm=0) R5=inv0 R6=ctx(id=0,off=0,imm=0) R7=pkt(id=0,off=0,r=34,imm=0) R10=fp0 80: (0f) r7 += r2 last_idx 80 first_idx 21 regs=4 stack=0 before 78: (16) if w3 == 0x11 goto pc+1 when I am using "./test_progs -vv -t assign". The reason is tc verbose mode is not enabled. This patched enabled tc verbose mode and the output looks like below Verifier analysis: 0: (bf) r6 = r1 1: (b4) w0 = 2 2: (61) r1 = *(u32 *)(r6 +80) 3: (61) r7 = *(u32 *)(r6 +76) 4: (bf) r2 = r7 5: (07) r2 += 14 6: (2d) if r2 > r1 goto pc+61 R0_w=inv2 R1_w=pkt_end(id=0,off=0,imm=0) R2_w=pkt(id=0,off=14,r=14,imm=0) ... Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200824222807.100200-1-yhs@fb.com commit f0c328f8af5d920a68f8217aec76d9a45288cef1 Author: Daniel T. Lee Date: Sun Aug 23 17:53:34 2020 +0900 samples: bpf: Refactor tracepoint tracing programs with libbpf For the problem of increasing fragmentation of the bpf loader programs, instead of using bpf_loader.o, which is used in samples/bpf, this commit refactors the existing tracepoint tracing programs with libbbpf bpf loader. - Adding a tracepoint event and attaching a bpf program to it was done through bpf_program_attach(). - Instead of using the existing BPF MAP definition, MAP definition has been refactored with the new BTF-defined MAP format. Signed-off-by: Daniel T. Lee Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200823085334.9413-4-danieltimlee@gmail.com commit 3677d0a13171bb1dc8db0af84d48dea14a899962 Author: Daniel T. Lee Date: Sun Aug 23 17:53:33 2020 +0900 samples: bpf: Refactor kprobe tracing programs with libbpf For the problem of increasing fragmentation of the bpf loader programs, instead of using bpf_loader.o, which is used in samples/bpf, this commit refactors the existing kprobe tracing programs with libbbpf bpf loader. - For kprobe events pointing to system calls, the SYSCALL() macro in trace_common.h was used. - Adding a kprobe event and attaching a bpf program to it was done through bpf_program_attach(). - Instead of using the existing BPF MAP definition, MAP definition has been refactored with the new BTF-defined MAP format. Signed-off-by: Daniel T. Lee Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200823085334.9413-3-danieltimlee@gmail.com commit 35a8b6dd339f04cbcb0b2d085334263542a12b70 Author: Daniel T. Lee Date: Sun Aug 23 17:53:32 2020 +0900 samples: bpf: Cleanup bpf_load.o from Makefile Since commit cc7f641d637b ("samples: bpf: Refactor BPF map performance test with libbpf") has ommited the removal of bpf_load.o from Makefile, this commit removes the bpf_load.o rule for targets where bpf_load.o is not used. Fixes: cc7f641d637b ("samples: bpf: Refactor BPF map performance test with libbpf") Signed-off-by: Daniel T. Lee Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200823085334.9413-2-danieltimlee@gmail.com commit 32417d7844ab0bc154c39128d9ac026f4f8a7907 Author: Alex Dewar Date: Thu Aug 20 19:14:11 2020 +0100 scsi: esas2r: Remove unnecessary casts In a number of places in esas2r_ioctl.c, the void* returned from pci_alloc_consistent() is cast unnecessarily. Remove casts. Issue identified with Coccinelle. Link: https://lore.kernel.org/r/20200820181411.866057-1-alex.dewar90@gmail.com Signed-off-by: Alex Dewar Signed-off-by: Martin K. Petersen commit 44f4daf8678ae5f08c93bbe70792f90cd88e4649 Author: Tianjia Zhang Date: Sun Aug 2 19:15:31 2020 +0800 scsi: csiostor: Fix wrong return value in csio_hw_prep_fw() On an error exit path, a negative error code should be returned instead of a positive return value. Link: https://lore.kernel.org/r/20200802111531.5065-1-tianjia.zhang@linux.alibaba.com Fixes: f40e74ffa3de ("csiostor:firmware upgrade fix") Cc: Praveen Madhavan Signed-off-by: Tianjia Zhang Signed-off-by: Martin K. Petersen commit ca4fb89a3d714a770e9c73c649da830f3f4a5326 Author: Tianjia Zhang Date: Sun Aug 2 19:15:30 2020 +0800 scsi: qla2xxx: Fix wrong return value in qla_nvme_register_hba() On an error exit path, a negative error code should be returned instead of a positive return value. Link: https://lore.kernel.org/r/20200802111530.5020-1-tianjia.zhang@linux.alibaba.com Fixes: 8777e4314d39 ("scsi: qla2xxx: Migrate NVME N2N handling into state machine") Cc: Quinn Tran Signed-off-by: Tianjia Zhang Signed-off-by: Martin K. Petersen commit bbf2d06a9d767718bfe6028d6288c03edb98554a Author: Tianjia Zhang Date: Sun Aug 2 19:15:28 2020 +0800 scsi: qla2xxx: Fix wrong return value in qlt_chk_unresolv_exchg() In the case of a failed retry, a positive value EIO is returned here. I think this is a typo error. It is necessary to return an error value. [mkp: caller checks != 0 but the rest of the file uses -Exxx so fix this up to be consistent] Link: https://lore.kernel.org/r/20200802111528.4974-1-tianjia.zhang@linux.alibaba.com Fixes: 0691094ff3f2 ("scsi: qla2xxx: Add logic to detect ABTS hang and response completion") Cc: Quinn Tran Signed-off-by: Tianjia Zhang Signed-off-by: Martin K. Petersen commit 8905cbdae986515c5a4dcd71889672235478f189 Author: Tianjia Zhang Date: Sun Aug 2 19:15:27 2020 +0800 scsi: qla2xxx: Remove redundant variable initialization The initialization value of `rc` is wrong. It is unnecessary to initialize `rc` variables, so remove its initialization operation. Link: https://lore.kernel.org/r/20200802111527.4928-1-tianjia.zhang@linux.alibaba.com Fixes: 84905dfe78d2 ("scsi: qla2xxx: Fix TMF and Multi-Queue config") Cc: Quinn Tran Signed-off-by: Tianjia Zhang Signed-off-by: Martin K. Petersen commit 715f43c66c45381ba885279ed393890a117e1b45 Author: Tong Zhang Date: Sun Aug 16 03:02:42 2020 -0400 scsi: aic7xxx: Fix error code handling ahc_linux_queue_recovery_cmd returns SUCCESS(0x2002) or FAIL(0x2003), but the caller is checking error case using != 0. Link: https://lore.kernel.org/r/20200816070242.978839-1-ztong0001@gmail.com Signed-off-by: Tong Zhang Signed-off-by: Martin K. Petersen commit a9b83986fd6e4834f99f883bbb5b7cb5186f5f5d Author: Colin Ian King Date: Mon Aug 10 11:12:38 2020 +0100 scsi: lpfc: Fix spelling mistake "Cant" -> "Can't" There is a spelling mistake in an error message. Fix it. Link: https://lore.kernel.org/r/20200810101238.61787-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 29779a22af6f8c1b08ad245615ed985087b3f602 Author: Colin Ian King Date: Mon Aug 10 10:08:43 2020 +0100 scsi: csiostor: Fix spelling mistake "couldnt" -> "couldn't" There are spelling mistakes in two comments and a csio_err error message. Fix these. Link: https://lore.kernel.org/r/20200810090843.49553-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 886a0b54f8e6c151855d522e4f0cb661bc20b0cf Author: Colin Ian King Date: Mon Aug 10 09:50:57 2020 +0100 scsi: bnx2fc: Fix spelling mistake "couldnt" -> "couldn't" There are spelling mistakes in various printk messages. Fix these. Link: https://lore.kernel.org/r/20200810085057.49039-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit cb562b132bf8bf0b8fa23844694d5adbf99e8197 Author: Colin Ian King Date: Mon Aug 10 09:07:45 2020 +0100 scsi: snic: Fix spelling mistakes of "Queueing" There are two different spelling mistakes of "Queueing" in error and debug messages. Fix these. Link: https://lore.kernel.org/r/20200810080745.47314-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 650b323c8e7c3ac4830a20895b1d444fd68dd787 Author: Christophe JAILLET Date: Sun Aug 2 13:07:21 2020 +0200 scsi: qla2xxx: Fix the size used in a 'dma_free_coherent()' call Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()'. [mkp: removed memset() hunk that has already been addressed] Link: https://lore.kernel.org/r/20200802110721.677707-1-christophe.jaillet@wanadoo.fr Fixes: 4161cee52df8 ("[SCSI] qla4xxx: Add host statistics support") Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit 574918e69720fe62ab3eb42ec3750230c8d16b06 Author: Christophe JAILLET Date: Sun Aug 2 12:15:27 2020 +0200 scsi: qla4xxx: Fix an error handling path in 'qla4xxx_get_host_stats()' Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()'. Link: https://lore.kernel.org/r/20200802101527.676054-1-christophe.jaillet@wanadoo.fr Fixes: 4161cee52df8 ("[SCSI] qla4xxx: Add host statistics support") Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit ec090ef8cd1c23008bc641a48ccfead23e46ede4 Author: Suraj Upadhyay Date: Wed Jul 29 23:44:33 2020 +0530 scsi: megaraid: Remove pci-dma-compat wrapper API The legacy API wrappers in include/linux/pci-dma-compat.h should go away as they create unnecessary midlayering for include/linux/dma-mapping.h API. Instead use dma-mapping.h API directly. The patch has been generated with the coccinelle script below. And has been hand modified to replace each GFP_ with a correct flag depending upon the context. Compile tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Link: https://lore.kernel.org/r/635cfc08b83a041708ee6afbc430087416f2605c.1596045683.git.usuraj35@gmail.com Signed-off-by: Suraj Upadhyay Signed-off-by: Martin K. Petersen commit 8d1f1ffaeb27ca81ea0dd24e238015efee7b5924 Author: Suraj Upadhyay Date: Wed Jul 29 23:42:40 2020 +0530 scsi: qla2xxx: Remove pci-dma-compat wrapper API The legacy API wrappers in include/linux/pci-dma-compat.h should go away as they create unnecessary midlayering for include/linux/dma-mapping.h API. Instead use dma-mapping.h API directly. The patch has been generated with the coccinelle script below. Compile tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Link: https://lore.kernel.org/r/24627a86cf1e67fd229bc323316523d1ba0811f9.1596045683.git.usuraj35@gmail.com Signed-off-by: Suraj Upadhyay Signed-off-by: Martin K. Petersen commit 8f31fa53d36b96a9e6a0b6940571baed459b6fc3 Author: Suraj Upadhyay Date: Wed Jul 29 23:41:18 2020 +0530 scsi: hpsa: Remove pci-dma-compat wrapper API The legacy API wrappers in include/linux/pci-dma-compat.h should go away as they create unnecessary midlayering for include/linux/dma-mapping.h API. Instead use dma-mapping.h API directly. The patch has been generated with the coccinelle script below. Compile tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Link: https://lore.kernel.org/r/37154a4efe82a58b9bad143608dd9fd37a2c94e5.1596045683.git.usuraj35@gmail.com Signed-off-by: Suraj Upadhyay Signed-off-by: Martin K. Petersen commit a5a20c4a294ed3ecfe5f22f1232ce6ad2430a7d9 Author: Suraj Upadhyay Date: Wed Jul 29 23:40:21 2020 +0530 scsi: mpt3sas: Remove pci-dma-compat wrapper API The legacy API wrappers in include/linux/pci-dma-compat.h should go away as they create unnecessary midlayering for include/linux/dma-mapping.h API. Instead use dma-mapping.h API directly. The patch has been generated with the coccinelle script below. Compile tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Link: https://lore.kernel.org/r/e825ac7108092cc8fa8d462dc702098ef10fc6a2.1596045683.git.usuraj35@gmail.com Signed-off-by: Suraj Upadhyay Signed-off-by: Martin K. Petersen commit ece0eeff4c729b556e656e83f2b06c1f6db5a164 Author: Suraj Upadhyay Date: Wed Jul 29 23:38:55 2020 +0530 scsi: dc395x: Remove pci-dma-compat wrapper API The legacy API wrappers in include/linux/pci-dma-compat.h should go away as they create unnecessary midlayering for include/linux/dma-mapping.h API. Instead use dma-mapping.h API directly. The patch has been generated with the coccinelle script below. Compile tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Link: https://lore.kernel.org/r/b8acc51ec774507050a9e9e8edf28e4933322a9e.1596045683.git.usuraj35@gmail.com Signed-off-by: Suraj Upadhyay Signed-off-by: Martin K. Petersen commit daf4b00b75769e49ed05e9ad3a812ffaf0045983 Author: Suraj Upadhyay Date: Wed Jul 29 23:37:24 2020 +0530 scsi: aic7xxx: Remove pci-dma-compat wrapper API The legacy API wrappers in include/linux/pci-dma-compat.h should go away as they create unnecessary midlayering for include/linux/dma-mapping.h API. Instead use dma-mapping.h API directly. The patch has been generated with the coccinelle script below. And has been hand modified to replace each GFP_ with the correct flag depending upon the context. Compile-tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Link: https://lore.kernel.org/r/790a8751b5c2b5393c3021b8def08e47bb1597c0.1596045683.git.usuraj35@gmail.com Signed-off-by: Suraj Upadhyay Signed-off-by: Martin K. Petersen commit e555cd5f17bed2e727215e917acfd785e3898e8c Author: Suraj Upadhyay Date: Wed Jul 29 23:36:27 2020 +0530 scsi: aacraid: Remove pci-dma-compat wrapper API The legacy API wrappers in include/linux/pci-dma-compat.h should go away as they create unnecessary midlayering for include/linux/dma-mapping.h API. Instead use dma-mapping.h API directly. The patch has been generated with the coccinelle script below. Compile-tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Link: https://lore.kernel.org/r/f8d4778440d55ba26c04eef0f7d63fb211a39443.1596045683.git.usuraj35@gmail.com Signed-off-by: Suraj Upadhyay Signed-off-by: Martin K. Petersen commit b67a91703a29b93f5b114052b0b8e0d84e717ad3 Author: Paul E. McKenney Date: Mon Aug 17 16:44:48 2020 -0700 torture: Add gdb support This commit adds a "--gdb" parameter to kvm.sh, which causes "CONFIG_DEBUG_INFO=y" to be added to the Kconfig options, "nokaslr" to be added to the boot parameters, and "-s -S" to be added to the qemu arguments. Furthermore, the scripting prints messages telling the user how to start up gdb for the run in question. Because of the interactive nature of gdb sessions, only one "--configs" scenario is permitted when "--gdb" is specified. For most torture types, this means that a "--configs" argument is required, and that argument must specify the single scenario of interest. The usual cautions about breakpoints and timing apply, for example, staring at your gdb prompt for too long will likely get you many complaints, including RCU CPU stall warnings. Omar Sandoval further suggests using gdb's "hbreak" command instead of the "break" command on systems supporting hardware breakpoints, and further using the "commands" option because the resulting non-interactive breakpoints are less likely to get you RCU CPU stall warnings. Signed-off-by: Paul E. McKenney commit d685514260e21aabd65a9aa8be045766bdaa0549 Author: Paul E. McKenney Date: Tue Aug 11 10:33:39 2020 -0700 rcutorture: Allow pointer leaks to test diagnostic code This commit adds an rcutorture.leakpointer module parameter that intentionally leaks an RCU-protected pointer out of the RCU read-side critical section and checks to see if the corresponding grace period has elapsed, emitting a WARN_ON_ONCE() if so. This module parameter can be used to test facilities like CONFIG_RCU_STRICT_GRACE_PERIOD that end grace periods quickly. While in the area, also document rcutorture.irqreader, which was previously left out. Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit 299c7d94f635ab93ffb0468aec6b6e2176ec5cbf Author: Paul E. McKenney Date: Wed Jul 22 10:45:12 2020 -0700 rcutorture: Hoist OOM registry up one level Currently, registering and unregistering the OOM notifier is done right before and after the test, respectively. This will not work well for multi-threaded tests, so this commit hoists this registering and unregistering up into the rcu_torture_fwd_prog_init() and rcu_torture_fwd_prog_cleanup() functions. Signed-off-by: Paul E. McKenney commit 58db5785b0d76be4582a32a7900acce88e691d36 Author: Colin Ian King Date: Thu Jul 16 15:38:56 2020 +0100 refperf: Avoid null pointer dereference when buf fails to allocate Currently in the unlikely event that buf fails to be allocated it is dereferenced a few times. Use the errexit flag to determine if buf should be written to to avoid the null pointer dereferences. Addresses-Coverity: ("Dereference after null check") Fixes: f518f154ecef ("refperf: Dynamically allocate experiment-summary output buffer") Signed-off-by: Colin Ian King Signed-off-by: Paul E. McKenney commit 57f602022e82ee8fa6476d0e16ddbaf3eb86b245 Author: Paul E. McKenney Date: Mon Jul 20 08:34:07 2020 -0700 rcutorture: Properly synchronize with OOM notifier The current rcutorture forward-progress code assumes that it is the only cause of out-of-memory (OOM) events. For script-based rcutorture testing, this assumption is in fact correct. However, testing based on modprobe/rmmod might well encounter external OOM events, which could happen at any time. This commit therefore properly synchronizes the interaction between rcutorture's forward-progress testing and its OOM notifier by adding a global mutex. Signed-off-by: Paul E. McKenney commit c8fa63714763b7795a3f5fb7ed6d000763e6dccc Author: Paul E. McKenney Date: Sun Jul 19 14:40:31 2020 -0700 rcutorture: Properly set rcu_fwds for OOM handling The conversion of rcu_fwds to dynamic allocation failed to actually allocate the required structure. This commit therefore allocates it, frees it, and updates rcu_fwds accordingly. While in the area, it abstracts the cleanup actions into rcu_torture_fwd_prog_cleanup(). Fixes: 5155be9994e5 ("rcutorture: Dynamically allocate rcu_fwds structure") Reported-by: kernel test robot Signed-off-by: Paul E. McKenney commit 5461808889405de254ab3370aa7f07ac0b6cb938 Author: Paul E. McKenney Date: Sun Jul 19 12:17:53 2020 -0700 torture: Add kvm.sh --help and update help message This commit adds a --help argument (along with its synonym -h) to display the help text. While in the area, this commit also updates the help text. Signed-off-by: Paul E. McKenney commit fc848cf4face352dce663c1fcc73717fba2d4557 Author: Paul E. McKenney Date: Tue Jul 14 11:02:15 2020 -0700 rcutorture: Add CONFIG_PROVE_RCU_LIST to TREE05 Currently, the CONFIG_PROVE_RCU_LIST=y case is untested. This commit therefore adds CONFIG_PROVE_RCU_LIST=y to rcutorture's TREE05 scenario. Cc: Madhuparna Bhowmik Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 33595581f53011d1f0ba64a9a2f76d6fa5528f7f Author: Paul E. McKenney Date: Mon Jul 13 14:18:33 2020 -0700 torture: Update initrd documentation The rcu-test-image.txt documentation covers a very uncommon case where a real userspace environment is required. However, someone reading this document might reasonably conclude that this is in fact a prerequisite. In addition, the initrd.txt file mentions dracut, which is no longer used. This commit therefore provides the needed updates. Signed-off-by: Paul E. McKenney commit afcdf2319d11e0d68e45babd5df65f79771074b5 Author: Alexander A. Klimov Date: Mon Jul 13 21:37:06 2020 +0200 rcutorture: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Paul E. McKenney commit d49bed9abc3454bd123cbe974ecbeae119701b92 Author: Wei Yongjun Date: Fri Jul 3 13:05:27 2020 +0800 locktorture: Make function torture_percpu_rwsem_init() static The sparse tool complains as follows: kernel/locking/locktorture.c:569:6: warning: symbol 'torture_percpu_rwsem_init' was not declared. Should it be static? And this function is not used outside of locktorture.c, so this commit marks it static. Signed-off-by: Wei Yongjun Signed-off-by: Paul E. McKenney commit fbb9f8531a0d6693189783d295114db4c30624ca Author: Paul Gortmaker Date: Thu Jul 2 15:59:05 2020 -0700 torture: document --allcpus argument added to the kvm.sh script Signed-off-by: Paul Gortmaker Signed-off-by: Paul E. McKenney commit 959954df0ca7da2111c3fb67a666681798d15b9d Author: Joel Fernandes (Google) Date: Thu Jun 18 16:29:55 2020 -0400 rcutorture: Output number of elapsed grace periods This commit adds code to print the grace-period number at the start of the test along with both the grace-period number and the number of elapsed grace periods at the end of the test. Note that variants of RCU)without the notion of a grace-period number (for example, Tiny RCU) just print zeroes. [ paulmck: Adjust commit log. ] Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 83224afd11d71e0d6effb86fe1ab5725d5415251 Author: Paul E. McKenney Date: Wed Jun 17 13:22:17 2020 -0700 rcutorture: Remove KCSAN stubs KCSAN is now in mainline, so this commit removes the stubs for the data_race(), ASSERT_EXCLUSIVE_WRITER(), and ASSERT_EXCLUSIVE_ACCESS() macros. Signed-off-by: Paul E. McKenney commit cfeac3977ab4b6222a01f79997739d2367a8cc94 Author: Paul E. McKenney Date: Thu Aug 20 11:26:14 2020 -0700 rcu: Remove unused "cpu" parameter from rcu_report_qs_rdp() The "cpu" parameter to rcu_report_qs_rdp() is not used, with rdp->cpu being used instead. Furtheremore, every call to rcu_report_qs_rdp() invokes it on rdp->cpu. This commit therefore removes this unused "cpu" parameter and converts a check of rdp->cpu against smp_processor_id() to a WARN_ON_ONCE(). Reported-by: Jann Horn Signed-off-by: Paul E. McKenney commit aa40c138cc8f36e2f5c721fd1bdb823a1ef1a237 Author: Paul E. McKenney Date: Mon Aug 10 09:58:03 2020 -0700 rcu: Report QS for outermost PREEMPT=n rcu_read_unlock() for strict GPs The CONFIG_PREEMPT=n instance of rcu_read_unlock is even more aggressively than that of CONFIG_PREEMPT=y in deferring reporting quiescent states to the RCU core. This is just what is wanted in normal use because it reduces overhead, but the resulting delay is not what is wanted for kernels built with CONFIG_RCU_STRICT_GRACE_PERIOD=y. This commit therefore adds an rcu_read_unlock_strict() function that checks for exceptional conditions, and reports the newly started quiescent state if it is safe to do so, also doing a spin-delay if requested via rcutree.rcu_unlock_delay. This commit also adds a call to rcu_read_unlock_strict() from the CONFIG_PREEMPT=n instance of __rcu_read_unlock(). [ paulmck: Fixed bug located by kernel test robot ] Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit a657f2617010ae237db5693f875968c28e8f732f Author: Paul E. McKenney Date: Sat Aug 8 07:56:31 2020 -0700 rcu: Execute RCU reader shortly after rcu_core for strict GPs A kernel built with CONFIG_RCU_STRICT_GRACE_PERIOD=y needs a quiescent state to appear very shortly after a CPU has noticed a new grace period. Placing an RCU reader immediately after this point is ineffective because this normally happens in softirq context, which acts as a big RCU reader. This commit therefore introduces a new per-CPU work_struct, which is used at the end of rcu_core() processing to schedule an RCU read-side critical section from within a clean environment. Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit 3d29aaf1ef992b5b4612fe32b9e6f517f7bba904 Author: Paul E. McKenney Date: Fri Aug 7 13:44:10 2020 -0700 rcu: Provide optional RCU-reader exit delay for strict GPs The goal of this series is to increase the probability of tools like KASAN detecting that an RCU-protected pointer was used outside of its RCU read-side critical section. Thus far, the approach has been to make grace periods and callback processing happen faster. Another approach is to delay the pointer leaker. This commit therefore allows a delay to be applied to exit from RCU read-side critical sections. This slowdown is specified by a new rcutree.rcu_unlock_delay kernel boot parameter that specifies this delay in microseconds, defaulting to zero. Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit 4e025f52a1e0e8ff4e303fa0a80e2061ccfa27d6 Author: Paul E. McKenney Date: Thu Aug 6 19:42:47 2020 -0700 rcu: IPI all CPUs at GP end for strict GPs Currently, each CPU discovers the end of a given grace period on its own time, which is again good for efficiency but bad for fast grace periods, given that it is things like kfree() within the RCU callbacks that will cause trouble for pointers leaked from RCU read-side critical sections. This commit therefore uses on_each_cpu() to IPI each CPU after grace-period cleanup in order to inform each CPU of the end of the old grace period in a timely manner, but only in kernels build with CONFIG_RCU_STRICT_GRACE_PERIOD=y. Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit 933ada2c3310aa88807e65c8d498b74a2159a9a2 Author: Paul E. McKenney Date: Thu Aug 6 19:21:48 2020 -0700 rcu: IPI all CPUs at GP start for strict GPs Currently, each CPU discovers the beginning of a given grace period on its own time, which is again good for efficiency but bad for fast grace periods. This commit therefore uses on_each_cpu() to IPI each CPU after grace-period initialization in order to inform each CPU of the new grace period in a timely manner, but only in kernels build with CONFIG_RCU_STRICT_GRACE_PERIOD=y. Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit 1a2f5d57a33f7b9189b6b3e997eb858301482d79 Author: Paul E. McKenney Date: Thu Aug 6 16:35:08 2020 -0700 rcu: Attempt QS when CPU discovers GP for strict GPs A given CPU normally notes a new grace period during one RCU_SOFTIRQ, but avoids reporting the corresponding quiescent state until some later RCU_SOFTIRQ. This leisurly approach improves efficiency by increasing the number of update requests served by each grace period, but is not what is needed for kernels built with CONFIG_RCU_STRICT_GRACE_PERIOD=y. This commit therefore adds a new rcu_strict_gp_check_qs() function which, in CONFIG_RCU_STRICT_GRACE_PERIOD=y kernels, simply enters and immediately exist an RCU read-side critical section. If the CPU is in a quiescent state, the rcu_read_unlock() will attempt to report an immediate quiescent state. This rcu_strict_gp_check_qs() function is invoked from note_gp_changes(), so that a CPU just noticing a new grace period might immediately report a quiescent state for that grace period. Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit 44bad5b3cca2d452d17ef82841b20b42a2cf11a0 Author: Paul E. McKenney Date: Thu Aug 6 15:12:50 2020 -0700 rcu: Do full report for .need_qs for strict GPs The rcu_preempt_deferred_qs_irqrestore() function is invoked at the end of an RCU read-side critical section (for example, directly from rcu_read_unlock()) and, if .need_qs is set, invokes rcu_qs() to report the new quiescent state. This works, except that rcu_qs() only updates per-CPU state, leaving reporting of the actual quiescent state to a later call to rcu_report_qs_rdp(), for example from within a later RCU_SOFTIRQ instance. Although this approach is exactly what you want if you are more concerned about efficiency than about short grace periods, in CONFIG_RCU_STRICT_GRACE_PERIOD=y kernels, short grace periods are the name of the game. This commit therefore makes rcu_preempt_deferred_qs_irqrestore() directly invoke rcu_report_qs_rdp() in CONFIG_RCU_STRICT_GRACE_PERIOD=y, thus shortening grace periods. Historical note: To the best of my knowledge, causing rcu_read_unlock() to directly report a quiescent state first appeared in Jim Houston's and Joe Korty's JRCU. This is the second instance of a Linux-kernel RCU feature being inspired by JRCU, the first being RCU callback offloading (as in the RCU_NOCB_CPU Kconfig option). Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit f19920e412fdeed1e15691bcee5b40e18b8e96ff Author: Paul E. McKenney Date: Thu Aug 6 09:40:18 2020 -0700 rcu: Always set .need_qs from __rcu_read_lock() for strict GPs The ->rcu_read_unlock_special.b.need_qs field in the task_struct structure indicates that the RCU core needs a quiscent state from the corresponding task. The __rcu_read_unlock() function checks this (via an eventual call to rcu_preempt_deferred_qs_irqrestore()), and if set reports a quiscent state immediately upon exit from the outermost RCU read-side critical section. Currently, this flag is only set when the scheduling-clock interrupt decides that the current RCU grace period is too old, as in about one full second too old. But if the kernel has been built with CONFIG_RCU_STRICT_GRACE_PERIOD=y, we clearly do not want to wait that long. This commit therefore sets the .need_qs field immediately at the start of the RCU read-side critical section from within __rcu_read_lock() in order to unconditionally enlist help from __rcu_read_unlock(). But note the additional check for rcu_state.gp_kthread, which prevents attempts to awaken RCU's grace-period kthread during early boot before there is a scheduler. Leaving off this check results in early boot hangs. So early that there is no console output. Thus, this additional check fails until such time as RCU's grace-period kthread has been created, avoiding these empty-console hangs. Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit 29fc5f93320cb447f83baedfe103ed784cadb073 Author: Paul E. McKenney Date: Thu Aug 6 06:39:30 2020 -0700 rcu: Force DEFAULT_RCU_BLIMIT to 1000 for strict RCU GPs The value of DEFAULT_RCU_BLIMIT is normally set to 10, the idea being to avoid needless response-time degradation due to RCU callback invocation. However, when CONFIG_RCU_STRICT_GRACE_PERIOD=y it is better to avoid throttling callback execution in order to better detect pointer leaks from RCU read-side critical sections. This commit therefore sets the value of DEFAULT_RCU_BLIMIT to 1000 in kernels built with CONFIG_RCU_STRICT_GRACE_PERIOD=y. Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit aecd34b9765de3b58c98a1d75b982fc64becd1e9 Author: Paul E. McKenney Date: Wed Aug 5 17:25:23 2020 -0700 rcu: Restrict default jiffies_till_first_fqs for strict RCU GPs If there are idle CPUs, RCU's grace-period kthread will wait several jiffies before even thinking about polling them. This promotes efficiency, which is normally a good thing, but when the kernel has been built with CONFIG_RCU_STRICT_GRACE_PERIOD=y, we care more about short grace periods. This commit therefore restricts the default jiffies_till_first_fqs value to zero in kernels built with CONFIG_RCU_STRICT_GRACE_PERIOD=y, which causes RCU's grace-period kthread to poll for idle CPUs immediately after starting a grace period. Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit dc1269186bed3afc5a2018527516be84fe55d3e0 Author: Paul E. McKenney Date: Wed Aug 5 16:52:17 2020 -0700 rcu: Reduce leaf fanout for strict RCU grace periods Because strict RCU grace periods will complete more quickly, they will experience greater lock contention on each leaf rcu_node structure's ->lock. This commit therefore reduces the leaf fanout in order to reduce this lock contention. Note that this also has the effect of reducing the number of CPUs supported to 16 in the case of CONFIG_RCU_FANOUT_LEAF=2 or 81 in the case of CONFIG_RCU_FANOUT_LEAF=3. However, greater numbers of CPUs are probably a bad idea when using CONFIG_RCU_STRICT_GRACE_PERIOD=y. Those wishing to live dangerously are free to edit their kernel/rcu/Kconfig files accordingly. Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit 8cbd0e38a9f2de38e8991c5c1c6f9024b2731d17 Author: Paul E. McKenney Date: Wed Aug 5 15:51:20 2020 -0700 rcu: Add Kconfig option for strict RCU grace periods People running automated tests have asked for a way to make RCU minimize grace-period duration in order to increase the probability of KASAN detecting a pointer being improperly leaked from an RCU read-side critical section, for example, like this: rcu_read_lock(); p = rcu_dereference(gp); do_something_with(p); // OK rcu_read_unlock(); do_something_else_with(p); // BUG!!! The rcupdate.rcu_expedited boot parameter is a start in this direction, given that it makes calls to synchronize_rcu() instead invoke the faster (and more wasteful) synchronize_rcu_expedited(). However, this does nothing to shorten RCU grace periods that are instead initiated by call_rcu(), and RCU pointer-leak bugs can involve call_rcu() just as surely as they can synchronize_rcu(). This commit therefore adds a RCU_STRICT_GRACE_PERIOD Kconfig option that will be used to shorten normal (non-expedited) RCU grace periods. This commit also dumps out a message when this option is in effect. Later commits will actually shorten grace periods. Reported-by Jann Horn Signed-off-by: Paul E. McKenney commit 4e88ec4a9eb17527e640b063f79e5b875733eb53 Author: Paul E. McKenney Date: Tue Aug 11 21:18:12 2020 -0700 rcuperf: Change rcuperf to rcuscale This commit further avoids conflation of rcuperf with the kernel's perf feature by renaming kernel/rcu/rcuperf.c to kernel/rcu/rcuscale.c, and also by similarly renaming the functions and variables inside this file. This has the side effect of changing the names of the kernel boot parameters, so kernel-parameters.txt and ver_functions.sh are also updated. The rcutorture --torture type was also updated from rcuperf to rcuscale. [ paulmck: Fix bugs located by Stephen Rothwell. ] Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney commit 65bd77f554336407f5fd7ced7a6df686767fba21 Author: Paul E. McKenney Date: Thu Jul 23 15:53:02 2020 -0700 scftorture: Add cond_resched() to test loop Although the test loop does randomly delay, which would provide quiescent states and so forth, it is possible for there to be a series of long smp_call_function*() handler runtimes with no delays, which results in softlockup and RCU CPU stall warning messages. This commit therefore inserts a cond_resched() into the main test loop. Signed-off-by: Paul E. McKenney commit 9e66bf03f9c538863e614a72c5799bcd9579630e Author: Paul E. McKenney Date: Fri Jul 3 15:23:19 2020 -0700 scftorture: Adapt memory-ordering test to UP operation On uniprocessor systems, smp_call_function() does nothing. This commit therefore avoids complaining about the lack of handler accesses in the single-CPU case where there is no handler. Signed-off-by: Paul E. McKenney commit a7c072ef26644b632241d549869f10f8d2dd3b5c Author: Paul E. McKenney Date: Thu Jul 2 14:15:33 2020 -0700 scftorture: Block scftorture_invoker() kthreads for offline CPUs Currently, CPU-hotplug operations might result in all but two of (say) 100 CPUs being offline, which in turn might result in false-positive diagnostics due to overload. This commit therefore causes scftorture_invoker() kthreads for offline CPUs to loop blocking for 200 milliseconds at a time, thus continuously adjusting the number of threads to match the number of online CPUs. Signed-off-by: Paul E. McKenney commit de77d4da54d10df97d265e7e99112bfc2fef7d4a Author: Paul E. McKenney Date: Thu Jul 2 12:15:37 2020 -0700 scftorture: Check unexpected "switch" statement value This commit adds a "default" case to the switch statement in scftorture_invoke_one() which contains a WARN_ON_ONCE() and an assignment to ->scfc_out to suppress knock-on warnings. These knock-on warnings could otherwise cause the user to think that there was a memory-ordering problem in smp_call_function() instead of a bug in scftorture.c itself. Signed-off-by: Paul E. McKenney commit 9a52a574676f8d4aa55f69319231ce6c343b00bb Author: Wei Yongjun Date: Thu Jul 2 09:56:50 2020 -0700 scftorture: Make symbol 'scf_torture_rand' static The sparse tool complains as follows kernel/scftorture.c:124:1: warning: symbol '__pcpu_scope_scf_torture_rand' was not declared. Should it be static? And this per-CPU variable is not used outside of scftorture.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Paul E. McKenney commit ee7035d29576dcb59b1191e5f609517cacab1e56 Author: Paul E. McKenney Date: Wed Jul 1 16:38:16 2020 -0700 scftorture: Prevent compiler from reducing race probabilities Detecting smp_call_function() memory misordering requires close timing, so it is necessary to have the checks immediately before and after the call to the smp_call_function*() function under test. This commit therefore inserts barrier() calls to prevent the compiler from optimizing memory-misordering detection down into the zone of extreme improbability. Signed-off-by: Paul E. McKenney commit dbf83b655a7853bc430af10e9a3e7eb1f4c90f86 Author: Paul E. McKenney Date: Wed Jul 1 16:06:22 2020 -0700 scftorture: Flag errors in torture-compatible manner This commit prints error counts on the statistics line and also adds a "!!!" if any of the counters are non-zero. Allocation failures are (somewhat) forgiven, but all other errors result in a "FAILURE" print at the end of the test. Signed-off-by: Paul E. McKenney commit 4df55bddc1a360e94c86e227fe417ac9422cb615 Author: Paul E. McKenney Date: Thu Jul 9 13:58:32 2020 -0700 scftorture: Consolidate scftorture_invoke_one() scf_check initialization This commit hoists much of the initialization of the scf_check structure out of the switch statement, thus saving a few lines of code. The initialization of the ->scfc_in field remains in each leg of the switch statement in order to more heavily stress memory ordering. Signed-off-by: Paul E. McKenney commit 676e5469643e716df7f39ef77ba8f09c85b0c4f8 Author: Paul E. McKenney Date: Wed Jul 1 14:13:02 2020 -0700 scftorture: Consolidate scftorture_invoke_one() check and kfree() This commit moves checking of the ->scfc_out field and the freeing of the scf_check structure down below the end of switch statement, thus saving a few lines of code. Signed-off-by: Paul E. McKenney commit 34e8c4837adb579962e528a4f7dd1f75cb120be4 Author: Paul E. McKenney Date: Wed Jul 1 13:49:06 2020 -0700 scftorture: Add smp_call_function() memory-ordering checks This commit adds checks for memory misordering across calls to and returns from smp_call_function() in the case where the caller waits. Misordering results in a splat. Note that in contrast to smp_call_function_single(), this code does not test memory ordering into the handler in the no-wait case because none of the handlers would be able to free the scf_check structure without introducing heavy synchronization to work out which was last. [ paulmck: s/GFP_KERNEL/GFP_ATOMIC/ per kernel test robot feedback. ] Signed-off-by: Paul E. McKenney commit 980205ee8489d53c4380f7762debac87312b0fb3 Author: Paul E. McKenney Date: Wed Jul 1 12:30:02 2020 -0700 scftorture: Add smp_call_function_many() memory-ordering checks This commit adds checks for memory misordering across calls to and returns from smp_call_function_many() in the case where the caller waits. Misordering results in a splat. Note that in contrast to smp_call_function_single(), this code does not test memory ordering into the handler in the no-wait case because none of the handlers would be able to free the scf_check structure without introducing heavy synchronization to work out which was last. [ paulmck: s/GFP_KERNEL/GFP_ATOMIC/ per kernel test robot feedback. ] Signed-off-by: Paul E. McKenney commit b93e21a51e1c8ed3816da888d34f88193ad1b917 Author: Paul E. McKenney Date: Tue Jun 30 20:49:50 2020 -0700 scftorture: Add smp_call_function_single() memory-ordering checks This commit adds checks for memory misordering across calls to smp_call_function_single() and also across returns in the case where the caller waits. Misordering results in a splat. [ paulmck: s/GFP_KERNEL/GFP_ATOMIC/ per kernel test robot feedback. ] Signed-off-by: Paul E. McKenney commit dba3142b37f343734bf61dbce2914acb76e69fb6 Author: Paul E. McKenney Date: Tue Jun 30 16:13:37 2020 -0700 scftorture: Summarize per-thread statistics This commit summarizes the per-thread statistics, providing counts of the number of single, many, and all calls, both no-wait and wait, and, for the single case, the number where the target CPU was offline. Signed-off-by: Paul E. McKenney commit bca37119c57bdc2c68c84b313a5118005e8693cf Author: Paul E. McKenney Date: Fri Jun 26 13:39:41 2020 -0700 tick-sched: Clarify "NOHZ: local_softirq_pending" warning Currently, can_stop_idle_tick() prints "NOHZ: local_softirq_pending HH" (where "HH" is the hexadecimal softirq vector number) when one or more non-RCU softirq handlers are still enabled when checking to stop the scheduler-tick interrupt. This message is not as enlightening as one might hope, so this commit changes it to "NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #HH". Reported-by: Andy Lutomirski Cc: Frederic Weisbecker Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Paul E. McKenney commit 5022b8ac608f8b80b042a8041fe2738c4b9ea8cf Author: Paul E. McKenney Date: Thu Jun 25 17:05:58 2020 -0700 scftorture: Implement weighted primitive selection This commit uses the scftorture.weight* kernel parameters to randomly chooses between smp_call_function_single(), smp_call_function_many(), and smp_call_function(). For each variant, it also randomly chooses whether to invoke it synchronously (wait=1) or asynchronously (wait=0). The percentage weighting for each option are dumped to the console log (search for "scf_sel_dump"). This accumulates statistics, which a later commit will dump out at the end of the run. Signed-off-by: Paul E. McKenney commit 80c9476e683ec37ba45fd8e6a5c5081bea207e1a Author: Paul E. McKenney Date: Wed Jun 24 17:57:07 2020 -0700 torture: Add scftorture to the rcutorture scripting This commit updates the rcutorture scripting to include the new scftorture torture-test module. Signed-off-by: Paul E. McKenney commit 687d4775db56d24c81b4704056186d6c506de30d Author: Paul E. McKenney Date: Tue Jun 30 13:37:22 2020 -0700 torture: Declare parse-console.sh independence from rcutorture Currently, parse-torture.sh looks at the fifth field of torture-test console output for the version number. This works fine for rcutorture, but not for scftorture, which lacks the pointer field. This commit therefore adjusts matching lines so that the parse-console.sh awk script always sees the version number as the first field in the lines passed to it. Signed-off-by: Paul E. McKenney commit e9d338a0b1799c988b678e8ccb66a442272e6aa3 Author: Paul E. McKenney Date: Wed Jun 24 15:59:59 2020 -0700 scftorture: Add smp_call_function() torture test This commit adds an smp_call_function() torture test that repeatedly invokes this function and complains if things go badly awry. Signed-off-by: Paul E. McKenney commit 7f2a53c231fe5d9522c3b695ab454203904031ac Author: Paul E. McKenney Date: Mon Aug 17 10:37:22 2020 -0700 rcu: Remove unused __rcu_is_watching() function The x86/entry work removed all uses of __rcu_is_watching(), therefore this commit removes it entirely. Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Signed-off-by: Paul E. McKenney commit 666ca2907e6b75960ce2f0fe50afc5d8a46f296d Author: Joel Fernandes (Google) Date: Fri Aug 7 13:07:20 2020 -0400 rcu: Make FQS more aggressive in complaining about offline CPUs The RCU grace-period kthread's force-quiescent state (FQS) loop should never see an offline CPU that has not yet reported a quiescent state. After all, the offline CPU should have reported a quiescent state during the CPU-offline process, or, failing that, by rcu_gp_init() if it ran concurrently with either the CPU going offline or the last task on a leaf rcu_node structure exiting its RCU read-side critical section while all CPUs corresponding to that structure are offline. The FQS loop should therefore complain if it does see an offline CPU that has not yet reported a quiescent state. And it does, but only once the grace period has been in force for a full second. This commit therefore makes this warning more aggressive, so that it will trigger as soon as the condition makes its appearance. Light testing with TREE03 and hotplug shows no warnings. This commit also converts the warning to WARN_ON_ONCE() in order to stave off possible log spam. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit f37599e6f06da47e49c3408afe66c5b6e83a90bd Author: Joel Fernandes (Google) Date: Fri Aug 7 13:07:19 2020 -0400 rcu: Clarify comments about FQS loop reporting quiescent states Since at least v4.19, the FQS loop no longer reports quiescent states for offline CPUs except in emergency situations. This commit therefore fixes the comment in rcu_gp_init() to match the current code. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 4569c5ee95d5695bfd794ae968c2d59b3e69129a Author: Paul E. McKenney Date: Wed Aug 5 10:35:16 2020 -0700 rcu/nocb: Add a warning for non-GP kthread running GP code This commit increases RCU's ability to defend itself by emitting a warning if one of the nocb CB kthreads invokes the GP kthread's wait function. This warning augments a similar check that is carried out at the end of rcutorture testing and when RCU CPU stall warnings are emitted. The problem with those checks is that the miscreants have long since departed and disposed of any and all evidence. Signed-off-by: Paul E. McKenney commit c0f97f20e5d97a1358ade650fcf6a322c0c9bc72 Author: Paul E. McKenney Date: Fri Jul 24 20:22:05 2020 -0700 rcu: Move rcu_cpu_started per-CPU variable to rcu_data When the rcu_cpu_started per-CPU variable was added by commit f64c6013a202 ("rcu/x86: Provide early rcu_cpu_starting() callback"), there were multiple sets of per-CPU rcu_data structures. Therefore, the rcu_cpu_started flag was added as a separate per-CPU variable. But now there is only one set of per-CPU rcu_data structures, so this commit moves rcu_cpu_started to a new ->cpu_started field in that structure. Signed-off-by: Paul E. McKenney commit df9a30fd1f70a757df193acd7396622eee23e527 Author: Madhuparna Bhowmik Date: Sun Jul 12 18:40:03 2020 +0530 kvm: mmu: page_track: Fix RCU list API usage Use hlist_for_each_entry_srcu() instead of hlist_for_each_entry_rcu() as it also checkes if the right lock is held. Using hlist_for_each_entry_rcu() with a condition argument will not report the cases where a SRCU protected list is traversed using rcu_read_lock(). Hence, use hlist_for_each_entry_srcu(). Signed-off-by: Madhuparna Bhowmik Signed-off-by: Paul E. McKenney Acked-by: Paolo Bonzini Cc: commit ae2212a7216b674633bdc3bd2e24947a0665efb8 Author: Madhuparna Bhowmik Date: Sun Jul 12 18:40:02 2020 +0530 rculist: Introduce list/hlist_for_each_entry_srcu() macros list/hlist_for_each_entry_rcu() provides an optional cond argument to specify the lock held in the updater side. However for SRCU read side, not providing the cond argument results into false positive as whether srcu_read_lock is held or not is not checked implicitly. Therefore, on read side the lockdep expression srcu_read_lock_held(srcu struct) can solve this issue. However, the function still fails to check the cases where srcu protected list is traversed with rcu_read_lock() instead of srcu_read_lock(). Therefore, to remove the false negative, this patch introduces two new list traversal primitives : list_for_each_entry_srcu() and hlist_for_each_entry_srcu(). Both of the functions have non-optional cond argument as it is required for both read and update side, and simply checks if the cond is true. For regular read side the lockdep expression srcu_read_lock_head() can be passed as the cond argument to list/hlist_for_each_entry_srcu(). Suggested-by: Paolo Bonzini Tested-by: Suraj Upadhyay Tested-by: Naresh Kamboju [ paulmck: Add "true" per kbuild test robot feedback. ] Signed-off-by: Madhuparna Bhowmik Signed-off-by: Paul E. McKenney commit 000601bb62330f18dc8f5d2d0b82e9aec3e207c4 Author: Tobias Klauser Date: Thu Jul 9 15:05:59 2020 +0200 rcu: Fix kerneldoc comments in rcupdate.h This commit fixes the kerneldoc comments for rcu_read_unlock_bh(), rcu_read_unlock_sched() and rcu_head_after_call_rcu() so they e.g. get properly linked in the API documentation. Also add parenthesis after function names to match the notation used in other kerneldoc comments in the same file. Signed-off-by: Tobias Klauser Signed-off-by: Paul E. McKenney commit 1ef5a442a113d140580b3b8bbd6f50c9f7746397 Author: Paul E. McKenney Date: Tue Jun 23 20:57:59 2020 -0700 rcu: Add READ_ONCE() to rcu_do_batch() access to rcu_cpu_stall_ftrace_dump Given that sysfs can change the value of rcu_cpu_stall_ftrace_dump at any time, this commit adds a READ_ONCE() to the accesses to that variable. Signed-off-by: Paul E. McKenney commit fe63b723cc7ca3a91ea91274e0f2cba29452b3fa Author: Paul E. McKenney Date: Tue Jun 23 18:04:45 2020 -0700 rcu: Add READ_ONCE() to rcu_do_batch() access to rcu_kick_kthreads Given that sysfs can change the value of rcu_kick_kthreads at any time, this commit adds a READ_ONCE() to the sole access to that variable. Signed-off-by: Paul E. McKenney commit a2b354b9950bb859d8d959f951dda26725b041fb Author: Paul E. McKenney Date: Tue Jun 23 17:49:40 2020 -0700 rcu: Add READ_ONCE() to rcu_do_batch() access to rcu_resched_ns Given that sysfs can change the value of rcu_resched_ns at any time, this commit adds a READ_ONCE() to the sole access to that variable. While in the area, this commit also adds bounds checking, clamping the value to at least a millisecond, but no longer than a second. Signed-off-by: Paul E. McKenney commit b5374b2df0ac1c78895b8eb8d9582a7bdc67257d Author: Paul E. McKenney Date: Tue Jun 23 17:09:27 2020 -0700 rcu: Add READ_ONCE() to rcu_do_batch() access to rcu_divisor Given that sysfs can change the value of rcu_divisor at any time, this commit adds a READ_ONCE to the sole access to that variable. While in the area, this commit also adds bounds checking, clamping the value to a shift that makes sense for a signed long. Signed-off-by: Paul E. McKenney commit 2130c6b4f610ea65e9df71dfa79ee08f2fc17743 Author: Paul E. McKenney Date: Mon Jun 22 16:46:43 2020 -0700 nocb: Remove show_rcu_nocb_state() false positive printout The rcu_data structure's ->nocb_timer field is used to defer wakeups of the corresponding no-CBs CPU's grace-period kthread ("rcuog*"), and that structure's ->nocb_defer_wakeup field is used to track such deferral. This means that the show_rcu_nocb_state() printing an error when those fields are set for a CPU not corresponding to a no-CBs grace-period kthread is erroneous. This commit therefore switches the check from ->nocb_timer to ->nocb_bypass_timer and removes the check of ->nocb_defer_wakeup. Signed-off-by: Paul E. McKenney commit 9b1ce0acb5e65e9ea1e6b322562d072f9f7d1f6e Author: Neeraj Upadhyay Date: Mon Jun 22 23:37:03 2020 +0530 rcu/tree: Remove CONFIG_PREMPT_RCU check in force_qs_rnp() Originally, the call to rcu_preempt_blocked_readers_cgp() from force_qs_rnp() had to be conditioned on CONFIG_PREEMPT_RCU=y, as in commit a77da14ce9af ("rcu: Yet another fix for preemption and CPU hotplug"). However, there is now a CONFIG_PREEMPT_RCU=n definition of rcu_preempt_blocked_readers_cgp() that unconditionally returns zero, so invoking it is now safe. In addition, the CONFIG_PREEMPT_RCU=n definition of rcu_initiate_boost() simply releases the rcu_node structure's ->lock, which is what happens when the "if" condition evaluates to false. This commit therefore drops the IS_ENABLED(CONFIG_PREEMPT_RCU) check, so that rcu_initiate_boost() is called only in CONFIG_PREEMPT_RCU=y kernels when there are readers blocking the current grace period. This does not change the behavior, but reduces code-reader confusion by eliminating non-CONFIG_PREEMPT_RCU=y calls to rcu_initiate_boost(). Signed-off-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney commit 9c39245382de4d52a122641952900709d4a9950b Author: Neeraj Upadhyay Date: Mon Jun 22 00:07:27 2020 +0530 rcu/tree: Force quiescent state on callback overload On callback overload, it is necessary to quickly detect idle CPUs, and rcu_gp_fqs_check_wake() checks for this condition. Unfortunately, the code following the call to this function does not repeat this check, which means that in reality no actual quiescent-state forcing, instead only a couple of quick and pointless wakeups at the beginning of the grace period. This commit therefore adds a check for the RCU_GP_FLAG_OVLD flag in the post-wakeup "if" statement in rcu_gp_fqs_loop(). Fixes: 1fca4d12f4637 ("rcu: Expedite first two FQS scans under callback-overload conditions") Reviewed-by: Joel Fernandes (Google) Signed-off-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney commit e082c7b38185af0f59e55efff840939c35391f85 Author: Paul E. McKenney Date: Mon Jun 22 09:25:34 2020 -0700 nocb: Clarify RCU nocb CPU error message A message of the form "rcu: !!! lDTs ." can be tracked down, but doing so is not trivial. This commit therefore eases this process by adding text so that this error message now reads as follows: "rcu: nocb GP activity on CB-only CPU!!! lDTs ." Signed-off-by: Paul E. McKenney commit a7886e899fd8334a03d37e66ad10295d175725ea Author: Joel Fernandes (Google) Date: Thu Jun 18 21:36:40 2020 -0400 rcu/trace: Use gp_seq_req in acceleration's rcu_grace_period tracepoint During acceleration of CB, the rsp's gp_seq is rcu_seq_snap'd. This is the value used for acceleration - it is the value of gp_seq at which it is safe the execute all callbacks in the callback list. The rdp's gp_seq is not very useful for this scenario. Make rcu_grace_period report the gp_seq_req instead as it allows one to reason about how the acceleration works. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit c30068f41a0e899f870e0158a2c69c68d738bf96 Author: Joel Fernandes (Google) Date: Thu Jun 18 21:36:39 2020 -0400 rcu/trace: Print negative GP numbers correctly GP numbers start from -300 and gp_seq numbers start of -1200 (for a shift of 2). These negative numbers are printed as unsigned long which not only takes up more text space, but is rather confusing to the reader as they have to constantly expend energy to truncate the number. Just print the negative numbering directly. Cc: Uladzislau Rezki (Sony) Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 7487ea07dfa9bd782a13469cab18973ea0ab8c57 Author: Paul E. McKenney Date: Thu Jun 18 09:51:12 2020 -0700 rcu: Initialize at declaration time in rcu_exp_handler() This commit moves the initialization of the CONFIG_PREEMPT=n version of the rcu_exp_handler() function's rdp and rnp local variables into their respective declarations to save a couple lines of code. Signed-off-by: Paul E. McKenney commit d9b60741318f6f8bcb2adc4beaef724c923fcb93 Author: Paul E. McKenney Date: Wed Jun 17 13:24:04 2020 -0700 srcu: Remove KCSAN stubs KCSAN is now in mainline, so this commit removes the stubs for the data_race(), ASSERT_EXCLUSIVE_WRITER(), and ASSERT_EXCLUSIVE_ACCESS() macros. Signed-off-by: Paul E. McKenney commit beb27bd649a08655b6e15b71265fccad9c00bd2c Author: Paul E. McKenney Date: Wed Jun 17 13:26:20 2020 -0700 rcu: Remove KCSAN stubs from update.c KCSAN is now in mainline, so this commit removes the stubs for the data_race(), ASSERT_EXCLUSIVE_WRITER(), and ASSERT_EXCLUSIVE_ACCESS() macros. Signed-off-by: Paul E. McKenney commit ebc3505d507cf0aafdc31e4b2359c9b22b3927c8 Author: Paul E. McKenney Date: Wed Jun 17 13:25:26 2020 -0700 rcu: Remove KCSAN stubs KCSAN is now in mainline, so this commit removes the stubs for the data_race(), ASSERT_EXCLUSIVE_WRITER(), and ASSERT_EXCLUSIVE_ACCESS() macros. Signed-off-by: Paul E. McKenney commit 6779d0e6b0fe193ab3010ea201782ca6f75a3862 Author: Fabio Estevam Date: Mon Aug 24 11:09:53 2020 -0300 crypto: arm/curve25519 - include Building ARM allmodconfig leads to the following warnings: arch/arm/crypto/curve25519-glue.c:73:12: error: implicit declaration of function 'sg_copy_to_buffer' [-Werror=implicit-function-declaration] arch/arm/crypto/curve25519-glue.c:74:9: error: implicit declaration of function 'sg_nents_for_len' [-Werror=implicit-function-declaration] arch/arm/crypto/curve25519-glue.c:88:11: error: implicit declaration of function 'sg_copy_from_buffer' [-Werror=implicit-function-declaration] Include to fix such warnings Reported-by: Olof's autobuilder Fixes: 0c3dc787a62a ("crypto: algapi - Remove skbuff.h inclusion") Signed-off-by: Fabio Estevam Acked-by: Ard Biesheuvel Acked-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit 3033fd177bcc3e0762b43cb82cf584dbb07064f1 Author: Herbert Xu Date: Fri Aug 21 22:42:10 2020 +1000 crypto: stm32 - Add missing header inclusions The stm32 driver was missing a number of includes that we being pulled in by unrelated header files. As the indirect inclusion went away, it now fails to build. This patch adds the missing inclusions. Reported-by: kernel test robot Fixes: 0c3dc787a62a ("crypto: algapi - Remove skbuff.h inclusion") Signed-off-by: Herbert Xu commit 079f921e9f4d3992968a2fc5dc3af0a3540853cc Merge: 64d123fc25e1f 0093870aa8915 Author: David S. Miller Date: Mon Aug 24 18:18:22 2020 -0700 Merge tag 'batadv-next-for-davem-20200824' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - Drop unused function batadv_hardif_remove_interfaces(), by Sven Eckelmann - delete duplicated words, by Randy Dunlap - Drop (even more) repeated words in comments, by Sven Eckelmann - Migrate to linux/prandom.h, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit 64d123fc25e1fcdf898324aac5497707bca6b5ab Merge: 373c15c2e9151 c9c12d339d933 Author: David S. Miller Date: Mon Aug 24 18:15:45 2020 -0700 Merge branch 'Add-PTP-support-for-Octeontx2' Subbaraya Sundeep says: ==================== Add PTP support for Octeontx2 This patchset adds PTP support for Octeontx2 platform. PTP is an independent coprocessor block from which CGX block fetches timestamp and prepends it to the packet before sending to NIX block. Patches are as follows: Patch 1: Patch to enable/disable packet timstamping in CGX upon mailbox request. It also adjusts packet parser (NPC) for the 8 bytes timestamp appearing before the packet. Patch 2: Patch adding PTP pci driver which configures the PTP block and hooks up to RVU AF driver. It also exposes a mailbox call to adjust PTP hardware clock. Patch 3: Patch adding PTP clock driver for PF netdev. v8: Added missing header file reported by kernel test robot in patch 2 v7: As per Jesse Brandeburg comments: Simplified functions in patch 1 Replaced magic numbers with macros Added Copyrights Added code comments wherever required Modified commit description of patch 2 v6: Resent after net-next is open v5: As suggested by David separated the fix (adding rtnl lock/unlock) and submitted to net. https://www.spinics.net/lists/netdev/msg669617.html v4: Added rtnl_lock/unlock in otx2_reset to protect against network stack ndo_open and close calls Added NULL check after ptp_clock_register in otx2_ptp.c v3: Fixed sparse error in otx2_txrx.c Removed static inlines in otx2_txrx.c v2: Fixed kernel build robot reported error by adding timecounter.h to otx2_common.h ==================== Acked-by: Richard Cochran Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit c9c12d339d93366732112d7ff472958834bfc3c5 Author: Aleksey Makarov Date: Mon Aug 24 21:20:02 2020 +0530 octeontx2-pf: Add support for PTP clock This patch adds PTP clock and uses it in Octeontx2 network device. PTP clock uses mailbox calls to access the hardware counter on the RVU side. Co-developed-by: Subbaraya Sundeep Signed-off-by: Subbaraya Sundeep Signed-off-by: Aleksey Makarov Signed-off-by: Sunil Goutham Acked-by: Richard Cochran Acked-by: Jakub Kicinski Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 4086f2a06a35c3f114338aca24e0a21679ec76d5 Author: Aleksey Makarov Date: Mon Aug 24 21:20:01 2020 +0530 octeontx2-af: Add support for Marvell PTP coprocessor Precision Timestamping block found on Octeontx2 platform is an independent coprocessor and has internal PTP hardware clock. Once configured PTP runs independently and when a packet arrives CGX hardware block gets the current timestamp from PTP block and forwards the packet to NIX by prepending timestamp to the packet. This patch adds the pci driver for PTP block. The driver gets registered by AF driver and does initial configuration and exposes a mailbox function to read and adjust PTP hardware clock. The mailbox function is called by AF consumers like netdev drivers or userspace drivers. Since PTP being a single block in platform this driver helps in accessing PTP block by any AF consumer. Co-developed-by: Subbaraya Sundeep Signed-off-by: Subbaraya Sundeep Signed-off-by: Aleksey Makarov Signed-off-by: Sunil Goutham Acked-by: Richard Cochran Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 421572175ba54fe7dab77ca5cec7e7a615e3c58a Author: Zyta Szpak Date: Mon Aug 24 21:20:00 2020 +0530 octeontx2-af: Support to enable/disable HW timestamping Four new mbox messages ids and handler are added in order to enable or disable timestamping procedure on tx and rx side. Additionally when PTP is enabled, the packet parser must skip over 8 bytes and start analyzing packet data there. To make NPC profiles work seemlesly PTR_ADVANCE of IKPU is set so that parsing can be done as before when all data pointers are shifted by 8 bytes automatically. Co-developed-by: Subbaraya Sundeep Signed-off-by: Subbaraya Sundeep Signed-off-by: Zyta Szpak Signed-off-by: Sunil Goutham Acked-by: Richard Cochran Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 373c15c2e915178f7bde64a49810b7f48c5ef0bd Author: Miaohe Lin Date: Mon Aug 24 07:44:37 2020 -0400 net: Use helper macro RT_TOS() in __icmp_send() Use helper macro RT_TOS() to get tos in __icmp_send(). Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 755114497815bd0931e2d0e95c5aa969dcf4aa25 Author: Miaohe Lin Date: Mon Aug 24 07:15:04 2020 -0400 net: Avoid access icmp_err_convert when icmp code is ICMP_FRAG_NEEDED There is no need to fetch errno and fatal info from icmp_err_convert when icmp code is ICMP_FRAG_NEEDED. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 0caeba3d3c1f08ecee4975d345858c19809475d7 Merge: 9ab9017948335 adc100d098884 Author: David S. Miller Date: Mon Aug 24 18:01:33 2020 -0700 Merge branch 'qed-introduce-devlink-health-support' Igor Russkikh says: ==================== qed: introduce devlink health support This is a followup implementation after series https://patchwork.ozlabs.org/project/netdev/cover/20200514095727.1361-1-irusskikh@marvell.com/ This is an implementation of devlink health infrastructure. With this we are now able to report HW errors to devlink, and it'll take its own actions depending on user configuration to capture and store the dump at the bad moment, and to request the driver to recover the device. So far we do not differentiate global device failures or specific PCI function failures. This means that some errors specific to one physical function will affect an entire device. This is not yet fully designed and verified, will followup in future. Solution was verified with artificial HW errors generated, existing tools for dump analysis could be used. v7: comments from Jesse and Jakub - p2: extra edev check - p9: removed extra indents v6: patch 4: changing serial to board.serial and fw to fw.app v5: improved patch 4 description v4: - commit message and other fixes after Jiri's comments - removed one patch (will send to net) v3: fix uninit var usage in patch 11 v2: fix #include issue from kbuild test robot. ==================== Signed-off-by: David S. Miller commit adc100d0988841c56dc5caebc3abec3871985b3a Author: Igor Russkikh Date: Sun Aug 23 14:19:34 2020 +0300 qede: make driver reliable on unload after failures In case recovery was not successful, netdev still should be present. But we should clear cdev if something bad happens on recovery. We also check cdev for null on dev close. That could be a case if recovery was not successful. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit c5c642c55e2fd43fcf42262fd1e87271d413fb42 Author: Igor Russkikh Date: Sun Aug 23 14:19:33 2020 +0300 qed: align adjacent indent Remove extra indent on some of adjacent declarations. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 27fed78737aeb692efe525d74fcb54dbe9d67973 Author: Igor Russkikh Date: Sun Aug 23 14:19:32 2020 +0300 qed: implement devlink dump Gather and push out full device dump to devlink. Device dump is the same as with `ethtool -d`, but now its generated exactly at the moment bad thing happens. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit b228cb1602ead97be5449cb87b68addea0e8243c Author: Igor Russkikh Date: Sun Aug 23 14:19:31 2020 +0300 qed*: make use of devlink recovery infrastructure Remove forcible recovery trigger and put it as a normal devlink callback. This allows user to enable/disable it via devlink health set pci/0000:03:00.0 reporter fw_fatal auto_recover false Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4f5a8db27eb926616500f827d9b81dc40595b0ef Author: Igor Russkikh Date: Sun Aug 23 14:19:30 2020 +0300 qed: use devlink logic to report errors Use devlink_health_report to push error indications. We implement this in qede via callback function to make it possible to reuse the same for other drivers sitting on top of qed in future. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9524067b9a91dce2a096a0de7727c217495e3d2e Author: Igor Russkikh Date: Sun Aug 23 14:19:29 2020 +0300 qed: health reporter init deinit seq Here we declare health reporter ops (empty for now) and register these in qed probe and remove callbacks. This way we get devlink attached to all kind of qed* PCI device entities: networking or storage offload entity. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 53916a67c3306bf3afbd1cbf6ea847aa0ef3c21c Author: Igor Russkikh Date: Sun Aug 23 14:19:28 2020 +0300 qed: implement devlink info request Here we return existing fw & mfw versions, we also fetch device's serial number: ~$ sudo ~/iproute2/devlink/devlink dev info pci/0000:01:00.1: driver qed board.serial_number REE1915E44552 versions: running: fw.app 8.42.2.0 stored: fw.mgmt 8.52.10.0 MFW and FW are different firmwares on device. Management is a firmware responsible for link configuration and various control plane features. Its permanent and resides in NVM. Running FW (or fastpath FW) is an embedded microprogram implementing all the packet processing, offloads, etc. This FW is being loaded on each start by the driver from FW binary blob. The base device specific structure (qed_dev_info) was not directly available to the base driver before. Thus, here we create and store a private copy of this structure in qed_dev root object to access the data. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit b75d05b2da5c5d0e9b8d80b72a4ba1443d36ef58 Author: Igor Russkikh Date: Sun Aug 23 14:19:27 2020 +0300 qed: fix kconfig help entries This patch replaces stubs in kconfig help entries with an actual description. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 755f982bb1ff469a181df3eaf8dd5d769267ab8e Author: Igor Russkikh Date: Sun Aug 23 14:19:26 2020 +0300 qed/qede: make devlink survive recovery Devlink instance lifecycle was linked to qed_dev object, that caused devlink to be recreated on each recovery. Changing it by making higher level driver (qede) responsible for its life. This way devlink now survives recoveries. qede now stores devlink structure pointer as a part of its device object, devlink private data contains a linkage structure, qed_devlink. Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 52306dee5443d2a359c6c64649f8cd80024c542c Author: Igor Russkikh Date: Sun Aug 23 14:19:25 2020 +0300 qed: move out devlink logic into a new file We are extending devlink infrastructure, thus move the existing stuff into a new file qed_devlink.c Signed-off-by: Igor Russkikh Signed-off-by: Alexander Lobakin Signed-off-by: Michal Kalderon Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 9ab90179483350e516439795d38029dab2727520 Author: Christophe JAILLET Date: Sun Aug 23 10:36:48 2020 +0200 chelsio: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'free_rx_resources()' and 'alloc_tx_resources()' (sge.c) GFP_KERNEL can be used because it is already used in these functions. Moreover, they can only be called from a .ndo_open function. So it is guarded by the 'rtnl_lock()', which is a mutex. While at it, a pr_err message in 'init_one()' has been updated accordingly (s/consistent/coherent). @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit f6d89dc51e510e8414bbc394067e1e058f323928 Merge: 85eb5bc33717e 5bf01b571cf45 Author: David S. Miller Date: Mon Aug 24 17:36:11 2020 -0700 Merge branch 'mlxsw-Misc-updates' Ido Schimmel says: ==================== mlxsw: Misc updates This patch set includes various updates for mlxsw. Patches #1-#4 adjust the default burst size of packet trap policers to conform to Spectrum-{2,3} requirements. The corresponding selftest is also adjusted so that it could reliably pass on these platforms. Patch #5 adjusts a selftest so that it could pass with both old and new versions of mausezahn. Patch #6 significantly reduces the runtime of tc-police scale test by changing the preference and masks of the used tc filters. Patch #7 prevents the driver from trying to set invalid ethtool link modes. ==================== Signed-off-by: David S. Miller commit 5bf01b571cf45db12a34f53b1ce96e044c030ae6 Author: Danielle Ratson Date: Sun Aug 23 11:06:28 2020 +0300 mlxsw: spectrum_ethtool: Remove internal speeds from PTYS register The PTYS register is used to report and configure the port type and speed. Currently, internal bits in the register are used the same way other bits are used. Using the internal bits can cause bad parameter firmware errors. For example, trying to write to internal bit 25 returns: EMAD reg access failed (tid=53e2bffa00004310,reg_id=5004(ptys),type=write,status=7(bad parameter)) Remove the internal bits from the PTYS register, so that it is no longer possible to pass them to firmware. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ffff9c9cb451d16c42cea79adbaaafa423902113 Author: Ido Schimmel Date: Sun Aug 23 11:06:27 2020 +0300 selftests: mlxsw: Reduce runtime of tc-police scale test Currently, the test takes about 626 seconds to complete because of an inefficient use of the device's TCAM. Reduce the runtime to 202 seconds by inserting all the flower filters with the same preference and mask, but with a different key. In particular, this reduces the deletion of the qdisc (which triggers the deletion of all the filters) from 66 seconds to 0.2 seconds. This prevents various netlink requests from user space applications (e.g., systemd-networkd) from timing-out because RTNL is not held for too long anymore. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 24f54c522590db790c2311a35284939c03268231 Author: Danielle Ratson Date: Sun Aug 23 11:06:26 2020 +0300 selftests: forwarding: Fix mausezahn delay parameter in mirror_test() Currently, mausezahn delay parameter in mirror_test() is specified with 'ms' units. mausezahn versions before 0.6.5 interpret 'ms' as seconds and therefore the tests that use mirror_test() take a very long time to complete. Resolve this by specifying 'msec' units. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit b36cca02dc6e19d7d9134f247fabab58259cc992 Author: Ido Schimmel Date: Sun Aug 23 11:06:25 2020 +0300 selftests: mlxsw: Increase burst size for burst test The current combination of rate and burst size does not adhere to Spectrum-{2,3} limitation which states that the minimum burst size should be 40% of the rate. Increase the burst size in order to honor above mentioned limitation and avoid intermittent failures of this test case on Spectrum-{2,3}. Remove the first sub-test case as the variation in number of received packets is simply too large to reliably test it. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 8e0d8ce4fc8ba96af716f7a80702e71c3e379f85 Author: Ido Schimmel Date: Sun Aug 23 11:06:24 2020 +0300 selftests: mlxsw: Increase burst size for rate test The current combination of rate and burst size does not adhere to Spectrum-{2,3} limitation which states that the minimum burst size should be 40% of the rate. Increase the burst size in order to honor above mentioned limitation and avoid intermittent failures of this test case on Spectrum-{2,3}. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f033ad8d85cc2ffafdba3f848295b9840d028278 Author: Ido Schimmel Date: Sun Aug 23 11:06:23 2020 +0300 selftests: mlxsw: Decrease required rate accuracy On Spectrum-{2,3} the required accuracy is +/-10%. Align the test to this requirement so that it can reliably pass on these platforms. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 7ee0db9d7e98ce0d67083b2985620557b8d0897b Author: Ido Schimmel Date: Sun Aug 23 11:06:22 2020 +0300 mlxsw: spectrum_trap: Adjust default policer burst size for Spectrum-{2, 3} On the Spectrum-{2,3} ASICs the minimum burst size of the packet trap policers needs to be 40% of the configured rate. Otherwise, intermittent drops are observed even when the incoming packet rate is slightly lower than the configured policer rate. Adjust the burst size of the registered packet trap policers so that they do not violate above mentioned limitation. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 85eb5bc33717eea3642148632f3ecbefb7ae6a02 Author: Christophe JAILLET Date: Sun Aug 23 10:03:53 2020 +0200 net: atheros: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'atl1e_setup_ring_resources()' (atl1e_main.c), 'atl1_setup_ring_resources()' (atl1.c) and 'atl2_setup_ring_resources()' (atl2.c) GFP_KERNEL can be used because it can be called from a .ndo_open. 'atl1_setup_ring_resources()' (atl1.c) can also be called from a '.set_ringparam' (see struct ethtool_ops) where sleep is also allowed. Both cases are protected by 'rtnl_lock()' which is a mutex. So these function can sleep. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 5d63ccea0521704501764a25937d1ee8f9e040ab Author: Christophe JAILLET Date: Sun Aug 23 08:26:41 2020 +0200 starfire: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'netdev_open()', GFP_ATOMIC must be used because it can be called from a .ndo_tx_timeout function. So this function can be called with the 'netif_tx_lock' acquired. The call chain is: --> tx_timeout (.ndo_tx_timeout function) --> netdev_open @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit c8acc09c229eb4f82ce4232a3c38d630e98ed6ae Author: Christophe JAILLET Date: Sun Aug 23 08:11:50 2020 +0200 typhoon: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'typhoon_init_one()' GFP_KERNEL can be used because it is a probe function and no lock is acquired. When memory is allocated in 'typhoon_download_firmware()', GFP_ATOMIC must be used because it can be called from a .ndo_tx_timeout function. So this function can be called with the 'netif_tx_lock' acquired. The call chain is: --> typhoon_tx_timeout (.ndo_tx_timeout function) --> typhoon_start_runtime --> typhoon_download_firmware While at is, update some comments accordingly. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Reviewed-by: David Dillow Signed-off-by: David S. Miller commit 54633527769e5a5b51fc225e37660bd7d0abc3da Author: Randy Dunlap Date: Sat Aug 22 18:07:13 2020 -0700 net: dccp: delete repeated words Drop duplicated words in /net/dccp/. Signed-off-by: Randy Dunlap Cc: Gerrit Renker Cc: dccp@vger.kernel.org Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit 8540591885a0c0c83bde8d79e3b262a6c93663b8 Author: Randy Dunlap Date: Sat Aug 22 16:40:15 2020 -0700 net: netlink: delete repeated words Drop duplicated words in net/netlink/. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit 2bdcc73c88d26a48bbc555bab480263e9902b27d Author: Randy Dunlap Date: Sat Aug 22 16:31:41 2020 -0700 net: ipv4: delete repeated words Drop duplicate words in comments in net/ipv4/. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit ce876d8f3dcb4e2e11579f95b615dda96e02b1a7 Merge: 901341bb97188 b8d7a7c62c7ac Author: David S. Miller Date: Mon Aug 24 16:21:44 2020 -0700 Merge branch 'net-sctp-delete-duplicated-words-plus-other-fixes' Randy Dunlap says: ==================== net: sctp: delete duplicated words + other fixes Drop or fix repeated words in net/sctp/. ==================== Signed-off-by: David S. Miller commit b8d7a7c62c7ac7fbc3c3e01ba3205bc119c383ad Author: Randy Dunlap Date: Sat Aug 22 16:16:01 2020 -0700 net: sctp: ulpqueue.c: delete duplicated word Drop the repeated word "an". Signed-off-by: Randy Dunlap Cc: Vlad Yasevich Cc: Neil Horman Cc: Marcelo Ricardo Leitner Cc: linux-sctp@vger.kernel.org Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit 14f45bb7b1bf8e600c1e07cc9f2063910000a463 Author: Randy Dunlap Date: Sat Aug 22 16:16:00 2020 -0700 net: sctp: sm_make_chunk.c: delete duplicated words + fix typo Drop the repeated words "for", "that", and "a". Change "his" to "this". Signed-off-by: Randy Dunlap Cc: Vlad Yasevich Cc: Neil Horman Cc: Marcelo Ricardo Leitner Cc: linux-sctp@vger.kernel.org Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit 93c3216a718105dd37174c80554c2f6e65944a4d Author: Randy Dunlap Date: Sat Aug 22 16:15:59 2020 -0700 net: sctp: protocol.c: delete duplicated words + punctuation Drop the repeated words "of" and "that". Add some punctuation for readability. Signed-off-by: Randy Dunlap Cc: Vlad Yasevich Cc: Neil Horman Cc: Marcelo Ricardo Leitner Cc: linux-sctp@vger.kernel.org Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit 9932564f1274723a80d62ba61c7c64820e170e59 Author: Randy Dunlap Date: Sat Aug 22 16:15:58 2020 -0700 net: sctp: chunk.c: delete duplicated word Drop the repeated word "the". Signed-off-by: Randy Dunlap Cc: Vlad Yasevich Cc: Neil Horman Cc: Marcelo Ricardo Leitner Cc: linux-sctp@vger.kernel.org Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit 440d399033cbeed2ffea2847b80bfccf282c88cc Author: Randy Dunlap Date: Sat Aug 22 16:15:57 2020 -0700 net: sctp: bind_addr.c: delete duplicated word Drop the repeated word "of". Signed-off-by: Randy Dunlap Cc: Vlad Yasevich Cc: Neil Horman Cc: Marcelo Ricardo Leitner Cc: linux-sctp@vger.kernel.org Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit 861e7021ae50adddd266af04676846dadb476bb2 Author: Randy Dunlap Date: Sat Aug 22 16:15:56 2020 -0700 net: sctp: auth.c: delete duplicated words Drop the repeated word "the" and "now". Signed-off-by: Randy Dunlap Cc: Vlad Yasevich Cc: Neil Horman Cc: Marcelo Ricardo Leitner Cc: linux-sctp@vger.kernel.org Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit 5e80a0ccbcf859c1bf41eca552fedb34df827c1f Author: Randy Dunlap Date: Sat Aug 22 16:15:55 2020 -0700 net: sctp: associola.c: delete duplicated words Drop the repeated word "the" in two places. Signed-off-by: Randy Dunlap Cc: Vlad Yasevich Cc: Neil Horman Cc: Marcelo Ricardo Leitner Cc: linux-sctp@vger.kernel.org Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: David S. Miller commit 901341bb9718884f337a92e6c4541227597d1f48 Author: Luke Hsiao Date: Fri Aug 21 21:41:05 2020 -0700 io_uring: ignore POLLIN for recvmsg on MSG_ERRQUEUE Currently, io_uring's recvmsg subscribes to both POLLERR and POLLIN. In the context of TCP tx zero-copy, this is inefficient since we are only reading the error queue and not using recvmsg to read POLLIN responses. This patch was tested by using a simple sending program to call recvmsg using io_uring with MSG_ERRQUEUE set and verifying with printks that the POLLIN is correctly unset when the msg flags are MSG_ERRQUEUE. Signed-off-by: Arjun Roy Signed-off-by: Soheil Hassas Yeganeh Acked-by: Eric Dumazet Reviewed-by: Jens Axboe Signed-off-by: Luke Hsiao Signed-off-by: David S. Miller commit 583bbf0624dfd8fc45f1049be1d4980be59451ff Author: Luke Hsiao Date: Fri Aug 21 21:41:04 2020 -0700 io_uring: allow tcp ancillary data for __sys_recvmsg_sock() For TCP tx zero-copy, the kernel notifies the process of completions by queuing completion notifications on the socket error queue. This patch allows reading these notifications via recvmsg to support TCP tx zero-copy. Ancillary data was originally disallowed due to privilege escalation via io_uring's offloading of sendmsg() onto a kernel thread with kernel credentials (https://crbug.com/project-zero/1975). So, we must ensure that the socket type is one where the ancillary data types that are delivered on recvmsg are plain data (no file descriptors or values that are translated based on the identity of the calling process). This was tested by using io_uring to call recvmsg on the MSG_ERRQUEUE with tx zero-copy enabled. Before this patch, we received -EINVALID from this specific code path. After this patch, we could read tcp tx zero-copy completion notifications from the MSG_ERRQUEUE. Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Arjun Roy Acked-by: Eric Dumazet Reviewed-by: Jann Horn Reviewed-by: Jens Axboe Signed-off-by: Luke Hsiao Signed-off-by: David S. Miller commit 37a319b5f9900a1716e140b3719296e6bb19d04c Merge: 507ebe6444a44 5d080b5064a1d Author: David S. Miller Date: Mon Aug 24 16:02:47 2020 -0700 Merge branch 'devlink-fixes-for-port-and-reporter-field-access' Parav Pandit says: ==================== devlink fixes for port and reporter field access These series contains two small fixes of devlink. Patch-1 initializes port reporter fields early enough to avoid access before initialized error. Patch-2 protects port list lock during traversal. ==================== Signed-off-by: David S. Miller commit 5d080b5064a1d2429071276dfc7588b2eecbc02f Author: Parav Pandit Date: Fri Aug 21 22:12:21 2020 +0300 devlink: Protect devlink port list traversal Cited patch in fixes tag misses to protect port list traversal while traversing per port reporter list. Protect it using devlink instance lock. Fixes: f4f541660121 ("devlink: Implement devlink health reporters on per-port basis") Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 79604c5de2c30b67079b9bfff48dae4bbd05ec4f Author: Parav Pandit Date: Fri Aug 21 22:12:20 2020 +0300 devlink: Fix per port reporter fields initialization Cited patch in fixes tag initializes reporters_list and reporters_lock of a devlink port after devlink port is added to the list. Once port is added to the list, devlink_nl_cmd_health_reporter_get_dumpit() can access the uninitialized mutex and reporters list head. Fix it by initializing port reporters field before adding port to the list. Fixes: f4f541660121 ("devlink: Implement devlink health reporters on per-port basis") Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 507ebe6444a44d9b7676a36f24b4d5360ef79327 Author: Thomas Falcon Date: Fri Aug 21 13:39:01 2020 -0500 ibmvnic: Fix use-after-free of VNIC login response buffer The login response buffer is freed after it is received and parsed, but other functions in the driver still attempt to read it, such as when the device is opened, causing the Oops below. Store relevant information in the driver's private data structures and use those instead. BUG: Kernel NULL pointer dereference on read at 0x00000010 Faulting instruction address: 0xc00800000050a900 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: pseries_rng rng_core vmx_crypto gf128mul binfmt_misc ip_tables x_tables ibmvnic ibmveth crc32c_vpmsum autofs4 CPU: 7 PID: 759 Comm: NetworkManager Not tainted 5.9.0-rc1-00124-gd0a84e1f38d9 #14 NIP: c00800000050a900 LR: c00800000050a8f0 CTR: 00000000005b1904 REGS: c0000001ed746d20 TRAP: 0300 Not tainted (5.9.0-rc1-00124-gd0a84e1f38d9) MSR: 800000000280b033 CR: 24428484 XER: 00000001 CFAR: c0000000000101b0 DAR: 0000000000000010 DSISR: 40000000 IRQMASK: 0 GPR00: c00800000050a8f0 c0000001ed746fb0 c008000000518e00 0000000000000000 GPR04: 00000000000000c0 0000000000000080 0003c366c60c4501 0000000000000352 GPR08: 000000000001f400 0000000000000010 0000000000000000 0000000000000000 GPR12: 0001cf0000000019 c00000001ec97680 00000001003dfd40 0000010008dbb22c GPR16: 0000000000000000 0000000000000000 0000000000000000 c000000000edb6c8 GPR20: c000000004e73e00 c000000004fd2448 c000000004e6d700 c000000004fd2448 GPR24: c000000004fd2400 c000000004a0cd20 c0000001ed961860 c0080000005029d8 GPR28: 0000000000000000 0000000000000003 c000000004a0c000 0000000000000000 NIP [c00800000050a900] init_resources+0x338/0xa00 [ibmvnic] LR [c00800000050a8f0] init_resources+0x328/0xa00 [ibmvnic] Call Trace: [c0000001ed746fb0] [c00800000050a8f0] init_resources+0x328/0xa00 [ibmvnic] (unreliable) [c0000001ed747090] [c00800000050b024] ibmvnic_open+0x5c/0x100 [ibmvnic] [c0000001ed747110] [c000000000bdcc0c] __dev_open+0x17c/0x250 [c0000001ed7471b0] [c000000000bdd1ec] __dev_change_flags+0x1dc/0x270 [c0000001ed747260] [c000000000bdd2bc] dev_change_flags+0x3c/0x90 [c0000001ed7472a0] [c000000000bf24b8] do_setlink+0x3b8/0x1280 [c0000001ed747450] [c000000000bf8cc8] __rtnl_newlink+0x5a8/0x980 [c0000001ed7478b0] [c000000000bf9110] rtnl_newlink+0x70/0xb0 [c0000001ed7478f0] [c000000000bf07c4] rtnetlink_rcv_msg+0x364/0x460 [c0000001ed747990] [c000000000c68b94] netlink_rcv_skb+0x84/0x1a0 [c0000001ed747a00] [c000000000bef758] rtnetlink_rcv+0x28/0x40 [c0000001ed747a20] [c000000000c68188] netlink_unicast+0x218/0x310 [c0000001ed747a80] [c000000000c6848c] netlink_sendmsg+0x20c/0x4e0 [c0000001ed747b20] [c000000000b9dc88] ____sys_sendmsg+0x158/0x360 [c0000001ed747bb0] [c000000000ba1c88] ___sys_sendmsg+0x98/0xf0 [c0000001ed747d10] [c000000000ba1db8] __sys_sendmsg+0x78/0x100 [c0000001ed747dc0] [c000000000033820] system_call_exception+0x160/0x280 [c0000001ed747e20] [c00000000000d740] system_call_common+0xf0/0x27c Instruction dump: 3be00000 38810068 b1410076 3941006a 93e10072 fbea0000 b1210068 4bff9915 eb9e0ca0 eabe0900 393c0010 3ab50048 <7fa04c2c> 7fba07b4 7b431764 7b4917a0 ---[ end trace fbc5949a28e103bd ]--- Fixes: f3ae59c0c015 ("ibmvnic: store RX and TX subCRQ handle array in ibmvnic_adapter struct") Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller commit 0bad834ca7bf9999ed9841f2bf9f5f07fbe02136 Author: Taehee Yoo Date: Fri Aug 21 17:47:32 2020 +0000 ipvlan: advertise link netns via netlink Assign rtnl_link_ops->get_link_net() callback so that IFLA_LINK_NETNSID is added to rtnetlink messages. Test commands: ip netns add nst ip link add dummy0 type dummy ip link add ipvlan0 link dummy0 type ipvlan ip link set ipvlan0 netns nst ip netns exec nst ip link show ipvlan0 Result: ---Before--- 6: ipvlan0@if5: ... link/ether 82:3a:78:ab:60:50 brd ff:ff:ff:ff:ff:ff ---After--- 12: ipvlan0@if11: ... link/ether 42:b1:ad:57:4e:27 brd ff:ff:ff:ff:ff:ff link-netnsid 0 ~~~~~~~~~~~~~~ Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 8dc105befe16b6504ecc17a235b3c22932fa33dc Author: Chuck Lever Date: Mon Aug 17 09:53:22 2020 -0400 RDMA/cm: Add tracepoints to track MAD send operations Surface the operation of MAD exchanges during connection establishment. Some samples: [root@klimt ~]# trace-cmd report -F ib_cma cpus=4 kworker/0:4-123 [000] 60.677388: icm_send_rep: local_id=1965336542 remote_id=1096195961 state=REQ_RCVD lap_state=LAP_UNINIT kworker/u8:11-391 [002] 60.678808: icm_send_req: local_id=1982113758 remote_id=0 state=IDLE lap_state=LAP_UNINIT kworker/0:4-123 [000] 60.679652: icm_send_rtu: local_id=1982113758 remote_id=1079418745 state=REP_RCVD lap_state=LAP_UNINIT nfsd-1954 [001] 60.691350: icm_send_rep: local_id=1998890974 remote_id=1129750393 state=MRA_REQ_SENT lap_state=LAP_UNINIT nfsd-1954 [003] 62.017931: icm_send_drep: local_id=1998890974 remote_id=1129750393 state=TIMEWAIT lap_state=LAP_UNINIT Link: https://lore.kernel.org/r/159767240197.2968.12048458026453596018.stgit@klimt.1015granger.net Signed-off-by: Chuck Lever Signed-off-by: Jason Gunthorpe commit 75874b3d50717ec6a821cf4de4284822204a3574 Author: Chuck Lever Date: Mon Aug 17 09:53:16 2020 -0400 RDMA/cm: Replace pr_debug() call sites with tracepoints In the interest of converging on a common instrumentation infrastructure, modernize the pr_debug() call sites added by commit 119bf81793ea ("IB/cm: Add debug prints to ib_cm"). The new tracepoints appear in a new "ib_cma" subsystem. The conversion is somewhat mechanical. Someone more familiar with the semantics of the recorded information might suggest additional data capture. Some benefits include: - Tracepoints enable "always on" reporting of these errors - The error records are structured and compact - Tracepoints provide hooks for eBPF scripts Sample output: nfsd-1954 [003] 62.017901: icm_dreq_skipped: local_id=1998890974 remote_id=1129750393 state=DREQ_RCVD lap_state=LAP_UNINIT Link: https://lore.kernel.org/r/159767239665.2968.10613294222688696646.stgit@klimt.1015granger.net Signed-off-by: Chuck Lever Signed-off-by: Jason Gunthorpe commit 068df05363b79f54241bd6bd612055b8c16c5964 Author: Marco Elver Date: Thu Aug 13 18:38:59 2020 +0200 bitops, kcsan: Partially revert instrumentation for non-atomic bitops Previous to the change to distinguish read-write accesses, when CONFIG_KCSAN_ASSUME_PLAIN_WRITES_ATOMIC=y is set, KCSAN would consider the non-atomic bitops as atomic. We want to partially revert to this behaviour, but with one important distinction: report racing modifications, since lost bits due to non-atomicity are certainly possible. Given the operations here only modify a single bit, assuming non-atomicity of the writer is sufficient may be reasonable for certain usage (and follows the permissible nature of the "assume plain writes atomic" rule). In other words: 1. We want non-atomic read-modify-write races to be reported; this is accomplished by kcsan_check_read(), where any concurrent write (atomic or not) will generate a report. 2. We do not want to report races with marked readers, but -do- want to report races with unmarked readers; this is accomplished by the instrument_write() ("assume atomic write" with Kconfig option set). With the above rules, when KCSAN_ASSUME_PLAIN_WRITES_ATOMIC is selected, it is hoped that KCSAN's reporting behaviour is better aligned with current expected permissible usage for non-atomic bitops. Note that, a side-effect of not telling KCSAN that the accesses are read-writes, is that this information is not displayed in the access summary in the report. It is, however, visible in inline-expanded stack traces. For now, it does not make sense to introduce yet another special case to KCSAN's runtime, only to cater to the case here. Cc: Dmitry Vyukov Cc: Paul E. McKenney Cc: Will Deacon Cc: Arnd Bergmann Cc: Daniel Axtens Cc: Michael Ellerman Cc: Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 2e986b81f698e73c95e6456183f27b861f47bb87 Author: Marco Elver Date: Mon Aug 10 10:06:25 2020 +0200 kcsan: Optimize debugfs stats counters Remove kcsan_counter_inc/dec() functions, as they perform no other logic, and are no longer needed. This avoids several calls in kcsan_setup_watchpoint() and kcsan_found_watchpoint(), as well as lets the compiler warn us about potential out-of-bounds accesses as the array's size is known at all usage sites at compile-time. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 178a1877d782c034f466edd80e30a107af5469df Author: Marco Elver Date: Fri Jul 31 10:17:23 2020 +0200 kcsan: Use pr_fmt for consistency Use the same pr_fmt throughout for consistency. [ The only exception is report.c, where the format must be kept precisely as-is. ] Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 2778793072c31e3eb33842f3bd7da82dfc7efc6b Author: Marco Elver Date: Fri Jul 31 10:17:22 2020 +0200 kcsan: Show message if enabled early Show a message in the kernel log if KCSAN was enabled early. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 4700ccdf18fa3002d66769b69cf715cc58beea37 Author: Marco Elver Date: Fri Jul 31 10:17:21 2020 +0200 kcsan: Remove debugfs test command Remove the debugfs test command, as it is no longer needed now that we have the KUnit+Torture based kcsan-test module. This is to avoid confusion around how KCSAN should be tested, as only the kcsan-test module is maintained. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit a4e74fa5f0d3e2a11f2d0deb522681d219a81426 Author: Marco Elver Date: Fri Jul 31 10:17:20 2020 +0200 kcsan: Simplify constant string handling Simplify checking prefixes and length calculation of constant strings. For the former, the kernel provides str_has_prefix(), and the latter we should just use strlen("..") because GCC and Clang have optimizations that optimize these into constants. No functional change intended. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 69b2c81bc894606670204f0ae08f406dbcce836d Author: Marco Elver Date: Fri Jul 31 10:17:19 2020 +0200 kcsan: Simplify debugfs counter to name mapping Simplify counter ID to name mapping by using an array with designated inits. This way, we can turn a run-time BUG() into a compile-time static assertion failure if a counter name is missing. No functional change intended. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 3570a1bcf45e9a7ddf9ba0e8d6d57cc67675cfef Author: Marco Elver Date: Fri Jul 24 09:00:08 2020 +0200 locking/atomics: Use read-write instrumentation for atomic RMWs Use instrument_atomic_read_write() for atomic RMW ops. Cc: Will Deacon Cc: Boqun Feng Cc: Arnd Bergmann Cc: Acked-by: Peter Zijlstra (Intel) Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit b159eeccb75a7916278d95e2ff5540e670682748 Author: Marco Elver Date: Fri Jul 24 09:00:07 2020 +0200 asm-generic/bitops: Use instrument_read_write() where appropriate Use the new instrument_read_write() where appropriate. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 00047c2e6d7c576c1a847f7db07ef0fc58085f22 Author: Marco Elver Date: Fri Jul 24 09:00:06 2020 +0200 instrumented.h: Introduce read-write instrumentation hooks Introduce read-write instrumentation hooks, to more precisely denote an operation's behaviour. KCSAN is able to distinguish compound instrumentation, and with the new instrumentation we then benefit from improved reporting. More importantly, read-write compound operations should not implicitly be treated as atomic, if they aren't actually atomic. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit bec4a2474890a6884eb890c778ea02bccaaae6eb Author: Marco Elver Date: Fri Jul 24 09:00:05 2020 +0200 kcsan: Test support for compound instrumentation Changes kcsan-test module to support checking reports that include compound instrumentation. Since we should not fail the test if this support is unavailable, we have to add a config variable that the test can use to decide what to check for. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 9d1335cc1e97cc3da0d14f640dd716e614083e8b Author: Marco Elver Date: Fri Jul 24 09:00:04 2020 +0200 kcsan: Add missing CONFIG_KCSAN_IGNORE_ATOMICS checks Add missing CONFIG_KCSAN_IGNORE_ATOMICS checks for the builtin atomics instrumentation. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 106a307fd0a762e2d47e1cf99e6da43763887a18 Author: Marco Elver Date: Fri Jul 24 09:00:03 2020 +0200 kcsan: Skew delay to be longer for certain access types For compound instrumentation and assert accesses, skew the watchpoint delay to be longer if randomized. This is useful to improve race detection for such accesses. For compound accesses we should increase the delay as we've aggregated both read and write instrumentation. By giving up 1 call into the runtime, we're less likely to set up a watchpoint and thus less likely to detect a race. We can balance this by increasing the watchpoint delay. For assert accesses, we know these are of increased interest, and we wish to increase our chances of detecting races for such checks. Note that, kcsan_udelay_{task,interrupt} define the upper bound delays. When randomized, delays are uniformly distributed between [0, delay]. Skewing the delay does not break this promise as long as the defined upper bounds are still adhered to. The current skew results in delays uniformly distributed between [delay/2, delay]. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit a81b37590ff2e2507940ec278910b1d315dc73b3 Author: Marco Elver Date: Fri Jul 24 09:00:02 2020 +0200 objtool, kcsan: Add __tsan_read_write to uaccess whitelist Adds the new __tsan_read_write compound instrumentation to objtool's uaccess whitelist. Acked-by: Peter Zijlstra (Intel) Cc: Josh Poimboeuf Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 14e2ac8de0f91f12122a49f09897b0cd05256460 Author: Marco Elver Date: Fri Jul 24 09:00:01 2020 +0200 kcsan: Support compounded read-write instrumentation Add support for compounded read-write instrumentation if supported by the compiler. Adds the necessary instrumentation functions, and a new type which is used to generate a more descriptive report. Furthermore, such compounded memory access instrumentation is excluded from the "assume aligned writes up to word size are atomic" rule, because we cannot assume that the compiler emits code that is atomic for compound ops. LLVM/Clang added support for the feature in: https://github.com/llvm/llvm-project/commit/785d41a261d136b64ab6c15c5d35f2adc5ad53e3 The new instrumentation is emitted for sets of memory accesses in the same basic block to the same address with at least one read appearing before a write. These typically result from compound operations such as ++, --, +=, -=, |=, &=, etc. but also equivalent forms such as "var = var + 1". Where the compiler determines that it is equivalent to emit a call to a single __tsan_read_write instead of separate __tsan_read and __tsan_write, we can then benefit from improved performance and better reporting for such access patterns. The new reports now show that the ops are both reads and writes, for example: read-write to 0xffffffff90548a38 of 8 bytes by task 143 on cpu 3: test_kernel_rmw_array+0x45/0xa0 access_thread+0x71/0xb0 kthread+0x21e/0x240 ret_from_fork+0x22/0x30 read-write to 0xffffffff90548a38 of 8 bytes by task 144 on cpu 2: test_kernel_rmw_array+0x45/0xa0 access_thread+0x71/0xb0 kthread+0x21e/0x240 ret_from_fork+0x22/0x30 Acked-by: Peter Zijlstra (Intel) Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit f9ea63193135473ed6b6ff06f016eb6248100041 Author: Marco Elver Date: Fri Jul 3 15:40:31 2020 +0200 kcsan: Add atomic builtin test case Adds test case to kcsan-test module, to test atomic builtin instrumentation works. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 883957b1c4ac5554ce515e882b7b2b20cbadfdd1 Author: Marco Elver Date: Fri Jul 3 15:40:30 2020 +0200 objtool: Add atomic builtin TSAN instrumentation to uaccess whitelist Adds the new TSAN functions that may be emitted for atomic builtins to objtool's uaccess whitelist. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney Cc: Josh Poimboeuf Cc: Peter Zijlstra commit 0f8ad5f2e93425812c393c91ceb5af3d95e79b10 Author: Marco Elver Date: Fri Jul 3 15:40:29 2020 +0200 kcsan: Add support for atomic builtins Some architectures (currently e.g. s390 partially) implement atomics using the compiler's atomic builtins (__atomic_*, __sync_*). To support enabling KCSAN on such architectures in future, or support experimental use of these builtins, implement support for them. We should also avoid breaking KCSAN kernels due to use (accidental or otherwise) of atomic builtins in drivers, as has happened in the past: https://lkml.kernel.org/r/5231d2c0-41d9-6721-e15f-a7eedf3ce69e@infradead.org The instrumentation is subtly different from regular reads/writes: TSAN instrumentation replaces the use of atomic builtins with a call into the runtime, and the runtime's job is to also execute the desired atomic operation. We rely on the __atomic_* compiler builtins, available with all KCSAN-supported compilers, to implement each TSAN atomic instrumentation function. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 8c3b3d971f2e4d72d8768457c40b513ca5d1f906 Author: Lorenz Bauer Date: Mon Aug 24 09:45:23 2020 +0100 selftests: bpf: Fix sockmap update nits Address review by Yonghong, to bring the new tests in line with the usual code style. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200824084523.13104-1-lmb@cloudflare.com commit f872e4bc47f100ccbbe9469cd12e5ac78e4b6eda Author: Andrii Nakryiko Date: Fri Aug 21 15:56:53 2020 -0700 libbpf: Fix type compatibility check copy-paste error Fix copy-paste error in types compatibility check. Local type is accidentally used instead of target type for the very first type check strictness check. This can result in potentially less strict candidate comparison. Fix the error. Fixes: 3fc32f40c402 ("libbpf: Implement type-based CO-RE relocations support") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200821225653.2180782-1-andriin@fb.com commit 3418c56de81fd73f2265c8915f4b910bcc141cb7 Author: Andrii Nakryiko Date: Fri Aug 21 15:55:56 2020 -0700 libbpf: Avoid false unuinitialized variable warning in bpf_core_apply_relo Some versions of GCC report uninitialized targ_spec usage. GCC is wrong, but let's avoid unnecessary warnings. Fixes: ddc7c3042614 ("libbpf: implement BPF CO-RE offset relocation algorithm") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200821225556.2178419-1-andriin@fb.com commit 07ff4f012635b05d344dbf0f2db87ba5e8c4c27a Author: Jakub Sitnicki Date: Fri Aug 21 12:02:26 2020 +0200 bpf: sk_lookup: Add user documentation Describe the purpose of BPF sk_lookup program, how it can be attached, when it gets invoked, and what information gets passed to it. Point the reader to examples and further documentation. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200821100226.403844-1-jakub@cloudflare.com commit 4d0d1673416bee2099e93c6636c51754e2100024 Author: Jianlin Lv Date: Fri Aug 21 13:28:17 2020 +0800 docs: Correct subject prefix and update LLVM info bpf_devel_QA.rst:152 The subject prefix information is not accurate, it should be 'PATCH bpf-next v2' Also update LLVM version info and add information about ‘-DLLVM_TARGETS_TO_BUILD’ to prompt the developer to build the desired target. Signed-off-by: Jianlin Lv Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200821052817.46887-1-Jianlin.Lv@arm.com commit 890f4365e47ecbf554c043448ccec7ea10435120 Merge: 9c0f8cbdc0e9c 267cf9fa43d1c Author: Alexei Starovoitov Date: Mon Aug 24 14:35:01 2020 -0700 Merge branch 'bpf-tcp-header-opts' Martin KaFai Lau says: ==================== The earlier effort in BPF-TCP-CC allows the TCP Congestion Control algorithm to be written in BPF. It opens up opportunities to allow a faster turnaround time in testing/releasing new congestion control ideas to production environment. The same flexibility can be extended to writing TCP header option. It is not uncommon that people want to test new TCP header option to improve the TCP performance. Another use case is for data-center that has a more controlled environment and has more flexibility in putting header options for internal traffic only. This patch set introduces the necessary BPF logic and API to allow bpf program to write and parse header options. There are also some changes to TCP and they are mostly to provide the needed sk and skb info to the bpf program to make decision. Patch 9 is the main patch and has more details on the API and design. The set includes an example which sends the max delay ack in the BPF TCP header option and the receiving side can then adjust its RTO accordingly. v5: - Move some of the comments from git commit message to the UAPI bpf.h in patch 9 - Some variable clean up in the tests (patch 11). v4: - Since bpf-next is currently closed, tag the set with RFC to keep the review cadence - Separate tcp changes in its own patches (5, 6, 7). It is a bit tricky since most of the tcp changes is to call out the bpf prog to write and parse the header. The write and parse callout has been modularized into a few bpf_skops_* function in v3. This revision (v4) tries to move those bpf_skops_* functions into separate TCP patches. However, they will be half implemented to highlight the changes to the TCP stack, mainly: - when the bpf prog will be called in the TCP stack and - what information needs to pump through the TCP stack to the actual bpf prog callsite. The bpf_skops_* functions will be fully implemented in patch 9 together with other bpf pieces. - Use struct_size() in patch 1 (Eric) - Add saw_unknown to struct tcp_options_received in patch 4 (Eric) v3: - Add kdoc for tcp_make_synack (Jakub Kicinski) - Add BPF_WRITE_HDR_TCP_CURRENT_MSS and BPF_WRITE_HDR_TCP_SYNACK_COOKIE in bpf.h to give a clearer meaning to sock_ops->args[0] when writing header option. - Rename BPF_SOCK_OPS_PARSE_UNKWN_HDR_OPT_CB_FLAG to BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG v2: - Instead of limiting the bpf prog to write experimental option (kind:254, magic:0xeB9F), this revision allows the bpf prog to write any TCP header option through the bpf_store_hdr_opt() helper. That will allow different bpf-progs to write its own option and the helper will guarantee there is no duplication. - Add bpf_load_hdr_opt() helper to search a particular option by kind. Some of the get_syn logic is refactored to bpf_sock_ops_get_syn(). - Since bpf prog is no longer limited to option (254, 0xeB9F), the TCP_SKB_CB(skb)->bpf_hdr_opt_off is no longer needed. Instead, when there is any option kernel cannot recognize, the bpf prog will be called if the BPF_SOCK_OPS_PARSE_UNKWN_HDR_OPT_CB_FLAG is set. [ The "unknown_opt" is learned in tcp_parse_options() in patch 4. ] - Add BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG. If this flag is set, the bpf-prog will be called on all tcp packet received at an established sk. It will be useful to ensure a previously written header option is received by the peer. e.g. The latter test is using this on the active-side during syncookie. - The test_tcp_hdr_options.c is adjusted accordingly to test writing both experimental and regular TCP header option. - The test_misc_tcp_hdr_options.c is added to mainly test different cases on the new helpers. - Break up the TCP_BPF_RTO_MIN and TCP_BPF_DELACK_MAX into two patches. - Directly store the tcp_hdrlen in "struct saved_syn" instead of going back to the tcp header to obtain it by "th->doff * 4" - Add a new optval(==2) for setsockopt(TCP_SAVE_SYN) such that it will also store the mac header (patch 9). ==================== Signed-off-by: Alexei Starovoitov commit 267cf9fa43d1c9d525d5d818a8651f2900e3aa9e Author: Martin KaFai Lau Date: Thu Aug 20 12:01:23 2020 -0700 tcp: bpf: Optionally store mac header in TCP_SAVE_SYN This patch is adapted from Eric's patch in an earlier discussion [1]. The TCP_SAVE_SYN currently only stores the network header and tcp header. This patch allows it to optionally store the mac header also if the setsockopt's optval is 2. It requires one more bit for the "save_syn" bit field in tcp_sock. This patch achieves this by moving the syn_smc bit next to the is_mptcp. The syn_smc is currently used with the TCP experimental option. Since syn_smc is only used when CONFIG_SMC is enabled, this patch also puts the "IS_ENABLED(CONFIG_SMC)" around it like the is_mptcp did with "IS_ENABLED(CONFIG_MPTCP)". The mac_hdrlen is also stored in the "struct saved_syn" to allow a quick offset from the bpf prog if it chooses to start getting from the network header or the tcp header. [1]: https://lore.kernel.org/netdev/CANn89iLJNWh6bkH7DNhy_kmcAexuUCccqERqe7z2QsvPhGrYPQ@mail.gmail.com/ Suggested-by: Eric Dumazet Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/bpf/20200820190123.2886935-1-kafai@fb.com commit ad2f8eb0095e9036724d9cf0eb6960f1e6d52d21 Author: Martin KaFai Lau Date: Thu Aug 20 12:01:17 2020 -0700 bpf: selftests: Tcp header options This patch adds tests for the new bpf tcp header option feature. test_tcp_hdr_options.c: - It tests header option writing and parsing in 3WHS: regular connection establishment, fastopen, and syncookie. - In syncookie, the passive side's bpf prog is asking the active side to resend its bpf header option by specifying a RESEND bit in the outgoing SYNACK. handle_active_estab() and write_nodata_opt() has some details. - handle_passive_estab() has comments on fastopen. - It also has test for header writing and parsing in FIN packet. - Most of the tests is writing an experimental option 254 with magic 0xeB9F. - The no_exprm_estab() also tests writing a regular TCP option without any magic. test_misc_tcp_options.c: - It is an one directional test. Active side writes option and passive side parses option. The focus is to exercise the new helpers and API. - Testing the new helper: bpf_load_hdr_opt() and bpf_store_hdr_opt(). - Testing the bpf_getsockopt(TCP_BPF_SYN). - Negative tests for the above helpers. - Testing the sock_ops->skb_data. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200820190117.2886749-1-kafai@fb.com commit 8085e1dc1f3c885e1e9c1ef8031b3eabc1cccf25 Author: Martin KaFai Lau Date: Thu Aug 20 12:01:11 2020 -0700 bpf: selftests: Add fastopen_connect to network_helpers This patch adds a fastopen_connect() helper which will be used in a later test. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200820190111.2886196-1-kafai@fb.com commit 0813a841566f0962a5551be7749b43c45f0022a0 Author: Martin KaFai Lau Date: Thu Aug 20 12:01:04 2020 -0700 bpf: tcp: Allow bpf prog to write and parse TCP header option [ Note: The TCP changes here is mainly to implement the bpf pieces into the bpf_skops_*() functions introduced in the earlier patches. ] The earlier effort in BPF-TCP-CC allows the TCP Congestion Control algorithm to be written in BPF. It opens up opportunities to allow a faster turnaround time in testing/releasing new congestion control ideas to production environment. The same flexibility can be extended to writing TCP header option. It is not uncommon that people want to test new TCP header option to improve the TCP performance. Another use case is for data-center that has a more controlled environment and has more flexibility in putting header options for internal only use. For example, we want to test the idea in putting maximum delay ACK in TCP header option which is similar to a draft RFC proposal [1]. This patch introduces the necessary BPF API and use them in the TCP stack to allow BPF_PROG_TYPE_SOCK_OPS program to parse and write TCP header options. It currently supports most of the TCP packet except RST. Supported TCP header option: ─────────────────────────── This patch allows the bpf-prog to write any option kind. Different bpf-progs can write its own option by calling the new helper bpf_store_hdr_opt(). The helper will ensure there is no duplicated option in the header. By allowing bpf-prog to write any option kind, this gives a lot of flexibility to the bpf-prog. Different bpf-prog can write its own option kind. It could also allow the bpf-prog to support a recently standardized option on an older kernel. Sockops Callback Flags: ────────────────────── The bpf program will only be called to parse/write tcp header option if the following newly added callback flags are enabled in tp->bpf_sock_ops_cb_flags: BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG A few words on the PARSE CB flags. When the above PARSE CB flags are turned on, the bpf-prog will be called on packets received at a sk that has at least reached the ESTABLISHED state. The parsing of the SYN-SYNACK-ACK will be discussed in the "3 Way HandShake" section. The default is off for all of the above new CB flags, i.e. the bpf prog will not be called to parse or write bpf hdr option. There are details comment on these new cb flags in the UAPI bpf.h. sock_ops->skb_data and bpf_load_hdr_opt() ───────────────────────────────────────── sock_ops->skb_data and sock_ops->skb_data_end covers the whole TCP header and its options. They are read only. The new bpf_load_hdr_opt() helps to read a particular option "kind" from the skb_data. Please refer to the comment in UAPI bpf.h. It has details on what skb_data contains under different sock_ops->op. 3 Way HandShake ─────────────── The bpf-prog can learn if it is sending SYN or SYNACK by reading the sock_ops->skb_tcp_flags. * Passive side When writing SYNACK (i.e. sock_ops->op == BPF_SOCK_OPS_WRITE_HDR_OPT_CB), the received SYN skb will be available to the bpf prog. The bpf prog can use the SYN skb (which may carry the header option sent from the remote bpf prog) to decide what bpf header option should be written to the outgoing SYNACK skb. The SYN packet can be obtained by getsockopt(TCP_BPF_SYN*). More on this later. Also, the bpf prog can learn if it is in syncookie mode (by checking sock_ops->args[0] == BPF_WRITE_HDR_TCP_SYNACK_COOKIE). The bpf prog can store the received SYN pkt by using the existing bpf_setsockopt(TCP_SAVE_SYN). The example in a later patch does it. [ Note that the fullsock here is a listen sk, bpf_sk_storage is not very useful here since the listen sk will be shared by many concurrent connection requests. Extending bpf_sk_storage support to request_sock will add weight to the minisock and it is not necessary better than storing the whole ~100 bytes SYN pkt. ] When the connection is established, the bpf prog will be called in the existing PASSIVE_ESTABLISHED_CB callback. At that time, the bpf prog can get the header option from the saved syn and then apply the needed operation to the newly established socket. The later patch will use the max delay ack specified in the SYN header and set the RTO of this newly established connection as an example. The received ACK (that concludes the 3WHS) will also be available to the bpf prog during PASSIVE_ESTABLISHED_CB through the sock_ops->skb_data. It could be useful in syncookie scenario. More on this later. There is an existing getsockopt "TCP_SAVED_SYN" to return the whole saved syn pkt which includes the IP[46] header and the TCP header. A few "TCP_BPF_SYN*" getsockopt has been added to allow specifying where to start getting from, e.g. starting from TCP header, or from IP[46] header. The new getsockopt(TCP_BPF_SYN*) will also know where it can get the SYN's packet from: - (a) the just received syn (available when the bpf prog is writing SYNACK) and it is the only way to get SYN during syncookie mode. or - (b) the saved syn (available in PASSIVE_ESTABLISHED_CB and also other existing CB). The bpf prog does not need to know where the SYN pkt is coming from. The getsockopt(TCP_BPF_SYN*) will hide this details. Similarly, a flags "BPF_LOAD_HDR_OPT_TCP_SYN" is also added to bpf_load_hdr_opt() to read a particular header option from the SYN packet. * Fastopen Fastopen should work the same as the regular non fastopen case. This is a test in a later patch. * Syncookie For syncookie, the later example patch asks the active side's bpf prog to resend the header options in ACK. The server can use bpf_load_hdr_opt() to look at the options in this received ACK during PASSIVE_ESTABLISHED_CB. * Active side The bpf prog will get a chance to write the bpf header option in the SYN packet during WRITE_HDR_OPT_CB. The received SYNACK pkt will also be available to the bpf prog during the existing ACTIVE_ESTABLISHED_CB callback through the sock_ops->skb_data and bpf_load_hdr_opt(). * Turn off header CB flags after 3WHS If the bpf prog does not need to write/parse header options beyond the 3WHS, the bpf prog can clear the bpf_sock_ops_cb_flags to avoid being called for header options. Or the bpf-prog can select to leave the UNKNOWN_HDR_OPT_CB_FLAG on so that the kernel will only call it when there is option that the kernel cannot handle. [1]: draft-wang-tcpm-low-latency-opt-00 https://tools.ietf.org/html/draft-wang-tcpm-low-latency-opt-00 Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200820190104.2885895-1-kafai@fb.com commit c9985d09e18965131958102f4b67fa1e742df335 Author: Martin KaFai Lau Date: Thu Aug 20 12:00:58 2020 -0700 bpf: sock_ops: Change some members of sock_ops_kern from u32 to u8 A later patch needs to add a few pointers and a few u8 to sock_ops_kern. Hence, this patch saves some spaces by moving some of the existing members from u32 to u8 so that the later patch can still fit everything in a cacheline. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200820190058.2885640-1-kafai@fb.com commit 331fca4315efa3bbd258fbdf8209d59d253c0480 Author: Martin KaFai Lau Date: Thu Aug 20 12:00:52 2020 -0700 bpf: tcp: Add bpf_skops_hdr_opt_len() and bpf_skops_write_hdr_opt() The bpf prog needs to parse the SYN header to learn what options have been sent by the peer's bpf-prog before writing its options into SYNACK. This patch adds a "syn_skb" arg to tcp_make_synack() and send_synack(). This syn_skb will eventually be made available (as read-only) to the bpf prog. This will be the only SYN packet available to the bpf prog during syncookie. For other regular cases, the bpf prog can also use the saved_syn. When writing options, the bpf prog will first be called to tell the kernel its required number of bytes. It is done by the new bpf_skops_hdr_opt_len(). The bpf prog will only be called when the new BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG is set in tp->bpf_sock_ops_cb_flags. When the bpf prog returns, the kernel will know how many bytes are needed and then update the "*remaining" arg accordingly. 4 byte alignment will be included in the "*remaining" before this function returns. The 4 byte aligned number of bytes will also be stored into the opts->bpf_opt_len. "bpf_opt_len" is a newly added member to the struct tcp_out_options. Then the new bpf_skops_write_hdr_opt() will call the bpf prog to write the header options. The bpf prog is only called if it has reserved spaces before (opts->bpf_opt_len > 0). The bpf prog is the last one getting a chance to reserve header space and writing the header option. These two functions are half implemented to highlight the changes in TCP stack. The actual codes preparing the bpf running context and invoking the bpf prog will be added in the later patch with other necessary bpf pieces. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/bpf/20200820190052.2885316-1-kafai@fb.com commit 00d211a4ea6f48e8e3b758813fe23ad28193d3bf Author: Martin KaFai Lau Date: Thu Aug 20 12:00:46 2020 -0700 bpf: tcp: Add bpf_skops_parse_hdr() The patch adds a function bpf_skops_parse_hdr(). It will call the bpf prog to parse the TCP header received at a tcp_sock that has at least reached the ESTABLISHED state. For the packets received during the 3WHS (SYN, SYNACK and ACK), the received skb will be available to the bpf prog during the callback in bpf_skops_established() introduced in the previous patch and in the bpf_skops_write_hdr_opt() that will be added in the next patch. Calling bpf prog to parse header is controlled by two new flags in tp->bpf_sock_ops_cb_flags: BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG and BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG. When BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG is set, the bpf prog will only be called when there is unknown option in the TCP header. When BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG is set, the bpf prog will be called on all received TCP header. This function is half implemented to highlight the changes in TCP stack. The actual codes preparing the bpf running context and invoking the bpf prog will be added in the later patch with other necessary bpf pieces. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/bpf/20200820190046.2885054-1-kafai@fb.com commit 72be0fe6ba76282704cb84952bd5a1eb47910290 Author: Martin KaFai Lau Date: Thu Aug 20 12:00:39 2020 -0700 bpf: tcp: Add bpf_skops_established() In tcp_init_transfer(), it currently calls the bpf prog to give it a chance to handle the just "ESTABLISHED" event (e.g. do setsockopt on the newly established sk). Right now, it is done by calling the general purpose tcp_call_bpf(). In the later patch, it also needs to pass the just-received skb which concludes the 3 way handshake. E.g. the SYNACK received at the active side. The bpf prog can then learn some specific header options written by the peer's bpf-prog and potentially do setsockopt on the newly established sk. Thus, instead of reusing the general purpose tcp_call_bpf(), a new function bpf_skops_established() is added to allow passing the "skb" to the bpf prog. The actual skb passing from bpf_skops_established() to the bpf prog will happen together in a later patch which has the necessary bpf pieces. A "skb" arg is also added to tcp_init_transfer() such that it can then be passed to bpf_skops_established(). Calling the new bpf_skops_established() instead of tcp_call_bpf() should be a noop in this patch. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200820190039.2884750-1-kafai@fb.com commit 7656d68455891f7fc6689f95415fd59e7a1d629b Author: Martin KaFai Lau Date: Thu Aug 20 12:00:33 2020 -0700 tcp: Add saw_unknown to struct tcp_options_received In a later patch, the bpf prog only wants to be called to handle a header option if that particular header option cannot be handled by the kernel. This unknown option could be written by the peer's bpf-prog. It could also be a new standard option that the running kernel does not support it while a bpf-prog can handle it. This patch adds a "saw_unknown" bit to "struct tcp_options_received" and it uses an existing one byte hole to do that. "saw_unknown" will be set in tcp_parse_options() if it sees an option that the kernel cannot handle. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Reviewed-by: Eric Dumazet Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200820190033.2884430-1-kafai@fb.com commit ca584ba070864c606f3a54faaafe774726d5b4a1 Author: Martin KaFai Lau Date: Thu Aug 20 12:00:27 2020 -0700 tcp: bpf: Add TCP_BPF_RTO_MIN for bpf_setsockopt This patch adds bpf_setsockopt(TCP_BPF_RTO_MIN) to allow bpf prog to set the min rto of a connection. It could be used together with the earlier patch which has added bpf_setsockopt(TCP_BPF_DELACK_MAX). A later selftest patch will communicate the max delay ack in a bpf tcp header option and then the receiving side can use bpf_setsockopt(TCP_BPF_RTO_MIN) to set a shorter rto. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Reviewed-by: Eric Dumazet Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200820190027.2884170-1-kafai@fb.com commit 2b8ee4f05d4f6a6c427ad30dd6c1bb49eb2efd3b Author: Martin KaFai Lau Date: Thu Aug 20 12:00:21 2020 -0700 tcp: bpf: Add TCP_BPF_DELACK_MAX setsockopt This change is mostly from an internal patch and adapts it from sysctl config to the bpf_setsockopt setup. The bpf_prog can set the max delay ack by using bpf_setsockopt(TCP_BPF_DELACK_MAX). This max delay ack can be communicated to its peer through bpf header option. The receiving peer can then use this max delay ack and set a potentially lower rto by using bpf_setsockopt(TCP_BPF_RTO_MIN) which will be introduced in the next patch. Another later selftest patch will also use it like the above to show how to write and parse bpf tcp header option. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Reviewed-by: Eric Dumazet Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200820190021.2884000-1-kafai@fb.com commit 70a217f1976f75a6cfe8223e5669ad7b405daaad Author: Martin KaFai Lau Date: Thu Aug 20 12:00:14 2020 -0700 tcp: Use a struct to represent a saved_syn The TCP_SAVE_SYN has both the network header and tcp header. The total length of the saved syn packet is currently stored in the first 4 bytes (u32) of an array and the actual packet data is stored after that. A later patch will add a bpf helper that allows to get the tcp header alone from the saved syn without the network header. It will be more convenient to have a direct offset to a specific header instead of re-parsing it. This requires to separately store the network hdrlen. The total header length (i.e. network + tcp) is still needed for the current usage in getsockopt. Although this total length can be obtained by looking into the tcphdr and then get the (th->doff << 2), this patch chooses to directly store the tcp hdrlen in the second four bytes of this newly created "struct saved_syn". By using a new struct, it can give a readable name to each individual header length. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Reviewed-by: Eric Dumazet Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200820190014.2883694-1-kafai@fb.com commit 7f45d6f8ae383ed01070883b3c74ee51c9740065 Author: Randy Dunlap Date: Fri Jul 3 14:33:42 2020 -0700 doc: Drop doubled words from RCU requirements documentation Drop the doubled words "to" and "for". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Joel Fernandes Cc: rcu@vger.kernel.org Signed-off-by: Paul E. McKenney commit 1b98b7c5eb2f94eddad541d6fc91f1d1995d644b Author: Randy Dunlap Date: Fri Jul 3 14:33:41 2020 -0700 doc: Drop doubled words from RCU Data-Structures.rst Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Joel Fernandes Cc: rcu@vger.kernel.org Signed-off-by: Paul E. McKenney commit 77f808607a62c3685381a5732a88b30bad8893b5 Author: Tobias Klauser Date: Thu Jul 2 18:28:10 2020 +0200 docs: Fix typo in synchronize_rcu() function name s/sychronize_rcu/synchronize_rcu/ Signed-off-by: Tobias Klauser Signed-off-by: Paul E. McKenney commit 160c7ba34605d9b59ee406a1b4a61b0f942b1ae9 Author: Paul E. McKenney Date: Wed Jul 8 16:25:43 2020 -0700 lib: Add backtrace_idle parameter to force backtrace of idle CPUs Currently, the nmi_cpu_backtrace() declines to produce backtraces for idle CPUs. This is a good choice in the common case in which problems are caused only by non-idle CPUs. However, there are occasionally situations in which idle CPUs are helping to cause problems. This commit therefore adds an nmi_backtrace.backtrace_idle kernel boot parameter that causes nmi_cpu_backtrace() to dump stacks even of idle CPUs. Signed-off-by: Paul E. McKenney Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: commit 8bcbcdb7293cc24eb7b24b67ef2b29b3a45a49e0 Author: Martin Blumenstingl Date: Sat Aug 15 20:22:23 2020 +0200 ARM: dts: meson: move the L2 cache-controller inside the SoC node All IO mapped SoC peripherals should be within the "soc" node. Move the L2 cache-controller there as well since it's the only one not following this pattern. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Tested-by: Kevin Hilman Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200815182223.408965-1-martin.blumenstingl@googlemail.com commit b3d03daa7cd19a91266dc2cea3587dcf60e7a1f0 Author: Chuck Lever Date: Mon Aug 17 09:53:11 2020 -0400 RDMA/core: Move the rdma_show_ib_cm_event() macro Refactor: Make it globally available in the utilities header. Link: https://lore.kernel.org/r/159767239131.2968.9520990257041764685.stgit@klimt.1015granger.net Signed-off-by: Chuck Lever Signed-off-by: Jason Gunthorpe commit ced026e959bec5046afa310d6474e147b6294da2 Author: Rodrigo Vivi Date: Mon Aug 24 14:26:38 2020 -0400 drm/i915: Update DRIVER_DATE to 20200824 Signed-off-by: Rodrigo Vivi commit 52c3c3a59234a9725b5dcfe9729ed737d7843980 Author: Jiri Slaby Date: Mon Aug 24 11:54:25 2020 +0200 Revert "vc_screen: extract vcs_read_buf_header" This reverts commit b1c32fcfadf5593ab7a63261cc8a5747c36e627e, because Syzkaller reports a use-after-free, a write in vcs_read: BUG: KASAN: use-after-free in vcs_read_buf drivers/tty/vt/vc_screen.c:357 [inline] BUG: KASAN: use-after-free in vcs_read+0xaa7/0xb40 drivers/tty/vt/vc_screen.c:449 Write of size 2 at addr ffff8880a8014000 by task syz-executor.5/16936 CPU: 1 PID: 16936 Comm: syz-executor.5 Not tainted 5.9.0-rc1-next-20200820-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: ... kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 vcs_read_buf drivers/tty/vt/vc_screen.c:357 [inline] vcs_read+0xaa7/0xb40 drivers/tty/vt/vc_screen.c:449 There are two issues with the patch: 1) vcs_read rounds the 'count' *up* to an even number. So if we read odd bytes from the header (3 bytes in the reproducer), the second byte of a (2-byte/ushort) write to temporary con_buf won't fit. It is because with the patch applied, we only subtract the real number read (3 bytes) and not the whole header (4 bytes). 2) in this scenario, we perform unaligned accesses now: there are 2-byte/ushort writes to odd addresses. Due to the same reason as above. Revert this for now, re-think and retry later. Signed-off-by: Jiri Slaby Reported-by: syzbot+ad1f53726c3bd11180cb@syzkaller.appspotmail.com Fixes: b1c32fcfadf5 ("vc_screen: extract vcs_read_buf_header") Cc: akpm@linux-foundation.org Cc: nico@fluxnic.net Link: https://lore.kernel.org/r/20200824095425.4376-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 8d9290a4a8aa5d46073d558692d66a7190b81b90 Author: Gal Pressman Date: Tue Aug 18 14:08:35 2020 +0300 RDMA/efa: Remove redundant udata check from alloc ucontext response The alloc ucontext flow is always called with a valid udata, there's no need to test whether it's NULL. While at it, the 'udata->outlen' check is removed as well as we copy the minimum between the size of the response and outlen, so in case of zero outlen, zero bytes will be copied. Link: https://lore.kernel.org/r/20200818110835.54299-1-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 62cbff326788e4612cb541030d09c943caf78e29 Author: Kamal Heib Date: Thu Aug 20 15:35:12 2020 +0300 RDMA/vmw_pvrdma: Fix kernel-doc documentation Fix the kernel-doc documentation by matching between the functions definitions and documentation. Link: https://lore.kernel.org/r/20200820123512.105193-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Acked-by: Adit Ranadive Signed-off-by: Jason Gunthorpe commit fd49ddaf7e266b5892d659eb99d9f77841e5b4c0 Author: Mohammad Heib Date: Tue Aug 11 18:04:15 2020 +0300 RDMA/rxe: prevent rxe creation on top of vlan interface Creating rxe device on top of vlan interface will create a non-functional device that has an empty gids table and can't be used for rdma cm communication. This is caused by the logic in enum_all_gids_of_dev_cb()/is_eth_port_of_netdev(), which only considers networks connected to "upper devices" of the configured network device, resulting in an empty set of gids for a vlan interface, and attempts to connect via this rdma device fail in cm_init_av_for_response because no gids can be resolved. Apparently, this behavior was implemented to fit the HW-RoCE devices that create RoCE device per port, therefore RXE must behave the same like HW-RoCE devices and create rxe device per real device only. In order to communicate via a vlan interface, the user must use the gid index of the vlan address instead of creating rxe over vlan. Link: https://lore.kernel.org/r/20200811150415.3693-1-goody698@gmail.com Signed-off-by: Mohammad Heib Signed-off-by: Jason Gunthorpe commit 4a580877bdcb837e7a3754ae20798dcfccb44e80 Author: Luben Tuikov Date: Mon Aug 24 12:29:45 2020 -0400 drm/amdgpu: Get DRM dev from adev by inline-f Add a static inline adev_to_drm() to obtain the DRM device pointer from an amdgpu_device pointer. Signed-off-by: Luben Tuikov Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1348969ab68cb864034ec4fe48a86c157cc4e10d Author: Luben Tuikov Date: Mon Aug 24 12:27:47 2020 -0400 drm/amdgpu: drm_device to amdgpu_device by inline-f (v2) Get the amdgpu_device from the DRM device by use of an inline function, drm_to_adev(). The inline function resolves a pointer to struct drm_device to a pointer to struct amdgpu_device. v2: Use a typed visible static inline function instead of an invisible macro. Signed-off-by: Luben Tuikov Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 50166d1ce59e8f78660102ac07fea515ed695234 Author: Prike.Liang Date: Mon Jun 1 14:10:54 2020 +0800 drm/amdgpu: enable HDP clock gatting Enabe HDP SD/DS clock gatting in Renoir series. Signed-off-by: Prike.Liang Reviewed-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit d844812b28421c3409215a128a48ecfdaa82b91e Author: Prike.Liang Date: Mon Jun 1 14:07:13 2020 +0800 drm/amdgpu: enable ATHUB clock gatting Enable ATHUB clock gatting set in Renoir series. Signed-off-by: Prike.Liang Reviewed-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 6ec46653eb80d4d97b18298d81a80cf2ca81066c Author: Jiansong Chen Date: Fri Aug 21 16:20:47 2020 +0800 drm/amd/pm: set VCN pg per instances When deciding whether to set pg for vcn1, instances number is more generic than chip name. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 08ebb485f0ee8ba1c9ca3f83c9cdbda32b357869 Author: Dennis Li Date: Thu Aug 6 14:48:15 2020 +0800 drm/amdgpu: annotate a false positive recursive locking Re-apply commit 72e14ebf9fc09e33b28b70f00a2ed9821c198633 [ 584.110304] ============================================ [ 584.110590] WARNING: possible recursive locking detected [ 584.110876] 5.6.0-deli-v5.6-2848-g3f3109b0e75f #1 Tainted: G OE [ 584.111164] -------------------------------------------- [ 584.111456] kworker/38:1/553 is trying to acquire lock: [ 584.111721] ffff9b15ff0a47a0 (&adev->reset_sem){++++}, at: amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu] [ 584.112112] but task is already holding lock: [ 584.112673] ffff9b1603d247a0 (&adev->reset_sem){++++}, at: amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu] [ 584.113068] other info that might help us debug this: [ 584.113689] Possible unsafe locking scenario: [ 584.114350] CPU0 [ 584.114685] ---- [ 584.115014] lock(&adev->reset_sem); [ 584.115349] lock(&adev->reset_sem); [ 584.115678] *** DEADLOCK *** [ 584.116624] May be due to missing lock nesting notation [ 584.117284] 4 locks held by kworker/38:1/553: [ 584.117616] #0: ffff9ad635c1d348 ((wq_completion)events){+.+.}, at: process_one_work+0x21f/0x630 [ 584.117967] #1: ffffac708e1c3e58 ((work_completion)(&con->recovery_work)){+.+.}, at: process_one_work+0x21f/0x630 [ 584.118358] #2: ffffffffc1c2a5d0 (&tmp->hive_lock){+.+.}, at: amdgpu_device_gpu_recover+0xae/0x1030 [amdgpu] [ 584.118786] #3: ffff9b1603d247a0 (&adev->reset_sem){++++}, at: amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu] [ 584.119222] stack backtrace: [ 584.119990] CPU: 38 PID: 553 Comm: kworker/38:1 Kdump: loaded Tainted: G OE 5.6.0-deli-v5.6-2848-g3f3109b0e75f #1 [ 584.120782] Hardware name: Supermicro SYS-7049GP-TRT/X11DPG-QT, BIOS 3.1 05/23/2019 [ 584.121223] Workqueue: events amdgpu_ras_do_recovery [amdgpu] [ 584.121638] Call Trace: [ 584.122050] dump_stack+0x98/0xd5 [ 584.122499] __lock_acquire+0x1139/0x16e0 [ 584.122931] ? trace_hardirqs_on+0x3b/0xf0 [ 584.123358] ? cancel_delayed_work+0xa6/0xc0 [ 584.123771] lock_acquire+0xb8/0x1c0 [ 584.124197] ? amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu] [ 584.124599] down_write+0x49/0x120 [ 584.125032] ? amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu] [ 584.125472] amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu] [ 584.125910] ? amdgpu_ras_error_query+0x1b8/0x2a0 [amdgpu] [ 584.126367] amdgpu_ras_do_recovery+0x159/0x190 [amdgpu] [ 584.126789] process_one_work+0x29e/0x630 [ 584.127208] worker_thread+0x3c/0x3f0 [ 584.127621] ? __kthread_parkme+0x61/0x90 [ 584.128014] kthread+0x12f/0x150 [ 584.128402] ? process_one_work+0x630/0x630 [ 584.128790] ? kthread_park+0x90/0x90 [ 584.129174] ret_from_fork+0x3a/0x50 Each adev has owned lock_class_key to avoid false positive recursive locking. v2: 1. register adev->lock_key into lockdep, otherwise lockdep will report the below warning [ 1216.705820] BUG: key ffff890183b647d0 has not been registered! [ 1216.705924] ------------[ cut here ]------------ [ 1216.705972] DEBUG_LOCKS_WARN_ON(1) [ 1216.705997] WARNING: CPU: 20 PID: 541 at kernel/locking/lockdep.c:3743 lockdep_init_map+0x150/0x210 v3: change to use down_write_nest_lock to annotate the false dead-lock warning. Reviewed-by: Daniel Vetter Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit d95e8e97e2d522b7ebb1d5a64c01d8de307621dc Author: Dennis Li Date: Tue Aug 18 18:44:17 2020 +0800 drm/amdgpu: refine create and release logic of hive info Change to dynamically create and release hive info object, which help driver support more hives in the future. v2: Change to save hive object pointer in adev, to avoid locking xgmi_mutex every time when calling amdgpu_get_xgmi_hive. v3: 1. Change type of hive object pointer in adev from void* to amdgpu_hive_info*. 2. remove unnecessary variable initialization. Reviewed-by: Hawking Zhang Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit aac891685da661aeb97691e8724df231130bb452 Author: Dennis Li Date: Thu Aug 20 10:40:53 2020 +0800 drm/amdgpu: refine message print for devices of hive Using dev_xxx instead of DRM_xxx/pr_xxx to indicate which device of a hive is the message for. Reviewed-by: Christian König Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit cbfd17f7ba405d143c0db5ebcddc978cb4153762 Author: Dennis Li Date: Thu Aug 20 10:17:39 2020 +0800 drm/amdgpu: fix the nullptr issue when reenter GPU recovery in single gpu system, if driver reenter gpu recovery, amdgpu_device_lock_adev will return false, but hive is nullptr now. Reviewed-by: Hawking Zhang Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit 6049db43d6dd9cbb9d7f897839d15b0bc600e23c Author: Dennis Li Date: Thu Aug 20 10:06:32 2020 +0800 drm/amdgpu: change reset lock from mutex to rw_semaphore clients don't need reset-lock for synchronization when no GPU recovery. v2: change to return the return value of down_read_killable. v3: if GPU recovery begin, VF ignore FLR notification. Reviewed-by: Monk Liu Acked-by: Christian König Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit 66b8a9c0a747b9d05509d480f5054a65ac327515 Author: Jiansong Chen Date: Fri Aug 21 11:30:19 2020 +0800 drm/amd/pm: enable run_btc callback for sienna_cichlid DC BTC support for sienna_cichlid is added, it provides the DC tolerance and aging measurements. Signed-off-by: Jiansong Chen Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit ba1bab14b61752a9b37d749735f4ce8889e3397a Author: Furquan Shaikh Date: Thu Aug 20 00:52:41 2020 -0700 drivers: gpu: amd: Initialize amdgpu_dm_backlight_caps object to 0 in amdgpu_dm_update_backlight_caps In `amdgpu_dm_update_backlight_caps()`, there is a local `amdgpu_dm_backlight_caps` object that is filled in by `amdgpu_acpi_get_backlight_caps()`. However, this object is uninitialized before the call and hence the subsequent check for aux_support can fail since it is not initialized by `amdgpu_acpi_get_backlight_caps()` as well. This change initializes this local `amdgpu_dm_backlight_caps` object to 0. Reviewed-by: Christian König Signed-off-by: Furquan Shaikh Signed-off-by: Alex Deucher commit 4c319bbebef5491c1305d7b56e708f566f83d14a Author: Alex Dewar Date: Thu Aug 20 18:58:06 2020 +0100 drm/amd/pm: Remove unnecessary cast In init_powerplay_table_information() the value returned from kmalloc() is cast unnecessarily. Remove cast. Issue identified with Coccinelle. Signed-off-by: Alex Dewar Signed-off-by: Alex Deucher commit 26902e8c58c8e147ca126c83a9ba3f3ac8c5cc7b Author: Wang Hai Date: Wed Aug 19 19:34:09 2020 +0800 drm/amd/powerplay: remove duplicate include Remove asic_reg/nbio/nbio_6_1_offset.h which is included more than once Reviewed-by: Evan Quan Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Alex Deucher commit 5049a0526988d575c777db20a52eba5efaadbd2a Author: Lukas Bulwahn Date: Wed Aug 19 10:18:08 2020 +0200 drm/amd/display: remove unintended executable mode Besides the intended change, commit 4cc1178e166a ("drm/amdgpu: replace DRM prefix with PCI device info for gfx/mmhub") also set the source files mmhub_v1_0.c and gfx_v9_4.c to be executable, i.e., changed fromold mode 644 to new mode 755. Commit 241b2ec9317e ("drm/amd/display: Add dcn30 Headers (v2)") added the four header files {dpcs,dcn}_3_0_0_{offset,sh_mask}.h as executable, i.e., mode 755. Set to the usual modes for source and headers files and clean up those mistakes. No functional change. Reviewed-by: Christian König Signed-off-by: Lukas Bulwahn Signed-off-by: Alex Deucher commit 53b3f8f40e6cff36ae12b11e6d6b308af3c7e53f Author: Dennis Li Date: Wed Aug 19 17:23:03 2020 +0800 drm/amdgpu: refine codes to avoid reentering GPU recovery if other threads have holden the reset lock, recovery will fail to try_lock. Therefore we introduce atomic hive->in_reset and adev->in_gpu_reset, to avoid reentering GPU recovery. v2: drop "? true : false" in the definition of amdgpu_in_reset Reviewed-by: Hawking Zhang Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit c9977dffcc7e0f728e82209c140991c5bd27c491 Author: Nicholas Kazlauskas Date: Wed Aug 19 13:37:54 2020 -0400 drm/amd/display: Reject overlay plane configurations in multi-display scenarios [Why] These aren't stable on some platform configurations when driving multiple displays, especially on higher resolution. In particular the delay in asserting p-state and validating from x86 outweights any power or performance benefit from the hardware composition. Under some configurations this will manifest itself as extreme stutter or unresponsiveness especially when combined with cursor movement. [How] Disable these for now. Exposing overlays to userspace doesn't guarantee that they'll be able to use them in any and all configurations and it's part of the DRM contract to have userspace gracefully handle validation failures when they occur. Valdiation occurs as part of DC and this in particular affects RV, so disable this in dcn10_global_validation. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher commit 818b032433a345b2f5466660ae054806343263e5 Author: Mukul Joshi Date: Tue Aug 18 14:51:41 2020 -0400 drm/amdkfd: sparse: Fix warning in reading SDMA counters Add __user annotation to fix related sparse warning while reading SDMA counters from userland. Also, rework the read SDMA counters function by removing redundant checks. Reported-by: kernel test robot Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5f1dd4dda5c8796c405e856aaa11e187f6885924 Author: Borislav Petkov Date: Tue Aug 18 12:28:31 2020 +0200 x86/fsgsbase: Replace static_cpu_has() with boot_cpu_has() ptrace and prctl() are not really fast paths to warrant the use of static_cpu_has() and cause alternatives patching for no good reason. Replace with boot_cpu_has() which is simple and fast enough. No functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200818103715.32736-1-bp@alien8.de commit 3ced132a055c4e5046d21732393ae6848ff309e0 Author: Oliver O'Halloran Date: Tue Aug 4 10:54:10 2020 +1000 powerpc/nx: Don't pack struct coprocessor_request_block Building with W=1 results in the following warning: In file included from arch/powerpc/platforms/powernv/vas-fault.c:16: ./arch/powerpc/include/asm/icswx.h:159:1: error: alignment 1 of ‘struct coprocessor_request_block’ is less than 16 [-Werror=packed-not-aligned] 159 | } __packed; | ^ ./arch/powerpc/include/asm/icswx.h:159:1: error: alignment 1 of ‘struct coprocessor_request_block’ is less than 16 [-Werror=packed-not-aligned] ./arch/powerpc/include/asm/icswx.h:159:1: error: alignment 1 of ‘struct coprocessor_request_block’ is less than 16 [-Werror=packed-not-aligned] ./arch/powerpc/include/asm/icswx.h:159:1: error: alignment 1 of ‘struct coprocessor_request_block’ is less than 16 [-Werror=packed-not-aligned] cc1: all warnings being treated as errors This happens because coprocessor_request_block includes several sub-structures with an alignment specified using the __aligned(XX) attribute. The problem comes from coprocessor_request_block having the __packed attribute. Packing the structure causes the preferred alignment of the nested structures to be ignored and we get the warnings as a result. This isn't a problem in practice since the struct is defined with explicit padding in the form of reserved fields, but we'd like to get rid of the spurious warnings. The simplest solution is to remove the packed attribute and use a BUILD_BUG_ON() to ensure the struct is the correct (expected by HW) size compile time. Also add a __aligned(128) to the request block structure since Book4 for P8 suggests the HW requires it to be aligned to a 128 byte boundary. There's a similar requirement for P9 since the COPY and PASTE instructions used to invoke VAS/NX accelerators operates on a cache line boundary. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200804005410.146094-7-oohall@gmail.com commit fb248c3121af713f31736af359608491544cfc23 Author: Oliver O'Halloran Date: Tue Aug 4 10:54:08 2020 +1000 powerpc/powernv: Fix spurious kerneldoc warnings in opal-prd.c Comments opening with /** are parsed by kerneldoc and this causes the following warning to be printed: arch/powerpc/platforms/powernv/opal-prd.c:31: warning: cannot understand function prototype: 'struct opal_prd_msg_queue_item ' opal_prd_mesg_queue_item is an internal data structure so there's no real need for it to be documented at all. Fix up the comment to squash the warning. Signed-off-by: Oliver O'Halloran Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200804005410.146094-5-oohall@gmail.com commit 3b70464aa78917e88c1d4bfc2100c344c0eda8e0 Author: Oliver O'Halloran Date: Tue Aug 4 10:54:07 2020 +1000 powerpc/powernv: Staticify functions without prototypes There's a few scattered in the powernv platform. Signed-off-by: Oliver O'Halloran Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200804005410.146094-4-oohall@gmail.com commit 8471c1dd93de9a2278d41c527b76291e4ace8f1c Author: Oliver O'Halloran Date: Tue Aug 4 10:54:06 2020 +1000 powerpc/powernv: Include asm/powernv.h from the local powernv.h The asm/powernv.h header provides prototypes for functions which need to be called by non-powernv platform code. Also include it in the powernv.h that's local to the platform directory to squash some warnings about non-static functions missing prototypes. Also include powernv.h since from opal-memcons.c since it has the prototypes for the memcons wrangling functions which are used for the opal and ultravisor msglog. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200804005410.146094-3-oohall@gmail.com commit f6bac19cf65c5be21d14a0c9684c8f560f2096dd Author: Oliver O'Halloran Date: Tue Aug 4 10:54:05 2020 +1000 powerpc/powernv/smp: Fix spurious DBG() warning When building with W=1 we get the following warning: arch/powerpc/platforms/powernv/smp.c: In function ‘pnv_smp_cpu_kill_self’: arch/powerpc/platforms/powernv/smp.c:276:16: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body] 276 | cpu, srr1); | ^ cc1: all warnings being treated as errors The full context is this block: if (srr1 && !generic_check_cpu_restart(cpu)) DBG("CPU%d Unexpected exit while offline srr1=%lx!\n", cpu, srr1); When building with DEBUG undefined DBG() expands to nothing and GCC emits the warning due to the lack of braces around an empty statement. Signed-off-by: Oliver O'Halloran Reviewed-by: Joel Stanley Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200804005410.146094-2-oohall@gmail.com commit 346427e668163e85cbbe14e4d9a2ddd49df1536c Author: Colin Ian King Date: Tue Aug 4 18:43:16 2020 +0100 powerpc/oprofile: fix spelling mistake "contex" -> "context" There is a spelling mistake in a pr_debug message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200804174316.402425-1-colin.king@canonical.com commit 1c0a7ac0ec63ee626f669c9a4e278f6ae1dbfcf2 Author: Aneesh Kumar K.V Date: Fri Jul 31 17:05:00 2020 +0530 powerpc/vmemmap: Don't warn if we don't find a mapping vmemmap list entry Now that we are handling vmemmap list allocation failure correctly, don't WARN in section deactivate when we don't find a mapping vmemmap list entry. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200731113500.248306-2-aneesh.kumar@linux.ibm.com commit ccaea15296f9773abd43aaa17ee4b88848e4a505 Author: Aneesh Kumar K.V Date: Fri Jul 31 17:04:59 2020 +0530 powerpc/vmemmap: Fix memory leak with vmemmap list allocation failures. If we fail to allocate vmemmap list, we don't keep track of allocated vmemmap block buf. Hence on section deactivate we skip vmemmap block buf free. This results in memory leak. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200731113500.248306-1-aneesh.kumar@linux.ibm.com commit 18102e4bcc47f5b5ac70e2e4461d022c1ee6df24 Author: zhengbin Date: Tue Nov 19 14:14:34 2019 +0800 powerpc/powernv: Remove set but not used variable 'parent' Fix gcc '-Wunused-but-set-variable' warning: arch/powerpc/platforms/powernv/pci-ioda.c: In function pnv_ioda_configure_pe: arch/powerpc/platforms/powernv/pci-ioda.c:867:18: warning: variable parent set but not used [-Wunused-but-set-variable] It is not used since commit b131a8425c34 ("powerpc/powernv: Set PELTV for compound PEs") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1574144074-142032-6-git-send-email-zhengbin13@huawei.com commit ef23cf9a89a7aec19a29d548d1e219d436b23b6e Author: zhengbin Date: Tue Nov 19 14:14:31 2019 +0800 powerpc/perf: Remove set but not used variable 'target' Fix gcc '-Wunused-but-set-variable' warning: arch/powerpc/perf/imc-pmu.c: In function trace_imc_event_init: arch/powerpc/perf/imc-pmu.c:1292:22: warning: variable target set but not used [-Wunused-but-set-variable] It is introduced by commit 012ae244845f ("powerpc/perf: Trace imc PMU functions"), but never used, so remove it. Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1574144074-142032-3-git-send-email-zhengbin13@huawei.com commit 738e6cad0ace88edec8f4ffa082749ad5df26409 Author: zhengbin Date: Tue Nov 19 14:14:30 2019 +0800 powerpc/fadump: Remove set but not used variable 'elf' Fix gcc '-Wunused-but-set-variable' warning: arch/powerpc/kernel/fadump.c: In function fadump_update_elfcore_header: arch/powerpc/kernel/fadump.c:790:17: warning: variable elf set but not used [-Wunused-but-set-variable] It is introduced by commit ebaeb5ae2437 ("fadump: Convert firmware-assisted cpu state dump data into elf notes."), but never used, so remove it. Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1574144074-142032-2-git-send-email-zhengbin13@huawei.com commit 843dc8ee23d1b353fa9cc24da3e52be0111d5931 Author: Biwen Li Date: Wed May 27 11:42:28 2020 +0800 powerc/dtc/t1024rdb: remove interrupts property Since the interrupt pin for RTC DS1339 is not connected to the CPU on T1024RDB, remove the interrupt property from the device tree. This also fix the following warning for hwclock.util-linux: $ hwclock.util-linux hwclock.util-linux: select() to /dev/rtc0 to wait for clock tick timed out Signed-off-by: Biwen Li Acked-by: Li Yang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200527034228.23793-2-biwen.li@oss.nxp.com commit 8c7614d648037b0776e0b76cb62911be3b059ea4 Author: Biwen Li Date: Wed May 27 11:42:27 2020 +0800 powerpc/dts/t4240rdb: remove interrupts property Since the interrupt pin for RTC DS1374 is not connected to the CPU on T4240RDB, remove the interrupt property from the device tree. This also fix the following warning for hwclock.util-linux: $ hwclock.util-linux hwclock.util-linux: select() to /dev/rtc0 to wait for clock tick timed out Signed-off-by: Biwen Li Acked-by: Li Yang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200527034228.23793-1-biwen.li@oss.nxp.com commit 40ac790d99c6dd16b367d5c2339e446a5f1b0593 Author: Frederic Barrat Date: Tue Apr 7 13:56:01 2020 +0200 cxl: Rework error message for incompatible slots Improve the error message shown if a capi adapter is plugged on a capi-incompatible slot directly under the PHB (no intermediate switch). Fixes: 5632874311db ("cxl: Add support for POWER9 DD2") Cc: stable@vger.kernel.org # 4.14+ Signed-off-by: Frederic Barrat Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200407115601.25453-1-fbarrat@linux.ibm.com commit 374f6178f3483dcad151fc14b2fad92ed6652f07 Author: Frederic Barrat Date: Fri Apr 3 17:38:38 2020 +0200 ocxl: Remove custom service to allocate interrupts We now allocate interrupts through xive directly. Signed-off-by: Frederic Barrat Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200403153838.29224-5-fbarrat@linux.ibm.com commit dde6f18a8779dcd88d9fd5d6336032fee7e07fcd Author: Frederic Barrat Date: Fri Apr 3 17:38:37 2020 +0200 ocxl: Don't return trigger page when allocating an interrupt Existing users of ocxl_link_irq_alloc() have been converted to obtain the trigger page of an interrupt through xive directly, we therefore have no need to return the trigger page when allocating an interrupt. It also allows ocxl to use the xive native interface to allocate interrupts, instead of its custom service. Signed-off-by: Frederic Barrat Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200403153838.29224-4-fbarrat@linux.ibm.com commit ad857d47df6a1adc9798558701dd5426643b859f Author: Frederic Barrat Date: Fri Apr 3 17:38:36 2020 +0200 ocxl: Access interrupt trigger page from xive directly We can access the trigger page through standard APIs so let's use it and avoid saving it when allocating the interrupt. It will also allow to simplify allocation in a later patch. Signed-off-by: Frederic Barrat Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200403153838.29224-3-fbarrat@linux.ibm.com commit 1e89da5ef9c28c673e86048c89ef9495618d987d Author: Frederic Barrat Date: Fri Apr 3 17:38:35 2020 +0200 scsi: cxlflash: Access interrupt trigger page from xive directly xive is already mapping the trigger page in kernel space and it can be accessed through standard APIs, so let's reuse it and simplify the code. Signed-off-by: Frederic Barrat Reviewed-by: Cédric Le Goater Acked-by: Matthew R. Ochs Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200403153838.29224-2-fbarrat@linux.ibm.com commit d3e669f31ec35856f5e85df9224ede5bdbf1bc7b Author: Nicholas Mc Guire Date: Wed Jul 4 10:03:27 2018 +0200 powerpc/icp-hv: Fix missing of_node_put() in success path Both of_find_compatible_node() and of_find_node_by_type() will return a refcounted node on success - thus for the success path the node must be explicitly released with a of_node_put(). Fixes: 0b05ac6e2480 ("powerpc/xics: Rewrite XICS driver") Signed-off-by: Nicholas Mc Guire Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1530691407-3991-1-git-send-email-hofrat@osadl.org commit 67c3e59443f5fc77be39e2ce0db75fbfa78c7965 Author: Nicholas Mc Guire Date: Mon Jul 2 11:08:16 2018 +0200 powerpc/pseries: Fix missing of_node_put() in rng_init() The call to of_find_compatible_node() returns a node pointer with refcount incremented thus it must be explicitly decremented here before returning. Fixes: a489043f4626 ("powerpc/pseries: Implement arch_get_random_long() based on H_RANDOM") Signed-off-by: Nicholas Mc Guire Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1530522496-14816-1-git-send-email-hofrat@osadl.org commit 625326ea9c84872c71f90b97a9def3c01db9100f Author: Thomas Bogendoerfer Date: Sat Aug 22 10:04:27 2020 +0200 MIPS: Remove PNX833x alias NXP_STB22x Remove another unused MIPS platform. Signed-off-by: Thomas Bogendoerfer commit 725ac66ed278f5cea418251e35ca1e289d497c6f Author: Thomas Bogendoerfer Date: Sat Aug 22 10:02:51 2020 +0200 MIPS: Paravirt: remove remaining pieces of paravirt Commit 35546aeede8e ("MIPS: Retire kvm paravirt") removed kvm paravirt support, but missed arch/mips/include/mach-paravirt. Remove it as well. Signed-off-by: Thomas Bogendoerfer commit b8e2c8bbdf7778c6e3c65db21ababb1dfa794282 Author: Gustavo A. R. Silva Date: Fri Jun 19 12:25:14 2020 -0500 NTB: Use struct_size() helper in devm_kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, remove unnecessary variable _struct_size_. This code was detected with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Logan Gunthorpe Signed-off-by: Jon Mason commit dbb8df5c2d27610a87b0168a8acc89d73fbfde94 Author: Dinghao Liu Date: Sun Aug 23 14:55:12 2020 +0800 ntb: intel: Fix memleak in intel_ntb_pci_probe The default error branch of a series of pdev_is_gen calls should free ndev just like what we've done in these calls. Fixes: 26bfe3d0b227 ("ntb: intel: Add Icelake (gen4) support for Intel NTB") Signed-off-by: Dinghao Liu Acked-by: Dave Jiang Signed-off-by: Jon Mason commit b5fb51340f07a65932af0df82d11db06478439f7 Author: Robert Richter Date: Mon Aug 24 14:49:31 2020 +0200 EDAC/highbank: Handover Calxeda Highbank maintenance to Andre Przywara I do not have hardware anymore, nor there is ongoing development. So handover maintenance to Andre who already maintains the last remainings of Calxeda. Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Acked-by: Andre Przywara Link: https://lkml.kernel.org/r/20200824124931.2933-1-rric@kernel.org commit 785167a114855c5aa75efca97000e405c2cc85bf Author: Håkon Bugge Date: Mon Aug 3 08:19:41 2020 +0200 IB/mlx4: Adjust delayed work when a dup is observed When scheduling delayed work to clean up the cache, if the entry already has been scheduled for deletion, we adjust the delay. Fixes: 3cf69cc8dbeb ("IB/mlx4: Add CM paravirtualization") Link: https://lore.kernel.org/r/20200803061941.1139994-7-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit 227a0e142e375909959a74b7782403e14331f6f3 Author: Håkon Bugge Date: Mon Aug 3 08:19:40 2020 +0200 IB/mlx4: Add support for REJ due to timeout A CM REJ packet with its reason equal to timeout is a special beast in the sense that it doesn't have a Remote Communication ID nor does it have a Remote Port GID. Using CX-3 virtual functions, either from a bare-metal machine or pass-through from a VM, MAD packets are proxied through the PF driver. Since the VF drivers have separate name spaces for MAD Transaction Ids (TIDs), the PF driver has to re-map the TIDs and keep the book keeping in a cache. This proxying doesn't not handle said REJ packets. If the active side abandons its connection attempt after having sent a REQ, it will send a REJ with the reason being timeout. This example can be provoked by a simple user-verbs program, which ends up doing: rdma_connect(cm_id, &conn_param); rdma_destroy_id(cm_id); using the async librdmacm API. Having dynamic debug prints enabled in the mlx4_ib driver, we will then see: mlx4_ib_demux_cm_handler: Couldn't find an entry for pv_cm_id 0x0, attr_id 0x12 The solution is to introduce a radix-tree. When a REQ packet is received and handled in mlx4_ib_demux_cm_handler(), we know the connecting peer's para-virtual cm_id and the destination slave. We then insert an entry into the tree with said information. We also schedule work to remove this entry from the tree and free it, in order to avoid memory leak. When a REJ packet with reason timeout is received, we can look up the slave in the tree, and deliver the packet to the correct slave. When a duplicate REQ packet is received, the entry is in the tree. In this case, we adjust the delayed work in order to avoid a too premature eviction of the entry. When cleaning up, we simply traverse the tree and modify any delayed work to use a zero delay. A subsequent flush of the system_wq will ensure all entries being wiped out. Fixes: 3cf69cc8dbeb ("IB/mlx4: Add CM paravirtualization") Link: https://lore.kernel.org/r/20200803061941.1139994-6-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit 7fd1507df7cee9c533f38152fcd1dd769fcac6ce Author: Håkon Bugge Date: Mon Aug 3 08:19:39 2020 +0200 IB/mlx4: Fix starvation in paravirt mux/demux The mlx4 driver will proxy MAD packets through the PF driver. A VM or an instantiated VF will send its MAD packets to the PF driver using loop-back. The PF driver will be informed by an interrupt, but defer the handling and polling of CQEs to a worker thread running on an ordered work-queue. Consider the following scenario: the VMs will in short proximity in time, for example due to a network event, send many MAD packets to the PF driver. Lets say there are K VMs, each sending N packets. The interrupt from the first VM will start the worker thread, which will poll N CQEs. A common case here is where the PF driver will multiplex the packets received from the VMs out on the wire QP. But before the wire QP has returned a send CQE and associated interrupt, the other K - 1 VMs have sent their N packets as well. The PF driver has to multiplex K * N packets out on the wire QP. But the send-queue on the wire QP has a finite capacity. So, in this scenario, if K * N is larger than the send-queue capacity of the wire QP, we will get MAD packets dropped on the floor with this dynamic debug message: mlx4_ib_multiplex_mad: failed sending GSI to wire on behalf of slave 2 (-11) and this despite the fact that the wire send-queue could have capacity, but the PF driver isn't aware, because the wire send CQEs have not yet been polled. We can also have a similar scenario inbound, with a wire recv-queue larger than the tunnel QP's send-queue. If many remote peers send MAD packets to the very same VM, the tunnel send-queue destined to the VM could allegedly be construed to be full by the PF driver. This starvation is fixed by introducing separate work queues for the wire QPs vs. the tunnel QPs. With this fix, using a dual ported HCA, 8 VFs instantiated, we could run cmtime on each of the 18 interfaces towards a similar configured peer, each cmtime instance with 800 QPs (all in all 14400 QPs) without a single CM packet getting lost. Fixes: 3cf69cc8dbeb ("IB/mlx4: Add CM paravirtualization") Link: https://lore.kernel.org/r/20200803061941.1139994-5-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit 0ae207fb91a897780f0853864d80c48edec7f374 Author: Håkon Bugge Date: Mon Aug 3 08:19:38 2020 +0200 IB/mlx4: Separate tunnel and wire bufs parameters Using CX-3 in virtualized mode, MAD packets are proxied through the PF driver. The feed is N tunnel QPs, and what is received from the VFs is multiplexed out on the wire QP. Since this is a many-to-one scenario, it is better to have separate initialization parameters for the two usages. The number of wire and tunnel bufs are yanked up to 2K and 512 respectively. With this set of parameters, a system consisting of eight physical servers, each with eight VMs and 14 I/O servers (BM), can run switch fail-over without seeing: mlx4_ib_demux_mad: failed sending GSI to slave 3 via tunnel qp (-11) or mlx4_ib_multiplex_mad: failed sending GSI to wire on behalf of slave 2 (-11) Fixes: 3cf69cc8dbeb ("IB/mlx4: Add CM paravirtualization") Link: https://lore.kernel.org/r/20200803061941.1139994-4-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit e7d087fce63fada387afcc6c31a2eaf81452baee Author: Håkon Bugge Date: Mon Aug 3 08:19:37 2020 +0200 IB/mlx4: Add support for MRA Using CX-3 in virtualized mode, MAD packets are proxied through the PF driver. However, the handling lacks support of the MRA (Message Receipt Acknowledgment) packet. When having dynamic debug enabled, we see tons of: mlx4_ib_multiplex_cm_handler: id{slave: 7, sl_cm_id: 0x8fcb45a0} is NULL! attr_id: 0x11 Fixes: 3cf69cc8dbeb ("IB/mlx4: Add CM paravirtualization") Link: https://lore.kernel.org/r/20200803061941.1139994-3-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit 094619449a16672f9815964e1ad39e11ff84ae2c Author: Håkon Bugge Date: Mon Aug 3 08:19:36 2020 +0200 IB/mlx4: Add and improve logging Add missing check for success after call to mlx4_ib_send_to_wire() in mlx4_ib_multiplex_mad(). Amended the existing pr_debug() in mlx4_ib_multiplex_cm_handler() and mlx4_ib_demux_cm_handler() with attr_id during a lookup failure. Removed two noisy pr_debug() in mad.c Fixes: 3cf69cc8dbeb ("IB/mlx4: Add CM paravirtualization") Link: https://lore.kernel.org/r/20200803061941.1139994-2-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit 20c05a05506361a6c355e9944d5616f5ed1e01c8 Author: Vladimir Oltean Date: Mon Aug 24 00:26:57 2020 +0300 spi: spi-fsl-dspi: delete EOQ transfer mode After the only user of the limited EOQ mode has now been converted to DMA as of commit b09058bbf5f0 ("spi: spi-fsl-dspi: set ColdFire to DMA mode"), we can finally delete this code. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20200823212657.2400075-1-olteanv@gmail.com Signed-off-by: Mark Brown commit c8b2c8949c45b01d75237331fc1387036b952d58 Author: ChiYuan Huang Date: Mon Aug 24 10:05:13 2020 +0800 regulator: rt4801: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/rt4801-regulator.c:206:34: warning: unused variable 'rt4801_of_id' [-Wunused-const-variable] 206 | static const struct of_device_id rt4801_of_id[] = { | ^~~~~~~~~~~~ Signed-off-by: ChiYuan Huang Reported-by: kernel test robot Link: https://lore.kernel.org/r/1598234713-8532-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit a5f7949570dc7262d3239739b0cdaa001f935d4b Author: Jisheng Zhang Date: Mon Aug 24 10:32:14 2020 +0800 regulator: mp886x: use "mps,switch-frequency-hz" As Rob suggested, use the "mps,switch-frequency-hz" instead of the "mps,switch-frequency" for switch frequency. Fortunately, the switch frequency support isn't released, so we can modify it now without any concern. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200824102402.4047fa5f@xhacker.debian Signed-off-by: Mark Brown commit c76a2f9ecdcb44cdcdb2de82e90d84283736aeb2 Author: Randy Dunlap Date: Fri Aug 7 09:51:34 2020 -0700 selinux: delete repeated words in comments Drop a repeated word in comments. {open, is, then} Signed-off-by: Randy Dunlap Cc: Paul Moore Cc: Stephen Smalley Cc: Eric Paris Cc: selinux@vger.kernel.org Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org [PM: fix subject line] Signed-off-by: Paul Moore commit aafdeba5cbc14cecee3797e669473b70a2b3e81e Merge: c1e47e8919da5 3f2c656491af6 Author: Mark Brown Date: Mon Aug 24 13:59:47 2020 +0100 Merge series "ASoC: Intel: machine driver updates for 5.10" from Pierre-Louis Bossart : This series updates the tables used to select SoundWire configurations for CometLake and TigerLake, and adds support for SDCA (SoundWire Device Class for Audio) codecs in the common machine driver. These codec drivers are still being tested on early silicon/boards and will be contributed at a later time. For TigerLake Chromebooks a new DMI quirk is added, as well as a means to override the topology names. A pm_runtime fix is also provided to deal with playback/capture dependencies with an amplifier w/ feedback. I also included a minor codec correction for the TGL amplifier. Bard Liao (5): ASoC: Intel: modify SoundWire version id in acpi match table ASoC: Intel: sof_sdw: check SoundWire version when matching codec ASoC: Intel: sof_sdw: rename id as part_id ASoC: Intel: sof_sdw: add rt711 rt1316 rt714 SDCA codec support. ASoC: Intel: sof_sdw: clean-up inclusion of header files Pierre-Louis Bossart (5): ASoC: Intel: soc-acpi: cnl: add support for rt5682 on SoundWire link2 ASoC: Intel: sof-soundwire: add support for rt5682 on link2 ASoC: Intel: soc-acpi: mirror CML and TGL configurations ASoC: Intel: soc-acpi: add support for SDCA boards ASoC: codecs: max98373-sdw: add missing test on resume Rander Wang (2): ASoC: Intel: tgl_max98373: fix a runtime pm issue in multi-thread case ASoC: Intel: sof_sdw: Add support for product Ripto Sathyanarayana Nujella (2): ASoC: Intel: sof_rt5682: override quirk data for tgl_max98373_rt5682 ASoC: SOF: Add topology filename override based on dmi data match sound/soc/codecs/max98373-sdw.c | 3 + sound/soc/intel/boards/Kconfig | 3 + sound/soc/intel/boards/Makefile | 7 +- sound/soc/intel/boards/sof_maxim_common.c | 7 +- sound/soc/intel/boards/sof_rt5682.c | 13 ++ sound/soc/intel/boards/sof_sdw.c | 98 +++++++--- sound/soc/intel/boards/sof_sdw_common.h | 22 ++- sound/soc/intel/boards/sof_sdw_dmic.c | 1 + sound/soc/intel/boards/sof_sdw_max98373.c | 2 + sound/soc/intel/boards/sof_sdw_rt1308.c | 2 + sound/soc/intel/boards/sof_sdw_rt1316.c | 113 ++++++++++++ sound/soc/intel/boards/sof_sdw_rt5682.c | 2 + sound/soc/intel/boards/sof_sdw_rt700.c | 2 + sound/soc/intel/boards/sof_sdw_rt711.c | 2 + sound/soc/intel/boards/sof_sdw_rt711_sdca.c | 174 ++++++++++++++++++ sound/soc/intel/boards/sof_sdw_rt715_sdca.c | 42 +++++ .../intel/common/soc-acpi-intel-cml-match.c | 79 +++++++- .../intel/common/soc-acpi-intel-cnl-match.c | 33 +++- .../intel/common/soc-acpi-intel-icl-match.c | 10 +- .../intel/common/soc-acpi-intel-tgl-match.c | 165 ++++++++++++++++- sound/soc/sof/intel/hda.c | 8 +- sound/soc/sof/sof-pci-dev.c | 24 +++ 22 files changed, 764 insertions(+), 48 deletions(-) create mode 100644 sound/soc/intel/boards/sof_sdw_rt1316.c create mode 100644 sound/soc/intel/boards/sof_sdw_rt711_sdca.c create mode 100644 sound/soc/intel/boards/sof_sdw_rt715_sdca.c base-commit: fcea8b023a5f06ea0180ae65b01520b0414ee325 -- 2.25.1 commit c1e47e8919da525c803d1557a30e44441db1e5ee Author: Shengjiu Wang Date: Mon Aug 24 15:58:07 2020 +0800 ASoC: fsl_sai: Add -EPROBE_DEFER check for regmap init Regmap initialization may return -EPROBE_DEFER for clock may not be ready, so check -EPROBE_DEFER error type before start another Regmap initialization. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1598255887-1391-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 2ff6d5a108c6b7c07d1093c38e0def015edd325d Author: Shengjiu Wang Date: Sun Aug 23 21:54:37 2020 +0800 ASoC: ak5558: Add regulator support "AVDD" is for analog power supply, "DVDD" is for digital power supply, they can improve the power management. As the regulator is enabled in pm runtime resume, which is behind the component driver probe, so accessing registers in component driver probe will fail. Fix this issue by enabling regcache_cache_only after pm_runtime_enable. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1598190877-9213-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 5edc8c4fe019b920ae9bd1e3413d66f6e8adf29b Author: Shengjiu Wang Date: Sun Aug 23 21:54:36 2020 +0800 ASoC: dt-bindings: ak5558: Add power supply property AVDD-supply is for Analog power supply DVDD-supply is for Digital power supply Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1598190877-9213-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 0c08ed48c9563d93dd4a64dada9d551c85e6cf0e Author: Guido Günther Date: Sun Aug 23 09:18:08 2020 +0200 arm64: defconfig: Enable imx8mq-librem5-devkit display stack Enable the panel, NWL DSI host controller and dphy. This also needs the reset controller. Signed-off-by: Guido Günther Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 6ab28d61fe45c9a0dc5da728091934dc40f9791f Author: Guido Günther Date: Sun Aug 23 09:18:07 2020 +0200 arm64: defconfig: re-sync DRM related defconfig bits This moves the CONFIG_DRM_SIMPLE_BRIDGE entry around making further updates simpler. Signed-off-by: Guido Günther Signed-off-by: Shawn Guo commit 3f2c656491af6698cb3f18d5bd34afa1b54096d2 Author: Bard Liao Date: Fri Aug 21 14:56:03 2020 -0500 ASoC: Intel: sof_sdw: clean-up inclusion of header files "struct snd_soc_dapm_widget" and "struct snd_kcontrol_new" are used in most of these .c files. Adding the header files to prevent from depending on Reported-by: Guennadi Liakhovetski Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b75bea4b8834c1253b00d5f8df2dd3ce09d2e305 Author: Bard Liao Date: Fri Aug 21 14:56:01 2020 -0500 ASoC: intel: sof_sdw: add rt711 rt1316 rt714 SDCA codec support. Add rt711, rt1316, and rt714 SDCA codecs support in sof_sdw machine driver. Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5253a73d567dcd75e62834ff5f502ea9470e5722 Author: Sathyanarayana Nujella Date: Fri Aug 21 14:56:00 2020 -0500 ASoC: SOF: Add topology filename override based on dmi data match Add topology filename override based on system DMI data matching, typically to account for a different hardware layout. In ACPI based systems, the tplg_filename is pre-defined in an ACPI machine table. When a DMI quirk is detected, the sof_pdata->tplg_filename is not set with the hard-coded ACPI value, and instead is set with the DMI-specific filename. Reviewed-by: Guennadi Liakhovetski Signed-off-by: Sathyanarayana Nujella Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 3e1734b64ce786c54dc98adcfe67941e6011d735 Author: Sathyanarayana Nujella Date: Fri Aug 21 14:55:59 2020 -0500 ASoC: Intel: sof_rt5682: override quirk data for tgl_max98373_rt5682 A Chrome System based on tgl_max98373_rt5682 has different SSP interface configurations. Using DMI data of this variant DUT, override quirk data. Reviewed-by: Guennadi Liakhovetski Signed-off-by: Sathyanarayana Nujella Signed-off-by: Mac Chiang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 626200df2498ff3044170d0f02b463ac0ec899c5 Author: Rander Wang Date: Fri Aug 21 14:55:58 2020 -0500 SoC: Intel: sof_sdw: Add support for product Ripto Ripto is another product based on TGL with the same audio hardware configuration as Volteer. Reviewed-by: Bard Liao Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 535df653f75583a25c6bbb2eaaa0b121b47460c4 Author: Bard Liao Date: Fri Aug 21 14:55:56 2020 -0500 ASoC: Intel: sof_sdw: rename id as part_id The "id" field in sof_sdw_codec_info struct is actually the "part id". Rename to prevent confusions. Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2e2d287bbe613be4848e83be9aa8e99e8b9f7dc0 Author: Bard Liao Date: Fri Aug 21 14:55:55 2020 -0500 ASoC: Intel: sof_sdw: check SoundWire version when matching codec Some codecs with the same part id but different SoundWire versions have different configurations. So we have to separate them in codec_info_list[]. Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 65fae64d79d2cbad43819c1ab83390594fac7fcb Author: Pierre-Louis Bossart Date: Fri Aug 21 14:55:54 2020 -0500 ASoC: codecs: max98373-sdw: add missing test on resume All existing SoundWire codecs follow the same pattern on resume, except for this codec which doesn't test if the hardware is initialized. Reviewed-by: Guennadi Liakhovetski Reviewed-by: Bard Liao Reviewed-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e300486ad94d2608ebc3aaed4e03e86eeeb97084 Author: Rander Wang Date: Fri Aug 21 14:55:53 2020 -0500 ASoC: Intel: tgl_max98373: fix a runtime pm issue in multi-thread case When the playback & capture streams are stopped simultaneously, the SOF PCI device will remain pm_runtime active. The root-cause is a race condition with two threads reaching the trigger function at the same time. They see another stream is active so the dapm pin is not disabled, so the codec remains active as well as the parent PCI device. For max98373, the capture stream provides feedback when playback is working and it is unused when playback is stopped. So the dapm pin should be set only when playback is active. Reviewed-by: Ranjani Sridharan Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 44751fc5f0de07b0a1ab57e9beab9789638d76d2 Author: Pierre-Louis Bossart Date: Fri Aug 21 14:55:52 2020 -0500 ASoC: Intel: soc-acpi: add support for SDCA boards The description and board layout is similar to previous ones for CometLake and TigerLake, except for a bump to SoundWire 1.2 and updates to part numbers to reflect the SDCA (SoundWire Device Class for Audio) hardware support. Note that one of the RT1316 amplifiers uses a non-zero UniqueID which is not required and will be ignored. Reviewed-by: Ranjani Sridharan Reviewed-by: Jaska Uimonen Reviewed-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6cb8bd60ba5ca9eb8f05f3f8351bbbcb6b92c525 Author: Pierre-Louis Bossart Date: Fri Aug 21 14:55:51 2020 -0500 ASoC: Intel: soc-acpi: mirror CML and TGL configurations Some TGL devices use the same audio hardware as on CML platforms, with RT711 on link0, RT1308 on link1 and optionally link2, and RT715 on link 3. To clarify configurations, the rt1308 configurations are split between single amp on link1 and dual amps on link1. The case with two amps on different links is already identified with the group1 attribute. Reviewed-by: Bard Liao Reviewed-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b161a12192f4b88cede8a563a6ebd2336d905d18 Author: Pierre-Louis Bossart Date: Fri Aug 21 14:55:50 2020 -0500 ASoC: Intel: sof-soundwire: add support for rt5682 on link2 The UpExtreme board provides support for SoundWire link2 in 2 of the 3 advanced modes. Let's use it w/ rt5682. Reviewed-by: Bard Liao Reviewed-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6f7cf9125ed43daaf4c5dd34ebcd96c978fcd2b2 Author: Pierre-Louis Bossart Date: Fri Aug 21 14:55:49 2020 -0500 ASoC: Intel: soc-acpi: cnl: add support for rt5682 on SoundWire link2 Add one of the configurations for rt5682 w/ the Up Extreme Advanced Audio mode using the SoundWire link2. Reviewed-by: Bard Liao Reviewed-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 69a785da525e8bdfaa8a9c000fb3af714f0d719b Author: Bard Liao Date: Fri Aug 21 14:55:48 2020 -0500 ASoC: Intel: modify SoundWire version id in acpi match table The SoundWire version id of the existing RT1308, RT711, and RT715 codecs should be 2 (index for SoundWire 1.1), it was mistakenly set as 1 which pointed to the wrong version (SoundWire 1.0). This off-by-one error had no functional impact so far since the version number was not used, however in future patches this version will be required. Reviewed-by: Rander Wang Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8aaf6264fc7fde15864c3e4d84ccc8b3af6811f3 Author: Viresh Kumar Date: Thu Aug 20 13:18:23 2020 +0530 opp: Remove _dev_pm_opp_find_and_remove_table() wrapper Remove the unnecessary wrapper and merge _dev_pm_opp_find_and_remove_table() with dev_pm_opp_remove_table(). Tested-by: Rajendra Nayak Signed-off-by: Viresh Kumar commit f3364e17d5716a7356f16fe73c36cba50633ee18 Author: Viresh Kumar Date: Thu Aug 13 09:48:04 2020 +0530 opp: Split out _opp_set_rate_zero() Create separate routine _opp_set_rate_zero() to handle !target_freq case. Tested-by: Rajendra Nayak Signed-off-by: Viresh Kumar commit 10b217365b9454bc5f31d2801148fdf04939f431 Author: Viresh Kumar Date: Thu Aug 13 08:38:37 2020 +0530 opp: Reuse the enabled flag in !target_freq path The OPP core needs to track if the resources of devices are enabled/configured or not, as it disables the resources when target_freq is set to 0. Handle that with the new enabled flag and remove otherwise complex conditional statements. Tested-by: Rajendra Nayak Signed-off-by: Viresh Kumar commit 72f80ce4ef9b756185aab5f1955d8352b6021fba Author: Viresh Kumar Date: Thu Aug 13 08:38:37 2020 +0530 opp: Rename regulator_enabled and use it as status of all resources Expand the scope of the regulator_enabled flag and use it to track status of all the resources. This will be used for other stuff in the next patch. Tested-by: Rajendra Nayak Signed-off-by: Viresh Kumar commit a772336596dfadbbe22db24d4c4b9516c4b2dd57 Author: Azhar Shaikh Date: Fri Aug 21 14:47:24 2020 -0700 platform/chrome: cros_ec_typec: Re-order connector configuration steps As per USB Type-C Spec R2.0 section 4.5.1.2 (Connecting Sources and Sinks) and section 4.5.2.2 (Connection State Machine Requirements), the typical flow for configuring a device connected to a typeC port is as below: 1. Source/sink detection 2. Orientation 3. Data role 4. VCONN 5. VBUS (USB Type-C currents) 6. The connector is now configured. We can start the PD communication that should lead into configuration of the mux if we enter a mode. But in existing code data role was set after the connector and mux are already configured. So fix this by following the spec to set the data role before the connector and mux are configured. Signed-off-by: Azhar Shaikh Reviewed-by: Prashant Malani Reviewed-by: Heikki Krogerus Signed-off-by: Enric Balletbo i Serra commit b12e4fd5f3e4852cdb1fa11d1a48498bea9e92cf Author: Azhar Shaikh Date: Fri Aug 21 14:47:23 2020 -0700 platform/chrome: cros_ec_typec: Avoid setting usb role twice during disconnect On disconnect port partner is removed and usb role is set to NONE. But then in cros_typec_port_update() the role is set again. Avoid this by moving usb_role_switch_set_role() to cros_typec_configure_mux(). Suggested-by: Prashant Malani Signed-off-by: Azhar Shaikh Reviewed-by: Heikki Krogerus Signed-off-by: Enric Balletbo i Serra commit 5381b0ed54b6af3c0e8184b43e34154e17904848 Author: Azhar Shaikh Date: Fri Aug 21 14:47:22 2020 -0700 platform/chrome: cros_ec_typec: Send enum values to usb_role_switch_set_role() usb_role_switch_set_role() has the second argument as enum for usb_role. Currently depending upon the data role i.e. UFP(0) or DFP(1) is sent. This eventually translates to USB_ROLE_NONE in case of UFP and USB_ROLE_DEVICE in case of DFP. Correct this by sending correct enum values as USB_ROLE_DEVICE in case of UFP and USB_ROLE_HOST in case of DFP. Fixes: 7e7def15fa4b ("platform/chrome: cros_ec_typec: Add USB mux control") Signed-off-by: Azhar Shaikh Cc: Prashant Malani Reviewed-by: Prashant Malani Reviewed-by: Heikki Krogerus Signed-off-by: Enric Balletbo i Serra commit 46c5bbd2df4a8b7eed427db866a5bce7234744bf Author: Heikki Krogerus Date: Fri Jul 10 12:40:17 2020 -0700 platform/chrome: cros_ec_typec: USB4 support With USB4 mode the mux driver needs the Enter_USB Data Object (EUDO) that was used when the USB mode was entered. Though the object is not available in the driver, it is possible to construct it from the information we have. Signed-off-by: Heikki Krogerus Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra commit be020f0df5a92d90af7506e96cdf86105c396965 Author: Guenter Roeck Date: Sat Aug 22 08:08:57 2020 -0700 pwm: cros-ec: Simplify EC error handling With enhanced error reporting from cros_ec_cmd_xfer_status() in place, we can fully use it and no longer rely on EC error codes. Acked-by: Uwe Kleine-König Reviewed-by: Brian Norris Signed-off-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra commit 0d080459e813ce8076f183cc73a4c9b64a39a4d8 Author: Guenter Roeck Date: Sat Aug 22 08:08:56 2020 -0700 platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes The EC reports a variety of error codes. Most of those, with the exception of EC_RES_INVALID_VERSION, are converted to -EPROTO. As result, the actual EC error code gets lost. Introduce cros_ec_map_error() to map EC error codes to Linux error codes, and use it in cros_ec_cmd_xfer_status() to report more meaningful errors to the caller. With this change, callers of cros_ec_cmd_xfer_status() can implement a more distinguished action without having to rely on the EC error code. At the same time, debugging is improved in situations where the Linux error code is reported to userspace and/or in the kernel log. Cc: Gwendal Grignou Cc: Yu-Hsuan Hsu Cc: Prashant Malani Cc: Brian Norris Signed-off-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra commit b4e452b5e97dc70d529475168a37ad7394994b8b Author: Guenter Roeck Date: Sat Aug 22 08:08:55 2020 -0700 platform/input: cros_ec: Replace -ENOTSUPP with -ENOPROTOOPT -ENOTSUPP is not a SUSV4 error code and should not be used. Use -ENOPROTOOPT instead to report EC_RES_INVALID_VERSION responses from the EC. This matches match the NFS response for unsupported protocol versions. Cc: Gwendal Grignou Cc: Yu-Hsuan Hsu Cc: Prashant Malani Cc: Brian Norris Acked-by: Dmitry Torokhov Signed-off-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra commit d509f8a71aa0a5e6d92409d9f0b4eaa94615727d Author: Guenter Roeck Date: Sat Aug 22 08:08:54 2020 -0700 pwm: cros-ec: Accept more error codes from cros_ec_cmd_xfer_status Since commit c5cd2b47b203 ("platform/chrome: cros_ec_proto: Report command not supported") we can no longer assume that cros_ec_cmd_xfer_status() reports -EPROTO for all errors returned by the EC itself. A follow-up patch will change cros_ec_cmd_xfer_status() to report additional errors reported by the EC as distinguished Linux error codes. Handle this change by no longer assuming that only -EPROTO is used to report all errors returned by the EC itself. Instead, support both the old and the new error codes. Add a comment describing cros_ec_num_pwms() to explain its functionality. Cc: Gwendal Grignou Cc: Yu-Hsuan Hsu Cc: Prashant Malani Cc: Brian Norris Acked-by: Thierry Reding Acked-by: Uwe Kleine-König Signed-off-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra commit b646e7db1ce85e24bdb3afd16e542a348a53d2ab Author: Guenter Roeck Date: Sat Aug 22 08:08:53 2020 -0700 platform/chrome: cros_ec_sysfs: Report range of error codes from EC Since commit c5cd2b47b203 ("platform/chrome: cros_ec_proto: Report command not supported") we can no longer assume that cros_ec_cmd_xfer_status() reports -EPROTO for all errors returned by the EC itself. A follow-up patch will change cros_ec_cmd_xfer_status() to report additional errors reported by the EC as distinguished Linux error codes. Prepare for this change by always reporting both the Linux error code and the EC error code in sysfs attributes. Cc: Gwendal Grignou Cc: Yu-Hsuan Hsu Cc: Prashant Malani Cc: Brian Norris Reviewed-by: Brian Norris Signed-off-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra commit 064df8851f4ac25f64c0323fc93c3f9705e1702d Author: Guenter Roeck Date: Sat Aug 22 08:08:52 2020 -0700 cros_ec_lightbar: Accept more error codes from cros_ec_cmd_xfer_status Since commit c5cd2b47b203 ("platform/chrome: cros_ec_proto: Report command not supported") we can no longer assume that cros_ec_cmd_xfer_status() reports -EPROTO for all errors returned by the EC itself. A follow-up patch will change cros_ec_cmd_xfer_status() to report additional errors reported by the EC as distinguished Linux error codes. Handle this change by no longer assuming that -EPROTO is used to report all errors returned by the EC itself. Since errors reported by the EC are already reported in text form through sysfs attributes, extend this form of error reporting to all errors reported by cros_ec_cmd_xfer_status(). Cc: Gwendal Grignou Cc: Yu-Hsuan Hsu Cc: Prashant Malani Cc: Brian Norris Reviewed-by: Brian Norris Signed-off-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra commit 1716420e8de2705cd16905134d1eaeda94272a17 Author: Guenter Roeck Date: Sat Aug 22 08:08:51 2020 -0700 iio: cros_ec: Accept -EOPNOTSUPP as 'not supported' error code A follow-up patch will extend the number of errors reported by cros_ec_cmd_xfer_status(). Specifically, the function will return -EOPNOTSUPP if a command is not supported by the EC. Prepare for it. Cc: Gwendal Grignou Cc: Yu-Hsuan Hsu Cc: Prashant Malani Cc: Brian Norris Acked-by: Jonathan Cameron Reviewed-by: Brian Norris Signed-off-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra commit 0b2c605fa4ee3117c00b97b7af67791576b28f88 Author: Borislav Petkov Date: Thu Aug 20 11:10:15 2020 +0200 x86/entry/64: Correct the comment over SAVE_AND_SET_GSBASE Add the proper explanation why an LFENCE is not needed in the FSGSBASE case. Fixes: c82965f9e530 ("x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit") Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200821090710.GE12181@zn.tnic commit ebb21aa1882f418b436ee23463683790c553a447 Author: Dave Airlie Date: Tue Aug 11 17:46:58 2020 +1000 drm/ttm: drop bus.size from bus placement. This is always calculated the same, and only used in a couple of places. Signed-off-by: Dave Airlie Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20200811074658.58309-2-airlied@gmail.com commit 098754fe3ce79af2d5772c0356ba5d52e67eb64a Author: Dave Airlie Date: Tue Aug 11 17:46:57 2020 +1000 drm/ttm: init mem->bus in common code. The drivers all do the same thing here. Reviewed-by: Christian König for both. Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200811074658.58309-1-airlied@gmail.com commit 14b51ccd26742811ced3ee5e52ee6544f5d6105c Author: Takashi Iwai Date: Sun Aug 23 13:32:51 2020 +0200 ALSA: usb-audio: Correct wrongly matching entries with audio class The commit 51ab5d77dcb8 ("ALSA: usb-audio: Properly match with audio interface class") converted the quirk entries that have both vid/pid pair and bInterface fields to match with all those with a new macro USB_AUDIO_CLASS(). However, it turned out that those are false conversions; all those (but the unknown KeithMcMillen device) are actually with vendor-specific interface class, hence the conversions broke the matching. This patch corrects those entries to the right one, USB_DEVICE_VENDOR_SPEC() (and USB_DEVICE() for KeithMcMillen to be sure), and drop the unused USB_AUDIO_CLASS macro again. Fixes: 51ab5d77dcb8 ("ALSA: usb-audio: Properly match with audio interface class") Reported-by: Alexander Tsoy Link: https://lore.kernel.org/r/20200823113251.10175-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 90aa4ed5a43fabd7fc12f84164e20ccae19f5560 Author: Tony Lindgren Date: Fri Jul 3 09:07:31 2020 -0700 ARM: OMAP2+: Drop legacy platform data for dra7 rtcss We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. As we're just dropping data, and the early platform data init is based on the custom ti,hwmods property, we want to drop both the platform data and ti,hwmods property in a single patch. Cc: Keerthy Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren commit 6b8a3deedcfdaa32a641659132d8d6b2e5aed83d Author: Tony Lindgren Date: Fri Jul 3 09:07:30 2020 -0700 ARM: OMAP2+: Drop legacy platform data for am3 and am4 rtc We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. As we're just dropping data, and the early platform data init is based on the custom ti,hwmods property, we want to drop both the platform data and ti,hwmods property in a single patch. Note that we also must tag rtc as disabled on am43x-epos-evm as it's not accessible according to commit 4321dc8dff35 ("ARM: AM43XX: hwmod: Add rtc hwmod"). And we must keep RTC enabled for rtcwake to work now that we've removed the custom platfor code for re-enabling the RTC on suspend. Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren commit 2152fbbd47c06c4f50ad265ec1b0c43673bee3e8 Author: Tony Lindgren Date: Fri Jul 3 09:07:29 2020 -0700 soc: ti: pm33xx: Simplify RTC usage to prepare to drop platform data We must re-enable the RTC module clock enabled in RTC+DDR suspend, and pm33xx has been using platform data callbacks for that. Looks like for retention suspend the RTC module clock must not be re-enabled. To remove the legacy platform data callbacks, and eventually be able to drop the RTC legacy platform data, let's manage the RTC module clock and register range directly in pm33xx. Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren commit 44a0a3c17919db1498cebb02ecf3cf4abc1ade7b Author: Kaige Li Date: Tue Aug 11 09:59:57 2020 +0800 NTB: hw: amd: fix an issue about leak system resources The related system resources were not released when pci_set_dma_mask(), pci_set_consistent_dma_mask(), or pci_iomap() return error in the amd_ntb_init_pci() function. Add pci_release_regions() to fix it. Fixes: a1b3695820aa ("NTB: Add support for AMD PCI-Express Non-Transparent Bridge") Signed-off-by: Kaige Li Signed-off-by: Jon Mason commit 7611cbb900b4b9a6fe5eca12fb12645c0576a015 Merge: d7223aa586713 cb95712138ec5 Author: David S. Miller Date: Sun Aug 23 11:48:27 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net commit c42dcb195b2f92385d6676f1ca00524ff685d26d Author: YueHaibing Date: Tue Aug 18 19:47:21 2020 +0800 phy: ti: j721e-wiz: Remove duplicate include Remove duplicate include file Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200818114721.55464-1-yuehaibing@huawei.com Signed-off-by: Vinod Koul commit f688a345f0d7a6df4dd2aeca8e4f3c05e123a0ee Author: Nadezda Lutovinova Date: Wed Aug 19 17:37:56 2020 +0300 drm/brige/megachips: Add checking if ge_b850v3_lvds_init() is working correctly If ge_b850v3_lvds_init() does not allocate memory for ge_b850v3_lvds_ptr, then a null pointer dereference is accessed. The patch adds checking of the return value of ge_b850v3_lvds_init(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Nadezda Lutovinova Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200819143756.30626-1-lutovinova@ispras.ru commit 7f7fb53f62cb1602932d770b043d2aed5bd9775d Author: Vinay Simha BN Date: Sun Aug 16 11:20:41 2020 +0530 drm/bridge/tc358775: Fix for PTR_ERR passing zero to 'PTR_ERR' Reported-by: kernel test robot Signed-off-by: Vinay Simha BN Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1597557042-5154-1-git-send-email-simhavcs@gmail.com commit f78c40aa8641de30454cdeeaa29fadf7fbdca8e9 Author: Sekhar Nori Date: Tue Jul 28 01:16:03 2020 +0530 phy: ti: am654: update PCIe serdes config Update PCIe serdes config to latest suggested for hardware. This fixes cases of failure to enumerate in Gen2 mode with some cards. Signed-off-by: Sekhar Nori Link: https://lore.kernel.org/r/20200727194603.44636-4-nsekhar@ti.com [fix typo threshold] Signed-off-by: Vinod Koul commit b494bbb6c69fd8ad0f92356c94b904b48155d64f Author: Sekhar Nori Date: Tue Jul 28 01:16:02 2020 +0530 phy: ti: am654: simplify return handling Checking return value after each regfield write becomes hard to read quickly as number of writes increase. Simplify by checking for error only once. Signed-off-by: Sekhar Nori Link: https://lore.kernel.org/r/20200727194603.44636-3-nsekhar@ti.com Signed-off-by: Vinod Koul commit c3e60e5a9eb9d98d80faa36d0c619c62d3545050 Author: Sekhar Nori Date: Tue Jul 28 01:16:01 2020 +0530 phy: ti: am654: simplify regfield handling regfield handling in current driver code is made complicated by having a separate regfield variable for each field which is allocated individually. This quickly gets unwieldy once number of regfields increase. Instead, use an array of regfields which are allocated in a loop. Signed-off-by: Sekhar Nori Link: https://lore.kernel.org/r/20200727194603.44636-2-nsekhar@ti.com Signed-off-by: Vinod Koul commit a85643d47d111730f6ad7cf0f5736fcd4164c14b Author: Anand Moon Date: Mon Jul 20 17:35:02 2020 +0000 phy: samsung: Use readl_poll_timeout function Instead of a busy waiting while loop using udelay use readl_poll_timeout function to check the condition is met or timeout occurs in crport_handshake function. readl_poll_timeout is called in non atomic context so it safe to sleep until the condition is met. Signed-off-by: Anand Moon Link: https://lore.kernel.org/r/20200720173502.542-1-linux.amoon@gmail.com Signed-off-by: Vinod Koul commit ee15d9b84ccb1c66fd8616257eb2a03b3ec79540 Merge: 51ab5d77dcb8a 1965c4364bdd0 Author: Takashi Iwai Date: Sun Aug 23 13:19:20 2020 +0200 Merge branch 'for-linus' into for-next Correct quirk table entries for Lenovo ThinkStation P620, too. The name and profile strings are now set from a different table, hence removed. Signed-off-by: Takashi Iwai commit e2d977c9f1abd1d199b412f8f83c1727808b794d Author: Thomas Gleixner Date: Fri Aug 14 12:19:35 2020 +0200 timekeeping: Provide multi-timestamp accessor to NMI safe timekeeper printk wants to store various timestamps (MONOTONIC, REALTIME, BOOTTIME) to make correlation of dmesg from several systems easier. Provide an interface to retrieve all three timestamps in one go. There are some caveats: 1) Boot time and late sleep time injection Boot time is a racy access on 32bit systems if the sleep time injection happens late during resume and not in timekeeping_resume(). That could be avoided by expanding struct tk_read_base with boot offset for 32bit and adding more overhead to the update. As this is a hard to observe once per resume event which can be filtered with reasonable effort using the accurate mono/real timestamps, it's probably not worth the trouble. Aside of that it might be possible on 32 and 64 bit to observe the following when the sleep time injection happens late: CPU 0 CPU 1 timekeeping_resume() ktime_get_fast_timestamps() mono, real = __ktime_get_real_fast() inject_sleep_time() update boot offset boot = mono + bootoffset; That means that boot time already has the sleep time adjustment, but real time does not. On the next readout both are in sync again. Preventing this for 64bit is not really feasible without destroying the careful cache layout of the timekeeper because the sequence count and struct tk_read_base would then need two cache lines instead of one. 2) Suspend/resume timestamps Access to the time keeper clock source is disabled accross the innermost steps of suspend/resume. The accessors still work, but the timestamps are frozen until time keeping is resumed which happens very early. For regular suspend/resume there is no observable difference vs. sched clock, but it might affect some of the nasty low level debug printks. OTOH, access to sched clock is not guaranteed accross suspend/resume on all systems either so it depends on the hardware in use. If that turns out to be a real problem then this could be mitigated by using sched clock in a similar way as during early boot. But it's not as trivial as on early boot because it needs some careful protection against the clock monotonic timestamp jumping backwards on resume. Signed-off-by: Thomas Gleixner Tested-by: Petr Mladek Link: https://lore.kernel.org/r/20200814115512.159981360@linutronix.de commit 71419b30cab099f7ca37e61bf41028d8b7d4984d Author: Thomas Gleixner Date: Fri Aug 14 12:19:34 2020 +0200 timekeeping: Utilize local_clock() for NMI safe timekeeper during early boot During early boot the NMI safe timekeeper returns 0 until the first clocksource becomes available. This prevents it from being used for printk or other facilities which today use sched clock. sched clock can be available way before timekeeping is initialized. The obvious workaround for this is to utilize the early sched clock in the default dummy clock read function until a clocksource becomes available. After switching to the clocksource clock MONOTONIC and BOOTTIME will not jump because the timekeeping_init() bases clock MONOTONIC on sched clock and the offset between clock MONOTONIC and BOOTTIME is zero during boot. Clock REALTIME cannot provide useful timestamps during early boot up to the point where a persistent clock becomes available, which is either in timekeeping_init() or later when the RTC driver which might depend on I2C or other subsystems is initialized. There is a minor difference to sched_clock() vs. suspend/resume. As the timekeeper clock source might not be accessible during suspend, after timekeeping_suspend() timestamps freeze up to the point where timekeeping_resume() is invoked. OTOH this is true for some sched clock implementations as well. Signed-off-by: Thomas Gleixner Tested-by: Petr Mladek Link: https://lore.kernel.org/r/20200814115512.041422402@linutronix.de commit 58a3cefb3840b17f0eba357d8e82536135a1257b Author: Peter Chen Date: Mon Sep 30 13:56:26 2019 +0800 usb: chipidea: imx: add two samsung picophy parameters tuning implementation These two parameters are used to improve USB signal for board level, in this commit, we read it from the dtb, and write to related register during the initialization. Signed-off-by: Peter Chen commit 8977c947b321858ad878106e6c1dbfb719f23db6 Author: Peter Chen Date: Tue Aug 21 17:15:36 2018 +0800 doc: dt-binding: ci-hdrc-usb2: add property for samsung picophy Add two parameters which are used to tune USB signal for samsung picophy, which is used at imx7d, imx8mm, and imx8mn. Reviewed-by: Rob Herring Reviewed-by: Jun Li Signed-off-by: Peter Chen commit 8f0216b006e5f553d28c4c1a991b5234693a49cb Author: Angus Ainslie (Purism) Date: Fri Aug 21 14:17:53 2020 +0200 arm64: dts: Add a device tree for the Librem 5 phone Add a devicetree description for the Librem 5 phone. 4 hardware revisions have been available. Some revisions include changes that need different software to be run. So far, r3 ("Dogwood") is one such example, see: "Aspen" r0 not supported (very few devices exist) "Birch" r1 supported by r2 "Chestnut" r2 added by this patch "Dogwood" r3 added by this patch "Evergreen" r4 tba / most likely supported by r3 See https://puri.sm/products/librem-5/ for more information. This boots to a working console with working WWAN modem, wifi usdhc, IMU sensor device, proximity sensor, haptic motor, gpio keys, GNSS and LEDs. Signed-off-by: Martin Kepplinger Signed-off-by: Angus Ainslie (Purism) Signed-off-by: Guido Günther Reviewed-by: Daniel Baluta (for the audio part) Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 32b0aaa59da62a5b4c2f3e7ca44f10853259572b Author: Martin Kepplinger Date: Fri Aug 21 14:17:55 2020 +0200 dt-bindings: arm: fsl: Add the librem 5 phone Add entries for the imx8mq based Librem 5 phone. The "Birch" and "Chestnut" hardware revisions are supported by r2. The "Dogwood" revision by r3. See https://puri.sm/products/librem-5/ and https://developer.puri.sm/Librem5/ for the schematics and more information. Signed-off-by: Martin Kepplinger Acked-by: Rob Herring Signed-off-by: Shawn Guo commit e8151ef3578c9529f1b69f08bfcfd1e67e676e82 Author: Guido Günther Date: Thu Aug 20 10:50:57 2020 +0200 arm64: dts: imx8mq-librem5-devkit: Enable the LCD panel Enable LCD panel output by adding nodes for the NWL DSI host controller, the Rocktech panel and the eLCDIF display controller. Signed-off-by: Guido Günther Reviewed-by: Fabio Estevam Tested-by: Martin Kepplinger Signed-off-by: Shawn Guo commit d0081bd02a037c1b867c4d3a5cb0878fb321cb08 Author: Guido Günther Date: Thu Aug 20 10:50:56 2020 +0200 arm64: dts: imx8mq: Add NWL MIPI DSI controller Add a node for the Northwest Logic MIPI DSI IP core, "disabled" by default. This also adds the necessary port to LCDIF. Signed-off-by: Guido Günther Reviewed-by: Fabio Estevam Tested-by: Martin Kepplinger Signed-off-by: Shawn Guo commit d3762a4713b1a5b2fbc0e7ea98e78948667021f9 Author: Fabio Estevam Date: Tue Aug 18 22:59:46 2020 -0300 arm64: dts: imx8m: Add the ENET PPS interrupt The i.MX8M SoCs have a fourth ENET interrupt dedicated to PPS (Pulse Per Second). Add support for it. Suggested-by: Rogerio Nunes Signed-off-by: Fabio Estevam Reviewed-by: Fugang Duan Signed-off-by: Shawn Guo commit 0b8056106c02bef72b9d47524dc3c59ccf99124d Author: Krzysztof Kozlowski Date: Mon Aug 17 17:12:54 2020 +0200 clk: imx: vf610: Add CRC clock Add the clock for CRC block allowing it to be enabled by consumers. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 0b784a7b1c53c3989e9ee2dfdd3fc9b6b14b5256 Author: Uwe Kleine-König Date: Thu Aug 13 22:24:10 2020 +0200 ARM: dts: imx25-pinfunc: Fix GPT function names According to the reference manual of the i.MX25 the function name for the GPT capture input is called CAPIN1. So fix the names to follow the same naming scheme as used for the other pads and functions. Also add one missing pad function. There are no mainline users that needs adaption. Signed-off-by: Uwe Kleine-König Acked-by: Rob Herring Signed-off-by: Shawn Guo commit b86d3d21cd4c9bc18cbcf3b668565cf1e31023d5 Author: Dan Murphy Date: Wed Aug 12 14:50:19 2020 -0500 ARM: dts: imx6dl-yapp4: Add reg property to the lp5562 channel node Add the reg property to each channel node. This update is to accommodate the multicolor framework. In addition to the accommodation this allows the LEDs to be placed on any channel and allow designs to skip channels as opposed to requiring sequential order. Acked-by: Pavel Machek Signed-off-by: Dan Murphy CC: Shawn Guo CC: Sascha Hauer CC: Pengutronix Kernel Team CC: Fabio Estevam CC: NXP Linux Team Signed-off-by: Shawn Guo commit f42ae4bbf94c15aa720afb9d176ecbfe140d792e Author: Markus Mayer Date: Sat Aug 22 13:50:00 2020 -0700 memory: brcmstb_dpfe: fix array index out of bounds We would overrun the error_text array if we hit a TIMEOUT condition, because we were using the error code "ETIMEDOUT" (which is 110) as an array index. We fix the problem by correcting the array index and by providing a function to retrieve error messages rather than accessing the array directly. The function includes a bounds check that prevents the array from being overrun. Link: https://lore.kernel.org/linux-arm-kernel/38d00022-730c-948a-917c-d86382df8cb9@canonical.com/ Link: https://lore.kernel.org/r/20200822205000.15841-1-mmayer@broadcom.com Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE") Reported-by: Colin Ian King Signed-off-by: Markus Mayer Acked-by: Florian Fainelli Signed-off-by: Krzysztof Kozlowski commit d7223aa5867134b9923b42e1245801bd790a1d8c Merge: 1aecbf1861f82 9d048e5e6628d Author: David S. Miller Date: Sat Aug 22 12:44:37 2020 -0700 Merge branch 'l2tp-replace-custom-logging-code-with-tracepoints' Tom Parkin says: ==================== l2tp: replace custom logging code with tracepoints The l2tp subsystem implemented custom logging macros for debugging purposes which were controlled using a set of debugging flags in each tunnel and session structure. A more standard and easier-to-use approach is to use tracepoints. This patchset refactors l2tp to: * remove excessive logging * tweak useful log messages to use the standard pr_* calls for logging rather than the l2tp wrappers * replace debug-level logging with tracepoints * add tracepoints for capturing tunnel and session lifetime events I note that checkpatch.pl warns about the layout of code in the newly-added file net/l2tp/trace.h. When adding this file I followed the example(s) of other tracepoint files in the net/ subtree since it seemed preferable to adhere to the prevailing style rather than follow checkpatch.pl's advice in this instance. If that's the wrong approach please let me know. v1 -> v2 * Fix up a build warning found by the kernel test robot ==================== Signed-off-by: David S. Miller commit 9d048e5e6628d821a608c955ef120722c0752e19 Author: Tom Parkin Date: Sat Aug 22 15:59:09 2020 +0100 docs: networking: add tracepoint info to l2tp.rst Update l2tp.rst to: * remove information about the obsolete debug flags and their use * include information about tracepoints for l2tp Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit eee049c0ef5b5b433f36841801e34c21c9f82a23 Author: Tom Parkin Date: Sat Aug 22 15:59:08 2020 +0100 l2tp: remove tunnel and session debug flags field The l2tp subsystem now uses standard kernel logging APIs for informational and warning messages, and tracepoints for debug information. Now that the tunnel and session debug flags are unused, remove the field from the core structures. Various system calls (in the case of l2tp_ppp) and netlink messages handle the getting and setting of debug flags. To avoid userspace breakage don't modify the API of these calls; simply ignore set requests, and send dummy data for get requests. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit ac6ebaf06e2c1bf6e42e35b35ded8b6d576d24d6 Author: Tom Parkin Date: Sat Aug 22 15:59:07 2020 +0100 l2tp: remove custom logging macros All l2tp's informational and warning logging is now carried out using standard kernel APIs. Debugging information is now handled using tracepoints. Now that no code is using the custom logging macros, remove them from l2tp_core.h. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 6b7bdcd7ca01d84bb1f51a73f3daa063de0cd270 Author: Tom Parkin Date: Sat Aug 22 15:59:06 2020 +0100 l2tp: add tracepoints to l2tp_core.c Add lifetime event tracing for tunnel and session instances, tracking tunnel and session registration, deletion, and eventual freeing. Port the data path sequence number debug logging to use trace points rather than custom debug macros. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 2a03dd8e115261008d44ffbb69297af56caa585f Author: Tom Parkin Date: Sat Aug 22 15:59:05 2020 +0100 l2tp: add tracepoint definitions in trace.h l2tp can provide a better debug experience using tracepoints rather than printk-style logging. Add tracepoint definitions in trace.h for use in the l2tp subsystem code. Add preprocessor definitions for the length of session and tunnel names in l2tp_core.h so we can reuse these in trace.h. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 3f117d6f4bbca722d9519e545294852d8e714fae Author: Tom Parkin Date: Sat Aug 22 15:59:04 2020 +0100 l2tp: add tracepoint infrastructure to core The l2tp subsystem doesn't currently make use of tracepoints. As a starting point for adding tracepoints, add skeleton infrastructure for defining tracepoints for the subsystem, and for having them build appropriately whether compiled into the kernel or built as a module. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 5ee759cda51b9b1c28994ea36e314427a58cb6d7 Author: Tom Parkin Date: Sat Aug 22 15:59:03 2020 +0100 l2tp: use standard API for warning log messages The l2tp_* log wrappers only emit messages of a given category if the tunnel or session structure has the appropriate flag set in its debug field. Flags default to being unset. For warning messages, this doesn't make a lot of sense since an administrator is likely to want to know about datapath warnings without needing to tweak the debug flags setting for a given tunnel or session instance. Modify l2tp_warn callsites to use pr_warn_ratelimited instead for unconditional output of warning messages. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit ab141e3733d16ba24740de515694697835f24636 Author: Tom Parkin Date: Sat Aug 22 15:59:02 2020 +0100 l2tp: remove noisy logging, use appropriate log levels l2tp_ppp in particular had a lot of log messages for tracing [get|set]sockopt calls. These aren't especially useful, so remove these messages. Several log messages flagging error conditions were logged using l2tp_info: they're better off as l2tp_warn. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 12923365eb3db5710adcd6abb69e93899e003554 Author: Tom Parkin Date: Sat Aug 22 15:59:01 2020 +0100 l2tp: don't log data frames l2tp had logging to trace data frame receipt and transmission, including code to dump packet contents. This was originally intended to aid debugging of core l2tp packet handling, but is of limited use now that code is stable. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 1aecbf1861f825af2822e30b8d5c075360a2656a Author: Miaohe Lin Date: Sat Aug 22 04:08:27 2020 -0400 net: dccp: Convert to use the preferred fallthrough macro Convert the uses of fallthrough comments to fallthrough macro. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit b663b798d04fb73f1ad4d54c46582d2fde7a76d6 Author: Anson Huang Date: Tue Aug 11 11:04:42 2020 +0800 soc: imx: gpcv2: Use dev_err_probe() to simplify error handling dev_err_probe() can reduce code size, uniform error handling and record the defer probe reason etc., use it to simplify the code. Signed-off-by: Anson Huang Reviewed-by: Guido Günther Signed-off-by: Shawn Guo commit 675abeb9fc0e24a25eb5f95a948e3738aef64875 Author: Sebastian Reichel Date: Wed Aug 5 15:58:17 2020 +0200 ARM: dts: imx6q-bx50v3: Add IRQ support for internal switch This adds missing interrupt support for the internal Marvell switch, so that the kernel does not have to keep polling the PHYs on the bit-banged MDIO bus all the time. Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo commit d923d839429c42efda01ffd2d73bff9097495f9d Author: Shengjiu Wang Date: Wed Aug 5 18:39:04 2020 +0800 ARM: dts: imx6qdl-sabresd: Support headphone and microphone detection Add "DMIC" rounting, headphone and microphone detect gpio for sound card, then output sound can switch between headphone and speaker. input sound can switch between DMIC and AMIC. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit 71c7c2d9a2fe16f20878f507a60e3aee0246c17b Author: Uwe Kleine-König Date: Wed Aug 5 17:13:07 2020 +0200 ARM: dts: imx25-pinfunc: add missing and fix wrong SPI related defintions I used the i.MX25 Reference Manual (Rev 2 01/2011) as source for these additions and fixes. No mainline dts is affected by the fixes (nor obviously by the additions). Signed-off-by: Uwe Kleine-König Reviewed-by: Sascha Hauer Signed-off-by: Shawn Guo commit 7d6b5e4f2445728b9eca71f3fc21fd453d6b36b7 Author: Anson Huang Date: Wed Aug 5 07:17:29 2020 +0800 clk: imx: Explicitly include bits.h It is better to explicitly include the required header file rather then get it through some recursive include. Signed-off-by: Anson Huang Acked-by: Stephen Boyd Signed-off-by: Shawn Guo commit 37d7b7a5baca43722d332e190a3c86ac0c4341e8 Author: Michal Vokáč Date: Fri Jul 31 14:00:08 2020 +0200 ARM: dts: imx6dl-yapp4: Add support for OLED based on different controller OLED display consist of an OLED panel and a display controller. The displays that were used on yapp4 platform were based on a SSD1305 controller. These displays are now discontinued and we need to add support for a replacement. The new display is based on SSD1309 controller and requires slightly different configuration (mirror + segment offset). We want to support both display types so it does no matter which one was used on the assembly line. Hence the displays are placed at different I2C addresses. Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit e642c831ebdd560b5f3ffa731f1e8280eecca2f6 Author: Michal Vokáč Date: Fri Jul 31 14:00:07 2020 +0200 ARM: dts: imx6dl-yapp4: Add Y Soft IOTA Orion board Add devicetree for new variant of the Y Soft IOT appliance. The board is based on Hydra with the following changes: - faster SoC (1GHz), 4GB RAM and 64GB eMMC - removed miniPCIe - removed Audio jack - removed uSD slot - removed RJ10 serial - HDMI replaced by USB host Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit bee062810f42a4e1716a619d088118e0cfa157cf Author: Michal Vokáč Date: Fri Jul 31 14:00:06 2020 +0200 dt-bindings: arm: fsl: Add Y Soft IOTA Orion board Add devicetree binding for Orion - new board variant in the Y Soft IOTA family. Signed-off-by: Michal Vokáč Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 1758088842619e489a926fb5dc4757ce80ff9615 Author: Anson Huang Date: Thu Jul 30 21:04:06 2020 +0800 ARM: dts: imx: Change gpmi nand node name to nand-controller Change i.MX SoCs nand node name from "gpmi-nand" to "nand-controller" to be compliant with yaml schema, it requires the nodename to be "nand-controller". Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 8da4716d08bcdf72f621668fa5bebd7bdfb4ad3e Author: Anson Huang Date: Thu Jul 30 21:04:05 2020 +0800 ARM: dts: imx27: Change nand node name to nand-controller Change i.MX27 nand node name from "nand" to "nand-controller" to be compliant with yaml schema, it requires the nodename to be "nand-controller". Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit e42fb04e9834ea97dd84649050669603c9468a17 Author: Michal Vokáč Date: Thu Jul 30 12:13:46 2020 +0200 ARM: dts: imx6dl-yapp4: Add ethernet aliases Add aliases for ethernet switch ports to allow bootloader to fix MAC addresses to the ones stored in onboard configuration EEPROM. Ursa has only one ethernet port populated (eth2) so alias for the first port has to be removed on this board. Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit 21cfa049290b281530f237bf03e9f4c1038e0f72 Author: Krzysztof Kozlowski Date: Fri Aug 21 09:42:51 2020 +0200 ARM: s3c: Cleanup from old plat-samsung include The arch/arm/plat-samsung/ was removed and merged into arch/arm/mach-s3c/ so the include path is not needed anymore. Fixes: 71b9114d2c13 ("ARM: s3c: move into a common directory") Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200821074251.26798-1-krzk@kernel.org commit c6ff132d4224022ffaa461ec771ec27c5319369c Author: Arnd Bergmann Date: Mon Sep 2 18:37:30 2019 +0200 ARM: s3c: make headers local if possible A lot of header files are only used internally now, so they can be moved to mach-s3c, out of the visibility of drivers. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-40-krzk@kernel.org [krzk: Rebase and fixup leds-s3c24xx driver] Signed-off-by: Krzysztof Kozlowski commit 96e55c38bb5bda5883c9f3df963eb7a5a51ce10b Author: Christian Eggers Date: Wed Aug 5 07:57:43 2020 +0200 dt-bindings: iio: light: add AMS AS73211 support Add DT bindings for AMS AS73211 XYZ True Color Sensor. Signed-off-by: Christian Eggers Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit f70fd25a59d6ed2755772ddc947d59945aa9ca1a Author: Calvin Glisson Date: Wed Aug 5 15:23:00 2020 -0700 staging: iio: ad9834: Remove excess blank line Remove excess blank line after variable declarations. Improves code consistency and readability. Change suggested by checkpatch.pl: CHECK: Please don't use multiple blank lines Signed-off-by: Calvin Glisson Signed-off-by: Jonathan Cameron commit 781cb90b0529b5bb84c63691fe42a7c26d197aec Author: Randy Dunlap Date: Sat Jul 18 17:30:40 2020 -0700 platform_data: ad7793.h: drop a duplicated word Drop the repeated word "and" in a comment. Signed-off-by: Randy Dunlap Cc: Lars-Peter Clausen Cc: Jonathan Cameron Signed-off-by: Jonathan Cameron commit 65fb06f0bec8d8a929cdae9e68048adf25883f65 Author: Jonathan Cameron Date: Wed Jul 22 18:12:24 2020 +0100 dt-bindings: iio: adc: maxim,max9611 yaml conversions Straight forward conversion of this binding for this current sense amplifier and ADC. Signed-off-by: Jonathan Cameron Reviewed-by: Jacopo Mondi Reviewed-by: Rob Herring commit fde6da59da6284080ec27c2ff92c0c8eef2bf8f3 Author: Jonathan Cameron Date: Wed Jul 22 18:12:22 2020 +0100 dt-bindings: iio: adc: maxim,max11100 yaml conversion Straight forward conversion for this SPI ADC. Added limits on spi-max-frequency from datasheet (0.1 to 4.8MHz) Signed-off-by: Jonathan Cameron Reviewed-by: Jacopo Mondi Reviewed-by: Rob Herring commit 107ce2e3dccceefd91a2af3069de63774cbaccf9 Author: Nishant Malpani Date: Sun Jul 26 19:40:26 2020 +0530 dt-bindings: iio: gyro: Add DT binding doc for ADXRS290 Add devicetree binding document for ADXRS290, a dual-axis MEMS gyroscope. Reviewed-by: Rob Herring Signed-off-by: Nishant Malpani Signed-off-by: Jonathan Cameron commit 2c8920fff1457a41912e8d3e3b9eafb582656440 Author: Nishant Malpani Date: Sun Jul 26 19:40:16 2020 +0530 iio: gyro: Add driver support for ADXRS290 ADXRS290 is a high performance MEMS pitch and roll (dual-axis in-plane) angular rate sensor (gyroscope) designed for use in stabilization applications. It also features an internal temperature sensor and programmable high-pass and low-pass filters. Add support for ADXRS290 in direct-access mode for now. Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ADXRS290.pdf Reviewed-by: Andy Shevchenko Signed-off-by: Nishant Malpani Signed-off-by: Jonathan Cameron commit 96f962511b0fddf0136aad89cd324e6af5f67d16 Author: Ankit Baluni Date: Wed Jul 29 13:41:55 2020 +0530 Staging: iio: Fixed a punctuation and a spelling mistake. Added a missing comma and changed 'it it useful' to 'it is useful'. Signed-off-by: Ankit Baluni Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 4d55cb8e78df3d6bb40ff4abf02bb15d1145846c Author: Lars-Peter Clausen Date: Mon Jul 20 16:51:33 2020 +0300 iio: trigger: make stub functions static inline Make sure that the trigger function stubs are all static inline. Otherwise we might see compiler warnings about declared but unused functions. Fixes 77712e5fbe2e4: ("Staging: iio: Staticise non-exported functions") Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 33825b27c918d8c9be50c2a4fdee30cb706bdad8 Author: Matt Ranostay Date: Mon Jul 20 00:03:29 2020 -0700 dt-bindings: iio: chemical: add O2 EZO module documentation Cc: devicetree@vger.kernel.org Signed-off-by: Matt Ranostay Acked-by: Rob Herring Signed-off-by: Jonathan Cameron commit 6f762972b2a766d9d03fc05de8d0880e90b98df1 Author: Alexandru Ardelean Date: Mon Jul 20 16:52:37 2020 +0300 iio: Kconfig: ad8366: add entry for HMC1119 chip The change is mostly cosmetic. When looking into the menuconfig help of the ad8366 driver, the HMC1119 chip should also show up (since the driver supports it). Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 5579db2cd5dd4032407114287dd0f97e07478e99 Author: Stefan Popa Date: Wed Jul 22 10:30:03 2020 +0300 iio: adxl372_i2c: Add OF device ID table The driver does not have a struct of_device_id table, but supported devices are registered via Device Trees. This patch adds OF device ID table. Signed-off-by: Stefan Popa Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 9b3b3b284ad550ca6cd5049e84728d4939148b9d Author: Alexandru Ardelean Date: Wed Jul 22 10:25:46 2020 +0300 iio: adxl372_spi: change indentation for of_table The change is mostly stylistic. The table should be indented with tabs instead of spaces. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit a507801275559a4c89b4a7ebbba983104ee2bd06 Author: Alexandru Ardelean Date: Wed Jul 22 10:22:01 2020 +0300 iio: frequency: ad9523: convert rest of driver to device managed functions The driver pretty much uses device managed functions. The only left-over is the iio_device_register() function, which also requires an action-or-reset hook to disable the regulator on the remove and error path. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 6da3a6ce281fa7a51e1e3af0fa6d9e52bd9bf11a Author: Matt Ranostay Date: Thu Jul 23 09:29:44 2020 +0300 iio: chemical: atlas-ezo-sensor: add support for O2 sensor Add support for the Atlas EZO O2 chemical sensor which required some refactoring of the driver and parsing of i2c transfer. Sensor data is converted by the scaling value from percent to IIO_CONCENTRATION. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron commit 4ffa22fd22a7cbde1a1394b2707ea73593dc0fda Author: Matt Ranostay Date: Thu Jul 23 09:29:43 2020 +0300 iio: add IIO_MOD_O2 modifier Add modifier IIO_MOD_O2 for O2 concentration reporting Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron commit c31feed8461fb8648075ba9b53d9e527d530972f Author: Chris Down Date: Fri Aug 21 13:10:35 2020 +0100 x86/msr: Make source of unrecognised MSR writes unambiguous In many cases, task_struct.comm isn't enough to distinguish the offender, since for interpreted languages it's likely just going to be "python3" or whatever. Add the pid to make it unambiguous. [ bp: Make the printk string a single line for easier grepping. ] Signed-off-by: Chris Down Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/6f6fbd0ee6c99bc5e47910db700a6642159db01b.1598011595.git.chris@chrisdown.name commit 1f35c9c0ce3888405fc813afedaff79de433cf27 Author: Chris Down Date: Fri Aug 21 13:10:24 2020 +0100 x86/msr: Prevent userspace MSR access from dominating the console Applications which manipulate MSRs from userspace often do so infrequently, and all at once. As such, the default printk ratelimit architecture supplied by pr_err_ratelimited() doesn't do enough to prevent kmsg becoming completely overwhelmed with their messages and pushing other salient information out of the circular buffer. In one case, I saw over 80% of kmsg being filled with these messages, and the default kmsg buffer being completely filled less than 5 minutes after boot(!). Make things much less aggressive, while still achieving the original goal of fiter_write(). Operators will still get warnings that MSRs are being manipulated from userspace, but they won't have other also potentially useful messages pushed out of the kmsg buffer. Of course, one can boot with `allow_writes=1` to avoid these messages at all, but that then has the downfall that one doesn't get _any_ notification at all about these problems in the first place, and so is much less likely to forget to fix it. One might rather it was less binary: it was still logged, just less often, so that application developers _do_ have the incentive to improve their current methods, without the kernel having to push other useful stuff out of the kmsg buffer. This one example isn't the point, of course: I'm sure there are plenty of other non-ideal-but-pragmatic cases where people are writing to MSRs from userspace right now, and it will take time for those people to find other solutions. Overall, keep the intent of the original patch, while mitigating its sometimes heavy effects on kmsg composition. [ bp: Massage a bit. ] Signed-off-by: Chris Down Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/563994ef132ce6cffd28fc659254ca37d032b5ef.1598011595.git.chris@chrisdown.name commit e0d0d4d86c766335066d7c241fbe42fbd67d4198 Author: Anson Huang Date: Thu Jul 30 09:22:54 2020 +0800 clk: imx8qxp: Support building i.MX8QXP clock driver as module Change configuration to "tristate", add module author, description and license to support building i.MX8QXP clock drivers as module. Signed-off-by: Anson Huang Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo commit 9a976cd278eafa496ce30196810ef2e879a4a7d5 Author: Anson Huang Date: Thu Jul 30 09:22:53 2020 +0800 clk: imx8m: Support module build Change configuration to "tristate", add module author, description and license to support building i.MX8M SoCs clock driver as module. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo commit f1f018dc030edfeca54373053cf02dee4561bb0c Author: Anson Huang Date: Thu Jul 30 09:22:52 2020 +0800 clk: imx: Add clock configuration for ARMv7 platforms Add CONFIG_CLK_xxx for i.MX ARMv7 platforms, and use it as build option instead of CONFIG_SOC_xxx, the CONFIG_CLK_xxx will be selected by default according to CONFIG_SOC_xxx. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo commit 870ed5e22ae18b63751140b4050050ca2115ba60 Author: Anson Huang Date: Thu Jul 30 09:22:51 2020 +0800 clk: imx: Support building i.MX common clock driver as module There are more and more requirements of building SoC specific drivers as modules, add support for building i.MX common clock driver as module to meet the requirement. Signed-off-by: Anson Huang Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo commit d7d7518fdcc8f43da69fb40073273e77f24be24f Author: Anson Huang Date: Thu Jul 30 09:22:50 2020 +0800 clk: composite: Export clk_hw_register_composite() Export clk_hw_register_composite() to support user built as module. ERROR: modpost: "clk_hw_register_composite" [drivers/clk/imx/mxc-clk.ko] undefined! Signed-off-by: Anson Huang Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo commit 0d03f0292659456f5a6322ff605253b8ce4b8d52 Author: Anson Huang Date: Thu Jul 30 09:22:49 2020 +0800 clk: imx6sl: Use BIT(x) to avoid shifting signed 32-bit value by 31 bits Use readl_relaxed() instead of __raw_readl(), and use BIT(x) instead of (1 << X) to fix below build warning reported by kernel test robot: drivers/clk/imx/clk-imx6sl.c:149:49: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] while (!(__raw_readl(anatop_base + PLL_ARM) & BM_PLL_ARM_LOCK)) Signed-off-by: Anson Huang Reported-by: kernel test robot Reviewed-by: Stephen Boyd Signed-off-by: Shawn Guo commit fc8004dffcfd47a1206460b54de91528c803bd64 Author: Matthias Schiffer Date: Wed Jul 29 10:25:54 2020 +0200 ARM: dts: imx7: add QSPI In preparation for an update of the TQ-Systems TQMa7x/MBa7x DTS, add the QSPI controller to imx7s.dtsi. Based-on-patch-by: Han Xu Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit 14e292fce8fd5e018a6499c42ad7a4526bf4b49f Author: Peter Chen Date: Fri Jul 24 14:05:32 2020 +0800 arm64: dts: imx8mn-evk: add two parameters for samsung picophy tuning With these two parameters tuning, it can pass USB eye diagram at evk board. Signed-off-by: Peter Chen Signed-off-by: Shawn Guo commit b9c7113bbdda65343d8c5d6f48cbfd8835cd003d Author: Peter Chen Date: Fri Jul 24 14:05:31 2020 +0800 arm64: dts: imx8mm-evk: add two parameters for samsung picophy tuning With these two parameters tuning, it can pass USB eye diagram at evk board. Reviewed-by: Jun Li Signed-off-by: Peter Chen Signed-off-by: Shawn Guo commit 0a0c5d13617fb52a66c4980f40faa42a1007d3b4 Author: Yuantian Tang Date: Wed Jul 15 14:49:09 2020 +0800 arm64: dts: ls208xa: add more thermal zone support There are 7 thermal zones in ls208xa soc. Add the other thermal zone nodes to enable them. Signed-off-by: Yuantian Tang Reviewed-by: Amit Kucheria Signed-off-by: Shawn Guo commit acfa13abf03dac0a0a775328feceabe241a7fa3e Author: Yuantian Tang Date: Wed Jul 15 14:49:08 2020 +0800 arm64: dts: ls1088a: add more thermal zone support There are 2 thermal zones in ls1088a soc. Add the other thermal zone node to enable it. Also update the values in calibration table to make the temperatures monitored more precise. Signed-off-by: Yuantian Tang Reviewed-by: Amit Kucheria Signed-off-by: Shawn Guo commit 9c0f8cbdc0e9cf8a2a3a96045778b8d759f172c2 Author: Andrii Nakryiko Date: Thu Aug 20 16:12:39 2020 -0700 libbpf: Normalize and improve logging across few functions Make libbpf logs follow similar pattern and provide more context like section name or program name, where appropriate. Also, add BPF_INSN_SZ constant and use it throughout to clean up code a little bit. This commit doesn't have any functional changes and just removes some code changes out of the way before bigger refactoring in libbpf internals. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200820231250.1293069-6-andriin@fb.com commit 50e09460d9f8dee9fbaaa3194c7921753d75cd96 Author: Andrii Nakryiko Date: Thu Aug 20 16:12:38 2020 -0700 libbpf: Skip well-known ELF sections when iterating ELF Skip and don't log ELF sections that libbpf knows about and ignores during ELF processing. This allows to not unnecessarily log details about those ELF sections and cleans up libbpf debug log. Ignored sections include DWARF data, string table, empty .text section and few special (e.g., .llvm_addrsig) useless sections. With such ELF sections out of the way, log unrecognized ELF sections at pr_info level to increase visibility. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200820231250.1293069-5-andriin@fb.com commit 819c23af561c4dc8c35faaacacdfa9ba81bacf5f Author: Andrii Nakryiko Date: Thu Aug 20 16:12:37 2020 -0700 libbpf: Add __noinline macro to bpf_helpers.h __noinline is pretty frequently used, especially with BPF subprograms, so add them along the __always_inline, for user convenience and completeness. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200820231250.1293069-4-andriin@fb.com commit 88a82120282bdef4c331e20991e3057f417beae4 Author: Andrii Nakryiko Date: Thu Aug 20 16:12:36 2020 -0700 libbpf: Factor out common ELF operations and improve logging Factor out common ELF operations done throughout the libbpf. This simplifies usage across multiple places in libbpf, as well as hide error reporting from higher-level functions and make error logging more consistent. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200820231250.1293069-3-andriin@fb.com commit 3ac2e20fba07e57cd229091a568ac14a5434e6bb Author: Andrii Nakryiko Date: Thu Aug 20 16:12:35 2020 -0700 selftests/bpf: BPF object files should depend only on libbpf headers There is no need to re-build BPF object files if any of the sources of libbpf change. So record more precise dependency only on libbpf/bpf_*.h headers. This eliminates unnecessary re-builds. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200820231250.1293069-2-andriin@fb.com commit 3c4a594bc81a9fd1118c34c0b959aa732f34478e Merge: dca5612f8eb9d bb23c0e1c57f3 Author: Alexei Starovoitov Date: Fri Aug 21 15:16:12 2020 -0700 Merge branch 'update-sockmap-from-prog' Lorenz Bauer says: ==================== We're currently building a control plane for our BPF socket dispatch work. As part of that, we have a need to create a copy of an existing sockhash, to allow us to change the keys. I previously proposed allowing privileged userspace to look up sockets, which doesn't work due to security concerns (see [1]). In follow up discussions during BPF office hours we identified bpf_iter as a possible solution: instead of accessing sockets from user space we can iterate the source sockhash, and insert the values into a new map. Enabling this requires two pieces: the ability to iterate sockmap and sockhash, as well as being able to call map_update_elem from BPF. This patch set implements the latter: it's now possible to update sockmap from BPF context. As a next step, we can implement bpf_iter for sockmap. === I've done some more fixups, and audited the safe contexts more thoroughly. As a result I'm removing CGROUP_SKB, SK_MSG and SK_SKB for now. Changes in v3: - Use CHECK as much as possible (Yonghong) - Reject ARG_PTR_TO_MAP_VALUE_OR_NULL for sockmap (Yonghong) - Remove CGROUP_SKB, SK_MSG, SK_SKB from safe contexts - Test that the verifier rejects update from unsafe context Changes in v2: - Fix warning in patch #2 (Jakub K) - Renamed override_map_arg_type (John) - Only allow updating sockmap from known safe contexts (John) - Use __s64 for sockmap updates from user space (Yonghong) - Various small test fixes around test macros and such (Yonghong) Thank your for your reviews! 1: https://lore.kernel.org/bpf/20200310174711.7490-1-lmb@cloudflare.com/ ==================== Signed-off-by: Alexei Starovoitov commit bb23c0e1c57f3b40c8d2713401c1b42df911d424 Author: Lorenz Bauer Date: Fri Aug 21 11:29:48 2020 +0100 selftests: bpf: Test sockmap update from BPF Add a test which copies a socket from a sockmap into another sockmap or sockhash. This excercises bpf_map_update_elem support from BPF context. Compare the socket cookies from source and destination to ensure that the copy succeeded. Also check that the verifier rejects map_update from unsafe contexts. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200821102948.21918-7-lmb@cloudflare.com commit 0126240f448d5bba29d0d1593aa527d3bf67b916 Author: Lorenz Bauer Date: Fri Aug 21 11:29:47 2020 +0100 bpf: sockmap: Allow update from BPF Allow calling bpf_map_update_elem on sockmap and sockhash from a BPF context. The synchronization required for this is a bit fiddly: we need to prevent the socket from changing its state while we add it to the sockmap, since we rely on getting a callback via sk_prot->unhash. However, we can't just lock_sock like in sock_map_sk_acquire because that might sleep. So instead we disable softirq processing and use bh_lock_sock to prevent further modification. Yet, this is still not enough. BPF can be called in contexts where the current CPU might have locked a socket. If the BPF can get a hold of such a socket, inserting it into a sockmap would lead to a deadlock. One straight forward example are sock_ops programs that have ctx->sk, but the same problem exists for kprobes, etc. We deal with this by allowing sockmap updates only from known safe contexts. Improper usage is rejected by the verifier. I've audited the enabled contexts to make sure they can't run in a locked context. It's possible that CGROUP_SKB and others are safe as well, but the auditing here is much more difficult. In any case, we can extend the safe contexts when the need arises. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200821102948.21918-6-lmb@cloudflare.com commit 912f442cfb1fc695510e055bdae5f4a88e4de6b8 Author: Lorenz Bauer Date: Fri Aug 21 11:29:46 2020 +0100 bpf: Override the meaning of ARG_PTR_TO_MAP_VALUE for sockmap and sockhash The verifier assumes that map values are simple blobs of memory, and therefore treats ARG_PTR_TO_MAP_VALUE, etc. as such. However, there are map types where this isn't true. For example, sockmap and sockhash store sockets. In general this isn't a big problem: we can just write helpers that explicitly requests PTR_TO_SOCKET instead of ARG_PTR_TO_MAP_VALUE. The one exception are the standard map helpers like map_update_elem, map_lookup_elem, etc. Here it would be nice we could overload the function prototype for different kinds of maps. Unfortunately, this isn't entirely straight forward: We only know the type of the map once we have resolved meta->map_ptr in check_func_arg. This means we can't swap out the prototype in check_helper_call until we're half way through the function. Instead, modify check_func_arg to treat ARG_PTR_TO_MAP_VALUE to mean "the native type for the map" instead of "pointer to memory" for sockmap and sockhash. This means we don't have to modify the function prototype at all Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200821102948.21918-5-lmb@cloudflare.com commit 13b79d3ffbb8add9e2a6d604db2b49f241b97303 Author: Lorenz Bauer Date: Fri Aug 21 11:29:45 2020 +0100 bpf: sockmap: Call sock_map_update_elem directly Don't go via map->ops to call sock_map_update_elem, since we know what function to call in bpf_map_update_value. Since we currently don't allow calling map_update_elem from BPF context, we can remove ops->map_update_elem and rename the function to sock_map_update_elem_sys. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200821102948.21918-4-lmb@cloudflare.com commit 38e12f908a5effce93ae69ebe5e52b75e5d1cf38 Author: Lorenz Bauer Date: Fri Aug 21 11:29:44 2020 +0100 bpf: sockmap: Merge sockmap and sockhash update functions Merge the two very similar functions sock_map_update_elem and sock_hash_update_elem into one. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200821102948.21918-3-lmb@cloudflare.com commit 7b219da43f94a3b4d5a8aa4cc52b75b34f0301ec Author: Lorenz Bauer Date: Fri Aug 21 11:29:43 2020 +0100 net: sk_msg: Simplify sk_psock initialization Initializing psock->sk_proto and other saved callbacks is only done in sk_psock_update_proto, after sk_psock_init has returned. The logic for this is difficult to follow, and needlessly complex. Instead, initialize psock->sk_proto whenever we allocate a new psock. Additionally, assert the following invariants: * The SK has no ULP: ULP does it's own finagling of sk->sk_prot * sk_user_data is unused: we need it to store sk_psock Protect our access to sk_user_data with sk_callback_lock, which is what other users like reuseport arrays, etc. do. The result is that an sk_psock is always fully initialized, and that psock->sk_proto is always the "original" struct proto. The latter allows us to use psock->sk_proto when initializing IPv6 TCP / UDP callbacks for sockmap. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200821102948.21918-2-lmb@cloudflare.com commit dca5612f8eb9d0cf1dc254eb2adff1f16a588a7d Author: Andrii Nakryiko Date: Fri Aug 21 09:59:27 2020 -0700 libbpf: Add perf_buffer APIs for better integration with outside epoll loop Add a set of APIs to perf_buffer manage to allow applications to integrate perf buffer polling into existing epoll-based infrastructure. One example is applications using libevent already and wanting to plug perf_buffer polling, instead of relying on perf_buffer__poll() and waste an extra thread to do it. But perf_buffer is still extremely useful to set up and consume perf buffer rings even for such use cases. So to accomodate such new use cases, add three new APIs: - perf_buffer__buffer_cnt() returns number of per-CPU buffers maintained by given instance of perf_buffer manager; - perf_buffer__buffer_fd() returns FD of perf_event corresponding to a specified per-CPU buffer; this FD is then polled independently; - perf_buffer__consume_buffer() consumes data from single per-CPU buffer, identified by its slot index. To support a simpler, but less efficient, way to integrate perf_buffer into external polling logic, also expose underlying epoll FD through perf_buffer__epoll_fd() API. It will need to be followed by perf_buffer__poll(), wasting extra syscall, or perf_buffer__consume(), wasting CPU to iterate buffers with no data. But could be simpler and more convenient for some cases. These APIs allow for great flexiblity, but do not sacrifice general usability of perf_buffer. Also exercise and check new APIs in perf_buffer selftest. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Alan Maguire Link: https://lore.kernel.org/bpf/20200821165927.849538-1-andriin@fb.com commit ad8edd0d76d0dad65868d9aaa6e3e9ed50199b29 Merge: 149cb33955047 e60495eafdba2 Author: Alexei Starovoitov Date: Fri Aug 21 14:01:39 2020 -0700 Merge branch 'link_query-bpf_iter' Yonghong Song says: ==================== "link" has been an important concept for bpf ecosystem to connect bpf program with other properties. Currently, the information related information can be queried from userspace through bpf command BPF_LINK_GET_NEXT_ID, BPF_LINK_GET_FD_BY_ID and BPF_OBJ_GET_INFO_BY_FD. The information is also available by "cating" /proc//fdinfo/. Raw_tracepoint, tracing, cgroup, netns and xdp links are already supported in the kernel and bpftool. This patch added support for bpf iterator. Patch #1 added generic support for link querying interface. Patch #2 implemented callback functions for map element bpf iterators. Patch #3 added bpftool support. Changelogs: v3 -> v4: . return target specific link_info even if target_name buffer is empty. (Andrii) v2 -> v3: . remove extra '\t' when fdinfo prints map_id to make parsing consistent. (Andrii) v1 -> v2: . fix checkpatch.pl warnings. (Jakub) ==================== Acked-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit 3478f90cbff4d554763dba87cd2b6af57878424a Merge: d0a84e1f38d9d 1b77be463929e Author: David S. Miller Date: Fri Aug 21 14:15:16 2020 -0700 Merge branch 'crypto-chelsio-Restructure-chelsio-s-inline-crypto-drivers' Vinay Kumar Yadav says: ==================== crypto/chelsio: Restructure chelsio's inline crypto drivers This series of patches will move chelsio's inline crypto drivers (ipsec and chtls) from "drivers/crypto/chelsio/" to "drivers/net/ethernet/chelsio/inline_crypto/" for better maintenance. Patch1: moves out chtls. Patch2: moves out inline ipsec, applies on top of Patch1. ==================== Signed-off-by: David S. Miller commit 1b77be463929e6d3cefbc929f710305714a89723 Author: Vinay Kumar Yadav Date: Wed Aug 19 19:31:21 2020 +0530 crypto/chcr: Moving chelsio's inline ipsec functionality to /drivers/net This patch seperates inline ipsec functionality from coprocessor driver chcr. Now inline ipsec is separate ULD, moved from "drivers/crypto/chelsio/" to "drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/" Signed-off-by: Ayush Sawal Signed-off-by: Vinay Kumar Yadav Signed-off-by: David S. Miller commit 44fd1c1fd821955118ecb518f46076b98343e591 Author: Vinay Kumar Yadav Date: Wed Aug 19 19:31:20 2020 +0530 chelsio/chtls: separate chelsio tls driver from crypto driver chelsio inline tls driver(chtls) is mostly overlaps with NIC drivers but currenty it is part of crypto driver, so move it out to appropriate directory for better maintenance. Signed-off-by: Vinay Kumar Yadav Signed-off-by: David S. Miller commit 30969bc8e0751a5e5d44896c0632bc688abfa86f Author: Peter Enderborg Date: Fri Aug 21 16:08:22 2020 +0200 selinux: add basic filtering for audit trace events This patch adds further attributes to the event. These attributes are helpful to understand the context of the message and can be used to filter the events. There are three common items. Source context, target context and tclass. There are also items from the outcome of operation performed. An event is similar to: <...>-1309 [002] .... 6346.691689: selinux_audited: requested=0x4000000 denied=0x4000000 audited=0x4000000 result=-13 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:bin_t:s0 tclass=file With systems where many denials are occurring, it is useful to apply a filter. The filtering is a set of logic that is inserted with the filter file. Example: echo "tclass==\"file\" " > events/avc/selinux_audited/filter This adds that we only get tclass=file. The trace can also have extra properties. Adding the user stack can be done with echo 1 > options/userstacktrace Now the output will be runcon-1365 [003] .... 6960.955530: selinux_audited: requested=0x4000000 denied=0x4000000 audited=0x4000000 result=-13 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:bin_t:s0 tclass=file runcon-1365 [003] .... 6960.955560: => <00007f325b4ce45b> => <00005607093efa57> Signed-off-by: Peter Enderborg Reviewed-by: Thiébaud Weksteen Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit dd8166212d9a2eca3181567c953d5687aea4d7dc Author: Thiébaud Weksteen Date: Fri Aug 21 16:08:21 2020 +0200 selinux: add tracepoint on audited events The audit data currently captures which process and which target is responsible for a denial. There is no data on where exactly in the process that call occurred. Debugging can be made easier by being able to reconstruct the unified kernel and userland stack traces [1]. Add a tracepoint on the SELinux denials which can then be used by userland (i.e. perf). Although this patch could manually be added by each OS developer to trouble shoot a denial, adding it to the kernel streamlines the developers workflow. It is possible to use perf for monitoring the event: # perf record -e avc:selinux_audited -g -a ^C # perf report -g [...] 6.40% 6.40% audited=800000 tclass=4 | __libc_start_main | |--4.60%--__GI___ioctl | entry_SYSCALL_64 | do_syscall_64 | __x64_sys_ioctl | ksys_ioctl | binder_ioctl | binder_set_nice | can_nice | capable | security_capable | cred_has_capability.isra.0 | slow_avc_audit | common_lsm_audit | avc_audit_post_callback | avc_audit_post_callback | It is also possible to use the ftrace interface: # echo 1 > /sys/kernel/debug/tracing/events/avc/selinux_audited/enable # cat /sys/kernel/debug/tracing/trace tracer: nop entries-in-buffer/entries-written: 1/1 #P:8 [...] dmesg-3624 [001] 13072.325358: selinux_denied: audited=800000 tclass=4 The tclass value can be mapped to a class by searching security/selinux/flask.h. The audited value is a bit field of the permissions described in security/selinux/av_permissions.h for the corresponding class. [1] https://source.android.com/devices/tech/debug/native_stack_dump Signed-off-by: Thiébaud Weksteen Suggested-by: Joel Fernandes Reviewed-by: Peter Enderborg Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit e60495eafdba24a466a6ae62da86245a958954bc Author: Yonghong Song Date: Fri Aug 21 11:44:20 2020 -0700 bpftool: Implement link_query for bpf iterators The link query for bpf iterators is implemented. Besides being shown to the user what bpf iterator the link represents, the target_name is also used to filter out what additional information should be printed out, e.g., whether map_id should be shown or not. The following is an example of bpf_iter link dump, plain output or pretty output. $ bpftool link show 11: iter prog 59 target_name task pids test_progs(1749) 34: iter prog 173 target_name bpf_map_elem map_id 127 pids test_progs_1(1753) $ bpftool -p link show [{ "id": 11, "type": "iter", "prog_id": 59, "target_name": "task", "pids": [{ "pid": 1749, "comm": "test_progs" } ] },{ "id": 34, "type": "iter", "prog_id": 173, "target_name": "bpf_map_elem", "map_id": 127, "pids": [{ "pid": 1753, "comm": "test_progs_1" } ] } ] Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200821184420.574430-1-yhs@fb.com commit b76f22269028fb252727a696084c70494d80a52c Author: Yonghong Song Date: Fri Aug 21 11:44:19 2020 -0700 bpf: Implement link_query callbacks in map element iterators For bpf_map_elem and bpf_sk_local_storage bpf iterators, additional map_id should be shown for fdinfo and userspace query. For example, the following is for a bpf_map_elem iterator. $ cat /proc/1753/fdinfo/9 pos: 0 flags: 02000000 mnt_id: 14 link_type: iter link_id: 34 prog_tag: 104be6d3fe45e6aa prog_id: 173 target_name: bpf_map_elem map_id: 127 Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200821184419.574240-1-yhs@fb.com commit 6b0a249a301e2af9adda84adbced3a2988248b95 Author: Yonghong Song Date: Fri Aug 21 11:44:18 2020 -0700 bpf: Implement link_query for bpf iterators This patch implemented bpf_link callback functions show_fdinfo and fill_link_info to support link_query interface. The general interface for show_fdinfo and fill_link_info will print/fill the target_name. Each targets can register show_fdinfo and fill_link_info callbacks to print/fill more target specific information. For example, the below is a fdinfo result for a bpf task iterator. $ cat /proc/1749/fdinfo/7 pos: 0 flags: 02000000 mnt_id: 14 link_type: iter link_id: 11 prog_tag: 990e1f8152f7e54f prog_id: 59 target_name: task Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200821184418.574122-1-yhs@fb.com commit a2fc3718bc22e85378085568ecc5765fb28cabce Author: Denis Efremov Date: Fri Aug 21 23:11:37 2020 +0300 coccinelle: api: add kobj_to_dev.cocci script Use kobj_to_dev() instead of container_of(). Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 7a2624e6de03050c9f15af21c216818d5508b5e9 Author: Alex Dewar Date: Fri Aug 21 00:55:57 2020 +0100 coccinelle: add patch rule for dma_alloc_coherent Commit dfd32cad146e ("dma-mapping: remove dma_zalloc_coherent()") removed the definition of dma_zalloc_coherent() and also removed the corresponding patch rule for replacing instances of dma_alloc_coherent + memset in zalloc-simple.cocci (though left the report rule). Add a new patch rule to remove unnecessary calls to memset after allocating with dma_alloc_coherent. While we're at it, fix a couple of typos. Fixes: dfd32cad146e ("dma-mapping: remove dma_zalloc_coherent()") Signed-off-by: Alex Dewar Signed-off-by: Julia Lawall commit 4b2bd20c350a66d4f8a7c2da48b115fd4e06d15e Author: Sumera Priyadarsini Date: Wed Aug 5 14:27:40 2020 +0530 scripts: coccicheck: Add chain mode to list of modes This patch adds chain mode to the list of available modes in coccicheck. Signed-off-by: Sumera Priyadarsini Signed-off-by: Julia Lawall commit fc26a3758b55d930650b71b32844cd60d459eece Author: Douglas Anderson Date: Fri Aug 21 08:35:15 2020 -0700 drm: panel: simple: Add KD116N21-30NV-A010 Values come from the vendor and have been tested on hardware. Signed-off-by: Douglas Anderson Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200821083454.2.Idf25356dff4b36c62704188c3e3d39a2010d6f6a@changeid commit 9517130c9b4b9e66be3b55fee74cfc7789c18f27 Author: Douglas Anderson Date: Fri Aug 21 08:35:14 2020 -0700 dt-bindings: display: simple: Add KD116N21-30NV-A010 compatible The KD116N21-30NV-A010 is a pretty standard eDP panel. Add it to the list of compatible strings. Signed-off-by: Douglas Anderson Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200821083454.1.I61e6248813d797c9eeebfbb7019c713aa71c4419@changeid commit 23ce1e5c27396e39efabb58714142e8f10ce1f0c Merge: c0e53a4486373 8536bf811dd7a Author: Mark Brown Date: Fri Aug 21 17:38:50 2020 +0100 Merge series "regulator: Fix W=1 build warning when CONFIG_OF=n" from Jisheng Zhang : Fixing W=1 build warning when no support for device tree is there. Since v1: - fix the warning with __maybe_unused instead of CONFIG_OF macro - add 3 more patches to fix the same issue Jisheng Zhang (15): regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n regulator: da9210: Fix W=1 build warning when CONFIG_OF=n regulator: fan53555: Fix W=1 build warning when CONFIG_OF=n regulator: fixed: Fix W=1 build warnings when CONFIG_OF=n regulator: ltc3589: Fix W=1 build warning when CONFIG_OF=n regulator: ltc3676: Fix W=1 build warning when CONFIG_OF=n regulator: max1586: Fix W=1 build warning when CONFIG_OF=n regulator: max77826: Fix W=1 build warning when CONFIG_OF=n regulator: pwm: Fix W=1 build warning when CONFIG_OF=n regulator: stm32-pwr: Fix W=1 build warning when CONFIG_OF=n regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n regulator: sy8106a: Fix W=1 build warning when CONFIG_OF=n regulator: qcom-rpmh: Fix W=1 build warning when CONFIG_OF=n regulator: stm32-booster: Fix W=1 build warning when CONFIG_OF=n regulator: tps65023: Fix W=1 build warning when CONFIG_OF=n drivers/regulator/88pg86x.c | 2 +- drivers/regulator/da9210-regulator.c | 2 +- drivers/regulator/fan53555.c | 2 +- drivers/regulator/fixed.c | 16 ++++++++-------- drivers/regulator/ltc3589.c | 2 +- drivers/regulator/ltc3676.c | 2 +- drivers/regulator/max1586.c | 2 +- drivers/regulator/max77826-regulator.c | 2 +- drivers/regulator/pwm-regulator.c | 2 +- drivers/regulator/qcom-rpmh-regulator.c | 2 +- drivers/regulator/stm32-booster.c | 2 +- drivers/regulator/stm32-pwr.c | 2 +- drivers/regulator/stm32-vrefbuf.c | 2 +- drivers/regulator/sy8106a-regulator.c | 2 +- drivers/regulator/tps65023-regulator.c | 2 +- 15 files changed, 22 insertions(+), 22 deletions(-) -- 2.28.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit c0e53a448637366064d4b9ce586b68ced679cd22 Author: Fabio Estevam Date: Fri Aug 21 11:48:23 2020 -0300 regulator: dbx500: Remove unused debugfs goto label The following build warning is seen after commit 8bdaa43808b7 ("regulator: dbx500: no need to check return value of debugfs_create functions"): drivers/regulator/dbx500-prcmu.c:144:1: warning: label 'exit_no_debugfs' defined but not used [-Wunused-label] Remove the unused label and its associated error message. Fixes: 8bdaa43808b7 ("regulator: dbx500: no need to check return value of debugfs_create functions") Reported-by: Olof's autobuilder Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20200821144823.13404-1-festevam@gmail.com Signed-off-by: Mark Brown commit 8536bf811dd7a25d90d9128f9db98b5ed8e5bd5c Author: Jisheng Zhang Date: Fri Aug 21 11:20:09 2020 +0800 regulator: tps65023: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/tps65023-regulator.c:319:34: warning: ‘tps65023_of_match’ defined but not used [-Wunused-const-variable=] 319 | static const struct of_device_id tps65023_of_match[] = { | ^~~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200821112009.58ee8511@xhacker.debian Signed-off-by: Mark Brown commit b461ac1cc6c0a0bc4a788d5d65cfd82e5f3bd856 Author: Jisheng Zhang Date: Fri Aug 21 11:19:43 2020 +0800 regulator: stm32-booster: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/stm32-booster.c:104:34: warning: ‘stm32_booster_of_match’ defined but not used [-Wunused-const-variable=] 104 | static const struct of_device_id stm32_booster_of_match[] = { | ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Acked-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20200821111943.29b2b4ca@xhacker.debian Signed-off-by: Mark Brown commit a2508eeb8dbdf621518f8c3538d3adcb6960619c Author: Jisheng Zhang Date: Fri Aug 21 11:19:13 2020 +0800 regulator: qcom-rpmh: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/qcom-rpmh-regulator.c:970:34: warning: ‘rpmh_regulator_match_table’ defined but not used [-Wunused-const-variable=] 970 | static const struct of_device_id rpmh_regulator_match_table[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200821111913.1096f7cc@xhacker.debian Signed-off-by: Mark Brown commit bbe26107204eb64e7be1b3433e8b2252edc0b375 Author: Jisheng Zhang Date: Fri Aug 21 11:18:20 2020 +0800 regulator: sy8106a: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/sy8106a-regulator.c:126:34: warning: ‘sy8106a_i2c_of_match’ defined but not used [-Wunused-const-variable=] 126 | static const struct of_device_id sy8106a_i2c_of_match[] = { | ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200821111820.5c6ddb04@xhacker.debian Signed-off-by: Mark Brown commit d5579e7a2c6aa49a183440eb4e199f4a71543762 Author: Jisheng Zhang Date: Fri Aug 21 11:17:55 2020 +0800 regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/stm32-vrefbuf.c:287:34: warning: ‘stm32_vrefbuf_of_match’ defined but not used [-Wunused-const-variable=] 287 | static const struct of_device_id stm32_vrefbuf_of_match[] = { | ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Acked-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20200821111755.4c461039@xhacker.debian Signed-off-by: Mark Brown commit a94a11ce0d5235e53bb74d54bbd5399c23abfd87 Author: Jisheng Zhang Date: Fri Aug 21 11:17:26 2020 +0800 regulator: stm32-pwr: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/stm32-pwr.c:169:34: warning: ‘stm32_pwr_of_match’ defined but not used [-Wunused-const-variable=] 169 | static const struct of_device_id stm32_pwr_of_match[] = { | ^~~~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200821111726.38e0e746@xhacker.debian Signed-off-by: Mark Brown commit dc8c5ea3574e08e3c7105bbba5af5bb9c055903b Author: Jisheng Zhang Date: Fri Aug 21 11:16:57 2020 +0800 regulator: pwm: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/pwm-regulator.c:393:34: warning: ‘pwm_of_match’ defined but not used [-Wunused-const-variable=] 393 | static const struct of_device_id pwm_of_match[] = { | ^~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200821111658.59a7218b@xhacker.debian Signed-off-by: Mark Brown commit 7bf0a29c354fc1855dc478916211b5194bab4393 Author: Jisheng Zhang Date: Fri Aug 21 11:16:31 2020 +0800 regulator: max77826: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/max77826-regulator.c:277:34: warning: ‘max77826_of_match’ defined but not used [-Wunused-const-variable=] 277 | static const struct of_device_id max77826_of_match[] = { | ^~~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200821111631.4e799c86@xhacker.debian Signed-off-by: Mark Brown commit 44bc5d168dc209bddafb3269f72a74c3cbb0d820 Author: Jisheng Zhang Date: Fri Aug 21 11:16:01 2020 +0800 regulator: max1586: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/max1586.c:204:34: warning: ‘max1586_of_match’ defined but not used [-Wunused-const-variable=] 204 | static const struct of_device_id max1586_of_match[] = { | ^~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200821111601.26243417@xhacker.debian Signed-off-by: Mark Brown commit 1d4c1e02b96ea579f68412980ee1fe5f2ce57d8c Author: Jisheng Zhang Date: Fri Aug 21 11:15:17 2020 +0800 regulator: ltc3676: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/ltc3676.c:371:34: warning: ‘ltc3676_of_match’ defined but not used [-Wunused-const-variable=] 371 | static const struct of_device_id ltc3676_of_match[] = { | ^~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200821111517.59d7b8c8@xhacker.debian Signed-off-by: Mark Brown commit 8ece31564f1964d52eb1180ee33314c63533947e Author: Jisheng Zhang Date: Fri Aug 21 11:14:49 2020 +0800 regulator: ltc3589: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/ltc3589.c:460:34: warning: ‘ltc3589_of_match’ defined but not used [-Wunused-const-variable=] 460 | static const struct of_device_id ltc3589_of_match[] = { | ^~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200821111449.7cf580f2@xhacker.debian Signed-off-by: Mark Brown commit 0f037255008386f4ac15a201678e8e4565cd91a3 Author: Jisheng Zhang Date: Fri Aug 21 11:14:03 2020 +0800 regulator: fixed: Fix W=1 build warnings when CONFIG_OF=n Fix below warnings when CONFIG_OF=n: drivers/regulator/fixed.c:48:36: warning: ‘fixed_clkenable_data’ defined but not used [-Wunused-const-variable=] 48 | static const struct fixed_dev_type fixed_clkenable_data = { | ^~~~~~~~~~~~~~~~~~~~ drivers/regulator/fixed.c:44:36: warning: ‘fixed_voltage_data’ defined but not used [-Wunused-const-variable=] 44 | static const struct fixed_dev_type fixed_voltage_data = { | ^~~~~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200821111403.3e8b58a3@xhacker.debian Signed-off-by: Mark Brown commit 5e97d7e809a1fd8a2401429df13e0410b77d2142 Author: Jisheng Zhang Date: Fri Aug 21 11:13:24 2020 +0800 regulator: fan53555: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/fan53555.c:439:34: warning: ‘fan53555_dt_ids’ defined but not used [-Wunused-const-variable=] 439 | static const struct of_device_id fan53555_dt_ids[] = { | ^~~~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200821111324.430fe1da@xhacker.debian Signed-off-by: Mark Brown commit 2d2a84ae30a3bda57a22b283c55be8e9e6fd158b Author: Jisheng Zhang Date: Fri Aug 21 11:12:35 2020 +0800 regulator: da9210: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/da9210-regulator.c:128:34: warning: ‘da9210_dt_ids’ defined but not used [-Wunused-const-variable=] 128 | static const struct of_device_id da9210_dt_ids[] = { | ^~~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Acked-by: Adam Thomson Link: https://lore.kernel.org/r/20200821111235.14473a88@xhacker.debian Signed-off-by: Mark Brown commit e11e068ccbdb038e21e24ad2ee0157c902e3c9fc Author: Jisheng Zhang Date: Fri Aug 21 11:12:10 2020 +0800 regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n Fix below warning when CONFIG_OF=n: drivers/regulator/88pg86x.c:87:34: warning: ‘pg86x_dt_ids’ defined but not used [-Wunused-const-variable=] 87 | static const struct of_device_id pg86x_dt_ids [] = { | ^~~~~~~~~~~~ Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200821111210.0a0bed94@xhacker.debian Signed-off-by: Mark Brown commit d4ee2d35009adec016dccb47416dda411a791072 Merge: 0f863bb6b80af ba171d3f08500 Author: Olof Johansson Date: Fri Aug 21 09:20:29 2020 -0700 Merge tag 'tee-memref-null-for-v5.10' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers Handle NULL pointer indication from tee client Adds support to indicate NULL pointers instead of a valid buffer when querying the needed size of a buffer. * tag 'tee-memref-null-for-v5.10' of git://git.linaro.org/people/jens.wiklander/linux-tee: driver: tee: Handle NULL pointer indication from client Link: https://lore.kernel.org/r/20200821102535.GA1872111@jade Signed-off-by: Olof Johansson commit 0f863bb6b80af0465d3ff13a72f77760648f1895 Merge: 9123e3a74ec7b c05210ab97577 Author: Olof Johansson Date: Fri Aug 21 09:20:00 2020 -0700 Merge tag 'optee-i2c-for-v5.10' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers Enable i2c device access from OP-TEE RPC Extends the OP-TEE RPC protocol to enable I2C device access. This allows a driver in secure world to access devices on a normal world I2C bus. * tag 'optee-i2c-for-v5.10' of git://git.linaro.org/people/jens.wiklander/linux-tee: drivers: optee: allow op-tee to access devices on the i2c bus Link: https://lore.kernel.org/r/20200821100532.GA1868056@jade Signed-off-by: Olof Johansson commit fcea8b023a5f06ea0180ae65b01520b0414ee325 Author: Adam Thomson Date: Fri Aug 21 15:22:59 2020 +0100 ASoC: da7219: Fix I/O voltage range configuration during probe Previous improvements around handling device and codec level probe functionality added the possibility of the voltage level being undefined for the scenario where the IO voltage retrieved from the regulator supply was below 1.2V, whereas previously the code defaulted to the 2.5V to 3.6V range in that case. This commit restores the default value to avoid this happening. Fixes: aa5b18d1c290 ("ASoC: da7219: Move soft reset handling to codec level probe") Reported-by: Pierre-Louis Bossart Signed-off-by: Adam Thomson Link: https://lore.kernel.org/r/20200821142259.C2ECE3FB96@swsrvapps-01.diasemi.com Signed-off-by: Mark Brown commit 751365035b4f360369ed6b0990283fd25d4ee32c Author: Bard Liao Date: Thu Aug 20 21:45:42 2020 +0800 ASoC: intel: sof_sdw: add .exit callback function We may allocate some resources in sof_sdw_codec_info .init function. Adding a corresponding .exit function can help to release these resources. Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200820134542.8682-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit b50747558855ff94523dbb7f08a8c9fadfdd9110 Author: Matthias Schiffer Date: Fri Aug 21 09:11:53 2020 +0200 ASoC: fsl-asoc-card: add support for TLV320AIC32x4 codec The TLV320AIC32x4 is commonly used on TQ-Systems starterkit mainboards for i.MX-based SoMs (i.MX6Q/DL, i.MX6UL, i.MX7) and LS1021A. Signed-off-by: Matthias Schiffer Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20200821071153.7317-2-matthias.schiffer@ew.tq-group.com Signed-off-by: Mark Brown commit 6d3029e92f320531805e6aed33c74185e5e3f8fa Author: Matthias Schiffer Date: Fri Aug 21 09:11:52 2020 +0200 ASoC: bindings: fsl-asoc-card: add compatible string for TLV320AIC32x4 codec The TLV320AIC32x4 is commonly used on TQ-Systems starterkit mainboards for i.MX-based SoMs (i.MX6Q/DL, i.MX6UL, i.MX7) and LS1021A. Signed-off-by: Matthias Schiffer Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20200821071153.7317-1-matthias.schiffer@ew.tq-group.com Signed-off-by: Mark Brown commit 0eea6091539b15572cd278b8d62893c058bdb292 Author: Daniel Burgener Date: Wed Aug 19 15:59:35 2020 -0400 selinux: Create new booleans and class dirs out of tree In order to avoid concurrency issues around selinuxfs resource availability during policy load, we first create new directories out of tree for reloaded resources, then swap them in, and finally delete the old versions. This fix focuses on concurrency in each of the two subtrees swapped, and not concurrency between the trees. This means that it is still possible that subsequent reads to eg the booleans directory and the class directory during a policy load could see the old state for one and the new for the other. The problem of ensuring that policy loads are fully atomic from the perspective of userspace is larger than what is dealt with here. This commit focuses on ensuring that the directories contents always match either the new or the old policy state from the perspective of userspace. In the previous implementation, on policy load /sys/fs/selinux is updated by deleting the previous contents of /sys/fs/selinux/{class,booleans} and then recreating them. This means that there is a period of time when the contents of these directories do not exist which can cause race conditions as userspace relies on them for information about the policy. In addition, it means that error recovery in the event of failure is challenging. In order to demonstrate the race condition that this series fixes, you can use the following commands: while true; do cat /sys/fs/selinux/class/service/perms/status >/dev/null; done & while true; do load_policy; done; In the existing code, this will display errors fairly often as the class lookup fails. (In normal operation from systemd, this would result in a permission check which would be allowed or denied based on policy settings around unknown object classes.) After applying this patch series you should expect to no longer see such error messages. Signed-off-by: Daniel Burgener Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 613ba18798ac3cf257ecff65d490e8f1aa323588 Author: Daniel Burgener Date: Wed Aug 19 15:59:34 2020 -0400 selinux: Standardize string literal usage for selinuxfs directory names Switch class and policy_capabilities directory names to be referred to with global constants, consistent with booleans directory name. This will allow for easy consistency of naming in future development. Signed-off-by: Daniel Burgener Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 66ec384ad3044d63c9726493a412a2ad5317eae5 Author: Daniel Burgener Date: Wed Aug 19 15:59:33 2020 -0400 selinux: Refactor selinuxfs directory populating functions Make sel_make_bools and sel_make_classes take the specific elements of selinux_fs_info that they need rather than the entire struct. This will allow a future patch to pass temporary elements that are not in the selinux_fs_info struct to these functions so that the original elements can be preserved until we are ready to perform the switch over. Signed-off-by: Daniel Burgener Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit aeecf4a3fb11954cb10b8bc57e1661a6e4e9f3a9 Author: Daniel Burgener Date: Wed Aug 19 15:59:32 2020 -0400 selinux: Create function for selinuxfs directory cleanup Separating the cleanup from the creation will simplify two things in future patches in this series. First, the creation can be made generic, to create directories not tied to the selinux_fs_info structure. Second, we will ultimately want to reorder creation and deletion so that the deletions aren't performed until the new directory structures have already been moved into place. Signed-off-by: Daniel Burgener Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 8b87014f23e4890fe12547530ef3008e70abf593 Author: Tomi Valkeinen Date: Wed Aug 12 14:26:25 2020 +0300 drm/tidss: implement WA for AM65xx erratum i2000 This patch implements WA for AM65xx erratum i2000, which causes YUV formats to show wrong colors. An earlier patch removed a partial WA: a8d9d7da1546349f18eb2d6b6b3a04bdeb38719d ("drm/tidss: remove AM65x PG1 YUV erratum code") The patch explains the reasoning for removal. The change in plans has been that it has become clear that there are and will be users for PG1 SoCs and as such it's good to implement the WA for PG1s. This patch adds the WA back so that it is only used on SR1.0 (which is the new name for PG1). The previous WA code didn't check the SoC revision, which this patch does. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200812112625.59897-1-tomi.valkeinen@ti.com Reviewed-by: Jyri Sarha commit 227c6d109ce50e318ef37bf5c1ce31d3daab1db1 Author: Colin Ian King Date: Wed Aug 5 11:20:15 2020 +0100 drm/omap: fix spelling mistake "propert" -> "property" There is a spelling mistake in a pr_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200805102015.14891-1-colin.king@canonical.com commit 35201cc1f8053f11bfd47032c1150cb404650a61 Author: Linus Walleij Date: Sat Jun 27 00:06:06 2020 +0200 drm: omapdrm: Delete surplus GPIO includes The OMAP DRM driver includes into the two hdmi4.c and hdmi5.c files but does not use any symbols from these files. Drop the includes. Cc: Tomi Valkeinen Cc: Tony Lindgren Cc: Jyri Sarha Signed-off-by: Linus Walleij Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200626220606.340937-1-linus.walleij@linaro.org commit a115ab9b8b93e7f0ff28a4fc869a3222ae921edd Author: Pierre-Louis Bossart Date: Wed Aug 19 20:44:29 2020 +0800 ASoC: SOF: Intel: add build support for SoundWire Select SoundWire capabilities on newer Intel platforms, starting with CannonLake/CoffeeLake/CometLake. As done for HDaudio, the SoundWire link is an opt-in capability. We explicitly test for ACPI to avoid warnings on unmet dependencies on the SoundWire side. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200819124429.3785-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 3b4efa148da36f158cce3f662e831af2834b8e0f Author: Mika Kuoppala Date: Mon Aug 17 22:59:26 2020 +0300 drm/i915: Fix cmd parser desc matching with masks Our variety of defined gpu commands have the actual command id field and possibly length and flags applied. We did start to apply the mask during initialization of the cmd descriptors but forgot to also apply it on comparisons. Fix comparisons in order to properly deny access with associated commands. v2: fix lri with correct mask (Chris) References: 926abff21a8f ("drm/i915/cmdparser: Ignore Length operands during command matching") Reported-by: Nicolai Stange Cc: stable@vger.kernel.org # v5.4+ Cc: Miroslav Benes Cc: Takashi Iwai Cc: Tyler Hicks Cc: Jon Bloomfield Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200817195926.12671-1-mika.kuoppala@linux.intel.com commit c05210ab975771e161427eb47696b869d820bdaf Author: Jorge Ramirez-Ortiz Date: Fri Aug 14 13:12:21 2020 +0200 drivers: optee: allow op-tee to access devices on the i2c bus Some secure elements like NXP's SE050 sit on I2C buses. For OP-TEE to control this type of cryptographic devices it needs coordinated access to the bus, so collisions and RUNTIME_PM dont get in the way. This trampoline driver allow OP-TEE to access them. Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Jens Wiklander commit ba171d3f0850003216fd1a85190d17b1feddb961 Author: Cedric Neveux Date: Mon Mar 4 08:54:23 2019 +0100 driver: tee: Handle NULL pointer indication from client TEE Client introduce a new capability "TEE_GEN_CAP_MEMREF_NULL" to handle the support of the shared memory buffer with a NULL pointer. This capability depends on TEE Capabilities and driver support. Driver and TEE exchange capabilities at driver initialization. Signed-off-by: Michael Whitfield Signed-off-by: Cedric Neveux Reviewed-by: Joakim Bech Tested-by: Joakim Bech (QEMU) Signed-off-by: Jens Wiklander commit 3d29e98d1d7550fc959a7ad4258bd804b533b493 Author: Yang Shen Date: Sat Aug 15 17:56:17 2020 +0800 crypto: hisilicon/qm - fix the process of register algorithms to crypto When the devices are removed or not existing, the corresponding algorithms which are registered by 'hisi-zip' driver can't be used. Move 'hisi_zip_register_to_crypto' from 'hisi_zip_init' to 'hisi_zip_probe'. The algorithms will be registered to crypto only when there is device bind on the driver. And when the devices are removed, the algorithms will be unregistered. In the previous process, the function 'xxx_register_to_crypto' need a lock and a static variable to judge if the registration is the first time. Move this action into the function 'hisi_qm_alg_register'. Each device will call 'hisi_qm_alg_register' to add itself to qm list in probe process and registering algs when the qm list is empty. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit daa31783c0ebabac4fd6791a14b0f06239bde23c Author: Weili Qian Date: Sat Aug 15 17:56:16 2020 +0800 crypto: hisilicon/qm - fix the call trace when unbind device Call trace will appear in the Hisilicon crypto driver unbinding or disabling SRIOV during task running with TFMs on the corresponding function. The log looks like this: [ 293.908078] Call trace: [ 293.908080] __queue_work+0x494/0x548 [ 293.908081] queue_work_on+0x84/0xd8 [ 293.908092] qm_irq+0x4c/0xd0 [hisi_qm] [ 293.908096] __handle_irq_event_percpu+0x74/0x2a0 [ 293.908098] handle_irq_event_percpu+0x40/0x98 [ 293.908099] handle_irq_event+0x4c/0x80 [ 293.908101] handle_fasteoi_irq+0xb0/0x170 [ 293.908102] generic_handle_irq+0x3c/0x58 [ 293.908103] __handle_domain_irq+0x68/0xc0 [ 293.908104] gic_handle_irq+0xb4/0x298 [ 293.908105] el1_irq+0xcc/0x180 [ 293.908107] arch_cpu_idle+0x38/0x228 [ 293.908110] default_idle_call+0x20/0x40 [ 293.908113] do_idle+0x1cc/0x2b8 [ 293.908114] cpu_startup_entry+0x2c/0x30 [ 293.908115] rest_init+0xdc/0xe8 [ 293.908117] arch_call_rest_init+0x14/0x1c [ 293.908117] start_kernel+0x490/0x4c4 This patch adds a waiting logic as user doing the above two operations to avoid panic. The two operations will hold on in the driver remove function until the tasks release all their relative TFMs. Signed-off-by: Hui Tang Signed-off-by: Weili Qian Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 64dfe49528d071b952aa65165bb1858edc2abe9a Author: Yang Shen Date: Sat Aug 15 17:56:15 2020 +0800 crypto: hisilicon/qm - register callback function to 'pci_driver.shutdown' Since the drivers such as HPRE/SEC/ZIP do not implement 'pci_driver.shutdow', a RAS will be triggered at OS rebooting or shutting down as the hardware device is processing request. The log looks like this: NOTICE: [NimbusSecNodeType1]:[2372L]This is sec, Base = 0x141800000 NOTICE: [NimbusSecHandle]:[2319L] SecIntSt = 0x3 NOTICE: [NimbusSecHandle]:[2320L] SecQmIntStatus = 0x2 NOTICE: [PrintSecurityType]:[344L] SecurityType is RECOVERABLE! This patch offers a new API in qm to shutdown devices, and add shutdown callbacks in ACC driver based on this new API. So the running devices will be stopped when the OS reboot or shutdown. Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 8d8f8d494da7834708442070841bc91812fd3e00 Author: Shukun Tan Date: Sat Aug 15 17:56:14 2020 +0800 crypto: hisilicon/qm - fix VF not available after PF FLR When PF FLR, the hardware will actively trigger the VF FLR. Configuration space of VF needs to be saved and restored to ensure that it is available after the PF FLR. Fixes: 7ce396fa12a9("crypto: hisilicon - add FLR support") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit e88dd6e1d8370fb11af396747f3d5c16b436540f Author: Yang Shen Date: Sat Aug 15 17:56:13 2020 +0800 crypto: hisilicon/qm - fix no stop reason when use 'hisi_qm_stop' Now, there are three reasons of stopping: 'NORMAL', 'SOFT_RESET' and 'FLR'. In order to keep this, explicitly pass the stop reason as an input parameter of 'hisi_qm_stop' function. Fixes: b67202e8ed30("crypto: hisilicon/qm - add state machine for QM") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 9dca4435a1d281d74987cc7f4eeca005626222ce Author: Shukun Tan Date: Sat Aug 15 17:56:12 2020 +0800 crypto: hisilicon/qm - fix event queue depth to 2048 Increasing depth of 'event queue' from 1024 to 2048, which equals to twice depth of 'completion queue'. It will fix the easily happened 'event queue overflow' as using 1024 queue depth for 'event queue'. Fixes: 263c9959c937("crypto: hisilicon - add queue management driver...") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 71d1ca498735b33cae40e6e61e40d7e7abed5e6a Author: Hui Tang Date: Sat Aug 15 17:56:11 2020 +0800 crypto: hisilicon/qm - fix judgement of queue is full The queue depth is 1024, so the condition for judging the queue full should be 1023, otherwise the hardware cannot judge whether the queue is empty or full. Fixes: 263c9959c937("crypto: hisilicon - add queue management driver...") Signed-off-by: Hui Tang Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 7e655e196c2c2aa5df439d7489b5aeb70b9b25ca Author: Yang Shen Date: Sat Aug 15 17:56:10 2020 +0800 crypto: hisilicon/qm - fix print frequence in hisi_qp_send Requests will be sent continuously as resetting, which will cause 'printk' flooding. Using 'dev_info_ratelimited' can solve this problem well. Fixes: b67202e8ed30("crypto: hisilicon/qm - add state machine for QM") Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 3c829d6d19ae2d7084f578e7fa99b1366f5a4602 Author: Shukun Tan Date: Sat Aug 15 17:56:09 2020 +0800 crypto: hisilicon/qm - clear used reference count when start qp The used reference count is used for counting the number of 'sqe' which is under processing. This reference count should be cleared as starting 'qp', otherwise the 'used' will be messy when allocating this 'qp' again. Fixes: 5308f6600a39("crypto: hisilicon - QM memory management...") Signed-off-by: Shukun Tan Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit 7bbfacc1a89e173ec5ae681b581257db3cf5cc26 Author: Sihang Chen Date: Sat Aug 15 17:56:08 2020 +0800 crypto: hisilicon/qm - fix wrong release after using strsep Save the string address before pass to strsep, release it at end. Because strsep will update the string address to point after the token. Fixes: c31dc9fe165d("crypto: hisilicon/qm - add DebugFS for xQC and...") Signed-off-by: Sihang Chen Signed-off-by: Yang Shen Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit b1a5c9a620f2b1792e51ae3961b16943e4f874f2 Author: Ram Muthiah Date: Wed Aug 12 12:20:53 2020 -0700 crypto: virtio - don't use 'default m' Drivers shouldn't be enabled by default unless there is a very good reason to do so. There doesn't seem to be any such reason for the virtio crypto driver, so change it to the default of 'n'. Signed-off-by: Ram Muthiah [EB: adjusted commit message] Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 64f4a62e3b17f1e473f971127c2924cae42afc82 Author: Madhuparna Bhowmik Date: Tue Aug 11 18:00:24 2020 +0530 crypto: picoxcell - Fix potential race condition bug engine->stat_irq_thresh was initialized after device_create_file() in the probe function, the initialization may race with call to spacc_stat_irq_thresh_store() which updates engine->stat_irq_thresh, therefore initialize it before creating the file in probe function. Found by Linux Driver Verification project (linuxtesting.org). Fixes: ce92136843cb ("crypto: picoxcell - add support for the...") Signed-off-by: Madhuparna Bhowmik Acked-by: Jamie Iles Signed-off-by: Herbert Xu commit 8afa25aa833fbd4f3aa701cb42ebd52b1deef1d3 Author: Ira Weiny Date: Mon Aug 10 17:40:15 2020 -0700 crypto: hash - Remove unused async iterators Revert "crypto: hash - Add real ahash walk interface" This reverts commit 75ecb231ff45b54afa9f4ec9137965c3c00868f4. The callers of the functions in this commit were removed in ab8085c130ed Remove these unused calls. Fixes: ab8085c130ed ("crypto: x86 - remove SHA multibuffer routines and mcryptd") Cc: Ard Biesheuvel Signed-off-by: Ira Weiny Signed-off-by: Herbert Xu commit 5d1cdfde11a5f0c9a21b8b2b085bac678e8a18b7 Author: Ira Weiny Date: Mon Aug 10 17:40:14 2020 -0700 crypto: ux500 - Fix kmap() bug Once the crypto hash walk is started by crypto_hash_walk_first() returning non-zero, crypto_hash_walk_done() must be called to unmap any memory which was mapped by *_walk_first(). Ensure crypto_hash_walk_done() is called properly by: 1) Re-arranging the check for device data to be prior to calling *_walk_first() 2) on error call crypto_hash_walk_done() with an error code to allow the hash walk code to clean up. While we are at it clean up the 'out' label to be more meaningful. Signed-off-by: Ira Weiny Signed-off-by: Herbert Xu commit 3a61cdf43e670b99404436a5854aae993ef616ed Author: Tom Rix Date: Sun Aug 9 08:04:23 2020 -0700 hwrng: intel - cleanup initialization clang static analysis reports this problem intel-rng.c:333:2: warning: Assigned value is garbage or undefined void __iomem *mem = mem; ^~~~~~~~~~~~~~~~~ ~~~ Because mem is assigned before it is used, this is not a real problem. But the initialization is strange and not needed, so remove it. Signed-off-by: Tom Rix Signed-off-by: Herbert Xu commit abd9875497ba47e198fb565f11d5f332eeb08ab3 Author: Horia Geantă Date: Thu Aug 6 21:09:49 2020 +0300 crypto: caam - Move debugfs fops into standalone file Currently the debugfs fops are defined in caam/intern.h. This causes problems because it creates identical static functions and variables in multiple files. It also creates warnings when those files don't use the fops. This patch moves them into a standalone file, debugfs.c. It also removes unnecessary uses of ifdefs on CONFIG_DEBUG_FS. Signed-off-by: Herbert Xu [Moved most of debugfs-related operations into debugfs.c.] Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit c0f6eebedddaa4ab97311ec0730ab174d2a4c0bb Author: Jorge Ramirez-Ortiz Date: Thu Aug 6 12:00:10 2020 +0200 hwrng: optee - fix wait use case The current code waits for data to be available before attempting a second read. However the second read would not be executed as the while loop will exit. This fix does not wait if all data has been read (skips the call to msleep(0)) and reads a second time if partial data was retrieved on the first read. Worth noticing that since msleep(0) schedules a one jiffy timeout is better to skip such a call. Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Sumit Garg Signed-off-by: Herbert Xu commit 340939933e841bca50324d324e6a7ccf9b42999f Author: Jorge Ramirez-Ortiz Date: Thu Aug 6 12:00:09 2020 +0200 hwrng: optee - handle unlimited data rates Data rates of MAX_UINT32 will schedule an unnecessary one jiffy timeout on the call to msleep. Avoid this scenario by using 0 as the unlimited data rate. Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Sumit Garg Signed-off-by: Herbert Xu commit 3a95887e27ab7c2492b7c9c831805e9f1794863b Author: Uros Bizjak Date: Wed Aug 5 13:17:29 2020 +0200 crypto: x86/crc32c-intel - Use CRC32 mnemonic Current minimum required version of binutils is 2.23, which supports CRC32 instruction mnemonic. Replace the byte-wise specification of CRC32 with this proper mnemonic. The compiler is now able to pass memory operand to the instruction, so there is no need for a temporary register anymore. Some examples of the improvement: 12a: 48 8b 08 mov (%rax),%rcx 12d: f2 48 0f 38 f1 f1 crc32q %rcx,%rsi 133: 48 83 c0 08 add $0x8,%rax 137: 48 39 d0 cmp %rdx,%rax 13a: 75 ee jne 12a to: 125: f2 48 0f 38 f1 06 crc32q (%rsi),%rax 12b: 48 83 c6 08 add $0x8,%rsi 12f: 48 39 d6 cmp %rdx,%rsi 132: 75 f1 jne 125 and: 146: 0f b6 08 movzbl (%rax),%ecx 149: f2 0f 38 f0 f1 crc32b %cl,%esi 14e: 48 83 c0 01 add $0x1,%rax 152: 48 39 d0 cmp %rdx,%rax 155: 75 ef jne 146 to: 13b: f2 0f 38 f0 02 crc32b (%rdx),%eax 140: 48 83 c2 01 add $0x1,%rdx 144: 48 39 ca cmp %rcx,%rdx 147: 75 f2 jne 13b As the compiler has some more freedom w.r.t. register allocation, there is also a couple of reg-reg moves removed. There are no hidden states for CRC32 insn, so there is no need to mark assembly as volatile. v2: Introduce CRC32_INST define. Signed-off-by: Uros Bizjak CC: Herbert Xu CC: "David S. Miller" CC: Thomas Gleixner CC: Ingo Molnar CC: Borislav Petkov CC: "H. Peter Anvin" Signed-off-by: Herbert Xu commit 1d8b41ff6991bcff5864c42807f811d2304f4355 Author: Gilad Ben-Yossef Date: Wed Aug 5 09:23:01 2020 +0300 crypto: ccree - remove bitlocker cipher Remove the bitlocker cipher which is not supported by the kernel. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit a93492cae30a07bacfe869fcc96724d7911b4671 Author: Gilad Ben-Yossef Date: Wed Aug 5 09:23:00 2020 +0300 crypto: ccree - remove data unit size support Remove the implementaion of automatic advancement of sector size in IV for storage ciphers as its use is not supproted by the kernel. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit ba974adb47f2063612d558ac7c3499b59e36c147 Author: Herbert Xu Date: Wed Aug 5 15:57:08 2020 +1000 crypto: tcrypt - Add support for hash speed testing with keys Currently if you speed test a hash that requires a key you'll get an error because tcrypt does not set a key by default. This patch allows a key to be set using the new module parameter klen. Signed-off-by: Herbert Xu commit f7ade9aaf66bd5599690acf0597df2c0f6cd825a Author: Christophe JAILLET Date: Sun Aug 2 16:56:48 2020 +0200 crypto: ixp4xx - Fix the size used in a 'dma_free_coherent()' call Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()', in 'setup_crypt_desc()'. Fixes: 81bef0150074 ("crypto: ixp4xx - Hardware crypto support for IXP4xx CPUs") Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit 8cbde6c6a6d2b1599ff90f932304aab7e32fce89 Author: Tianjia Zhang Date: Sun Aug 2 19:15:32 2020 +0800 crypto: mediatek - Fix wrong return value in mtk_desc_ring_alloc() In case of memory allocation failure, a negative error code should be returned. Fixes: 785e5c616c849 ("crypto: mediatek - Add crypto driver support for some MediaTek chips") Cc: Ryder Lee Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu commit e62291c1d9f4f4398459a3a1a17446428f939b9a Author: Herbert Xu Date: Fri Jul 31 23:55:40 2020 +1000 crypto: marvell/cesa - Fix sparse warnings This patch fixes most sparse warnings in the cesa driver. The only ones remaining are to do with copying data between iomem pointers and SG lists. Most changes are trivial. The following are the noteworthy ones: - Removal of swab in mv_cesa_aes_setkey. This appears to be bogus as everything gets swabbed again later on so for BE this ends up being different from LE. The change takes the LE behaviour as the correct one. - next_dma in mv_cesa_tdma_chain was not swabbed. Signed-off-by: Herbert Xu Reported-by: kernel test robot Signed-off-by: Herbert Xu commit cbdad1f246dd98e6c9c32a6e5212337f542aa7e0 Author: Herbert Xu Date: Fri Jul 31 17:03:50 2020 +1000 crypto: algif_aead - Do not set MAY_BACKLOG on the async path The async path cannot use MAY_BACKLOG because it is not meant to block, which is what MAY_BACKLOG does. On the other hand, both the sync and async paths can make use of MAY_SLEEP. Fixes: 83094e5e9e49 ("crypto: af_alg - add async support to...") Cc: Signed-off-by: Herbert Xu commit 2a05b029c1ee045b886ebf9efef9985ca23450de Author: Herbert Xu Date: Fri Jul 31 17:03:27 2020 +1000 crypto: algif_skcipher - EBUSY on aio should be an error I removed the MAY_BACKLOG flag on the aio path a while ago but the error check still incorrectly interpreted EBUSY as success. This may cause the submitter to wait for a request that will never complete. Fixes: dad419970637 ("crypto: algif_skcipher - Do not set...") Signed-off-by: Herbert Xu commit 129a4dba1b1ba9bb36c46209fc6379beb8926312 Author: Randy Dunlap Date: Thu Jul 30 19:39:24 2020 -0700 crypto: tcrypt - delete duplicated words in messages Drop the doubled word "failed" in pr_err() messages. Signed-off-by: Randy Dunlap Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Herbert Xu commit 40a3af45d264af3079e8d894ee42611c99dca4b7 Author: Randy Dunlap Date: Thu Jul 30 19:39:23 2020 -0700 crypto: engine - delete duplicated word Drop the doubled word "a". Signed-off-by: Randy Dunlap Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Herbert Xu commit 71952d78e959cc28287a77a5636aa2601104406d Author: Randy Dunlap Date: Thu Jul 30 19:39:22 2020 -0700 crypto: crct10dif_generic - fix duplicated words Change the doubled word "at" to "at a". Signed-off-by: Randy Dunlap Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Herbert Xu commit 743b91507703f1ac9754f9de7a55504c13cac89a Author: Randy Dunlap Date: Thu Jul 30 19:39:21 2020 -0700 crypto: crc32c_generic - delete and fix duplicated words Drop the doubled word "the". Change "at at" to "at a". Signed-off-by: Randy Dunlap Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Herbert Xu commit 4eb57bcd4c6230cde9dda61f1d43c38f58670d94 Author: Randy Dunlap Date: Thu Jul 30 19:39:19 2020 -0700 crypto: algif_aead - delete duplicated word Drop the doubled word "is". Signed-off-by: Randy Dunlap Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Herbert Xu commit 0a772f3e46a0d54c404a4d9feb19a5192bbf4e18 Author: Christophe JAILLET Date: Mon Jul 27 11:30:27 2020 +0200 crypto: hifn_795x - switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'hifn_probe()' GFP_KERNEL can be used because it is a probe function and no spin_lock is taken. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit ee9108fedf63c6b8cfc40767c472680d51dd1662 Author: Denis Efremov Date: Sat Aug 1 16:31:23 2020 +0300 scsi: libcxgbi: Use kvzalloc instead of opencoded kzalloc/vzalloc Remove cxgbi_alloc_big_mem(), cxgbi_free_big_mem() functions and use kvzalloc/kvfree instead. __GFP_NOWARN added to kvzalloc() call because we already print a warning in case of allocation fail. Link: https://lore.kernel.org/r/20200801133123.61834-1-efremov@linux.com Signed-off-by: Denis Efremov Signed-off-by: Martin K. Petersen commit ca358af1d1bb5b9eb75f3998b20ab68f6b3ce69c Author: Andy Shevchenko Date: Thu Jul 30 18:35:35 2020 +0300 scsi: dc395x: Use %*ph to print small buffer Use %*ph format to print small buffer as hex string. Link: https://lore.kernel.org/r/20200730153535.39691-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Martin K. Petersen commit 4a636e9c7a2107b9a590f08d6f8f8a917e6b85de Author: Li Heng Date: Thu Jul 30 11:31:58 2020 +0800 scsi: mpt3sas: Remove superfluous memset() Fixes coccicheck warning: ./drivers/scsi/mpt3sas/mpt3sas_base.c:5247:16-34: WARNING: dma_alloc_coherent use in ioc -> request already zeroes out memory, so memset is not needed dma_alloc_coherent() already zeroes out memory so memset() is not needed. Link: https://lore.kernel.org/r/1596079918-41115-4-git-send-email-liheng40@huawei.com Signed-off-by: Li Heng Signed-off-by: Martin K. Petersen commit bef93fbfcf4ae9ecaa50e38d32cf6b8dbce4a797 Author: Li Heng Date: Thu Jul 30 11:31:57 2020 +0800 scsi: qla2xxx: Remove superfluous memset() Fixes coccicheck warning: ./drivers/scsi/qla2xxx/qla_mbx.c:4928:15-33: WARNING: dma_alloc_coherent use in els_cmd_map already zeroes out memory, so memset is not needed dma_alloc_coherent() already zeroes out memory so memset() is not needed. Link: https://lore.kernel.org/r/1596079918-41115-3-git-send-email-liheng40@huawei.com Signed-off-by: Li Heng Signed-off-by: Martin K. Petersen commit 7b1d886298077e8fb1f6c1d44cdb22872bb5bb8c Author: Li Heng Date: Thu Jul 30 11:31:56 2020 +0800 scsi: pmcraid: Remove superfluous memset() Fixes coccicheck warning: ./drivers/scsi/pmcraid.c:4709:3-21: WARNING: dma_alloc_coherent use in pinstance -> hrrq_start [ i ] already zeroes out memory, so memset is not needed dma_alloc_coherent() already zeroes out memory so memset() is not needed. Link: https://lore.kernel.org/r/1596079918-41115-2-git-send-email-liheng40@huawei.com Signed-off-by: Li Heng Signed-off-by: Martin K. Petersen commit f672d7d35f88fbd84b43090450145c076f54c95a Author: Li Heng Date: Thu Jul 30 11:03:55 2020 +0800 scsi: mvsas: Remove superfluous memset() Fixes coccicheck warning: ./drivers/scsi/mvsas/mv_init.c:244:11-29: WARNING: dma_alloc_coherent use in mvi -> tx already zeroes out memory, so memset is not needed ./drivers/scsi/mvsas/mv_init.c:250:15-33: WARNING: dma_alloc_coherent use in mvi -> rx_fis already zeroes out memory, so memset is not needed ./drivers/scsi/mvsas/mv_init.c:256:11-29: WARNING: dma_alloc_coherent use in mvi -> rx already zeroes out memory, so memset is not needed ./drivers/scsi/mvsas/mv_init.c:265:13-31: WARNING: dma_alloc_coherent use in mvi -> slot already zeroes out memory, so memset is not needed dma_alloc_coherent() already zeroes out memory so memset() is not needed. Link: https://lore.kernel.org/r/1596078235-54002-1-git-send-email-liheng40@huawei.com Signed-off-by: Li Heng Signed-off-by: Martin K. Petersen commit 8fee79ed8ea23c241e55fb5f6fd935d330f074f6 Author: Li Heng Date: Wed Jul 29 17:19:50 2020 +0800 scsi: mptctl: Remove unneeded cast from memory allocation Remove casting the values returned by memory allocation function. Coccinelle emits WARNING: ./drivers/message/fusion/mptctl.c:2596:14-31: WARNING: casting value returned by memory allocation function to (SCSIDevicePage0_t *) is useless. ./drivers/message/fusion/mptctl.c:2660:15-32: WARNING: casting value returned by memory allocation function to (SCSIDevicePage3_t *) is useless. Link: https://lore.kernel.org/r/1596014390-18605-1-git-send-email-liheng40@huawei.com Signed-off-by: Li Heng Signed-off-by: Martin K. Petersen commit 33fff97cbdc1246d59f64614e0081e393c484d02 Author: Li Heng Date: Wed Jul 29 17:19:14 2020 +0800 scsi: mptfc: Remove unneeded cast from memory allocation Remove casting the values returned by memory allocation function. Coccinelle emits WARNING: ./drivers/message/fusion/mptfc.c:766:17-30: WARNING: casting value returned by memory allocation function to (FCPortPage0_t *) is useless. ./drivers/message/fusion/mptfc.c:907:17-30: WARNING: casting value returned by memory allocation function to (FCPortPage1_t *) is useless. [mkp: memset()] Link: https://lore.kernel.org/r/1596014354-59935-1-git-send-email-liheng40@huawei.com Signed-off-by: Li Heng Signed-off-by: Martin K. Petersen commit 460d74a0911c562f56148519a2467271271a73aa Author: Andy Teng Date: Wed Aug 19 16:43:40 2020 +0800 scsi: ufs: ufs-mediatek: Modify the minimum RX/TX lane count to 2 MediaTek UFS host now supports 2 lanes. Modify the lane count to 2. This modification shall not impact old 1-lane host because PA_CONNECTEDRXDATALANES and PA_CONNECTEDTXDATALANES will limit the target lanes properly during power mode change. So we could relax the limitation in ufs_dev_params. Link: https://lore.kernel.org/r/20200819084340.7021-1-stanley.chu@mediatek.com Reviewed-by: Stanley Chu Reviewed-by: Avri Altman Signed-off-by: Andy Teng Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 50807f22c89f77f8478d2feb8e1289582034e06e Author: Can Guo Date: Tue Aug 18 18:02:29 2020 -0700 scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler() Commit 5586dd8ea250 ("scsi: ufs: Fix a race condition between error handler and runtime PM ops") moves the ufshcd_scsi_block_requests() inside err_handler() but forgets to remove the ufshcd_scsi_unblock_requests() in the early return path. Correct the mistake. Link: https://lore.kernel.org/r/1597798958-24322-1-git-send-email-cang@codeaurora.org Fixes: 5586dd8ea250 ("scsi: ufs: Fix a race condition between error handler and runtime PM ops") Reviewed-by: Asutosh Das Reviewed-by: Hongwu Su Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 9530a3e00459cd6eabf050133205e0e8fecbdfc7 Author: Stephen Smalley Date: Thu Aug 20 13:00:40 2020 -0400 selinux: permit removing security.selinux xattr before policy load Currently SELinux denies attempts to remove the security.selinux xattr always, even when permissive or no policy is loaded. This was originally motivated by the view that all files should be labeled, even if that label is unlabeled_t, and we shouldn't permit files that were once labeled to have their labels removed entirely. This however prevents removing SELinux xattrs in the case where one "disables" SELinux by not loading a policy (e.g. a system where runtime disable is removed and selinux=0 was not specified). Allow removing the xattr before SELinux is initialized. We could conceivably permit it even after initialization if permissive, or introduce a separate permission check here. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit 29707fab584540ce4e85526b0dde49b976bc1bdf Author: Kiwoong Kim Date: Mon Aug 10 19:02:27 2020 +0900 scsi: ufs: Change fDeviceInit busy wait Currently, the UFS driver busy waits for fDeviceInit to be cleared. Provide an upper bound and sleep between attempts instead of busy waiting. Link: https://lore.kernel.org/r/1597053747-75171-1-git-send-email-kwmad.kim@samsung.com Tested-by: Kiwoong Kim Reviewed-by: Avri Altman Signed-off-by: Kiwoong Kim Signed-off-by: Martin K. Petersen commit b0008625795b6f8de2fc785041dd1dc8468f0367 Author: Bean Huo Date: Fri Aug 14 11:50:34 2020 +0200 scsi: ufs: Remove several redundant goto statements Link: https://lore.kernel.org/r/20200814095034.20709-3-huobean@gmail.com Reviewed-by: Stanley Chu Reviewed-by: Asutosh Das Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit f273c54bb7dbc33ec8c58c4632f6b1b1b810be21 Author: Bean Huo Date: Fri Aug 14 11:50:33 2020 +0200 scsi: ufs: Change ufshcd_comp_devman_upiu() to ufshcd_compose_devman_upiu() ufshcd_comp_devman_upiu() was poorly named leading people to think it was a completion function. Rename it to ufshcd_compose_devman_upiu(). Link: https://lore.kernel.org/r/20200814095034.20709-2-huobean@gmail.com Reviewed-by: Stanley Chu Reviewed-by: Asutosh Das Acked-by: Avri Altman Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 3079285bd73c0b3ea2528298cda7db77f9ea7eb7 Author: Saurav Kashyap Date: Fri Aug 7 04:06:56 2020 -0700 scsi: qedf: Fix race between ELS completion and flushing ELS request Fix race between ELS completion and flushing ELS request. Link: https://lore.kernel.org/r/20200807110656.19965-8-jhasan@marvell.com Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 22ddec31b0d424c997a49e8b3a5dfc2f2c827363 Author: Saurav Kashyap Date: Fri Aug 7 04:06:55 2020 -0700 scsi: qedf: Don't process ELS completion if event is flushed or cleaned up Don't process ELS completion if event is flushed or cleaned up. Link: https://lore.kernel.org/r/20200807110656.19965-7-jhasan@marvell.com Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 1f6d1d4ca2caf4d111493c587f3bd7921d244ba5 Author: Saurav Kashyap Date: Fri Aug 7 04:06:54 2020 -0700 scsi: qedf: Initiate cleanup for ELS commands as well Initiate cleanup for ELS commands as well. Link: https://lore.kernel.org/r/20200807110656.19965-6-jhasan@marvell.com Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 39d0357dd5ed81bdb2c3bfee8df23edcea7afd40 Author: Saurav Kashyap Date: Fri Aug 7 04:06:53 2020 -0700 scsi: qedf: Send cleanup even for RRQ on timeout Send cleanup even for RRQ on timeout. Link: https://lore.kernel.org/r/20200807110656.19965-5-jhasan@marvell.com Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit b09ea43fecd23c73bac74620d51ac40529ae319d Author: Saurav Kashyap Date: Fri Aug 7 04:06:52 2020 -0700 scsi: qedf: Do not kill timeout work for original I/O on RRQ completion The timer is already cancelled when abort is completed, hence no need to cancel it again. Link: https://lore.kernel.org/r/20200807110656.19965-4-jhasan@marvell.com Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 7fb8ff080689038dd20a5e8661a594911163d910 Author: Saurav Kashyap Date: Fri Aug 7 04:06:51 2020 -0700 scsi: qedf: Check the validity of rjt frame before processing This is reported by Klockwork. Link: https://lore.kernel.org/r/20200807110656.19965-3-jhasan@marvell.com Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit a521bbc38ddc97d620103a543379380591ec912b Author: Saurav Kashyap Date: Fri Aug 7 04:06:50 2020 -0700 scsi: qedf: Check for port type and role before processing an event The rport lock gets initialized during offload. If a non-FCP or non-target rport got logout then this rport will be uninitialized. KASAN was complaining because of it. ========= [ 14.384434] the code is fine but needs lockdep annotation. [ 14.384482] turning off the locking correctness validator. ======== Link: https://lore.kernel.org/r/20200807110656.19965-2-jhasan@marvell.com Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 68bdb3db6ce3af6082395396efb301fb98ae87b9 Author: Sai Prakash Ranjan Date: Tue Aug 4 21:40:33 2020 +0530 scsi: ufs-qcom: Remove unused MSM bus scaling APIs MSM bus scaling has moved on to use interconnect framework and downstream bus scaling APIs like msm_bus_scale*() do not exist anymore in the kernel. Currently they are guarded by a config which also does not exist and hence there are no build failures reported. Remove these unused interfaces as they are currently no-ops and the scaling support that may be added in future will use interconnect API. Link: https://lore.kernel.org/r/20200804161033.15586-1-saiprakash.ranjan@codeaurora.org Signed-off-by: Sai Prakash Ranjan Signed-off-by: Martin K. Petersen commit ce60a2b827d71cbfa1942a1f3d23ce4a12f20d21 Author: Don Brace Date: Fri Jul 31 16:01:50 2020 -0500 scsi: smartpqi: Bump version to 1.2.16-010 Link: https://lore.kernel.org/r/159622931040.30579.9167901134341507088.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Gerry Morong Reviewed-by: Kevin Barnett Reviewed-by: Martin Wilck Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 8b664fefa3413ea42bb68546f1f1756289b080a7 Author: Kevin Barnett Date: Fri Jul 31 16:01:44 2020 -0500 scsi: smartpqi: Add RAID bypass counter Add a counter to assist in verifying when RAID bypass is being used. Link: https://lore.kernel.org/r/159622930468.30579.13153724465552773544.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Martin Wilck Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 4d15ad3813010acca004e475b54f221a9c721c33 Author: Kevin Barnett Date: Fri Jul 31 16:01:38 2020 -0500 scsi: smartpqi: Support device deletion via sysfs Support device deletion via sysfs. I.e: echo 1 > /sys/block/sd/device/delete Link: https://lore.kernel.org/r/159622929885.30579.2727491506675011534.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Martin Wilck Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 9e68cccc8ef7206f0bccd590378d0dca8f9b4f57 Author: Kevin Barnett Date: Fri Jul 31 16:01:33 2020 -0500 scsi: smartpqi: Avoid crashing kernel for controller issues Eliminate kernel panics when getting invalid responses from controller. Take controller offline instead of causing kernel panics. Link: https://lore.kernel.org/r/159622929306.30579.16523318707596752828.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Prasad Munirathnam Reviewed-by: Martin Wilck Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 244ca45e15cffe38ce465957d70c861b324961a4 Author: Mahesh Rajashekhara Date: Fri Jul 31 16:01:27 2020 -0500 scsi: smartpqi: Update logical volume size after expansion Have OS rescan after logical volume expansion to reflect new size. Link: https://lore.kernel.org/r/159622928727.30579.298277463169866711.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Martin Wilck Signed-off-by: Mahesh Rajashekhara Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 3af06083ba216e7b40c798b23aa2004d79c747d4 Author: Mahesh Rajashekhara Date: Fri Jul 31 16:01:21 2020 -0500 scsi: smartpqi: Add id support for SmartRAID 3152-8i VID_9005, DID_028F, SVID_9005 and SDID_080A. Link: https://lore.kernel.org/r/159622928143.30579.14769183842894725454.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Reviewed-by: Martin Wilck Signed-off-by: Mahesh Rajashekhara Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit ce14379350645189dbe6c618169ce4a2fab6aeb1 Author: Kevin Barnett Date: Fri Jul 31 16:01:11 2020 -0500 scsi: smartpqi: Identify physical devices without issuing INQUIRY Eliminate issuing INQUIRYs to problematic devices by using information provided by controller. Link: https://lore.kernel.org/r/159622927172.30579.3960527536810532094.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Martin Wilck Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 0491bdc7ee1ec212bdb2fac8ed375283922fd828 Author: Suganath Prabu S Date: Thu Jul 30 13:33:49 2020 +0530 scsi: mpt3sas: Update driver version to 35.100.00.00 Updated driver version to 35.100.00.00 Link: https://lore.kernel.org/r/1596096229-3341-8-git-send-email-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 711a923c14d9a48d15a30a2c085184954bf04931 Author: Suganath Prabu S Date: Thu Jul 30 13:33:48 2020 +0530 scsi: mpt3sas: Postprocessing of target and LUN reset If driver has not received the interrupt for the aborted SCSI command before processing the TM reply, driver polls all the reply descriptor pools looking for the reply for the aborted SCSI command before marking TM as FAILED. If it finds the reply, then it marks the TM as SUCCESS otherwise it marks it FAILED. scsih_tm_cmd_map_status() checks whether TM has aborted the timed out SCSI command or not. If TM has aborted the IO, then it returns SUCCESS else it returns FAILED. Link: https://lore.kernel.org/r/1596096229-3341-7-git-send-email-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 521e9c0b62860ed3b6899c771c1ab82b51009311 Author: Suganath Prabu S Date: Thu Jul 30 13:33:47 2020 +0530 scsi: mpt3sas: Add functions to check if any cmd is outstanding on Target and LUN Add helper functions to check whether any SCSI command is outstanding on particular Target, LUN device. Also add function parameters 'channel', 'id' to function mpt3sas_scsih_issue_tm(). Link: https://lore.kernel.org/r/1596096229-3341-6-git-send-email-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 5afa9d4444070ec313672bc7009315a951c28200 Author: Suganath Prabu S Date: Thu Jul 30 13:33:46 2020 +0530 scsi: mpt3sas: Rename and export interrupt mask/unmask functions Rename Function _base_unmask_interrupts() to mpt3sas_base_unmask_interrupts() and _base_mask_interrupts() to mpt3sas_base_mask_interrupts(). Also add function declarion to mpt3sas_base.h Link: https://lore.kernel.org/r/1596096229-3341-5-git-send-email-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 9e73ed2e4cf51878ad2e5c5cff6146844f5960b7 Author: Suganath Prabu S Date: Thu Jul 30 13:33:45 2020 +0530 scsi: mpt3sas: Cancel the running work during host reset It is not recommended to issue back-to-back host reset without any delay. However, if someone issues back-to-back host reset then we observe that target devices get unregistered and re-register with SML. And if OS drive is behind the HBA when it gets unregistered, then file-system goes into read-only mode. Normally during host reset, driver marks accessible target devices as responding and triggers the event MPT3SAS_REMOVE_UNRESPONDING_DEVICES to remove any non-responding devices through FW worker thread. While processing this event, driver unregisters the non-responding devices and clears the responding flag for all the devices. Currently, during host reset, driver is cancelling only those Firmware event works which are pending in Firmware event workqueue. It is not cancelling work which is currently running. Change the driver to cancel all events. Link: https://lore.kernel.org/r/1596096229-3341-4-git-send-email-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit af6ec1eee5ed680df0b5e0e49aa6b2673ef6e237 Author: Suganath Prabu S Date: Thu Jul 30 13:33:44 2020 +0530 scsi: mpt3sas: 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. Link: https://lore.kernel.org/r/1596096229-3341-3-git-send-email-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit f09219e48b401c961f9d2f8f97a0c0b55b7894e1 Author: Suganath Prabu S Date: Thu Jul 30 13:33:43 2020 +0530 scsi: mpt3sas: Memset config_cmds.reply buffer with zeros Currently config_cmds.reply buffer is not memset to zero before posting config page request message. In some cases, for the current config request, the previous config reply is getting processed and we will observe PageType mismatch between request to reply buffer. It will be difficult to debug this type of issue and it confuses by thinking that HBA Firmware itself posted the wrong config reply. So it is better to memset the config_cmds.reply buffer with zeros before issuing the config request. Link: https://lore.kernel.org/r/1596096229-3341-2-git-send-email-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 8bb2dde069d860e7ea379862a7d0e8ee01cec5e9 Author: Can Guo Date: Sun Aug 9 05:15:55 2020 -0700 scsi: ufs: Properly release resources if a task is aborted successfully In current UFS task abort hook, namely ufshcd_abort(), if one task is aborted successfully, clk_gating.active_reqs held by this task is not decreased, which makes clk_gating.active_reqs stay above zero forever, thus clock gating would never happen. Instead of releasing resources of one task "manually", use the existing func __ufshcd_transfer_req_compl(). This change also eliminates a possible race of scsi_dma_unmap() from the real completion in IRQ handler path. Link: https://lore.kernel.org/r/1596975355-39813-10-git-send-email-cang@codeaurora.org Fixes: 1ab27c9cf8b6 ("ufs: Add support for clock gating") CC: Stanley Chu Reviewed-by: Stanley Chu Reviewed-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit d0a84e1f38d9d6ae2dfab0b6c2407d667a265aa5 Author: Vishal Kulkarni Date: Wed Aug 19 00:25:03 2020 +0530 ethtool: allow flow-type ether without IP protocol field Set IP protocol mask only when IP protocol field is set. This will allow flow-type ether with vlan rule which don't have protocol field to apply. ethtool -N ens5f4 flow-type ether proto 0x8100 vlan 0x600\ m 0x1FFF action 3 loc 16 Signed-off-by: Vishal Kulkarni Reviewed-by: Michal Kubecek Signed-off-by: David S. Miller commit f8c931f3be8dd074bb3e5cae99a8fc8bfdc54dfb Author: Alex Dewar Date: Thu Aug 20 19:38:36 2020 +0100 nfc: st21nfca: Remove unnecessary cast In st21nfca_connectivity_event_received(), the return value of devm_kzalloc() is unnecessarily cast from void*. Remove cast. Issue identified with Coccinelle. Signed-off-by: Alex Dewar Signed-off-by: David S. Miller commit 0eddbef6489cf98b0577a27e4334e24eceb66c28 Author: Alex Dewar Date: Thu Aug 20 19:32:58 2020 +0100 nfc: st-nci: Remove unnecessary cast In st_nci_hci_connectivity_event_received(), the return value of devm_kzalloc() is unnecessarily cast from void*. Remove cast. Issue identified with Coccinelle. Signed-off-by: Alex Dewar Signed-off-by: David S. Miller commit 31ac155cc1e5cdf67dce8208a3071982f5d7fbec Author: Alex Dewar Date: Thu Aug 20 18:47:25 2020 +0100 net: qed: Remove unnecessary cast In qed_rdma_destroy_cq() the result of dma_alloc_coherent() is cast from void* unnecessarily. Remove cast. Issue identified with Coccinelle. Signed-off-by: Alex Dewar Signed-off-by: David S. Miller commit e6e67768a0b9d6e31ef0bfe94f24659d0e6941f1 Merge: 394fcd8a81345 59c0d31988fb3 Author: David S. Miller Date: Thu Aug 20 16:14:54 2020 -0700 Merge branch 'tcp_mmap-optmizations' Eric Dumazet says: ==================== tcp_mmap: optmizations This series updates tcp_mmap reference tool to use best pratices. First patch is using madvise(MADV_DONTNEED) to decrease pressure on the socket lock. Last patches try to use huge pages when available. ==================== Acked-by: Soheil Hassas Yeganeh Acked-by: Arjun Roy Signed-off-by: David S. Miller commit 59c0d31988fb366189502a8ac66b7fe1486b7e40 Author: Eric Dumazet Date: Thu Aug 20 10:11:18 2020 -0700 selftests: net: tcp_mmap: Use huge pages in receive path One down side of using TCP rx zerocopy is one extra TLB miss per page after the mapping operation. While if the application is using hugepages, the non zerocopy recvmsg() will not have to pay these TLB costs. This patch allows server side to use huge pages for the non zero copy case, to allow fair comparisons when both solutions use optimal conditions. Signed-off-by: Eric Dumazet Cc: Arjun Roy Cc: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 72653ae5303c626ca29fcbcbb8165a894a104adf Author: Eric Dumazet Date: Thu Aug 20 10:11:17 2020 -0700 selftests: net: tcp_mmap: Use huge pages in send path There are significant gains using huge pages when available, as shown in [1]. This patch adds mmap_large_buffer() and uses it in client side (tx path of this reference tool) Following patch will use the feature for server side. [1] https://patchwork.ozlabs.org/project/netdev/patch/20200820154359.1806305-1-edumazet@google.com/ Signed-off-by: Eric Dumazet Cc: Arjun Roy Cc: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 0d89419319ef68f8acc1b78377ad3e7523fead4a Author: Eric Dumazet Date: Thu Aug 20 10:11:16 2020 -0700 selftests: net: tcp_mmap: use madvise(MADV_DONTNEED) When TCP_ZEROCOPY_RECEIVE operation has been added, I made the mistake of automatically un-mapping prior content before mapping new pages. This has the unfortunate effect of adding potentially long MMU operations (like TLB flushes) while socket lock is held. Using madvise(MADV_DONTNEED) right after pages has been used has two benefits : 1) This releases pages sooner, allowing pages to be recycled if they were part of a page pool in a NIC driver. 2) No more long unmap operations while preventing immediate processing of incoming packets. The cost of the added system call is small enough. Arjun will submit a kernel patch allowing to opt out from the unmap attempt in tcp_zerocopy_receive() Signed-off-by: Eric Dumazet Cc: Arjun Roy Cc: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 394fcd8a813456b3306c423ec4227ed874dfc08b Author: Eric Dumazet Date: Thu Aug 20 08:43:59 2020 -0700 net: zerocopy: combine pages in zerocopy_sg_from_iter() Currently, tcp sendmsg(MSG_ZEROCOPY) is building skbs with order-0 fragments. Compared to standard sendmsg(), these skbs usually contain up to 16 fragments on arches with 4KB page sizes, instead of two. This adds considerable costs on various ndo_start_xmit() handlers, especially when IOMMU is in the picture. As high performance applications are often using huge pages, we can try to combine adjacent pages belonging to same compound page. Tested on AMD Rome platform, with IOMMU, nominal single TCP flow speed is roughly doubled (~55Gbit -> ~100Gbit), when user application is using hugepages. For reference, nominal single TCP flow speed on this platform without MSG_ZEROCOPY is ~65Gbit. Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Signed-off-by: David S. Miller commit 4f6c09f7faf0daa85afee827ef033c8e2c3e8dbf Merge: 1e76a2ff317d0 0d630f58989a1 Author: David S. Miller Date: Thu Aug 20 16:04:42 2020 -0700 Merge branch 'nfp-flower-add-support-for-QinQ-matching' Simon Horman says: ==================== nfp: flower: add support for QinQ matching Louis says: Add new feature to the Netronome flower driver to enable QinQ offload. This needed a bit of gymnastics in order to not break compatibility with older firmware as the flow key sent to the firmware had to be updated in order to make space for the extra field. ==================== Signed-off-by: David S. Miller commit 0d630f58989a1ac741dc6cb0afd49daa95aac0fc Author: Louis Peens Date: Thu Aug 20 16:39:38 2020 +0200 nfp: flower: add support to offload QinQ match When both the driver and the firmware supports QinQ the flow key structure that is send to the firmware is updated as the old method of matching on VLAN did not allow for space to add another VLAN tag. VLAN flows can now also match on the tpid field, not constrained to just 0x8100 as before. Signed-off-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit e4cab45a19cde8c03e9af3124ef1513ed58ca3a6 Author: Louis Peens Date: Thu Aug 20 16:39:37 2020 +0200 nfp: flower: check that we don't exceed the FW key size Add a check to make sure the total length of the flow key sent to the firmware stays within the supported limit. Signed-off-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 0d982de3e27e8091dfa62368cd3eefbc7c17c8a2 Author: Peng Ma Date: Tue Aug 18 14:36:09 2020 +0800 rtc: fsl-ftm-alarm: update acpi device id Original device id would conflict with crypto driver, change it. Signed-off-by: Peng Ma Signed-off-by: Ran Wang Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200818063609.39859-1-ran.wang_1@nxp.com commit f471b05f76e4b1b6ba07ebc7681920a5c5b97c5d Author: Chris Packham Date: Tue Aug 18 13:35:43 2020 +1200 rtc: ds1307: Clear OSF flag on DS1388 when setting time Ensure the OSF flag is cleared on the DS1388 when the clock is set. Fixes: df11b323b16f ("rtc: ds1307: handle oscillator failure flags for ds1388 variant") Signed-off-by: Chris Packham Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200818013543.4283-1-chris.packham@alliedtelesis.co.nz commit 59ed0127155201863db49f3dc5fb41316433340a Author: Chris Packham Date: Mon Aug 17 11:57:31 2020 +1200 rtc: ds1307: Ensure oscillator is enabled for DS1388 Similar to the other variants the DS1388 has a bit to stop the oscillator to reduce the power consumption from VBAT. Ensure that the oscillator is enabled when the system is up. Signed-off-by: Chris Packham Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200816235731.21071-1-chris.packham@alliedtelesis.co.nz commit 163a512cd929d6db712a3021720362749653998b Author: Geert Uytterhoeven Date: Fri Aug 14 13:07:31 2020 +0200 rtc: rtc-rs5c313: Convert to module_platform_driver() Reduce boilerplate by using the module_platform_driver() helper. Signed-off-by: Geert Uytterhoeven Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200814110731.29029-4-geert+renesas@glider.be commit f65e727464d7c0090f05548e8f323779eaa97eda Author: Geert Uytterhoeven Date: Fri Aug 14 13:07:30 2020 +0200 rtc: rtc-rs5c313: Fix late hardware init rs5c313_rtc_init() calls platform_driver_register(), and initializes the hardware. This is wrong because of two reasons: 1. As soon as the driver has been registered, the device may be probed. If devm_rtc_device_register() is called before hardware initialization, reading the current time will fail: rs5c313 rs5c313: rs5c313_rtc_read_time: timeout error rs5c313 rs5c313: registered as rtc0 rs5c313 rs5c313: rs5c313_rtc_read_time: timeout error rs5c313 rs5c313: hctosys: unable to read the hardware clock 2. If the platform device does not exist, the driver will still write to a hardware device that may not be present. Fix this by moving the hardware initialization sequence to the driver's .probe() method. Signed-off-by: Geert Uytterhoeven Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200814110731.29029-3-geert+renesas@glider.be commit fc9656a370499e5a32425b715f8fed241e832458 Author: Geert Uytterhoeven Date: Fri Aug 14 13:07:29 2020 +0200 rtc: rtc-rs5c313: Drop obsolete platform_set_drvdata() call Commit 284e2fa1da00a998 ("rtc: rtc-rs5c313: use devm_rtc_device_register()"), removed the last user of the driver-specific data. Hence there is no longer a need to set it. Signed-off-by: Geert Uytterhoeven Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200814110731.29029-2-geert+renesas@glider.be commit c254bcd7231a3eeafc453f6ee3a483a2e7ff486e Author: Victor Ding Date: Fri Aug 14 19:17:30 2020 +1000 rtc: cmos: zero-init wkalrm when reading from CMOS cmos_read_alarm() may leave certain fields of a struct rtc_wkalrm untouched; therefore, these fields contain garbage if not properly initialized, leading to inconsistent values when converting into time64_t. This patch to zero initialize the struct before calling cmos_read_alarm(). Note that this patch is not intended to produce a correct time64_t, it is only to produce a consistent value. In the case of suspend/resume, a correct time64_t is not necessary; a consistent value is sufficient to correctly perform an equality test for t_current_expires and t_saved_expires. Logic to deduce a correct time64_t is expensive and hence should be avoided. Signed-off-by: Victor Ding Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200814191654.v2.1.Iaf7638a2f2a87ff68d85fcb8dec615e41340c97f@changeid commit 6a23e577a9f8b6d510f6dcdaa67bbb5cd0fba6ed Merge: c76964e810a55 c31979747b709 Author: Mark Brown Date: Thu Aug 20 22:47:12 2020 +0100 Merge series "spi: rspi: Bit rate improvements" from Geert Uytterhoeven : Hi Mark, This patch series contains several improvements for the Renesas SPI/QSPI driver related to bit rate configuration. Changes compared to v1 (https://lore.kernel.org/r/20200608095940.30516-1-geert+renesas@glider.be): - Drop accepted patch. This has been tested on RSK+RZA1 (RSPI) and R-Car M2-W/Koelsch (QSPI), using a scope and logic analyzer, except for the by-one divider on QSPI. This has not been tested on legacy SuperH, due to lack of hardware. Thanks for your comments! Geert Uytterhoeven (7): spi: rspi: Remove useless .set_config_register() check spi: rspi: Clean up Bit Rate Division Setting handling spi: rspi: Increase bit rate accuracy on RZ/A spi: rspi: Increase bit rate range for RSPI on SH spi: rspi: Increase bit rate range for QSPI spi: rspi: Fill in spi_transfer.effective_speed_hz spi: rspi: Fill in controller speed limits drivers/spi/spi-rspi.c | 81 +++++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 29 deletions(-) -- 2.17.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds commit c76964e810a55c30cc407760d7cd79b5df53ecc6 Author: Fabio Estevam Date: Wed Aug 19 09:33:30 2020 -0300 spi: imx: Remove unneeded probe message There is no point in printing a plain "probed" message on successful probe. Just remove it and make the kernel log a bit less noisy. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20200819123330.22880-1-festevam@gmail.com Signed-off-by: Mark Brown commit c31979747b7090e8d255caecf5bb314436dd90ef Author: Geert Uytterhoeven Date: Wed Aug 19 14:59:04 2020 +0200 spi: rspi: Fill in controller speed limits Fill in the controller speed limits, so the SPI core can use them for validating SPI transfers, and adjusting them where needed. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819125904.20938-8-geert+renesas@glider.be Signed-off-by: Mark Brown commit cb588254140802dbef0b29e4d0a1212cbe5e61e3 Author: Geert Uytterhoeven Date: Wed Aug 19 14:59:03 2020 +0200 spi: rspi: Fill in spi_transfer.effective_speed_hz Fill in the effective bit rate used for transfers, so the SPI core can calculate instead of estimate delays. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819125904.20938-7-geert+renesas@glider.be Signed-off-by: Mark Brown commit 6a195f24f3e88b9242268da79547fe4a61f30910 Author: Geert Uytterhoeven Date: Wed Aug 19 14:59:02 2020 +0200 spi: rspi: Increase bit rate range for QSPI Increase bit rate range for QSPI by extending the range of supported dividers: 1. QSPI supports a divider of 1, by setting SPBR to zero, increasing the upper limit from 48.75 to 97.5 MHz on R-Car Gen2, 2. Make use of the Bit Rate Frequency Division Setting field in Command Registers, to decrease the lower limit from 191 to 24 kbps on R-Car Gen2. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819125904.20938-6-geert+renesas@glider.be Signed-off-by: Mark Brown commit 4e71d926abbe9ec23415f2ec8685a7bc26c1ceed Author: Geert Uytterhoeven Date: Wed Aug 19 14:59:01 2020 +0200 spi: rspi: Increase bit rate range for RSPI on SH Increase bit rate range for RSPI on legacy SH by making use of the Bit Rate Frequency Division Setting field in Command Registers, just like is already done on RZ/A. This decreases the lower limit by a factor of 8. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819125904.20938-5-geert+renesas@glider.be Signed-off-by: Mark Brown commit feace90233a8cd44a18902216657279c3932d471 Author: Geert Uytterhoeven Date: Wed Aug 19 14:59:00 2020 +0200 spi: rspi: Increase bit rate accuracy on RZ/A rspi_rz_set_config_register() favors high values of "brdv" over high values of "spbr". As "brdv" is not a plain divider, but controls a power-of-two divider, this may cause the selection of non-optimal divider values. E.g. on RSK+RZA1, when 3.8 MHz is requested, the actual configured bit rate is 2.08 MHz (spbr = 1, brdv = 3), while 3.7 MHz would be possible (spbr = 8, brdv = 0). Fix this by only resorting to higher "brdv" values when really needed. This makes the driver always pick optimal divider values on RZ/A. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819125904.20938-4-geert+renesas@glider.be Signed-off-by: Mark Brown commit 8dd71698607f822c3675c366a8a79bc82f7621f8 Author: Geert Uytterhoeven Date: Wed Aug 19 14:58:59 2020 +0200 spi: rspi: Clean up Bit Rate Division Setting handling Add a macro for configuring the Bit Rate Division Setting field in Command Registers, instead of open-coding the same operation using a hardcoded shift. Rename "div" to "brdv", as it is not a plain divider value, but controls a power-of-two divider. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819125904.20938-3-geert+renesas@glider.be Signed-off-by: Mark Brown commit 7ffe363bb2a25f0760127657f88243647f49bd5c Author: Geert Uytterhoeven Date: Wed Aug 19 14:58:58 2020 +0200 spi: rspi: Remove useless .set_config_register() check Not implementing spi_ops.set_config_register() is a driver bug that would prevent the driver from working at all. Hence remove the run-time check. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819125904.20938-2-geert+renesas@glider.be Signed-off-by: Mark Brown commit 70d65cd555c5e43c613700f604a47f7ebcf7b6f1 Author: Al Viro Date: Mon Jul 20 10:09:24 2020 -0400 ppc: propagate the calling conventions change down to csum_partial_copy_generic() ... and get rid of the pointless fallback in the wrappers. On error it used to zero the unwritten area and calculate the csum of the entire thing. Not wanting to do it in assembler part had been very reasonable; doing that in the first place, OTOH... In case of an error the caller discards the data we'd copied, along with whatever checksum it might've had. Signed-off-by: Al Viro commit daf52375c19feb4397cfd883302a7c907de2d6ad Author: Al Viro Date: Sun Jul 19 21:56:07 2020 -0400 amd64: switch csum_partial_copy_generic() to new calling conventions ... and fold handling of misaligned case into it. Implementation note: we stash the "will we need to rol8 the sum in the end" flag into the MSB of %rcx (the lower 32 bits are used for length); the rest is pretty straightforward. Signed-off-by: Al Viro commit fdf8bee96f9aeaac4559725c2dfae6e1bd7b7043 Author: Al Viro Date: Sun Jul 19 18:31:07 2020 -0400 sparc64: propagate the calling convention changes down to __csum_partial_copy_...() ... and rename them into csum_and_copy_...() - the wrappers become pointless. [braino fixed] Signed-off-by: Al Viro commit 2a5d2bd159f33ef34484ee14705dcf8634061f2c Author: Al Viro Date: Sun Jul 19 18:03:51 2020 -0400 xtensa: propagate the calling conventions change down into csum_partial_copy_generic() turn the exception handlers into returning 0. Signed-off-by: Al Viro commit 1cd95ab85df730b140156baac92fd2640290a5e5 Author: Al Viro Date: Sun Jul 19 17:37:15 2020 -0400 mips: propagate the calling convention change down into __csum_partial_copy_..._user() and turn the exception handlers into simply returning 0, which simplifies the hell out of things in csum_partial.S Signed-off-by: Al Viro commit f863c65c46b479c0bc1b4aa999de1759b1e4036f Author: Al Viro Date: Sun Jul 19 14:01:58 2020 -0400 mips: __csum_partial_copy_kernel() has no users left Signed-off-by: Al Viro commit c44ac3c832d49ffd91fb9ec8c172d927b29d8cf7 Author: Al Viro Date: Sun Jul 19 13:59:00 2020 -0400 mips: csum_and_copy_{to,from}_user() are never called under KERNEL_DS they are only called for iovec-backed iov_iter and under KERNEL_DS an attempt to create such a beast will yield a kvec-backed one. Signed-off-by: Al Viro commit ab5e8b33124468fe9d7d6042de5a9b35414c784e Author: Al Viro Date: Mon Jul 13 15:12:48 2020 -0400 sparc32: propagate the calling conventions change down to __csum_partial_copy_sparc_generic() ... and get rid of zeroing the target, etc. on fault. All exception handlers merge into one; moreover, since we are not calling lookup_fault() anymore, we don't need the magic with passing arguments for it from the page fault handler. Signed-off-by: Al Viro commit e8b95089990ceac4e5197db3c03737bf569f5081 Author: Al Viro Date: Sun Jul 12 23:53:10 2020 -0400 i386: propagate the calling conventions change down to csum_partial_copy_generic() ... and don't bother zeroing destination on error Signed-off-by: Al Viro commit dc16c8a9ce980d03cfeedbc2559744140d134130 Author: Al Viro Date: Sun Jul 12 23:05:44 2020 -0400 sh: propage the calling conventions change down to csum_partial_copy_generic() ... and get rid of zeroing destination on error there. Signed-off-by: Al Viro commit 66aa38801a5d1ea58b208d9d41374b9fac2088d3 Author: Al Viro Date: Sun Jul 12 23:01:10 2020 -0400 m68k: get rid of zeroing destination on error in csum_and_copy_from_user() Signed-off-by: Al Viro commit 1d60be3c25edf4b9554fdb02aa6fb6fd75695aa7 Author: Al Viro Date: Sun Jul 12 22:56:34 2020 -0400 arm: propagate the calling convention changes down to csum_partial_copy_from_user() ... and get rid of the "clean the destination on error" crap. Simplifies the fault handlers and the function itself... Signed-off-by: Al Viro commit b712139543af98a91300c4e923b85d311cc77c44 Author: Al Viro Date: Sun Jul 12 22:55:27 2020 -0400 alpha: propagate the calling convention changes down to csum_partial_copy.c helpers get rid of set_fs() in csum_partial_copy_nocheck(), while we are at it - just take the part of csum_and_copy_from_user() sans the access_ok() check into a helper function and have csum_partial_copy_nocheck() call that. Signed-off-by: Al Viro commit c693cc4676a055c4126e487b30b0a96ea7ec9936 Author: Al Viro Date: Sat Jul 11 00:27:49 2020 -0400 saner calling conventions for csum_and_copy_..._user() All callers of these primitives will * discard anything we might've copied in case of error * ignore the csum value in case of error * always pass 0xffffffff as the initial sum, so the resulting csum value (in case of success, that is) will never be 0. That suggest the following calling conventions: * don't pass err_ptr - just return 0 on error. * don't bother with zeroing destination, etc. in case of error * don't pass the initial sum - just use 0xffffffff. This commit does the minimal conversion in the instances of csum_and_copy_...(); the changes of actual asm code behind them are done later in the series. Note that this asm code is often shared with csum_partial_copy_nocheck(); the difference is that csum_partial_copy_nocheck() passes 0 for initial sum while csum_and_copy_..._user() pass 0xffffffff. Fortunately, we are free to pass 0xffffffff in all cases and subsequent patches will use that freedom without any special comments. A part that could be split off: parisc and uml/i386 claimed to have csum_and_copy_to_user() instances of their own, but those were identical to the generic one, so we simply drop them. Not sure if it's worth a separate commit... Signed-off-by: Al Viro commit 99a2c96d52d312b11a943372964226fa134de3b1 Author: Al Viro Date: Sat Jul 11 23:51:04 2020 -0400 csum_and_copy_..._user(): pass 0xffffffff instead of 0 as initial sum Preparation for the change of calling conventions; right now all callers pass 0 as initial sum. Passing 0xffffffff instead yields the values comparable mod 0xffff and guarantees that 0 will not be returned on success. Signed-off-by: Al Viro commit cc44c17baf7f3f833d36b2f2a1edb1cc0b6f2cc4 Author: Al Viro Date: Sat Jul 11 00:12:07 2020 -0400 csum_partial_copy_nocheck(): drop the last argument It's always 0. Note that we theoretically could use ~0U as well - result will be the same modulo 0xffff, _if_ the damn thing did the right thing for any value of initial sum; later we'll make use of that when convenient. However, unlike csum_and_copy_..._user(), there are instances that did not work for arbitrary initial sums; c6x is one such. Signed-off-by: Al Viro commit 6e41c585e38ff696de3a11509a0ad0a11150b0c3 Author: Al Viro Date: Wed Jul 22 22:14:36 2020 -0400 unify generic instances of csum_partial_copy_nocheck() quite a few architectures have the same csum_partial_copy_nocheck() - simply memcpy() the data and then return the csum of the copy. hexagon, parisc, ia64, s390, um: explicitly spelled out that way. arc, arm64, csky, h8300, m68k/nommu, microblaze, mips/GENERIC_CSUM, nds32, nios2, openrisc, riscv, unicore32: end up picking the same thing spelled out in lib/checksum.h (with varying amounts of perversions along the way). everybody else (alpha, arm, c6x, m68k/mmu, mips/!GENERIC_CSUM, powerpc, sh, sparc, x86, xtensa) have non-generic variants. For all except c6x the declaration is in their asm/checksum.h. c6x uses the wrapper from asm-generic/checksum.h that would normally lead to the lib/checksum.h instance, but in case of c6x we end up using an asm function from arch/c6x instead. Screw that mess - have architectures with private instances define _HAVE_ARCH_CSUM_AND_COPY in their asm/checksum.h and have the default one right in net/checksum.h conditional on _HAVE_ARCH_CSUM_AND_COPY *not* defined. Signed-off-by: Al Viro commit 3ea7ca80d9c0ff606b5a129dce2354f771a9e4e8 Author: Al Viro Date: Fri Jul 10 20:10:34 2020 -0400 icmp_push_reply(): reorder adding the checksum up do csum_partial_copy_nocheck() on the first fragment, then add the rest to it. Equivalent transformation. That was the only caller of csum_partial_copy_nocheck() that might pass it non-zero as the last argument. Signed-off-by: Al Viro commit 8d5930dfb7edbf136f2d9900be34ca7af4ba38c1 Author: Al Viro Date: Fri Jul 10 20:07:10 2020 -0400 skb_copy_and_csum_bits(): don't bother with the last argument it's always 0 Signed-off-by: Al Viro commit 1e15dd6f84172245a071610dea459fbc1443993e Merge: a467f2f8ad5f9 539237d1c609c Author: Mark Brown Date: Thu Aug 20 20:30:34 2020 +0100 Merge series "Add mediatek codec mt6359 driver" from Jiaxin Yu : Add mediatek codec (MT6359) driver MT6359 support playback and capture feature. On downlink path, it includes three DACs for handset, headset, and lineout path. On unlink path, it includeds three ADCs for main mic, second mic, 3rd mic, and headset mic. By scenario, select *_MUX widget to create damp path. And by select mic_type_mux to choose DMIC/AMIC/.... For example, select these MUX widget to create headset path (1) DAC In Mux --> "Normal Path" (2) HP Mux --> "Audio Playback" v6 changes: 1. Remove the compatible string in mt6359codec because MFD should be registering the platform device. v5 changes: 1. Don't need to unregister the component whic is already relegated to devm. 2. patchwork link: https://patchwork.kernel.org/cover/11716387/ https://patchwork.kernel.org/patch/11717757/ https://patchwork.kernel.org/patch/11716491/ v4 changes: 1. Add a remove() function to undo regulator_enable(). 2. Removed unnecessary logs. 3. patchwork link: https://patchwork.kernel.org/cover/11715553/ https://patchwork.kernel.org/patch/11716015/ https://patchwork.kernel.org/patch/11715557/ v3 changes: 1. patchwork link: https://patchwork.kernel.org/cover/11714291/ https://patchwork.kernel.org/patch/11714295/ https://patchwork.kernel.org/patch/11714339/ v2 changes: 1. patchwork link: https://patchwork.kernel.org/cover/11706935/ https://patchwork.kernel.org/patch/11708865/ https://patchwork.kernel.org/patch/11706937/ v1 changes: 1.lkml link: https://lkml.org/lkml/2020/3/5/1257 Jiaxin Yu (2): ASoC: mediatek: mt6359: add codec driver dt-bindings: mediatek: mt6359: add codec document .../devicetree/bindings/sound/mt6359.yaml | 61 + sound/soc/codecs/Kconfig | 8 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/mt6359.c | 2753 +++++++++++++++++ sound/soc/codecs/mt6359.h | 2640 ++++++++++++++++ 5 files changed, 5464 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mt6359.yaml create mode 100644 sound/soc/codecs/mt6359.c create mode 100644 sound/soc/codecs/mt6359.h -- 2.18.0 commit a467f2f8ad5f9a21f92b3fa6ad2aac90fa7054fe Author: Colin Ian King Date: Wed Aug 19 17:01:03 2020 +0100 ASoC: qcom: add missing out of memory check on drvdata->clks allocation Currently drvdata->clks is not being checked for an allocation failure, leading to potential null pointer dereferencing. Fix this by adding a check and returning -ENOMEM if an error occurred. Fixes: 1220f6a76e77 ("ASoC: qcom: Add common array to initialize soc based core clocks") Signed-off-by: Colin Ian King Reviewed-by: Rohit kumar Addresses-Coverity: ("Dereference null return value") Link: https://lore.kernel.org/r/20200819160103.164893-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 1eb629363aa354e63f55f6680b0724165cf2088d Author: Pierre-Louis Bossart Date: Wed Aug 19 20:44:04 2020 +0800 ASoC: SOF: Intel: hda: import SOUNDWIRE_INIT namespace Make sure the SoundWire driver can be loaded Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200819124404.3734-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 539237d1c609c0fd23389369939b5cc93feb16fb Author: Jiaxin Yu Date: Thu Aug 20 16:51:33 2020 +0800 dt-bindings: mediatek: mt6359: add codec document This patch adds MediaTek MT6359 codec document. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1597913493-10747-3-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 8061734ab65498f4802578564fc0948ec9aaf933 Author: Jiaxin Yu Date: Thu Aug 20 16:51:32 2020 +0800 ASoC: mediatek: mt6359: add codec driver Add the mt6359 codec driver. Signed-off-by: Jiaxin Yu Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/1597913493-10747-2-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 527b7779e5ecabb057089b760140309bdcacc16a Author: Martin Kaistra Date: Wed Aug 12 11:49:12 2020 +0200 cpupower: speed up generating git version string The variable VERSION is expanded for every use of CFLAGS. This causes "git describe" to get called multiple times on the kernel tree, which can be quite slow. The git revision does not change during build, so we can use simple variable expansion to set VERSION. Signed-off-by: Martin Kaistra Acked-by: Thomas Renninger Signed-off-by: Shuah Khan commit 1e76a2ff317d0dd9db60b5d9bb6e8215c1513fa8 Author: Rahul Kundu Date: Thu Aug 20 16:31:36 2020 +0530 cxgb4: insert IPv6 filter rules in next free region IPv6 filters can occupy up to 4 slots and will exhaust HPFILTER region much sooner. So, continue searching for free slots in the HASH or NORMAL filter regions, as long as the rule's priority does not conflict with existing rules in those regions. Signed-off-by: Rahul Kundu Signed-off-by: David S. Miller commit 71b9114d2c13a648fbe6523dd859e611c316ad90 Author: Arnd Bergmann Date: Mon Sep 2 17:47:55 2019 +0200 ARM: s3c: move into a common directory s3c24xx and s3c64xx have a lot in common, but are split across three separate directories, which makes the interaction of the header files more complicated than necessary. Move all three directories into a new mach-s3c, with a minimal set of changes to each file. Signed-off-by: Arnd Bergmann [krzk: Rebase, add s3c24xx and s3c64xx suffix to several files, add SPDX headers to new files, remove plat-samsung from MAINTAINERS] Co-developed-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Kozlowski https://lore.kernel.org/r/20200806182059.2431-39-krzk@kernel.org commit 4da1edcf8f226d53c02c6b0e3077d581115b30d0 Author: Alex Dewar Date: Thu Aug 20 18:21:18 2020 +0100 memory: brcmstb_dpfe: Fix memory leak In brcmstb_dpfe_download_firmware(), memory is allocated to variable fw by firmware_request_nowarn(), but never released. Fix up to release fw on all return paths. Cc: Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE") Signed-off-by: Alex Dewar Acked-by: Markus Mayer Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20200820172118.781324-1-alex.dewar90@gmail.com Signed-off-by: Krzysztof Kozlowski commit d1876f3596a57b114ae8615e28a935d996ac5464 Author: Colin Ian King Date: Mon Aug 10 11:21:15 2020 +0100 cpupowerutils: fix spelling mistake "dependant" -> "dependent" There is a spelling mistake in a message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Shuah Khan commit b91e7089ae70d2f7c81a4456e5b78fef498663d9 Author: Brendan Shanks Date: Fri Jul 10 15:45:25 2020 -0700 x86/umip: Add emulation/spoofing for SLDT and STR instructions Add emulation/spoofing of SLDT and STR for both 32- and 64-bit processes. Wine users have found a small number of Windows apps using SLDT that were crashing when run on UMIP-enabled systems. Originally-by: Ricardo Neri Reported-by: Andreas Rammhold Signed-off-by: Brendan Shanks Signed-off-by: Borislav Petkov Acked-by: Andy Lutomirski Reviewed-by: Ricardo Neri Tested-by: Ricardo Neri Link: https://lkml.kernel.org/r/20200710224525.21966-1-bshanks@codeweavers.com commit d738005da9c59e57e5700ccf6f505c9569c93da1 Author: Paul Cercueil Date: Thu Aug 20 14:12:56 2020 +0200 drm/panel: novatek,nt39016: Remove 'dev' field in priv struct There is already a 'struct device' pointer in the drm_panel structure, that we can access easily from our priv structure, so there's no need for a separate 'dev' field there. Reviewed-by: Sam Ravnborg Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20200820121256.32037-3-paul@crapouillou.net commit 2f4b769e4d18c1a38dc892668971fc2f0c4e6f5b Author: Paul Cercueil Date: Thu Aug 20 14:12:55 2020 +0200 drm/panel: novatek,nt39016: Reorder calls in probe The drm_panel_of_backlight() function must be called after drm_panel_init(), according to the function's documentation; otherwise the backlight won't be properly initialized. Reviewed-by: Sam Ravnborg Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20200820121256.32037-2-paul@crapouillou.net commit a3814e55b411e8cdb352637c65925f60b9ac15cc Author: Arnd Bergmann Date: Thu Aug 6 20:20:55 2020 +0200 ARM: s3c24xx: stop including mach/hardware.h from mach/io.h A number of other files rely on mach/map.h to be indirectly included from mach/io.h through mach/hardware.h. Reduce this to the minimal plat/map-base.h and add explicit includes everywhere else. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-38-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit c38758e3d574380ccfa583793be14c1cc8a322ff Author: Arnd Bergmann Date: Thu Aug 6 20:20:54 2020 +0200 cpufreq: s3c24xx: move low-level clk reg access into platform code Rather than have the cpufreq drivers touch include the common headers to get the constants, add a small indirection. This is still not the proper way that would do this through the common clk API, but it lets us kill off the header file usage. Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20200806182059.2431-37-krzk@kernel.org [krzk: Rebase and fix -Wold-style-definition] Signed-off-by: Krzysztof Kozlowski commit 44c01f5ce1c7518886a87d5522528e30e0b4d9f8 Author: Arnd Bergmann Date: Thu Aug 6 20:20:53 2020 +0200 cpufreq: s3c2412: use global s3c2412_cpufreq_setrefresh There are two identical copies of the s3c2412_cpufreq_setrefresh function: a static one in the cpufreq driver and a global version in iotiming-s3c2412.c. As the function requires the use of a hardcoded register address from a header that we want to not be visible to drivers, just move the existing global function and add a declaration in one of the cpufreq header files. Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20200806182059.2431-36-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 81b11a6a09964cfea4c525d22548790a1d92d38f Author: Arnd Bergmann Date: Thu Aug 6 20:20:52 2020 +0200 ARM: s3c: remove cpufreq header dependencies The cpufreq drivers are split between the machine directory and the drivers/cpufreq directory. In order to share header files after we convert s3c to multiplatform, those headers have to live in a different global location. Move them to linux/soc/samsung/ in lack of a better place. Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20200806182059.2431-35-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 01e93a173935d11061721c3eb90a54f80719b54f Author: Arnd Bergmann Date: Thu Aug 6 20:20:51 2020 +0200 cpufreq: s3c24xx: split out registers Each of the cpufreq drivers uses a fixed set of register bits, copy those definitions into the drivers to avoid including mach/regs-clock.h. [krzk: Fix build by copying also S3C2410_LOCKTIME] Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20200806182059.2431-34-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 81994e0ffc373e67ace4c98797c35f8213f07753 Author: Arnd Bergmann Date: Mon Sep 2 22:33:24 2019 +0200 fbdev: s3c2410fb: remove mach header dependency The s3c2410fb driver is too deeply intertwined with the s3c24xx platform code. Change it in a way that avoids the use of platform header files but having all interface data in a platform_data header, and the private register definitions next to the driver itself. One ugly bit here is that the driver pokes directly into gpio registers, which are owned by another driver. Passing the mapped addresses in platform_data is somewhat suboptimal, but it is a small improvement over the previous version. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-33-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 704b18250f59094f444d2728acccf52c185ac290 Author: Arnd Bergmann Date: Thu Aug 6 20:20:49 2020 +0200 ARM: s3c24xx: bast: avoid irq_desc array usage Once we move to sparse irqs, the irq_desc[] array is no longer accessible, so replace the two uses in bast-irq.c. The first one can use irq_to_desc(), the second one seems completely unneeded as we already have a pointer to the correct descriptor. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-32-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit cd4bd8f9435ddf08a8677f56abf418423f223959 Author: Arnd Bergmann Date: Thu Aug 6 20:20:48 2020 +0200 ARM: s3c24xx: spi: avoid hardcoding fiq number in driver The IRQ_EINT0 constant is a platform detail that is defined in mach/irqs.h and not visible to drivers once that header is made private. Since the same calculation already happens in s3c24xx_set_fiq, just return the value from there. Signed-off-by: Arnd Bergmann Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200806182059.2431-31-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit b2a587cb650f181165f38d5db51adb8f6d7e1e67 Author: Arnd Bergmann Date: Thu Aug 6 20:20:47 2020 +0200 ARM: s3c24xx: include mach/irqs.h where needed Preparing for a later conversion to sparse IRQs, this ensures that the mach/irqs.h header is still visible in files that reference an IRQ number. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-30-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit f67f6c00c7f367fe90f2bc01b9a977aa13de870e Author: Arnd Bergmann Date: Thu Aug 6 20:20:46 2020 +0200 ARM: s3c24xx: move s3cmci pinctrl handling into board files Rather than call the internal s3c_gpio_cfgall_range() function through a platform header, move the code into the set_power callback that is already exported by the board, and add a default implementation. In DT mode, the code already does not set the pin config, so nothing changes there. Signed-off-by: Arnd Bergmann Acked-by: Ulf Hansson Link: https://lore.kernel.org/r/20200806182059.2431-29-krzk@kernel.org [krzk: Rebase and correct set_power in mach-h1940.c] Signed-off-by: Krzysztof Kozlowski commit 673085f450b218f51793af7ca7614c4149ab38a9 Author: Arnd Bergmann Date: Thu Aug 6 20:20:45 2020 +0200 ARM: s3c24xx: move iis pinctrl config into boards The s3c_gpio_cfgall_range() function is an internal interface of the samsung gpio driver and should not be called directly by drivers, so move the iis pin initialization into the boards. This means the pin configuration is only run once at early boot, rather than each time the driver binds, but the effect should be the same. Note that the s3c2412-i2s driver has no boards using it in mainline linux, the driver gets selected for the jive machine but is never instantiated. Signed-off-by: Arnd Bergmann Acked-by: Linus Walleij Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200806182059.2431-28-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 35ee36c79380f7e72c022c13b83226f134c8b619 Merge: f131a4443ea46 dcacbc0f9bb89 Author: Krzysztof Kozlowski Date: Thu Aug 20 17:36:39 2020 +0200 Merge tag 'samsung-platdrv-boards' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into next/soc-s3c-cleanup Pull Samsung S3C ASoC cleanup patches from Mark Brown. These patches are part of the entire cleanup series so all further work depends on them. commit 296050a04c9e4e4017638599de8ef0c3cce375b3 Author: Nicolin Chen Date: Tue Aug 18 02:51:21 2020 -0700 memory: tegra: Correct shift value of apew According to Tegra X1 (Tegra210) TRM, the APEW field is between [23:16] so the shift bit for apew should be 16 accordingly. Signed-off-by: Nicolin Chen Link: https://lore.kernel.org/r/20200818095121.13645-1-nicoleotsuka@gmail.com Signed-off-by: Krzysztof Kozlowski commit 149cb3395504736485df1b93133e710dcf215c56 Author: Andrii Nakryiko Date: Wed Aug 19 23:14:11 2020 -0700 selftests/bpf: List newest Clang built-ins needed for some CO-RE selftests Record which built-ins are optional and needed for some of recent BPF CO-RE subtests. Document Clang diff that fixed corner-case issue with __builtin_btf_type_id(). Suggested-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200820061411.1755905-4-andriin@fb.com commit 37a6a9e7676381cdf6868d2c013893074a1ee7b6 Author: Andrii Nakryiko Date: Wed Aug 19 23:14:10 2020 -0700 selftests/bpf: Fix two minor compilation warnings reported by GCC 4.9 GCC 4.9 seems to be more strict in some regards. Fix two minor issue it reported. Fixes: 1c1052e0140a ("tools/testing/selftests/bpf: Add self-tests for new helper bpf_get_ns_current_pid_tgid.") Fixes: 2d7824ffd25c ("selftests: bpf: Add test for sk_assign") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200820061411.1755905-3-andriin@fb.com commit dda1ec9fc7f8383cb469a82614dbce61f357f3f8 Author: Andrii Nakryiko Date: Wed Aug 19 23:14:09 2020 -0700 libbpf: Fix libbpf build on compilers missing __builtin_mul_overflow GCC compilers older than version 5 don't support __builtin_mul_overflow yet. Given GCC 4.9 is the minimal supported compiler for building kernel and the fact that libbpf is a dependency of resolve_btfids, which is dependency of CONFIG_DEBUG_INFO_BTF=y, this needs to be handled. This patch fixes the issue by falling back to slower detection of integer overflow in such cases. Fixes: 029258d7b228 ("libbpf: Remove any use of reallocarray() in libbpf") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200820061411.1755905-2-andriin@fb.com commit 9b2f6fecf3b77d2457a13f77a563c07304f15775 Author: Andrii Nakryiko Date: Wed Aug 19 23:14:08 2020 -0700 libbpf: Fix detection of BPF helper call instruction BPF_CALL | BPF_JMP32 is explicitly not allowed by verifier for BPF helper calls, so don't detect it as a valid call. Also drop the check on func_id pointer, as it's currently always non-null. Fixes: 109cea5a594f ("libbpf: Sanitize BPF program code for bpf_probe_read_{kernel, user}[_str]") Reported-by: Yonghong Song Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200820061411.1755905-1-andriin@fb.com commit 0bc23a1d1c8a1b4a5e4b973a7a80a6d067bd3eef Merge: 6e9cab2e3fa59 edb65ee5aa255 Author: Daniel Borkmann Date: Thu Aug 20 16:02:36 2020 +0200 Merge branch 'bpf-umd-debug' Alexei Starovoitov says: ==================== This patch set is the first real user of user mode driver facility. The general use case for user mode driver is to ship vmlinux with preloaded BPF programs. In this particular case the user mode driver populates bpffs instance with two BPF iterators. In several months BPF_LSM project would need to preload the kernel with its own set of BPF programs and attach to LSM hooks instead of bpffs. BPF iterators and BPF_LSM are unstable from uapi perspective. They are tracing based and peek into arbitrary kernel data structures. One can question why a kernel module cannot embed BPF programs inside. The reason is that libbpf is necessary to load them. First libbpf loads BPF Type Format, then creates BPF maps, populates them. Then it relocates code sections inside BPF programs, loads BPF programs, and finally attaches them to events. Theoretically libbpf can be rewritten to work in the kernel, but that is massive undertaking. The maintenance of in-kernel libbpf and user space libbpf would be another challenge. Another obstacle to embedding BPF programs into kernel module is sys_bpf api. Loading of programs, BTF, maps goes through the verifier. It validates and optimizes the code. It's possible to provide in-kernel api to all of sys_bpf commands (load progs, create maps, update maps, load BTF, etc), but that is huge amount of work and forever maintenance headache. Hence the decision is to ship vmlinux with user mode drivers that load BPF programs. Just like kernel modules extend vmlinux BPF programs are safe extensions of the kernel and some of them need to ship with vmlinux. This patch set adds a kernel module with user mode driver that populates bpffs with two BPF iterators. $ mount bpffs /my/bpffs/ -t bpf $ ls -la /my/bpffs/ total 4 drwxrwxrwt 2 root root 0 Jul 2 00:27 . drwxr-xr-x 19 root root 4096 Jul 2 00:09 .. -rw------- 1 root root 0 Jul 2 00:27 maps.debug -rw------- 1 root root 0 Jul 2 00:27 progs.debug The user mode driver will load BPF Type Formats, create BPF maps, populate BPF maps, load two BPF programs, attach them to BPF iterators, and finally send two bpf_link IDs back to the kernel. The kernel will pin two bpf_links into newly mounted bpffs instance under names "progs.debug" and "maps.debug". These two files become human readable. $ cat /my/bpffs/progs.debug id name attached 11 dump_bpf_map bpf_iter_bpf_map 12 dump_bpf_prog bpf_iter_bpf_prog 27 test_pkt_access 32 test_main test_pkt_access test_pkt_access 33 test_subprog1 test_pkt_access_subprog1 test_pkt_access 34 test_subprog2 test_pkt_access_subprog2 test_pkt_access 35 test_subprog3 test_pkt_access_subprog3 test_pkt_access 36 new_get_skb_len get_skb_len test_pkt_access 37 new_get_skb_ifindex get_skb_ifindex test_pkt_access 38 new_get_constant get_constant test_pkt_access The BPF program dump_bpf_prog() in iterators.bpf.c is printing this data about all BPF programs currently loaded in the system. This information is unstable and will change from kernel to kernel. In some sence this output is similar to 'bpftool prog show' that is using stable api to retreive information about BPF programs. The BPF subsytems grows quickly and there is always demand to show as much info about BPF things as possible. But we cannot expose all that info via stable uapi of bpf syscall, since the details change so much. Right now a BPF program can be attached to only one other BPF program. Folks are working on patches to enable multi-attach, but for debugging it's necessary to see the current state. There is no uapi for that, but above output shows it: 37 new_get_skb_ifindex get_skb_ifindex test_pkt_access 38 new_get_constant get_constant test_pkt_access [1] [2] [3] [1] is the full name of BPF prog from BTF. [2] is the name of function inside target BPF prog. [3] is the name of target BPF prog. [2] and [3] are not exposed via uapi, since they will change from single to multi soon. There are many other cases where bpf internals are useful for debugging, but shouldn't be exposed via uapi due to high rate of changes. systemd mounts /sys/fs/bpf at the start, so this kernel module with user mode driver needs to be available early. BPF_LSM most likely would need to preload BPF programs even earlier. Few interesting observations: - though bpffs comes with two human readble files "progs.debug" and "maps.debug" they can be removed. 'rm -f /sys/fs/bpf/progs.debug' will remove bpf_link and kernel will automatically unload corresponding BPF progs, maps, BTFs. In the future '-o remount' will be able to restore them. This is not implemented yet. - 'ps aux|grep bpf_preload' shows nothing. User mode driver loaded BPF iterators and exited. Nothing is lingering in user space at this point. - We can consider giving 0644 permissions to "progs.debug" and "maps.debug" to allow unprivileged users see BPF things loaded in the system. We cannot do so with "bpftool prog show", since it's using cap_sys_admin parts of bpf syscall. - The functionality split between core kernel, bpf_preload kernel module and user mode driver is very similar to bpfilter style of interaction. - Similar BPF iterators can be used as unstable extensions to /proc. Like mounting /proc can prepopolate some subdirectory in there with a BPF iterator that will print QUIC sockets instead of tcp and udp. Changelog: v5->v6: - refactored Makefiles with Andrii's help - switched to explicit $(MAKE) style - switched to userldlibs instead of userldflags - fixed build issue with libbpf Makefile due to invocation from kbuild - fixed menuconfig order as spotted by Daniel - introduced CONFIG_USERMODE_DRIVER bool that is selected by bpfilter and bpf_preload v4->v5: - addressed Song and Andrii feedback. s/pages/max_entries/ v3->v4: - took THIS_MODULE in patch 3 as suggested by Daniel to simplify the code. - converted BPF iterator to use BTF (when available) to print full BPF program name instead of 16-byte truncated version. This is something I've been using drgn scripts for. Take a look at get_name() in iterators.bpf.c to see how short it is comparing to what user space bpftool would have to do to print the same full name: . get prog info via obj_info_by_fd . do get_fd_by_id from info->btf_id . fetch potentially large BTF of the program from the kernel . parse that BTF in user space to figure out all type boundaries and string section . read info->func_info to get btf_id of func_proto from there . find that btf_id in the parsed BTF That's quite a bit work for bpftool comparing to few lines in get_name(). I guess would be good to make bpftool do this info extraction anyway. While doing this BTF reading in the kernel realized that the verifier is not smart enough to follow double pointers (added to my todo list), otherwise get_name() would have been even shorter. v2->v3: - fixed module unload race (Daniel) - added selftest (Daniel) - fixed build bot warning v1->v2: - changed names to 'progs.debug' and 'maps.debug' to hopefully better indicate instability of the text output. Having dot in the name also guarantees that these special files will not conflict with normal bpf objects pinned in bpffs, since dot is disallowed for normal pins. - instead of hard coding link_name in the core bpf moved into UMD. - cleanedup error handling. - addressed review comments from Yonghong and Andrii. ==================== Signed-off-by: Daniel Borkmann commit edb65ee5aa2550f6035c8fb169a359bc18acb84a Author: Alexei Starovoitov Date: Tue Aug 18 21:27:59 2020 -0700 selftests/bpf: Add bpffs preload test. Add a test that mounts two bpffs instances and checks progs.debug and maps.debug for sanity data. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200819042759.51280-5-alexei.starovoitov@gmail.com commit d71fa5c9763c24dd997a2fa4feb7a13a95bab42c Author: Alexei Starovoitov Date: Tue Aug 18 21:27:58 2020 -0700 bpf: Add kernel module with user mode driver that populates bpffs. Add kernel module with user mode driver that populates bpffs with BPF iterators. $ mount bpffs /my/bpffs/ -t bpf $ ls -la /my/bpffs/ total 4 drwxrwxrwt 2 root root 0 Jul 2 00:27 . drwxr-xr-x 19 root root 4096 Jul 2 00:09 .. -rw------- 1 root root 0 Jul 2 00:27 maps.debug -rw------- 1 root root 0 Jul 2 00:27 progs.debug The user mode driver will load BPF Type Formats, create BPF maps, populate BPF maps, load two BPF programs, attach them to BPF iterators, and finally send two bpf_link IDs back to the kernel. The kernel will pin two bpf_links into newly mounted bpffs instance under names "progs.debug" and "maps.debug". These two files become human readable. $ cat /my/bpffs/progs.debug id name attached 11 dump_bpf_map bpf_iter_bpf_map 12 dump_bpf_prog bpf_iter_bpf_prog 27 test_pkt_access 32 test_main test_pkt_access test_pkt_access 33 test_subprog1 test_pkt_access_subprog1 test_pkt_access 34 test_subprog2 test_pkt_access_subprog2 test_pkt_access 35 test_subprog3 test_pkt_access_subprog3 test_pkt_access 36 new_get_skb_len get_skb_len test_pkt_access 37 new_get_skb_ifindex get_skb_ifindex test_pkt_access 38 new_get_constant get_constant test_pkt_access The BPF program dump_bpf_prog() in iterators.bpf.c is printing this data about all BPF programs currently loaded in the system. This information is unstable and will change from kernel to kernel as ".debug" suffix conveys. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200819042759.51280-4-alexei.starovoitov@gmail.com commit f0fdfefb2d4da5b76c3f810be0edb2ab90360224 Author: Alexei Starovoitov Date: Tue Aug 18 21:27:57 2020 -0700 bpf: Add BPF program and map iterators as built-in BPF programs. The program and map iterators work similar to seq_file-s. Once the program is pinned in bpffs it can be read with "cat" tool to print human readable output. In this case about BPF programs and maps. For example: $ cat /sys/fs/bpf/progs.debug id name attached 5 dump_bpf_map bpf_iter_bpf_map 6 dump_bpf_prog bpf_iter_bpf_prog $ cat /sys/fs/bpf/maps.debug id name max_entries 3 iterator.rodata 1 To avoid kernel build dependency on clang 10 separate bpf skeleton generation into manual "make" step and instead check-in generated .skel.h into git. Unlike 'bpftool prog show' in-kernel BTF name is used (when available) to print full name of BPF program instead of 16-byte truncated name. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200819042759.51280-3-alexei.starovoitov@gmail.com commit 005142b8a1f0f32d33fbe04b728464c1b7acfa0e Author: Alexei Starovoitov Date: Tue Aug 18 21:27:56 2020 -0700 bpf: Factor out bpf_link_by_id() helper. Refactor the code a bit to extract bpf_link_by_id() helper. It's similar to existing bpf_prog_by_id(). Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200819042759.51280-2-alexei.starovoitov@gmail.com commit 6e9cab2e3fa597419ec8a117a9f3e3ebc251c120 Author: Xu Wang Date: Wed Aug 19 02:53:24 2020 +0000 libbpf: Simplify the return expression of build_map_pin_path() Simplify the return expression. Signed-off-by: Xu Wang Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200819025324.14680-1-vulab@iscas.ac.cn commit 879229311bc8a887f00d827525ea59f23861c1ad Author: kernel test robot Date: Thu Aug 20 12:20:51 2020 +0200 selinux: fix memdup.cocci warnings Use kmemdup rather than duplicating its implementation Generated by: scripts/coccinelle/api/memdup.cocci Fixes: c7c556f1e81b ("selinux: refactor changing booleans") CC: Stephen Smalley Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 0b06286579b81449b1e8f14f88d3a8db091fd443 Author: Christian König Date: Wed Aug 19 15:27:48 2020 +0200 drm/ttm: fix broken merge between drm-next and drm-misc-next drm-next reverted the changes to ttm_tt_create() to do the NULL check inside the function, but drm-misc-next adds new users of this approach. Re-apply the NULL check change inside the function to fix this. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/386628/ commit 06fe45634942dc96c316bbb789049a4b0b692542 Author: Christian Brauner Date: Wed Aug 19 12:46:55 2020 +0200 sched: remove _do_fork() Now that all callers of _do_fork() have been switched to kernel_clone() remove the _do_fork() helper. Signed-off-by: Christian Brauner Link: https://lore.kernel.org/r/20200819104655.436656-12-christian.brauner@ubuntu.com commit eea11285dab3c961f8e9ce92318ccbc85fb1d5f1 Author: Christian Brauner Date: Wed Aug 19 12:46:54 2020 +0200 tracing: switch to kernel_clone() The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Signed-off-by: Christian Brauner Cc: Mauro Carvalho Chehab Cc: Alexandre Chartre Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Masami Hiramatsu Cc: Shuah Khan Cc: Ingo Molnar Cc: Steven Rostedt Cc: Xiao Yang Cc: Tom Zanussi Cc: linux-doc@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Link: https://lore.kernel.org/r/20200819104655.436656-11-christian.brauner@ubuntu.com commit f30897c17df0909ecd5f3041a5f83a84bf59ba96 Author: Christian Brauner Date: Wed Aug 19 12:46:53 2020 +0200 kgdbts: switch to kernel_clone() The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Signed-off-by: Christian Brauner Tested-by: Daniel Thompson Acked-by: Daniel Thompson Cc: Douglas Anderson Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Daniel Thompson Cc: Jason Wessel Cc: kgdb-bugreport@lists.sourceforge.net Link: https://lore.kernel.org/r/20200819104655.436656-10-christian.brauner@ubuntu.com commit 25239fd338aa2995f04ce3dc3ef3c01488bd05b3 Author: Christian Brauner Date: Wed Aug 19 12:46:52 2020 +0200 kprobes: switch to kernel_clone() The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Signed-off-by: Christian Brauner Cc: Mauro Carvalho Chehab Cc: Alexandre Chartre Cc: Jonathan Corbet Cc: Masami Hiramatsu Link: https://lore.kernel.org/r/20200819104655.436656-9-christian.brauner@ubuntu.com commit c723523bf393ff9f188f559abf0958295d393324 Author: Christian Brauner Date: Wed Aug 19 12:46:51 2020 +0200 x86: switch to kernel_clone() The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Signed-off-by: Christian Brauner Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Link: https://lore.kernel.org/r/20200819104655.436656-8-christian.brauner@ubuntu.com commit a66ef2eeed9202ed242a497511cbe15d57808337 Author: Christian Brauner Date: Wed Aug 19 12:46:50 2020 +0200 sparc: switch to kernel_clone() The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Signed-off-by: Christian Brauner Acked-by: David S. Miller Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Link: https://lore.kernel.org/r/20200819104655.436656-7-christian.brauner@ubuntu.com commit e7a2ec95d38d85e68131cd606a55dad9c53e06be Author: Christian Brauner Date: Wed Aug 19 12:46:49 2020 +0200 nios2: switch to kernel_clone() The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Signed-off-by: Christian Brauner Cc: Ley Foon Tan Link: https://lore.kernel.org/r/20200819104655.436656-6-christian.brauner@ubuntu.com commit 2cd2e1a7eb24f73adea0da9374b1a717b3d7b504 Author: Christian Brauner Date: Wed Aug 19 12:46:48 2020 +0200 m68k: switch to kernel_clone() The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Signed-off-by: Christian Brauner Acked-by: Geert Uytterhoeven Cc: Kars de Jong Cc: linux-m68k@lists.linux-m68k.org Link: https://lore.kernel.org/r/20200819104655.436656-5-christian.brauner@ubuntu.com commit f8c40ebe659db315caac512ac06dc3185ae7e2d0 Author: Christian Brauner Date: Wed Aug 19 12:46:47 2020 +0200 ia64: switch to kernel_clone() The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Signed-off-by: Christian Brauner Cc: Tony Luck Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Link: https://lore.kernel.org/r/20200819104655.436656-4-christian.brauner@ubuntu.com commit efd85a5517e6626d6dee809af3a86891b7257218 Author: Christian Brauner Date: Wed Aug 19 12:46:46 2020 +0200 h8300: switch to kernel_clone() The old _do_fork() helper is removed in favor of the new kernel_clone() helper. The latter adheres to naming conventions for kernel internal syscall helpers. Signed-off-by: Christian Brauner Cc: Greentime Hu Cc: Yoshinori Sato Cc: uclinux-h8-devel@lists.sourceforge.jp Link: https://lore.kernel.org/r/20200819104655.436656-3-christian.brauner@ubuntu.com commit cad6967ac10843a70842cd39c7b53412901dd21f Author: Christian Brauner Date: Wed Aug 19 12:46:45 2020 +0200 fork: introduce kernel_clone() The old _do_fork() helper doesn't follow naming conventions of in-kernel helpers for syscalls. The process creation cleanup in [1] didn't change the name to something more reasonable mainly because _do_fork() was used in quite a few places. So sending this as a separate series seemed the better strategy. This commit does two things: 1. renames _do_fork() to kernel_clone() but keeps _do_fork() as a simple static inline wrapper around kernel_clone(). 2. Changes the return type from long to pid_t. This aligns kernel_thread() and kernel_clone(). Also, the return value from kernel_clone that is surfaced in fork(), vfork(), clone(), and clone3() is taken from pid_vrn() which returns a pid_t too. Follow-up patches will switch each caller of _do_fork() and each place where it is referenced over to kernel_clone(). After all these changes are done, we can remove _do_fork() completely and will only be left with kernel_clone(). [1]: 9ba27414f2ec ("Merge tag 'fork-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux") Signed-off-by: Christian Brauner Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Matthew Wilcox (Oracle) Cc: "Peter Zijlstra (Intel)" Link: https://lore.kernel.org/r/20200819104655.436656-2-christian.brauner@ubuntu.com commit 04d53068508e1b670a46ed9507aeaec7ef6d4ae4 Author: Andy Shevchenko Date: Tue Aug 18 17:23:53 2020 +0300 pinctrl: intel: Update header block to reflect direct dependencies Update header inclusion block to reflect all direct dependencies that are being involved in pinctrl-intel.h. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 10c857f063fc63902160755a6e23fa594290c6d3 Author: Andy Shevchenko Date: Wed Jul 29 14:57:08 2020 +0300 pinctrl: cherryview: Switch to use intel_pinctrl_get_soc_data() Since we have common helper to retrieve SoC data from driver data we may switch to use it. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit ce7793e9ef6322d236b722ada386d3bb7ecb7df2 Author: Andy Shevchenko Date: Wed Jul 29 14:57:07 2020 +0300 pinctrl: baytrail: Switch to use intel_pinctrl_get_soc_data() Since we have common helper to retrieve SoC data from driver data we may switch to use it. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 51ab5d77dcb8a50283c0eded08c67a6d275cb910 Author: Takashi Iwai Date: Mon Aug 17 10:21:40 2020 +0200 ALSA: usb-audio: Properly match with audio interface class There are a few entries in the quirk table that set the device ID with USB_DEVICE() macro while having an extra bInterfaceClass field. But bInterfaceClass field is never checked unless the proper match_flags is set, so those may match incorrectly with all interfaces. Introduce another macro to match with the vid/pid pair and the audio class interface, and apply it to such entries, so that they can match properly. Link: https://lore.kernel.org/r/20200817082140.20232-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit fa10635fca359f047df6a18b3befd2f1e7304e1a Author: Takashi Iwai Date: Mon Aug 17 10:21:39 2020 +0200 ALSA: usb-audio: Simplify quirk entries with a macro Introduce a new macro USB_AUDIO_DEVICE() for the entries matching with the pid/vid pair and the class/subclass, and remove the open-code. Link: https://lore.kernel.org/r/20200817082140.20232-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5436f59bc5bcc27ca0244ebdb02b4228bf8b1aae Author: Takashi Iwai Date: Mon Aug 17 10:21:38 2020 +0200 ALSA: usb-audio: Move device rename and profile quirks to an internal table So far we've added the devices that need vendor/product string renames or the profile setup into the standard quirk table in quirks-table.h. This table is imported into the primary USB audio device entry, hence it's all exported for the probing so that udev and co can take a look at it. OTOH, for renaming or profile setup, we don't need to expose those explicit entries because the probe itself follows the standard way. That said, we're exposing unnecessarily too many entries. This patch moves such internal quirk entries into the own table, and reduces the exported device table size. Along with the moving items, re-arrange the entries in the proper order. Link: https://lore.kernel.org/r/20200817082140.20232-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 368d1887200d68075c064a62a9aa191168cf1eed Author: Yazen Ghannam Date: Mon Jul 20 14:53:53 2020 +0000 x86/MCE/AMD, EDAC/mce_amd: Remove struct smca_hwid.xec_bitmap The Extended Error Code Bitmap (xec_bitmap) for a Scalable MCA bank type was intended to be used by the kernel to filter out invalid error codes on a system. However, this is unnecessary after a few product releases because the hardware will only report valid error codes. Thus, there's no need for it with future systems. Remove the xec_bitmap field and all references to it. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200720145353.43924-1-Yazen.Ghannam@amd.com commit 85e6084e0b436cabe9c909e679937998ffbf9c9d Author: Luca Stefani Date: Wed Aug 5 11:57:08 2020 +0200 RAS/CEC: Fix cec_init() prototype late_initcall() expects a function that returns an integer. Update the function signature to match. [ bp: Massage commit message into proper sentences. ] Fixes: 9554bfe403bd ("x86/mce: Convert the CEC to use the MCE notifier") Signed-off-by: Luca Stefani Signed-off-by: Borislav Petkov Reviewed-by: Sami Tolvanen Tested-by: Sami Tolvanen Link: https://lkml.kernel.org/r/20200805095708.83939-1-luca.stefani.ge1@gmail.com commit 9f467393e2973f124661426953811b4758181088 Author: YueHaibing Date: Wed Jul 15 10:47:01 2020 +0800 soc: integrator: Drop pointless static qualifier in integrator_soc_init() There is no need to have the 'struct regmap *syscon_regmap' variable static since new value always be assigned before use it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200715024701.28356-1-yuehaibing@huawei.com Signed-off-by: Linus Walleij commit 642d94cf336fe57675e63a91d11f53d74b9a3f9f Author: Ingo Molnar Date: Thu Aug 20 08:17:40 2020 +0200 x86/build: Declutter the build output We have some really ancient debug printouts in the x86 boot image build code: Setup is 14108 bytes (padded to 14336 bytes). System is 8802 kB CRC 27e909d4 None of these ever helped debug any sort of breakage that I know of, and they clutter the build output. Remove them - if anyone needs the see the various interim stages of this to debug an obscure bug, they can add these printfs and more. We still keep this one: Kernel: arch/x86/boot/bzImage is ready (#19) As a sentimental leftover, plus the '#19' build count tag is mildly useful. Signed-off-by: Ingo Molnar Cc: linux-kernel@vger.kernel.org Cc: x86@kernel.org commit 5e36aff2e1bf75b964b83a2bf45f520e983e7b70 Author: Luca Ceresoli Date: Mon Aug 17 18:59:09 2020 +0200 fpga manager: xilinx-spi: remove stray comment Remove comment committed by mistake. Fixes: dd2784c01d93 ("fpga manager: xilinx-spi: check INIT_B pin during write_init") Signed-off-by: Luca Ceresoli Signed-off-by: Moritz Fischer commit 8a5de2de0339cdb7bd269140f857b62ba7222759 Author: Xu Yilun Date: Mon Aug 10 10:41:10 2020 +0800 fpga: dfl: change data type of feature id to u16 The feature id is stored in a 12 bit field in DFH. So a u16 variable is enough for feature id. This patch changes all feature id related places to fit u16. Signed-off-by: Xu Yilun Reviewed-by: Tom Rix Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit e6c013c306f0dd23b123e92037c1855e24a85dba Author: Tom Rix Date: Tue Aug 4 09:20:03 2020 -0700 MAINTAINERS: Add Tom Rix as fpga reviewer I take care of fpga kernel and userspace for Red Hat and would like help out more with the mainline kernel. Signed-off-by: Tom Rix Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit 7fbc2bc2fbe1055c563134b738ff4d94fb42892f Author: Richard Gong Date: Tue Aug 4 09:45:03 2020 -0700 fpga: stratix10-soc: make FPGA task un-interruptible When CTRL+C occurs during the process of FPGA reconfiguration, the FPGA reconfiguration process stops and the user can't perform a new FPGA reconfiguration properly. Set FPGA task to be not interruptible so that the user can properly perform FPGA reconfiguration after CTRL+C event. Signed-off-by: Richard Gong Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer commit 0c3dc787a62aef3ca7aedf3797ec42fff9b0a913 Author: Herbert Xu Date: Wed Aug 19 21:58:20 2020 +1000 crypto: algapi - Remove skbuff.h inclusion The header file algapi.h includes skbuff.h unnecessarily since all we need is a forward declaration for struct sk_buff. This patch removes that inclusion. Unfortunately skbuff.h pulls in a lot of things and drivers over the years have come to rely on it so this patch adds a lot of missing inclusions that result from this. Signed-off-by: Herbert Xu commit 37ea433c66070fcef09c6d118492c36299eb72ba Author: Stephen Smalley Date: Wed Aug 19 09:45:41 2020 -0400 selinux: avoid dereferencing the policy prior to initialization Certain SELinux security server functions (e.g. security_port_sid, called during bind) were not explicitly testing to see if SELinux has been initialized (i.e. initial policy loaded) and handling the no-policy-loaded case. In the past this happened to work because the policydb was statically allocated and could always be accessed, but with the recent encapsulation of policy state and conversion to dynamic allocation, we can no longer access the policy state prior to initialization. Add a test of !selinux_initialized(state) to all of the exported functions that were missing them and handle appropriately. Fixes: 461698026ffa ("selinux: encapsulate policy state, refactor policy load") Reported-by: Naresh Kamboju Tested-by: Andy Shevchenko Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit e5b15f5af21afbdd9bf3045b2160bd13661023e8 Merge: f3ae59c0c0153 17060fb5069f2 Author: David S. Miller Date: Wed Aug 19 16:09:33 2020 -0700 Merge branch 'ptp-Add-generic-helper-functions' Kurt Kanzenbach says: ==================== ptp: Add generic helper functions in order to reduce code duplication (and cut'n'paste errors) in the ptp code of DSA, Ethernet and Phy drivers, create helper functions and move them to ptp_classify. This way all drivers can share the same implementation. This is version four and contains bugfixes. Implemented as discussed [1] [2] [3] [4]. Previous versions can be found here: * https://lkml.kernel.org/netdev/20200723074946.14253-1-kurt@linutronix.de/ * https://lkml.kernel.org/netdev/20200727090601.6500-1-kurt@linutronix.de/ * https://lkml.kernel.org/netdev/20200730080048.32553-1-kurt@linutronix.de/ Thanks, Kurt Changes sinve v3: * Coding style issues (Richard Cochran, Petr Machata) * Add better documentation (Grygorii Strashko) * Fix cpts code (Grygorii Strashko) * Use ntohs() for TI code (Grygorii Strashko) * Add tags Changes since v2: * Make ptp_parse_header() work in all scenarios (Russell King) * Fix msgtype offset for ptp v1 packets Changes since v1: * Fix Kconfig (Richard Cochran) * Include more drivers (Richard Cochran) [1] - https://lkml.kernel.org/netdev/20200713140112.GB27934@hoboy/ [2] - https://lkml.kernel.org/netdev/20200720142146.GB16001@hoboy/ [3] - https://lkml.kernel.org/netdev/20200723074946.14253-1-kurt@linutronix.de/ [4] - https://lkml.kernel.org/netdev/20200729100257.GX1551@shell.armlinux.org.uk/ ==================== Signed-off-by: David S. Miller commit 17060fb5069f2c73a566015ce6e019d5685680b5 Author: Kurt Kanzenbach Date: Tue Aug 18 12:32:51 2020 +0200 ptp: Remove unused macro The offset for the control field is not needed anymore. Remove it. Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 9087da5dcb3d14e5f10c0e24896cbba4b684ddd8 Author: Kurt Kanzenbach Date: Tue Aug 18 12:32:50 2020 +0200 ptp: ptp_ines: Use generic helper function In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 38fa7d039fe095b5e516476694c4d5550e656b85 Author: Kurt Kanzenbach Date: Tue Aug 18 12:32:49 2020 +0200 net: phy: dp83640: Use generic helper function In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Tested-by: Richard Cochran Signed-off-by: David S. Miller commit 17de44c2c709e644e27e6cd475d42f3aa652885b Author: Kurt Kanzenbach Date: Tue Aug 18 12:32:48 2020 +0200 ethernet: ti: cpts: Use generic helper function In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Suggested-by: Grygorii Strashko Signed-off-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit 4bccb5d043dbd5c3a96bcc347c838ee9407f7d41 Author: Kurt Kanzenbach Date: Tue Aug 18 12:32:47 2020 +0200 ethernet: ti: am65-cpts: Use generic helper function In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit 7b2b28c678494c926b060627988ee60d0f6436ce Author: Kurt Kanzenbach Date: Tue Aug 18 12:32:46 2020 +0200 mlxsw: spectrum_ptp: Use generic helper function In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach Reviewed-and-tested-by: Petr Machata Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 28fba67ff97fa4e0ff9f73c0524fe66455f56086 Author: Kurt Kanzenbach Date: Tue Aug 18 12:32:45 2020 +0200 net: dsa: mv88e6xxx: Use generic helper function In order to reduce code duplication between ptp drivers, generic helper functions were introduced. Use them. Signed-off-by: Kurt Kanzenbach Tested-by: Richard Cochran Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 036c508ba95e573f53bd5bbb79b0c4d71003b319 Author: Kurt Kanzenbach Date: Tue Aug 18 12:32:44 2020 +0200 ptp: Add generic ptp message type function The message type is located at different offsets within the ptp header depending on the ptp version (v1 or v2). Therefore, drivers which also deal with ptp v1 have some code for it. Extract this into a helper function for drivers to be used. Signed-off-by: Kurt Kanzenbach Reviewed-by: Richard Cochran Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit bdfbb63c314a6fb7d27dddd62f5a3e4f062b92bb Author: Kurt Kanzenbach Date: Tue Aug 18 12:32:43 2020 +0200 ptp: Add generic ptp v2 header parsing function Reason: A lot of the ptp drivers - which implement hardware time stamping - need specific fields such as the sequence id from the ptp v2 header. Currently all drivers implement that themselves. Introduce a generic function to retrieve a pointer to the start of the ptp v2 header. Suggested-by: Russell King Signed-off-by: Kurt Kanzenbach Reviewed-by: Richard Cochran Reviewed-by: Florian Fainelli Reviewed-by: Russell King Signed-off-by: David S. Miller commit d24f1341a63cebdff22454a6464810e6f34030c6 Author: Matt Atwood Date: Wed Aug 12 14:07:02 2020 -0700 drm/i915: Apply Wa_14011264657:gen11+ Add minimum width to planes, variable with specific formats for gen11+ to reflect recent bspec changes. Signed-off-by: Matt Atwood Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200812210702.7153-1-matthew.s.atwood@intel.com commit f3ae59c0c01530ab48faf72cc678f92ad8aa7b4f Author: Cristobal Forno Date: Wed Aug 19 13:16:23 2020 -0500 ibmvnic: store RX and TX subCRQ handle array in ibmvnic_adapter struct Currently the driver reads RX and TX subCRQ handle array directly from a DMA-mapped buffer address when it needs to make a H_SEND_SUBCRQ hcall. This patch stores that information in the ibmvnic_sub_crq_queue structure instead of reading from the buffer received at login. The overall goal of this patch is to parse relevant information from the login response buffer and store it in the driver's private data structures so that we don't need to read directly from the buffer and can then free up that memory. Signed-off-by: Cristobal Forno Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit c1447efdafff23eae9b1bd81caa38412ae21410e Merge: defcffeb517b3 3357490555eac Author: Alexei Starovoitov Date: Wed Aug 19 14:19:39 2020 -0700 Merge branch 'type-and-enum-value-relos' Andrii Nakryiko says: ==================== This patch set adds libbpf support for two new classes of CO-RE relocations: type-based (TYPE_EXISTS/TYPE_SIZE/TYPE_ID_LOCAL/TYPE_ID_TARGET) and enum value-vased (ENUMVAL_EXISTS/ENUMVAL_VALUE): - TYPE_EXISTS allows to detect presence in kernel BTF of a locally-recorded BTF type. Useful for feature detection (new functionality often comes with new internal kernel types), as well as handling type renames and bigger refactorings. - TYPE_SIZE allows to get the real size (in bytes) of a specified kernel type. Useful for dumping internal structure as-is through perfbuf or ringbuf. - TYPE_ID_LOCAL/TYPE_ID_TARGET allow to capture BTF type ID of a BTF type in program's BTF or kernel BTF, respectively. These could be used for high-performance and space-efficient generic data dumping/logging by relying on small and cheap BTF type ID as a data layout descriptor, for post-processing on user-space side. - ENUMVAL_EXISTS can be used for detecting the presence of enumerator value in kernel's enum type. Most direct application is to detect BPF helper support in kernel. - ENUMVAL_VALUE allows to relocate real integer value of kernel enumerator value, which is subject to change (e.g., always a potential issue for internal, non-UAPI, kernel enums). I've indicated potential applications for these relocations, but relocations themselves are generic and unassuming and are designed to work correctly even in unintended applications. Furthermore, relocated values become constants, known to the verifier and could and would be used for dead branch code detection and elimination. This makes them ideal to do all sorts of feature detection and guarding functionality that's not available on some older (but still supported by BPF program) kernels, while having to compile and maintain one unified source code. Selftests are added for all the new features. Selftests utilizing new Clang built-ins are designed such that they will compile with older Clangs and will be skipped during test runs. So this shouldn't cause any build and test failures on systems with slightly outdated Clang compiler. LLVM patches adding these relocation in Clang: - __builtin_btf_type_id() ([0], [1], [2]); - __builtin_preserve_type_info(), __builtin_preserve_enum_value() ([3], [4]). [0] https://reviews.llvm.org/D74572 [1] https://reviews.llvm.org/D74668 [2] https://reviews.llvm.org/D85174 [3] https://reviews.llvm.org/D83878 [4] https://reviews.llvm.org/D83242 v2->v3: - fix feature detection for __builtin_btf_type_id() test (Yonghong); - fix extra empty lines at the end of files (Yonghong); v1->v2: - selftests detect built-in support and are skipped if not found (Alexei). ==================== Signed-off-by: Alexei Starovoitov commit 3357490555eacd39c2bf3e355a0e435f658d806f Author: Andrii Nakryiko Date: Wed Aug 19 12:45:19 2020 -0700 selftests/bpf: Add tests for ENUMVAL_EXISTS/ENUMVAL_VALUE relocations Add tests validating existence and value relocations for enum value-based relocations. If __builtin_preserve_enum_value() built-in is not supported, skip tests. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200819194519.3375898-6-andriin@fb.com commit eacaaed784e2c9da69dea3030c81062c1fd66a37 Author: Andrii Nakryiko Date: Wed Aug 19 12:45:18 2020 -0700 libbpf: Implement enum value-based CO-RE relocations Implement two relocations of a new enumerator value-based CO-RE relocation kind: ENUMVAL_EXISTS and ENUMVAL_VALUE. First, ENUMVAL_EXISTS, allows to detect the presence of a named enumerator value in the target (kernel) BTF. This is useful to do BPF helper/map/program type support detection from BPF program side. bpf_core_enum_value_exists() macro helper is provided to simplify built-in usage. Second, ENUMVAL_VALUE, allows to capture enumerator integer value and relocate it according to the target BTF, if it changes. This is useful to have a guarantee against intentional or accidental re-ordering/re-numbering of some of the internal (non-UAPI) enumerations, where kernel developers don't care about UAPI backwards compatiblity concerns. bpf_core_enum_value() allows to capture this succinctly and use correct enum values in code. LLVM uses ldimm64 instruction to capture enumerator value-based relocations, so add support for ldimm64 instruction patching as well. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200819194519.3375898-5-andriin@fb.com commit 4836bf5e2ec6e410c7f0c044402951484901a676 Author: Andrii Nakryiko Date: Wed Aug 19 12:45:17 2020 -0700 selftests/bpf: Add CO-RE relo test for TYPE_ID_LOCAL/TYPE_ID_TARGET Add tests for BTF type ID relocations. To allow testing this, enhance core_relo.c test runner to allow dynamic initialization of test inputs. If Clang doesn't have necessary support for new functionality, test is skipped. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200819194519.3375898-4-andriin@fb.com commit 124a892d1c416dc4f639031afb79d47857d9b0b0 Author: Andrii Nakryiko Date: Wed Aug 19 12:45:16 2020 -0700 selftests/bpf: Test TYPE_EXISTS and TYPE_SIZE CO-RE relocations Add selftests for TYPE_EXISTS and TYPE_SIZE relocations, testing correctness of relocations and handling of type compatiblity/incompatibility. If __builtin_preserve_type_info() is not supported by compiler, skip tests. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200819194519.3375898-3-andriin@fb.com commit 3fc32f40c40207bf85ce1b007f18981c4673df96 Author: Andrii Nakryiko Date: Wed Aug 19 12:45:15 2020 -0700 libbpf: Implement type-based CO-RE relocations support Implement support for TYPE_EXISTS/TYPE_SIZE/TYPE_ID_LOCAL/TYPE_ID_REMOTE relocations. These are examples of type-based relocations, as opposed to field-based relocations supported already. The difference is that they are calculating relocation values based on the type itself, not a field within a struct/union. Type-based relos have slightly different semantics when matching local types to kernel target types, see comments in bpf_core_types_are_compat() for details. Their behavior on failure to find target type in kernel BTF also differs. Instead of "poisoning" relocatable instruction and failing load subsequently in kernel, they return 0 (which is rarely a valid return result, so user BPF code can use that to detect success/failure of the relocation and deal with it without extra "guarding" relocations). Also, it's always possible to check existence of the type in target kernel with TYPE_EXISTS relocation, similarly to a field-based FIELD_EXISTS. TYPE_ID_LOCAL relocation is a bit special in that it always succeeds (barring any libbpf/Clang bugs) and resolved to BTF ID using **local** BTF info of BPF program itself. Tests in subsequent patches demonstrate the usage and semantics of new relocations. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200819194519.3375898-2-andriin@fb.com commit defcffeb517b3965e64f4e5531db3b452dccbfc5 Author: Maciej Żenczykowski Date: Tue Aug 18 19:00:27 2020 -0700 net-veth: Add type safety to veth_xdp_to_ptr() and veth_ptr_to_xdp() This reduces likelihood of incorrect use. Test: builds Signed-off-by: Maciej Żenczykowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200819020027.4072288-1-zenczykowski@gmail.com commit 596b5ef458f903d4362fb3c69967b6d8a23334bd Author: Maciej Żenczykowski Date: Tue Aug 18 18:07:10 2020 -0700 net-tun: Eliminate two tun/xdp related function calls from vhost-net This provides a minor performance boost by virtue of inlining instead of cross module function calls. Test: builds Signed-off-by: Maciej Żenczykowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200819010710.3959310-2-zenczykowski@gmail.com commit b558b6c24068d87ffcd95dad3bf0d9bd2ac290e9 Author: Maciej Żenczykowski Date: Tue Aug 18 18:07:09 2020 -0700 net-tun: Add type safety to tun_xdp_to_ptr() and tun_ptr_to_xdp() This reduces likelihood of incorrect use. Test: builds Signed-off-by: Maciej Żenczykowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200819010710.3959310-1-zenczykowski@gmail.com commit 7ba58fff001da7e7296dbed8ddc13212300d1c57 Author: Rob Herring Date: Thu Aug 6 16:50:09 2020 -0600 dt-bindings: Validate DT binding schema in a single call As the number of binding schemas has grown, the time to run dt_binding_check has gotten pretty slow. A large part of this is due to the slow startup time of Python (a well documented problem). There's not currently any benefit to running dt-doc-validate one file at a time, so let's switch it to run a single rule. Doing this means we loose the make parallelism, but we can use xargs instead. This speeds up the validation time from several minutes to <10 sec. Since the validation is a single step with no output, we move running it as part of the processed-schema-examples.json target. We also need to reorder the extra-y entries so the validation is run first rather than after all the examples are extracted. Signed-off-by: Rob Herring commit b8a49399fb7abd4ec402bea1fec5a974053591b6 Author: Andrei Ziureaev Date: Thu Aug 13 14:26:11 2020 +0100 dt-bindings: Use json for processed-schema* Change the format of processed-schema* from yaml to json to speed up validation. With json output, using xargs and appending the output won't work since json has explicit list begin and end characters. Instead, we pass the schema files as a list in a temp file. The parsing time for the processed schema goes down from ~2sec to 70ms. Also, 'make dtbs_check' becomes 33% faster. Some error messages are affected by this change. For example, "True was expected" becomes "... is not of type 'boolean'". The order of messages is also changed. Signed-off-by: Andrei Ziureaev Signed-off-by: Rob Herring commit 3e6ae2438d8beb3f590576491b758ad4c65f630f Author: Rob Herring Date: Thu Aug 13 13:34:14 2020 -0600 dt-bindings: Bump minimum version of dtschema to 2020.8.1 dtschema release 2020.8.1 gained several additions to help performance. dt-doc-validate can now take a list of files and directories, and dt-mk-schema can store the processed schema in JSON which is much faster to parse than YAML. Utilizing both of these changes results in a 3-4x speed improvement in running dt_binding_check. There's also additional meta-schema checks which binding schemas should be checked against. Signed-off-by: Rob Herring commit 4036707c7c61a0fec7774aec44bbb7350153e8c2 Author: Geert Uytterhoeven Date: Wed Aug 19 14:47:09 2020 +0200 scripts/dtc: dtx_diff - make help text formatting consistent None of the help texts use capitalization, except the one for the -T option. Drop the capitalization for consistency. Split the single long line that doesn't fit in 80 characters. Reviewed-by: Frank Rowand Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20200819124709.20401-1-geert+renesas@glider.be commit 0b3fc8b2e38f96d189b1f9cdc8b698fd51384286 Merge: de993be0200ff 9e89d71911b6b Author: David S. Miller Date: Wed Aug 19 13:03:04 2020 -0700 Merge branch 'r8169-use-napi_complete_done-return-value' Heiner Kallweit says: ==================== r8169: use napi_complete_done return value Consider the return value of napi_complete_done(), this allows users to use the gro_flush_timeout sysfs attribute as an alternative to classic interrupt coalescing. ==================== Signed-off-by: David S. Miller commit 9e89d71911b6b312b06b654caa7c0c95197fecb1 Author: Heiner Kallweit Date: Wed Aug 19 13:03:13 2020 +0200 r8169: remove member irq_enabled from struct rtl8169_private After making use of the gro_flush_timeout attribute I once got a tx timeout due to an interrupt that wasn't handled. Seems using irq_enabled can be racy, and it's not needed any longer anyway, so remove it. I've never seen a report about such a race before, therefore treat the change as an improvement. There's just one small drawback: If a legacy PCI interrupt is used, and if this interrupt is shared with a device with high interrupt rate, then we may handle interrupts even if NAPI disabled them, and we may see a certain performance decrease under high network load. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 52dbe8465e5b85263a4c28a48bc902e8c50b2f1b Author: Heiner Kallweit Date: Wed Aug 19 13:02:01 2020 +0200 r8169: use napi_complete_done return value Consider the return value of napi_complete_done(), this allows users to use the gro_flush_timeout sysfs attribute as an alternative to classic interrupt coalescing. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit de993be0200ff4287b73beb440439b3d9472e644 Author: James Chapman Date: Wed Aug 19 10:20:32 2020 +0100 Documentation/networking: update l2tp docs Kernel documentation of L2TP has not been kept up to date and lacks coverage of some L2TP APIs. While addressing this, refactor to improve readability, separating the parts which focus on user APIs and internal implementation into sections. Changes in v2: - fix checkpatch warnings about trailing whitespace and long lines Signed-off-by: James Chapman Signed-off-by: David S. Miller commit f4ecc748533d5ef13ccb40beda2d5a68832a5259 Author: Miaohe Lin Date: Wed Aug 19 04:32:08 2020 -0400 net: Stop warning about SO_BSDCOMPAT usage We've been warning about SO_BSDCOMPAT usage for many years. We may remove this code completely now. Suggested-by: David S. Miller Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit f131a4443ea468cd532410c271c229bb39caab08 Author: Arnd Bergmann Date: Tue Sep 3 11:31:09 2019 +0200 ARM: s3c24xx: move spi fiq handler into platform The fiq handler needs access to some register definitions that should not be used directly by device drivers. Since this is closely related to the irqchip driver anyway, move it into the same place. Signed-off-by: Arnd Bergmann [krzk: Add a header guard in include/linux/spi/s3c24xx-fiq.h, fix SPDX comment style, update maintainer's entry] Co-developed-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200806182059.2431-23-krzk%40kernel.org Acked-by: Mark Brown commit 7dbad03ebcb924cde142f7477d65a54ffb1166a3 Author: Arnd Bergmann Date: Thu Aug 6 20:20:39 2020 +0200 ARM: s3c: adc: move header to linux/soc/samsung There are multiple drivers using the private adc interface. It seems unlikely that they would ever get converted to iio, so make the current state official by making the header file global. The s3c2410_ts driver needs a couple of register definitions as well. Signed-off-by: Arnd Bergmann Acked-by: Guenter Roeck Acked-by: Dmitry Torokhov Acked-by: Sebastian Reichel Link: https://lore.kernel.org/r/20200806182059.2431-22-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 95b415efff2cacb3ab3a159cc7aad1ec1ca3b81e Author: Arnd Bergmann Date: Thu Aug 6 20:20:38 2020 +0200 ARM: s3c24xx: move irqchip driver back into platform It was a good idea to move it out at first, but the irqchip code is still tightly connected to the s3c24xx platform code and uses multiple internal header files, so just move it back for the time being to avoid those dependencies. Signed-off-by: Arnd Bergmann Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20200806182059.2431-21-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 0144e3fce3d601561fb51d0362316ca745c830df Author: Arnd Bergmann Date: Thu Aug 6 20:20:37 2020 +0200 ARM: s3c24xx: move regs-spi.h into spi driver The file is mostly specific to the driver, the few bits that are actually used by the platform code get moved to mach/map.h instead. Signed-off-by: Arnd Bergmann Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200806182059.2431-20-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit a07c4a8c169bc072cceeda1c98a7c37fdde498a3 Author: Arnd Bergmann Date: Thu Aug 6 20:20:36 2020 +0200 ARM: s3c64xx: remove mach/hardware.h This header is empty and conflicts with the s3c24xx version of the same file when we merge the two, so stop including it. Signed-off-by: Arnd Bergmann Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20200806182059.2431-19-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit db8230d29c3afe66fa5eb8dbe648a1290941ef82 Author: Arnd Bergmann Date: Thu Aug 6 20:20:35 2020 +0200 ARM: s5pv210: don't imply CONFIG_PLAT_SAMSUNG The plat-samsung directory and mach-s5pv210 can be build completely independently, so split the two Kconfig symbols CONFIG_PLAT_SAMSUNG and CONFIG_ARCH_S5PV210. Signed-off-by: Arnd Bergmann Acked-by: Ulf Hansson Acked-by: Thierry Reding Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200806182059.2431-18-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 423c62bfb623cb8b41afb0218bf68da56c4ab32e Author: Arnd Bergmann Date: Thu Aug 6 20:20:34 2020 +0200 ARM: s5pv210: use private pm save/restore The pm save/restore code is fairly small, so in order to separate the s3c and s5p platforms, adding an s5p specific copy instead of sharing it is actually easier. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-17-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 17132da70eb766785b9b4677bacce18cc11ea442 Author: Arnd Bergmann Date: Thu Aug 6 20:20:33 2020 +0200 ARM: samsung: move pm check code to drivers/soc This is the only part of plat-samsung that is really shared between the s3c and s5p ports. Moving it to drivers/soc/ lets us make them completely independent. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-16-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 8dba698868b56d850e91337fca3762cb2d26e60a Merge: a2f6d303e24d8 dcacbc0f9bb89 Author: Mark Brown Date: Wed Aug 19 20:17:55 2020 +0100 Merge tag 'samsung-platdrv-boards' into asoc-5.10 ASoC: Convert Samsung drivers to platform drivers commit a2f6d303e24d8d694863d3beba668c4b3ea4fe02 Author: Samuel Holland Date: Tue Aug 18 22:40:38 2020 -0500 ASoC: sun8i-codec: Hook up component probe function Due to a mistake made while reordering patches, commit 90cac932976e ("ASoC: sun8i-codec: Fix DAPM to match the hardware topology") added the sun8i_codec_component_probe function without referencing it from the component definition. Add the reference so the probe function gets called as expected. Fixes: 90cac932976e ("ASoC: sun8i-codec: Fix DAPM to match the hardware topology") Reported-by: Stephen Rothwell Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200819034038.46418-1-samuel@sholland.org Signed-off-by: Mark Brown commit dcacbc0f9bb89ac48d5b602d27a8630e641294cc Author: Arnd Bergmann Date: Thu Aug 6 20:20:44 2020 +0200 ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS The constant requires indirectly including a machine header file, but it's not actually used any more since commit 87b132bc0315 ("ASoC: samsung: s3c24{xx,12}-i2s: port to use generic dmaengine API"), so remove it completely. Signed-off-by: Arnd Bergmann Signed-off-by: Krzysztof Kozlowski Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200806182059.2431-27-krzk@kernel.org Signed-off-by: Mark Brown commit 83d74e354200eb27ba88e81e9bd10ff26cbeeb39 Author: Arnd Bergmann Date: Thu Aug 6 20:20:43 2020 +0200 ASoC: samsung: rx1950: turn into platform driver Avoid machine specific headers by using a gpio lookup table combined with a platform_driver for this board. Signed-off-by: Arnd Bergmann Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200806182059.2431-26-krzk@kernel.org Signed-off-by: Mark Brown commit e26a2abcc2465ee8e8fd9a19ac1a418d08973b94 Author: Arnd Bergmann Date: Thu Aug 6 20:20:42 2020 +0200 ASoC: samsung: neo1973: turn into platform driver Avoid machine specific headers by using a gpio lookup table combined with a platform_driver for this board. Signed-off-by: Arnd Bergmann Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200806182059.2431-25-krzk@kernel.org Signed-off-by: Mark Brown commit 9666e27f90b995456f84f8b95eb4eacdb38a3c3b Author: Arnd Bergmann Date: Thu Aug 6 20:20:41 2020 +0200 ASoC: samsung: h1940: turn into platform driver Avoid machine specific headers by using a gpio lookup table combined with a platform_driver for this board. Signed-off-by: Arnd Bergmann Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200806182059.2431-24-krzk@kernel.org Signed-off-by: Mark Brown commit cb6c03019cdd383cdba1614f9712bd35715171a3 Author: Arnd Bergmann Date: Thu Aug 6 20:20:32 2020 +0200 ARM: exynos: stop selecting PLAT_SAMSUNG Now that no code in arch/arm is shared between mach-exynos and the others, make the split formal. Signed-off-by: Arnd Bergmann Acked-by: Ulf Hansson Link: https://lore.kernel.org/r/20200806182059.2431-15-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit edaff7e1c6f5f433acc8b957c95434de98ba18ea Author: Arnd Bergmann Date: Thu Aug 6 20:20:31 2020 +0200 ARM: exynos: use private samsung_cpu_id copy The only part of plat-samsung that is shared with arch-exynos is the CPU identification code. Having a separate exynos_cpu_id variable makes the two completely independent and is actually a bit less code in total. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-14-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit b3a775127d3326ab651cfc23042f7bbb533846fb Author: Arnd Bergmann Date: Thu Aug 6 20:20:30 2020 +0200 ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug Before we can separate plat-samsung from the individual platforms, this one has to get moved to a place where it remains accessible. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-13-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit dbd6fefb598b20714be552fae538e12302ad004c Author: Arnd Bergmann Date: Thu Aug 6 20:20:29 2020 +0200 ARM: samsung: make pm-debug platform independent The pm-debug code is one of the few things shared between s3c24xx/s3c64xx and the newer s5pv210. In order to make s5pv210 independent of plat-samsung, change the common bits of this code to no longer reference the s3c specific bits. In particular, all the CPU checks need to be moved out of the common code into platform specific files. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-12-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 1e574a665ed11ced475d26a783becdc40614f7ac Author: Arnd Bergmann Date: Thu Aug 6 20:20:28 2020 +0200 ARM: samsung: remove s3c_pm_debug_init() On s3c24xx and s3c64xx, this is just a wrapper around s3c_pm_debug_init_uart(), but this function does not exist on s5pv210, which always uses an empty stub as CONFIG_SAMSUNG_ATAGS is normally not set. In a configuration that supports both s5pv210 and s3c64xx, we would always call the s3c64xx function, which is probably incorrect when running on s5pv210. Remove the function call completely on s5pv210 and skip the wrapper on s3c as a cleanup. As a side-effect, the s3c64xx behavior is now always the same, regardless of whether it is a DT-only configuration or both DT and ATAGS are supported for booting. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-11-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 9089d7b8cecfce7cff6baa69a2e7fd2094565eef Author: Arnd Bergmann Date: Thu Aug 6 20:20:27 2020 +0200 ARM: samsung: don't build plat/pm-common for Exynos This file has not had any callers since linux-4.7, so stop building it. Fixes: 5901f4c279f7 ("ARM: EXYNOS: Remove SROM related register settings from mach-exynos") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-10-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 31dc1c23769bb5f491f40d60fc1b6f2a0709a44d Author: Krzysztof Kozlowski Date: Fri Jul 31 09:41:22 2020 +0200 usb: gadget: s3c: remove unused 'udc' variable Remove unused 'udc' variable to fix compile warnings: drivers/usb/gadget/udc/s3c2410_udc.c: In function 's3c2410_udc_dequeue': drivers/usb/gadget/udc/s3c2410_udc.c:1268:22: warning: variable 'udc' set but not used [-Wunused-but-set-variable] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20200731074122.6484-1-krzk@kernel.org commit 487eb2b9087fd6c6c5a1a0607a9364defbbae252 Merge: e3ec1e8ca02b7 142061eba35ef Author: David S. Miller Date: Wed Aug 19 12:01:42 2020 -0700 Merge branch 'net-dsa-loop-Expose-VLAN-table-through-devlink' Florian Fainelli says: ==================== net: dsa: loop: Expose VLAN table through devlink Changes in v2: - set the DSA configure_vlan_while_not_filtering boolean - return the actual occupancy ==================== Signed-off-by: David S. Miller commit 142061eba35ef4f7097f31732547d33eca667f9d Author: Florian Fainelli Date: Tue Aug 18 21:32:18 2020 -0700 net: dsa: loop: Return VLAN table size through devlink We return the VLAN table size through devlink as a simple parameter, we do not support altering it at runtime: devlink resource show mdio_bus/fixed-0:1f mdio_bus/fixed-0:1f: name VTU size 4096 occ 0 unit entry dpipe_tables none and after configure a bridge with VLAN filtering: devlink resource show mdio_bus/fixed-0:1f mdio_bus/fixed-0:1f: name VTU size 4096 occ 1 unit entry dpipe_tables none Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f0408ca45a83ad9a579e70c2878a9533dd04f036 Author: Florian Fainelli Date: Tue Aug 18 21:32:17 2020 -0700 net: dsa: loop: Configure VLANs while not filtering Since this is a mock-up driver with no real data path for now, but we will have one at some point, enable VLANs while not filtering. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5f745424761a2a49762625e8616417a8e7694228 Author: Arnd Bergmann Date: Thu Aug 6 20:20:26 2020 +0200 usb: gadget: s3c-hsudc: remove platform header dependency There is no real phy driver, so s3c-hsudc just pokes the registers itself. Improve this a little by making it a platform data callback like we do for gpios. There is only one board using this driver, and it's unlikely that another would be added, so this is a minimal workaround. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-9-krzk@kernel.org [krzk: Include regs-s3c2443-clock.h in ifdef to fixup build on s3c6400] Signed-off-by: Krzysztof Kozlowski commit 188db4435ac64f0918def7ba0593d408700ecc4b Author: Arnd Bergmann Date: Thu Aug 6 20:20:25 2020 +0200 usb: gadget: s3c: use platform resources The resources are correctly initialized, so just use them instead of relying on hardcoded data from platform headers. Signed-off-by: Arnd Bergmann Acked-by: Felipe Balbi Link: https://lore.kernel.org/r/20200806182059.2431-8-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 98c2922ec8f0601321428be8c59ae1df255478d1 Author: Arnd Bergmann Date: Thu Aug 6 20:20:24 2020 +0200 ARM: s3c24xx: simplify mach/io.h s3c24xx has a custom implementation of the inb/outb family of I/O accessors, implementing both general register access and ISA I/O port through a multiplexer. As far as I can tell, the first case has never been needed, and certainly is not used now, as drivers only use inb/outb to actually driver ISA or PCI port I/O. Similarly, the special ISA support is limited to a single machine, the Simtec Electronics BAST (EB2410ITX) with its PC/104 expansion connector, all other machines could simply use the generic implementation from asm/io.h that expects a single memory-mapped address range for byte, word and dword access. As no other machines besides BAST actually selects CONFIG_ISA, this is likely not even necessary. As a cleanup, remove support for the non-ISA access from the helpers, and make the ISA access use the virtual address window that we use elsewhere for PCI I/O ports. In configurations without the BAST machine, this now falls back on the generic implementation from asm/io.h, but the mach/io.h header is still relied on to include a number of other header files implicitly. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-7-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit b84e23f5135103c45022b0e4a4ed2459d5398a7e Author: Krzysztof Kozlowski Date: Thu Aug 6 20:20:23 2020 +0200 ARM: s3c24xx: pass pointer to clk driver via platform data Passing pointers directly as platform data is fragile and undocumented. Better to create a platform data structure which explicitly documents what is passed to the driver. Suggested-by: Tomasz Figa Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200806182059.2431-6-krzk@kernel.org commit 346f183cc1348cbf3814796afab0ea34475152a9 Author: Arnd Bergmann Date: Thu Aug 6 20:20:22 2020 +0200 ARM: s3c24xx: make S3C24XX_MISCCR access indirect The clk driver uses both a function call into an exported platform file and a direct register access to a hardcoded virtual address for accessing the MISCCR register, both become are a problem for a multiplatform kernel because of the header file dependency. Make this an indirect function call through platform data instead. Signed-off-by: Arnd Bergmann Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200806182059.2431-5-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 4f9f0e068884336787ea41dd6b1ee52a0cf49477 Author: Arnd Bergmann Date: Thu Aug 6 20:20:21 2020 +0200 ARM: s3c24xx: iotiming: make functions static There are two functions in this file that are never called from anywhere else, so they should be static to allow the compiler to optimize it better and not pollute the global namespace. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200806182059.2431-4-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit 3af4e8774b6d03683932b0961998e01355bccd74 Author: Arnd Bergmann Date: Thu Aug 6 20:20:20 2020 +0200 ARM: s3c24xx: fix mmc gpio lookup tables The gpio controller names differ between s3c24xx and s3c64xx, and it seems that these all got the wrong names, using GPx instead of GPIOx. Fixes: d2951dfa070d ("mmc: s3cmci: Use the slot GPIO descriptor") Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20200806182059.2431-3-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski commit f6d7cde84f6c5551586c8b9b68d70f8e6dc9a000 Author: Krzysztof Kozlowski Date: Tue Aug 4 21:26:49 2020 +0200 ARM: s3c24xx: fix missing system reset Commit f6361c6b3880 ("ARM: S3C24XX: remove separate restart code") removed usage of the watchdog reset platform code in favor of the Samsung SoC watchdog driver. However the latter was not selected thus S3C24xx platforms lost reset abilities. Cc: Fixes: f6361c6b3880 ("ARM: S3C24XX: remove separate restart code") Signed-off-by: Krzysztof Kozlowski commit 8166c10001b2642cd7b68be93d0dc66b90b06629 Author: Krzysztof Kozlowski Date: Tue Aug 4 21:26:48 2020 +0200 ARM: s3c64xx: switch to generic watchdog driver reset Similarly to commit f6361c6b3880 ("ARM: S3C24XX: remove separate restart code"), the platform watchdog reset code can be removed in favor of a generic watchdog driver which already handles reset. This allows removal of a bunch of machine code and fixes also W=1 compile warnings: arch/arm/plat-samsung/watchdog-reset.c:29:6: warning: no previous prototype for 'samsung_wdt_reset' [-Wmissing-prototypes] arch/arm/plat-samsung/watchdog-reset.c:69:13: warning: no previous prototype for 'samsung_wdt_reset_of_init' [-Wmissing-prototypes] arch/arm/plat-samsung/watchdog-reset.c:89:13: warning: no previous prototype for 'samsung_wdt_reset_init' [-Wmissing-prototypes] The generic watchdog-based system reset is not exactly the same as before. The previous method had a fallback to soft_restart() which now is gone. The commit also removes a FIXME note about calling s3c64xx_clk_init() inside s3c64xx_init_irq(). No one fixed this since long time and the note is not meaningful anymore because watchdog part is removed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Tomasz Figa commit 7dd3cae90d856e97e93bc1c32904e5aed7210f7b Author: Krzysztof Kozlowski Date: Tue Aug 4 21:26:47 2020 +0200 ARM: samsung: remove HAVE_S3C2410_WATCHDOG and use direct dependencies A separate Kconfig option HAVE_S3C2410_WATCHDOG for Samsung SoCs is not really needed and the s3c24xx watchdog driver can depend on Samsung ARM architectures instead. The "HAVE_xxx_WATCHDOG" pattern of dependency is not popular and Samsung platforms are here exceptions. All others just depend on CONFIG_ARCH_xxx. This makes the code slightly smaller without any change in functionality. Signed-off-by: Krzysztof Kozlowski Acked-by: Guenter Roeck commit 5b5858ef45906bbd71d8fc95e3bc30860b599620 Author: Krzysztof Kozlowski Date: Mon Aug 17 18:48:36 2020 +0200 ARM: s3c24xx: drop s3c-camif setup platform code The s3c-camif driver setup platform code does not have any users so it can be safely removed. Along with the code W=1 compile warnings go away: arch/arm/mach-s3c24xx/setup-camif.c:28:5: warning: no previous prototype for 's3c_camif_gpio_get' [-Wmissing-prototypes] arch/arm/mach-s3c24xx/setup-camif.c:56:6: warning: no previous prototype for 's3c_camif_gpio_put' [-Wmissing-prototypes] Signed-off-by: Krzysztof Kozlowski commit 3c45f21af84eb05a355919abc80cf70a3a681cee Author: Wen Gong Date: Tue Aug 18 17:12:02 2020 +0300 ath10k: sdio: add firmware coredump support When firmware crashes it's possible to create a coredump for later analysis, add support to collect the register and memory info from SDIO devices. The coredump configuration is different between QCA6174 PCI and QCA6174 SDIO, so add specific registers and memory regions for the latter. QCA6174 SDIO has two methods to dump the firmware: fastdump and slowdump. Fastdump is not supported in olded versions of firmware, and for these ath10k will automatically select slowdump. If firmware supports fastdump, ath10k will automatically select it. QCA6174 SDIO firmware version WLAN.RMH.4.4.1-00017-QCARMSWPZ-2 is the first version supporting fastdump. For slowdump, ath10k_sdio_hif_diag_read() can not be used as the diag window has a limit value, it is 4 bytes and the dump's buffer length is larger than it, it will trigger error. So this patch adds ath10k_sdio_read_mem() to read 4 bytes for each time. Example output of a firmware crash: ath10k_sdio mmc1:0001:1: simulating soft firmware crash ath10k_sdio mmc1:0001:1: firmware crashed! (guid 413d98b1-84c0-4298-b605-2b10ec0c54a5) ath10k_sdio mmc1:0001:1: qca6174 hw3.2 sdio target 0x05030000 chip_id 0x00000000 sub 0000:0000 ath10k_sdio mmc1:0001:1: kconfig debug 1 debugfs 1 tracing 1 dfs 0 testmode 1 ath10k_sdio mmc1:0001:1: firmware ver WLAN.RMH4.4.1-00126-QCARMSWP-1 api 6 features wowlan,ignore-otp,raw-mode crc32 b84317cf ath10k_sdio mmc1:0001:1: board_file api 2 bmi_id 0:4 crc32 6364cfcc ath10k_sdio mmc1:0001:1: htt-ver 3.69 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1 ath10k_sdio mmc1:0001:1: firmware register dump: ath10k_sdio mmc1:0001:1: [00]: 0x05030000 0x000015B3 0x0099908D 0x00955B31 ath10k_sdio mmc1:0001:1: [04]: 0x0099908D 0x00060730 0x00000018 0x004641A0 ath10k_sdio mmc1:0001:1: [08]: 0x0041FAA4 0x0041FA9C 0x00999070 0x00404490 ath10k_sdio mmc1:0001:1: [12]: 0x00000009 0xFFFFFFFF 0x00952CD0 0x00952CE6 ath10k_sdio mmc1:0001:1: [16]: 0x00952CC4 0x00910712 0x00000000 0x00000000 ath10k_sdio mmc1:0001:1: [20]: 0x4099908D 0x0040E9E8 0x00000001 0x00423AC0 ath10k_sdio mmc1:0001:1: [24]: 0x809F3189 0x0040EA48 0x00426240 0xC099908D ath10k_sdio mmc1:0001:1: [28]: 0x809143A7 0x0040EA68 0x0041FAA4 0x00423A80 ath10k_sdio mmc1:0001:1: [32]: 0x809F1193 0x0040EA88 0x00411770 0x004117E0 ath10k_sdio mmc1:0001:1: [36]: 0x809F0EEE 0x0040EAA8 0x00000000 0x00000000 ath10k_sdio mmc1:0001:1: [40]: 0x80911210 0x0040EAC8 0x00000008 0x00404130 ath10k_sdio mmc1:0001:1: [44]: 0x80911154 0x0040EB28 0x00400000 0x00000000 ath10k_sdio mmc1:0001:1: [48]: 0x8091122D 0x0040EB48 0x00000000 0x00400600 ath10k_sdio mmc1:0001:1: [52]: 0x40910024 0x0040EB78 0x0040AB98 0x0040AB98 ath10k_sdio mmc1:0001:1: [56]: 0x00000000 0x0040EB98 0x009BB001 0x00040020 Tested-on: QCA6174 SDIO WLAN.RMH.4.4.1-00018-QCARMSWP-1 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1569310030-834-3-git-send-email-wgong@codeaurora.org commit c796d513c6aecd36075636cfb56e14d4195127e3 Author: Wen Gong Date: Tue Aug 18 17:12:00 2020 +0300 ath10k: add bus type for each layout of coredump For some hw version, it has more than one bus type, it need to add bus type to distinguish different chip. Tested-on: QCA6174 SDIO WLAN.RMH.4.4.1-00018-QCARMSWP-1 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1569310030-834-2-git-send-email-wgong@codeaurora.org commit 27831102b89b43f4d6c3f8b371c1cb358d165680 Author: Xia Jiang Date: Fri Aug 14 15:11:58 2020 +0800 arm: dts: mt2701: Add jpeg enc device tree node Add jpeg enc device tree node. Signed-off-by: Xia Jiang Reviewed-by: Tomasz Figa Link: https://lore.kernel.org/r/20200814071202.25067-27-xia.jiang@mediatek.com Signed-off-by: Matthias Brugger commit 9d1a85c7d90c2949bdad2fb766ce78e9e97b3143 Author: Peng Fan Date: Tue Jul 28 16:55:04 2020 +0800 ARM: imx_v6_v7_defconfig: Support i.MX8MN/P/Q i.MX8MN/P/Q is built with AArch64 hardware, this is to support it could run in AArch32 mode with clock and pinctrl driver enabled. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 89dd9ae16d7cb18937f9f2d8a7549852916b90a7 Author: Dong Aisheng Date: Tue Jul 28 16:01:33 2020 +0800 ARM: multi_v7_defconfig: Enable i.MX7ULP SoC Enable i.MX7ULP SoC which is already supported by mainline kernel. Cc: Shawn Guo Signed-off-by: Dong Aisheng Tested-by: Kevin Hilman Signed-off-by: Shawn Guo commit 75779fac954496012fdb568c56b219d859ab3e61 Author: Dong Aisheng Date: Tue Jul 28 16:01:32 2020 +0800 ARM: multi_v7_defconfig: Enable i.MX6SLL SoC Enable i.MX6SLL SoC which is already supported by mainline kernel. Cc: Shawn Guo Signed-off-by: Dong Aisheng Tested-by: Kevin Hilman Signed-off-by: Shawn Guo commit cdd296cdae1af2d27dae3fcfbdf12c5252ab78cf Author: Tom Rix Date: Wed Aug 5 13:59:11 2020 -0700 drm/gma500: fix error check Reviewing this block of code in cdv_intel_dp_init() ret = cdv_intel_dp_aux_native_read(gma_encoder, DP_DPCD_REV, ... cdv_intel_edp_panel_vdd_off(gma_encoder); if (ret == 0) { /* if this fails, presume the device is a ghost */ DRM_INFO("failed to retrieve link info, disabling eDP\n"); drm_encoder_cleanup(encoder); cdv_intel_dp_destroy(connector); goto err_priv; } else { The (ret == 0) is not strict enough. cdv_intel_dp_aux_native_read() returns > 0 on success otherwise it is failure. So change to <= Fixes: d112a8163f83 ("gma500/cdv: Add eDP support") Signed-off-by: Tom Rix Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20200805205911.20927-1-trix@redhat.com commit 172c1e8572809de8313e311614ff2baf6b936339 Author: Linus Walleij Date: Fri Jul 3 14:59:01 2020 +0200 drm: gma500: Convert to GPIO descriptors Finalize he conversion of GMA500 to use only GPIO descriptors. The GPIO look-up-table is associated with the device directly in the GMA500 Medfield chip driver since no explicit platform type device (such as in x86/platform/intel-mid) exists: the GMA500 probes directly from the PCI device. Apparently GPIOs 128 and 34 are used on all of these so just go ahead and register those for resetting the DSI pipes. Acked-by: Patrik Jakobsson Signed-off-by: Linus Walleij Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20200703125901.513476-1-linus.walleij@linaro.org commit 93b3e927311280a3cfc3f413d17cee2835b310f3 Author: Horia Geantă Date: Mon Jul 27 19:14:28 2020 +0300 ARM: multi_v7_defconfig: enable caam crypto module caam crypto module is included in several ARMv7-based SoCs from i.MX, Layerscape, Vybrid families. Signed-off-by: Horia Geantă Signed-off-by: Shawn Guo commit 69ea651c40f7f08962d440a0486fd0212be74b73 Author: Colin Ian King Date: Wed Aug 19 11:42:56 2020 +0100 selinux: fix allocation failure check on newpolicy->sidtab The allocation check of newpolicy->sidtab is null checking if newpolicy is null and not newpolicy->sidtab. Fix this. Addresses-Coverity: ("Logically dead code") Fixes: c7c556f1e81b ("selinux: refactor changing booleans") Signed-off-by: Colin Ian King Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 0ec0da744bbb11ebb49790e991171a13bf114f9f Author: Fabio Estevam Date: Tue Aug 18 19:35:18 2020 -0300 spi: imx: Do not print an error when PIO is used There are cases that DMA is not used and the driver gracefully falls back to PIO mode. Do not treat it like an error message and move it to debug level instead. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20200818223519.8737-1-festevam@gmail.com Signed-off-by: Mark Brown commit 02532cb80543b50611656a6017bfec7477e2e200 Author: Axel Lin Date: Wed Aug 19 16:59:59 2020 +0800 regulator: rt4801: Select REGMAP_I2C to fix build error Fix build error when CONFIG_REGMAP_I2C is not set. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200819085959.1914471-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 1dbb920e342cab987186ad8ed6eac9c1cf710db7 Author: Herbert Xu Date: Thu Jul 30 22:39:13 2020 +1000 crypto: algapi - Move crypto_yield into internal.h This patch moves crypto_yield into internal.h as it's only used by internal code such as skcipher. It also adds a missing inclusion of sched.h which is required for cond_resched. The header files in internal.h have been cleaned up to remove some ancient junk and add some more specific inclusions. Signed-off-by: Herbert Xu commit c5040fec3d550e27d0a49f05564204da6c90d10b Author: Anson Huang Date: Tue Aug 18 09:06:11 2020 +0800 ASoC: Convert NXP spdif to json-schema Convert the NXP SPDIF binding to DT schema format using json-schema. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1597712771-32433-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Mark Brown commit 9e4730586e0b3ca423e7147104790908a1adb1ba Author: Pierre-Louis Bossart Date: Tue Aug 18 22:14:35 2020 +0800 ASoC: codecs: rt*-sdw: use SDW_SLAVE_ENTRY_EXT Add version and class information explicitly to prepare for support for new devices. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200818141435.29205-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 49971e6bad2da980686368baa34039907f62b516 Author: Olaf Hering Date: Wed Aug 19 11:05:09 2020 +0200 drivers: hv: remove cast from hyperv_die_event No need to cast a void pointer. Signed-off-by: Olaf Hering Link: https://lore.kernel.org/r/20200819090510.28995-1-olaf@aepfle.de Signed-off-by: Wei Liu commit 709c4362725abb5fa1e36fd94893a9b0d049df82 Author: James Morse Date: Wed Jul 8 16:39:29 2020 +0000 cacheinfo: Move resctrl's get_cache_id() to the cacheinfo header file resctrl/core.c defines get_cache_id() for use in its cpu-hotplug callbacks. This gets the id attribute of the cache at the corresponding level of a CPU. Later rework means this private function needs to be shared. Move it to the header file. The name conflicts with a different definition in intel_cacheinfo.c, name it get_cpu_cacheinfo_id() to show its relation with get_cpu_cacheinfo(). Now this is visible on other architectures, check the id attribute has actually been set. Signed-off-by: James Morse Signed-off-by: Borislav Petkov Reviewed-by: Babu Moger Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/20200708163929.2783-11-james.morse@arm.com commit 5f4a1c4ea44728aa80be21dbf3a0469b5ca81d88 Author: Valentin Schneider Date: Mon Aug 17 12:30:02 2020 +0100 sched/topology: Mark SD_NUMA as SDF_NEEDS_GROUPS There would be no point in preserving a sched_domain with a single group just because it has this flag set. Add it to SD_DEGENERATE_GROUPS_MASK. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-17-valentin.schneider@arm.com commit 3551e954f5d95faf3dbc340d422da7624658c230 Author: Valentin Schneider Date: Mon Aug 17 12:30:01 2020 +0100 sched/topology: Mark SD_OVERLAP as SDF_NEEDS_GROUPS A sched_domain can only have overlapping sched_groups if it has more than one group. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-16-valentin.schneider@arm.com commit 33199b0143daf4778d6301f966cb914d75f122eb Author: Valentin Schneider Date: Mon Aug 17 12:30:00 2020 +0100 sched/topology: Mark SD_ASYM_PACKING as SDF_NEEDS_GROUPS Being a load-balancing flag, it requires 2+ groups to have any effect. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-15-valentin.schneider@arm.com commit bdb7c802cc0a7e21f5223dc3ce41b7ac220c576e Author: Valentin Schneider Date: Mon Aug 17 12:29:59 2020 +0100 sched/topology: Mark SD_SERIALIZE as SDF_NEEDS_GROUPS There would be no point in preserving a sched_domain with a single group just because it has this flag set. Add it to SD_DEGENERATE_GROUPS_MASK. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-14-valentin.schneider@arm.com commit 94b858fea1f2246a2fb7f7af21840fd14ced028f Author: Valentin Schneider Date: Mon Aug 17 12:29:58 2020 +0100 sched/topology: Mark SD_BALANCE_WAKE as SDF_NEEDS_GROUPS Even if no mainline topology uses this flag, it is a load balancing flag just like SD_BALANCE_FORK and requires 2+ groups to have any effect. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-13-valentin.schneider@arm.com commit 3a6712c7685352a5d71eaf459a4fddfc3589f018 Author: Valentin Schneider Date: Mon Aug 17 12:29:57 2020 +0100 sched/topology: Mark SD_PREFER_SIBLING as SDF_NEEDS_GROUPS SD_PREFER_SIBLING is currently considered in sd_parent_degenerate() but not in sd_degenerate(). It too hinges on load balancing, and thus won't have any effect when set on a domain with a single group. Add it to SD_DEGENERATE_GROUPS_MASK. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-12-valentin.schneider@arm.com commit c200191d4c2c1aa2ffb62a984b756ac1f02dc55c Author: Valentin Schneider Date: Mon Aug 17 12:29:56 2020 +0100 sched/topology: Propagate SD_ASYM_CPUCAPACITY upwards We currently set this flag *only* on domains whose topology level exactly match the level where we detect asymmetry (as returned by asym_cpu_capacity_level()). This is rather problematic. Say there are two clusters in the system, one with a lone big CPU and the other with a mix of big and LITTLE CPUs (as is allowed by DynamIQ): DIE [ ] MC [ ][ ] 0 1 2 3 4 L L B B B asym_cpu_capacity_level() will figure out that the MC level is the one where all CPUs can see a CPU of max capacity, and we will thus set SD_ASYM_CPUCAPACITY at MC level for all CPUs. That lone big CPU will degenerate its MC domain, since it would be alone in there, and will end up with just a DIE domain. Since the flag was only set at MC, this CPU ends up not seeing any SD with the flag set, which is broken. Rather than clearing dflags at every topology level, clear it before entering the topology level loop. This will properly propagate upwards flags that are set starting from a certain level. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Reviewed-by: Quentin Perret Reviewed-by: Dietmar Eggemann Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-11-valentin.schneider@arm.com commit ab65afb094c7b2e954e8d56ffbc7df843211c2c8 Author: Valentin Schneider Date: Mon Aug 17 12:29:55 2020 +0100 sched/topology: Remove SD_SERIALIZE degeneration special case If there is only a single NUMA node in the system, the only NUMA topology level that will be generated will be NODE (identity distance), which doesn't have SD_SERIALIZE. This means we don't need this special case in sd_parent_degenerate(), as having the NODE level "naturally" covers it. Thus, remove it. Suggested-by: Peter Zijlstra Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Reviewed-by: Dietmar Eggemann Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-10-valentin.schneider@arm.com commit 6f349818621dff364fc000909135d0065e9756c9 Author: Valentin Schneider Date: Mon Aug 17 12:29:54 2020 +0100 sched/topology: Use prebuilt SD flag degeneration mask Leverage SD_DEGENERATE_GROUPS_MASK in sd_degenerate() and sd_parent_degenerate(). Suggested-by: Peter Zijlstra Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-9-valentin.schneider@arm.com commit 4ee4ea443a5dc3fc4d8ae338199676eae9d8ef02 Author: Valentin Schneider Date: Mon Aug 17 12:29:53 2020 +0100 sched/topology: Introduce SD metaflag for flags needing > 1 groups In preparation of cleaning up the sd_degenerate*() functions, mark flags used in sd_degenerate() with the new SDF_NEEDS_GROUPS flag. With this, build a compile-time mask of those SD flags. Note that sd_parent_degenerate() uses an extra flag in its mask, SD_PREFER_SIBLING, which remains singled out for now. Suggested-by: Peter Zijlstra Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Reviewed-by: Dietmar Eggemann Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-8-valentin.schneider@arm.com commit 5b9f8ff7b320a34af3dbcf04edb40d9b04f22f4a Author: Valentin Schneider Date: Mon Aug 17 12:29:52 2020 +0100 sched/debug: Output SD flag names rather than their values Decoding the output of /proc/sys/kernel/sched_domain/cpu*/domain*/flags has always been somewhat annoying, as one needs to go fetch the bit -> name mapping from the source code itself. This encoding can be saved in a script somewhere, but that isn't safe from flags being added, removed or even shuffled around. What matters for debugging purposes is to get *which* flags are set in a given domain, their associated value is pretty much meaningless. Make the sd flags debug file output flag names. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-7-valentin.schneider@arm.com commit 65c5e253168dbbb52c20026b0c5b7a2f344b9197 Author: Valentin Schneider Date: Mon Aug 17 12:29:51 2020 +0100 sched/topology: Verify SD_* flags setup when sched_debug is on Now that we have some description of what we expect the flags layout to be, we can use that to assert at runtime that the actual layout is sane. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Reviewed-by: Dietmar Eggemann Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-6-valentin.schneider@arm.com commit b6e862f386722e0de6c37f85f1cf438a0efa7f93 Author: Valentin Schneider Date: Mon Aug 17 12:29:50 2020 +0100 sched/topology: Define and assign sched_domain flag metadata There are some expectations regarding how sched domain flags should be laid out, but none of them are checked or asserted in sched_domain_debug_one(). After staring at said flags for a while, I've come to realize there's two repeating patterns: - Shared with children: those flags are set from the base CPU domain upwards. Any domain that has it set will have it set in its children. It hints at "some property holds true / some behaviour is enabled until this level". - Shared with parents: those flags are set from the topmost domain downwards. Any domain that has it set will have it set in its parents. It hints at "some property isn't visible / some behaviour is disabled until this level". There are two outliers that (currently) do not map to either of these: o SD_PREFER_SIBLING, which is cleared below levels with SD_ASYM_CPUCAPACITY. The change was introduced by commit: 9c63e84db29b ("sched/core: Disable SD_PREFER_SIBLING on asymmetric CPU capacity domains") as it could break misfit migration on some systems. In light of this, we might want to change it back to make it fit one of the two categories and fix the issue another way. o SD_ASYM_CPUCAPACITY, which gets set on a single level and isn't propagated up nor down. From a topology description point of view, it really wants to be SDF_SHARED_PARENT; this will be rectified in a later patch. Tweak the sched_domain flag declaration to assign each flag an expected layout, and include the rationale for each flag "meta type" assignment as a comment. Consolidate the flag metadata into an array; the index of a flag's metadata can easily be found with log2(flag), IOW __ffs(flag). Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Reviewed-by: Dietmar Eggemann Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-5-valentin.schneider@arm.com commit d54a9658a75633b839af7a2c6c758807678b8064 Author: Valentin Schneider Date: Mon Aug 17 12:29:49 2020 +0100 sched/topology: Split out SD_* flags declaration to its own file To associate the SD flags with some metadata, we need some more structure in the way they are declared. Rather than shove that in a free-standing macro list, move the declaration in a separate file that can be re-imported with different SD_FLAG definitions. This is inspired by what is done with the syscall table (see uapi/asm/unistd.h and sys_call_table). The value assigned to a given SD flag now depends on the order it appears in sd_flags.h. No change in functionality. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Reviewed-by: Dietmar Eggemann Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-4-valentin.schneider@arm.com commit d23b3bf8e43faa54a6839aafd6fedc15a3c4174f Author: Valentin Schneider Date: Mon Aug 17 12:29:48 2020 +0100 ARM, sched/topology: Revert back to default scheduler topology The ARM-specific GMC level is meant to be built using the thread sibling mask, but no devicetree in arch/arm/boot/dts uses the 'thread' cpu-map binding. With SD_SHARE_POWERDOMAIN gone, this topology level can be removed, at which point ARM no longer benefits from having a custom defined topology table. Delete the GMC topology level by making ARM use the default scheduler topology table. This essentially reverts commit: fb2aa85564f4 ("sched, ARM: Create a dedicated scheduler topology table") No change in functionality is expected. Suggested-by: Dietmar Eggemann Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Reviewed-by: Dietmar Eggemann Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-3-valentin.schneider@arm.com commit cfe7ddcbd72dc67ce5749cc6f451a2b0c6aec5b5 Author: Valentin Schneider Date: Mon Aug 17 12:29:47 2020 +0100 ARM, sched/topology: Remove SD_SHARE_POWERDOMAIN This flag was introduced in 2014 by commit: d77b3ed5c9f8 ("sched: Add a new SD_SHARE_POWERDOMAIN for sched_domain") but AFAIA it was never leveraged by the scheduler. The closest thing I can think of is EAS caring about frequency domains, and it does that by leveraging performance domains. Remove the flag. No change in functionality is expected. Suggested-by: Morten Rasmussen Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Reviewed-by: Dietmar Eggemann Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20200817113003.20802-2-valentin.schneider@arm.com commit 316e7f901f5aedb415c72d1eedd7de0846238dd0 Author: James Morse Date: Wed Jul 8 16:39:28 2020 +0000 x86/resctrl: Add struct rdt_cache::arch_has_{sparse, empty}_bitmaps Intel CPUs expect the cache bitmap provided by user-space to have on a single span of 1s, whereas AMD can support bitmaps like 0xf00f. Arm's MPAM support also allows sparse bitmaps. Similarly, Intel CPUs check at least one bit set, whereas AMD CPUs are quite happy with an empty bitmap. Arm's MPAM allows an empty bitmap. To move resctrl out to /fs/, platform differences like this need to be explained. Add two resource properties arch_has_{empty,sparse}_bitmaps. Test these around the relevant parts of cbm_validate(). Merging the validate calls causes AMD to gain the min_cbm_bits test needed for Haswell, but as it always sets this value to 1, it will never match. [ bp: Massage commit message. ] Signed-off-by: James Morse Signed-off-by: Borislav Petkov Reviewed-by: Babu Moger Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/20200708163929.2783-10-james.morse@arm.com commit 40eb0cb4939e462acfedea8c8064571e886b9773 Author: Ingo Molnar Date: Tue Aug 18 07:31:30 2020 +0200 x86/cpu: Fix typos and improve the comments in sync_core() - Fix typos. - Move the compiler barrier comment to the top, because it's valid for the whole function, not just the legacy branch. Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200818053130.GA3161093@gmail.com Reviewed-by: Ricardo Neri commit 513f8297f6b14a76346cd049956f1c9a2a48d7aa Merge: bbdb5d129dafb 6542e2b613c2b Author: Tony Lindgren Date: Wed Aug 19 10:52:00 2020 +0300 Merge branch 'fixes' into omap-for-v5.10/dt commit 5df3ca9334d5603e4afbb95953d0affb37dcf86b Author: James Morse Date: Wed Jul 8 16:39:27 2020 +0000 x86/resctrl: Merge AMD/Intel parse_bw() calls Now after arch_needs_linear has been added, the parse_bw() calls are almost the same between AMD and Intel. The difference is '!is_mba_sc()', which is not checked on AMD. This will always be true on AMD CPUs as mba_sc cannot be enabled as is_mba_linear() is false. Removing this duplication means user-space visible behaviour and error messages are not validated or generated in different places. Reviewed-by : Babu Moger Signed-off-by: James Morse Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/20200708163929.2783-9-james.morse@arm.com commit 41215b7947f1b1b86fd77a7bebd2320599aea7bd Author: James Morse Date: Wed Jul 8 16:39:26 2020 +0000 x86/resctrl: Add struct rdt_membw::arch_needs_linear to explain AMD/Intel MBA difference The configuration values user-space provides to the resctrl filesystem are ABI. To make this work on another architecture, all the ABI bits should be moved out of /arch/x86 and under /fs. To do this, the differences between AMD and Intel CPUs needs to be explained to resctrl via resource properties, instead of function pointers that let the arch code accept subtly different values on different platforms/architectures. For MBA, Intel CPUs reject configuration attempts for non-linear resources, whereas AMD ignore this field as its MBA resource is never linear. To merge the parse/validate functions, this difference needs to be explained. Add struct rdt_membw::arch_needs_linear to indicate the arch code needs the linear property to be true to configure this resource. AMD can set this and delay_linear to false. Intel can set arch_needs_linear to true to keep the existing "No support for non-linear MB domains" error message for affected platforms. [ bp: convert "we" etc to passive voice. ] Signed-off-by: James Morse Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Reviewed-by: Babu Moger Link: https://lkml.kernel.org/r/20200708163929.2783-8-james.morse@arm.com commit bbdb5d129dafba02d4c8e745f9d0e856a33f287a Author: Adam Ford Date: Tue Aug 18 07:57:20 2020 -0500 ARM: dts: omap3: Add cpu trips and cooling map for omap34/36 families Currently, OMAP3_THERMAL is disabled by default, so the bandgap sensor is unavailable, and enabling it will somewhat increase power consumption. However for boards which operate near their thermal limit, OMAP3_THERMAL can be enabled and monitored to keep the processor from either running too fast, or shutdown when it's deemed to be operating at an unsafe thermal limit at the expense of increased power consumption. The OMAP3530, OMAP3630, and DM3730 all show thresholds of 90C and 105C depending on commercial or extended temperature ratings. This patch expands the thermal information to include the limits of 80C for alert and 90C critical based on commercial temperature rating. It sets the coolings-cells for the 34xx and 36xx CPU's which will start to throttle back their maximum frequency when the bangap sensor reads above the alert temerature of 80C. For boards who which to increase the temperatures for extended temperature ratings, these can be changed on their respective device trees with something like: &cpu_alert0 { temperature = <90000>; /* millicelsius */ }; &cpu_crit { temperature = <105000>; /* millicelsius */ }; Signed-off-by: Adam Ford Tested-by: H. Nikolaus Schaller # on GTA04A5 with dm3730cbp100 Signed-off-by: Tony Lindgren commit 03e23ca9ff8343feec87fe89c1b6c3fb3a179711 Author: Drew Fustini Date: Sun Aug 9 23:58:03 2020 -0500 ARM: dts: am33xx: add ocp label Add label to the ocp node in the AM33xx SoC include so that it can be referenced in board-level files like am335x-pocketbeagle.dts Signed-off-by: Drew Fustini Signed-off-by: Tony Lindgren commit 9da36a7ec42135428e1d41621e3703429bda3b2e Author: Parshuram Thombare Date: Thu May 21 11:32:22 2020 +0200 i3c: master add i3c_master_attach_boardinfo to preserve boardinfo Boardinfo was lost if I3C object for devices with boardinfo available are not created or not added to the I3C device list because of some failure e.g. SETDASA failed, retrieve info failed etc This patch adds i3c_master_attach_boardinfo which scan boardinfo list in the master object and 'attach' it to the I3C device object. Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure") Signed-off-by: Parshuram Thombare Signed-off-by: Boris Brezillon Link: https://lore.kernel.org/linux-i3c/1590053542-389-1-git-send-email-pthombar@cadence.com commit 12c24ea1f8e2e0a7a3efef891524a739cb807704 Merge: 95d4208075e8f 31bdd786f900c Author: Tony Lindgren Date: Wed Aug 19 10:28:31 2020 +0300 Merge branch 'omap-for-v5.10/dt-moxa' into omap-for-v5.10/dt commit 31bdd786f900c13f4ba47a96e8e6c6ed18731ea9 Author: Johnson CH Chen (陳昭勳) Date: Thu Aug 6 02:28:48 2020 +0000 ARM: dts: am335x: add common dtsi for MOXA UC-8100 series Add am335x-moxa-uc-8100-common.dtsi for many products of MOXA UC-8100 series, and remove common nodes from am335x-moxa-uc-8100-me-t.dts. Signed-off-by: Johnson Chen Signed-off-by: Tony Lindgren commit ef4d0a80c6140146b20413559ab1d8c0807b51d0 Author: Randy Dunlap Date: Sat Jul 25 17:22:12 2020 -0700 arm: mach-omap1: mux.h: delete duplicate word Drop the repeated word "is". Signed-off-by: Randy Dunlap Cc: Aaro Koskinen Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off-by: Tony Lindgren commit 83bf6db020248f436309e99a6f8544d7216f6756 Author: Alexander A. Klimov Date: Sun Jul 19 12:30:33 2020 +0200 ARM: OMAP2+: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Tony Lindgren commit 9c6b876c91c067353ab30b81ad1486105bc79e08 Author: Randy Dunlap Date: Tue Aug 18 13:28:11 2020 -0700 drm: ast: fix double __iomem sparse warning sparse complains about having 2 "__iomem" attributes on the same line where only one is needed since the first one applies to everything up to the ending ';'. However, to make it clear(er) that both of these pointers are "__iomem", use separate lines for them. ../drivers/gpu/drm/ast/ast_cursor.c:256:26: CK: warning: duplicate [noderef] ../drivers/gpu/drm/ast/ast_cursor.c:256:26: CK: error: multiple address space given: __iomem & __iomem Signed-off-by: Randy Dunlap Reviewed-by: Thomas Zimmermann Cc: Dave Airlie Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/a8185578-a69a-16b0-6fdf-f4e46bc4f61f@infradead.org commit e6b2fac36fcc0b73cbef063d700a9841850e37a0 Author: James Morse Date: Wed Jul 8 16:39:25 2020 +0000 x86/resctrl: Use is_closid_match() in more places rdtgroup_tasks_assigned() and show_rdt_tasks() loop over threads testing for a CTRL/MON group match by closid/rmid with the provided rdtgrp. Further down the file are helpers to do this, move these further up and make use of them here. These helpers additionally check for alloc/mon capable. This is harmless as rdtgroup_mkdir() tests these capable flags before allowing the config directories to be created. Signed-off-by: James Morse Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/20200708163929.2783-7-james.morse@arm.com commit f8fbd8c341ef6fbfca52f093d72227a941a6e293 Author: Alexander A. Klimov Date: Sun Jul 19 11:19:12 2020 +0200 ARM: OMAP2+: pm33xx-core: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Tony Lindgren commit a784e5893b0eb374dd1a285edddec2bf5c59bb85 Author: Alexander A. Klimov Date: Sun Jul 19 11:09:03 2020 +0200 ARM: OMAP2+: hwmod: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Tony Lindgren commit 88ca7bfb2137b9a499eb1cddfa5af47beb58ca17 Author: Alexander A. Klimov Date: Sun Jul 19 10:58:53 2020 +0200 ARM: OMAP2+: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Tony Lindgren commit 3aa36fdd3073487801d14dbecc64c10502d62dc2 Author: Alexander A. Klimov Date: Sun Jul 19 10:48:44 2020 +0200 ARM: OMAP2+: PRM: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Tony Lindgren commit 95d4208075e8f022b14503076ff0f488c7748867 Author: Sebastian Reichel Date: Thu Jul 16 14:57:33 2020 +0200 ARM: dts: omap4-droid4: add panel orientation Add information about panel orientation, so that the system boots into a properly rotated shell. Reviewed-by: Laurent Pinchart Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren commit 86ea53b42b6f8b3d066d2b8b42df433d5a6b42be Author: Sebastian Reichel Date: Thu Jul 16 14:57:32 2020 +0200 ARM: dts: omap4-droid4: add panel compatible Add Droid 4 specific compatible value in addition to the generic one, so that we have the ability to add panel specific quirks in the future. Reviewed-by: Laurent Pinchart Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren commit 23807f8cbaeb4b1b92a0eafd37264eca23c9437a Author: Sebastian Reichel Date: Thu Jul 16 14:57:31 2020 +0200 ARM: dts: omap: add channel to DSI panels The standard binding for DSI requires that the channel number of the panel is encoded in DT. This adds the channel number in all OMAP3-5 boards in preparation for using common infrastructure. Reviewed-by: Laurent Pinchart Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren commit 19d3e9a0bdd57b90175f30390edeb06851f5f9f3 Author: Tony Lindgren Date: Tue Mar 10 14:02:48 2020 -0700 ARM: dts: omap4: Fix sgx clock rate for 4430 We currently have a different clock rate for droid4 compared to the stock v3.0.8 based Android Linux kernel: # cat /sys/kernel/debug/clk/dpll_*_m7x2_ck/clk_rate 266666667 307200000 # cat /sys/kernel/debug/clk/l3_gfx_cm:clk:0000:0/clk_rate 307200000 Let's fix this by configuring sgx to use 153.6 MHz instead of 307.2 MHz. Looks like also at least duover needs this change to avoid hangs, so let's apply it for all 4430. This helps a bit with thermal issues that seem to be related to memory corruption when using sgx. It seems that other driver related issues still remain though. Cc: Arthur Demchenkov Cc: Merlijn Wajer Cc: Sebastian Reichel Signed-off-by: Tony Lindgren commit 377c0d7ea5bb93251e71559c115d2f94650c00d6 Author: Seiya Wang Date: Fri Aug 14 14:04:54 2020 +0800 dt-bindings: timer: Add compatible for Mediatek MT8192 This commit adds dt-binding documentation of timer for Mediatek MT8192 SoC Platform. Acked-by: Rob Herring Signed-off-by: Seiya Wang Link: https://lore.kernel.org/r/20200814060454.32200-4-seiya.wang@mediatek.com Signed-off-by: Greg Kroah-Hartman commit a7de3bcb330bfef8db1d4027da8eb3616ae20fe4 Author: Seiya Wang Date: Fri Aug 14 14:04:53 2020 +0800 dt-bindings: serial: Add compatible for Mediatek MT8192 This commit adds dt-binding documentation of uart for Mediatek MT8192 SoC Platform. Acked-by: Rob Herring Signed-off-by: Seiya Wang Link: https://lore.kernel.org/r/20200814060454.32200-3-seiya.wang@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 9fe2f897499f129f9f0ef4c51a11512dcf2ab7d0 Author: David Stevens Date: Wed Aug 19 12:10:11 2020 +0900 virtio: fix build for configs without dma-bufs Reported-by: kernel test robot Signed-off-by: David Stevens Link: http://patchwork.freedesktop.org/patch/msgid/20200819031011.310180-1-stevensd@chromium.org Signed-off-by: Gerd Hoffmann commit 144ceb27d737b853113ea4aa7d7c9b3dfe98be0b Author: Wei Yongjun Date: Tue Aug 18 19:22:17 2020 +0800 dmaengine: xilinx: dpdma: Make symbol 'dpdma_debugfs_reqs' static The sparse tool complains as follows: drivers/dma/xilinx/xilinx_dpdma.c:349:37: warning: symbol 'dpdma_debugfs_reqs' was not declared. Should it be static? This variable is not used outside of xilinx_dpdma.c, so this commit marks it static. Fixes: 1d220435cab3 ("dmaengine: xilinx: dpdma: Add debugfs support") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Hyun Kwon Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200818112217.43816-1-weiyongjun1@huawei.com Signed-off-by: Vinod Koul commit 37081156149fd532d534efd8ea99ca362ed62e5b Merge: 00b2e95325f8c 22dd1ac91a776 Author: Alexei Starovoitov Date: Tue Aug 18 18:38:26 2020 -0700 Merge branch 'libbpf-minimize-feature-detection' Andrii Nakryiko says: ==================== Get rid of two feature detectors: reallocarray and libelf-mmap. Optional feature detections complicate libbpf Makefile and cause more troubles for various applications that want to integrate libbpf as part of their build. Patch #1 replaces all reallocarray() uses into libbpf-internal reallocarray() implementation. Patches #2 and #3 makes sure we won't re-introduce reallocarray() accidentally. Patch #2 also removes last use of libbpf_internal.h header inside bpftool. There is still nlattr.h that's used by both libbpf and bpftool, but that's left for a follow up patch to split. Patch #4 removed libelf-mmap feature detector and all its uses, as it's trivial to handle missing mmap support in libbpf, the way objtool has been doing it for a while. v1->v2 and v2->v3: - rebase to latest bpf-next (Alexei). ==================== Signed-off-by: Alexei Starovoitov commit 22dd1ac91a77675238d10059c479ab6fa6160c60 Author: Andrii Nakryiko Date: Tue Aug 18 18:36:07 2020 -0700 tools: Remove feature-libelf-mmap feature detection It's trivial to handle missing ELF_C_MMAP_READ support in libelf the way that objtool has solved it in ("774bec3fddcc objtool: Add fallback from ELF_C_READ_MMAP to ELF_C_READ"). So instead of having an entire feature detector for that, just do what objtool does for perf and libbpf. And keep their Makefiles a bit simpler. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200819013607.3607269-5-andriin@fb.com commit 85367030a6c7ef3373347cf816c698995074f6f0 Author: Andrii Nakryiko Date: Tue Aug 18 18:36:06 2020 -0700 libbpf: Centralize poisoning and poison reallocarray() Most of libbpf source files already include libbpf_internal.h, so it's a good place to centralize identifier poisoning. So move kernel integer type poisoning there. And also add reallocarray to a poison list to prevent accidental use of it. libbpf_reallocarray() should be used universally instead. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200819013607.3607269-4-andriin@fb.com commit 7084566a236fbc98beb11430d8d67dd08b2ac151 Author: Andrii Nakryiko Date: Tue Aug 18 18:36:05 2020 -0700 tools/bpftool: Remove libbpf_internal.h usage in bpftool Most netlink-related functions were unique to bpftool usage, so I moved them into net.c. Few functions are still used by both bpftool and libbpf itself internally, so I've copy-pasted them (libbpf_nl_get_link, libbpf_netlink_open). It's a bit of duplication of code, but better separation of libbpf as a library with public API and bpftool, relying on unexposed functions in libbpf. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200819013607.3607269-3-andriin@fb.com commit 029258d7b22894fabcecb1626e1b87d18a6823f4 Author: Andrii Nakryiko Date: Tue Aug 18 18:36:04 2020 -0700 libbpf: Remove any use of reallocarray() in libbpf Re-implement glibc's reallocarray() for libbpf internal-only use. reallocarray(), unfortunately, is not available in all versions of glibc, so requires extra feature detection and using reallocarray() stub from and COMPAT_NEED_REALLOCARRAY. All this complicates build of libbpf unnecessarily and is just a maintenance burden. Instead, it's trivial to implement libbpf-specific internal version and use it throughout libbpf. Which is what this patch does, along with converting some realloc() uses that should really have been reallocarray() in the first place. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200819013607.3607269-2-andriin@fb.com commit 00b2e95325f8c9dd56a7dae691b01e321838a557 Author: Andrii Nakryiko Date: Tue Aug 18 15:39:16 2020 -0700 selftests/bpf: Add test validating failure on ambiguous relocation value Add test simulating ambiguous field size relocation, while fields themselves are at the exact same offset. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200818223921.2911963-5-andriin@fb.com commit 353c788c2054257359114f12827d86f8e3332e10 Author: Andrii Nakryiko Date: Tue Aug 18 15:39:15 2020 -0700 libbpf: Improve relocation ambiguity detection Split the instruction patching logic into relocation value calculation and application of relocation to instruction. Using this, evaluate relocation against each matching candidate and validate that all candidates agree on relocated value. If not, report ambiguity and fail load. This logic is necessary to avoid dangerous (however unlikely) accidental match against two incompatible candidate types. Without this change, libbpf will pick a random type as *the* candidate and apply potentially invalid relocation. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200818223921.2911963-4-andriin@fb.com commit 28b93c64499ae09d9dc8c04123b15f8654a93c4c Author: Andrii Nakryiko Date: Tue Aug 18 15:39:14 2020 -0700 libbpf: Clean up and improve CO-RE reloc logging Add logging of local/target type kind (struct/union/typedef/etc). Preserve unresolved root type ID (for cases of typedef). Improve the format of CO-RE reloc spec output format to contain only relevant and succinct info. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200818223921.2911963-3-andriin@fb.com commit 81ba0889027505b7d5136319117e473a69a923c4 Author: Andrii Nakryiko Date: Tue Aug 18 15:39:13 2020 -0700 libbpf: Improve error logging for mismatched BTF kind cases Instead of printing out integer value of BTF kind, print out a string representation of a kind. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200818223921.2911963-2-andriin@fb.com commit a12a625ce7db91c8904233d6bec31c2cc935001f Merge: 65bb2e0fc5a67 68b08647c7d56 Author: Alexei Starovoitov Date: Tue Aug 18 17:16:15 2020 -0700 Merge branch 'libbpf-probing-improvements' Andrii Nakryiko says: ==================== This patch set refactors libbpf feature probing to be done lazily on as-needed basis, instead of proactively testing all possible features libbpf knows about. This allows to scale such detections and mitigations better, without issuing unnecessary syscalls on each bpf_object__load() call. It's also now memoized globally, instead of per-bpf_object. Building on that, libbpf will now detect availability of bpf_probe_read_kernel() helper (which means also -user and -str variants), and will sanitize BPF program code by replacing such references to generic variants (bpf_probe_read[_str]()). This allows to migrate all BPF programs into proper -kernel/-user probing helpers, without the fear of breaking them for old kernels. With that, update BPF_CORE_READ() and related macros to use bpf_probe_read_kernel(), as it doesn't make much sense to do CO-RE relocations against user-space types. And the only class of cases in which BPF program might read kernel type from user-space are UAPI data structures which by definition are fixed in their memory layout and don't need relocating. This is exemplified by test_vmlinux test, which is fixed as part of this patch set as well. BPF_CORE_READ() is useful for chainingg bpf_probe_read_{kernel,user}() calls together even without relocation, so we might add user-space variants, if there is a need. While at making libbpf more useful for older kernels, also improve handling of a complete lack of BTF support in kernel by not even attempting to load BTF info into kernel. This eliminates annoying warning about lack of BTF support in the kernel and map creation retry without BTF. If user is using features that require kernel BTF support, it will still fail, of course. ==================== Signed-off-by: Alexei Starovoitov commit 68b08647c7d56ea15114435c3023adc017d11b81 Author: Andrii Nakryiko Date: Tue Aug 18 14:33:56 2020 -0700 libbpf: Detect minimal BTF support and skip BTF loading, if missing Detect whether a kernel supports any BTF at all, and if not, don't even attempt loading BTF to avoid unnecessary log messages like: libbpf: Error loading BTF: Invalid argument(22) libbpf: Error loading .BTF into kernel: -22. BTF is optional, ignoring. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200818213356.2629020-8-andriin@fb.com commit 70785cfb19287b4b075a266887be5e024bf1206a Author: Andrii Nakryiko Date: Tue Aug 18 14:33:55 2020 -0700 libbpf: Switch tracing and CO-RE helper macros to bpf_probe_read_kernel() Now that libbpf can automatically fallback to bpf_probe_read() on old kernels not yet supporting bpf_probe_read_kernel(), switch libbpf BPF-side helper macros to use appropriate BPF helper for reading kernel data. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Cc: Ilya Leoshkevich Link: https://lore.kernel.org/bpf/20200818213356.2629020-7-andriin@fb.com commit 02f47faa25db134f6043fb6b12a68b5d4c980bb6 Author: Andrii Nakryiko Date: Tue Aug 18 14:33:54 2020 -0700 selftests/bpf: Fix test_vmlinux test to use bpf_probe_read_user() The test is reading UAPI kernel structure from user-space. So it doesn't need CO-RE relocations and has to use bpf_probe_read_user(). Fixes: acbd06206bbb ("selftests/bpf: Add vmlinux.h selftest exercising tracing of syscalls") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200818213356.2629020-6-andriin@fb.com commit 109cea5a594f921632ca599b385aaa0575971045 Author: Andrii Nakryiko Date: Tue Aug 18 14:33:53 2020 -0700 libbpf: Sanitize BPF program code for bpf_probe_read_{kernel, user}[_str] Add BPF program code sanitization pass, replacing calls to BPF bpf_probe_read_{kernel,user}[_str]() helpers with bpf_probe_read[_str](), if libbpf detects that kernel doesn't support new variants. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200818213356.2629020-5-andriin@fb.com commit bb180fb2401dfed0ba85699064e60d62af351ff9 Author: Andrii Nakryiko Date: Tue Aug 18 14:33:52 2020 -0700 libbpf: Factor out common logic of testing and closing FD Factor out common piece of logic that detects support for a feature based on successfully created FD. Also take care of closing FD, if it was created. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200818213356.2629020-4-andriin@fb.com commit 47b6cb4d0add454859f386337e6079e01ac7db8f Author: Andrii Nakryiko Date: Tue Aug 18 14:33:51 2020 -0700 libbpf: Make kernel feature probing lazy Turn libbpf's kernel feature probing into lazily-performed checks. This allows to skip performing unnecessary feature checks, if a given BPF application doesn't rely on a particular kernel feature. As we grow number of feature probes, libbpf might perform less unnecessary syscalls and scale better with number of feature probes long-term. By decoupling feature checks from bpf_object, it's also possible to perform feature probing from libbpf static helpers and low-level APIs, if necessary. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200818213356.2629020-3-andriin@fb.com commit 8d708236058601f1b08b0ca2a1cd9fff28034416 Author: Andrii Nakryiko Date: Tue Aug 18 14:33:50 2020 -0700 libbpf: Disable -Wswitch-enum compiler warning That compilation warning is more annoying, than helpful. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200818213356.2629020-2-andriin@fb.com commit 65bb2e0fc5a67200db95911207ef9662aaf7ab9d Author: Xu Wang Date: Tue Aug 18 07:16:11 2020 +0000 libbpf: Convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Xu Wang Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200818071611.21923-1-vulab@iscas.ac.cn commit 2bf8c7e735ac8ab81eebd672caee41c77ec1b793 Author: Daniel T. Lee Date: Tue Aug 18 14:16:41 2020 +0900 samples: bpf: Fix broken bpf programs due to removed symbol >From commit f1394b798814 ("block: mark blk_account_io_completion static") symbol blk_account_io_completion() has been marked as static, which makes it no longer possible to attach kprobe to this event. Currently, there are broken samples due to this reason. As a solution to this, attach kprobe events to blk_account_io_done() to modify them to perform the same behavior as before. Signed-off-by: Daniel T. Lee Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200818051641.21724-1-danieltimlee@gmail.com commit e3ec1e8ca02b7e6c935bba3f9b6da86c2e57d2eb Author: Miaohe Lin Date: Sat Aug 15 04:48:53 2020 -0400 net: eliminate meaningless memcpy to data in pskb_carve_inside_nonlinear() The frags of skb_shared_info of the data is assigned in following loop. It is meaningless to do a memcpy of frags here. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 37d0474542850e6bb70b226487b4202d21bfe7cc Author: Alexander Monakov Date: Tue Aug 4 23:13:13 2020 +0300 drm/amd/display: use correct scale for actual_brightness Documentation for sysfs backlight level interface requires that values in both 'brightness' and 'actual_brightness' files are interpreted to be in range from 0 to the value given in the 'max_brightness' file. With amdgpu, max_brightness gives 255, and values written by the user into 'brightness' are internally rescaled to a wider range. However, reading from 'actual_brightness' gives the raw register value without inverse rescaling. This causes issues for various userspace tools such as PowerTop and systemd that expect the value to be in the correct range. Introduce a helper to retrieve internal backlight range. Use it to reimplement 'convert_brightness' as 'convert_brightness_from_user' and introduce 'convert_brightness_to_user'. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=203905 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1242 Cc: Alex Deucher Cc: Nicholas Kazlauskas Reviewed-by: Alex Deucher Signed-off-by: Alexander Monakov Signed-off-by: Alex Deucher commit 16697cf39ed8c5948b44f786bf9bf749dc67692e Author: Tong Zhang Date: Sun Aug 16 03:32:12 2020 -0400 drm/amd/display: should check error using DC_OK core_link_read_dpcd returns only DC_OK(1) and DC_ERROR_UNEXPECTED(-1), the caller should check error using DC_OK instead of checking against 0 Signed-off-by: Tong Zhang Signed-off-by: Alex Deucher commit 1d5503331b12a76266049289747dfd94f1643fde Author: Colin Ian King Date: Tue Aug 18 13:09:14 2020 +0100 drm/amd/display: fix potential integer overflow when shifting 32 bit variable bl_pwm The 32 bit unsigned integer bl_pwm is being shifted using 32 bit arithmetic and then being assigned to a 64 bit unsigned integer. There is a potential for a 32 bit overflow so cast bl_pwm to enforce a 64 bit shift operation to avoid this. Addresses-Coverity: ("unintentional integer overflow") Fixes: 3ba01817365c ("drm/amd/display: Move panel_cntl specific register from abm to panel_cntl.") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 367deb673c2f07e2071b0cfee31a366f6f353f96 Author: Alex Deucher Date: Mon Aug 17 15:18:01 2020 -0400 drm/amdgpu/pm: only hide average power on SI and pre-RENOIR APUs We can get this on RENOIR and newer via the SMU metrics table. Reviewed-by: Evan Quan Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit b49dc928f5a61d6a6dc8b73644bacfaf21b4ae64 Author: Alex Deucher Date: Mon Aug 17 15:47:31 2020 -0400 drm/amdgpu/swsmu: implement power metrics for RENOIR Grab the data from the SMU metrics table. Reviewed-by: Evan Quan Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 61426114f246219e065b553d0d613f3b081a2683 Author: Alex Deucher Date: Mon Aug 17 15:37:54 2020 -0400 drm/amdgpu/swsmu: implement voltage metrics for RENOIR Grab the data from the SMU metrics table. Reviewed-by: Evan Quan Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit d0eb1b5ceb2049dee32c469e4242ee7400504b48 Author: Alex Deucher Date: Mon Aug 17 15:04:44 2020 -0400 drm/amdgpu/pm: remove duplicate check FAMILY_KV is APUs and we already check for APUs. Reviewed-by: Evan Quan Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit cdab4211f66ec961a481e3b9d088e253b358cd1e Author: Leo Liu Date: Fri Aug 14 11:08:59 2020 -0400 drm/amdgpu/jpeg: remove redundant check when it returns Fix warning from kernel test robot v2: remove the local variable as well Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 8e1d88f948f33f2e34dbf13c3e9fc4228f1331af Author: jqdeng Date: Thu Jul 30 14:48:40 2020 +0800 drm/amdgpu: Limit the error info print rate Use function printk_ratelimit to limit the print rate. Signed-off-by: jqdeng Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 9a1cddd6374fb1eb166f40f10d5411e3699066d4 Author: jqdeng Date: Fri Aug 7 17:31:19 2020 +0800 drm/amdgpu: Fix repeatly flr issue Only for no job running test case need to do recover in flr notification. For having job in mirror list, then let guest driver to hit job timeout, and then do recover. Signed-off-by: jqdeng Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 5ce99853a6fd94c729d4b50188f43300d6568898 Author: Evan Quan Date: Mon Aug 17 16:05:10 2020 +0800 drm/amd/pm: add SMU11 common deep sleep control interface Considering the same logic can be applied to Arcturus, Navi1X and Sienna Cichlid. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f0d51d20d918b116571a243ef8c102b914fd5ad8 Author: Evan Quan Date: Mon Aug 17 15:52:42 2020 +0800 drm/amd/pm: disable/enable deep sleep features on UMD pstate enter/exit Add deep sleep disablement/enablement on UMD pstate entering/exiting. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e988026fcf2694893c5f81aa0aa241c3c7891063 Author: Evan Quan Date: Mon Aug 17 15:08:16 2020 +0800 drm/amd/pm: add SMU11 common gfx ulv control interface Considering the same logic can be applied to Arcturus, Navi1X and Sienna Cichlid. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 588a4d5c6a9275ad3d2b74780c93c6e5a41fdf41 Author: Evan Quan Date: Mon Aug 17 14:52:06 2020 +0800 drm/amd/pm: disable/enable gfx ulv on UMD pstate enter/exit Add gfx ulv disablement/enablement on UMD pstate entering/exiting. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b109f61e7fe13109a2355f8cf087da0a448ee5de Author: Jiansong Chen Date: Tue Aug 18 10:54:06 2020 +0800 drm/amd/pm: update driver if version for navy_flounder It's in accordance with pmfw 65.7.0 for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 332d790365dbf33a5babc2f31a33957f7633361b Author: Jiansong Chen Date: Mon Aug 17 22:38:38 2020 +0800 Revert "drm/amdgpu: disable gfxoff for navy_flounder" This reverts commit ba4e049e63b607ac2e0c070b1406826390d5047e. Newly released sdma fw (51.52) provides a fix for the issue. Signed-off-by: Jiansong Chen Reviewed-by: Kenneth Feng Reviewed-by: Tao Zhou Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 9af5e21dace795891544042abda877ada39abacc Author: Luben Tuikov Date: Tue Aug 11 20:56:58 2020 -0400 drm/scheduler: Remove priority macro INVALID (v2) Remove DRM_SCHED_PRIORITY_INVALID. We no longer carry around an invalid priority and cut it off at the source. Backwards compatibility behaviour of AMDGPU CTX IOCTL passing in garbage for context priority from user space and then mapping that to DRM_SCHED_PRIORITY_NORMAL is preserved. v2: Revert "res" --> "r" and "prio" --> "priority". Signed-off-by: Luben Tuikov Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e2d732fdb7a9e421720a644580cd6a9400f97f60 Author: Luben Tuikov Date: Tue Aug 11 19:59:58 2020 -0400 drm/scheduler: Scheduler priority fixes (v2) Remove DRM_SCHED_PRIORITY_LOW, as it was used in only one place. Rename and separate by a line DRM_SCHED_PRIORITY_MAX to DRM_SCHED_PRIORITY_COUNT as it represents a (total) count of said priorities and it is used as such in loops throughout the code. (0-based indexing is the the count number.) Remove redundant word HIGH in priority names, and rename *KERNEL* to *HIGH*, as it really means that, high. v2: Add back KERNEL and remove SW and HW, in lieu of a single HIGH between NORMAL and KERNEL. Signed-off-by: Luben Tuikov Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c80e966b54096e50264af62a350c621708a4fcd2 Author: Bhawanpreet Lakha Date: Mon Aug 17 15:26:41 2020 -0400 drm/amd/display: Add dsc_to_stream_resource for dcn3 Without this, enabling dsc will cause a nullptr Reviewed-by: Mikita Lipski Signed-off-by: Bhawanpreet Lakha Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5960e02290357504b18f79fdda6de2f4d4812926 Author: Mukul Joshi Date: Mon Aug 17 13:46:56 2020 -0400 drm/amdkfd: Initialize SDMA activity counter to 0 To prevent reporting erroneous SDMA usage, initialize SDMA activity counter to 0 before using. Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit a25b6b273f7039da72e41f78dc6e9d64b4592e68 Author: Sam Ravnborg Date: Sat Aug 15 14:54:06 2020 +0200 drm/panel: Use dev_ based logging Standardize on the dev_ based logging and drop the include of drm_print.h. Fix a few cases where "x@" was used when printing the mode. Signed-off-by: Sam Ravnborg Reviewed-by: Guido Günther Cc: Jerry Han Cc: Thierry Reding Cc: Sam Ravnborg Cc: Icenowy Zheng Cc: Jagan Teki Cc: Linus Walleij Cc: Guido Günther Cc: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20200815125406.1153224-6-sam@ravnborg.org commit 65d5c86fc55f42392428a36fb0b32dc51b2c5848 Author: Sam Ravnborg Date: Sat Aug 15 14:54:05 2020 +0200 drm/panel: sitronix: Use dev_ based logging Standardize on the dev_ based logging and drop the include of drm_print.h. Fix a few cases where "x@" was used when printing the mode. Signed-off-by: Sam Ravnborg Reviewed-by: Guido Günther Cc: Jagan Teki Cc: Thierry Reding Cc: Sam Ravnborg Cc: Guido Günther Cc: Linus Walleij Cc: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20200815125406.1153224-5-sam@ravnborg.org commit c8cf6990f98688ae382770b55cab9ceec5a2fc8f Author: Sam Ravnborg Date: Sat Aug 15 14:54:04 2020 +0200 drm/panel: raydium: Use dev_ based logging Standardize on the dev_ based logging and drop the include of drm_print.h. Fix a few cases where "x@" was used when printing the mode. Signed-off-by: Sam Ravnborg Reviewed-by: Guido Günther Cc: Robert Chiras Cc: Thierry Reding Cc: Sam Ravnborg Cc: Guido Günther Cc: Linus Walleij Cc: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20200815125406.1153224-4-sam@ravnborg.org commit b75efff5f542fe31a1a894ed72f57f8e3139d22d Author: Sam Ravnborg Date: Sat Aug 15 14:54:03 2020 +0200 drm/panel: leadtek: Use dev_ based logging Standardize on the dev_ based logging and drop the include of drm_print.h. Fix a few cases where "x@" was used when printing the mode. Signed-off-by: Sam Ravnborg Reviewed-by: Guido Günther Cc: Thierry Reding Cc: Sam Ravnborg Cc: Guido Günther Cc: Linus Walleij Cc: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20200815125406.1153224-3-sam@ravnborg.org commit 5936b3bdaa888907596df0a954db4d14657ec621 Author: Sam Ravnborg Date: Sat Aug 15 14:54:02 2020 +0200 drm/panel: samsung: Use dev_ based logging Standardize on the dev_ based logging and drop the include of drm_print.h. Fix a few cases where "x@" was used when printing the mode. Signed-off-by: Sam Ravnborg Reviewed-by: Linus Walleij Reviewed-by: Guido Günther Cc: Thierry Reding Cc: Sam Ravnborg Cc: Guido Günther Cc: Linus Walleij Cc: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20200815125406.1153224-2-sam@ravnborg.org commit 46191546d03d2e0c18d1c1d18e1ce11f5e717f28 Author: Alex Dewar Date: Tue Aug 18 15:06:01 2020 +0100 ethernet: cirrus: Remove unused macros Remove a couple of unused #defines in cs89x0.h. Signed-off-by: Alex Dewar Signed-off-by: David S. Miller commit 7f8901b74bf25429023a3d5685cb3fe4f2292e12 Author: Miaohe Lin Date: Tue Aug 18 08:07:13 2020 -0400 net: tipc: Convert to use the preferred fallthrough macro Convert the uses of fallthrough comments to fallthrough macro. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 01e8d85b68fdde832f762f85b0d407ba891fd5e1 Author: Andy Shevchenko Date: Mon Aug 10 14:43:53 2020 +0300 gpio: aggregator: Refactor ->{get, set}_multiple() to make Sparse happy Sparse can't see locking scheme used in ->get_multiple() and ->set_multiple() callbacks. CHECK .../drivers/gpio/gpio-aggregator.c .../spinlock.h:409:9: warning: context imbalance in 'gpio_fwd_get_multiple' - unexpected unlock .../spinlock.h:409:9: warning: context imbalance in 'gpio_fwd_set_multiple' - unexpected unlock Refactor them to have better readability and make Sparse happy. Code size impact is +52 bytes with arm-linux-gnueabihf-gcc 7.5.0. Signed-off-by: Andy Shevchenko Reviewed-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski commit 329afb94e0052fd7a94652d1a14df0b8f5527413 Author: Aleksander Jan Bajkowski Date: Fri Aug 14 21:48:47 2020 +0200 gpio: stp-xway: automatically drive GPHY leds on ar10 and grx390 Ar10 (xr300) has 3 and grx390 (xrx330) has 4 built-in GPHY. PHY LEDs are connected via STP. STP is a peripheral controller used to drive external shift register cascades. The hardware is able to allow the GPHY to drive some GPIO of the cascade automatically.This patch allows for this on ar10 and grx390. Tested on D-Link DWR-966 with OpenWRT. Signed-off-by: Aleksander Jan Bajkowski Signed-off-by: Bartosz Golaszewski commit 396fc59e390429e87584d162462c1555fd64576a Merge: 06a4ec1d9dc65 8aa26c575fb34 Author: David S. Miller Date: Tue Aug 18 12:28:45 2020 -0700 Merge branch 'netlink-allow-NLA_BINARY-length-range-validation' Johannes Berg says: ==================== netlink: allow NLA_BINARY length range validation In quite a few places (perhaps particularly in wireless) we need to validation an NLA_BINARY attribute with both a minimum and a maximum length. Currently, we can do either of the two, but not both, given that we have NLA_MIN_LEN (minimum length) and NLA_BINARY (maximum). Extend the range mechanisms that we use for integer validation to apply to NLA_BINARY as well. After converting everything to use NLA_POLICY_MIN_LEN() we can thus get rid of the NLA_MIN_LEN type since that's now a special case of NLA_BINARY with a minimum length validation. Similarly, NLA_EXACT_LEN can be specified using NLA_POLICY_EXACT_LEN() and also maps to the new NLA_BINARY validation (min == max == desired length). Finally, NLA_POLICY_EXACT_LEN_WARN() also gets to be a somewhat special case of this. I haven't included the patch here now that converts nl82011 to use this because it doesn't apply without another cleanup patch, but we can remove a number of hand-coded min/max length checks and get better error messages from the general validation code while doing that. As I had originally built the netlink policy export to userspace in a way that has min/max length for NLA_BINARY (for the types that we used to call NLA_MIN_LEN, NLA_BINARY and NLA_EXACT_LEN) anyway, it doesn't really change anything there except that now there's a chance that userspace sees min length < max length, which previously wasn't possible. v2: * fix the min commit 8aa26c575fb343ebde810b30dad0cba7d8121efb Author: Johannes Berg Date: Tue Aug 18 10:17:33 2020 +0200 netlink: make NLA_BINARY validation more flexible Add range validation for NLA_BINARY, allowing validation of any combination of combination minimum or maximum lengths, using the existing NLA_POLICY_RANGE()/NLA_POLICY_FULL_RANGE() macros, just like for integers where the value is checked. Also make NLA_POLICY_EXACT_LEN(), NLA_POLICY_EXACT_LEN_WARN() and NLA_POLICY_MIN_LEN() special cases of this, removing the old types NLA_EXACT_LEN and NLA_MIN_LEN. This allows us to save some code where both minimum and maximum lengths are requires, currently the policy only allows maximum (NLA_BINARY), minimum (NLA_MIN_LEN) or exact (NLA_EXACT_LEN), so a range of lengths cannot be accepted and must be checked by the code that consumes the attributes later. Also, this allows advertising the correct ranges in the policy export to userspace. Here, NLA_MIN_LEN and NLA_EXACT_LEN already were special cases of NLA_BINARY with min and min/max length respectively. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit bc0435855041d7fff0b83dd992fc4be34aa11afb Author: Johannes Berg Date: Tue Aug 18 10:17:32 2020 +0200 netlink: consistently use NLA_POLICY_MIN_LEN() Change places that open-code NLA_POLICY_MIN_LEN() to use the macro instead, giving us flexibility in how we handle the details of the macro. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 8140860c817f3e9f78bcd1e420b9777ddcbaa629 Author: Johannes Berg Date: Tue Aug 18 10:17:31 2020 +0200 netlink: consistently use NLA_POLICY_EXACT_LEN() Change places that open-code NLA_POLICY_EXACT_LEN() to use the macro instead, giving us flexibility in how we handle the details of the macro. Signed-off-by: Johannes Berg Acked-by: Matthieu Baerts Signed-off-by: David S. Miller commit c0f4979e90eaa4cd4a63ae95fbf8e65a85150a5f Author: Jason Gunthorpe Date: Wed Aug 5 14:28:52 2020 -0300 RDMA/cm: Remove unused cm_class Previous commits removed all references to the /sys/class/infiniband_cm/ directory represented by the cm_class symbol. Remove the directory and cm_class. Fixes: a1a8e4a85cf7 ("rdma: Delete the ib_ucm module") Link: https://lore.kernel.org/r/0-v1-90096a98c476+205-remove_cm_leftovers_jgg@nvidia.com Signed-off-by: Jason Gunthorpe commit c97119b6d3135fe173751cf8bf53136f322bd506 Author: Max Gurtovoy Date: Wed Aug 5 15:12:31 2020 +0300 IB/isert: remove duplicated error prints The isert_post_recv function prints an error in case of failures, so no need for the callers to add another print. Link: https://lore.kernel.org/r/20200805121231.166162-2-maxg@mellanox.com Signed-off-by: Max Gurtovoy Acked-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit e6ac9f60066414b30c3086219fd66c2d5b087781 Author: Maor Gottlieb Date: Mon Aug 3 09:02:14 2020 +0300 RDMA/mlx5: Enable sniffer when device is in switchdev mode In order to allow sniffer when the RDMA device is in switchdev mode, we don't need to set the source port when creating the sniffer rule. Link: https://lore.kernel.org/r/20200803060214.15328-1-leon@kernel.org Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c531024bb166f5bb6a5bd951e07a33294b895884 Author: Mark Zhang Date: Sun Aug 2 11:17:12 2020 +0300 RDMA/mlx5: Add new IB rates support Support 56, 25, 100, 200 and 50Gbps IB rates in mlx5 driver. Link: https://lore.kernel.org/r/20200802081712.1993490-1-leon@kernel.org Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a4e6a1dd57469d6ecee084db1507d3e37908d1e2 Author: Gal Pressman Date: Fri Jul 31 09:04:20 2020 +0300 RDMA/efa: Introduce SRD RNR retry This patch introduces the ability to configure SRD QPs with the RNR retry parameter when issuing a modify QP command. In addition, a capability bit was added to report support to the userspace library. Link: https://lore.kernel.org/r/20200731060420.17053-5-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 22c50e0660f40173eec8a5b714b27ef9e64b93c7 Author: Gal Pressman Date: Fri Jul 31 09:04:19 2020 +0300 RDMA/efa: Introduce SRD QP state machine This precursory patch adds the SRD QP type state machine, which is currently identical to the one of UD QP type. A following patch is going to change the SRD QP state machine to support RNR retry modifications. Link: https://lore.kernel.org/r/20200731060420.17053-4-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit ab67badd1c5e0c82a6cc09c3e9389d97672075b3 Author: Gal Pressman Date: Fri Jul 31 09:04:18 2020 +0300 RDMA/efa: Be consistent with modify QP bitmask The modify QP bitmask was not consistent with other bitmasks used in the device interface. Remove the bitmask enum and allow usage with EFA_GET/SET. Link: https://lore.kernel.org/r/20200731060420.17053-3-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 34eb009ffe2e2b09e356e24bba548bec80708e86 Author: Gal Pressman Date: Fri Jul 31 09:04:17 2020 +0300 RDMA/efa: Add a generic capability check helper Instead of adding a new function for each capability added, introduce a generic helper to query device capabilities. Link: https://lore.kernel.org/r/20200731060420.17053-2-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit d6673746d69909f9ab52cf9fe1f9a21fca202e0c Author: Leon Romanovsky Date: Thu Jul 30 11:12:35 2020 +0300 RDMA: Remove constant domain argument from flow creation call The "domain" argument is constant and modern device (mlx5) doesn't support anything except IB_FLOW_DOMAIN_USER, so delete this extra parameter and simplify code. Link: https://lore.kernel.org/r/20200730081235.1581127-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 70c1430fba7bc904403c4202776d7bfa697a294d Author: Leon Romanovsky Date: Thu Jul 30 11:12:34 2020 +0300 RDMA/mlx5: Replace open-coded offsetofend() macro Clean mlx5_ib from open-coded implementations of offsetofend(). Link: https://lore.kernel.org/r/20200730081235.1581127-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 156f378985819e55431c7d7a09c7764d029ef49f Author: Leon Romanovsky Date: Thu Jul 30 11:12:33 2020 +0300 RDMA/mlx5: Simplify multiple else-if cases with switch keyword Improve readability of fs.c by converting multiple else-if constructions to be implemented with switch keyword. Link: https://lore.kernel.org/r/20200730081235.1581127-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0093870aa891594d170e1dc9aa192a30d530d755 Author: Sven Eckelmann Date: Mon Aug 17 08:09:48 2020 +0200 batman-adv: Migrate to linux/prandom.h The commit c0842fbc1b18 ("random32: move the pseudo-random 32-bit definitions to prandom.h") introduced a new header for the pseudo random functions from (previously) linux/random.h. One future goal of the prandom.h change is to make code to switch just the new header file and to avoid the implicit include. This would allow the removal of the implicit include from random.h Signed-off-by: Sven Eckelmann commit 21ba5ab2aa8adecef4addf8f481c33f204da93d2 Author: Sven Eckelmann Date: Fri Jul 31 20:33:00 2020 +0200 batman-adv: Drop repeated words in comments checkpatch found various instances of "Possible repeated word" in various comments. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 6f5b92a79c4aa1a7cd2e985ccbd5c40aaa77bd73 Author: Randy Dunlap Date: Sun Jul 19 11:08:11 2020 -0700 batman-adv: types.h: delete duplicated words Delete the doubled word "time" in a comment. Delete the doubled word "address" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit c3b92dd49094397e7d3893a666adf2103958399f Author: Sven Eckelmann Date: Tue Jul 7 22:49:50 2020 +0200 batman-adv: Drop unused function batadv_hardif_remove_interfaces() The function batadv_hardif_remove_interfaces was meant to remove all interfaces which are currently in the list of known (compatible) hardifs during module unload. But the function unregister_netdevice_notifier is called in batadv_exit before batadv_hardif_remove_interfaces. This will trigger NETDEV_UNREGISTER events for all available interfaces and in this process remove all interfaces from batadv_hardif_list. And batadv_hardif_remove_interfaces only operated on this (empty) list. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 426988ee84c1d03cd5e158b4a360e01459709e95 Author: Simon Wunderlich Date: Fri Jul 31 20:36:21 2020 +0200 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich commit 8bdaa43808b7481eb61b251ae0e4ca308ee1093d Author: Greg Kroah-Hartman Date: Tue Aug 18 15:37:01 2020 +0200 regulator: dbx500: 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 Cc: Liam Girdwood Cc: Mark Brown Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20200818133701.462958-1-gregkh@linuxfoundation.org Signed-off-by: Mark Brown commit 66c3b96a7bd042427d2e0eaa8704536828f8235f Author: Jonathan Marek Date: Tue Aug 18 12:25:08 2020 -0400 regulator: set of_node for qcom vbus regulator This allows the regulator to be found by devm_regulator_get(). Fixes: 4fe66d5a62fb ("regulator: Add support for QCOM PMIC VBUS booster") Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200818162508.5246-1-jonathan@marek.ca Signed-off-by: Mark Brown commit a8535ae7034e3547f4f7a8c7ca03a6ee72097fb0 Author: Johan Jonker Date: Tue Aug 18 16:37:26 2020 +0200 ASoC: rockchip-spdif: add description for rk3308 A test with the command below shows that the compatible string "rockchip,rk3308-spdif", "rockchip,rk3328-spdif" is already in use, but is not added to a document. The current fallback string "rockchip,rk3328-spdif" points to a data set enum RK_SPDIF_RK3366 in rockchip_spdif.c that is not used both in the mainline as in the manufacturer kernel. (Of the enum only RK_SPDIF_RK3288 is used.) So if the properties don't change we might as well use the first SoC in line as fallback string and add the description for rk3308 as: "rockchip,rk3308-spdif", "rockchip,rk3066-spdif" make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/sound/rockchip-spdif.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200818143727.5882-1-jbx6244@gmail.com Signed-off-by: Mark Brown commit a4d328efed242b9912f5fe72948ed4587aba5197 Author: Charles Keepax Date: Tue Aug 18 17:01:26 2020 +0100 ASoC: wm_adsp: Update naming in error handling It seems the datasheet has never used the word slave for this error status bit and has always used the term address error. So update the driver to match the datasheets and also in the process align a bit better with avoiding the use of such words where possible. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200818160126.4852-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit bc752d2f345bf55d71b3422a6a24890ea03168dc Author: Mauro Carvalho Chehab Date: Tue Aug 18 18:04:48 2020 +0200 staging: hikey9xx: Kconfig: add regulator dependency The regulator driver needs it, as otherwise it will produce errors when creating vmlinux. Reported-by: Greg Kroah-Hartman Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/a287238bd0141aa68aae7d4cec4c1174a43b3e53.1597766680.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 485be87ac1d570b0c123820b3c2ccf365b2f841a Merge: e1cc0388d6fa4 08f9793efd3de Author: Mark Brown Date: Tue Aug 18 17:52:40 2020 +0100 Merge series "r8a7742 add QSPI support" from Lad Prabhakar : Hi All, This patchset adds qspi node to r8a7742 (RZ/G1H) SoC along with updating the DT binding. Cheers, Prabhakar Lad Prabhakar (2): dt-bindings: spi: renesas,rspi: Add r8a7742 to the compatible list ARM: dts: r8a7742: Add QSPI support .../devicetree/bindings/spi/renesas,rspi.yaml | 1 + arch/arm/boot/dts/r8a7742.dtsi | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) -- 2.17.1 commit e1cc0388d6fa420b1ccea05c59ea01182400ac6e Author: Krzysztof Kozlowski Date: Tue Aug 4 17:13:56 2020 +0200 spi: s3c24xx: correct kerneldoc comment Correct the kerneldoc for structure to fix W=1 compile warning: drivers/spi/spi-s3c24xx.c:36: warning: cannot understand function prototype: 'struct s3c24xx_spi_devstate ' Signed-off-by: Krzysztof Kozlowski Acked-by: Andi Shyti Link: https://lore.kernel.org/r/20200804151356.28057-1-krzk@kernel.org Signed-off-by: Mark Brown commit b09058bbf5f083e2670186a02f5be05baf1190d7 Author: Angelo Dureghello Date: Sun Aug 16 11:46:35 2020 +0200 spi: spi-fsl-dspi: set ColdFire to DMA mode Set DMA transfer mode for ColdFire. After recent fixes to fsl edma engine, this mode can be used also for ColdFire, and from some raw mtd r/w tests it definitely improves the transfer rate, so keeping it selected. Signed-off-by: Angelo Dureghello Link: https://lore.kernel.org/r/20200816094635.1830006-1-angelo.dureghello@timesys.com Signed-off-by: Mark Brown commit 2494174e04e7f4e58d1363adb13c0ae23b64d37c Author: Christophe JAILLET Date: Sun Aug 2 19:50:07 2020 +0200 spi: a3700: Remove a useless memset Memory allocated by 'spi_alloc_master()' is already zeroed. Remove a redundant memset. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20200802175007.703995-1-christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit c3158a891bcc4c79523804e0d09a195fb1f815b4 Author: Fabio Estevam Date: Mon Aug 17 20:58:12 2020 -0300 spi: lpspi: Remove CONFIG_PM_SLEEP ifdefery Use __maybe_unused for the suspend()/resume() hooks and get rid of the CONFIG_PM_SLEEP ifdefery to improve the code. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20200817235812.19518-1-festevam@gmail.com Signed-off-by: Mark Brown commit 72967d5616d3f0c714f8eb6c4e258179a9031c45 Author: Guido Günther Date: Mon Aug 17 10:14:36 2020 +0200 drm/panel: Add panel driver for the Mantix MLAF057WE51-X DSI panel The panel uses a Focaltech FT8006p, the touch part is handled by the already existing edt-ft5x06. Signed-off-by: Guido Günther Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/118c6e03dd0ff6e86e495579102cbf7d0cfca6f4.1597652012.git.agx@sigxcpu.org commit b9ab1248d801bfa4fb7c35762d172455cf3795f1 Author: Guido Günther Date: Mon Aug 17 10:14:35 2020 +0200 dt-bindings: Add Mantix MLAF057WE51-X panel bindings The panel uses a Focaltech FT8006p, the touch part is handled by the already existing edt-ft5x06. Signed-off-by: Guido Günther Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/b84c8c00ee1dcf545903a475872e1ae62b5f43ea.1597652012.git.agx@sigxcpu.org commit faa962bbae312eaf84838bbdc96ccc216ba248ef Author: Guido Günther Date: Mon Aug 17 10:14:34 2020 +0200 dt-bindings: vendor-prefixes: Add mantix vendor prefix Add prefix for Mantix Display Technology Co.,Ltd. Signed-off-by: Guido Günther Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/b6bcfe27d9393a07a5cdd82fcf211620c774a273.1597652012.git.agx@sigxcpu.org commit 08f9793efd3decae75e60bfec2e6068f2d4180df Author: Lad Prabhakar Date: Wed Aug 12 16:00:47 2020 +0100 spi: renesas,rspi: Add r8a7742 to the compatible list Document RZ/G1H (R8A7742) SoC specific bindings. The R8A7742 qspi module is identical to R-Car Gen2 family. No driver change is needed due to the fallback compatible value "renesas,qspi". Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200812150048.27721-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Mark Brown commit 2063818114951882df64681c69457bd9137c1880 Merge: 4c13f934e3356 b4b85af052f43 Author: Mark Brown Date: Tue Aug 18 17:18:49 2020 +0100 Merge series "regulator: mp886x: two features and dt json convert" from Jisheng Zhang Jisheng Zhang : From: Jisheng Zhang This is to improve the mp886x regulator driver support. patch1 implments .set_ramp_delay patch2 and patch3 support the switch freq setting patch4 converts dt binding to json-schema Since v2: - put any schema conversions at the end of the series as Mark suggested. Jisheng Zhang (4): regulator: mp886x: implement set_ramp_delay dt-bindings: regulator: mp886x: support mps,switch-frequency regulator: mp886x: support setting switch freq dt-bindings: regulator: Convert mp886x to json-schema .../devicetree/bindings/regulator/mp886x.txt | 27 ----- .../bindings/regulator/mps,mp886x.yaml | 58 ++++++++++ drivers/regulator/mp886x.c | 109 +++++++++++++++++- 3 files changed, 164 insertions(+), 30 deletions(-) delete mode 100644 Documentation/devicetree/bindings/regulator/mp886x.txt create mode 100644 Documentation/devicetree/bindings/regulator/mps,mp886x.yaml -- 2.28.0.rc1 commit 4c13f934e335665d05583ac4177321fd8116555f Merge: 6a1fe83bf14b8 2dbf085594370 Author: Mark Brown Date: Tue Aug 18 17:18:46 2020 +0100 Merge series "regulator: fix deadlock vs memory reclaim" from Michał Mirosław : For systems that have eg. eMMC storage using voltage regulator, memory reclaim path might call back into regulator subsystem. This means we have to make sure no allocations happen with a regulator or regulator list locked. After this series I see no more lockdep complaints on my test system, but please review and test further. First four patches move allocations out of locked regions, next three came as a drive-by cleanups. --- v2: fix bug in patch #4 spotted by kernel test robot reworded commit #7 description Michał Mirosław (7): regulator: push allocation in regulator_init_coupling() outside of lock regulator: push allocation in regulator_ena_gpio_request() out of lock regulator: push allocations in create_regulator() outside of lock regulator: push allocation in set_consumer_device_supply() out of lock regulator: plug of_node leak in regulator_register()'s error path regulator: cleanup regulator_ena_gpio_free() regulator: remove superfluous lock in regulator_resolve_coupling() drivers/regulator/core.c | 164 +++++++++++++++++++++------------------ 1 file changed, 87 insertions(+), 77 deletions(-) -- 2.20.1 commit 6a1fe83bf14b87fd8b02f391ea629f69624d9c34 Author: Axel Lin Date: Sat Aug 1 13:48:20 2020 +0800 regulator: qcom_spmi: Improve readability for setting up enable/mode pin control By checking data->pin_ctrl_enable / data->pin_ctrl_hpm flags first, then use switch-case to improve readability. Signed-off-by: Axel Lin Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200801054820.134859-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 7d8196641ee1eea6223e68ff92362652b1c8346b Author: Michał Mirosław Date: Sun Aug 9 21:21:16 2020 +0200 regulator: Remove pointer table overallocation The code allocates sizeof(regulator_dev) for a pointer. Make it less generous. Let kcalloc() calculate the size, while at it. Signed-off-by: Michał Mirosław Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/407fbd06a02caf038a9ba3baa51c7d6d47cd6517.1597000795.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit aedf7451e7535bc93bb9cec0ebc91744934da95c Author: Jisheng Zhang Date: Mon Aug 3 14:44:36 2020 +0800 regulator: Convert sy8824x to json-schema Convert the sy8824x binding to DT schema format using json-schema. Signed-off-by: Jisheng Zhang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200803144436.5d2b7e54@xhacker.debian Signed-off-by: Mark Brown commit 9c535960891470eaec5664eed2a56dbb2b6a205b Author: Marek Vasut Date: Sun Aug 9 12:59:37 2020 +0200 regulator: Add DT bindings for RaspberryPi 7" display ATTINY88-based regulator/backlight controller Add DT bindings for RaspberryPi 7" display ATTINY88-based regulator/backlight controller, this one is used in the Raspberry Pi 7" touchscreen display unit. Signed-off-by: Marek Vasut Cc: Eric Anholt Cc: Mark Brown Cc: Rob Herring Cc: Sam Ravnborg Cc: devicetree@vger.kernel.org To: dri-devel@lists.freedesktop.org Link: https://lore.kernel.org/r/20200809105938.6388-1-marex@denx.de Signed-off-by: Mark Brown commit 38573472278da49e2ab588062d88bc2f0c11a325 Author: Marek Vasut Date: Sun Aug 9 12:59:38 2020 +0200 regulator: rpi-panel: Add regulator/backlight driver for RPi panel This regulator/backlight driver handles the ATTINY88 present on the RPi 7" touchscreen panel and exposes the power/backlight interfaces. Signed-off-by: Marek Vasut Cc: Eric Anholt Cc: Mark Brown Cc: Sam Ravnborg To: dri-devel@lists.freedesktop.org Link: https://lore.kernel.org/r/20200809105938.6388-2-marex@denx.de Signed-off-by: Mark Brown commit 0955f5be4337c0ada82e49389249eb99199f8db2 Author: Stephen Boyd Date: Tue Aug 4 00:08:37 2020 -0700 regulator: Avoid grabbing regulator lock during suspend/resume I see it takes about 5us per regulator to grab the lock, check that this regulator isn't going to do anything for suspend, and then release the lock. When that is combined with PMICs that have dozens of regulators we get into a state where we spend a few miliseconds doing a bunch of locking operations synchronously to figure out that there's nothing to do. Let's reorganize the code here a bit so that we don't grab the lock until we're actually going to do something so that suspend is a little faster. Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Cc: Matthias Kaehlcke Cc: Douglas Anderson Link: https://lore.kernel.org/r/20200804070837.1084024-1-swboyd@chromium.org Signed-off-by: Mark Brown commit a16138a32eeeca01e2603193288ff0714bead11d Author: Jisheng Zhang Date: Mon Aug 10 09:57:53 2020 +0800 regulator: sy8827n: Fix W=1 build warning when CONFIG_OF=n Fixing W=1 build warning when no support for device tree is there. Reported-by: kernel test robot Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200810095753.59ce9f75@xhacker.debian Signed-off-by: Mark Brown commit 989e08c3d0044fc707c26c0329ed49e33e8e4c7b Author: Hsin-Yi Wang Date: Wed Aug 12 21:31:02 2020 +0800 regulator: da9211: add cache_type Add regmap_cache to reduce wakeups events of interrupt if regulator is accessed frequently. This results in saving more power. Suggested-by: Daniel Kurtz Signed-off-by: Hsin-Yi Wang Acked-by: Adam Thomson Link: https://lore.kernel.org/r/20200812133101.2513317-1-hsinyi@chromium.org Signed-off-by: Mark Brown commit 4cf12735de56d2bfd058af82492b06eed761e111 Author: Axel Lin Date: Sun Aug 2 17:06:38 2020 +0800 regulator: lp8755: Get rid of lp8755_read/lp8755_write/lp8755_update_bits Just use regmap_read/regmap_write/regmap_update_bits instead. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200802090638.380589-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 6f4ac2844b61d43c0c48b7c67a974d9f6e4ddd9c Author: ChiYuan Huang Date: Sat Aug 15 11:14:22 2020 +0800 regulator: rt4801: Fix the dt-binding document for dtc check. Fix the dt-binding document for dtc check. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1597461262-25878-3-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit fd6b928db8a05fcd8629320c52eae214a8615aae Author: ChiYuan Huang Date: Sat Aug 15 11:14:21 2020 +0800 regulator: rt4801: Add DT binding documentation Add a devicetree binding documentation for the rt4801 regulator driver. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1597461262-25878-2-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit 5bbbfc7f7f0a44b7a85ab3872dd2ccce7019f7b1 Author: ChiYuan Huang Date: Sat Aug 15 11:14:20 2020 +0800 regulator: rt4801: Add support for RT4801 Display Bias regulator driver Adds support for the RT4801 DSV. It has two regulators (DSVP/DSVN) with an I2C interface. DSVP/DSVN can provide the display panel module for the positive/negative voltage range from (+/-)4V to (+/-)6V. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1597461262-25878-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit b2ad0be5087470f4a5ba29129e611df00cd183a7 Author: Anson Huang Date: Mon Aug 3 10:23:59 2020 +0800 regulator: Convert pfuze100 to json-schema Convert the pfuze100 regulator binding to DT schema format using json-schema. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1596421439-19591-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Mark Brown commit 178984d85609742c9510cc0dedc1764872852772 Author: Anson Huang Date: Tue Aug 18 11:34:45 2020 +0800 dt-bindings: serial: Convert NXP lpuart to json-schema Convert the NXP lpuart binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1597721685-9280-5-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 66f669d6fc885d73eeb3aa60d355a14ac0dbcc58 Author: Anson Huang Date: Tue Aug 18 11:34:44 2020 +0800 dt-bindings: serial: Convert MXS auart to json-schema Convert the MXS auart binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1597721685-9280-4-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit ebd35674aee6d9147e6744748cb33ce0ce244895 Author: Anson Huang Date: Tue Aug 18 11:34:43 2020 +0800 dt-bindings: serial: Convert i.MX uart to json-schema Convert the i.MX uart binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1597721685-9280-3-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit d74671b6a9a1b09e7a2f568dce35afc746ff9603 Author: Anson Huang Date: Tue Aug 18 11:34:42 2020 +0800 dt-bindings: clock: Update i.MX23 example Update the i.MX23 clock example to align with MXS AUART binding doc to avoid below build error: Documentation/devicetree/bindings/clock/imx23-clock.example.dt.yaml: serial@8006c000: clocks: [[4294967295, 32]] is too short Documentation/devicetree/bindings/clock/imx23-clock.example.dt.yaml: serial@8006c000: 'dmas' is a required property Documentation/devicetree/bindings/clock/imx23-clock.example.dt.yaml: serial@8006c000: 'dma-names' is a required property Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1597721685-9280-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 28726bac1aa7aa3d453fa1617d6b1503152e4767 Author: Anson Huang Date: Tue Aug 18 11:34:41 2020 +0800 dt-bindings: clock: Update i.MX28 example Update the i.MX28 clock example to align with MXS AUART binding doc to avoid below build error: Documentation/devicetree/bindings/clock/imx28-clock.example.dt.yaml: serial@8006a000: clocks: [[4294967295, 45]] is too short Documentation/devicetree/bindings/clock/imx28-clock.example.dt.yaml: serial@8006a000: compatible: Additional items are not allowed ('fsl,imx23-auart' was unexpected) Documentation/devicetree/bindings/clock/imx28-clock.example.dt.yaml: serial@8006a000: compatible: ['fsl,imx28-auart', 'fsl,imx23-auart'] is too long Documentation/devicetree/bindings/clock/imx28-clock.example.dt.yaml: serial@8006a000: 'dmas' is a required property Documentation/devicetree/bindings/clock/imx28-clock.example.dt.yaml: serial@8006a000: 'dma-names' is a required property Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1597721685-9280-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit fbcfdfab4a2c4ec5e2195929528506fec39388f3 Author: Alex Dewar Date: Tue Aug 18 16:11:29 2020 +0100 staging: emxx_udc: Allow for building on !ARM Currently the module can only be test built on ARM, although it seems to build fine on x86. Change this to allow for broader test coverage. Signed-off-by: Alex Dewar Link: https://lore.kernel.org/r/20200818151133.583382-1-alex.dewar90@gmail.com Signed-off-by: Greg Kroah-Hartman commit a21a4391f20c0ab45db452e22bc3e8afe8b36e46 Author: James Morse Date: Wed Jul 8 16:39:24 2020 +0000 x86/resctrl: Include pid.h We are about to disturb the header soup. This header uses struct pid and struct pid_namespace. Include their header. Signed-off-by: James Morse Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/20200708163929.2783-6-james.morse@arm.com commit e570f9155f192f8732571a70ac82aff27bfc959a Author: Mauro Carvalho Chehab Date: Tue Aug 18 16:58:58 2020 +0200 MAINTAINERS: add an entry for HiSilicon 6421v600 drivers Add an entry for the SPMI, MFD and PMIC parts of the HiSilicon 6421v600 support. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/14b009ef0255d61eeaf4273e9c36dafdb1e5e12f.1597762400.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9e591728854516b0f5623eabe1bf35ad6030aef6 Author: Mauro Carvalho Chehab Date: Tue Aug 18 16:58:57 2020 +0200 dt: document HiSilicon SPMI controller and mfd/regulator properties Add documentation for the properties needed by the HiSilicon 6421v600 driver, and by the SPMI controller used to access the chipset. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/56c40a260bf31edf7049f50586c63ee0d06e02cb.1597762400.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9f46c3433f99f3901907c8acca29e03415bf1d76 Author: Mauro Carvalho Chehab Date: Tue Aug 18 16:58:56 2020 +0200 staging: mfd: hi6421-spmi-pmic: Simplify the compatible string It is clear that this driver is for PMIC. So, get rid of it at the compatible. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/12bdc9b4734e156098408d0d27256abdc91ac283.1597762400.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit de1a93b6a49c366b4897fc314c71ac005f765479 Author: Mauro Carvalho Chehab Date: Tue Aug 18 16:58:55 2020 +0200 staging: spmi: hisi-spmi-controller: change compatible string Add the chipset name at the compatible string, as other HiSilicon chipsets with SPMI bus might require something different. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/f34062e82b5d5ee49aab4f9055b44e42e5023f0a.1597762400.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit b240d0143bfbc96f610405f978e4753fd663cbfc Author: Mauro Carvalho Chehab Date: Tue Aug 18 16:58:54 2020 +0200 staging: mfd: hi6421-spmi-pmic: get rid of interrupt properties Both irqnum and irqarray properties reflect the same thing: the number of bits and bytes for interrupts at this chipset. E. g.: irqnum = 8 x irqarray This can be seen by the way pending interrupts are handled: /* During probe time */ pmic->irqs = devm_kzalloc(dev, pmic->irqnum * sizeof(int), GFP_KERNEL); /* While handling IRQs */ for (i = 0; i < pmic->irqarray; i++) { pending = hi6421_spmi_pmic_read(pmic, (i + pmic->irq_addr)); pending &= 0xff; for_each_set_bit(offset, &pending, 8) generic_handle_irq(pmic->irqs[offset + i * 8]); } Going further, there are some logic at the driver which assumes that irqarray is 2: /* solve powerkey order */ if ((i == HISI_IRQ_KEY_NUM) && ((pending & HISI_IRQ_KEY_VALUE) == HISI_IRQ_KEY_VALUE)) { generic_handle_irq(pmic->irqs[HISI_IRQ_KEY_DOWN]); generic_handle_irq(pmic->irqs[HISI_IRQ_KEY_UP]); pending &= (~HISI_IRQ_KEY_VALUE); } As HISI_IRQ_KEY_DOWN and HISI_IRQ_KEY_UP are fixed values and don't depend on irqnum/irqarray. The IRQ addr and mask addr seem to be also fixed, based on some comments at the OF parsing code. So, get rid of them too, removing the of parsing function completely. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/e231244e42cb5b56240705cac2f987e11a078038.1597762400.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 78dd4243574ffc05c266e5cab7c0d3ebafea51dd Author: Mauro Carvalho Chehab Date: Tue Aug 18 16:58:53 2020 +0200 staging: hikey9xx: fix Kconfig dependency chain Both the SPMI controller and the SPMI PMIC driver depends on the SPMI bus support. The dependency for the regulator is also wrong: it should depends on the SPMI version of the HiSilicon 6421, and not on the normal one. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/1b7e23500e7449593393115cc0954af441b0c730.1597762400.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit f995801ba3a0660cb352c8beb794379c82781ca3 Author: James Morse Date: Wed Jul 8 16:39:23 2020 +0000 x86/resctrl: Use container_of() in delayed_work handlers mbm_handle_overflow() and cqm_handle_limbo() are both provided with the domain's work_struct when called, but use get_domain_from_cpu() to find the domain, along with the appropriate error handling. container_of() saves some list walking and bitmap testing, use that instead. Signed-off-by: James Morse Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/20200708163929.2783-5-james.morse@arm.com commit ae0fbedd2a18cd82a2c0c5605a0a60865bc54576 Author: James Morse Date: Wed Jul 8 16:39:22 2020 +0000 x86/resctrl: Fix stale comment The comment in rdtgroup_init() refers to the non existent function rdt_mount(), which has now been renamed rdt_get_tree(). Fix the comment. Signed-off-by: James Morse Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/20200708163929.2783-4-james.morse@arm.com commit e89f85b9171665c917dca59920884f3d4fe0b1ef Author: James Morse Date: Wed Jul 8 16:39:21 2020 +0000 x86/resctrl: Remove struct rdt_membw::max_delay max_delay is used by x86's __get_mem_config_intel() as a local variable. Remove it, replacing it with a local variable. Signed-off-by: James Morse Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/20200708163929.2783-3-james.morse@arm.com commit abe8f12b44250d02937665033a8b750c1bfeb26e Author: James Morse Date: Wed Jul 8 16:39:20 2020 +0000 x86/resctrl: Remove unused struct mbm_state::chunks_bw Nothing reads struct mbm_states's chunks_bw value, its a copy of chunks. Remove it. Signed-off-by: James Morse Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/20200708163929.2783-2-james.morse@arm.com commit 2cb5383b30d47c446ec7d884cd80f93ffcc31817 Author: Kan Liang Date: Thu Jul 23 10:11:14 2020 -0700 perf/x86/intel: Support per-thread RDPMC TopDown metrics Starts from Ice Lake, the TopDown metrics are directly available as fixed counters and do not require generic counters. Also, the TopDown metrics can be collected per thread. Extend the RDPMC usage to support per-thread TopDown metrics. The RDPMC index of the PERF_METRICS will be output if RDPMC users ask for the RDPMC index of the metrics events. To support per thread RDPMC TopDown, the metrics and slots counters have to be saved/restored during the context switching. The last_period and period_left are not used in the counting mode. Use the fields for saved_metric and saved_slots. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200723171117.9918-12-kan.liang@linux.intel.com commit 59a854e2f3b90ad2cc7368ae392de40b981ad51d Author: Kan Liang Date: Thu Jul 23 10:11:13 2020 -0700 perf/x86/intel: Support TopDown metrics on Ice Lake Ice Lake supports the hardware TopDown metrics feature, which can free up the scarce GP counters. Update the event constraints for the metrics events. The metric counters do not exist, which are mapped to a dummy offset. The sharing between multiple users of the same metric without multiplexing is not allowed. Implement set_topdown_event_period for Ice Lake. The values in PERF_METRICS MSR are derived from the fixed counter 3. Both registers should start from zero. Implement update_topdown_event for Ice Lake. The metric is reported by multiplying the metric (fraction) with slots. To maintain accurate measurements, both registers are cleared for each update. The fixed counter 3 should always be cleared before the PERF_METRICS. Implement td_attr for the new metrics events and the new slots fixed counter. Make them visible to the perf user tools. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200723171117.9918-11-kan.liang@linux.intel.com commit 0e2e45e2ded4988f5641115fd996c75dc32e4be3 Author: Kan Liang Date: Thu Jul 23 10:11:12 2020 -0700 perf/x86: Add a macro for RDPMC offset of fixed counters The RDPMC base offset of fixed counters is hard-code. Use a meaningful name to replace the magic number to improve the readability of the code. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200723171117.9918-10-kan.liang@linux.intel.com commit 7b2c05a15d29d0570a0d21da1e4fd5cbc85cbf13 Author: Kan Liang Date: Thu Jul 23 10:11:11 2020 -0700 perf/x86/intel: Generic support for hardware TopDown metrics Intro ===== The TopDown Microarchitecture Analysis (TMA) Method is a structured analysis methodology to identify critical performance bottlenecks in out-of-order processors. Current perf has supported the method. The method works well, but there is one problem. To collect the TopDown events, several GP counters have to be used. If a user wants to collect other events at the same time, the multiplexing probably be triggered, which impacts the accuracy. To free up the scarce GP counters, the hardware TopDown metrics feature is introduced from Ice Lake. The hardware implements an additional "metrics" register and a new Fixed Counter 3 that measures pipeline "slots". The TopDown events can be calculated from them instead. Events ====== The level 1 TopDown has four metrics. There is no event-code assigned to the TopDown metrics. Four metric events are exported as separate perf events, which map to the internal "metrics" counter register. Those events do not exist in hardware, but can be allocated by the scheduler. For the event mapping, a special 0x00 event code is used, which is reserved for fake events. The metric events start from umask 0x10. When setting up the metric events, they point to the Fixed Counter 3. They have to be specially handled. - Add the update_topdown_event() callback to read the additional metrics MSR and generate the metrics. - Add the set_topdown_event_period() callback to initialize metrics MSR and the fixed counter 3. - Add a variable n_metric_event to track the number of the accepted metrics events. The sharing between multiple users of the same metric without multiplexing is not allowed. - Only enable/disable the fixed counter 3 when there are no other active TopDown events, which avoid the unnecessary writing of the fixed control register. - Disable the PMU when reading the metrics event. The metrics MSR and the fixed counter 3 are read separately. The values may be modified by an NMI. All four metric events don't support sampling. Since they will be handled specially for event update, a flag PERF_X86_EVENT_TOPDOWN is introduced to indicate this case. The slots event can support both sampling and counting. For counting, the flag is also applied. For sampling, it will be handled normally as other normal events. Groups ====== The slots event is required in a Topdown group. To avoid reading the METRICS register multiple times, the metrics and slots value can only be updated by slots event in a group. All active slots and metrics events will be updated one time. Therefore, the slots event must be before any metric events in a Topdown group. NMI ====== The METRICS related register may be overflow. The bit 48 of the STATUS register will be set. If so, PERF_METRICS and Fixed counter 3 are required to be reset. The patch also update all active slots and metrics events in the NMI handler. The update_topdown_event() has to read two registers separately. The values may be modified by an NMI. PMU has to be disabled before calling the function. RDPMC ====== RDPMC is temporarily disabled. A later patch will enable it. Suggested-by: Peter Zijlstra Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200723171117.9918-9-kan.liang@linux.intel.com commit 9f0c4fa111dc909ca545c45ea20ec84da555ce16 Author: Kan Liang Date: Thu Jul 23 10:11:10 2020 -0700 perf/core: Add a new PERF_EV_CAP_SIBLING event capability Current perf assumes that events in a group are independent. Close an event doesn't impact the value of the other events in the same group. If the closed event is a member, after the event closure, other events are still running like a group. If the closed event is a leader, other events are running as singleton events. Add PERF_EV_CAP_SIBLING to allow events to indicate they require being part of a group, and when the leader dies they cannot exist independently. Suggested-by: Peter Zijlstra Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200723171117.9918-8-kan.liang@linux.intel.com commit 58da7dbe6f036fefe504a4bb452afbd39bba73f7 Author: Kan Liang Date: Thu Jul 23 10:11:09 2020 -0700 perf/x86/intel: Use switch in intel_pmu_disable/enable_event Currently, the if-else is used in the intel_pmu_disable/enable_event to check the type of an event. It works well, but with more and more types added later, e.g., perf metrics, compared to the switch statement, the if-else may impair the readability of the code. There is no harm to use the switch statement to replace the if-else here. Also, some optimizing compilers may compile a switch statement into a jump-table which is more efficient than if-else for a large number of cases. The performance gain may not be observed for now, because the number of cases is only 5, but the benefits may be observed with more and more types added in the future. Use switch to replace the if-else in the intel_pmu_disable/enable_event. If the idx is invalid, print a warning. For the case INTEL_PMC_IDX_FIXED_BTS in intel_pmu_disable_event, don't need to check the event->attr.precise_ip. Use return for the case. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200723171117.9918-7-kan.liang@linux.intel.com commit bbdbde2a415d9f479803266cae6fb0c1a9f6c80e Author: Kan Liang Date: Thu Jul 23 10:11:08 2020 -0700 perf/x86/intel: Fix the name of perf METRICS Bit 15 of the PERF_CAPABILITIES MSR indicates that the perf METRICS feature is supported. The perf METRICS is not a PEBS feature. Rename pebs_metrics_available perf_metrics. The bit is not used in the current code. It will be used in a later patch. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200723171117.9918-6-kan.liang@linux.intel.com commit d39fcc32893dac2d02900d99c38276a00cc54d60 Author: Kan Liang Date: Thu Jul 23 10:11:07 2020 -0700 perf/x86/intel: Move BTS index to 47 The bit 48 in the PERF_GLOBAL_STATUS is used to indicate the overflow status of the PERF_METRICS counters. Move the BTS index to the bit 47. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200723171117.9918-5-kan.liang@linux.intel.com commit 6f7225099d5f3ec3019f380a0da2b456b7796cb0 Author: Kan Liang Date: Thu Jul 23 10:11:06 2020 -0700 perf/x86/intel: Introduce the fourth fixed counter The fourth fixed counter, TOPDOWN.SLOTS, is introduced in Ice Lake to measure the level 1 TopDown events. Add MSR address and macros for the new fixed counter, which will be used in a later patch. Add comments to explain the event encoding rules for the fixed counters. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200723171117.9918-4-kan.liang@linux.intel.com commit 60a2a271cf05cf046c522e1d7f62116b4bcb32a2 Author: Kan Liang Date: Thu Jul 23 10:11:05 2020 -0700 perf/x86/intel: Name the global status bit in NMI handler Magic numbers are used in the current NMI handler for the global status bit. Use a meaningful name to replace the magic numbers to improve the readability of the code. Remove a Tab for all GLOBAL_STATUS_* and INTEL_PMC_IDX_FIXED_BTS macros to reduce the length of the line. Suggested-by: Peter Zijlstra Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200723171117.9918-3-kan.liang@linux.intel.com commit 75608cb02ea5dd997990e2998eca3670cb71a18c Author: Kan Liang Date: Thu Jul 23 10:11:04 2020 -0700 perf/x86: Use event_base_rdpmc for the RDPMC userspace support The RDPMC index is always re-calculated for the RDPMC userspace support, which is unnecessary. The RDPMC index value is stored in the variable event_base_rdpmc for the kernel usage, which can be used for RDPMC userspace support as well. Suggested-by: Peter Zijlstra Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200723171117.9918-2-kan.liang@linux.intel.com commit 561e174eb3a153d4e4a3c8da10cabe96c686108b Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:11:00 2020 +0200 staging: hikey9xx: add a TODO list Place the things that are needed to be able to move those drivers out of staging. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/bf3ebe32125646e0a87a59280392e8c6fda08488.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2c4fb70d185c7e7080e73bd382f3b4814d89d8c9 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:59 2020 +0200 staging: regulator: hi6421v600-regulator: code cleanup Do some code cleanup in order to make it cleaner for moving it out of staging in the future. Suggested-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/32fadb359c1817992af78052e2d9448b8c5fc61f.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 88e059e6c428fc7253e09b1ecc8e792533b86647 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:58 2020 +0200 staging: regulator: hi6421v600-regulator: add it to the building system Change the binding logic to ensure that the PMIC SPMI driver will run before the regulator code and add it to the building system. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/2992dc49945dcfb07c4bd96fa5c288c4e679701a.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1275f3c3fc8ed97cdc5a45244674328dc6e18f1a Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:57 2020 +0200 staging: regulator: hi6421v600-regulator: fix some coding style issues Fix the remaining issues complained by checkpatch. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/af5101fa2ab1d267ac5ac22603f95c6065ac110f.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6f9bd6e2621e6bbfd1aa152f97b3030375a5feb2 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:56 2020 +0200 staging: regulator: hi6421v600-regulator: cleanup DT settings Currently, an array is used to store both vsel and enable settings, mixing registers, masks and bit settings. Change it in order to have one separate property for each. This makes easier to understand the contents of the DT file, and to describe it at the Documentation/. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/fd72215b0a7da55dd727c2d7bd01c047a46cdd2e.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6105e9ab64c6dea7337a4c9bc996e0cdde59a799 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:55 2020 +0200 staging: regulator: hi6421v600-regulator: initialize ramp_delay Without that, the regulator's core complains with: ldo17: ramp_delay not set For now, use the enable time, as we don't have any datasheets from this device. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/67df5456e4f23c88ab4fd9331eb8202c3952e5c5.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 875a65a05dc4b563ccf6f4d18dcc57eb484f8f1b Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:54 2020 +0200 staging: regulator: hi6421v600-regulator: add a driver-specific debug macro Using dev_dbg() is not too nice, as, instead of printing the name of the regulator, it prints "regulator.", making harder to associate what is happening with each ldo line. So, add a debug-specific macro, which will print the rdev's name, just like the regulator core. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/1690b8531b23910aa915bd2725410b926022c481.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 67a345c7843ee287496a8ae6dce5d54064c60ad3 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:53 2020 +0200 staging: regulator: hi6421v600-regulator: don't use usleep_range for off_on_delay The regulator's core already handles it. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4f17adca2b04c401e5de5556700638648ce25c0c.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 60432176956cf7aaa9b7d45d7b5adeaa443c2752 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:52 2020 +0200 staging: regulator: hi6421v600-regulator: convert to use get/set voltage_sel As the supported LDOs on this driver are all using a selector, change the implementation to use get_voltage_sel and set_voltage_sel ops. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/1cf4f26540e65ffbb561c7d52e53f6be5bd63ac4.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit c22aeb9412cae7417df72c4d1685a0d8f6f81ff2 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:51 2020 +0200 staging: regulator: hi6421v600-regulator: change namespace Rename the functions used internally inside the driver in order for them to follow the driver's name. While here, get rid of some unused definitions at the header file. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5cda96baef9374a096a7a0c8f76f60491b0084c7.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit e086a9cd2b9facf9e081af63f4728371645d1a6f Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:50 2020 +0200 staging: regulator: hi6421v600-regulator: better handle modes Instead of implementing a custom set of properties, set valid_modes_mask based on having or not a mask for enabling the eco_mode. This makes the code clearer, and remove some uneeded props from DT. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/0f4ac5a4167bbca428c8507b6992acd8b3ebabd1.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit db27f8294cd703bc23f4b1ccc5023d354c6a63d2 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:49 2020 +0200 staging: regulator: hi6421v600-regulator: use shorter names for OF properties Simplify the names of the OF properties, in order to make them similar to other drivers and to make easier to understand what each property means. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/98f66100263940901ba59ec187919e9cf5e64f31.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9a18329f776b5a18ead0de8b2eb2000f5f1ad6f6 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:48 2020 +0200 staging: regulator: hi6421v600-regulator: cleanup debug messages - use dev_foo() instead of pr_foo(); - cleanup the messages, making them more standard and easier to understand. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/2d17e168031340da73e1bd1c826289ceba2dbe8f.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 32f53804d23cadd1b5ba530c61ddea3db8b1a5a3 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:47 2020 +0200 staging: regulator: hi6421v600-regulator: cleanup struct hisi_regulator There are several fields on this struct that can be removed, as they already exists at struct regulator_desc. Remove them, cleaning up the code in the process. While here, rename it to hi6421v600_regulator_info, in order to better match the driver's name. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/648d48f11368a9869d760c2bd54bfbc3feb4f44c.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 75937f8f961e090cd98713f9b1302b6ae6173f80 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:46 2020 +0200 staging: regulator: hi6421v600-regulator: change the binding logic Change the binding logic to ensure that the PMIC SPMI driver will run before the regulator code and add it to the building system. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/aa40d443dfc6c8e69e4c36fa79d15459762924e4.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit b660bf657d3262e6a0d1f1b7e83be11e13228a71 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:45 2020 +0200 staging: regulator: hi6421v600-regulator: coding style fixups There are several issues on those drivers related to their coding style. Solve most of them. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9ea7fdc004c7c44ae513b6c8f6c4a4493dd1ac61.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 12ca3b20dbd42c9c35b0499754317bdc2fc533d0 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:44 2020 +0200 staging: regulator: hi6421v600-regulator: port it to upstream The driver was originally written for Kernel 4.9. It needs to be ported to upstream: - Got rid of timeval; - Removed a bogus dependency; - Did cleanups at the header file. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9e34400d2cc15ef501a8478f69a95c9abc5c4d8d.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0e0473c8387b656bce8a3f6fe38fed7e1bb2761d Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:43 2020 +0200 staging: regulator: hi6421v600-regulator: get rid of unused code Get rid of the sysfs code and other parts of the driver which aren't needed upstream. If needed later, this patch can be (partially?) reversed. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/698b2c7bdc92e336d2559bc65415807499b0e3a8.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 42f24d9d446a74fe59b08cf54191b10219526c0a Author: Mayulong Date: Mon Aug 17 09:10:42 2020 +0200 staging: regulator: add a regulator driver for HiSilicon 6421v600 SPMI PMIC Add the regulator driver for the LDO lines provided by the HiSilicon 6421v600 SPMI PMIC device. [mchehab+huawei@kernel.org: keep just the regulator driver on this patch, renaming it to better fit at upstream namespace] The compete patch is at: https://github.com/96boards-hikey/linux/commit/08464419fba2 Signed-off-by: Mayulong Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6e5f6a811edf77575ddaa84ab6542cc646024423.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6b946699252c68b0c792896eded217269c9aa286 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:41 2020 +0200 staging: mfd: hi6421-spmi-pmic: cleanup the code There are several small cleanups that can be done in order to make the code more prepared to be upstreamed. Suggested-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/823792ba2f69e613629ab52a33e5728d54e2288b.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 926648d4791226ad5867abeefef10365e065a697 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:40 2020 +0200 staging: mfd: hi6421-spmi-pmic: add it to the building system Now that the driver is ready, place it at the build system. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/952e11ea1a33beaf67d6dc355d5c0f99ab4fb964.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4d70881afdeb261ee318447ed0232b96946ecabc Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:39 2020 +0200 staging: mfd: hi6421-spmi-pmic: fix some coding style issues Checkpatch complains about some minor issues inside this driver that were not addressed by the previous patch. Address them. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/84b53d20632c84cc60b8dadfe937f3c54b355cef.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1eb2784a90925d48500f6baac1fa1870085c4121 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:38 2020 +0200 staging: mfd: hi6421-spmi-pmic: change namespace on its functions Rename the functions used internally inside the driver in order for them to follow the driver's name. While here, get rid of some unused definitions at the header file. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/bfa8bf33f71612b1511d73269ca242d0d4e70940.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4e15eadc8524cf4148596ed352e33fa6b5734ee3 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:37 2020 +0200 staging: mfd: hi6421-spmi-pmic: cleanup OF properties Simplify the names of the DT properties and do some cleanups, in order to better document them. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/24ffcd28a17ee7b0940d8aabef556d172d5feddf.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit bd07d62a47290ca3ceee58f373fa05464edc6eb5 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:36 2020 +0200 staging: mfd: hi6421-spmi-pmic: get rid of unused OF properties There are several OF properties that aren't used by Hikey 970, and some are not even used inside the driver. So, drop them, as as this makes easier to document what's actually used. If latter needed, those could be re-added later. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/332f96c178b81bf1e9908a1da2127f043909ae0c.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit cf0f27b7b20b5ff19bc2ef488f19720a9d14356b Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:35 2020 +0200 staging: mfd: hi6421-spmi-pmic: change the binding logic Change the binding logic to ensure that the MFD driver will be load after having the SPMI controller registered. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/eb50392ce68bb30f64c603572cdb9c91f93ea47b.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4860b39f545fd96805c6400bd185de4fb383a2c7 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:34 2020 +0200 staging: mfd: hi6421-spmi-pmic: cleanup hi6421-spmi-pmic.h header There are several external vars that are defined there, which are not needed anymore. Get rid of them. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/3dbc3f3876275404153da52b84e5dcef09faf644.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4b5e9b39e7dd9e6b980ad588f1f7a36fe7cda044 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:33 2020 +0200 staging: mfd: hi6421-spmi-pmic: get rid of the static vars There are several static vars inside this driver. Get rid of them. While here, add a SPDX header file. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/19c497fc2bb1d3a95863d92cac89869d5abe3f2e.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 02a9bd4f3e03ab335101233bf1b1362aef11f907 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:32 2020 +0200 staging: mfd: hi6421-spmi-pmic: deal with non-static functions Several functions aren't used outside the mfd driver. So, either remove or make them static. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d26323ab7be5b4efb73b1950b4daaa5959277449.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 489b1a36b111b6a3a4ac1acf29de5cf154810887 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:31 2020 +0200 staging: mfd: hi6421-spmi-pmic: get rid of unused code There are some checks there which could make sense for downstream builds, but doesn't make much sense for upstream ones. They came from the official Hikey970 tree from Linaro, but even there, the commented-out code is not set via other Kconfig vars. So, let's just get rid of that. If needed later, this patch can be (partially?) reversed. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/ecbef801f6c32ba0850ad9e5c534a4304807df3b.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4524ac56cdcabf77b734ec8021089cba59cac1ac Author: Mayulong Date: Mon Aug 17 09:10:30 2020 +0200 staging: mfd: add a PMIC driver for HiSilicon 6421 SPMI version Add the PMIC SPMI driver for the HiSilicon 6421v600. [mchehab+huawei@kernel.org: keep just the MFD driver on this patch, and renamed filenames to better match other upstream drivers] The compete patch is at: https://github.com/96boards-hikey/linux/commit/08464419fba2 Signed-off-by: Mayulong Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4ffb2694244baa47387e39e2c5d71243242c1fc1.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7f3ac6c502fd7ff301dbf21011d9db9deaf94f76 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:29 2020 +0200 staging: spmi: hisi-spmi-controller: do some code cleanups There are several minor things that can be cleanup in order to make this driver more prepared for leaving staging. Suggested-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/1fa33567e21f95942d901a299d92e434d4a24b8f.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1747938a37d1dfa9faa397507f88627158b3d806 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:28 2020 +0200 staging: spmi: hisi-spmi-controller: add it to the building system Now that the driver was ported to upstream, add it as a SPMI controller. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5315331cf048cc72844080e5e8668c0dbac48f1f.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4d914a8c480c31280505304611030612fa5c2645 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:27 2020 +0200 staging: spmi: hisi-spmi-controller: fix the dev_foo() logic Right now, driver is printing some messages as: [ 33.833026] (NULL device *): spmi_read_cmd: id:0 addr:0x17, read value: 00 This is because dev_foo() are not using a device with a name set. Change the logic for it to print it right. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/f647600d6e709f3dc3f92a64f1788f739c924330.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6af364501949d9978252a5c0d4f2363f1cf45dcc Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:26 2020 +0200 staging: spmi: hisi-spmi-controller: add debug when values are read/write It is interesting to be able to check if the driver is doing the right thing. So, add some debug macros to allow checking it. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/11dc4583c41a9c5e2804114d6a7a87374d2a23b4.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8788a30c12c78846c153bea06125296111f53ece Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:25 2020 +0200 staging: spmi: hisi-spmi-controller: use le32 macros where needed Instead of manually using bswap_32(), just use the le32 macros. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/927ac4f981649318dba399e46a1aa429c428cfa3.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 974e3bdc187e68b5652ad57c8d1844e24884cb89 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:24 2020 +0200 staging: spmi: hisi-spmi-controller: adjust whitespaces at defines Some defines are not aligned with tab=8, which is the style defined on Linux. Adjust them. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4a3799b40379dbc3abcbd08827977247ccc26dcb.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6196331e79f361b9c395b45588fbbb9e8de8a990 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:23 2020 +0200 staging: spmi: hisi-spmi-controller: fix a typo chanel -> channel Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/49798ac555d498c0fd489567643c619c625360f5.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 85eb5344f2c91502229ebb79f2af9eb37130ceac Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:22 2020 +0200 staging: spmi: hisi-spmi-controller: fix it to probe successfully Add a MODULE_DEVICE_TABLE() to the driver. Also, the current logic calls platform_set_drvdata(pdev, NULL) if the driver succeeds loading. While here, remove the .owner, as it is not needed upstream anymore. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/122bd1c02f325094f4830ac79a86430fbe01e3d5.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2ea3f6a03b155f4df0cb9ee03557e7835928b646 Author: Mauro Carvalho Chehab Date: Mon Aug 17 09:10:21 2020 +0200 staging: spmi: hisi-spmi-controller: coding style fixup In order to prepare for upstream, fix most coding style issues. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/3cd60dd31e481a4f824f7085d70fc243ecbbb94f.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 70f59c90c8199e888b306edb16e20f651a1fce55 Author: Mayulong Date: Mon Aug 17 09:10:20 2020 +0200 staging: spmi: add Hikey 970 SPMI controller driver Add the SPMI controller code required to use the Kirin 970 SPMI bus. [mchehab+huawei@kernel.org: added just the SPMI controller on this patch] The complete patch is at: https://github.com/96boards-hikey/linux/commit/08464419fba2 Signed-off-by: Mayulong Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/b4810f476e41e7de4efdf28b42472ae4ffe7defe.1597647359.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 730037c3ee57f892e6df019bc88d417a5944737c Author: Sergey Senozhatsky Date: Mon Aug 17 11:26:46 2020 +0900 serial: 8250: change lock order in serial8250_do_startup() We have a number of "uart.port->desc.lock vs desc.lock->uart.port" lockdep reports coming from 8250 driver; this causes a bit of trouble to people, so let's fix it. The problem is reverse lock order in two different call paths: chain #1: serial8250_do_startup() spin_lock_irqsave(&port->lock); disable_irq_nosync(port->irq); raw_spin_lock_irqsave(&desc->lock) chain #2: __report_bad_irq() raw_spin_lock_irqsave(&desc->lock) for_each_action_of_desc() printk() spin_lock_irqsave(&port->lock); Fix this by changing the order of locks in serial8250_do_startup(): do disable_irq_nosync() first, which grabs desc->lock, and grab uart->port after that, so that chain #1 and chain #2 have same lock order. Full lockdep splat: ====================================================== WARNING: possible circular locking dependency detected 5.4.39 #55 Not tainted ====================================================== swapper/0/0 is trying to acquire lock: ffffffffab65b6c0 (console_owner){-...}, at: console_lock_spinning_enable+0x31/0x57 but task is already holding lock: ffff88810a8e34c0 (&irq_desc_lock_class){-.-.}, at: __report_bad_irq+0x5b/0xba which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&irq_desc_lock_class){-.-.}: _raw_spin_lock_irqsave+0x61/0x8d __irq_get_desc_lock+0x65/0x89 __disable_irq_nosync+0x3b/0x93 serial8250_do_startup+0x451/0x75c uart_startup+0x1b4/0x2ff uart_port_activate+0x73/0xa0 tty_port_open+0xae/0x10a uart_open+0x1b/0x26 tty_open+0x24d/0x3a0 chrdev_open+0xd5/0x1cc do_dentry_open+0x299/0x3c8 path_openat+0x434/0x1100 do_filp_open+0x9b/0x10a do_sys_open+0x15f/0x3d7 kernel_init_freeable+0x157/0x1dd kernel_init+0xe/0x105 ret_from_fork+0x27/0x50 -> #1 (&port_lock_key){-.-.}: _raw_spin_lock_irqsave+0x61/0x8d serial8250_console_write+0xa7/0x2a0 console_unlock+0x3b7/0x528 vprintk_emit+0x111/0x17f printk+0x59/0x73 register_console+0x336/0x3a4 uart_add_one_port+0x51b/0x5be serial8250_register_8250_port+0x454/0x55e dw8250_probe+0x4dc/0x5b9 platform_drv_probe+0x67/0x8b really_probe+0x14a/0x422 driver_probe_device+0x66/0x130 device_driver_attach+0x42/0x5b __driver_attach+0xca/0x139 bus_for_each_dev+0x97/0xc9 bus_add_driver+0x12b/0x228 driver_register+0x64/0xed do_one_initcall+0x20c/0x4a6 do_initcall_level+0xb5/0xc5 do_basic_setup+0x4c/0x58 kernel_init_freeable+0x13f/0x1dd kernel_init+0xe/0x105 ret_from_fork+0x27/0x50 -> #0 (console_owner){-...}: __lock_acquire+0x118d/0x2714 lock_acquire+0x203/0x258 console_lock_spinning_enable+0x51/0x57 console_unlock+0x25d/0x528 vprintk_emit+0x111/0x17f printk+0x59/0x73 __report_bad_irq+0xa3/0xba note_interrupt+0x19a/0x1d6 handle_irq_event_percpu+0x57/0x79 handle_irq_event+0x36/0x55 handle_fasteoi_irq+0xc2/0x18a do_IRQ+0xb3/0x157 ret_from_intr+0x0/0x1d cpuidle_enter_state+0x12f/0x1fd cpuidle_enter+0x2e/0x3d do_idle+0x1ce/0x2ce cpu_startup_entry+0x1d/0x1f start_kernel+0x406/0x46a secondary_startup_64+0xa4/0xb0 other info that might help us debug this: Chain exists of: console_owner --> &port_lock_key --> &irq_desc_lock_class Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&irq_desc_lock_class); lock(&port_lock_key); lock(&irq_desc_lock_class); lock(console_owner); *** DEADLOCK *** 2 locks held by swapper/0/0: #0: ffff88810a8e34c0 (&irq_desc_lock_class){-.-.}, at: __report_bad_irq+0x5b/0xba #1: ffffffffab65b5c0 (console_lock){+.+.}, at: console_trylock_spinning+0x20/0x181 stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.39 #55 Hardware name: XXXXXX Call Trace: dump_stack+0xbf/0x133 ? print_circular_bug+0xd6/0xe9 check_noncircular+0x1b9/0x1c3 __lock_acquire+0x118d/0x2714 lock_acquire+0x203/0x258 ? console_lock_spinning_enable+0x31/0x57 console_lock_spinning_enable+0x51/0x57 ? console_lock_spinning_enable+0x31/0x57 console_unlock+0x25d/0x528 ? console_trylock+0x18/0x4e vprintk_emit+0x111/0x17f ? lock_acquire+0x203/0x258 printk+0x59/0x73 __report_bad_irq+0xa3/0xba note_interrupt+0x19a/0x1d6 handle_irq_event_percpu+0x57/0x79 handle_irq_event+0x36/0x55 handle_fasteoi_irq+0xc2/0x18a do_IRQ+0xb3/0x157 common_interrupt+0xf/0xf Fixes: 768aec0b5bcc ("serial: 8250: fix shared interrupts issues with SMP and RT kernels") Reported-by: Guenter Roeck Reported-by: Raul Rangel Signed-off-by: Sergey Senozhatsky Tested-by: Guenter Roeck Reviewed-by: Andy Shevchenko Reviewed-by: Guenter Roeck Signed-off-by: Petr Mladek Link: https://lore.kernel.org/lkml/CAHQZ30BnfX+gxjPm1DUd5psOTqbyDh4EJE=2=VAMW_VDafctkA@mail.gmail.com/T/#u Link: https://lore.kernel.org/r/20200817022646.1484638-1-sergey.senozhatsky@gmail.com BugLink: https://bugs.chromium.org/p/chromium/issues/detail?id=1114800 commit 217b97f69e60e738c3d5f56453aef886da686457 Author: Alex Dewar Date: Tue Aug 18 14:49:18 2020 +0100 staging: emxx_udc: Use standard BIT() macro Currently emxx_udc.h defines bit values using local macros. Use the standard one instead. Also, combine bit values with bitwise-or rather than addition, as suggested by Coccinelle. Signed-off-by: Alex Dewar Link: https://lore.kernel.org/r/20200818134922.409195-1-alex.dewar90@gmail.com Signed-off-by: Greg Kroah-Hartman commit c9638363f02df48a8b215c6e4b056f7646ba403f Author: Colin Ian King Date: Thu Aug 6 11:47:01 2020 +0100 staging: wfx: fix a handful of spelling mistakes There are various spelling mistakes in comments and error messages. Fix these. Signed-off-by: Colin Ian King Acked-by: Randy Dunlap Reviewed-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200806104701.46123-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit afa096c6149fd95a4b2560f8668f8548d45f8fa4 Author: Michael Straube Date: Thu Aug 13 08:50:53 2020 +0200 staging: rtl8723bs: remove 5 GHz code According to the TODO 5 GHz code should be removed. - find and remove remaining code valid only for 5 GHz. Most of the obvious ones have been removed, but things like channel > 14 still exist. Remove code for channels > 14 from rtw_get_center_ch(). Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200813065053.13883-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit acac75bb451fd39344eb54fad6602dfc9482e970 Author: Christophe JAILLET Date: Thu Aug 13 19:34:58 2020 +0200 staging: rtl8192u: Do not use GFP_KERNEL in atomic context 'rtl8192_irq_rx_tasklet()' is a tasklet initialized in 'rtl8192_init_priv_task()'. >From this function it is possible to allocate some memory with the GFP_KERNEL flag, which is not allowed in the atomic context of a tasklet. Use GFP_ATOMIC instead. The call chain is: rtl8192_irq_rx_tasklet (in r8192U_core.c) --> rtl8192_rx_nomal (in r8192U_core.c) --> ieee80211_rx (in ieee80211/ieee80211_rx.c) --> RxReorderIndicatePacket (in ieee80211/ieee80211_rx.c) Fixes: 79a5ccd97209 ("staging: rtl8192u: fix large frame size compiler warning") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20200813173458.758284-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 4d7dc178ab19f2de50c2eb7c33e4e5d703cdb9e6 Author: Ivan Safonov Date: Sat Aug 15 23:33:07 2020 +0300 staging: r8188eu: remove unnecessary type cast of rtw_netdev_priv() result The type cast padapter = (struct adapter *)rtw_netdev_priv(dev); do nothing because type of rtw_netdev_priv() result is (struct adapter *). Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20200815203306.121039-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2147dd40dfd9800bc5d165a79a1b6d63f5697a1f Author: Asif Talybov Date: Sun Aug 16 10:31:09 2020 +0700 staging: greybus: Add identifier name to function definition argument WARNING: function definition argument 'struct gbphy_device *' should also have an identifier name + int (*probe)(struct gbphy_device *, WARNING: function definition argument 'struct gbphy_device *' should also have an identifier name + void (*remove)(struct gbphy_device *); Signed-off-by: Asif Talybov Link: https://lore.kernel.org/r/20200816033109.3930-1-talybov.asif@yandex.ru Signed-off-by: Greg Kroah-Hartman commit e30e954031957db76d598162a0f0cd4611a1bb96 Author: Lokesh Chebrolu Date: Fri Aug 7 12:50:06 2020 +0530 Staging: comedi: pcl726: fixed a spelling mistake Fixed a spelling mistake issue Signed-off-by: Lokesh Chebrolu Link: https://lore.kernel.org/r/1596784806-7130-1-git-send-email-lokeshch007@gmail.com Signed-off-by: Greg Kroah-Hartman commit 47ebe12f6786e6f946d8b73338adcbc65091bf87 Author: Igor Matheus Andrade Torrente Date: Sun Aug 2 23:20:22 2020 -0300 staging: wlan-ng: Remove repeated words in comments Remove duplicate words in comments at prism2mib and prism2sta files. Signed-off-by: Igor Matheus Andrade Torrente Link: https://lore.kernel.org/r/20200803022022.501-1-igormtorrente@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5ad1713888d7ff0daf3b584659e17ad3ebbf573a Author: Nícolas F. R. A. Prado Date: Sun Aug 2 22:36:30 2020 +0000 staging: most: dim2: Add missing identifier name to function argument A function definition argument should have an identifier name according to checkpatch: WARNING: function definition argument 'struct platform_device *' should also have an identifier name Name it pdev as that name is already used throughout the code. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20200802223615.924307-1-nfraprado@protonmail.com Signed-off-by: Greg Kroah-Hartman commit 53ed3266251656134127fce51e0b0cd296834fc7 Author: Mohammed Rushad Date: Mon Aug 3 00:39:24 2020 +0530 staging: rtl8723bs: os_dep: fix brace coding style issue in sdio_intf.c This is a patch to the sdio_intf.c file that fixes up an incorrectly placed brace found by the checkpatch.pl tool Signed-off-by: Mohammed Rushad Link: https://lore.kernel.org/r/20200802190924.19964-1-mohammedrushad@gmail.com Signed-off-by: Greg Kroah-Hartman commit d61c0848100cef564c6e6869f9220d78b780795c Author: Tomer Samara Date: Sun Aug 2 18:01:57 2020 +0300 staging: wfx: clear alignment style issues Clear checkpatch alignment style issues in debug.c. CHECK: Alignment should match open parenthesis Signed-off-by: Tomer Samara Link: https://lore.kernel.org/r/20200802150157.GA3052@tsnow Signed-off-by: Greg Kroah-Hartman commit 3996bf3abcb6bbb65a4ff869d4173712f0c572cd Author: Mohammed Rushad Date: Sun Aug 2 20:28:59 2020 +0530 Staging: rtl8192e: fix indent coding style issue in rtllib_tx.c This is a patch to the rtllib_tx.c file that fixes fixes an improper indent found by the checkpatch.pl tool Signed-off-by: Mohammed Rushad Link: https://lore.kernel.org/r/20200802145859.14143-1-mohammedrushad@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1808a4c7fcca3f835e099391bcb56f283c5b7874 Author: Ivan Safonov Date: Sun Aug 2 15:42:50 2020 +0300 staging: rtl8723bs: replace rtw_netdev_priv define with inline function The function guarantees type checking of arguments and return value. Result of rtw_netdev_priv macro can be assigned to pointer with incompatible type without warning. The function allow compiler to perform this check. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20200802124249.101341-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0f86cfff5405f9937a9d9544bac25f3b1d9b4f08 Author: Colin Ian King Date: Wed Aug 5 12:26:55 2020 +0100 staging: ion: fix spelling mistake in function name "detatch" -> "detach" There is a spelling mistake in the function name ion_dma_buf_detatch. Fix it by removing the extraneous t. Signed-off-by: Colin Ian King Acked-by: Hridya Valsaraju Link: https://lore.kernel.org/r/20200805112655.17696-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 9a538b83612c8b5848bf840c2ddcd86dda1c8c76 Author: Rajendra Nayak Date: Wed Jul 29 09:16:43 2020 +0200 media: venus: core: Add support for opp tables/perf voting Add support to add OPP tables and perf voting on the OPP powerdomain. This is needed so venus votes on the corresponding performance state for the OPP powerdomain along with setting the core clock rate. Signed-off-by: Rajendra Nayak Reviewed-by: Matthias Kaehlcke Reviewed-by: Bjorn Andersson Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 98cd831088c64aa8fe7e1d2a8bb94b6faba0462b Author: Rajendra Nayak Date: Wed Jul 29 09:16:42 2020 +0200 media: venus: core: Fix error handling in probe Post a successful pm_ops->core_get, an error in probe should exit by doing a pm_ops->core_put which seems to be missing. So fix it. Signed-off-by: Rajendra Nayak Reviewed-by: Bjorn Andersson Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit bbe516e976fce538db96bd2b7287df942faa14a3 Author: Dinghao Liu Date: Sun Jun 28 07:55:23 2020 +0200 media: venus: core: Fix runtime PM imbalance in venus_probe pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. For other error paths after this call, things are the same. Fix this by adding pm_runtime_put_noidle() after 'err_runtime_disable' label. But in this case, the error path after pm_runtime_put_sync() will decrease PM usage counter twice. Thus add an extra pm_runtime_get_noresume() in this path to balance PM counter. Signed-off-by: Dinghao Liu Signed-off-by: Mauro Carvalho Chehab commit 28f957951743627d026ddeedaaf03dce8b5cf5a3 Merge: 5ca8f9a539967 a08cd56a45245 Author: Mark Brown Date: Tue Aug 18 14:53:03 2020 +0100 Merge series "ASoC: qdsp6: add gapless compressed audio support" from Srinivas Kandagatla : This patchset adds gapless compressed audio support on q6asm. Gapless on q6asm is implemented using 2 streams in a single q6asm session. First few patches such as stream id per each command, gapless flags and silence meta data are for preparedness for adding gapless support. Last patch implements copy callback to allow finer control over buffer offsets, specially in partial drain cases. This patchset is tested on RB3 aka DB845c platform. This patchset as it is will support gapless however QDSP can also support switching decoders on a single stream. Patches to support such feature are send in different patchset which involves adding generic interfaces. Thanks, srini Changes since v2:(mostly suggested by Pierre) - removed unnessary kernel style comments, - moved TIMESTAMP flag to respective patch. - move preparatory code from gapless support patch to new one. - fix subject prefix of one patch. - add comments to clarify valid stream_ids Srinivas Kandagatla (10): ASoC: q6asm: rename misleading session id variable ASoC: q6asm: make commands specific to streams ASoC: q6asm: use flags directly from q6asm-dai ASoC: q6asm: add length to write command token ASoC: q6asm: add support to remove intial and trailing silence ASoC: q6asm: add support to gapless flag in q6asm open ASoC: q6asm-dai: add next track metadata support ASoC: q6asm-dai: prepare set params to accept profile change ASoC: q6asm-dai: add gapless support ASoC: q6asm-dai: add support to copy callback sound/soc/qcom/qdsp6/q6asm-dai.c | 414 +++++++++++++++++++++++-------- sound/soc/qcom/qdsp6/q6asm.c | 169 +++++++++---- sound/soc/qcom/qdsp6/q6asm.h | 49 ++-- 3 files changed, 469 insertions(+), 163 deletions(-) -- 2.21.0 commit 5cef0785362edf51f2a8cc30d5b8e9fa128d1a66 Author: Jacopo Mondi Date: Fri Jul 17 16:53:24 2020 +0200 media: rcar-csi2: Negotiate data lanes number Use the newly introduced get_mbus_config() subdevice pad operation to retrieve the remote subdevice MIPI CSI-2 bus configuration and configure the number of active data lanes accordingly. In order to be able to call the remote subdevice operation cache the index of the remote pad connected to the single CSI-2 input port. Reviewed-by: Niklas Söderlund Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5ca8f9a5399670ff9daa6c0282d215cc2ffcd6ff Merge: ba3e069fc12c4 8f0ccd59bcc93 Author: Mark Brown Date: Tue Aug 18 14:53:02 2020 +0100 Merge series "ASoC: Intel: fix cppcheck warnings" from Pierre-Louis Bossart : This patchset tries to reduce the number of warnings on those drivers, so that cppcheck can become a viable tool to detect issues (currently hundreds of reports). Most of the problems are related to unnecessary/redundant variable assignments, prototypes and one nice logical mistake resulting in an always-true condition. Pierre-Louis Bossart (21): ASoC: Intel: Atom: sst-atom-controls: remove redundant assignments ASoC: Intel: Atom: compress: remove redundant assignment ASoC: Intel: Atom: platform-pcm: remove redundant assignment ASoC: Intel: Atom: sst: remove useless NULL assignment ASoC: Intel: Atom: remove redundant initialization ASoC: Intel: Atom: sst_pvt: remove redundant initialization ASoC: Intel: Atom: platform-pcm: fix redundant return ASoC: Intel: Atom: remove useless assignment ASoC: Intel: Atom: sst_loader: remove always-true condition ASoC: Intel: Atom: sst_pvt: simplify return handling ASoC: Intel: Atom: (cosmetic) align parameters ASoC: Intel: Baytrail: (cosmetic) align function parameters ASoC: Intel: common: (cosmetic) align function parameters ASoC: Intel: haswell: (cosmetic) align function parameters ASoC: Intel: haswell-ipc: remove redundant assignments ASoC: Intel: Skylake: skl-nhlt: remove redundant initialization ASoC: Intel: Skylake: cldma: remove redundant initialization ASoC: Intel: Skylake: sst-utils: remove redundant assignment ASoC: Intel: Skylake: skl-topology: remove redundant assignments ASoC: Intel: Skylake: skl-topology: remove redundant assignment ASoC: Intel: Skylake: (cosmetic) align function parameters sound/soc/intel/atom/sst-atom-controls.c | 4 +-- .../intel/atom/sst-mfld-platform-compress.c | 3 +- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 4 +-- sound/soc/intel/atom/sst-mfld-platform.h | 4 +-- sound/soc/intel/atom/sst/sst.c | 5 ++- sound/soc/intel/atom/sst/sst.h | 34 +++++++++---------- sound/soc/intel/atom/sst/sst_loader.c | 3 +- sound/soc/intel/atom/sst/sst_pvt.c | 4 +-- sound/soc/intel/baytrail/sst-baytrail-ipc.h | 3 +- sound/soc/intel/common/sst-dsp-priv.h | 2 +- sound/soc/intel/common/sst-dsp.h | 15 ++++---- sound/soc/intel/haswell/sst-haswell-ipc.c | 4 +-- sound/soc/intel/haswell/sst-haswell-ipc.h | 2 +- sound/soc/intel/skylake/cnl-sst-dsp.h | 4 +-- sound/soc/intel/skylake/skl-nhlt.c | 2 +- sound/soc/intel/skylake/skl-sst-cldma.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.h | 16 ++++----- sound/soc/intel/skylake/skl-sst-utils.c | 2 +- sound/soc/intel/skylake/skl-topology.c | 8 ++--- sound/soc/intel/skylake/skl-topology.h | 8 ++--- sound/soc/intel/skylake/skl.h | 2 +- 21 files changed, 63 insertions(+), 68 deletions(-) -- 2.25.1 commit ba3e069fc12c4b4947f9e6eae425ed6fdf5fae82 Merge: bf66f140d61df 78013a1cf2971 Author: Mark Brown Date: Tue Aug 18 14:53:01 2020 +0100 Merge series "ASoC: da7219: Reorganise device/codec level probe/remove" from Adam Thomson : This patch set reorganises and fixes device and codec level probe/remove handling within the driver, to allow clean probe and remove at the codec level. This set relates to an issue raised by Yong Zhi where a codec level re-probe would fail due to clks still being registered from the previous instantiation. In addition some improvements around regulator handling and soft reset have also been included. Adam Thomson (3): ASoC: da7219: Move required devm_* allocations to device level code ASoC: da7219: Move soft reset handling to codec level probe ASoC: da7219: Fix clock handling around codec level probe sound/soc/codecs/da7219-aad.c | 85 +++++--- sound/soc/codecs/da7219-aad.h | 3 + sound/soc/codecs/da7219.c | 493 +++++++++++++++++++++++------------------- sound/soc/codecs/da7219.h | 1 + 4 files changed, 328 insertions(+), 254 deletions(-) -- 1.9.1 commit bf66f140d61df316a66ed694ff698979a658b699 Merge: cba62c8b49bea 9355a7b1896f6 Author: Mark Brown Date: Tue Aug 18 14:52:59 2020 +0100 Merge series "refine and clean code for synchronous mode" from Shengjiu Wang : refine and clean code for synchronous mode Shengjiu Wang (3): ASoC: fsl_sai: Refine enable/disable TE/RE sequence in trigger() ASoC: fsl_sai: Drop TMR/RMR settings for synchronous mode ASoC: fsl_sai: Replace synchronous check with fsl_sai_dir_is_synced changes in v3: - Add reviewed-by Nicolin - refine the commit log. - Add one more patch #3 changes in v2: - Split the commit - refine the sequence in trigger stop sound/soc/fsl/fsl_sai.c | 173 +++++++++++++++++++++++----------------- 1 file changed, 102 insertions(+), 71 deletions(-) -- 2.27.0 commit cba62c8b49bead23dfd8c6e5c594f4488e5d7376 Merge: 354caf5836b65 4b381d7e86fd0 Author: Mark Brown Date: Tue Aug 18 14:52:57 2020 +0100 Merge series "ASoC: qcom: Add support for SC7180 lpass variant" from Rohit kumar : This patch chain add audio support for SC7180 soc by doing the required modification in existing common lpass-cpu/lpass-platform driver. This also fixes some concurrency issue. This patch series is already tested by Srinivas on Dragon Board 410c. Changes since v5: - Fixed remove api in lpass-sc7180.c - Addressed comments by Rob in yaml Documentation. Ajit Pandey (4): ASoC: qcom: Add common array to initialize soc based core clocks ASoC: qcom: lpass-platform: Replace card->dev with component->dev include: dt-bindings: sound: Add sc7180-lpass bindings header ASoC: qcom: lpass-sc7180: Add platform driver for lpass audio Rohit kumar (8): ASoC: qcom: lpass-cpu: Move ahbix clk to platform specific function ASoC: qcom: lpass-platform: fix memory leak ASoC: qcom: lpass: Use regmap_field for i2sctl and dmactl registers ASoC: qcom: lpass-cpu: fix concurrency issue dt-bindings: sound: lpass-cpu: Add sc7180 lpass cpu node ASoC: qcom: lpass-cpu: Use platform_get_resource ASoC: qcom: lpass-platform: Use platform_get_irq dt-bindings: sound: lpass-cpu: Move to yaml format .../devicetree/bindings/sound/qcom,lpass-cpu.txt | 79 -------- .../devicetree/bindings/sound/qcom,lpass-cpu.yaml | 189 ++++++++++++++++++ include/dt-bindings/sound/sc7180-lpass.h | 10 + sound/soc/qcom/Kconfig | 5 + sound/soc/qcom/Makefile | 2 + sound/soc/qcom/lpass-apq8016.c | 86 ++++++-- sound/soc/qcom/lpass-cpu.c | 204 ++++++++++--------- sound/soc/qcom/lpass-ipq806x.c | 67 +++++++ sound/soc/qcom/lpass-lpaif-reg.h | 157 ++++++++------- sound/soc/qcom/lpass-platform.c | 155 +++++++++++---- sound/soc/qcom/lpass-sc7180.c | 216 +++++++++++++++++++++ sound/soc/qcom/lpass.h | 63 +++++- 12 files changed, 934 insertions(+), 299 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-cpu.yaml create mode 100644 include/dt-bindings/sound/sc7180-lpass.h create mode 100644 sound/soc/qcom/lpass-sc7180.c -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project. commit 354caf5836b65d880ad8c9dcfd95c3534867cc31 Merge: 4782e6cc29482 9d4befff5a959 Author: Mark Brown Date: Tue Aug 18 14:52:56 2020 +0100 Merge series "Codec workaround" from Michael Sit Wei Hong : This patch series enables some features on the tlv3204 codec and also fixes some issues faced while testing v2: Fixed the build error from snd_soc_component_read32 v1: initial ASoC: codec: tlv3204: Codec workaround series Michael Sit Wei Hong (3): ASoC: codec: tlv3204: Enable 24 bit audio support ASoC: codec: tlv3204: Increased maximum supported channels ASoC: codec: tlv3204: Moving GPIO reset and add ADC reset sound/soc/codecs/tlv320aic32x4.c | 60 +++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 16 deletions(-) -- 2.17.1 commit 4782e6cc29482a1d6688312a344d4772c336ba4d Merge: 163ae5d1e1029 7829e68d55692 Author: Mark Brown Date: Tue Aug 18 14:52:55 2020 +0100 Merge series "ASoC: sun50i-codec-analog: Cleanup and power management" from Samuel Holland : This series performs some minor cleanup on the driver for the analog codec in the Allwinner A64, and hooks up the existing mute switches to DAPM widgets, in order to provide improved power management. Changes since v1: - Collected Acked-by/Reviewed-by tags - Used SOC_MIXER_NAMED_CTL_ARRAY to avoid naming a widget "Earpiece" Samuel Holland (8): ASoC: sun50i-codec-analog: Fix duplicate use of ADC enable bits ASoC: sun50i-codec-analog: Gate the amplifier clock during suspend ASoC: sun50i-codec-analog: Group and sort mixer routes ASoC: sun50i-codec-analog: Make headphone routes stereo ASoC: sun50i-codec-analog: Enable DAPM for headphone switch ASoC: sun50i-codec-analog: Make line out routes stereo ASoC: sun50i-codec-analog: Enable DAPM for line out switch ASoC: sun50i-codec-analog: Enable DAPM for earpiece switch sound/soc/sunxi/sun50i-codec-analog.c | 176 ++++++++++++++++---------- 1 file changed, 111 insertions(+), 65 deletions(-) -- 2.26.2 commit 163ae5d1e102927af87e7456e3b5ac287b033a16 Merge: 2d32c6087d8e6 a106bb6eeaace Author: Mark Brown Date: Tue Aug 18 14:52:53 2020 +0100 Merge series "This patch series is to enable multiple features on the Keembay Platform" from Michael Sit Wei Hong : v2: Change channel-max device tree property to use new compatible string v1: Initial patch series Michael Sit Wei Hong (2): ASoC: Intel: KMB: Enable TDM audio capture dt-bindings: sound: intel,keembay-i2s: Add new compatible string .../bindings/sound/intel,keembay-i2s.yaml | 1 + sound/soc/intel/keembay/kmb_platform.c | 145 +++++++++++++----- 2 files changed, 109 insertions(+), 37 deletions(-) -- 2.17.1 commit 2d32c6087d8e61166fc0324f055605d449a353c7 Merge: fbe7a5dbd8319 7518805fb6363 Author: Mark Brown Date: Tue Aug 18 14:52:52 2020 +0100 Merge series "Allwinner A64 digital audio codec fixes" from Samuel Holland : This series fixes a couple of issues with the digital audio codec in the Allwinner A64 SoC: 1) Left/right channels were swapped when playing/recording audio 2) DAPM topology was wrong, breaking some kcontrols This is the minimum set of changes necessary to fix these issues in a backward-compatible way. For that reason, some DAPM widgets still have incorrect or confusing names; those and other issues will be fixed in later patch sets. Samuel Holland (7): ASoC: dt-bindings: Add a new compatible for the A64 codec ASoC: sun8i-codec: Fix DAPM to match the hardware topology ASoC: sun8i-codec: Add missing mixer routes ASoC: sun8i-codec: Add a quirk for LRCK inversion ARM: dts: sun8i: a33: Update codec widget names arm64: dts: allwinner: a64: Update codec widget names arm64: dts: allwinner: a64: Update the audio codec compatible .../sound/allwinner,sun8i-a33-codec.yaml | 6 +- arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 4 +- arch/arm/boot/dts/sun8i-a33.dtsi | 4 +- .../dts/allwinner/sun50i-a64-bananapi-m64.dts | 8 +- .../dts/allwinner/sun50i-a64-orangepi-win.dts | 8 +- .../boot/dts/allwinner/sun50i-a64-pine64.dts | 8 +- .../dts/allwinner/sun50i-a64-pinebook.dts | 8 +- .../dts/allwinner/sun50i-a64-pinephone.dtsi | 8 +- .../boot/dts/allwinner/sun50i-a64-pinetab.dts | 8 +- .../allwinner/sun50i-a64-sopine-baseboard.dts | 8 +- .../boot/dts/allwinner/sun50i-a64-teres-i.dts | 8 +- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 11 +- sound/soc/sunxi/sun8i-codec.c | 137 ++++++++++++++---- 13 files changed, 155 insertions(+), 71 deletions(-) -- 2.26.2 commit fbe7a5dbd8319626245c290b709246a6101128a5 Merge: 9af73c31f47b8 653bdab267bd8 Author: Mark Brown Date: Tue Aug 18 14:52:50 2020 +0100 Merge series "ASoC: rt5682: Use clk APIs better" from Stephen Boyd : This patch series drops a printk message down to dev_dbg() because it was noisy and then migrates this driver to use clk_hw based APIs instead of clk based APIs because this device is a clk provider, not a clk consumer. I've only lightly tested the last two patches but I don't have all combinations of clks for this device. Cc: Cheng-Yi Chiang Cc: Shuming Fan Stephen Boyd (3): ASoC: rt5682: Use dev_dbg() in rt5682_clk_check() ASoC: rt5682: Drop usage of __clk_get_name() ASoC: rt5682: Use clk_hw based APIs for registration sound/soc/codecs/rt5682.c | 73 ++++++++++++--------------------------- sound/soc/codecs/rt5682.h | 2 -- 2 files changed, 23 insertions(+), 52 deletions(-) Based on the last patch to this driver in linux-next. base-commit: 6301adf942a31bed65e026a554e5bd55d9e731e1 -- Sent by a computer, using git, on the internet commit 9af73c31f47b8614000aa35bb44d812ba2a7e8f0 Merge: da9afe50ae2aa 9c7deb0576d7f Author: Mark Brown Date: Tue Aug 18 14:52:49 2020 +0100 Merge series "ASoC: SOF/Intel: fix cppcheck warnings" from Pierre-Louis Bossart : A small set of fixes to reduce the number of warnings. Pierre-Louis Bossart (5): ASOC: SOF: Intel: hda-codec: move unused label to correct position ASoC: SOF: Intel: hda-codec: move variable used conditionally ASoC: Intel: rename shadowed variable for all broadwell boards ASoC: Intel: bytcht_cx2072x: simplify return handling ASoC: Intel: sof_sdw: clarify operator precedence sound/soc/intel/boards/bdw-rt5650.c | 10 +++++----- sound/soc/intel/boards/bdw-rt5677.c | 8 ++++---- sound/soc/intel/boards/broadwell.c | 8 ++++---- sound/soc/intel/boards/bytcht_cx2072x.c | 2 +- sound/soc/intel/boards/sof_sdw.c | 2 +- sound/soc/sof/intel/hda-codec.c | 7 ++++++- 6 files changed, 21 insertions(+), 16 deletions(-) -- 2.25.1 commit da9afe50ae2aac72d1b213d028d4e865c7ea9ba3 Author: Dan Murphy Date: Mon Aug 17 12:21:51 2020 -0500 dt-bindings: tas2562: Add device specification links Add device specification links for the TAS2562 and TAS2563. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200817172151.26564-2-dmurphy@ti.com Signed-off-by: Mark Brown commit b1e78c9fcca83d3666bc149ba8ecc1e472759359 Author: Dan Murphy Date: Mon Aug 17 12:21:50 2020 -0500 dt-bindings: tas2562: Remove tas2562 text file Remove the tas2562 text file as the tas2562.yaml is now available. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200817172151.26564-1-dmurphy@ti.com Signed-off-by: Mark Brown commit a8fd5ca8016948a611bff62b0990ade9e1f8e83c Author: Shengjiu Wang Date: Mon Aug 10 16:11:43 2020 +0800 ASoC: fsl-asoc-card: Get "extal" clock rate by clk_get_rate On some platform(.e.g. i.MX8QM MEK), the "extal" clock is different with the mclk of codec, then the clock rate is also different. So it is better to get clock rate of "extal" rate by clk_get_rate, don't reuse the clock rate of mclk. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1597047103-6863-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit db24fa5756e944a711a66692af7e25a2189bfe52 Author: Srinivas Kandagatla Date: Tue Aug 11 11:58:18 2020 +0100 ASoC: qcom: add a dedicated menuconfig Currently list of Qualcomm drivers is growing, so put them in to a proper menu so that it does not mix up with other ASOC configs in menuconfig. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200811105818.7890-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 89383a2707e54b39e01407fb611662d131551bb2 Author: Sebastian Krzyszkowiak Date: Sun Aug 16 03:23:34 2020 +0200 ASoC: wm8962: Export DAC/ADC monomix switches This allows solutions like ALSA UCM to utilize hardware mono downmix for cases where mono output to a single speaker is desired only in specific situations (like on a mobile phone). Signed-off-by: Sebastian Krzyszkowiak Acked-by: Charles Keepax Link: https://lore.kernel.org/r/3662154.EqNIRYjrc8@pliszka Signed-off-by: Mark Brown commit 466a806a7d2beffa6a79d61dbabac8a48685c3e2 Author: Colin Ian King Date: Mon Aug 17 23:47:06 2020 +0100 sound: remove duplicate "the the" phrase in Kconfig text There are a couple of occurrences of "the the" in the Kconfig text. Fix these. Signed-off-by: Colin Ian King Acked-by: Michal Simek Link: https://lore.kernel.org/r/20200817224706.6139-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 8932f0cb20e815478a5aaa6ff2850ff25f10a2fe Author: Randy Dunlap Date: Fri Aug 7 18:21:56 2020 -0700 ASoC: SOF: delete repeated words in comments Drop the repeated words {that, the} in comments. Signed-off-by: Randy Dunlap Acked-by: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Mark Brown Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/20200808012156.10827-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit 093513b8ed12d3f074c846cfae5ca4e34f3b37f4 Author: Pierre-Louis Bossart Date: Thu Aug 13 12:54:42 2020 -0500 ASoC: codecs: wm0010: use DECLARE_COMPLETION_ONSTACK() macro Follow recommendation in Documentation/scheduler/completion.rst and use macro to declare local 'struct completion' Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20200813175442.59067-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6bc37d32f630363b68059e3fa854383e6abf171e Author: Stephan Gerhold Date: Sat Aug 1 12:02:57 2020 +0200 ASoC: meson: Use snd_soc_of_parse_aux_devs() Use the new common snd_soc_of_parse_aux_devs() helper function to parse auxiliary devices from the device tree. The new helper is just a copy of meson_card_add_aux_devices() so there is no functional change. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200801100257.22658-3-stephan@gerhold.net Signed-off-by: Mark Brown commit d9ffff696c5b468ba5a4ddb2cbc05c9e4dd4b2d1 Author: Stephan Gerhold Date: Sat Aug 1 12:02:56 2020 +0200 ASoC: simple-card: Use snd_soc_of_parse_aux_devs() Use the new common snd_soc_of_parse_aux_devs() helper function to parse auxiliary devices from the device tree. The code is slightly different but the binding that is parsed is exactly the same. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200801100257.22658-2-stephan@gerhold.net Signed-off-by: Mark Brown commit 1ae0965dc21698ba41638c95b5478779f3c4a9e4 Author: Stephan Gerhold Date: Sat Aug 1 12:02:55 2020 +0200 ASoC: core: Add common helper to parse aux devs from device tree simple-card.c and meson-card-utils.c use pretty much the same helper function to parse auxiliary devices from the device tree. Make it easier for other drivers to parse these from the device tree as well by adding a shared helper function to soc-core.c. snd_soc_of_parse_aux_devs() is pretty much a copy of meson_card_add_aux_devices() from meson-card-utils.c with two minor changes: - Make property name configurable as parameter - Change dev_err() message slightly for consistency with other error messages in soc-core.c Signed-off-by: Stephan Gerhold Reviewed-by: Jerome Brunet Link: https://lore.kernel.org/r/20200801100257.22658-1-stephan@gerhold.net Signed-off-by: Mark Brown commit 7e3096e8f823682c20e033113ec32dd590364774 Author: Shengjiu Wang Date: Fri Aug 14 17:32:41 2020 +0800 ASoC: ak4458: Add regulator support "AVDD" is for analog power supply, "DVDD" is for digital power supply, they can improve the power management. As the regulator is enabled in pm runtime resume, which is behind the component driver probe, so accessing registers in component driver probe will fail. Fix this issue by enabling regcache_cache_only after pm_runtime_enable. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1597397561-2426-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 617a156f2ebae841bcd64ee5a21d0e12b5d733ab Author: Shengjiu Wang Date: Fri Aug 14 17:32:40 2020 +0800 ASoC: dt-bindings: ak4458: Add power supply property AVDD-supply is for Analog power supply DVDD-supply is for Digital power supply Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1597397561-2426-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 1f53bcb3fc952b55a0ad0e7f6eabfc93a170659d Author: Brent Lu Date: Tue Aug 18 08:44:13 2020 +0800 ASoC: hdac_hdmi: support 'ELD' mixer Add an binary mixer 'ELD' to each HDMI PCM device so user space could read the ELD data of external HDMI display. Signed-off-by: Brent Lu Link: https://lore.kernel.org/r/20200818004413.12852-1-brent.lu@intel.com Signed-off-by: Mark Brown commit a61b1b5d41735ba9ba8954471f21a65b9a8d07e9 Author: Jacopo Mondi Date: Fri Jul 17 16:53:23 2020 +0200 media: i2c: adv748x: Implement get_mbus_config Implement the newly introduced get_mbus_config operation to report the number of currently used data lanes on the MIPI CSI-2 interface. Reviewed-by: Kieran Bingham Reviewed-by: Niklas Söderlund Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ade5376dff579e759cd40cf7831306173bb875cf Author: Youling Tang Date: Thu Aug 13 14:12:37 2020 +0800 sound/soc/intel: Fix spelling mistake "cant" --> "can't" There is some spelling mistakes in a dev_err message. Fix it. Signed-off-by: Youling Tang Link: https://lore.kernel.org/r/1597299157-32221-1-git-send-email-tangyouling@loongson.cn Signed-off-by: Mark Brown commit 85131d9489a8b745d4cfa2b549371e97758008f1 Author: Randy Dunlap Date: Fri Aug 7 18:21:43 2020 -0700 ASoC: codecs: delete repeated words in comments Drop the repeated words {start, it, the} in comments. Signed-off-by: Randy Dunlap Cc: Liam Girdwood Cc: Mark Brown Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/20200808012143.10777-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit 0d8aa2ccb2f21c79bc9d4dceab0c6f99ff20bae1 Author: Randy Dunlap Date: Fri Aug 7 18:22:09 2020 -0700 ASoC: various vendors: delete repeated words in comments Drop the repeated words {related, we, is, the} in comments. Signed-off-by: Randy Dunlap Cc: Liam Girdwood Cc: Mark Brown Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/20200808012209.10880-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit 2232aeb1160bb45cd93d47faf02b083502b31532 Author: Richard Gong Date: Tue Aug 4 17:01:32 2020 -0500 arm64: dts: agilex: increase shared memory size to 32Mb Increase the shared memory size from 16Mb to 32Mb so that we can properly handle the image authorization for 12+ Mb RBF/JIC files. Signed-off-by: Richard Gong Signed-off-by: Dinh Nguyen commit 86109813990b5d6d6cfb8072382ee69d11ea9460 Author: Uros Bizjak Date: Tue Jul 7 19:47:22 2020 +0200 x86/cpu: Use XGETBV and XSETBV mnemonics in fpu/internal.h Current minimum required version of binutils is 2.23, which supports XGETBV and XSETBV instruction mnemonics. Replace the byte-wise specification of XGETBV and XSETBV with these proper mnemonics. Signed-off-by: Uros Bizjak Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200707174722.58651-1-ubizjak@gmail.com commit 147d5ea15ca20829db4d7956e353a78d320ed2f4 Author: Jacopo Mondi Date: Fri Jul 17 16:53:22 2020 +0200 media: i2c: adv748x: Adjust TXA data lanes number When outputting SD-Core output through the TXA MIPI CSI-2 interface, the number of enabled data lanes should be reduced in order to guarantee that the two video formats produced by the SD-Core (480i and 576i) generate a MIPI CSI-2 link clock frequency compatible with the MIPI D-PHY specifications. Limit the number of enabled data lanes to 2, which is guaranteed to support 480i and 576i formats. Cache the number of enabled data lanes to be able to report it through the new get_mbus_config operation. Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7bee4c30573d84c87ac457ae1dac0a8987ecfb0f Author: Jacopo Mondi Date: Fri Jul 17 16:53:21 2020 +0200 media: staging: media: imx: Update TODO entry Update the TODO entry that mentioned a potential use case for the now removed g_mbus_config video operation. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ddf5c927bd362b8b7c5e09e2e2271e4348e76b76 Author: Jacopo Mondi Date: Fri Jul 17 16:53:20 2020 +0200 media: v4l2- mediabus: Add usage note for V4L2_MBUS_* With the removal of the legacy g_mbus_config and s_mbus_config video operations, the sole users of V4L2_MBUS_* flags are now the newly introduced get_mbus_config and set_mbus_config pad operations. As the semantic of the new operations differs from the semantic of the legacy ones, add a usage note in the v4l2-mediabus.h header to specify how to use the flags. Also add a TODO note to record that we intend to replace the existing flags with fields, to prevent users from mixing conflicting values in a single operation call. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ff360d62d9fe02081431412e05950a23f71ec98a Author: Andy Shevchenko Date: Wed Jul 29 14:57:06 2020 +0300 pinctrl: intel: Extract intel_pinctrl_get_soc_data() helper for wider use intel_pinctrl_get_soc_data() helper can be used in few driver instead of open-coded variants. Thus, extract it as a standalone API. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit d9857a6d81d327f39ef7a1ead50ebab458dd5564 Author: Jacopo Mondi Date: Fri Jul 17 16:53:19 2020 +0200 media: v4l2-subdev: Remove [s|g]_mbus_config video ops With all sensor and platform drivers now converted to use the new get_mbus_config and set_mbus_config pad operations, remove the deprecated video operations g_mbus_config and s_mbus_config. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ebb965acddac401bab2743ac917f5097a56dd542 Author: Jacopo Mondi Date: Fri Jul 17 16:53:18 2020 +0200 media: pxa_camera: Use the new set_mbus_config op Move the PXA camera driver to use the new set_mbus_config pad operation. For this platform the change is not only cosmetic, as the pxa driver is currently the only driver in mainline to make use of the g_mbus_config and s_mbus_config video operations. The existing driver semantic is the following: - Collect all supported mbus config flags from the remote end - Match them with the supported PXA mbus configuration flags - If the remote subdevice allows multiple options for for VSYNC, HSYNC and PCLK polarity, use platform data requested settings The semantic of the new get_mbus_config and set_mbus_config differs from the corresponding video ops, particularly in the fact get_mbus_config reports the current mbus configuration and not the set of supported configuration options, with set_mbus_config always reporting the actual mbus configuration applied to the remote subdevice. Adapt the driver to perform the following - Set the remote subdevice mbus configuration according to the PXA platform data preferences. - If the applied configuration differs from the requested one (i.e. the remote subdevice does not allow changing one setting) make sure that - The remote end does not claim for DATA_ACTIVE_LOW, which seems not supported by the platform - The bus mastering roles match While at there remove a few checks performed on the media bus configuration at get_format() time as they do not belong there. Compile-tested only. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d162219c655c8cf8003128a13840d6c1e183fb80 Author: Tomas Winkler Date: Tue Aug 18 14:51:47 2020 +0300 mei: virtio: virtualization frontend driver This frontend driver implements MEI hw interface based on virtio framework to let MEI driver work without changes under virtualization. It requires a backend service in the ACRN device-model on the service OS side to make it work. The backend service will emulate mei routing and assign vtags for each mei vritio device. The backend service is available in ACRN device-model at github. For more information, please refer to https://projectacrn.org The ACRN virtio sub device id for MEI is is 0x8602. Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Wang Yu Signed-off-by: Liu Shuo Link: https://lore.kernel.org/r/20200818115147.2567012-14-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 2257b74ead05d4e72fd4842b0a82b3dbbf0887c5 Author: Tomas Winkler Date: Tue Aug 18 14:51:46 2020 +0300 mei: docs: add vtag ioctl documentation Add structured documenation for the new vtag ioctl Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200818115147.2567012-13-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit aa207a05f95abc3530b7415232f0f73278336bd3 Author: Alexander Usyskin Date: Tue Aug 18 14:51:45 2020 +0300 mei: add connect with vtag ioctl This IOCTL is used to associate the current file descriptor with a FW Client (given by UUID), and virtual tag (vtag). The IOCTL opens a communication channel between a host client and a FW client on a tagged channel. From this point on, every reader and write will communicate with the associated FW client on the tagged channel. Upon close() the communication is terminated. The IOCTL argument is a struct with a union that contains the input parameter and the output parameter for this IOCTL. The input parameter is UUID of the FW Client, a vtag [0,255] The output parameter is the properties of the FW client Clients that do not support tagged connection will respond with -EOPNOTSUPP Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200818115147.2567012-12-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 224ae607526b4a389ae469207530fcdc9abaa7b9 Author: Alexander Usyskin Date: Tue Aug 18 14:51:44 2020 +0300 mei: bus: unconditionally enable clients with vtag support The list of clients is only visible via mei client bus. Enabling vtag clients on the mei client bus allows user-space to enumerate clients with vtag support by traversing the mei bus on sysfs. This feature is required for ACRN device model service. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200818115147.2567012-11-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit e5617d2bf5492aea96cb99cc772aded46804add3 Author: Alexander Usyskin Date: Tue Aug 18 14:51:43 2020 +0300 mei: bus: use zero vtag for bus clients. The zero vtag is required for the read flow to work also for devices on the mei client bus. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200818115147.2567012-10-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 15ffa991d9cb4bd1e9cdc9caf25201c6627b5432 Author: Alexander Usyskin Date: Tue Aug 18 14:51:42 2020 +0300 mei: handle tx queue flushing for vtag connections Since multiple file pointers (fp) can be associated with a single host client, upon close() only objects associated with the fp has to flushed from the tx queues. The control queues should be flushed only when all the connections are closed and the client is disconnected. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200818115147.2567012-9-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit f35fe5f47ed0ea532a81603cac13a259d056c077 Author: Alexander Usyskin Date: Tue Aug 18 14:51:41 2020 +0300 mei: add a vtag map for each client Vtag map is a list of tuples of vtag and file pointer (struct mei_cl_vtag) associated with a particular me host client. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200818115147.2567012-8-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit d1376f3d89d5177dae7cae40f3f9fdf73e9bfec9 Author: Alexander Usyskin Date: Tue Aug 18 14:51:40 2020 +0300 mei: add a spin lock to protect rd_completed queue In order to support vtags we need to access read completed queue out of driver big lock. Add a spin lock to protect rd_completed queue. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200818115147.2567012-7-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 74a9c967aaf6cd1314ef371678f889ad9fcedb2c Author: Alexander Usyskin Date: Tue Aug 18 14:51:39 2020 +0300 mei: bump hbm version to 2.2 Bump HBM version to 2.2 to indicate vtag support. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200818115147.2567012-6-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 0cd7c01a60f850987e727b8f08683ace9546eac0 Author: Tomas Winkler Date: Tue Aug 18 14:51:38 2020 +0300 mei: add support for mei extended header. Add an extend header beyond existing 4 bytes of the mei message header. The extension is of variable length, starting with meta header that contains the number of headers and the overall size of the extended headers excluding meta header itself followed by TLV list of extended headers. Currently only supported extension is the vtag. From the HW perspective the extended headers is already part of the payload. Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Link: https://lore.kernel.org/r/20200818115147.2567012-5-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 2dd1e5ae8c96f1262ce81d0e77225281ae55eb3d Author: Alexander Usyskin Date: Tue Aug 18 14:51:37 2020 +0300 mei: add vtag support bit in client properties Vtag support is on a client basis, meaning not every client supports it. The vtag capability is communicated via the client properties structure during client enumeration process. Export the propertiy via sysfs. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200818115147.2567012-4-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit beb4e1e50311eeb65009cded71c02f3826fa314f Author: Alexander Usyskin Date: Tue Aug 18 14:51:36 2020 +0300 mei: restrict vtag support to hbm version 2.2 The vtag allows partitioning the mei messages into virtual groups/channels. Vtags are supported for firmwares with HBM version 2.2 and newer and only when a firmware confirms the support via capability handshake. This change only define vtag restrictions in order to make the series bisectable. Everything will be enabled when driver HBM version is set to 2.2. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200818115147.2567012-3-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit e5cab1f974f2bfc286ad17d7839a569c79bb7c70 Author: Alexander Usyskin Date: Tue Aug 18 14:51:35 2020 +0300 mei: hbm: add capabilities message The new capabilities command in HBM version 2.2 allows performing capabilities handshake between the firmware and the host driver. The driver requests a capability by setting the appropriate bit in 24bit wide bitmask and the fw responses with the bit set providing the requested capability is supported. Bump copyright year in affected files. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200818115147.2567012-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 2d26e440984c39eb414581d693532010a3856664 Author: Jacopo Mondi Date: Tue Jul 21 09:53:17 2020 +0200 media: i2c: ov6650: Use new [get|set]_mbus_config ops Use the new get_mbus_config and set_mbus_config pad operations in place of the video operations currently in use. Compared to other drivers where the same conversion has been performed, ov6650 proved to be a bit more tricky, as the existing g_mbus_config implementation did not report the currently applied configuration but the set of all possible configuration options. Adapt the driver to support the semantic of the two newly introduced operations: - get_mbus_config reports the current media bus configuration - set_mbus_config applies only changes explicitly requested and updates the provided cfg parameter to report what has actually been applied to the hardware. Compile-tested only. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a4423cedc56fd16405240243bdfe6d02823cb26a Author: Jean Delvare Date: Fri Aug 7 15:00:05 2020 +0200 eeprom: at24: Add support for the Sony VAIO EEPROMs Special handling of the Sony VAIO EEPROMs is the last feature of the legacy eeprom driver that the at24 driver does not support. Adding this would let us deprecate and eventually remove the legacy eeprom driver. So add the option to specify a post-processing callback function that is called after reading data from the EEPROM, before it is returned to the user. The 24c02-vaio type is the first use case of that option: the callback function will mask the sensitive data for non-root users exactly as the legacy eeprom driver was doing. Signed-off-by: Jean Delvare Cc: Bartosz Golaszewski Cc: Arnd Bergmann Cc: Greg Kroah-Hartman [Bartosz: removed a stray newline] Signed-off-by: Bartosz Golaszewski commit 0c3da525b43d00a00ca945c58d0d64107685cd39 Author: Jacopo Mondi Date: Fri Jul 17 16:53:16 2020 +0200 media: i2c: Use the new get_mbus_config pad op Move the existing users of the g_mbus_config video operation to use the newly introduced get_mbus_config pad operations. All the ported drivers report a static media bus configuration and do no support s_mbus_config so the operation implementation has not changed. Bridge drivers needs to call the new pad operation and will receive an -ENOICTLCMD when calling the old g_mbus_config video operation Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 38df0b8506130c9d94178b2e7d48a21b26e8903b Author: Jacopo Mondi Date: Fri Jul 17 16:53:15 2020 +0200 media: v4l2-subdev: Introduce [get|set]_mbus_config pad ops Introduce two new pad operations to allow retrieving and configuring the media bus parameters on a subdevice pad. The newly introduced operations aims to replace the s/g_mbus_config video operations, which have been on their way for deprecation since a long time. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d3d1bbe794ab4f7cce13e8ba08a2ac978133375e Author: Thomas Zimmermann Date: Fri Aug 7 13:10:22 2020 +0200 drm/malidp: Use struct drm_gem_object_funcs.get_sg_table internally The malidp driver uses GEM object functions for callbacks. Fix it to use them internally as well. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Fixes: ecdd6474644f ("drm/malidp: Use GEM CMA object functions") Cc: Thomas Zimmermann Cc: Emil Velikov Cc: Liviu Dudau Cc: Brian Starkey Link: https://patchwork.freedesktop.org/patch/msgid/20200807111022.12117-1-tzimmermann@suse.de commit eb77802e0daa2f01a8c13a2fc495bc2d54e62a64 Merge: 094dd0d730628 0b294aebb6a00 Author: Kalle Valo Date: Tue Aug 18 16:17:20 2020 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.10. Major changes: ath11k * add support for QCA6390 PCI devices wcn36xx * add support for TX ack ath9k * add support for NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 to improve PTK0 rekeying commit 465ddff7e4867fcb65e27fa7ff4d0bb0999e4500 Author: Andy Shevchenko Date: Tue Aug 4 16:48:07 2020 +0300 serial: sa1100: use platform_get_resource() Use platform_get_resource() to fetch the memory resource instead of open-coded variant. While here, fail the probe if no resource found or no port is added. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200804134807.11589-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 094dd0d730628448a80c7f5ba33038ecdddf5092 Author: Tom Rix Date: Tue Aug 11 07:02:19 2020 -0700 rndis_wlan: tighten check of rndis_query_oid return clang static analysis reports this problem rndis_wlan.c:3147:25: warning: Assigned value is garbage or undefined wiphy->max_num_pmkids = le32_to_cpu(caps.num_pmkids); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The setting of caps happens here, with a call to rndis_query_oid() retval = rndis_query_oid(usbdev, if (retval >= 0) { Reviewing rndis_query_oid() shows that on success 0 is returned, failure is otherwise. So the retval check is not tight enough. So tighten the retval check. Similar problem in rndis_wlan_get_caps(). Signed-off-by: Tom Rix Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200811140219.8412-1-trix@redhat.com commit d2ab7f00f4321370a8ee14e5630d4349fdacc42e Author: Christophe JAILLET Date: Sun Aug 9 11:29:06 2020 +0200 mwifiex: Do not use GFP_KERNEL in atomic context A possible call chain is as follow: mwifiex_sdio_interrupt (sdio.c) --> mwifiex_main_process (main.c) --> mwifiex_process_cmdresp (cmdevt.c) --> mwifiex_process_sta_cmdresp (sta_cmdresp.c) --> mwifiex_ret_802_11_scan (scan.c) --> mwifiex_parse_single_response_buf (scan.c) 'mwifiex_sdio_interrupt()' is an interrupt function. Also note that 'mwifiex_ret_802_11_scan()' already uses GFP_ATOMIC. So use GFP_ATOMIC instead of GFP_KERNEL when memory is allocated in 'mwifiex_parse_single_response_buf()'. Fixes: 7c6fa2a843c5 ("mwifiex: use cfg80211 dynamic scan table and cfg80211_get_bss API") or Fixes: 601216e12c65e ("mwifiex: process RX packets in SDIO IRQ thread directly") Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200809092906.744621-1-christophe.jaillet@wanadoo.fr commit 2c762ee51008f14c642f50631a5485d33293ba40 Author: Christophe JAILLET Date: Thu Aug 6 23:04:31 2020 +0200 adm8211: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'adm8211_alloc_rings()', GFP_KERNEL can be used because it is called only from the probe function and no lock is acquired. Moreover, GFP_KERNEL is already used just a few lines above in a kmalloc. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200806210431.736050-1-christophe.jaillet@wanadoo.fr commit 86c96422a3b3c11220f40662c0c5aca94d2ad2ce Author: Colin Ian King Date: Thu Aug 6 13:08:03 2020 +0100 rtw88: fix spelling mistake: "unsupport" -> "unsupported" There are some spelling mistakes in rtw_info messages. Fix these. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200806120803.60113-1-colin.king@canonical.com commit db8655c6299c2afb7e438e2b7aff2192ad00ee9a Author: Colin Ian King Date: Thu Aug 6 12:33:26 2020 +0100 wl1251, wlcore: fix spelling mistake "buld" -> "build" There are spelling mistakes in warning messages. Fix these. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200806113326.53779-1-colin.king@canonical.com commit 9c9f015bc9f8839831c7ba0a6d731a3853c464e2 Author: Tom Rix Date: Sun Aug 2 09:18:04 2020 -0700 brcmfmac: check ndev pointer Clang static analysis reports this error brcmfmac/core.c:490:4: warning: Dereference of null pointer (*ifp)->ndev->stats.rx_errors++; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In this block of code if (ret || !(*ifp) || !(*ifp)->ndev) { if (ret != -ENODATA && *ifp) (*ifp)->ndev->stats.rx_errors++; brcmu_pkt_buf_free_skb(skb); return -ENODATA; } (*ifp)->ndev being NULL is caught as an error But then it is used to report the error. So add a check before using it. Fixes: 91b632803ee4 ("brcmfmac: Use net_device_stats from struct net_device") Signed-off-by: Tom Rix Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200802161804.6126-1-trix@redhat.com commit 838933ca5b9cb5af7f17c41524d927b7a580b0e0 Author: Andy Shevchenko Date: Thu Jul 30 18:53:27 2020 +0300 brcmfmac: use %*ph to print small buffer Use %*ph format to print small buffer as hex string. Signed-off-by: Andy Shevchenko Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200730155327.40130-1-andriy.shevchenko@linux.intel.com commit 6c151410d5b57e6bb0d91a735ac511459539a7bf Author: Wang Yufen Date: Mon Jul 20 17:36:05 2020 +0800 brcm80211: fix possible memleak in brcmf_proto_msgbuf_attach When brcmf_proto_msgbuf_attach fail and msgbuf->txflow_wq != NULL, we should destroy the workqueue. Reported-by: Hulk Robot Signed-off-by: Wang Yufen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1595237765-66238-1-git-send-email-wangyufen@huawei.com commit d85ddd1318e66c0c2665dbfcbc21a8b66c9152aa Merge: 652bcaec7da0f 9123e3a74ec7b Author: Maxime Ripard Date: Tue Aug 18 14:14:25 2020 +0200 Merge v5.9-rc1 into drm-misc-next Sam needs 5.9-rc1 to have dev_err_probe in to merge some patches. Signed-off-by: Maxime Ripard commit 359164fa730c45641ec597f48ab33c03d955e824 Author: Andy Shevchenko Date: Wed Jul 29 15:02:30 2020 +0300 pinctrl: cherryview: Utilize temporary variable to hold device pointer By one of the previous clean up change we got a temporary variable to hold a device pointer. It can be utilized in other calls in the ->probe() and save a bit of LOCs. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 3ea2e2cabd2dc749d866887a8eaab9fd9536ca0b Author: Andy Shevchenko Date: Mon Jul 27 19:12:16 2020 +0300 pinctrl: cherryview: Switch to use struct intel_pinctrl Now when all preparations are done we may easily switch to use struct intel_pinctrl instead of custom one. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 8a82857077804b03be3a64fc5204ebc49a53dd95 Author: Andy Shevchenko Date: Mon Jul 27 19:12:15 2020 +0300 pinctrl: cherryview: Move custom community members to separate data struct This is a preparatory patch for bigger clean up pending for Cherryview driver. There is no functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 0e2d769d4b4eb8eb012c430be34b6ca06daf9e1d Author: Andy Shevchenko Date: Mon Jul 27 19:12:14 2020 +0300 pinctrl: cherryview: Drop stale comment There is no more .groups member in struct chv_pinctrl, drop associated comment because it's not applicable anymore. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 145f5646be67eb5613d9606c5cb5139bb00df8b9 Author: Jiri Slaby Date: Tue Aug 18 10:56:55 2020 +0200 tty: serial, fix kernel-doc As in the previous patches, fix kernel-doc in serial drivers. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085655.12071-8-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 87d03a940be5e6da7b8c6c618d0c51800d4a161b Author: Jiri Slaby Date: Tue Aug 18 10:56:54 2020 +0200 tty: synclink, fix kernel-doc As in the previous patches, fix kernel-doc in synclink drivers. This is done separately from others, as kernel-doc comments were heavily broken in these drivers. Convert them to proper ones. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085655.12071-7-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit ea239f1e32af046f826d816b75599b7608eaa542 Author: Jiri Slaby Date: Tue Aug 18 10:56:53 2020 +0200 tty: vt, fix kernel-doc As in the previous patches, fix kernel-doc in vt. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085655.12071-6-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 724ac070ffc7a1e7526be4408edbd324a4163e15 Author: Jiri Slaby Date: Tue Aug 18 10:56:52 2020 +0200 tty: ldiscs, fix kernel-doc As in the previous patch, fix kernel-doc in line disciplines. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085655.12071-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit fa44195455c42de656bf5040a80d482526f45c8e Author: Jiri Slaby Date: Tue Aug 18 10:56:51 2020 +0200 tty: fix kernel-doc With W=1, the kernel-doc checker complains quite a lot in the tty layer. Over the time, many documented parameters were renamed, removed or switched from tty to tty_port and similar. Some were mistyped in the doc too. So fix all these in the tty core. (But do not add the missing ones which the checker complains about too. Not now.) The rest in the tty layer will follow in the next patches. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085655.12071-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 9b07655c7740a97b918ebe7dc59447e29e22a957 Author: Jiri Slaby Date: Tue Aug 18 10:56:50 2020 +0200 newport_con: make module's init & exit static using module_driver The compiler complains that newport_console_init and newport_console_exit are not declared: drivers/video/console/newport_con.c:745:12: warning: no previous prototype for 'newport_console_init' drivers/video/console/newport_con.c:750:13: warning: no previous prototype for 'newport_console_exit' Here, it translates into: they should be marked static. Do so by converting the simple un/registration to module_driver(). Signed-off-by: Jiri Slaby Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-mips@vger.kernel.org Link: https://lore.kernel.org/r/20200818085655.12071-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit e18d918bd2ccd725ac574f7d126ed0856fe794e3 Author: Jiri Slaby Date: Tue Aug 18 10:56:49 2020 +0200 newport_con: fix no return statement in newport_show_logo When CONFIG_LOGO_SGI_CLUT224 is unset, newport_show_logo contains no return, despite it should return a pointer. Add one returning NULL to fix a compiler warning: drivers/video/console/newport_con.c: In function 'newport_show_logo': drivers/video/console/newport_con.c:132:1: warning: no return statement in function returning non-void Note that the caller expects NULL from the function already. Signed-off-by: Jiri Slaby Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-mips@vger.kernel.org Link: https://lore.kernel.org/r/20200818085655.12071-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a579767c1f4e3270818504843a86ba3277127152 Author: Jiri Slaby Date: Tue Aug 18 10:56:48 2020 +0200 tty: n_gsm, eliminate indirection for gsm->{output,error}() gsm->output and ->error are set only to gsmld_output and gsm_error, respectively. Call these functions directly and remove error and output function pointers from struct gsm_mux completely. Note: we need a forward declaration of gsmld_output now. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085655.12071-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a89313825b0657273e1938aea7f13afe9abb44e8 Author: Jiri Slaby Date: Tue Aug 18 10:57:06 2020 +0200 vc_screen: prune macros Do not undefine random words. I guess this was here as there were macros with such generic names somewhere. I very doubt they still exist. So drop these. And remove a spare blank line. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-16-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit b1c32fcfadf5593ab7a63261cc8a5747c36e627e Author: Jiri Slaby Date: Tue Aug 18 10:57:05 2020 +0200 vc_screen: extract vcs_read_buf_header The attribute header handling is terrible in vcs_read_buf. Separate it to a new function and simply do memmove (of up to 4 bytes) to the start of the con_buf -- if user seeked. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-15-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 6a6b76cc44c98a39d3e718aa2056e2e12b609615 Author: Jiri Slaby Date: Tue Aug 18 10:57:04 2020 +0200 vc_screen: extract vcs_read_buf And finally, move the attributes buffer handling to a separate function. Leaving vcs_read quite compact. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-14-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 5a52baaab029e38e919efff2abc0d4e89338d464 Author: Jiri Slaby Date: Tue Aug 18 10:57:03 2020 +0200 vc_screen: extract vcs_read_buf_noattr Now, move the code for no-attributes handling to a separate function. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-13-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 0f66eee346c1672bdb538031a5fe03ea1e0c626f Author: Jiri Slaby Date: Tue Aug 18 10:57:02 2020 +0200 vc_screen: extract vcs_read_buf_uni The same as making write more readable, extract unicode handling from vcs_read. The other two cases (w/ and w/o attributes) will follow. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-12-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 6d507c75e0cd359e4cede48230fb7e7a45c9bb74 Author: Jiri Slaby Date: Tue Aug 18 10:57:01 2020 +0200 vs_screen: kill tmp_count from vcs_read Both tmp_count computations and the single use can be eliminated using min(). Do so. Side note: we need HEADER_SIZE to be unsigned for min() not to complain. Fix that too as all its other uses do not mind. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-11-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 36c39220129e4048b6810dc732b49b4f23f2dcee Author: Jiri Slaby Date: Tue Aug 18 10:57:00 2020 +0200 vc_screen: sanitize types in vcs_read * pos is derived from the passed ppos, so make it long enough, i.e. loff_t * attr and uni_mode are booleans, so... * size is limited by vcs_size() which returns an int * read, p, orig_count and this_round are always ">= 0" and "< size", so uint is enough * row, col, and max_col are derived from vc->vc_cols (uint) and p, so make them uint too * tmp_count is derived from this_round, so make it an uint too. * use u16 * for org (instead of unsigned short *). No need to initialize org too. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-10-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit d7c91c50815beebe14905292404b048a26147c07 Author: Jiri Slaby Date: Tue Aug 18 10:56:59 2020 +0200 vc_screen: eliminate ifdefs from vcs_write_buf Introduce a new inline function called vc_compile_le16 and do the shifts and ORs there. Depending on LE x BE. I tried cpu_to_le16, but it ends up with worse assembly on BE for whatever reason -- the compiler seems to be unable to optimize the swap. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-9-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 95e0d57fd49780db89193bc2df67b9eec640c4be Author: Jiri Slaby Date: Tue Aug 18 10:56:58 2020 +0200 vc_screen: extract vcs_write_buf This is the counterpart of the previous patch: here, we extract buffer writing with attributes from vcs_write. Now, there is no need for org to be initialized to NULL. The org0 check before update_region() confuses compilers, so check org instead. It provides the same semantics. And it also eliminates the need for initialization of org0. We switch the branches of the attr 'if' too, as the inversion brings only confusion now. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-8-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 9e6363784e3f1e90416b81c0d0cd16f6bfb304af Author: Jiri Slaby Date: Tue Aug 18 10:56:57 2020 +0200 vc_screen: extract vcs_write_buf_noattr vcs_write is too long to be readable. Extract buffer handling w/o attributes from there to a separate function. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-7-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 2665bef49f96df1a541b4e71e7b27bf631f7667c Author: Jiri Slaby Date: Tue Aug 18 10:56:56 2020 +0200 vc_screen: sanitize types in vcs_write * ret can carry error codes, so make it signed, i.e. ssize_t * pos is derived from the passed ppos, so make it long enough, i.e. loff_t * attr is a boolean, so... * size is limited by vcs_size() which returns an int * written, p, orig_count and this_round are always ">= 0" and "< size", so uint is enough * col and max_col are derived from vc->vc_cols (uint) and p, so make them uint too * place con_buf0 and con_buf declaration to a single line Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-6-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 71d4abfab322e827a75304431fe0fad3c805cb80 Author: Jiri Slaby Date: Tue Aug 18 10:56:55 2020 +0200 vc_screen: rewrite vcs_size to accept vc, not inode It is weird to fetch the information from the inode over and over. Read and write already have the needed information, so rewrite vcs_size to accept a vc, attr and unicode and adapt vcs_lseek to that. Also make sure all sites check the return value of vcs_size for errors. And document it using kernel-doc. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 7d62549a22ee500ea2ad764b9d04b87c6bbcd75f Author: Jiri Slaby Date: Tue Aug 18 10:56:54 2020 +0200 vc_screen: document and cleanup vcs_vc Document parameters of vcs_vc and make viewed a bool. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit b8209f694f7f4256181deea92d30eedb908d6788 Author: Jiri Slaby Date: Tue Aug 18 10:56:53 2020 +0200 vc: propagate "viewed as bool" from screenpos up viewed is used as a flag, i.e. bool. So treat is as such in most of the places. vcs_vc is handled in the next patch. Note: the last parameter of invert_screen was misnamed in the declaration since 1.1.92. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a5c6bd806dd626103db38dee77796fe758c8df94 Author: Jiri Slaby Date: Tue Aug 18 10:56:52 2020 +0200 vt: declare xy for get/putconsxy properly That is: 1) call the parameter 'xy' to denote what it really is, not generic 'p' 2) tell the compiler and users that we expect an array: * with at least 2 chars (static 2) * which we don't modify in putconsxy (const) Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit d73568c4ccb01d01e20cd23fefbff8e4a05ddfac Author: Jiri Slaby Date: Tue Aug 18 10:56:51 2020 +0200 vt: make vc_data pointers const in selection.h There are many functions declared in selection.h which only read from struct vc_data passed as a parameter. Make all those uses const to hint the compiler a bit. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200818085706.12163-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 2b2dd9c6ac41cc975fedc82fc871cbff1fb7f711 Author: Allen Pais Date: Mon Aug 17 14:29:21 2020 +0530 tty: timbuart: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200817085921.26033-5-allen.cryptic@gmail.com Signed-off-by: Greg Kroah-Hartman commit d77e24f21df1da4ddd7a6fb185105c4ad3d86a86 Author: Allen Pais Date: Mon Aug 17 14:29:20 2020 +0530 tty: ifx6x60: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200817085921.26033-4-allen.cryptic@gmail.com Signed-off-by: Greg Kroah-Hartman commit 41e85e44edea0ba1a1601ed2a099d236c7f738bf Author: Allen Pais Date: Mon Aug 17 14:29:19 2020 +0530 tty: atmel_serial: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200817085921.26033-3-allen.cryptic@gmail.com Signed-off-by: Greg Kroah-Hartman commit a42a9f6a9bbc0d3894fc8ceaa714f5c5d9f4d96b Author: Allen Pais Date: Mon Aug 17 14:29:18 2020 +0530 tty: ipwireless: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200817085921.26033-2-allen.cryptic@gmail.com Signed-off-by: Greg Kroah-Hartman commit 28157b8c7d9a9c92d1da31af486fe4ad39862edd Author: Bastien Nocera Date: Tue Aug 18 13:04:44 2020 +0200 USB: Better name for __check_usb_generic() __check_usb_generic() doesn't explain very well what the function actually does: It checks to see whether the driver is non-generic and matches the device. Change it to check_for_non_generic_match() Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20200818110445.509668-2-hadess@hadess.net Signed-off-by: Greg Kroah-Hartman commit 83dea128567250ee8dee6a5f1f9913f617bfc153 Author: Allen Pais Date: Mon Aug 17 14:45:57 2020 +0530 char: ipmi: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Message-Id: <20200817091617.28119-3-allen.cryptic@gmail.com> Signed-off-by: Corey Minyard commit f48cc509c9352125d4d44172493c5f708ccf0291 Author: Nicolas Saenz Julienne Date: Mon Jun 29 18:18:45 2020 +0200 Revert "PCI: brcmstb: Wait for Raspberry Pi's firmware when present" This reverts commit 44331189f9082c7e659697bbac1747db3def73e7. Now that the VL805 init routine is run through a reset controller driver the device dependencies are being taken care of by the device core. No need to do it manually here. Reviewed-by: Florian Fainelli Acked-by: Lorenzo Pieralisi Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629161845.6021-10-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 6b26057aab76b73c5b6a2d44a15b910845bd08cd Author: Nicolas Saenz Julienne Date: Mon Jun 29 18:18:44 2020 +0200 Revert "firmware: raspberrypi: Introduce vl805 init routine" This reverts commit fbbc5ff3f7f9f4cad562e530ae2cf5d8964fe6d3. The vl805 init routine has moved into drivers/reset/reset-raspberrypi.c Reviewed-by: Florian Fainelli Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629161845.6021-9-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 56132c8db84aa45f0766d82488790c6b28a7748c Author: Nicolas Saenz Julienne Date: Mon Jun 29 18:18:43 2020 +0200 usb: host: pci-quirks: Bypass xHCI quirks for Raspberry Pi 4 The board doesn't need the quirks to be run, and takes care of its own initialization through a reset controller device. So let's bypass them. Reviewed-by: Florian Fainelli Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629161845.6021-8-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 83a06a102d709ffe69600310807880d72e3a99a9 Author: Nicolas Saenz Julienne Date: Mon Jun 29 18:18:42 2020 +0200 Revert "USB: pci-quirks: Add Raspberry Pi 4 quirk" This reverts commit c65822fef4adc0ba40c37a47337376ce75f7a7bc. The initialization of Raspberry Pi 4's USB chip is now handled through a reset controller. No need to directly call the firmware routine through a PCI quirk. Reviewed-by: Florian Fainelli Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629161845.6021-7-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 768430e470e20559b7bbef5379b9ab435b4762c8 Author: Nicolas Saenz Julienne Date: Mon Jun 29 18:18:41 2020 +0200 usb: xhci-pci: Add support for reset controllers Some atypical users of xhci-pci might need to manually reset their xHCI controller before starting the HCD setup. Check if a reset controller device is available to the PCI bus and trigger a reset. Reviewed-by: Philipp Zabel Reviewed-by: Florian Fainelli Acked-by: Mathias Nyman Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629161845.6021-6-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 258f92d2f840b6ea62c0b33f04eb4d9270935bba Author: Nicolas Saenz Julienne Date: Mon Jun 29 18:18:40 2020 +0200 ARM: dts: bcm2711: Add reset controller to xHCI node The chip is hardwired to the board's PCIe bus and needs to be properly setup trough a firmware routine after a PCI fundamental reset. Pass the reset controller phandle that takes care of triggering the initialization to the relevant PCI device. Reviewed-by: Florian Fainelli Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629161845.6021-5-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit b03300db06bed1997a1eecc4c26f3a2895c57726 Author: Nicolas Saenz Julienne Date: Mon Jun 29 18:18:39 2020 +0200 ARM: dts: bcm2711: Add firmware usb reset node Now that the reset driver exposing Raspberry Pi 4's firmware based USB reset routine is available, let's add the device tree node exposing it. Reviewed-by: Florian Fainelli Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629161845.6021-4-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit abffc82aae8745810fce5b51d9787d82d381068b Author: Nicolas Saenz Julienne Date: Mon Jun 29 18:18:38 2020 +0200 reset: Add Raspberry Pi 4 firmware reset controller Raspberry Pi 4's co-processor controls some of the board's HW initialization process, but it's up to Linux to trigger it when relevant. Introduce a reset controller capable of interfacing with RPi4's co-processor that models these firmware initialization routines as reset lines. Reviewed-by: Florian Fainelli Reviewed-by: Philipp Zabel Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629161845.6021-3-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 242841992ae6f22bd761add2f380b2ef3271ba9a Author: Nicolas Saenz Julienne Date: Mon Jun 29 18:18:37 2020 +0200 dt-bindings: reset: Add a binding for the RPi Firmware reset controller The firmware running on the RPi VideoCore can be used to reset and initialize HW controlled by the firmware. Reviewed-by: Florian Fainelli Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629161845.6021-2-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit d7b74e0d099506bbcf6db02b898a3ba46c61e857 Author: Allen Pais Date: Mon Aug 17 14:32:09 2020 +0530 usb: mos7720: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200817090209.26351-8-allen.cryptic@gmail.com Signed-off-by: Greg Kroah-Hartman commit 81d324cd9f2ee9edf1c59637b58162a39b203d80 Author: Allen Pais Date: Mon Aug 17 14:32:08 2020 +0530 usb: xhci: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200817090209.26351-7-allen.cryptic@gmail.com Signed-off-by: Greg Kroah-Hartman commit f7aa93862308740ce49c6b8aa27a8f2784f990a3 Author: Allen Pais Date: Mon Aug 17 14:32:07 2020 +0530 usb/gadget: fsl_qe_udc: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200817090209.26351-6-allen.cryptic@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6148c10f6b62a6df782d26522921f70cc8bf1d7f Author: Allen Pais Date: Mon Aug 17 14:32:06 2020 +0530 usb/gadget: f_midi: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200817090209.26351-5-allen.cryptic@gmail.com Signed-off-by: Greg Kroah-Hartman commit e71ea55a5b6f9162746d6720c07190b0c92e8f9c Author: Allen Pais Date: Mon Aug 17 14:32:05 2020 +0530 usb: hcd: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200817090209.26351-4-allen.cryptic@gmail.com Signed-off-by: Greg Kroah-Hartman commit 073438b2a554514390d5eedef41828fac6668f3a Author: Allen Pais Date: Mon Aug 17 14:32:04 2020 +0530 usb: c67x00: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200817090209.26351-3-allen.cryptic@gmail.com Signed-off-by: Greg Kroah-Hartman commit c05c932a451bfb7cb39e731dcc98ecb13f420217 Author: Allen Pais Date: Mon Aug 17 14:32:03 2020 +0530 usb: atm: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200817090209.26351-2-allen.cryptic@gmail.com Signed-off-by: Greg Kroah-Hartman commit fbc299437c06648afcc7891e6e2e6638dd48d4df Author: Eli Billauer Date: Fri Jul 31 08:46:50 2020 +0300 usb: core: Solve race condition in anchor cleanup functions usb_kill_anchored_urbs() is commonly used to cancel all URBs on an anchor just before releasing resources which the URBs rely on. By doing so, users of this function rely on that no completer callbacks will take place from any URB on the anchor after it returns. However if this function is called in parallel with __usb_hcd_giveback_urb processing a URB on the anchor, the latter may call the completer callback after usb_kill_anchored_urbs() returns. This can lead to a kernel panic due to use after release of memory in interrupt context. The race condition is that __usb_hcd_giveback_urb() first unanchors the URB and then makes the completer callback. Such URB is hence invisible to usb_kill_anchored_urbs(), allowing it to return before the completer has been called, since the anchor's urb_list is empty. Even worse, if the racing completer callback resubmits the URB, it may remain in the system long after usb_kill_anchored_urbs() returns. Hence list_empty(&anchor->urb_list), which is used in the existing while-loop, doesn't reliably ensure that all URBs of the anchor are gone. A similar problem exists with usb_poison_anchored_urbs() and usb_scuttle_anchored_urbs(). This patch adds an external do-while loop, which ensures that all URBs are indeed handled before these three functions return. This change has no effect at all unless the race condition occurs, in which case the loop will busy-wait until the racing completer callback has finished. This is a rare condition, so the CPU waste of this spinning is negligible. The additional do-while loop relies on usb_anchor_check_wakeup(), which returns true iff the anchor list is empty, and there is no __usb_hcd_giveback_urb() in the system that is in the middle of the unanchor-before-complete phase. The @suspend_wakeups member of struct usb_anchor is used for this purpose, which was introduced to solve another problem which the same race condition causes, in commit 6ec4147e7bdb ("usb-anchor: Delay usb_wait_anchor_empty_timeout wake up till completion is done"). The surely_empty variable is necessary, because usb_anchor_check_wakeup() must be called with the lock held to prevent races. However the spinlock must be released and reacquired if the outer loop spins with an empty URB list while waiting for the unanchor-before-complete passage to finish: The completer callback may very well attempt to take the very same lock. To summarize, using usb_anchor_check_wakeup() means that the patched functions can return only when the anchor's list is empty, and there is no invisible URB being processed. Since the inner while loop finishes on the empty list condition, the new do-while loop will terminate as well, except for when the said race condition occurs. Signed-off-by: Eli Billauer Acked-by: Oliver Neukum Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200731054650.30644-1-eli.billauer@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8f0ccd59bcc9305241507cb48c6aaa08a9f375c8 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:47 2020 -0500 ASoC: Intel: Skylake: (cosmetic) align function parameters Fix cppcheck warnings and align headers with code. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-22-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 11a790f94b340c3deb893c6229c3948233a91a4a Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:46 2020 -0500 ASoC: Intel: Skylake: skl-topology: remove redundant assignment Fix cppcheck warning: sound/soc/intel/skylake/skl-topology.c:2879:29: style: Variable 'block_size' is assigned a value that is never used. [unreadVariable] Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 25722cf606f6c58b1f2f709434aeb418c4b0b1ca Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:45 2020 -0500 ASoC: Intel: Skylake: skl-topology: remove redundant assignments Cppcheck complains about possible NULL pointer dereferences but the assignments are actually not needed before walking through lists. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-20-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c6193988e945b658bffd09174edae1b43b8ab0b6 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:44 2020 -0500 ASoC: Intel: Skylake: sst-utils: remove redundant assignment Fix cppcheck warning: sound/soc/intel/skylake/skl-sst-utils.c:240:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 3b4d60f0f7dd13594916bcd6644ea6208597d993 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:43 2020 -0500 ASoC: Intel: Skylake: cldma: remove redundant initialization Fix cppcheck warning: sound/soc/intel/skylake/skl-sst-cldma.c:248:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8be54edba9096056ff5d0fb2a29d0b3b962fa60c Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:42 2020 -0500 ASoC: Intel: Skylake: skl-nhlt: remove redundant initialization Fix cppcheck warning: sound/soc/intel/skylake/skl-nhlt.c:203:21: style: Variable 'rate' is assigned a value that is never used. [unreadVariable] unsigned long rate = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 523615b716005b189f5a6cd9f7a255a902e45bce Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:41 2020 -0500 ASoC: Intel: haswell-ipc: remove redundant assignments Fix cppcheck warnings: sound/soc/intel/haswell/sst-haswell-ipc.c:430:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] sound/soc/intel/haswell/sst-haswell-ipc.c:1792:8: style: Variable 'id' is assigned a value that is never used. [unreadVariable] Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c9b1f82d53930762094af0381c5dc7a8a2b6a86d Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:40 2020 -0500 ASoC: Intel: haswell: (cosmetic) align function parameters Fix cppcheck warning: sound/soc/intel/haswell/sst-haswell-ipc.c:963:8: style:inconclusive: Function 'sst_hsw_stream_new' argument 3 names different: declaration 'get_write_position' definition 'notify_position'. [funcArgNamesDifferent] Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2b84a26f99762774b98fdb1e66be7400c0d22199 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:39 2020 -0500 ASoC: Intel: common: (cosmetic) align function parameters Fix cppcheck style warnings, align headers and code and remove useless prototypes. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0af1fcea054497ba784fc2d9b0125c4c2f6609e3 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:38 2020 -0500 ASoC: Intel: Baytrail: (cosmetic) align function parameters Fix cppcheck warning: sound/soc/intel/baytrail/sst-baytrail-ipc.c:339:8: style:inconclusive: Function 'sst_byt_stream_new' argument 3 names different: declaration 'get_write_position' definition 'notify_position'. [funcArgNamesDifferent] Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit cfe8cc9419918bc56f528fa370aa8435d99b8353 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:37 2020 -0500 ASoC: Intel: Atom: (cosmetic) align parameters Fix cppcheck warnings and use same function parameters in headers and C code. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7b99434c2c35e6045cc65992e3aaf231012e93ef Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:36 2020 -0500 ASoC: Intel: Atom: sst_pvt: simplify return handling Fix cppcheck warning: sound/soc/intel/atom/sst/sst_pvt.c:201:9: warning: Identical condition and return expression 'retval', return value is always 0 [identicalConditionAfterEarlyExit] return retval; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b66a056e1539d8470013fff00f476377a616baa3 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:35 2020 -0500 ASoC: Intel: Atom: sst_loader: remove always-true condition Fix cppcheck warning: sound/soc/intel/atom/sst/sst_loader.c:401:43: style: Redundant condition: If 'EXPR == 4', the comparison 'EXPR != 3' is always true. [redundantCondition] if (sst_drv_ctx->sst_state != SST_RESET || ^ In this case, if sst_state == SST_SHUTDOWN then the first test is already true. 2014 bug, yay. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit eeb460f21250d46e5fa8e8429c38de47fe912481 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:34 2020 -0500 ASoC: Intel: Atom: remove useless assignment Fix cppcheck warning: sound/soc/intel/atom/sst/sst.c:52:20: style: Variable 'size' is assigned a value that is never used. [unreadVariable] unsigned int size = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5ab56a224398a05ade1762d591321f238c284b19 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:33 2020 -0500 ASoC: Intel: Atom: platform-pcm: fix redundant return Fix cppcheck warning return ret_val; ^ sound/soc/intel/atom/sst-mfld-platform-pcm.c:384:6: note: If condition 'ret_val' is true, the function will return/exit if (ret_val) ^ sound/soc/intel/atom/sst-mfld-platform-pcm.c:387:9: note: Returning identical expression 'ret_val' return ret_val; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f3352e6b7c27078d9342c9faa8332b8113719f4b Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:32 2020 -0500 ASoC: Intel: Atom: sst_pvt: remove redundant initialization Fix cppcheck warning: sound/soc/intel/atom/sst/sst_pvt.c:201:9: warning: Identical condition and return expression 'retval', return value is always 0 [identicalConditionAfterEarlyExit] return retval; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 30701e0f3b1a134cbd000ca607a26342a10f6383 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:31 2020 -0500 ASoC: Intel: Atom: remove redundant initialization Fix cppcheck warnings: sound/soc/intel/atom/sst/sst.c:427:13: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int i, ret = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4e3aab3217cdd1506ff89642e554995cbfa0806a Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:30 2020 -0500 ASoC: Intel: Atom: sst: remove useless NULL assignment Fix cppcheck warnings: sound/soc/intel/atom/sst/sst.c:373:2: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] ctx = NULL; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b0754c55adf9a2aeb3c3732eb159615e91c70397 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:29 2020 -0500 ASoC: Intel: Atom: platform-pcm: remove redundant assignment fix cppcheck warning: sound/soc/intel/atom/sst-mfld-platform-pcm.c:387:9: warning: Identical condition and return expression 'ret_val', return value is always 0 [identicalConditionAfterEarlyExit] return ret_val; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b0a2a93dc3acb4c2868c60ef0d3278289a532816 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:28 2020 -0500 ASoC: Intel: Atom: compress: remove redundant assignment Fix cppcheck warning: sound/soc/intel/atom/sst-mfld-platform-compress.c:46:14: style: Variable 'ret_val' is assigned a value that is never used. [unreadVariable] int ret_val = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c6a6586126d3f8010a181c01d4dd6aa90a953b66 Author: Pierre-Louis Bossart Date: Thu Aug 13 15:01:27 2020 -0500 ASoC: Intel: Atom: sst-atom-controls: remove redundant assignments cppcheck complains of a possible NULL pointer dereference but setting a pointer before using list_for_each_entry() is not useful. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813200147.61990-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f06c206aadda5cb60d6c911d7ea5f15396b2008d Author: Thierry Reding Date: Thu Aug 6 18:02:48 2020 +0200 usb: common: usb-conn-gpio: Print error on failure to get VBUS The exact error that happened trying to get the VBUS supply can be useful to troubleshoot what's going on. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20200806160248.3936771-2-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4ddf1ac79e5f082451cd549283d2eb7559ab6ca9 Author: Thierry Reding Date: Thu Aug 6 18:02:47 2020 +0200 usb: common: usb-conn-gpio: Make VBUS supply optional If the connector is the child of a USB port and that USB port already has a VBUS supply attached to it, it would be redundant to require the connector to have a VBUS supply. In this case, allow the VBUS supply to be optional. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20200806160248.3936771-1-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4d671957d45346decb1a9d488921cf90c19e0d0f Author: Xu Wang Date: Mon Aug 10 02:08:02 2020 +0000 USB: yurex: remove needless check before usb_free_coherent() usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20200810020802.9082-1-vulab@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 1100395dc47cb78cab519f33a6a28cd3f1773ea4 Author: Colin Ian King Date: Mon Aug 10 09:32:11 2020 +0100 USB: storage: isd200: fix spelling mistake "removeable" -> "removable" There is a spelling mistake in a usb_stor_dbg debug message. Fix it. Signed-off-by: Colin Ian King Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200810083211.48282-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit e286148ddd32e2de49ed2e8cf66f5da130d39d33 Author: JC Kuo Date: Tue Aug 11 17:35:31 2020 +0800 usb: host: xhci-tegra: remove a duplicated entry Remove a duplicated register "IPFS_XUSB_HOST_MSI_BAR_SZ_0" from tegra124_xusb_context_ipfs[] array. Signed-off-by: JC Kuo Link: https://lore.kernel.org/r/20200811093531.720503-1-jckuo@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 6e18cfca678ded520f5d99bde41076b2828463f3 Author: Frank Wunderlich Date: Sat Aug 8 14:49:06 2020 +0200 usb: xhci-mtk: Fix typo fix this small typo u3_ports_disabed => u3_ports_disabled Fixes: 55ba6e9e25a6 (usb: xhci-mtk: support option to disable usb3 ports) Signed-off-by: Frank Wunderlich Reviewed-by: Chunfeng Yun Link: https://lore.kernel.org/r/20200808124906.89976-1-linux@fw-web.de Signed-off-by: Greg Kroah-Hartman commit 5963296b821f0f3697f7da8fc1b700623a11ba9c Author: YueHaibing Date: Fri Jul 31 16:20:08 2020 +0800 usb: mtu3: Remove unsused inline function is_first_entry It is never used, so can be removed. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200731082008.33016-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 0b294aebb6a00b61eddbc30aa9ba34a0a1caeb7d Author: Gustavo A. R. Silva Date: Mon Jul 27 14:44:15 2020 -0500 ath11k: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200727194415.GA1275@embeddedor commit 28f1632118818d9dccabf4c0fccfe49686742317 Author: Wang Yufen Date: Mon Jul 20 17:36:44 2020 +0800 ath11k: Fix possible memleak in ath11k_qmi_init_service When qmi_add_lookup fail, we should destroy the workqueue Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Reported-by: Hulk Robot Signed-off-by: Wang Yufen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1595237804-66297-1-git-send-email-wangyufen@huawei.com commit 99f41b8e43b8b4b31262adb8ac3e69088fff1289 Author: Sathishkumar Muruganandam Date: Fri Aug 14 13:46:11 2020 +0530 ath10k: fix VHT NSS calculation when STBC is enabled When STBC is enabled, NSTS_SU value need to be accounted for VHT NSS calculation for SU case. Without this fix, 1SS + STBC enabled case was reported wrongly as 2SS in radiotap header on monitor mode capture. Tested-on: QCA9984 10.4-3.10-00047 Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597392971-3897-1-git-send-email-murugana@codeaurora.org commit caf275463d37e1359d1767d774052cbca60a4854 Author: Rakesh Pillai Date: Fri Jun 26 23:23:01 2020 +0530 ath10k: Register shutdown handler As a part of device shutdown the smmu driver will be stopped and henceforth any IOVA address translation will not be done. The wlan driver, being one of the smmu driver consumer, should stop all the dma related activity as a part of shutdown, and thereby ensuring that no dma activity is done once the smmu driver shuts down. During the device shutdown, the smmu calls shutdown for all its consumers in order to indicate them to stop all their dma activities. Register the shutdown handler to stop the wlan driver and avoid any dma operations. Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1593193981-30161-1-git-send-email-pillair@codeaurora.org commit f3c603d412b3434dec15821f13fa4a1d0dd1cc84 Author: Carl Huang Date: Mon Aug 17 13:31:55 2020 +0300 ath11k: reset MHI during power down and power up For QCA6390, normal power up and power down can't bring MHI to a workable state. This happens especially in warm reboot and rmmod and insmod. Host needs to write a few registers to bring MHI to normal state. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597555891-26112-10-git-send-email-kvalo@codeaurora.org commit 065f5f683ea6abbc83cbf03b8789b452ab29d14f Author: Carl Huang Date: Mon Aug 17 13:31:55 2020 +0300 ath11k: use TCL_DATA_RING_0 for QCA6390 For QCA6390, wbm2sw1 is used for other purpose rather than tx completion ring. So use TCL_DATA_RING 0 only for QCA6390. Add MISC_CAPS_TCL_0_ONLY to control it. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597555891-26112-9-git-send-email-kvalo@codeaurora.org commit 454a97217283df762650d4b4e61b64a9d8dfeddf Author: Carl Huang Date: Mon Aug 17 13:31:54 2020 +0300 ath11k: process both lmac rings for QCA6390 For QCA6390, the num_radios is 1 but it needs to process 2 lmac rings. So use NUM_RXDMA_PER_PDEV to do another loop. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597555891-26112-8-git-send-email-kvalo@codeaurora.org commit a6275302c3704a126c1b309888520fb05c94a563 Author: Carl Huang Date: Mon Aug 17 13:31:54 2020 +0300 ath11k: assign correct search flag and type for QCA6390 QCA6390 doesn't enable V2 map and ummap event, so the addr search flags and type is different from IPQ8074. Assign correct search flags and type for QCA6390. Without this change, ping sometimes fails. With this change, now ping is always successful. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597555891-26112-7-git-send-email-kvalo@codeaurora.org commit e7495035286aae68e5cc67f842c3e8bcc4483352 Author: Carl Huang Date: Mon Aug 17 13:31:53 2020 +0300 ath11k: delay vdev_start for QCA6390 For QCA6390 firmware, bss peer must be created before vdev_start, so delay vdev_start until bss peer is created. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597555891-26112-6-git-send-email-kvalo@codeaurora.org commit 84eee3c845d377cbe1cae722e8f83344107d709f Author: Carl Huang Date: Mon Aug 17 13:31:53 2020 +0300 ath11k: refine the phy_id check in ath11k_reg_chan_list_event For QCA6390, it processes the reg chan list event only for phy0, and it goes to fallback if the phy_id is not valid. For a valid phy_id but not 0, just discard the event. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597555891-26112-5-git-send-email-kvalo@codeaurora.org commit 4152e4206cc5a9dcfd575fc8342e04faa2d9ec53 Author: Carl Huang Date: Mon Aug 17 13:31:53 2020 +0300 ath11k: setup QCA6390 rings for both rxdmas For QCA6390, only one pdev is created and this pdev manages both lmacs, thus both rxdmas. So host needs to initialize all rxdma related rings for one pdev. Another difference is for QCA6390, host fills rxbuf to firmware and firmware further fills the rxbuf to rxbuf ring for each rxdma. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597555891-26112-4-git-send-email-kvalo@codeaurora.org commit 7f6fc1ebf5b19850e6035de16032f7d81dee65d8 Author: Carl Huang Date: Mon Aug 17 13:31:52 2020 +0300 ath11k: don't initialize rxdma1 related ring For QCA6390, it has 2 lmacs and thus 2 rxdmas. However, each rxdma has rxdma0 only, and doesn't have rxdma1. So for QCA6390, don't initialize rxdma1 related rings such as rx_mon_buf_ring, rx_mon_dst_ring and rx_mon_desc_ring. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597555891-26112-3-git-send-email-kvalo@codeaurora.org commit d4ecb90b3857db23c83b2578f1fa0341c5e00b82 Author: Carl Huang Date: Mon Aug 17 13:31:52 2020 +0300 ath11k: enable DP interrupt setup for QCA6390 QCA6390 uses MSI interrupt, so need to configure msi_add and msi_data to dp srngs. As there are so many DP srngs, so need to group them. Each group shares one MSI interrupt. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597555891-26112-2-git-send-email-kvalo@codeaurora.org commit 13ecd81fbad66126700b82f29f8259d338f9bc2a Author: Carl Huang Date: Mon Aug 17 13:31:52 2020 +0300 ath11k: dp: redefine peer_map and peer_unmap For QCA6390, it uses peer_map and peer_unmap V1. IPQ8074 uses V2. Redefine previous definition to peer_map2 and peer_unmap2. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597576599-8857-13-git-send-email-kvalo@codeaurora.org commit ed0192f7942e4be9f520022278036d0d08b6a856 Author: Carl Huang Date: Mon Aug 17 13:31:51 2020 +0300 ath11k: wmi: put hardware to DBS mode For QCA6390, host puts hardware to Dual Band Simultaneous (DBS) mode by default so both 2G and 5G bands can be used. Otherwise only the 5G band can be used. QCA6390 doesn't provide band_to_mac configuration and firmware will do the band_to_mac map. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597576599-8857-12-git-send-email-kvalo@codeaurora.org commit 2d4bcbed5b7d53e19fc158885e7340b464b64507 Author: Carl Huang Date: Mon Aug 17 13:31:51 2020 +0300 ath11k: initialize wmi config based on hw_params QCA6390 has very different wmi config parameters compared to IPQ8074, so use different function to initialize wmi init config parameters. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597576599-8857-11-git-send-email-kvalo@codeaurora.org commit 5f859bc02c7bc7a4094bfba0b4ed145edd7661f2 Author: Carl Huang Date: Mon Aug 17 13:31:50 2020 +0300 ath11k: force single pdev only for QCA6390 For QCA6390, only one pdev is created and only one HW is registered to mac80211. This one pdev manages both 2G radio and 5G radio. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597576599-8857-10-git-send-email-kvalo@codeaurora.org commit e5c860e121c2e415354d7ae0626f04cbef966851 Author: Carl Huang Date: Mon Aug 17 13:31:50 2020 +0300 ath11k: disable CE interrupt before hif start Disable CE interrupt otherwise interrupt may come before host initialized related context. This also fixes unbalanced interrupt enablement. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597576599-8857-9-git-send-email-kvalo@codeaurora.org commit 1a05ed37c513f63c8a56698df3f5fb54c682af12 Author: Carl Huang Date: Mon Aug 17 13:31:50 2020 +0300 ath11k: ce: get msi_addr and msi_data before srng setup Move function to get msi_addr and msi_data before srng setup, otherwise srng is setup with no MSI configuration. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597576599-8857-8-git-send-email-kvalo@codeaurora.org commit 7cea7c5b0e7b3012c0e4e340292f7624b1dad402 Author: Carl Huang Date: Mon Aug 17 13:31:49 2020 +0300 ath11k: hal: assign msi_addr and msi_data to srng QCA6390 uses MSI interrupt so it needs msi_addr and msi_data to generate interrupt. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597576599-8857-7-git-send-email-kvalo@codeaurora.org commit d9d4b5f354883375b8e35caa172af6c223f4a0c1 Author: Kalle Valo Date: Mon Aug 17 13:31:48 2020 +0300 ath11k: ce: remove CE_COUNT() macro This macro is evil as it's accesses ab variable in a hidden way. It's better for readibility to access ab->hw_params.ce_count directly. This is done in a separate patch to keep the patches simple. No functional changes. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597576599-8857-6-git-send-email-kvalo@codeaurora.org commit 6e5e9f59dc5b49bad3af283c165beb8321e2a89b Author: Kalle Valo Date: Mon Aug 17 13:31:47 2020 +0300 ath11k: ce: remove host_ce_config_wlan macro This macro is evil as it's accesses ab variable in a hidden way. It's better for readibility to access ab->hw_params.host_ce_config directly. This is done in a separate patch to keep the patches simple. No functional changes. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597576599-8857-5-git-send-email-kvalo@codeaurora.org commit e3396b8bddd2ea822f9390f1ba49c22d769a7534 Author: Carl Huang Date: Mon Aug 17 13:31:47 2020 +0300 ath11k: ce: support different CE configurations QCA6390 uses only 9 Copy Engines while IPQ8074 may use 12, make it possible to change CE configuration dynamically via hw_params. The defines for host_ce_config_wlan and CE_COUNT are temporary solutions, they will be removed in the following patches to keep things simple. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597576599-8857-4-git-send-email-kvalo@codeaurora.org commit 2b5e665bedf7a9ce64abf4cb55d2f1df4bb8d4f6 Author: Kalle Valo Date: Mon Aug 17 13:31:47 2020 +0300 ath11k: hal: cleanup dynamic register macros Now some of the HAL register macros access ab variable in a hidden way, make ab variable visible in the macro by adding it as an argument. This is done in a separate patch to keep the patches simple. No functional changes. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597576599-8857-3-git-send-email-kvalo@codeaurora.org commit 6976433c4778027e7afa55edb7fed4dc74849530 Author: Carl Huang Date: Mon Aug 17 13:31:46 2020 +0300 ath11k: hal: create register values dynamically QCA6390 has different register offset compared to IPQ8074, so need to attach the register offset dynamically based on hw_params. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597576599-8857-2-git-send-email-kvalo@codeaurora.org commit ad0dc0426468852a97067980879ca035fe138a6d Author: Kalle Valo Date: Mon Aug 17 13:31:40 2020 +0300 ath10k: move enable_pll_clk call to ath10k_core_start() There's no reason to have call for enable_pll_clk in ath10k_bmi_start(), move it to ath10k_core_start() instead. This way it's possible to call ath10k_bmi_start() from sdio.c during firmware dump creation. And also the function call is more visible when it's in core.c. No functional changes, compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597421745-4329-1-git-send-email-kvalo@codeaurora.org commit 652bcaec7da0f06f00be578c200e1c57099449d2 Author: Tian Tao Date: Tue Aug 11 16:23:06 2020 +0800 MAINTAINERS: Change maintainer for hisilicon DRM driver Remove Rongrong Zou and change tiantao as hisilicon DRM maintainer. Signed-off-by: Tian Tao Acked-by: Thomas Zimmermann Acked-by: xinliang.liu Link: https://patchwork.freedesktop.org/patch/msgid/1597134186-58423-1-git-send-email-tiantao6@hisilicon.com commit a371b1bdf2b85840de7e3267eaedef9a585541c0 Author: Samuel Holland Date: Sat Aug 8 21:18:22 2020 -0500 arm64: dts: allwinner: Mark timer as stopped in suspend When possible, system firmware on 64-bit Allwinner platforms disables OSC24M during system suspend. Since this oscillator is the clock source for the ARM architectural timer, this causes the timer to stop counting. Therefore, the ARM architectural timer must not be marked as NONSTOP on these platforms, or the time will be wrong after system resume. Adding the arm,no-tick-in-suspend property forces the kernel to ignore the ARM architectural timer when calculating sleeptime; it falls back to reading the RTC. Note that this only affects deep suspend, not s2idle. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200809021822.5285-1-samuel@sholland.org commit 7db1aa6ff9811b4ba24814d8eb40b21555ca0492 Author: Alexander Kochetkov Date: Mon Aug 3 17:30:22 2020 +0300 arm64: dts: allwinner: replace numerical constant with CCU_CLKX Signed-off-by: Alexander Kochetkov Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200803143022.25909-1-al.kochet@gmail.com commit f13478c9da834f2d092192c0097587bd07ab8928 Author: Rikard Falkeborn Date: Tue Aug 4 23:53:37 2020 +0200 drm/sun4i: Constify static structs A number of static variables are not modified and can be made const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200804215337.54594-1-rikard.falkeborn@gmail.com commit c84adb304c100cb9555f64f49c1d84a01fac3616 Author: David Stevens Date: Tue Aug 18 16:13:43 2020 +0900 drm/virtio: Support virtgpu exported resources Add support for UUID-based resource sharing mechanism to virtgpu. This implements the new virtgpu commands and hooks them up to dma-buf's get_uuid callback. Signed-off-by: David Stevens Acked-by: Michael S. Tsirkin Link: http://patchwork.freedesktop.org/patch/msgid/20200818071343.3461203-4-stevensd@chromium.org Signed-off-by: Gerd Hoffmann commit 592d9fba33c275b72cb4dae99c187444daafcd33 Author: David Stevens Date: Tue Aug 18 16:13:42 2020 +0900 virtio-gpu: add VIRTIO_GPU_F_RESOURCE_UUID feature This feature allows the guest to request a UUID from the host for a particular virtio_gpu resource. The UUID can then be shared with other virtio devices, to allow the other host devices to access the virtio_gpu's corresponding host resource. Signed-off-by: David Stevens Acked-by: Michael S. Tsirkin Link: http://patchwork.freedesktop.org/patch/msgid/20200818071343.3461203-3-stevensd@chromium.org Signed-off-by: Gerd Hoffmann commit a0308938ec81cd0dca9d75833ec0dd1b8708917e Author: David Stevens Date: Tue Aug 18 16:13:41 2020 +0900 virtio: add dma-buf support for exported objects This change adds a new flavor of dma-bufs that can be used by virtio drivers to share exported objects. A virtio dma-buf can be queried by virtio drivers to obtain the UUID which identifies the underlying exported object. Signed-off-by: David Stevens Acked-by: Michael S. Tsirkin Link: http://patchwork.freedesktop.org/patch/msgid/20200818071343.3461203-2-stevensd@chromium.org Signed-off-by: Gerd Hoffmann commit 0fd1594b3c339f17210c7ebfff102ad054cfcc7d Author: Tony Lindgren Date: Thu Jul 2 08:45:13 2020 -0700 ARM: dts: Configure omap4 and 5 l4_abe for genpd and drop platform data We can power off l4_abe domain when not in use when we configure it for genpd. And with that change, we can now also drop the old unused legacy platform data. Note that we also need to now use "simple-pm-bus" instead of "simple-bus" for PM runtime to get enabled for the bus. Signed-off-by: Tony Lindgren Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren commit 587c437d96a3c2a9f15d5f1e315b6ed1ed939725 Author: Tony Lindgren Date: Thu Jul 2 08:45:12 2020 -0700 ARM: dts: Configure am3 and am4 sgx for genpd and drop platform data We can power off the SGX power domain when not in use when we configure it for genpd. And with that change, we can now also drop the old unused legacy platform data. Signed-off-by: Tony Lindgren Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren commit 2bbcd6590a25336b0963d8678488e0a2639260a3 Author: Tony Lindgren Date: Thu Jul 2 08:45:11 2020 -0700 soc: ti: omap-prm: Configure omap4 and 5 l4_abe power domain Let's add omap4 and 5 l4_abe interconnect instance for the power domain. Signed-off-by: Tony Lindgren Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren commit f8f91486e8e717b71a5a3d6bb51c7ed751d83543 Author: Tony Lindgren Date: Thu Jul 2 08:45:10 2020 -0700 soc: ti: omap-prm: Configure sgx power domain for am3 and am4 Let's configure only sgx power domain for am3 and am4 to start with. Signed-off-by: Tony Lindgren Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren commit 58cbff023bfaeb9c290b5dbcc0a4bb327c653e18 Author: Tony Lindgren Date: Thu Jul 2 08:45:09 2020 -0700 soc: ti: omap-prm: Add basic power domain support The PRM controller has currently only support for resets while the power domains are still handled in the platform code. Let's add basic power domain support to enable and disable a PRM controlled power domain if configured in the devicetree. This can be used for various hardware accelerators, and interconnect instances. Further support can be added later on as needed for runtime configuration based on domain-idle-states. Signed-off-by: Tony Lindgren Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren commit de104a292d07ef63803bc5c496e7cac54d8c16cc Author: Tony Lindgren Date: Thu Jul 2 08:45:08 2020 -0700 dt-bindings: omap: Update PRM binding for genpd The PRM (Power and Reset Module) has a register to enable and disable the related power domain, so let's update the binding for that. Signed-off-by: Tony Lindgren Acked-by: Santosh Shilimkar Acked-by: Rob Herring Cc: devicetree@vger.kernel.org Cc: Rob Herring Signed-off-by: Tony Lindgren commit 08abad9f45f105e947d91822bdbc47650fbd7773 Author: Rander Wang Date: Mon Aug 17 23:29:23 2020 +0800 soundwire: intel: refine runtime pm for SDW_INTEL_CLK_STOP_BUS_RESET When all the links are suspended, the HDaudio controller may suspend and the power rails to the SoundWire IP may be disabled, requiring a complete re-initialization/enumeration on resume. However, if one or more Masters remained active, the HDaudio controller will remain active and the power rails will remain enabled. As a result, during the link resume step we can check if the context was preserved by verifying if the clock was stopped, and avoid doing a complete bus reset and re-enumeration. Signed-off-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200817152923.3259-13-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 61fb830bf9ca02f040fdfe65b714bea492a44986 Author: Pierre-Louis Bossart Date: Mon Aug 17 23:29:22 2020 +0800 soundwire: intel: support clock_stop mode without quirks In this mode, on restart the bus restarts immediately, the Slaves remain synchronized and all context is kept intact. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200817152923.3259-12-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit ab996b2971d76e1602064b0ae4eb9af5def085d8 Author: Pierre-Louis Bossart Date: Mon Aug 17 23:29:21 2020 +0800 soundwire: intel_init: handle power rail dependencies for clock stop mode When none of the clock stop quirks is specified, the Master IP will assume the context is preserved and will not reset the Bus and restart enumeration. Due to power rail dependencies, the HDaudio controller needs to remain powered and prevented from executing its pm_runtime suspend routine. This choice of course has a power impact, and this mode should only be selected when latency requirements are critical or the parent device can enter D0ix modes. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200817152923.3259-11-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit caf688192bc452c0fdd04920c3ed2405a57ac10b Author: Pierre-Louis Bossart Date: Mon Aug 17 23:29:20 2020 +0800 soundwire: intel: add CLK_STOP_NOT_ALLOWED support In case the clock needs to keep running, we need to prevent the Master from entering pm_runtime suspend. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200817152923.3259-10-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 6626a616aab5e5c0d4fceffd861a10582272fce9 Author: Rander Wang Date: Mon Aug 17 23:29:19 2020 +0800 soundwire: intel: add CLK_STOP_BUS_RESET support Move existing pm_runtime suspend under the CLK_STOP_TEARDOWN case. In this mode the Master IP will lose all context but in-band wakes are supported. On pm_runtime resume a complete re-enumeration will be performed after a bus reset. Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200817152923.3259-9-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit a320f41eac7b250c27db1c8071a984e584109ce1 Author: Pierre-Louis Bossart Date: Mon Aug 17 23:29:18 2020 +0800 soundwire: intel: add CLK_STOP_TEARDOWN for pm_runtime suspend Now that we have options, add support for TEARDOWN mode (same functionality as existing code) All other modes will be added in follow-up patches. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200817152923.3259-8-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit a2d9c161db24929a4b71399bdbe097d5f61b7d8d Author: Pierre-Louis Bossart Date: Mon Aug 17 23:29:17 2020 +0800 soundwire: intel: pm_runtime idle scheduling Add quirk and pm_runtime idle scheduling to let the Master suspend if no Slaves become attached. This can happen when a link is not marked as disabled and has devices exposed in the DSDT, if the power is controlled by sideband means or the link includes a pluggable connector. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200817152923.3259-7-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit a5a0239c27fe1125826c5cad4dec9cd1fd960d4a Author: Bard Liao Date: Mon Aug 17 23:29:16 2020 +0800 soundwire: intel: reinitialize IP+DSP in .prepare(), but only when resuming The .prepare() callback is invoked for normal streaming, underflows or during the system resume transition. In the latter case, the context for the ALH PDIs is lost, and the DSP is not initialized properly either, but the bus parameters don't need to be recomputed. Conversely, when doing a regular .prepare() during an underflow, the ALH/SHIM registers shall not be changed as the hardware cannot be reprogrammed after the DMA started (hardware spec requirement). This patch adds storage of PDI and hw_params in the DAI dma context, and the difference between the types of .prepare() usages is handled via a simple boolean, updated when suspending, and tested for in the .prepare() case. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200817152923.3259-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 99b6a30f9f9995be3698f59df9882490d604f5d1 Author: Pierre-Louis Bossart Date: Mon Aug 17 23:29:15 2020 +0800 soundwire: intel: call helper to reset Slave states on resume This helps make sure they are all UNATTACHED and reset the state machines. At the moment we perform a bus reset both for system resume and pm_runtime resume, this will be modified when clock-stop mode is supported Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200817152923.3259-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit cb1e6d59e89ce272a67e6dc22e9ec72df622fb1b Author: Pierre-Louis Bossart Date: Mon Aug 17 23:29:14 2020 +0800 soundwire: intel: fix race condition on system resume Previous patches took care of the case where the master device is pm_runtime 'suspended' when a system suspend occurs. In the case where the master device was not suspended, e.g. if suspend occurred while streaming audio, Intel validation noticed a race condition: the pm_runtime suspend may conflict with the enumeration started by the system resume. This can be simply fixed by updating the status before exiting system resume. GitHub issue: https://github.com/thesofproject/linux/issues/1482 Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200817152923.3259-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit b61b8b37888ab13d4bf1b8f406713d51f01568cf Author: Pierre-Louis Bossart Date: Mon Aug 17 23:29:13 2020 +0800 soundwire: intel: reset pm_runtime status during system resume The system resume does the entire bus re-initialization and brings it to full-power. If the device was pm_runtime suspended, there is no need to run the pm_runtime resume sequence after the system runtime. Follow the documentation from runtime_pm.rst, and conditionally disable, set_active and re-enable the device on system resume. Note that pm_runtime_suspended() is used instead of pm_runtime_status_suspended() so that we can deal with the case where pm_runtime is disabled. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200817152923.3259-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit ebf878eddbb449091078d2ed282aed42a4fcef34 Author: Pierre-Louis Bossart Date: Mon Aug 17 23:29:12 2020 +0800 soundwire: intel: add pm_runtime support Add basic hooks in DAI .startup and .shutdown callbacks. The SoundWire IP should be powered between those two calls. The power dependencies between SoundWire and DSP are handled with the parent/child relationship, before the SoundWire master device becomes active the parent device will become active and power-up the shared rails. For now the strategy is to rely on complete enumeration when the device becomes active, so the code is a copy/paste of the sequence for system suspend/resume. In future patches, the strategy will optionally be to rely on clock stop if the enumeration time is prohibitive or when the devices connected to a link can signal a wake. A module parameter is added to make integration of new Slave devices easier, to e.g. keep the device active or prevent clock-stop. Note that we need to we have to disable runtime pm before device unregister, otherwise we will see "Failed to power up link: -11" error on module remove test. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200817152923.3259-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 70a29209f67cf7dfa7c04975b3261e127694a4e7 Author: Thierry Reding Date: Thu Aug 6 17:36:50 2020 +0200 of: platform: Destroy child devices symmetrically Iterate over child devices in reverse when unpopulating a platform device to make this step symmetrical with the population step. This fixes an issue in the Tegra DRM driver where upon module unload the DPAUX controller tries to unregister an I2C controller but will end up waiting indefinitely because one of the SOR devices is keeping a reference to it. Since the SOR devices are instantiated after the DPAUX devices, they would only be removed (and hence release their reference to the I2C controller) after the DPAUX devices have been removed. While destroying the child devices in reverse order helps in this situation, it isn't fully safe to do so either. An even better way would be for the child devices to be reordered to match the probe order, which would work irrespective of the instantiation order. However, reordering by probe order would be fairly complicated and doesn't fix any known issues, so we'll go with the simpler fix for now. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20200806153650.3883530-1-thierry.reding@gmail.com Signed-off-by: Rob Herring commit 1c5711876b32470ba5983f9aa9b2a25dd5bc9639 Author: Anson Huang Date: Wed Aug 12 15:52:21 2020 +0800 dt-bindings: gpio: Convert vf610 to json-schema Convert the vf610 gpio binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1597218741-24899-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit c7c556f1e81bb9e09656ed6650d0c44c84b7c016 Author: Stephen Smalley Date: Tue Aug 11 15:01:56 2020 -0400 selinux: refactor changing booleans Refactor the logic for changing SELinux policy booleans in a similar manner to the refactoring of policy load, thereby reducing the size of the critical section when the policy write-lock is held and making it easier to convert the policy rwlock to RCU in the future. Instead of directly modifying the policydb in place, modify a copy and then swap it into place through a single pointer update. Only fully copy the portions of the policydb that are affected by boolean changes to avoid the full cost of a deep policydb copy. Introduce another level of indirection for the sidtab since changing booleans does not require updating the sidtab, unlike policy load. While we are here, create a common helper for notifying other kernel components and userspace of a policy change and call it from both security_set_bools() and selinux_policy_commit(). Based on an old (2004) patch by Kaigai Kohei [1] to convert the policy rwlock to RCU that was deferred at the time since it did not significantly improve performance and introduced complexity. Peter Enderborg later submitted a patch series to convert to RCU [2] that would have made changing booleans a much more expensive operation by requiring a full policydb_write();policydb_read(); sequence to deep copy the entire policydb and also had concerns regarding atomic allocations. This change is now simplified by the earlier work to encapsulate policy state in the selinux_policy struct and to refactor policy load. After this change, the last major obstacle to converting the policy rwlock to RCU is likely the sidtab live convert support. [1] https://lore.kernel.org/selinux/6e2f9128-e191-ebb3-0e87-74bfccb0767f@tycho.nsa.gov/ [2] https://lore.kernel.org/selinux/20180530141104.28569-1-peter.enderborg@sony.com/ Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit 5586dd8ea250ab0851caeab6f461a9dbf57c806f Author: Can Guo Date: Sun Aug 9 05:15:54 2020 -0700 scsi: ufs: Fix a race condition between error handler and runtime PM ops The current IRQ handler blocks SCSI requests before scheduling eh_work, when error handler calls pm_runtime_get_sync, if ufshcd_suspend/resume sends a SCSI cmd, most likely the SSU cmd, since SCSI requests are blocked, pm_runtime_get_sync() will never return because ufshcd_suspend/resume is blocked by the SCSI cmd. - In queuecommand path, hba->ufshcd_state check and ufshcd_send_command should stay under the same spin lock. This is to make sure that no more commands leak into doorbell after hba->ufshcd_state is changed. - Don't block SCSI requests before error handler starts to run, let error handler block SCSI requests when it is ready to start error recovery. - Don't let SCSI layer keep requeuing the SCSI cmds sent from HBA runtime PM ops, let them pass or fail them. Let them pass if eh_work is scheduled due to non-fatal errors. Fail them if eh_work is scheduled due to fatal errors, otherwise the cmds may eventually time out since UFS is in bad state, which gets error handler blocked for too long. If we fail the SCSI cmds sent from HBA runtime PM ops, HBA runtime PM ops fails too, but it does not hurt since error handler can recover HBA runtime PM error. Link: https://lore.kernel.org/r/1596975355-39813-9-git-send-email-cang@codeaurora.org Reviewed-by: Bean Huo Reviewed-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit c3be8d1ee1bff7c6f7e588d2a87f076148f40326 Author: Can Guo Date: Sun Aug 9 05:15:53 2020 -0700 scsi: ufs: Move dumps in IRQ handler to error handler Performing dumps in the IRQ handler causes system stability issues. Move dumps to the error handler and only print basic host registers here. Link: https://lore.kernel.org/r/1596975355-39813-8-git-send-email-cang@codeaurora.org Reviewed-by: Bean Huo Reviewed-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit c72e79c0ad2bd7efb1cf84f630f59daf9ba8c510 Author: Can Guo Date: Sun Aug 9 05:15:52 2020 -0700 scsi: ufs: Recover HBA runtime PM error in error handler The current error handler can not recover HBA runtime PM error if ufshcd_suspend/resume has failed due to UFS errors, e.g. hibern8 enter/exit error or SSU cmd error. When this happens, error handler may fail performing a full reset and restore because error handler always assumes that power, IRQs and clocks are ready after pm_runtime_get_sync returns, but actually they are not if ufshcd_resume fails[1]. If ufschd_suspend/resume fails due to UFS errors, runtime PM framework saves the error value to dev.power.runtime_error. After that, HBA dev runtime suspend/resume would not be invoked anymore unless runtime_error is cleared[2]. In case of ufshcd_suspend/resume fails due to UFS errors, for scenario [1], error handler cannot assume anything of pm_runtime_get_sync, meaning error handler should explicitly turn ON powers, IRQs and clocks again. To get the HBA runtime PM work as regard for scenario [2], error handler can clear the runtime_error by calling pm_runtime_set_active() if full reset and restore succeeds. And, more important, if pm_runtime_set_active() returns no error, which means runtime_error has been cleared, we also need to resume those scsi devices under HBA in case any of them has failed to be resumed due to HBA runtime resume failure. This is to unblock blk_queue_enter in case there are bios waiting inside it. Link: https://lore.kernel.org/r/1596975355-39813-7-git-send-email-cang@codeaurora.org Reviewed-by: Bean Huo Reviewed-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 4db7a23605973ac4a2cb24e759bebaaa82054f21 Author: Can Guo Date: Sun Aug 9 05:15:51 2020 -0700 scsi: ufs: Fix concurrency of error handler and other error recovery paths Error recovery can be invoked from multiple code paths, including hibern8 enter/exit (from ufshcd_link_recovery), ufshcd_eh_host_reset_handler() and eh_work scheduled from IRQ context. Ultimately, these paths are all trying to invoke ufshcd_reset_and_restore() in either a synchronous or asynchronous manner. This causes problems: - If link recovery happens during ungate work, ufshcd_hold() would be called recursively. Although commit 53c12d0ef6fc ("scsi: ufs: fix error recovery after the hibern8 exit failure") fixed a deadlock due to recursive calls of ufshcd_hold() by adding a check of eh_in_progress into ufshcd_hold, this check allows eh_work to run in parallel while link recovery is running. - Similar concurrency can also happen when error recovery is invoked from ufshcd_eh_host_reset_handler and ufshcd_link_recovery. - Concurrency can even happen between eh_works. eh_work, currently queued on system_wq, is allowed to have multiple instances running in parallel, but we don't have proper protection for that. If any of above concurrency scenarios happen, error recovery would fail and lead ufs device and host into bad states. To fix the concurrency problem, this change queues eh_work on a single threaded workqueue and removes link recovery calls from the hibern8 enter/exit path. In addition, make use of eh_work in eh_host_reset_handler instead of calling ufshcd_reset_and_restore. This unifies the UFS error recovery mechanism. According to the UFSHCI JEDEC spec, hibern8 enter/exit error occurs when the link is broken. This essentially applies to any power mode change operations (since they all use PACP_PWR cmds in UniPro layer). So, if a power mode change operation (including AH8 enter/exit) fails, mark link state as UIC_LINK_BROKEN_STATE and schedule the eh_work. In this case, error handler needs to do a full reset and restore to recover the link back to active. Before the link state is recovered to active, ufshcd_uic_pwr_ctrl simply returns -ENOLINK to avoid more errors. Link: https://lore.kernel.org/r/1596975355-39813-6-git-send-email-cang@codeaurora.org Reviewed-by: Bean Huo Reviewed-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 3f8af6044713fab0aeb884e1be6bcc2cb276725e Author: Can Guo Date: Sun Aug 9 05:15:50 2020 -0700 scsi: ufs: Add some debug information to ufshcd_print_host_state() Information about the last interrupt status and timestamp is helpful when debugging system stability issues (IRQ starvation, for instance). Add this information to ufshcd_print_host_state() output. In addition, UFS device information such as model name and firmware version also comes in handy during debugging. This is printed as well. Link: https://lore.kernel.org/r/1596975355-39813-5-git-send-email-cang@codeaurora.org Reviewed-by: Avri Altman Reviewed-by: Hongwu Su Reviewed-by: Asutosh Das Reviewed-by: Stanley Chu Reviewed-by: Bean Huo Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 423cc66b5152a309e99a3693d856157a5e4a8d39 Author: Can Guo Date: Sun Aug 9 05:15:49 2020 -0700 scsi: ufs-qcom: Remove testbus dump in ufs_qcom_dump_dbg_regs Dumping testbus registers outputs a lot of information and can cause stability issues. Remove the dump code. Link: https://lore.kernel.org/r/1596975355-39813-4-git-send-email-cang@codeaurora.org Reviewed-by: Hongwu Su Reviewed-by: Avri Altman Reviewed-by: Bean Huo Reviewed-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 89dd87acd40a44de8ff3358138aedf8f73f4efc6 Author: Can Guo Date: Sun Aug 9 05:15:48 2020 -0700 scsi: ufs: ufs-qcom: Fix race conditions caused by ufs_qcom_testbus_config() If ufs_qcom_dump_dbg_regs() calls ufs_qcom_testbus_config() from ufshcd_suspend/resume and/or clk gate/ungate context, pm_runtime_get_sync() and ufshcd_hold() will cause a race condition. Fix this by removing the unnecessary calls of pm_runtime_get_sync() and ufshcd_hold(). Link: https://lore.kernel.org/r/1596975355-39813-3-git-send-email-cang@codeaurora.org Reviewed-by: Hongwu Su Reviewed-by: Avri Altman Reviewed-by: Bean Huo Reviewed-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 2dec9475a4028ba0a4ede51452f89dead2c008e1 Author: Can Guo Date: Sun Aug 9 05:15:47 2020 -0700 scsi: ufs: Add checks before setting clk-gating states Clock gating can be turned on/off selectively which means the associated state information is only correct if the feature is enabled. This change makes sure that we only look at state of clk-gating if it is enabled. Link: https://lore.kernel.org/r/1596975355-39813-2-git-send-email-cang@codeaurora.org Reviewed-by: Avri Altman Reviewed-by: Hongwu Su Reviewed-by: Stanley Chu Reviewed-by: Bean Huo Reviewed-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 02a52c5c8c3b8cbad0f12009cde9f36dbefb6972 Author: Stephen Smalley Date: Fri Aug 7 09:29:34 2020 -0400 selinux: move policy commit after updating selinuxfs With the refactoring of the policy load logic in the security server from the previous change, it is now possible to split out the committing of the new policy from security_load_policy() and perform it only after successful updating of selinuxfs. Change security_load_policy() to return the newly populated policy data structures to the caller, export selinux_policy_commit() for external callers, and introduce selinux_policy_cancel() to provide a way to cancel the policy load in the event of an error during updating of the selinuxfs directory tree. Further, rework the interfaces used by selinuxfs to get information from the policy when creating the new directory tree to take and act upon the new policy data structure rather than the current/active policy. Update selinuxfs to use these updated and new interfaces. While we are here, stop re-creating the policy_capabilities directory on each policy load since it does not depend on the policy, and stop trying to create the booleans and classes directories during the initial creation of selinuxfs since no information is available until first policy load. After this change, a failure while updating the booleans and class directories will cause the entire policy load to be canceled, leaving the original policy intact, and policy load notifications to userspace will only happen after a successful completion of updating those directories. This does not (yet) provide full atomicity with respect to the updating of the directory trees themselves. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit 461698026ffa740253b3114891d86eeb54a58bbc Author: Stephen Smalley Date: Fri Aug 7 09:29:33 2020 -0400 selinux: encapsulate policy state, refactor policy load Encapsulate the policy state in its own structure (struct selinux_policy) that is separately allocated but referenced from the selinux_ss structure. The policy state includes the SID table (particularly the context structures), the policy database, and the mapping between the kernel classes/permissions and the policy values. Refactor the security server portion of the policy load logic to cleanly separate loading of the new structures from committing the new policy. Unify the initial policy load and reload code paths as much as possible, avoiding duplicated code. Make sure we are taking the policy read-lock prior to any dereferencing of the policy. Move the copying of the policy capability booleans into the state structure outside of the policy write-lock because they are separate from the policy and are read outside of any policy lock; possibly they should be using at least READ_ONCE/WRITE_ONCE or smp_load_acquire/store_release. These changes simplify the policy loading logic, reduce the size of the critical section while holding the policy write-lock, and should facilitate future changes to e.g. refactor the entire policy reload logic including the selinuxfs code to make the updating of the policy and the selinuxfs directory tree atomic and/or to convert the policy read-write lock to RCU. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit 339949be25863ac15e24659c2ab4b01185e1234a Author: Stephen Smalley Date: Thu Aug 6 14:34:18 2020 -0400 scripts/selinux,selinux: update mdp to enable policy capabilities Presently mdp does not enable any SELinux policy capabilities in the dummy policy it generates. Thus, policies derived from it will by default lack various features commonly used in modern policies such as open permission, extended socket classes, network peer controls, etc. Split the policy capability definitions out into their own headers so that we can include them into mdp without pulling in other kernel headers and extend mdp generate policycap statements for the policy capabilities known to the kernel. Policy authors may wish to selectively remove some of these from the generated policy. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit 265c32072b0ce4156f40527a969d335d03681b30 Author: Jules Irenge Date: Mon Aug 3 13:34:39 2020 +0100 audit: uninitialize variable audit_sig_sid Checkpatch tool reports "ERROR: do not initialise globals/statics to 0" To fix this, audit_sig_sid is uninitialized As this is stored in the .bss section, the compiler can initialize the variable automatically. Signed-off-by: Jules Irenge Signed-off-by: Paul Moore commit 6b87024f76bc755354c18116880dc3b632447cbd Author: Jules Irenge Date: Mon Aug 3 13:34:38 2020 +0100 audit: change unnecessary globals into statics Variables sig_pid, audit_sig_uid and audit_sig_sid are only used in the audit.c file across the kernel Hence it appears no reason for declaring them as globals This patch removes their global declarations from the .h file and change them into static in the .c file. Signed-off-by: Jules Irenge Signed-off-by: Paul Moore commit 5deac4589111aeee2b65ad59d8e67ce68a175ae7 Author: Anson Huang Date: Wed Aug 5 15:15:46 2020 +0800 dt-bindings: ata: Convert i.MX sata to json-schema Convert the i.MX sata binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596611746-29155-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 3a52d2986204fb90a830ac3c9d5967226f28cd6e Author: Anson Huang Date: Wed Aug 5 14:49:32 2020 +0800 dt-bindings: nvmem: Convert snvs lpgpr to json-schema Convert the snvs lpgpr binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596610172-30323-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit fd0ae78d04f3a64975df8ea08fbed816d3e0c2fe Author: Anson Huang Date: Wed Aug 5 14:36:27 2020 +0800 dt-bindings: perf: Convert i.MX DDR to json-schema Convert the i.MX DDR perf binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596609387-23542-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit f83febb44b42cf55e4f0cc9853f87801a82770b2 Author: Anson Huang Date: Wed Aug 5 14:28:04 2020 +0800 dt-bindings: rng: Convert i.MX to json-schema Convert the i.MX rng binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596608884-13205-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit a505e52a65918f5f0010274289c6019519a2b32c Author: Anson Huang Date: Wed Aug 5 10:50:41 2020 +0800 dt-bindings: fsl: Convert i.MX7ULP SIM to json-schema Convert the i.MX7ULP SIM binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596595841-27563-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 8ba41d6bd9893200f54f61e49938899d76d30307 Author: Anson Huang Date: Wed Aug 5 10:50:40 2020 +0800 dt-bindings: fsl: Convert i.MX7ULP PM to json-schema Convert the i.MX7ULP PM binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596595841-27563-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 21d3aecc88c60a00b55623b4bba5811a97547991 Author: Anson Huang Date: Wed Aug 5 10:43:30 2020 +0800 dt-bindings: crypto: Convert i.MX sahara to json-schema Convert the i.MX sahara binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596595410-26921-3-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 921ab310873f3ebc864d7d69285f83fc62fb0b5e Author: Anson Huang Date: Wed Aug 5 10:43:29 2020 +0800 dt-bindings: crypto: Convert i.MX SCC to json-schema Convert the i.MX SCC binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596595410-26921-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 92ced918448d204119d603329017aa23add17eb7 Author: Anson Huang Date: Wed Aug 5 10:43:28 2020 +0800 dt-bindings: crypto: Convert MXS DCP to json-schema Convert the MXS DCP binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596595410-26921-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 92adc6bcfad7a50fff13007f1dee316351a3605e Author: Anson Huang Date: Wed Aug 5 10:38:11 2020 +0800 dt-bindings: w1: Convert i.MX to json-schema Convert the i.MX one wire binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596595091-26760-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 242b81170fb8a4a9d84ae183a8e0b1aaf2554d89 Author: Dan Murphy Date: Wed Aug 12 14:50:16 2020 -0500 leds: lp50xx: Add the LP50XX family of the RGB LED driver Introduce the LP5036/30/24/18/12/9 RGB LED driver. The difference in these parts are the number of LED outputs where the: LP5036 can control 36 LEDs LP5030 can control 30 LEDs LP5024 can control 24 LEDs LP5018 can control 18 LEDs LP5012 can control 12 LEDs LP5009 can control 9 LEDs The device has the ability to group LED outputs into control banks so that multiple LED banks can be controlled with the same mixing and brightness. Or the LED outputs can also be controlled independently. Acked-by: Jacek Anaszewski Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit dce1452301e7899468a2d46c826f23eba1e1dd28 Author: Dan Murphy Date: Wed Aug 12 14:50:15 2020 -0500 dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers Introduce the bindings for the Texas Instruments LP5036, LP5030, LP5024, LP5018, LP5012 and LP5009 RGB LED device driver. The LP5036/30/24/18/12/9 can control RGB LEDs individually or as part of a control bank group. These devices have the ability to adjust the mixing control for the RGB LEDs to obtain different colors independent of the overall brightness of the LED grouping. Datasheet: http://www.ti.com/lit/ds/symlink/lp5012.pdf http://www.ti.com/lit/ds/symlink/lp5024.pdf http://www.ti.com/lit/ds/symlink/lp5036.pdf Reviewed-by: Rob Herring Acked-by: Jacek Anaszewski Acked-by: Pavel Machek Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit 87e236845a3415eb7a7bc6600657c494abe41390 Author: Randy Dunlap Date: Mon Aug 17 12:11:29 2020 -0700 leds: LP55XX_COMMON needs to depend on LEDS_CLASS With these kernel configs: CONFIG_LEDS_CLASS=m # CONFIG_LEDS_CLASS_MULTICOLOR is not set CONFIG_LEDS_LP55XX_COMMON=y CONFIG_LEDS_LP5521=m CONFIG_LEDS_LP5562=m leds-lp55xx-common.c has a build error because it is builtin and calls an interface that is built as a loadable module (due to LEDS_CLASS=m). By making LEDS_LP55XX_COMMON depend on LEDS_CLASS, this config combination cannot happen, thus preventing the build error. ld: drivers/leds/leds-lp55xx-common.o: in function `lp55xx_register_leds': leds-lp55xx-common.c:(.text+0xc5f): undefined reference to `devm_led_classdev_register_ext' Fixes: 33b3a561f417 ("leds: support new LP8501 device - another LP55xx common") Signed-off-by: Randy Dunlap Cc: Pavel Machek Cc: Dan Murphy Cc: Milo Kim Cc: linux-leds@vger.kernel.org Signed-off-by: Pavel Machek commit 46de3adb5240f33b6dbf89ca0dc4ba5c86abebb1 Author: Eddie James Date: Mon Aug 3 09:50:55 2020 -0500 leds: pca955x: Add an IBM software implementation of the PCA9552 chip IBM created an implementation of the PCA9552 on a PIC16F microcontroller. The I2C device addresses are different from the hardware PCA9552, so add a new compatible string and associated platform data to be able to probe this device. Signed-off-by: Eddie James Reviewed-by: Vishwanatha Subbanna Signed-off-by: Pavel Machek commit 8ebe6d29a3f163f9fe9fc71e15073913e0ee8ad6 Author: Eddie James Date: Mon Aug 3 09:50:54 2020 -0500 dt-bindings: leds: pca955x: Add IBM implementation compatible string IBM created an implementation of the PCA9552 on a PIC16F microcontroller. Document the new compatible string for this device. Signed-off-by: Eddie James Acked-by: Rob Herring Signed-off-by: Pavel Machek commit 25a322fde74f8ca3368f4ff28b452af7cb5fa0dc Author: José Roberto de Souza Date: Thu Aug 13 13:00:29 2020 -0700 drm/i915: Update TGL and RKL HuC firmware versions Major upgrade of HuC firmware with fixes and new features. Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200813200029.25307-2-jose.souza@intel.com Signed-off-by: Rodrigo Vivi commit 5bf7919d530a2e1456ae602fccf365c213a4db4f Author: José Roberto de Souza Date: Thu Aug 13 13:00:28 2020 -0700 drm/i915: Update TGL and RKL DMC firmware versions Fixes around DC5, DC6 and DC3CO in those new firmwares. Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200813200029.25307-1-jose.souza@intel.com Signed-off-by: Rodrigo Vivi commit a170f4f1b128128d35b732cdc799dc5824f8e2ca Author: José Roberto de Souza Date: Mon Aug 10 10:41:44 2020 -0700 drm/i915/display: Implement WA 1408330847 From the 3 WAs for PSR2 man track/selective fetch this is only one needed when doing single full frames at every flip. Reviewed-by: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200810174144.76761-2-jose.souza@intel.com Signed-off-by: Rodrigo Vivi commit 6e43e276b8c94ecfeebfcc32eabad2ba27e90299 Author: José Roberto de Souza Date: Mon Aug 10 10:41:43 2020 -0700 drm/i915: Initial implementation of PSR2 selective fetch All GEN12 platforms supports PSR2 selective fetch but not all GEN12 platforms supports PSR2 hardware tracking(aka RKL). This feature consists in software programming registers with the damaged area of each plane this way hardware will only fetch from memory those areas and sent the PSR2 selective update blocks to panel, saving even more power. But as initial step it is only enabling the full frame fetch at every flip, the actual selective fetch part will come in a future patch. Also this is only handling the page flip side, it is still completely missing frontbuffer modifications, that is why the enable_psr2_sel_fetch parameter was added. v3: - calling intel_psr2_sel_fetch_update() during the atomic check phase (Ville) BSpec: 55229 Cc: Ville Syrjälä Cc: Imre Deak Cc: Gwan-gyeong Mun Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Reviewed-by: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200810174144.76761-1-jose.souza@intel.com Signed-off-by: Rodrigo Vivi commit 96c5a15f9f3973aca11137671afa9d433639f8ce Author: Matt Roper Date: Mon Aug 10 20:21:05 2020 -0700 drm/i915/kbl: Fix revision ID checks We usually assume that increasing PCI device revision ID's translates to newer steppings; macros like IS_KBL_REVID() that we use rely on this behavior. Unfortunately this turns out to not be true on KBL; the newer device 2 revision ID's sometimes go backward to older steppings. The situation is further complicated by different GT and display steppings associated with each revision ID. Let's work around this by providing a table to map the revision ID to specific GT and display steppings, and then perform our comparisons on the mapped values. v2: - Move the kbl_revids[] array to intel_workarounds.c to avoid compiler warnings about an unused variable in files that don't call the macros (kernel test robot). Bspec: 18329 Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200811032105.2819370-1-matthew.d.roper@intel.com Reviewed-by: Swathi Dhanavanthri Signed-off-by: Rodrigo Vivi commit 04dfb1acbae6a70703183fc6c1366bb7d997d015 Author: José Roberto de Souza Date: Fri Aug 7 12:26:29 2020 -0700 drm/i915/tgl: Add new voltage swing table This new HBR2 table for TGL-U and TGL-Y is required to pass DisplayPort compliance. BSpec: 49291 Cc: Khaled Almahallawy Reviewed-by: Khaled Almahallawy Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200807192629.64134-2-jose.souza@intel.com Signed-off-by: Rodrigo Vivi commit 1d3cc7ab2b00f849c94bd7e5fcffc7899dc4039a Author: José Roberto de Souza Date: Fri Aug 7 12:26:28 2020 -0700 drm/i915/tgl: Set subplatforms There is no way to differentiate TGL-U from TGL-Y by the PCI ids as some ids are available in both SKUs. So here using the root device id in the PCI bus that iGPU is in to differentiate between U and Y. BSpec: 44455 Reviewed-by: Swathi Dhanavanthri Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200807192629.64134-1-jose.souza@intel.com Signed-off-by: Rodrigo Vivi commit 05e31dd78e26d8c4d9d0dd68addead8d19c367c2 Author: Imre Deak Date: Wed Aug 5 18:00:56 2020 +0300 drm/i915/tgl: Fix TC-cold block/unblock sequence The command register is the PCODE MBOX low register not the high one as described by the spec. This left the system with the TC-cold power state being blocked all the time. Fix things by using the correct register. Also to make sure we retry a request for at least 600usec, when the PCODE MBOX command itself succeeded, but the TC-cold block command failed, sleep for 1msec unconditionally after any fail. The change was tested with JTAG register read of the HW/FW's actual TC-cold state, which reported the expected states after this change. Tested-by: Nivedita Swaminathan Cc: José Roberto de Souza Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200805150056.24248-1-imre.deak@intel.com Signed-off-by: Rodrigo Vivi commit b302a2e68807604af2a5015816c1d117747989b6 Author: Imre Deak Date: Tue Jul 21 02:29:52 2020 +0300 drm/i915/tgl: Make sure TC-cold is blocked before enabling TC AUX power wells The dependency between power wells is determined by the ordering of the power well list: when enabling the power wells for a domain, this happens walking the power well list forward, while disabling them happens in the reverse direction. Accordingly a power well on the list must follow any other power well it depends on. Since the TC AUX power wells depend on TC-cold being blocked, move the TC-cold off power well before all AUX power wells. Fixes: 3c02934b24e3 ("drm/i915/tc/tgl: Implement TC cold sequences") Cc: José Roberto de Souza Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200720232952.16228-1-imre.deak@intel.com Signed-off-by: Rodrigo Vivi commit 21118e8e56479ef33460fbd63a5ad0535843b666 Author: George Spelvin Date: Wed Mar 25 19:24:29 2020 +0000 drm/i915/selftests: Avoid passing a random 0 into ilog2 igt_mm_config() calls ilog2() on the (pseudo)random 21-bit number s>>12. Once in 2 million seeds, this is zero and ilog2 summons the nasal demons. There was an attempt to handle this case with a max(), but that's too late; ms could already be something bizarre. Given that the low 12 bits of s and ms are always zero, it's a lot simpler just to divide them by 4096, then everything fits into 32 bits, and we can easily generate a random number 1 <= s <= 0x1fffff. Fixes: 14d1b9a6247c ("drm/i915: buddy allocator") Signed-off-by: George Spelvin Cc: Matthew Auld Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Matthew Auld Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200325192429.GA8865@SDF.ORG Signed-off-by: Rodrigo Vivi commit 13149e8bafc4657254831ba6c16ed8780aa64a06 Author: Lionel Landwerlin Date: Tue Aug 4 11:59:54 2020 +0300 drm/i915: add syncobj timeline support Introduces a new parameters to execbuf so that we can specify syncobj handles as well as timeline points. v2: Reuse i915_user_extension_fn v3: Check that the chained extension is only present once (Chris) v4: Check that dma_fence_chain_find_seqno returns a non NULL fence (Lionel) v5: Use BIT_ULL (Chris) v6: Fix issue with already signaled timeline points, dma_fence_chain_find_seqno() setting fence to NULL (Chris) v7: Report ENOENT with invalid syncobj handle (Lionel) v8: Check for out of order timeline point insertion (Chris) v9: After explanations on https://lists.freedesktop.org/archives/dri-devel/2019-August/229287.html drop the ordering check from v8 (Lionel) v10: Set first extension enum item to 1 (Jason) v11: Rebase v12: Allow multiple extension nodes of timeline syncobj (Chris) Signed-off-by: Lionel Landwerlin Co-authored-by: Chris Wilson Reviewed-by: Daniel Vetter (v11) Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200804085954.350343-3-lionel.g.landwerlin@intel.com Link: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2901 Signed-off-by: Rodrigo Vivi commit cda9edd02425d7902714c60a6f6e31881d2f2741 Author: Lionel Landwerlin Date: Tue Aug 4 11:59:53 2020 +0300 drm/i915: introduce a mechanism to extend execbuf2 We're planning to use this for a couple of new feature where we need to provide additional parameters to execbuf. v2: Check for invalid flags in execbuffer2 (Lionel) v3: Rename I915_EXEC_EXT -> I915_EXEC_USE_EXTENSIONS (Chris) v4: Rebase Move array fence parsing in i915_gem_do_execbuffer() Signed-off-by: Lionel Landwerlin Reviewed-by: Daniel Vetter Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200804085954.350343-2-lionel.g.landwerlin@intel.com Link: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2901 Signed-off-by: Rodrigo Vivi commit 3f8210fd22d0c02faa18b36974debf1ad25b7f92 Author: Matt Roper Date: Mon Aug 3 21:40:24 2020 -0700 Revert "drm/i915/rkl: Add Wa_14011224835 for PHY B initialization" The hardware team has dropped this workaround from the bspec; it is no longer needed. This reverts commit 111822b21be995a3a4a731066db3d820523c57f7. Bspec: 49291 Cc: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200804044024.1931170-1-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 66b51b801d05ee54a0f23628cb8220189adb715e Author: Tianjia Zhang Date: Sun Aug 2 19:15:35 2020 +0800 drm/i915: Fix wrong return value in intel_atomic_check() In the case of calling check_digital_port_conflicts() failed, a negative error code -EINVAL should be returned. Fixes: bf5da83e4bd80 ("drm/i915: Move check_digital_port_conflicts() earier") Cc: Ville Syrjälä Signed-off-by: Tianjia Zhang Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200802111535.5200-1-tianjia.zhang@linux.alibaba.com Signed-off-by: Rodrigo Vivi commit e714977eef8fb40ea8234527d1b0c9d238bf1661 Author: Tianjia Zhang Date: Sun Aug 2 12:56:55 2020 +0100 drm/i915: Fix wrong return value In function i915_active_acquire_preallocate_barrier(), not all paths have the return value set correctly, and in case of memory allocation failure, a negative error code should be returned. Cc: Chris Wilson Signed-off-by: Tianjia Zhang Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200802115655.25568-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi commit ecb40d0826fda213ebb58d49e7d5b4752480e130 Author: Matt Roper Date: Fri Jun 12 13:47:34 2020 -0700 drm/i915: Update bw_buddy pagemask table A recent bspec update removed the LPDDR4 single channel entry from the buddy register table, but added a new four-channel entry. Workaround 1409767108 hasn't been updated with any guidance for four channel configurations, so we leave that alternate table unchanged for now. Bspec 49218 Fixes: 3fa01d642fa7 ("drm/i915/tgl: Program BW_BUDDY registers during display init") Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200612204734.3674650-1-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 9a0a3bebb0c5885784a048a65f4661a2464cc920 Author: Chris Wilson Date: Fri Jul 31 09:50:09 2020 +0100 drm/i915: Add a couple of missing i915_active_fini() We use i915_active_fini() as a debug check on the i915_active state before freeing. If we forget to call it, we may end up angering the debugobjects contained within. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20200731085015.32368-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi commit a22b1a9bb0d72a58d5b836653f28d97ee8fea1c4 Author: Chris Wilson Date: Wed Jul 29 14:09:12 2020 +0100 drm/i915/display: Check for an LPSP encoder before dereferencing Avoid a GPF at <1>[ 20.177320] BUG: kernel NULL pointer dereference, address: 000000000000007c <1>[ 20.177322] #PF: supervisor read access in kernel mode <1>[ 20.177323] #PF: error_code(0x0000) - not-present page <6>[ 20.177324] PGD 0 P4D 0 <4>[ 20.177327] Oops: 0000 [#1] PREEMPT SMP PTI <4>[ 20.177328] CPU: 1 PID: 944 Comm: debugfs_test Not tainted 5.8.0-rc7-CI-CI_DRM_8814+ #1 <4>[ 20.177330] Hardware name: Dell Inc. XPS 13 9360/0823VW, BIOS 2.9.0 07/09/2018 <4>[ 20.177372] RIP: 0010:i915_lpsp_capability_show+0x44/0xc0 [i915] <4>[ 20.177374] Code: 0f b6 81 ca 0d 00 00 3c 0b 74 77 76 19 3c 0c 75 44 83 7e 7c 01 7e 2f 48 c7 c6 d7 b9 47 a0 e8 43 df 06 e1 31 c0 c3 3c 09 72 2b <8b> 46 7c 85 c0 75 e6 8b 82 e4 00 00 00 89 c2 83 e2 fb 83 fa 0a 74 <4>[ 20.177376] RSP: 0018:ffffc90000cebe38 EFLAGS: 00010246 <4>[ 20.177377] RAX: 0000000000000009 RBX: ffff888267fe6a58 RCX: ffff888252d10000 <4>[ 20.177378] RDX: ffff88824a9a4000 RSI: 0000000000000000 RDI: ffff888267fe6a30 <4>[ 20.177379] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 <4>[ 20.177380] R10: 0000000000000001 R11: 0000000000000000 R12: ffffc90000cebf08 <4>[ 20.177381] R13: 00000000ffffffff R14: 0000000000000001 R15: ffff888267fe6a30 <4>[ 20.177383] FS: 00007f6f9c6b5e40(0000) GS:ffff888276480000(0000) knlGS:0000000000000000 <4>[ 20.177384] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>[ 20.177385] CR2: 000000000000007c CR3: 0000000255f04006 CR4: 00000000003606e0 <4>[ 20.177386] Call Trace: <4>[ 20.177390] seq_read+0xcb/0x420 which is presumably from having no encoder attached at that time. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2175 Fixes: 8806211fe7b3 ("drm/i915: Add i915_lpsp_capability debugfs") Signed-off-by: Chris Wilson Cc: Animesh Manna Cc: Anshuman Gupta Cc: Uma Shankar Cc: "Ville Syrjälä" Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20200729130912.30093-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi commit 1840d40ac690e2ad60fa52fc3156249802e27aa9 Author: Chris Wilson Date: Tue Jul 28 16:22:19 2020 +0100 drm/i915: Remove gen check before calling intel_rps_boost It's been a while since gen6_rps_boost() [that only worked on gen6+] was replaced by intel_rps_boost() that understood itself when rps was active. Since the intel_rps_boost() is gen-agnostic, just call it. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200728152219.1387-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi commit e310b4352cf471ba73119ec31abb1ef72086824d Author: Chris Wilson Date: Tue Jul 28 16:21:10 2020 +0100 drm/i915/selftests: Add compiler paranoia for checking HWSP values Since we want to read the values from the HWSP as written to by the GPU, warn the compiler that the values are volatile. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200728152110.830-2-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi commit 98ef067453709444a264939940f7b3a5dfdfa09e Author: Chris Wilson Date: Tue Jul 28 16:06:00 2020 +0100 drm/i915: Copy default modparams to mock i915_device Since we use the module parameters stored inside the drm_i915_device itself, we need to ensure the mock i915_device also sets up the right defaults. Fixes: 8a25c4be583d ("drm/i915/params: switch to device specific parameters") Signed-off-by: Chris Wilson Cc: Jani Nikula Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200728150600.4509-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi commit 2982ded2ff5ce0cf1a49bc39a526da182782b664 Author: Uma Shankar Date: Thu Jul 16 20:28:57 2020 +0530 drm/i915/display/fbc: Disable fbc by default on TGL Fbc is causing random underruns in CI execution on TGL platforms. Disabling the same while the problem is being debugged and analyzed. v2: Moved the check below the module param check (Ville) Cc: Stanislav Lisovskiy Cc: Ville Syrjälä Signed-off-by: Uma Shankar Acked-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716145857.6911-1-uma.shankar@intel.com Signed-off-by: Rodrigo Vivi commit c746063ab14644592abfb61be3486989ff990cea Author: José Roberto de Souza Date: Mon Jul 27 09:47:29 2020 -0700 drm/i915: Implement WA 14011294188 Although the WA description targets the platforms it is a workaround for the affected PCHs, that is why it is being checked. v2: excluding DG1 fake PCH from WA BSpec: 52890 BSpec: 53273 BSpec: 52888 Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200727164729.28836-1-jose.souza@intel.com Signed-off-by: Rodrigo Vivi commit 90e1329296fda234669ff97c12e39816b948de72 Author: Chris Wilson Date: Thu Jul 23 16:38:05 2020 +0100 drm/i915/selftests: Downgrade severity of CS/SRM frequency scaling tests Gracefully skip over the failures in the frequency scaling for the moment, the results are under review. References: https://gitlab.freedesktop.org/drm/intel/-/issues/1754 Signed-off-by: Chris Wilson Cc: "Sundaresan, Sujaritha" Cc: "Ewins, Jon" Reviewed-by: Sujaritha Sundaresan Link: https://patchwork.freedesktop.org/patch/msgid/20200723153805.8076-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi commit a3db3f8496bfa138cb7ddabde6baaf3d1beb01e2 Author: Matt Roper Date: Thu Jul 16 15:05:51 2020 -0700 drm/i915/rkl: Add Wa_14011224835 for PHY B initialization After doing normal PHY-B initialization on Rocket Lake, we need to manually copy some additional PHY-A register values into PHY-B registers. Note that the bspec's combo phy page doesn't specify that this workaround is restricted to specific platform steppings (and doesn't even do a very good job of specifying that RKL is the only platform this is needed on), but the RKL workaround page lists this as relevant only for A and B steppings, so I'm trusting that information for now. v2: Make rkl_combo_phy_b_init_wa() static v3: - Minimize variables in WA function. (Jose) - Fix timeout duration (usec vs msec). (Jose) - Add verification of workaround. (Jose) - Fix stepping bounds in comment. Bspec: 49291 Bspec: 53273 Cc: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200716220551.2730644-6-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit ddff9a602e5e65e99ca6516151ee775560156697 Author: Matt Roper Date: Thu Jul 16 15:05:50 2020 -0700 drm/i915/rkl: Handle HTI If HTI (also sometimes called HDPORT) is enabled at startup, it may be using some of the PHYs and DPLLs making them unavailable for general usage. Let's read out the HDPORT_STATE register and avoid making use of resources that HTI is already using. v2: - Fix minor checkpatch warnings v3: - Just readout HDPORT_STATE register once during init and then parse it later as needed. - Add a 'has_hti' device info flag to track whether we should readout HDPORT_STATE or not. We can skip the platform/flag tests later since the hti_state in dev_priv will remain 0 for platforms it does not apply to. - Move PLL masking into icl_get_combo_phy_dpll() since at the moment RKL is the only platform that has HTI. (Jose) Bspec: 49189 Bspec: 53707 Cc: Lucas De Marchi Cc: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200716220551.2730644-5-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit e66f609baeee0d8354d3e1aa7d171a54ce72cb34 Author: Matt Roper Date: Thu Jul 16 15:05:49 2020 -0700 drm/i915/rkl: Add DPLL4 support Rocket Lake has a third DPLL (called 'DPLL4') that must be used to enable a third display. Unlike EHL's variant of DPLL4, the RKL variant behaves the same as DPLL0/1. And despite its name, the DPLL4 registers are offset as if it were DPLL2. v2: - Add new .update_ref_clks() hook. v3: - Renumber TBT PLL to '3' and switch _MMIO_PLL3 to _MMIO_PLL (Lucas) v4: - Don't drop _MMIO_PLL3; although it's now unused, we're going to need it very soon again for upcoming DG1 patches. (Lucas) v5: - Don't re-number TBT PLL and beyond, just use new RKL_DPLL_CFGCR macros to lookup the proper registers instead. Although renumbering the PLLs might be something we want to consider down the road, it opens a big can of worms right now since a bunch of places in the code have an assumption that the PLL table has idx==id and no holes. Renumbering creates a hole for TGL, so we'd either need to allow holes in the table or break the idx==id invariant, both of which are somewhat invasive changes to the design. Bspec: 49202 Bspec: 49443 Bspec: 50288 Bspec: 50289 Cc: Lucas De Marchi Cc: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200716220551.2730644-4-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit f52fa57ae70e2e411c0d72396d526d76bf8d3eda Author: Matt Roper Date: Thu Jul 16 15:05:48 2020 -0700 drm/i915/rkl: Add initial workarounds RKL and TGL share some general gen12 workarounds, but each platform also has its own platform-specific workarounds. v2: - Add Wa_1604555607 for RKL. This makes RKL's ctx WA list identical to TGL's, so we'll have both functions call the tgl_ function for now; this workaround isn't listed for DG1 so we don't want to add it to the general gen12_ function. Cc: Matt Atwood Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200716220551.2730644-3-matthew.d.roper@intel.com Signed-off-by: Rodrigo Vivi commit cd803bb4f8a8d7b2c27c464ae32af14005cce7a1 Author: Matt Roper Date: Thu Jul 16 15:05:47 2020 -0700 drm/i915/rkl: Handle new DPCLKA_CFGCR0 layout RKL uses a slightly different bit layout for the DPCLKA_CFGCR0 register. v2: - Fix inverted mask application when updating ICL_DPCLKA_CFGCR0 - Checkpatch style fixes Bspec: 50287 Cc: Aditya Swarup Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200716220551.2730644-2-matthew.d.roper@intel.com Signed-off-by: Rodrigo Vivi commit f1421190d0abf55c34525cc88ab8c00ada9fbb9c Author: Ville Syrjälä Date: Thu Jul 16 22:04:25 2020 +0300 drm/i915: Move WaDisableDopClockGating:skl to skl_init_clock_gating() It's silly to have if(SKL) checks in gen9_init_clock_gating() when we can just move those bits into skl_init_clock_gating(). I'm not entirely convinced we even need this w/a, or if we do then maybe we want it for kbl/cfl as well. IIRC it was only listed in the wadb, but that is now dead so can't double check anymore. Bspec doesn't seem to have any purely skl specific DOP clock gating workarounds listed. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200716190426.17047-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 81619f4a75ed75823d52f46e167fa82d72c1eeef Author: José Roberto de Souza Date: Wed Jul 15 10:56:37 2020 -0700 drm/i915/display: Implement HOBL Hours Of Battery Life is a new GEN12+ power-saving feature that allows supported motherboards to use a special voltage swing table for eDP panels that uses less power. So here if supported by HW, OEM will set it in VBT and i915 will try to train link with HOBL vswing table if link training fails it fall back to the original table. intel_ddi_dp_preemph_max() was optimized to only check the HOBL flag instead of do something like is done in intel_ddi_dp_voltage_max() because it is only called after the first entry of the voltage swing table was loaded so the HOBL flag is valid at that point. v3: - removed a few parameters of icl_ddi_combo_vswing_program() that can be taken from encoder v4: - using the HOBL vswing table until training fails completely (Ville) v5: - not reducing lane or link rate when link training fails with HOBL active - duplicated the HOBL voltage swing entry to match DP spec requirement v6: - removed the optional VS 3 & pre-emp 0 from HOBL table - changed from u8:1 to bool to store hobl_failed/active BSpec: 49291 BSpec: 49399 Reviewed-by: Ville Syrjälä Cc: Ville Syrjälä Cc: Animesh Manna Cc: Manasi Navare Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200715175637.33763-1-jose.souza@intel.com Signed-off-by: Rodrigo Vivi commit f2bde2546b81b64fb58aa04888fdd82a090b3908 Author: Alexei Podtelezhnikov Date: Mon Apr 27 23:47:52 2020 -0400 drm/i915: Remove dubious Valleyview PCI IDs 0x0155 is rather Ivy Bridge PCI-E Root Port. 0x0157 from the same commit ff049b6ce21d ("drm/i915: bind driver to ValleyView chipsets") is likely wrong too. Nowhere is it independetly confirmed or mentioned. Signed-off-by: Alexei Podtelezhnikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428034752.3975-1-apodtele@gmail.com Signed-off-by: Rodrigo Vivi commit 27e897beec1c59861f15d4d3562c39ad1143620f Author: Chris Wilson Date: Thu Jul 16 10:46:43 2020 +0100 drm/i915: Provide the perf pmu.module Rather than manually implement our own module reference counting for perf pmu events, finally realise that there is a module parameter to struct pmu for this very purpose. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: stable@vger.kernel.org Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200716094643.31410-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi commit a5bcf8dde63142f36ae8ce720265d4c41a634d5c Author: Imre Deak Date: Tue Jul 14 18:31:41 2020 +0300 drm/i915/ddi: Don't rewrite DDI_BUF_CTL reg during DP link training The value we program to DDI_BUF_CTL changes at the following places: - At enabling/disabling the output to configure the port width etc, and to enable/disable the DDI BUF function. - At the beginning/end of link re-training to disable/re-enable the DDI BUF function. - On HSW/BDW/SKL to change the voltage swing/pre-emph levels. Except of the above the value we program to the DDI_BUF_CTL register (intel_dp->DP) doesn't change, so no need to reprogram the register when changing the link training patterns (which is programmed via the DP_TP_CTL register on DDI platforms). v2: - Fix the commit message wrt. voltage/pre-emph level values in intel_dp->DP. (Ville) Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200714153141.10280-2-imre.deak@intel.com Signed-off-by: Rodrigo Vivi commit 963501bdd094acb4a382d185a9754cd30b8903ba Author: Imre Deak Date: Tue Jul 14 18:31:40 2020 +0300 drm/i915/ddi: Don't frob the DP link scramble disabling flag According to BSpec this flag should not be changed while the DDI function is enabled. On BDW+ the DP_TP_CTL register spec also states it explicitly that the HW takes care of enabling/disabling the scrambling for training patterns (and it must stay enabled for normal pixel output). Assume that this HW automatic handling of scrambling is also true for HSW. BSpec: 8013, 7557, 50484 Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200714153141.10280-1-imre.deak@intel.com Signed-off-by: Rodrigo Vivi commit 366ec167ea73c36ec2a2ccd144306623e8e49b9c Author: Ville Syrjälä Date: Tue Jul 14 18:26:25 2020 +0300 drm/i915: Make i830 .get_cdclk() assignment less confusing Explicitly check for i830 when assigning the .get_cdclk() vfunc, and then deal with the case of not having assigned the vfunc separately. Less confusing, and gets rid of the checkpatch complaint about using {} on one branch but not the others. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200714152626.380-3-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Rodrigo Vivi commit 0e954383ff575d42095eeb8a8083ada693053e5e Author: Ville Syrjälä Date: Tue Jul 14 18:26:24 2020 +0300 drm/i915: Fix some whitespace Some spaces have snuck in where we want tabs. Fix it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200714152626.380-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Rodrigo Vivi commit 124c7088b87fdf97530fe96d7c025fce9198ed9c Author: Ville Syrjälä Date: Tue Jul 14 18:26:23 2020 +0300 drm/i915: Pack struct intel_cdclk_vals There's a pointless hole in struct intel_cdclk_vals, get rid of it. Fortunately we already use named initializers so the order does not matter. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200714152626.380-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Rodrigo Vivi commit 83c0926f3e189e91137c5311f2d187eafc6091a0 Author: Ville Syrjälä Date: Tue Jul 14 23:19:45 2020 +0300 drm/i915/fbc: Limit cfb to the first 256MiB of stolen on g4x+ Since g4x the CFB base only takes a 28bit offset into stolen. Not sure if the CFB is allowed to start below that limit but then extend beyond it. Let's assume not and just restrict the allocation to the first 256MiB (in the unlikely case we have more stolen than that). v2: s/BIT/BIT_ULL/ (Chris) Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200714201945.18959-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Rodrigo Vivi commit f8f79fa6bb258fe19cc0e9bc220807fb171d6865 Author: Christian Eggers Date: Thu Aug 13 10:59:59 2020 +0200 dt-bindings: at25: convert the binding document to yaml Convert the binding document for at25 EEPROMs from txt to yaml. Signed-off-by: Christian Eggers Link: https://lore.kernel.org/r/20200813085959.15946-1-ceggers@arri.de Signed-off-by: Rob Herring commit ea0c0ad6b6eb36726088991d97a55b99cae456d0 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:15 2020 +0200 memory: Enable compile testing for most of the drivers Most of the memory controller drivers do not depend on architecture specific code so can be compile tested to increase build coverage. When compile tested, do not enable them by default. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200724074038.5597-7-krzk@kernel.org commit 904ffa81b709f79b906077e72f4656bdb9930340 Author: Krzysztof Kozlowski Date: Fri Jul 24 19:40:16 2020 +0200 memory: brcmstb_dpfe: add separate entry for compile test Add separate entry for Broadcom STB DPFE driver, enabled by default on ARCH_BRCMSTB. This allows compile testing. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli commit 4a661364e6ff2901b29107cb8b9e57828418c887 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:33 2020 +0200 memory: tegra: tegra210-emc: fix indentation Use tabs instead of spaces for indentation. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200724074038.5597-25-krzk@kernel.org commit 3cd7040762a4727894f5f4bbb25550dc6f557ea7 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:25 2020 +0200 memory: renesas-rpc-if: simplify with PTR_ERR_OR_ZERO Use PTR_ERR_OR_ZERO to make the code a little bit simpler. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200724074038.5597-17-krzk@kernel.org commit dc1a9283f16a5c5c08a3d3b473e43a826ec3a177 Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:22 2020 +0200 memory: omap-gpmc: consistently use !res for NULL checks The driver already uses 'if (!res)' pattern in the probe function so be consistent. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200724182328.3348-11-krzk@kernel.org commit 07b6cc4540d3f3f198b62efd73a43806f031b2d6 Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:20 2020 +0200 memory: omap-gpmc: use WARN() instead of BUG() on wrong free Since driver tracks reserved memory, freeing a non-reserved GPMC should not be fatal and crash the system. Printing a warning is friendlier. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200724182328.3348-9-krzk@kernel.org commit 1724f1b6963a412d42696dd0d3c172fe983d1353 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:30 2020 +0200 memory: omap-gpmc: remove GPMC_SET_ONE_CD_MAX macro for safety The GPMC_SET_ONE_CD_MAX macro uses return statement and variable 'cs' coming from called scope. This is not a good practice. Also checkpatch complained: WARNING: Macros with flow control statements should be avoided ERROR: Macros starting with if should be enclosed by a do - while loop to avoid possible if/else logic defects Since GPMC_SET_ONE_CD_MAX macro just calls one function, it can be open coded. The difference with original code is that function will exit on error not after every register set, but after a group of sets. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200724074038.5597-22-krzk@kernel.org commit d25112aa34d007deaef3f2b373ab98ab1a7fc92d Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:29 2020 +0200 memory: omap-gpmc: return meaningful error codes in gpmc_cs_set_timings() The callers of gpmc_cs_set_timings() expect to receive -ERRNO on errors and they pass further what they have received. However gpmc_cs_set_timings() was returning -1 (equal to -EPERM) which does not make sense in this context. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200724074038.5597-21-krzk@kernel.org commit ddbfbcba4933b50680ae0b6a789e3bbce3f356a4 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:11 2020 +0200 memory: omap-gpmc: remove unused file-scope phys_base and mem_size The file-scope variables phys_base and mem_size are assigned in gpmc_probe() but never read. This fixes build error when compile testing on x86_64 architecture: drivers/memory/omap-gpmc.c:246:24: error: conflicting types for ‘phys_base’ static resource_size_t phys_base, mem_size; In file included from arch/x86/include/asm/page.h:12:0, from arch/x86/include/asm/thread_info.h:12, from include/linux/thread_info.h:38, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:78, from include/linux/spinlock.h:51, from include/linux/irq.h:14, from drivers/memory/omap-gpmc.c:12: arch/x86/include/asm/page_64.h:12:22: note: previous declaration of ‘phys_base’ was here extern unsigned long phys_base; Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200724074038.5597-3-krzk@kernel.org commit 8e9ffd5ed368c267edaf4e585e7d3813cc76cf7c Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:10 2020 +0200 memory: omap-gpmc: remove unneeded asm/mach-types.h inclusion The driver does not use macros from asm/mach-types.h (neither MACH_TYPE nor machine_is_xxx()). Removal of this include allows compile testing on non-ARM architectures which lack this header. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200724074038.5597-2-krzk@kernel.org commit 6fecfc82529d3cac41bb1f36b9b825926c1657e7 Author: Bhawanpreet Lakha Date: Thu Aug 13 16:51:09 2020 -0400 drm/amd/display: Add DSC_DBG_EN shift/mask for dcn3 This field is not defined for DCN3 Signed-off-by: Bhawanpreet Lakha Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 2ac685bfca27dd692b772fdd66b59ef1d83453be Author: Anthony Koo Date: Fri Aug 7 21:06:11 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.29 [Header Changes] - Add command for panel power seq control Signed-off-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit e0f7ff99c92ff5e033e169c30cff607ff7c17192 Author: Jaehyun Chung Date: Wed Aug 5 17:28:53 2020 -0400 drm/amd/display: Mask DPCD field to avoid reading unsupported field value [Why] DSC will be disabled if DPCD 0006F[6:3] is set to a non-zero value because bits 6:3 are not currently supported. When 6:3 is populated, an unsupported INCREMENT OF bits_per_pixel value is read (DPCD 0006F[2:0]) [How] Mask the INCREMENT OF bits_per_pixel field so that values in the unsupported field are ignored. Signed-off-by: Jaehyun Chung Reviewed-by: Wenjing Liu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5ab7943187f22b572fd12d517bd699771b88ce91 Author: Krunoslav Kovac Date: Thu Aug 6 17:54:47 2020 -0400 drm/amd/display: fix pow() crashing when given base 0 [Why&How] pow(a,x) is implemented as exp(x*log(a)). log(0) will crash. So return 0^x = 0, unless x=0, convention seems to be 0^0 = 1. Cc: stable@vger.kernel.org Signed-off-by: Krunoslav Kovac Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8cfc40cd97475fcddb2ca4671eaea2eb26b31e0a Author: Chris Park Date: Thu Aug 6 15:40:01 2020 -0400 drm/amd/display: Reset scrambling on Test Pattern [Why] Programming is missing the sequence where for eDP the scrambling is reset when testing for eye diagram test pattern. [How] Include the required register in the definition Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 6798d04205d171df94b016163b13094179878d67 Author: Lewis Huang Date: Thu Jul 30 18:00:23 2020 +0800 drm/amd/display: Add extra T3 delay [Why] For some special panel, it will have an invalid HPD high cause driver DPCD read/write fail. [How] Add extra T3 delay as a monitor patch in dce110_edp_wait_for_hpd_ready Signed-off-by: Lewis Huang Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 91b440ed2542510ef33ede55c12465b61c8acfa6 Author: Guillaume Tucker Date: Mon Aug 10 13:22:07 2020 +0100 ARM: dts: exynos: add prefetch properties for L2C-310 cache Add the devicetree properties to enable instruction and data prefetch on exynos4210 and exynos4412 which use the L2C-310 cache. No other Exynos chip appears to be using this L2 cache hardware. This follows the default bits being set in the l2c_aux_val register for the Exynos platform, which can now be cleared as a result. Signed-off-by: Guillaume Tucker Signed-off-by: Krzysztof Kozlowski commit bcc6aa61c82d4f12df3ecc884a9eef9d566edae9 Author: Eryk Brol Date: Fri Jun 19 14:42:09 2020 -0400 drm/amd/display: Fix DSC force enable on SST [why] Previously when force enabling DSC on SST display we unknowingly supressed lane count, which caused DSC to be enabled automatically. [how] By adding an additional flag to force enable DSC in dc_dsc.c DSC can always be enabled with debugfs dsc_clock_en forced to 1 Cc: stable@vger.kernel.org Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Wenjing Liu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4bb23a544667a5c9f6dd158abf5158c120e1707f Author: Dmytro Laktyushkin Date: Thu Aug 6 13:57:08 2020 -0400 drm/amd/display: fix dcn3 wide timing dsc validation Wide timing DSC requires odm. Since spreadsheet is missing this dsc validation we have to modify DML vba code ourselves. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Wesley Chalmers Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ce271b40a91f781af3dee985c39e841ac5148766 Author: Qingqing Zhuo Date: Thu Jul 30 15:35:41 2020 -0400 drm/amd/display: Screen corruption on dual displays (DP+USB-C) [why] Current pipe merge and split logic only supports cases where new dc_state is allocated and relies on dc->current_state to gather information from previous dc_state. Calls to validate_bandwidth on UPDATE_TYPE_MED would cause an issue because there is no new dc_state allocated, and data in dc->current_state would be overwritten during pipe merge. [how] Only allow validate_bandwidth when new dc_state space is created. Signed-off-by: Qingqing Zhuo Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ccc875052f829a03d1c9f67fc3a8709fe6c67c31 Author: Yongqiang Sun Date: Wed Aug 5 11:34:53 2020 -0400 drm/amd/display: Add read backlight interface [Why & How] Add read backlight interface to get ABM data. Signed-off-by: Yongqiang Sun Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 6ee90e88b976743835d4f34f3234d775c733ef12 Author: hersen wu Date: Wed Jul 8 22:14:41 2020 -0400 drm/amd/display: PSR eDP p-state warning occurs intermittently after unplug DP [Why] with eDP + DP, each display use one pipe. after DP unplugged, eDP switch from one pipe to two pipes -- pipe split. dpp1_cm_set_regamma_pwl will be executed too. The duration from switch single pipe to dual pipes is a little long which could let eDP enter PSR mode. upon two pipes for eDP are setup, eDP PHY is disabled. front pipe is not really running to fetch data from frame buffer. i.e., dchubp is not in normal working status. execution of hubbub1_wm_change_req_wa may cause p-state warning. [How] disable eDP PSR before dc_commit_state. psr is disabled when execute hubbub1_wm_change_req_wa. Signed-off-by: Hersen Wu Reviewed-by: Roman Li Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 9804ecbba8f73916101ac36929bc647c3cb17155 Author: Paul Hsieh Date: Wed Aug 5 17:28:37 2020 +0800 drm/amd/display: Fix DFPstate hang due to view port changed [Why] Place the cursor in the center of screen between two pipes then adjusting the viewport but cursour doesn't update cause DFPstate hang. [How] If viewport changed, update cursor as well. Cc: stable@vger.kernel.org Signed-off-by: Paul Hsieh Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ecfe7569a512852eb35fe0edf73089e6451152e4 Author: Yongqiang Sun Date: Fri Jul 31 13:57:05 2020 -0400 drm/amd/display: Change ABM config init interface [Why & How] change abm config init interface to support multiple ABMs. Signed-off-by: Yongqiang Sun Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 952c54446a8af7d1bff826c4e167531aa3e97e4f Author: Guillaume Tucker Date: Mon Aug 10 13:22:05 2020 +0100 ARM: exynos: clear L310_AUX_CTRL_NS_LOCKDOWN in default l2c_aux_val The L310_AUX_CTRL_NS_LOCKDOWN flag is set during the L2C enable sequence. There is no need to set it in the default register value, this was done before support for it was implemented in the code. It is not set in the hardware initial value either. Clean this up by removing this flag from the default l2c_aux_val, and add it to the l2c_aux_mask to print an alert message if it was already set before the kernel initialisation. Signed-off-by: Guillaume Tucker Signed-off-by: Krzysztof Kozlowski commit c08321cb181d5677dedec276f9a11990f27c8d99 Author: Wenjing Liu Date: Thu Jul 9 17:08:50 2020 -0400 drm/amd/display: create a function to decide mst link settings [why] create a dedicated function to make mst link settings decision, so that the policy's decision is made in a unified place. Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5a7c86e168b4b3229945f792ba0ea04c5236521f Author: Chris Park Date: Wed Aug 5 16:59:28 2020 -0400 drm/amd/display: Assign correct left shift [Why] Reading for DP alt registers return incorrect values due to LE_SF definition missing. [How] Define correct LE_SF or DP alt registers. Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8a0e210c048e97f950c674840e281e378de08373 Author: Chris Park Date: Wed Aug 5 13:46:40 2020 -0400 drm/amd/display: Call DMUB for eDP power control [Why] If DMUB is used, LVTMA VBIOS call can be used to control eDP instead of tranditional transmitter control. Interface is agreed with VBIOS for eDP to use this new path to program LVTMA registers. [How] Create DAL interface to send DMUB command for LVTMA as currently implemented in VBIOS. Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1ffe92021e6cd27ee9ccc30012a57d8a4868e28f Author: Anthony Koo Date: Mon Aug 3 16:12:58 2020 -0400 drm/amd/display: 3.2.98 Signed-off-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 45083ed24b8df3b43ce17c5598b6304a044659e6 Author: Anthony Koo Date: Mon Aug 3 16:11:44 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.28 Signed-off-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4444457450fa66860fca856c6dd20f7acde80efa Author: Kevin Wang Date: Mon Aug 17 16:57:20 2020 +0800 drm/amdgpu: add condition check for trace_amdgpu_cs() v1: add trace event enabled check to avoid nop loop when submit multi ibs in amdgpu_cs_ioctl() function. v2: add a new wrapper function to trace all amdgpu cs ibs. Signed-off-by: Kevin Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 736b17297857cf533649a4161d1369e3cde0d922 Author: Kevin Wang Date: Mon Aug 17 14:55:11 2020 +0800 drm/amdgpu: fix amdgpu_bo_release_notify() comment error fix amdgpu_bo_release_notify() comment error. Signed-off-by: Kevin Wang Reviewed-by: Christian König Reviewed-by: Dennis Li Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit d95c42a150d01e28830e0f597bc126a20db8fd0b Author: Huang Rui Date: Tue Aug 11 13:54:56 2020 +0800 drm/amdkfd: fix the wrong sdma instance query for renoir Renoir only has one sdma instance, it will get failed once query the sdma1 registers. So use switch-case instead of static register array. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 78013a1cf2971684775f6956d5666237ac53a1aa Author: Adam Thomson Date: Tue Aug 11 17:57:25 2020 +0100 ASoC: da7219: Fix clock handling around codec level probe Previously the driver would use devm_* related functions at the codec level probe() to allocate clock resources for MCLK and the DAI clocks exposed by the device. This caused issues when registering clocks on a re-probe (no device level remove/prove involved) as the devm_* resources were never freed up so the clocks were still registered from the previous codec level probe(). This commit updates the clock handling for MCLK usage and DAI clock provision to fix this discrepancy and allow the codec level probe/remove functionality to operate as intended. Signed-off-by: Adam Thomson Link: https://lore.kernel.org/r/b92c461baeed27a6cd92e59e36a55c2547218683.1597164865.git.Adam.Thomson.Opensource@diasemi.com Signed-off-by: Mark Brown commit aa5b18d1c29023b315073661b74c67f91bf2f27c Author: Adam Thomson Date: Tue Aug 11 17:57:24 2020 +0100 ASoC: da7219: Move soft reset handling to codec level probe As part of the reorganisation of the device level and codec level probe functionlity, the soft reset handling should really reside at the codec level and after the instantiation of supplies. This commit makes the relevant changes to support this change of scope including the remove of devm_* functions being called for regulator instantiation at the codec level. Signed-off-by: Adam Thomson Link: https://lore.kernel.org/r/f7603a4855647429b754ce76f887ec441622015c.1597164865.git.Adam.Thomson.Opensource@diasemi.com Signed-off-by: Mark Brown commit 21f279f34c212e82f0330697394840898908f7a6 Author: Adam Thomson Date: Tue Aug 11 17:57:23 2020 +0100 ASoC: da7219: Move required devm_* allocations to device level code In preparation for cleanup of device level and codec level probe funcitonality, all necessary devm_* allocations and fw retrieval functions are moved to the I2C probe level code. Signed-off-by: Adam Thomson Link: https://lore.kernel.org/r/7a9a2ead6e37820a6025c0a62dc45952d5032ab7.1597164865.git.Adam.Thomson.Opensource@diasemi.com Signed-off-by: Mark Brown commit a08cd56a45245ea422d77e7ee5ce20d5f21f5b5d Author: Srinivas Kandagatla Date: Mon Jul 27 10:38:06 2020 +0100 ASoC: q6asm-dai: add support to copy callback During gapless playback, its possible for previous track to end at unaligned boundary, starting next track on the same boundary can lead to unaligned address exception in dsp. So implement copy callback for finer control on the buffer offsets. Signed-off-by: Srinivas Kandagatla Tested-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200727093806.17089-11-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit ee941a338ad67dfd852826eec381d8584edf29f2 Author: Srinivas Kandagatla Date: Mon Jul 27 10:38:05 2020 +0100 ASoC: q6asm-dai: add gapless support Add support to gapless playback by implementing metadata, next_track, drain and partial drain support. Gapless on Q6ASM is implemented by opening 2 streams in a single q6asm stream and toggling them on next track. Signed-off-by: Srinivas Kandagatla Tested-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200727093806.17089-10-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 5b39363e54ccca8fee700e5cc6acf42a80ff1de3 Author: Srinivas Kandagatla Date: Mon Jul 27 10:38:04 2020 +0100 ASoC: q6asm-dai: prepare set params to accept profile change rearrange code so that it will be easy to change the codec profile at runtime. This means moving exiting set_params to an internal wrapper which can be called when codec profile changes. This is also preparing the code for easy to use in gapless cases. Signed-off-by: Srinivas Kandagatla Tested-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200727093806.17089-9-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 135bd5ea190f3e31d2289da98a53d28e1be5b6bf Author: Srinivas Kandagatla Date: Mon Jul 27 10:38:03 2020 +0100 ASoC: q6asm-dai: add next track metadata support This patch adds support to metadata required to do a gapless playback. Signed-off-by: Srinivas Kandagatla Tested-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200727093806.17089-8-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 983b8864f6033336e619a5936a02aea3026c5742 Author: Srinivas Kandagatla Date: Mon Jul 27 10:38:02 2020 +0100 ASoC: q6asm: add support to gapless flag in q6asm open This patch adds support to gapless flag to q6asm_open_write(). Signed-off-by: Srinivas Kandagatla Tested-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200727093806.17089-7-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 39376129783168c51981bd2c195a1d10ae63104f Author: Srinivas Kandagatla Date: Mon Jul 27 10:38:01 2020 +0100 ASoC: q6asm: add support to remove intial and trailing silence This patch adds support to ASM_DATA_CMD_REMOVE_INITIAL_SILENCE and ASM_DATA_CMD_REMOVE_TRAILING_SILENCE q6asm command to support compressed metadata for gapless playback. Signed-off-by: Srinivas Kandagatla Tested-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200727093806.17089-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 50d4e2146cdd48fcc1cd748dfb06dd0fc486eb26 Author: Srinivas Kandagatla Date: Mon Jul 27 10:38:00 2020 +0100 ASoC: q6asm: add length to write command token Add length to write command packet token so that we can track exactly how many bytes are consumed by DSP in the command reply. This is useful in some use-cases where the end of the file/stream is not aligned with period size. Signed-off-by: Srinivas Kandagatla Tested-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200727093806.17089-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit e0c078a8da333eb45745d1c5e4b72f0314b8b742 Author: Srinivas Kandagatla Date: Mon Jul 27 10:37:59 2020 +0100 ASoC: q6asm: use flags directly from q6asm-dai use flags set by q6asm-dais directly! This will be useful gapless case where write needs a special flag to indicate that last buffer. Signed-off-by: Srinivas Kandagatla Tested-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200727093806.17089-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 789e3b6c5238448a6dcfc9bc998dfe3ea9d87150 Author: Srinivas Kandagatla Date: Mon Jul 27 10:37:58 2020 +0100 ASoC: q6asm: make commands specific to streams Each ASM session can have multiple streams attached to it, current design was to allow only one static stream id 1 per each session. However for use-case like gapless, we would need 2 streams to open per session. This patch converts all the q6asm apis to take stream id as argument to allow multiple streams to open on a single session, This is useful for gapless playback cases. Now the dai driver can specify which stream id for each command. Signed-off-by: Srinivas Kandagatla Tested-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200727093806.17089-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 99b7db5f6d4090e98eee79cefc8521fdf4f46ad8 Author: Srinivas Kandagatla Date: Mon Jul 27 10:37:57 2020 +0100 ASoC: q6asm: rename misleading session id variable Each q6asm session can have multiple streams, mixing usage of these names in variable are bit misleading to reader, so rename them accordingly. Signed-off-by: Srinivas Kandagatla Tested-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200727093806.17089-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 73dff51f575c7f48a8a115bf9648243912fb12e9 Author: Krzysztof Kozlowski Date: Wed Jul 29 09:43:25 2020 +0200 ARM: samsung: fix kerneldoc of s3c_pm_do_restore_core() Fix W=1 compile warnings (invalid kerneldoc): arch/arm/plat-samsung/pm-common.c:68: warning: Function parameter or member 'ptr' not described in 's3c_pm_do_restore_core' arch/arm/plat-samsung/pm-common.c:68: warning: Function parameter or member 'count' not described in 's3c_pm_do_restore_core' Signed-off-by: Krzysztof Kozlowski commit 7bcb41c5d157cd0908408e49f5d0a8ab1c576de7 Author: Krzysztof Kozlowski Date: Wed Aug 5 22:32:29 2020 +0200 mmc: s3cmci: remove unneeded machine header include The s3cmci driver does not use machine header mach/dma.h. Signed-off-by: Krzysztof Kozlowski Acked-by: Ulf Hansson Acked-by: Arnd Bergmann commit 903bfd46d04908900584fbe270995ca38f062f40 Author: Krzysztof Kozlowski Date: Thu Aug 6 20:20:18 2020 +0200 ARM: s3c: remove unneeded machine header includes Not all units use the contents of mach/hardware.h and mach/dma.h. Remove these includes when not needed. Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann commit 455102d435a01bfed582f233b56a3338b608f2f2 Author: Krzysztof Kozlowski Date: Tue Aug 4 21:26:53 2020 +0200 ARM: s3c24xx: ts: document function argument Document function argument in kerneldoc comment to fix W=1 compile warning: arch/arm/mach-s3c24xx/setup-ts.c:27: warning: Function parameter or member 'dev' not described in 's3c24xx_ts_cfg_gpio' Signed-off-by: Krzysztof Kozlowski commit 79f35b7cc664bdc018c909b47e539525b5f9015a Author: Krzysztof Kozlowski Date: Tue Aug 4 21:26:52 2020 +0200 ARM: s3c24xx: ts: include platform data header Include platform_data/touchscreen-s3c2410.h header in the touchscreen code to bring the prototypes of defined functions and fix W=1 compile warning: arch/arm/mach-s3c24xx/setup-ts.c:24:6: warning: no previous prototype for 's3c24xx_ts_cfg_gpio' [-Wmissing-prototypes] Signed-off-by: Krzysztof Kozlowski commit dc986f243ea418a269394f76fd8c7fefdbf18f43 Author: Krzysztof Kozlowski Date: Tue Aug 4 21:26:51 2020 +0200 ARM: s3c24xx: sdhci: include plat/sdhci.h header Include plat/sdhci.h header in the sdhci code to bring the prototypes of defined functions and fix W=1 compile warnings: arch/arm/mach-s3c24xx/setup-sdhci-gpio.c:21:6: warning: no previous prototype for 's3c2416_setup_sdhci0_cfg_gpio' [-Wmissing-prototypes] arch/arm/mach-s3c24xx/setup-sdhci-gpio.c:26:6: warning: no previous prototype for 's3c2416_setup_sdhci1_cfg_gpio' [-Wmissing-prototypes] Signed-off-by: Krzysztof Kozlowski commit dce6e8ee6188935dd3adc8d368f3d63d8a6ea338 Author: Krzysztof Kozlowski Date: Tue Aug 4 21:26:50 2020 +0200 ARM: s3c24xx: include common.h header in s3c2443.c Include common.h header in the s3c2443.c to bring the prototypes of defined functions and fix W=1 compile warnings: arch/arm/mach-s3c24xx/s3c2443.c:60:12: warning: no previous prototype for 's3c2443_init' [-Wmissing-prototypes] arch/arm/mach-s3c24xx/s3c2443.c:77:13: warning: no previous prototype for 's3c2443_init_uarts' [-Wmissing-prototypes] arch/arm/mach-s3c24xx/s3c2443.c:88:13: warning: no previous prototype for 's3c2443_map_io' [-Wmissing-prototypes] Signed-off-by: Krzysztof Kozlowski commit 80c0b155e564123e4e4cb31ff1f68366919430c0 Author: Krzysztof Kozlowski Date: Tue Aug 4 21:26:45 2020 +0200 ARM: s3c: remove plat-samsung/.../samsung-time.h Remove the arch/arm/plat-samsung/include/plat/samsung-time.h header and move the contents to common.h headers in mach-s3c24xx and mach-s3c64xx. The definition of declared functions is already in common.c in mach directories, so it is logically to put declaration next to them. This is also one step further towards removal of plat-samsung directory and it fixes W=1 build warnings: arch/arm/mach-s3c64xx/common.c:174:13: warning: no previous prototype for 'samsung_set_timer_source' [-Wmissing-prototypes] arch/arm/mach-s3c64xx/common.c:180:13: warning: no previous prototype for 'samsung_timer_init' [-Wmissing-prototypes] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Tomasz Figa commit 16b17fcf77f2145b98cabbca6bfe6ea13c90bb08 Author: Krzysztof Kozlowski Date: Tue Aug 4 21:26:43 2020 +0200 clk: samsung: s3c24xx: declare s3c24xx_common_clk_init() in shared header The s3c2410_common_clk_init() and others are defined and used by the clk-s3c24xx driver and also used in the mach-s3c24xx machine code. Move the declaration to a header to fix W=1 build warnings: drivers/clk/samsung/clk-s3c2410.c:320:13: warning: no previous prototype for 's3c2410_common_clk_init' [-Wmissing-prototypes] 320 | void __init s3c2410_common_clk_init(struct device_node *np, unsigned long xti_f, drivers/clk/samsung/clk-s3c2412.c:205:13: warning: no previous prototype for 's3c2412_common_clk_init' [-Wmissing-prototypes] 205 | void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f, drivers/clk/samsung/clk-s3c2443.c:341:13: warning: no previous prototype for 's3c2443_common_clk_init' [-Wmissing-prototypes] 341 | void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f, Signed-off-by: Krzysztof Kozlowski Acked-by: Chanwoo Choi Reviewed-by: Stephen Boyd commit c2fe8ebb332eefb3d0543b248e28dd2992c04793 Author: Krzysztof Kozlowski Date: Tue Aug 4 21:26:42 2020 +0200 clk: samsung: s3c64xx: declare s3c64xx_clk_init() in shared header The s3c64xx_clk_init() is defined and used by the clk-s3c64xx driver and also used in the mach-s3c64xx machine code. Move the declaration to a header to fix W=1 build warning: drivers/clk/samsung/clk-s3c64xx.c:391:13: warning: no previous prototype for 's3c64xx_clk_init' [-Wmissing-prototypes] 391 | void __init s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f, Signed-off-by: Krzysztof Kozlowski Reviewed-by: Tomasz Figa Acked-by: Chanwoo Choi Reviewed-by: Stephen Boyd commit f73fefa2d98bfbc69b409052f07553bf4c40c148 Author: Krzysztof Kozlowski Date: Tue Aug 4 21:26:46 2020 +0200 ARM: samsung: fix language typo Fix Complie -> Compile Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd commit b0b276736eee92d46ed150477802ee86158b5142 Author: Krzysztof Kozlowski Date: Sun Aug 2 22:36:05 2020 +0200 ARM: s3c24xx: demote kerneldoc comment Remove kerneldoc annotation to fix warning: arch/arm/mach-s3c24xx/mach-h1940.c:185: warning: cannot understand function prototype: 'struct s3c2410fb_display h1940_lcd __initdata = ' Signed-off-by: Krzysztof Kozlowski Acked-by: Randy Dunlap commit 0e77112777f8716fc255638c02c61b0334f05b3a Author: Krzysztof Kozlowski Date: Tue Aug 4 21:26:44 2020 +0200 ARM: s3c64xx: include header to fix -Wmissing-prototypes Include the spi-s3c64xx.h header to fix W=1 build warning: arch/arm/mach-s3c64xx/setup-spi.c:11:5: warning: no previous prototype for 's3c64xx_spi0_cfg_gpio' [-Wmissing-prototypes] 11 | int s3c64xx_spi0_cfg_gpio(void) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Tomasz Figa Reviewed-by: Stephen Boyd commit bb82067abc9b6154b9c07b22e8b7fe4685129688 Author: Stephen Kitt Date: Sun Aug 9 19:22:43 2020 +0200 ARM: s3c64xx: use simple i2c probe function The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt Acked-by: Wolfram Sang Reviewed-by: Luca Ceresoli Signed-off-by: Krzysztof Kozlowski commit 351367bb05bd64f24ff0d610b98585b1e9e3bce4 Author: Krzysztof Kozlowski Date: Thu Aug 6 20:06:22 2020 +0200 MAINTAINERS: add more name matches for Samsung SoC entries The Samsung SoC maintainer entry covers drivers and headers matching "exynos" name but except that there are also files for S3C24xx, S3C64xx and S5Pv210 SoCs. These sometimes do not have a separate entry for a driver maintainer thus might miss review. Add them to the Samsung SoC maintainer entry to cover all SoCs with name matches. Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann commit 177f71f18ee595c508fdede140177765c4a4a779 Author: Krzysztof Kozlowski Date: Wed Jul 29 21:21:54 2020 +0200 MAINTAINERS: drop Vincent Sanders from Simtec S3C boards Vincent Sanders' email bounces with code 550 (user does not exist) so remove the entry from Simtec S3C24xx boards. Cc: Simtec Linux Team Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Krzysztof Kozlowski commit a106bb6eeaace283bcb9fcaeb2e2ac4097037e4b Author: Michael Sit Wei Hong Date: Tue Aug 11 12:18:36 2020 +0800 dt-bindings: sound: intel, keembay-i2s: Add new compatible string Add a new compatible string that configures the interface to the desired format. Signed-off-by: Michael Sit Wei Hong Reviewed-by: Sia Jee Heng Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200811041836.999-3-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown commit 9c3bab3c4f158bb79ebd7443ef83c32fa1a450a1 Author: Michael Sit Wei Hong Date: Tue Aug 11 12:18:35 2020 +0800 ASoC: Intel: KMB: Enable TDM audio capture Enable I2S TDM audio capture for Intel Keem Bay platform. The I2S TDM will support 4 channel and 8 channel audio capture only. 4 channel and 8 channel audio capture operates only in slave mode. Signed-off-by: Michael Sit Wei Hong Reviewed-by: Sia Jee Heng Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200811041836.999-2-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown commit 2ca0c6a30fc3077a6010ca6ea8f3654915c8f35c Author: Florian Fainelli Date: Tue Jun 18 16:07:29 2019 -0700 ARM: bcm: 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 commit 6b84ca265fe5fb15863202544ccff8090a1b4425 Author: Florian Fainelli Date: Tue Feb 18 16:12:21 2020 -0800 ARM: brcmstb: Add debug UART entry for 72614 72164 has the same memory map as 7278 and the same physical address for the UART, alias the definition accordingly. Signed-off-by: Florian Fainelli commit f4d1afc0a454ff8a7d45a2b98de05f6fcbfb2650 Author: Álvaro Fernández Rojas Date: Sat Jun 13 10:21:40 2020 +0200 MIPS: BMIPS: dts: add BCM63268 power domain support BCM63268 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Acked-by: Thomas Bogendoerfer Signed-off-by: Florian Fainelli commit 07fcf7772f57016bc2c0af9558619bb732ce1b94 Author: Álvaro Fernández Rojas Date: Sat Jun 13 10:21:39 2020 +0200 MIPS: BMIPS: dts: add BCM6362 power domain support BCM6362 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Acked-by: Thomas Bogendoerfer Signed-off-by: Florian Fainelli commit 60515712abee9e424dc3e5aab04f34eaab4efffb Author: Álvaro Fernández Rojas Date: Sat Jun 13 10:21:38 2020 +0200 MIPS: BMIPS: dts: add BCM6328 power domain support BCM6328 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Acked-by: Thomas Bogendoerfer Signed-off-by: Florian Fainelli commit 6c41106f177e1e3e198604f42adedc8be97c482a Author: Álvaro Fernández Rojas Date: Sat Jun 13 10:21:37 2020 +0200 soc: bcm: add BCM63xx power domain driver BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Signed-off-by: Florian Fainelli commit 8bf86a155688f3acbc5919cdf58c59378d62a663 Author: Álvaro Fernández Rojas Date: Sat Jun 13 10:21:36 2020 +0200 MIPS: BMIPS: add BCM6318 power domain definitions BCM6318 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Florian Fainelli commit 5a3be0d0ccfb21d1223f77746d260450d94df9e4 Author: Álvaro Fernández Rojas Date: Sat Jun 13 10:21:35 2020 +0200 MIPS: BMIPS: add BCM63268 power domain definitions BCM63268 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Florian Fainelli commit 9f9fd9766a288e259ad7cefbf3e45e1ec117b50b Author: Álvaro Fernández Rojas Date: Sat Jun 13 10:21:34 2020 +0200 MIPS: BMIPS: add BCM6362 power domain definitions BCM6362 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Florian Fainelli commit 5292481134b2c4d64e1279158917dc9b53713721 Author: Álvaro Fernández Rojas Date: Sat Jun 13 10:21:33 2020 +0200 MIPS: BMIPS: add BCM6328 power domain definitions BCM6328 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Florian Fainelli commit 7c12a14802a2a5d7fd43fd11db45567bfb5e17b7 Author: Álvaro Fernández Rojas Date: Sat Jun 13 10:21:32 2020 +0200 dt-bindings: soc: brcm: add BCM63xx power domain binding BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller to enable/disable certain components in order to save power. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Florian Fainelli commit 9eda7c1f6fb45f590cc96bc8352a028ceed47fcc Author: Florian Fainelli Date: Mon Mar 30 21:13:28 2020 -0700 soc: bcm: brcmstb: biuctrl: Enable Read-ahead cache Brahma-B53 and Cortex-A72 CPUs integrated on Broadcom STB SoCs feature a read-ahead cache that performs cache line size adaptation between the bus interface unit and the memory controller. On 32-bit ARM kernels we have to resort to a full featured read-ahead cache driver under arch/arm/mm/cache-b15-rac.c (CONFIG_CACHE_B15_RAC) because there are still cache maintenance operations by set/ways/index that cannot be transparently handled by the ARM Coherency Extension that the read-ahead cache interfaces to. The 64-bit ARM kernel however has long deprecated all of those, so this is simply a one time configuration. Signed-off-by: Florian Fainelli commit c9864df48d2e03e9205fce51c133caeed0296b1f Author: Florian Fainelli Date: Mon Nov 27 12:55:36 2017 -0800 bus: brcmstb_gisb: Shorten prints Do not print the full function name (brcmstb_gisb_arb_decode_addr) which is quite long, and reduces our chances to printing a full line, instead just use "GISB: " as a prefix for these prints. Signed-off-by: Florian Fainelli commit deae5de3340fc1b967f3d868d55104f2c8f5c517 Author: Pavel Machek Date: Mon Aug 17 18:02:55 2020 +0200 leds: sgm3140: fix led->LED for consistency Signed-off-by: Pavel Machek commit a2f8e2b4f1817d9438b281d96ca45ca455707f95 Author: Pavel Machek Date: Tue Aug 11 15:48:13 2020 +0200 leds: we don't want people to use LED subsystem for vibrations Remove notes about vibrations, as that is better done using input subsystem. Signed-off-by: Pavel Machek commit fa31311c31634e5e900d61b1eb24df4c8555b5f8 Author: Tom Rix Date: Sun Aug 9 09:32:21 2020 -0700 leds: mt6323: move period calculation clang static analysis reports this problem leds-mt6323.c:275:12: warning: Division by zero duty_hw = MT6323_CAL_HW_DUTY(*delay_on, period); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is because period can be 0. period = *delay_on + *delay_off; There is a later check that *delay_on/off are valid. if (!*delay_on && !*delay_off) { *delay_on = 500; *delay_off = 500; } Setting the delay_on/off means period needs to be recalculated anyway. So move the period statements after this check. Fixes: 216ec6cc4c19 ("leds: Add LED support for MT6323 PMIC") Signed-off-by: Tom Rix Signed-off-by: Pavel Machek commit 2d26684a4af6d0829fa9ff637ff56160d571148f Author: Krzysztof Kozlowski Date: Mon Aug 3 11:19:36 2020 +0200 leds: s3c24xx: Remove unused machine header include The driver includes machine header for GPIO registers but actually does not use them. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Pavel Machek commit 68ed226fae9d853900f0fd6025bb776ecf155250 Author: Marek Szyprowski Date: Fri Aug 7 12:21:03 2020 +0200 ARM: exynos_defconfig: enable platform media drivers Commit 06b93644f4d1 ("media: Kconfig: add an option to filter in/out platform drivers") introduced a dependency of all platform media drivers on the new CONFIG_MEDIA_PLATFORM_SUPPORT symbol, so add it also to exynos_defconfig. While touching this part, update the media related configs to the current layout. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit a084c9d2042d43f0b7b514d040e635d8b1fb643a Author: Krzysztof Kozlowski Date: Mon Jun 29 22:38:59 2020 +0200 dt-bindings: arm: samsung: Do not require clkout on Exynos5260 and Exynos7 The PMU (Power Management Unit) driver is a clkout clock provider (for clock signal monitoring) only for certain Exynos SoCs. It was never implemented for Exynos5260 and Exynos7. This fixes dtschema validator warnings like: system-controller@105c0000: '#clock-cells' is a required property Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring commit a553f90b6714504633e6356e04c41264904a1e85 Author: Simon Shields Date: Tue Jul 28 15:11:11 2020 +0200 ARM: dts: exynos: Add sound support to Midas Update the never-mainlined "samsung,trats2-audio" binding and instead use the new "samsung,midas-audio" binding. Signed-off-by: Simon Shields [s.nawrocki: fixed DAPM routing entries for MICBIAS1/2, adjusted to new cpu/codec binding, corrected the regulator nodes indexing] Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit 12b7b5c04bccc82db74f7c0de8e2d2b93d27cebf Author: Qinglang Miao Date: Tue Jul 28 10:27:56 2020 +0800 ARM: s3c64xx: fix return value check in s3c_usb_otgphy_init() The function clk_get() returns ERR_PTR() in case of error and never returns NULL. So there's no need to test whether xusbxti is NULL, just remove the redundant part in the return value check. Signed-off-by: Qinglang Miao Signed-off-by: Krzysztof Kozlowski commit 9d4befff5a959e5f2f94357b3554a6929f596e15 Author: Michael Sit Wei Hong Date: Wed Aug 12 17:46:31 2020 +0800 ASoC: codec: tlv3204: Moving GPIO reset and add ADC reset Moving GPIO reset to a later stage and before clock registration to ensure that the host system and codec clocks are in sync. If the host register clock values prior to gpio reset, the last configured codec clock is registered to the host. The codec then gets gpio resetted setting the codec clocks to their default value, causing a mismatch. Host system will skip clock setting thinking the codec clocks are already at the requested rate. ADC reset is added to ensure the next audio capture does not have undesired artifacts. It is probably related to the original code where the probe function resets the ADC prior to 1st record. Signed-off-by: Michael Sit Wei Hong Reviewed-by: Sia Jee Heng Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200812094631.4698-4-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown commit d1c859d314d87c6f4dc09c3d7cf6f3ec9f44bcc5 Author: Michael Sit Wei Hong Date: Wed Aug 12 17:46:30 2020 +0800 ASoC: codec: tlv3204: Increased maximum supported channels Increased maximum supported channel to 8 channels for audio capture running in TDM mode. Signed-off-by: Michael Sit Wei Hong Reviewed-by: Sia Jee Heng Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200812094631.4698-3-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown commit dcd79364bff36ce1341a59be8142ded5b7da7d19 Author: Michael Sit Wei Hong Date: Wed Aug 12 17:46:29 2020 +0800 ASoC: codec: tlv3204: Enable 24 bit audio support Enable 24 bit in 32 bit container audio support. Using the params_physical_width to differentiate 24 bit in 32 bit container and 24 bit in 24 bit container modes. Use the sample rate, bit depth and channel parameters to calculate the bit clock needed. Signed-off-by: Michael Sit Wei Hong Reviewed-by: Sia Jee Heng Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200812094631.4698-2-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown commit bf9c912f9a649776c2d741310486a6984edaac72 Author: Ricardo Neri Date: Thu Aug 6 20:28:33 2020 -0700 x86/cpu: Use SERIALIZE in sync_core() when available The SERIALIZE instruction gives software a way to force the processor to complete all modifications to flags, registers and memory from previous instructions and drain all buffered writes to memory before the next instruction is fetched and executed. Thus, it serves the purpose of sync_core(). Use it when available. Suggested-by: Andy Lutomirski Signed-off-by: Ricardo Neri Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20200807032833.17484-1-ricardo.neri-calderon@linux.intel.com commit 7829e68d55692c9f7f5665ebec9fa1f33d5ad72f Author: Samuel Holland Date: Sat Jul 25 21:53:34 2020 -0500 ASoC: sun50i-codec-analog: Enable DAPM for earpiece switch By including the earpiece mute switch in the DAPM graph, both the earpiece amplifier and the Mixer/DAC inputs can be powered off when the earpiece is muted. While the widget is really just a simple switch, it is represented as a "mixer with named controls" to avoid including the widget name in the kcontrol name. Otherwise, it is not possible to give the widget an accurate, descriptive name without changing the kcontrol name seen by userspace (which should be stable). The mute switch is between the source selection and the amplifier, as per the diagram in the SoC manual. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200726025334.59931-9-samuel@sholland.org Signed-off-by: Mark Brown commit 95d34762f201c0f7cf0ed920815f349cfe336fe1 Author: Samuel Holland Date: Sat Jul 25 21:53:33 2020 -0500 ASoC: sun50i-codec-analog: Enable DAPM for line out switch By including the line out mute switch in the DAPM graph, the Mixer/DAC inputs can be powered off when the line output is muted. The line outputs have an unusual routing scheme. The left side mute switch is between the source selection and the amplifier, as usual. The right side source selection comes *after* its amplifier (and after the left side amplifier), and its mute switch controls whichever source is currently selected. This matches the diagram in the SoC manual. Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200726025334.59931-8-samuel@sholland.org Signed-off-by: Mark Brown commit dd8286a34963c47964ab3c73d56656c9719a36b4 Author: Samuel Holland Date: Sat Jul 25 21:53:32 2020 -0500 ASoC: sun50i-codec-analog: Make line out routes stereo This matches the hardware more accurately, and is necessary for including the (stereo) line out mute switch in the DAPM graph. Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200726025334.59931-7-samuel@sholland.org Signed-off-by: Mark Brown commit 4b9f39e14cf606def16897d85da492fc54b94a43 Author: Samuel Holland Date: Sat Jul 25 21:53:31 2020 -0500 ASoC: sun50i-codec-analog: Enable DAPM for headphone switch By including the headphone mute switch to the DAPM graph, both the headphone amplifier and the Mixer/DAC inputs can be powered off when the headphones are muted. The mute switch is between the source selection and the amplifier, as per the diagram in the SoC manual. Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200726025334.59931-6-samuel@sholland.org Signed-off-by: Mark Brown commit 241a578a9ebf866351e12029fc77f5a48b742042 Author: Samuel Holland Date: Sat Jul 25 21:53:30 2020 -0500 ASoC: sun50i-codec-analog: Make headphone routes stereo This matches the hardware more accurately, and is necessary for including the (stereo) headphone mute switch in the DAPM graph. Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200726025334.59931-5-samuel@sholland.org Signed-off-by: Mark Brown commit cababecb33c05b8229558df6248d5869a38ceec3 Author: Samuel Holland Date: Sat Jul 25 21:53:29 2020 -0500 ASoC: sun50i-codec-analog: Group and sort mixer routes Sort the controls in the same order as the bits in the register. Then group the routes by sink, and sort them in the same order as the controls. This makes it much easier to verify that all mixer inputs are accounted for. Signed-off-by: Samuel Holland Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200726025334.59931-4-samuel@sholland.org Signed-off-by: Mark Brown commit 9b7612bb75e50acc55d2143cadb8057a6721d9c7 Author: Samuel Holland Date: Sat Jul 25 21:53:28 2020 -0500 ASoC: sun50i-codec-analog: Gate the amplifier clock during suspend The clock must be running for the zero-crossing mute functionality. However, it must be gated for VDD-SYS to be turned off during system suspend. Disable it in the suspend callback, after everything has already been muted, to avoid pops when muting/unmuting outputs. Signed-off-by: Samuel Holland Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200726025334.59931-3-samuel@sholland.org Signed-off-by: Mark Brown commit ad5b7f69a09b6784f6fc263d7c0fffdda947a8ce Author: Samuel Holland Date: Sat Jul 25 21:53:27 2020 -0500 ASoC: sun50i-codec-analog: Fix duplicate use of ADC enable bits The same enable bits are currently used for both the "Left/Right ADC" and the "Left/Right ADC Mixer" widgets. This happens to work in practice because the widgets are always enabled/disabled at the same time, but each register bit should only be associated with a single widget. To keep symmetry with the DAC widgets, keep the bits on the ADC widgets, and remove them from the ADC Mixer widgets. Fixes: 42371f327df0 ("ASoC: sunxi: Add new driver for Allwinner A64 codec's analog path controls") Reported-by: Ondrej Jirman Signed-off-by: Samuel Holland Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200726025334.59931-2-samuel@sholland.org Signed-off-by: Mark Brown commit 9c7deb0576d7fe4370a23f4e127b2a69325f7ce9 Author: Pierre-Louis Bossart Date: Thu Aug 13 12:58:38 2020 -0500 ASoC: Intel: bytcht_cx2072x: simplify return handling Fix cppcheck warning: sound/soc/intel/boards/bytcht_cx2072x.c:102:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813175839.59422-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1e6444271c667d56f3a793cfc295b72a1f8007da Author: Pierre-Louis Bossart Date: Thu Aug 13 12:58:37 2020 -0500 ASoC: Intel: rename shadowed variable for all broadwell boards Fix cppcheck warnings: sound/soc/intel/boards/bdw-rt5650.c:91:23: style: Local variable 'channels' shadows outer variable [shadowVariable] sound/soc/intel/boards/bdw-rt5677.c:144:23: style: Local variable 'channels' shadows outer variable [shadowVariable] sound/soc/intel/boards/broadwell.c:91:23: style: Local variable 'channels' shadows outer variable [shadowVariable] This was fixed earlier in other machine drivers but keeps coming back with copy/paste. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813175839.59422-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2e3e0bc378f205370fc4c6dbd9374d66e803ce53 Author: Pierre-Louis Bossart Date: Thu Aug 13 12:58:36 2020 -0500 ASoC: SOF: Intel: hda-codec: move variable used conditionally Cppcheck reports the following warning: sound/soc/sof/intel/hda-codec.c:122:20: style: Unused variable: codec [unusedVariable] struct hda_codec *codec; ^ Move declaration inside a conditionally-compiled block. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813175839.59422-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 11ec0edc6408a739dffca34ebbbe921817c3b10e Author: Pierre-Louis Bossart Date: Thu Aug 13 12:58:35 2020 -0500 ASOC: SOF: Intel: hda-codec: move unused label to correct position Cppcheck reports the following warning: sound/soc/sof/intel/hda-codec.c:191:1: style: Label 'error' is not used. [unusedLabel] This label is indeed only used conditionally, move it where it's actually used. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813175839.59422-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7518805fb636308909a6a7953e9fdb194abb15f8 Author: Samuel Holland Date: Sat Jul 25 20:25:54 2020 -0500 ASoC: sun8i-codec: Add a quirk for LRCK inversion On the A64, as tested using the PinePhone, the current code causes the left/right channels to be swapped during I2S playback from the CPU on AIF1, and breaks DSP_A communication with the modem on AIF2. Both of these are fixed when LRCK is no longer inverted. Trusting that the comment in the code is correct, the existing behavior is kept for the A33. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200726012557.38282-5-samuel@sholland.org Signed-off-by: Mark Brown commit e47d2dcd88fc3e6837f8aa0060ce820ec9001e26 Author: Samuel Holland Date: Sat Jul 25 20:25:53 2020 -0500 ASoC: sun8i-codec: Add missing mixer routes The sun8i-codec driver provides ALSA controls for enabling/disabling each of the inputs to the AIF1 Slot 0 and DAC mixers. For two of these inputs (ADC->DAC and AIF1 DA0->AIF1 AD0), the audio source is implemented, so the mixer inputs can be used. However, because the DAPM routes are missing, these mixer inputs only work when both the source and the mixer happen to be part of other active audio paths. Adding the appropriate routes makes these ALSA controls function all of the time. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200726012557.38282-4-samuel@sholland.org Signed-off-by: Mark Brown commit 90cac932976e93b17203b4216ba83bdcd68e0ed0 Author: Samuel Holland Date: Sat Jul 25 20:25:52 2020 -0500 ASoC: sun8i-codec: Fix DAPM to match the hardware topology The A33/A64 digital codec has 4 physical inputs and 4 physical outputs: 3 AIFs/DAIs and one ADC/DAC pair. Internal routing is accomplished by a 4-channel mixer connected to each output. The analog and digital sides of the ADC/DAC are in separate ASoC components, so card-level DAPM routes (provided in the device tree) are necessary to connect them together. Currently, these routes are wrong. For AIF1 Playback, the correct topology is: ||<<============ sun8i-codec ===========>>|| || || CPU DAI -> AIF1 DA0 -> DAC Mixer -> DAC (digital) -> DAC (analog) || || but the driver and device trees currently describe: || || CPU DAI -> AIF1 DA0 -------------------------------> DAC (analog) || \--> DAC Mixer -> ??? [dead end] || For AIF1 Capture, there is an additional problem, because the Mixer route is backward. The topology should be: || || ADC (analog) -> ADC (digital) -> AIF1 AD0 Mixer -> AIF1 AD0 -> CPU DAI || || but the driver and device trees currently describe: || || ADC (analog) -> AIF1 AD0 ------------------------------------> CPU DAI || \--> ADC Mixer -> ??? [dead end] || The ADC/DAC are only powered because AIF1 AD0 (capture) has supply routes from the ADC, and AIF1 DA0 (playback) has supply routes from the DAC. However, neither set of supply routes matches the hardware topology. Audio can be routed among AIF1/2/3 without using the ADC or DAC at all; and audio can be routed from the ADC to the DAC without using any AIFs (via the "ADC Digital DAC Playback Switch"). Because the DAPM routes are wrong, both of these use cases are currently broken. This commit adds the necessary widgets and routes to represent the real hardware topology, with functionality equivalent to the current driver. For the existing "allwinner,sun8i-a33-codec" compatible, widgets with the old names are kept as wrappers around the new widgets, so existing device trees will continue to work. For "allwinner,sun50i-a64-codec", the old widgets can be omitted, because no device trees yet use that compatible. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200726012557.38282-3-samuel@sholland.org Signed-off-by: Mark Brown commit cef305d4eb0733f25215793ed30b056a7db9bb62 Author: Samuel Holland Date: Sat Jul 25 20:25:51 2020 -0500 ASoC: dt-bindings: Add a new compatible for the A64 codec The audio codecs in the A33 and A64 are both integrated variants of the X-Powers AC100 codec. However, there are some differences between them that merit having a separate compatible: - The A64 has a second DRC block, not present in the AC100 or A33. - The A33 has some extra muxing options for AIF1/2/3 in the AIF3_SGP_CTRL register, which are not present in the AC100 or A64. - The A33 is missing registers providing jack detection functionality. - The A33 is claimed to invert LRCK, but this is not seen on A64. Since the driver will continue to work on the A64 using the A33 compatible, albeit without jack detection functionality and with possibly inverted channels, as it does now, allow the A33 compatible to be used as a fallback. Signed-off-by: Samuel Holland Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200726012557.38282-2-samuel@sholland.org Signed-off-by: Mark Brown commit 4fd433fd45514adc68aebf71a89a66590fdc792d Author: Jerome Brunet Date: Wed Jul 29 17:43:59 2020 +0200 clk: meson: axg-audio: fix g12a tdmout sclk inverter Fix the tdmout inverter of the g12a and following SoC families. This inverter is special and needs two bits to be the inverse of each other for the inverter to operate properly. Fixes: 075001385c66 ("clk: meson: axg-audio: add g12a support") Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200729154359.1983085-4-jbrunet@baylibre.com commit cdabb1ffc7c2349b8930f752df1edcafc1d37cc1 Author: Jerome Brunet Date: Wed Jul 29 17:43:58 2020 +0200 clk: meson: axg-audio: separate axg and g12a regmap tables There are more differences than what we initially thought. Let's keeps things clear and separate the axg and g12a regmap tables of the audio clock controller. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200729154359.1983085-3-jbrunet@baylibre.com commit 7b70689b07c1d336a5ad6906927aa413619029bd Author: Jerome Brunet Date: Wed Jul 29 17:43:57 2020 +0200 clk: meson: add sclk-ws driver This is yet another simple but odd driver for the audio block of the g12a and sm1 SoC families. For TDMOUT's sclk to be properly inverted, bit 29 of AUDIO_CLK_TDMOUT_x_CTRL should be the inverse of bit 28. IOW bit28 == !bit29 at all times This setting is automatically applied on axg and the manual setting was added on g12a. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200729154359.1983085-2-jbrunet@baylibre.com commit 9355a7b1896f6fadcbd63d199d1f343bf2e4fed8 Author: Shengjiu Wang Date: Wed Aug 5 14:34:13 2020 +0800 ASoC: fsl_sai: Replace synchronous check with fsl_sai_dir_is_synced As new function fsl_sai_dir_is_synced is included for checking if stream is synced by the opposite stream, then replace the existing synchronous checking with this new function. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20200805063413.4610-4-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 7b3bee091ec375777ade2a37e4b0c9319f92de27 Author: Shengjiu Wang Date: Wed Aug 5 14:34:12 2020 +0800 ASoC: fsl_sai: Drop TMR/RMR settings for synchronous mode Tx synchronous with Rx: The RMR is the word mask register, it is used to mask any word in the frame, it is not relating to clock generation, So it is no need to be changed when Tx is going to be enabled. Rx synchronous with Tx: The TMR is the word mask register, it is used to mask any word in the frame, it is not relating to clock generation, So it is no need to be changed when Rx is going to be enabled. Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen Link: https://lore.kernel.org/r/20200805063413.4610-3-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 94741eba63c23b0f1527b0ae0125e6b553bde10e Author: Shengjiu Wang Date: Wed Aug 5 14:34:11 2020 +0800 ASoC: fsl_sai: Refine enable/disable TE/RE sequence in trigger() Current code enables TCSR.TE and RCSR.RE together, and disable TCSR.TE and RCSR.RE together in trigger(), which only supports one operation mode: 1. Rx synchronous with Tx: TE is last enabled and first disabled Other operation mode need to be considered also: 2. Tx synchronous with Rx: RE is last enabled and first disabled. 3. Asynchronous mode: Tx and Rx are independent. So the enable TCSR.TE and RCSR.RE sequence and the disable sequence need to be refined accordingly for #2 and #3. There is slightly against what RM recommennds with this change. For example in Rx synchronous with Tx mode, case "aplay 1.wav; arecord 2.wav" enable TE before RE. But it should be safe to do so, judging by years of testing results. Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen Link: https://lore.kernel.org/r/20200805063413.4610-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit f1e38466a939f96cb87e23b90ce4e7b7813bb68f Author: Vabhav Sharma Date: Fri Jul 24 17:04:42 2020 +0530 arm64: dts: ls1028a: qds: enable lpuart1 LPUART nodes by default are disabled in LS1028A device tree, Enabling LPUART1 node Acked-by: Fugang Duan Signed-off-by: Vabhav Sharma Signed-off-by: Shawn Guo commit 4133a90e637ee616ad2becb861ae6416b368e9b6 Author: Shengjiu Wang Date: Thu Jul 23 13:43:36 2020 +0800 ARM: dts: imx7d-sdb: Add nodes for audio sound card Configure the SAI device node, configure audio clock and pinctrl. Enable the audio sound card, which use the SAI1 and wm8960, and enable headphone detection. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit 4b381d7e86fd0b767456e07c49982fb4896e1166 Author: Rohit kumar Date: Fri Aug 14 16:23:08 2020 +0530 ASoC: lpass-cpu: Move to yaml format Update lpass-cpu binding with yaml formats. Signed-off-by: Rohit kumar Link: https://lore.kernel.org/r/1597402388-14112-13-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit 68d8904b25df28821425753eaebc8fe992dde236 Author: Ajit Pandey Date: Fri Aug 14 16:23:04 2020 +0530 ASoC: Add sc7180-lpass bindings header Add header defining dai-id and mclk id for SC7180 lpass soc. Signed-off-by: Ajit Pandey Signed-off-by: Rohit kumar Acked-by: Rob Herring Link: https://lore.kernel.org/r/1597402388-14112-9-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit 2a7a3797ed2de6a55e1467bd11002fa7b13e12f3 Author: Rohit kumar Date: Fri Aug 14 16:23:03 2020 +0530 ASoC: Add sc7180 lpass cpu node Add dt-bindings to support "qcom,lpass-cpu-sc7180" node. Signed-off-by: Rohit kumar Link: https://lore.kernel.org/r/1597402388-14112-8-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit b05372c84d61ad2a905274db7e3d63a65c835463 Author: Rohit kumar Date: Fri Aug 14 16:23:07 2020 +0530 ASoC: qcom: lpass-platform: Use platform_get_irq platform_get_irq_byname() is used when there is list of interrupts in the device node. As lpass-platform has only one interrupt entry, use platform_get_irq() instead. Signed-off-by: Rohit kumar Link: https://lore.kernel.org/r/1597402388-14112-12-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit 93dbbd657167a796583506834cc03950ce25bce1 Author: Rohit kumar Date: Fri Aug 14 16:23:06 2020 +0530 ASoC: qcom: lpass-cpu: Use platform_get_resource platform_get_resource_byname() is used when there is list of reg entries. As lpass-cpu node has only one reg entry, use platform_get_resource() instead. Signed-off-by: Rohit kumar Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1597402388-14112-11-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit 24caf8d9eb108c52e144bcc7af94bb1edcb70700 Author: Ajit Pandey Date: Fri Aug 14 16:23:05 2020 +0530 ASoC: qcom: lpass-sc7180: Add platform driver for lpass audio Add platform driver for configuring sc7180 lpass core I2S and DMA configuration to support playback & capture to external codecs connected over primary & secondary MI2S interfaces. Signed-off-by: Ajit Pandey Signed-off-by: Rohit kumar Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1597402388-14112-10-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit 753a6e17942f6f425ca622e1610625998312ad89 Author: Rohit kumar Date: Fri Aug 14 16:23:02 2020 +0530 ASoC: qcom: lpass-cpu: fix concurrency issue i2sctl register value is set to 0 during hw_free(). This impacts any ongoing concurrent session on the same i2s port. As trigger() stop already resets enable bit to 0, there is no need of explicit hw_free. Removing it to fix the issue. Fixes: 80beab8e1d86 ("ASoC: qcom: Add LPASS CPU DAI driver") Signed-off-by: Rohit kumar Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1597402388-14112-7-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit b5022a36d28f6a99c1a57f54246e8b566cf094d5 Author: Rohit kumar Date: Fri Aug 14 16:23:01 2020 +0530 ASoC: qcom: lpass: Use regmap_field for i2sctl and dmactl registers I2SCTL and DMACTL registers has different bits alignment for newer LPASS variants of SC7180 soc. Use REG_FIELD_ID() to define the reg_fields in platform specific file and removed shifts and mask macros for such registers from header file. Signed-off-by: Rohit kumar Link: https://lore.kernel.org/r/1597402388-14112-6-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit 5fd188215d4eb52703600d8986b22311099a5940 Author: Rohit kumar Date: Fri Aug 14 16:23:00 2020 +0530 ASoC: qcom: lpass-platform: fix memory leak lpass_pcm_data is never freed. Free it in close ops to avoid memory leak. Fixes: 022d00ee0b55 ("ASoC: lpass-platform: Fix broken pcm data usage") Signed-off-by: Rohit kumar Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1597402388-14112-5-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit 784771863abae5f8878c62e9c624111c51bebe7c Author: Ajit Pandey Date: Fri Aug 14 16:22:59 2020 +0530 ASoC: qcom: lpass-platform: Replace card->dev with component->dev We are allocating dma memory for component->dev but trying to mmap such memory for substream->pcm->card->dev. Replace device argument in mmap with component->dev to fix this. Signed-off-by: Ajit Pandey Signed-off-by: Rohit kumar Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1597402388-14112-4-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit a503567d70eca91796a4ab23053d4c70df8e1e3e Author: Rohit kumar Date: Fri Aug 14 16:22:58 2020 +0530 ASoC: qcom: lpass-cpu: Move ahbix clk to platform specific function Ahbix clock is optional clock and not needed for all platforms. Move it to lpass-apq8016/ipq806x as it is not needed for sc7180. Signed-off-by: Rohit kumar Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1597402388-14112-3-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit 1220f6a76e77af8ac14fe67a11fcd7806764ea46 Author: Ajit Pandey Date: Fri Aug 14 16:22:57 2020 +0530 ASoC: qcom: Add common array to initialize soc based core clocks LPASS variants have their own soc specific clocks that needs to be enabled for MI2S audio support. Added a common variable in drvdata to initialize such clocks using bulk clk api. Such clock names is defined in variants specific data and needs to fetched during init. Signed-off-by: Ajit Pandey Signed-off-by: Rohit kumar Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/1597402388-14112-2-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit cac849e9bbc8e86095ba5cf306b55ea4eff29125 Author: Markus Niebel Date: Wed Jul 22 11:30:12 2020 +0200 ARM: dts: imx6qdl: add TQMa6{S,Q,QP} SoM Add device trees for TQMa6S, TQMa6Q, and TQMa6QP embedded modules. The A and B SoM variants are for hardware revisions that differ in how the I2C devices are connected. For details, see [1]. This is a combination of the patches "arm: dt: imx6qdl: add tqma6[qdl] som on mba6 mainboard", "arm: dt: tqma6: add spi with spi nor flash on SOM", "arm: dt: add basic support for tqma6qp on mba6", and "arm: dt: imx6qdl-tqma6: use generic jedec,spi-nor" from the TQMa6x BSP, with the MBa6 specific parts removed. [1] https://support.tq-group.com/en/arm/tqma6x/linux/ptxdist/overview Signed-off-by: Markus Niebel [bst@pengutronix.de: remove unnecessary container node in the iomuxc node] Signed-off-by: Bastian Krause [p.zabel@pengutronix.de: merged patches from TQMa6x BSP REV.0114, separated MBa6 DTs, fixed checkpatch and dtbs_check warnings, added no-sd(io) properties to eMMC, added SPDX license identifiers and commit message] Signed-off-by: Philipp Zabel Signed-off-by: Shawn Guo commit f7e630bcae48279659c31ba974cbf9cf596c2300 Author: Chris Healy Date: Wed Jul 22 13:33:41 2020 -0700 ARM: dts: ZII: Disable HW Ethernet switch reset GPIOs Disable Ethernet switch reset GPIO with ZII platforms that have it enabled. HW switch reset results in a reset of the copper PHYs inside of the switch. We want to avoid this reset of the copper PHYs in the switch as this results in unnecessary broader network disruption on a soft reboot of the application processor. With the HW GPIO removed, the switch driver still performs a soft reset of the switch core which has been shown to sufficiently meet our needs with other ZII platforms that do not have the HW switch reset GPIO defined. Signed-off-by: Chris Healy Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 383689f4b8486830447a3cfb479a364b21aa9de3 Author: Richard Zhu Date: Tue Jul 21 15:22:56 2020 +0800 ARM: dts: imx6qp-sabreauto: enable pcie Add the reset-gpio property, and enable PCIe on iMX6QP SABREAUTO board. Signed-off-by: Richard Zhu Signed-off-by: Shawn Guo commit 911c94dac9525f4824661592611f169713d74d5f Author: Krzysztof Kozlowski Date: Fri Jul 24 20:08:57 2020 +0200 memory: samsung: exynos5422-dmc: Document mutex scope Document scope of the mutex used by driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20200724180857.22119-1-krzk@kernel.org commit 653bdab267bd8dbce9cbd16bec843ca9d20a8450 Author: Stephen Boyd Date: Mon Aug 3 17:05:31 2020 -0700 ASoC: rt5682: Use clk_hw based APIs for registration The (new?) style of clk registration uses clk_hw based APIs so that we can more easily see the difference between clk providers and clk consumers. Use the clk_hw based APIs to do this and migrate to devm for the clkdev creation so that we can reduce the amount of code. Signed-off-by: Stephen Boyd Cc: Cheng-Yi Chiang Cc: Shuming Fan Link: https://lore.kernel.org/r/20200804000531.920688-4-swboyd@chromium.org Signed-off-by: Mark Brown commit edbd24ea1e5c72980b37ae2d271696b05274d509 Author: Stephen Boyd Date: Mon Aug 3 17:05:30 2020 -0700 ASoC: rt5682: Drop usage of __clk_get_name() The __clk_get_name() API is deprecated. Use clk_hw_get_name() or proper registration techniques to avoid it. Signed-off-by: Stephen Boyd Cc: Cheng-Yi Chiang Cc: Shuming Fan Link: https://lore.kernel.org/r/20200804000531.920688-3-swboyd@chromium.org Signed-off-by: Mark Brown commit 0b95aa8e8afa4bcd49c8fa36404e2deb02a947ed Author: Stephen Boyd Date: Mon Aug 3 17:05:29 2020 -0700 ASoC: rt5682: Use dev_dbg() in rt5682_clk_check() I see a spew of "sysclk/dai not set correctly" whenever I cat /sys/kernel/debug/clk/clk_summary on my device. This is because the master pointer isn't set yet in this driver. A user isn't going to be able to do much if this check is failing so this error message isn't really an error, it's more of a kernel debug message. Lower the priority to dev_dbg() so that it isn't so noisy. Signed-off-by: Stephen Boyd Cc: Cheng-Yi Chiang Cc: Shuming Fan Link: https://lore.kernel.org/r/20200804000531.920688-2-swboyd@chromium.org Signed-off-by: Mark Brown commit 9b3b4b3f2f2af863d2f6dd65afd295a5a673afa2 Author: Pierre-Louis Bossart Date: Wed Jul 22 04:37:11 2020 +0800 soundwire: intel: Add basic power management support Implement suspend/resume capabilities (not runtime_pm for now) The resume part is essentially a full-blown re-enumeration. When S0ix is supported, we will select clock stop mode when the ACPI target state is S0, and tear down the link for S3. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200721203723.18305-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 7f7d9e1e02f0e18275449489425058b639c970dc Author: Lukasz Luba Date: Tue Aug 11 11:17:27 2020 +0100 memory: samsung: exynos5422-dmc: Additional locking for 'curr_rate' The 'curr_rate' is protected by local 'dmc->lock' in various places, but not in a function exynos5_dmc_get_status(). The lock protects frequency (and voltage) change process and the corresponding value stored in 'curr_rate'. Add the locking mechanism to protect the 'curr_rate' reading also in the exynos5_dmc_get_status(). Suggested-by: Krzysztof Kozlowski Signed-off-by: Lukasz Luba Link: https://lore.kernel.org/r/20200811101727.3976-1-lukasz.luba@arm.com Signed-off-by: Krzysztof Kozlowski commit 07989ee3abad9ffba5560f7434cfb02a5f74033e Author: Florian Fainelli Date: Sat Jul 25 21:15:21 2020 -0700 MIPS: BCM47xx: Include bcm47xx_sprom.h Now that bcm47xx_sprom.h contains a prototype for bcm47xx_fill_sprom, include that header file directly from bcm47xx.h. Signed-off-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit d92aabca4df182763cd541d342f2d55f8c0a827c Author: Florian Fainelli Date: Sat Jul 25 21:15:20 2020 -0700 firmware: bcm47xx_sprom: Fix -Wmissing-prototypes warnings bcm47xx_sprom.h did not include a prototype for bcm47xx_fill_sprom() therefore add one, and make sure we do include that header to fix -Wmissing-prototypes warnings. Reported-by: kernel test robot Signed-off-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 1973d5b7f03fbeff7a806565b659c4a344d19512 Merge: 9123e3a74ec7b 8cb61d65b1c8d Author: Mark Brown Date: Mon Aug 17 12:43:02 2020 +0100 Merge existing fixes from spi/for-5.9 commit 59e305a6225400d8b4239c7440d84046ca5100ea Merge: 9123e3a74ec7b 09dad81e0f170 Author: Mark Brown Date: Mon Aug 17 12:42:55 2020 +0100 Merge existing fixes from regulator/for-5.9 commit 549ade5721fe197b78165fc3476af1fe0c65f089 Merge: 9123e3a74ec7b 062fa09f44f4f Author: Mark Brown Date: Mon Aug 17 12:42:43 2020 +0100 Merge existing fixes from asoc/for-5.9 commit bbaac1354cc98415e5b4c3830d796c583ca71907 Author: Sidong Yang Date: Sun May 24 11:26:23 2020 +0900 drm/qxl: Replace deprecated function in qxl_display Replace deprecated function drm_modeset_lock/unlock_all with helper function DRM_MODESET_LOCK_ALL_BEGIN/END. Signed-off-by: Sidong Yang Link: http://patchwork.freedesktop.org/patch/msgid/20200524022624.10363-1-realwakka@gmail.com Signed-off-by: Gerd Hoffmann commit 08b5666db72273d2054a2a48961c6c33f9d697b2 Author: Álvaro Fernández Rojas Date: Wed Aug 12 09:52:35 2020 +0200 MIPS: BCM63xx: switch to SPDX license identifier Use SPDX license indentifier instead of local reference to COPYING. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit a5fb3b4518bc0e53ebc61580dd64196be32db165 Author: Álvaro Fernández Rojas Date: Wed Aug 12 09:52:34 2020 +0200 MIPS: BCM63xx: refactor board declarations Current board declarations are a mess. Let's put some order and make them follow the same structure. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit f5e8983e44b403f1bef85dff96e34d1b1ab318c7 Author: Álvaro Fernández Rojas Date: Wed Aug 12 09:52:33 2020 +0200 MIPS: BCM63xx: enable EHCI for DWV-S0 board BCM6358 SoCs have OHCI and EHCI controllers that share the same USB ports. Therefore, the board should also have EHCI enabled. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 3879e1dafcc30e60c3d5ea4ae4d3ae8ea02a76a8 Author: Álvaro Fernández Rojas Date: Wed Aug 12 09:52:32 2020 +0200 MIPS: BCM63xx: remove EHCI from BCM6348 boards There's no EHCI controller on BCM6348. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 7e914be75fc2198cfa5fffdd55a8f4ce463778e1 Author: Álvaro Fernández Rojas Date: Wed Aug 12 09:52:31 2020 +0200 MIPS: BCM63xx: remove duplicated new lines There are 3 duplicated new lines, let's remove them. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 77cf3a6827fe04e894ff0fbe8abc6a73795f8a92 Author: Gustavo A. R. Silva Date: Wed Jun 17 16:57:07 2020 -0500 drm/virtio: Use struct_size() helper in kmalloc() 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 and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Link: http://patchwork.freedesktop.org/patch/msgid/20200617215707.GA16785@embeddedor Signed-off-by: Gerd Hoffmann commit 58c9e24721c4a84eb5a6db3c1d54dba97e97b3f7 Author: Aleksander Jan Bajkowski Date: Mon Aug 10 20:09:46 2020 +0200 MIPS: lantiq: add missing GPHY clock aliases for ar10 and grx390 Add missing GPHY clock aliases for ar10 (xrx300) and grx390 (xrx330). PMU in ar10 and grx390 differs from vr9. Ar10 has 3 and grx390 has 4 built-in GPHY compared to vr9 which has 2. Corespondings PMU bit: GPHY0 -> bit 29 GPHY1 -> bit 30 GPHY2 -> bit 31 GPHY3 -> bit 26 Tested on D-Link DWR-966 with OpenWRT. Signed-off-by: Aleksander Jan Bajkowski Cc: linux-mips@vger.kernel.org Cc: john@phrozen.org Cc: hauke@hauke-m.de Cc: tsbogend@alpha.franken.de Acked-by: Hauke Mehrtens Signed-off-by: Thomas Bogendoerfer commit 6937dff24424eab9eeaa9674dbf715d9f6d57ae1 Author: Tiezhu Yang Date: Fri Aug 14 18:31:30 2020 +0800 MIPS: Loongson: Use default CONFIG_FRAME_WARN as 2048 for Loongson64 to fix build warnings After commit 70b838292bef ("MIPS: Update default config file for Loongson-3"), CONFIG_VHOST_SCSI and CONFIG_VHOST are set when use loongson3_defconfig, and then there exists the following two build warnings related with these two configs: CC [M] drivers/vhost/scsi.o drivers/vhost/scsi.c: In function ‘vhost_scsi_flush’: drivers/vhost/scsi.c:1374:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=] } ^ LD [M] drivers/vhost/vhost_scsi.o CC [M] drivers/vhost/vsock.o LD [M] drivers/vhost/vhost_vsock.o CC [M] drivers/vhost/vhost.o drivers/vhost/vhost.c: In function ‘log_used’: drivers/vhost/vhost.c:1896:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=] } ^ CONFIG_FRAME_WARN=2048 can fix it, since the default CONFIG_FRAME_WARN for 64BIT is 2048, just delete the CONFIG_FRAME_WARN line in defconfig. config FRAME_WARN int "Warn for stack frames larger than" range 0 8192 default 2048 if GCC_PLUGIN_LATENT_ENTROPY default 1280 if (!64BIT && PARISC) default 1024 if (!64BIT && !PARISC) default 2048 if 64BIT Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 39116103a7345927fa99644d08bc0cc9d45fea6f Author: Zejiang Tang Date: Fri Aug 14 10:40:24 2020 +0800 MIPS: ftrace: Remove redundant #ifdef CONFIG_DYNAMIC_FTRACE There exists redundant #ifdef CONFIG_DYNAMIC_FTRACE in ftrace.c, remove it. Signed-off-by: Zejiang Tang Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Thomas Bogendoerfer commit 3b9fb6791e7113679b1eb472e6ce1659e80f5797 Author: Bryan O'Donoghue Date: Sun Aug 2 01:48:24 2020 +0100 wcn36xx: Fix reported 802.11n rx_highest rate wcn3660/wcn3680 Qualcomm's document "80-WL007-1 Rev. J" states that the highest rx rate for the WCN3660 and WCN3680 on MCS 7 is 150 Mbps not the 72 Mbps stated here. This patch fixes the data-rate declared in the 5GHz table. Fixes: 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware") Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200802004824.1307124-1-bryan.odonoghue@linaro.org commit 454530a9950b5a26d4998908249564cedfc4babc Author: Christophe JAILLET Date: Sun Aug 2 14:22:27 2020 +0200 ath10k: Fix the size used in a 'dma_free_coherent()' call in an error handling path Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()'. Fixes: 1863008369ae ("ath10k: fix shadow register implementation for WCN3990") Signed-off-by: Christophe JAILLET Reviewed-by: Rakesh Pillai Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200802122227.678637-1-christophe.jaillet@wanadoo.fr commit 1885c0f76dc023e249024074f0578203704fa73c Author: Gustavo A. R. Silva Date: Mon Jul 27 14:38:21 2020 -0500 ath10k: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200727193821.GA981@embeddedor commit 2705cd7558e718a7240c64eb0afb2edad5f8c190 Author: Dan Carpenter Date: Thu Aug 13 17:12:53 2020 +0300 ath9k: Fix potential out of bounds in ath9k_htc_txcompletion_cb() The value of "htc_hdr->endpoint_id" comes from skb->data so Smatch marks it as untrusted so we have to check it before using it as an array offset. This is similar to a bug that syzkaller found in commit e4ff08a4d727 ("ath9k: Fix use-after-free Write in ath9k_htc_rx_msg") so it is probably a real issue. Fixes: fb9987d0f748 ("ath9k_htc: Support for AR9271 chipset.") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200813141253.GA457408@mwanda commit 5024f21c159f8c1668f581fff37140741c0b1ba9 Author: Masashi Honma Date: Sun Aug 9 08:32:58 2020 +0900 ath9k_htc: Use appropriate rs_datalen type kernel test robot says: drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: warning: incorrect type in assignment (different base types) drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: expected restricted __be16 [usertype] rs_datalen drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: got unsigned short [usertype] drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:988:13: sparse: warning: restricted __be16 degrades to integer drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1001:13: sparse: warning: restricted __be16 degrades to integer Indeed rs_datalen has host byte order, so modify it's own type. Reported-by: kernel test robot Fixes: cd486e627e67 ("ath9k_htc: Discard undersized packets") Signed-off-by: Masashi Honma Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200808233258.4596-1-masashi.honma@gmail.com commit 4bad3a2041b5391678834f2611cbf7b7c66ca8f7 Author: Alexander Wetzel Date: Tue Aug 4 18:41:51 2020 +0200 ath9k: add NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 support The ath9k driver was so far only able to rekey PTK0 keys correctly due to the best effort queue flush added with commit 62872a9b9a10 ("mac80211: Fix PTK rekey freezes and clear text leak"). Add the needed queue flush and set NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 to tell mac80211 that the driver can now rekey PTK0 keys correctly and no longer needs the best effort flush. Effectively this prevents mac80211 to warn when rekeying a PTK0 key only. Signed-off-by: Alexander Wetzel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200804164152.175375-1-alexander@wetzel-home.de commit 54f9ab7b870934b70e5a21786d951fbcf663970f Author: Dan Carpenter Date: Thu Aug 13 17:13:15 2020 +0300 ath6kl: prevent potential array overflow in ath6kl_add_new_sta() The value for "aid" comes from skb->data so Smatch marks it as untrusted. If it's invalid then it can result in an out of bounds array access in ath6kl_add_new_sta(). Fixes: 572e27c00c9d ("ath6kl: Fix AP mode connect event parsing and TIM updates") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200813141315.GB457408@mwanda commit 42f5fe34a701769763c299c49a89595e60871dcf Author: Colin Ian King Date: Thu Aug 6 13:19:58 2020 +0100 ath6kl: fix spelling mistake "initilisation" -> "initialization" There is a spelling mistake in an ath6kl_err error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200806121958.60700-1-colin.king@canonical.com commit 8238bf0d4b67c8f91c4d85bebbfd8c03185e9ceb Author: Gustavo A. R. Silva Date: Mon Jul 27 14:51:11 2020 -0500 ath6kl: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200727195111.GA1603@embeddedor commit 1d4f5c15cf65ef10c67558d8906af5f2b08021cb Author: Lee Jones Date: Fri Aug 14 12:39:23 2020 +0100 ath5k: Fix kerneldoc formatting issue Kerneldoc expects attributes/parameters to be in '@*.: ' format and gets confused if the variable does not follow the type/attribute definitions. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath5k/base.c:1111: warning: Function parameter or member 'ah' not described in 'ath5k_drain_tx_buffs' Cc: Jiri Slaby Cc: Nick Kossifidis Cc: Luis Chamberlain Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Jesper Dangaard Brouer Cc: John Fastabend Cc: "Luis R. Rodriguez" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: bpf@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-21-lee.jones@linaro.org commit 691c7a4d4fd70f8a7b2b9057e0a72ddc06a30fdb Author: Lee Jones Date: Fri Aug 14 12:39:16 2020 +0100 wil6210: Demote non-kerneldoc headers to standard comment blocks No effort has been made to document any of the function parameters here. Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/wil6210/cfg80211.c:1749: warning: Function parameter or member 'ies' not described in '_wil_cfg80211_find_ie' drivers/net/wireless/ath/wil6210/cfg80211.c:1749: warning: Function parameter or member 'ies_len' not described in '_wil_cfg80211_find_ie' drivers/net/wireless/ath/wil6210/cfg80211.c:1749: warning: Function parameter or member 'ie' not described in '_wil_cfg80211_find_ie' drivers/net/wireless/ath/wil6210/cfg80211.c:1749: warning: Function parameter or member 'ie_len' not described in '_wil_cfg80211_find_ie' drivers/net/wireless/ath/wil6210/cfg80211.c:1780: warning: Function parameter or member 'ies1' not described in '_wil_cfg80211_merge_extra_ies' drivers/net/wireless/ath/wil6210/cfg80211.c:1780: warning: Function parameter or member 'ies1_len' not described in '_wil_cfg80211_merge_extra_ies' drivers/net/wireless/ath/wil6210/cfg80211.c:1780: warning: Function parameter or member 'ies2' not described in '_wil_cfg80211_merge_extra_ies' drivers/net/wireless/ath/wil6210/cfg80211.c:1780: warning: Function parameter or member 'ies2_len' not described in '_wil_cfg80211_merge_extra_ies' drivers/net/wireless/ath/wil6210/cfg80211.c:1780: warning: Function parameter or member 'merged_ies' not described in '_wil_cfg80211_merge_extra_ies' drivers/net/wireless/ath/wil6210/cfg80211.c:1780: warning: Function parameter or member 'merged_len' not described in '_wil_cfg80211_merge_extra_ies' Cc: Maya Erez Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: wil6210@qti.qualcomm.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-14-lee.jones@linaro.org commit 3a059c76f4eb8ff9cffc40eb591e9e3aca360666 Author: Lee Jones Date: Fri Aug 14 12:39:12 2020 +0100 ath5k: pcu: Add a description for 'band' remove one for 'mode' Fixes the following W=1 kernel build warning(s): drivers/net/wireless/ath/ath5k/pcu.c:115: warning: Function parameter or member 'band' not described in 'ath5k_hw_get_frame_duration' drivers/net/wireless/ath/ath5k/pcu.c:955: warning: Excess function parameter 'mode' description in 'ath5k_hw_pcu_init' Cc: Jiri Slaby Cc: Nick Kossifidis Cc: Luis Chamberlain Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Reyk Floeter Cc: "W. S. Bell" Cc: Luis Rodriguez Cc: Pavel Roskin Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200814113933.1903438-10-lee.jones@linaro.org commit 273411d5bcd01acdd6eda5fe45fb10f9f4a3deaa Author: Gustavo A. R. Silva Date: Mon Jul 27 14:49:30 2020 -0500 ath5k: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200727194930.GA1491@embeddedor commit f7eb4b04ce6f81f945bd71288f8e9fc4f284c169 Author: Kalle Valo Date: Fri Aug 14 10:10:30 2020 +0300 ath11k: hal: create hw_srng_config dynamically On QCA6390 reg_start and reg_size values are different from IPQ8074 so we need to change the values runtime. As we can't modify a static const variable hw_srng_config directly, instead use it as a template, copy it and modify the copy with correct values. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597389030-13887-12-git-send-email-kvalo@codeaurora.org commit 727fae1478a5e7c65efa171a9639555da6ffa62a Author: Carl Huang Date: Fri Aug 14 10:10:29 2020 +0300 ath11k: enable internal sleep clock On x86 and other non-qcom platforms, host needs to explicitly tell the firmware to use the internal sleep clock. Some QCA6390 modules have OTP burnt with external sleep clock selected, and these modules can't work expectedly unless firmware selects internal sleep clock. Add a field to hw_params to support this difference. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597389030-13887-11-git-send-email-kvalo@codeaurora.org commit 6c809d04c542e24508c26102e6c7c5e2c967032d Author: Carl Huang Date: Fri Aug 14 10:10:28 2020 +0300 ath11k: fix KASAN warning of ath11k_qmi_wlanfw_wlan_cfg_send It's caused by reading memory out of boundary from target_ce_config_wlan. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597389030-13887-10-git-send-email-kvalo@codeaurora.org commit f44dd33e6336294df23ec61f1bbe37a372f5f130 Author: Carl Huang Date: Fri Aug 14 10:10:27 2020 +0300 ath11k: fix memory OOB access in qmi_decode The decoded_size is wrongly assigned in ath11k_qmi_msg_handlers and it results in out of boundary access in qmi_decode. The correct decoded_size should be calculated from the related ind_msg structure. This issue is exposed with QCA6390 because it needs 11 small memory chunks which are stored in qmi_wlanfw_request_mem_ind_msg_v01 and hence the decoded_size exceeds the wrongly assigend decoded_size. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597389030-13887-9-git-send-email-kvalo@codeaurora.org commit 26f3a021b37ccca6c76c8c7c90ff684f8468e350 Author: Carl Huang Date: Fri Aug 14 10:10:26 2020 +0300 ath11k: allocate smaller chunks of memory for firmware On x86 it's sometimes difficult to allocate a large contigous DMA memory, so instead allocate blocks of small chunk memory. In ath11k_qmi_msg_mem_request_cb() the error handling was cleaned up to avoid an unused variable warning. Also changed the test from (ret < 0) to just (ret) as the functions don't return any positive values. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597389030-13887-8-git-send-email-kvalo@codeaurora.org commit 2c3960c2253dc8028a8928e8161e030eec3ebe4a Author: Govind Singh Date: Fri Aug 14 10:10:25 2020 +0300 ath11k: setup ce tasklet for control path CE srng is used for control path and CE srng processing is done using tasklet bottom half. Setup ce tasklet initialization and scheduling for control path. Needed for PCI support. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597389030-13887-7-git-send-email-kvalo@codeaurora.org commit c4eacabee22415194e8cc7e8dd4913897b058927 Author: Govind Singh Date: Fri Aug 14 10:10:24 2020 +0300 ath11k: configure copy engine msi address in CE srng Fill msi base address and msi data to be programmed in CE srang. This is used by the srng to generate the msi interrupt. Needed for PCI support. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597389030-13887-6-git-send-email-kvalo@codeaurora.org commit 654e959ae0a19b90045d0e4d90a602ae2828a855 Author: Govind Singh Date: Fri Aug 14 10:10:23 2020 +0300 ath11k: pci: add read32() and write32() hif operations Add support for bus read/write/window selection operations for reading hardware memory. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597389030-13887-5-git-send-email-kvalo@codeaurora.org commit eb8de0490e1f819c50c1b5b0a5558a9897dd75f0 Author: Govind Singh Date: Fri Aug 14 10:10:22 2020 +0300 ath11k: fill appropriate QMI service instance id for QCA6390 QMI service instance id is used for qmi service lookup, IPQ8074 and QCA6390 uses different instance id for service lookup. Fill appropriate QMI service instance id for respective targets. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597389030-13887-4-git-send-email-kvalo@codeaurora.org commit 6eb6ea5138287306da5c8553504e07d20c100fa3 Author: Govind Singh Date: Fri Aug 14 10:10:21 2020 +0300 ath11k: add board file support for PCI devices PCI devices like QCA6390 load the board file differently, add support for that and the method is chosen using bus_params variables. Add support to create board name for different targets. This board name is used to parse the board data from board-2.bin for ahb/pci based targets. As struct target_mem_chunk::vaddr was changed from 'u32' to 'u32 *' in ath11k_qmi_assign_target_mem_chunk() vaddr assignments were changed to NULL to avoid a compilation warning. IPQ8074 does not use the vaddr field for anything so that change does not affect functionality. At the moment this only supports board files with BIN type. Support for ELF type, which seems to be more popular on QCA6390 devices, needs to be added later. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597389030-13887-3-git-send-email-kvalo@codeaurora.org commit 569704544778bea03f78df95ce87383a8724acff Author: Govind Singh Date: Fri Aug 14 10:10:20 2020 +0300 ath11k: add support for m3 firmware PCI devices like QCA6390 have a separate firmware image for the m3 micro-controller. Add support to load the firmware using m3.bin file. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597389030-13887-2-git-send-email-kvalo@codeaurora.org commit 4c9454267e019212b466810bc68281fb25424af2 Author: BALATON Zoltan Date: Mon Jul 20 22:53:46 2020 +0200 HID: apple: Add support for Matias wireless keyboard The Matias Wireless keyboard has an Apple like layout and identifies as ISO RevB Alu keyboard. Use hid-apple for it so Fn key and media control functions work as expected. Signed-off-by: BALATON Zoltan Signed-off-by: Jiri Kosina commit 1ff8ed786d5d8ed6d109affe6d732dfc85a45b2e Author: Govind Singh Date: Thu Aug 13 12:04:26 2020 +0300 ath11k: use remoteproc only with AHB devices QCA6390 and other PCI devices use MHI based firmware loading and do not use remoteproc, so enable it only for AHB devices. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597309466-19688-11-git-send-email-kvalo@codeaurora.org commit 7f4beda2ba0393ecb04b4ae3017f819041236c43 Author: Govind Singh Date: Thu Aug 13 12:04:25 2020 +0300 ath11k: pci: add HAL, CE and core initialisation Define CE pipe/qmi config and setup pci irq for the same. Call ath11k_core_init(). Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597309466-19688-10-git-send-email-kvalo@codeaurora.org commit 1399fb87ea3e96d26398a16cb95dc395a68c51bc Author: Govind Singh Date: Thu Aug 13 12:04:24 2020 +0300 ath11k: register MHI controller device for QCA6390 Modem Host Interface (MHI) is a communication protocol to communicate with external Qualcomm modems and Wi-Fi chipsets over high speed peripheral buses. Even though MHI doesn’t dictate underlying physical layer, protocol and MHI stack is structured for PCI based devices. Register directly with MHI subsystem as a MHI device driver for firmware download to QCA6390. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597309466-19688-9-git-send-email-kvalo@codeaurora.org commit b8246f88468440ac596238ff402bcb636053d657 Author: Kalle Valo Date: Thu Aug 13 12:04:23 2020 +0300 ath11k: implement ath11k_core_pre_init() This is needed to initialise hw_params before MHI registration starts. MHI needs location of firmware directory and that's delivered via hw_params. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597309466-19688-8-git-send-email-kvalo@codeaurora.org commit 5697a564d369412ca988696f43dacad59b5f7efb Author: Govind Singh Date: Thu Aug 13 12:04:22 2020 +0300 ath11k: pci: add MSI config initialisation QCA6390 uses PCI MSI for CE/MHI/DP interrupt. Add MSI vector mapping and MSI enable/disable operations. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597309466-19688-7-git-send-email-kvalo@codeaurora.org commit 5762613ededb20f1893abf6aeda2d4091dd4178b Author: Govind Singh Date: Thu Aug 13 12:04:21 2020 +0300 ath11k: pci: setup resources Add support for setting up pci region and dma mask. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597309466-19688-6-git-send-email-kvalo@codeaurora.org commit 6e0355afaeb23ccf0aaee37bda2883003fd4cd31 Author: Govind Singh Date: Thu Aug 13 12:04:20 2020 +0300 ath11k: add simple PCI client driver for QCA6390 chipset QCA6390 is a PCI based 11ax chipset, split AHB into own kernel module ath11k_ahb.ko and add ath11k_pci.ko for PCI devices. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597309466-19688-5-git-send-email-kvalo@codeaurora.org commit 34d5a3a88436327dae73550d8e0d831b95dd5d0f Author: Kalle Valo Date: Thu Aug 13 12:04:19 2020 +0300 ath11k: move ring mask definitions to hw_params This is needed for splitting ahb and pci modules as they have different ring mask settings. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597309466-19688-4-git-send-email-kvalo@codeaurora.org commit 9de2ad43d46c80fcb4072f2e9bf36623f7e5b4ff Author: Carl Huang Date: Thu Aug 13 12:04:18 2020 +0300 ath11k: add hw_params entry for QCA6390 Define own firmware directory and settings for QCA6390. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597309466-19688-3-git-send-email-kvalo@codeaurora.org commit 322b60ceb0f321b4b9c41717f7306c0dbaf0279b Author: Carl Huang Date: Thu Aug 13 12:04:17 2020 +0300 ath11k: do not depend on ARCH_QCOM for ath11k With only IPQ8074 supported ath11k was only usable on Qualcomm architectures. But now that we are adding QCA6390 PCI support to ath11k that's not the case anymore and it can be used on any architecture supporting PCI. So remove the dependency on ARCH_QCOM. After that there is also no need to depend on COMPILE_TEST. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Carl Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597309466-19688-2-git-send-email-kvalo@codeaurora.org commit 6bfa31756ae905e23050ee10a3b4d3d435122c97 Author: Linus Walleij Date: Wed Jul 22 09:56:32 2020 +0200 HID: cp2112: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Cc: Eudean Sun Cc: Benjamin Tissoires Cc: Sébastien Szymanski Signed-off-by: Linus Walleij Signed-off-by: Jiri Kosina commit 8c91b81933d35ae4c3bf524b03595e9ff2198907 Author: Dinh Nguyen Date: Wed Jul 29 12:45:11 2020 -0500 EDAC/socfpga: Transfer SoCFPGA EDAC maintainership Thor Thayer is leaving Intel and will no longer be able to maintain the EDAC for SoCFPGA driver, thus transfer maintainership to Dinh Nguyen. Signed-off-by: Dinh Nguyen Signed-off-by: Borislav Petkov Acked-by: Thor Thayer Link: https://lkml.kernel.org/r/20200729174511.4256-1-dinguyen@kernel.org commit faf6dc64c4b14563c82bb9c5ece8d4a69c9c1ace Author: Alexandre Belloni Date: Tue Aug 4 13:56:22 2020 +0200 ARM: at91: pm: remove unnecessary at91sam9x60_idle cpu_do_idle() is already the default action for arm_pm_idle, there is no need to open code it. Signed-off-by: Alexandre Belloni Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20200804115622.63232-1-alexandre.belloni@bootlin.com commit e222f943519564978e082c152b4140a47e93392c Author: Claudiu Beznea Date: Wed Aug 5 11:36:50 2020 +0300 ARM: at91: pm: of_node_put() after its usage Put node after it has been used. Fixes: 13f16017d3e3f ("ARM: at91: pm: Tie the USB clock mask to the pmc") Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1596616610-15460-4-git-send-email-claudiu.beznea@microchip.com commit 39add36049c347dffcb2be872dd442c137625f17 Author: Claudiu Beznea Date: Wed Aug 5 11:36:49 2020 +0300 ARM: at91: pm: add per soc validation of pm modes Not all SoCs supports all the PM mode. User may end up settings, e.g. backup mode, on a non SAMA5D2 device, but the mode to not be valid. If backup mode is used on a devices not supporting it there will be no way of resuming other than rebooting. Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1596616610-15460-3-git-send-email-claudiu.beznea@microchip.com commit e70bfc2fa8fe1a95a522f9d1ccf24d3d9b81366a Author: Claudiu Beznea Date: Wed Aug 5 11:36:48 2020 +0300 ARM: at91: pm: add support for ULP0 fast wakeup ULP0 fast improves suspend/resume time with few milliseconds the drawback being the power consumption. The mean values measured for suspend/resume time are as follows (measured on SAMA5D2 Xplained board), ULP0 compared with fast ULP0: - ulp0 fast: suspend time: 169 ms, resume time: 216 ms - ulp0 : suspend time: 197 ms, resume time: 258 ms Current consumption while suspended (measured on SAMA5D2 Xplained board): - ulp0 fast: 730uA - ulp0 : 270uA Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1596616610-15460-2-git-send-email-claudiu.beznea@microchip.com commit bd17e0b7714fb7e13f340965470bf5cada535f76 Author: Wei Yongjun Date: Tue Jul 14 22:23:08 2020 +0800 EDAC/thunderx: Make symbol lmc_dfs_ents static Symbol 'lmc_dfs_ents' is not used outside of thunderx_edac.c, so make it static: drivers/edac/thunderx_edac.c:457:22: warning: symbol 'lmc_dfs_ents' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Borislav Petkov Acked-by: Robert Richter Link: https://lkml.kernel.org/r/20200714142308.46612-1-weiyongjun1@huawei.com commit e23a7cdeb3da8d3ca943fced1420020c1d524684 Author: Talel Shenhar Date: Sun Aug 16 21:55:51 2020 +0300 EDAC/al-mc-edac: Add Amazon's Annapurna Labs Memory Controller driver The Amazon's Annapurna Labs Memory Controller EDAC supports ECC capability for error detection and correction (Single bit error correction, Double detection). This driver introduces EDAC driver for that capability. [ bp: Remove "EDAC" string from Kconfig tristate as it is redundant. ] Signed-off-by: Talel Shenhar Signed-off-by: Borislav Petkov Reviewed-by: James Morse Link: https://lkml.kernel.org/r/20200816185551.19108-3-talel@amazon.com commit eb3411c95d6dd144c9c977e73d951ccfade91da7 Author: Talel Shenhar Date: Sun Aug 16 21:55:50 2020 +0300 dt-bindings: EDAC: Add Amazon's Annapurna Labs Memory Controller binding Document Amazon's Annapurna Labs Memory Controller EDAC SoC binding. Signed-off-by: Talel Shenhar Signed-off-by: Borislav Petkov Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/20200816185551.19108-2-talel@amazon.com commit 92afd5786d9048454bbf7e207d015daf127e557d Author: Horia Geantă Date: Wed Jul 15 18:26:03 2020 +0300 ARM: dts: imx6ull: add rng Add node for the RNGB block. Signed-off-by: Horia Geantă Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 79428026bdbd7802221e8c70b66eff4ed215494a Author: Horia Geantă Date: Wed Jul 15 18:26:02 2020 +0300 ARM: dts: imx6sll: add rng Add node for the RNGB block. Signed-off-by: Horia Geantă Signed-off-by: Shawn Guo commit 82ffb35c2ce63ef8e0325f75eb48022abcf8edbe Author: Horia Geantă Date: Wed Jul 15 18:26:01 2020 +0300 ARM: dts: imx6sl: fix rng node rng DT node was added without a compatible string. i.MX driver for RNGC (drivers/char/hw_random/imx-rngc.c) also claims support for RNGB, and is currently used for i.MX25. Let's use this driver also for RNGB block in i.MX6SL. Fixes: e29fe21cff96 ("ARM: dts: add device tree source for imx6sl SoC") Signed-off-by: Horia Geantă Signed-off-by: Shawn Guo commit 417e24986935f6bd6afa38010cc981cf4d7a7bef Author: Lad Prabhakar Date: Fri Jul 17 18:00:24 2020 +0100 pinctrl: sh-pfc: r8a7790: Add USB1 PWEN pin and group Add USB1 PWEN pin and group for USB1 interface. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/1595005225-11519-2-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit cd8bc7d4eb6608afe78ac51422ef94b7824f1646 Author: Lad Prabhakar Date: Tue Aug 11 15:03:57 2020 +0100 arm64: defconfig: Enable R-Car PCIe endpoint driver Enable R-Car PCIe endpoint driver on RZ/G2E board, including enabling endpoint configurations CONFIG_PCI_ENDPOINT, CONFIG_PCI_ENDPOINT_CONFIGFS, CONFIG_PCI_EPF_TEST and CONFIG_PCI_ENDPOINT_TEST required to use and test the driver. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200811140357.564-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 77eaaf97335c7f732ac1974853af5a4a0e732b12 Author: Biju Das Date: Thu Aug 6 13:17:04 2020 +0100 ARM: shmobile: defconfig: Enable TOUCHSCREEN_STMPE Enable support for the stmpe i2c touch controller, which is used on the iWave RZ/G1E platform. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20200806121704.3192-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit afdac0bfbd49e46f7046c7f4bad6daa4a3ebf6fc Author: Lad Prabhakar Date: Wed Aug 12 16:00:48 2020 +0100 ARM: dts: r8a7742: Add QSPI support Add QSPI DT node to R8A7742 SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200812150048.27721-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 2e23a1db4840e6adf4072802d4d91edf4a375b90 Author: Lad Prabhakar Date: Wed Aug 12 15:02:17 2020 +0100 arm64: dts: renesas: r8a774e1-hihope-rzg2h: Setup DU clocks Setup up the required clocks for the DU to be functional. Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200812140217.24251-10-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 112441c24bcdf806335ae0f52e1b4107c6a962ec Author: Marian-Cristian Rotariu Date: Wed Aug 12 15:02:16 2020 +0100 arm64: dts: renesas: r8a774e1: Add LVDS device node Add the LVDS device node to R8A774E1 to SoC dtsi and connect it with the DU node. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200812140217.24251-9-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 5698b68de784f483fa4ea405a49097854c4886e4 Author: Marian-Cristian Rotariu Date: Wed Aug 12 15:02:14 2020 +0100 arm64: dts: renesas: r8a774e1: Populate HDMI encoder node Populate HDMI node properties in R8A774E1 SoC dtsi. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200812140217.24251-7-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f22d0550b83570b10e8f4a474d9629fd4ad76db7 Author: Marian-Cristian Rotariu Date: Wed Aug 12 15:02:11 2020 +0100 arm64: dts: renesas: r8a774e1: Populate DU device node Populate the DU device node properties in R8A774E1 SoC dtsi. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200812140217.24251-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ebe5f898b60b341bd223d835dd3d7d77a5b38979 Author: Lad Prabhakar Date: Mon Aug 10 18:41:56 2020 +0100 ARM: dts: r8a7742: Add PCIe Controller device node Add a device node for the PCIe controller on the Renesas RZ/G1H (r8a7742) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Chris Paterson Link: https://lore.kernel.org/r/20200810174156.30880-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit e7cc614be7886b464a429f83162171128c205b2e Author: Lad Prabhakar Date: Mon Aug 10 18:12:39 2020 +0100 arm64: dts: renesas: r8a774b1-hihope-rzg2n-ex: Enable sata Enable sata interface on HiHope RZ/G2N board. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20200810171239.30401-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4398ab2367fa0394170543845041d26afcefe421 Author: Marian-Cristian Rotariu Date: Mon Aug 10 10:22:08 2020 +0100 arm64: dts: renesas: r8a774e1: Add VSP instances The RZ/G2H (R8A774E1) has 6 VSP instances. Based on the work done for r8a7795 SoC. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200810092208.27320-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a3855ebcded87ff8368e61139d98c891a842e7b2 Author: Marian-Cristian Rotariu Date: Mon Aug 10 10:22:07 2020 +0100 arm64: dts: renesas: r8a774e1: Add FCPF and FCPV instances Add FCPF and FCPV instances to the r8a774e1 dtsi. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200810092208.27320-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 549f43917ab32947f723aaa26975a1d6282d72c7 Author: Lad Prabhakar Date: Fri Aug 7 18:49:53 2020 +0100 ARM: dts: r8a7742: Add LVDS support Add LVDS encoder node to r8a7742 SoC DT. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200807174954.14448-7-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 6a62f64305c65e78db290c0ca153759b6b9ca130 Author: Lad Prabhakar Date: Fri Aug 7 18:49:52 2020 +0100 ARM: dts: r8a7742: Add DU support Add a Display Unit (DU) node to r8a7742 SoC DT. Boards that want to enable the DU need to specify the output topology. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200807174954.14448-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 02b24822953571d3ef83029e53bcd011d39dcb39 Author: Lad Prabhakar Date: Thu Aug 6 19:31:52 2020 +0100 ARM: dts: r8a7742: Add TPU support Add TPU support to R8A7742 SoC DT. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/20200806183152.11809-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b4a43810f596b55cb29b37ce4212ac7319661fb7 Author: Lad Prabhakar Date: Thu Aug 6 19:31:50 2020 +0100 ARM: dts: r8a7742: Add PWM SoC support Add the definitions for pwm[0123456] to the SoC .dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/20200806183152.11809-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4304d880a1c3676f21e60dc3bb919ff6e7d10ebf Author: Lad Prabhakar Date: Thu Aug 6 19:31:48 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Enable cmt0 Enable cmt0 support on r8a7742-iwg21d-q7 board. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/20200806183152.11809-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 73aa5b7c941145b7a1a53f31b6a71dfe98007870 Author: Biju Das Date: Wed Aug 5 15:26:34 2020 +0100 ARM: dts: iwg22d-sodimm: Fix dt nodes sorting Some r8a7745-iwg22d-sodimm.dts device nodes are not sorted alphabetically. This patch fixes the sorting of nodes and also fixes a typo in the stmpe node. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20200805142634.12252-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit eb302bb9c7ab9bbf8358b97b5f8b1c363af48239 Author: Lad Prabhakar Date: Fri Jul 17 18:00:25 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Enable HSUSB, USB2.0 and xHCI Enable support for HSUSB, USB2.0 and xHCI on iWave RZ/G1H carrier board. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Biju Das Link: https://lore.kernel.org/r/1595005225-11519-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 992d7a8b88c83c05664b649fc54501ce58e19132 Author: Yoshihiro Shimoda Date: Fri Jul 17 21:33:21 2020 +0900 arm64: dts: renesas: ulcb: add full-pwr-cycle-in-suspend into eMMC nodes Add full-pwr-cycle-in-suspend property to do a graceful shutdown of the eMMC device in system suspend. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1594989201-24228-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit cfc7ba103fbd3f6c4b55380dd64649f4102097ac Author: Lad Prabhakar Date: Thu Jul 16 18:18:35 2020 +0100 arm64: dts: renesas: r8a774e1: Add VIN and CSI-2 nodes Add VIN and CSI-2 nodes to RZ/G2H (R8A774E1) SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594919915-5225-21-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8183a7938cfec0569d77755af5ce5ff5589f3540 Author: Lad Prabhakar Date: Thu Jul 16 18:18:30 2020 +0100 arm64: dts: renesas: r8a774e1: Add audio support Add sound support for the RZ/G2H SoC (a.k.a. R8A774E1). Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594919915-5225-16-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 896c62d4369c2c8ec3af3b0f74d66da2de697ff7 Author: Lad Prabhakar Date: Thu Jul 16 18:18:28 2020 +0100 arm64: dts: renesas: r8a774e1: Add USB-DMAC and HSUSB device nodes Add usb dmac and hsusb device nodes to the RZ/G2H SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594919915-5225-14-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 0faf5f952b4ec26a9b7ed5f537403e7fd32f57d5 Author: Lad Prabhakar Date: Thu Jul 16 18:18:25 2020 +0100 arm64: dts: renesas: r8a774e1: Add USB3.0 device nodes Add usb3.0 phy, host and function device nodes on RZ/G2H SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594919915-5225-11-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 92b2c276e15c7f93f1148329a1f713c51b26f652 Author: Lad Prabhakar Date: Thu Jul 16 18:18:21 2020 +0100 arm64: dts: renesas: r8a774e1: Add USB2.0 phy and host (EHCI/OHCI) device nodes Add USB2.0 phy and host (EHCI/OHCI) device nodes on RZ/G2H SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594919915-5225-7-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 2f3c7323aba207b5cf1e769b8f48ce726531de4a Author: Lad Prabhakar Date: Thu Jul 16 18:18:19 2020 +0100 arm64: dts: renesas: r8a774e1: Add SATA controller node Add the SATA controller node to the RZ/G2H SoC specific dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594919915-5225-5-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit cbb2f09abcd635888508338d4436771fe07688d1 Author: Lad Prabhakar Date: Thu Jul 16 18:18:17 2020 +0100 arm64: dts: renesas: r8a774e1: Add PCIe device nodes Add PCIe{0,1} device nodes for R8A774E1 SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594919915-5225-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 66c8ef900611166f7a8a343172b1b38d21ecba61 Author: Gerd Hoffmann Date: Fri Aug 7 12:55:01 2020 +0200 drm/qxl: don't take vga ports on rev5+ qemu 5.0 introduces a new qxl hardware revision 5. Unlike revision 4 (and below) the device doesn't switch back into vga compatibility mode when someone touches the vga ports. So we don't have to reserve the vga ports any more to avoid that happening. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20200807105501.24599-1-kraxel@redhat.com commit 51c3b0cc32d2e17581fce5b487ee95bbe9e8270a Author: Gurchetan Singh Date: Mon Jun 15 16:05:00 2020 -0700 drm/virtio: Revert "drm/virtio: Call the right shmem helpers" This reverts commit d323bb44e4d23802eb25d13de1f93f2335bd60d0. Fixes a double-free regression: [ 4.357928] drm_gem_shmem_free_object+0xb4/0x100 [ 4.358983] virtio_gpu_dequeue_ctrl_func+0xd9/0x290 [ 4.360343] process_one_work+0x1d2/0x3a0 [ 4.361581] worker_thread+0x45/0x3c0 [ 4.362645] kthread+0xf6/0x130 [ 4.363543] ? process_one_work+0x3a0/0x3a0 [ 4.364770] ? kthread_park+0x80/0x80 [ 4.365799] ret_from_fork+0x35/0x40 [ 4.367103] Modules linked in: [ 4.367958] CR2: 0000000000000018 [ 4.368857] ---[ end trace db84f7a2974d5c79 ]--- [ 4.370118] RIP: 0010:dma_direct_unmap_sg+0x1f/0x60 In addition, virtio has it's own set of dma-ops so there's not an obviously clean way to transition to shmem helpers. Fixes: d323bb44e4d2 ("drm/virtio: Call the right shmem helpers") Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20200615230500.551-1-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit d4c5c2f331199aad3ff5d952de4dc4e28fa6beec Author: Colin Ian King Date: Wed Jul 1 14:41:54 2020 +0100 drm/virtgpu: remove redundant assignments to width and height Variables width and height are being assigned values that are never read. The assignments are redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: http://patchwork.freedesktop.org/patch/msgid/20200701134154.549112-1-colin.king@canonical.com Signed-off-by: Gerd Hoffmann commit dc7a8476cffcb98b008ca44fdadf235a3ad7e7e2 Author: Yazen Ghannam Date: Wed Jul 8 15:35:15 2020 +0000 EDAC/mce_amd: Add new error descriptions for existing types A few existing MCA bank types will have new error types in future SMCA systems. Add the descriptions for the new error types. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200708153515.1911642-1-Yazen.Ghannam@amd.com commit 7d4c1ea2be825bc65e0de0fb34f3531aaf03e673 Author: Alexander A. Klimov Date: Wed Jul 8 13:35:46 2020 +0200 EDAC: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. [ bp: Merge all EDAC patches into a single one. ] Signed-off-by: Alexander A. Klimov Signed-off-by: Borislav Petkov Acked-by: Tero Kristo # ti_edac Link: https://lkml.kernel.org/r/20200708113546.14135-1-grandmaster@al2klimov.de commit bd84256e86ecfb117d80c52870f4ece744610c97 Author: Bard Liao Date: Mon Jul 27 05:59:45 2020 +0800 soundwire: master: enable pm runtime The hierarchy of soundwire devices is platform device -> M device -> S device. A S device is physically attached on the platform device. So the platform device should be resumed when a S device is resumed. As the bridge of platform device and S device, we have to implement runtime pm on M driver. We have set runtime pm ops in M driver already, but still need to enable runtime pm. Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200726215945.3119-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit e8ee6c8cb61b676f1a2d6b942329e98224bd8ee9 Author: Serge Semin Date: Fri Jul 31 23:08:26 2020 +0300 dmaengine: dw: Add DMA-channels mask cell support DW DMA IP-core provides a way to synthesize the DMA controller with channels having different parameters like maximum burst-length, multi-block support, maximum data width, etc. Those parameters both explicitly and implicitly affect the channels performance. Since DMA slave devices might be very demanding to the DMA performance, let's provide a functionality for the slaves to be assigned with DW DMA channels, which performance according to the platform engineer fulfill their requirements. After this patch is applied it can be done by passing the mask of suitable DMA-channels either directly in the dw_dma_slave structure instance or as a fifth cell of the DMA DT-property. If mask is zero or not provided, then there is no limitation on the channels allocation. For instance Baikal-T1 SoC is equipped with a DW DMAC engine, which first two channels are synthesized with max burst length of 16, while the rest of the channels have been created with max-burst-len=4. It would seem that the first two channels must be faster than the others and should be more preferable for the time-critical DMA slave devices. In practice it turned out that the situation is quite the opposite. The channels with max-burst-len=4 demonstrated a better performance than the channels with max-burst-len=16 even when they both had been initialized with the same settings. The performance drop of the first two DMA-channels made them unsuitable for the DW APB SSI slave device. No matter what settings they are configured with, full-duplex SPI transfers occasionally experience the Rx FIFO overflow. It means that the DMA-engine doesn't keep up with incoming data pace even though the SPI-bus is enabled with speed of 25MHz while the DW DMA controller is clocked with 50MHz signal. There is no such problem has been noticed for the channels synthesized with max-burst-len=4. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200731200826.9292-6-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit 8d2f59dab3cfdbb23959b03d561819e180c1bc03 Author: Serge Semin Date: Fri Jul 31 23:08:25 2020 +0300 dmaengine: dw: Ignore burst setting for memory peripherals According to the DW DMA controller Databook 2.18b (page 40 "3.5 Memory Peripherals") memory peripherals don't have handshaking interface connected to the controller, therefore they can never be a flow controller. Since the CTLx.SRC_MSIZE and CTLx.DEST_MSIZE are properties valid only for peripherals with a handshaking interface, we can freely zero these fields out if the memory peripheral is selected to be the source or the destination of the DMA transfers. Note according to the databook, length of burst transfers to memory is always equal to the number of data items available in a channel FIFO or data items required to complete the block transfer, whichever is smaller; length of burst transfers from memory is always equal to the space available in a channel FIFO or number of data items required to complete the block transfer, whichever is smaller. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200731200826.9292-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit 0ed725d1f559b290a2fd12a9c689d946a7bef51d Author: Serge Semin Date: Fri Jul 31 23:08:24 2020 +0300 dmaengine: dw: Discard dlen from the dev-to-mem xfer width calculation Indeed in case of the DMA_DEV_TO_MEM DMA transfers it's enough to take the destination memory address and the destination master data width into account to calculate the CTLx.DST_TR_WIDTH setting of the memory peripheral. According to the DW DMAC IP-core Databook 2.18b (page 66, Example 5) at the and of a DMA transfer when the DMA-channel internal FIFO is left with data less than for a single destination burst transaction, the destination peripheral will enter the Single Transaction Region where the DW DMA controller can complete a block transfer to the destination using single transactions (non-burst transaction of CTLx.DST_TR_WIDTH bytes). If there is no enough data in the DMA-channel internal FIFO for even a single non-burst transaction of CTLx.DST_TR_WIDTH bytes, then the channel enters "FIFO flush mode". That mode is activated to empty the FIFO and flush the leftovers out to the memory peripheral. The flushing procedure is simple. The data is sent to the memory by means of a set of single transaction of CTLx.SRC_TR_WIDTH bytes. To sum up it's redundant to use the LLPs length to find out the CTLx.DST_TR_WIDTH parameter value, since each DMA transfer will be completed with the CTLx.SRC_TR_WIDTH bytes transaction if it is required. We suggest to remove the LLP entry length from the statement which calculates the memory peripheral DMA transaction width since it's redundant due to the feature described above. By doing so we'll improve the memory bus utilization and speed up the DMA-channel performance for DMA_DEV_TO_MEM DMA-transfers. Signed-off-by: Serge Semin Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200731200826.9292-4-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit 6d9459d04081c796fc67c2bb771f4e4ebb5744c4 Author: Serge Semin Date: Fri Jul 31 23:08:23 2020 +0300 dmaengine: dw: Activate FIFO-mode for memory peripherals only CFGx.FIFO_MODE field controls a DMA-controller "FIFO readiness" criterion. In other words it determines when to start pushing data out of a DW DMAC channel FIFO to a destination peripheral or from a source peripheral to the DW DMAC channel FIFO. Currently FIFO-mode is set to one for all DW DMAC channels. It means they are tuned to flush data out of FIFO (to a memory peripheral or by accepting the burst transaction requests) when FIFO is at least half-full (except at the end of the block transfer, when FIFO-flush mode is activated) and are configured to get data to the FIFO when it's at least half-empty. Such configuration is a good choice when there is no slave device involved in the DMA transfers. In that case the number of bursts per block is less than when CFGx.FIFO_MODE = 0 and, hence, the bus utilization will improve. But the latency of DMA transfers may increase when CFGx.FIFO_MODE = 1, since DW DMAC will wait for the channel FIFO contents to be either half-full or half-empty depending on having the destination or the source transfers. Such latencies might be dangerous in case if the DMA transfers are expected to be performed from/to a slave device. Since normally peripheral devices keep data in internal FIFOs, any latency at some critical moment may cause one being overflown and consequently losing data. This especially concerns a case when either a peripheral device is relatively fast or the DW DMAC engine is relatively slow with respect to the incoming data pace. In order to solve problems, which might be caused by the latencies described above, let's enable the FIFO half-full/half-empty "FIFO readiness" criterion only for DMA transfers with no slave device involved. Thanks to the commit 99ba8b9b0d97 ("dmaengine: dw: Initialize channel before each transfer") we can freely do that in the generic dw_dma_initialize_chan() method. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200731200826.9292-3-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit 7b9599bb9a1bee714152720a2f4b269c3a119973 Author: Serge Semin Date: Fri Jul 31 23:08:22 2020 +0300 dt-bindings: dma: dw: Add optional DMA-channels mask cell support Each DW DMA controller channel can be synthesized with different parameters like maximum burst-length, multi-block support, maximum data width, etc. Most of these parameters determine the DW DMAC channels performance in its own aspect. On the other hand these parameters can be implicitly responsible for the channels performance degradation (for instance multi-block support is a very useful feature, but having it disabled during the DW DMAC synthesize will provide a more optimized core). Since DMA slave devices may have critical dependency on the DMA engine performance, let's provide a way for the slave devices to have the DMA-channels allocated from a pool of the channels, which according to the system engineer fulfill their performance requirements. The pool is determined by a mask optionally specified in the fifth DMA-cell of the DMA DT-property. If the fifth cell is omitted from the phandle arguments or the mask is zero, then the allocation will be performed from a set of all channels provided by the DMA controller. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200731200826.9292-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit 1d220435cab3bf74193ca1949059a1975e53619c Author: Laurent Pinchart Date: Wed Aug 12 20:12:28 2020 +0300 dmaengine: xilinx: dpdma: Add debugfs support Expose statistics to debugfs when available. This helps debugging issues with the DPDMA driver. Signed-off-by: Hyun Kwon Signed-off-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200812171228.9751-1-laurent.pinchart@ideasonboard.com Signed-off-by: Vinod Koul commit 9c857a8e89035583ad4a9e2f160cc760012070c8 Author: Peter Ujfalusi Date: Mon Aug 3 13:07:24 2020 +0300 dmaengine: ti: k3-psil-j721e: Add entries for 2nd port of MCU SA2UL The security accelerator within MCU domain supports two ports similarly to the SA2UL in MAIN domain. Add endpoint configuration for the two ingress and one egress threads of the second port. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200803100724.19003-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit e9ca48d9bff857a61f46a1478ec7141cf019d733 Author: Peter Ujfalusi Date: Mon Aug 3 15:57:13 2020 +0300 dmaengine: ti: k3-psil: add map for j7200 Add new PSI-L map file for the new TI j7200 SoC. The DMA hardware in j7200 is the same as in j721e with different set of peripherals resulting different PSI-L thread map compered to j721e. See J7200 Technical Reference Manual (SPRUIU1, June 2020) for further details: https://www.ti.com/lit/pdf/spruiu1 Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200803125713.17829-3-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit ce310bd70414392448d7f8301e0817151555a34e Author: Peter Ujfalusi Date: Mon Aug 3 15:57:12 2020 +0300 dmaengine: ti: k3-psil: Use soc_device_match to get the psil map Instead of separate of_machine_is_compatible() it is better to use soc_device_match() and soc_device_attribute struct to get the PSI-L map for the booted device. By using soc_device_match() it is easier to add support for new devices. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200803125713.17829-2-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 0ec083e50ca816953e65e3209c7199cd1a203ddc Author: Dave Jiang Date: Wed Jul 29 08:57:26 2020 -0700 dmaengine: idxd: clear misc interrupt cause after read Move the clearing of misc interrupt cause to immediately after reading the register in order to allow the next interrupt to be asserted. Suggested-by: Nikhil Rao Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/159603824665.28647.5344356370364397996.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit d1134d6619804644d8fac882519277654dd6cbb2 Author: Krzysztof Kozlowski Date: Tue Jul 28 19:09:39 2020 +0200 dmaengine: ti: omap-dma: Drop of_match_ptr to fix -Wunused-const-variable The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF: drivers/dma/ti/omap-dma.c:1892:34: warning: 'omap_dma_match' defined but not used [-Wunused-const-variable=] 1892 | static const struct of_device_id omap_dma_match[] = { Signed-off-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200728170939.28278-1-krzk@kernel.org Signed-off-by: Vinod Koul commit 7db7f8e0a375d364c79cbc2d14ffe8ee594f0906 Author: Vaibhav Gupta Date: Mon Jul 20 17:07:41 2020 +0530 dmaengine: pch_dma: use generic power management Drivers using legacy PM have to manage PCI states and device's PM states themselves. They also need to take care of configuration registers. With improved and powerful support of generic PM, PCI Core takes care of above mentioned, device-independent, jobs. This driver makes use of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), and pci_set_power_state() to do required operations. In generic mode, they are no longer needed. Change function parameter in both .suspend() and .resume() to "struct device*" type. Use dev_get_drvdata() to get drv data. Compile-tested only. Signed-off-by: Vaibhav Gupta Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200720113740.353479-1-vaibhavgupta40@gmail.com Signed-off-by: Vinod Koul commit 5f374e63d214a1e1cfaff9575fa34f27b046d54c Author: Guido Günther Date: Sun Aug 16 09:13:43 2020 +0200 dt-bindings: panel: rocktech,jh057n00900: Add myself as maintainer I maintained the txt based bindings before yaml conversion and care about the driver. Signed-off-by: Guido Günther Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/9427a9c0e6aaf9fb375f7ecee6691ba491149d52.1597561897.git.agx@sigxcpu.org commit 087e3d479155a18ff57f294c04e33c5ac7d6f50a Author: Guido Günther Date: Sun Aug 16 09:13:42 2020 +0200 dt-bindings: panel: rocktech,jh057n00900: Modernize - Use common properties from panel-common.yaml - Indent comment like content - Don't preserve newlines in description - Indent example by four spaces Signed-off-by: Guido Günther Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/60639e670028af7e8ab31379256ba331a1bdf6cc.1597561897.git.agx@sigxcpu.org commit 5759c9674c20ffdb2c02c29fe85462732d86ed78 Author: Dmitry Osipenko Date: Fri Aug 14 00:56:09 2020 +0300 drm/panel-simple: Read panel orientation The panel orientation needs to parsed from a device-tree and assigned to the panel's connector in order to make orientation property available to userspace. That's what this patch does for the panel-simple driver. Signed-off-by: Dmitry Osipenko Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200813215609.28643-5-digetx@gmail.com commit 58310c2ec9941ff4e2582764e8ab3ee9620ccd2c Author: Dmitry Osipenko Date: Fri Aug 14 00:56:08 2020 +0300 drm/panel: lvds: Read panel orientation The panel orientation needs to parsed from a device-tree and assigned to the panel's connector in order to make orientation property available to userspace. That's what this patch does for the generic LVDS panel. Signed-off-by: Dmitry Osipenko Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200813215609.28643-4-digetx@gmail.com commit 4a135d54410f11041baa92d8709a9fd16be5cab9 Author: Derek Basehore Date: Fri Aug 14 00:56:07 2020 +0300 drm/panel: Read panel orientation for BOE TV101WUM-NL6 This reads the DT setting for the panel rotation to set the panel orientation in the get_modes callback. Reviewed-by: Dmitry Osipenko Signed-off-by: Derek Basehore Signed-off-by: Dmitry Osipenko Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200813215609.28643-3-digetx@gmail.com commit 5f3e7503b97b3d068304ac8bb74faa10b804b24d Author: Derek Basehore Date: Fri Aug 14 00:56:06 2020 +0300 drm/panel: Add helper for reading DT rotation This adds a helper function for reading the rotation (panel orientation) from the device tree. Reviewed-by: Sam Ravnborg Tested-by: Dmitry Osipenko Signed-off-by: Derek Basehore Signed-off-by: Dmitry Osipenko Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200813215609.28643-2-digetx@gmail.com commit 1c243751c095bb95e2795f076ea7a0bcdd60a93a Author: Icenowy Zheng Date: Mon Jul 20 01:10:05 2020 +0800 drm/panel: ilitek-ili9881c: add support for Feixin K101-IM2BYL02 panel Feixin K101-IM2BYL02 is a new panel by Feixin designed as a replacement to their K101-IM2BA02 panel. This panel utilizes the Ilitek ILI9881C controller. Add this panel's initialzation sequence and timing to ILI9881C driver. Signed-off-by: Icenowy Zheng Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200719171007.276383-2-icenowy@aosc.io commit 82df3aa4968c5a1a092990c499887fd0594a4004 Author: Icenowy Zheng Date: Mon Jul 20 01:10:04 2020 +0800 dt-bindings: ili9881c: add compatible string for Feixin K101-IM2BYL02 Feixin K101-IM2BYL02 is a drop-in replacement of K101-IM2BA02 panel (which is already supported by panel-feixin-k101-im2ba02 driver) with the same pinout. It utilizes an Ilitek ILI9881C controller chip, so its compatible string should be added to ilitek,ili9881c file. Add the compatible string for it. Signed-off-by: Icenowy Zheng Acked-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200719171007.276383-1-icenowy@aosc.io commit b7d71b6e1f039873e05b2d53f88200757316f931 Author: Icenowy Zheng Date: Mon Jul 20 01:04:07 2020 +0800 drm/panel: ilitek-ili9881c: prepare for adding support for extra panels There're more panels with ILI9881C controller than the Bananapi one supported by this driver. Extract the mode and init sequence part, to prepare the driver for adding new panels. Signed-off-by: Icenowy Zheng Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200719170411.275812-2-icenowy@aosc.io commit e6c21e6f9cf4ef7986ed1b885e869ee7c3b12fc3 Author: Paul Cercueil Date: Tue Aug 11 02:22:40 2020 +0200 drm/panel: simple: Add 50Hz mode for sharp,ls020b1dd01d Add a perfect 50.00 Hz frame rate mode to the list of available modes for the Sharp LS020B1DD01D panel. Signed-off-by: Paul Cercueil Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200811002240.55194-6-paul@crapouillou.net commit c1bd32b5f6b55f101c1404a6abfa335dfb5408ef Author: Paul Cercueil Date: Tue Aug 11 02:22:39 2020 +0200 drm/panel: simple: Tweak timings of sharp,ls020b1dd01d for perfect 60Hz Modify the video mode in order to obtain a perfect 60.00 Hz frame rate using a 3 MHz pixel clock. Signed-off-by: Paul Cercueil Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200811002240.55194-5-paul@crapouillou.net commit 656b759636738a9ddc235de4b152743c5b7788c4 Author: Paul Cercueil Date: Tue Aug 11 02:22:38 2020 +0200 drm/panel: simple: Convert sharp,ls020b1dd01d from timings to videomode Convert the Sharp LS020B1DD01D panel entry from using a struct display_timing to using a struct drm_display_mode, as display_timing seems to be the old and legacy format. Signed-off-by: Paul Cercueil Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200811002240.55194-4-paul@crapouillou.net commit bdfd720fb25a0a1773d0554eaaa771596ffeffd8 Author: Paul Cercueil Date: Tue Aug 11 02:22:37 2020 +0200 drm/panel: novatek,nt39016: Add missing CR to error messages If you pass a string that is not terminated with a carriage return to dev_err(), it will eventually be printed with a carriage return, but not right away, since the kernel will wait for a pr_cont(). Signed-off-by: Paul Cercueil Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200811002240.55194-3-paul@crapouillou.net commit 5b44f125eff9df72336a12cf9839323dd7b70b74 Author: Paul Cercueil Date: Tue Aug 11 02:22:36 2020 +0200 drm/panel: novatek,nt39016: Handle backlight the standard way Instead of manipulating the backlight directly in this driver, register it in the probe using drm_panel_of_backlight() and let the drm_panel framework code handle it. Signed-off-by: Paul Cercueil Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200811002240.55194-2-paul@crapouillou.net commit 7a27ef5e83089090f3a4073a9157c862ef00acfc Author: Joerg Roedel Date: Fri Aug 14 17:19:47 2020 +0200 x86/mm/64: Update comment in preallocate_vmalloc_pages() The comment explaining why 4-level systems only need to allocate on the P4D level caused some confustion. Update it to better explain why on 4-level systems the allocation on PUD level is necessary. Signed-off-by: Joerg Roedel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200814151947.26229-3-joro@8bytes.org commit 58a18fe95e83b8396605154db04d73b08063f31b Author: Joerg Roedel Date: Fri Aug 14 17:19:46 2020 +0200 x86/mm/64: Do not sync vmalloc/ioremap mappings Remove the code to sync the vmalloc and ioremap ranges for x86-64. The page-table pages are all pre-allocated so that synchronization is no longer necessary. This is a patch that already went into the kernel as: commit 8bb9bf242d1f ("x86/mm/64: Do not sync vmalloc/ioremap mappings") But it had to be reverted later because it unveiled a bug from: commit 6eb82f994026 ("x86/mm: Pre-allocate P4D/PUD pages for vmalloc area") The bug in that commit causes the P4D/PUD pages not to be correctly allocated, making the synchronization still necessary. That issue got fixed meanwhile upstream: commit 995909a4e22b ("x86/mm/64: Do not dereference non-present PGD entries") With that fix it is safe again to remove the page-table synchronization for vmalloc/ioremap ranges on x86-64. Signed-off-by: Joerg Roedel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200814151947.26229-2-joro@8bytes.org commit 7c9f80cb76ec9f14c3b25509168b1a2f7942e418 Author: Juergen Gross Date: Sat Aug 15 12:06:41 2020 +0200 x86/paravirt: Avoid needless paravirt step clearing page table entries pte_clear() et al are based on two paravirt steps today: one step to create a page table entry with all zeroes, and one step to write this entry value. Drop the first step as it is completely useless. Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200815100641.26362-7-jgross@suse.com commit e1ac3e66d301e57472f31ebee81b916e9fa8b35b Author: Juergen Gross Date: Sat Aug 15 12:06:40 2020 +0200 x86/paravirt: Remove set_pte_at() pv-op On x86 set_pte_at() is now always falling back to set_pte(). So instead of having this fallback after the paravirt maze just drop the set_pte_at paravirt operation and let set_pte_at() use the set_pte() function directly. Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200815100641.26362-6-jgross@suse.com commit 76fdb041c1f02311e6e05211c895e932af08b041 Author: Juergen Gross Date: Sat Aug 15 12:06:39 2020 +0200 x86/entry/32: Simplify CONFIG_XEN_PV build dependency With 32-bit Xen PV support gone, the following commit is not needed anymore: a4c0e91d1d65bc58 ("x86/entry/32: Fix XEN_PV build dependency") Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200815100641.26362-5-jgross@suse.com commit ecac71816a1829c0e54c41c5f1845f75b55dc618 Author: Juergen Gross Date: Sat Aug 15 12:06:38 2020 +0200 x86/paravirt: Use CONFIG_PARAVIRT_XXL instead of CONFIG_PARAVIRT There are some code parts using CONFIG_PARAVIRT for Xen pvops related issues instead of the more stringent CONFIG_PARAVIRT_XXL. Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200815100641.26362-4-jgross@suse.com commit 94b827becc6a87c905ab30b398e12a266518acbb Author: Juergen Gross Date: Sat Aug 15 12:06:37 2020 +0200 x86/paravirt: Clean up paravirt macros Some paravirt macros are no longer used, delete them. Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200815100641.26362-3-jgross@suse.com commit 0cabf9914990dc59a7e1793ef2fb294d578dc210 Author: Juergen Gross Date: Sat Aug 15 12:06:36 2020 +0200 x86/paravirt: Remove 32-bit support from CONFIG_PARAVIRT_XXL The last 32-bit user of stuff under CONFIG_PARAVIRT_XXL is gone. Remove 32-bit specific parts. Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200815100641.26362-2-jgross@suse.com commit 72957f48aaaa4e62bff22af81b5d96ca6bd0f492 Author: Linus Walleij Date: Fri Aug 14 21:44:51 2020 +0200 drm/mcde: Retry DSI read/write transactions The vendor driver makes a few retries on read DSI transactions, something that is needed especially in case of read (such as reading the panel MTP ID) while the panel is running in video mode. This happens on the Samsung s6e63m0 panel on the Golden device. Retry reads and writes alike three times. Signed-off-by: Linus Walleij Reviewed-by: Stephan Gerhold Cc: Stephan Gerhold Link: https://patchwork.freedesktop.org/patch/msgid/20200814194451.3494294-1-linus.walleij@linaro.org commit db04b755edaa0c9d03e99f915e9060fef50277f1 Author: Wen Gong Date: Fri Aug 14 16:04:54 2020 +0800 ath10k: correct the array index from mcs index for HT mode for QCA6174 The mcs index of HT mode is 0 to 31, please refer http://mcsindex.com/. Its spatial stream(Nss) number is from 1 to 4, mcs index is 0~7 for Nss=1, 8~15 for Nss=2, 16~23 for Nss=3 and 24~31 is for Nss=4. The mcs is reported from firmware in wmi_tlv_peer_stats_info of event WMI_TLV_PEER_STATS_INFO_EVENTID, its range is from 0~15 for QCA6174 SDIO and PCIe. It is for both Nss=1 and Nss=2, and it has 2 rate table supported_ht_mcs_rate_nss1 and supported_ht_mcs_rate_nss2 in ath10k, they are for Nss=1 and Nss=2, each table has 8 rates. It need to find the matched row number with the mcs index, for example, mcs index is 2, it is <=7, so it is Nss=1, and match row 2 in table of Nss=1. If mcs index is 12, it is >= 8 and <= 15, so it is Nss=2, it match row 4(12-8) in table of Nss=2. If mcs index is >=16, it is for Nss=3/4, it need to add rate table, so it is not support in current ath10k. This patch is to find the row number in rate table of Nss=1 or Nss=2 with the mcs index reported from firmware. This patch only effect the chips which supports_peer_stats_info of its hw_params is true, it is true only for QCA6174 currently. Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00048 Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597392294-13124-1-git-send-email-wgong@codeaurora.org commit cbcbabb9c3950889664eb2380b71d9ac60ec5ce5 Author: Wen Gong Date: Fri Aug 14 18:55:51 2020 +0300 ath10k: enable supports_peer_stats_info for QCA6174 PCI devices When using QCA6174 PCI devices working in station mode, after connected to AP, tx bitrate is always '1.0 MBit/s' in output of command 'iw wlan0 station dump'. (QCA6174 SDIO devices are working fine.) After this patch, it show correct bitrate: Station c4:04:15:5d:97:22 (on wls1) inactive time: 312 ms rx bytes: 31496 rx packets: 173 tx bytes: 8625 tx packets: 46 tx retries: 0 tx failed: 0 signal: -76 [-88, -80] dBm signal avg: -75 [-82, -77] dBm tx bitrate: 39.0 MBit/s MCS 4 rx bitrate: 26.0 MBit/s MCS 3 Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597312029-32348-4-git-send-email-wgong@codeaurora.org commit 1cd6ba8ae33ecc4a99a842d8f8e904dee79113bc Author: Wen Gong Date: Fri Aug 14 18:55:50 2020 +0300 ath10k: remove return for NL80211_STA_INFO_TX_BITRATE ath10k_sta_statistics is used to report many info to iw wlan0 link, if it return for empty legacy and nss of arsta->txrate, then the other stats after it will not be set. It has 4 bit to set after the return: NL80211_STA_INFO_TX_FAILED NL80211_STA_INFO_RX_BITRATE NL80211_STA_INFO_TX_BITRATE NL80211_STA_INFO_TX_RETRIES This patch not effect the info of above 4 bit for all hardware, reason as below: NL80211_STA_INFO_TX_FAILED is only for htt.disable_tx_comp is true, it is for QCA6174 SDIO. NL80211_STA_INFO_RX_BITRATE and NL80211_STA_INFO_TX_BITRATE are both set in ath10k_mac_sta_get_peer_stats_info, it is only enabled for chips which supports_peer_stats_info is true in hw_params, recently only for QCA6174 SDIO, NL80211_STA_INFO_TX_BITRATE is set again in function ath10k_mac_sta_get_peer_stats_info because the value which parsed from arsta->tx_rate_code and arsta->tx_bitrate_kbps is correct for QCA6174 SDIO and PCIe, and the value arsta->txrate is not correct for QCA6174 SDIO and PCIe, so it need to set again with the correct value. NL80211_STA_INFO_TX_RETRIES is use value of arsta->tx_retries, it is set in ath10k_update_per_peer_tx_stats, which accumulate the retry_pkts in HTT message from firmware, if the chips not support this feature, then it is always 0 after accumulate, then iw wlan0 station dump always show 0 for retry count. If not set NL80211_STA_INFO_TX_RETRIES here, then it is still 0, so the result is same, then set NL80211_STA_INFO_TX_RETRIES has no effect. Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00048 Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597312029-32348-3-git-send-email-wgong@codeaurora.org commit e39f32afc6d2157efbd601911d872eb46f93e866 Author: Wen Gong Date: Fri Aug 14 18:55:50 2020 +0300 ath10k: add wmi service peer stat info for wmi tlv ath10k_sta_statistics is used to report info for iw wlan0 link, it check ath10k_peer_stats_enabled, and ath10k_peer_stats_enabled check WMI_SERVICE_PEER_STATS bit of ar->wmi.svc_map. SVCMAP() for WMI_SERVICE_PEER_STATS was defined only for wmi_10x_svc_map and wmi_10_4_svc_map interfaces, it missed in wmi_tlv_svc_map, so it is not usable for iw wlan0 link for wmi tlv interface. If firmware report WMI_TLV_SERVICE_PEER_STATS_INFO for wmi tlv, then enable the WMI_SERVICE_PEER_STATS bit in ath10k, and then it pass check in ath10k_peer_stats_enabled and ath10k_sta_statistics pass check. Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00048 Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1597312029-32348-2-git-send-email-wgong@codeaurora.org commit 2a25ba97879f809e79642fca05178d4ee77f9f52 Author: Alex Deucher Date: Thu Aug 13 00:23:22 2020 -0400 drm/amdgpu: drop log message in amdgpu_dpm_baco_reset() The caller does this now for all reset types. This is now a duplicate call. Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 11043b7a995c18ea725c956825d1dfcbbdd8e78b Author: Alex Deucher Date: Tue Aug 11 12:02:21 2020 -0400 drm/amdgpu: note what type of reset we are using When we reset the GPU, note what type of reset will be used. This makes debugging different reset scenarios more clear as the driver may use different reset methods depending on conditions on the system. Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit bddbacc9e0373fc1f1f7963fa2a7838dd06e4b1b Author: Alex Deucher Date: Mon Aug 10 17:09:17 2020 -0400 drm/amdgpu: print where we get the vbios image from ACPI, ROM, PCI BAR, etc. Acked-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 31e726ca3da9b126f162b51bb55647b1ffccbd48 Author: Bhawanpreet Lakha Date: Tue Jul 28 11:35:54 2020 -0400 drm/amdgpu: parse ta firmware for navy_flounder Use the same case as sienna_cichlid Signed-off-by: Bhawanpreet Lakha Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ac1128c99620ba8057fa82f2ca1264d0d54544d6 Author: James Zhu Date: Thu Aug 13 09:57:31 2020 -0400 drm/amdgpu/vcn3.0: only SIENNA_CICHLID need specify instance for dec/enc Only SIENNA_CICHLID(VCN3) has 2 unsymmetrical instances, there're less codecs on instance 1, we use 0 for decode and 1 for encode. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit e098bc9612c2b60f94920461d71c92962a916e73 Author: Evan Quan Date: Thu Aug 13 16:39:25 2020 +0800 drm/amd/pm: optimize the power related source code layout The target is to provide a clear entry point(for power routines). Also this can help to maintain a clear view about the frameworks used on different ASICs. Hopefully all these can make power part more friendly to play with. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e9372d23715d6802fd6d3763cb19c5a0c07ad641 Author: Evan Quan Date: Thu Aug 13 13:37:52 2020 +0800 drm/amd/powerplay: put those exposed power interfaces in amdgpu_dpm.c As other power interfaces. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 20d3c28ce4e28ac4df9d139054aecb65ee5a9ee4 Author: Evan Quan Date: Thu Aug 13 11:51:11 2020 +0800 drm/amd/powerplay: optimize i2c bus access implementation The caller needs not care about the internal details how the powerplay API implemented. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 70bdb6ed222053bb0e4694f255a685cc3f4981e0 Author: Evan Quan Date: Wed Aug 12 13:19:25 2020 +0800 drm/amd/powerplay: drop unnecessary pp_funcs checker It's redundant. Also, the callers should not care about the implementation details. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit b89e9eb681653868e3ecb0287f1cf65aaec853da Author: Evan Quan Date: Wed Aug 12 13:11:24 2020 +0800 drm/amd/powerplay: optimize amdgpu_dpm_set_clockgating_by_smu() implementation Cover the implementation details from outside(of power part). Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 171090dbc0d5e11b2c3207bdd6b4910255e7e61b Author: Evan Quan Date: Fri Aug 14 16:34:15 2020 +0800 drm/amd/pm: drop redundant MEM_TYPE_* macros As these are already defined in amdgpu_atombios.h. Otherwise, we may hit "redefined" compile warning. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit bc8f830035304b3ba91d4dda2480f868f66fe230 Author: Evan Quan Date: Fri Aug 14 12:15:44 2020 +0800 drm/amd/powerplay: suppress the kernel test robot warning Suppress the warning below: In file included from drivers/gpu/drm/amd/amdgpu/../powerplay/smu_cmn.c: >> drivers/gpu/drm/amd/powerplay/smu_cmn.c:485:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit] return ret; ^ drivers/gpu/drm/amd/powerplay/smu_cmn.c:477:6: note: first condition if (ret) ^ drivers/gpu/drm/amd/powerplay/smu_cmn.c:485:9: note: second condition return ret; ^ Signed-off-by: Evan Quan Reported-by: kernel test robot Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ae2bf61ff39e78ce926de37d22dc7d5159c610cd Author: Guchun Chen Date: Thu Aug 13 15:00:56 2020 +0800 drm/amdgpu: guard ras debugfs creation/removal based on CONFIG_DEBUG_FS It can avoid potential build warn/error when CONFIG_DEBUG_FS is not set. Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 2e2f5dd51421648098bb4621719181b963d2d961 Author: Guchun Chen Date: Thu Aug 13 14:35:35 2020 +0800 drm/amdgpu: fix NULL pointer access issue when unloading driver When unloading driver by "modprobe -r amdgpu", one NULL pointer dereference bug occurs in ras debugfs releasing. The cause is the duplicated debugfs_remove, as drm debugfs_root dir has been cleaned up already by drm_minor_unregister. BUG: kernel NULL pointer dereference, address: 00000000000000a0 PGD 0 P4D 0 Oops: 0002 [#1] SMP PTI CPU: 11 PID: 1526 Comm: modprobe Tainted: G OE 5.6.0-guchchen #1 Hardware name: System manufacturer System Product Name/TUF Z370-PLUS GAMING II, BIOS 0411 09/21/2018 RIP: 0010:down_write+0x15/0x40 Code: eb de e8 7e 17 72 ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc 0f 1f 44 00 00 53 48 89 fb e8 92 d8 ff ff 31 c0 ba 01 00 00 00 48 0f b1 13 75 0f 65 48 8b 04 25 c0 8b 01 00 48 89 43 08 5b c3 RSP: 0018:ffffb1590386fcd0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000000000a0 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffff85b2fcc2 RDI: 00000000000000a0 RBP: ffffb1590386fd30 R08: ffffffff85b2fcc2 R09: 000000000002b3c0 R10: ffff97a330618c40 R11: 00000000000005f6 R12: ffff97a3481beb40 R13: 00000000000000a0 R14: ffff97a3481beb40 R15: 0000000000000000 FS: 00007fb11a717540(0000) GS:ffff97a376cc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000a0 CR3: 00000004066d6006 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: simple_recursive_removal+0x63/0x370 ? debugfs_remove+0x60/0x60 debugfs_remove+0x40/0x60 amdgpu_ras_fini+0x82/0x230 [amdgpu] ? __kernfs_remove.part.17+0x101/0x1f0 ? kernfs_name_hash+0x12/0x80 amdgpu_device_fini+0x1c0/0x580 [amdgpu] amdgpu_driver_unload_kms+0x3e/0x70 [amdgpu] amdgpu_pci_remove+0x36/0x60 [amdgpu] pci_device_remove+0x3b/0xb0 device_release_driver_internal+0xe5/0x1c0 driver_detach+0x46/0x90 bus_remove_driver+0x58/0xd0 pci_unregister_driver+0x29/0x90 amdgpu_exit+0x11/0x25 [amdgpu] __x64_sys_delete_module+0x13d/0x210 do_syscall_64+0x5f/0x250 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit f1403342ebdfcff3c3cf57ae476f19d3078f2767 Author: Christian König Date: Wed Aug 12 17:48:26 2020 +0200 drm/amdgpu: revert "fix system hang issue during GPU reset" The whole approach wasn't thought through till the end. We already had a reset lock like this in the past and it caused the same problems like this one. Completely revert the patch for now and add individual trylock protection to the hardware access functions as necessary. This reverts commit df9c8d1aa278c435c30a69b8f2418b4a52fcb929. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 05f39286ce11b98376e0d179aff0d537c257e772 Author: Evan Quan Date: Wed Aug 12 12:37:03 2020 +0800 drm/amd/powerplay: enable Sienna Cichlid mgpu fan boost feature Support Sienna Cichlid mgpu fan boost enablement. Signed-off-by: Evan Quan Acked-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 94a670d5ac45b9449581d7133287cc297774f944 Author: Evan Quan Date: Wed Aug 12 12:29:16 2020 +0800 drm/amd/powerplay: enable Navi1X mgpu fan boost feature(V2) Support Navi1X mgpu fan boost enablement. V2: rich the comment and correct the revision id check Signed-off-by: Evan Quan Acked-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9f979a49e23f4b87d038708e06ea6d320e198e71 Author: Evan Quan Date: Wed Aug 12 12:08:56 2020 +0800 drm/amd/powerplay: enable swSMU mgpu fan boost support Enable mgpu fan boost feature on swSMU routines. Signed-off-by: Evan Quan Acked-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f10bb940d8d2774fedc63c4dfb975e4310a261cd Author: Evan Quan Date: Wed Aug 12 11:53:47 2020 +0800 drm/amd/powerplay: optimize the interface for mgpu fan boost enablement Cover the implementation details from outside(of power). Also preparing for expanding this to swSMU. Signed-off-by: Evan Quan Acked-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e1a84641d478f7f35a8189f447da107c473ef0d0 Author: Kevin Wang Date: Thu Aug 6 23:41:47 2020 +0800 drm/amdgpu: fix uninit-value in arcturus_log_thermal_throttling_event() when function arcturus_get_smu_metrics_data() call failed, it will cause the variable "throttler_status" isn't initialized before use. warning: powerplay/arcturus_ppt.c:2268:24: warning: ‘throttler_status’ may be used uninitialized in this function [-Wmaybe-uninitialized] 2268 | if (throttler_status & logging_label[throttler_idx].feature_mask) { Signed-off-by: Kevin Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ba4e049e63b607ac2e0c070b1406826390d5047e Author: Jiansong Chen Date: Wed Aug 12 15:57:32 2020 +0800 drm/amdgpu: disable gfxoff for navy_flounder gfxoff is temporarily disabled for navy_flounder, since at present the feature has broken some basic amdgpu test. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit c048e4cd607ae637eac5e7c81e8aa5b9f0d43a6a Author: Evan Quan Date: Mon Aug 10 13:27:56 2020 +0800 drm/amd/powerplay: bump NAVI12 driver if version To fit the latest SMU firmware. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit fceafc9b7b393698ac9aadb5c3b64b1ba1f61e1e Author: Evan Quan Date: Thu Aug 6 16:49:19 2020 +0800 drm/amd/powerplay: maximum the code sharing around metrics table retrieving Instead of having one copy in each ASIC. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a9c75edcbe7cca5c2edb87fa765efac7558523c0 Author: Evan Quan Date: Thu Aug 6 15:38:25 2020 +0800 drm/amd/powerplay: update the metrics table cache interval as 1ms To make the setting same as Arcturus/Navi1x/Sienna_Cichlid. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9fb1506eb671aa1640a8bd60f0121b94041a1f6a Author: Oak Zeng Date: Thu Aug 6 22:17:35 2020 -0500 drm/amdgpu: Use function pointer for some mmhub functions Add more function pointers to amdgpu_mmhub_funcs. ASIC specific implementation of most mmhub functions are called from a general function pointer, instead of calling different function for different ASIC. Simplify the code by deleting duplicate functions Signed-off-by: Oak Zeng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2f53072434525eccdd4a4cab3837096c1a3df357 Author: Nirmoy Das Date: Tue Aug 11 16:10:19 2020 +0200 drm/amdgpu: pass NULL pointer instead of 0 Fixes: c030f2e4166c3f55 ("drm/amdgpu: add amdgpu_ras.c to support ras (v2)") Signed-off-by: Nirmoy Das Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 72e14ebf9fc09e33b28b70f00a2ed9821c198633 Author: Dennis Li Date: Thu Aug 6 14:48:15 2020 +0800 drm/amdgpu: annotate a false positive recursive locking [ 584.110304] ============================================ [ 584.110590] WARNING: possible recursive locking detected [ 584.110876] 5.6.0-deli-v5.6-2848-g3f3109b0e75f #1 Tainted: G OE [ 584.111164] -------------------------------------------- [ 584.111456] kworker/38:1/553 is trying to acquire lock: [ 584.111721] ffff9b15ff0a47a0 (&adev->reset_sem){++++}, at: amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu] [ 584.112112] but task is already holding lock: [ 584.112673] ffff9b1603d247a0 (&adev->reset_sem){++++}, at: amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu] [ 584.113068] other info that might help us debug this: [ 584.113689] Possible unsafe locking scenario: [ 584.114350] CPU0 [ 584.114685] ---- [ 584.115014] lock(&adev->reset_sem); [ 584.115349] lock(&adev->reset_sem); [ 584.115678] *** DEADLOCK *** [ 584.116624] May be due to missing lock nesting notation [ 584.117284] 4 locks held by kworker/38:1/553: [ 584.117616] #0: ffff9ad635c1d348 ((wq_completion)events){+.+.}, at: process_one_work+0x21f/0x630 [ 584.117967] #1: ffffac708e1c3e58 ((work_completion)(&con->recovery_work)){+.+.}, at: process_one_work+0x21f/0x630 [ 584.118358] #2: ffffffffc1c2a5d0 (&tmp->hive_lock){+.+.}, at: amdgpu_device_gpu_recover+0xae/0x1030 [amdgpu] [ 584.118786] #3: ffff9b1603d247a0 (&adev->reset_sem){++++}, at: amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu] [ 584.119222] stack backtrace: [ 584.119990] CPU: 38 PID: 553 Comm: kworker/38:1 Kdump: loaded Tainted: G OE 5.6.0-deli-v5.6-2848-g3f3109b0e75f #1 [ 584.120782] Hardware name: Supermicro SYS-7049GP-TRT/X11DPG-QT, BIOS 3.1 05/23/2019 [ 584.121223] Workqueue: events amdgpu_ras_do_recovery [amdgpu] [ 584.121638] Call Trace: [ 584.122050] dump_stack+0x98/0xd5 [ 584.122499] __lock_acquire+0x1139/0x16e0 [ 584.122931] ? trace_hardirqs_on+0x3b/0xf0 [ 584.123358] ? cancel_delayed_work+0xa6/0xc0 [ 584.123771] lock_acquire+0xb8/0x1c0 [ 584.124197] ? amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu] [ 584.124599] down_write+0x49/0x120 [ 584.125032] ? amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu] [ 584.125472] amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu] [ 584.125910] ? amdgpu_ras_error_query+0x1b8/0x2a0 [amdgpu] [ 584.126367] amdgpu_ras_do_recovery+0x159/0x190 [amdgpu] [ 584.126789] process_one_work+0x29e/0x630 [ 584.127208] worker_thread+0x3c/0x3f0 [ 584.127621] ? __kthread_parkme+0x61/0x90 [ 584.128014] kthread+0x12f/0x150 [ 584.128402] ? process_one_work+0x630/0x630 [ 584.128790] ? kthread_park+0x90/0x90 [ 584.129174] ret_from_fork+0x3a/0x50 Each adev has owned lock_class_key to avoid false positive recursive locking. v2: 1. register adev->lock_key into lockdep, otherwise lockdep will report the below warning [ 1216.705820] BUG: key ffff890183b647d0 has not been registered! [ 1216.705924] ------------[ cut here ]------------ [ 1216.705972] DEBUG_LOCKS_WARN_ON(1) [ 1216.705997] WARNING: CPU: 20 PID: 541 at kernel/locking/lockdep.c:3743 lockdep_init_map+0x150/0x210 v3: change to use down_write_nest_lock to annotate the false dead-lock warning. Reviewed-by: Daniel Vetter Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit a4322e1881bed80ddb904482f0b2e948fa7fd47e Author: Wenhui Sheng Date: Tue Aug 11 11:02:03 2020 +0800 drm/amdgpu: add debugfs interface for RAP test After amdgpu driver loading successfully, we can use RAP debugfs interface /dri/xxx/rap_test to trigger RAP test. Currently only L0 validate test is supported. v2: refine amdgpu_rap.h Signed-off-by: Wenhui Sheng Reviewed-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8602692b6f73d2ea0312cccea5416b270d0f7247 Author: Wenhui Sheng Date: Fri Jul 17 16:55:20 2020 +0800 drm/amdgpu: enable RAP TA load Enable the RAP TA loading path and add RAP test trigger interface. v2: fix potential mem leak issue Signed-off-by: Wenhui Sheng Reviewed-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit a189d0ae0cd68643204cbe9b11e824414b2b06c9 Author: Wenhui Sheng Date: Thu Jul 23 10:57:06 2020 +0800 drm/amdgpu: add RAP TA header file The RAP TA contains tests used to verify if RAP(Register Access Policy), or otherwise known as Security Policy is applied correctly by PSP BL&TOS. The RAP test is a measure to ensure that we reduce the avenue of complexity and mistakes when dealing with RAP in post-si execution, where debugging failures related to RAP is quite difficult and expensive. v2: add introduction for RAP TA Signed-off-by: Wenhui Sheng Reviewed-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 425a78f43b34a6bebc5c2746eb09a3b45a45a286 Author: Tianci.Yin Date: Mon Jul 20 15:47:37 2020 +0800 drm/amdgpu: reconfigure spm golden settings on Navi1x after GFXOFF exit(v3) On Navi1x, the SPM golden settings are lost after GFXOFF enter/exit, so reconfigure the golden settings after GFXOFF exit. Reviewed-by: Hawking Zhang Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit d58fe3cf11a86e59183c8b91c50ae2cde24a2128 Author: Tianci.Yin Date: Fri Jun 19 16:01:11 2020 +0800 drm/amdgpu: add interface amdgpu_gfx_init_spm_golden for Navi1x On Navi1x, the SPM golden settings are lost after GFXOFF enter/exit, so reconfiguration is needed. Make the configuration code as an interface for future use. Reviewed-by: Hawking Zhang Reviewed-by: Luben Tuikov Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 66459e1db2f8b6f7cdfe0d091345b56d12348d0d Author: Guchun Chen Date: Tue Aug 4 15:05:01 2020 +0800 drm/amdgpu: add debugfs node to toggle ras error cnt harvest Before ras recovery is issued, user could operate this debugfs node to enable/disable the harvest of all RAS IPs' ras error count registers, which will help keep hardware's registers' status instead of cleaning up them. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit f75e94d86829e92a758a26fc5bbdb4c9eba86260 Author: Guchun Chen Date: Tue Aug 4 15:00:53 2020 +0800 drm/amdgpu: bypass querying ras error count registers Once ras recovery is issued by ras sync flood interrupt or ras controller interrupt, add this guard to bypass or execute ras error count register harvest of all IPs. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 2fd3c8f34d08af0a6236085f9961866ad92ef9ec Author: Wen Gong Date: Fri Aug 14 18:17:08 2020 +0300 ath10k: start recovery process when payload length exceeds max htc length for sdio When simulate random transfer fail for sdio write and read, it happened "payload length exceeds max htc length" and recovery later sometimes. Test steps: 1. Add config and update kernel: CONFIG_FAIL_MMC_REQUEST=y CONFIG_FAULT_INJECTION=y CONFIG_FAULT_INJECTION_DEBUG_FS=y 2. Run simulate fail: cd /sys/kernel/debug/mmc1/fail_mmc_request echo 10 > probability echo 10 > times # repeat until hitting issues 3. It happened payload length exceeds max htc length. [ 199.935506] ath10k_sdio mmc1:0001:1: payload length 57005 exceeds max htc length: 4088 .... [ 264.990191] ath10k_sdio mmc1:0001:1: payload length 57005 exceeds max htc length: 4088 4. after some time, such as 60 seconds, it start recovery which triggered by wmi command timeout for periodic scan. [ 269.229232] ieee80211 phy0: Hardware restart was requested [ 269.734693] ath10k_sdio mmc1:0001:1: device successfully recovered The simulate fail of sdio is not a real sdio transter fail, it only set an error status in mmc_should_fail_request after the transfer end, actually the transfer is success, then sdio_io_rw_ext_helper will return error status and stop transfer the left data. For example, the really RX len is 286 bytes, then it will split to 2 blocks in sdio_io_rw_ext_helper, one is 256 bytes, left is 30 bytes, if the first 256 bytes get an error status by mmc_should_fail_request,then the left 30 bytes will not read in this RX operation. Then when the next RX arrive, the left 30 bytes will be considered as the header of the read, the top 4 bytes of the 30 bytes will be considered as lookaheads, but actually the 4 bytes is not the lookaheads, so the len from this lookaheads is not correct, it exceeds max htc length 4088 sometimes. When happened exceeds, the buffer chain is not matched between firmware and ath10k, then it need to start recovery ASAP. Recently then recovery will be started by wmi command timeout, but it will be long time later, for example, it is 60+ seconds later from the periodic scan, if it does not have periodic scan, it will be longer. Start recovery when it happened "payload length exceeds max htc length" will be reasonable. This patch only effect sdio chips. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00029. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200108031957.22308-3-wgong@codeaurora.org commit 5b525ce88af90c6d986b25c21a868c0f9c4cc021 Author: Alexander A. Klimov Date: Sun Jul 19 12:40:41 2020 +0200 ath5k: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200719104041.57916-1-grandmaster@al2klimov.de commit 18c25b4019caa94deee67e839aea6b7b626e70d5 Author: Julia Lawall Date: Sun Jul 26 12:58:32 2020 +0200 ath: drop unnecessary list_empty list_for_each_entry{_safe} is able to handle an empty list. The only effect of avoiding the loop is not initializing the index variable. Drop list_empty tests in cases where these variables are not used. Note that list_for_each_entry{_safe} is defined in terms of list_first_entry, which indicates that it should not be used on an empty list. But in list_for_each_entry{_safe}, the element obtained by list_first_entry is not really accessed, only the address of its list_head field is compared to the address of the list head, so the list_first_entry is safe. The semantic patch that makes this change for the list_for_each_entry case is as follows: (http://coccinelle.lip6.fr/) @@ expression x,e; statement S; identifier i; @@ -if (!(list_empty(x))) list_for_each_entry(i,x,...) S ... when != i ? i = e Signed-off-by: Julia Lawall Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1595761112-11003-8-git-send-email-Julia.Lawall@inria.fr commit 221af8135478939eaedf1f558aea32e08e05ae65 Author: Gustavo A. R. Silva Date: Mon Jul 27 14:35:20 2020 -0500 ath9k: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200727193520.GA832@embeddedor commit 84aff52e4f57ed4702ec328b839941cd29551d49 Author: Loic Poulain Date: Fri Jul 24 12:20:52 2020 +0200 wcn36xx: Use sequence number allocated by mac80211 Instead of using the firmware generated sequence number, use the one already allocated by the mac80211 layer. This allows better control of the sequence numbers and avoid to rely on same sequence for Data, QOS Data and QOS Null Data packets. Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1595586052-16081-7-git-send-email-loic.poulain@linaro.org commit 512b191d965237249999b3c58600fe50356ab323 Author: Loic Poulain Date: Fri Jul 24 12:20:50 2020 +0200 wcn36xx: Fix TX data path This patch contains the following fixes: - Use correct queue for submitting QoS packet. The queue id to use is a one-to-one mapping with the TID. - Don't encrypt a frame with IEEE80211_TX_INTFL_DONT_ENCRYPT flag. - Use the 'special queue' for null packets, preventing the firmware to submit it as AMPDU. Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1595586052-16081-5-git-send-email-loic.poulain@linaro.org commit 1c20560607e6e142af76b9bd57e275b9053958a1 Author: Loic Poulain Date: Fri Jul 24 12:20:49 2020 +0200 wcn36xx: Increase number of TX retries Increase the short/long retry limit to 15 in order to impove TX robustness in noisy/busy environment. 15 is the default value defined in the downstream driver. Observed number of ack timeout is reduced with this change. Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1595586052-16081-4-git-send-email-loic.poulain@linaro.org commit fdf21cc3714939dd4327f3d664fe5863d15ccb31 Author: Loic Poulain Date: Fri Jul 24 12:20:48 2020 +0200 wcn36xx: Add TX ack support The controller is capable of reporting TX indication which can be used to report TX ack when IEEE80211_TX_CTL_REQ_TX_STATUS is set. The support was only partially implemented. The firmware can be configured for reporting event when a packet is acked, without specifying which packet though. In order to send a packet flagged with TX status callback, we need to stop the queue, submit the packet and wait for the firmware ack event. Then the queue can be restarted and mac80211 status callback called. In case the packet is not acked, no ack event will be received, therefore a timeout mechanism is introduced to restart the queue and call the status cb in case no event is received after a 100ms. Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1595586052-16081-3-git-send-email-loic.poulain@linaro.org commit ffe835aa5bdb33572fceb0b14cba6a44c3371bdd Author: Loic Poulain Date: Fri Jul 24 12:20:47 2020 +0200 wcn36xx: Fix multiple AMPDU sessions support Several AMPDU sessions can be started, e.g. for different TIDs. Currently the driver does not take care of the session ID when requesting block-ack (statically set to 0), which leads to never block-acked packet with sessions other than 0. Fix this by saving the session id when creating the ba session and use it in subsequent ba operations. This issue can be reproduced with iperf in two steps (tid 0 strem then tid 6 stream). 1.0 iperf -s # wcn36xx side 1.1 iperf -c ${IP_ADDR} # host side Then 2.0 iperf -s -u -S 0xC0 # wcn36xx side 2.1 iperf -c ${IP_ADDR} -u -S 0xC0 -l 2000 # host side Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1595586052-16081-2-git-send-email-loic.poulain@linaro.org commit 743adae9da12aeae93b4006d7f7724530e8c54f6 Author: Pavel Machek Date: Sat Jul 25 10:09:33 2020 +0300 ath9k: Fix typo in function name Typo "destoy" made me wonder if correct patch is wrong; fix it. No functional change. Signed-off-by: Pavel Machek (CIP) Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200724083910.GA31930@amd commit 060202027aa8f382e8d1b7e73f0da2b5cf9191dc Author: Alexander A. Klimov Date: Sat Jul 25 10:09:33 2020 +0300 ath9k: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200719105052.57997-1-grandmaster@al2klimov.de commit 527afc212231ea9d585b7709c0ab73263ecf0c85 Author: Arvind Sankar Date: Fri Jul 31 16:07:51 2020 -0700 x86/boot: Check that there are no run-time relocations Add a linker script check that there are no run-time relocations, and remove the old one that tries to check via looking for specially-named sections in the object files. Drop the tests for -fPIE compiler option and -pie linker option, as they are available in all supported gcc and binutils versions (as well as clang and lld). Signed-off-by: Arvind Sankar Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Kees Cook Reviewed-by: Ard Biesheuvel Reviewed-by: Fangrui Song Reviewed-by: Sedat Dilek Link: https://lore.kernel.org/r/20200731230820.1742553-8-keescook@chromium.org commit 3f086189cd3641d212949ff044d8e4486c93d55e Author: Arvind Sankar Date: Fri Jul 31 16:07:50 2020 -0700 x86/boot: Remove run-time relocations from head_{32,64}.S The BFD linker generates run-time relocations for z_input_len and z_output_len, even though they are absolute symbols. This is fixed for binutils-2.35 [1]. Work around this for earlier versions by defining two variables input_len and output_len in addition to the symbols, and use them via position-independent references. This eliminates the last two run-time relocations in the head code and allows us to drop the -z noreloc-overflow flag to the linker. Move the -pie and --no-dynamic-linker LDFLAGS to LDFLAGS_vmlinux instead of KBUILD_LDFLAGS. There shouldn't be anything else getting linked, but this is the more logical location for these flags, and modversions might call the linker if an EXPORT_SYMBOL is left over accidentally in one of the decompressors. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=25754 Signed-off-by: Arvind Sankar Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Kees Cook Reviewed-by: Ard Biesheuvel Reviewed-by: Fangrui Song Link: https://lore.kernel.org/r/20200731230820.1742553-7-keescook@chromium.org commit a2c4fc4d4e2c40b07534094810d915c7354d84a7 Author: Arvind Sankar Date: Fri Jul 31 16:07:49 2020 -0700 x86/boot: Remove run-time relocations from .head.text code The assembly code in head_{32,64}.S, while meant to be position-independent, generates run-time relocations because it uses instructions such as: leal gdt(%edx), %eax which make the assembler and linker think that the code is using %edx as an index into gdt, and hence gdt needs to be relocated to its run-time address. On 32-bit, with lld Dmitry Golovin reports that this results in a link-time error with default options (i.e. unless -z notext is explicitly passed): LD arch/x86/boot/compressed/vmlinux ld.lld: error: can't create dynamic relocation R_386_32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output With the BFD linker, this generates a warning during the build, if --warn-shared-textrel is enabled, which at least Gentoo enables by default: LD arch/x86/boot/compressed/vmlinux ld: arch/x86/boot/compressed/head_32.o: warning: relocation in read-only section `.head.text' ld: warning: creating a DT_TEXTREL in object On 64-bit, it is not possible to link the kernel as -pie with lld, and it is only possible with a BFD linker that supports -z noreloc-overflow, i.e. versions >2.26. This is because these instructions cannot really be relocated: the displacement field is only 32-bits wide, and thus cannot be relocated for a 64-bit load address. The -z noreloc-overflow option simply overrides the linker error, and results in R_X86_64_RELATIVE relocations that apply a 64-bit relocation to a 32-bit field anyway. This happens to work because nothing will process these run-time relocations. Start fixing this by removing relocations from .head.text: - On 32-bit, use a base register that holds the address of the GOT and reference symbol addresses using @GOTOFF, i.e. leal gdt@GOTOFF(%edx), %eax - On 64-bit, most of the code can (and already does) use %rip-relative addressing, however the .code32 bits can't, and the 64-bit code also needs to reference symbol addresses as they will be after moving the compressed kernel to the end of the decompression buffer. For these cases, reference the symbols as an offset to startup_32 to avoid creating relocations, i.e.: leal (gdt-startup_32)(%bp), %eax This only works in .head.text as the subtraction cannot be represented as a PC-relative relocation unless startup_32 is in the same section as the code. Move efi32_pe_entry into .head.text so that it can use the same method to avoid relocations. Reported-by: Dmitry Golovin Signed-off-by: Arvind Sankar Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Kees Cook Reviewed-by: Ard Biesheuvel Reviewed-by: Fangrui Song Link: https://lore.kernel.org/r/20200731230820.1742553-6-keescook@chromium.org commit 2e7a858ba843d2e6ceab1ba996805411de51b340 Author: Arvind Sankar Date: Fri Jul 31 16:07:48 2020 -0700 x86/boot: Add .text.* to setup.ld GCC puts the main function into .text.startup when compiled with -Os (or -O2). This results in arch/x86/boot/main.c having a .text.startup section which is currently not included explicitly in the linker script setup.ld in the same directory. The BFD linker places this orphan section immediately after .text, so this still works. However, LLD git, since [1], is choosing to place it immediately after the .bstext section instead (this is the first code section). This plays havoc with the section layout that setup.elf requires to create the setup header, for eg on 64-bit: LD arch/x86/boot/setup.elf ld.lld: error: section .text.startup file range overlaps with .header >>> .text.startup range is [0x200040, 0x2001FE] >>> .header range is [0x2001EF, 0x20026B] ld.lld: error: section .header file range overlaps with .bsdata >>> .header range is [0x2001EF, 0x20026B] >>> .bsdata range is [0x2001FF, 0x200398] ld.lld: error: section .bsdata file range overlaps with .entrytext >>> .bsdata range is [0x2001FF, 0x200398] >>> .entrytext range is [0x20026C, 0x2002D3] ld.lld: error: section .text.startup virtual address range overlaps with .header >>> .text.startup range is [0x40, 0x1FE] >>> .header range is [0x1EF, 0x26B] ld.lld: error: section .header virtual address range overlaps with .bsdata >>> .header range is [0x1EF, 0x26B] >>> .bsdata range is [0x1FF, 0x398] ld.lld: error: section .bsdata virtual address range overlaps with .entrytext >>> .bsdata range is [0x1FF, 0x398] >>> .entrytext range is [0x26C, 0x2D3] ld.lld: error: section .text.startup load address range overlaps with .header >>> .text.startup range is [0x40, 0x1FE] >>> .header range is [0x1EF, 0x26B] ld.lld: error: section .header load address range overlaps with .bsdata >>> .header range is [0x1EF, 0x26B] >>> .bsdata range is [0x1FF, 0x398] ld.lld: error: section .bsdata load address range overlaps with .entrytext >>> .bsdata range is [0x1FF, 0x398] >>> .entrytext range is [0x26C, 0x2D3] Add .text.* to the .text output section to fix this, and also prevent any future surprises if the compiler decides to create other such sections. [1] https://reviews.llvm.org/D75225 Signed-off-by: Arvind Sankar Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Kees Cook Reviewed-by: Ard Biesheuvel Reviewed-by: Fangrui Song Link: https://lore.kernel.org/r/20200731230820.1742553-5-keescook@chromium.org commit 423e4d198a036689de73fd6b073fc4349c4fa1ee Author: Ard Biesheuvel Date: Fri Jul 31 16:07:47 2020 -0700 x86/boot/compressed: Get rid of GOT fixup code In a previous patch, we have eliminated GOT entries from the decompressor binary and added an assertion that the .got section is empty. This means that the GOT fixup routines that exist in both the 32-bit and 64-bit startup routines have become dead code, and can be removed. While at it, drop the KEEP() from the linker script, as it has no effect on the contents of output sections that are created by the linker itself. Signed-off-by: Ard Biesheuvel Signed-off-by: Arvind Sankar Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Kees Cook Acked-by: Arvind Sankar Link: https://lore.kernel.org/r/20200731230820.1742553-4-keescook@chromium.org commit e544ea57ac0734bca752eb2d8635fecbe932c356 Author: Ard Biesheuvel Date: Fri Jul 31 16:07:46 2020 -0700 x86/boot/compressed: Force hidden visibility for all symbol references Eliminate all GOT entries in the decompressor binary, by forcing hidden visibility for all symbol references, which informs the compiler that such references will be resolved at link time without the need for allocating GOT entries. To ensure that no GOT entries will creep back in, add an assertion to the decompressor linker script that will fire if the .got section has a non-zero size. [Arvind: move hidden.h to include/linux instead of making a copy] Signed-off-by: Ard Biesheuvel Signed-off-by: Arvind Sankar Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Kees Cook Acked-by: Arvind Sankar Link: https://lore.kernel.org/r/20200731230820.1742553-3-keescook@chromium.org commit 262b5cae67a672404da0dcbd009efc1227ad51e4 Author: Ard Biesheuvel Date: Fri Jul 31 16:07:45 2020 -0700 x86/boot/compressed: Move .got.plt entries out of the .got section The .got.plt section contains the part of the GOT which is used by PLT entries, and which gets updated lazily by the dynamic loader when function calls are dispatched through those PLT entries. On fully linked binaries such as the kernel proper or the decompressor, this never happens, and so in practice, the .got.plt section consists only of the first 3 magic entries that are meant to point at the _DYNAMIC section and at the fixup routine in the loader. However, since we don't use a dynamic loader, those entries are never populated or used. This means that treating those entries like ordinary GOT entries, and updating their values based on the actual placement of the executable in memory is completely pointless, and we can just ignore the .got.plt section entirely, provided that it has no additional entries beyond the first 3 ones. So add an assertion in the linker script to ensure that this assumption holds, and move the contents out of the [_got, _egot) memory range that is modified by the GOT fixup routines. While at it, drop the KEEP(), since it has no effect on the contents of output sections that are created by the linker itself. Signed-off-by: Ard Biesheuvel Signed-off-by: Arvind Sankar Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Tested-by: Sedat Dilek Tested-by: Nick Desaulniers Reviewed-by: Kees Cook Acked-by: Arvind Sankar Link: https://lore.kernel.org/r/20200731230820.1742553-2-keescook@chromium.org commit f098f168e91ca915c6cf8aa316136af647792f2f Author: Laurent Pinchart Date: Thu Aug 13 01:02:44 2020 +0300 drm: panel: Fix bus format for OrtusTech COM43H4M85ULC panel The OrtusTech COM43H4M85ULC panel is a 18-bit RGB panel, set the bus format to MEDIA_BUS_FMT_RGB666_1X18. Fixes: 725c9d40f3fe ("drm/panel: Add support for OrtusTech COM43H4M85ULC panel") Signed-off-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200812220244.24500-1-laurent.pinchart@ideasonboard.com commit 42bac89a1730a32ed8415b745affc7de0be28e45 Author: Linus Walleij Date: Sun Aug 9 00:31:22 2020 +0200 drm/mcde: Enable the DSI link with display The MCDE DSI link hardware which is modeled like a bridge in DRM, connected further to the panel bridge, creating a pipeline. We have been using the .pre_enable(), .enable(), .disable() and .post_disable() callbacks from the bridge to set this up in a chained manner: first the display controller goes online and then in successive order each bridge in the pipeline. Inside DRM it works like this: drm_atomic_helper_commit_tail() drm_atomic_helper_commit_modeset_enables() struct drm_crtc_helper_funcs .atomic_enable() struct drm_simple_display_pipe_funcs .enable() MCDE display enable call drm_atomic_bridge_chain_enable() struct drm_bridge_funcs .pre_enable() mcde_dsi_bridge_pre_enable() panel_bridge_pre_enable() struct drm_panel_funcs .prepare() struct drm_bridge_funcs .enable() mcde_dsi_bridge_enable() panel_bridge_enable() struct drm_panel_funcs .enable() A similar sequence is executed for disabling. Unfortunately this is not what the hardware needs: at a certain stage in the enablement of the display controller the DSI link needs to come up to support video mode, else something (like a FIFO flow) locks up the hardware and we never get picture. Fix this by simply leaving the pre|enable and post|disable callbacks unused, and establish two cross-calls from the display controller to bring up the DSI link at the right place in the display bring-up sequence and vice versa in the shutdown sequence. For command mode displays, it works just fine to also enable the display flow early. The only time we hold it back right now is in one-shot mode, on-demand display updates. When combined with the previous patch and some patches for the S6E63M0 display controller to support DSI mode, this gives working display on the Samsung GT-I8190 (Golden) phone. It has also been tested working on the Samsung GT-S7710 (Skomer) phone. Signed-off-by: Linus Walleij Acked-by: Daniel Vetter Cc: newbytee@protonmail.com Cc: Stephan Gerhold Link: https://patchwork.freedesktop.org/patch/msgid/20200808223122.1492124-4-linus.walleij@linaro.org commit c4842d4d0f744bf419a1b011fa3ce0ed98fcdc10 Author: Linus Walleij Date: Sun Aug 9 00:31:21 2020 +0200 drm/mcde: Fix display pipeline restart To make sure that the MCDE is in a reasonable state during set-up, perform a reset by power cycling the block by dropping the on-chip regulator reference after probe. The display subsystem (DSS) has no dedicated reset line so dropping the EPOD regulator is the only real way of resetting it. We introduce code to enable and disable the regulator in the display enable/disable callbacks. We move the generic MCDE setup such as muxing of DPI signals and masking of interrupts to the display handling. When we drop the power to the whole display subsystem, not only MCDE but also the DSI links lose their state. Therefore we move the DSI block reset and hardware initialization code to the mcde_dsi_bridge_pre_enable() callback so this happens every time we start up the bridge, as we may have lost the power. We move the final disablement of the interrupts and clocks to the mcde_dsi_bridge_post_disable() callback rather than have it in the mcde_dsi_bridge_disable() callback, as some control messages may still be sent over the DSI host after the bridge has been shut down. This (together with a patch for the corresponding panel) makes the Samsung GT-S7710 successfully disable and re-enable its display, cutting all power while disabled and re-initializing the hardware when coming back up. Acked-by: Daniel Vetter Signed-off-by: Linus Walleij Cc: newbytee@protonmail.com Cc: Stephan Gerhold Link: https://patchwork.freedesktop.org/patch/msgid/20200808223122.1492124-3-linus.walleij@linaro.org commit f6fd1d70609ca691ee5dc0d2748b6eeaa57a9535 Author: Linus Walleij Date: Sun Aug 9 00:31:20 2020 +0200 drm/mcde: Support using DSI in LP mode It is possible to set a flag in the struct mipi_dsi_device so the panel is handled in low power (LP) mode. Some displays only support this mode and it is also good for testing. Signed-off-by: Linus Walleij Acked-by: Daniel Vetter Cc: newbytee@protonmail.com Cc: Stephan Gerhold Link: https://patchwork.freedesktop.org/patch/msgid/20200808223122.1492124-2-linus.walleij@linaro.org commit 44c3867a56e3cdda4b7ea4e4983c4fdafd45b3c9 Author: Linus Walleij Date: Sun Aug 9 00:31:19 2020 +0200 drm/mcde: Improve pixel fetcher FIFO depth setting The pixel fetcher FIFO depth was just hardcoded to 48 which works fine as long as the framebuffer is 32BPP and the DSI output is RGB888. We will need more elaborate handling for some buffer formats and displays, so start to improve this function by setting reasonable defaults for 32, 24 and 16 BPP framebuffers. Signed-off-by: Linus Walleij Acked-by: Daniel Vetter Cc: newbytee@protonmail.com Cc: Stephan Gerhold Link: https://patchwork.freedesktop.org/patch/msgid/20200808223122.1492124-1-linus.walleij@linaro.org commit 709c27730a11d6681297d733eb8ee18166e9c38a Author: Linus Walleij Date: Wed Jul 29 11:09:15 2020 +0200 drm/mcde: Fix display data flow control Revamp the way that the flow of data to the display is defined. I realized that the hardware supports something like 5 different modes of flow: oneshot, command with TE IRQ, command with BTA (bus turn around) and TE IRQ, video with TE IRQ and video without TE IRQ instead synchronizing to the output of the MCDE DSI formatter. Like before the selection of the type of flow is done from the DSI driver when we attach it to the MCDE and we get to know what the display wants. The new video mode synchronization method from the MCDE DSI formatter is used on some upstream devices such as Golden. This is the new default for video mode: stateless panels do not as a rule generate TE IRQs. Another semantic change is that we stop sending a TE request before every command when sending data to a display in command mode: this should only be explicitly requested when using BTA, according to the vendor driver. This has been tested and works fine with the command mode displays I have. (All that are supported upstream.) Reported-by: Stephan Gerhold Signed-off-by: Linus Walleij Reviewed-by: Stephan Gerhold Cc: Stephan Gerhold Link: https://patchwork.freedesktop.org/patch/msgid/20200729090915.252730-2-linus.walleij@linaro.org commit ea66a9be7e93e5a87f1cdb37b4246882f7c73e45 Author: Linus Walleij Date: Wed Jul 29 11:09:14 2020 +0200 drm/mcde: Rename flow function The function mcde_display_send_one_frame() has a historical name that stems from being implemented when the driver only supported single frame updates. Rename it mcde_start_flow() so that it reflects the current usage. Signed-off-by: Linus Walleij Reviewed-by: Stephan Gerhold Link: https://patchwork.freedesktop.org/patch/msgid/20200729090915.252730-1-linus.walleij@linaro.org commit 70c7fe17f370c03e90868cbf24c09a6c5db9c536 Author: Tian Tao Date: Thu Aug 13 11:39:15 2020 +0800 drm/hisilicon: Fix build error of no type of module_init Add missing include to fix build error: hibmc_drm_drv.c:385:1: warning: data definition has no type or storage class [enabled by default] hibmc_drm_drv.c:385:1: error: type defaults to ‘int’ in declaration of ‘module_init’ [-Werror=implicit-int] hibmc_drm_drv.c:385:1: warning: parameter names (without types) in function of ‘module_exit’ [-Werror=implicit-int] hibmc_drm_drv.c:385:292:1: warning: parameter names (without types) in function declaration [enabled by default] Signed-off-by: Tian Tao Reported-by: kernel test robot Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1597289955-27381-1-git-send-email-tiantao6@hisilicon.com commit 1930d19cb49930b7d5be0379be9f88fcbeba9976 Author: Marek Vasut Date: Sun Aug 9 12:57:05 2020 +0200 drm/bridge: tc358762: Add basic driver for Toshiba TC358762 DSI-to-DPI bridge Add very basic driver for Toshiba TC358762 DSI-to-DPI bridge, derived from tc358764 driver and panel-raspberrypi-touchscreen. This driver is meant to replace the panel-raspberrypi-touchscreen too, as the bridge connection can be described in DT too. Signed-off-by: Marek Vasut Cc: dri-devel@lists.freedesktop.org Cc: Eric Anholt Cc: Rob Herring Cc: Sam Ravnborg Cc: devicetree@vger.kernel.org Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200809105705.6334-2-marex@denx.de commit 97722439eeed2f2e4c1a1d862faa0ee7bc2783c3 Author: Marek Vasut Date: Sun Aug 9 12:57:04 2020 +0200 dt-bindings: Add DT bindings for Toshiba TC358762 DSI-to-DPI bridge Add DT bindings for Toshiba TC358762 DSI-to-DPI bridge, this one is used in the Raspberry Pi 7" touchscreen display unit. Signed-off-by: Marek Vasut Reviewed-by: Rob Herring Cc: dri-devel@lists.freedesktop.org Cc: Eric Anholt Cc: Rob Herring Cc: Sam Ravnborg Cc: devicetree@vger.kernel.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200809105705.6334-1-marex@denx.de commit 534b1f9071d95325044c21d47d9f63a45cdf425e Merge: 82dd18096c718 62975d27d647a Author: Thomas Zimmermann Date: Wed Aug 12 19:17:18 2020 +0200 Merge drm/drm-next into drm-misc-next Backmerging drm-next into drm-misc-next for nouveau and panel updates. Resolves a conflict between ttm and nouveau, where struct ttm_mem_res got renamed to struct ttm_resource. Signed-off-by: Thomas Zimmermann commit 82dd18096c718962379e61cd8a7a0dc219db174f Author: Christian König Date: Wed Aug 5 14:35:10 2020 +0200 drm/radeon: drop superflous AGP handling The object flags created in radeon_ttm_placement_from_domain take care that we use the correct caching for AGP, this is just superflous. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/384336/?series=80346&rev=1 commit b2458726b38cb69f3da3677dbdf53e47af0e8792 Author: Christian König Date: Mon Aug 3 16:25:15 2020 +0200 drm/ttm: give resource functions their own [ch] files This is a separate object we work within TTM. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/384338/?series=80346&rev=1 commit e92ae67d6ed881e9c6d6d432eb6b5817f150a115 Author: Christian König Date: Mon Aug 3 15:06:38 2020 +0200 drm/ttm: rename ttm_resource_manager_func callbacks The names get/put are associated with reference counting in the Linux kernel, use alloc/free instead. Signed-off-by: Christian König Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/384340/?series=80346&rev=1 commit 13b0d4a9ae0c2d650993c48be797992eaf621332 Author: Tian Tao Date: Wed Aug 12 15:42:59 2020 +0800 drm/hisilicon: Code refactoring for hibmc_drv_de The memory used to be allocated with devres helpers and released automatically. In rare circumstances, the memory's release could have happened before the DRM device got released, which would have caused memory corruption of some kind. Now we're embedding the data structures in struct hibmc_drm_private. The whole release problem has been resolved, because struct hibmc_drm_private is allocated with drmm_kzalloc and always released with the DRM device. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1597218179-3938-3-git-send-email-tiantao6@hisilicon.com commit ed7d94597fad747ff0be4a0045da79e7ddd6eba0 Author: Tian Tao Date: Wed Aug 12 15:42:58 2020 +0800 drm/hisilicon: Remove the unused include statements Remove some unused include statements. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1597218179-3938-2-git-send-email-tiantao6@hisilicon.com commit d2f6a8f454b67ccfa64d1f2e7e2a570bc72313e2 Author: Linus Walleij Date: Sun Aug 9 00:43:22 2020 +0200 drm/panel-notatek-nt35510: Fix MTP read init In order to successfully read ID of the MTP panel the panel MTP control page must be unlocked. Previously this wasn't encountered because in the setup with this panel the power wasn't ever really dropped. When power gets dropped from the panel, MTP needs to be unlocked. Acked-by: Daniel Vetter Signed-off-by: Linus Walleij Cc: newbytee@protonmail.com Cc: Stephan Gerhold Link: https://patchwork.freedesktop.org/patch/msgid/20200808224322.1507713-1-linus.walleij@linaro.org commit 0cf0ee983b14af5e2160fa677b2eeb4c5dbb03ad Author: Arunpravin Date: Thu Aug 6 14:34:33 2020 +0530 drm/amdgpu: Enable P2P dmabuf over XGMI Access the exported P2P dmabuf over XGMI, if available. Otherwise, fall back to the existing PCIe method. Reviewed-by: Christian König Signed-off-by: Arunpravin Signed-off-by: Alex Deucher commit 0f877894a330edd4f3bc9ec07a1686ee2d86668d Author: Oleg Vasilev Date: Fri Apr 24 18:20:55 2020 +0530 drm/amdgpu: utilize subconnector property for DP through DisplayManager Since DP-specific information is stored in driver's structures, every driver needs to implement subconnector property by itself. Display Core already has the subconnector information, we only need to expose it through DRM property. v2:rebase v3: renamed a function call Cc: Alex Deucher Cc: Christian König Cc: David (ChunMing) Zhou Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Jeevan B Signed-off-by: Oleg Vasilev Tested-by: Oleg Vasilev Acked-by: Alex Deucher Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1587732655-17544-5-git-send-email-jeevan.b@intel.com commit 65bf2cf95d3ade4b56c35b17bb955a64b7f4b019 Author: Oleg Vasilev Date: Fri Apr 24 18:20:54 2020 +0530 drm/amdgpu: utilize subconnector property for DP through atombios Since DP-specific information is stored in driver's structures, every driver needs to implement subconnector property by itself. v2: rebase v3: renamed a function call Cc: Alex Deucher Cc: Christian König Cc: David (ChunMing) Zhou Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Jeevan B Signed-off-by: Oleg Vasilev Reviewed-by: Emil Velikov Acked-by: Alex Deucher Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1587732655-17544-4-git-send-email-jeevan.b@intel.com commit fb82313462bac5567a564d4c725dcf8152d6dc46 Author: Oleg Vasilev Date: Fri Apr 24 18:20:52 2020 +0530 drm/i915: utilize subconnector property for DP Since DP-specific information is stored in driver's structures, every driver needs to implement subconnector property by itself. v2: updates to match previous commit changes v3: rebase v4: renamed a function call Cc: Ville Syrjälä Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Jeevan B Signed-off-by: Oleg Vasilev Reviewed-by: Emil Velikov Reviewed-by: Jani Nikula #and acked for merging Tested-by: Oleg Vasilev Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1587732655-17544-2-git-send-email-jeevan.b@intel.com commit e5b92773287c3eb3108a44785986a6c997866df8 Author: Oleg Vasilev Date: Fri Apr 24 18:20:51 2020 +0530 drm: report dp downstream port type as a subconnector property Currently, downstream port type is only reported in debugfs. This information should be considered important since it reflects the actual physical connector type. Some userspace (e.g. window compositors) may want to show this info to a user. The 'subconnector' property is already utilized for DVI-I and TV-out for reporting connector subtype. The initial motivation for this feature came from i2c test [1]. It is supposed to be skipped on VGA connectors, but it cannot detect VGA over DP and fails instead. v2: - Ville: utilized drm_dp_is_branch() - Ville: implement DP 1.0 downstream type info - Replaced create_dp_properties with add_dp_subconnector_property - Added dp_set_subconnector_property helper v4: - Ville: add DP1.0 best assumption about subconnector - Ville: assume DVI is DVI-D - Ville: reuse Writeback enum value for Virtual subconnector - Renamed #defines: HDMI -> HDMIA, DP -> DisplayPort v5: rebase v6: - Jani Nikula: renamed a function name - Jani Nikula: addressed the issues with documentation [1]: https://bugs.freedesktop.org/show_bug.cgi?id=104097 Cc: Ville Syrjälä Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Jeevan B Signed-off-by: Oleg Vasilev Reviewed-by: Emil Velikov Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1587732655-17544-1-git-send-email-jeevan.b@intel.com commit a343160235f59b5baacaecba7b7ee14abe8ae034 Author: Dave Airlie Date: Mon Aug 10 15:39:20 2020 +1000 drm/vmwgfx/ttm: fix the non-THP cleanup path. I fixed the init path, but missed the cleanup path. Fixes: e0830704de7c ("drm/vmwgfx: takedown vram manager") Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200810054110.4192239-1-airlied@gmail.com commit 7c9c06246cea90f6b0cc4fcfe28505832362691c Author: Jerome Brunet Date: Mon Aug 3 16:21:58 2020 +0200 arm64: dts: meson: vim3: make sound card common to all variants The vim3 sound card definition should be same all the vim3 variants Move the definition to the appropriate device tree file. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200803142158.173402-1-jbrunet@baylibre.com commit 1f9d87d08e4a2299e86f8a1600aedf87ecd3b636 Author: Jerome Brunet Date: Mon Aug 3 16:18:50 2020 +0200 arm64: dts: meson: vim3: correct led polarity The LEDs on the vim3 are active when the gpio is high, not low. Fixes: c6d29c66e582 ("arm64: dts: meson-g12b-khadas-vim3: add initial device-tree") Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200803141850.172704-1-jbrunet@baylibre.com commit d6e6dfb287443b4197afde4632784ba640944648 Author: Qinglang Miao Date: Mon Aug 10 20:59:19 2020 +0800 drm/amd/display: convert to use le16_add_cpu() Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu(). Signed-off-by: Qinglang Miao Signed-off-by: Alex Deucher commit 200b86f9891b87ff1709e1dca4efe9d2ee06154d Author: Alex Deucher Date: Mon Aug 10 11:55:32 2020 -0400 drm/amdgpu/display: drop unused function This is not longer used as of the latest rework of this code so drop it to avoid a unused function warning. Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit c38d444e44badc557cf29fdfdfb823604890ccfa Author: Daniel Kolesa Date: Sat Aug 8 22:44:58 2020 +0200 drm/amd/display: add DCN support for aarch64 This adds ARM64 support into the DCN. This mainly enables support for Navi graphics cards. The dcn10 changes haven't been tested, since I don't have the relevant hardware available, but there is no way to conditionally disable them, so I've done them anyway. Signed-off-by: Daniel Kolesa Signed-off-by: Alex Deucher commit fbd7cda0e61e25a5714d7b3b4dd3524271bc2245 Author: Daniel Kolesa Date: Sat Aug 8 22:42:35 2020 +0200 drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal GFP_KERNEL may and will sleep, and this is being executed in a non-preemptible context; this will mess things up since it's called inbetween DC_FP_START/END, and rescheduling will result in the DC_FP_END later being called in a different context (or just crashing if any floating point/vector registers/instructions are used after the call is resumed in a different context). Signed-off-by: Daniel Kolesa Signed-off-by: Alex Deucher commit 8db2d634ed29eeaed56fdbeaf63da7ae9e65280b Author: Jaehyun Chung Date: Thu Jul 30 16:31:29 2020 -0400 drm/amd/display: Blank stream before destroying HDCP session [Why] Stream disable sequence incorretly destroys HDCP session while stream is not blanked and while audio is not muted. This sequence causes a flash of corruption during mode change and an audio click. [How] Change sequence to blank stream before destroying HDCP session. Audio will also be muted by blanking the stream. Cc: stable@vger.kernel.org Signed-off-by: Jaehyun Chung Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 57321eae08d67c6cce0030b37812b64417569f12 Author: Stylon Wang Date: Tue Jul 28 15:10:35 2020 +0800 drm/amd/display: Fix EDID parsing after resume from suspend [Why] Resuming from suspend, CEA blocks from EDID are not parsed and no video modes can support YUV420. When this happens, output bpc cannot go over 8-bit with 4K modes on HDMI. [How] In amdgpu_dm_update_connector_after_detect(), drm_add_edid_modes() is called after drm_connector_update_edid_property() to fully parse EDID and update display info. Cc: stable@vger.kernel.org Signed-off-by: Stylon Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 81b437f57e35a6caa3a4304e6fff0eba0a9f3266 Author: Alvin Lee Date: Wed Jul 29 23:08:59 2020 -0400 drm/amd/display: Disconnect pipe separetely when disable pipe split [Why] When changing pixel formats for HDR (e.g. ARGB -> FP16) there are configurations that change from 2 pipes to 1 pipe. In these cases, it seems that disconnecting MPCC and doing a surface update at the same time(after unlocking) causes some registers to be updated slightly faster than others after unlocking (e.g. if the pixel format is updated to FP16 before the new surface address is programmed, we get corruption on the screen because the pixel formats aren't matching). We separate disconnecting MPCC from the rest of the pipe programming sequence to prevent this. [How] Move MPCC disconnect into separate operation than the rest of the pipe programming. Signed-off-by: Alvin Lee Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 073e7cd56d04110792a7a16b344d8b462178cadb Author: Anthony Koo Date: Wed Jul 29 17:43:10 2020 -0400 drm/amd/display: Switch to immediate mode for updating infopackets [Why] Using FRAME_UPDATE will result in infopacket to be potentially updated one frame late. In commit stream scenarios for previously active stream, some stale infopacket data from previous config might be erroneously sent out on initial frame after stream is re-enabled. [How] Switch to using IMMEDIATE_UPDATE mode Signed-off-by: Anthony Koo Reviewed-by: Ashley Thomas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 575da8db31572d1d8de572d0b6ffb113624c2f8f Author: Anthony Koo Date: Wed Jul 29 17:33:27 2020 -0400 drm/amd/display: Fix LFC multiplier changing erratically [Why] 1. There is a calculation that is using frame_time_in_us instead of last_render_time_in_us to calculate whether choosing an LFC multiplier would cause the inserted frame duration to be outside of range. 2. We do not handle unsigned integer subtraction correctly and it underflows to a really large value, which causes some logic errors. [How] 1. Fix logic to calculate 'within range' using last_render_time_in_us 2. Split out delta_from_mid_point_delta_in_us calculation to ensure we don't underflow and wrap around Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit c0c96fc9c2ca845c2d79006c543e337a31969ac2 Author: Xiaodong Yan Date: Tue Jul 28 18:12:45 2020 +0800 drm/amd/display: mpcc black color should not be impacted by pixel encoding format [Why] The format in MPCC should be 444 [How] do not modify the mpcc black color according to pixel encoding format Signed-off-by: Xiaodong Yan Reviewed-by: Eric Yang Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit ffe0fcbb20d61ccf670e17a89b0dc06be141cce0 Author: Alvin Lee Date: Wed Jul 29 17:49:14 2020 -0400 drm/amd/display: Revert regression [Why] Caused pipe split regression Signed-off-by: Alvin Lee Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 5396fa590df764775e83c9014330bc4112a75f63 Author: Aric Cyr Date: Mon Jul 27 21:21:16 2020 -0400 drm/amd/display: Fix incorrect backlight register offset for DCN [Why] Typo in backlight refactor inctroduced wrong register offset. [How] Change DCE to DCN register map for PWRSEQ_REF_DIV Cc: stable@vger.kernel.org Signed-off-by: Aric Cyr Reviewed-by: Ashley Thomas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit fe04afad4ee144557fbf7196c5746cfe57fbdf47 Author: Joshua Aberback Date: Thu Jul 16 12:39:27 2020 -0400 drm/amd/display: Adjust static-ness of resource functions [Why] Register definitions are asic-specific, so functions that use registers of a particular asic should be static, to be exposed in asic-specific function pointer structures. [How] - make register-definition-using functions static - make some functions non-static, for future use - remove duplicate function definition Signed-off-by: Joshua Aberback Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit bcca6298069435fa7f23ab98f4cb635fcbd3bc20 Author: Monk Liu Date: Mon Aug 10 14:12:06 2020 +0800 drm/amdgpu: fix reload KMD hang on GFX10 KIQ GFX10 KIQ will hang if we try below steps: modprobe amdgpu rmmod amdgpu modprobe amdgpu sched_hw_submission=4 Due to KIQ is always living there even after KMD unloaded thus when doing the realod KIQ will crash upon its register being programed by different values with the previous loading (the config like HQD addr, ring size, is easily changed if we alter the sched_hw_submission) the fix is we must inactive KIQ first before touching any of its registgers Signed-off-by: Monk Liu Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 5a58abf5ed4f63e0d8c6f542da1d9e2dd8dea1bc Author: shiwu.zhang Date: Fri Aug 7 16:43:59 2020 +0800 drm/amdgpu: update gc golden register for arcturus Update golden setting to improve performance on HPC and ML apps Signed-off-by: shiwu.zhang Tested-by: gang.long Reviewed-by: guchun.chen Signed-off-by: Alex Deucher commit 8d0717f422255513ae1afab2ea0b75ba9f1512a9 Author: Evan Quan Date: Fri Aug 7 17:01:47 2020 +0800 drm/amd/powerplay: correct UVD/VCE PG state on custom pptable uploading The UVD/VCE PG state is managed by UVD and VCE IP. It's error-prone to assume the bootup state in SMU based on the dpm status. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 7358462f7de98f95550f27abf805d4d5c95e2a5c Author: Evan Quan Date: Fri Aug 7 15:03:40 2020 +0800 drm/amd/powerplay: correct Vega20 cached smu feature state Correct the cached smu feature state on pp_features sysfs setting. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 1d4473261966bef70ff65ebb303bae98949b8f8a Author: Liu ChengZhe Date: Thu Aug 6 14:54:08 2020 +0800 drm/amdgpu: Skip some registers config for SRIOV Some registers are not accessible to virtual function setup, so skip their initialization when in VF-SRIOV mode. v2: move SRIOV VF check into specify functions; modify commit description and comment. Signed-off-by: Liu ChengZhe Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit b60646a20c9f61e364c86cc88f50f547361cceb3 Author: Jay Cornwall Date: Fri Jul 24 16:58:48 2020 -0700 drm/amdkfd: Fix spurious debug exception on gfx10 s_barrier triggers a debug exception when issued with PRIV=1, DEBUG_EN=1. This causes spurious notifications to rocm-gdb. Clear MODE before issuing s_barrier and restore MODE afterwards in the context restore handler. Signed-off-by: Jay Cornwall Tested-by: Laurent Morichetti Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit c342d7c579f2c9f4e84552d53881acd1cf15eb14 Author: Felix Kuehling Date: Fri Aug 7 18:23:56 2020 -0400 Revert "drm/amdkfd: Unify gfx9/gfx10 context save area layouts" This reverts commit 0a5baee415000a3e18730ac98e19d046c3cebbe6. The change introduced a regression on some chips. Reverting until a proper solution can be found. Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5218992251e62cedd16ff4466717ca09b7ad4b18 Author: Felix Kuehling Date: Fri Aug 7 18:22:27 2020 -0400 Revert "drm/amdkfd: Fix spurious debug exception on gfx10" This reverts commit ea368183ae900e376b66d3f23da22acde48e385a. Needed due to conflicts when reverting "drm/amdkfd: Unify gfx9/gfx10 context save area layouts". Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5068ed578e34450a285fca3f9d830361b44267ad Author: Christophe JAILLET Date: Sun Aug 9 22:34:06 2020 +0200 drm: amdgpu: Use the correct size when allocating memory When '*sgt' is allocated, we must allocated 'sizeof(**sgt)' bytes instead of 'sizeof(*sg)'. The sizeof(*sg) is bigger than sizeof(**sgt) so this wastes memory but it won't lead to corruption. Fixes: f44ffd677fb3 ("drm/amdgpu: add support for exporting VRAM using DMA-buf v3") Reviewed-by: Christian König Signed-off-by: Christophe JAILLET Signed-off-by: Alex Deucher commit b26975593b17c2c7188b96dba6fe9fff14480538 Author: Vinay Simha BN Date: Fri Jul 10 19:11:28 2020 +0530 display/drm/bridge: TC358775 DSI/LVDS driver This driver is tested with two panels individually with Apq8016-IFC6309 board https://www.inforcecomputing.com/products/single-board-computers-sbc/qualcomm-snapdragon-410-inforce-6309-micro-sbc 1. 1366x768@60 auo,b101xtn01 data-mapping = "jeida-24" 2. 800x480@60 innolux,at070tn92 data-mapping = "vesa-24" - power off sequence in proper order - put_unaligned_be16, put_unaligned_le32 macros used - static function for mode_valid - len initialized - MODE_CLOCK_HIGH handled properly - bus_formats handled in mode_valid - GENMASK and FIELD_PREP used - Kconfig proper indentation - error handling endpoint data-lanes - check for bus_formats unsupported - display_timings naming local variables - help modified - ~vsdelay dynamic value set based on the calculation of dsi speed, output speed, blanking - panel->connector_type removed - dual port implemented - devm_drm_panel_bridge_add method used instead of panel description modified - regulator enable and disable with proper orders and delays as per the spec - removed drm_connector_status - added bus_formats - mdelay to usleep_range - magic number to macros for CLRSI and mux registers description modified - replaced u32 instead of uint32_t - updated alphabetic order of headers - added SPDX identifier license Signed-off-by: Vinay Simha BN Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1594388491-15129-2-git-send-email-simhavcs@gmail.com commit 8b0d47e879b8feb1e00a7f1a8da772f8c5cf984b Author: Vinay Simha BN Date: Fri Jul 10 19:11:27 2020 +0530 dt-binding: Add DSI/LVDS TC358775 bridge bindings - license modified to (GPL-2.0-only OR BSD-2-Clause) - single-link and dual-link lvds description and examples are added - proper indentation - VESA/JEIDA formats picked from panel-lvds dts - dsi data-lanes property removed, it will be picked from dsi0 ports - dual-link lvds port added and implemented - converted from .txt to .yaml Signed-off-by: Vinay Simha BN Reviewed-by: Sam Ravnborg Reviewed-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1594388491-15129-1-git-send-email-simhavcs@gmail.com commit 547bbf7d214fff2d29bc885ea7efea0fbc127791 Author: Randy Dunlap Date: Thu Aug 6 20:32:27 2020 -0700 kernel: printk: delete repeated words in comments Drop repeated words "the" in kernel/printk/. Signed-off-by: Randy Dunlap Cc: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200807033227.8349-1-rdunlap@infradead.org commit ad28cd694293eff7322974d071af6fbb1e59e2c6 Author: Qinglang Miao Date: Mon Aug 10 20:59:31 2020 +0800 drm/v3d: convert to use module_platform_driver Get rid of boilerplate code by using module_platform_driver macro for v3d_drm. Signed-off-by: Qinglang Miao Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200810125931.186456-1-miaoqinglang@huawei.com commit 7995bd13296111d672d8c5959f5e81dbbbda5286 Author: Qinglang Miao Date: Mon Aug 10 21:00:11 2020 +0800 drm/vkms: add missing platform_device_unregister() in vkms_init() When vkms_init() get into out_put, the unregister call of vkms_device->platform is missing. So add it before return. Fixes: ac19f140bc27 ("drm/vkms: Use drmm_add_final_kfree") Signed-off-by: Qinglang Miao Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200810130011.187691-1-miaoqinglang@huawei.com commit 57fb54082d5d14512dfd21bc39d91945d3ad1ee9 Author: Qinglang Miao Date: Mon Aug 10 20:59:42 2020 +0800 drm/vgem: add missing platform_device_unregister() in vgem_init() When vgem_init() get into out_put, the unregister call of vgem_device->platform is missing. So add it before return. Fixes: 363de9e7d4f6 ("drm/vgem: Use drmm_add_final_kfree") Signed-off-by: Qinglang Miao Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200810125942.186637-1-miaoqinglang@huawei.com commit 5bd858d7bfd2746df34f54cec3b6d0c36a70bdd7 Author: Melissa Wen Date: Sat Aug 8 09:09:00 2020 -0300 drm/vkms: guarantee vblank when capturing crc VKMS needs vblank interrupts enabled to capture CRC. When vblank is disabled, tests like kms_cursor_crc and kms_pipe_crc_basic getting stuck waiting for a capture that will not occur until vkms wakes up. This patch adds a helper to set composer and ensure that vblank remains enabled as long as the CRC capture is needed. It clears the execution of the following kms_cursor_crc subtests: 1. pipe-A-cursor-[size,alpha-opaque, NxN-(on-screen, off-screen, sliding, random, fast-moving])] - successful when running individually. 2. pipe-A-cursor-dpms passes again 3. pipe-A-cursor-suspend also passes The issue was initially tracked in the sequential execution of IGT kms_cursor_crc subtests: when running the test sequence or one of its subtests twice, the odd execs complete and the pairs get stuck in an endless wait. In the IGT code, calling a wait_for_vblank on preparing for CRC capture prevented the busy-wait. But the problem persisted in the pipe-A-cursor-dpms and -suspend subtests. Checking the history, the pipe-A-cursor-dpms subtest was successful when, in vkms_atomic_commit_tail, instead of using the flip_done op, it used wait_for_vblanks. Another way to prevent blocking was wait_one_vblank when enabling crtc. However, in both cases, pipe-A-cursor-suspend persisted blocking in the 2nd start of CRC capture, which may indicate that something got stuck in the step of CRC setup. Indeed, wait_one_vblank in the crc setup was able to sync things and free all kms_cursor_crc subtests. Besides, other alternatives to force enabling vblanks or prevent disabling them such as calling drm_crtc_put_vblank or modeset_enables before commit_planes + offdelay = 0, also unlock all subtests executions. Finally, due to vkms's dependence on vblank interruptions to perform tasks, this patch uses refcount to ensure that vblanks happen when enabling composer and while crc capture is needed. Cc: Rodrigo Siqueira Cc: Haneen Mohammed v2: - extract a vkms_set_composer helper - fix vblank refcounting for the disabling case v3: - make the vkms_set_composer helper static - review the credit tags Co-debugged-by: Sidong Yang Signed-off-by: Sidong Yang Signed-off-by: Melissa Wen Reviewed-by: Daniel Vetter [danvet: add changelog back in] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200808120900.pudwwrfz44g3rqx7@smtp.gmail.com commit e4fbdd8b5d5a5121a3407ed53d8e601fa941b1bf Author: Colin Ian King Date: Wed Aug 5 13:42:27 2020 +0100 drm/gma500: fix spelling mistake "pannel" -> "panel" There a handful of spelling mistakes. fix them. Signed-off-by: Colin Ian King Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200805124227.20005-1-colin.king@canonical.com commit 373627930f0208c9a8ddc96510583db532c3e354 Author: Dave Airlie Date: Fri Aug 7 09:18:17 2020 +1000 drm/amdgpu/ttm: drop the adev link from vram mgr There is no need for that now since it's embedded. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200806233459.4057784-3-airlied@gmail.com commit 4f297b9c82e1a43d2c02a687aa134e1b7318b7e6 Author: Dave Airlie Date: Fri Aug 7 09:04:50 2020 +1000 drm/amdgpu/ttm: move vram/gtt mgr allocations to mman. Christian suggested this and it makes sense. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200806233459.4057784-2-airlied@gmail.com commit 87154ff86bf69ecf76600e56ecab0b79fc3f71ea Author: Joe Perches Date: Sun Aug 2 09:43:59 2020 -0700 drm: Remove unnecessary drm_panel_attach and drm_panel_detach These functions are now empty and no longer useful so remove the functions and their uses. Signed-off-by: Joe Perches Cc: Bernard Zhao Cc: Maarten Lankhorst Cc: Maxime Ripard , Cc: Thomas Zimmermann Cc: Thierry Reding Cc: David Airlie Cc: Daniel Vetter Cc: Linus Walleij Cc: Icenowy Zheng , Cc: Jagan Teki Cc: Laurent Pinchart Cc: Robert Chiras Cc: dri-devel@lists.freedesktop.org, Cc: linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com Signed-off-by: Sam Ravnborg # Fixed build and a few warnings Link: https://patchwork.freedesktop.org/patch/msgid/9e13761020750b1ce2f1fabee23ef6e2a2942882.camel@perches.com commit 82c2454761298a2fdaade6a253a7b034b9cfa15d Author: Sandeep Raghuraman Date: Thu Aug 6 22:52:20 2020 +0530 drm/amdgpu: Fix bug where DPM is not enabled after hibernate and resume Reproducing bug report here: After hibernating and resuming, DPM is not enabled. This remains the case even if you test hibernate using the steps here: https://www.kernel.org/doc/html/latest/power/basic-pm-debugging.html I debugged the problem, and figured out that in the file hardwaremanager.c, in the function, phm_enable_dynamic_state_management(), the check 'if (!hwmgr->pp_one_vf && smum_is_dpm_running(hwmgr) && !amdgpu_passthrough(adev) && adev->in_suspend)' returns true for the hibernate case, and false for the suspend case. This means that for the hibernate case, the AMDGPU driver doesn't enable DPM (even though it should) and simply returns from that function. In the suspend case, it goes ahead and enables DPM, even though it doesn't need to. I debugged further, and found out that in the case of suspend, for the CIK/Hawaii GPUs, smum_is_dpm_running(hwmgr) returns false, while in the case of hibernate, smum_is_dpm_running(hwmgr) returns true. For CIK, the ci_is_dpm_running() function calls the ci_is_smc_ram_running() function, which is ultimately used to determine if DPM is currently enabled or not, and this seems to provide the wrong answer. I've changed the ci_is_dpm_running() function to instead use the same method that some other AMD GPU chips do (e.g Fiji), which seems to read the voltage controller. I've tested on my R9 390 and it seems to work correctly for both suspend and hibernate use cases, and has been stable so far. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=208839 Signed-off-by: Sandeep Raghuraman Signed-off-by: Alex Deucher commit 94561899ddb0f89d7fd3fb58ee3ed6961ef048ad Author: Dennis Li Date: Tue Aug 4 12:32:13 2020 +0800 drm/amdgpu: unlock mutex on error Make sure to unlock the mutex when error happen v2: 1. correct syntax error in the commit comments 2. remove change-Id Acked-by: Nirmoy Das Reviewed-by: Luben Tuikov Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit 520f5e425a69417540b7563c266f773752dcea44 Author: Evan Quan Date: Wed Aug 5 17:24:41 2020 +0800 drm/amd/powerplay: put VCN/JPEG into PG ungate state before dpm table setup(V3) As VCN related dpm table setup needs VCN be in PG ungate state. Same logics applies to JPEG. V2: fix paste typo V3: code cosmetic Signed-off-by: Evan Quan Tested-by: Matt Coffin Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ad1cac262ed2c344ec93e145c5307480cecfbc2f Author: Evan Quan Date: Mon Aug 3 11:15:14 2020 +0800 drm/amd/powerplay: update swSMU VCN/JPEG PG logics Add lock protections and avoid unnecessary actions if the PG state is already the same as required. Signed-off-by: Evan Quan Tested-by: Matt Coffin Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ca6fd7a66843b6ef64179d0a4ce943affbb6c057 Author: Likun Gao Date: Thu Aug 6 17:37:28 2020 +0800 drm/amdgpu: use mode1 reset by default for sienna_cichlid Swith default gpu reset method for sienna_cichlid to MODE1 reset. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 018315d399fcc0407c4c160f24ffd60a36ee30c8 Author: Sam Ravnborg Date: Fri Aug 7 20:05:47 2020 +0200 drm/mgag200: fix build on alpha arch When building imgag200 for the alpha architecture it fails like this: mgag200_drv.c:233:9: error: implicit declaration of function ‘vmalloc’ 233 | bios = vmalloc(size); | ^~~~~~~ | kmalloc When building for other architectures vmalloc.h is pulled in via some other header file - for example asm-generic/io.h. Use an explicit include of vmalloc.h to fix the build. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Vetter Fixes: e20dfd27f7aa ("drm/mgag200: Add support for G200 desktop cards") Cc: Thomas Zimmermann Cc: Egbert Eich Cc: Takashi Iwai Cc: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200807180547.GA923146@ravnborg.org commit 9df0e0c1889677175037445d5ad1654d54176369 Author: Navid Emamdoost Date: Sun Jun 14 01:36:19 2020 -0500 drm/panfrost: perfcnt: fix ref count leak in panfrost_perfcnt_enable_locked in panfrost_perfcnt_enable_locked, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Acked-by: Alyssa Rosenzweig Signed-off-by: Navid Emamdoost Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200614063619.44944-1-navid.emamdoost@gmail.com commit fd587ff01d59554144e2fd20f4113638a45c7c4e Author: Clément Péron Date: Fri Jul 10 11:54:05 2020 +0200 drm/panfrost: add regulators to devfreq Some OPP tables specify voltage for each frequency. Devfreq can handle these regulators but they should be get only 1 time to avoid issue and know who is in charge. If OPP table is probe don't init regulator. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-11-peron.clem@gmail.com commit 512f21227fd3d2dbe7aad57a995b9732229c9b56 Author: Clément Péron Date: Fri Jul 10 11:54:04 2020 +0200 drm/panfrost: dynamically alloc regulators We will later introduce regulators managed by OPP. Only alloc regulators when it's needed. This also help use to release the regulators only when they are allocated. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-10-peron.clem@gmail.com commit 25e247bbf85af3ad721dfeb2e2caf405f43b7e66 Author: Clément Péron Date: Fri Jul 10 11:54:03 2020 +0200 drm/panfrost: move devfreq_init()/fini() in device Later we will introduce devfreq probing regulator if they are present. As regulator should be probe only one time we need to get this logic in the device_init(). panfrost_device is already taking care of devfreq_resume() and devfreq_suspend(), so it's not totally illogic to move the devfreq_init() and devfreq_fini() here. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Steven Price Signed-off-by: Clément Péron Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-9-peron.clem@gmail.com commit d3c335da0200be9287cdf5755d19f62ce1670a8d Author: Clément Péron Date: Fri Jul 10 11:54:02 2020 +0200 drm/panfrost: rename error labels in device_init Rename goto labels in device_init it will be easier to maintain. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Steven Price Signed-off-by: Clément Péron Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-8-peron.clem@gmail.com commit 81f2fbe62cb54b6cf3d91078c4d49451ba7b9877 Author: Clément Péron Date: Fri Jul 10 11:54:01 2020 +0200 drm/panfrost: properly handle error in probe Introduce a boolean to know if opp table has been added. With this, we can call panfrost_devfreq_fini() in case of error and release what has been initialised. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-7-peron.clem@gmail.com commit ed85df3f60740bb4be23fbc2db283d59b361a834 Author: Clément Péron Date: Fri Jul 10 11:54:00 2020 +0200 drm/panfrost: use spinlock instead of atomic Convert busy_count to a simple int protected by spinlock. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-6-peron.clem@gmail.com commit 9bfacfc82f903b066b0b63460d5b7943705048a4 Author: Clément Péron Date: Fri Jul 10 11:53:59 2020 +0200 drm/panfrost: introduce panfrost_devfreq struct Introduce a proper panfrost_devfreq to deal with devfreq variables. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-5-peron.clem@gmail.com commit eb9dd67249b55fd1fa3d7359be387ea2079247a6 Author: Clément Péron Date: Fri Jul 10 11:53:58 2020 +0200 drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle This use devfreq variable that will be lock with spinlock in future patches. We should either introduce a function to access this one but as devfreq is optional let's just remove it. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-4-peron.clem@gmail.com commit 9713e942a539c55b5e0bc64ba83b736bda1087fe Author: Clément Péron Date: Fri Jul 10 11:53:57 2020 +0200 drm/panfrost: clean headers in devfreq Don't include not required headers and sort them. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-3-peron.clem@gmail.com commit 862cc626210e34501b4d7a7795c41a67785987e5 Author: Clément Péron Date: Fri Jul 10 11:53:56 2020 +0200 drm/panfrost: avoid static declaration This declaration can be avoided so change it. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-2-peron.clem@gmail.com commit 72ef7fe96fd20d3d0e538e165b393819f99870ad Author: Tomeu Vizoso Date: Thu Jun 11 10:58:44 2020 +0200 drm/panfrost: Add compatible string for bifrost Mesa now supports some Bifrost devices, so enable it. Tested-by: Heiko Stuebner Reviewed-by: Steven Price Reviewed-by: Heiko Stuebner Signed-off-by: Tomeu Vizoso Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200611085900.49740-2-tomeu.vizoso@collabora.com commit 3a74265c54f883c847ed8554129baefb3e04f135 Author: Tomeu Vizoso Date: Thu Jun 11 10:58:43 2020 +0200 drm/panfrost: Make sure GPU is powered on when reading GPU_LATEST_FLUSH_ID Bifrost devices do support the flush reduction feature, so on first job submit we were trying to read the register while still powered off. If the GPU is powered off, the feature doesn't bring any benefit, so don't try to read. Tested-by: Heiko Stuebner Reviewed-by: Steven Price Signed-off-by: Tomeu Vizoso Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200611085900.49740-1-tomeu.vizoso@collabora.com commit 77f47d239545810a899bd0531ae81712f3a85092 Author: Christian König Date: Thu Aug 6 14:44:07 2020 +0200 drm/amdgpu: make sure userptr ttm is allocated We need to allocate that manually now. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Tested-by: Michel Dänzer Link: https://patchwork.freedesktop.org/patch/384330/ commit f6d7c7faf0ee69569bc2ad309f48ab76785d2972 Author: Nicholas Kazlauskas Date: Tue Jul 28 11:08:02 2020 -0400 drm/amd/display: Drop dm_determine_update_type_for_commit [Why] This was added in the past to solve the issue of not knowing when to stall for medium and full updates in DM. Since DC is ultimately decides what requires bandwidth changes we wanted to make use of it directly to determine this. The problem is that we can't actually pass any of the stream or surface updates into DC global validation, so we don't actually check if the new configuration is valid - we just validate the old existing config instead and stall for outstanding commits to finish. There's also the problem of grabbing the DRM private object for pageflips which can lead to page faults in the case where commits execute out of order and free a DRM private object state that was still required for commit tail. [How] Now that we reset the plane in DM with the same conditions DC checks we can have planes go through DC validation and we know when we need to check and stall based on whether the stream or planes changed. We mark lock_and_validation_needed whenever we've done this, so just go back to using that instead of dm_determine_update_type_for_commit. Since we'll skip resetting the plane for a pageflip we will no longer grab the DRM private object for pageflips as well, avoiding the page fault issued caused by pageflipping under load with commits executing out of order. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit dc4cb30deec713888d31ec6d81c8ca34605089d5 Author: Nicholas Kazlauskas Date: Tue Jul 28 10:48:21 2020 -0400 drm/amd/display: Reset plane for anything that's not a FAST update [Why] MEDIUM or FULL updates can require global validation or affect bandwidth. By treating these all simply as surface updates we aren't actually passing this through DC global validation. [How] There's currently no way to pass surface updates through DC global validation, nor do I think it's a good idea to change the interface to accept these. DC global validation itself is currently stateless, and we can move our update type checking to be stateless as well by duplicating DC surface checks in DM based on DRM properties. We wanted to rely on DC automatically determining this since DC knows best, but DM is ultimately what fills in everything into DC plane state so it does need to know as well. There are basically only three paths that we exercise in DM today: 1) Cursor (async update) 2) Pageflip (fast update) 3) Full pipe programming (medium/full updates) Which means that anything that's more than a pageflip really needs to go down path #3. So this change duplicates all the surface update checks based on DRM state instead inside of should_reset_plane(). Next step is dropping dm_determine_update_type_for_commit and we no longer require the old DC state at all for global validation. Optimization can come later so we don't reset DC planes at all for MEDIUM udpates and avoid validation, but we might require some extra checks in DM to achieve this. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Hersen Wu Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8ce5d8425d39eb9197e30bcffc5afbaa7079b723 Author: Nicholas Kazlauskas Date: Thu Aug 6 15:48:10 2020 -0400 drm/amd/display: Use validated tiling_flags and tmz_surface in commit_tail [Why] So we're not racing with userspace or deadlocking DM. [How] These flags are now stored on dm_plane_state itself and acquried and validated during commit_check, so just use those instead. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit cf322b49c9e8fe41e5c9d0b5e57eee84085da553 Author: Nicholas Kazlauskas Date: Tue Jul 28 10:03:10 2020 -0400 drm/amd/display: Avoid using unvalidated tiling_flags and tmz_surface in prepare_planes [Why] We're racing with userspace as the flags could potentially change from when we acquired and validated them in commit_check. [How] We unfortunately can't drop this function in its entirety from prepare_planes since we don't know the afb->address at commit_check time yet. So instead of querying new tiling_flags and tmz_surface use the ones from the plane_state directly. While we're at it, also update the force_disable_dcc option based on the state from atomic check. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 9a81cc60796b9f86cf19245e68562750541bb575 Author: Nicholas Kazlauskas Date: Tue Jul 28 09:59:53 2020 -0400 drm/amd/display: Reset plane when tiling flags change [Why] Enabling or disable DCC or switching between tiled and linear formats can require bandwidth updates. They're currently skipping all DC validation by being treated as purely surface updates. [How] Treat tiling_flag changes (which encode DCC state) as a condition for resetting the plane. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Hersen Wu Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 707477b0861f5d7b93512024db8d39db5a65025c Author: Nicholas Kazlauskas Date: Tue Jul 28 09:44:26 2020 -0400 drm/amd/display: Store tiling_flags and tmz_surface on dm_plane_state [Why] Store these in advance so we can reuse them later in commit_tail without having to reserve the fbo again. These will also be used for checking for tiling changes when deciding to reset the plane or not. [How] This change should mostly be a refactor. Only commit check is affected for now and I'll drop the get_fb_info calls in prepare_planes and commit_tail after. This runs a prepass loop once we think that all planes have been added to the context and replaces the get_fb_info calls with accessing the dm_plane_state instead. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit efa85f3a2b535bbc51e43a191b40f258538425b0 Author: Likun Gao Date: Thu Aug 6 14:41:06 2020 +0800 drm/amd/powerplay: update driver if file for sienna_cichlid Update drive if file for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 16c642ec3fe9a144fbe1e97dc56f13a6308f1381 Author: Pierre-Eric Pelloux-Prayer Date: Thu Jul 30 15:54:59 2020 +0200 drm/amdgpu: new ids flag for tmz (v2) Allows UMD to know if TMZ is supported and enabled. This commit also bumps KMS_DRIVER_MINOR because if we don't UMD can't tell if "ids_flags & AMDGPU_IDS_FLAGS_TMZ == 0" means "tmz is not enabled" or "tmz may be enabled but the kernel doesn't report it". v2: use amdgpu_is_tmz() and reworded commit message. Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Christian König Signed-off-by: Alex Deucher commit bf1102877751175fe6c1d68734d3c57d4af65df9 Author: Evan Quan Date: Thu Jul 30 15:28:40 2020 +0800 drm/amd/powerplay: add control method to bypass metrics cache on Vega12 As for the gpu metric export, metrics cache makes no sense. It's up to user to decide how often the metrics should be retrieved. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 740dce9517cb4f67f762131b4f62584e65b97593 Author: Evan Quan Date: Thu Jul 30 15:24:08 2020 +0800 drm/amd/powerplay: add control method to bypass metrics cache on Vega20 As for the gpu metric export, metrics cache makes no sense. It's up to user to decide how often the metrics should be retrieved. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2ba38817219bfbae3cf870cb0092afb12f616fd3 Author: Evan Quan Date: Thu Jul 30 15:02:11 2020 +0800 drm/amd/powerplay: add control method to bypass metrics cache on Renoir As for the gpu metric export, metrics cache makes no sense. It's up to user to decide how often the metrics should be retrieved. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 60ae4d67ee6d804215067f49e183214de405302b Author: Evan Quan Date: Thu Jul 30 15:09:57 2020 +0800 drm/amd/powerplay: add control method to bypass metrics cache on Sienna Cichlid As for the gpu metric export, metrics cache makes no sense. It's up to user to decide how often the metrics should be retrieved. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 62d351632db8908e8bb5b359182b6ead54147e71 Author: Evan Quan Date: Thu Jul 30 14:55:32 2020 +0800 drm/amd/powerplay: add control method to bypass metrics cache on Navi10 As for the gpu metric export, metrics cache makes no sense. It's up to user to decide how often the metrics should be retrieved. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 345fcb02d9ec4cf5eae19d063dfb27f152bde291 Author: Evan Quan Date: Thu Jul 30 14:31:21 2020 +0800 drm/amd/powerplay: add control method to bypass metrics cache on Arcturus As for the gpu metric export, metrics cache makes no sense. It's up to user to decide how often the metrics should be retrieved. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0fbc6533de67f49815e5bd7232cbd37fb68c6afa Author: Evan Quan Date: Thu Jul 30 12:39:58 2020 +0800 drm/amd/powerplay: add Vega12 support for gpu metrics export Add Vega12 gpu metrics export interface. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e467c3a9f4ed143fd2ea3f9aef7672d3674de9f4 Author: Evan Quan Date: Thu Jul 30 12:23:42 2020 +0800 drm/amd/powerplay: add Vega20 support for gpu metrics export Add Vega20 gpu metrics export interface. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0b01b8306789b0c07c5bf2d6f9134f8b30990932 Author: Evan Quan Date: Thu Jul 30 11:40:07 2020 +0800 drm/amd/powerplay: enable gpu_metrics export on legacy powerplay routines Enable gpu_metrics support on legacy powerplay routines. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 95868b85764aff2dcbf78d3054076df75446ad15 Author: Evan Quan Date: Mon Jul 27 16:24:46 2020 +0800 drm/amd/powerplay: add Renoir support for gpu metrics export(V2) Add Renoir gpu metrics export interface. V2: use memcpy to make code more compact Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 8ca78a0a0e7719d1045c50e0876299c94b6454a2 Author: Evan Quan Date: Mon Jul 27 10:00:47 2020 +0800 drm/amd/powerplay: add Sienna Cichlid support for gpu metrics export Add Sienna Cichlid gpu metrics export interface. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6d4ff50a27749fdce0a8b8c674d9b9db13d9824d Author: Evan Quan Date: Fri Jul 24 17:24:34 2020 +0800 drm/amd/powerplay: add Navi1x support for gpu metrics export Add Navi1x gpu metrics export interface. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 14a12beab8b9d943edd3bfaac8fd31f4aa578e43 Author: Evan Quan Date: Fri Jul 24 17:47:03 2020 +0800 drm/amd/powerplay: update the data structure for NV12 SmuMetrics Although it does not bring any problem for now, the coming gpu metrics interface needs to handle them differently based on the asic type. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f1c378593153c93ed1db6ec8c025fa388474dd12 Author: Evan Quan Date: Fri Jul 24 10:42:39 2020 +0800 drm/amd/powerplay: add Arcturus support for gpu metrics export Add Arcturus gpu metrics export interface. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e4c9200df51033e2394c165fdafb183dbd6100ab Author: Evan Quan Date: Fri Jul 24 18:39:33 2020 +0800 drm/amd/powerplay: implement SMU V11 common APIs for retrieving link speed/width This will be shared around all SMU V11 asics. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 25c933b1c4fcfaa65ed735e9782fdb2622f7b7e8 Author: Evan Quan Date: Thu Jul 23 18:03:35 2020 +0800 drm/amd/powerplay: add new sysfs interface for retrieving gpu metrics(V2) A new interface for UMD to retrieve gpu metrics data. V2: rich the documentation Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 39c5a1cef84b4bc70123400d75f0fe637e1df6a6 Author: Evan Quan Date: Thu Jul 23 16:07:01 2020 +0800 drm/amd/powerplay: define an universal data structure for gpu metrics (V4) Thus we can provide an interface for UMD to retrieve gpu metrics data. V2: better naming and comments V3: two structures created for dGPU and APU separately V4: add driver attached timestamp Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c16ce56240aa654c1676f36119561162405322b1 Author: Colin Ian King Date: Wed Aug 5 13:15:27 2020 +0100 drm/amdgpu: fix spelling mistake "paramter" -> "parameter" There is a spelling mistake in a dev_warn message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 9993d8b174925a45810c45d2f5fd90d040400293 Author: Evan Quan Date: Tue Aug 4 16:58:30 2020 +0800 drm/amd/powerplay: grant Arcturus softmin/max setting on latest PM firmware For Arcturus, the softmin/max settings from driver are permitted on the latest(54.26 later) SMU firmware. Thus enabling them in driver. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit b80f050ff23d48c9b191e3da7e31ee520d1b2126 Author: Philip Yang Date: Mon Jul 27 09:06:18 2020 -0400 drm/amdkfd: option to disable system mem limit If multiple process share system memory through /dev/shm, KFD allocate memory should not fail if it reaches the system memory limit because one copy of physical system memory are shared by multiple process. Add module parameter no_system_mem_limit to provide user option to disable system memory limit check at runtime using sysfs or during driver module init using kernel boot argument. By default the system memory limit is on. Print out debug message to warn user if KFD allocate memory failed because system memory reaches limit. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit c35376137e940c3389df2726a92649c01a9844b4 Author: Tianjia Zhang Date: Sun Aug 2 19:15:36 2020 +0800 drm/amd/display: Fix wrong return value in dm_update_plane_state() On an error exit path, a negative error code should be returned instead of a positive return value. Fixes: 9e869063b0021 ("drm/amd/display: Move iteration out of dm_update_planes") Cc: Leo Li Signed-off-by: Tianjia Zhang Signed-off-by: Alex Deucher commit 76167e5c5457aee8fba3edc5b8554183696fc94d Author: Arvind Sankar Date: Sun Aug 2 21:15:34 2020 -0400 x86/kaslr: Replace strlen() with strnlen() strnlen is safer in case the command line is not NUL-terminated. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200803011534.730645-2-nivedita@alum.mit.edu commit 2966141ad2dda23d1b37997de6a4389b7864c169 Author: Dave Airlie Date: Tue Aug 4 12:56:32 2020 +1000 drm/ttm: rename ttm_mem_reg to ttm_resource. This name better reflects what the object does. I didn't rename all the pointers it seemed too messy. Signed-off-by: Dave Airlie Acked-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-60-airlied@gmail.com commit 9de59bc201496f28bb8835c2bcbae3ddb186b548 Author: Dave Airlie Date: Tue Aug 4 12:56:31 2020 +1000 drm/ttm: rename ttm_mem_type_manager -> ttm_resource_manager. This name makes a lot more sense, since these are about managing driver resources rather than just memory ranges. Acked-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-59-airlied@gmail.com commit 80938c28ee67bad05b2982410440b5a2d200a2f5 Author: Dave Airlie Date: Tue Aug 4 12:56:30 2020 +1000 drm/ttm: rename bo manager to range manager. The generic manager is called the range manager now, rename the file and some internals. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-58-airlied@gmail.com commit 3f48f938ad21a1ab1cec5631af3e468baabe41c8 Author: Dave Airlie Date: Tue Aug 4 12:56:29 2020 +1000 drm/ttm: add a wrapper for checking if manager is in use This converts vmwgfx over to using an interface to set the in use and check the in use flag. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-57-airlied@gmail.com commit 90a0489a718b87bc0674792f9eafac007e0ea3d6 Author: Dave Airlie Date: Tue Aug 4 12:56:28 2020 +1000 drm/ttm: drop type manager has_type under driver control, this flag isn't needed anymore, remove the API that used to access it, and consoldiate with the used api. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-56-airlied@gmail.com commit a751612d4cb77779669da0a6d19fbc4f7e72ba6f Author: Dave Airlie Date: Tue Aug 4 12:56:27 2020 +1000 drm/ttm: drop list of memory managers from device. (v2) The driver now controls these, the core just controls the system memory one. v2: init sysman explicitly and assign it as a driver manager to simplify the lookup sequence. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-55-airlied@gmail.com commit 7541ce1a6f2be9ab056a5b5105e08aef8d3287b1 Author: Dave Airlie Date: Tue Aug 4 12:56:26 2020 +1000 drm/ttm: drop man->bdev link. This link isn't needed anymore, drop it from the init interface. Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-54-airlied@gmail.com commit a29050c4cd7f411e6bc0b9eb4232c4ef5a76aa32 Author: Dave Airlie Date: Tue Aug 4 12:56:25 2020 +1000 drm/amdgpu/ttm: remove man->bdev references. Just store the device in the private so the link can be removed from the manager Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-53-airlied@gmail.com commit 7ee6c95e05e9b06741d347107cff13559e9f81d9 Author: Dave Airlie Date: Tue Aug 4 12:56:24 2020 +1000 drm/ttm: drop priv pointer in memory manager This isn't needed anymore by any drivers. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-52-airlied@gmail.com commit b6fad57e5903c0cc37a504300fff64b1d5d4dd8a Author: Dave Airlie Date: Tue Aug 4 12:56:23 2020 +1000 drm/nouveau/ttm: move to driver allocated manager Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-51-airlied@gmail.com commit 9488e46a4f89e45244bfa2c8ea70869adcb501dc Author: Dave Airlie Date: Tue Aug 4 12:56:22 2020 +1000 drm/vmwgfx/gmrid: convert to driver controlled allocation. Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-50-airlied@gmail.com commit d575a891e69e6f61d444f6f6e2749d9fa787c3ba Author: Dave Airlie Date: Tue Aug 4 12:56:21 2020 +1000 drm/vmwgfx/ttm: move thp to driver managed Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-49-airlied@gmail.com commit 3a1fc38edac75d19dffa5d5b0f1ffc872f8798d9 Author: Dave Airlie Date: Tue Aug 4 12:56:20 2020 +1000 drm/ttm: move range manager to subclassed driver allocation Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-48-airlied@gmail.com commit 37205891d84f9269de61d6e85c24607209478a85 Author: Dave Airlie Date: Tue Aug 4 12:56:19 2020 +1000 drm/ttm: make ttm_range_man_init/takedown take type + args This makes it easier to move these to a driver allocated system Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-47-airlied@gmail.com commit 0af135b892bf06c1a56cb0cd9632feb34511f9ee Author: Dave Airlie Date: Tue Aug 4 12:56:18 2020 +1000 drm/amdgpu/ttm: use bo manager subclassing for vram/gtt mgrs Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-46-airlied@gmail.com commit d398811ebfa80329269932803a6e78dc01c79bf1 Author: Dave Airlie Date: Tue Aug 4 12:56:17 2020 +1000 drm/ttm: allow drivers to provide their own manager subclasses This will get removed eventually and all drivers will use this. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-45-airlied@gmail.com commit 01057278bc68610389e32ffe3a8335aff38a84ce Author: Dave Airlie Date: Tue Aug 4 12:56:16 2020 +1000 drm/ttm: rename manager variable to make sure wrapper is used. Other users of this should notice this change and switch to wrapper. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-44-airlied@gmail.com commit 089cafc198ecaa6cf031e3de8377d106e569c767 Author: Dave Airlie Date: Tue Aug 4 12:56:15 2020 +1000 drm/vmwgfx/ttm: use wrapper to access memory manager Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-43-airlied@gmail.com commit 47c0550f5ebd06d714475b9b722b08a6a7ab907b Author: Dave Airlie Date: Tue Aug 4 12:56:14 2020 +1000 drm/radeon/ttm: use wrapper to access memory manager Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-42-airlied@gmail.com commit 3d3b4fb9aab3b718d8d16e621379ea402b7444a1 Author: Dave Airlie Date: Tue Aug 4 12:56:13 2020 +1000 drm/qxl/ttm: use wrapper to access memory manager Reviewed-by: Gerd Hoffmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-41-airlied@gmail.com commit f301da74a417a77b3a8ff96e87c219d5288a939f Author: Dave Airlie Date: Tue Aug 4 12:56:12 2020 +1000 drm/nouveau/ttm: use wrapper to access memory managers Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-40-airlied@gmail.com commit 3004add06d1c99ea36bf6120b9ff9427e301ad95 Author: Dave Airlie Date: Tue Aug 4 12:56:11 2020 +1000 drm/vram-helper: use wrapper to access memory managers Reviewed-by: Thomas Zimmermann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-39-airlied@gmail.com commit 6c28aed6e5b7fa9538ad1a468e3dd5a94ebe5b19 Author: Dave Airlie Date: Tue Aug 4 12:56:10 2020 +1000 drm/amdgfx/ttm: use wrapper to get ttm memory managers Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-38-airlied@gmail.com commit 9eca33f4a13919bb17b8a02809a32f8299f5c9bf Author: Dave Airlie Date: Tue Aug 4 12:56:09 2020 +1000 drm/ttm: add wrapper to get manager from bdev. This will allow different abstractions later. Acked-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-37-airlied@gmail.com commit 0cf0a7984268c64e906b63a96df3e331ca61f989 Author: Dave Airlie Date: Tue Aug 4 12:56:08 2020 +1000 drm/ttm: make TTM responsible for cleaning system only. Drivers should all be cleaning up their memory managers themselves now, so let the core just clean the system one up. Remove the legacy cleaning interface. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-36-airlied@gmail.com commit 085097e5ae5e622358554ef773bccefb416b3df1 Author: Dave Airlie Date: Tue Aug 4 12:56:07 2020 +1000 drm/ttm: remove range manager legacy takedown path Now all drivers have been converted, drop the non-driver path. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-35-airlied@gmail.com commit 6eee6675e01da7f084da70a421e487d4c6092772 Author: Dave Airlie Date: Tue Aug 4 12:56:06 2020 +1000 drm/vmwgfx: fix gmrid takedown paths to new interface Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-34-airlied@gmail.com commit 06feb5df1af54195e4fd67af7d8c6ae789693e4a Author: Dave Airlie Date: Tue Aug 4 12:56:05 2020 +1000 drm/qxl/ttm: use new takedown path Reviewed-by: Gerd Hoffmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-33-airlied@gmail.com commit f0fe3f7bc53c34aad6046c28f1380223c3127bf4 Author: Dave Airlie Date: Tue Aug 4 12:56:04 2020 +1000 drm/radeon/ttm: use new takedown paths Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-32-airlied@gmail.com commit 058b5e34d8e62c12cd5cf56d86b2a2ebf1bcdf33 Author: Dave Airlie Date: Tue Aug 4 12:56:03 2020 +1000 drm/nouveau: use new cleanup paths Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-31-airlied@gmail.com commit cff099e70cc1387f3f291c4a6c265419a9aabb6d Author: Dave Airlie Date: Tue Aug 4 12:56:02 2020 +1000 drm/vram_helper: call explicit mm takedown Reviewed-by: Thomas Zimmermann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-30-airlied@gmail.com commit e0830704de7c06c72b1f83a3f67cb160b853812a Author: Dave Airlie Date: Tue Aug 4 12:56:01 2020 +1000 drm/vmwgfx: takedown vram manager Don't bother returning EBUSY, nobody cares enough, if the driver has a problem, it should deal with it. Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-29-airlied@gmail.com commit 6fe1c54353f926e59f03aaa11c9271aa92fd0982 Author: Dave Airlie Date: Tue Aug 4 12:56:00 2020 +1000 drm/amdgpu/ttm: use new takedown path Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-28-airlied@gmail.com commit 56ee8b1c71ffb556b8758f2d9e3098f4f80b4d01 Author: Dave Airlie Date: Tue Aug 4 12:55:59 2020 +1000 drm/ttm: start allowing drivers to use new takedown path (v2) Allow the takedown path callback to be optional as well. v2: use fini for range manager Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-27-airlied@gmail.com commit 4265accbfc724a68894f91737e765e2cce43fe4e Author: Dave Airlie Date: Tue Aug 4 12:55:58 2020 +1000 drm/ttm: make some inline helper functions for cleanup paths. (v2) The disable path is just temporary for now, it will be dropped once has_type is gone in a later patch. v2: add docs. rename to ttm_mem_type_manager namespace Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-26-airlied@gmail.com commit a006a3ce8efc9e8276d0f0193c04f2efb0e28135 Author: Dave Airlie Date: Tue Aug 4 12:55:57 2020 +1000 drm/ttm: pass man around instead of mem_type in some places This makes it easier to cleanup things Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-25-airlied@gmail.com commit 98399abd52b234b82457ef6c40c41543d806d3b7 Author: Dave Airlie Date: Tue Aug 4 12:55:56 2020 +1000 drm/ttm: purge old manager init path. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-24-airlied@gmail.com commit 5969793f8656e891f9b3d1542b1642536c31f2bc Author: Dave Airlie Date: Tue Aug 4 12:55:55 2020 +1000 drm/ttm: convert system manager init to new code. Remove the exit path, since this can't fail now. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-23-airlied@gmail.com commit 621617780a62ba8b748dc4fe8d72322f983d2689 Author: Dave Airlie Date: Tue Aug 4 12:55:54 2020 +1000 drm/vmwgfx/ttm: switch gmrid allocator to new init paths. Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-22-airlied@gmail.com commit 252f8d7b917464f1f5aa51b3c7ac4867e035389a Author: Dave Airlie Date: Tue Aug 4 12:55:53 2020 +1000 drm/vmwgfx/ttm: convert vram mm init to new code paths Split out the vram thp init path vs the range manager init. Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-21-airlied@gmail.com commit e9172ada44606a8dfaa81be008d3c9a99d766280 Author: Dave Airlie Date: Tue Aug 4 12:55:52 2020 +1000 drm/nouveau: use new memory manager init paths Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-20-airlied@gmail.com commit a9136ab56ba9706aaadb33d1e2175dc80079e091 Author: Dave Airlie Date: Tue Aug 4 12:55:51 2020 +1000 drm/vram_helper: use new ttm manager init function Reviewed-by: Thomas Zimmermann Reviewed-by: Gerd Hoffmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-19-airlied@gmail.com commit 129ac4dcb52001c27d3573ecb361b8e6328c4135 Author: Dave Airlie Date: Tue Aug 4 12:55:50 2020 +1000 drm/qxl/ttm: use new init path for manager Reviewed-by: Gerd Hoffmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-18-airlied@gmail.com commit e33dc18228acdda13ecfe8c57f2a4ded9a825460 Author: Dave Airlie Date: Tue Aug 4 12:55:49 2020 +1000 drm/radeon: use new ttm man init path Use the new common manager init path. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-17-airlied@gmail.com commit 158d20d1857fe58af6cfa8163b37f90e999c948e Author: Dave Airlie Date: Tue Aug 4 12:55:48 2020 +1000 drm/amdgpu/ttm: init managers from the driver side. Use new init calls to unwrap manager init Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-16-airlied@gmail.com commit 3c90424bd7df15eb062ae9e6518886a706ed0d84 Author: Dave Airlie Date: Tue Aug 4 12:55:47 2020 +1000 drm/ttm: provide a driver-led init path for range mm manager. (v2) This lets the generic range mm manager be initialised by the driver. v2: add docs. rename api to range_man_init for now. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-15-airlied@gmail.com commit 747074bb04b5a6be8e562d06b5a312d6ddb253d0 Author: Dave Airlie Date: Tue Aug 4 12:55:46 2020 +1000 drm/ttm: split the mm manager init code (v2) This will allow the driver to control the ordering here better. Eventually the old path will be removed. v2: add docs for new APIs. rename new path to ttm_mem_type_manager_init/set_used(for now) Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-14-airlied@gmail.com commit e22054debc079ed1c9db7561b8efda43a078fbe0 Author: Dave Airlie Date: Tue Aug 4 12:55:45 2020 +1000 drm/vram-helper: call the ttm manager debug function This code was assuming there was a drm_mm here, don't do that call the correct API. v2: use the new exported interface. Reviewed-by: Thomas Zimmermann Reviewed-by: Gerd Hoffmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-13-airlied@gmail.com commit 00c2f6b3e8414ebea45f994dd81166a16670d231 Author: Dave Airlie Date: Tue Aug 4 12:55:44 2020 +1000 drm/qxl/ttm: call ttm manager debug (v2) v2: use the new exported interface. This code was poking inside a struct and assuming it was a drm_mm at the start. Call the proper API. Reviewed-by: Gerd Hoffmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-12-airlied@gmail.com commit a0bb77cb77e290c3d5862435a36ee9ea92cc3be1 Author: Dave Airlie Date: Tue Aug 4 12:55:43 2020 +1000 drm/vmwgfx/gmrid: don't provide pointless ttm debug callback Acked-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-11-airlied@gmail.com commit ed165d452c2b897a70bf5a20697fa80cdbc2c151 Author: Dave Airlie Date: Tue Aug 4 12:55:42 2020 +1000 drm/nouveau/ttm: don't fill in blank ttm debug callback Acked-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-10-airlied@gmail.com commit a2ff1e81d04eb938a670bce206de2963d98950d8 Author: Dave Airlie Date: Tue Aug 4 12:55:41 2020 +1000 drm/ttm: export memory type debug entrypoint. As suggested on review, just export the memory type debug for drivers to use, while also making the debug callback optional (don't need to test for system as it won't init it). rename it to be more consistent with object name for now. (we may rename all the objects later.) Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-9-airlied@gmail.com commit 5977ffeaf33c7239dd0cc6c8fb4c0dc68aa591d5 Author: Dave Airlie Date: Tue Aug 4 12:55:40 2020 +1000 drm/vram-helper: remove populate/unpopulate The default path for populate/unpopulate is already this. Reviewed-by: Thomas Zimmermann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-8-airlied@gmail.com commit 20784cdf4b8c81359289aff73a89f557c7bc9e76 Author: Dave Airlie Date: Tue Aug 4 12:55:39 2020 +1000 drm/ttm: use a helper for unlocked moves to the lru tail The pattern was repeated a few times, just make an inline for it. Reviewed-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-7-airlied@gmail.com commit 46bca88bbdd3046db31b8b7e053a909ae79e285b Author: Dave Airlie Date: Tue Aug 4 12:55:38 2020 +1000 drm/ttm/amdgpu: consolidate ttm reserve paths Drop the WARN_ON and consolidate the two paths into one. Use the consolidate slowpath in the execbuf utils code. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-6-airlied@gmail.com commit 9c4cbb3a66e05270caaec7bea8fd5c04a47e42ac Author: Dave Airlie Date: Tue Aug 4 12:55:37 2020 +1000 qxl/ttm: drop the unusued no wait flag to reserve function Reviewed-by: Gerd Hoffmann Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-5-airlied@gmail.com commit bd549d35b4be065c10fbff13256c96877a4f8fac Author: Dave Airlie Date: Tue Aug 4 12:55:36 2020 +1000 nouveau: use ttm populate mapping functions. (v2) Instead of rolling driver copies of them. v2: cleanup return handling (Ben) Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-4-airlied@gmail.com commit a2d6ddc417f14570795eaf191f24ebdeb4084995 Author: Dave Airlie Date: Tue Aug 4 12:55:35 2020 +1000 drm/vmwgfx: drop bo map/unmap dma functions. The map one was used once, just inline it, and drop them both. Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-3-airlied@gmail.com commit 56dc01f18d3d002de34f642ce92f730e5d50efa5 Author: Dave Airlie Date: Tue Aug 4 12:55:34 2020 +1000 drm/vmwgfx: consolidate ttm object creation and populate These two functions has the same code in them, create a common helper function instead. Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-2-airlied@gmail.com commit 8e1ba47c60bcd325fdd097cd76054639155e5d2e Author: Tom Rix Date: Mon Jul 20 12:18:45 2020 -0700 video: fbdev: pvr2fb: initialize variables clang static analysis reports this repesentative error pvr2fb.c:1049:2: warning: 1st function call argument is an uninitialized value [core.CallAndMessage] if (*cable_arg) ^~~~~~~~~~~~~~~ Problem is that cable_arg depends on the input loop to set the cable_arg[0]. If it does not, then some random value from the stack is used. A similar problem exists for output_arg. So initialize cable_arg and output_arg. Signed-off-by: Tom Rix Acked-by: Arnd Bergmann Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200720191845.20115-1-trix@redhat.com commit d3dc135187b92e06019bf504739a8b527a53e740 Author: Thomas Zimmermann Date: Tue Aug 4 08:51:58 2020 +0200 drm/mgag200: Set PCI option register in G200SE models The initial value of the PCI option register got lost while refactoring the driver init code. Restore the setting. Signed-off-by: Thomas Zimmermann Reviewed-by: Dave Airlie Reported-by: kernel test robot Fixes: 2021708e0d6e ("drm/mgag200: Initialize PCI registers early during device setup") Cc: Lyude Paul Cc: Dave Airlie Cc: Sam Ravnborg Cc: Daniel Vetter Cc: Gerd Hoffmann Cc: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200804065158.21049-1-tzimmermann@suse.de commit cc9fc1b1444f12addc1cf6aa6e653426990f1ad2 Author: Rikard Falkeborn Date: Tue Aug 4 22:06:55 2020 +0200 drm/amd/display: Constify dcn30_res_pool_funcs The only usage of dcn30_res_pool_funcs is to assign its address to a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Alex Deucher commit ea22cc3353eda4b275d394c2369c8ffa87753165 Author: Rikard Falkeborn Date: Tue Aug 4 22:06:54 2020 +0200 drm/amd/display: Constify dcn21_res_pool_funcs The only usage of dcn21_res_pool_funcs is to assign its address to a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Alex Deucher commit 25457a1fb76448875013625fdc10ed4e941585b4 Author: Rikard Falkeborn Date: Tue Aug 4 22:06:53 2020 +0200 drm/amd/display: Constify dcn20_res_pool_funcs The only usage of dcn20_res_pool_funcs is to assign its address to a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Alex Deucher commit 34b0c7795bb4a618a7372547c6628ed8876d02a7 Author: Dan Carpenter Date: Mon Aug 3 17:35:19 2020 +0300 drm/amd/display: Indent an if statement The if statement wasn't indented so it's confusing. Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 87ded5caeec3c61327e133baba1bce691ecd2ded Author: Alex Deucher Date: Wed Jul 29 13:14:17 2020 -0400 drm/amdgpu: move vram usage by vbios to mman (v2) It's related to the memory manager so move it there. v2: inline the structure Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 72de33f8f7ba0f43a3117efbee6d08226ac31ecb Author: Alex Deucher Date: Wed Jul 29 13:02:25 2020 -0400 drm/amdgpu: move IP discovery data to mman It's related to the memory manager so move it there. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit cacbbe7c00655985aec37e5e4d02c66d7a1732c9 Author: Alex Deucher Date: Wed Jul 29 12:53:56 2020 -0400 drm/amdgpu: move stolen memory from gmc to mman It's more related to memory management than memory controller. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 7438ae6e522f1c4df5f067fd82aaa4e82917b7a8 Author: Alex Deucher Date: Tue Jul 28 15:35:56 2020 -0400 drm/amdgpu/gmc: disable keep_stolen_vga_memory on arcturus I suspect the only reason this was set was to avoid touching the display related registers on arcturus. Someone should double check this on arcturus with S3. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 14b18937cb60a4970c52cd954a643ed9c09d2eaf Author: Alex Deucher Date: Tue Jul 28 18:34:50 2020 -0400 drm/amdgpu: drop the CPU pointers for the stolen vga bos We never use them. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 7348c20a4e12e8f6ccf63a3deaae898bd72cd2e9 Author: Alex Deucher Date: Tue Jul 28 18:30:14 2020 -0400 drm/amdgpu/gmc10: switch to using amdgpu_gmc_get_vbios_allocations The new helper centralizes the logic in one place. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 7b885f0eb4a5185c0ca73d9f82514a611e5e6258 Author: Alex Deucher Date: Tue Jul 28 18:29:55 2020 -0400 drm/amdgpu/gmc9: switch to using amdgpu_gmc_get_vbios_allocations The new helper centralizes the logic in one place. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3853626d2cf3eca3397bc5ffbd4bf2bf0f6eff8c Author: Alex Deucher Date: Tue Jul 28 18:29:39 2020 -0400 drm/amdgpu/gmc8: switch to using amdgpu_gmc_get_vbios_allocations The new helper centralizes the logic in one place. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 71755699b564bf9b03a0d036ca94164c3b5691c0 Author: Alex Deucher Date: Tue Jul 28 18:29:20 2020 -0400 drm/amdgpu/gmc7: switch to using amdgpu_gmc_get_vbios_allocations The new helper centralizes the logic in one place. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 422fe8d27dcf180caf1e3755b9bf7c1b4de5f56a Author: Alex Deucher Date: Tue Jul 28 18:27:46 2020 -0400 drm/amdgpu/gmc6: switch to using amdgpu_gmc_get_vbios_allocations The new helper centralizes the logic in one place. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit dd285c5df9523117e9941f9d3c56d7ed73c4ed4d Author: Alex Deucher Date: Tue Jul 28 15:04:52 2020 -0400 drm/amdgpu/gmc: add new helper to get the FB size used by pre-OS console This adds a new gmc callback to get the size reserved by the pre-OS console and provides a helper function for use by gmc IP drivers. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0635019412eb2db60fb1d34be8ed8225a0c70bd9 Author: Alex Deucher Date: Tue Jul 28 18:05:11 2020 -0400 drm/amdgpu: add support for extended stolen vga memory This will allow us to split the allocation for systems where we have to keep the stolen memory around to avoid S3 issues. This way we don't waste as much memory and still avoid any screen artifacts during the bios to driver transition. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5db62dc8d4f35dc11054f24ba2c86f6c3422918a Author: Alex Deucher Date: Tue Jul 28 17:55:30 2020 -0400 drm/amdgpu: move keep stolen memory check into gmc core Rather than leaving this as a gmc v9 specific hack. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit fcbc92e2e1c38b3626aa871caa5124d5341f85bf Author: Alex Deucher Date: Tue Jul 28 17:46:00 2020 -0400 drm/amdgpu: move stolen vga bo from amdgpu to amdgpu.gmc Since that is where we store the other data related to the stolen vga memory. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 81b54fb7a2c038e8eaae7036ad973e913463c34d Author: Alex Deucher Date: Tue Jul 28 14:10:46 2020 -0400 drm/amdgpu: use a define for the memory size of the vga emulator Rather than open coding it everywhere. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit adb5be812251cbcae364e5016ad71c955faedbd8 Author: Alex Deucher Date: Tue Jul 28 13:57:20 2020 -0400 drm/amdgpu: use create_at for the stolen pre-OS buffer Should be functionally the same since nothing else is allocated at that point, but let's be exact. Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 37912e963dadcc831dd2a766780ff0b8738773d8 Author: Alex Deucher Date: Tue Jul 28 17:38:29 2020 -0400 drm/amdgpu: handle bo size 0 in amdgpu_bo_create_kernel_at (v2) Just return early to match other bo_create functions. v2: check if the bo_ptr is NULL rather than checking the size. Reviewed-by: Christian König Reviewed-by: Felix Kuehling (v1) Signed-off-by: Alex Deucher commit 66f3db4ba62db74d0f6c5a0f872592f1a0ed7670 Author: Alex Deucher Date: Thu Jul 30 15:21:33 2020 -0400 drm/amdgpu/smu: rework i2c adpater registration The i2c init/fini functions just register the i2c adapter. There is no need to call them during hw init/fini. They only need to be called once per driver init/fini. The previous behavior broke runtime pm because we unregistered the i2c adapter during suspend. Tested-by: Tom St Denis Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit c4dfb54986fd79ac992c56c5a31af9469d60d5cf Author: Aric Cyr Date: Mon Jul 27 10:53:38 2020 -0400 drm/amd/display: 3.2.97 Signed-off-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit ded750e6faaf965f7b07f8468488381dcb790c9c Author: Anthony Koo Date: Fri Jul 24 21:37:56 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.27 | [Header Changes] | - Reworked the FW versioning to include hotfix | and test bits Signed-off-by: Anthony Koo Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 4453fbec106b5ab69389bf48a27af228a8434b97 Author: Alvin Lee Date: Wed Jul 22 00:32:14 2020 -0400 drm/amd/display: Separate pipe disconnect from rest of progrmaming [Why] When changing pixel formats for HDR (e.g. ARGB -> FP16) there are configurations that change from 2 pipes to 1 pipe. In these cases, it seems that disconnecting MPCC and doing a surface update at the same time(after unlocking) causes some registers to be updated slightly faster than others after unlocking (e.g. if the pixel format is updated to FP16 before the new surface address is programmed, we get corruption on the screen because the pixel formats aren't matching). We separate disconnecting MPCC from the rest of the pipe programming sequence to prevent this. [How] Move MPCC disconnect into separate operation than the rest of the pipe programming. Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 3d4e52d0cf24b424c668fa8ab1269725796d4ec4 Author: Victor Lu Date: Tue Jul 21 12:08:34 2020 -0400 drm/amd/display: Add debugfs for forcing stream timing sync [why] There's currently no method to enable multi-stream synchronization from userspace and we don't check the VSDB bits to know whether or not specific displays should have the feature enable. [how] Add a debugfs entry that controls a new DM debug option, "force_timing_sync". This debug option will set on any newly created stream following the change to the debug option. Expose a new interface from DC that performs the timing sync and a helper to the "force_timing_sync" debugfs that iterates over the current streams and modifies the current synchornization state and grouping. Example usage to force a resync (from an X based desktop): echo 1 > /sys/kernel/debug/dri/0/amdgpu_dm_force_timing_sync xset dpms force off && xset dpms force on Signed-off-by: Victor Lu Reviewed-by: Aurabindo Jayamohanan Pillai Acked-by: Aurabindo Pillai Acked-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit da83b385f3eba1d695bc8014d8a5c0a791188c16 Author: Igor Kravchenko Date: Fri Jul 24 11:10:40 2020 -0400 drm/amd/display: Display goes blank after inst [why] Display goes blank after driver installation. Aux tuning parameters must be used for 2.x only. Wrong dc_golden_table offset was used. [How] Implement a new enc3_hw_init function without VBIOS constants usage to be called for 3.x Calculate dc_golden_table offset using sum of base dce_info offset and golden table offset Signed-off-by: Igor Kravchenko Reviewed-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 0914d1154f0ff03944d485f610efa3158aee4a06 Author: George Shen Date: Fri Jul 17 13:19:27 2020 -0400 drm/amd/display: Change null plane state swizzle mode to 4kb_s [Why] During SetPathMode and UpdatePlanes, the plane state can be null. We default to linear swizzle mode when plane state is null. This resulted in bandwidth validation failing when trying to set 8K60 mode (which previously passed validation during rebuild timing list). [How] Change the default swizzle mode from linear to 4kb_s and update pitch accordingly. Signed-off-by: George Shen Reviewed-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 519d91d87f2e19727de772402ac0977633bbd13a Author: JinZe.Xu Date: Tue Jul 21 17:52:41 2020 +0800 drm/amd/display: Use helper function to check for HDMI signal [How] Use dc_is_hdmi_signal to determine signal type. Signed-off-by: JinZe.Xu Reviewed-by: Charlene Liu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit d024656757dc07e9f77d1eed854ce8f885f11856 Author: Aric Cyr Date: Thu Jul 23 13:06:23 2020 -0400 drm/amd/display: AMD OUI (DPCD 0x00300) skipped on some sink [Why] Sink OUI supported cap is not set so driver skips programming it. [How] Revert the change the skips OUI programming if the cap is not set Signed-off-by: Aric Cyr Reviewed-by: Anthony Koo Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 87353ae837c30c68b89b0d88005fefabe087859d Author: Eryk Brol Date: Fri Jun 19 14:07:03 2020 -0400 drm/amd/display: Comments on how to use DSC debugfs some entries [why] Some of the DSC debugfs read enteries are missing comments explaining how to use and how to comprehend the results. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Mikita Lipski Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 06ff02fc1e14f9503340b1a140dde95eeaa000fe Author: Harry Wentland Date: Tue Jun 30 11:16:05 2020 -0400 drm/amd/display: Fix logger context [Why&How] use correct logger context Signed-off-by: Harry Wentland Reviewed-by: Roman Li Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 5268bf136ef08c6a30d132036de3092d8219da8c Author: Eryk Brol Date: Fri Jun 19 14:02:38 2020 -0400 drm/amd/display: DSC Bit target rate debugfs write entry [Why] We need to be able to specify bits per pixel for DSC on any connector. [How] Overwrite computed DSC target rate in dsc_cfg, with requested value. Overwrites for both SST and MST connectors, but in different places, but the process is identical. Overwrites only if DSC is decided to be enabled on that connector. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Mikita Lipski Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit a245528c598dc80fe909a5ea77372d071fd3a111 Author: Dmytro Laktyushkin Date: Fri Jun 26 14:30:29 2020 -0400 drm/amd/display: populate new dml variable Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 6224220dc778e6e7b2139f6f29803d6dbdc33d95 Author: Igor Kravchenko Date: Sun Jul 19 20:45:28 2020 -0400 drm/amd/display: Read VBIOS Golden Settings Tbl [Why] For ver.4.4 and higher VBIOS contains default setting table. {How] Read Golden Settings Table from VBIOS, apply Aux tuning parameters. Signed-off-by: Igor Kravchenko Reviewed-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 1174eb89ccf54166a0cbbef86e6044811320a754 Author: Eric Bernstein Date: Mon Jul 20 19:18:43 2020 -0400 drm/amd/display: Use parameter for call to set output mux Signed-off-by: Eric Bernstein Reviewed-by: Chris Park Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit d8a8258ec1a2b8d99bdc67d03fe62ca5cec98a14 Author: Eric Bernstein Date: Mon Jul 20 16:10:22 2020 -0400 drm/amd/display: Update virtual stream encoder Signed-off-by: Eric Bernstein Reviewed-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 734e4c97ab05db4157244284510a9fa45a9e889a Author: Eryk Brol Date: Wed Jun 17 15:28:04 2020 -0400 drm/amd/display: DSC Slice height debugfs write entry [Why] We need to be able to specify slice height for any connector's DSC [How] Overwrite computed parameters in dsc_cfg, with the value needed/ Overwrites for both SST and MST connectors, but in different places, but the process is identical. Overwrites only if DSC is decided to be enabled on that connector. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Mikita Lipski Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 4bfb74282f064f738abb22734a675326f41c230c Author: John Clements Date: Mon Aug 3 15:52:52 2020 +0800 drm/amdgpu: added RAS EEPROM device support check updated RAS EEPROM init/threshold sequences to check for device support Reviewed-by: Guchun Chen Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 0ad7a64d69cdbe520d0df80d100cd6b891cc12fb Author: John Clements Date: Mon Aug 3 14:24:50 2020 +0800 drm/amdgpu: enable RAS support for sienna cichlid enabled GECC error injection and query support Reviewed-by: Guchun Chen Signed-off-by: John Clements Signed-off-by: Alex Deucher commit a300de40f66b87fa90703c94ffb22917f98eb902 Author: Monk Liu Date: Mon Jul 27 15:20:12 2020 +0800 drm/amdgpu: introduce a new parameter to configure how many KCQ we want(v5) what: the MQD's save and restore of KCQ (kernel compute queue) cost lots of clocks during world switch which impacts a lot to multi-VF performance how: introduce a paramter to control the number of KCQ to avoid performance drop if there is no kernel compute queue needed notes: this paramter only affects gfx 8/9/10 v2: refine namings v3: choose queues for each ring to that try best to cross pipes evenly. v4: fix indentation some cleanupsin the gfx_compute_queue_acquire() v5: further fix on indentations more cleanupsin gfx_compute_queue_acquire() TODO: in the future we will let hypervisor driver to set this paramter automatically thus no need for user to configure it through modprobe in virtual machine Signed-off-by: Monk Liu Reviewed-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher commit 9b856defbe355f886f99777e667506841bd267a8 Author: Guchun Chen Date: Mon Jul 27 15:51:05 2020 +0800 drm/amdgpu: update eeprom once specifying one bigger threshold(v3) During driver's probe, when it hits bad gpu tag in eeprom i2c init calling(the tag was set when reported bad page reaches bad page threshold in last driver's working loop), there are some strategys to deal with the cases: 1. when the module parameter amdgpu_bad_page_threshold = 0, that means page retirement feature is disabled, so just resetting the eeprom is fine. 2. When amdgpu_bad_page_threshold is not 0, and moreover, user sets one bigger valid data in order to make current boot up succeeds, correct eeprom header tag and do not break booting. 3. For other cases, driver's probe will be broken. v2: Just update eeprom header tag instead of resetting the whole table header when user sets one bigger threshold data. v3: Use dev_info/dev_err to print PCI device information, which helps in mGPU case. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit a219ecbb83859940bd1959180bd555f28f2043a7 Author: Guchun Chen Date: Mon Jul 27 14:56:27 2020 +0800 drm/amdgpu: disable page reservation when amdgpu_bad_page_threshold = 0 When amdgpu_bad_page_threshold = 0, bad page reservation stuffs are skipped in either UMC ECC irq or page retirement calling of sync flood isr. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f848159b570ecdcd157ad5b52eb58e5cb3a075a7 Author: Guchun Chen Date: Fri Jul 31 15:06:32 2020 +0800 drm/amdgpu: decouple sysfs creating of bad page node Bad page information should not be exposed by sysfs when bad page retirement is disabled, so decouple it from ras sysfs group creating, and add one guard before creating. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit eb0c3cd48f5f27abf3ba92bd142b71ef76229706 Author: Guchun Chen Date: Fri Jul 31 14:39:57 2020 +0800 drm/amdgpu: add one definition for RAS's sysfs/debugfs name(v2) Add one definition for the RAS module's FS name. It's used in both debugfs and sysfs cases. v2: Use static variable instead of macro definition. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit bf0b91b78f002faa1be1902a75eeb0797f9fbcf3 Author: Guchun Chen Date: Wed Jul 22 10:37:01 2020 +0800 drm/amdgpu: restore ras flags when user resets eeprom(v2) RAS flags needs to be cleaned as well when user requires one clean eeprom. v2: RAS flags shall be restored after eeprom reset succeeds. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e8fbaf03429d085b05e66b153a8363b746c94b43 Author: Guchun Chen Date: Thu Jul 23 16:20:02 2020 +0800 drm/amdgpu: break GPU recovery once it's in bad state(v4) When GPU executes recovery and retriving bad GPU tag from external eerpom device, the recovery will be broken and error message is printed as well for user's awareness. v2: Refine warning message in threshold reaching case, and fix spelling typo. v3: Fix explicit calling of bad gpu. v4: Rename function names. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9c06f91ff2349da67651cddf88507aa967b58b08 Author: Guchun Chen Date: Thu Jul 23 16:05:00 2020 +0800 drm/amdgpu: schedule ras recovery when reaching bad page threshold(v2) Once the bad page saved to eeprom reaches the configured threshold, ras recovery will be issued to notify user. v2: Fix spelling typo. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 35cd2cdadbccf08e9b4d5a8fca4914dc37ab48e0 Author: Guchun Chen Date: Thu Jul 23 15:50:42 2020 +0800 drm/amdgpu: skip bad page reservation once issuing from eeprom write Once the ras recovery is issued from eeprom write itself, bad page reservation should be ignored, otherwise, recursive calling of writting to eeprom would happen. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b82e65a93510465cb4c203c938245f137a4e95dc Author: Guchun Chen Date: Thu Jul 23 15:42:19 2020 +0800 drm/amdgpu: break driver init process when it's bad GPU(v5) When retrieving bad gpu tag from eeprom, GPU init should fail as the GPU needs to be retired for further check. v2: Fix spelling typo, correct the condition to detect bad gpu tag and refine error message. v3: Refine function argument name. v4: Fix missing check of returning value of i2c initialization error case. v5: Use dev_err to print PCI information in dmesg instead of DRM_ERROR. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1d6a9d122d2c7817ad1bae0e59c8a29450c2b14d Author: Guchun Chen Date: Thu Jul 23 15:35:53 2020 +0800 drm/amdgpu: add bad gpu tag definition This tag will be hired for bad gpu detection in eeprom's access. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c84d46707ebbfc303268e27d5aeb8bb4e6d5b1ff Author: Guchun Chen Date: Wed Jul 22 10:00:27 2020 +0800 drm/amdgpu: validate bad page threshold in ras(v3) Bad page threshold value should be valid in the range between -1 and max records length of eeprom. It could determine when saved bad pages exceed threshold value, and proceed corresponding actions. v2: When using the default typical value, it should be min value between typical value and eeprom max records length. v3: drop the case of setting bad_page_cnt_threshold to be 0xFFFFFFFF, as it confuses user. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit acc0204cdb8e60d2e57053ed766d8280eb01118b Author: Guchun Chen Date: Tue Jul 21 18:02:00 2020 +0800 drm/amdgpu: add bad page count threshold in module parameter(v3) bad_page_threshold could be configured to enable/disable the associated bad page retirement feature in RAS. When it's -1, ras will use typical bad page failure value to handle bad page retirement. When it's 0, disable bad page retirement, and no bad page will be recorded and saved. For other valid value, driver will use this manual value as the threshold value of totoal bad pages. v2: correct documentation of this parameter. v3: remove confused statement in documentation. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 522ec6e0eed0ab0678e7d5b5bf00487dfe83f7ce Author: Mukul Joshi Date: Thu Jul 30 18:04:33 2020 -0400 drm/amdkfd: Replace bitmask with event idx in SMI event msg Event bitmask is a 64-bit mask with only 1 bit set. Sending this event bitmask in KFD SMI event message is both wasteful of memory and potentially limiting to only 64 events. Instead send event index in SMI event message. Please note this change does not break the ABI for the two event types defined so far. The new index is identical to the mask used before. Signed-off-by: Mukul Joshi Suggested-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ad04fae0de07580359b7ab3e19a678a775fdf07f Author: Gustavo A. R. Silva Date: Tue Jul 7 16:05:39 2020 -0500 fbdev: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200707210539.GA12530@embeddedor commit 85806f6d58f4db8aa398833ce46fedcd82ab58a1 Author: Linus Walleij Date: Mon Jul 6 14:59:31 2020 +0200 omapfb/dss: Include the right header The hdmi4.c and hdmi5.c files include the legacy GPIO header but does not use any of the symbols from this file. What it does use is the implicit inclusion of leading to compile errors if we just drop this include. Include the right header. Cc: Tony Lindgren Signed-off-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200706125931.752539-1-linus.walleij@linaro.org commit 2d05f56af8f52d52dc614ddf4d51c00ea5afb67f Author: Thomas Zimmermann Date: Wed Jul 29 15:41:44 2020 +0200 fbdev: Remove trailing whitespace Removes trailing whitespaces in several places. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200729134148.6855-2-tzimmermann@suse.de commit e20dfd27f7aa257ce01992540a36bc4e818f8452 Author: Thomas Zimmermann Date: Thu Jul 30 12:28:44 2020 +0200 drm/mgag200: Add support for G200 desktop cards This patch adds support for G200 desktop cards. We can reuse the whole memory and modesetting code. A few PCI and DAC register values have to be updated accordingly. The most significant change is in the PLL setup. The driver parses the device's BIOS to retrieve clock limits and reference clocks. With no BIOS found, safe defaults are being used. v2: * copy BIOS ROM to system memory and access with regular load/store; resolves potential HW limitations * fix some stray whitespaces Signed-off-by: Thomas Zimmermann Co-developed-by: Egbert Eich Signed-off-by: Egbert Eich Co-developed-by: Takashi Iwai Signed-off-by: Takashi Iwai Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-9-tzimmermann@suse.de commit fb18825fa0380b7ee913925996b2d3477d57628c Author: Thomas Zimmermann Date: Thu Jul 30 12:28:43 2020 +0200 drm/mgag200: Move G200SE's unique id into model-specific data The unique revision id is only useful for G200SE devices. Store the value in model-specific data within struct mga_device. While at it, the patch also adds an init helper for the value. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-8-tzimmermann@suse.de commit 9053cad2f0935d3614b49926de571c677fa38528 Author: Thomas Zimmermann Date: Thu Jul 30 12:28:42 2020 +0200 drm/mgag200: Clear field during MM init The modesetting code initialized the memory-related register CRTCEXT4. Move this code to MM initialization. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-7-tzimmermann@suse.de commit b9fa77ec1a59f71b0a9b79954ce2429dee434e57 Author: Thomas Zimmermann Date: Thu Jul 30 12:28:41 2020 +0200 drm/mgag200: Set MISC memory flags in mm init code The modesetting code initialized several memory-related flags in the MISC register. Move this code to MM initialization. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-6-tzimmermann@suse.de commit 78e5b5036a1ebcb937452a72364d77538ad6e41f Author: Thomas Zimmermann Date: Thu Jul 30 12:28:40 2020 +0200 drm/mgag200: Enable MGA mode during device register initialization MGA cards can run in traditional VGA mode or an enhanced MGA mode; with the latter being required for KMS. So far, MGA mode was enabled during modesetting. As it's fundamental for device operation, the patch moves it next to the device register setup. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-5-tzimmermann@suse.de commit 2021708e0d6eed7b5a8bd11071ae1ac40df6c060 Author: Thomas Zimmermann Date: Thu Jul 30 12:28:39 2020 +0200 drm/mgag200: Initialize PCI registers early during device setup So far, PCI option registers were initialized as part of modesetting, which is late in the process. As these registers control fundamental operation, they should be set early. The patch moves the PCI option handling into device register setup, before even the device MMIO memory is being mapped. No functional changes made. Moving the PCI code next to the device-register setup also allows to remove the has_sdram field from struct mga_device. The state is now local to the init helper. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-4-tzimmermann@suse.de commit 42452165dc7777e144f8a8550f5fcf484597715d Author: Thomas Zimmermann Date: Thu Jul 30 12:28:38 2020 +0200 drm/mgag200: Move register initialization into helper function The mgag200 driver maps registers into the address space. Move the code into a separate helper function. No functional changes. One small difference is in the handling of SDRAM/SGRAM. MGA devices can come with either SDRAM or SGRAM. So far, the driver checked for SDRAM, which is the common case. The patch moves this code into a separate helper and checks for SGRAM, which is the special case. The test itself is the same as before. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-3-tzimmermann@suse.de commit 0b34d58b6c321a30b5a97ec6c9a71e6f472827d2 Author: Thomas Zimmermann Date: Thu Jul 30 12:28:37 2020 +0200 drm/mgag200: Enable caching for SHMEM pages SHMEM pages use write-combine caching by default, but can also use the platform's default page caching. Doing so may improve the performance of I/O on the framebuffer. Mgag200's hardware does not access framebuffer pages directly (i.e., via DMA), so enabling caching does not have an effect on consistency of the framebuffer memory or the displayed data. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-2-tzimmermann@suse.de commit cff0adca1edd6eb2bc6116e4d83e442f372cca64 Author: Thomas Zimmermann Date: Thu Jul 30 15:52:06 2020 +0200 drm/ast: Managed device release This turns the ast's device cleanup code into a managed release helper function. Note that the code uses devres helpers. The release function switches the device back to VGA mode and therefore runs during HW device cleanup; not at DRM device cleanup. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-10-tzimmermann@suse.de commit 4bc85b82c8ba5cfad6d750748d36e2b852fad80d Author: Thomas Zimmermann Date: Thu Jul 30 15:52:05 2020 +0200 drm/ast: Manage release of firmware backup memory The ast driver keeps a backup copy of the DP501 encoder's firmware. This patch adds managed release of the allocated memory. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-9-tzimmermann@suse.de commit 2c0b6566d621227ca5716d799e1b3c37e525a31d Author: Thomas Zimmermann Date: Thu Jul 30 15:52:04 2020 +0200 drm/ast: Managed release of ast firmware The ast driver loads firmware for the DP501 display encoder. The patch replaces the removal code with a managed release function. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-8-tzimmermann@suse.de commit e0f5a738cfe572bed3deb08fab0b5273b9535b74 Author: Thomas Zimmermann Date: Thu Jul 30 15:52:03 2020 +0200 drm/ast: Embed struct drm_device in struct ast_private Turns struct ast_private into a subclass of struct drm_device by embedding the latter. This allows for using DRM's managed device allocation. The use of struct drm_device.dev_private is deprecated. The patch converts the last remaining users to to_ast_private(). Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-7-tzimmermann@suse.de commit 21d79b690e78a0e6885a6cd70fcee4a5beeda356 Author: Thomas Zimmermann Date: Thu Jul 30 15:52:02 2020 +0200 drm/ast: Don't use ast->dev if dev is available Several places in ast use ast->dev, when a dev pointer is already available within the function. Remove the extra indirection. No functional changes made. This is just a small cleanup before embedding the DRM device instance in struct ast_private. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-6-tzimmermann@suse.de commit 365c0e70da83a52c15feb8871ba5fea2617205c6 Author: Thomas Zimmermann Date: Thu Jul 30 15:52:01 2020 +0200 drm/ast: Replace struct_drm_device.dev_private with to_ast_private() The ast code still references dev_private in several place when looking up the ast device structure. Convert the remaining locations to use to_ast_private(). Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-5-tzimmermann@suse.de commit fbe01716ed4a93ff90a289c2b75313319bf08573 Author: Thomas Zimmermann Date: Thu Jul 30 15:52:00 2020 +0200 drm/ast: Replace driver load/unload functions with device create/destroy The ast driver's load and unload functions are left-overs from when struct drm_driver.load/unload was still in use. The PCI probe helper allocated the DRM device and ran load to initialize it. This patch replaces this code with device create and destroy. The main difference is that the device's create function allocates the DRM device and ast structures in the same place. This will be required for switching ast to managed allocations. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-4-tzimmermann@suse.de commit d50ace1e72f05708cc5dbc89b9bbb9873f150092 Author: Thomas Zimmermann Date: Thu Jul 30 15:51:59 2020 +0200 drm/ast: Separate DRM driver from PCI code Putting the DRM driver to the top of the file and the PCI code to the bottom makes ast_drv.c more readable. While at it, the patch prefixes file-scope variables with ast_. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-3-tzimmermann@suse.de commit 6a470dc2a12e99608706de030c92732f166d0dc1 Author: Thomas Zimmermann Date: Thu Jul 30 15:51:58 2020 +0200 drm/ast: Embed CRTC and connector in struct ast_private Only single instances of CRTC and connector are supported per device. Embed both in ast's structure and remove the individual memory allocations. DRM's CRTC cleanup helpers replace the rsp. destroy function in ast. While at it, also convert to_ast_connector() to a function. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200730135206.30239-2-tzimmermann@suse.de commit 3b799254cf6f481460719023d7a18f46651e5e7f Author: Samuel Holland Date: Sat Aug 1 11:29:56 2020 -0500 Bluetooth: hci_uart: Cancel init work before unregistering If hci_uart_tty_close() or hci_uart_unregister_device() is called while hu->init_ready is scheduled, hci_register_dev() could be called after the hci_uart is torn down. Avoid this by ensuring the work is complete or canceled before checking the HCI_UART_REGISTERED flag. Fixes: 9f2aee848fe6 ("Bluetooth: Add delayed init sequence support for UART controllers") Signed-off-by: Samuel Holland Signed-off-by: Marcel Holtmann commit b5f628a20af9044a9951310918732d1e6d83b476 Author: Samuel Holland Date: Sat Aug 1 11:29:55 2020 -0500 Bluetooth: hci_h5: Remove ignored flag HCI_UART_RESET_ON_INIT Since commit cba736465e5c ("Bluetooth: hci_serdev: Remove setting of HCI_QUIRK_RESET_ON_CLOSE."), this flag is ignored for hci_serdev users, so let's remove setting it. Signed-off-by: Samuel Holland Signed-off-by: Marcel Holtmann commit 7cfc21e9b5f152a42c924cdadb238c5f5b3e2a7a Author: Tamás Szűcs Date: Sun Aug 2 16:56:42 2020 +0200 Bluetooth: btmrvl: eliminate duplicates introducing btmrvl_reg_89xx SD89xx devices use identical card register settings. Make sure a single common instance is used to describe them. Signed-off-by: Tamás Szűcs Signed-off-by: Marcel Holtmann commit 70eca5d5d3e1a8139df918fe104dc63a37554789 Author: Daniel Vetter Date: Sat Aug 1 11:26:25 2020 +0200 drm/syncobj: Tune down unordered timeline DRM_ERROR Userspace can provoke this, we generally don't allow userspace to spam dmesg. Tune it down to debug. Unfortunately we don't have easy access to the drm_device here (not at all without changing a few things), so leave it as old style dmesg output for now. References: https://patchwork.freedesktop.org/series/80146/ Acked-by: Lionel Landwerlin Signed-off-by: Daniel Vetter Cc: Chris Wilson Cc: Lionel Landwerlin Cc: "Christian König" Link: https://patchwork.freedesktop.org/patch/msgid/20200801092625.1107609-1-daniel.vetter@ffwll.ch commit 0986191186128b10b6bbfa5220fc587ed5725e49 Author: Melissa Wen Date: Thu Jul 30 17:25:24 2020 -0300 drm/vkms: fix xrgb on compute crc The previous memset operation was not correctly zeroing the alpha channel to compute the crc, and as a result, the IGT subtest kms_cursor_crc/pipe-A-cursor-alpha-transparent fails. Fixes: db7f419c06d7c ("drm/vkms: Compute CRC with Cursor Plane") Signed-off-by: Melissa Wen Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200730202524.5upzuh4irboru7my@smtp.gmail.com commit 07c913c4d7101fbef0bac738740aa2bba395d157 Author: Marek Vasut Date: Tue Jul 28 22:12:42 2020 +0200 drm/panel: simple: Add Chefree CH101OLHLWH-002 panel Add support for the Chefree CH101OLHLWH-002 10.1" (1280x800) color TFT LCD panel, connected over LVDS. Timings are taken from the datasheet version P0.5. Signed-off-by: Marek Vasut Cc: dri-devel@lists.freedesktop.org Cc: Rob Herring Cc: Sam Ravnborg Cc: devicetree@vger.kernel.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200728201242.4336-3-marex@denx.de commit 44de5cee20387b61477f44689f0f81f08aeddbe6 Author: Marek Vasut Date: Tue Jul 28 22:12:41 2020 +0200 dt-bindings: Add DT bindings for Chefree CH101OLHLWH-002 Add DT bindings for Chefree CH101OLHLWH-002 10.1" 1280x800 LCD. This panel is connected via LVDS. Signed-off-by: Marek Vasut Acked-by: Rob Herring Cc: dri-devel@lists.freedesktop.org Cc: Rob Herring Cc: Sam Ravnborg Cc: devicetree@vger.kernel.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200728201242.4336-2-marex@denx.de commit 1d865be98686b8dd1c1c82db827afdd1ae967f13 Author: Marek Vasut Date: Tue Jul 28 22:12:40 2020 +0200 dt-bindings: Add vendor prefix for Chefree The Chefree Technology Corp. is an LCD panel manufacturer. Signed-off-by: Marek Vasut Acked-by: Rob Herring Cc: dri-devel@lists.freedesktop.org Cc: Rob Herring Cc: Sam Ravnborg Cc: devicetree@vger.kernel.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200728201242.4336-1-marex@denx.de commit c3ee8c65f63799b02e1fb828bac99fd5008fb565 Author: Bernard Zhao Date: Sat Aug 1 20:02:13 2020 +0800 drm/panel: remove return value of function drm_panel_add The function "int drm_panel_add(struct drm_panel *panel)" always returns 0, this return value is meaningless. Also, there is no need to check return value which calls "drm_panel_add and", error branch code will never run. Signed-off-by: Bernard Zhao Reviewed-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200801120216.8488-1-bernard@vivo.com commit b4b85af052f434bc3be5ee18462164986618feb1 Author: Jisheng Zhang Date: Wed Jul 29 13:09:52 2020 +0800 regulator: mp886x: support mps,switch-frequency Both MP8867 and MP8869 support different switch frequency. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200729130952.260671f1@xhacker Signed-off-by: Mark Brown commit ee6ad5a24575071b66bd37ffb2d8747a64fcb45f Author: Jisheng Zhang Date: Wed Jul 29 13:10:23 2020 +0800 regulator: mp886x: support setting switch freq Both MP8867 and MP8869 support different switch frequency. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200729131023.77cc1dd2@xhacker Signed-off-by: Mark Brown commit 0eddcf0267f913cb6336af64cadaf5acf6b19b7b Author: Jisheng Zhang Date: Wed Jul 29 13:09:13 2020 +0800 regulator: mp886x: implement set_ramp_delay Implement the .set_ramp_delay for MP8867 and MP8869. MP8867 and MP8869 could share the implementation, the only difference is the slew_rates array. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200729130913.3ac38b32@xhacker Signed-off-by: Mark Brown commit 1a3fb590856a9d7e8392d970fc07791b6703de94 Author: Christian König Date: Thu Jul 23 17:13:47 2020 +0200 drm/ttm: remove the init_mem_type callback It is a very strange concept to call a function which just calls back the caller for the functions parameters. Signed-off-by: Christian König Reviewed-by: Thomas Zimmermann Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/382085/ commit ded9f8eaddaaf669c16880c28e18c512989fdd00 Author: Christian König Date: Thu Jul 23 16:40:17 2020 +0200 drm/vram-helper: stop implementing init_mem_type Instead just initialize the memory type parameters before calling ttm_bo_init_mm. Signed-off-by: Christian König Reviewed-by: Thomas Zimmermann Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/382086/ commit ccd0dc437f257e42016b20375d52cd1631529e06 Author: Christian König Date: Thu Jul 23 16:29:59 2020 +0200 drm/qxl: stop implementing init_mem_type Instead just initialize the memory type parameters before calling ttm_bo_init_mm. Signed-off-by: Christian König Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/382083/ commit 009869fde901a4086f3590ec7c9a02de07801276 Author: Christian König Date: Thu Jul 23 15:39:57 2020 +0200 drm/nouveau: stop implementing init_mem_type Instead just initialize the memory type parameters before calling ttm_bo_init_mm. Signed-off-by: Christian König Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/382081/ commit 3629ca5dfb9ab583a6307abb31793bb0afacf933 Author: Christian König Date: Thu Jul 23 15:19:49 2020 +0200 drm/vmwgfx: stop implementing init_mem_type v2 Instead just initialize the memory type parameters before calling ttm_bo_init_mm. v2: keep extra system domain handling Signed-off-by: Christian König Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/382082/ commit 473633540c2f51403df1b065ccf51d8267e880a6 Author: Christian König Date: Thu Jul 23 15:07:45 2020 +0200 drm/amdgpu: stop implementing init_mem_type Instead just initialize the memory type parameters before calling ttm_bo_init_mm. Signed-off-by: Christian König Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/382084/ commit b0691b34f1e0a40ed565a1420e8a749cc728d422 Author: Christian König Date: Thu Jul 23 11:47:57 2020 +0200 drm/radeon: stop implementing init_mem_type Instead just initialize the memory type parameters before calling ttm_bo_init_mm. Signed-off-by: Christian König Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/382080/ commit be1213a341a289afc51f89181c310e368fba0b66 Author: Christian König Date: Tue Jul 21 09:58:13 2020 +0200 drm/ttm: remove TTM_MEMTYPE_FLAG_FIXED v2 Instead use a boolean field in the memory manager structure. Also invert the meaning of the field since the use of a TT structure is the special case here. v2: cleanup zero init. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Reviewed-by: Thomas Zimmermann Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/382079/ commit 418d2ad1ac521acc46f74f6bcbc8c1158d077346 Author: Christian König Date: Mon Jul 20 14:41:31 2020 +0200 drm/ttm: initialize the system domain with defaults v2 Instead of repeating that in each driver. v2: keep the caching limitation for VMWGFX for now. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Reviewed-by: Alex Deucher Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/382078/ commit f49236ae424d499d02ee3ce35fb9130ddf95b03f Author: Arvind Sankar Date: Tue Jul 28 18:57:22 2020 -0400 x86/kaslr: Add a check that the random address is in range Check in find_random_phys_addr() that the chosen address is inside the range that was required. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-22-nivedita@alum.mit.edu commit 0eb1a8af01d6264cf948d67c8bff15e2eb859355 Author: Arvind Sankar Date: Tue Jul 28 18:57:21 2020 -0400 x86/kaslr: Make local variables 64-bit Change the type of local variables/fields that store mem_vector addresses to u64 to make it less likely that 32-bit overflow will cause issues on 32-bit. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-21-nivedita@alum.mit.edu commit 3a066990a35eb289d54036637d2793d4743b8f07 Author: Arvind Sankar Date: Tue Jul 28 18:57:20 2020 -0400 x86/kaslr: Replace 'unsigned long long' with 'u64' No functional change. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-20-nivedita@alum.mit.edu commit e4cb955bf173474a61f56200610004aacc7a62ff Author: Arvind Sankar Date: Tue Jul 28 18:57:19 2020 -0400 x86/kaslr: Make minimum/image_size 'unsigned long' Change type of minimum/image_size arguments in process_mem_region to 'unsigned long'. These actually can never be above 4G (even on x86_64), and they're 'unsigned long' in every other function except this one. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-19-nivedita@alum.mit.edu commit 4268b4da572f8bde8bc2f3243927ff5795687a6f Author: Arvind Sankar Date: Tue Jul 28 18:57:18 2020 -0400 x86/kaslr: Small cleanup of find_random_phys_addr() Just a trivial rearrangement to do all the processing together, and only have one call to slots_fetch_random() in the source. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-18-nivedita@alum.mit.edu commit eb38be6db516fb72ccf7282628b545a185b3bc7a Author: Arvind Sankar Date: Tue Jul 28 18:57:17 2020 -0400 x86/kaslr: Drop unnecessary alignment in find_random_virt_addr() Drop unnecessary alignment of image_size to CONFIG_PHYSICAL_ALIGN in find_random_virt_addr, it cannot change the result: the largest valid slot is the largest n that satisfies minimum + n * CONFIG_PHYSICAL_ALIGN + image_size <= KERNEL_IMAGE_SIZE (since minimum is already aligned) and so n is equal to (KERNEL_IMAGE_SIZE - minimum - image_size) / CONFIG_PHYSICAL_ALIGN even if image_size is not aligned to CONFIG_PHYSICAL_ALIGN. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-17-nivedita@alum.mit.edu commit 46a5b29a4a63a3ba987cbb5467774a4b5787618e Author: Arvind Sankar Date: Tue Jul 28 18:57:16 2020 -0400 x86/kaslr: Drop redundant check in store_slot_info() Drop unnecessary check that number of slots is not zero in store_slot_info, it's guaranteed to be at least 1 by the calculation. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-16-nivedita@alum.mit.edu commit d6d0f36c735367ed7cf42b5ba454ba5858e17816 Author: Arvind Sankar Date: Tue Jul 28 18:57:15 2020 -0400 x86/kaslr: Make the type of number of slots/slot areas consistent The number of slots can be 'unsigned int', since on 64-bit, the maximum amount of memory is 2^52, the minimum alignment is 2^21, so the slot number cannot be greater than 2^31. But in case future processors have more than 52 physical address bits, make it 'unsigned long'. The slot areas are limited by MAX_SLOT_AREA, currently 100. It is indexed by an int, but the number of areas is stored as 'unsigned long'. Change both to 'unsigned int' for consistency. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-15-nivedita@alum.mit.edu commit 3870d971791f13df88a7a656e3fd6e2df8686097 Author: Arvind Sankar Date: Tue Jul 28 18:57:14 2020 -0400 x86/kaslr: Drop test for command-line parameters before parsing This check doesn't save anything. In the case when none of the parameters are present, each strstr will scan args twice (once to find the length and then for searching), six scans in total. Just going ahead and parsing the arguments only requires three scans: strlen, memcpy, and parsing. This will be the first malloc, so free will actually free up the memory, so the check doesn't save heap space either. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-14-nivedita@alum.mit.edu commit be9e8d9541a95bdfac1c13d112cc032ea7fc745f Author: Arvind Sankar Date: Tue Jul 28 18:57:13 2020 -0400 x86/kaslr: Simplify process_gb_huge_pages() Replace the loop to determine the number of 1Gb pages with arithmetic. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-13-nivedita@alum.mit.edu commit 50def2693a900dfb1d91872056dc8164245820fc Author: Arvind Sankar Date: Tue Jul 28 18:57:12 2020 -0400 x86/kaslr: Short-circuit gb_huge_pages on x86-32 32-bit does not have GB pages, so don't bother checking for them. Using the IS_ENABLED() macro allows the compiler to completely remove the gb_huge_pages code. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-12-nivedita@alum.mit.edu commit 79c2fd2afe55944098047721c33e06fd48654e57 Author: Arvind Sankar Date: Tue Jul 28 18:57:11 2020 -0400 x86/kaslr: Fix off-by-one error in process_gb_huge_pages() If the remaining size of the region is exactly 1Gb, there is still one hugepage that can be reserved. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-11-nivedita@alum.mit.edu commit bf457be1548eee6d106daf9604e029b36fed2b11 Author: Arvind Sankar Date: Tue Jul 28 18:57:10 2020 -0400 x86/kaslr: Drop some redundant checks from __process_mem_region() Clip the start and end of the region to minimum and mem_limit prior to the loop. region.start can only increase during the loop, so raising it to minimum before the loop is enough. A region that becomes empty due to this will get checked in the first iteration of the loop. Drop the check for overlap extending beyond the end of the region. This will get checked in the next loop iteration anyway. Rename end to region_end for symmetry with region.start. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-10-nivedita@alum.mit.edu commit ef7b07d59e2f18042622cecde0c7a89b60f33a89 Author: Arvind Sankar Date: Tue Jul 28 18:57:09 2020 -0400 x86/kaslr: Drop redundant variable in __process_mem_region() region.size can be trimmed to store the portion of the region before the overlap, instead of a separate mem_vector variable. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-9-nivedita@alum.mit.edu commit ee435ee6490d147c1b9963cc8b331665e4cea634 Author: Arvind Sankar Date: Tue Jul 28 18:57:08 2020 -0400 x86/kaslr: Eliminate 'start_orig' local variable from __process_mem_region() Set the region.size within the loop, which removes the need for start_orig. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-8-nivedita@alum.mit.edu commit 3f9412c73053a5be311607e42560c1303a873be7 Author: Arvind Sankar Date: Tue Jul 28 18:57:07 2020 -0400 x86/kaslr: Drop redundant cur_entry from __process_mem_region() cur_entry is only used as cur_entry.start + cur_entry.size, which is always equal to end. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-7-nivedita@alum.mit.edu commit 8d1cf8595860f4807f4ff1f8f1fc53e7576e0d71 Author: Arvind Sankar Date: Tue Jul 28 18:57:06 2020 -0400 x86/kaslr: Fix off-by-one error in __process_mem_region() In case of an overlap, the beginning of the region should be used even if it is exactly image_size, not just strictly larger. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200728225722.67457-6-nivedita@alum.mit.edu commit 451286940d95778e83fa7f97006316d995b4c4a8 Author: Arvind Sankar Date: Mon Jul 27 19:07:57 2020 -0400 x86/kaslr: Initialize mem_limit to the real maximum address On 64-bit, the kernel must be placed below MAXMEM (64TiB with 4-level paging or 4PiB with 5-level paging). This is currently not enforced by KASLR, which thus implicitly relies on physical memory being limited to less than 64TiB. On 32-bit, the limit is KERNEL_IMAGE_SIZE (512MiB). This is enforced by special checks in __process_mem_region(). Initialize mem_limit to the maximum (depending on architecture), instead of ULLONG_MAX, and make sure the command-line arguments can only decrease it. This makes the enforcement explicit on 64-bit, and eliminates the 32-bit specific checks to keep the kernel below 512M. Check upfront to make sure the minimum address is below the limit before doing any work. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Acked-by: Kees Cook Link: https://lore.kernel.org/r/20200727230801.3468620-5-nivedita@alum.mit.edu commit 08705365560a352d3f5b4f1f52270b4d4ff7911e Author: Arvind Sankar Date: Mon Jul 27 19:07:56 2020 -0400 x86/kaslr: Fix process_efi_entries comment Since commit: 0982adc74673 ("x86/boot/KASLR: Work around firmware bugs by excluding EFI_BOOT_SERVICES_* and EFI_LOADER_* from KASLR's choice") process_efi_entries() will return true if we have an EFI memmap, not just if it contained EFI_MEMORY_MORE_RELIABLE regions. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200727230801.3468620-4-nivedita@alum.mit.edu commit e2ee6173162b28053cb76b25887a0be9331c9e21 Author: Arvind Sankar Date: Mon Jul 27 19:07:55 2020 -0400 x86/kaslr: Remove bogus warning and unnecessary goto Drop the warning on seeing "--" in handle_mem_options(). This will trigger whenever one of the memory options is present in the command line together with "--", but there's no problem if that is the case. Replace goto with break. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200727230801.3468620-3-nivedita@alum.mit.edu commit 709709ac6410f4a14ded158a4b23b979e33e10fb Author: Arvind Sankar Date: Mon Jul 27 19:07:54 2020 -0400 x86/kaslr: Make command line handling safer Handle the possibility that the command line is NULL. Replace open-coded strlen with a function call. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200727230801.3468620-2-nivedita@alum.mit.edu commit 2456c290a7889be492cb96092b62d16c11176f72 Author: Alex Deucher Date: Thu Jul 30 11:02:30 2020 -0400 Revert "drm/amdgpu: Fix NULL dereference in dpm sysfs handlers" This regressed some working configurations so revert it. Will fix this properly for 5.9 and backport then. This reverts commit 38e0c89a19fd13f28d2b4721035160a3e66e270b. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 74b3595913cc22efe77dbdf2f00bf33b9243f566 Author: Jiansong Chen Date: Thu Jul 30 18:09:47 2020 +0800 drm/amdgpu: enable GFXOFF for navy_flounder Enable GFXOFF for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit f61772cd132e09bd9e0b52627d8a82631e860a10 Author: Liu ChengZhe Date: Fri Jul 24 15:55:33 2020 +0800 drm amdgpu: Skip tmr load for SRIOV 1. For Navi12, CHIP_SIENNA_CICHLID, skip tmr load operation; 2. Check pointer before release firmware. v2: use CHIP_SIENNA_CICHLID instead v3: remove local "bool ret"; fix grammer issue v4: use my name instead of "root" v5: fix grammer issue and indent issue Signed-off-by: Liu ChengZhe Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 392cf6a739271a70311b6a3c4f60900039721a68 Author: Liu ChengZhe Date: Fri Jul 24 17:22:15 2020 +0800 drm/amdgpu: fix PSP autoload twice in FLR Assigning false to block->status.hw overwrites PSP's previous hardware status, which causes the PSP to Resume operation after hardware init. Remove this assignment and let the PSP execute Resume operation when it is told to. v2: Remove the braces. v3: Modify the description. Signed-off-by: Liu ChengZhe Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 178b0013f074da545492662ec76dc2be363ca85c Author: Daniel Vetter Date: Mon Jul 27 23:30:18 2020 +0200 drm/amdgpu/dc: Stop dma_resv_lock inversion in commit_tail Trying to grab dma_resv_lock while in commit_tail before we've done all the code that leads to the eventual signalling of the vblank event (which can be a dma_fence) is deadlock-y. Don't do that. Here the solution is easy because just grabbing locks to read something races anyway. We don't need to bother, READ_ONCE is equivalent. And avoids the locking issue. v2: Also take into account tmz_surface boolean, plus just delete the old code. Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Cc: linux-rdma@vger.kernel.org Cc: amd-gfx@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: Chris Wilson Cc: Maarten Lankhorst Cc: Christian König Reviewed-by: Christian König Signed-off-by: Daniel Vetter Signed-off-by: Alex Deucher commit 317469f695c27e290b8001a0df0fdbb95f27bfa9 Author: Li Heng Date: Wed Jul 29 16:34:01 2020 +0800 drm/amd/powerplay: Remove unneeded cast from memory allocation Remove casting the values returned by memory allocation function. Coccinelle emits WARNING: ./drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c:893:37-46: WARNING: casting value returned by memory allocation function to (PPTable_t *) is useless. Signed-off-by: Li Heng Signed-off-by: Alex Deucher commit 8e326285924cd13d9d94edc209440ef5b6f85085 Author: Peilin Ye Date: Tue Jul 28 15:29:24 2020 -0400 drm/amdgpu: Prevent kernel-infoleak in amdgpu_info_ioctl() Compiler leaves a 4-byte hole near the end of `dev_info`, causing amdgpu_info_ioctl() to copy uninitialized kernel stack memory to userspace when `size` is greater than 356. In 2015 we tried to fix this issue by doing `= {};` on `dev_info`, which unfortunately does not initialize that 4-byte hole. Fix it by using memset() instead. Cc: stable@vger.kernel.org Fixes: c193fa91b918 ("drm/amdgpu: information leak in amdgpu_info_ioctl()") Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)") Suggested-by: Dan Carpenter Reviewed-by: Christian König Signed-off-by: Peilin Ye Signed-off-by: Alex Deucher commit 7619517598ad5ba04beb855cde6558e72c73dbb5 Author: Mazin Rezk Date: Mon Jul 27 05:40:46 2020 +0000 drm/amd/display: Clear dm_state for fast updates This patch fixes a race condition that causes a use-after-free during amdgpu_dm_atomic_commit_tail. This can occur when 2 non-blocking commits are requested and the second one finishes before the first. Essentially, this bug occurs when the following sequence of events happens: 1. Non-blocking commit #1 is requested w/ a new dm_state #1 and is deferred to the workqueue. 2. Non-blocking commit #2 is requested w/ a new dm_state #2 and is deferred to the workqueue. 3. Commit #2 starts before commit #1, dm_state #1 is used in the commit_tail and commit #2 completes, freeing dm_state #1. 4. Commit #1 starts after commit #2 completes, uses the freed dm_state 1 and dereferences a freelist pointer while setting the context. Since this bug has only been spotted with fast commits, this patch fixes the bug by clearing the dm_state instead of using the old dc_state for fast updates. In addition, since dm_state is only used for its dc_state and amdgpu_dm_atomic_commit_tail will retain the dc_state if none is found, removing the dm_state should not have any consequences in fast updates. This use-after-free bug has existed for a while now, but only caused a noticeable issue starting from 5.7-rc1 due to 3202fa62f ("slub: relocate freelist pointer to middle of object") moving the freelist pointer from dm_state->base (which was unused) to dm_state->context (which is dereferenced). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=207383 Fixes: bd200d190f45 ("drm/amd/display: Don't replace the dc_state for fast updates") Reported-by: Duncan <1i5t5.duncan@cox.net> Signed-off-by: Mazin Rezk Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit defa489636a67bb64ecd3bd9ae9ddedb163adccf Author: Jiansong Chen Date: Wed Jul 29 11:58:21 2020 +0800 drm/amdgpu: update GC golden setting for navy_flounder Update GC golden setting for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit da82cbd8328ff7574d5f42c09562572890338309 Author: Jiansong Chen Date: Tue Jul 28 19:14:22 2020 +0800 drm/amd/powerplay: update driver if version for navy_flounder It's in accordance with pmfw 65.5.0 for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 01eee24fceb9a64b2dc3b3ccb7b7c6852aa7a403 Author: John Clements Date: Tue Jul 28 14:22:54 2020 +0800 drm/amdgpu: enable umc 8.7 functions in gmc v10 add support for umc 8.7 initialization add umc 8.7 source to makefile Reviewed-by: Guchun Chen Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 35dab589de1309c485935ede35870adf155bba6e Author: Huang Rui Date: Mon Jul 27 16:19:45 2020 +0800 drm/amdgpu: skip crit temperature values on APU (v2) It doesn't expose PPTable descriptor on APU platform. So max/min temperature values cannot be got from APU platform. v2: Stoney needs to skip crit temperature as well. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit d9b91b1ea26b0e528c44c12f9b5637ba41b9006c Author: Aric Cyr Date: Wed Jul 22 15:40:06 2020 -0400 drm/amd/display: Fix DP Compliance tests 4.3.2.1 and 4.3.2.2 [Why] Test expects that we also read HPD_IRQ_VECTOR when checking for symbol loss as well lane status. [How] Read bytes 0x200-0x205 instead of just 0x202-0x205 Signed-off-by: Aric Cyr Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 746565c25abf9e0bc603aaf520cb33bed7510842 Author: Aric Cyr Date: Mon Jul 20 11:07:46 2020 -0400 drm/amd/display: 3.2.96 Signed-off-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 27e84dd7b4490fad29118d5bddfc0018f38a1c66 Author: Eryk Brol Date: Wed Jun 17 14:39:50 2020 -0400 drm/amd/display: DSC Slice width debugfs write entry [Why] We need to be able to specify slice width for DSC on aconnector [How] Getting slice width parameter from debugfs entry, if it is a valid the value is set in connector's dsc preffered settings structure. Which then overwrites dsc_cfg structure's parameters if DSC is decided to be enabled. Works for both SST and MST. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Mikita Lipski Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 42a614800b0647af3c4944f2ac04eb1613b30161 Author: Wyatt Wood Date: Wed Jun 17 11:29:27 2020 -0400 drm/amd/display: Use hw lock mgr [Why] Feature requires synchronization of dig, pipe, and cursor locking between driver and fw. [How] Set flag to force psr to use hw lock mgr. Signed-off-by: Wyatt Wood Reviewed-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 31f34d19f87ee9fa475bc8556e298ea1ec3e7e1d Author: hersen wu Date: Sun Jul 19 17:21:59 2020 -0400 drm/amd/display: dchubbub p-state warning during surface planes switch [Why] ramp_up_dispclk_with_dpp is to change dispclk, dppclk and dprefclk according to bandwidth requirement. call stack: rv1_update_clocks --> update_clocks --> dcn10_prepare_bandwidth / dcn10_optimize_bandwidth --> prepare_bandwidth / optimize_bandwidth. before change dcn hw, prepare_bandwidth will be called first to allow enough clock, watermark for change, after end of dcn hw change, optimize_bandwidth is executed to lower clock to save power for new dcn hw settings. below is sequence of commit_planes_for_stream: step 1: prepare_bandwidth - raise clock to have enough bandwidth step 2: lock_doublebuffer_enable step 3: pipe_control_lock(true) - make dchubp register change will not take effect right way step 4: apply_ctx_for_surface - program dchubp step 5: pipe_control_lock(false) - dchubp register change take effect step 6: optimize_bandwidth --> dc_post_update_surfaces_to_stream for full_date, optimize clock to save power at end of step 1, dcn clocks (dprefclk, dispclk, dppclk) may be changed for new dchubp configuration. but real dcn hub dchubps are still running with old configuration until end of step 5. this need clocks settings at step 1 should not less than that before step 1. this is checked by two conditions: 1. if (should_set_clock(safe_to_lower , new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) || new_clocks->dispclk_khz == clk_mgr_base->clks.dispclk_khz) 2. request_dpp_div = new_clocks->dispclk_khz > new_clocks->dppclk_khz the second condition is based on new dchubp configuration. dppclk for new dchubp may be different from dppclk before step 1. for example, before step 1, dchubps are as below: pipe 0: recout=(0,40,1920,980) viewport=(0,0,1920,979) pipe 1: recout=(0,0,1920,1080) viewport=(0,0,1920,1080) for dppclk for pipe0 need dppclk = dispclk new dchubp pipe split configuration: pipe 0: recout=(0,0,960,1080) viewport=(0,0,960,1080) pipe 1: recout=(960,0,960,1080) viewport=(960,0,960,1080) dppclk only needs dppclk = dispclk /2. dispclk, dppclk are not lock by otg master lock. they take effect after step 1. during this transition, dispclk are the same, but dppclk is changed to half of previous clock for old dchubp configuration between step 1 and step 6. This may cause p-state warning intermittently. [How] for new_clocks->dispclk_khz == clk_mgr_base->clks.dispclk_khz, we need make sure dppclk are not changed to less between step 1 and 6. for new_clocks->dispclk_khz > clk_mgr_base->clks.dispclk_khz, new display clock is raised, but we do not know ratio of new_clocks->dispclk_khz and clk_mgr_base->clks.dispclk_khz, new_clocks->dispclk_khz /2 does not guarantee equal or higher than old dppclk. we could ignore power saving different between dppclk = displck and dppclk = dispclk / 2 between step 1 and step 6. as long as safe_to_lower = false, set dpclk = dispclk to simplify condition check. CC: Stable Signed-off-by: Hersen Wu Reviewed-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 68d90e066df1e14641749cc1821ff36452b64368 Author: Anthony Koo Date: Sat Jul 18 15:25:22 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.26 Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 097e6d98c98fc79625e44c03c56924a6bb2569ef Author: Eryk Brol Date: Tue Jul 14 13:42:05 2020 -0400 drm/amd/display: DSC Clock enable debugfs write entry [Why] Need a mechanism to force enable DSC on any connector [How] Debugfs entry overwrites newly added connector's dsc preffered settings structure and sets dsc_clock_en flag on it. During the attomic commit, depending if connector is SST or MST, we will enable DSC manually by overwriting stream's DSC flag. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Mikita Lipski Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit cc0f379dd2bb34ee247222ff822b52319a755652 Author: Reza Amini Date: Wed Jul 15 11:33:23 2020 -0400 drm/amd/display: Allow asic specific FSFT timing optimization [Why] Each asic can optimize best based on its capabilities [How] Optimizing timing for a new pixel clock Signed-off-by: Reza Amini Reviewed-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 9b6ca29e093660241002c91e2c8abf771c726921 Author: Jun Lei Date: Thu Jun 25 13:24:12 2020 -0400 drm/amd/display: Disable idle optimizations before programming DCN [Why] Programming DCN is explicitly forbidden during idle optimzations allowed state. Existing implemenation relies on OS/DM, which is not robust. Instead DC should sequence this. Note that DC will not re-enter idle optimized state on its own, it is only responsible for catching out of sequence calls. It is still DM responsibility to sequence appropriate for optimized power, but this change removes the requirement for DM to cover the .1% case. [How] - elevate updates during idle optimized state to full updates - disable idle power optimizations prior to programming Signed-off-by: Jun Lei Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 473e2d16777030ca9b3a0178b179efdb2548b415 Author: Stylon Wang Date: Tue Jun 30 17:55:29 2020 +0800 drm/amd/display: Fix dmesg warning from setting abm level [Why] Setting abm level does not correctly update CRTC state. As a result no surface update is added to dc stream state and triggers warning. [How] Correctly update CRTC state when setting abm level property. CC: Stable Signed-off-by: Stylon Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 38ee474fc63f79f66df1bed06c8c952e8258ea90 Author: Paul Cercueil Date: Thu Jul 30 16:48:30 2020 +0200 drm/ingenic: ipu: Only enable clock when needed Instead of keeping the IPU clock enabled constantly, enable and disable it on demand, when the IPU plane is used. That way, we won't use any extra power when the IPU is not used. v2: Explain the reason of this patch Reviewed-by: Sam Ravnborg Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20200730144830.10479-4-paul@crapouillou.net commit c0fd208ee3bc1020fd24cf986aec604374440ce4 Author: Paul Cercueil Date: Thu Jul 30 16:48:29 2020 +0200 drm/ingenic: ipu: Remove YUV422 from supported formats on JZ4725B When configuring the IPU for packed YUV 4:2:2, depending on the scaling ratios given by the source and destination resolutions, it is possible to crash the IPU block, to the point where a software reset of the IP does not fix it. This can happen anytime, in the first few frames, or after dozens of minutes. The same crash also happens when the IPU is fully controlled by the LCD controller (in that case no HW register is written at any moment after startup), which points towards a hardware bug. Thanksfully multiplanar YUV is not affected. Until this bug is fixed or worked around, address this issue by removing support for YUV 4:2:2 on the IPU of the JZ4725B. v2: Update commit message (remove the "crash beyond repair" bit) Reviewed-by: Sam Ravnborg Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20200730144830.10479-3-paul@crapouillou.net commit 3debcdf066e51fa771e128a18655f2712b1f82e9 Author: Paul Cercueil Date: Thu Jul 30 16:48:28 2020 +0200 drm/ingenic: ipu: Only restart manually on older SoCs On older SoCs, it is necessary to restart manually the IPU when a frame is done processing. Doing so on newer SoCs (JZ4760/70) kinds of work too, until the input or output resolutions or the framerate are too high. Make it work properly on newer SoCs by letting the LCD controller trigger the IPU frame restart signal. Reviewed-by: Sam Ravnborg Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20200730144830.10479-2-paul@crapouillou.net commit cfb9b89f116a076ff333d4d0dc4aa862079481ba Author: Pekka Paalanen Date: Tue Jul 7 14:38:05 2020 +0300 drm/doc: device hot-unplug for userspace Set up the expectations on how hot-unplugging a DRM device should look like to userspace. Written by Daniel Vetter's request and largely based on his comments in IRC and from https://lists.freedesktop.org/archives/dri-devel/2020-May/265484.html . A related Wayland protocol change proposal is at https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/35 Signed-off-by: Pekka Paalanen Reviewed-by: Daniel Vetter Reviewed-by: Alex Deucher Acked-by: Noralf Trønnes Cc: Andrey Grodzovsky Cc: Dave Airlie Cc: Sean Paul Cc: Simon Ser Cc: Ben Skeggs Cc: Karol Herbst Acked-by: Simon Ser Signed-off-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200707113805.30936-1-ppaalanen@gmail.com commit 85b3bfa266e8421afab5e75b8306003e97990a4a Author: Tian Tao Date: Tue Jul 28 20:55:07 2020 +0800 drm/hisilicon: Fixed the warning: Assignment of 0/1 to bool variable fixed the following warning: hibmc_drm_drv.c:296:1-18:WARNING: Assignment of 0/1 to bool variable. hibmc_drm_drv.c:301:2-19: WARNING: Assignment of 0/1 to bool variable. v2: using the pci_dev.msi_enabled instead of priv->msi_enabled. v3: just call pci_enable_msi() and pci_disable_msi(), it's no need to set dev->pdev->msi_enabled again. Signed-off-by: Tian Tao Reviewed-By: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1595940907-17874-1-git-send-email-tiantao6@hisilicon.com commit 639abb72f189a9df1033cbe5eaf1c0508021f699 Author: Paul Cercueil Date: Tue Jul 28 17:16:41 2020 +0200 drm/ingenic: Validate mode in a .mode_valid callback Validate modes in the drm_crtc_helper_funcs.mode_valid() callback, which is designed for this purpose, instead of doing it in drm_crtc_helper_funcs.atomic_check(). Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200728151641.26124-3-paul@crapouillou.net commit c114e72313045108d6ddc1847b4ffff4e50ab444 Author: Paul Cercueil Date: Tue Jul 28 17:16:40 2020 +0200 drm/ingenic: Handle errors of drm_atomic_get_plane_state drm_atomic_get_plane_state() can return errors, so we need to handle these. Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200728151641.26124-2-paul@crapouillou.net commit d69de69f2be105b2474c05a5ca4827aac3e80ad3 Author: Marek Vasut Date: Tue Jul 28 14:12:46 2020 +0200 drm/panel: simple: Add Powertip PH800480T013 panel Add support for Powertip PH800480T013 800x480 parallel LCD, this one is used in the Raspberry Pi 7" touchscreen display unit. Signed-off-by: Marek Vasut To: dri-devel@lists.freedesktop.org Cc: Eric Anholt Cc: Rob Herring Cc: Sam Ravnborg Cc: devicetree@vger.kernel.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200728121246.23304-3-marex@denx.de commit 051e95ee7ec10050154e4c8f48be4d99ac83f8fc Author: Marek Vasut Date: Tue Jul 28 14:12:45 2020 +0200 dt-bindings: Add DT bindings for Powertip PH800480T013 Add DT bindings for Powertip PH800480T013 800x480 parallel LCD, this one is used in the Raspberry Pi 7" touchscreen display unit. Signed-off-by: Marek Vasut To: dri-devel@lists.freedesktop.org Cc: Eric Anholt Cc: Rob Herring Cc: Sam Ravnborg Cc: devicetree@vger.kernel.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200728121246.23304-2-marex@denx.de commit a26a4790a82a4675323102235a7bcbd479817b02 Author: Marek Vasut Date: Tue Jul 28 14:12:44 2020 +0200 dt-bindings: Add vendor prefix for Powertip The Powertip Tech. Corp. is an LCD panel manufacturer. Signed-off-by: Marek Vasut To: dri-devel@lists.freedesktop.org Cc: Eric Anholt Cc: Rob Herring Cc: Sam Ravnborg Cc: devicetree@vger.kernel.org Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200728121246.23304-1-marex@denx.de commit 63aa581c3019301e998b148c1eb63a108aca365f Author: Laurent Pinchart Date: Mon Jul 27 05:06:54 2020 +0300 drm: mxsfb: Support the alpha plane The LCDIF in the i.MX6SX and i.MX7 have a second plane called the alpha plane. Support it. Signed-off-by: Laurent Pinchart Reviewed-by: Emil Velikov Reviewed-by: Stefan Agner Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-23-laurent.pinchart@ideasonboard.com commit b963ad95a06a5480367dd25a807e5bc0dd83842e Author: Laurent Pinchart Date: Mon Jul 27 05:06:53 2020 +0300 drm: mxsfb: Remove unnecessary spaces after tab This is a cosmetic change only, no code change is included. Signed-off-by: Laurent Pinchart Reviewed-by: Emil Velikov Reviewed-by: Stefan Agner Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-22-laurent.pinchart@ideasonboard.com commit 51b777f2b11ea2eed4b6c5faf3884b4aeba0b82a Author: Laurent Pinchart Date: Mon Jul 27 05:06:52 2020 +0300 drm: mxsfb: Merge mxsfb_set_pixel_fmt() and mxsfb_set_bus_fmt() The mxsfb_set_pixel_fmt() and mxsfb_set_bus_fmt() functions both deal with format configuration, are always called in a row from mxsfb_crtc_mode_set_nofb(), and set fields from the LCDC_CTRL register. This requires a read-modify-update cycle in mxsfb_set_bus_fmt(). Make this more efficient by merging them together. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-21-laurent.pinchart@ideasonboard.com commit d9ef0d31503254c672afe890641b86870a7ff7cb Author: Laurent Pinchart Date: Mon Jul 27 05:06:51 2020 +0300 drm: mxsfb: Turn mxsfb_set_pixel_fmt() into a void function The mxsfb_set_pixel_fmt() function returns an error when the selected pixel format is unsupported. This can never happen, as such errors are caught by the DRM core. Remove the error check. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-20-laurent.pinchart@ideasonboard.com commit c6ddee8220bf8ac019589d5ff8ffc4707bcc1c82 Author: Laurent Pinchart Date: Mon Jul 27 05:06:50 2020 +0300 drm: mxsfb: Drop non-OF support The mxsfb driver is only used by OF platforms. Drop non-OF support. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-19-laurent.pinchart@ideasonboard.com commit f6d94e715817d3847ea0152020ee9f921b4327b6 Author: Laurent Pinchart Date: Mon Jul 27 05:06:49 2020 +0300 drm: mxsfb: Update internal IP version number for i.MX6SX The LCDIF present in the i.MX6SX has extra features compared to the i.MX28. It has however lost its IP version register, so no official version number is known. Bump the version to MXSFB_V6 following the i.MX version, in preparation for support for the additional features. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-18-laurent.pinchart@ideasonboard.com commit b13aeb9e212dbeb051d093201085a4935d348463 Author: Laurent Pinchart Date: Mon Jul 27 05:06:48 2020 +0300 drm: mxsfb: Add i.MX7 and i.MX8M to the list of supported SoCs in Kconfig Extend the Kconfig option description by listing the i.MX7 and i.MX8M SoCs, as they are supported by the same driver. Replace the list of SoCs in the short description with just "(e)LCDIF LCD controller" to avoid expanding it further in the future as support for more SoCs is added. Signed-off-by: Laurent Pinchart Reviewed-by: Emil Velikov Reviewed-by: Stefan Agner Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-17-laurent.pinchart@ideasonboard.com commit f4098b07efb8a38a2f0bc10fce7828eee995f474 Author: Laurent Pinchart Date: Mon Jul 27 05:06:47 2020 +0300 drm: mxsfb: Remove mxsfb_devdata unused fields The debug0 and ipversion fields of the mxsfb_devdata structure are unused. Remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-16-laurent.pinchart@ideasonboard.com commit b9f5937680a8f1c14aea481358af3504c8b94c3f Author: Laurent Pinchart Date: Mon Jul 27 05:06:46 2020 +0300 drm: mxsfb: Enable vblank handling Enable vblank handling when the CRTC is turned on and disable it when it is turned off. This requires moving vblank init after the KMS pipeline initialisation, otherwise drm_vblank_init() gets called with 0 CRTCs. Signed-off-by: Laurent Pinchart Reviewed-by: Emil Velikov Reviewed-by: Stefan Agner Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-15-laurent.pinchart@ideasonboard.com commit 07b7fd77b48c56a0d99c06053bad39b426e28201 Author: Laurent Pinchart Date: Mon Jul 27 05:06:45 2020 +0300 drm: mxsfb: Don't touch AXI clock in IRQ context The driver attempts agressive power management by enabling and disabling the AXI clock around register accesses. This results in attempts to enable and disable the clock in the IRQ handler, which is a no-go as preparing or unpreparing the clock may sleep. On the other hand, the driver enables the AXI clock when enabling the CRTC and keeps it enabled until the CRTC is disabled. This is correct, and renders the power management attempt pointless, as interrupts are not supposed to occur when the CRTC is off. The same reasoning can be applied to the CRTC .enable_vblank() and .disable_vblank() that are not supposed to be called when the CRTC off and thus don't require manual handling of the AXI clock. Furthermore, vblank handling is never enabled, which results in the vblank enable and disable handlers never being called. To fix this, remove the manual clock handling in the IRQ, the CRTC .enable_vblank() and .disable_vblank() handlers and the plane .atomic_update() handler. We however need to handle the clock manually in mxsfb_irq_disable() as is calls .disable_vblank() manually and is used both at probe and remove time. The clock disabling is also moved to the last step of the mxsfb_crtc_atomic_disable() function, to prepare for enabling vblank handling. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-14-laurent.pinchart@ideasonboard.com commit 1e5d7963bb770d055c2a90f6ef7b57c9f4ba0fa0 Author: Laurent Pinchart Date: Mon Jul 27 05:06:44 2020 +0300 drm: mxsfb: Move vblank event arm to CRTC .atomic_flush() The vblank event is armed in the plane .atomic_update(). This works fine as we have a single plane, and was the only option when the driver was using the drm_simple_kms_helper helper, but will break as soon as multiple planes are supported. Move it to CRTC .atomic_flush(). Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-13-laurent.pinchart@ideasonboard.com commit ae1ed0093281939b80664a687689f12436c0e874 Author: Laurent Pinchart Date: Mon Jul 27 05:06:43 2020 +0300 drm: mxsfb: Stop using DRM simple display pipeline helper The DRM simple display pipeline helper only supports a single plane. In order to prepare for support of the alpha plane on i.MX6SX and i.MX7, move away from the helper. No new feature is added. Signed-off-by: Laurent Pinchart Reviewed-by: Emil Velikov Reviewed-by: Stefan Agner Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-12-laurent.pinchart@ideasonboard.com commit 40a726b82e266693f198f0d8c89de6723b203ebc Author: Laurent Pinchart Date: Mon Jul 27 05:06:42 2020 +0300 drm: mxsfb: Rename mxsfb_crtc.c to mxsfb_kms.c The mxsfb_crtc.c file doesn't handle just the CRTC, but also the other KMS objects. Rename it accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-11-laurent.pinchart@ideasonboard.com commit f16a008921aa13b7012b9f8cf48c44130e6e8a35 Author: Laurent Pinchart Date: Mon Jul 27 05:06:41 2020 +0300 drm: mxsfb: Remove unneeded includes A fair number of includes are not needed. Drop them, and add a couple of required includes that were included indirectly. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-10-laurent.pinchart@ideasonboard.com commit eb28c5cee2a8c44f80b0a35b8bc8ba2924fcb87d Author: Laurent Pinchart Date: Mon Jul 27 05:06:40 2020 +0300 drm: mxsfb: Remove register definitions from mxsfb_crtc.c mxsfb_crtc.c defines several macros related to register addresses and bit, which duplicates macros from mxsfb_regs.h. Use the macros from mxsfb_regs.h instead and remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-9-laurent.pinchart@ideasonboard.com commit 7865cd5aae2267b8b1efd1019279b9a6e1a11941 Author: Laurent Pinchart Date: Mon Jul 27 05:06:39 2020 +0300 drm: mxsfb: Use LCDC_CTRL register name explicitly The LCDC_CTRL register is located at address 0x0000. Some of the accesses to the register simply use the mxsfb->base address. Reference the LCDC_CTRL register explicitly instead to clarify the code. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-8-laurent.pinchart@ideasonboard.com commit f14fec8481ce64e9c544770d8977e8c8efab4a11 Author: Laurent Pinchart Date: Mon Jul 27 05:06:38 2020 +0300 drm: mxsfb: Pass mxsfb_drm_private pointer to mxsfb_reset_block() The mxsfb_reset_block() function isn't special, pass it the mxsfb_drm_private pointer instead of a pointer to the base address. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-7-laurent.pinchart@ideasonboard.com commit 8a460068494a536e3d544dc4778d3c9d4081c504 Author: Laurent Pinchart Date: Mon Jul 27 05:06:37 2020 +0300 drm: mxsfb: Clarify format and bus width configuration Replace the convoluted way to set the format and bus width through difficult to read macros with more explicit ones. Also remove the outdated comment related to the limitations on bus width setting as it doesn't apply anymore (the bus width can be specified through the display_info bus format). Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-6-laurent.pinchart@ideasonboard.com commit 92000371c8294136accc2997cba89dff8c0bc9f5 Author: Laurent Pinchart Date: Mon Jul 27 05:06:36 2020 +0300 drm: mxsfb: Remove unused macros from mxsfb_regs.h mxsfb_regs.h defines macros related to register bits. Some of them are not used and don't clearly map to any particular register, so their purpose isn't known. Remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-5-laurent.pinchart@ideasonboard.com commit 8c6619ff22113666b112cace7e4e8d872e09dff3 Author: Laurent Pinchart Date: Mon Jul 27 05:06:35 2020 +0300 drm: mxsfb: Use BIT() macro to define register bitfields Using BIT() is preferred over manual shifts as it's more readable, handles the 1 << 31 case properly, and avoids other mistakes as shown by the DEBUG0_HSYNC and DEBUG0_VSYNC bits (that are currently unused). Use it. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-4-laurent.pinchart@ideasonboard.com commit c42001e357f7de11e882f54461be27757a7fe51a Author: Laurent Pinchart Date: Mon Jul 27 05:06:34 2020 +0300 drm: mxsfb: Use drm_panel_bridge Replace the manual connector implementation based on drm_panel with the drm_panel_bridge helper. This simplifies the mxsfb driver by removing connector-related code, and standardizing all pipeline control operations on bridges. A hack is needed to get hold of the connector, as that's our only source of bus flags and formats for now. As soon as the bridge API provides us with that information this can be fixed. Signed-off-by: Laurent Pinchart Reviewed-by: Emil Velikov Reviewed-by: Stefan Agner Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-3-laurent.pinchart@ideasonboard.com commit fcf863ec07688a5242b75b032bad3f0e3581d68d Author: Laurent Pinchart Date: Mon Jul 27 05:06:33 2020 +0300 drm: mxsfb: Remove fbdev leftovers Commit 8e93f1028d74 ("drm/mxsfb: Use drm_fbdev_generic_setup()") replaced fbdev handling with drm_fbdev_generic_setup() but left inclusion of the drm/drm_fb_cma_helper.h header. Remove it. Fixes: 8e93f1028d74 ("drm/mxsfb: Use drm_fbdev_generic_setup()") Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Agner Reviewed-by: Emil Velikov Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200727020654.8231-2-laurent.pinchart@ideasonboard.com commit 6cd3c6798aac0d1a53d1426e1cfa0432cce51486 Author: Alex Deucher Date: Mon Jul 27 10:35:07 2020 -0400 drm/amdgpu/si: initial support for GPU reset Ported from radeon. Acked-by: Christian König Signed-off-by: Alex Deucher commit 5963cdde1acf6b81c62bf6d3bdae723139bf8138 Author: Mauro Rossi Date: Sun Oct 14 20:51:29 2018 +0200 drm/amd/display: enable SI support in the Kconfig (v2) [Why] All DCE6 specific code changes are guarded by CONFIG_DRM_AMD_DC_SI Kconfig option [How] (v1) CONFIG_DRM_AMD_DC_SI configuration option is added, default setting is disabled (v2) Hainan is not supported, description updated accordingly Tested with HD7750 (Cape Verde) and HD7950 (Tahiti) Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 64200c468fb0a3ab88033f6b90ea4a576ae6a1e0 Author: Mauro Rossi Date: Fri Oct 5 00:00:17 2018 +0200 drm/amdgpu: enable DC support for SI parts (v2) [Why] amdgpu_device.c requires changes for SI chipsets support si.c require changes for Display Manager IP block enabling [How] amdgpu_device.c: add SI families in amdgpu_device_asic_has_dc_support() si.c: changes in si_set_ip_blocks() for Display Manager IP blocks enablement (v1) NOTE: As per Kaveri and older amdgpu.dc=1 kernel cmdline is required (v2) fix for bc011f9350 ("drm/amdgpu: Change SI/CI gfx/sdma/smu init sequence") remove CHIP_HAINAN support since it does not have physical DCE6 module Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit d59bc6324208e427d141826d26408b193d522244 Author: Christian König Date: Thu Jul 23 10:58:12 2020 +0200 drm/ttm: fix pipelined gutting for evictions v2 We can't pipeline that during eviction because the memory needs to be available immediately. v2: fix how we cleanup the BOs resources Signed-off-by: Christian König Reviewed-by: Felix Kuehling Tested-by: Alex Sierra Link: https://patchwork.freedesktop.org/patch/379039/ commit 7427a7a0b3b8f66ea45472a9a37b79689ed8c3b3 Author: Paul Menzel Date: Fri Jul 3 16:29:39 2020 +0200 drm/amdgpu: Change type of module param `ppfeaturemask` to hexint The newly added hexint helper is more convenient for bitmasks. Before: $ more /sys/module/amdgpu/parameters/ppfeaturemask 4294950911 After: $ more /sys/module/amdgpu/parameters/ppfeaturemask 0xffffbfff Cc: amd-gfx@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Paul Menzel Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/374724/ commit 7d8365771ffb0edc336f2cd45e96ef8214a83dca Author: Paul Menzel Date: Fri Jul 3 16:29:38 2020 +0200 moduleparams: Add hexint type parameter For bitmasks printing values in hex is more convenient. Prefix with `0x` to make it clear, that it’s a hex value, and pad it out. Using the helper for `amdgpu.ppfeaturemask`, it will look like below. Before: $ more /sys/module/amdgpu/parameters/ppfeaturemask 4294950911 After: $ more /sys/module/amdgpu/parameters/ppfeaturemask 0xffffbfff Cc: linux-kernel@vger.kernel.org Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Paul Menzel Acked-by: Linus Torvalds Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/374726/ commit 31ed1b5dff46fc5c9347338b7e65973f34e9713f Author: Paul Menzel Date: Fri Jul 3 16:29:37 2020 +0200 kernel/params.c: Align last argument with a tab The second and third arguments are aligned with tabs, so do the same for the fourth. Cc: linux-kernel@vger.kernel.org Signed-off-by: Paul Menzel Reviewed-by: Christian König Signed-off-by: Christian König Link: https://lore.kernel.org/patchwork/patch/1267600/ commit f784112f0126a8d9cd4d92878dc76796b5eba11e Author: Mauro Rossi Date: Thu Jul 16 20:54:28 2020 +0200 drm/amd/display: create plane rotation property for Bonaire and later [Why] DCE6 chipsets do not support HW rotation [How] rotation property is created for Bonaire and later Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 75b4766bad05c4db6e9e568af95712321f57d02e Author: Mauro Rossi Date: Tue Jul 7 17:24:56 2020 +0200 drm/amd/display: dc/dce60: use DCE6 headers (v6) [Why] With all DCE6 specific macros, register, masks in place dce60_resource.c may use them and become independent from DCE8 headers [How] (v1) Changelog: - use DCE6 headers for registers and masks, remove the DC8 headers - remove 7th Display Controller/Encoder register instances (DCE6 has only 6) - use DCE6 specific watermark programming registers (DPG_PIPE_ARBITRATION_CONTROL3) - use DCE6 specific input pixel processing registers shift/mask - use DCE6 specific transform registers shift/mask - use DCE6 specific link encoder registers shift/mask - use DCE6 specific output pixel processing registers shift/mask - use DCE6 specific audio registers shift/mask - use DCE6 specific dmcu registers shift/mask - use DCE6 specific hwseq registers shift/mask - use DCE6 specific mem input registers shift/mask (v2) Changelog: - use DCE6 ad hoc dce60_mem_input_construct() function - use DCE6 ad hoc dce60_transform_construct() function (v3) Changelog: - use DCE6 ad hoc dce60_ipp_construct() function (v4) Changelog: - use DCE6 ad hoc dce60_link_encoder_construct() function (v5) Changelog: - use DCE6 ad hoc dce60_opp_construct() function (v6) Changelog: - use DCE6 ad hoc dce60_audio_create() function Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 9caf2a1f4e8aeff31124c807a529375451a56899 Author: Mauro Rossi Date: Fri Jul 10 20:45:01 2020 +0200 drm/amd/display: dce60_timing_generator: add DCE6 specific functions (v2) [Why] DCE6 has CRTC_PREFETCH_EN bit in CRTC_CONTROL register DCE6 has no CRTC_LEGACY_REQUESTOR_EN bit in CRTC_START_LINE_CONTROL register DCE6 has no CRTC_CRC_CNTL register [How] Modify dce60_timing_generator_enable_advanced_request() function Add dce60_configure_crc() function and dce60_is_tg_enabled() kept as static Use dce60_configure_crc() function in dce60_tg_funcs v2: remove unused variable (Alex) Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 1bd26c7db150a98ebc13e417341bc4dcf67c0b0d Author: Mauro Rossi Date: Sun Jul 12 22:54:13 2020 +0200 drm/amd/display: dce60_hw_sequencer: add DCE6 specific .cursor_lock [Why] kernel WARNING due to use of .cursor_lock = dce_pipe_control_lock inherited by dce110 [How] DCE6 set .cursor_lock = dce60_pipe_control_lock Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 167d74fd7dfc18158c116c84565dda24b40473c6 Author: Mauro Rossi Date: Fri Jul 10 20:40:01 2020 +0200 drm/amd/display: dce60_hw_sequencer: add DCE6 specific functions (v2) [Why] DCE6 has no bottom_pipe and no Blender HW DCE6 needs 'blank_target' set to false in order to turn on the display DCE6 has a specific dce60_pipe_control_lock() fuction that is a no op [How] Add DCE6 specific functions with needed private dce60_* dependent fuctions Comment DCE6 specific CTRC program visibility implementation Fix a typo in the initial header includes comment 's/DCE8/DCE6/g' Use dce60_apply_ctx_for_surface() in dce60_hw_sequencer_construct Use dce60_pipe_control_lock() in dce60_hw_sequencer_construct v2: add missing return type (Alex) Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 102b2f587ac814afd9ef396dd6fccb99d7f4d649 Author: Mauro Rossi Date: Thu Jul 16 00:54:08 2020 +0200 drm/amd/display: dce_transform: DCE6 Scaling Horizontal Filter Init (v2) [Why] DCE6 has specific SCL_HORZ_FILTER_INIT_{LUMA_RGB,CHROMA} registers In DCE6 h_init_luma and h_init_chroma initialization is required Some DCE6 specific SCL_{HORZ,VERT}_FILTER_CONTROL masks were not listed [How] Add the registers and masks in dce_transform.h Add DCE6 specific struct sclh_ratios_inits in dce_transform.h Add dce60_calculate_inits() function Add dce60_program_scl_ratios_inits() function Fix dce60_transform_set_scaler() function v2: remove unused variable (Alex) Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit b70aaf5586f214d610ac21606128c0c992db5d9c Author: Mauro Rossi Date: Fri Jul 10 20:35:01 2020 +0200 drm/amd/display: dce_transform: add DCE6 specific macros,functions [Why] DCE6 has no SCL_MODE and no SCL_{HORZ,VERT}_FILTER_INIT registers DCE6 has no SCL_BOUNDARY_MODE bit in SCL_CONTROL register DCE6 has Line Buffer programming registers (DC_LB_MEMORY_SPLIT,DC_LB_MEM_SIZE) DCE6 DATA_FORMAT register has only INTERLEAVE_EN bit DCE6 has no Out Clamp Control programming registers (OUT_CLAMP_CONTROL_*) [How] Add DCE6 specific macros definitions for XFM registers and masks Add DCE6 specific registers to dce_transform_registers struct Add DCE6 specific masks to dce_transform_mask struct DCE6 XFM macros/structs changes will avoid buiding errors when using DCE6 headers Add dce60_setup_scaling_configuration() w/o missing Scaling registers/bit programming Add dce60_transform_set_scaler() using DCE6 Line Buffer programming registers Add dce60_program_bit_depth_reduction() w/o Out Clamp Control programming Add dce60_transform_set_pixel_storage_depth() use dce60_program_bit_depth_reduction() Use dce60_transform_set_scaler() in dce60_transform_funcs Use dce60_transform_set_pixel_storage_depth() in dce60_transform_funcs Add DCE6 specific dce60_transform_construct Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit d85a1e536ab8cbc9f96f7a0554703887d603c401 Author: Mauro Rossi Date: Fri Jul 10 20:30:01 2020 +0200 drm/amd/display: dce_opp: add DCE6 specific macros,functions [Why] DCE6 has no FMT_TRUNCATE_MODE bit in FMT_BIT_DEPTH_CONTROL register DCE6 has no FMT_CLAMP_COMPONENT_{R,G,B} registers DCE6 has no FMT_SUBSAMPLING_{MODE,ORDER} bits in FMT_CONTROL register [How] Add DCE6 specific macros definitions for OPP registers and masks DCE6 OPP macros will avoid buiding errors when using DCE6 headers Add dce60_set_truncation() w/o FMT_TRUNCATE_MODE bit programming Add dce60_opp_set_clamping() w/o Format Clamp Component programming Add dce60_opp_program_fmt() w/o Format Subsampling bits programming Add dce60_opp_program_bit_depth_reduction() with dce60_set_truncation Use dce60_opp_program_fmt() in dce60_opp_funcs Use dce60_opp_program_bit_depth_reduction() in dce60_opp_funcs Add DCE6 specific dce60_opp_construct Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit b91f056fb5e192411635ce9e9e81f9f741ea1f5f Author: Mauro Rossi Date: Fri Jul 10 20:25:01 2020 +0200 drm/amd/display: dce_mem_input: add DCE6 specific macros,functions (v2) [Why] DCE6 has DPG_PIPE_ARBITRATION_CONTROL3 register for Line Buffer watermark selection DCE6 has STUTTER_EXIT_SELF_REFRESH_WATERMARK_MASK mask for Stutter watermark selection DCE6 has NB_PSTATE_CHANGE_WATERMARK_MASK mask for North Bridge watermark selection DCE6 has no GRPH_MICRO_TILE_MODE mask DCE6 has no HW_ROTATION register [How] Add DCE6 specific macros definitions for MI registers and masks Add DCE6 specific registers to dce_mem_input_registers struct Add DCE6 specific masks to dce_mem_input_masks struct DCE6 MI macros/structs changes will avoid buiding errors when using DCE6 headers Add dce60_program_urgency_watermark() function Add dce60_program_nbp_watermark() function Add dce60_program_stutter_watermark() function Add dce60_mi_program_display_marks() function w/ new DCE6 watermark programming Add DCE6 specific tiling programming and modify DCE8 case Add dce60_program_size() fuction w/o Rotation processing Add dce60_mi_program_surface_config() fuction Use dce60_mi_program_display_marks() in dce60_mi_funcs Use dce60_mi_program_surface_config() in dce60_mi_funcs Add DCE6 specific dce60_mem_input_construct v2: remove unused variable (Alex) Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit c1a64ebd4d13da1ddc4ec7ddc14a0c86a281a7f8 Author: Mauro Rossi Date: Fri Jul 10 20:20:01 2020 +0200 drm/amd/display: dce_link_encoder: add DCE6 specific macros,functions [Why] DCE6 has no DP_DPHY_SCRAM_CNTL register [How] Add DCE6 specific macros definitions for LE registers DCE6 LE macros will avoid buiding errors when using DCE6 headers Add dce60_set_dp_phy_pattern_hbr2_compliance_cp2520_2() w/o Scramble Control programming Add dce60_set_dp_phy_pattern_passthrough_mode() w/o Scramble Control programming Add dce60_configure_encoder() w/o Scramble Control programming Add dce60_link_encoder_enable_dp_output() w/ dce60_configure_encoder Add dce60_link_encoder_enable_dp_mst_output() w/ dce60_configure_encoder Add dce60_link_encoder_dp_set_phy_pattern() w/ dce60_set_dp_phy_pattern_passthrough_mode Use dce60_link_encoder_enable_dp_output() in dce60_lnk_enc_funcs Use dce60_link_encoder_enable_dp_mst_output() in dce60_lnk_enc_funcs Use dce60_link_encoder_dp_set_phy_pattern() in dce60_lnk_enc_funcs Add DCE6 specific dce60_link_encoder_construct Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 89571d7c31011abd5673ef22f0da72ecaef7b7a5 Author: Mauro Rossi Date: Fri Jul 10 20:15:01 2020 +0200 drm/amd/display: dce_ipp: add DCE6 specific macros,functions [Why] DCE6 does not have CURSOR2_DEGAMMA_MODE bit in DEGAMMA_CONTROL register [How] Add DCE6 specific macros definitions for IPP masks DCE6 IPP macros will avoid buiding errors when using DCE6 headers Add dce60_ipp_set_degamma() function w/o Cursor2 Degamma programming Use dce60_ipp_set_degamma() in ipp_funcs dce60_ipp_funcs Add DCE6 specific dce60_ipp_construct Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit ff0649f846395690aadc3c43c2c85995e32e8322 Author: Mauro Rossi Date: Fri Jul 10 20:10:01 2020 +0200 drm/amd/display: dce_hwseq: add DCE6 specific macros,functions [Why] DCE6 has no BLND_CONTROL register for Blender HW programming DCE6 has no BLND_V_UPDATE_LOCK register for Pipe Locking [How] Add DCE6 specific macros definitions for HWSEQ registers and masks DCE6 HWSEQ macros will avoid buiding errors when using DCE6 headers Add dce60_pipe_control_lock() stub with no op Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit eab5a79984b1736a5b2b5b0713e8e179df7f8442 Author: Mauro Rossi Date: Fri Jul 10 20:05:01 2020 +0200 drm/amd/display: dce_dmcu: add DCE6 specific macros,functions [Why] DCE6 has no SMU_INTERRUPT_CONTROL register, but it's used for DCN10 and later [How] Add DCE6 specific macros definitions for DMCU registers and masks DCE6 DMCU macros will avoid buiding errors when using DCE6 headers There is no other change needed in dce_dcmu Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 2a39b1f16b526528132685e308fe83a64bafb263 Author: Mauro Rossi Date: Fri Jul 10 20:00:51 2020 +0200 drm/amd/display: dce_audio: add DCE6 specific macros,functions [Why] DCE6 has no DCCG_AUDIO_DTO2_USE_512FBR_DTO mask in DCCG_AUDIO_DTO_SOURCE register [How] Add DCE6 specific macros definitions for AUD masks DCE6 AUD macros will avoid buiding errors when using DCE6 headers Add dce60_aud_wall_dto_setup() w/o 512*Fs programming Use dce60_aud_wall_dto_setup() in dce60_funcs Add DCE specific dce60_audio_create Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit f17f90f4fe43a4ff157a15d5be1986b2bdfe2aed Author: Mauro Rossi Date: Fri Jun 19 00:12:05 2020 +0200 drm/amd/display: dc/dce60: set max_cursor_size to 64 [Why] Issue in the Mouse cursor size in Linux Desktop Environments [How] In DCE6 dc->caps.max_cursor_size need to be set as 64 instead of 128 Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 3ecb3b794e2c1793443b72a968cb09d829c01a10 Author: Mauro Rossi Date: Sat Jul 11 22:59:07 2020 +0200 drm/amd/display: dc/clk_mgr: add support for SI parts (v2) (v1) Changelog [Why] After commit c69dd2d "drm/amd/display: Refactor clk_mgr functions" dc/clk_mgr requires these changes to add SI parts support Necessary to avoid hitting default: ASSERT(0); /* Unknown Asic */ that would cause kernel freeze [How] Add case statement for FAMILY_SI chipsets (v2) Changelog [Why] DCE6 has no DPREFCLK_CNTL register [How] Add DCE6 specific macros definitions for CLK registers and masks Add DCE6 specific dce60/dce60_clk_mgr.c for DCE6 customization Code style: reuse all the public functions in dce100/dce_clk_mgr.h header Code style: use dce60_* static functions as per other DCE implementations Add dce60_get_dp_ref_freq_khz() w/o using DPREFCLK_CNTL register Use dce60_get_dp_ref_freq_khz() function in dce60_funcs Add DCE6 specific dce60_clk_mgr_construct dc/clk_mgr/dce_clk_mgr.c: use dce60_clk_mgr_construct for FAMILY_SI chipsets Add Makefile rules for dce60_clk_mgr.o target conditional to CONFIG_DRM_AMD_DC_SI Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 55e56389bdecc4f08524a6ae81940b13f986e125 Author: Mauro Rossi Date: Sun May 26 17:33:45 2019 +0200 drm/amd/display: amdgpu_dm: add SI support (v4) [Why] amdgpu_dm.c requires changes for SI chipsets init and irq handlers registration [How] SI support: load_dmcu_fw(), amdgpu_dm_initialize_drm_device(), dm_early_init() Add DCE6 specific dce60_register_irq_handlers() function (v1) NOTE: As per Kaveri and older amdgpu.dc=1 kernel cmdline is required (v2) fix for bc011f9 ("drm/amdgpu: Change SI/CI gfx/sdma/smu init sequence") remove CHIP_HAINAN support since it does not have physical DCE6 module (v3) fix vblank irq support for DCE6 using ad hoc dce60_register_irq_handlers() replicating for vblank irq the behavior of dce110_register_irq_handlers() as per commit b57de80 ("drm/amd/display: Register on VLBLANK ISR.") (v4) updated due to following kernel 5.2 commit: b2fddb13 ("drm/amd/display: Drop underlay plane support") Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 61bf32937bdd05fdf74292460d56936d63beaba5 Author: Mauro Rossi Date: Sat Feb 8 10:41:01 2020 +0100 drm/amd/display: dc/irq: add support for DCE6 (v4) [Why] irq service requires changes for DCE6 support [How] (v1) DCE6 targets are added replicating existing DCE8 implementation. due to missing CRTC_VERTICAL_INTERRUPT0_CONTROL registers/masks, dce/dce_8_0_{d,sh_mask}.h used instead of dce/dce_6_0_{d,sh_mask}.h (v2) DCE6 headers used adding the necessary vblank irq registers (INT_MASK and VBLANK_STATUS) and vblank irq masks as implemented in amdgpu driver. Add vblank_irq_info_funcs_dce60 with .set and .ack as per commit b10d51f ("drm/amd/display: Add interrupt entries for VBLANK isr.") and use it in vblank_int_entry(reg_num) macro definition (v3) updated due to following kernel 5.3 commit: 4fc4dca ("drm/amd: drop use of drmp.h in os_types.h") (v4) updated due to following kernel 5.6 commit: d9e3267 ("drm/amd/display: cleanup of construct and destruct funcs") Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit b168930d68a95d7696773007b426a0f60a9c3fd7 Author: Mauro Rossi Date: Sun Sep 29 18:41:38 2019 +0200 drm/amd/display: dc/gpio: add support for DCE6 (v2) [Why] hw_factory.c requires changes for DCE6 support [How] DCE6 targets added replicating and adapting existing DCE8 implementation. (v2) changes due to following commit: 91db931 ("drm/amd/display: refactor gpio to allocate hw_container in constructor") Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit c4a54f70a6afd1a91072ef06cb083221ff189cca Author: Mauro Rossi Date: Fri Oct 5 22:53:25 2018 +0200 drm/amd/display: dc/bios: add support for DCE6 [Why] command_table_helper.c requires changes for DCE6 support [How] DCE6 targets added replicating and adapting the existing DCE8 implementation. Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 683b59504d4ecec3251a23fdac7e8775385a18c5 Author: Mauro Rossi Date: Sun May 26 17:31:42 2019 +0200 drm/amd/display: dc/core: add SI/DCE6 support (v2) [Why] resource_parse_asic_id() and dc_create_resource_pool() are missing SI/DCE6 cases [How] SI/DCE6 cases support added using existing DCE8 implementation as a reference (v2) updated due to following kernel 5.2 commit: d9673c9 ("drm/amd/display: Pass init_data into DCN resource creation") Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit 7c15fd86aaec3e602e140c242369df2baddc865e Author: Mauro Rossi Date: Sat Jul 11 21:43:25 2020 +0200 drm/amd/display: dc/dce: add initial DCE6 support (v10) [Why] DCE6 chipsets have a lot in common with DCE8, let's start from this [How] DCE6 targets are added replicating existing DCE8 implementation. NOTE: dce_8_0_{d,sh_mask}.h headers used instead of dce_6_0_{d,sh_mask}.h initial build prototype due to missing DCE6 macros/registers/masks DCE6 specific macros/registers/masks will be added with later commits (v2b) removed dce_version cases in dc/dce/dce_clock_source.c and updated dce60 due to following kernel 5.0 commits: 24f7dd7 ("drm/amd/display: move pplib/smu notification to dccg block") 9566b67 ("drm/amd/display: remove safe_to_lower flag from dc, use 2 functions instead") 4244381 ("drm/amd/display: clean up base dccg struct") 4c5e8b5 ("drm/amd/display: split dccg clock manager into asic folders") 84e7fc0 ("drm/amd/display: rename dccg to clk_mgr") 77f6916 ("drm/amd/display: Remove duplicate header") 9f7ddbe ("drm/amd/display: fix optimize_bandwidth func pointer for dce80") 4ece61a ("drm/amd/display: set clocks to 0 on suspend on dce80") (v3b) updated dce60 due to following kernel 5.1 commits: 380604e ("drm/amd/display: Use 100 Hz precision for pipe pixel clocks") 32e6136 ("drm/amd/display: Fix 64-bit division for 32-bit builds") 1877ccf ("drm/amd/display: Change from aux_engine to dce_aux") c69dffa ("drm/amd/display: fix eDP fast bootup for pre-raven asic") (v4b) updated dce60 due to following kernel 5.2 commits: e5c4197 ("drm/amd/display: Add plane capabilities to dc_caps") 813d20d ("drm/amd/display: Fix multi-thread writing to 1 state") ea36ad3 ("drm/amd/display: expand plane caps to include fp16 and scaling capability") afcd526 ("drm/amd/display: Add fast_validate parameter") (v5b) updated dce60 due to following kernel 5.3 commits: e7e10c4 ("drm/amd/display: stop external access to internal optc sync params") 78cc70b ("drm/amd/display: Engine-specific encoder allocation") dc88b4a ("drm/amd/display: make clk mgr soc specific") 4fc4dca ("drm/amd: drop use of drmp.h in os_types.h") (v6b) updated dce60 due to following kernel 5.4 commits: 54a9bcb ("drm/amd/display: Fix a typo - dce_aduio_mask --> dce_audio_mask") 9adc805 ("drm/amd/display: make firmware info only load once during dc_bios create") (v7b) updated dce60 due to following kernel 5.5 commits: cabe144 ("drm/amd/display: memory leak") 8276dd8 ("drm/amd/display: update register field access mechanism") f6040a4 ("drm/amd/display: configurable aux timeout support") bf7f5ac ("drm/amd/display: map TRANSMITTER_UNIPHY_x to LINK_REGS_x") (v8b) updated dce60 due to following kernel 5.6 commits: d9e3267 ("drm/amd/display: cleanup of construct and destruct funcs") f42ea55 ("drm/amd/display: add separate of private hwss functions") (v9b) updated dce60 due to following kernel 5.8 commits: bba8289 ("drm/amd/display: code clean up in dce80_hw_sequencer.c") 904fb6e ("drm/amd/display: move panel power seq to new panel struct") d4caa72 ("drm/amd/display: change from panel to panel cntl") (v10) Fix up PLL handling for DCE6: DCE6.0 supports 2 PLLs. DCE6.1 supports 3 PLLs. (Alex) Reviewed-by: Alex Deucher Signed-off-by: Mauro Rossi Signed-off-by: Alex Deucher commit f233c09842bc91a8f7f5dfadc6de77f52273befc Author: Mauro Rossi Date: Sat Jul 11 21:28:48 2020 +0200 drm/amd/display: add asics info for SI parts [Why] Asic info for SI parts need to be preliminarly added [How] Asics info retrieved from si_id.h in https://github.com/GPUOpen-Tools/CodeXL Tree path: ./CodeXL/Components/ShaderAnalyzer/AMDTBackEnd/Include/Common/asic_reg/si_id.h Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Mauro Rossi commit 6863660d72e4fde650658acc10e4558ec1a277fb Author: Alex Deucher Date: Mon Jun 22 17:06:14 2020 -0400 drm/amdgpu: add some required DCE6 registers (v7) To help with the DC port. v2: add missing masks, add additional registers v3: more updates v4: fix accidently dropped changes v5: add missing nb pstate mask v6: add vblank, vline masks v7: add SCL_HORZ_FILTER_INIT regs Signed-off-by: Alex Deucher commit 9b66d6600e6a060333712c54af90631eb6276d93 Author: Dan Carpenter Date: Mon Jul 27 16:39:40 2020 +0300 drm/amd/powerplay: off by one bugs in smu_cmn_to_asic_specific_index() These tables have _COUNT number of elements so the comparisons should be >= instead of > to prevent reading one element beyond the end of the array. Fixes: 8264ee69f0d8 ("drm/amd/powerplay: drop unused code") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 4c0d0bcb224f968510aff5eddef2b294e5aa4b8b Author: Christophe JAILLET Date: Mon Jul 27 12:34:21 2020 +0200 drm/radeon: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'radeon_gart_table_ram_alloc()' GFP_KERNEL can be used because its callers already use this flag. Both 'r100_pci_gart_init()' (r100.c) and 'rs400_gart_init()' (rs400.c) call 'radeon_gart_init()'. This function uses 'vmalloc'. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Reviewed-by: Christian König Signed-off-by: Christophe JAILLET Signed-off-by: Alex Deucher commit f5cd85555bf2ced9725a1eb5cd68f2c2096e283a Author: Christophe JAILLET Date: Mon Jul 27 12:34:36 2020 +0200 drm/radeon: avoid a useless memset Avoid a memset after a call to 'dma_alloc_coherent()'. This is useless since commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*") Reviewed-by: Christian König Signed-off-by: Christophe JAILLET Signed-off-by: Alex Deucher commit 1ee1290363b57361ebf6addbfbbb57dabc4c7a36 Author: Bhawanpreet Lakha Date: Fri Jul 24 16:36:07 2020 -0400 drm/amd/display: Use proper abm/backlight functions for DCN3 Use DCN21 functions instead of DCE110 Signed-off-by: Bhawanpreet Lakha Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 94bc373b7f1669b0fa227051f6080a6988d9d4ea Author: Bhawanpreet Lakha Date: Tue Jul 21 13:59:52 2020 -0400 drm/amd/display: Use seperate dmcub firmware for navy_flounder [Why] Currently navy_flounder is using sienna_cichlid_dmcub.bin. [How] Create a seperate define so navy_flounder will use its own firmware. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b246f90a09706ecf755c40006fc8b4c07cdfc314 Author: Martin Tsai Date: Wed Jul 15 11:21:43 2020 +0800 drm/amd/display: Check lane status again after link training done [Why] Some monitors could suffer symbol unlock but cannot send HPD IRQ to notic source device to handle link loss. This makes monitor stuck in abnormal status and causes black screen. [How] According to the suggestion from scalar vendor, to check lane status again after link training done. That can improve the comaptibility from current production monitors. Signed-off-by: Martin Tsai Reviewed-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit be6ccdf861de048833b2000d80db800ab4f8d81b Author: Alvin Lee Date: Tue Jul 14 15:06:40 2020 -0400 drm/amd/display: Don't compare dppclk before updating DTO [Why] In dcn3_update_clocks there are situations where dppclk is not lowered (i.e. stays the same), but DTO still needs to be increased before we program pipe frontend (i.e. in prepare_bandwidth). If we don't program the new DTO value before we program the pipe, we will underflow as soon as the pipe lock is released until the next call to dcn3_update_clocks where the DTO is updated. [How] Remove dppclk check before programming new DTO value. Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit f92e25e56137cb410c89dd5d69aed47849b3236c Author: Eryk Brol Date: Tue Jun 16 16:29:19 2020 -0400 drm/amd/display: Fix naming of DSC Debugfs entry [why] Fix naming and return bits rather than bytes per pixel for naming consistency. Because registers return Bytes per pixel, but DSC Config structure is expecting bits per pixel as input. So when returning the value convert from bytes into bits. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Mikita Lipski Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 91b2e45be439e098f4f2e17be1c87570e5a42928 Author: Eryk Brol Date: Tue Jun 16 16:24:11 2020 -0400 drm/amd/display: Rename bytes_pp to the correct bits_pp [Why] Struct dcn_dsc_state is used for reading current state and parameters of DSC on a pipe, the target rate parameter uses bytes per pixel even though its reading BITS_PER_PIXEL register. [How] Changing it to Bits Per Pixel for consistency. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Mikita Lipski Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit a00d8fd405ed7c071b2e3fa12a2e03d0a0d2d6fa Author: Dmytro Laktyushkin Date: Mon Jul 6 10:54:37 2020 -0400 drm/amd/display: Clean up global sync param retrieval [Why] This change replaces older looping code in favor of these functions. [How] There are built in functions for extracting global sync params during mode validation now. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 0eb52d81565588797d031d50f09fe871112f1138 Author: Kevin Wang Date: Mon Jul 27 09:08:22 2020 +0800 drm/amd/swsmu: allow asic to handle sensor type by itself 1. allow asic to handle sensor type by itself. 2. if not, use smu common sensor to handle it. Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 48ef409c25a632caeb19093b8513a17028372097 Author: John Clements Date: Mon Jul 27 11:36:18 2020 +0800 drm/amdgpu: add support for umc 8.7 ras functions added support for umc 8.7 error reporting and query Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit d817f3753e6d31469358d2ae7664b616360d057f Author: Likun Gao Date: Fri Jul 24 17:24:08 2020 +0800 drm/amd/powerplay: update driver if file for sienna_cichlid Update sienna_cichlid driver if header and related files. Support new smu metrics for pre & postDS frequency. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 6b36fa6143f6caa16bfe92c639b3dad4694b58b0 Author: John Clements Date: Mon Jul 27 10:41:44 2020 +0800 drm/amdgpu: add umc v8_7_0 IP headers the change introduces IP headers for unified memory controller (umc) Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 81b41ff5d287bc2346ee7ffb544ace3557f05642 Author: Evan Quan Date: Tue Jul 14 14:25:39 2020 +0800 drm/amd/powerplay: revise the outputs layout of amdgpu_pm_info debugfs The current outputs of amdgpu_pm_info debugfs come with clock gating status and followed by current clock/power information. However the clock gating status retrieving may pull GFX out of CG status. That will make the succeeding clock/power information retrieving inaccurate. To overcome this and be with minimum impact, the outputs are updated to show current clock/power information first. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1df67a4ecedd34046a867afa6b29c12baf03cd25 Author: James Zhu Date: Sat Jul 25 09:30:35 2020 -0400 Revert "drm/amdgpu/vcn3.0: remove extra asic type check" This reverts commit 058c07201ec7d373fc6a0a570b38a8a9d62c29fb. Chip NAVY_FLOUNDER uses vcn3.0, but it has only one VCN instance. Signed-off-by: James Zhu Signed-off-by: Alex Deucher commit ea368183ae900e376b66d3f23da22acde48e385a Author: Jay Cornwall Date: Fri Jul 24 16:58:48 2020 -0700 drm/amdkfd: Fix spurious debug exception on gfx10 s_barrier triggers a debug exception when issued with PRIV=1, DEBUG_EN=1. This causes spurious notifications to rocm-gdb. Clear MODE before issuing s_barrier and restore MODE afterwards in the context restore handler. Signed-off-by: Jay Cornwall Tested-by: Laurent Morichetti Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 059ea10abdddfbfb3ec4c29c120344846745223b Author: Changfeng Date: Fri Jul 24 13:15:10 2020 +0800 drm/amd/powerplay: drop unnecessary message support check(v2) Take back patch:drop unnecessary message support check Because the gpu reset fail problem on renoir can be fixed by: drm/amd/powerplay: skip invalid msg when smu set mp1 state It needs to remove SWSMU_CODE_LAYER_L1 in smu_cmn.h to guard a clear code layer. Signed-off-by: changfeng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 2c2b0d880f1b4c01f30e14242977b82fa527342d Author: Mukul Joshi Date: Thu Jul 23 23:09:57 2020 -0400 drm/amdkfd: Add thermal throttling SMI event Add support for reporting thermal throttling events through SMI. Also, add a counter to count the number of throttling interrupts observed and report the count in the SMI event message. Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit df9c8d1aa278c435c30a69b8f2418b4a52fcb929 Author: Dennis Li Date: Wed Jul 8 15:07:13 2020 +0800 drm/amdgpu: fix system hang issue during GPU reset when GPU hang, driver has multi-paths to enter amdgpu_device_gpu_recover, the atomic adev->in_gpu_reset and hive->in_reset are used to avoid re-entering GPU recovery. During GPU reset and resume, it is unsafe that other threads access GPU, which maybe cause GPU reset failed. Therefore the new rw_semaphore adev->reset_sem is introduced, which protect GPU from being accessed by external threads during recovery. v2: 1. add rwlock for some ioctls, debugfs and file-close function. 2. change to use dqm->is_resetting and dqm_lock for protection in kfd driver. 3. remove try_lock and change adev->in_gpu_reset as atomic, to avoid re-enter GPU recovery for the same GPU hang. v3: 1. change back to use adev->reset_sem to protect kfd callback functions, because dqm_lock couldn't protect all codes, for example: free_mqd must be called outside of dqm_lock; [ 1230.176199] Hardware name: Supermicro SYS-7049GP-TRT/X11DPG-QT, BIOS 3.1 05/23/2019 [ 1230.177221] Call Trace: [ 1230.178249] dump_stack+0x98/0xd5 [ 1230.179443] amdgpu_virt_kiq_reg_write_reg_wait+0x181/0x190 [amdgpu] [ 1230.180673] gmc_v9_0_flush_gpu_tlb+0xcc/0x310 [amdgpu] [ 1230.181882] amdgpu_gart_unbind+0xa9/0xe0 [amdgpu] [ 1230.183098] amdgpu_ttm_backend_unbind+0x46/0x180 [amdgpu] [ 1230.184239] ? ttm_bo_put+0x171/0x5f0 [ttm] [ 1230.185394] ttm_tt_unbind+0x21/0x40 [ttm] [ 1230.186558] ttm_tt_destroy.part.12+0x12/0x60 [ttm] [ 1230.187707] ttm_tt_destroy+0x13/0x20 [ttm] [ 1230.188832] ttm_bo_cleanup_memtype_use+0x36/0x80 [ttm] [ 1230.189979] ttm_bo_put+0x1be/0x5f0 [ttm] [ 1230.191230] amdgpu_bo_unref+0x1e/0x30 [amdgpu] [ 1230.192522] amdgpu_amdkfd_free_gtt_mem+0xaf/0x140 [amdgpu] [ 1230.193833] free_mqd+0x25/0x40 [amdgpu] [ 1230.195143] destroy_queue_cpsch+0x1a7/0x270 [amdgpu] [ 1230.196475] pqm_destroy_queue+0x105/0x260 [amdgpu] [ 1230.197819] kfd_ioctl_destroy_queue+0x37/0x70 [amdgpu] [ 1230.199154] kfd_ioctl+0x277/0x500 [amdgpu] [ 1230.200458] ? kfd_ioctl_get_clock_counters+0x60/0x60 [amdgpu] [ 1230.201656] ? tomoyo_file_ioctl+0x19/0x20 [ 1230.202831] ksys_ioctl+0x98/0xb0 [ 1230.204004] __x64_sys_ioctl+0x1a/0x20 [ 1230.205174] do_syscall_64+0x5f/0x250 [ 1230.206339] entry_SYSCALL_64_after_hwframe+0x49/0xbe 2. remove try_lock and introduce atomic hive->in_reset, to avoid re-enter GPU recovery. v4: 1. remove an unnecessary whitespace change in kfd_chardev.c 2. remove comment codes in amdgpu_device.c 3. add more detailed comment in commit message 4. define a wrap function amdgpu_in_reset v5: 1. Fix some style issues. Reviewed-by: Hawking Zhang Suggested-by: Andrey Grodzovsky Suggested-by: Christian König Suggested-by: Felix Kuehling Suggested-by: Lijo Lazar Suggested-by: Luben Tukov Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit c5079f35c0ec315c944398e687821c1ceb6c6d4f Author: Boyuan Zhang Date: Thu Jul 23 22:34:22 2020 -0400 drm/amdgpu: update dec ring test for VCN 3.0 Signed-off-by: Boyuan Zhang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 6c3e0504339d0819ee0d296e857fd100d9170dfa Author: Colin Ian King Date: Thu Jul 23 15:36:37 2020 +0100 drm/amd/display: remove redundant initialization of variable result The variable result 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. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 309182389e367a806744c94a8bca75d472434015 Author: James Zhu Date: Thu Jul 23 11:42:33 2020 -0400 drm/amdgpu/vcn3.0: remove extra asic type check vcn ip block is already selected based on ASIC type during set_ip_blocks. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 156589f74d07fbf4083b05712a3d71f834fdf2af Author: James Zhu Date: Thu Jul 23 11:07:52 2020 -0400 drm/amdgpu/jpeg3.0: remove extra asic type check jpeg ip block is already selected based on ASIC type during set_ip_blocks. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 0a5baee415000a3e18730ac98e19d046c3cebbe6 Author: Laurent Morichetti Date: Mon Jul 6 16:13:40 2020 -0700 drm/amdkfd: Unify gfx9/gfx10 context save area layouts Add some padding before the MODE register in the HWREGs block to preserve the same layout as gfx9. This simplifies implementation of a user-mode debugger. Signed-off-by: Laurent Morichetti Reviewed-by: Jay Cornwall Acked-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 26cfd12b5e24993ac943ac37044128fe33b3ed94 Author: Tom St Denis Date: Thu Jul 23 08:51:55 2020 -0400 drm/amd/amdgpu: Add RLC_CGTT_MGCG_OVERRIDE to gfx 10.3 headers Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8214617aafa31c7d30721e3f9128737a1259a52a Author: James Zhu Date: Wed Jun 3 09:29:27 2020 -0400 drm/amdgpu: Remove extra asic type check vcn ip block is already selected based on ASIC type during set_ip_blocks Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit de7fe7e87a926743b05b895575d58e853f3bb515 Author: James Zhu Date: Thu Jun 4 12:02:06 2020 -0400 drm/amdgpu/jpeg: Remove extra asic type check jpeg ip block is already selected based on ASIC type during set_ip_blocks. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 8f22c21dce5b6a8a50049275f77c771c598e5598 Author: Sam Ravnborg Date: Mon Jul 27 19:03:20 2020 +0200 drm/bridge: nxp-ptn3460: add drm_panel_bridge support Prepare the bridge driver for use in a chained setup. - Replacing direct use of drm_panel with drm_panel_bridge support. - Make the connector creation optional Note: the bridge panel will use the connector type from the panel. v3: - Fix wrong logic in connector creation (Laurent) v2: - Use panel_bridge for local variable name to align with other drivers - Fix that connector was created twice (Laurent) - Set bridge.type to DRM_MODE_CONNECTOR_LVDS. Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200727170320.959777-6-sam@ravnborg.org commit 4151c14cdda689fd64299736f2779668a9fb3a7d Author: Sam Ravnborg Date: Mon Jul 27 19:03:19 2020 +0200 drm/bridge: nxp-ptn3460: add get_edid bridge operation Add the get_edid() bridge operation to prepare for use as a chained bridge. Add helper function that is also used by the connector. v2: - Fix memory leak (Laurent) - Do not save a copy of edid, read it when needed Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200727170320.959777-5-sam@ravnborg.org commit de5e6c027ae67dd1dfcd3022593651c24b3f794a Author: Sam Ravnborg Date: Mon Jul 27 19:03:18 2020 +0200 drm/bridge: tc358767: add drm_panel_bridge support With the bridge operations implemented the last step to prepare this driver for a chained setup is the use of the bridge panel driver. The bridge panel driver is only used when a port@2 is present in the DT. So when the display driver requests a connector support both situations: - connector created by bridge panel driver - connector created by this driver And on top, support that the display driver creates the connector, which is the preferred setup. Note: the bridge panel will use the connector type from the panel. v3: - Fix wrong logic in connector creation (Laurent) v2: - Merge connector and drm_panel_bridge patches and fix so we do not create two connectors (Laurent) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200727170320.959777-4-sam@ravnborg.org commit 731f4badcb3b47e2b0a1f4971a047fcaa552b406 Author: Sam Ravnborg Date: Mon Jul 27 19:03:17 2020 +0200 drm/bridge: tc358767: add get_edid bridge operation Prepare for chained bridge with the addition of get_edid support. v2: - Fixed handling of edid storage (Laurent) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200727170320.959777-3-sam@ravnborg.org commit 136d73a8c88d113b46d29c51710fe9e689e1b93e Author: Sam Ravnborg Date: Mon Jul 27 19:03:16 2020 +0200 drm/bridge: tc358767: add detect bridge operation Prepare the bridge driver for chained operation by adding support for the detect operation. v3: - Fix code to make it readable (Laurent) v2: - Do not announce detect operation if there is no hpd pin (Laurent) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200727170320.959777-2-sam@ravnborg.org commit a8ef18d7dd4817cc35ab03358b3fe2aafad22d9f Author: Sam Ravnborg Date: Sun Jul 26 22:33:22 2020 +0200 drm/bridge: megachips: make connector creation optional Make the connector creation optional to enable usage of the megachips-stdpxxxx-ge-b850v3-fw bridge with the DRM bridge connector helper. v2: - Set bridge.type to DRM_MODE_CONNECTOR_DisplayPort Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Peter Senna Tschudin Cc: Martin Donnelly Cc: Martyn Welch Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200726203324.3722593-14-sam@ravnborg.org commit 489ce80fa4942ba855b937eee7f621d52ccdff3f Author: Sam Ravnborg Date: Sun Jul 26 22:33:21 2020 +0200 drm/bridge: megachips: add get_edid bridge operation To prepare for a chained bridge setup add support for the get_edid bridge operation. There is no need for a copy of the edid - so drop the pointer to the copy. v2: - Fix so we do not leak memory (Laurent) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Peter Senna Tschudin Cc: Martin Donnelly Cc: Martyn Welch Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200726203324.3722593-13-sam@ravnborg.org commit a3d495ce5c0b25739b6e450d0810567819a96735 Author: Sam Ravnborg Date: Sun Jul 26 22:33:20 2020 +0200 drm/bridge: megachips: enable detect bridge operation To prepare for use in a chained bridge setup enable the detect operation. Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Peter Senna Tschudin Cc: Martin Donnelly Cc: Martyn Welch Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200726203324.3722593-12-sam@ravnborg.org commit 77860a7c892eca5a3a4b0d5e0e7065f1cd45c655 Author: Sam Ravnborg Date: Sun Jul 26 22:33:19 2020 +0200 drm/bridge: megachips: get drm_device from bridge Fix so drm_device is read from the bridge. This is a preparation for the connector being optional. Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Peter Senna Tschudin Cc: Martin Donnelly Cc: Martyn Welch Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200726203324.3722593-11-sam@ravnborg.org commit 43c601a6e85e9a1c2a013006345ccf12af578c10 Author: Sam Ravnborg Date: Sun Jul 26 22:33:18 2020 +0200 drm/bridge: megachips: add helper to create connector Factor out connector creation to a small helper function. Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Peter Senna Tschudin Cc: Martin Donnelly Cc: Martyn Welch Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200726203324.3722593-10-sam@ravnborg.org commit 5b851515eff335a3b09de46a0080a64d66085875 Author: Sam Ravnborg Date: Sun Jul 26 22:33:17 2020 +0200 drm/bridge: parade-ps8622: add drm_panel_bridge support Prepare the bridge driver for use in a chained setup by replacing direct use of drm_panel with drm_panel_bridge support. The connecter is now either created by the panel bridge or the display driver. So all code for connector creation in this driver is no longer relevant and thus dropped. The connector code had some special polling handling: connector.polled = DRM_CONNECTOR_POLL_HPD; drm_helper_hpd_irq_event(ps8622->bridge.dev); This code was most likely added to speed up detection of the connector. If really needed then this functionality belongs somewhere else. Note: the bridge panel will use the connector type from the panel. v2: - Fix to avoid creating connector twice (Laurent) - Drop all connector code - defer to bridge panel - Use panel_bridge for local variable to align with other drivers - Set bridge.type to DRM_MODE_CONNECTOR_LVDS; Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200726203324.3722593-9-sam@ravnborg.org commit 1644127f83bc72fcf2564dfbcab5802b587d964e Author: Sam Ravnborg Date: Sun Jul 26 22:33:13 2020 +0200 drm/bridge: tc358764: add drm_panel_bridge support Prepare the tc358764 bridge driver for use in a chained setup by replacing direct use of drm_panel with drm_panel_bridge support. The bridge panel will use the connector type reported by the panel, where the connector for this driver hardcodes DRM_MODE_CONNECTOR_LVDS. The tc358764 did not add any additional info the the connector so the connector creation is passed to the bridge panel driver. v3: - Merge with patch to make connector creation optional to avoid creating two connectors (Laurent) - Pass connector creation to bridge panel, as this bridge driver did not add any extra info to the connector. - Set bridge.type to DRM_MODE_CONNECTOR_LVDS. v2: - Use PTR_ERR_OR_ZERO() (kbuild test robot) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: kbuild test robot Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200726203324.3722593-5-sam@ravnborg.org commit 385ca38da29c214e03f526d28346176e1b500db8 Author: Sam Ravnborg Date: Sun Jul 26 22:33:12 2020 +0200 drm/bridge: tc358764: drop drm_connector_(un)register Drop drm_connector handling that is not needed: - drm_dev_register() in the display controller driver takes care of registering connectors. So the call to drm_connector_register() call is not needed in the bridge driver. - Use of drm_connector_unregister() is only required for drivers that explicit have called drm_dev_register. - The reference counting using drm_connector_put() is likewise not needed. Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200726203324.3722593-4-sam@ravnborg.org commit 9f069c6fbc72669311723262766047f577dba496 Author: Sam Ravnborg Date: Sun Jul 26 22:33:11 2020 +0200 drm/panel: panel-simple: add default connector_type All panels shall report a connector type. panel-simple has a lot of panels with no connector_type, and for these fall back to DPI as the default. v2: - Rebased on top of validation of panel description Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200726203324.3722593-3-sam@ravnborg.org commit ddb8e853dc8507ecf9c7b4630857771da1f89752 Author: Sam Ravnborg Date: Sun Jul 26 22:33:10 2020 +0200 drm/panel: panel-simple: validate panel description Warn if we detect a panel with incomplete/wrong description. This is inspired by a similar patch by Laurent that introduced checks for LVDS panels - this extends the checks to the remaining type of connectors. This is known to warn for some of the existing panels but added despite this as we need help from people using the panels to add the missing info. The checks are not complete but will catch the most common mistakes. The checks at the same time serve as documentation for the minimum required description for a panel. The checks uses dev_warn() as we know this will hit. WARN() was too noisy at the moment for anything else than LVDS. v3: - %d => %u for bpc (Laurent) v2: - Use dev_warn (Laurent) - Check for empty bus_flags Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200726203324.3722593-2-sam@ravnborg.org commit 2a5c2ff5848efc77a115c53d59655aa6016237e8 Author: Sam Ravnborg Date: Mon Apr 13 20:30:05 2020 +0200 drm/panel: add connector type to boe,hv070wsa-100 panel The boe,hv070wsa-100 panel is a LVDS panel. Fix connector type to reflect this. With this change users of this panel do not have to specify the connector type. v4: - Add .bpc = 4 (Laurent) v3: - Drop PIXDATA bus_flag, not relevant v2: - Add .bus_format (Laurent) - Add .bus_flags Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200703192417.372164-2-sam@ravnborg.org commit 23278bf54afe180967069bdc8c0f1c7a365fc63e Author: Vinod Koul Date: Thu Jul 23 22:04:42 2020 +0530 drm/bridge: Introduce LT9611 DSI to HDMI bridge Lontium Lt9611 is a DSI to HDMI bridge which supports two DSI ports and I2S port as an input and HDMI port as output Co-developed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Co-developed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Tested-by: John Stultz Signed-off-by: Vinod Koul Signed-off-by: Sam Ravnborg # fix lt9611_bridge_mode_valid Link: https://patchwork.freedesktop.org/patch/msgid/20200723163442.1280414-4-vkoul@kernel.org commit 8a72a2de0a4fc727970a06c565f1112ae82ed132 Author: Vinod Koul Date: Thu Jul 23 22:04:41 2020 +0530 dt-bindings: display: bridge: Add documentation for LT9611 Lontium LT9611 is a DSI to HDMI bridge which supports 2 DSI ports and I2S port as input and one HDMI port as output Reviewed-by: Rob Herring Tested-by: John Stultz Signed-off-by: Vinod Koul Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200723163442.1280414-3-vkoul@kernel.org commit 0d3df1c603de993163c6c9906373e8dde352c56a Author: Vinod Koul Date: Thu Jul 23 22:04:40 2020 +0530 dt-bindings: vendor-prefixes: Add Lontium vendor prefix Add prefix for Lontium Semiconductor Corporation Acked-by: Rob Herring Tested-by: John Stultz Signed-off-by: Vinod Koul Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200723163442.1280414-2-vkoul@kernel.org commit 6142b1b82ce43e6f7663f2e148ca48808f9d698f Author: Ville Syrjälä Date: Fri Jul 17 16:54:39 2020 +0300 drm/todo: Plumb drm_atomic_state all over Add a TODO for plumbing drm_atomic_state all over to ease the hurdles of accessing additional object states. Reviewed-by: Daniel Vetter #irc Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200717135439.5996-1-ville.syrjala@linux.intel.com commit ccda42a4629aa6ea48b5343a131ba420d0fa5c8f Author: Alex Deucher Date: Thu Jul 16 22:20:04 2020 -0400 drm/amdgpu/powerplay: add some documentation about memory clock We expose the actual memory controller clock rate in Linux, not the effective memory clock of the DRAMs. To translate it, it follows the following formula: Clock conversion (Mhz): HBM: effective_memory_clock = memory_controller_clock * 1 G5: effective_memory_clock = memory_controller_clock * 1 G6: effective_memory_clock = memory_controller_clock * 2 DRAM data rate (MT/s): HBM: effective_memory_clock * 2 = data_rate G5: effective_memory_clock * 4 = data_rate G6: effective_memory_clock * 8 = data_rate Bandwidth (MB/s): data_rate * vram_bit_width / 8 = memory_bandwidth Some examples: G5 on RX460: memory_controller_clock = 1750 Mhz effective_memory_clock = 1750 Mhz * 1 = 1750 Mhz data rate = 1750 * 4 = 7000 MT/s memory_bandwidth = 7000 * 128 bits / 8 = 112000 MB/s G6 on RX5600: memory_controller_clock = 900 Mhz effective_memory_clock = 900 Mhz * 2 = 1800 Mhz data rate = 1800 * 8 = 14400 MT/s memory_bandwidth = 14400 * 192 bits / 8 = 345600 MB/s Acked-by: Evan Quan Signed-off-by: Alex Deucher commit cc0e7ff8ffe01653a078824594e32be114414035 Author: Li Heng Date: Thu Jul 23 11:27:43 2020 +0800 drm/amdgpu: Remove redundant NULL check Fix below warnings reported by coccicheck: ./drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c:557:2-7: WARNING: NULL check before some freeing functions is not needed. Fixes: 4d55b0dd1cdd ("drm/amd/display: Add DCN3 CLK_MGR") Signed-off-by: Li Heng Signed-off-by: Alex Deucher commit c5a4ef3e20da16829bf417fb2093824c1bc0f82f Author: John Clements Date: Thu Jul 23 17:38:20 2020 +0800 drm/amdgpu: move umc specific macros to header certain umc macros are common across umc versions Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 8f3b800a31f8ac6fe243649c41bcfa15c987ce20 Author: Likun Gao Date: Thu Jul 23 15:26:27 2020 +0800 drm/amdgpu: update golden setting for sienna_cichlid Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 91190db1a72dada38f1ae375c63a6b02c8d3d465 Author: Likun Gao Date: Tue Jul 21 16:39:45 2020 +0800 drm/amd/powerplay: correct smu message for vf mode Set valid_in_vf to false for the message not support in vf mode on sienna cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7a3ecc82f1b9e14e8e864772f03ce040835735ba Author: Likun Gao Date: Tue Jul 21 13:13:39 2020 +0800 drm/amd/powerplay: add msg map for mode1 reset Mapping Mode1Reset message for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit ebee9621bbc1e9f07e105121bf2d4d5debd435fd Author: Likun Gao Date: Tue Jul 21 14:01:53 2020 +0800 drm/amd/powerplay: skip invalid msg when smu set mp1 state Some asic may not support for some message of set mp1 state. If the return value of smu_send_smc_msg is -EINVAL, that means it failed to send msg to smc as it can not map an valid message for the ASIC. And with that case, smu_set_mp1_state should be skipped as those ASIC was in fact do not support for that. Signed-off-by: Likun Gao Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 4031ead37239ec397fb9441555ae2d60e46dc333 Author: Linus Walleij Date: Mon Jul 20 15:03:27 2020 +0200 drm: pl111: Update documentation Remove notes about migrating from the old driver which is retired as all users are now migrated. Update the text to reflect that we support PL110 and PL111 alike. Drop the bullet on memory bandwidth scaling: this has been implemented. Signed-off-by: Linus Walleij Acked-by: Daniel Vetter Cc: Russell King Link: https://patchwork.freedesktop.org/patch/msgid/20200720130327.92364-1-linus.walleij@linaro.org commit 2afda735c5504e1258a0ec259aceec2078d3da67 Author: Michel Dänzer Date: Wed Jul 22 14:38:13 2020 +0200 drm/amdgpu/dc: Simplify drm_crtc_state::active checks drm_atomic_crtc_check enforces that ::active can only be true if ::enable is as well. Reviewed-by: Daniel Vetter Reviewed-by: Nicholas Kazlauskas Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 8fe384ff2d9610f4bf4aa2a9cecb5a209a1e85a2 Author: Kenneth Feng Date: Wed Jul 22 21:27:35 2020 +0800 drm/amd/powerplay: remove the dpm checking in the boot sequence It's not necessary to retrieve the power features status when the asic is booted up the first time. This patch can have the features enablement status still checked in suspend/resume case and removed from the first boot up sequence. Signed-off-by: Kenneth Feng Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 06b668c1dc1f5ef02e3065ef9201b4710cc03d0e Author: Tom St Denis Date: Wed Jul 22 07:36:36 2020 -0400 drm/amd/amdgpu: Fix compiler warning in df driver Fix this warning: CC [M] drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.o In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h:29, from drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h:26, from drivers/gpu/drm/amd/amdgpu/amdgpu.h:43, from drivers/gpu/drm/amd/amdgpu/df_v3_6.c:23: drivers/gpu/drm/amd/amdgpu/df_v3_6.c: In function ‘df_v3_6_pmc_get_count’: ./include/drm/drm_print.h:487:2: warning: ‘hi_base_addr’ may be used uninitialized in this function [-Wmaybe-uninitialized] 487 | __drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__) | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/df_v3_6.c:649:25: note: ‘hi_base_addr’ was declared here 649 | uint32_t lo_base_addr, hi_base_addr, lo_val = 0, hi_val = 0; | ^~~~~~~~~~~~ In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h:29, from drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h:26, from drivers/gpu/drm/amd/amdgpu/amdgpu.h:43, from drivers/gpu/drm/amd/amdgpu/df_v3_6.c:23: ./include/drm/drm_print.h:487:2: warning: ‘lo_base_addr’ may be used uninitialized in this function [-Wmaybe-uninitialized] 487 | __drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__) | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/df_v3_6.c:649:11: note: ‘lo_base_addr’ was declared here 649 | uint32_t lo_base_addr, hi_base_addr, lo_val = 0, hi_val = 0; Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit db92fbc3d7f0128a2fab8a34f80c388509721eb1 Author: Huang Rui Date: Tue Jul 21 18:08:24 2020 +0800 drm/amdgpu: won't include gc and mmhub register headers in GMC block All gc/mmhub register access and operation should be in gfxhub/mmhub level. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit caa9f483ca76693159499bd45e2e635c7e47bf46 Author: Huang Rui Date: Tue Jul 21 18:04:46 2020 +0800 drm/amdgpu: move get_invalidate_req function into gfxhub/mmhub level This patch is to move get_invalidate_req into gfxhub/mmhub level. It will avoid mismatch of the different gfxhub/mmhub register offsets and fields in the same gmc block. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2577db91e82e9b2e68acb9f467ae29ce3aa89d52 Author: Huang Rui Date: Tue Jul 21 17:39:26 2020 +0800 drm/amdgpu: add vmhub funcs helper (v2) This patch is to introduce vmhub funcs helper to add following callback (print_l2_protection_fault_status). Each GC/MMHUB register specific programming should be in gfxhub/mmhub level. v2: remove the condition of funcs assignment. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f2c1b5c145c8ffe71b314d94f35383ac0d94edd0 Author: Huang Rui Date: Tue Jul 21 14:57:02 2020 +0800 drm/amdgpu: abstract set_vm_fault_masks function to refine the programming This patch is to add set_vm_fault_masks helper to amdgpu_gmc to refine the original programming. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5befb6fc3b77b7c689c22ceb190e9d9087b3a961 Author: Huang Rui Date: Tue Jul 21 14:24:43 2020 +0800 drm/amdgpu: add member to store vm fault interrupt masks This patch adds a member in vmhub structure to store the vm fault interrupt masks for different version gfxhubs/mmhubs. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 799a2fbbbfc1caa6832c4b74294e6e86fb1ebb4e Author: Changfeng Date: Tue Jul 21 10:38:19 2020 +0800 Revert "drm/amd/powerplay: drop unnecessary message support check" The below 3 messages are not supported on Renoir SMU_MSG_PrepareMp1ForShutdown SMU_MSG_PrepareMp1ForUnload SMU_MSG_PrepareMp1ForReset It needs to revert patch: drm/amd/powerplay: drop unnecessary message support check to avoid set mp1 state fail during gpu reset on renoir. Signed-off-by: changfeng Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit b16284259f2dd11e331be73829cdc9877b5f7280 Author: Guchun Chen Date: Mon Jul 20 11:11:13 2020 +0800 drm/amdgpu: add printing after executing page reservation to eeprom This will tell users if the faulty page has been written to external eeprom device in dmesg log. Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 4922f1bcad1a001dc6379cfe5196f3862c6107c6 Author: John Clements Date: Wed Jul 22 09:40:11 2020 +0800 drm/amdgpu: expand sienna chichlid reg access support Added dedicated 64bit reg read/write support Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 9fadd6d1e2977bbd449d4fb99cde41ed6f71f668 Author: Christian König Date: Thu Jul 16 14:02:08 2020 +0200 drm/ttm: remove TTM_MEMTYPE_FLAG_MAPPABLE Not used any more. And it is bad design to use a TTM flag to do a check inside a driver. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/378245/ commit 902d77f3568a9f35493e1ebcfe25ba32cd3489e0 Author: Christian König Date: Thu Jul 16 10:28:04 2020 +0200 drm/amdgpu: stop using TTM_MEMTYPE_FLAG_MAPPABLE The driver does support some not-mapable resources, but those are already handled correctly in the switch/case statement in the code. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/378243/ commit 8401e2edf77097bb6ac6ddac4aa7fb1aecd8e01a Author: Christian König Date: Thu Jul 16 10:11:13 2020 +0200 drm/radeon: stop using TTM_MEMTYPE_FLAG_MAPPABLE The driver doesn't expose any not-mapable memory resources. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/378239/ commit bad60b8d1a7194df38fd7fe4b22f3f4dcf775099 Author: Zekun Shen Date: Tue Jun 23 18:11:05 2020 -0400 ath10k: check idx validity in __ath10k_htt_rx_ring_fill_n() The idx in __ath10k_htt_rx_ring_fill_n function lives in consistent dma region writable by the device. Malfunctional or malicious device could manipulate such idx to have a OOB write. Either by htt->rx_ring.netbufs_ring[idx] = skb; or by ath10k_htt_set_paddrs_ring(htt, paddr, idx); The idx can also be negative as it's signed, giving a large memory space to write to. It's possibly exploitable by corruptting a legit pointer with a skb pointer. And then fill skb with payload as rougue object. Part of the log here. Sometimes it appears as UAF when writing to a freed memory by chance. [ 15.594376] BUG: unable to handle page fault for address: ffff887f5c1804f0 [ 15.595483] #PF: supervisor write access in kernel mode [ 15.596250] #PF: error_code(0x0002) - not-present page [ 15.597013] PGD 0 P4D 0 [ 15.597395] Oops: 0002 [#1] SMP KASAN PTI [ 15.597967] CPU: 0 PID: 82 Comm: kworker/u2:2 Not tainted 5.6.0 #69 [ 15.598843] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 [ 15.600438] Workqueue: ath10k_wq ath10k_core_register_work [ath10k_core] [ 15.601389] RIP: 0010:__ath10k_htt_rx_ring_fill_n (linux/drivers/net/wireless/ath/ath10k/htt_rx.c:173) ath10k_core Signed-off-by: Zekun Shen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200623221105.3486-1-bruceshenzk@gmail.com commit 9a8ab2bfb678193f326239143290691c965faede Author: Bolarinwa Olayemi Saheed Date: Mon Jul 13 19:55:26 2020 +0200 ath9k: Check the return value of pcie_capability_read_*() On failure pcie_capability_read_dword() sets it's last parameter, val to 0. However, with Patch 14/14, it is possible that val is set to ~0 on failure. This would introduce a bug because (x & x) == (~0 & x). This bug can be avoided without changing the function's behaviour if the return value of pcie_capability_read_dword is checked to confirm success. Check the return value of pcie_capability_read_dword() to ensure success. Suggested-by: Bjorn Helgaas Signed-off-by: Bolarinwa Olayemi Saheed Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200713175529.29715-2-refactormyself@gmail.com commit a3d13a0a23ea20a83d7148279a0ab68cc9a5962c Author: Alexander A. Klimov Date: Thu Jul 16 11:46:24 2020 +0200 Replace HTTP links with HTTPS ones: DMI/SMBIOS SUPPORT Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Jean Delvare commit 3270ecb5214ad11a4a94af92c4bf47740c90d294 Author: Petr Mladek Date: Fri Jul 10 11:44:32 2020 +0200 MAINTAIERS: Add John Ogness as printk reviewer John Ogness has started major rework of the printk code. Add him as reviewer so that he is aware of all other coming changes and could influence their integration. Signed-off-by: Petr Mladek Acked-by: Steven Rostedt (VMware) Acked-by: Sergey Senozhatsky Acked-by: John Ogness Link: https://lore.kernel.org/r/20200710094432.19655-1-pmladek@suse.com commit 896fbe20b4e2333fb55cc9b9b783ebcc49eee7c7 Author: John Ogness Date: Thu Jul 9 15:29:44 2020 +0206 printk: use the lockless ringbuffer Replace the existing ringbuffer usage and implementation with lockless ringbuffer usage. Even though the new ringbuffer does not require locking, all existing locking is left in place. Therefore, this change is purely replacing the underlining ringbuffer. Changes that exist due to the ringbuffer replacement: - The VMCOREINFO has been updated for the new structures. - Dictionary data is now stored in a separate data buffer from the human-readable messages. The dictionary data buffer is set to the same size as the message buffer. Therefore, the total required memory for both dictionary and message data is 2 * (2 ^ CONFIG_LOG_BUF_SHIFT) for the initial static buffers and 2 * log_buf_len (the kernel parameter) for the dynamic buffers. - Record meta-data is now stored in a separate array of descriptors. This is an additional 72 * (2 ^ (CONFIG_LOG_BUF_SHIFT - 5)) bytes for the static array and 72 * (log_buf_len >> 5) bytes for the dynamic array. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200709132344.760-5-john.ogness@linutronix.de commit 8749efc0c0c325bf0c948c0b11d77bd3e497ead5 Author: John Ogness Date: Thu Jul 9 15:29:43 2020 +0206 Revert "printk: lock/unlock console only for new logbuf entries" This reverts commit 3ac37a93fa9217e576bebfd4ba3e80edaaeb2289. This optimization will not apply once the transition to a lockless printk is complete. Rather than porting this optimization through the transition only to remove it anyway, just revert it now to simplify the transition. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200709132344.760-4-john.ogness@linutronix.de commit b6cf8b3f3312e2ffe38f23c7c692eb9389277a9a Author: John Ogness Date: Thu Jul 9 15:29:42 2020 +0206 printk: add lockless ringbuffer Introduce a multi-reader multi-writer lockless ringbuffer for storing the kernel log messages. Readers and writers may use their API from any context (including scheduler and NMI). This ringbuffer will make it possible to decouple printk() callers from any context, locking, or console constraints. It also makes it possible for readers to have full access to the ringbuffer contents at any time and context (for example from any panic situation). The printk_ringbuffer is made up of 3 internal ringbuffers: desc_ring: A ring of descriptors. A descriptor contains all record meta data (sequence number, timestamp, loglevel, etc.) as well as internal state information about the record and logical positions specifying where in the other ringbuffers the text and dictionary strings are located. text_data_ring: A ring of data blocks. A data block consists of an unsigned long integer (ID) that maps to a desc_ring index followed by the text string of the record. dict_data_ring: A ring of data blocks. A data block consists of an unsigned long integer (ID) that maps to a desc_ring index followed by the dictionary string of the record. The internal state information of a descriptor is the key element to allow readers and writers to locklessly synchronize access to the data. Co-developed-by: Petr Mladek Signed-off-by: John Ogness Reviewed-by: Petr Mladek Reviewed-by: Paul E. McKenney Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200709132344.760-3-john.ogness@linutronix.de commit 0d6f55403a47b317c0d9511a80545c19ab0ef52f Author: John Ogness Date: Thu Jul 9 15:29:41 2020 +0206 crash: add VMCOREINFO macro to define offset in a struct declared by typedef The existing macro VMCOREINFO_OFFSET() can't be used for structures declared via typedef because "struct" is not part of type definition. Create another macro for this purpose. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Acked-by: Baoquan He Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200709132344.760-2-john.ogness@linutronix.de commit a9bf090932032bd259672814670df701ecb3ff51 Author: Kalle Valo Date: Tue Jun 16 17:00:55 2020 +0300 ath11k: remove define ATH11K_QMI_DEFAULT_CAL_FILE_NAME It's just a duplicate of ATH11K_DEFAULT_CAL_FILE. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592316055-24958-13-git-send-email-kvalo@codeaurora.org commit b3a18338ebd6cc8b540e63d8d9d9e30c20041bef Author: Kalle Valo Date: Tue Jun 16 17:00:54 2020 +0300 ath11k: don't use defines in hw_params These defines are not used anywhere else so to avoid extra indirection add the values directly to hw_params. No functional changes. Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592316055-24958-12-git-send-email-kvalo@codeaurora.org commit 6e5dd03c0b1f8bf9d8f5b3101ee92c46f804d526 Author: Kalle Valo Date: Tue Jun 16 17:00:53 2020 +0300 ath11k: qmi: cleanup info messages Use simplified format, just like ath10k uses, which is easier to read. Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592316055-24958-11-git-send-email-kvalo@codeaurora.org commit 21b1a5a4c34cff5e62499523728f59de5e38fde5 Author: Kalle Valo Date: Tue Jun 16 17:00:52 2020 +0300 ath11k: remove useless info messages ath11k should not be spamming these to the logs. If these are important they should be debug messages, but I just remove them for now. Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592316055-24958-10-git-send-email-kvalo@codeaurora.org commit 31d78a3de4de8e0254da8aa055f6328c970998fc Author: Kalle Valo Date: Tue Jun 16 17:00:51 2020 +0300 ath11k: change ath11k_core_fetch_board_data_api_n() to use ath11k_core_create_firmware_path() Use the helper added in previous comment to create the full path, instead of doing it manually. No functional changes. Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592316055-24958-9-git-send-email-kvalo@codeaurora.org commit 34d9fc80bac34ea4128daf55a1a85161ccb55d9b Author: Kalle Valo Date: Tue Jun 16 17:00:50 2020 +0300 ath11k: don't use defines for hw specific firmware directories The downside of using defines in struct ath11k_hw_params.fw.dir is that it's easy to get it wrong as the full path is not visible. So drop the use of defines and instead create the patch runtime using a static inline function ath11k_core_create_firmware_path(). Hopefully this reduces the chances of using incorrect firmware path. No functional changes. Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592316055-24958-8-git-send-email-kvalo@codeaurora.org commit 7b57b2ddec21c1a660af2d832939d392081e515f Author: Kalle Valo Date: Tue Jun 16 17:00:49 2020 +0300 ath11k: create a common function to request all firmware files To avoid duplicating the logic how the full firmware path is created create a common function ath11k_core_firmware_request() and convert also qmi.c to use it. Also remove a useless info print, it's more like a debug message anyway. No functional changes. Compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592316055-24958-7-git-send-email-kvalo@codeaurora.org commit 3b94ae4c62db0b158404073a039eb8fd0b00b75f Author: Anilkumar Kolli Date: Tue Jun 16 17:00:48 2020 +0300 ath11k: Add bdf-addr in hw_params bdf-addr is different for IPQ8074 and IPQ6018 so add it to hw_params. No functional changes. Compile tested only. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592316055-24958-6-git-send-email-kvalo@codeaurora.org commit d547ca4c8cc5638669b9942ad7284ebf7106f708 Author: Anilkumar Kolli Date: Tue Jun 16 17:00:47 2020 +0300 ath11k: add hw_ops for pdev id to hw_mac mapping pdev_id to hw_mac is different for ipq8074 and ipq6018 Below table has the mapping pdev_id ipq8074 ipq6018 ------- ------- ------- 0 0 0 1 2 1 2 1 Not applicable No functional changes. Compile tested only. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592316055-24958-5-git-send-email-kvalo@codeaurora.org commit b1cc29e97d1b96dfd3a7437083f7ba4aa5f32b88 Author: Anilkumar Kolli Date: Tue Jun 16 17:00:46 2020 +0300 ath11k: define max_radios in hw_params IPQ6018 needs different value for max_radios so make it configurable via hw_params. No functional changes. Compile tested only. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592316055-24958-4-git-send-email-kvalo@codeaurora.org commit d3318abf41cf6be94424b3e3adcde791d563a147 Author: Anilkumar Kolli Date: Tue Jun 16 17:00:45 2020 +0300 ath11k: convert ath11k_hw_params to an array Convert to ath11k_hw_params to an array to make it possible add new hardware in the future, for example IPQ6018 or QCA6390. No functional changes. Compile tested only. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592316055-24958-3-git-send-email-kvalo@codeaurora.org commit 166e22b38aa3bcde616534f67b35d6e7e52b5b54 Author: Anilkumar Kolli Date: Tue Jun 16 17:00:44 2020 +0300 ath11k: ahb: call ath11k_core_init() before irq configuration This is needed to init .max_radios in hw_params and onfigure external interrupts for available pdev_ids. Compile tested only. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592316055-24958-2-git-send-email-kvalo@codeaurora.org commit aed95297250f0cac4c4861eef4a91708970aa1dc Author: Zekun Shen Date: Tue Jun 16 09:25:43 2020 -0400 ath10k: pci: fix memcpy size of bmi response A compromized ath10k peripheral is able to control the size argument of memcpy in ath10k_pci_hif_exchange_bmi_msg. The min result from previous line is not used as the size argument for memcpy. Instead, xfer.resp_len comes from untrusted stream dma input. The value comes from "nbytes" in ath10k_pci_bmi_recv_data, which is set inside _ath10k_ce_completed_recv_next_nolock with the line nbytes = __le16_to_cpu(sdesc.nbytes); sdesc is a stream dma region which device can write to. Signed-off-by: Zekun Shen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200616132544.17478-1-bruceshenzk@gmail.com commit a6f2f0fdc73aacc6e10ae48ae78634dba26702d4 Author: Dan Carpenter Date: Fri Jun 5 14:00:20 2020 +0300 soc: xilinx: Fix error code in zynqmp_pm_probe() This should be returning PTR_ERR() but it returns IS_ERR() instead. Fixes: ffdbae28d9d1 ("drivers: soc: xilinx: Use mailbox IPI callback") Signed-off-by: Dan Carpenter Reviewed-by: Michal Simek Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/20200605110020.GA978434@mwanda commit 93a5b668806c1d868f7f9f0438321006200c049f Author: Anilkumar Kolli Date: Tue Jun 16 11:27:34 2020 +0300 ath11k: rename default board file Rename default BDF to make it consistent with board-2.bin naming. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1591709581-18039-4-git-send-email-akolli@codeaurora.org commit 7309f7730532c05916981901c4350bf21edf1a33 Author: Anilkumar Kolli Date: Tue Jun 16 11:27:33 2020 +0300 ath11k: update firmware files read path We need this so that all hardware versions can coexist and it's easier to manage everything then all hardware directories are under ath11k directory. Copy ath11k firmware files to /lib/firmware/ath11k/IPQ8074/hw2.0/ Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1591709581-18039-3-git-send-email-akolli@codeaurora.org commit 0aa90483f23e792f6cf571e8b396eef746194438 Author: Loic Poulain Date: Mon Jun 15 20:29:06 2020 +0300 wcn36xx: Add ieee80211 rx status rate information Packet encoding, bandwidth and bitrate can be derived from the wcn36xx rate_idx, part of the buffer descriptor. Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1591961254-10243-1-git-send-email-loic.poulain@linaro.org commit 720e5c03e5cb26d33d97f55192b791bb48478aa5 Author: Venkateswara Naralasetty Date: Mon Jun 15 20:29:03 2020 +0300 ath10k: provide survey info as accumulated data It is expected that the returned counters by .get_survey are monotonic increasing. But the data from ath10k gets reset to zero regularly. Channel active/busy time are then showing incorrect values (less than previous or sometimes zero) for the currently active channel during successive survey dump commands. example: $ iw dev wlan0 survey dump Survey data from wlan0 frequency: 5180 MHz [in use] channel active time: 54995 ms channel busy time: 432 ms channel receive time: 0 ms channel transmit time: 59 ms ... $ iw dev wlan0 survey dump Survey data from wlan0 frequency: 5180 MHz [in use] channel active time: 32592 ms channel busy time: 254 ms channel receive time: 0 ms channel transmit time: 0 ms ... The correct way to handle this is to use the non-clearing WMI_BSS_SURVEY_REQ_TYPE_READ wmi_bss_survey_req_type. The firmware will then accumulate the survey data and handle wrap arounds. Tested-on: QCA9984 hw1.0 10.4-3.5.3-00057 Tested-on: QCA988X hw2.0 10.2.4-1.0-00047 Tested-on: QCA9888 hw2.0 10.4-3.9.0.2-00024 Tested-on: QCA4019 hw1.0 10.4-3.6-00140 Fixes: fa7937e3d5c2 ("ath10k: update bss channel survey information") Signed-off-by: Venkateswara Naralasetty Tested-by: Markus Theil Tested-by: John Deere <24601deerej@gmail.com> [sven@narfation.org: adjust commit message] Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1592232686-28712-1-git-send-email-kvalo@codeaurora.org commit 67b927f9820847d30e97510b2f00cd142b9559b6 Author: Venkateswara Naralasetty Date: Mon Jun 15 20:29:01 2020 +0300 ath10k: fix retry packets update in station dump When tx status enabled, retry count is updated from tx completion status. which is not working as expected due to firmware limitation where firmware can not provide per MSDU rate statistics from tx completion status. Due to this tx retry count is always 0 in station dump. Fix this issue by updating the retry packet count from per peer statistics. This patch will not break on SDIO devices since, this retry count is already updating from peer statistics for SDIO devices. Tested-on: QCA9984 PCI 10.4-3.6-00104 Tested-on: QCA9882 PCI 10.2.4-1.0-00047 Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1591856446-26977-1-git-send-email-vnaralas@codeaurora.org commit 8f9ed93d09a97444733d492a3bbf66bcb786a777 Author: Douglas Anderson Date: Mon Jun 15 20:28:59 2020 +0300 ath10k: Wait until copy complete is actually done before completing On wcn3990 we have "per_ce_irq = true". That makes the ath10k_ce_interrupt_summary() function always return 0xfff. The ath10k_ce_per_engine_service_any() function will see this and think that _all_ copy engines have an interrupt. Without checking, the ath10k_ce_per_engine_service() assumes that if it's called that the "copy complete" (cc) interrupt fired. This combination seems bad. Let's add a check to make sure that the "copy complete" interrupt actually fired in ath10k_ce_per_engine_service(). This might fix a hard-to-reproduce failure where it appears that the copy complete handlers run before the copy is really complete. Specifically a symptom was that we were seeing this on a Qualcomm sc7180 board: arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0x7fdd45780, fsynr=0x30003, cbfrsynra=0xc1, cb=10 Even on platforms that don't have wcn3990 this still seems like it would be a sane thing to do. Specifically the current IRQ handler comments indicate that there might be other misc interrupt sources firing that need to be cleared. If one of those sources was the one that caused the IRQ handler to be called it would also be important to double-check that the interrupt we cared about actually fired. Tested-on: WCN3990 SNOC WLAN.HL.3.2.2-00490-QCAHLSWMTPL-1 Signed-off-by: Douglas Anderson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200609082015.1.Ife398994e5a0a6830e4d4a16306ef36e0144e7ba@changeid commit c1a371cf80fbc06280cc0064ca99a39d0428ded3 Author: Randy Dunlap Date: Mon Apr 13 09:14:35 2020 -0700 printk: fix global comment Fix typo/spello. Signed-off-by: Randy Dunlap Reviewed-by: Sergey Senozhatsky Signed-off-by: Jiri Kosina commit 20607434113b8f7d74cfc98e27a4199535c1d4fa Author: Randy Dunlap Date: Mon Mar 30 17:22:11 2020 -0700 lib/bitmap.c: fix spello Fix typo/spello for whitespaces. Signed-off-by: Randy Dunlap Signed-off-by: Jiri Kosina commit 15f9f63f4d74c084d32663065e36e57fdc2e47fd Author: Chucheng Luo Date: Sat Mar 14 12:13:11 2020 +0800 fs: Fix missing 'bit' in comment The missing word may make it hard for other developers to understand it. Signed-off-by: Chucheng Luo Acked-by: Hans de Goede Acked-by: Andreas Dilger Signed-off-by: Jiri Kosina